From e070dafd0549f4afbe499a997f69f0721388c83b Mon Sep 17 00:00:00 2001 From: tz <185176969+tzhaoo@users.noreply.github.com> Date: Wed, 7 Oct 2026 17:23:45 +0200 Subject: [PATCH 1/2] Use vcpkg for third-party dependencies --- CMakeLists.txt | 85 +- README.md | 6 +- THIRD_PARTY_NOTICES.md | 7 +- tests/consumer/CMakeLists.txt | 6 + third_party/crc32c/.clang-format | 3 - third_party/crc32c/.clang_complete | 8 - .../crc32c/.github/workflows/build.yml | 102 - third_party/crc32c/.gitignore | 9 - third_party/crc32c/.gitmodules | 9 - third_party/crc32c/.ycm_extra_conf.py | 142 - third_party/crc32c/AUTHORS | 11 - third_party/crc32c/CMakeLists.txt | 435 - third_party/crc32c/CONTRIBUTING.md | 23 - third_party/crc32c/Crc32cConfig.cmake.in | 9 - third_party/crc32c/LICENSE | 28 - third_party/crc32c/README.md | 124 - third_party/crc32c/include/crc32c/crc32c.h | 89 - third_party/crc32c/src/crc32c.cc | 39 - third_party/crc32c/src/crc32c_arm64.cc | 123 - third_party/crc32c/src/crc32c_arm64.h | 25 - third_party/crc32c/src/crc32c_arm64_check.h | 66 - .../crc32c/src/crc32c_arm64_unittest.cc | 24 - third_party/crc32c/src/crc32c_benchmark.cc | 104 - third_party/crc32c/src/crc32c_capi_unittest.c | 66 - third_party/crc32c/src/crc32c_config.h.in | 36 - .../crc32c/src/crc32c_extend_unittests.h | 112 - third_party/crc32c/src/crc32c_internal.h | 23 - third_party/crc32c/src/crc32c_portable.cc | 351 - .../crc32c/src/crc32c_portable_unittest.cc | 20 - third_party/crc32c/src/crc32c_prefetch.h | 44 - .../crc32c/src/crc32c_prefetch_unittest.cc | 9 - third_party/crc32c/src/crc32c_read_le.h | 51 - .../crc32c/src/crc32c_read_le_unittest.cc | 32 - third_party/crc32c/src/crc32c_round_up.h | 34 - .../crc32c/src/crc32c_round_up_unittest.cc | 84 - third_party/crc32c/src/crc32c_sse42.cc | 256 - third_party/crc32c/src/crc32c_sse42.h | 31 - third_party/crc32c/src/crc32c_sse42_check.h | 48 - .../crc32c/src/crc32c_sse42_unittest.cc | 24 - third_party/crc32c/src/crc32c_test_main.cc | 20 - third_party/crc32c/src/crc32c_unittest.cc | 129 - third_party/libtiff/CMakeLists.txt | 250 - third_party/libtiff/ChangeLog | 18685 ------------ third_party/libtiff/HOWTO-RELEASE | 155 - third_party/libtiff/LICENSE.md | 50 - third_party/libtiff/Makefile.am | 94 - third_party/libtiff/Makefile.in | 1023 - third_party/libtiff/README.md | 70 - third_party/libtiff/RELEASE-DATE | 1 - third_party/libtiff/TODO | 10 - third_party/libtiff/VERSION | 1 - third_party/libtiff/aclocal.m4 | 1177 - third_party/libtiff/autogen.sh | 23 - third_party/libtiff/build/CMakeLists.txt | 23 - third_party/libtiff/build/Makefile.am | 32 - third_party/libtiff/build/Makefile.in | 692 - third_party/libtiff/build/README | 3 - .../libtiff/cmake/AutotoolsCompat.cmake | 32 - .../libtiff/cmake/AutotoolsVersion.cmake | 56 - third_party/libtiff/cmake/CXXLibrary.cmake | 32 - .../libtiff/cmake/CompilerChecks.cmake | 124 - third_party/libtiff/cmake/DeflateCodec.cmake | 49 - third_party/libtiff/cmake/FindCMath.cmake | 72 - third_party/libtiff/cmake/FindDeflate.cmake | 115 - third_party/libtiff/cmake/FindJBIG.cmake | 116 - third_party/libtiff/cmake/FindJPEG.cmake | 142 - third_party/libtiff/cmake/FindLERC.cmake | 100 - third_party/libtiff/cmake/FindWebP.cmake | 91 - third_party/libtiff/cmake/FindZSTD.cmake | 107 - third_party/libtiff/cmake/Findliblzma.cmake | 126 - third_party/libtiff/cmake/IncludeChecks.cmake | 36 - .../libtiff/cmake/InternalCodecs.cmake | 46 - third_party/libtiff/cmake/JBIGCodec.cmake | 47 - third_party/libtiff/cmake/JPEGCodec.cmake | 84 - third_party/libtiff/cmake/LERCCodec.cmake | 36 - third_party/libtiff/cmake/LZMACodec.cmake | 34 - .../libtiff/cmake/LargeFileSupport.cmake | 32 - .../libtiff/cmake/LibraryFeatures.cmake | 62 - third_party/libtiff/cmake/LinkerChecks.cmake | 55 - third_party/libtiff/cmake/OpenGLChecks.cmake | 50 - third_party/libtiff/cmake/PixarLogCodec.cmake | 33 - third_party/libtiff/cmake/PkgConfig.cmake | 69 - .../libtiff/cmake/ProcessorChecks.cmake | 38 - third_party/libtiff/cmake/Release.cmake | 47 - third_party/libtiff/cmake/ReleaseScript.cmake | 42 - third_party/libtiff/cmake/Sphinx.cmake | 93 - .../cmake/SphinxCheckInternalLinks.cmake | 87 - third_party/libtiff/cmake/SymbolChecks.cmake | 43 - third_party/libtiff/cmake/TiffConfig.cmake.in | 27 - .../libtiff/cmake/TypeSizeChecks.cmake | 54 - third_party/libtiff/cmake/WebPCodec.cmake | 35 - .../libtiff/cmake/WindowsSupport.cmake | 47 - third_party/libtiff/cmake/ZSTDCodec.cmake | 64 - .../cmake/list-manpage-dependencies.py | 28 - third_party/libtiff/cmake/list-manpages.py | 31 - third_party/libtiff/config/compile | 348 - third_party/libtiff/config/config.guess | 1818 -- third_party/libtiff/config/config.h.in | 278 - third_party/libtiff/config/config.sub | 2364 -- third_party/libtiff/config/depcomp | 791 - third_party/libtiff/config/install-sh | 518 - third_party/libtiff/config/ltmain.sh | 11251 -------- third_party/libtiff/config/missing | 215 - third_party/libtiff/config/test-driver | 148 - third_party/libtiff/configure | 23872 ---------------- third_party/libtiff/configure.ac | 1275 - third_party/libtiff/contrib/CMakeLists.txt | 27 - third_party/libtiff/contrib/Makefile.am | 31 - third_party/libtiff/contrib/Makefile.in | 691 - third_party/libtiff/contrib/README | 2 - .../libtiff/contrib/addtiffo/CMakeLists.txt | 33 - .../libtiff/contrib/addtiffo/Makefile.am | 40 - .../libtiff/contrib/addtiffo/Makefile.in | 676 - third_party/libtiff/contrib/addtiffo/README | 142 - .../libtiff/contrib/addtiffo/addtiffo.c | 174 - .../libtiff/contrib/addtiffo/tif_overview.c | 933 - .../libtiff/contrib/addtiffo/tif_ovrcache.c | 411 - .../libtiff/contrib/addtiffo/tif_ovrcache.h | 96 - .../libtiff/contrib/dbs/CMakeLists.txt | 50 - third_party/libtiff/contrib/dbs/Makefile.am | 48 - third_party/libtiff/contrib/dbs/Makefile.in | 827 - third_party/libtiff/contrib/dbs/README | 7 - third_party/libtiff/contrib/dbs/tiff-bi.c | 84 - .../libtiff/contrib/dbs/tiff-grayscale.c | 142 - .../libtiff/contrib/dbs/tiff-palette.c | 287 - third_party/libtiff/contrib/dbs/tiff-rgb.c | 216 - .../libtiff/contrib/dbs/xtiff/Makefile.am | 46 - .../libtiff/contrib/dbs/xtiff/Makefile.in | 527 - third_party/libtiff/contrib/dbs/xtiff/README | 6 - .../libtiff/contrib/dbs/xtiff/patchlevel.h | 2 - third_party/libtiff/contrib/dbs/xtiff/xtiff.c | 1345 - .../libtiff/contrib/dbs/xtiff/xtifficon.h | 15 - .../libtiff/contrib/iptcutil/CMakeLists.txt | 27 - .../libtiff/contrib/iptcutil/Makefile.am | 42 - .../libtiff/contrib/iptcutil/Makefile.in | 670 - third_party/libtiff/contrib/iptcutil/README | 25 - .../libtiff/contrib/iptcutil/iptcutil.c | 899 - .../libtiff/contrib/iptcutil/test.iptc | Bin 1107 -> 0 bytes third_party/libtiff/contrib/iptcutil/test.txt | 32 - third_party/libtiff/contrib/mfs/Makefile.am | 28 - third_party/libtiff/contrib/mfs/Makefile.in | 510 - third_party/libtiff/contrib/mfs/README | 37 - third_party/libtiff/contrib/mfs/mfs_file.c | 573 - third_party/libtiff/contrib/pds/Makefile.am | 31 - third_party/libtiff/contrib/pds/Makefile.in | 513 - third_party/libtiff/contrib/pds/README | 90 - .../libtiff/contrib/pds/tif_imageiter.c | 564 - .../libtiff/contrib/pds/tif_imageiter.h | 52 - .../libtiff/contrib/pds/tif_pdsdirread.c | 1210 - .../libtiff/contrib/pds/tif_pdsdirwrite.c | 1037 - third_party/libtiff/contrib/ras/Makefile.am | 29 - third_party/libtiff/contrib/ras/Makefile.in | 511 - third_party/libtiff/contrib/ras/README | 10 - third_party/libtiff/contrib/ras/ras2tif.c | 244 - third_party/libtiff/contrib/ras/tif2ras.c | 334 - .../libtiff/contrib/stream/Makefile.am | 29 - .../libtiff/contrib/stream/Makefile.in | 511 - third_party/libtiff/contrib/stream/README | 30 - .../libtiff/contrib/stream/tiffstream.cpp | 215 - .../libtiff/contrib/stream/tiffstream.h | 65 - third_party/libtiff/contrib/tags/Makefile.am | 32 - third_party/libtiff/contrib/tags/Makefile.in | 514 - third_party/libtiff/contrib/tags/README | 132 - third_party/libtiff/contrib/tags/listtif.c | 34 - third_party/libtiff/contrib/tags/maketif.c | 65 - third_party/libtiff/contrib/tags/xtif_dir.c | 333 - third_party/libtiff/contrib/tags/xtiffio.h | 53 - third_party/libtiff/contrib/tags/xtiffiop.h | 66 - .../libtiff/contrib/win_dib/Makefile.am | 31 - .../libtiff/contrib/win_dib/Makefile.in | 513 - .../libtiff/contrib/win_dib/Makefile.w95 | 132 - .../libtiff/contrib/win_dib/README.Tiffile | 31 - .../libtiff/contrib/win_dib/README.tiff2dib | 51 - .../libtiff/contrib/win_dib/Tiffile.cpp | 447 - .../libtiff/contrib/win_dib/tiff2dib.c | 359 - third_party/libtiff/doc/CMakeLists.txt | 144 - third_party/libtiff/doc/Makefile.am | 289 - third_party/libtiff/doc/Makefile.in | 888 - third_party/libtiff/doc/addingtags.rst | 370 - third_party/libtiff/doc/build.rst | 754 - third_party/libtiff/doc/conf.py | 179 - third_party/libtiff/doc/contrib.rst | 88 - third_party/libtiff/doc/functions.rst | 66 - .../doc/functions/TIFFAccessTagMethods.rst | 30 - .../libtiff/doc/functions/TIFFClientInfo.rst | 40 - .../libtiff/doc/functions/TIFFClose.rst | 51 - .../doc/functions/TIFFCreateDirectory.rst | 83 - .../doc/functions/TIFFCustomDirectory.rst | 212 - .../doc/functions/TIFFCustomTagList.rst | 47 - .../libtiff/doc/functions/TIFFDataWidth.rst | 47 - .../functions/TIFFDeferStrileArrayWriting.rst | 72 - .../libtiff/doc/functions/TIFFError.rst | 106 - .../doc/functions/TIFFFieldDataType.rst | 38 - .../libtiff/doc/functions/TIFFFieldName.rst | 37 - .../doc/functions/TIFFFieldPassCount.rst | 52 - .../libtiff/doc/functions/TIFFFieldQuery.rst | 88 - .../doc/functions/TIFFFieldReadCount.rst | 49 - .../libtiff/doc/functions/TIFFFieldTag.rst | 40 - .../doc/functions/TIFFFieldWriteCount.rst | 54 - .../libtiff/doc/functions/TIFFFlush.rst | 50 - .../libtiff/doc/functions/TIFFGetField.rst | 490 - .../doc/functions/TIFFMergeFieldInfo.rst | 34 - .../libtiff/doc/functions/TIFFOpen.rst | 336 - .../libtiff/doc/functions/TIFFOpenOptions.rst | 129 - .../doc/functions/TIFFPrintDirectory.rst | 58 - .../doc/functions/TIFFProcFunctions.rst | 57 - .../libtiff/doc/functions/TIFFRGBAImage.rst | 255 - .../doc/functions/TIFFReadDirectory.rst | 146 - .../doc/functions/TIFFReadEncodedStrip.rst | 57 - .../doc/functions/TIFFReadEncodedTile.rst | 57 - .../doc/functions/TIFFReadFromUserBuffer.rst | 46 - .../doc/functions/TIFFReadRGBAImage.rst | 167 - .../doc/functions/TIFFReadRGBAStrip.rst | 135 - .../doc/functions/TIFFReadRGBATile.rst | 137 - .../doc/functions/TIFFReadRawStrip.rst | 43 - .../libtiff/doc/functions/TIFFReadRawTile.rst | 45 - .../doc/functions/TIFFReadScanline.rst | 75 - .../libtiff/doc/functions/TIFFReadTile.rst | 57 - .../doc/functions/TIFFSetDirectory.rst | 71 - .../libtiff/doc/functions/TIFFSetField.rst | 402 - .../doc/functions/TIFFSetTagExtender.rst | 33 - .../libtiff/doc/functions/TIFFStrileQuery.rst | 80 - .../libtiff/doc/functions/TIFFWarning.rst | 105 - .../doc/functions/TIFFWriteDirectory.rst | 143 - .../doc/functions/TIFFWriteEncodedStrip.rst | 80 - .../doc/functions/TIFFWriteEncodedTile.rst | 76 - .../doc/functions/TIFFWriteRawStrip.rst | 75 - .../doc/functions/TIFFWriteRawTile.rst | 67 - .../doc/functions/TIFFWriteScanline.rst | 124 - .../libtiff/doc/functions/TIFFWriteTile.rst | 51 - .../libtiff/doc/functions/TIFFbuffer.rst | 57 - .../libtiff/doc/functions/TIFFcodec.rst | 75 - .../libtiff/doc/functions/TIFFcolor.rst | 218 - .../libtiff/doc/functions/TIFFmemory.rst | 61 - .../libtiff/doc/functions/TIFFquery.rst | 150 - .../libtiff/doc/functions/TIFFsize.rst | 51 - .../libtiff/doc/functions/TIFFstrip.rst | 94 - .../libtiff/doc/functions/TIFFswab.rst | 78 - .../libtiff/doc/functions/TIFFtile.rst | 93 - .../doc/functions/_TIFFRewriteField.rst | 33 - .../libtiff/doc/functions/_TIFFauxiliary.rst | 34 - third_party/libtiff/doc/functions/libtiff.rst | 856 - .../libtiff/doc/html-prebuilt/.buildinfo | 4 - .../doc/html-prebuilt/_images/bali.jpg | Bin 26152 -> 0 bytes .../libtiff/doc/html-prebuilt/_images/cat.gif | Bin 12477 -> 0 bytes .../doc/html-prebuilt/_images/cover.jpg | Bin 20189 -> 0 bytes .../doc/html-prebuilt/_images/cramps.gif | Bin 13137 -> 0 bytes .../doc/html-prebuilt/_images/dave.gif | Bin 8220 -> 0 bytes .../doc/html-prebuilt/_images/esri.png | Bin 10281 -> 0 bytes .../libtiff/doc/html-prebuilt/_images/jim.gif | Bin 14493 -> 0 bytes .../doc/html-prebuilt/_images/leica.png | Bin 6451 -> 0 bytes .../doc/html-prebuilt/_images/quad.jpg | Bin 23904 -> 0 bytes .../doc/html-prebuilt/_images/ring.gif | Bin 4275 -> 0 bytes .../doc/html-prebuilt/_images/safe.png | Bin 10285 -> 0 bytes .../doc/html-prebuilt/_images/smallliz.jpg | Bin 16463 -> 0 bytes .../doc/html-prebuilt/_images/strike.gif | Bin 5610 -> 0 bytes .../doc/html-prebuilt/_images/weogeo.png | Bin 4160 -> 0 bytes .../html-prebuilt/_sources/addingtags.rst.txt | 370 - .../doc/html-prebuilt/_sources/build.rst.txt | 754 - .../html-prebuilt/_sources/contrib.rst.txt | 88 - .../html-prebuilt/_sources/functions.rst.txt | 66 - .../functions/TIFFAccessTagMethods.rst.txt | 30 - .../_sources/functions/TIFFClientInfo.rst.txt | 40 - .../_sources/functions/TIFFClose.rst.txt | 51 - .../functions/TIFFCreateDirectory.rst.txt | 83 - .../functions/TIFFCustomDirectory.rst.txt | 212 - .../functions/TIFFCustomTagList.rst.txt | 47 - .../_sources/functions/TIFFDataWidth.rst.txt | 47 - .../TIFFDeferStrileArrayWriting.rst.txt | 72 - .../_sources/functions/TIFFError.rst.txt | 106 - .../functions/TIFFFieldDataType.rst.txt | 38 - .../_sources/functions/TIFFFieldName.rst.txt | 37 - .../functions/TIFFFieldPassCount.rst.txt | 52 - .../_sources/functions/TIFFFieldQuery.rst.txt | 88 - .../functions/TIFFFieldReadCount.rst.txt | 49 - .../_sources/functions/TIFFFieldTag.rst.txt | 40 - .../functions/TIFFFieldWriteCount.rst.txt | 54 - .../_sources/functions/TIFFFlush.rst.txt | 50 - .../_sources/functions/TIFFGetField.rst.txt | 490 - .../functions/TIFFMergeFieldInfo.rst.txt | 34 - .../_sources/functions/TIFFOpen.rst.txt | 336 - .../functions/TIFFOpenOptions.rst.txt | 129 - .../functions/TIFFPrintDirectory.rst.txt | 58 - .../functions/TIFFProcFunctions.rst.txt | 57 - .../_sources/functions/TIFFRGBAImage.rst.txt | 255 - .../functions/TIFFReadDirectory.rst.txt | 146 - .../functions/TIFFReadEncodedStrip.rst.txt | 57 - .../functions/TIFFReadEncodedTile.rst.txt | 57 - .../functions/TIFFReadFromUserBuffer.rst.txt | 46 - .../functions/TIFFReadRGBAImage.rst.txt | 167 - .../functions/TIFFReadRGBAStrip.rst.txt | 135 - .../functions/TIFFReadRGBATile.rst.txt | 137 - .../functions/TIFFReadRawStrip.rst.txt | 43 - .../functions/TIFFReadRawTile.rst.txt | 45 - .../functions/TIFFReadScanline.rst.txt | 75 - .../_sources/functions/TIFFReadTile.rst.txt | 57 - .../functions/TIFFSetDirectory.rst.txt | 71 - .../_sources/functions/TIFFSetField.rst.txt | 402 - .../functions/TIFFSetTagExtender.rst.txt | 33 - .../functions/TIFFStrileQuery.rst.txt | 80 - .../_sources/functions/TIFFWarning.rst.txt | 105 - .../functions/TIFFWriteDirectory.rst.txt | 143 - .../functions/TIFFWriteEncodedStrip.rst.txt | 80 - .../functions/TIFFWriteEncodedTile.rst.txt | 76 - .../functions/TIFFWriteRawStrip.rst.txt | 75 - .../functions/TIFFWriteRawTile.rst.txt | 67 - .../functions/TIFFWriteScanline.rst.txt | 124 - .../_sources/functions/TIFFWriteTile.rst.txt | 51 - .../_sources/functions/TIFFbuffer.rst.txt | 57 - .../_sources/functions/TIFFcodec.rst.txt | 75 - .../_sources/functions/TIFFcolor.rst.txt | 218 - .../_sources/functions/TIFFmemory.rst.txt | 61 - .../_sources/functions/TIFFquery.rst.txt | 150 - .../_sources/functions/TIFFsize.rst.txt | 51 - .../_sources/functions/TIFFstrip.rst.txt | 94 - .../_sources/functions/TIFFswab.rst.txt | 78 - .../_sources/functions/TIFFtile.rst.txt | 93 - .../functions/_TIFFRewriteField.rst.txt | 33 - .../_sources/functions/_TIFFauxiliary.rst.txt | 34 - .../_sources/functions/libtiff.rst.txt | 856 - .../doc/html-prebuilt/_sources/images.rst.txt | 23 - .../doc/html-prebuilt/_sources/index.rst.txt | 67 - .../html-prebuilt/_sources/internals.rst.txt | 426 - .../html-prebuilt/_sources/libtiff.rst.txt | 744 - .../html-prebuilt/_sources/multi_page.rst.txt | 213 - .../_sources/project/acknowledgements.rst.txt | 102 - .../_sources/project/bugs.rst.txt | 49 - .../_sources/project/index.rst.txt | 27 - .../_sources/project/license.rst.txt | 24 - .../_sources/project/mailinglist.rst.txt | 29 - .../_sources/project/psc.rst.txt | 18 - .../_sources/releases/historical.rst.txt | 48 - .../_sources/releases/index.rst.txt | 31 - .../_sources/releases/v3.4beta007.rst.txt | 75 - .../_sources/releases/v3.4beta016.rst.txt | 71 - .../_sources/releases/v3.4beta018.rst.txt | 50 - .../_sources/releases/v3.4beta024.rst.txt | 99 - .../_sources/releases/v3.4beta028.rst.txt | 105 - .../_sources/releases/v3.4beta029.rst.txt | 52 - .../_sources/releases/v3.4beta031.rst.txt | 59 - .../_sources/releases/v3.4beta032.rst.txt | 53 - .../_sources/releases/v3.4beta033.rst.txt | 45 - .../_sources/releases/v3.4beta034.rst.txt | 37 - .../_sources/releases/v3.4beta035.rst.txt | 32 - .../_sources/releases/v3.4beta036.rst.txt | 86 - .../_sources/releases/v3.5.1.rst.txt | 41 - .../_sources/releases/v3.5.2.rst.txt | 74 - .../_sources/releases/v3.5.3.rst.txt | 97 - .../_sources/releases/v3.5.4.rst.txt | 45 - .../_sources/releases/v3.5.5.rst.txt | 91 - .../_sources/releases/v3.5.6beta.rst.txt | 135 - .../_sources/releases/v3.5.7.rst.txt | 219 - .../_sources/releases/v3.6.0.rst.txt | 372 - .../_sources/releases/v3.6.1.rst.txt | 135 - .../_sources/releases/v3.7.0.rst.txt | 78 - .../_sources/releases/v3.7.0alpha.rst.txt | 179 - .../_sources/releases/v3.7.0beta.rst.txt | 98 - .../_sources/releases/v3.7.0beta2.rst.txt | 69 - .../_sources/releases/v3.7.1.rst.txt | 160 - .../_sources/releases/v3.7.2.rst.txt | 142 - .../_sources/releases/v3.7.3.rst.txt | 169 - .../_sources/releases/v3.7.4.rst.txt | 84 - .../_sources/releases/v3.8.0.rst.txt | 140 - .../_sources/releases/v3.8.1.rst.txt | 147 - .../_sources/releases/v3.8.2.rst.txt | 76 - .../_sources/releases/v3.9.0.rst.txt | 203 - .../_sources/releases/v3.9.0beta.rst.txt | 225 - .../_sources/releases/v3.9.1.rst.txt | 63 - .../_sources/releases/v3.9.2.rst.txt | 67 - .../_sources/releases/v3.9.3.rst.txt | 105 - .../_sources/releases/v3.9.4.rst.txt | 69 - .../_sources/releases/v3.9.5.rst.txt | 217 - .../_sources/releases/v4.0.0.rst.txt | 213 - .../_sources/releases/v4.0.1.rst.txt | 60 - .../_sources/releases/v4.0.10.rst.txt | 239 - .../_sources/releases/v4.0.2.rst.txt | 64 - .../_sources/releases/v4.0.3.rst.txt | 68 - .../_sources/releases/v4.0.4.rst.txt | 191 - .../_sources/releases/v4.0.4beta.rst.txt | 236 - .../_sources/releases/v4.0.5.rst.txt | 85 - .../_sources/releases/v4.0.6.rst.txt | 77 - .../_sources/releases/v4.0.7.rst.txt | 350 - .../_sources/releases/v4.0.8.rst.txt | 390 - .../_sources/releases/v4.0.9.rst.txt | 317 - .../_sources/releases/v4.1.0.rst.txt | 98 - .../_sources/releases/v4.2.0.rst.txt | 103 - .../_sources/releases/v4.3.0.rst.txt | 85 - .../_sources/releases/v4.4.0.rst.txt | 98 - .../_sources/releases/v4.5.0.rst.txt | 142 - .../_sources/releases/v4.5.1.rst.txt | 186 - .../_sources/releases/v4.6.0.rst.txt | 156 - .../_sources/releases/v4.7.0.rst.txt | 211 - .../_sources/releases/v4.7.1.rst.txt | 273 - .../html-prebuilt/_sources/rfcs/index.rst.txt | 14 - .../_sources/rfcs/rfc1_psc.rst.txt | 107 - .../rfcs/rfc2_restoring_needed_tools.rst.txt | 60 - .../_sources/specification/bigtiff.rst.txt | 236 - .../specification/coverage-bigtiff.rst.txt | 59 - .../_sources/specification/coverage.rst.txt | 1693 -- .../_sources/specification/index.rst.txt | 28 - .../_sources/specification/technote2.rst.txt | 720 - .../doc/html-prebuilt/_sources/terms.rst.txt | 79 - .../doc/html-prebuilt/_sources/tools.rst.txt | 155 - .../_sources/tools/fax2ps.rst.txt | 129 - .../_sources/tools/fax2tiff.rst.txt | 246 - .../_sources/tools/pal2rgb.rst.txt | 80 - .../_sources/tools/ppm2tiff.rst.txt | 56 - .../_sources/tools/raw2tiff.rst.txt | 143 - .../_sources/tools/rgb2ycbcr.rst.txt | 63 - .../_sources/tools/thumbnail.rst.txt | 66 - .../_sources/tools/tiff2bw.rst.txt | 60 - .../_sources/tools/tiff2pdf.rst.txt | 211 - .../_sources/tools/tiff2ps.rst.txt | 251 - .../_sources/tools/tiff2rgba.rst.txt | 77 - .../_sources/tools/tiffcmp.rst.txt | 59 - .../_sources/tools/tiffcp.rst.txt | 255 - .../_sources/tools/tiffcrop.rst.txt | 547 - .../_sources/tools/tiffdither.rst.txt | 93 - .../_sources/tools/tiffdump.rst.txt | 52 - .../_sources/tools/tiffgt.rst.txt | 186 - .../_sources/tools/tiffinfo.rst.txt | 69 - .../_sources/tools/tiffmedian.rst.txt | 73 - .../_sources/tools/tiffset.rst.txt | 82 - .../_sources/tools/tiffsplit.rst.txt | 52 - .../doc/html-prebuilt/_static/basic.css | 921 - .../doc/html-prebuilt/_static/contents.png | Bin 107 -> 0 bytes .../doc/html-prebuilt/_static/doctools.js | 156 - .../_static/documentation_options.js | 14 - .../doc/html-prebuilt/_static/file.png | Bin 286 -> 0 bytes .../html-prebuilt/_static/language_data.js | 199 - .../doc/html-prebuilt/_static/minus.png | Bin 90 -> 0 bytes .../doc/html-prebuilt/_static/navigation.png | Bin 120 -> 0 bytes .../doc/html-prebuilt/_static/plus.png | Bin 90 -> 0 bytes .../doc/html-prebuilt/_static/pygments.css | 74 - .../doc/html-prebuilt/_static/searchtools.js | 566 - .../html-prebuilt/_static/sphinx_highlight.js | 144 - .../doc/html-prebuilt/_static/sphinxdoc.css | 350 - .../libtiff/doc/html-prebuilt/addingtags.html | 470 - .../libtiff/doc/html-prebuilt/build.html | 972 - .../libtiff/doc/html-prebuilt/contrib.html | 191 - .../libtiff/doc/html-prebuilt/functions.html | 167 - .../functions/TIFFAccessTagMethods.html | 144 - .../functions/TIFFClientInfo.html | 153 - .../html-prebuilt/functions/TIFFClose.html | 167 - .../functions/TIFFCreateDirectory.html | 199 - .../functions/TIFFCustomDirectory.html | 325 - .../functions/TIFFCustomTagList.html | 163 - .../functions/TIFFDataWidth.html | 162 - .../TIFFDeferStrileArrayWriting.html | 182 - .../html-prebuilt/functions/TIFFError.html | 237 - .../functions/TIFFFieldDataType.html | 152 - .../functions/TIFFFieldName.html | 151 - .../functions/TIFFFieldPassCount.html | 163 - .../functions/TIFFFieldQuery.html | 205 - .../functions/TIFFFieldReadCount.html | 163 - .../html-prebuilt/functions/TIFFFieldTag.html | 153 - .../functions/TIFFFieldWriteCount.html | 167 - .../html-prebuilt/functions/TIFFFlush.html | 166 - .../html-prebuilt/functions/TIFFGetField.html | 620 - .../functions/TIFFMergeFieldInfo.html | 148 - .../doc/html-prebuilt/functions/TIFFOpen.html | 494 - .../functions/TIFFOpenOptions.html | 259 - .../functions/TIFFPrintDirectory.html | 197 - .../functions/TIFFProcFunctions.html | 180 - .../functions/TIFFRGBAImage.html | 371 - .../functions/TIFFReadDirectory.html | 260 - .../functions/TIFFReadEncodedStrip.html | 170 - .../functions/TIFFReadEncodedTile.html | 170 - .../functions/TIFFReadFromUserBuffer.html | 159 - .../functions/TIFFReadRGBAImage.html | 285 - .../functions/TIFFReadRGBAStrip.html | 246 - .../functions/TIFFReadRGBATile.html | 248 - .../functions/TIFFReadRawStrip.html | 157 - .../functions/TIFFReadRawTile.html | 159 - .../functions/TIFFReadScanline.html | 188 - .../html-prebuilt/functions/TIFFReadTile.html | 171 - .../functions/TIFFSetDirectory.html | 186 - .../html-prebuilt/functions/TIFFSetField.html | 610 - .../functions/TIFFSetTagExtender.html | 147 - .../functions/TIFFStrileQuery.html | 195 - .../html-prebuilt/functions/TIFFWarning.html | 236 - .../functions/TIFFWriteDirectory.html | 265 - .../functions/TIFFWriteEncodedStrip.html | 193 - .../functions/TIFFWriteEncodedTile.html | 190 - .../functions/TIFFWriteRawStrip.html | 189 - .../functions/TIFFWriteRawTile.html | 181 - .../functions/TIFFWriteScanline.html | 235 - .../functions/TIFFWriteTile.html | 164 - .../html-prebuilt/functions/TIFFbuffer.html | 173 - .../html-prebuilt/functions/TIFFcodec.html | 195 - .../html-prebuilt/functions/TIFFcolor.html | 330 - .../html-prebuilt/functions/TIFFmemory.html | 193 - .../html-prebuilt/functions/TIFFquery.html | 298 - .../doc/html-prebuilt/functions/TIFFsize.html | 173 - .../html-prebuilt/functions/TIFFstrip.html | 226 - .../doc/html-prebuilt/functions/TIFFswab.html | 222 - .../doc/html-prebuilt/functions/TIFFtile.html | 228 - .../functions/_TIFFRewriteField.html | 147 - .../functions/_TIFFauxiliary.html | 153 - .../doc/html-prebuilt/functions/libtiff.html | 1169 - .../libtiff/doc/html-prebuilt/genindex.html | 2130 -- .../libtiff/doc/html-prebuilt/images.html | 118 - .../libtiff/doc/html-prebuilt/index.html | 290 - .../libtiff/doc/html-prebuilt/internals.html | 535 - .../libtiff/doc/html-prebuilt/libtiff.html | 789 - .../libtiff/doc/html-prebuilt/multi_page.html | 311 - .../libtiff/doc/html-prebuilt/objects.inv | Bin 9148 -> 0 bytes .../project/acknowledgements.html | 245 - .../doc/html-prebuilt/project/bugs.html | 153 - .../doc/html-prebuilt/project/index.html | 124 - .../doc/html-prebuilt/project/license.html | 126 - .../html-prebuilt/project/mailinglist.html | 137 - .../doc/html-prebuilt/project/psc.html | 119 - .../html-prebuilt/releases/historical.html | 150 - .../doc/html-prebuilt/releases/index.html | 131 - .../html-prebuilt/releases/v3.4beta007.html | 186 - .../html-prebuilt/releases/v3.4beta016.html | 195 - .../html-prebuilt/releases/v3.4beta018.html | 172 - .../html-prebuilt/releases/v3.4beta024.html | 223 - .../html-prebuilt/releases/v3.4beta028.html | 228 - .../html-prebuilt/releases/v3.4beta029.html | 173 - .../html-prebuilt/releases/v3.4beta031.html | 182 - .../html-prebuilt/releases/v3.4beta032.html | 176 - .../html-prebuilt/releases/v3.4beta033.html | 168 - .../html-prebuilt/releases/v3.4beta034.html | 158 - .../html-prebuilt/releases/v3.4beta035.html | 153 - .../html-prebuilt/releases/v3.4beta036.html | 211 - .../doc/html-prebuilt/releases/v3.5.1.html | 163 - .../doc/html-prebuilt/releases/v3.5.2.html | 186 - .../doc/html-prebuilt/releases/v3.5.3.html | 204 - .../doc/html-prebuilt/releases/v3.5.4.html | 169 - .../doc/html-prebuilt/releases/v3.5.5.html | 218 - .../html-prebuilt/releases/v3.5.6beta.html | 237 - .../doc/html-prebuilt/releases/v3.5.7.html | 308 - .../doc/html-prebuilt/releases/v3.6.0.html | 436 - .../doc/html-prebuilt/releases/v3.6.1.html | 241 - .../doc/html-prebuilt/releases/v3.7.0.html | 198 - .../html-prebuilt/releases/v3.7.0alpha.html | 279 - .../html-prebuilt/releases/v3.7.0beta.html | 214 - .../html-prebuilt/releases/v3.7.0beta2.html | 193 - .../doc/html-prebuilt/releases/v3.7.1.html | 256 - .../doc/html-prebuilt/releases/v3.7.2.html | 247 - .../doc/html-prebuilt/releases/v3.7.3.html | 260 - .../doc/html-prebuilt/releases/v3.7.4.html | 204 - .../doc/html-prebuilt/releases/v3.8.0.html | 241 - .../doc/html-prebuilt/releases/v3.8.1.html | 248 - .../doc/html-prebuilt/releases/v3.8.2.html | 191 - .../doc/html-prebuilt/releases/v3.9.0.html | 292 - .../html-prebuilt/releases/v3.9.0beta.html | 315 - .../doc/html-prebuilt/releases/v3.9.1.html | 184 - .../doc/html-prebuilt/releases/v3.9.2.html | 188 - .../doc/html-prebuilt/releases/v3.9.3.html | 219 - .../doc/html-prebuilt/releases/v3.9.4.html | 190 - .../doc/html-prebuilt/releases/v3.9.5.html | 301 - .../doc/html-prebuilt/releases/v4.0.0.html | 313 - .../doc/html-prebuilt/releases/v4.0.1.html | 181 - .../doc/html-prebuilt/releases/v4.0.10.html | 379 - .../doc/html-prebuilt/releases/v4.0.2.html | 180 - .../doc/html-prebuilt/releases/v4.0.3.html | 186 - .../doc/html-prebuilt/releases/v4.0.4.html | 340 - .../html-prebuilt/releases/v4.0.4beta.html | 336 - .../doc/html-prebuilt/releases/v4.0.5.html | 215 - .../doc/html-prebuilt/releases/v4.0.6.html | 205 - .../doc/html-prebuilt/releases/v4.0.7.html | 418 - .../doc/html-prebuilt/releases/v4.0.8.html | 448 - .../doc/html-prebuilt/releases/v4.0.9.html | 436 - .../doc/html-prebuilt/releases/v4.1.0.html | 219 - .../doc/html-prebuilt/releases/v4.2.0.html | 222 - .../doc/html-prebuilt/releases/v4.3.0.html | 204 - .../doc/html-prebuilt/releases/v4.4.0.html | 225 - .../doc/html-prebuilt/releases/v4.5.0.html | 271 - .../doc/html-prebuilt/releases/v4.5.1.html | 279 - .../doc/html-prebuilt/releases/v4.6.0.html | 282 - .../doc/html-prebuilt/releases/v4.7.0.html | 303 - .../doc/html-prebuilt/releases/v4.7.1.html | 334 - .../libtiff/doc/html-prebuilt/rfcs/index.html | 112 - .../doc/html-prebuilt/rfcs/rfc1_psc.html | 218 - .../rfcs/rfc2_restoring_needed_tools.html | 167 - .../libtiff/doc/html-prebuilt/search.html | 94 - .../libtiff/doc/html-prebuilt/searchindex.js | 1 - .../html-prebuilt/specification/bigtiff.html | 402 - .../specification/coverage-bigtiff.html | 162 - .../html-prebuilt/specification/coverage.html | 1825 -- .../html-prebuilt/specification/index.html | 124 - .../specification/technote2.html | 757 - .../libtiff/doc/html-prebuilt/terms.html | 168 - .../libtiff/doc/html-prebuilt/tools.html | 275 - .../doc/html-prebuilt/tools/fax2ps.html | 248 - .../doc/html-prebuilt/tools/fax2tiff.html | 410 - .../doc/html-prebuilt/tools/pal2rgb.html | 198 - .../doc/html-prebuilt/tools/ppm2tiff.html | 170 - .../doc/html-prebuilt/tools/raw2tiff.html | 309 - .../doc/html-prebuilt/tools/rgb2ycbcr.html | 182 - .../doc/html-prebuilt/tools/thumbnail.html | 201 - .../doc/html-prebuilt/tools/tiff2bw.html | 182 - .../doc/html-prebuilt/tools/tiff2pdf.html | 356 - .../doc/html-prebuilt/tools/tiff2ps.html | 410 - .../doc/html-prebuilt/tools/tiff2rgba.html | 198 - .../doc/html-prebuilt/tools/tiffcmp.html | 175 - .../doc/html-prebuilt/tools/tiffcp.html | 384 - .../doc/html-prebuilt/tools/tiffcrop.html | 705 - .../doc/html-prebuilt/tools/tiffdither.html | 225 - .../doc/html-prebuilt/tools/tiffdump.html | 169 - .../doc/html-prebuilt/tools/tiffgt.html | 350 - .../doc/html-prebuilt/tools/tiffinfo.html | 199 - .../doc/html-prebuilt/tools/tiffmedian.html | 190 - .../doc/html-prebuilt/tools/tiffset.html | 194 - .../doc/html-prebuilt/tools/tiffsplit.html | 163 - third_party/libtiff/doc/images.rst | 23 - third_party/libtiff/doc/images/back.gif | Bin 1000 -> 0 bytes third_party/libtiff/doc/images/bali.jpg | Bin 26152 -> 0 bytes third_party/libtiff/doc/images/cat.gif | Bin 12477 -> 0 bytes third_party/libtiff/doc/images/cover.jpg | Bin 20189 -> 0 bytes third_party/libtiff/doc/images/cramps.gif | Bin 13137 -> 0 bytes third_party/libtiff/doc/images/dave.gif | Bin 8220 -> 0 bytes third_party/libtiff/doc/images/info.gif | Bin 131 -> 0 bytes third_party/libtiff/doc/images/jello.jpg | Bin 13744 -> 0 bytes third_party/libtiff/doc/images/jim.gif | Bin 14493 -> 0 bytes third_party/libtiff/doc/images/note.gif | Bin 264 -> 0 bytes third_party/libtiff/doc/images/oxford.gif | Bin 6069 -> 0 bytes third_party/libtiff/doc/images/quad.jpg | Bin 23904 -> 0 bytes third_party/libtiff/doc/images/ring.gif | Bin 4275 -> 0 bytes third_party/libtiff/doc/images/smallliz.jpg | Bin 16463 -> 0 bytes third_party/libtiff/doc/images/strike.gif | Bin 5610 -> 0 bytes third_party/libtiff/doc/images/warning.gif | Bin 287 -> 0 bytes third_party/libtiff/doc/index.rst | 67 - third_party/libtiff/doc/internals.rst | 426 - third_party/libtiff/doc/libtiff.rst | 744 - .../man-prebuilt/TIFFAccessTagMethods.3tiff | 64 - .../doc/man-prebuilt/TIFFClientInfo.3tiff | 74 - .../libtiff/doc/man-prebuilt/TIFFClose.3tiff | 90 - .../man-prebuilt/TIFFCreateDirectory.3tiff | 124 - .../man-prebuilt/TIFFCustomDirectory.3tiff | 302 - .../doc/man-prebuilt/TIFFCustomTagList.3tiff | 81 - .../doc/man-prebuilt/TIFFDataWidth.3tiff | 98 - .../TIFFDeferStrileArrayWriting.3tiff | 108 - .../libtiff/doc/man-prebuilt/TIFFError.3tiff | 159 - .../doc/man-prebuilt/TIFFFieldDataType.3tiff | 72 - .../doc/man-prebuilt/TIFFFieldName.3tiff | 71 - .../doc/man-prebuilt/TIFFFieldPassCount.3tiff | 86 - .../doc/man-prebuilt/TIFFFieldQuery.3tiff | 129 - .../doc/man-prebuilt/TIFFFieldReadCount.3tiff | 87 - .../doc/man-prebuilt/TIFFFieldTag.3tiff | 74 - .../man-prebuilt/TIFFFieldWriteCount.3tiff | 92 - .../libtiff/doc/man-prebuilt/TIFFFlush.3tiff | 84 - .../doc/man-prebuilt/TIFFGetField.3tiff | 866 - .../doc/man-prebuilt/TIFFMergeFieldInfo.3tiff | 68 - .../libtiff/doc/man-prebuilt/TIFFOpen.3tiff | 483 - .../doc/man-prebuilt/TIFFPrintDirectory.3tiff | 144 - .../doc/man-prebuilt/TIFFProcFunctions.3tiff | 101 - .../doc/man-prebuilt/TIFFRGBAImage.3tiff | 334 - .../doc/man-prebuilt/TIFFReadDirectory.3tiff | 224 - .../man-prebuilt/TIFFReadEncodedStrip.3tiff | 87 - .../man-prebuilt/TIFFReadEncodedTile.3tiff | 87 - .../man-prebuilt/TIFFReadFromUserBuffer.3tiff | 77 - .../doc/man-prebuilt/TIFFReadRGBAImage.3tiff | 242 - .../doc/man-prebuilt/TIFFReadRGBAStrip.3tiff | 203 - .../doc/man-prebuilt/TIFFReadRGBATile.3tiff | 205 - .../doc/man-prebuilt/TIFFReadRawStrip.3tiff | 75 - .../doc/man-prebuilt/TIFFReadRawTile.3tiff | 77 - .../doc/man-prebuilt/TIFFReadScanline.3tiff | 106 - .../doc/man-prebuilt/TIFFReadTile.3tiff | 87 - .../doc/man-prebuilt/TIFFSetDirectory.3tiff | 111 - .../doc/man-prebuilt/TIFFSetField.3tiff | 872 - .../doc/man-prebuilt/TIFFSetTagExtender.3tiff | 72 - .../doc/man-prebuilt/TIFFStrileQuery.3tiff | 117 - .../doc/man-prebuilt/TIFFWarning.3tiff | 158 - .../doc/man-prebuilt/TIFFWriteDirectory.3tiff | 213 - .../man-prebuilt/TIFFWriteEncodedStrip.3tiff | 125 - .../man-prebuilt/TIFFWriteEncodedTile.3tiff | 121 - .../doc/man-prebuilt/TIFFWriteRawStrip.3tiff | 123 - .../doc/man-prebuilt/TIFFWriteRawTile.3tiff | 117 - .../doc/man-prebuilt/TIFFWriteScanline.3tiff | 176 - .../doc/man-prebuilt/TIFFWriteTile.3tiff | 83 - .../libtiff/doc/man-prebuilt/TIFFbuffer.3tiff | 99 - .../libtiff/doc/man-prebuilt/TIFFcodec.3tiff | 121 - .../libtiff/doc/man-prebuilt/TIFFcolor.3tiff | 308 - .../libtiff/doc/man-prebuilt/TIFFmemory.3tiff | 109 - .../libtiff/doc/man-prebuilt/TIFFquery.3tiff | 225 - .../libtiff/doc/man-prebuilt/TIFFsize.3tiff | 91 - .../libtiff/doc/man-prebuilt/TIFFstrip.3tiff | 146 - .../libtiff/doc/man-prebuilt/TIFFswab.3tiff | 136 - .../libtiff/doc/man-prebuilt/TIFFtile.3tiff | 145 - .../doc/man-prebuilt/_TIFFRewriteField.3tiff | 67 - .../doc/man-prebuilt/_TIFFauxiliary.3tiff | 74 - third_party/libtiff/doc/man-prebuilt/fax2ps.1 | 154 - .../libtiff/doc/man-prebuilt/fax2tiff.1 | 308 - .../libtiff/doc/man-prebuilt/libtiff.3tiff | 1838 -- .../libtiff/doc/man-prebuilt/pal2rgb.1 | 108 - .../libtiff/doc/man-prebuilt/ppm2tiff.1 | 87 - .../libtiff/doc/man-prebuilt/raw2tiff.1 | 274 - .../libtiff/doc/man-prebuilt/rgb2ycbcr.1 | 93 - .../libtiff/doc/man-prebuilt/thumbnail.1 | 134 - .../libtiff/doc/man-prebuilt/tiff2bw.1 | 91 - .../libtiff/doc/man-prebuilt/tiff2pdf.1 | 276 - .../libtiff/doc/man-prebuilt/tiff2ps.1 | 319 - .../libtiff/doc/man-prebuilt/tiff2rgba.1 | 108 - .../libtiff/doc/man-prebuilt/tiffcmp.1 | 86 - third_party/libtiff/doc/man-prebuilt/tiffcp.1 | 338 - .../libtiff/doc/man-prebuilt/tiffcrop.1 | 680 - .../libtiff/doc/man-prebuilt/tiffdither.1 | 157 - .../libtiff/doc/man-prebuilt/tiffdump.1 | 81 - third_party/libtiff/doc/man-prebuilt/tiffgt.1 | 308 - .../libtiff/doc/man-prebuilt/tiffinfo.1 | 104 - .../libtiff/doc/man-prebuilt/tiffmedian.1 | 101 - .../libtiff/doc/man-prebuilt/tiffset.1 | 132 - .../libtiff/doc/man-prebuilt/tiffsplit.1 | 80 - third_party/libtiff/doc/multi_page.rst | 213 - .../libtiff/doc/project/acknowledgements.rst | 102 - third_party/libtiff/doc/project/bugs.rst | 49 - third_party/libtiff/doc/project/index.rst | 27 - third_party/libtiff/doc/project/license.rst | 24 - .../libtiff/doc/project/mailinglist.rst | 29 - third_party/libtiff/doc/project/psc.rst | 18 - .../libtiff/doc/releases/historical.rst | 48 - third_party/libtiff/doc/releases/index.rst | 31 - .../libtiff/doc/releases/v3.4beta007.rst | 75 - .../libtiff/doc/releases/v3.4beta016.rst | 71 - .../libtiff/doc/releases/v3.4beta018.rst | 50 - .../libtiff/doc/releases/v3.4beta024.rst | 99 - .../libtiff/doc/releases/v3.4beta028.rst | 105 - .../libtiff/doc/releases/v3.4beta029.rst | 52 - .../libtiff/doc/releases/v3.4beta031.rst | 59 - .../libtiff/doc/releases/v3.4beta032.rst | 53 - .../libtiff/doc/releases/v3.4beta033.rst | 45 - .../libtiff/doc/releases/v3.4beta034.rst | 37 - .../libtiff/doc/releases/v3.4beta035.rst | 32 - .../libtiff/doc/releases/v3.4beta036.rst | 86 - third_party/libtiff/doc/releases/v3.5.1.rst | 41 - third_party/libtiff/doc/releases/v3.5.2.rst | 74 - third_party/libtiff/doc/releases/v3.5.3.rst | 97 - third_party/libtiff/doc/releases/v3.5.4.rst | 45 - third_party/libtiff/doc/releases/v3.5.5.rst | 91 - .../libtiff/doc/releases/v3.5.6beta.rst | 135 - third_party/libtiff/doc/releases/v3.5.7.rst | 219 - third_party/libtiff/doc/releases/v3.6.0.rst | 372 - third_party/libtiff/doc/releases/v3.6.1.rst | 135 - third_party/libtiff/doc/releases/v3.7.0.rst | 78 - .../libtiff/doc/releases/v3.7.0alpha.rst | 179 - .../libtiff/doc/releases/v3.7.0beta.rst | 98 - .../libtiff/doc/releases/v3.7.0beta2.rst | 69 - third_party/libtiff/doc/releases/v3.7.1.rst | 160 - third_party/libtiff/doc/releases/v3.7.2.rst | 142 - third_party/libtiff/doc/releases/v3.7.3.rst | 169 - third_party/libtiff/doc/releases/v3.7.4.rst | 84 - third_party/libtiff/doc/releases/v3.8.0.rst | 140 - third_party/libtiff/doc/releases/v3.8.1.rst | 147 - third_party/libtiff/doc/releases/v3.8.2.rst | 76 - third_party/libtiff/doc/releases/v3.9.0.rst | 203 - .../libtiff/doc/releases/v3.9.0beta.rst | 225 - third_party/libtiff/doc/releases/v3.9.1.rst | 63 - third_party/libtiff/doc/releases/v3.9.2.rst | 67 - third_party/libtiff/doc/releases/v3.9.3.rst | 105 - third_party/libtiff/doc/releases/v3.9.4.rst | 69 - third_party/libtiff/doc/releases/v3.9.5.rst | 217 - third_party/libtiff/doc/releases/v4.0.0.rst | 213 - third_party/libtiff/doc/releases/v4.0.1.rst | 60 - third_party/libtiff/doc/releases/v4.0.10.rst | 239 - third_party/libtiff/doc/releases/v4.0.2.rst | 64 - third_party/libtiff/doc/releases/v4.0.3.rst | 68 - third_party/libtiff/doc/releases/v4.0.4.rst | 191 - .../libtiff/doc/releases/v4.0.4beta.rst | 236 - third_party/libtiff/doc/releases/v4.0.5.rst | 85 - third_party/libtiff/doc/releases/v4.0.6.rst | 77 - third_party/libtiff/doc/releases/v4.0.7.rst | 350 - third_party/libtiff/doc/releases/v4.0.8.rst | 390 - third_party/libtiff/doc/releases/v4.0.9.rst | 317 - third_party/libtiff/doc/releases/v4.1.0.rst | 98 - third_party/libtiff/doc/releases/v4.2.0.rst | 103 - third_party/libtiff/doc/releases/v4.3.0.rst | 85 - third_party/libtiff/doc/releases/v4.4.0.rst | 98 - third_party/libtiff/doc/releases/v4.5.0.rst | 142 - third_party/libtiff/doc/releases/v4.5.1.rst | 186 - third_party/libtiff/doc/releases/v4.6.0.rst | 156 - third_party/libtiff/doc/releases/v4.7.0.rst | 211 - third_party/libtiff/doc/releases/v4.7.1.rst | 273 - third_party/libtiff/doc/rfcs/index.rst | 14 - third_party/libtiff/doc/rfcs/rfc1_psc.rst | 107 - .../doc/rfcs/rfc2_restoring_needed_tools.rst | 60 - .../libtiff/doc/specification/bigtiff.rst | 236 - .../specification/bigtiffpr_images/esri.png | Bin 10281 -> 0 bytes .../specification/bigtiffpr_images/leica.png | Bin 6451 -> 0 bytes .../specification/bigtiffpr_images/safe.png | Bin 10285 -> 0 bytes .../specification/bigtiffpr_images/weogeo.png | Bin 4160 -> 0 bytes .../doc/specification/coverage-bigtiff.rst | 59 - .../libtiff/doc/specification/coverage.rst | 1693 -- .../libtiff/doc/specification/index.rst | 28 - .../libtiff/doc/specification/technote2.rst | 720 - third_party/libtiff/doc/terms.rst | 79 - third_party/libtiff/doc/tools.rst | 155 - third_party/libtiff/doc/tools/fax2ps.rst | 129 - third_party/libtiff/doc/tools/fax2tiff.rst | 246 - third_party/libtiff/doc/tools/pal2rgb.rst | 80 - third_party/libtiff/doc/tools/ppm2tiff.rst | 56 - third_party/libtiff/doc/tools/raw2tiff.rst | 143 - third_party/libtiff/doc/tools/rgb2ycbcr.rst | 63 - third_party/libtiff/doc/tools/thumbnail.rst | 66 - third_party/libtiff/doc/tools/tiff2bw.rst | 60 - third_party/libtiff/doc/tools/tiff2pdf.rst | 211 - third_party/libtiff/doc/tools/tiff2ps.rst | 251 - third_party/libtiff/doc/tools/tiff2rgba.rst | 77 - third_party/libtiff/doc/tools/tiffcmp.rst | 59 - third_party/libtiff/doc/tools/tiffcp.rst | 255 - third_party/libtiff/doc/tools/tiffcrop.rst | 547 - third_party/libtiff/doc/tools/tiffdither.rst | 93 - third_party/libtiff/doc/tools/tiffdump.rst | 52 - third_party/libtiff/doc/tools/tiffgt.rst | 186 - third_party/libtiff/doc/tools/tiffinfo.rst | 69 - third_party/libtiff/doc/tools/tiffmedian.rst | 73 - third_party/libtiff/doc/tools/tiffset.rst | 82 - third_party/libtiff/doc/tools/tiffsplit.rst | 52 - third_party/libtiff/libtiff-4.pc.in | 12 - third_party/libtiff/libtiff/CMakeLists.txt | 278 - third_party/libtiff/libtiff/Makefile.am | 140 - third_party/libtiff/libtiff/Makefile.in | 1069 - third_party/libtiff/libtiff/libtiff.def | 197 - third_party/libtiff/libtiff/libtiff.map | 224 - third_party/libtiff/libtiff/libtiffxx.map | 4 - third_party/libtiff/libtiff/t4.h | 285 - third_party/libtiff/libtiff/tif_aux.c | 414 - third_party/libtiff/libtiff/tif_close.c | 165 - third_party/libtiff/libtiff/tif_codec.c | 163 - third_party/libtiff/libtiff/tif_color.c | 322 - third_party/libtiff/libtiff/tif_compress.c | 310 - .../libtiff/libtiff/tif_config.h.cmake.in | 163 - third_party/libtiff/libtiff/tif_config.h.in | 179 - third_party/libtiff/libtiff/tif_dir.c | 2366 -- third_party/libtiff/libtiff/tif_dir.h | 366 - third_party/libtiff/libtiff/tif_dirinfo.c | 1364 - third_party/libtiff/libtiff/tif_dirread.c | 8447 ------ third_party/libtiff/libtiff/tif_dirwrite.c | 3824 --- third_party/libtiff/libtiff/tif_dumpmode.c | 122 - third_party/libtiff/libtiff/tif_error.c | 132 - third_party/libtiff/libtiff/tif_extension.c | 110 - third_party/libtiff/libtiff/tif_fax3.c | 1844 -- third_party/libtiff/libtiff/tif_fax3.h | 658 - third_party/libtiff/libtiff/tif_fax3sm.c | 1261 - third_party/libtiff/libtiff/tif_flush.c | 157 - third_party/libtiff/libtiff/tif_getimage.c | 3535 --- third_party/libtiff/libtiff/tif_hash_set.c | 603 - third_party/libtiff/libtiff/tif_hash_set.h | 101 - third_party/libtiff/libtiff/tif_jbig.c | 233 - third_party/libtiff/libtiff/tif_jpeg.c | 2916 -- third_party/libtiff/libtiff/tif_jpeg_12.c | 63 - third_party/libtiff/libtiff/tif_lerc.c | 1545 - third_party/libtiff/libtiff/tif_luv.c | 1855 -- third_party/libtiff/libtiff/tif_lzma.c | 541 - third_party/libtiff/libtiff/tif_lzw.c | 1464 - third_party/libtiff/libtiff/tif_next.c | 194 - third_party/libtiff/libtiff/tif_ojpeg.c | 2810 -- third_party/libtiff/libtiff/tif_open.c | 945 - third_party/libtiff/libtiff/tif_packbits.c | 330 - third_party/libtiff/libtiff/tif_pixarlog.c | 1677 -- third_party/libtiff/libtiff/tif_predict.c | 1161 - third_party/libtiff/libtiff/tif_predict.h | 75 - third_party/libtiff/libtiff/tif_print.c | 756 - third_party/libtiff/libtiff/tif_read.c | 1681 -- third_party/libtiff/libtiff/tif_stream.cxx | 404 - third_party/libtiff/libtiff/tif_strip.c | 381 - third_party/libtiff/libtiff/tif_swab.c | 329 - third_party/libtiff/libtiff/tif_thunder.c | 202 - third_party/libtiff/libtiff/tif_tile.c | 284 - third_party/libtiff/libtiff/tif_unix.c | 382 - third_party/libtiff/libtiff/tif_version.c | 28 - third_party/libtiff/libtiff/tif_warning.c | 105 - third_party/libtiff/libtiff/tif_webp.c | 917 - third_party/libtiff/libtiff/tif_win32.c | 431 - .../libtiff/libtiff/tif_win32_versioninfo.rc | 50 - third_party/libtiff/libtiff/tif_write.c | 965 - third_party/libtiff/libtiff/tif_zip.c | 776 - third_party/libtiff/libtiff/tif_zstd.c | 437 - third_party/libtiff/libtiff/tiff.h | 901 - .../libtiff/libtiff/tiffconf.h.cmake.in | 144 - third_party/libtiff/libtiff/tiffconf.h.in | 144 - third_party/libtiff/libtiff/tiffio.h | 672 - third_party/libtiff/libtiff/tiffio.hxx | 39 - third_party/libtiff/libtiff/tiffiop.h | 550 - third_party/libtiff/libtiff/tiffvers.h | 37 - .../libtiff/libtiff/tiffvers.h.cmake.in | 36 - third_party/libtiff/libtiff/tiffvers.h.in | 36 - third_party/libtiff/libtiff/uvcode.h | 94 - third_party/libtiff/m4/acinclude.m4 | 851 - third_party/libtiff/m4/libtool.m4 | 8394 ------ third_party/libtiff/m4/ltoptions.m4 | 437 - third_party/libtiff/m4/ltsugar.m4 | 124 - third_party/libtiff/m4/ltversion.m4 | 23 - third_party/libtiff/m4/lt~obsolete.m4 | 99 - third_party/libtiff/placeholder.h | 7 - third_party/libtiff/port/CMakeLists.txt | 51 - third_party/libtiff/port/Makefile.am | 34 - third_party/libtiff/port/Makefile.in | 683 - third_party/libtiff/port/dummy.c | 5 - third_party/libtiff/port/getopt.c | 130 - third_party/libtiff/port/libport.h | 44 - .../libtiff/port/libport_config.h.cmake.in | 13 - third_party/libtiff/port/libport_config.h.in | 12 - third_party/libtiff/test/CMakeLists.txt | 547 - third_party/libtiff/test/Makefile.am | 451 - third_party/libtiff/test/Makefile.in | 2490 -- third_party/libtiff/test/TiffSplitTest.cmake | 34 - third_party/libtiff/test/TiffTest.cmake | 72 - third_party/libtiff/test/TiffTestCommon.cmake | 122 - third_party/libtiff/test/ascii_tag.c | 182 - third_party/libtiff/test/check_tag.c | 87 - third_party/libtiff/test/common.sh | 126 - third_party/libtiff/test/custom_dir.c | 270 - .../libtiff/test/custom_dir_EXIF_231.c | 1971 -- .../libtiff/test/defer_strile_loading.c | 336 - .../libtiff/test/defer_strile_writing.c | 237 - third_party/libtiff/test/fax2tiff.sh | 17 - .../libtiff/test/images/32bpp-None-jpeg.tiff | Bin 4704 -> 0 bytes .../libtiff/test/images/32bpp-None.tiff | Bin 13222 -> 0 bytes third_party/libtiff/test/images/README.txt | 35 - .../test/images/custom_dir_EXIF_GPS.tiff | Bin 2504 -> 0 bytes .../images/deflate-last-strip-extra-data.tiff | Bin 12789 -> 0 bytes .../libtiff/test/images/logluv-3c-16b.tiff | Bin 166 -> 0 bytes .../libtiff/test/images/lzw-single-strip.tiff | Bin 76264 -> 0 bytes .../test/images/minisblack-1c-16b.tiff | Bin 47733 -> 0 bytes .../libtiff/test/images/minisblack-1c-8b.pgm | Bin 23722 -> 0 bytes .../libtiff/test/images/minisblack-1c-8b.tiff | Bin 24001 -> 0 bytes .../test/images/minisblack-2c-8b-alpha.tiff | Bin 4068 -> 0 bytes .../libtiff/test/images/miniswhite-1c-1b.g3 | Bin 9687 -> 0 bytes .../libtiff/test/images/miniswhite-1c-1b.pbm | Bin 3031 -> 0 bytes .../libtiff/test/images/miniswhite-1c-1b.tiff | Bin 3289 -> 0 bytes .../ojpeg_chewey_subsamp21_multi_strip.tiff | Bin 39752 -> 0 bytes .../ojpeg_single_strip_no_rowsperstrip.tiff | Bin 8258 -> 0 bytes ...peg_zackthecat_subsamp22_single_strip.tiff | Bin 8258 -> 0 bytes .../libtiff/test/images/palette-1c-1b.tiff | Bin 3312 -> 0 bytes .../libtiff/test/images/palette-1c-4b.tiff | Bin 12322 -> 0 bytes .../libtiff/test/images/palette-1c-8b.tiff | Bin 25548 -> 0 bytes .../libtiff/test/images/quad-lzw-compat.tiff | Bin 214342 -> 0 bytes .../libtiff/test/images/quad-tile.jpg.tiff | Bin 27576 -> 0 bytes .../libtiff/test/images/rgb-3c-16b.ppm | Bin 142305 -> 0 bytes .../libtiff/test/images/rgb-3c-16b.tiff | Bin 142670 -> 0 bytes third_party/libtiff/test/images/rgb-3c-8b.ppm | Bin 71136 -> 0 bytes .../libtiff/test/images/rgb-3c-8b.tiff | Bin 71470 -> 0 bytes .../images/test_float64_predictor2_be_lzw.tif | Bin 872 -> 0 bytes .../images/test_float64_predictor2_le_lzw.tif | Bin 887 -> 0 bytes .../test/images/test_ifd_loop_subifd.tif | Bin 1654 -> 0 bytes .../test/images/test_ifd_loop_to_first.tif | Bin 312 -> 0 bytes .../test/images/test_ifd_loop_to_self.tif | Bin 558 -> 0 bytes .../libtiff/test/images/test_two_ifds.tif | Bin 312 -> 0 bytes .../test/images/testfax3_bug54_1dnoEOL.tif | Bin 39616 -> 0 bytes .../libtiff/test/images/testfax3_bug_513.tiff | Bin 198 -> 0 bytes third_party/libtiff/test/images/testfax4.tiff | Bin 39637 -> 0 bytes .../test/images/tiff_with_subifd_chain.tif | Bin 19484 -> 0 bytes .../webp_lossless_rgba_alpha_fully_opaque.tif | Bin 738 -> 0 bytes third_party/libtiff/test/long_tag.c | 161 - third_party/libtiff/test/ppm2tiff_pbm.sh | 6 - third_party/libtiff/test/ppm2tiff_pgm.sh | 6 - third_party/libtiff/test/ppm2tiff_ppm.sh | 10 - .../libtiff/test/rational_precision2double.c | 1338 - third_party/libtiff/test/raw_decode.c | 276 - .../refs/o-deflate-last-strip-extra-data.tiff | Bin 12560 -> 0 bytes .../test/refs/o-testfax3_bug54_1dnoEOL.tiff | Bin 501708 -> 0 bytes .../libtiff/test/refs/o-testfax3_bug_513.tiff | Bin 154 -> 0 bytes third_party/libtiff/test/refs/o-testfax4.tiff | Bin 106326 -> 0 bytes .../libtiff/test/refs/o-tiff2ps-EPS1.ps | Bin 6599 -> 0 bytes .../libtiff/test/refs/o-tiff2ps-PS1.ps | Bin 6629 -> 0 bytes .../libtiff/test/refs/o-tiff2ps-PS2.ps | Bin 4912 -> 0 bytes .../libtiff/test/refs/o-tiff2ps-PS3.ps | Bin 4912 -> 0 bytes third_party/libtiff/test/rewrite_tag.c | 374 - third_party/libtiff/test/short_tag.c | 214 - third_party/libtiff/test/strip.c | 278 - third_party/libtiff/test/strip_rw.c | 155 - .../libtiff/test/test_IFD_enlargement.c | 1820 -- third_party/libtiff/test/test_RGBAImage.c | 1216 - .../libtiff/test/test_append_to_strip.c | 113 - third_party/libtiff/test/test_arrays.c | 734 - third_party/libtiff/test/test_arrays.h | 60 - third_party/libtiff/test/test_directory.c | 2380 -- .../libtiff/test/test_ifd_loop_detection.c | 346 - third_party/libtiff/test/test_open_options.c | 520 - third_party/libtiff/test/test_signed_tags.c | 690 - .../test/test_transferfunction_write_read.c | 398 - .../libtiff/test/test_write_read_tags.c | 1861 -- .../test/testdeflatelaststripextradata.sh | 43 - .../libtiff/test/testfax3_bug54_1dnoEOL.sh | 24 - third_party/libtiff/test/testfax3_bug_513.sh | 24 - third_party/libtiff/test/testfax4.sh | 24 - third_party/libtiff/test/testtypes.c | 56 - .../libtiff/test/tiff2bw-palette-1c-8b.sh | 7 - .../libtiff/test/tiff2bw-quad-lzw-compat.sh | 7 - third_party/libtiff/test/tiff2bw-rgb-3c-8b.sh | 7 - third_party/libtiff/test/tiff2pdf.sh | 6 - third_party/libtiff/test/tiff2ps-EPS1.sh | 11 - third_party/libtiff/test/tiff2ps-PS1.sh | 11 - third_party/libtiff/test/tiff2ps-PS2.sh | 11 - third_party/libtiff/test/tiff2ps-PS3.sh | 11 - .../libtiff/test/tiff2rgba-32bpp-None-jpeg.sh | 7 - .../libtiff/test/tiff2rgba-logluv-3c-16b.sh | 7 - .../test/tiff2rgba-minisblack-1c-16b.sh | 7 - .../test/tiff2rgba-minisblack-1c-8b.sh | 7 - .../test/tiff2rgba-minisblack-2c-8b-alpha.sh | 7 - .../test/tiff2rgba-miniswhite-1c-1b.sh | 7 - ...rgba-ojpeg_chewey_subsamp21_multi_strip.sh | 7 - ...rgba-ojpeg_single_strip_no_rowsperstrip.sh | 7 - ...ojpeg_zackthecat_subsamp22_single_strip.sh | 7 - .../libtiff/test/tiff2rgba-palette-1c-1b.sh | 7 - .../libtiff/test/tiff2rgba-palette-1c-4b.sh | 7 - .../libtiff/test/tiff2rgba-palette-1c-8b.sh | 7 - .../libtiff/test/tiff2rgba-quad-tile.jpg.sh | 7 - .../libtiff/test/tiff2rgba-rgb-3c-16b.sh | 7 - .../libtiff/test/tiff2rgba-rgb-3c-8b.sh | 7 - .../libtiff/test/tiffcp-32bpp-None-jpeg.sh | 7 - third_party/libtiff/test/tiffcp-g3-1d-fill.sh | 7 - third_party/libtiff/test/tiffcp-g3-1d.sh | 6 - third_party/libtiff/test/tiffcp-g3-2d-fill.sh | 7 - third_party/libtiff/test/tiffcp-g3-2d.sh | 6 - third_party/libtiff/test/tiffcp-g3.sh | 6 - third_party/libtiff/test/tiffcp-g4.sh | 6 - third_party/libtiff/test/tiffcp-logluv.sh | 7 - third_party/libtiff/test/tiffcp-lzw-compat.sh | 6 - .../test/tiffcp-lzw-scanline-decode.sh | 6 - .../test/tiffcp-lzw-single-strip-jbig.sh | 7 - third_party/libtiff/test/tiffcp-split-join.sh | 16 - third_party/libtiff/test/tiffcp-split.sh | 13 - third_party/libtiff/test/tiffcp-thumbnail.sh | 10 - .../libtiff/test/tiffcrop-32bpp-None-jpeg.sh | 7 - .../test/tiffcrop-R90-logluv-3c-16b.sh | 7 - .../test/tiffcrop-R90-minisblack-1c-16b.sh | 7 - .../test/tiffcrop-R90-minisblack-1c-8b.sh | 7 - .../tiffcrop-R90-minisblack-2c-8b-alpha.sh | 7 - .../test/tiffcrop-R90-miniswhite-1c-1b.sh | 7 - .../test/tiffcrop-R90-palette-1c-1b.sh | 7 - .../test/tiffcrop-R90-palette-1c-4b.sh | 7 - .../test/tiffcrop-R90-palette-1c-8b.sh | 7 - .../libtiff/test/tiffcrop-R90-rgb-3c-16b.sh | 7 - .../libtiff/test/tiffcrop-R90-rgb-3c-8b.sh | 7 - .../test/tiffcrop-doubleflip-logluv-3c-16b.sh | 7 - .../tiffcrop-doubleflip-minisblack-1c-16b.sh | 7 - .../tiffcrop-doubleflip-minisblack-1c-8b.sh | 7 - ...fcrop-doubleflip-minisblack-2c-8b-alpha.sh | 7 - .../tiffcrop-doubleflip-miniswhite-1c-1b.sh | 7 - .../test/tiffcrop-doubleflip-palette-1c-1b.sh | 7 - .../test/tiffcrop-doubleflip-palette-1c-4b.sh | 7 - .../test/tiffcrop-doubleflip-palette-1c-8b.sh | 7 - .../test/tiffcrop-doubleflip-rgb-3c-16b.sh | 7 - .../test/tiffcrop-doubleflip-rgb-3c-8b.sh | 7 - .../test/tiffcrop-extract-logluv-3c-16b.sh | 7 - .../tiffcrop-extract-minisblack-1c-16b.sh | 7 - .../test/tiffcrop-extract-minisblack-1c-8b.sh | 7 - ...tiffcrop-extract-minisblack-2c-8b-alpha.sh | 7 - .../test/tiffcrop-extract-miniswhite-1c-1b.sh | 7 - .../test/tiffcrop-extract-palette-1c-1b.sh | 7 - .../test/tiffcrop-extract-palette-1c-4b.sh | 7 - .../test/tiffcrop-extract-palette-1c-8b.sh | 7 - .../test/tiffcrop-extract-rgb-3c-16b.sh | 7 - .../test/tiffcrop-extract-rgb-3c-8b.sh | 7 - .../test/tiffcrop-extractz14-logluv-3c-16b.sh | 7 - .../tiffcrop-extractz14-minisblack-1c-16b.sh | 7 - .../tiffcrop-extractz14-minisblack-1c-8b.sh | 7 - ...fcrop-extractz14-minisblack-2c-8b-alpha.sh | 7 - .../tiffcrop-extractz14-miniswhite-1c-1b.sh | 7 - .../test/tiffcrop-extractz14-palette-1c-1b.sh | 7 - .../test/tiffcrop-extractz14-palette-1c-4b.sh | 7 - .../test/tiffcrop-extractz14-palette-1c-8b.sh | 7 - .../test/tiffcrop-extractz14-rgb-3c-16b.sh | 7 - .../test/tiffcrop-extractz14-rgb-3c-8b.sh | 7 - third_party/libtiff/test/tiffdump.sh | 6 - third_party/libtiff/test/tiffinfo.sh | 7 - third_party/libtiff/test/tifftest.h | 40 - third_party/libtiff/tools/CMakeLists.txt | 204 - third_party/libtiff/tools/Makefile.am | 157 - third_party/libtiff/tools/Makefile.in | 1054 - third_party/libtiff/tools/fax2ps.c | 490 - third_party/libtiff/tools/fax2tiff.c | 525 - third_party/libtiff/tools/mkg3states.c | 272 - third_party/libtiff/tools/pal2rgb.c | 517 - third_party/libtiff/tools/ppm2tiff.c | 571 - third_party/libtiff/tools/raw2tiff.c | 798 - third_party/libtiff/tools/rgb2ycbcr.c | 417 - third_party/libtiff/tools/thumbnail.c | 769 - .../libtiff/tools/tif_tools_versioninfo.rc | 50 - third_party/libtiff/tools/tiff2bw.c | 584 - third_party/libtiff/tools/tiff2pdf.c | 6549 ----- third_party/libtiff/tools/tiff2ps.c | 3486 --- third_party/libtiff/tools/tiff2rgba.c | 645 - third_party/libtiff/tools/tiffcmp.c | 713 - third_party/libtiff/tools/tiffcp.c | 2366 -- third_party/libtiff/tools/tiffcrop.c | 10681 ------- third_party/libtiff/tools/tiffdither.c | 387 - third_party/libtiff/tools/tiffdump.c | 893 - third_party/libtiff/tools/tiffgt.c | 493 - third_party/libtiff/tools/tiffinfo.c | 759 - third_party/libtiff/tools/tiffmedian.c | 1016 - third_party/libtiff/tools/tiffset.c | 530 - third_party/libtiff/tools/tiffsplit.c | 470 - third_party/zlib/CMakeLists.txt | 219 - third_party/zlib/ChangeLog | 1618 -- third_party/zlib/FAQ | 367 - third_party/zlib/INDEX | 68 - third_party/zlib/LICENSE | 22 - third_party/zlib/Makefile | 5 - third_party/zlib/Makefile.in | 410 - third_party/zlib/README | 117 - third_party/zlib/adler32.c | 164 - third_party/zlib/amiga/Makefile.pup | 69 - third_party/zlib/amiga/Makefile.sas | 68 - third_party/zlib/compress.c | 75 - third_party/zlib/configure | 929 - third_party/zlib/contrib/README.contrib | 57 - third_party/zlib/contrib/ada/buffer_demo.adb | 106 - third_party/zlib/contrib/ada/mtest.adb | 156 - third_party/zlib/contrib/ada/read.adb | 156 - third_party/zlib/contrib/ada/readme.txt | 65 - third_party/zlib/contrib/ada/test.adb | 463 - third_party/zlib/contrib/ada/zlib-streams.adb | 225 - third_party/zlib/contrib/ada/zlib-streams.ads | 114 - third_party/zlib/contrib/ada/zlib-thin.adb | 141 - third_party/zlib/contrib/ada/zlib-thin.ads | 450 - third_party/zlib/contrib/ada/zlib.adb | 701 - third_party/zlib/contrib/ada/zlib.ads | 328 - third_party/zlib/contrib/ada/zlib.gpr | 20 - third_party/zlib/contrib/blast/Makefile | 8 - third_party/zlib/contrib/blast/README | 4 - third_party/zlib/contrib/blast/blast.c | 466 - third_party/zlib/contrib/blast/blast.h | 84 - third_party/zlib/contrib/blast/test.pk | Bin 8 -> 0 bytes third_party/zlib/contrib/blast/test.txt | 1 - third_party/zlib/contrib/delphi/ZLib.pas | 557 - third_party/zlib/contrib/delphi/ZLibConst.pas | 11 - third_party/zlib/contrib/delphi/readme.txt | 76 - third_party/zlib/contrib/delphi/zlibd32.mak | 99 - .../zlib/contrib/dotzlib/DotZLib.build | 33 - third_party/zlib/contrib/dotzlib/DotZLib.chm | Bin 72726 -> 0 bytes third_party/zlib/contrib/dotzlib/DotZLib.sln | 21 - .../contrib/dotzlib/DotZLib/AssemblyInfo.cs | 58 - .../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 202 - .../contrib/dotzlib/DotZLib/CircularBuffer.cs | 83 - .../zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 198 - .../zlib/contrib/dotzlib/DotZLib/Deflater.cs | 106 - .../zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 288 - .../contrib/dotzlib/DotZLib/DotZLib.csproj | 141 - .../contrib/dotzlib/DotZLib/GZipStream.cs | 301 - .../zlib/contrib/dotzlib/DotZLib/Inflater.cs | 105 - .../zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 274 - .../zlib/contrib/dotzlib/LICENSE_1_0.txt | 23 - third_party/zlib/contrib/dotzlib/readme.txt | 58 - .../zlib/contrib/gcc_gvmat64/gvmat64.S | 574 - third_party/zlib/contrib/infback9/README | 1 - third_party/zlib/contrib/infback9/infback9.c | 603 - third_party/zlib/contrib/infback9/infback9.h | 38 - third_party/zlib/contrib/infback9/inffix9.h | 108 - third_party/zlib/contrib/infback9/inflate9.h | 48 - third_party/zlib/contrib/infback9/inftree9.c | 319 - third_party/zlib/contrib/infback9/inftree9.h | 62 - third_party/zlib/contrib/iostream/test.cpp | 25 - .../zlib/contrib/iostream/zfstream.cpp | 330 - third_party/zlib/contrib/iostream/zfstream.h | 129 - third_party/zlib/contrib/iostream2/zstream.h | 308 - .../zlib/contrib/iostream2/zstream_test.cpp | 26 - third_party/zlib/contrib/iostream3/README | 35 - third_party/zlib/contrib/iostream3/TODO | 17 - third_party/zlib/contrib/iostream3/test.cc | 50 - .../zlib/contrib/iostream3/zfstream.cc | 479 - third_party/zlib/contrib/iostream3/zfstream.h | 467 - third_party/zlib/contrib/minizip/Makefile | 29 - third_party/zlib/contrib/minizip/Makefile.am | 45 - .../contrib/minizip/MiniZip64_Changes.txt | 6 - .../zlib/contrib/minizip/MiniZip64_info.txt | 74 - third_party/zlib/contrib/minizip/configure.ac | 32 - third_party/zlib/contrib/minizip/crypt.h | 129 - third_party/zlib/contrib/minizip/ioapi.c | 231 - third_party/zlib/contrib/minizip/ioapi.h | 211 - third_party/zlib/contrib/minizip/iowin32.c | 440 - third_party/zlib/contrib/minizip/iowin32.h | 29 - third_party/zlib/contrib/minizip/make_vms.com | 25 - third_party/zlib/contrib/minizip/miniunz.c | 647 - third_party/zlib/contrib/minizip/miniunzip.1 | 63 - third_party/zlib/contrib/minizip/minizip.1 | 46 - third_party/zlib/contrib/minizip/minizip.c | 509 - .../zlib/contrib/minizip/minizip.pc.in | 12 - third_party/zlib/contrib/minizip/mztools.c | 285 - third_party/zlib/contrib/minizip/mztools.h | 38 - third_party/zlib/contrib/minizip/unzip.c | 1985 -- third_party/zlib/contrib/minizip/unzip.h | 438 - third_party/zlib/contrib/minizip/zip.c | 1956 -- third_party/zlib/contrib/minizip/zip.h | 365 - third_party/zlib/contrib/nuget/nuget.csproj | 43 - third_party/zlib/contrib/nuget/nuget.sln | 22 - third_party/zlib/contrib/pascal/example.pas | 599 - third_party/zlib/contrib/pascal/readme.txt | 76 - third_party/zlib/contrib/pascal/zlibd32.mak | 99 - third_party/zlib/contrib/pascal/zlibpas.pas | 276 - third_party/zlib/contrib/puff/Makefile | 42 - third_party/zlib/contrib/puff/README | 63 - third_party/zlib/contrib/puff/puff.c | 840 - third_party/zlib/contrib/puff/puff.h | 36 - third_party/zlib/contrib/puff/pufftest.c | 165 - third_party/zlib/contrib/puff/zeros.raw | Bin 2517 -> 0 bytes third_party/zlib/contrib/testzlib/testzlib.c | 275 - .../zlib/contrib/testzlib/testzlib.txt | 10 - third_party/zlib/contrib/untgz/Makefile | 14 - third_party/zlib/contrib/untgz/Makefile.msc | 17 - third_party/zlib/contrib/untgz/untgz.c | 667 - third_party/zlib/contrib/vstudio/readme.txt | 81 - .../zlib/contrib/vstudio/vc10/miniunz.vcxproj | 310 - .../vstudio/vc10/miniunz.vcxproj.filters | 22 - .../zlib/contrib/vstudio/vc10/minizip.vcxproj | 307 - .../vstudio/vc10/minizip.vcxproj.filters | 22 - .../contrib/vstudio/vc10/testzlib.vcxproj | 412 - .../vstudio/vc10/testzlib.vcxproj.filters | 55 - .../contrib/vstudio/vc10/testzlibdll.vcxproj | 310 - .../vstudio/vc10/testzlibdll.vcxproj.filters | 22 - third_party/zlib/contrib/vstudio/vc10/zlib.rc | 32 - .../contrib/vstudio/vc10/zlibstat.vcxproj | 449 - .../vstudio/vc10/zlibstat.vcxproj.filters | 74 - .../zlib/contrib/vstudio/vc10/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc10/zlibvc.sln | 135 - .../zlib/contrib/vstudio/vc10/zlibvc.vcxproj | 633 - .../vstudio/vc10/zlibvc.vcxproj.filters | 115 - .../zlib/contrib/vstudio/vc11/miniunz.vcxproj | 314 - .../zlib/contrib/vstudio/vc11/minizip.vcxproj | 311 - .../contrib/vstudio/vc11/testzlib.vcxproj | 418 - .../contrib/vstudio/vc11/testzlibdll.vcxproj | 314 - third_party/zlib/contrib/vstudio/vc11/zlib.rc | 32 - .../contrib/vstudio/vc11/zlibstat.vcxproj | 456 - .../zlib/contrib/vstudio/vc11/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc11/zlibvc.sln | 117 - .../zlib/contrib/vstudio/vc11/zlibvc.vcxproj | 664 - .../zlib/contrib/vstudio/vc12/miniunz.vcxproj | 316 - .../zlib/contrib/vstudio/vc12/minizip.vcxproj | 313 - .../contrib/vstudio/vc12/testzlib.vcxproj | 422 - .../contrib/vstudio/vc12/testzlibdll.vcxproj | 316 - third_party/zlib/contrib/vstudio/vc12/zlib.rc | 32 - .../contrib/vstudio/vc12/zlibstat.vcxproj | 459 - .../zlib/contrib/vstudio/vc12/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc12/zlibvc.sln | 119 - .../zlib/contrib/vstudio/vc12/zlibvc.vcxproj | 668 - .../zlib/contrib/vstudio/vc14/miniunz.vcxproj | 316 - .../zlib/contrib/vstudio/vc14/minizip.vcxproj | 313 - .../contrib/vstudio/vc14/testzlib.vcxproj | 422 - .../contrib/vstudio/vc14/testzlibdll.vcxproj | 316 - third_party/zlib/contrib/vstudio/vc14/zlib.rc | 32 - .../contrib/vstudio/vc14/zlibstat.vcxproj | 459 - .../zlib/contrib/vstudio/vc14/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc14/zlibvc.sln | 119 - .../zlib/contrib/vstudio/vc14/zlibvc.vcxproj | 668 - .../zlib/contrib/vstudio/vc17/miniunz.vcxproj | 409 - .../zlib/contrib/vstudio/vc17/minizip.vcxproj | 405 - .../contrib/vstudio/vc17/testzlib.vcxproj | 473 - .../contrib/vstudio/vc17/testzlibdll.vcxproj | 409 - third_party/zlib/contrib/vstudio/vc17/zlib.rc | 32 - .../contrib/vstudio/vc17/zlibstat.vcxproj | 602 - .../zlib/contrib/vstudio/vc17/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc17/zlibvc.sln | 179 - .../zlib/contrib/vstudio/vc17/zlibvc.vcxproj | 875 - .../zlib/contrib/vstudio/vc9/miniunz.vcproj | 565 - .../zlib/contrib/vstudio/vc9/minizip.vcproj | 562 - .../zlib/contrib/vstudio/vc9/testzlib.vcproj | 796 - .../contrib/vstudio/vc9/testzlibdll.vcproj | 565 - third_party/zlib/contrib/vstudio/vc9/zlib.rc | 32 - .../zlib/contrib/vstudio/vc9/zlibstat.vcproj | 781 - .../zlib/contrib/vstudio/vc9/zlibvc.def | 158 - .../zlib/contrib/vstudio/vc9/zlibvc.sln | 144 - .../zlib/contrib/vstudio/vc9/zlibvc.vcproj | 1100 - third_party/zlib/crc32.c | 1049 - third_party/zlib/crc32.h | 9447 ------ third_party/zlib/deflate.c | 2139 -- third_party/zlib/deflate.h | 378 - third_party/zlib/doc/algorithm.txt | 209 - third_party/zlib/doc/crc-doc.1.0.pdf | Bin 776142 -> 0 bytes third_party/zlib/doc/rfc1950.txt | 619 - third_party/zlib/doc/rfc1951.txt | 955 - third_party/zlib/doc/rfc1952.txt | 675 - third_party/zlib/doc/txtvsbin.txt | 107 - third_party/zlib/examples/README.examples | 54 - third_party/zlib/examples/enough.c | 597 - third_party/zlib/examples/fitblk.c | 233 - third_party/zlib/examples/gun.c | 702 - third_party/zlib/examples/gzappend.c | 504 - third_party/zlib/examples/gzjoin.c | 449 - third_party/zlib/examples/gzlog.c | 1061 - third_party/zlib/examples/gzlog.h | 92 - third_party/zlib/examples/gznorm.c | 470 - third_party/zlib/examples/zlib_how.html | 549 - third_party/zlib/examples/zpipe.c | 205 - third_party/zlib/examples/zran.c | 533 - third_party/zlib/examples/zran.h | 52 - third_party/zlib/gzclose.c | 23 - third_party/zlib/gzguts.h | 215 - third_party/zlib/gzlib.c | 582 - third_party/zlib/gzread.c | 602 - third_party/zlib/gzwrite.c | 631 - third_party/zlib/infback.c | 628 - third_party/zlib/inffast.c | 320 - third_party/zlib/inffast.h | 12 - third_party/zlib/inffixed.h | 95 - third_party/zlib/inflate.c | 1526 - third_party/zlib/inflate.h | 127 - third_party/zlib/inftrees.c | 299 - third_party/zlib/inftrees.h | 63 - third_party/zlib/make_vms.com | 867 - third_party/zlib/msdos/Makefile.bor | 115 - third_party/zlib/msdos/Makefile.dj2 | 104 - third_party/zlib/msdos/Makefile.emx | 69 - third_party/zlib/msdos/Makefile.msc | 112 - third_party/zlib/msdos/Makefile.tc | 100 - third_party/zlib/nintendods/Makefile | 126 - third_party/zlib/nintendods/README | 5 - third_party/zlib/old/Makefile.emx | 69 - third_party/zlib/old/Makefile.riscos | 151 - third_party/zlib/old/README | 3 - third_party/zlib/old/descrip.mms | 48 - third_party/zlib/old/os2/Makefile.os2 | 136 - third_party/zlib/old/os2/zlib.def | 51 - third_party/zlib/old/visual-basic.txt | 160 - third_party/zlib/os400/README400 | 48 - third_party/zlib/os400/bndsrc | 127 - third_party/zlib/os400/make.sh | 366 - third_party/zlib/os400/zlib.inc | 527 - third_party/zlib/qnx/package.qpg | 141 - third_party/zlib/test/example.c | 546 - third_party/zlib/test/infcover.c | 672 - third_party/zlib/test/minigzip.c | 579 - third_party/zlib/treebuild.xml | 116 - third_party/zlib/trees.c | 1117 - third_party/zlib/trees.h | 129 - third_party/zlib/uncompr.c | 85 - third_party/zlib/watcom/watcom_f.mak | 43 - third_party/zlib/watcom/watcom_l.mak | 43 - third_party/zlib/win32/DLL_FAQ.txt | 381 - third_party/zlib/win32/Makefile.bor | 109 - third_party/zlib/win32/Makefile.gcc | 177 - third_party/zlib/win32/Makefile.msc | 159 - third_party/zlib/win32/README-WIN32.txt | 103 - third_party/zlib/win32/VisualC.txt | 3 - third_party/zlib/win32/zlib.def | 97 - third_party/zlib/win32/zlib1.rc | 40 - third_party/zlib/zconf.h.cmakein | 545 - third_party/zlib/zconf.h.in | 543 - third_party/zlib/zconf.h.included | 543 - third_party/zlib/zlib.3 | 149 - third_party/zlib/zlib.3.pdf | Bin 25523 -> 0 bytes third_party/zlib/zlib.h | 1939 -- third_party/zlib/zlib.map | 100 - third_party/zlib/zlib.pc.cmakein | 13 - third_party/zlib/zlib.pc.in | 13 - third_party/zlib/zutil.c | 299 - third_party/zlib/zutil.h | 255 - third_party/zstd/.buckconfig | 9 - third_party/zstd/.buckversion | 1 - third_party/zstd/.cirrus.yml | 9 - third_party/zstd/.gitattributes | 21 - .../zstd/.github/ISSUE_TEMPLATE/bug_report.md | 35 - .../.github/ISSUE_TEMPLATE/feature_request.md | 20 - third_party/zstd/.github/dependabot.yml | 6 - .../.github/workflows/android-ndk-build.yml | 39 - third_party/zstd/.github/workflows/commit.yml | 104 - .../zstd/.github/workflows/dev-long-tests.yml | 313 - .../.github/workflows/dev-short-tests.yml | 725 - .../zstd/.github/workflows/nightly.yml | 38 - .../workflows/publish-release-artifacts.yml | 73 - .../zstd/.github/workflows/scorecards.yml | 64 - .../.github/workflows/windows-artifacts.yml | 58 - third_party/zstd/.gitignore | 63 - third_party/zstd/CHANGELOG | 863 - third_party/zstd/CODE_OF_CONDUCT.md | 5 - third_party/zstd/CONTRIBUTING.md | 489 - third_party/zstd/COPYING | 339 - third_party/zstd/LICENSE | 30 - third_party/zstd/Makefile | 471 - third_party/zstd/Package.swift | 36 - third_party/zstd/README.md | 237 - third_party/zstd/SECURITY.md | 15 - third_party/zstd/TESTING.md | 43 - third_party/zstd/build/.gitignore | 33 - third_party/zstd/build/LICENSE | 0 third_party/zstd/build/README.md | 56 - .../build/VS2008/fullbench/fullbench.vcproj | 549 - .../zstd/build/VS2008/fuzzer/fuzzer.vcproj | 585 - third_party/zstd/build/VS2008/zstd.sln | 56 - .../zstd/build/VS2008/zstd/zstd.vcproj | 677 - .../zstd/build/VS2008/zstdlib/zstdlib.vcproj | 635 - .../zstd/build/VS2010/CompileAsCpp.props | 8 - .../zstd/build/VS2010/datagen/datagen.vcxproj | 170 - .../build/VS2010/fullbench/fullbench.vcxproj | 220 - .../zstd/build/VS2010/fuzzer/fuzzer.vcxproj | 224 - .../build/VS2010/libzstd-dll/libzstd-dll.rc | 51 - .../VS2010/libzstd-dll/libzstd-dll.vcxproj | 250 - .../zstd/build/VS2010/libzstd/libzstd.vcxproj | 243 - third_party/zstd/build/VS2010/zstd.sln | 84 - third_party/zstd/build/VS2010/zstd/zstd.rc | 51 - .../zstd/build/VS2010/zstd/zstd.vcxproj | 266 - third_party/zstd/build/VS_scripts/README.md | 64 - .../zstd/build/VS_scripts/build.VS2010.cmd | 7 - .../zstd/build/VS_scripts/build.VS2012.cmd | 6 - .../zstd/build/VS_scripts/build.VS2013.cmd | 7 - .../zstd/build/VS_scripts/build.VS2015.cmd | 7 - .../zstd/build/VS_scripts/build.VS2017.cmd | 7 - .../VS_scripts/build.VS2017Community.cmd | 7 - .../VS_scripts/build.VS2017Enterprise.cmd | 7 - .../VS_scripts/build.VS2017Professional.cmd | 7 - .../zstd/build/VS_scripts/build.VSPreview.cmd | 7 - .../zstd/build/VS_scripts/build.generic.cmd | 67 - third_party/zstd/build/cmake/.gitignore | 10 - third_party/zstd/build/cmake/CMakeLists.txt | 228 - .../AddZstdCompilationFlags.cmake | 136 - .../build/cmake/CMakeModules/FindLibLZ4.cmake | 49 - .../CMakeModules/GetZstdLibraryVersion.cmake | 10 - .../build/cmake/CMakeModules/JoinPaths.cmake | 23 - third_party/zstd/build/cmake/README.md | 146 - .../zstd/build/cmake/contrib/CMakeLists.txt | 13 - .../cmake/contrib/gen_html/CMakeLists.txt | 30 - .../build/cmake/contrib/pzstd/CMakeLists.txt | 39 - third_party/zstd/build/cmake/lib/.gitignore | 2 - .../zstd/build/cmake/lib/CMakeLists.txt | 295 - .../build/cmake/lib/cmake_uninstall.cmake.in | 22 - .../zstd/build/cmake/programs/.gitignore | 5 - .../zstd/build/cmake/programs/CMakeLists.txt | 144 - third_party/zstd/build/cmake/tests/.gitignore | 6 - .../zstd/build/cmake/tests/CMakeLists.txt | 118 - .../zstd/build/cmake/zstdConfig.cmake.in | 10 - .../zstd/build/meson/GetZstdLibraryVersion.py | 39 - .../zstd/build/meson/InstallSymlink.py | 55 - third_party/zstd/build/meson/README.md | 38 - .../build/meson/contrib/gen_html/meson.build | 30 - .../zstd/build/meson/contrib/meson.build | 12 - .../build/meson/contrib/pzstd/meson.build | 25 - third_party/zstd/build/meson/lib/meson.build | 171 - third_party/zstd/build/meson/meson.build | 156 - .../zstd/build/meson/meson_options.txt | 36 - .../zstd/build/meson/programs/meson.build | 124 - .../zstd/build/meson/tests/meson.build | 217 - .../zstd/build/meson/tests/valgrindTest.py | 90 - .../zstd/build/single_file_libs/.gitignore | 10 - .../zstd/build/single_file_libs/README.md | 33 - .../single_file_libs/build_decoder_test.sh | 91 - .../single_file_libs/build_library_test.sh | 98 - .../zstd/build/single_file_libs/combine.py | 234 - .../zstd/build/single_file_libs/combine.sh | 249 - .../create_single_file_decoder.sh | 19 - .../create_single_file_library.sh | 19 - .../build/single_file_libs/examples/README.md | 11 - .../single_file_libs/examples/emscripten.c | 340 - .../single_file_libs/examples/roundtrip.c | 83 - .../single_file_libs/examples/shell.html | 31 - .../build/single_file_libs/examples/simple.c | 75 - .../examples/testcard-dxt1.inl | 2731 -- .../examples/testcard-zstd.inl | 261 - .../single_file_libs/examples/testcard.png | Bin 12675 -> 0 bytes .../zstd/build/single_file_libs/zstd-in.c | 91 - .../build/single_file_libs/zstddeclib-in.c | 62 - third_party/zstd/contrib/VS2005/README.md | 3 - .../contrib/VS2005/fullbench/fullbench.vcproj | 440 - .../zstd/contrib/VS2005/fuzzer/fuzzer.vcproj | 488 - third_party/zstd/contrib/VS2005/zstd.sln | 55 - .../zstd/contrib/VS2005/zstd/zstd.vcproj | 552 - .../contrib/VS2005/zstdlib/zstdlib.vcproj | 546 - third_party/zstd/contrib/cleanTabs | 2 - .../contrib/diagnose_corruption/.gitignore | 1 - .../zstd/contrib/diagnose_corruption/Makefile | 35 - .../diagnose_corruption/check_flipped_bits.c | 400 - third_party/zstd/contrib/docker/Dockerfile | 20 - third_party/zstd/contrib/docker/README.md | 20 - .../externalSequenceProducer/.gitignore | 2 - .../contrib/externalSequenceProducer/Makefile | 40 - .../externalSequenceProducer/README.md | 14 - .../contrib/externalSequenceProducer/main.c | 107 - .../sequence_producer.c | 80 - .../sequence_producer.h | 26 - .../contrib/freestanding_lib/freestanding.py | 774 - third_party/zstd/contrib/gen_html/.gitignore | 3 - third_party/zstd/contrib/gen_html/Makefile | 51 - third_party/zstd/contrib/gen_html/README.md | 31 - .../zstd/contrib/gen_html/gen-zstd-manual.sh | 9 - .../zstd/contrib/gen_html/gen_html.cpp | 225 - .../zstd/contrib/largeNbDicts/.gitignore | 2 - .../zstd/contrib/largeNbDicts/Makefile | 58 - .../zstd/contrib/largeNbDicts/README.md | 33 - .../zstd/contrib/largeNbDicts/largeNbDicts.c | 1085 - .../zstd/contrib/linux-kernel/.gitignore | 4 - .../zstd/contrib/linux-kernel/Makefile | 108 - .../zstd/contrib/linux-kernel/README.md | 14 - .../contrib/linux-kernel/btrfs-benchmark.sh | 104 - .../linux-kernel/btrfs-extract-benchmark.sh | 99 - .../contrib/linux-kernel/decompress_sources.h | 34 - .../zstd/contrib/linux-kernel/linux.mk | 44 - .../zstd/contrib/linux-kernel/linux_zstd.h | 525 - third_party/zstd/contrib/linux-kernel/mem.h | 262 - .../linux-kernel/squashfs-benchmark.sh | 39 - .../zstd/contrib/linux-kernel/test/Makefile | 49 - .../test/include/linux/compiler.h | 23 - .../linux-kernel/test/include/linux/errno.h | 15 - .../linux-kernel/test/include/linux/kernel.h | 19 - .../linux-kernel/test/include/linux/limits.h | 15 - .../linux-kernel/test/include/linux/math64.h | 15 - .../linux-kernel/test/include/linux/module.h | 20 - .../linux-kernel/test/include/linux/printk.h | 15 - .../linux-kernel/test/include/linux/stddef.h | 15 - .../linux-kernel/test/include/linux/swab.h | 16 - .../linux-kernel/test/include/linux/types.h | 16 - .../test/include/linux/unaligned.h | 187 - .../linux-kernel/test/include/linux/xxhash.h | 745 - .../contrib/linux-kernel/test/macro-test.sh | 44 - .../contrib/linux-kernel/test/static_test.c | 52 - .../zstd/contrib/linux-kernel/test/test.c | 229 - .../contrib/linux-kernel/zstd_common_module.c | 29 - .../linux-kernel/zstd_compress_module.c | 237 - .../linux-kernel/zstd_decompress_module.c | 105 - .../zstd/contrib/linux-kernel/zstd_deps.h | 121 - .../zstd/contrib/match_finders/README.md | 42 - .../zstd/contrib/match_finders/zstd_edist.c | 558 - .../zstd/contrib/match_finders/zstd_edist.h | 70 - third_party/zstd/contrib/premake/premake4.lua | 6 - third_party/zstd/contrib/premake/zstd.lua | 80 - third_party/zstd/contrib/pzstd/.gitignore | 2 - third_party/zstd/contrib/pzstd/BUCK | 72 - third_party/zstd/contrib/pzstd/ErrorHolder.h | 54 - third_party/zstd/contrib/pzstd/Logging.h | 72 - third_party/zstd/contrib/pzstd/Makefile | 265 - third_party/zstd/contrib/pzstd/Options.cpp | 424 - third_party/zstd/contrib/pzstd/Options.h | 71 - third_party/zstd/contrib/pzstd/Pzstd.cpp | 626 - third_party/zstd/contrib/pzstd/Pzstd.h | 153 - third_party/zstd/contrib/pzstd/README.md | 56 - .../zstd/contrib/pzstd/SkippableFrame.cpp | 30 - .../zstd/contrib/pzstd/SkippableFrame.h | 64 - .../zstd/contrib/pzstd/images/Cspeed.png | Bin 69804 -> 0 bytes .../zstd/contrib/pzstd/images/Dspeed.png | Bin 26335 -> 0 bytes third_party/zstd/contrib/pzstd/main.cpp | 27 - third_party/zstd/contrib/pzstd/test/BUCK | 37 - .../zstd/contrib/pzstd/test/OptionsTest.cpp | 536 - .../zstd/contrib/pzstd/test/PzstdTest.cpp | 147 - .../zstd/contrib/pzstd/test/RoundTrip.h | 86 - .../zstd/contrib/pzstd/test/RoundTripTest.cpp | 84 - third_party/zstd/contrib/pzstd/utils/BUCK | 75 - third_party/zstd/contrib/pzstd/utils/Buffer.h | 99 - .../zstd/contrib/pzstd/utils/FileSystem.h | 96 - third_party/zstd/contrib/pzstd/utils/Likely.h | 28 - .../zstd/contrib/pzstd/utils/Portability.h | 16 - third_party/zstd/contrib/pzstd/utils/Range.h | 133 - .../zstd/contrib/pzstd/utils/ResourcePool.h | 96 - .../zstd/contrib/pzstd/utils/ScopeGuard.h | 50 - .../zstd/contrib/pzstd/utils/ThreadPool.h | 58 - .../zstd/contrib/pzstd/utils/WorkQueue.h | 182 - .../zstd/contrib/pzstd/utils/test/BUCK | 35 - .../contrib/pzstd/utils/test/BufferTest.cpp | 89 - .../contrib/pzstd/utils/test/RangeTest.cpp | 82 - .../pzstd/utils/test/ResourcePoolTest.cpp | 72 - .../pzstd/utils/test/ScopeGuardTest.cpp | 28 - .../pzstd/utils/test/ThreadPoolTest.cpp | 71 - .../pzstd/utils/test/WorkQueueTest.cpp | 282 - third_party/zstd/contrib/recovery/Makefile | 35 - .../zstd/contrib/recovery/recover_directory.c | 152 - .../zstd/contrib/seekable_format/README.md | 42 - .../seekable_format/examples/.gitignore | 5 - .../contrib/seekable_format/examples/Makefile | 53 - .../examples/parallel_compression.c | 214 - .../examples/parallel_processing.c | 194 - .../examples/seekable_compression.c | 136 - .../examples/seekable_decompression.c | 141 - .../examples/seekable_decompression_mem.c | 147 - .../contrib/seekable_format/tests/.gitignore | 1 - .../contrib/seekable_format/tests/Makefile | 38 - .../seekable_format/tests/seekable_tests.c | 363 - .../contrib/seekable_format/zstd_seekable.h | 226 - .../zstd_seekable_compression_format.md | 116 - .../seekable_format/zstdseek_compress.c | 365 - .../seekable_format/zstdseek_decompress.c | 600 - third_party/zstd/contrib/seqBench/Makefile | 58 - third_party/zstd/contrib/seqBench/seqBench.c | 53 - third_party/zstd/contrib/snap/snapcraft.yaml | 28 - third_party/zstd/doc/README.md | 26 - third_party/zstd/doc/decompressor_errata.md | 148 - .../zstd/doc/decompressor_permissive.md | 80 - .../zstd/doc/educational_decoder/.gitignore | 2 - .../zstd/doc/educational_decoder/Makefile | 62 - .../zstd/doc/educational_decoder/README.md | 36 - .../zstd/doc/educational_decoder/harness.c | 119 - .../doc/educational_decoder/zstd_decompress.c | 2323 -- .../doc/educational_decoder/zstd_decompress.h | 61 - third_party/zstd/doc/images/CSpeed2.png | Bin 73335 -> 0 bytes third_party/zstd/doc/images/DCspeed5.png | Bin 69278 -> 0 bytes third_party/zstd/doc/images/DSpeed3.png | Bin 27123 -> 0 bytes third_party/zstd/doc/images/cdict_v136.png | Bin 33330 -> 0 bytes third_party/zstd/doc/images/dict-cr.png | Bin 90412 -> 0 bytes third_party/zstd/doc/images/dict-cs.png | Bin 91518 -> 0 bytes third_party/zstd/doc/images/dict-ds.png | Bin 98316 -> 0 bytes .../zstd/doc/images/zstd_cdict_v1_3_5.png | Bin 93969 -> 0 bytes third_party/zstd/doc/images/zstd_logo86.png | Bin 13069 -> 0 bytes .../zstd/doc/zstd_compression_format.md | 1771 -- third_party/zstd/doc/zstd_manual.html | 2237 -- third_party/zstd/examples/.gitignore | 15 - third_party/zstd/examples/Makefile | 93 - third_party/zstd/examples/README.md | 46 - third_party/zstd/examples/common.h | 246 - .../zstd/examples/dictionary_compression.c | 107 - .../zstd/examples/dictionary_decompression.c | 99 - .../examples/multiple_simple_compression.c | 116 - .../examples/multiple_streaming_compression.c | 133 - .../zstd/examples/simple_compression.c | 68 - .../zstd/examples/simple_decompression.c | 65 - .../zstd/examples/streaming_compression.c | 146 - .../streaming_compression_thread_pool.c | 180 - .../zstd/examples/streaming_decompression.c | 100 - .../zstd/examples/streaming_memory_usage.c | 137 - third_party/zstd/lib/.gitignore | 3 - third_party/zstd/lib/BUCK | 232 - third_party/zstd/lib/Makefile | 389 - third_party/zstd/lib/README.md | 248 - third_party/zstd/lib/common/allocations.h | 55 - third_party/zstd/lib/common/bits.h | 205 - third_party/zstd/lib/common/bitstream.h | 454 - third_party/zstd/lib/common/compiler.h | 464 - third_party/zstd/lib/common/cpu.h | 249 - third_party/zstd/lib/common/debug.c | 30 - third_party/zstd/lib/common/debug.h | 107 - third_party/zstd/lib/common/entropy_common.c | 340 - third_party/zstd/lib/common/error_private.c | 64 - third_party/zstd/lib/common/error_private.h | 158 - third_party/zstd/lib/common/fse.h | 625 - third_party/zstd/lib/common/fse_decompress.c | 315 - third_party/zstd/lib/common/huf.h | 277 - third_party/zstd/lib/common/mem.h | 422 - third_party/zstd/lib/common/pool.c | 371 - third_party/zstd/lib/common/pool.h | 81 - .../zstd/lib/common/portability_macros.h | 171 - third_party/zstd/lib/common/threading.c | 182 - third_party/zstd/lib/common/threading.h | 142 - third_party/zstd/lib/common/xxhash.c | 18 - third_party/zstd/lib/common/xxhash.h | 7094 ----- third_party/zstd/lib/common/zstd_common.c | 48 - third_party/zstd/lib/common/zstd_deps.h | 123 - third_party/zstd/lib/common/zstd_internal.h | 324 - third_party/zstd/lib/common/zstd_trace.h | 156 - third_party/zstd/lib/compress/clevels.h | 134 - third_party/zstd/lib/compress/fse_compress.c | 625 - third_party/zstd/lib/compress/hist.c | 191 - third_party/zstd/lib/compress/hist.h | 82 - third_party/zstd/lib/compress/huf_compress.c | 1464 - third_party/zstd/lib/compress/zstd_compress.c | 7843 ----- .../lib/compress/zstd_compress_internal.h | 1636 -- .../lib/compress/zstd_compress_literals.c | 235 - .../lib/compress/zstd_compress_literals.h | 39 - .../lib/compress/zstd_compress_sequences.c | 442 - .../lib/compress/zstd_compress_sequences.h | 55 - .../lib/compress/zstd_compress_superblock.c | 688 - .../lib/compress/zstd_compress_superblock.h | 32 - third_party/zstd/lib/compress/zstd_cwksp.h | 765 - .../zstd/lib/compress/zstd_double_fast.c | 778 - .../zstd/lib/compress/zstd_double_fast.h | 42 - third_party/zstd/lib/compress/zstd_fast.c | 985 - third_party/zstd/lib/compress/zstd_fast.h | 30 - third_party/zstd/lib/compress/zstd_lazy.c | 2199 -- third_party/zstd/lib/compress/zstd_lazy.h | 193 - third_party/zstd/lib/compress/zstd_ldm.c | 745 - third_party/zstd/lib/compress/zstd_ldm.h | 109 - .../zstd/lib/compress/zstd_ldm_geartab.h | 106 - third_party/zstd/lib/compress/zstd_opt.c | 1580 - third_party/zstd/lib/compress/zstd_opt.h | 72 - third_party/zstd/lib/compress/zstd_preSplit.c | 238 - third_party/zstd/lib/compress/zstd_preSplit.h | 33 - .../zstd/lib/compress/zstdmt_compress.c | 1923 -- .../zstd/lib/compress/zstdmt_compress.h | 102 - .../zstd/lib/decompress/huf_decompress.c | 1944 -- .../lib/decompress/huf_decompress_amd64.S | 602 - third_party/zstd/lib/decompress/zstd_ddict.c | 244 - third_party/zstd/lib/decompress/zstd_ddict.h | 44 - .../zstd/lib/decompress/zstd_decompress.c | 2410 -- .../lib/decompress/zstd_decompress_block.c | 2209 -- .../lib/decompress/zstd_decompress_block.h | 73 - .../lib/decompress/zstd_decompress_internal.h | 240 - third_party/zstd/lib/deprecated/zbuff.h | 214 - .../zstd/lib/deprecated/zbuff_common.c | 26 - .../zstd/lib/deprecated/zbuff_compress.c | 167 - .../zstd/lib/deprecated/zbuff_decompress.c | 77 - third_party/zstd/lib/dictBuilder/cover.c | 1302 - third_party/zstd/lib/dictBuilder/cover.h | 152 - third_party/zstd/lib/dictBuilder/divsufsort.c | 1913 -- third_party/zstd/lib/dictBuilder/divsufsort.h | 57 - third_party/zstd/lib/dictBuilder/fastcover.c | 766 - third_party/zstd/lib/dictBuilder/zdict.c | 1133 - third_party/zstd/lib/dll/example/Makefile | 48 - third_party/zstd/lib/dll/example/README.md | 63 - .../zstd/lib/dll/example/build_package.bat | 20 - .../zstd/lib/dll/example/fullbench-dll.sln | 25 - .../lib/dll/example/fullbench-dll.vcxproj | 181 - third_party/zstd/lib/legacy/zstd_legacy.h | 452 - third_party/zstd/lib/legacy/zstd_v01.c | 2127 -- third_party/zstd/lib/legacy/zstd_v01.h | 94 - third_party/zstd/lib/legacy/zstd_v02.c | 3465 --- third_party/zstd/lib/legacy/zstd_v02.h | 93 - third_party/zstd/lib/legacy/zstd_v03.c | 3105 -- third_party/zstd/lib/legacy/zstd_v03.h | 93 - third_party/zstd/lib/legacy/zstd_v04.c | 3598 --- third_party/zstd/lib/legacy/zstd_v04.h | 142 - third_party/zstd/lib/legacy/zstd_v05.c | 4005 --- third_party/zstd/lib/legacy/zstd_v05.h | 162 - third_party/zstd/lib/legacy/zstd_v06.c | 4110 --- third_party/zstd/lib/legacy/zstd_v06.h | 172 - third_party/zstd/lib/legacy/zstd_v07.c | 4490 --- third_party/zstd/lib/legacy/zstd_v07.h | 187 - third_party/zstd/lib/libzstd.mk | 235 - third_party/zstd/lib/libzstd.pc.in | 16 - third_party/zstd/lib/module.modulemap | 35 - third_party/zstd/lib/zdict.h | 481 - third_party/zstd/lib/zstd.h | 3198 --- third_party/zstd/lib/zstd_errors.h | 107 - third_party/zstd/programs/.gitignore | 41 - third_party/zstd/programs/BUCK | 44 - third_party/zstd/programs/Makefile | 445 - third_party/zstd/programs/README.md | 344 - third_party/zstd/programs/benchfn.c | 256 - third_party/zstd/programs/benchfn.h | 173 - third_party/zstd/programs/benchzstd.c | 1281 - third_party/zstd/programs/benchzstd.h | 191 - third_party/zstd/programs/datagen.c | 186 - third_party/zstd/programs/datagen.h | 38 - third_party/zstd/programs/dibio.c | 440 - third_party/zstd/programs/dibio.h | 39 - third_party/zstd/programs/fileio.c | 3464 --- third_party/zstd/programs/fileio.h | 171 - third_party/zstd/programs/fileio_asyncio.c | 663 - third_party/zstd/programs/fileio_asyncio.h | 195 - third_party/zstd/programs/fileio_common.h | 121 - third_party/zstd/programs/fileio_types.h | 86 - third_party/zstd/programs/lorem.c | 285 - third_party/zstd/programs/lorem.h | 32 - third_party/zstd/programs/platform.h | 217 - third_party/zstd/programs/timefn.c | 168 - third_party/zstd/programs/timefn.h | 59 - third_party/zstd/programs/util.c | 1643 -- third_party/zstd/programs/util.h | 362 - third_party/zstd/programs/windres/verrsrc.h | 17 - third_party/zstd/programs/windres/zstd.rc | 51 - third_party/zstd/programs/windres/zstd32.res | Bin 1044 -> 0 bytes third_party/zstd/programs/windres/zstd64.res | Bin 1044 -> 0 bytes third_party/zstd/programs/zstd.1 | 392 - third_party/zstd/programs/zstd.1.md | 714 - third_party/zstd/programs/zstdcli.c | 1658 -- third_party/zstd/programs/zstdcli_trace.c | 172 - third_party/zstd/programs/zstdcli_trace.h | 24 - third_party/zstd/programs/zstdgrep | 134 - third_party/zstd/programs/zstdgrep.1 | 26 - third_party/zstd/programs/zstdgrep.1.md | 30 - third_party/zstd/programs/zstdless | 8 - third_party/zstd/programs/zstdless.1 | 14 - third_party/zstd/programs/zstdless.1.md | 16 - third_party/zstd/tests/.gitignore | 72 - .../zstd/tests/DEPRECATED-test-zstd-speed.py | 378 - third_party/zstd/tests/Makefile | 481 - third_party/zstd/tests/README.md | 184 - .../zstd/tests/automated_benchmarking.py | 326 - third_party/zstd/tests/bigdict.c | 133 - third_party/zstd/tests/checkTag.c | 65 - third_party/zstd/tests/check_size.py | 31 - third_party/zstd/tests/cli-tests/.gitignore | 6 - third_party/zstd/tests/cli-tests/README.md | 258 - .../zstd/tests/cli-tests/basic/args.sh | 10 - .../zstd/tests/cli-tests/basic/args.sh.exit | 1 - .../tests/cli-tests/basic/args.sh.stderr.glob | 28 - .../zstd/tests/cli-tests/basic/help.sh | 10 - .../tests/cli-tests/basic/help.sh.stdout.glob | 34 - .../zstd/tests/cli-tests/basic/memlimit.sh | 40 - .../cli-tests/basic/memlimit.sh.stderr.exact | 13 - .../cli-tests/basic/memlimit.sh.stdout.exact | 13 - .../zstd/tests/cli-tests/basic/output_dir.sh | 7 - .../basic/output_dir.sh.stderr.exact | 2 - .../basic/output_dir.sh.stdout.exact | 2 - .../zstd/tests/cli-tests/basic/version.sh | 6 - .../cli-tests/basic/version.sh.stdout.glob | 2 - third_party/zstd/tests/cli-tests/bin/cmp_size | 44 - third_party/zstd/tests/cli-tests/bin/datagen | 3 - third_party/zstd/tests/cli-tests/bin/die | 4 - third_party/zstd/tests/cli-tests/bin/println | 2 - third_party/zstd/tests/cli-tests/bin/unzstd | 9 - third_party/zstd/tests/cli-tests/bin/zstd | 9 - third_party/zstd/tests/cli-tests/bin/zstdcat | 9 - third_party/zstd/tests/cli-tests/bin/zstdgrep | 2 - third_party/zstd/tests/cli-tests/bin/zstdless | 2 - .../zstd/tests/cli-tests/cltools/setup | 6 - .../zstd/tests/cli-tests/cltools/zstdgrep.sh | 8 - .../tests/cli-tests/cltools/zstdgrep.sh.exit | 1 - .../cltools/zstdgrep.sh.stderr.exact | 1 - .../cli-tests/cltools/zstdgrep.sh.stdout.glob | 4 - .../zstd/tests/cli-tests/cltools/zstdless.sh | 10 - .../cltools/zstdless.sh.stderr.exact | 2 - .../cli-tests/cltools/zstdless.sh.stdout.glob | 5 - .../zstd/tests/cli-tests/common/format.sh | 19 - .../zstd/tests/cli-tests/common/mtime.sh | 13 - .../tests/cli-tests/common/permissions.sh | 18 - .../zstd/tests/cli-tests/common/platform.sh | 36 - .../zstd/tests/cli-tests/compression/adapt.sh | 14 - .../zstd/tests/cli-tests/compression/basic.sh | 36 - .../compression/compress-literals.sh | 10 - .../tests/cli-tests/compression/format.sh | 16 - .../tests/cli-tests/compression/golden.sh | 16 - .../cli-tests/compression/gzip-compat.sh | 17 - .../tests/cli-tests/compression/levels.sh | 75 - .../compression/levels.sh.stderr.exact | 80 - .../compression/long-distance-matcher.sh | 7 - .../cli-tests/compression/multi-threaded.sh | 15 - .../multi-threaded.sh.stderr.exact | 11 - .../cli-tests/compression/multiple-files.sh | 21 - .../multiple-files.sh.stdout.exact | 12 - .../cli-tests/compression/row-match-finder.sh | 7 - .../zstd/tests/cli-tests/compression/setup | 7 - .../cli-tests/compression/stream-size.sh | 7 - .../cli-tests/compression/verbose-wlog.sh | 11 - .../compression/verbose-wlog.sh.stderr.glob | 5 - .../compression/verbose-wlog.sh.stdout.glob | 5 - .../cli-tests/compression/window-resize.sh | 9 - .../window-resize.sh.stderr.ignore | 0 .../compression/window-resize.sh.stdout.glob | 3 - .../cli-tests/decompression/detectErrors.sh | 11 - .../tests/cli-tests/decompression/golden.sh | 7 - .../cli-tests/decompression/pass-through.sh | 57 - .../pass-through.sh.stderr.exact | 11 - .../pass-through.sh.stdout.exact | 25 - .../cli-tests/dict-builder/empty-input.sh | 9 - .../dict-builder/empty-input.sh.stderr.exact | 1 - .../tests/cli-tests/dict-builder/no-inputs.sh | 3 - .../cli-tests/dict-builder/no-inputs.sh.exit | 1 - .../dict-builder/no-inputs.sh.stderr.exact | 5 - .../dictionaries/dictionary-mismatch.sh | 29 - .../dictionary-mismatch.sh.stderr.exact | 7 - .../tests/cli-tests/dictionaries/golden.sh | 9 - .../zstd/tests/cli-tests/dictionaries/setup | 6 - .../tests/cli-tests/dictionaries/setup_once | 24 - .../file-handling/directory-mirror.sh | 49 - .../directory-mirror.sh.stderr.exact | 0 .../directory-mirror.sh.stdout.exact | 0 ...compress-file-to-dir-without-write-perm.sh | 12 - ...-to-dir-without-write-perm.sh.stderr.exact | 26 - .../file-stat/compress-file-to-file.sh | 9 - .../compress-file-to-file.sh.stderr.exact | 42 - .../file-stat/compress-file-to-stdout.sh | 8 - .../compress-file-to-stdout.sh.stderr.exact | 24 - .../file-stat/compress-stdin-to-file.sh | 8 - .../compress-stdin-to-file.sh.stderr.exact | 24 - .../file-stat/compress-stdin-to-stdout.sh | 8 - .../compress-stdin-to-stdout.sh.stderr.exact | 18 - .../file-stat/decompress-file-to-file.sh | 8 - .../decompress-file-to-file.sh.stderr.exact | 38 - .../file-stat/decompress-file-to-stdout.sh | 7 - .../decompress-file-to-stdout.sh.stderr.exact | 18 - .../file-stat/decompress-stdin-to-file.sh | 7 - .../decompress-stdin-to-file.sh.stderr.exact | 20 - .../file-stat/decompress-stdin-to-stdout.sh | 7 - ...decompress-stdin-to-stdout.sh.stderr.exact | 14 - .../tests/cli-tests/progress/no-progress.sh | 46 - .../progress/no-progress.sh.stderr.glob | 96 - .../zstd/tests/cli-tests/progress/progress.sh | 41 - .../progress/progress.sh.stderr.glob | 62 - third_party/zstd/tests/cli-tests/run.py | 731 - .../zstd/tests/cli-tests/zstd-symlinks/setup | 6 - .../tests/cli-tests/zstd-symlinks/zstdcat.sh | 12 - .../zstd-symlinks/zstdcat.sh.stdout.exact | 8 - third_party/zstd/tests/datagencli.c | 149 - third_party/zstd/tests/decodecorpus.c | 1998 -- .../zstd/tests/dict-files/zero-weight-dict | Bin 153 -> 0 bytes third_party/zstd/tests/external_matchfinder.c | 140 - third_party/zstd/tests/external_matchfinder.h | 39 - third_party/zstd/tests/fullbench.c | 1209 - third_party/zstd/tests/fuzz/.gitignore | 31 - third_party/zstd/tests/fuzz/Makefile | 278 - third_party/zstd/tests/fuzz/README.md | 161 - .../zstd/tests/fuzz/block_decompress.c | 53 - .../zstd/tests/fuzz/block_round_trip.c | 103 - .../zstd/tests/fuzz/decompress_cross_format.c | 130 - .../tests/fuzz/decompress_dstSize_tooSmall.c | 74 - .../zstd/tests/fuzz/dictionary_decompress.c | 77 - .../zstd/tests/fuzz/dictionary_loader.c | 106 - .../zstd/tests/fuzz/dictionary_round_trip.c | 155 - .../tests/fuzz/dictionary_stream_round_trip.c | 209 - third_party/zstd/tests/fuzz/fse_read_ncount.c | 100 - third_party/zstd/tests/fuzz/fuzz.h | 57 - third_party/zstd/tests/fuzz/fuzz.py | 910 - .../zstd/tests/fuzz/fuzz_data_producer.c | 95 - .../zstd/tests/fuzz/fuzz_data_producer.h | 66 - third_party/zstd/tests/fuzz/fuzz_helpers.c | 48 - third_party/zstd/tests/fuzz/fuzz_helpers.h | 81 - .../tests/fuzz/fuzz_third_party_seq_prod.h | 116 - .../zstd/tests/fuzz/generate_sequences.c | 88 - third_party/zstd/tests/fuzz/huf_decompress.c | 68 - third_party/zstd/tests/fuzz/huf_round_trip.c | 137 - .../tests/fuzz/raw_dictionary_round_trip.c | 119 - .../zstd/tests/fuzz/regression_driver.c | 90 - .../zstd/tests/fuzz/seekable_roundtrip.c | 88 - .../tests/fuzz/seq_prod_fuzz_example/Makefile | 16 - .../fuzz/seq_prod_fuzz_example/README.md | 12 - .../seq_prod_fuzz_example/example_seq_prod.c | 52 - .../tests/fuzz/sequence_compression_api.c | 452 - third_party/zstd/tests/fuzz/simple_compress.c | 60 - .../zstd/tests/fuzz/simple_decompress.c | 59 - .../zstd/tests/fuzz/simple_round_trip.c | 182 - .../zstd/tests/fuzz/stream_decompress.c | 119 - .../zstd/tests/fuzz/stream_round_trip.c | 218 - third_party/zstd/tests/fuzz/zstd_frame_info.c | 43 - third_party/zstd/tests/fuzz/zstd_helpers.c | 208 - third_party/zstd/tests/fuzz/zstd_helpers.h | 56 - third_party/zstd/tests/fuzzer.c | 5147 ---- .../PR-3517-block-splitter-corruption-test | 1 - .../zstd/tests/golden-compression/http | 1 - .../huffman-compressed-larger | Bin 143 -> 0 bytes .../large-literal-and-match-lengths | Bin 199998 -> 0 bytes .../golden-decompression-errors/.gitignore | 1 - .../golden-decompression-errors/off0.bin.zst | Bin 17 -> 0 bytes .../truncated_huff_state.zst | Bin 19 -> 0 bytes .../zeroSeq_extraneous.zst | Bin 27 -> 0 bytes .../tests/golden-decompression/block-128k.zst | Bin 131081 -> 0 bytes .../golden-decompression/empty-block.zst | Bin 11 -> 0 bytes .../golden-decompression/rle-first-block.zst | Bin 45 -> 0 bytes .../tests/golden-decompression/zeroSeq_2B.zst | Bin 25 -> 0 bytes .../http-dict-missing-symbols | Bin 1000 -> 0 bytes third_party/zstd/tests/gzip/Makefile | 45 - third_party/zstd/tests/gzip/gzip-env.sh | 46 - third_party/zstd/tests/gzip/helin-segv.sh | 31 - third_party/zstd/tests/gzip/help-version.sh | 270 - third_party/zstd/tests/gzip/hufts-segv.gz | Bin 425 -> 0 bytes third_party/zstd/tests/gzip/hufts.sh | 34 - third_party/zstd/tests/gzip/init.cfg | 5 - third_party/zstd/tests/gzip/init.sh | 616 - third_party/zstd/tests/gzip/keep.sh | 51 - third_party/zstd/tests/gzip/list.sh | 31 - third_party/zstd/tests/gzip/memcpy-abuse.sh | 34 - third_party/zstd/tests/gzip/mixed.sh | 68 - .../zstd/tests/gzip/null-suffix-clobber.sh | 35 - third_party/zstd/tests/gzip/stdin.sh | 31 - third_party/zstd/tests/gzip/test-driver.sh | 150 - third_party/zstd/tests/gzip/trailing-nul.sh | 37 - third_party/zstd/tests/gzip/unpack-invalid.sh | 36 - third_party/zstd/tests/gzip/z-suffix.sh | 30 - third_party/zstd/tests/gzip/zdiff.sh | 48 - third_party/zstd/tests/gzip/zgrep-context.sh | 47 - third_party/zstd/tests/gzip/zgrep-f.sh | 43 - third_party/zstd/tests/gzip/zgrep-signal.sh | 64 - third_party/zstd/tests/gzip/znew-k.sh | 40 - third_party/zstd/tests/invalidDictionaries.c | 61 - third_party/zstd/tests/largeDictionary.c | 128 - third_party/zstd/tests/legacy.c | 260 - third_party/zstd/tests/libzstd_builds.sh | 104 - third_party/zstd/tests/longmatch.c | 102 - third_party/zstd/tests/loremOut.c | 50 - third_party/zstd/tests/loremOut.h | 15 - third_party/zstd/tests/paramgrill.c | 2965 -- third_party/zstd/tests/playTests.sh | 1925 -- third_party/zstd/tests/poolTests.c | 271 - third_party/zstd/tests/rateLimiter.py | 41 - third_party/zstd/tests/regression/.gitignore | 4 - third_party/zstd/tests/regression/Makefile | 60 - third_party/zstd/tests/regression/README.md | 28 - third_party/zstd/tests/regression/config.c | 404 - third_party/zstd/tests/regression/config.h | 91 - third_party/zstd/tests/regression/data.c | 631 - third_party/zstd/tests/regression/data.h | 121 - third_party/zstd/tests/regression/levels.h | 59 - third_party/zstd/tests/regression/method.c | 701 - third_party/zstd/tests/regression/method.h | 65 - third_party/zstd/tests/regression/result.c | 30 - third_party/zstd/tests/regression/result.h | 103 - third_party/zstd/tests/regression/results.csv | 1480 - third_party/zstd/tests/regression/test.c | 362 - third_party/zstd/tests/roundTripCrash.c | 241 - third_party/zstd/tests/seqgen.c | 260 - third_party/zstd/tests/seqgen.h | 58 - third_party/zstd/tests/test-license.py | 156 - third_party/zstd/tests/test-variants.sh | 115 - third_party/zstd/tests/test-zstd-versions.py | 308 - third_party/zstd/tests/zstreamtest.c | 3467 --- third_party/zstd/zlibWrapper/.gitignore | 28 - third_party/zstd/zlibWrapper/BUCK | 22 - third_party/zstd/zlibWrapper/Makefile | 120 - third_party/zstd/zlibWrapper/README.md | 163 - .../zstd/zlibWrapper/examples/example.c | 598 - .../zlibWrapper/examples/example_original.c | 599 - .../zstd/zlibWrapper/examples/fitblk.c | 254 - .../zlibWrapper/examples/fitblk_original.c | 233 - .../zstd/zlibWrapper/examples/minigzip.c | 605 - .../zstd/zlibWrapper/examples/zwrapbench.c | 1018 - third_party/zstd/zlibWrapper/gzclose.c | 26 - .../zstd/zlibWrapper/gzcompatibility.h | 68 - third_party/zstd/zlibWrapper/gzguts.h | 229 - third_party/zstd/zlibWrapper/gzlib.c | 587 - third_party/zstd/zlibWrapper/gzread.c | 637 - third_party/zstd/zlibWrapper/gzwrite.c | 632 - .../zstd/zlibWrapper/zstd_zlibwrapper.c | 1200 - .../zstd/zlibWrapper/zstd_zlibwrapper.h | 91 - vcpkg.json | 14 + 1981 files changed, 33 insertions(+), 581546 deletions(-) delete mode 100644 third_party/crc32c/.clang-format delete mode 100644 third_party/crc32c/.clang_complete delete mode 100644 third_party/crc32c/.github/workflows/build.yml delete mode 100644 third_party/crc32c/.gitignore delete mode 100644 third_party/crc32c/.gitmodules delete mode 100644 third_party/crc32c/.ycm_extra_conf.py delete mode 100644 third_party/crc32c/AUTHORS delete mode 100644 third_party/crc32c/CMakeLists.txt delete mode 100644 third_party/crc32c/CONTRIBUTING.md delete mode 100644 third_party/crc32c/Crc32cConfig.cmake.in delete mode 100644 third_party/crc32c/LICENSE delete mode 100644 third_party/crc32c/README.md delete mode 100644 third_party/crc32c/include/crc32c/crc32c.h delete mode 100644 third_party/crc32c/src/crc32c.cc delete mode 100644 third_party/crc32c/src/crc32c_arm64.cc delete mode 100644 third_party/crc32c/src/crc32c_arm64.h delete mode 100644 third_party/crc32c/src/crc32c_arm64_check.h delete mode 100644 third_party/crc32c/src/crc32c_arm64_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_benchmark.cc delete mode 100644 third_party/crc32c/src/crc32c_capi_unittest.c delete mode 100644 third_party/crc32c/src/crc32c_config.h.in delete mode 100644 third_party/crc32c/src/crc32c_extend_unittests.h delete mode 100644 third_party/crc32c/src/crc32c_internal.h delete mode 100644 third_party/crc32c/src/crc32c_portable.cc delete mode 100644 third_party/crc32c/src/crc32c_portable_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_prefetch.h delete mode 100644 third_party/crc32c/src/crc32c_prefetch_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_read_le.h delete mode 100644 third_party/crc32c/src/crc32c_read_le_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_round_up.h delete mode 100644 third_party/crc32c/src/crc32c_round_up_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_sse42.cc delete mode 100644 third_party/crc32c/src/crc32c_sse42.h delete mode 100644 third_party/crc32c/src/crc32c_sse42_check.h delete mode 100644 third_party/crc32c/src/crc32c_sse42_unittest.cc delete mode 100644 third_party/crc32c/src/crc32c_test_main.cc delete mode 100644 third_party/crc32c/src/crc32c_unittest.cc delete mode 100644 third_party/libtiff/CMakeLists.txt delete mode 100644 third_party/libtiff/ChangeLog delete mode 100644 third_party/libtiff/HOWTO-RELEASE delete mode 100644 third_party/libtiff/LICENSE.md delete mode 100644 third_party/libtiff/Makefile.am delete mode 100644 third_party/libtiff/Makefile.in delete mode 100644 third_party/libtiff/README.md delete mode 100644 third_party/libtiff/RELEASE-DATE delete mode 100644 third_party/libtiff/TODO delete mode 100644 third_party/libtiff/VERSION delete mode 100644 third_party/libtiff/aclocal.m4 delete mode 100644 third_party/libtiff/autogen.sh delete mode 100644 third_party/libtiff/build/CMakeLists.txt delete mode 100644 third_party/libtiff/build/Makefile.am delete mode 100644 third_party/libtiff/build/Makefile.in delete mode 100644 third_party/libtiff/build/README delete mode 100644 third_party/libtiff/cmake/AutotoolsCompat.cmake delete mode 100644 third_party/libtiff/cmake/AutotoolsVersion.cmake delete mode 100644 third_party/libtiff/cmake/CXXLibrary.cmake delete mode 100644 third_party/libtiff/cmake/CompilerChecks.cmake delete mode 100644 third_party/libtiff/cmake/DeflateCodec.cmake delete mode 100644 third_party/libtiff/cmake/FindCMath.cmake delete mode 100644 third_party/libtiff/cmake/FindDeflate.cmake delete mode 100644 third_party/libtiff/cmake/FindJBIG.cmake delete mode 100644 third_party/libtiff/cmake/FindJPEG.cmake delete mode 100644 third_party/libtiff/cmake/FindLERC.cmake delete mode 100644 third_party/libtiff/cmake/FindWebP.cmake delete mode 100644 third_party/libtiff/cmake/FindZSTD.cmake delete mode 100644 third_party/libtiff/cmake/Findliblzma.cmake delete mode 100644 third_party/libtiff/cmake/IncludeChecks.cmake delete mode 100644 third_party/libtiff/cmake/InternalCodecs.cmake delete mode 100644 third_party/libtiff/cmake/JBIGCodec.cmake delete mode 100644 third_party/libtiff/cmake/JPEGCodec.cmake delete mode 100644 third_party/libtiff/cmake/LERCCodec.cmake delete mode 100644 third_party/libtiff/cmake/LZMACodec.cmake delete mode 100644 third_party/libtiff/cmake/LargeFileSupport.cmake delete mode 100644 third_party/libtiff/cmake/LibraryFeatures.cmake delete mode 100644 third_party/libtiff/cmake/LinkerChecks.cmake delete mode 100644 third_party/libtiff/cmake/OpenGLChecks.cmake delete mode 100644 third_party/libtiff/cmake/PixarLogCodec.cmake delete mode 100644 third_party/libtiff/cmake/PkgConfig.cmake delete mode 100644 third_party/libtiff/cmake/ProcessorChecks.cmake delete mode 100644 third_party/libtiff/cmake/Release.cmake delete mode 100644 third_party/libtiff/cmake/ReleaseScript.cmake delete mode 100644 third_party/libtiff/cmake/Sphinx.cmake delete mode 100644 third_party/libtiff/cmake/SphinxCheckInternalLinks.cmake delete mode 100644 third_party/libtiff/cmake/SymbolChecks.cmake delete mode 100644 third_party/libtiff/cmake/TiffConfig.cmake.in delete mode 100644 third_party/libtiff/cmake/TypeSizeChecks.cmake delete mode 100644 third_party/libtiff/cmake/WebPCodec.cmake delete mode 100644 third_party/libtiff/cmake/WindowsSupport.cmake delete mode 100644 third_party/libtiff/cmake/ZSTDCodec.cmake delete mode 100644 third_party/libtiff/cmake/list-manpage-dependencies.py delete mode 100644 third_party/libtiff/cmake/list-manpages.py delete mode 100644 third_party/libtiff/config/compile delete mode 100644 third_party/libtiff/config/config.guess delete mode 100644 third_party/libtiff/config/config.h.in delete mode 100644 third_party/libtiff/config/config.sub delete mode 100644 third_party/libtiff/config/depcomp delete mode 100644 third_party/libtiff/config/install-sh delete mode 100644 third_party/libtiff/config/ltmain.sh delete mode 100644 third_party/libtiff/config/missing delete mode 100644 third_party/libtiff/config/test-driver delete mode 100644 third_party/libtiff/configure delete mode 100644 third_party/libtiff/configure.ac delete mode 100644 third_party/libtiff/contrib/CMakeLists.txt delete mode 100644 third_party/libtiff/contrib/Makefile.am delete mode 100644 third_party/libtiff/contrib/Makefile.in delete mode 100644 third_party/libtiff/contrib/README delete mode 100644 third_party/libtiff/contrib/addtiffo/CMakeLists.txt delete mode 100644 third_party/libtiff/contrib/addtiffo/Makefile.am delete mode 100644 third_party/libtiff/contrib/addtiffo/Makefile.in delete mode 100644 third_party/libtiff/contrib/addtiffo/README delete mode 100644 third_party/libtiff/contrib/addtiffo/addtiffo.c delete mode 100644 third_party/libtiff/contrib/addtiffo/tif_overview.c delete mode 100644 third_party/libtiff/contrib/addtiffo/tif_ovrcache.c delete mode 100644 third_party/libtiff/contrib/addtiffo/tif_ovrcache.h delete mode 100644 third_party/libtiff/contrib/dbs/CMakeLists.txt delete mode 100644 third_party/libtiff/contrib/dbs/Makefile.am delete mode 100644 third_party/libtiff/contrib/dbs/Makefile.in delete mode 100644 third_party/libtiff/contrib/dbs/README delete mode 100644 third_party/libtiff/contrib/dbs/tiff-bi.c delete mode 100644 third_party/libtiff/contrib/dbs/tiff-grayscale.c delete mode 100644 third_party/libtiff/contrib/dbs/tiff-palette.c delete mode 100644 third_party/libtiff/contrib/dbs/tiff-rgb.c delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/Makefile.am delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/Makefile.in delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/README delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/patchlevel.h delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/xtiff.c delete mode 100644 third_party/libtiff/contrib/dbs/xtiff/xtifficon.h delete mode 100644 third_party/libtiff/contrib/iptcutil/CMakeLists.txt delete mode 100644 third_party/libtiff/contrib/iptcutil/Makefile.am delete mode 100644 third_party/libtiff/contrib/iptcutil/Makefile.in delete mode 100644 third_party/libtiff/contrib/iptcutil/README delete mode 100644 third_party/libtiff/contrib/iptcutil/iptcutil.c delete mode 100644 third_party/libtiff/contrib/iptcutil/test.iptc delete mode 100644 third_party/libtiff/contrib/iptcutil/test.txt delete mode 100644 third_party/libtiff/contrib/mfs/Makefile.am delete mode 100644 third_party/libtiff/contrib/mfs/Makefile.in delete mode 100644 third_party/libtiff/contrib/mfs/README delete mode 100644 third_party/libtiff/contrib/mfs/mfs_file.c delete mode 100644 third_party/libtiff/contrib/pds/Makefile.am delete mode 100644 third_party/libtiff/contrib/pds/Makefile.in delete mode 100644 third_party/libtiff/contrib/pds/README delete mode 100644 third_party/libtiff/contrib/pds/tif_imageiter.c delete mode 100644 third_party/libtiff/contrib/pds/tif_imageiter.h delete mode 100644 third_party/libtiff/contrib/pds/tif_pdsdirread.c delete mode 100644 third_party/libtiff/contrib/pds/tif_pdsdirwrite.c delete mode 100644 third_party/libtiff/contrib/ras/Makefile.am delete mode 100644 third_party/libtiff/contrib/ras/Makefile.in delete mode 100644 third_party/libtiff/contrib/ras/README delete mode 100644 third_party/libtiff/contrib/ras/ras2tif.c delete mode 100644 third_party/libtiff/contrib/ras/tif2ras.c delete mode 100644 third_party/libtiff/contrib/stream/Makefile.am delete mode 100644 third_party/libtiff/contrib/stream/Makefile.in delete mode 100644 third_party/libtiff/contrib/stream/README delete mode 100644 third_party/libtiff/contrib/stream/tiffstream.cpp delete mode 100644 third_party/libtiff/contrib/stream/tiffstream.h delete mode 100644 third_party/libtiff/contrib/tags/Makefile.am delete mode 100644 third_party/libtiff/contrib/tags/Makefile.in delete mode 100644 third_party/libtiff/contrib/tags/README delete mode 100644 third_party/libtiff/contrib/tags/listtif.c delete mode 100644 third_party/libtiff/contrib/tags/maketif.c delete mode 100644 third_party/libtiff/contrib/tags/xtif_dir.c delete mode 100644 third_party/libtiff/contrib/tags/xtiffio.h delete mode 100644 third_party/libtiff/contrib/tags/xtiffiop.h delete mode 100644 third_party/libtiff/contrib/win_dib/Makefile.am delete mode 100644 third_party/libtiff/contrib/win_dib/Makefile.in delete mode 100644 third_party/libtiff/contrib/win_dib/Makefile.w95 delete mode 100644 third_party/libtiff/contrib/win_dib/README.Tiffile delete mode 100644 third_party/libtiff/contrib/win_dib/README.tiff2dib delete mode 100644 third_party/libtiff/contrib/win_dib/Tiffile.cpp delete mode 100644 third_party/libtiff/contrib/win_dib/tiff2dib.c delete mode 100644 third_party/libtiff/doc/CMakeLists.txt delete mode 100644 third_party/libtiff/doc/Makefile.am delete mode 100644 third_party/libtiff/doc/Makefile.in delete mode 100644 third_party/libtiff/doc/addingtags.rst delete mode 100644 third_party/libtiff/doc/build.rst delete mode 100644 third_party/libtiff/doc/conf.py delete mode 100644 third_party/libtiff/doc/contrib.rst delete mode 100644 third_party/libtiff/doc/functions.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFAccessTagMethods.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFClientInfo.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFClose.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFCreateDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFCustomDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFCustomTagList.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFDataWidth.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFDeferStrileArrayWriting.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFError.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldDataType.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldName.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldPassCount.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldQuery.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldReadCount.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldTag.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFieldWriteCount.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFFlush.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFGetField.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFMergeFieldInfo.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFOpen.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFOpenOptions.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFPrintDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFProcFunctions.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFRGBAImage.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadEncodedStrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadEncodedTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadFromUserBuffer.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadRGBAImage.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadRGBAStrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadRGBATile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadRawStrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadRawTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadScanline.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFReadTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFSetDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFSetField.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFSetTagExtender.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFStrileQuery.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWarning.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteDirectory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteEncodedStrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteEncodedTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteRawStrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteRawTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteScanline.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFWriteTile.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFbuffer.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFcodec.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFcolor.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFmemory.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFquery.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFsize.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFstrip.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFswab.rst delete mode 100644 third_party/libtiff/doc/functions/TIFFtile.rst delete mode 100644 third_party/libtiff/doc/functions/_TIFFRewriteField.rst delete mode 100644 third_party/libtiff/doc/functions/_TIFFauxiliary.rst delete mode 100644 third_party/libtiff/doc/functions/libtiff.rst delete mode 100644 third_party/libtiff/doc/html-prebuilt/.buildinfo delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/bali.jpg delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/cat.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/cover.jpg delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/cramps.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/dave.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/esri.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/jim.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/leica.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/quad.jpg delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/ring.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/safe.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/smallliz.jpg delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/strike.gif delete mode 100644 third_party/libtiff/doc/html-prebuilt/_images/weogeo.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/addingtags.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/build.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/contrib.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFAccessTagMethods.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClientInfo.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClose.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCreateDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomTagList.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDataWidth.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDeferStrileArrayWriting.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFError.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldDataType.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldName.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldPassCount.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldQuery.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldReadCount.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldTag.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldWriteCount.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFlush.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFGetField.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFMergeFieldInfo.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpen.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpenOptions.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFPrintDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFProcFunctions.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFRGBAImage.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedStrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadFromUserBuffer.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAImage.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAStrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBATile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawStrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadScanline.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetField.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetTagExtender.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFStrileQuery.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWarning.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteDirectory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedStrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawStrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteScanline.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteTile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFbuffer.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcodec.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcolor.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFmemory.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFquery.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFsize.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFstrip.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFswab.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFtile.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFRewriteField.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFauxiliary.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/functions/libtiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/images.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/index.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/internals.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/libtiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/multi_page.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/acknowledgements.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/bugs.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/index.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/license.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/mailinglist.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/project/psc.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/historical.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/index.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta007.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta016.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta018.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta024.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta028.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta029.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta031.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta032.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta033.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta034.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta035.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta036.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.3.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.4.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.5.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.6beta.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.7.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0alpha.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.3.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.4.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0beta.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.3.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.4.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.5.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.10.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.3.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4beta.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.5.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.6.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.7.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.8.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.9.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.1.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.2.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.3.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.4.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.6.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.0.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.1.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/rfcs/index.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc1_psc.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc2_restoring_needed_tools.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/specification/bigtiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage-bigtiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/specification/index.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/specification/technote2.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/terms.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2ps.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2tiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/pal2rgb.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/ppm2tiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/raw2tiff.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/rgb2ycbcr.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/thumbnail.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2bw.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2pdf.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2ps.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2rgba.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcmp.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcp.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcrop.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdither.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdump.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffgt.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffinfo.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffmedian.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffset.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffsplit.rst.txt delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/basic.css delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/contents.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/doctools.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/documentation_options.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/file.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/language_data.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/minus.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/navigation.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/plus.png delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/pygments.css delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/searchtools.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/sphinx_highlight.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/_static/sphinxdoc.css delete mode 100644 third_party/libtiff/doc/html-prebuilt/addingtags.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/build.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/contrib.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFAccessTagMethods.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFClientInfo.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFClose.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFCreateDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomTagList.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFDataWidth.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFDeferStrileArrayWriting.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFError.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldDataType.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldName.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldPassCount.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldQuery.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldReadCount.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldTag.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldWriteCount.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFFlush.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFGetField.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFMergeFieldInfo.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFOpen.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFOpenOptions.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFPrintDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFProcFunctions.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFRGBAImage.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedStrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadFromUserBuffer.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAImage.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAStrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBATile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawStrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadScanline.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFReadTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFSetDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFSetField.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFSetTagExtender.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFStrileQuery.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWarning.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteDirectory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedStrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawStrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteScanline.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteTile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFbuffer.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFcodec.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFcolor.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFmemory.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFquery.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFsize.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFstrip.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFswab.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/TIFFtile.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/_TIFFRewriteField.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/_TIFFauxiliary.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/functions/libtiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/genindex.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/images.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/index.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/internals.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/libtiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/multi_page.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/objects.inv delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/acknowledgements.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/bugs.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/index.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/license.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/mailinglist.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/project/psc.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/historical.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/index.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta007.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta016.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta018.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta024.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta028.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta029.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta031.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta032.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta033.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta034.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta035.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.4beta036.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.3.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.4.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.5.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.6beta.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.5.7.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.6.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.6.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.0alpha.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.3.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.7.4.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.8.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.8.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.8.2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.0beta.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.3.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.4.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v3.9.5.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.10.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.3.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.4.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.4beta.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.5.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.6.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.7.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.8.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.0.9.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.1.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.2.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.3.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.4.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.5.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.5.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.6.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.7.0.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/releases/v4.7.1.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/rfcs/index.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/rfcs/rfc1_psc.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/rfcs/rfc2_restoring_needed_tools.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/search.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/searchindex.js delete mode 100644 third_party/libtiff/doc/html-prebuilt/specification/bigtiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/specification/coverage-bigtiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/specification/coverage.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/specification/index.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/specification/technote2.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/terms.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/fax2ps.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/fax2tiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/pal2rgb.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/ppm2tiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/raw2tiff.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/rgb2ycbcr.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/thumbnail.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiff2bw.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiff2pdf.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiff2ps.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiff2rgba.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffcmp.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffcp.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffcrop.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffdither.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffdump.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffgt.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffinfo.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffmedian.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffset.html delete mode 100644 third_party/libtiff/doc/html-prebuilt/tools/tiffsplit.html delete mode 100644 third_party/libtiff/doc/images.rst delete mode 100644 third_party/libtiff/doc/images/back.gif delete mode 100644 third_party/libtiff/doc/images/bali.jpg delete mode 100644 third_party/libtiff/doc/images/cat.gif delete mode 100644 third_party/libtiff/doc/images/cover.jpg delete mode 100644 third_party/libtiff/doc/images/cramps.gif delete mode 100644 third_party/libtiff/doc/images/dave.gif delete mode 100644 third_party/libtiff/doc/images/info.gif delete mode 100644 third_party/libtiff/doc/images/jello.jpg delete mode 100644 third_party/libtiff/doc/images/jim.gif delete mode 100644 third_party/libtiff/doc/images/note.gif delete mode 100644 third_party/libtiff/doc/images/oxford.gif delete mode 100644 third_party/libtiff/doc/images/quad.jpg delete mode 100644 third_party/libtiff/doc/images/ring.gif delete mode 100644 third_party/libtiff/doc/images/smallliz.jpg delete mode 100644 third_party/libtiff/doc/images/strike.gif delete mode 100644 third_party/libtiff/doc/images/warning.gif delete mode 100644 third_party/libtiff/doc/index.rst delete mode 100644 third_party/libtiff/doc/internals.rst delete mode 100644 third_party/libtiff/doc/libtiff.rst delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFAccessTagMethods.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFClientInfo.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFClose.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFCreateDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFCustomDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFCustomTagList.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFDataWidth.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFDeferStrileArrayWriting.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFError.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldDataType.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldName.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldPassCount.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldQuery.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldReadCount.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldTag.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFieldWriteCount.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFFlush.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFGetField.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFMergeFieldInfo.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFOpen.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFPrintDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFProcFunctions.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFRGBAImage.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedStrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadFromUserBuffer.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAImage.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAStrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadRGBATile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadRawStrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadRawTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadScanline.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFReadTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFSetDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFSetField.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFSetTagExtender.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFStrileQuery.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWarning.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteDirectory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedStrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteRawStrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteRawTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteScanline.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFWriteTile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFbuffer.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFcodec.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFcolor.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFmemory.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFquery.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFsize.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFstrip.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFswab.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/TIFFtile.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/_TIFFRewriteField.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/_TIFFauxiliary.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/fax2ps.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/fax2tiff.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/libtiff.3tiff delete mode 100644 third_party/libtiff/doc/man-prebuilt/pal2rgb.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/ppm2tiff.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/raw2tiff.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/rgb2ycbcr.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/thumbnail.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiff2bw.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiff2pdf.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiff2ps.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiff2rgba.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffcmp.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffcp.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffcrop.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffdither.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffdump.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffgt.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffinfo.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffmedian.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffset.1 delete mode 100644 third_party/libtiff/doc/man-prebuilt/tiffsplit.1 delete mode 100644 third_party/libtiff/doc/multi_page.rst delete mode 100644 third_party/libtiff/doc/project/acknowledgements.rst delete mode 100644 third_party/libtiff/doc/project/bugs.rst delete mode 100644 third_party/libtiff/doc/project/index.rst delete mode 100644 third_party/libtiff/doc/project/license.rst delete mode 100644 third_party/libtiff/doc/project/mailinglist.rst delete mode 100644 third_party/libtiff/doc/project/psc.rst delete mode 100644 third_party/libtiff/doc/releases/historical.rst delete mode 100644 third_party/libtiff/doc/releases/index.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta007.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta016.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta018.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta024.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta028.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta029.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta031.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta032.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta033.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta034.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta035.rst delete mode 100644 third_party/libtiff/doc/releases/v3.4beta036.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.1.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.2.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.3.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.4.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.5.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.6beta.rst delete mode 100644 third_party/libtiff/doc/releases/v3.5.7.rst delete mode 100644 third_party/libtiff/doc/releases/v3.6.0.rst delete mode 100644 third_party/libtiff/doc/releases/v3.6.1.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.0.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.0alpha.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.0beta.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.0beta2.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.1.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.2.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.3.rst delete mode 100644 third_party/libtiff/doc/releases/v3.7.4.rst delete mode 100644 third_party/libtiff/doc/releases/v3.8.0.rst delete mode 100644 third_party/libtiff/doc/releases/v3.8.1.rst delete mode 100644 third_party/libtiff/doc/releases/v3.8.2.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.0.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.0beta.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.1.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.2.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.3.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.4.rst delete mode 100644 third_party/libtiff/doc/releases/v3.9.5.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.1.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.10.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.2.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.3.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.4.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.4beta.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.5.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.6.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.7.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.8.rst delete mode 100644 third_party/libtiff/doc/releases/v4.0.9.rst delete mode 100644 third_party/libtiff/doc/releases/v4.1.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.2.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.3.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.4.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.5.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.5.1.rst delete mode 100644 third_party/libtiff/doc/releases/v4.6.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.7.0.rst delete mode 100644 third_party/libtiff/doc/releases/v4.7.1.rst delete mode 100644 third_party/libtiff/doc/rfcs/index.rst delete mode 100644 third_party/libtiff/doc/rfcs/rfc1_psc.rst delete mode 100644 third_party/libtiff/doc/rfcs/rfc2_restoring_needed_tools.rst delete mode 100644 third_party/libtiff/doc/specification/bigtiff.rst delete mode 100644 third_party/libtiff/doc/specification/bigtiffpr_images/esri.png delete mode 100644 third_party/libtiff/doc/specification/bigtiffpr_images/leica.png delete mode 100644 third_party/libtiff/doc/specification/bigtiffpr_images/safe.png delete mode 100644 third_party/libtiff/doc/specification/bigtiffpr_images/weogeo.png delete mode 100644 third_party/libtiff/doc/specification/coverage-bigtiff.rst delete mode 100644 third_party/libtiff/doc/specification/coverage.rst delete mode 100644 third_party/libtiff/doc/specification/index.rst delete mode 100644 third_party/libtiff/doc/specification/technote2.rst delete mode 100644 third_party/libtiff/doc/terms.rst delete mode 100644 third_party/libtiff/doc/tools.rst delete mode 100644 third_party/libtiff/doc/tools/fax2ps.rst delete mode 100644 third_party/libtiff/doc/tools/fax2tiff.rst delete mode 100644 third_party/libtiff/doc/tools/pal2rgb.rst delete mode 100644 third_party/libtiff/doc/tools/ppm2tiff.rst delete mode 100644 third_party/libtiff/doc/tools/raw2tiff.rst delete mode 100644 third_party/libtiff/doc/tools/rgb2ycbcr.rst delete mode 100644 third_party/libtiff/doc/tools/thumbnail.rst delete mode 100644 third_party/libtiff/doc/tools/tiff2bw.rst delete mode 100644 third_party/libtiff/doc/tools/tiff2pdf.rst delete mode 100644 third_party/libtiff/doc/tools/tiff2ps.rst delete mode 100644 third_party/libtiff/doc/tools/tiff2rgba.rst delete mode 100644 third_party/libtiff/doc/tools/tiffcmp.rst delete mode 100644 third_party/libtiff/doc/tools/tiffcp.rst delete mode 100644 third_party/libtiff/doc/tools/tiffcrop.rst delete mode 100644 third_party/libtiff/doc/tools/tiffdither.rst delete mode 100644 third_party/libtiff/doc/tools/tiffdump.rst delete mode 100644 third_party/libtiff/doc/tools/tiffgt.rst delete mode 100644 third_party/libtiff/doc/tools/tiffinfo.rst delete mode 100644 third_party/libtiff/doc/tools/tiffmedian.rst delete mode 100644 third_party/libtiff/doc/tools/tiffset.rst delete mode 100644 third_party/libtiff/doc/tools/tiffsplit.rst delete mode 100644 third_party/libtiff/libtiff-4.pc.in delete mode 100644 third_party/libtiff/libtiff/CMakeLists.txt delete mode 100644 third_party/libtiff/libtiff/Makefile.am delete mode 100644 third_party/libtiff/libtiff/Makefile.in delete mode 100644 third_party/libtiff/libtiff/libtiff.def delete mode 100644 third_party/libtiff/libtiff/libtiff.map delete mode 100644 third_party/libtiff/libtiff/libtiffxx.map delete mode 100644 third_party/libtiff/libtiff/t4.h delete mode 100644 third_party/libtiff/libtiff/tif_aux.c delete mode 100644 third_party/libtiff/libtiff/tif_close.c delete mode 100644 third_party/libtiff/libtiff/tif_codec.c delete mode 100644 third_party/libtiff/libtiff/tif_color.c delete mode 100644 third_party/libtiff/libtiff/tif_compress.c delete mode 100644 third_party/libtiff/libtiff/tif_config.h.cmake.in delete mode 100644 third_party/libtiff/libtiff/tif_config.h.in delete mode 100644 third_party/libtiff/libtiff/tif_dir.c delete mode 100644 third_party/libtiff/libtiff/tif_dir.h delete mode 100644 third_party/libtiff/libtiff/tif_dirinfo.c delete mode 100644 third_party/libtiff/libtiff/tif_dirread.c delete mode 100644 third_party/libtiff/libtiff/tif_dirwrite.c delete mode 100644 third_party/libtiff/libtiff/tif_dumpmode.c delete mode 100644 third_party/libtiff/libtiff/tif_error.c delete mode 100644 third_party/libtiff/libtiff/tif_extension.c delete mode 100644 third_party/libtiff/libtiff/tif_fax3.c delete mode 100644 third_party/libtiff/libtiff/tif_fax3.h delete mode 100644 third_party/libtiff/libtiff/tif_fax3sm.c delete mode 100644 third_party/libtiff/libtiff/tif_flush.c delete mode 100644 third_party/libtiff/libtiff/tif_getimage.c delete mode 100644 third_party/libtiff/libtiff/tif_hash_set.c delete mode 100644 third_party/libtiff/libtiff/tif_hash_set.h delete mode 100644 third_party/libtiff/libtiff/tif_jbig.c delete mode 100644 third_party/libtiff/libtiff/tif_jpeg.c delete mode 100644 third_party/libtiff/libtiff/tif_jpeg_12.c delete mode 100644 third_party/libtiff/libtiff/tif_lerc.c delete mode 100644 third_party/libtiff/libtiff/tif_luv.c delete mode 100644 third_party/libtiff/libtiff/tif_lzma.c delete mode 100644 third_party/libtiff/libtiff/tif_lzw.c delete mode 100644 third_party/libtiff/libtiff/tif_next.c delete mode 100644 third_party/libtiff/libtiff/tif_ojpeg.c delete mode 100644 third_party/libtiff/libtiff/tif_open.c delete mode 100644 third_party/libtiff/libtiff/tif_packbits.c delete mode 100644 third_party/libtiff/libtiff/tif_pixarlog.c delete mode 100644 third_party/libtiff/libtiff/tif_predict.c delete mode 100644 third_party/libtiff/libtiff/tif_predict.h delete mode 100644 third_party/libtiff/libtiff/tif_print.c delete mode 100644 third_party/libtiff/libtiff/tif_read.c delete mode 100644 third_party/libtiff/libtiff/tif_stream.cxx delete mode 100644 third_party/libtiff/libtiff/tif_strip.c delete mode 100644 third_party/libtiff/libtiff/tif_swab.c delete mode 100644 third_party/libtiff/libtiff/tif_thunder.c delete mode 100644 third_party/libtiff/libtiff/tif_tile.c delete mode 100644 third_party/libtiff/libtiff/tif_unix.c delete mode 100644 third_party/libtiff/libtiff/tif_version.c delete mode 100644 third_party/libtiff/libtiff/tif_warning.c delete mode 100644 third_party/libtiff/libtiff/tif_webp.c delete mode 100644 third_party/libtiff/libtiff/tif_win32.c delete mode 100644 third_party/libtiff/libtiff/tif_win32_versioninfo.rc delete mode 100644 third_party/libtiff/libtiff/tif_write.c delete mode 100644 third_party/libtiff/libtiff/tif_zip.c delete mode 100644 third_party/libtiff/libtiff/tif_zstd.c delete mode 100644 third_party/libtiff/libtiff/tiff.h delete mode 100644 third_party/libtiff/libtiff/tiffconf.h.cmake.in delete mode 100644 third_party/libtiff/libtiff/tiffconf.h.in delete mode 100644 third_party/libtiff/libtiff/tiffio.h delete mode 100644 third_party/libtiff/libtiff/tiffio.hxx delete mode 100644 third_party/libtiff/libtiff/tiffiop.h delete mode 100644 third_party/libtiff/libtiff/tiffvers.h delete mode 100644 third_party/libtiff/libtiff/tiffvers.h.cmake.in delete mode 100644 third_party/libtiff/libtiff/tiffvers.h.in delete mode 100644 third_party/libtiff/libtiff/uvcode.h delete mode 100644 third_party/libtiff/m4/acinclude.m4 delete mode 100644 third_party/libtiff/m4/libtool.m4 delete mode 100644 third_party/libtiff/m4/ltoptions.m4 delete mode 100644 third_party/libtiff/m4/ltsugar.m4 delete mode 100644 third_party/libtiff/m4/ltversion.m4 delete mode 100644 third_party/libtiff/m4/lt~obsolete.m4 delete mode 100644 third_party/libtiff/placeholder.h delete mode 100644 third_party/libtiff/port/CMakeLists.txt delete mode 100644 third_party/libtiff/port/Makefile.am delete mode 100644 third_party/libtiff/port/Makefile.in delete mode 100644 third_party/libtiff/port/dummy.c delete mode 100644 third_party/libtiff/port/getopt.c delete mode 100644 third_party/libtiff/port/libport.h delete mode 100644 third_party/libtiff/port/libport_config.h.cmake.in delete mode 100644 third_party/libtiff/port/libport_config.h.in delete mode 100644 third_party/libtiff/test/CMakeLists.txt delete mode 100644 third_party/libtiff/test/Makefile.am delete mode 100644 third_party/libtiff/test/Makefile.in delete mode 100644 third_party/libtiff/test/TiffSplitTest.cmake delete mode 100644 third_party/libtiff/test/TiffTest.cmake delete mode 100644 third_party/libtiff/test/TiffTestCommon.cmake delete mode 100644 third_party/libtiff/test/ascii_tag.c delete mode 100644 third_party/libtiff/test/check_tag.c delete mode 100644 third_party/libtiff/test/common.sh delete mode 100644 third_party/libtiff/test/custom_dir.c delete mode 100644 third_party/libtiff/test/custom_dir_EXIF_231.c delete mode 100644 third_party/libtiff/test/defer_strile_loading.c delete mode 100644 third_party/libtiff/test/defer_strile_writing.c delete mode 100644 third_party/libtiff/test/fax2tiff.sh delete mode 100644 third_party/libtiff/test/images/32bpp-None-jpeg.tiff delete mode 100644 third_party/libtiff/test/images/32bpp-None.tiff delete mode 100644 third_party/libtiff/test/images/README.txt delete mode 100644 third_party/libtiff/test/images/custom_dir_EXIF_GPS.tiff delete mode 100644 third_party/libtiff/test/images/deflate-last-strip-extra-data.tiff delete mode 100644 third_party/libtiff/test/images/logluv-3c-16b.tiff delete mode 100644 third_party/libtiff/test/images/lzw-single-strip.tiff delete mode 100644 third_party/libtiff/test/images/minisblack-1c-16b.tiff delete mode 100644 third_party/libtiff/test/images/minisblack-1c-8b.pgm delete mode 100644 third_party/libtiff/test/images/minisblack-1c-8b.tiff delete mode 100644 third_party/libtiff/test/images/minisblack-2c-8b-alpha.tiff delete mode 100644 third_party/libtiff/test/images/miniswhite-1c-1b.g3 delete mode 100644 third_party/libtiff/test/images/miniswhite-1c-1b.pbm delete mode 100644 third_party/libtiff/test/images/miniswhite-1c-1b.tiff delete mode 100644 third_party/libtiff/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff delete mode 100644 third_party/libtiff/test/images/ojpeg_single_strip_no_rowsperstrip.tiff delete mode 100644 third_party/libtiff/test/images/ojpeg_zackthecat_subsamp22_single_strip.tiff delete mode 100644 third_party/libtiff/test/images/palette-1c-1b.tiff delete mode 100644 third_party/libtiff/test/images/palette-1c-4b.tiff delete mode 100644 third_party/libtiff/test/images/palette-1c-8b.tiff delete mode 100644 third_party/libtiff/test/images/quad-lzw-compat.tiff delete mode 100644 third_party/libtiff/test/images/quad-tile.jpg.tiff delete mode 100644 third_party/libtiff/test/images/rgb-3c-16b.ppm delete mode 100644 third_party/libtiff/test/images/rgb-3c-16b.tiff delete mode 100644 third_party/libtiff/test/images/rgb-3c-8b.ppm delete mode 100644 third_party/libtiff/test/images/rgb-3c-8b.tiff delete mode 100644 third_party/libtiff/test/images/test_float64_predictor2_be_lzw.tif delete mode 100644 third_party/libtiff/test/images/test_float64_predictor2_le_lzw.tif delete mode 100644 third_party/libtiff/test/images/test_ifd_loop_subifd.tif delete mode 100644 third_party/libtiff/test/images/test_ifd_loop_to_first.tif delete mode 100644 third_party/libtiff/test/images/test_ifd_loop_to_self.tif delete mode 100644 third_party/libtiff/test/images/test_two_ifds.tif delete mode 100644 third_party/libtiff/test/images/testfax3_bug54_1dnoEOL.tif delete mode 100644 third_party/libtiff/test/images/testfax3_bug_513.tiff delete mode 100644 third_party/libtiff/test/images/testfax4.tiff delete mode 100644 third_party/libtiff/test/images/tiff_with_subifd_chain.tif delete mode 100644 third_party/libtiff/test/images/webp_lossless_rgba_alpha_fully_opaque.tif delete mode 100644 third_party/libtiff/test/long_tag.c delete mode 100644 third_party/libtiff/test/ppm2tiff_pbm.sh delete mode 100644 third_party/libtiff/test/ppm2tiff_pgm.sh delete mode 100644 third_party/libtiff/test/ppm2tiff_ppm.sh delete mode 100644 third_party/libtiff/test/rational_precision2double.c delete mode 100644 third_party/libtiff/test/raw_decode.c delete mode 100644 third_party/libtiff/test/refs/o-deflate-last-strip-extra-data.tiff delete mode 100644 third_party/libtiff/test/refs/o-testfax3_bug54_1dnoEOL.tiff delete mode 100644 third_party/libtiff/test/refs/o-testfax3_bug_513.tiff delete mode 100644 third_party/libtiff/test/refs/o-testfax4.tiff delete mode 100644 third_party/libtiff/test/refs/o-tiff2ps-EPS1.ps delete mode 100644 third_party/libtiff/test/refs/o-tiff2ps-PS1.ps delete mode 100644 third_party/libtiff/test/refs/o-tiff2ps-PS2.ps delete mode 100644 third_party/libtiff/test/refs/o-tiff2ps-PS3.ps delete mode 100644 third_party/libtiff/test/rewrite_tag.c delete mode 100644 third_party/libtiff/test/short_tag.c delete mode 100644 third_party/libtiff/test/strip.c delete mode 100644 third_party/libtiff/test/strip_rw.c delete mode 100644 third_party/libtiff/test/test_IFD_enlargement.c delete mode 100644 third_party/libtiff/test/test_RGBAImage.c delete mode 100644 third_party/libtiff/test/test_append_to_strip.c delete mode 100644 third_party/libtiff/test/test_arrays.c delete mode 100644 third_party/libtiff/test/test_arrays.h delete mode 100644 third_party/libtiff/test/test_directory.c delete mode 100644 third_party/libtiff/test/test_ifd_loop_detection.c delete mode 100644 third_party/libtiff/test/test_open_options.c delete mode 100644 third_party/libtiff/test/test_signed_tags.c delete mode 100644 third_party/libtiff/test/test_transferfunction_write_read.c delete mode 100644 third_party/libtiff/test/test_write_read_tags.c delete mode 100644 third_party/libtiff/test/testdeflatelaststripextradata.sh delete mode 100644 third_party/libtiff/test/testfax3_bug54_1dnoEOL.sh delete mode 100644 third_party/libtiff/test/testfax3_bug_513.sh delete mode 100644 third_party/libtiff/test/testfax4.sh delete mode 100644 third_party/libtiff/test/testtypes.c delete mode 100644 third_party/libtiff/test/tiff2bw-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiff2bw-quad-lzw-compat.sh delete mode 100644 third_party/libtiff/test/tiff2bw-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiff2pdf.sh delete mode 100644 third_party/libtiff/test/tiff2ps-EPS1.sh delete mode 100644 third_party/libtiff/test/tiff2ps-PS1.sh delete mode 100644 third_party/libtiff/test/tiff2ps-PS2.sh delete mode 100644 third_party/libtiff/test/tiff2ps-PS3.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-32bpp-None-jpeg.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-logluv-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-minisblack-1c-16b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-minisblack-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-palette-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-palette-1c-4b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-quad-tile.jpg.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-rgb-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiff2rgba-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcp-32bpp-None-jpeg.sh delete mode 100644 third_party/libtiff/test/tiffcp-g3-1d-fill.sh delete mode 100644 third_party/libtiff/test/tiffcp-g3-1d.sh delete mode 100644 third_party/libtiff/test/tiffcp-g3-2d-fill.sh delete mode 100644 third_party/libtiff/test/tiffcp-g3-2d.sh delete mode 100644 third_party/libtiff/test/tiffcp-g3.sh delete mode 100644 third_party/libtiff/test/tiffcp-g4.sh delete mode 100644 third_party/libtiff/test/tiffcp-logluv.sh delete mode 100644 third_party/libtiff/test/tiffcp-lzw-compat.sh delete mode 100644 third_party/libtiff/test/tiffcp-lzw-scanline-decode.sh delete mode 100644 third_party/libtiff/test/tiffcp-lzw-single-strip-jbig.sh delete mode 100644 third_party/libtiff/test/tiffcp-split-join.sh delete mode 100644 third_party/libtiff/test/tiffcp-split.sh delete mode 100644 third_party/libtiff/test/tiffcp-thumbnail.sh delete mode 100644 third_party/libtiff/test/tiffcrop-32bpp-None-jpeg.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-palette-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-palette-1c-4b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-palette-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-palette-1c-4b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh delete mode 100644 third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh delete mode 100644 third_party/libtiff/test/tiffdump.sh delete mode 100644 third_party/libtiff/test/tiffinfo.sh delete mode 100644 third_party/libtiff/test/tifftest.h delete mode 100644 third_party/libtiff/tools/CMakeLists.txt delete mode 100644 third_party/libtiff/tools/Makefile.am delete mode 100644 third_party/libtiff/tools/Makefile.in delete mode 100644 third_party/libtiff/tools/fax2ps.c delete mode 100644 third_party/libtiff/tools/fax2tiff.c delete mode 100644 third_party/libtiff/tools/mkg3states.c delete mode 100644 third_party/libtiff/tools/pal2rgb.c delete mode 100644 third_party/libtiff/tools/ppm2tiff.c delete mode 100644 third_party/libtiff/tools/raw2tiff.c delete mode 100644 third_party/libtiff/tools/rgb2ycbcr.c delete mode 100644 third_party/libtiff/tools/thumbnail.c delete mode 100644 third_party/libtiff/tools/tif_tools_versioninfo.rc delete mode 100644 third_party/libtiff/tools/tiff2bw.c delete mode 100644 third_party/libtiff/tools/tiff2pdf.c delete mode 100644 third_party/libtiff/tools/tiff2ps.c delete mode 100644 third_party/libtiff/tools/tiff2rgba.c delete mode 100644 third_party/libtiff/tools/tiffcmp.c delete mode 100644 third_party/libtiff/tools/tiffcp.c delete mode 100644 third_party/libtiff/tools/tiffcrop.c delete mode 100644 third_party/libtiff/tools/tiffdither.c delete mode 100644 third_party/libtiff/tools/tiffdump.c delete mode 100644 third_party/libtiff/tools/tiffgt.c delete mode 100644 third_party/libtiff/tools/tiffinfo.c delete mode 100644 third_party/libtiff/tools/tiffmedian.c delete mode 100644 third_party/libtiff/tools/tiffset.c delete mode 100644 third_party/libtiff/tools/tiffsplit.c delete mode 100644 third_party/zlib/CMakeLists.txt delete mode 100644 third_party/zlib/ChangeLog delete mode 100644 third_party/zlib/FAQ delete mode 100644 third_party/zlib/INDEX delete mode 100644 third_party/zlib/LICENSE delete mode 100644 third_party/zlib/Makefile delete mode 100644 third_party/zlib/Makefile.in delete mode 100644 third_party/zlib/README delete mode 100644 third_party/zlib/adler32.c delete mode 100644 third_party/zlib/amiga/Makefile.pup delete mode 100644 third_party/zlib/amiga/Makefile.sas delete mode 100644 third_party/zlib/compress.c delete mode 100644 third_party/zlib/configure delete mode 100644 third_party/zlib/contrib/README.contrib delete mode 100644 third_party/zlib/contrib/ada/buffer_demo.adb delete mode 100644 third_party/zlib/contrib/ada/mtest.adb delete mode 100644 third_party/zlib/contrib/ada/read.adb delete mode 100644 third_party/zlib/contrib/ada/readme.txt delete mode 100644 third_party/zlib/contrib/ada/test.adb delete mode 100644 third_party/zlib/contrib/ada/zlib-streams.adb delete mode 100644 third_party/zlib/contrib/ada/zlib-streams.ads delete mode 100644 third_party/zlib/contrib/ada/zlib-thin.adb delete mode 100644 third_party/zlib/contrib/ada/zlib-thin.ads delete mode 100644 third_party/zlib/contrib/ada/zlib.adb delete mode 100644 third_party/zlib/contrib/ada/zlib.ads delete mode 100644 third_party/zlib/contrib/ada/zlib.gpr delete mode 100644 third_party/zlib/contrib/blast/Makefile delete mode 100644 third_party/zlib/contrib/blast/README delete mode 100644 third_party/zlib/contrib/blast/blast.c delete mode 100644 third_party/zlib/contrib/blast/blast.h delete mode 100644 third_party/zlib/contrib/blast/test.pk delete mode 100644 third_party/zlib/contrib/blast/test.txt delete mode 100644 third_party/zlib/contrib/delphi/ZLib.pas delete mode 100644 third_party/zlib/contrib/delphi/ZLibConst.pas delete mode 100644 third_party/zlib/contrib/delphi/readme.txt delete mode 100644 third_party/zlib/contrib/delphi/zlibd32.mak delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib.build delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib.chm delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib.sln delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/Deflater.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/Inflater.cs delete mode 100644 third_party/zlib/contrib/dotzlib/DotZLib/UnitTests.cs delete mode 100644 third_party/zlib/contrib/dotzlib/LICENSE_1_0.txt delete mode 100644 third_party/zlib/contrib/dotzlib/readme.txt delete mode 100644 third_party/zlib/contrib/gcc_gvmat64/gvmat64.S delete mode 100644 third_party/zlib/contrib/infback9/README delete mode 100644 third_party/zlib/contrib/infback9/infback9.c delete mode 100644 third_party/zlib/contrib/infback9/infback9.h delete mode 100644 third_party/zlib/contrib/infback9/inffix9.h delete mode 100644 third_party/zlib/contrib/infback9/inflate9.h delete mode 100644 third_party/zlib/contrib/infback9/inftree9.c delete mode 100644 third_party/zlib/contrib/infback9/inftree9.h delete mode 100644 third_party/zlib/contrib/iostream/test.cpp delete mode 100644 third_party/zlib/contrib/iostream/zfstream.cpp delete mode 100644 third_party/zlib/contrib/iostream/zfstream.h delete mode 100644 third_party/zlib/contrib/iostream2/zstream.h delete mode 100644 third_party/zlib/contrib/iostream2/zstream_test.cpp delete mode 100644 third_party/zlib/contrib/iostream3/README delete mode 100644 third_party/zlib/contrib/iostream3/TODO delete mode 100644 third_party/zlib/contrib/iostream3/test.cc delete mode 100644 third_party/zlib/contrib/iostream3/zfstream.cc delete mode 100644 third_party/zlib/contrib/iostream3/zfstream.h delete mode 100644 third_party/zlib/contrib/minizip/Makefile delete mode 100644 third_party/zlib/contrib/minizip/Makefile.am delete mode 100644 third_party/zlib/contrib/minizip/MiniZip64_Changes.txt delete mode 100644 third_party/zlib/contrib/minizip/MiniZip64_info.txt delete mode 100644 third_party/zlib/contrib/minizip/configure.ac delete mode 100644 third_party/zlib/contrib/minizip/crypt.h delete mode 100644 third_party/zlib/contrib/minizip/ioapi.c delete mode 100644 third_party/zlib/contrib/minizip/ioapi.h delete mode 100644 third_party/zlib/contrib/minizip/iowin32.c delete mode 100644 third_party/zlib/contrib/minizip/iowin32.h delete mode 100644 third_party/zlib/contrib/minizip/make_vms.com delete mode 100644 third_party/zlib/contrib/minizip/miniunz.c delete mode 100644 third_party/zlib/contrib/minizip/miniunzip.1 delete mode 100644 third_party/zlib/contrib/minizip/minizip.1 delete mode 100644 third_party/zlib/contrib/minizip/minizip.c delete mode 100644 third_party/zlib/contrib/minizip/minizip.pc.in delete mode 100644 third_party/zlib/contrib/minizip/mztools.c delete mode 100644 third_party/zlib/contrib/minizip/mztools.h delete mode 100644 third_party/zlib/contrib/minizip/unzip.c delete mode 100644 third_party/zlib/contrib/minizip/unzip.h delete mode 100644 third_party/zlib/contrib/minizip/zip.c delete mode 100644 third_party/zlib/contrib/minizip/zip.h delete mode 100644 third_party/zlib/contrib/nuget/nuget.csproj delete mode 100644 third_party/zlib/contrib/nuget/nuget.sln delete mode 100644 third_party/zlib/contrib/pascal/example.pas delete mode 100644 third_party/zlib/contrib/pascal/readme.txt delete mode 100644 third_party/zlib/contrib/pascal/zlibd32.mak delete mode 100644 third_party/zlib/contrib/pascal/zlibpas.pas delete mode 100644 third_party/zlib/contrib/puff/Makefile delete mode 100644 third_party/zlib/contrib/puff/README delete mode 100644 third_party/zlib/contrib/puff/puff.c delete mode 100644 third_party/zlib/contrib/puff/puff.h delete mode 100644 third_party/zlib/contrib/puff/pufftest.c delete mode 100644 third_party/zlib/contrib/puff/zeros.raw delete mode 100644 third_party/zlib/contrib/testzlib/testzlib.c delete mode 100644 third_party/zlib/contrib/testzlib/testzlib.txt delete mode 100644 third_party/zlib/contrib/untgz/Makefile delete mode 100644 third_party/zlib/contrib/untgz/Makefile.msc delete mode 100644 third_party/zlib/contrib/untgz/untgz.c delete mode 100644 third_party/zlib/contrib/vstudio/readme.txt delete mode 100644 third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters delete mode 100644 third_party/zlib/contrib/vstudio/vc11/miniunz.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc11/minizip.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc11/testzlib.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc11/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc11/zlibstat.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc11/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc11/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc11/zlibvc.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/miniunz.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/minizip.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/testzlib.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc12/zlibstat.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc12/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc12/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc12/zlibvc.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/miniunz.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/minizip.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/testzlib.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc14/zlibstat.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc14/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc14/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc14/zlibvc.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/miniunz.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/minizip.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/testzlib.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc17/zlibstat.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc17/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc17/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc17/zlibvc.vcxproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/miniunz.vcproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/minizip.vcproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/testzlib.vcproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/testzlibdll.vcproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/zlib.rc delete mode 100644 third_party/zlib/contrib/vstudio/vc9/zlibstat.vcproj delete mode 100644 third_party/zlib/contrib/vstudio/vc9/zlibvc.def delete mode 100644 third_party/zlib/contrib/vstudio/vc9/zlibvc.sln delete mode 100644 third_party/zlib/contrib/vstudio/vc9/zlibvc.vcproj delete mode 100644 third_party/zlib/crc32.c delete mode 100644 third_party/zlib/crc32.h delete mode 100644 third_party/zlib/deflate.c delete mode 100644 third_party/zlib/deflate.h delete mode 100644 third_party/zlib/doc/algorithm.txt delete mode 100644 third_party/zlib/doc/crc-doc.1.0.pdf delete mode 100644 third_party/zlib/doc/rfc1950.txt delete mode 100644 third_party/zlib/doc/rfc1951.txt delete mode 100644 third_party/zlib/doc/rfc1952.txt delete mode 100644 third_party/zlib/doc/txtvsbin.txt delete mode 100644 third_party/zlib/examples/README.examples delete mode 100644 third_party/zlib/examples/enough.c delete mode 100644 third_party/zlib/examples/fitblk.c delete mode 100644 third_party/zlib/examples/gun.c delete mode 100644 third_party/zlib/examples/gzappend.c delete mode 100644 third_party/zlib/examples/gzjoin.c delete mode 100644 third_party/zlib/examples/gzlog.c delete mode 100644 third_party/zlib/examples/gzlog.h delete mode 100644 third_party/zlib/examples/gznorm.c delete mode 100644 third_party/zlib/examples/zlib_how.html delete mode 100644 third_party/zlib/examples/zpipe.c delete mode 100644 third_party/zlib/examples/zran.c delete mode 100644 third_party/zlib/examples/zran.h delete mode 100644 third_party/zlib/gzclose.c delete mode 100644 third_party/zlib/gzguts.h delete mode 100644 third_party/zlib/gzlib.c delete mode 100644 third_party/zlib/gzread.c delete mode 100644 third_party/zlib/gzwrite.c delete mode 100644 third_party/zlib/infback.c delete mode 100644 third_party/zlib/inffast.c delete mode 100644 third_party/zlib/inffast.h delete mode 100644 third_party/zlib/inffixed.h delete mode 100644 third_party/zlib/inflate.c delete mode 100644 third_party/zlib/inflate.h delete mode 100644 third_party/zlib/inftrees.c delete mode 100644 third_party/zlib/inftrees.h delete mode 100644 third_party/zlib/make_vms.com delete mode 100644 third_party/zlib/msdos/Makefile.bor delete mode 100644 third_party/zlib/msdos/Makefile.dj2 delete mode 100644 third_party/zlib/msdos/Makefile.emx delete mode 100644 third_party/zlib/msdos/Makefile.msc delete mode 100644 third_party/zlib/msdos/Makefile.tc delete mode 100644 third_party/zlib/nintendods/Makefile delete mode 100644 third_party/zlib/nintendods/README delete mode 100644 third_party/zlib/old/Makefile.emx delete mode 100644 third_party/zlib/old/Makefile.riscos delete mode 100644 third_party/zlib/old/README delete mode 100644 third_party/zlib/old/descrip.mms delete mode 100644 third_party/zlib/old/os2/Makefile.os2 delete mode 100644 third_party/zlib/old/os2/zlib.def delete mode 100644 third_party/zlib/old/visual-basic.txt delete mode 100644 third_party/zlib/os400/README400 delete mode 100644 third_party/zlib/os400/bndsrc delete mode 100644 third_party/zlib/os400/make.sh delete mode 100644 third_party/zlib/os400/zlib.inc delete mode 100644 third_party/zlib/qnx/package.qpg delete mode 100644 third_party/zlib/test/example.c delete mode 100644 third_party/zlib/test/infcover.c delete mode 100644 third_party/zlib/test/minigzip.c delete mode 100644 third_party/zlib/treebuild.xml delete mode 100644 third_party/zlib/trees.c delete mode 100644 third_party/zlib/trees.h delete mode 100644 third_party/zlib/uncompr.c delete mode 100644 third_party/zlib/watcom/watcom_f.mak delete mode 100644 third_party/zlib/watcom/watcom_l.mak delete mode 100644 third_party/zlib/win32/DLL_FAQ.txt delete mode 100644 third_party/zlib/win32/Makefile.bor delete mode 100644 third_party/zlib/win32/Makefile.gcc delete mode 100644 third_party/zlib/win32/Makefile.msc delete mode 100644 third_party/zlib/win32/README-WIN32.txt delete mode 100644 third_party/zlib/win32/VisualC.txt delete mode 100644 third_party/zlib/win32/zlib.def delete mode 100644 third_party/zlib/win32/zlib1.rc delete mode 100644 third_party/zlib/zconf.h.cmakein delete mode 100644 third_party/zlib/zconf.h.in delete mode 100644 third_party/zlib/zconf.h.included delete mode 100644 third_party/zlib/zlib.3 delete mode 100644 third_party/zlib/zlib.3.pdf delete mode 100644 third_party/zlib/zlib.h delete mode 100644 third_party/zlib/zlib.map delete mode 100644 third_party/zlib/zlib.pc.cmakein delete mode 100644 third_party/zlib/zlib.pc.in delete mode 100644 third_party/zlib/zutil.c delete mode 100644 third_party/zlib/zutil.h delete mode 100644 third_party/zstd/.buckconfig delete mode 100644 third_party/zstd/.buckversion delete mode 100644 third_party/zstd/.cirrus.yml delete mode 100644 third_party/zstd/.gitattributes delete mode 100644 third_party/zstd/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 third_party/zstd/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 third_party/zstd/.github/dependabot.yml delete mode 100644 third_party/zstd/.github/workflows/android-ndk-build.yml delete mode 100644 third_party/zstd/.github/workflows/commit.yml delete mode 100644 third_party/zstd/.github/workflows/dev-long-tests.yml delete mode 100644 third_party/zstd/.github/workflows/dev-short-tests.yml delete mode 100644 third_party/zstd/.github/workflows/nightly.yml delete mode 100644 third_party/zstd/.github/workflows/publish-release-artifacts.yml delete mode 100644 third_party/zstd/.github/workflows/scorecards.yml delete mode 100644 third_party/zstd/.github/workflows/windows-artifacts.yml delete mode 100644 third_party/zstd/.gitignore delete mode 100644 third_party/zstd/CHANGELOG delete mode 100644 third_party/zstd/CODE_OF_CONDUCT.md delete mode 100644 third_party/zstd/CONTRIBUTING.md delete mode 100644 third_party/zstd/COPYING delete mode 100644 third_party/zstd/LICENSE delete mode 100644 third_party/zstd/Makefile delete mode 100644 third_party/zstd/Package.swift delete mode 100644 third_party/zstd/README.md delete mode 100644 third_party/zstd/SECURITY.md delete mode 100644 third_party/zstd/TESTING.md delete mode 100644 third_party/zstd/build/.gitignore delete mode 100644 third_party/zstd/build/LICENSE delete mode 100644 third_party/zstd/build/README.md delete mode 100644 third_party/zstd/build/VS2008/fullbench/fullbench.vcproj delete mode 100644 third_party/zstd/build/VS2008/fuzzer/fuzzer.vcproj delete mode 100644 third_party/zstd/build/VS2008/zstd.sln delete mode 100644 third_party/zstd/build/VS2008/zstd/zstd.vcproj delete mode 100644 third_party/zstd/build/VS2008/zstdlib/zstdlib.vcproj delete mode 100644 third_party/zstd/build/VS2010/CompileAsCpp.props delete mode 100644 third_party/zstd/build/VS2010/datagen/datagen.vcxproj delete mode 100644 third_party/zstd/build/VS2010/fullbench/fullbench.vcxproj delete mode 100644 third_party/zstd/build/VS2010/fuzzer/fuzzer.vcxproj delete mode 100644 third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc delete mode 100644 third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj delete mode 100644 third_party/zstd/build/VS2010/libzstd/libzstd.vcxproj delete mode 100644 third_party/zstd/build/VS2010/zstd.sln delete mode 100644 third_party/zstd/build/VS2010/zstd/zstd.rc delete mode 100644 third_party/zstd/build/VS2010/zstd/zstd.vcxproj delete mode 100644 third_party/zstd/build/VS_scripts/README.md delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2010.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2012.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2013.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2015.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2017.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2017Community.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2017Enterprise.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VS2017Professional.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.VSPreview.cmd delete mode 100644 third_party/zstd/build/VS_scripts/build.generic.cmd delete mode 100644 third_party/zstd/build/cmake/.gitignore delete mode 100644 third_party/zstd/build/cmake/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake delete mode 100644 third_party/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake delete mode 100644 third_party/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake delete mode 100644 third_party/zstd/build/cmake/CMakeModules/JoinPaths.cmake delete mode 100644 third_party/zstd/build/cmake/README.md delete mode 100644 third_party/zstd/build/cmake/contrib/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/contrib/gen_html/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/contrib/pzstd/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/lib/.gitignore delete mode 100644 third_party/zstd/build/cmake/lib/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/lib/cmake_uninstall.cmake.in delete mode 100644 third_party/zstd/build/cmake/programs/.gitignore delete mode 100644 third_party/zstd/build/cmake/programs/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/tests/.gitignore delete mode 100644 third_party/zstd/build/cmake/tests/CMakeLists.txt delete mode 100644 third_party/zstd/build/cmake/zstdConfig.cmake.in delete mode 100644 third_party/zstd/build/meson/GetZstdLibraryVersion.py delete mode 100644 third_party/zstd/build/meson/InstallSymlink.py delete mode 100644 third_party/zstd/build/meson/README.md delete mode 100644 third_party/zstd/build/meson/contrib/gen_html/meson.build delete mode 100644 third_party/zstd/build/meson/contrib/meson.build delete mode 100644 third_party/zstd/build/meson/contrib/pzstd/meson.build delete mode 100644 third_party/zstd/build/meson/lib/meson.build delete mode 100644 third_party/zstd/build/meson/meson.build delete mode 100644 third_party/zstd/build/meson/meson_options.txt delete mode 100644 third_party/zstd/build/meson/programs/meson.build delete mode 100644 third_party/zstd/build/meson/tests/meson.build delete mode 100644 third_party/zstd/build/meson/tests/valgrindTest.py delete mode 100644 third_party/zstd/build/single_file_libs/.gitignore delete mode 100644 third_party/zstd/build/single_file_libs/README.md delete mode 100644 third_party/zstd/build/single_file_libs/build_decoder_test.sh delete mode 100644 third_party/zstd/build/single_file_libs/build_library_test.sh delete mode 100644 third_party/zstd/build/single_file_libs/combine.py delete mode 100644 third_party/zstd/build/single_file_libs/combine.sh delete mode 100644 third_party/zstd/build/single_file_libs/create_single_file_decoder.sh delete mode 100644 third_party/zstd/build/single_file_libs/create_single_file_library.sh delete mode 100644 third_party/zstd/build/single_file_libs/examples/README.md delete mode 100644 third_party/zstd/build/single_file_libs/examples/emscripten.c delete mode 100644 third_party/zstd/build/single_file_libs/examples/roundtrip.c delete mode 100644 third_party/zstd/build/single_file_libs/examples/shell.html delete mode 100644 third_party/zstd/build/single_file_libs/examples/simple.c delete mode 100644 third_party/zstd/build/single_file_libs/examples/testcard-dxt1.inl delete mode 100644 third_party/zstd/build/single_file_libs/examples/testcard-zstd.inl delete mode 100644 third_party/zstd/build/single_file_libs/examples/testcard.png delete mode 100644 third_party/zstd/build/single_file_libs/zstd-in.c delete mode 100644 third_party/zstd/build/single_file_libs/zstddeclib-in.c delete mode 100644 third_party/zstd/contrib/VS2005/README.md delete mode 100644 third_party/zstd/contrib/VS2005/fullbench/fullbench.vcproj delete mode 100644 third_party/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj delete mode 100644 third_party/zstd/contrib/VS2005/zstd.sln delete mode 100644 third_party/zstd/contrib/VS2005/zstd/zstd.vcproj delete mode 100644 third_party/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj delete mode 100644 third_party/zstd/contrib/cleanTabs delete mode 100644 third_party/zstd/contrib/diagnose_corruption/.gitignore delete mode 100644 third_party/zstd/contrib/diagnose_corruption/Makefile delete mode 100644 third_party/zstd/contrib/diagnose_corruption/check_flipped_bits.c delete mode 100644 third_party/zstd/contrib/docker/Dockerfile delete mode 100644 third_party/zstd/contrib/docker/README.md delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/.gitignore delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/Makefile delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/README.md delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/main.c delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/sequence_producer.c delete mode 100644 third_party/zstd/contrib/externalSequenceProducer/sequence_producer.h delete mode 100644 third_party/zstd/contrib/freestanding_lib/freestanding.py delete mode 100644 third_party/zstd/contrib/gen_html/.gitignore delete mode 100644 third_party/zstd/contrib/gen_html/Makefile delete mode 100644 third_party/zstd/contrib/gen_html/README.md delete mode 100644 third_party/zstd/contrib/gen_html/gen-zstd-manual.sh delete mode 100644 third_party/zstd/contrib/gen_html/gen_html.cpp delete mode 100644 third_party/zstd/contrib/largeNbDicts/.gitignore delete mode 100644 third_party/zstd/contrib/largeNbDicts/Makefile delete mode 100644 third_party/zstd/contrib/largeNbDicts/README.md delete mode 100644 third_party/zstd/contrib/largeNbDicts/largeNbDicts.c delete mode 100644 third_party/zstd/contrib/linux-kernel/.gitignore delete mode 100644 third_party/zstd/contrib/linux-kernel/Makefile delete mode 100644 third_party/zstd/contrib/linux-kernel/README.md delete mode 100644 third_party/zstd/contrib/linux-kernel/btrfs-benchmark.sh delete mode 100644 third_party/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh delete mode 100644 third_party/zstd/contrib/linux-kernel/decompress_sources.h delete mode 100644 third_party/zstd/contrib/linux-kernel/linux.mk delete mode 100644 third_party/zstd/contrib/linux-kernel/linux_zstd.h delete mode 100644 third_party/zstd/contrib/linux-kernel/mem.h delete mode 100644 third_party/zstd/contrib/linux-kernel/squashfs-benchmark.sh delete mode 100644 third_party/zstd/contrib/linux-kernel/test/Makefile delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/compiler.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/errno.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/kernel.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/limits.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/math64.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/module.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/printk.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/stddef.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/swab.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/types.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/unaligned.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/include/linux/xxhash.h delete mode 100644 third_party/zstd/contrib/linux-kernel/test/macro-test.sh delete mode 100644 third_party/zstd/contrib/linux-kernel/test/static_test.c delete mode 100644 third_party/zstd/contrib/linux-kernel/test/test.c delete mode 100644 third_party/zstd/contrib/linux-kernel/zstd_common_module.c delete mode 100644 third_party/zstd/contrib/linux-kernel/zstd_compress_module.c delete mode 100644 third_party/zstd/contrib/linux-kernel/zstd_decompress_module.c delete mode 100644 third_party/zstd/contrib/linux-kernel/zstd_deps.h delete mode 100644 third_party/zstd/contrib/match_finders/README.md delete mode 100644 third_party/zstd/contrib/match_finders/zstd_edist.c delete mode 100644 third_party/zstd/contrib/match_finders/zstd_edist.h delete mode 100644 third_party/zstd/contrib/premake/premake4.lua delete mode 100644 third_party/zstd/contrib/premake/zstd.lua delete mode 100644 third_party/zstd/contrib/pzstd/.gitignore delete mode 100644 third_party/zstd/contrib/pzstd/BUCK delete mode 100644 third_party/zstd/contrib/pzstd/ErrorHolder.h delete mode 100644 third_party/zstd/contrib/pzstd/Logging.h delete mode 100644 third_party/zstd/contrib/pzstd/Makefile delete mode 100644 third_party/zstd/contrib/pzstd/Options.cpp delete mode 100644 third_party/zstd/contrib/pzstd/Options.h delete mode 100644 third_party/zstd/contrib/pzstd/Pzstd.cpp delete mode 100644 third_party/zstd/contrib/pzstd/Pzstd.h delete mode 100644 third_party/zstd/contrib/pzstd/README.md delete mode 100644 third_party/zstd/contrib/pzstd/SkippableFrame.cpp delete mode 100644 third_party/zstd/contrib/pzstd/SkippableFrame.h delete mode 100644 third_party/zstd/contrib/pzstd/images/Cspeed.png delete mode 100644 third_party/zstd/contrib/pzstd/images/Dspeed.png delete mode 100644 third_party/zstd/contrib/pzstd/main.cpp delete mode 100644 third_party/zstd/contrib/pzstd/test/BUCK delete mode 100644 third_party/zstd/contrib/pzstd/test/OptionsTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/test/PzstdTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/test/RoundTrip.h delete mode 100644 third_party/zstd/contrib/pzstd/test/RoundTripTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/BUCK delete mode 100644 third_party/zstd/contrib/pzstd/utils/Buffer.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/FileSystem.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/Likely.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/Portability.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/Range.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/ResourcePool.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/ScopeGuard.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/ThreadPool.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/WorkQueue.h delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/BUCK delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/BufferTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/RangeTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp delete mode 100644 third_party/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp delete mode 100644 third_party/zstd/contrib/recovery/Makefile delete mode 100644 third_party/zstd/contrib/recovery/recover_directory.c delete mode 100644 third_party/zstd/contrib/seekable_format/README.md delete mode 100644 third_party/zstd/contrib/seekable_format/examples/.gitignore delete mode 100644 third_party/zstd/contrib/seekable_format/examples/Makefile delete mode 100644 third_party/zstd/contrib/seekable_format/examples/parallel_compression.c delete mode 100644 third_party/zstd/contrib/seekable_format/examples/parallel_processing.c delete mode 100644 third_party/zstd/contrib/seekable_format/examples/seekable_compression.c delete mode 100644 third_party/zstd/contrib/seekable_format/examples/seekable_decompression.c delete mode 100644 third_party/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c delete mode 100644 third_party/zstd/contrib/seekable_format/tests/.gitignore delete mode 100644 third_party/zstd/contrib/seekable_format/tests/Makefile delete mode 100644 third_party/zstd/contrib/seekable_format/tests/seekable_tests.c delete mode 100644 third_party/zstd/contrib/seekable_format/zstd_seekable.h delete mode 100644 third_party/zstd/contrib/seekable_format/zstd_seekable_compression_format.md delete mode 100644 third_party/zstd/contrib/seekable_format/zstdseek_compress.c delete mode 100644 third_party/zstd/contrib/seekable_format/zstdseek_decompress.c delete mode 100644 third_party/zstd/contrib/seqBench/Makefile delete mode 100644 third_party/zstd/contrib/seqBench/seqBench.c delete mode 100644 third_party/zstd/contrib/snap/snapcraft.yaml delete mode 100644 third_party/zstd/doc/README.md delete mode 100644 third_party/zstd/doc/decompressor_errata.md delete mode 100644 third_party/zstd/doc/decompressor_permissive.md delete mode 100644 third_party/zstd/doc/educational_decoder/.gitignore delete mode 100644 third_party/zstd/doc/educational_decoder/Makefile delete mode 100644 third_party/zstd/doc/educational_decoder/README.md delete mode 100644 third_party/zstd/doc/educational_decoder/harness.c delete mode 100644 third_party/zstd/doc/educational_decoder/zstd_decompress.c delete mode 100644 third_party/zstd/doc/educational_decoder/zstd_decompress.h delete mode 100644 third_party/zstd/doc/images/CSpeed2.png delete mode 100644 third_party/zstd/doc/images/DCspeed5.png delete mode 100644 third_party/zstd/doc/images/DSpeed3.png delete mode 100644 third_party/zstd/doc/images/cdict_v136.png delete mode 100644 third_party/zstd/doc/images/dict-cr.png delete mode 100644 third_party/zstd/doc/images/dict-cs.png delete mode 100644 third_party/zstd/doc/images/dict-ds.png delete mode 100644 third_party/zstd/doc/images/zstd_cdict_v1_3_5.png delete mode 100644 third_party/zstd/doc/images/zstd_logo86.png delete mode 100644 third_party/zstd/doc/zstd_compression_format.md delete mode 100644 third_party/zstd/doc/zstd_manual.html delete mode 100644 third_party/zstd/examples/.gitignore delete mode 100644 third_party/zstd/examples/Makefile delete mode 100644 third_party/zstd/examples/README.md delete mode 100644 third_party/zstd/examples/common.h delete mode 100644 third_party/zstd/examples/dictionary_compression.c delete mode 100644 third_party/zstd/examples/dictionary_decompression.c delete mode 100644 third_party/zstd/examples/multiple_simple_compression.c delete mode 100644 third_party/zstd/examples/multiple_streaming_compression.c delete mode 100644 third_party/zstd/examples/simple_compression.c delete mode 100644 third_party/zstd/examples/simple_decompression.c delete mode 100644 third_party/zstd/examples/streaming_compression.c delete mode 100644 third_party/zstd/examples/streaming_compression_thread_pool.c delete mode 100644 third_party/zstd/examples/streaming_decompression.c delete mode 100644 third_party/zstd/examples/streaming_memory_usage.c delete mode 100644 third_party/zstd/lib/.gitignore delete mode 100644 third_party/zstd/lib/BUCK delete mode 100644 third_party/zstd/lib/Makefile delete mode 100644 third_party/zstd/lib/README.md delete mode 100644 third_party/zstd/lib/common/allocations.h delete mode 100644 third_party/zstd/lib/common/bits.h delete mode 100644 third_party/zstd/lib/common/bitstream.h delete mode 100644 third_party/zstd/lib/common/compiler.h delete mode 100644 third_party/zstd/lib/common/cpu.h delete mode 100644 third_party/zstd/lib/common/debug.c delete mode 100644 third_party/zstd/lib/common/debug.h delete mode 100644 third_party/zstd/lib/common/entropy_common.c delete mode 100644 third_party/zstd/lib/common/error_private.c delete mode 100644 third_party/zstd/lib/common/error_private.h delete mode 100644 third_party/zstd/lib/common/fse.h delete mode 100644 third_party/zstd/lib/common/fse_decompress.c delete mode 100644 third_party/zstd/lib/common/huf.h delete mode 100644 third_party/zstd/lib/common/mem.h delete mode 100644 third_party/zstd/lib/common/pool.c delete mode 100644 third_party/zstd/lib/common/pool.h delete mode 100644 third_party/zstd/lib/common/portability_macros.h delete mode 100644 third_party/zstd/lib/common/threading.c delete mode 100644 third_party/zstd/lib/common/threading.h delete mode 100644 third_party/zstd/lib/common/xxhash.c delete mode 100644 third_party/zstd/lib/common/xxhash.h delete mode 100644 third_party/zstd/lib/common/zstd_common.c delete mode 100644 third_party/zstd/lib/common/zstd_deps.h delete mode 100644 third_party/zstd/lib/common/zstd_internal.h delete mode 100644 third_party/zstd/lib/common/zstd_trace.h delete mode 100644 third_party/zstd/lib/compress/clevels.h delete mode 100644 third_party/zstd/lib/compress/fse_compress.c delete mode 100644 third_party/zstd/lib/compress/hist.c delete mode 100644 third_party/zstd/lib/compress/hist.h delete mode 100644 third_party/zstd/lib/compress/huf_compress.c delete mode 100644 third_party/zstd/lib/compress/zstd_compress.c delete mode 100644 third_party/zstd/lib/compress/zstd_compress_internal.h delete mode 100644 third_party/zstd/lib/compress/zstd_compress_literals.c delete mode 100644 third_party/zstd/lib/compress/zstd_compress_literals.h delete mode 100644 third_party/zstd/lib/compress/zstd_compress_sequences.c delete mode 100644 third_party/zstd/lib/compress/zstd_compress_sequences.h delete mode 100644 third_party/zstd/lib/compress/zstd_compress_superblock.c delete mode 100644 third_party/zstd/lib/compress/zstd_compress_superblock.h delete mode 100644 third_party/zstd/lib/compress/zstd_cwksp.h delete mode 100644 third_party/zstd/lib/compress/zstd_double_fast.c delete mode 100644 third_party/zstd/lib/compress/zstd_double_fast.h delete mode 100644 third_party/zstd/lib/compress/zstd_fast.c delete mode 100644 third_party/zstd/lib/compress/zstd_fast.h delete mode 100644 third_party/zstd/lib/compress/zstd_lazy.c delete mode 100644 third_party/zstd/lib/compress/zstd_lazy.h delete mode 100644 third_party/zstd/lib/compress/zstd_ldm.c delete mode 100644 third_party/zstd/lib/compress/zstd_ldm.h delete mode 100644 third_party/zstd/lib/compress/zstd_ldm_geartab.h delete mode 100644 third_party/zstd/lib/compress/zstd_opt.c delete mode 100644 third_party/zstd/lib/compress/zstd_opt.h delete mode 100644 third_party/zstd/lib/compress/zstd_preSplit.c delete mode 100644 third_party/zstd/lib/compress/zstd_preSplit.h delete mode 100644 third_party/zstd/lib/compress/zstdmt_compress.c delete mode 100644 third_party/zstd/lib/compress/zstdmt_compress.h delete mode 100644 third_party/zstd/lib/decompress/huf_decompress.c delete mode 100644 third_party/zstd/lib/decompress/huf_decompress_amd64.S delete mode 100644 third_party/zstd/lib/decompress/zstd_ddict.c delete mode 100644 third_party/zstd/lib/decompress/zstd_ddict.h delete mode 100644 third_party/zstd/lib/decompress/zstd_decompress.c delete mode 100644 third_party/zstd/lib/decompress/zstd_decompress_block.c delete mode 100644 third_party/zstd/lib/decompress/zstd_decompress_block.h delete mode 100644 third_party/zstd/lib/decompress/zstd_decompress_internal.h delete mode 100644 third_party/zstd/lib/deprecated/zbuff.h delete mode 100644 third_party/zstd/lib/deprecated/zbuff_common.c delete mode 100644 third_party/zstd/lib/deprecated/zbuff_compress.c delete mode 100644 third_party/zstd/lib/deprecated/zbuff_decompress.c delete mode 100644 third_party/zstd/lib/dictBuilder/cover.c delete mode 100644 third_party/zstd/lib/dictBuilder/cover.h delete mode 100644 third_party/zstd/lib/dictBuilder/divsufsort.c delete mode 100644 third_party/zstd/lib/dictBuilder/divsufsort.h delete mode 100644 third_party/zstd/lib/dictBuilder/fastcover.c delete mode 100644 third_party/zstd/lib/dictBuilder/zdict.c delete mode 100644 third_party/zstd/lib/dll/example/Makefile delete mode 100644 third_party/zstd/lib/dll/example/README.md delete mode 100644 third_party/zstd/lib/dll/example/build_package.bat delete mode 100644 third_party/zstd/lib/dll/example/fullbench-dll.sln delete mode 100644 third_party/zstd/lib/dll/example/fullbench-dll.vcxproj delete mode 100644 third_party/zstd/lib/legacy/zstd_legacy.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v01.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v01.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v02.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v02.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v03.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v03.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v04.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v04.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v05.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v05.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v06.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v06.h delete mode 100644 third_party/zstd/lib/legacy/zstd_v07.c delete mode 100644 third_party/zstd/lib/legacy/zstd_v07.h delete mode 100644 third_party/zstd/lib/libzstd.mk delete mode 100644 third_party/zstd/lib/libzstd.pc.in delete mode 100644 third_party/zstd/lib/module.modulemap delete mode 100644 third_party/zstd/lib/zdict.h delete mode 100644 third_party/zstd/lib/zstd.h delete mode 100644 third_party/zstd/lib/zstd_errors.h delete mode 100644 third_party/zstd/programs/.gitignore delete mode 100644 third_party/zstd/programs/BUCK delete mode 100644 third_party/zstd/programs/Makefile delete mode 100644 third_party/zstd/programs/README.md delete mode 100644 third_party/zstd/programs/benchfn.c delete mode 100644 third_party/zstd/programs/benchfn.h delete mode 100644 third_party/zstd/programs/benchzstd.c delete mode 100644 third_party/zstd/programs/benchzstd.h delete mode 100644 third_party/zstd/programs/datagen.c delete mode 100644 third_party/zstd/programs/datagen.h delete mode 100644 third_party/zstd/programs/dibio.c delete mode 100644 third_party/zstd/programs/dibio.h delete mode 100644 third_party/zstd/programs/fileio.c delete mode 100644 third_party/zstd/programs/fileio.h delete mode 100644 third_party/zstd/programs/fileio_asyncio.c delete mode 100644 third_party/zstd/programs/fileio_asyncio.h delete mode 100644 third_party/zstd/programs/fileio_common.h delete mode 100644 third_party/zstd/programs/fileio_types.h delete mode 100644 third_party/zstd/programs/lorem.c delete mode 100644 third_party/zstd/programs/lorem.h delete mode 100644 third_party/zstd/programs/platform.h delete mode 100644 third_party/zstd/programs/timefn.c delete mode 100644 third_party/zstd/programs/timefn.h delete mode 100644 third_party/zstd/programs/util.c delete mode 100644 third_party/zstd/programs/util.h delete mode 100644 third_party/zstd/programs/windres/verrsrc.h delete mode 100644 third_party/zstd/programs/windres/zstd.rc delete mode 100644 third_party/zstd/programs/windres/zstd32.res delete mode 100644 third_party/zstd/programs/windres/zstd64.res delete mode 100644 third_party/zstd/programs/zstd.1 delete mode 100644 third_party/zstd/programs/zstd.1.md delete mode 100644 third_party/zstd/programs/zstdcli.c delete mode 100644 third_party/zstd/programs/zstdcli_trace.c delete mode 100644 third_party/zstd/programs/zstdcli_trace.h delete mode 100644 third_party/zstd/programs/zstdgrep delete mode 100644 third_party/zstd/programs/zstdgrep.1 delete mode 100644 third_party/zstd/programs/zstdgrep.1.md delete mode 100644 third_party/zstd/programs/zstdless delete mode 100644 third_party/zstd/programs/zstdless.1 delete mode 100644 third_party/zstd/programs/zstdless.1.md delete mode 100644 third_party/zstd/tests/.gitignore delete mode 100644 third_party/zstd/tests/DEPRECATED-test-zstd-speed.py delete mode 100644 third_party/zstd/tests/Makefile delete mode 100644 third_party/zstd/tests/README.md delete mode 100644 third_party/zstd/tests/automated_benchmarking.py delete mode 100644 third_party/zstd/tests/bigdict.c delete mode 100644 third_party/zstd/tests/checkTag.c delete mode 100644 third_party/zstd/tests/check_size.py delete mode 100644 third_party/zstd/tests/cli-tests/.gitignore delete mode 100644 third_party/zstd/tests/cli-tests/README.md delete mode 100644 third_party/zstd/tests/cli-tests/basic/args.sh delete mode 100644 third_party/zstd/tests/cli-tests/basic/args.sh.exit delete mode 100644 third_party/zstd/tests/cli-tests/basic/args.sh.stderr.glob delete mode 100644 third_party/zstd/tests/cli-tests/basic/help.sh delete mode 100644 third_party/zstd/tests/cli-tests/basic/help.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/basic/memlimit.sh delete mode 100644 third_party/zstd/tests/cli-tests/basic/memlimit.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/basic/memlimit.sh.stdout.exact delete mode 100644 third_party/zstd/tests/cli-tests/basic/output_dir.sh delete mode 100644 third_party/zstd/tests/cli-tests/basic/output_dir.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/basic/output_dir.sh.stdout.exact delete mode 100644 third_party/zstd/tests/cli-tests/basic/version.sh delete mode 100644 third_party/zstd/tests/cli-tests/basic/version.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/bin/cmp_size delete mode 100644 third_party/zstd/tests/cli-tests/bin/datagen delete mode 100644 third_party/zstd/tests/cli-tests/bin/die delete mode 100644 third_party/zstd/tests/cli-tests/bin/println delete mode 100644 third_party/zstd/tests/cli-tests/bin/unzstd delete mode 100644 third_party/zstd/tests/cli-tests/bin/zstd delete mode 100644 third_party/zstd/tests/cli-tests/bin/zstdcat delete mode 100644 third_party/zstd/tests/cli-tests/bin/zstdgrep delete mode 100644 third_party/zstd/tests/cli-tests/bin/zstdless delete mode 100644 third_party/zstd/tests/cli-tests/cltools/setup delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdgrep.sh delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdgrep.sh.exit delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdless.sh delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdless.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/cltools/zstdless.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/common/format.sh delete mode 100644 third_party/zstd/tests/cli-tests/common/mtime.sh delete mode 100644 third_party/zstd/tests/cli-tests/common/permissions.sh delete mode 100644 third_party/zstd/tests/cli-tests/common/platform.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/adapt.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/basic.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/compress-literals.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/format.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/golden.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/gzip-compat.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/levels.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/levels.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/compression/long-distance-matcher.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/multi-threaded.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/multi-threaded.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/compression/multiple-files.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/multiple-files.sh.stdout.exact delete mode 100644 third_party/zstd/tests/cli-tests/compression/row-match-finder.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/setup delete mode 100644 third_party/zstd/tests/cli-tests/compression/stream-size.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/verbose-wlog.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob delete mode 100644 third_party/zstd/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/compression/window-resize.sh delete mode 100644 third_party/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore delete mode 100644 third_party/zstd/tests/cli-tests/compression/window-resize.sh.stdout.glob delete mode 100644 third_party/zstd/tests/cli-tests/decompression/detectErrors.sh delete mode 100644 third_party/zstd/tests/cli-tests/decompression/golden.sh delete mode 100644 third_party/zstd/tests/cli-tests/decompression/pass-through.sh delete mode 100644 third_party/zstd/tests/cli-tests/decompression/pass-through.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/decompression/pass-through.sh.stdout.exact delete mode 100644 third_party/zstd/tests/cli-tests/dict-builder/empty-input.sh delete mode 100644 third_party/zstd/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/dict-builder/no-inputs.sh delete mode 100644 third_party/zstd/tests/cli-tests/dict-builder/no-inputs.sh.exit delete mode 100644 third_party/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh delete mode 100644 third_party/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/dictionaries/golden.sh delete mode 100644 third_party/zstd/tests/cli-tests/dictionaries/setup delete mode 100644 third_party/zstd/tests/cli-tests/dictionaries/setup_once delete mode 100644 third_party/zstd/tests/cli-tests/file-handling/directory-mirror.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh delete mode 100644 third_party/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact delete mode 100644 third_party/zstd/tests/cli-tests/progress/no-progress.sh delete mode 100644 third_party/zstd/tests/cli-tests/progress/no-progress.sh.stderr.glob delete mode 100644 third_party/zstd/tests/cli-tests/progress/progress.sh delete mode 100644 third_party/zstd/tests/cli-tests/progress/progress.sh.stderr.glob delete mode 100644 third_party/zstd/tests/cli-tests/run.py delete mode 100644 third_party/zstd/tests/cli-tests/zstd-symlinks/setup delete mode 100644 third_party/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh delete mode 100644 third_party/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact delete mode 100644 third_party/zstd/tests/datagencli.c delete mode 100644 third_party/zstd/tests/decodecorpus.c delete mode 100644 third_party/zstd/tests/dict-files/zero-weight-dict delete mode 100644 third_party/zstd/tests/external_matchfinder.c delete mode 100644 third_party/zstd/tests/external_matchfinder.h delete mode 100644 third_party/zstd/tests/fullbench.c delete mode 100644 third_party/zstd/tests/fuzz/.gitignore delete mode 100644 third_party/zstd/tests/fuzz/Makefile delete mode 100644 third_party/zstd/tests/fuzz/README.md delete mode 100644 third_party/zstd/tests/fuzz/block_decompress.c delete mode 100644 third_party/zstd/tests/fuzz/block_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/decompress_cross_format.c delete mode 100644 third_party/zstd/tests/fuzz/decompress_dstSize_tooSmall.c delete mode 100644 third_party/zstd/tests/fuzz/dictionary_decompress.c delete mode 100644 third_party/zstd/tests/fuzz/dictionary_loader.c delete mode 100644 third_party/zstd/tests/fuzz/dictionary_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/dictionary_stream_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/fse_read_ncount.c delete mode 100644 third_party/zstd/tests/fuzz/fuzz.h delete mode 100644 third_party/zstd/tests/fuzz/fuzz.py delete mode 100644 third_party/zstd/tests/fuzz/fuzz_data_producer.c delete mode 100644 third_party/zstd/tests/fuzz/fuzz_data_producer.h delete mode 100644 third_party/zstd/tests/fuzz/fuzz_helpers.c delete mode 100644 third_party/zstd/tests/fuzz/fuzz_helpers.h delete mode 100644 third_party/zstd/tests/fuzz/fuzz_third_party_seq_prod.h delete mode 100644 third_party/zstd/tests/fuzz/generate_sequences.c delete mode 100644 third_party/zstd/tests/fuzz/huf_decompress.c delete mode 100644 third_party/zstd/tests/fuzz/huf_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/raw_dictionary_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/regression_driver.c delete mode 100644 third_party/zstd/tests/fuzz/seekable_roundtrip.c delete mode 100644 third_party/zstd/tests/fuzz/seq_prod_fuzz_example/Makefile delete mode 100644 third_party/zstd/tests/fuzz/seq_prod_fuzz_example/README.md delete mode 100644 third_party/zstd/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c delete mode 100644 third_party/zstd/tests/fuzz/sequence_compression_api.c delete mode 100644 third_party/zstd/tests/fuzz/simple_compress.c delete mode 100644 third_party/zstd/tests/fuzz/simple_decompress.c delete mode 100644 third_party/zstd/tests/fuzz/simple_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/stream_decompress.c delete mode 100644 third_party/zstd/tests/fuzz/stream_round_trip.c delete mode 100644 third_party/zstd/tests/fuzz/zstd_frame_info.c delete mode 100644 third_party/zstd/tests/fuzz/zstd_helpers.c delete mode 100644 third_party/zstd/tests/fuzz/zstd_helpers.h delete mode 100644 third_party/zstd/tests/fuzzer.c delete mode 100644 third_party/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test delete mode 100644 third_party/zstd/tests/golden-compression/http delete mode 100644 third_party/zstd/tests/golden-compression/huffman-compressed-larger delete mode 100644 third_party/zstd/tests/golden-compression/large-literal-and-match-lengths delete mode 100644 third_party/zstd/tests/golden-decompression-errors/.gitignore delete mode 100644 third_party/zstd/tests/golden-decompression-errors/off0.bin.zst delete mode 100644 third_party/zstd/tests/golden-decompression-errors/truncated_huff_state.zst delete mode 100644 third_party/zstd/tests/golden-decompression-errors/zeroSeq_extraneous.zst delete mode 100644 third_party/zstd/tests/golden-decompression/block-128k.zst delete mode 100644 third_party/zstd/tests/golden-decompression/empty-block.zst delete mode 100644 third_party/zstd/tests/golden-decompression/rle-first-block.zst delete mode 100644 third_party/zstd/tests/golden-decompression/zeroSeq_2B.zst delete mode 100644 third_party/zstd/tests/golden-dictionaries/http-dict-missing-symbols delete mode 100644 third_party/zstd/tests/gzip/Makefile delete mode 100644 third_party/zstd/tests/gzip/gzip-env.sh delete mode 100644 third_party/zstd/tests/gzip/helin-segv.sh delete mode 100644 third_party/zstd/tests/gzip/help-version.sh delete mode 100644 third_party/zstd/tests/gzip/hufts-segv.gz delete mode 100644 third_party/zstd/tests/gzip/hufts.sh delete mode 100644 third_party/zstd/tests/gzip/init.cfg delete mode 100644 third_party/zstd/tests/gzip/init.sh delete mode 100644 third_party/zstd/tests/gzip/keep.sh delete mode 100644 third_party/zstd/tests/gzip/list.sh delete mode 100644 third_party/zstd/tests/gzip/memcpy-abuse.sh delete mode 100644 third_party/zstd/tests/gzip/mixed.sh delete mode 100644 third_party/zstd/tests/gzip/null-suffix-clobber.sh delete mode 100644 third_party/zstd/tests/gzip/stdin.sh delete mode 100644 third_party/zstd/tests/gzip/test-driver.sh delete mode 100644 third_party/zstd/tests/gzip/trailing-nul.sh delete mode 100644 third_party/zstd/tests/gzip/unpack-invalid.sh delete mode 100644 third_party/zstd/tests/gzip/z-suffix.sh delete mode 100644 third_party/zstd/tests/gzip/zdiff.sh delete mode 100644 third_party/zstd/tests/gzip/zgrep-context.sh delete mode 100644 third_party/zstd/tests/gzip/zgrep-f.sh delete mode 100644 third_party/zstd/tests/gzip/zgrep-signal.sh delete mode 100644 third_party/zstd/tests/gzip/znew-k.sh delete mode 100644 third_party/zstd/tests/invalidDictionaries.c delete mode 100644 third_party/zstd/tests/largeDictionary.c delete mode 100644 third_party/zstd/tests/legacy.c delete mode 100644 third_party/zstd/tests/libzstd_builds.sh delete mode 100644 third_party/zstd/tests/longmatch.c delete mode 100644 third_party/zstd/tests/loremOut.c delete mode 100644 third_party/zstd/tests/loremOut.h delete mode 100644 third_party/zstd/tests/paramgrill.c delete mode 100644 third_party/zstd/tests/playTests.sh delete mode 100644 third_party/zstd/tests/poolTests.c delete mode 100644 third_party/zstd/tests/rateLimiter.py delete mode 100644 third_party/zstd/tests/regression/.gitignore delete mode 100644 third_party/zstd/tests/regression/Makefile delete mode 100644 third_party/zstd/tests/regression/README.md delete mode 100644 third_party/zstd/tests/regression/config.c delete mode 100644 third_party/zstd/tests/regression/config.h delete mode 100644 third_party/zstd/tests/regression/data.c delete mode 100644 third_party/zstd/tests/regression/data.h delete mode 100644 third_party/zstd/tests/regression/levels.h delete mode 100644 third_party/zstd/tests/regression/method.c delete mode 100644 third_party/zstd/tests/regression/method.h delete mode 100644 third_party/zstd/tests/regression/result.c delete mode 100644 third_party/zstd/tests/regression/result.h delete mode 100644 third_party/zstd/tests/regression/results.csv delete mode 100644 third_party/zstd/tests/regression/test.c delete mode 100644 third_party/zstd/tests/roundTripCrash.c delete mode 100644 third_party/zstd/tests/seqgen.c delete mode 100644 third_party/zstd/tests/seqgen.h delete mode 100644 third_party/zstd/tests/test-license.py delete mode 100644 third_party/zstd/tests/test-variants.sh delete mode 100644 third_party/zstd/tests/test-zstd-versions.py delete mode 100644 third_party/zstd/tests/zstreamtest.c delete mode 100644 third_party/zstd/zlibWrapper/.gitignore delete mode 100644 third_party/zstd/zlibWrapper/BUCK delete mode 100644 third_party/zstd/zlibWrapper/Makefile delete mode 100644 third_party/zstd/zlibWrapper/README.md delete mode 100644 third_party/zstd/zlibWrapper/examples/example.c delete mode 100644 third_party/zstd/zlibWrapper/examples/example_original.c delete mode 100644 third_party/zstd/zlibWrapper/examples/fitblk.c delete mode 100644 third_party/zstd/zlibWrapper/examples/fitblk_original.c delete mode 100644 third_party/zstd/zlibWrapper/examples/minigzip.c delete mode 100644 third_party/zstd/zlibWrapper/examples/zwrapbench.c delete mode 100644 third_party/zstd/zlibWrapper/gzclose.c delete mode 100644 third_party/zstd/zlibWrapper/gzcompatibility.h delete mode 100644 third_party/zstd/zlibWrapper/gzguts.h delete mode 100644 third_party/zstd/zlibWrapper/gzlib.c delete mode 100644 third_party/zstd/zlibWrapper/gzread.c delete mode 100644 third_party/zstd/zlibWrapper/gzwrite.c delete mode 100644 third_party/zstd/zlibWrapper/zstd_zlibwrapper.c delete mode 100644 third_party/zstd/zlibWrapper/zstd_zlibwrapper.h create mode 100644 vcpkg.json diff --git a/CMakeLists.txt b/CMakeLists.txt index d40dc8c..a3dd922 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,73 +8,14 @@ include(CMakePackageConfigHelpers) option(SCOPEWRITER_BUILD_TESTS "Build ScopeWriter tests" ${PROJECT_IS_TOP_LEVEL}) set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) -set(_scopewriter_third_party_dir "${CMAKE_CURRENT_SOURCE_DIR}/third_party") - -set(ZLIB_BUILD_EXAMPLES OFF) -set(SKIP_INSTALL_ALL ON) -add_subdirectory( - "${_scopewriter_third_party_dir}/zlib" - "${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib" - EXCLUDE_FROM_ALL -) -unset(SKIP_INSTALL_ALL) -# A parent project may already provide ZLIB::ZLIB (e.g. via a static Qt build). -if (NOT TARGET ZLIB::ZLIB) - add_library(ZLIB::ZLIB ALIAS zlibstatic) -endif () - -set(CRC32C_BUILD_TESTS OFF) -set(CRC32C_BUILD_BENCHMARKS OFF) -set(CRC32C_USE_GLOG OFF) -set(CRC32C_INSTALL OFF) -add_subdirectory( - "${_scopewriter_third_party_dir}/crc32c" - "${CMAKE_CURRENT_BINARY_DIR}/third_party/crc32c" - EXCLUDE_FROM_ALL -) -add_library(Crc32c::crc32c ALIAS crc32c) - -set(ZSTD_BUILD_PROGRAMS OFF) -set(ZSTD_BUILD_SHARED OFF) -set(ZSTD_BUILD_STATIC ON) -set(ZSTD_BUILD_TESTS OFF) -set(ZSTD_BUILD_CONTRIB OFF) -set(ZSTD_LEGACY_SUPPORT OFF) -set(ZSTD_MULTITHREAD_SUPPORT OFF) -add_subdirectory( - "${_scopewriter_third_party_dir}/zstd/build/cmake" - "${CMAKE_CURRENT_BINARY_DIR}/third_party/zstd" - EXCLUDE_FROM_ALL -) - -set(tiff-static ON) -set(tiff-tools OFF) -set(tiff-tests OFF) -set(tiff-contrib OFF) -set(tiff-docs OFF) -set(tiff-install OFF) -set(tiff-cxx OFF) -set(zlib ON) -set(libdeflate OFF) -set(jpeg OFF) -set(old-jpeg OFF) -set(jpeg12 OFF) -set(jbig OFF) -set(lerc OFF) -set(lzma OFF) -set(zstd OFF) -set(webp OFF) -add_subdirectory( - "${_scopewriter_third_party_dir}/libtiff" - "${CMAKE_CURRENT_BINARY_DIR}/third_party/libtiff" - EXCLUDE_FROM_ALL -) - +find_package(ZLIB REQUIRED) +find_package(zstd CONFIG REQUIRED) +find_package(TIFF REQUIRED) +find_package(Crc32c CONFIG REQUIRED) find_package(Threads REQUIRED) set(_scopewriter_zarr_libraries Crc32c::crc32c - libzstd_static + zstd::libzstd Threads::Threads ) @@ -116,7 +57,7 @@ target_include_directories(ScopeWriter $ ) -target_link_libraries(ScopeWriter PRIVATE TIFF::tiff ZLIB::ZLIB) +target_link_libraries(ScopeWriter PRIVATE TIFF::TIFF ZLIB::ZLIB) target_link_libraries(ScopeWriter PRIVATE ${_scopewriter_zarr_libraries}) if (MSVC) @@ -136,7 +77,7 @@ if (SCOPEWRITER_BUILD_TESTS) target_compile_features(ScopeWriterTests PRIVATE cxx_std_20) target_link_libraries(ScopeWriterTests PRIVATE ScopeWriter - TIFF::tiff + TIFF::TIFF ${_scopewriter_zarr_libraries} ) add_test(NAME ScopeWriterTests COMMAND ScopeWriterTests) @@ -164,18 +105,6 @@ install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") install(FILES README.md LICENSE THIRD_PARTY_NOTICES.md DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ScopeWriter" ) -install(FILES third_party/libtiff/LICENSE.md - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ScopeWriter/licenses/libtiff" -) -install(FILES third_party/zlib/LICENSE - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ScopeWriter/licenses/zlib" -) -install(FILES third_party/zstd/LICENSE - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ScopeWriter/licenses/zstd" -) -install(FILES third_party/crc32c/LICENSE - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/ScopeWriter/licenses/crc32c" -) install(EXPORT ScopeWriterTargets FILE ScopeWriterTargets.cmake NAMESPACE ScopeWriter:: diff --git a/README.md b/README.md index 917896e..645398b 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ zero `significantBits` uses the pixel type width. ## Build -Requires CMake 3.23 or newer and a C++20 compiler. Dependencies are bundled. +Requires CMake 3.23 or newer and a C++20 compiler. libtiff, zlib, Zstandard, and CRC32C are declared in `vcpkg.json` and installed by vcpkg when the vcpkg toolchain is used. ```powershell -cmake -S . -B build +cmake -S . -B build "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" cmake --build build --config Release ctest --test-dir build -C Release --output-on-failure cmake --install build --config Release --prefix install @@ -34,7 +34,7 @@ cmake --install build --config Release --prefix install ## Use -From source: +From source (the parent project must provide the same dependencies, for example by listing them in its own `vcpkg.json`): ```cmake add_subdirectory(ScopeWriter) diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 577ad75..6b95cd0 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -1,13 +1,12 @@ # Third-party notices +ScopeWriter links libtiff, zlib, Zstandard, and CRC32C, which are provided by +vcpkg (see `vcpkg.json`) under their own licenses. + ScopeWriter includes the following third-party code under its original terms: | Component | License file | | --- | --- | -| libtiff | `third_party/libtiff/LICENSE.md` | -| zlib | `third_party/zlib/LICENSE` | -| Zstandard | `third_party/zstd/LICENSE` | -| CRC32C | `third_party/crc32c/LICENSE` | | acquire-zarr | Full text below | Parts of `src/zarr` and `src/ZarrWriter.cpp` are derived from acquire-zarr and diff --git a/tests/consumer/CMakeLists.txt b/tests/consumer/CMakeLists.txt index b895b99..c009823 100644 --- a/tests/consumer/CMakeLists.txt +++ b/tests/consumer/CMakeLists.txt @@ -22,3 +22,9 @@ add_test(NAME ScopeWriterInstalledConsumer COMMAND ScopeWriterConsumer "${CMAKE_CURRENT_BINARY_DIR}/consumer.ome.tiff" ) +if (WIN32) + # Dependency DLLs are installed next to ScopeWriter.dll + set_tests_properties(ScopeWriterInstalledConsumer PROPERTIES + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" + ) +endif () diff --git a/third_party/crc32c/.clang-format b/third_party/crc32c/.clang-format deleted file mode 100644 index be9b807..0000000 --- a/third_party/crc32c/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google diff --git a/third_party/crc32c/.clang_complete b/third_party/crc32c/.clang_complete deleted file mode 100644 index fa6757c..0000000 --- a/third_party/crc32c/.clang_complete +++ /dev/null @@ -1,8 +0,0 @@ --Ibuild/include/ --Ibuild/third_party/glog/ --Iinclude/ --Ithird_party/benchmark/include/ --Ithird_party/googletest/googletest/include/ --Ithird_party/googletest/googlemock/include/ --Ithird_party/glog/src/ --std=c++11 diff --git a/third_party/crc32c/.github/workflows/build.yml b/third_party/crc32c/.github/workflows/build.yml deleted file mode 100644 index 8b27b2f..0000000 --- a/third_party/crc32c/.github/workflows/build.yml +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2021 The CRC32C Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. See the AUTHORS file for names of contributors. - -name: ci -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build-and-test: - name: >- - CI - ${{ matrix.os }} - ${{ matrix.compiler }} - ${{ matrix.optimized && 'release' || 'debug' }} - ${{ matrix.shared_lib && 'shared' || 'static' }} - ${{ matrix.use_glog && 'glog' || 'no-glog' }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - compiler: [clang, gcc, msvc] - os: [ubuntu-latest, macos-latest, windows-latest] - optimized: [true, false] - shared_lib: [true, false] - use_glog: [true, false] - exclude: - # Our glog config doesn't work with shared libraries. - - use_glog: true - shared_lib: true - # MSVC only works on Windows. - - os: ubuntu-latest - compiler: msvc - - os: macos-latest - compiler: msvc - # Not testing with GCC on macOS. - - os: macos-latest - compiler: gcc - # Only testing with MSVC on Windows. - - os: windows-latest - compiler: clang - - os: windows-latest - compiler: gcc - # Not testing fringe configurations (glog, shared libraries) on Windows. - - os: windows-latest - use_glog: true - - os: windows-latest - shared_lib: true - include: - - compiler: clang - CC: clang - CXX: clang++ - - compiler: gcc - CC: gcc - CXX: g++ - - compiler: msvc - CC: - CXX: - - env: - CMAKE_BUILD_DIR: ${{ github.workspace }}/build - CMAKE_BUILD_TYPE: ${{ matrix.optimized && 'RelWithDebInfo' || 'Debug' }} - CC: ${{ matrix.CC }} - CXX: ${{ matrix.CXX }} - BINARY_SUFFIX: ${{ startsWith(matrix.os, 'windows') && '.exe' || '' }} - BINARY_PATH: >- - ${{ format( - startsWith(matrix.os, 'windows') && '{0}\build\{1}\' || '{0}/build/', - github.workspace, - matrix.optimized && 'RelWithDebInfo' || 'Debug') }} - - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Generate build config - run: >- - cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" - -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} - -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/install_test/ - -DBUILD_SHARED_LIBS=${{ matrix.shared_lib && '1' || '0' }} - -DCRC32C_USE_GLOG=${{ matrix.use_glog && '1' || '0' }} - - - name: Build - run: >- - cmake --build "${{ env.CMAKE_BUILD_DIR }}" - --config "${{ env.CMAKE_BUILD_TYPE }}" - - - name: Run C++ API Tests - run: ${{ env.BINARY_PATH }}crc32c_tests${{ env.BINARY_SUFFIX }} - - - name: Run C API Tests - run: ${{ env.BINARY_PATH }}crc32c_capi_tests${{ env.BINARY_SUFFIX }} - - - name: Run Benchmarks - run: ${{ env.BINARY_PATH }}crc32c_bench${{ env.BINARY_SUFFIX }} - - - name: Test CMake installation - run: cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install diff --git a/third_party/crc32c/.gitignore b/third_party/crc32c/.gitignore deleted file mode 100644 index c1cb671..0000000 --- a/third_party/crc32c/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Editors. -*.sw* -.DS_Store -/.cache -/.vscode - -# Build directory. -build/ -out/ diff --git a/third_party/crc32c/.gitmodules b/third_party/crc32c/.gitmodules deleted file mode 100644 index 888541f..0000000 --- a/third_party/crc32c/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "third_party/googletest"] - path = third_party/googletest - url = https://github.com/google/googletest.git -[submodule "third_party/glog"] - path = third_party/glog - url = https://github.com/google/glog.git -[submodule "third_party/benchmark"] - path = third_party/benchmark - url = https://github.com/google/benchmark.git diff --git a/third_party/crc32c/.ycm_extra_conf.py b/third_party/crc32c/.ycm_extra_conf.py deleted file mode 100644 index 62daa8a..0000000 --- a/third_party/crc32c/.ycm_extra_conf.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 2017 The CRC32C Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -"""YouCompleteMe configuration that interprets a .clang_complete file. - -This module implementes the YouCompleteMe configuration API documented at: -https://github.com/ycm-core/ycmd#ycm_extra_confpy-specification - -The implementation loads and processes a .clang_complete file, documented at: -https://github.com/xavierd/clang_complete/blob/master/README.md -""" - -import os - -# Flags added to the list in .clang_complete. -BASE_FLAGS = [ - '-Werror', # Unlike clang_complete, YCM can also be used as a linter. - '-DUSE_CLANG_COMPLETER', # YCM needs this. - '-xc++', # YCM needs this to avoid compiling headers as C code. -] - -# Clang flags that take in paths. -# See https://clang.llvm.org/docs/ClangCommandLineReference.html -PATH_FLAGS = [ - '-isystem', - '-I', - '-iquote', - '--sysroot=' -] - - -def DirectoryOfThisScript(): - """Returns the absolute path to the directory containing this script.""" - return os.path.dirname(os.path.abspath(__file__)) - - -def MakeRelativePathsInFlagsAbsolute(flags, build_root): - """Expands relative paths in a list of Clang command-line flags. - - Args: - flags: The list of flags passed to Clang. - build_root: The current directory when running the Clang compiler. Should be - an absolute path. - - Returns: - A list of flags with relative paths replaced by absolute paths. - """ - new_flags = [] - make_next_absolute = False - for flag in flags: - new_flag = flag - - if make_next_absolute: - make_next_absolute = False - if not flag.startswith('/'): - new_flag = os.path.join(build_root, flag) - - for path_flag in PATH_FLAGS: - if flag == path_flag: - make_next_absolute = True - break - - if flag.startswith(path_flag): - path = flag[len(path_flag):] - new_flag = path_flag + os.path.join(build_root, path) - break - - if new_flag: - new_flags.append(new_flag) - return new_flags - - -def FindNearest(target, path, build_root): - """Looks for a file with a specific name closest to a project path. - - This is similar to the logic used by a version-control system (like git) to - find its configuration directory (.git) based on the current directory when a - command is invoked. - - Args: - target: The file name to search for. - path: The directory where the search starts. The search will explore the - given directory's ascendants using the parent relationship. Should be an - absolute path. - build_root: A directory that acts as a fence for the search. If the search - reaches this directory, it will not advance to its parent. Should be an - absolute path. - - Returns: - The path to a file with the desired name. None if the search failed. - """ - candidate = os.path.join(path, target) - if os.path.isfile(candidate): - return candidate - - if path == build_root: - return None - - parent = os.path.dirname(path) - if parent == path: - return None - - return FindNearest(target, parent, build_root) - - -def FlagsForClangComplete(file_path, build_root): - """Reads the .clang_complete flags for a source file. - - Args: - file_path: The path to the source file. Should be inside the project. Used - to locate the relevant .clang_complete file. - build_root: The current directory when running the Clang compiler for this - file. Should be an absolute path. - - Returns: - A list of strings, where each element is a Clang command-line flag. - """ - clang_complete_path = FindNearest('.clang_complete', file_path, build_root) - if clang_complete_path is None: - return None - clang_complete_flags = open(clang_complete_path, 'r').read().splitlines() - return clang_complete_flags - - -def FlagsForFile(filename, **kwargs): - """Implements the YouCompleteMe API.""" - - # kwargs can be used to pass 'client_data' to the YCM configuration. This - # configuration script does not need any extra information, so - # pylint: disable=unused-argument - - build_root = DirectoryOfThisScript() - file_path = os.path.realpath(filename) - - flags = BASE_FLAGS - clang_flags = FlagsForClangComplete(file_path, build_root) - if clang_flags: - flags += clang_flags - - final_flags = MakeRelativePathsInFlagsAbsolute(flags, build_root) - - return {'flags': final_flags} diff --git a/third_party/crc32c/AUTHORS b/third_party/crc32c/AUTHORS deleted file mode 100644 index ef9b4ea..0000000 --- a/third_party/crc32c/AUTHORS +++ /dev/null @@ -1,11 +0,0 @@ -# This is the list of CRC32C authors for copyright purposes. -# -# This does not necessarily list everyone who has contributed code, since in -# some cases, their employer may be the copyright holder. To see the full list -# of contributors, see the revision history in source control. -Google Inc. - -Fangming Fang -Vadim Skipin -Rodrigo Tobar -Harry Mallon diff --git a/third_party/crc32c/CMakeLists.txt b/third_party/crc32c/CMakeLists.txt deleted file mode 100644 index 69e8fb2..0000000 --- a/third_party/crc32c/CMakeLists.txt +++ /dev/null @@ -1,435 +0,0 @@ -# Copyright 2017 The CRC32C Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. See the AUTHORS file for names of contributors. - -cmake_minimum_required(VERSION 3.10) -project(Crc32c VERSION 1.1.0 LANGUAGES C CXX) - -# C standard can be overridden when this is used as a sub-project. -if(NOT CMAKE_C_STANDARD) - # This project can use C11, but will gracefully decay down to C89. - set(CMAKE_C_STANDARD 11) - set(CMAKE_C_STANDARD_REQUIRED OFF) - set(CMAKE_C_EXTENSIONS OFF) -endif(NOT CMAKE_C_STANDARD) - -# C++ standard can be overridden when this is used as a sub-project. -if(NOT CMAKE_CXX_STANDARD) - # This project requires C++11. - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif(NOT CMAKE_CXX_STANDARD) - -# https://github.com/izenecloud/cmake/blob/master/SetCompilerWarningAll.cmake -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # Use the highest warning level for Visual Studio. - set(CMAKE_CXX_WARNING_LEVEL 4) - if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - else(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") - endif(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") - - # Disable C++ exceptions. - string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-") - add_definitions(-D_HAS_EXCEPTIONS=0) - - # Disable RTTI. - string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") -else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # Use -Wall for clang and gcc. - if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") - - # Use -Wextra for clang and gcc. - if(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") - endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") - - # Use -Werror for clang and gcc. - if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") - - # Disable C++ exceptions. - string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") - - # Disable RTTI. - string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") -endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - -option(CRC32C_BUILD_TESTS "Build CRC32C's unit tests" ON) -option(CRC32C_BUILD_BENCHMARKS "Build CRC32C's benchmarks" ON) -option(CRC32C_USE_GLOG "Build CRC32C's tests with Google Logging" ON) -option(CRC32C_INSTALL "Install CRC32C's header and library" ON) - -include(TestBigEndian) -test_big_endian(BYTE_ORDER_BIG_ENDIAN) - -include(CheckCXXCompilerFlag) -# Used by glog. -check_cxx_compiler_flag(-Wno-deprecated CRC32C_HAVE_NO_DEPRECATED) -# Used by glog. -check_cxx_compiler_flag(-Wno-sign-compare CRC32C_HAVE_NO_SIGN_COMPARE) -# Used by glog. -check_cxx_compiler_flag(-Wno-unused-parameter CRC32C_HAVE_NO_UNUSED_PARAMETER) -# Used by googletest. -check_cxx_compiler_flag(-Wno-missing-field-initializers - CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS) - -# Check for __builtin_prefetch support in the compiler. -include(CheckCXXSourceCompiles) -check_cxx_source_compiles(" -int main() { - char data = 0; - const char* address = &data; - __builtin_prefetch(address, 0, 0); - return 0; -} -" HAVE_BUILTIN_PREFETCH) - -# Check for _mm_prefetch support in the compiler. -include(CheckCXXSourceCompiles) -check_cxx_source_compiles(" -#if defined(_MSC_VER) -#include -#else // !defined(_MSC_VER) -#include -#endif // defined(_MSC_VER) - -int main() { - char data = 0; - const char* address = &data; - _mm_prefetch(address, _MM_HINT_NTA); - return 0; -} -" HAVE_MM_PREFETCH) - -# Check for SSE4.2 support in the compiler. -set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /arch:AVX") -else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.2") -endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -check_cxx_source_compiles(" -#if defined(_MSC_VER) -#include -#else // !defined(_MSC_VER) -#include -#include -#endif // defined(_MSC_VER) - -int main() { - _mm_crc32_u8(0, 0); _mm_crc32_u32(0, 0); -#if defined(_M_X64) || defined(__x86_64__) - _mm_crc32_u64(0, 0); -#endif // defined(_M_X64) || defined(__x86_64__) - return 0; -} -" HAVE_SSE42) -set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS}) - -# Check for ARMv8 w/ CRC and CRYPTO extensions support in the compiler. -set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS}) -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # TODO(pwnall): Insert correct flag when VS gets ARM CRC32C support. - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /arch:NOTYET") -else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv8-a+crc+crypto") -endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -check_cxx_source_compiles(" -#include -#include - -int main() { - __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0); - vmull_p64(0, 0); - return 0; -} -" HAVE_ARM64_CRC32C) -set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS}) - -# Check for strong getauxval() support in the system headers. -check_cxx_source_compiles(" -#include -#include -#include - -int main() { - getauxval(AT_HWCAP); - return 0; -} -" HAVE_STRONG_GETAUXVAL) - -# Check for weak getauxval() support in the compiler. -check_cxx_source_compiles(" -unsigned long getauxval(unsigned long type) __attribute__((weak)); -#define AT_HWCAP 16 - -int main() { - getauxval(AT_HWCAP); - return 0; -} -" HAVE_WEAK_GETAUXVAL) - -if(CRC32C_USE_GLOG) - # glog requires this setting to avoid using dynamic_cast. - set(DISABLE_RTTI ON CACHE BOOL "" FORCE) - - # glog's test targets trigger deprecation warnings, and compiling them burns - # CPU cycles on the CI. - set(BUILD_TESTING_SAVED "${BUILD_TESTING}") - set(BUILD_TESTING OFF CACHE BOOL "" FORCE) - add_subdirectory("third_party/glog" EXCLUDE_FROM_ALL) - set(BUILD_TESTING "${BUILD_TESTING_SAVED}" CACHE BOOL "" FORCE) - - # glog triggers deprecation warnings on OSX. - # https://github.com/google/glog/issues/185 - if(CRC32C_HAVE_NO_DEPRECATED) - set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-deprecated) - endif(CRC32C_HAVE_NO_DEPRECATED) - - # glog triggers sign comparison warnings on gcc. - if(CRC32C_HAVE_NO_SIGN_COMPARE) - set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-sign-compare) - endif(CRC32C_HAVE_NO_SIGN_COMPARE) - - # glog triggers unused parameter warnings on clang. - if(CRC32C_HAVE_NO_UNUSED_PARAMETER) - set_property(TARGET glog - APPEND PROPERTY COMPILE_OPTIONS -Wno-unused-parameter) - endif(CRC32C_HAVE_NO_UNUSED_PARAMETER) - - set(CRC32C_TESTS_BUILT_WITH_GLOG 1) -endif(CRC32C_USE_GLOG) - -configure_file( - "src/crc32c_config.h.in" - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" -) - -include_directories("${PROJECT_BINARY_DIR}/include") - -# ARM64 CRC32C code is built separately, so we don't accidentally compile -# unsupported instructions into code that gets run without ARM32 support. -add_library(crc32c_arm64 OBJECT "") -target_sources(crc32c_arm64 - PRIVATE - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" - "src/crc32c_arm64.cc" - "src/crc32c_arm64.h" -) -if(HAVE_ARM64_CRC32C) - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # TODO(pwnall): Insert correct flag when VS gets ARM64 CRC32C support. - target_compile_options(crc32c_arm64 PRIVATE "/arch:NOTYET") - else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(crc32c_arm64 PRIVATE "-march=armv8-a+crc+crypto") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -endif(HAVE_ARM64_CRC32C) - -# CMake only enables PIC by default in SHARED and MODULE targets. -if(BUILD_SHARED_LIBS) - set_property(TARGET crc32c_arm64 PROPERTY POSITION_INDEPENDENT_CODE TRUE) -endif(BUILD_SHARED_LIBS) - -# SSE4.2 code is built separately, so we don't accidentally compile unsupported -# instructions into code that gets run without SSE4.2 support. -add_library(crc32c_sse42 OBJECT "") -target_sources(crc32c_sse42 - PRIVATE - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" - "src/crc32c_sse42.cc" - "src/crc32c_sse42.h" -) -if(HAVE_SSE42) - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(crc32c_sse42 PRIVATE "/arch:AVX") - else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(crc32c_sse42 PRIVATE "-msse4.2") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -endif(HAVE_SSE42) - -# CMake only enables PIC by default in SHARED and MODULE targets. -if(BUILD_SHARED_LIBS) - set_property(TARGET crc32c_sse42 PROPERTY POSITION_INDEPENDENT_CODE TRUE) -endif(BUILD_SHARED_LIBS) - -# Must be included before CMAKE_INSTALL_INCLUDEDIR is used. -include(GNUInstallDirs) - -add_library(crc32c "" - # TODO(pwnall): Move the TARGET_OBJECTS generator expressions to the PRIVATE - # section of target_sources when cmake_minimum_required becomes 3.9 or above. - $ - $ -) -target_sources(crc32c - PRIVATE - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" - "src/crc32c_arm64.h" - "src/crc32c_arm64_check.h" - "src/crc32c_internal.h" - "src/crc32c_portable.cc" - "src/crc32c_prefetch.h" - "src/crc32c_read_le.h" - "src/crc32c_round_up.h" - "src/crc32c_sse42.h" - "src/crc32c_sse42_check.h" - "src/crc32c.cc" - - # Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". - $<$:PUBLIC> - "include/crc32c/crc32c.h" -) - -target_include_directories(crc32c - PUBLIC - $ - $ -) - -set_target_properties(crc32c - PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) - -# Warnings as errors in Visual Studio for this project's targets. -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set_property(TARGET crc32c APPEND PROPERTY COMPILE_OPTIONS "/WX") - set_property(TARGET crc32c_arm64 APPEND PROPERTY COMPILE_OPTIONS "/WX") - set_property(TARGET crc32c_sse42 APPEND PROPERTY COMPILE_OPTIONS "/WX") -endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - -if(CRC32C_BUILD_TESTS) - enable_testing() - - # Prevent overriding the parent project's compiler/linker settings on Windows. - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - set(install_gtest OFF) - set(install_gmock OFF) - - # This project is tested using GoogleTest. - add_subdirectory("third_party/googletest") - - # GoogleTest triggers a missing field initializers warning. - if(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS) - set_property(TARGET gtest - APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) - set_property(TARGET gmock - APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) - endif(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS) - - add_executable(crc32c_tests "") - target_sources(crc32c_tests - PRIVATE - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" - "src/crc32c_arm64_unittest.cc" - "src/crc32c_extend_unittests.h" - "src/crc32c_portable_unittest.cc" - "src/crc32c_prefetch_unittest.cc" - "src/crc32c_read_le_unittest.cc" - "src/crc32c_round_up_unittest.cc" - "src/crc32c_sse42_unittest.cc" - "src/crc32c_unittest.cc" - "src/crc32c_test_main.cc" - ) - target_link_libraries(crc32c_tests crc32c gtest) - - # Warnings as errors in Visual Studio for this project's targets. - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set_property(TARGET crc32c_tests APPEND PROPERTY COMPILE_OPTIONS "/WX") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - - if(CRC32C_USE_GLOG) - target_link_libraries(crc32c_tests glog) - endif(CRC32C_USE_GLOG) - - add_test(NAME crc32c_tests COMMAND crc32c_tests) - - add_executable(crc32c_capi_tests "") - target_sources(crc32c_capi_tests - PRIVATE - "src/crc32c_capi_unittest.c" - ) - target_link_libraries(crc32c_capi_tests crc32c) - - # Warnings as errors in Visual Studio for this project's targets. - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set_property(TARGET crc32c_capi_tests APPEND PROPERTY COMPILE_OPTIONS "/WX") - - # The Windows SDK version currently on CI produces warnings when some - # headers are #included using C99 compatibity mode or above. This workaround - # can be removed once the Windows SDK on our CI is upgraded. - set_property(TARGET crc32c_capi_tests - APPEND PROPERTY COMPILE_OPTIONS "/wd5105") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - - add_test(NAME crc32c_capi_tests COMMAND crc32c_capi_tests) -endif(CRC32C_BUILD_TESTS) - -if(CRC32C_BUILD_BENCHMARKS) - add_executable(crc32c_bench "") - target_sources(crc32c_bench - PRIVATE - "${PROJECT_BINARY_DIR}/include/crc32c/crc32c_config.h" - "src/crc32c_benchmark.cc" - ) - target_link_libraries(crc32c_bench crc32c) - - # This project uses Google benchmark for benchmarking. - set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE) - set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE) - add_subdirectory("third_party/benchmark") - target_link_libraries(crc32c_bench benchmark) - - if(CRC32C_USE_GLOG) - target_link_libraries(crc32c_bench glog) - endif(CRC32C_USE_GLOG) - - # Warnings as errors in Visual Studio for this project's targets. - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set_property(TARGET crc32c_bench APPEND PROPERTY COMPILE_OPTIONS "/WX") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") -endif(CRC32C_BUILD_BENCHMARKS) - -if(CRC32C_INSTALL) - install(TARGETS crc32c - EXPORT Crc32cTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) - install( - FILES - "include/crc32c/crc32c.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/crc32c" - ) - - include(CMakePackageConfigHelpers) - configure_package_config_file( - "${PROJECT_NAME}Config.cmake.in" - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" - INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - ) - write_basic_package_version_file( - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" - COMPATIBILITY SameMajorVersion - ) - install( - EXPORT Crc32cTargets - NAMESPACE Crc32c:: - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - ) - install( - FILES - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" - "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - ) -endif(CRC32C_INSTALL) diff --git a/third_party/crc32c/CONTRIBUTING.md b/third_party/crc32c/CONTRIBUTING.md deleted file mode 100644 index ae319c7..0000000 --- a/third_party/crc32c/CONTRIBUTING.md +++ /dev/null @@ -1,23 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution, -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. diff --git a/third_party/crc32c/Crc32cConfig.cmake.in b/third_party/crc32c/Crc32cConfig.cmake.in deleted file mode 100644 index c6b8fc7..0000000 --- a/third_party/crc32c/Crc32cConfig.cmake.in +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2017 The CRC32C Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. See the AUTHORS file for names of contributors. - -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/Crc32cTargets.cmake") - -check_required_components(Crc32c) diff --git a/third_party/crc32c/LICENSE b/third_party/crc32c/LICENSE deleted file mode 100644 index 8c8735c..0000000 --- a/third_party/crc32c/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2017, The CRC32C Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/crc32c/README.md b/third_party/crc32c/README.md deleted file mode 100644 index bb64bae..0000000 --- a/third_party/crc32c/README.md +++ /dev/null @@ -1,124 +0,0 @@ -# CRC32C - -[![Build Status](https://github.com/google/crc32c/actions/workflows/build.yml/badge.svg)](https://github.com/google/crc32c/actions/workflows/build.yml) - -New file format authors should consider -[HighwayHash](https://github.com/google/highwayhash). The initial version of -this code was extracted from [LevelDB](https://github.com/google/leveldb), which -is a stable key-value store that is widely used at Google. - -This project collects a few CRC32C implementations under an umbrella that -dispatches to a suitable implementation based on the host computer's hardware -capabilities. - -CRC32C is specified as the CRC that uses the iSCSI polynomial in -[RFC 3720](https://tools.ietf.org/html/rfc3720#section-12.1). The polynomial was -introduced by G. Castagnoli, S. Braeuer and M. Herrmann. CRC32C is used in -software such as Btrfs, ext4, Ceph and leveldb. - - -## Usage - -```cpp -#include "crc32c/crc32c.h" - -int main() { - const std::uint8_t buffer[] = {0, 0, 0, 0}; - std::uint32_t result; - - // Process a raw buffer. - result = crc32c::Crc32c(buffer, 4); - - // Process a std::string. - std::string string; - string.resize(4); - result = crc32c::Crc32c(string); - - // If you have C++17 support, process a std::string_view. - std::string_view string_view(string); - result = crc32c::Crc32c(string_view); - - return 0; -} -``` - - -## Prerequisites - -This project uses [CMake](https://cmake.org/) for building and testing. CMake is -available in all popular Linux distributions, as well as in -[Homebrew](https://brew.sh/). - -This project uses submodules for dependency management. - -```bash -git submodule update --init --recursive -``` - -If you're using [Atom](https://atom.io/), the following packages can help. - -```bash -apm install autocomplete-clang build build-cmake clang-format language-cmake \ - linter linter-clang -``` - -If you don't mind more setup in return for more speed, replace -`autocomplete-clang` and `linter-clang` with `you-complete-me`. This requires -[setting up ycmd](https://github.com/ycm-core/ycmd#building). - -```bash -apm install autocomplete-plus build build-cmake clang-format language-cmake \ - linter you-complete-me -``` - -## Building - -The following commands build and install the project. - -```bash -mkdir build -cd build -cmake -DCRC32C_BUILD_TESTS=0 -DCRC32C_BUILD_BENCHMARKS=0 .. && make all install -``` - - -## Development - -The following command (when executed from `build/`) (re)builds the project and -runs the tests. - -```bash -cmake .. && cmake --build . && ctest --output-on-failure -``` - - -### Android testing - -The following command builds the project against the Android NDK, which is -useful for benchmarking against ARM processors. - -```bash -cmake .. -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \ - -DCMAKE_ANDROID_NDK=$HOME/Library/Android/sdk/ndk-bundle \ - -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \ - -DCMAKE_ANDROID_STL_TYPE=c++_static -DCRC32C_USE_GLOG=0 \ - -DCMAKE_BUILD_TYPE=Release && cmake --build . -``` - -The following commands install and run the benchmarks. - -```bash -adb push crc32c_bench /data/local/tmp -adb shell chmod +x /data/local/tmp/crc32c_bench -adb shell 'cd /data/local/tmp && ./crc32c_bench' -adb shell rm /data/local/tmp/crc32c_bench -``` - -The following commands install and run the tests. - -```bash -adb push crc32c_tests /data/local/tmp -adb shell chmod +x /data/local/tmp/crc32c_tests -adb shell 'cd /data/local/tmp && ./crc32c_tests' -adb shell rm /data/local/tmp/crc32c_tests -``` diff --git a/third_party/crc32c/include/crc32c/crc32c.h b/third_party/crc32c/include/crc32c/crc32c.h deleted file mode 100644 index e8a7817..0000000 --- a/third_party/crc32c/include/crc32c/crc32c.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright 2017 The CRC32C Authors. All rights reserved. - Use of this source code is governed by a BSD-style license that can be - found in the LICENSE file. See the AUTHORS file for names of contributors. */ - -#ifndef CRC32C_CRC32C_H_ -#define CRC32C_CRC32C_H_ - -/* The API exported by the CRC32C project. */ - -#if defined(__cplusplus) - -#include -#include -#include - -#else /* !defined(__cplusplus) */ - -#include -#include - -#endif /* !defined(__cplusplus) */ - - -/* The C API. */ - -#if defined(__cplusplus) -extern "C" { -#endif /* defined(__cplusplus) */ - -/* Extends "crc" with the CRC32C of "count" bytes in the buffer pointed by - "data" */ -uint32_t crc32c_extend(uint32_t crc, const uint8_t* data, size_t count); - -/* Computes the CRC32C of "count" bytes in the buffer pointed by "data". */ -uint32_t crc32c_value(const uint8_t* data, size_t count); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif /* defined(__cplusplus) */ - - -/* The C++ API. */ - -#if defined(__cplusplus) - -namespace crc32c { - -// Extends "crc" with the CRC32C of "count" bytes in the buffer pointed by -// "data". -uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count); - -// Computes the CRC32C of "count" bytes in the buffer pointed by "data". -inline uint32_t Crc32c(const uint8_t* data, size_t count) { - return Extend(0, data, count); -} - -// Computes the CRC32C of "count" bytes in the buffer pointed by "data". -inline uint32_t Crc32c(const char* data, size_t count) { - return Extend(0, reinterpret_cast(data), count); -} - -// Computes the CRC32C of the string's content. -inline uint32_t Crc32c(const std::string& string) { - return Crc32c(reinterpret_cast(string.data()), - string.size()); -} - -} // namespace crc32c - -#if __cplusplus > 201402L -#if __has_include() -#include - -namespace crc32c { - -// Computes the CRC32C of the bytes in the string_view. -inline uint32_t Crc32c(const std::string_view& string_view) { - return Crc32c(reinterpret_cast(string_view.data()), - string_view.size()); -} - -} // namespace crc32c - -#endif // __has_include() -#endif // __cplusplus > 201402L - -#endif /* defined(__cplusplus) */ - -#endif // CRC32C_CRC32C_H_ diff --git a/third_party/crc32c/src/crc32c.cc b/third_party/crc32c/src/crc32c.cc deleted file mode 100644 index 804133b..0000000 --- a/third_party/crc32c/src/crc32c.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "crc32c/crc32c.h" - -#include -#include - -#include "./crc32c_arm64.h" -#include "./crc32c_arm64_check.h" -#include "./crc32c_internal.h" -#include "./crc32c_sse42.h" -#include "./crc32c_sse42_check.h" - -namespace crc32c { - -uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) { -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - static bool can_use_sse42 = CanUseSse42(); - if (can_use_sse42) return ExtendSse42(crc, data, count); -#elif HAVE_ARM64_CRC32C - static bool can_use_arm64_crc32 = CanUseArm64Crc32(); - if (can_use_arm64_crc32) return ExtendArm64(crc, data, count); -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - - return ExtendPortable(crc, data, count); -} - -extern "C" uint32_t crc32c_extend(uint32_t crc, const uint8_t* data, - size_t count) { - return crc32c::Extend(crc, data, count); -} - -extern "C" uint32_t crc32c_value(const uint8_t* data, size_t count) { - return crc32c::Crc32c(data, count); -} - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_arm64.cc b/third_party/crc32c/src/crc32c_arm64.cc deleted file mode 100644 index 2595135..0000000 --- a/third_party/crc32c/src/crc32c_arm64.cc +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_arm64.h" - -// In a separate source file to allow this accelerated CRC32C function to be -// compiled with the appropriate compiler flags to enable ARM NEON CRC32C -// instructions. - -// This implementation is based on https://github.com/google/leveldb/pull/490. - -#include -#include - -#include "./crc32c_internal.h" -#include "crc32c/crc32c_config.h" - -#if HAVE_ARM64_CRC32C - -#include -#include - -#define KBYTES 1032 -#define SEGMENTBYTES 256 - -// compute 8bytes for each segment parallelly -#define CRC32C32BYTES(P, IND) \ - do { \ - crc1 = __crc32cd( \ - crc1, *((const uint64_t *)(P) + (SEGMENTBYTES / 8) * 1 + (IND))); \ - crc2 = __crc32cd( \ - crc2, *((const uint64_t *)(P) + (SEGMENTBYTES / 8) * 2 + (IND))); \ - crc3 = __crc32cd( \ - crc3, *((const uint64_t *)(P) + (SEGMENTBYTES / 8) * 3 + (IND))); \ - crc0 = __crc32cd( \ - crc0, *((const uint64_t *)(P) + (SEGMENTBYTES / 8) * 0 + (IND))); \ - } while (0); - -// compute 8*8 bytes for each segment parallelly -#define CRC32C256BYTES(P, IND) \ - do { \ - CRC32C32BYTES((P), (IND)*8 + 0) \ - CRC32C32BYTES((P), (IND)*8 + 1) \ - CRC32C32BYTES((P), (IND)*8 + 2) \ - CRC32C32BYTES((P), (IND)*8 + 3) \ - CRC32C32BYTES((P), (IND)*8 + 4) \ - CRC32C32BYTES((P), (IND)*8 + 5) \ - CRC32C32BYTES((P), (IND)*8 + 6) \ - CRC32C32BYTES((P), (IND)*8 + 7) \ - } while (0); - -// compute 4*8*8 bytes for each segment parallelly -#define CRC32C1024BYTES(P) \ - do { \ - CRC32C256BYTES((P), 0) \ - CRC32C256BYTES((P), 1) \ - CRC32C256BYTES((P), 2) \ - CRC32C256BYTES((P), 3) \ - (P) += 4 * SEGMENTBYTES; \ - } while (0) - -namespace crc32c { - -uint32_t ExtendArm64(uint32_t crc, const uint8_t *data, size_t size) { - int64_t length = size; - uint32_t crc0, crc1, crc2, crc3; - uint64_t t0, t1, t2; - - // k0=CRC(x^(3*SEGMENTBYTES*8)), k1=CRC(x^(2*SEGMENTBYTES*8)), - // k2=CRC(x^(SEGMENTBYTES*8)) - const poly64_t k0 = 0x8d96551c, k1 = 0xbd6f81f8, k2 = 0xdcb17aa4; - - crc = crc ^ kCRC32Xor; - - while (length >= KBYTES) { - crc0 = crc; - crc1 = 0; - crc2 = 0; - crc3 = 0; - - // Process 1024 bytes in parallel. - CRC32C1024BYTES(data); - - // Merge the 4 partial CRC32C values. - t2 = (uint64_t)vmull_p64(crc2, k2); - t1 = (uint64_t)vmull_p64(crc1, k1); - t0 = (uint64_t)vmull_p64(crc0, k0); - crc = __crc32cd(crc3, *(uint64_t *)data); - data += sizeof(uint64_t); - crc ^= __crc32cd(0, t2); - crc ^= __crc32cd(0, t1); - crc ^= __crc32cd(0, t0); - - length -= KBYTES; - } - - while (length >= 8) { - crc = __crc32cd(crc, *(uint64_t *)data); - data += 8; - length -= 8; - } - - if (length & 4) { - crc = __crc32cw(crc, *(uint32_t *)data); - data += 4; - } - - if (length & 2) { - crc = __crc32ch(crc, *(uint16_t *)data); - data += 2; - } - - if (length & 1) { - crc = __crc32cb(crc, *data); - } - - return crc ^ kCRC32Xor; -} - -} // namespace crc32c - -#endif // HAVE_ARM64_CRC32C diff --git a/third_party/crc32c/src/crc32c_arm64.h b/third_party/crc32c/src/crc32c_arm64.h deleted file mode 100644 index dedd27e..0000000 --- a/third_party/crc32c/src/crc32c_arm64.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -// ARM-specific code - -#ifndef CRC32C_CRC32C_ARM_H_ -#define CRC32C_CRC32C_ARM_H_ - -#include -#include - -#include "crc32c/crc32c_config.h" - -#if HAVE_ARM64_CRC32C - -namespace crc32c { - -uint32_t ExtendArm64(uint32_t crc, const uint8_t* data, size_t count); - -} // namespace crc32c - -#endif // HAVE_ARM64_CRC32C - -#endif // CRC32C_CRC32C_ARM_H_ diff --git a/third_party/crc32c/src/crc32c_arm64_check.h b/third_party/crc32c/src/crc32c_arm64_check.h deleted file mode 100644 index c5a5e46..0000000 --- a/third_party/crc32c/src/crc32c_arm64_check.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -// ARM-specific code checking for the availability of CRC32C instructions. - -#ifndef CRC32C_CRC32C_ARM_CHECK_H_ -#define CRC32C_CRC32C_ARM_CHECK_H_ - -#include -#include - -#include "crc32c/crc32c_config.h" - -#if HAVE_ARM64_CRC32C - -#ifdef __linux__ -#if HAVE_STRONG_GETAUXVAL -#include -#elif HAVE_WEAK_GETAUXVAL -// getauxval() is not available on Android until API level 20. Link it as a weak -// symbol. -extern "C" unsigned long getauxval(unsigned long type) __attribute__((weak)); - -#define AT_HWCAP 16 -#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL -#endif // defined (__linux__) - -#ifdef __APPLE__ -#include -#include -#endif // defined (__APPLE__) - -namespace crc32c { - -inline bool CanUseArm64Crc32() { -#if defined (__linux__) && (HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL) - // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code. - constexpr unsigned long kHWCAP_PMULL = 1 << 4; - constexpr unsigned long kHWCAP_CRC32 = 1 << 7; - unsigned long hwcap = -#if HAVE_STRONG_GETAUXVAL - // Some compilers warn on (&getauxval != nullptr) in the block below. - getauxval(AT_HWCAP); -#elif HAVE_WEAK_GETAUXVAL - (&getauxval != nullptr) ? getauxval(AT_HWCAP) : 0; -#else -#error This is supposed to be nested inside a check for HAVE_*_GETAUXVAL. -#endif // HAVE_STRONG_GETAUXVAL - return (hwcap & (kHWCAP_PMULL | kHWCAP_CRC32)) == - (kHWCAP_PMULL | kHWCAP_CRC32); -#elif defined(__APPLE__) - int val = 0; - size_t len = sizeof(val); - return sysctlbyname("hw.optional.armv8_crc32", &val, &len, nullptr, 0) == 0 - && val != 0; -#else - return false; -#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL -} - -} // namespace crc32c - -#endif // HAVE_ARM64_CRC32C - -#endif // CRC32C_CRC32C_ARM_CHECK_H_ diff --git a/third_party/crc32c/src/crc32c_arm64_unittest.cc b/third_party/crc32c/src/crc32c_arm64_unittest.cc deleted file mode 100644 index 6f917d9..0000000 --- a/third_party/crc32c/src/crc32c_arm64_unittest.cc +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "gtest/gtest.h" - -#include "./crc32c_arm64.h" -#include "./crc32c_extend_unittests.h" - -namespace crc32c { - -#if HAVE_ARM64_CRC32C - -struct Arm64TestTraits { - static uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) { - return ExtendArm64(crc, data, count); - } -}; - -INSTANTIATE_TYPED_TEST_SUITE_P(Arm64, ExtendTest, Arm64TestTraits); - -#endif // HAVE_ARM64_CRC32C - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_benchmark.cc b/third_party/crc32c/src/crc32c_benchmark.cc deleted file mode 100644 index 68510a2..0000000 --- a/third_party/crc32c/src/crc32c_benchmark.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include -#include - -#include "crc32c/crc32c_config.h" - -#include "benchmark/benchmark.h" - -#if CRC32C_TESTS_BUILT_WITH_GLOG -#include "glog/logging.h" -#endif // CRC32C_TESTS_BUILT_WITH_GLOG - -#include "./crc32c_arm64.h" -#include "./crc32c_arm64_check.h" -#include "./crc32c_internal.h" -#include "./crc32c_sse42.h" -#include "./crc32c_sse42_check.h" -#include "crc32c/crc32c.h" - -class CRC32CBenchmark : public benchmark::Fixture { - public: - void SetUp(const benchmark::State& state) override { - block_size_ = static_cast(state.range(0)); - block_data_ = std::string(block_size_, 'x'); - block_buffer_ = reinterpret_cast(block_data_.data()); - } - - protected: - std::string block_data_; - const uint8_t* block_buffer_; - size_t block_size_; -}; - -BENCHMARK_DEFINE_F(CRC32CBenchmark, Public)(benchmark::State& state) { - uint32_t crc = 0; - for (auto _ : state) - crc = crc32c::Extend(crc, block_buffer_, block_size_); - state.SetBytesProcessed(state.iterations() * block_size_); -} -BENCHMARK_REGISTER_F(CRC32CBenchmark, Public) - ->RangeMultiplier(16) - ->Range(256, 16777216); // Block size. - -BENCHMARK_DEFINE_F(CRC32CBenchmark, Portable)(benchmark::State& state) { - uint32_t crc = 0; - for (auto _ : state) - crc = crc32c::ExtendPortable(crc, block_buffer_, block_size_); - state.SetBytesProcessed(state.iterations() * block_size_); -} -BENCHMARK_REGISTER_F(CRC32CBenchmark, Portable) - ->RangeMultiplier(16) - ->Range(256, 16777216); // Block size. - -#if HAVE_ARM64_CRC32C - -BENCHMARK_DEFINE_F(CRC32CBenchmark, ArmCRC32C)(benchmark::State& state) { - if (!crc32c::CanUseArm64Crc32()) { - state.SkipWithError("ARM CRC32C instructions not available or not enabled"); - return; - } - - uint32_t crc = 0; - for (auto _ : state) - crc = crc32c::ExtendArm64(crc, block_buffer_, block_size_); - state.SetBytesProcessed(state.iterations() * block_size_); -} -BENCHMARK_REGISTER_F(CRC32CBenchmark, ArmCRC32C) - ->RangeMultiplier(16) - ->Range(256, 16777216); // Block size. - -#endif // HAVE_ARM64_CRC32C - -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -BENCHMARK_DEFINE_F(CRC32CBenchmark, Sse42)(benchmark::State& state) { - if (!crc32c::CanUseSse42()) { - state.SkipWithError("SSE4.2 instructions not available or not enabled"); - return; - } - - uint32_t crc = 0; - for (auto _ : state) - crc = crc32c::ExtendSse42(crc, block_buffer_, block_size_); - state.SetBytesProcessed(state.iterations() * block_size_); -} -BENCHMARK_REGISTER_F(CRC32CBenchmark, Sse42) - ->RangeMultiplier(16) - ->Range(256, 16777216); // Block size. - -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -int main(int argc, char** argv) { -#if CRC32C_TESTS_BUILT_WITH_GLOG - google::InitGoogleLogging(argv[0]); - google::InstallFailureSignalHandler(); -#endif // CRC32C_TESTS_BUILT_WITH_GLOG - - benchmark::Initialize(&argc, argv); - benchmark::RunSpecifiedBenchmarks(); - return 0; -} diff --git a/third_party/crc32c/src/crc32c_capi_unittest.c b/third_party/crc32c/src/crc32c_capi_unittest.c deleted file mode 100644 index c8993a0..0000000 --- a/third_party/crc32c/src/crc32c_capi_unittest.c +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "crc32c/crc32c.h" - -#include -#include -#include -#include -#include - -int main() { - /* From rfc3720 section B.4. */ - uint8_t buf[32]; - - memset(buf, 0, sizeof(buf)); - if ((uint32_t)0x8a9136aa != crc32c_value(buf, sizeof(buf))) { - printf("crc32c_value(zeros) test failed\n"); - return 1; - } - - memset(buf, 0xff, sizeof(buf)); - if ((uint32_t)0x62a8ab43 != crc32c_value(buf, sizeof(buf))) { - printf("crc32c_value(0xff) test failed\n"); - return 1; - } - - for (size_t i = 0; i < 32; ++i) - buf[i] = (uint8_t)i; - if ((uint32_t)0x46dd794e != crc32c_value(buf, sizeof(buf))) { - printf("crc32c_value(0..31) test failed\n"); - return 1; - } - - for (size_t i = 0; i < 32; ++i) - buf[i] = (uint8_t)(31 - i); - if ((uint32_t)0x113fdb5c != crc32c_value(buf, sizeof(buf))) { - printf("crc32c_value(31..0) test failed\n"); - return 1; - } - - uint8_t data[48] = { - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - if ((uint32_t)0xd9963a56 != crc32c_value(data, sizeof(data))) { - printf("crc32c_value(31..0) test failed\n"); - return 1; - } - - const uint8_t* hello_space_world = (const uint8_t*)"hello world"; - const uint8_t* hello_space = (const uint8_t*)"hello "; - const uint8_t* world = (const uint8_t*)"world"; - - if (crc32c_value(hello_space_world, 11) != - crc32c_extend(crc32c_value(hello_space, 6), world, 5)) { - printf("crc32c_extend test failed\n"); - return 1; - } - - printf("All tests passed\n"); - return 0; -} diff --git a/third_party/crc32c/src/crc32c_config.h.in b/third_party/crc32c/src/crc32c_config.h.in deleted file mode 100644 index 4034fa5..0000000 --- a/third_party/crc32c/src/crc32c_config.h.in +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_CONFIG_H_ -#define CRC32C_CRC32C_CONFIG_H_ - -// Define to 1 if building for a big-endian platform. -#cmakedefine01 BYTE_ORDER_BIG_ENDIAN - -// Define to 1 if the compiler has the __builtin_prefetch intrinsic. -#cmakedefine01 HAVE_BUILTIN_PREFETCH - -// Define to 1 if targeting X86 and the compiler has the _mm_prefetch intrinsic. -#cmakedefine01 HAVE_MM_PREFETCH - -// Define to 1 if targeting X86 and the compiler has the _mm_crc32_u{8,32,64} -// intrinsics. -#cmakedefine01 HAVE_SSE42 - -// Define to 1 if targeting ARM and the compiler has the __crc32c{b,h,w,d} and -// the vmull_p64 intrinsics. -#cmakedefine01 HAVE_ARM64_CRC32C - -// Define to 1 if the system libraries have the getauxval function in the -// header. Should be true on Linux and Android API level 20+. -#cmakedefine01 HAVE_STRONG_GETAUXVAL - -// Define to 1 if the compiler supports defining getauxval as a weak symbol. -// Should be true for any compiler that supports __attribute__((weak)). -#cmakedefine01 HAVE_WEAK_GETAUXVAL - -// Define to 1 if CRC32C tests have been built with Google Logging. -#cmakedefine01 CRC32C_TESTS_BUILT_WITH_GLOG - -#endif // CRC32C_CRC32C_CONFIG_H_ diff --git a/third_party/crc32c/src/crc32c_extend_unittests.h b/third_party/crc32c/src/crc32c_extend_unittests.h deleted file mode 100644 index 0732973..0000000 --- a/third_party/crc32c/src/crc32c_extend_unittests.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_EXTEND_UNITTESTS_H_ -#define CRC32C_CRC32C_EXTEND_UNITTESTS_H_ - -#include -#include -#include - -#include "gtest/gtest.h" - -// Common test cases for all implementations of CRC32C_Extend(). - -namespace crc32c { - -template -class ExtendTest : public testing::Test {}; - -TYPED_TEST_SUITE_P(ExtendTest); - -TYPED_TEST_P(ExtendTest, StandardResults) { - // From rfc3720 section B.4. - uint8_t buf[32]; - - std::memset(buf, 0, sizeof(buf)); - EXPECT_EQ(static_cast(0x8a9136aa), - TypeParam::Extend(0, buf, sizeof(buf))); - - std::memset(buf, 0xff, sizeof(buf)); - EXPECT_EQ(static_cast(0x62a8ab43), - TypeParam::Extend(0, buf, sizeof(buf))); - - for (int i = 0; i < 32; ++i) - buf[i] = static_cast(i); - EXPECT_EQ(static_cast(0x46dd794e), - TypeParam::Extend(0, buf, sizeof(buf))); - - for (int i = 0; i < 32; ++i) - buf[i] = static_cast(31 - i); - EXPECT_EQ(static_cast(0x113fdb5c), - TypeParam::Extend(0, buf, sizeof(buf))); - - uint8_t data[48] = { - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - EXPECT_EQ(static_cast(0xd9963a56), - TypeParam::Extend(0, data, sizeof(data))); -} - -TYPED_TEST_P(ExtendTest, HelloWorld) { - const uint8_t* hello_space_world = - reinterpret_cast("hello world"); - const uint8_t* hello_space = reinterpret_cast("hello "); - const uint8_t* world = reinterpret_cast("world"); - - EXPECT_EQ(TypeParam::Extend(0, hello_space_world, 11), - TypeParam::Extend(TypeParam::Extend(0, hello_space, 6), world, 5)); -} - -TYPED_TEST_P(ExtendTest, BufferSlicing) { - uint8_t buffer[48] = { - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - - for (size_t i = 0; i < 48; ++i) { - for (size_t j = i + 1; j <= 48; ++j) { - uint32_t crc = 0; - - if (i > 0) crc = TypeParam::Extend(crc, buffer, i); - crc = TypeParam::Extend(crc, buffer + i, j - i); - if (j < 48) crc = TypeParam::Extend(crc, buffer + j, 48 - j); - - EXPECT_EQ(static_cast(0xd9963a56), crc); - } - } -} - -TYPED_TEST_P(ExtendTest, LargeBufferSlicing) { - uint8_t buffer[2048]; - for (size_t i = 0; i < 2048; i++) - buffer[i] = static_cast(3 * i * i + 7 * i + 11); - - for (size_t i = 0; i < 2048; ++i) { - for (size_t j = i + 1; j <= 2048; ++j) { - uint32_t crc = 0; - - if (i > 0) crc = TypeParam::Extend(crc, buffer, i); - crc = TypeParam::Extend(crc, buffer + i, j - i); - if (j < 2048) crc = TypeParam::Extend(crc, buffer + j, 2048 - j); - - EXPECT_EQ(static_cast(0x36dcc753), crc); - } - } -} - -REGISTER_TYPED_TEST_SUITE_P(ExtendTest, - StandardResults, - HelloWorld, - BufferSlicing, - LargeBufferSlicing); - -} // namespace crc32c - -#endif // CRC32C_CRC32C_EXTEND_UNITTESTS_H_ diff --git a/third_party/crc32c/src/crc32c_internal.h b/third_party/crc32c/src/crc32c_internal.h deleted file mode 100644 index 2bd23de..0000000 --- a/third_party/crc32c/src/crc32c_internal.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_INTERNAL_H_ -#define CRC32C_CRC32C_INTERNAL_H_ - -// Internal functions that may change between releases. - -#include -#include - -namespace crc32c { - -// Un-accelerated implementation that works on all CPUs. -uint32_t ExtendPortable(uint32_t crc, const uint8_t* data, size_t count); - -// CRCs are pre- and post- conditioned by xoring with all ones. -static constexpr const uint32_t kCRC32Xor = static_cast(0xffffffffU); - -} // namespace crc32c - -#endif // CRC32C_CRC32C_INTERNAL_H_ diff --git a/third_party/crc32c/src/crc32c_portable.cc b/third_party/crc32c/src/crc32c_portable.cc deleted file mode 100644 index 31ec6ea..0000000 --- a/third_party/crc32c/src/crc32c_portable.cc +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright 2008 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_internal.h" - -#include -#include - -#include "./crc32c_prefetch.h" -#include "./crc32c_read_le.h" -#include "./crc32c_round_up.h" - -namespace { - -const uint32_t kByteExtensionTable[256] = { - 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, - 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, - 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, - 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, - 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, - 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, - 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512, - 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, - 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, - 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, - 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf, - 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, - 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, - 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, - 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f, - 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, - 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, - 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, - 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e, - 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, - 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, - 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, - 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4, - 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, - 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, - 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, - 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5, - 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, - 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, - 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, - 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905, - 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, - 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, - 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, - 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8, - 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, - 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, - 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, - 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6, - 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, - 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, - 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, - 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351}; - -const uint32_t kStrideExtensionTable0[256] = { - 0x00000000, 0x30d23865, 0x61a470ca, 0x517648af, 0xc348e194, 0xf39ad9f1, - 0xa2ec915e, 0x923ea93b, 0x837db5d9, 0xb3af8dbc, 0xe2d9c513, 0xd20bfd76, - 0x4035544d, 0x70e76c28, 0x21912487, 0x11431ce2, 0x03171d43, 0x33c52526, - 0x62b36d89, 0x526155ec, 0xc05ffcd7, 0xf08dc4b2, 0xa1fb8c1d, 0x9129b478, - 0x806aa89a, 0xb0b890ff, 0xe1ced850, 0xd11ce035, 0x4322490e, 0x73f0716b, - 0x228639c4, 0x125401a1, 0x062e3a86, 0x36fc02e3, 0x678a4a4c, 0x57587229, - 0xc566db12, 0xf5b4e377, 0xa4c2abd8, 0x941093bd, 0x85538f5f, 0xb581b73a, - 0xe4f7ff95, 0xd425c7f0, 0x461b6ecb, 0x76c956ae, 0x27bf1e01, 0x176d2664, - 0x053927c5, 0x35eb1fa0, 0x649d570f, 0x544f6f6a, 0xc671c651, 0xf6a3fe34, - 0xa7d5b69b, 0x97078efe, 0x8644921c, 0xb696aa79, 0xe7e0e2d6, 0xd732dab3, - 0x450c7388, 0x75de4bed, 0x24a80342, 0x147a3b27, 0x0c5c750c, 0x3c8e4d69, - 0x6df805c6, 0x5d2a3da3, 0xcf149498, 0xffc6acfd, 0xaeb0e452, 0x9e62dc37, - 0x8f21c0d5, 0xbff3f8b0, 0xee85b01f, 0xde57887a, 0x4c692141, 0x7cbb1924, - 0x2dcd518b, 0x1d1f69ee, 0x0f4b684f, 0x3f99502a, 0x6eef1885, 0x5e3d20e0, - 0xcc0389db, 0xfcd1b1be, 0xada7f911, 0x9d75c174, 0x8c36dd96, 0xbce4e5f3, - 0xed92ad5c, 0xdd409539, 0x4f7e3c02, 0x7fac0467, 0x2eda4cc8, 0x1e0874ad, - 0x0a724f8a, 0x3aa077ef, 0x6bd63f40, 0x5b040725, 0xc93aae1e, 0xf9e8967b, - 0xa89eded4, 0x984ce6b1, 0x890ffa53, 0xb9ddc236, 0xe8ab8a99, 0xd879b2fc, - 0x4a471bc7, 0x7a9523a2, 0x2be36b0d, 0x1b315368, 0x096552c9, 0x39b76aac, - 0x68c12203, 0x58131a66, 0xca2db35d, 0xfaff8b38, 0xab89c397, 0x9b5bfbf2, - 0x8a18e710, 0xbacadf75, 0xebbc97da, 0xdb6eafbf, 0x49500684, 0x79823ee1, - 0x28f4764e, 0x18264e2b, 0x18b8ea18, 0x286ad27d, 0x791c9ad2, 0x49cea2b7, - 0xdbf00b8c, 0xeb2233e9, 0xba547b46, 0x8a864323, 0x9bc55fc1, 0xab1767a4, - 0xfa612f0b, 0xcab3176e, 0x588dbe55, 0x685f8630, 0x3929ce9f, 0x09fbf6fa, - 0x1baff75b, 0x2b7dcf3e, 0x7a0b8791, 0x4ad9bff4, 0xd8e716cf, 0xe8352eaa, - 0xb9436605, 0x89915e60, 0x98d24282, 0xa8007ae7, 0xf9763248, 0xc9a40a2d, - 0x5b9aa316, 0x6b489b73, 0x3a3ed3dc, 0x0aecebb9, 0x1e96d09e, 0x2e44e8fb, - 0x7f32a054, 0x4fe09831, 0xddde310a, 0xed0c096f, 0xbc7a41c0, 0x8ca879a5, - 0x9deb6547, 0xad395d22, 0xfc4f158d, 0xcc9d2de8, 0x5ea384d3, 0x6e71bcb6, - 0x3f07f419, 0x0fd5cc7c, 0x1d81cddd, 0x2d53f5b8, 0x7c25bd17, 0x4cf78572, - 0xdec92c49, 0xee1b142c, 0xbf6d5c83, 0x8fbf64e6, 0x9efc7804, 0xae2e4061, - 0xff5808ce, 0xcf8a30ab, 0x5db49990, 0x6d66a1f5, 0x3c10e95a, 0x0cc2d13f, - 0x14e49f14, 0x2436a771, 0x7540efde, 0x4592d7bb, 0xd7ac7e80, 0xe77e46e5, - 0xb6080e4a, 0x86da362f, 0x97992acd, 0xa74b12a8, 0xf63d5a07, 0xc6ef6262, - 0x54d1cb59, 0x6403f33c, 0x3575bb93, 0x05a783f6, 0x17f38257, 0x2721ba32, - 0x7657f29d, 0x4685caf8, 0xd4bb63c3, 0xe4695ba6, 0xb51f1309, 0x85cd2b6c, - 0x948e378e, 0xa45c0feb, 0xf52a4744, 0xc5f87f21, 0x57c6d61a, 0x6714ee7f, - 0x3662a6d0, 0x06b09eb5, 0x12caa592, 0x22189df7, 0x736ed558, 0x43bced3d, - 0xd1824406, 0xe1507c63, 0xb02634cc, 0x80f40ca9, 0x91b7104b, 0xa165282e, - 0xf0136081, 0xc0c158e4, 0x52fff1df, 0x622dc9ba, 0x335b8115, 0x0389b970, - 0x11ddb8d1, 0x210f80b4, 0x7079c81b, 0x40abf07e, 0xd2955945, 0xe2476120, - 0xb331298f, 0x83e311ea, 0x92a00d08, 0xa272356d, 0xf3047dc2, 0xc3d645a7, - 0x51e8ec9c, 0x613ad4f9, 0x304c9c56, 0x009ea433}; - -const uint32_t kStrideExtensionTable1[256] = { - 0x00000000, 0x54075546, 0xa80eaa8c, 0xfc09ffca, 0x55f123e9, 0x01f676af, - 0xfdff8965, 0xa9f8dc23, 0xabe247d2, 0xffe51294, 0x03eced5e, 0x57ebb818, - 0xfe13643b, 0xaa14317d, 0x561dceb7, 0x021a9bf1, 0x5228f955, 0x062fac13, - 0xfa2653d9, 0xae21069f, 0x07d9dabc, 0x53de8ffa, 0xafd77030, 0xfbd02576, - 0xf9cabe87, 0xadcdebc1, 0x51c4140b, 0x05c3414d, 0xac3b9d6e, 0xf83cc828, - 0x043537e2, 0x503262a4, 0xa451f2aa, 0xf056a7ec, 0x0c5f5826, 0x58580d60, - 0xf1a0d143, 0xa5a78405, 0x59ae7bcf, 0x0da92e89, 0x0fb3b578, 0x5bb4e03e, - 0xa7bd1ff4, 0xf3ba4ab2, 0x5a429691, 0x0e45c3d7, 0xf24c3c1d, 0xa64b695b, - 0xf6790bff, 0xa27e5eb9, 0x5e77a173, 0x0a70f435, 0xa3882816, 0xf78f7d50, - 0x0b86829a, 0x5f81d7dc, 0x5d9b4c2d, 0x099c196b, 0xf595e6a1, 0xa192b3e7, - 0x086a6fc4, 0x5c6d3a82, 0xa064c548, 0xf463900e, 0x4d4f93a5, 0x1948c6e3, - 0xe5413929, 0xb1466c6f, 0x18beb04c, 0x4cb9e50a, 0xb0b01ac0, 0xe4b74f86, - 0xe6add477, 0xb2aa8131, 0x4ea37efb, 0x1aa42bbd, 0xb35cf79e, 0xe75ba2d8, - 0x1b525d12, 0x4f550854, 0x1f676af0, 0x4b603fb6, 0xb769c07c, 0xe36e953a, - 0x4a964919, 0x1e911c5f, 0xe298e395, 0xb69fb6d3, 0xb4852d22, 0xe0827864, - 0x1c8b87ae, 0x488cd2e8, 0xe1740ecb, 0xb5735b8d, 0x497aa447, 0x1d7df101, - 0xe91e610f, 0xbd193449, 0x4110cb83, 0x15179ec5, 0xbcef42e6, 0xe8e817a0, - 0x14e1e86a, 0x40e6bd2c, 0x42fc26dd, 0x16fb739b, 0xeaf28c51, 0xbef5d917, - 0x170d0534, 0x430a5072, 0xbf03afb8, 0xeb04fafe, 0xbb36985a, 0xef31cd1c, - 0x133832d6, 0x473f6790, 0xeec7bbb3, 0xbac0eef5, 0x46c9113f, 0x12ce4479, - 0x10d4df88, 0x44d38ace, 0xb8da7504, 0xecdd2042, 0x4525fc61, 0x1122a927, - 0xed2b56ed, 0xb92c03ab, 0x9a9f274a, 0xce98720c, 0x32918dc6, 0x6696d880, - 0xcf6e04a3, 0x9b6951e5, 0x6760ae2f, 0x3367fb69, 0x317d6098, 0x657a35de, - 0x9973ca14, 0xcd749f52, 0x648c4371, 0x308b1637, 0xcc82e9fd, 0x9885bcbb, - 0xc8b7de1f, 0x9cb08b59, 0x60b97493, 0x34be21d5, 0x9d46fdf6, 0xc941a8b0, - 0x3548577a, 0x614f023c, 0x635599cd, 0x3752cc8b, 0xcb5b3341, 0x9f5c6607, - 0x36a4ba24, 0x62a3ef62, 0x9eaa10a8, 0xcaad45ee, 0x3eced5e0, 0x6ac980a6, - 0x96c07f6c, 0xc2c72a2a, 0x6b3ff609, 0x3f38a34f, 0xc3315c85, 0x973609c3, - 0x952c9232, 0xc12bc774, 0x3d2238be, 0x69256df8, 0xc0ddb1db, 0x94dae49d, - 0x68d31b57, 0x3cd44e11, 0x6ce62cb5, 0x38e179f3, 0xc4e88639, 0x90efd37f, - 0x39170f5c, 0x6d105a1a, 0x9119a5d0, 0xc51ef096, 0xc7046b67, 0x93033e21, - 0x6f0ac1eb, 0x3b0d94ad, 0x92f5488e, 0xc6f21dc8, 0x3afbe202, 0x6efcb744, - 0xd7d0b4ef, 0x83d7e1a9, 0x7fde1e63, 0x2bd94b25, 0x82219706, 0xd626c240, - 0x2a2f3d8a, 0x7e2868cc, 0x7c32f33d, 0x2835a67b, 0xd43c59b1, 0x803b0cf7, - 0x29c3d0d4, 0x7dc48592, 0x81cd7a58, 0xd5ca2f1e, 0x85f84dba, 0xd1ff18fc, - 0x2df6e736, 0x79f1b270, 0xd0096e53, 0x840e3b15, 0x7807c4df, 0x2c009199, - 0x2e1a0a68, 0x7a1d5f2e, 0x8614a0e4, 0xd213f5a2, 0x7beb2981, 0x2fec7cc7, - 0xd3e5830d, 0x87e2d64b, 0x73814645, 0x27861303, 0xdb8fecc9, 0x8f88b98f, - 0x267065ac, 0x727730ea, 0x8e7ecf20, 0xda799a66, 0xd8630197, 0x8c6454d1, - 0x706dab1b, 0x246afe5d, 0x8d92227e, 0xd9957738, 0x259c88f2, 0x719bddb4, - 0x21a9bf10, 0x75aeea56, 0x89a7159c, 0xdda040da, 0x74589cf9, 0x205fc9bf, - 0xdc563675, 0x88516333, 0x8a4bf8c2, 0xde4cad84, 0x2245524e, 0x76420708, - 0xdfbadb2b, 0x8bbd8e6d, 0x77b471a7, 0x23b324e1}; - -const uint32_t kStrideExtensionTable2[256] = { - 0x00000000, 0x678efd01, 0xcf1dfa02, 0xa8930703, 0x9bd782f5, 0xfc597ff4, - 0x54ca78f7, 0x334485f6, 0x3243731b, 0x55cd8e1a, 0xfd5e8919, 0x9ad07418, - 0xa994f1ee, 0xce1a0cef, 0x66890bec, 0x0107f6ed, 0x6486e636, 0x03081b37, - 0xab9b1c34, 0xcc15e135, 0xff5164c3, 0x98df99c2, 0x304c9ec1, 0x57c263c0, - 0x56c5952d, 0x314b682c, 0x99d86f2f, 0xfe56922e, 0xcd1217d8, 0xaa9cead9, - 0x020fedda, 0x658110db, 0xc90dcc6c, 0xae83316d, 0x0610366e, 0x619ecb6f, - 0x52da4e99, 0x3554b398, 0x9dc7b49b, 0xfa49499a, 0xfb4ebf77, 0x9cc04276, - 0x34534575, 0x53ddb874, 0x60993d82, 0x0717c083, 0xaf84c780, 0xc80a3a81, - 0xad8b2a5a, 0xca05d75b, 0x6296d058, 0x05182d59, 0x365ca8af, 0x51d255ae, - 0xf94152ad, 0x9ecfafac, 0x9fc85941, 0xf846a440, 0x50d5a343, 0x375b5e42, - 0x041fdbb4, 0x639126b5, 0xcb0221b6, 0xac8cdcb7, 0x97f7ee29, 0xf0791328, - 0x58ea142b, 0x3f64e92a, 0x0c206cdc, 0x6bae91dd, 0xc33d96de, 0xa4b36bdf, - 0xa5b49d32, 0xc23a6033, 0x6aa96730, 0x0d279a31, 0x3e631fc7, 0x59ede2c6, - 0xf17ee5c5, 0x96f018c4, 0xf371081f, 0x94fff51e, 0x3c6cf21d, 0x5be20f1c, - 0x68a68aea, 0x0f2877eb, 0xa7bb70e8, 0xc0358de9, 0xc1327b04, 0xa6bc8605, - 0x0e2f8106, 0x69a17c07, 0x5ae5f9f1, 0x3d6b04f0, 0x95f803f3, 0xf276fef2, - 0x5efa2245, 0x3974df44, 0x91e7d847, 0xf6692546, 0xc52da0b0, 0xa2a35db1, - 0x0a305ab2, 0x6dbea7b3, 0x6cb9515e, 0x0b37ac5f, 0xa3a4ab5c, 0xc42a565d, - 0xf76ed3ab, 0x90e02eaa, 0x387329a9, 0x5ffdd4a8, 0x3a7cc473, 0x5df23972, - 0xf5613e71, 0x92efc370, 0xa1ab4686, 0xc625bb87, 0x6eb6bc84, 0x09384185, - 0x083fb768, 0x6fb14a69, 0xc7224d6a, 0xa0acb06b, 0x93e8359d, 0xf466c89c, - 0x5cf5cf9f, 0x3b7b329e, 0x2a03aaa3, 0x4d8d57a2, 0xe51e50a1, 0x8290ada0, - 0xb1d42856, 0xd65ad557, 0x7ec9d254, 0x19472f55, 0x1840d9b8, 0x7fce24b9, - 0xd75d23ba, 0xb0d3debb, 0x83975b4d, 0xe419a64c, 0x4c8aa14f, 0x2b045c4e, - 0x4e854c95, 0x290bb194, 0x8198b697, 0xe6164b96, 0xd552ce60, 0xb2dc3361, - 0x1a4f3462, 0x7dc1c963, 0x7cc63f8e, 0x1b48c28f, 0xb3dbc58c, 0xd455388d, - 0xe711bd7b, 0x809f407a, 0x280c4779, 0x4f82ba78, 0xe30e66cf, 0x84809bce, - 0x2c139ccd, 0x4b9d61cc, 0x78d9e43a, 0x1f57193b, 0xb7c41e38, 0xd04ae339, - 0xd14d15d4, 0xb6c3e8d5, 0x1e50efd6, 0x79de12d7, 0x4a9a9721, 0x2d146a20, - 0x85876d23, 0xe2099022, 0x878880f9, 0xe0067df8, 0x48957afb, 0x2f1b87fa, - 0x1c5f020c, 0x7bd1ff0d, 0xd342f80e, 0xb4cc050f, 0xb5cbf3e2, 0xd2450ee3, - 0x7ad609e0, 0x1d58f4e1, 0x2e1c7117, 0x49928c16, 0xe1018b15, 0x868f7614, - 0xbdf4448a, 0xda7ab98b, 0x72e9be88, 0x15674389, 0x2623c67f, 0x41ad3b7e, - 0xe93e3c7d, 0x8eb0c17c, 0x8fb73791, 0xe839ca90, 0x40aacd93, 0x27243092, - 0x1460b564, 0x73ee4865, 0xdb7d4f66, 0xbcf3b267, 0xd972a2bc, 0xbefc5fbd, - 0x166f58be, 0x71e1a5bf, 0x42a52049, 0x252bdd48, 0x8db8da4b, 0xea36274a, - 0xeb31d1a7, 0x8cbf2ca6, 0x242c2ba5, 0x43a2d6a4, 0x70e65352, 0x1768ae53, - 0xbffba950, 0xd8755451, 0x74f988e6, 0x137775e7, 0xbbe472e4, 0xdc6a8fe5, - 0xef2e0a13, 0x88a0f712, 0x2033f011, 0x47bd0d10, 0x46bafbfd, 0x213406fc, - 0x89a701ff, 0xee29fcfe, 0xdd6d7908, 0xbae38409, 0x1270830a, 0x75fe7e0b, - 0x107f6ed0, 0x77f193d1, 0xdf6294d2, 0xb8ec69d3, 0x8ba8ec25, 0xec261124, - 0x44b51627, 0x233beb26, 0x223c1dcb, 0x45b2e0ca, 0xed21e7c9, 0x8aaf1ac8, - 0xb9eb9f3e, 0xde65623f, 0x76f6653c, 0x1178983d}; - -const uint32_t kStrideExtensionTable3[256] = { - 0x00000000, 0xf20c0dfe, 0xe1f46d0d, 0x13f860f3, 0xc604aceb, 0x3408a115, - 0x27f0c1e6, 0xd5fccc18, 0x89e52f27, 0x7be922d9, 0x6811422a, 0x9a1d4fd4, - 0x4fe183cc, 0xbded8e32, 0xae15eec1, 0x5c19e33f, 0x162628bf, 0xe42a2541, - 0xf7d245b2, 0x05de484c, 0xd0228454, 0x222e89aa, 0x31d6e959, 0xc3dae4a7, - 0x9fc30798, 0x6dcf0a66, 0x7e376a95, 0x8c3b676b, 0x59c7ab73, 0xabcba68d, - 0xb833c67e, 0x4a3fcb80, 0x2c4c517e, 0xde405c80, 0xcdb83c73, 0x3fb4318d, - 0xea48fd95, 0x1844f06b, 0x0bbc9098, 0xf9b09d66, 0xa5a97e59, 0x57a573a7, - 0x445d1354, 0xb6511eaa, 0x63add2b2, 0x91a1df4c, 0x8259bfbf, 0x7055b241, - 0x3a6a79c1, 0xc866743f, 0xdb9e14cc, 0x29921932, 0xfc6ed52a, 0x0e62d8d4, - 0x1d9ab827, 0xef96b5d9, 0xb38f56e6, 0x41835b18, 0x527b3beb, 0xa0773615, - 0x758bfa0d, 0x8787f7f3, 0x947f9700, 0x66739afe, 0x5898a2fc, 0xaa94af02, - 0xb96ccff1, 0x4b60c20f, 0x9e9c0e17, 0x6c9003e9, 0x7f68631a, 0x8d646ee4, - 0xd17d8ddb, 0x23718025, 0x3089e0d6, 0xc285ed28, 0x17792130, 0xe5752cce, - 0xf68d4c3d, 0x048141c3, 0x4ebe8a43, 0xbcb287bd, 0xaf4ae74e, 0x5d46eab0, - 0x88ba26a8, 0x7ab62b56, 0x694e4ba5, 0x9b42465b, 0xc75ba564, 0x3557a89a, - 0x26afc869, 0xd4a3c597, 0x015f098f, 0xf3530471, 0xe0ab6482, 0x12a7697c, - 0x74d4f382, 0x86d8fe7c, 0x95209e8f, 0x672c9371, 0xb2d05f69, 0x40dc5297, - 0x53243264, 0xa1283f9a, 0xfd31dca5, 0x0f3dd15b, 0x1cc5b1a8, 0xeec9bc56, - 0x3b35704e, 0xc9397db0, 0xdac11d43, 0x28cd10bd, 0x62f2db3d, 0x90fed6c3, - 0x8306b630, 0x710abbce, 0xa4f677d6, 0x56fa7a28, 0x45021adb, 0xb70e1725, - 0xeb17f41a, 0x191bf9e4, 0x0ae39917, 0xf8ef94e9, 0x2d1358f1, 0xdf1f550f, - 0xcce735fc, 0x3eeb3802, 0xb13145f8, 0x433d4806, 0x50c528f5, 0xa2c9250b, - 0x7735e913, 0x8539e4ed, 0x96c1841e, 0x64cd89e0, 0x38d46adf, 0xcad86721, - 0xd92007d2, 0x2b2c0a2c, 0xfed0c634, 0x0cdccbca, 0x1f24ab39, 0xed28a6c7, - 0xa7176d47, 0x551b60b9, 0x46e3004a, 0xb4ef0db4, 0x6113c1ac, 0x931fcc52, - 0x80e7aca1, 0x72eba15f, 0x2ef24260, 0xdcfe4f9e, 0xcf062f6d, 0x3d0a2293, - 0xe8f6ee8b, 0x1afae375, 0x09028386, 0xfb0e8e78, 0x9d7d1486, 0x6f711978, - 0x7c89798b, 0x8e857475, 0x5b79b86d, 0xa975b593, 0xba8dd560, 0x4881d89e, - 0x14983ba1, 0xe694365f, 0xf56c56ac, 0x07605b52, 0xd29c974a, 0x20909ab4, - 0x3368fa47, 0xc164f7b9, 0x8b5b3c39, 0x795731c7, 0x6aaf5134, 0x98a35cca, - 0x4d5f90d2, 0xbf539d2c, 0xacabfddf, 0x5ea7f021, 0x02be131e, 0xf0b21ee0, - 0xe34a7e13, 0x114673ed, 0xc4babff5, 0x36b6b20b, 0x254ed2f8, 0xd742df06, - 0xe9a9e704, 0x1ba5eafa, 0x085d8a09, 0xfa5187f7, 0x2fad4bef, 0xdda14611, - 0xce5926e2, 0x3c552b1c, 0x604cc823, 0x9240c5dd, 0x81b8a52e, 0x73b4a8d0, - 0xa64864c8, 0x54446936, 0x47bc09c5, 0xb5b0043b, 0xff8fcfbb, 0x0d83c245, - 0x1e7ba2b6, 0xec77af48, 0x398b6350, 0xcb876eae, 0xd87f0e5d, 0x2a7303a3, - 0x766ae09c, 0x8466ed62, 0x979e8d91, 0x6592806f, 0xb06e4c77, 0x42624189, - 0x519a217a, 0xa3962c84, 0xc5e5b67a, 0x37e9bb84, 0x2411db77, 0xd61dd689, - 0x03e11a91, 0xf1ed176f, 0xe215779c, 0x10197a62, 0x4c00995d, 0xbe0c94a3, - 0xadf4f450, 0x5ff8f9ae, 0x8a0435b6, 0x78083848, 0x6bf058bb, 0x99fc5545, - 0xd3c39ec5, 0x21cf933b, 0x3237f3c8, 0xc03bfe36, 0x15c7322e, 0xe7cb3fd0, - 0xf4335f23, 0x063f52dd, 0x5a26b1e2, 0xa82abc1c, 0xbbd2dcef, 0x49ded111, - 0x9c221d09, 0x6e2e10f7, 0x7dd67004, 0x8fda7dfa}; - -constexpr const ptrdiff_t kPrefetchHorizon = 256; - -} // namespace - -namespace crc32c { - -uint32_t ExtendPortable(uint32_t crc, const uint8_t* data, size_t size) { - const uint8_t* p = data; - const uint8_t* e = p + size; - uint32_t l = crc ^ kCRC32Xor; - -// Process one byte at a time. -#define STEP1 \ - do { \ - int c = (l & 0xff) ^ *p++; \ - l = kByteExtensionTable[c] ^ (l >> 8); \ - } while (0) - -// Process one of the 4 strides of 4-byte data. -#define STEP4(s) \ - do { \ - crc##s = ReadUint32LE(p + s * 4) ^ kStrideExtensionTable3[crc##s & 0xff] ^ \ - kStrideExtensionTable2[(crc##s >> 8) & 0xff] ^ \ - kStrideExtensionTable1[(crc##s >> 16) & 0xff] ^ \ - kStrideExtensionTable0[crc##s >> 24]; \ - } while (0) - -// Process a 16-byte swath of 4 strides, each of which has 4 bytes of data. -#define STEP16 \ - do { \ - STEP4(0); \ - STEP4(1); \ - STEP4(2); \ - STEP4(3); \ - p += 16; \ - } while (0) - -// Process 4 bytes that were already loaded into a word. -#define STEP4W(w) \ - do { \ - w ^= l; \ - for (size_t i = 0; i < 4; ++i) { \ - w = (w >> 8) ^ kByteExtensionTable[w & 0xff]; \ - } \ - l = w; \ - } while (0) - - // Point x at first 4-byte aligned byte in the buffer. This might be past the - // end of the buffer. - const uint8_t* x = RoundUp<4>(p); - if (x <= e) { - // Process bytes p is 4-byte aligned. - while (p != x) { - STEP1; - } - } - - if ((e - p) >= 16) { - // Load a 16-byte swath into the stride partial results. - uint32_t crc0 = ReadUint32LE(p + 0 * 4) ^ l; - uint32_t crc1 = ReadUint32LE(p + 1 * 4); - uint32_t crc2 = ReadUint32LE(p + 2 * 4); - uint32_t crc3 = ReadUint32LE(p + 3 * 4); - p += 16; - - while ((e - p) > kPrefetchHorizon) { - RequestPrefetch(p + kPrefetchHorizon); - - // Process 64 bytes at a time. - STEP16; - STEP16; - STEP16; - STEP16; - } - - // Process one 16-byte swath at a time. - while ((e - p) >= 16) { - STEP16; - } - - // Advance one word at a time as far as possible. - while ((e - p) >= 4) { - STEP4(0); - uint32_t tmp = crc0; - crc0 = crc1; - crc1 = crc2; - crc2 = crc3; - crc3 = tmp; - p += 4; - } - - // Combine the 4 partial stride results. - l = 0; - STEP4W(crc0); - STEP4W(crc1); - STEP4W(crc2); - STEP4W(crc3); - } - - // Process the last few bytes. - while (p != e) { - STEP1; - } -#undef STEP4W -#undef STEP16 -#undef STEP4 -#undef STEP1 - return l ^ kCRC32Xor; -} - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_portable_unittest.cc b/third_party/crc32c/src/crc32c_portable_unittest.cc deleted file mode 100644 index 5098e2c..0000000 --- a/third_party/crc32c/src/crc32c_portable_unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "gtest/gtest.h" - -#include "./crc32c_extend_unittests.h" -#include "./crc32c_internal.h" - -namespace crc32c { - -struct PortableTestTraits { - static uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) { - return ExtendPortable(crc, data, count); - } -}; - -INSTANTIATE_TYPED_TEST_SUITE_P(Portable, ExtendTest, PortableTestTraits); - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_prefetch.h b/third_party/crc32c/src/crc32c_prefetch.h deleted file mode 100644 index e8df540..0000000 --- a/third_party/crc32c/src/crc32c_prefetch.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_PREFETCH_H_ -#define CRC32C_CRC32C_PREFETCH_H_ - -#include -#include - -#include "crc32c/crc32c_config.h" - -#if HAVE_MM_PREFETCH - -#if defined(_MSC_VER) -#include -#else // !defined(_MSC_VER) -#include -#endif // defined(_MSC_VER) - -#endif // HAVE_MM_PREFETCH - -namespace crc32c { - -// Ask the hardware to prefetch the data at the given address into the L1 cache. -inline void RequestPrefetch(const uint8_t* address) { -#if HAVE_BUILTIN_PREFETCH - // Clang and GCC implement the __builtin_prefetch non-standard extension, - // which maps to the best instruction on the target architecture. - __builtin_prefetch(reinterpret_cast(address), 0 /* Read only. */, - 0 /* No temporal locality. */); -#elif HAVE_MM_PREFETCH - // Visual Studio doesn't implement __builtin_prefetch, but exposes the - // PREFETCHNTA instruction via the _mm_prefetch intrinsic. - _mm_prefetch(reinterpret_cast(address), _MM_HINT_NTA); -#else - // No prefetch support. Silence compiler warnings. - (void)address; -#endif // HAVE_BUILTIN_PREFETCH -} - -} // namespace crc32c - -#endif // CRC32C_CRC32C_ROUND_UP_H_ diff --git a/third_party/crc32c/src/crc32c_prefetch_unittest.cc b/third_party/crc32c/src/crc32c_prefetch_unittest.cc deleted file mode 100644 index b34ed2d..0000000 --- a/third_party/crc32c/src/crc32c_prefetch_unittest.cc +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_prefetch.h" - -// There is no easy way to test cache prefetching. We can only test that the -// crc32c_prefetch.h header compiles on its own, so it doesn't have any unstated -// dependencies. diff --git a/third_party/crc32c/src/crc32c_read_le.h b/third_party/crc32c/src/crc32c_read_le.h deleted file mode 100644 index 1ebcf5d..0000000 --- a/third_party/crc32c/src/crc32c_read_le.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_READ_LE_H_ -#define CRC32C_CRC32C_READ_LE_H_ - -#include -#include - -#include "crc32c/crc32c_config.h" - -namespace crc32c { - -// Reads a little-endian 32-bit integer from a 32-bit-aligned buffer. -inline uint32_t ReadUint32LE(const uint8_t* buffer) { -#if BYTE_ORDER_BIG_ENDIAN - return ((static_cast(static_cast(buffer[0]))) | - (static_cast(static_cast(buffer[1])) << 8) | - (static_cast(static_cast(buffer[2])) << 16) | - (static_cast(static_cast(buffer[3])) << 24)); -#else // !BYTE_ORDER_BIG_ENDIAN - uint32_t result; - // This should be optimized to a single instruction. - std::memcpy(&result, buffer, sizeof(result)); - return result; -#endif // BYTE_ORDER_BIG_ENDIAN -} - -// Reads a little-endian 64-bit integer from a 64-bit-aligned buffer. -inline uint64_t ReadUint64LE(const uint8_t* buffer) { -#if BYTE_ORDER_BIG_ENDIAN - return ((static_cast(static_cast(buffer[0]))) | - (static_cast(static_cast(buffer[1])) << 8) | - (static_cast(static_cast(buffer[2])) << 16) | - (static_cast(static_cast(buffer[3])) << 24) | - (static_cast(static_cast(buffer[4])) << 32) | - (static_cast(static_cast(buffer[5])) << 40) | - (static_cast(static_cast(buffer[6])) << 48) | - (static_cast(static_cast(buffer[7])) << 56)); -#else // !BYTE_ORDER_BIG_ENDIAN - uint64_t result; - // This should be optimized to a single instruction. - std::memcpy(&result, buffer, sizeof(result)); - return result; -#endif // BYTE_ORDER_BIG_ENDIAN -} - -} // namespace crc32c - -#endif // CRC32C_CRC32C_READ_LE_H_ diff --git a/third_party/crc32c/src/crc32c_read_le_unittest.cc b/third_party/crc32c/src/crc32c_read_le_unittest.cc deleted file mode 100644 index 2a30302..0000000 --- a/third_party/crc32c/src/crc32c_read_le_unittest.cc +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_read_le.h" - -#include -#include - -#include "gtest/gtest.h" - -#include "./crc32c_round_up.h" - -namespace crc32c { - -TEST(Crc32CReadLETest, ReadUint32LE) { - // little-endian 0x12345678 - alignas(4) uint8_t bytes[] = {0x78, 0x56, 0x34, 0x12}; - - ASSERT_EQ(RoundUp<4>(bytes), bytes) << "Stack array is not aligned"; - EXPECT_EQ(static_cast(0x12345678), ReadUint32LE(bytes)); -} - -TEST(Crc32CReadLETest, ReadUint64LE) { - // little-endian 0x123456789ABCDEF0 - alignas(8) uint8_t bytes[] = {0xF0, 0xDE, 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12}; - - ASSERT_EQ(RoundUp<8>(bytes), bytes) << "Stack array is not aligned"; - EXPECT_EQ(static_cast(0x123456789ABCDEF0), ReadUint64LE(bytes)); -} - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_round_up.h b/third_party/crc32c/src/crc32c_round_up.h deleted file mode 100644 index d3b922b..0000000 --- a/third_party/crc32c/src/crc32c_round_up.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_ROUND_UP_H_ -#define CRC32C_CRC32C_ROUND_UP_H_ - -#include -#include - -namespace crc32c { - -// Returns the smallest number >= the given number that is evenly divided by N. -// -// N must be a power of two. -template -constexpr inline uintptr_t RoundUp(uintptr_t pointer) { - static_assert((N & (N - 1)) == 0, "N must be a power of two"); - return (pointer + (N - 1)) & ~(N - 1); -} - -// Returns the smallest address >= the given address that is aligned to N bytes. -// -// N must be a power of two. -template -constexpr inline const uint8_t* RoundUp(const uint8_t* pointer) { - static_assert((N & (N - 1)) == 0, "N must be a power of two"); - return reinterpret_cast( - RoundUp(reinterpret_cast(pointer))); -} - -} // namespace crc32c - -#endif // CRC32C_CRC32C_ROUND_UP_H_ diff --git a/third_party/crc32c/src/crc32c_round_up_unittest.cc b/third_party/crc32c/src/crc32c_round_up_unittest.cc deleted file mode 100644 index 5ff657b..0000000 --- a/third_party/crc32c/src/crc32c_round_up_unittest.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_round_up.h" - -#include -#include - -#include "gtest/gtest.h" - -namespace crc32c { - -TEST(CRC32CRoundUpTest, RoundUpUintptr) { - uintptr_t zero = 0; - - ASSERT_EQ(zero, RoundUp<1>(zero)); - ASSERT_EQ(1U, RoundUp<1>(1U)); - ASSERT_EQ(2U, RoundUp<1>(2U)); - ASSERT_EQ(3U, RoundUp<1>(3U)); - ASSERT_EQ(~static_cast(0), RoundUp<1>(~static_cast(0))); - ASSERT_EQ(~static_cast(1), RoundUp<1>(~static_cast(1))); - ASSERT_EQ(~static_cast(2), RoundUp<1>(~static_cast(2))); - ASSERT_EQ(~static_cast(3), RoundUp<1>(~static_cast(3))); - - ASSERT_EQ(zero, RoundUp<2>(zero)); - ASSERT_EQ(2U, RoundUp<2>(1U)); - ASSERT_EQ(2U, RoundUp<2>(2U)); - ASSERT_EQ(4U, RoundUp<2>(3U)); - ASSERT_EQ(4U, RoundUp<2>(4U)); - ASSERT_EQ(6U, RoundUp<2>(5U)); - ASSERT_EQ(6U, RoundUp<2>(6U)); - ASSERT_EQ(8U, RoundUp<2>(7U)); - ASSERT_EQ(8U, RoundUp<2>(8U)); - ASSERT_EQ(~static_cast(1), RoundUp<2>(~static_cast(1))); - ASSERT_EQ(~static_cast(1), RoundUp<2>(~static_cast(2))); - ASSERT_EQ(~static_cast(3), RoundUp<2>(~static_cast(3))); - ASSERT_EQ(~static_cast(3), RoundUp<2>(~static_cast(4))); - - ASSERT_EQ(zero, RoundUp<4>(zero)); - ASSERT_EQ(4U, RoundUp<4>(1U)); - ASSERT_EQ(4U, RoundUp<4>(2U)); - ASSERT_EQ(4U, RoundUp<4>(3U)); - ASSERT_EQ(4U, RoundUp<4>(4U)); - ASSERT_EQ(8U, RoundUp<4>(5U)); - ASSERT_EQ(8U, RoundUp<4>(6U)); - ASSERT_EQ(8U, RoundUp<4>(7U)); - ASSERT_EQ(8U, RoundUp<4>(8U)); - ASSERT_EQ(~static_cast(3), RoundUp<4>(~static_cast(3))); - ASSERT_EQ(~static_cast(3), RoundUp<4>(~static_cast(4))); - ASSERT_EQ(~static_cast(3), RoundUp<4>(~static_cast(5))); - ASSERT_EQ(~static_cast(3), RoundUp<4>(~static_cast(6))); - ASSERT_EQ(~static_cast(7), RoundUp<4>(~static_cast(7))); - ASSERT_EQ(~static_cast(7), RoundUp<4>(~static_cast(8))); - ASSERT_EQ(~static_cast(7), RoundUp<4>(~static_cast(9))); -} - -TEST(CRC32CRoundUpTest, RoundUpPointer) { - uintptr_t zero = 0, three = 3, four = 4, seven = 7, eight = 8; - - const uint8_t* zero_ptr = reinterpret_cast(zero); - const uint8_t* three_ptr = reinterpret_cast(three); - const uint8_t* four_ptr = reinterpret_cast(four); - const uint8_t* seven_ptr = reinterpret_cast(seven); - const uint8_t* eight_ptr = reinterpret_cast(eight); - - ASSERT_EQ(zero_ptr, RoundUp<1>(zero_ptr)); - ASSERT_EQ(zero_ptr, RoundUp<4>(zero_ptr)); - ASSERT_EQ(zero_ptr, RoundUp<8>(zero_ptr)); - - ASSERT_EQ(three_ptr, RoundUp<1>(three_ptr)); - ASSERT_EQ(four_ptr, RoundUp<4>(three_ptr)); - ASSERT_EQ(eight_ptr, RoundUp<8>(three_ptr)); - - ASSERT_EQ(four_ptr, RoundUp<1>(four_ptr)); - ASSERT_EQ(four_ptr, RoundUp<4>(four_ptr)); - ASSERT_EQ(eight_ptr, RoundUp<8>(four_ptr)); - - ASSERT_EQ(seven_ptr, RoundUp<1>(seven_ptr)); - ASSERT_EQ(eight_ptr, RoundUp<4>(seven_ptr)); - ASSERT_EQ(eight_ptr, RoundUp<8>(four_ptr)); -} - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_sse42.cc b/third_party/crc32c/src/crc32c_sse42.cc deleted file mode 100644 index fc0cb07..0000000 --- a/third_party/crc32c/src/crc32c_sse42.cc +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2008 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "./crc32c_sse42.h" - -// In a separate source file to allow this accelerated CRC32C function to be -// compiled with the appropriate compiler flags to enable SSE4.2 instructions. - -// This implementation is loosely based on Intel Pub 323405 from April 2011, -// "Fast CRC Computation for iSCSI Polynomial Using CRC32 Instruction". - -#include -#include - -#include "./crc32c_internal.h" -#include "./crc32c_prefetch.h" -#include "./crc32c_read_le.h" -#include "./crc32c_round_up.h" -#include "crc32c/crc32c_config.h" - -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -#if defined(_MSC_VER) -#include -#else // !defined(_MSC_VER) -#include -#endif // defined(_MSC_VER) - -namespace crc32c { - -namespace { - -constexpr const ptrdiff_t kGroups = 3; -constexpr const ptrdiff_t kBlock0Size = 16 * 1024 / kGroups / 64 * 64; -constexpr const ptrdiff_t kBlock1Size = 4 * 1024 / kGroups / 8 * 8; -constexpr const ptrdiff_t kBlock2Size = 1024 / kGroups / 8 * 8; - -const uint32_t kBlock0SkipTable[8][16] = { - {0x00000000, 0xff770459, 0xfb027e43, 0x04757a1a, 0xf3e88a77, 0x0c9f8e2e, - 0x08eaf434, 0xf79df06d, 0xe23d621f, 0x1d4a6646, 0x193f1c5c, 0xe6481805, - 0x11d5e868, 0xeea2ec31, 0xead7962b, 0x15a09272}, - {0x00000000, 0xc196b2cf, 0x86c1136f, 0x4757a1a0, 0x086e502f, 0xc9f8e2e0, - 0x8eaf4340, 0x4f39f18f, 0x10dca05e, 0xd14a1291, 0x961db331, 0x578b01fe, - 0x18b2f071, 0xd92442be, 0x9e73e31e, 0x5fe551d1}, - {0x00000000, 0x21b940bc, 0x43728178, 0x62cbc1c4, 0x86e502f0, 0xa75c424c, - 0xc5978388, 0xe42ec334, 0x08267311, 0x299f33ad, 0x4b54f269, 0x6aedb2d5, - 0x8ec371e1, 0xaf7a315d, 0xcdb1f099, 0xec08b025}, - {0x00000000, 0x104ce622, 0x2099cc44, 0x30d52a66, 0x41339888, 0x517f7eaa, - 0x61aa54cc, 0x71e6b2ee, 0x82673110, 0x922bd732, 0xa2fefd54, 0xb2b21b76, - 0xc354a998, 0xd3184fba, 0xe3cd65dc, 0xf38183fe}, - {0x00000000, 0x012214d1, 0x024429a2, 0x03663d73, 0x04885344, 0x05aa4795, - 0x06cc7ae6, 0x07ee6e37, 0x0910a688, 0x0832b259, 0x0b548f2a, 0x0a769bfb, - 0x0d98f5cc, 0x0cbae11d, 0x0fdcdc6e, 0x0efec8bf}, - {0x00000000, 0x12214d10, 0x24429a20, 0x3663d730, 0x48853440, 0x5aa47950, - 0x6cc7ae60, 0x7ee6e370, 0x910a6880, 0x832b2590, 0xb548f2a0, 0xa769bfb0, - 0xd98f5cc0, 0xcbae11d0, 0xfdcdc6e0, 0xefec8bf0}, - {0x00000000, 0x27f8a7f1, 0x4ff14fe2, 0x6809e813, 0x9fe29fc4, 0xb81a3835, - 0xd013d026, 0xf7eb77d7, 0x3a294979, 0x1dd1ee88, 0x75d8069b, 0x5220a16a, - 0xa5cbd6bd, 0x8233714c, 0xea3a995f, 0xcdc23eae}, - {0x00000000, 0x745292f2, 0xe8a525e4, 0x9cf7b716, 0xd4a63d39, 0xa0f4afcb, - 0x3c0318dd, 0x48518a2f, 0xaca00c83, 0xd8f29e71, 0x44052967, 0x3057bb95, - 0x780631ba, 0x0c54a348, 0x90a3145e, 0xe4f186ac}, -}; -const uint32_t kBlock1SkipTable[8][16] = { - {0x00000000, 0x79113270, 0xf22264e0, 0x8b335690, 0xe1a8bf31, 0x98b98d41, - 0x138adbd1, 0x6a9be9a1, 0xc6bd0893, 0xbfac3ae3, 0x349f6c73, 0x4d8e5e03, - 0x2715b7a2, 0x5e0485d2, 0xd537d342, 0xac26e132}, - {0x00000000, 0x889667d7, 0x14c0b95f, 0x9c56de88, 0x298172be, 0xa1171569, - 0x3d41cbe1, 0xb5d7ac36, 0x5302e57c, 0xdb9482ab, 0x47c25c23, 0xcf543bf4, - 0x7a8397c2, 0xf215f015, 0x6e432e9d, 0xe6d5494a}, - {0x00000000, 0xa605caf8, 0x49e7e301, 0xefe229f9, 0x93cfc602, 0x35ca0cfa, - 0xda282503, 0x7c2deffb, 0x2273faf5, 0x8476300d, 0x6b9419f4, 0xcd91d30c, - 0xb1bc3cf7, 0x17b9f60f, 0xf85bdff6, 0x5e5e150e}, - {0x00000000, 0x44e7f5ea, 0x89cfebd4, 0xcd281e3e, 0x1673a159, 0x529454b3, - 0x9fbc4a8d, 0xdb5bbf67, 0x2ce742b2, 0x6800b758, 0xa528a966, 0xe1cf5c8c, - 0x3a94e3eb, 0x7e731601, 0xb35b083f, 0xf7bcfdd5}, - {0x00000000, 0x59ce8564, 0xb39d0ac8, 0xea538fac, 0x62d66361, 0x3b18e605, - 0xd14b69a9, 0x8885eccd, 0xc5acc6c2, 0x9c6243a6, 0x7631cc0a, 0x2fff496e, - 0xa77aa5a3, 0xfeb420c7, 0x14e7af6b, 0x4d292a0f}, - {0x00000000, 0x8eb5fb75, 0x1887801b, 0x96327b6e, 0x310f0036, 0xbfbafb43, - 0x2988802d, 0xa73d7b58, 0x621e006c, 0xecabfb19, 0x7a998077, 0xf42c7b02, - 0x5311005a, 0xdda4fb2f, 0x4b968041, 0xc5237b34}, - {0x00000000, 0xc43c00d8, 0x8d947741, 0x49a87799, 0x1ec49873, 0xdaf898ab, - 0x9350ef32, 0x576cefea, 0x3d8930e6, 0xf9b5303e, 0xb01d47a7, 0x7421477f, - 0x234da895, 0xe771a84d, 0xaed9dfd4, 0x6ae5df0c}, - {0x00000000, 0x7b1261cc, 0xf624c398, 0x8d36a254, 0xe9a5f1c1, 0x92b7900d, - 0x1f813259, 0x64935395, 0xd6a79573, 0xadb5f4bf, 0x208356eb, 0x5b913727, - 0x3f0264b2, 0x4410057e, 0xc926a72a, 0xb234c6e6}, -}; -const uint32_t kBlock2SkipTable[8][16] = { - {0x00000000, 0x8f158014, 0x1bc776d9, 0x94d2f6cd, 0x378eedb2, 0xb89b6da6, - 0x2c499b6b, 0xa35c1b7f, 0x6f1ddb64, 0xe0085b70, 0x74daadbd, 0xfbcf2da9, - 0x589336d6, 0xd786b6c2, 0x4354400f, 0xcc41c01b}, - {0x00000000, 0xde3bb6c8, 0xb99b1b61, 0x67a0ada9, 0x76da4033, 0xa8e1f6fb, - 0xcf415b52, 0x117aed9a, 0xedb48066, 0x338f36ae, 0x542f9b07, 0x8a142dcf, - 0x9b6ec055, 0x4555769d, 0x22f5db34, 0xfcce6dfc}, - {0x00000000, 0xde85763d, 0xb8e69a8b, 0x6663ecb6, 0x742143e7, 0xaaa435da, - 0xccc7d96c, 0x1242af51, 0xe84287ce, 0x36c7f1f3, 0x50a41d45, 0x8e216b78, - 0x9c63c429, 0x42e6b214, 0x24855ea2, 0xfa00289f}, - {0x00000000, 0xd569796d, 0xaf3e842b, 0x7a57fd46, 0x5b917ea7, 0x8ef807ca, - 0xf4affa8c, 0x21c683e1, 0xb722fd4e, 0x624b8423, 0x181c7965, 0xcd750008, - 0xecb383e9, 0x39dafa84, 0x438d07c2, 0x96e47eaf}, - {0x00000000, 0x6ba98c6d, 0xd75318da, 0xbcfa94b7, 0xab4a4745, 0xc0e3cb28, - 0x7c195f9f, 0x17b0d3f2, 0x5378f87b, 0x38d17416, 0x842be0a1, 0xef826ccc, - 0xf832bf3e, 0x939b3353, 0x2f61a7e4, 0x44c82b89}, - {0x00000000, 0xa6f1f0f6, 0x480f971d, 0xeefe67eb, 0x901f2e3a, 0x36eedecc, - 0xd810b927, 0x7ee149d1, 0x25d22a85, 0x8323da73, 0x6dddbd98, 0xcb2c4d6e, - 0xb5cd04bf, 0x133cf449, 0xfdc293a2, 0x5b336354}, - {0x00000000, 0x4ba4550a, 0x9748aa14, 0xdcecff1e, 0x2b7d22d9, 0x60d977d3, - 0xbc3588cd, 0xf791ddc7, 0x56fa45b2, 0x1d5e10b8, 0xc1b2efa6, 0x8a16baac, - 0x7d87676b, 0x36233261, 0xeacfcd7f, 0xa16b9875}, - {0x00000000, 0xadf48b64, 0x5e056039, 0xf3f1eb5d, 0xbc0ac072, 0x11fe4b16, - 0xe20fa04b, 0x4ffb2b2f, 0x7df9f615, 0xd00d7d71, 0x23fc962c, 0x8e081d48, - 0xc1f33667, 0x6c07bd03, 0x9ff6565e, 0x3202dd3a}, -}; - -constexpr const ptrdiff_t kPrefetchHorizon = 256; - -} // namespace - -uint32_t ExtendSse42(uint32_t crc, const uint8_t* data, size_t size) { - const uint8_t* p = data; - const uint8_t* e = data + size; - uint32_t l = crc ^ kCRC32Xor; - -#define STEP1 \ - do { \ - l = _mm_crc32_u8(l, *p++); \ - } while (0) - -#define STEP4(crc) \ - do { \ - crc = _mm_crc32_u32(crc, ReadUint32LE(p)); \ - p += 4; \ - } while (0) - -#define STEP8(crc, data) \ - do { \ - crc = _mm_crc32_u64(crc, ReadUint64LE(data)); \ - data += 8; \ - } while (0) - -#define STEP8BY3(crc0, crc1, crc2, p0, p1, p2) \ - do { \ - STEP8(crc0, p0); \ - STEP8(crc1, p1); \ - STEP8(crc2, p2); \ - } while (0) - -#define STEP8X3(crc0, crc1, crc2, bs) \ - do { \ - crc0 = _mm_crc32_u64(crc0, ReadUint64LE(p)); \ - crc1 = _mm_crc32_u64(crc1, ReadUint64LE(p + bs)); \ - crc2 = _mm_crc32_u64(crc2, ReadUint64LE(p + 2 * bs)); \ - p += 8; \ - } while (0) - -#define SKIP_BLOCK(crc, tab) \ - do { \ - crc = tab[0][crc & 0xf] ^ tab[1][(crc >> 4) & 0xf] ^ \ - tab[2][(crc >> 8) & 0xf] ^ tab[3][(crc >> 12) & 0xf] ^ \ - tab[4][(crc >> 16) & 0xf] ^ tab[5][(crc >> 20) & 0xf] ^ \ - tab[6][(crc >> 24) & 0xf] ^ tab[7][(crc >> 28) & 0xf]; \ - } while (0) - - // Point x at first 8-byte aligned byte in the buffer. This might be past the - // end of the buffer. - const uint8_t* x = RoundUp<8>(p); - if (x <= e) { - // Process bytes p is 8-byte aligned. - while (p != x) { - STEP1; - } - } - - // Proccess the data in predetermined block sizes with tables for quickly - // combining the checksum. Experimentally it's better to use larger block - // sizes where possible so use a hierarchy of decreasing block sizes. - uint64_t l64 = l; - while ((e - p) >= kGroups * kBlock0Size) { - uint64_t l641 = 0; - uint64_t l642 = 0; - for (int i = 0; i < kBlock0Size; i += 8 * 8) { - // Prefetch ahead to hide latency. - RequestPrefetch(p + kPrefetchHorizon); - RequestPrefetch(p + kBlock0Size + kPrefetchHorizon); - RequestPrefetch(p + 2 * kBlock0Size + kPrefetchHorizon); - - // Process 64 bytes at a time. - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - STEP8X3(l64, l641, l642, kBlock0Size); - } - - // Combine results. - SKIP_BLOCK(l64, kBlock0SkipTable); - l64 ^= l641; - SKIP_BLOCK(l64, kBlock0SkipTable); - l64 ^= l642; - p += (kGroups - 1) * kBlock0Size; - } - while ((e - p) >= kGroups * kBlock1Size) { - uint64_t l641 = 0; - uint64_t l642 = 0; - for (int i = 0; i < kBlock1Size; i += 8) { - STEP8X3(l64, l641, l642, kBlock1Size); - } - SKIP_BLOCK(l64, kBlock1SkipTable); - l64 ^= l641; - SKIP_BLOCK(l64, kBlock1SkipTable); - l64 ^= l642; - p += (kGroups - 1) * kBlock1Size; - } - while ((e - p) >= kGroups * kBlock2Size) { - uint64_t l641 = 0; - uint64_t l642 = 0; - for (int i = 0; i < kBlock2Size; i += 8) { - STEP8X3(l64, l641, l642, kBlock2Size); - } - SKIP_BLOCK(l64, kBlock2SkipTable); - l64 ^= l641; - SKIP_BLOCK(l64, kBlock2SkipTable); - l64 ^= l642; - p += (kGroups - 1) * kBlock2Size; - } - - // Process bytes 16 at a time - while ((e - p) >= 16) { - STEP8(l64, p); - STEP8(l64, p); - } - - l = static_cast(l64); - // Process the last few bytes. - while (p != e) { - STEP1; - } -#undef SKIP_BLOCK -#undef STEP8X3 -#undef STEP8BY3 -#undef STEP8 -#undef STEP4 -#undef STEP1 - - return l ^ kCRC32Xor; -} - -} // namespace crc32c - -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) diff --git a/third_party/crc32c/src/crc32c_sse42.h b/third_party/crc32c/src/crc32c_sse42.h deleted file mode 100644 index b9ed179..0000000 --- a/third_party/crc32c/src/crc32c_sse42.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_SSE42_H_ -#define CRC32C_CRC32C_SSE42_H_ - -// X86-specific code. - -#include -#include - -#include "crc32c/crc32c_config.h" - -// The hardware-accelerated implementation is only enabled for 64-bit builds, -// because a straightforward 32-bit implementation actually runs slower than the -// portable version. Most X86 machines are 64-bit nowadays, so it doesn't make -// much sense to spend time building an optimized hardware-accelerated -// implementation. -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -namespace crc32c { - -// SSE4.2-accelerated implementation in crc32c_sse42.cc -uint32_t ExtendSse42(uint32_t crc, const uint8_t* data, size_t count); - -} // namespace crc32c - -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -#endif // CRC32C_CRC32C_SSE42_H_ diff --git a/third_party/crc32c/src/crc32c_sse42_check.h b/third_party/crc32c/src/crc32c_sse42_check.h deleted file mode 100644 index ad380dd..0000000 --- a/third_party/crc32c/src/crc32c_sse42_check.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#ifndef CRC32C_CRC32C_SSE42_CHECK_H_ -#define CRC32C_CRC32C_SSE42_CHECK_H_ - -// X86-specific code checking the availability of SSE4.2 instructions. - -#include -#include - -#include "crc32c/crc32c_config.h" - -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -// If the compiler supports SSE4.2, it definitely supports X86. - -#if defined(_MSC_VER) -#include - -namespace crc32c { - -inline bool CanUseSse42() { - int cpu_info[4]; - __cpuid(cpu_info, 1); - return (cpu_info[2] & (1 << 20)) != 0; -} - -} // namespace crc32c - -#else // !defined(_MSC_VER) -#include - -namespace crc32c { - -inline bool CanUseSse42() { - unsigned int eax, ebx, ecx, edx; - return __get_cpuid(1, &eax, &ebx, &ecx, &edx) && ((ecx & (1 << 20)) != 0); -} - -} // namespace crc32c - -#endif // defined(_MSC_VER) - -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -#endif // CRC32C_CRC32C_SSE42_CHECK_H_ diff --git a/third_party/crc32c/src/crc32c_sse42_unittest.cc b/third_party/crc32c/src/crc32c_sse42_unittest.cc deleted file mode 100644 index c73ad8d..0000000 --- a/third_party/crc32c/src/crc32c_sse42_unittest.cc +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "gtest/gtest.h" - -#include "./crc32c_extend_unittests.h" -#include "./crc32c_sse42.h" - -namespace crc32c { - -#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -struct Sse42TestTraits { - static uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) { - return ExtendSse42(crc, data, count); - } -}; - -INSTANTIATE_TYPED_TEST_SUITE_P(Sse42, ExtendTest, Sse42TestTraits); - -#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__)) - -} // namespace crc32c diff --git a/third_party/crc32c/src/crc32c_test_main.cc b/third_party/crc32c/src/crc32c_test_main.cc deleted file mode 100644 index c07e1c8..0000000 --- a/third_party/crc32c/src/crc32c_test_main.cc +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "crc32c/crc32c_config.h" - -#include "gtest/gtest.h" - -#if CRC32C_TESTS_BUILT_WITH_GLOG -#include "glog/logging.h" -#endif // CRC32C_TESTS_BUILT_WITH_GLOG - -int main(int argc, char** argv) { -#if CRC32C_TESTS_BUILT_WITH_GLOG - google::InitGoogleLogging(argv[0]); - google::InstallFailureSignalHandler(); -#endif // CRC32C_TESTS_BUILT_WITH_GLOG - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/third_party/crc32c/src/crc32c_unittest.cc b/third_party/crc32c/src/crc32c_unittest.cc deleted file mode 100644 index d6c6af6..0000000 --- a/third_party/crc32c/src/crc32c_unittest.cc +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2017 The CRC32C Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. See the AUTHORS file for names of contributors. - -#include "crc32c/crc32c.h" - -#include -#include -#include - -#include "gtest/gtest.h" - -#include "./crc32c_extend_unittests.h" - -TEST(Crc32CTest, Crc32c) { - // From rfc3720 section B.4. - uint8_t buf[32]; - - std::memset(buf, 0, sizeof(buf)); - EXPECT_EQ(static_cast(0x8a9136aa), - crc32c::Crc32c(buf, sizeof(buf))); - - std::memset(buf, 0xff, sizeof(buf)); - EXPECT_EQ(static_cast(0x62a8ab43), - crc32c::Crc32c(buf, sizeof(buf))); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(i); - EXPECT_EQ(static_cast(0x46dd794e), - crc32c::Crc32c(buf, sizeof(buf))); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(31 - i); - EXPECT_EQ(static_cast(0x113fdb5c), - crc32c::Crc32c(buf, sizeof(buf))); - - uint8_t data[48] = { - 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - EXPECT_EQ(static_cast(0xd9963a56), - crc32c::Crc32c(data, sizeof(data))); -} - -namespace crc32c { - -struct ApiTestTraits { - static uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) { - return ::crc32c::Extend(crc, data, count); - } -}; - -INSTANTIATE_TYPED_TEST_SUITE_P(Api, ExtendTest, ApiTestTraits); - -} // namespace crc32c - -TEST(CRC32CTest, Crc32cCharPointer) { - char buf[32]; - - std::memset(buf, 0, sizeof(buf)); - EXPECT_EQ(static_cast(0x8a9136aa), - crc32c::Crc32c(buf, sizeof(buf))); - - std::memset(buf, 0xff, sizeof(buf)); - EXPECT_EQ(static_cast(0x62a8ab43), - crc32c::Crc32c(buf, sizeof(buf))); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(i); - EXPECT_EQ(static_cast(0x46dd794e), - crc32c::Crc32c(buf, sizeof(buf))); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(31 - i); - EXPECT_EQ(static_cast(0x113fdb5c), - crc32c::Crc32c(buf, sizeof(buf))); -} - -TEST(CRC32CTest, Crc32cStdString) { - std::string buf; - buf.resize(32); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(0x00); - EXPECT_EQ(static_cast(0x8a9136aa), crc32c::Crc32c(buf)); - - for (size_t i = 0; i < 32; ++i) - buf[i] = '\xff'; - EXPECT_EQ(static_cast(0x62a8ab43), crc32c::Crc32c(buf)); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(i); - EXPECT_EQ(static_cast(0x46dd794e), crc32c::Crc32c(buf)); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(31 - i); - EXPECT_EQ(static_cast(0x113fdb5c), crc32c::Crc32c(buf)); -} - -#if __cplusplus > 201402L -#if __has_include() - -TEST(CRC32CTest, Crc32cStdStringView) { - uint8_t buf[32]; - std::string_view view(reinterpret_cast(buf), sizeof(buf)); - - std::memset(buf, 0, sizeof(buf)); - EXPECT_EQ(static_cast(0x8a9136aa), crc32c::Crc32c(view)); - - std::memset(buf, 0xff, sizeof(buf)); - EXPECT_EQ(static_cast(0x62a8ab43), crc32c::Crc32c(view)); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(i); - EXPECT_EQ(static_cast(0x46dd794e), crc32c::Crc32c(view)); - - for (size_t i = 0; i < 32; ++i) - buf[i] = static_cast(31 - i); - EXPECT_EQ(static_cast(0x113fdb5c), crc32c::Crc32c(view)); -} - -#endif // __has_include() -#endif // __cplusplus > 201402L - -#define TESTED_EXTEND Extend -#include "./crc32c_extend_unittests.h" -#undef TESTED_EXTEND diff --git a/third_party/libtiff/CMakeLists.txt b/third_party/libtiff/CMakeLists.txt deleted file mode 100644 index 179f782..0000000 --- a/third_party/libtiff/CMakeLists.txt +++ /dev/null @@ -1,250 +0,0 @@ -# CMake build for libtiff -# Run "cmake" to generate the build files for your platform -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -cmake_minimum_required(VERSION 3.10) - -# Default policy is from 3.10 -cmake_policy(VERSION 3.10) - -if(POLICY CMP0074) - # Allow find_package() to use the ZLIB_ROOT variable, if available. - cmake_policy(SET CMP0074 NEW) -endif() - -# Find CMake modules in cmake/ -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") - -# Read version information from configure.ac. -include(AutotoolsVersion) -message(STATUS "Building tiff version ${LIBTIFF_VERSION_FULL}") - -# Project definition -set(CMAKE_C_STANDARD 99) -project(tiff - VERSION "${LIBTIFF_VERSION}" - LANGUAGES C CXX) - -if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) - # libtiff is being included as a subproject of some other project. - set(TIFF_INSTALL_DEFAULT OFF) -else() - set(TIFF_INSTALL_DEFAULT ON) - option(BUILD_SHARED_LIBS "Build shared libraries" ON) -endif() - -if (BUILD_SHARED_LIBS) - set(TIFF_STATIC_LIBS_DEFAULT FALSE) -else() - set(TIFF_STATIC_LIBS_DEFAULT TRUE) - endif() - -option(tiff-static "build TIFF static libraries" ${TIFF_STATIC_LIBS_DEFAULT}) -option(tiff-tools "build TIFF tools" ON) -option(tiff-tests "build TIFF tests" ON) -option(tiff-contrib "build TIFF contrib" ON) -option(tiff-docs "build TIFF documentation" ON) -option(tiff-deprecated "build TIFF deprecated features" OFF) -option(tiff-install "install TIFF targets" ${TIFF_INSTALL_DEFAULT}) - -if (tiff-static) - set(TIFF_BUILD_LIB_VALUE STATIC) -else() - set(TIFF_BUILD_LIB_VALUE SHARED) -endif() - -# Disable deprecated features to ensure clean build -if (tiff-deprecated) - add_definitions(-DTIFF_DISABLE_DEPRECATED) -endif() - -# Autotools compatibility -include(AutotoolsCompat) - -# Compiler checks (warning flags, etc.) -include(CompilerChecks) - -# Linker checks (version script, etc.) -include(LinkerChecks) - -# Processor checks (endianness, fill order, floating point, etc.) -include(ProcessorChecks) - -# Checks for headers -include(IncludeChecks) - -# Checks for functions and other symbols -include(SymbolChecks) - -# Standard installation paths -include(GNUInstallDirs) -# Documentation install directory (default to cmake project docdir) -set(LIBTIFF_DOCDIR "${CMAKE_INSTALL_DOCDIR}") - -# CTest testing -enable_testing() - -# Checks for type presence and size -include(TypeSizeChecks) - -# Check for POSIX Large File Support (LFS) -include(LargeFileSupport) - -# Options for internal codec support -include(InternalCodecs) - -# Check for Deflate codec -include(DeflateCodec) - -# Check for PixarLog codec -include(PixarLogCodec) - -# Check for JPEG codec -include(JPEGCodec) - -# Check for JBIG codec -include(JBIGCodec) - -# Check for LERC codec -include(LERCCodec) - -# Check for LZMA codec -include(LZMACodec) - -# Check for ZSTD codec -include(ZSTDCodec) - -# Check for WebP codec -include(WebPCodec) - -# Option for C++ libtiffxx library -include(CXXLibrary) - -# Checks for OpenGL support -include(OpenGLChecks) - -# Windows support -include(WindowsSupport) - -# Orthogonal features -include(LibraryFeatures) - - -# math.h/libm portability -find_package(CMath REQUIRED) - -# Release support -include(Release) - -# Process subdirectories -add_subdirectory(port) -add_subdirectory(libtiff) -if(tiff-tools) - add_subdirectory(tools) -endif() -if(tiff-tests) - add_subdirectory(test) -endif() -if(tiff-contrib) - add_subdirectory(contrib) -endif() -add_subdirectory(build) -if(tiff-docs) - add_subdirectory(doc) -endif() - -# pkg-config support -include(PkgConfig) - -message(STATUS "") -message(STATUS "Libtiff is now configured for ${CMAKE_SYSTEM}") -message(STATUS "") -if (NOT LIBTIFF_RELEASE_VERSION STREQUAL LIBTIFF_VERSION_FULL) - message(STATUS " Libtiff release version ${LIBTIFF_RELEASE_VERSION} is not equal to build version!") -endif() -message(STATUS " Libtiff build version: ${LIBTIFF_VERSION_FULL}") -message(STATUS " Libtiff library version: ${SO_VERSION}") -message(STATUS " Libtiff release date: ${LIBTIFF_RELEASE_DATE}") -message(STATUS "") -message(STATUS " Installation directory: ${prefix}") -message(STATUS " Documentation directory: ${LIBTIFF_DOCDIR}") -message(STATUS " C compiler: ${CMAKE_C_COMPILER}") -message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}") -message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}") -message(STATUS " Build tools: ${tiff-tools}") -message(STATUS " Build tests: ${tiff-tests}") -message(STATUS " Build contrib: ${tiff-contrib}") -message(STATUS " Build docs: ${tiff-docs}") -message(STATUS " Build deprecated features: ${tiff-deprecated}") -message(STATUS " Enable linker symbol versioning: ${HAVE_LD_VERSION_SCRIPT}") -message(STATUS " Support Microsoft Document Imaging: ${mdi}") -message(STATUS " Use win32 IO: ${USE_WIN32_FILEIO}") -message(STATUS "") -message(STATUS " Support for internal codecs:") -message(STATUS " CCITT Group 3 & 4 algorithms: ${ccitt}") -message(STATUS " Macintosh PackBits algorithm: ${packbits}") -message(STATUS " LZW algorithm: ${lzw}") -message(STATUS " ThunderScan 4-bit RLE algorithm: ${thunder}") -message(STATUS " NeXT 2-bit RLE algorithm: ${next}") -message(STATUS " LogLuv high dynamic range encoding: ${logluv}") -message(STATUS "") -message(STATUS " Support for external codecs:") -message(STATUS " ZLIB support: Requested:${zlib} Availability:${ZLIB_FOUND} Support:${ZLIB_SUPPORT}") -if(ZLIB_SUPPORT) - message(STATUS " libdeflate support: Requested:${libdeflate} Availability:${DEFLATE_FOUND} Support:${LIBDEFLATE_SUPPORT}") -else() - message(STATUS " libdeflate support: Requested:${libdeflate} Availability:${DEFLATE_FOUND} Support:${LIBDEFLATE_SUPPORT} (Depends on ZLIB Support)") -endif() -if(ZLIB_SUPPORT) - message(STATUS " Pixar log-format algorithm: Requested:${pixarlog} Availability:${ZLIB_FOUND} Support:${PIXARLOG_SUPPORT}") -else() - message(STATUS " Pixar log-format algorithm: Requested:${pixarlog} Availability:${ZLIB_FOUND} Support:${PIXARLOG_SUPPORT} (Depends on ZLIB Support)") -endif() -message(STATUS " JPEG support: Requested:${jpeg} Availability:${JPEG_FOUND} Support:${JPEG_SUPPORT}") -if(JPEG_SUPPORT) - message(STATUS " Old JPEG support: Requested:${old-jpeg} Availability:${JPEG_SUPPORT} Support:${OJPEG_SUPPORT}") -else() - message(STATUS " Old JPEG support: Requested:${old-jpeg} Availability:${JPEG_SUPPORT} Support:${OJPEG_SUPPORT} (Depends on JPEG Support)") -endif() -if(JPEG_SUPPORT AND HAVE_JPEGTURBO_DUAL_MODE_8_12) - message(STATUS " JPEG 8/12 bit dual mode: Support: yes (libjpeg turbo >= 3.0 dual mode)") -else() - message(STATUS " JPEG 8/12 bit dual mode: Requested:${jpeg12} Availability:${JPEG12_FOUND} Support:${JPEG_DUAL_MODE_8_12}") -endif() -message(STATUS " ISO JBIG support: Requested:${jbig} Availability:${JBIG_FOUND} Support:${JBIG_SUPPORT}") -if(ZLIB_SUPPORT) - message(STATUS " LERC support: Requested:${lerc} Availability:${LERC_FOUND} Support:${LERC_SUPPORT}") -else() - message(STATUS " LERC support: Requested:${lerc} Availability:${LERC_FOUND} Support:${LERC_SUPPORT} (Depends on ZLIB Support)") -endif() -message(STATUS " LZMA2 support: Requested:${lzma} Availability:${liblzma_FOUND} Support:${LZMA_SUPPORT}") -message(STATUS " ZSTD support: Requested:${zstd} Availability:${ZSTD_USABLE} Support:${ZSTD_SUPPORT}") -message(STATUS " WEBP support: Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}") -message(STATUS "") -message(STATUS " C++ support: ${tiff-cxx} (requested) ${CXX_SUPPORT} (availability)") -message(STATUS "") -# message(STATUS " X Athena Widgets support: ${HAVE_XAW}") -message(STATUS " OpenGL support: Requested:${tiff-opengl} Availability:${HAVE_OPENGL} Support:${OPENGL_SUPPORT}") -message(STATUS "") diff --git a/third_party/libtiff/ChangeLog b/third_party/libtiff/ChangeLog deleted file mode 100644 index 9079ce3..0000000 --- a/third_party/libtiff/ChangeLog +++ /dev/null @@ -1,18685 +0,0 @@ -2025-09-11 Even Rouault - - Merge branch 'raw2tiff-742' into 'master' - raw2tiff: close input file before exit; issue #742 - - See merge request libtiff/libtiff!761 - -2025-09-08 Lee Howard - - raw2tiff: close input file before exit; issue #742. - -2025-09-06 Even Rouault - - Merge branch 'doc_add_LZW_BSD_license_to_LICENSE_md_issue_431' into 'master' - Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) to LICENSE.md - - Closes #431 - - See merge request libtiff/libtiff!760 - -2025-09-06 Even Rouault - - Merge branch 'formatting_issues' into 'master' - Fix formatting issues - - See merge request libtiff/libtiff!759 - -2025-09-05 Even Rouault - - Fix formatting issues. - -2025-09-05 Even Rouault - - Merge branch 'tiff2pdf-741' into 'master' - avoid null pointer dereference, tiff2pdf #741 - - See merge request libtiff/libtiff!758 - -2025-09-05 Lee Howard - - tiff2pdf: avoid null pointer dereference. - Fixes #741 - -2025-09-05 Even Rouault - - Merge branch 'tiffcrop-740' into 'master' - avoid buffer overflow in tiffcrop #740 - - See merge request libtiff/libtiff!757 - -2025-09-05 Lee Howard - - tiffcrop: avoid buffer overflow. - Fixes #740 - -2025-09-05 Even Rouault - - Merge branch 'tiffmedian-735' into 'master' - close tiffmedian input file - #735 - - See merge request libtiff/libtiff!756 - -2025-09-05 Lee Howard - - tiffmedian: close input file. - Fixes #735 - -2025-09-05 Even Rouault - - Merge branch 'tiffcrop-734' into 'master' - Tiffcrop 734 - - See merge request libtiff/libtiff!755 - -2025-09-05 Lee Howard - - tiffcrop: avoid nullptr dereference. - Fixes #734 - -2025-09-05 Even Rouault - - Merge branch 'tiffdither-733' into 'master' - avoid out-of-bounds read identified in #733 - - See merge request libtiff/libtiff!754 - -2025-09-05 Lee Howard - - tiffdither: avoid out-of-bounds read identified in #733. - -2025-09-05 Even Rouault - - Merge branch 'tiffcrop-721' into 'master' - fix double-free and memory leak exposed by issue #721 - - See merge request libtiff/libtiff!753 - -2025-09-05 Lee Howard - - tiffcrop: fix double-free and memory leak exposed by issue #721. - -2025-09-04 Su_Laus - - Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) to LICENSE.md - Closes #431 - -2025-09-04 Even Rouault - - Merge branch 'fix_54_read_CCITT_FAX_group3_without_EOL' into 'master' - tif_fax3: For fax group 3 data if no EOL is detected, reading is retried without synchronisation for EOLs. - - Closes #54 - - LibTIFF can write (encode) faxes of group 3 1d without EOL, but cannot read (decode) such files. This function has been added. - - See merge request libtiff/libtiff!752 - -2025-09-04 Su Laus - - tif_fax3: For fax group 3 data if no EOL is detected, reading is retried without synchronisation for EOLs. - Closes #54 - - LibTIFF can write (encode) faxes of group 3 1d without EOL, but cannot read (decode) such files. This function has been added. - -2025-09-04 Even Rouault - - Merge branch 'no-public-fix' into 'master' - tiffio.h: fix compilation with LOGLUV_PUBLIC=0 - - See merge request libtiff/libtiff!748 - -2025-08-19 Even Rouault - - Merge branch 'doc_returnvalue_mapproc_issue_#12' into 'master' - doc: update TIFFOpen.rst with the return values of mapproc and unmapproc. - - Closes #12 - - See merge request libtiff/libtiff!749 - -2025-08-19 Even Rouault - - Merge branch 'tiffcp_preset_level' into 'master' - tiffcp: fix setting compression level for lossless codecs - - Closes #730 - - See merge request libtiff/libtiff!750 - -2025-08-19 Jan Musinsky - - tiffcp: fix setting compression level for lossless codecs. - Closes #730 - -2025-08-17 Su_Laus - - doc: update TIFFOpen.rst with the return values of mapproc and unmapproc. - Closes #12 - -2025-08-12 Tim Blechmann - - tiffio.h: fix compilation with LOGLUV_PUBLIC=0. - LOGLUV_PUBLIC can be used to compile some functions with hidden - visibility. - However this functionality was broken (in clang), as LOGLUV_PUBLIC was - defined to 1 if it wasn't defined, as the extern declarations were still - visible by the compiler leading to "static declaration follows - non-static declaration" errors. - Changing the header from #ifdef to #if fixes the issue. - -2025-08-11 Even Rouault - - Merge branch 'fix_728_729_tiffcmp_memory_leak' into 'master' - tiffcmp: fix memory leak when second file cannot be opened. fix #728, #729 - - Closes #728 and #729 - - See merge request libtiff/libtiff!747 - -2025-08-08 Su_Laus - - tiffcmp: fix memory leak when second file cannot be opened. - Closes #728, #729 - -2025-08-08 Even Rouault - - Merge branch 'fix-issue-720' into 'master' - add assert for TIFFReadCustomDirectory infoarray check - - See merge request libtiff/libtiff!744 - -2025-08-08 Even Rouault - - Merge branch 'fix_718_tiff2ps_defer_strile_load' into 'master' - tiff2ps: check return of TIFFGetFiled() to fix #718 - - Closes #718 - - See merge request libtiff/libtiff!746 - -2025-08-02 Su_Laus - - tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference. - Closes #718 - -2025-07-29 lxy <854071997@qq.com> - - add assert for TIFFReadCustomDirectory infoarray check. - -2025-07-11 Even Rouault - - Merge branch 'tif_jpeg_12_bit_bug_JPEGDecodeRaw_fix_717' into 'master' - tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined. - - Closes #717 - - See merge request libtiff/libtiff!743 - -2025-07-11 Su_Laus - - tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for 8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually released as 3.0. - Closes #717 - -2025-07-10 Even Rouault - - Merge branch 'tiffdump_coverity_fix' into 'master' - tiffdump: Fix coverity scan issue CID 1373365 tainted divisor. - - See merge request libtiff/libtiff!742 - -2025-07-06 Su_Laus - - tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression *datamem to PrintData, which uses it as a divisor or modulus. - -2025-07-05 Even Rouault - - Merge branch 'tiffcrop_coverity_scan_update' into 'master' - tiffcrop: Fix coverity scan issue CID 1655232 - - See merge request libtiff/libtiff!741 - -2025-07-02 Su_Laus - - tiffcrop: Fix coverity scan issue CID 1655232: Uninitialized variables (UNINIT) Using uninitialized value "crop.selections". - -2025-07-02 Even Rouault - - Merge branch 'fix_716_tiffcrop_memory_leak_on_error_exit' into 'master' - tiffcrop: close files and release memory on error exit, fix #716 - - Closes #716 - - See merge request libtiff/libtiff!740 - -2025-06-27 Su_Laus - - Close open TIFF files and release allocated buffers in tiffcrop before exiting in case of error to avoid memory leaks. - -2025-06-26 Even Rouault - - Merge branch 'fix_714' into 'master' - JPEGEncodeRaw(): error out if a previous scanline failed to be written, to... - - Closes #714 - - See merge request libtiff/libtiff!739 - -2025-06-25 Even Rouault - - JPEGEncodeRaw(): error out if a previous scanline failed to be written, to avoid out-of-bounds access - Fixes #714 - -2025-06-25 Even Rouault - - Merge branch 'improve_TIFFReadRGBAImage' into 'master' - Improve TIFFReadRGBAImage and avoid buffer overflows. - - See merge request libtiff/libtiff!738 - -2025-06-25 Su Laus - - Improve TIFFReadRGBAImage and avoid buffer overflows. - * Raster width can now be larger than image width. - * Only image data are copied to raster buffer if tiles are padded. - * Avoid buffer overflow if col_offset \> 0. - * If row_offset \> 0 do not try to read after last row - avoiding warnings. - * Feature "col_offset" and "row_offset" now works as expected. - -2025-06-25 Even Rouault - - Merge branch 'thumbnail-715' into 'master' - Fix for thumbnail issue #715 - - See merge request libtiff/libtiff!737 - -2025-06-25 Lee Howard - - Fix for thumbnail issue #715. - -2025-06-25 Even Rouault - - Merge branch 'issue-711' into 'master' - Fix for issue #711 - - See merge request libtiff/libtiff!735 - -2025-06-25 Lee Howard - - TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when clearing tif_rawdata - Fix for issue #711 - -2025-06-25 Even Rouault - - Merge branch 'tiff_itrunc_rand' into 'master' - tiff_itrunc(): don't use rand() to please Coverity Scan - - See merge request libtiff/libtiff!733 - -2025-06-12 Even Rouault - - tiff_itrunc(): don't use rand() to please Coverity Scan. - -2025-06-12 Even Rouault - - Merge branch 'tiff-static' into 'master' - Add build option tiff-static, fixes #709 - - Closes #709 - - See merge request libtiff/libtiff!731 - -2025-06-12 Demetrius flavious - - CMake: Add build option tiff-static, fixes #709. - -2025-06-11 Even Rouault - - Merge branch 'fix_704_TIFFReadRGBAImage_crash' into 'master' - tif_getimage.c: Fix buffer underflow crash for less raster rows at TIFFReadRGBAImageOriented() - - Closes #704 - - See merge request libtiff/libtiff!732 - -2025-06-11 Su Laus - - tif_getimage.c: Fix buffer underflow crash for less raster rows at TIFFReadRGBAImageOriented() - -2025-06-06 Even Rouault - - Merge branch 'coverity_fixes' into 'master' - tif_zip.c: changes to please Coverity Scan - - See merge request libtiff/libtiff!730 - -2025-06-06 Even Rouault - - tif_zip.c: changes to please Coverity Scan. - -2025-06-03 Even Rouault - - Merge branch 'mkg3states' into 'master' - Move mkg3states under libtiff/tools, fixes #708 - - Closes #708 - - See merge request libtiff/libtiff!728 - -2025-06-03 Even Rouault - - Merge branch 'fix_MSVC_warnings_in_some_tools' into 'master' - Fixing MSVC compiler warnings in some tools. - - See merge request libtiff/libtiff!729 - -2025-06-03 Su Laus - - Fixing MSVC compiler warnings in some tools. - -2025-05-27 Lior Lahav - - Move mkg3states under libtiff/tools, fixes #708. - -2025-05-25 Even Rouault - - Merge branch 'cmake3.10' into 'master' - Fixed: CMake 4.0 warning when minimum required version is < 3.10 - - See merge request libtiff/libtiff!726 - -2025-05-25 Even Rouault - - Merge branch 'fix_MSVC_warnings_in_some_test_progs' into 'master' - Fixing MSVC compiler warnings in some test programs. - - See merge request libtiff/libtiff!725 - -2025-05-25 Su Laus - - Fixing MSVC compiler warnings in some test programs. - -2025-05-25 Even Rouault - - Merge branch 'predict_speedup' into 'master' - tif_predict.c: speed-up decompression in some cases - - See merge request libtiff/libtiff!724 - -2025-05-25 Even Rouault - - Merge branch 'tiffmedian-707' into 'master' - Tiffmedian 707 - - See merge request libtiff/libtiff!727 - -2025-05-25 Lee Howard - - conflict resolution. - - Fix tiffmedian bug #707. - -2025-05-24 Lior Lahav - - Fixed: CMake 4.0 warning when minimum required version is < 3.10. - -2025-05-23 Even Rouault - - tif_predict.c: speed-up decompression in some cases. - - Predictor=2 on Byte datatype with some loop unrolling - - Predictor=3 on Float32 datatype with some loop unrolling and SSE2 in the interleaving phae - - Tested on: - - https://rockyweb.usgs.gov/vdelivery/Datasets/Staged/Elevation/1m/Projects/WA_FEMAHQ_2018_D18/TIFF/USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif - USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif: 10012x10012, single band, Float32, LZW-compressed, Predictor=3, 316 MiB - - - and hillshade_predict.tif: 10012x10012, single band, Byte, ZSTD-compressed, Predictor=2, 63 MiB - (result of gdaldem hillshade USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif hillshade_predict.tif -co COMPRESS=ZSTD -co PREDICTOR=2) - - master: - ``` - $ hyperfine --warmup 2 -- "gdal raster convert hillshade_predict.tif foo --of mem -q" - Benchmark #1: gdal raster convert hillshade_predict.tif foo --of mem -q - Time (mean ± σ): 512.1 ms ± 2.0 ms [User: 413.1 ms, System: 98.3 ms] - Range (min … max): 509.6 ms … 516.4 ms - - $ hyperfine --warmup 2 -- "gdal raster convert USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif foo --of mem" - Benchmark #1: gdal raster convert USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif foo --of mem - Time (mean ± σ): 2.126 s ± 0.027 s [User: 1.844 s, System: 0.280 s] - Range (min … max): 2.098 s … 2.194 s - ``` - - this PR: - ``` - $ hyperfine --warmup 2 -- "gdal raster convert hillshade_predict.tif foo --of mem" - Benchmark #1: gdal raster convert hillshade_predict.tif foo --of mem - Time (mean ± σ): 384.3 ms ± 1.9 ms [User: 285.1 ms, System: 98.3 ms] - Range (min … max): 381.6 ms … 387.4 ms - - $ hyperfine --warmup 2 -- "gdal raster convert USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif foo --of mem" - Benchmark #1: gdal raster convert USGS_1M_10_x56y512_WA_FEMAHQ_2018_D18.tif foo --of mem - Time (mean ± σ): 1.489 s ± 0.004 s [User: 1.201 s, System: 0.286 s] - Range (min … max): 1.484 s … 1.498 s - ``` - -2025-05-22 Even Rouault - - Merge branch 'tiffdither-703' into 'master' - Don't skip the first line of the input image. Addresses issue #703 - - Closes #703 - - See merge request libtiff/libtiff!723 - -2025-05-22 Lee Howard - - tiffdither/tiffmedian: Don't skip the first line of the input image. Addresses issue #703 - -2025-05-22 Even Rouault - - Merge branch 'fix_682_tiff2rgba_size_t_overflow' into 'master' - tiff2rgba: fix #682 buffer overflow - - Closes #682 - - See merge request libtiff/libtiff!722 - -2025-05-22 Even Rouault - - Merge branch 'fix_MSVC_warnings_in_addtiffo' into 'master' - Fixing MSVC compiler warnings in addtiffo. - - See merge request libtiff/libtiff!717 - -2025-05-22 Su Laus - - Fixing MSVC compiler warnings in addtiffo. - -2025-05-19 Lee Howard - - Don't skip the first line of the input image. Addresses issue #703. - -2025-05-17 Su_Laus - - tiff2rgba: fix some "a partial expression can generate an overflow before it is assigned to a broader type" warnings. - Closes #682 - -2025-05-11 Even Rouault - - Merge branch 'master' into 'master' - oss-fuzz: fix memory leak in fuzz target - - See merge request libtiff/libtiff!721 - -2025-05-11 Yuntong Zhang - - oss-fuzz: fix memory leak in fuzz target. - Fixes: https://issues.oss-fuzz.com/issues/385176300 - -2025-05-02 Even Rouault - - Merge branch 'spelling' into 'master' - Spelling fixes. - - See merge request libtiff/libtiff!720 - -2025-05-02 Kurt Schwehr - - Spelling fixes. - Most found with codespell version 2.4.1. - -2025-04-30 Even Rouault - - Merge branch 'configure-ac-syntax-ac-2-71' into 'master' - configure.ac: Syntax updates for Autoconf 2.71 - - See merge request libtiff/libtiff!719 - -2025-04-29 Bob Friesenhahn - - Merge branch 'defines' into 'master' - Move several defines into tif_config.h - - See merge request libtiff/libtiff!664 - -2025-04-29 Bob Friesenhahn - - Merge branch '672-simplify-and-soften-autogen-sh' into 'master' - Resolve "Build fails when https://git.savannah.gnu.org/ is down" - - Closes #672 - - See merge request libtiff/libtiff!718 - -2025-04-29 Bob Friesenhahn - - autogen.sh: Enable verbose wget. - - configure.ac: Syntax updates for Autoconf 2.71. - - autogen.sh: Re-implement based on autoreconf. Failure to update config.guess/config.sub does not return error. - -2025-04-19 Even Rouault - - Merge branch 'fix_698' into 'master' - LZWDecode(): avoid nullptr dereference when trying to read again after... - - Closes #698 - - See merge request libtiff/libtiff!716 - -2025-04-18 Even Rouault - - Merge branch 'fix-684' into 'master' - Fix for buffer underflow - - Closes #684 - - See merge request libtiff/libtiff!713 - -2025-04-18 Timothy Lyanguzov - - Fix for buffer underflow. - -2025-04-18 Even Rouault - - LZWDecode(): avoid nullptr dereference when trying to read again after end-of-information marker has been found with remaining output bytes (fixes #698) - -2025-04-18 Even Rouault - - Merge branch 'correct_not_HAVE_IEEEFP_issue_699' into 'master' - Correct passing arguments to TIFFCvtIEEEFloatToNative().. if HAVE_IEEEFP is not defined. - - See merge request libtiff/libtiff!715 - -2025-04-17 Su_Laus - - Correct passing arguments to TIFFCvtIEEEFloatToNative() and TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. - See #699 - -2025-04-16 Even Rouault - - Merge branch 'integer_overflow_gtTileContig_issue_79' into 'master' - Update some integer overflow checks in tif_getimage.c - - Closes #79 - - See merge request libtiff/libtiff!711 - -2025-04-14 Su_Laus - - Update some integer overflow checks in tif_getimage.c. - Closes #79 - -2025-04-14 Even Rouault - - Merge branch 'fix_issue_5_write_buffer_overwriting_compression_with_prediction' into 'master' - tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if prediction. - - Closes #5 - - See merge request libtiff/libtiff!712 - -2025-04-13 Su_Laus - - tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if "prediction" is enabled. Use extra working buffer in PredictorEncodeRow(). - Closes #5 - -2025-04-11 Even Rouault - - Merge branch 'doc_remove_dead_awaresystems_link' into 'master' - doc: Remove dead links to no more existing Awaresystems web-site. - - See merge request libtiff/libtiff!705 - -2025-04-11 Even Rouault - - Merge branch 'notes_for_allocating_TIFFYCbCrToRGB_structure_issue_681' into 'master' - doc: Added hints for correct allocation of TIFFYCbCrtoRGB structure and its associated buffers. - - Closes #681 - - See merge request libtiff/libtiff!709 - -2025-04-11 Even Rouault - - Merge branch 'doc_add_multi_page_reference_issue_43' into 'master' - doc: Added chapter to "Using the TIFF Library" for multi page - - Closes #43 - - See merge request libtiff/libtiff!710 - -2025-04-10 Su_Laus - - doc: Added chapter to "Using the TIFF Library" with links to handling multi-page TIFF and custom directories. - Closes #43 - -2025-04-09 Su_Laus - - doc: Added hints for correct allocation of TIFFYCbCrtoRGB structure and its associated buffers. - Closes #681 - -2025-04-03 Su_Laus - - Replace some last links and remove last todos. - -2025-04-02 Even Rouault - - Merge branch 'CheckReachedCounters_static' into 'master' - tif_fax3.c: add missing static qualifier in front of CheckReachedCounters() (master only) - - See merge request libtiff/libtiff!708 - -2025-04-02 Even Rouault - - tif_fax3.c: add missing static qualifier in front of CheckReachedCounters() (master only) - -2025-04-01 Su_Laus - - References to codec libraries updated and missing codec compile defines (tiffconf.h) added. - -2025-04-01 Even Rouault - - Merge branch 'fix-676' into 'master' - Fix memory leak in _TIFFSetDefaultCompressionState - - Closes #676 - - See merge request libtiff/libtiff!707 - -2025-04-01 Timothy Lyanguzov - - Fix memory leak in _TIFFSetDefaultCompressionState. - `_TIFFSetDefaultCompressionState` does not clean up before setting default state - - follow up for !563 - fixes #676 - -2025-03-31 Even Rouault - - Merge branch 'tiffcp_integer_overflow_check_issue_546' into 'master' - tiffcp: Improve non-secure integer overflow check. Closes #546 - - Closes #546 - - See merge request libtiff/libtiff!698 - -2025-03-31 Su_Laus - - Improve non-secure integer overflow check (comparison of division result with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. - Closes #546 - -2025-03-28 Even Rouault - - Merge branch 'zlib_solo' into 'master' - zip: Provide zlib allocation functions. - - See merge request libtiff/libtiff!706 - -2025-03-28 Even Rouault - - Merge branch 'fix_670_tif_fax3_EOL_error_count_reached' into 'master' - tif_fax3.c: error out after a number of times end-of-line or unexpected code words - - Closes #670 - - See merge request libtiff/libtiff!703 - -2025-03-28 Even Rouault - - Merge branch 'fix-test-tiffcrop-tiffcp-32bpp-None-jpeg-race' into 'master' - test: Fix race condition in {tiffcrop,tiffcp}-32bpp-None-jpeg.sh tests - - See merge request libtiff/libtiff!701 - -2025-03-28 Even Rouault - - Merge branch 'doc_update_TIFFSetWriteOffset' into 'master' - doc: Clarify TIFFSetWriteOffset() only sets offset for image data and not for IFD data. - - See merge request libtiff/libtiff!699 - -2025-03-28 Even Rouault - - Merge branch 'coverity_fixes_in_tools' into 'master' - Silence some Coverity Scan warnigs and mark already dismissed ones. - - See merge request libtiff/libtiff!696 - -2025-03-25 Nikolay Sivov - - zip: Provide zlib allocation functions. - Otherwise for zlib built with -DZ_SOLO inflating will fail. - -2025-03-23 Su_Laus - - Updating BigTIFF specification and some miscelaneous editions. - -2025-03-20 Su_Laus - - doc: Remove dead links to no more existing Awaresystems web-site. - -2025-03-19 Roger Leigh - - Merge branch 'bugfix/issue_674-export_tiffxx_cmake_target' into 'master' - Export tiffxx cmake target (issue #674) - - See merge request libtiff/libtiff!704 - -2025-03-18 Daniel Moreno - - Export tiffxx cmake target (issue #674) - -2025-03-04 Su_Laus - - tif_fax3.c: error out after a number of times end-of-line or unexpected bad code words have been reached. - Closes #670 - -2025-03-03 Bob Friesenhahn - - Merge branch 'fix_665_memory_leak' into 'master' - Fix memory leak of issue # 665 (td_stripbytecount_p and td_stripoffset_p in TIFFSetupStrips()) - - Closes #665 - - See merge request libtiff/libtiff!697 - -2025-03-03 Su Laus - - Fix memory leak of issue # 665 (td_stripbytecount_p and td_stripoffset_p in TIFFSetupStrips()) - -2025-02-26 Gabi Falk - - test: Fix race condition in {tiffcrop,tiffcp}-32bpp-None-jpeg.sh tests. - These tests used the same output path, which could cause failures - when run in parallel. These were the only tests with a conflicting - outfile= parameter. - - Link: https://bugs.gentoo.org/943020 - -2025-02-25 Bob Friesenhahn - - Merge branch 'doc_re_entrancy_and_thread_safety_see_667' into 'master' - doc: Update documentation on re-entrancy and thread safety. - - Closes #667 - - See merge request libtiff/libtiff!700 - -2025-02-25 Su Laus - - doc: Update documentation on re-entrancy and thread safety. - -2025-02-23 Su_Laus - - doc/functions/TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for image data and not for IFD data. - -2025-02-16 Su_Laus - - Silence some Coverity Scan warnigs and mark already dismissed ones. Guard all code related to CHUNKY_STRIP_READ_SUPPORT. - -2025-02-11 Even Rouault - - Merge branch 'doc_remove_deprecated_type_definitions' into 'master' - doc: Update the documentation to reflect deprecated typedefs - - See merge request libtiff/libtiff!694 - -2025-02-11 Su Laus - - doc: Update the documentation to reflect deprecated typedefs. - -2025-02-09 Su_Laus - - Silence some Coverity Scan warnigs and mark already dismissed ones. - -2025-01-30 Su Laus - - Merge branch 'patch-1' into 'master' - Doc: Fix return type of TIFFReadEncodedTile() - - See merge request libtiff/libtiff!693 - -2025-01-25 Mark Riehm - - Doc: Fix return type of TIFFReadEncodedTile() - -2025-01-14 Even Rouault - - Merge branch 'coverity_1638738' into 'master' - TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return - - See merge request libtiff/libtiff!692 - -2025-01-12 Even Rouault - - TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return. - Fix Coverity Scan: - ``` - CID 1638738: Error handling issues (CHECKED_RETURN) - Calling "_TIFFCheckDirNumberAndOffset" without checking return value (as is done elsewhere 4 out of 5 times). - ``` - -2025-01-12 Even Rouault - - Merge branch 'remove_get_field_type_from_structure' into 'master' - Remove get_field_type form TIFFField structure because it is not used anymore - - See merge request libtiff/libtiff!691 - -2025-01-09 Su_Laus - - Remove get_field_type form TIFFField structure because it is not used anymore and rename other parameter to set_get_field_type. - -2025-01-06 Even Rouault - - Merge branch 'doc_update_adding_new_tags_fix_642' into 'master' - doc: Update "Defining New TIFF Tags" description. See also #642. - - Closes #642 - - See merge request libtiff/libtiff!655 - -2025-01-06 Su Laus - - doc: Update "Defining New TIFF Tags" description. See also #642. - -2025-01-01 Even Rouault - - Merge branch 'fax_encode_sample_per_pixel_warning' into 'master' - tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal 1 and PlanarConfiguration = Contiguous - - Closes #26 - - See merge request libtiff/libtiff!687 - -2025-01-01 Su Laus - - tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal 1 and PlanarConfiguration = Contiguous - -2024-12-31 Even Rouault - - Merge branch 'fix_663' into 'master' - _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds read... - - Closes #663 - - See merge request libtiff/libtiff!689 - -2024-12-30 Even Rouault - - _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds read / nullptr dereference) in case of out-of-memory situation when dealing with custom tags - Fixes #663 - -2024-12-30 Even Rouault - - Merge branch 'master' into 'master' - Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc - - See merge request libtiff/libtiff!688 - -2024-12-30 Fabio Gritti - - Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc. - -2024-12-30 Even Rouault - - Merge branch 'LINKER_LANGUAGE' into 'master' - Set LINKER_LANGUAGE for C targets with C++ deps - - See merge request libtiff/libtiff!685 - -2024-12-30 Even Rouault - - Merge branch 'merge_multiple_functions_implemented_twice_#154' into 'master' - Merge several functions implemented twice in different modules, see #154 - - Closes #154 - - See merge request libtiff/libtiff!681 - -2024-12-30 Su Laus - - Merge several functions implemented twice in different modules, see #154 - -2024-12-19 Alyssa Ross - - Set LINKER_LANGUAGE for C targets with C++ deps. - When C and C++ code are being linked together, a C++ compiler has to - be used. In my experience, this doesn't always cause problems, but it - tends to when doing static builds. - - Without this change, I got build failures when I had lerc enabled: - - cd /build/source/build/tools && /nix/store/6941y72hx1k8rxiygm4iin16i4zhcdqr-cmake-3.30.5/bin/cmake -E cmake_link_script CMakeFiles/fax2ps.dir/link.txt --verbose=1 - /nix/store/gb7zjcg4fh1mnd5qp4pkrlib55w6j42l-aarch64-unknown-linux-musl-gcc-wrapper-13.3.0/bin/aarch64-unknown-linux-musl-gcc -Wall -Winline -Wformat-security -Wpointer-arith -Wdisabled-optimization -Wno-unknown-pragmas -fstrict-aliasing -O3 -DNDEBUG CMakeFiles/fax2ps.dir/fax2ps.c.o -o fax2ps ../libtiff/libtiff.a -Wl,-Bdynamic /nix/store/n49vspyhaga9pabpqqcwm9rlam7r4152-zlib-static-aarch64-unknown-linux-musl-1.3.1/lib/libz.a /nix/store/k71jx85iin8bvgqs1viq263qp186nb9h-libdeflate-static-aarch64-unknown-linux-musl-1.22/lib/libdeflate.a /nix/store/kp6hkjfjdmd94crz6claldi5hg9z8r87-libjpeg-turbo-static-aarch64-unknown-linux-musl-3.0.4/lib/libjpeg.a /nix/store/h2f1h8bri9d0mvdrvn5ad94hy31dan2s-lerc-static-aarch64-unknown-linux-musl-4.0.0/lib/libLerc.a /nix/store/hjf3h5prgfdadv3wsj4172sdxrnycgba-xz-static-aarch64-unknown-linux-musl-5.6.3/lib/liblzma.a /nix/store/qh8h4fdsvhj75xliiqb71qrynnng51p2-zstd-static-aarch64-unknown-linux-musl-1.5.6/lib/libzstd.a /nix/store/002ykljzr16pfxnijq7x8hr4nbicg745-libwebp-static-aarch64-unknown-linux-musl-1.4.0/lib/libwebp.a /nix/store/002ykljzr16pfxnijq7x8hr4nbicg745-libwebp-static-aarch64-unknown-linux-musl-1.4.0/lib/libsharpyuv.a /nix/store/dnm541qbzfanx6r0kqbc2p4xfjiwl4sf-musl-static-aarch64-unknown-linux-musl-1.2.5/lib/libm.a -Wl,-Bstatic - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: /nix/store/h2f1h8bri9d0mvdrvn5ad94hy31dan2s-lerc-static-aarch64-unknown-linux-musl-4.0.0/lib/libLerc.a(Lerc.cpp.o): in function `std::vector >::operator=(std::vector > const&) [clone .isra.0]': - (.text+0x140): undefined reference to `operator new(unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x16c): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x26c): undefined reference to `std::__throw_bad_alloc()' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: /nix/store/h2f1h8bri9d0mvdrvn5ad94hy31dan2s-lerc-static-aarch64-unknown-linux-musl-4.0.0/lib/libLerc.a(Lerc.cpp.o): in function `LercNS::Lerc::GetRanges(unsigned char const*, unsigned int, int, LercNS::Lerc2::HeaderInfo const&, double*, double*, unsigned long)': - (.text+0x10a0): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x10b4): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x10c8): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x10ec): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: (.text+0x1100): undefined reference to `operator delete(void*, unsigned long)' - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: /nix/store/h2f1h8bri9d0mvdrvn5ad94hy31dan2s-lerc-static-aarch64-unknown-linux-musl-4.0.0/lib/libLerc.a(Lerc.cpp.o):(.text+0x1114): more undefined references to `operator delete(void*, unsigned long)' follow - /nix/store/ncvpwrpay6vvh9wwc6fq28lb9hip7chc-aarch64-unknown-linux-musl-binutils-2.43.1/bin/aarch64-unknown-linux-musl-ld: /nix/store/h2f1h8bri9d0mvdrvn5ad94hy31dan2s-lerc-static-aarch64-unknown-linux-musl-4.0.0/lib/libLerc.a(Lerc.cpp.o): in function `bool LercNS::Lerc::Convert(LercNS::CntZImage const&, signed char*, unsigned char*, bool)': - [1808 more lines of this ommitted] - collect2: error: ld returned 1 exit status - -2024-12-17 Even Rouault - - Merge branch 'read_only' into 'master' - Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY macros - - See merge request libtiff/libtiff!683 - -2024-12-17 Even Rouault - - Merge branch 'libtiff_predictor_3_inverted_endianness_write_fix' into 'master' - fix writing a Predictor=3 file with non-native endianness - - See merge request libtiff/libtiff!684 - -2024-12-17 Even Rouault - - fix writing a Predictor=3 file with non-native endianness. - - Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY macros - to disable compiling write-support for those codecs. - Also add missing casts in LERC codec. - -2024-12-16 Even Rouault - - Merge branch 'tif_lzw_packbits_null' into 'master' - tif_lzw.c / tif_packbits.c: use NULL instead of 0 - - See merge request libtiff/libtiff!682 - -2024-12-16 Even Rouault - - tif_lzw.c / tif_packbits.c: use NULL instead of 0. - -2024-12-09 Even Rouault - - Merge branch 'manpage_TIFFRGBAImage_#67_different_output_unassociated_alpha' into 'master' - manpage: doc/functions/TIFFRGBAImage.rst note added about un-associated alpha handling - - Closes #67 - - See merge request libtiff/libtiff!679 - -2024-12-09 Su Laus - - manpage: doc/functions/TIFFRGBAImage.rst note added about un-associated alpha handling - -2024-12-09 Even Rouault - - Merge branch 'tiff2pdf_division_by_zero_#654' into 'master' - tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by zero. - - Closes #654 - - See merge request libtiff/libtiff!680 - -2024-12-07 Su_Laus - - tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by zero. - Closes #654 - -2024-12-05 Even Rouault - - Merge branch 'master' into 'master' - CMake CMP0074 new policy. - - See merge request libtiff/libtiff!678 - -2024-12-04 榆柳松 - - CMake CMP0074 new policy. - -2024-12-04 Even Rouault - - Merge branch 'manpage_TIFFReadRGBAImage_orientation_fault' into 'master' - doc: TIFFReadRGBAImage.rst note about incorrect saving in raster for some TIFF orientations (5 to 8). - - Closes #76 and #77 - - See merge request libtiff/libtiff!675 - -2024-12-04 Even Rouault - - Merge branch 'TIFFRGBAImageOK_remove_unnecessary_calls' into 'master' - Remove unnecessary calls to TIFFRGBAImageOK() in tif_getimage.c - - Closes #175 - - See merge request libtiff/libtiff!677 - -2024-12-03 Su_Laus - - Remove unnecessary calls to TIFFRGBAImageOK() in tif_getimage.c. - Closes #175 - -2024-11-30 Roger Leigh - - Merge branch 'master' into 'master' - Rename cxx to tiff-cxx - - See merge request libtiff/libtiff!676 - -2024-11-30 榆柳松 - - Rename cxx to tiff-cxx,avoid overly mundane names. - -2024-11-29 Su_Laus - - manpage: doc/functions/TIFFRGBAImage.rst note added for incorrect saving of images with TIFF orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster. - -2024-11-19 Even Rouault - - Merge branch 'fix_test_directory_for_big_endian_machines' into 'master' - Update test/test_directory.c not to fail on big-endian machines. Fix memory leaks - - Closes #652 et #656 - - See merge request libtiff/libtiff!673 - -2024-11-19 Su Laus - - Update test/test_directory.c not to fail on big-endian machines. Fix memory leaks - Closes #652 et #656 - -2024-11-08 Even Rouault - - Merge branch 'tiffdither_multi_page' into 'master' - tiffdither: process all pages in input TIFF file - - See merge request libtiff/libtiff!674 - -2024-11-08 Marco Rullo - - tiffdither: process all pages in input TIFF file. - -2024-10-30 Even Rouault - - Merge branch 'unknown_tag_warnings' into 'master' - No longer emit warnings about unknown tags by default, and add... - - See merge request libtiff/libtiff!463 - -2024-10-29 Even Rouault - - tiffinfo: add a -W switch to warn about unknown tags. - - No longer emit warnings about unknown tags by default, and add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control - -2024-10-28 Even Rouault - - Merge branch 'COMPRESSION_JXL_DNG_1_7' into 'master' - tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in... - - See merge request libtiff/libtiff!672 - -2024-10-27 Even Rouault - - Merge branch '532_MergeFields_with_FIELD_IGNORE' into 'master' - Issue #532: Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - - Closes #532 - - See merge request libtiff/libtiff!668 - -2024-10-27 Su Laus - - Issue #532: Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Improving handling when field_name = NULL. - - Closes #532 - - There was a regression in v4.7.0 related to re-opened issue https://gitlab.com/libtiff/libtiff/-/issues/532#note_2134433038 and following discussion. - -2024-10-27 Even Rouault - - tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in the DNG 1.7 specification - -2024-10-23 Even Rouault - - Merge branch 'fix_651_bis' into 'master' - CMake: fix build with LLVM/Clang 17+ - - Closes #651 - - See merge request libtiff/libtiff!671 - -2024-10-21 Even Rouault - - Merge branch 'remove_useless_cmake_minimum_required' into 'master' - doc/CMakeLists.txt: remove useless cmake_minimum_required() - - See merge request libtiff/libtiff!670 - -2024-10-20 Daniel E @diizzyy - - CMake: fix build with LLVM/Clang 17+ - Fixes #651 - -2024-10-20 Even Rouault - - doc/CMakeLists.txt: remove useless cmake_minimum_required() - There's already one in top CMakeLists.txt (at 3.9.0 currently) - - Newer CMake versions throw this warning with current 3.2.0: - ``` - CMake Deprecation Warning at doc/CMakeLists.txt:27 (cmake_minimum_required): - Compatibility with CMake < 3.5 will be removed from a future version of - CMake. - Update the VERSION argument value or use a ... suffix to tell - CMake that the project does not need compatibility with older versions. - ``` - -2024-10-13 Even Rouault - - Merge branch 'tif_jpeg_65535' into 'master' - tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value - - See merge request libtiff/libtiff!658 - -2024-10-05 Even Rouault - - Merge branch 'fix_gdal_10875' into 'master' - TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24 - - See merge request libtiff/libtiff!665 - -2024-10-05 Even Rouault - - Merge branch 'ppm2tiff_fix_#467_10bit_packwords' into 'master' - ppm2tiff: Fix bug in `pack_words` trailing bytes - - Closes #467 - - See merge request libtiff/libtiff!666 - -2024-10-05 Even Rouault - - Merge branch 'master' into 'master' - Fix issue #649 in fax2ps caused by regression in commit... - - Closes #649 - - See merge request libtiff/libtiff!667 - -2024-10-05 Lee Howard - - Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH for valid input, addresses issue #650 - -2024-09-27 Lee Howard - - Fix issue #649 in fax2ps caused by regression in commit https://gitlab.com/libtiff/libtiff/-/commit/28c38d648b64a66c3218778c4745225fe3e3a06d where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer. - -2024-09-27 Su_Laus - - ppm2tiff: Fix bug in `pack_words` trailing bytes, where last two bytes of each line were written wrongly. - Closes #467. - -2024-09-26 Even Rouault - - TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24. - This function tries to allocate (1 << td_bitspersample) bytes which may - results in denial of services if td_bitspersample is too large. - - Fixes https://github.com/OSGeo/gdal/issues/10875 - -2024-09-22 Even Rouault - - Merge branch 'theta682-fix-Oi-GFS' into 'master' - Fix parsing a private tag 0x80a6 - - Closes #647 - - See merge request libtiff/libtiff!661 - -2024-09-22 Timothy Lyanguzov - - Do not error out on a tag whose tag count value is zero, just issue a warning. - Fix parsing a private tag 0x80a6 - -2024-09-21 Benjamin Gilbert - - Define HAVE_JPEGTURBO_DUAL_MODE_8_12 in tif_config.h. - Remove special-case Autotools and CMake code to define it on the - compiler command line. - - Define LERC_STATIC in tif_config.h. - Remove special-case Autotools and CMake code to define it on the - compiler command line. - - CMake: set WORDS_BIGENDIAN via #cmakedefine. - Autotools sets WORDS_BIGENDIAN via tif_config.h, but the CMake equivalent - in tif_config.h.cmake.in is a no-op; CMake passes the define on the - compiler command line instead. For consistency, have CMake set the define - via tif_config.h. - -2024-09-21 Even Rouault - - Merge branch 'fix_648_ASCII_length_at_WriteDirectorySec_codec_part' into 'master' - Increment string length for ASCII tags in TIFFWriteDirectorySec() for codec... - - Closes #648 - - See merge request libtiff/libtiff!663 - -2024-09-21 Su_Laus - - Increment string length for ASCII tags in TIFFWriteDirectorySec() for codec tags defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags. Fixes #648 - -2024-09-11 Even Rouault - - libtiff v4.7.0rc2 preparation - -2024-09-11 Even Rouault - - configure.ac: make a provision to look for up to python 3.16 ... - hopefully we'll have ditched autoconf support at that point... - - Fix test dependency on tiff2rgba-32BPP that breaks 'make check -jX' - - test/tiff2ps*.sh scripts: try to use POSIX only diff flags. - -2024-09-11 Even Rouault - - Merge branch 'automake_doc_fix' into 'master' - doc/Makefile.am: make sure that 'doc-html' and 'doc-man' targets have dependencies to avoid them to be rebuilt by successive make - - See merge request libtiff/libtiff!657 - -2024-09-10 Even Rouault - - Merge branch '4_7_0_rst_rgb2ycbcr_thumbnail' into 'master' - v4.7.0.rst: clarify that rgb2ycbcr and thumbnail are not installed - - See merge request libtiff/libtiff!659 - -2024-09-10 Even Rouault - - v4.7.0.rst: clarify that rgb2ycbcr and thumbnail are not installed. - -2024-09-08 Even Rouault - - doc/Makefile.am: make sure that 'doc-html' and 'doc-man' targets have dependencies to avoid them to be rebuilt by successive make - - doc/Makefile.am: move rst_sources and EXTRA_DIST variables on top of file - -2024-09-07 Even Rouault - - Merge branch 'index_rst_formatting_issue' into 'master' - index.rst: fix formatting issue - - See merge request libtiff/libtiff!656 - -2024-09-07 Even Rouault - - index.rst: fix formatting issue. - -2024-09-07 Even Rouault - - Merge branch 'prepare_release_4_7_0' into 'master' - Prepare release 4.7.0 - - See merge request libtiff/libtiff!654 - -2024-09-07 Even Rouault - - Doc: remove 'Master' terminlogy. - - v4.7.0.rst: remove mention about autoconf-archive since that change has been reverted - - Revert "autotools: allow pulling in updated macros from autoconf-archive" - This reverts commit c820d16c30c27b3be6c3d10834b6d75607ae9d77. - - Revert "HOWTO-RELEASE: document the necessary dependencies for producing dist tarballs" - This reverts commit f1a91e42b3f23641cb5559fb60e1d73d201275eb. - - Revert "configure.ac: fix HAVE_OPENGL determination due to recent changes" - This reverts commit c370e67f7fd9320674544113218b7fbca4f65c2b. - - configure.ac: fix HAVE_OPENGL determination due to recent changes. - - Update version numbers for 4.7.0. - - Update ChangeLog and create release notes for v4.7.0. - -2024-09-06 Even Rouault - - typo fixes. - -2024-09-06 Even Rouault - - Merge branch 'autoconf-archive' into 'master' - autotools: allow pulling in updated macros from autoconf-archive - - See merge request libtiff/libtiff!645 - -2024-09-06 Even Rouault - - Merge branch 'remove_last_usage_of_get_field_type' into 'master' - Change last usage of get_field_type at TIFFWriteDirectorySec() to set_field_type - - See merge request libtiff/libtiff!653 - -2024-09-06 Even Rouault - - libtiff v4.7.0rc1 preparation - -2024-09-06 Even Rouault - - Merge branch 'autoconf-archive' into 'master' - autotools: allow pulling in updated macros from autoconf-archive - - See merge request libtiff/libtiff!645 - -2024-09-06 Even Rouault - - Merge branch 'remove_last_usage_of_get_field_type' into 'master' - Change last usage of get_field_type at TIFFWriteDirectorySec() to set_field_type - - See merge request libtiff/libtiff!653 - -2024-09-05 Su_Laus - - Change last usage of get_field_type at TIFFWriteDirectorySec() for codec related tags to set_field_type. - -2024-09-03 Eli Schwartz - - HOWTO-RELEASE: document the necessary dependencies for producing dist tarballs - - autogen.sh: actually return failure if any step failed. - Previously, it exited with failure if and only if the wget calls failed. - But it is possible for any command to fail, e.g. if the autotools are - broken, misconfigured, or missing dependencies. - -2024-09-03 Eli Schwartz - - autotools: allow pulling in updated macros from autoconf-archive. - Instead of inlining a few macros in acinclude.m4 and forgetting about - them, teach aclocal to install the macros to m4/ when autoreconf is run. - They are no longer tracked in one big file, nor tracked at all in git, - but producing dist tarballs will bundle them up just like `configure` - and `Makefile.in`. - - Note: previous behavior of AX_CHECK_GL* was to simply ignore support and - proceed, if it was asked for and not found. The updated macros expect to - opt into this by specifying action-if-not-found. - - VL_* is obsolete. Upgrade to AX_CFLAGS_WARN_ALL. - -2024-09-03 Even Rouault - - Merge branch 'XZY2RGB' into 'master' - Fixes #644 Index comparison as size_t to avoid overflow in TIFFXYZToRGB - - Closes #644 - - See merge request libtiff/libtiff!649 - -2024-09-03 Nicolas Badoux - - Fixes #644 Index comparison as size_t to avoid overflow in TIFFXYZToRGB. - -2024-09-01 Even Rouault - - Merge branch 'ci_werror' into 'master' - CI: build with -Wall -Wextra -Werror - - See merge request libtiff/libtiff!652 - -2024-08-30 Even Rouault - - configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection - - CI: build with -Wall -Wextra -Werror. - -2024-08-30 Roger Leigh - - Merge branch 'ci-old-update' into 'master' - ci: Update "old" build jobs to use Ubuntu 22.04 - - See merge request libtiff/libtiff!651 - -2024-08-30 Roger Leigh - - ci: Update "old" build jobs to use Ubuntu 22.04. - -2024-08-30 Even Rouault - - Merge branch 'ci-ubuntu-22.04' into 'master' - ci: Update to use Ubuntu 24.04 CI images - - See merge request libtiff/libtiff!650 - -2024-08-30 Roger Leigh - - ci: Update to use Ubuntu 24.04 CI images. - -2024-08-28 Even Rouault - - Merge branch 'uv_encode' into 'master' - Fix #645 by using unsigned int for variable indexing an array in uv_decode() and uv_encode() - - Closes #645 - - See merge request libtiff/libtiff!648 - -2024-08-28 Nicolas Badoux - - Fix #645 by using unsigned int for variable indexing an array in uv_decode() and uv_encode() - Change `vi` to unsigned int in `uv_decode()` and `uv_encode()` to ensure that upper bound `UV_NVS` cannot be satisfied by a negative value which will overflow when cast to an unsigned value at array access time. This fixes issue #645 where a segmentation fault was caused. - -2024-08-27 Even Rouault - - Merge branch 'fix_643_solitary_CustomDirectory_read' into 'master' - Fix #643 by initializing pointer to TIFFSetField() and TIFFGetField() before TIFFReadGPSDirectory - - Closes #643 - - See merge request libtiff/libtiff!647 - -2024-08-27 Su Laus - - Fix #643 by initializing pointer to TIFFSetField() and TIFFGetField() before TIFFReadGPSDirectory - Initialize pointer to TIFFSetField() and TIFFGetField() (i.e. tif-\>tif_tagmethods.vsetfield and tif-\>tif_tagmethods.vgetfield) even if the file is opened with "h" option. This fixes issue #643 where a segmentation fault was caused. - -2024-08-25 Even Rouault - - Merge branch 'tiff_strip' into 'master' - Add non-zero check before division in TIFFComputeStrip - - See merge request libtiff/libtiff!646 - -2024-08-23 Nicolas Badoux - - Add non-zero check before division in TIFFComputeStrip. - -2024-08-15 Even Rouault - - Merge branch 'fix_564' into 'master' - TIFFScanlineSize64(): revert merge request #564 - - See merge request libtiff/libtiff!644 - -2024-08-15 Even Rouault - - TIFFScanlineSize64(): revert merge request #564. - https://gitlab.com/libtiff/libtiff/-/merge_requests/564 broke decoding of: "tools/tiffcp -c none in.tif out.tif" - with [in.tif](/uploads/0475a88cf6e66652b030a0a3a0c47313/in.tif) - leading to shift each line of the target image by one extra pixel at each line. - Unfortunately, this cancels what https://gitlab.com/libtiff/libtiff/-/merge_requests/564 tried to fix. I'll let @caolanm propose an alternative fix in a follow-up merge request - -2024-08-15 Even Rouault - - Merge branch 'coverity_fix_from_MR_634' into 'master' - Fix some Coverity Scan issues introduced by MR 634. - - See merge request libtiff/libtiff!643 - -2024-08-14 Su_Laus - - Fix some Coverity Scan issues introduced by MR 634. - -2024-08-11 Even Rouault - - Merge branch 'lerc-pkgconfig' into 'master' - libtiff-4.pc: Fix `Requires.private` missing `Lerc`. - - See merge request libtiff/libtiff!633 - -2024-08-11 Even Rouault - - Merge branch 'manpage_update_directory_incrementing' into 'master' - Amend manpages for changes in current directory index behaviour. - - See merge request libtiff/libtiff!639 - -2024-08-11 Su Laus - - Amend manpages for changes in current directory index behaviour. - -2024-08-11 Even Rouault - - Merge branch 'tiffcrop_coverity_20240723' into 'master' - Attempt to address tiffcrop Coverity scan issues 1605444, 1605445, and 1605449. - - See merge request libtiff/libtiff!642 - -2024-08-11 Lee Howard - - Attempt to address tiffcrop Coverity scan issues 1605444, 1605445, and 1605449. - -2024-08-11 Even Rouault - - Merge branch 'fix_CurDir_wrong_incrementing' into 'master' - Fix cases where tif_curdir is set incorrectly - - See merge request libtiff/libtiff!634 - -2024-08-11 Su Laus - - Fix cases where tif_curdir is set incorrectly. - Fix cases where the current directory number (tif_curdir) is set inconsistently or incorrectly, depending on the previous history. - - See additional checks and tests in test/test_directory.c of this MR for intended setting of tif_curdir (i.e. TIFFCurrentDirectory(tif)). - -2024-07-12 Even Rouault - - Merge branch 'coverity_fixes_tiff2pdf_#2' into 'master' - Try to fix additional Coverity issues in tiff2pdf - - See merge request libtiff/libtiff!641 - -2024-07-12 Su Laus - - Try to fix additional Coverity issues in tiff2pdf. - -2024-07-10 Even Rouault - - Merge branch 'fix_autoconf_diff_parameter_crlf' into 'master' - Add parameter for "diff" used in autoconf test scripts to ignore LF and CRLF differences. - - See merge request libtiff/libtiff!640 - -2024-07-09 Even Rouault - - Merge branch 'coverity_fixes_tiff2pdf' into 'master' - Fix Coverity issues in tiff2pdf. - - See merge request libtiff/libtiff!638 - -2024-07-09 Su Laus - - Fix Coverity issues in tiff2pdf. - -2024-06-29 Su_Laus - - Add parameter for "diff" used in autoconf test scripts to ignore LF and CRLF differences. - -2024-06-28 Even Rouault - - Merge branch 'coverity_fixes_test_thumbnail' into 'master' - Coverity Scan fixes in thumbnail.c and custom_dir_EXIF_231.c - - See merge request libtiff/libtiff!637 - -2024-06-28 Su Laus - - Coverity Scan fixes in thumbnail.c and custom_dir_EXIF_231.c. - -2024-06-25 Even Rouault - - Merge branch 'coverity_fixes' into 'master' - Try to silence new Coverity Scan false positives - - See merge request libtiff/libtiff!636 - -2024-06-24 Even Rouault - - Try to silence new Coverity Scan false positives. - There are other warnings in tools/ that I'll let others deal with. - -2024-06-24 Even Rouault - - Merge branch 'fix/make' into 'master' - fix: error when running make clean - - Closes #630 - - See merge request libtiff/libtiff!635 - -2024-06-24 Kévin Dunglas - - fix: error when running make clean. - -2024-06-15 Niklas Hambüchen - - libtiff-4.pc: Fix `Requires.private` missing `Lerc`. - It provides a `.pc` file starting from version 4 in: - - https://github.com/Esri/lerc/blob/8d6e8251544bbe1379feb0fe0a0934e43ca1a6cd/Lerc.pc.in - - libtiff's CMake build system already has support for this, - adding `Lerc` to `Requires.private` if Lerc is >= 4. - - In contrast to the CMake build system, autoconf has no good way - to check for checking the Lerc version, we do it unconditionally - there. - -2024-06-13 Even Rouault - - Merge branch 'rfc02_text__restore_tools' into 'master' - Text for RFC 2: Restoring needed libtiff tools - - See merge request libtiff/libtiff!581 - -2024-06-13 Even Rouault - - Merge branch 'add_some_conversion_test_to_cmake' into 'master' - Port some basic sanity checks from autoconf to cmake. - - See merge request libtiff/libtiff!630 - -2024-06-10 Even Rouault - - Merge branch 'tiffcp_coverity_check_malloc_return' into 'master' - tiffcp: Add check for limitMalloc return to fix Coverity CID 1603334 - - See merge request libtiff/libtiff!632 - -2024-06-10 Su_Laus - - tiffcp add check for limitMalloc return to fix Coverity CID 1603334. - -2024-06-07 Even Rouault - - Merge branch 'aim-nara-master-patch-67955' into 'master' - Remove unnecessary `2` in tiffcmp name - - See merge request libtiff/libtiff!631 - -2024-06-07 AIM | Nara - - Remove unnecessary `2` in tiffcmp name. - -2024-05-30 Su_Laus - - Port some basic sanity checks from autoconf to cmake. Checks are for tiffcp and tiffcrop RGB->YCbCr JPEG conversions (see MR !611 / 'tiffcp_tiffcrop_RGB_YCbCr_tests') - -2024-05-29 Even Rouault - - Merge branch 'ofz65182' into 'master' - an issue seen in putcontig8bitYCbCr22tile - - See merge request libtiff/libtiff!564 - -2024-05-29 Caolán McNamara - - TIFFScanlineSize64(): fix computation in non-JPEG YCbCr case (#564) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65182 - -2024-05-29 Even Rouault - - Merge branch 'fix_375' into 'master' - TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) output buffer if failure - - Closes #375 - - See merge request libtiff/libtiff!628 - -2024-05-29 Even Rouault - - Merge branch 'tiff2pdf-planar' into 'master' - Inconsistent PLANARCONFIG value for the input and output TIFF in tiff2pdf.c - - See merge request libtiff/libtiff!629 - -2024-05-29 Timothy Lyanguzov - - Inconsistent PLANARCONFIG value for the input and output TIFF in tiff2pdf.c - Fixed a bug in tiff2pdf.c whereas the PLANARCONFIG for the output TIFF is set to a fixed value of PLANARCONFIG_CONTIG as opposed to match the value of the input TIFF. - This mainly manifest in the heap-buffer-overread due to the difference of sizes in the buffers (between input and output) allocated and read to the size of output buffer. - - Reimplementation of !92 - -2024-05-27 Even Rouault - - tif_lzma/tif_lzw: add code comments. - -2024-05-26 Even Rouault - - ZSTDDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - PixarLogDecode: zero-initialize output buffer if failure. - - PackBitsDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - JPEGDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - LERCDecode: zero-initialize output buffer if failure. - - LZMADecode: zero-initialize (not-yet-written parts of) output buffer if failure, and handle repeated calls to decoding same tile/strip if previous failure occurred - - TWebPDecode: zero-initialize output buffer if failure, and handle repeated calls to decoding same tile/strip if previous failure occurred - - ThunderDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - OJPEGDecode: zero-initialize output buffer if failure. - - JBIGDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - ZIPDecode: zero-initialize (not-yet-written parts of) output buffer if failure, and handle repeated calls to decoding same tile/strip if previous failure occurred - - LZWDecode: zero-initialize (not-yet-written parts of) output buffer if failure - - TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if setupdecode fails - Fixes #375 - -2024-05-25 Su_Laus - - Text for RFC 2: Restoring needed libtiff tools - file added to doc/Makefile.am and rebased. - - Text for RFC 2: Restoring needed libtiff tools - approved with voting history updated. - - Text for RFC 2: Restoring needed libtiff tools - further amended. - - Text for RFC 2: Restoring needed libtiff tools - amended. - - Text for RFC 2: Restoring needed libtiff tools. - -2024-05-23 Even Rouault - - Merge branch 'tiff2pdf_539' into 'master' - fix tiff2pdf issue #539; however, there certainly remain many JPEG-compressed... - - See merge request libtiff/libtiff!597 - -2024-05-23 Lee Howard - - tiff2pdf: fix issue with JPEG restart-interval marker when converting from JPEG-compressed files - Fixes #539 - - however, there certainly remain many JPEG-compressed TIFFs which tiff2pdf will fumble without disabling data passthrough (using the -n option) - I supect that it has to do with the JPEG tables being removed from the JPEG and placed into the TIFF headers - as tiff2pdf would need to put these back into the JPEG instead of just passing the data through to the PDF - -2024-05-22 Even Rouault - - Merge branch 'test_fix' into 'master' - test/Makefile.am: make sure that all test images are bundled by make dist even... - - See merge request libtiff/libtiff!626 - -2024-05-22 Even Rouault - - Merge branch 'add_missing_rst_files' into 'master' - doc/Makefile.am: add rfcs/ files in rst_sources variable - - See merge request libtiff/libtiff!624 - -2024-05-22 Even Rouault - - test/Makefile.am: make sure that all test images are bundled by make dist even if JPEG or JBIG is not available - -2024-05-22 Even Rouault - - Merge branch 'timothyl/32bpp-cmake-test' into 'master' - Add new test to CMake - - See merge request libtiff/libtiff!625 - -2024-05-22 Timothy Lyanguzov - - Add new test to CMake. - See previous merge request libtiff/libtiff!611 - -2024-05-22 Even Rouault - - doc/Makefile.am: add rfcs/ files in rst_sources variable. - -2024-05-22 Even Rouault - - Merge branch 'tiffcp_tiffcrop_RGB_YCbCr_tests' into 'master' - Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. - - See merge request libtiff/libtiff!611 - -2024-05-22 Lee Howard - - Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. - -2024-05-21 Even Rouault - - Merge branch 'tiffcp_LZW_JBIG_test' into 'master' - Add basic sanity check for tiffcp LZW->JBIG conversion. - - See merge request libtiff/libtiff!612 - -2024-05-21 Even Rouault - - Merge branch 'tiffcrop_masonwilde_fix' into 'master' - Apply "Fix heap-buffer-overflow in function extractImageSection" - - See merge request libtiff/libtiff!613 - -2024-05-21 Lee Howard - - tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" - https://gitlab.com/masonwilde/libtiff/-/commit/848434a81c443f59ec90d41218eba6e48a450a11 - - authored by zhailiangliang commit 848434a81c443f59ec90d41218eba6e48a450a11 - - The overflow conditions were previously addressed, but this provides additional error messages. - -2024-05-21 Even Rouault - - Merge branch 'fix_183_alternative' into 'master' - OJPEG: reset subsampling_convert_state =0 in OJPEGPreDecode (fixes tiff2pdf issue #183) - - See merge request libtiff/libtiff!621 - -2024-05-21 Even Rouault - - Merge branch 'thunder-fix' into 'master' - A fix for Thunder RLE - - See merge request libtiff/libtiff!623 - -2024-05-21 Timothy Lyanguzov - - A fix for Thunder RLE. - The commit https://gitlab.com/robinwatts/libtiff/-/commit/be0519ca3d222c19008fe160873f3b5c28e6b36b states: - - Thunder RLE can fail to decode last run. Bug seen with GhostPDL. Decode of test tif file gives valgrind errors due to the "thunder decode" failing to extract the final run of compressed pixels. - - The logic in the decoder, presumably intended to spot overruns of data, is incorrect in that runs that end at the end of a row (npixels == maxpixels) will not be decoded. - - Fix this by limiting 'n', the number of pixels to copy. Note that npixels is updated by the 'unlimited' value to ensure the error reporting at the end of the loop still works. - -2024-05-18 Even Rouault - - Merge branch 'tiff2ps_fax2tiff_476' into 'master' - fix fax2ps and fax2tiff bugs #476 - - See merge request libtiff/libtiff!598 - -2024-05-18 Lee Howard - - Fix fax2ps and fax2tiff memory leaks. - Fixes #476 - -2024-05-17 Even Rouault - - Merge branch 'tiff2rgba_469' into 'master' - fix tiff2rgba issue #469 - - See merge request libtiff/libtiff!600 - -2024-05-17 Even Rouault - - Merge branch 'formatting-fixes' into 'master' - Formatting fixes - - See merge request libtiff/libtiff!622 - -2024-05-17 Even Rouault - - Formatting fixes. - -2024-05-17 Even Rouault - - Merge branch 'coverity_fixes' into 'master' - 3 Coverity Scan fixes in tools & contrib - - See merge request libtiff/libtiff!592 - -2024-05-17 Even Rouault - - Merge branch 'tiff2pdf_596' into 'master' - tiff2pdf issue #596 - - See merge request libtiff/libtiff!594 - -2024-05-17 Even Rouault - - Merge branch 'tiffdither_473' into 'master' - fix tiffdither bug #473 - - See merge request libtiff/libtiff!599 - -2024-05-17 Even Rouault - - Merge branch 'fax2tiff_468' into 'master' - fix fax2tiff issue #468 - - See merge request libtiff/libtiff!601 - -2024-05-17 Even Rouault - - Merge branch 'tiff2rgba_background' into 'master' - Add background gradient option for tiff2rgba alpha compositing. - - See merge request libtiff/libtiff!610 - -2024-05-17 Lee Howard - - Add background gradient option for tiff2rgba alpha compositing. - -2024-05-17 Even Rouault - - Merge branch 'tiff2pdf_253' into 'master' - Fix tiff2pdf issue #253 - red and blue were being swapped for RGBA decoding - - See merge request libtiff/libtiff!603 - -2024-05-17 Even Rouault - - Merge branch 'fax2tiff_249' into 'master' - Fix fax2tiff issue #249, unreasonable width input - - See merge request libtiff/libtiff!604 - -2024-05-17 Even Rouault - - Merge branch 'tiffcp_tiffcrop_228' into 'master' - correct tiffcp and tiffcrop issue #228 - - See merge request libtiff/libtiff!605 - -2024-05-17 Even Rouault - - OJPEG: reset subsampling_convert_state =0 in OJPEGPreDecode (fixes tiff2pdf issue #183) - -2024-05-17 Even Rouault - - Merge branch 'fax2tiff_191' into 'master' - Fix fax2tiff issue #191 - EOFB interpretation - - See merge request libtiff/libtiff!606 - -2024-05-17 Even Rouault - - Merge branch 'tiff2pdf_98' into 'master' - Fix tiff2pdf documentation issue #98 - - See merge request libtiff/libtiff!608 - -2024-05-17 Even Rouault - - Merge branch 'tiffgt_warning' into 'master' - Avoids a warning regarding fallthrough. - - See merge request libtiff/libtiff!609 - -2024-05-17 Even Rouault - - Merge branch 'tiffcrop_542_550_552' into 'master' - tiffcrop: fixes #542, #550, #552 (buffer overflows, use after free) - - See merge request libtiff/libtiff!595 - -2024-05-17 Lee Howard - - tiffcrop: fixes #542, #550, #552 (buffer overflows, use after free) - -2024-05-17 Even Rouault - - Merge branch 'Fedora_am_version' into 'master' - libtiff-am-version.patch from Fedora stating: - - See merge request libtiff/libtiff!617 - -2024-05-17 Even Rouault - - Merge branch 'formatting-fixes' into 'master' - Code formatting fixes - - See merge request libtiff/libtiff!620 - -2024-05-17 Even Rouault - - Code formatting fixes. - Result of running ``pre-commit run --all`` - -2024-05-17 Even Rouault - - Merge branch 'sphinx_quotes_dashes' into 'master' - Don't let Sphinx inconsistently alter quotes and dashes in rst files. - - See merge request libtiff/libtiff!615 - -2024-05-17 Even Rouault - - Merge branch 'tiffmedian_599' into 'master' - tiffmedian issue #599 - - See merge request libtiff/libtiff!593 - -2024-05-17 Lee Howard - - tiffmedian: fix memory leaks. - Closes #599 - -2024-05-17 Even Rouault - - Merge branch 'more_spelling_corrections' into 'master' - Typo fixes following... - - See merge request libtiff/libtiff!618 - -2024-05-17 Lee Howard - - Typo fixes following https://gitlab.com/libtiff/libtiff/-/commit/c95c77350820e19c8e273925bc97259727d19695 - -2024-05-16 Lee Howard - - libtiff-am-version.patch from Fedora stating: Back off the minimum required automake version to 1.11. There isn't anything in libtiff currently that actually requires 1.12, and changing this allows the package to be built on pre-F18 machines for easier testing. - - Don't let Sphinx inconsistently alter quotes and dashes in rst files. Author: Laszlo Boszormenyi (GCS) Bug-Debian: https://bugs.debian.org/1028456 - - Add basic sanity check for tiffcp LZW->JBIG conversion. - - Avoids a warning regarding fallthrough. - - Fix tiff2pdf documentation issue #98. - - Fix fax2tiff issue #191 - EOFB interpretation. - - Update tiffcp.c. - - Correct tiffcrop output of RGB JPEG and tiffcp/tiffcrop documentation - issue #228 - - Fix tiffcp and tiffcrop issue 228 - step 1. - - Fix fax2tiff issue #249, unreasonable width input. - - Fix tiff2pdf issue #253 - red and blue were being swapped for RGBA decoding - - fix fax2tiff issue #468. - - fix tiff2rgba issue #469. - - fix tiffdither bug #473. - - tiff2pdf issue #596. - -2024-05-16 Even Rouault - - contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (CID 1024680) - - tiffdump.c: fix wrong printf formattre in error message (CID 1472932) - - tiffset.c: avoid false positive Coverity Scan warning on 64-bit builds (CID 1518997) - -2024-05-16 Even Rouault - - Merge branch 'master' into 'master' - Fix some Coverity warnings. - - See merge request libtiff/libtiff!590 - -2024-05-16 Lee Howard - - Fix some Coverity warnings. - -2024-05-13 Even Rouault - - Merge branch 'revert_tools_removement' into 'master' - Restore tools from archive and unsupported and tiffcp -i option with revert. - - See merge request libtiff/libtiff!589 - -2024-05-11 Su_Laus - - Apply some newer changes to the reverted code and prepare note for 4.7.0. - - Revert "Remove -i option (ignore errors) from tiffcp, because almost all fuzzer issues were consequential errors from ignored errors because of the "-i" option." - This reverts commit 280a568ae887c27a422a5da862398ffdbcd9b84d. - -2024-05-11 Su_Laus - - Revert "Move most TIFF tools to archive and keep some as unsupported (see #580)." - This reverts commit eab89a627f0a65e9a1a47c4b30b4802c80b1ac45. - - # Conflicts: - # tools/unsupported/CMakeLists.txt - # tools/unsupported/tif_tools-unsupported_versioninfo.rc - -2024-05-10 Even Rouault - - Merge branch 'calloc-transposed-args' into 'master' - Fix -Werror=calloc-transposed-args with gcc 14 - - See merge request libtiff/libtiff!588 - -2024-05-10 Even Rouault - - Fix -Werror=calloc-transposed-args with gcc 14. - -2024-05-09 Even Rouault - - Merge branch 'EvaluateIFDdatasizeReading_ossfuzz_68327' into 'master' - EvaluateIFDdatasizeReading(): avoid unsigned integer overflow (master only) - - See merge request libtiff/libtiff!586 - -2024-04-27 Even Rouault - - EvaluateIFDdatasizeReading(): avoid unsigned integer overflow (master only) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68327 - -2024-04-25 Even Rouault - - Merge branch 'ci-appveyor-cygwin-upgrade' into 'master' - appveyor: Upgrade cygwin packages - - See merge request libtiff/libtiff!585 - -2024-04-25 Roger Leigh - - appveyor: Upgrade cygwin packages. - -2024-04-25 Even Rouault - - Merge branch 'libjpeg_turbo_3_0' into 'master' - Change messages/comments referring libjpeg-turbo 2.2 to 3.0 - - See merge request libtiff/libtiff!584 - -2024-04-24 Even Rouault - - Change messages/comments referring libjpeg-turbo 2.2 to 3.0. - libjpeg-turbo 2.2 was actually released as 3.0. Reflect that - -2024-04-22 Even Rouault - - Merge branch 'EvaluateIFDdatasizeReading_unsigned_int_overflow_fix' into 'master' - EvaluateIFDdatasizeReading(): avoid potential unsigned integer overflow on corrupted tag - - See merge request libtiff/libtiff!582 - -2024-04-22 Even Rouault - - EvaluateIFDdatasizeReading(): avoid potential unsigned integer overflow on corrupted tag - -2024-04-22 Even Rouault - - Merge branch 'tif_dir_logging-627' into 'master' - tif_dir.c: Log source file, line number, and input tif for directory count error. - - Closes #627 - - See merge request libtiff/libtiff!583 - -2024-04-22 Kurt Schwehr - - tif_dir.c: Log source file, line number, and input tif for directory count error. - -2024-04-14 Even Rouault - - Merge branch 'fix_readrgbastrip_fpe' into 'master' - Avoiding FPEs (division by zero) in tif_getimage.c - - See merge request libtiff/libtiff!580 - -2024-04-09 Zurab Tsinadze - - Avoid FPEs (division by zero) in tif_getimage.c. - -2024-04-06 Even Rouault - - Merge branch 'appveyor-vs2022' into 'master' - appveyor: Add VS2022 builds - - See merge request libtiff/libtiff!579 - -2024-04-06 Roger Leigh - - appveyor: Add VS2022 builds. - -2024-04-04 Roger Leigh - - Merge branch 'appveyor-mingw-fix' into 'master' - appveyor: Use MinGW-w64 - - See merge request libtiff/libtiff!578 - -2024-04-04 Roger Leigh - - appveyor: Use MinGW-w64. - -2024-04-03 Even Rouault - - Merge branch 'update_rfc1_status' into 'master' - RFC1: update status to adopted - - See merge request libtiff/libtiff!577 - -2024-04-03 Even Rouault - - RFC1: update status to adopted. - -2024-04-03 Even Rouault - - Merge branch 'rfc1_psc' into 'master' - Doc: add 'RFC 1: Project Steering Committee Guidelines' and a PSC page - - See merge request libtiff/libtiff!566 - -2024-04-03 Even Rouault - - Doc: add 'RFC 1: Project Steering Committee Guidelines' and a PSC page. - -2024-04-02 Even Rouault - - Merge branch 'fix_coverity_test_directory_expansion' into 'master' - Fix coverity scan issue in test_directory.c - - See merge request libtiff/libtiff!576 - -2024-04-02 Su_Laus - - Fix coverity scan issue in test_directory.c. - -2024-04-02 Even Rouault - - Merge branch 'typo_fixes' into 'master' - Various typo fixes - - See merge request libtiff/libtiff!575 - -2024-04-02 Even Rouault - - Various typo fixes. - -2024-03-31 Even Rouault - - Merge branch 'test_directory_expansion_endianness' into 'master' - Enhance test_directory.c with big-endian and little-endian test cases - - See merge request libtiff/libtiff!574 - -2024-03-30 Su_Laus - - Enhance test/test_directory.c with big-endian and little-endian test cases. - Insert testcase into test_directory.c for #618 "Failure in TIFFSetSubDirectory() will break subsequent TIFFSetDirectory() calls". - -2024-03-29 Even Rouault - - Merge branch 'correct_coverity_issues_from_avoid_IFD_overwriting' into 'master' - Correct some coverity issues from "avoid IFD overwriting" - - See merge request libtiff/libtiff!573 - -2024-03-29 Su_Laus - - Correct some coverity issues from "avoid IFD overwriting". - -2024-03-28 Even Rouault - - Merge branch 'fix_gdal_9548' into 'master' - LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - - See merge request libtiff/libtiff!572 - -2024-03-26 Even Rouault - - Merge branch 'avoid_IFD_overwriting_other_data_TIFFWriteDirectory' into 'master' - TIFFWriteDirectory: Avoid overwriting following data if an IFD is enlarged. - - See merge request libtiff/libtiff!565 - -2024-03-26 Su Laus - - TIFFWriteDirectory: Avoid overwriting following data if an IFD is enlarged. - Avoid overwriting other data if an IFD that has already been written is enlarged. If entries are to be changed in an IFD that has already been written to the file, the memory area can be overwritten as long as the IFD data volume has not increased. Otherwise, the IFD must be written to a different location in the file. Up to now, LibTIFF has simply overwritten the IFD and other data areas in the file. - - With this MR, the size of the IFD, and location of IFD data, is tracked and checked if the IFD can be safely overwritten or has to be re-written to another location. - -2024-03-24 Even Rouault - - LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - Fixes https://github.com/OSGeo/gdal/issues/9530. - Cf https://github.com/OSGeo/gdal/pull/9548 for the GDAL specific fix. - - The LERC codec up-to-now didn't do any special processing when writing a strile - in a multi-band PlanarConfig=Contig file, resulting in corruptions. Now we - generate a mask buffer in that situation. Actually, if the NaN values are not - at the same location across bands, we need to write one mask-per-band, which - requires liblerc >= 3.0, and in that situation change the LERC blob to - multi-band instead of multi-depth/dim, with liblerc >= 3.0. When all bands have - NaN values at the same location, we generate a single mask, which is compatible - of liblerc < 3.0, but requires at last this version of libtiff to be read. This - is the best solution we come with to fix the issue while having the maximum - backward compatibility. - -2024-03-24 Even Rouault - - Merge branch 'harmonize_TIFFheader_swapping' into 'master' - Correct and harmonize swapping of internal 'tif_header' parameters. - - See merge request libtiff/libtiff!571 - -2024-03-24 Su Laus - - Correct and harmonize swapping of internal 'tif_header' parameters. - -2024-03-19 Even Rouault - - Merge branch 'chore/printf-format-specifiers' into 'master' - chore: use correct format specifiers - - See merge request libtiff/libtiff!570 - -2024-03-19 Tom - - chore: use correct format specifiers. - When building on my Mac, I get the following warnings: - - libtiff/tools/tiffcp.c:154:24: warning: format specifies type 'unsigned short' but the argument has type 'tdir_t' (aka 'unsigned int') [-Wformat] - comma, nextImage); - ^~~~~~~~~ - libtiff/tools/tiffcp.c:1295:39: warning: format specifies type 'unsigned short' but the argument has type 'tdir_t' (aka 'unsigned int') [-Wformat] - TIFFFileName(bias), TIFFCurrentDirectory(bias), - ^~~~~~~~~~~~~~~~~~~~~~~~~~ - libtiff/tools/tiffcp.c:1296:37: warning: format specifies type 'unsigned short' but the argument has type 'tdir_t' (aka 'unsigned int') [-Wformat] - TIFFFileName(in), TIFFCurrentDirectory(in)); - ^~~~~~~~~~~~~~~~~~~~~~~~ - libtiff/tools/tiffcp.c:1303:37: warning: format specifies type 'unsigned short' but the argument has type 'tdir_t' (aka 'unsigned int') [-Wformat] - TIFFFileName(in), TIFFCurrentDirectory(in)); - ^~~~~~~~~~~~~~~~~~~~~~~~ - libtiff/tools/tiffsplit.c:174:21: warning: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] - path_len); - ^~~~~~~~ - - This updates the format specifiers from `PRIu16` to `PRIu32` for `tdir_t` - (which is a `typedef`ed `uint32_t`) and from `TIFF_SSIZE_FORMAT` to - `TIFF_SIZE_FORMAT` for `size_t`, which makes sense given that it's an unsigned - type. - -2024-03-16 Even Rouault - - Merge branch 'fix_628_FPE_at_TIFFhowmany' into 'master' - Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64()... - - Closes #628 - - See merge request libtiff/libtiff!568 - -2024-03-15 Su_Laus - - Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros by checking for denominator not zero before macros are executed. Fixes #628. - -2024-03-14 Even Rouault - - Merge branch 'fix_wrong_return_TIFFIsBigTIFF_if_swapping_case' into 'master' - Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active - - See merge request libtiff/libtiff!567 - -2024-03-13 Su_Laus - - Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active (i.e. little endian image on a big endian machine). - -2024-01-30 Even Rouault - - Merge branch 'master' into 'master' - Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - - See merge request libtiff/libtiff!544 - -2024-01-30 Timo Stüber - - Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - In most of the cases the field_writecount and field_readcount of the TIFFFieldInfo are equal. But they do not have to be the same. - - I encountered this issues when using an older release of Pillow. Since they use custom fields for decoding only, they set the readcount value to 0. As the result _TIFFSetGetType can not identify the type correctly and set TIFF_SETGET_UNDEFINED. - - Error Message: - ``` - TIFFLib: _TIFFWriteDirectorySec(): Rational2Double: .set_field_type is not 4 but 1. - ``` - - During the execution of TIFFMergeFieldInfo the fields get_field_type and set_field_type set. I guess the set_field_type should dependent on the field_writecount. - -2024-01-24 Even Rouault - - Merge branch 'avoid_memory_leaks_using_TIFFCreateDirectory' into 'master' - Avoiding memory leaks when using TIFFCreateDirectory() - - See merge request libtiff/libtiff!563 - -2024-01-24 Su_Laus - - Avoiding memory leaks when using TIFFCreateDirectory() by releasing the allocated memory in the tif-structure. - -2024-01-10 Even Rouault - - Merge branch 'WIN32' into 'master' - Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ - - See merge request libtiff/libtiff!562 - -2024-01-08 Even Rouault - - test/raw_decode.c: remove likely ifdef tricks related to old compilers or unusual setups - - tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups - - Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() - - Remove support for _MSC_VER < 1500. - -2024-01-07 Even Rouault - - Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ - -2023-12-20 Even Rouault - - Merge branch 'fix_579_non_terminated_ASCII_deletes_one_byte' into 'master' - Fixed issue with non-terminated ASCII arrays where the last character is overwritten (fixes #579) - - Closes #579 - - See merge request libtiff/libtiff!561 - -2023-12-20 Su_Laus - - For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is set at the end to avoid deleting the last character. Fixes #579. Some editorials in tif_dir.c. - -2023-12-09 Even Rouault - - Merge branch 'fix_624_check_TIFFCreateAnonField_return' into 'master' - Fix 624: Check return value of _TIFFCreateAnonField() - - Closes #624 - - See merge request libtiff/libtiff!560 - -2023-12-01 Su_Laus - - Check return value of _TIFFCreateAnonField(). - Fixes #624 - -2023-11-27 Even Rouault - - Merge branch 'TIFFOpenOptionsSetMaxCumulatedMemAlloc' into 'master' - Add TIFFOpenOptionsSetMaxCumulatedMemAlloc() - - See merge request libtiff/libtiff!556 - -2023-11-27 Even Rouault - - Add TIFFOpenOptionsSetMaxCumulatedMemAlloc() - This function complements ``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated memory allocations in byte, for a given TIFF handle, that libtiff internal memory allocation functions are allowed. - -2023-11-23 Even Rouault - - Merge branch 'unity_clang_fixes' into 'master' - Fixes to avoid CLang warnings on unity builds - - See merge request libtiff/libtiff!558 - -2023-11-23 Even Rouault - - Fixes to avoid CLang warnings on unity builds. - -2023-11-22 Even Rouault - - Merge branch 'cmake_UNITY_BUILD' into 'master' - Changes to allow building with cmake -DCMAKE_UNITY_BUILD=ON - - See merge request libtiff/libtiff!557 - -2023-11-22 Even Rouault - - CI: test -DCMAKE_UNITY_BUILD=ON. - - Changes to allow building with cmake -DCMAKE_UNITY_BUILD=ON. - -2023-11-22 Even Rouault - - Merge branch 'manpage_506_TIFFClose_check_with_TIFFFlush' into 'master' - manpage: Note on using TIFFFlush() before TIFFClose() - - Closes #506 - - See merge request libtiff/libtiff!555 - -2023-11-16 Su_Laus - - manpage: Note on using TIFFFlush() before TIFFClose() to check that the data has been successfully written to the file. - Closes #506 - -2023-11-11 Even Rouault - - Merge branch 'manpage_621_TIFFOpenOptionsSetMaxSingleMemAlloc' into 'master' - manpage: Update TIFF documentation about TIFFOpenOptions.rst and memory limiting. - - Closes #621 - - See merge request libtiff/libtiff!553 - -2023-11-11 Even Rouault - - Merge branch 'rectify_some_shadowed_declarations' into 'master' - Rectify some shadowed declarations and warnings in tools and test modules. - - See merge request libtiff/libtiff!552 - -2023-11-11 Even Rouault - - Merge branch 'fix_TIFFRealloc_usage_to_TIFFReallocExt' into 'master' - Change internally used _TIFFRealloc() to _TIFFReallocExt() - - See merge request libtiff/libtiff!554 - -2023-11-11 Su_Laus - - Change internally used _TIFFRealloc() to _TIFFReallocExt(), which respects the TIFFOpenOptionsSetMaxSingleMemAlloc() limit. - -2023-11-11 Timothy Lyanguzov - - Fix typo. - -2023-11-09 Su_Laus - - manpage: Update TIFF documentation about TIFFOpenOptions.rst and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes. - -2023-11-08 Su_Laus - - Rectify some shadowed declarations and warnings in tools and test modules. - -2023-11-04 Even Rouault - - Merge branch 'fix_583' into 'master' - tif_fax3.c: error out after a number of times end-of-file has been reached (fixes #583) - - Closes #583 - - See merge request libtiff/libtiff!547 - -2023-11-04 Even Rouault - - Merge branch 'fix_622' into 'master' - TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row (fixes #622) - - Closes #622 - - See merge request libtiff/libtiff!546 - -2023-10-31 Even Rouault - - Merge branch 'extra_limit_getfilesize' into 'master' - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - - See merge request libtiff/libtiff!551 - -2023-10-31 Even Rouault - - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - -2023-10-31 Even Rouault - - Merge branch 'TIFFFetchDirectory_remove_useless_check' into 'master' - TIFFFetchDirectory(): remove useless allocsize vs filesize check - - See merge request libtiff/libtiff!550 - -2023-10-31 Even Rouault - - TIFFFetchDirectory(): remove useless allocsize vs filesize check. - CoverityScan rightly points that the max value for dircount16 * dirsize - is 4096 * 20. That's small enough not to do any check - -2023-10-31 Even Rouault - - Merge branch 'limit_getfilesize' into 'master' - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - - See merge request libtiff/libtiff!549 - -2023-10-31 Even Rouault - - tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - Amends 5320c9d89c054fa805d037d84c57da874470b01a - - This fixes a performance regression caught by the GDAL regression test - suite. - -2023-10-31 Even Rouault - - Merge branch 'tif_dirread-typo' into 'master' - tif_dirread.c: Fix typo: greather -> greater - - See merge request libtiff/libtiff!548 - -2023-10-31 Kurt Schwehr - - tif_dirread.c: Fix typo: greather -> greater. - -2023-10-31 Even Rouault - - Merge branch 'fix_614_check_mem_allocation_vs_filelength' into 'master' - Prevent some out-of-memory attacks - - See merge request libtiff/libtiff!545 - -2023-10-31 Su Laus - - Prevent some out-of-memory attacks. - Some small fuzzer files fake large amounts of data and provoke out-of-memory situations. For non-compressed data content / tags, out-of-memory can be prevented by comparing with the file size. - - At image reading, data size of some tags / data structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) is compared with file size to prevent provoked out-of-memory attacks. - - See issue https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857 - -2023-10-31 Even Rouault - - tif_fax3.c: error out after a number of times end-of-file has been reached (fixes #583) - - TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row (fixes #622) - -2023-10-30 Even Rouault - - Merge branch 'fix_failed_subdirectory_read' into 'master' - #618: ensure absolute seeking is forced independent - - See merge request libtiff/libtiff!543 - -2023-10-25 Manuel Massing - - #618: ensure absolute seeking is forced independent of TIFFReadDirectory success. - This fixes TIFFSetDirectory calls for the case where - TIFFReadDirectory was unsuccessful. - -2023-10-17 Even Rouault - - Merge branch 'cmake' into 'master' - CMake: Fix TIFF_INCLUDE_DIRS - - See merge request libtiff/libtiff!541 - -2023-10-12 Even Rouault - - Merge branch 'fix_616' into 'master' - tif_lzw.c: avoid warning about misaligned address with UBSAN (fixes #616) - - Closes #616 - - See merge request libtiff/libtiff!542 - -2023-10-12 Even Rouault - - Merge branch 'tiffcp_cancel_ycbcr' into 'master' - tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to... - - See merge request libtiff/libtiff!540 - -2023-10-12 Even Rouault - - tif_lzw.c: avoid warning about misaligned address with UBSAN (fixes #616) - The branch suppressed by this commit wasn't useful as I've verified that - with -O2 and -O3 and gcc or clang, doing a memcpy() + _byteswap_uint64() - generates exactly the same code as _byteswap_uint64(*ptr). - The warning with UBSAN thus only comes from UBSAN generating special code - to catch the misalignment, but is unlikely to cause any issue in - practice given the above observation. - -2023-10-12 Julien Schueller - - CMake: Fix TIFF_INCLUDE_DIRS. - -2023-10-08 Even Rouault - - tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG - -2023-10-07 Even Rouault - - tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs #571) - -2023-10-05 Even Rouault - - Merge branch 'kmilos-master-patch-42063' into 'master' - CMake: MinGW compilers don't need a .def file for shared library - - See merge request libtiff/libtiff!448 - -2023-10-05 Even Rouault - - Merge branch 'kmilos-master-patch-64997' into 'master' - CMake: move libdeflate and Lerc to Requires.private - - See merge request libtiff/libtiff!536 - -2023-10-05 Even Rouault - - Merge branch 'clarify_archive' into 'master' - Doc: clarify unsupported (still in tarball) and archived (only in git) utilities - - See merge request libtiff/libtiff!532 - -2023-10-05 Even Rouault - - Merge branch 'fix_571_alternative' into 'master' - tiffcp: Setting the correct photometric interpretation for the output image... - - Closes #571 - - See merge request libtiff/libtiff!539 - -2023-10-04 Even Rouault - - tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, REFERENCEBLACKWHITE. Only set TIFFTAG_YCBCRSUBSAMPLING when generating YCbCr JPEG - - tiffcp: Setting the correct photometric interpretation for the output image when converting JPEG-YCBCR to JPEG-RGB images. - Closes #571 - -2023-09-28 Miloš Komarčević - - CMake: move libdeflate and Lerc to Requires.private. - -2023-09-27 Even Rouault - - Merge branch 'kmilos-windres' into 'master' - CMake: enable resource compilation on all Windows - - See merge request libtiff/libtiff!537 - -2023-09-27 Miloš Komarčević - - CMake: enable resource compilation on all Windows. - -2023-09-15 Even Rouault - - Merge branch 'fix_608' into 'master' - tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes #608) - - Closes #608 - - See merge request libtiff/libtiff!534 - -2023-09-15 Even Rouault - - tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes #608) - -2023-09-09 Even Rouault - - Merge branch 'fix_606_tiffcp_check_also_input_compression_codec' into 'master' - tiffcp: Fixes #606. Check also codec of input image, not only from output image. - - Closes #606 - - See merge request libtiff/libtiff!533 - -2023-09-09 Su_Laus - - Check also if codec of input image is available, independently from codec check of output image and return with error if not. Fixes #606. - -2023-09-08 Even Rouault - - Doc: clarify unsupported (still in tarball) and archived (only in git) utilities - -2023-09-08 Even Rouault - - Merge branch 'update_release_date' into 'master' - Update RELEASE-DATE - - See merge request libtiff/libtiff!531 - -2023-09-08 Even Rouault - - Update RELEASE-DATE. - -2023-09-08 Even Rouault - - Merge branch 'fix_605' into 'master' - autoconf.ac: fix detection of windows.h for mingw (fixes #605) - - Closes #605 - - See merge request libtiff/libtiff!530 - -2023-09-07 Even Rouault - - autoconf.ac: fix detection of windows.h for mingw (fixes #605) - -2023-09-06 Even Rouault - - Merge branch 'prepare_v4_6_0' into 'master' - Prepare for libtiff 4.6.0 release - - See merge request libtiff/libtiff!528 - -2023-09-05 Even Rouault - - doc/index.rst: add warning about tools removal. - -2023-09-05 Even Rouault - - Merge branch 'fix_603_readme_doc_reference_update' into 'master' - Update documentation reference within README.md. Fixes #603. - - Closes #603 - - See merge request libtiff/libtiff!529 - -2023-09-05 Su_Laus - - Update documentation reference within README.md. Fixes #603. - -2023-09-05 Even Rouault - - Fix references to mailing list. - -2023-09-05 Even Rouault - - libtiff v4.6.0 released - -2023-09-05 Even Rouault - - Merge branch 'fix_600' into 'master' - CMake: fix build with -Dstrip-chopping=off (fixes #600) - - See merge request libtiff/libtiff!527 - -2023-09-05 Even Rouault - - Merge branch 'georgthegreat-master-patch-87447' into 'master' - Fix using __attribute__ libtiff with clang-for-windows - - See merge request libtiff/libtiff!525 - -2023-09-05 Yuriy Chernyshov - - Fix using __attribute__ libtiff with clang-for-windows. - -2023-09-05 Even Rouault - - Merge branch 'manpage_TIFFField_docu_update' into 'master' - manpages: TiffField functions documentation updated with return behaviour for... - - See merge request libtiff/libtiff!526 - -2023-09-05 Even Rouault - - CMake: fix build with -Dstrip-chopping=off (fixes #600) - -2023-09-03 Even Rouault - - Merge branch 'consistently_update_TIFF-version_from_configure-ac' into 'master' - Update CMake and autoconf scripts to consistently update LibTIFF version... - - See merge request libtiff/libtiff!456 - -2023-09-03 Su Laus - - Update CMake and autoconf scripts to consistently update LibTIFF version defines and references in various files when version definition in configure.ac has been changed. - - Move in tiffvers.h from .\libtiff source directory to .\libtiff build directory. - - Remove unused version information from tif_config.h - - With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h are consistently updated from configure.ac. The version release-date is taken from file RELEASE-DATE. - - The files VERSION and RELEASE-DATE are only updated with a special CMake target build: cmake --build . --target tiff_release. - - - For autotools, version information is updated from configure.ac with ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE. - - ./configure generates tiffvers.h with the cached version information and LIBTIFF_RELEASE_DATE. - - "make release" updates tiffvers.h and VERSION file with cached version info and RELEASE-DATE file and tiffves.h with the current date. - -2023-08-28 Su_Laus - - manpages: TiffField functions documentation updated with return behaviour for not defined tags and determination of write-/read-count size. - -2023-08-22 Even Rouault - - Merge branch 'change_long_to_int32_t_in_two_test_apps' into 'master' - Change "long" to "int32_t" in two test apps, because can be either int32_t or... - - See merge request libtiff/libtiff!524 - -2023-08-21 Su_Laus - - Change "long" to "int32_t" in two test apps, because can be either int32_t or int64_t, depending on compiler and system. - -2023-08-16 Even Rouault - - Merge branch 'CI_CMake_static_build' into 'master' - Add static build for CI/CD to run testcases which need private interface functions. - - See merge request libtiff/libtiff!521 - -2023-08-16 Even Rouault - - Merge branch 'fix_#597_tiffset_different_signedness' into 'master' - tiffset fix #597: warning: comparison of integer expressions of different signedness. - - Closes #597 - - See merge request libtiff/libtiff!523 - -2023-08-16 Even Rouault - - Merge branch 'tiffcp_remove_i_option' into 'master' - tiffcp: remove -i option (ignore errors) - - See merge request libtiff/libtiff!522 - -2023-08-16 Even Rouault - - Merge branch 'move_tools_to_unsupported_a_archive' into 'master' - Move most TIFF tools to archive and keep some as unsupported (see #580). - - See merge request libtiff/libtiff!520 - -2023-08-16 Su Laus - - Move most TIFF tools to archive and keep some as unsupported (see #580). - -2023-08-12 Su_Laus - - Add static build for CI/CD to run testcases which need private interface functions. - - tiffset fix #597: warning: comparison of integer expressions of different signedness. - - Remove -i option (ignore errors) from tiffcp, because almost all fuzzer issues were consequential errors from ignored errors because of the "-i" option. - -2023-08-11 Even Rouault - - Merge branch 'fix_585_test_write_read_tags_autoconf' into 'master' - Add missing test_write_read_tags.c and test_transferfunction_write_read.c in... - - Closes #585 - - See merge request libtiff/libtiff!519 - -2023-07-24 Even Rouault - - Fix copy paste error. - -2023-07-23 Su_Laus - - Add missing test_write_read_tags.c and test_transferfunction_write_read.c in tarball (fixes #585) and correct „long“ issue. - Don't use "long" because can be int32_t or int64_t, depending on compiler and system. - -2023-07-20 Even Rouault - - Merge branch 'clang-format-tools' into 'master' - Automatically format with clang-format - - See merge request libtiff/libtiff!518 - -2023-07-20 Timothy Lyanguzov - - Automatically format with clang-format. - -2023-07-20 Even Rouault - - Merge branch 'fix_589' into 'master' - TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and... - - Closes #589 - - See merge request libtiff/libtiff!514 - -2023-07-20 Even Rouault - - TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and... - -2023-07-19 Even Rouault - - Merge branch 'master-patch-6fc6' into 'master' - raw2tiff: fix integer overflow and bypass of the check (fixes #592) - - See merge request libtiff/libtiff!516 - -2023-07-19 Arie Haenel - - raw2tiff: fix integer overflow and bypass of the check (fixes #592) - -2023-07-19 Even Rouault - - Merge branch 'master-patch-05a4' into 'master' - tiffcp: fix memory corruption (overflow) on hostile images (fixes #591) - - See merge request libtiff/libtiff!515 - -2023-07-19 Arie Haenel - - tiffcp: fix memory corruption (overflow) on hostile images (fixes #591) - -2023-07-17 Even Rouault - - Merge branch 'fix-numtrunc' into 'master' - fix numtrunc at tiff_dirread.c - - See merge request libtiff/libtiff!512 - -2023-07-17 headshog - - TIFFReadDirectoryCheckOrder: avoid integer overflow. - When it occurs, it should be harmless in practice though - -2023-07-17 Even Rouault - - Merge branch 'webp_lossless_exact' into 'master' - WebP codec: turn exact mode when creating lossless files to avoid altering... - - See merge request libtiff/libtiff!511 - -2023-07-11 Even Rouault - - WebP codec: turn exact mode when creating lossless files to avoid altering R,G,B values in areas where alpha=0 - Fixes https://github.com/OSGeo/gdal/issues/8038 - -2023-07-05 Even Rouault - - Merge branch 'webp_reg_fix' into 'master' - WebP decoder: fix error when reading a 3-band blob in a RGBA image - - See merge request libtiff/libtiff!510 - -2023-07-05 Even Rouault - - WebP decoder: fix error when reading a 3-band blob in a RGBA image. - Fixes regression of 350ff161c8a61b6483a1e4689e09cd47dd0dd5f9 (master only) - -2023-06-26 Even Rouault - - Merge branch 'appveyor_fix' into 'master' - .appveyor.yml: workaround build error - - See merge request libtiff/libtiff!509 - -2023-06-26 Even Rouault - - .appveyor.yml: workaround build error. - -2023-06-26 Even Rouault - - Merge branch 'tif_webp_warning_fixes' into 'master' - tif_webp.c: fix signed vs unsigned comparison warnings (fix previous commit) - - See merge request libtiff/libtiff!508 - -2023-06-26 Even Rouault - - tif_webp.c: fix signed vs unsigned comparison warnings (fix previous commit) - -2023-06-26 Even Rouault - - Merge branch 'fix_TransferFunction_writing' into 'master' - Fix TransferFunction writing of only two transfer functions. - - See merge request libtiff/libtiff!502 - -2023-06-26 Even Rouault - - Merge branch 'fix_581_582' into 'master' - WebP decoder: validate WebP blob width, height, band count against TIFF parameters - - Closes #582 et #581 - - See merge request libtiff/libtiff!507 - -2023-06-19 Even Rouault - - Merge branch 'warning_cmake_config_file' into 'master' - v4.5.1 release note: add warning about CMake config file being preview - - See merge request libtiff/libtiff!506 - -2023-06-17 Even Rouault - - WebP decoder: validate WebP blob width, height, band count against TIFF parameters - to avoid use of uninitialized variable, or decoding corrupted content - without explicit error - - Fixes #581, fixes #582 - -2023-06-15 Even Rouault - - v4.5.1 release note: add warning about CMake config file being preview. - -2023-06-14 Even Rouault - - Merge branch 'HOWTO-RELEASE-gitlab-release' into 'master' - HOWTO-RELEASE: mention creating a gitlab release - - See merge request libtiff/libtiff!505 - -2023-06-14 Even Rouault - - HOWTO-RELEASE: mention creating a gitlab release. - -2023-06-10 Even Rouault - - Merge branch 'TIFFOpenWExt_O_RDWR' into 'master' - TIFFOpenWExt(): mode r+ in the Windows implementation adjusted to that of Linux - - See merge request libtiff/libtiff!504 - -2023-06-10 Even Rouault - - TIFFOpenWExt(): mode r+ in the Windows implementation adjusted to that of Linux - -2023-06-10 Even Rouault - - Merge branch 'fix_ossfuzz_59751' into 'master' - TIFFReadDirectory(): fix crash when reading tag TIFFTAG_EP_BATTERYLEVEL - - See merge request libtiff/libtiff!503 - -2023-06-10 Even Rouault - - TIFFReadDirectory(): fix crash when reading tag TIFFTAG_EP_BATTERYLEVEL. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59751 - - In 738e0409 (refs #575), we disabled DNG / EP tags, but there was a - special processing for TIFFTAG_EP_BATTERYLEVEL that must be disabled - since the tag is no longer defined. - -2023-06-09 Su_Laus - - Fix TransferFunction writing of only two transfer functions. The TIFFWriteDirectoryTagTransferfunction() function writes in some cases only two transfer functions, although only exactly one or exactly three transfer functions are allowed. This then leads to an error when reading. --> TIFFReadDirectory: Warning, Incorrect count for "TransferFunction"; tag ignored. - This MR corrects the behaviour of TIFFWriteDirectoryTagTransferfunction() accordingly. Furthermore, a possible buffer overflow is avoided. - -2023-06-09 Even Rouault - - Merge branch 'fix_win_build' into 'master' - Fix Windows build - - Closes #578 - - See merge request libtiff/libtiff!501 - -2023-06-09 Even Rouault - - cmake/PkgConfig.cmake: avoid CMake error when prefix or suffix is empty. - - Add tif_win32_versioninfo.rc and tif_tools_versioninfo.rc to EXTRA_DIST. - -2023-06-09 Even Rouault - - Merge branch 'fix_coverity_build' into 'master' - build/gitlab-ci: fix coverity_build() - - See merge request libtiff/libtiff!499 - -2023-06-09 Even Rouault - - build/gitlab-ci: fix coverity_build() - -2023-06-09 Even Rouault - - Merge branch 'v4.5.1rc1_preparation' into 'master' - Prepare release 4.5.1 - - See merge request libtiff/libtiff!498 - -2023-06-09 Even Rouault - - Prepare for v4.5.1 release. - - Merge remote-tracking branch 'sulaus/Rel_4.5.1_preparation' - -2023-06-09 Even Rouault - - Merge branch 'disable_dng_tags' into 'master' - tif_dirinfo.c: disable DNG 1.2->1.6 tags - - Closes #575 - - See merge request libtiff/libtiff!497 - -2023-06-09 Even Rouault - - Merge branch 'fix_577' into 'master' - CMake related fixes - - Closes #577 - - See merge request libtiff/libtiff!496 - -2023-06-09 Even Rouault - - libtiff v4.5.1 released - -2023-06-09 Even Rouault - - Merge remote-tracking branch 'sulaus/Rel_4.5.1_preparation' - -2023-06-09 Even Rouault - - Merge branch 'disable_dng_tags' into 'master' - tif_dirinfo.c: disable DNG 1.2->1.6 tags - - Closes #575 - - See merge request libtiff/libtiff!497 - -2023-06-09 Even Rouault - - Merge branch 'fix_577' into 'master' - CMake related fixes - - Closes #577 - - See merge request libtiff/libtiff!496 - -2023-06-07 Even Rouault - - tif_dirinfo.c: disable DNG 1.2->1.6 tags. - They were added per b90b20d36d7833f54a1f3014c324f6c21b988006 but it has - been found in https://gitlab.com/libtiff/libtiff/-/issues/575 that it - could cause compatibility issues with libtiff users, so this addition - should be deferred for a feature release (likely 4.6.0) and not a patch one. - - Fixes #575 - -2023-06-06 Timothy Lyanguzov - - Apply 1 suggestion(s) to 1 file(s) - -2023-06-05 Even Rouault - - CI: add testing of find_package(Tiff CONFIG) - - CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files. - - libtiff/CMakeLists.txt: fix export of INTERFACE_INCLUDE_DIRECTORIES. - - libtiff/CMakeLists.txt: correctly define TIFF::tiff alias (fixes #577) - -2023-06-05 Even Rouault - - Merge branch 'TIFFField_downgrade_errors_to_warnings' into 'master' - TIFFFieldWithName() and TIFFFieldWithTag() downgrade errors to warnings. - - See merge request libtiff/libtiff!495 - -2023-05-28 Su_Laus - - TIFFFieldWithName() and TIFFFieldWithTag() downgrade errors to warnings. see https://gitlab.com/libtiff/libtiff/-/issues/575#note_1407633888 - -2023-05-25 Even Rouault - - Merge branch 'bebuch-master-patch-58347' into 'master' - check if upstream lzma (xz) config was used and bind to it if so - - See merge request libtiff/libtiff!494 - -2023-05-25 Benjamin Buch - - check if upstream lzma (xz) config was used and bind to it if so. - -2023-05-25 Even Rouault - - Merge branch 'upstream-zstd-config' into 'master' - check if upstream zstd config was used and bind to it if so - - See merge request libtiff/libtiff!493 - -2023-05-25 Even Rouault - - Merge branch 'cmake_FindDeflate_bugs_see_526' into 'master' - CMake: FindDeflate several errors fixed (see #526) - - See merge request libtiff/libtiff!491 - -2023-05-24 Su_Laus - - CMake: FindDeflate several errors (see #526) - There are CMake issues if the library is not included in the environment path and only set with CMake -D option. - - For FindDeflate.cmake, FindJBIG.cmake, FindLERC.cmake, FindWebP.cmake, FindZSTD.cmake: - Set IMPORTED_LOCATION (without debug or release) if neither _LIBRARY_RELEASE nor _LIBRARY_DEBUG were set. - - FindDeflate.cmake: Correct code to retrieve library version information from libdeflate.h - - FindLERC.cmake version string return added. - -2023-05-24 Benjamin Buch - - prefer shared over static. - - check if upstream zstd config was used and bind to it if so. - -2023-05-24 Even Rouault - - Merge branch 'master' into 'master' - make WebP component name compatible with upstream ConfigWebP.cmake - - See merge request libtiff/libtiff!492 - -2023-05-24 Benjamin Buch - - CMake: make WebP component name compatible with upstream ConfigWebP.cmake - -2023-05-18 Su_Laus - - Prepare release 4.5.1 - Update till 18.05.23 after fix_559_DNG_1.6_passcount_error - - Prepare release 4.5.1. - -2023-05-18 Even Rouault - - Merge branch 'fix_559_DNG_1.6_passcount_error' into 'master' - Fix #559 DNG 1.6 passcount assertion - - Closes #574 et #559 - - See merge request libtiff/libtiff!489 - -2023-05-18 Even Rouault - - Merge branch 'fix_557_TagExtender_for_CustomDirectories_not_possible' into 'master' - manpage: TIFFSetTagExtender() cannot add tags to custom directories. Closes #557. - - Closes #557 - - See merge request libtiff/libtiff!490 - -2023-05-18 Even Rouault - - Merge branch 'fix_559_DNG_1.6_passcount_error' into 'master' - Fix #559 DNG 1.6 passcount assertion - - Closes #574 et #559 - - See merge request libtiff/libtiff!489 - -2023-05-18 Even Rouault - - Merge branch 'fix_557_TagExtender_for_CustomDirectories_not_possible' into 'master' - manpage: TIFFSetTagExtender() cannot add tags to custom directories. Closes #557. - - Closes #557 - - See merge request libtiff/libtiff!490 - -2023-05-17 Su_Laus - - Documentation update: TIFFSetTagExtender() cannot add tags to custom directories. - Closes #557. - -2023-05-16 Even Rouault - - Merge branch 'fix_558' into 'master' - Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB, and make 'H' flag of TIFFOpen()... - - See merge request libtiff/libtiff!488 - -2023-05-16 Su_Laus - - Fix #559 DNG 1.6 passcount assertion. - Amend DNG tags definition introduced with MR 482: - - DNG 1.6 tags specified as UTF-8 strings are defined as variable TIFF_BYTE with passcount=TRUE. - - For all tags with TIFF_SETGET_C32_UINT8 the readcount and writecount were corrected to -3 (TIFF_VARIABLE2). - - Testprogram to write and read all tags defined within LibTIFF is introduced. - It also checks for valid passcount flag setting for the defined tags but some special tags are excluded from that check. - - Closes #559. - -2023-05-09 Even Rouault - - Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB, and make 'H' flag of TIFFOpen() to warn and an alias of FILLORDER_MSB2LSB - - tif_lerc.c: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN. - -2023-05-07 Even Rouault - - Merge branch 'fix_484_TIFFDirectory_32_64_bit' into 'master' - Fix 484 TIFFDirectory td_fieldsset uses unsigned long which can be 32 or 64 bits. - - Closes #484 - - See merge request libtiff/libtiff!471 - -2023-05-07 Even Rouault - - Merge branch 'DNG_1.6_EP_tags' into 'master' - Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update documentation - - See merge request libtiff/libtiff!482 - -2023-05-07 Even Rouault - - Merge branch 'issue547' into 'master' - do not install libtiff-4.pc when tiff-install is reset - - Closes #547 - - See merge request libtiff/libtiff!481 - -2023-05-06 Even Rouault - - Merge branch 'fix_548' into 'master' - LZWDecode(): avoid crash when trying to read again from a strip with a... - - Closes #548 - - See merge request libtiff/libtiff!484 - -2023-05-06 Even Rouault - - Merge branch 'tiffcrop_fix_553_multi-image-errors' into 'master' - tiffcrop: fix 553 by considering error return of writeSelections() - - Closes #553 - - See merge request libtiff/libtiff!485 - -2023-05-06 Even Rouault - - Merge branch 'tif_ojpeg_fix-554_FPE' into 'master' - tif_ojpeg.c fix 554 by checking for division by zero - - Closes #554 - - See merge request libtiff/libtiff!486 - -2023-05-06 Su Laus - - tif_ojpeg.c fix 554 by checking for division by zero. - -2023-05-05 Su_Laus - - Consider error return of writeSelections(). Fixes #553. - -2023-04-29 Even Rouault - - LZWDecode(): avoid crash when trying to read again from a strip with a missing end-of-information marker (fixes #548) - -2023-04-25 Su_Laus - - Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update documentation - Amend MR !337 'Add support for DNG tags up to version 1.6.0.0 and some TIFF/EP tags' from Sami Liedes: - - Set most tags to OkToChange=1. - - Define BATTERYLEVEL tag as ASCII and convert values of rational variant to ASCII. - - TIFF documentation updated for tags recognized by LibTiff (DNG 1.6 and others). - - TIFF/EP tags added, which are equivalent to EXIF tags. This addresses part of #418 as well. - - Definition of tags reformatted (clang-format off) for better readability of tag comments in tiff.h and tif_dirinfo.c - -2023-04-23 Roman - - do not install libtiff-4.pc when tiff-install is reset. - -2023-04-21 Even Rouault - - Merge branch 'mymaster1' into 'master' - fix runtime error: applying zero offset to null pointer - - See merge request libtiff/libtiff!479 - -2023-04-21 xiaoxiaoafeifei - - countInkNamesString(): fix `UndefinedBehaviorSanitizer`: applying zero offset to null pointer - -2023-03-26 Even Rouault - - Merge branch 'tif_ovrcache_TIFFSetSubDirectory' into 'master' - tif_ovrcache.c: check TIFFSetSubDirectory() return value (CID 1524573) - - See merge request libtiff/libtiff!478 - -2023-03-26 Even Rouault - - tif_ovrcache.c: check TIFFSetSubDirectory() return value (CID 1524573) - -2023-03-26 Even Rouault - - Merge branch 'even_faster_setdirectory_with_IFDlist' into 'master' - Even faster TIFFSetDirectory() using IFD list. - - See merge request libtiff/libtiff!477 - -2023-03-26 Su Laus - - Even faster TIFFSetDirectory() using IFD list. - -2023-03-12 Even Rouault - - Merge branch 'faster-setdirectory_newMR' into 'master' - Optimize relative seeking with TIFFSetDirectory - - See merge request libtiff/libtiff!474 - -2023-03-12 Su Laus - - Optimize relative seeking with TIFFSetDirectory. - -2023-03-11 Even Rouault - - Merge branch 'master' into 'master' - Fix memory leak in tiffcrop.c - - See merge request libtiff/libtiff!475 - -2023-03-08 zhailiangliang - - Fix memory leak in tiffcrop.c. - -2023-02-23 Even Rouault - - Merge branch 'skip-thumbnail-test' into 'master' - test: avoid running tool tests if not built - - Closes #421 - - See merge request libtiff/libtiff!334 - -2023-02-22 Sam James - - test (cmake): skip script tests if tools aren't built. - In Gentoo, we avoid building the tools for multilib (32-bit, x86) builds on - amd64/x86_64 because we only need the library to keep binary applications working. - - This causes a test failure in e.g. tiffcp-thumbnail.sh as the 'thumbnail' - binary isn't built. Skip it if unavailable. - - Fixes: https://gitlab.com/libtiff/libtiff/-/issues/421 - -2023-02-22 Sam James - - test (autotools): skip script tests if tools aren't built. - In Gentoo, we avoid building the tools for multilib (32-bit, x86) builds on - amd64/x86_64 because we only need the library to keep binary applications working. - - This causes a test failure in e.g. tiffcp-thumbnail.sh as the 'thumbnail' - binary isn't built. Skip it if unavailable. - - Fixes: https://gitlab.com/libtiff/libtiff/-/issues/421 - -2023-02-16 Even Rouault - - Merge branch 'fix_Unlink_first_directory_0' into 'master' - Fix TIFFUnlinkDirectory(0) case and unlink of first directory. - - See merge request libtiff/libtiff!460 - -2023-02-16 Even Rouault - - Merge branch 'tif_luv_check_NaN_fix_#530' into 'master' - tif_luv: Check and correct for NaN data in uv_encode(). - - Closes #530 - - See merge request libtiff/libtiff!473 - -2023-02-16 Su_Laus - - tif_luv: Check and correct for NaN data in uv_encode(). - Closes #530 - - See merge request !473 - -2023-02-14 Even Rouault - - Merge branch 'tiffcrop_dont_reuse_input_buffer_fix_527' into 'master' - tiffcrop: Do not reuse input buffer for subsequent images. Fix issue 527 - - Closes #527 - - See merge request libtiff/libtiff!472 - -2023-02-14 Su_Laus - - tiffcrop: Do not reuse input buffer for subsequent images. Fix issue 527 - Reuse of read_buff within loadImage() from previous image is quite unsafe, because other functions (like rotateImage() etc.) reallocate that buffer with different size without updating the local prev_readsize value. - - Closes #527 - -2023-02-08 Su_Laus - - Fix 484 TIFFDirectory td_fieldsset uses unsigned long which can be 32 or 64 bits. - Closes #484 - -2023-02-08 Even Rouault - - Merge branch 'test_ifd_loop_detection_fix_CoverityScan_ln_55' into 'master' - test_ifd_loop_detection: fix Coverity Scan issue CID 1520750: Null pointer... - - See merge request libtiff/libtiff!470 - -2023-02-08 Su_Laus - - test_ifd_loop_detection: fix Coverity Scan issue CID 1520750: Null pointer dereferences (NULL_RETURNS) line 55. - -2023-02-06 Even Rouault - - Merge branch 'tiffcrop_fix_CoverityScan_line_9676' into 'master' - Fix Coverity Scan issue CID 1520761: Integer handling issues... - - See merge request libtiff/libtiff!469 - -2023-02-06 Su_Laus - - Fix Coverity Scan issue CID 1520761: Integer handling issues (OVERFLOW_BEFORE_WIDEN) tiffcrop.c: 9676 in rotateImage() - -2023-02-05 Even Rouault - - Merge branch 'tiffcrop_R270_fix#492' into 'master' - tiffcrop: Amend rotateImage() not to toggle the input (main) image width and... - - Closes #519, #518, #499, #495, #494, #493 et #492 - - See merge request libtiff/libtiff!465 - -2023-02-05 Su_Laus - - tiffcrop: Amend rotateImage() not to toggle the input (main) image width and length parameters when only cropped image sections are rotated. Remove buffptr from region structure because never used. - Closes #492 #493 #494 #495 #499 #518 #519 - -2023-02-05 Even Rouault - - Merge branch 'tiffcrop_correctly_update_buffersize_after_rotate_fix#520' into 'master' - tiffcrop correctly update buffersize after rotateImage() fix#520 - - Closes #520 - - See merge request libtiff/libtiff!467 - -2023-02-05 Even Rouault - - Merge branch 'tiffcrop_composite_image_assumption_test_fix#496' into 'master' - tiffcrop: added check for assumption on composite images (fixes #496) - - Closes #501, #500, #498, #497 et #496 - - See merge request libtiff/libtiff!466 - -2023-02-05 Su Laus - - tiffcrop: added check for assumption on composite images (fixes #496) - tiffcrop: For composite images with more than one region, the combined_length or combined_width always needs to be equal, respectively. Otherwise, even the first section/region copy action might cause buffer overrun. This is now checked before the first copy action. - - Closes #496, #497, #498, #500, #501. - -2023-02-04 Su_Laus - - tiffcrop correctly update buffersize after rotateImage() fix#520 -- enlarge buffsize and check integer overflow within rotateImage(). - -2023-02-04 Even Rouault - - Merge branch 'test_subidf_loop' into 'master' - test_ifd_loop_detection: Added test to check loops in SubIFDs that are chained. - - See merge request libtiff/libtiff!464 - -2023-02-04 Su Laus - - test_ifd_loop_detection: Added test to check loops in SubIFDs that are chained. - -2023-02-04 Su_Laus - - Fix TIFFUnlinkDirectory(0) case and unlink of first directory. - If directory number 0 is unlinked, then the base offset variables within LibTiff are not updated. As a result, a subsequent TIFFSetDirectory() first goes to the unlinked former directory number 0. - - In addition, the error case for dirn=0 is handled. - - This MR fixes that by updating the base offset variables tif->tif_header.classic.tiff_diroff and tif->tif_header.big.tiff_diroff. - -2023-02-03 Even Rouault - - Merge branch 'TiffClose_NULL_ptr_dereferencing_fix_515' into 'master' - TIFFClose() avoid NULL pointer dereferencing. fix#515 - - Closes #515 - - See merge request libtiff/libtiff!468 - -2023-02-03 Su_Laus - - TIFFClose() avoid NULL pointer dereferencing. fix#515. - Closes #515 - - tiffcrop correctly update buffersize after rotateImage() fix#520 rotateImage() set up a new buffer and calculates its size individually. Therefore, seg_buffs[] size needs to be updated accordingly. Before this fix, the seg_buffs buffer size was calculated with a different formula than within rotateImage(). - Closes #520. - -2023-01-25 Even Rouault - - Merge branch 'add_windows_DLL_versioninfo' into 'master' - Add versioninfo resource files for DLL and tools compiled with Windows MSVC and MINGW. - - See merge request libtiff/libtiff!455 - -2023-01-25 Su Laus - - Add versioninfo resource files for DLL and tools compiled with Windows MSVC and MINGW. - -2023-01-22 Even Rouault - - Merge branch 'tif_hash_set_order_include' into 'master' - tif_hash_set.c: include tif_hash_set.h after tif_config.h to let a chance for... - - See merge request libtiff/libtiff!462 - -2023-01-22 Even Rouault - - tif_hash_set.c: include tif_hash_set.h after tif_config.h to let a chance for GDAL symbol renaming trick - -2023-01-22 Even Rouault - - Merge branch 'fix_513' into 'master' - Fax3: fix failure to decode some fax3 images (fixes #513) - - Closes #513 - - See merge request libtiff/libtiff!461 - -2023-01-21 Even Rouault - - Add test for Fax3 decoding issues (refs #513) - -2023-01-21 Even Rouault - - Merge branch 'tiffcrop_fix_#488' into 'master' - tiffcrop: Correct simple copy paste error. Fix #488. - - Closes #488 - - See merge request libtiff/libtiff!459 - -2023-01-21 Su Laus - - tiffcrop: Correct simple copy paste error. Fix #488. - -2023-01-21 Even Rouault - - Fax3: fix failure to decode some fax3 images (fixes #513) - Patch by @jsummers26 - -2023-01-12 Even Rouault - - Merge branch 'tiffmedian_fix_#477' into 'master' - tiffmedian: avoid zero num_colors, fixes #477 - - Closes #477 - - See merge request libtiff/libtiff!458 - -2023-01-12 Even Rouault - - Merge branch 'fax2ps_fixes_#475' into 'master' - fax2ps: fixes #475 buffer overflow in qsort function pcompar. - - Closes #475 - - See merge request libtiff/libtiff!457 - -2023-01-12 Su_Laus - - tiffmedian: avoid zero num_colors, fixes #477. - - fax2ps: fixes #475 buffer overflow in qsort function pcompar. - -2023-01-09 Even Rouault - - Merge branch 'fix_241_tiffset_file_size_limit' into 'master' - tiffset: get filesize to allocate only the required memory. Fixes issue #241 - - Closes #241 - - See merge request libtiff/libtiff!451 - -2023-01-09 Su Laus - - tiffset: get filesize to allocate only the required memory. Fixes issue #241 - -2023-01-09 Even Rouault - - Merge branch '_TIFFCleanupIFDOffsetAndNumberMaps' into 'master' - Add _TIFFCleanupIFDOffsetAndNumberMaps() and call it from TIFFUnlinkDirectory() - - See merge request libtiff/libtiff!454 - -2023-01-06 Even Rouault - - Remove use of tif_dirnumber. - - TIFFSetSubDirectory(): call _TIFFCleanupIFDOffsetAndNumberMaps() - - struct tiff: remove unused tif_dirlistoff. - - TIFFUnlinkDirectory(): reset tif_dirnumber. - - Add _TIFFCleanupIFDOffsetAndNumberMaps() and call it from TIFFUnlinkDirectory() - -2022-12-29 Even Rouault - - Merge branch 'cmake_in_files_formatting_sensitive' into 'master' - Disable clang-formatting for tif_config.h.cmake.in and tiffconf.h.cmake.in... - - See merge request libtiff/libtiff!452 - -2022-12-28 Su_Laus - - Disable clang-formatting for tif_config.h.cmake.in and tiffconf.h.cmake.in because sensitive for CMake scripts. - explanation added - -2022-12-26 Su_Laus - - Disable clang-formatting for tif_config.h.cmake.in and tiffconf.h.cmake.in because sensitive for CMake scripts. - -2022-12-19 Even Rouault - - Merge branch 'manpage_multi-page-TIFF' into 'master' - manpage: Add multi page TIFF and SubIFDs description and read / write example. - - See merge request libtiff/libtiff!450 - -2022-12-19 Su Laus - - manpage: Add multi page TIFF and SubIFDs description and read / write example. - -2022-12-18 Even Rouault - - Merge branch 'TIFFOpen_r+_windows_behaviour' into 'master' - Behavior of TIFFOpen() mode "r+" in the Windows implementation adjusted to that of Linux. - - See merge request libtiff/libtiff!449 - -2022-12-16 Su_Laus - - Behavior of TIFFOpen() mode "r+" in the Windows implementation adjusted to that of Linux. - -2022-12-15 Even Rouault - - Merge branch 'ossfuzz_54343' into 'master' - TIFFSetDirectory: avoid harmless unsigned-integer-overflow - - See merge request libtiff/libtiff!447 - -2022-12-15 Even Rouault - - TIFFSetDirectory: avoid harmless unsigned-integer-overflow. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54343 - -2022-12-14 Even Rouault - - Merge branch 'ossfuzz_54311' into 'master' - TIFFWriteDirectorySec(): avoid harmless unsigned-integer-overflow - - See merge request libtiff/libtiff!446 - -2022-12-14 Even Rouault - - TIFFWriteDirectorySec(): avoid harmless unsigned-integer-overflow. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54311 - -2022-12-14 Even Rouault - - libtiff v4.5.0rc2 preparation - -2022-12-14 Su_Laus - - tiffinfo: update curdir from uint16_t to tdir_t for more than 64k IFD handling. - -2022-12-13 Even Rouault - - Merge branch 'fix_502' into 'master' - Make TIFFSetDirectory(tiff, 65534) work again (fixes #502) - - Closes #502 - - See merge request libtiff/libtiff!436 - -2022-12-13 Even Rouault - - Add tests for IFD loop detection. - - Fix IFD loop detection. - - Use UINT_MAX. - - Make TIFF_MAX_DIR_COUNT a autoconf/CMake setting. - -2022-12-13 Even Rouault - - Merge branch 'build-shared-by-default' into 'master' - Restore shared libraries by default - - See merge request libtiff/libtiff!437 - -2022-12-13 shaun walbridge - - CMake: restore shared libraries by default for top-level build. - -2022-12-12 Even Rouault - - Add a TIFF_MAX_DIR_COUNT public #define. - - TIFFCurrentDirectory(), TIFFNumberOfDirectories(), TIFFSetDirectory(), TIFFUnlinkDirectory(): use tdir_t that is now a uint32_t, and raise limit of IFDs to 1048576 - - IFD loop checking: use hashmap to avoid quadratic performance. - - Add a hashset/hashmap implementation (ported from GDAL's CPLHashSet) - - Make TIFFSetDirectory(tiff, 65534) work again (fixes #502) - -2022-12-11 Even Rouault - - Merge branch 'do_not_format_tiffvers_h' into 'master' - Revert formatting of tiffvers.h and add TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, TIFFLIB_MICRO_VERSION defines - - See merge request libtiff/libtiff!434 - -2022-12-11 Even Rouault - - Merge branch 'tiffcrop_exclude_some_comment_from_clang-format' into 'master' - tiffcrop: Exclude some comments from clang-format - - See merge request libtiff/libtiff!435 - -2022-12-11 Su Laus - - tiffcrop: Exclude some comments from clang-format. - -2022-12-11 Even Rouault - - tiffvers.h.in: add clang-format off/on. - -2022-12-10 Even Rouault - - tiffvers.h: add TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, TIFFLIB_MICRO_VERSION defines - Also add a TIFFLIB_AT_LEAST() macro - - tiffvers.h: revert formatting. - - Exclude reformatting of tiffvers.h which breaks version detection for FindTIFF.cmake - -2022-12-09 Even Rouault - - Merge branch 'release_4_5_0' into 'master' - Prepare v4.5.0 release - - See merge request libtiff/libtiff!433 - -2022-12-09 Even Rouault - - libtiff v4.5.0rc1 preparation - -2022-12-08 Even Rouault - - Merge branch 'reformat' into 'master' - Whole code-base reformatting - - See merge request libtiff/libtiff!431 - -2022-12-08 Even Rouault - - Add .git-blame-ignore-revs. - - tiffcrop: remove version_id and rev_date. - -2022-12-08 pre-commit run by Even Rouault - - Reformatting in all other directories using 'pre-commit run' - - Reformatting in test/ using 'pre-commit run' - - Reformatting in tools/ using 'pre-commit run' - - Reformatting in libtiff/ using 'pre-commit run' - -2022-12-08 Even Rouault - - Add .clang-format, .pre-commit-config.yaml and CONTRIBUTING.md. - - Remove vim/emacs formatting footers. - -2022-11-29 Even Rouault - - Merge branch 'fix_489' into 'master' - TIFFWriteRawStrip(): restore capabilities to append data in the current strip (fixes #489) - - Closes #489 - - See merge request libtiff/libtiff!430 - -2022-11-29 Even Rouault - - Add test case for scenario of issue #489. - - TIFFWriteRawStrip(): restore capabilities to append data in the current strip (fixes #489) - This fixes a regression of libtiff 4.4.0 - -2022-11-29 Even Rouault - - Merge branch 'manpage_re-entrant_error_handler' into 'master' - manpage update for re-entrant error handler TIFFErrorExtR(), TIFFOpenExt() and... - - See merge request libtiff/libtiff!427 - -2022-11-29 Su Laus - - manpage update for re-entrant error handler TIFFErrorExtR(), TIFFOpenExt() and... - -2022-11-27 Even Rouault - - Merge branch 'tiffcrop_fix_#169' into 'master' - tiffcrop: Add check if (bps != 1) in writeSingleSection() for... - - Closes #169 - - See merge request libtiff/libtiff!429 - -2022-11-27 Su Laus - - tiffcrop: Add check if (bps != 1) in writeSingleSection() for... - -2022-11-26 Even Rouault - - Merge branch 'TIFFErrorExtR_fix_missing_calls' into 'master' - TIFFErrorExt() was not replaced with TIFFErrorExtR() everywhere in libtiff.... - - See merge request libtiff/libtiff!428 - -2022-11-26 Su Laus - - TIFFErrorExt() was not replaced with TIFFErrorExtR() everywhere in libtiff.... - -2022-11-25 Even Rouault - - Merge branch 'tif_jpeg_build_fix' into 'master' - tif_jpeg.c: fix compilation with MSVC (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b) - - See merge request libtiff/libtiff!426 - -2022-11-25 Even Rouault - - tif_jpeg.c: fix compilation with MSVC (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b) - -2022-11-25 Even Rouault - - Merge branch 'fix_0fd1a81d3547acb8f5be50bbbc3e44bde01c014b' into 'master' - JPEGEncode(): fix wrong pointer data type with libjpeg-turbo 2.2dev in 12-bit mode - - See merge request libtiff/libtiff!425 - -2022-11-25 Even Rouault - - JPEGEncode(): fix wrong pointer data type with libjpeg-turbo 2.2dev in 12-bit mode - (fixes commit 0fd1a81d3547acb8f5be50bbbc3e44bde01c014b) - -2022-11-25 Even Rouault - - Merge branch 'libjpegturbo_dual' into 'master' - Add support for libjpeg-turbo 2.2-dev 8/12 bit dual mode - - See merge request libtiff/libtiff!422 - -2022-11-25 Even Rouault - - Add support for libjpeg-turbo 2.2-dev 8/12 bit dual mode. - -2022-11-23 Even Rouault - - Merge branch 'windows-fix' into 'master' - libtiff: Fix TIFFOpen* for the Windows platform in tif_unix.c - - See merge request libtiff/libtiff!424 - -2022-11-23 Francois Bleibel - - libtiff: Fix TIFFOpen* for the Windows platform in tif_unix.c. - I'm not sure where this change was made, but it must have been in a recent update. TIFFOpenWEx is now TIFFOpenWExt, and _TIFFgetMode takes additional arguments. - - Verified: Tested libtiff on a local Windows build. - -2022-11-23 Even Rouault - - Merge branch 'tiffcrop_signed_vs_unsigned' into 'master' - tiffcrop.c: fix warning about signed vs unsigned comparison - - See merge request libtiff/libtiff!423 - -2022-11-23 Even Rouault - - tiffcrop.c: fix warning about signed vs unsigned comparison. - -2022-11-23 Even Rouault - - Merge branch 'TIFFClientOpenExt_warning_fix' into 'master' - TIFFClientOpenExt(): fix warning on 32-bit platforms (master only) - - See merge request libtiff/libtiff!421 - -2022-11-23 Even Rouault - - TIFFClientOpenExt(): fix warning on 32-bit platforms (master only) - -2022-11-23 Even Rouault - - Merge branch 'tiffcp_TIFFOpenOptionsFree_memleak_fix' into 'master' - tiffcp: fix leak of TIFFOpenOptionsAlloc() introduced in latest commit (master only) - - See merge request libtiff/libtiff!420 - -2022-11-23 Even Rouault - - tiffcp: fix leak of TIFFOpenOptionsAlloc() introduced in latest commit (master only) - Fixes Coverity CID 1517032 - -2022-11-23 Even Rouault - - Merge branch 'TIFFOpenOptionsSetMaxSingleMemAlloc' into 'master' - Add TIFFOpenOptionsSetMaxSingleMemAlloc() to define a limit in bytes for a single memory allocation done by libtiff - - See merge request libtiff/libtiff!419 - -2022-11-23 Even Rouault - - Emit explicit error message when tif_max_single_mem_alloc is exceeded. - - test_open_options: test TIFFOpenOptionsSetMaxSingleMemAlloc() - - Rename test_error_handlers to test_open_options. - - tiffinfo, tiffcp, tiffcrop, tiffsplit, tiff2rgba, tiff2ps: use TIFFOpenOptionsSetMaxSingleMemAlloc() - - Convert uses of _TIFFmalloc/realloc/calloc/free to the Ext functions. - -2022-11-22 Even Rouault - - Add TIFFOpenOptionsSetMaxSingleMemAlloc() - to define a limit in bytes for a single memory allocation done by libtiff. - - Also add internal functions used in replacement of the non Ext ones: - void* _TIFFmallocExt(TIFF* tif, tmsize_t s); - void* _TIFFcallocExt(TIFF* tif, tmsize_t nmemb, tmsize_t siz); - void* _TIFFreallocExt(TIFF* tif, void* p, tmsize_t s); - void _TIFFfreeExt(TIFF* tif, void* p); - -2022-11-22 Even Rouault - - Merge branch 'TIFFOpenEx' into 'master' - Add TIFFOpenExt(), TIFFOpenWExt() and TIFFFdOpenExt() with re-entrant error handlers - - See merge request libtiff/libtiff!413 - -2022-11-21 Even Rouault - - Remove TIFFSetErrorHandlerExtR() and TIFFSetWarningHandlerExtR() that were temporarily added in master - - Add a _TIFFErrorEarly() function to be able to use the re-entrant error handler, even before TIFF* is valid - - Rework TIFFOpenExt() and similar to use an opaque TIFFOpenOptions* opts argument, with alloc, free and setters - - Document TIFFOpenExt, TIFFOpenWExt, TIFFFdOpenExt, TIFFClientOpenExt, TIFFSetErrorHandlerExtR, TIFFSetWarningHandlerExtR - -2022-11-21 Even Rouault - - Add TIFFOpenExt(), TIFFOpenWExt() and TIFFFdOpenExt() with re-entrant error handlers - Rename TIFFClientOpenEx() to TIFFClientOpenExt() - - Rework signature of the re-entrant error handlers and of - TIFFSetWarningHandlerExt() and TIFFSetErrorHandlerExt() - - Use structures that can be extended as extra argument. - - Leverages and amends https://gitlab.com/libtiff/libtiff/-/merge_requests/409 - -2022-11-21 Even Rouault - - Merge branch 'manpage_fix485_file-descriptor_clientdata' into 'master' - manpage: Correct description of file handle/descriptors tif_fd and tif_clientdata. Closes #485. - - Closes #485 - - See merge request libtiff/libtiff!418 - -2022-11-21 Su Laus - - manpage: Correct description of file handle/descriptors tif_fd and tif_clientdata. Closes #485. - -2022-11-20 Even Rouault - - Merge branch 'manpage_fix440_fix28_TIFFOpen_SubIFD_update' into 'master' - manpage: fix28, fix440, update TIFFOpen and SubIFD - - Closes #440 et #28 - - See merge request libtiff/libtiff!417 - -2022-11-20 Su Laus - - manpage: fix28, fix440, update TIFFOpen and SubIFD. - -2022-11-17 Even Rouault - - Merge branch 'cmake_tiff_install_warning' into 'master' - CMakeLists.txt: fix warning with -Wdev - - See merge request libtiff/libtiff!416 - -2022-11-13 Even Rouault - - CMakeLists.txt: fix warning with -Wdev. - ``` - CMake Warning (dev) at CMakeLists.txt:62 (option): - Policy CMP0077 is not set: option() honors normal variables. Run "cmake - --help-policy CMP0077" for policy details. Use the cmake_policy command to - set the policy and suppress this warning. - - For compatibility with older versions of CMake, option is clearing the - normal variable 'tiff-install'. - This warning is for project developers. Use -Wno-dev to suppress it. - ``` - -2022-11-12 Even Rouault - - Merge branch 'fix_479' into 'master' - _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on... - - See merge request libtiff/libtiff!412 - -2022-11-12 Even Rouault - - Merge branch 'typo_fix' into 'master' - tif_dirread.c: fix typo in comment - - See merge request libtiff/libtiff!414 - -2022-11-12 Even Rouault - - tif_dirread.c: fix typo in comment. - -2022-11-11 Even Rouault - - _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on broken files (fixes #479) - -2022-11-10 Even Rouault - - Merge branch 'bugfix/tiff2pdf-stdout' into 'master' - tiff2pdf Don't try to seek into stdout. - - See merge request libtiff/libtiff!367 - -2022-11-10 Claus-Justus Heine - - tiff2pdf: Don't try to seek into stdout. - Fixes #441 - -2022-11-08 Even Rouault - - Merge branch 'fix_coverity_1516759' into 'master' - TIFFErrorExtR(): fix Dereference after null check (CID 1516759) - - See merge request libtiff/libtiff!411 - -2022-11-08 Even Rouault - - Merge branch 'fix_ossfuzz_53137' into 'master' - TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB - - See merge request libtiff/libtiff!410 - -2022-11-08 Even Rouault - - TIFFErrorExtR(): fix Dereference after null check (CID 1516759) - -2022-11-08 Even Rouault - - Merge branch 'no_sprintf' into 'master' - Replace sprintf calls with snprintf - - See merge request libtiff/libtiff!408 - -2022-11-08 Mark Mentovai - - Replace sprintf calls with snprintf. - This makes it possible to build libtiff without warnings using the macOS - 13 SDK. Calls to sprintf are replaced with snprintf, passing appropriate - buffer sizes. - - It doesn’t appear that any of the changed uses of sprintf were actually - unsafe, so no behavior change is expected aside from SDK compatibility. - - The macOS 13 SDK deprecates sprintf as it’s difficult to use safely. The - deprecation warning message is visible when building C++, but it is not - normally visible when building plain C code due to a quirk in how - sprintf is declared in the SDK. However, the deprecation message is - visible when building plain C under Address Sanitizer - (-fsanitize=address). This discrepancy was discovered at - https://crbug.com/1381706 and reported to Apple with a copy at - https://openradar.appspot.com/FB11761475. - - The macOS 13 SDK is packaged in Xcode 14.1, released on 2022-11-01. This - also affects the iOS 16 SDK and other 2022-era Apple OS SDKs packaged in - Xcode 14.0, released on 2022-09-12. - - libtiff is visible to the Chromium build via PDFium, and this change is - needed to allow Chromium to move forward to the macOS 13 SDK. - - This change is limited to the libtiff directory. Other uses of sprintf - were found in contrib, test, and tools. - -2022-11-08 Even Rouault - - Merge branch 'reentrant' into 'master' - Add reentrant error functions - - See merge request libtiff/libtiff!409 - -2022-11-08 Even Rouault - - TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 - -2022-11-08 Laramie Leavitt - - Add reentrant error functions. - Prior to this change, libtiff relied on global error handlers, - which is problematic when libtiff used by multiple independent - libraries from within the same process, as they may unwittingly - clobber the error handling, introduce race conditions when setting - handlers, or otherwise have unintended side effects. - - This change adds error handlers to the TIFF struct, which are - used preferentially when available. The error handlers are invoked - when the re-entrant error functions are called: - - void TIFFErrorExtR(TIFF*, const char* module, const char* fmt, ...) - void TIFFWarningExtR(TIFF*, const char* module, const char* fmt, ...) - - The handlers have a similar signature to the existing extended - handlers, additionally returning an int: - - int TIFFErrorHandlerExtR(thandle_t, const char*, const char*, va_list) - - thandle_t is the userdata passed to TIFFOpen - When the handler returns 1, the global handlers are not called. - - Custom error/warning handlers may be installed on a per-file - basis by calling the Set functions: - - TIFF* tif = TIFFOpen(...); - TIFFSetErrorHandlerExtR(tif, MyErrorHandler); - TIFFSetWarningHandlerExtR(tif, MyWarningHandler); - - Additionally, the callsites to TIFFErrorExt and TIFFWarningExt - have been updated to call the reentrant versions. - -2022-11-08 Even Rouault - - Merge branch 'tiffcrop_fix_CoverityScan_tmsize_issue' into 'master' - tiffcrop: should fix some Coverity Scan issues OVERFLOW_BEFORE_WIDEN - - See merge request libtiff/libtiff!403 - -2022-11-08 Su Laus - - tiffcrop: should fix some Coverity Scan issues OVERFLOW_BEFORE_WIDEN. - -2022-11-02 Even Rouault - - Merge branch 'typo_fix' into 'master' - tif_dirread.c: fix typo in comment - - See merge request libtiff/libtiff!407 - -2022-11-02 Even Rouault - - tif_dirread.c: fix typo in comment. - -2022-10-23 Even Rouault - - Merge branch 'tiffcrop_formatting_fix' into 'master' - tiffcrop: add casts in TIFFError() to fix compiler warnings - - See merge request libtiff/libtiff!406 - -2022-10-23 Even Rouault - - Merge branch 'fix_482' into 'master' - CMake: correctly set default value of 'lzma' option when liblzma is detected (fixes #482) - - Closes #482 - - See merge request libtiff/libtiff!404 - -2022-10-23 Even Rouault - - tiffcrop: add casts in TIFFError() to fix compiler warnings. - - CMake: correctly set default value of 'lzma' option when liblzma is detected (fixes #482) - -2022-10-20 Even Rouault - - Merge branch 'fix_480' into 'master' - Fix incorrect printf() formatters introduced in recent commits (fixes #480) - - Closes #480 - - See merge request libtiff/libtiff!401 - -2022-10-19 Even Rouault - - Fix incorrect printf() formatters introduced in recent commits (fixes #480) - -2022-10-13 Even Rouault - - Merge branch 'CLIPPATH_tags_corrected' into 'master' - CLIPPATH tags defined twice but differently and also wrongly (#439) - corrected - - Closes #439 - - See merge request libtiff/libtiff!366 - -2022-10-13 Even Rouault - - Merge branch 'FIELD_IGNORE_warning-messages' into 'master' - Warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (#438) - - Closes #438 - - See merge request libtiff/libtiff!365 - -2022-10-13 Su Laus - - Warning messages for FIELD_IGNORE tags for writing and for TIFF_SETGET_UNDEFINED for reading added. (#438) - -2022-10-13 Even Rouault - - Merge branch 'tag-def_COMPRESSION_corrected' into 'master' - tif_dirinfo.c TIFFTAG_COMPRESSION and _BITSPERSAMPLE definition corrected - - See merge request libtiff/libtiff!364 - -2022-10-13 Even Rouault - - Merge branch 'fix_getopt_included_twice' into 'master' - Fix including module getopt.c twice with CMake and HAVE_GETOPT=false - - See merge request libtiff/libtiff!381 - -2022-10-13 Even Rouault - - Merge branch 'tiffcrop_CoverityScan_fix_PRINTF_ARGS' into 'master' - tiffcrop: fix Coverity Scan issues about PRINTF_ARGS. - - See merge request libtiff/libtiff!400 - -2022-10-13 Su_Laus - - tiffcrop fix Coverity Scan issues about PRINTF_ARGS. - -2022-10-13 Even Rouault - - Merge branch 'tiffcrop_fix_#450_too-many-mode-options' into 'master' - tiffcrop: fix #450 too many 'mode' options on command line. - - Closes #470 et #450 - - See merge request libtiff/libtiff!384 - -2022-10-13 Su Laus - - tiffcrop: fix #450 too many 'mode' options on command line. - -2022-10-13 Even Rouault - - Merge branch 'tiffcrop_fix_#435' into 'master' - tiffcrop subroutines require a larger buffer (fixes #271, #381, #386, #388, #389, #435) - - Closes #465, #464, #435, #389, #388, #386, #381 et #271 - - See merge request libtiff/libtiff!382 - -2022-10-13 Su Laus - - tiffcrop subroutines require a larger buffer (fixes #271, #381, #386, #388, #389, #435) - -2022-10-12 Even Rouault - - Merge branch 'InkNames_NumberOfInks_handling_revised' into 'master' - Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value (fixes #149, #150, #152, #168, #250, #269, #398 and #456) - - Closes #474, #463, #387, #456, #398, #269, #250, #168, #152, #150 et #149 - - See merge request libtiff/libtiff!385 - -2022-10-12 Even Rouault - - Merge branch 'tiffcrop_fix_#411_#413' into 'master' - tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (fixes #411, #413 and #426) - - Closes #426, #413 et #411 - - See merge request libtiff/libtiff!383 - -2022-10-10 Even Rouault - - Merge branch 'TIFFAdvanceDirectory_mapped_uio' into 'master' - TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case - - See merge request libtiff/libtiff!398 - -2022-10-10 Even Rouault - - TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52309 - -2022-10-08 Even Rouault - - Merge branch 'tiffinfo_parse_SubIFDs' into 'master' - tiffinfo: Updated to parse through SubIFDs and show their tags. - - See merge request libtiff/libtiff!396 - -2022-10-08 Su Laus - - tiffinfo: Updated to parse through SubIFDs and show their tags. - -2022-10-07 Roger Leigh - - Merge branch 'master' into 'master' - Moved linking of CMath::CMath into CMath_LIBRARY check - - See merge request libtiff/libtiff!397 - -2022-10-07 Frei Herr - - Moved linking of CMath::CMath into CMath_LIBRARY check. - -2022-10-06 Even Rouault - - Merge branch 'rational_precision2double_coverity-fix' into 'master' - rational_precision2double.c: Fix issue from Coverity Scan. - - See merge request libtiff/libtiff!395 - -2022-10-06 Su_Laus - - rational_precision2double.c: Fix issue from Coverity Scan. - - Fix including module getopt.c twice with CMake and HAVE_GETOPT=false. - The "make-files" for the tools- and test- programmes include the module getopt.c once directly as additional source and then again by including port.lib. - This can be avoided by including getopt.c as source in port.lib within port\CMakeLists.txt not with PUBLIC but with PRIVATE. - -2022-10-06 Even Rouault - - Merge branch 'fix-455_Improved-IFD-loop-handling' into 'master' - Improved IFD-Loop Handling (fixes #455) - - Closes #455 - - See merge request libtiff/libtiff!386 - -2022-10-06 Su Laus - - Improved IFD-Loop Handling (fixes #455) - IFD infinite looping was not fixed by MR 20 (see #455). - An improved IFD loop handling is proposed. - - Basic approach: - - - The order in the entire chain must be checked, and not only whether an offset has already been read once. - - To do this, pairs of directory number and offset are stored and checked. - - The offset of a directory number can change. - - TIFFAdvanceDirectory() must also perform an IFD loop check. - - TIFFCheckDirOffset() is replaced by _TIFFCheckDirNumberAndOffset(). - - Rules for the check: - - - If an offset is already in the list, it must have the same IFD number. Otherwise it is an IDF loop. - - If the offset is not in the list and the IFD number is greater than there are list entries, a new list entry is added. - - Otherwise, the offset of the IFD number is updated. - - Reference is also made to old bugzilla bug 2772 and MR 20, which did not solve the general issue. - This MR closes #455 - -2022-10-05 Roger Leigh - - Merge branch 'fix-cmake-subproject' into 'master' - Fix CMake build to be compatible with FetchContent - - See merge request libtiff/libtiff!394 - -2022-10-04 Timothy Lyanguzov - - Apply 9 suggestion(s) to 3 file(s) - -2022-10-04 Jeremy Maitin-Shepard - - Fix CMake build to be compatible with FetchContent. - Recent versions of CMake have improved support for including - dependencies, using the FetchContent module, which allows a dependency - to be imported as a subproject and then later found automatically by - calls to `find_package`. - - This change makes libtiff's CMake better behaved when used as a - sub-project: - - - CMake has a single global namespace for all target names in all - sub-projects. This commit renames the following CMake targets: - - - port -> tiff_port - - mkg3states -> tiff_mkg3states - - faxtable -> tiff_faxtable - - release -> tiff_release - - - When building TIFF as a sub-project, it is not normally useful to - create install rules for its targets. This commit adds a - `tiff-install` option that controls whether the install rules are - added and defaults to OFF when libtiff is included as a sub-project. - - - Previously, libtiff set `BUILD_SHARED_LIBS` to ON by default. With - this commit, that default is only set if libtiff is the top-level - project. - - - When using `find_package(TIFF)`, the targets `TIFF::TIFF` and - `TIFF::CXX` are defined. This commit makes libtiff itself define - those targets as aliases, to allow other cmake projects to use - either `find_package` or `FetchContent` interchangeably. - - - Adds ZSTD_HAVE_DECOMPRESS_STREAM variable which may be set to bypass - `check_symbol_exists` call. Fixes - https://gitlab.com/libtiff/libtiff/-/issues/472. - -2022-09-27 Even Rouault - - Merge branch 'getimage_overflow' into 'master' - Update getimage to support reading large raster images - - See merge request libtiff/libtiff!389 - -2022-09-26 Even Rouault - - Merge branch 'MinGW-warnings_ipctutil' into 'master' - Fix #458: MinGW Windows 64: warning because 'long' is a 32 bits type in... - - Closes #458 - - See merge request libtiff/libtiff!391 - -2022-09-26 Su Laus - - Fix #458: MinGW Windows 64: warning because 'long' is a 32 bits type in... - -2022-09-16 Eric Siegel - - Update getimage to support large raster images. - -2022-09-08 Even Rouault - - Merge branch 'typo_fix' into 'master' - tif_lzw.c: fix typo in code comment - - See merge request libtiff/libtiff!387 - -2022-09-08 Even Rouault - - tif_lzw.c: fix typo in code comment. - -2022-08-30 Su_Laus - - Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value - In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - - Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - - Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - - This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - - This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - - It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. - -2022-08-25 Su_Laus - - tiffcrop: disable incompatibility of -Z, -X, -Y, -z options with any PAGE_MODE_x option (fixes #411 and #413) - tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - - Code analysis: - - With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. - In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - - Execution of the else-clause often leads to buffer-overflows. - - Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - - The MR solves issues #411 and #413. - -2022-08-21 Even Rouault - - Merge branch 'tiffcrop_S-option_mutually_exclusive' into 'master' - tiffcrop: -S option mutually exclusive (fixes #349, #414, #422, #423, #424) - - Closes #424, #423, #422, #414 et #349 - - See merge request libtiff/libtiff!378 - -2022-08-20 Su_Laus - - tiffcrop -S option: Make decision simpler. - -2022-08-20 Even Rouault - - Merge branch 'remove_death_commented_code' into 'master' - Remove dead code from tif_dirread.c, tif_dirwrite.c and tif_getimage.c - - See merge request libtiff/libtiff!380 - -2022-08-20 Su Laus - - Remove dead code from tif_dirread.c, tif_dirwrite.c and tif_getimage.c. - -2022-08-16 Even Rouault - - Merge branch 'coverity_fixes' into 'master' - Silence Coverity Scan false positive warnings about out-of-bounds access - - See merge request libtiff/libtiff!379 - -2022-08-16 Even Rouault - - tif_zip.c: silence Coverity Scan false positive warnings about out-of-bounds access (CID 1491190, 1491197, 1491201) - - tif_dirread.c: silence Coverity Scan false positive warnings about out-of-bounds access (CID 1491182, 1491186) - -2022-08-16 Even Rouault - - Merge branch 'default_tag_values_extended' into 'master' - Presetting of default tag values extended (e.g. PlanarConfig). (fixes #449) - - Closes #449 - - See merge request libtiff/libtiff!377 - -2022-08-16 Su Laus - - Presetting of default tag values extended (e.g. PlanarConfig). (fixes #449) - -2022-08-15 Su_Laus - - According to Richard Nolde https://gitlab.com/libtiff/libtiff/-/issues/401#note_877637400 the tiffcrop option „-S“ is also mutually exclusive to the other crop options (-X|-Y), -Z and -z. - This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - - This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 - -2022-08-09 Even Rouault - - Merge branch 'warning_fix' into 'master' - Fix warning about shadowing - - See merge request libtiff/libtiff!376 - -2022-08-09 Even Rouault - - Fix warning about shadowing. - -2022-08-09 Even Rouault - - Merge branch 'fix_225' into 'master' - Deal with RichTIFFIPTC tag written with LONG type (fixes #225) - - Closes #225 - - See merge request libtiff/libtiff!374 - -2022-08-09 Even Rouault - - Merge branch 'Writing_IFD8_to_ClassicTIFF_bugfix' into 'master' - Correcting defects reported by Coverity Scan for MR !369 - - See merge request libtiff/libtiff!375 - -2022-08-09 Su Laus - - Correcting defects reported by Coverity Scan for MR !369. - -2022-08-09 Even Rouault - - Merge branch 'fix_442_Writing_IFD8_to_ClassicTIFF' into 'master' - TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (fixes #442) - - Closes #442 - - See merge request libtiff/libtiff!369 - -2022-08-09 Su Laus - - TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected (fixes #442) - -2022-08-09 Even Rouault - - Deal with RichTIFFIPTC tag written with LONG type (fixes #225) - -2022-08-07 Roger Leigh - - Merge branch 'manpage-functions-added' into 'master' - doc: Missing public functions added to TIFF documentation in Sphinx - - See merge request libtiff/libtiff!372 - -2022-08-07 Su Laus - - doc: Missing public functions added to TIFF documentation in Sphinx. - -2022-07-29 Even Rouault - - Merge branch 'tifjpeg_version_check' into 'master' - tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional... - - See merge request libtiff/libtiff!373 - -2022-07-29 Even Rouault - - tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional compile-time version check - -2022-07-21 Even Rouault - - Merge branch 'TIFFReadFromUserBuffer_fix' into 'master' - TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could... - - See merge request libtiff/libtiff!371 - -2022-07-21 Even Rouault - - TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could cause issues with reading JPEG compressed files - -2022-07-21 Roger Leigh - - Merge branch 'vs2022-fixes' into 'master' - cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS - - Closes #443 - - See merge request libtiff/libtiff!370 - -2022-07-13 Roger Leigh - - cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS. - -2022-07-13 Even Rouault - - Merge branch 'vs2022-fixes' into 'master' - cmake: Fixes for Visual Studio 2022 - - See merge request libtiff/libtiff!368 - -2022-07-13 Roger Leigh - - cmake: Fixes for Visual Studio 2022. - -2022-07-03 Roger Leigh - - Merge branch 'elf-symbol-export' into 'master' - Explicit export of versioned ELF symbols - - Closes #437 - - See merge request libtiff/libtiff!361 - -2022-07-03 Even Rouault - - Merge branch 'fix_433' into 'master' - _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific... - - Closes #433 - - See merge request libtiff/libtiff!363 - -2022-07-01 Su_Laus - - CLIPPATH tags defined twice but differently and also wrongly. - In tif_dirinfo.c the tags for clippath are wrongly defined and the tag TIFFTAG_XCLIPPATHUNITS is even different twice. Therefore, those tags cannot be written / read correctly and may even lead to buffer overflow. - E.g.: In the case of TIFFSetField(YCLIPPATHUNITS), a 1 byte storage space is allocated because of TIFF_SETGET_UNDEFINED, in which an int32_t value should be stored because of TIFF_SLONG type definition. Then, an int32_t value is read from that 1 byte storage location. - - The current definition is: - - { TIFFTAG_CLIPPATH, -1, -3, TIFF_BYTE, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ClipPath", NULL }, - { TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_SLONG, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL }, - { TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_SBYTE, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL }, - { TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_SLONG, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL }, - - Whereas the correct definition according to TIFF Specification Supplement 1 (https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf) should be: - - { TIFFTAG_CLIPPATH, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ClipPath", NULL }, - { TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL }, - { TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL }, - - Also the set_get_field of the following tag should be corrected from - - { TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL }, - to - { TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL }, - - However, if those tags should not be handled by LibTiff because they are deemed as abandoned or unwanted tags, those tags need to be defined with FIELD_IGNORE instead of FIELD_CUSTOM and keeping set_field_type = TIFF_SETGET_UNDEFINED - -2022-07-01 Su_Laus - - In tif_dirinfo.c the definition for TIFFTAG_COMPRESSION has different settings of field_readcount=TIFF_VARIABLE (-1) and field_writecount=1. The tag is defined with Count=1, thus field_readcount is wrong and should also be 1. Although TIFFTAG_BITSPERSAMPLE is defined with Count:N=SamplesPerPixel, only ONE uint16_t value is passed with TIFFSetField() and TIFFGetField(). However, an array with N=SamplesPerPixel equal values is written into the TIFF file. Shouldn't field_readcount = field_writecount = 1 then? The behaviour of TiffLib does not change, because the handling is coded directly. - -2022-06-27 Even Rouault - - _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific tag and the codec is not configured (fixes #433) - This avoids crashes when querying such tags - -2022-06-27 Even Rouault - - Merge branch '16bit_cielab' into 'master' - add basic 16bit-cielab support - - See merge request libtiff/libtiff!336 - -2022-06-27 Caolán McNamara - - Add basic 16bit-cielab support. - just a copy of putcontig8bitCIELab that reads 16bit vals but divide l by - 257, a and b by 256 before passing to TIFFCIELabToXYZ - - motivation: https://bugs.documentfoundation.org/show_bug.cgi?id=131199 - the "clavijo16bitlab.tiff" example where tiffinfo says: - ``` - Image Width: 2601 Image Length: 3503 - Resolution: 96, 96 pixels/inch - Bits/Sample: 16 - Compression Scheme: AdobeDeflate - Photometric Interpretation: CIE L*a*b* - Orientation: row 0 top, col 0 lhs - Samples/Pixel: 3 - Rows/Strip: 1 - Planar Configuration: single image plane - DateTime: 2020:03:07 10:20:42 - ``` - -2022-06-24 Roger Leigh - - Merge branch 'manpage-fixes' into 'master' - Sphinx documentation fixes - - See merge request libtiff/libtiff!362 - -2022-06-24 Roger Leigh - - doc: Correct types and cross-references. - - doc: Correct manual page path. - - build: Make rational2double static only for automake. - This copies the same logic as used by CMake. - - build: Update autoconf version to 4.5.0 and soname to 6.0.0. - - build: Update autoconf ld-version-script default. - - libtiff: Correct version script for changes since v4.4.0. - - libtiff: Update version script documentation. - - libtiff: Add symbol versioning of all exported symbols. - -2022-06-24 Even Rouault - - Merge branch 'webp_mem_improvements' into 'master' - WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding - - See merge request libtiff/libtiff!360 - -2022-06-24 Roger Leigh - - build: Enable symbol versioning by default. - -2022-06-24 Roger Leigh - - Merge branch 'sphinx-manpages' into 'master' - doc: Add Sphinx conversion of all manpages - - Closes #361 - - See merge request libtiff/libtiff!356 - -2022-06-24 Roger Leigh - - Merge branch 'remove-wince' into 'master' - Remove obsolete WinCE source file - - See merge request libtiff/libtiff!357 - -2022-06-23 Even Rouault - - WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding - -2022-06-22 Even Rouault - - Merge branch 'horAcc8_fix' into 'master' - tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2 - - See merge request libtiff/libtiff!359 - -2022-06-22 Even Rouault - - tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2. - For a reason I don't understand, recent ICC generates wrong code in -O2 - mode for the stride = 3 and 4 cases. The modified code is more - straightforward, so go for it. - -2022-06-19 Roger Leigh - - Merge branch 'ci-restore-old' into 'master' - ci: Restore testing with Ubuntu 20.04 - - See merge request libtiff/libtiff!358 - -2022-06-19 Roger Leigh - - ci: Restore testing with Ubuntu 20.04. - - Remove obsolete WinCE source file. - - doc: Add missing punctuation. - - doc: Remove semicolon from c:function definition. - - doc: Remove remaining HTML entities. - - doc: Improve the build page. - -2022-06-18 Roger Leigh - - doc: Add Sphinx conversion of all manpages. - -2022-06-18 Roger Leigh - - Merge branch 'dist-html' into 'master' - build: Distribute and install HTML documentation - - See merge request libtiff/libtiff!352 - -2022-06-13 Even Rouault - - Merge branch 'pkgconfig' into 'master' - Adding Requires.private generation - - See merge request libtiff/libtiff!355 - -2022-06-13 Yishen Miao - - Adding Requires.private generation. - Adds Requires.private generation so that pkg-config can correctly find - the dependencies of libtiff. - -2022-06-11 Roger Leigh - - Merge branch 'ci-dist' into 'master' - ci: Archive distribution tar and zip files - - See merge request libtiff/libtiff!354 - -2022-06-11 Roger Leigh - - ci: Archive distribution tar and zip files. - -2022-06-11 Even Rouault - - Merge branch 'export_TIFFClampDoubleToUInt32' into 'master' - libtiff.def: export _TIFFClampDoubleToUInt32 - - See merge request libtiff/libtiff!353 - -2022-06-11 Even Rouault - - libtiff.def: export _TIFFClampDoubleToUInt32. - -2022-06-11 Even Rouault - - Merge branch 'issue-415+427+428' into 'master' - fix the FPE in tiffcrop (#415, #427, and #428) - - Closes #428, #427 et #415 - - See merge request libtiff/libtiff!346 - -2022-06-11 4ugustus - - fix the FPE in tiffcrop (#415, #427, and #428) - -2022-06-11 Roger Leigh - - build: Distribute and install HTML documentation. - -2022-06-10 Even Rouault - - Merge branch 'tif_jpeg_warning_fix' into 'master' - tif_jpeg.c: fix error message - - See merge request libtiff/libtiff!351 - -2022-06-10 Even Rouault - - tif_jpeg.c: fix error message. - -2022-06-10 Roger Leigh - - Merge branch 'android_libm' into 'master' - Fix dependency on libm on Android - - See merge request libtiff/libtiff!350 - -2022-06-09 Matthias Kuhn - - Always link to libm if available. - -2022-06-05 Roger Leigh - - Merge branch 'vasyl5-master-patch-97651' into 'master' - libtoolize: command not found on macOS. - - See merge request libtiff/libtiff!289 - -2022-06-05 Roger Leigh - - Merge branch 'rst-docs' into 'master' - Convert HTML documentation to Sphinx RST - - See merge request libtiff/libtiff!349 - -2022-06-05 Roger Leigh - - Merge remote-tracking branch 'origin/master' into rst-docs. - -2022-06-05 Roger Leigh - - Merge branch 'cmake-xc-faxtable' into 'master' - cmake: Do not build faxtable target when cross-compiling - - See merge request libtiff/libtiff!342 - -2022-06-05 Roger Leigh - - Merge branch 'cmake-disable-options' into 'master' - Add options for disabling tools, tests, contrib and docs - - See merge request libtiff/libtiff!343 - -2022-06-05 Roger Leigh - - Merge branch 'cmake-msvc-options' into 'master' - cmake: Add MSVC options when building all libraries and executables - - See merge request libtiff/libtiff!344 - -2022-06-05 Roger Leigh - - Merge branch 'cmake-win32-libtiffxx-static' into 'master' - cmake: libtiffxx is static on win32 - - See merge request libtiff/libtiff!338 - -2022-06-05 Roger Leigh - - Merge branch 'licence-file' into 'master' - Rename COPYRIGHT to LICENSE.md - - See merge request libtiff/libtiff!345 - -2022-06-05 Roger Leigh - - Rename COPYRIGHT to LICENSE.md. - - doc: Fix make distcheck. - - doc: Update automake configuration. - - doc: Do not pass srcdir and builddir to sphinx-build. - - doc: Additional top-level tidying. - - doc: Tidy top-level index. - - doc: Move bugs to project. - - doc: Move misc to project. - - doc: Move all BigTIFF documentation into specification directory. - * Remove the BigTIFF proposal since this has long been completed - * Update the BigTIFF PR to note completion of the work and replace - present with past tense. - - doc: Split release history. - This permits the newer releases to be included in the top-level - toctree without polluting it with dozens of old releases. - - doc: Correct accents. - - doc: BigTIFF design markup improvements. - - Add doc/_static. - - doc: Move TIFF specification and design notes into subdirectory. - - doc: Move releases into subdirectory. - - doc: Mark up TIFF tech note 2. - - doc: Use sphinxdox theme. - The sphix_rtd_theme formats complex tables badly. - - doc: Clean up HTML tags. - -2022-06-04 Roger Leigh - - ci: Install Sphinx manual for use by GitLab pages. - - doc: Use sphinx_rtd_theme. - - Convert HTML documentation to Sphinx RST. - * Add CMake build logic - * Add Autotools build logic - * Move from html/ to doc/ - * Manual pages are still generated HTML for the time being - - git: Ignore common IDE build files. - -2022-06-04 Roger Leigh - - Merge branch 'ci-ubuntu-22.04' into 'master' - ci: Update to use Ubuntu 22.04 CI images - - Closes #429 - - See merge request libtiff/libtiff!348 - -2022-06-04 Roger Leigh - - Merge branch 'opengl-option' into 'master' - cmake: Add tiff-opengl option - - See merge request libtiff/libtiff!340 - -2022-06-04 Roger Leigh - - tiffdump: Avoid overflow warning when reading. - - ci: Update to use Ubuntu 22.04 CI images. - -2022-06-04 Even Rouault - - Merge branch 'master' into 'master' - Include stdlib.h in tif_lzw.c. - - See merge request libtiff/libtiff!347 - -2022-06-04 Brian Ledger - - Merge branch 'master' of https://gitlab.com/libtiff/libtiff. - -2022-06-04 Brian Ledger - - Include stdlib.h in tif_lzw.c. - In `tif_lzw.c`, a call is made to `_byteswap_uint64`. This is declared in `stdlib.h`. `stdlib.h` is not included in `tib_lzw.c`, so a name error may occur. - - This change adds `#include stdlib.h` to `tif_lzw.c`, to prevent a name error from occurring when `stdlib.h` is not included. - -2022-05-29 Roger Leigh - - Add options for disabling tools, tests, contrib and docs. - - cmake: Add MSVC options when building all libraries and executables. - - cmake: Do not build faxtable target when cross-compiling. - - cmake: Use add_compile_definitions and add_compile_options. - It seems that some CMake versions can't export targets using PRIVATE - linking, even though the private target is never used. - - Merge remote-tracking branch 'origin/master' into cmake-msvc-options. - - Merge remote-tracking branch 'origin/master' into cmake-win32-libtiffxx-static - -2022-05-29 Roger Leigh - - Merge branch 'ci-x64' into 'master' - ci: Remove arm64 temporarily - - See merge request libtiff/libtiff!341 - -2022-05-29 Roger Leigh - - ci: Remove arm64 temporarily. - - autoconf: Add --disable-opengl option. - - cmake: Add tiff-opengl option. - - cmake: Add MSVC options when building all libraries and executables. - - cmake: libtiffxx is static on win32. - -2022-05-22 Even Rouault - - html/Makefile.am: add v4.4.0.html to docfiles. - -2022-05-20 Even Rouault - - Update HOWTO-RELEASE with .tar.xz. - - Prepare for release 4.4.0. - -2022-05-16 Even Rouault - - libtiff v4.4.0 released - -2022-05-16 Even Rouault - - Merge branch 'pkgconf_abs_path' into 'master' - Handle absolute paths in pkg-config file - - See merge request libtiff/libtiff!333 - -2022-05-16 Miloš Komarčević - - Handle absolute paths in pkg-config file. - -2022-05-15 Even Rouault - - Merge branch 'fix-tests-with-ro-source-dir' into 'master' - cmake: allow running the tests with a read-only source directory - - See merge request libtiff/libtiff!332 - -2022-05-15 Alex Richardson - - cmake: allow running the tests with a read-only source directory. - Prior to this commit CTest would invoke all simple_tests tests with the - current working directory set to the source directory. However, some of - the tests (e.g. rewrite) will output files to the current working - directory and will therefore fail when run with a read-only source - directory. This can happen e.g. when testing a cross-compiled version of - libtiff where the sources are mounted read-only in the virtual machine. - - Simply changing the working directory to CMAKE_CURRENT_BINARY_DIR allows - all but raw_decode to pass. The raw_decode test looks for files in the - source directory, and uses the `srcdir` environment variable to find, so - we also have to add a set_tests_properties() call to specify that env var. - -2022-05-14 Even Rouault - - Merge branch 'tiffcrop_pipeline_error' into 'master' - tiffcrop: Fixes complain of pipeline "cmake-ninja-arm64" about abs() on... - - See merge request libtiff/libtiff!331 - -2022-05-14 Su Laus - - tiffcrop: Fixes complain of pipeline "cmake-ninja-arm64" about abs() on... - -2022-05-14 Even Rouault - - Merge branch 'TIFFField_SetGetSize_CountSize' into 'master' - Public functions TIFFFieldSetGetSize() and TIFFieldSetGetCountSize() added. - - See merge request libtiff/libtiff!284 - -2022-05-14 Su Laus - - Public functions TIFFFieldSetGetSize() and TIFFieldSetGetCountSize() added. - -2022-05-13 Even Rouault - - Merge branch 'jondo-master-patch-87274' into 'master' - Replace add_compile_definitions for CMake versions before 3.12 (#238) - - See merge request libtiff/libtiff!330 - -2022-05-13 Robert Pollak - - Replace add_compile_definitions for CMake versions before 3.12 (#238) - -2022-05-13 Even Rouault - - Merge branch 'master' into 'master' - Remove incorrect assert. - - See merge request libtiff/libtiff!329 - -2022-05-13 Ben Laurie - - Remove incorrect assert. - -2022-05-10 Even Rouault - - Merge branch 'Fix_Issue#330' into 'master' - tiffcrop: Fix issue #330 and some more from 320 to 349 - - Closes #330 - - See merge request libtiff/libtiff!298 - -2022-05-10 Su Laus - - tiffcrop: Fix issue #330 and some more from 320 to 349. - -2022-05-10 Even Rouault - - test_signed_tags.c: fix CID 1504376. - -2022-05-10 Even Rouault - - Merge branch 'fix_#29_tiffcp_orientationTag' into 'master' - tiffcp: Fix incomprehensible setting of orientation tag (fixes #29) - - Closes #29 - - See merge request libtiff/libtiff!327 - -2022-05-10 Even Rouault - - Merge branch 'palette-8bit' into 'master' - tiff2pdf: handle 8-bit palette colormap - - See merge request libtiff/libtiff!328 - -2022-05-09 Jay Berkenbilt - - tiff2pdf: handle 8-bit palette colormap. - If all the colors in a palette are in the range [0, 255], treat the - palette as an 8-bit colormap. This workaround already exists elsewhere - in the software including in tiff2ps. - -2022-05-08 Even Rouault - - Merge branch 'fix_#40_ReadSignedTags' into 'master' - Reading of signed tags added (fixes #40) - - Closes #40 - - See merge request libtiff/libtiff!326 - -2022-05-08 Su Laus - - Reading of signed tags added (fixes #40) - -2022-05-08 Even Rouault - - Fix typos in comments. - -2022-05-08 Even Rouault - - Merge branch 'fix_400' into 'master' - tiffcp: avoid buffer overflow in "mode" string (fixes #400) - - Closes #400 - - See merge request libtiff/libtiff!323 - -2022-05-08 Even Rouault - - Merge branch 'CheckForBigTiff' into 'master' - TIFFIsBigTiff() function added. - - See merge request libtiff/libtiff!325 - -2022-05-08 Su Laus - - TIFFIsBigTiff() function added. - -2022-05-01 Su_Laus - - tiffcp: Fix incomprehensible setting of orientation tag (fixes #29) - -2022-04-23 Even Rouault - - Merge branch 'fix_#8_FreeAnonTag' into 'master' - extra flag for anonymous (unknown) tags (fixes #8) - - Closes #400 et #8 - - See merge request libtiff/libtiff!324 - -2022-04-22 Even Rouault - - tif_lzw.c: fix potential out-of-bounds error when trying to read in the same tile/strip after an error has occurred (fixes #410) - -2022-04-06 Su_Laus - - extra flag for anonymous (unknown) tags (fixes #8) - -2022-04-02 Su_Laus - - tiffcp: avoid buffer overflow in "mode" string (fixes #400) - -2022-03-21 Even Rouault - - avoid hang in TIFFRewriteDirectory() if a classic file > 4 GB is attempted to be created - Fixes https://github.com/OSGeo/gdal/issues/5479 - -2022-03-19 Even Rouault - - Merge branch 'Correct_tag_auto-registration_description' into 'master' - Correct reading description for anonymous tag auto-registration in addingtags.html (closes 353) - - Closes #353 - - See merge request libtiff/libtiff!320 - -2022-03-19 Su Laus - - Correct reading description for anonymous tag auto-registration in addingtags.html (closes 353) - -2022-03-18 Even Rouault - - tif_lzw.c: avoid harmless unsigned-integer-overflow (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45741) - -2022-03-17 Even Rouault - - Merge branch 'fix_396' into 'master' - tiffcp: do not try to fetch compressor-specific tags when not appropriate (fixes #396) - - Closes #396 - - See merge request libtiff/libtiff!316 - -2022-03-17 Even Rouault - - Merge branch 'Fix_cmake_warnings' into 'master' - Fix some CMake warnings - - See merge request libtiff/libtiff!319 - -2022-03-17 Su Laus - - Fix some CMake warnings. - -2022-03-17 Even Rouault - - Merge branch 'lzw_decode_improvements' into 'master' - LZWDecode(): major speed improvements - - See merge request libtiff/libtiff!318 - -2022-03-16 Even Rouault - - LZWDecode(): major speed improvements. - This mostly comes from dealing specifically with codes that expand to - 2, 3 and 4 bytes or more to avoid branches, and dealing with longer - repeated sequences (e.g. lots of bytes to 0). - - With the following bench.c, execution time is 32% faster on a 8000x8000 - 4 bands uint16 predictor=2 image that has a 1.6x compression ratio. with - gcc 9.4.0, on x86_64 - - bench.c: - ``` - #include "tiffio.h" - #include - #include - - int main(int argc, char* argv[]) - { - if( argc != 2 ) - { - fprintf(stderr, "Usage: ./bench my.tif\n"); - exit(1); - } - TIFF* tif = TIFFOpen(argv[1], "r"); - if( tif == NULL ) - { - fprintf(stderr, "Cannot open %s\n", argv[1]); - exit(1); - } - if( !TIFFIsTiled(tif) ) - { - fprintf(stderr, "Only tiled image supported\n"); - exit(1); - } - int tilesize = (int)TIFFTileSize(tif); - char* c = malloc(tilesize); - if( c == NULL ) - { - fprintf(stderr, "Out of memory\n"); - exit(1); - } - const uint32_t numtiles = TIFFNumberOfTiles(tif); - //int numloops = 4 * (int)(1e9 / ((double)tilesize * numtiles)); - //printf("Number of loops: %d\n", numloops); - int numloops = 1; - for(int i =0; i< numloops; i++) - { - for(uint32_t tileindex = 0; tileindex < numtiles; tileindex++ ) - { - TIFFReadEncodedTile(tif, tileindex, c, tilesize); - } - } - free(c); - TIFFClose(tif); - return 0; - } - ``` - -2022-03-16 Even Rouault - - LZWDecode(): modest speed improvement: fetch input data by chunks of the largest natural integer of the architecture - -2022-03-14 Even Rouault - - Merge branch 'kmilos-master-patch-45885' into 'master' - Correct fix for the pkgconf file relative paths - - See merge request libtiff/libtiff!317 - -2022-03-10 Even Rouault - - tif_lzw.c: make LZW_CHECKEOS non-optional. - - tiffsplit.c: fix compiler warning on 32-bit. - -2022-03-10 Miloš Komarčević - - Correct fix for the pkgconf file relative paths. - -2022-03-10 Even Rouault - - Merge branch 'issue-278' into 'master' - fix heap buffer overflow in tiffcp (#278) - - Closes #278 - - See merge request libtiff/libtiff!311 - -2022-03-10 4ugustus - - fix heap buffer overflow in tiffcp (#278) - -2022-03-09 Even Rouault - - tiffcp: do not try to fetch compressor-specific tags when not appropriate (fixes #396) - -2022-03-09 Even Rouault - - Merge branch 'i_am_a_unsympathetic_person' into 'master' - index.html: make it clear that I'm a unsympathetic person - - See merge request libtiff/libtiff!315 - -2022-03-09 Even Rouault - - index.html: make it clear that I'm a unsympathetic person. - -2022-03-08 Even Rouault - - Merge branch 'Fix_Issue#395' into 'master' - tiffcrop: fix issue #395: generation of strange section images. - - Closes #395 - - See merge request libtiff/libtiff!312 - -2022-03-08 Su Laus - - tiffcrop: fix issue #395: generation of strange section images. - -2022-03-08 Even Rouault - - Merge branch 'Fix_Issue#380' into 'master' - tiffcrop: fix issue #380 and #382 heap buffer overflow in extractImageSection - - Closes #382 et #380 - - See merge request libtiff/libtiff!307 - -2022-03-08 Su Laus - - tiffcrop: fix issue #380 and #382 heap buffer overflow in extractImageSection - -2022-03-08 Even Rouault - - Merge branch 'issue-392' into 'master' - add checks for return value of limitMalloc (#392) - - Closes #392 - - See merge request libtiff/libtiff!314 - -2022-03-08 Even Rouault - - Merge branch 'issue-393' into 'master' - fix the FPE in tiffcrop (#393) - - Closes #393 - - See merge request libtiff/libtiff!310 - -2022-03-08 4ugustus - - fix the FPE in tiffcrop (#393) - -2022-03-08 Even Rouault - - Merge branch 'kmilos-master-patch-56785' into 'master' - Fix pkgconf file relative paths - - Closes #394 - - See merge request libtiff/libtiff!309 - -2022-03-07 Augustus - - add checks for return value of limitMalloc (#392) - -2022-03-02 Miloš Komarčević - - Fix pkgconf file relative paths. - -2022-02-25 Even Rouault - - Merge branch 'fix_385' into 'master' - tif_jbig.c: fix crash when reading a file with multiple IFD in memory-mapped... - - Closes #385 - - See merge request libtiff/libtiff!306 - -2022-02-24 Even Rouault - - tif_jbig.c: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes #385) - -2022-02-24 Even Rouault - - Merge branch 'string_size_limit' into 'master' - _TIFFVSetField(): when passing a string without explicit length, check that... - - See merge request libtiff/libtiff!304 - -2022-02-24 Even Rouault - - Merge branch 'TIFFClientOpen_cleanup' into 'master' - TIFFClientOpen(): remove useless initializations of tif_rawcc and tif_flags... - - See merge request libtiff/libtiff!303 - -2022-02-20 Even Rouault - - Remove extra word in comment. - - TIFFPrintDirectory(): avoid potential multi-threading issue when reading the DotRange tag - The severity of the issue would be low (mix of values displayed) and the - time window where that would occur would be short. - - Constify signature of _TIFFsetXXXXArray() functions, and remove unused _TIFFsetString() - - _TIFFVSetField(): when passing a string without explicit length, check that the length doesn't except the 1 << 31 maximum bytes we support - -2022-02-19 Even Rouault - - tiffsplit.c: fix use after free introduced in master per commit 8ed97f401552a2b4300d3c489b03dcada86a21fd (related to #290) - -2022-02-19 Even Rouault - - Merge branch 'Fix_Issue#284' into 'master' - tiff2ps: In limitMalloc() check for negative size (fixes #284) - - Closes #284 - - See merge request libtiff/libtiff!300 - -2022-02-19 Su Laus - - tiff2ps: In limitMalloc() check for negative size (fixes #284) - -2022-02-19 Even Rouault - - Merge branch 'fix_288' into 'master' - tiffinfo: limit more memory allocations using -M switch (fixes #288) - - Closes #288 - - See merge request libtiff/libtiff!299 - -2022-02-19 Even Rouault - - Merge branch 'Fix_Issue#290' into 'master' - tiffsplit: limitMalloc() and getopt() introduced and more error messages. (fixes #290) - - Closes #290 - - See merge request libtiff/libtiff!301 - -2022-02-19 Su Laus - - tiffsplit: limitMalloc() and getopt() introduced and more error messages. (fixes #290) - -2022-02-19 Even Rouault - - Merge branch 'Fix_Issue#273_#275' into 'master' - tiffcrop: buffsize check formula in loadImage() amended (fixes #273,#275) - - Closes #275 et #273 - - See merge request libtiff/libtiff!302 - -2022-02-19 Su Laus - - tiffcrop: buffsize check formula in loadImage() amended (fixes #273,#275) - -2022-02-19 Even Rouault - - TIFFClientOpen(): remove useless initializations of tif_rawcc and tif_flags after TIFFReadDirectory() - Those initializations date back to the initial commit of libtiff, but I - strongly suspect there are no longer needed those days. - Setting tif_rawcc to (tmsize_t)-1 is weird. AFAICS, nowhere else in the library - -1 is used as a special markeri for that field. Immediately after TIFFReadDirectory() - returns it is set to 0, and this is the value used in tif_read.c/tif_write.c to - reset it. - And setting the TIFF_BUFFERSETUP bit of tif_flags is even more - suspicious as the only place where it is set otherwise is in - TIFFWriteBufferSetup(). I suspect this bogus setting of the flag was the - reason for commit dbf2339a1 where BUFFERCHECK() in addition to checking - the bit also checked the tif_rawdata against nullptr. - - If setting those 2 fields was needed, it would mean that TIFFClientOpen() with the - 'h' hint to disable automatic TIFFReadDirectory() would be broken, - because someone issuing a manual TIFFReadDirectory() couldn't set them, - as being private members. - - The libtiff test suite is happy with that change, and the GDAL one too. - -2022-02-19 Even Rouault - - TIFFFetchNormalTag(): speed optimization when reading a (very large) nul-terminated ASCII tag - - TIFFWriteDirectoryTagData(): turn assertion on data length into a runtime check - For example, the assertion could actually be triggered when writing an - ASCII tag with more than 1 << 31 bytes. - -2022-02-17 Even Rouault - - TIFFFetchNormalTag(): avoid calling memcpy() with a null source pointer and size of zero (fixes #383) - -2022-02-15 Roger Leigh - - Merge branch 'tl/fix-cpack' into 'master' - Fix packaging with CPack - - See merge request libtiff/libtiff!292 - -2022-02-11 Even Rouault - - tiffinfo: limit more memory allocations using -M switch (fixes #288) - - tif_dirwrite.c: take into account COMPRESSION_JXL. - -2022-02-11 Even Rouault - - Merge branch 'predictor_2_64bit' into 'master' - Predictor 2 (horizontal differentiation): support 64-bit - - See merge request libtiff/libtiff!296 - -2022-02-10 Even Rouault - - Merge branch 'Fix_Issue#365' into 'master' - tiff2pdf: Fixes issues #365, #258 and #257 related to initializing 't2p->pdf_compressionquality'. - - Closes #257, #258 et #365 - - See merge request libtiff/libtiff!297 - -2022-02-10 Su Laus - - tiff2pdf: Fixes issues #365, #258 and #257 related to initializing 't2p->pdf_compressionquality'. - -2022-02-09 Even Rouault - - Predictor 2 (horizontal differentiation): support 64-bit. - There's no reason not to support 64-bit. The TIFF 6 specification - doesn't say anything about that (and even mention 4-bit, which we don't - support) - -2022-02-09 Even Rouault - - Merge branch 'Fix_Issue#352' into 'master' - tiffcrop.c: Fix issue #352 heap-buffer-overflow by correcting uint32_t underflow. - - Closes #352 - - See merge request libtiff/libtiff!294 - -2022-02-09 Su Laus - - tiffcrop.c: Fix issue #352 heap-buffer-overflow by correcting uint32_t underflow. - -2022-02-08 Even Rouault - - Merge branch 'custom_dir_EXIF_Coverity_fixes' into 'master' - Fix Coverity Scan report issues for custom_dir_EXIF_231.c and test_directory.c - - See merge request libtiff/libtiff!295 - -2022-02-08 Su Laus - - Fix Coverity Scan report issues for custom_dir_EXIF_231.c and test_directory.c - -2022-02-06 Roger Leigh - - Merge branch 'cmake-test' into 'master' - Correct CMake testing - - Closes #317 - - See merge request libtiff/libtiff!291 - -2022-02-06 Even Rouault - - LogLuvEncode32(): avoid undefined behaviour of left shift on a signed integer - - TIFFFetchStripThing(): avoid calling memcpy() with a null source pointer and size of zero (fixes #362) - -2022-02-05 Even Rouault - - TIFFReadDirectory(): avoid calling memcpy() with a null source pointer and size of zero (fixes #362) - -2022-01-29 Even Rouault - - Merge branch 'Jamaika1-master-patch-68264' into 'master' - Added stdlib.h - - See merge request libtiff/libtiff!293 - -2022-01-29 Jamaika - - tif_win32.c: include stdlib.h. - -2022-01-28 Timothy Lyanguzov - - Fix packaging with CPack. - Replace all CMAKE_INSTALL_FULL_ with CMAKE_INSTALL_ to allow CPack setting CMAKE_INSTALL_PREFIX - -2022-01-25 Even Rouault - - Merge branch 'master' into 'master' - Fix the global-buffer-overflow in tiffset - - See merge request libtiff/libtiff!287 - -2022-01-25 4ugustus - - tiffset: fix global-buffer-overflow for ASCII tags where count is required (fixes #355) - -2022-01-23 Roger Leigh - - Merge branch 'autogen' into 'master' - Fix autogen.sh permissions issues during mv - - See merge request libtiff/libtiff!290 - -2022-01-23 Roger Leigh - - Correct CMake testing. - * Use functions rather than macros to avoid problems with variables in - conditions (since macro arguments are not variables) - * Conditionally add to file lists and test program lists based upon the - configuration options (e.g. JPEG and old-JPEG availability) - * Sync tests, files and option usage with current automake usage - -2022-01-19 Will Cohen - - autogen.sh: mv -f for config.sub and config.guess. - -2022-01-12 Even Rouault - - TIFFYCbCrToRGBInit(): avoid Integer-overflow in gdal_TIFFYCbCrToRGBInit. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43559 - -2022-01-10 Even Rouault - - Merge branch 'fix_TIFFFillStrip_wrong_check' into 'master' - Fix sanity check in TIFFFillStrip()/TIFFFillStrile() - - See merge request libtiff/libtiff!288 - -2022-01-10 Even Rouault - - TIFFFillStrip()/TIFFFillStrile(): remove useless test. - - Fix sanity check in TIFFFillStrip()/TIFFFillStrile() - A sanity check comparing the compressed vs uncompressed file that was - originally written 'correctly' but relied on undefined behaviour was - changed in 1b5e3b6a23827c33acf19ad50ce5ce78f12b3773 in an incorrect way. - Fix that. Credits to @burn for spotting this in - https://gitlab.com/libtiff/libtiff/-/issues/343#note_806089714 - -2021-12-29 Even Rouault - - Merge branch 'Fix_FieldName_NULL' into 'master' - Fix Issue #354 Segmentation Fault due to field_name=NULL - - See merge request libtiff/libtiff!285 - -2021-12-29 Even Rouault - - Merge branch 'mingw-static' into 'master' - build: Fix static library imports in mingw - - See merge request libtiff/libtiff!286 - -2021-12-29 Biswapriyo Nath - - build: Fix static library imports in mingw. - This defines LERC_STATIC while creating libtiff static library - in Win32 platform in presence of lerc library. Otherwise, the - static library import lerc APIs with dllimport attribute and - thus linked with shared lerc library. - -2021-12-28 Su_Laus - - Fix Issue #354 Segmentation Fault due to field_name=NULL. - -2021-12-17 Even Rouault - - Merge branch 'fix_342' into 'master' - TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS): return error if... - - Closes #342 - - See merge request libtiff/libtiff!283 - -2021-12-16 Even Rouault - - TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS): return error if returned pointer is NULL (fixes #342) - - tiff2pdf: validate TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc) return (fixes #342) - -2021-12-16 Even Rouault - - Merge branch 'master' into 'master' - fix raw2tiff floating point exception(fixes #338) - - Closes #338 - - See merge request libtiff/libtiff!282 - -2021-12-16 t.feng - - raw2tiff: check that band number if not zero to avoid floating point exception(fixes #338) - -2021-12-14 Even Rouault - - Merge branch 'fix_337' into 'master' - OJPEG: avoid assertion when using TIFFReadScanline() (fixes #337) - - Closes #337 - - See merge request libtiff/libtiff!280 - -2021-12-13 Even Rouault - - OJPEG: avoid assertion when using TIFFReadScanline() (fixes #337) - Note: my analysis of the issue would be that the use of the scanline API - is currently probably broken with OJPEG. - -2021-12-10 Even Rouault - - JPEG 12bit: make it easier for GDAL's RENAME_INTERNAL_LIBTIFF_SYMBOLS mode - -2021-12-09 Even Rouault - - tif_lzw.c: other warning fixes. - - tif_lzw.c: fix warnings of previous commit. - -2021-12-09 Even Rouault - - Merge branch 'lzw_2gb_windows' into 'master' - LZW codec: fix support for strips/tiles > 2 GB on Windows - - See merge request libtiff/libtiff!279 - -2021-12-08 Even Rouault - - LZW codec: fix support for strips/tiles > 2 GB on Windows. - -2021-12-07 Even Rouault - - Merge branch 'fix_287' into 'master' - tiffinfo: add a -M switch to define the maximum heap allocation, and default... - - Closes #287 - - See merge request libtiff/libtiff!278 - -2021-12-06 Even Rouault - - Merge branch 'fix_319' into 'master' - TIFFReadDirectory: fix OJPEG hack (fixes #319) - - Closes #319 - - See merge request libtiff/libtiff!277 - -2021-12-06 Even Rouault - - Merge branch 'fix_309' into 'master' - TIFFAppendToStrip(): fix rewrite-in-place logic (fixes #309) - - Closes #309 - - See merge request libtiff/libtiff!276 - -2021-12-05 Even Rouault - - Merge branch 'b1' into 'master' - Fix resource leak on error path - - See merge request libtiff/libtiff!263 - -2021-12-05 bonniegong - - rast2tiff: Fix resource leak on error path. - -2021-12-05 Even Rouault - - Merge branch 'tiffsplit-leak' into 'master' - tiffsplit.c: Fix memleak before exit - - See merge request libtiff/libtiff!270 - -2021-12-05 Even Rouault - - tiffinfo: add a -M switch to define the maximum heap allocation, and default it to 256 MiB (fixes #287) - - tiffinfo: fix read of invalid pointer in TIFFReadRawDataTiled() (fixes #295) - -2021-12-05 Even Rouault - - TIFFReadDirectory: fix OJPEG hack (fixes #319) - to avoid having the size of the strip arrays inconsistent with the - number of strips returned by TIFFNumberOfStrips(), which may cause - out-ouf-bounds array read afterwards. - - One of the OJPEG hack that alters SamplesPerPixel may influence the - number of strips. Hence compute tif_dir.td_nstrips only afterwards. - -2021-12-04 Even Rouault - - TIFFAppendToStrip(): fix rewrite-in-place logic (fixes #309) - Properly reset tif_curoff when writing strips/tiles - -2021-12-03 Even Rouault - - TIFFReInitJPEG_12(): avoid warning about unused variable in -DNDEBUG. - -2021-12-01 Even Rouault - - Merge branch 'fix_316' into 'master' - TIFFReadCustomDirectory(): avoid crash when reading SubjectDistance tag on a non EXIF directory - - Closes #316 - - See merge request libtiff/libtiff!273 - -2021-12-01 Even Rouault - - Merge branch 'VisualStudio_warnings_suppress' into 'master' - Suppress unnecessary warnings in Visual Studio in AppVeyor test. - - See merge request libtiff/libtiff!234 - -2021-11-30 Even Rouault - - TIFFReadCustomDirectory(): avoid crash when reading SubjectDistance tag on a non EXIF directory - Fixes #316 - - The Valgrind trace was - ``` - TIFFReadCustomDirectory: Warning, Unknown field with tag 37382 (0x9206) encountered. - ==3277355== Invalid read of size 1 - ==3277355== at 0x4842B60: memmove (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) - ==3277355== by 0x48BB799: _TIFFmemcpy (tif_unix.c:346) - ==3277355== by 0x485B3CB: _TIFFVSetField (tif_dir.c:647) - ==3277355== by 0x485C125: TIFFVSetField (tif_dir.c:890) - ==3277355== by 0x485BEDC: TIFFSetField (tif_dir.c:834) - ==3277355== by 0x486DA9A: TIFFFetchSubjectDistance (tif_dirread.c:5826) - ==3277355== by 0x4869E35: TIFFReadCustomDirectory (tif_dirread.c:4530) - ==3277355== by 0x4869F0A: TIFFReadGPSDirectory (tif_dirread.c:4564) - ==3277355== by 0x10AA7A: main (tiffinfo.c:171) - ==3277355== Address 0x3fc856aaaaaaaaab is not stack'd, malloc'd or (recently) free'd - ==3277355== - ``` - -2021-11-29 Even Rouault - - Merge branch 'add-null-check' into 'master' - Added missing null check. - - See merge request libtiff/libtiff!274 - -2021-11-28 Dirk Lemstra - - Added missing null check. - -2021-11-26 Even Rouault - - tif_print.c: remove duplicated if() in previous commit. - -2021-11-26 Even Rouault - - Merge branch 'GPS_Print_BugFix' into 'master' - Fix Segmentation fault printing GPS directory if Altitude tag is present (tif_print.c/tiffinfo.c) - - See merge request libtiff/libtiff!272 - -2021-11-26 Su Laus - - Fix Segmentation fault printing GPS directory if Altitude tag is present (tif_print.c/tiffinfo.c) - -2021-11-01 Even Rouault - - Merge branch 'cmake_tiffconf' into 'master' - Fix STRIPCHOP_DEFAULT value in CMake builds - - See merge request libtiff/libtiff!271 - -2021-11-01 Even Rouault - - Fix STRIPCHOP_DEFAULT value in CMake builds. - CMake builds erroneously used value 1 instead of TIFF_STRIPCHOP, which - resulted in strip chopping not being enabled by default. - -2021-10-26 Even Rouault - - tif_jpeg.c: typo fix. - -2021-10-24 Han Han - - tiffsplit.c: Fix memleak before exit. - Details of the memleak: - $ valgrind --leak-check=full tiffsplit id:001763,sync:fuzzer07,src:001641,+cov - - ==2090657== - ==2090657== HEAP SUMMARY: - ==2090657== in use at exit: 13,517 bytes in 17 blocks - ==2090657== total heap usage: 41 allocs, 24 frees, 29,351 bytes allocated - ==2090657== - ==2090657== 2,473 (1,249 direct, 1,224 indirect) bytes in 1 blocks are definitely lost in loss record 10 of 13 - ==2090657== at 0x484086F: malloc (vg_replace_malloc.c:381) - ==2090657== by 0x48BF35C: TIFFClientOpen (tif_open.c:118) - ==2090657== by 0x48CF058: TIFFFdOpen (tif_unix.c:209) - ==2090657== by 0x48CF0C4: TIFFOpen (tif_unix.c:248) - ==2090657== by 0x10954C: main (tiffsplit.c:91) - ==2090657== - ==2090657== 11,044 (1,300 direct, 9,744 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 13 - ==2090657== at 0x484086F: malloc (vg_replace_malloc.c:381) - ==2090657== by 0x48BF35C: TIFFClientOpen (tif_open.c:118) - ==2090657== by 0x48CF058: TIFFFdOpen (tif_unix.c:209) - ==2090657== by 0x48CF0C4: TIFFOpen (tif_unix.c:248) - ==2090657== by 0x1093D9: main (tiffsplit.c:75) - ==2090657== - ==2090657== LEAK SUMMARY: - ==2090657== definitely lost: 2,549 bytes in 2 blocks - ==2090657== indirectly lost: 10,968 bytes in 15 blocks - ==2090657== possibly lost: 0 bytes in 0 blocks - ==2090657== still reachable: 0 bytes in 0 blocks - ==2090657== suppressed: 0 bytes in 0 blocks - ==2090657== - ==2090657== For lists of detected and suppressed errors, rerun with: -s - ==2090657== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) - -2021-10-20 Even Rouault - - tif_webp.c: add explicit cast to please MSVC verbose warnings. - - tif_webp.c: white space fixing. - -2021-10-04 Even Rouault - - Merge branch 'work/amyspark/psd-blobs' into 'master' - Enable writing Photoshop blobs - - See merge request libtiff/libtiff!269 - -2021-10-04 L. E. Segovia - - Enable writing Photoshop blobs. - -2021-09-29 Even Rouault - - Merge branch 'remove_packbits_hack' into 'master' - PackBitsDecode: remove hack for when char is unsigned. - - See merge request libtiff/libtiff!267 - -2021-09-28 Even Rouault - - PackBitsDecode: remove hack for when char is unsigned. - The function has a hack for platforms where char is unsigned. This is - better replaced by making bp a int8_t* pointer, which is guaranteed to - be signed. - -2021-09-27 Even Rouault - - tiffcrop.c: remove useless 'set but not read' variables. - -2021-09-23 Even Rouault - - Merge branch 'fix_gdal_4538' into 'master' - TIFFAppendToStrip(): fix rewrite-in-place logic - - See merge request libtiff/libtiff!266 - -2021-09-23 Even Rouault - - TIFFAppendToStrip(): fix rewrite-in-place logic. - reproducible in particular with packbits compression. - - Fixes https://github.com/OSGeo/gdal/issues/4538 - -2021-09-17 Even Rouault - - tif_lzw.c: silence compiler warning about set but not used variable with recent clang - -2021-09-07 Even Rouault - - Merge branch 'fix_cygwin' into 'master' - Fix build warnings on cygwin about 'argument 1 of type 'float[3]' with... - - See merge request libtiff/libtiff!265 - -2021-09-06 Even Rouault - - test/rational_precision2double.c: add missing curly braces to fix -Werror=misleading-indentation - -2021-09-05 Even Rouault - - Fix build warnings on cygwin about 'argument 1 of type 'float[3]' with mismatched bound [-Werror=array-parameter=]' - -2021-09-05 Even Rouault - - Merge branch 'rewrite-fix' into 'master' - Fix TIFFRewriteDirectory discarding directories after the rewritten one - - See merge request libtiff/libtiff!264 - -2021-09-05 Facundo Tuesca - - tif_dirwrite.c: Fix TIFFRewriteDirectory discarding directories. - This fixes a bug caused by the `tif_lastdiroff` optimization when - rewriting directories. - - Rewriting the Nth directory temporarily zeroes the pointer to it - (located in the N-1th directory) and relies on `TIFFLinkDirectory` - traversing the whole directory list to find the zeroed pointer and - linking the rewritten directory to it. Since `TIFFLinkDirectory` skips - the traversal when `tif_lastdiroff` is set, this change unsets it - to force the full traversal when rewriting a directory. - - A test to catch this particular issue is also added. - -2021-09-01 Even Rouault - - test_directory.c: fix compiler warnings. - -2021-09-01 Even Rouault - - Merge branch 'multipage-optimization' into 'master' - Keep track of last directory to improve performance for large multi-page files - - See merge request libtiff/libtiff!262 - -2021-08-28 Facundo Tuesca - - Add field to keep track of last written directory. - This adds a new `tif_lastdiroff` field to the TIFF data structure - and uses it to store the offset of the last written directory. - - Appending a new directory required traversing the whole file - to find the last directory. By keeping track of its offset in this - new field, the search is no longer necessary. - - Since this offset is only stored in-memory, the first directory - append after opening a file will have to transverse the whole - directory list. Subsequent calls will have access to the last - offset, avoiding the transversal. - -2021-08-13 Even Rouault - - tif_jpeg.c: fix memory leak on error code path for JPEG 12 bit (CID 1086702) - -2021-07-29 Even Rouault - - Merge branch 'jpeg12' into 'master' - Enable JPEG 12bit support with a libjpeg that has a different ABI than the one for 8bit support - - See merge request libtiff/libtiff!261 - -2021-07-28 Even Rouault - - Reformat tif_jpeg.c and tif_jpeg_12.c with clang-format-10. - -2021-07-27 Even Rouault - - Enable JPEG 12bit support with a libjpeg that has a different ABI than the one for 8bit support - See https://github.com/OSGeo/gdal/pull/4139 for more details - - Note: this hasn't been tested for standalone libtiff builds. - -2021-07-09 Even Rouault - - Merge branch 'wip/export-targets' into 'master' - Export tiff targets - - See merge request libtiff/libtiff!258 - -2021-07-09 Even Rouault - - Merge branch 'pkgconfig' into 'master' - Add version and requirements to pc file - - See merge request libtiff/libtiff!256 - -2021-07-09 Kai Pastor <8989969-dg0yt@users.noreply.gitlab.com> - - Fix version in libtiff-4.pc.in, and CMake build: Add requirements to pc file - -2021-07-09 Even Rouault - - Merge branch 'cmake' into 'master' - Fix build issues with CMake 3.10 - - See merge request libtiff/libtiff!260 - -2021-07-04 Kai Pastor - - Fix reconfiguration with cmake. - - Fix build with CMake 3.10. - -2021-06-28 Milian Wolff - - Export tiff targets. - Fixes build when including libtiff as a cmake subproject into - another project and then installing a target from there which - depends on tiff. For example we could end up with: - - ``` - CMake Error in 3rdParty/diplib/CMakeLists.txt: - export called with target "DIP" which requires target "tiff" that is not in - any export set. - ``` - -2021-06-21 Even Rouault - - Merge branch 'libjpeg9d_support_simplification' into 'master' - tif_jpeg.c: simplify libjpeg 9d support (refs #266) - - See merge request libtiff/libtiff!257 - -2021-06-20 Even Rouault - - tif_jpeg.c: simplify libjpeg 9d support (refs #266) - Credits to Guido Vollbeding for the suggestion - -2021-06-15 Even Rouault - - Merge branch 'jpeg_in_tiff_jpeg_9d' into 'master' - tif_jpeg.c: workaround bug of libjpeg 9d that defers Huffman table creation - - Closes #266 - - See merge request libtiff/libtiff!255 - -2021-06-15 Even Rouault - - Merge branch 'jpeg_disable_progressive_with_mozjpeg' into 'master' - tif_jpeg.c: do not emit progressive scans with mozjpeg and force optimize_coding - - See merge request libtiff/libtiff!254 - -2021-06-12 Even Rouault - - tif_jpeg.c: with mozjpeg, disable emission of Huffman tables in JpegTables tag, and use optimize_coding - -2021-06-10 Even Rouault - - tif_jpeg.c: workaround bug of libjpeg 9d that defers Huffman table creation - Fixes #266 - - libjpeg-9d no longer creates default Huffman tables in - jpeg_set_defaults(), which make their emission in the JpegTables tag no - longer possible. Workaround that by borrowing code from libjpeg to - manually create them when they are not initialized. - -2021-06-10 Even Rouault - - tif_jpeg.c: do not emit progressive scans with mozjpeg. - Relates to #266 - - - On writing, explicitly disable progressive scans, which is normally - not enabled, except with mozjpeg. - - On reading, emit a warning when encountering progressive scans. - -2021-06-10 Even Rouault - - Merge branch 'fix-263' into 'master' - Fix memory leak in tiff2pdf - - See merge request libtiff/libtiff!249 - -2021-06-09 Even Rouault - - Merge branch 'diizzyy-master-patch-20521' into 'master' - html: Add missing pages when using CMake - - See merge request libtiff/libtiff!242 - -2021-06-09 Daniel E - - html: Add missing pages when using CMake. - -2021-06-07 Even Rouault - - Merge branch 'ci-reenable-cygwin' into 'master' - ci: Re-enable cygwin builds - - See merge request libtiff/libtiff!252 - -2021-06-06 Roger Leigh - - ci: Re-enable cygwin builds. - -2021-06-06 Even Rouault - - Merge branch 'ci-arm64' into 'master' - ci: Add arm64 build - - See merge request libtiff/libtiff!251 - -2021-06-06 Roger Leigh - - ci: Add arm64 build. - -2021-06-05 Even Rouault - - _TIFFRewriteField(): fix when writing a IFD with a single tile that is a sparse one, on big endian hosts - -2021-06-02 Timothy Lyanguzov - - Fix memory leak in tiff2pdf. - -2021-06-01 Even Rouault - - Merge branch 'lzw_cleanup' into 'master' - tif_lzw.c: cleanup, no functional change - - See merge request libtiff/libtiff!248 - -2021-05-31 Even Rouault - - tif_lzw.c: cleanup, no functional change. - -2021-05-22 Even Rouault - - Merge branch 'appveyor_disable_cygwin' into 'master' - .appveyor.yml: disable cygwin configs for now as they are broken - - See merge request libtiff/libtiff!247 - -2021-05-22 Even Rouault - - Merge branch 'zstd_reuse_objects' into 'master' - ZSTD codec: reuse compressor/decompressor objects - - See merge request libtiff/libtiff!246 - -2021-05-22 Even Rouault - - .appveyor.yml: disable cygwin configs for now as they are broken. - - ZSTD codec: reuse compressor/decompressor objects. - No need to recreate them each time in the PreEncode/Decode functions. - They can be reused if already existing. - -2021-05-08 Even Rouault - - Merge branch 'adobedeflate-fix' into 'master' - Fix all remaining uses of legacy Deflate compression id and warn on use - - See merge request libtiff/libtiff!245 - -2021-05-08 David Ryskalczyk - - Fix all remaining uses of legacy Deflate compression id and warn on use. - -2021-05-06 Even Rouault - - Merge branch 'improve_tiffinfo_tiffdump_for_gdal_tags' into 'master' - tiffinfo/tiffdump: improve output for GDAL tags - - See merge request libtiff/libtiff!244 - -2021-05-03 Even Rouault - - Merge branch 'issue-252' into 'master' - Prevent adding root directory to include list - - Closes #252 et #218 - - See merge request libtiff/libtiff!243 - -2021-05-03 Even Rouault - - tiffinfo/tiffdump: improve output for GDAL tags. - -2021-04-29 Timothy Lyanguzov - - Prevent adding root directory to include list. - there is a file VERSION in the root directory which clashes with C++20 standard header - "config.h" file is created in "config" subdirectory to prevent adding "-I.." to generated Makefile - - closes #218, #252 - -2021-04-23 Laszlo Boszormenyi (GCS) - - fix TIFFReadRawStrip man and HTML page typo. - From https://github.com/conda-forge/libtiff-feedstock/blob/master/recipe/patches/fix_TIFFReadRawStrip_man_page_typo.patch - -2021-04-20 Even Rouault - - HOWTO-RELEASE: update. - -2021-04-18 Even Rouault - - Merge branch 'lerc_zstd_deflate' into 'master' - Make LERC_SUPPORT conditional on ZLIB_SUPPORT. Make display of lerc options in tiffcp depend on actual zstd support. - - See merge request libtiff/libtiff!239 - -2021-04-18 Miguel Medalha - - Make LERC_SUPPORT conditional on ZLIB_SUPPORT. Make display of lerc options in tiffcp depend on actual zstd support. - -2021-04-17 Even Rouault - - Merge branch 'vtorri_xz' into 'master' - automatic creation of xz archive when running make distcheck - - See merge request libtiff/libtiff!238 - -2021-04-16 Even Rouault - - iptcutil.c: fix bug in EOF comparison, spotted on NetBSD 9 earmv7hf-el. - -2021-04-16 Even Rouault - - libtiff v4.3.0 released - -2021-04-15 Even Rouault - - Merge branch 'libjpeg12_cmake' into 'master' - libtiff/tif_config.h.cmake.in: surround LIBJPEG_12_PATH by double quotes - - See merge request libtiff/libtiff!237 - -2021-04-15 Even Rouault - - libtiff/tif_config.h.cmake.in: surround LIBJPEG_12_PATH by double quotes - -2021-04-14 Even Rouault - - Merge branch 'lerc_api_change' into 'master' - tif_lerc.c: cope with API breakage in liblerc master - - See merge request libtiff/libtiff!236 - -2021-04-14 Even Rouault - - tif_lerc.c: cope with API breakage in liblerc master. - -2021-04-08 Even Rouault - - libtiff: remove remaining #ifdef WIN32 and use PRI formatting. - -2021-03-10 Even Rouault - - Merge branch 'kmilos-master-patch-73187' into 'master' - tiffcp: Remove LZW help text, preset not supported - - See merge request libtiff/libtiff!229 - -2021-03-10 Miloš Komarčević - - tiffcp: Remove LZW help text, preset not supported. - -2021-03-10 Even Rouault - - Merge branch 'feature/lerc' into 'master' - Add LERC Compression Plugin (closes: #213) - - Closes #213 - - See merge request libtiff/libtiff!228 - -2021-03-10 Even Rouault - - Merge branch 'cmake-fixes' into 'master' - CMake fixes - - Closes #246 et #245 - - See merge request libtiff/libtiff!232 - -2021-03-09 Roger Leigh - - cmake: Correct FindCMath. - - cmake: Correct ZSTD_USABLE typo. - -2021-03-07 Roger Leigh - - Merge branch 'cmake-find-lib-prefixes' into 'master' - cmake: Correct find lib prefixes for Deflate and JBIG - - See merge request libtiff/libtiff!231 - -2021-03-07 Roger Leigh - - cmake: FindJBIG uses lib prefix on Windows. - - cmake: FindDeflate uses lib prefix on Windows. - -2021-03-07 Even Rouault - - TWebPDecode(): avoid potential overflow on multiplication (CID 1472928) - - TIFFReadDirEntryArrayWithLimit(): avoid false positive from Coverity Scan regarding out-of-bounds access (CID 1472927) - - tif_dirwrite.c: avoid setting a variable that is not read afterwards. - -2021-03-07 Even Rouault - - Merge branch 'coverity-fixes' into 'master' - Coverity fixes (high impact) - - See merge request libtiff/libtiff!227 - -2021-03-07 Roger Leigh - - Fix high-impact Coverity issues (resource leaks). - The issues are in the tests and tiffcrop, not the core library. Real issues, but not high risk. - - Use to test if Coverity integration is performing properly on merge. - -2021-03-07 Even Rouault - - Merge branch 'fix_tif_fax3_encoder_regression' into 'master' - tif_fax3.c: fix master regression in encoder - - See merge request libtiff/libtiff!230 - -2021-03-07 Even Rouault - - tif_fax3.c: fix master regression in encoder. - Fix issue introduced in 39a74eede0455ec8ee334dcddf71f5354d508d8b - - Spotted by gdal's tiff_write_76 test - -2021-03-07 Antonio Valentino - - Add LERC support in CMake. - -2021-03-07 Antonio Valentino - - Add LERC support in configure.ac and Makefile.am. - -2021-03-07 Antonio Valentino - - Add LERC support to tiffcp. - -2021-03-07 Antonio Valentino - - Add LERC plugin. - The lerc plugin code has been copied from GDAL. - -2021-03-06 Roger Leigh - - Merge branch 'display_tool_purpose' into 'master' - TIFF tools: insert a line of text summarizing each tool's purpose - - See merge request libtiff/libtiff!214 - -2021-03-06 Even Rouault - - Merge branch 'cmake-update' into 'master' - CMake updates - - See merge request libtiff/libtiff!224 - -2021-03-06 Even Rouault - - tiff.h: typo fix in comment. - -2021-02-15 Roger Leigh - - Merge branch 'remove-travis' into 'master' - ci: Remove unused Travis-CI support - - See merge request libtiff/libtiff!226 - -2021-02-14 Roger Leigh - - ci: Remove unused Travis-CI support. - -2021-02-14 Roger Leigh - - Merge branch 'ci-coverity' into 'master' - Enable Coverity static analysis with CI pipeline - - See merge request libtiff/libtiff!225 - -2021-02-14 Roger Leigh - - ci: Add Coverity static analysis job. - - ci: Use custom libtiff CI image. - -2021-02-13 Roger Leigh - - cmake: Add release target. - - cmake: Remove empty contrib files. - - cmake: Tidy toplevel. - - cmake: Move pkg-config support to PkgConfig.cmake. - - cmake: Move library feature options to CXXLibraryFeatures.cmake. - - cmake: Move C++ support to CXXLibrary.cmake. - - cmake: Add FindCMath to handle libm linking portably. - - cmake: Tidy unused includes. - - cmake: Rename release date to build date. - - cmake: Compute timestamp portably. - - cmake: Remove remaining uses of report_values() - - cmake: Move JPEG12 checks to JPEGCodec.cmake. - - cmake: Move OpenGL checks to OpenGLChecks.cmake. - - cmake: Move OpenGL checks to OpenGLChecks.cmake. - - cmake: Move WebP codec support to WebPCodec.cmake. - - cmake: Use imported targets for WebP. - - cmake: Add FindWebP. - - cmake: Move ZSTD codec support to ZSTDCodec.cmake. - - cmake: Use imported targets for ZSTD. - - cmake: Add FindZSTD. - - cmake: Move LZMA codec support to LZMACodec.cmake. - - cmake: Use imported targets for LibLZMA. - - cmake: Move JBIG codec support to JBIGCodec.cmake. - - cmake: Use imported targets for JBIG. - - cmake: Add FindJBIG. - - cmake: Move PixarLog codec support to PixarLogCodec.cmake. - - cmake: Report system name in configuration report. - - cmake: Move JPEG codec support to JPEGCodec.cmake. - - cmake: Use imported targets for JPEG. - - cmake: Move Deflate codec support to DeflateCodec.cmake. - - cmake: Use imported targets for ZLIB and Deflate. - - cmake: Add FindDeflate. - - cmake: Move symbol checks to SymbolChecks.cmake. - - cmake: Move include checks to IncludeChecks.cmake. - - cmake: Move all autotools logic to separate files. - - cmake: Move internal codec options to InternalCodecs.cmake. - - cmake: Move LFS check to LargeFileSupport.cmake. - - cmake: Move Win32 IO feature to WindowsIOFeature.cmake. - - cmake: Move processor capability checks to ProcessorChecks.cmake. - - cmake: Move type size checks to TypeSizeChecks.cmake. - - cmake: Move linker checks to LinkerChecks.cmake. - - cmake: Move warning options to CompilerChecks. - - cmake: Move version introspection to AutotoolsVersion.cmake. - - cmake: Move compiler checks to CompilerChecks.cmake. - - cmake: Split into helper scripts. - -2021-02-08 Roger Leigh - - cmake: Use target_sources. - - libport: Adjust header and library to only define and link if required. - * Make libport an OBJECT library when in use, otherwise a dummy - INTERFACE library - * libport.h will work if getopt is present or not present. If - present, will fall back to , else will define - symbols - * Add generated libport_config.h to define HAVE_GETOPT and HAVE_UNISTD_H - * dummy.c no longer needed with CMake - * libtiff/libtiffxx no longer link with libport - - cmake: Remove unnecessary extra_dist usage. - Only makes sense in the context of Automake. Was carried over - for reference while porting, but is not needed. - - cmake: Update minimum version and policy version to 3.9. - -2021-02-08 Roger Leigh - - Merge branch 'remove-nmake' into 'master' - Remove NMake build support - - See merge request libtiff/libtiff!223 - -2021-02-08 Roger Leigh - - Remove NMake build support. - The functionality provided by the NMake build is now completely - superseded by the CMake build. - -2021-02-08 Even Rouault - - Merge branch 'warning-fixes' into 'master' - Warning fixes - - See merge request libtiff/libtiff!222 - -2021-02-07 Miguel Medalha - - Update tiffsplit.c. - - Reinsert summary line lost after conflicting merge. - - Merge branch 'master' into 'display_tool_purpose' - # Conflicts: - # tools/tiffsplit.c - -2021-02-06 Roger Leigh - - ci: Enable fatal warnings with -Werror for AppVeyor/GCC. - - ci: Enable fatal warnings with -Werror for GitLab CI. - - tif_zstd.c: Remove unused variable warning. - - custom_dir_EXIF_231: Remove case statement fallthrough. - - custom_dir_EXIF_231: Correct use of strncpy. - - Correct include order. - - Eliminate implicit fallthrough usage. - Use simple loops in place of manual loop unrolling. Rely on - the compiler optimiser to unroll loops when appropriate. - - Suppress potential unused variable warning. - - Suppress warnings or avoid case statement fallthrough. - -2021-02-05 Roger Leigh - - Merge branch 'c99-ssize_t-fixes' into 'master' - C99 ssize_t fixes - - Closes #239 - - See merge request libtiff/libtiff!219 - -2021-02-05 Even Rouault - - Merge branch 'tiffsplit-too-many-args' into 'master' - tiffsplit.c: exit with EXIT_FAILURE if there are extra args on the command line - - See merge request libtiff/libtiff!209 - -2021-02-05 Roger Leigh - - Add additional TIFF_SSIZE_FORMAT uses. - -2021-02-04 Roger Leigh - - NMake fixes for size type formatting. - - Add TIFF_SIZE_FORMAT for portable use of %z. - MinGW64 does support %z, but it issues a compiler warning. - - Align Autoconf tif_config.h and CMake tif_config.cmake.in. - - Use TIFF_SSIZE_FORMAT for formatting tmsize_t. - -2021-02-04 Even Rouault - - Merge branch 'remove-lcc' into 'master' - Remove Makefile.lcc - - See merge request libtiff/libtiff!221 - -2021-02-04 Even Rouault - - Merge branch 'remove-scons' into 'master' - Remove SCons build - - See merge request libtiff/libtiff!220 - -2021-02-03 Even Rouault - - Merge branch 'c99-snprintf' into 'master' - Use C99 snprintf - - See merge request libtiff/libtiff!217 - -2021-02-03 Roger Leigh - - Merge branch 'tiff2ps-const' into 'master' - tiff2ps.c: string literals must be const char *, not char * - - See merge request libtiff/libtiff!202 - -2021-02-03 Roger Leigh - - Remove SCons build. - Unmaintained for 16 years. - -2021-02-03 Roger Leigh - - Merge branch 'codec_summary' into 'master' - Modify 'CMakeLists.txt' to produce a meaningful summary of external codecs - - See merge request libtiff/libtiff!192 - -2021-02-03 Roger Leigh - - Remove Makefile.lcc. - Unmaintained for 22 years. - -2021-02-02 Roger Leigh - - Merge branch 'ci-32-bit' into 'master' - ci: Build 32- and 64-bit MSVC variants - - See merge request libtiff/libtiff!218 - -2021-02-01 Roger Leigh - - ci: Build 32- and 64-bit MSVC variants. - - Use C99 snprintf. - -2021-02-01 Even Rouault - - Merge branch 'c99-strtol' into 'master' - Use C99 strtol, strtoul, strtoll and strtoull - - See merge request libtiff/libtiff!216 - -2021-01-31 Even Rouault - - Merge branch 'c99-inline' into 'master' - Use C99 inline - - See merge request libtiff/libtiff!215 - -2021-01-31 Roger Leigh - - Use C99 strtol, strtoul, strtoll and strtoull. - - tif_fax3: Use C99 inline. - - Remove inline feature tests and defines. - Available as a standard feature with C99. - -2021-01-30 Miguel Medalha - - Update raw2tiff.c (remove duplicate description of tool) - -2021-01-30 Roger Leigh - - Merge branch 'c99-format-strings' into 'master' - C99 format strings - - See merge request libtiff/libtiff!211 - -2021-01-29 Miguel Medalha - - Update tiffdither.c (2 tabs caused slight misalignment of lines in usage info output) - -2021-01-28 Miguel Medalha - - Update ppm2tiff.c (slight misalignment of lines in usage info output) - - Update tiffset.c (small misalignment of lines in usage info output) - -2021-01-28 Medalha - - Display tool purpose. - -2021-01-28 Thomas Bernard - - tiff2ps.c: string literals must be const char *, not char * - -2021-01-28 Roger Leigh - - libtiff: Use PRI format flags and remove unnecessary casts. - -2021-01-27 Roger Leigh - - ascii_tag: Use PRI format flags and remove unnecessary casts. - - check_tag: Use PRI format flags and remove unnecessary casts. - - custom_dir_EXIF_231: Use PRI format flags and remove unnecessary casts. - - short_tag: Use PRI format flags and remove unnecessary casts. - - strip_rw: Use PRI format flags and remove unnecessary casts. - - fax2tiff: Use PRI format flags and remove unnecessary casts. - - ppm2tiff: Correct format strings. - - raw2tiff: Use PRI format flags and remove unnecessary casts. - - rgb2ycbcr: Use PRI format flags and remove unnecessary casts. - - tiff2pdf: Use PRI format flags and remove unnecessary casts. - - tiff2ps: Use PRI format flags and remove unnecessary casts. - - tiff2rgba: Use PRI format flags and remove unnecessary casts. - - tiffcmp: Use PRI format flags and remove unnecessary casts. - - tiffcp: Use PRI format flags and remove unnecessary casts. - - tiffcrop: Use PRI format flags and remove unnecessary casts. - - tiffinfo: Use PRI format flags and remove unnecessary casts. - - tiffdump: Use PRI format flags and remove unnecessary casts. - -2021-01-27 Even Rouault - - Merge branch 'c99-require-stdtypes' into 'master' - Use standard C99 integer types - - See merge request libtiff/libtiff!205 - -2021-01-26 Even Rouault - - Merge branch 'reserve_COMPRESSION_JXL' into 'master' - tiff.h: reserve COMPRESSION_JXL=50002 for JPEGXL - - See merge request libtiff/libtiff!210 - -2021-01-22 Even Rouault - - tiff.h: reserve COMPRESSION_JXL=50002 for JPEGXL. - -2021-01-22 Kurt Schwehr - - tiffsplit.c: exit with EXIT_FAILURE if there are extra args on the command line - e.g. tiffsplit in.tif a_prefix_ junk - -2021-01-22 Roger Leigh - - Add and enable TIFF_DISABLE_DEPRECATED for internal use. - - Add typedef deprecations for GCC/Clang and MSVC. - - Use standard C99 integer types. - -2021-01-20 Even Rouault - - Merge branch 'ubuntu-zstd-wepb' into 'master' - gitlab-ci : use libzstd-dev and libwebp-dev ubuntu packages - - See merge request libtiff/libtiff!208 - -2021-01-20 Thomas Bernard - - gitlab-ci : use libzstd-dev and libwebp-dev ubuntu packages. - should replace !206 - -2021-01-20 Even Rouault - - Merge branch 'issue-232' into 'master' - tiff2ps: exit the loop in case of error - - Closes #232 - - See merge request libtiff/libtiff!201 - -2021-01-20 Even Rouault - - Merge branch 'tiffsplit-exit-status' into 'master' - tiffsplit: Exit with EXIT_FAILURE if unable to open the input file. - - See merge request libtiff/libtiff!207 - -2021-01-20 Even Rouault - - Merge branch 'config-cleanup' into 'master' - Remove HAVE_INTTYPES_H, HAVE_LFIND & lfind, HAVE_SEARCH_H & include - - See merge request libtiff/libtiff!203 - -2021-01-19 Kurt Schwehr - - tiffsplit: Exit with EXIT_FAILURE if unable to open the input file. - -2021-01-18 Even Rouault - - Merge branch 'tiffcmp' into 'master' - tiffcmp: fix comparison with pixels that are fractional number of bytes - - Closes #53 - - See merge request libtiff/libtiff!141 - -2021-01-15 Kurt Schwehr - - CMakeLists.txt: Remove search for lfind. - - Remove HAVE_INTTYPES_H, HAVE_LFIND & lfind, HAVE_SEARCH_H & include - - HAVE_INTTYPES_H is replaced with TIFF_HAVE_INTTYPES_H - - tif_dirinfo.c has a static td_lfind - -2021-01-15 Thomas Bernard - - tiffcmp: fix comparison with pixels that are fractional number of bytes - For example : 4bits per sample + 3 samples per pixel => 1.5 bytes per pixel - - tiff2ps: exit the loop in case of error. - fixes #232 - -2021-01-15 Even Rouault - - Merge branch 'rm-strcasecmp' into 'master' - Remove port/strcasecmp.c as strcasecmp is not currently used in libtiff. - - Closes #235 - - See merge request libtiff/libtiff!199 - -2021-01-15 Even Rouault - - Merge branch 'std-int-types' into 'master' - Use standard C99 integer types - - See merge request libtiff/libtiff!185 - -2021-01-13 Kurt Schwehr - - Remove port/strcasecmp.c as strcasecmp is not currently used in libtiff. - Fixes #235 - -2021-01-10 Miguel Medalha - - Update CMakeLists.txt. Delete unnecessary line from libdeflate codec support section - -2021-01-10 Roger Leigh - - Merge branch 'include_libport' into 'master' - tiff tools and libtiff/mkg3states: include 'libport.h', remove local definition of 'getopt()' - - See merge request libtiff/libtiff!198 - -2021-01-09 Miguel Medalha - - Update CMakeLists.txt. Cleanup of indentation space. Removal of leading '/' from webp include dir. - -2021-01-09 miguel - - cmake: Use target_include_directories correctly. - -2021-01-09 Roger Leigh - - cmake: Use target_include_directories correctly. - - cmake: Drop unnecessary TOOL_INCLUDES. - -2021-01-07 Roger Leigh - - cmake: Use target_include_directories correctly. - -2021-01-07 miguel - - tiff tools and libtiff/mkg3states: include 'libport.h', remove local definition of 'getopt()' - -2021-01-07 Miguel Medalha - - Update CMakeLists.txt. - -2021-01-07 miguel - - tiff tools: include 'libport.h', remove local definition of 'getopt()' - -2021-01-06 Roger Leigh - - Remove conditional use of - - cmake: Drop dlfcn.h check. - - cmake: Remove duplicate line. - - Use stdint.h types when available. - -2021-01-05 Olivier Paquet - - Merge branch 'iptcutil' into 'master' - contrib/iptcutil.c: set '#ifdef _WIN32' (was '#ifdef WIN32', which failed at build time) - - See merge request libtiff/libtiff!197 - -2021-01-05 miguel - - tiff tools: include 'libport.h', remove local definition of 'getopt()' - - contrib/iptcutil.c - set '#ifdef _WIN32' (was '#ifdef WIN32', which failed at build time) - -2021-01-04 Even Rouault - - tools/CMakeLists.txt: add comment about rgb2ycbcr and thumbnail not to be installed - -2021-01-04 Even Rouault - - Merge branch 'revert-5331ed49' into 'master' - Revert "Merge branch 'install_targets' into 'master'" - - See merge request libtiff/libtiff!196 - -2021-01-04 Even Rouault - - Merge branch 'drop-wince' into 'master' - Remove non-functional WinCE support - - See merge request libtiff/libtiff!188 - -2021-01-04 Even Rouault - - Merge branch 'drop-vms' into 'master' - Remove non-functional VMS support - - See merge request libtiff/libtiff!187 - -2021-01-03 Even Rouault - - Revert "Merge branch 'install_targets' into 'master'" - This reverts merge request !193 - -2021-01-03 Even Rouault - - Merge branch 'tiffcp_b_parameter' into 'master' - tiffcp: Remove unnecessary reference to compression from usage info for -b parameter - - See merge request libtiff/libtiff!189 - -2021-01-03 Even Rouault - - Merge branch 'cmake-faxtable' into 'master' - cmake: Add faxtable target - - See merge request libtiff/libtiff!186 - -2021-01-03 Roger Leigh - - Merge branch 'install_targets' into 'master' - Update 'CMakeLists.txt' from 'tools'. - - See merge request libtiff/libtiff!193 - -2021-01-03 Miguel Medalha - - Update 'CMakeLists.txt' from 'tools'. - - Update CMakeLists.txt. - -2021-01-03 Roger Leigh - - Merge branch 'usage_info' into 'master' - thumbnail: Rename constant variable 'stuff' to 'usage_info' - - See merge request libtiff/libtiff!190 - -2021-01-03 Miguel Medalha - - Modified 'CMakeLists.txt' to produce a meaningful summary of external codecs support. - - Removed unnecessary reference to compression from usage info for -b parameter - - Constant variable 'stuff' renamed to 'usage_info' for consistency with the other tools - -2021-01-02 Roger Leigh - - Remove non-functional VMS support. - - Remove non-functional WinCE support. - -2021-01-02 Roger Leigh - - Merge branch 'codespell' into 'master' - Fix spelling mistakes. - - See merge request libtiff/libtiff!183 - -2021-01-02 Kurt Schwehr - - ChangeLog: Remove extraneous character from prior commit - 00fe7828. - -2021-01-02 Roger Leigh - - Merge branch 'codespell-custom_dir_EXIF_231' into 'master' - custom_dir_EXIF_231.c: dos2unix and codespell - - See merge request libtiff/libtiff!184 - -2021-01-01 Roger Leigh - - mkg3states: Sync generator with current generated file content. - - cmake: Add faxtable and mkg3states targets. - -2020-12-31 Kurt Schwehr - - custom_dir_EXIF_231.c: dos2unix and codespell. - additional, Variable, greater, always - -2020-12-31 Kurt Schwehr - - Fix spelling mistakes. - Found with: - - codespell --version - 1.17.1 - -2020-12-29 Even Rouault - - Merge branch 'remove-some-vms-ifdef' into 'master' - Remove "ifdef VMS" that are no longer necessary. - - See merge request libtiff/libtiff!181 - -2020-12-29 Kurt Schwehr - - Remove "ifdef VMS" that are no longer necessary. - Both sides of the if are now the same. - -2020-12-29 Bob Friesenhahn - - _TIFFBuiltinCODECS should be const. - -2020-12-28 Even Rouault - - Merge branch 'issue-202' into 'master' - tiff2pdf.c: check that tiff_datasize fits in a signed tsize_t - - Closes #202 - - See merge request libtiff/libtiff!166 - -2020-12-28 Even Rouault - - Merge branch 'w_report-when-libdeflate-is-found' into 'master' - CMakeLists.txt: Report when libdeflate is found - - See merge request libtiff/libtiff!175 - -2020-12-28 Bob Friesenhahn - - Declare gpsFields as static const. - -2020-12-28 Bob Friesenhahn - - Merge branch 'tools-reduce-initialized-data' into 'master' - Reduce initialized data by making more data const and simplifying usage() implementation. - - See merge request libtiff/libtiff!180 - -2020-12-28 Bob Friesenhahn - - Reduce initialized data by making more data const and simplifying usage() implementation. - -2020-12-27 Bob Friesenhahn - - Merge branch 'master' into 'master' - tiff tools: display of compression methods is now conditional instead of hard-coded - - See merge request libtiff/libtiff!176 - -2020-12-27 Bob Friesenhahn - - Merge branch 'build' into 'master' - Fix wrong URL for fetching config.guess and config.sub - - See merge request libtiff/libtiff!177 - -2020-12-26 Chocobo1 - - Fix wrong URL for fetching config.guess and config.sub. - -2020-12-25 miguel - - tiff tools: made display of compression methods and their parameters conditional on their actual availability - -2020-12-20 Bob Friesenhahn - - autogen.sh now updates config.guess and config.sub from master gnulib version. - -2020-12-19 Bob Friesenhahn - - Add a https://libtiff.gitlab.io/libtiff/ link. - - Remove stray character in URL area. - - Changes for 4.2.0 release. - - Changes for 4.2.0 release. - -2020-12-19 Bob Friesenhahn - - * libtiff 4.2.0 released. - - * configure.ac: Pass tar-ustar option to AM_INIT_AUTOMAKE rather - than tar-pax since ustar POSIX 1003.1-1988 format is more portable - than PAX POSIX 1003.1-2001 format. - -2020-12-12 Even Rouault - - Merge branch 'w_adjust-deflate_names' into 'master' - Set 'deflate' to DEFLATE_NAMES, instead of 'libdeflate' - - See merge request libtiff/libtiff!174 - -2020-12-12 Lemures Lemniscati - - Set 'deflate' to DEFLATE_NAMES, instead of 'libdeflate' - 'lib' will be automatically added as a prefix while doing find_library() - -2020-12-12 Even Rouault - - DoubleToRational(): avoid casting NaN to uint32 (fixes #227) - -2020-12-12 Even Rouault - - Merge branch 'fix_221' into 'master' - tiffio.h: do not define __attribute__ but defines TIFF_ATTRIBUTE instead (fixes #221) - - Closes #221 - - See merge request libtiff/libtiff!173 - -2020-12-12 Even Rouault - - tiffio.h: do not define __attribute__ but defines TIFF_ATTRIBUTE instead (fixes #221) - -2020-12-08 Even Rouault - - TIFFReadDirEntryArrayWithLimit(): properly read from offline tag value when we clamp the number of strips to 1. - Fixes regression of commit 7057734d986001b7fd6d2afde9667da7754ff2cc on reading - a file with StripByteCounts with 1 element (broken) and StripOffsets with - 896 elements, and where StripOffsets[0] is correct - - $ tiffdump foo.tif - Magic: 0x4949 Version: 0x2a - Directory 0: offset 25725448 (0x1888a08) next 0 (0) - SubFileType (254) LONG (4) 1<0> - ImageWidth (256) LONG (4) 1<640> - ImageLength (257) LONG (4) 1<20098> - BitsPerSample (258) SHORT (3) 1<16> - Photometric (262) SHORT (3) 1<1> - SamplesPerPixel (277) SHORT (3) 1<1> - ResolutionUnit (296) SHORT (3) 1<2> - StripByteCounts (279) LONG (4) 1<1806> - StripOffsets (273) LONG (4) 896<8 648 1288 1928 2568 3208 3848 4488 5128 5768 6408 7048 7688 8328 8968 9608 10248 10888 11528 12168 12808 13448 14088 14728 ...> - -2020-12-02 Even Rouault - - tif_jpeg.c: avoid potential harmless unsigned integer overflow on data->fileoffset in JPEGFixupTagsSubsamplingSkip() by validating earlier. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28200 - -2020-11-27 Even Rouault - - Merge branch 'Jamaika1-master-patch-47839' into 'master' - Change ULARGE_INTEGER to LARGE_INTEGER - - See merge request libtiff/libtiff!170 - -2020-11-27 Even Rouault - - Merge branch 'Jamaika1-master-patch-46397' into 'master' - Added stdint.h - - See merge request libtiff/libtiff!171 - -2020-11-27 Jamaika - - Added stdint.h. - - ``` tif_win32.c: In function '_tiffSizeProc': tif_win32.c:159:23: warning: passing argument 2 of 'GetFileSizeEx' from incompatible pointer type [-Wincompatible-pointer-types] 159 | if (GetFileSizeEx(fd,&m)) | ^~ | | | ULARGE_INTEGER * In file included from c:\msys1021\x86_64-w64-mingw32\include\winbase.h:18, from c:\msys1021\x86_64-w64-mingw32\include\windows.h:70, from tif_win32.c:32: c:\msys1021\x86_64-w64-mingw32\include\fileapi.h:78:73: note: expected 'PLARGE_INTEGER' {aka 'LARGE_INTEGER *'} but argument is of type 'ULARGE_INTEGER *' 78 | WINBASEAPI WINBOOL WINAPI GetFileSizeEx (HANDLE hFile, PLARGE_INTEGER lpFileSize); | ~~~~~~~~~~~~~~~^~~~~~~~~~ ``` - -2020-11-21 Even Rouault - - Merge branch 'issue-113' into 'master' - tiffcrop: fix buffer overrun in extractContigSamples24bits() - - Closes #113 - - See merge request libtiff/libtiff!169 - -2020-11-21 Even Rouault - - Merge branch 'issue-156' into 'master' - tiff2pdf: Check output size before writing - - Closes #156 - - See merge request libtiff/libtiff!168 - -2020-11-21 Even Rouault - - Merge branch 'issue-201' into 'master' - tiff2pdf: enforce memory limit for tiled pictures too - - Closes #201 - - See merge request libtiff/libtiff!167 - -2020-11-20 Even Rouault - - Merge branch 'issue-207' into 'master' - enforce (configurable) memory limit in tiff2rgba - - Closes #209 et #207 - - See merge request libtiff/libtiff!165 - -2020-11-20 Even Rouault - - tif_lzw.c: avoid false positive -Wnull-dereference of mingw32 gcc 7.3. - -2020-11-17 Thomas Bernard - - tiffcrop: fix buffer overrun in extractContigSamples24bits() - fixes #113 - - tiff2pdf: Check output size before writing. - fixes #156 - - tiff2pdf: enforce memory limit for tiled pictures too. - fixes #201 - -2020-11-15 Thomas Bernard - - tiff2rgba.1: -M option. - - enforce (configurable) memory limit in tiff2rgba. - fixes #207 - fixes #209 - -2020-11-14 Even Rouault - - Merge branch 'issue-220' into 'master' - tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr - - Closes #220 - - See merge request libtiff/libtiff!159 - -2020-11-14 Thomas Bernard - - tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr. - fixes #220 - -2020-11-14 Even Rouault - - Merge branch 'issue-204' into 'master' - avoid buffer overflow while writing jpeg end of file marker - - Closes #204 - - See merge request libtiff/libtiff!161 - -2020-11-14 Even Rouault - - Merge branch 'issue-193' into 'master' - fix buffer overflow in tiff2ps.c - - Closes #193 - - See merge request libtiff/libtiff!162 - -2020-11-14 Even Rouault - - Merge branch 'skal65535-master-patch-91082' into 'master' - More overflow fixes for large widths - - See merge request libtiff/libtiff!164 - -2020-11-14 skal - - More overflow fixes for large width. - Also: use INT_MAX instead of hard-coded constants. - -2020-11-12 Even Rouault - - Merge branch 'skal65535-master-patch-56655' into 'master' - Fix potential overflow in gtStripContig() - - See merge request libtiff/libtiff!163 - -2020-11-12 Even Rouault - - Merge branch 'issue-211' into 'master' - check for tile width overflow - - Closes #211 - - See merge request libtiff/libtiff!160 - -2020-11-12 skal - - Fix potential overflow in gtStripContig() - (w + w) might not fit in int32 if too large. - -2020-11-09 Thomas Bernard - - tiff2ps.c: fix buffer overread. - fixes #193 - - fix undefined behaviour (int shifted too much to the left) - - avoid buffer overflow while writing jpeg end of file marker. - fixes #204 - - gtTileContig(): check Tile width for overflow. - fixes #211 - - fix warning messages (v32 is unsigned) - -2020-10-26 Even Rouault - - TIFFStartStrip(): avoid potential crash in WebP codec when using scanline access on corrupted files. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26650 - -2020-10-20 Even Rouault - - tif_webp.c: validate tile/strip dimension to avoid unsigned integer overflow in RGBA.size computation - -2020-10-19 Even Rouault - - tif_zip.c: fix typo in comment. - -2020-10-16 Even Rouault - - tiff.h: remove irrelevant warning about webp related pseudo-tags not being registered: they are purely internal libtiff concepts - -2020-10-16 Even Rouault - - Merge branch 'libdeflate' into 'master' - Add support for building against libdeflate for faster Zip/Deflate compression/decompression - - See merge request libtiff/libtiff!158 - -2020-10-16 Even Rouault - - test: add testdeflatelaststripextradata.sh. - -2020-10-16 Even Rouault - - Add support for optional building against libdeflate for faster Zip/Deflate compression/decompression. - So we can have 2 kind of builds with the Zip/Deflate codec: - - zlib only - - zlib + libdeflate - - Speed improvements in the 35%-50% range can be expected when libdeflate is used. - Compression level up to 12 is now supported (capped to 9 when zlib is used). - Still requires zlib for situations where libdeflate cannot be used (that - is for scanline access, since libdeflate has no streaming mode) - - Pseudo-tag TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE - is added to control which subcodec (zlib or libdeflate) should be used (it defaults - of course to libdeflate, when it is available). - This is mostly aimed at being used on the writing side, to be able to reproduce - output of previous libtiff versions at a binary level, in situations where this would - be really needed. Or as a safety belt in case there would be unforeseen issues - with using libdeflate. - It can be used to know when libdeflate is available at runtime (DEFLATE_SUBCODEC_LIBDEFLATE - will be the default value in that situation). - - Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. - -2020-10-14 Even Rouault - - tif_webp.c: fix compiler warnings with MSVC. - -2020-10-12 Even Rouault - - Merge branch 'various_fixes' into 'master' - Fix compiler warnings about unused variables when assert() expands to nothing - - See merge request libtiff/libtiff!157 - -2020-10-12 Even Rouault - - .gitignore: add entries for new files in test/ - - Fix compiler warnings about unused variables when assert() expands to nothing - -2020-10-09 Roger Leigh - - Merge branch '215-cygwin-appveyor-fail' into 'master' - Update Appveyor CI build to build with VS2019 image - - Closes #215 - - See merge request libtiff/libtiff!154 - -2020-10-09 Roger Leigh - - wip. - - wip. - - wip. - - wip. - - wip. - - wip. - -2020-10-09 Roger Leigh - - Merge branch 'TIFF-217_m_lib_path' into 'master' - cmake: Do not use absolute libm path - - Closes #217 - - See merge request libtiff/libtiff!156 - -2020-10-09 Roger Leigh - - cmake: Do not use absolute libm path. - -2020-10-08 Even Rouault - - tif_fax3.h: restore systematic calls to CLEANUP_RUNS() - now that SETVALUE() no longer cause overflows. - Those were removed per b351db8be1b4d3f712bdb9424a79d3174cc03202 and - 3440ac216463fcad170bbb391491e69730a59ffa. - - As SETVALUE() now returns an error, this allow the decoder to exit. - - Otherwise, the assert(x == lastx) in _TIFFFax3fillruns() can trigger. - - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26201 - -2020-10-06 Even Rouault - - Merge branch 'check_TIFFFlushData1' into 'master' - FAX/JPEG/LZMA/PixarLog/ZIP/ZSTD codecs: make sure to check TIFFFlushData1() return value - - See merge request libtiff/libtiff!155 - -2020-10-04 Even Rouault - - Merge branch 'shared-memory' into 'master' - Set the --shared-memory linker flag for Emscripten builds - - See merge request libtiff/libtiff!153 - -2020-10-03 Even Rouault - - tiff2rgba.c: fix -Wold-style-declaration warning. - - FAX/JPEG/LZMA/PixarLog/ZIP/ZSTD codecs: make sure to check TIFFFlushData1() return value - -2020-09-26 Even Rouault - - tif_fax3.h: extra buffer overflow checks. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25934 - -2020-09-25 Roger Leigh - - wip. - - wip. - - wip. - - wip. - - wip. - - wip. - - Update AppVeyor image. - - test-appveyor. - -2020-09-24 Attila Oláh - - Also pass --shared-memory to raw_decode. - This is needed when building for Emscripten with *both* WEBP and JPEG - support. - - Set the --shared-memory linker flag for Emscripten builds. - This is only needed when building with WEBP support, which uses atomics, - therefore the linker needs the --shared-memory flag. The flag cannot be - added globally because not all executables link against libwebp. - -2020-09-22 Even Rouault - - tif_fax3.h: return error when a buffer overflow occurs. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25552 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25849 - -2020-09-11 Even Rouault - - Merge branch 'fix-float-compare' into 'master' - Fix comparison for max negative float value. - - See merge request libtiff/libtiff!152 - -2020-09-11 Dirk Lemstra - - Fix comparison for max negative float value. - -2020-09-07 Even Rouault - - Fax3PreDecode(): reset curruns and refruns state variables. - to avoid out-of-bounds write triggered by GDAL when repeatedly - reading a corrupt strip. - - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25493 - -2020-06-06 Thomas Bernard - - Merge branch 'issue-17' into 'master' - normalize tools behaviour regarding -h - - Closes #17 - - See merge request libtiff/libtiff!115 - -2020-05-31 Even Rouault - - TWebPSetupEncode(): fix logic problem (and instead of or) in test that checks input is 8bit unsigned data - -2020-05-12 Even Rouault - - TIFFGetConfiguredCODECs(): fix to avoid wrong structure to be returned for registered (ie non built-in) codecs - -2020-05-09 Even Rouault - - Merge branch 'zstd-webp-update' into 'master' - gitlab-ci: use latest zstd and webp versions - - See merge request libtiff/libtiff!148 - -2020-05-09 Even Rouault - - Merge branch 'deprecated' into 'master' - ojpeg: s/Depreciated/Deprecated/ - - See merge request libtiff/libtiff!149 - -2020-05-09 Aaron Boxer - - ojpeg: s/Depreciated/Deprecated/ - -2020-04-27 Even Rouault - - Fix typos. - - tif_jpeg.c: avoid potential division in previous fix (master only) - -2020-04-26 Thomas Bernard - - gitlab-ci: use latest zstd and webp versions. - -2020-04-26 Even Rouault - - tiff.h: fixes to use ASCII only characters (master only) - -2020-04-26 Thomas Bernard - - tiffsplit: use EXIT_SUCCESS / EXIT_FAILURE. - - tiffset: print usage on stdout when -h is used. - also use EXIT_FAILURE / EXIT_SUCCESS - see #17 - - tiffmedian: shopw usage on stdout when -h is used. - also use EXIT_SUCCESS/EXIT_FAILURE - see #17 - - tiffinfo: print usage on stdout when -h is used. - also use EXIT_FAILURE / EXIT_SUCCESS - see #17 - - raw2tiff: print usage to stdout when -h is used. - see #17 - - tiff2pdf: print usage on stdout when -h is used. - see #17 - - tiffgt: output usage on stdout with -h. - also use EXIT_SUCCESS / EXIT_FAILURE - - tiffdump: use EXIT_FAILURE / EXIT_SUCCESS. - see #17 - - tiffdither: print usage on stdout when -h is used. - see #17 - -2020-04-26 Thomas Bernard - - tiffcrop: -h / -v prints usage/version to stdout. - also uses the standard C EXIT_SUCCESS / EXIT_FAILURE - macros - - see #17 - -2020-04-26 Thomas Bernard - - tiffcp: output usage to stdout when using -h. - also use EXIT_FAILURE / EXIT_SUCCESS - see #17 - - tiffcmp: match exit status for posix cmp and diff tools. - - tiff2rgba: output usage to stdout when using -h. - also uses std C EXIT_FAILURE / EXIT_SUCCESS - see #17 - - tiff2ps: sue EXIT_FAILURE / EXIT_SUCCESS. - see #17 - - tiff2bw: output usage on stdout when using -h. - also uses EXIT_SUCCESS / EXIT_FAILURE - see #17 - - thumbnail: use EXIT_FAILURE / EXIT_SUCCESS. - the -h option was already used so it cannot be used for help/usage - see #17 - - rgb2ycbcr: use EXIT_FAILURE / EXIT_SUCCESS. - the -h option was already used so it cannot be used for help/usage - see #17 - - ppm2tiff: output usage to stdout when using -h option. - also uses std C EXIT_SUCCESS / EXIT_FAILURE - see #17 - - pal2rgb: output usage to stdout when -h is used. - see #17 - - fax2tiff.c: print usage on stdout when using -h option. - see #17 - - fax2ps: output usage to stdout when using -h option. - also use EXIT_SUCCESS, EXIT_FAILURE from C standard - -2020-04-25 Even Rouault - - Merge branch 'jpeg_multiscan_dos_logic' into 'master' - tif_jpeg.c: revise logic to detect potential excessive memory usage when... - - See merge request libtiff/libtiff!147 - -2020-04-24 Even Rouault - - Merge branch 'issue-176' into 'master' - tiff2pdf: get rid of uninitialized memory content - - Closes #176 - - See merge request libtiff/libtiff!143 - -2020-04-24 Even Rouault - - tif_jpeg.c: revise logic to detect potential excessive memory usage when decoding multiscan JPEG compressed images - -2020-04-19 Thomas Bernard - - tiff2pdf: test the return code of TIFFReadRawStrip() and TIFFReadRawTile() - - tiff2pdf.c: fix some whitespace problems in source. - - tiff2pdf: get rid of uninitialized memory content. - fixes #176 - -2020-04-19 Even Rouault - - Merge branch 'issue-18' into 'master' - tiffset: pass size for TIFFTAG_INKNAMES - - Closes #18 - - See merge request libtiff/libtiff!146 - -2020-04-18 Olivier Paquet - - Merge branch 'issue-80' into 'master' - tiffinfo: fix dump of Tiled images - - Closes #80 - - See merge request libtiff/libtiff!144 - -2020-04-15 Even Rouault - - Fix wrong file size checks for memory-mapped BigTIFF files that could lead to image rejection - -2020-04-05 Thomas Bernard - - tiffset: pass size for TIFFTAG_INKNAMES. - Uses TIFFFieldPassCount() to know which arguments need to be - passed to TiffSetField() - - fixes #18 - see http://bugzilla.maptools.org/show_bug.cgi?id=2202 - -2020-04-04 Thomas Bernard - - tiffinfo: showdata for tiled images. - - tiffinfo: fix dump of Tiled images. - fixes #80 - -2020-04-03 Even Rouault - - Merge branch 'issue-117' into 'master' - tiffcrop: enforce memory allocation limit - - Closes #117 - - See merge request libtiff/libtiff!140 - -2020-04-03 Thomas Bernard - - tiffcrop: enforce memory allocation limit. - uses -k option to change limit (default to 256MiB) - fixes #117 / http://bugzilla.maptools.org/show_bug.cgi?id=2757 - -2020-04-02 Even Rouault - - Merge branch 'issue-45' into 'master' - tiffcp: disable strip chopping when trying to convert to JBIG compression - - Closes #45 - - See merge request libtiff/libtiff!138 - -2020-04-02 Even Rouault - - Merge branch 'issue-124' into 'master' - TIFFGetFields(3tiff): TIFFTAG_*BYTECOUNTS TIFFTAG_*OFFSETS are uint64 - - Closes #124 - - See merge request libtiff/libtiff!137 - -2020-04-02 Even Rouault - - Merge branch 'aix_itrunc' into 'master' - Rename itrunc to fix name clash with a different itrunc in math.h on AIX. Fixes issue #189 - - Closes #189 - - See merge request libtiff/libtiff!139 - -2020-04-01 Rob Boehne - - Rename itrunc to fix name clash with a different itrunc in math.h on AIX. Fixes issue #189 - -2020-04-01 Thomas Bernard - - tiffcp: disable strip chopping when trying to convert to JBIG compression - fixes #45 - -2020-03-29 Thomas Bernard - - TIFFGetFields(3tiff): TIFFTAG_*BYTECOUNTS TIFFTAG_*OFFSETS are uint64. - fixes #124 / http://bugzilla.maptools.org/show_bug.cgi?id=2774 - -2020-03-29 Even Rouault - - Merge branch 'issue-48' into 'master' - tiff2pdf: fix "raw" copy of Deflate streams - - Closes #48 - - See merge request libtiff/libtiff!136 - -2020-03-27 Thomas Bernard - - tiff2pdf: fix "raw" copy of Deflate streams. - The Predictor parameter was not copied from the source tiff to the PDF. - fixes #48 / http://bugzilla.maptools.org/show_bug.cgi?id=2442 - -2020-03-26 Thomas Bernard - - tif_fax3: quit Fax3Decode2D() when a buffer overflow occurs. - fixes #186 - -2020-03-24 Even Rouault - - Merge branch 'issue-143-144' into 'master' - tiffdump: avoid unaligned memory access - - Closes #144 et #143 - - See merge request libtiff/libtiff!133 - -2020-03-24 Even Rouault - - Merge branch 'issue-133' into 'master' - tiff2pdf: avoid divide by 0 - - Closes #133 - - See merge request libtiff/libtiff!126 - -2020-03-24 Thomas Bernard - - tiff2pdf: normalizePoint() macro to normalize the white point. - -2020-03-23 Thomas Bernard - - tiffdump: avoid unaligned memory access. - fixes #143 - fixes #144 - -2020-03-23 Even Rouault - - Merge branch 'out-of-memory' into 'master' - tiffcp/tiff2pdf/tiff2ps: enforce maximum malloc size - - Closes #153, #84, #116 et #115 - - See merge request libtiff/libtiff!130 - -2020-03-23 Even Rouault - - Merge branch 'issue-157' into 'master' - tiffset: check memory allocation - - Closes #157 - - See merge request libtiff/libtiff!132 - -2020-03-23 Even Rouault - - Merge branch 'issue-185' into 'master' - tif_fax3: more buffer overflow checks in Fax3Decode2D() - - Closes #185 - - See merge request libtiff/libtiff!131 - -2020-03-23 Thomas Bernard - - tiffset: check memory allocation. - fixes #157 / http://bugzilla.maptools.org/show_bug.cgi?id=2850 - - tif_fax3: more buffer overflow checks in Fax3Decode2D() - fixes #185 - -2020-03-21 Thomas Bernard - - tiff2ps: enforce memory allocation limit. - fixes #153 / http://bugzilla.maptools.org/show_bug.cgi?id=2845 - - tiff2pdf: enforce maximum data size. - fixes #116 / http://bugzilla.maptools.org/show_bug.cgi?id=2756 - fixes #84 / http://bugzilla.maptools.org/show_bug.cgi?id=2683 - - update man page for tiffcp regarding the -m option. - - tiffcp.c: _TIFFmalloc() => limitMalloc() - -2020-03-21 Thomas Bernard - - tiffcp: enforce maximum malloc size. - default is 256MB. use -m option to change - - fixes #115 / http://bugzilla.maptools.org/show_bug.cgi?id=2755 - -2020-03-21 Even Rouault - - Merge branch 'issue-184' into 'master' - CmakeLists.txt: define WORDS_BIGENDIAN when the CPU is big endian - - Closes #184 - - See merge request libtiff/libtiff!127 - -2020-03-21 Even Rouault - - Merge branch 'issue-44' into 'master' - tiff2pdf: "" causes the relevant argument not to be written - - Closes #44 - - See merge request libtiff/libtiff!128 - -2020-03-21 Even Rouault - - Merge branch 'issue-56' into 'master' - fix man for TIFFReadEncodedStrip(), TIFFStripSize, TIFFVStripSize, TIFFRawStripSize - - Closes #56 - - See merge request libtiff/libtiff!129 - -2020-03-20 Thomas Bernard - - fix man for TIFFReadEncodedStrip(), TIFFStripSize, TIFFVStripSize, TIFFRawStripSize - fixes #56 - http://bugzilla.maptools.org/show_bug.cgi?id=2507 - - tiff2pdf: "" causes the relevant argument not to be written. - fixes #44 - - CmakeLists.txt: define WORDS_BIGENDIAN when the CPU is big endian. - fixes #184 - -2020-03-17 Thomas Bernard - - tiff2pdf: avoid divide by 0. - fixes #133 http://bugzilla.maptools.org/show_bug.cgi?id=2796 - -2020-03-17 Even Rouault - - Merge branch 'issue-22' into 'master' - do not _tiffMapProc 0 size files - - Closes #22 - - See merge request libtiff/libtiff!125 - -2020-03-13 Thomas Bernard - - tif_win32.c: do not _tiffMapProc() 0 sized files. - see #22 - - tif_unix.c: do not _tiffMapProc 0 size files. - fixes #22 - http://bugzilla.maptools.org/show_bug.cgi?id=2249 - -2020-03-12 Even Rouault - - tif_fax3.c: fix warning C4018: '<': signed/unsigned mismatch introduced in past commits - -2020-03-11 Even Rouault - - tiff.h: mention TIFFTAG_RPCCOEFFICIENT, TIFFTAG_TIFF_RSID, TIFFTAG_GEO_METADATA - -2020-03-11 Even Rouault - - Merge branch 'issue-60' into 'master' - added support for more private tags - - Closes #60 - - See merge request libtiff/libtiff!124 - -2020-03-11 Even Rouault - - Merge branch 'issue-160' into 'master' - Fax3SetupState(): check consistency of rowbytes and rowpixels - - Closes #160 - - See merge request libtiff/libtiff!123 - -2020-03-11 Thomas Bernard - - added support for more private tags. - see https://gitlab.com/libtiff/libtiff/-/issues/60 - bugzilla.maptools.org/show_bug.cgi?id=2525 - - closes #60 - - original author : art1@andreas-romeyke.de - -2020-03-11 Thomas Bernard - - Fax3SetupState(): check consistency of rowbytes and rowpixels. - also add some parameter documentation to Fax3Decode1D() - - fixes #160 - http://bugzilla.maptools.org/show_bug.cgi?id=2854 - -2020-03-10 Even Rouault - - Merge branch 'issue-11-const-pointers' into 'master' - Make pointers returned via TIFFGetField const - - Closes #11 - - See merge request libtiff/libtiff!118 - -2020-03-10 Even Rouault - - tif_ojpeg.c: relax again too strict sanity checks to allow reading of valid images such as https://gitlab.com/libtiff/libtiff/-/issues/181#note_302535232. Fixes #181 - -2020-03-09 Even Rouault - - Merge branch 'issue-52' into 'master' - contrib/win_dib/tiff2dib: fix Uninitialized variable: lpBits - - Closes #52 - - See merge request libtiff/libtiff!121 - -2020-03-09 Thomas Bernard - - contrib/win_dib/tiff2dib: fix Uninitialized variable: lpBits. - fixes #52 - http://bugzilla.maptools.org/show_bug.cgi?id=2469 - -2020-03-08 Even Rouault - - Merge branch 'issue-58' into 'master' - Make TIFFTAG_CFAPATTERN variable count - - Closes #58 - - See merge request libtiff/libtiff!120 - -2020-03-08 Even Rouault - - Merge branch 'issue-158-no-predictor-in-webp' into 'master' - TIFFTAG_PREDICTOR is not supported for WebP - - Closes #158 - - See merge request libtiff/libtiff!119 - -2020-03-08 Sam Hasinoff - - Make TIFFTAG_CFAPATTERN variable count. - The TIFFTAG_CFAPATTERN tag (33422) from TIFF/EP, recently introduced in libtiff - 3363eda09d082e3e1dfffa6281f53085cac51ad3 / http://bugzilla.maptools.org/show_bug.cgi?id=2457 - is described as having a fixed count of 4. - But the TIFF/EP spec says this should support a variable count (= CFARepeatRows * CFARepeatCols): - - TIFF/EP, ISO 12234-2:2001 - http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf - page 18 and 26 - -2020-03-08 Thomas Bernard - - TIFFTAG_PREDICTOR is not supported for WebP. - fixes #158 - https://gitlab.com/libtiff/libtiff/-/issues/158 - - this bug was introduced by 9eacd59fecc4ef593ac17689bc530ab451c8ec14 - merge request !32 - -2020-03-07 Adam Goode - - Make the default whitepoint and ycbcrcoeffs arrays const. - Now that we are returning const pointers in TIFFGetFieldDefaulted, - we can now make these static default arrays const. - - see #11 - -2020-03-07 Adam Goode - - Make pointers returned via TIFFGetField const. - According to http://bugzilla.maptools.org/show_bug.cgi?id=2125#c6 - callers are not allowed to modify pointer or array values returned from - TIFFGetField or the like. So, make this explicit in the documentation - by specifying these things as const. Note that this is not an ABI - change, since C does not encode const in libraries. Also, this is - not really an API change, since the varargs call strips away all - the types anyway. So it really is more of a documentation change. - - fixes #11 - -2020-03-07 Even Rouault - - CMake: Skip custom_dir_EXIF_231 test on shared builds to avoid issues on Windows - -2020-03-07 Even Rouault - - Merge branch 'EXIF231_GPS_upgrade' into 'master' - EXIF 2.32 and GPS TIFF-tags and functionality upgraded. - - See merge request libtiff/libtiff!91 - -2020-03-07 Su_Laus - - EXIF 2.32 and GPS tags and functionality upgraded. - - Existing EXIF field definition of tags is upgraded to EXIF version 2.3.2 - - EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF). - - Test program custom_dir_EXIF_231.c added to test writing/reading of EXID IFD and GPS IFD tags - and to highlight some quirks of IFD-handling and peculiarities of reading/writing the different data types. - - Reading error for FileSource and SceneType tags corrected. - - - EXIF_GPS_upgrade rebased onto c8c5309b765ef4ff097d2aaffbdb8f403db8967d (Merge branch 'Rational2DoublePrecision_correction' into 'master') - and adapted: - - tif_dirinfo.c: All rational tags set to TIFF_SETGET_FLOAT but only the GPSTAG_ tags set to TIFF_SETGET_DOUBLE. - - custom_dir_EXIF_231.c: Editorials amended and gcc warnings fixed. - - CMakeLists.txt: add_test(NAME "custom_dir_EXIF_231" COMMAND "custom_dir_EXIF_231") added. - -2020-03-07 Even Rouault - - Merge branch 'issue-55' into 'master' - ppm2tiff: support any bps value from 1 to 16 - - Closes #55 - - See merge request libtiff/libtiff!106 - -2020-03-07 Thomas Bernard - - ppm2tiff: Add test for 16bpc PPM. - - ppm2tiff: remove unused argument warning. - -2020-03-07 Ludolf Holzheid - - ppm2tiff: support any bps value from 1 to 16. - fix #55 - http://bugzilla.maptools.org/show_bug.cgi?id=2505 - - Patch originally submitted by Ludolf Holzheid - -2020-03-06 Even Rouault - - Merge branch 'fax-test' into 'master' - add test for fax4 decoding - - See merge request libtiff/libtiff!114 - -2020-03-05 Thomas Bernard - - add test for fax4 decoding. - This will check for regression on #46 - https://gitlab.com/libtiff/libtiff/issues/46 - http://bugzilla.maptools.org/show_bug.cgi?id=2434 - -2020-03-05 Even Rouault - - Merge branch 'freebsd-tests' into 'master' - make tests pass under FreeBSD. - - See merge request libtiff/libtiff!113 - -2020-03-05 Thomas Bernard - - make tests pass under FreeBSD. - the -I option for the GNU diff and the FreeBSD diff - behaves differently regarding escaping the ( ) and | - - By using two -I option, we avoid using such charracters. - -2020-03-05 Even Rouault - - Merge branch 'issue-31' into 'master' - HTML - - Closes #31 - - See merge request libtiff/libtiff!111 - -2020-03-05 Even Rouault - - Merge branch 'issue-179' into 'master' - tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS() - - Closes #179 - - See merge request libtiff/libtiff!112 - -2020-03-05 Thomas Bernard - - v4.1.0.html: fix for validation. - long comments were replaced - because they confused some parsers - - add DOCTYPE on v*.html. - - fix HTML files so they are valid according to https://validator.w3.org. - -2020-03-05 Thomas Bernard - - tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS() - fixes #179 - - this fixes the regression introduced in 02bb0175 / 72c4acef - ( merge request !110 ) - - It may be a better fix to do the overflow check in SETVALUE() but the - macro do { } while(0) construct makes it difficult to quit the loop - properly. - -2020-03-01 Thomas Bernard - - index.html: fix unclosed tag. - -2020-03-01 Thomas Bernard - - html: do not force colors (which are default anyway) - If needed, style should be set using CSS. - - fixes #31 - https://gitlab.com/libtiff/libtiff/issues/31 - http://bugzilla.maptools.org/show_bug.cgi?id=2326 - -2020-03-01 Even Rouault - - TIFFReadCustomDirectory(): fix potential heap buffer overflow when reading a custom directory, after a regular directory where a codec was active. Fixes https://gitlab.com/libtiff/libtiff/issues/178 - -2020-03-01 Even Rouault - - Merge branch 'issue-46' into 'master' - fix decoding of fax4 images - - Closes #46 - - See merge request libtiff/libtiff!110 - -2020-02-29 Thomas Bernard - - tif_fax3: better fix for CVE-2011-0192. - There are some legitimate case which were forbidden by the previous fix - - tif_fax3.h: allow 0 length run in DECODE2D. - fixes #46 - https://gitlab.com/libtiff/libtiff/issues/46 - http://bugzilla.maptools.org/show_bug.cgi?id=2434 - -2020-02-29 Even Rouault - - Merge branch 'mingwlibm' into 'master' - Don't use libm with libtiff due to conflict with libmsvcrt - - See merge request libtiff/libtiff!73 - -2020-02-29 Even Rouault - - Merge branch 'Rational2DoublePrecision_correction' into 'master' - tif_dirwrite.c: bugfix DoubleToSrational() for plain signed integers - - See merge request libtiff/libtiff!109 - -2020-02-29 Su_Laus - - tif_dirwrite.c: bugfix DoubleToSrational(), which returns plain signed integer values always as unsigned rationals. Add a test into rational_precision2double.c for "-1.0" and some editorials in tif_dirwrite.c. (code is related to 6df997c786928757caea0dd68d26ea5f098f49df changes). - -2020-02-29 Even Rouault - - Merge branch 'issue-174' into 'master' - tif_fax3.c: check buffer overflow in Fax4Decode() - - Closes #174 - - See merge request libtiff/libtiff!108 - -2020-02-29 Thomas Bernard - - Fax4Decode(): log error message in case of buffer overrun. - - tif_fax3.c: check buffer overflow in Fax4Decode() - fixes #174 - -2020-02-28 Even Rouault - - typo fixes in code comments. - - ToRationalEuclideanGCD: remove useless test that confuses Coverity Scan about a potential later modulo by zero - -2020-02-27 Even Rouault - - tif_dirwrite.c: fix other warnings related to 6df997c786928757caea0dd68d26ea5f098f49df changes - - rational_precision2double.c: fix many warnings, and do not build it on CMake on shared lib builds - - tif_dirwrite.c: fix various warnings found when building GDAL with internal libtiff after 6df997c786928757caea0dd68d26ea5f098f49df changes - - tif_dirwrite.c: qualify ToRationalEuclideanGCD() with static. - -2020-02-27 Even Rouault - - Merge branch 'Rational2DoublePrecision' into 'master' - Rational with Double Precision Upgrade - - See merge request libtiff/libtiff!100 - -2020-02-27 Su_Laus - - Rational with Double Precision Upgrade. - Unfortunately, custom rational tags (TIFF_RATIONAL with field_bit=FIELD_CUSTOM) are defined as TIFF_SETGET_DOUBLE - but for the reading interface and LibTiff internally they are stored ALWAYS as floating point SINGLE precision. - Double precision custom rational tags are not supported by LibTiff. - - For the GPS tags in WGS84 a higher accuracy / precision is needed. - Therefore, this upgrade is made, keeping the old interface for the already defined tags and allowing a double precision definition, - as well as calculating rationals with higher accuracy / precision. - This higher accuracy can be used for newly defined tags like that in EXIF/GPS. - - Refer also to the very old Bugzilla issue 2542 (#69) - - A test file rational_precision2double.c is added, which shows prevention of the old interface to the already defined custom rational tags - with the standard library as well as with the upgraded library. - - Also TIFFTAG_XRESOLUTION, TIFFTAG_YRESOLUTION, TIFFTAG_XPOSITION, TIFFTAG_YPOSITION amended from TIFF_SETGET_DOUBLE to TIFF_SETGET_FLOAT and testcase inserted in rational_precision2double.c - -2020-02-26 Chris Degawa - - mingw-w64 cmake: Don't find libm. - mingw-w64 will provide libm symbols by default without -lm and mingw-64's - libm is just a stub. - - This is just to make sure that on systems with msys2 and also cygwin, cmake - doesn't find a libm that actually contains math functions. - -2020-02-26 Even Rouault - - Merge branch 'division-by-zero' into 'master' - tools/tiffcp.c: fix potential division by zero - - See merge request libtiff/libtiff!83 - -2020-02-26 Even Rouault - - Merge branch 'fix-unused-warning' into 'master' - warnings: mark conditionally used parameters - - See merge request libtiff/libtiff!49 - -2020-02-26 Even Rouault - - Merge branch 'master' into 'master' - fix issue #78 warnings regarding RichTIFFIPTC data type - - Closes #78 - - See merge request libtiff/libtiff!99 - -2020-02-26 Even Rouault - - Merge branch 'win64-handle-casts-warn-fix' into 'master' - Avoid warnings about casts between HANDLE and int in Win64 builds - - Closes #2 - - See merge request libtiff/libtiff!93 - -2020-02-26 Even Rouault - - Merge branch 'bug2839' into 'master' - raw2tiff: avoid divide by 0 - - Closes #151 - - See merge request libtiff/libtiff!103 - -2020-02-26 Even Rouault - - Merge branch 'bug2669' into 'master' - tiff2pdf: palette bound check in t2p_sample_realize_palette() - - Closes #82 - - See merge request libtiff/libtiff!104 - -2020-02-26 Even Rouault - - Merge branch 'int-shift' into 'master' - tiffcrop: fix asan runtime error caused by integer promotion - - See merge request libtiff/libtiff!105 - -2020-02-26 Even Rouault - - Merge branch 'bug-2538' into 'master' - libtiff.html: fix function casing - - Closes #68 - - See merge request libtiff/libtiff!107 - -2020-02-16 Thomas Bernard - - raw2tiff: avoid divide by 0. - fixes #151 / http://bugzilla.maptools.org/show_bug.cgi?id=2839 - - first memcmp() lines before computing correlation - and always avoid divide by 0 anyway - -2020-02-09 Even Rouault - - Merge branch 'bug2855' into 'master' - tiff2ps: fix heap buffer read overflow in PSDataColorContig() - - Closes #161 - - See merge request libtiff/libtiff!102 - -2020-02-08 Thomas Bernard - - libtiff.html: fix function casing. - - libtiff.html: fix function casing. - fixes #68 / http://bugzilla.maptools.org/show_bug.cgi?id=2538 - -2020-02-08 Thomas Bernard - - tiffcrop: fix asan runtime error caused by integer promotion. - tiffcrop.c:4027:20: runtime error: left shift of 190 by 24 places cannot be represented in type 'int' - - C treats (byte << 24) as an int expression. - casting explicitly to unsigned type uint32 avoids the problem. - - the same issue has been fixed elsewhere with a24213691616e7cd35aa3e2805493de80c7e4fcf - - I detected the bug with the test file of #86 - -2020-02-08 Thomas Bernard - - tiff2pdf: palette bound check in t2p_sample_realize_palette() - fixes #82 - -2020-02-08 Thomas Bernard - - tiff2ps: fix heap buffer read overflow in PSDataColorContig() - fixes #161 / http://bugzilla.maptools.org/show_bug.cgi?id=2855 - - in 05029fb7f1ecf771abaf90b5705b6cab9eb522a7 I missed that 1 extra byte is read - in this loop. - -2020-02-05 Even Rouault - - tif_dirread.c: suppress CLang static Analyzer 9.0 false positive. - -2020-02-01 Even Rouault - - TIFFSetupStrips: enforce 2GB limitation of Strip/Tile Offsets/ByteCounts arrays - TIFFWriteDirectoryTagData() has an assertion that checks that the - arrays are not larger than 2GB. So error out earlier if in that situation. - -2020-01-29 Bob Friesenhahn - - Simplify nmake configuration for building port directory. Now there is only one boolean setting to enable building strtoll() and strtoull() port functions. The boolean setting enables the necessary port files to be built, but the remainder of the logic is via pre-processor code in the common tif_config.h, which was prepared before entering the port directory to do a build. - -2020-01-28 Bob Friesenhahn - - Make sure that tif_config.h is produced prior to entering the port directory and add an include path so that the port files can include tif_config.h. Do not actually include tif_config.h at this time since CMake and Autotools builds are not prepared for that. This issue could be handled by updating the CMake and Autotools builds or by adding a define which directs libport.h to include tif_config.h. - -2020-01-26 Bob Friesenhahn - - Fix nmake build mistakes in my last commit: - tif_config.vc.h: - - Always define HAVE_STRTOL/HAVE_STRTOUL. - Define HAVE_STRTOLL/HAVE_STRTOULL if _MSC_VER >= 1900. - - nmake.opt: - - Provide defaults suitable for MSVC prior to 14.0. - - libport.h: - - The sense of the pre-processor logic was inverted from what it - should be. The intention is to only provide the prototype if the - function is missing. - -2020-01-25 Bob Friesenhahn - - Add nmake build support for manually configuring the 'port' files to be built based on MSVC features. Include tif_config.h in tools/tiffset.c. - -2020-01-23 Even Rouault - - Adjust previous fix to avoid undue warning in some situations triggered by GDAL - -2020-01-12 Even Rouault - - _TIFFPartialReadStripArray: bring back support for non-conformant SLONG8 data type - Such as in https://github.com/OSGeo/gdal/issues/2165 - -2020-01-07 Even Rouault - - test: add test for single-strip OJPEG file without RowsPerStrip tag (like in CR2 files) - - OJPEGReadHeaderInfo: if rowsperstrip not defined, then assume one-single-strip. Complementary fix to 0356ea76bac908c61160d735f078437ace953bd3 - -2019-12-16 Angel Sánchez - - fix issue #78 warnings regarding RichTIFFIPTC data type. - -2019-12-14 Even Rouault - - contrib/oss-fuzz/build.sh: fix broken if construct. - -2019-11-28 Even Rouault - - contrib/oss-fuzz/build.sh: other attempt at fixing build failure. - -2019-11-20 Even Rouault - - contrib/oss-fuzz/build.sh: install liblzma-dev for x86_64 builds. - -2019-11-17 Even Rouault - - contrib/oss-fuzz/build.sh: install liblzma-dev:i386 on i386 builds. - -2019-11-15 Even Rouault - - Merge branch 'cmake-parse' into 'master' - CMake: simplify parsing variables from configure - - See merge request libtiff/libtiff!98 - -2019-11-15 Rolf Eike Beer - - CMake: simplify parsing variables from configure. - -2019-11-14 Even Rouault - - contrib/oss-fuzz/build.sh: fix ossfuzz build by statically linking to lzma - -2019-11-12 Even Rouault - - Merge branch 'fix_ojpeg_172' into 'master' - OJPEG: fix broken sanity check added in 4.1.0 (#fixes 172) - - See merge request libtiff/libtiff!97 - -2019-11-11 Even Rouault - - OJPEG: fix broken sanity check added in 4.1.0, and add two OJPEG test files - - test/: add missing generated .sh files. - -2019-11-04 Even Rouault - - Merge branch 'fix-missing-checks-TIFFGetField-tiffcrop' into 'master' - adds missing checks on TIFFGetField in tiffcrop tool - - Closes #170 - - See merge request libtiff/libtiff!96 - -2019-11-04 Bug Checkers - - adds missing checks on TIFFGetField in tiffcrop tool (fixes #170) - -2019-11-04 Even Rouault - - Merge branch 'adds-missing-TIFFClose-rgb2ycbcr' into 'master' - adds a missing TIFFClose in rgb2ycbcr tool - - See merge request libtiff/libtiff!95 - -2019-11-04 Mansour Ahmadi - - adds a missing TIFFClose in rgb2ycbcr tool. - -2019-11-03 Bob Friesenhahn - - libtiff 4.1.0 released. - - Added a step for updating the legacy ChangeLog file. - - Ignore emacs temporary files (ending with tilde character). - - Added release summary page for the 4.1.0 release. - - Fix Cmake HAVE_GETOPT for systems which declare getopt in stdio.h. Fix utility baked-in getopt prototype which appears when HAVE_GETOPT is not defined. - - Fax2tiff.sh needs to remove its output file in advance. Syntax changes so that bash is not required. - -2019-10-26 Even Rouault - - tif_jpeg.c: extra cast to silence Coverity warning. GDAL CID 1406475. - -2019-10-23 Even Rouault - - tif_jpeg.c: fix warning added by previous commit (on 32bit builds) - -2019-10-23 Even Rouault - - Merge branch 'coverity-fixes' into 'master' - Coverity fixes - - See merge request libtiff/libtiff!94 - -2019-10-22 Timothy Lyanguzov - - Use 64-bit calculations correctly. - - Fix size calculation to use 64-bit tmsize_t correctly. - - Make bytesperclumpline calculations using tmsize_t type. - -2019-10-03 Even Rouault - - tif_read: align code of TIFFReadRawStrip() and TIFFReadRawTile() that differed for non good reason. Non-functional change normally. (fixes GitLab #162) - -2019-10-01 Even Rouault - - HTML: update for GitLab issues. - -2019-09-29 Even Rouault - - html/v3.5.6-beta.html: redact URL of defunct web site. - - Website: update links to mailing list. - -2019-09-17 Even Rouault - - TIFFReadAndRealloc(): avoid too large memory allocation attempts. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17244 - -2019-09-03 Even Rouault - - ByteCountLooksBad and EstimateStripByteCounts: avoid unsigned integer overflows. Fixes https://oss-fuzz.com/testcase-detail/5686156066291712 and https://oss-fuzz.com/testcase-detail/6332499206078464 - -2019-09-02 Even Rouault - - tif_ojpeg.c: avoid relying on isTiled macro being wrapped in () - - tif_ojpeg.c: avoid use of uninitialized memory on edge/broken file. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16844 - - tiff_read_rgba_fuzzer.cc: add a -DSTANDALONE mode for easier reproduction of oss-fuzz reports - -2019-09-01 Even Rouault - - tif_dirread.c: allocChoppedUpStripArrays(). avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16846 - -2019-08-27 Even Rouault - - tif_ojpeg.c: avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16793 - -2019-08-26 Even Rouault - - TIFFReadDirEntryData(): rewrite to avoid unsigned integer overflow (not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16792 - - TIFFFetchDirectory(): fix invalid cast from uint64 to tmsize_t. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16784 - -2019-08-25 Even Rouault - - JPEG: avoid use of uninitialized memory on corrupted files. - Follow-up of cf3ce6fab894414a336546f62adc57f02590a22c - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16602 - Credit to OSS Fuzz - -2019-08-23 Even Rouault - - _TIFFPartialReadStripArray(): avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16685 - - OJPEGWriteHeaderInfo(): avoid unsigned integer overflow on strile dimensions close to UINT32_MAX. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16683 - - TIFFFillStrip(): avoid harmless unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16653 - - EstimateStripByteCounts(): avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16643& - - tif_ojpeg: avoid unsigned integer overflow (probably not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16635 - - tif_thunder: avoid unsigned integer overflow (not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16632 - -2019-08-22 Even Rouault - - _TIFFMultiply32() / _TIFFMultiply64(): avoid relying on unsigned integer overflow (not a bug) - - EstimateStripByteCounts(): avoid unsigned integer overflow. - -2019-08-21 Even Rouault - - EstimateStripByteCounts(): avoid unsigned integer overflow. - -2019-08-20 Even Rouault - - EstimateStripByteCounts(): avoid harmless unsigned integer overflow. - - _TIFFPartialReadStripArray(): avoid triggering unsigned integer overflow with -fsanitize=unsigned-integer-overflow (not a bug, this is well defined by itself) - -2019-08-18 Even Rouault - - tiff2ps: fix use of wrong data type that caused issues (/Height being written as 0) on 64-bit big endian platforms - -2019-08-16 Even Rouault - - setByteArray(): fix previous commit. - - setByteArray(): avoid potential signed integer overflow. Pointed by Hendra Gunadi. No actual problem known (which does not mean there wouldn't be any. Particularly on 32bit builds) - -2019-08-15 Even Rouault - - RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz - -2019-08-14 Even Rouault - - Merge branch 'fix_integer_overflow' into 'master' - Fix integer overflow in _TIFFCheckMalloc() and other implementation-defined behaviour (CVE-2019-14973) - - See merge request libtiff/libtiff!90 - -2019-08-13 Even Rouault - - Fix integer overflow in _TIFFCheckMalloc() and other implementation-defined behaviour (CVE-2019-14973) - _TIFFCheckMalloc()/_TIFFCheckRealloc() used a unsafe way to detect overflow - in the multiplication of nmemb and elem_size (which are of type tmsize_t, thus - signed), which was especially easily triggered on 32-bit builds (with recent - enough compilers that assume that signed multiplication cannot overflow, since - this is undefined behaviour by the C standard). The original issue which lead to - this fix was triggered from tif_fax3.c - - There were also unsafe (implementation defied), and broken in practice on 64bit - builds, ways of checking that a uint64 fits of a (signed) tmsize_t by doing - (uint64)(tmsize_t)uint64_var != uint64_var comparisons. Those have no known - at that time exploits, but are better to fix in a more bullet-proof way. - Or similarly use of (int64)uint64_var <= 0. - -2019-08-12 Even Rouault - - TIFFClientOpen(): fix memory leak if one of the required callbacks is not provided. Fixed Coverity GDAL CID 1404110 - - OJPEGReadBufferFill(): avoid very long processing time on corrupted files. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16400. master only - -2019-08-10 Even Rouault - - oss-fuzz/tiff_read_rgba_fuzzer.cc: fix wrong env variable value in previous commit - - oss-fuzz/tiff_read_rgba_fuzzer.cc: avoid issue with libjpeg-turbo and MSAN - - OJPEG: fix integer division by zero on corrupted subsampling factors. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15824. Credit to OSS Fuzz - - Merge branch 'ossfuzz_i386' - - contrib/oss-fuzz/build.sh: fix for i386 build of jbigkit, and use $LIB_FUZZING_ENGINE - -2019-08-10 Even Rouault - - Merge branch 'patch-1' into 'master' - fix two tiny typos - - See merge request libtiff/libtiff!89 - -2019-08-10 Reto Kromer - - fix two tiny typos. - -2019-08-09 Even Rouault - - Merge branch 'patch-1' into 'master' - fix a typo in man page - - See merge request libtiff/libtiff!88 - -2019-08-09 Reto Kromer - - fix typo. - -2019-08-04 Even Rouault - - Merge branch 'TIFFTAGID_Zero_reading_IGNORE' into 'master' - Suppressed Reading of Tiff tags with ID = 0 (like GPSVERSIONID) corrected. - - See merge request libtiff/libtiff!77 - -2019-08-04 Su Laus - - Reading of Tiff tags with ID = 0 (like GPSVERSIONID) corrected. - IGNORE placeholder in tif_dirread.c is now replaced by a field dir_ignore in the TIFFDirEntry structure - - Currently, in tif_dirread.c a special IGNORE value for the tif tags is defined - in order to flag status preventing already processed tags from further processing. - This irrational behaviour prevents reading of custom tags with id code 0 - like tag GPSVERSIONID from EXIF 2.31 definition. - - An additional field 'tdir_ignore' is now added to the TIFFDirEntry structure and code is changed - to allow tags with id code 0 to be read correctly. - - This change was already proposed as pending improvement in tif_dirread.c around line 32. - - Reference is also made to: - - Discussion in https://gitlab.com/libtiff/libtiff/merge_requests/39 - - http://bugzilla.maptools.org/show_bug.cgi?id=2540 - - Comments and indentation adapted. - - Preparation to rebase onto master - -2019-07-16 Even Rouault - - Merge branch 'cmake_amd64' into 'master' - CMakeLists.txt: properly set value of HOST_FILLORDER to LSB2MSB for Windows CMake builds - - See merge request libtiff/libtiff!87 - -2019-07-15 Even Rouault - - CMakeLists.txt: properly set value of HOST_FILLORDER to LSB2MSB for Windows CMake builds - As can be seen in https://ci.appveyor.com/project/rleigh-codelibre/libtiff-didfs/builds/25846668/job/ory5w098j8wcij9x - log, the HOST_FILLORDER is not properly set: - - [00:02:58] -- CMAKE_HOST_SYSTEM_PROCESSOR set to AMD64 - [00:02:58] -- HOST_FILLORDER set to FILLORDER_MSB2LSB - - The reason is that we match the "amd64.*" lowercase string whereas - CMAKE_HOST_SYSTEM_PROCESSOR is set to AMD64 uppercase. - -2019-07-09 Even Rouault - - TIFFWriteCheck(): call TIFFForceStrileArrayWriting() when needed (should have gone with eaeca6274ae71cdfaeb9f673b6fb0f3cfc0e6ce5) (master only) - -2019-07-09 Even Rouault - - Merge branch 'fix_chromium_925269' into 'master' - OJPEG: avoid use of uninitialized memory on corrupted files - - See merge request libtiff/libtiff!86 - -2019-07-05 Even Rouault - - OJPEG: avoid use of uninitialized memory on corrupted files. - Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=925269 - Patch from Lei Zhang with little adaptations. - -2019-06-29 Even Rouault - - Merge branch 'fix-division-by-zero' into 'master' - Return infinite distance when denominator is zero. - - See merge request libtiff/libtiff!85 - -2019-06-29 Dirk Lemstra - - Return infinite distance when denominator is zero. - -2019-06-29 Even Rouault - - Merge branch 'typetests' into 'master' - Add test to check that libtiff types have the correct size - - See merge request libtiff/libtiff!57 - -2019-05-31 Thomas Bernard - - make TIFF_SSIZE_T the same bitwidth as TIFF_SIZE_T. - it was previously the same bitwidth as unsigned char * - Pointers can be larger than size_t. - -2019-05-31 Thomas Bernard - - Add test to check that libtiff types have the correct size. - in configure/CMakeList.txt : - - - TIFF_INT8_T/TIFF_UINT8_T is signed/unsigned char - sizeof(char)==1 in C standard - - TIFF_INT16_T/TIFF_UINT16_T is signed/unsigned short - sizeof(short)>=2 in C standard - - TIFF_INT32_T/TIFF_UINT32_T is defined so its sizeof() is 4 - - - TIFF_INT64_T/TIFF_UINT64_T is defined so its sizeof() is 8 - - - TIFF_SIZE_T is defined so it has same sizeof() than size_t - - - TIFF_SSIZE_T is defined so it has same sizeof() than unsigned char * - -2019-05-29 Even Rouault - - Merge branch 'defer_strile_writing' into 'master' - Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() - - See merge request libtiff/libtiff!82 - -2019-05-29 Even Rouault - - Merge branch 'TIFFReadFromUserBuffer' into 'master' - Add TIFFReadFromUserBuffer() - - See merge request libtiff/libtiff!81 - -2019-05-26 Even Rouault - - Fix vulnerability in 'D' (DeferStrileLoad) mode (master only) (fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14908) - -2019-05-25 Even Rouault - - Replace 'stripped' by 'striped' in error messages. - -2019-05-25 Even Rouault - - Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() - Those advanced writing functions must be used in a particular sequence - to make their intended effect. Their aim is to control when/where - the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file. - - The purpose of this is to generate 'cloud-optimized geotiff' files where - the first KB of the file only contain the IFD entries without the potentially - large strile arrays. Those are written afterwards. - - The typical sequence of calls is: - TIFFOpen() - [ TIFFCreateDirectory(tif) ] - Set fields with calls to TIFFSetField(tif, ...) - TIFFDeferStrileArrayWriting(tif) - TIFFWriteCheck(tif, ...) - TIFFWriteDirectory(tif) - ... potentially create other directories and come back to the above directory - TIFFForceStrileArrayWriting(tif): emit the arrays at the end of file - - See test/defer_strile_writing.c for a practical example. - -2019-05-24 Even Rouault - - Fix vulnerability introduced by defer strile loading (master only) - Found on GDAL with https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14894 - Disabling the TIFF_DEFERSTRILELOAD bit in ChopupStripArray() was a - bad idea since when using TIFFReadDirectory() to reload the directory again - would lead to a different value of td_rowsperstrip, which could confuse - readers if they relied on the value found initially. - - Fix typo in error message (master only) - -2019-05-22 Even Rouault - - Add TIFFReadFromUserBuffer() - This function replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile() - when the user can provide the buffer for the input data, for example when - he wants to avoid libtiff to read the strile offset/count values from the - [Strip|Tile][Offsets/ByteCounts] array. - - libtiff.def: add missing new symbols. - - test/defer_strile_loading.c: fix warning with Visual C++ - - _TIFFRewriteField(): fix for bigtiff case (master only) - 116cf67f4c59196605abdb244657c3070c4310af made StripByteCount/TileByteCount to - always be rewritten as TIFF_LONG8. - -2019-05-21 Even Rouault - - Merge branch 'ondemand_strile_offbytecount_loading' into 'master' - Make defer strile offset/bytecount loading available at runtime - - See merge request libtiff/libtiff!79 - -2019-05-21 Even Rouault - - Merge branch 'bigtiff_write_bytecount_on_long_when_possible' into 'master' - Create TileByteCounts/StripByteCounts tag with SHORT (ClassicTIFF/BigTIFF) or LONG (BigTIFF) type when possible - - See merge request libtiff/libtiff!78 - -2019-05-21 Even Rouault - - Merge branch 'html_link' into 'master' - libtiff.html, bigtiffpr.html: absolute => relative link - - See merge request libtiff/libtiff!80 - -2019-05-14 Thomas Bernard - - libtiff.html, bigtiffpr.html: absolute => relative link. - -2019-05-10 Even Rouault - - Make defer strile offset/bytecount loading available at runtime. - ... and add per-strile offset/bytecount loading capabilities. - - Part of this commit makes the behaviour that was previously met when - libtiff was compiled with -DDEFER_STRILE_LOAD available for default builds - when specifying the new 'D' (Deferred) TIFFOpen() flag. In that mode, the [Tile/Strip][ByteCounts/Offsets] - arrays are only loaded when first accessed. This can speed-up the opening - of files stored on the network when just metadata retrieval is needed. - This mode has been used for years by the GDAL library when compiled with - its embedded libtiff copy. - - To avoid potential out-of-tree code (typically codecs) that would use - the td_stripbytecount and td_stripoffset array inconditionnaly assuming they - have been loaded, those have been suffixed with _p (for protected). The - use of the new functions mentioned below is then recommended. - - Another addition of this commit is the capability of loading only the - values of the offset/bytecount of the strile of interest instead of the - whole array. This is enabled with the new 'O' (Ondemand) flag of TIFFOpen() - (which implies 'D'). That behaviour has also been used by GDAL, which hacked - into the td_stripoffset/td_stripbytecount arrays directly. The new code - added in the _TIFFFetchStrileValue() and _TIFFPartialReadStripArray() internal - functions is mostly a port of what was in GDAL GTiff driver previously. - - Related to that, the public TIFFGetStrileOffset[WithErr]() and TIFFGetStrileByteCount[WithErr]() - functions have been added to API. They are of particular interest when - using sparse files (with offset == bytecount == 0) and you want to detect - if a strile is present or not without decompressing the data, or updating - an existing sparse file. - They will also be used to enable a future enhancement where client code can entirely - skip bytecount loading in some situations - - A new test/defer_strile_loading.c test has been added to test the above - capabilities. - -2019-05-10 Even Rouault - - Creation: use SHORT type when possible for StripByteCounts/TileByteCounts - This follows the same logic as previous commit. - -2019-05-09 Even Rouault - - BigTIFF creation: write TileByteCounts/StripByteCounts tag with LONG when possible - In most situations of BigTIFF file, the tile/strip sizes are of reasonable size, - that is they fit on a 4-byte LONG. So in that case, use LONG instead of LONG8 - to save some space. For uncompressed file, it is easy to detect such situations - by checking at the TIFFTileSize64()/TIFFStripSize64() return. For compressed file, - we must take into account the fact that compression may sometimes result in - larger compressed data. So we allow this optimization only for a few select - compression times, and take a huge security margin (10x factor). We also only - apply this optimization on multi-strip files, so as to allow easy on-the-fly - growing of single-strip files whose strip size could grow above the 4GB threshold. - - This change is compatible with the BigTIFF specification. According to - https://www.awaresystems.be/imaging/tiff/bigtiff.html: - "The StripOffsets, StripByteCounts, TileOffsets, and TileByteCounts tags are - allowed to have the datatype TIFF_LONG8 in BigTIFF. Old datatypes TIFF_LONG, - and TIFF_SHORT where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too. " - On a practical point of view, this is also compatible on reading/writing of - older libtiff 4.X versions. - - The only glitch I found, which is rather minor, is when using such a BigTIFF - file with TileByteCounts/StripByteCounts written with TIFF_LONG, and updating - it with an older libtiff 4.X version with a change in the - [Tile/Strip][ByteCounts/Offsets] array. In that case the _TIFFRewriteField() - function will rewrite the directory and array with TIFF_LONG8, instead of updating - the existing array (this is an issue fixed by this commit). The file will - still be valid however, hence the minor severity of this. - -2019-05-08 Even Rouault - - Merge branch 'bug2799' into 'master' - fix fax2tiff - - See merge request libtiff/libtiff!55 - -2019-05-08 Even Rouault - - Merge branch 'bug_2829' into 'master' - WIN32: use tif_win32.c when building with CMake - - See merge request libtiff/libtiff!75 - -2019-05-06 Even Rouault - - Merge branch 'FILESOURCE_SCENETYPE_reading' into 'master' - Reading error for FileSource and SceneType tags corrected. - - See merge request libtiff/libtiff!76 - -2019-05-06 Su Laus - - Reading error for FileSource and SceneType tags corrected. - EXIF tags FILESOURCE and SCENETYPE are defined as TIFF_UNDEFINED and field_readcount==1! - There is a bug in TIFFReadDirEntryByte() preventing to read correctly type TIFF_UNDEFINED fields with field_readcount==1 - Upgrade of TIFFReadDirEntryByte() with added TIFF_UNDEFINED switch-entry allows libtiff to read those tags correctly. - -2019-04-25 Thomas Bernard - - WIN32: use tif_win32.c when building with CMake. - see http://bugzilla.maptools.org/show_bug.cgi?id=2829 - - the top CMakeLists.txt defines - win32_io and USE_WIN32_FILEIO - - WIN32_IO is defined nowhere in CMake (only in automake things) - -2019-04-25 Even Rouault - - Merge branch 'gitlab_pages' into 'master' - Advertise https://libtiff.gitlab.io/libtiff/ as mirror - - See merge request libtiff/libtiff!70 - -2019-04-25 Even Rouault - - Merge branch 'bug_2844' into 'master' - tiff2ps.c: PSDataColorContig(): avoid heap buffer overrun - - See merge request libtiff/libtiff!69 - -2019-04-25 Even Rouault - - Merge branch 'issue_2785' into 'master' - tiff2pdf.c: don't call t2p_tile_collapse_left() for Ycbcr - - See merge request libtiff/libtiff!64 - -2019-04-11 Even Rouault - - Merge branch 'fix_gdal_1439' into 'master' - TIFFWriteEncodedStrip/TIFFWriteEncodedTile: fix rewriting of LZW-compressed data - - See merge request libtiff/libtiff!74 - -2019-04-11 Even Rouault - - TIFFWriteEncodedStrip/TIFFWriteEncodedTile: fix rewriting of LZW-compressed data - Fixes https://github.com/OSGeo/gdal/issues/1439 - - When rewriting a LZW tile/strip whose existing size is very close to a multiple of - 1024 bytes (and larger than 8192 bytes) with compressed data that is larger, - the new data was not placed at the end of the file, causing corruption. - -2019-04-08 Even Rouault - - Merge branch 'bug2848' into 'master' - tif_luv.c: LogLuvSetupEncode() error must return 0 - - See merge request libtiff/libtiff!72 - -2019-04-03 Thomas Bernard - - build/gitlab-ci: fix typo. - - show test-suite.log in gitlab-ci. - useful when build fails - - Add output check for tiff2ps. - note : the reference files have been generated in master branch - -2019-03-23 Even Rouault - - tif_read.c: potentially fix false positive from Coverity Scan. CID 1400288 - - tif_read.c: potentially fix false positive from Coverity Scan. CID 1400271 - - tif_zip.c: remove dead code. CID 1400360. - - tif_webp.c: remove false positive warning about dereference before null check. CID 1400255 - - tif_pixarlog.c: remove dead code. CID 1400342. - - tif_pixarlog.c: avoid false positive Coverity Scan warnings about overflow. CID 1400300 and 1400367 - - tif_lzw.c: silence CoverityScan false positive. CID 1400355. - - tif_luv.c: silence CoverityScan false positive. CID 1400231, 1400251, 1400254, 1400272, 1400318, 1400356 - - TryChopUpUncompressedBigTiff(): avoid potential division by zero. master only. GDAL Coverity CID 1400263 - -2019-03-22 Thomas Bernard - - tif_luv.c: LogLuvSetupEncode() error must return 0. - see http://bugzilla.maptools.org/show_bug.cgi?id=2848 - - if wrongly returning 1, the processing of incorrect file continues, - which causes problems. - -2019-03-22 Thomas Bernard - - add a test for fax2tiff tool. - -2019-02-28 Thomas Bernard - - tiff2pdf.c: don't call t2p_tile_collapse_left() when buffer size is wrong - see http://bugzilla.maptools.org/show_bug.cgi?id=2785 - - Advertise https://libtiff.gitlab.io/libtiff/ as mirror. - I'm put it above the maptools.org mirror because - Even Rouault believe at some point it will be completely removed - -2019-02-28 Even Rouault - - Merge branch 'bug_2826' into 'master' - tiff2pdf.c: check colormap pointers when loading CMYK with colormap - - See merge request libtiff/libtiff!65 - -2019-02-28 Thomas Bernard - - tiff2pdf.c: check colormap pointers. - Avoid access to non initialized pointers - http://bugzilla.maptools.org/show_bug.cgi?id=2826 - -2019-02-27 Even Rouault - - Merge branch 'fix_warnings' into 'master' - tiff2ps.c: fix warning caused by integer promotion - - See merge request libtiff/libtiff!68 - -2019-02-23 Thomas Bernard - - PSDataColorContig(): avoid heap buffer overrun. - fixes http://bugzilla.maptools.org/show_bug.cgi?id=2844 - each iteration of the loop read nc bytes - -2019-02-22 Thomas Bernard - - tiff2ps.c: fix warning caused by integer promotion. - uint8 value is promoted to int in (value << 24) so -fsanitize - yield runtime errors : - tiff2ps.c:2969:33: runtime error: left shift of 246 by 24 places cannot be represented in type 'int' - -2019-02-22 Even Rouault - - Merge branch 'large_strile_improvements' into 'master' - Large strile support improvements - - See merge request libtiff/libtiff!63 - -2019-02-21 Even Rouault - - Merge branch 'gitlab-pages' into 'master' - ci: Add pages job - - See merge request libtiff/libtiff!45 - -2019-02-19 Even Rouault - - Merge branch 'issue_2833' into 'master' - tiffcp.c: check that (Tile Width)*(Samples/Pixel) do no overflow - - See merge request libtiff/libtiff!60 - -2019-02-19 Even Rouault - - Merge branch 'issue_2831' into 'master' - tiffcrop.c: fix invertImage() for bps 2 and 4 - - See merge request libtiff/libtiff!61 - -2019-02-19 Even Rouault - - Merge branch 'issue_2842' into 'master' - move _TIFFClampDoubleToFloat() to tif_aux.c - - See merge request libtiff/libtiff!62 - -2019-02-19 Even Rouault - - tif_zip.c: allow reading and writing strips/tiles with more than 4 GB of compressed or uncompressed data - - tif_dirread.c: when strip chopping is enabled, extend this mechanism to multi-strip uncompressed files with strips larger than 2GB to expose them as strips of ~500 MB - -2019-02-19 Even Rouault - - Merge branch 'size_t_typo' into 'master' - CMakeLists.txt: fix TIFF_SIZE_T - - See merge request libtiff/libtiff!59 - -2019-02-12 Thomas Bernard - - move _TIFFClampDoubleToFloat() to tif_aux.c. - the same function was declared in tif_dir.c and tif_dirwrite.c - - see http://bugzilla.maptools.org/show_bug.cgi?id=2842 - -2019-02-11 Thomas Bernard - - tiffcrop.c: fix invertImage() for bps 2 and 4. - too much bytes were processed, causing a heap buffer overrun - http://bugzilla.maptools.org/show_bug.cgi?id=2831 - the loop counter must be - for (col = 0; col < width; col += 8 / bps) - - Also the values were not properly calculated. It should be - 255-x, 15-x, 3-x for bps 8, 4, 2. - - But anyway it is easier to invert all bits as 255-x = ~x, etc. - (subtracting from a binary number composed of all 1 is like inverting - the bits) - -2019-02-11 Thomas Bernard - - tiffcp.c: use INT_MAX. - - check that (Tile Width)*(Samples/Pixel) do no overflow. - fixes bug 2833 - -2019-02-03 Thomas Bernard - - CMakeLists.txt: fix TIFF_SIZE_T. - -2019-02-02 Even Rouault - - Merge branch 'master' into 'master' - Fix for simple memory leak that was assigned CVE-2019-6128. - - See merge request libtiff/libtiff!50 - -2019-02-02 Even Rouault - - Merge branch 'bug2835' into 'master' - tiff2ps: fix heap-buffer-overflow - - See merge request libtiff/libtiff!53 - -2019-02-02 Even Rouault - - Fix warning (use of uninitialized value) added per d0a842c5dbad2609aed43c701a12ed12461d3405 (fixes https://gitlab.com/libtiff/libtiff/merge_requests/54#note_137742985) - -2019-02-02 Yuri Aksenov - - fix fax2tiff. - see http://bugzilla.maptools.org/show_bug.cgi?id=2799 - fixes d9bc8472e72549f29c0062c1cbd3d56f279f3be2 - -2019-02-02 Even Rouault - - Merge branch 'tiffcrop' into 'master' - tiffcrop: shut up clang warnings - - See merge request libtiff/libtiff!52 - -2019-02-01 Even Rouault - - Merge branch 'bug2833' into 'master' - TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing - - See merge request libtiff/libtiff!54 - -2019-02-01 Even Rouault - - Merge branch 'gitignore' into 'master' - add test/ files to .gitignore - - See merge request libtiff/libtiff!56 - -2019-02-01 Even Rouault - - Merge branch 'master' into 'master' - tif_dir: unset transferfunction field if necessary (CVE-2018-19210) - - See merge request libtiff/libtiff!47 - -2019-01-29 Thomas Bernard - - add test/ files to .gitignore. - -2019-01-29 Thomas Bernard - - TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing. - http://bugzilla.maptools.org/show_bug.cgi?id=2833 - - we must check the pointer is not NULL before memcmp() the memory - -2019-01-29 Thomas Bernard - - tiff2ps: fix heap-buffer-overflow. - http://bugzilla.maptools.org/show_bug.cgi?id=2834 - - usually the test (i < byte_count) is OK because the byte_count is divisible by samplesperpixel. - But if that is not the case, (i + ncomps) < byte_count should be used, or - maybe (i + samplesperpixel) <= byte_count - -2019-01-28 Thomas Bernard - - tiffcrop: shut up clang warnings. - make the out filename building a bit more simple - and remove the use of strcat() - -2019-01-23 Scott Gayou - - Fix for simple memory leak that was assigned CVE-2019-6128. - pal2rgb failed to free memory on a few errors. This was reported - here: http://bugzilla.maptools.org/show_bug.cgi?id=2836. - -2019-01-05 Bob Friesenhahn - - Fix tiff2ps error regarding "Inconsistent value of es" by allowing es to be zero. Problem was reported to the tiff mailing list by Julian H. Stacey on January 5, 2019. - -2018-12-13 Hugo Lefeuvre - - tif_dir: unset transferfunction field if necessary. - The number of entries in the transfer table is determined as following: - - (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1 - - This means that whenever td->td_samplesperpixel or td->td_extrasamples are - modified we also need to make sure that the number of required entries in - the transfer table didn't change. - - If it changed and the number of entries is higher than before we should - invalidate the transfer table field and free previously allocated values. - In the other case there's nothing to do, additional tf entries won't harm - and properly written code will just ignore them since spp - es < 1. - - For instance this situation might happen when reading an OJPEG compressed - image with missing SamplesPerPixel tag. In this case the SamplesPerPixel - field might be updated after setting the transfer table. - - see http://bugzilla.maptools.org/show_bug.cgi?id=2500 - - This commit addresses CVE-2018-19210. - -2018-12-08 Bob Friesenhahn - - Do not attempt to re-sync zip stream after reported data error from inflate(). - -2018-12-07 Even Rouault - - Merge branch 'resource-leaks' into 'master' - Fix two resource leaks - - See merge request libtiff/libtiff!43 - -2018-12-07 Even Rouault - - Merge branch 'build-jbig' into 'master' - add jbig support to the fuzzer - - See merge request libtiff/libtiff!42 - -2018-12-01 Bob Friesenhahn - - tiffcrop.c: Avoid new clang warning about tools/tiffcrop.c "size argument in 'strncat' call appears to be size of the source". - -2018-11-28 Even Rouault - - Merge branch 'webp_memleak' into 'master' - fixed mem leak in webp compression - - See merge request libtiff/libtiff!48 - -2018-11-28 Norman Barker - - fixed mem leak in webp compression. - -2018-11-20 Even Rouault - - Merge branch 'lossless_webp' into 'master' - fixed lossless webp compression config - - See merge request libtiff/libtiff!46 - -2018-11-20 Norman Barker - - fixed lossless webp compression config. - -2018-11-18 Bob Friesenhahn - - snprintf porting fix for Visual Studio 2003. - -2018-11-18 Roger Leigh - - ci: Add pages job. - -2018-11-10 Bob Friesenhahn - - Change references from defunct ftp site to https site. - -2018-11-10 Bob Friesenhahn - - * configure.ac: libtiff 4.0.10 released. - - Change COMPRESSION_ZSTD to 50000 and COMPRESSION_WEBP to 50001. - -2018-11-04 Bob Friesenhahn - - Added preliminary release notes for release 4.0.10. - -2018-11-03 Bob Friesenhahn - - tiff2pdf: Eliminate compiler warning about snprintf output truncation when formatting pdf_datetime. - -2018-11-03 Olivier Paquet - - Merge branch 'no_tif_platform_console' into 'master' - Remove builtin support for GUI warning and error message boxes - - See merge request libtiff/libtiff!24 - -2018-11-03 Bob Friesenhahn - - tiffcrop.c: Eliminate compiler warning about snprintf output truncation when formatting filenum. - - TWebPVGetField(): Add apparently missing break statement impacting TIFFTAG_WEBP_LOSSLESS. - - Eliminate compiler warnings about duplicate definitions of streq/strneq macros. - - Ignore generated files. - - Remove and ignore files which are a product of autogen.sh. - -2018-11-02 Bob Friesenhahn - - Fix TIFFErrorExt() formatting of size_t type for 32-bit compiles. - -2018-10-30 Even Rouault - - tiff2bw: avoid null pointer dereference in case of out of memory situation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2819 / CVE-2018-18661 - - tiffio.h: fix comment. - -2018-10-26 Even Rouault - - Merge branch 'header2' into 'master' - Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h - - See merge request libtiff/libtiff!41 - -2018-10-26 Kurt Schwehr - - Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h. - -2018-10-25 Even Rouault - - Merge branch 'headers' into 'master' - Add includes to headers to allow them to stand alone. - - See merge request libtiff/libtiff!40 - -2018-10-24 Kurt Schwehr - - Add includes to headers to allow them to stand alone. - This allows compilers that can do header stand alone header parsing - to process libtiff. - -2018-10-18 Even Rouault - - LZMAPreEncode: emit verbose error if lzma_stream_encoder() fails (typically because not enough memory available) - -2018-10-17 Even Rouault - - tif_webp.c: fix previous commit that broke scanline decoding. - - tif_webp.c: fix potential read outside libwebp buffer on corrupted images - -2018-10-14 Even Rouault - - Merge branch 'jbig_decode_overflow' into 'master' - JBIG: fix potential out-of-bounds write in JBIGDecode() - - See merge request libtiff/libtiff!38 - -2018-10-14 Even Rouault - - JBIG: fix potential out-of-bounds write in JBIGDecode() - JBIGDecode doesn't check if the user provided buffer is large enough - to store the JBIG decoded image, which can potentially cause out-of-bounds - write in the buffer. - This issue was reported and analyzed by Thomas Dullien. - - Also fixes a (harmless) potential use of uninitialized memory when - tif->tif_rawsize > tif->tif_rawcc - - And in case libtiff is compiled with CHUNKY_STRIP_READ_SUPPORT, make sure - that whole strip data is provided to JBIGDecode() - -2018-10-05 Even Rouault - - tif_webp.c: fix scanline reading/writing. - - WEBP codec: initialize nSamples in TWebPSetupDecode() and TWebPSetupEncode() - -2018-10-05 Even Rouault - - Merge branch 'tif_webp' into 'master' - webp support - - See merge request libtiff/libtiff!32 - -2018-10-05 Norman Barker - - webp in tiff. - -2018-09-17 Even Rouault - - Merge branch 'master' into 'master' - fix three potential vulnerabilities. - - See merge request libtiff/libtiff!33 - -2018-09-08 Young_X - - fix out-of-bound read on some tiled images. - - avoid potential int32 overflows in multiply_ms() - - only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4 - -2018-08-15 Even Rouault - - TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit systems with large number of strips. Probably relates to http://bugzilla.maptools.org/show_bug.cgi?id=2788 / CVE-2018-10779 - -2018-08-07 Even Rouault - - ZSTD: fix flush issue that can cause endless loop in ZSTDEncode() - Fixes https://github.com/OSGeo/gdal/issues/833 - -2018-08-07 Even Rouault - - Merge branch 'fix_bug_2800' into 'master' - Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API - - See merge request libtiff/libtiff!31 - -2018-08-07 Even Rouault - - Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2800 - -2018-07-05 Even Rouault - - Add tag and pseudo-tag definitions for ESRI LERC codec (out of tree codec whose source is at https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c) - -2018-07-02 Even Rouault - - Fix TIFFTAG_ZSTD_LEVEL pseudo tag value to be > 65536, and the next one in the series - -2018-05-25 Stefan Weil - - Remove builtin support for GUI warning and error message boxes. - Now warnings always go to the console by default unless applications - define their own warning and error handlers. - - GUI applications (and Windows CE) are required to define such handlers. - -2018-05-12 Even Rouault - - LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905 - The fix consists in using the similar code LZWDecode() to validate we - don't write outside of the output buffer. - - TIFFFetchNormalTag(): avoid (probably false positive) clang-tidy clang-analyzer-core.NullDereference warnings - - TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 - -2018-05-04 Even Rouault - - tif_color.c: fix code comment. - -2018-04-17 Even Rouault - - Merge branch 'fuzzer-fix' into 'master' - remove a pointless multiplication and a variable that's not necessary - - See merge request libtiff/libtiff!29 - -2018-04-17 Paul Kehrer - - remove a pointless multiplication and a variable that's not necessary. - -2018-04-17 Even Rouault - - Merge branch 'ossfuzz' into 'master' - move oss-fuzz build script and fuzzer into libtiff tree - - See merge request libtiff/libtiff!28 - -2018-04-17 Paul Kehrer - - move oss-fuzz build script and fuzzer into libtiff tree. - -2018-04-14 Even Rouault - - _TIFFGetMaxColorChannels: update for LOGLUV, ITULAB and ICCLAB that have 3 color channels - -2018-04-12 Even Rouault - - Fix MSVC warning. - -2018-04-12 Even Rouault - - Merge branch 'master' into 'master' - Fix NULL pointer dereference in TIFFPrintDirectory (bugzilla 2778/CVE-2018-7456) - - See merge request libtiff/libtiff!27 - -2018-04-11 Hugo Lefeuvre - - Fix NULL pointer dereference in TIFFPrintDirectory. - The TIFFPrintDirectory function relies on the following assumptions, - supposed to be guaranteed by the specification: - - (a) A Transfer Function field is only present if the TIFF file has - photometric type < 3. - - (b) If SamplesPerPixel > Color Channels, then the ExtraSamples field - has count SamplesPerPixel - (Color Channels) and contains - information about supplementary channels. - - While respect of (a) and (b) are essential for the well functioning of - TIFFPrintDirectory, no checks are realized neither by the callee nor - by TIFFPrintDirectory itself. Hence, following scenarios might happen - and trigger the NULL pointer dereference: - - (1) TIFF File of photometric type 4 or more has illegal Transfer - Function field. - - (2) TIFF File has photometric type 3 or less and defines a - SamplesPerPixel field such that SamplesPerPixel > Color Channels - without defining all extra samples in the ExtraSamples fields. - - In this patch, we address both issues with respect of the following - principles: - - (A) In the case of (1), the defined transfer table should be printed - safely even if it isn't 'legal'. This allows us to avoid expensive - checks in TIFFPrintDirectory. Also, it is quite possible that - an alternative photometric type would be developed (not part of the - standard) and would allow definition of Transfer Table. We want - libtiff to be able to handle this scenario out of the box. - - (B) In the case of (2), the transfer table should be printed at its - right size, that is if TIFF file has photometric type Palette - then the transfer table should have one row and not three, even - if two extra samples are declared. - - In order to fulfill (A) we simply add a new 'i < 3' end condition to - the broken TIFFPrintDirectory loop. This makes sure that in any case - where (b) would be respected but not (a), everything stays fine. - - (B) is fulfilled by the loop condition - 'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as - long as (b) is respected. - - Naturally, we also make sure (b) is respected. This is done in the - TIFFReadDirectory function by making sure any non-color channel is - counted in ExtraSamples. - - This commit addresses CVE-2018-7456. - -2018-03-27 Even Rouault - - Merge branch 'tiffset-long8' into 'master' - tiffset: Add support for LONG8, SLONG8 and IFD8 field types - - See merge request libtiff/libtiff!25 - -2018-03-26 Roger Leigh - - port: Clean up NetBSD sources and headers to build standalone. - -2018-03-23 Roger Leigh - - port: Add strtol, strtoll and strtoull. - Also update strtoul. All use the same implementation from NetBSD libc. - - tiffset: Add support for LONG8, SLONG8 and IFD8 field types. - -2018-03-17 Even Rouault - - ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) - Rework fix done in 3719385a3fac5cfb20b487619a5f08abbf967cf8 to work in more - cases like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6979. - Credit to OSS Fuzz - - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724 - -2018-03-13 Even Rouault - - libtiff/tif_luv.c: rewrite loops in a more readable way (to avoid false positive reports like http://bugzilla.maptools.org/show_bug.cgi?id=2779) - -2018-03-13 Even Rouault - - Merge branch 'avoid_memory_exhaustion_in_ChopUpSingleUncompressedStrip' into 'master' - ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) - - See merge request libtiff/libtiff!26 - -2018-03-11 Even Rouault - - ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) - In ChopUpSingleUncompressedStrip(), if the computed number of strips is big - enough and we are in read only mode, validate that the file size is consistent - with that number of strips to avoid useless attempts at allocating a lot of - memory for the td_stripbytecount and td_stripoffset arrays. - - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724 - -2018-03-10 Even Rouault - - Typo fix in comment. - -2018-03-03 Even Rouault - - Avoid warning with gcc 8 (partially revert 647b0e8c11ee11896f319b92cf110775f538d75c) - -2018-02-25 Even Rouault - - Merge branch 'typos' into 'master' - Fix some typos - - See merge request libtiff/libtiff!23 - -2018-02-24 Stefan Weil - - Fix some typos. - Most of them were found by codespell. - -2018-02-14 Even Rouault - - Typo fix in comment. - - Merge branch 'zstd' - - Add warning about COMPRESSION_ZSTD not being officially registered. - -2018-02-14 Even Rouault - - Merge branch 'bug2772' into 'master' - Fix for bug 2772 - - See merge request libtiff/libtiff!20 - -2018-02-12 Nathan Baker - - Fix for bug 2772. - It is possible to craft a TIFF document where the IFD list is circular, - leading to an infinite loop while traversing the chain. The libtiff - directory reader has a failsafe that will break out of this loop after - reading 65535 directory entries, but it will continue processing, - consuming time and resources to process what is essentially a bogus TIFF - document. - - This change fixes the above behavior by breaking out of processing when - a TIFF document has >= 65535 directories and terminating with an error. - -2018-02-09 Even Rouault - - Merge branch 'libtiff-as-subdirectory-fixes' into 'master' - Prefer target_include_directories - - See merge request libtiff/libtiff!12 - -2018-02-06 Even Rouault - - Merge branch 'cmake-cleanups' into 'master' - Cmake cleanups - - See merge request libtiff/libtiff!11 - -2018-02-06 Even Rouault - - Merge branch 'check-right-cxx-variable' into 'master' - Check right cxx variable - - See merge request libtiff/libtiff!19 - -2018-02-06 Even Rouault - - Merge branch 'dont-leak-stream-open' into 'master' - Fix a memory leak in TIFFStreamOpen - - See merge request libtiff/libtiff!17 - -2018-02-06 Ben Boeckel - - cmake: check CXX_SUPPORT. - This variable is set in response to the `cxx` cache variable; use it - instead. - -2018-02-04 Olivier Paquet - - Merge branch 'warnings' into 'master' - Fix all compiler warnings for default build - - See merge request libtiff/libtiff!16 - -2018-02-04 Nathan Baker - - Fix all compiler warnings for default build. - -2018-01-30 Paul Kehrer - - tabs are hard. - -2018-01-29 Paul Kehrer - - use hard tabs like the rest of the project. - - Fix a memory leak in TIFFStreamOpen. - TIFFStreamOpen allocates a new tiff{o,i}s_data, but if TIFFClientOpen - fails then that struct is leaked. Delete it if the returned TIFF * is - null. - -2018-01-29 Kevin Funk - - Bump minimum required CMake version to v2.8.11. - Because we use the BUILD_INTERFACE generator expression - -2018-01-27 Even Rouault - - Merge branch 'patch-1' into 'master' - Update CMakeLists.txt for build fix on Windows - - See merge request libtiff/libtiff!14 - -2018-01-27 Even Rouault - - Merge branch 'patch-2' into 'master' - Update tiffgt.c for build fix on Windows - - See merge request libtiff/libtiff!13 - -2018-01-25 Olivier Paquet - - Merge branch 'bug2750' into 'master' - Add workaround to pal2rgb buffer overflow. - - See merge request libtiff/libtiff!15 - -2018-01-25 Nathan Baker - - Add workaround to pal2rgb buffer overflow. - -2018-01-23 Andrea - - Update tiffgt.c for build fix on Windows. - - Update CMakeLists.txt for build fix on Windows. - -2018-01-15 Even Rouault - - Merge branch 'has-attribute-check' into 'master' - tiffiop: use __has_attribute to detect the no_sanitize attribute - - See merge request libtiff/libtiff!10 - -2018-01-15 Ben Boeckel - - cmake: avoid setting hard-coded variables in the cache. - - cmake: avoid an unnecessary intermediate variable. - - cmake: avoid an unnecessary intermediate variable. - - cmake: avoid tautological logic. - - cmake: use check_symbol_exists. - This accounts for symbols being provided by macros. - - cmake: remove unused configure checks. - -2018-01-12 Kevin Funk - - Prefer target_include_directories. - When libtiff is included in a super project via a simple - `add_subdirectory(libtiff)`, this way the `tiff` library target has all - the necessary information to build against it. - - Note: The BUILD_INTERFACE generator expression feature requires at least - CMake v2.8.11 if I'm correct. - -2018-01-09 Ben Boeckel - - tiffiop: use __has_attribute to detect the no_sanitize attribute. - -2017-12-31 Even Rouault - - man/TIFFquery.3tiff: remove reference to non-existing TIFFReadStrip() function in TIFFIsByteSwapped() documentation. Patch by Eric Piel. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2763 - - libtiff/tif_dir.c: _TIFFVGetField(): fix heap out-of-bounds access when requesting TIFFTAG_NUMBEROFINKS on a EXIF directory. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2765. Reported by Google Autofuzz project - - libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770 - -2017-12-21 Even Rouault - - Add libzstd to gitlab-ci. - -2017-12-21 Even Rouault - - Add ZSTD compression codec. - From https://github.com/facebook/zstd - "Zstandard, or zstd as short version, is a fast lossless compression - algorithm, targeting real-time compression scenarios at zlib-level - and better compression ratios. It's backed by a very fast entropy stage, - provided by Huff0 and FSE library." - - We require libzstd >= 1.0.0 so as to be able to use streaming compression - and decompression methods. - - The default compression level we have selected is 9 (range goes from 1 to 22), - which experimentally offers equivalent or better compression ratio than - the default deflate/ZIP level of 6, and much faster compression. - - For example on a 6600x4400 16bit image, tiffcp -c zip runs in 10.7 seconds, - while tiffcp -c zstd runs in 5.3 seconds. Decompression time for zip is - 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and - 42586822 for zstd. Similar findings on other images. - - On a 25894x16701 16bit image, - - Compression time Decompression time File size - - ZSTD 35 s 3.2 s 399 700 498 - ZIP/Deflate 1m 20 s 4.9 s 419 622 336 - -2017-12-10 Even Rouault - - Merge branch 'fix_cve-2017-9935' into 'master' - Fix CVE-2017-9935 - - See merge request libtiff/libtiff!7 - -2017-12-10 Brian May - - tiff2pdf: Fix apparent incorrect type for transfer table. - The standard says the transfer table contains unsigned 16 bit values, - I have no idea why we refer to them as floats. - -2017-12-10 Brian May - - tiff2pdf: Fix CVE-2017-9935. - Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704 - - This vulnerability - at least for the supplied test case - is because we - assume that a tiff will only have one transfer function that is the same - for all pages. This is not required by the TIFF standards. - - We than read the transfer function for every page. Depending on the - transfer function, we allocate either 2 or 4 bytes to the XREF buffer. - We allocate this memory after we read in the transfer function for the - page. - - For the first exploit - POC1, this file has 3 pages. For the first page - we allocate 2 extra extra XREF entries. Then for the next page 2 more - entries. Then for the last page the transfer function changes and we - allocate 4 more entries. - - When we read the file into memory, we assume we have 4 bytes extra for - each and every page (as per the last transfer function we read). Which - is not correct, we only have 2 bytes extra for the first 2 pages. As a - result, we end up writing past the end of the buffer. - - There are also some related issues that this also fixes. For example, - TIFFGetField can return uninitialized pointer values, and the logic to - detect a N=3 vs N=1 transfer function seemed rather strange. - - It is also strange that we declare the transfer functions to be of type - float, when the standard says they are unsigned 16 bit values. This is - fixed in another patch. - - This patch will check to ensure that the N value for every transfer - function is the same for every page. If this changes, we abort with an - error. In theory, we should perhaps check that the transfer function - itself is identical for every page, however we don't do that due to the - confusion of the type of the data in the transfer function. - -2017-12-10 Even Rouault - - Merge branch 'undef-warn-fixes' into 'master' - Fix a couple of harmless but annoying -Wundef warnings - - See merge request libtiff/libtiff!8 - -2017-12-07 Vadim Zeitlin - - Remove tests for undefined SIZEOF_VOIDP. - As configure never uses AC_CHECK_SIZEOF(void*), this symbol is never - defined and so it doesn't make sense to test it in the code, this just - results in -Wundef warnings if they're enabled. - - Avoid harmless -Wundef warnings for __clang_major__ - Check that we're using Clang before checking its version. - -2017-12-02 Even Rouault - - Merge branch 'remove_autogenerated_files' into 'master' - Remove autogenerated files - - See merge request libtiff/libtiff!5 - -2017-12-02 Bob Friesenhahn - - Merge branch 'tif_config_h_includes' into 'master' - 'tif_config.h' or 'tiffiop.h' must be included before any system header. - - See merge request libtiff/libtiff!6 - -2017-12-02 Bob Friesenhahn - - 'tif_config.h' or 'tiffio.h' must be included before any system header. - -2017-12-01 Even Rouault - - .gitignore: add patterns for build from root. - - Remove remaining .cvsignore files. - - Remove autoconf/automake generated files, and add them to .gitignore. - -2017-12-01 Olivier Paquet - - Merge branch 'makedistcheck' into 'master' - build/gitlab-ci and build/travis-ci: add a 'make dist' step in autoconf_build()… - - See merge request libtiff/libtiff!4 - -2017-12-01 Even Rouault - - build/gitlab-ci and build/travis-ci: add a 'make dist' step in autoconf_build() target, to check we are release-ready - -2017-12-01 Even Rouault - - Merge branch 'git_updates' into 'master' - CVS to Git updates - - See merge request libtiff/libtiff!2 - -2017-12-01 Even Rouault - - HOWTO-RELEASE: update to use signed tags. - - README.md: use markdown syntax for hyperlinks. - -2017-11-30 Even Rouault - - Add .gitignore. - - Regenerate autoconf files. - - Makefile.am: update to reflect removal of README.vms and README -> README.md - - Remove all $Id and $Headers comments with CVS versions. - - HOWTO-RELEASE: update for git. - - Remove outdated .cvsignore. - - Remove outdated commit script. - - Remove README.vms. - - Rename README as README.md, and update content. - - html/index.html: reflect change from CVS to gitlab. - -2017-11-30 Olivier Paquet - - Merge branch 'test-ci' into 'master' - Update CI configuration - - See merge request libtiff/libtiff!1 - -2017-11-23 Roger Leigh - - appveyor: Correct path for git clone and skip artifact archival. - -2017-11-22 Roger Leigh - - travis-ci: Remove unused matrix exclusion. - - Add gitlab-ci build support. - -2017-11-18 Bob Friesenhahn - - * configure.ac: libtiff 4.0.9 released. - - * html/v4.0.9.html: Add HTML file to document changes in libtiff - v4.0.9. - -2017-11-17 Even Rouault - - * libtiff/tif_aux.c, tif_getimage.c, tif_read.c: typo fixes in - comments. - -2017-11-02 Bob Friesenhahn - - * test/Makefile.am: Add some tests for tiff2bw. - -2017-11-01 Bob Friesenhahn - - * tools/tiff2bw.c (main): Free memory allocated in the tiff2bw - program. This is in response to the report associated with - CVE-2017-16232 but does not solve the extremely high memory usage - with the associated POC file. - -2017-10-29 Bob Friesenhahn - - * tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible - arithmetic overflow in bounds checking code and eliminate - comparison between signed and unsigned type. - - * tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the - client data. This client data is not used at all at the moment, - but it makes the most sense. Issue that the value of - client_data.fd was passed where a pointer is expected was reported - via email by Gerald Schade on Sun, 29 Oct 2017. - -2017-10-23 Even Rouault - - * libtiff/tif_getimage.c: avoid floating point division by zero in - initCIELabConversion() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3733 - Credit to OSS Fuzz - -2017-10-17 Even Rouault - - * libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that - honours max_memory_to_use > 0. - Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 - -2017-10-10 Even Rouault - - * nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use - /MDd runtime in debug mode. - -2017-10-01 Even Rouault - - * tools/tiffset.c: fix setting a single value for the ExtraSamples tag - (and other tags with variable number of values). - So 'tiffset -s ExtraSamples 1 X'. This only worked - when setting 2 or more values, but not just one. - -2017-09-29 Even Rouault - - * libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2735 - -2017-09-09 Even Rouault - - * libtiff/tif_dirread.c: add NULL check to avoid likely false positive - null-pointer dereference warning by CLang Static Analyzer. - -2017-09-07 Even Rouault - - * libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() - function that checks if the offset is not bigger than INT64_MAX, so as - to avoid a -1 error return code of TIFFSeekFile() to match a required - seek to UINT64_MAX/-1. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2726 - Adapted from proposal by Nicolas Ruff. - -2017-08-29 Even Rouault - - * libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed - file if the codestream height is larger than the truncated height of the - strip. Emit a warning in this situation since this is non compliant. - -2017-08-28 Even Rouault - - * test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff - to fix "make distcheck". Patch by Roger Leigh - -2017-08-23 Even Rouault - - * libtiff/tif_dirwrite.c: replace assertion to tag value not fitting - on uint32 when selecting the value of SubIFD tag by runtime check - (in TIFFWriteDirectoryTagSubifd()). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728 - Reported by team OWL337 - -2017-08-23 Even Rouault - - * libtiff/tif_dirwrite.c: replace assertion related to not finding the - SubIFD tag by runtime check (in TIFFWriteDirectorySec()) - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 - Reported by team OWL337 - -2017-07-24 Even Rouault - - * libtiff/tif_luv.c: further reduce memory requirements for temporary - buffer when RowsPerStrip >= image_length in LogLuvInitState() and - LogL16InitState(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2700 - Credit to OSS Fuzz - -2017-07-24 Even Rouault - - * libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped - pixel number is not a multiple of the horizontal subsampling, and - also in some other cases. Impact putcontig8bitYCbCr44tile, - putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, - putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2637 (discovered - by Agostino Sarubbo) - and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2691 (credit - to OSS Fuzz) - -2017-07-24 Even Rouault - - * libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): - properly break from loops on error when stoponerr is set, instead - of going on iterating on row based loop. - -2017-07-18 Even Rouault - - * libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory - allocation when RowsPerStrip tag is missing. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2683 - Credit to OSS-Fuzz - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: add protection against excessive memory - allocation attempts in TIFFReadDirEntryArray() on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the - arrays that hold StripOffsets/StripByteCounts, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 - Credit to OSS Fuzz - -2017-07-15 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). - Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 - in the isMapped() case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. - -2017-07-15 Even Rouault - - * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" - mode on PlanarConfig=Contig input images. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 - Reported by team OWL337 - -2017-07-11 Even Rouault - - * libtiff/tif_dir.c: avoid potential null pointer dereference in - _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2713 - -2017-07-11 Even Rouault - - * libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW - strips. Crashing issue only on memory mapped files, where the strip - offset is the last byte of the file, and the file size is a multiple - of one page size on the CPU architecture (typically 4096). Credit - to myself :-) - -2017-07-11 Even Rouault - - * test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files - to test old-style LZW decompression - * test/common.sh, Makefile.am, CMakeList.txt: updated with above - -2017-07-11 Even Rouault - - * refresh autoconf/make stuff with what is on Ubuntu 16.04 (minor changes) - -2017-07-11 Even Rouault - - * libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW - compressed files. - -2017-07-10 Even Rouault - - * libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding - when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2554 - Credit to OSS Fuzz - -2017-07-04 Even Rouault - - * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() - and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and - TIFFReadTile() that allocates the decoded buffer only after a first - successful TIFFFillTile(). This avoids excessive memory allocation - on corrupted files. - * libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2470 - Credit to OSS Fuzz. - -2017-07-04 Even Rouault - - * libtiff/tif_error.c, tif_warning.c: correctly use va_list when both - an old-style and new-style warning/error handlers are installed. - Patch by Paavo Helde (sent on the mailing list) - -2017-07-02 Even Rouault - - * libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to - tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). - This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), - limiting the number of bytes read. But it could probably have been hit - too in CHUNKY_STRIP_READ_SUPPORT mode previously ? - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2454 - Credit to OSS Fuzz - -2017-06-30 Even Rouault - - * man: update documentation regarding SubIFD tag and - TIFFSetSubDirectory() data type. - Patch by Eric Piel - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2671 - -2017-06-30 Even Rouault - - * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() - functions associated with LONG8/SLONG8 data type, replace assertion that - the file is BigTIFF, by a non-fatal error. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 - Reported by team OWL337 - -2017-06-30 Even Rouault - - * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() - function, variant of TIFFReadEncodedStrip() that allocates the - decoded buffer only after a first successful TIFFFillStrip(). This avoids - excessive memory allocation on corrupted files. - * libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2708 and - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2433 . - Credit to OSS Fuzz - -2017-06-30 Even Rouault - - * libtiff/tif_read.c: TIFFFillTile(): add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation (similarly to - what was done for TIFFFileStrip() on 2017-05-10) - -2017-06-29 Even Rouault - - * libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, - libtiff/tif_read.c: make TIFFReadScanline() works in - CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. - Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER - environment variable the maximum number of scans allowed. Defaults to - 100. - -2017-06-27 Even Rouault - - * libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a - double value can fit in a float before casting. Patch by Nicolas RUFF - -2017-06-26 Even Rouault - - * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 - Reported by team OWL337 - -2017-06-24 Even Rouault - - * libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg - memory allocation is above 100 MB. libjpeg in case of multiple scans, - which is allowed even in baseline JPEG, if components are spread over several - scans and not interleavedin a single one, needs to allocate memory (or - backing store) for the whole strip/tile. - See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - This limitation may be overridden by setting the - LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling - libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro. - -2017-06-24 Even Rouault - - * libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive - CPU consumption on progressive JPEGs with a huge number of scans. - See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - Note: only affects libtiff since 2014-12-29 where support of non-baseline JPEG - was added. - -2017-06-18 Even Rouault - - * libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to - disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow - * libtiff/tif_predict.c: decorate legitimate functions where unsigned int - overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW - * libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() - and BYTECOUNTLOOKSBAD when file is too short. - * libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images. - * libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could - potentially be a bug with huge rows. - * libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows. - -2017-06-12 Even Rouault - - * libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items - read in StripOffsets/StripByteCounts tags to the number of strips to avoid - excessive memory allocation. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2215 - Credit to OSS Fuzz - -2017-06-12 Even Rouault - - * libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in - ChopUpSingleUncompressedStrip() regarding update of newly single-strip - uncompressed files whose bytecount is 0. Before the change of 2016-12-03, - the condition bytecount==0 used to trigger an early exit/disabling of - strip chop. Re-introduce that in update mode. Otherwise this cause - later incorrect setting for the value of StripByCounts/StripOffsets. - ( https://trac.osgeo.org/gdal/ticket/6924 ) - -2017-06-10 Even Rouault - - * .appveyor.yml, .travis.yml, build/travis-ci: apply patches - 0001-ci-Travis-script-improvements.patch and - 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh - (sent to mailing list) - -2017-06-08 Even Rouault - - * .travis.yml, build/travis-ci: new files from - 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by - Roger Leigh (sent to mailing list on 2017-06-08) - This patch adds support for the Travis-CI service. - - * .appveyor.yml: new file from - 0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing - list on 2017-06-08) - This patch adds a .appveyor.yml file to the top-level. This allows - one to opt in to having a branch built on Windows with Cygwin, - MinGW and MSVC automatically when a branch is pushed to GitHub, - GitLab, BitBucket or any other supported git hosting service. - - * CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply - patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger - Leigh (sent to mailing list on 2017-06-08) - This patch makes the CMake build system support running the tests - with MinGW or Cygwin. - -2017-06-08 Even Rouault - - * libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do - the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols - of its internal libtiff copy. - -2017-06-01 Even Rouault - - * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), - and use it in TIFFReadDirectory() so as to ignore fields whose tag is a - codec-specified tag but this codec is not enabled. This avoids TIFFGetField() - to behave differently depending on whether the codec is enabled or not, and - thus can avoid stack based buffer overflows in a number of TIFF utilities - such as tiffsplit, tiffcmp, thumbnail, etc. - Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch - (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog. - Fixes: - http://bugzilla.maptools.org/show_bug.cgi?id=2580 - http://bugzilla.maptools.org/show_bug.cgi?id=2693 - http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095) - http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554) - http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318) - http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128) - http://bugzilla.maptools.org/show_bug.cgi?id=2441 - http://bugzilla.maptools.org/show_bug.cgi?id=2433 - -2017-05-29 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for - refBlackWhite coefficients values. To avoid invalid float->int32 conversion - (when refBlackWhite[0] == 2147483648.f) - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907 - Credit to OSS Fuzz - -2017-05-29 Even Rouault - - * libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid - int32 overflow in TIFFYCbCrtoRGB(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1844 - Credit to OSS Fuzz - -2017-05-21 Bob Friesenhahn - - * configure.ac: libtiff 4.0.8 released. - - * html/v4.0.8.html: Add description of changes targeting the 4.0.8 - release. - -2017-05-20 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for - refBlackWhite coefficients values. To avoid invalid float->int32 conversion. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 - Credit to OSS Fuzz - -2017-05-18 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero - to avoid division by zero. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -2017-05-17 Even Rouault - - * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to - float. - Credit to Google Autofuzz project - -2017-05-17 Even Rouault - - * libtiff/tif_getimage.c: initYCbCrConversion(): add basic validation of - luma and refBlackWhite coefficients (just check they are not NaN for now), - to avoid potential float to int overflows. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 - Credit to OSS Fuzz - -2017-05-17 Even Rouault - - * libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with - next_in and tif_rawcc with avail_in at beginning and end of function, - similarly to what is done in LZWDecode(). Likely needed so that it - works properly with latest changes in tif_read.c in CHUNKY_STRIP_READ_SUPPORT - mode. But untested... - -2017-05-17 Even Rouault - - * libtiff/tif_lzw.c: update dec_bitsleft at beginning of LZWDecode(), - and update tif_rawcc at end of LZWDecode(). This is needed to properly - work with the latest changes in tif_read.c in CHUNKY_STRIP_READ_SUPPORT - mode. - -2017-05-14 Even Rouault - - * libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory - allocation when RowsPerStrip tag is missing. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-14 Even Rouault - - * libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 - overflows in multiply_ms() and add_ms(). - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_color.c: avoid potential int32 overflow in - TIFFYCbCrToRGBInit() - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 - Credit to OSS-Fuzz - -2017-05-13 Even Rouault - - * libtiff/tif_read.c: update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT - mode with tif_rawdataloaded when calling TIFFStartStrip() or - TIFFFillStripPartial(). This avoids reading beyond tif_rawdata - when bytecount > tif_rawdatasize. - Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. - Credit to OSS-Fuzz - -2017-05-12 Even Rouault - - * libtiff/tif_read.c: TIFFFillStripPartial(): - avoid excessive memory allocation in case of shorten files. - Only effective on 64 bit builds. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-12 Even Rouault - - * libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), - avoid potential integer overflows with read_ahead in - CHUNKY_STRIP_READ_SUPPORT mode. Should - especially occur on 32 bit platforms. - -2017-05-10 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): - avoid excessive memory allocation in case of shorten files. - Only effective on 64 bit builds and non-mapped cases. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-10 Even Rouault - - * libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory - leak when the underlying codec (ZIP, PixarLog) succeeds its - setupdecode() method, but PredictorSetup fails. - Credit to OSS-Fuzz (locally run, on GDAL) - -2017-05-10 Even Rouault - - * libtiff/tif_read.c: TIFFFillStrip(): add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation. - -2017-04-28 Even Rouault - - * tools/tiff2bw.c: close TIFF handle in error code path. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2677 - -2017-04-27 Even Rouault - - * litiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. - Patch by Alan Coopersmith + complement by myself. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2673 - * tools/fax2tiff.c: emit appropriate message if the input file is - empty. Patch by Alan Coopersmith. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2672 - -2017-04-27 Even Rouault - - * libtiff/tif_ojpeg.c: fix potential memory leak in - OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable - and OJPEGReadHeaderInfoSecTablesAcTable - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2670 - -2017-04-27 Even Rouault - - * libtiff/tif_dirread.c: fix memory leak in non DEFER_STRILE_LOAD - mode (ie default) when there is both a StripOffsets and - TileOffsets tag, or a StripByteCounts and TileByteCounts - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2689 - * tools/tiff2ps.c: call TIFFClose() in error code paths. - -2017-02-25 Even Rouault - - * libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 - -Wimplicit-fallthrough warnings. - -2017-02-18 Even Rouault - - * libtiff/tif_pixarlog.c: fix memory leak in error code path of - PixarLogSetupDecode(). Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2665 - -2017-02-18 Even Rouault - - * libtiff/tif_lzw.c: in LZWPostEncode(), increase, if necessary, the - code bit-width after flushing the remaining code and before emitting - the EOI code. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=1982 - -2017-01-31 Even Rouault - - * libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if the - YCbCrSubsampling tag is not explicitly present. This helps a bit to reduce - the I/O amount when the tag is present (especially on cloud hosted files). - -2017-01-14 Even Rouault - - * tools/raw2tiff.c: avoid integer division by zero. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2631 - -2017-01-12 Even Rouault - - * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, - OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable - when read fails. - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659 - -2017-01-11 Even Rouault - - * libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode - functions instead of -1 when TIFFFlushData1() fails. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2130 - -2017-01-11 Even Rouault - - * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and - cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and - http://bugzilla.maptools.org/show_bug.cgi?id=2657 - -2017-01-11 Even Rouault - - * libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() - - * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero - initialize tif_rawdata. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 - -2017-01-11 Even Rouault - - * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to - avoid UndefinedBehaviorSanitizer warning. - Patch by Nicolás Peña. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 - -2017-01-11 Even Rouault - - * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer - addition in TIFFReadRawStrip1() in isMapped() case. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 - -2017-01-11 Even Rouault - - * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid - undefined behaviour caused by invalid shift exponent. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 - -2017-01-11 Even Rouault - - * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings - of double to other data types to avoid undefined behaviour if the output range - isn't big enough to hold the input value. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 - http://bugzilla.maptools.org/show_bug.cgi?id=2642 - http://bugzilla.maptools.org/show_bug.cgi?id=2646 - http://bugzilla.maptools.org/show_bug.cgi?id=2647 - -2017-01-11 Even Rouault - - * libtiff/tif_dirread.c: avoid division by floating point 0 in - TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), - and return 0 in that case (instead of infinity as before presumably) - Apparently some sanitizers do not like those divisions by zero. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2644 - -2017-01-11 Even Rouault - - * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational, replace - assertion by runtime check to error out if passed value is strictly - negative. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2535 - - * tools/tiffcrop.c: remove extraneous TIFFClose() in error code path, that - caused double free. - Related to http://bugzilla.maptools.org/show_bug.cgi?id=2535 - -2017-01-11 Even Rouault - - * libtiff/tif_jpeg.c: avoid integer division by zero in - JPEGSetupEncode() when horizontal or vertical sampling is set to 0. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 - -2017-01-03 Even Rouault - - * libtiff/tif_jpeg.c: increase libjpeg max memory usable to - 10 MB instead of libjpeg 1MB default. This helps when creating files - with "big" tile, without using libjpeg temporary files. - Related to https://trac.osgeo.org/gdal/ticket/6757 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: avoid potential heap-based overflow in - t2p_readwrite_pdf_image_tile(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2640 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: avoid potential invalid memory read in - t2p_writeproc. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2639 - -2016-12-20 Even Rouault - - * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger - unspecified behaviour. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2638 - -2016-12-18 Even Rouault - - * libtiff/tif_getimage.c: fix potential memory leaks in error code - path of TIFFRGBAImageBegin(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2627 - -2016-12-18 Even Rouault - - * tools/tiff2pdf.c: prevent heap-based buffer overflow in -j mode - on a paletted image. Note: this fix errors out before the overflow - happens. There could probably be a better fix. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2635 - -2016-12-17 Even Rouault - - * libtiff/tiffio.h, libtiff/tif_getimage.c: add TIFFReadRGBAStripExt() - and TIFFReadRGBATileExt() variants of the functions without ext, with - an extra argument to control the stop_on_error behaviour. - -2016-12-17 Even Rouault - - * tools/tiff2ps.c: fix 2 heap-based buffer overflows (in PSDataBW - and PSDataColorContig). Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2633 and - http://bugzilla.maptools.org/show_bug.cgi?id=2634. - -2016-12-13 Even Rouault - - * libtiff/tif_fax3.h: revert change done on 2016-01-09 that made - Param member of TIFFFaxTabEnt structure a uint16 to reduce size of - the binary. It happens that the Hylafax software uses the tables that - follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, - TIFFFaxBlackTable), although they are not in a public libtiff header. - Raised by Lee Howard. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2636 - -2016-12-04 Even Rouault - - * html/man/Makefile.am: remove thumbnail.1.html and rgb2ycbcr.1.html - from installed pages since the corresponding utilities are no longer - installed. Reported by Havard Eidnes - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 - -2016-12-03 Even Rouault - - * libtiff/tif_write.c: fix misleading indentation as warned by GCC. - -2016-12-03 Even Rouault - - * tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non assert check. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2605 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: fix uint32 underflow/overflow that can cause heap-based - buffer overflow. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2610 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is - missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2607 - -2016-12-03 Even Rouault - - * man/Makefile.am: remove thumbnail.1 and rgb2ycbcr.1 from installed man - pages since the corresponding utilities are no longer installed. - Reported by Havard Eidnes - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 - -2016-12-03 Even Rouault - - * tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called, - limit the return number of inks to SamplesPerPixel, so that code that parses - ink names doesn't go past the end of the buffer. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 - -2016-12-03 Even Rouault - - * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is - missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2597 - -2016-12-03 Even Rouault - - * tools/tiffinfo.c: fix null pointer dereference in -r mode when the image has - no StripByteCount tag. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2594 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: fix integer division by zero when BitsPerSample is missing. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2619 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in - readSeparateStripsIntoBuffer() to avoid read outside of heap allocated buffer. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2621 - -2016-12-03 Even Rouault - - * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so - that the output buffer is correctly incremented to avoid write outside bounds. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620 - -2016-12-03 Even Rouault - - * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in - OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 - -2016-12-03 Even Rouault - - * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to - instantiate compute nstrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), - instead of a logic based on the total size of data. Which is faulty is - the total size of data is not sufficient to fill the whole image, and thus - results in reading outside of the StripByCounts/StripOffsets arrays when - using TIFFReadScanline(). - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2608. - - * libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips() done - for http://bugzilla.maptools.org/show_bug.cgi?id=2587 / CVE-2016-9273 since - the above change is a better fix that makes it unnecessary. - -2016-12-03 Even Rouault - - * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer - overflow on generation of PixarLog / LUV compressed files, with - ColorMap, TransferFunction attached and nasty plays with bitspersample. - The fix for LUV has not been tested, but suffers from the same kind - of issue of PixarLog. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2604 - -2016-12-02 Even Rouault - - * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that - can cause various issues, such as buffer overflows in the library. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2598 - -2016-12-02 Even Rouault - - * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in - TIFFReadEncodedStrip() that caused an integer division by zero. - Reported by Agostino Sarubbo. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2596 - -2016-11-20 Even Rouault - - * libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis to - fix cppcheck clarifyCalculation warnings - * libtiff/tif_predict.c, libtiff/tif_print.c: fix printf unsigned - vs signed formatting (cppcheck invalidPrintfArgType_uint warnings) - -2016-11-20 Bob Friesenhahn - - * tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix - passing client data for Win32 builds using tif_win32.c - (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via - email on November 20, 2016. - -2016-11-19 Bob Friesenhahn - - * libtiff 4.0.7 released. - - * configure.ac: Update for 4.0.7 release. - - * tools/tiffdump.c (ReadDirectory): Remove uint32 cast to - _TIFFmalloc() argument which resulted in Coverity report. Added - more multiplication overflow checks. - -2016-11-18 Even Rouault - - * tools/tiffcrop.c: Fix memory leak in (recent) error code path. - Fixes Coverity 1394415. - -2016-11-17 Bob Friesenhahn - - * libtiff/tif_getimage.c: Fix some benign warnings which appear in - 64-bit compilation under Microsoft Visual Studio of the form - "Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit - value. Results might not be an expected value.". Problem was - reported on November 16, 2016 on the tiff mailing list. - -2016-11-16 Even Rouault - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not dereference - NULL pointer when values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII - access are 0-byte arrays. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression introduced - by previous fix done on 2016-11-11 for CVE-2016-9297). - Reported by Henri Salo. Assigned as CVE-2016-9448 - -2016-11-12 Bob Friesenhahn - - * tools/tiffinfo.c (TIFFReadContigTileData): Fix signed/unsigned - comparison warning. - (TIFFReadSeparateTileData): Fix signed/unsigned comparison - warning. - - * tools/tiffcrop.c (readContigTilesIntoBuffer): Fix - signed/unsigned comparison warning. - - * html/v4.0.7.html: Add a file to document the pending 4.0.7 - release. - -2016-11-11 Even Rouault - - * tools/tiff2pdf.c: avoid undefined behaviour related to overlapping - of source and destination buffer in memcpy() call in - t2p_sample_rgbaa_to_rgb() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2577 - -2016-11-11 Even Rouault - - * tools/tiff2pdf.c: fix potential integer overflows on 32 bit builds - in t2p_read_tiff_size() - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2576 - -2016-11-11 Even Rouault - - * libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() - when requesting Predictor tag and that the zip/lzw codec is not - configured. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2591 - -2016-11-11 Even Rouault - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure that - values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII - access are null terminated, to avoid potential read outside buffer - in _TIFFPrintField(). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2590 (CVE-2016-9297) - -2016-11-11 Even Rouault - - * libtiff/tif_dirread.c: reject images with OJPEG compression that - have no TileOffsets/StripOffsets tag, when OJPEG compression is - disabled. Prevent null pointer dereference in TIFFReadRawStrip1() - and other functions that expect td_stripbytecount to be non NULL. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2585 - -2016-11-11 Even Rouault - - * tools/tiffcrop.c: fix multiple uint32 overflows in - writeBufferToSeparateStrips(), writeBufferToContigTiles() and - writeBufferToSeparateTiles() that could cause heap buffer overflows. - Reported by Henri Salo from Nixu Corporation. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 (CVE-2016-9532) - -2016-11-10 Even Rouault - - * libtiff/tif_strip.c: make TIFFNumberOfStrips() return the td->td_nstrips - value when it is non-zero, instead of recomputing it. This is needed in - TIFF_STRIPCHOP mode where td_nstrips is modified. Fixes a read outsize of - array in tiffsplit (or other utilities using TIFFNumberOfStrips()). - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587 (CVE-2016-9273) - -2016-11-04 Even Rouault - - * libtiff/tif_predic.c: fix memory leaks in error code paths added in - previous commit (fix for MSVR 35105) - -2016-10-31 Even Rouault - - * libtiff/tif_predict.h, libtiff/tif_predict.c: - Replace assertions by runtime checks to avoid assertions in debug mode, - or buffer overflows in release mode. Can happen when dealing with - unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 - by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations - team. - -2016-10-26 Even Rouault - - * tools/fax2tiff.c: fix segfault when specifying -r without - argument. Patch by Yuriy M. Kaminskiy. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2572 - -2016-10-25 Even Rouault - - * libtiff/tif_dir.c: discard values of SMinSampleValue and - SMaxSampleValue when they have been read and the value of - SamplesPerPixel is changed afterwards (like when reading a - OJPEG compressed image with a missing SamplesPerPixel tag, - and whose photometric is RGB or YCbCr, forcing SamplesPerPixel - being 3). Otherwise when rewriting the directory (for example - with tiffset, we will expect 3 values whereas the array had been - allocated with just one), thus causing a out of bound read access. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 - (CVE-2014-8127, duplicate: CVE-2016-3658) - - * libtiff/tif_dirwrite.c: avoid null pointer dereference on td_stripoffset - when writing directory, if FIELD_STRIPOFFSETS was artificially set - for a hack case in OJPEG case. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 - (CVE-2014-8127, duplicate: CVE-2016-3658) - -2016-10-25 Even Rouault - - * tools/tiffinfo.c: fix out-of-bound read on some tiled images. - (http://bugzilla.maptools.org/show_bug.cgi?id=2517) - - * libtiff/tif_compress.c: make TIFFNoDecode() return 0 to indicate an - error and make upper level read routines treat it accordingly. - (linked to the test case of http://bugzilla.maptools.org/show_bug.cgi?id=2517) - -2016-10-14 Even Rouault - - * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in - readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet - & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. - -2016-10-09 Even Rouault - - * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG - compressed images. Reported by Tyler Bohan of Cisco Talos as - TALOS-CAN-0187 / CVE-2016-5652. - Also prevents writing 2 extra uninitialized bytes to the file stream. - -2016-10-08 Even Rouault - - * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd - tile width vs image width. Reported as MSVR 35103 - by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -2016-10-08 Even Rouault - - * tools/tiff2pdf.c: fix read -largely- outsize of buffer in - t2p_readwrite_pdf_image_tile(), causing crash, when reading a - JPEG compressed image with TIFFTAG_JPEGTABLES length being one. - Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from - the MSRC Vulnerabilities & Mitigations team. CVE-2016-9453 - -2016-10-08 Even Rouault - - * tools/tiffcp.c: fix read of undefined variable in case of missing - required tags. Found on test case of MSVR 35100. - * tools/tiffcrop.c: fix read of undefined buffer in - readContigStripsIntoBuffer() due to uint16 overflow. Probably not a - security issue but I can be wrong. Reported as MSVR 35100 by Axel - Souchet from the MSRC Vulnerabilities & Mitigations team. - -2016-09-25 Bob Friesenhahn - - * html: Change as many remotesensing.org broken links to a working - URL as possible. - -2016-09-24 Bob Friesenhahn - - * libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to - read floating point images. - - * libtiff/tif_predict.c (PredictorSetup): Enforce bits-per-sample - requirements of floating point predictor (3). Fixes CVE-2016-3622 - "Divide By Zero in the tiff2rgba tool." - -2016-09-23 Even Rouault - - * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities - in heap or stack allocated buffers. Reported as MSVR 35093, - MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations team. - * tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in - heap allocate buffer in t2p_process_jpeg_strip(). Reported as MSVR - 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC - Vulnerabilities & Mitigations team. - * libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities - in heap allocated buffers. Reported as MSVR 35094. Discovered by - Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - * libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1() - that didn't reset the tif_rawcc and tif_rawcp members. I'm not - completely sure if that could happen in practice outside of the odd - behaviour of t2p_seekproc() of tiff2pdf). The report points that a - better fix could be to check the return value of TIFFFlushData1() in - places where it isn't done currently, but it seems this patch is enough. - Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & - Suha Can from the MSRC Vulnerabilities & Mitigations team. - -2016-09-20 Bob Friesenhahn - - * html/man/index.html: Comment out links to documentation for - abandoned utilities. - -2016-09-17 Even Rouault - - * libtiff/tif_lzma.c: typo fix in comment - -2016-09-04 Even Rouault - - * libtiff/*.c: fix warnings raised by clang 3.9 -Wcomma - -2016-09-03 Even Rouault - - * libtiff/tif_dirwrite.c, libtiff/tif_color.c: fix warnings raised - by GCC 5 / clang -Wfloat-conversion - -2016-08-16 Even Rouault - - * tools/tiffcrop.c: fix C99'ism. - -2016-08-15 Even Rouault - - * tools/tiff2bw.c: fix weight computation that could result of color - value overflow (no security implication). Fix bugzilla #2550. - Patch by Frank Freudenberg. - -2016-08-15 Even Rouault - - * tools/rgb2ycbcr.c: validate values of -v and -h parameters to - avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569) - -2016-08-15 Even Rouault - - * tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). - From patch libtiff-CVE-2016-3991.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla #2543) - -2016-08-15 Even Rouault - - * libtiff/tif_pixarlog.c: Fix write buffer overflow in PixarLogEncode - if more input samples are provided than expected by PixarLogSetupEncode. - Idea based on libtiff-CVE-2016-3990.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with different and - simpler check. (bugzilla #2544) - -2016-08-15 Even Rouault - - * tools/tiff2rgba.c: Fix integer overflow in size of allocated - buffer, when -b mode is enabled, that could result in out-of-bounds - write. Based initially on patch tiff-CVE-2016-3945.patch from - libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, with correction for - invalid tests that rejected valid files. (bugzilla #2545) - -2016-07-11 Even Rouault - - * tools/tiffcrop.c: Avoid access outside of stack allocated array - on a tiled separate TIFF with more than 8 samples per pixel. - Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 - (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559) - -2016-07-10 Even Rouault - - * libtiff/tif_read.c: Fix out-of-bounds read on - memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1() - when stripoffset is beyond tmsize_t max value (reported by - Mathias Svensson) - -2016-07-10 Even Rouault - - * tools/tiffdump.c: fix a few misaligned 64-bit reads warned - by -fsanitize - -2016-07-03 Even Rouault - - * libtiff/tif_read.c: make TIFFReadEncodedStrip() and - TIFFReadEncodedTile() directly use user provided buffer when - no compression (and other conditions) to save a memcpy(). - - * libtiff/tif_write.c: make TIFFWriteEncodedStrip() and - TIFFWriteEncodedTile() directly use user provided buffer when - no compression to save a memcpy(). - -2016-07-01 Even Rouault - - * libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and - PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid - potential invalid memory write on corrupted/unexpected images when - using the TIFFRGBAImageBegin() interface (reported by - Clay Wood) - -2016-06-28 Even Rouault - - * libtiff/tif_pixarlog.c: fix potential buffer write overrun in - PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson) - (CVE-2016-5875) - -2016-06-15 Bob Friesenhahn - - * libtiff/libtiff.def: Added _TIFFMultiply32 and _TIFFMultiply64 - to libtiff.def - -2016-06-05 Bob Friesenhahn - - * tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, - ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from - the distribution. The libtiff tools rgb2ycbcr and thumbnail are - only built in the build tree for testing. Old files are put in - new 'archive' subdirectory of the source repository, but not in - distribution archives. These changes are made in order to lessen - the maintenance burden. - -2016-05-10 Bob Friesenhahn - - * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the - HAVE_SNPRINTF definition.' - -2016-05-09 Bob Friesenhahn - - * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by Edward - Lam to define HAVE_SNPRINTF for Visual Studio 2015. - -2016-04-27 Even Rouault - - * libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, - fix regression, introduced on 2014-12-23, when reading a one-strip - file without a StripByteCounts tag. GDAL #6490 - -2016-04-07 Bob Friesenhahn - - * html/bugs.html: Replace Andrey Kiselev with Bob Friesenhahn for - purposes of security issue reporting. - -2016-01-23 Even Rouault - - * libtiff/*: upstream typo fixes (mostly contributed by Kurt Schwehr) - coming from GDAL internal libtiff - -2016-01-09 Even Rouault - - * libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt structure - a uint16 to reduce size of the binary. - -2016-01-03 Even Rouault - - * libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised - by GCC 6 -Wmisleading-indentation - -2015-12-27 Even Rouault - - * libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL - string to %s formatter, which is undefined behaviour in sprintf(). - -2015-12-27 Even Rouault - - * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() - triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif - (bugzilla #2508) - -2015-12-27 Even Rouault - - * libtiff/tif_luv.c: fix potential out-of-bound writes in decode - functions in non debug builds by replacing assert()s by regular if - checks (bugzilla #2522). - Fix potential out-of-bound reads in case of short input data. - -2015-12-26 Even Rouault - - * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage - interface in case of unsupported values of SamplesPerPixel/ExtraSamples - for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in - TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and - CVE-2015-8683 reported by zzf of Alibaba. - -2015-12-21 Even Rouault - - * libtiff/tif_dirread.c: workaround false positive warning of Clang Static - Analyzer about null pointer dereference in TIFFCheckDirOffset(). - -2015-12-19 Even Rouault - - * libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found - by Clang Static Analyzer - -2015-12-18 Even Rouault - - * libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in - TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory - offsets on a even offset (affects BigTIFF). This was a regression of the - changeset of 2015-10-19. - -2015-12-12 Even Rouault - - * libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile() - should return -1 in case of failure of tif_encodestrip() as documented - * libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of - failure so that the above mentioned functions detect the error. - -2015-12-06 Even Rouault - - * libtiff/uvcode.h: const'ify uv_code array - -2015-12-06 Even Rouault - - * libtiff/tif_dirinfo.c: const'ify tiffFields, exifFields, - tiffFieldArray and exifFieldArray arrays - -2015-12-06 Even Rouault - - * libtiff/tif_print.c: constify photoNames and orientNames arrays - -2015-12-06 Even Rouault - - * libtiff/tif_close.c, libtiff/tif_extension.c : rename link - variable to avoid -Wshadow warnings - -2015-11-22 Even Rouault - - * libtiff/*.c: fix typos in comments (patch by Kurt Schwehr) - -2015-11-22 Even Rouault - - * libtiff/*.c: fix MSVC warnings related to cast shortening and - assignment within conditional expression - -2015-11-18 Even Rouault - - * libtiff/*.c: fix clang -Wshorten-64-to-32 warnings - -2015-11-18 Even Rouault - - * libtiff/tif_dirread.c: initialize double* data at line 3693 to NULL - to please MSVC 2013 - -2015-11-17 Even Rouault - - * libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction - if BitsPerPixel > 24, so as to avoid huge memory allocation and file - read attempts - -2015-11-02 Even Rouault - - * libtiff/tif_dirread.c: remove duplicated assignment (reported by - Clang static analyzer) - -2015-10-28 Even Rouault - - * libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c, - libtiff/tif_jpeg_12.c: suppress warnings about 'no previous - declaration/prototype' - -2015-10-19 Even Rouault - - * libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix - 'warning: negative integer implicitly converted to unsigned type' warning - (part of -Wconversion) - -2015-10-17 Even Rouault - - * libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c, - libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/) - -2015-09-12 Bob Friesenhahn - - * libtiff 4.0.6 released. - - * html/v4.0.6.html: Added release notes for 4.0.6. - -2015-09-06 Bob Friesenhahn - - * tools/tiffgt.c: Silence glut API deprecation warnings on MacOS - X. Patch by Roger Leigh. - - * Makefile.am: Added a 'coverity' rule to assist with Coverity - submissions. - - * tools/tiff2pdf.c: Fix compiler warning about unused function - when JPEG is not available. - - * tools/fax2ps.c (main): Detect failure to write to temporary - file. - -2015-09-05 Bob Friesenhahn - - * libtiff/tif_dirread.c (TIFFReadDirEntryCheckRangeSlongSlong8): - Change implementation so that it does not sometimes overflow the - range of a 32-bit int and to avoid a signed vs unsigned compare - compiler warning. - (TIFF_INT64_MAX): Avoid use of platform-specific large constants. - (TIFF_UINT32_MAX): Avoid use of platform-specific large constants. - -2015-09-01 Bob Friesenhahn - - * Makefile.am (distcheck-hook), configure.ac: Applied patches by - Roger Leigh (via tiff mailing list on 2015-09-01) to fix issue - with BSD make and to make use of cmake in 'distcheck' target - conditional on if cmake is available. - - * CMakeLists.txt, Makefile.am, configure.ac: Applied patches by - Roger Leigh (via tiff mailing list on 2015-09-01). - - CMake build is now included in 'distcheck' target. - - Builds with CMake 2.8.9 and newer. - - Tar is now requested to use POSIX PAX format. - -2015-08-31 Bob Friesenhahn - - * CMakeLists.txt, libtiff/test/Makefile.am: Applied patches by - Roger Leigh (via tiff mailing list on 2015-08-31. - - CMake reads all version information directly from configure.ac to - avoid duplication of values. This basically greps over the file - for the LIBTIFF_* variables, then translates them to the form - needed for cmake. This includes the release version and libtool - shared library version information. - - Make shared/static library building configurable. Currently it - always builds shared libraries, with static libs having a _static - suffix (copying zlib, but it means it's got a non-standard name). - CMake has a -DBUILD_SHARED_LIBS=ON|OFF option to select one or the - other, which is now used instead. There's now a single "tiff" - target to build either shared or static as required, and all the - tests and tools are linked with this. Note: the Windows tests fail - when linked with a static libtiff (says: libtiff.dll not found). - Not really a regression since this was not tested up to this - point, and it's likely the unit tests haven't (ever?) been run on - Windows with a static libtiff, so there's some additional - portability issue here to address. Works fine on UNIX systems, - and fine on Windows with the default to build a DLL. - - Add a missing file which wasn't being distributed, causing unit - tests to fail. Note that "find . -name '*.cmake'" lists all the - CMake files which need distributing in addition to all the - CMakeLists.txt files (which now are distributed). - -2015-08-31 Even Rouault - - * libtiff/tif_predict.c: pedantic change to add explicit masking - with 0xff before casting to uchar in floating-point horizontal - differencing and accumulation routines. - -2015-08-31 Even Rouault - - * libtiff/tif_predict.c: fix generation of output with 16 bit - or 32 bit integer, when byte swapping is needed, in - horizontal predictor (#2521). Also fixes decoding when there is - a single pixel to code (unlikely case...) and byte swapping is - involved. - -2015-08-30 Even Rouault - - * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid - undefined behaviour with shifts (gcc -fsanitize=shift) - -2015-08-30 Even Rouault - - * libtiff/tif_fax3.c, libtiff/tif_lzw.c, libtiff/tif_predict.c: - add explicit masking with 0xff before casting - to unsigned char (make icc -check=conversions happy) - - * libtiff/tif_predict.c: operate on unsigned datatypes when - computing/applying differences to avoid undefined behaviour of - signed types (C standard compliance) - -2015-08-30 Bob Friesenhahn - - * configure.ac: libtiff 4.0.5 released. - -2015-08-29 Bob Friesenhahn - - * CMakeLists.txt: Applied patch by Roger Leigh (via tiff mailing - list on 2015-08-29) to add ld-version-script option to cmake build - to match autoconf. Note: defaults to 'on' to be ABI-compatible by - default with common Linux distribution builds. Note that the - autoconf configure script defaults to 'off'. - - * html/build.html: Applied patch by Roger Leigh (via tiff mailing - list on 2015-08-29) to describe how to use CMake to build libtiff. - -2015-08-28 Bob Friesenhahn - - * html/v4.0.5.html: Added HTML file describing the changes which - will appear in the 4.0.5 release. - -2015-08-23 Bob Friesenhahn - - * libtiff/tiffiop.h: For MinGW compiles, make sure that build - supports necessary __MSVCRT_VERSION__ (at least at least 0x800). - Otherwise large files can not be supported for POSIX-style I/O. - - * tools/fax2tiff.c (main): Eliminate a compiler warning in 64-bit - builds about cast to thandle_t. - - * test/rewrite_tag.c (main): Does not require any arguments. - -2015-08-20 Bob Friesenhahn - - * tools/CMakeLists.txt, port/snprintf.c: Patch by Roger Leigh to - fix build issues when using Cmake due to Windows large file - changes. - -2015-08-18 Bob Friesenhahn - - * libtiff/tiffiop.h: First cut at supporting large files under - Microsoft Windows using tif_unix.c and the libtiff tools. This - only works if the Windows CDK is new enough to support the APIs - used (Visual C++ 2005 or later). Support for large files is not - actually tested yet. - -2015-08-15 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Applied patch by Räisä Olli to assure that - client_data is initialized to a known value, and to report an - error on two memory allocation failures. - -2015-08-13 Bob Friesenhahn - - * CMakeLists.txt: Applied patch by Roger Leigh to fix libtiffxx - symbol versioning. Patch was mailed to libtiff list on Thu, 13 - Aug 2015. - -2015-07-04 Bob Friesenhahn - - * cmake: Add d suffix to debug libraries with MSVC. Patch #3 of 3 - by Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 - +0100. - - * cmake: Add extra warning flags. Patch #2 of 3 by Roger Leigh - posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. - - * cmake: Correct snprintf fallback for VS2015. Patch #1 of 3 by - Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. - -2015-06-24 Bob Friesenhahn - - * CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to - libtiff mailing list on Mon, 22 Jun 2015 21:21:01 +0100. Several - corrections to ensure that the autotools build still works were - added by me. I have not yet tested the build using 'cmake' or - MSVC with 'nmake'. - -2015-06-21 Bob Friesenhahn - - * test/Makefile.am: tiff2rgba-quad-tile.jpg.sh depends on the JPEG - library so only execute if JPEG is available. - - * libtiff 4.0.4 released. - - * configure.ac: Add a HAVE_FOO Automake conditional for each - add-on library. - - * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode - requires JPEG support to compile. Use Automake conditional to - only include it when JPEG support is available. - - * html/build.html: Try to improve the nmake-based VC++ build - description. - - * libtiff/tiffconf.vc.h: Build fixes based on testing. - - * libtiff/tif_config.vc.h: Build fixes based on testing. - - * libtiff/libtiff.def: TIFFRasterScanline does not exist so remove - export for it. - -2015-06-20 Bob Friesenhahn - - * libtiff/tif_config.vc.h: Make adjustments to match the new - definitions that configure produces, including for WIN64. Still - needs to be tested. - - * configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting - specifier. 64-bit MinGW supports 'long long' but support for - 'lld' is not assured by the run-time DLLs and so GCC warns. - Add TIFF_SIZE_T and TIFF_SIZE_FORMAT to provide a type definition - and printf format specifier to deal with printing values of - 'size_t' type. In particular, this was necessary for WIN64. - Added a configure test for if the system headers provide 'optarg' - (normal case) and block out the many explicit 'extern' statements - in the utilities. This was found to be necessary under Windows - when getopt is in a DLL and the symbols are already imported with - dllimport via standard header files. - - * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32 - and boolean in MinGW build due to including jpeglib.h. - - * test/rewrite_tag.c (main): Fix problem with location of variable - declaration. - - * libtiff/libtiff.def: Added exports for TIFFGetConfiguredCODECs, - TIFFReadRGBAImageOriented, TIFFSetCompressionScheme, - TIFFSwabArrayOfTriples, TIFFVGetFieldDefaulted, _TIFFCheckRealloc, - TIFFRasterScanline, TIFFSetErrorHandlerExt, - TIFFSetWarningHandlerExt, TIFFNumberOfDirectories, - TIFFCreateCustomDirectory, TIFFCreateEXIFDirectory, - TIFFWriteCustomDirectory, _TIFFRewriteField as recommended by - Roger Leigh and justified by use in libtiff tests, documentation, - and changelog notes. Also sorted symbol list and removed - duplicate entries. - -2015-06-16 Bob Friesenhahn - - * libtiff/tif_getimage.c: Fix four Coverity issues related to - unintended sign extension. - -2015-06-16 Even Rouault - - * libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna) - -2015-06-14 Lee Howard - - * libtiff/tif_unix.c: contribution from Vadim Zeitlin on - Bugzilla Bug #2510 fixes several harmless but still annoying - warnings - - * configure: contribution from Ludolf Holzheid on Bugzilla - Bug #2498. Adds an option to select the file I/O style on - Windows hosts. - - * libtiff/tif_getimage.c: contribution from Gary Cramblitt - on Bugzilla Bug #2409. Correct reading of certain tiled TIFFs. - - * configure, configure.ac: contribution from Marcos H. Woehrmann - on Bugzilla Bug #2405. Correct shell equality operator. - - * tools/tiffgt.c (raster_draw): contribution from Jay Berkenbilt - on Bugzilla Bug #2401. Appropriately call glFlush(). - - * tools/tiff2pdf.c: change ColorTransform from "0" to "1" - following Bugzilla Bug #2150. - -2015-06-13 Lee Howard - - * libtiff/tif_lzw.c: contribution from Andy Cave - decode - files that contain consecutive CODE_CLEAR codes. - - * tools/tiff2pdf.c: contribution from Antti S. Lankila on - Bugzilla Bug #2078. Suppress initial output of the header. - - * tools/tiff2pdf.c: contribution from Yuriy M. Kaminskiy - - Take care in using the return value from snprintf(). - - * tools/tiffcrop.c: contribution from Eduardo Robles Elvira - - correctly copy the compression tag from the source TIFF. - - * tools/tiff2ps.c: contribution from Eduardo Robles Elvira - - correct sizing and scaling problems with output document. - -2015-06-10 Bob Friesenhahn - - * libtiff/tif_jpeg.c (JPEGDecode): Split JPEGDecode() into two - clean implementations in order to avoid pre-processor hell. Only - one of the implementations is used in a given build. - -2015-06-08 Even Rouault - - * libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12 - case - -2015-06-07 Bob Friesenhahn - - * libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975 - "Division or modulo by zero". - (TIFFWriteEncodedTile): Fix Coverity 715976 and 715977 "Division - or modulo by zero". - (TIFFWriteRawStrip): Fix Coverity 715978 "Division or modulo by - zero". - (TIFFWriteScanline): Fix Coverity 715979 "Division or modulo by - zero". - - * libtiff/tif_read.c (TIFFStartTile): Fix Coverity 715973 and - 715974 "Division or modulo by zero". - -2015-05-31 Bob Friesenhahn - - * libtiff/tif_dir.c (TIFFNumberOfDirectories): Quiet Coverity - 1134470 "Logically dead code" by making the roll-over check - explicit. - - * libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227 - "Division or modulo by zero". - (LogLuvDecodeStrip): Fix Coverity 991239 "Division or modulo by - zero". - (LogLuvEncodeStrip): Fix Coverity 991240 "Division or modulo by - zero". - (LogLuvEncodeTile): Fix Coverity 991241 "Division or modulo by - zero". - - * libtiff/tif_dirread.c (TIFFReadDirEntryDoubleArray): Fix - Coverity 298626 "Logically dead code". - (TIFFReadDirEntryFloatArray): Fix Coverity 298627 "Logically dead - code". - (TIFFReadDirEntryIfd8Array): Fix Coverity 298628 "Logically dead - code". - (TIFFReadDirEntrySlong8Array): Fix Coverity 298629 "Logically dead - code" - - * libtiff/tif_dir.c (TIFFNumberOfDirectories): Don't depend on ++ - operator precedenc in evaluation. Might quench Coverity 1134470 - "Logically dead code". - - * libtiff/tif_jpeg.c (JPEGDecode): Fix Coverity 602597 "Operands - don't affect result". This change uses ifdefs to include - applicable code based on properties of libjpeg. Still needs to be - re-tested with 12-bit "6b" and "MK1". - -2015-05-30 Bob Friesenhahn - - * libtiff/tif_dirwrite.c (_TIFFRewriteField): Fix Coverity 1024310 - "Resource leak". - - * libtiff/tif_ojpeg.c (OJPEGReadHeaderInfoSecStreamDht): Fix - Coverity 601720 "Resource leak". - - * libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624 - "Dereference before null check". - - * libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400 - "Missing break in switch". - - * contrib/addtiffo/tif_overview.c (TIFF_DownSample): Check buffer - size calculation for overflow. - - * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity - 1024226 "Untrusted value as argument". - - * tools/gif2tiff.c (readgifimage): Fix Coverity 1024222 "Untrusted - value as argument". - (checksignature): Fix Coverity 1024894 "Ignoring number of bytes - read". - (readextension): Fix Coverity 1024893 "Ignoring number of bytes - read". - (readgifimage): Fix Coverity 1024890 "Ignoring number of bytes - read". - (readraster): Fix Coverity 1024891 "Ignoring number of bytes - read". - (readgifimage): Fix Coverity 1024892 "Ignoring number of bytes - read". - - * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 1024181 - "Structurally dead code". - - * tools/raw2tiff.c (main): Fix Coverity 1024887 "Unchecked return - value from library". - (guessSize): Fix Coverity 1024888 "Unchecked return value from - library". - (guessSize): Fix Coverity 1214162 "Ignoring number of bytes read". - (guessSize): Fix Coverity 1024889 "Unchecked return value from - library". - - * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 298621 - "Resource leak". - (t2p_readwrite_pdf_image): Fix Coverity 1024181 "Structurally dead - code". - (t2p_write_pdf): Fix Coverity 1227690 "Unused value". - -2015-05-29 Bob Friesenhahn - - * contrib/iptcutil/iptcutil.c (formatIPTC): Fix Coverity 1024468 - "Infinite loop". - (formatIPTC): Fix Coverity 1024727 "Truncated stdio return value". - (formatIPTC): Fix Coverity 1214240 "Untrusted loop bound". - -2015-05-28 Bob Friesenhahn - - * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix - Coverity 298615 "Resource leak". - (TIFFGetOvrBlock): Fix Coverity 1024649 "Unintended sign - extension". - - * tools/bmp2tiff.c (main): Fix Coverity 1024225 "Untrusted value - as argument". - (main): Fix Coverity 1024678 "Unchecked return value from - library". - (main): Fix Coverity 1024679 "Unchecked return value from - library". - (main): Fix Coverity 1214160 "Ignoring number of bytes read". - - * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix - Coverity 298615 "Resource leak". - - * tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309 - "Resource leak". - - * tools/tiffsplit.c (cpTiles): Fix Coverity 1024304 "Resource - leak". - (cpStrips): Fix Coverity 1024305 "Resource leak". - -2015-05-27 Bob Friesenhahn - - * tools/ras2tiff.c: Fix Sun Raster header definition to be safe - for 64-bit systems. Add some header validations. Should fix many - Coverity issues. - (main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)". - (main): Quiet Coverity 1024223 "Untrusted value as argument". - - * tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting - level does not match indentation". - (get_histogram): Quiet Coverity 1024386 "Out-of-bounds read". - This was a benign mis-diagnosis but added code to enforce against - buffer overflow. - - * tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical - vs. bitwise operator". - (readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or - modulo by zero". - (readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead - code". - (writeSingleSection): Fix Coverity 1024796 "Nesting level does not - match indentation". - (writeCroppedImage): Fix Coverity 1024797 "Nesting level does not - match indentation". - (loadImage): Fix Coverity 1299741 "Dereference before null check". - (loadImage): Fix Coverity 1299740 "Out-of-bounds write". - -2015-03-02 Even Rouault - - * tools/tiffdither.c: check memory allocations to avoid writing to - NULL pointer. Also check multiplication overflow. Fixes #2501, - CVE-2014-8128. Derived from patch by Petr Gajdos. - -2015-01-26 Even Rouault - - * add html/v4.0.4beta.html under version control - * HOWTO-RELEASE: write that cvs add html/vX.X.html must be used - -2015-01-26 Even Rouault - - * libtiff 4.0.4beta released - -2015-01-26 Even Rouault - - * automake: updated to 1.15 - * libtool: updated to 2.4.5 - -2015-01-22 Even Rouault - - * tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013) - -2015-01-05 Frank Warmerdam - - * html/bugs.html: remove note about needing to email the tiff mailing - list administrator about being approved for membership, this appears - not to be true. - -2015-01-05 Olivier Paquet - - * tools/tiff2pdf.c: Fixed unsigned integer addition overflow detection. - -2015-01-03 Even Rouault - - * libtiff/tif_dirread.c: in TIFFCheckDirOffset(), avoid uint16 overflow - when reading more than 65535 directories, and effectively error out when - reaching that limit. - -2014-12-29 Even Rouault - - * libtiff/tif_jpeg.c: in JPEGFixupTags(), recognize SOF2, SOF9 and SOF10 - markers to avoid emitting a warning (even if, according to the TechNote, - there are admittedly unusual/not recommended or even forbidden variants, but - they do work well with libjpeg for SOF2, and with libjpeg-turbo for SOF2, - SOF9 and SOF10). - Define in_color_space and input_components to the right values in - JPEGSetupEncode(), before calling jpeg_set_defaults(), as specified by - libjpeg API documentation, so as to be compatible with mozjpeg library. - Note: the default settings of mozjpeg will produce progressive scans, which - is forbidden by the TechNote. - -2014-12-29 Even Rouault - - * libtiff/tif_getimage.c: move test on vertical value of YCbCr subsampling. - to avoid buffer leak (fix previous fix, found by Coverity scan) - -2014-12-29 Even Rouault - - * libtiff/tif_next.c: add new tests to check that we don't read outside of - the compressed input stream buffer. - - * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height - in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and - putcontig8bitYCbCr21tile cases. - -2014-12-27 Even Rouault - - * libtiff/tif_dir.c: in TIFFDefaultDirectory(), reset any already existing - extended tags installed by user code through the extender mechanism before - calling the extender callback (GDAL #5054) - -2014-12-26 Bob Friesenhahn - - * tools/tiffcrop.c: Fix warnings about variables set but not used. - - * contrib/iptcutil/iptcutil.c: Fix warnings about variables set - but not used. - - * tools/tiffgt.c: Fix warnings about unused parameters. - - * libtiff/tif_stream.cxx: Fix warnings about unused parameters. - -2014-12-25 Even Rouault - - * libtiff/tif_getimage.c, libtiff/tif_ojpeg.c, libtiff/tif_zip.c: fix - various typos found by Debian lintian tool (GDAL #5756) - -2014-12-24 Even Rouault - - * libtiff/tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. - http://bugzilla.maptools.org/show_bug.cgi?id=2235 - -2014-12-24 Even Rouault - - * tools/tiff2pdf.c: fix buffer overflow on some YCbCr JPEG compressed images. - http://bugzilla.maptools.org/show_bug.cgi?id=2445 - -2014-12-24 Even Rouault - - * tools/tiff2pdf.c: fix buffer overflow on YCbCr JPEG compressed image. - Derived from patch by Petr Gajdos, - http://bugzilla.maptools.org/show_bug.cgi?id=2443 - -2014-12-23 Even Rouault - - * libtiff/tif_dirread.c: In EstimateStripByteCounts(), check return code - of _TIFFFillStriles(). This solves crashing bug on corrupted - images generated by afl. - -2014-12-23 Even Rouault - - * libtiff/tif_read.c: fix several invalid comparisons of a uint64 value with - <= 0 by casting it to int64 first. This solves crashing bug on corrupted - images generated by afl. - -2014-12-21 Bob Friesenhahn - - * tools/tiffdump.c: Guard against arithmetic overflow when - calculating allocation buffer sizes. - -2014-12-21 Even Rouault - - * tools/tiff2bw.c: when Photometric=RGB, the utility only works if - SamplesPerPixel = 3. Enforce that - http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127) - -2014-12-21 Even Rouault - - * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES - copying. The right fix would be to properly copy it, but not worth the burden - for those esoteric utilities. - http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127) - -2014-12-21 Even Rouault - - * tools/thumbnail.c: fix out-of-buffer write - http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128) - -2014-12-21 Even Rouault - - * tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAG_GROUP3OPTIONS - or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or - COMPRESSION_CCITTFAX4 - http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128) - -2014-12-21 Even Rouault - - * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129) - -2014-12-21 Even Rouault - - * tools/tiff2pdf.c: check return code of TIFFGetField() when reading - TIFFTAG_SAMPLESPERPIXEL - -2014-12-21 Even Rouault - - * tools/tiffcp.c: fix crash when converting YCbCr JPEG-compressed to none. - Based on patch by Tomasz Buchert (http://bugzilla.maptools.org/show_bug.cgi?id=2480) - Description: fix for Debian bug #741451 - tiffcp crashes when converting JPEG-encoded TIFF to a different - encoding (like none or lzw). For example this will probably fail: - tiffcp -c none jpeg_encoded_file.tif output.tif - The reason is that when the input file contains JPEG data, - the tiffcp code forces conversion to RGB space. However, - the output normally inherits YCbCr subsampling parameters - from the input, which leads to a smaller working buffer - than necessary. The buffer is subsequently overrun inside - cpStripToTile() (called from writeBufferToContigTiles). - Note that the resulting TIFF file would be scrambled even - if tiffcp wouldn't crash, since the output file would contain - RGB data interpreted as subsampled YCbCr values. - This patch fixes the problem by forcing RGB space on the output - TIF if the input is JPEG-encoded and output is *not* JPEG-encoded. - Author: Tomasz Buchert - -2014-12-21 Even Rouault - - Fix various crash bugs on fuzzed images. - * libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for - TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing - the directory - * libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read ColorMap or - TransferFunction if BitsPerSample has not yet been read, otherwise reading - it later will cause user code to crash if BitsPerSample > 1 - * libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with - SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8 - * libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images - instead of imagewidth to avoid crash - * tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions - * tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by - libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB - * tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight - * tools/tiffdump.c: fix crash due to overflow of entry count. - -2014-12-15 Even Rouault - - * libtiff/tif_jpeg.c: Fix regression introduced on 2010-05-07 that caused - all tiles/strips to include quantization tables even when the jpegtablesmode - had the JPEGTABLESMODE_QUANT bit set. - Also add explicit removal of Huffman tables when jpegtablesmode has the - JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the - first tile/strip (only useful in update scenarios. create-only was - fine) - -2014-12-09 Bob Friesenhahn - - * tools/tiff2pdf.c: Assure that memory size calculations for - _TIFFmalloc() do not overflow the range of tmsize_t. - -2014-12-07 Even Rouault - - * tools/thumbnail.c, tools/tiffcrop.c: "fix" heap read over-run found with - Valgrind and Address Sanitizer on test suite - -2014-12-07 Bob Friesenhahn - - * tools/tiff2pdf.c (t2p_read_tiff_init): TIFFTAG_TRANSFERFUNCTION - tag can return one channel, with the other two channels set to - NULL. The tiff2pdf code was expecting that other two channels - were duplicate pointers in the case where there is only one - channel. Detect this condition in order to avoid a crash, and - presumably perform correctly with just one channel. - -2014-12-06 Bob Friesenhahn - - * tools/tiffdump.c: Fix double-free bug. - -2014-11-27 Even Rouault - - * libtiff/tif_config.vc.h: no longer use "#define snprintf _snprintf" with - Visual Studio 2015 aka VC 14 aka MSVC 1900 - -2014-11-20 Even Rouault - - * libtiff/tif_lzw.c: prevent potential null dereference of - sp->dec_codetab in LZWPreDecode (bug #2459) - - * libtiff/tif_read.c: in TIFFReadBufferSetup(), avoid passing -1 size - to TIFFmalloc() if passed user buffer size is 0 (bug #2459) - - * libtiff/tif_ojpeg.c: make Coverity happier (not a bug, #2459) - - * libtiff/tif_dir.c: in _TIFFVGetField() and _TIFFVSetField(), make - Coverity happier (not a bug, #2459) - - * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make Coverity happier - (not a bug, #2459) - - * tools/tiff2pdf.c: close PDF file (bug #2479) - - * tools/fax2ps.c: check malloc()/realloc() result (bug #2470) - - * tools/tiffdump.c: detect cycle in TIFF directory chaining (bug #2463) - and avoid passing a NULL pointer to read() if seek() failed before (bug #2459) - - * tools/tiffcrop.c: fix segfault if bad value passed to -Z option - (bug #2459) and add missing va_end in dump_info (#2459) - - * tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451) - -2014-11-20 Even Rouault - * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on - corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471) - -2014-11-20 Even Rouault - * automake: updated to 1.14.1 - * libtool: updated to 2.4.3 - * HOWTO-RELEASE: small update about autotools building order - -2014-10-20 Olivier Paquet - * tools/tiff2pdf.c: Preserve input file directory order when pages - are tagged with the same page number. - -2014-08-31 Bob Friesenhahn - - * libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect - count for tag should be a warning rather than an error since - errors terminate processing. - -2014-06-07 Bob Friesenhahn - - * tools/tiff2rgba.c (]): Fixed tiff2rgba usage message in that zip - was wrongly described. Fix suggested by Miguel Medalha. - -2014-05-06 Bob Friesenhahn - - * libtiff/tif_dirinfo.c (TIFFField) : Fix data type for - TIFFTAG_GLOBALPARAMETERSIFD tag. Patch by Steve Underwood. - Reviewed and forwarded by Lee Howard. - -2013-11-30 Frank Warmerdam - - * libtiff/tif_dir.c: fix last fix for TIFFNumberOfDirectories() - -2013-10-21 Frank Warmerdam - - * libtiff/tif_dir.c: generate error in case of directory count - overflow. - -2013-10-01 Frank Warmerdam - - * libtiff/tiff.h, libtiff/tif_dirinfo.c: add definitions for - TIFF/EP CFARepeatPatternDim and CFAPattern tags (bug #2457) - -2013-09-12 Bob Friesenhahn - - * libtiff/tif_dir.c (TIFFAdvanceDirectory): If nextdir is found to - be defective, then set it to zero before returning error in order - to terminate processing of truncated TIFF. Issue found and fix - suggested by Richard Nolde. - -2013-08-14 Frank Warmerdam - - * tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244) - -2013-08-13 Frank Warmerdam - - * tools/gif2tiff.c: Be more careful about corrupt or - hostile input files (#2450, CVE-2013-4231) - - * tools/tiff2pdf.c: terminate after failure of allocating - ycbcr buffer (bug #2449, CVE-2013-4232) - -2013-07-09 Frank Warmerdam - - * tools/tiffinfo.c: Default various values fetched with - TIFFGetField() to avoid being uninitialized. - -2013-05-02 Tom Lane - - * tools/tiff2pdf.c: Rewrite JPEG marker parsing in - t2p_process_jpeg_strip to be at least marginally competent. The - approach is still fundamentally flawed, but at least now it won't - stomp all over memory when given bogus input. Fixes CVE-2013-1960. - -2013-05-02 Tom Lane - - * contrib/dbs/xtiff/xtiff.c, libtiff/tif_codec.c, - libtiff/tif_dirinfo.c, tools/rgb2ycbcr.c, tools/tiff2bw.c, - tools/tiff2pdf.c, tools/tiff2ps.c, tools/tiffcrop.c, - tools/tiffdither.c: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of sprintf(buf, - ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to - protect against overflow of fixed-size buffers. This responds in - particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's - t2p_write_pdf_page(), but in general it seems like a good idea to - deprecate use of sprintf(). - -2013-03-29 Bob Friesenhahn - - * configure.ac: Applied patch by Brad Smith to improve pkg-config - static linking by adding -lm to Libs.private when needed. - -2013-03-05 Tom Lane - - * html/man/tiff2ps.1.html, html/man/tiffcp.1.html, - html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, - man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, - tools/tiffdither.c: Sync tool usage printouts and man pages with - reality (quite a few options had escaped being documented in one - or both places). Per an old report from Miroslav Vadkerti. - -2013-01-25 Bob Friesenhahn - - * tools/tiff2ps.c:Fix bug in auto rotate option code. Once a - rotation angle was set by the auto rotate check, it was retained - for all pages that followed instead ofa being retested for each - page. Patch by Richard Nolde. - -2013-01-18 Frank Warmerdam - - * libtiff/tif_write.c: tmsize_t related casting warning fixed for - 64bit linux. - - * libtiff/tif_read.c: uint64/tmsize_t change for MSVC warnings. - http://bugzilla.maptools.org/show_bug.cgi?id=2427 - -2012-12-20 Tom Lane - - * test/raw_decode.c: Relax raw_decode's pixel-value checks so that - it will pass with more versions of libjpeg. (There are at least - three in active use now, and JPEG_LIB_VERSION doesn't tell us - enough to uniquely identify expected results.) - -2012-12-12 Tom Lane - - * libtiff/tif_print.c: Fix TIFFPrintDirectory's handling of - field_passcount fields: it had the TIFF_VARIABLE and - TIFF_VARIABLE2 cases backwards. - -2012-12-10 Tom Lane - - * tools/ppm2tiff.c: Improve previous patch for CVE-2012-4564: - check the linebytes calculation too, get the max() calculation - straight, avoid redundant error messages, check for malloc - failure. - -2012-12-10 Tom Lane - - * libtiff/tif_pixarlog.c: Improve previous patch for CVE-2012-4447 - (to enlarge tbuf for possible partial stride at end) so that - overflow in the integer addition is detected. Per gripe from - Huzaifa Sidhpurwala. - -2012-12-03 Bob Friesenhahn - - * tools/tiffset.c: tiffset now supports a -u option to unset a - tag. Patch by Zach Baker. See - http://bugzilla.maptools.org/show_bug.cgi?id=2419 - -2012-11-18 Bob Friesenhahn - - * automake: Update Automake to 1.12.5 release. - - * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not - require malloc() to return NULL pointer if requested allocation - size is zero. Assure that _TIFFmalloc does. - -2012-11-01 Frank Warmerdam - - * tools/ppm2tiff.c: avoid zero size buffer vulnerability. - CVE-2012-4564 - Thanks to Huzaifa Sidhpurwala of the - Red Hat Security Response team for the fix. - -2012-10-18 Frank Warmerdam - - * tif_zip.c: Avoid crash on NULL error messages. - -2012-09-22 Bob Friesenhahn - - * libtiff 4.0.3 released. - -2012-09-20 Bob Friesenhahn - - * Makefile.am: Update to Automake 1.12.4 - -2012-08-19 Bob Friesenhahn - - * Makefile.in: Update to Automake 1.12.3 - - * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add - some TIFF/FX support in libtiff. Add the tag definitions to - tiff.h. Add the related TIFF field definitions to tif_dirinfo.c, - and also fixes an error in a comment. Adds the photometric values - to tif_print.c, and fixes a bug. These changes are by Steve - Underwood. - -2012-08-13 Frank Warmerdam - - * libtiff/tif_write.c: Fix bug rewriting image tiles in a - compressed file: http://trac.osgeo.org/gdal/ticket/4771 - -2012-08-02 Frank Warmerdam - - * libtiff/tif_dirread.c: report error in case of mismatch value - counts for tags (ie. DotRange). - -2012-07-26 Tom Lane - - * libtiff/{tiffio.h, tif_dirinfo.c, libtiff.def}: Add six new - functions TIFFFieldTag(), TIFFFieldName(), TIFFFieldDataType(), - TIFFFieldPassCount(), TIFFFieldReadCount(), TIFFFieldWriteCount() - as external accessors for the opaque type TIFFField. - - * tools/tiffset.c: Make tiffset use the above functions instead of - relying on library private headers. - -2012-07-19 Tom Lane - - * tools/tiff2pdf.c: Fix two places where t2p_error didn't get set - after a malloc failure. No crash risk AFAICS, but the program - might not report exit code 1 as desired. h/t mancha@mac.hush.com - -2012-07-18 Tom Lane - - * tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails. This - prevents core dumps or perhaps even arbitrary code execution when - processing a corrupt input file (CVE-2012-3401). - -2012-07-06 Bob Friesenhahn - - * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+. - IJG JPEG 7+ uses a different upsampling algorithm which produces - different numeric results. - - * libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to - work with IJG JPEG 7+. - -2012-07-04 Bob Friesenhahn - - * test/raw_decode.c: Add changes so that test can run with build - directory outside of source directory. - -2012-07-02 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix handling when writing RGBA jpeg compressed - imagery (http://trac.osgeo.org/gdal/ticket/4732) - -2012-06-20 Frank Warmerdam - - * libtiff/tif_fax3.c: fix memory initialization of runs, only - partly done. - - * libtiff/tif_pixarlog.c: Make sure tbuf is large enough for one - full "stride" past the end. - -2012-06-19 Frank Warmerdam - - * libtiff/tif_packbits.c: fix read past end of data buffer. - -2012-06-15 Frank Warmerdam - - * libtiff 4.0.2 released. - - * tools/tif2pdf.c, tools/tifdump.c: avoid uninitialized variable - warnings with clang. - -2012-06-15 Tom Lane - - * tools/tiff2pdf.c: Defend against integer overflows while - calculating required buffer sizes (CVE-2012-2113). - -2012-06-12 Frank Warmerdam - - * libtiff/tif_print.c: Be careful about printing corrupt inknames. - - * libtiff/tif_fax3.c: Ensure runs array is initialized to zeros. - -2012-06-07 Frank Warmerdam - - * libtiff/tif_print.c: avoid pretty printing other fields when - we don't have the proper amount and type of data or if the field - is actually autodefined. - -2012-06-05 Frank Warmerdam - - * libtiff/tif_tile.c, libtiff/tif_strip.c: Ensure that illegal - ycbcrsubsampling values result in a runtime error, not just an - assertion. - - * tests/custom_dir.c: Add testing of EXIF and custom directory - reading and writing. - - * libtiff/tif_dir.c, libtiff/tiffio.h: Add TIFFCreateCustomDirectory() - and TIFFCreateEXIFDirectory() functions. - - * libtiff/tif_dir.c, tif_print.c : Remove FIELD_CUSTOM handling for - PAGENUMBER, HALFTONEHINTS, and YCBCRSUBSAMPLING. Implement DOTRANGE - differently. This is to avoid using special TIFFGetField/TIFFSetField - rules for these fields in non-image directories (like EXIF). - -2012-06-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: Remove code for fixing up h_sampling and v_sampling - in JPEGPreDecode(). If a fixup will be done it needs to be done sooner - in JPEGFixupTagsSubsampling() or else buffer sized may be wrong. - -2012-06-01 Frank Warmerdam - - * tools/tiffinfo.c: Do not try to read image data in EXIF directories. - - * libtiff/tif_getimage.c: added support for _SEPARATED CMYK images. - http://bugzilla.maptools.org/show_bug.cgi?id=2379 - - * libtiff/tif_unix.c: use strerror() to return a more specific error message - on failed open. - http://bugzilla.maptools.org/show_bug.cgi?id=2341 - - * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs. - http://bugzilla.maptools.org/show_bug.cgi?id=2386 - - * tests/decode_raw.c, tests/images/quad-tile.jpg.tiff: add limited support - for testing jpeg in tiff image decoding including the "raw" decode interface. - -2012-05-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid overrunning the end of the output buffer in - JPEGDecodeRaw() - mostly likely to occur when there is confusion about - sampling values. - - * libtiff/tif_read.c: Make sure tif_rawdatasize is cleared when tif_rawdata is freed. - - * libtiff/tif_getimage.c: Add support for greyscale+alpha c/o Jérémie Laval. - http://bugzilla.maptools.org/show_bug.cgi?id=2398 - -2012-05-29 Frank Warmerdam - - * libtiff/tif_dir.c: avoid using specific set/get logic to process fields in custom directories, - like EXIF directories. This fixes problems like a tag "320" existing in a custom directory getting - processed as if it were a colormap when it isn't really. Damn the wide variety of argument formulations - to get/set functions for different tags! - - * libtiff/tif_dir.c: Ensure that we keep track of when tif_rawdata - is a pointer into an mmap()ed file via TIFF_BUFFERMMAP flag. - -2012-05-24 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Allocate working buffer one word larger since we "forward - accumulate" and overwrite the end by one word in at least some cases. - -2012-05-23 Frank Warmerdam - - * libtiff/tif_pixarlog.c: avoid accessing out of the lookup arrays for out of range inputs. - - * tools/tiffinfo.c: initialize h=0 to avoid undefined variable for degenerate files. - - * libtiff/tif_ojpeg.c: if OJPEGWriteHeader() fails once do not bother trying again on - the same image. - - * libtiff/tif_ojpeg.c: make things more resilient in the face of files without - stripbytecounts or stripoffsets or where loading these fails. - - * libtiff/tif_print.c: be careful about whether min/max values are singular - or one per sample. - - * libtiff/tif_print.c: Avoid confusion about count size when printing custom fields. - May affect things like ISOSpeedRatings. - - * libtiff/tif_dir.c: avoid one byte past end of ink names reading - in some cases. - -2012-05-19 Bob Friesenhahn - - * man/TIFFGetField.3tiff: Correct the 'count' field type in the - example for how to retrieve the value of unsupported tags. - -2012-03-30 Frank Warmerdam - - * tif_getimage.c: Fix size overflow (zdi-can-1221,CVE-2012-1173) - care of Tom Lane @ Red Hat. - -2012-02-18 Bob Friesenhahn - - * libtiff 4.0.1 released. - - * Update automake used to 1.11.3. - - * libtiff/tiffio.h: Use double-underbar syntax in GCC printf - attribute specification to lessen the risk of accidental macro - substitution. Patch from Vincent Torri. - -2012-01-31 Frank Warmerdam - - * libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around - assumption tag fetching is always successful. - - * libtiff/tif_jpeg.c: Extra caution for case where sp is NULL. - -2012-01-22 Bob Friesenhahn - - * configure.ac: Add support for using library symbol versioning on - ELF systems with the GNU linker. Support is enabled via - --enable-ld-version-script. Disabled by default for now until - there is a decision for how to deploy a libtiff with versioned - symbols after libtiff 4.0.0 was already released. - -2011-12-22 Bob Friesenhahn - - * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in - - tif_win32.c. Patch by Edward Lam. - - * configure.ac: Add libtiff private dependency on -llzma for - pkg-config. Patch by Mark Brand. - Updated Automake to 1.11.2. - -2011-12-21 Bob Friesenhahn - - * libtiff 4.0.0 released. - -2011-12-08 Frank Warmerdam - - * libtiff/tif_dirread.c, libtiff/tif_read.c: more cautious checking - of _TIFFFillStriles() results (#gdal 4372) - -2011-12-07 Frank Warmerdam - - * libtiff/tif_dirread.c: fixes to deal with invalid files where - _TIFFFillStriles() fails, and we try to chop up strips (gdal #4372) - - * libtiff/tif_dirread.c: fix error reporting when there is no - tag information struct and name (gdal #4373) - -2011-10-22 Bob Friesenhahn - - * Update GNU libtool to 2.4.2. - - * tools/tiffsplit.c (tiffcp): TIFFGetField count field should be - uint32 type for TIFFTAG_JPEGTABLES. Patch by Christophe - Deroulers. - -2011-06-21 Frank Warmerdam - - * libtiff/libtiff.def: Restore TIFFMergeFieldInfo. - -2011-05-31 Jim Meyering - - * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also - upon failure to allocate "resizeddata". - * tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for - allocation failure, not before. - * libtiff/tif_ojpeg.c: plug leaks on OJPEG read failure path - * tools/rgb2ycbcr.c (cvtRaster): unchecked malloc - * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark - NULL-deref and possible overflow - * tools/tiff2pdf.c: remove decl+set of set-but-not-used local, "written" - * libtiff/tif_jpeg.c (JPEGInitializeLibJPEG): Remove declaration - and set of otherwise unused local, data_is_empty. - * libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]: - Diagnose out-of-memory failure and return 0 rather than - dereferencing NULL. - -2011-05-24 Frank Warmerdam - - * libtiff/tif_dirread.c: produce special error message for zero tag - directories instead of error out on the malloc(0) failure. - -2011-05-16 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Restore TIFFMergeFieldInfo() and - related declarations as they are in active use by libraries - such as libgeotiff, and work just fine. (#2315) - -2011-04-20 Frank Warmerdam - - * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete - TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API. - http://bugzilla.maptools.org/show_bug.cgi?id=2315 - - * libtiff/libtiff.def: add some missing (64bit) APIs. - http://bugzilla.maptools.org/show_bug.cgi?id=2316 - -2011-04-09 Bob Friesenhahn - - * libtiff 4.0.0beta7 released. - -2011-04-09 Bob Friesenhahn - - * configure.ac: Should use AC_CANONICAL_HOST since host specifies - the run-time target whereas target is used to specify the final - output target if the package is a build tool (like a compiler), - which libtiff is not. Resolves libtiff bug 2307 "Use - AC_CANONICAL_HOST macro". - -2011-04-02 Bob Friesenhahn - - * configure.ac: Support configuring TIFF_INT64_FORMAT and - TIFF_UINT64_FORMAT appropriately for MinGW32. - - * tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c, - tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not - understood by WIN32 CRT. - - * libtiff/tif_ojpeg.c: Fixes to compile with MinGW32 GCC. - - * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since - it is much more portable. Tmpfile is included in ISO/IEC - 9899:1990 and the WIN32 CRT. - -2011-03-26 Frank Warmerdam - - * tools/tiffset.c: add -d and -sd switches to allow operation on - a particular directory, not just the first (jef). - -2011-03-21 Frank Warmerdam - - * libtiff/tif_thunder.c: Correct potential buffer overflow with - thunder encoded files with wrong bitspersample set. The libtiff - development team would like to thank Marin Barbella and TippingPoint's - Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, - CVE-2011-1167). - http://bugzilla.maptools.org/show_bug.cgi?id=2300 - -2011-03-10 Frank Warmerdam - - * libtiff/tif_fax3.h: Fix to last change allowing zero length - runs at the start of a scanline - needed for legal cases. - -2011-03-02 Frank Warmerdam - - * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding - a move left. Without this, a malicious input file can generate an - indefinitely large series of runs without a0 ever reaching the right - margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. - This is a modified version of a patch proposed by Drew Yao of Apple - Product Security. It adds an unexpected() report, and disallows the - equality case, since emitting a run without increasing a0 still allows - buffer overrun. - -2011-02-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid divide by zero in degenerate case (#2296) - - * tools/tiff2rgba.c: close source file on error to make leak - detection easier. - - * libtiff/tif_getimage.c: avoid leaks if TIFFRGBAImageBegin() fails. - - http://bugzilla.maptools.org/show_bug.cgi?id=2295 - -2011-02-22 Frank Warmerdam - - * libtiff/tif_lzma.c: Maintain tif_rawcc/tif_rawcp (CHUNKY_STRING_READ - _SUPPORT) - -2011-02-18 Frank Warmerdam - - * configure.ac, configure: Added support for --enable-chunky-strip-read - configure option to enable the experimental feature from a couple - months ago for reading big strips in chunks. - - * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h, - tif_write.c, tif_print.c, tif_jpeg.c, tif_dirwrite.c, tif_write.c: - Implement optional support for deferring the load of strip/tile - offset and size tags for optimized scanning of directories. Enabled - with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD - #define in tif_config.h). - -2011-02-11 Frank Warmerdam - - * libtiff/tif_print.c: remove unused variable. - -2011-02-09 Frank Warmerdam - - * libtiff/tif_win32.c: avoid error/warning buffer overrun problem - with non-console (popup message) builds on win32. - - http://bugzilla.maptools.org/show_bug.cgi?id=2293 - -2011-01-24 Olivier Paquet - - * libtiff/{tif_dir.{h,c}, tif_dirinfo.c, tif_dirread.c, tif_dirwrite.c, - tif_print.c, tiff.h, tiffiop.h} : Added support for - TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE to have different - values for each sample. Presents the min/max of all samples by default for - compatibility. TIFFSetField/TIFFGetField can be made to handle those tags - as arrays by changing the new TIFFTAG_PERSAMPLE pseudo tag. - http://www.asmail.be/msg0055458208.html - -2011-01-06 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not - maintained. - - * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding - for CHUNKY_STRIP_READ_SUPPORT. - - * libtiff/tif_jpeg.c: ensure that rawcc and rawcp are maintained - during JPEGPreDecode and JPEGDecode calls. - * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT, - as compression formats like JPEG keep 16 lines interleaved in a sense - and might need to touch quite a bit of data. - - http://trac.osgeo.org/gdal/ticket/3894 - -2011-01-03 Lee Howard - - * libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images - caused by commit on 2010-12-14. Submitted by e-mail from - Even Rouault - -2010-12-31 Olivier Paquet - - * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE. - http://bugzilla.maptools.org/show_bug.cgi?id=2266 - -2010-12-23 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added support for specifying the - compression level parameter (preset) for Deflate and LZMA encoders, - e.g "-c lzma:p1" or "-c zip:p9". - - * libtiff/tif_lzma.c: Properly set the LZMA2 compression level - (preset) in LZMAVSetField(). - -2010-12-18 Bob Friesenhahn - - * libtiff/Makefile.am (libtiff_la_SOURCES): Added tif_lzma.c to - Makefile. - -2010-12-14 Andrey Kiselev - - * configure.ac, libtiff/{tif_codec.c, tif_config.h.in, tiff.h, - tiffiop.h, tif_lzma.c}, tools/tiffcp.c, man/tiffcp.1: Implement a new - TIFF compression scheme LZMA reserving a new value 34925 for - Compression tag. As per - bug http://bugzilla.maptools.org/show_bug.cgi?id=2221 - -2010-12-14 Lee Howard - - * libtiff/tif_dirread.c: tolerate some cases where - FIELD_COLORMAP is missing - http://bugzilla.maptools.org/show_bug.cgi?id=2189 - -2010-12-14 Lee Howard - - * libtiff/tif_read.c: change read_ahead to tmsize_t - http://bugzilla.maptools.org/show_bug.cgi?id=2222 - -2010-12-14 Lee Howard - - * configure.ac, libtiff/Makefile.am: Build tif_win32.c on - Windows except on Cygwin - http://bugzilla.maptools.org/show_bug.cgi?id=2224 - -2010-12-14 Lee Howard - - * tools/gif2tiff.c: fix buffer overrun - http://bugzilla.maptools.org/show_bug.cgi?id=2270 - -2010-12-14 Lee Howard - - * libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order - to improve compatibility with various viewers - submitted by e-mail from Dwight Kelly - -2010-12-13 Lee Howard - - * tools/fax2ps.c: be consistent with page-numbering - http://bugzilla.maptools.org/show_bug.cgi?id=2225 - -2010-12-13 Lee Howard - - * libtiff/tif_color.c: prevent crash in handling bad TIFFs - resolves CVE-2010-2595 - http://bugzilla.maptools.org/show_bug.cgi?id=2208 - -2010-12-13 Lee Howard - - * tools/tiffcrop.c: new release by Richard Nolde - http://bugzilla.maptools.org/show_bug.cgi?id=2004 - -2010-12-12 Lee Howard - - * tools/tiff2pdf.c: fix colors for images with RGBA - interleaved data - http://bugzilla.maptools.org/show_bug.cgi?id=2250 - -2010-12-12 Lee Howard - - * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files - http://bugzilla.maptools.org/show_bug.cgi?id=2164 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: remove invalid duplication for Lab - http://bugzilla.maptools.org/show_bug.cgi?id=2162 - -2010-12-11 Lee Howard - - * libtiff/tif_jpeg.c: fix use of clumplines calculation - http://bugzilla.maptools.org/show_bug.cgi?id=2149 - -2010-12-11 Lee Howard - - * tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() - http://bugzilla.maptools.org/show_bug.cgi?id=2118 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, - libtiff/tif_zip.c: fix build errors for VC6 - http://bugzilla.maptools.org/show_bug.cgi?id=2105 - -2010-12-11 Lee Howard - - * libtiff/tif_stream.cxx: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2091 - * libtiff/tif_dirread.c: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2092 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: add fill-page option - http://bugzilla.maptools.org/show_bug.cgi?id=2051 - -2010-12-11 Lee Howard - - * libtiff/tif_dirread.c: modify warnings - http://bugzilla.maptools.org/show_bug.cgi?id=2016 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix buffer overflow on problem data - http://bugzilla.maptools.org/show_bug.cgi?id=1999 - -2010-12-11 Lee Howard - - * tools/tiffinfoce.c: strip byte counts are uint64* now - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix crash when reading a TIFF with a zero - or missing byte-count tag - * tools/tiffsplit.c: abort when reading a TIFF without a byte-count - per http://bugzilla.maptools.org/show_bug.cgi?id=1996 - -2010-12-08 Lee Howard - - * libtiff/tif_dirread.c: fix crash when reading a badly-constructed - TIFF per http://bugzilla.maptools.org/show_bug.cgi?id=1994 - -2010-12-06 Lee Howard - - * libtiff/tif_open.c: Fix mode check before opening a file. - http://bugzilla.maptools.org/show_bug.cgi?id=1906 - -2010-11-27 Bob Friesenhahn - - * libtiff-4.pc.in: Added libtiff pkg-config .pc file support. - Patch by Vincent Torri. - -2010-10-21 Frank Warmerdam - - * tools/tiffinfo.c: avoid direct reference to _TIFFerrorHandler. - - * libtiff/tif_config.vc.h: define snprintf to _snprintf for tiff2pdf. - - * libtiff/libtiff.def: export _TIFFCheckMalloc for tools. - -2010-09-25 Lee Howard - - * tools/tiff2ps.c: improvements and enhancements from Richard Nolde - with additional command line options for Document Title, - Document Creator, and Page Orientation - -2010-07-13 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde to avoid a - potentially unterminated buffer due to using an exceptionally long - file name. - -2010-07-08 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed ID buffer filling in - t2p_write_pdf_trailer(), thanks to Dmitry V. Levin. - -2010-07-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() - to expected value as the warning message suggests. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=1963 - -2010-07-06 Andrey Kiselev - - * tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE - which should be set by value. - - * libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() - and _TIFFFieldWithName() if the tag is not found in the tag table. - This should be normal situation and returned NULL value should be - properly handled by the caller. - -2010-07-02 Andrey Kiselev - - * libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned - integer type conversions. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2207 - - * tools/{tiff2bw.c, thumbnail.c, pal2rgb.c}: Fix the count for - WhitePoint tag as per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2042 - - * libtiff/tif_getimage.c: Check the number of samples per pixel when - working with YCbCr image in PickContigCase(). As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2216 - - * libtiff/tif_dir.c: Set the bogus post-decoding hook when processing - TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when - we don't need any post-processing. That helps to reset the hook if we - previously set this field to some other value and the hook was - initialized accordingly. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2035 - -2010-07-01 Andrey Kiselev - - * tools/tiffgt.c: Properly check the raster buffer allocations for - integer overflows. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2108 - - * m4/acinclude.m4: Update GL/GLU/GLUt/Pthread macros from the - upstream. - - * libtiff/{tif_aux.c, tif_strip.c, tif_tile.c, tiffiop.h}: Move - multiply_32() and multiply_64() functions into tif_aux.c file and - rename them into _TIFFMultiply32() and _TIFFMultiply64() respectively. - -2010-06-30 Andrey Kiselev - - * tools/tiff2pdf.c: Better generation of ID field in - t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings. - - * tools/tiff2pdf.c: Fixed computation of the tile buffer size when - converting JPEG encoded tiles. - - * tools/tiff2pdf.c: Better handling of string fields, use static - string buffers instead of dynamically allocated, use strncpy() instead - of strcpy(), control the string lengths. - -2010-06-25 Andrey Kiselev - - * tools/tiffcp.c: Initialize buffer arrays with zero to avoid - referencing to uninitialized memory in some cases (e.g. when tile size - set bigger than the image size). - -2010-06-15 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr - subsampled data since tiffcrop currently doesn't support it. Fix - JPEG support. - -2010-06-13 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix invocation of tag compare function (#2201) - - * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return" - in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely - wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual - size is larger. Also, there are a bunch of places that try to - memset() a malloc'd buffer before checking for malloc failure, which - would result in core dump if there actually were a failure. (#2211) - -2010-06-11 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Need more castings to - avoid compiler warnings if parameter types are not sign - consistent. - - * libtiff 4.0.0alpha6 released. - - * tools/tiffcrop.c: Applied patch from Richard Nolde: Corrected - European page size dimensions. Added an option to allow the user - to specify a custom page size on the command line. Fix the case - where a page size specified with a fractional part was being - coerced to an integer by retyping the variables that define the - paper size. - - * html/index.html: Update for the 3.9.3 release. - - * tools/tiffcp.c (tiffcp): Applied Tom Lane's patch to reject - YCbCr subsampled data since tiffcp currently doesn't support it. - http://bugzilla.maptools.org/show_bug.cgi?id=2097 - - * Update libtool to version 2.2.10. - -2010-06-10 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Work properly if - multiplier is zero. - -2010-06-09 Bob Friesenhahn - - * libtiff/tif_fax3.c (Fax3SetupState): Yesterday's fix for - CVE-2010-1411 was not complete. - - * libtiff/tiffiop.h (TIFFSafeMultiply): New macro to safely - multiply two integers. Returns zero if there is an integer - overflow. - - * tools/tiffcp.c (main): tiffcp should not leak memory if an error - is reported when reading the input file. - -2010-06-08 Bob Friesenhahn - - * Update libtool to version 2.2.8. - - * libtiff/tif_fax3.c (Fax3SetupState): Avoid under-allocation of - buffer due to integer overflow in TIFFroundup() and several other - potential overflows. In conjunction with the fix to TIFFhowmany(), - fixes CVE-2010-1411. - - * libtiff/tiffiop.h (TIFFhowmany): Return zero if parameters would - result in an integer overflow. This causes TIFFroundup() to also - return zero if there would be an integer overflow. - - * contrib: Add an emacs formatting mode footer to all source files - so that emacs can be effectively used. - -2010-06-03 Oliver Chen Feng - - * libtiff/tools/tiffcp.c: add a new option -x to force merged tiff - file PAGENUMBER value in sequence for users who care the page - sequence, this will also prevent tiff2pdf from creating pdf file from - the merged tiff file with wrong page sequence. - -2010-05-08 Olivier Paquet - - * libtiff/tif_dirread.c: Restored TIFFReadDirEntryFloat function in order - to add missing TIFF_SETGET_FLOAT case to TIFFFetchNormalTag. - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_FOVCOT so it is readable again (regression from 3.9.2). - http://bugzilla.maptools.org/show_bug.cgi?id=2192 - -2010-05-07 Frank Warmerdam - - * libtiff/tif_jpeg.c: Ensure that quality is always set in - JPEGPreEncode(), not just when we want to output local tables. - Otherwise the quality used during compression may not be right and - might not match the tables in the tables tag. This bug only occurs - when seeking between directories in the midst of writing blocks. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-05-06 Andrey Kiselev - - * html/man/TIFFGetField.3tiff.html, html/man/TIFFSetField.3tiff.html: - Regenerated from the source. - -2010-05-05 Olivier Paquet - - * libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which - had stopped working. Also made it always print 6 floats instead of - 2*SamplesPerPixel. - http://bugzilla.maptools.org/show_bug.cgi?id=2191 - http://bugzilla.maptools.org/show_bug.cgi?id=2186 - * man/TIFFGetField.3tiff, man/TIFFSetField.3tiff: Fixed doc to reflect the - fact that libtiff considers TIFFTAG_REFERENCEBLACKWHITE to be 6 floats. - -2010-05-05 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix to use memcmp(), not memcpy() when checking - if the jpeg table was written. This is a fix for the last fix on 04-21. - -2010-04-21 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid preparing jpeg tables every time - JPEGSetupEncode() is called if the tables already seem to be - established. This prevents spurious updates and rewriting of - directories with jpegtables when doing updates to existing images. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-04-20 Olivier Paquet - - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_IMAGEFULLWIDTH, TIFFTAG_PIXAR_IMAGEFULLLENGTH, - TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN and TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA. - They were unreadable with TIFF_SETGET_UNDEFINED, a regression from 3.9.2. - http://bugzilla.maptools.org/show_bug.cgi?id=2139 - -2010-04-10 Bob Friesenhahn - - * libtiff/tif_dir.c (_TIFFVSetField): Add a special error case for - when the tag count value is zero. Error handling is still a - regression since in 3.9.2, empty tags are skipped (with a warning) - rather than returning a hard error and refusing to read the file. - - * tools/ppm2tiff.c (main): While case for parsing comment line - requires extra parenthesis to work as expected. Reported by - Thomas Sinclair. - -2010-04-02 Frank Warmerdam - - * libtiff/tif_read.c (primarily): Add support for - CHUNKY_STRIP_READ_SUPPORT where large strips are - read in chunks for applications using TIFFReadScanline(). - This is intended to make it more practical work with very - large compressed one-strip files. Feature is off by default. - Enable by defining CHUNK_STRIP_READ_SUPPORT as a macro. - http://trac.osgeo.org/gdal/ticket/3514 - -2010-03-31 Frank Warmerdam - - * libtiff/tif_flush.c: Use TIFFRewriteDirectory() when flushing - directories so previously placed directories will be migrated to - the end of file if needed. - -2010-03-30 Frank Warmerdam - - * libtiff/tif_lzw.c: change type of dec_bitsleft field to uint64 - to support operating on strips/tiles of more than 256MB. - http://trac.osgeo.org/gdal/ticket/3512 - -2010-03-10 Bob Friesenhahn - - * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so - that it is clearly a memory allocation error message, and also - includes the size of the allocation request. - -2010-02-22 Lee Howard - - * libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating - the JPEG TIFF as is is not required in order to prevent it from - being unused and filled with invalid data. (Leave it to be - generated by later activity.) - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip - data rather than skipping them. This fixes the ability to view in - Acrobat Reader, Evince, and Ghostscript. - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR - strips. - http://bugzilla.maptools.org/show_bug.cgi?id=2029 - -2009-12-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Made JPEGDecodeRaw() check for buffer overruns. - Made so that when working with downsampled images a stub function - reporting an error is used for tif_decoderow. We cannot meaningfully - support reading scanlines in this situation. (#1936) - - * libtiff/tif_jpeg.c: Ensure that tif_scanlinesize is computed after - resetting of the upsampling values (gdal:#3259). - http://bugzilla.maptools.org/show_bug.cgi?id=1936 - -2009-11-30 Frank Warmerdam - - * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c, - tools/ras2tiff.c: Fix resource leaks on error. - http://bugzilla.maptools.org/show_bug.cgi?id=2121 - - * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling - TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF directory instead - of as a custom(generic) field to avoid a potential reentrancy problem. - http://bugzilla.maptools.org/show_bug.cgi?id=2125 - - * libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h, - man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit - const, and display_sRGB static and const. - http://bugzilla.maptools.org/show_bug.cgi?id=2124 - -2009-11-04 Bob Friesenhahn - - * libtiff 4.0.0alpha5 released. - -2009-11-03 Bob Friesenhahn - - * tools/tiffcrop.c: Updated tiffcrop from Richard Nolde. This - version has undergone substantial testing with arbitrary sample - bit depths. Also eliminates GCC compilation warnings. - -2009-11-02 Bob Friesenhahn - - * port/libport.h: Add extern declarations for getopt standard - globals. - -2009-10-31 Bob Friesenhahn - - * libtiff/tif_lzw.c (LZWDecode, LZWDecodeCompat): Fix warnings - noticed in 64-bit build of libtiff with Visual Studio 2005. - Resolves "Bug 2067 - Visual Studio 2005 64-bit warnings in - tif_lzw.c", http://bugzilla.maptools.org/show_bug.cgi?id=2067 - - * libtiff/tif_pixarlog.c (PixarLogEncode): Fix non-important - warning noticed in Visual Studio 2005 build. Resolves "Bug 2068 - - Visual Studio 2005 64-bit warning in tif_pixarlog.c", - http://bugzilla.maptools.org/show_bug.cgi?id=2068 - -2009-10-29 Bob Friesenhahn - - * libtiff/tif_dirread.c: Eliminate GCC "dereferencing type-punned - pointer" warnings. - -2009-10-28 Bob Friesenhahn - - * html/tools.html: Add manual page links, and a summary - description of tiffcrop. - -2009-10-07 Bob Friesenhahn - - * configure.ac: x86_64 should use the same fill order as i386. - -2009-09-24 Bob Friesenhahn - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop from Richard - Nolde. Major updates to add significant functionality for reading - and writing tile based images with bit depths not a multiple of 8 - which cannot be handled by tiffcp. - -2009-09-03 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs - do_fancy_upsampling=FALSE in order to read raw data. Resolves - "Bug 2090 - OJPEG crash with libjpeg v7". - http://bugzilla.maptools.org/show_bug.cgi?id=2090 - -2009-09-03 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed error recognition handling in RGBA - interface when stoponerror is set. - http://bugzilla.maptools.org/show_bug.cgi?id=2071 - -2009-08-30 Bob Friesenhahn - - * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to - fix build with gcc when using the "-Wformat - -Werror=format-security" flags. - -2009-08-29 Bob Friesenhahn - - * test/{bmp2tiff_palette.sh, bmp2tiff_rgb.sh, gif2tiff.sh, - ppm2tiff_pbm.sh, ppm2tiff_pgm.sh, ppm2tiff_ppm.sh}: Additional - utilities tests. - -2009-08-28 Bob Friesenhahn - - * tools/tiffinfo.c: tiffinfo should return error status to the - caller. Register a private error callback to accomplish that. - - * test/Makefile.am (TIFFIMAGES): Add test images in BMP, GIF, and - PNM formats so that we will be able to test more of the tools. - While adding these test images I notice that bmp2tiff and gif2tiff - only support ancient versions of their respective formats. - -2009-08-27 Bob Friesenhahn - - * libtiff 4.0.0alpha4 released. - - * HOWTO-RELEASE: Improved release instructions. - -2009-08-24 Bob Friesenhahn - - * man/{TIFFClose.3tiff,raw2tiff.1,tiffcmp.1,tiffsplit.1}: Applied - fixes for "Bug 2023 - nroff errors in manual pages". - http://bugzilla.maptools.org/show_bug.cgi?id=2023 - - * tools/{rgb2ycbcr.c, tiff2rgba.c}: Applied fixes for "Bug 2079 - - CVE-2009-2347 libtiff: integer overflows in various inter-color - space conversion tools". - http://bugzilla.maptools.org/show_bug.cgi?id=2079 - - * libtiff/tif_print.c (TIFFPrintDirectory): Apply fix from Jay - Berkenbilt for "Bug 2024 - possible null pointer dereference with - one-line fix". - http://bugzilla.maptools.org/show_bug.cgi?id=2024 - - * libtiff/tif_dirread.c (TIFFReadCustomDirectory): Apply patch - from Jay Berkenbilt for "Bug 1895 - logic error in tif_dirread.c: - segfault after setting tdir_tag = IGNORE". - http://bugzilla.maptools.org/show_bug.cgi?id=1895 - -2009-08-23 Bob Friesenhahn - - * test/Makefile.am, test/tiffcrop*.sh: Split previously existing - tiffcrop.sh into a collection of many specific tests. Re-wrote - all of the existing tests to be based on some simple shell - functions. Make distcheck works again. - - Export certain variables (MAKE, MAKEFLAGS, MEMCHECK) to tests and - added 'memcheck' and 'ptrcheck' targets to make it easy to run the - tests under valgrind. - -2009-08-21 Bob Friesenhahn - - * test/tiffcp-logluv.sh: Fix test so that it works with a VPATH - build. - - * test/Makefile.am (AUTOMAKE_OPTIONS): Colorized tests was not - actually activated since it needed to be enabled in this - Makefile.am. Also activated parallel-tests mode since it offers - useful features such as per-test .log files and a summary test - report .log file. - -2009-08-20 Bob Friesenhahn - - * configure.ac: Updated autotools. Autoconf 2.64, Automake 1.11, - libtool 2.2.6. Enabled support for silent build rules - (--enable-silent-rules or 'make V=0') and colorized tests. - - * html/{index.html, v3.9.0.html}: Update for 3.9.0 release. - -2009-06-30 Frank Warmerdam - - * tests/tiffcp-logluv.sh: minimal testing of sgilog compression. - - * tools/tiffcp.c: add -c sgilog support. - - * libtiff/tif_luv.c: correct return codes from encoderow to be - 1 on success instead of zero. - http://bugzilla.maptools.org/show_bug.cgi?id=2069 - - * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from - #1085 for a better underflow fix that errors properly. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - http://bugzilla.maptools.org/show_bug.cgi?id=1985 - -2009-06-26 Frank Warmerdam - - * libtiff/tif_strip.c: Remove an inappropriate assertion that often - fails on oddly sized 12bit jpeg compressed ycbcr images. - -2009-06-22 Frank Warmerdam - - * libtiff/tif_lzw.c: Fix buffer underflow bug. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - -2009-06-21 Frank Warmerdam - - * configure.ac, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c: add support - for dual mode 8/12 bit jpeg support. - -2009-06-03 Frank Warmerdam - - * libtiff/tif_write.c: do not override the planar configuration to be - contig for one sample files if planar configuration is already set. - http://bugzilla.maptools.org/show_bug.cgi?id=2057 - -2009-06-02 Frank Warmerdam - - * libtiff/libtiff.def: Add TIFFUnsetField. - -2009-05-03 Frank Warmerdam - - * libtiff/{tif_jpeg.c,tif_ojpeg.c,tif_getimage.c}: Fixed various - error reports to use "%s" as format string. - http://trac.osgeo.org/gdal/ticket/2976 - -2009-03-12 Frank Warmerdam - - * libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining - for some codecs (#2020). - -2009-02-12 Frank Warmerdam - - * libtiff/tif_luv.c: Fix handling of tiled logluv images. - http://bugzilla.maptools.org/show_bug.cgi?id=2005 - -2009-02-09 Frank Warmerdam - - * libtiff/tif_dirread.c: Improve allocation safety when allocated - buffer for large tags. (#1998) Related to (#1993) - -2009-02-06 Frank Warmerdam - - * tools/tiffcrop.c: Don't default image->res_unit to INCH. Now the - test suite should pass. - -2009-02-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size, - but at the 2GB boundary to avoid overflow on 32bit systems. - http://bugzilla.maptools.org/show_bug.cgi?id=1993 - - * libtiff/tif_dirread.c: Remove some assertions that blow due to - corrupt files rather than in response to library internal - inconsistencies. - http://bugzilla.maptools.org/show_bug.cgi?id=1995 - http://bugzilla.maptools.org/show_bug.cgi?id=1991 - - * libtiff/tif_dirread.c: Fixed testing for failed result from - TIFFReadDirectoryFindFieldInfo(). - http://bugzilla.maptools.org/show_bug.cgi?id=1992 - -2009-01-23 Frank Warmerdam - - * libtiff/tif_predict.c: Add support for 32bit integer horz. predictors. - http://bugzilla.maptools.org/show_bug.cgi?id=1911 - - * libtiff/tif_dirwrite.c: Fix byte swapping of next directory offset. - - http://bugzilla.maptools.org/show_bug.cgi?id=1924 - - * tools/tiffcrop.c: initialize xres/yres values. - - * test/*.sh - default ${srcdir} to local directory. - - * test/common.sh - start verbose mode after common settings. - - * libtiff/tif_dirinfo.c: Replace lfind() with local equivalent to - avoid type mismatches on different platforms. - http://bugzilla.maptools.org/show_bug.cgi?id=1889 - -2009-01-22 Frank Warmerdam - - * tools/{fax2tiff.c,thumbnail.c,tiff2pdf.c,tiff2ps.c,tiffdump.c, - tiffsplit.c}: avoid warnings, mostly 32bit/64bit casting issues. - - * port,tools: Introduce libport.h, and include in tools if NEED_LIBPORT - defined, primarily to reduce prototype warnings on windows. - - * libtiff/tif_dirinfo.c,tif_dirread.c: Avoid warnings - about unused parameters, and uninitialized variables. - -2009-01-21 Bob Friesenhahn - - * test/common.sh: Execute tests like 'make VERBOSE=TRUE check' in - order to trace full execution detail while executing the test suite. - -2009-01-20 Frank Warmerdam - - * tools/tiffsplit.c: fix sampleformat to be shortv instead of longv. - -2009-01-20 Bob Friesenhahn - - * test/Makefile.am (CLEANFILES): Make sure that test output files - are removed by 'make clean' - - * Update autotools for 4.0.0 beta3 - - * 4.0.0 beta3 produced. - -2009-01-12 Bob Friesenhahn - - * test/tiffcrop.sh: New test script for tiffcrop from Richard - Nolde. - - * tools/tiff2ps.c: Remove spurious message to stderr. - -2009-01-11 Bob Friesenhahn - - * tools/tiff2ps.c: Incorporated significant functionality update - from Richard Nolde. In particular, support for rotating the image - by 90, 180, 270, and 'auto' has been added. - - * man/tiffcrop.1: Incorporated documentation updates from Richard - Nolde. - - * tools/tiffcrop.c: Incorporated significant functionality update - from Richard Nolde. - -2008-12-31 Bob Friesenhahn - - * libtiff/tiffio.h: GCC will now validate format specifications - for TIFFError(), TIFFErrorExt(), TIFFWarning(), and - TIFFWarningExt() in order to reveal bugs. - - * Many fixes throughout to work better as a 64-bit build. - -2008-12-30 Bob Friesenhahn - - * tools/{tiff2pdf.c, tiff2ps.c, tiffinfo.c}: Offset and length - tags now require 64-bit parameter rather than 32-bit. - - * libtiff/tif_dirread.c: Fixed issues with unaligned access to - 64-bit values. - - * tools/thumbnail.c: Eliminate crash noticed while running test - suite. - -2008-12-29 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGLibjpegJpegSourceMgrFillInputBuffer): - Initialize stack variables to avoid compiler warning. - - * tools/tiffinfoce.c (main): Use toff_t for offset type when - retrieving offset of EXIF IFD. - - * libtiff/tiffio.h: Undeprecate toff_t and restore its use in the - TIFFClientOpen() callback and other external function definitions. - - * tools/tiffinfo.c (main): Offset to EXIF IFD requires a 64-bit - type now. Fixes crash when dumping files containing an EXIF IFD. - - * m4/libtool.m4: Update to libtool 2.2.6. - -2008-12-21 Frank Warmerdam - - * libtiff/tif_dir.c, tiffio.h: Introduce TIFFUnsetField() function. - - * libtiff/tif_jpeg.c: Avoid errors if the application writes a full - strip for the last partial strip in a jpeg compressed file. - http://bugzilla.maptools.org/show_bug.cgi?id=1981 - -2008-10-29 Frank Warmerdam - - * libtiff/tif_flush.c: Make sure that BEENWRITING is cleared when - we take the shortcut to only update the strip/tile offsets in place. - http://trac.osgeo.org/gdal/ticket/2621 - -2008-10-21 Andrey Kiselev - - * libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with - the older versions retained). - -2008-10-09 Frank Warmerdam - - * libtiff/tif_jpeg.c: Add #ifdefs for changes needed if using - IPP enabled version of libjpeg from Intel. - http://bugzilla.maptools.org/show_bug.cgi?id=1951 - -2008-09-05 Andrey Kiselev - - * tools/tiffsplit.c: Use byte counts of proper size (uint64). - Required for libtiff 4.0. - - * tools/tiffsplit.c: Use dynamically allocated array instead of static - when constructing output file names. - -2008-09-03 Andrey Kiselev - - * tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when - doing the filename/path construction. - - * tools/tiff2pdf.c: More appropriate format string in - t2p_write_pdf_string(); avoid signed/unsigned mismatch. - - * libtiff/tif_lzw.c: Properly zero out the codetable. As per bug - - http://bugzilla.maptools.org/show_bug.cgi?id=1929 - - * libtiff/tif_lzw.c: Properly zero out the string table. Fixes - CVE-2008-2327 security issue. - -2008-09-01 Frank Warmerdam - - * libtiff/tif_dirread.c: Avoid unused TIFFReadDirEntryFloat() function. - - * libtiff/tif_dirwrite.c: modified to write IFDs as either IFD8 or IFD - depending on whether the file is bigtiff or classic tiff. - http://bugzilla.maptools.org/show_bug.cgi?id=1917 - -2008-08-12 Edward Lam - - * tools/tiffdump.c: When compiling for Microsoft Windows, apply - consistent (__int64) casting when testing if _lseeki64 has - successfully sought as requested. This is necessary for large - file support to work since off_t is only 32-bit. - -2008-07-29 Frank Warmerdam - - * tif_strip.c: Replace assertions related to samplesperpixel != 3 or - the subsampling values not being 1, 2 or 4 (for jpeg compressed images) - with control logic to return runtime errors (c/o Even Rouault) (#1927). - -2008-06-17 Frank Warmerdam - - * tools/tiffcrop.c: Fix some portability problems. - - * libtiff/tif_ojpeg.c: Use same jpeg/win32 boolean/FAR hacks as are - used in tif_jpeg.c. - - * libtiff/tif_win32.c: Ensure TIFFOpenW() uses same FILE_SHARE flags - as TIFFOpen(). - -2008-06-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fix alignment problems affecting architectures - like Sparc/Solaris. - http://bugzilla.maptools.org/show_bug.cgi?id=1892 - -2008-05-27 Frank Warmerdam - - * libtiff.def: Add TIFFFindField - http://bugzilla.maptools.org/show_bug.cgi?id=1891 - -2008-05-26 Frank Warmerdam - - * tif_config.*.h, tiffconf.*.h: Remove SIZEOF_LONG definition, unused. - - * li2008-04-15 Andrey Kiselev - -btiff/tif_win32.c: Replace custom Win32 memory api with generic - POSIX one. No apparent value to use of GlobalAlloc() in the modern - age. http://bugzilla.maptools.org/show_bug.cgi?id=1885 - - * libtiff/tiffconf.vc.h: Added JBIG_SUPPORT and MDI_SUPPORT items - in windows version (care of Edward Lam). - -2008-05-24 Frank Warmerdam - - * tif_codec.c: Avoid NULL pointer dereferencing for exotic - compression codec codes. - - * tif_dirwrite.c: fix potential memory leak. - - * tif_dirread.c: Fix unchecked malloc result. - -2008-05-24 Bob Friesenhahn - - * test {tiff2pdf.sh tiff2ps-EPS1.sh tiff2ps-PS1.sh tiff2ps-PS2.sh - tiff2ps-PS3.sh tiffcp-g3-1d-fill.sh tiffcp-g3-1d.sh - tiffcp-g3-2d-fill.sh tiffcp-g3-2d.sh tiffcp-g3.sh tiffcp-g4.sh - tiffcp-split-join.sh tiffcp-split.sh tiffcp-thumbnail.sh - tiffdump.sh tiffinfo.sh}: Added more test scripts based on - suggestions from Lee Howard posted to the tiff list on 13 Sep - 2007. - -2008-05-23 Frank Warmerdam - - * libtiff/tif_fax3.c: Add an assert in an effort to detect a - possible runtime problem reported by coverity. - - * contrib/iptcutil/iptcutil.c: Fixed memory leak of str. - - * tools/tiffcrop.c, man/tiffcrop.1: Major update from Richard Nolde. - http://bugzilla.maptools.org/show_bug.cgi?id=1888 - - * tools/tiffdither.c: remove dead onestrip code. avoid memory leak. - - * tools/rgb2ycbcr.c: fix memory leak of raster buffer. - - * tools/tiffcp.c: Simplify inknames code to avoid pointless test. - Cleanup scanline allocation to avoid coverity warning. - - * tools/thumbnail.c: Check for TIFFOpen() failure. - -2008-05-18 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Use TIFF_SETGET_ASCII for PIXAR_TEXTUREFORMAT - and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED. Not exactly clear - why this is needed. - -2008-05-09 Bob Friesenhahn - - * Makefile.am (ACLOCAL_AMFLAGS): Libtool 2.2.4 does not like - "ACLOCAL_AMFLAGS=-I ./m4". It wants "ACLOCAL_AMFLAGS=-I m4". - -2008-04-15 Andrey Kiselev - - * test/: Test suite updated. Everything is passed now. - - * libtiff/tif_dirinfo.c: Fixed description of the - TIFFTAG_NUMBEROFINKS tag. - -2008-04-14 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirwrite.c, tiffiop.h}: - Get rid of some of "dereferencing type-punned" warnings by converting - tdir_offset field of TIFFDirEntry structure into union. - -2008-04-10 Andrey Kiselev - - * libtiff/{tif_flush.c, tif_dirwrite.c, tiffio.h, tiffiop.h}: - TIFFRewriteField() renamed into _TIFFRewriteField() and moved out - from the public interface. Type of its 'count' parameter changed - from uint32 to tmsize_t. - - * /libtiff/tiffiop.h: Make tif_nfields and tif_nfieldscompat fields - of the tiff structure have the size_t type instead of uint32. - -2008-04-09 Andrey Kiselev - - * tools/tiffdump.c: Added support for MSVS 6.0. - - * libtiff/tif_dirread.c: Use custom functions _TIFFUInt64ToFloat() - and _TIFFUInt64ToDouble() to convert 64-bit integers into floating - point values on MSVS 6.0 platform. - -2008-03-14 Frank Warmerdam - - * tif_dirread.c: Removed sanity checks on tags larger than 4MB in - TIFFReadDirEntryArray() since they are interfering with seemingly - legitimate files. http://trac.osgeo.org/gdal/ticket/2005 - -2008-02-09 Joris Van Damme - - * tif_dirread.c: Added handling for the case of number of values for - PageNumber tag different from 2 (previously resulted in an assert - indicating lack of handling and was forgotten about) - -2008-02-01 Frank Warmerdam - - * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on - the actual jpeg data stream if the first strip/tile has zero size. - This is the case when GDAL creates a new file with zero sizes, closes - and reopens it. - -2008-01-07 Frank Warmerdam - - * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam). - -2008-01-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: #ifdef out lots of unused functions. - - * Makefile.vc, libtiff/Makefile.vc, tools/Makefile.vc: Improve clean - targets. - - * tools/tiffinfo.c, tools/tiffcmp.c, tools/gif2tiff.c, tools/bmp2tiff.c - tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005 - (x64). - - * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag() - and TIFFFieldWithName() now return TIFFField pointers instead of - TIFFFieldInfo pointers. - - * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't - exist. This makes it compile again on Windows - - * tif_aux.c, tif_getimage.c, tif_next.c, tif_predict.c, tif_win32.c, - tiffconf.vc.h: Various 64bit fixes from Edward Lam identified on win64. - - * test/rewrite_tag.c: New test for TIFFRewriteField(). - -2007-12-31 Frank Warmerdam - - * tif_dirwrite.c: Added TIFFRewriteField(). This new function - rewrites one field "on disk" updating an existing directory - entry. Lots of limitations still... - - * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of - TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that - the strip offset/size values are dirty but nothing else about the - directory is dirty. In flush handle "just stripmaps dirty" as a - special case that just rewrites these values without otherwise - modifying the directory on disk using TIFFRewriteField(). - - We also modify logic so that in update mode the directory is not - marked dirty on read, but only when something is changed. This - means we need to keep track of updates to the stripmap stuff in - TIFFAppendToStrip(). - -2007-12-10 Frank Warmerdam - - * tif_jpeg.c: Improve ability to switch between encoding and decoding - in the jpeg code (gdal bug #2033). - -2007-11-23 Frank Warmerdam - - * tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_read.c, tif_write.c, - tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the - rawcp/rawcc buffer are for writing and thus may require flushing. - Necessary to distinguish whether they need to be written to disk when - in mixed read/write mode and doing a mixture of writing followed by - reading. http://trac.osgeo.org/gdal/ticket/1758 - -2007-11-23 Andrey Kiselev - - * configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches - from Alexey Chupahin. - -2007-11-02 Frank Warmerdam - - * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for - establishing if an existing tile can be rewritten to the same location - by comparing the current size to all the other blocks in the same - directory. This is dangerous in many situations and can easily - corrupt a file. (observed in esoteric GDAL situation that's hard to - document). This change involves leaving the stripbytecount[] values - unaltered till TIFFAppendToStrip(). Now we only write a block back - to the same location it used to be at if the new data is the same - size or smaller - otherwise we move it to the end of file. - - * tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile - data when writing the directory just because we have BEENWRITING at - some point in the past. This was causing odd junk to be written out - in a tile of data when a single tile had an interleaving of reading - and writing with reading last. (highlighted by gdal - autotest/gcore/tif_write.py test 7. - - * tif_predict.c: use working buffer in PredictorEncodeTile to avoid - modifying callers buffer. - http://trac.osgeo.org/gdal/ticket/1965 - - * tif_predict.c/h: more fixes related to last item, keeping a - distinct pfunc for encode and decode cases as these were getting - mixed up sometimes. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-11-01 Frank Warmerdam - - * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that - predictor based encoding and decoding works in read-write update - mode properly. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-10-24 Joris Van Damme - - * tif_dirread.c: Fixed problem with bogus file triggering - assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in - ChopUpSingleUncompressedStrip - -2007-10-22 Joris Van Damme - - * tif_jpeg.c: Resolved buffer incrementation bug that lead to faulty images - at best, access violation at worst, when subsampled JPEG compressed imagery - is decoded without the JPEG_COLORMODE feature - -2007-10-11 Frank Warmerdam - - * html/index.html: Update "people responsible" section. - -2007-10-05 Frank Warmerdam - - * tools/tiff2pdf.c: Fix problem with alpha setting in some cases - as reported on the mailing list. - -2007-10-01 Joris Van Damme - - * changed some more incorrect %lud printf flags to %lu - -2007-09-29 Joris Van Damme - - * tif_dirread.c: Strip chopping interfered badly with uncompressed - subsampled images because it tried to divide subsampled rowblocks, - leading to all sorts of errors throughout the library for these - images. Fixed by making strip chopping divide in row counts that - are a multiple of vertical subsampling value. - -2007-09-28 Joris Van Damme - - * tif_dirread.c: Logical cast working around compiler warning - - * tif_read.c: Correction of some error flags and parameter lists - -2007-09-27 Joris Van Damme - - * tif_dirread.c: Made calculation of td_maxsamplevalue more robust - when dealing with large bitspersample values, shutting up purification - tools that warn about truncation, though it remains incorrect and - indicates a conceptual problem there. - - * tif_open.c: Moved early exit in case of 'h' flag (to disable reading - of first IFD) to proper place because it badly interfered with memory - mapping, resulting in mapping flag even with dummy mapping functions - that returned 0 whilst at the same time the mapping tif_size wasn't - set, thus resulting in continuous incorrect beyond-eof errors. - -2007-09-24 Joris Van Damme - - * tif_dirinfo.c: Fixed (MSVC) compiler reports about - inconsistent use of const in tiffFields and exifFields definition - -2007-09-20 Frank Warmerdam - - * tif_dirwrite.c: Always write tile/strip offsets and sizes - using LONG8 type when output format is BigTIFF. The - TIFFWriteDirectoryTagLongLong8Array() function was restructured - accordingly. - - * tif_dirread.c: Improvements to error reporting text in - TIFFFetchDirectory(). - -2007-09-19 Bob Friesenhahn - - * test/images: Added a small collection of test images for use by - test programs and scripts. - * test/tiffinfo.sh: A trivial example test script. - * test/common.sh: Added small script for setting the environment - used by script-based tests. - -2007-08-24 Frank Warmerdam - - * tif_dirwrite.c: Write the tif_nextdiroff value instead of a fixed - zero when writing directory contents to preserve the ability to - rewrite directories in place, even in the middle of a directory - chain. - - * tif_dirinfo.c: _TIFFMergeFields() now only merges in field - definitions that are missing. Existing definitions are silently - ignored. - - * tif_dirread.c: Add runtime error for fields for which no definition - is found (in addition to an assert for developers) in - TIFFFetchNormalTag(). Not sure if this is needed, but it seems - prudent. - -2007-08-10 Joris Van Damme - - * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer - from _TIFFRGBAImage structure to revert unwanted ABI change. - -2007-08-10 Joris Van Damme - - * libtiff/tif_win32.c: use SetFilePointer instead of - SetFilePointerEx, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1580 - -2007-07-19 Andrey Kiselev - - * libtiff/tif_stream.cxx: Put all callback functions declarations - inside extern "C" block. - - * libtiff/{tif_lzw.c, tif_luv.c, tif_dumpmode.c, tif_print.c, - tif_read.c, tif_strip.c, tif_thunder.c}: Use "%I64d" printf() - formatter instead of "%lld" with MSVC compiler. - - * libtiff/{tiffiop.h, tif_aux.c}: Added _TIFFUInt64ToFloat() and - _TIFFUInt64ToDouble() functions. - -2007-07-18 Andrey Kiselev - - * libtiff/tif_dirread.c: Handle the case of MSVC 6 when using 64-bit - integer constants. - - * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h, - remove tif_config.h/tiffconf.h during cleaning. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1573 - - * libtiff/tif_unix.c: Do not use O_LARGEFILE. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1577 - -2007-07-13 Andrey Kiselev - - * libtiff 4.0.0alpha released. - -2007-07-12 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed extern optind as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1567 - - * libtiff/{tif_close.c, tif_dirinfo.c, tiffiop.c, tif_dirread.c, - tif_dir.h, tif_dir.c, tiffio.h}: Transition to the new-style tag - extending scheme completed. - -2007-07-11 Bob Friesenhahn - - * libtiff/tif_stream.cxx: Adapt to use toff_t again. Update to - use standard C++ library size types and attempt to detect overflow - cases. - -2007-07-08 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_dir.h, tif_dir.c, tif_dirinfo.c, tiffio.h, - tif_ojpeg.c, tif_print.c, tif_fax3.c, tif_dirread.c}: More work on new - tag extending scheme. Use the new scheme everywhere. - - * libtiff/{tif_zip.c, tif_predict.c, tif_pixarlog.c, tif_luv.c, - tif_fax3.c, tif_dirread.c, tif_dirwrite.c, tif_close.c, tif_ojpeg.c, - tif_jpeg.c, tif_dirinfo.c, tif_dir.h, tiffio.h, tiffiop.h}: - TIFFFIeldInfo structure replaced with TIFFField structure. - TIFFFieldInfo retained for the backward compatibility. - -2007-07-05 Bob Friesenhahn - - * tools/tiff2pdf.c: Fix a compile problem when JPEG_SUPPORT is not - defined. - -2007-07-04 Andrey Kiselev - - * libtiff/{tif_dir.c, tiff.h, tiffio.h, libtiff.def}: Unused - TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration - removed. - - * libtiff/{tif_dirinfo.c, tif_fax3.c, tif_jbig.c, tif_jpeg.c}: Move - tags TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS, - TIFFTAG_FAXRECVTIME and TIFFTAG_FAXDCS to the common tag directory. - These tags are not codec-specific and relate to image content, so - process them as other normal tags. - - * libtiff/{tiffio.h, tif_dir.h}: TIFFTagValue structure moved from the - public tiffio.h to private tif_dir.h. - - * contrib/{acorn, mac-cw, mac-mpw}: Removed as unmaintained and - outdated. - -2007-07-03 Andrey Kiselev - - * libtiff{tif_acorn.c, tif_apple.c, tif_atari.c, tif_msdos.c, - tif_win3.c}: Obsoleted portability stuff removed. - - * tools/tiff2ps.c: Added support 16-bit images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1566 - - Patch from William Bader. - - * tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and - significant upgrade of the whole utility as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1560 - - Now we don't need tiffiop.h in tiff2pdf anymore and will open output - PDF file using TIFFClientOpen() machinery as it is implemented - by Leon Bottou. - -2007-06-26 Bob Friesenhahn - - * configure.ac: Fix typo when substituting value for unsigned 8 bit type. - Added support for a TIFF_PTRDIFF_T type to use when doing pointer arithmetic. - Added support for a TIFF_SSIZE_T in order to return memory sizes but still - allow returning -1 for errors. - * libtiff/tiffconf.vc.h: Add porting type definitions for WIN32. - -2007-06-25 Bob Friesenhahn - - * port/strtoull.c: New porting function in case strtoull() is not - available on the target system. - * configure.ac: Add configure support for determining sized types - in a portable way and performing necessary substitutions in - tif_config.h and tiffconf.h. Updated tiff.h to use the new - definitions. - -2007-04-27 Andrey Kiselev - - * tools/tiff2pdf.c: Check the tmpfile() return status as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=154 - -2007-04-07 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c, - tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c, - tif_predict.c, tif_zip.c}: Finally fix bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1274 - - by introducing _TIFFMergeFieldInfo() returning integer error status - instead of void in case of problems with field merging (e.g., if the - field with such a tag already registered). TIFFMergeFieldInfo() in - public API remains void. Use _TIFFMergeFieldInfo() everywhere and - check returned value. - -2007-04-07 Frank Warmerdam - - * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output - blocks in TIFF_DownSample_Subsampled() (bug 1542). - -2007-04-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it - will convert from decompressor to compressor or compress to decompress - if required by the force arguments. This works around a problem in - where the JPEGFixupTestSubsampling() may cause a decompressor to - be setup on a directory when later a compressor is required with the - force flag set. Occurs with the addtiffo program for instance. - -2007-04-06 Andrey Kiselev - - * tools/tiffcrop.c, man/tiffcrop.1: Significant update in - functionality from Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1525 - -2007-03-28 Frank Warmerdam - - * libtiff/tif_fax3.c: "inline static" -> "static inline" for IRIC CC. - -2007-03-17 Joris Van Damme - - * start of BigTIFF upgrade - CVS HEAD unstable until further notice - -2007-03-07 Joris Van Damme - - * libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading - OJPEG images with rowsperstrip that is not a multiple of vertical subsampling - factor. This bug is mentioned in: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1390 - http://www.asmail.be/msg0054766825.html - -2007-03-07 Joris Van Damme - - * libtiff/tif_win32.c: made inclusion of windows.h unconditional - - * libtiff/tif_win32.c: replaced preprocessor indication for consiously - unused arguments by standard C indication for the same - -2007-02-27 Andrey Kiselev - - * libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte - counters in TIFFFetchData(). Should finally fix the issue - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - -2007-02-24 Andrey Kiselev - - * tools/tiffset.c: Properly handle tags with TIFF_VARIABLE writecount. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350 - - * libtiff/tif_dirread.c: Added special function to handle - SubjectDistance EXIF tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1362 - - * tools/tiff2pdf.c: Do not assume inches when the resolution units - do not specified. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1366 - - * tools/{tiffcp.c, tiffcrop.c}: Do not change RowsPerStrip value if - it was set as infinite. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1368 - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop utility contributed - by Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1383 - -2007-02-22 Andrey Kiselev - - * libtiff/tif_dir.c: Workaround for incorrect TIFFs with - ExtraSamples == 999 produced by Corel Draw. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1490 - - * libtiff/{tif_dirread.c, tif_read.c}: Type of the byte counters - changed from tsize_t to uint32 to be able to work with data arrays - larger than 2GB. Fixes bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - - Idea submitted by Matt Hancher. - -2007-01-31 Andrey Kiselev - - * tools/tif2rgba.c: This utility does not work properly on big-endian - architectures. It was fixed including the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1149 - -2007-01-15 Mateusz Loskot - - * Submitted libtiff port for Windows CE platform - * libtiff/tif_config.wince.h: Added configuration header for WinCE. - * libtiff/tiffconf.wince.h: Ported old configuration header for WinCE. - * libtiff/tif_wince.c: Added WinCE-specific implementation of some - functions from tif_win32.c. - * libtiff/tif_win32.c: Disabled some functions already reimplemented in tif_wince.c. - * libtiff/tiffiop.h, port/lfind.c: Added conditional include of some - standard header files for Windows CE build. - * tools/tiffinfoce.c: Ported tiffinfo utility for Windows CE. - -2006-11-19 Frank Warmerdam - - * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if - we move a strip. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1359 - -2006-10-13 Andrey Kiselev - - * libtiff/tif_dir.c: More fixes for vulnerabilities, reported - in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - - * libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. - Though it is still far from the state of being working and useful. - -2006-10-12 Andrey Kiselev - - * libtiff/tif_fax3.c: Save the state of printdir codec dependent - method. - - * libtiff/tif_jpeg.c: Save the state of printdir codec dependent method - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273 - - * libtiff/tif_win32.c: Fixed problem with offset value manipulation - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1322 - - * libtiff/{tif_read.c, tif_jpeg.c, tif_dir.c}: More fixes for - vulnerabilities, reported in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-28 Andrey Kiselev - - * libtiff/{tif_fax3.c, tif_next.c, tif_pixarlog.c}: Fixed multiple - vulnerabilities, as per Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-27 Frank Warmerdam - - * libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing - encoding and decoding on the same read-write TIFF handle. The LZW - code can now maintain encode and decode state at the same time. The - ZIP code will switch back and forth as needed. - http://bugzilla.remotesensing.org/show_bug.cgi?id=757 - -2006-09-20 Frank Warmerdam - - * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and - tif_config.vc.h for easier identification by folks using an IDE. - -2006-07-25 Frank Warmerdam - - * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron - -2006-07-19 Frank Warmerdam - - * tif_dirwrite.c: take care not to flush out buffer of strip/tile - data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates - to bug report by Peng Gao with black strip at bottom of images. - -2006-07-12 Frank Warmerdam - - * tif_dirwrite.c: make sure to use uint32 for wordcount in - TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields. - It already seems to have been done for other field types. Needed - for "tiffset" on files with geotiff ascii text. - -2006-07-04 Bob Friesenhahn - - * {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c} - (JBIGDecode): jbg_newlen is not available in older JBIG-KIT and - its use does not appear to be required, so use it only when it is - available. - -2006-06-24 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961). - - * libtiff/tif_dirread.c: Move IFD fetching code in the separate - function TIFFFetchDirectory() avoiding code duplication in - TIFFReadDirectory() and TIFFReadCustomDirectory(). - -2006-06-19 Frank Warmerdam - - * tools/tiff2pdf.c: Fix handling of -q values. - http://bugzilla.remotesensing.org/show_bug.cgi?id=587 - -2006-06-17 Frank Warmerdam - - * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled - files. Modified TIFFReadDirectory() to not invoke - EstimateStripByteCounts() for case where entry 0 and 1 are unequal - but one of them is zero. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1204 - -2006-06-08 Andrey Kiselev - - * libtiff/{tif_open.c, tif_dirread.c, tiffiop.h}: Move IFD looping - checking code in the separate function TIFFCheckDirOffset(). - - * libtiff/tif_aux.c: Added _TIFFCheckRealloc() function. - - * tools/tiffcmp.c: Fixed floating point comparison logic as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1191 - - * libtiff/tif_fax3.c: Fixed problems in fax decoder as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1194 - - * tools/tiff2pdf.c: Fixed buffer overflow condition in - t2p_write_pdf_string() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1196 - -2006-06-07 Andrey Kiselev - - * {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added - support for JBIG compression scheme (34661 code) contributed by Lee - Howard. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=896 - - * configure, configure.ac: OJPEG support enabled by default. - - * contrib/ojpeg/: Removed. New OJPEG support does not need this patch. - -2006-06-03 Bob Friesenhahn - - * libtiff/{tif_dirinfo.c, tif_print.c} : Fix crash in - TIFFPrintDirectory(). Joris Van Damme authored the fix. - -2006-04-21 Andrey Kiselev - - * tools/tiff2pdf.c: Unified line ending characters (always use '\n') - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1163 - - * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am, - tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}: - Added support for OpenVMS by Alexey Chupahin, elvis_75@mail.ru. - -2006-04-20 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, ppm2tiff.c, ras2tiff.c, tiff2pdf.c}: - Properly set the binary mode for stdin stream as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1141 - - * man/{bmp2tiff.1, fax2ps.1, fax2tiff.1, gif2tiff.1, ras2tiff.1, - raw2tiff.1, rgb2ycbcr.1, sgi2tiff.1, tiff2bw.1, tiff2pdf.1, tiff2ps.1, - tiff2rgba.1, tiffcmp.1, tiffcp.1, tiffdither.1, tiffdump.1, tiffgt.1, - tiffset.1}: Improvements in page formatting as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1140 - - * html/tools.html, html/man/Makefile.am, tools/tiff2pdf.c: Fixed - typos as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1139 - -2006-04-18 Frank Warmerdam - - * nmake.opt: use /EHsc for VS2005 compatibility. Also define - _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005. - -2006-04-12 Joris Van Damme - - * libtiff/tif_getimage.c: Added support for planarconfig separate - non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]) - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: Revision of all RGB(A) put routines - - Conversion of unassociated alpha to associated alpha now done with - more performant LUT, and calculation more correct - - Conversion of 16bit data to 8bit data now done with - more performant LUT, and calculation more correct - - Bugfix of handling of 16bit RGB with unassociated alpha - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: - - When there is no alpha, gtTileSeparate and gtStripSeparate allocated - buffer for alpha strile and filled it, only to never read it back. - Removed allocation and fill. - - Minor rename of vars in gtTileSeparate and gtStripSeparate - anticipating planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase - and pickTileSeparateCase to PickSeparateCase as both work on strips as - well - - * libtiff/tif_getimage.c: moved img->get selection from - TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create - logical hook for planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_ojpeg.c: resolved memory leak that was a consequence - of inappropriate use of jpeg_abort instead of jpeg_destroy - -2006-04-07 Joris Van Damme - - * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in - gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour - on subsampled images - this ought to get sorted when we feel brave - enough to replace TIFFScanlineSize altogether - - * libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip - -2006-04-04 Joris Van Damme - - * libtiff/tiffio.h: added new type tstrile_t - - * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips - to new tstrile_t, types of td_stripoffset and td_stripbytecount to - toff_t* - - * libtiff/tif_ojpeg.c: totally new implementation - - * libtiff/tif_dirread.c: added several hacks to suit new support of - OJPEG - - * libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling - of OJPEG images in favor of tif_getimage.c native handling of - YCbCr and desubsampling - -2006-03-29 Frank Warmerdam - - * libtiff/tif_jpeg.c: JPEGVSetField() so that altering the photometric - interpretation causes the "upsampled" flag to be recomputed. Fixes - peculiar bug where photometric flag had to be set before jpegcolormode - flag. - -2006-03-25 Joris Van Damme - - * libtiff/tif_jpeg.c: strip size related bugfix in encode raw - - * libtiff/tif_strip.c: temporarily added two new versions of - TIFFScanlineSize - - TIFFNewScanlineSize: proposed new version, after all related - issues and side-effects are sorted out - - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change - This needs further sorting out. - -2006-03-25 Joris Van Damme - - * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size - of last truncated strip data to TIFFWriteEncodedStrip - -2006-03-25 Joris Van Damme - - * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw - -2006-03-25 Joris Van Damme - - * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile - - * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile - - * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to - prepare the path for new tif_ojpeg.c - -2006-03-23 Andrey Kiselev - - * libtiff 3.8.2 released. - - * tools/Makefile.am: Use runtime paths linker flags when rpath - option enabled. - -2006-03-21 Andrey Kiselev - - * libtiff/libtiff.def: Added missed exports as per bug - http://bugzilla.remotesensing.org/attachment.cgi?id=337 - - * contrib/addtiffo/Makefile.vc, libtiff/Makefile.vc, port/Makefile.vc, - tools/Makefile.vc: Makefiles improvements as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1128 - - * nmake.opt libtiff/{tif_config.h.vc, tif_unix.c, tiffio.h}, - tools/{fax2ps.c, fax2tiff.c, tiff2pdf.c}: Fixed win32 I/O functions - usage as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1127 - - * libtiff/tif_strip.c: Take subsampling in account when calculating - TIFFScanlineSize(). - - * tools/tiffcp.c: Do not set RowsPerStrip bigger than image length. - -2006-03-17 Andrey Kiselev - - * tools/fax2tiff.c: Fixed wrong TIFFerror() invocations as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1125 - - * tools/fax2ps.c: Fixed reading the input stream from stdin as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1124 - -2006-03-16 Andrey Kiselev - - * libtiff/tiffiop.h: Added declaration for - _TIFFSetDefaultCompressionState(). - - * libtiff/{tif_jpeg.c, tif_fax3.c, tif_zip.c, tif_pixarlog.c, - tif_lzw.c, tif_luv.c}: Use _TIFFSetDefaultCompressionState() in all - codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1120 - -2006-03-15 Andrey Kiselev - - * libtiff/tif_jpeg.c: Do not cleanup codec state in TIFFInitJPEG(). As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1119 - - * tools/raw2tiff.c: Do not set RowsPerStrip larger than ImageLength. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1110 - - * libtiff/tiffiop.h: dblparam_t typedef removed; GLOBALDATA macro - removed; move here the STRIP_SIZE_DEFAULT macro definition. - - * libtiff/{tif_dirread.c, tif_strip.c}: Removed STRIP_SIZE_DEFAULT - macro definition. - - * libtiff/tif_dir.c: Use double type instead of dblparam_t. - -2006-03-14 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not check the PlanarConfig tag presence - in TIFFReadDirectory, because it is always set at the start of - function and we allow TIFFs without that tag set. - -2005-03-13 Andrey Kiselev - - * libtiff 3.8.1 released. - -2006-03-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Fixed error reporting in TIFFFetchAnyArray() - function as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: More wise check for integer overflow - condition as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/{tif_jpeg.c, tif_pixarlog.c, tif_fax3.c, tif_zip.c}: - Properly restore setfield/getfield methods in cleanup functions. As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-03 Andrey Kiselev - - * libtiff/{tif_predict.c, tif_predict.h}: Added new function - TIFFPredictorCleanup() to restore parent decode/encode/field methods. - - * libtiff/{tif_lzw.c, tif_pixarlog.c, tif_zip.c}: Use - TIFFPredictorCleanup() in codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: Fixed integer overflow condition in - TIFFFetchData() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-01 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Set the ReferenceBlackWhite with the - TIFFSetField() method, not directly. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1043 - - * tools/ppm2tiff.c: Added support for PBM files as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1044 - -2006-02-27 Andrey Kiselev - - * libtiff/tif_write.c: Small code rearrangement in TIFFWriteScanline() - to avoid crash as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1081. - -2006-02-26 Andrey Kiselev - - * tools/tiff2pdf.c: Functions t2p_sample_rgbaa_to_rgb() and - t2p_sample_rgba_to_rgb() was used in place of each other, that was - resulted in problems with RGBA images with associated alpha. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1097 - -2006-02-23 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Properly write TIFFTAG_DOTRANGE tag as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * libtiff/tif_print.c: Properly read TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE - tags as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * tools/tiff2ps.c: Properly scale all the pages when converting - multipage TIFF with /width/height/center options set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1080 - -2006-02-15 Andrey Kiselev - - * tools/tiff2pdf.c: Do not create output file until all option checks - will be done. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1072 - - * tools/bmp2tiff.c: Added ability to create multipage TIFFs from the - list of input files as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1077 - -2006-02-09 Andrey Kiselev - - * libtiff/tif_tile.c: Fix error reporting in TIFFCheckTile() as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1063. - - * tools/tiffgt.c: Avoid crashing in case of image unsupported by - TIFFRGBAImage interface. - - * libtiff/tif_color.c: Avoid overflow in case of wrong input as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1065. - -2006-02-07 Frank Warmerdam - - * tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG - compressed TIFF files, per submission from Dan Cobra. - -2006-02-07 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_packbits.c, tif_win32.c}: Properly - cast values to avoid warnings. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_dirinfo.c: Use TIFF_NOTYPE instead of 0 when - appropriate. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_aux.c: Fixed type of temporary variable in - _TIFFCheckMalloc() as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - -2006-02-06 Andrey Kiselev - - * libtiff/tif_aux.c: Return static array when fetching default - YCbCrCoefficients (another problem, reported a the - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 entry). - -2006-02-03 Andrey Kiselev - - * libtiff/tif_dir.c: Special handling for PageNumber, HalftoneHints, - YCbCrSubsampling and DotRange tags as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 - http://bugzilla.remotesensing.org/show_bug.cgi?id=1034 - - * libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of - _TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1026. - -2006-01-23 Andrey Kiselev - - * libtool related stuff updated from the 2.1a branch. - -2006-01-11 Frank Warmerdam - - * tools/bmp2tiff,pal2rgb,ppm2tiff,ras2tiff,raw2tiff,sgi2tiff, - tiff2bw,tiffcp: Fixed jpeg option processing so -c jpeg:r:50 works - properly as per bug: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1025 - -2006-01-09 Bob Friesenhahn - - * configure.ac: Fix with_default_strip_size comparison as reported - by Norihiko Murase. - -2006-01-08 Bob Friesenhahn - - * test/Makefile.am (LIBTIFF): Due to linking against libtiff - incorrectly, tests were not actually testing the uninstalled - libtiff. Now they are. - -2006-01-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definitions for TIFFTAG_ICCPROFILE, - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, TIFFTAG_XMLPACKET: readcount - should be uint32 value. - -2006-01-02 Bob Friesenhahn - - * html/man/Makefile.am (htmldoc): Fix htmldoc rule so that it can - be used if build directory is not the same as source directory. - * man/{TIFFGetField.3tiff, TIFFSetField.3tiff}: Documented - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, and TIFFTAG_XMLPACKET, - and re-sorted tag names in alphabetical order. - -2005-12-29 Andrey Kiselev - - * libtiff 3.8.0 released. - -2005-12-28 Bob Friesenhahn - - * tools/bmp2tiff.c (main): Fixed warning regarding returning - inconsistent types from a condition. - * tools/tiffcmp.c (CheckLongTag): Eliminate warning due to printf - format. - * tools/bmp2tiff.c: Reduce compilation warnings on big-endian CPUs. - -2005-12-28 Joris Van Damme - - * html/{index.html, support.hml, libtiff.html}: Cleaned up HTML - -2005-12-27 Andrey Kiselev - - * libtiff/tiffio.h: Added VC_EXTRALEAN definition before including - windows.h, to reduce the compile time. - -2005-12-26 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Improve compilation under MinGW. - -2005-12-26 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}: - tiffFieldInfo and exifFieldInfo arrays definitions moved back to - tif_dirinfo.c; added _TIFFGetFieldInfo() and _TIFFGetExifFieldInfo() - private functions to retrieve FieldInfo arrays. - -2005-12-24 Bob Friesenhahn - - * html/build.html: Added some additional instructions for when - building using MSVC under Windows. Also fixed two HTML syntax - errors and used HTML Tidy to tidy up the HTML syntax and - formatting. - -2005-12-24 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, - tif_print.c, tif_getimage.c}: Make InkSet, NumberOfInks, DotRange and - StoNits tags custom. - -2005-12-23 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c}: Make - WhitePoint tag custom. - - * libtiff/{tif_dir.h, tiff.h}: More EXIF tags added. - -2005-12-23 Joris Van Damme - - * libtiff/tiffio.h: fixed typo that potentially resulted in - redefininition of USE_WIN32_FILEIO - - * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning - calls in core LibTiff. - -2005-12-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make RichTIFFIPTC, - Photoshop and ICCProfile tags custom. - -2005-12-21 Joris Van Damme - - * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling - newer code to get context indicator in error handler and still - remain compatible with older code: Done TIFFError calls everywhere - except in tools - -2005-12-20 Andrey Kiselev - - * tools/tiffcp.c: Added many error reporting messages; fixed integer - overflow as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=789 - -2005-12-16 Frank Warmerdam - - * contrib/addtiffo/*: Major upgrade by Joris to support subsampled - YCbCr images in jpeg compressed TIFF files. - -2005-12-14 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails (again). - -2005-12-13 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails. - -2005-12-12 Andrey Kiselev - - * libtiff/{tif_dir.h, tiff.h}: Added more EXIF tags. - -2005-12-09 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make XMLPacket tag - custom. - - * tools/tiffinfo.c: Print EXIF directory contents if exist. - - * libtiff/tiff.h: Few EXIF tag numbers added. - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c, - tiffio.h}: Preliminary support to read custom directories. New - functions: TIFFReadCustomDirectory() and TIFFReadEXIFDirectory(). - -2005-12-07 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c}: - More work to implement custom directory read support. - - * libtiff/{tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, - tif_dir.c, tif_print.c}: Make YCbCrCoefficients and ReferenceBlackWhite - tags custom. - -2005-12-05 Andrey Kiselev - - * libtiff/tif_dirread.c: One more workaround for broken - StripByteCounts tag. Handle the case when StripByteCounts array filled - with completely wrong values. - -2005-11-30 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Release file descriptor in case of failure - in the TIFFOpenW() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1003 - - * libtiff/tif_dirinfo.c: Correctly use bsearch() and lfind() - functions as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1008 - -2005-11-20 Frank Warmerdam - - * tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support - for MS MDI format. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1002 - - * .cvsignore: many files added, and a few update according - to suggestion of Brad HArds on tiff mailing list. - -2005-11-03 Frank Warmerdam - - * libtiff/libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory - public. - -2005-10-31 Andrey Kiselev - - * tools/fax2tiff.c: Properly calculate sizes of temporary arrays - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=943 - - * tools/fax2tiff.c: Added option '-r' to set RowsPerStrip parameter - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=944 - - * tools/tiffdump.c: Fixed typeshift and typemask arrays initialization - problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=946 - - * tools/bmp2tiff.c: Fixed possible integer overflow error as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=965 - - * libtiff/tif_dirinfo.c: Make XResolution, YResolution and - ResolutionUnit tags modifiable during write process. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=977 - - * tools/tiffsplit.c: Copy fax related fields over split parts - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=983 - -2005-10-21 Frank Warmerdam - - * tif_dirread.c: Don't try and split single strips into "0" strips - in ChopUpSingleUncompressedStrip. This happens in some degenerate - cases (like 1x1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff) - -2005-10-20 Joris Van Damme - - * tif_fax3.c: changed 'at scanline ...' style warning/errors - with incorrect use of tif_row, to 'at line ... of - strip/tile ...' style - -2005-10-15 Frank Warmerdam - - * tif_write.c: fixed setting of planarconfig as per bug report - on the mailing list from Joris. - -2005-10-07 Andrey Kiselev - - * configure.ac, configure, nmake.opt, libtiff/{tif_config.h, - tif_dirread.c}: Make the default strip size configurable via the - --with-default-strip-size and STRIP_SIZE_DEFAULT options. - -2005-09-30 Bob Friesenhahn - - * html/support.html: Fixed link to documentation on Greg Ward's - LogLuv TIFF format. - -2005-09-28 Andrey Kiselev - - * tools/tiffdump.c: Fixed crash when reading malformed tags. - -2005-09-20 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed 'break' statement as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=932 - -2005-09-12 Andrey Kiselev - - * libtiff 3.7.4 released. - - * {configure, configure.ac, Makefile.am, autogen.sh}: Applied patch - from Patrick Welche (all scripts moved in the 'config' and 'm4' - directories). - -2005-09-12 Frank Warmerdam - - * libtiff/tif_open.c: reintroduce seek to avoid problem on solaris. - -2005-09-05 Frank Warmerdam - - * libtiff/tif_dir.c: When prefreeing tv->value in TIFFSetFieldV - also set it to NULL to avoid double free when re-setting custom - string fields as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=922 - -2005-08-12 Frank Warmerdam - - * libtiff/tif_print.c: avoid signed/unsigned warning. - - * libtiff/tif_dirread.c: removed unused variable. - -2005-07-30 Frank Warmerdam - - * libtiff/tif_dir.c: Fixed up support for swapping "double complex" - values (128 bits as 2 64 bits doubles). GDAL gcore tests now - pass on bigendian (macosx) system. - -2005-07-28 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dirread.c, tif_fax3.c, tiffiop.h}: Rename - CheckMalloc() function to _TIFFCheckMalloc() and make it available - globally as an internal helper routine. - -2005-07-27 Andrey Kiselev - - * libtiff/tif_dir.c: More improvements in the "pass by value" part of - the custom tags handling code. - -2005-07-26 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirinfo.c}: Do not upcast BYTEs to - SHORTs in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() - function, use TIFFFetchNormalTag() instead as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() - instead. - - * libtiff/tiffconf.h.in: One more attempt to fix the AIX bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2005-07-25 Andrey Kiselev - - * libtiff/tif_print.c: Fixed printing of the BYTE and SBYTE arrays. - - * tools/tiffdump.c: Added support for TIFF_IFD datatype. - -2005-07-21 Andrey Kiselev - - * libtiff/tif_write.c: Do not check the PlanarConfiguration field in - the TIFFWriteCheck() function in case of single band images (as per - TIFF spec). - -2005-07-12 Andrey Kiselev - - * SConstruct, libtiff/SConstruct: Added the first very preliminary - support for SCons software building tool (http://www.scons.org/). - This is experimental infrastructure and it will exist along with the - autotools mechanics. - -2005-07-07 Andrey Kiselev - - * port/{getopt.c, strcasecmp.c, strtoul.c}: Update modules from - the NetBSD source tree (the old 4-clause BSD license changed to - the new 3-clause one). - - * configure.ac, port/lfind.c, libtiff/tiffiop.h: Added lfind() - replacement module. - - * port/dummy.c: Make the dummy function static. - -2005-07-06 Andrey Kiselev - - * tools/tiffcp.c: Fixed WhitePoint tag copying. - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_print.c}: - Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, - ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom. - -2005-07-04 Andrey Kiselev - - * libtiff 3.7.3 released. - - * configure, configure.ac: Do not use empty -R option when linking - with --enable-rpath. - -2005-07-01 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_open.c}: Added open option 'h' to avoid - reading the first IFD when needed. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=875 - - * libtiff/tif_color.c: Better use of TIFFmin() macro to avoid side - effects. - -2005-06-23 Andrey Kiselev - - * tools/tiff2pdf.c: Print two characters per loop in the - t2p_write_pdf_trailer(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=594 - - * tools/tiffgt.c: Use MacOS X OpenGL framework when appropriate. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=844 - - * acinclude.m4: Updated to latest OpenGL test macros versions. - - * libtiff/tiff.h: Use correct int size on Sparc 64bit/Sun compiler - platform. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=855 - -2005-06-14 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added support for ClipPath, XClipPathUnits - and YClipPathUnits tags. - -2005-06-07 Andrey Kiselev - - * contrib/addtiffo/tif_ovrcache.c: Properly extract tile/strip size; - use pixel sized shift in contiguous case. - -2005-06-06 Andrey Kiselev - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.c, tif_ovrcache.h}: - Make overviews working for contiguous images. - -2005-06-03 Andrey Kiselev - - * libtiff/tif_open.c: Replace runtime endianness check with the compile - time one. - - * libtiff/tif_predict.c: Floating point predictor now works on - big-endian hosts. - -2005-06-01 Andrey Kiselev - - * libtiff/tif_dir.c: Use _TIFFsetString() function when read custom - ASCII values. - - * libtiff/{tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c}: Make - DocumentName, Artist, HostComputer, ImageDescription, Make, Model, - Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and - TargetPrinter tags custom. - - * libtiff/tif_jpeg.c: Cleanup the codec state depending on - TIFF_CODERSETUP flag (to fix memry leaks). - - * libtiff/tif_jpeg.c: Initialize JPEGTables array with zero after - allocating. - -2005-05-26 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Added workaround for - OpenBSD/MirOS soname problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=838 - - * libtiff/tif_dirwrite.c: Use tdir_count when calling - TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=845 - -2005-05-25 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed format string when read PPM file header with - the fscanf() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=861 - - * libtiff/{tif_dirinfo.c, tif_print.c}: TIFFFetchByteArray() returns - uint16 array when fetching the BYTE and SBYTE filds, so we should - consider result as pointer to uint16 array and not as array of chars. - As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - * libtiff/tif_dir.c: More efficient custom tags retrieval as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=830 - - * libtiff/tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share - mode in CreateFile() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=829 - - * libtiff/Makefile.am: Fixed parallel compilation of the libtiff and - libtiffxx libraries as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=826 - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.h}: Sinchronized with - GDAL. - -2005-05-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: Substantial fix for addtiffo problems with - JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables - in directory. - -2005-05-22 Frank Warmerdam - - * libtiff/tif_dirread.c: Changed the code that computes - stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is - zero. This is a common case with GDAL indicating a "null" tile/strip. - -2005-05-17 Andrey Kiselev - - * tools/tiffsplit.c: Check for JPEGTables tag presence before copying. - -2005-05-06 Frank Warmerdam - - * libtiff/tif_dirread.c: Applied similar change to - TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - - * libtiff/tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw(). - -2005-05-06 Andrey Kiselev - * tools/tiff2pdfr.c, man/tiff2pdf.1: Calculate the tile width properly; - added new option '-b' to use interpolation in output PDF files (Bruno - Ledoux). - -2005-05-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Ensure that broken files with too many - values in PerSampleShorts work ok instead of crashing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - -2005-04-27 Andrey Kiselev - - * tools/tiffdither.c: Copy the PhotometricInterpretation tag from the - input file. - -2005-04-15 Andrey Kiselev - - * libtiff/tif_predict.c: Added ability to encode floating point - predictor, as per TIFF Technical Note 3. - -2005-04-14 Andrey Kiselev - - * libtiff/{tif_predict.h, tif_predict.c}: Added ability to decode - floating point predictor, as per TIFF Technical Note 3. - -2005-04-13 Andrey Kiselev - - * libtiff/{tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c}: - Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to - swap 24-bit floating point values. - - * libtiff/tiff.h: Added predictor constants. - -2005-04-08 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dir.c}: Use uint32 type for appropriate - values in _TIFFVSetField() function. Inspired by the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - - * man/TIFFSetField.3tiff: Fixed definition of the TIFFTAG_INKNAMES tag - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - -2005-03-30 Andrey Kiselev - - * libtiff/tif_open.c: Do not read header in case the output file - should be truncated (Ron). - - * libtiff/{tif_dirinfo.c, tif_config.h.vc}: Use lfind() instead - of bsearch() in _TIFFFindFieldInfoByName() function (Ron). - - * libtiff/{tiff.h, tif_dirinfo.c}: Fixes in EXIF tag ordering (Ron). - -2005-03-22 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Use libtool machinery to pass - rpath option. - -2005-03-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_print.c}: Handle all data types in custom - tags. - -2005-03-18 Andrey Kiselev - - * libtiff/dirinfo.c: Added DNG tags. - - * libtiff/{tif_dir.c, tif_print.c}: More improvements in custom tag - handling code. - - * libtiff/tiff.h: More comments; added missed DNG tag (LensInfo); - added DNG 1.1.0.0 tags. - - * tools/tif2pdf.c: Fixed problem with alpha channel handling as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=794 - - * man/TIFFGetField.3tiff: Add a note about autoregistered tags. - -2005-03-17 Andrey Kiselev - - * nmake.opt: Build with Win32 CRT library by default. - - * tools/tiff2ps.c: Fixed typo in page size handling code. - - * libtiff/{tif_dir.c, tif_print.c}: Support for custom tags, passed - by value. - - * libtiff/{tiff.h, tif_dirinfo.c, tiffiop.h}: Added EXIF related tags. - -2005-03-15 Andrey Kiselev - - * libtiff 3.7.2 released. - -2005-03-09 Andrey Kiselev - - * tools/tiffcmp.c: Added ability to compare the 32-bit integer and - floating point data; complain on unsupported bit depths. - -2005-03-05 Andrey Kiselev - - * tif_stream.cxx: Use ios namespace instead of ios_base to support - GCC 2.95. - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied correct patch from - Lee Howard for HylaFax DCS tag - (see http://bugzilla.remotesensing.org/show_bug.cgi?id=771) - -2005-03-04 Andrey Kiselev - - * configure, configure.ac: Use -rpath option instead of -R as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=732 - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied patch from Lee - Howard to support a new tag TIFFTAG_FAXDCS (34911) used in HylaFax - software. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=771 - - * nmake.opt, html/build.html: Add more comments, change the config - file organization a bit as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=764 - - * tools/tiffcmp.c: Use properly sized buffer in short arrays comparison - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=785 - -2005-03-03 Andrey Kiselev - - * libtiff/tif_dirread.c: More logic to guess missed strip size as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - * tools/fax2ps.c: Replace insecure mktemp() function with the - tmpfile() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=786 - -2005-02-04 Andrey Kiselev - - * libtiff/tiff.h: Changed the int8 definition to be always signed char - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiffio.h: Move TIFFOpenW() function into the extern "C"{} - block as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=763 - -2005-02-03 Bob Friesenhahn - - * tools/tiffgt.c: Fix problem on big-endian CPUs so that images - display more correctly. Images display brighter than they should - on a Sun workstation. - -2005-02-03 Andrey Kiselev - - * libtiff/tif_dirread.c: Estimate strip size in case of wrong or - suspicious values in the tags. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - - * tools/tiff2ps.c: Fixed problem with page sizes as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=742 - -2005-01-31 Bob Friesenhahn - - * libtiff/tiff.h (TIFFTAG_TILEWIDTH): Corrected description. - (TIFFTAG_TILELENGTH): Corrected description. - -2005-01-30 Andrey Kiselev - - * configure.ac: Fixes for --with-docdir option as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=759 - - * libtiff/tif_open.c: Remove unnesessary TIFFSeekFile() call as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=756 - - * libtiff/tif_stream.cxx: Fixes for C++ stream interface from - Michael Rinne and Edward Lam. - -2005-01-15 Andrey Kiselev - - * configure.ac: Make the documentation directory location configurable - via the --with-docdir option (as suggested by Jeremy C. Reed). - - * libtiff/tif_color.c: Use double as the second argument of pow() - function in TIFFCIELabToRGBInit(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=741 - - * libtiff/tif_pixarlog.c: Avoid warnings when converting float to - integer as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=740 - - * libtiff/tif_getimage.c: Always fill the error message buffer in - TIFFRGBAImageBegin() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=739 - -2005-01-12 Andrey Kiselev - - * libtiff/tif_jpeg.c: Added ability to read/write the fax specific - TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS and TIFFTAG_FAXRECVTIME - tags as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=736 - - * libtiff/tif_win32.c: Fixed message formatting in functions - Win32WarningHandler() and Win32ErrorHandler() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=735 - - * tools/tiff2ps.c: Interpret the -w and -h options independently. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=689 - -2005-01-11 Andrey Kiselev - - * libtiff/tiffio.h: Move the color conversion routines in the 'extern - "C"' section as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiff.h: Restore back the workaround for AIX Visual Age C - compiler to avoid double definition of BSD types as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * libtiff/Makefile.am: Place the C++ stream API in the separate - library called libtiffxx to avoid unneeded dependencies. Probably - there will be more C++ API in the future. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=733 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2005-01-05 Andrey Kiselev - - * tools/tiffdump.c: Fixed problem when read broken TIFFs with the - wrong tag counts (Dmitry V. Levin, Martin Pitt). - - * configure.ac: Replace --disable-c++ with the --disable-cxx option as - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2004-12-25 Andrey Kiselev - - * libtiff/tif_getimage.c: More fixes for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - - * tools/tiffset.c: Convert character option to integer value as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=725 - -2004-12-20 Andrey Kiselev - - * libtiff 3.7.1 released. - - * html/tiffset.1.html: Add missed manual page as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - - * libtiff/tiff.h: Revert back libtiff data type definitions as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=687 - -2004-12-19 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not forget about TIFF_VARIABLE2 when - checking for tag count in TIFFReadDirectory() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - * libtiff/{tif_dirread.c, tif_fax3.c}: More argument checking in - CheckMallock() function. - - * libtiff/tif_getimage.c: Support for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=718 - -2004-12-15 Frank Warmerdam - - * libtiff/tif_getimage.c: #define A1 bracketing for clean build on - SunPro compiler. - -2004-12-11 Bob Friesenhahn - - * autogen.sh: aclocal and autoheader should be executed after - libtoolize. Also add '-I .' to aclocal invocation to check - current directory for macros. - -2004-12-10 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Always write TIFFTAG_SUBIFD using LONG type - as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=703 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=704 - -2004-12-04 Andrey Kiselev - - * nmake.opt: Link with the user32.lib in windowed mode. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_win32.c: Use char* strings instead of TCHAR in windowed - mode as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_config.in.vc: Removed unneeded definitions for - read/open/close/lseek functions to fix the - - http://bugzilla.remotesensing.org/show_bug.cgi?id=680 - -2004-12-03 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dirread.c}: Remove TIFFReassignTagToIgnore() - call from the TIFFReadDirectory() function. TIFFReassignTagToIgnore - must be removed in the future, as it was never used properly. As per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=692 - -2004-11-30 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Added a work-around in order to allow - compilation with the heavily modified version of libjpeg delivered - with Cygwin. - -2004-11-29 Andrey Kiselev - - * libtiff/tif_dir.c: Properly handle tags, which have the uint32 - counts. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=693 - - * tools/fax2ps.c: Be able to extract the first page (#0). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=690 - -2004-11-28 Andrey Kiselev - - * libtiff/tif_unix.c: Make UNIX module compilable (and usable) - on Windows. - - * nmake.opt: Add missed DLLNAME variable. - -2004-11-26 Frank Warmerdam - - * libtiff/makefile.vc: make it easier to rename the libtiff DLL. - -2004-11-24 Andrey Kiselev - - * man/libtiff.3tiff: Improvements in the "LIST OF ROUTINES" table as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=545 - - * man/tiffset.1: Added manual page for tiffset tool written by Jay - Berkenbilt. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - -2004-11-23 Frank Warmerdam - - * libtiff/tif_error.c: fixed TIFFerror call to be TIFFError. - -2004-11-21 Frank Warmerdam - - * html/document.html: Updated Adobe web links as per email from Joris. - -2004-11-21 Andrey Kiselev - - * libtiff/{tiffio.hxx, tiffio.h}: C++ stream interface moved to new - file tiffio.hxx. We don't have any C++ in tiffio.h, those who want to - use C++ streams should #include . - -2004-11-13 Andrey Kiselev - - * libtiff/tiff.h: Added Adobe DNG tags. - - * libtiff/tif_win32.c: Typo fixed. - - * libtiff/{tif_stream.cxx, tiffio.h}: C++ stream interface updated to - be compliant with the latest standard. Appropriate additions in - makefiles now completed. - -2004-11-11 Andrey Kiselev - - * tools/tiffset.c, libtiff/tif_dirinfo.c: Properly handle the - different tag types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=600 - -2004-11-10 Andrey Kiselev - - * libtiff/tif_aux.c: Set the appropriate ReferenceBlackWhite array for - YCbCr image which lacks that tag (noted by Hans Petter Selasky). - -2004-11-09 Andrey Kiselev - - * libtiff/tif_color.c: Division by zero fixed (Hans Petter Selasky). - -2004-11-07 Andrey Kiselev - - * libtiff/{tif_stream.cxx, tiffio.h}: Added C++ stream interface - contributed by Edward Lam (see - http://bugzilla.remotesensing.org/show_bug.cgi?id=654 for details). - Though no changes in any makefiles yet. - -2004-11-05 Frank Warmerdam - - * libtiff/tif_open.c: Removed close() in TIFFClientOpen() if file - is bad. This is the callers responsibility. - http://bugzilla.remotesensing.org/show_bug.cgi?id=651 - -2004-11-05 Andrey Kiselev - - * libtiff/{tiffio.h, tif_win32.c, libtiff.def}: Added TIFFOpenW() - function to work with the double byte strings (used to represent - filenames in some locales). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=625 - - * libtiff/tif_dirread.c: Fixed problem when fetching BitsPerSample and - Compression tags of type LONG from broken TIFFS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_dirinfo.c: Fixed definition for TIFFTAG_RICHTIFFIPTC, - the writecount should have uint32 type. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_write.c: Fixed wrong if() statement in - TIFFAppendToStrip() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=660 - -2004-11-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definition for TIFFTAG_EXTRASAMPLES - field. The caller should supply a count when setting this field. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=648 - - * libtiff/{tif_jpeg.c, tif_ojpeg.c}: TIFFTAG_JPEGTABLES should have - uint32 count. Use this type everywhere. - -2004-11-03 Frank Warmerdam - - * libtiff/tif_next.c: avoid use of u_long and u_char types. Bug 653. - -2004-11-02 Frank Warmerdam - - * tools/tiff2rgba.c: removed extra newlines in usage message. - -2004-10-30 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Improvements in tag writing code. - - * tools/tiff2ps.c: Fixed wrong variable data type when read Position - tags (Tristan Hill). - -2004-10-30 Frank Warmerdam - - * libtiff/tiffiop.h: added fallback definition of assert() if we - don't have assert.h. - -2004-10-29 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed case with the wrong decode routines - choosing when the incorrect Group4Options tag set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=323 - - * libtiff/tif_dirwrite.c: Fixed problem with passing count variable of - wrong type when writing the TIFF_BYTE/TIFF_SBYTE tags in - TIFFWriteNormalTag(). - -2004-10-28 Andrey Kiselev - - * tools/tiff2ps.c: Fixed wrong variable data type when read Resolution - tags (Peter Fales). - - * tools/{bmp2tiff.c, raw2tiff.c}: Get rid of stream I/O functions. - -2004-10-28 Frank Warmerdam - - * tools/tiff2pdf.c: added casts to avoid warnings. - - * libtiff/libtiff.def: Added several more entry points required - to link fax2tiff.c against the DLL on windows. - -2004-10-27 Andrey Kiselev - - * configure, configure.ac: Added --enable-rpath option to embed linker - paths into library binary. - -2004-10-26 Andrey Kiselev - - * tools/tiffset.c: Check the malloc return value (Dmitry V. Levin). - - * libtiff/{tif_strip.c, tif_tile.c}: Zero division problem fixed - (Vladimir Nadvornik, Dmitry V. Levin). - -2004-10-16 Andrey Kiselev - - * libtiff 3.7.0 released. - -2004-10-15 Bob Friesenhahn - - * libtiff/tif_jpeg.c: There seems to be no need to include stdio.h - in this file so its inclusion is removed. Including stdio.h - sometimes incurs an INT32 typedef conflict between MinGW's - basetsd.h and libjpeg's jmorecfg.h. - -2004-10-15 Andrey Kiselev - - * man/bmp2tiff.1: Added manual page for bmp2tiff utility. - -2004-10-13 Bob Friesenhahn - - * tools/tiffcmp.c (leof): Renamed from 'eof' in order to avoid - conflict noticed under MinGW. - * ltmain.sh: Fix for MinGW compilation. - -2004-10-13 Frank Warmerdam - - * man/tiffsplit.1: Fixed to indicate using aaa-zzz, not aa-zz. - http://bugzilla.remotesensing.org/show_bug.cgi?id=635 - -2004-10-12 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_jpeg.c, tif_luv.c, tif_ojpeg.c, - tif_pixarlog.c, tif_write.c}: Handle the zero strip/tile sizes - properly (Dmitry V. Levin, Marcus Meissner). - -2004-10-11 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed - to TIFF_IFD. - -2004-10-10 Andrey Kiselev - - * tools/bmp2tif.c: Check the space allocation results. - -2004-10-09 Andrey Kiselev - - * libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields - of the TIFFDirectory structure with the 0 instead of -1 to avoid - confusing integer overflows in TIFFTileRowSize() for striped images. - - * tools/tiff2pdf.c: Fixed TransferFunction tag handling reported - by Ross A. Finlayson. - - * libtiff/tif_dir.c: Fixed custom tags handling as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=629 - -2004-10-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation - of tif_fieldinfo. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=630 - -2004-10-04 Bob Friesenhahn - - * contrib/iptcutil/README: Added the missing README which goes - along with iptcutil. - -2004-10-03 Andrey Kiselev - - * libtiff/tif_compress.c: Improved error reporting in - TIFFGetConfiguredCODECs() (Dmitry V. Levin). - -2004-10-02 Andrey Kiselev - - * libtiff 3.7.0beta2 released. - - * libtiff/{tif_aux.c, tif_compress.c, tif_dirinfo.c, tif_dirwrite.c, - tif_extension.c, tif_fax3.c, tif_luv.c, tif_packbits.c, - tif_pixarlog.c, tif_write.c}: Added checks for failed memory - allocations and integer overflows (Dmitry V. Levin). - - * libtiff/tiff.h: Missed TIFF_BIGTIFF_VERSION constant added. - -2004-10-01 Frank Warmerdam - - * libtiff/tif_open.c: added a more informative message if a BigTIFF - file is opened. - -2004-09-30 Frank Warmerdam - - * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to - TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info - in the Adobe XMP Specification. - -2004-09-29 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_pixarlog.c}: Use _TIFFmemset() instead of - memset(). - - * libtiff/{tif_dirread.c, tif_strip.c, tif_tile.c}: Applied patches - from Dmitry V. Levin to fix possible integer overflow problems. - -2004-09-28 Andrey Kiselev - - * libtiff/tif_getimage.c: Check for allocated buffers before clearing - (Dmitry V. Levin). - -2004-09-26 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dir.c, tif_dirread.c, tif_write.c}: - Optimize checking for the strip bounds. - - * libtiff/{tif_dirread.c, tif_strip.c}: TIFFScanlineSize() and - TIFFRasterScanlineSize() functions report zero in the case of integer - overflow now. Properly handle this case in TIFFReadDirectory() - (patches from Dmitry V. Levin). - -2004-09-25 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_strip.c, tif_tile.c}: Use TIFFhowmany8() - macro where appropriate. - - * tools/tiff2bw.c: Write ImageWidth/Height tags to output file, as - noted by Gennady Khokhorin. - - * libtiff/tif_dirread.c: Always check the return values, returned - by the _TIFFmalloc() (Dmitry V. Levin). - - * libtiff/tif_dir.c: Fixed possible integer overflow _TIFFset*Array() - functions (Dmitry V. Levin). - - * libtiff/{tif_dirread.c, tif_dir.c, tif_write.c}: - Potential memory leak fixed in TIFFReadDirectory(), _TIFFVSetField(), - TIFFGrowStrips() (found by Dmitry V. Levin). - -2004-09-24 Andrey Kiselev - - * libtiff/{tiffio.h, tif_compress.c}: Added TIFFGetConfiguredCODECs() - to get the list of configured codecs. - - * libtiff/{tiffiop.h, tif_dirread.c}: More overflow fixes from - Dmitry V. Levin. - -2004-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: Applied patch from Dmitry V. Levin to fix - possible integer overflow in CheckMalloc() function. - -2004-09-22 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_strip.c}: Use TIFFhowmany8() macro instead - of plain TIFFhowmany() where appropriate. - -2004-09-21 Andrey Kiselev - - * libtiff/tif_getimage.c: Initialize arrays after space allocation. - -2004-09-19 Andrey Kiselev - - * libtiff 3.7.0beta released. - - * libtiff/{tif_luv.c, tif_next.c, tif_thunder.c}: Several buffer - overruns fixed, as noted by Chris Evans. - -2004-09-14 Bob Friesenhahn - - * commit: Added a script to make it more convenient to commit - updates. The CVS commit message is extracted from this ChangeLog - file. - -2004-09-14 Andrey Kiselev - - * configure.ac, configure, aclocal.m4, libtiff/{mkspans.c, tif_fax3.c, - tif_getimage.c, tif_luv.c, tif_lzw.c, tif_ojpeg.c, tif_packbits.c, - tif_predict.c, tif_read.c, tif_swab.c, tif_thunder.c, tif_write.c, - tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_jpeg.c, tif_dirinfo.c, - tif_vms.c, tif_print.c, tif_strip.c, tif_tile.c, tif_dir.h, - tif_config.h.in, tiffiop.h}: - Get rid of BSD data types (u_char, u_short, u_int, u_long). - -2004-09-13 Bob Friesenhahn - - * libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP - specification. Reference libtiff bug tracking system to submit - private tag additions. - -2004-09-12 Bob Friesenhahn - - * tools/tiffgt.c: Include "tif_config.h". - - * configure.ac: Use AM_PROG_CC_C_O since it is now needed to build - tiffgt. This results in the 'compile' script being added to the - project. - - * tools/Makefile.am (tiffgt_CFLAGS): Add extra build options - required to find OpenGL headers necessary to build tiffgt. Also - ensure that the libtiff that we built is used rather than some other - libtiff installed on the system. - -2004-09-12 Andrey Kiselev - - * configure.ac, acinclude.m4, aclocal.m4: New macros to detect GLUT - libraries. - -2004-09-11 Bob Friesenhahn - - * configure.ac: Pass library configuration defines via - tif_config.h rather than extending CPPFLAGS. Configure a - libtiff/tiffconf.h in order to satisfy application requirements - (not used by library build). Do not define _POSIX_C_SOURCE=2 since - this causes failure to build on systems which properly respect - this request. - - * libtiff/tiffconf.h.in: New file to act as the template for the - configured tiffconf.h - - * libtiff/files.lst (HDRS): Install the configured tiffconf.h. - -2004-09-10 Frank Warmerdam - - * html/internals.html: Split off a discussion of adding new tags - into addingtags.html. - -2004-09-10 Andrey Kiselev - - * test/{ascii_tag.c, long_tag.c}: Preliminary test suite added. - - * tools/tiff2pdf.c: Fixed reading TransferFunction tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - * libtiff/tif_print.c: Fixes in InkNames and NumberOfInks reporting. - - * libtiff/tif_dirread.c: Don't reject to read tags of the - SamplesPerPixel size when the tag count is greater than number of - samples as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=576 - - * libtiff/tiff.h: Use _TIFF_DATA_TYPEDEFS_ guardian to switch off - defining int8/uint8/... etc. types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=607 - -2004-09-09 Frank Warmerdam - - * tools/tiff2ps.c, tools/tiffmedian.c: fiddle with include files - to avoid compile warnings about getopt() and a few other things. - -2004-09-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Use memcpy() function instead of pointer - assigning magic in TIFFFetchFloat(). - -2004-09-01 Andrey Kiselev - - * libtiff/{tiffio.h, tif_open.c}: Applied patches from Joris Van Damme - to avoid requirement for tiffiop.h inclusion in some applications. See - here - - http://www.asmail.be/msg0054799560.html - - for details. - - * tools/fax2tiff.c: Use the new functions in the code. - -2004-08-25 Andrey Kiselev - - * tools/tiff2pdf.c: Initialize arrays properly. - - * tools/tiff2ps.c: Avoid zero division in setupPageState() function; - properly initialize array in PSDataBW(). - -2004-08-24 Andrey Kiselev - - * tools/tiff2pdf.c: More fixes for bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - from Ross Finlayson. - -2004-08-23 Andrey Kiselev - - * tools/tiff2ps.c: Fixed problem with uninitialized values. - - * libtiff/tif_dir.c: Initialize tif_foundfield data member in the - TIFFDefaultDirectory() (in addition to 2004-08-19 fix). - - * tools/tiff2pdf.c: Fixed a bunch of problems as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - -2004-08-20 Andrey Kiselev - - * tools/tiff2pdf.c: Applied patch from Ross Finlayson that checks - that the input file has compression, photometric interpretation, - etcetra, tags or if not than a more descriptive error is returned. - - * libtiff/tif_dirread.c: Fixed problem in TIFFReadDirectory() in the - code, responsible for tag data type checking. - -2004-08-19 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirinfo.c}: Fixed problem with the static - variable as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=593 - -2004-08-16 Andrey Kiselev - - * tools/ras2tiff.c: Fixed issue with missed big-endian checks as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=586 - -2004-08-01 Andrey Kiselev - - * libtiff/{tif_config.h.in, tif_config.h.vc}: config.h.in and - config.h.vc files renamed in the tif_config.h.in and tif_config.h.vc. - -2004-07-24 Andrey Kiselev - - * libtiff/tif_lzw.c: LZW compression code is merged back from the - separate package. All libtiff tools are updated to not advertise an - abcence of LZW support. - -2004-07-12 Andrey Kiselev - - * libtiff/tiffio.h: Revert thandle_t back to void* type. - -2004-07-11 Andrey Kiselev - - * libtiff/{tif_read.c, tif_tile.c, tif_strip.c}: Fixes in error - messages, as suggested by Bernd Herd. - -2004-07-03 Andrey Kiselev - - * libtiff/tif_dir.c: Call TIFFError() instead of producing warnings - when setting custom tags by value. Reported by Eric Fieleke. - -2004-06-14 Andrey Kiselev - - * tools/bmp2tiff.c: Add missed RawsPerStrip setting. - -2004-06-08 Andrey Kiselev - - * tools/bmp2tiff.c: Added new utility to convert Windows BMP files - into TIFFs. - -2004-06-07 Andrey Kiselev - - * libtiff 3.7.0alpha released. - -2004-06-06 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirwrite.c, tif_fax3.c, tif_packbits.c,}: Get rid - of ugly 64-bit hacks, replace them with the clever (autoconf based ) - ones :-). - - * libtiff/tiffio.h: Define thandle_t as int, not void* (may cause - problems in 64-bit environment). - -2004-06-05 Andrey Kiselev - - * tools/tiffset.c: tiffset now can set any libtiff supported tags. - Tags can be supplied by the mnemonic name or number. - - * libtiff/{tiffio.h, tif_dir.h, tif_dirinfo.c,}: Added two new - functions TIFFFindFieldInfoByName() and TIFFFieldWithName(). - -2004-05-27 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Fixed problem with duplicated SOI and SOF - markers as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=581 - -2004-05-24 Andrey Kiselev - - * tools/tiffsplit.c: Don't forget to copy Photometric - Interpretation tag. - -2004-05-20 Andrey Kiselev - - * libtiff/{tif_open.c, tiffio.h}: New function added: - TIFFIsBigEndian(). Function returns nonzero if given was file written - in big-endian order. - - * tools/tiffsplit.c: Fixed problem with unproperly written multibyte - files. Now output files will be written using the same byte order - flag as in the input image. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=574 - - for details. - -2004-05-19 Frank Warmerdam - - * libtiff/tif_print.c: added (untested) support for printing - SSHORT, SLONG and SRATIONAL fields. - - * tools/tiffcp.c: close output file on normal exit. - -2004-05-17 Andrey Kiselev - - * libtiff/tif_fax3.c: Avoid reading CCITT compression options - if compression type mismatches. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=565 - -2004-04-30 Andrey Kiselev - - * libtiff/tif_strip.c: Never return 0 from the - TIFFNumberOfStrips(). - -2004-04-29 Andrey Kiselev - - * libtiff/tif_dirread.c: Workaround for broken TIFF writers which - store single SampleFormat value for multisampled images. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=562 - -2004-04-25 Andrey Kiselev - - * configure.ac, libtiff/{tiff.h, config.h.in}: Added tests for int8, - int16 and int32 types to avoid complains on some compilers. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2004-04-20 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed problem with unaligned access as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=555 - -2004-04-14 Andrey Kiselev - - * libtiff/tif_write.c: Allow in-place updating of the compressed - images (don't work properly with all codecs). For details see GDAL bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=534 - -2004-04-06 Andrey Kiselev - - * libtiff/tif_jpeg.c: Workaround for wrong sampling factors used - in the Intergarph JPEG compressed TIFF images as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=532 - -2004-04-04 Frank Warmerdam - - * libtiff/tif_open.c: close clientdata if TIFFClientOpen() fails - via bad2. - -2004-03-26 Andrey Kiselev - - * tools/tiffcp.c: Properly set Photometric Interpretation in case of - JPEG compression of grayscale images. - - * tools/tiffcp.c: Don't emit warnings when Orientation tag does not - present in the input image. - -2004-03-19 Andrey Kiselev - - * {many}: The first attempt to switch to autotools. - -2004-03-03 Andrey Kiselev - - * libtiff/tif_open.c: Use dummy mmap/munmap functions in - TIFFClientOpen() when the appropriate client functions was not - supplied by user. - -2004-03-02 Frank Warmerdam - - * tools/ycbcr.c: fixed main() declaration as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=513 - -2004-02-26 Andrey Kiselev - - * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed - images. Reported by Artem Mirolubov. - - * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED - tag type in TIFFFetchNormalTag() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=508 - -2004-02-17 Frank Warmerdam - - * libtiff/tif_codec.c: Fixed typo in TIFFInitPackBits name as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=494 - -2004-02-05 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed problem with CCITT encoding modes as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=483 - - But we need more work on fax codec to support update mode. - -2004-01-30 Frank Warmerdam - - * libtiff/libtiff.def: Added TIFFCurrentDirOffset, TIFFWriteCheck, - TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by - Scott Reynolds. - -2004-01-29 Andrey Kiselev - - * libtiff/tiff.h: Fixed tag definitions for TIFFTAG_YCLIPPATHUNITS - and TIFFTAG_INDEXED as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=475 - - * libtiff/{tif_win32.c, tif_unix.c}: Check whether the pointer is - NULL before proceeding further as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=474 - - Check results, returned by the TIFFFdOpen() before returning and close - file if TIFFFdOpen() failed as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * libtiff/tif_open.c: More fixes for - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - -2004-01-28 Andrey Kiselev - - * libtiff/{libtiff.def, tif_close.c, tiffio.h, tif_open.c}: Separate - TIFFCleanup() from the TIFFClose() in order to fix the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * tools/tiffcp.c: Fixed problem with wrong interpretation of the - InkNames tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=466 - - Memory leak fixed. - -2004-01-21 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fixed handling of writable ASCII tags that - are field_passcount=TRUE properly. Arguably anonymous custom tags - should be declared as passcount=FALSE, but I don't want to change - that without a careful review. - -2004-01-20 Andrey Kiselev - - * libtiff/tif_write.c: Fixed reporting size of the buffer in case of - stripped image in TIFFWriteBufferSetup(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=460 - -2004-01-11 Andrey Kiselev - - * libtiff/tif_dir.c: Incomplete cleanup in TIFFFreeDirectory(), - patch from Gerben Koopmans. - - * libtiff/tif_dirread.c: Check field_passcount value before setting - the value of undefined type, patch from Gerben Koopmans. - -2004-01-02 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with wrong Photometric setting for - non-RGB images. - -2003-12-31 Andrey Kiselev - - * libtiff/tif_win32.c: Fixed problem with _TIFFrealloc() when the NULL - pointer passed. Patch supplied by Larry Grill. - - * libtiff/{tiff.h, tif_fax3.c}:Fixes for AMD 64 platform as - suggested by Jeremy C. Reed. - -2003-12-26 Andrey Kiselev - - * libtiff 3.6.1 released. - -2003-12-24 Andrey Kiselev - - * config.guess, config.sub: Updated from the recent upstream. - -2003-12-22 Andrey Kiselev - - * libtiff/{tif_color, tif_getimage.c, tiffio.h}, man/TIFFcolor.3t: - More cleanups in color conversion interface, added appropriate manual - page. - -2003-12-19 Andrey Kiselev - - * libtiff/{tif_extension.c, tif_dirinfo.c, tiff.h}: Warnings fixed as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * tools/tiff2ps.c: Added support for alpha channel. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=428 - - * libtiff/{libtiff.def, tif_color.c, tif_getimage.c, tiffio.h}: - Interface for Lab->RGB color conversion is finally cleaned up. - Added support for ReferenceBlackWhite tag handling when converted from - YCbCr color space. The latter closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=120 - -2003-12-07 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}: Avoid warnings. - - * libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG - library. - -2003-12-06 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_aux.c}: Read WhitePoint tag from the - file and properly use it for CIE Lab->RGB transform. - -2003-12-04 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: YCbCr->RGB - conversion routines now in the tif_color.c module. New function - TIFFYCbCrtoRGB() available in TIFF API. - - * libtiff/tif_dirwrite.c: Handle TIFF_IFD tag type correctly. - -2003-12-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: Improvements in - CIE Lab conversion code. Start moving YCbCr stuff to the tif_color.c - module. - - * libtiff/{tif_getimage.c, tiffio.h}, man{TIFFReadRGBAImage.3t, - TIFFReadRGBAStrip.3t, TIFFReadRGBATile.3t, TIFFRGBAImage.3t}: - Finally resolved problems with orientation handling. TIFFRGBAImage - interface now properly supports all possible orientations, i.e. images - will be flipped both in horizontal and vertical directions if - required. 'Known bugs' section now removed from the appropriate manual - pages. Closed bug entry: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - -2003-12-02 Andrey Kiselev - - * libtiff/tif_dir.c: Fixed order of the parameters in TIFFError() - function calls as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=440 - -2003-11-28 Ross Finlayson - - * tools/tiff2pdf.c: Some bugs fixed. - -2003-11-27 Andrey Kiselev - - * libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, - reported by Antonio Scuri. - - * man/tiff2pdf.1: Few improvements in page layout. - - * Makefile.in, /man/Makefile.in, /html/man/tiff2pdf.1.html: - Added support for tiff2pdf manual page. - -2003-11-26 Ross Finlayson - - * /man/tiff2pdf.1: File added to repository. - -2003-11-26 Andrey Kiselev - - * Makefile.in, /tools/{Makefile.in, makefile.vc}: - Added support for tiff2pdf utility. - -2003-11-25 Ross Finlayson - - * /tools/tiff2pdf.c: File added to repository. - -2003-11-22 Andrey Kiselev - - * /tools/raw2tiff.c: sqrtf() replaced with sqrt(). - -2003-11-21 Andrey Kiselev - - * /tools/raw2tiff.c: #include removed. - - * tools/{Makefile.in, tiffgt.c}: Unmaintained and platform dependent - sgigt utility removed and replaced with the completely rewritten - portable tiffgt tool (depend on OpenGL and GLUT). Initial revision, - there is a lot of things to improve. - - * libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly - extract the fields from the OJPEG files. Patch supplied by Ross - Finlayson. - - * libtiff/{tiffio.h, tif_codec.c}, man/{libtiff.3t, TIFFcodec.3t}: - Added new function TIFFIsCODECConfigured(), suggested by Ross - Finlayson. - -2003-11-18 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Implemented binary search in - _TIFFMergeFieldInfo(). Patch supplied by Ross Finlayson. - - * libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo declaration replaced - with _TIFFFindOrRegisterFieldInfo as reported by Ross Finlayson. - -2003-11-17 Frank Warmerdam - - * tif_dirread.c: do not mark all anonymously defined tags to be - IGNOREd. - -2003-11-17 Andrey Kiselev - - * contrib/pds/{tif_pdsdirread.c, tif_pdsdirwrite.c}: Use - TIFFDataWidth() function instead of tiffDataWidth array. - -2003-11-16 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) - datatype, introduced in "Adobe PageMaker TIFF Tech. Notes". - -2003-11-15 Frank Warmerdam - - * Makefile.in: fixed missing backslash for tif_color.c in list. - -2003-11-13 Andrey Kiselev - - * libtiff/{tif_color.c, tif_getimage.c, tiffio.h, Makefile.in}: - New color space conversion code: CIE L*a*b* 1976 images now supported - by the TIFFRGBAImage interface. All introduced routines go to new - module tif_color.c. Eventually all color conversion functions should - be moved there. - -2003-11-12 Andrey Kiselev - - * tools/{ras2tiff.c, rasterfile.h}: Properly determine SUN Rasterfiles - with the reverse byte order (it is reported by the magic header - field). Problem reported by Andreas Wiesmann. - - * tools/raw2tiff.c, man/raw2tiff.1: Few improvements in correlation - calculation function. Guessing mechanics now documented in manual page. - -2003-11-11 Andrey Kiselev - - * tools/raw2tiff.c: Implemented image size guessing using - correlation coefficient calculation between two neighbour lines. - -2003-11-09 Frank Warmerdam - - * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the - planarconfig_contig case in TIFFComputeTile(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=387 - -2003-11-09 Andrey Kiselev - - * libtiff/tiffiop.h: New macros: TIFFmax, TIFFmin and TIFFrint. - -2003-11-07 Andrey Kiselev - - * libtiff/{tiffio.h, tif_strip.c}, man/{TIFFstrip.3t, libtiff.3t}: - Added TIFFRawStripSize() function as suggested by Chris Hanson. - -2003-11-03 Andrey Kiselev - - * libtiff/{tif_lzw.c, tif_fax3.c}: Proper support for update mode as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=424 - -2003-10-29 Andrey Kiselev - - * libtiff/libtiff.def: Added TIFFReadRGBAImageOriented. - - * html/build.html: Added note about GNU make requirement. - -2003-10-25 Andrey Kiselev - - * Makefile.in: Fixes in using MAKEFLAGS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=418 - - * port/install.sh.in: Option -p added to the mkdir command to create - all directory tree structure before installing. - -2003-10-18 Andrey Kiselev - - * /tools/tiff2ps.c: #include replaced with the - #include . - -2003-10-16 Andrey Kiselev - - * Makefile.in: Add an absolute path to the test_pics.sh call. - -2003-10-12 Andrey Kiselev - - * libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD - typedefs. - -2003-10-09 Andrey Kiselev - - * configure, libtiff/{Makefile.in, mkversion.c}: - Relative buildings fixed. - - * tools/Makefile.in: Added "-I../libtiff" to the tiffset building - rule. - -2003-10-07 Andrey Kiselev - - * Makefile.in: Added missed v3.6.0.html. - - * libtiff/tiffio.h: Typo fixed: ORIENTATION_BOTTOMLEFT replaced with - ORIENTATION_BOTLEFT. - -2003-10-04 Andrey Kiselev - - * 3.6.0 final release. - -2003-10-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}, man/TIFFReadRGBAImage.3t: New - function TIFFReadRGBAImageOriented() implemented to retrieve raster - array with user-specified origin position as suggested by Jason Frank. - See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - - for details. - - * tools/tiff2rgba.c: Switched to use TIFFReadRGBAImageOriented() - instead of TIFFReadRGBAImage(). - - * tools/tiff2ps.c: Fixed possible endless loop as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=404 - -2003-09-30 Andrey Kiselev - - * libtiff/tif_dirread.c: Check field counter against number of fields - in order to fix - - http://bugzilla.remotesensing.org/show_bug.cgi?id=366 - - * libtiff/tif_fax3.c: Fix wrong line numbering as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=342 - -2003-09-25 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirread.c, tif_dir.c, tif_open.c, - tif_close.c}: Store a list of opened IFD to prevent looping as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=383 - -2003-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: More fixes for EstimateStripByteCounts(). See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - -2003-08-21 Andrey Kiselev - - * tools/tiffmedian.c: int declaration replaced with the uint32 to - support large images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=382 - -2003-08-12 Andrey Kiselev - - * libtiff/Makefile.in: Fixed problem with building in different - directory. - - * tools/tiff2ps.c: Added missing #include . - - * libtiff/tif_dirwrite.c: More fixes for custom tags code - from Ashley Dreier. - -2003-08-07 Andrey Kiselev - - * tools/tiff2ps.c: Added page size setting when creating PS Level 2. - Patch submitted by Balatoni Denes (with corrections from Tom - Kacvinsky). - - * tools/tiff2ps.c: Fixed PS comment emitted when FlateDecode is - being used. Reported by Tom Kacvinsky. - - * libtiff/tif_dirwrite.c: Fixed problem with custom tags writing, - reported by Ashley Dreier. - - * libtiff/tif_print.c: Fixed problem with float tags reading, support - for printing RATIONAL and BYTE tags added. - -2003-08-05 Andrey Kiselev - - * libtiff/tif_lzw.c: Move LZW codec state block allocation back to - TIFFInitLZW(), because its initialization in LZWSetupDecode() cause - problems with predictor initialization. Remove O_RDONLY check during - state block allocation to be able open LZW compressed files in update - mode. - - Problem exist for libtiff version of the tif_lzw.c module. One from - lzw-compression-kit hasn't such troubles. - -2003-08-04 Frank Warmerdam - - * libtiff/tif_write.c: modified tif_write.c so that the various - encoded write functions use tif_postdecode() to apply byte order - swapping (swab) to the application passed data buffer if the same - would be done when reading. This allows us to write pixel data with - more than 8 bits per sample to existing files of a non-native byte - order. One side effect of this change is the applications buffer - itself is altered in this case by the act of writing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=171 - -2003-07-25 Frank Warmerdam - - * libtiff/tif_open.c: avoid signed/unsigned casting warning - initializing typemask as per patch from J.A. Strother. - - * tools/tiffcp.c: fixed signed/unsigned casting warning. - - * libtiff/tif_print.c: dos2unix conversion. - - * tools/tiffsplit.c: increased the maximum number of pages that - can be split. Patch provided by Andrew J. Montalenti. - -2003-07-11 Andrey Kiselev - - * tools/raw2tiff.c: Added option `-p' to explicitly select color - space of input image data. Closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=364 - -2003-07-08 Frank Warmerdam - - * tif_aux.c, tif_codec.c, tif_dir.c, tif_dirread.c, tif_extension.c, - tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c, - tif_packbits.c, tif_predict.c, tif_print.c, tif_swab.c, tif_thunder.c: - avoid casting warning at /W4. - -2003-07-03 Andrey Kiselev - - * tools/thumbnail.c: Memory leak fixed as reported by Robert S. Kissel. - -2003-06-30 Andrey Kiselev - - * libtiff/tif_pixarlog.c: Unused variables removed. - - * libtiff/{tif_dirread.c, tif_dir.c}: Fixed problem with - EstimateStripByteCounts() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - - * libtiff/{tif_dirwrite.c, tif_packbits.c}: Fixed compilation on - 64-bit architectures as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * libtiff/tif_dirinfo.c: TIFFDataWidth() returns 0 in case of - unknown data type. - -2003-06-19 Frank Warmerdam - - * libtiff/tif_print.c: fixed some serious bugs when printing - custom tags ... almost certain to crash. - - * libtiff/tif_dirread.c: Don't ignore custom fields that are - autodefined. Not sure how this got to be like this. - -2003-06-18 Andrey Kiselev - - * 3.6.0 Beta2 released. - - * tools/tiffcmp.c, man/tiffcmp.1: Fixed problem with unused data - comparing as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=349 - - `-z' option now can be used to set the number of reported different - bytes. - -2003-06-09 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added possibility to specify value -1 - to -r option to get the entire image as one strip. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - - for details. - -2003-06-04 Andrey Kiselev - - * tools/tiffcp.c: Set the correct RowsPerStrip and PageNumber - values as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - -2003-05-27 Frank Warmerdam - - * libtiff/tif_jpeg.c: modified segment_height calculation to always - be a full height tile for tiled images. Also changed error to just - be a warning. - -2003-05-25 Andrey Kiselev - - * tools/fax2tiff.c: Page numbering fixed, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=341 - -2003-05-20 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Switched back to the old behaviour. Likely - better solution should be found for OJPEG support. - -2003-05-11 Andrey Kiselev - - * libtiff/mkversion.c: Fixed problem with wrong string size when - reading RELEASE-DATE file. - -2003-05-07 Andrey Kiselev - - * tools/tiff2ps.c: Fixed bug in Ascii85EncodeBlock() function: array - index was out of range. - -2003-05-06 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Improved libtiff compilation with OJPEG - support. Now no need for patching IJG JPEG library, hack required by - libtiff will be compiled and used in-place. Implemented with - suggestion and help from Bill Allombert, Debian's libjpeg maintainer. - - * libtiff/tif_aux.c: Properly handle TIFFTAG_PREDICTOR in - TIFFVGetFieldDefaulted() function. - -2003-05-05 Andrey Kiselev - - * tools/ppm2tiff.c: PPM header parser improved: now able to skip - comments. - - * tools/tiffdither.c: Fixed problem with bit fill order tag setting: - was not copied from source image. - - * libtiff/getimage.c: Workaround for some images without correct - info about alpha channel as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=331 - -2003-04-29 Andrey Kiselev - - * tools/tiff2ps.c, man/tiff2ps.1: Add ability to generate PS Level 3. - It basically allows one to use the /flateDecode filter for ZIP - compressed TIFF images. Patch supplied by Tom Kacvinsky. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=328 - - * tools/tiff2ps.c: Force deadzone printing when EPS output specified - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=325 - -2003-04-17 Andrey Kiselev - - * libtiff/tif_dirread.c: Removed additional check for StripByteCounts - due to problems with multidirectory images. Quality of error messages - improved. - -2003-04-16 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with colorspace conversion for JPEG - encoded images. See bug entries - - http://bugzilla.remotesensing.org/show_bug.cgi?id=275 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - - * libtiff/tif_dirread.c: Additional check for StripByteCounts - correctness. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - -2003-03-12 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, gif2tiff.c, pal2rgb.c, ppm2tiff.c, - ras2tiff.c, raw2tiff.c, rgb2ycbcr.c, thumbnail.c, tiff2bw.c, - tiff2ps.c, tiff2rgba.c, tiffcp.c, tiffdither.c, tiffinfo.c, - tiffmedian.c}: Added library version reporting facility to all tools. - -2003-03-06 Frank Warmerdam - - * port/install.sh.in: Fixed problems with install producing paths - like ///usr/local/lib on cygwin. - -2003-02-27 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: New switch (-X) to set width of - raw input page. Patch supplied by Julien Gaulmin. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=293 - - for details. - -2003-02-26 Frank Warmerdam - - * libtiff/tif_dir.c: fixed up the tif_postdecode settings - responsible for byte swapping complex image data. - - * libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till - LZWSetupDecode(). Needed to read LZW files in "r+" mode. - -2003-02-07 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed problem with too many arguments. - -2003-02-04 Andrey Kiselev - - * tools/raw2tiff.c: Memory leak fixed. - -2003-02-03 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: Applied patch from Julien Gaulmin - (thanks, Julien!). More switches for fax2tiff tool for better control - of input and output. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=272 - -2003-02-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Modified to defer initialization of jpeg - library so that we can check if there is already any tile/strip data - before deciding between creating a compressor or a decompressor. - -2003-01-31 Frank Warmerdam - - * libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is - a pre-existing compressed image. That is, image writing to - pre-existing compressed images is not allowed. - - * libtiff/tif_open.c: Removed error if opening a compressed file - in update mode. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=198 - -2003-01-31 Andrey Kiselev - - * config.guess, config.sub: Updated to recent upstream versions. - -2003-01-15 Frank Warmerdam - - * cut 3.6.0 Beta release. - -2002-12-20 Andrey Kiselev - - * tools/fax2ps.c, man/fax2ps.1: Page size was determined - in wrong way as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=239 - -2002-12-17 Frank Warmerdam - - * libtiff/tif_dirread.c: Allow wrong sized arrays in - TIFFFetchStripThing(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=49 - -2002-12-02 Frank Warmerdam - - * libtiff/tif_dir.c: fix problem with test on td_customValueCount. - Was using realloc even first time. Fix by Igor Venevtsev. - -2002-11-30 Frank Warmerdam - - * libtiff/tif_dir.c: fixed bug with resetting an existing custom - field value. - - * libtiff/tif_dir.c: Fixed potential problem with ascii "custom" - tags in TIFFVGetField() ... added missing break. - -2002-10-14 Frank Warmerdam - - * tools/tiff2ps.c: fixes a problem where "tiff2ps -1e" did not make - the scanline buffer long enough when writing rgb triplets. - The scanline needs to be 3 X the number of dots or else it will - contain an incomplete triplet and programs that try to separate - the eps by redefining the colorimage operator will get messed up. - Patch supplied by William Bader. - - * Makefile.in: added tif_extension.c to file list as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=218. - -2002-10-11 Andrey Kiselev - - * configure, config.site, libtiff/{tif_unix.c, Makefile.in}: Fix for - large files (>2GiB) supporting. New option in the config.site: - LARGEFILE="yes". Should be enough for I/O of the large files. - -2002-10-10 Frank Warmerdam - - * libtiff/html/v3.6.0.html: new release notes. - - * libtiff/index.html: removed faq, cvs snapshot cruft. Added email - link for Andrey. Pointer to v3.6.0.html. - - * libtiff/Makefile.in: added direct rule for tiffvers.h for release. - -2002-10-07 Andrey Kiselev - * tools/tiff2ps.c, man/tiff2ps.1: Applied patch form Sebastian Eken - (thanks, Sebastian!). New switches: - -b # for a bottom margin of # inches - -c center image - -l # for a left margin of # inches - -r rotate the image by 180 degrees - New features merged with code for shrinking/overlapping. - Previously added -c and -n switches (for overriding PS units) renamed - in -x and -y respectively. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=200 - - * html/man/*.html: Updated from actual manual pages. - -2002-10-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong - size on windows. Use #define boolean hack. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=188 - - * libtiff/tiff.h: Don't do special type handling in tiff.h unless - USING_VISUALAGE is defined. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2002-10-03 Frank Warmerdam - - * libtiff/tiff.h: added COMPRESSION_JP2000. - -2002-10-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays - by the TIFFFetchByteArray() function. Should finally resolve - - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - - * configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT - - * html/Makefile.in: New targets added: html and groffhtml for - producing HTML representations of the manual pages automatically. - html target uses man2html tool, groffhtml uses groff tool. - -2002-09-29 Frank Warmerdam - - * configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support - from John H. DuBois III. - -2002-09-15 Andrey Kiselev - - * Makefile.in, /man/{raw2tiff.1, Makefile.in, libtiff.3}: Added - manual page for raw2tiff(1) tool. - -2002-09-12 Andrey Kiselev - - * /libtiff/{tiffio.h, tif_dir.h}: TIFFDataWidth() declaration moved to - the tiffio.h header file. - - * Makefile.in, /man/{TIFFDataWidth.3t, Makefile.in, libtiff.3}: Added - manual page for TIFFDataWidth() function - -2002-09-08 Frank Warmerdam - - * libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair() - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=196. - - * tools/tiff2ps.c: Don't emit BeginData/EndData DSC comments - since we are unable to properly include the amount to skip. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=80 - -2002-09-02 Andrey Kiselev - - * /libtiff/tif_dirread.c: Fixed problem with SBYTE type data fetching - in TIFFFetchByteArray(). Problem described at - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - -2002-08-22 Andrey Kiselev - - * /libtiff/tif_dirinfo.c: Further additions to free custom fields - in _TIFFSetupFieldInfo() function. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=169 for details. - - * /libtiff/tif_lzw.c: Additional consistency checking added in - LZWDecode() and LZWDecodeCompat(). - Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=190 - and http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - - * /libtiff/tif_lzw.c: - Added check for valid code lengths in LZWDecode() and - LZWDecodeCompat(). Fixes - http://bugzilla.remotesensing.org/show_bug.cgi?id=115 - -2002-08-16 Andrey Kiselev - - * /libtiff/{Makefile.vc, libtiff.def}: - Missed declarations added. - -2002-08-15 Frank Warmerdam - - * tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the - return code from the underlying pick function. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=177 - - * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap - with FIELD_CUSTOM as mentioned in bug 169. - - * tif_close.c: added logic to free dynamically created anonymous - field definitions to correct a small memory leak. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=169 - -2002-08-10 Andrey Kiselev - - * /tools/{raw2tiff.c, Makefile.in, Makefile.lcc, Makefile.vc}: - New tool: raw2tiff --- raw images to TIFF converter. No manual page yet. - -2002-07-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in - JPEGDecode() as per bugzilla bug (issue 1): - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - - * libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to - fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't - present in the tiff tags. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=168 - - * libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and - TIFFWriteScanline() now set tif_row explicitly in case the codec has - fooled with the value. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - -2002-06-22 Andrey Kiselev - - * /tools/tiff2ps.c: Added workaround for some software that may crash - when last strip of image contains fewer number of scanlines than - specified by the `/Height' variable. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=164 - for explanation. - -2002-06-21 Andrey Kiselev - - * tools/tiff2ps, man/tiff2ps.1: New functionality for tiff2ps utility: - splitting long images in several pages. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=142 for explanation. - Patch granted by John Williams . - -2002-06-11 Frank Warmerdam - - * libtiff/contrib/win95: renamed to contrib/win_dib. Added new - Tiffile.cpp example of converting TIFF files into a DIB on Win32. - This one is described in: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=143 - - * libtiff/tif_ojpeg.c: Major upgrade from Scott. See details at: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=156 - -2002-05-10 Andrey Kiselev - - * tools/tiff2ps: New commandline switches to override resolution - units obtained from the input file. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=131 - -2002-04-26 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declaration. - -2002-04-22 Andrey Kiselev - - * tools/fax2tiff.c: Updated to reflect latest changes in libtiff. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=125 - -2002-04-20 Andrey Kiselev - - * libtiff/tif_open.c: Pointers to custom procedures - in TIFFClientOpen() are checked to be not NULL-pointers. - -2002-04-18 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declarations. - - * libtiff/tif_pixarlog.c: Updated for using tif_tagmethods structure. - -2002-04-16 Andrey Kiselev - - * libtiff/tif_lzw.c: Additional checks for data integrity introduced. - Should finally close - http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-10 Andrey Kiselev - - * tools/tiff2ps: Division by zero fixed. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=88 - -2002-04-09 Andrey Kiselev - - * libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h: - TIFFCheckpointDirectory() routine added. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=124 - - * man/: TIFFWriteDirectory.3t, Makefile.in: Added description - for the new function. - -2002-04-08 Andrey Kiselev - - * libtiff/: tif_codec.c, tif_compress.c, tiffiop.h: Introduced - additional members tif->tif_decodestatus and tif->tif_encodestatus - for correct handling of unconfigured codecs (we should not try to read - data or to define data size without correct codecs). - - * libtiff/tif_getimage.c: The way of codecs checking in TIFFRGBAImageOK - changed. Now it has used tif->tif_decodestatus and - tif->tif_encodestatus. - Should fix http://bugzilla.remotesensing.org/show_bug.cgi?id=119 (in - case of __cvs_8.tif test image). - - * libtiff/: tif_dirinfo.c, tif_dirread.c: Somebody makes a bug in - tif_dirread.c when TIFFCreateAnonFieldInfo was introduced. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=119 in case - of _cvs_00000-00.tif, _cvs_00000-01.tif and _cvs_00000-02.tif. - -2002-04-04 Andrey Kiselev - - * libtiff/: tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat - replaced by warnings. Now libtiff should read corrupted LZW-compressed - files by skipping bad strips. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-03 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Removed some dead code. - - * libtiff/*: Cleanup some warnings. - - * libtiff/tif_dir.c: Fixed bug with count returned by TIFFGetField() - for variable length FIELD_CUSTOM values. Was int * but should be - u_short *. - -2002-04-01 Andrey Kiselev - - * tools/: tifcp.c: Added support for 'Orientation' tag in tiffcp - utility (at cpStripToTile routine). - -2002-03-27 Frank Warmerdam - - * tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=111 - - * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with - passcount set FALSE can be printed (such as TIFFTAG_SOFTWARE). - - * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so - that TIFFTAG_SOFTWARE uses FIELD_CUSTOM as an example. - -2002-03-26 Dwight Kelly - - * libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added get/put code for new tag XMLPACKET as defined - in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec - INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: - CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and - INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9). - -2002-03-26 Andrey Kiselev - - * libtiff/: tif_getimage.c: TIFFReadRGBAStrip and TIFFReadRGBATile - now also uses TIFFRGBAImageOK before reading. This is additional fix - for http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-25 Andrey Kiselev - - * libtiff/: tif_getimage.c: Additional check for supported - codecs added in TIFFRGBAImageOK and TIFFReadRGBAImage now uses - TIFFRGBAImageOK before reading. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-15 Andrey Kiselev - - * libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added routine TIFFDataWidth for determining - TIFFDataType sizes instead of working with tiffDataWidth array - directly. Should prevent out-of-borders bugs in case of unknown or - broken data types. EstimateStripByteCounts routine modified, so it - won't work when tags with unknown sizes founded. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=109 - -2002-03-13 Andrey Kiselev - - * libtiff/tif_getimage.c: Added support for correct handling - `Orientation' tag in gtTileContig. Should be added in other gt* - functions as well, but I have not images for testing yet. Partially - resolves http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - -2002-03-10 Andrey Kiselev - - * libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to - read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION, - TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=99 - -2002-03-08 Andrey Kiselev - - * libtiff/Makefile.in, tools/Makefile.in: Shared library will not - be stripped when installing, utility binaries will do. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - -2002-02-28 Frank Warmerdam - - * man/TIFFGetField: fixed type of TIFFTAG_COPYRIGHT. - - * man/libtiff.3t: added copyright tag info. - -2002-02-11 Frank Warmerdam - - * libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * man/Makefile.in: Patch DESTDIR handling - - http://bugzilla.remotesensing.org/show_bug.cgi?id=95 - - * configure: OpenBSD changes for Sparc64 and DSO version. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=96 - -2002-02-05 Frank Warmerdam - - * config.site/configure: added support for OJPEG=yes option to enable - OJPEG support from config.site. - -2002-01-27 Frank Warmerdam - - * html/document.html: fixed links for TIFf 6 docs. - -2002-01-18 Frank Warmerdam - - * config.guess, config.sub: Updated from ftp.gnu.org/pub/config. - - * libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the - decodestrip function returns anything not greater than zero as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=97 - - * configure: Modify CheckForBigEndian so it can work in a cross - compiled situation. - -2002-01-16 Frank Warmerdam - - * tools/tiffdump.c: include TIFFTAG_JPEGTABLES in tag list. - - * tools/tiffset.c: fix bug in error reporting. - - * tools/tiffcp.c: fix several warnings that show up with -Wall. - -2002-01-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed computation of segment_width for - tiles files to avoid error about it not matching the - cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile - size.") for ITIFF files. Apparently the problem was incorporated since - 3.5.5, presumably during the OJPEG/JPEG work recently. - -2001-12-15 Frank Warmerdam - - * configure, libtiff/Makefile.in: Changes for building on MacOS 10.1. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 - (defined in tiffconf.h - 1 by default) then the RGBA interface - will assume that a fourth extra sample is ASSOCALPHA if the - EXTRASAMPLE value isn't set for it. This changes the behaviour of - the library, but makes it work better with RGBA files produced by - lots of applications that don't mark the alpha values properly. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - http://bugzilla.remotesensing.org/show_bug.cgi?id=65 - -2001-12-12 Frank Warmerdam - - * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to - override those from tiff directory. This makes this work with - ImageGear generated files. - -2001-12-07 Frank Warmerdam - - * html/Makefile.in: added missing images per bug 92. - - * port/Makefile.in: fixed clean target per bug 92. - -2001-11-28 Frank Warmerdam - - * Reissue 3.5.7 release. - - * libtiff/mkversion.c: Fix output of TIFF_VERSION to be - YYYYMMDD so that it is increasing over time. - - * Makefile.in: Ensure that tiffvers.h is regenerated in the - make release target. - - * Makefile.in: added libtiff/tiffvers.h to the release file list. - -2001-11-23 Frank Warmerdam - - * added html/v3.5.7.html, updated html/index.html. - - * Makefile.in: added contrib/addtiffo/tif_ovrcache.{c,h}. - -2001-11-15 Frank Warmerdam - - * configure: fixed test for -lm. - -2001-11-02 Frank Warmerdam - - * Added PHOTOMETRIC_ITULAB as per bug 90. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=90 - -2001-10-10 Frank Warmerdam - - * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, - COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases - in keeping with TIFF 6.0 standard in tiff.h - - http://bugzilla.remotesensing.org/show_bug.cgi?id=83 - -2001-09-26 Frank Warmerdam - - * libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. - Updated TIFFWriteDirectory man page to include TIFFRewriteDirectory. - -2001-09-24 Frank Warmerdam - - * libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=78 - - * libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an - error about LZW not being available. - - * libtiff/tif_dir.c: propagate failure to initialize compression - back from TIFFSetField() as an error status, so applications can - detect failure. - - * libtiff/tif_dir.c: removed the auto replacement of - COMPRESSION_LZW with COMPRESSION_NONE in _TIFFVSetField(). - - * Removed Makefile, tools/Makefile, port/install.sh, man/Makefile - from CVS as they are all supposed to be auto-generated by configure. - -2001-09-22 Frank Warmerdam - - * libtiff/tif_ojpeg.c: new update from Scott. - -2001-09-09 Frank Warmerdam - - * libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to - always use the "safe" version, even if there is a very slight - cost in performance. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=54 - - * libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ - in two places. - - * libtiff/tif_getimage.c: Fixed problem with reading strips or - tiles that don't start on a tile boundary. Fix contributed by - Josep Vallverdu (from HP), and further described in bug 47. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=47 - - * tools/tiff2ps.c: added OJPEG YCbCr to RGB support. - - * libtiff/tif_ojpeg.c: Applied substantial patch from Scott. - -2001-09-06 Frank Warmerdam - - * libtiff/tif_packbits.c: fixed memory overrun error. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=77 - -2001-08-31 Frank Warmerdam - - * libtiff/tif_getimage.c: relax handling of contig case where - there are extra samples that are supposed to be ignored. This - should now work for 8bit greyscale or paletted images. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=75 - -2001-08-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Don't complain for CMYK (separated) - images with more than four samples per pixel. See: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=73 - -2001-08-10 Frank Warmerdam - - * libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() - in TIFFReadRGBATile() to avoid issues in cases of overlapping - buffers. See Bug 69 in Bugzilla. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=69 - - * tools/tiff2rgba.c: fixed getopt() call so that -b works again. - -2001-08-09 Frank Warmerdam - - * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ - when checking for 64 bit architectures as per bugzilla bug 67. - -2001-07-27 Frank Warmerdam - - * man/Makefile.in: add TIFFClientOpen link as per debian submitted - bug 66. - -2001-07-20 Frank Warmerdam - - * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H - has been included. - -2001-07-19 Frank Warmerdam - - * libtiff/tif_open.c: Seek back to zero after failed read, - before writing header. - -2001-07-18 Frank Warmerdam - - * libtiff/tif_ojpeg.c: updates from Scott. Handles colors - much better. Now depends on having patched libjpeg as per - patch in contrib/ojpeg/*. - -2001-07-17 Frank Warmerdam - - * */Makefile.in: added DESTDIR support. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=60 - -2001-07-16 Frank Warmerdam - - * configure, libtiff/Makefile.in: applied OpenBSD patches - as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=61 - -2001-06-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed so that failure is properly - reported by gtTileContig, gtStripContig, gtTileSeparate and - gtStripSeparate. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=51 - - * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare. - Updated bug section of tiffcmp.1 to note tiled file issues. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=53 - -2001-06-22 Frank Warmerdam - - * configure: Changes for DSO generation on AIX provided by - John Marquart . - - * configure, libtiff/Makeifle.in: Modified to build DSOs properly - on Darwin thanks to Robert Krajewski (rpk@alum.mit.edu) and - Keisuke Fujii (fujiik@jlcuxf.kek.jp). - -2001-06-13 Frank Warmerdam - - * tools/tiff2rgba.c: added -n flag to avoid emitting alpha component. - - * man/tiff2rgba.1: new - -2001-05-22 Frank Warmerdam - - * Added tiffset and tif_ojpeg to the dist lists in Makefile.in. - -2001-05-13 Frank Warmerdam - - * libtiff/tools/thumbnail.c: changed default output compression - to packbits from LZW since LZW isn't generally available. - -2001-05-12 Frank Warmerdam - - * libtiff/tif_ojpeg.c: New. - libtiff/tif_jpeg.c, tiffconf.h, tif_getimage.c: changes related - to OJPEG support. - - Scott Marovich supplied OJPEG support. - -2001-05-11 Frank Warmerdam - - * tiff.h: removed, it duplicates libtiff/tiff.h. - -2001-05-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: moved pixar and copyright flags to - ensure everything is in order. - - * libtiff/libtiff.def: added TIFFCreateDirectory and - TIFFDefaultStripSize as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=46 - -2001-05-02 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for - TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to - force use of uint32 counts instead of short counts. - - * libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the - case of writing TIFF_BYTE/TIFF_SBYTE fields. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=43 - -2001-05-01 Frank Warmerdam - - * libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per - bug report http://bugzilla.remotesensing.org/show_bug.cgi?id=44 - -2001-04-05 Frank Warmerdam - - * tiffio.h: removed C++ style comment. - - * configure: fixed up SCRIPT_SH/SHELL handling. - - * Makefile.in: Fixed SCRIPT_SH/SHELL handling. - - * config.guess: documented more variables as per bug 40. - -2001-04-03 Frank Warmerdam - - * configure, *Makefile.in: Various changes to improve configuration - for HP/UX specifically, and also in general. They include: - - Try to handle /usr/bin/sh instead of /bin/sh where necessary. - - Upgrade to HP/UX 10.x+ compiler, linker and dso options. - - Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP - - Use -${MAKEFLAGS} in sub makes from makefiles. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=40 - -2001-04-02 Frank Warmerdam - - * libtiff/tiff.h: Applied hac to try and resolve the problem - with the inttypes.h include file on AIX. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * VERSION: update to 3.5.7 beta in preparation for release. - - * configure/config.site: modified to check if -lm is needed for - MACHDEPLIBS if not supplied by config.site. Needed for Darwin. - - * config.guess: updated wholesale to an FSF version apparently - from 1998 (as opposed to 1994). This is mainly inspired by - providing for MacOS X support. - -2001-03-29 Frank Warmerdam - - * configure, Makefile.in, etc: added support for OPTIMIZER being - set from config.site. - -2001-03-28 Frank Warmerdam - - * fax2ps.c: Helge (libtiff at oldach.net) submitted fix: - - Here's a fix for fax2ps that corrects behaviour for non-Letter paper - sizes. It fixes two problems: - - Without scaling (-S) the fax is now centered on the page size specified - with -H and/or -W. Before, fax2ps was using an obscure and practically - useless algorithm to allocate the image relative to Letter sized paper - which sometime sled to useless whitespace on the paper, while at the - same time cutting of the faxes printable area at the opposite border. - - Second, scaling now preserves aspect ratio, which makes unusual faxes - (in particular short ones) print properly. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=35 - - * tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by - Bruce A. Mallett. See check message for detailed information - on all the changes, including a faster encoder, fixes for level - 2 PostScript, and support for the imagemask operator. - -2001-03-27 Frank Warmerdam - - * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to - "#ifdef LOGLUV_PUBLIC" so it will work with VisualAge on AIX. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2001-03-16 Frank Warmerdam - - * tif_dirinfo.c: moved definition of copyright tag in field list. - Apparently they have to be in sorted order by tag id. - -2001-03-13 Frank Warmerdam - - * tif_getimage.c: Added support for 16bit minisblack/miniswhite - images in RGBA interface. - -2001-03-02 Frank Warmerdam - - * Added TIFFTAG_COPYRIGHT support. - -2001-02-19 Frank Warmerdam - - * Brent Roman contributed updated tiffcp utility (and tiffcp.1) - with support for extracting subimages with the ,n syntax, and also - adding the -b bias removal flag. - -2001-02-16 Frank Warmerdam - - * libtiff/libtiff.def: Brent Roman submitted new version adding - several missing entry points. - - * libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS. - Some sort of weird VMS thing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=31 - - * tif_luv.c/tiff.h/tiffio.h: - New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward - (greg@shutterfly.com). He writes: - - 1) I improved the gamut-mapping function in tif_luv.c for imaginary - colors, because some images were being super-saturated on the input - side and this resulted in some strange color shifts in the output. - - 2) I added a psuedotag in tiff.h to control random dithering during - LogLuv encoding. This is turned off by default for 32-bit LogLuv and - on for 24-bit LogLuv output. Dithering improves the average color - accuracy over the image. - - 3) I added a #define for LOG_LUV_PUBLIC, which is enabled by default in - tiffio.h, to expose internal routines for converting between LogLuv and - XYZ coordinates. This is helpful for writing more efficient, - specialized conversion routines, especially for reading LogLuv files. - - Changes applied with minor edits. - -2001-01-23 Frank Warmerdam - - * tif_fax3.c: keep rw_mode flag internal to fax3 state to remember - whether we are encoding or decoding. This is to ensure graceful - recovery if TIFFClientOpen() discovers an attempt to open a compressed - file for "r+" access, and subsequently close it, as it resets the - tif_mode flag to O_RDONLY in this case to avoid writes, confusing the - compressor's concept of whether it is in encode or decode mode. - -2001-01-08 Mike Welles - - * Makefile.in: Now cleaning up after itself after creating the .tar.gz and .zip - -2001-01-07 Frank Warmerdam - - * html/libtiff.html: Fixed arguments in example for TIFFRGBAImageGet() - as per bug report by Patrick Connor. - -2000-12-28 Frank Warmerdam - - * Added RELEASE-DATE file to release file list. - - * Fixed libtiff/makefile.vc to make tiffvers.h not version.h. - -2000-12-22 Mike Welles - * added link to CVS mirror from index.html - - * updated html/internals.html to note that LZW compression is - not supported by default. - -2000-12-22 Frank Warmerdam - - * updated html/libtiff.html to not point at Niles' old JPL web site - for the man pages, point at www.libtiff.org. - -2000-12-21 Frank Warmerdam - - * libtiff/tif_apple.c: Applied "Carbon" support patches supplied by - Leonard Rosenthol . May interfere - with correct building on older systems. If so, please let me know. - -2000-12-19 Mike Welles - - * Took out LZW Encoding from tif_lzw.c - - * Created HOWTO-RELEASE - - * Created html/v3.5.6.html - - * updated index.html - -2000-12-01 Frank Warmerdam - - * Added patches for EOFB support in tif_fax3.c and tif_fax3.h. - Patches supplied by Frank Cringle - Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif - -2000-11-24 Frank Warmerdam - - * libtiff/Makefile.in: Added an installPrivateHdrs and install-private - target so that the private headers required by libgeotiff can be - installed with the others. They are not installed by default. - - * libtiff/Makefile.in: Added @MACHLIBDEPS@ to LINUXdso and GNULDdso - targets so libtiff.so will be built with an explicit dependency - on libm.so. - - * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to - libtiff.so.3.5.5. - - * libtiff/Makefile.in & configure: Remove all references to the ALPHA - file, or ALPHA version logic. Added stuff about DIST_POINT in - place of DIST_TYPE and the alpha release number stuff. - -2000-11-22 Frank Warmerdam - - * I have applied a patch from Steffen Moeller to - the configure script so that it now accepts the --prefix, and - --exec-prefix directives. - -2000-11-13 Frank Warmerdam - - * I have made a variety of modifications in an effort to ensure the - TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE - file which seems to be updated regularly. - - o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in - version include file. - o renamed version.h to tiffvers.h because we now have to install it - with the public libtiff include files. - o include tiffvers.h in tiffio.h. - o updated tif_version.c to use tiffvers.h. - o Updated Makefile.in accordingly. - - * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=25 - I have updated the win32 detection rules in tiffcomp.h. - -2000-10-20 Frank Warmerdam - - * tif_getimage.c: Fixed RGBA translation for YCbCr images for which - the strip/tile width and height aren't multiples of the sampling size. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=20 - Some patches from Rick LaMont of Dot C Software. - - * Modified tif_packbits.c encoder to avoid compressing more - data than provided if rowsize doesn't factor into provided data - (such as occurs for YCbCr). - -2000-10-19 Frank Warmerdam - - * tools/rgb2ycbcr.c: fixed output strip size to account for vertical - roundup if rows_per_strip not a multiple of vertical sample size. - -2000-10-16 Frank Warmerdam - - * tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - from vandrove@vc.cvut.cz. - - * Modified tif_packbits.c decoding to avoid overrunning the - output buffer, and to issue a warning if data needs to be - discarded. See http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - -2000-10-12 Frank Warmerdam - - * Modified tiff2bw to ensure portions add to 100%, and that - white is properly recovered. - - See bug http://bugzilla.remotesensing.org/show_bug.cgi?id=15 - Patch c/o Stanislav Brabec - -2000-09-30 Frank Warmerdam - - * Modified TIFFClientOpen() to emit an error on an attempt to - open a comperessed file for update (O_RDWR/r+) access. This is - because the compressor/decompressor code gets very confused when - the mode is O_RDWR, assuming this means writing only. See - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13 - -2000-09-27 Frank Warmerdam - - * Added GNULDdso target an`d switched linux and freebsd to use it. - -2000-09-26 Frank Warmerdam - - * Applied patch for 0x0000 sequences in tif_fax3.h's definition - of EXPAND1D() as per bug 11 (from Roman). - -2000-09-25 Frank Warmerdam - * Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve - cygwin compatibility. - - * Applied patch from Roman Shpount to tif_fax3.c. This seems to - be a proper fix to the buffer sizing problem. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=11 - - * Fixed tif_getimage.c to fix overrun bug with YCbCr images without - downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10 - Thanks to Nick Lamb for reporting the - bug and proving the patch. - -2000-09-18 Frank Warmerdam - - * Fixed tif_jpeg.c so avoid destroying the decompressor before - we are done access data thanks to bug report from: - Michael Eckstein . - - * Reverted tif_flush change. - -2000-09-14 Frank Warmerdam - - * tif_flush.c: Changed so that TIFFFlushData() doesn't return an - error when TIFF_BEENWRITING is not set. This ensures that the - directory contents can still be flushed by TIFFFlush(). - -2000-08-14 Frank Warmerdam - - * tif_open.c: Don't set MMAP for O_RDWR files. - - * tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY - so that files opened for update can be strip chopped too. - - * tif_read.c: fixed up bug with files missing rowsperstrip and - the strips per separation fix done a few weeks ago. - -2000-07-17 Frank Warmerdam - - * Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and - SAMPLEFORMAT_COMPLEXINT. - -2000-07-13 Mike Welles - - * index.html, bugs.html: added bugzilla info. - -2000-07-12 Frank Warmerdam - - * tif_read.c: fix subtle bug with determining the number of - rows for strips that are the last strip in a separation but - not the last strip of all in TIFFReadEncodedStrip(). - - * Applied 16/32 bit fix to tif_fax3.c. Fix supplied by - Peter Skarpetis - -2000-06-15 Frank Warmerdam - - * Modified tiffio.h logic with regard to including windows.h. It - won't include it when building with __CYGWIN__. - -2000-05-11 Frank Warmerdam - - * README: update to mention www.libtiff.org, don't list Sam's old - email address. - - * configure: Fixed DSO test for Linux as per patch from - Jan Van Buggenhout . - -2000-04-21 Frank Warmerdam - - * libtiff/tif_dirread.c: Don't use estimate strip byte count for - one tile/strip images with an offset, and byte count of zero. These - could be "unpopulated" images. - -2000-04-18 Frank Warmerdam - - * contrib/addtiffo: Added "averaging" resampling option. - - * tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT. - -Tue Apr 18 16:18:08 2000 Frank Warmerdam - - * tools/Makefile.in: Modified to install properly on SGI. - -2000-04-12 Mike Welles - * configure: Fixed stupid mistake in libc6 test on Linux - -2000-04-04 Mike Welles - * tif_win32.c: Applied patch to fix overreads and ovverwrites - caught by BoundsChecker. From Arvan Pritchard - (untested). - - * tif_getimage.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - - * tif_lzw.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - -2000-03-28 Frank Warmerdam - - * Added contrib/stream (stream io) code submitted by Avi Bleiweiss. - -2000-03-28 Frank Warmerdam *** 3.5.5 release *** - - * fax2ps: Fixed mixup of width and height in bounding box statement - as per submission by Nalin Dahyabhai . - -2000-03-27 Mike Welles - - * fax2ps: Modified printruns to take uint32 instead of uint16. - Patch courtesy of Bernt Herd - -2000-03-20 Mike Welles - - * configure: added test for libc6 for linux targets. Bug reported by - Stanislav Brabec - - * Added 3.5 docs to html/Makefile.in. - Thanks to Stanislav Brabec - - * configure: fixed bugs in sed scripts - (applied sed script s:/@:s;@:;s:/s;;:;: to configure). - fix submitted to Stanislav Brabec - - * tools/iptcutil was not in files list, and wasn't being - added to tar archive. Updated Makefile.in. - -2000-03-17 Frank Warmerdam - - * tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 - conversion for the run arrays. - -2000-03-03 Frank Warmerdam - - * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of - SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c. - -2000-03-02 Frank Warmerdam - - * Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c. - - * Patched tif_fax3.c so that dsp->runs is allocated a bit bigger - to avoid overruns encountered with frle_bug.tif. - -Tue Feb 15 22:01:05 2000 Frank Warmerdam - - * Fixed tools/tiffcmp so that stopondiff testing works. - Patch care of Joseph Orost . - -2000-01-28 - - * Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is - set to 1, and added default (off) setting in tiffconf.h. This - should eventually be set by the configure script somehow. - - The original work on all these 2-4GB changes was done by - Peter Smith (psmith@creo.com). - - * Modified tif_win32.c to support 2-4GB seeks. - - * tentatively changed toff_t to be unsigned instead of signed to - facilitate support for 2-4GB files. - - * Updated a variety of files to use toff_t. Fixed some mixups - between toff_t and tsize_t. - -Fri Jan 28 10:13:49 2000 Frank Warmerdam - - * Largely reimplemented contrib/addtiffo to avoid temp files, - updating the TIFF file in place. Fixed a few other bugs to. - - * Set tif_rawdatasize to zero when freeing raw data buffer in - TIFFWriteDirectory(). - - * Enabled "REWRITE_HACK" in tif_write.c by default. - - * Fix bug in tif_write.c when switching between reading one directory - and writing to another. - - * Made TIFFWriteCheck() public, and added TIFFCreateDirectory() - -Wed Jan 5 12:37:48 2000 Frank Warmerdam - - * Added TIFFmemory(3t) functions to libtiff.def. - -Tue Jan 4 13:39:00 2000 Frank Warmerdam - - * Added libtiff/libtiff.def to TIFFILES distribution list. - -Mon Dec 27 12:13:39 EST 1999 Mike Welles - - * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit). - - * Altered descriptions in tools to reflect "by default" lzw not supported - - * Updated index.html to note lzw compression kit. - -Tue Dec 21 14:01:51 1999 Frank Warmerdam - - * Added fax3sm_winnt.c to distribution list in Makefile.in. - -Tue Dec 21 11:04:45 EST 1999 Mike Welles *** 3.5.4 release *** - - * Added Pixar tag support. Contributed by Phil Beffery - - * Made one more change to tif_dir.c for removal of LZW compression. Also added notice - when LZW compression invoked. - - * Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions - in tools to reflect removal of LZW compression - -Mon Dec 20 18:39:02 EST 1999 Mike Welles - - * Fixed bug that caused LZW (non) compression to segfault. Added - warning about LZW compression removed being removed, and why. - - * Added nostrip to install in tools/Makefile.in so that debugging - symbols are kept. - -Tue Dec 7 12:04:47 EST 1999 Mike Welles - - * Added patch from Ivo Penzar , - supporting Adobe ZIP deflate. Untested. - -Sat Dec 4 15:47:11 1999 Frank Warmerdam - - * Made Packbits the default compression in tools/tiff2rgba.c instead - of LZW. - -Tue Nov 30 14:41:43 1999 Frank Warmerdam *** 3.5.3. release *** - - * Added tif_luv to contrib/djgpp/Makefile.lib. - -Tue Nov 30 14:15:32 EST 1999 Mike Welles - - * Added zip creation to release makefile target - - * Added html for TIFFWriteTile.3t man page. - -Tue Nov 30 09:20:16 1999 Frank Warmerdam - - * Added some changes to tif_write.c to support rewriting existing - fixed sized tiles and strips. Code mods disabled by default, only - enabled if REWRITE_HACK is defined for now. - -Mon Nov 29 11:43:42 1999 Frank Warmerdam - - * Added TIFFWriteTile.3t man page. - -Sun Nov 28 20:36:18 1999 Frank Warmerdam - - * Added notes on use of makefile.vc in build.html, and fixed - email subscription address. - -199-11-28 Mike Welles - - * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c - - * Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, - from Bruce Carmeron -- modifications of - changes made by Frank (sun cc still complained on cast). - - * Added tiffconf.h to install target per request from Bill - Radcliffe : "We need a way for ImageMagick to - know features have been compiled into the TIFF library in order to - handle things properly". - -Sat Nov 27 16:49:21 1999 Frank Warmerdam - - * fixed various VC++ warnings as suggested by Gilles Vollant - . - -Wed Nov 24 12:08:16 1999 Frank Warmerdam - - * Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to - not imply applications are responsible for image data swapping. - -1999-11-22 Mike Welles - * HTML-ized the man pages, added to html/man - - * Removed LZW Compression to comply with Unisys patent extortion. - -1999-09-29 Mike Welles - * Corrected one remaining 16 -> 32 bit value in tif_fax3.c, - From Ivo Penzar - -1999-09-26 Mike Welles *** 3.5.2 release *** - * Corrected alpha versioning. - - * Removed distinction between alpha and release targets in Makefile.in. - - * added release.stamp target, which tags cvs tree, and updates - "RELEASE-DATE" - - * added releasediff target, which diffs tree with source as of - date in "RELEASE-DATE" - - * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving - away from alpha/non-alpha distinctions). - - * updated html to reflect release - -1999-09-23 - - * Set O_BINARY for tif_unix.c open() ... used on cygwin for instance. - - * Added CYGWIN case in configure. - -Fri Sep 17 00:13:51 CEST 1999 Mike Welles - - * Applied Francois Dagand's patch to handle fax decompression bug. - (sizes >= 65536 were failing) - -Tue Sep 14 21:31:43 1999 Frank Warmerdam - - * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested - by Christopher Lawton - -Wed Sep 8 08:19:18 1999 Frank Warmerdam - - * Added IRIX/gcc, and OSF/1 4.x support on behalf of - Albert Chin-A-Young - - * Added TIFFReassignTagToIgnore() API on behalf of - Bruce Cameron . Man page still pending. - -Wed Aug 25 11:39:07 1999 Frank Warmerdam - - * Added test target in Makefile, test_pics.sh script and pics/*.rpt - files to provide for a rudimentary testsuite. - - * Added contrib/tags back from old distribution ... fixed up a bit. - -1999-08-16 - - * Added simple makefile.vc makefiles for building with MS VC++ - on Windows NT/98/95 in console mode. Stuff in contrib/win* make give - better solutions for some users. - -Mon Aug 16 21:52:11 1999 Frank Warmerdam - - * Added addtiffo (add overviews to a TIFF file) in contrib. Didn't - put it in tools since part of it is in C++. - -1999-08-16 Michael L. Welles - - * Updated html/index.html with anon CVS instructions. - -Mon Aug 16 13:18:41 1999 Frank Warmerdam - - * pre-remove so link before softlink in LINUXdso action in - libtiff/Makefile.in to avoid failure on LINUXdso builds other than - the first. - - * Fixed problem with cvtcmap() in tif_getimage.c modifying the - colormaps owned by the TIFF handle itself when trying to fixup wrong - (eight bit) colormaps. Corrected by maintaining a private copy of - the colormap. - - * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in - tif_getimage.c. - - * CVS Repository placed at remotesensing.org. ChangeLog added. diff --git a/third_party/libtiff/HOWTO-RELEASE b/third_party/libtiff/HOWTO-RELEASE deleted file mode 100644 index 02455e9..0000000 --- a/third_party/libtiff/HOWTO-RELEASE +++ /dev/null @@ -1,155 +0,0 @@ -HOWTO-RELEASE: - -Notes on releasing. - -0. Make sure that you have current FSF releases of autoconf, automake, - and libtool packages installed under a common installation prefix - and that these tools are in your executable search path prior to - any other installed versions. Versions delivered with Linux may be - altered so it is best to install official FSF releases. GNU 'm4' - 1.4.16 is needed in order to avoid bugs in m4. These packages may - be downloaded from the following ftp locations: - - m4 - ftp://ftp.gnu.org/pub/gnu/m4 - autoconf - ftp://ftp.gnu.org/pub/gnu/autoconf - automake - ftp://ftp.gnu.org/pub/gnu/automake - libtool - ftp://ftp.gnu.org/pub/gnu/libtool - - It is recommended to install m4 before autoconf, since the later - requires the former. - - Release builds should only be done on a system with a functioning - and correctly set system clock and on a filesystem which accurately - records file update times. Use of GNU make is recommended. - -1. Commit any unsaved changes. - -2. Use gnulib's gitlog-to-changelog script to add new (since the last - release) entries to the traditional ChangeLog file. - - http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog - - Take note of - the most recent change note time stamp and use that as the starting - point. Concatenate the old logs to the new logs. The added logs - may be used to help produce the release notes (in next step). For - example: - - gitlog-to-changelog --since=`head -n 1 ChangeLog | sed -e 's/ .*//g'` --append-dot > ChangeLog.added - printf "\n" >> ChangeLog.added - cat ChangeLog.added ChangeLog > ChangeLog.new - mv ChangeLog.new ChangeLog - rm ChangeLog.added - -3. Create doc/releases/vX.X.rst and add it to git with 'git add doc/releases/vX.X.rst'. - Update doc/releases/index.rst to point to the new file - Take ChangeLog entries and rst-ify in there. - Easiest thing to do is take doc/releases/vX.(X-1).rst and use it as a template. - -4. Add vX.X.rst file to the list of 'rst_sources' files in the doc/Makefile.am. - -5. Update "Latest Stable Release" in doc/index.rst. - -6. Increment the release version in configure.ac. Put 'alpha' or - 'beta' after the version, if applicable. For example: - - 4.0.0 - or - 4.0.0beta7 - - Version should be updated in two places: in the second argument of the - AC_INIT macro and in LIBTIFF_xxx_VERSION variables. - -7. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT, - LIBTIFF_REVISION, and LIBTIFF_AGE). These numbers have nothing to - do with the libtiff release version numbers. - - Note that as of libtiff 4.X, proper ELF versioning is used so - please follow the rules listed in configure.ac. At a bare minimum, - you should increment LIBTIFF_REVISION for each release so that - installed library files don't overwrite existing files. If APIs - have been added, removed, or interface structures have changed, - then more care is required. - -8. Add an entry to Changelog similar to: - - * libtiff 4.0.0 released. - -9. In the source tree do - - ./autogen.sh - - This step may be skipped if you have already been using a - maintainer build with current autoconf, automake, and libtool - packages. It is only needed when updating tool versions. - -10. It is recommended (but not required) to build outside of the source - tree so that the source tree is kept in a pristine state. This - also allows sharing the source directory on several networked - systems. For example: - - mkdir libtiff-build - cd libtiff-build - /path/to/libtiff/configure --enable-maintainer-mode - - otherwise do - - ./configure --enable-maintainer-mode - -11. In the build tree do - - make release - - This will update "RELEASE-DATE", "VERSION" in the source tree, - and libtiff/tiffvers.h in the build tree. - -12. In the source tree, verify that the version info in RELEASE-DATE, - VERSION is right. - In the build tree, verify that the version info in - libtiff/tiffvers.h is right. - -13. In the build tree do - - make - make distcheck - - If 'make distcheck' fails, then correct any issues until it - succeeds. - - Two files with names tiff-version.tar.gz and tiff-version.zip will - be created in the top level build directory. - -14. In the source tree do - - 'git status', 'git add .', 'git commit' and 'git push' - -15. In the source tree, create a signed tag - - git tag -s v4.0.0 -m "Create tag for v4.0.0" - - (or the appropriate name for the release) - - and push it to "origin" (if "origin" points to the official repository) - - git push origin v4.0.0 - -16. Sign the release files in the build tree using your private key - - export GPG_TTY=$(tty) - for file in tiff-*.tar.gz tiff-*.tar.xz tiff-*.zip ; do \ - gpg2 --output ${file}.sig --detach-sig $file ; \ - done - - for file in tiff-*.tar.gz tiff-*.tar.xz tiff-*.zip ; do \ - gpg2 --verify ${file}.sig $file ; \ - done - -17. Copy release packages from the build tree to the - ftp.remotesensing.org ftp site. - - scp tiff-*.tar.gz tiff-*.tar.gz.sig tiff-*.tar.xz tiff-*.tar.xz.sig tiff-*.zip tiff-*.zip.sig \ - bfriesen@upload.osgeo.org:/osgeo/download/libtiff - -18. Create a gitlab release at https://gitlab.com/libtiff/libtiff/-/releases - -19. Announce to list: tiff@lists.osgeo.org diff --git a/third_party/libtiff/LICENSE.md b/third_party/libtiff/LICENSE.md deleted file mode 100644 index 7d456f6..0000000 --- a/third_party/libtiff/LICENSE.md +++ /dev/null @@ -1,50 +0,0 @@ -# LibTIFF license - -Copyright © 1988-1997 Sam Leffler\ -Copyright © 1991-1997 Silicon Graphics, Inc. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. - -# Lempel-Ziv & Welch Compression (tif_lzw.c) license -The code of tif_lzw.c is derived from the compress program whose code is -derived from software contributed to Berkeley by James A. Woods, -derived from original work by Spencer Thomas and Joseph Orost. - -The original Berkeley copyright notice appears below in its entirety: - -Copyright (c) 1985, 1986 The Regents of the University of California. -All rights reserved. - -This code is derived from software contributed to Berkeley by -James A. Woods, derived from original work by Spencer Thomas -and Joseph Orost. - -Redistribution and use in source and binary forms are permitted -provided that the above copyright notice and this paragraph are -duplicated in all such forms and that any documentation, -advertising materials, and other materials related to such -distribution and use acknowledge that the software was developed -by the University of California, Berkeley. The name of the -University may not be used to endorse or promote products derived -from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - diff --git a/third_party/libtiff/Makefile.am b/third_party/libtiff/Makefile.am deleted file mode 100644 index ff7dc2e..0000000 --- a/third_party/libtiff/Makefile.am +++ /dev/null @@ -1,94 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -docdir = $(LIBTIFF_DOCDIR) - -AUTOMAKE_OPTIONS = 1.11 dist-zip foreign -ACLOCAL_AMFLAGS = -I m4 - -docfiles = \ - ChangeLog \ - LICENSE.md \ - README.md \ - RELEASE-DATE \ - TODO \ - VERSION - -EXTRA_DIST = \ - placeholder.h \ - cmake \ - CMakeLists.txt \ - HOWTO-RELEASE \ - autogen.sh \ - libtiff-4.pc.in - -if TIFF_DOCS -dist_doc_DATA = $(docfiles) -endif - -distcheck-hook: - if [ -x "$(CMAKE)" ]; then \ - mkdir $(distdir)/_build/cmake \ - && cd $(distdir)/_build/cmake \ - && cmake -Dsphinx=OFF ../.. \ - && $(MAKE) \ - && ctest -V \ - && $(MAKE) DESTDIR=../../_inst/cmake install ; \ - fi - rm -rf $(distdir)/_build/cmake - rm -rf $(distdir)/_inst/cmake - -SUBDIRS = port libtiff tools build contrib test doc - - -NEW_LIBTIFF_RELEASE_DATE=$(shell date +"%Y%m%d") - -release: - @(echo --- Setting release date to $(NEW_LIBTIFF_RELEASE_DATE) and release version to $(LIBTIFF_VERSION) ---) - (rm -f $(top_srcdir)/RELEASE-DATE && echo $(NEW_LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE) - (rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION) - (rm -f $(top_builddir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(NEW_LIBTIFF_RELEASE_DATE),;s,LIBTIFF_MAJOR_VERSION,$(LIBTIFF_MAJOR_VERSION),;s,LIBTIFF_MINOR_VERSION,$(LIBTIFF_MINOR_VERSION),;s,LIBTIFF_MICRO_VERSION,$(LIBTIFF_MICRO_VERSION),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_builddir)/libtiff/tiffvers.h && sed -i 's,@,,g' $(top_builddir)/libtiff/tiffvers.h) - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libtiff-4.pc - -# Special rules to assist with Coverity submissions. -PACKAGE_CHANGE_DATE=`awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog` -COVERITY_EMAIL=bfriesen@simple.dallas.tx.us -COVERITY_TARBALL=libtiff.xz -COVERITY_VERSION=devel-${PACKAGE_CHANGE_DATE} -COVERITY_DESCRIPTION='libtiff development' -coverity: - $(MAKE) clean - cov-build --dir cov-int $(MAKE) - tar caf $(COVERITY_TARBALL) cov-int - curl --limit-rate 50K \ - --form token=`cat $$HOME/.coverity_key_tiff` \ - --form email=$(COVERITY_EMAIL) \ - --form file=@$(COVERITY_TARBALL) \ - --form version=$(COVERITY_VERSION) \ - --form description=$(COVERITY_DESCRIPTION) \ - https://scan.coverity.com/builds?project=tiff - $(RM) $(COVERITY_TARBALL) diff --git a/third_party/libtiff/Makefile.in b/third_party/libtiff/Makefile.in deleted file mode 100644 index c258abc..0000000 --- a/third_party/libtiff/Makefile.in +++ /dev/null @@ -1,1023 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__dist_doc_DATA_DIST) \ - $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = libtiff-4.pc -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__dist_doc_DATA_DIST = ChangeLog LICENSE.md README.md RELEASE-DATE \ - TODO VERSION -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" -DATA = $(dist_doc_DATA) $(pkgconfig_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \ - $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ - $(top_srcdir)/config/config.h.in \ - $(top_srcdir)/config/config.sub \ - $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ - $(top_srcdir)/config/missing ChangeLog TODO config/compile \ - config/config.guess config/config.sub config/install-sh \ - config/ltmain.sh config/missing -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz $(distdir).zip -GZIP_ENV = --best -DIST_TARGETS = dist-xz dist-gzip dist-zip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = $(LIBTIFF_DOCDIR) -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.11 dist-zip foreign -ACLOCAL_AMFLAGS = -I m4 -docfiles = \ - ChangeLog \ - LICENSE.md \ - README.md \ - RELEASE-DATE \ - TODO \ - VERSION - -EXTRA_DIST = \ - placeholder.h \ - cmake \ - CMakeLists.txt \ - HOWTO-RELEASE \ - autogen.sh \ - libtiff-4.pc.in - -@TIFF_DOCS_TRUE@dist_doc_DATA = $(docfiles) -SUBDIRS = port libtiff tools build contrib test doc -NEW_LIBTIFF_RELEASE_DATE = $(shell date +"%Y%m%d") -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libtiff-4.pc - -# Special rules to assist with Coverity submissions. -PACKAGE_CHANGE_DATE = `awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog` -COVERITY_EMAIL = bfriesen@simple.dallas.tx.us -COVERITY_TARBALL = libtiff.xz -COVERITY_VERSION = devel-${PACKAGE_CHANGE_DATE} -COVERITY_DESCRIPTION = 'libtiff development' -all: all-recursive - -.SUFFIXES: -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config/config.h: config/stamp-h1 - @test -f $@ || rm -f config/stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1 - -config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status - @rm -f config/stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config/config.h -$(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f config/stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config/config.h config/stamp-h1 -libtiff-4.pc: $(top_builddir)/config.status $(srcdir)/libtiff-4.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-dist_docDATA install-pkgconfigDATA - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-am clean clean-cscope clean-generic \ - clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-dist_docDATA \ - uninstall-pkgconfigDATA - -.PRECIOUS: Makefile - - -distcheck-hook: - if [ -x "$(CMAKE)" ]; then \ - mkdir $(distdir)/_build/cmake \ - && cd $(distdir)/_build/cmake \ - && cmake -Dsphinx=OFF ../.. \ - && $(MAKE) \ - && ctest -V \ - && $(MAKE) DESTDIR=../../_inst/cmake install ; \ - fi - rm -rf $(distdir)/_build/cmake - rm -rf $(distdir)/_inst/cmake - -release: - @(echo --- Setting release date to $(NEW_LIBTIFF_RELEASE_DATE) and release version to $(LIBTIFF_VERSION) ---) - (rm -f $(top_srcdir)/RELEASE-DATE && echo $(NEW_LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE) - (rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION) - (rm -f $(top_builddir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(NEW_LIBTIFF_RELEASE_DATE),;s,LIBTIFF_MAJOR_VERSION,$(LIBTIFF_MAJOR_VERSION),;s,LIBTIFF_MINOR_VERSION,$(LIBTIFF_MINOR_VERSION),;s,LIBTIFF_MICRO_VERSION,$(LIBTIFF_MICRO_VERSION),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_builddir)/libtiff/tiffvers.h && sed -i 's,@,,g' $(top_builddir)/libtiff/tiffvers.h) -coverity: - $(MAKE) clean - cov-build --dir cov-int $(MAKE) - tar caf $(COVERITY_TARBALL) cov-int - curl --limit-rate 50K \ - --form token=`cat $$HOME/.coverity_key_tiff` \ - --form email=$(COVERITY_EMAIL) \ - --form file=@$(COVERITY_TARBALL) \ - --form version=$(COVERITY_VERSION) \ - --form description=$(COVERITY_DESCRIPTION) \ - https://scan.coverity.com/builds?project=tiff - $(RM) $(COVERITY_TARBALL) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/README.md b/third_party/libtiff/README.md deleted file mode 100644 index f59822a..0000000 --- a/third_party/libtiff/README.md +++ /dev/null @@ -1,70 +0,0 @@ -TIFF Software Distribution --------------------------- -This file is just a placeholder; the entire documentation is now located -as reStructuredText in the doc directory. To view the documentation -as HTML, visit https://libtiff.gitlab.io/libtiff/ or -http://www.simplesystems.org/libtiff/ or within the release package -in the doc/html-prebuilt directory. The manual pages are -located at doc/man-prebuilt. - -The release package can be downloaded at - -http://download.osgeo.org/libtiff/ - -If you can't hack either of these options then basically what you -want to do is: - - % ./configure - % make - % su - # make install - -More information, email contacts, and mailing list information can be -found online at http://www.simplesystems.org/libtiff/ - -Source code repository ----------------------- - -[GitLab](https://gitlab.com/libtiff/libtiff) - -Bug database ------------- - -[GitLab issues](https://gitlab.com/libtiff/libtiff/issues) - -Previously, the project used -[Bugzilla](http://bugzilla.maptools.org/buglist.cgi?product=libtiff). This -is no longer in use, and all remaining issues have been migrated to GitLab. - -Use and Copyright ------------------ -Silicon Graphics has seen fit to allow us to give this work away. It -is free. There is no support or guarantee of any sort as to its -operations, correctness, or whatever. If you do anything useful with -all or parts of it you need to honor the copyright notices. I would -also be interested in knowing about it and, hopefully, be acknowledged. - -The legal way of saying that is: - -Copyright (c) 1988-1997 Sam Leffler -Copyright (c) 1991-1997 Silicon Graphics, Inc. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. - diff --git a/third_party/libtiff/RELEASE-DATE b/third_party/libtiff/RELEASE-DATE deleted file mode 100644 index cc3bc45..0000000 --- a/third_party/libtiff/RELEASE-DATE +++ /dev/null @@ -1 +0,0 @@ -20250911 diff --git a/third_party/libtiff/TODO b/third_party/libtiff/TODO deleted file mode 100644 index ea266aa..0000000 --- a/third_party/libtiff/TODO +++ /dev/null @@ -1,10 +0,0 @@ -o gif2tiff segaulting on selected images -o tiffcmp read data by strip/tile instead of scanline -o YCbCr sampling support -o extracate colorspace conversion support -o look at isolating all codecs from TIFF library -o JPEG colormode order dependency problem -o Write documentation on how do extend tags, and how the custom field - stuff all works. - - diff --git a/third_party/libtiff/VERSION b/third_party/libtiff/VERSION deleted file mode 100644 index 7c66fca..0000000 --- a/third_party/libtiff/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.7.1 diff --git a/third_party/libtiff/aclocal.m4 b/third_party/libtiff/aclocal.m4 deleted file mode 100644 index 9299d04..0000000 --- a/third_party/libtiff/aclocal.m4 +++ /dev/null @@ -1,1177 +0,0 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# Copyright (C) 2002-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - AS_CASE([$CONFIG_FILES], - [*\'*], [eval set x "$CONFIG_FILES"], - [*], [set x $CONFIG_FILES]) - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`AS_DIRNAME(["$am_mf"])` - am_filepart=`AS_BASENAME(["$am_mf"])` - AM_RUN_LOG([cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles]) || am_rc=$? - done - if test $am_rc -ne 0; then - AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking).]) - fi - AS_UNSET([am_dirpart]) - AS_UNSET([am_filepart]) - AS_UNSET([am_mf]) - AS_UNSET([am_rc]) - rm -f conftest-deps.mk -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking is enabled. -# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -# order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check whether make has an 'include' directive that can support all -# the idioms we need for our automatic dependency tracking code. -AC_DEFUN([AM_MAKE_INCLUDE], -[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) - AS_CASE([$?:`cat confinc.out 2>/dev/null`], - ['0:this is the am__doit target'], - [AS_CASE([$s], - [BSD], [am__include='.include' am__quote='"'], - [am__include='include' am__quote=''])]) - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -AC_MSG_RESULT([${_am_result}]) -AC_SUBST([am__include])]) -AC_SUBST([am__quote])]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2018 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/acinclude.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/third_party/libtiff/autogen.sh b/third_party/libtiff/autogen.sh deleted file mode 100644 index 32ab8ac..0000000 --- a/third_party/libtiff/autogen.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -retval=0 - -set -x - -autoreconf --install --force || retval=$? - -# Get latest config.guess and config.sub from upstream master since -# these are often out of date. This requires network connectivity and -# sometimes the site is down, a failure here does not result in -# failure of the whole script. -for file in config.guess config.sub -do - echo "$0: getting $file..." - wget --timeout=5 -O config/$file.tmp \ - "https://git.savannah.gnu.org/cgit/config.git/plain/${file}" \ - && mv -f config/$file.tmp config/$file \ - && chmod a+x config/$file - rm -f config/$file.tmp -done - -exit $retval diff --git a/third_party/libtiff/build/CMakeLists.txt b/third_party/libtiff/build/CMakeLists.txt deleted file mode 100644 index 756fb71..0000000 --- a/third_party/libtiff/build/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. diff --git a/third_party/libtiff/build/Makefile.am b/third_party/libtiff/build/Makefile.am deleted file mode 100644 index c912a42..0000000 --- a/third_party/libtiff/build/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2007, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - CMakeLists.txt \ - README - -SUBDIRS = - diff --git a/third_party/libtiff/build/Makefile.in b/third_party/libtiff/build/Makefile.in deleted file mode 100644 index 1881294..0000000 --- a/third_party/libtiff/build/Makefile.in +++ /dev/null @@ -1,692 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2007, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = build -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - CMakeLists.txt \ - README - -SUBDIRS = -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu build/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu build/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/build/README b/third_party/libtiff/build/README deleted file mode 100644 index f765efc..0000000 --- a/third_party/libtiff/build/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains scripts and tools needed to build libtiff library -and its utilities in various environments. - diff --git a/third_party/libtiff/cmake/AutotoolsCompat.cmake b/third_party/libtiff/cmake/AutotoolsCompat.cmake deleted file mode 100644 index e89b0e2..0000000 --- a/third_party/libtiff/cmake/AutotoolsCompat.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# Autotools compatibility -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# For autotools header compatibility -set(PACKAGE_NAME "LibTIFF Software") -set(PACKAGE_TARNAME "${PROJECT_NAME}") -set(PACKAGE_VERSION "${PROJECT_VERSION}${LIBTIFF_ALPHA_VERSION}") -set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") -set(PACKAGE_BUGREPORT "tiff@lists.osgeo.org") diff --git a/third_party/libtiff/cmake/AutotoolsVersion.cmake b/third_party/libtiff/cmake/AutotoolsVersion.cmake deleted file mode 100644 index f93f5cf..0000000 --- a/third_party/libtiff/cmake/AutotoolsVersion.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Read version information from configure.ac. -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# Get version from configure.ac -FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" configure REGEX "^LIBTIFF_.*=") -foreach(line ${configure}) - foreach(var LIBTIFF_MAJOR_VERSION LIBTIFF_MINOR_VERSION LIBTIFF_MICRO_VERSION LIBTIFF_ALPHA_VERSION - LIBTIFF_CURRENT LIBTIFF_REVISION LIBTIFF_AGE) - if(NOT ${var} AND line MATCHES "^${var}=(.*)") - set(${var} "${CMAKE_MATCH_1}") - break() - endif() - endforeach() -endforeach() - -# Package version -set(LIBTIFF_VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}") -set(LIBTIFF_VERSION_FULL "${LIBTIFF_VERSION}${LIBTIFF_ALPHA_VERSION}") - -# Get release version from file VERSION -FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" LIBTIFF_RELEASE_VERSION) - -# Package date - get it from file RELEASE-DATE -FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/RELEASE-DATE" LIBTIFF_RELEASE_DATE) - -# Convert the libtool version variables to proper major and minor versions -math(EXPR SO_MAJOR "${LIBTIFF_CURRENT} - ${LIBTIFF_AGE}") -set(SO_MINOR "${LIBTIFF_AGE}") -set(SO_REVISION "${LIBTIFF_REVISION}") - -# Library version (unlike libtool's baroque scheme, WYSIWYG here) -set(SO_COMPATVERSION "${SO_MAJOR}") -set(SO_VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}") diff --git a/third_party/libtiff/cmake/CXXLibrary.cmake b/third_party/libtiff/cmake/CXXLibrary.cmake deleted file mode 100644 index 3491c4c..0000000 --- a/third_party/libtiff/cmake/CXXLibrary.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# C++ library option -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# C++ support -option(tiff-cxx "Enable C++ stream API building (requires C++ compiler)" ON) -set(CXX_SUPPORT FALSE) -if (tiff-cxx) - enable_language(CXX) - set(CXX_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/CompilerChecks.cmake b/third_party/libtiff/cmake/CompilerChecks.cmake deleted file mode 100644 index 8ac5564..0000000 --- a/third_party/libtiff/cmake/CompilerChecks.cmake +++ /dev/null @@ -1,124 +0,0 @@ -# Compiler feature checks -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include(CheckCCompilerFlag) - - -# These are annoyingly verbose, produce false positives or don't work -# nicely with all supported compiler versions, so are disabled unless -# explicitly enabled. -option(extra-warnings "Enable extra compiler warnings" OFF) - -# This will cause the compiler to fail when an error occurs. -option(fatal-warnings "Compiler warnings are errors" OFF) - -# Check if the compiler supports each of the following additional -# flags, and enable them if supported. This greatly improves the -# quality of the build by checking for a number of common problems, -# some of which are quite serious. -if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR - CMAKE_C_COMPILER_ID MATCHES "Clang") - set(test_flags - -Wall - -Winline - -Wformat-security - -Wpointer-arith - -Wdisabled-optimization - -Wno-unknown-pragmas - -fstrict-aliasing) - if(extra-warnings) - list(APPEND test_flags - -pedantic - -Wextra - -Wformat - -Wformat-overflow - -Wformat-nonliteral - -Wformat-signedness - -Wformat-truncation - -Wdeclaration-after-statement - -Wconversion - -Wsign-conversion - -Wnull-dereference - -Wdouble-promotion - -Wmisleading-indentation - -Wmissing-include-dirs - -Wswitch-default - -Wswitch-enum - -Wunused-local-typedefs - -Wunused-parameter - -Wuninitialized - -Warith-conversion - -Wbool-operation - -Wduplicated-branches - -Wduplicated-cond - -Wshadow - -Wunused-macros - -Wc99-c11-compat - -Wcast-qual - -Wcast-align - -Wwrite-strings - -Wdangling-else - -Wsizeof-array-div - -Wsizeof-pointer-div - -Wsizeof-pointer-memaccess - -Wlogical-op - -Wlogical-not-parentheses - -Wstrict-prototypes - -Wmissing-declarations - -Wredundant-decls - -Wno-int-to-pointer-cast - -Wfloat-equal - -Wfloat-conversion - -Wmissing-prototypes - -Wunreachable-code) - endif() - if(fatal-warnings) - list(APPEND test_flags - -Werror) - endif() -elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") - set(test_flags) - if(extra-warnings) - list(APPEND test_flags - /W4) - else() - list(APPEND test_flags - /W3) - endif() - if (fatal-warnings) - list(APPEND test_flags - /WX) - endif() -endif() - -foreach(flag ${test_flags}) - string(REGEX REPLACE "[^A-Za-z0-9]" "_" flag_var "${flag}") - set(test_c_flag "C_FLAG${flag_var}") - CHECK_C_COMPILER_FLAG(${flag} "${test_c_flag}") - if (${test_c_flag}) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") - endif (${test_c_flag}) -endforeach(flag ${test_flags}) diff --git a/third_party/libtiff/cmake/DeflateCodec.cmake b/third_party/libtiff/cmake/DeflateCodec.cmake deleted file mode 100644 index b6ccbd2..0000000 --- a/third_party/libtiff/cmake/DeflateCodec.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Checks for deflate codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# ZLIB -set(ZLIB_SUPPORT FALSE) -if(TARGET ZLIB::ZLIB) - set(ZLIB_FOUND TRUE) -else() - find_package(ZLIB) -endif() -option(zlib "use zlib (required for Deflate compression)" ${ZLIB_FOUND}) -if(zlib AND ZLIB_FOUND) - set(ZLIB_SUPPORT TRUE) -endif() -set(ZIP_SUPPORT ${ZLIB_SUPPORT}) - -# libdeflate -set(LIBDEFLATE_SUPPORT FALSE) -find_package(Deflate) -option(libdeflate "use libdeflate (optional for faster Deflate support, still requires zlib)" ${Deflate_FOUND}) -if (libdeflate AND Deflate_FOUND AND ZIP_SUPPORT) - set(LIBDEFLATE_SUPPORT TRUE) -endif() -if(Deflate_FOUND AND NOT ZIP_SUPPORT) - message(WARNING "libdeflate available but zlib is not. libdeflate cannot be used") -endif() diff --git a/third_party/libtiff/cmake/FindCMath.cmake b/third_party/libtiff/cmake/FindCMath.cmake deleted file mode 100644 index ad92218..0000000 --- a/third_party/libtiff/cmake/FindCMath.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindCMath --------- - -Find the native CMath includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``CMath::CMath``, if -CMath has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - CMath_INCLUDE_DIRS - Where to find math.h - CMath_LIBRARIES - List of libraries when using CMath. - CMath_FOUND - True if CMath found. - -#]=======================================================================] - - -include(CheckSymbolExists) -include(CheckLibraryExists) - -check_symbol_exists(pow "math.h" CMath_HAVE_LIBC_POW) -find_library(CMath_LIBRARY NAMES m) - -if(NOT CMath_HAVE_LIBC_POW) - set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMath_LIBRARY}) - check_symbol_exists(pow "math.h" CMath_HAVE_LIBM_POW) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) -endif() - -set(CMath_pow FALSE) -if(CMath_HAVE_LIBC_POW OR CMath_HAVE_LIBM_POW) - set(CMath_pow TRUE) -endif() - -set(CMath_INCLUDE_DIRS) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(CMath REQUIRED_VARS CMath_pow) - -if(CMath_FOUND) - if(NOT CMath_INCLUDE_DIRS) - set(CMath_INCLUDE_DIRS) - endif() - if(NOT CMath_LIBRARIES) - if (CMath_LIBRARY) - set(CMath_LIBRARIES ${CMath_LIBRARY}) - endif() - endif() - - if(NOT TARGET CMath::CMath) - if(CMath_LIBRARIES) - add_library(CMath::CMath UNKNOWN IMPORTED) - set_target_properties(CMath::CMath PROPERTIES - IMPORTED_LOCATION "${CMath_LIBRARY}") - else() - add_library(CMath::CMath INTERFACE IMPORTED) - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/FindDeflate.cmake b/third_party/libtiff/cmake/FindDeflate.cmake deleted file mode 100644 index 3d606aa..0000000 --- a/third_party/libtiff/cmake/FindDeflate.cmake +++ /dev/null @@ -1,115 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindDeflate --------- - -Find the native Deflate includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``Deflate::Deflate``, if -Deflate has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - Deflate_INCLUDE_DIRS - where to find deflate.h, etc. - Deflate_LIBRARIES - List of libraries when using deflate. - Deflate_FOUND - True if deflate found. - -:: - - Deflate_VERSION_STRING - The version of deflate found (x.y.z) - Deflate_VERSION_MAJOR - The major version of deflate - Deflate_VERSION_MINOR - The minor version of deflate - - Debug and Release variants are found separately. -#]=======================================================================] - -# Standard names to search for -set(Deflate_NAMES deflate deflatestatic) -set(Deflate_NAMES_DEBUG deflated deflatestaticd) - -find_path(Deflate_INCLUDE_DIR - NAMES libdeflate.h - PATH_SUFFIXES include) - -set(Deflate_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") -# Library has a "lib" prefix even on Windows. -set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") - -# Allow Deflate_LIBRARY to be set manually, as the location of the deflate library -if(NOT Deflate_LIBRARY) - find_library(Deflate_LIBRARY_RELEASE - NAMES ${Deflate_NAMES} - PATH_SUFFIXES lib) - find_library(Deflate_LIBRARY_DEBUG - NAMES ${Deflate_NAMES_DEBUG} - PATH_SUFFIXES lib) - - include(SelectLibraryConfigurations) - select_library_configurations(Deflate) -endif() - -set(CMAKE_FIND_LIBRARY_PREFIXES "${Deflate_OLD_FIND_LIBRARY_PREFIXES}") - -unset(Deflate_NAMES) -unset(Deflate_NAMES_DEBUG) -unset(Deflate_OLD_FIND_LIBRARY_PREFIXES) - -mark_as_advanced(Deflate_INCLUDE_DIR) - -if(Deflate_INCLUDE_DIR AND EXISTS "${Deflate_INCLUDE_DIR}/libdeflate.h") - file(STRINGS "${Deflate_INCLUDE_DIR}/libdeflate.h" Deflate_H REGEX "^#define[\t ]+LIBDEFLATE_VERSION_STRING[\t ]+.*") - string(REGEX REPLACE "^.*LIBDEFLATE_VERSION_STRING[\t ]+\"([0-9]+).*$" "\\1" Deflate_MAJOR_VERSION "${Deflate_H}") - string(REGEX REPLACE "^.*LIBDEFLATE_VERSION_STRING[\t ]\"[0-9]+\\.([0-9]+).*$" "\\1" Deflate_MINOR_VERSION "${Deflate_H}") - set(Deflate_VERSION_STRING "${Deflate_MAJOR_VERSION}.${Deflate_MINOR_VERSION}") - - set(Deflate_VERSION_MAJOR "${Deflate_MAJOR_VERSION}") - set(Deflate_VERSION_MINOR "${Deflate_MINOR_VERSION}") -endif() - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Deflate - REQUIRED_VARS Deflate_LIBRARY Deflate_INCLUDE_DIR - VERSION_VAR Deflate_VERSION_STRING) - -if(Deflate_FOUND) - set(Deflate_INCLUDE_DIRS ${Deflate_INCLUDE_DIR}) - - if(NOT Deflate_LIBRARIES) - set(Deflate_LIBRARIES ${Deflate_LIBRARY}) - endif() - - if(NOT TARGET Deflate::Deflate) - add_library(Deflate::Deflate UNKNOWN IMPORTED) - set_target_properties(Deflate::Deflate PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${Deflate_INCLUDE_DIRS}") - - if(Deflate_LIBRARY_RELEASE) - set_property(TARGET Deflate::Deflate APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(Deflate::Deflate PROPERTIES - IMPORTED_LOCATION_RELEASE "${Deflate_LIBRARY_RELEASE}") - endif() - - if(Deflate_LIBRARY_DEBUG) - set_property(TARGET Deflate::Deflate APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(Deflate::Deflate PROPERTIES - IMPORTED_LOCATION_DEBUG "${Deflate_LIBRARY_DEBUG}") - endif() - - if(NOT Deflate_LIBRARY_RELEASE AND NOT Deflate_LIBRARY_DEBUG) - set_target_properties(Deflate::Deflate PROPERTIES - IMPORTED_LOCATION "${Deflate_LIBRARY}") - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/FindJBIG.cmake b/third_party/libtiff/cmake/FindJBIG.cmake deleted file mode 100644 index 4d8e106..0000000 --- a/third_party/libtiff/cmake/FindJBIG.cmake +++ /dev/null @@ -1,116 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindJBIG --------- - -Find the native JBIG includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``JBIG::JBIG``, if -JBIG has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - JBIG_INCLUDE_DIRS - where to find jbig.h, etc. - JBIG_LIBRARIES - List of libraries when using jbig. - JBIG_FOUND - True if jbig found. - -:: - - JBIG_VERSION_STRING - The version of jbig found (x.y.z) - JBIG_VERSION_MAJOR - The major version of jbig - JBIG_VERSION_MINOR - The minor version of jbig - - Debug and Release variants are found separately. -#]=======================================================================] - -# Standard names to search for -set(JBIG_NAMES jbig) -set(JBIG_NAMES_DEBUG jbigd) - -find_path(JBIG_INCLUDE_DIR - NAMES jbig.h - PATH_SUFFIXES include) - -set(JBIG_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") -# Library has a "lib" prefix even on Windows. -set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") - -# Allow JBIG_LIBRARY to be set manually, as the location of the jbig library -if(NOT JBIG_LIBRARY) - find_library(JBIG_LIBRARY_RELEASE - NAMES ${JBIG_NAMES} - PATH_SUFFIXES lib) - find_library(JBIG_LIBRARY_DEBUG - NAMES ${JBIG_NAMES_DEBUG} - PATH_SUFFIXES lib) - - include(SelectLibraryConfigurations) - select_library_configurations(JBIG) -endif() - -set(CMAKE_FIND_LIBRARY_PREFIXES "${JBIG_OLD_FIND_LIBRARY_PREFIXES}") - -unset(JBIG_NAMES) -unset(JBIG_NAMES_DEBUG) -unset(JBIG_OLD_FIND_LIBRARY_PREFIXES) - -mark_as_advanced(JBIG_INCLUDE_DIR) - -if(JBIG_INCLUDE_DIR AND EXISTS "${JBIG_INCLUDE_DIR}/jbig.h") - file(STRINGS "${JBIG_INCLUDE_DIR}/jbig.h" JBIG_H REGEX "^#define JBG_VERSION *\"[^\"]*\"$") - - string(REGEX REPLACE "^.*JBG_VERSION *\"([0-9]+).*$" "\\1" JBIG_MAJOR_VERSION "${JBIG_H}") - string(REGEX REPLACE "^.*JBG_VERSION *\"[0-9]+\\.([0-9]+).*$" "\\1" JBIG_MINOR_VERSION "${JBIG_H}") - set(JBIG_VERSION_STRING "${JBIG_MAJOR_VERSION}.${JBIG_MINOR_VERSION}") - - set(JBIG_MAJOR_VERSION "${JBIG_VERSION_MAJOR}") - set(JBIG_MINOR_VERSION "${JBIG_VERSION_MINOR}") -endif() - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(JBIG - REQUIRED_VARS JBIG_LIBRARY JBIG_INCLUDE_DIR - VERSION_VAR JBIG_VERSION_STRING) - -if(JBIG_FOUND) - set(JBIG_INCLUDE_DIRS ${JBIG_INCLUDE_DIR}) - - if(NOT JBIG_LIBRARIES) - set(JBIG_LIBRARIES ${JBIG_LIBRARY}) - endif() - - if(NOT TARGET JBIG::JBIG) - add_library(JBIG::JBIG UNKNOWN IMPORTED) - set_target_properties(JBIG::JBIG PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${JBIG_INCLUDE_DIRS}") - - if(JBIG_LIBRARY_RELEASE) - set_property(TARGET JBIG::JBIG APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(JBIG::JBIG PROPERTIES - IMPORTED_LOCATION_RELEASE "${JBIG_LIBRARY_RELEASE}") - endif() - - if(JBIG_LIBRARY_DEBUG) - set_property(TARGET JBIG::JBIG APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(JBIG::JBIG PROPERTIES - IMPORTED_LOCATION_DEBUG "${JBIG_LIBRARY_DEBUG}") - endif() - - if(NOT JBIG_LIBRARY_RELEASE AND NOT JBIG_LIBRARY_DEBUG) - set_target_properties(JBIG::JBIG PROPERTIES - IMPORTED_LOCATION "${JBIG_LIBRARY}") - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/FindJPEG.cmake b/third_party/libtiff/cmake/FindJPEG.cmake deleted file mode 100644 index 12d0844..0000000 --- a/third_party/libtiff/cmake/FindJPEG.cmake +++ /dev/null @@ -1,142 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindJPEG --------- - -Find the Joint Photographic Experts Group (JPEG) library (``libjpeg``) - -Imported targets -^^^^^^^^^^^^^^^^ - -.. versionadded:: 3.12 - -This module defines the following :prop_tgt:`IMPORTED` targets: - -``JPEG::JPEG`` - The JPEG library, if found. - -Result variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables in your project: - -``JPEG_FOUND`` - If false, do not try to use JPEG. -``JPEG_INCLUDE_DIRS`` - where to find jpeglib.h, etc. -``JPEG_LIBRARIES`` - the libraries needed to use JPEG. -``JPEG_VERSION`` - .. versionadded:: 3.12 - the version of the JPEG library found - -Cache variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``JPEG_INCLUDE_DIRS`` - where to find jpeglib.h, etc. -``JPEG_LIBRARY_RELEASE`` - where to find the JPEG library (optimized). -``JPEG_LIBRARY_DEBUG`` - where to find the JPEG library (debug). - -.. versionadded:: 3.12 - Debug and Release variand are found separately. - -Obsolete variables -^^^^^^^^^^^^^^^^^^ - -``JPEG_INCLUDE_DIR`` - where to find jpeglib.h, etc. (same as JPEG_INCLUDE_DIRS) -``JPEG_LIBRARY`` - where to find the JPEG library. -#]=======================================================================] - -find_path(JPEG_INCLUDE_DIR jpeglib.h) - -set(jpeg_names ${JPEG_NAMES} jpeg jpeg-static libjpeg libjpeg-static turbojpeg turbojpeg-static) -foreach(name ${jpeg_names}) - list(APPEND jpeg_names_debug "${name}d") -endforeach() - -if(NOT JPEG_LIBRARY) - find_library(JPEG_LIBRARY_RELEASE NAMES ${jpeg_names} NAMES_PER_DIR) - find_library(JPEG_LIBRARY_DEBUG NAMES ${jpeg_names_debug} NAMES_PER_DIR) - include(SelectLibraryConfigurations) - select_library_configurations(JPEG) - mark_as_advanced(JPEG_LIBRARY_RELEASE JPEG_LIBRARY_DEBUG) -endif() -unset(jpeg_names) -unset(jpeg_names_debug) - -if(JPEG_INCLUDE_DIR) - file(GLOB _JPEG_CONFIG_HEADERS_FEDORA "${JPEG_INCLUDE_DIR}/jconfig*.h") - file(GLOB _JPEG_CONFIG_HEADERS_DEBIAN "${JPEG_INCLUDE_DIR}/*/jconfig.h") - set(_JPEG_CONFIG_HEADERS - "${JPEG_INCLUDE_DIR}/jpeglib.h" - ${_JPEG_CONFIG_HEADERS_FEDORA} - ${_JPEG_CONFIG_HEADERS_DEBIAN}) - foreach (_JPEG_CONFIG_HEADER IN LISTS _JPEG_CONFIG_HEADERS) - if (NOT EXISTS "${_JPEG_CONFIG_HEADER}") - continue () - endif () - file(STRINGS "${_JPEG_CONFIG_HEADER}" - jpeg_lib_version REGEX "^#define[\t ]+JPEG_LIB_VERSION[\t ]+.*") - - if (NOT jpeg_lib_version) - continue () - endif () - - string(REGEX REPLACE "^#define[\t ]+JPEG_LIB_VERSION[\t ]+([0-9]+).*" - "\\1" JPEG_VERSION "${jpeg_lib_version}") - break () - endforeach () - unset(jpeg_lib_version) - unset(_JPEG_CONFIG_HEADER) - unset(_JPEG_CONFIG_HEADERS) - unset(_JPEG_CONFIG_HEADERS_FEDORA) - unset(_JPEG_CONFIG_HEADERS_DEBIAN) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(JPEG - REQUIRED_VARS JPEG_LIBRARY JPEG_INCLUDE_DIR - VERSION_VAR JPEG_VERSION) - -if(JPEG_FOUND) - set(JPEG_LIBRARIES ${JPEG_LIBRARY}) - set(JPEG_INCLUDE_DIRS "${JPEG_INCLUDE_DIR}") - - if(NOT TARGET JPEG::JPEG) - add_library(JPEG::JPEG UNKNOWN IMPORTED) - if(JPEG_INCLUDE_DIRS) - set_target_properties(JPEG::JPEG PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}") - endif() - if(EXISTS "${JPEG_LIBRARY}") - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${JPEG_LIBRARY}") - endif() - if(EXISTS "${JPEG_LIBRARY_RELEASE}") - set_property(TARGET JPEG::JPEG APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" - IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}") - endif() - if(EXISTS "${JPEG_LIBRARY_DEBUG}") - set_property(TARGET JPEG::JPEG APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" - IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}") - endif() - endif() -endif() - -mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR) diff --git a/third_party/libtiff/cmake/FindLERC.cmake b/third_party/libtiff/cmake/FindLERC.cmake deleted file mode 100644 index aff7ea6..0000000 --- a/third_party/libtiff/cmake/FindLERC.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindLerc --------- - -Find the native Lerc includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``LERC::LERC``, if -LERC has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - LERC_INCLUDE_DIRS - where to find Lerc_c_api.h, etc. - LERC_LIBRARIES - List of libraries when using LERC. - LERC_FOUND - True if LERC found. - LERC_VERSION_STRING - version number as a string (ex: "4.0.1") - -#]=======================================================================] - -# Standard names to search for -set(LERC_NAMES LercLib Lerc) - -find_path(LERC_INCLUDE_DIR - NAMES Lerc_c_api.h - PATH_SUFFIXES include) - -# Allow LERC_LIBRARY to be set manually, as the location of the deflate library -if(NOT LERC_LIBRARY) - find_library(LERC_LIBRARY_RELEASE - NAMES ${LERC_NAMES} - PATH_SUFFIXES lib) - - include(SelectLibraryConfigurations) - select_library_configurations(LERC) -endif() - -unset(LERC_NAMES) - -mark_as_advanced(LERC_INCLUDE_DIR) - -if(LERC_INCLUDE_DIR AND EXISTS "${LERC_INCLUDE_DIR}/Lerc_c_api.h") - file(STRINGS "${LERC_INCLUDE_DIR}/Lerc_c_api.h" LERC_H REGEX "^#define[\t ]+LERC_VERSION_[A-Z]+[\t ]+[0-9]+") - string(REGEX REPLACE "^.*#define[\t ]+LERC_VERSION_MAJOR[\t ]+([0-9]+).*$" "\\1" LERC_VERSION_MAJOR "${LERC_H}") - string(REGEX REPLACE "^.*#define[\t ]+LERC_VERSION_MINOR[\t ]+([0-9]+).*$" "\\1" LERC_VERSION_MINOR "${LERC_H}") - string(REGEX REPLACE "^.*#define[\t ]+LERC_VERSION_PATCH[\t ]+([0-9]+).*$" "\\1" LERC_VERSION_PATCH "${LERC_H}") - set(LERC_VERSION_STRING "${LERC_VERSION_MAJOR}.${LERC_VERSION_MINOR}.${LERC_VERSION_PATCH}") - unset(LERC_H) - unset(LERC_VERSION_MAJOR) - unset(LERC_VERSION_MINOR) - unset(LERC_VERSION_PATCH) -endif() - - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LERC - REQUIRED_VARS LERC_LIBRARY LERC_INCLUDE_DIR - VERSION_VAR LERC_VERSION_STRING) - -if(LERC_FOUND) - set(LERC_INCLUDE_DIRS ${LERC_INCLUDE_DIR}) - - if(NOT LERC_LIBRARIES) - set(LERC_LIBRARIES ${LERC_LIBRARY}) - endif() - - if(NOT TARGET LERC::LERC) - add_library(LERC::LERC UNKNOWN IMPORTED) - set_target_properties(LERC::LERC PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${LERC_INCLUDE_DIRS}") - - if(LERC_LIBRARY_RELEASE) - set_property(TARGET LERC::LERC APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(LERC::LERC PROPERTIES - IMPORTED_LOCATION_RELEASE "${LERC_LIBRARY_RELEASE}") - endif() - - if(LERC_LIBRARY_DEBUG) - set_property(TARGET LERC::LERC APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(LERC::LERC PROPERTIES - IMPORTED_LOCATION_DEBUG "${LERC_LIBRARY_DEBUG}") - endif() - - if(NOT LERC_LIBRARY_RELEASE AND NOT LERC_LIBRARY_DEBUG) - set_target_properties(LERC::LERC PROPERTIES - IMPORTED_LOCATION "${LERC_LIBRARY}") - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/FindWebP.cmake b/third_party/libtiff/cmake/FindWebP.cmake deleted file mode 100644 index 675bf8c..0000000 --- a/third_party/libtiff/cmake/FindWebP.cmake +++ /dev/null @@ -1,91 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindWebP --------- - -Find the native WebP includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``WebP::webp``, if -WebP has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - WebP_INCLUDE_DIRS - where to find webp/*.h, etc. - WebP_LIBRARIES - List of libraries when using webp. - WebP_FOUND - True if webp found. - - Debug and Release variants are found separately. -#]=======================================================================] - -# Standard names to search for -set(WebP_NAMES webp) -set(WebP_NAMES_DEBUG webpd) - -find_path(WebP_INCLUDE_DIR - NAMES webp/decode.h - PATH_SUFFIXES include) - -# Allow WebP_LIBRARY to be set manually, as the location of the webp library -if(NOT WebP_LIBRARY) - find_library(WebP_LIBRARY_RELEASE - NAMES ${WebP_NAMES} - PATH_SUFFIXES lib) - find_library(WebP_LIBRARY_DEBUG - NAMES ${WebP_NAMES_DEBUG} - PATH_SUFFIXES lib) - - include(SelectLibraryConfigurations) - select_library_configurations(WebP) -endif() - -unset(WebP_NAMES) -unset(WebP_NAMES_DEBUG) - -mark_as_advanced(WebP_INCLUDE_DIR) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebP - REQUIRED_VARS WebP_LIBRARY WebP_INCLUDE_DIR) - -if(WebP_FOUND) - set(WebP_INCLUDE_DIRS ${WebP_INCLUDE_DIR}) - - if(NOT WebP_LIBRARIES) - set(WebP_LIBRARIES ${WebP_LIBRARY}) - endif() - - if(NOT TARGET WebP::webp) - add_library(WebP::webp UNKNOWN IMPORTED) - set_target_properties(WebP::webp PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${WebP_INCLUDE_DIRS}") - - if(WebP_LIBRARY_RELEASE) - set_property(TARGET WebP::webp APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(WebP::webp PROPERTIES - IMPORTED_LOCATION_RELEASE "${WebP_LIBRARY_RELEASE}") - endif() - - if(WebP_LIBRARY_DEBUG) - set_property(TARGET WebP::webp APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(WebP::webp PROPERTIES - IMPORTED_LOCATION_DEBUG "${WebP_LIBRARY_DEBUG}") - endif() - - if(NOT WebP_LIBRARY_RELEASE AND NOT WebP_LIBRARY_DEBUG) - set_target_properties(WebP::webp PROPERTIES - IMPORTED_LOCATION "${WebP_LIBRARY}") - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/FindZSTD.cmake b/third_party/libtiff/cmake/FindZSTD.cmake deleted file mode 100644 index 2e217f1..0000000 --- a/third_party/libtiff/cmake/FindZSTD.cmake +++ /dev/null @@ -1,107 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindZSTD --------- - -Find the native ZSTD includes and library. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``ZSTD::ZSTD``, if -ZSTD has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following variables: - -:: - - ZSTD_INCLUDE_DIRS - where to find zstd.h, etc. - ZSTD_LIBRARIES - List of libraries when using zstd. - ZSTD_FOUND - True if zstd found. - -:: - - ZSTD_VERSION_STRING - The version of zstd found (x.y.z) - ZSTD_VERSION_MAJOR - The major version of zstd - ZSTD_VERSION_MINOR - The minor version of zstd - - Debug and Release variants are found separately. -#]=======================================================================] - -# Standard names to search for -set(ZSTD_NAMES zstd zstd_static) -set(ZSTD_NAMES_DEBUG zstdd zstd_staticd) - -find_path(ZSTD_INCLUDE_DIR - NAMES zstd.h - PATH_SUFFIXES include) - -# Allow ZSTD_LIBRARY to be set manually, as the location of the zstd library -if(NOT ZSTD_LIBRARY) - find_library(ZSTD_LIBRARY_RELEASE - NAMES ${ZSTD_NAMES} - PATH_SUFFIXES lib) - find_library(ZSTD_LIBRARY_DEBUG - NAMES ${ZSTD_NAMES_DEBUG} - PATH_SUFFIXES lib) - - include(SelectLibraryConfigurations) - select_library_configurations(ZSTD) -endif() - -unset(ZSTD_NAMES) -unset(ZSTD_NAMES_DEBUG) - -mark_as_advanced(ZSTD_INCLUDE_DIR) - -if(ZSTD_INCLUDE_DIR AND EXISTS "${ZSTD_INCLUDE_DIR}/zstd.h") - file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" ZSTD_H REGEX "^#define ZSTD_VERSION_.*$") - - string(REGEX REPLACE "^.*ZSTD_VERSION_MAJOR *([0-9]+).*$" "\\1" ZSTD_MAJOR_VERSION "${ZSTD_H}") - string(REGEX REPLACE "^.*ZSTD_VERSION_MINOR *([0-9]+).*$" "\\1" ZSTD_MINOR_VERSION "${ZSTD_H}") - string(REGEX REPLACE "^.*ZSTD_VERSION_RELEASE *([0-9]+).*$" "\\1" ZSTD_PATCH_VERSION "${ZSTD_H}") - set(ZSTD_VERSION_STRING "${ZSTD_MAJOR_VERSION}.${ZSTD_MINOR_VERSION}.${ZSTD_PATCH_VERSION}") -endif() - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD - REQUIRED_VARS ZSTD_LIBRARY ZSTD_INCLUDE_DIR - VERSION_VAR ZSTD_VERSION_STRING) - -if(ZSTD_FOUND) - set(ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR}) - - if(NOT ZSTD_LIBRARIES) - set(ZSTD_LIBRARIES ${ZSTD_LIBRARY}) - endif() - - if(NOT TARGET ZSTD::ZSTD) - add_library(ZSTD::ZSTD UNKNOWN IMPORTED) - set_target_properties(ZSTD::ZSTD PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_INCLUDE_DIRS}") - - if(ZSTD_LIBRARY_RELEASE) - set_property(TARGET ZSTD::ZSTD APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(ZSTD::ZSTD PROPERTIES - IMPORTED_LOCATION_RELEASE "${ZSTD_LIBRARY_RELEASE}") - endif() - - if(ZSTD_LIBRARY_DEBUG) - set_property(TARGET ZSTD::ZSTD APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(ZSTD::ZSTD PROPERTIES - IMPORTED_LOCATION_DEBUG "${ZSTD_LIBRARY_DEBUG}") - endif() - - if(NOT ZSTD_LIBRARY_RELEASE AND NOT ZSTD_LIBRARY_DEBUG) - set_target_properties(ZSTD::ZSTD PROPERTIES - IMPORTED_LOCATION "${ZSTD_LIBRARY}") - endif() - endif() -endif() diff --git a/third_party/libtiff/cmake/Findliblzma.cmake b/third_party/libtiff/cmake/Findliblzma.cmake deleted file mode 100644 index 8dd5bc2..0000000 --- a/third_party/libtiff/cmake/Findliblzma.cmake +++ /dev/null @@ -1,126 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -Findliblzma ------------ - -Find LZMA compression algorithm headers and library. - - -Imported Targets -^^^^^^^^^^^^^^^^ - -.. versionadded:: 3.14 - -This module defines :prop_tgt:`IMPORTED` target ``liblzma::liblzma``, if -liblzma has been found. - -Result variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables in your project: - -``liblzma_FOUND`` - True if liblzma headers and library were found. -``LIBLZMA_INCLUDE_DIRS`` - Directory where liblzma headers are located. -``LIBLZMA_LIBRARIES`` - Lzma libraries to link against. -``LIBLZMA_HAS_AUTO_DECODER`` - True if lzma_auto_decoder() is found (required). -``LIBLZMA_HAS_EASY_ENCODER`` - True if lzma_easy_encoder() is found (required). -``LIBLZMA_HAS_LZMA_PRESET`` - True if lzma_lzma_preset() is found (required). -``LIBLZMA_VERSION_MAJOR`` - The major version of lzma -``LIBLZMA_VERSION_MINOR`` - The minor version of lzma -``LIBLZMA_VERSION_PATCH`` - The patch version of lzma -``LIBLZMA_VERSION_STRING`` - version number as a string (ex: "5.0.3") -#]=======================================================================] - -find_path(LIBLZMA_INCLUDE_DIR lzma.h ) -if(NOT LIBLZMA_LIBRARY) - find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma liblzma NAMES_PER_DIR PATH_SUFFIXES lib) - find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzmad liblzmad NAMES_PER_DIR PATH_SUFFIXES lib) - include(SelectLibraryConfigurations) - select_library_configurations(LIBLZMA) -else() - file(TO_CMAKE_PATH "${LIBLZMA_LIBRARY}" LIBLZMA_LIBRARY) -endif() - -if(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h") - file(STRINGS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS REGEX "#define LZMA_VERSION_[A-Z]+ [0-9]+") - - string(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}") - string(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}") - string(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}") - - set(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}") - unset(LIBLZMA_HEADER_CONTENTS) -endif() - -# We're using new code known now as XZ, even library still been called LZMA -# it can be found in http://tukaani.org/xz/ -# Avoid using old codebase -if (LIBLZMA_LIBRARY) - include(CheckLibraryExists) - set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) - set(CMAKE_REQUIRED_QUIET ${liblzma_FIND_QUIETLY}) - if(NOT LIBLZMA_LIBRARY_RELEASE AND NOT LIBLZMA_LIBRARY_DEBUG) - set(LIBLZMA_LIBRARY_check ${LIBLZMA_LIBRARY}) - elseif(LIBLZMA_LIBRARY_RELEASE) - set(LIBLZMA_LIBRARY_check ${LIBLZMA_LIBRARY_RELEASE}) - elseif(LIBLZMA_LIBRARY_DEBUG) - set(LIBLZMA_LIBRARY_check ${LIBLZMA_LIBRARY_DEBUG}) - endif() - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY_check} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER) - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY_check} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER) - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY_check} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET) - unset(LIBLZMA_LIBRARY_check) - set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) -endif () - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(liblzma REQUIRED_VARS LIBLZMA_LIBRARY - LIBLZMA_INCLUDE_DIR - LIBLZMA_HAS_AUTO_DECODER - LIBLZMA_HAS_EASY_ENCODER - LIBLZMA_HAS_LZMA_PRESET - VERSION_VAR LIBLZMA_VERSION_STRING - ) -mark_as_advanced( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY ) - -if (liblzma_FOUND) - set(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY}) - set(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR}) - if(NOT TARGET liblzma::liblzma) - add_library(liblzma::liblzma UNKNOWN IMPORTED) - set_target_properties(liblzma::liblzma PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES ${LIBLZMA_INCLUDE_DIR} - IMPORTED_LINK_INTERFACE_LANGUAGES C) - - if(LIBLZMA_LIBRARY_RELEASE) - set_property(TARGET liblzma::liblzma APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(liblzma::liblzma PROPERTIES - IMPORTED_LOCATION_RELEASE "${LIBLZMA_LIBRARY_RELEASE}") - endif() - - if(LIBLZMA_LIBRARY_DEBUG) - set_property(TARGET liblzma::liblzma APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(liblzma::liblzma PROPERTIES - IMPORTED_LOCATION_DEBUG "${LIBLZMA_LIBRARY_DEBUG}") - endif() - - if(NOT LIBLZMA_LIBRARY_RELEASE AND NOT LIBLZMA_LIBRARY_DEBUG) - set_target_properties(liblzma::liblzma PROPERTIES - IMPORTED_LOCATION "${LIBLZMA_LIBRARY}") - endif() - endif() -endif () diff --git a/third_party/libtiff/cmake/IncludeChecks.cmake b/third_party/libtiff/cmake/IncludeChecks.cmake deleted file mode 100644 index 0887359..0000000 --- a/third_party/libtiff/cmake/IncludeChecks.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# Checks for headers -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include(CheckIncludeFile) - - -check_include_file(assert.h HAVE_ASSERT_H) -check_include_file(fcntl.h HAVE_FCNTL_H) -check_include_file(io.h HAVE_IO_H) -check_include_file(strings.h HAVE_STRINGS_H) -check_include_file(sys/time.h HAVE_SYS_TIME_H) -check_include_file(sys/types.h HAVE_SYS_TYPES_H) -check_include_file(unistd.h HAVE_UNISTD_H) diff --git a/third_party/libtiff/cmake/InternalCodecs.cmake b/third_party/libtiff/cmake/InternalCodecs.cmake deleted file mode 100644 index 97526e1..0000000 --- a/third_party/libtiff/cmake/InternalCodecs.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# Options to enable and disable internal codecs -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -option(ccitt "support for CCITT Group 3 & 4 algorithms" ON) -set(CCITT_SUPPORT ${ccitt}) - -option(packbits "support for Macintosh PackBits algorithm" ON) -set(PACKBITS_SUPPORT ${packbits}) - -option(lzw "support for LZW algorithm" ON) -set(LZW_SUPPORT ${lzw}) - -option(thunder "support for ThunderScan 4-bit RLE algorithm" ON) -set(THUNDER_SUPPORT ${thunder}) - -option(next "support for NeXT 2-bit RLE algorithm" ON) -set(NEXT_SUPPORT ${next}) - -option(logluv "support for LogLuv high dynamic range algorithm" ON) -set(LOGLUV_SUPPORT ${logluv}) - -option(mdi "support for Microsoft Document Imaging" ON) -set(MDI_SUPPORT ${mdi}) diff --git a/third_party/libtiff/cmake/JBIGCodec.cmake b/third_party/libtiff/cmake/JBIGCodec.cmake deleted file mode 100644 index a435002..0000000 --- a/third_party/libtiff/cmake/JBIGCodec.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Checks for JBIG codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# JBIG-KIT -set(JBIG_SUPPORT FALSE) - -find_package(JBIG) - -if(JBIG_FOUND) - set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${JBIG_LIBRARIES}) - check_symbol_exists(jbg_newlen "jbig.h" HAVE_JBG_NEWLEN) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) -endif() - -option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ${JBIG_FOUND}) - -if (jbig AND JBIG_FOUND) - set(JBIG_SUPPORT TRUE) -endif() - diff --git a/third_party/libtiff/cmake/JPEGCodec.cmake b/third_party/libtiff/cmake/JPEGCodec.cmake deleted file mode 100644 index 8e4f02b..0000000 --- a/third_party/libtiff/cmake/JPEGCodec.cmake +++ /dev/null @@ -1,84 +0,0 @@ -# Checks for JPEG codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# JPEG -set(JPEG_SUPPORT FALSE) -find_package(JPEG) -option(jpeg "use libjpeg (required for JPEG compression)" ${JPEG_FOUND}) -if (jpeg AND JPEG_FOUND) - set(JPEG_SUPPORT TRUE) -endif() - -# Old-jpeg -set(OJPEG_SUPPORT FALSE) -option(old-jpeg "support for Old JPEG compression (read-only)" ${JPEG_SUPPORT}) -if (old-jpeg AND JPEG_SUPPORT) - set(OJPEG_SUPPORT TRUE) -endif() - -if (JPEG_SUPPORT) - # Check for jpeg12_read_scanlines() which has been added in libjpeg-turbo 3.0 - # for dual 8/12 bit mode. - include(CheckCSourceCompiles) - include(CMakePushCheckState) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIRS}") - set(CMAKE_REQUIRED_LIBRARIES "${JPEG_LIBRARIES}") - check_c_source_compiles( - " - #include - #include - #include \"jpeglib.h\" - int main() - { - jpeg_read_scanlines(0,0,0); - jpeg12_read_scanlines(0,0,0); - return 0; - } - " - HAVE_JPEGTURBO_DUAL_MODE_8_12) - cmake_pop_check_state() -endif() - -if (NOT HAVE_JPEGTURBO_DUAL_MODE_8_12) - - # 12-bit jpeg mode in a dedicated libjpeg12 library - set(JPEG12_INCLUDE_DIR JPEG12_INCLUDE_DIR-NOTFOUND CACHE PATH "Include directory for 12-bit libjpeg") - set(JPEG12_LIBRARY JPEG12_LIBRARY-NOTFOUND CACHE FILEPATH "12-bit libjpeg library") - set(JPEG_DUAL_MODE_8_12 FALSE) - if (JPEG12_INCLUDE_DIR AND JPEG12_LIBRARY) - set(JPEG12_LIBRARIES ${JPEG12_LIBRARY}) - set(JPEG12_FOUND TRUE) - else() - set(JPEG12_FOUND FALSE) - endif() - option(jpeg12 "enable libjpeg 8/12-bit dual mode (requires separate 12-bit libjpeg build)" ${JPEG12_FOUND}) - if (jpeg12 AND JPEG12_FOUND) - set(JPEG_DUAL_MODE_8_12 TRUE) - set(LIBJPEG_12_PATH "${JPEG12_INCLUDE_DIR}/jpeglib.h") - endif() - -endif() diff --git a/third_party/libtiff/cmake/LERCCodec.cmake b/third_party/libtiff/cmake/LERCCodec.cmake deleted file mode 100644 index c21dad3..0000000 --- a/third_party/libtiff/cmake/LERCCodec.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# Checks for LERC codec support -# -# Copyright © 2021 Antonio Valentino -# Written by Antonio Valentino -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# libLerc -set(LERC_SUPPORT FALSE) -set(LERC_STATIC FALSE) -find_package(LERC) -option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND}) -if (lerc AND LERC_FOUND AND ZIP_SUPPORT) - set(LERC_SUPPORT TRUE) - if(NOT BUILD_SHARED_LIBS) - set(LERC_STATIC TRUE) - endif() -endif() diff --git a/third_party/libtiff/cmake/LZMACodec.cmake b/third_party/libtiff/cmake/LZMACodec.cmake deleted file mode 100644 index c51afe8..0000000 --- a/third_party/libtiff/cmake/LZMACodec.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Checks for LZMA codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# liblzma2 -set(LZMA_SUPPORT FALSE) -find_package(liblzma) - -option(lzma "use liblzma (required for LZMA2 compression)" ${LIBLZMA_FOUND}) -if (lzma AND LIBLZMA_FOUND) - set(LZMA_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/LargeFileSupport.cmake b/third_party/libtiff/cmake/LargeFileSupport.cmake deleted file mode 100644 index f1819b9..0000000 --- a/third_party/libtiff/cmake/LargeFileSupport.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# Large file support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -if (UNIX OR MINGW) - # This might not catch every possibility catered for by - # Autoconf AC_SYS_LARGEFILE. - add_definitions(-D_FILE_OFFSET_BITS=64) - set(FILE_OFFSET_BITS 64) -endif() diff --git a/third_party/libtiff/cmake/LibraryFeatures.cmake b/third_party/libtiff/cmake/LibraryFeatures.cmake deleted file mode 100644 index 89635d6..0000000 --- a/third_party/libtiff/cmake/LibraryFeatures.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# C library features -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Strip chopping -option(strip-chopping "strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)" ON) -set(TIFF_DEFAULT_STRIP_SIZE 8192 CACHE STRING "default size of the strip in bytes (when strip chopping is enabled)") - -set(STRIPCHOP_DEFAULT) -if(strip-chopping) - set(STRIPCHOP_DEFAULT TRUE) - if(TIFF_DEFAULT_STRIP_SIZE) - set(STRIP_SIZE_DEFAULT "${TIFF_DEFAULT_STRIP_SIZE}") - endif() -endif() - -set(TIFF_MAX_DIR_COUNT 1048576 CACHE STRING "Maximum number of TIFF directories that libtiff can browse through") - -# Defer loading of strip/tile offsets -option(defer-strile-load "enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen())" OFF) -set(DEFER_STRILE_LOAD ${defer-strile-load}) - -# CHUNKY_STRIP_READ_SUPPORT -option(chunky-strip-read "enable reading large strips in chunks for TIFFReadScanline() (experimental)" OFF) -set(CHUNKY_STRIP_READ_SUPPORT ${chunky-strip-read}) - -# SUBIFD support -set(SUBIFD_SUPPORT 1) - -# Default handling of ASSOCALPHA support. -option(extrasample-as-alpha "the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly" ON) -if(extrasample-as-alpha) - set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1) -endif() - -# Default handling of YCbCr subsampling support. -# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. -option(check-ycbcr-subsampling "enable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag" ON) -if (check-ycbcr-subsampling) - set(CHECK_JPEG_YCBCR_SUBSAMPLING 1) -endif() diff --git a/third_party/libtiff/cmake/LinkerChecks.cmake b/third_party/libtiff/cmake/LinkerChecks.cmake deleted file mode 100644 index 90496bd..0000000 --- a/third_party/libtiff/cmake/LinkerChecks.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# Check linker capabilities -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include(CheckCSourceCompiles) - - -option(ld-version-script "Enable linker version script" ON) - -# Check if LD supports linker scripts. -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { - global: sym; -}; - -VERS_2 { - global: sym; -} VERS_1; -") -set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) -if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17) - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Wl,--undefined-version "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map") -else() - set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map") -endif() - -check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT) -set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) -file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") -if (ld-version-script AND HAVE_LD_VERSION_SCRIPT) - set(HAVE_LD_VERSION_SCRIPT TRUE) -else() - set(HAVE_LD_VERSION_SCRIPT FALSE) -endif() diff --git a/third_party/libtiff/cmake/OpenGLChecks.cmake b/third_party/libtiff/cmake/OpenGLChecks.cmake deleted file mode 100644 index 4b11d70..0000000 --- a/third_party/libtiff/cmake/OpenGLChecks.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# Checks for OpenGL and GLUT support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# OpenGL and GLUT -set(OpenGL_GL_PREFERENCE LEGACY) - -find_package(OpenGL COMPONENTS OpenGL) -find_package(GLUT) - -set(OPENGL_SUPPORT FALSE) -set(HAVE_OPENGL FALSE) -if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND) - set(HAVE_OPENGL TRUE) -endif() - -# Purely to satisfy the generated headers: -check_include_file(GL/gl.h HAVE_GL_GL_H) -check_include_file(GL/glu.h HAVE_GL_GLU_H) -check_include_file(GL/glut.h HAVE_GL_GLUT_H) -check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H) -check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) -check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) - -option(tiff-opengl "use OpenGL (required for tiffgt viewer)" ${HAVE_OPENGL}) - -if (tiff-opengl AND HAVE_OPENGL) - set(OPENGL_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/PixarLogCodec.cmake b/third_party/libtiff/cmake/PixarLogCodec.cmake deleted file mode 100644 index db36305..0000000 --- a/third_party/libtiff/cmake/PixarLogCodec.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Checks for PixarLog codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# Option for Pixar log-format algorithm -# Pixar log format -set(PIXARLOG_SUPPORT FALSE) -option(pixarlog "support for Pixar log-format algorithm (requires Zlib)" ${ZLIB_SUPPORT}) -if(pixarlog AND ZLIB_SUPPORT) - set(PIXARLOG_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/PkgConfig.cmake b/third_party/libtiff/cmake/PkgConfig.cmake deleted file mode 100644 index 75dc28e..0000000 --- a/third_party/libtiff/cmake/PkgConfig.cmake +++ /dev/null @@ -1,69 +0,0 @@ -# pkg-config support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Post-process lib files into linker flags -function(set_libs_private out_var) - set(tiff_libs_private "") - foreach(lib IN LISTS ARGN) - get_filename_component(name "${lib}" NAME) - foreach(prefix IN LISTS CMAKE_FIND_LIBRARY_PREFIXES) - if(NOT("${prefix}" STREQUAL "") AND name MATCHES "^${prefix}") - string(REGEX REPLACE "^${prefix}" "" name "${name}") - break() - endif() - endforeach() - foreach(suffix IN LISTS CMAKE_FIND_LIBRARY_SUFFIXES) - if(NOT("${suffix}" STREQUAL "") AND name MATCHES "${suffix}$") - string(REGEX REPLACE "${suffix}$" "" name "${name}") - break() - endif() - endforeach() - string(APPEND tiff_libs_private " -l${name}") - endforeach() - set(${out_var} "${tiff_libs_private}" PARENT_SCOPE) -endfunction() - -# Generate pkg-config file -set(prefix "${CMAKE_INSTALL_PREFIX}") -set(exec_prefix "\${prefix}") -if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}") - set(libdir "${CMAKE_INSTALL_LIBDIR}") -else() - set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") -endif() -if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") - set(includedir "${CMAKE_INSTALL_INCLUDEDIR}") -else() - set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") -endif() -set_libs_private(tiff_libs_private ${tiff_libs_private_list}) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff-4.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc @ONLY) - -# Install pkg-config file -if (tiff-install) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -endif() diff --git a/third_party/libtiff/cmake/ProcessorChecks.cmake b/third_party/libtiff/cmake/ProcessorChecks.cmake deleted file mode 100644 index dd66013..0000000 --- a/third_party/libtiff/cmake/ProcessorChecks.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# Processor capability checks -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include(TestBigEndian) - -# CPU endianness -test_big_endian(HOST_BIG_ENDIAN) -if(HOST_BIG_ENDIAN) - set(WORDS_BIGENDIAN TRUE) -else() - set(WORDS_BIGENDIAN FALSE) -endif() - -# IEEE floating point -set(HAVE_IEEEFP 1) diff --git a/third_party/libtiff/cmake/Release.cmake b/third_party/libtiff/cmake/Release.cmake deleted file mode 100644 index b6b754f..0000000 --- a/third_party/libtiff/cmake/Release.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Release support -# -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Add target tiff_release to update the version information in the root files -# VERSION and RELEASE-DATE. -add_custom_target(tiff_release - COMMAND ${CMAKE_COMMAND} - "-DSOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}" - "-DLIBTIFF_VERSION=${PROJECT_VERSION}" - "-DLIBTIFF_BASIC_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" - "-DLIBTIFF_BASIC_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}" - -P "${CMAKE_CURRENT_LIST_DIR}/ReleaseScript.cmake" - COMMENT "Releasing ${PROJECT_NAME} ${PROJECT_VERSION} ...") - -# Version information is taken from configure.ac -# Note: Single command "cmake --build . --target tiff_release" -# does not work correctly, because version information is taken from CMakeCache.txt, -# which is not updated by cmake --build. -# Therefore, force CMake re-configure if configure.ac has changed. -# By the way, release-date and VERSION will not change but only when --targt tiff_release is called. -set_property( - DIRECTORY - APPEND - PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac -) - diff --git a/third_party/libtiff/cmake/ReleaseScript.cmake b/third_party/libtiff/cmake/ReleaseScript.cmake deleted file mode 100644 index 90cfaf6..0000000 --- a/third_party/libtiff/cmake/ReleaseScript.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# Release support -# -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Update release date to current date -string(TIMESTAMP LIBTIFF_RELEASE_DATE "%Y%m%d") - -# Update version information in all relevant files -message(STATUS "Setting release version to ${LIBTIFF_VERSION}") -message(STATUS "Setting release date to ${LIBTIFF_RELEASE_DATE}") - -# Only needed here, for manual build of target tiff_release -# because otherwise tiffvers.h is generated when building all targets. -configure_file(${LIBTIFF_BASIC_SOURCE_DIR}/libtiff/tiffvers.h.cmake.in - ${LIBTIFF_BASIC_BINARY_DIR}/libtiff/tiffvers.h - @ONLY) - -# Write version information and release date to root files. -FILE(WRITE ${LIBTIFF_BASIC_SOURCE_DIR}/VERSION "${LIBTIFF_VERSION}" \n) -FILE(WRITE ${LIBTIFF_BASIC_SOURCE_DIR}/RELEASE-DATE "${LIBTIFF_RELEASE_DATE}" \n) -message(STATUS "Files tiffvers.h, VERSION and RELEASE-DATE updated.") - diff --git a/third_party/libtiff/cmake/Sphinx.cmake b/third_party/libtiff/cmake/Sphinx.cmake deleted file mode 100644 index bef3bf5..0000000 --- a/third_party/libtiff/cmake/Sphinx.cmake +++ /dev/null @@ -1,93 +0,0 @@ -# #%L -# OME Files C++ libraries (cmake build infrastructure) -# %% -# Copyright © 2015 Open Microscopy Environment: -# - Massachusetts Institute of Technology -# - National Institutes of Health -# - University of Dundee -# - Board of Regents of the University of Wisconsin-Madison -# - Glencoe Software, Inc. -# %% -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# The views and conclusions contained in the software and documentation are -# those of the authors and should not be interpreted as representing official -# policies, either expressed or implied, of any organization. -# #L% - -find_package(Python3 COMPONENTS Interpreter) - -# Sphinx documentation generator -find_program(SPHINX_BUILD sphinx-build) -if (SPHINX_BUILD) - message(STATUS "Looking for sphinx-build - ${SPHINX_BUILD}") -else() - message(STATUS "Looking for sphinx-build - not found") -endif() - -set(SPHINX_DEFAULT OFF) -if(SPHINX_BUILD) - set(SPHINX_DEFAULT ON) -endif() -option(sphinx "Enable sphinx manual page and HTML documentation" ${SPHINX_DEFAULT}) -option(sphinx-linkcheck "Check sphinx documentation links by default" OFF) - -set(BUILD_SPHINX ${sphinx}) -set(SPHINX_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}) - -function(sphinx_manpages srcdir builddir manvar) - execute_process(COMMAND "${Python3_EXECUTABLE}" -B ${SPHINX_LIST_DIR}/list-manpages.py - "${srcdir}" "${builddir}" - RESULT_VARIABLE sphinx_man_fail - OUTPUT_VARIABLE MAN_PAGES) - if (sphinx_man_fail) - message(WARNING "Failed to get generated sphinx manual pages from ${confdir}") - endif() - string(REPLACE "\n" ";" MAN_PAGES "${MAN_PAGES}") - set(${manvar} "${MAN_PAGES}" PARENT_SCOPE) - - message(STATUS "Sphinx manual pages: ${MAN_PAGES}") -endfunction(sphinx_manpages) - -function(sphinx_manpage_dependencies srcdir depvar) - execute_process(COMMAND "${Python3_EXECUTABLE}" -B ${SPHINX_LIST_DIR}/list-manpage-dependencies.py - "${srcdir}" - RESULT_VARIABLE sphinx_dep_fail - OUTPUT_VARIABLE SPHINX_MAN_DEPENDENCIES) - if (sphinx_dep_fail) - message(WARNING "Failed to get Sphinx dependencies from ${confdir}") - endif() - string(REPLACE "\n" ";" SPHINX_MAN_DEPENDENCIES "${SPHINX_MAN_DEPENDENCIES}") - - set(${depvar} "${SPHINX_MAN_DEPENDENCIES}" PARENT_SCOPE) -endfunction(sphinx_manpage_dependencies) - -function(sphinx_dependencies srcdir depvar) - file(GLOB_RECURSE CRUDE_SPHINX_DEPENDENCIES "${srcdir}/*.rst") - foreach(file ${CRUDE_SPHINX_DEPENDENCIES}) - string(FIND "${file}" "_build" FILE_MATCH) - if(FILE_MATCH EQUAL -1) - list(APPEND SPHINX_DEPENDENCIES "${file}") - endif() - endforeach() - set(${depvar} "${SPHINX_DEPENDENCIES}" PARENT_SCOPE) -endfunction(sphinx_dependencies) diff --git a/third_party/libtiff/cmake/SphinxCheckInternalLinks.cmake b/third_party/libtiff/cmake/SphinxCheckInternalLinks.cmake deleted file mode 100644 index 32c2566..0000000 --- a/third_party/libtiff/cmake/SphinxCheckInternalLinks.cmake +++ /dev/null @@ -1,87 +0,0 @@ -# Check "local" sphinx links, using files in the build tree and in the -# install tree (other components) - -message(STATUS "Checking internal links") - -set(failed OFF) - -file(STRINGS "${OUTPUT}" output) -file(REMOVE "${OUTPUT}.new") -foreach(line IN LISTS output) - # Parse the filename, link type, link and anchor from each line - string(REGEX MATCH "^.*: \\[.*\\] .*" line_match "${line}") - string(REGEX MATCH "^.*: \\[.*\\] .*#.*" anchor_match "${line}") - if(line_match) - string(REGEX REPLACE "^(.*): \\[(.*)\\] (.*)" "\\1" filename "${line}") - string(REGEX REPLACE "^(.*): \\[(.*)\\] (.*)" "\\2" type "${line}") - if(anchor_match) - string(REGEX REPLACE "^(.*): \\[(.*)\\] (.*)#(.*)" "\\3" link "${line}") - string(REGEX REPLACE "^(.*): \\[(.*)\\] (.*)#(.*)" "\\4" link "${anchor}") - else() - string(REGEX REPLACE "^(.*): \\[(.*)\\] (.*)" "\\3" link "${line}") - unset(anchor) - endif() - - # Only check local links - if(type STREQUAL "local") - # Compute path relative to our install path - file(RELATIVE_PATH relpath "/" "/${SPHINX_INSTALL_PATH}/${link}") - - # Check sphinx link in the install tree - unset(linkfile) - if(EXISTS "${EXTERNAL_REFERENCE}/${relpath}") - set(linkfile "${EXTERNAL_REFERENCE}/${relpath}") - endif() - # Check sphinx link in the build tree - if(EXISTS "${INTERNAL_REFERENCE}/${link}") - set(linkfile "${INTERNAL_REFERENCE}/${link}") - endif() - # Check doxygen link in the install tree - if(EXISTS "${DOXYGEN_REFERENCE}/${link}") - set(linkfile "${DOXYGEN_REFERENCE}/${link}") - endif() - # Check doxygen link in the build tree - if(DOXYGEN_REFERENCE AND DOXYGEN_INSTALL_PATH) - string(REGEX REPLACE "^${DOXYGEN_INSTALL_PATH}/(.*)" "\\1" doxygen_path "${relpath}") - if(EXISTS "${DOXYGEN_REFERENCE}/${doxygen_path}") - set(linkfile "${DOXYGEN_REFERENCE}/${doxygen_path}") - endif() - endif() - # Check link and any anchor. If the link does not exist, or the - # anchor does not exist, set the link type to broken when - # rewriting the output file with our test results. - if(linkfile) - if(anchor) - file(STRINGS "${linkfile}" anchor_matches REGEX " -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include(CheckSymbolExists) - - -# Check for getopt -check_symbol_exists(getopt "unistd.h;stdio.h" HAVE_GETOPT) -check_symbol_exists(optarg "getopt.h" HAVE_DECL_OPTARG) -if (HAVE_DECL_OPTARG) - set(HAVE_DECL_OPTARG 1) -else() - set(HAVE_DECL_OPTARG 0) -endif() - -# Check for mmap -check_symbol_exists(mmap "sys/mman.h" HAVE_MMAP) - -# Check for setmode -check_symbol_exists(setmode "unistd.h" HAVE_SETMODE) diff --git a/third_party/libtiff/cmake/TiffConfig.cmake.in b/third_party/libtiff/cmake/TiffConfig.cmake.in deleted file mode 100644 index d59dc58..0000000 --- a/third_party/libtiff/cmake/TiffConfig.cmake.in +++ /dev/null @@ -1,27 +0,0 @@ -if(NOT "@BUILD_SHARED_LIBS@") - # TODO: import dependencies -endif() - -function(set_variable_from_rel_or_absolute_path var root rel_or_abs_path) - if(IS_ABSOLUTE "${rel_or_abs_path}") - set(${var} "${rel_or_abs_path}" PARENT_SCOPE) - else() - set(${var} "${root}/${rel_or_abs_path}" PARENT_SCOPE) - endif() -endfunction() - -# Tell the user project where to find our headers and libraries -get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) -get_filename_component(_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) -# Use _ROOT as prefix here for the possibility of relocation after installation. -set_variable_from_rel_or_absolute_path("TIFF_INCLUDE_DIR" "${_ROOT}" "@CMAKE_INSTALL_INCLUDEDIR@") -set(TIFF_INCLUDE_DIRS ${TIFF_INCLUDE_DIR}) - -set(TIFF_LIBRARIES TIFF::tiff) - -if(NOT TARGET TIFF::tiff) - include("${CMAKE_CURRENT_LIST_DIR}/TiffTargets.cmake") -endif() - -unset (_ROOT) -unset (_DIR) diff --git a/third_party/libtiff/cmake/TypeSizeChecks.cmake b/third_party/libtiff/cmake/TypeSizeChecks.cmake deleted file mode 100644 index de260ef..0000000 --- a/third_party/libtiff/cmake/TypeSizeChecks.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# Check type sizes -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -include("CheckTypeSize") - -set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES}) -set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h") -check_type_size("size_t" SIZEOF_SIZE_T) -set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE}) - -# C99 fixed-size integer types -set(TIFF_INT8_T "int8_t") -set(TIFF_UINT8_T "uint8_t") - -set(TIFF_INT16_T "int16_t") -set(TIFF_UINT16_T "uint16_t") - -set(TIFF_INT32_T "int32_t") -set(TIFF_UINT32_T "uint32_t") - -set(TIFF_INT64_T "int64_t") -set(TIFF_UINT64_T "uint64_t") - -# size_t and TIFF signed size-type -if(SIZEOF_SIZE_T EQUAL 4) - set(TIFF_SSIZE_T "int32_t") -elseif(SIZEOF_SIZE_T EQUAL 8) - set(TIFF_SSIZE_T "int64_t") -else() - message(FATAL_ERROR "Unsupported size_t size ${SIZEOF_SIZE_T}; please add support") -endif() diff --git a/third_party/libtiff/cmake/WebPCodec.cmake b/third_party/libtiff/cmake/WebPCodec.cmake deleted file mode 100644 index 1d676a7..0000000 --- a/third_party/libtiff/cmake/WebPCodec.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Checks for WebP codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# libwebp -set(WEBP_SUPPORT FALSE) - -find_package(WebP) - -option(webp "use libwebp (required for WEBP compression)" ${WebP_FOUND}) - -if (webp AND WebP_FOUND) - set(WEBP_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/WindowsSupport.cmake b/third_party/libtiff/cmake/WindowsSupport.cmake deleted file mode 100644 index a60bba9..0000000 --- a/third_party/libtiff/cmake/WindowsSupport.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Windows support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -if(MSVC) - # Debug postfix - set(CMAKE_DEBUG_POSTFIX "d") - - # disable deprecation warnings - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) - # suppress deprecation warning for MSVC POSIX names - add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) - - # Don't warn about use of deprecated functions - add_compile_options(/wd4996) -endif() - -# Win32 file I/O -set(win32_io_default OFF) -if(WIN32) - set(win32_io_default ON) -endif() - -option(win32-io "Use Win32 I/O" ${win32_io_default}) - -set(USE_WIN32_FILEIO ${win32-io}) diff --git a/third_party/libtiff/cmake/ZSTDCodec.cmake b/third_party/libtiff/cmake/ZSTDCodec.cmake deleted file mode 100644 index 3fac861..0000000 --- a/third_party/libtiff/cmake/ZSTDCodec.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# Checks for LZMA codec support -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - - -# libzstd -set(ZSTD_SUPPORT FALSE) -set(ZSTD_USABLE FALSE) - -find_package(ZSTD) - -if(ZSTD_FOUND) - if(TARGET zstd::libzstd_shared) - add_library(ZSTD::ZSTD ALIAS zstd::libzstd_shared) - set(ZSTD_HAVE_DECOMPRESS_STREAM ON) - elseif(TARGET zstd::libzstd_static) - add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static) - set(ZSTD_HAVE_DECOMPRESS_STREAM ON) - endif() - - if(NOT DEFINED ZSTD_HAVE_DECOMPRESS_STREAM) - set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${ZSTD_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ZSTD_LIBRARIES}) - check_symbol_exists(ZSTD_decompressStream "zstd.h" ZSTD_HAVE_DECOMPRESS_STREAM) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) - endif() - set(ZSTD_RECENT_ENOUGH ${ZSTD_HAVE_DECOMPRESS_STREAM}) - - if (ZSTD_RECENT_ENOUGH) - set(ZSTD_USABLE TRUE) - else() - message(WARNING "Found ZSTD library, but not recent enough. Use zstd >= 1.0") - endif() -endif() - -option(zstd "use libzstd (required for ZSTD compression)" ${ZSTD_USABLE}) - -if (zstd AND ZSTD_USABLE) - set(ZSTD_SUPPORT TRUE) -endif() diff --git a/third_party/libtiff/cmake/list-manpage-dependencies.py b/third_party/libtiff/cmake/list-manpage-dependencies.py deleted file mode 100644 index 67e79ad..0000000 --- a/third_party/libtiff/cmake/list-manpage-dependencies.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -# Find manual page dependencies -# argv1 = doc dir containing conf.py - -import importlib.util -import os.path -import pathlib -import sys - -if __name__ == "__main__": - - if len(sys.argv) != 2: - sys.exit("Usage: %s sphinx-srcdir" % (sys.argv[0])) - - conf_dir = os.path.abspath(sys.argv[1]) - conf_path = os.path.join(conf_dir, 'conf.py') - spec = importlib.util.spec_from_file_location('conf', conf_path) - conf = importlib.util.module_from_spec(spec) - spec.loader.exec_module(conf) - - if hasattr(conf, 'man_pages'): - for man in conf.man_pages: - man_path = os.path.join(sys.argv[1], "{}{}".format(man[0], '.rst')) - man_path_posix = pathlib.PureWindowsPath(man_path).as_posix() - print(man_path_posix) - - print(pathlib.PureWindowsPath(conf_path).as_posix()) diff --git a/third_party/libtiff/cmake/list-manpages.py b/third_party/libtiff/cmake/list-manpages.py deleted file mode 100644 index 42bf0d8..0000000 --- a/third_party/libtiff/cmake/list-manpages.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -# Find manual pages to be generated -# argv1 = doc dir containing conf.py -# argv2 = manpage directory to contain generated manpages - -import importlib.util -import os.path -import pathlib -import sys - -if __name__ == "__main__": - - if len(sys.argv) != 3: - print("Usage: {} sphinx-srcdir sphinx-builddir".format(sys.argv[0]), file=sys.stderr) - sys.exit(2) - - conf_dir = os.path.abspath(sys.argv[1]) - conf_path = os.path.join(conf_dir, 'conf.py') - spec = importlib.util.spec_from_file_location('conf', conf_path) - conf = importlib.util.module_from_spec(spec) - spec.loader.exec_module(conf) - - if hasattr(conf, 'man_pages'): - for man in conf.man_pages: - man_path = os.path.join(sys.argv[2], "%s.%s" % (man[1], man[4])) - man_path_posix = pathlib.PureWindowsPath(man_path).as_posix() - print(man_path_posix) - else: - print("No man_pages array in {}".format(conf_path), file=sys.stderr) - sys.exit(3) diff --git a/third_party/libtiff/config/compile b/third_party/libtiff/config/compile deleted file mode 100644 index 99e5052..0000000 --- a/third_party/libtiff/config/compile +++ /dev/null @@ -1,348 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/third_party/libtiff/config/config.guess b/third_party/libtiff/config/config.guess deleted file mode 100644 index a9d01fd..0000000 --- a/third_party/libtiff/config/config.guess +++ /dev/null @@ -1,1818 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2025 Free Software Foundation, Inc. - -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2025-07-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess -# -# Please send patches to . - - -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system '$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2025 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try '$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -# Just in case it came from the environment. -GUESS= - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still -# use 'HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 - -set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039,SC3028 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c17 c99 c89 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=$driver - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case $UNAME_SYSTEM in -Linux|GNU|GNU/*) - LIBC=unknown - - set_cc_for_build - cat <<-EOF > "$dummy.c" - #if defined(__ANDROID__) - LIBC=android - #else - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #elif defined(__GLIBC__) - LIBC=gnu - #elif defined(__LLVM_LIBC__) - LIBC=llvm - #else - #include - /* First heuristic to detect musl libc. */ - #ifdef __DEFINED_va_list - LIBC=musl - #endif - #endif - #endif - EOF - cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - eval "$cc_set_libc" - - # Second heuristic to detect musl libc. - if [ "$LIBC" = unknown ] && - command -v ldd >/dev/null && - ldd --version 2>&1 | grep -q ^musl; then - LIBC=musl - fi - - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - if [ "$LIBC" = unknown ]; then - LIBC=gnu - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - echo unknown)` - case $UNAME_MACHINE_ARCH in - aarch64eb) machine=aarch64_be-unknown ;; - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown - ;; - *) machine=$UNAME_MACHINE_ARCH-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case $UNAME_MACHINE_ARCH in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case $UNAME_MACHINE_ARCH in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case $UNAME_VERSION in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - GUESS=$machine-${os}${release}${abi-} - ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE - ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE - ;; - *:SecBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE - ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE - ;; - *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE - ;; - *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE - ;; - *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE - ;; - *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE - ;; - macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE - ;; - *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE - ;; - *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix - ;; - *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler - ;; - *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox - ;; - mips:OSF1:*.*) - GUESS=mips-dec-osf1 - ;; - alpha:OSF1:*:*) - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - trap '' 0 - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case $ALPHA_CPU_TYPE in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - GUESS=$UNAME_MACHINE-dec-osf$OSF_REL - ;; - Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 - ;; - *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos - ;; - *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos - ;; - *:OS/390:*:*) - GUESS=i370-ibm-openedition - ;; - *:z/VM:*:*) - GUESS=s390-ibm-zvmoe - ;; - *:OS400:*:*) - GUESS=powerpc-ibm-os400 - ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - GUESS=arm-acorn-riscix$UNAME_RELEASE - ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos - ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - GUESS=hppa1.1-hitachi-hiuxmpp - ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - case `(/bin/universe) 2>/dev/null` in - att) GUESS=pyramid-pyramid-sysv3 ;; - *) GUESS=pyramid-pyramid-bsd ;; - esac - ;; - NILE*:*:*:dcosx) - GUESS=pyramid-pyramid-svr4 - ;; - DRS?6000:unix:4.0:6*) - GUESS=sparc-icl-nx6 - ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) GUESS=sparc-icl-nx7 ;; - esac - ;; - s390x:SunOS:*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL - ;; - sun4H:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-hal-solaris2$SUN_REL - ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris2$SUN_REL - ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - GUESS=i386-pc-auroraux$UNAME_RELEASE - ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$SUN_ARCH-pc-solaris2$SUN_REL - ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris3$SUN_REL - ;; - sun4*:SunOS:*:*) - case `/usr/bin/arch -k` in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like '4.1.3-JL'. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` - GUESS=sparc-sun-sunos$SUN_REL - ;; - sun3*:SunOS:*:*) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case `/bin/arch` in - sun3) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; - sun4) - GUESS=sparc-sun-sunos$UNAME_RELEASE - ;; - esac - ;; - aushp:SunOS:*:*) - GUESS=sparc-auspex-sunos$UNAME_RELEASE - ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - GUESS=m68k-milan-mint$UNAME_RELEASE - ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - GUESS=m68k-hades-mint$UNAME_RELEASE - ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE - ;; - m68k:machten:*:*) - GUESS=m68k-apple-machten$UNAME_RELEASE - ;; - powerpc:machten:*:*) - GUESS=powerpc-apple-machten$UNAME_RELEASE - ;; - RISC*:Mach:*:*) - GUESS=mips-dec-mach_bsd4.3 - ;; - RISC*:ULTRIX:*:*) - GUESS=mips-dec-ultrix$UNAME_RELEASE - ;; - VAX*:ULTRIX*:*:*) - GUESS=vax-dec-ultrix$UNAME_RELEASE - ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - GUESS=clipper-intergraph-clix$UNAME_RELEASE - ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - GUESS=mips-mips-riscos$UNAME_RELEASE - ;; - Motorola:PowerMAX_OS:*:*) - GUESS=powerpc-motorola-powermax - ;; - Motorola:*:4.3:PL8-*) - GUESS=powerpc-harris-powermax - ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - GUESS=powerpc-harris-powermax - ;; - Night_Hawk:Power_UNIX:*:*) - GUESS=powerpc-harris-powerunix - ;; - m88k:CX/UX:7*:*) - GUESS=m88k-harris-cxux7 - ;; - m88k:*:4*:R4*) - GUESS=m88k-motorola-sysv4 - ;; - m88k:*:3*:R3*) - GUESS=m88k-motorola-sysv3 - ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 - then - if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - test "$TARGET_BINARY_INTERFACE"x = x - then - GUESS=m88k-dg-dgux$UNAME_RELEASE - else - GUESS=m88k-dg-dguxbcs$UNAME_RELEASE - fi - else - GUESS=i586-dg-dgux$UNAME_RELEASE - fi - ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - GUESS=m88k-dolphin-sysv3 - ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - GUESS=m88k-motorola-sysv3 - ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - GUESS=m88k-tektronix-sysv3 - ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - GUESS=m68k-tektronix-bsd - ;; - *:IRIX*:*:*) - IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` - GUESS=mips-sgi-irix$IRIX_REL - ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id - ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - GUESS=i386-ibm-aix - ;; - ia64:AIX:*:*) - if test -x /usr/bin/oslevel ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE - fi - GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV - ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - - int - main () - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - GUESS=$SYSTEM_NAME - else - GUESS=rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - GUESS=rs6000-ibm-aix3.2.4 - else - GUESS=rs6000-ibm-aix3.2 - fi - ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE - fi - GUESS=$IBM_ARCH-ibm-aix$IBM_REV - ;; - *:AIX:*:*) - GUESS=rs6000-ibm-aix - ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - GUESS=romp-ibm-bsd4.4 - ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to - ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - GUESS=rs6000-bull-bosx - ;; - DPX/2?00:B.O.S.:*:*) - GUESS=m68k-bull-sysv3 - ;; - 9000/[34]??:4.3bsd:1.*:*) - GUESS=m68k-hp-bsd - ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - GUESS=m68k-hp-bsd4.4 - ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - case $UNAME_MACHINE in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if test -x /usr/bin/getconf; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case $sc_cpu_version in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case $sc_kernel_bits in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if test "$HP_ARCH" = ""; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int - main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if test "$HP_ARCH" = hppa2.0w - then - set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - GUESS=$HP_ARCH-hp-hpux$HPUX_REV - ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - GUESS=ia64-hp-hpux$HPUX_REV - ;; - 3050*:HI-UX:*:*) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - GUESS=unknown-hitachi-hiuxwe2 - ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - GUESS=hppa1.1-hp-bsd - ;; - 9000/8??:4.3bsd:*:*) - GUESS=hppa1.0-hp-bsd - ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - GUESS=hppa1.0-hp-mpeix - ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - GUESS=hppa1.1-hp-osf - ;; - hp8??:OSF1:*:*) - GUESS=hppa1.0-hp-osf - ;; - i*86:OSF1:*:*) - if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk - else - GUESS=$UNAME_MACHINE-unknown-osf1 - fi - ;; - parisc*:Lites*:*:*) - GUESS=hppa1.1-hp-lites - ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - GUESS=c1-convex-bsd - ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - GUESS=c34-convex-bsd - ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - GUESS=c38-convex-bsd - ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - GUESS=c4-convex-bsd - ;; - CRAY*Y-MP:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=ymp-cray-unicos$CRAY_REL - ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=t90-cray-unicos$CRAY_REL - ;; - CRAY*T3E:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=alphaev5-cray-unicosmk$CRAY_REL - ;; - CRAY*SV1:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=sv1-cray-unicos$CRAY_REL - ;; - *:UNICOS/mp:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=craynv-cray-unicosmp$CRAY_REL - ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE - ;; - sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE - ;; - *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE - ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi - else - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf - fi - ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL - ;; - i*:CYGWIN*:*) - GUESS=$UNAME_MACHINE-pc-cygwin - ;; - *:MINGW64*:*) - GUESS=$UNAME_MACHINE-pc-mingw64 - ;; - *:MINGW*:*) - GUESS=$UNAME_MACHINE-pc-mingw32 - ;; - *:MSYS*:*) - GUESS=$UNAME_MACHINE-pc-msys - ;; - i*:PW*:*) - GUESS=$UNAME_MACHINE-pc-pw32 - ;; - *:SerenityOS:*:*) - GUESS=$UNAME_MACHINE-pc-serenity - ;; - *:Interix*:*) - case $UNAME_MACHINE in - x86) - GUESS=i586-pc-interix$UNAME_RELEASE - ;; - authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE - ;; - IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE - ;; - esac ;; - i*:UWIN*:*) - GUESS=$UNAME_MACHINE-pc-uwin - ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - GUESS=x86_64-pc-cygwin - ;; - prep*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL - ;; - *:GNU:*:*) - # the GNU system - GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` - GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL - ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC - ;; - x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-pc-managarm-mlibc" - ;; - *:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" - ;; - *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix - ;; - aarch64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __ARM_EABI__ - #ifdef __ARM_PCS_VFP - ABI=eabihf - #else - ABI=eabi - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; - esac - fi - GUESS=$CPU-unknown-linux-$LIBCABI - ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arm*:Linux:*:*) - set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi - else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf - fi - fi - ;; - avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - cris:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; - crisv32:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; - e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - i*86:Linux:*:*) - GUESS=$UNAME_MACHINE-pc-linux-$LIBC - ;; - ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:cos:*:*) - GUESS=$UNAME_MACHINE-unknown-cos - ;; - kvx:mbr:*:*) - GUESS=$UNAME_MACHINE-unknown-mbr - ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= - #else - MIPS_ENDIAN= - #endif - #endif -EOF - cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` - eval "$cc_set_vars" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } - ;; - mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC - ;; - or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC - ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC - ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; - esac - ;; - ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC - ;; - ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC - ;; - ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC - ;; - ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC - ;; - riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - s390:Linux:*:* | s390x:Linux:*:*) - GUESS=$UNAME_MACHINE-ibm-linux-$LIBC - ;; - sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - vax:Linux:*:*) - GUESS=$UNAME_MACHINE-dec-linux-$LIBC - ;; - x86_64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __i386__ - ABI=x86 - #else - #ifdef __ILP32__ - ABI=x32 - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - x86) CPU=i686 ;; - x32) LIBCABI=${LIBC}x32 ;; - esac - fi - GUESS=$CPU-pc-linux-$LIBCABI - ;; - xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - GUESS=i386-sequent-sysv4 - ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION - ;; - i*86:OS/2:*:*) - # If we were able to find 'uname', then EMX Unix compatibility - # is probably installed. - GUESS=$UNAME_MACHINE-pc-os2-emx - ;; - i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop - ;; - i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos - ;; - i*86:syllable:*:*) - GUESS=$UNAME_MACHINE-pc-syllable - ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE - ;; - i*86:*DOS:*:*) - GUESS=$UNAME_MACHINE-pc-msdosdjgpp - ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL - else - GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL - fi - ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL - else - GUESS=$UNAME_MACHINE-pc-sysv32 - fi - ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - GUESS=i586-pc-msdosdjgpp - ;; - Intel:Mach:3*:*) - GUESS=i386-pc-mach3 - ;; - paragon:*:*:*) - GUESS=i860-intel-osf1 - ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 - fi - ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - GUESS=m68010-convergent-sysv - ;; - mc68k:UNIX:SYSTEM5:3.51m) - GUESS=m68k-convergent-sysv - ;; - M680?0:D-NIX:5.3:*) - GUESS=m68k-diab-dnix - ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE - ;; - mc68030:UNIX_System_V:4.*:*) - GUESS=m68k-atari-sysv4 - ;; - TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE - ;; - rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE - ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE - ;; - SM[BE]S:UNIX_SV:*:*) - GUESS=mips-dde-sysv$UNAME_RELEASE - ;; - RM*:ReliantUNIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; - RM*:SINIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - GUESS=$UNAME_MACHINE-sni-sysv4 - else - GUESS=ns32k-sni-sysv - fi - ;; - PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort - # says - GUESS=i586-unisys-sysv4 - ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - GUESS=hppa1.1-stratus-sysv4 - ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - GUESS=i860-stratus-sysv4 - ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - GUESS=$UNAME_MACHINE-stratus-vos - ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - GUESS=hppa1.1-stratus-vos - ;; - mc68*:A/UX:*:*) - GUESS=m68k-apple-aux$UNAME_RELEASE - ;; - news*:NEWS-OS:6*:*) - GUESS=mips-sony-newsos6 - ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if test -d /usr/nec; then - GUESS=mips-nec-sysv$UNAME_RELEASE - else - GUESS=mips-unknown-sysv$UNAME_RELEASE - fi - ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - GUESS=powerpc-be-beos - ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - GUESS=powerpc-apple-beos - ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - GUESS=i586-pc-beos - ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - GUESS=i586-pc-haiku - ;; - ppc:Haiku:*:*) # Haiku running on Apple PowerPC - GUESS=powerpc-apple-haiku - ;; - *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) - GUESS=$UNAME_MACHINE-unknown-haiku - ;; - SX-4:SUPER-UX:*:*) - GUESS=sx4-nec-superux$UNAME_RELEASE - ;; - SX-5:SUPER-UX:*:*) - GUESS=sx5-nec-superux$UNAME_RELEASE - ;; - SX-6:SUPER-UX:*:*) - GUESS=sx6-nec-superux$UNAME_RELEASE - ;; - SX-7:SUPER-UX:*:*) - GUESS=sx7-nec-superux$UNAME_RELEASE - ;; - SX-8:SUPER-UX:*:*) - GUESS=sx8-nec-superux$UNAME_RELEASE - ;; - SX-8R:SUPER-UX:*:*) - GUESS=sx8r-nec-superux$UNAME_RELEASE - ;; - SX-ACE:SUPER-UX:*:*) - GUESS=sxace-nec-superux$UNAME_RELEASE - ;; - Power*:Rhapsody:*:*) - GUESS=powerpc-apple-rhapsody$UNAME_RELEASE - ;; - *:Rhapsody:*:*) - GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE - ;; - arm64:Darwin:*:*) - GUESS=aarch64-apple-darwin$UNAME_RELEASE - ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build - fi - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE - fi - GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE - ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE - ;; - *:QNX:*:4*) - GUESS=i386-pc-qnx - ;; - NEO-*:NONSTOP_KERNEL:*:*) - GUESS=neo-tandem-nsk$UNAME_RELEASE - ;; - NSE-*:NONSTOP_KERNEL:*:*) - GUESS=nse-tandem-nsk$UNAME_RELEASE - ;; - NSR-*:NONSTOP_KERNEL:*:*) - GUESS=nsr-tandem-nsk$UNAME_RELEASE - ;; - NSV-*:NONSTOP_KERNEL:*:*) - GUESS=nsv-tandem-nsk$UNAME_RELEASE - ;; - NSX-*:NONSTOP_KERNEL:*:*) - GUESS=nsx-tandem-nsk$UNAME_RELEASE - ;; - *:NonStop-UX:*:*) - GUESS=mips-compaq-nonstopux - ;; - BS2000:POSIX*:*:*) - GUESS=bs2000-siemens-sysv - ;; - DS/*:UNIX_System_V:*:*) - GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE - ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "${cputype-}" = 386; then - UNAME_MACHINE=i386 - elif test "x${cputype-}" != x; then - UNAME_MACHINE=$cputype - fi - GUESS=$UNAME_MACHINE-unknown-plan9 - ;; - *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 - ;; - *:TENEX:*:*) - GUESS=pdp10-unknown-tenex - ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - GUESS=pdp10-dec-tops20 - ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - GUESS=pdp10-xkl-tops20 - ;; - *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 - ;; - *:ITS:*:*) - GUESS=pdp10-unknown-its - ;; - SEI:*:*:SEIUX) - GUESS=mips-sei-seiux$UNAME_RELEASE - ;; - *:DragonFly:*:*) - DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL - ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case $UNAME_MACHINE in - A*) GUESS=alpha-dec-vms ;; - I*) GUESS=ia64-dec-vms ;; - V*) GUESS=vax-dec-vms ;; - esac ;; - *:XENIX:*:SysV) - GUESS=i386-pc-xenix - ;; - i*86:skyos:*:*) - SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` - GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL - ;; - i*86:rdos:*:*) - GUESS=$UNAME_MACHINE-pc-rdos - ;; - i*86:Fiwix:*:*) - GUESS=$UNAME_MACHINE-pc-fiwix - ;; - *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros - ;; - x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx - ;; - amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs - ;; - *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE - ;; - x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*) - GUESS=$UNAME_MACHINE-pc-ironclad-mlibc - ;; - *:[Ii]ronclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc - ;; -esac - -# Do we have a guess based on uname results? -if test "x$GUESS" != x; then - echo "$GUESS" - exit -fi - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" < -#include -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include -#if defined(_SIZE_T_) || defined(SIGLOST) -#include -#endif -#endif -#endif -int -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - -echo "$0: unable to guess system type" >&2 - -case $UNAME_MACHINE:$UNAME_SYSTEM in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF -fi - -exit 1 - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp nil t) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%Y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/third_party/libtiff/config/config.h.in b/third_party/libtiff/config/config.h.in deleted file mode 100644 index 0adbdf1..0000000 --- a/third_party/libtiff/config/config.h.in +++ /dev/null @@ -1,278 +0,0 @@ -/* config/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - -/* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING - -/* enable partial strip reading for large strips (experimental) */ -#undef CHUNKY_STRIP_READ_SUPPORT - -/* Support C++ stream API (requires C++ compiler) */ -#undef CXX_SUPPORT - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#undef DEFAULT_EXTRASAMPLE_AS_ALPHA - -/* enable deferred strip/tile offset/size loading */ -#undef DEFER_STRILE_LOAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#undef HAVE_DECL_OPTARG - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `getopt' function. */ -#undef HAVE_GETOPT - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLUT_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GL_H - -/* Define as 0 or 1 according to the floating point format supported by the - machine */ -#undef HAVE_IEEEFP - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_IO_H - -/* Define to 1 if you have the `jbg_newlen' function. */ -#undef HAVE_JBG_NEWLEN - -/* libjpeg-turbo >= 3.0 dual mode enabled */ -#undef HAVE_JPEGTURBO_DUAL_MODE_8_12 - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GL_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_SEARCH_H - -/* Define to 1 if you have the `setmode' function. */ -#undef HAVE_SETMODE - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Use nonstandard varargs form for the GLU tesselator callback */ -#undef HAVE_VARARGS_GLU_TESSCB - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#undef HOST_BIGENDIAN - -/* Support ISO JBIG compression (requires JBIG-KIT library) */ -#undef JBIG_SUPPORT - -/* 8/12 bit libjpeg dual mode enabled */ -#undef JPEG_DUAL_MODE_8_12 - -/* Support JPEG compression (requires IJG JPEG library) */ -#undef JPEG_SUPPORT - -/* Define to 1 when building a static libtiff with LERC enabled. */ -#undef LERC_STATIC - -/* Support lerc compression */ -#undef LERC_SUPPORT - -/* Support libdeflate enhanced compression */ -#undef LIBDEFLATE_SUPPORT - -/* 12bit libjpeg primary include file with path */ -#undef LIBJPEG_12_PATH - -/* Support LogLuv high dynamic range encoding */ -#undef LOGLUV_SUPPORT - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Support LZMA2 compression */ -#undef LZMA_SUPPORT - -/* Support LZW algorithm */ -#undef LZW_SUPPORT - -/* Support Microsoft Document Imaging format */ -#undef MDI_SUPPORT - -/* Support NeXT 2-bit RLE algorithm */ -#undef NEXT_SUPPORT - -/* Support Old JPEG compression (read-only) */ -#undef OJPEG_SUPPORT - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Support Macintosh PackBits algorithm */ -#undef PACKBITS_SUPPORT - -/* Support Pixar log-format algorithm (requires Zlib) */ -#undef PIXARLOG_SUPPORT - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to multiple strips of specified size to reduce memory usage) */ -#undef STRIPCHOP_DEFAULT - -/* Default size of the strip in bytes (when strip chopping enabled) */ -#undef STRIP_SIZE_DEFAULT - -/* Enable SubIFD tag (330) support */ -#undef SUBIFD_SUPPORT - -/* Support ThunderScan 4-bit RLE algorithm */ -#undef THUNDER_SUPPORT - -/* Maximum number of TIFF directories that libtiff can browse through */ -#undef TIFF_MAX_DIR_COUNT - -/* Signed size type */ -#undef TIFF_SSIZE_T - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* define to use win32 IO system */ -#undef USE_WIN32_FILEIO - -/* Version number of package */ -#undef VERSION - -/* Support webp compression */ -#undef WEBP_SUPPORT - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING - -/* Support Deflate compression */ -#undef ZIP_SUPPORT - -/* Support zstd compression */ -#undef ZSTD_SUPPORT - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long int' if does not define. */ -#undef off_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/third_party/libtiff/config/config.sub b/third_party/libtiff/config/config.sub deleted file mode 100644 index 3d35cde..0000000 --- a/third_party/libtiff/config/config.sub +++ /dev/null @@ -1,2364 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2025 Free Software Foundation, Inc. - -# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale - -timestamp='2025-07-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2025 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try '$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Split fields of configuration type -saved_IFS=$IFS -IFS="-" read field1 field2 field3 field4 <&2 - exit 1 - ;; - *-*-*-*) - basic_machine=$field1-$field2 - basic_os=$field3-$field4 - ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - cloudabi*-eabi* \ - | kfreebsd*-gnu* \ - | knetbsd*-gnu* \ - | kopensolaris*-gnu* \ - | ironclad-* \ - | linux-* \ - | managarm-* \ - | netbsd*-eabi* \ - | netbsd*-gnu* \ - | nto-qnx* \ - | os2-emx* \ - | rtmk-nova* \ - | storm-chaos* \ - | uclinux-gnu* \ - | uclinux-uclibc* \ - | windows-* ) - basic_machine=$field1 - basic_os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - basic_os=linux-android - ;; - *) - basic_machine=$field1-$field2 - basic_os=$field3 - ;; - esac - ;; - *-*) - case $field1-$field2 in - # Shorthands that happen to contain a single dash - convex-c[12] | convex-c3[248]) - basic_machine=$field2-convex - basic_os= - ;; - decstation-3100) - basic_machine=mips-dec - basic_os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Do not treat sunos as a manufacturer - sun*os*) - basic_machine=$field1 - basic_os=$field2 - ;; - # Manufacturers - 3100* \ - | 32* \ - | 3300* \ - | 3600* \ - | 7300* \ - | acorn \ - | altos* \ - | apollo \ - | apple \ - | atari \ - | att* \ - | axis \ - | be \ - | bull \ - | cbm \ - | ccur \ - | cisco \ - | commodore \ - | convergent* \ - | convex* \ - | cray \ - | crds \ - | dec* \ - | delta* \ - | dg \ - | digital \ - | dolphin \ - | encore* \ - | gould \ - | harris \ - | highlevel \ - | hitachi* \ - | hp \ - | ibm* \ - | intergraph \ - | isi* \ - | knuth \ - | masscomp \ - | microblaze* \ - | mips* \ - | motorola* \ - | ncr* \ - | news \ - | next \ - | ns \ - | oki \ - | omron* \ - | pc533* \ - | rebel \ - | rom68k \ - | rombug \ - | semi \ - | sequent* \ - | sgi* \ - | siemens \ - | sim \ - | sni \ - | sony* \ - | stratus \ - | sun \ - | sun[234]* \ - | tektronix \ - | tti* \ - | ultra \ - | unicom* \ - | wec \ - | winbond \ - | wrs) - basic_machine=$field1-$field2 - basic_os= - ;; - tock* | zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 - ;; - *) - basic_machine=$field1 - basic_os=$field2 - ;; - esac - ;; - esac - ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - basic_os=bsd - ;; - a29khif) - basic_machine=a29k-amd - basic_os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - basic_os=scout - ;; - alliant) - basic_machine=fx80-alliant - basic_os= - ;; - altos | altos3068) - basic_machine=m68k-altos - basic_os= - ;; - am29k) - basic_machine=a29k-none - basic_os=bsd - ;; - amdahl) - basic_machine=580-amdahl - basic_os=sysv - ;; - amiga) - basic_machine=m68k-unknown - basic_os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - basic_os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - basic_os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - basic_os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - basic_os=bsd - ;; - aros) - basic_machine=i386-pc - basic_os=aros - ;; - aux) - basic_machine=m68k-apple - basic_os=aux - ;; - balance) - basic_machine=ns32k-sequent - basic_os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - basic_os=linux - ;; - cegcc) - basic_machine=arm-unknown - basic_os=cegcc - ;; - cray) - basic_machine=j90-cray - basic_os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - basic_os= - ;; - da30) - basic_machine=m68k-da30 - basic_os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - basic_os= - ;; - delta88) - basic_machine=m88k-motorola - basic_os=sysv3 - ;; - dicos) - basic_machine=i686-pc - basic_os=dicos - ;; - djgpp) - basic_machine=i586-pc - basic_os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - basic_os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - basic_os=ose - ;; - gmicro) - basic_machine=tron-gmicro - basic_os=sysv - ;; - go32) - basic_machine=i386-pc - basic_os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - basic_os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - basic_os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - basic_os=hms - ;; - harris) - basic_machine=m88k-harris - basic_os=sysv3 - ;; - hp300 | hp300hpux) - basic_machine=m68k-hp - basic_os=hpux - ;; - hp300bsd) - basic_machine=m68k-hp - basic_os=bsd - ;; - hppaosf) - basic_machine=hppa1.1-hp - basic_os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - basic_os=proelf - ;; - i386mach) - basic_machine=i386-mach - basic_os=mach - ;; - isi68 | isi) - basic_machine=m68k-isi - basic_os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - basic_os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - basic_os=sysv - ;; - merlin) - basic_machine=ns32k-utek - basic_os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - basic_os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - basic_os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - basic_os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - basic_os=coff - ;; - morphos) - basic_machine=powerpc-unknown - basic_os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - basic_os=moxiebox - ;; - msdos) - basic_machine=i386-pc - basic_os=msdos - ;; - msys) - basic_machine=i686-pc - basic_os=msys - ;; - mvs) - basic_machine=i370-ibm - basic_os=mvs - ;; - nacl) - basic_machine=le32-unknown - basic_os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - basic_os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - basic_os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - basic_os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - basic_os=newsos - ;; - news1000) - basic_machine=m68030-sony - basic_os=newsos - ;; - necv70) - basic_machine=v70-nec - basic_os=sysv - ;; - nh3000) - basic_machine=m68k-harris - basic_os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - basic_os=cxux - ;; - nindy960) - basic_machine=i960-intel - basic_os=nindy - ;; - mon960) - basic_machine=i960-intel - basic_os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - basic_os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - basic_os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - basic_os=ose - ;; - os68k) - basic_machine=m68k-none - basic_os=os68k - ;; - paragon) - basic_machine=i860-intel - basic_os=osf - ;; - parisc) - basic_machine=hppa-unknown - basic_os=linux - ;; - psp) - basic_machine=mipsallegrexel-sony - basic_os=psp - ;; - pw32) - basic_machine=i586-unknown - basic_os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - basic_os=rdos - ;; - rdos32) - basic_machine=i386-pc - basic_os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - basic_os=coff - ;; - sa29200) - basic_machine=a29k-amd - basic_os=udi - ;; - sei) - basic_machine=mips-sei - basic_os=seiux - ;; - sequent) - basic_machine=i386-sequent - basic_os= - ;; - sps7) - basic_machine=m68k-bull - basic_os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - basic_os= - ;; - stratus) - basic_machine=i860-stratus - basic_os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - basic_os= - ;; - sun2os3) - basic_machine=m68000-sun - basic_os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - basic_os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - basic_os= - ;; - sun3os3) - basic_machine=m68k-sun - basic_os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - basic_os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - basic_os= - ;; - sun4os3) - basic_machine=sparc-sun - basic_os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - basic_os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - basic_os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - basic_os= - ;; - sv1) - basic_machine=sv1-cray - basic_os=unicos - ;; - symmetry) - basic_machine=i386-sequent - basic_os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - basic_os=unicos - ;; - t90) - basic_machine=t90-cray - basic_os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - basic_os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - basic_os=tpf - ;; - udi29k) - basic_machine=a29k-amd - basic_os=udi - ;; - ultra3) - basic_machine=a29k-nyu - basic_os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - basic_os=none - ;; - vaxv) - basic_machine=vax-dec - basic_os=sysv - ;; - vms) - basic_machine=vax-dec - basic_os=vms - ;; - vsta) - basic_machine=i386-pc - basic_os=vsta - ;; - vxworks960) - basic_machine=i960-wrs - basic_os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - basic_os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - basic_os=vxworks - ;; - xbox) - basic_machine=i686-pc - basic_os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - basic_os=unicos - ;; - *) - basic_machine=$1 - basic_os= - ;; - esac - ;; -esac - -# Decode 1-component or ad-hoc basic machines -case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond - ;; - op50n) - cpu=hppa1.1 - vendor=oki - ;; - op60c) - cpu=hppa1.1 - vendor=oki - ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - basic_os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - basic_os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - basic_os=tops20 - ;; - delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) - cpu=m68k - vendor=motorola - ;; - # This used to be dpx2*, but that gets the RS6000-based - # DPX/20 and the x86-based DPX/2-100 wrong. See - # https://oldskool.silicium.org/stations/bull_dpx20.htm - # https://www.feb-patrimoine.com/english/bull_dpx2.htm - # https://www.feb-patrimoine.com/english/unix_and_bull.htm - dpx2 | dpx2[23]00 | dpx2[23]xx) - cpu=m68k - vendor=bull - ;; - dpx2100 | dpx21xx) - cpu=i386 - vendor=bull - ;; - dpx20) - cpu=rs6000 - vendor=bull - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - basic_os=${basic_os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - basic_os=${basic_os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $basic_os in - irix*) - ;; - *) - basic_os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - basic_os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - basic_os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - basic_os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - basic_os=${basic_os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - basic_os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - basic_os=proelf - ;; - none) - cpu=none - vendor=none - ;; - leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine - ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` - ;; - - *-*) - saved_IFS=$IFS - IFS="-" read cpu vendor <&2 - exit 1 - ;; - esac - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec - ;; - commodore*) - vendor=cbm - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if test x"$basic_os" != x -then - -# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just -# set os. -obj= -case $basic_os in - gnu/linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` - ;; - os2-emx) - kernel=os2 - os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` - ;; - nto-qnx*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` - ;; - *-*) - saved_IFS=$IFS - IFS="-" read kernel os <&2 - fi - ;; - *) - echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 - exit 1 - ;; -esac - -case $obj in - aout* | coff* | elf* | pe*) - ;; - '') - # empty is fine - ;; - *) - echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 - exit 1 - ;; -esac - -# Here we handle the constraint that a (synthetic) cpu and os are -# valid only in combination with each other and nowhere else. -case $cpu-$os in - # The "javascript-unknown-ghcjs" triple is used by GHC; we - # accept it here in order to tolerate that, but reject any - # variations. - javascript-ghcjs) - ;; - javascript-* | *-ghcjs) - echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 - exit 1 - ;; -esac - -# As a final step for OS-related things, validate the OS-kernel combination -# (given a valid OS), if there is a kernel. -case $kernel-$os-$obj in - linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ - | linux-mlibc*- | linux-musl*- | linux-newlib*- \ - | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) - ;; - uclinux-uclibc*- | uclinux-gnu*- ) - ;; - ironclad-mlibc*-) - ;; - managarm-mlibc*- | managarm-kernel*- ) - ;; - windows*-msvc*-) - ;; - -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ - | -uclibc*- ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - -kernel*- ) - echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - *-kernel*- ) - echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 - exit 1 - ;; - *-msvc*- ) - echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 - exit 1 - ;; - kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) - ;; - vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) - ;; - nto-qnx*-) - ;; - os2-emx-) - ;; - rtmk-nova-) - ;; - *-eabi*- | *-gnueabi*-) - ;; - ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) - ;; - none--*) - # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an machine code file format - ;; - -*-) - # Blank kernel with real OS is always fine. - ;; - --*) - # Blank kernel and OS with real machine code file format is always fine. - ;; - *-*-*) - echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 - exit 1 - ;; -esac - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $cpu-$os in - *-riscix*) - vendor=acorn - ;; - *-sunos* | *-solaris*) - vendor=sun - ;; - *-cnk* | *-aix*) - vendor=ibm - ;; - *-beos*) - vendor=be - ;; - *-hpux*) - vendor=hp - ;; - *-mpeix*) - vendor=hp - ;; - *-hiux*) - vendor=hitachi - ;; - *-unos*) - vendor=crds - ;; - *-dgux*) - vendor=dg - ;; - *-luna*) - vendor=omron - ;; - *-genix*) - vendor=ns - ;; - *-clix*) - vendor=intergraph - ;; - *-mvs* | *-opened*) - vendor=ibm - ;; - *-os400*) - vendor=ibm - ;; - s390-* | s390x-*) - vendor=ibm - ;; - *-ptx*) - vendor=sequent - ;; - *-tpf*) - vendor=ibm - ;; - *-vxsim* | *-vxworks* | *-windiss*) - vendor=wrs - ;; - *-aux*) - vendor=apple - ;; - *-hms*) - vendor=hitachi - ;; - *-mpw* | *-macos*) - vendor=apple - ;; - *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) - vendor=atari - ;; - *-vos*) - vendor=stratus - ;; - esac - ;; -esac - -echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" -exit - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp nil t) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%Y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/third_party/libtiff/config/depcomp b/third_party/libtiff/config/depcomp deleted file mode 100644 index 65cbf70..0000000 --- a/third_party/libtiff/config/depcomp +++ /dev/null @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1999-2018 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/third_party/libtiff/config/install-sh b/third_party/libtiff/config/install-sh deleted file mode 100644 index 8175c64..0000000 --- a/third_party/libtiff/config/install-sh +++ /dev/null @@ -1,518 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2018-03-11.20; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dstbase=`basename "$src"` - case $dst in - */) dst=$dst$dstbase;; - *) dst=$dst/$dstbase;; - esac - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - case $dstdir in - */) dstdirslash=$dstdir;; - *) dstdirslash=$dstdir/;; - esac - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=${dstdirslash}_inst.$$_ - rmtmp=${dstdirslash}_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/third_party/libtiff/config/ltmain.sh b/third_party/libtiff/config/ltmain.sh deleted file mode 100644 index 0cb7f90..0000000 --- a/third_party/libtiff/config/ltmain.sh +++ /dev/null @@ -1,11251 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-14" -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2015-10-07.11; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - _G_rc_run_hooks=false - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - if eval $_G_hook '"$@"'; then - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - _G_rc_run_hooks=: - fi - done - - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the -# hook's caller know that it should pay attention to -# '_result'. Returning $EXIT_FAILURE signalizes that -# arguments are left untouched by the hook and therefore caller will ignore the -# result variable. -# -# Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# # No change in '$@' (ignored completely by this hook). There is -# # no need to do the equivalent (but slower) action: -# # func_quote_for_eval ${1+"$@"} -# # my_options_prep_result=$func_quote_for_eval_result -# false -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# args_changed=false -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# args_changed=: -# ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@", we could need that later -# # if $args_changed is true. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; -# esac -# done -# -# if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# fi -# -# $args_changed -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# false -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll also need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - _G_func_options_finish_exit=false - if func_run_hooks func_options ${1+"$@"}; then - func_options_finish_result=$func_run_hooks_result - _G_func_options_finish_exit=: - fi - - $_G_func_options_finish_exit -} - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - _G_rc_options=false - - for my_func in options_prep parse_options validate_options options_finish - do - if eval func_$my_func '${1+"$@"}'; then - eval _G_res_var='$'"func_${my_func}_result" - eval set dummy "$_G_res_var" ; shift - _G_rc_options=: - fi - done - - # Save modified positional parameters for caller. As a top-level - # options-parser function we always need to set the 'func_options_result' - # variable (regardless the $_G_rc_options value). - if $_G_rc_options; then - func_options_result=$_G_res_var - else - func_quote_for_eval ${1+"$@"} - func_options_result=$func_quote_for_eval_result - fi - - $_G_rc_options -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - _G_rc_options_prep=false - if func_run_hooks func_options_prep ${1+"$@"}; then - _G_rc_options_prep=: - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result - fi - - $_G_rc_options_prep -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - _G_rc_parse_options=false - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: - fi - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_match_parse_options=: - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: - break - fi - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) _G_rc_parse_options=: ; break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; - esac - - $_G_match_parse_options && _G_rc_parse_options=: - done - - - if $_G_rc_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result - fi - - $_G_rc_parse_options -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - _G_rc_validate_options=false - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - if func_run_hooks func_validate_options ${1+"$@"}; then - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result - _G_rc_validate_options=: - fi - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - $_G_rc_validate_options -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-14 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - _G_rc_lt_options_prep=: - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - *) - _G_rc_lt_options_prep=false - ;; - esac - - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result - fi - - $_G_rc_lt_options_prep -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - _G_rc_lt_parse_options=false - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_match_lt_parse_options=: - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; - esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: - done - - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result - fi - - $_G_rc_lt_parse_options -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - # -fuse-ld=* Linker select flags for GCC - # -static-* direct GCC to link specific libraries statically - # -fcilkplus Cilk Plus language extension features for C/C++ - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/third_party/libtiff/config/missing b/third_party/libtiff/config/missing deleted file mode 100644 index 625aeb1..0000000 --- a/third_party/libtiff/config/missing +++ /dev/null @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 1996-2018 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=https://www.perl.org/ -flex_URL=https://github.com/westes/flex -gnu_software_URL=https://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/third_party/libtiff/config/test-driver b/third_party/libtiff/config/test-driver deleted file mode 100644 index b8521a4..0000000 --- a/third_party/libtiff/config/test-driver +++ /dev/null @@ -1,148 +0,0 @@ -#! /bin/sh -# test-driver - basic testsuite driver script. - -scriptversion=2018-03-07.03; # UTC - -# Copyright (C) 2011-2018 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -usage_error () -{ - echo "$0: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat <$log_file 2>&1 -estatus=$? - -if test $enable_hard_errors = no && test $estatus -eq 99; then - tweaked_estatus=1 -else - tweaked_estatus=$estatus -fi - -case $tweaked_estatus:$expect_failure in - 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; - 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; - 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; - *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; - *:*) col=$red res=FAIL recheck=yes gcopy=yes;; -esac - -# Report the test outcome and exit status in the logs, so that one can -# know whether the test passed or failed simply by looking at the '.log' -# file, without the need of also peaking into the corresponding '.trs' -# file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file - -# Report outcome to console. -echo "${col}${res}${std}: $test_name" - -# Register the test result, and other relevant metadata. -echo ":test-result: $res" > $trs_file -echo ":global-test-result: $res" >> $trs_file -echo ":recheck: $recheck" >> $trs_file -echo ":copy-in-global-log: $gcopy" >> $trs_file - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff --git a/third_party/libtiff/configure b/third_party/libtiff/configure deleted file mode 100644 index f83c988..0000000 --- a/third_party/libtiff/configure +++ /dev/null @@ -1,23872 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for LibTIFF Software 4.7.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: tiff@lists.osgeo.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='LibTIFF Software' -PACKAGE_TARNAME='tiff' -PACKAGE_VERSION='4.7.1' -PACKAGE_STRING='LibTIFF Software 4.7.1' -PACKAGE_BUGREPORT='tiff@lists.osgeo.org' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBDIR -TIFF_MAN3_PREBUILT -TIFF_MAN1_PREBUILT -TIFF_MAN_RULES -TIFF_MAN3_GEN -TIFF_MAN1_GEN -SPHINX_FALSE -SPHINX_TRUE -SPHINX_BUILD -PYTHON_BIN -WIN32_IO_FALSE -WIN32_IO_TRUE -HAVE_OPENGL_FALSE -HAVE_OPENGL_TRUE -GLUT_LIBS -GLUT_CFLAGS -GLU_LIBS -GLU_CFLAGS -GL_LIBS -GL_CFLAGS -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -HAVE_CXX_FALSE -HAVE_CXX_TRUE -HAVE_WEBP_FALSE -HAVE_WEBP_TRUE -HAVE_ZSTD_FALSE -HAVE_ZSTD_TRUE -HAVE_LZMA_FALSE -HAVE_LZMA_TRUE -HAVE_LERC_FALSE -HAVE_LERC_TRUE -HAVE_JBIG_FALSE -HAVE_JBIG_TRUE -HAVE_JPEGTURBO_DUAL_MODE_8_12_FALSE -HAVE_JPEGTURBO_DUAL_MODE_8_12_TRUE -HAVE_JPEG_FALSE -HAVE_JPEG_TRUE -TIFF_DOCS_FALSE -TIFF_DOCS_TRUE -TIFF_CONTRIB_FALSE -TIFF_CONTRIB_TRUE -TIFF_TESTS_FALSE -TIFF_TESTS_TRUE -TIFF_TOOLS_FALSE -TIFF_TOOLS_TRUE -LIBTIFF_DOCDIR -HAVE_RPATH_FALSE -HAVE_RPATH_TRUE -LIBOBJS -BUILD_STATIC_FALSE -BUILD_STATIC_TRUE -tiff_requires_private -tiff_libs_private -CXXCPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -CPP -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -OBJDUMP -DLLTOOL -AS -HAVE_LD_VERSION_SCRIPT_FALSE -HAVE_LD_VERSION_SCRIPT_TRUE -CMAKE -LN_S -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LIBTIFF_RELEASE_DATE -LIBTIFF_VERSION_INFO -LIBTIFF_VERSION -LIBTIFF_ALPHA_VERSION -LIBTIFF_MICRO_VERSION -LIBTIFF_MINOR_VERSION -LIBTIFF_MAJOR_VERSION -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL -am__quote' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -enable_ld_version_script -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_deprecated -enable_rpath -enable_largefile -with_docdir -enable_tools -enable_tests -enable_contrib -enable_docs -enable_ccitt -enable_packbits -enable_lzw -enable_thunder -enable_next -enable_logluv -enable_mdi -enable_zlib -with_zlib_include_dir -with_zlib_lib_dir -enable_libdeflate -with_libdeflate_include_dir -with_libdeflate_lib_dir -enable_pixarlog -enable_jpeg -with_jpeg_include_dir -with_jpeg_lib_dir -enable_old_jpeg -enable_jbig -with_jbig_include_dir -with_jbig_lib_dir -enable_lerc -with_lerc_include_dir -with_lerc_lib_dir -enable_lzma -with_lzma_include_dir -with_lzma_lib_dir -enable_zstd -with_zstd_include_dir -with_zstd_lib_dir -enable_webp -with_webp_include_dir -with_webp_lib_dir -enable_jpeg12 -with_jpeg12_include_dir -with_jpeg12_lib -enable_cxx -enable_opengl -with_x -enable_win32_io -enable_strip_chopping -with_default_strip_size -with_max_dir_count -enable_defer_strile_load -enable_chunky_strip_read -enable_extrasample_as_alpha -enable_check_ycbcr_subsampling -enable_sphinx -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -LT_SYS_LIBRARY_PATH -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures LibTIFF Software 4.7.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tiff] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of LibTIFF Software 4.7.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --disable-ld-version-script - disable linker version script (default is enabled if - supported) - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-deprecated enable deprecated features (default is disabled) - --enable-rpath Enable runtime linker paths (-R libtool option) - --disable-largefile omit support for large files - --disable-tools Disable building of tools - --disable-tests Disable building of tests - --disable-contrib Disable building of contrib - --disable-docs Disable building of docs - --disable-ccitt disable support for CCITT Group 3 & 4 algorithms - --disable-packbits disable support for Macintosh PackBits algorithm - --disable-lzw disable support for LZW algorithm - --disable-thunder disable support for ThunderScan 4-bit RLE algorithm - --disable-next disable support for NeXT 2-bit RLE algorithm - --disable-logluv disable support for LogLuv high dynamic range - encoding - --disable-mdi disable support for Microsoft Document Imaging - --disable-zlib disable Zlib usage (required for Deflate - compression, enabled by default) - --disable-libdeflate disable libdeflate usage (optional for faster - Deflate support (still requires zlib), enabled by - default) - --disable-pixarlog disable support for Pixar log-format algorithm - (requires Zlib) - --disable-jpeg disable IJG JPEG library usage (required for JPEG - compression, enabled by default) - --disable-old-jpeg disable support for Old JPEG compression (read-only, - enabled by default) - --disable-jbig disable JBIG-KIT usage (required for ISO JBIG - compression, enabled by default) - --disable-lerc disable liblerc usage (required for lerc - compression, enabled by default) - --disable-lzma disable liblzma usage (required for LZMA2 - compression, enabled by default) - --disable-zstd disable libzstd usage (required for zstd - compression, enabled by default) - --disable-webp disable libwebp usage (required for webp - compression, enabled by default) - --enable-jpeg12 enable libjpeg 8/12bit dual mode (not to be used - with libjpeg-turbo >= 3.0) - --enable-cxx enable C++ stream API building (requires C++ - compiler) - --disable-opengl disable OpenGL usage (required by tiffgt, enabled by - default) - --disable-win32-io disable Win32 I/O (Windows only, enabled by default - except for Cygwin) - --disable-strip-chopping - disable support for strip chopping (whether or not - to convert single-strip uncompressed images to - multiple strips of specified size to reduce memory - usage) - --enable-defer-strile-load - enable deferred strip/tile offset/size loading (also - available at runtime with the 'D' flag of TIFFOpen() - --enable-chunky-strip-read - enable reading large strips in chunks for - TIFFReadScanline() (experimental) - --disable-extrasample-as-alpha - the RGBA interface will treat a fourth sample with - no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha - properly - --disable-check-ycbcr-subsampling - disable picking up YCbCr subsampling info from the - JPEG data stream to support files lacking the tag - --disable-sphinx disable building of the sphinx documentation - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-docdir=DIR directory where documentation should be installed - --with-zlib-include-dir=DIR - location of Zlib headers - --with-zlib-lib-dir=DIR location of Zlib library binary - --with-libdeflate-include-dir=DIR - location of libdeflate headers - --with-libdeflate-lib-dir=DIR - location of libdeflate library binary - --with-jpeg-include-dir=DIR - location of IJG JPEG library headers - --with-jpeg-lib-dir=DIR location of IJG JPEG library binary - --with-jbig-include-dir=DIR - location of JBIG-KIT headers - --with-jbig-lib-dir=DIR location of JBIG-KIT library binary - --with-lerc-include-dir=DIR - location of liblerc headers - --with-lerc-lib-dir=DIR location of liblerc library binary - --with-lzma-include-dir=DIR - location of liblzma headers - --with-lzma-lib-dir=DIR location of liblzma library binary - --with-zstd-include-dir=DIR - location of libzstd headers - --with-zstd-lib-dir=DIR location of libzstd library binary - --with-webp-include-dir=DIR - location of libwebp headers - --with-webp-lib-dir=DIR location of libwebp library binary - --with-jpeg12-include-dir=DIR - location of libjpeg 12bit headers - --with-jpeg12-lib=LIBRARY - path to libjpeg 12bit library - --with-x use the X Window System - --with-default-strip-size=SIZE - default size of the strip in bytes (when strip - chopping enabled) [[default=8192]] - --with-max-dir-count=SIZE - Maximum number of TIFF directories that libtiff can - browse through [[default=1048576]] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -LibTIFF Software configure 4.7.1 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------- ## -## Report this to tiff@lists.osgeo.org ## -## ----------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_decl - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by LibTIFF Software $as_me 4.7.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -am__api_version='1.16' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='tiff' - VERSION='4.7.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' - -# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } - if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } - if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_ustar-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 - (cat conftest.dir/file) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -LIBTIFF_MAJOR_VERSION=4 -LIBTIFF_MINOR_VERSION=7 -LIBTIFF_MICRO_VERSION=1 -LIBTIFF_ALPHA_VERSION= -LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION -LIBTIFF_RELEASE_DATE=$(cat ${srcdir}/RELEASE-DATE) - - -LIBTIFF_CURRENT=8 -LIBTIFF_REVISION=0 -LIBTIFF_AGE=2 -LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE - -# This is a special hack for OpenBSD and MirOS systems. The dynamic linker -# in OpenBSD uses some special semantics for shared libraries. Their soname -# contains only two numbers, major and minor. -# See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details. -#case "$host_os" in -# openbsd* | mirbsd*) -# LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION:0 -# ;; -# *) -# LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION -# ;; -#esac - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - # Necessary if objects are placed in subdirectories. - - - ansi= - if test -z "$ansi"; then - msg="for C compiler warning flags" - else - msg="for C compiler warning and ANSI conformance flags" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $msg" >&5 -$as_echo_n "checking $msg... " >&6; } -if ${vl_cv_prog_cc_warnings+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test -n "$CC"; then - cat > conftest.c <&1 | grep -i "WorkShop" > /dev/null 2>&1 && - $CC -c -v -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-v" - else - vl_cv_prog_cc_warnings="-v -Xc" - fi - - elif $CC -V 2>&1 | grep -i "Digital UNIX Compiler" > /dev/null 2>&1 && - $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos" - else - vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1" - fi - - elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 && - $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" - else - vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi" - fi - - elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 && - $CC -c -fullwarn -ansi -ansiE conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-fullwarn" - else - vl_cv_prog_cc_warnings="-fullwarn -ansi -ansiE" - fi - - elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 && - $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="+w1" - else - vl_cv_prog_cc_warnings="+w1 -Aa" - fi - - elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 && - $CC -c -pvctl,fullmsg -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-pvctl,fullmsg" - else - vl_cv_prog_cc_warnings="-pvctl,fullmsg -Xc" - fi - - elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 && - $CC -c -h msglevel 2 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-h msglevel 2" - else - vl_cv_prog_cc_warnings="-h msglevel 2 -h conform" - fi - - fi - rm -f conftest.* - fi - if test -n "$vl_cv_prog_cc_warnings"; then - CFLAGS="$CFLAGS $vl_cv_prog_cc_warnings" - else - vl_cv_prog_cc_warnings="unknown" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_prog_cc_warnings" >&5 -$as_echo "$vl_cv_prog_cc_warnings" >&6; } - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# Used only for validating the source distribution during distcheck -# Extract the first word of "cmake", so it can be a program name with args. -set dummy cmake; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CMAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CMAKE in - [\\/]* | ?:[\\/]*) - ac_cv_path_CMAKE="$CMAKE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CMAKE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -CMAKE=$ac_cv_path_CMAKE -if test -n "$CMAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMAKE" >&5 -$as_echo "$CMAKE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check if LD supports linker scripts, and define automake conditional -# HAVE_LD_VERSION_SCRIPT if so. This functionality is currently -# constrained to compilers using GNU ld on ELF systems or systems -# which provide an adequate emulation thereof. -# Check whether --enable-ld-version-script was given. -if test "${enable_ld_version_script+set}" = set; then : - enableval=$enable_ld_version_script; have_ld_version_script=$enableval -else - have_ld_version_script=yes -fi - -if test "$have_ld_version_script" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LD -Wl,--version-script works" >&5 -$as_echo_n "checking if LD -Wl,--version-script works... " >&6; } - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map <conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_ld_version_script=yes -else - have_ld_version_script=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - rm -f conftest.map - LDFLAGS="$save_LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ld_version_script" >&5 -$as_echo "$have_ld_version_script" >&6; } -fi - if test "$have_ld_version_script" = "yes"; then - HAVE_LD_VERSION_SCRIPT_TRUE= - HAVE_LD_VERSION_SCRIPT_FALSE='#' -else - HAVE_LD_VERSION_SCRIPT_TRUE='#' - HAVE_LD_VERSION_SCRIPT_FALSE= -fi - - - - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cr} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; -esac - -test -z "$AS" && AS=as - - - - - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - enable_dlopen=no - - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - link_all_deplibs=no - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - - -func_stripname_cnf () -{ - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; - esac -} # func_stripname_cnf - - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -reload_flag_CXX=$reload_flag -reload_cmds_CXX=$reload_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec_CXX='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath__CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath__CXX -fi - - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - fi - archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_CXX=' ' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=yes - file_list_spec_CXX='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' - enable_shared_with_static_runtimes_CXX=yes - # Don't use ranlib - old_postinstall_cmds_CXX='chmod 644 $oldlib' - postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec_CXX='' - fi - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs_CXX=yes - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - fi - - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" - reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" - ;; - *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no - - GCC_CXX=$GXX - LD_CXX=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p - else - postdeps_CXX="${postdeps_CXX} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - - - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - lt_prog_compiler_pic_CXX='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } -lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc_CXX=no - else - lt_cv_archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } - archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Enable support for silent build rules -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -tiff_libs_private= - - -tiff_requires_private= - - - - if test "$enable_static" = "yes"; then - BUILD_STATIC_TRUE= - BUILD_STATIC_FALSE='#' -else - BUILD_STATIC_TRUE='#' - BUILD_STATIC_FALSE= -fi - - -SAVED_CFLAGS="$CFLAGS" -CFLAGS=$(echo "$CFLAGS " | sed "s/-Werror //") - -case "${host_os}" in - cygwin* | mingw32* | beos* | darwin*) - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 -$as_echo_n "checking for sin in -lm... " >&6; } -if ${ac_cv_lib_m_sin+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sin (); -int -main () -{ -return sin (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sin=yes -else - ac_cv_lib_m_sin=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 -$as_echo "$ac_cv_lib_m_sin" >&6; } -if test "x$ac_cv_lib_m_sin" = xyes; then : - libm_lib=yes -else - libm_lib=no -fi - - if test "x$libm_lib" = "xyes" ; then - LIBS="-lm $LIBS" - tiff_libs_private="-lm ${tiff_libs_private}" - fi - ;; -esac - -for ac_header in assert.h fcntl.h io.h search.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef _BIG_ENDIAN - not big endian - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no -else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if ${ac_cv_sys_largefile_source+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - - -ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTARG $ac_have_decl -_ACEOF - - - -# Check whether --enable-deprecated was given. -if test "${enable_deprecated+set}" = set; then : - enableval=$enable_deprecated; enable_deprecated=$enableval -else - enable_deprecated=no -fi - - -if test "$enable_deprecated" = "yes"; then - # Disable deprecated features to ensure clean build - CPPFLAGS="-DTIFF_DISABLE_DEPRECATED $CPPFLAGS" -fi - - -# Obtain the size of 'size_t' and define as SIZEOF_SIZE_T. Result is -# available in ac_cv_sizeof_size_t -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -$as_echo_n "checking size of size_t... " >&6; } -if ${ac_cv_sizeof_size_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_size_t" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (size_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_size_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF - - - - -# C99 fixed-size integer types -INT8_T='int8_t' -UINT8_T='uint8_t' - -INT16_T='int16_t' -UINT16_T='uint16_t' - -INT32_T='int32_t' -UINT32_T='uint32_t' - -INT64_T='int64_t' -UINT64_T='uint64_t' - -if test $ac_cv_sizeof_size_t -eq 4 -then - SSIZE_T='int32_t' -elif test $ac_cv_sizeof_size_t -eq 8 -then - SSIZE_T='int64_t' -else - as_fn_error $? "Unsupported size_t size ${ac_cv_sizeof_size_t}; please add support" "$LINENO" 5 -fi - - -# Determine TIFF equivalent of ssize_t -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed size type" >&5 -$as_echo_n "checking for signed size type... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSIZE_T" >&5 -$as_echo "$SSIZE_T" >&6; } - -cat >>confdefs.h <<_ACEOF -#define TIFF_SSIZE_T $SSIZE_T -_ACEOF - - -for ac_func in mmap setmode -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" -if test "x$ac_cv_func_getopt" = xyes; then : - $as_echo "#define HAVE_GETOPT 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" getopt.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getopt.$ac_objext" - ;; -esac - -fi - - - -if test "$ac_cv_c_bigendian" = yes ; then - HOST_BIGENDIAN=1 -else - HOST_BIGENDIAN=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HOST_BIGENDIAN $HOST_BIGENDIAN -_ACEOF - - -#_POSIX_C_SOURCE=2 -#AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, $_POSIX_C_SOURCE, [Define this macro to a positive integer to control which POSIX functionality is made available.]) - -HAVE_IEEEFP=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_IEEEFP $HAVE_IEEEFP -_ACEOF - - - -# Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; HAVE_RPATH=$enableval -else - HAVE_RPATH=no -fi - - if test "$HAVE_RPATH" = "yes"; then - HAVE_RPATH_TRUE= - HAVE_RPATH_FALSE='#' -else - HAVE_RPATH_TRUE='#' - HAVE_RPATH_FALSE= -fi - - - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi - - -fi - - - -LIBTIFF_DOCDIR=\${prefix}/share/doc/${PACKAGE}-${LIBTIFF_VERSION} - - -# Check whether --with-docdir was given. -if test "${with_docdir+set}" = set; then : - withval=$with_docdir; -fi - -if test "x$with_docdir" != "x" ; then - LIBTIFF_DOCDIR=$with_docdir -fi - - - - - -# Check whether --enable-tools was given. -if test "${enable_tools+set}" = set; then : - enableval=$enable_tools; TIFF_TOOLS=$enableval -else - TIFF_TOOLS=yes -fi - - if test "$TIFF_TOOLS" = "yes"; then - TIFF_TOOLS_TRUE= - TIFF_TOOLS_FALSE='#' -else - TIFF_TOOLS_TRUE='#' - TIFF_TOOLS_FALSE= -fi - - -# Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then : - enableval=$enable_tests; TIFF_TESTS=$enableval -else - TIFF_TESTS=yes -fi - - if test "$TIFF_TESTS" = "yes"; then - TIFF_TESTS_TRUE= - TIFF_TESTS_FALSE='#' -else - TIFF_TESTS_TRUE='#' - TIFF_TESTS_FALSE= -fi - - -# Check whether --enable-contrib was given. -if test "${enable_contrib+set}" = set; then : - enableval=$enable_contrib; TIFF_CONTRIB=$enableval -else - TIFF_CONTRIB=yes -fi - - if test "$TIFF_CONTRIB" = "yes"; then - TIFF_CONTRIB_TRUE= - TIFF_CONTRIB_FALSE='#' -else - TIFF_CONTRIB_TRUE='#' - TIFF_CONTRIB_FALSE= -fi - - -# Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then : - enableval=$enable_docs; TIFF_DOCS=$enableval -else - TIFF_DOCS=yes -fi - - if test "$TIFF_DOCS" = "yes"; then - TIFF_DOCS_TRUE= - TIFF_DOCS_FALSE='#' -else - TIFF_DOCS_TRUE='#' - TIFF_DOCS_FALSE= -fi - - - - -# Check whether --enable-ccitt was given. -if test "${enable_ccitt+set}" = set; then : - enableval=$enable_ccitt; HAVE_CCITT=$enableval -else - HAVE_CCITT=yes -fi - - -if test "$HAVE_CCITT" = "yes" ; then - -$as_echo "#define CCITT_SUPPORT 1" >>confdefs.h - -fi - -# Check whether --enable-packbits was given. -if test "${enable_packbits+set}" = set; then : - enableval=$enable_packbits; HAVE_PACKBITS=$enableval -else - HAVE_PACKBITS=yes -fi - - -if test "$HAVE_PACKBITS" = "yes" ; then - -$as_echo "#define PACKBITS_SUPPORT 1" >>confdefs.h - -fi - -# Check whether --enable-lzw was given. -if test "${enable_lzw+set}" = set; then : - enableval=$enable_lzw; HAVE_LZW=$enableval -else - HAVE_LZW=yes -fi - - -if test "$HAVE_LZW" = "yes" ; then - -$as_echo "#define LZW_SUPPORT 1" >>confdefs.h - -fi - -# Check whether --enable-thunder was given. -if test "${enable_thunder+set}" = set; then : - enableval=$enable_thunder; HAVE_THUNDER=$enableval -else - HAVE_THUNDER=yes -fi - - -if test "$HAVE_THUNDER" = "yes" ; then - -$as_echo "#define THUNDER_SUPPORT 1" >>confdefs.h - -fi - -HAVE_NEXT=yes - -# Check whether --enable-next was given. -if test "${enable_next+set}" = set; then : - enableval=$enable_next; HAVE_NEXT=$enableval -else - HAVE_NEXT=yes -fi - - -if test "$HAVE_NEXT" = "yes" ; then - -$as_echo "#define NEXT_SUPPORT 1" >>confdefs.h - -fi - -# Check whether --enable-logluv was given. -if test "${enable_logluv+set}" = set; then : - enableval=$enable_logluv; HAVE_LOGLUV=$enableval -else - HAVE_LOGLUV=yes -fi - - -if test "$HAVE_LOGLUV" = "yes" ; then - -$as_echo "#define LOGLUV_SUPPORT 1" >>confdefs.h - -fi - - -# Check whether --enable-mdi was given. -if test "${enable_mdi+set}" = set; then : - enableval=$enable_mdi; HAVE_MDI=$enableval -else - HAVE_MDI=yes -fi - - -if test "$HAVE_MDI" = "yes" ; then - -$as_echo "#define MDI_SUPPORT 1" >>confdefs.h - -fi - - -HAVE_ZLIB=no - -# Check whether --enable-zlib was given. -if test "${enable_zlib+set}" = set; then : - enableval=$enable_zlib; -fi - - -# Check whether --with-zlib-include-dir was given. -if test "${with_zlib_include_dir+set}" = set; then : - withval=$with_zlib_include_dir; -fi - - -# Check whether --with-zlib-lib-dir was given. -if test "${with_zlib_lib_dir+set}" = set; then : - withval=$with_zlib_lib_dir; -fi - - -if test "x$enable_zlib" != "xno" ; then - - if test "x$with_zlib_lib_dir" != "x" ; then - LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5 -$as_echo_n "checking for inflateEnd in -lz... " >&6; } -if ${ac_cv_lib_z_inflateEnd+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inflateEnd (); -int -main () -{ -return inflateEnd (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflateEnd=yes -else - ac_cv_lib_z_inflateEnd=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5 -$as_echo "$ac_cv_lib_z_inflateEnd" >&6; } -if test "x$ac_cv_lib_z_inflateEnd" = xyes; then : - zlib_lib=yes -else - zlib_lib=no -fi - - if test "$zlib_lib" = "no" -a "x$with_zlib_lib_dir" != "x"; then - as_fn_error $? "Zlib library not found at $with_zlib_lib_dir" "$LINENO" 5 - fi - - if test "x$with_zlib_include_dir" != "x" ; then - CPPFLAGS="-I$with_zlib_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - zlib_h=yes -else - zlib_h=no -fi - - - if test "$zlib_h" = "no" -a "x$with_zlib_include_dir" != "x" ; then - as_fn_error $? "Zlib headers not found at $with_zlib_include_dir" "$LINENO" 5 - fi - - if test "$zlib_lib" = "yes" -a "$zlib_h" = "yes" ; then - HAVE_ZLIB=yes - fi - -fi - -if test "$HAVE_ZLIB" = "yes" ; then - -$as_echo "#define ZIP_SUPPORT 1" >>confdefs.h - - LIBS="-lz $LIBS" - tiff_libs_private="-lz ${tiff_libs_private}" - tiff_requires_private="zlib ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then - LIBDIR="-R $with_zlib_lib_dir $LIBDIR" - fi - -fi - - -HAVE_LIBDEFLATE=no - -# Check whether --enable-libdeflate was given. -if test "${enable_libdeflate+set}" = set; then : - enableval=$enable_libdeflate; -fi - - -# Check whether --with-libdeflate-include-dir was given. -if test "${with_libdeflate_include_dir+set}" = set; then : - withval=$with_libdeflate_include_dir; -fi - - -# Check whether --with-libdeflate-lib-dir was given. -if test "${with_libdeflate_lib_dir+set}" = set; then : - withval=$with_libdeflate_lib_dir; -fi - - -if test "x$enable_libdeflate" != "xno" ; then - - if test "x$with_libdeflate_lib_dir" != "x" ; then - LDFLAGS="-L$with_libdeflate_lib_dir $LDFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdeflate_zlib_decompress in -ldeflate" >&5 -$as_echo_n "checking for libdeflate_zlib_decompress in -ldeflate... " >&6; } -if ${ac_cv_lib_deflate_libdeflate_zlib_decompress+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldeflate $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char libdeflate_zlib_decompress (); -int -main () -{ -return libdeflate_zlib_decompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_deflate_libdeflate_zlib_decompress=yes -else - ac_cv_lib_deflate_libdeflate_zlib_decompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_deflate_libdeflate_zlib_decompress" >&5 -$as_echo "$ac_cv_lib_deflate_libdeflate_zlib_decompress" >&6; } -if test "x$ac_cv_lib_deflate_libdeflate_zlib_decompress" = xyes; then : - libdeflate_lib=yes -else - libdeflate_lib=no -fi - - if test "$libdeflate_lib" = "no" -a "x$with_libdeflate_lib_dir" != "x"; then - as_fn_error $? "libdeflate library not found at $with_libdeflate_lib_dir" "$LINENO" 5 - fi - - if test "x$with_libdeflate_include_dir" != "x" ; then - CPPFLAGS="-I$with_libdeflate_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "libdeflate.h" "ac_cv_header_libdeflate_h" "$ac_includes_default" -if test "x$ac_cv_header_libdeflate_h" = xyes; then : - libdeflate_h=yes -else - libdeflate_h=no -fi - - - if test "$libdeflate_h" = "no" -a "x$with_libdeflate_include_dir" != "x" ; then - as_fn_error $? "libdeflate headers not found at $with_libdeflate_include_dir" "$LINENO" 5 - fi - - if test "$libdeflate_lib" = "yes" -a "$libdeflate_h" = "yes" ; then - HAVE_LIBDEFLATE=yes - fi - -fi - -if test "$HAVE_LIBDEFLATE" = "yes" -a "$HAVE_ZLIB" = "no" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdeflate available but zlib is not. libdeflate cannot be used" >&5 -$as_echo "$as_me: WARNING: libdeflate available but zlib is not. libdeflate cannot be used" >&2;} - HAVE_LIBDEFLATE=no -fi - -if test "$HAVE_LIBDEFLATE" = "yes" ; then - -$as_echo "#define LIBDEFLATE_SUPPORT 1" >>confdefs.h - - LIBS="-ldeflate $LIBS" - tiff_libs_private="-ldeflate ${tiff_libs_private}" - tiff_requires_private="libdeflate ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_libdeflate_lib_dir" != "x" ; then - LIBDIR="-R $with_libdeflate_lib_dir $LIBDIR" - fi - -fi - - -# Check whether --enable-pixarlog was given. -if test "${enable_pixarlog+set}" = set; then : - enableval=$enable_pixarlog; HAVE_PIXARLOG=$enableval -else - HAVE_PIXARLOG=yes -fi - - -if test "$HAVE_ZLIB" = "yes" -a "$HAVE_PIXARLOG" = "yes" ; then - -$as_echo "#define PIXARLOG_SUPPORT 1" >>confdefs.h - -else - HAVE_PIXARLOG=no -fi - - -HAVE_JPEG=no -HAVE_JPEGTURBO_DUAL_MODE_8_12=no - -# Check whether --enable-jpeg was given. -if test "${enable_jpeg+set}" = set; then : - enableval=$enable_jpeg; -fi - - -# Check whether --with-jpeg-include-dir was given. -if test "${with_jpeg_include_dir+set}" = set; then : - withval=$with_jpeg_include_dir; -fi - - -# Check whether --with-jpeg-lib-dir was given. -if test "${with_jpeg_lib_dir+set}" = set; then : - withval=$with_jpeg_lib_dir; -fi - - -if test "x$enable_jpeg" != "xno" ; then - - if test "x$with_jpeg_lib_dir" != "x" ; then - LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS" - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_scanlines in -ljpeg" >&5 -$as_echo_n "checking for jpeg_read_scanlines in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_jpeg_read_scanlines+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljpeg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jpeg_read_scanlines (); -int -main () -{ -return jpeg_read_scanlines (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jpeg_jpeg_read_scanlines=yes -else - ac_cv_lib_jpeg_jpeg_read_scanlines=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_scanlines" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg_read_scanlines" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_read_scanlines" = xyes; then : - jpeg_lib=yes -else - jpeg_lib=no -fi - - if test "$jpeg_lib" = "no" -a "x$with_jpeg_lib_dir" != "x" ; then - as_fn_error $? "IJG JPEG library not found at $with_jpeg_lib_dir" "$LINENO" 5 - fi - - if test "x$with_jpeg_include_dir" != "x" ; then - CPPFLAGS="-I$with_jpeg_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" -if test "x$ac_cv_header_jpeglib_h" = xyes; then : - jpeg_h=yes -else - jpeg_h=no -fi - - - if test "$jpeg_h" = "no" -a "x$with_jpeg_include_dir" != "x" ; then - as_fn_error $? "IJG JPEG library headers not found at $with_jpeg_include_dir" "$LINENO" 5 - fi - - if test "$jpeg_lib" = "yes" -a "$jpeg_h" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg12_read_scanlines in -ljpeg" >&5 -$as_echo_n "checking for jpeg12_read_scanlines in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_jpeg12_read_scanlines+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljpeg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jpeg12_read_scanlines (); -int -main () -{ -return jpeg12_read_scanlines (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jpeg_jpeg12_read_scanlines=yes -else - ac_cv_lib_jpeg_jpeg12_read_scanlines=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg12_read_scanlines" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg12_read_scanlines" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg12_read_scanlines" = xyes; then : - HAVE_JPEGTURBO_DUAL_MODE_8_12=yes -else - HAVE_JPEGTURBO_DUAL_MODE_8_12=no -fi - - HAVE_JPEG=yes - fi - -fi - -if test "$HAVE_JPEG" = "yes" ; then - -$as_echo "#define JPEG_SUPPORT 1" >>confdefs.h - - LIBS="-ljpeg $LIBS" - tiff_libs_private="-ljpeg ${tiff_libs_private}" - tiff_requires_private="libjpeg ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then - LIBDIR="-R $with_jpeg_lib_dir $LIBDIR" - fi - - if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "yes"; then - -$as_echo "#define HAVE_JPEGTURBO_DUAL_MODE_8_12 1" >>confdefs.h - - fi -fi - - if test "$HAVE_JPEG" = 'yes'; then - HAVE_JPEG_TRUE= - HAVE_JPEG_FALSE='#' -else - HAVE_JPEG_TRUE='#' - HAVE_JPEG_FALSE= -fi - - if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = 'yes'; then - HAVE_JPEGTURBO_DUAL_MODE_8_12_TRUE= - HAVE_JPEGTURBO_DUAL_MODE_8_12_FALSE='#' -else - HAVE_JPEGTURBO_DUAL_MODE_8_12_TRUE='#' - HAVE_JPEGTURBO_DUAL_MODE_8_12_FALSE= -fi - - - -# Check whether --enable-old-jpeg was given. -if test "${enable_old_jpeg+set}" = set; then : - enableval=$enable_old_jpeg; HAVE_OJPEG=${enableval} -else - HAVE_OJPEG=yes -fi - - -if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then - -$as_echo "#define OJPEG_SUPPORT 1" >>confdefs.h - -else - HAVE_OJPEG=no -fi - - -HAVE_JBIG=no - -# Check whether --enable-jbig was given. -if test "${enable_jbig+set}" = set; then : - enableval=$enable_jbig; -fi - - -# Check whether --with-jbig-include-dir was given. -if test "${with_jbig_include_dir+set}" = set; then : - withval=$with_jbig_include_dir; -fi - - -# Check whether --with-jbig-lib-dir was given. -if test "${with_jbig_lib_dir+set}" = set; then : - withval=$with_jbig_lib_dir; -fi - - -if test "x$enable_jbig" != "xno" ; then - - if test "x$with_jbig_lib_dir" != "x" ; then - LDFLAGS="-L$with_jbig_lib_dir $LDFLAGS" - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jbg_dec_init in -ljbig" >&5 -$as_echo_n "checking for jbg_dec_init in -ljbig... " >&6; } -if ${ac_cv_lib_jbig_jbg_dec_init+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljbig $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jbg_dec_init (); -int -main () -{ -return jbg_dec_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jbig_jbg_dec_init=yes -else - ac_cv_lib_jbig_jbg_dec_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jbig_jbg_dec_init" >&5 -$as_echo "$ac_cv_lib_jbig_jbg_dec_init" >&6; } -if test "x$ac_cv_lib_jbig_jbg_dec_init" = xyes; then : - jbig_lib=yes -else - jbig_lib=no -fi - - if test "$jbig_lib" = "no" -a "x$with_jbig_lib_dir" != "x" ; then - as_fn_error $? "JBIG-KIT library not found at $with_jbig_lib_dir" "$LINENO" 5 - fi - - if test "x$with_jbig_include_dir" != "x" ; then - CPPFLAGS="-I$with_jbig_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "jbig.h" "ac_cv_header_jbig_h" "$ac_includes_default" -if test "x$ac_cv_header_jbig_h" = xyes; then : - jbig_h=yes -else - jbig_h=no -fi - - - if test "$jbig_h" = "no" -a "x$with_jbig_include_dir" != "x" ; then - as_fn_error $? "JBIG-KIT library headers not found at $with_jbig_include_dir" "$LINENO" 5 - fi - - if test "$jbig_lib" = "yes" -a "$jbig_h" = "yes" ; then - HAVE_JBIG=yes - fi - -fi - -if test "$HAVE_JBIG" = "yes" ; then - -$as_echo "#define JBIG_SUPPORT 1" >>confdefs.h - - LIBS="-ljbig $LIBS" - tiff_libs_private="-ljbig ${tiff_libs_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_jbig_lib_dir" != "x" ; then - LIBDIR="-R $with_jbig_lib_dir $LIBDIR" - fi - - # Older versions of jbigkit lack jbg_newlen - for ac_func in jbg_newlen -do : - ac_fn_c_check_func "$LINENO" "jbg_newlen" "ac_cv_func_jbg_newlen" -if test "x$ac_cv_func_jbg_newlen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_JBG_NEWLEN 1 -_ACEOF - -fi -done - - -fi - - if test "$HAVE_JBIG" = 'yes'; then - HAVE_JBIG_TRUE= - HAVE_JBIG_FALSE='#' -else - HAVE_JBIG_TRUE='#' - HAVE_JBIG_FALSE= -fi - - - -HAVE_LERC=no - -# Check whether --enable-lerc was given. -if test "${enable_lerc+set}" = set; then : - enableval=$enable_lerc; -fi - - -# Check whether --with-lerc-include-dir was given. -if test "${with_lerc_include_dir+set}" = set; then : - withval=$with_lerc_include_dir; -fi - - -# Check whether --with-lerc-lib-dir was given. -if test "${with_lerc_lib_dir+set}" = set; then : - withval=$with_lerc_lib_dir; -fi - - -if test "x$enable_lerc" != "xno" ; then - - if test "x$with_lerc_lib_dir" != "x" ; then - LDFLAGS="-L$with_lerc_lib_dir $LDFLAGS" - fi - - lerc_lib_name="LercLib" - as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5 -$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l"$lerc_lib_name" $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lerc_decode (); -int -main () -{ -return lerc_decode (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - lerc_lib=yes -else - lerc_lib=no -fi - - if test "$lerc_lib" = "no" ; then - lerc_lib_name="Lerc" - as_ac_Lib=`$as_echo "ac_cv_lib_"$lerc_lib_name"''_lerc_decode" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lerc_decode in -l\"$lerc_lib_name\"" >&5 -$as_echo_n "checking for lerc_decode in -l\"$lerc_lib_name\"... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l"$lerc_lib_name" $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lerc_decode (); -int -main () -{ -return lerc_decode (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - lerc_lib=yes -else - lerc_lib=no -fi - - fi - if test "$lerc_lib" = "no" -a "x$with_lerc_lib_dir" != "x"; then - as_fn_error $? "lerc library not found at $with_lerc_lib_dir" "$LINENO" 5 - fi - - if test "x$with_lerc_include_dir" != "x" ; then - CPPFLAGS="-I$with_lerc_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "Lerc_c_api.h" "ac_cv_header_Lerc_c_api_h" "$ac_includes_default" -if test "x$ac_cv_header_Lerc_c_api_h" = xyes; then : - lerc_c_api_h=yes -else - lerc_c_api_h=no -fi - - - if test "$lerc_c_api_h" = "no" -a "x$with_lerc_include_dir" != "x" ; then - as_fn_error $? "Liblerc headers not found at $with_lerc_include_dir" "$LINENO" 5 - fi - - if test "$lerc_lib" = "yes" -a "$lerc_c_api_h" = "yes" ; then - HAVE_LERC=yes - fi - -fi - -if test "$HAVE_LERC" = "yes" ; then - -$as_echo "#define LERC_SUPPORT 1" >>confdefs.h - - LIBS="-l${lerc_lib_name} $LIBS" - tiff_libs_private="-l${lerc_lib_name} ${tiff_libs_private}" - tiff_requires_private="Lerc ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_lerc_lib_dir" != "x" ; then - LIBDIR="-R $with_lerc_lib_dir $LIBDIR" - fi - - if test "$enable_static" != "no"; then - -$as_echo "#define LERC_STATIC 1" >>confdefs.h - - fi -fi - - if test "$HAVE_LERC" = 'yes'; then - HAVE_LERC_TRUE= - HAVE_LERC_FALSE='#' -else - HAVE_LERC_TRUE='#' - HAVE_LERC_FALSE= -fi - - - -HAVE_LZMA=no - -# Check whether --enable-lzma was given. -if test "${enable_lzma+set}" = set; then : - enableval=$enable_lzma; -fi - - -# Check whether --with-lzma-include-dir was given. -if test "${with_lzma_include_dir+set}" = set; then : - withval=$with_lzma_include_dir; -fi - - -# Check whether --with-lzma-lib-dir was given. -if test "${with_lzma_lib_dir+set}" = set; then : - withval=$with_lzma_lib_dir; -fi - - -if test "x$enable_lzma" != "xno" ; then - - if test "x$with_lzma_lib_dir" != "x" ; then - LDFLAGS="-L$with_lzma_lib_dir $LDFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5 -$as_echo_n "checking for lzma_code in -llzma... " >&6; } -if ${ac_cv_lib_lzma_lzma_code+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzma $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lzma_code (); -int -main () -{ -return lzma_code (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzma_lzma_code=yes -else - ac_cv_lib_lzma_lzma_code=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5 -$as_echo "$ac_cv_lib_lzma_lzma_code" >&6; } -if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then : - lzma_lib=yes -else - lzma_lib=no -fi - - if test "$lzma_lib" = "no" -a "x$with_lzma_lib_dir" != "x"; then - as_fn_error $? "lzma library not found at $with_lzma_lib_dir" "$LINENO" 5 - fi - - if test "x$with_lzma_include_dir" != "x" ; then - CPPFLAGS="-I$with_lzma_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default" -if test "x$ac_cv_header_lzma_h" = xyes; then : - lzma_h=yes -else - lzma_h=no -fi - - - if test "$lzma_h" = "no" -a "x$with_lzma_include_dir" != "x" ; then - as_fn_error $? "Liblzma headers not found at $with_lzma_include_dir" "$LINENO" 5 - fi - - if test "$lzma_lib" = "yes" -a "$lzma_h" = "yes" ; then - HAVE_LZMA=yes - fi - -fi - -if test "$HAVE_LZMA" = "yes" ; then - -$as_echo "#define LZMA_SUPPORT 1" >>confdefs.h - - LIBS="-llzma $LIBS" - tiff_libs_private="-llzma ${tiff_libs_private}" - tiff_requires_private="liblzma ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_lzma_lib_dir" != "x" ; then - LIBDIR="-R $with_lzma_lib_dir $LIBDIR" - fi - -fi - - if test "$HAVE_LZMA" = 'yes'; then - HAVE_LZMA_TRUE= - HAVE_LZMA_FALSE='#' -else - HAVE_LZMA_TRUE='#' - HAVE_LZMA_FALSE= -fi - - - -HAVE_ZSTD=no - -# Check whether --enable-zstd was given. -if test "${enable_zstd+set}" = set; then : - enableval=$enable_zstd; -fi - - -# Check whether --with-zstd-include-dir was given. -if test "${with_zstd_include_dir+set}" = set; then : - withval=$with_zstd_include_dir; -fi - - -# Check whether --with-zstd-lib-dir was given. -if test "${with_zstd_lib_dir+set}" = set; then : - withval=$with_zstd_lib_dir; -fi - - -if test "x$enable_zstd" != "xno" ; then - - if test "x$with_zstd_lib_dir" != "x" ; then - LDFLAGS="-L$with_zstd_lib_dir $LDFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5 -$as_echo_n "checking for ZSTD_decompressStream in -lzstd... " >&6; } -if ${ac_cv_lib_zstd_ZSTD_decompressStream+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lzstd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ZSTD_decompressStream (); -int -main () -{ -return ZSTD_decompressStream (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_zstd_ZSTD_decompressStream=yes -else - ac_cv_lib_zstd_ZSTD_decompressStream=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5 -$as_echo "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; } -if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes; then : - zstd_lib=yes -else - zstd_lib=no -fi - - if test "$zstd_lib" = "no" -a "x$with_zstd_lib_dir" != "x"; then - as_fn_error $? "zstd library not found at $with_zstd_lib_dir" "$LINENO" 5 - fi - - if test "x$with_zstd_include_dir" != "x" ; then - CPPFLAGS="-I$with_zstd_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default" -if test "x$ac_cv_header_zstd_h" = xyes; then : - zstd_h=yes -else - zstd_h=no -fi - - - if test "$zstd_h" = "no" -a "x$with_zstd_include_dir" != "x" ; then - as_fn_error $? "Libzstd headers not found at $with_zstd_include_dir" "$LINENO" 5 - fi - - if test "$zstd_lib" = "yes" -a "$zstd_h" = "yes" ; then - HAVE_ZSTD=yes - fi - -fi - -if test "$HAVE_ZSTD" = "yes" ; then - -$as_echo "#define ZSTD_SUPPORT 1" >>confdefs.h - - LIBS="-lzstd $LIBS" - tiff_libs_private="-lzstd ${tiff_libs_private}" - tiff_requires_private="libzstd ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_zstd_lib_dir" != "x" ; then - LIBDIR="-R $with_zstd_lib_dir $LIBDIR" - fi - -fi - - if test "$HAVE_ZSTD" = 'yes'; then - HAVE_ZSTD_TRUE= - HAVE_ZSTD_FALSE='#' -else - HAVE_ZSTD_TRUE='#' - HAVE_ZSTD_FALSE= -fi - - - -HAVE_WEBP=no - -# Check whether --enable-webp was given. -if test "${enable_webp+set}" = set; then : - enableval=$enable_webp; -fi - - -# Check whether --with-webp-include-dir was given. -if test "${with_webp_include_dir+set}" = set; then : - withval=$with_webp_include_dir; -fi - - -# Check whether --with-webp-lib-dir was given. -if test "${with_webp_lib_dir+set}" = set; then : - withval=$with_webp_lib_dir; -fi - - -if test "x$enable_webp" != "xno" ; then - - if test "x$with_webp_lib_dir" != "x" ; then - LDFLAGS="-L$with_webp_lib_dir $LDFLAGS" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WebPDecode in -lwebp" >&5 -$as_echo_n "checking for WebPDecode in -lwebp... " >&6; } -if ${ac_cv_lib_webp_WebPDecode+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lwebp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char WebPDecode (); -int -main () -{ -return WebPDecode (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_webp_WebPDecode=yes -else - ac_cv_lib_webp_WebPDecode=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_webp_WebPDecode" >&5 -$as_echo "$ac_cv_lib_webp_WebPDecode" >&6; } -if test "x$ac_cv_lib_webp_WebPDecode" = xyes; then : - webp_lib=yes -else - webp_lib=no -fi - - if test "$webp_lib" = "no" -a "x$with_webp_lib_dir" != "x"; then - as_fn_error $? "webp library not found at $with_webp_lib_dir" "$LINENO" 5 - fi - - if test "x$with_webp_include_dir" != "x" ; then - CPPFLAGS="-I$with_webp_include_dir $CPPFLAGS" - fi - ac_fn_c_check_header_mongrel "$LINENO" "webp/decode.h" "ac_cv_header_webp_decode_h" "$ac_includes_default" -if test "x$ac_cv_header_webp_decode_h" = xyes; then : - webp_h=yes -else - webp_h=no -fi - - - if test "$webp_h" = "no" -a "x$with_webp_include_dir" != "x" ; then - as_fn_error $? "Libwebp headers not found at $with_webp_include_dir" "$LINENO" 5 - fi - - if test "$webp_lib" = "yes" -a "$webp_h" = "yes" ; then - HAVE_WEBP=yes - fi - -fi - -if test "$HAVE_WEBP" = "yes" ; then - -$as_echo "#define WEBP_SUPPORT 1" >>confdefs.h - - LIBS="-lwebp $LIBS" - tiff_libs_private="-lwebp ${tiff_libs_private}" - tiff_requires_private="libwebp ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_webp_lib_dir" != "x" ; then - LIBDIR="-R $with_webp_lib_dir $LIBDIR" - fi - -fi - - if test "$HAVE_WEBP" = 'yes'; then - HAVE_WEBP_TRUE= - HAVE_WEBP_FALSE='#' -else - HAVE_WEBP_TRUE='#' - HAVE_WEBP_FALSE= -fi - - - -if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "no"; then - HAVE_JPEG12=no - - # Check whether --enable-jpeg12 was given. -if test "${enable_jpeg12+set}" = set; then : - enableval=$enable_jpeg12; -fi - - -# Check whether --with-jpeg12-include-dir was given. -if test "${with_jpeg12_include_dir+set}" = set; then : - withval=$with_jpeg12_include_dir; -fi - - -# Check whether --with-jpeg12-lib was given. -if test "${with_jpeg12_lib+set}" = set; then : - withval=$with_jpeg12_lib; -fi - - - if test "x$enable_jpeg12" = "xyes" ; then - - if test "x$with_jpeg12_lib" != "x" ; then - LIBS="$with_jpeg12_lib $LIBS" - fi - - HAVE_JPEG12=yes - - -$as_echo "#define JPEG_DUAL_MODE_8_12 1" >>confdefs.h - - if test "x$with_jpeg12_include_dir" != "x" ; then - -cat >>confdefs.h <<_ACEOF -#define LIBJPEG_12_PATH "$with_jpeg12_include_dir/jpeglib.h" -_ACEOF - - fi - fi -fi - - -# Check whether --enable-cxx was given. -if test "${enable_cxx+set}" = set; then : - enableval=$enable_cxx; HAVE_CXX=$enableval -else - HAVE_CXX=yes -fi - - -if test "$HAVE_CXX" = "yes" ; then - -$as_echo "#define CXX_SUPPORT 1" >>confdefs.h - -else - HAVE_CXX=no -fi - - if test "$HAVE_CXX" = "yes"; then - HAVE_CXX_TRUE= - HAVE_CXX_FALSE='#' -else - HAVE_CXX_TRUE='#' - HAVE_CXX_FALSE= -fi - - - -HAVE_OPENGL=no - -# Check whether --enable-opengl was given. -if test "${enable_opengl+set}" = set; then : - enableval=$enable_opengl; -fi - - -if test "x$enable_opengl" != "xno" ; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R7/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # We can compile using X headers with no special include directory. -ac_x_includes= -else - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_dnet_ntoa=yes -else - ac_cv_lib_dnet_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes; then : - -fi - - if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_gethostbyname=yes -else - ac_cv_lib_nsl_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bsd_gethostbyname=yes -else - ac_cv_lib_bsd_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes; then : - -fi - - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if ${ac_cv_lib_socket_connect+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_connect=yes -else - ac_cv_lib_socket_connect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = xyes; then : - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = xyes; then : - -fi - - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if ${ac_cv_lib_posix_remove+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_posix_remove=yes -else - ac_cv_lib_posix_remove=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = xyes; then : - -fi - - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if ${ac_cv_lib_ipc_shmat+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ipc_shmat=yes -else - ac_cv_lib_ipc_shmat=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ICE_IceConnectionNumber=yes -else - ac_cv_lib_ICE_IceConnectionNumber=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - - -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - - - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - - - -case "${host_cpu}-${host_os}" in - *solaris*) - - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - *-darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ax_pthread_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void* a) {a=0;} - static void* start_routine(void* a) {return a;} -int -main () -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th,0,start_routine,0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr=$attr; return attr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -$as_echo "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -$as_echo "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - if test x"$GCC" != xyes; then - for ac_prog in xlc_r cc_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PTHREAD_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" - - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - - - - - -if test x"$ax_pthread_ok" = xyes; then - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - - : -else - ax_pthread_ok=no - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5 -$as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; } -if ${ax_cv_c_compiler_ms+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef _MSC_VER - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_compiler_ms=yes -else - ax_compiler_ms=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ax_cv_c_compiler_ms=$ax_compiler_ms - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5 -$as_echo "$ax_cv_c_compiler_ms" >&6; } -if test X$ax_compiler_ms = Xno; then : - GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm" -fi - -if test "X$no_x" != "Xyes"; then : - if test -n "$x_includes"; then : - GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}" -fi - if test -n "$x_libraries"; then : - GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}" -fi -fi - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -for ac_header in GL/gl.h OpenGL/gl.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -CPPFLAGS="${ax_save_CPPFLAGS}" - -for ac_header in windows.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 -_ACEOF - -fi - -done - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL library" >&5 -$as_echo_n "checking for OpenGL library... " >&6; } -if ${ax_cv_check_gl_libgl+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_check_gl_libgl="no" -case $host_cpu in - x86_64) ax_check_gl_libdir=lib64 ;; - *) ax_check_gl_libdir=lib ;; -esac -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" -LIBS="" -ax_check_libs="-lopengl32 -lGL" -for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then : - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` -else - ax_try_lib="${ax_lib}" -fi - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GL_H -# include -# elif defined(HAVE_OPENGL_GL_H) -# include -# else -# error no gl.h -# endif -int -main () -{ -glBegin(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_gl_libgl="${ax_try_lib}"; break -else - ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GL_H -# include -# elif defined(HAVE_OPENGL_GL_H) -# include -# else -# error no gl.h -# endif -int -main () -{ -glBegin(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break -else - ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GL_H -# include -# elif defined(HAVE_OPENGL_GL_H) -# include -# else -# error no gl.h -# endif -int -main () -{ -glBegin(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -done - -if test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes; then : - LIBS='-framework OpenGL' -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GL_H -# include -# elif defined(HAVE_OPENGL_GL_H) -# include -# else -# error no gl.h -# endif -int -main () -{ -glBegin(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_gl_libgl="$LIBS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -LIBS=${ax_save_LIBS} -CPPFLAGS=${ax_save_CPPFLAGS} -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_libgl" >&5 -$as_echo "$ax_cv_check_gl_libgl" >&6; } - -if test "X$ax_cv_check_gl_libgl" = Xno; then : - no_gl=yes; GL_CFLAGS=""; GL_LIBS="" -else - GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - GLU_CFLAGS="${GL_CFLAGS}" - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -for ac_header in GL/glu.h OpenGL/glu.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -CPPFLAGS="${ax_save_CPPFLAGS}" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility library" >&5 -$as_echo_n "checking for OpenGL Utility library... " >&6; } -if ${ax_cv_check_glu_libglu+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_check_glu_libglu="no" -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" - -LIBS="${GL_LIBS} ${ax_save_LIBS}" -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -if test X$ax_compiler_ms = Xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLU_H -# include -# elif defined(HAVE_OPENGL_GLU_H) -# include -# else -# error no glu.h -# endif -int -main () -{ -gluBeginCurve(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_glu_libglu=yes -else - LIBS="" -ax_check_libs="-lglu32 -lGLU" -for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then : - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` -else - ax_try_lib="${ax_lib}" -fi - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLU_H -# include -# elif defined(HAVE_OPENGL_GLU_H) -# include -# else -# error no glu.h -# endif -int -main () -{ -gluBeginCurve(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_glu_libglu="${ax_try_lib}"; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -done - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test X$ax_compiler_ms = Xyes; then : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -LIBS=${ax_save_LIBS} -CPPFLAGS=${ax_save_CPPFLAGS} -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_libglu" >&5 -$as_echo "$ax_cv_check_glu_libglu" >&6; } -if test "X$ax_cv_check_glu_libglu" = Xno; then : - no_glu=yes; GLU_CFLAGS=""; GLU_LIBS="" -else - if test "X$ax_cv_check_glu_libglu" = Xyes; then : - GLU_LIBS="$GL_LIBS" -else - GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}" -fi -fi - - - -if test "X$ax_cv_check_glu_libglu" != Xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for varargs GLU tesselator callback function type" >&5 -$as_echo_n "checking for varargs GLU tesselator callback function type... " >&6; } -if ${ax_cv_varargs_glu_tesscb+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_varargs_glu_tesscb=no -ax_save_CFLAGS="$CFLAGS" -CFLAGS="$GL_CFLAGS $CFLAGS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# ifdef HAVE_GL_GLU_H -# include -# else -# include -# endif -int -main () -{ -GLvoid (*func)(...); gluTessCallback(0, 0, func) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_varargs_glu_tesscb=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$ax_save_CFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_varargs_glu_tesscb" >&5 -$as_echo "$ax_cv_varargs_glu_tesscb" >&6; } -if test X$ax_cv_varargs_glu_tesscb = Xyes; then : - -$as_echo "#define HAVE_VARARGS_GLU_TESSCB 1" >>confdefs.h - -fi -fi - - - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" -for ac_header in GL/glut.h GLUT/glut.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -CPPFLAGS="${ax_save_CPPFLAGS}" - -GLUT_CFLAGS=${GLU_CFLAGS} -GLUT_LIBS=${GLU_LIBS} - - - -if test X$no_x != Xyes; then : - GLUT_LIBS="${X_PRE_LIBS} -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLUT library" >&5 -$as_echo_n "checking for GLUT library... " >&6; } -if ${ax_cv_check_glut_libglut+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_check_glut_libglut="no" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" -LIBS="" -ax_check_libs="-lglut32 -lglut" -for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then : - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` -else - ax_try_lib="${ax_lib}" -fi - LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if HAVE_WINDOWS_H && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLUT_H -# include -# elif defined(HAVE_GLUT_GLUT_H) -# include -# else -# error no glut.h -# endif -int -main () -{ -glutMainLoop() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_glut_libglut="${ax_try_lib}"; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -done - -if test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes; then : - LIBS='-framework GLUT' -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if HAVE_WINDOWS_H && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLUT_H -# include -# elif defined(HAVE_GLUT_GLUT_H) -# include -# else -# error no glut.h -# endif -int -main () -{ -glutMainLoop() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv_check_glut_libglut="$LIBS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -CPPFLAGS="${ax_save_CPPFLAGS}" -LIBS="${ax_save_LIBS}" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_libglut" >&5 -$as_echo "$ax_cv_check_glut_libglut" >&6; } - -if test "X$ax_cv_check_glut_libglut" = Xno; then : - no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS="" -else - GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}" -fi - - - - - - if test "$no_x" != "yes" -a "$no_gl" != "yes" \ - -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then - HAVE_OPENGL=yes - fi -fi - - if test "$HAVE_OPENGL" = "yes"; then - HAVE_OPENGL_TRUE= - HAVE_OPENGL_FALSE='#' -else - HAVE_OPENGL_TRUE='#' - HAVE_OPENGL_FALSE= -fi - - - -# Check whether --enable-win32-io was given. -if test "${enable_win32_io+set}" = set; then : - enableval=$enable_win32_io; -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : - -fi - - - -win32_io_ok=no -case "${host_os}" in - cygwin*) - if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then - win32_io_ok=yes - fi - ;; - *) - if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then - win32_io_ok=yes - fi - ;; -esac - -if test "$win32_io_ok" = "yes" ; then - -$as_echo "#define USE_WIN32_FILEIO 1" >>confdefs.h - -fi - - if test "$win32_io_ok" = yes; then - WIN32_IO_TRUE= - WIN32_IO_FALSE='#' -else - WIN32_IO_TRUE='#' - WIN32_IO_FALSE= -fi - - - - - - - - - -# Check whether --enable-strip-chopping was given. -if test "${enable_strip_chopping+set}" = set; then : - enableval=$enable_strip_chopping; HAVE_STRIPCHOP=$enableval -else - HAVE_STRIPCHOP=yes -fi - - -# Check whether --with-default-strip-size was given. -if test "${with_default_strip_size+set}" = set; then : - withval=$with_default_strip_size; -fi - - -if test "$HAVE_STRIPCHOP" = "yes" \ - -a "x$with_default_strip_size" != "xno"; then - -$as_echo "#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP" >>confdefs.h - - - if test "x$with_default_strip_size" = "x" \ - -o "x$with_default_strip_size" = "xyes"; then - with_default_strip_size="8192" - fi - - -cat >>confdefs.h <<_ACEOF -#define STRIP_SIZE_DEFAULT $with_default_strip_size -_ACEOF - - -fi - - - -# Check whether --with-max-dir-count was given. -if test "${with_max_dir_count+set}" = set; then : - withval=$with_max_dir_count; -fi - - -if test "x$with_max_dir_count" = "x" -o "x$with_max_dir_count" = "xyes"; then - with_max_dir_count="1048576" -fi - - -cat >>confdefs.h <<_ACEOF -#define TIFF_MAX_DIR_COUNT $with_max_dir_count -_ACEOF - - - -# Check whether --enable-defer-strile-load was given. -if test "${enable_defer_strile_load+set}" = set; then : - enableval=$enable_defer_strile_load; HAVE_DEFER_STRILE_LOAD=$enableval -else - HAVE_DEFER_STRILE_LOAD=no -fi - - -if test "$HAVE_DEFER_STRILE_LOAD" = "yes" ; then - -$as_echo "#define DEFER_STRILE_LOAD 1" >>confdefs.h - - -fi - - -# Check whether --enable-chunky-strip-read was given. -if test "${enable_chunky_strip_read+set}" = set; then : - enableval=$enable_chunky_strip_read; HAVE_CHUNKY_STRIP_READ=$enableval -else - HAVE_CHUNKY_STRIP_READ=no -fi - - -if test "$HAVE_CHUNKY_STRIP_READ" = "yes" ; then - -$as_echo "#define CHUNKY_STRIP_READ_SUPPORT 1" >>confdefs.h - - -fi - - -$as_echo "#define SUBIFD_SUPPORT 1" >>confdefs.h - - - -# Check whether --enable-extrasample-as-alpha was given. -if test "${enable_extrasample_as_alpha+set}" = set; then : - enableval=$enable_extrasample_as_alpha; HAVE_EXTRASAMPLE_AS_ALPHA=$enableval -else - HAVE_EXTRASAMPLE_AS_ALPHA=yes -fi - - -if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then - -$as_echo "#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1" >>confdefs.h - -fi - - -# Check whether --enable-check-ycbcr-subsampling was given. -if test "${enable_check_ycbcr_subsampling+set}" = set; then : - enableval=$enable_check_ycbcr_subsampling; CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval -else - CHECK_JPEG_YCBCR_SUBSAMPLING=yes -fi - - -if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then - -$as_echo "#define CHECK_JPEG_YCBCR_SUBSAMPLING 1" >>confdefs.h - -fi - -for python in python3.16 python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python; do - for ac_prog in $python -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON_BIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON_BIN"; then - ac_cv_prog_PYTHON_BIN="$PYTHON_BIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON_BIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON_BIN=$ac_cv_prog_PYTHON_BIN -if test -n "$PYTHON_BIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BIN" >&5 -$as_echo "$PYTHON_BIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON_BIN" && break -done - - if test "x$PYTHON_BIN" != "x"; then - break - fi -done - -# Check whether --enable-sphinx was given. -if test "${enable_sphinx+set}" = set; then : - enableval=$enable_sphinx; BUILD_SPHINX=$enableval -else - BUILD_SPHINX=yes -fi - - - - -# Extract the first word of "sphinx-build", so it can be a program name with args. -set dummy sphinx-build; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_SPHINX_BUILD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $SPHINX_BUILD in - [\\/]* | ?:[\\/]*) - ac_cv_path_SPHINX_BUILD="$SPHINX_BUILD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_SPHINX_BUILD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_SPHINX_BUILD" && ac_cv_path_SPHINX_BUILD="no" - ;; -esac -fi -SPHINX_BUILD=$ac_cv_path_SPHINX_BUILD -if test -n "$SPHINX_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINX_BUILD" >&5 -$as_echo "$SPHINX_BUILD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test "$BUILD_SPHINX" = yes -a "$SPHINX_BUILD" != no -a "x$PYTHON_BIN" != "x"; then - SPHINX_TRUE= - SPHINX_FALSE='#' -else - SPHINX_TRUE='#' - SPHINX_FALSE= -fi - - -if test "x$PYTHON_BIN" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking generated manual pages" >&5 -$as_echo_n "checking generated manual pages... " >&6; } - TIFF_MAN1_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.1$")) - TIFF_MAN3_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.3tiff$")) - TIFF_MAN_RULES=$("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | sed -e 's;$;: all-local;') - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } -fi - -if test -d "${srcdir}/doc/man-prebuilt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking prebuilt manual pages" >&5 -$as_echo_n "checking prebuilt manual pages... " >&6; } - TIFF_MAN1_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.1)) - TIFF_MAN3_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.3tiff)) - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } -fi - - -CFLAGS="$SAVED_CFLAGS" - - - -ac_config_headers="$ac_config_headers config/config.h libtiff/tif_config.h libtiff/tiffconf.h port/libport_config.h" - - -ac_config_files="$ac_config_files Makefile build/Makefile contrib/Makefile contrib/addtiffo/Makefile contrib/dbs/Makefile contrib/dbs/xtiff/Makefile contrib/iptcutil/Makefile contrib/mfs/Makefile contrib/pds/Makefile contrib/ras/Makefile contrib/stream/Makefile contrib/tags/Makefile contrib/win_dib/Makefile doc/Makefile libtiff-4.pc libtiff/Makefile libtiff/tiffvers.h port/Makefile test/Makefile tools/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_STATIC_TRUE}" && test -z "${BUILD_STATIC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_STATIC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -if test -z "${HAVE_RPATH_TRUE}" && test -z "${HAVE_RPATH_FALSE}"; then - as_fn_error $? "conditional \"HAVE_RPATH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${TIFF_TOOLS_TRUE}" && test -z "${TIFF_TOOLS_FALSE}"; then - as_fn_error $? "conditional \"TIFF_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${TIFF_TESTS_TRUE}" && test -z "${TIFF_TESTS_FALSE}"; then - as_fn_error $? "conditional \"TIFF_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${TIFF_CONTRIB_TRUE}" && test -z "${TIFF_CONTRIB_FALSE}"; then - as_fn_error $? "conditional \"TIFF_CONTRIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${TIFF_DOCS_TRUE}" && test -z "${TIFF_DOCS_FALSE}"; then - as_fn_error $? "conditional \"TIFF_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then - as_fn_error $? "conditional \"HAVE_JPEG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_JPEGTURBO_DUAL_MODE_8_12_TRUE}" && test -z "${HAVE_JPEGTURBO_DUAL_MODE_8_12_FALSE}"; then - as_fn_error $? "conditional \"HAVE_JPEGTURBO_DUAL_MODE_8_12\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_JBIG_TRUE}" && test -z "${HAVE_JBIG_FALSE}"; then - as_fn_error $? "conditional \"HAVE_JBIG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LERC_TRUE}" && test -z "${HAVE_LERC_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LERC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_LZMA_TRUE}" && test -z "${HAVE_LZMA_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LZMA\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_ZSTD_TRUE}" && test -z "${HAVE_ZSTD_FALSE}"; then - as_fn_error $? "conditional \"HAVE_ZSTD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_WEBP_TRUE}" && test -z "${HAVE_WEBP_FALSE}"; then - as_fn_error $? "conditional \"HAVE_WEBP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_OPENGL_TRUE}" && test -z "${HAVE_OPENGL_FALSE}"; then - as_fn_error $? "conditional \"HAVE_OPENGL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WIN32_IO_TRUE}" && test -z "${WIN32_IO_FALSE}"; then - as_fn_error $? "conditional \"WIN32_IO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SPHINX_TRUE}" && test -z "${SPHINX_FALSE}"; then - as_fn_error $? "conditional \"SPHINX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by LibTIFF Software $as_me 4.7.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -LibTIFF Software config.status 4.7.1 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' -predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' -predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' -postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' -reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' -reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in AS \ -DLLTOOL \ -OBJDUMP \ -SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -reload_flag_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_separator_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ -reload_cmds_CXX \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX \ -postlink_cmds_CXX; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS config/config.h" ;; - "libtiff/tif_config.h") CONFIG_HEADERS="$CONFIG_HEADERS libtiff/tif_config.h" ;; - "libtiff/tiffconf.h") CONFIG_HEADERS="$CONFIG_HEADERS libtiff/tiffconf.h" ;; - "port/libport_config.h") CONFIG_HEADERS="$CONFIG_HEADERS port/libport_config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;; - "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; - "contrib/addtiffo/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/addtiffo/Makefile" ;; - "contrib/dbs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dbs/Makefile" ;; - "contrib/dbs/xtiff/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dbs/xtiff/Makefile" ;; - "contrib/iptcutil/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/iptcutil/Makefile" ;; - "contrib/mfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/mfs/Makefile" ;; - "contrib/pds/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/pds/Makefile" ;; - "contrib/ras/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/ras/Makefile" ;; - "contrib/stream/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/stream/Makefile" ;; - "contrib/tags/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/tags/Makefile" ;; - "contrib/win_dib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/win_dib/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "libtiff-4.pc") CONFIG_FILES="$CONFIG_FILES libtiff-4.pc" ;; - "libtiff/Makefile") CONFIG_FILES="$CONFIG_FILES libtiff/Makefile" ;; - "libtiff/tiffvers.h") CONFIG_FILES="$CONFIG_FILES libtiff/tiffvers.h" ;; - "port/Makefile") CONFIG_FILES="$CONFIG_FILES port/Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='CXX ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Assembler program. -AS=$lt_AS - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Object dumper program. -OBJDUMP=$lt_OBJDUMP - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# How to create reloadable object files. -reload_flag=$lt_reload_flag_CXX -reload_cmds=$lt_reload_cmds_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -echo "" -echo "Libtiff is now configured for ${host}" -echo "" -echo " Libtiff build version: ${LIBTIFF_VERSION}" -echo " Libtiff library version: ${LIBTIFF_VERSION_INFO}" -echo " Libtiff release date: ${LIBTIFF_RELEASE_DATE}" -echo "" -echo " Installation directory: ${prefix}" -echo " Documentation directory: ${LIBTIFF_DOCDIR}" -echo " C compiler: ${CC} ${CFLAGS}" -echo " C++ compiler: ${CXX} ${CXXFLAGS}" -echo " Build tools: ${TIFF_TOOLS}" -echo " Build tests: ${TIFF_TESTS}" -echo " Build contrib: ${TIFF_CONTRIB}" -echo " Build docs: ${TIFF_DOCS}" -echo " Build deprecated features: ${enable_deprecated}" -echo " Enable runtime linker paths: ${HAVE_RPATH}" -echo " Enable linker symbol versioning: ${have_ld_version_script}" -echo " Support Microsoft Document Imaging: ${HAVE_MDI}" -echo " Use Win32 IO: ${win32_io_ok}" -echo "" -echo " Support for internal codecs:" -echo " CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}" -echo " Macintosh PackBits algorithm: ${HAVE_PACKBITS}" -echo " LZW algorithm: ${HAVE_LZW}" -echo " ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}" -echo " NeXT 2-bit RLE algorithm: ${HAVE_NEXT}" -echo " LogLuv high dynamic range encoding: ${HAVE_LOGLUV}" -echo "" -echo " Support for external codecs:" -echo " ZLIB support: ${HAVE_ZLIB}" -echo " libdeflate support: ${HAVE_LIBDEFLATE}" -echo " Pixar log-format algorithm: ${HAVE_PIXARLOG}" -echo " JPEG support: ${HAVE_JPEG}" -echo " Old JPEG support: ${HAVE_OJPEG}" -if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "yes"; then - echo " JPEG 8/12 bit dual mode: ${HAVE_JPEGTURBO_DUAL_MODE_8_12} (libjpeg turbo >= 3.0 dual mode)" -else - echo " JPEG 8/12 bit dual mode: ${HAVE_JPEG12}" -fi -echo " ISO JBIG support: ${HAVE_JBIG}" -echo " LERC support: ${HAVE_LERC}" -echo " LZMA2 support: ${HAVE_LZMA}" -echo " ZSTD support: ${HAVE_ZSTD}" -echo " WEBP support: ${HAVE_WEBP}" -echo "" -echo " C++ support: ${HAVE_CXX}" -echo "" -echo " OpenGL support: ${HAVE_OPENGL}" -echo "" - diff --git a/third_party/libtiff/configure.ac b/third_party/libtiff/configure.ac deleted file mode 100644 index 20c3b53..0000000 --- a/third_party/libtiff/configure.ac +++ /dev/null @@ -1,1275 +0,0 @@ -dnl -*- Autoconf -*- -dnl Tag Image File Format (TIFF) Software -dnl -dnl Copyright (C) 2004, Andrey Kiselev -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and -dnl its documentation for any purpose is hereby granted without fee, provided -dnl that (i) the above copyright notices and this permission notice appear in -dnl all copies of the software and related documentation, and (ii) the names of -dnl Sam Leffler and Silicon Graphics may not be used in any advertising or -dnl publicity relating to the software without the specific, prior written -dnl permission of Sam Leffler and Silicon Graphics. -dnl -dnl THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -dnl EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -dnl WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -dnl -dnl IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -dnl ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -dnl OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -dnl WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -dnl LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -dnl OF THIS SOFTWARE. - -dnl Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.69]) -AC_INIT([LibTIFF Software],[4.7.1],[tiff@lists.osgeo.org],[tiff]) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_MACRO_DIR(m4) -AC_LANG(C) - -dnl Compute the canonical host (run-time) system type variable -AC_CANONICAL_HOST - -AM_INIT_AUTOMAKE([dist-xz tar-ustar]) -dnl Do not rebuild generated files every time -AM_MAINTAINER_MODE - -dnl Versioning. -dnl Don't fill the ALPHA_VERSION field, if not applicable. -LIBTIFF_MAJOR_VERSION=4 -LIBTIFF_MINOR_VERSION=7 -LIBTIFF_MICRO_VERSION=1 -LIBTIFF_ALPHA_VERSION= -LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION -dnl This (LIBTIFF_RELEASE_DATE) is used to set the #define TIFFLIB_VERSION in tiffvers.h. -LIBTIFF_RELEASE_DATE=$(cat ${srcdir}/RELEASE-DATE) - - -dnl Libtool library revision control info -dnl See the libtool documentation under the heading "Libtool's versioning -dnl system" in order to understand the meaning of these fields -dnl -dnl current -dnl The most recent interface number that this library implements. -dnl revision -dnl The implementation number of the current interface. -dnl age -dnl The difference between the newest and oldest interfaces that -dnl this library implements. In other words, the library implements -dnl all the interface numbers in the range from number current - -dnl age to current. -dnl -dnl Here are a set of rules to help you update your library version -dnl information: -dnl -dnl 1. Start with version information of `0:0:0' for each libtool library. -dnl 2. Update the version information only immediately before a public -dnl release of your software. More frequent updates are unnecessary, and -dnl only guarantee that the current interface number gets larger faster. -dnl 3. If the library source code has changed at all since the last update, -dnl then increment revision (`c:r:a' becomes `c:r+1:a'). -dnl 4. If any interfaces have been added, removed, or changed since the last -dnl update, increment current, and set revision to 0. -dnl 5. If any interfaces have been added since the last public release, then -dnl increment age. -dnl 6. If any interfaces have been removed since the last public release, -dnl then set age to 0. -LIBTIFF_CURRENT=8 -LIBTIFF_REVISION=0 -LIBTIFF_AGE=2 -LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE - -# This is a special hack for OpenBSD and MirOS systems. The dynamic linker -# in OpenBSD uses some special semantics for shared libraries. Their soname -# contains only two numbers, major and minor. -# See http://bugzilla.remotesensing.org/show_bug.cgi?id=838 for details. -#case "$host_os" in -# openbsd* | mirbsd*) -# LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION:0 -# ;; -# *) -# LIBTIFF_VERSION_INFO=$LIBTIFF_MAJOR_VERSION:$LIBTIFF_MINOR_VERSION:$LIBTIFF_MICRO_VERSION -# ;; -#esac - -AC_SUBST(LIBTIFF_MAJOR_VERSION) -AC_SUBST(LIBTIFF_MINOR_VERSION) -AC_SUBST(LIBTIFF_MICRO_VERSION) -AC_SUBST(LIBTIFF_ALPHA_VERSION) -AC_SUBST(LIBTIFF_VERSION) -AC_SUBST(LIBTIFF_VERSION_INFO) -AC_SUBST(LIBTIFF_RELEASE_DATE) - -dnl Checks for programs. -AC_PROG_CC -AM_PROG_CC_C_O # Necessary if objects are placed in subdirectories. - -dnl We want warnings. As many warnings as possible. -VL_PROG_CC_WARNINGS() - -dnl Checks for programs -AC_PROG_INSTALL -AC_PROG_LN_S -# Used only for validating the source distribution during distcheck -AC_PATH_PROG(CMAKE, cmake) - - -# Check if LD supports linker scripts, and define automake conditional -# HAVE_LD_VERSION_SCRIPT if so. This functionality is currently -# constrained to compilers using GNU ld on ELF systems or systems -# which provide an adequate emulation thereof. -AC_ARG_ENABLE([ld-version-script], - AS_HELP_STRING([--disable-ld-version-script], - [disable linker version script (default is enabled if supported)]), - [have_ld_version_script=$enableval], [have_ld_version_script=yes]) -if test "$have_ld_version_script" != no; then - AC_MSG_CHECKING([if LD -Wl,--version-script works]) - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" - cat > conftest.map <= 3.0 dual mode enabled]) - fi -fi - -AM_CONDITIONAL(HAVE_JPEG, test "$HAVE_JPEG" = 'yes') -AM_CONDITIONAL(HAVE_JPEGTURBO_DUAL_MODE_8_12, test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Check for Old JPEG. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(old-jpeg, - AS_HELP_STRING([--disable-old-jpeg], - [disable support for Old JPEG compression (read-only, enabled by default)]), - [HAVE_OJPEG=${enableval}], [HAVE_OJPEG=yes]) - -if test "$HAVE_JPEG" = "yes" -a "$HAVE_OJPEG" = "yes" ; then - AC_DEFINE(OJPEG_SUPPORT, 1, - [Support Old JPEG compression (read-only)]) -else - HAVE_OJPEG=no -fi - -dnl --------------------------------------------------------------------------- -dnl Check for JBIG-KIT. -dnl --------------------------------------------------------------------------- - -HAVE_JBIG=no - -AC_ARG_ENABLE(jbig, - AS_HELP_STRING([--disable-jbig], - [disable JBIG-KIT usage (required for ISO JBIG compression, enabled by default)]),,) -AC_ARG_WITH(jbig-include-dir, - AS_HELP_STRING([--with-jbig-include-dir=DIR], - [location of JBIG-KIT headers]),,) -AC_ARG_WITH(jbig-lib-dir, - AS_HELP_STRING([--with-jbig-lib-dir=DIR], - [location of JBIG-KIT library binary]),,) - -if test "x$enable_jbig" != "xno" ; then - - if test "x$with_jbig_lib_dir" != "x" ; then - LDFLAGS="-L$with_jbig_lib_dir $LDFLAGS" - - fi - - AC_CHECK_LIB(jbig, jbg_dec_init, [jbig_lib=yes], [jbig_lib=no],) - if test "$jbig_lib" = "no" -a "x$with_jbig_lib_dir" != "x" ; then - AC_MSG_ERROR([JBIG-KIT library not found at $with_jbig_lib_dir]) - fi - - if test "x$with_jbig_include_dir" != "x" ; then - CPPFLAGS="-I$with_jbig_include_dir $CPPFLAGS" - fi - AC_CHECK_HEADER(jbig.h, [jbig_h=yes], [jbig_h=no]) - if test "$jbig_h" = "no" -a "x$with_jbig_include_dir" != "x" ; then - AC_MSG_ERROR([JBIG-KIT library headers not found at $with_jbig_include_dir]) - fi - - if test "$jbig_lib" = "yes" -a "$jbig_h" = "yes" ; then - HAVE_JBIG=yes - fi - -fi - -if test "$HAVE_JBIG" = "yes" ; then - AC_DEFINE(JBIG_SUPPORT,1,[Support ISO JBIG compression (requires JBIG-KIT library)]) - LIBS="-ljbig $LIBS" - tiff_libs_private="-ljbig ${tiff_libs_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_jbig_lib_dir" != "x" ; then - LIBDIR="-R $with_jbig_lib_dir $LIBDIR" - fi - - # Older versions of jbigkit lack jbg_newlen - AC_CHECK_FUNCS([jbg_newlen]) - -fi - -AM_CONDITIONAL(HAVE_JBIG, test "$HAVE_JBIG" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Check for liblerc. -dnl --------------------------------------------------------------------------- - -HAVE_LERC=no - -AC_ARG_ENABLE(lerc, - AS_HELP_STRING([--disable-lerc], - [disable liblerc usage (required for lerc compression, enabled by default)]),,) -AC_ARG_WITH(lerc-include-dir, - AS_HELP_STRING([--with-lerc-include-dir=DIR], - [location of liblerc headers]),,) -AC_ARG_WITH(lerc-lib-dir, - AS_HELP_STRING([--with-lerc-lib-dir=DIR], - [location of liblerc library binary]),,) - -if test "x$enable_lerc" != "xno" ; then - - if test "x$with_lerc_lib_dir" != "x" ; then - LDFLAGS="-L$with_lerc_lib_dir $LDFLAGS" - fi - - lerc_lib_name="LercLib" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - if test "$lerc_lib" = "no" ; then - lerc_lib_name="Lerc" - AC_CHECK_LIB("$lerc_lib_name", lerc_decode, [lerc_lib=yes], [lerc_lib=no],) - fi - if test "$lerc_lib" = "no" -a "x$with_lerc_lib_dir" != "x"; then - AC_MSG_ERROR([lerc library not found at $with_lerc_lib_dir]) - fi - - if test "x$with_lerc_include_dir" != "x" ; then - CPPFLAGS="-I$with_lerc_include_dir $CPPFLAGS" - fi - AC_CHECK_HEADER(Lerc_c_api.h, [lerc_c_api_h=yes], [lerc_c_api_h=no]) - if test "$lerc_c_api_h" = "no" -a "x$with_lerc_include_dir" != "x" ; then - AC_MSG_ERROR([Liblerc headers not found at $with_lerc_include_dir]) - fi - - if test "$lerc_lib" = "yes" -a "$lerc_c_api_h" = "yes" ; then - HAVE_LERC=yes - fi - -fi - -if test "$HAVE_LERC" = "yes" ; then - AC_DEFINE(LERC_SUPPORT,1,[Support lerc compression]) - LIBS="-l${lerc_lib_name} $LIBS" - tiff_libs_private="-l${lerc_lib_name} ${tiff_libs_private}" - tiff_requires_private="Lerc ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_lerc_lib_dir" != "x" ; then - LIBDIR="-R $with_lerc_lib_dir $LIBDIR" - fi - - if test "$enable_static" != "no"; then - AC_DEFINE([LERC_STATIC], 1, [Define to 1 when building a static libtiff with LERC enabled.]) - fi -fi - -AM_CONDITIONAL(HAVE_LERC, test "$HAVE_LERC" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Check for liblzma2. -dnl --------------------------------------------------------------------------- - -HAVE_LZMA=no - -AC_ARG_ENABLE(lzma, - AS_HELP_STRING([--disable-lzma], - [disable liblzma usage (required for LZMA2 compression, enabled by default)]),,) -AC_ARG_WITH(lzma-include-dir, - AS_HELP_STRING([--with-lzma-include-dir=DIR], - [location of liblzma headers]),,) -AC_ARG_WITH(lzma-lib-dir, - AS_HELP_STRING([--with-lzma-lib-dir=DIR], - [location of liblzma library binary]),,) - -if test "x$enable_lzma" != "xno" ; then - - if test "x$with_lzma_lib_dir" != "x" ; then - LDFLAGS="-L$with_lzma_lib_dir $LDFLAGS" - fi - - AC_CHECK_LIB(lzma, lzma_code, [lzma_lib=yes], [lzma_lib=no],) - if test "$lzma_lib" = "no" -a "x$with_lzma_lib_dir" != "x"; then - AC_MSG_ERROR([lzma library not found at $with_lzma_lib_dir]) - fi - - if test "x$with_lzma_include_dir" != "x" ; then - CPPFLAGS="-I$with_lzma_include_dir $CPPFLAGS" - fi - AC_CHECK_HEADER(lzma.h, [lzma_h=yes], [lzma_h=no]) - if test "$lzma_h" = "no" -a "x$with_lzma_include_dir" != "x" ; then - AC_MSG_ERROR([Liblzma headers not found at $with_lzma_include_dir]) - fi - - if test "$lzma_lib" = "yes" -a "$lzma_h" = "yes" ; then - HAVE_LZMA=yes - fi - -fi - -if test "$HAVE_LZMA" = "yes" ; then - AC_DEFINE(LZMA_SUPPORT,1,[Support LZMA2 compression]) - LIBS="-llzma $LIBS" - tiff_libs_private="-llzma ${tiff_libs_private}" - tiff_requires_private="liblzma ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_lzma_lib_dir" != "x" ; then - LIBDIR="-R $with_lzma_lib_dir $LIBDIR" - fi - -fi - -AM_CONDITIONAL(HAVE_LZMA, test "$HAVE_LZMA" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Check for libzstd. -dnl --------------------------------------------------------------------------- - -HAVE_ZSTD=no - -AC_ARG_ENABLE(zstd, - AS_HELP_STRING([--disable-zstd], - [disable libzstd usage (required for zstd compression, enabled by default)]),,) -AC_ARG_WITH(zstd-include-dir, - AS_HELP_STRING([--with-zstd-include-dir=DIR], - [location of libzstd headers]),,) -AC_ARG_WITH(zstd-lib-dir, - AS_HELP_STRING([--with-zstd-lib-dir=DIR], - [location of libzstd library binary]),,) - -if test "x$enable_zstd" != "xno" ; then - - if test "x$with_zstd_lib_dir" != "x" ; then - LDFLAGS="-L$with_zstd_lib_dir $LDFLAGS" - fi - - AC_CHECK_LIB(zstd, ZSTD_decompressStream, [zstd_lib=yes], [zstd_lib=no],) - if test "$zstd_lib" = "no" -a "x$with_zstd_lib_dir" != "x"; then - AC_MSG_ERROR([zstd library not found at $with_zstd_lib_dir]) - fi - - if test "x$with_zstd_include_dir" != "x" ; then - CPPFLAGS="-I$with_zstd_include_dir $CPPFLAGS" - fi - AC_CHECK_HEADER(zstd.h, [zstd_h=yes], [zstd_h=no]) - if test "$zstd_h" = "no" -a "x$with_zstd_include_dir" != "x" ; then - AC_MSG_ERROR([Libzstd headers not found at $with_zstd_include_dir]) - fi - - if test "$zstd_lib" = "yes" -a "$zstd_h" = "yes" ; then - HAVE_ZSTD=yes - fi - -fi - -if test "$HAVE_ZSTD" = "yes" ; then - AC_DEFINE(ZSTD_SUPPORT,1,[Support zstd compression]) - LIBS="-lzstd $LIBS" - tiff_libs_private="-lzstd ${tiff_libs_private}" - tiff_requires_private="libzstd ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_zstd_lib_dir" != "x" ; then - LIBDIR="-R $with_zstd_lib_dir $LIBDIR" - fi - -fi - -AM_CONDITIONAL(HAVE_ZSTD, test "$HAVE_ZSTD" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Check for libwebp. -dnl --------------------------------------------------------------------------- - -HAVE_WEBP=no - -AC_ARG_ENABLE(webp, - AS_HELP_STRING([--disable-webp], - [disable libwebp usage (required for webp compression, enabled by default)]),,) -AC_ARG_WITH(webp-include-dir, - AS_HELP_STRING([--with-webp-include-dir=DIR], - [location of libwebp headers]),,) -AC_ARG_WITH(webp-lib-dir, - AS_HELP_STRING([--with-webp-lib-dir=DIR], - [location of libwebp library binary]),,) - -if test "x$enable_webp" != "xno" ; then - - if test "x$with_webp_lib_dir" != "x" ; then - LDFLAGS="-L$with_webp_lib_dir $LDFLAGS" - fi - - AC_CHECK_LIB(webp, WebPDecode, [webp_lib=yes], [webp_lib=no],) - if test "$webp_lib" = "no" -a "x$with_webp_lib_dir" != "x"; then - AC_MSG_ERROR([webp library not found at $with_webp_lib_dir]) - fi - - if test "x$with_webp_include_dir" != "x" ; then - CPPFLAGS="-I$with_webp_include_dir $CPPFLAGS" - fi - AC_CHECK_HEADER(webp/decode.h, [webp_h=yes], [webp_h=no]) - if test "$webp_h" = "no" -a "x$with_webp_include_dir" != "x" ; then - AC_MSG_ERROR([Libwebp headers not found at $with_webp_include_dir]) - fi - - if test "$webp_lib" = "yes" -a "$webp_h" = "yes" ; then - HAVE_WEBP=yes - fi - -fi - -if test "$HAVE_WEBP" = "yes" ; then - AC_DEFINE(WEBP_SUPPORT,1,[Support webp compression]) - LIBS="-lwebp $LIBS" - tiff_libs_private="-lwebp ${tiff_libs_private}" - tiff_requires_private="libwebp ${tiff_requires_private}" - - if test "$HAVE_RPATH" = "yes" -a "x$with_webp_lib_dir" != "x" ; then - LIBDIR="-R $with_webp_lib_dir $LIBDIR" - fi - -fi - -AM_CONDITIONAL(HAVE_WEBP, test "$HAVE_WEBP" = 'yes') - -dnl --------------------------------------------------------------------------- -dnl Should 8/12 bit jpeg mode be enabled? -dnl This should not be used starting with libjpeg-turbo >= 3.0 that has -dnl built-in support for dual mode. -dnl --------------------------------------------------------------------------- - -if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "no"; then - HAVE_JPEG12=no - - AC_ARG_ENABLE(jpeg12, - AS_HELP_STRING([--enable-jpeg12], - [enable libjpeg 8/12bit dual mode (not to be used with libjpeg-turbo >= 3.0)]),,) - AC_ARG_WITH(jpeg12-include-dir, - AS_HELP_STRING([--with-jpeg12-include-dir=DIR], - [location of libjpeg 12bit headers]),,) - AC_ARG_WITH(jpeg12-lib, - AS_HELP_STRING([--with-jpeg12-lib=LIBRARY], - [path to libjpeg 12bit library]),,) - - if test "x$enable_jpeg12" = "xyes" ; then - - if test "x$with_jpeg12_lib" != "x" ; then - LIBS="$with_jpeg12_lib $LIBS" - fi - - HAVE_JPEG12=yes - - AC_DEFINE(JPEG_DUAL_MODE_8_12,1,[8/12 bit libjpeg dual mode enabled]) - if test "x$with_jpeg12_include_dir" != "x" ; then - AC_DEFINE_UNQUOTED(LIBJPEG_12_PATH,"$with_jpeg12_include_dir/jpeglib.h",[12bit libjpeg primary include file with path]) - fi - fi -fi - -dnl --------------------------------------------------------------------------- -dnl Check for C++. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(cxx, - AS_HELP_STRING([--enable-cxx], - [enable C++ stream API building (requires C++ compiler)]), - [HAVE_CXX=$enableval], [HAVE_CXX=yes]) - -if test "$HAVE_CXX" = "yes" ; then - AC_DEFINE(CXX_SUPPORT, 1, [Support C++ stream API (requires C++ compiler)]) -else - HAVE_CXX=no -fi - -AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes") - -dnl --------------------------------------------------------------------------- -dnl Check for OpenGL and GLUT. -dnl --------------------------------------------------------------------------- - -HAVE_OPENGL=no - -AC_ARG_ENABLE(opengl, - AS_HELP_STRING([--disable-opengl], - [disable OpenGL usage (required by tiffgt, enabled by default)]),,) - -if test "x$enable_opengl" != "xno" ; then - - AC_PATH_XTRA - - dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS, - dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect - AX_CHECK_GL - - dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS - AX_CHECK_GLU - - dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS - AX_CHECK_GLUT - - if test "$no_x" != "yes" -a "$no_gl" != "yes" \ - -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then - HAVE_OPENGL=yes - fi -fi - -AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes") - -dnl --------------------------------------------------------------------------- -dnl Check for Win32 IO: make sure we have windows.h but not cygwin -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(win32-io, - AS_HELP_STRING([--disable-win32-io], - [disable Win32 I/O (Windows only, enabled by default except for Cygwin)]),,) - -AC_CHECK_HEADER(windows.h) - -win32_io_ok=no -case "${host_os}" in - cygwin*) - if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then - win32_io_ok=yes - fi - ;; - *) - if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then - win32_io_ok=yes - fi - ;; -esac - -if test "$win32_io_ok" = "yes" ; then - AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system]) -fi - -AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes]) - -dnl --------------------------------------------------------------------------- -dnl Check for X Athena Widgets -dnl --------------------------------------------------------------------------- - -dnl HAVE_XAW=no - -dnl ICE_FIND_ATHENA - -dnl if test "$no_xaw" != "yes" ; then -dnl HAVE_XAW=yes -dnl fi - -dnl AM_CONDITIONAL(HAVE_XAW, test "$HAVE_XAW" = "yes") - -dnl =========================================================================== -dnl ``Orthogonal Features'' -dnl =========================================================================== - -dnl --------------------------------------------------------------------------- -dnl Default handling of strip chopping support. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(strip-chopping, - AS_HELP_STRING([--disable-strip-chopping], - [disable support for strip chopping (whether or not to convert single-strip uncompressed images to multiple strips of specified size to reduce memory usage)]), - [HAVE_STRIPCHOP=$enableval], [HAVE_STRIPCHOP=yes]) -AC_ARG_WITH(default-strip-size, - AS_HELP_STRING([--with-default-strip-size=SIZE], - [default size of the strip in bytes (when strip chopping enabled) [[default=8192]]]),,) - -if test "$HAVE_STRIPCHOP" = "yes" \ - -a "x$with_default_strip_size" != "xno"; then - AC_DEFINE(STRIPCHOP_DEFAULT,TIFF_STRIPCHOP,[Support strip chopping (whether or not to convert single-strip uncompressed images to multiple strips of specified size to reduce memory usage)]) - - if test "x$with_default_strip_size" = "x" \ - -o "x$with_default_strip_size" = "xyes"; then - with_default_strip_size="8192" - fi - - AC_DEFINE_UNQUOTED(STRIP_SIZE_DEFAULT,$with_default_strip_size,[Default size of the strip in bytes (when strip chopping enabled)]) - -fi - -dnl --------------------------------------------------------------------------- -dnl Maximum number of TIFF directories that libtiff can browse through -dnl --------------------------------------------------------------------------- - -AC_ARG_WITH(max-dir-count, - AS_HELP_STRING([--with-max-dir-count=SIZE], - [Maximum number of TIFF directories that libtiff can browse through [[default=1048576]]]),,) - -if test "x$with_max_dir_count" = "x" -o "x$with_max_dir_count" = "xyes"; then - with_max_dir_count="1048576" -fi - -AC_DEFINE_UNQUOTED(TIFF_MAX_DIR_COUNT,$with_max_dir_count,[Maximum number of TIFF directories that libtiff can browse through]) - -dnl --------------------------------------------------------------------------- -dnl Should we try to defer loading of strip/tile offsets and sizes to -dnl optimize directory scanning? -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(defer-strile-load, - AS_HELP_STRING([--enable-defer-strile-load], - [enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen()]), - [HAVE_DEFER_STRILE_LOAD=$enableval], [HAVE_DEFER_STRILE_LOAD=no]) - -if test "$HAVE_DEFER_STRILE_LOAD" = "yes" ; then - AC_DEFINE(DEFER_STRILE_LOAD,1,[enable deferred strip/tile offset/size loading]) - -fi - -dnl --------------------------------------------------------------------------- -dnl Check for support of CHUNKY_STRIP_READ_SUPPORT, a mechanism to allowing -dnl reading large strips (usually one strip files) in chunks when using -dnl TIFFReadScanline(). This is an experimental feature in libtiff 4.0. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(chunky-strip-read, - AS_HELP_STRING([--enable-chunky-strip-read], - [enable reading large strips in chunks for TIFFReadScanline() (experimental)]), - [HAVE_CHUNKY_STRIP_READ=$enableval], [HAVE_CHUNKY_STRIP_READ=no]) - -if test "$HAVE_CHUNKY_STRIP_READ" = "yes" ; then - AC_DEFINE(CHUNKY_STRIP_READ_SUPPORT,1,[enable partial strip reading for large strips (experimental)]) - -fi - -dnl --------------------------------------------------------------------------- -dnl Default subifd support. -dnl --------------------------------------------------------------------------- -AC_DEFINE(SUBIFD_SUPPORT,1,[Enable SubIFD tag (330) support]) - -dnl --------------------------------------------------------------------------- -dnl Default handling of ASSOCALPHA support. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(extrasample-as-alpha, - AS_HELP_STRING([--disable-extrasample-as-alpha], - [the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly]), - [HAVE_EXTRASAMPLE_AS_ALPHA=$enableval], - [HAVE_EXTRASAMPLE_AS_ALPHA=yes]) - -if test "$HAVE_EXTRASAMPLE_AS_ALPHA" = "yes" ; then - AC_DEFINE(DEFAULT_EXTRASAMPLE_AS_ALPHA, 1, - [Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly.]) -fi - -dnl --------------------------------------------------------------------------- -dnl Default handling of YCbCr subsampling support. -dnl See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. -dnl --------------------------------------------------------------------------- - -AC_ARG_ENABLE(check-ycbcr-subsampling, - AS_HELP_STRING([--disable-check-ycbcr-subsampling], - [disable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag]), - [CHECK_JPEG_YCBCR_SUBSAMPLING=$enableval], - [CHECK_JPEG_YCBCR_SUBSAMPLING=yes]) - -if test "$CHECK_JPEG_YCBCR_SUBSAMPLING" = "yes" ; then - AC_DEFINE(CHECK_JPEG_YCBCR_SUBSAMPLING, 1, - [Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled).]) -fi - -for python in python3.16 python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python; do - AC_CHECK_PROGS(PYTHON_BIN, [$python]) - if test "x$PYTHON_BIN" != "x"; then - break - fi -done - -AC_ARG_ENABLE(sphinx, - AS_HELP_STRING([--disable-sphinx], - [disable building of the sphinx documentation]), - [BUILD_SPHINX=$enableval], - [BUILD_SPHINX=yes]) - - - -AC_PATH_PROG(SPHINX_BUILD, [sphinx-build], [no]) - -AM_CONDITIONAL([SPHINX], [test "$BUILD_SPHINX" = yes -a "$SPHINX_BUILD" != no -a "x$PYTHON_BIN" != "x"]) - -if test "x$PYTHON_BIN" != "x"; then - AC_MSG_CHECKING([generated manual pages]) - TIFF_MAN1_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.1$")) - TIFF_MAN3_GEN=$(echo $("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | grep "\.3tiff$")) - TIFF_MAN_RULES=$("$PYTHON_BIN" "${srcdir}/cmake/list-manpages.py" "${srcdir}/doc" man | sed -e 's;$;: all-local;') - AC_SUBST([TIFF_MAN1_GEN]) - AC_SUBST([TIFF_MAN3_GEN]) - AC_SUBST([TIFF_MAN_RULES]) - AM_SUBST_NOTMAKE([TIFF_MAN_RULES]) - AC_MSG_RESULT([done]) -fi - -if test -d "${srcdir}/doc/man-prebuilt"; then - AC_MSG_CHECKING([prebuilt manual pages]) - TIFF_MAN1_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.1)) - TIFF_MAN3_PREBUILT=$(echo $(cd "${srcdir}/doc" && ls -1 man-prebuilt/*.3tiff)) - AC_SUBST([TIFF_MAN1_PREBUILT]) - AC_SUBST([TIFF_MAN3_PREBUILT]) - AC_MSG_RESULT([done]) -fi - -dnl --------------------------------------------------------------------------- - -CFLAGS="$SAVED_CFLAGS" - -AC_SUBST(LIBDIR) - -AC_CONFIG_HEADERS([config/config.h libtiff/tif_config.h libtiff/tiffconf.h port/libport_config.h]) - -AC_CONFIG_FILES([Makefile \ - build/Makefile \ - contrib/Makefile \ - contrib/addtiffo/Makefile \ - contrib/dbs/Makefile \ - contrib/dbs/xtiff/Makefile \ - contrib/iptcutil/Makefile \ - contrib/mfs/Makefile \ - contrib/pds/Makefile \ - contrib/ras/Makefile \ - contrib/stream/Makefile \ - contrib/tags/Makefile \ - contrib/win_dib/Makefile \ - doc/Makefile \ - libtiff-4.pc \ - libtiff/Makefile \ - libtiff/tiffvers.h \ - port/Makefile \ - test/Makefile \ - tools/Makefile]) -AC_OUTPUT - -dnl --------------------------------------------------------------------------- -dnl Display configuration status -dnl --------------------------------------------------------------------------- - -LOC_MSG() -LOC_MSG([Libtiff is now configured for ${host}]) -LOC_MSG() -LOC_MSG([ Libtiff build version: ${LIBTIFF_VERSION}]) -LOC_MSG([ Libtiff library version: ${LIBTIFF_VERSION_INFO}]) -LOC_MSG([ Libtiff release date: ${LIBTIFF_RELEASE_DATE}]) -LOC_MSG() -LOC_MSG([ Installation directory: ${prefix}]) -LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}]) -LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) -LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) -LOC_MSG([ Build tools: ${TIFF_TOOLS}]) -LOC_MSG([ Build tests: ${TIFF_TESTS}]) -LOC_MSG([ Build contrib: ${TIFF_CONTRIB}]) -LOC_MSG([ Build docs: ${TIFF_DOCS}]) -LOC_MSG([ Build deprecated features: ${enable_deprecated}]) -LOC_MSG([ Enable runtime linker paths: ${HAVE_RPATH}]) -LOC_MSG([ Enable linker symbol versioning: ${have_ld_version_script}]) -LOC_MSG([ Support Microsoft Document Imaging: ${HAVE_MDI}]) -LOC_MSG([ Use Win32 IO: ${win32_io_ok}]) -LOC_MSG() -LOC_MSG([ Support for internal codecs:]) -LOC_MSG([ CCITT Group 3 & 4 algorithms: ${HAVE_CCITT}]) -LOC_MSG([ Macintosh PackBits algorithm: ${HAVE_PACKBITS}]) -LOC_MSG([ LZW algorithm: ${HAVE_LZW}]) -LOC_MSG([ ThunderScan 4-bit RLE algorithm: ${HAVE_THUNDER}]) -LOC_MSG([ NeXT 2-bit RLE algorithm: ${HAVE_NEXT}]) -LOC_MSG([ LogLuv high dynamic range encoding: ${HAVE_LOGLUV}]) -LOC_MSG() -LOC_MSG([ Support for external codecs:]) -LOC_MSG([ ZLIB support: ${HAVE_ZLIB}]) -LOC_MSG([ libdeflate support: ${HAVE_LIBDEFLATE}]) -LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}]) -LOC_MSG([ JPEG support: ${HAVE_JPEG}]) -LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}]) -if test "$HAVE_JPEGTURBO_DUAL_MODE_8_12" = "yes"; then - LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEGTURBO_DUAL_MODE_8_12} (libjpeg turbo >= 3.0 dual mode)]) -else - LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEG12}]) -fi -LOC_MSG([ ISO JBIG support: ${HAVE_JBIG}]) -LOC_MSG([ LERC support: ${HAVE_LERC}]) -LOC_MSG([ LZMA2 support: ${HAVE_LZMA}]) -LOC_MSG([ ZSTD support: ${HAVE_ZSTD}]) -LOC_MSG([ WEBP support: ${HAVE_WEBP}]) -LOC_MSG() -LOC_MSG([ C++ support: ${HAVE_CXX}]) -LOC_MSG() -dnl LOC_MSG([ X Athena Widgets support: ${HAVE_XAW}]) -LOC_MSG([ OpenGL support: ${HAVE_OPENGL}]) -LOC_MSG() - diff --git a/third_party/libtiff/contrib/CMakeLists.txt b/third_party/libtiff/contrib/CMakeLists.txt deleted file mode 100644 index 8c8310b..0000000 --- a/third_party/libtiff/contrib/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -add_subdirectory(addtiffo) -add_subdirectory(dbs) -add_subdirectory(iptcutil) diff --git a/third_party/libtiff/contrib/Makefile.am b/third_party/libtiff/contrib/Makefile.am deleted file mode 100644 index 99d0f33..0000000 --- a/third_party/libtiff/contrib/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - CMakeLists.txt \ - README - -SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib - diff --git a/third_party/libtiff/contrib/Makefile.in b/third_party/libtiff/contrib/Makefile.in deleted file mode 100644 index f4b4998..0000000 --- a/third_party/libtiff/contrib/Makefile.in +++ /dev/null @@ -1,691 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - CMakeLists.txt \ - README - -SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/README b/third_party/libtiff/contrib/README deleted file mode 100644 index 26b7c5f..0000000 --- a/third_party/libtiff/contrib/README +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains various contributions from libtiff users. - diff --git a/third_party/libtiff/contrib/addtiffo/CMakeLists.txt b/third_party/libtiff/contrib/addtiffo/CMakeLists.txt deleted file mode 100644 index cbb30ae..0000000 --- a/third_party/libtiff/contrib/addtiffo/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -add_executable(addtiffo addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h) -set_target_properties(addtiffo PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(addtiffo tiff tiff_port) - -if(WEBP_SUPPORT AND EMSCRIPTEN) - # Emscripten is pretty finnicky about linker flags. - # It needs --shared-memory if and only if atomics or bulk-memory is used. - target_link_options(addtiffo PUBLIC "-Wl,--shared-memory") -endif() diff --git a/third_party/libtiff/contrib/addtiffo/Makefile.am b/third_party/libtiff/contrib/addtiffo/Makefile.am deleted file mode 100644 index f8f15fc..0000000 --- a/third_party/libtiff/contrib/addtiffo/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -EXTRA_DIST = \ - CMakeLists.txt \ - README - -if TIFF_CONTRIB -noinst_PROGRAMS = addtiffo -endif - -addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h -addtiffo_LDADD = $(LIBTIFF) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff - diff --git a/third_party/libtiff/contrib/addtiffo/Makefile.in b/third_party/libtiff/contrib/addtiffo/Makefile.in deleted file mode 100644 index c289ce6..0000000 --- a/third_party/libtiff/contrib/addtiffo/Makefile.in +++ /dev/null @@ -1,676 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@TIFF_CONTRIB_TRUE@noinst_PROGRAMS = addtiffo$(EXEEXT) -subdir = contrib/addtiffo -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_addtiffo_OBJECTS = addtiffo.$(OBJEXT) tif_overview.$(OBJEXT) \ - tif_ovrcache.$(OBJEXT) -addtiffo_OBJECTS = $(am_addtiffo_OBJECTS) -addtiffo_DEPENDENCIES = $(LIBTIFF) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/addtiffo.Po \ - ./$(DEPDIR)/tif_overview.Po ./$(DEPDIR)/tif_ovrcache.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(addtiffo_SOURCES) -DIST_SOURCES = $(addtiffo_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = \ - CMakeLists.txt \ - README - -addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h -addtiffo_LDADD = $(LIBTIFF) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/addtiffo/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/addtiffo/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -addtiffo$(EXEEXT): $(addtiffo_OBJECTS) $(addtiffo_DEPENDENCIES) $(EXTRA_addtiffo_DEPENDENCIES) - @rm -f addtiffo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(addtiffo_OBJECTS) $(addtiffo_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addtiffo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_overview.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ovrcache.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/addtiffo.Po - -rm -f ./$(DEPDIR)/tif_overview.Po - -rm -f ./$(DEPDIR)/tif_ovrcache.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/addtiffo.Po - -rm -f ./$(DEPDIR)/tif_overview.Po - -rm -f ./$(DEPDIR)/tif_ovrcache.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/addtiffo/README b/third_party/libtiff/contrib/addtiffo/README deleted file mode 100644 index a6ca45f..0000000 --- a/third_party/libtiff/contrib/addtiffo/README +++ /dev/null @@ -1,142 +0,0 @@ - addtiffo 1.0 - ============ - -The addtiffo utility is used to add overview pyramids to an existing -TIFF or GeoTIFF file. Some applications can take advantage of these -overviews to accelerate overview display performance of large rasters. - -This release of addtiffo is primarily intended for compatibility testing -with applications, and to see if there is interest in a cleaner release -of the capability ... perhaps incorporation into the libtiff tools -distribution. - -Please feel free to contact me with questions, or problems. - -warmerda@home.com -http://home.gdal.org/~warmerda/ - - -Usage ------ - -Usage: addtiffo [-r {average/nearest} [-subifd] - tiff_filename [resolution_reductions] - -Example: - % addtiffo abc.tif 2 4 8 16 - -The numeric arguments are the list of reduction factors to -generate. In this example a 1/2, 1/4 1/8 and 1/16 - - - -Limitations ------------ - -See tif_overview.cpp for up to date details. - - o Currently only images with bits_per_sample of a multiple of eight - will work. - - o The code will attempt to use the same kind of compression, - photometric interpretation, and organization as the source image, but - it doesn't copy geotiff tags to the reduced resolution images. - - o Reduced resolution overviews for multi-sample files will currently - always be generated as PLANARCONFIG_SEPARATE. This could be fixed - reasonable easily if needed to improve compatibility with other - packages. Many don't properly support PLANARCONFIG_SEPARATE. - - o Overviews are always written as appended IFDs, rather than using the - ``tree of tree's'' approach using the SUBIFD tag. I wanted to implement - both, but it isn't currently easy to add a SUBIFD tag to an existing - main tiff IFD with libtiff. I hope to try this again later. - - -TIFF File Tags --------------- - -The results of running addtiffo on a 1024x1024 tiled greyscale file -with the arguments ``2 4 8 16'' is to add four additional TIFF directories -appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra -items are reduced resolution images. - -The tiffinfo output of such a file might look like this: - -TIFF Directory at offset 0x118008 - Image Width: 1024 Image Length: 1024 - Tile Width: 256 Tile Length: 112 - Bits/Sample: 8 - Compression Scheme: none - Photometric Interpretation: min-is-black - Samples/Pixel: 1 - Planar Configuration: single image plane -TIFF Directory at offset 0x15e1d2 - Subfile Type: reduced-resolution image (1 = 0x1) - Image Width: 512 Image Length: 512 - Tile Width: 256 Tile Length: 112 - Bits/Sample: 8 - Compression Scheme: none - Photometric Interpretation: min-is-black - Samples/Pixel: 1 - Planar Configuration: separate image planes -TIFF Directory at offset 0x1732b8 - Subfile Type: reduced-resolution image (1 = 0x1) - Image Width: 256 Image Length: 256 - Tile Width: 256 Tile Length: 112 - Bits/Sample: 8 - Compression Scheme: none - Photometric Interpretation: min-is-black - Samples/Pixel: 1 - Planar Configuration: separate image planes -TIFF Directory at offset 0x17a366 - Subfile Type: reduced-resolution image (1 = 0x1) - Image Width: 128 Image Length: 128 - Tile Width: 128 Tile Length: 112 - Bits/Sample: 8 - Compression Scheme: none - Photometric Interpretation: min-is-black - Samples/Pixel: 1 - Planar Configuration: separate image planes -TIFF Directory at offset 0x17b40c - Subfile Type: reduced-resolution image (1 = 0x1) - Image Width: 64 Image Length: 64 - Tile Width: 64 Tile Length: 64 - Bits/Sample: 8 - Compression Scheme: none - Photometric Interpretation: min-is-black - Samples/Pixel: 1 - Planar Configuration: separate image planes - - -Building --------- - -You will need a C compiler. You will need to have libtiff already -built and installed. The provided Makefile should work on most Unix systems. -A similar file will be needed for Windows, but is not provided. - -The CFLAGS and LIBS macros in the Makefile will have to be updated to -point to the correct location of the libtiff include files, and library. - - -Credits -------- - - o Intergraph Corporation for partially funding the work. - - o Global Geomatics for partially funding reorganization of the overview - building ability as a separate utility. - - o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to - be done. - - o Max Martinez of Erdas for his discussion of external overviews. - - o Atlantis Scientific who supported adding averaging, and some other - generalizations. - - o Frank Warmerdam for writing the bulk of the code. - - o Sam Leffler since this only exists because of his libtiff. - diff --git a/third_party/libtiff/contrib/addtiffo/addtiffo.c b/third_party/libtiff/contrib/addtiffo/addtiffo.c deleted file mode 100644 index a4ff19b..0000000 --- a/third_party/libtiff/contrib/addtiffo/addtiffo.c +++ /dev/null @@ -1,174 +0,0 @@ -/****************************************************************************** - * Project: GeoTIFF Overview Builder - * Purpose: Mainline for building overviews in a TIFF file. - * Author: Frank Warmerdam, warmerdam@pobox.com - * - ****************************************************************************** - * Copyright (c) 1999, Frank Warmerdam - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************** - * - * $Log: addtiffo.c,v $ - * Revision 1.8 2015-05-30 20:30:27 bfriesen - * * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity - * 1024226 "Untrusted value as argument". - * - * Revision 1.7 2010-06-08 18:55:15 bfriesen - * * contrib: Add an emacs formatting mode footer to all source files - * so that emacs can be effectively used. - * - * Revision 1.6 2005/12/16 05:59:55 fwarmerdam - * Major upgrade to support YCbCr subsampled jpeg images - * - * Revision 1.4 2004/09/21 13:31:23 dron - * Add missed include string.h. - * - * Revision 1.3 2000/04/18 22:48:31 warmerda - * Added support for averaging resampling - * - * Revision 1.2 2000/01/28 15:36:38 warmerda - * pass TIFF handle instead of filename to overview builder - * - * Revision 1.1 1999/08/17 01:47:59 warmerda - * New - * - * Revision 1.1 1999/03/12 17:46:32 warmerda - * New - * - * Revision 1.2 1999/02/11 22:27:12 warmerda - * Added multi-sample support - * - * Revision 1.1 1999/02/11 18:12:30 warmerda - * New - */ - -#include "tiffio.h" -#include -#include -#include - -void TIFFBuildOverviews(TIFF *, int, int *, int, const char *, - int (*)(double, void *), void *); - -/************************************************************************/ -/* main() */ -/************************************************************************/ - -int main(int argc, char **argv) - -{ - int anOverviews[100]; /* TODO: un-hardwire array length, flexible allocate - */ - int nOverviewCount = 0; - int bUseSubIFD = 0; - TIFF *hTIFF; - const char *pszResampling = "nearest"; - - /* -------------------------------------------------------------------- */ - /* Usage: */ - /* -------------------------------------------------------------------- */ - if (argc < 2) - { - printf("Usage: addtiffo [-r {nearest,average,mode}]\n" - " tiff_filename [resolution_reductions]\n" - "\n" - "Example:\n" - " %% addtiffo abc.tif 2 4 8 16\n"); - return (1); - } - - while (argv[1][0] == '-') - { - if (strcmp(argv[1], "-subifd") == 0) - { - bUseSubIFD = 1; - argv++; - argc--; - } - else if (strcmp(argv[1], "-r") == 0) - { - argv += 2; - argc -= 2; - pszResampling = *argv; - } - else - { - fprintf(stderr, "Incorrect parameters\n"); - return (1); - } - } - - /* TODO: resampling mode parameter needs to be encoded in an integer from - * this point on */ - - /* -------------------------------------------------------------------- */ - /* Collect the user requested reduction factors. */ - /* -------------------------------------------------------------------- */ - while (nOverviewCount < argc - 2 && nOverviewCount < 100) - { - anOverviews[nOverviewCount] = atoi(argv[nOverviewCount + 2]); - if ((anOverviews[nOverviewCount] <= 0) || - ((anOverviews[nOverviewCount] > 1024))) - { - fprintf(stderr, "Incorrect parameters\n"); - return (1); - } - nOverviewCount++; - } - - /* -------------------------------------------------------------------- */ - /* Default to four overview levels. It would be nicer if it */ - /* defaulted based on the size of the source image. */ - /* -------------------------------------------------------------------- */ - /* TODO: make it default based on the size of the source image */ - if (nOverviewCount == 0) - { - nOverviewCount = 4; - - anOverviews[0] = 2; - anOverviews[1] = 4; - anOverviews[2] = 8; - anOverviews[3] = 16; - } - - /* -------------------------------------------------------------------- */ - /* Build the overview. */ - /* -------------------------------------------------------------------- */ - hTIFF = TIFFOpen(argv[1], "r+"); - if (hTIFF == NULL) - { - fprintf(stderr, "TIFFOpen(%s) failed.\n", argv[1]); - return (1); - } - - TIFFBuildOverviews(hTIFF, nOverviewCount, anOverviews, bUseSubIFD, - pszResampling, NULL, NULL); - - TIFFClose(hTIFF); - -/* -------------------------------------------------------------------- */ -/* Optionally test for memory leaks. */ -/* -------------------------------------------------------------------- */ -#ifdef DBMALLOC - malloc_dump(1); -#endif - - return (0); -} diff --git a/third_party/libtiff/contrib/addtiffo/tif_overview.c b/third_party/libtiff/contrib/addtiffo/tif_overview.c deleted file mode 100644 index 0dff4a3..0000000 --- a/third_party/libtiff/contrib/addtiffo/tif_overview.c +++ /dev/null @@ -1,933 +0,0 @@ -/****************************************************************************** - * tif_overview.c,v 1.9 2005/05/25 09:03:16 dron Exp - * - * Project: TIFF Overview Builder - * Purpose: Library function for building overviews in a TIFF file. - * Author: Frank Warmerdam, warmerdam@pobox.com - * - * Notes: - * o Currently only images with bits_per_sample of a multiple of eight - * will work. - * - * o The downsampler currently just takes the top left pixel from the - * source rectangle. Eventually sampling options of averaging, mode, and - * ``center pixel'' should be offered. - * - * o The code will attempt to use the same kind of compression, - * photometric interpretation, and organization as the source image, but - * it doesn't copy geotiff tags to the reduced resolution images. - * - * o Reduced resolution overviews for multi-sample files will currently - * always be generated as PLANARCONFIG_SEPARATE. This could be fixed - * reasonable easily if needed to improve compatibility with other - * packages. Many don't properly support PLANARCONFIG_SEPARATE. - * - ****************************************************************************** - * Copyright (c) 1999, Frank Warmerdam - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************** - */ - -/* TODO: update notes in header above */ - -#include -#include -#include -#include - -#include "tif_ovrcache.h" -#include "tiffio.h" - -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#ifndef MAX -#define MIN(a, b) ((a < b) ? a : b) -#define MAX(a, b) ((a > b) ? a : b) -#endif - -#define TIFF_DIR_MAX 65534 - -void TIFFBuildOverviews(TIFF *, int, int *, int, const char *, - int (*)(double, void *), void *); - -/************************************************************************/ -/* TIFF_WriteOverview() */ -/* */ -/* Create a new directory, without any image data for an overview. */ -/* Returns offset of newly created overview directory, but the */ -/* current directory is reset to be the one in used when this */ -/* function is called. */ -/************************************************************************/ - -uint32_t TIFF_WriteOverview(TIFF *hTIFF, uint32_t nXSize, uint32_t nYSize, - int nBitsPerPixel, int nPlanarConfig, int nSamples, - int nBlockXSize, int nBlockYSize, int bTiled, - int nCompressFlag, int nPhotometric, - int nSampleFormat, unsigned short *panRed, - unsigned short *panGreen, unsigned short *panBlue, - int bUseSubIFDs, int nHorSubsampling, - int nVerSubsampling) - -{ - toff_t nBaseDirOffset; - toff_t nOffset; - tdir_t iNumDir; - - (void)bUseSubIFDs; - - nBaseDirOffset = TIFFCurrentDirOffset(hTIFF); - - TIFFCreateDirectory(hTIFF); - - /* -------------------------------------------------------------------- */ - /* Setup TIFF fields. */ - /* -------------------------------------------------------------------- */ - TIFFSetField(hTIFF, TIFFTAG_IMAGEWIDTH, nXSize); - TIFFSetField(hTIFF, TIFFTAG_IMAGELENGTH, nYSize); - if (nSamples == 1) - TIFFSetField(hTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - else - TIFFSetField(hTIFF, TIFFTAG_PLANARCONFIG, nPlanarConfig); - - TIFFSetField(hTIFF, TIFFTAG_BITSPERSAMPLE, nBitsPerPixel); - TIFFSetField(hTIFF, TIFFTAG_SAMPLESPERPIXEL, nSamples); - TIFFSetField(hTIFF, TIFFTAG_COMPRESSION, nCompressFlag); - TIFFSetField(hTIFF, TIFFTAG_PHOTOMETRIC, nPhotometric); - TIFFSetField(hTIFF, TIFFTAG_SAMPLEFORMAT, nSampleFormat); - - if (bTiled) - { - TIFFSetField(hTIFF, TIFFTAG_TILEWIDTH, nBlockXSize); - TIFFSetField(hTIFF, TIFFTAG_TILELENGTH, nBlockYSize); - } - else - TIFFSetField(hTIFF, TIFFTAG_ROWSPERSTRIP, nBlockYSize); - - TIFFSetField(hTIFF, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE); - - if (nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB) - { - TIFFSetField(hTIFF, TIFFTAG_YCBCRSUBSAMPLING, nHorSubsampling, - nVerSubsampling); - /* TODO: also write YCbCrPositioning and YCbCrCoefficients tag identical - * to source IFD */ - } - /* TODO: add command-line parameter for selecting jpeg compression quality - * that gets ignored when compression isn't jpeg */ - - /* -------------------------------------------------------------------- */ - /* Write color table if one is present. */ - /* -------------------------------------------------------------------- */ - if (panRed != NULL) - { - TIFFSetField(hTIFF, TIFFTAG_COLORMAP, panRed, panGreen, panBlue); - } - - /* -------------------------------------------------------------------- */ - /* Write directory, and return byte offset. */ - /* -------------------------------------------------------------------- */ - if (TIFFWriteCheck(hTIFF, bTiled, "TIFFBuildOverviews") == 0) - return 0; - - if (!TIFFWriteDirectory(hTIFF)) - return 0; - iNumDir = TIFFNumberOfDirectories(hTIFF); - if (iNumDir > TIFF_DIR_MAX) - { - TIFFErrorExt(TIFFClientdata(hTIFF), "TIFF_WriteOverview", - "File `%s' has too many directories.\n", - TIFFFileName(hTIFF)); - exit(-1); - } - TIFFSetDirectory(hTIFF, (tdir_t)(iNumDir - 1)); - - nOffset = TIFFCurrentDirOffset(hTIFF); - - TIFFSetSubDirectory(hTIFF, nBaseDirOffset); - - return (uint32_t)nOffset; -} - -/************************************************************************/ -/* TIFF_GetSourceSamples() */ -/************************************************************************/ - -static void TIFF_GetSourceSamples(double *padfSamples, unsigned char *pabySrc, - int nPixelBytes, int nSampleFormat, - uint32_t nXSize, uint32_t nYSize, - int nPixelOffset, int nLineOffset) -{ - uint32_t iXOff, iYOff; - int iSample; - - iSample = 0; - - for (iYOff = 0; iYOff < nYSize; iYOff++) - { - for (iXOff = 0; iXOff < nXSize; iXOff++) - { - unsigned char *pabyData; - - pabyData = pabySrc + iYOff * nLineOffset + iXOff * nPixelOffset; - - if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1) - { - padfSamples[iSample++] = *pabyData; - } - else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2) - { - padfSamples[iSample++] = ((uint16_t *)pabyData)[0]; - } - else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4) - { - padfSamples[iSample++] = ((uint32_t *)pabyData)[0]; - } - else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2) - { - padfSamples[iSample++] = ((int16_t *)pabyData)[0]; - } - else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32) - { - padfSamples[iSample++] = ((int32_t *)pabyData)[0]; - } - else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4) - { - padfSamples[iSample++] = ((float *)pabyData)[0]; - } - else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8) - { - padfSamples[iSample++] = ((double *)pabyData)[0]; - } - } - } -} - -/************************************************************************/ -/* TIFF_SetSample() */ -/************************************************************************/ - -static void TIFF_SetSample(unsigned char *pabyData, int nPixelBytes, - int nSampleFormat, double dfValue) - -{ - if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1) - { - *pabyData = (unsigned char)MAX(0, MIN(255, dfValue)); - } - else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2) - { - *((uint16_t *)pabyData) = (uint16_t)MAX(0, MIN(65535, dfValue)); - } - else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4) - { - *((uint32_t *)pabyData) = (uint32_t)dfValue; - } - else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2) - { - *((int16_t *)pabyData) = (int16_t)MAX(-32768, MIN(32767, dfValue)); - } - else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32) - { - *((int32_t *)pabyData) = (int32_t)dfValue; - } - else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4) - { - *((float *)pabyData) = (float)dfValue; - } - else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8) - { - *((double *)pabyData) = dfValue; - } -} - -/************************************************************************/ -/* TIFF_DownSample() */ -/* */ -/* Down sample a tile of full res data into a window of a tile */ -/* of downsampled data. */ -/************************************************************************/ - -static void TIFF_DownSample(unsigned char *pabySrcTile, uint32_t nBlockXSize, - uint32_t nBlockYSize, int nPixelSkewBits, - int nBitsPerPixel, unsigned char *pabyOTile, - uint32_t nOBlockXSize, uint32_t nOBlockYSize, - uint32_t nTXOff, uint32_t nTYOff, int nOMult, - int nSampleFormat, const char *pszResampling) - -{ - uint32_t i, j; - int k, nPixelBytes = (nBitsPerPixel) / 8; - int nPixelGroupBytes = (nBitsPerPixel + nPixelSkewBits) / 8; - unsigned char *pabySrc, *pabyDst; - double *padfSamples; - size_t tpadfSamples_size, padfSamples_size; - - assert(nBitsPerPixel >= 8); - - /* sizeof(double) * nOMult * nOMult */ - tpadfSamples_size = nOMult * nOMult; - if ((nOMult != 0) && (tpadfSamples_size / nOMult == (size_t)nOMult)) - { - padfSamples_size = tpadfSamples_size; - tpadfSamples_size = padfSamples_size * sizeof(double); - if ((tpadfSamples_size / padfSamples_size) == sizeof(double)) - padfSamples_size = tpadfSamples_size; - else - padfSamples_size = 0; - } - else - { - padfSamples_size = 0; - } - if (padfSamples_size == 0) - { - /* TODO: This is an error condition */ - return; - } - padfSamples = (double *)malloc(padfSamples_size); - - /* ==================================================================== */ - /* Loop over scanline chunks to process, establishing where the */ - /* data is going. */ - /* ==================================================================== */ - for (j = 0; j * nOMult < nBlockYSize; j++) - { - if (j + nTYOff >= nOBlockYSize) - break; - - pabyDst = pabyOTile + ((j + nTYOff) * nOBlockXSize + nTXOff) * - nPixelBytes * nPixelGroupBytes; - - /* -------------------------------------------------------------------- - */ - /* Handler nearest resampling ... we don't even care about the */ - /* data type, we just do a bytewise copy. */ - /* -------------------------------------------------------------------- - */ - if (strncmp(pszResampling, "nearest", 4) == 0 || - strncmp(pszResampling, "NEAR", 4) == 0) - { - pabySrc = pabySrcTile + j * nOMult * nBlockXSize * nPixelGroupBytes; - - for (i = 0; i * nOMult < nBlockXSize; i++) - { - if (i + nTXOff >= nOBlockXSize) - break; - - /* - * For now use simple subsampling, from the top left corner - * of the source block of pixels. - */ - - for (k = 0; k < nPixelBytes; k++) - pabyDst[k] = pabySrc[k]; - - pabyDst += nPixelBytes * nPixelGroupBytes; - pabySrc += nOMult * nPixelGroupBytes; - } - } - - /* -------------------------------------------------------------------- - */ - /* Handle the case of averaging. For this we also have to */ - /* handle each sample format we are concerned with. */ - /* -------------------------------------------------------------------- - */ - else if (strncmp(pszResampling, "averag", 6) == 0 || - strncmp(pszResampling, "AVERAG", 6) == 0) - { - pabySrc = pabySrcTile + j * nOMult * nBlockXSize * nPixelGroupBytes; - - for (i = 0; i * nOMult < nBlockXSize; i++) - { - double dfTotal; - uint32_t nXSize, nYSize, iSample; - - if (i + nTXOff >= nOBlockXSize) - break; - - nXSize = MIN((uint32_t)nOMult, nBlockXSize - i); - nYSize = MIN((uint32_t)nOMult, nBlockYSize - j); - - TIFF_GetSourceSamples( - padfSamples, pabySrc, nPixelBytes, nSampleFormat, nXSize, - nYSize, nPixelGroupBytes, nPixelGroupBytes * nBlockXSize); - - dfTotal = 0; - for (iSample = 0; iSample < nXSize * nYSize; iSample++) - { - dfTotal += padfSamples[iSample]; - } - - TIFF_SetSample(pabyDst, nPixelBytes, nSampleFormat, - dfTotal / (nXSize * nYSize)); - - pabySrc += nOMult * nPixelGroupBytes; - pabyDst += nPixelBytes; - } - } - } - - free(padfSamples); -} - -/************************************************************************/ -/* TIFF_DownSample_Subsampled() */ -/************************************************************************/ -static void TIFF_DownSample_Subsampled( - unsigned char *pabySrcTile, int nSample, uint32_t nBlockXSize, - uint32_t nBlockYSize, unsigned char *pabyOTile, uint32_t nOBlockXSize, - uint32_t nOBlockYSize, uint32_t nTXOff, uint32_t nTYOff, int nOMult, - const char *pszResampling, int nHorSubsampling, int nVerSubsampling) -{ - /* TODO: test with variety of subsampling values, and incovinient tile/strip - * sizes */ - int nSampleBlockSize; - int nSourceSampleRowSize; - int nDestSampleRowSize; - uint32_t nSourceX, nSourceY; - uint32_t nSourceXSec, nSourceYSec; - uint32_t nSourceXSecEnd, nSourceYSecEnd; - uint32_t nDestX, nDestY; - int nSampleOffsetInSampleBlock; - unsigned int nCummulator; - unsigned int nCummulatorCount; - - nSampleBlockSize = nHorSubsampling * nVerSubsampling + 2; - nSourceSampleRowSize = - ((nBlockXSize + nHorSubsampling - 1) / nHorSubsampling) * - nSampleBlockSize; - nDestSampleRowSize = - ((nOBlockXSize + nHorSubsampling - 1) / nHorSubsampling) * - nSampleBlockSize; - - if (strncmp(pszResampling, "nearest", 4) == 0 || - strncmp(pszResampling, "NEAR", 4) == 0) - { - if (nSample == 0) - { - for (nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; - nSourceY += nOMult, nDestY++) - { - if (nDestY >= nOBlockYSize) - break; - - for (nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; - nSourceX += nOMult, nDestX++) - { - if (nDestX >= nOBlockXSize) - break; - - *(pabyOTile + - (nDestY / nVerSubsampling) * nDestSampleRowSize + - (nDestY % nVerSubsampling) * nHorSubsampling + - (nDestX / nHorSubsampling) * nSampleBlockSize + - (nDestX % nHorSubsampling)) = - *(pabySrcTile + - (nSourceY / nVerSubsampling) * nSourceSampleRowSize + - (nSourceY % nVerSubsampling) * nHorSubsampling + - (nSourceX / nHorSubsampling) * nSampleBlockSize + - (nSourceX % nHorSubsampling)); - } - } - } - else - { - nSampleOffsetInSampleBlock = - nHorSubsampling * nVerSubsampling + nSample - 1; - for (nSourceY = 0, nDestY = (nTYOff / nVerSubsampling); - nSourceY < (nBlockYSize / nVerSubsampling); - nSourceY += nOMult, nDestY++) - { - if (nDestY * nVerSubsampling >= nOBlockYSize) - break; - - for (nSourceX = 0, nDestX = (nTXOff / nHorSubsampling); - nSourceX < (nBlockXSize / nHorSubsampling); - nSourceX += nOMult, nDestX++) - { - if (nDestX * nHorSubsampling >= nOBlockXSize) - break; - - *(pabyOTile + nDestY * nDestSampleRowSize + - nDestX * nSampleBlockSize + nSampleOffsetInSampleBlock) = - *(pabySrcTile + nSourceY * nSourceSampleRowSize + - nSourceX * nSampleBlockSize + - nSampleOffsetInSampleBlock); - } - } - } - } - else if (strncmp(pszResampling, "averag", 6) == 0 || - strncmp(pszResampling, "AVERAG", 6) == 0) - { - if (nSample == 0) - { - for (nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; - nSourceY += nOMult, nDestY++) - { - if (nDestY >= nOBlockYSize) - break; - - for (nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; - nSourceX += nOMult, nDestX++) - { - if (nDestX >= nOBlockXSize) - break; - - nSourceXSecEnd = nSourceX + nOMult; - if (nSourceXSecEnd > nBlockXSize) - nSourceXSecEnd = nBlockXSize; - nSourceYSecEnd = nSourceY + nOMult; - if (nSourceYSecEnd > nBlockYSize) - nSourceYSecEnd = nBlockYSize; - nCummulator = 0; - for (nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; - nSourceYSec++) - { - for (nSourceXSec = nSourceX; - nSourceXSec < nSourceXSecEnd; nSourceXSec++) - { - nCummulator += *(pabySrcTile + - (nSourceYSec / nVerSubsampling) * - nSourceSampleRowSize + - (nSourceYSec % nVerSubsampling) * - nHorSubsampling + - (nSourceXSec / nHorSubsampling) * - nSampleBlockSize + - (nSourceXSec % nHorSubsampling)); - } - } - nCummulatorCount = (nSourceXSecEnd - nSourceX) * - (nSourceYSecEnd - nSourceY); - *(pabyOTile + - (nDestY / nVerSubsampling) * nDestSampleRowSize + - (nDestY % nVerSubsampling) * nHorSubsampling + - (nDestX / nHorSubsampling) * nSampleBlockSize + - (nDestX % nHorSubsampling)) = - ((nCummulator + (nCummulatorCount >> 1)) / - nCummulatorCount); - } - } - } - else - { - nSampleOffsetInSampleBlock = - nHorSubsampling * nVerSubsampling + nSample - 1; - for (nSourceY = 0, nDestY = (nTYOff / nVerSubsampling); - nSourceY < (nBlockYSize / nVerSubsampling); - nSourceY += nOMult, nDestY++) - { - if (nDestY * nVerSubsampling >= nOBlockYSize) - break; - - for (nSourceX = 0, nDestX = (nTXOff / nHorSubsampling); - nSourceX < (nBlockXSize / nHorSubsampling); - nSourceX += nOMult, nDestX++) - { - if (nDestX * nHorSubsampling >= nOBlockXSize) - break; - - nSourceXSecEnd = nSourceX + nOMult; - if (nSourceXSecEnd > (nBlockXSize / nHorSubsampling)) - nSourceXSecEnd = (nBlockXSize / nHorSubsampling); - nSourceYSecEnd = nSourceY + nOMult; - if (nSourceYSecEnd > (nBlockYSize / nVerSubsampling)) - nSourceYSecEnd = (nBlockYSize / nVerSubsampling); - nCummulator = 0; - for (nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; - nSourceYSec++) - { - for (nSourceXSec = nSourceX; - nSourceXSec < nSourceXSecEnd; nSourceXSec++) - { - nCummulator += - *(pabySrcTile + - nSourceYSec * nSourceSampleRowSize + - nSourceXSec * nSampleBlockSize + - nSampleOffsetInSampleBlock); - } - } - nCummulatorCount = (nSourceXSecEnd - nSourceX) * - (nSourceYSecEnd - nSourceY); - *(pabyOTile + nDestY * nDestSampleRowSize + - nDestX * nSampleBlockSize + nSampleOffsetInSampleBlock) = - ((nCummulator + (nCummulatorCount >> 1)) / - nCummulatorCount); - } - } - } - } -} - -/************************************************************************/ -/* TIFF_ProcessFullResBlock() */ -/* */ -/* Process one block of full res data, downsampling into each */ -/* of the overviews. */ -/************************************************************************/ - -void TIFF_ProcessFullResBlock(TIFF *hTIFF, int nPlanarConfig, int bSubsampled, - int nHorSubsampling, int nVerSubsampling, - int nOverviews, int *panOvList, int nBitsPerPixel, - int nSamples, TIFFOvrCache **papoRawBIs, - uint32_t nSXOff, uint32_t nSYOff, - unsigned char *pabySrcTile, uint32_t nBlockXSize, - uint32_t nBlockYSize, int nSampleFormat, - const char *pszResampling) - -{ - int iOverview, iSample; - - for (iSample = 0; iSample < nSamples; iSample++) - { - /* - * We have to read a tile/strip for each sample for - * PLANARCONFIG_SEPARATE. Otherwise, we just read all the samples - * at once when handling the first sample. - */ - if (nPlanarConfig == PLANARCONFIG_SEPARATE || iSample == 0) - { - if (TIFFIsTiled(hTIFF)) - { - TIFFReadEncodedTile(hTIFF, - TIFFComputeTile(hTIFF, nSXOff, nSYOff, 0, - (tsample_t)iSample), - pabySrcTile, TIFFTileSize(hTIFF)); - } - else - { - /* Silence Coverity Scan warning about checking return. */ - /* coverity[check_return:SUPPRESS] */ - TIFFReadEncodedStrip( - hTIFF, TIFFComputeStrip(hTIFF, nSYOff, (tsample_t)iSample), - pabySrcTile, TIFFStripSize(hTIFF)); - } - } - - /* - * Loop over destination overview layers - */ - for (iOverview = 0; iOverview < nOverviews; iOverview++) - { - TIFFOvrCache *poRBI = papoRawBIs[iOverview]; - unsigned char *pabyOTile; - uint32_t nTXOff, nTYOff, nOXOff, nOYOff, nOMult; - uint32_t nOBlockXSize = poRBI->nBlockXSize; - uint32_t nOBlockYSize = poRBI->nBlockYSize; - int nSkewBits, nSampleByteOffset; - - /* - * Fetch the destination overview tile - */ - nOMult = panOvList[iOverview]; - nOXOff = (nSXOff / nOMult) / nOBlockXSize; - nOYOff = (nSYOff / nOMult) / nOBlockYSize; - - if (bSubsampled) - { - pabyOTile = TIFFGetOvrBlock_Subsampled(poRBI, nOXOff, nOYOff); - - /* - * Establish the offset into this tile at which we should - * start placing data. - */ - nTXOff = (nSXOff - nOXOff * nOMult * nOBlockXSize) / nOMult; - nTYOff = (nSYOff - nOYOff * nOMult * nOBlockYSize) / nOMult; - -#ifdef DBMALLOC - malloc_chain_check(1); -#endif - TIFF_DownSample_Subsampled( - pabySrcTile, iSample, nBlockXSize, nBlockYSize, pabyOTile, - poRBI->nBlockXSize, poRBI->nBlockYSize, nTXOff, nTYOff, - nOMult, pszResampling, nHorSubsampling, nVerSubsampling); -#ifdef DBMALLOC - malloc_chain_check(1); -#endif - } - else - { - - pabyOTile = TIFFGetOvrBlock(poRBI, nOXOff, nOYOff, iSample); - - /* - * Establish the offset into this tile at which we should - * start placing data. - */ - nTXOff = (nSXOff - nOXOff * nOMult * nOBlockXSize) / nOMult; - nTYOff = (nSYOff - nOYOff * nOMult * nOBlockYSize) / nOMult; - - /* - * Figure out the skew (extra space between ``our samples'') and - * the byte offset to the first sample. - */ - assert((nBitsPerPixel % 8) == 0); - if (nPlanarConfig == PLANARCONFIG_SEPARATE) - { - nSkewBits = 0; - nSampleByteOffset = 0; - } - else - { - nSkewBits = nBitsPerPixel * (nSamples - 1); - nSampleByteOffset = (nBitsPerPixel / 8) * iSample; - } - - /* - * Perform the downsampling. - */ -#ifdef DBMALLOC - malloc_chain_check(1); -#endif - TIFF_DownSample(pabySrcTile + nSampleByteOffset, nBlockXSize, - nBlockYSize, nSkewBits, nBitsPerPixel, - pabyOTile, poRBI->nBlockXSize, - poRBI->nBlockYSize, nTXOff, nTYOff, nOMult, - nSampleFormat, pszResampling); -#ifdef DBMALLOC - malloc_chain_check(1); -#endif - } - } - } -} - -/************************************************************************/ -/* TIFF_BuildOverviews() */ -/* */ -/* Build the requested list of overviews. Overviews are */ -/* maintained in a bunch of temporary files and then these are */ -/* written back to the TIFF file. Only one pass through the */ -/* source TIFF file is made for any number of output */ -/* overviews. */ -/************************************************************************/ - -void TIFFBuildOverviews(TIFF *hTIFF, int nOverviews, int *panOvList, - int bUseSubIFDs, const char *pszResampleMethod, - int (*pfnProgress)(double, void *), void *pProgressData) - -{ - TIFFOvrCache **papoRawBIs; - uint32_t nXSize, nYSize, nBlockXSize, nBlockYSize; - uint16_t nBitsPerPixel, nPhotometric, nCompressFlag, nSamples, - nPlanarConfig, nSampleFormat; - int bSubsampled; - uint16_t nHorSubsampling, nVerSubsampling; - int bTiled, nSXOff, nSYOff, i; - unsigned char *pabySrcTile; - uint16_t *panRedMap, *panGreenMap, *panBlueMap; - TIFFErrorHandler pfnWarning; - - (void)pfnProgress; - (void)pProgressData; - - /* -------------------------------------------------------------------- */ - /* Get the base raster size. */ - /* -------------------------------------------------------------------- */ - TIFFGetField(hTIFF, TIFFTAG_IMAGEWIDTH, &nXSize); - TIFFGetField(hTIFF, TIFFTAG_IMAGELENGTH, &nYSize); - - TIFFGetField(hTIFF, TIFFTAG_BITSPERSAMPLE, &nBitsPerPixel); - /* TODO: nBitsPerPixel seems misnomer and may need renaming to - * nBitsPerSample */ - TIFFGetField(hTIFF, TIFFTAG_SAMPLESPERPIXEL, &nSamples); - TIFFGetFieldDefaulted(hTIFF, TIFFTAG_PLANARCONFIG, &nPlanarConfig); - - TIFFGetFieldDefaulted(hTIFF, TIFFTAG_PHOTOMETRIC, &nPhotometric); - TIFFGetFieldDefaulted(hTIFF, TIFFTAG_COMPRESSION, &nCompressFlag); - TIFFGetFieldDefaulted(hTIFF, TIFFTAG_SAMPLEFORMAT, &nSampleFormat); - - if (nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB) - { - if (nBitsPerPixel != 8 || nSamples != 3 || - nPlanarConfig != PLANARCONFIG_CONTIG || - nSampleFormat != SAMPLEFORMAT_UINT) - { - /* TODO: use of TIFFError is inconsistent with use of fprintf in - * addtiffo.c, sort out */ - TIFFErrorExt( - TIFFClientdata(hTIFF), "TIFFBuildOverviews", - "File `%s' has an unsupported subsampling configuration.\n", - TIFFFileName(hTIFF)); - /* If you need support for this particular flavor, please contact - * either Frank Warmerdam warmerdam@pobox.com Joris Van Damme - * info@awaresystems.be - */ - return; - } - bSubsampled = 1; - TIFFGetField(hTIFF, TIFFTAG_YCBCRSUBSAMPLING, &nHorSubsampling, - &nVerSubsampling); - /* TODO: find out if maybe TIFFGetFieldDefaulted is better choice for - * YCbCrSubsampling tag */ - } - else - { - if (nBitsPerPixel < 8) - { - /* TODO: use of TIFFError is inconsistent with use of fprintf in - * addtiffo.c, sort out */ - TIFFErrorExt( - TIFFClientdata(hTIFF), "TIFFBuildOverviews", - "File `%s' has samples of %d bits per sample. Sample\n" - "sizes of less than 8 bits per sample are not supported.\n", - TIFFFileName(hTIFF), nBitsPerPixel); - return; - } - bSubsampled = 0; - nHorSubsampling = 1; - nVerSubsampling = 1; - } - - /* -------------------------------------------------------------------- */ - /* Turn off warnings to avoid a lot of repeated warnings while */ - /* rereading directories. */ - /* -------------------------------------------------------------------- */ - pfnWarning = TIFFSetWarningHandler(NULL); - - /* -------------------------------------------------------------------- */ - /* Get the base raster block size. */ - /* -------------------------------------------------------------------- */ - if (TIFFGetField(hTIFF, TIFFTAG_ROWSPERSTRIP, &(nBlockYSize))) - { - nBlockXSize = nXSize; - bTiled = FALSE; - } - else - { - TIFFGetField(hTIFF, TIFFTAG_TILEWIDTH, &nBlockXSize); - TIFFGetField(hTIFF, TIFFTAG_TILELENGTH, &nBlockYSize); - bTiled = TRUE; - } - - /* -------------------------------------------------------------------- */ - /* Capture the palette if there is one. */ - /* -------------------------------------------------------------------- */ - if (TIFFGetField(hTIFF, TIFFTAG_COLORMAP, &panRedMap, &panGreenMap, - &panBlueMap)) - { - uint16_t *panRed2, *panGreen2, *panBlue2; - int nColorCount = 1 << nBitsPerPixel; - - panRed2 = (uint16_t *)_TIFFmalloc(2 * nColorCount); - panGreen2 = (uint16_t *)_TIFFmalloc(2 * nColorCount); - panBlue2 = (uint16_t *)_TIFFmalloc(2 * nColorCount); - - memcpy(panRed2, panRedMap, 2 * nColorCount); - memcpy(panGreen2, panGreenMap, 2 * nColorCount); - memcpy(panBlue2, panBlueMap, 2 * nColorCount); - - panRedMap = panRed2; - panGreenMap = panGreen2; - panBlueMap = panBlue2; - } - else - { - panRedMap = panGreenMap = panBlueMap = NULL; - } - - /* -------------------------------------------------------------------- */ - /* Initialize overviews. */ - /* -------------------------------------------------------------------- */ - papoRawBIs = (TIFFOvrCache **)_TIFFmalloc(nOverviews * sizeof(void *)); - - for (i = 0; i < nOverviews; i++) - { - uint32_t nOXSize, nOYSize, nOBlockXSize, nOBlockYSize; - toff_t nDirOffset; - - nOXSize = (nXSize + panOvList[i] - 1) / panOvList[i]; - nOYSize = (nYSize + panOvList[i] - 1) / panOvList[i]; - - nOBlockXSize = MIN(nBlockXSize, nOXSize); - nOBlockYSize = MIN(nBlockYSize, nOYSize); - - if (bTiled) - { - if ((nOBlockXSize % 16) != 0) - nOBlockXSize = nOBlockXSize + 16 - (nOBlockXSize % 16); - - if ((nOBlockYSize % 16) != 0) - nOBlockYSize = nOBlockYSize + 16 - (nOBlockYSize % 16); - } - - nDirOffset = TIFF_WriteOverview( - hTIFF, nOXSize, nOYSize, nBitsPerPixel, nPlanarConfig, nSamples, - nOBlockXSize, nOBlockYSize, bTiled, nCompressFlag, nPhotometric, - nSampleFormat, panRedMap, panGreenMap, panBlueMap, bUseSubIFDs, - nHorSubsampling, nVerSubsampling); - - papoRawBIs[i] = TIFFCreateOvrCache(hTIFF, nDirOffset); - } - - if (panRedMap != NULL) - { - _TIFFfree(panRedMap); - _TIFFfree(panGreenMap); - _TIFFfree(panBlueMap); - } - - /* -------------------------------------------------------------------- */ - /* Allocate a buffer to hold a source block. */ - /* -------------------------------------------------------------------- */ - if (bTiled) - pabySrcTile = (unsigned char *)_TIFFmalloc(TIFFTileSize(hTIFF)); - else - pabySrcTile = (unsigned char *)_TIFFmalloc(TIFFStripSize(hTIFF)); - - /* -------------------------------------------------------------------- */ - /* Loop over the source raster, applying data to the */ - /* destination raster. */ - /* -------------------------------------------------------------------- */ - for (nSYOff = 0; nSYOff < (int)nYSize; nSYOff += nBlockYSize) - { - for (nSXOff = 0; nSXOff < (int)nXSize; nSXOff += nBlockXSize) - { - /* - * Read and resample into the various overview images. - */ - - TIFF_ProcessFullResBlock( - hTIFF, nPlanarConfig, bSubsampled, nHorSubsampling, - nVerSubsampling, nOverviews, panOvList, nBitsPerPixel, nSamples, - papoRawBIs, nSXOff, nSYOff, pabySrcTile, nBlockXSize, - nBlockYSize, nSampleFormat, pszResampleMethod); - } - } - - _TIFFfree(pabySrcTile); - - /* -------------------------------------------------------------------- */ - /* Cleanup the rawblockedimage files. */ - /* -------------------------------------------------------------------- */ - for (i = 0; i < nOverviews; i++) - { - TIFFDestroyOvrCache(papoRawBIs[i]); - } - - if (papoRawBIs != NULL) - _TIFFfree(papoRawBIs); - - TIFFSetWarningHandler(pfnWarning); -} diff --git a/third_party/libtiff/contrib/addtiffo/tif_ovrcache.c b/third_party/libtiff/contrib/addtiffo/tif_ovrcache.c deleted file mode 100644 index 5c6a7d1..0000000 --- a/third_party/libtiff/contrib/addtiffo/tif_ovrcache.c +++ /dev/null @@ -1,411 +0,0 @@ -/****************************************************************************** - * Project: TIFF Overview Builder - * Purpose: Library functions to maintain two rows of tiles or two strips - * of data for output overviews as an output cache. - * Author: Frank Warmerdam, warmerdam@pobox.com - * - ****************************************************************************** - * Copyright (c) 2000, Frank Warmerdam - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************** - */ - -#include "tif_ovrcache.h" -#include "tiffiop.h" -#include - -/************************************************************************/ -/* TIFFCreateOvrCache() */ -/* */ -/* Create an overview cache to hold two rows of blocks from an */ -/* existing TIFF directory. */ -/************************************************************************/ - -TIFFOvrCache *TIFFCreateOvrCache(TIFF *hTIFF, toff_t nDirOffset) - -{ - TIFFOvrCache *psCache; - toff_t nBaseDirOffset; - int nRet; - - psCache = (TIFFOvrCache *)_TIFFmalloc(sizeof(TIFFOvrCache)); - psCache->nDirOffset = nDirOffset; - psCache->hTIFF = hTIFF; - - /* -------------------------------------------------------------------- */ - /* Get definition of this raster from the TIFF file itself. */ - /* -------------------------------------------------------------------- */ - nBaseDirOffset = TIFFCurrentDirOffset(psCache->hTIFF); - nRet = TIFFSetSubDirectory(hTIFF, nDirOffset); - (void)nRet; - assert(nRet == 1); - - TIFFGetField(hTIFF, TIFFTAG_IMAGEWIDTH, &(psCache->nXSize)); - TIFFGetField(hTIFF, TIFFTAG_IMAGELENGTH, &(psCache->nYSize)); - - TIFFGetField(hTIFF, TIFFTAG_BITSPERSAMPLE, &(psCache->nBitsPerPixel)); - TIFFGetField(hTIFF, TIFFTAG_SAMPLESPERPIXEL, &(psCache->nSamples)); - TIFFGetField(hTIFF, TIFFTAG_PLANARCONFIG, &(psCache->nPlanarConfig)); - - if (!TIFFIsTiled(hTIFF)) - { - TIFFGetField(hTIFF, TIFFTAG_ROWSPERSTRIP, &(psCache->nBlockYSize)); - psCache->nBlockXSize = psCache->nXSize; - psCache->nBytesPerBlock = TIFFStripSize(hTIFF); - psCache->bTiled = FALSE; - } - else - { - TIFFGetField(hTIFF, TIFFTAG_TILEWIDTH, &(psCache->nBlockXSize)); - TIFFGetField(hTIFF, TIFFTAG_TILELENGTH, &(psCache->nBlockYSize)); - psCache->nBytesPerBlock = TIFFTileSize(hTIFF); - psCache->bTiled = TRUE; - } - - /* -------------------------------------------------------------------- */ - /* Compute some values from this. */ - /* -------------------------------------------------------------------- */ - - psCache->nBlocksPerRow = - (psCache->nXSize + psCache->nBlockXSize - 1) / psCache->nBlockXSize; - psCache->nBlocksPerColumn = - (psCache->nYSize + psCache->nBlockYSize - 1) / psCache->nBlockYSize; - - if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE) - psCache->nBytesPerRow = psCache->nBytesPerBlock * - psCache->nBlocksPerRow * psCache->nSamples; - else - psCache->nBytesPerRow = - psCache->nBytesPerBlock * psCache->nBlocksPerRow; - - /* -------------------------------------------------------------------- */ - /* Allocate and initialize the data buffers. */ - /* -------------------------------------------------------------------- */ - - psCache->pabyRow1Blocks = - (unsigned char *)_TIFFmalloc((tmsize_t)psCache->nBytesPerRow); - psCache->pabyRow2Blocks = - (unsigned char *)_TIFFmalloc((tmsize_t)psCache->nBytesPerRow); - - if (psCache->pabyRow1Blocks == NULL || psCache->pabyRow2Blocks == NULL) - { - TIFFErrorExt(hTIFF->tif_clientdata, hTIFF->tif_name, - "Can't allocate memory for overview cache."); - /* TODO: use of TIFFError is inconsistent with use of fprintf in - * addtiffo.c, sort out */ - if (psCache->pabyRow1Blocks) - _TIFFfree(psCache->pabyRow1Blocks); - if (psCache->pabyRow2Blocks) - _TIFFfree(psCache->pabyRow2Blocks); - _TIFFfree(psCache); - return NULL; - } - - _TIFFmemset(psCache->pabyRow1Blocks, 0, (tmsize_t)psCache->nBytesPerRow); - _TIFFmemset(psCache->pabyRow2Blocks, 0, (tmsize_t)psCache->nBytesPerRow); - - psCache->nBlockOffset = 0; - - nRet = TIFFSetSubDirectory(psCache->hTIFF, nBaseDirOffset); - (void)nRet; - assert(nRet == 1); - - return psCache; -} - -/************************************************************************/ -/* TIFFWriteOvrRow() */ -/* */ -/* Write one entire row of blocks (row 1) to the tiff file, and */ -/* then rotate the block buffers, essentially moving things */ -/* down by one block. */ -/************************************************************************/ - -static void TIFFWriteOvrRow(TIFFOvrCache *psCache) - -{ - int nRet, iTileX, iTileY = psCache->nBlockOffset; - unsigned char *pabyData; - toff_t nBaseDirOffset; - uint32_t RowsInStrip; - - /* -------------------------------------------------------------------- */ - /* If the output cache is multi-byte per sample, and the file */ - /* being written to is of a different byte order than the current */ - /* platform, we will need to byte swap the data. */ - /* -------------------------------------------------------------------- */ - if (TIFFIsByteSwapped(psCache->hTIFF)) - { - uint64_t n; - if (psCache->nBitsPerPixel == 16) - { - n = (psCache->nBytesPerBlock * psCache->nSamples) / 2; -#ifdef SIZEOF_SIZE_T -#if SIZEOF_SIZE_T <= 4 - if (n > INT32_MAX) -#else - if (n > INT64_MAX) -#endif -#else -#pragma message( \ - "---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----") - SIZEOF_SIZE_T -#endif - { - TIFFErrorExt(TIFFClientdata(psCache->hTIFF), - "TIFFWriteOvrRow()", - "Integer overflow of number of 'short' to swap"); - n = 0; - } - TIFFSwabArrayOfShort((uint16_t *)psCache->pabyRow1Blocks, - (tmsize_t)n); - } - - else if (psCache->nBitsPerPixel == 32) - { - n = (psCache->nBytesPerBlock * psCache->nSamples) / 4; -#ifdef SIZEOF_SIZE_T -#if SIZEOF_SIZE_T <= 4 - if (n > INT32_MAX) -#else - if (n > INT64_MAX) -#endif -#else -#pragma message( \ - "---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----") - SIZEOF_SIZE_T -#endif - { - TIFFErrorExt(TIFFClientdata(psCache->hTIFF), - "TIFFWriteOvrRow()", - "Integer overflow of number of 'long' to swap"); - n = 0; - } - TIFFSwabArrayOfLong((uint32_t *)psCache->pabyRow1Blocks, - (tmsize_t)n); - } - - else if (psCache->nBitsPerPixel == 64) - { - n = (psCache->nBytesPerBlock * psCache->nSamples) / 8; -#ifdef SIZEOF_SIZE_T -#if SIZEOF_SIZE_T <= 4 - if (n > INT32_MAX) -#else - if (n > INT64_MAX) -#endif -#else -#pragma message( \ - "---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----") - SIZEOF_SIZE_T -#endif - { - TIFFErrorExt(TIFFClientdata(psCache->hTIFF), - "TIFFWriteOvrRow()", - "Integer overflow of number of 'double' to swap"); - n = 0; - } - TIFFSwabArrayOfDouble((double *)psCache->pabyRow1Blocks, - (tmsize_t)n); - } - } - - /* -------------------------------------------------------------------- */ - /* Record original directory position, so we can restore it at */ - /* end. */ - /* -------------------------------------------------------------------- */ - nBaseDirOffset = TIFFCurrentDirOffset(psCache->hTIFF); - nRet = TIFFSetSubDirectory(psCache->hTIFF, psCache->nDirOffset); - (void)nRet; - assert(nRet == 1); - - /* -------------------------------------------------------------------- */ - /* Write blocks to TIFF file. */ - /* -------------------------------------------------------------------- */ - for (iTileX = 0; iTileX < psCache->nBlocksPerRow; iTileX++) - { - int nTileID; - - if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE) - { - int iSample; - - for (iSample = 0; iSample < psCache->nSamples; iSample++) - { - pabyData = TIFFGetOvrBlock(psCache, iTileX, iTileY, iSample); - - if (psCache->bTiled) - { - nTileID = TIFFComputeTile( - psCache->hTIFF, iTileX * psCache->nBlockXSize, - iTileY * psCache->nBlockYSize, 0, (tsample_t)iSample); - if (TIFFWriteEncodedTile(psCache->hTIFF, nTileID, pabyData, - TIFFTileSize(psCache->hTIFF)) < 0) - { - fprintf(stderr, "TIFFWriteEncodedTile() failed\n"); - } - } - else - { - nTileID = TIFFComputeStrip(psCache->hTIFF, - iTileY * psCache->nBlockYSize, - (tsample_t)iSample); - RowsInStrip = psCache->nBlockYSize; - if ((iTileY + 1) * psCache->nBlockYSize > psCache->nYSize) - RowsInStrip = - psCache->nYSize - iTileY * psCache->nBlockYSize; - if (TIFFWriteEncodedStrip( - psCache->hTIFF, nTileID, pabyData, - TIFFVStripSize(psCache->hTIFF, RowsInStrip)) < 0) - { - fprintf(stderr, "TIFFWriteEncodedStrip() failed\n"); - } - } - } - } - else - { - pabyData = TIFFGetOvrBlock(psCache, iTileX, iTileY, 0); - - if (psCache->bTiled) - { - nTileID = TIFFComputeTile(psCache->hTIFF, - iTileX * psCache->nBlockXSize, - iTileY * psCache->nBlockYSize, 0, 0); - if (TIFFWriteEncodedTile(psCache->hTIFF, nTileID, pabyData, - TIFFTileSize(psCache->hTIFF)) < 0) - { - fprintf(stderr, "TIFFWriteEncodedTile() failed\n"); - } - } - else - { - nTileID = TIFFComputeStrip(psCache->hTIFF, - iTileY * psCache->nBlockYSize, 0); - RowsInStrip = psCache->nBlockYSize; - if ((iTileY + 1) * psCache->nBlockYSize > psCache->nYSize) - RowsInStrip = - psCache->nYSize - iTileY * psCache->nBlockYSize; - if (TIFFWriteEncodedStrip( - psCache->hTIFF, nTileID, pabyData, - TIFFVStripSize(psCache->hTIFF, RowsInStrip)) < 0) - { - fprintf(stderr, "TIFFWriteEncodedStrip() failed\n"); - } - } - } - } - - /* -------------------------------------------------------------------- */ - /* Rotate buffers. */ - /* -------------------------------------------------------------------- */ - pabyData = psCache->pabyRow1Blocks; - psCache->pabyRow1Blocks = psCache->pabyRow2Blocks; - psCache->pabyRow2Blocks = pabyData; - - _TIFFmemset(pabyData, 0, (tmsize_t)psCache->nBytesPerRow); - - psCache->nBlockOffset++; - - /* -------------------------------------------------------------------- */ - /* Restore access to original directory. */ - /* -------------------------------------------------------------------- */ - TIFFFlush(psCache->hTIFF); - /* TODO: add checks on error status return of TIFFFlush */ - TIFFSetSubDirectory(psCache->hTIFF, nBaseDirOffset); - /* TODO: add checks on error status return of TIFFSetSubDirectory */ -} - -/************************************************************************/ -/* TIFFGetOvrBlock() */ -/************************************************************************/ - -/* TODO: make TIFF_Downsample handle iSample offset, so that we can - * do with a single TIFFGetOvrBlock and no longer need - * TIFFGetOvrBlock_Subsampled */ -unsigned char *TIFFGetOvrBlock(TIFFOvrCache *psCache, int iTileX, int iTileY, - int iSample) - -{ - toff_t nRowOffset; - - if (iTileY > psCache->nBlockOffset + 1) - TIFFWriteOvrRow(psCache); - - assert(iTileX >= 0 && iTileX < psCache->nBlocksPerRow); - assert(iTileY >= 0 && iTileY < psCache->nBlocksPerColumn); - assert(iTileY >= psCache->nBlockOffset && - iTileY < psCache->nBlockOffset + 2); - assert(iSample >= 0 && iSample < psCache->nSamples); - - if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE) - nRowOffset = ((((toff_t)iTileX * psCache->nSamples) + iSample) * - psCache->nBytesPerBlock); - else - nRowOffset = iTileX * psCache->nBytesPerBlock + - (psCache->nBitsPerPixel + 7) / 8 * iSample; - - if (iTileY == psCache->nBlockOffset) - return psCache->pabyRow1Blocks + nRowOffset; - else - return psCache->pabyRow2Blocks + nRowOffset; -} - -/************************************************************************/ -/* TIFFGetOvrBlock_Subsampled() */ -/************************************************************************/ - -unsigned char *TIFFGetOvrBlock_Subsampled(TIFFOvrCache *psCache, int iTileX, - int iTileY) - -{ - toff_t nRowOffset; - - if (iTileY > psCache->nBlockOffset + 1) - TIFFWriteOvrRow(psCache); - - assert(iTileX >= 0 && iTileX < psCache->nBlocksPerRow); - assert(iTileY >= 0 && iTileY < psCache->nBlocksPerColumn); - assert(iTileY >= psCache->nBlockOffset && - iTileY < psCache->nBlockOffset + 2); - assert(psCache->nPlanarConfig != PLANARCONFIG_SEPARATE); - - nRowOffset = iTileX * psCache->nBytesPerBlock; - - if (iTileY == psCache->nBlockOffset) - return psCache->pabyRow1Blocks + nRowOffset; - else - return psCache->pabyRow2Blocks + nRowOffset; -} - -/************************************************************************/ -/* TIFFDestroyOvrCache() */ -/************************************************************************/ - -void TIFFDestroyOvrCache(TIFFOvrCache *psCache) - -{ - while (psCache->nBlockOffset < psCache->nBlocksPerColumn) - TIFFWriteOvrRow(psCache); - - _TIFFfree(psCache->pabyRow1Blocks); - _TIFFfree(psCache->pabyRow2Blocks); - _TIFFfree(psCache); -} diff --git a/third_party/libtiff/contrib/addtiffo/tif_ovrcache.h b/third_party/libtiff/contrib/addtiffo/tif_ovrcache.h deleted file mode 100644 index ddd82d9..0000000 --- a/third_party/libtiff/contrib/addtiffo/tif_ovrcache.h +++ /dev/null @@ -1,96 +0,0 @@ -/****************************************************************************** - * tif_ovrcache.h,v 1.3 2005/05/25 09:03:16 dron Exp - * - * Project: TIFF Overview Builder - * Purpose: Library functions to maintain two rows of tiles or two strips - * of data for output overviews as an output cache. - * Author: Frank Warmerdam, warmerdam@pobox.com - * - * This code could potentially be used by other applications wanting to - * manage a once-through write cache. - * - ****************************************************************************** - * Copyright (c) 2000, Frank Warmerdam - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************** - */ - -#ifndef TIF_OVRCACHE_H_INCLUDED -#define TIF_OVRCACHE_H_INCLUDED - -#include "tiffio.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - - typedef struct - { - uint32_t nXSize; - uint32_t nYSize; - - uint16_t nBitsPerPixel; - uint16_t nSamples; - uint16_t nPlanarConfig; - uint32_t nBlockXSize; - uint32_t nBlockYSize; - toff_t nBytesPerBlock; - toff_t nBytesPerRow; - - int nBlocksPerRow; - int nBlocksPerColumn; - - int nBlockOffset; /* what block is the first in papabyBlocks? */ - unsigned char *pabyRow1Blocks; - unsigned char *pabyRow2Blocks; - - toff_t nDirOffset; - TIFF *hTIFF; - int bTiled; - - } TIFFOvrCache; - - TIFFOvrCache *TIFFCreateOvrCache(TIFF *hTIFF, toff_t nDirOffset); - unsigned char *TIFFGetOvrBlock(TIFFOvrCache *psCache, int iTileX, - int iTileY, int iSample); - unsigned char *TIFFGetOvrBlock_Subsampled(TIFFOvrCache *psCache, int iTileX, - int iTileY); - void TIFFDestroyOvrCache(TIFFOvrCache *); - - void TIFFBuildOverviews(TIFF *, int, int *, int, const char *, - int (*)(double, void *), void *); - - void TIFF_ProcessFullResBlock(TIFF *, int, int, int, int, int, int *, int, - int, TIFFOvrCache **, uint32_t, uint32_t, - unsigned char *, uint32_t, uint32_t, int, - const char *); - - uint32_t TIFF_WriteOverview(TIFF *, uint32_t, uint32_t, int, int, int, int, - int, int, int, int, int, unsigned short *, - unsigned short *, unsigned short *, int, int, - int); - -#if defined(__cplusplus) -} -#endif - -#endif /* ndef TIF_OVRCACHE_H_INCLUDED */ - diff --git a/third_party/libtiff/contrib/dbs/CMakeLists.txt b/third_party/libtiff/contrib/dbs/CMakeLists.txt deleted file mode 100644 index 2de9b51..0000000 --- a/third_party/libtiff/contrib/dbs/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -add_executable(tiff-bi tiff-bi.c) -set_target_properties(tiff-bi PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff-bi tiff tiff_port) - -add_executable(tiff-grayscale tiff-grayscale.c) -set_target_properties(tiff-grayscale PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff-grayscale tiff tiff_port CMath::CMath) - -add_executable(tiff-palette tiff-palette.c) -set_target_properties(tiff-palette PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff-palette tiff tiff_port) - -add_executable(tiff-rgb tiff-rgb.c) -set_target_properties(tiff-rgb PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff-rgb tiff tiff_port CMath::CMath) - -if(WEBP_SUPPORT AND EMSCRIPTEN) - # Emscripten is pretty finnicky about linker flags. - # It needs --shared-memory if and only if atomics or bulk-memory is used. - foreach(target tiff-bi - tiff-grayscale - tiff-palette - tiff-rgb) - target_link_options(${target} PUBLIC "-Wl,--shared-memory") - endforeach() -endif() diff --git a/third_party/libtiff/contrib/dbs/Makefile.am b/third_party/libtiff/contrib/dbs/Makefile.am deleted file mode 100644 index 191d934..0000000 --- a/third_party/libtiff/contrib/dbs/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -SUBDIRS = xtiff - -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -EXTRA_DIST = \ - CMakeLists.txt \ - README - -if TIFF_CONTRIB -noinst_PROGRAMS = tiff-bi tiff-grayscale tiff-palette tiff-rgb -endif - -tiff_bi_SOURCES = tiff-bi.c -tiff_bi_LDADD = $(LIBTIFF) -tiff_grayscale_SOURCES = tiff-grayscale.c -tiff_grayscale_LDADD = $(LIBTIFF) -tiff_palette_SOURCES = tiff-palette.c -tiff_palette_LDADD = $(LIBTIFF) -tiff_rgb_SOURCES = tiff-rgb.c -tiff_rgb_LDADD = $(LIBTIFF) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff - diff --git a/third_party/libtiff/contrib/dbs/Makefile.in b/third_party/libtiff/contrib/dbs/Makefile.in deleted file mode 100644 index 20ee53f..0000000 --- a/third_party/libtiff/contrib/dbs/Makefile.in +++ /dev/null @@ -1,827 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@TIFF_CONTRIB_TRUE@noinst_PROGRAMS = tiff-bi$(EXEEXT) \ -@TIFF_CONTRIB_TRUE@ tiff-grayscale$(EXEEXT) \ -@TIFF_CONTRIB_TRUE@ tiff-palette$(EXEEXT) tiff-rgb$(EXEEXT) -subdir = contrib/dbs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_tiff_bi_OBJECTS = tiff-bi.$(OBJEXT) -tiff_bi_OBJECTS = $(am_tiff_bi_OBJECTS) -tiff_bi_DEPENDENCIES = $(LIBTIFF) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -am_tiff_grayscale_OBJECTS = tiff-grayscale.$(OBJEXT) -tiff_grayscale_OBJECTS = $(am_tiff_grayscale_OBJECTS) -tiff_grayscale_DEPENDENCIES = $(LIBTIFF) -am_tiff_palette_OBJECTS = tiff-palette.$(OBJEXT) -tiff_palette_OBJECTS = $(am_tiff_palette_OBJECTS) -tiff_palette_DEPENDENCIES = $(LIBTIFF) -am_tiff_rgb_OBJECTS = tiff-rgb.$(OBJEXT) -tiff_rgb_OBJECTS = $(am_tiff_rgb_OBJECTS) -tiff_rgb_DEPENDENCIES = $(LIBTIFF) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/tiff-bi.Po \ - ./$(DEPDIR)/tiff-grayscale.Po ./$(DEPDIR)/tiff-palette.Po \ - ./$(DEPDIR)/tiff-rgb.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \ - $(tiff_palette_SOURCES) $(tiff_rgb_SOURCES) -DIST_SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \ - $(tiff_palette_SOURCES) $(tiff_rgb_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = xtiff -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = \ - CMakeLists.txt \ - README - -tiff_bi_SOURCES = tiff-bi.c -tiff_bi_LDADD = $(LIBTIFF) -tiff_grayscale_SOURCES = tiff-grayscale.c -tiff_grayscale_LDADD = $(LIBTIFF) -tiff_palette_SOURCES = tiff-palette.c -tiff_palette_LDADD = $(LIBTIFF) -tiff_rgb_SOURCES = tiff-rgb.c -tiff_rgb_LDADD = $(LIBTIFF) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/dbs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/dbs/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -tiff-bi$(EXEEXT): $(tiff_bi_OBJECTS) $(tiff_bi_DEPENDENCIES) $(EXTRA_tiff_bi_DEPENDENCIES) - @rm -f tiff-bi$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff_bi_OBJECTS) $(tiff_bi_LDADD) $(LIBS) - -tiff-grayscale$(EXEEXT): $(tiff_grayscale_OBJECTS) $(tiff_grayscale_DEPENDENCIES) $(EXTRA_tiff_grayscale_DEPENDENCIES) - @rm -f tiff-grayscale$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff_grayscale_OBJECTS) $(tiff_grayscale_LDADD) $(LIBS) - -tiff-palette$(EXEEXT): $(tiff_palette_OBJECTS) $(tiff_palette_DEPENDENCIES) $(EXTRA_tiff_palette_DEPENDENCIES) - @rm -f tiff-palette$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff_palette_OBJECTS) $(tiff_palette_LDADD) $(LIBS) - -tiff-rgb$(EXEEXT): $(tiff_rgb_OBJECTS) $(tiff_rgb_DEPENDENCIES) $(EXTRA_tiff_rgb_DEPENDENCIES) - @rm -f tiff-rgb$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff_rgb_OBJECTS) $(tiff_rgb_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-bi.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-grayscale.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-palette.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-rgb.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-recursive - -rm -f ./$(DEPDIR)/tiff-bi.Po - -rm -f ./$(DEPDIR)/tiff-grayscale.Po - -rm -f ./$(DEPDIR)/tiff-palette.Po - -rm -f ./$(DEPDIR)/tiff-rgb.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f ./$(DEPDIR)/tiff-bi.Po - -rm -f ./$(DEPDIR)/tiff-grayscale.Po - -rm -f ./$(DEPDIR)/tiff-palette.Po - -rm -f ./$(DEPDIR)/tiff-rgb.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--depfiles check check-am clean clean-generic clean-libtool \ - clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/dbs/README b/third_party/libtiff/contrib/dbs/README deleted file mode 100644 index e05d0a9..0000000 --- a/third_party/libtiff/contrib/dbs/README +++ /dev/null @@ -1,7 +0,0 @@ -Wed May 9 09:11:35 PDT 1990 - -This directory contains programs from Dan Sears -(dbs@decwrl.dec.com). Contact him directly if -you have questions/problems. - - Sam diff --git a/third_party/libtiff/contrib/dbs/tiff-bi.c b/third_party/libtiff/contrib/dbs/tiff-bi.c deleted file mode 100644 index 7de7563..0000000 --- a/third_party/libtiff/contrib/dbs/tiff-bi.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * tiff-bi.c -- create a Class B (bilevel) TIFF file - * - * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include -#include - -#include "tiffio.h" - -#define WIDTH 512 -#define HEIGHT WIDTH - -int main(int argc, char **argv) -{ - int i; - unsigned char *scan_line; - TIFF *tif; - - if (argc != 2) - { - fprintf(stderr, "Usage: %s tiff-image\n", argv[0]); - return 0; - } - - if ((tif = TIFFOpen(argv[1], "w")) == NULL) - { - fprintf(stderr, "can't open %s as a TIFF file\n", argv[1]); - return 0; - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 1); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE); - - scan_line = (unsigned char *)malloc(WIDTH / 8); - - for (i = 0; i < (WIDTH / 8) / 2; i++) - scan_line[i] = 0; - - for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++) - scan_line[i] = 255; - - for (i = 0; i < HEIGHT / 2; i++) - TIFFWriteScanline(tif, scan_line, i, 0); - - for (i = 0; i < (WIDTH / 8) / 2; i++) - scan_line[i] = 255; - - for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++) - scan_line[i] = 0; - - for (i = HEIGHT / 2; i < HEIGHT; i++) - TIFFWriteScanline(tif, scan_line, i, 0); - - free(scan_line); - TIFFClose(tif); - return 0; -} diff --git a/third_party/libtiff/contrib/dbs/tiff-grayscale.c b/third_party/libtiff/contrib/dbs/tiff-grayscale.c deleted file mode 100644 index c3dc48f..0000000 --- a/third_party/libtiff/contrib/dbs/tiff-grayscale.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * tiff-grayscale.c -- create a Class G (grayscale) TIFF file - * with a gray response curve in linear optical density - * - * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include -#include -#include -#include - -#include "tiffio.h" - -#define WIDTH 512 -#define HEIGHT WIDTH - -char *programName; -void Usage(); - -int main(int argc, char **argv) -{ - int bits_per_pixel = 8, cmsize, i, j, k, gray_index, chunk_size = 32, - nchunks = 16; - unsigned char *scan_line; - uint16_t *gray; - float refblackwhite[2 * 1]; - TIFF *tif; - - programName = argv[0]; - - if (argc != 4) - Usage(); - - if (!strcmp(argv[1], "-depth")) - bits_per_pixel = atoi(argv[2]); - else - Usage(); - - switch (bits_per_pixel) - { - case 8: - nchunks = 16; - chunk_size = 32; - break; - case 4: - nchunks = 4; - chunk_size = 128; - break; - case 2: - nchunks = 2; - chunk_size = 256; - break; - default: - Usage(); - } - - cmsize = nchunks * nchunks; - gray = (uint16_t *)malloc(cmsize * sizeof(uint16_t)); - - gray[0] = 3000; - for (i = 1; i < cmsize; i++) - gray[i] = (uint16_t)(-log10((double)i / (cmsize - 1)) * 1000); - - refblackwhite[0] = 0.0; - refblackwhite[1] = (float)((1L << bits_per_pixel) - 1); - - if ((tif = TIFFOpen(argv[3], "w")) == NULL) - { - fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]); - free(gray); - return 0; - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite); - TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray); - TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE); - - scan_line = (unsigned char *)malloc(WIDTH / (8 / bits_per_pixel)); - - for (i = 0; i < HEIGHT; i++) - { - for (j = 0, k = 0; j < WIDTH;) - { - gray_index = (j / chunk_size) + ((i / chunk_size) * nchunks); - - switch (bits_per_pixel) - { - case 8: - scan_line[k++] = gray_index; - j++; - break; - case 4: - scan_line[k++] = (gray_index << 4) + gray_index; - j += 2; - break; - case 2: - scan_line[k++] = (gray_index << 6) + (gray_index << 4) + - (gray_index << 2) + gray_index; - j += 4; - break; - } - } - TIFFWriteScanline(tif, scan_line, i, 0); - } - - free(scan_line); - TIFFClose(tif); - return 0; -} - -void Usage() -{ - fprintf(stderr, "Usage: %s -depth (8 | 4 | 2) tiff-image\n", programName); - exit(0); -} diff --git a/third_party/libtiff/contrib/dbs/tiff-palette.c b/third_party/libtiff/contrib/dbs/tiff-palette.c deleted file mode 100644 index 8bce71b..0000000 --- a/third_party/libtiff/contrib/dbs/tiff-palette.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - * tiff-palette.c -- create a Class P (palette) TIFF file - * - * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include -#include -#include - -#include "tiffio.h" - -#define WIDTH 512 -#define HEIGHT WIDTH -#define SCALE(x) ((x)*257L) - -char *programName; -void Usage(); - -int main(int argc, char **argv) -{ - int bits_per_pixel = 8, cmsize, i, j, k, cmap_index, chunk_size = 32, - nchunks = 16; - unsigned char *scan_line; - uint16_t *red, *green, *blue; - TIFF *tif; - - programName = argv[0]; - - if (argc != 4) - Usage(); - - if (!strcmp(argv[1], "-depth")) - bits_per_pixel = atoi(argv[2]); - else - Usage(); - - switch (bits_per_pixel) - { - case 8: - nchunks = 16; - chunk_size = 32; - break; - case 4: - nchunks = 4; - chunk_size = 128; - break; - case 2: - nchunks = 2; - chunk_size = 256; - break; - case 1: - nchunks = 2; - chunk_size = 256; - break; - default: - Usage(); - } - - if (bits_per_pixel != 1) - { - cmsize = nchunks * nchunks; - } - else - { - cmsize = 2; - } - red = (uint16_t *)malloc(cmsize * sizeof(uint16_t)); - green = (uint16_t *)malloc(cmsize * sizeof(uint16_t)); - blue = (uint16_t *)malloc(cmsize * sizeof(uint16_t)); - - switch (bits_per_pixel) - { - case 8: - for (i = 0; i < cmsize; i++) - { - if (i < 32) - red[i] = 0; - else if (i < 64) - red[i] = SCALE(36); - else if (i < 96) - red[i] = SCALE(73); - else if (i < 128) - red[i] = SCALE(109); - else if (i < 160) - red[i] = SCALE(146); - else if (i < 192) - red[i] = SCALE(182); - else if (i < 224) - red[i] = SCALE(219); - else if (i < 256) - red[i] = SCALE(255); - - if ((i % 32) < 4) - green[i] = 0; - else if (i < 8) - green[i] = SCALE(36); - else if ((i % 32) < 12) - green[i] = SCALE(73); - else if ((i % 32) < 16) - green[i] = SCALE(109); - else if ((i % 32) < 20) - green[i] = SCALE(146); - else if ((i % 32) < 24) - green[i] = SCALE(182); - else if ((i % 32) < 28) - green[i] = SCALE(219); - else if ((i % 32) < 32) - green[i] = SCALE(255); - - if ((i % 4) == 0) - blue[i] = SCALE(0); - else if ((i % 4) == 1) - blue[i] = SCALE(85); - else if ((i % 4) == 2) - blue[i] = SCALE(170); - else if ((i % 4) == 3) - blue[i] = SCALE(255); - } - break; - case 4: - red[0] = SCALE(255); - green[0] = 0; - blue[0] = 0; - - red[1] = 0; - green[1] = SCALE(255); - blue[1] = 0; - - red[2] = 0; - green[2] = 0; - blue[2] = SCALE(255); - - red[3] = SCALE(255); - green[3] = SCALE(255); - blue[3] = SCALE(255); - - red[4] = 0; - green[4] = SCALE(255); - blue[4] = SCALE(255); - - red[5] = SCALE(255); - green[5] = 0; - blue[5] = SCALE(255); - - red[6] = SCALE(255); - green[6] = SCALE(255); - blue[6] = 0; - - red[7] = 0; - green[7] = 0; - blue[7] = 0; - - red[8] = SCALE(176); - green[8] = SCALE(224); - blue[8] = SCALE(230); - red[9] = SCALE(100); - green[9] = SCALE(149); - blue[9] = SCALE(237); - red[10] = SCALE(46); - green[10] = SCALE(139); - blue[10] = SCALE(87); - red[11] = SCALE(160); - green[11] = SCALE(82); - blue[11] = SCALE(45); - red[12] = SCALE(238); - green[12] = SCALE(130); - blue[12] = SCALE(238); - red[13] = SCALE(176); - green[13] = SCALE(48); - blue[13] = SCALE(96); - red[14] = SCALE(50); - green[14] = SCALE(205); - blue[14] = SCALE(50); - red[15] = SCALE(240); - green[15] = SCALE(152); - blue[15] = SCALE(35); - break; - case 2: - red[0] = SCALE(255); - green[0] = 0; - blue[0] = 0; - - red[1] = 0; - green[1] = SCALE(255); - blue[1] = 0; - - red[2] = 0; - green[2] = 0; - blue[2] = SCALE(255); - red[3] = SCALE(255); - green[3] = SCALE(255); - blue[3] = SCALE(255); - break; - case 1: - red[0] = 0; - green[0] = 0; - blue[0] = 0; - - red[1] = SCALE(255); - green[1] = SCALE(255); - blue[1] = SCALE(255); - break; - } - - if ((tif = TIFFOpen(argv[3], "w")) == NULL) - { - fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]); - free(red); - free(green); - free(blue); - return 0; - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE); - TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue); - - scan_line = (unsigned char *)malloc(WIDTH / (8 / bits_per_pixel)); - - for (i = 0; i < HEIGHT; i++) - { - for (j = 0, k = 0; j < WIDTH;) - { - cmap_index = (j / chunk_size) + ((i / chunk_size) * nchunks); - - switch (bits_per_pixel) - { - case 8: - scan_line[k++] = cmap_index; - j++; - break; - case 4: - scan_line[k++] = (cmap_index << 4) + cmap_index; - j += 2; - break; - case 2: - scan_line[k++] = (cmap_index << 6) + (cmap_index << 4) + - (cmap_index << 2) + cmap_index; - j += 4; - break; - case 1: - scan_line[k++] = - ((j / chunk_size) == (i / chunk_size)) ? 0x00 : 0xff; - j += 8; - break; - } - } - TIFFWriteScanline(tif, scan_line, i, 0); - } - - free(scan_line); - TIFFClose(tif); - return 0; -} - -void Usage() -{ - fprintf(stderr, "Usage: %s -depth (8 | 4 | 2 | 1) tiff-image\n", - programName); - exit(0); -} diff --git a/third_party/libtiff/contrib/dbs/tiff-rgb.c b/third_party/libtiff/contrib/dbs/tiff-rgb.c deleted file mode 100644 index a32457f..0000000 --- a/third_party/libtiff/contrib/dbs/tiff-rgb.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * tiff-rgb.c -- create a 24-bit Class R (rgb) TIFF file - * - * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include -#include -#include -#include - -#include "tiffio.h" - -#define ROUND(x) (uint16_t)((x) + 0.5) -#define CMSIZE 256 -#define WIDTH 525 -#define HEIGHT 512 -#define TIFF_GAMMA 2.2 - -void Usage(); -char *programName; - -int main(int argc, char **argv) -{ - char *input_file = NULL; - double image_gamma = TIFF_GAMMA; - int i, j; - TIFF *tif; - unsigned char *scan_line; - uint16_t red[CMSIZE], green[CMSIZE], blue[CMSIZE]; - float refblackwhite[2 * 3]; - - programName = argv[0]; - - switch (argc) - { - case 2: - image_gamma = TIFF_GAMMA; - input_file = argv[1]; - break; - case 4: - if (!strcmp(argv[1], "-gamma")) - { - image_gamma = atof(argv[2]); - input_file = argv[3]; - } - else - Usage(); - break; - default: - Usage(); - } - - for (i = 0; i < CMSIZE; i++) - { - if (i == 0) - red[i] = green[i] = blue[i] = 0; - else - { - red[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0)); - green[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0)); - blue[i] = ROUND((pow(i / 255.0, 1.0 / image_gamma) * 65535.0)); - } - } - refblackwhite[0] = 0.0; - refblackwhite[1] = 255.0; - refblackwhite[2] = 0.0; - refblackwhite[3] = 255.0; - refblackwhite[4] = 0.0; - refblackwhite[5] = 255.0; - - if ((tif = TIFFOpen(input_file, "w")) == NULL) - { - fprintf(stderr, "can't open %s as a TIFF file\n", input_file); - exit(0); - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE); -#ifdef notdef - TIFFSetField(tif, TIFFTAG_WHITEPOINT, whitex, whitey); - TIFFSetField(tif, TIFFTAG_PRIMARYCHROMATICITIES, primaries); -#endif - TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite); - TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, red, green, blue); - - scan_line = (unsigned char *)malloc(WIDTH * 3); - - for (i = 0; i < 255; i++) - { - for (j = 0; j < 75; j++) - { - scan_line[j * 3] = 255; - scan_line[(j * 3) + 1] = 255 - i; - scan_line[(j * 3) + 2] = 255 - i; - } - for (j = 75; j < 150; j++) - { - scan_line[j * 3] = 255 - i; - scan_line[(j * 3) + 1] = 255; - scan_line[(j * 3) + 2] = 255 - i; - } - for (j = 150; j < 225; j++) - { - scan_line[j * 3] = 255 - i; - scan_line[(j * 3) + 1] = 255 - i; - scan_line[(j * 3) + 2] = 255; - } - for (j = 225; j < 300; j++) - { - scan_line[j * 3] = (i - 1) / 2; - scan_line[(j * 3) + 1] = (i - 1) / 2; - scan_line[(j * 3) + 2] = (i - 1) / 2; - } - for (j = 300; j < 375; j++) - { - scan_line[j * 3] = 255 - i; - scan_line[(j * 3) + 1] = 255; - scan_line[(j * 3) + 2] = 255; - } - for (j = 375; j < 450; j++) - { - scan_line[j * 3] = 255; - scan_line[(j * 3) + 1] = 255 - i; - scan_line[(j * 3) + 2] = 255; - } - for (j = 450; j < 525; j++) - { - scan_line[j * 3] = 255; - scan_line[(j * 3) + 1] = 255; - scan_line[(j * 3) + 2] = 255 - i; - } - TIFFWriteScanline(tif, scan_line, i, 0); - } - for (i = 255; i < 512; i++) - { - for (j = 0; j < 75; j++) - { - scan_line[j * 3] = i; - scan_line[(j * 3) + 1] = 0; - scan_line[(j * 3) + 2] = 0; - } - for (j = 75; j < 150; j++) - { - scan_line[j * 3] = 0; - scan_line[(j * 3) + 1] = i; - scan_line[(j * 3) + 2] = 0; - } - for (j = 150; j < 225; j++) - { - scan_line[j * 3] = 0; - scan_line[(j * 3) + 1] = 0; - scan_line[(j * 3) + 2] = i; - } - for (j = 225; j < 300; j++) - { - scan_line[j * 3] = (i - 1) / 2; - scan_line[(j * 3) + 1] = (i - 1) / 2; - scan_line[(j * 3) + 2] = (i - 1) / 2; - } - for (j = 300; j < 375; j++) - { - scan_line[j * 3] = 0; - scan_line[(j * 3) + 1] = i; - scan_line[(j * 3) + 2] = i; - } - for (j = 375; j < 450; j++) - { - scan_line[j * 3] = i; - scan_line[(j * 3) + 1] = 0; - scan_line[(j * 3) + 2] = i; - } - for (j = 450; j < 525; j++) - { - scan_line[j * 3] = i; - scan_line[(j * 3) + 1] = i; - scan_line[(j * 3) + 2] = 0; - } - TIFFWriteScanline(tif, scan_line, i, 0); - } - - free(scan_line); - TIFFClose(tif); - exit(0); -} - -void Usage() -{ - fprintf(stderr, "Usage: %s -gamma gamma tiff-image\n", programName); - exit(0); -} diff --git a/third_party/libtiff/contrib/dbs/xtiff/Makefile.am b/third_party/libtiff/contrib/dbs/xtiff/Makefile.am deleted file mode 100644 index cd81047..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -#LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -EXTRA_DIST = \ - README \ - patchlevel.h \ - xtiff.c \ - xtifficon.h - -#noinst_PROGRAMS = - -#if HAVE_XAW -#noinst_PROGRAMS += xtiff -#endif - -#xtiff_SOURCES = patchlevel.h xtiff.c xtifficon.h -#xtiff_CFLAGS = $(CFLAGS) $(XAW_CFLAGS) $(AM_CFLAGS) -#xtiff_LDADD = $(LIBTIFF) $(X_LIBS) $(XAW_LIBS) - -#INCLUDES = -I$(top_srcdir)/libtiff - diff --git a/third_party/libtiff/contrib/dbs/xtiff/Makefile.in b/third_party/libtiff/contrib/dbs/xtiff/Makefile.in deleted file mode 100644 index 79db2a1..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/Makefile.in +++ /dev/null @@ -1,527 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -#LIBTIFF = $(top_builddir)/libtiff/libtiff.la -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/dbs/xtiff -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - patchlevel.h \ - xtiff.c \ - xtifficon.h - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/dbs/xtiff/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/dbs/xtiff/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -#noinst_PROGRAMS = - -#if HAVE_XAW -#noinst_PROGRAMS += xtiff -#endif - -#xtiff_SOURCES = patchlevel.h xtiff.c xtifficon.h -#xtiff_CFLAGS = $(CFLAGS) $(XAW_CFLAGS) $(AM_CFLAGS) -#xtiff_LDADD = $(LIBTIFF) $(X_LIBS) $(XAW_LIBS) - -#INCLUDES = -I$(top_srcdir)/libtiff - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/dbs/xtiff/README b/third_party/libtiff/contrib/dbs/xtiff/README deleted file mode 100644 index fa15147..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/README +++ /dev/null @@ -1,6 +0,0 @@ -xtiff 2.0 - -xtiff is a tool for viewing a TIFF file in an X window. It was written to -handle as many different kinds of TIFF files as possible while remaining -simple, portable and efficient. xtiff requires X11 R4, the Athena Widgets -and Sam Leffler's libtiff package (which can be found on ucbvax.berkeley.edu). diff --git a/third_party/libtiff/contrib/dbs/xtiff/patchlevel.h b/third_party/libtiff/contrib/dbs/xtiff/patchlevel.h deleted file mode 100644 index 0736133..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/patchlevel.h +++ /dev/null @@ -1,2 +0,0 @@ -#define PATCHLEVEL 0 - diff --git a/third_party/libtiff/contrib/dbs/xtiff/xtiff.c b/third_party/libtiff/contrib/dbs/xtiff/xtiff.c deleted file mode 100644 index bd549a0..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/xtiff.c +++ /dev/null @@ -1,1345 +0,0 @@ -/* - * xtiff - view a TIFF file in an X window - * - * Dan Sears - * Chris Sears - * - * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Revision 1.0 90/05/07 - * Initial release. - * Revision 2.0 90/12/20 - * Converted to use the Athena Widgets and the Xt Intrinsics. - * - * Notes: - * - * According to the TIFF 5.0 Specification, it is possible to have - * both a TIFFTAG_COLORMAP and a TIFFTAG_COLORRESPONSECURVE. This - * doesn't make sense since a TIFFTAG_COLORMAP is 16 bits wide and - * a TIFFTAG_COLORRESPONSECURVE is tfBitsPerSample bits wide for each - * channel. This is probably a bug in the specification. - * In this case, TIFFTAG_COLORRESPONSECURVE is ignored. - * This might make sense if TIFFTAG_COLORMAP was 8 bits wide. - * - * TIFFTAG_COLORMAP is often incorrectly written as ranging from - * 0 to 255 rather than from 0 to 65535. CheckAndCorrectColormap() - * takes care of this. - * - * Only ORIENTATION_TOPLEFT is supported correctly. This is the - * default TIFF and X orientation. Other orientations will be - * displayed incorrectly. - * - * There is no support for or use of 3/3/2 DirectColor visuals. - * TIFFTAG_MINSAMPLEVALUE and TIFFTAG_MAXSAMPLEVALUE are not supported. - * - * Only TIFFTAG_BITSPERSAMPLE values that are 1, 2, 4 or 8 are supported. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define XK_MISCELLANY -#include "xtifficon.h" -#include - -#define TIFF_GAMMA "2.2" /* default gamma from the TIFF 5.0 spec */ -#define ROUND(x) (uint16_t)((x) + 0.5) -#define SCALE(x, s) (((x)*65535L) / (s)) -#define MCHECK(m) \ - if (!m) \ - { \ - fprintf(stderr, "malloc failed\n"); \ - exit(0); \ - } -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define VIEWPORT_WIDTH 700 -#define VIEWPORT_HEIGHT 500 -#define KEY_TRANSLATE 20 - -#ifdef __STDC__ -#define PP(args) args -#else -#define PP(args) () -#endif - -int main PP((int argc, char **argv)); -void OpenTIFFFile PP((void)); -void GetTIFFHeader PP((void)); -void SetNameLabel PP((void)); -void CheckAndCorrectColormap PP((void)); -void SimpleGammaCorrection PP((void)); -void GetVisual PP((void)); -Boolean SearchVisualList PP((int image_depth, int visual_class, - Visual **visual)); -void GetTIFFImage PP((void)); -void CreateXImage PP((void)); -XtCallbackProc SelectProc PP((Widget w, caddr_t unused_1, caddr_t unused_2)); -void QuitProc PP((void)); -void NextProc PP((void)); -void PreviousProc PP((void)); -void PageProc PP((int direction)); -void EventProc PP((Widget widget, caddr_t unused, XEvent *event)); -void ResizeProc PP((void)); -int XTiffErrorHandler PP((Display * display, XErrorEvent *error_event)); -void Usage PP((void)); - -int xtVersion = XtSpecificationRelease; /* xtiff depends on R4 or higher */ - -/* - * Xt data structures - */ -Widget shellWidget, formWidget, listWidget, labelWidget, imageWidget; - -enum -{ - ButtonQuit = 0, - ButtonPreviousPage = 1, - ButtonNextPage = 2 -}; - -String buttonStrings[] = {"Quit", "Previous", "Next"}; - -static XrmOptionDescRec shellOptions[] = { - {"-help", "*help", XrmoptionNoArg, (caddr_t) "True"}, - {"-gamma", "*gamma", XrmoptionSepArg, NULL}, - {"-usePixmap", "*usePixmap", XrmoptionSepArg, NULL}, - {"-viewportWidth", "*viewportWidth", XrmoptionSepArg, NULL}, - {"-viewportHeight", "*viewportHeight", XrmoptionSepArg, NULL}, - {"-translate", "*translate", XrmoptionSepArg, NULL}, - {"-verbose", "*verbose", XrmoptionSepArg, NULL}}; - -typedef struct -{ - Boolean help; - float gamma; - Boolean usePixmap; - uint32_t viewportWidth; - uint32_t viewportHeight; - int translate; - Boolean verbose; -} AppData, *AppDataPtr; - -AppData appData; - -XtResource clientResources[] = { - {"help", XtCBoolean, XtRBoolean, sizeof(Boolean), - XtOffset(AppDataPtr, help), XtRImmediate, (XtPointer)False}, - {"gamma", "Gamma", XtRFloat, sizeof(float), XtOffset(AppDataPtr, gamma), - XtRString, (XtPointer)TIFF_GAMMA}, - {"usePixmap", "UsePixmap", XtRBoolean, sizeof(Boolean), - XtOffset(AppDataPtr, usePixmap), XtRImmediate, (XtPointer)True}, - {"viewportWidth", "ViewportWidth", XtRInt, sizeof(int), - XtOffset(AppDataPtr, viewportWidth), XtRImmediate, - (XtPointer)VIEWPORT_WIDTH}, - {"viewportHeight", "ViewportHeight", XtRInt, sizeof(int), - XtOffset(AppDataPtr, viewportHeight), XtRImmediate, - (XtPointer)VIEWPORT_HEIGHT}, - {"translate", "Translate", XtRInt, sizeof(int), - XtOffset(AppDataPtr, translate), XtRImmediate, (XtPointer)KEY_TRANSLATE}, - {"verbose", "Verbose", XtRBoolean, sizeof(Boolean), - XtOffset(AppDataPtr, verbose), XtRImmediate, (XtPointer)True}}; - -Arg formArgs[] = {{XtNresizable, True}}; - -Arg listArgs[] = { - {XtNresizable, False}, {XtNborderWidth, 0}, - {XtNdefaultColumns, 3}, {XtNforceColumns, True}, - {XtNlist, (int)buttonStrings}, {XtNnumberStrings, XtNumber(buttonStrings)}, - {XtNtop, XtChainTop}, {XtNleft, XtChainLeft}, - {XtNbottom, XtChainTop}, {XtNright, XtChainLeft}}; - -Arg labelArgs[] = {{XtNresizable, False}, {XtNwidth, 200}, - {XtNborderWidth, 0}, {XtNjustify, XtJustifyLeft}, - {XtNtop, XtChainTop}, {XtNleft, XtChainLeft}, - {XtNbottom, XtChainTop}, {XtNright, XtChainLeft}}; - -Arg imageArgs[] = {{XtNresizable, True}, {XtNborderWidth, 0}, - {XtNtop, XtChainTop}, {XtNleft, XtChainLeft}, - {XtNbottom, XtChainTop}, {XtNright, XtChainLeft}}; - -XtActionsRec actionsTable[] = {{"quit", QuitProc}, - {"next", NextProc}, - {"previous", PreviousProc}, - {"notifyresize", ResizeProc}}; - -char translationsTable[] = "q: quit() \n \ - Q: quit() \n \ - WM_PROTOCOLS: quit()\n \ - p: previous() \n \ - P: previous() \n \ - n: next() \n \ - N: next() \n \ - : notifyresize()"; - -/* - * X data structures - */ -Colormap xColormap; -Display *xDisplay; -Pixmap xImagePixmap; -Visual *xVisual; -XImage *xImage; -GC xWinGc; -int xImageDepth, xScreen, xRedMask, xGreenMask, xBlueMask, - xOffset = 0, yOffset = 0, grabX = -1, grabY = -1; -unsigned char basePixel = 0; - -/* - * TIFF data structures - */ -TIFF *tfFile = NULL; -uint32_t tfImageWidth, tfImageHeight; -uint16_t tfBitsPerSample, tfSamplesPerPixel, tfPlanarConfiguration, - tfPhotometricInterpretation, tfGrayResponseUnit, tfImageDepth, - tfBytesPerRow; -int tfDirectory = 0, tfMultiPage = False; -double tfUnitMap, - tfGrayResponseUnitMap[] = {-1, -10, -100, -1000, -10000, -100000}; - -/* - * display data structures - */ -double *dRed, *dGreen, *dBlue; - -/* - * shared data structures - */ -uint16_t *redMap = NULL, *greenMap = NULL, *blueMap = NULL, *grayMap = NULL, - colormapSize; -char *imageMemory; -char *fileName; - -int main(int argc, char **argv) -{ - XSetWindowAttributes window_attributes; - Widget widget_list[3]; - Arg args[5]; - - setbuf(stdout, NULL); - setbuf(stderr, NULL); - - shellWidget = XtInitialize(argv[0], "XTiff", shellOptions, - XtNumber(shellOptions), &argc, argv); - - XSetErrorHandler(XTiffErrorHandler); - - XtGetApplicationResources( - shellWidget, &appData, (XtResourceList)clientResources, - (Cardinal)XtNumber(clientResources), (ArgList)NULL, (Cardinal)0); - - if ((argc <= 1) || (argc > 2) || appData.help) - Usage(); - - if (appData.verbose == False) - { - TIFFSetErrorHandler(0); - TIFFSetWarningHandler(0); - } - - fileName = argv[1]; - - xDisplay = XtDisplay(shellWidget); - xScreen = DefaultScreen(xDisplay); - - OpenTIFFFile(); - GetTIFFHeader(); - SimpleGammaCorrection(); - GetVisual(); - GetTIFFImage(); - - /* - * Send visual, colormap, depth and iconPixmap to shellWidget. - * Sending the visual to the shell is only possible with the advent of R4. - */ - XtSetArg(args[0], XtNvisual, xVisual); - XtSetArg(args[1], XtNcolormap, xColormap); - XtSetArg(args[2], XtNdepth, - xImageDepth == 1 ? DefaultDepth(xDisplay, xScreen) : xImageDepth); - XtSetArg(args[3], XtNiconPixmap, - XCreateBitmapFromData(xDisplay, RootWindow(xDisplay, xScreen), - xtifficon_bits, xtifficon_width, - xtifficon_height)); - XtSetArg(args[4], XtNallowShellResize, True); - XtSetValues(shellWidget, args, 5); - - /* - * widget instance hierarchy - */ - formWidget = XtCreateManagedWidget("form", formWidgetClass, shellWidget, - formArgs, XtNumber(formArgs)); - - widget_list[0] = listWidget = XtCreateWidget( - "list", listWidgetClass, formWidget, listArgs, XtNumber(listArgs)); - - widget_list[1] = labelWidget = XtCreateWidget( - "label", labelWidgetClass, formWidget, labelArgs, XtNumber(labelArgs)); - - widget_list[2] = imageWidget = XtCreateWidget( - "image", widgetClass, formWidget, imageArgs, XtNumber(imageArgs)); - - XtManageChildren(widget_list, XtNumber(widget_list)); - - /* - * initial widget sizes - for small images let xtiff size itself - */ - if (tfImageWidth >= appData.viewportWidth) - { - XtSetArg(args[0], XtNwidth, appData.viewportWidth); - XtSetValues(shellWidget, args, 1); - } - if (tfImageHeight >= appData.viewportHeight) - { - XtSetArg(args[0], XtNheight, appData.viewportHeight); - XtSetValues(shellWidget, args, 1); - } - - XtSetArg(args[0], XtNwidth, tfImageWidth); - XtSetArg(args[1], XtNheight, tfImageHeight); - XtSetValues(imageWidget, args, 2); - - /* - * formWidget uses these constraints but they are stored in the children. - */ - XtSetArg(args[0], XtNfromVert, listWidget); - XtSetValues(imageWidget, args, 1); - XtSetArg(args[0], XtNfromHoriz, listWidget); - XtSetValues(labelWidget, args, 1); - - SetNameLabel(); - - XtAddCallback(listWidget, XtNcallback, (XtCallbackProc)SelectProc, - (XtPointer)NULL); - - XtAddActions(actionsTable, XtNumber(actionsTable)); - XtSetArg(args[0], XtNtranslations, - XtParseTranslationTable(translationsTable)); - XtSetValues(formWidget, &args[0], 1); - XtSetValues(imageWidget, &args[0], 1); - - /* - * This is intended to be a little faster than going through - * the translation manager. - */ - XtAddEventHandler(imageWidget, - ExposureMask | ButtonPressMask | ButtonReleaseMask | - Button1MotionMask | KeyPressMask, - False, EventProc, NULL); - - XtRealizeWidget(shellWidget); - - window_attributes.cursor = XCreateFontCursor(xDisplay, XC_fleur); - XChangeWindowAttributes(xDisplay, XtWindow(imageWidget), CWCursor, - &window_attributes); - - CreateXImage(); - - XtMainLoop(); - - return 0; -} - -void OpenTIFFFile() -{ - if (tfFile != NULL) - TIFFClose(tfFile); - - if ((tfFile = TIFFOpen(fileName, "r")) == NULL) - { - fprintf(appData.verbose ? stderr : stdout, - "xtiff: can't open %s as a TIFF file\n", fileName); - exit(0); - } - - tfMultiPage = (TIFFLastDirectory(tfFile) ? False : True); -} - -void GetTIFFHeader() -{ - register int i; - - if (!TIFFSetDirectory(tfFile, tfDirectory)) - { - fprintf(stderr, "xtiff: can't seek to directory %d in %s\n", - tfDirectory, fileName); - exit(0); - } - - TIFFGetField(tfFile, TIFFTAG_IMAGEWIDTH, &tfImageWidth); - TIFFGetField(tfFile, TIFFTAG_IMAGELENGTH, &tfImageHeight); - - /* - * If the following tags aren't present then use the TIFF defaults. - */ - TIFFGetFieldDefaulted(tfFile, TIFFTAG_BITSPERSAMPLE, &tfBitsPerSample); - TIFFGetFieldDefaulted(tfFile, TIFFTAG_SAMPLESPERPIXEL, &tfSamplesPerPixel); - TIFFGetFieldDefaulted(tfFile, TIFFTAG_PLANARCONFIG, &tfPlanarConfiguration); - TIFFGetFieldDefaulted(tfFile, TIFFTAG_GRAYRESPONSEUNIT, - &tfGrayResponseUnit); - - tfUnitMap = tfGrayResponseUnitMap[tfGrayResponseUnit]; - colormapSize = 1 << tfBitsPerSample; - tfImageDepth = tfBitsPerSample * tfSamplesPerPixel; - - dRed = (double *)malloc(colormapSize * sizeof(double)); - dGreen = (double *)malloc(colormapSize * sizeof(double)); - dBlue = (double *)malloc(colormapSize * sizeof(double)); - MCHECK(dRed); - MCHECK(dGreen); - MCHECK(dBlue); - - /* - * If TIFFTAG_PHOTOMETRIC is not present then assign a reasonable default. - * The TIFF 5.0 specification doesn't give a default. - */ - if (!TIFFGetField(tfFile, TIFFTAG_PHOTOMETRIC, - &tfPhotometricInterpretation)) - { - if (tfSamplesPerPixel != 1) - tfPhotometricInterpretation = PHOTOMETRIC_RGB; - else if (tfBitsPerSample == 1) - tfPhotometricInterpretation = PHOTOMETRIC_MINISBLACK; - else if (TIFFGetField(tfFile, TIFFTAG_COLORMAP, &redMap, &greenMap, - &blueMap)) - { - tfPhotometricInterpretation = PHOTOMETRIC_PALETTE; - redMap = greenMap = blueMap = NULL; - } - else - tfPhotometricInterpretation = PHOTOMETRIC_MINISBLACK; - } - - /* - * Given TIFFTAG_PHOTOMETRIC extract or create the response curves. - */ - switch (tfPhotometricInterpretation) - { - case PHOTOMETRIC_RGB: - redMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - greenMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - blueMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - MCHECK(redMap); - MCHECK(greenMap); - MCHECK(blueMap); - for (i = 0; i < colormapSize; i++) - dRed[i] = dGreen[i] = dBlue[i] = - (double)SCALE(i, colormapSize - 1); - break; - case PHOTOMETRIC_PALETTE: - if (!TIFFGetField(tfFile, TIFFTAG_COLORMAP, &redMap, &greenMap, - &blueMap)) - { - redMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - greenMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - blueMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - MCHECK(redMap); - MCHECK(greenMap); - MCHECK(blueMap); - for (i = 0; i < colormapSize; i++) - dRed[i] = dGreen[i] = dBlue[i] = - (double)SCALE(i, colormapSize - 1); - } - else - { - CheckAndCorrectColormap(); - for (i = 0; i < colormapSize; i++) - { - dRed[i] = (double)redMap[i]; - dGreen[i] = (double)greenMap[i]; - dBlue[i] = (double)blueMap[i]; - } - } - break; - case PHOTOMETRIC_MINISWHITE: - redMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - greenMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - blueMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - MCHECK(redMap); - MCHECK(greenMap); - MCHECK(blueMap); - for (i = 0; i < colormapSize; i++) - dRed[i] = dGreen[i] = dBlue[i] = - (double)SCALE(colormapSize - 1 - i, colormapSize - 1); - break; - case PHOTOMETRIC_MINISBLACK: - redMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - greenMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - blueMap = (uint16_t *)malloc(colormapSize * sizeof(uint16_t)); - MCHECK(redMap); - MCHECK(greenMap); - MCHECK(blueMap); - for (i = 0; i < colormapSize; i++) - dRed[i] = dGreen[i] = dBlue[i] = - (double)SCALE(i, colormapSize - 1); - break; - default: - fprintf(stderr, - "xtiff: can't display photometric interpretation type %d\n", - tfPhotometricInterpretation); - exit(0); - } -} - -void SetNameLabel() -{ - char buffer[BUFSIZ]; - Arg args[1]; - - if (tfMultiPage) - snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory); - else - snprintf(buffer, sizeof(buffer), "%s", fileName); - XtSetArg(args[0], XtNlabel, buffer); - XtSetValues(labelWidget, args, 1); -} - -/* - * Many programs get TIFF colormaps wrong. They use 8-bit colormaps instead of - * 16-bit colormaps. This function is a heuristic to detect and correct this. - */ -void CheckAndCorrectColormap() -{ - register int i; - - for (i = 0; i < colormapSize; i++) - if ((redMap[i] > 255) || (greenMap[i] > 255) || (blueMap[i] > 255)) - return; - - for (i = 0; i < colormapSize; i++) - { - redMap[i] = SCALE(redMap[i], 255); - greenMap[i] = SCALE(greenMap[i], 255); - blueMap[i] = SCALE(blueMap[i], 255); - } - TIFFWarning(fileName, "Assuming 8-bit colormap"); -} - -void SimpleGammaCorrection() -{ - register int i; - register double i_gamma = 1.0 / appData.gamma; - - for (i = 0; i < colormapSize; i++) - { - if (((tfPhotometricInterpretation == PHOTOMETRIC_MINISWHITE) && - (i == colormapSize - 1)) || - ((tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK) && - (i == 0))) - redMap[i] = greenMap[i] = blueMap[i] = 0; - else - { - redMap[i] = ROUND((pow(dRed[i] / 65535.0, i_gamma) * 65535.0)); - greenMap[i] = ROUND((pow(dGreen[i] / 65535.0, i_gamma) * 65535.0)); - blueMap[i] = ROUND((pow(dBlue[i] / 65535.0, i_gamma) * 65535.0)); - } - } - - free(dRed); - free(dGreen); - free(dBlue); -} - -static char *classNames[] = {"StaticGray", "GrayScale", "StaticColor", - "PseudoColor", "TrueColor", "DirectColor"}; - -/* - * Current limitation: the visual is set initially by the first file. - * It cannot be changed. - */ -void GetVisual() -{ - XColor *colors = NULL; - unsigned long *pixels = NULL; - unsigned long i; - - switch (tfImageDepth) - { - /* - * X really wants a 32-bit image with the fourth channel unused, - * but the visual structure thinks it's 24-bit. bitmap_unit is 32. - */ - case 32: - case 24: - if (SearchVisualList(24, DirectColor, &xVisual) == False) - { - fprintf(stderr, - "xtiff: 24-bit DirectColor visual not available\n"); - exit(0); - } - - colors = (XColor *)malloc(3 * colormapSize * sizeof(XColor)); - MCHECK(colors); - - for (i = 0; i < colormapSize; i++) - { - colors[i].pixel = (i << 16) + (i << 8) + i; - colors[i].red = redMap[i]; - colors[i].green = greenMap[i]; - colors[i].blue = blueMap[i]; - colors[i].flags = DoRed | DoGreen | DoBlue; - } - - xColormap = XCreateColormap(xDisplay, RootWindow(xDisplay, xScreen), - xVisual, AllocAll); - XStoreColors(xDisplay, xColormap, colors, colormapSize); - break; - case 8: - case 4: - case 2: - /* - * We assume that systems with 24-bit visuals also have 8-bit - * visuals. We don't promote from 8-bit PseudoColor to 24/32 bit - * DirectColor. - */ - switch (tfPhotometricInterpretation) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (SearchVisualList((int)tfImageDepth, GrayScale, - &xVisual) == True) - break; - case PHOTOMETRIC_PALETTE: - if (SearchVisualList((int)tfImageDepth, PseudoColor, - &xVisual) == True) - break; - default: - fprintf(stderr, - "xtiff: Unsupported TIFF/X configuration\n"); - exit(0); - } - - colors = (XColor *)malloc(colormapSize * sizeof(XColor)); - MCHECK(colors); - - for (i = 0; i < colormapSize; i++) - { - colors[i].pixel = i; - colors[i].red = redMap[i]; - colors[i].green = greenMap[i]; - colors[i].blue = blueMap[i]; - colors[i].flags = DoRed | DoGreen | DoBlue; - } - - /* - * xtiff's colormap allocation is private. It does not attempt - * to detect whether any existing colormap entries are suitable - * for its use. This will cause colormap flashing. Furthermore, - * background and foreground are taken from the environment. - * For example, the foreground color may be red when the visual - * is GrayScale. If the colormap is completely populated, - * Xt will not be able to allocate fg and bg. - */ - if (tfImageDepth == 8) - xColormap = XCreateColormap( - xDisplay, RootWindow(xDisplay, xScreen), xVisual, AllocAll); - else - { - xColormap = - XCreateColormap(xDisplay, RootWindow(xDisplay, xScreen), - xVisual, AllocNone); - pixels = (unsigned long *)malloc(colormapSize * - sizeof(unsigned long)); - MCHECK(pixels); - (void)XAllocColorCells(xDisplay, xColormap, True, NULL, 0, - pixels, colormapSize); - basePixel = (unsigned char)pixels[0]; - free(pixels); - } - XStoreColors(xDisplay, xColormap, colors, colormapSize); - break; - case 1: - xImageDepth = 1; - xVisual = DefaultVisual(xDisplay, xScreen); - xColormap = DefaultColormap(xDisplay, xScreen); - break; - default: - fprintf(stderr, "xtiff: unsupported image depth %d\n", - tfImageDepth); - exit(0); - } - - if (appData.verbose == True) - fprintf(stderr, "%s: Using %d-bit %s visual.\n", fileName, xImageDepth, - classNames[xVisual->class]); - - if (colors != NULL) - free(colors); - if (grayMap != NULL) - free(grayMap); - if (redMap != NULL) - free(redMap); - if (greenMap != NULL) - free(greenMap); - if (blueMap != NULL) - free(blueMap); - - colors = NULL; - grayMap = redMap = greenMap = blueMap = NULL; -} - -/* - * Search for an appropriate visual. Promote where necessary. - * Check to make sure that ENOUGH colormap entries are writeable. - * basePixel was determined when XAllocColorCells() contiguously - * allocated enough entries. basePixel is used below in GetTIFFImage. - */ -Boolean SearchVisualList(image_depth, visual_class, visual) -int image_depth, visual_class; -Visual **visual; -{ - XVisualInfo template_visual, *visual_list, *vl; - int i, n_visuals; - - template_visual.screen = xScreen; - vl = visual_list = XGetVisualInfo(xDisplay, VisualScreenMask, - &template_visual, &n_visuals); - - if (n_visuals == 0) - { - fprintf(stderr, "xtiff: visual list not available\n"); - exit(0); - } - - for (i = 0; i < n_visuals; vl++, i++) - { - if ((vl->class == visual_class) && (vl->depth >= image_depth) && - (vl->visual->map_entries >= (1 << vl->depth))) - { - *visual = vl->visual; - xImageDepth = vl->depth; - xRedMask = vl->red_mask; - xGreenMask = vl->green_mask; - xBlueMask = vl->blue_mask; - XFree((char *)visual_list); - return True; - } - } - - XFree((char *)visual_list); - return False; -} - -void GetTIFFImage() -{ - int pixel_map[3], red_shift, green_shift, blue_shift; - char *scan_line, *output_p, *input_p; - uint32_t i, j; - uint16_t s; - - scan_line = (char *)malloc(tfBytesPerRow = TIFFScanlineSize(tfFile)); - MCHECK(scan_line); - - if ((tfImageDepth == 32) || (tfImageDepth == 24)) - { - output_p = imageMemory = - (char *)malloc(tfImageWidth * tfImageHeight * 4); - MCHECK(imageMemory); - - /* - * Handle different color masks for different frame buffers. - */ - if (ImageByteOrder(xDisplay) == LSBFirst) - { /* DECstation 5000 */ - red_shift = pixel_map[0] = - xRedMask == 0xFF000000 - ? 3 - : (xRedMask == 0xFF0000 ? 2 : (xRedMask == 0xFF00 ? 1 : 0)); - green_shift = pixel_map[1] = - xGreenMask == 0xFF000000 - ? 3 - : (xGreenMask == 0xFF0000 ? 2 - : (xGreenMask == 0xFF00 ? 1 : 0)); - blue_shift = pixel_map[2] = - xBlueMask == 0xFF000000 - ? 3 - : (xBlueMask == 0xFF0000 ? 2 - : (xBlueMask == 0xFF00 ? 1 : 0)); - } - else - { /* Ardent */ - red_shift = pixel_map[0] = - xRedMask == 0xFF000000 - ? 0 - : (xRedMask == 0xFF0000 ? 1 : (xRedMask == 0xFF00 ? 2 : 3)); - green_shift = pixel_map[0] = - xGreenMask == 0xFF000000 - ? 0 - : (xGreenMask == 0xFF0000 ? 1 - : (xGreenMask == 0xFF00 ? 2 : 3)); - blue_shift = pixel_map[0] = - xBlueMask == 0xFF000000 - ? 0 - : (xBlueMask == 0xFF0000 ? 1 - : (xBlueMask == 0xFF00 ? 2 : 3)); - } - - if (tfPlanarConfiguration == PLANARCONFIG_CONTIG) - { - for (i = 0; i < tfImageHeight; i++) - { - if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0) - break; - for (input_p = scan_line, j = 0; j < tfImageWidth; j++) - { - *(output_p + red_shift) = *input_p++; - *(output_p + green_shift) = *input_p++; - *(output_p + blue_shift) = *input_p++; - output_p += 4; - if (tfSamplesPerPixel == 4) /* skip the fourth channel */ - input_p++; - } - } - } - else - { - for (s = 0; s < tfSamplesPerPixel; s++) - { - if (s == 3) /* skip the fourth channel */ - continue; - for (i = 0; i < tfImageHeight; i++) - { - if (TIFFReadScanline(tfFile, scan_line, i, s) < 0) - break; - input_p = scan_line; - output_p = - imageMemory + (i * tfImageWidth * 4) + pixel_map[s]; - for (j = 0; j < tfImageWidth; j++, output_p += 4) - *output_p = *input_p++; - } - } - } - } - else - { - if (xImageDepth == tfImageDepth) - { - output_p = imageMemory = - (char *)malloc(tfBytesPerRow * tfImageHeight); - MCHECK(imageMemory); - - for (i = 0; i < tfImageHeight; i++, output_p += tfBytesPerRow) - if (TIFFReadScanline(tfFile, output_p, i, 0) < 0) - break; - } - else if ((xImageDepth == 8) && (tfImageDepth == 4)) - { - output_p = imageMemory = - (char *)malloc(tfBytesPerRow * 2 * tfImageHeight + 2); - MCHECK(imageMemory); - - /* - * If a scanline is of odd size the inner loop below will overshoot. - * This is handled very simply by recalculating the start point at - * each scanline and padding imageMemory a little at the end. - */ - for (i = 0; i < tfImageHeight; i++) - { - if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0) - break; - output_p = &imageMemory[i * tfImageWidth]; - input_p = scan_line; - for (j = 0; j < tfImageWidth; j += 2, input_p++) - { - *output_p++ = (*input_p >> 4) + basePixel; - *output_p++ = (*input_p & 0xf) + basePixel; - } - } - } - else if ((xImageDepth == 8) && (tfImageDepth == 2)) - { - output_p = imageMemory = - (char *)malloc(tfBytesPerRow * 4 * tfImageHeight + 4); - MCHECK(imageMemory); - - for (i = 0; i < tfImageHeight; i++) - { - if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0) - break; - output_p = &imageMemory[i * tfImageWidth]; - input_p = scan_line; - for (j = 0; j < tfImageWidth; j += 4, input_p++) - { - *output_p++ = (*input_p >> 6) + basePixel; - *output_p++ = ((*input_p >> 4) & 3) + basePixel; - *output_p++ = ((*input_p >> 2) & 3) + basePixel; - *output_p++ = (*input_p & 3) + basePixel; - } - } - } - else if ((xImageDepth == 4) && (tfImageDepth == 2)) - { - output_p = imageMemory = - (char *)malloc(tfBytesPerRow * 2 * tfImageHeight + 2); - MCHECK(imageMemory); - - for (i = 0; i < tfImageHeight; i++) - { - if (TIFFReadScanline(tfFile, scan_line, i, 0) < 0) - break; - output_p = &imageMemory[i * tfBytesPerRow * 2]; - input_p = scan_line; - for (j = 0; j < tfImageWidth; j += 4, input_p++) - { - *output_p++ = - (((*input_p >> 6) << 4) | ((*input_p >> 4) & 3)) + - basePixel; - *output_p++ = - ((((*input_p >> 2) & 3) << 4) | (*input_p & 3)) + - basePixel; - } - } - } - else - { - fprintf( - stderr, - "xtiff: can't handle %d-bit TIFF file on an %d-bit display\n", - tfImageDepth, xImageDepth); - exit(0); - } - } - - free(scan_line); -} - -void CreateXImage() -{ - XGCValues gc_values; - GC bitmap_gc; - - xOffset = yOffset = 0; - grabX = grabY = -1; - - xImage = XCreateImage(xDisplay, xVisual, xImageDepth, - xImageDepth == 1 ? XYBitmap : ZPixmap, /* offset */ 0, - (char *)imageMemory, tfImageWidth, tfImageHeight, - /* bitmap_pad */ 8, /* bytes_per_line */ 0); - - /* - * libtiff converts LSB data into MSB but doesn't change the FillOrder tag. - */ - if (xImageDepth == 1) - xImage->bitmap_bit_order = MSBFirst; - if (xImageDepth <= 8) - xImage->byte_order = MSBFirst; - - /* - * create an appropriate GC - */ - gc_values.function = GXcopy; - gc_values.plane_mask = AllPlanes; - if (tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK) - { - gc_values.foreground = XWhitePixel(xDisplay, xScreen); - gc_values.background = XBlackPixel(xDisplay, xScreen); - } - else - { - gc_values.foreground = XBlackPixel(xDisplay, xScreen); - gc_values.background = XWhitePixel(xDisplay, xScreen); - } - xWinGc = XCreateGC(xDisplay, XtWindow(shellWidget), - GCFunction | GCPlaneMask | GCForeground | GCBackground, - &gc_values); - - /* - * create the pixmap and load the image - */ - if (appData.usePixmap == True) - { - xImagePixmap = - XCreatePixmap(xDisplay, RootWindow(xDisplay, xScreen), - xImage->width, xImage->height, xImageDepth); - - /* - * According to the O'Reilly X Protocol Reference Manual, page 53, - * "A pixmap depth of one is always supported and listed, but windows - * of depth one might not be supported." Therefore we create a pixmap - * of depth one and use XCopyPlane(). This is idiomatic. - */ - if (xImageDepth == 1) - { /* just pass the bits through */ - gc_values.foreground = 1; /* foreground describes set bits */ - gc_values.background = 0; /* background describes clear bits */ - bitmap_gc = XCreateGC(xDisplay, xImagePixmap, - GCForeground | GCBackground, &gc_values); - XPutImage(xDisplay, xImagePixmap, bitmap_gc, xImage, 0, 0, 0, 0, - xImage->width, xImage->height); - } - else - XPutImage(xDisplay, xImagePixmap, xWinGc, xImage, 0, 0, 0, 0, - xImage->width, xImage->height); - XDestroyImage(xImage); - free(imageMemory); - } -} - -XtCallbackProc SelectProc(w, unused_1, unused_2) -Widget w; -caddr_t unused_1; -caddr_t unused_2; -{ - XawListReturnStruct *list_return; - - list_return = XawListShowCurrent(w); - - switch (list_return->list_index) - { - case ButtonQuit: - QuitProc(); - break; - case ButtonPreviousPage: - PreviousProc(); - break; - case ButtonNextPage: - NextProc(); - break; - default: - fprintf(stderr, "error in SelectProc\n"); - exit(0); - } - XawListUnhighlight(w); -} - -void QuitProc(void) { exit(0); } - -void NextProc() { PageProc(ButtonNextPage); } - -void PreviousProc() { PageProc(ButtonPreviousPage); } - -void PageProc(direction) int direction; -{ - XEvent fake_event; - Arg args[4]; - - switch (direction) - { - case ButtonPreviousPage: - if (tfDirectory > 0) - TIFFSetDirectory(tfFile, --tfDirectory); - else - return; - break; - case ButtonNextPage: - if (TIFFReadDirectory(tfFile) == True) - tfDirectory++; - else - return; - break; - default: - fprintf(stderr, "error in PageProc\n"); - exit(0); - } - - xOffset = yOffset = 0; - grabX = grabY = -1; - - GetTIFFHeader(); - SetNameLabel(); - GetTIFFImage(); - - if (appData.usePixmap == True) - XFreePixmap(xDisplay, xImagePixmap); - else - XDestroyImage(xImage); - - CreateXImage(); - - /* - * Using XtSetValues() to set the widget size causes a resize. - * This resize gets propagated up to the parent shell. - * In order to disable this visually disconcerting effect, - * shell resizing is temporarily disabled. - */ - XtSetArg(args[0], XtNallowShellResize, False); - XtSetValues(shellWidget, args, 1); - - XtSetArg(args[0], XtNwidth, tfImageWidth); - XtSetArg(args[1], XtNheight, tfImageHeight); - XtSetValues(imageWidget, args, 2); - - XtSetArg(args[0], XtNallowShellResize, True); - XtSetValues(shellWidget, args, 1); - - XClearWindow(xDisplay, XtWindow(imageWidget)); - - fake_event.type = Expose; - fake_event.xexpose.x = fake_event.xexpose.y = 0; - fake_event.xexpose.width = tfImageWidth; /* the window will clip */ - fake_event.xexpose.height = tfImageHeight; - EventProc(imageWidget, NULL, &fake_event); -} - -void EventProc(widget, unused, event) Widget widget; -caddr_t unused; -XEvent *event; -{ - int ih, iw, ww, wh, sx, sy, w, h, dx, dy; - Dimension w_width, w_height; - XEvent next_event; - Arg args[2]; - - if (event->type == MappingNotify) - { - XRefreshKeyboardMapping((XMappingEvent *)event); - return; - } - - if (!XtIsRealized(widget)) - return; - - if ((event->type == ButtonPress) || (event->type == ButtonRelease)) - if (event->xbutton.button != Button1) - return; - - iw = tfImageWidth; /* avoid sign problems */ - ih = tfImageHeight; - - /* - * The grabX and grabY variables record where the user grabbed the image. - * They also record whether the mouse button is down or not. - */ - if (event->type == ButtonPress) - { - grabX = event->xbutton.x; - grabY = event->xbutton.y; - return; - } - - /* - * imageWidget is a Core widget and doesn't get resized. - * So we calculate the size of its viewport here. - */ - XtSetArg(args[0], XtNwidth, &w_width); - XtSetArg(args[1], XtNheight, &w_height); - XtGetValues(shellWidget, args, 2); - ww = w_width; - wh = w_height; - XtGetValues(listWidget, args, 2); - wh -= w_height; - - switch (event->type) - { - case Expose: - dx = event->xexpose.x; - dy = event->xexpose.y; - sx = dx + xOffset; - sy = dy + yOffset; - w = MIN(event->xexpose.width, iw); - h = MIN(event->xexpose.height, ih); - break; - case KeyPress: - if ((grabX >= 0) || (grabY >= 0)) /* Mouse button is still down */ - return; - switch (XLookupKeysym((XKeyEvent *)event, /* KeySyms index */ 0)) - { - case XK_Up: - if (ih < - wh) /* Don't scroll if the window fits the image. */ - return; - sy = yOffset + appData.translate; - sy = MIN(ih - wh, sy); - if (sy == - yOffset) /* Filter redundant stationary refreshes. */ - return; - yOffset = sy; - sx = xOffset; - dx = dy = 0; - w = ww; - h = wh; - break; - case XK_Down: - if (ih < wh) - return; - sy = yOffset - appData.translate; - sy = MAX(sy, 0); - if (sy == yOffset) - return; - yOffset = sy; - sx = xOffset; - dx = dy = 0; - w = ww; - h = wh; - break; - case XK_Left: - if (iw < ww) - return; - sx = xOffset + appData.translate; - sx = MIN(iw - ww, sx); - if (sx == xOffset) - return; - xOffset = sx; - sy = yOffset; - dx = dy = 0; - w = ww; - h = wh; - break; - case XK_Right: - if (iw < ww) - return; - sx = xOffset - appData.translate; - sx = MAX(sx, 0); - if (sx == xOffset) - return; - xOffset = sx; - sy = yOffset; - dx = dy = 0; - w = ww; - h = wh; - break; - default: - return; - } - break; - case MotionNotify: - /* - * MotionEvent compression. Ignore multiple motion events. - * Ignore motion events if the mouse button is up. - */ - if (XPending(xDisplay)) /* Xlib doesn't flush the output buffer */ - if (XtPeekEvent(&next_event)) - if (next_event.type == MotionNotify) - return; - if ((grabX < 0) || (grabY < 0)) - return; - sx = xOffset + grabX - (int)event->xmotion.x; - if (sx >= (iw - ww)) /* clamp x motion but allow y motion */ - sx = iw - ww; - sx = MAX(sx, 0); - sy = yOffset + grabY - (int)event->xmotion.y; - if (sy >= (ih - wh)) /* clamp y motion but allow x motion */ - sy = ih - wh; - sy = MAX(sy, 0); - if ((sx == xOffset) && (sy == yOffset)) - return; - dx = dy = 0; - w = ww; - h = wh; - break; - case ButtonRelease: - xOffset = xOffset + grabX - (int)event->xbutton.x; - xOffset = MIN(iw - ww, xOffset); - xOffset = MAX(xOffset, 0); - yOffset = yOffset + grabY - (int)event->xbutton.y; - yOffset = MIN(ih - wh, yOffset); - yOffset = MAX(yOffset, 0); - grabX = grabY = -1; - default: - return; - } - - if (appData.usePixmap == True) - { - if (xImageDepth == 1) - XCopyPlane(xDisplay, xImagePixmap, XtWindow(widget), xWinGc, sx, sy, - w, h, dx, dy, 1); - else - XCopyArea(xDisplay, xImagePixmap, XtWindow(widget), xWinGc, sx, sy, - w, h, dx, dy); - } - else - XPutImage(xDisplay, XtWindow(widget), xWinGc, xImage, sx, sy, dx, dy, w, - h); -} - -void ResizeProc() -{ - Dimension w_width, w_height; - int xo, yo, ww, wh; - XEvent fake_event; - Arg args[2]; - - if ((xOffset == 0) && (yOffset == 0)) - return; - - XtSetArg(args[0], XtNwidth, &w_width); - XtSetArg(args[1], XtNheight, &w_height); - XtGetValues(shellWidget, args, 2); - ww = w_width; - wh = w_height; - XtGetValues(listWidget, args, 2); - wh -= w_height; - - xo = xOffset; - yo = yOffset; - - if ((xOffset + ww) >= tfImageWidth) - xOffset = MAX((int)tfImageWidth - ww, 0); - if ((yOffset + wh) >= tfImageHeight) - yOffset = MAX((int)tfImageHeight - wh, 0); - - /* - * Send an ExposeEvent if the origin changed. - * We have to do this because of the use and semantics of bit gravity. - */ - if ((xo != xOffset) || (yo != yOffset)) - { - fake_event.type = Expose; - fake_event.xexpose.x = fake_event.xexpose.y = 0; - fake_event.xexpose.width = tfImageWidth; - fake_event.xexpose.height = tfImageHeight; - EventProc(imageWidget, NULL, &fake_event); - } -} - -int XTiffErrorHandler(display, error_event) -Display *display; -XErrorEvent *error_event; -{ - char message[80]; - - /* - * Some X servers limit the size of pixmaps. - */ - if ((error_event->error_code == BadAlloc) && - (error_event->request_code == X_CreatePixmap)) - fprintf(stderr, "xtiff: requested pixmap too big for display\n"); - else - { - XGetErrorText(display, error_event->error_code, message, 80); - fprintf(stderr, "xtiff: error code %s\n", message); - } - - exit(0); -} - -void Usage() -{ - fprintf(stderr, "Usage xtiff: [options] tiff-file\n"); - fprintf(stderr, "\tstandard Xt options\n"); - fprintf(stderr, "\t[-help]\n"); - fprintf(stderr, "\t[-gamma gamma]\n"); - fprintf(stderr, "\t[-usePixmap (True | False)]\n"); - fprintf(stderr, "\t[-viewportWidth pixels]\n"); - fprintf(stderr, "\t[-viewportHeight pixels]\n"); - fprintf(stderr, "\t[-translate pixels]\n"); - fprintf(stderr, "\t[-verbose (True | False)]\n"); - exit(0); -} diff --git a/third_party/libtiff/contrib/dbs/xtiff/xtifficon.h b/third_party/libtiff/contrib/dbs/xtiff/xtifficon.h deleted file mode 100644 index 37e11fe..0000000 --- a/third_party/libtiff/contrib/dbs/xtiff/xtifficon.h +++ /dev/null @@ -1,15 +0,0 @@ -#define xtifficon_width 32 -#define xtifficon_height 32 -static char xtifficon_bits[] = { - 0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x7e, 0xc0, 0xfc, 0x03, 0x7e, 0x60, - 0xf8, 0x07, 0x06, 0x30, 0xf8, 0x07, 0x1e, 0x18, 0xf0, 0x0f, 0x1e, 0x0c, - 0xe0, 0x1f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x06, 0xc0, 0x3f, 0x06, 0x03, - 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00, - 0x00, 0xfe, 0x31, 0x7e, 0x7e, 0xfc, 0x33, 0x7e, 0x7e, 0xf8, 0x1b, 0x06, - 0x18, 0xf0, 0x0d, 0x1e, 0x18, 0xf0, 0x0e, 0x1e, 0x18, 0x60, 0x1f, 0x06, - 0x18, 0xb0, 0x3f, 0x06, 0x18, 0x98, 0x7f, 0x06, 0x18, 0x98, 0x7f, 0x00, - 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x63, 0xfc, 0x03, - 0x80, 0x61, 0xfc, 0x03, 0xc0, 0x60, 0xf8, 0x07, 0xc0, 0x60, 0xf0, 0x0f, - 0x60, 0x60, 0xe0, 0x1f, 0x30, 0x60, 0xe0, 0x1f, 0x18, 0x60, 0xc0, 0x3f, - 0x0c, 0x60, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff}; - diff --git a/third_party/libtiff/contrib/iptcutil/CMakeLists.txt b/third_party/libtiff/contrib/iptcutil/CMakeLists.txt deleted file mode 100644 index 8f453cb..0000000 --- a/third_party/libtiff/contrib/iptcutil/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -add_executable(iptcutil iptcutil.c) -set_target_properties(iptcutil PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(iptcutil tiff tiff_port) diff --git a/third_party/libtiff/contrib/iptcutil/Makefile.am b/third_party/libtiff/contrib/iptcutil/Makefile.am deleted file mode 100644 index ca79306..0000000 --- a/third_party/libtiff/contrib/iptcutil/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -EXTRA_DIST = \ - CMakeLists.txt \ - README \ - test.iptc \ - test.txt - -if TIFF_CONTRIB -noinst_PROGRAMS = iptcutil -endif - -iptcutil_SOURCES = iptcutil.c -iptcutil_LDADD = $(LIBTIFF) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff - diff --git a/third_party/libtiff/contrib/iptcutil/Makefile.in b/third_party/libtiff/contrib/iptcutil/Makefile.in deleted file mode 100644 index 6c4610a..0000000 --- a/third_party/libtiff/contrib/iptcutil/Makefile.in +++ /dev/null @@ -1,670 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@TIFF_CONTRIB_TRUE@noinst_PROGRAMS = iptcutil$(EXEEXT) -subdir = contrib/iptcutil -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_iptcutil_OBJECTS = iptcutil.$(OBJEXT) -iptcutil_OBJECTS = $(am_iptcutil_OBJECTS) -iptcutil_DEPENDENCIES = $(LIBTIFF) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/iptcutil.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(iptcutil_SOURCES) -DIST_SOURCES = $(iptcutil_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = \ - CMakeLists.txt \ - README \ - test.iptc \ - test.txt - -iptcutil_SOURCES = iptcutil.c -iptcutil_LDADD = $(LIBTIFF) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/iptcutil/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/iptcutil/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -iptcutil$(EXEEXT): $(iptcutil_OBJECTS) $(iptcutil_DEPENDENCIES) $(EXTRA_iptcutil_DEPENDENCIES) - @rm -f iptcutil$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(iptcutil_OBJECTS) $(iptcutil_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iptcutil.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/iptcutil.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/iptcutil.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/iptcutil/README b/third_party/libtiff/contrib/iptcutil/README deleted file mode 100644 index 1619ef4..0000000 --- a/third_party/libtiff/contrib/iptcutil/README +++ /dev/null @@ -1,25 +0,0 @@ - -Program: IPTCUTIL.C - -Purpose: Convert between IPTC binary and a "special" IPTC text file format. - -Usage: iptcutil -t | -b [-i file] [-o file] output - -Notes: You tell the program the "type" of input file via the -t and -b - switches. The -t says that the input is text, while the -b says - that the input is binary IPTC. You can use either the -i or the - -o switches to tell the program what the input and output files - will be, or use simple piping. - -Author: William T. Radcliffe (billr@corbis.com) - Parts of this program were derived from other places. The original - binary to text conversion was taken from the PHP distribution and - the tokenizer was written many years ago, by someone else as well. - -This software is provided freely "as is", without warranty of any kind, -express or implied, including but not limited to the warranties of -merchantability, fitness for a particular purpose and noninfringement. -In no event shall William T. Radcliffe be liable for any claim, damages or -other liability, whether in an action of contract, tort or otherwise, -arising from, out of or in connection with IPTCUTIL - diff --git a/third_party/libtiff/contrib/iptcutil/iptcutil.c b/third_party/libtiff/contrib/iptcutil/iptcutil.c deleted file mode 100644 index b3b9bbd..0000000 --- a/third_party/libtiff/contrib/iptcutil/iptcutil.c +++ /dev/null @@ -1,899 +0,0 @@ -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_STRINGS_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef _WIN32 -#define STRNICMP strnicmp -#else -#define STRNICMP strncasecmp -#endif - -typedef struct _tag_spec -{ - short id; - - char *name; -} tag_spec; - -static tag_spec tags[] = {{5, "Image Name"}, - {7, "Edit Status"}, - {10, "Priority"}, - {15, "Category"}, - {20, "Supplemental Category"}, - {22, "Fixture Identifier"}, - {25, "Keyword"}, - {30, "Release Date"}, - {35, "Release Time"}, - {40, "Special Instructions"}, - {45, "Reference Service"}, - {47, "Reference Date"}, - {50, "Reference Number"}, - {55, "Created Date"}, - {60, "Created Time"}, - {65, "Originating Program"}, - {70, "Program Version"}, - {75, "Object Cycle"}, - {80, "Byline"}, - {85, "Byline Title"}, - {90, "City"}, - {95, "Province State"}, - {100, "Country Code"}, - {101, "Country"}, - {103, "Original Transmission Reference"}, - {105, "Headline"}, - {110, "Credit"}, - {115, "Source"}, - {116, "Copyright String"}, - {120, "Caption"}, - {121, "Local Caption"}, - {122, "Caption Writer"}, - {200, "Custom Field 1"}, - {201, "Custom Field 2"}, - {202, "Custom Field 3"}, - {203, "Custom Field 4"}, - {204, "Custom Field 5"}, - {205, "Custom Field 6"}, - {206, "Custom Field 7"}, - {207, "Custom Field 8"}, - {208, "Custom Field 9"}, - {209, "Custom Field 10"}, - {210, "Custom Field 11"}, - {211, "Custom Field 12"}, - {212, "Custom Field 13"}, - {213, "Custom Field 14"}, - {214, "Custom Field 15"}, - {215, "Custom Field 16"}, - {216, "Custom Field 17"}, - {217, "Custom Field 18"}, - {218, "Custom Field 19"}, - {219, "Custom Field 20"}}; - -/* - * We format the output using HTML conventions - * to preserve control characters and such. - */ -void formatString(FILE *ofile, const char *s, int len) -{ - putc('"', ofile); - for (; len > 0; --len, ++s) - { - int c = *s; - switch (c) - { - case '&': - fputs("&", ofile); - break; -#ifdef HANDLE_GT_LT - case '<': - fputs("<", ofile); - break; - case '>': - fputs(">", ofile); - break; -#endif - case '"': - fputs(""", ofile); - break; - default: - if (iscntrl(c)) - fprintf(ofile, "&#%d;", c); - else - putc(*s, ofile); - break; - } - } - fputs("\"\n", ofile); -} - -typedef struct _html_code -{ - short len; - const char *code, val; -} html_code; - -static html_code html_codes[] = { -#ifdef HANDLE_GT_LT - {4, "<", '<'}, - {4, ">", '>'}, -#endif - {5, "&", '&'}, - {6, """, '"'}}; - -/* - * This routine converts HTML escape sequence - * back to the original ASCII representation. - * - returns the number of characters dropped. - */ -int convertHTMLcodes(char *s, int len) -{ - if (len <= 0 || s == (char *)NULL || *s == '\0') - return 0; - - if (s[1] == '#') - { - int val, o; - - if (sscanf(s, "&#%d;", &val) == 1) - { - o = 3; - while (s[o] != ';') - { - o++; - if (o > 5) - break; - } - if (o < 5) - strcpy(s + 1, s + 1 + o); - *s = val; - return o; - } - } - else - { - int i, codes = sizeof(html_codes) / sizeof(html_code); - - for (i = 0; i < codes; i++) - { - if (html_codes[i].len <= len) - if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0) - { - strcpy(s + 1, s + html_codes[i].len); - *s = html_codes[i].val; - return html_codes[i].len - 1; - } - } - } - - return 0; -} - -int formatIPTC(FILE *ifile, FILE *ofile) -{ - unsigned int foundiptc, tagsfound; - - char *readable, *str; - - long tagindx, taglen; - - int i, tagcount = sizeof(tags) / sizeof(tag_spec); - - int c, dataset, recnum; - - foundiptc = 0; /* found the IPTC-Header */ - tagsfound = 0; /* number of tags found */ - - c = getc(ifile); - while (c != EOF) - { - if (c == 0x1c) - foundiptc = 1; - else - { - if (foundiptc) - { - return -1; - } - else - { - c = getc(ifile); - continue; - } - } - - /* we found the 0x1c tag and now grab the dataset and record number tags - */ - dataset = getc(ifile); - if (dataset == EOF) - return -1; - recnum = getc(ifile); - if (recnum == EOF) - return -1; - /* try to match this record to one of the ones in our named table */ - for (i = 0; i < tagcount; i++) - { - if (tags[i].id == recnum) - break; - } - if (i < tagcount) - readable = tags[i].name; - else - readable = ""; - - /* then we decode the length of the block that follows - long or short - * fmt */ - c = getc(ifile); - if (c == EOF) - return 0; - if (c & (unsigned char)0x80) - { - unsigned char buffer[4]; - - for (i = 0; i < 4; i++) - { - c = getc(ifile); - if (c == EOF) - return -1; - buffer[i] = c; - } - taglen = (((long)buffer[0]) << 24) | (((long)buffer[1]) << 16) | - (((long)buffer[2]) << 8) | (((long)buffer[3])); - } - else - { - int x = c; - - taglen = x << 8; - x = getc(ifile); - if (x == EOF) - return -1; - taglen |= (long)x; - } - /* Place limits on tag length */ - if ((taglen <= 0) || (taglen > 1048576)) - { - printf("Inappropriate IPTC tag length %ld\n", taglen); - return -1; - } - /* make a buffer to hold the tag data and snag it from the input stream - */ - str = (char *)malloc((unsigned int)(taglen + 1)); - if (str == (char *)NULL) - { - printf("Memory allocation failed"); - return 0; - } - for (tagindx = 0; tagindx < taglen; tagindx++) - { - c = getc(ifile); - if (c == EOF) - { - free(str); - return -1; - } - str[tagindx] = c; - } - str[taglen] = 0; - - /* now finish up by formatting this binary data into ASCII equivalent */ - if (strlen(readable) > 0) - fprintf(ofile, "%d#%d#%s=", (unsigned int)dataset, - (unsigned int)recnum, readable); - else - fprintf(ofile, "%d#%d=", (unsigned int)dataset, - (unsigned int)recnum); - /* Silence Coverity Scan warning about tainted_data: Passing tainted - * expression *str to formatString, which uses it as an offset. */ - /* coverity[tainted_data:SUPPRESS] */ - formatString(ofile, str, taglen); - free(str); - - tagsfound++; - - c = getc(ifile); - } - return tagsfound; -} - -int tokenizer(unsigned inflag, char *token, int tokmax, char *line, char *white, - char *brkchar, char *quote, char eschar, char *brkused, int *next, - char *quoted); - -char *super_fgets(char *b, int *blen, FILE *file) -{ - int c, len; - - char *q; - - len = *blen; - for (q = b;; q++) - { - c = fgetc(file); - if (c == EOF || c == '\n') - break; - if ((int)(q - b + 1) >= len) - { - long tlen; - - tlen = (int)(q - b); - len <<= 1; - b = (char *)realloc((char *)b, (len + 2)); - if ((char *)b == (char *)NULL) - break; - q = b + tlen; - } - *q = (unsigned char)c; - } - *blen = 0; - if ((unsigned char *)b != (unsigned char *)NULL) - { - int tlen; - - tlen = (int)(q - b); - if (tlen == 0) - return (char *)NULL; - b[tlen] = '\0'; - *blen = ++tlen; - } - return b; -} - -#define BUFFER_SZ 4096 - -int main(int argc, char *argv[]) -{ - /* unsigned int */ - /* length; */ - - /*unsigned char - *buffer;*/ - - int i, mode; /* iptc binary, or iptc text */ - - FILE *ifile = stdin, *ofile = stdout; - - char c, - *usage = "usage: iptcutil -t | -b [-i file] [-o file] output"; - - if (argc < 2) - { - puts(usage); - return 1; - } - - mode = 0; - /* length = -1; */ - /* buffer = (unsigned char *)NULL; */ - - for (i = 1; i < argc; i++) - { - c = argv[i][0]; - if (c == '-' || c == '/') - { - c = argv[i][1]; - switch (c) - { - case 't': - mode = 1; -#ifdef _WIN32 - /* Set "stdout" to binary mode: */ - _setmode(_fileno(ofile), _O_BINARY); -#endif - break; - case 'b': - mode = 0; -#ifdef _WIN32 - /* Set "stdin" to binary mode: */ - _setmode(_fileno(ifile), _O_BINARY); -#endif - break; - case 'i': - if (mode == 0) - ifile = fopen(argv[++i], "rb"); - else - ifile = fopen(argv[++i], "rt"); - if (ifile == (FILE *)NULL) - { - printf("Unable to open: %s\n", argv[i]); - return 1; - } - break; - case 'o': - if (mode == 0) - ofile = fopen(argv[++i], "wt"); - else - ofile = fopen(argv[++i], "wb"); - if (ofile == (FILE *)NULL) - { - printf("Unable to open: %s\n", argv[i]); - return 1; - } - break; - default: - printf("Unknown option: %s\n", argv[i]); - return 1; - } - } - else - { - puts(usage); - return 1; - } - } - - if (mode == 0) /* handle binary iptc info */ - formatIPTC(ifile, ofile); - - if (mode == 1) /* handle text form of iptc info */ - { - char brkused, quoted, *line, *token, *newstr; - - int state, next; - - unsigned char recnum = 0, dataset = 0; - - int inputlen = BUFFER_SZ; - - line = (char *)malloc(inputlen); - while ((line = super_fgets(line, &inputlen, ifile)) != NULL) - { - state = 0; - next = 0; - - token = (char *)malloc(inputlen); - newstr = (char *)malloc(inputlen); - while (tokenizer(0, token, inputlen, line, "", "=", "\"", 0, - &brkused, &next, "ed) == 0) - { - if (state == 0) - { - int state2, next2; - - char brkused2, quoted2; - - state2 = 0; - next2 = 0; - while (tokenizer(0, newstr, inputlen, token, "", "#", "", 0, - &brkused2, &next2, "ed2) == 0) - { - if (state2 == 0) - dataset = (unsigned char)atoi(newstr); - else if (state2 == 1) - recnum = (unsigned char)atoi(newstr); - state2++; - } - } - else if (state == 1) - { - int next2; - - unsigned long len; - - char brkused2, quoted2; - - next2 = 0; - len = (unsigned long)strlen(token); - while (tokenizer(0, newstr, inputlen, token, "", "&", "", 0, - &brkused2, &next2, "ed2) == 0) - { - if (brkused2 && next2 > 0) - { - char *s = &token[next2 - 1]; - - len -= convertHTMLcodes(s, (int)strlen(s)); - } - } - - fputc(0x1c, ofile); - fputc(dataset, ofile); - fputc(recnum, ofile); - if (len < 0x10000) - { - fputc((len >> 8) & 255, ofile); - fputc(len & 255, ofile); - } - else - { - fputc(((len >> 24) & 255) | 0x80, ofile); - fputc((len >> 16) & 255, ofile); - fputc((len >> 8) & 255, ofile); - fputc(len & 255, ofile); - } - next2 = 0; - while (len--) - fputc(token[next2++], ofile); - } - state++; - } - free(token); - free(newstr); - } - free(line); - - fclose(ifile); - fclose(ofile); - } - - return 0; -} - -/* - This routine is a generalized, finite state token parser. It allows - you extract tokens one at a time from a string of characters. The - characters used for white space, for break characters, and for quotes - can be specified. Also, characters in the string can be preceded by - a specifiable escape character which removes any special meaning the - character may have. - - There are a lot of formal parameters in this subroutine call, but - once you get familiar with them, this routine is fairly easy to use. - "#define" macros can be used to generate simpler looking calls for - commonly used applications of this routine. - - First, some terminology: - - token: used here, a single unit of information in - the form of a group of characters. - - white space: space that gets ignored (except within quotes - or when escaped), like blanks and tabs. in - addition, white space terminates a non-quoted - token. - - break character: a character that separates non-quoted tokens. - commas are a common break character. the - usage of break characters to signal the end - of a token is the same as that of white space, - except multiple break characters with nothing - or only white space between generate a null - token for each two break characters together. - - for example, if blank is set to be the white - space and comma is set to be the break - character, the line ... - - A, B, C , , DEF - - ... consists of 5 tokens: - - 1) "A" - 2) "B" - 3) "C" - 4) "" (the null string) - 5) "DEF" - - quote character: a character that, when surrounding a group - of other characters, causes the group of - characters to be treated as a single token, - no matter how many white spaces or break - characters exist in the group. also, a - token always terminates after the closing - quote. for example, if ' is the quote - character, blank is white space, and comma - is the break character, the following - string ... - - A, ' B, CD'EF GHI - - ... consists of 4 tokens: - - 1) "A" - 2) " B, CD" (note the blanks & comma) - 3) "EF" - 4) "GHI" - - the quote characters themselves do - not appear in the resultant tokens. the - double quotes are delimiters i use here for - documentation purposes only. - - escape character: a character which itself is ignored but - which causes the next character to be - used as is. ^ and \ are often used as - escape characters. an escape in the last - position of the string gets treated as a - "normal" (i.e., non-quote, non-white, - non-break, and non-escape) character. - for example, assume white space, break - character, and quote are the same as in the - above examples, and further, assume that - ^ is the escape character. then, in the - string ... - - ABC, ' DEF ^' GH' I ^ J K^ L ^ - - ... there are 7 tokens: - - 1) "ABC" - 2) " DEF ' GH" - 3) "I" - 4) " " (a lone blank) - 5) "J" - 6) "K L" - 7) "^" (passed as is at end of line) - - - OK, now that you have this background, here's how to call "tokenizer": - - result=tokenizer(flag,token,maxtok,string,white,break,quote,escape, - brkused,next,quoted) - - result: 0 if we haven't reached EOS (end of string), and - 1 if we have (this is an "int"). - - flag: right now, only the low order 3 bits are used. - 1 => convert non-quoted tokens to upper case - 2 => convert non-quoted tokens to lower case - 0 => do not convert non-quoted tokens - (this is a "char"). - - token: a character string containing the returned next token - (this is a "char[]"). - - maxtok: the maximum size of "token". characters beyond - "maxtok" are truncated (this is an "int"). - - string: the string to be parsed (this is a "char[]"). - - white: a string of the valid white spaces. example: - - char whitesp[]={" \t"}; - - blank and tab will be valid white space (this is - a "char[]"). - - break: a string of the valid break characters. example: - - char breakch[]={";,"}; - - semicolon and comma will be valid break characters - (this is a "char[]"). - - IMPORTANT: do not use the name "break" as a C - variable, as this is a reserved word in C. - - quote: a string of the valid quote characters. an example - would be - - char whitesp[]={"'\""); - - (this causes single and double quotes to be valid) - note that a token starting with one of these characters - needs the same quote character to terminate it. - - for example, - - "ABC ' - - is unterminated, but - - "DEF" and 'GHI' - - are properly terminated. note that different quote - characters can appear on the same line; only for - a given token do the quote characters have to be - the same (this is a "char[]"). - - escape: the escape character (NOT a string ... only one - allowed). use zero if none is desired (this is - a "char"). - - brkused: the break character used to terminate the current - token. if the token was quoted, this will be the - quote used. if the token is the last one on the - line, this will be zero (this is a pointer to a - "char"). - - next: this variable points to the first character of the - next token. it gets reset by "tokenizer" as it steps - through the string. set it to 0 upon initialization, - and leave it alone after that. you can change it - if you want to jump around in the string or re-parse - from the beginning, but be careful (this is a - pointer to an "int"). - - quoted: set to 1 (true) if the token was quoted and 0 (false) - if not. you may need this information (for example: - in C, a string with quotes around it is a character - string, while one without is an identifier). - - (this is a pointer to a "char"). -*/ - -/* states */ - -#define IN_WHITE 0 -#define IN_TOKEN 1 -#define IN_QUOTE 2 -#define IN_OZONE 3 - -int _p_state; /* current state */ -unsigned _p_flag; /* option flag */ -char _p_curquote; /* current quote char */ -int _p_tokpos; /* current token pos */ - -/* routine to find character in string ... used only by "tokenizer" */ - -int sindex(char ch, char *string) -{ - char *cp; - for (cp = string; *cp; ++cp) - if (ch == *cp) - return (int)(cp - string); /* return position of character */ - return -1; /* eol ... no match found */ -} - -/* routine to store a character in a string ... used only by "tokenizer" */ - -void chstore(char *string, int max, char ch) -{ - char c; - if (_p_tokpos >= 0 && _p_tokpos < max - 1) - { - if (_p_state == IN_QUOTE) - c = ch; - else - switch (_p_flag & 3) - { - case 1: /* convert to upper */ - c = toupper((int)ch); - break; - - case 2: /* convert to lower */ - c = tolower((int)ch); - break; - - default: /* use as is */ - c = ch; - break; - } - string[_p_tokpos++] = c; - } - return; -} - -int tokenizer(unsigned inflag, char *token, int tokmax, char *line, char *white, - char *brkchar, char *quote, char eschar, char *brkused, int *next, - char *quoted) -{ - int qp; - char c, nc; - - *brkused = 0; /* initialize to null */ - *quoted = 0; /* assume not quoted */ - - if (!line[*next]) /* if we're at end of line, indicate such */ - return 1; - - _p_state = IN_WHITE; /* initialize state */ - _p_curquote = 0; /* initialize previous quote char */ - _p_flag = inflag; /* set option flag */ - - for (_p_tokpos = 0; (c = line[*next]); ++(*next)) /* main loop */ - { - if ((qp = sindex(c, brkchar)) >= 0) /* break */ - { - switch (_p_state) - { - case IN_WHITE: /* these are the same here ... */ - case IN_TOKEN: /* ... just get out */ - case IN_OZONE: /* ditto */ - ++(*next); - *brkused = brkchar[qp]; - goto byebye; - - case IN_QUOTE: /* just keep going */ - chstore(token, tokmax, c); - break; - } - } - else if ((qp = sindex(c, quote)) >= 0) /* quote */ - { - switch (_p_state) - { - case IN_WHITE: /* these are identical, */ - _p_state = IN_QUOTE; /* change states */ - _p_curquote = quote[qp]; /* save quote char */ - *quoted = - 1; /* set to true as long as something is in quotes */ - break; - - case IN_QUOTE: - if (quote[qp] == - _p_curquote) /* same as the beginning quote? */ - { - _p_state = IN_OZONE; - _p_curquote = 0; - } - else - chstore(token, tokmax, c); /* treat as regular char */ - break; - - case IN_TOKEN: - case IN_OZONE: - *brkused = c; /* uses quote as break char */ - goto byebye; - } - } - else if ((qp = sindex(c, white)) >= 0) /* white */ - { - switch (_p_state) - { - case IN_WHITE: - case IN_OZONE: - break; /* keep going */ - - case IN_TOKEN: - _p_state = IN_OZONE; - break; - - case IN_QUOTE: - chstore(token, tokmax, c); /* it's valid here */ - break; - } - } - else if (c == eschar) /* escape */ - { - nc = line[(*next) + 1]; - if (nc == 0) /* end of line */ - { - *brkused = 0; - chstore(token, tokmax, c); - ++(*next); - goto byebye; - } - switch (_p_state) - { - case IN_WHITE: - --(*next); - _p_state = IN_TOKEN; - break; - - case IN_TOKEN: - case IN_QUOTE: - ++(*next); - chstore(token, tokmax, nc); - break; - - case IN_OZONE: - goto byebye; - } - } - else /* anything else is just a real character */ - { - switch (_p_state) - { - case IN_WHITE: - _p_state = IN_TOKEN; /* switch states */ - /* Fall through */ - - case IN_TOKEN: /* these 2 are */ - case IN_QUOTE: /* identical here */ - chstore(token, tokmax, c); - break; - - case IN_OZONE: - goto byebye; - } - } - } /* end of main loop */ - -byebye: - token[_p_tokpos] = 0; /* make sure token ends with EOS */ - - return 0; -} diff --git a/third_party/libtiff/contrib/iptcutil/test.iptc b/third_party/libtiff/contrib/iptcutil/test.iptc deleted file mode 100644 index a2605622ecf1e8eb7906378b3f7ae7196244d538..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1107 zcmdT@&2G~`5Z-L43Plw?a6wwZNL-Le)1*ylQ*m+aBzArr6FV)fDxrv;ZE1Oc+dku=zqT=r5u) zOli3UljnIVC1W+PS)l^9f|<7T^k+}v+A34V>9Hdg1YeiQr#^#grj>Y*T+kXqh*pBI|kI%u4l zR;Syuo&I1ra>w3>i62bQ&OcsULUaG1b@=Y+xUJfGXvZ_A!-u>Ho}#KBbO|m{RgFim zfp$hTw3xVo37hj$vXWr2{<(oRr~a;eVRZ;TddU0|ZJisw?YO;Q>=OJ5Vap_#q3x;b z1RV?fzz8}%!PjWRGL6Oo!Ou|D8xIM7j<$N^v(CgFb=-j9EmS!q_yu~TRnx|kzshN^ z%Cks+H`fXhJU|sn@cVz1>!OYQdZVszz9W2~fPWy|J0Bqy6USn!AanfpmHv+Xv^CbivPQYgw3#EWvxVjoR?uFqxSL+!156^G&1qdGi diff --git a/third_party/libtiff/contrib/iptcutil/test.txt b/third_party/libtiff/contrib/iptcutil/test.txt deleted file mode 100644 index d518100..0000000 --- a/third_party/libtiff/contrib/iptcutil/test.txt +++ /dev/null @@ -1,32 +0,0 @@ -2#0="�" -2#120#Caption="Chairman of the US House Judiciary Committee, Henry Hyde,R-IL, makes his opening statement during impeachment hearings 11 December on Capitol Hill in Washington, DC. The committee is debating the articles of impechment and my take a vote on the impeachment of US President BIll Clinton on charges that he obstucted justice, lied and abused the power of his office as early as today. AFP PHOTO Paul J. RICHARDS " -2#122#Caption Writer="kb/lt" -2#100#Country Code="USA" -2#105#Headline="Old fart squeezing two fingers." -2#30#Release Date="19981211" -2#35#Release Time="000000+0000" -2#40#Special Instructions="This is a test. This is only a test. ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890" -2#80#Byline="PAUL J. RICHARDS" -2#85#Byline Title="STF" -2#110#Credit="AFP" -2#65#Originating Program="MacDesk Reporter" -2#115#Source="AFP" -2#5#Image Name="US-HYDE" -2#55#Created Date="19981211" -2#90#City="WASHINGTON" -2#95#Province State="DC" -2#101#Country="UNITED STATES" -2#103#Original Transmission Reference="DCA03" -2#15#Category="POL" -2#20#Supplemental Category="GOVERNMENT" -2#10#Priority="5" -2#25#Keyword="fart" -2#25#Keyword="squeezing" -2#25#Keyword="old" -2#25#Keyword="fingers" -2#75#Object Cycle="a" -2#60#Created Time="000000+0000" -2#70#Program Version="2.0.3" -2#130="3S" -2#135="GB" -2#231="Kaya A. Hoffmann 12/14/98 12:00:44 PM Copy To : Selects - \\KINYANI\Selects������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������" diff --git a/third_party/libtiff/contrib/mfs/Makefile.am b/third_party/libtiff/contrib/mfs/Makefile.am deleted file mode 100644 index 62ae5d5..0000000 --- a/third_party/libtiff/contrib/mfs/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - README \ - mfs_file.c diff --git a/third_party/libtiff/contrib/mfs/Makefile.in b/third_party/libtiff/contrib/mfs/Makefile.in deleted file mode 100644 index b954ba8..0000000 --- a/third_party/libtiff/contrib/mfs/Makefile.in +++ /dev/null @@ -1,510 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/mfs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - mfs_file.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/mfs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/mfs/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/mfs/README b/third_party/libtiff/contrib/mfs/README deleted file mode 100644 index 6f9befb..0000000 --- a/third_party/libtiff/contrib/mfs/README +++ /dev/null @@ -1,37 +0,0 @@ -Date: Mon, 23 Jun 1997 13:30:48 +0200 -To: - -From: "Mike Johnson" -Subject: libtiff - Thanks - -Return-Path: mikehunt@swipnet.se -Delivery-Date: Mon, 23 Jun 1997 06:53:39 -0700 - -Hi Sam, - -I noticed in the README from libtiff that you would like to know about -what people have done with libtiff, so I thought I would drop you a -line. - -We have used libtiff to create and convert TIFF images of financial -documents which are sent from and to major document processing systems -in Sweden and Denmark. - -I would like to express my deep gratitude to yourself and Sillicon -Graphics for making this excellent library available for public use. -There is obviously a lot of work that has gone in to libtiff and the -quality of the code and documentation is an example to others. - -One thing that libtiff did not do was work on a memory area rather than -files. In my applications I had already read a TIFF or other format -file in to memory and did not want to waste I/O writing it out again -for libtiff's benefit. I therefore constructed a set of functions to -pass up to TIFFClientOpen to simulate a file in memory. I have attached -my mfs (memory file system) source code for you to use or junk, as you -see fit. :-) - -Once again, thanks very much for making my life simpler. - -Best Regards, - -Mike Johnson. diff --git a/third_party/libtiff/contrib/mfs/mfs_file.c b/third_party/libtiff/contrib/mfs/mfs_file.c deleted file mode 100644 index 68fc222..0000000 --- a/third_party/libtiff/contrib/mfs/mfs_file.c +++ /dev/null @@ -1,573 +0,0 @@ -/* --------------------------------------------------------------------------------- -- Module : mem_file.c -- Description : A general purpose library for manipulating a memory area -- as if it were a file. -- mfs_ stands for memory file system. -- Author : Mike Johnson - Banctec AB 03/07/96 -- --------------------------------------------------------------------------------- -*/ - -/* - -Copyright (c) 1996 Mike Johnson -Copyright (c) 1996 BancTec AB - -Permission to use, copy, modify, distribute, and sell this software -for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Mike Johnson and BancTec may not be used in any advertising or -publicity relating to the software. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL MIKE JOHNSON OR BANCTEC BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. - -*/ - -/* --------------------------------------------------------------------------------- -- Includes --------------------------------------------------------------------------------- -*/ - -#include -#include -#include - -/* --------------------------------------------------------------------------------- -- Definitions --------------------------------------------------------------------------------- -*/ - -#define MAX_BUFFS 20 -#define FALSE 0 -#define TRUE 1 - -/* --------------------------------------------------------------------------------- -- Globals --------------------------------------------------------------------------------- -*/ - -static char *buf[MAX_BUFFS]; /* Memory for each open buf */ -static long buf_off[MAX_BUFFS]; /* File pointer for each buf */ -static long buf_size[MAX_BUFFS]; /* Count of bytes allocated for each buf */ -static long fds[MAX_BUFFS]; /* File descriptor status */ -static int buf_mode[MAX_BUFFS]; /* Mode of buffer (r, w, a) */ - -static int library_init_done = FALSE; - -/* --------------------------------------------------------------------------------- -- Function prototypes --------------------------------------------------------------------------------- -*/ - -int mfs_open(void *ptr, int size, char *mode); -int mfs_lseek(int fd, int offset, int whence); -int mfs_read(int fd, void *buf, int size); -int mfs_write(int fd, void *buf, int size); -int mfs_size(int fd); -int mfs_map(int fd, char **addr, size_t *len); -int mfs_unmap(int fd); -int mfs_close(int fd); -static int extend_mem_file(int fd, int size); -static void mem_init(); - -/* --------------------------------------------------------------------------------- -- Function code --------------------------------------------------------------------------------- -*/ - -/* --------------------------------------------------------------------------------- -- Function : mfs_open () -- -- Arguments : Pointer to allocated buffer, initial size of buffer, -- mode spec (r, w, a) -- -- Returns : File descriptor or -1 if error. -- -- Description : Register this area of memory (which has been allocated -- and has a file read into it) under the mem_file library. -- A file descriptor is returned which can the be passed -- back to TIFFClientOpen and used as if it was a disk -- based fd. -- If the call is for mode 'w' then pass (void *)NULL as -- the buffer and zero size and the library will -- allocate memory for you. -- If the mode is append then pass (void *)NULL and size -- zero or with a valid address. -- --------------------------------------------------------------------------------- -*/ - -int mfs_open(void *buffer, int size, char *mode) -{ - int ret, i; - void *tmp; - - if (library_init_done == FALSE) - { - mem_init(); - library_init_done = TRUE; - } - - ret = -1; - - /* Find a free fd */ - - for (i = 0; i < MAX_BUFFS; i++) - { - if (fds[i] == -1) - { - ret = i; - break; - } - } - - if (i == MAX_BUFFS) /* No more free descriptors */ - { - ret = -1; - errno = EMFILE; - } - - if (ret >= 0 && *mode == 'r') - { - if (buffer == (void *)NULL) - { - ret = -1; - errno = EINVAL; - } - else - { - buf[ret] = (char *)buffer; - buf_size[ret] = size; - buf_off[ret] = 0; - } - } - else if (ret >= 0 && *mode == 'w') - { - - if (buffer != (void *)NULL) - { - ret = -1; - errno = EINVAL; - } - - else - { - tmp = malloc(0); /* Get a pointer */ - if (tmp == (void *)NULL) - { - ret = -1; - errno = EDQUOT; - } - else - { - buf[ret] = (char *)tmp; - buf_size[ret] = 0; - buf_off[ret] = 0; - } - } - } - else if (ret >= 0 && *mode == 'a') - { - if (buffer == (void *)NULL) /* Create space for client */ - { - tmp = malloc(0); /* Get a pointer */ - if (tmp == (void *)NULL) - { - ret = -1; - errno = EDQUOT; - } - else - { - buf[ret] = (char *)tmp; - buf_size[ret] = 0; - buf_off[ret] = 0; - } - } - else /* Client has file read in already */ - { - buf[ret] = (char *)buffer; - buf_size[ret] = size; - buf_off[ret] = 0; - } - } - else /* Some other invalid combination of parameters */ - { - ret = -1; - errno = EINVAL; - } - - if (ret != -1) - { - fds[ret] = 0; - buf_mode[ret] = *mode; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_lseek () -- -- Arguments : File descriptor, offset, whence -- -- Returns : as per man lseek (2) -- -- Description : Does the same as lseek (2) except on a memory based file. -- Note: the memory area will be extended if the caller -- attempts to seek past the current end of file (memory). -- --------------------------------------------------------------------------------- -*/ - -int mfs_lseek(int fd, int offset, int whence) -{ - int ret; - long test_off; - - if (fds[fd] == -1) /* Not open */ - { - ret = -1; - errno = EBADF; - } - else if (offset < 0 && whence == SEEK_SET) - { - ret = -1; - errno = EINVAL; - } - else - { - switch (whence) - { - case SEEK_SET: - if (offset > buf_size[fd]) - extend_mem_file(fd, offset); - buf_off[fd] = offset; - ret = offset; - break; - - case SEEK_CUR: - test_off = buf_off[fd] + offset; - - if (test_off < 0) - { - ret = -1; - errno = EINVAL; - } - else - { - if (test_off > buf_size[fd]) - extend_mem_file(fd, test_off); - buf_off[fd] = test_off; - ret = test_off; - } - break; - - case SEEK_END: - test_off = buf_size[fd] + offset; - - if (test_off < 0) - { - ret = -1; - errno = EINVAL; - } - else - { - if (test_off > buf_size[fd]) - extend_mem_file(fd, test_off); - buf_off[fd] = test_off; - ret = test_off; - } - break; - - default: - errno = EINVAL; - ret = -1; - break; - } - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_read () -- -- Arguments : File descriptor, buffer, size -- -- Returns : as per man read (2) -- -- Description : Does the same as read (2) except on a memory based file. -- Note: An attempt to read past the end of memory currently -- allocated to the file will return 0 (End Of File) -- --------------------------------------------------------------------------------- -*/ - -int mfs_read(int fd, void *clnt_buf, int size) -{ - int ret; - - if (fds[fd] == -1 || buf_mode[fd] != 'r') - { - /* File is either not open, or not opened for read */ - - ret = -1; - errno = EBADF; - } - else if (buf_off[fd] + size > buf_size[fd]) - { - ret = 0; /* EOF */ - } - else - { - memcpy(clnt_buf, (void *)(buf[fd] + buf_off[fd]), size); - buf_off[fd] = buf_off[fd] + size; - ret = size; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_write () -- -- Arguments : File descriptor, buffer, size -- -- Returns : as per man write (2) -- -- Description : Does the same as write (2) except on a memory based file. -- Note: the memory area will be extended if the caller -- attempts to write past the current end of file (memory). -- --------------------------------------------------------------------------------- -*/ - -int mfs_write(int fd, void *clnt_buf, int size) -{ - int ret; - - if (fds[fd] == -1 || buf_mode[fd] == 'r') - { - /* Either the file is not open or it is opened for reading only */ - - ret = -1; - errno = EBADF; - } - else if (buf_mode[fd] == 'w') - { - /* Write */ - - if (buf_off[fd] + size > buf_size[fd]) - { - extend_mem_file(fd, buf_off[fd] + size); - buf_size[fd] = (buf_off[fd] + size); - } - - memcpy((buf[fd] + buf_off[fd]), clnt_buf, size); - buf_off[fd] = buf_off[fd] + size; - - ret = size; - } - else - { - /* Append */ - - if (buf_off[fd] != buf_size[fd]) - buf_off[fd] = buf_size[fd]; - - extend_mem_file(fd, buf_off[fd] + size); - buf_size[fd] += size; - - memcpy((buf[fd] + buf_off[fd]), clnt_buf, size); - buf_off[fd] = buf_off[fd] + size; - - ret = size; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_size () -- -- Arguments : File descriptor -- -- Returns : integer file size -- -- Description : This function returns the current size of the file in bytes. -- --------------------------------------------------------------------------------- -*/ - -int mfs_size(int fd) -{ - int ret; - - if (fds[fd] == -1) /* Not open */ - { - ret = -1; - errno = EBADF; - } - else - ret = buf_size[fd]; - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_map () -- -- Arguments : File descriptor, ptr to address, ptr to length -- -- Returns : Map status (succeeded or otherwise) -- -- Description : This function tells the client where the file is mapped -- in memory and what size the mapped area is. It is provided -- to satisfy the MapProc function in libtiff. It pretends -- that the file has been mmap (2)ped. -- --------------------------------------------------------------------------------- -*/ - -int mfs_map(int fd, char **addr, size_t *len) -{ - int ret; - - if (fds[fd] == -1) /* Not open */ - { - ret = -1; - errno = EBADF; - } - else - { - *addr = buf[fd]; - *len = buf_size[fd]; - ret = 0; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mfs_unmap () -- -- Arguments : File descriptor -- -- Returns : UnMap status (succeeded or otherwise) -- -- Description : This function does nothing as the file is always -- in memory. -- --------------------------------------------------------------------------------- -*/ - -int mfs_unmap(int fd) { return (0); } - -/* --------------------------------------------------------------------------------- -- Function : mfs_close () -- -- Arguments : File descriptor -- -- Returns : close status (succeeded or otherwise) -- -- Description : Close the open memory file. (Make fd available again.) -- --------------------------------------------------------------------------------- -*/ - -int mfs_close(int fd) -{ - int ret; - - if (fds[fd] == -1) /* Not open */ - { - ret = -1; - errno = EBADF; - } - else - { - fds[fd] = -1; - ret = 0; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : extend_mem_file () -- -- Arguments : File descriptor, length to extend to. -- -- Returns : 0 - All OK, -1 - realloc () failed. -- -- Description : Increase the amount of memory allocated to a file. -- --------------------------------------------------------------------------------- -*/ - -static int extend_mem_file(int fd, int size) -{ - void *new_mem; - int ret; - - if ((new_mem = realloc(buf[fd], size)) == (void *)NULL) - ret = -1; - else - { - buf[fd] = (char *)new_mem; - ret = 0; - } - - return (ret); -} - -/* --------------------------------------------------------------------------------- -- Function : mem_init () -- -- Arguments : None -- -- Returns : void -- -- Description : Initialise the library. -- --------------------------------------------------------------------------------- -*/ - -static void mem_init() -{ - int i; - - for (i = 0; i < MAX_BUFFS; i++) - { - fds[i] = -1; - buf[i] = (char *)NULL; - buf_size[i] = 0; - buf_off[i] = 0; - } -} diff --git a/third_party/libtiff/contrib/pds/Makefile.am b/third_party/libtiff/contrib/pds/Makefile.am deleted file mode 100644 index c4e6baf..0000000 --- a/third_party/libtiff/contrib/pds/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - README \ - tif_imageiter.c \ - tif_imageiter.h \ - tif_pdsdirread.c \ - tif_pdsdirwrite.c diff --git a/third_party/libtiff/contrib/pds/Makefile.in b/third_party/libtiff/contrib/pds/Makefile.in deleted file mode 100644 index 0da4f24..0000000 --- a/third_party/libtiff/contrib/pds/Makefile.in +++ /dev/null @@ -1,513 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/pds -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - tif_imageiter.c \ - tif_imageiter.h \ - tif_pdsdirread.c \ - tif_pdsdirwrite.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/pds/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/pds/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/pds/README b/third_party/libtiff/contrib/pds/README deleted file mode 100644 index a36b054..0000000 --- a/third_party/libtiff/contrib/pds/README +++ /dev/null @@ -1,90 +0,0 @@ -Date: Fri, 01 Aug 1997 20:14:52 MDT -To: Sam Leffler - -From: "Conrad J. Poelman (WSAT)" -Subject: Potential TIFF library additions - -Delivery-Date: Fri, 01 Aug 1997 19:21:06 -0700 - -Sam, - -You probably don't remember me, but I sent in a couple of bug fixes -regarding the TIFF library about a 16 months ago or so... - -I just wanted to send you two other additions that I have made to our -local version of the TIFF library in hopes that you will want to -incorporate them into your next major release of the TIFF library. -(These additions are based on TIFF version 3.4beta31, but they sit on -top of the library so they shouldn't be much trouble to incorporate them -into any more recent version.) They are internally documented to a -reasonable extent and we've been successfully using them in our code -here for over a year. If you think they would make good additions to the -TIFF library, I'd be happy to clean them up more, document them more, -and/or integrate them with the latest version of the TIFF library, but I -figured I'd see if you were interested in using them before I went to -all that trouble. - -TIFF Image Iterator -------------------- -Your ReadRGBA() routine works well for reading many different formats -(TILED, STIP, compressed or not, etc.) of the most basic types of data -(RGB, 8-bit greyscale, 8-bit colormapped) into an SGI-style data array, -and serves as a good template for users with other needs. I used it as -an example of how to make an iterator which, rather than fill a data -array, calls an arbitrary user-supplied callback function for each -"chunk" of data - that "chunk" might be a strip or a tile, and might -have one sample-per-pixel or two, and might be 8-bit data or 16-bit or -24-bit. The callback function can do whatever it wants with the data - -store it in a big array, convert it to RGBA, or draw it directly to the -screen. I was able to use this iterator to read 16-bit greyscale and 32- -and 64-bit floating point data, which wasn't possible with ReadRGBA(). - -I have tested this routine with 8- and 16-bit greyscale data as well as -with 32- and 64-bit floating point data. I believe nearly all of our -data is organized in strips, so actually I'd appreciate it if you had -some tiled images that I could test it with. - -It should certainly be possible and would be cleanest to reimplement -ReadRGBA() in terms of the image iterator, but I haven't done that. - - -Private Sub-Directory Read/Write --------------------------------- -TIFF-PL is a Phillips Laboratory extension to the TIFF tags that allows -us to store satellite imaging-specific information in a TIFF format, -such as the satellite's trajectory, the imaging time, etc. In order to -give us the flexibility to modify the tag definitions without getting -approval from the TIFF committee every time, we were given only three -TIFF tags - a PL signature, a PL version number, and PL directory -offset, which lists the position in the file at which to find a private -sub-directory of tags-value pairs. So I wrote two routines: -TIFFWritePrivateDataSubDirectory(), which takes a list of tags and a -"get" function and writes the tag values into the TIFF file, returning -the offset within the file at which it wrote the directory; and -TIFFReadPrivateDataSubDirectory(), which takes an offset, a list of -tags, and a "set" function and reads all the data from the private -directory. The functions themselves are pretty simple. (The files are -huge because I had to basically copy all of the tif_dirread.c and -tif_dirwrite.c files in order to access the various fetching routines -which were all declared static and therefore inaccessible in the TIFF -library.) - - -I'm including the four source files (tif_imgiter.h, tif_imgiter.c, -tif_pdsdirread.c, tif_pdsdirwrite.c) in case you want to take a look at -them. I can also send you some sample code that uses them if you like. -If you're interested in having them incorporated into the standard TIFF -library, I'd be happy to do that integration and clean up and document -the routines. (For example, I've already realized that instead of -limiting the SEP callback function to three bands (R,G,B) it should take -an array to enable the handling of n-banded multi-spectral data...) If -not, I'll just leave them as they are, since they work fine for us now. - -Holler if you have any questions. - --- Conrad -__________________________________________________________________ - Capt Conrad J. Poelman PL/WSAT (Phillips Laboratory) - 505-846-4347 3550 Aberdeen Ave SE - (FAX) 505-846-4374 Kirtland AFB, NM 87117-5776 - diff --git a/third_party/libtiff/contrib/pds/tif_imageiter.c b/third_party/libtiff/contrib/pds/tif_imageiter.c deleted file mode 100644 index 921b023..0000000 --- a/third_party/libtiff/contrib/pds/tif_imageiter.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (c) 1991-1996 Sam Leffler - * Copyright (c) 1991-1996 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Written by Conrad J. Poelman, PL/WSAT, Kirtland AFB, NM on 26 Mar 96. - * - * This file contains code to allow a calling program to "iterate" over each - * pixels in an image as it is read from the file. The iterator takes care of - * reading strips versus (possibly clipped) tiles, decoding the information - * according to the decoding method, and so on, so that calling program can - * ignore those details. The calling program does, however, need to be - * conscious of the type of the pixel data that it is receiving. - * - * For reasons of efficiency, the callback function actually gets called for - * "blocks" of pixels rather than for individual pixels. The format of the - * callback arguments is given below. - * - * This code was taken from TIFFReadRGBAImage() in tif_getimage.c of the - * original TIFF distribution, and simplified and generalized to provide this - * general iteration capability. Those routines could certainly be - * re-implemented in terms of a TIFFImageIter if desired. - * - */ -#include "tif_imageiter.h" -#include "tiffiop.h" -#include -#include - -static int gtTileContig(TIFFImageIter *, void *udata, uint32_t, uint32_t); -static int gtTileSeparate(TIFFImageIter *, void *udata, uint32_t, uint32_t); -static int gtStripContig(TIFFImageIter *, void *udata, uint32_t, uint32_t); -static int gtStripSeparate(TIFFImageIter *, void *udata, uint32_t, uint32_t); - -static const char photoTag[] = "PhotometricInterpretation"; - -static int isCCITTCompression(TIFF *tif) -{ - uint16_t compress; - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress); - return (compress == COMPRESSION_CCITTFAX3 || - compress == COMPRESSION_CCITTFAX4 || - compress == COMPRESSION_CCITTRLE || - compress == COMPRESSION_CCITTRLEW); -} - -int TIFFImageIterBegin(TIFFImageIter *img, TIFF *tif, int stop, char emsg[1024]) -{ - uint16_t *sampleinfo; - uint16_t extrasamples; - uint16_t planarconfig; - int colorchannels; - - img->tif = tif; - img->stoponerr = stop; - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample); - img->alpha = 0; - TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel); - TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, - &sampleinfo); - if (extrasamples == 1) - switch (sampleinfo[0]) - { - case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */ - case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */ - img->alpha = sampleinfo[0]; - break; - } - colorchannels = img->samplesperpixel - extrasamples; - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig); - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) - { - switch (colorchannels) - { - case 1: - if (isCCITTCompression(tif)) - img->photometric = PHOTOMETRIC_MINISWHITE; - else - img->photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - img->photometric = PHOTOMETRIC_RGB; - break; - default: - sprintf(emsg, "Missing needed %s tag", photoTag); - return (0); - } - } - switch (img->photometric) - { - case PHOTOMETRIC_PALETTE: - if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &img->redcmap, - &img->greencmap, &img->bluecmap)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Missing required \"Colormap\" tag"); - return (0); - } - /* fall through... */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - /* This should work now so skip the check - BSR - if (planarconfig == PLANARCONFIG_CONTIG && - img->samplesperpixel != 1) { sprintf(emsg, "Sorry, can not handle - contiguous data with %s=%d, and %s=%d", photoTag, - img->photometric, "Samples/pixel", img->samplesperpixel); return - (0); - } - */ - break; - case PHOTOMETRIC_YCBCR: - if (planarconfig != PLANARCONFIG_CONTIG) - { - sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d", - "Planarconfiguration", planarconfig); - return (0); - } - /* It would probably be nice to have a reality check here. */ - { - uint16_t compress; - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress); - if (compress == COMPRESSION_JPEG && - planarconfig == PLANARCONFIG_CONTIG) - { - /* can rely on libjpeg to convert to RGB */ - /* XXX should restore current state on exit */ - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - img->photometric = PHOTOMETRIC_RGB; - } - } - break; - case PHOTOMETRIC_RGB: - if (colorchannels < 3) - { - sprintf(emsg, "Sorry, can not handle RGB image with %s=%d", - "Color channels", colorchannels); - return (0); - } - break; - case PHOTOMETRIC_SEPARATED: - { - uint16_t inkset; - TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset); - if (inkset != INKSET_CMYK) - { - sprintf(emsg, - "Sorry, can not handle separated image with %s=%d", - "InkSet", inkset); - return (0); - } - if (img->samplesperpixel != 4) - { - sprintf(emsg, - "Sorry, can not handle separated image with %s=%d", - "Samples/pixel", img->samplesperpixel); - return (0); - } - break; - } - default: - sprintf(emsg, "Sorry, can not handle image with %s=%d", photoTag, - img->photometric); - return (0); - } - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height); - - TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation); - switch (img->orientation) - { - case ORIENTATION_BOTRIGHT: - case ORIENTATION_RIGHTBOT: /* XXX */ - case ORIENTATION_LEFTBOT: /* XXX */ - TIFFWarning(TIFFFileName(tif), "using bottom-left orientation"); - img->orientation = ORIENTATION_BOTLEFT; - /* fall through... */ - case ORIENTATION_BOTLEFT: - break; - case ORIENTATION_TOPRIGHT: - case ORIENTATION_RIGHTTOP: /* XXX */ - case ORIENTATION_LEFTTOP: /* XXX */ - default: - TIFFWarning(TIFFFileName(tif), "using top-left orientation"); - img->orientation = ORIENTATION_TOPLEFT; - /* fall through... */ - case ORIENTATION_TOPLEFT: - break; - } - - img->isContig = - !(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1); - if (img->isContig) - { - img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig; - } - else - { - img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate; - } - return (1); -} - -int TIFFImageIterGet(TIFFImageIter *img, void *udata, uint32_t w, uint32_t h) -{ - if (img->get == NULL) - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "No \"get\" routine setup"); - return (0); - } - if (img->callback.any == NULL) - { - TIFFErrorExtR( - img->tif, TIFFFileName(img->tif), - "No \"put\" routine setupl; probably can not handle image format"); - return (0); - } - return (*img->get)(img, udata, w, h); -} - -TIFFImageIterEnd(TIFFImageIter *img) -{ /* Nothing to free... ? */ -} - -/* - * Read the specified image into an ABGR-format raster. - */ -int TIFFReadImageIter(TIFF *tif, uint32_t rwidth, uint32_t rheight, - uint8_t *raster, int stop) -{ - char emsg[1024]; - TIFFImageIter img; - int ok; - - if (TIFFImageIterBegin(&img, tif, stop, emsg)) - { - /* XXX verify rwidth and rheight against width and height */ - ok = TIFFImageIterGet(&img, raster, rwidth, img.height); - TIFFImageIterEnd(&img); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), emsg); - ok = 0; - } - return (ok); -} - -/* - * Get an tile-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int gtTileContig(TIFFImageIter *img, void *udata, uint32_t w, uint32_t h) -{ - TIFF *tif = img->tif; - ImageIterTileContigRoutine callback = img->callback.contig; - uint16_t orientation; - uint32_t col, row; - uint32_t tw, th; - u_char *buf; - int32_t fromskew; - uint32_t nrow; - - buf = (u_char *)_TIFFmalloc(TIFFTileSize(tif)); - if (buf == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for tile buffer"); - return (0); - } - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - orientation = img->orientation; - for (row = 0; row < h; row += th) - { - nrow = (row + th > h ? h - row : th); - for (col = 0; col < w; col += tw) - { - if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0 && img->stoponerr) - break; - if (col + tw > w) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - uint32_t npix = w - col; - fromskew = tw - npix; - (*callback)(img, udata, col, row, npix, nrow, fromskew, buf); - } - else - { - (*callback)(img, udata, col, row, tw, nrow, 0, buf); - } - } - } - _TIFFfree(buf); - return (1); -} - -/* - * Get an tile-organized image that has - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int gtTileSeparate(TIFFImageIter *img, void *udata, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - ImageIterTileSeparateRoutine callback = img->callback.separate; - uint16_t orientation; - uint32_t col, row; - uint32_t tw, th; - u_char *buf; - u_char *r; - u_char *g; - u_char *b; - u_char *a; - tsize_t tilesize; - int32_t fromskew; - int alpha = img->alpha; - uint32_t nrow; - - tilesize = TIFFTileSize(tif); - buf = (u_char *)_TIFFmalloc(4 * tilesize); - if (buf == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for tile buffer"); - return (0); - } - r = buf; - g = r + tilesize; - b = g + tilesize; - a = b + tilesize; - if (!alpha) - memset(a, 0xff, tilesize); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - orientation = img->orientation; - for (row = 0; row < h; row += th) - { - nrow = (row + th > h ? h - row : th); - for (col = 0; col < w; col += tw) - { - if (TIFFReadTile(tif, r, col, row, 0, 0) < 0 && img->stoponerr) - break; - if (TIFFReadTile(tif, g, col, row, 0, 1) < 0 && img->stoponerr) - break; - if (TIFFReadTile(tif, b, col, row, 0, 2) < 0 && img->stoponerr) - break; - if (alpha && TIFFReadTile(tif, a, col, row, 0, 3) < 0 && - img->stoponerr) - break; - if (col + tw > w) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - uint32_t npix = w - col; - fromskew = tw - npix; - (*callback)(img, udata, col, row, npix, nrow, fromskew, r, g, b, - a); - } - else - { - (*callback)(img, udata, col, row, tw, nrow, 0, r, g, b, a); - } - } - } - _TIFFfree(buf); - return (1); -} - -/* - * Get a strip-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int gtStripContig(TIFFImageIter *img, void *udata, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - ImageIterTileContigRoutine callback = img->callback.contig; - uint16_t orientation; - uint32_t row, nrow; - u_char *buf; - uint32_t rowsperstrip; - uint32_t imagewidth = img->width; - tsize_t scanline; - int32_t fromskew; - - buf = (u_char *)_TIFFmalloc(TIFFStripSize(tif)); - if (buf == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for strip buffer"); - return (0); - } - orientation = img->orientation; - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += rowsperstrip) - { - nrow = (row + rowsperstrip > h ? h - row : rowsperstrip); - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0), buf, - nrow * scanline) < 0 && - img->stoponerr) - break; - (*callback)(img, udata, 0, row, w, nrow, fromskew, buf); - } - _TIFFfree(buf); - return (1); -} - -/* - * Get a strip-organized image with - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int gtStripSeparate(TIFFImageIter *img, void *udata, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - ImageIterTileSeparateRoutine callback = img->callback.separate; - uint16_t orientation; - u_char *buf; - u_char *r, *g, *b, *a; - uint32_t row, nrow; - tsize_t scanline; - uint32_t rowsperstrip; - uint32_t imagewidth = img->width; - tsize_t stripsize; - int32_t fromskew; - int alpha = img->alpha; - - stripsize = TIFFStripSize(tif); - r = buf = (u_char *)_TIFFmalloc(4 * stripsize); - if (buf == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for tile buffer"); - return (0); - } - g = r + stripsize; - b = g + stripsize; - a = b + stripsize; - if (!alpha) - memset(a, 0xff, stripsize); - orientation = img->orientation; - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += rowsperstrip) - { - nrow = (row + rowsperstrip > h ? h - row : rowsperstrip); - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0), r, - nrow * scanline) < 0 && - img->stoponerr) - break; - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 1), g, - nrow * scanline) < 0 && - img->stoponerr) - break; - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 2), b, - nrow * scanline) < 0 && - img->stoponerr) - break; - if (alpha && (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 3), - a, nrow * scanline) < 0 && - img->stoponerr)) - break; - (*callback)(img, udata, 0, row, w, nrow, fromskew, r, g, b, a); - } - _TIFFfree(buf); - return (1); -} - -DECLAREContigCallbackFunc(TestContigCallback) -{ - printf("Contig Callback called with x = %d, y = %d, w = %d, h = %d, " - "fromskew = %d\n", - x, y, w, h, fromskew); -} - -DECLARESepCallbackFunc(TestSepCallback) -{ - printf("Sep Callback called with x = %d, y = %d, w = %d, h = %d, fromskew " - "= %d\n", - x, y, w, h, fromskew); -} - -#ifdef MAIN -main(int argc, char **argv) -{ - char emsg[1024]; - TIFFImageIter img; - int ok; - int stop = 1; - - TIFF *tif; - unsigned long nx, ny; - unsigned short BitsPerSample, SamplesPerPixel; - int isColorMapped, isPliFile; - unsigned char *ColorMap; - unsigned char *data; - - if (argc < 2) - { - fprintf(stderr, "usage: %s tiff_file\n", argv[0]); - exit(1); - } - tif = (TIFF *)PLIGetImage(argv[1], (void *)&data, &ColorMap, &nx, &ny, - &BitsPerSample, &SamplesPerPixel, &isColorMapped, - &isPliFile); - if (tif != NULL) - { - - if (TIFFImageIterBegin(&img, tif, stop, emsg)) - { - /* Here need to set data and callback function! */ - if (img.isContig) - { - img.callback = TestContigCallback; - } - else - { - img.callback = TestSepCallback; - } - ok = TIFFImageIterGet(&img, NULL, img.width, img.height); - TIFFImageIterEnd(&img); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), emsg); - } - } -} -#endif diff --git a/third_party/libtiff/contrib/pds/tif_imageiter.h b/third_party/libtiff/contrib/pds/tif_imageiter.h deleted file mode 100644 index 75f3a6f..0000000 --- a/third_party/libtiff/contrib/pds/tif_imageiter.h +++ /dev/null @@ -1,52 +0,0 @@ -typedef struct _TIFFImageIter TIFFImageIter; - -/* The callback function is called for each "block" of image pixel data after - it has been read from the file and decoded. This image pixel data is in the - buffer pp, and this data represents the image pixels from (x,y) to - (x+w,y+h). It is stored in pixel format, so each pixel contains - img->samplesperpixel consecutive samples each containing img->bitspersample - bits of data. The array pp is ordered in h consecutive rows of w+fromskew - pixels each. */ -typedef void (*ImageIterTileContigRoutine)(TIFFImageIter *, void *, uint32_t, - uint32_t, uint32_t, uint32_t, - int32_t, unsigned char *); -#define DECLAREContigCallbackFunc(name) \ - static void name(TIFFImageIter *img, void *user_data, uint32_t x, \ - uint32_t y, uint32_t w, uint32_t h, int32_t fromskew, \ - u_char *pp) - -typedef void (*ImageIterTileSeparateRoutine)(TIFFImageIter *, void *, uint32_t, - uint32_t, uint32_t, uint32_t, - int32_t, unsigned char *, - unsigned char *, unsigned char *, - unsigned char *); -#define DECLARESepCallbackFunc(name) \ - static void name(TIFFImageIter *img, void *user_data, uint32_t x, \ - uint32_t y, uint32_t w, uint32_t h, int32_t fromskew, \ - u_char *r, u_char *g, u_char *b, u_char *a) - -struct _TIFFImageIter -{ - TIFF *tif; /* image handle */ - int stoponerr; /* stop on read error */ - int isContig; /* data is packed/separate */ - int alpha; /* type of alpha data present */ - uint32_t width; /* image width */ - uint32_t height; /* image height */ - uint16_t bitspersample; /* image bits/sample */ - uint16_t samplesperpixel; /* image samples/pixel */ - uint16_t orientation; /* image orientation */ - uint16_t photometric; /* image photometric interp */ - uint16_t *redcmap; /* colormap palette */ - uint16_t *greencmap; - uint16_t *bluecmap; - /* get image data routine */ - int (*get)(TIFFImageIter *, void *udata, uint32_t, uint32_t); - union - { - void (*any)(TIFFImageIter *); - ImageIterTileContigRoutine contig; - ImageIterTileSeparateRoutine separate; - } callback; /* fn to exec for each block */ -}; - diff --git a/third_party/libtiff/contrib/pds/tif_pdsdirread.c b/third_party/libtiff/contrib/pds/tif_pdsdirread.c deleted file mode 100644 index 653141d..0000000 --- a/third_party/libtiff/contrib/pds/tif_pdsdirread.c +++ /dev/null @@ -1,1210 +0,0 @@ -/* - * Copyright (c) 1988-1996 Sam Leffler - * Copyright (c) 1991-1996 Silicon Graphics, Inc. - * Copyright (c( 1996 USAF Phillips Laboratory - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * These routines written by Conrad J. Poelman on a single late-night of - * March 20-21, 1996. - * - * The entire purpose of this file is to provide a single external function, - * TIFFReadPrivateDataSubDirectory(). This function is intended for use in - * reading a private subdirectory from a TIFF file into a private structure. The - * actual writing of data into the structure is handled by the setFieldFn(), - * which is passed to TIFFReadPrivateDataSubDirectory() as a parameter. The idea - * is to enable any application wishing to store private subdirectories to do so - * easily using this function, without modifying the TIFF library. - * - * The astute observer will notice that only two functions are at all different - * from the original tif_dirread.c file: TIFFReadPrivateDataSubDirectory() and - * TIFFFetchNormalSubTag(). All the other stuff that makes this file so huge - * is only necessary because all of those functions are declared static in - * tif_dirread.c, so we have to totally duplicate them in order to use them. - * - * Oh, also note the bug fix in TIFFFetchFloat(). - * - */ - -#include "tiffiop.h" - -#define IGNORE 0 /* tag placeholder used below */ - -#if HAVE_IEEEFP -#define TIFFCvtIEEEFloatToNative(tif, n, fp) -#define TIFFCvtIEEEDoubleToNative(tif, n, dp) -#else -extern void TIFFCvtIEEEFloatToNative(TIFF *, uint32_t, float *); -extern void TIFFCvtIEEEDoubleToNative(TIFF *, uint32_t, double *); -#endif - -static void EstimateStripByteCounts(TIFF *, TIFFDirEntry *, uint16_t); -static void MissingRequired(TIFF *, const char *); -static int CheckDirCount(TIFF *, TIFFDirEntry *, uint32_t); -static tsize_t TIFFFetchData(TIFF *, TIFFDirEntry *, char *); -static tsize_t TIFFFetchString(TIFF *, TIFFDirEntry *, char *); -static float TIFFFetchRational(TIFF *, TIFFDirEntry *); -static int TIFFFetchNormalSubTag(TIFF *, TIFFDirEntry *, const TIFFFieldInfo *, - int (*getFieldFn)(TIFF *tif, ttag_t tag, ...)); -static int TIFFFetchPerSampleShorts(TIFF *, TIFFDirEntry *, int *); -static int TIFFFetchPerSampleAnys(TIFF *, TIFFDirEntry *, double *); -static int TIFFFetchShortArray(TIFF *, TIFFDirEntry *, uint16_t *); -static int TIFFFetchStripThing(TIFF *, TIFFDirEntry *, long, uint32_t **); -static int TIFFFetchExtraSamples(TIFF *, TIFFDirEntry *); -static int TIFFFetchRefBlackWhite(TIFF *, TIFFDirEntry *); -static float TIFFFetchFloat(TIFF *, TIFFDirEntry *); -static int TIFFFetchFloatArray(TIFF *, TIFFDirEntry *, float *); -static int TIFFFetchDoubleArray(TIFF *, TIFFDirEntry *, double *); -static int TIFFFetchAnyArray(TIFF *, TIFFDirEntry *, double *); -static int TIFFFetchShortPair(TIFF *, TIFFDirEntry *); -#if STRIPCHOP_SUPPORT -static void ChopUpSingleUncompressedStrip(TIFF *); -#endif - -static char *CheckMalloc(TIFF *tif, tsize_t n, const char *what) -{ - char *cp = (char *)_TIFFmalloc(n); - if (cp == NULL) - TIFFErrorExtR(tif, tif->tif_name, "No space %s", what); - return (cp); -} - -/* Just as was done with TIFFWritePrivateDataSubDirectory(), here we implement - TIFFReadPrivateDataSubDirectory() which takes an offset into the TIFF file, - a TIFFFieldInfo structure specifying the types of the various tags, - and a function to use to set individual tags when they are encountered. - The data is read from the file, translated using the TIFF library's - built-in machine-independent conversion functions, and filled into - private subdirectory structure. - - This code was written by copying the original TIFFReadDirectory() function - from tif_dirread.c and paring it down to what is needed for this. - - It is the caller's responsibility to allocate and initialize the internal - structure that setFieldFn() will be writing into. If this function is being - called more than once before closing the file, the caller also must be - careful to free data in the structure before re-initializing. - - It is also the caller's responsibility to verify the presence of - any required fields after reading the directory in. -*/ - -int TIFFReadPrivateDataSubDirectory(TIFF *tif, toff_t pdir_offset, - TIFFFieldInfo *field_info, - int (*setFieldFn)(TIFF *tif, ttag_t tag, - ...)) -{ - register TIFFDirEntry *dp; - register int n; - register TIFFDirectory *td; - TIFFDirEntry *dir; - int iv; - long v; - double dv; - const TIFFFieldInfo *fip; - int fix; - uint16_t dircount; - uint32_t nextdiroff; - char *cp; - int diroutoforderwarning = 0; - - /* Skipped part about checking for directories or compression data. */ - - if (!isMapped(tif)) - { - if (!SeekOK(tif, pdir_offset)) - { - TIFFErrorExtR(tif, tif->tif_name, - "Seek error accessing TIFF private subdirectory"); - return (0); - } - if (!ReadOK(tif, &dircount, sizeof(uint16_t))) - { - TIFFErrorExtR(tif, tif->tif_name, - "Can not read TIFF private subdirectory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - dir = (TIFFDirEntry *)CheckMalloc(tif, dircount * sizeof(TIFFDirEntry), - "to read TIFF private subdirectory"); - if (dir == NULL) - return (0); - if (!ReadOK(tif, dir, dircount * sizeof(TIFFDirEntry))) - { - TIFFErrorExtR(tif, tif->tif_name, - "Can not read TIFF private subdirectory"); - goto bad; - } - /* - * Read offset to next directory for sequential scans. - */ - (void)ReadOK(tif, &nextdiroff, sizeof(uint32_t)); - } - else - { - toff_t off = pdir_offset; - - if (off + sizeof(short) > tif->tif_size) - { - TIFFErrorExtR(tif, tif->tif_name, - "Can not read TIFF private subdirectory count"); - return (0); - } - else - _TIFFmemcpy(&dircount, tif->tif_base + off, sizeof(uint16_t)); - off += sizeof(uint16_t); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - dir = (TIFFDirEntry *)CheckMalloc(tif, dircount * sizeof(TIFFDirEntry), - "to read TIFF private subdirectory"); - if (dir == NULL) - return (0); - if (off + dircount * sizeof(TIFFDirEntry) > tif->tif_size) - { - TIFFErrorExtR(tif, tif->tif_name, - "Can not read TIFF private subdirectory"); - goto bad; - } - else - _TIFFmemcpy(dir, tif->tif_base + off, - dircount * sizeof(TIFFDirEntry)); - off += dircount * sizeof(TIFFDirEntry); - if (off + sizeof(uint32_t) < tif->tif_size) - _TIFFmemcpy(&nextdiroff, tif->tif_base + off, sizeof(uint32_t)); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdiroff); - - /* - * Setup default value and then make a pass over - * the fields to check type and tag information, - * and to extract info required to size data - * structures. A second pass is made afterwards - * to read in everything not taken in the first pass. - */ - td = &tif->tif_dir; - - for (fip = field_info, dp = dir, n = dircount; n > 0; n--, dp++) - { - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabArrayOfShort(&dp->tdir_tag, 2); - TIFFSwabArrayOfLong(&dp->tdir_count, 2); - } - /* - * Find the field information entry for this tag. - */ - /* - * Silicon Beach (at least) writes unordered - * directory tags (violating the spec). Handle - * it here, but be obnoxious (maybe they'll fix it?). - */ - if (dp->tdir_tag < fip->field_tag) - { - if (!diroutoforderwarning) - { - TIFFWarning(tif->tif_name, - "invalid TIFF private subdirectory; tags are not " - "sorted in ascending order"); - diroutoforderwarning = 1; - } - fip = field_info; /* O(n^2) */ - } - - while (fip->field_tag && fip->field_tag < dp->tdir_tag) - fip++; - if (!fip->field_tag || fip->field_tag != dp->tdir_tag) - { - TIFFWarning(tif->tif_name, - "unknown field with tag %d (0x%x) in private " - "subdirectory ignored", - dp->tdir_tag, dp->tdir_tag); - dp->tdir_tag = IGNORE; - fip = field_info; /* restart search */ - continue; - } - /* - * Null out old tags that we ignore. - */ - - /* Not implemented yet, since FIELD_IGNORE is specific to - the main directories. Could pass this in too... */ - if (0 /* && fip->field_bit == FIELD_IGNORE */) - { - ignore: - dp->tdir_tag = IGNORE; - continue; - } - - /* - * Check data type. - */ - - while (dp->tdir_type != (u_short)fip->field_type) - { - if (fip->field_type == TIFF_ANY) /* wildcard */ - break; - fip++; - if (!fip->field_tag || fip->field_tag != dp->tdir_tag) - { - TIFFWarning(tif->tif_name, - "wrong data type %d for \"%s\"; tag ignored", - dp->tdir_type, fip[-1].field_name); - goto ignore; - } - } - /* - * Check count if known in advance. - */ - if (fip->field_readcount != TIFF_VARIABLE) - { - uint32_t expected = (fip->field_readcount == TIFF_SPP) - ? (uint32_t)td->td_samplesperpixel - : (uint32_t)fip->field_readcount; - if (!CheckDirCount(tif, dp, expected)) - goto ignore; - } - - /* Now read in and process data from field. */ - if (!TIFFFetchNormalSubTag(tif, dp, fip, setFieldFn)) - goto bad; - } - - if (dir) - _TIFFfree(dir); - return (1); -bad: - if (dir) - _TIFFfree(dir); - return (0); -} - -static void EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount) -{ - register TIFFDirEntry *dp; - register TIFFDirectory *td = &tif->tif_dir; - uint16_t i; - - if (td->td_stripbytecount) - _TIFFfree(td->td_stripbytecount); - td->td_stripbytecount = - (uint32_t *)CheckMalloc(tif, td->td_nstrips * sizeof(uint32_t), - "for \"StripByteCounts\" array"); - if (td->td_compression != COMPRESSION_NONE) - { - uint32_t space = - (uint32_t)(sizeof(TIFFHeader) + sizeof(uint16_t) + - (dircount * sizeof(TIFFDirEntry)) + sizeof(uint32_t)); - toff_t filesize = TIFFGetFileSize(tif); - uint16_t n; - - /* calculate amount of space used by indirect values */ - for (dp = dir, n = dircount; n > 0; n--, dp++) - { - uint32_t cc = dp->tdir_count * TIFFDataWidth(dp->tdir_type); - if (cc > sizeof(uint32_t)) - space += cc; - } - space = (filesize - space) / td->td_samplesperpixel; - for (i = 0; i < td->td_nstrips; i++) - td->td_stripbytecount[i] = space; - /* - * This gross hack handles the case were the offset to - * the last strip is past the place where we think the strip - * should begin. Since a strip of data must be contiguous, - * it's safe to assume that we've overestimated the amount - * of data in the strip and trim this number back accordingly. - */ - i--; - if (td->td_stripoffset[i] + td->td_stripbytecount[i] > filesize) - td->td_stripbytecount[i] = filesize - td->td_stripoffset[i]; - } - else - { - uint32_t rowbytes = TIFFScanlineSize(tif); - uint32_t rowsperstrip = td->td_imagelength / td->td_nstrips; - for (i = 0; i < td->td_nstrips; i++) - td->td_stripbytecount[i] = rowbytes * rowsperstrip; - } - TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); - if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) - td->td_rowsperstrip = td->td_imagelength; -} - -static void MissingRequired(TIFF *tif, const char *tagname) -{ - TIFFErrorExtR(tif, tif->tif_name, - "TIFF directory is missing required \"%s\" field", tagname); -} - -/* - * Check the count field of a directory - * entry against a known value. The caller - * is expected to skip/ignore the tag if - * there is a mismatch. - */ -static int CheckDirCount(TIFF *tif, TIFFDirEntry *dir, uint32_t count) -{ - if (count != dir->tdir_count) - { - TIFFWarning(tif->tif_name, - "incorrect count for field \"%s\" (%lu, expecting %lu); " - "tag ignored", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, - dir->tdir_count, count); - return (0); - } - return (1); -} - -/* - * Fetch a contiguous directory item. - */ -static tsize_t TIFFFetchData(TIFF *tif, TIFFDirEntry *dir, char *cp) -{ - int w = TIFFDataWidth(dir->tdir_type); - tsize_t cc = dir->tdir_count * w; - - if (!isMapped(tif)) - { - if (!SeekOK(tif, dir->tdir_offset)) - goto bad; - if (!ReadOK(tif, cp, cc)) - goto bad; - } - else - { - if (dir->tdir_offset + cc > tif->tif_size) - goto bad; - _TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc); - } - if (tif->tif_flags & TIFF_SWAB) - { - switch (dir->tdir_type) - { - case TIFF_SHORT: - case TIFF_SSHORT: - TIFFSwabArrayOfShort((uint16_t *)cp, dir->tdir_count); - break; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - TIFFSwabArrayOfLong((uint32_t *)cp, dir->tdir_count); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - TIFFSwabArrayOfLong((uint32_t *)cp, 2 * dir->tdir_count); - break; - case TIFF_DOUBLE: - TIFFSwabArrayOfDouble((double *)cp, dir->tdir_count); - break; - } - } - return (cc); -bad: - TIFFErrorExtR(tif, tif->tif_name, "Error fetching data for field \"%s\"", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); - return ((tsize_t)0); -} - -/* - * Fetch an ASCII item from the file. - */ -static tsize_t TIFFFetchString(TIFF *tif, TIFFDirEntry *dir, char *cp) -{ - if (dir->tdir_count <= 4) - { - uint32_t l = dir->tdir_offset; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&l); - _TIFFmemcpy(cp, &l, dir->tdir_count); - return (1); - } - return (TIFFFetchData(tif, dir, cp)); -} - -/* - * Convert numerator+denominator to float. - */ -static int cvtRational(TIFF *tif, TIFFDirEntry *dir, uint32_t num, - uint32_t denom, float *rv) -{ - if (denom == 0) - { - TIFFErrorExtR(tif, tif->tif_name, - "%s: Rational with zero denominator (num = %lu)", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num); - return (0); - } - else - { - if (dir->tdir_type == TIFF_RATIONAL) - *rv = ((float)num / (float)denom); - else - *rv = ((float)(int32_t)num / (float)(int32_t)denom); - return (1); - } -} - -/* - * Fetch a rational item from the file - * at offset off and return the value - * as a floating point number. - */ -static float TIFFFetchRational(TIFF *tif, TIFFDirEntry *dir) -{ - uint32_t l[2]; - float v; - - return (!TIFFFetchData(tif, dir, (char *)l) || - !cvtRational(tif, dir, l[0], l[1], &v) - ? 1.0f - : v); -} - -/* - * Fetch a single floating point value - * from the offset field and return it - * as a native float. - */ -static float TIFFFetchFloat(TIFF *tif, TIFFDirEntry *dir) -{ - /* This appears to be a flagrant bug in the TIFF library, yet I - actually don't understand how it could have ever worked the old - way. Look at the comments in my new code and you'll understand. */ -#if (0) - float v = (float)TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset); - TIFFCvtIEEEFloatToNative(tif, 1, &v); -#else - float v; - /* This is a little bit tricky - if we just cast the uint32_t to a float, - C will perform a numerical conversion, which is not what we want. - We want to take the actual bit pattern in the uint32_t and interpret - it as a float. Thus we cast a uint32_t * into a float * and then - dereference to get v. */ - uint32_t l = - (uint32_t)TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset); - v = *(float *)&l; - TIFFCvtIEEEFloatToNative(tif, 1, &v); -#endif - return (v); -} - -/* - * Fetch an array of BYTE or SBYTE values. - */ -static int TIFFFetchByteArray(TIFF *tif, TIFFDirEntry *dir, uint16_t *v) -{ - if (dir->tdir_count <= 4) - { - /* - * Extract data from offset field. - */ - if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) - { - switch (dir->tdir_count) - { - case 4: - v[3] = dir->tdir_offset & 0xff; - case 3: - v[2] = (dir->tdir_offset >> 8) & 0xff; - case 2: - v[1] = (dir->tdir_offset >> 16) & 0xff; - case 1: - v[0] = dir->tdir_offset >> 24; - } - } - else - { - switch (dir->tdir_count) - { - case 4: - v[3] = dir->tdir_offset >> 24; - case 3: - v[2] = (dir->tdir_offset >> 16) & 0xff; - case 2: - v[1] = (dir->tdir_offset >> 8) & 0xff; - case 1: - v[0] = dir->tdir_offset & 0xff; - } - } - return (1); - } - else - return (TIFFFetchData(tif, dir, (char *)v) != 0); /* XXX */ -} - -/* - * Fetch an array of SHORT or SSHORT values. - */ -static int TIFFFetchShortArray(TIFF *tif, TIFFDirEntry *dir, uint16_t *v) -{ - if (dir->tdir_count <= 2) - { - if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) - { - switch (dir->tdir_count) - { - case 2: - v[1] = dir->tdir_offset & 0xffff; - case 1: - v[0] = dir->tdir_offset >> 16; - } - } - else - { - switch (dir->tdir_count) - { - case 2: - v[1] = dir->tdir_offset >> 16; - case 1: - v[0] = dir->tdir_offset & 0xffff; - } - } - return (1); - } - else - return (TIFFFetchData(tif, dir, (char *)v) != 0); -} - -/* - * Fetch a pair of SHORT or BYTE values. - */ -static int TIFFFetchShortPair(TIFF *tif, TIFFDirEntry *dir) -{ - uint16_t v[2]; - int ok = 0; - - switch (dir->tdir_type) - { - case TIFF_SHORT: - case TIFF_SSHORT: - ok = TIFFFetchShortArray(tif, dir, v); - break; - case TIFF_BYTE: - case TIFF_SBYTE: - ok = TIFFFetchByteArray(tif, dir, v); - break; - } - if (ok) - TIFFSetField(tif, dir->tdir_tag, v[0], v[1]); - return (ok); -} - -/* - * Fetch an array of LONG or SLONG values. - */ -static int TIFFFetchLongArray(TIFF *tif, TIFFDirEntry *dir, uint32_t *v) -{ - if (dir->tdir_count == 1) - { - v[0] = dir->tdir_offset; - return (1); - } - else - return (TIFFFetchData(tif, dir, (char *)v) != 0); -} - -/* - * Fetch an array of RATIONAL or SRATIONAL values. - */ -static int TIFFFetchRationalArray(TIFF *tif, TIFFDirEntry *dir, float *v) -{ - int ok = 0; - uint32_t *l; - - l = (uint32_t *)CheckMalloc(tif, - dir->tdir_count * TIFFDataWidth(dir->tdir_type), - "to fetch array of rationals"); - if (l) - { - if (TIFFFetchData(tif, dir, (char *)l)) - { - uint32_t i; - for (i = 0; i < dir->tdir_count; i++) - { - ok = cvtRational(tif, dir, l[2 * i + 0], l[2 * i + 1], &v[i]); - if (!ok) - break; - } - } - _TIFFfree((char *)l); - } - return (ok); -} - -/* - * Fetch an array of FLOAT values. - */ -static int TIFFFetchFloatArray(TIFF *tif, TIFFDirEntry *dir, float *v) -{ - - if (dir->tdir_count == 1) - { - v[0] = *(float *)&dir->tdir_offset; - TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v); - return (1); - } - else if (TIFFFetchData(tif, dir, (char *)v)) - { - TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v); - return (1); - } - else - return (0); -} - -/* - * Fetch an array of DOUBLE values. - */ -static int TIFFFetchDoubleArray(TIFF *tif, TIFFDirEntry *dir, double *v) -{ - if (TIFFFetchData(tif, dir, (char *)v)) - { - TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v); - return (1); - } - else - return (0); -} - -/* - * Fetch an array of ANY values. The actual values are - * returned as doubles which should be able hold all the - * types. Yes, there really should be an tany_t to avoid - * this potential non-portability ... Note in particular - * that we assume that the double return value vector is - * large enough to read in any fundamental type. We use - * that vector as a buffer to read in the base type vector - * and then convert it in place to double (from end - * to front of course). - */ -static int TIFFFetchAnyArray(TIFF *tif, TIFFDirEntry *dir, double *v) -{ - int i; - - switch (dir->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - if (!TIFFFetchByteArray(tif, dir, (uint16_t *)v)) - return (0); - if (dir->tdir_type == TIFF_BYTE) - { - uint16_t *vp = (uint16_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - else - { - int16_t *vp = (int16_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - break; - case TIFF_SHORT: - case TIFF_SSHORT: - if (!TIFFFetchShortArray(tif, dir, (uint16_t *)v)) - return (0); - if (dir->tdir_type == TIFF_SHORT) - { - uint16_t *vp = (uint16_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - else - { - int16_t *vp = (int16_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - break; - case TIFF_LONG: - case TIFF_SLONG: - if (!TIFFFetchLongArray(tif, dir, (uint32_t *)v)) - return (0); - if (dir->tdir_type == TIFF_LONG) - { - uint32_t *vp = (uint32_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - else - { - int32_t *vp = (int32_t *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - if (!TIFFFetchRationalArray(tif, dir, (float *)v)) - return (0); - { - float *vp = (float *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - break; - case TIFF_FLOAT: - if (!TIFFFetchFloatArray(tif, dir, (float *)v)) - return (0); - { - float *vp = (float *)v; - for (i = dir->tdir_count - 1; i >= 0; i--) - v[i] = vp[i]; - } - break; - case TIFF_DOUBLE: - return (TIFFFetchDoubleArray(tif, dir, (double *)v)); - default: - /* TIFF_NOTYPE */ - /* TIFF_ASCII */ - /* TIFF_UNDEFINED */ - TIFFErrorExtR(tif, tif->tif_name, - "Cannot read TIFF_ANY type %d for field \"%s\"", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); - return (0); - } - return (1); -} - -/* - * Fetch a tag that is not handled by special case code. - */ -/* The standard function TIFFFetchNormalTag() could definitely be replaced - with a simple call to this function, just adding TIFFSetField() as the - last argument. */ -static int TIFFFetchNormalSubTag(TIFF *tif, TIFFDirEntry *dp, - const TIFFFieldInfo *fip, - int (*setFieldFn)(TIFF *tif, ttag_t tag, ...)) -{ - static char mesg[] = "to fetch tag value"; - int ok = 0; - - if (dp->tdir_count > 1) - { /* array of values */ - char *cp = NULL; - - switch (dp->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - /* NB: always expand BYTE values to shorts */ - cp = CheckMalloc(tif, dp->tdir_count * sizeof(uint16_t), mesg); - ok = cp && TIFFFetchByteArray(tif, dp, (uint16_t *)cp); - break; - case TIFF_SHORT: - case TIFF_SSHORT: - cp = CheckMalloc(tif, dp->tdir_count * sizeof(uint16_t), mesg); - ok = cp && TIFFFetchShortArray(tif, dp, (uint16_t *)cp); - break; - case TIFF_LONG: - case TIFF_SLONG: - cp = CheckMalloc(tif, dp->tdir_count * sizeof(uint32_t), mesg); - ok = cp && TIFFFetchLongArray(tif, dp, (uint32_t *)cp); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - cp = CheckMalloc(tif, dp->tdir_count * sizeof(float), mesg); - ok = cp && TIFFFetchRationalArray(tif, dp, (float *)cp); - break; - case TIFF_FLOAT: - cp = CheckMalloc(tif, dp->tdir_count * sizeof(float), mesg); - ok = cp && TIFFFetchFloatArray(tif, dp, (float *)cp); - break; - case TIFF_DOUBLE: - cp = CheckMalloc(tif, dp->tdir_count * sizeof(double), mesg); - ok = cp && TIFFFetchDoubleArray(tif, dp, (double *)cp); - break; - case TIFF_ASCII: - case TIFF_UNDEFINED: /* bit of a cheat... */ - /* - * Some vendors write strings w/o the trailing - * NULL byte, so always append one just in case. - */ - cp = CheckMalloc(tif, dp->tdir_count + 1, mesg); - if (ok = (cp && TIFFFetchString(tif, dp, cp))) - cp[dp->tdir_count] = '\0'; /* XXX */ - break; - } - if (ok) - { - ok = (fip->field_passcount - ? (*setFieldFn)(tif, dp->tdir_tag, dp->tdir_count, cp) - : (*setFieldFn)(tif, dp->tdir_tag, cp)); - } - if (cp != NULL) - _TIFFfree(cp); - } - else if (CheckDirCount(tif, dp, 1)) - { /* singleton value */ - switch (dp->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - /* - * If the tag is also acceptable as a LONG or SLONG - * then (*setFieldFn) will expect an uint32_t parameter - * passed to it (through varargs). Thus, for machines - * where sizeof (int) != sizeof (uint32_t) we must do - * a careful check here. It's hard to say if this - * is worth optimizing. - * - * NB: We use TIFFFieldWithTag here knowing that - * it returns us the first entry in the table - * for the tag and that that entry is for the - * widest potential data type the tag may have. - */ - { - TIFFDataType type = fip->field_type; - if (type != TIFF_LONG && type != TIFF_SLONG) - { - uint16_t v = (uint16_t)TIFFExtractData( - tif, dp->tdir_type, dp->tdir_offset); - ok = (fip->field_passcount - ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) - : (*setFieldFn)(tif, dp->tdir_tag, v)); - break; - } - } - /* fall through... */ - case TIFF_LONG: - case TIFF_SLONG: - { - uint32_t v32 = - TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset); - ok = (fip->field_passcount - ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v32) - : (*setFieldFn)(tif, dp->tdir_tag, v32)); - } - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - { - float v = - (dp->tdir_type == TIFF_FLOAT ? TIFFFetchFloat(tif, dp) - : TIFFFetchRational(tif, dp)); - ok = (fip->field_passcount - ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) - : (*setFieldFn)(tif, dp->tdir_tag, v)); - } - break; - case TIFF_DOUBLE: - { - double v; - ok = (TIFFFetchDoubleArray(tif, dp, &v) && - (fip->field_passcount - ? (*setFieldFn)(tif, dp->tdir_tag, 1, &v) - : (*setFieldFn)(tif, dp->tdir_tag, v))); - } - break; - case TIFF_ASCII: - case TIFF_UNDEFINED: /* bit of a cheat... */ - { - char c[2]; - if (ok = (TIFFFetchString(tif, dp, c) != 0)) - { - c[1] = '\0'; /* XXX paranoid */ - ok = (*setFieldFn)(tif, dp->tdir_tag, c); - } - } - break; - } - } - return (ok); -} - -/* Everything after this is exactly duplicated from the standard tif_dirread.c - file, necessitated by the fact that they are declared static there so - we can't call them! -*/ -#define NITEMS(x) (sizeof(x) / sizeof(x[0])) -/* - * Fetch samples/pixel short values for - * the specified tag and verify that - * all values are the same. - */ -static int TIFFFetchPerSampleShorts(TIFF *tif, TIFFDirEntry *dir, int *pl) -{ - int samples = tif->tif_dir.td_samplesperpixel; - int status = 0; - - if (CheckDirCount(tif, dir, (uint32_t)samples)) - { - uint16_t buf[10]; - uint16_t *v = buf; - - if (samples > NITEMS(buf)) - v = (uint16_t *)_TIFFmalloc(samples * sizeof(uint16_t)); - if (TIFFFetchShortArray(tif, dir, v)) - { - int i; - for (i = 1; i < samples; i++) - if (v[i] != v[0]) - { - TIFFErrorExtR( - tif, tif->tif_name, - "Cannot handle different per-sample values for field " - "\"%s\"", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); - goto bad; - } - *pl = v[0]; - status = 1; - } - bad: - if (v != buf) - _TIFFfree((char *)v); - } - return (status); -} - -/* - * Fetch samples/pixel ANY values for - * the specified tag and verify that - * all values are the same. - */ -static int TIFFFetchPerSampleAnys(TIFF *tif, TIFFDirEntry *dir, double *pl) -{ - int samples = (int)tif->tif_dir.td_samplesperpixel; - int status = 0; - - if (CheckDirCount(tif, dir, (uint32_t)samples)) - { - double buf[10]; - double *v = buf; - - if (samples > NITEMS(buf)) - v = (double *)_TIFFmalloc(samples * sizeof(double)); - if (TIFFFetchAnyArray(tif, dir, v)) - { - int i; - for (i = 1; i < samples; i++) - if (v[i] != v[0]) - { - TIFFErrorExtR( - tif, tif->tif_name, - "Cannot handle different per-sample values for field " - "\"%s\"", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); - goto bad; - } - *pl = v[0]; - status = 1; - } - bad: - if (v != buf) - _TIFFfree(v); - } - return (status); -} -#undef NITEMS - -/* - * Fetch a set of offsets or lengths. - * While this routine says "strips", - * in fact it's also used for tiles. - */ -static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, long nstrips, - uint32_t **lpp) -{ - register uint32_t *lp; - int status; - - if (!CheckDirCount(tif, dir, (uint32_t)nstrips)) - return (0); - /* - * Allocate space for strip information. - */ - if (*lpp == NULL && - (*lpp = (uint32_t *)CheckMalloc(tif, nstrips * sizeof(uint32_t), - "for strip array")) == NULL) - return (0); - lp = *lpp; - if (dir->tdir_type == (int)TIFF_SHORT) - { - /* - * Handle uint16_t->uint32_t expansion. - */ - uint16_t *dp = (uint16_t *)CheckMalloc( - tif, dir->tdir_count * sizeof(uint16_t), "to fetch strip tag"); - if (dp == NULL) - return (0); - if (status = TIFFFetchShortArray(tif, dir, dp)) - { - register uint16_t *wp = dp; - while (nstrips-- > 0) - *lp++ = *wp++; - } - _TIFFfree((char *)dp); - } - else - status = TIFFFetchLongArray(tif, dir, lp); - return (status); -} - -#define NITEMS(x) (sizeof(x) / sizeof(x[0])) -/* - * Fetch and set the ExtraSamples tag. - */ -static int TIFFFetchExtraSamples(TIFF *tif, TIFFDirEntry *dir) -{ - uint16_t buf[10]; - uint16_t *v = buf; - int status; - - if (dir->tdir_count > NITEMS(buf)) - v = (uint16_t *)_TIFFmalloc(dir->tdir_count * sizeof(uint16_t)); - if (dir->tdir_type == TIFF_BYTE) - status = TIFFFetchByteArray(tif, dir, v); - else - status = TIFFFetchShortArray(tif, dir, v); - if (status) - status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v); - if (v != buf) - _TIFFfree((char *)v); - return (status); -} -#undef NITEMS - -#ifdef COLORIMETRY_SUPPORT -/* - * Fetch and set the RefBlackWhite tag. - */ -static int TIFFFetchRefBlackWhite(TIFF *tif, TIFFDirEntry *dir) -{ - static char mesg[] = "for \"ReferenceBlackWhite\" array"; - char *cp; - int ok; - - if (dir->tdir_type == TIFF_RATIONAL) - return (1/*TIFFFetchNormalTag(tif, dir) just so linker won't complain - this part of the code is never used anyway */); - /* - * Handle LONG's for backward compatibility. - */ - cp = CheckMalloc(tif, dir->tdir_count * sizeof(uint32_t), mesg); - if (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32_t *)cp))) - { - float *fp = - (float *)CheckMalloc(tif, dir->tdir_count * sizeof(float), mesg); - if (ok = (fp != NULL)) - { - uint32_t i; - for (i = 0; i < dir->tdir_count; i++) - fp[i] = (float)((uint32_t *)cp)[i]; - ok = TIFFSetField(tif, dir->tdir_tag, fp); - _TIFFfree((char *)fp); - } - } - if (cp) - _TIFFfree(cp); - return (ok); -} -#endif - -#if STRIPCHOP_SUPPORT -/* - * Replace a single strip (tile) of uncompressed data by - * multiple strips (tiles), each approximately 8Kbytes. - * This is useful for dealing with large images or - * for dealing with machines with a limited amount - * memory. - */ -static void ChopUpSingleUncompressedStrip(TIFF *tif) -{ - register TIFFDirectory *td = &tif->tif_dir; - uint32_t bytecount = td->td_stripbytecount[0]; - uint32_t offset = td->td_stripoffset[0]; - tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes; - tstrip_t strip, nstrips, rowsperstrip; - uint32_t *newcounts; - uint32_t *newoffsets; - - /* - * Make the rows hold at least one - * scanline, but fill 8k if possible. - */ - if (rowbytes > 8192) - { - stripbytes = rowbytes; - rowsperstrip = 1; - } - else - { - rowsperstrip = 8192 / rowbytes; - stripbytes = rowbytes * rowsperstrip; - } - /* never increase the number of strips in an image */ - if (rowsperstrip >= td->td_rowsperstrip) - return; - nstrips = (tstrip_t)TIFFhowmany(bytecount, stripbytes); - newcounts = - (uint32_t *)CheckMalloc(tif, nstrips * sizeof(uint32_t), - "for chopped \"StripByteCounts\" array"); - newoffsets = (uint32_t *)CheckMalloc(tif, nstrips * sizeof(uint32_t), - "for chopped \"StripOffsets\" array"); - if (newcounts == NULL || newoffsets == NULL) - { - /* - * Unable to allocate new strip information, give - * up and use the original one strip information. - */ - if (newcounts != NULL) - _TIFFfree(newcounts); - if (newoffsets != NULL) - _TIFFfree(newoffsets); - return; - } - /* - * Fill the strip information arrays with - * new bytecounts and offsets that reflect - * the broken-up format. - */ - for (strip = 0; strip < nstrips; strip++) - { - if (stripbytes > bytecount) - stripbytes = bytecount; - newcounts[strip] = stripbytes; - newoffsets[strip] = offset; - offset += stripbytes; - bytecount -= stripbytes; - } - /* - * Replace old single strip info with multi-strip info. - */ - td->td_stripsperimage = td->td_nstrips = nstrips; - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - _TIFFfree(td->td_stripbytecount); - _TIFFfree(td->td_stripoffset); - td->td_stripbytecount = newcounts; - td->td_stripoffset = newoffsets; -} -#endif /* STRIPCHOP_SUPPORT */ diff --git a/third_party/libtiff/contrib/pds/tif_pdsdirwrite.c b/third_party/libtiff/contrib/pds/tif_pdsdirwrite.c deleted file mode 100644 index fdac98c..0000000 --- a/third_party/libtiff/contrib/pds/tif_pdsdirwrite.c +++ /dev/null @@ -1,1037 +0,0 @@ -/* When writing data to TIFF files, it is often useful to store application- - specific data in a private TIFF directory so that the tags don't need to - be registered and won't conflict with other people's user-defined tags. - One needs to have a registered public tag which contains some amount of - raw data. That raw data, however, is interpreted at an independent, - separate, private tiff directory. This file provides some routines which - will be useful for converting that data from its raw binary form into - the proper form for your application. -*/ - -/* - * Copyright (c) 1988-1996 Sam Leffler - * Copyright (c) 1991-1996 Silicon Graphics, Inc. - * Copyright (c( 1996 USAF Phillips Laboratory - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * These routines written by Conrad J. Poelman on a single late-night of - * March 20-21, 1996. - * - * The entire purpose of this file is to provide a single external function, - * TIFFWritePrivateDataSubDirectory(). This function is intended for use - * in writing a private subdirectory structure into a TIFF file. The - * actual reading of data from the structure is handled by the getFieldFn(), - * which is passed to TIFFWritePrivateDataSubDirectory() as a parameter. The - * idea is to enable any application wishing to read private subdirectories to - * do so easily using this function, without modifying the TIFF library. - * - * The astute observer will notice that only two functions are at all different - * from the original tif_dirwrite.c file: TIFFWritePrivateDataSubDirectory()and - * TIFFWriteNormalSubTag(). All the other stuff that makes this file so huge - * is only necessary because all of those functions are declared static in - * tif_dirwrite.c, so we have to totally duplicate them in order to use them. - * - * Oh, also please note the bug-fix in the routine TIFFWriteNormalSubTag(), - * which equally should be applied to TIFFWriteNormalTag(). - * - */ -#include "tiffiop.h" - -#if HAVE_IEEEFP -#define TIFFCvtNativeToIEEEFloat(tif, n, fp) -#define TIFFCvtNativeToIEEEDouble(tif, n, dp) -#else -extern void TIFFCvtNativeToIEEEFloat(TIFF *, uint32_t, float *); -extern void TIFFCvtNativeToIEEEDouble(TIFF *, uint32_t, double *); -#endif - -static int TIFFWriteNormalTag(TIFF *, TIFFDirEntry *, const TIFFFieldInfo *); -static int TIFFWriteNormalSubTag(TIFF *, TIFFDirEntry *, const TIFFFieldInfo *, - int (*getFieldFn)(TIFF *tif, ttag_t tag, ...)); -static void TIFFSetupShortLong(TIFF *, ttag_t, TIFFDirEntry *, uint32_t); -static int TIFFSetupShortPair(TIFF *, ttag_t, TIFFDirEntry *); -static int TIFFWritePerSampleShorts(TIFF *, ttag_t, TIFFDirEntry *); -static int TIFFWritePerSampleAnys(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *); -static int TIFFWriteShortTable(TIFF *, ttag_t, TIFFDirEntry *, uint32_t, - uint16_t **); -static int TIFFWriteShortArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, uint16_t *); -static int TIFFWriteLongArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, uint32_t *); -static int TIFFWriteRationalArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, float *); -static int TIFFWriteFloatArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, float *); -static int TIFFWriteDoubleArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, double *); -static int TIFFWriteByteArray(TIFF *, TIFFDirEntry *, char *); -static int TIFFWriteAnyArray(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - uint32_t, double *); -#ifdef COLORIMETRY_SUPPORT -static int TIFFWriteTransferFunction(TIFF *, TIFFDirEntry *); -#endif -static int TIFFWriteData(TIFF *, TIFFDirEntry *, char *); -static int TIFFLinkDirectory(TIFF *); - -#define WriteRationalPair(type, tag1, v1, tag2, v2) \ - { \ - if (!TIFFWriteRational(tif, type, tag1, dir, v1)) \ - goto bad; \ - if (!TIFFWriteRational(tif, type, tag2, dir + 1, v2)) \ - goto bad; \ - dir++; \ - } -#define TIFFWriteRational(tif, type, tag, dir, v) \ - TIFFWriteRationalArray((tif), (type), (tag), (dir), 1, &(v)) -#ifndef TIFFWriteRational -static int TIFFWriteRational(TIFF *, TIFFDataType, ttag_t, TIFFDirEntry *, - float); -#endif - -/* This function will write an entire directory to the disk, and return the - offset value indicating where in the file it wrote the beginning of the - directory structure. This is NOT the same as the offset value before - calling this function, because some of the fields may have caused various - data items to be written out BEFORE writing the directory structure. - - This code was basically written by ripping of the TIFFWriteDirectory() - code and generalizing it, using RPS's TIFFWritePliIfd() code for - inspiration. My original goal was to make this code general enough that - the original TIFFWriteDirectory() could be rewritten to just call this - function with the appropriate field and field-accessing arguments. - - However, now I realize that there's a lot of code that gets executed for - the main, standard TIFF directories that does not apply to special - private subdirectories, so such a reimplementation for the sake of - eliminating redundant or duplicate code is probably not possible, - unless we also pass in a Main flag to indicate which type of handling - to do, which would be kind of a hack. I've marked those places where I - changed or ripped out code which would have to be re-inserted to - generalize this function. If it can be done in a clean and graceful way, - it would be a great way to generalize the TIFF library. Otherwise, I'll - just leave this code here where it duplicates but remains on top of and - hopefully mostly independent of the main TIFF library. - - The caller will probably want to free the sub directory structure after - returning from this call, since otherwise once written out, the user - is likely to forget about it and leave data lying around. -*/ -toff_t TIFFWritePrivateDataSubDirectory( - TIFF *tif, uint32_t pdir_fieldsset[], int pdir_fields_last, - TIFFFieldInfo *field_info, int (*getFieldFn)(TIFF *tif, ttag_t tag, ...)) -{ - uint16_t dircount; - uint32_t diroff, nextdiroff; - ttag_t tag; - uint32_t nfields; - tsize_t dirsize; - char *data; - TIFFDirEntry *dir; - u_long b, *fields, fields_size; - toff_t directory_offset; - TIFFFieldInfo *fip; - - /* - * Deleted out all of the encoder flushing and such code from here - - * not necessary for subdirectories. - */ - - /* Finish writing out any image data. */ - TIFFFlushData(tif); - - /* - * Size the directory so that we can calculate - * offsets for the data items that aren't kept - * in-place in each field. - */ - nfields = 0; - for (b = 0; b <= pdir_fields_last; b++) - if (FieldSet(pdir_fieldsset, b)) - /* Deleted code to make size of first 4 tags 2 - instead of 1. */ - nfields += 1; - dirsize = nfields * sizeof(TIFFDirEntry); - data = (char *)_TIFFmalloc(dirsize); - if (data == NULL) - { - TIFFErrorExtR(tif, tif->tif_name, - "Cannot write private subdirectory, out of space"); - return (0); - } - /* - * Place directory in data section of the file. If there isn't one - * yet, place it at the end of the file. The directory is treated as - * data, so we don't link it into the directory structure at all. - */ - if (tif->tif_dataoff == 0) - tif->tif_dataoff = (TIFFSeekFile(tif, (toff_t)0, SEEK_END) + 1) & ~1; - diroff = tif->tif_dataoff; - tif->tif_dataoff = - (toff_t)(diroff + sizeof(uint16_t) + dirsize + sizeof(toff_t)); - if (tif->tif_dataoff & 1) - tif->tif_dataoff++; - (void)TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET); - /*tif->tif_curdir++;*/ - dir = (TIFFDirEntry *)data; - /* - * Setup external form of directory - * entries and write data items. - */ - /* - * We make a local copy of the fieldsset here so that we don't mess - * up the original one when we call ResetFieldBit(). But I'm not sure - * why the original code calls ResetFieldBit(), since we're already - * going through the fields in order... - * - * fields_size is the number of uint32_t's we will need to hold the - * bit-mask for all of the fields. If our highest field number is - * 100, then we'll need 100 / (8*4)+1 == 4 uint32_t's to hold the - * fieldset. - * - * Unlike the original code, we allocate fields dynamically based - * on the requested pdir_fields_last value, allowing private - * data subdirectories to contain more than the built-in code's limit - * of 95 tags in a directory. - */ - fields_size = pdir_fields_last / (8 * sizeof(uint32_t)) + 1; - fields = _TIFFmalloc(fields_size * sizeof(uint32_t)); - _TIFFmemcpy(fields, pdir_fieldsset, fields_size * sizeof(uint32_t)); - - /* Deleted "write out extra samples tag" code here. */ - - /* Deleted code for checking a billion little special cases for the - * standard TIFF tags. Should add a general mechanism for overloading - * write function for each field, just like Brian kept telling me!!! - */ - for (fip = field_info; fip->field_tag; fip++) - { - /* Deleted code to check for FIELD_IGNORE!! */ - if (/* fip->field_bit == FIELD_IGNORE || */ - !FieldSet(fields, fip->field_bit)) - continue; - if (!TIFFWriteNormalSubTag(tif, dir, fip, getFieldFn)) - goto bad; - dir++; - ResetFieldBit(fields, fip->field_bit); - } - - /* Now we've written all of the referenced data, and are about to - write the main directory structure, so grab the tif_dataoff value - now so we can remember where we wrote the directory. */ - directory_offset = tif->tif_dataoff; - - /* - * Write directory. - */ - dircount = (uint16_t)nfields; - /* Deleted code to link to the next directory - we set it to zero! */ - nextdiroff = 0; - if (tif->tif_flags & TIFF_SWAB) - { - /* - * The file's byte order is opposite to the - * native machine architecture. We overwrite - * the directory information with impunity - * because it'll be released below after we - * write it to the file. Note that all the - * other tag construction routines assume that - * we do this byte-swapping; i.e. they only - * byte-swap indirect data. - */ - for (dir = (TIFFDirEntry *)data; dircount; dir++, dircount--) - { - TIFFSwabArrayOfShort(&dir->tdir_tag, 2); - TIFFSwabArrayOfLong(&dir->tdir_count, 2); - } - dircount = (uint16_t)nfields; - TIFFSwabShort(&dircount); - TIFFSwabLong(&nextdiroff); - } - - (void)TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET); - if (!WriteOK(tif, &dircount, sizeof(dircount))) - { - TIFFErrorExtR(tif, tif->tif_name, - "Error writing private subdirectory count"); - goto bad; - } - if (!WriteOK(tif, data, dirsize)) - { - TIFFErrorExtR(tif, tif->tif_name, - "Error writing private subdirectory contents"); - goto bad; - } - if (!WriteOK(tif, &nextdiroff, sizeof(nextdiroff))) - { - TIFFErrorExtR(tif, tif->tif_name, - "Error writing private subdirectory link"); - goto bad; - } - tif->tif_dataoff += sizeof(dircount) + dirsize + sizeof(nextdiroff); - - _TIFFfree(data); - _TIFFfree(fields); - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - -#if (0) - /* This stuff commented out because I don't think we want it for - subdirectories, but I could be wrong. */ - (*tif->tif_cleanup)(tif); - - /* - * Reset directory-related state for subsequent - * directories. - */ - TIFFDefaultDirectory(tif); - tif->tif_curoff = 0; - tif->tif_row = (uint32_t)-1; - tif->tif_curstrip = (tstrip_t)-1; -#endif - - return (directory_offset); -bad: - _TIFFfree(data); - _TIFFfree(fields); - return (0); -} -#undef WriteRationalPair - -/* - * Process tags that are not special cased. - */ -/* The standard function TIFFWriteNormalTag() could definitely be replaced - with a simple call to this function, just adding TIFFGetField() as the - last argument. */ -static int TIFFWriteNormalSubTag(TIFF *tif, TIFFDirEntry *dir, - const TIFFFieldInfo *fip, - int (*getFieldFn)(TIFF *tif, ttag_t tag, ...)) -{ - u_short wc = (u_short)fip->field_writecount; - - dir->tdir_tag = fip->field_tag; - dir->tdir_type = (u_short)fip->field_type; - dir->tdir_count = wc; -#define WRITEF(x, y) x(tif, fip->field_type, fip->field_tag, dir, wc, y) - switch (fip->field_type) - { - case TIFF_SHORT: - case TIFF_SSHORT: - if (wc > 1) - { - uint16_t *wp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &wp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &wp); - if (!WRITEF(TIFFWriteShortArray, wp)) - return (0); - } - else - { - uint16_t sv; - (*getFieldFn)(tif, fip->field_tag, &sv); - dir->tdir_offset = TIFFInsertData(tif, dir->tdir_type, sv); - } - break; - case TIFF_LONG: - case TIFF_SLONG: - if (wc > 1) - { - uint32_t *lp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &lp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &lp); - if (!WRITEF(TIFFWriteLongArray, lp)) - return (0); - } - else - { - /* XXX handle LONG->SHORT conversion */ - (*getFieldFn)(tif, fip->field_tag, &dir->tdir_offset); - } - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - if (wc > 1) - { - float *fp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &fp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &fp); - if (!WRITEF(TIFFWriteRationalArray, fp)) - return (0); - } - else - { - float fv; - (*getFieldFn)(tif, fip->field_tag, &fv); - if (!WRITEF(TIFFWriteRationalArray, &fv)) - return (0); - } - break; - case TIFF_FLOAT: - if (wc > 1) - { - float *fp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &fp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &fp); - if (!WRITEF(TIFFWriteFloatArray, fp)) - return (0); - } - else - { - float fv; - (*getFieldFn)(tif, fip->field_tag, &fv); - if (!WRITEF(TIFFWriteFloatArray, &fv)) - return (0); - } - break; - case TIFF_DOUBLE: - /* Hey - I think this is a bug, or at least a "gross - inconsistency", in the TIFF library. Look at the original - TIFF library code below within the "#if (0) ... #else". - Just from the type of *dp, you can see that this code - expects TIFFGetField() to be handed a double ** for - any TIFF_DOUBLE tag, even for the constant wc==1 case. - This is totally inconsistent with other fields (like - TIFF_FLOAT, above) and is also inconsistent with the - TIFFSetField() function for TIFF_DOUBLEs, which expects - to be passed a single double by value for the wc==1 case. - (See the handling of TIFFFetchNormalTag() in tif_dirread.c - for an example.) Maybe this function was written before - TIFFWriteDoubleArray() was written, not that that's an - excuse. Anyway, the new code below is a trivial modification - of the TIFF_FLOAT code above. The fact that even single - doubles get written out in the data segment and get an - offset value stored is irrelevant here - that is all - handled by TIFFWriteDoubleArray(). */ -#if (0) - { - double *dp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &dp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &dp); - TIFFCvtNativeToIEEEDouble(tif, wc, dp); - if (!TIFFWriteData(tif, dir, (char *)dp)) - return (0); - } -#else - if (wc > 1) - { - double *dp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &dp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &dp); - if (!WRITEF(TIFFWriteDoubleArray, dp)) - return (0); - } - else - { - double dv; - (*getFieldFn)(tif, fip->field_tag, &dv); - if (!WRITEF(TIFFWriteDoubleArray, &dv)) - return (0); - } -#endif - break; - case TIFF_ASCII: - { - char *cp; - (*getFieldFn)(tif, fip->field_tag, &cp); - dir->tdir_count = (uint32_t)(strlen(cp) + 1); - if (!TIFFWriteByteArray(tif, dir, cp)) - return (0); - } - break; - case TIFF_UNDEFINED: - { - char *cp; - if (wc == (u_short)TIFF_VARIABLE) - { - (*getFieldFn)(tif, fip->field_tag, &wc, &cp); - dir->tdir_count = wc; - } - else - (*getFieldFn)(tif, fip->field_tag, &cp); - if (!TIFFWriteByteArray(tif, dir, cp)) - return (0); - } - break; - } - return (1); -} -#undef WRITEF - -/* Everything after this is exactly duplicated from the standard tif_dirwrite.c - file, necessitated by the fact that they are declared static there so - we can't call them! -*/ -/* - * Setup a directory entry with either a SHORT - * or LONG type according to the value. - */ -static void TIFFSetupShortLong(TIFF *tif, ttag_t tag, TIFFDirEntry *dir, - uint32_t v) -{ - dir->tdir_tag = tag; - dir->tdir_count = 1; - if (v > 0xffffL) - { - dir->tdir_type = (short)TIFF_LONG; - dir->tdir_offset = v; - } - else - { - dir->tdir_type = (short)TIFF_SHORT; - dir->tdir_offset = TIFFInsertData(tif, (int)TIFF_SHORT, v); - } -} -#undef MakeShortDirent - -#ifndef TIFFWriteRational -/* - * Setup a RATIONAL directory entry and - * write the associated indirect value. - */ -static int TIFFWriteRational(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, float v) -{ - return (TIFFWriteRationalArray(tif, type, tag, dir, 1, &v)); -} -#endif - -#define NITEMS(x) (sizeof(x) / sizeof(x[0])) -/* - * Setup a directory entry that references a - * samples/pixel array of SHORT values and - * (potentially) write the associated indirect - * values. - */ -static int TIFFWritePerSampleShorts(TIFF *tif, ttag_t tag, TIFFDirEntry *dir) -{ - uint16_t buf[10], v; - uint16_t *w = buf; - int i, status, samples = tif->tif_dir.td_samplesperpixel; - - if (samples > NITEMS(buf)) - w = (uint16_t *)_TIFFmalloc(samples * sizeof(uint16_t)); - TIFFGetField(tif, tag, &v); - for (i = 0; i < samples; i++) - w[i] = v; - status = TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, samples, w); - if (w != buf) - _TIFFfree((char *)w); - return (status); -} - -/* - * Setup a directory entry that references a samples/pixel array of ``type'' - * values and (potentially) write the associated indirect values. The source - * data from TIFFGetField() for the specified tag must be returned as double. - */ -static int TIFFWritePerSampleAnys(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir) -{ - double buf[10], v; - double *w = buf; - int i, status; - int samples = (int)tif->tif_dir.td_samplesperpixel; - - if (samples > NITEMS(buf)) - w = (double *)_TIFFmalloc(samples * sizeof(double)); - TIFFGetField(tif, tag, &v); - for (i = 0; i < samples; i++) - w[i] = v; - status = TIFFWriteAnyArray(tif, type, tag, dir, samples, w); - if (w != buf) - _TIFFfree(w); - return (status); -} -#undef NITEMS - -/* - * Setup a pair of shorts that are returned by - * value, rather than as a reference to an array. - */ -static int TIFFSetupShortPair(TIFF *tif, ttag_t tag, TIFFDirEntry *dir) -{ - uint16_t v[2]; - - TIFFGetField(tif, tag, &v[0], &v[1]); - return (TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, 2, v)); -} - -/* - * Setup a directory entry for an NxM table of shorts, - * where M is known to be 2**bitspersample, and write - * the associated indirect data. - */ -static int TIFFWriteShortTable(TIFF *tif, ttag_t tag, TIFFDirEntry *dir, - uint32_t n, uint16_t **table) -{ - uint32_t i, off; - - dir->tdir_tag = tag; - dir->tdir_type = (short)TIFF_SHORT; - /* XXX -- yech, fool TIFFWriteData */ - dir->tdir_count = (uint32_t)(1L << tif->tif_dir.td_bitspersample); - off = tif->tif_dataoff; - for (i = 0; i < n; i++) - if (!TIFFWriteData(tif, dir, (char *)table[i])) - return (0); - dir->tdir_count *= n; - dir->tdir_offset = off; - return (1); -} - -/* - * Write/copy data associated with an ASCII or opaque tag value. - */ -static int TIFFWriteByteArray(TIFF *tif, TIFFDirEntry *dir, char *cp) -{ - if (dir->tdir_count > 4) - { - if (!TIFFWriteData(tif, dir, cp)) - return (0); - } - else - _TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count); - return (1); -} - -/* - * Setup a directory entry of an array of SHORT - * or SSHORT and write the associated indirect values. - */ -static int TIFFWriteShortArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, uint16_t *v) -{ - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - if (n <= 2) - { - if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) - { - dir->tdir_offset = (uint32_t)((long)v[0] << 16); - if (n == 2) - dir->tdir_offset |= v[1] & 0xffff; - } - else - { - dir->tdir_offset = v[0] & 0xffff; - if (n == 2) - dir->tdir_offset |= (long)v[1] << 16; - } - return (1); - } - else - return (TIFFWriteData(tif, dir, (char *)v)); -} - -/* - * Setup a directory entry of an array of LONG - * or SLONG and write the associated indirect values. - */ -static int TIFFWriteLongArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, uint32_t *v) -{ - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - if (n == 1) - { - dir->tdir_offset = v[0]; - return (1); - } - else - return (TIFFWriteData(tif, dir, (char *)v)); -} - -/* - * Setup a directory entry of an array of RATIONAL - * or SRATIONAL and write the associated indirect values. - */ -static int TIFFWriteRationalArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, float *v) -{ - uint32_t i; - uint32_t *t; - int status; - - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - t = (uint32_t *)_TIFFmalloc(2 * n * sizeof(uint32_t)); - for (i = 0; i < n; i++) - { - float fv = v[i]; - int sign = 1; - uint32_t den; - - if (fv < 0) - { - if (type == TIFF_RATIONAL) - { - TIFFWarning(tif->tif_name, - "\"%s\": Information lost writing value (%g) as " - "(unsigned) RATIONAL", - _TIFFFieldWithTag(tif, tag)->field_name, v); - fv = 0; - } - else - fv = -fv, sign = -1; - } - den = 1L; - if (fv > 0) - { - while (fv < 1L << (31 - 3) && den < 1L << (31 - 3)) - fv *= 1 << 3, den *= 1L << 3; - } - t[2 * i + 0] = sign * (fv + 0.5); - t[2 * i + 1] = den; - } - status = TIFFWriteData(tif, dir, (char *)t); - _TIFFfree((char *)t); - return (status); -} - -static int TIFFWriteFloatArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, float *v) -{ - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - TIFFCvtNativeToIEEEFloat(tif, n, v); - if (n == 1) - { - dir->tdir_offset = *(uint32_t *)&v[0]; - return (1); - } - else - return (TIFFWriteData(tif, dir, (char *)v)); -} - -static int TIFFWriteDoubleArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, double *v) -{ - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - TIFFCvtNativeToIEEEDouble(tif, n, v); - return (TIFFWriteData(tif, dir, (char *)v)); -} - -/* - * Write an array of ``type'' values for a specified tag (i.e. this is a tag - * which is allowed to have different types, e.g. SMaxSampleType). - * Internally the data values are represented as double since a double can - * hold any of the TIFF tag types (yes, this should really be an abstract - * type tany_t for portability). The data is converted into the specified - * type in a temporary buffer and then handed off to the appropriate array - * writer. - */ -static int TIFFWriteAnyArray(TIFF *tif, TIFFDataType type, ttag_t tag, - TIFFDirEntry *dir, uint32_t n, double *v) -{ - char buf[10 * sizeof(double)]; - char *w = buf; - int i, status = 0; - - if (n * TIFFDataWidth(type) > sizeof buf) - w = (char *)_TIFFmalloc(n * TIFFDataWidth(type)); - switch (type) - { - case TIFF_BYTE: - { - unsigned char *bp = (unsigned char *)w; - for (i = 0; i < n; i++) - bp[i] = (unsigned char)v[i]; - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - if (!TIFFWriteByteArray(tif, dir, (char *)bp)) - goto out; - } - break; - case TIFF_SBYTE: - { - signed char *bp = (signed char *)w; - for (i = 0; i < n; i++) - bp[i] = (signed char)v[i]; - dir->tdir_tag = tag; - dir->tdir_type = (short)type; - dir->tdir_count = n; - if (!TIFFWriteByteArray(tif, dir, (char *)bp)) - goto out; - } - break; - case TIFF_SHORT: - { - uint16_t *bp = (uint16_t *)w; - for (i = 0; i < n; i++) - bp[i] = (uint16_t)v[i]; - if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16_t *)bp)) - goto out; - } - break; - case TIFF_SSHORT: - { - int16_t *bp = (int16_t *)w; - for (i = 0; i < n; i++) - bp[i] = (int16_t)v[i]; - if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16_t *)bp)) - goto out; - } - break; - case TIFF_LONG: - { - uint32_t *bp = (uint32_t *)w; - for (i = 0; i < n; i++) - bp[i] = (uint32_t)v[i]; - if (!TIFFWriteLongArray(tif, type, tag, dir, n, bp)) - goto out; - } - break; - case TIFF_SLONG: - { - int32_t *bp = (int32_t *)w; - for (i = 0; i < n; i++) - bp[i] = (int32_t)v[i]; - if (!TIFFWriteLongArray(tif, type, tag, dir, n, (uint32_t *)bp)) - goto out; - } - break; - case TIFF_FLOAT: - { - float *bp = (float *)w; - for (i = 0; i < n; i++) - bp[i] = (float)v[i]; - if (!TIFFWriteFloatArray(tif, type, tag, dir, n, bp)) - goto out; - } - break; - case TIFF_DOUBLE: - return (TIFFWriteDoubleArray(tif, type, tag, dir, n, v)); - default: - /* TIFF_NOTYPE */ - /* TIFF_ASCII */ - /* TIFF_UNDEFINED */ - /* TIFF_RATIONAL */ - /* TIFF_SRATIONAL */ - goto out; - } - status = 1; -out: - if (w != buf) - _TIFFfree(w); - return (status); -} - -#ifdef COLORIMETRY_SUPPORT -static int TIFFWriteTransferFunction(TIFF *tif, TIFFDirEntry *dir) -{ - TIFFDirectory *td = &tif->tif_dir; - tsize_t n = (1L << td->td_bitspersample) * sizeof(uint16_t); - uint16_t **tf = td->td_transferfunction; - int ncols; - - /* - * Check if the table can be written as a single column, - * or if it must be written as 3 columns. Note that we - * write a 3-column tag if there are 2 samples/pixel and - * a single column of data won't suffice--hmm. - */ - switch (td->td_samplesperpixel - td->td_extrasamples) - { - default: - if (_TIFFmemcmp(tf[0], tf[2], n)) - { - ncols = 3; - break; - } - case 2: - if (_TIFFmemcmp(tf[0], tf[1], n)) - { - ncols = 3; - break; - } - case 1: - case 0: - ncols = 1; - } - return (TIFFWriteShortTable(tif, TIFFTAG_TRANSFERFUNCTION, dir, ncols, tf)); -} -#endif - -/* - * Write a contiguous directory item. - */ -static int TIFFWriteData(TIFF *tif, TIFFDirEntry *dir, char *cp) -{ - tsize_t cc; - - if (tif->tif_flags & TIFF_SWAB) - { - switch (dir->tdir_type) - { - case TIFF_SHORT: - case TIFF_SSHORT: - TIFFSwabArrayOfShort((uint16_t *)cp, dir->tdir_count); - break; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - TIFFSwabArrayOfLong((uint32_t *)cp, dir->tdir_count); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - TIFFSwabArrayOfLong((uint32_t *)cp, 2 * dir->tdir_count); - break; - case TIFF_DOUBLE: - TIFFSwabArrayOfDouble((double *)cp, dir->tdir_count); - break; - } - } - dir->tdir_offset = tif->tif_dataoff; - cc = dir->tdir_count * TIFFDataWidth(dir->tdir_type); - if (SeekOK(tif, dir->tdir_offset) && WriteOK(tif, cp, cc)) - { - tif->tif_dataoff += (cc + 1) & ~1; - return (1); - } - TIFFErrorExtR(tif, tif->tif_name, "Error writing data for field \"%s\"", - _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name); - return (0); -} - -/* - * Link the current directory into the - * directory chain for the file. - */ -static int TIFFLinkDirectory(TIFF *tif) -{ - static const char module[] = "TIFFLinkDirectory"; - uint32_t nextdir; - uint32_t diroff; - - tif->tif_diroff = (TIFFSeekFile(tif, (toff_t)0, SEEK_END) + 1) & ~1; - diroff = (uint32_t)tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&diroff); -#if SUBIFD_SUPPORT - if (tif->tif_flags & TIFF_INSUBIFD) - { - (void)TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET); - if (!WriteOK(tif, &diroff, sizeof(diroff))) - { - TIFFErrorExtR(tif, module, - "%s: Error writing SubIFD directory link", - tif->tif_name); - return (0); - } - /* - * Advance to the next SubIFD or, if this is - * the last one configured, revert back to the - * normal directory linkage. - */ - if (--tif->tif_nsubifd) - tif->tif_subifdoff += sizeof(diroff); - else - tif->tif_flags &= ~TIFF_INSUBIFD; - return (1); - } -#endif - if (tif->tif_header.tiff_diroff == 0) - { - /* - * First directory, overwrite offset in header. - */ - tif->tif_header.tiff_diroff = (uint32_t)tif->tif_diroff; -#define HDROFF(f) ((toff_t) & (((TIFFHeader *)0)->f)) - (void)TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET); - if (!WriteOK(tif, &diroff, sizeof(diroff))) - { - TIFFErrorExtR(tif, tif->tif_name, "Error writing TIFF header"); - return (0); - } - return (1); - } - /* - * Not the first directory, search to the last and append. - */ - nextdir = tif->tif_header.tiff_diroff; - do - { - uint16_t dircount; - - if (!SeekOK(tif, nextdir) || !ReadOK(tif, &dircount, sizeof(dircount))) - { - TIFFErrorExtR(tif, module, "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - (void)TIFFSeekFile(tif, dircount * sizeof(TIFFDirEntry), SEEK_CUR); - if (!ReadOK(tif, &nextdir, sizeof(nextdir))) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir); - } while (nextdir != 0); - (void)TIFFSeekFile(tif, -(toff_t)sizeof(nextdir), SEEK_CUR); - if (!WriteOK(tif, &diroff, sizeof(diroff))) - { - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - return (1); -} diff --git a/third_party/libtiff/contrib/ras/Makefile.am b/third_party/libtiff/contrib/ras/Makefile.am deleted file mode 100644 index 92e124b..0000000 --- a/third_party/libtiff/contrib/ras/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - README \ - ras2tif.c \ - tif2ras.c diff --git a/third_party/libtiff/contrib/ras/Makefile.in b/third_party/libtiff/contrib/ras/Makefile.in deleted file mode 100644 index e97ef18..0000000 --- a/third_party/libtiff/contrib/ras/Makefile.in +++ /dev/null @@ -1,511 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/ras -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - ras2tif.c \ - tif2ras.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/ras/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/ras/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/ras/README b/third_party/libtiff/contrib/ras/README deleted file mode 100644 index f87bfde..0000000 --- a/third_party/libtiff/contrib/ras/README +++ /dev/null @@ -1,10 +0,0 @@ -Sun May 19 22:28:16 PDT 1991 - -These programs are from Patrick Naughton (naughton@wind.sun.com). -I've tried to update them to reflect changes to the library, but -I am unable to verify that they operate properly, because they -require the Sun pixrect library. - -Please contact Patrick directly if you have questions/problems. - - Sam diff --git a/third_party/libtiff/contrib/ras/ras2tif.c b/third_party/libtiff/contrib/ras/ras2tif.c deleted file mode 100644 index c2f35a4..0000000 --- a/third_party/libtiff/contrib/ras/ras2tif.c +++ /dev/null @@ -1,244 +0,0 @@ -#ifndef lint -static char sccsid[] = "@(#)ras2tif.c 1.2 90/03/06"; -#endif -/*- - * ras2tif.c - Converts from a Sun Rasterfile to a Tagged Image File. - * - * Copyright (c) 1990 by Sun Microsystems, Inc. - * - * Author: Patrick J. Naughton - * naughton@wind.sun.com - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation. - * - * This file is provided AS IS with no warranties of any kind. The author - * shall have no liability with respect to the infringement of copyrights, - * trade secrets or any patents by this file or any part thereof. In no - * event will the author be liable for any lost revenue or profits or - * other special, indirect and consequential damages. - * - * Comments and additions should be sent to the author: - * - * Patrick J. Naughton - * Sun Microsystems - * 2550 Garcia Ave, MS 14-40 - * Mountain View, CA 94043 - * (415) 336-1080 - * - * Revision History: - * 11-Jan-89: Created. - * 06-Mar-90: fix bug in SCALE() macro. - * got rid of xres and yres, (they weren't working anyways). - * fixed bpsl calculation. - * 25-Nov-99: y2k fix (year as 1900 + tm_year) - * - * Description: - * This program takes a Sun Rasterfile [see rasterfile(5)] as input and - * writes a MicroSoft/Aldus "Tagged Image File Format" image or "TIFF" file. - * The input file may be standard input, but the output TIFF file must be a - * real file since seek(2) is used. - */ - -#include "tiffio.h" -#include -#include -#include - -typedef int boolean; -#define True (1) -#define False (0) -#define SCALE(x) (((x) * ((1L << 16) - 1)) / 255) - -boolean Verbose = False; -boolean dummyinput = False; -char *pname; /* program name (used for error messages) */ - -void error(s1, s2) char *s1, *s2; -{ - fprintf(stderr, s1, pname, s2); - exit(1); -} - -void usage() { error("usage: %s -[vq] [-|rasterfile] TIFFfile\n", NULL); } - -main(argc, argv) int argc; -char *argv[]; -{ - char *inf = NULL; - char *outf = NULL; - FILE *fp; - int depth, i; - long row; - TIFF *tif; - Pixrect *pix; /* The Sun Pixrect */ - colormap_t Colormap; /* The Pixrect Colormap */ - u_short red[256], green[256], blue[256]; - struct tm *ct; - struct timeval tv; - long width, height; - long rowsperstrip; - int year; - short photometric; - short samplesperpixel; - short bitspersample; - int bpsl; - static char *version = "ras2tif 1.0"; - static char *datetime = "1990:01:01 12:00:00"; - - gettimeofday(&tv, (struct timezone *)NULL); - ct = localtime(&tv.tv_sec); - year = 1900 + ct->tm_year; - sprintf(datetime, "%04d:%02d:%02d %02d:%02d:%02d", year, ct->tm_mon + 1, - ct->tm_mday, ct->tm_hour, ct->tm_min, ct->tm_sec); - - setbuf(stderr, NULL); - pname = argv[0]; - - while (--argc) - { - if ((++argv)[0][0] == '-') - { - switch (argv[0][1]) - { - case 'v': - Verbose = True; - break; - case 'q': - usage(); - break; - case '\0': - if (inf == NULL) - dummyinput = True; - else - usage(); - break; - default: - fprintf(stderr, "%s: illegal option -%c.\n", pname, - argv[0][1]); - exit(1); - } - } - else if (inf == NULL && !dummyinput) - { - inf = argv[0]; - } - else if (outf == NULL) - outf = argv[0]; - else - usage(); - } - - if (outf == NULL) - error("%s: can't write output file to a stream.\n", NULL); - - if (dummyinput || inf == NULL) - { - inf = "Standard Input"; - fp = stdin; - } - else if ((fp = fopen(inf, "r")) == NULL) - error("%s: %s couldn't be opened.\n", inf); - - if (Verbose) - fprintf(stderr, "Reading rasterfile from %s...", inf); - - pix = pr_load(fp, &Colormap); - if (pix == NULL) - error("%s: %s is not a raster file.\n", inf); - - if (Verbose) - fprintf(stderr, "done.\n"); - - if (Verbose) - fprintf(stderr, "Writing %s...", outf); - - tif = TIFFOpen(outf, "w"); - - if (tif == NULL) - error("%s: error opening TIFF file %s", outf); - - width = pix->pr_width; - height = pix->pr_height; - depth = pix->pr_depth; - - switch (depth) - { - case 1: - samplesperpixel = 1; - bitspersample = 1; - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 8: - samplesperpixel = 1; - bitspersample = 8; - photometric = PHOTOMETRIC_PALETTE; - break; - case 24: - samplesperpixel = 3; - bitspersample = 8; - photometric = PHOTOMETRIC_RGB; - break; - case 32: - samplesperpixel = 4; - bitspersample = 8; - photometric = PHOTOMETRIC_RGB; - break; - default: - error("%s: bogus depth: %d\n", depth); - } - - bpsl = ((depth * width + 15) >> 3) & ~1; - rowsperstrip = (8 * 1024) / bpsl; - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bitspersample); - TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, inf); - TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "converted Sun rasterfile"); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - TIFFSetField(tif, TIFFTAG_STRIPBYTECOUNTS, height / rowsperstrip); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_SOFTWARE, version); - TIFFSetField(tif, TIFFTAG_DATETIME, datetime); - - memset(red, 0, sizeof(red)); - memset(green, 0, sizeof(green)); - memset(blue, 0, sizeof(blue)); - if (depth == 8) - { - TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue); - for (i = 0; i < Colormap.length; i++) - { - red[i] = SCALE(Colormap.map[0][i]); - green[i] = SCALE(Colormap.map[1][i]); - blue[i] = SCALE(Colormap.map[2][i]); - } - } - if (Verbose) - fprintf(stderr, "%dx%dx%d image, ", width, height, depth); - - for (row = 0; row < height; row++) - if (TIFFWriteScanline(tif, (u_char *)mprd_addr(mpr_d(pix), 0, row), row, - 0) < 0) - { - fprintf("failed a scanline write (%d)\n", row); - break; - } - TIFFFlushData(tif); - TIFFClose(tif); - - if (Verbose) - fprintf(stderr, "done.\n"); - - pr_destroy(pix); - - exit(0); -} diff --git a/third_party/libtiff/contrib/ras/tif2ras.c b/third_party/libtiff/contrib/ras/tif2ras.c deleted file mode 100644 index 9460fde..0000000 --- a/third_party/libtiff/contrib/ras/tif2ras.c +++ /dev/null @@ -1,334 +0,0 @@ -/*- - * tif2ras.c - Converts from a Tagged Image File Format image to a Sun Raster. - * - * Copyright (c) 1990 by Sun Microsystems, Inc. - * - * Author: Patrick J. Naughton - * naughton@wind.sun.com - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation. - * - * This file is provided AS IS with no warranties of any kind. The author - * shall have no liability with respect to the infringement of copyrights, - * trade secrets or any patents by this file or any part thereof. In no - * event will the author be liable for any lost revenue or profits or - * other special, indirect and consequential damages. - * - * Comments and additions should be sent to the author: - * - * Patrick J. Naughton - * Sun Microsystems - * 2550 Garcia Ave, MS 14-40 - * Mountain View, CA 94043 - * (415) 336-1080 - * - * Revision History: - * 10-Jan-89: Created. - * 06-Mar-90: Change to byte encoded rasterfiles. - * fix bug in call to ReadScanline(). - * fix bug in CVT() macro. - * fix assignment of td, (missing &). - * - * Description: - * This program takes a MicroSoft/Aldus "Tagged Image File Format" image or - * "TIFF" file as input and writes a Sun Rasterfile [see rasterfile(5)]. The - * output file may be standard output, but the input TIFF file must be a real - * file since seek(2) is used. - */ - -#include "tiffio.h" -#include -#include - -typedef int boolean; -#define True (1) -#define False (0) -#define CVT(x) (((x)*255) / ((1L << 16) - 1)) - -boolean Verbose = False; -char *pname; /* program name (used for error messages) */ - -void error(s1, s2) char *s1, *s2; -{ - fprintf(stderr, s1, pname, s2); - exit(1); -} - -void usage() { error("usage: %s -[vq] TIFFfile [rasterfile]\n", NULL); } - -main(argc, argv) int argc; -char *argv[]; -{ - char *inf = NULL; - char *outf = NULL; - FILE *fp; - long width, height; - int depth, numcolors; - register TIFF *tif; - TIFFDirectory *td; - register u_char *inp, *outp; - register int col, i; - register long row; - u_char *Map = NULL; - u_char *buf; - short bitspersample; - short samplesperpixel; - short photometric; - u_short *redcolormap, *bluecolormap, *greencolormap; - - Pixrect *pix; /* The Sun Pixrect */ - colormap_t Colormap; /* The Pixrect Colormap */ - u_char red[256], green[256], blue[256]; - - setbuf(stderr, NULL); - pname = argv[0]; - - while (--argc) - { - if ((++argv)[0][0] == '-') - switch (argv[0][1]) - { - case 'v': - Verbose = True; - break; - case 'q': - usage(); - break; - default: - fprintf(stderr, "%s: illegal option -%c.\n", pname, - argv[0][1]); - exit(1); - } - else if (inf == NULL) - inf = argv[0]; - else if (outf == NULL) - outf = argv[0]; - else - usage(); - } - - if (inf == NULL) - error("%s: can't read input file from a stream.\n", NULL); - - if (Verbose) - fprintf(stderr, "Reading %s...", inf); - - tif = TIFFOpen(inf, "r"); - - if (tif == NULL) - error("%s: error opening TIFF file %s", inf); - - if (Verbose) - TIFFPrintDirectory(tif, stderr, True, False, False); - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); - if (bitspersample > 8) - error("%s: can't handle more than 8-bits per sample\n", NULL); - - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - switch (samplesperpixel) - { - case 1: - if (bitspersample == 1) - depth = 1; - else - depth = 8; - break; - case 3: - case 4: - depth = 24; - break; - default: - error("%s: only handle 1-channel gray scale or 3-channel color\n"); - } - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height); - - if (Verbose) - fprintf(stderr, "%dx%dx%d image, ", width, height, depth); - if (Verbose) - fprintf(stderr, "%d bits/sample, %d samples/pixel, ", bitspersample, - samplesperpixel); - - pix = mem_create(width, height, depth); - if (pix == (Pixrect *)NULL) - error("%s: can't allocate memory for output pixrect...\n", NULL); - - numcolors = (1 << bitspersample); - - TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric); - if (numcolors == 2) - { - if (Verbose) - fprintf(stderr, "monochrome "); - Colormap.type = RMT_NONE; - Colormap.length = 0; - Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = NULL; - } - else - { - switch (photometric) - { - case PHOTOMETRIC_MINISBLACK: - if (Verbose) - fprintf(stderr, "%d graylevels (min=black), ", numcolors); - Map = (u_char *)malloc(numcolors * sizeof(u_char)); - for (i = 0; i < numcolors; i++) - Map[i] = (255 * i) / numcolors; - Colormap.type = RMT_EQUAL_RGB; - Colormap.length = numcolors; - Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = Map; - break; - case PHOTOMETRIC_MINISWHITE: - if (Verbose) - fprintf(stderr, "%d graylevels (min=white), ", numcolors); - Map = (u_char *)malloc(numcolors * sizeof(u_char)); - for (i = 0; i < numcolors; i++) - Map[i] = 255 - ((255 * i) / numcolors); - Colormap.type = RMT_EQUAL_RGB; - Colormap.length = numcolors; - Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = Map; - break; - case PHOTOMETRIC_RGB: - if (Verbose) - fprintf(stderr, "truecolor "); - Colormap.type = RMT_NONE; - Colormap.length = 0; - Colormap.map[0] = Colormap.map[1] = Colormap.map[2] = NULL; - break; - case PHOTOMETRIC_PALETTE: - if (Verbose) - fprintf(stderr, "colormapped "); - Colormap.type = RMT_EQUAL_RGB; - Colormap.length = numcolors; - memset(red, 0, sizeof(red)); - memset(green, 0, sizeof(green)); - memset(blue, 0, sizeof(blue)); - TIFFGetField(tif, TIFFTAG_COLORMAP, &redcolormap, - &greencolormap, &bluecolormap); - for (i = 0; i < numcolors; i++) - { - red[i] = (u_char)CVT(redcolormap[i]); - green[i] = (u_char)CVT(greencolormap[i]); - blue[i] = (u_char)CVT(bluecolormap[i]); - } - Colormap.map[0] = red; - Colormap.map[1] = green; - Colormap.map[2] = blue; - break; - case PHOTOMETRIC_MASK: - error("%s: Don't know how to handle PHOTOMETRIC_MASK\n"); - break; - case PHOTOMETRIC_DEPTH: - error("%s: Don't know how to handle PHOTOMETRIC_DEPTH\n"); - break; - default: - error("%s: unknown photometric (cmap): %d\n", photometric); - } - } - - buf = (u_char *)malloc(TIFFScanlineSize(tif)); - if (buf == NULL) - error("%s: can't allocate memory for scanline buffer...\n", NULL); - - for (row = 0; row < height; row++) - { - if (TIFFReadScanline(tif, buf, row, 0) < 0) - error("%s: bad data read on line: %d\n", row); - inp = buf; - outp = (u_char *)mprd_addr(mpr_d(pix), 0, row); - switch (photometric) - { - case PHOTOMETRIC_RGB: - if (samplesperpixel == 4) - for (col = 0; col < width; col++) - { - *outp++ = *inp++; /* Blue */ - *outp++ = *inp++; /* Green */ - *outp++ = *inp++; /* Red */ - inp++; /* skip alpha channel */ - } - else - for (col = 0; col < width; col++) - { - *outp++ = *inp++; /* Blue */ - *outp++ = *inp++; /* Green */ - *outp++ = *inp++; /* Red */ - } - break; - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - switch (bitspersample) - { - case 1: - for (col = 0; col < ((width + 7) / 8); col++) - *outp++ = *inp++; - break; - case 2: - for (col = 0; col < ((width + 3) / 4); col++) - { - *outp++ = (*inp >> 6) & 3; - *outp++ = (*inp >> 4) & 3; - *outp++ = (*inp >> 2) & 3; - *outp++ = *inp++ & 3; - } - break; - case 4: - for (col = 0; col < width / 2; col++) - { - *outp++ = *inp >> 4; - *outp++ = *inp++ & 0xf; - } - break; - case 8: - for (col = 0; col < width; col++) - *outp++ = *inp++; - break; - default: - error("%s: bad bits/sample: %d\n", bitspersample); - } - break; - case PHOTOMETRIC_PALETTE: - memcpy(outp, inp, width); - break; - default: - error("%s: unknown photometric (write): %d\n", photometric); - } - } - - free((char *)buf); - - if (Verbose) - fprintf(stderr, "done.\n"); - - if (outf == NULL || strcmp(outf, "Standard Output") == 0) - { - outf = "Standard Output"; - fp = stdout; - } - else - { - if (!(fp = fopen(outf, "w"))) - error("%s: %s couldn't be opened for writing.\n", outf); - } - - if (Verbose) - fprintf(stderr, "Writing rasterfile in %s...", outf); - - if (pr_dump(pix, fp, &Colormap, RT_BYTE_ENCODED, 0) == PIX_ERR) - error("%s: error writing Sun Rasterfile: %s\n", outf); - - if (Verbose) - fprintf(stderr, "done.\n"); - - pr_destroy(pix); - - if (fp != stdout) - fclose(fp); - - exit(0); -} diff --git a/third_party/libtiff/contrib/stream/Makefile.am b/third_party/libtiff/contrib/stream/Makefile.am deleted file mode 100644 index cd882b3..0000000 --- a/third_party/libtiff/contrib/stream/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - README \ - tiffstream.cpp \ - tiffstream.h diff --git a/third_party/libtiff/contrib/stream/Makefile.in b/third_party/libtiff/contrib/stream/Makefile.in deleted file mode 100644 index 2b41221..0000000 --- a/third_party/libtiff/contrib/stream/Makefile.in +++ /dev/null @@ -1,511 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/stream -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - tiffstream.cpp \ - tiffstream.h - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/stream/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/stream/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/stream/README b/third_party/libtiff/contrib/stream/README deleted file mode 100644 index df9e43e..0000000 --- a/third_party/libtiff/contrib/stream/README +++ /dev/null @@ -1,30 +0,0 @@ -Subject: tiff stream interface (contrib) -Date: Thu, 30 Mar 2000 10:48:51 -0800 -From: "Avi Bleiweiss" -To: , - -Here at Shutterfly we have augmented the file based tiff library to support -C++ streams. The implementation is an adaptor class, which takes any C++ -stream from the user and in return it deposits i/o operation method pointers -(e.g. read, write, seek and close) into the tiff's library client state. - -The class TiffStream has an overloaded factory method - makeFileStream - -which takes the C++ stream as an argument, calls TIFFClientOpen and returns -a tiff handle. The class retains the tiff handle in its local state and -provides a helper function (getTiffHandle) to query the handle at any time. -Additional helper method - getStreamSize - provides the stream size to the -user. The implementation assumes client responsibility to delete the stream -object. The class calls TIFFClose at destruction time. - -Attached are a definition (tiffstream.h) and an implementation -(tiffstream.cpp) files of the TiffStream class. No changes are required to -the tiff core piece and the class sits on top of the library. The code is -fairly tested at this point and is used internally in Shutterfly imaging -software. The code is portable across WindowsNT/Linux/Solaris. - -We at Shutterfly believe this software has benefits to the larger community -of tiff library users and would like to contribute this software to be part -of the tiff distributed package. Let me know of any issue. - -Thanks -Avi diff --git a/third_party/libtiff/contrib/stream/tiffstream.cpp b/third_party/libtiff/contrib/stream/tiffstream.cpp deleted file mode 100644 index 4e955a2..0000000 --- a/third_party/libtiff/contrib/stream/tiffstream.cpp +++ /dev/null @@ -1,215 +0,0 @@ -// tiff stream interface class implementation - -#include "tiffstream.h" - -const char *TiffStream::m_name = "TiffStream"; - -TiffStream::TiffStream() -{ - m_tif = NULL; - - m_inStream = NULL; - m_outStream = NULL; - m_ioStream = NULL; - - m_streamLength = 0; - - m_this = reinterpret_cast(this); -}; - -TiffStream::~TiffStream() -{ - if (m_tif != NULL) - TIFFClose(m_tif); -} - -TIFF *TiffStream::makeFileStream(istream *str) -{ - m_inStream = str; - m_outStream = NULL; - m_ioStream = NULL; - m_streamLength = getSize(m_this); - - m_tif = TIFFClientOpen(m_name, "r", m_this, read, write, seek, close, size, - map, unmap); - return m_tif; -} - -TIFF *TiffStream::makeFileStream(ostream *str) -{ - m_inStream = NULL; - m_outStream = str; - m_ioStream = NULL; - m_streamLength = getSize(m_this); - - m_tif = TIFFClientOpen(m_name, "w", m_this, read, write, seek, close, size, - map, unmap); - return m_tif; -} - -TIFF *TiffStream::makeFileStream(iostream *str) -{ - m_inStream = NULL; - m_outStream = NULL; - m_ioStream = str; - m_streamLength = getSize(m_this); - - m_tif = TIFFClientOpen(m_name, "r+w", m_this, read, write, seek, close, - size, map, unmap); - return m_tif; -} - -tsize_t TiffStream::read(thandle_t fd, tdata_t buf, tsize_t size) -{ - istream *istr; - TiffStream *ts = reinterpret_cast(fd); - if (ts->m_inStream != NULL) - { - istr = ts->m_inStream; - } - else if (ts->m_ioStream != NULL) - { - istr = ts->m_ioStream; - } - - int remain = ts->m_streamLength - ts->tell(fd); - int actual = remain < size ? remain : size; - istr->read(reinterpret_cast(buf), actual); - return istr->gcount(); -} - -tsize_t TiffStream::write(thandle_t fd, tdata_t buf, tsize_t size) -{ - TiffStream *ts = reinterpret_cast(fd); - ostream *ostr; - if (ts->m_outStream != NULL) - { - ostr = ts->m_outStream; - } - else if (ts->m_ioStream != NULL) - { - ostr = ts->m_ioStream; - } - - streampos start = ostr->tellp(); - ostr->write(reinterpret_cast(buf), size); - return ostr->tellp() - start; -} - -toff_t TiffStream::seek(thandle_t fd, toff_t offset, int origin) -{ - TiffStream *ts = reinterpret_cast(fd); - if (ts->seekInt(fd, offset, origin) == true) - return offset; - else - return -1; -} - -int TiffStream::close(thandle_t fd) -{ - TiffStream *ts = reinterpret_cast(fd); - if (ts->m_inStream != NULL) - { - ts->m_inStream = NULL; - return 0; - } - else if (ts->m_outStream != NULL) - { - ts->m_outStream = NULL; - return 0; - } - else if (ts->m_ioStream != NULL) - { - ts->m_ioStream = NULL; - return 0; - } - return -1; -} - -toff_t TiffStream::size(thandle_t fd) -{ - TiffStream *ts = reinterpret_cast(fd); - return ts->getSize(fd); -} - -int TiffStream::map(thandle_t fd, tdata_t *phase, toff_t *psize) { return 0; } - -void TiffStream::unmap(thandle_t fd, tdata_t base, tsize_t size) {} - -unsigned int TiffStream::getSize(thandle_t fd) -{ - if (!isOpen(fd)) - return 0; - - unsigned int pos = tell(fd); - seekInt(fd, 0, end); - unsigned int size = tell(fd); - seekInt(fd, pos, beg); - - return size; -} - -unsigned int TiffStream::tell(thandle_t fd) -{ - TiffStream *ts = reinterpret_cast(fd); - if (ts->m_inStream != NULL) - { - return ts->m_inStream->tellg(); - } - else if (ts->m_outStream != NULL) - { - return ts->m_outStream->tellp(); - } - else if (ts->m_ioStream != NULL) - { - return ts->m_ioStream->tellg(); - } - return 0; -} - -bool TiffStream::seekInt(thandle_t fd, unsigned int offset, int origin) -{ - if (!isOpen(fd)) - return false; - - ios::seek_dir org; - switch (origin) - { - case beg: - org = ios::beg; - break; - case cur: - org = ios::cur; - break; - case end: - org = ios::end; - break; - } - - TiffStream *ts = reinterpret_cast(fd); - if (ts->m_inStream != NULL) - { - ts->m_inStream->seekg(offset, org); - return true; - } - else if (ts->m_outStream != NULL) - { - ts->m_outStream->seekp(offset, org); - return true; - } - else if (ts->m_ioStream != NULL) - { - ts->m_ioStream->seekg(offset, org); - ts->m_ioStream->seekp(offset, org); - return true; - } - return false; -} - -bool TiffStream::isOpen(thandle_t fd) -{ - TiffStream *ts = reinterpret_cast(fd); - return (ts->m_inStream != NULL || ts->m_outStream != NULL || - ts->m_ioStream != NULL); -} - diff --git a/third_party/libtiff/contrib/stream/tiffstream.h b/third_party/libtiff/contrib/stream/tiffstream.h deleted file mode 100644 index bda4cbd..0000000 --- a/third_party/libtiff/contrib/stream/tiffstream.h +++ /dev/null @@ -1,65 +0,0 @@ -// tiff stream interface class definition - -#ifndef _TIFF_STREAM_H_ -#define _TIFF_STREAM_H_ - -#include - -#include "tiffio.h" - -class TiffStream -{ - - public: - // ctor/dtor - TiffStream(); - ~TiffStream(); - - public: - enum SeekDir - { - beg, - cur, - end, - }; - - public: - // factory methods - TIFF *makeFileStream(iostream *str); - TIFF *makeFileStream(istream *str); - TIFF *makeFileStream(ostream *str); - - public: - // tiff client methods - static tsize_t read(thandle_t fd, tdata_t buf, tsize_t size); - static tsize_t write(thandle_t fd, tdata_t buf, tsize_t size); - static toff_t seek(thandle_t fd, toff_t offset, int origin); - static toff_t size(thandle_t fd); - static int close(thandle_t fd); - static int map(thandle_t fd, tdata_t *phase, toff_t *psize); - static void unmap(thandle_t fd, tdata_t base, tsize_t size); - - public: - // query method - TIFF *getTiffHandle() const { return m_tif; } - unsigned int getStreamLength() { return m_streamLength; } - - private: - // internal methods - unsigned int getSize(thandle_t fd); - unsigned int tell(thandle_t fd); - bool seekInt(thandle_t fd, unsigned int offset, int origin); - bool isOpen(thandle_t fd); - - private: - thandle_t m_this; - TIFF *m_tif; - static const char *m_name; - istream *m_inStream; - ostream *m_outStream; - iostream *m_ioStream; - int m_streamLength; -}; - -#endif // _TIFF_STREAM_H_ - diff --git a/third_party/libtiff/contrib/tags/Makefile.am b/third_party/libtiff/contrib/tags/Makefile.am deleted file mode 100644 index 0bdec67..0000000 --- a/third_party/libtiff/contrib/tags/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - README \ - listtif.c \ - maketif.c \ - xtif_dir.c \ - xtiffio.h \ - xtiffiop.h diff --git a/third_party/libtiff/contrib/tags/Makefile.in b/third_party/libtiff/contrib/tags/Makefile.in deleted file mode 100644 index edd51c7..0000000 --- a/third_party/libtiff/contrib/tags/Makefile.in +++ /dev/null @@ -1,514 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/tags -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - README \ - listtif.c \ - maketif.c \ - xtif_dir.c \ - xtiffio.h \ - xtiffiop.h - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/tags/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/tags/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/tags/README b/third_party/libtiff/contrib/tags/README deleted file mode 100644 index d58a564..0000000 --- a/third_party/libtiff/contrib/tags/README +++ /dev/null @@ -1,132 +0,0 @@ - -NOTE: Sept/2004 - -The following described approach to managing tag extensions has been -mostly superseded since libtiff 3.6.0. The described approach requires -internal knowledge of the libtiff API and tends to be very fragile -in the face of libtiff upgrades. - -Please read over the html/addingtags.html in preference to the below -described approach. - - - -================================== - -Client module for adding to LIBTIFF tagset -------------------------------------------- - Author: Niles Ritter - - - - -In the past, users of the "libtiff" package had to modify the -source code of the library if they required additional private tags -or codes not recognized by libtiff. Thus, whenever -a new revision of libtiff came out the client would have to -perform modifications to six or seven different files to re-install -their tags. - -The latest versions of libtiff now provide client software new routines, -giving them the opportunity to install private extensions at runtime, -rather than compile-time. This means that the client may encapsulate -all of their private tags into a separate module, which need only -be recompiled when new versions of libtiff are released; no manual -editing of files is required. - -How it works ------------- - -The mechanism for overriding the tag access has been enabled with -a single new routine, which has the following calling sequence: - - TIFFExtendProc old_extender; - - old_extender = TIFFSetTagExtender(tag_extender); - -which must be called prior to opening or creating TIFF files. - -This routine sets a static pointer to the user-specified function -, which in turn is called by TIFFDefaultDirectory(), -just after the usual TIFFSetField() and TIFFGetField() methods -are defined, and just before the compression tag is set. It also -returns a pointer to the previously-defined value of the tag-extender, -so that multiple clients may be installed. - -The TIFFExtendProc method that you define should be used to override -the TIFF file's "vsetfield" and "vgetfield" methods, so that you -can trap your new, private tags, and install their values into -a private directory structure. For your convenience, a new pointer -has also been added to the "TIFF" file structure: - - tidata_t tif_clientdir; /* client TIFF directory */ - -into which you may install whatever private directory structures you like. -You should also override the tag-printing method from within your -"vsetfield" method, to permit the symbolic printing of your new tags. - - -Example Client Code: --------------------- - -An example module has been provided as a template for installing -your own tags into a client tag extender. The module is called -"xtif_dir.c", and defines all of the interface routines, tag field -access, tag printing, etc. for most purpose. - -To see how the client module operates, there are three "fake" -tags currently installed. If you use the existing makefile you can -build them with: - - make all -f Makefile.gcc !or Makefile.mpw - maketif - listtif - -This will build two example programs called "maketif" and "listtif" -and then run them. These programs do nothing more than create a small -file called "newtif.tif", install the fake tags, and then list them out -using TIFFPrintDirectory(). - -Installing Private Tags ------------------------ - -To use this module for installing your own tags, edit each of the files - - xtif_dir.c - xtiffio.h - xtiffiop.h - -and search for the string "XXX". At these locations the comments -will direct you how to install your own tag values, define their -types, etc. Three examples tags are currently installed, demonstrating -how to implement multi-valued tags, single-valued tags, and ASCII tags. -The examples are not valid, registered tags, so you must replace them with -your own. - -To test the routines, also edit the test programs "maketif.c" and -"listtif.c" and replace the portions of the code that set the -private tag values and list them. - -Once you have edited these files, you may build the client module -with the Makefile provided, and run the test programs. - -To use these files in your own code, the "xtif_dir.c" module defines -replacement routines for the standard "TIFFOpen()" "TIFFFdOpen", -and "TIFFClose()" routines, called XTIFFOpen, XTIFFFdOpen and XTIFFClose. -You must use these routines in order to have the extended tag handlers -installed. Once installed, the standard TIFFGetField() and TIFFSetField -routines may be used as before. - -Adding Extended Tags to "tools" -------------------------------- -To create an extended-tag savvy "tiffinfo" program or other utility, you may -simply recompile and link the tools to your "libxtiff" library, adding - - -DTIFFOpen=XTIFFOpen -DTIFFClose=XTIFFClose -DTIFFFdOpen=XTIFFFdOpen - -to the compile statement. - -Bugs, Comments Etc: ------------------- - Send all reports and suggestions to ndr@tazboy.jpl.nasa.gov - (Niles Ritter). diff --git a/third_party/libtiff/contrib/tags/listtif.c b/third_party/libtiff/contrib/tags/listtif.c deleted file mode 100644 index 71bbd67..0000000 --- a/third_party/libtiff/contrib/tags/listtif.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * listtif.c -- lists a tiff file. - */ - -#include "xtiffio.h" -#include - -void main(int argc, char *argv[]) -{ - char *fname = "newtif.tif"; - int flags; - - TIFF *tif = (TIFF *)0; /* TIFF-level descriptor */ - - if (argc > 1) - fname = argv[1]; - - tif = XTIFFOpen(fname, "r"); - if (!tif) - goto failure; - - /* We want the double array listed */ - flags = TIFFPRINT_MYMULTIDOUBLES; - - TIFFPrintDirectory(tif, stdout, flags); - XTIFFClose(tif); - exit(0); - -failure: - printf("failure in listtif\n"); - if (tif) - XTIFFClose(tif); - exit(-1); -} diff --git a/third_party/libtiff/contrib/tags/maketif.c b/third_party/libtiff/contrib/tags/maketif.c deleted file mode 100644 index 1ee85ab..0000000 --- a/third_party/libtiff/contrib/tags/maketif.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * maketif.c -- creates a little TIFF file, with - * the XTIFF extended tiff example tags. - */ - -#include "xtiffio.h" -#include - -void SetUpTIFFDirectory(TIFF *tif); -void WriteImage(TIFF *tif); - -#define WIDTH 20 -#define HEIGHT 20 - -void main() -{ - TIFF *tif = (TIFF *)0; /* TIFF-level descriptor */ - - tif = XTIFFOpen("newtif.tif", "w"); - if (!tif) - goto failure; - - SetUpTIFFDirectory(tif); - WriteImage(tif); - - XTIFFClose(tif); - exit(0); - -failure: - printf("failure in maketif\n"); - if (tif) - XTIFFClose(tif); - exit(-1); -} - -void SetUpTIFFDirectory(TIFF *tif) -{ - double mymulti[6] = {0.0, 1.0, 2.0, 3.1415926, 5.0, 1.0}; - uint32_t mysingle = 3456; - char *ascii = "This file was produced by Steven Spielberg. NOT"; - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 20); - - /* Install the extended TIFF tag examples */ - TIFFSetField(tif, TIFFTAG_EXAMPLE_MULTI, 6, mymulti); - TIFFSetField(tif, TIFFTAG_EXAMPLE_SINGLE, mysingle); - TIFFSetField(tif, TIFFTAG_EXAMPLE_ASCII, ascii); -} - -void WriteImage(TIFF *tif) -{ - int i; - char buffer[WIDTH]; - - memset(buffer, 0, sizeof(buffer)); - for (i = 0; i < HEIGHT; i++) - if (!TIFFWriteScanline(tif, buffer, i, 0)) - TIFFErrorExtR(tif, "WriteImage", "failure in WriteScanline\n"); -} diff --git a/third_party/libtiff/contrib/tags/xtif_dir.c b/third_party/libtiff/contrib/tags/xtif_dir.c deleted file mode 100644 index e8398d0..0000000 --- a/third_party/libtiff/contrib/tags/xtif_dir.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * xtif_dir.c - * - * Extended TIFF Directory Tag Support. - * - * You may use this file as a template to add your own - * extended tags to the library. Only the parts of the code - * marked with "XXX" require modification. Three example tags - * are shown; you should replace them with your own. - * - * Author: Niles D. Ritter - */ - -#include "xtiffiop.h" -#include - -/* Tiff info structure. - * - * Entry format: - * { TAGNUMBER, ReadCount, WriteCount, DataType, FIELDNUM, - * OkToChange, PassDirCountOnSet, AsciiName } - * - * For ReadCount, WriteCount, -1 = unknown; used for mult-valued - * tags and ASCII. - */ - -static const TIFFFieldInfo xtiffFieldInfo[] = { - - /* XXX Replace these example tags with your own extended tags */ - {TIFFTAG_EXAMPLE_MULTI, -1, -1, TIFF_DOUBLE, FIELD_EXAMPLE_MULTI, TRUE, - TRUE, "MyMultivaluedTag"}, - {TIFFTAG_EXAMPLE_SINGLE, 1, 1, TIFF_LONG, FIELD_EXAMPLE_SINGLE, TRUE, FALSE, - "MySingleLongTag"}, - {TIFFTAG_EXAMPLE_ASCII, -1, -1, TIFF_ASCII, FIELD_EXAMPLE_ASCII, TRUE, - FALSE, "MyAsciiTag"}, -}; -#define N(a) (sizeof(a) / sizeof(a[0])) - -static void _XTIFFPrintDirectory(TIFF *tif, FILE *fd, long flags) -{ - xtiff *xt = XTIFFDIR(tif); - XTIFFDirectory *xd = &xt->xtif_dir; - int i, num; - - /* call the inherited method */ - if (PARENT(xt, printdir)) - (PARENT(xt, printdir))(tif, fd, flags); - - /* XXX Add field printing here. Replace the three example - * tags implemented below with your own. - */ - - fprintf(fd, "--My Example Tags--\n"); - - /* Our first example tag may have a lot of values, so we - * will only print them out if the TIFFPRINT_MYMULTIDOUBLES - * flag is passed into the print method. - */ - if (TIFFFieldSet(tif, FIELD_EXAMPLE_MULTI)) - { - fprintf(fd, " My Multi-Valued Doubles:"); - if (flags & TIFFPRINT_MYMULTIDOUBLES) - { - double *value = xd->xd_example_multi; - - num = xd->xd_num_multi; - fprintf(fd, "("); - for (i = 0; i < num; i++) - fprintf(fd, " %lg", *value++); - fprintf(fd, ")\n"); - } - else - fprintf(fd, "(present)\n"); - } - - if (TIFFFieldSet(tif, FIELD_EXAMPLE_SINGLE)) - { - fprintf(fd, " My Single Long Tag: %lu\n", xd->xd_example_single); - } - - if (TIFFFieldSet(tif, FIELD_EXAMPLE_ASCII)) - { - _TIFFprintAsciiTag(fd, "My ASCII Tag", xd->xd_example_ascii); - } -} - -static int _XTIFFVSetField(TIFF *tif, ttag_t tag, va_list ap) -{ - xtiff *xt = XTIFFDIR(tif); - XTIFFDirectory *xd = &xt->xtif_dir; - int status = 1; - uint32_t v32 = 0; - int i = 0, v = 0; - va_list ap1 = ap; - - /* va_start is called by the calling routine */ - - switch (tag) - { - /* - * XXX put your extended tags here; replace the implemented - * example tags with your own. - */ - case TIFFTAG_EXAMPLE_MULTI: - /* multi-valued tags need to store the count as well */ - xd->xd_num_multi = (uint16_t)va_arg(ap, int); - _TIFFsetDoubleArray(&xd->xd_example_multi, va_arg(ap, double *), - (long)xd->xd_num_multi); - break; - case TIFFTAG_EXAMPLE_SINGLE: - xd->xd_example_single = va_arg(ap, uint32_t); - break; - case TIFFTAG_EXAMPLE_ASCII: - _TIFFsetString(&xd->xd_example_ascii, va_arg(ap, char *)); - break; - default: - /* call the inherited method */ - return (PARENT(xt, vsetfield))(tif, tag, ap); - break; - } - if (status) - { - /* we have to override the print method here, - * after the compression tags have gotten to it. - * This makes sense because the only time we would - * need the extended print method is if an extended - * tag is set by the reader. - */ - if (!(xt->xtif_flags & XTIFFP_PRINT)) - { - PARENT(xt, printdir) = TIFFMEMBER(tif, printdir); - TIFFMEMBER(tif, printdir) = _XTIFFPrintDirectory; - xt->xtif_flags |= XTIFFP_PRINT; - } - TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit); - tif->tif_flags |= TIFF_DIRTYDIRECT; - } - va_end(ap); - return (status); -badvalue: - TIFFErrorExtR(tif, tif->tif_name, "%d: Bad value for \"%s\"", v, - _TIFFFieldWithTag(tif, tag)->field_name); - va_end(ap); - return (0); -badvalue32: - TIFFErrorExtR(tif, tif->tif_name, "%ld: Bad value for \"%s\"", v32, - _TIFFFieldWithTag(tif, tag)->field_name); - va_end(ap); - return (0); -} - -static int _XTIFFVGetField(TIFF *tif, ttag_t tag, va_list ap) -{ - xtiff *xt = XTIFFDIR(tif); - XTIFFDirectory *xd = &xt->xtif_dir; - - switch (tag) - { - /* - * XXX put your extended tags here; replace the implemented - * example tags with your own. - */ - case TIFFTAG_EXAMPLE_MULTI: - *va_arg(ap, uint16_t *) = xd->xd_num_multi; - *va_arg(ap, double **) = xd->xd_example_multi; - break; - case TIFFTAG_EXAMPLE_ASCII: - *va_arg(ap, char **) = xd->xd_example_ascii; - break; - case TIFFTAG_EXAMPLE_SINGLE: - *va_arg(ap, uint32_t *) = xd->xd_example_single; - break; - default: - /* return inherited method */ - return (PARENT(xt, vgetfield))(tif, tag, ap); - break; - } - return (1); -} - -#define CleanupField(member) \ - { \ - if (xd->member) \ - { \ - _TIFFfree(xd->member); \ - xd->member = 0; \ - } \ - } -/* - * Release storage associated with a directory. - */ -static void _XTIFFFreeDirectory(xtiff *xt) -{ - XTIFFDirectory *xd = &xt->xtif_dir; - - /* - * XXX - Purge all Your allocated memory except - * for the xtiff directory itself. This includes - * all fields that require a _TIFFsetXXX call in - * _XTIFFVSetField(). - */ - - CleanupField(xd_example_multi); - CleanupField(xd_example_ascii); -} -#undef CleanupField - -static void _XTIFFLocalDefaultDirectory(TIFF *tif) -{ - xtiff *xt = XTIFFDIR(tif); - XTIFFDirectory *xd = &xt->xtif_dir; - - /* Install the extended Tag field info */ - _TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo)); - - /* - * free up any dynamically allocated arrays - * before the new directory is read in. - */ - - _XTIFFFreeDirectory(xt); - _TIFFmemset(xt, 0, sizeof(xtiff)); - - /* Override the tag access methods */ - - PARENT(xt, vsetfield) = TIFFMEMBER(tif, vsetfield); - TIFFMEMBER(tif, vsetfield) = _XTIFFVSetField; - PARENT(xt, vgetfield) = TIFFMEMBER(tif, vgetfield); - TIFFMEMBER(tif, vgetfield) = _XTIFFVGetField; - - /* - * XXX Set up any default values here. - */ - - xd->xd_example_single = 234; -} - -/********************************************************************** - * Nothing below this line should need to be changed. - **********************************************************************/ - -static TIFFExtendProc _ParentExtender; - -/* - * This is the callback procedure, and is - * called by the DefaultDirectory method - * every time a new TIFF directory is opened. - */ - -static void _XTIFFDefaultDirectory(TIFF *tif) -{ - xtiff *xt; - - /* Allocate Directory Structure if first time, and install it */ - if (!(tif->tif_flags & XTIFF_INITIALIZED)) - { - xt = _TIFFmalloc(sizeof(xtiff)); - if (!xt) - { - /* handle memory allocation failure here ! */ - return; - } - _TIFFmemset(xt, 0, sizeof(xtiff)); - /* - * Install into TIFF structure. - */ - TIFFMEMBER(tif, clientdir) = (tidata_t)xt; - tif->tif_flags |= XTIFF_INITIALIZED; /* don't do this again! */ - } - - /* set up our own defaults */ - _XTIFFLocalDefaultDirectory(tif); - - /* Since an XTIFF client module may have overridden - * the default directory method, we call it now to - * allow it to set up the rest of its own methods. - */ - - if (_ParentExtender) - (*_ParentExtender)(tif); -} - -/* - * XTIFF Initializer -- sets up the callback - * procedure for the TIFF module. - */ - -static void _XTIFFInitialize(void) -{ - static first_time = 1; - - if (!first_time) - return; /* Been there. Done that. */ - first_time = 0; - - /* Grab the inherited method and install */ - _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); -} - -/* - * Public File I/O Routines. - */ -TIFF *XTIFFOpen(const char *name, const char *mode) -{ - /* Set up the callback */ - _XTIFFInitialize(); - - /* Open the file; the callback will set everything up - */ - return TIFFOpen(name, mode); -} - -TIFF *XTIFFFdOpen(int fd, const char *name, const char *mode) -{ - /* Set up the callback */ - _XTIFFInitialize(); - - /* Open the file; the callback will set everything up - */ - return TIFFFdOpen(fd, name, mode); -} - -void XTIFFClose(TIFF *tif) -{ - xtiff *xt = XTIFFDIR(tif); - - /* call inherited function first */ - TIFFClose(tif); - - /* Free up extended allocated memory */ - _XTIFFFreeDirectory(xt); - _TIFFfree(xt); -} diff --git a/third_party/libtiff/contrib/tags/xtiffio.h b/third_party/libtiff/contrib/tags/xtiffio.h deleted file mode 100644 index e181cf8..0000000 --- a/third_party/libtiff/contrib/tags/xtiffio.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * xtiffio.h -- Public interface to Extended TIFF tags - * - * This is a template for defining a client module - * which supports tag extensions to the standard libtiff - * set. Only portions of the code marked "XXX" need to - * be changed to support your tag set. - * - * written by: Niles D. Ritter - */ - -#ifndef __xtiffio_h -#define __xtiffio_h - -#include "tiffio.h" - -/* - * XXX Define your private Tag names and values here - */ - -/* These tags are not valid, but are provided for example */ -#define TIFFTAG_EXAMPLE_MULTI 61234 -#define TIFFTAG_EXAMPLE_SINGLE 61235 -#define TIFFTAG_EXAMPLE_ASCII 61236 - -/* - * XXX Define Printing method flags. These - * flags may be passed in to TIFFPrintDirectory() to - * indicate that those particular field values should - * be printed out in full, rather than just an indicator - * of whether they are present or not. - */ -#define TIFFPRINT_MYMULTIDOUBLES 0x80000000 - -/********************************************************************** - * Nothing below this line should need to be changed by the user. - **********************************************************************/ - -#if defined(__cplusplus) -extern "C" -{ -#endif - - extern TIFF *XTIFFOpen(const char *name, const char *mode); - extern TIFF *XTIFFFdOpen(int fd, const char *name, const char *mode); - extern void XTIFFClose(TIFF *tif); - -#if defined(__cplusplus) -} -#endif - -#endif /* __xtiffio_h */ - diff --git a/third_party/libtiff/contrib/tags/xtiffiop.h b/third_party/libtiff/contrib/tags/xtiffiop.h deleted file mode 100644 index b5ee917..0000000 --- a/third_party/libtiff/contrib/tags/xtiffiop.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Private Extended TIFF library interface. - * - * uses private LIBTIFF interface. - * - * The portions of this module marked "XXX" should be - * modified to support your tags instead. - * - * written by: Niles D. Ritter - * - */ - -#ifndef __xtiffiop_h -#define __xtiffiop_h - -#include "tiffiop.h" -#include "xtiffio.h" - -/********************************************************************** - * User Configuration - **********************************************************************/ - -/* XXX - Define number of your extended tags here */ -#define NUM_XFIELD 3 -#define XFIELD_BASE (FIELD_LAST - NUM_XFIELD) - -/* XXX - Define your Tag Fields here */ -#define FIELD_EXAMPLE_MULTI (XFIELD_BASE + 0) -#define FIELD_EXAMPLE_SINGLE (XFIELD_BASE + 1) -#define FIELD_EXAMPLE_ASCII (XFIELD_BASE + 2) - -/* XXX - Define Private directory tag structure here */ -struct XTIFFDirectory -{ - uint16_t xd_num_multi; /* dir-count for the multi tag */ - double *xd_example_multi; - uint32_t xd_example_single; - char *xd_example_ascii; -}; -typedef struct XTIFFDirectory XTIFFDirectory; - -/********************************************************************** - * Nothing below this line should need to be changed by the user. - **********************************************************************/ - -struct xtiff -{ - TIFF *xtif_tif; /* parent TIFF pointer */ - uint32_t xtif_flags; -#define XTIFFP_PRINT 0x00000001 - XTIFFDirectory xtif_dir; /* internal rep of current directory */ - TIFFVSetMethod xtif_vsetfield; /* inherited tag set routine */ - TIFFVGetMethod xtif_vgetfield; /* inherited tag get routine */ - TIFFPrintMethod xtif_printdir; /* inherited dir print method */ -}; -typedef struct xtiff xtiff; - -#define PARENT(xt, pmember) ((xt)->xtif_##pmember) -#define TIFFMEMBER(tf, pmember) ((tf)->tif_##pmember) -#define XTIFFDIR(tif) ((xtiff *)TIFFMEMBER(tif, clientdir)) - -/* Extended TIFF flags */ -#define XTIFF_INITIALIZED 0x80000000 - -#endif /* __xtiffiop_h */ - diff --git a/third_party/libtiff/contrib/win_dib/Makefile.am b/third_party/libtiff/contrib/win_dib/Makefile.am deleted file mode 100644 index 53ededb..0000000 --- a/third_party/libtiff/contrib/win_dib/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - Makefile.w95 \ - README.Tiffile \ - README.tiff2dib \ - Tiffile.cpp \ - tiff2dib.c diff --git a/third_party/libtiff/contrib/win_dib/Makefile.in b/third_party/libtiff/contrib/win_dib/Makefile.in deleted file mode 100644 index 2b924ef..0000000 --- a/third_party/libtiff/contrib/win_dib/Makefile.in +++ /dev/null @@ -1,513 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = contrib/win_dib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - Makefile.w95 \ - README.Tiffile \ - README.tiff2dib \ - Tiffile.cpp \ - tiff2dib.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/win_dib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/win_dib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/contrib/win_dib/Makefile.w95 b/third_party/libtiff/contrib/win_dib/Makefile.w95 deleted file mode 100644 index 3f15e83..0000000 --- a/third_party/libtiff/contrib/win_dib/Makefile.w95 +++ /dev/null @@ -1,132 +0,0 @@ -# -# Tag Image File Format Library -# -# Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler -# Copyright (c) 1991, 1992 Silicon Graphics, Inc. -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. -# -# This Makefile is for use with microsoft nmake version 1.50 and -# Microsoft 32-bit C/C++ Compiler 9.00 -# -DESTDIR=. -# -IPATH= -I. -CONF_LIBRARY=$(NULL) -COPTS= -Oxa -DBSDTYPES -Zd -CFLAGS= $(COPTS) $(CONF_LIBRARY) -# -INCS= tiff.h tiffio.h -SRCS= tif_aux.c \ - tif_close.c \ - tif_codec.c \ - tif_compress.c \ - tif_dir.c \ - tif_dirinfo.c \ - tif_dirread.c \ - tif_dirwrite.c \ - tif_dumpmode.c \ - tif_error.c \ - tif_getimage.c \ - tif_jpeg.c \ - tif_flush.c \ - tif_lzw.c \ - tif_next.c \ - tif_open.c \ - tif_packbits.c \ - tif_predict \ - tif_print.c \ - tif_read.c \ - tif_swab.c \ - tif_strip.c \ - tif_thunder.c \ - tif_tile.c \ - tif_version.c \ - tif_warning.c \ - tif_write.c \ - tif_win32.c - - -OBJS= tif_aux.obj \ - tif_close.obj \ - tif_codec.obj \ - tif_compress.obj \ - tif_dir.obj \ - tif_dirinfo.obj \ - tif_dirread.obj \ - tif_dirwrite.obj \ - tif_dumpmode.obj \ - tif_error.obj \ - tif_getimage.obj \ - tif_jpeg.obj \ - tif_flush.obj \ - tif_lzw.obj \ - tif_next.obj \ - tif_open.obj \ - tif_packbits.obj \ - tif_predict.obj \ - tif_print.obj \ - tif_read.obj \ - tif_swab.obj \ - tif_strip.obj \ - tif_thunder.obj \ - tif_tile.obj \ - tif_version.obj \ - tif_warning.obj \ - tif_write.obj \ - tif_win32.obj - - - -ALL= libtiff.lib - -all: $(ALL) - -%.obj : %.c - $(CC) $(CFLAGS) -c $*.c - - -#.INCLUDE .IGNORE : depend - -libtiff.lib: $(OBJS) - - del libtiff.lib - lib /OUT:libtiff.lib $(OBJS) - - -#To include fax3 support, you need to modify mkg3states.c so it could run -#under windows 95 or NT. This application make the file g3state.h. -#after that, you have to add to the build script : tif_fax3.c and tif_fax3.obj -#and define CCITT_SUPPORT in the file tifconf.h - -#$(OBJS): tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h -#tif_fax3.obj: tif_fax3.c g3states.h t4.h tif_fax3.h - -#g3states.h: mkg3states.c t4.h -# $(CC) $(CFLAGS) mkg3states.c -# mkg3states -c > g3states.h - - -clean: - del *.obj - del mkg3stat - del g3states.h - -tags: $(SRCS) - $(CTAGS) $(SRCS) diff --git a/third_party/libtiff/contrib/win_dib/README.Tiffile b/third_party/libtiff/contrib/win_dib/README.Tiffile deleted file mode 100644 index 8645f05..0000000 --- a/third_party/libtiff/contrib/win_dib/README.Tiffile +++ /dev/null @@ -1,31 +0,0 @@ -Frank, - -I attached a file that uses RGBA interface (tif_getimage.c) to read a tiff -file and convert to a DIB. It's advantage is that it is easy to read *any* -tiff file supported by libtiff and easily convert it to a DIB. The disadvantage -is that bilevel (B&W) bitmaps (and all other non-rgba images) are also -converted to RGBA, thus taking up 32x as much memory as needed (4 bytes per -pixel, rather than 1 bit). I read tiff files, but don't need to -write them. And my files are typically small, so the overhead is mostly -inconsequential. But for bilevel images, I overrode the get() and put() -routines of the RGBA interface to just copy the data from the input raster -to the output raster, rather than expanding out to full 32 bit format. It -would be nice if there were a simple way to handle all palletized images, -but that would take more custom routines, and it's not that important to me. - -Usage: - - m_pDIB = (PBITMAPINFOHEADER)::ReadTIFF(pathName); - if (m_pDIB != 0) { - m_format = IMAGETYPE_TIF; - } - -This is intended as Win32, but the modifications for new get() and put() -routines may be independent of platform. - -Thanks for your work supporting the forum and the library! - -Regards, - -Mark James -mark@james.net diff --git a/third_party/libtiff/contrib/win_dib/README.tiff2dib b/third_party/libtiff/contrib/win_dib/README.tiff2dib deleted file mode 100644 index 75e1254..0000000 --- a/third_party/libtiff/contrib/win_dib/README.tiff2dib +++ /dev/null @@ -1,51 +0,0 @@ - -Date: 04 Dec 95 10:34:23 EST -From: Philippe <100423.3705@compuserve.com> -To: TIFF/sam Leffler -Subject: TIFF library and Windows 95 -Message-Id: <951204153422_100423.3705_BHG101-1@CompuServe.COM> - -Sam, - -First, let me thanks all of you how have worked -on that great TIFF library ! - -Here is some information that may help someone. - -I build the library under Windows 95 as a 32-bit library. -The contribution of Scott Wagner (tif_win32.c) worked fine, but -the makefile "makefile.msc" was unusable because it was -written for DOS or Windows 3.1 and all the files names -are limited to 8 characters. - -Here is the makefile I used : makefile.w95 - -Also, I had to disable fax3 support because I wasn't able -to build (as it is) the tool "mkg3states" to generate the include -file "g3states.h". -This source file must be modify to be build under Windows 95. - -To build the library under Windows 95 with Visual C++ 2.0, -I had to : - -- undefine CCITT_SUPPORT in "tiffconf.h" - -- create the file version.h with this line : - #define VERSION "3.4beta024" - -- build the makefile "makefile.w95" - -I also join the source file "tif2dib.c" that I created, -it contain the function LoadTIFFinDIB that load -a TIFF file and build a memory DIB with it and return the -HANDLE (HDIB) of the memory block containing this DIB. -Since DIB is the "natural" bitmap format for Windows 3.1, 95 and NT, -this function should be useful for some Windows 95 (or NT) developer. - - -Sorry for my approximate english ... - -Regards, - -Philippe Tenenhaus 100423.3705@compuserve.com -Paris diff --git a/third_party/libtiff/contrib/win_dib/Tiffile.cpp b/third_party/libtiff/contrib/win_dib/Tiffile.cpp deleted file mode 100644 index f958377..0000000 --- a/third_party/libtiff/contrib/win_dib/Tiffile.cpp +++ /dev/null @@ -1,447 +0,0 @@ -#include "StdAfx.h" - -// #define STRICT -#include "diblib.h" -#include -#include // MAX_ constants -#include -#include - -/*-------------------------------------------------------------------- - READ TIFF - Load the TIFF data from the file into memory. Return - a pointer to a valid DIB (or NULL for errors). - Uses the TIFFRGBA interface to libtiff.lib to convert - most file formats to a usable form. We just keep the 32 bit - form of the data to display, rather than optimizing for the - display. - - Main entry points: - - int ChkTIFF ( LPCTSTR lpszPath ) - PVOID ReadTIFF ( LPCTSTR lpszPath ) - - RETURN - A valid DIB pointer for success; NULL for failure. - - --------------------------------------------------------------------*/ - -#include "TiffLib/tiff.h" -#include "TiffLib/tiffio.h" -#include -#include - -// piggyback some data on top of the RGBA Image -struct TIFFDibImage -{ - TIFFRGBAImage tif; - int dibinstalled; -}; - -HANDLE LoadTIFFinDIB(LPCTSTR lpFileName); -HANDLE TIFFRGBA2DIB(TIFFDibImage *dib, uint32_t *raster); - -static void MyWarningHandler(const char *module, const char *fmt, va_list ap) -{ - // ignore all warnings (unused tags, etc) - return; -} - -static void MyErrorHandler(const char *module, const char *fmt, va_list ap) -{ - return; -} - -// Turn off the error and warning handlers to check if a valid file. -// Necessary because of the way that the Doc loads images and restart files. -int ChkTIFF(LPCTSTR lpszPath) -{ - int rtn = 0; - - TIFFErrorHandler eh; - TIFFErrorHandler wh; - - eh = TIFFSetErrorHandler(NULL); - wh = TIFFSetWarningHandler(NULL); - - TIFF *tif = TIFFOpen(lpszPath, "r"); - if (tif) - { - rtn = 1; - TIFFClose(tif); - } - - TIFFSetErrorHandler(eh); - TIFFSetWarningHandler(wh); - - return rtn; -} - -void DibInstallHack(TIFFDibImage *img); - -PVOID ReadTIFF(LPCTSTR lpszPath) -{ - void *pDIB = 0; - TIFFErrorHandler wh; - - wh = TIFFSetWarningHandler(MyWarningHandler); - - if (ChkTIFF(lpszPath)) - { - TIFF *tif = TIFFOpen(lpszPath, "r"); - if (tif) - { - char emsg[1024]; - - if (TIFFRGBAImageOK(tif, emsg)) - { - TIFFDibImage img; - char emsg[1024]; - - if (TIFFRGBAImageBegin(&img.tif, tif, -1, emsg)) - { - size_t npixels; - uint32_t *raster; - - DibInstallHack(&img); - - npixels = img.tif.width * img.tif.height; - raster = - (uint32_t *)_TIFFmalloc(npixels * sizeof(uint32_t)); - if (raster != NULL) - { - if (TIFFRGBAImageGet(&img.tif, raster, img.tif.width, - img.tif.height)) - { - pDIB = TIFFRGBA2DIB(&img, raster); - } - } - _TIFFfree(raster); - } - TIFFRGBAImageEnd(&img.tif); - } - else - { - TRACE("Unable to open image(%s): %s\n", lpszPath, emsg); - } - TIFFClose(tif); - } - } - - TIFFSetWarningHandler(wh); - - return pDIB; -} - -HANDLE TIFFRGBA2DIB(TIFFDibImage *dib, uint32_t *raster) -{ - void *pDIB = 0; - TIFFRGBAImage *img = &dib->tif; - - uint32_t imageLength; - uint32_t imageWidth; - uint16_t BitsPerSample; - uint16_t SamplePerPixel; - uint32_t RowsPerStrip; - uint16_t PhotometricInterpretation; - - BITMAPINFOHEADER bi; - int dwDIBSize; - - TIFFGetField(img->tif, TIFFTAG_IMAGEWIDTH, &imageWidth); - TIFFGetField(img->tif, TIFFTAG_IMAGELENGTH, &imageLength); - TIFFGetField(img->tif, TIFFTAG_BITSPERSAMPLE, &BitsPerSample); - TIFFGetField(img->tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip); - TIFFGetField(img->tif, TIFFTAG_SAMPLESPERPIXEL, &SamplePerPixel); - TIFFGetField(img->tif, TIFFTAG_PHOTOMETRIC, &PhotometricInterpretation); - - if (BitsPerSample == 1 && SamplePerPixel == 1 && dib->dibinstalled) - { // bilevel - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = imageWidth; - bi.biHeight = imageLength; - bi.biPlanes = 1; // always - bi.biBitCount = 1; - bi.biCompression = BI_RGB; - bi.biSizeImage = WIDTHBYTES(bi.biWidth * bi.biBitCount) * bi.biHeight; - bi.biXPelsPerMeter = 0; - bi.biYPelsPerMeter = 0; - bi.biClrUsed = 0; // must be zero for RGB compression (none) - bi.biClrImportant = 0; // always - - // Get the size of the DIB - dwDIBSize = GetDIBSize(&bi); - - // Allocate for the BITMAPINFO structure and the color table. - pDIB = GlobalAllocPtr(GHND, dwDIBSize); - if (pDIB == 0) - { - return (NULL); - } - - // Copy the header info - *((BITMAPINFOHEADER *)pDIB) = bi; - - // Get a pointer to the color table - RGBQUAD *pRgbq = (RGBQUAD *)((LPSTR)pDIB + sizeof(BITMAPINFOHEADER)); - - pRgbq[0].rgbRed = 0; - pRgbq[0].rgbBlue = 0; - pRgbq[0].rgbGreen = 0; - pRgbq[0].rgbReserved = 0; - pRgbq[1].rgbRed = 255; - pRgbq[1].rgbBlue = 255; - pRgbq[1].rgbGreen = 255; - pRgbq[1].rgbReserved = 255; - - // Pointers to the bits - // PVOID pbiBits = (LPSTR)pRgbq + bi.biClrUsed * sizeof(RGBQUAD); - // - // In the BITMAPINFOHEADER documentation, it appears that - // there should be no color table for 32 bit images, but - // experience shows that the image is off by 3 words if it - // is not included. So here it is. - PVOID pbiBits = GetDIBImagePtr( - (BITMAPINFOHEADER *)pDIB); //(LPSTR)pRgbq + 3 * sizeof(RGBQUAD); - - int sizeWords = bi.biSizeImage / 4; - RGBQUAD *rgbDib = (RGBQUAD *)pbiBits; - long *rgbTif = (long *)raster; - - _TIFFmemcpy(pbiBits, raster, bi.biSizeImage); - } - - // For now just always default to the RGB 32 bit form. // save as 32 bit - // for simplicity - else if (true /*BitsPerSample == 8 && SamplePerPixel == 3*/) - { // 24 bit color - - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = imageWidth; - bi.biHeight = imageLength; - bi.biPlanes = 1; // always - bi.biBitCount = 32; - bi.biCompression = BI_RGB; - bi.biSizeImage = WIDTHBYTES(bi.biWidth * bi.biBitCount) * bi.biHeight; - bi.biXPelsPerMeter = 0; - bi.biYPelsPerMeter = 0; - bi.biClrUsed = 0; // must be zero for RGB compression (none) - bi.biClrImportant = 0; // always - - // Get the size of the DIB - dwDIBSize = GetDIBSize(&bi); - - // Allocate for the BITMAPINFO structure and the color table. - pDIB = GlobalAllocPtr(GHND, dwDIBSize); - if (pDIB == 0) - { - return (NULL); - } - - // Copy the header info - *((BITMAPINFOHEADER *)pDIB) = bi; - - // Get a pointer to the color table - RGBQUAD *pRgbq = (RGBQUAD *)((LPSTR)pDIB + sizeof(BITMAPINFOHEADER)); - - // Pointers to the bits - // PVOID pbiBits = (LPSTR)pRgbq + bi.biClrUsed * sizeof(RGBQUAD); - // - // In the BITMAPINFOHEADER documentation, it appears that - // there should be no color table for 32 bit images, but - // experience shows that the image is off by 3 words if it - // is not included. So here it is. - PVOID pbiBits = (LPSTR)pRgbq + 3 * sizeof(RGBQUAD); - - int sizeWords = bi.biSizeImage / 4; - RGBQUAD *rgbDib = (RGBQUAD *)pbiBits; - long *rgbTif = (long *)raster; - - // Swap the byte order while copying - for (int i = 0; i < sizeWords; ++i) - { - rgbDib[i].rgbRed = TIFFGetR(rgbTif[i]); - rgbDib[i].rgbBlue = TIFFGetB(rgbTif[i]); - rgbDib[i].rgbGreen = TIFFGetG(rgbTif[i]); - rgbDib[i].rgbReserved = 0; - } - } - - return pDIB; -} - -/////////////////////////////////////////////////////////////// -// -// Hacked from tif_getimage.c in libtiff in v3.5.7 -// -// -typedef unsigned char u_char; - -#define DECLAREContigPutFunc(name) \ - static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \ - uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \ - u_char *pp) - -#define DECLARESepPutFunc(name) \ - static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \ - uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \ - u_char *r, u_char *g, u_char *b, u_char *a) - -DECLAREContigPutFunc(putContig1bitTile); -static int getStripContig1Bit(TIFFRGBAImage *img, uint32_t *uraster, uint32_t w, - uint32_t h); - -// typedef struct TIFFDibImage { -// TIFFRGBAImage tif; -// dibinstalled; -// } TIFFDibImage ; - -void DibInstallHack(TIFFDibImage *dib) -{ - TIFFRGBAImage *img = &dib->tif; - dib->dibinstalled = false; - switch (img->photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - switch (img->bitspersample) - { - case 1: - img->put.contig = putContig1bitTile; - img->get = getStripContig1Bit; - dib->dibinstalled = true; - break; - } - break; - } -} - -/* - * 1-bit packed samples => 1-bit - * - * Override to just copy the data - */ -DECLAREContigPutFunc(putContig1bitTile) -{ - int samplesperpixel = img->samplesperpixel; - - (void)y; - fromskew *= samplesperpixel; - int wb = WIDTHBYTES(w); - u_char *ucp = (u_char *)cp; - - /* Convert 'w' to bytes from pixels (rounded up) */ - w = (w + 7) / 8; - - while (h-- > 0) - { - _TIFFmemcpy(ucp, pp, w); - /* - for (x = wb; x-- > 0;) { - *cp++ = rgbi(Map[pp[0]], Map[pp[1]], Map[pp[2]]); - pp += samplesperpixel; - } - */ - ucp += (wb + toskew); - pp += (w + fromskew); - } -} - -/* - * Hacked from the tif_getimage.c file. - */ -static uint32_t setorientation(TIFFRGBAImage *img, uint32_t h) -{ - TIFF *tif = img->tif; - uint32_t y; - - switch (img->orientation) - { - case ORIENTATION_BOTRIGHT: - case ORIENTATION_RIGHTBOT: /* XXX */ - case ORIENTATION_LEFTBOT: /* XXX */ - TIFFWarning(TIFFFileName(tif), "using bottom-left orientation"); - img->orientation = ORIENTATION_BOTLEFT; - /* fall through... */ - case ORIENTATION_BOTLEFT: - y = 0; - break; - case ORIENTATION_TOPRIGHT: - case ORIENTATION_RIGHTTOP: /* XXX */ - case ORIENTATION_LEFTTOP: /* XXX */ - default: - TIFFWarning(TIFFFileName(tif), "using top-left orientation"); - img->orientation = ORIENTATION_TOPLEFT; - /* fall through... */ - case ORIENTATION_TOPLEFT: - y = h - 1; - break; - } - return (y); -} - -/* - * Get a strip-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - * - * Hacked from the tif_getimage.c file. - * - * This is set up to allow us to just copy the data to the raster - * for 1-bit bitmaps - */ -static int getStripContig1Bit(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - tileContigRoutine put = img->put.contig; - uint16_t orientation; - uint32_t row, y, nrow, rowstoread; - uint32_t pos; - u_char *buf; - uint32_t rowsperstrip; - uint32_t imagewidth = img->width; - tsize_t scanline; - int32_t fromskew, toskew; - tstrip_t strip; - tsize_t stripsize; - u_char *braster = (u_char *)raster; // byte wide raster - uint32_t wb = WIDTHBYTES(w); - int ret = 1; - - buf = (u_char *)_TIFFmalloc(TIFFStripSize(tif)); - if (buf == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for strip buffer"); - return (0); - } - y = setorientation(img, h); - orientation = img->orientation; - toskew = -(int32_t)(orientation == ORIENTATION_TOPLEFT ? wb + wb : wb - wb); - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0) / 8; - for (row = 0; row < h; row += nrow) - { - rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; - nrow = (row + rowstoread > h ? h - row : rowstoread); - strip = TIFFComputeStrip(tif, row + img->row_offset, 0); - stripsize = ((row + img->row_offset) % rowsperstrip + nrow) * scanline; - if (TIFFReadEncodedStrip(tif, strip, buf, stripsize) < 0 && - img->stoponerr) - { - ret = 0; - break; - } - - pos = ((row + img->row_offset) % rowsperstrip) * scanline; - (*put)(img, (uint32_t *)(braster + y * wb), 0, y, w, nrow, fromskew, - toskew, buf + pos); - y += (orientation == ORIENTATION_TOPLEFT ? -(int32_t)nrow - : (int32_t)nrow); - } - _TIFFfree(buf); - return (ret); -} - diff --git a/third_party/libtiff/contrib/win_dib/tiff2dib.c b/third_party/libtiff/contrib/win_dib/tiff2dib.c deleted file mode 100644 index 1f02f8a..0000000 --- a/third_party/libtiff/contrib/win_dib/tiff2dib.c +++ /dev/null @@ -1,359 +0,0 @@ -/************************************************************************* - * - * Source file for Windows 95/Win32. - * - * The function LoadTIFFinDIB in this source file let you load - * a TIFF file and build a memory DIB with it and return the - * HANDLE (HDIB) of the memory block containing the DIB. - * - * Example : - * - * HDIB hDIB; - * hDIB = LoadTIFFinDIB("sample.tif"); - * - * - * To build this source file you must include the TIFF library - * in your project. - * - * 4/12/95 Philippe Tenenhaus 100423.3705@compuserve.com - * - ************************************************************************/ - -#include "tiffio.h" - -#define HDIB HANDLE -#define IS_WIN30_DIB(lpbi) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER)) -#define CVT(x) (((x)*255L) / ((1L << 16) - 1)) - -static HDIB CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount); -static LPSTR FindDIBBits(LPSTR lpDIB); -static WORD PaletteSize(LPSTR lpDIB); -static WORD DIBNumColors(LPSTR lpDIB); -static int checkcmap(int n, uint16_t *r, uint16_t *g, uint16_t *b); - -/************************************************************************* - * - * HDIB LoadTIFFinDIB(LPSTR lpFileName) - * - * Parameter: - * - * LPSTR lpDIB - File name of a tiff imag - * - * Return Value: - * - * LPSTR - HANDLE of a DIB - * - * Description: - * - * This function load a TIFF file and build a memory DIB with it - * and return the HANDLE (HDIB) of the memory block containing - * the DIB. - * - * 4/12/95 Philippe Tenenhaus 100423.3705@compuserve.com - * - ************************************************************************/ - -HDIB LoadTIFFinDIB(LPSTR lpFileName) -{ - TIFF *tif; - unsigned long imageLength; - unsigned long imageWidth; - unsigned int BitsPerSample; - unsigned long LineSize; - unsigned int SamplePerPixel; - unsigned long RowsPerStrip; - int PhotometricInterpretation; - long nrow; - unsigned long row; - char *buf; - LPBITMAPINFOHEADER lpDIB; - HDIB hDIB; - char *lpBits; - HGLOBAL hStrip; - int i, l; - int Align; - - tif = TIFFOpen(lpFileName, "r"); - - if (!tif) - goto TiffOpenError; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength); - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &BitsPerSample); - TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip); - TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &RowsPerStrip); - TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &PhotometricInterpretation); - - LineSize = TIFFScanlineSize(tif); // Number of byte in one line - - SamplePerPixel = (int)(LineSize / imageWidth); - - // Align = Number of byte to add at the end of each line of the DIB - Align = 4 - (LineSize % 4); - if (Align == 4) - Align = 0; - - // Create a new DIB - hDIB = CreateDIB((DWORD)imageWidth, (DWORD)imageLength, - (WORD)(BitsPerSample * SamplePerPixel)); - lpDIB = (LPBITMAPINFOHEADER)GlobalLock(hDIB); - if (!lpDIB) - goto OutOfDIBMemory; - - if (lpDIB) - lpBits = FindDIBBits((LPSTR)lpDIB); - else - lpBits = NULL; - - // In the tiff file the lines are save from up to down - // In a DIB the lines must be save from down to up - if (lpBits) - { - lpBits = FindDIBBits((LPSTR)lpDIB); - lpBits += ((imageWidth * SamplePerPixel) + Align) * (imageLength - 1); - // now lpBits pointe on the bottom line - - hStrip = GlobalAlloc(GHND, TIFFStripSize(tif)); - buf = GlobalLock(hStrip); - - if (!buf) - goto OutOfBufMemory; - - // PhotometricInterpretation = 2 image is RGB - // PhotometricInterpretation = 3 image have a color palette - if (PhotometricInterpretation == 3) - { - uint16_t *red; - uint16_t *green; - uint16_t *blue; - int16_t i; - LPBITMAPINFO lpbmi; - int Palette16Bits; - - TIFFGetField(tif, TIFFTAG_COLORMAP, &red, &green, &blue); - - // Is the palette 16 or 8 bits ? - if (checkcmap(1 << BitsPerSample, red, green, blue) == 16) - Palette16Bits = TRUE; - else - Palette16Bits = FALSE; - - lpbmi = (LPBITMAPINFO)lpDIB; - - // load the palette in the DIB - for (i = (1 << BitsPerSample) - 1; i >= 0; i--) - { - if (Palette16Bits) - { - lpbmi->bmiColors[i].rgbRed = (BYTE)CVT(red[i]); - lpbmi->bmiColors[i].rgbGreen = (BYTE)CVT(green[i]); - lpbmi->bmiColors[i].rgbBlue = (BYTE)CVT(blue[i]); - } - else - { - lpbmi->bmiColors[i].rgbRed = (BYTE)red[i]; - lpbmi->bmiColors[i].rgbGreen = (BYTE)green[i]; - lpbmi->bmiColors[i].rgbBlue = (BYTE)blue[i]; - } - } - } - - // read the tiff lines and save them in the DIB - // with RGB mode, we have to change the order of the 3 samples RGB - <=> BGR for (row = 0; row < imageLength; row += RowsPerStrip) - { - nrow = (row + RowsPerStrip > imageLength ? imageLength - row - : RowsPerStrip); - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, row, 0), buf, - nrow * LineSize) == -1) - { - goto TiffReadError; - } - else - { - for (l = 0; l < nrow; l++) - { - if (SamplePerPixel == 3) - for (i = 0; i < (int)(imageWidth); i++) - { - lpBits[i * SamplePerPixel + 0] = - buf[l * LineSize + i * Sample PerPixel + 2]; - lpBits[i * SamplePerPixel + 1] = - buf[l * LineSize + i * Sample PerPixel + 1]; - lpBits[i * SamplePerPixel + 2] = - buf[l * LineSize + i * Sample PerPixel + 0]; - } - else - memcpy(lpBits, &buf[(int)(l * LineSize)], - (int)imageWidth * SamplePerPixel); - - lpBits -= imageWidth * SamplePerPixel + Align; - } - } - } - GlobalUnlock(hStrip); - GlobalFree(hStrip); - GlobalUnlock(hDIB); - TIFFClose(tif); - } - - return hDIB; - -OutOfBufMemory: - -TiffReadError: - GlobalUnlock(hDIB); - GlobalFree(hStrip); -OutOfDIBMemory: - TIFFClose(tif); -TiffOpenError: - return (HANDLE)0; -} - -static int checkcmap(int n, uint16_t *r, uint16_t *g, uint16_t *b) -{ - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - - return (8); -} - -/************************************************************************* - * All the following functions were created by microsoft, they are - * parts of the sample project "wincap" given with the SDK Win32. - * - * Microsoft says that : - * - * You have a royalty-free right to use, modify, reproduce and - * distribute the Sample Files (and/or any modified version) in - * any way you find useful, provided that you agree that - * Microsoft has no warranty obligations or liability for any - * Sample Application Files which are modified. - * - ************************************************************************/ - -HDIB CreateDIB(DWORD dwWidth, DWORD dwHeight, WORD wBitCount) -{ - BITMAPINFOHEADER bi; // bitmap header - LPBITMAPINFOHEADER lpbi; // pointer to BITMAPINFOHEADER - DWORD dwLen; // size of memory block - HDIB hDIB; - DWORD dwBytesPerLine; // Number of bytes per scanline - - // Make sure bits per pixel is valid - if (wBitCount <= 1) - wBitCount = 1; - else if (wBitCount <= 4) - wBitCount = 4; - else if (wBitCount <= 8) - wBitCount = 8; - else if (wBitCount <= 24) - wBitCount = 24; - else - wBitCount = 4; // set default value to 4 if parameter is bogus - - // initialize BITMAPINFOHEADER - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = dwWidth; // fill in width from parameter - bi.biHeight = dwHeight; // fill in height from parameter - bi.biPlanes = 1; // must be 1 - bi.biBitCount = wBitCount; // from parameter - bi.biCompression = BI_RGB; - bi.biSizeImage = - (dwWidth * dwHeight * wBitCount) / 8; // 0; // 0's here - mean "default" bi.biXPelsPerMeter = 2834; // 0; - bi.biYPelsPerMeter = 2834; // 0; - bi.biClrUsed = 0; - bi.biClrImportant = 0; - - // calculate size of memory block required to store the DIB. This - // block should be big enough to hold the BITMAPINFOHEADER, the color - // table, and the bits - - dwBytesPerLine = (((wBitCount * dwWidth) + 31) / 32 * 4); - dwLen = bi.biSize + PaletteSize((LPSTR)&bi) + (dwBytesPerLine * dwHeight); - - // alloc memory block to store our bitmap - hDIB = GlobalAlloc(GHND, dwLen); - - // major bummer if we couldn't get memory block - if (!hDIB) - { - return NULL; - } - - // lock memory and get pointer to it - lpbi = (VOID FAR *)GlobalLock(hDIB); - - // use our bitmap info structure to fill in first part of - // our DIB with the BITMAPINFOHEADER - *lpbi = bi; - - // Since we don't know what the colortable and bits should contain, - // just leave these blank. Unlock the DIB and return the HDIB. - - GlobalUnlock(hDIB); - - /* return handle to the DIB */ - return hDIB; -} - -LPSTR FAR FindDIBBits(LPSTR lpDIB) -{ - return (lpDIB + *(LPDWORD)lpDIB + PaletteSize(lpDIB)); -} - -WORD FAR PaletteSize(LPSTR lpDIB) -{ - /* calculate the size required by the palette */ - if (IS_WIN30_DIB(lpDIB)) - return (DIBNumColors(lpDIB) * sizeof(RGBQUAD)); - else - return (DIBNumColors(lpDIB) * sizeof(RGBTRIPLE)); -} - -WORD DIBNumColors(LPSTR lpDIB) -{ - WORD wBitCount; // DIB bit count - - /* If this is a Windows-style DIB, the number of colors in the - * color table can be less than the number of bits per pixel - * allows for (i.e. lpbi->biClrUsed can be set to some value). - * If this is the case, return the appropriate value. - */ - - if (IS_WIN30_DIB(lpDIB)) - { - DWORD dwClrUsed; - - dwClrUsed = ((LPBITMAPINFOHEADER)lpDIB)->biClrUsed; - if (dwClrUsed) - return (WORD)dwClrUsed; - } - - /* Calculate the number of colors in the color table based on - * the number of bits per pixel for the DIB. - */ - if (IS_WIN30_DIB(lpDIB)) - wBitCount = ((LPBITMAPINFOHEADER)lpDIB)->biBitCount; - else - wBitCount = ((LPBITMAPCOREHEADER)lpDIB)->bcBitCount; - - /* return number of colors based on bits per pixel */ - switch (wBitCount) - { - case 1: - return 2; - - case 4: - return 16; - - case 8: - return 256; - - default: - return 0; - } -} diff --git a/third_party/libtiff/doc/CMakeLists.txt b/third_party/libtiff/doc/CMakeLists.txt deleted file mode 100644 index af5cab0..0000000 --- a/third_party/libtiff/doc/CMakeLists.txt +++ /dev/null @@ -1,144 +0,0 @@ -# CMake build for libtiff -# Run "cmake" to generate the build files for your platform -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Copyright © 2021-2022 Roger Leigh -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -include(Sphinx) - -if (BUILD_SPHINX AND SPHINX_BUILD) - # Re-run CMake when the Sphinx configuration is updated - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/conf.py") - - message(STATUS "Checking manual page dependencies") - - # Create build directory and conf.py - set(sphinx_srcdir "${CMAKE_CURRENT_SOURCE_DIR}") - set(sphinx_builddir "${CMAKE_CURRENT_BINARY_DIR}") - file(MAKE_DIRECTORY "${sphinx_builddir}") - - sphinx_manpages("${sphinx_srcdir}" "${sphinx_builddir}/man" MAN_PAGES) - sphinx_manpage_dependencies("${sphinx_srcdir}" MAN_PAGE_DEPENDENCIES) - sphinx_dependencies("${sphinx_srcdir}" SPHINX_DEPENDENCIES) - - # Generate and install man pages - - unset(man_target) - if(MAN_PAGES) - add_custom_command(OUTPUT ${MAN_PAGES} - COMMAND ${CMAKE_COMMAND} -E make_directory "${sphinx_builddir}/cache" - COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/man" - COMMAND ${SPHINX_BUILD} - -D "release=${LIBTIFF_VERSION_FULL}" - -D "version=${tiff_VERSION_MAJOR}.${tiff_VERSION_MINOR}" - -d "${sphinx_builddir}/cache" - -b man - "${sphinx_srcdir}" "${sphinx_builddir}/man" - WORKING_DIRECTORY "${sphinx_srcdir}" - DEPENDS ${MAN_PAGE_DEPENDENCIES}) - - if(NOT TARGET doc-man) - add_custom_target(doc-man ALL) - endif() - add_custom_target(${PROJECT_NAME}-doc-man DEPENDS ${MAN_PAGES}) - add_dependencies(doc-man ${PROJECT_NAME}-doc-man) - set(man_target ${PROJECT_NAME}-doc-man) - - foreach (man ${MAN_PAGES}) - string(REGEX REPLACE ".*\\.([0-9])[a-z]*\$" "\\1" man_section "${man}") - install(FILES "${man}" - DESTINATION "${CMAKE_INSTALL_MANDIR}/man${man_section}" - COMPONENT "runtime") - endforeach() - endif() - - # Generate and install HTML manual - # Depends on man to allow sharing of cache with parallel build. - - add_custom_command(OUTPUT "${sphinx_builddir}/html/index.html" - COMMAND ${CMAKE_COMMAND} -E make_directory "${sphinx_builddir}/cache" - COMMAND ${CMAKE_COMMAND} -E make_directory "${sphinx_builddir}/html" - COMMAND ${SPHINX_BUILD} - -D "release=${tiff_VERSION}" - -D "version=${tiff_VERSION_MAJOR}.${tiff_VERSION_MINOR}" - -d "${sphinx_builddir}/cache" - -b html - "${sphinx_srcdir}" "${sphinx_builddir}/html" - WORKING_DIRECTORY "${sphinx_srcdir}" - DEPENDS ${man_target} ${SPHINX_DEPENDENCIES}) - - if(NOT TARGET doc-html) - add_custom_target(doc-html ALL) - endif() - add_custom_target(${PROJECT_NAME}-doc-html DEPENDS "${sphinx_builddir}/html/index.html") - add_dependencies(doc-html ${PROJECT_NAME}-doc-html) - - install(DIRECTORY "${sphinx_builddir}/html" - DESTINATION "${CMAKE_INSTALL_DOCDIR}/manual" - COMPONENT "runtime") - - if(sphinx-linkcheck) - set(sphinx_linkcheck_all ALL) - endif() - - if(NOT TARGET doc-linkcheck) - add_custom_target(doc-linkcheck) - endif() - add_custom_target(${PROJECT_NAME}-doc-linkcheck ${sphinx_linkcheck_all} - COMMAND ${CMAKE_COMMAND} -E make_directory "${sphinx_builddir}/cache" - COMMAND ${CMAKE_COMMAND} -E make_directory "${sphinx_builddir}/linkcheck" - COMMAND ${SPHINX_BUILD} - -D "release=${tiff_VERSION}" - -D "version=${tiff_VERSION_MAJOR}.${tiff_VERSION_MINOR}" - -c "${sphinx_builddir}" - -d "${sphinx_builddir}/cache" - -b linkcheck - "${sphinx_srcdir}" "${sphinx_builddir}/linkcheck" - COMMENT "Checking remote links in sphinx documentation" - WORKING_DIRECTORY "${sphinx_srcdir}" - DEPENDS ${man_target} ${SPHINX_DEPENDENCIES}) - add_dependencies(doc-linkcheck ${PROJECT_NAME}-doc-linkcheck) - - if(NOT TARGET doc-locallinkcheck) - add_custom_target(doc-locallinkcheck) - endif() - add_custom_target(${PROJECT_NAME}-doc-locallinkcheck ${sphinx_linkcheck_all} - COMMAND ${CMAKE_COMMAND} - "-DOUTPUT=${sphinx_builddir}/linkcheck/output.txt" - "-DSPHINX_INSTALL_PATH=${PROJECT_NAME}/manual/html" - "-DINTERNAL_REFERENCE=${sphinx_builddir}/html" - "-DEXTERNAL_REFERENCE=${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc" - "-DDOXYGEN_REFERENCE=${PROJECT_BINARY_DIR}/docs/doxygen/api" - "-DDOXYGEN_INSTALL_PATH=${PROJECT_NAME}/api" - -P "${PROJECT_SOURCE_DIR}/cmake/SphinxCheckInternalLinks.cmake" - COMMENT "Checking local links in sphinx documentation" - WORKING_DIRECTORY "${sphinx_srcdir}" - DEPENDS doc-linkcheck) - add_dependencies(doc-locallinkcheck ${PROJECT_NAME}-doc-locallinkcheck) -elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/html-prebuilt/") - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/html-prebuilt/" - DESTINATION "${CMAKE_INSTALL_DOCDIR}/manual/html" - COMPONENT "runtime") -else() - message(WARNING "Manual pages and HTML manual will not be generated or installed") -endif() diff --git a/third_party/libtiff/doc/Makefile.am b/third_party/libtiff/doc/Makefile.am deleted file mode 100644 index 543e6c9..0000000 --- a/third_party/libtiff/doc/Makefile.am +++ /dev/null @@ -1,289 +0,0 @@ -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -docdir = $(LIBTIFF_DOCDIR)/manual - -rst_sources = \ - index.rst \ - build.rst \ - internals.rst \ - tools/tiffgt.rst \ - tools/tiffdither.rst \ - tools/tiff2pdf.rst \ - tools/tiff2ps.rst \ - tools/ppm2tiff.rst \ - tools/raw2tiff.rst \ - tools/fax2tiff.rst \ - tools/tiffcrop.rst \ - tools/tiff2bw.rst \ - tools/fax2ps.rst \ - tools/thumbnail.rst \ - tools/tiffcmp.rst \ - tools/tiffdump.rst \ - tools/tiff2rgba.rst \ - tools/tiffinfo.rst \ - tools/rgb2ycbcr.rst \ - tools/tiffset.rst \ - tools/tiffsplit.rst \ - tools/tiffmedian.rst \ - tools/pal2rgb.rst \ - tools/tiffcp.rst \ - project/license.rst \ - project/index.rst \ - project/acknowledgements.rst \ - project/bugs.rst \ - project/mailinglist.rst \ - project/psc.rst \ - addingtags.rst \ - specification/index.rst \ - specification/bigtiff.rst \ - specification/coverage.rst \ - specification/technote2.rst \ - specification/coverage-bigtiff.rst \ - releases/v3.4beta028.rst \ - releases/v4.0.9.rst \ - releases/v3.9.0.rst \ - releases/v4.0.7.rst \ - releases/v3.5.7.rst \ - releases/v4.0.0.rst \ - releases/v3.7.0beta2.rst \ - releases/v3.7.1.rst \ - releases/index.rst \ - releases/v3.8.0.rst \ - releases/v4.1.0.rst \ - releases/historical.rst \ - releases/v3.5.6beta.rst \ - releases/v3.6.1.rst \ - releases/v4.2.0.rst \ - releases/v3.7.0.rst \ - releases/v4.0.1.rst \ - releases/v3.5.1.rst \ - releases/v4.0.10.rst \ - releases/v4.0.6.rst \ - releases/v4.0.8.rst \ - releases/v3.9.1.rst \ - releases/v3.4beta029.rst \ - releases/v4.3.0.rst \ - releases/v3.4beta031.rst \ - releases/v3.7.0alpha.rst \ - releases/v3.6.0.rst \ - releases/v3.4beta036.rst \ - releases/v4.0.4beta.rst \ - releases/v3.8.1.rst \ - releases/v4.4.0.rst \ - releases/v3.4beta035.rst \ - releases/v3.4beta032.rst \ - releases/v3.4beta007.rst \ - releases/v3.9.0beta.rst \ - releases/v3.8.2.rst \ - releases/v3.4beta018.rst \ - releases/v3.7.3.rst \ - releases/v3.4beta016.rst \ - releases/v3.7.4.rst \ - releases/v3.5.2.rst \ - releases/v4.0.5.rst \ - releases/v3.4beta024.rst \ - releases/v3.5.5.rst \ - releases/v4.0.2.rst \ - releases/v3.9.5.rst \ - releases/v3.9.2.rst \ - releases/v3.4beta033.rst \ - releases/v3.4beta034.rst \ - releases/v3.9.3.rst \ - releases/v3.9.4.rst \ - releases/v3.7.0beta.rst \ - releases/v3.5.4.rst \ - releases/v4.0.3.rst \ - releases/v3.5.3.rst \ - releases/v4.0.4.rst \ - releases/v3.7.2.rst \ - releases/v4.5.0.rst \ - releases/v4.5.1.rst \ - releases/v4.6.0.rst \ - releases/v4.7.0.rst \ - releases/v4.7.1.rst \ - rfcs/index.rst \ - rfcs/rfc1_psc.rst \ - rfcs/rfc2_restoring_needed_tools.rst \ - functions.rst \ - tools.rst \ - terms.rst \ - contrib.rst \ - functions/TIFFRGBAImage.rst \ - functions/TIFFGetField.rst \ - functions/TIFFSetDirectory.rst \ - functions/TIFFWriteRawStrip.rst \ - functions/TIFFcolor.rst \ - functions/TIFFstrip.rst \ - functions/TIFFReadDirectory.rst \ - functions/TIFFReadRawTile.rst \ - functions/libtiff.rst \ - functions/TIFFPrintDirectory.rst \ - functions/TIFFsize.rst \ - functions/TIFFReadRGBATile.rst \ - functions/TIFFswab.rst \ - functions/TIFFmemory.rst \ - functions/TIFFtile.rst \ - functions/TIFFReadEncodedTile.rst \ - functions/TIFFWriteDirectory.rst \ - functions/TIFFSetField.rst \ - functions/TIFFWriteScanline.rst \ - functions/TIFFClose.rst \ - functions/TIFFFieldName.rst \ - functions/TIFFFieldReadCount.rst \ - functions/TIFFError.rst \ - functions/TIFFOpen.rst \ - functions/TIFFOpenOptions.rst \ - functions/TIFFcodec.rst \ - functions/TIFFFlush.rst \ - functions/TIFFDataWidth.rst \ - functions/TIFFReadRawStrip.rst \ - functions/TIFFReadTile.rst \ - functions/TIFFFieldWriteCount.rst \ - functions/TIFFbuffer.rst \ - functions/TIFFWriteRawTile.rst \ - functions/TIFFWarning.rst \ - functions/TIFFFieldDataType.rst \ - functions/TIFFWriteEncodedStrip.rst \ - functions/TIFFFieldPassCount.rst \ - functions/TIFFReadRGBAImage.rst \ - functions/TIFFReadScanline.rst \ - functions/TIFFReadEncodedStrip.rst \ - functions/TIFFFieldTag.rst \ - functions/TIFFWriteTile.rst \ - functions/TIFFReadRGBAStrip.rst \ - functions/TIFFquery.rst \ - functions/TIFFWriteEncodedTile.rst \ - functions/_TIFFauxiliary.rst \ - functions/_TIFFRewriteField.rst \ - functions/TIFFAccessTagMethods.rst \ - functions/TIFFClientInfo.rst \ - functions/TIFFCreateDirectory.rst \ - functions/TIFFCustomDirectory.rst \ - functions/TIFFCustomTagList.rst \ - functions/TIFFDeferStrileArrayWriting.rst \ - functions/TIFFFieldQuery.rst \ - functions/TIFFMergeFieldInfo.rst \ - functions/TIFFProcFunctions.rst \ - functions/TIFFReadFromUserBuffer.rst \ - functions/TIFFSetTagExtender.rst \ - functions/TIFFStrileQuery.rst \ - libtiff.rst \ - multi_page.rst \ - images.rst - -EXTRA_DIST = \ - CMakeLists.txt \ - conf.py \ - specification/bigtiffpr_images \ - images \ - $(rst_sources) - -if TIFF_DOCS -if SPHINX -doc-html: $(EXTRA_DIST) ../configure.ac - $(SPHINX_BUILD) \ - -D "release=$(LIBTIFF_VERSION)" \ - -D "version=$(LIBTIFF_MAJOR_VERSION).$(LIBTIFF_MINOR_VERSION)" \ - -d "$(builddir)/cache" \ - -b html \ - "$(srcdir)" "$(builddir)/html" - touch doc-html - -doc-man: $(EXTRA_DIST) ../configure.ac - $(SPHINX_BUILD) \ - -D "release=$(LIBTIFF_VERSION)" \ - -D "version=$(LIBTIFF_MAJOR_VERSION).$(LIBTIFF_MINOR_VERSION)" \ - -d "$(builddir)/cache" \ - -b man \ - "$(srcdir)" "$(builddir)/man" - touch doc-man - -man1_MANS = $(TIFF_MAN1_GEN) -man3_MANS = $(TIFF_MAN3_GEN) - -@TIFF_MAN_RULES@ - -all-local: doc-html doc-man - -clean-local: - rm -rf html - rm -rf man - rm -rf cache - rm -f doc-html - rm -f doc-man - -html_installdir = html -else -# Sphinx not available -doc-html: - echo "HTML documentation generation not configured (sphinx not available)" - exit 1 - -doc-man: - echo "Manual page documentation generation not configured (sphinx not available)" - exit 1 - -.PHONY: doc-html doc-man - -man1_MANS = $(TIFF_MAN1_PREBUILT) -man3_MANS = $(TIFF_MAN3_PREBUILT) - -html_installdir = $(srcdir)/html-prebuilt -endif - - -install-data-local: all-local - find $(html_installdir) -type d | sed -e 's;^$(html_installdir);;' | while read dir; do \ - echo " $(MKDIR_P) '$(DESTDIR)$(docdir)$$dir'"; \ - $(MKDIR_P) "$(DESTDIR)$(docdir)$$dir" || exit 1; \ - done - find $(html_installdir) -type f | sed -e 's;^$(html_installdir);;' | while read docfile; do \ - docsubdir=$$(dirname $$docfile); \ - echo "$(INSTALL_DATA) '$(html_installdir)$$docfile' '$(DESTDIR)$(docdir)$$docsubdir'"; \ - $(INSTALL_DATA) "$(html_installdir)$$docfile" "$(DESTDIR)$(docdir)$$docsubdir"; \ - done - -uninstall-local: - echo "rm -r $(DESTDIR)$(docdir)" - rm -r $(DESTDIR)$(docdir) -else -# Documentation generation disabled -doc-html: - echo "HTML documentation generation not configured" - exit 1 - -doc-man: - echo "Manual page documentation generation not configured" - exit 1 - -.PHONY: doc-html doc-man - -endif - -dist-hook: doc-html doc-man - cp -r html $(distdir)/html-prebuilt - cp -r man $(distdir)/man-prebuilt diff --git a/third_party/libtiff/doc/Makefile.in b/third_party/libtiff/doc/Makefile.in deleted file mode 100644 index 4a345af..0000000 --- a/third_party/libtiff/doc/Makefile.in +++ /dev/null @@ -1,888 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" -man3dir = $(mandir)/man3 -NROFF = nroff -MANS = $(man1_MANS) $(man3_MANS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = $(LIBTIFF_DOCDIR)/manual -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -rst_sources = \ - index.rst \ - build.rst \ - internals.rst \ - tools/tiffgt.rst \ - tools/tiffdither.rst \ - tools/tiff2pdf.rst \ - tools/tiff2ps.rst \ - tools/ppm2tiff.rst \ - tools/raw2tiff.rst \ - tools/fax2tiff.rst \ - tools/tiffcrop.rst \ - tools/tiff2bw.rst \ - tools/fax2ps.rst \ - tools/thumbnail.rst \ - tools/tiffcmp.rst \ - tools/tiffdump.rst \ - tools/tiff2rgba.rst \ - tools/tiffinfo.rst \ - tools/rgb2ycbcr.rst \ - tools/tiffset.rst \ - tools/tiffsplit.rst \ - tools/tiffmedian.rst \ - tools/pal2rgb.rst \ - tools/tiffcp.rst \ - project/license.rst \ - project/index.rst \ - project/acknowledgements.rst \ - project/bugs.rst \ - project/mailinglist.rst \ - project/psc.rst \ - addingtags.rst \ - specification/index.rst \ - specification/bigtiff.rst \ - specification/coverage.rst \ - specification/technote2.rst \ - specification/coverage-bigtiff.rst \ - releases/v3.4beta028.rst \ - releases/v4.0.9.rst \ - releases/v3.9.0.rst \ - releases/v4.0.7.rst \ - releases/v3.5.7.rst \ - releases/v4.0.0.rst \ - releases/v3.7.0beta2.rst \ - releases/v3.7.1.rst \ - releases/index.rst \ - releases/v3.8.0.rst \ - releases/v4.1.0.rst \ - releases/historical.rst \ - releases/v3.5.6beta.rst \ - releases/v3.6.1.rst \ - releases/v4.2.0.rst \ - releases/v3.7.0.rst \ - releases/v4.0.1.rst \ - releases/v3.5.1.rst \ - releases/v4.0.10.rst \ - releases/v4.0.6.rst \ - releases/v4.0.8.rst \ - releases/v3.9.1.rst \ - releases/v3.4beta029.rst \ - releases/v4.3.0.rst \ - releases/v3.4beta031.rst \ - releases/v3.7.0alpha.rst \ - releases/v3.6.0.rst \ - releases/v3.4beta036.rst \ - releases/v4.0.4beta.rst \ - releases/v3.8.1.rst \ - releases/v4.4.0.rst \ - releases/v3.4beta035.rst \ - releases/v3.4beta032.rst \ - releases/v3.4beta007.rst \ - releases/v3.9.0beta.rst \ - releases/v3.8.2.rst \ - releases/v3.4beta018.rst \ - releases/v3.7.3.rst \ - releases/v3.4beta016.rst \ - releases/v3.7.4.rst \ - releases/v3.5.2.rst \ - releases/v4.0.5.rst \ - releases/v3.4beta024.rst \ - releases/v3.5.5.rst \ - releases/v4.0.2.rst \ - releases/v3.9.5.rst \ - releases/v3.9.2.rst \ - releases/v3.4beta033.rst \ - releases/v3.4beta034.rst \ - releases/v3.9.3.rst \ - releases/v3.9.4.rst \ - releases/v3.7.0beta.rst \ - releases/v3.5.4.rst \ - releases/v4.0.3.rst \ - releases/v3.5.3.rst \ - releases/v4.0.4.rst \ - releases/v3.7.2.rst \ - releases/v4.5.0.rst \ - releases/v4.5.1.rst \ - releases/v4.6.0.rst \ - releases/v4.7.0.rst \ - releases/v4.7.1.rst \ - rfcs/index.rst \ - rfcs/rfc1_psc.rst \ - rfcs/rfc2_restoring_needed_tools.rst \ - functions.rst \ - tools.rst \ - terms.rst \ - contrib.rst \ - functions/TIFFRGBAImage.rst \ - functions/TIFFGetField.rst \ - functions/TIFFSetDirectory.rst \ - functions/TIFFWriteRawStrip.rst \ - functions/TIFFcolor.rst \ - functions/TIFFstrip.rst \ - functions/TIFFReadDirectory.rst \ - functions/TIFFReadRawTile.rst \ - functions/libtiff.rst \ - functions/TIFFPrintDirectory.rst \ - functions/TIFFsize.rst \ - functions/TIFFReadRGBATile.rst \ - functions/TIFFswab.rst \ - functions/TIFFmemory.rst \ - functions/TIFFtile.rst \ - functions/TIFFReadEncodedTile.rst \ - functions/TIFFWriteDirectory.rst \ - functions/TIFFSetField.rst \ - functions/TIFFWriteScanline.rst \ - functions/TIFFClose.rst \ - functions/TIFFFieldName.rst \ - functions/TIFFFieldReadCount.rst \ - functions/TIFFError.rst \ - functions/TIFFOpen.rst \ - functions/TIFFOpenOptions.rst \ - functions/TIFFcodec.rst \ - functions/TIFFFlush.rst \ - functions/TIFFDataWidth.rst \ - functions/TIFFReadRawStrip.rst \ - functions/TIFFReadTile.rst \ - functions/TIFFFieldWriteCount.rst \ - functions/TIFFbuffer.rst \ - functions/TIFFWriteRawTile.rst \ - functions/TIFFWarning.rst \ - functions/TIFFFieldDataType.rst \ - functions/TIFFWriteEncodedStrip.rst \ - functions/TIFFFieldPassCount.rst \ - functions/TIFFReadRGBAImage.rst \ - functions/TIFFReadScanline.rst \ - functions/TIFFReadEncodedStrip.rst \ - functions/TIFFFieldTag.rst \ - functions/TIFFWriteTile.rst \ - functions/TIFFReadRGBAStrip.rst \ - functions/TIFFquery.rst \ - functions/TIFFWriteEncodedTile.rst \ - functions/_TIFFauxiliary.rst \ - functions/_TIFFRewriteField.rst \ - functions/TIFFAccessTagMethods.rst \ - functions/TIFFClientInfo.rst \ - functions/TIFFCreateDirectory.rst \ - functions/TIFFCustomDirectory.rst \ - functions/TIFFCustomTagList.rst \ - functions/TIFFDeferStrileArrayWriting.rst \ - functions/TIFFFieldQuery.rst \ - functions/TIFFMergeFieldInfo.rst \ - functions/TIFFProcFunctions.rst \ - functions/TIFFReadFromUserBuffer.rst \ - functions/TIFFSetTagExtender.rst \ - functions/TIFFStrileQuery.rst \ - libtiff.rst \ - multi_page.rst \ - images.rst - -EXTRA_DIST = \ - CMakeLists.txt \ - conf.py \ - specification/bigtiffpr_images \ - images \ - $(rst_sources) - -@SPHINX_FALSE@@TIFF_DOCS_TRUE@man1_MANS = $(TIFF_MAN1_PREBUILT) -@SPHINX_TRUE@@TIFF_DOCS_TRUE@man1_MANS = $(TIFF_MAN1_GEN) -@SPHINX_FALSE@@TIFF_DOCS_TRUE@man3_MANS = $(TIFF_MAN3_PREBUILT) -@SPHINX_TRUE@@TIFF_DOCS_TRUE@man3_MANS = $(TIFF_MAN3_GEN) -@SPHINX_FALSE@@TIFF_DOCS_TRUE@html_installdir = $(srcdir)/html-prebuilt -@SPHINX_TRUE@@TIFF_DOCS_TRUE@html_installdir = html -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man1_MANS) - @$(NORMAL_INSTALL) - @list1='$(man1_MANS)'; \ - list2=''; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-man3: $(man3_MANS) - @$(NORMAL_INSTALL) - @list1='$(man3_MANS)'; \ - list2=''; \ - test -n "$(man3dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.3[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -@SPHINX_FALSE@all-local: -@TIFF_DOCS_FALSE@all-local: -all-am: Makefile $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -@SPHINX_FALSE@clean-local: -@TIFF_DOCS_FALSE@clean-local: -@TIFF_DOCS_FALSE@install-data-local: -@TIFF_DOCS_FALSE@uninstall-local: -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man3 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local uninstall-man - -uninstall-man: uninstall-man1 uninstall-man3 - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-man1 install-man3 install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-local uninstall-man uninstall-man1 \ - uninstall-man3 - -.PRECIOUS: Makefile - - -@SPHINX_TRUE@@TIFF_DOCS_TRUE@doc-html: $(EXTRA_DIST) ../configure.ac -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ $(SPHINX_BUILD) \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -D "release=$(LIBTIFF_VERSION)" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -D "version=$(LIBTIFF_MAJOR_VERSION).$(LIBTIFF_MINOR_VERSION)" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -d "$(builddir)/cache" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -b html \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ "$(srcdir)" "$(builddir)/html" -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ touch doc-html - -@SPHINX_TRUE@@TIFF_DOCS_TRUE@doc-man: $(EXTRA_DIST) ../configure.ac -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ $(SPHINX_BUILD) \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -D "release=$(LIBTIFF_VERSION)" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -D "version=$(LIBTIFF_MAJOR_VERSION).$(LIBTIFF_MINOR_VERSION)" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -d "$(builddir)/cache" \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ -b man \ -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ "$(srcdir)" "$(builddir)/man" -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ touch doc-man - -@SPHINX_TRUE@@TIFF_DOCS_TRUE@@TIFF_MAN_RULES@ - -@SPHINX_TRUE@@TIFF_DOCS_TRUE@all-local: doc-html doc-man - -@SPHINX_TRUE@@TIFF_DOCS_TRUE@clean-local: -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ rm -rf html -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ rm -rf man -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ rm -rf cache -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ rm -f doc-html -@SPHINX_TRUE@@TIFF_DOCS_TRUE@ rm -f doc-man -# Sphinx not available -@SPHINX_FALSE@@TIFF_DOCS_TRUE@doc-html: -@SPHINX_FALSE@@TIFF_DOCS_TRUE@ echo "HTML documentation generation not configured (sphinx not available)" -@SPHINX_FALSE@@TIFF_DOCS_TRUE@ exit 1 - -@SPHINX_FALSE@@TIFF_DOCS_TRUE@doc-man: -@SPHINX_FALSE@@TIFF_DOCS_TRUE@ echo "Manual page documentation generation not configured (sphinx not available)" -@SPHINX_FALSE@@TIFF_DOCS_TRUE@ exit 1 - -@SPHINX_FALSE@@TIFF_DOCS_TRUE@.PHONY: doc-html doc-man - -@TIFF_DOCS_TRUE@install-data-local: all-local -@TIFF_DOCS_TRUE@ find $(html_installdir) -type d | sed -e 's;^$(html_installdir);;' | while read dir; do \ -@TIFF_DOCS_TRUE@ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)$$dir'"; \ -@TIFF_DOCS_TRUE@ $(MKDIR_P) "$(DESTDIR)$(docdir)$$dir" || exit 1; \ -@TIFF_DOCS_TRUE@ done -@TIFF_DOCS_TRUE@ find $(html_installdir) -type f | sed -e 's;^$(html_installdir);;' | while read docfile; do \ -@TIFF_DOCS_TRUE@ docsubdir=$$(dirname $$docfile); \ -@TIFF_DOCS_TRUE@ echo "$(INSTALL_DATA) '$(html_installdir)$$docfile' '$(DESTDIR)$(docdir)$$docsubdir'"; \ -@TIFF_DOCS_TRUE@ $(INSTALL_DATA) "$(html_installdir)$$docfile" "$(DESTDIR)$(docdir)$$docsubdir"; \ -@TIFF_DOCS_TRUE@ done - -@TIFF_DOCS_TRUE@uninstall-local: -@TIFF_DOCS_TRUE@ echo "rm -r $(DESTDIR)$(docdir)" -@TIFF_DOCS_TRUE@ rm -r $(DESTDIR)$(docdir) -# Documentation generation disabled -@TIFF_DOCS_FALSE@doc-html: -@TIFF_DOCS_FALSE@ echo "HTML documentation generation not configured" -@TIFF_DOCS_FALSE@ exit 1 - -@TIFF_DOCS_FALSE@doc-man: -@TIFF_DOCS_FALSE@ echo "Manual page documentation generation not configured" -@TIFF_DOCS_FALSE@ exit 1 - -@TIFF_DOCS_FALSE@.PHONY: doc-html doc-man - -dist-hook: doc-html doc-man - cp -r html $(distdir)/html-prebuilt - cp -r man $(distdir)/man-prebuilt - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/doc/addingtags.rst b/third_party/libtiff/doc/addingtags.rst deleted file mode 100644 index 7c13e55..0000000 --- a/third_party/libtiff/doc/addingtags.rst +++ /dev/null @@ -1,370 +0,0 @@ -Defining New TIFF Tags -====================== - -Libtiff has built-in knowledge of all the standard TIFF tags, as -well as extensions. The following describes how to add knowledge of -new tags as builtins to libtiff, or how to application specific tags can -be used by applications without modifying libtiff. - -.. _TIFFFieldInfo_Definition: - -TIFFFieldInfo -------------- - -How libtiff manages specific tags is primarily controlled by the -definition for that tag value stored internally as a TIFFFieldInfo structure. -This structure looks like this: - -.. highlight:: c - -:: - - typedef struct { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */ - short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */ - TIFFDataType field_type; /* type of associated data */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - } TIFFFieldInfo; - - -.. c:member:: uint32_t TIFFFieldInfo.field_tag - - The tag number. For instance 277 for the - SamplesPerPixel tag. Builtin tags will generally have a ``#define`` in - :file:`tiff.h` for each known tag. - -.. c:member:: short TIFFFieldInfo.field_readcount - - The number of values which should be read. - The special value :c:macro:`TIFF_VARIABLE` (-1) indicates that a variable number of - values may be read. The special value :c:macro:`TIFFTAG_SPP` (-2) indicates that there - should be one value for each sample as defined by :c:macro:`TIFFTAG_SAMPLESPERPIXEL`. - The special value :c:macro:`TIFF_VARIABLE2` (-3) is similar to :c:macro:`TIFF_VARIABLE` - but the required TIFFGetField() count value must be uint32_t* instead of uint16_t* as - for :c:macro:`TIFF_VARIABLE` (-1). - For ASCII fields with variable length, this field is :c:macro:`TIFF_VARIABLE`. - -.. c:member:: short TIFFFieldInfo.field_writecount - - The number of values which should be written. - Generally the same as field_readcount. A few built-in exceptions exist, but - I haven't analysed why they differ. - -.. c:member:: TIFFDataType TIFFFieldInfo.field_type - - Type of the field. One of :c:enumerator:`TIFF_BYTE`, :c:enumerator:`TIFF_ASCII`, - :c:enumerator:`TIFF_SHORT`, :c:enumerator:`TIFF_LONG`, - :c:enumerator:`TIFF_RATIONAL`, :c:enumerator:`TIFF_SBYTE`, - :c:enumerator:`TIFF_UNDEFINED`, :c:enumerator:`TIFF_SSHORT`, - :c:enumerator:`TIFF_SLONG`, :c:enumerator:`TIFF_SRATIONAL`, - :c:enumerator:`TIFF_FLOAT`, :c:enumerator:`TIFF_DOUBLE` or - :c:enumerator:`TIFF_IFD`. - And for BigTIFF :c:enumerator:`TIFF_LONG8`, - :c:enumerator:`TIFF_SLONG8` and :c:enumerator:`TIFF_IFD8`, - which are automatically reverted to 4 byte fields in - ClassicTIFF. - -.. c:member:: unsigned short TIFFFieldInfo.field_bit - - Built-in tags stored in special fields in the - TIFF structure have assigned field numbers to distinguish them (e.g. - :c:macro:`FIELD_SAMPLESPERPIXEL`). New tags should generally just use - :c:macro:`FIELD_CUSTOM` indicating they are stored in the generic tag list. - -.. c:member:: unsigned char TIFFFieldInfo.field_oktochange - - TRUE if it is OK to change this tag value - while an image is being written. FALSE for stuff that must be set once - and then left unchanged (like ImageWidth, or PhotometricInterpretation for - instance). - -.. c:member:: unsigned char TIFFFieldInfo.field_passcount - - If TRUE, then the count value must be passed - in :c:func:`TIFFSetField`, and :c:func:`TIFFGetField`, otherwise the count is not required. - This should generally be TRUE for non-ascii variable count tags unless - the count is implicit (such as with the colormap). - -.. c:member:: char * TIFFFieldInfo.field_name - - A name for the tag. Normally mixed case (studly caps) - like ``StripByteCounts``, and relatively short. - -Within :file:`tif_dirinfo.c` file, the built-in TIFF tags are defined with -:c:struct:`TIFFField` structure that has additional parameters defining the var_arg -interface of :c:func:`TIFFSetField` and :c:func:`TIFFGetField`. - -Various functions exist for getting the internal :c:struct:`TIFFFieldInfo` -definitions, including :c:func:`_TIFFFindFieldInfo`, and -:c:func:`_TIFFFindFieldInfoByName`. See -:file:`tif_dirinfo.c` for details. - -.. _Tag_Auto_registration: - -Default Tag Auto-registration ------------------------------ - -In libtiff 3.6.0 a new mechanism was introduced allowing libtiff to -read unrecognised tags automatically. When an unknown tags is encountered, -it is automatically internally defined with a default name and a type -derived from the tag value in the file. Applications only need to predefine -application specific tags if they need to be able to set them in a file, or -if particular calling conventions are desired for :c:func:`TIFFSetField` and -:c:func:`TIFFGetField`. - -When tags are autodefined like this the :c:member:`field_readcount` and -:c:member:`field_writecount` values are always :c:macro:`TIFF_VARIABLE2` (-3). The -:c:member:`field_passcount` is always TRUE, and the :c:member:`field_bit` is -:c:macro:`FIELD_CUSTOM`. The field name will be ``Tag %d`` where the ``%d`` -is the tag number. - -Thus, to read anonymous auto-registered tags use the following: - -:: - - uint32_t count; - void* value; //has to be a pointer to the expected value type. - TIFFGetField(tif, TIFFTAG_UNKNOWN_TO_LIBTIFF, &count, &value); - - -.. _Define_Application_Tags: - -Defining Application Tags -------------------------- - -For various reasons, it is common for applications to want to define -their own tags to store information outside the core TIFF specification. -This is done by calling :c:func:`TIFFMergeFieldInfo` with one or more -:c:struct:`TIFFFieldInfo`. - -The libgeotiff library provides geospatial information extensions within -a TIFF file. First, an array of :c:struct:`TIFFFieldInfo` is prepared with -information on the new tags: - -:: - - static const TIFFFieldInfo xtiffFieldInfo[] = { - - /* XXX Insert Your tags here */ - { TIFFTAG_GEOPIXELSCALE, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoPixelScale" }, - { TIFFTAG_GEOTRANSMATRIX, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoTransformationMatrix" }, - { TIFFTAG_GEOTIEPOINTS, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoTiePoints" }, - { TIFFTAG_GEOKEYDIRECTORY, -1,-1, TIFF_SHORT, FIELD_CUSTOM, - TRUE, TRUE, "GeoKeyDirectory" }, - { TIFFTAG_GEODOUBLEPARAMS, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoDoubleParams" }, - { TIFFTAG_GEOASCIIPARAMS, -1,-1, TIFF_ASCII, FIELD_CUSTOM, - TRUE, FALSE, "GeoASCIIParams" } - }; - -In order to define the tags, we call :c:func:`TIFFMergeFieldInfo` on the -desired TIFF handle with the list of :c:struct:`TIFFFieldInfo`. - -:: - - #define N(a) (sizeof (a) / sizeof (a[0])) - - /* Install the extended Tag field info */ - TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo)); - -The tags need to be defined for each TIFF file opened - and when reading -they should be defined before the tags of the file are read, yet a valid -:c:expr:`TIFF *` is needed to merge the tags against. In order to get them -registered at the appropriate part of the setup process, it is necessary -to register our merge function as an extender callback with libtiff. -This is done with :c:func:`TIFFSetTagExtender`. We also keep track of the -previous tag extender (if any) so that we can call it from our extender -allowing a chain of customizations to take effect. - -:: - - static TIFFExtendProc _ParentExtender = NULL; - - static - void _XTIFFInitialize(void) - { - static int first_time=1; - - if (! first_time) return; /* Been there. Done that. */ - first_time = 0; - - /* Grab the inherited method and install */ - _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); - } - -The extender callback is looks like this. It merges in our new fields -and then calls the next extender if there is one in effect. - -:: - - static void - _XTIFFDefaultDirectory(TIFF *tif) - { - /* Install the extended Tag field info */ - TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo)); - - /* Since an XTIFF client module may have overridden - * the default directory method, we call it now to - * allow it to set up the rest of its own methods. - */ - - if (_ParentExtender) - (*_ParentExtender)(tif); - } - -The above approach ensures that our new definitions are used when reading -or writing any TIFF file. However, since on reading we already have -default definitions for tags, it is usually not critical to pre-define them. -If tag definitions are only required for writing custom tags, you can just -call :c:func:`TIFFMergeFieldInfo` before setting new tags. The whole extender -architecture can then be avoided. - -Adding New Builtin Tags ------------------------ - -A similar approach is taken to the above. However, the :c:struct:`_TIFFField` -information should be added to the :c:expr:`tiffFields[]` list in -:file:`tif_dirinfo.c`. This :c:struct:`_TIFFField` structure is like -TIFFFieldInfo structure but has additional members: - -The tags in the :c:expr:`tiffFields[]` list need not to be in sorted -order by the tag number. Sorting is done when setting up the -:c:expr:`TIFFFieldArray` at IFD initialization. - -.. highlight:: c - -:: - - typedef struct _TIFFField { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */ - short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */ - TIFFDataType field_type; /* type of associated data */ - uint32_t field_anonymous; /* if true, this is a unknown / anonymous tag */ - TIFFSetGetFieldType set_field_type; /* type to be passed to TIFFSetField and TIFFGetField */ - TIFFSetGetFieldType get_field_type; /* not used */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - TIFFFieldArray *field_subfields; /* if field points to child ifds, child ifd field definition array */ - }; - - -.. c:member:: uint32_t _TIFFField.field_anonymous - - Used internally to indicate auto-registered tags. - See :c:func:`TIFFFieldIsAnonymous`. - -.. c:member:: TIFFSetGetFieldType _TIFFField.set_field_type - - | The enummeration identifier gives a hint and defines the `vararg` - parameters passed to :c:func:`TIFFSetField` and :c:func:`TIFFGetField`. - | For example :c:enum:`TIFF_SETGET_UINT64` defines a single - ``uint64_t`` parameter to be passed to `TIFFSetField()` and - `TIFFGetField()`, respectively. - | To distinguish the three different array types, there are three - strings before the value type within the enummeration identifier - (e.g. TIFF_SETGET_C0_UINT64): - | "**_C0_**" for fixed arrays and thus no count parameter is required - for TIFFSetField() and TIFFGetField(), respectively. - The array length is constant and given by `field_readcount` or - `field_writecount`, respectively. - | "**_C16_**" and "**_C32_**" are for variable arrays with ``uint16_t`` - or ``uint32_t`` count parameter required for TIFFSetField() and - TIFFGetField(), respectively. But then, `field_readcount` and - `field_writecount` has to be set to -1 for _C16_ and -3 for _C32_, - respectively. - -.. c:member:: TIFFSetGetFieldType _TIFFField.get_field_type - - Currently, this parameter is not used for TIFFGetField(). - Nevertheless, it is set as a copy of set_field_type or set to - `TIFF_SETGET_UNDEFINED`. - -Normally new built-in tags should be defined with :c:macro:`FIELD_CUSTOM` -and then only two points need to be done: - -#. Define the tag in :file:`tiff.h`. -#. Add an entry in the :c:expr:`tiffFields[]` array list defined at the - top of :file:`tif_dirinfo.c`. - -However, if it is desirable for the tag value to have its own field in -the :c:struct:`TIFFDirectory` structure, then you will also need to -``#define`` a new :c:macro:`FIELD_` value for it, and add appropriate -handling as follows: - -#. Add a field to the :c:struct:`TIFFDirectory` structure in :file:`tif_dir.h` - and define a ``FIELD_*`` bit number (also update the definition of - :c:macro:`FIELD_CODEC` to reflect your addition). -#. Add entries in :c:func:`_TIFFVSetField` and :c:func:`_TIFFVGetField` - for the new tag. -#. (*optional*) If the value associated with the tag is not a scalar value - (e.g. the array for ``TransferFunction``) and requires - special processing, - then add the appropriate code to :c:func:`TIFFReadDirectory` and - :c:func:`TIFFWriteDirectory`. You're best off finding a similar tag and - cribbing code. -#. Add support to :c:func:`TIFFPrintDirectory` in :file:`tif_print.c` - to print the tag's value. - -If you want to maintain portability, beware of making assumptions -about data types. Use the typedefs (:c:type:`uint16_t`, etc. when dealing with -data on disk and ``t*_t`` when stuff is in memory) and be careful about -passing items through printf or similar vararg interfaces. - -Adding New Codec-private Tags ------------------------------ - -To add tags that are meaningful *only when a particular compression -algorithm is used* follow these steps: - -#. Define the tag in :file:`tiff.h`. -#. Allocate storage for the tag values in the private state block of - the codec. -#. Insure the state block is created when the codec is initialized. -#. At :c:func:`TIFFInitfoo` time override the method pointers in the - :c:struct:`TIFF` structure for getting, setting and printing tag values. - For example, - - :: - - sp->vgetparent = tif->tif_vgetfield; - tif->tif_vgetfield = fooVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_vsetfield; - tif->tif_vsetfield = fooVSetField; /* hook for codec tags */ - tif->tif_printdir = fooPrintDir; /* hook for codec tags */ - - (Actually you may decide not to override the - :c:member:`tif_printdir` method, but rather just specify it). -#. Create a private :c:struct:`TIFFFieldInfo` array for your tags and - merge them into the core tags at initialization time using - :c:func:`_TIFFMergeFieldInfo`; e.g. - - :: - - _TIFFMergeFieldInfo(tif, fooFieldInfo, N(fooFieldInfo)); - - (where :c:macro:`N` is a macro used liberaly throughout the distributed code). - -#. Fill in the get and set routines. Be sure to call the parent method - for tags that you are not handled directly. Also be sure to set the - ``FIELD_*`` bits for tags that are to be written to the file. Note that - you can create "pseudo-tags" by defining tags that are processed - exclusively in the get/set routines and never written to file (see - the handling of :c:macro:`TIFFTAG_FAXMODE` in :file:`tif_fax3.c` - for an example of this). -#. Fill in the print routine, if appropriate. - -Note that space has been allocated in the ``FIELD_*`` bit space for -codec-private tags. Define your bits as ``FIELD_CODEC+`` to -keep them away from the core tags. If you need more tags than there -is room for, just increase :c:macro:`td_fieldsset` at the top of -:file:`tif_dir.h`. diff --git a/third_party/libtiff/doc/build.rst b/third_party/libtiff/doc/build.rst deleted file mode 100644 index 68fe91d..0000000 --- a/third_party/libtiff/doc/build.rst +++ /dev/null @@ -1,754 +0,0 @@ -Building the TIFF Software Distribution -======================================= - -.. image:: images/cramps.gif - :width: 159 - :alt: cramps - -This chapter contains step-by-step instructions on how to configure -and build the TIFF software distribution. The software is most -easily built on a UNIX system, but with a little bit of work it can -easily be built and used on other non-UNIX platforms. - - -Building on all systems with CMake ----------------------------------- - -CMake may be used to -generate build files for most common build systems and IDEs, and -supports all UNIX-like systems as well as Windows. See -the `CMake website `_ for further -details. To build the software on you need to first run -:command:`cmake` to configure the build and generate the system-specific -build files. This reads the top-level :file:`CMakeLists.txt` file, -which probes the target system for necessary tools and functions, -checks any options you specified to configure the build, and then -outputs build files configured for your system. If using ``Unix -Makefiles``, once configuration is done, you simply -run :command:`make` (or :command:`gmake`) to build the software and -then :command:`make install` to do the installation. For other build -systems, you do the equivalent steps with the tool for that system. -For example, on any UNIX system: - -.. code-block:: shell - - $ cd ./tiff-4.0.5 - $ cmake - ...lots of messages... - $ make - ...lots of messages... - $ make test - ...lots of messages... - # make install - -Building is dependent on a :program:`make` utility and a C -(and optionally a C++) compiler, so you will need these tools. - -In general, the software is designed such that the following -targets will always be available: - -:: - - make [all] build stuff - make test run the test suite - make install build and install stuff - make clean remove object files, executables and cruft - -Build Trees -^^^^^^^^^^^ - -There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code. - -.. code-block:: shell - - $ gzip -dc tiff-4.0.5.tar.gz | tar -xf - - $ cd ./tiff-4.0.5 - $ cmake - $ make - $ make test - $ make install - -Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure. - - -.. code-block:: shell - - $ gzip -dc tiff-4.0.5.tar.gz | tar -xf - - $ mkdir tiff-4.0.5-build - $ cd ./tiff-4.0.5-build - $ cmake ../tiff-4.0.5 - $ make - $ make test - $ make install - -This second scheme is useful for: - -* building multiple targets from a single source tree -* building from a read-only source tree -* sharing the source files via a network, but building on - multiple systems -* keeping the source tree clean - (unlike :program:`autoconf`, :program:`cmake` does not provide - a ``distclean`` target, so out of source builds are - recommended) - -Generators -^^^^^^^^^^ - -The default generator for UNIX is ``Unix Makefiles``, and on Windows is -``NMake Makefiles`` or ``MSBuild`` depending upon the setup. -Run :command:`cmake --help` to list all the -generators available for your platform. For example, to use the Ninja -`build system `_ on UNIX or -Windows: - -.. code-block:: shell - - cmake -G Ninja - cmake --build . - ctest -V - cmake --build . --target install - -Note that :command:`cmake --build .` is a build-system-independent way -of building a target; you can always use the build system directly. - -Alternatively, using the MSBuild system on Windows (64-bit Release -build with VS2013): - -.. code-block:: shell - - cmake -G "Visual Studio 12 2013 Win64" - cmake --build . --config Release - ctest -V -C Release - cmake --build . --config Release --target install - -With the above configuration, it's also possible to open the generated -solution file with the Visual Studio IDE as well as building on the -command-line. - -Configuration Options -^^^^^^^^^^^^^^^^^^^^^ - -The configuration process is critical to the proper compilation, -installation, and operation of the -software. The :file:`CMakeLists.txt` script runs a series of tests to -decide whether or not the target system supports required -functionality and, if it does not, whether it can emulate or -workaround the missing functions. After running :command:`cmake`, check -the :file:`CMakeCache.txt` file; this contains all the results of the -checks performed and the options set by the user. If :program:`cmake` -failed to run, check :file:`CMakeFiles/CMakeOutput.log` -and :file:`CMakeFiles/CMakeError.log`; these should record the error -which caused the failure. - -A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are the -directories where the software is to be installed. By default the -software is installed in the :file:`/usr/local` hierarchy. To change -this behaviour the appropriate parameters can be specified on the -command line. Run :command:`cmake --help` to get a full list of possible -options, and :command:`cmake -LH` to list all the configurable options for -this software package, or :command:`cmake -LAH` to show all advanced -options in addition. Standard installation related options are shown -below. - - .. list-table:: Installation options - :widths: 10 15 - :header-rows: 1 - - * - Option - - Description - - * - ``CMAKE_INSTALL_PREFIX`` - - Installation root directory. The options below may be used to override - individual installation locations. - * - ``CMAKE_INSTALL_BINDIR`` - - user executables [:file:`PREFIX/bin`] - * - ``CMAKE_INSTALL_SBINDIR`` - - system admin executables [:file:`PREFIX/sbin`] - * - ``CMAKE_INSTALL_LIBEXECDIR`` - - program executables [:file:`PREFIX/libexec`] - * - ``CMAKE_INSTALL_SYSCONFDIR`` - - read-only single-machine data [:file:`PREFIX/etc`] - * - ``CMAKE_INSTALL_SHAREDSTATEDIR`` - - modifiable architecture-independent data [:file:`PREFIX/com`] - * - ``CMAKE_INSTALL_LOCALSTATEDIR`` - - modifiable single-machine data [:file:`PREFIX/var`] - * - ``CMAKE_INSTALL_LIBDIR`` - - object code libraries [:file:`PREFIX/lib`] - * - ``CMAKE_INSTALL_INCLUDEDIR`` - - C header files [:file:`PREFIX/include`] - * - ``CMAKE_INSTALL_OLDINCLUDEDIR`` - - C header files for non-gcc [:file:`/usr/include`] - * - ``CMAKE_INSTALL_DATAROOTDIR`` - - read-only architecture-independent data root [:file:`PREFIX/share`] - * - ``CMAKE_INSTALL_DATADIR`` - - read-only architecture-independent data [:file:`DATAROOTDIR`] - * - ``CMAKE_INSTALL_LOCALEDIR`` - - locale-dependent data [:file:`DATAROOTDIR/locale`] - * - ``CMAKE_INSTALL_MANDIR`` - - man documentation [:file:`DATAROOTDIR/man`] - * - ``CMAKE_INSTALL_DOCDIR`` - - documentation root [:file:`DATAROOTDIR/doc/tiff`] - -Also see the -CMake `documentation `_ -for `additional variables `_ -which may be set. - -Configuring Optional Packages/Support -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -:program:`cmake` commandline parameters. - -Static/Shared Objects Support -............................. - -``BUILD_SHARED_LIBS[=ON|OFF]``: - - Build shared libraries (default is ``ON``) - - This option controls whether or not to configure the software - to build a shared and static binaries for the TIFF library. Use of - shared libraries can significantly reduce the disk space needed for - users of the TIFF software. If shared libraries are not used then - the code is statically linked into each application that uses it. - -``ld-version-script[=ON|OFF]`` - - Enable linker version script (default is ``ON``) - - Add shared library symbol versioning on ELF-based systems (e.g. - Linux and FreeBSD) which use the GNU linker. This is needed if - several major versions of libtiff might be loaded at once into the - same program. - -JPEG Support -............ - -``jpeg[=ON|OFF]`` - - Enable IJG JPEG library usage (required for JPEG compression, enabled by default) - -``JPEG_INCLUDE_DIR=DIR``: - - Location of IJG JPEG library headers - -``JPEG_LIBRARY=DIR`` - - Location of IJG JPEG library binary - -The ``JPEG`` package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) ``libjpeg`` -distribution; this software is available at ``_. -The CMake script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above options for that. - -ZIP Support -........... - -The ``ZIP`` support enables support for the handling of TIFF -images with deflate-encoded data (enabled by default if -available). Support for deflate-encoded data requires the freely -available ``zlib`` distribution written by Jean-loup Gailly and -Mark Adler; this software is available at ``_. - - -Building on a UNIX System with Autoconf ---------------------------------------- - -.. program:: configure - -To build the software on a UNIX system you need to first run the -:program:`configure` shell script that is located in the top level of the -source directory. This script probes the target system for -necessary tools and functions and constructs a build environment in -which the software may be compiled. Once configuration is done, you -simply run :command:`make` (or :command:`gmake`) to build the software -and then :command:`make install` to do the installation; for example: - -.. code-block:: shell - - % cd ./tiff-4.0.5 - % ./configure - ...lots of messages... - % make - ...lots of messages... - % make check - ...lots of messages... - # make install - -Supplied Makefiles are dependent on a :program:`make` utility and a C -(and optionally a C++ compiler), so you will need these tools. - -In general, the software is designed such that the following -should be "make-able" in each directory: - - .. list-table:: Make targets - :widths: 10 15 - :header-rows: 1 - - * - Target - - Description - * - :command:`make [all]` - - build everything - * - :command:`make check` - - run the test suite - * - :command:`make install` - - build and install everything - * - :command:`make clean` - - remove object files, executables and cruft - * - :command:`make distclean` - - remove everything that can be recreated - -Note that after running :command:`make distclean` the -:program:`configure` script must be run again to create the :file:`Makefile` -and other make-related files. - -Build Trees -^^^^^^^^^^^ - -There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code. - -.. code-block:: shell - - % gzip -dc tiff-4.0.5.tar.gz | tar -xf - - % cd ./tiff-4.0.5 - % ./configure - % make - % make check - % make install - -Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure. - -.. code-block:: shell - - % gzip -dc tiff-4.0.5.tar.gz | tar -xf - - % mkdir tiff-4.0.5-build - % cd ./tiff-4.0.5-build - % ../tiff-4.0.5/configure - % make - % make check - % make install - -This second scheme is useful for: - -* building multiple targets from a single source tree -* building from a read-only source tree -* sharing the source files via a network, but building on - multiple systems - -Configuration Options -^^^^^^^^^^^^^^^^^^^^^ - -The configuration process is critical to the proper compilation, -installation, and operation of the software. The configure script -runs a series of tests to decide whether or not the target system -supports required functionality and, if it does not, whether it can -emulate or workaround the missing functions. This procedure is -fairly complicated and, due to the nonstandard nature of most UNIX -systems, prone to error. The first time that you configure the -software for use you should check the output from the configure -script and look for anything that does not make sense for your -system. - -A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are -the directories where the software is to be installed. By default -the software is installed in the :file:`/usr/local` hierarchy. To -change this behaviour the appropriate parameters can be specified -on the command line to configure. Run :command:`./configure --help` to -get a full list of possible options. Standard installation related -options are shown below. - -Installation directories: - -.. option:: --prefix=PREFIX - - install architecture-independent files in *PREFIX* [:file:`/usr/local`] - -.. option:: --exec-prefix=EPREFIX - - install architecture-dependent files in *EPREFIX* [:file:`PREFIX`] - -By default, :command:`make install` will install all the files in -:file:`/usr/local/bin`, :file:`/usr/local/lib` etc. You can specify -an installation prefix other than :file:`/usr/local` using :option:`--prefix`, -for instance ``--prefix=$HOME``. For better control, use the options below. - -Fine tuning of the installation directories: - -.. option:: --bindir=DIR - - user executables [:file:`EPREFIX/bin`] - -.. option:: --sbindir=DIR - - system admin executables [:file:`EPREFIX/sbin`] - -.. option:: --libexecdir=DIR - - program executables [:file:`EPREFIX/libexec`] - -.. option:: --sysconfdir=DIR - - read-only single-machine data [:file:`PREFIX/etc`] - -.. option:: --sharedstatedir=DIR - - modifiable architecture-independent data [:file:`PREFIX/com`] - -.. option:: --localstatedir=DIR - - modifiable single-machine data [:file:`PREFIX/var`] - -.. option:: --libdir=DIR - - object code libraries [:file:`EPREFIX/lib`] - -.. option:: --includedir=DIR - - C header files [:file:`PREFIX/include`] - -.. option:: --oldincludedir=DIR - - C header files for non-gcc [:file:`/usr/include`] - -.. option:: --datarootdir=DIR - - read-only architecture-independent data root [:file:`PREFIX/share`] - -.. option:: --datadir=DIR - - read-only architecture-independent data [:file:`DATAROOTDIR`] - -.. option:: --localedir=DIR - - locale-dependent data [:file:`DATAROOTDIR/locale`] - -.. option:: --mandir=DIR - - man documentation [:file:`DATAROOTDIR/man`] - -.. option:: --docdir=DIR - - documentation root [:file:`DATAROOTDIR/doc/tiff`] - -.. option:: --htmldir=DIR - - html documentation [:file:`DOCDIR`] - - -Program names: - -.. option:: --program-prefix=PREFIX - - prepend *PREFIX* to installed program names - -.. option:: --program-suffix=SUFFIX - -append *SUFFIX* to installed program names - -.. option:: --program-transform-name=PROGRAM - - run :command:`sed` *PROGRAM* on installed program names - -Configuring Optional Packages/Support -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -:program:`configure` script commandline parameters. - -Static/Shared Objects Support -............................. - -.. option:: --enable-shared[=PKGS] - - Build shared libraries [enabled] - -.. option:: --enable-static[=PKGS] - - Build static libraries [enabled] - - These options control whether or not to configure the software - to build a shared and static binaries for the TIFF library. Use of - shared libraries can significantly reduce the disk space needed for - users of the TIFF software. If shared libraries are not used then - the code is statically linked into each application that uses it. - By default both types of binaries are configured. - -.. option:: --enable-rpath - - Enable runtime linker paths (``-R`` libtool option) - - Add library directories (see other options below) to the TIFF - library run-time linker path. - -.. option:: --enable-ld-version-script - - Enable linker version script [yes] - - Add shared library symbol versioning on ELF-based systems (e.g. - Linux and FreeBSD) which use the GNU linker. This is needed if - several major versions of libtiff might be loaded at once into the - same program. - -JPEG Support -............ - -.. option:: --disable-jpeg - - Disable IJG JPEG library usage (required for JPEG compression, enabled by default) - -.. option:: --with-jpeg-include-dir=DIR - - Location of IJG JPEG library headers - -.. option:: --with-jpeg-lib-dir=DIR - - Location of IJG JPEG library binary) - -The ``JPEG`` package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) ``libjpeg`` -distribution; this software is available at -``_. The :program:`configure` -script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above switches for that. - -ZIP Support -........... - -The ``ZIP`` support enables support for the handling of -TIFF images with deflate-encoded data. Support for deflate-encoded -data requires the freely available ``zlib`` distribution -written by Jean-loup Gailly and Mark Adler; this software is -available at ``_. Support will be -enabled automatically if ``zlib`` is found. - - -Building the Software on Other Systems --------------------------------------- - -This section contains information that might be useful if you are -working on a non-UNIX system that is not directly supported. All -library-related files described below are located in the -:file:`libtiff` directory. - -The library requires two files that are generated -*on-the-fly*. The file :file:`tif_fax3sm.c` has the state -tables for the Group 3 and Group 4 decoders. This file is generated -by the :program:`mkg3states` program on a UNIX system; for -example: - -.. code-block:: shell - - cd libtiff - cc -o mkg3states mkg3states.c - rm -f tif_fax3sm.c - ./mkg3states -c const tif_fax3sm.c - -The ``-c`` option can be used to control whether or not the -resulting tables are generated with a ``const`` declaration. -The ``-s`` option can be used to specify a C storage class for -the table declarations. The ``-b`` option can be used to force -data values to be explicitly bracketed with ``{}`` (apparently -needed for some MS-Windows compilers); otherwise the structures are -emitted in as compact a format as possible. Consult the source code -for this program if you have questions. - -The second file required to build the library, :file:`version.h`, -contains the version information returned by the -:c:func:`TIFFGetVersion` routine. This file is built on most systems -using the :file:`mkversion` program and the contents of the -:file:`VERSION` and :file:`tiff.alpha` files; for example, - -.. code-block:: shell - - cd libtiff - cc -o mkversion mkversion.c - rm -f version.h - ./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h - -Otherwise, when building the library on a non-UNIX system be -sure to consult the files :file:`tiffcomp.h` and :file:`tiffconf.h`. -The former contains system compatibility definitions while the -latter is provided so that the software configuration can be -controlled on systems that do not support the make facility for -building the software. - -Systems without a 32-bit compiler may not be able to handle some -of the codecs in the library; especially the Group 3 and 4 decoder. -If you encounter problems try disabling support for a particular -codec; consult the :doc:`internals`. - -Programs in the tools directory are written to assume an ANSI C -compilation environment. There may be a few POSIX'isms as well. The -code in the :file:`port` directory is provided to emulate routines -that may be missing on some systems. On UNIX systems the -:program:`configure` script automatically figures out which routines -are not present on a system and enables the use of the equivalent -emulation routines from the :file:`port` directory. It may be -necessary to manually do this work on a non-UNIX system. - - -Testing the software --------------------- - -Assuming you have working versions of :doc:`/tools/tiffgt`, you can now use -it to view any of the sample images available for testing, or try -:doc:`/tools/tiffinfo` to display the file metadata. See the -:doc:`images` section on obtaining the test images. Otherwise, you can -do a cursory check of the library with the :doc:`/tools/tiffcp` and -:doc:`/tools/tiffcmp` programs. For example, - -.. code-block:: shell - - tiffcp -lzw cramps.tif x.tif - tiffcmp cramps.tif x.tif - -(:program:`tiffcmp` should be silent if the files compare -correctly). - - -LibTIFF source files --------------------- - -The following files make up the core library: - - .. list-table:: Core library source files - :widths: 5 15 - :header-rows: 1 - - * - File - - Description - - * - :file:`libtiff/tiff.h` - - TIFF spec definitions - * - :file:`libtiff/tiffconf.h` - - non-UNIX configuration definitions - * - :file:`libtiff/tiffio.h` - - public TIFF library definitions - * - :file:`libtiff/tiffiop.h` - - private TIFF library definitions - * - :file:`libtiff/t4.h` - - CCITT Group 3/4 code tables+definitions - * - :file:`libtiff/tif_dir.h` - - private defs for TIFF directory handling - * - :file:`libtiff/tif_fax3.h` - - CCITT Group 3/4-related definitions - * - :file:`libtiff/tif_predict.h` - - private defs for Predictor tag support - * - :file:`libtiff/tiffvers.h` - - version string - * - :file:`libtiff/uvcode.h` - - LogL/LogLuv codec-specific definitions - * - :file:`libtiff/tif_aux.c` - - auxiliary directory-related functions - * - :file:`libtiff/tif_close.c` - - close an open TIFF file - * - :file:`libtiff/tif_codec.c` - - configuration table of builtin codecs - * - :file:`libtiff/tif_color.c` - - colorspace transforms - * - :file:`libtiff/tif_compress.c` - - compression scheme support - * - :file:`libtiff/tif_dir.c` - - directory tag interface code - * - :file:`libtiff/tif_dirinfo.c` - - directory known tag support code - * - :file:`libtiff/tif_dirread.c` - - directory reading code - * - :file:`libtiff/tif_dirwrite.c` - - directory writing code - * - :file:`libtiff/tif_dumpmode.c` - - "no" compression codec - * - :file:`libtiff/tif_error.c` - - library error handler - * - :file:`libtiff/tif_fax3.c` - - CCITT Group 3 and 4 codec - * - :file:`libtiff/tif_fax3sm.c` - - G3/G4 state tables (generated by mkg3states) - * - :file:`libtiff/tif_flush.c` - - i/o and directory state flushing - * - :file:`libtiff/tif_getimage.c` - - :doc:`/functions/TIFFRGBAImage` support - * - :file:`libtiff/tif_jbig.c` - - JBIG codec - * - :file:`libtiff/tif_jpeg.c` - - JPEG codec (interface to the IJG distribution) - * - :file:`libtiff/tif_jpeg_12.c` - - 12-bit JPEG codec (interface to the IJG distribution) - * - :file:`libtiff/tif_lerc.c` - - LERC codec - * - :file:`libtiff/tif_luv.c` - - SGI LogL/LogLuv codec - * - :file:`libtiff/tif_lzma.c` - - LZMA codec - * - :file:`libtiff/tif_lzw.c` - - LZW codec - * - :file:`libtiff/tif_next.c` - - NeXT 2-bit scheme codec (decoding only) - * - :file:`libtiff/tif_ojpeg.c` - - Old JPEG codec (obsolete, decoding only) - * - :file:`libtiff/tif_open.c` - - open and simply query code - * - :file:`libtiff/tif_packbits.c` - - Packbits codec - * - :file:`libtiff/tif_pixarlog.c` - - Pixar codec - * - :file:`libtiff/tif_predict.c` - - Predictor tag support - * - :file:`libtiff/tif_print.c` - - directory printing support - * - :file:`libtiff/tif_read.c` - - image data reading support - * - :file:`libtiff/tif_strip.c` - - some strip-related code - * - :file:`libtiff/tif_swab.c` - - byte and bit swapping support - * - :file:`libtiff/tif_thunder.c` - - Thunderscan codec (decoding only) - * - :file:`libtiff/tif_tile.c` - - some tile-related code - * - :file:`libtiff/tif_unix.c` - - UNIX-related OS support - * - :file:`libtiff/tif_version.c` - - library version support - * - :file:`libtiff/tif_warning.c` - - library warning handler - * - :file:`libtiff/tif_win32.c` - - Win32 (Windows)-related OS support - * - :file:`libtiff/tif_write.c` - - image data writing support - * - :file:`libtiff/tif_zip.c` - - Deflate codec - * - :file:`libtiff/tif_zstd.c` - - ZSTD codec - - * - :file:`libtiff/mkg3states.c` - - program to generate G3/G4 decoder state tables - * - :file:`libtiff/mkspans.c` - - program to generate black-white span tables diff --git a/third_party/libtiff/doc/conf.py b/third_party/libtiff/doc/conf.py deleted file mode 100644 index 343eeef..0000000 --- a/third_party/libtiff/doc/conf.py +++ /dev/null @@ -1,179 +0,0 @@ -# -*- coding: utf-8 -*- -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -# Substitutions from external build system. -srcdir = None -builddir = None -ext_source_branch = None -ext_source_user = None - - -# -- Project information ----------------------------------------------------- - -project = 'LibTIFF' -copyright = '1988-2025, LibTIFF contributors' -author = 'LibTIFF contributors' - -# The full version, including alpha/beta/rc tags -release = 'UNDEFINED' -version = 'UNDEFINED' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.extlinks' -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - -extlinks = { - # GitLab links - 'issue' : ('https://gitlab.com/libtiff/libtiff/-/issues/%s', 'issue #%s'), - 'merge' : ('https://gitlab.com/libtiff/libtiff/-/merge_requests/%s', 'merge request #%s'), - 'commit' : ('https://gitlab.com/libtiff/libtiff/-/commit/%s', 'commit %s'), - 'branch' : ('https://gitlab.com/libtiff/libtiff/-/tree/%s', 'branch %s'), - 'tag' : ('https://gitlab.com/libtiff/libtiff/-/tags/%s', 'tag %s'), - - # Old Bugzilla - 'bugzilla' : ('http://bugzilla.maptools.org/show_bug.cgi?id=%s', 'MapTools bugzilla #%s'), - 'bugzilla-rs' : ('http://bugzilla.remotesensing.org/show_bug.cgi?id=%s', 'Remote Sensing bugzilla #%s [no longer available]'), - - # GDAL - 'gdal-trac' : ('http://trac.osgeo.org/gdal/ticket/%s', 'GDAL trac #%s'), - 'oss-fuzz' : ('https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=%s', 'OSS-Fuzz #%s'), - - # Security - 'cve' : ('https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s', 'CVE-%s'), -} - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinxdoc' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -html_extra_path = [] - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('functions/libtiff', 'libtiff', 'introduction to libtiff, a library for reading and writing TIFF files', author, '3tiff'), - - ('tools/fax2ps', 'fax2ps', 'convert a TIFF facsimile to compressed PostScript™', author, 1), - ('tools/fax2tiff', 'fax2tiff', 'create a TIFF Class F fax file from raw fax data', author, 1), - ('tools/pal2rgb', 'pal2rgb', 'convert a palette color TIFF image to a full color image', author, 1), - ('tools/ppm2tiff', 'ppm2tiff', 'create a TIFF file from PPM, PGM and PBM image files', author, 1), - ('tools/raw2tiff', 'raw2tiff', 'create a TIFF file from a raw data file', author, 1), - ('tools/rgb2ycbcr', 'rgb2ycbcr', 'convert non-YCbCr TIFF images to a YCbCr TIFF image', author, 1), - ('tools/thumbnail', 'thumbnail', 'create a TIFF file with thumbnail images', author, 1), - ('tools/tiff2bw', 'tiff2bw', 'convert a color TIFF image to greyscale', author, 1), - ('tools/tiff2pdf', 'tiff2pdf', 'convert a TIFF image to a PDF document', author, 1), - ('tools/tiff2ps', 'tiff2ps', 'convert TIFF image to PostScript™', author, 1), - ('tools/tiff2rgba', 'tiff2rgba', 'convert a TIFF image to RGBA color space', author, 1), - ('tools/tiffcmp', 'tiffcmp', 'compare two TIFF files', author, 1), - ('tools/tiffcp', 'tiffcp', 'copy (and possibly convert) a TIFF file', author, 1), - ('tools/tiffcrop', 'tiffcrop', 'select, copy, crop, convert, extract, and/or process one or more TIFF files', author, 1), - ('tools/tiffdither', 'tiffdither', 'convert a greyscale TIFF image to bilevel using dithering', author, 1), - ('tools/tiffdump', 'tiffdump', 'print verbatim information about TIFF files', author, 1), - ('tools/tiffgt', 'tiffgt', 'display an image stored in a TIFF file (Silicon Graphics version)', author, 1), - ('tools/tiffinfo', 'tiffinfo', 'print information about TIFF files', author, 1), - ('tools/tiffmedian', 'tiffmedian', 'apply the median cut algorithm to data in a TIFF file', author, 1), - ('tools/tiffset', 'tiffset', 'set or unset a field in a TIFF header', author, 1), - ('tools/tiffsplit', 'tiffsplit', 'split a multi-image TIFF into single-image TIFF files', author, 1), - - ('functions/_TIFFauxiliary', '_TIFFauxiliary', 'auxiliary functions', author, '3tiff'), - ('functions/_TIFFRewriteField', '_TIFFRewriteField', 'rewrite a field in the directory on disk', author, '3tiff'), - ('functions/TIFFAccessTagMethods', 'TIFFAccessTagMethods', 'provides read/write access to the TIFFTagMethods', author, '3tiff'), - ('functions/TIFFbuffer', 'TIFFbuffer', 'I/O buffering control routines', author, '3tiff'), - ('functions/TIFFClientInfo', 'TIFFClientInfo', 'provides a method to hand over user defined data from one routine to another', author, '3tiff'), - ('functions/TIFFClose', 'TIFFClose', 'close a previously opened TIFF file', author, '3tiff'), - ('functions/TIFFcodec', 'TIFFcodec', 'codec-related utility routines', author, '3tiff'), - ('functions/TIFFcolor', 'TIFFcolor', 'color conversion routines', author, '3tiff'), - ('functions/TIFFCreateDirectory', 'TIFFCreateDirectory', 'routines to create a directory and retrieve information about directories', author, '3tiff'), - ('functions/TIFFCustomDirectory', 'TIFFCustomDirectory', 'routines to create a custom directory', author, '3tiff'), - ('functions/TIFFCustomTagList', 'TIFFCustomTagList', 'returns information about the custom tag list', author, '3tiff'), - ('functions/TIFFDataWidth', 'TIFFDataWidth', 'get the size of TIFF data types', author, '3tiff'), - ('functions/TIFFDeferStrileArrayWriting', 'TIFFDeferStrileArrayWriting', 'defer strile array writing', author, '3tiff'), - ('functions/TIFFError', 'TIFFError', 'library error handling interface', author, '3tiff'), - ('functions/TIFFFieldDataType', 'TIFFFieldDataType', 'get TIFF data type from field information', author, '3tiff'), - ('functions/TIFFFieldName', 'TIFFFieldName', 'get TIFF field name from field information', author, '3tiff'), - ('functions/TIFFFieldPassCount', 'TIFFFieldPassCount', 'get whether to pass a count to TIFFGetField/TIFFSetField', author, '3tiff'), - ('functions/TIFFFieldQuery', 'TIFFFieldQuery', 'routines to query TIFF field information', author, '3tiff'), - ('functions/TIFFFieldReadCount', 'TIFFFieldReadCount', 'get number of values to be read from field', author, '3tiff'), - ('functions/TIFFFieldTag', 'TIFFFieldTag', 'get TIFF field tag value from field information', author, '3tiff'), - ('functions/TIFFFieldWriteCount', 'TIFFFieldWriteCount', 'get number of values to be written to field', author, '3tiff'), - ('functions/TIFFFlush', 'TIFFFlush', 'flush pending writes to an open TIFF file', author, '3tiff'), - ('functions/TIFFGetField', 'TIFFGetField', 'get the value(s) of a tag in an open TIFF file', author, '3tiff'), - ('functions/TIFFmemory', 'TIFFmemory', 'memory management-related functions for use with TIFF files', author, '3tiff'), - ('functions/TIFFMergeFieldInfo', 'TIFFMergeFieldInfo', 'add application-defined TIFF tags to the list of known libtiff tags', author, '3tiff'), - ('functions/TIFFOpen', 'TIFFOpen', 'open a TIFF file for reading or writing', author, '3tiff'), - ('functions/TIFFPrintDirectory', 'TIFFPrintDirectory', 'print a description of a TIFF directory', author, '3tiff'), - ('functions/TIFFProcFunctions', 'TIFFProcFunctions', 'set TIFF processing functions', author, '3tiff'), - ('functions/TIFFquery', 'TIFFquery', 'query routines', author, '3tiff'), - ('functions/TIFFReadDirectory', 'TIFFReadDirectory', 'get the contents of the next directory in an open TIFF file', author, '3tiff'), - ('functions/TIFFReadEncodedStrip', 'TIFFReadEncodedStrip', 'read and decode a strip of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFReadEncodedTile', 'TIFFReadEncodedTile', 'read and decode a tile of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFReadFromUserBuffer', 'TIFFReadFromUserBuffer', 'decode data using an user defined buffer', author, '3tiff'), - ('functions/TIFFReadRawStrip', 'TIFFReadRawStrip', 'return the undecoded contents of a strip of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFReadRawTile', 'TIFFReadRawTile', 'return an undecoded tile of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFReadRGBAImage', 'TIFFReadRGBAImage', 'read and decode an image into a fixed-format raster', author, '3tiff'), - ('functions/TIFFReadRGBAStrip', 'TIFFReadRGBAStrip', 'read and decode an image strip into a fixed-format raster', author, '3tiff'), - ('functions/TIFFReadRGBATile', 'TIFFReadRGBATile', 'read and decode an image tile into a fixed-format raster', author, '3tiff'), - ('functions/TIFFReadScanline', 'TIFFReadScanline', 'read and decode a scanline of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFReadTile', 'TIFFReadTile', 'read and decode a tile of data from an open TIFF file', author, '3tiff'), - ('functions/TIFFRGBAImage', 'TIFFRGBAImage', 'read and decode an image into a raster', author, '3tiff'), - ('functions/TIFFSetDirectory', 'TIFFSetDirectory', 'set the current directory for an open TIFF file', author, '3tiff'), - ('functions/TIFFSetField', 'TIFFSetField', 'set the value(s) of a tag in a TIFF file open for writing', author, '3tiff'), - ('functions/TIFFSetTagExtender', 'TIFFSetTagExtender', 'register the merge function for user defined tags as an extender callback with libtiff', author, '3tiff'), - ('functions/TIFFsize', 'TIFFsize', 'return the size of various items associated with an open TIFF file', author, '3tiff'), - ('functions/TIFFStrileQuery', 'TIFFStrileQuery', 'get strile byte count and offset', author, '3tiff'), - ('functions/TIFFstrip', 'TIFFstrip', 'strip-related utility routines', author, '3tiff'), - ('functions/TIFFswab', 'TIFFswab', 'byte- and bit-swapping routines', author, '3tiff'), - ('functions/TIFFtile', 'TIFFtile', 'tile-related utility routines', author, '3tiff'), - ('functions/TIFFWarning', 'TIFFWarning', 'library warning interface', author, '3tiff'), - ('functions/TIFFWriteDirectory', 'TIFFWriteDirectory', 'write the current directory in an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteEncodedStrip', 'TIFFWriteEncodedStrip', 'compress and write a strip of data to an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteEncodedTile', 'TIFFWriteEncodedTile', 'compress and write a tile of data to an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteRawStrip', 'TIFFWriteRawStrip', 'write a strip of raw data to an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteRawTile', 'TIFFWriteRawTile', 'write a tile of raw data to an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteScanline', 'TIFFWriteScanline', 'write a scanline to an open TIFF file', author, '3tiff'), - ('functions/TIFFWriteTile', 'TIFFWriteTile', 'encode and write a tile of data to an open TIFF file', author, '3tiff'), -] - -# If true, show URL addresses after external links. -man_show_urls = True - -smartquotes = False diff --git a/third_party/libtiff/doc/contrib.rst b/third_party/libtiff/doc/contrib.rst deleted file mode 100644 index 0b94970..0000000 --- a/third_party/libtiff/doc/contrib.rst +++ /dev/null @@ -1,88 +0,0 @@ -Contributed TIFF Software -========================= - -.. image:: images/smallliz.jpg - :width: 108 - :alt: smallliz - -The :file:`contrib` directory has contributed software that -uses the TIFF library or which is associated with the library -(typically glue and guidance for ports to non-UNIX platforms, or tools that -aren't directly TIFF related). - -.. list-table:: Contributed software - :widths: 5 20 - :header-rows: 1 - - * - Location - - Description - - * - :file:`contrib/dbs` - - various tools from Dan & Chris Sears, including a simple X-based viewer - - * - :file:`contrib/ras` - - two programs by Patrick Naughton for converting - between Sun rasterfile format and TIFF (these - require :file:`libpixrect.a`, as opposed to the one in - tools that doesn't) - - * - :file:`contrib/mac-mpw` - - :file:`contrib/mac-cw` - - scripts and files from Niles Ritter for building - the library and tools under Macintosh/MPW C and - code warrior. - - * - :file:`contrib/acorn` - - scripts and files from Peter Greenham for building - the library and tools on an Acorn RISC OS system. - - * - :file:`contrib/win32` - - scripts and files from Scott Wagner for building - the library under Windows NT and Windows 95. (The makefile.vc in the - libtiff/libtiff directory may be sufficient for most users.) - - * - :file:`contrib/win_dib` - - two separate implementations of TIFF to DIB code suitable for any Win32 - platform. Contributed by Mark James, and Philippe Tenenhaus. - - * - :file:`contrib/ojpeg` - - Patch for IJG JPEG library related to support for some Old JPEG in TIFF files. - Contributed by Scott Marovich. - - * - :file:`contrib/dosdjgpp` - - scripts and files from Alexander Lehmann for building - the library under MSDOS with the DJGPP v2 compiler. - - * - :file:`contrib/tags` - - scripts and files from Niles Ritter for adding private - tag support at runtime, without changing libtiff. - - * - :file:`contrib/mfs` - - code from Mike Johnson to read+write images in memory - without modifying the library - - * - :file:`contrib/pds` - - various routines from Conrad Poelman; a TIFF image iterator and - code to support "private sub-directories" - - * - :file:`contrib/iptcutil` - - A utility by `Bill Radcliffe `_ to - convert an extracted IPTC Newsphoto caption from a binary blob to - ASCII text, and vice versa. IPTC binary blobs can be extracted from - images via the `ImageMagick `_ convert(1) - utility. - - * - :file:`contrib/addtiffo` - - A utility (and supporting subroutine) for building - one or more reduce resolution - overviews to an existing TIFF file. Supplied by - `Frank Warmerdam `_. - - * - :file:`contrib/stream` - - A class (TiffStream) for accessing TIFF files through a C++ stream - interface. Supplied by `Avi Bleiweiss `_. - - -Questions regarding these packages are usually best directed toward -their authors. diff --git a/third_party/libtiff/doc/functions.rst b/third_party/libtiff/doc/functions.rst deleted file mode 100644 index 8b721e3..0000000 --- a/third_party/libtiff/doc/functions.rst +++ /dev/null @@ -1,66 +0,0 @@ -TIFF Functions Overview -======================= - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - functions/libtiff - functions/TIFFAccessTagMethods - functions/TIFFbuffer - functions/TIFFClientInfo - functions/TIFFClose - functions/TIFFcodec - functions/TIFFcolor - functions/TIFFCreateDirectory - functions/TIFFCustomDirectory - functions/TIFFCustomTagList - functions/TIFFDataWidth - functions/TIFFDeferStrileArrayWriting - functions/TIFFError - functions/TIFFFieldDataType - functions/TIFFFieldName - functions/TIFFFieldPassCount - functions/TIFFFieldQuery - functions/TIFFFieldReadCount - functions/TIFFFieldTag - functions/TIFFFieldWriteCount - functions/TIFFFlush - functions/TIFFGetField - functions/TIFFmemory - functions/TIFFMergeFieldInfo - functions/TIFFOpen - functions/TIFFOpenOptions - functions/TIFFPrintDirectory - functions/TIFFProcFunctions - functions/TIFFquery - functions/TIFFReadDirectory - functions/TIFFReadEncodedStrip - functions/TIFFReadEncodedTile - functions/TIFFReadFromUserBuffer - functions/TIFFReadRawStrip - functions/TIFFReadRawTile - functions/TIFFReadRGBAImage - functions/TIFFReadRGBAStrip - functions/TIFFReadRGBATile - functions/TIFFReadScanline - functions/TIFFReadTile - functions/TIFFRGBAImage - functions/TIFFSetDirectory - functions/TIFFSetField - functions/TIFFSetTagExtender - functions/TIFFsize - functions/TIFFStrileQuery - functions/TIFFstrip - functions/TIFFswab - functions/TIFFtile - functions/TIFFWarning - functions/TIFFWriteDirectory - functions/TIFFWriteEncodedStrip - functions/TIFFWriteEncodedTile - functions/TIFFWriteRawStrip - functions/TIFFWriteRawTile - functions/TIFFWriteScanline - functions/TIFFWriteTile - functions/_TIFFauxiliary - functions/_TIFFRewriteField diff --git a/third_party/libtiff/doc/functions/TIFFAccessTagMethods.rst b/third_party/libtiff/doc/functions/TIFFAccessTagMethods.rst deleted file mode 100644 index c9a53dc..0000000 --- a/third_party/libtiff/doc/functions/TIFFAccessTagMethods.rst +++ /dev/null @@ -1,30 +0,0 @@ -TIFFAccessTagMethods -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFTagMethods *TIFFAccessTagMethods(TIFF* tif) - -Description ------------ - -This provides read/write access to the TIFFTagMethods within the TIFF -structure to application code without giving access to the private TIFF -structure. - -Diagnostics ------------ - -None - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFClientInfo.rst b/third_party/libtiff/doc/functions/TIFFClientInfo.rst deleted file mode 100644 index 7576d22..0000000 --- a/third_party/libtiff/doc/functions/TIFFClientInfo.rst +++ /dev/null @@ -1,40 +0,0 @@ -TIFFClientInfo -============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void *TIFFGetClientInfo(TIFF* tif, const char *name) - -.. c:function:: void TIFFSetClientInfo(TIFF* tif, void *data, const char *name) - -Description ------------ - -.. TODO: Check explanation of clientinfo linked list intention and usage. - -The *clientinfo* linked list provides a method to hand over user defined -data from one routine to another via the internal ``tif`` storage of the -``libtiff`` library. - -:c:func:`TIFFGetClientInfo` returns a pointer to the data of the named entry -in the clientinfo-list. If the *name* is not found ``NULL`` is returned. - -:c:func:`TIFFSetClientInfo` adds or replaces an entry in the clientinfo-list -with the *name* and the pointer to the *data* provided by the caller. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/functions/TIFFClose.rst b/third_party/libtiff/doc/functions/TIFFClose.rst deleted file mode 100644 index 3056e06..0000000 --- a/third_party/libtiff/doc/functions/TIFFClose.rst +++ /dev/null @@ -1,51 +0,0 @@ -TIFFClose -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFClose(TIFF* tif) - -.. c:function:: void TIFFCleanup(TIFF* tif) - -Description ------------ - -:c:func:`TIFFClose` closes a file that was previously opened with -:c:func:`TIFFOpen`. Any buffered data are flushed to the file, including -the contents of the current directory (if modified); and all resources -are reclaimed. :c:func:`TIFFClose` calls :c:func:`TIFFCleanup` and then -the associated function to close the file handle. - -:c:func:`TIFFCleanup` is an auxiliary function to free the TIFF structure. -The given structure will be completely freed, so you should save opened file -handle and pointer to the close procedure in external variables before -calling :c:func:`TIFFCleanup`, if you will need these ones to close the file. -:c:func:`TIFFCleanup` calls :c:func:`TIFFFlush`, which stores all pending data -in the file. - -.. note:: - Both functions have no return value. - If you want to check whether the data has been successfully written - to the file, you can call :c:func:`TIFFFlush`, which has a return value, - before :c:func:`TIFFClose`. - - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFCreateDirectory.rst b/third_party/libtiff/doc/functions/TIFFCreateDirectory.rst deleted file mode 100644 index 1f794d5..0000000 --- a/third_party/libtiff/doc/functions/TIFFCreateDirectory.rst +++ /dev/null @@ -1,83 +0,0 @@ -TIFFCreateDirectory -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFCreateDirectory(TIFF* tif) - -.. c:function:: int TIFFFreeDirectory(TIFF* tif) - -.. c:function:: int TIFFUnlinkDirectory(TIFF* tif, tdir_t dirn) - -Description ------------ - -The following routines create or release a directory. - -:c:func:`TIFFCreateDirectory` setup for a directory in a open TIFF file. -The newly created directory will not exist on the file till -:c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, -:c:func:`TIFFFlush` or :c:func:`TIFFClose` is called. -:c:func:`TIFFWriteDirectory` also creates a new directory, -frees the ``*tif`` structure and sets up a new one. - -:c:func:`TIFFFreeDirectory` releases allocated storage associated with a -directory, especially custom-fields. -However, the main part of the directory is not touched. Routine -:c:func:`TIFFCleanup` calls :c:func:`TIFFFreeDirectory` to release -the directory part of the `tif` structure. - -:c:func:`TIFFUnlinkDirectory` unlink the specified directory from the -directory chain. -The parameter *dirn* specifies the subfile/directory -as an integer number, with the first directory numbered one (1). -This is different to :c:func:`TIFFSetDirectory` or :c:func:`TIFFCurrentDirectory` where the first -directory starts with zero (0). - -Directory query functions :c:func:`TIFFCurrentDirectory`, -:c:func:`TIFFCurrentDirOffset`, :c:func:`TIFFLastDirectory` and -:c:func:`TIFFNumberOfDirectories` retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information! - -Notes ------ - -Be aware: - -- that until a directory is not written to file AND read back, the - query functions won't retrieve the correct information! -- that the newly created directory will not exist on the file till - :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, - :c:func:`TIFFFlush` or :c:func:`TIFFClose` has been called. -- that :c:func:`TIFFCreateDirectory` and :c:func:`TIFFWriteDirectory` - create a new directory, free the ``*tif`` structure and set up a new one. -- that unlike :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory` - does not free up the directory data structures in memory. - -After ``libtiff`` version 4.6.0 :c:func:`TIFFCreateDirectory` also releases -the directory part of the `tif` structure by calling :c:func:`TIFFFreeDirectory`, -which should have been called by the user application before creating a new directory. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFCustomDirectory.rst b/third_party/libtiff/doc/functions/TIFFCustomDirectory.rst deleted file mode 100644 index c61b694..0000000 --- a/third_party/libtiff/doc/functions/TIFFCustomDirectory.rst +++ /dev/null @@ -1,212 +0,0 @@ -TIFFCustomDirectory -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray) - -.. c:function:: int TIFFCreateEXIFDirectory(TIFF* tif) - -.. c:function:: int TIFFCreateGPSDirectory(TIFF* tif) - -.. c:function:: int TIFFWriteCustomDirectory(TIFF* tif, uint64 *pdiroff) - -.. c:function:: int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray) - -.. c:function:: int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff) - -.. c:function:: int TIFFReadGPSDirectory(TIFF* tif, toff_t diroff) - -.. c:function:: const TIFFFieldArray* _TIFFGetExifFields(void) - -.. c:function:: const TIFFFieldArray* _TIFFGetGpsFields(void) - -Description ------------ - -The following routines create a custom directory and retrieve information -about directories in an open TIFF file. - -:c:func:`TIFFCreateCustomDirectory`, :c:func:`TIFFCreateEXIFDirectory`, -:c:func:`TIFFCreateGPSDirectory` will setup a custom directory or one -of the predefined EXIF or GPS directories and set the context of the -TIFF-handle ``tif`` to that custom directory for functions -like :c:func:`TIFFSetField`. - -:c:func:`TIFFWriteCustomDirectory` will write the contents of the -current custom directory to the file and return the offset to that -directory in :c:var:`pdiroff`. That offset has to be written to the main-IFD: - -.. highlight:: c - -:: - - /* Go back to the first directory, and add the EXIFIFD pointer. */ - TIFFSetDirectory(tif, 0); - TIFFSetField(tif, TIFFTAG_EXIFIFD, pdiroff); - - -:c:func:`TIFFReadCustomDirectory` will read the custom directory from the -arbitrary offset into the :c:var:`infoarray` and sets the context of the -TIFF-handle :c:var:`tif` to that custom directory for functions like -:c:func:`TIFFReadField`. The :c:type:`TIFFFieldArray` :c:var:`infoarray` -has to be according the layout of the custom directory. For the predefined -EXIF and GPS directories, the relevant :c:type:`TIFFFieldArray` definitions -are hidden within the functions :c:func:`TIFFReadEXIFDirectory` and -:c:func:`TIFFReadGPSDirectory` The code is very similar to :c:func:`TIFFReadDirectory`. -The offset to the custom directory diroff has to be read from the -relative TIFF tag first. - -:c:func:`_TIFFGetExifFields` and :c:func:`_TIFFGetGpsFields` will -return a pointer to the ``libtiff`` internal definition list of the -EXIF and GPS tags, respectively. - -Notes ------ - -Be aware - -- that until a directory is not written to file AND read back, the query - functions won't retrieve the correct information! -- that the newly created directory will not exist on the file till - :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, - :c:func:`TIFFFlush` or :c:func:`TIFFClose` has been called. -- that :c:func:`TIFFCreateDirectory` and :c:func:`TIFFWriteDirectory` - create a new directory, free the ``*tif`` structure and set up a new one. -- that unlike :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory` - does not free up the directory data structures in memory. -- that LibTiff does not support custom directory chains - (NextIFD pointing to another IFD). - NextIFD of custom directories is always set to zero - and should be zero when reading. - -Unfortunately to create or read custom directories with predefined fields -it is necessary to include the private tif_dir.h. However, for EXIF and -GPS directories, which have a predefined schema within ``libtiff``, this -is not necessary. There are some test programmes that briefly demonstrate -the creation and reading of EXIF, GPS and custom directories. -See test/custom_dir.c and test/custom_dir_EXIF_231.c - -After ``libtiff`` version 4.6.0 :c:func:`TIFFCreateCustomDirectory`, -:c:func:`TIFFCreateEXIFDirectory` and :c:func:`TIFFCreateGPSDirectory` also -releases the directory part of the `tif` structure by calling :c:func:`TIFFFreeDirectory`, -which should have been called by the user application before creating a new directory. - -Hints and detailed instructions -------------------------------- - -Writing TIFF files with more than one directory (IFD) is not easy because -some side effects need to be known. - -The main point here is that there can only be one ``tif`` structure in -the main memory for a file, which can only hold the tags of one directory -at a time. It is useless to work with two different tiffOut1, tiffOut2 -pointers, because there is only ONE TIFF object (TIFF directory) within -the ``libtiff``. If you want to address a second directory in the file, -the tags of the current directory must first be saved in the file, -otherwise they will be lost (overwritten or mixed). Then the ``tif`` -structure in the main memory must be tidied up, otherwise the old tags -will beincluded in the new directory. -This can be done either by creating a new, empty ``tif`` structure or by -reading in an directory previously saved in the file. - -A sequence to handle a second (or third) TIFF directory - in this case -the GPS IFD - is as follows: - -1) Create TIFF file -2) Complete the "normal" metadata -3) Set the tag for the custom directory with a “dummy” value in order to - get the tag reserved. The final value will be inserted lateron. This - prevents the main directory from being written to the file again at an - additional area, leaving the first memory area unused: - -.. highlight:: c - -:: - - TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); - -4) Save current TIFF-directory to file. Otherwise, it will be lost. - Remember also the number of the current directory: - -.. highlight:: c - -:: - - TIFFWriteDirectory(tiffOut); - dirNum = TIFFCurrentDirectory(tiffOut); - -5) Create the second TIFF-directory (e.g. custom directory) and set its - fields. The TIFFFieldArray infoarray has to be specified beforehand - somewhere in your private include files. - An example is given for the EXIF directory in tif_dirinfo.c - -.. highlight:: c - -:: - - TIFFCreateCustomDirectory(tiffOut, infoarray); /* for a real custom directory */ - /* or alternatively, use GPS or EXIF with pre-defined TIFFFieldArray IFD field structure */ - TIFFCreateGPSDirectory(tiffOut); - TIFFSetField(tiffOut, GPSTAG_VERSIONID, gpsVersion); /* set fields of the custom directory */ - -Be aware that every :c:func:`TIFFCreateDirectory` or :c:func:`TIFFWriteDirectory` -apparently frees the ``*tif`` structure and sets up a new one! - -6) Write custom directory to file. The offset to that directory in the file - is returned in :c:var:`dir_offset`. - -.. highlight:: c - -:: - - TIFFWriteCustomDirectory(tiffOut, &dir_offset); - -7) Reload the first directory (i.e. the original TIFF directory). - Apparently, this reads the data back from file. - -.. highlight:: c - -:: - - TIFFSetDirectory(tiffOut, dirNum); - -8) Set the correct offset value of the custom directory IFD tag and save - that changes to file. - -.. highlight:: c - -:: - - TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); - TIFFWriteDirectory(tiffOut); - -RETURN VALUES -------------- - -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing the -directory contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff) - diff --git a/third_party/libtiff/doc/functions/TIFFCustomTagList.rst b/third_party/libtiff/doc/functions/TIFFCustomTagList.rst deleted file mode 100644 index 4b18c7b..0000000 --- a/third_party/libtiff/doc/functions/TIFFCustomTagList.rst +++ /dev/null @@ -1,47 +0,0 @@ -TIFFCustomTagList -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFGetTagListCount(TIFF* tif) - -.. c:function:: uint32_t TIFFGetTagListEntry(TIFF* tif, int tag_index) - -Description ------------ - -:c:func:`TIFFGetTagListCount` returns the number of entries in the -custom tag list. - -:c:func:`TIFFGetTagListEntry` returns the tag number of the (n.th - 1) -entry within the custom tag list. -If the :c:var:`tag_index` is larger or equal to the number of entries -in the tag list 0xFFFFFFFF `(=(uint32_t(-1))` is returned. - -Note ----- - -The known tags to ``libtiff`` are define as 'named' tags and a lot of them -as *custom* tags. The custom tag definitions are handled in an internal -custom tag list. This list can also be extended by adding tag definitions -to that list, so that ``libtiff`` is aware of those tags. -See :ref:`Define_Application_Tags` - -Diagnostics ------------ - -none - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFDataWidth.rst b/third_party/libtiff/doc/functions/TIFFDataWidth.rst deleted file mode 100644 index 8adaef6..0000000 --- a/third_party/libtiff/doc/functions/TIFFDataWidth.rst +++ /dev/null @@ -1,47 +0,0 @@ -TIFFDataWidth -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFDataWidth(TIFFDataType type) - -Description ------------ - -:c:func:`TIFFDataWidth` returns the size of *type* within TIFF file in bytes. -Currently following data types are supported: - -* :c:macro:`TIFF_BYTE` -* :c:macro:`TIFF_ASCII` -* :c:macro:`TIFF_SBYTE` -* :c:macro:`TIFF_UNDEFINED` -* :c:macro:`TIFF_SHORT` -* :c:macro:`TIFF_SSHORT` -* :c:macro:`TIFF_LONG` -* :c:macro:`TIFF_SLONG` -* :c:macro:`TIFF_FLOAT` -* :c:macro:`TIFF_IFD` -* :c:macro:`TIFF_RATIONAL` -* :c:macro:`TIFF_SRATIONAL` -* :c:macro:`TIFF_DOUBLE` -* :c:macro:`TIFF_LONG8` -* :c:macro:`TIFF_SLONG8` -* :c:macro:`TIFF_IFD8` - -Return values -------------- - -:c:func:`TIFFDataWidth` returns a number of bytes occupied by the item -of given type within the TIFF file. 0 returned when unknown data type supplied. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFDeferStrileArrayWriting.rst b/third_party/libtiff/doc/functions/TIFFDeferStrileArrayWriting.rst deleted file mode 100644 index 705aebc..0000000 --- a/third_party/libtiff/doc/functions/TIFFDeferStrileArrayWriting.rst +++ /dev/null @@ -1,72 +0,0 @@ -TIFFDeferStrileArrayWriting -=========================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFDeferStrileArrayWriting(TIFF* tif) - -.. c:function:: int TIFFForceStrileArrayWriting(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDeferStrileArrayWriting` is an advanced writing function -that must be used in a particular sequence, and generally together -with :c:func:`TIFFForceStrileArrayWriting`, to achieve its intended -effect. Their aim is to control when and where the -``StripOffsets`` / ``StripByteCounts`` or ``TileOffsets`` / ``TileByteCounts`` -arrays are written into the file. - -The purpose of this is to generate 'cloud-optimized geotiff' files where -the first KB of the file only contain the IFD entries without the potentially -large strile arrays. Those are written afterwards. - -More precisely, when :c:func:`TIFFWriteCheck` is called, the tag entries for -those arrays will be written with type = count = offset = 0 as a temporary value. - -Its effect is only valid for the current directory, and before -:c:func:`TIFFWriteDirectory` is first called, and will be reset -when changing directory. - -The typical sequence of calls is: - -.. highlight:: c - -:: - - TIFFOpen() - /* or TIFFCreateDirectory(tif) */ - /* Set fields with calls to TIFFSetField(tif, ...) */ - TIFFDeferStrileArrayWriting(tif) - TIFFWriteCheck(tif, ...) - TIFFWriteDirectory(tif) - /* ... potentially create other directories and come back to the above directory */ - TIFFForceStrileArrayWriting(tif) /* emit the arrays at the end of file */ - -Returns -------- - -1 in case of success, 0 otherwise. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -Note ----- - -This functionality was introduced with libtiff 4.1. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFError.rst b/third_party/libtiff/doc/functions/TIFFError.rst deleted file mode 100644 index e770c35..0000000 --- a/third_party/libtiff/doc/functions/TIFFError.rst +++ /dev/null @@ -1,106 +0,0 @@ -TIFFError -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: void TIFFError(const char * module, const char * fmt, ...) - -.. c:function:: void TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...) - -.. c:function:: void TIFFErrorExtR(TIFF *tif, const char* module, const char* fmt, ...) - -.. c:type:: void (*TIFFErrorHandler)(const char * module, const char* fmt, va_list ap) - -.. c:type:: void (*TIFFErrorHandlerExt)(thandle_t fd, const char * module, const char* fmt, va_list ap) - -.. c:type:: int (*TIFFErrorHandlerExtR)(TIFF* tif, void* user_data, const char* module, const char* fmt, va_list ap) - -.. c:function:: TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler) - -.. c:function:: TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler) - -Description ------------ - -:c:func:`TIFFError` invokes the library-wide error handler function -to (normally) write an error message to ``stderr``. -The *fmt* parameter is a :c:func:`printf` format string, and any number -arguments can be supplied. The *module* parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which an error is -detected. - -Applications that desire to capture control in the event of an error -should use :c:func:`TIFFSetErrorHandler` to override the default -error handler. A :c:macro:`NULL` (0) error handler function may be -installed to suppress error messages. - -Two more application-specific error handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with an error message function, i.e. -:c:func:`TIFFErrorExt` and :c:func:`TIFFErrorExtR` if the application -intends to call the handler with those extended parameters. - -:c:func:`TIFFErrorExt` provides a file handle as parameter. -Within ``libtiff`` :c:func:`TIFFErrorExt` is called passing ``tif->tif_clientdata`` -as *fd*, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for :c:func:`TIFFErrorExt` -is setup with :c:func:`TIFFSetErrorHandlerExt`. - -:c:func:`TIFFErrorExtR` (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -error handler. That means for different TIFF handles, different error -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -:c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt` -or :c:func:`TIFFClientOpenExt`. -Furthermore, a **custom defined data structure** *user_data* for the -error handler can be given along. - -Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the -application-specific handler introduced with ``libtiff`` 4.5. - -Note ----- - -Both functions :c:func:`TIFFError` and :c:func:`TIFFErrorExt` -each attempt to call both handler functions if they are defined. -First :c:func:`TIFFErrorHandler` is called and then :c:func:`TIFFErrorHandlerExt`. -However, :c:func:`TIFFError` passes a "0" as a file handle to -:c:func:`TIFFErrorHandlerExt`. - -:c:func:`TIFFErrorExtR` tries first to call the per-TIFF handle defined -error handler. If :c:func:`TIFFErrorHandlerExtR` is not defined or -returns 0, :c:func:`TIFFErrorHandler` and then :c:func:`TIFFErrorHandlerExt` -are called. From libtiff 4.5 onwards :c:func:`TIFFErrorExtR` is used -within the ``libtiff`` library where the TIFF handle is available. -Otherwise, :c:func:`TIFFErrorExt` is used! - -Return values -------------- - -:c:func:`TIFFSetErrorHandler` and :c:func:`TIFFSetErrorHandlerExt` -returns a reference to the previous error handler function. - -:c:func:`TIFFErrorHandlerExtR` returns an integer as "stop" to control the call -of further error handler functions within :c:func:`TIFFErrorExtR`: - - - 0: both functions :c:func:`TIFFErrorHandler` and :c:func:`TIFFErrorHandlerExt` are called. - - non-zero: no further error message function is called. - -See also --------- - -:doc:`TIFFWarning` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`/functions/TIFFOpenOptions`, -:doc:`libtiff` (3tiff), -printf (3) diff --git a/third_party/libtiff/doc/functions/TIFFFieldDataType.rst b/third_party/libtiff/doc/functions/TIFFFieldDataType.rst deleted file mode 100644 index 837004e..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldDataType.rst +++ /dev/null @@ -1,38 +0,0 @@ -TIFFFieldDataType -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFDataType TIFFFieldDataType(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldDataType` returns the data type stored in a TIFF field. -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, -or :c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldDataType` returns a member of the enum type -:c:type:`TIFFDataType`. - -See also --------- - -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFieldName.rst b/third_party/libtiff/doc/functions/TIFFFieldName.rst deleted file mode 100644 index 67bedf7..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldName.rst +++ /dev/null @@ -1,37 +0,0 @@ -TIFFFieldName -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const char* TIFFFieldName(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldName` returns the textual name for a TIFF field. -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, -or :c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldName` returns a constant C string. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFieldPassCount.rst b/third_party/libtiff/doc/functions/TIFFFieldPassCount.rst deleted file mode 100644 index a630b99..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldPassCount.rst +++ /dev/null @@ -1,52 +0,0 @@ -TIFFFieldPassCount -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldPassCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldPassCount` returns true (nonzero) if -:c:func:`TIFFGetField` and :c:func:`TIFFSetField` -expect a :c:var:`count` value to be passed before the actual data pointer. - -:c:var:`fip` is a field information pointer previously returned by -:c:func:`TIFFFindField`, -:c:func:`TIFFFieldWithTag`, -:c:func:`TIFFFieldWithName`. - -When a :c:var:`count` is required, it will be of type :c:type:`uint32_t` -if :c:func:`TIFFFieldReadCount` reports :c:macro:`TIFF_VARIABLE2`, -and of type :c:type:`uint16_t` otherwise. Use :c:func:`TIFFFieldWriteCount` -for :c:func:`TIFFSetField`, respectively. (This distinction is -critical for use of :c:func:`TIFFGetField`, but normally not so for -use of :c:func:`TIFFSetField`.) - -An alternative function for the :c:var:`count` value determination -is :c:func:`TIFFFieldSetGetCountSize`. - -Return values -------------- - -:c:func:`TIFFFieldPassCount` returns an integer that is always 1 (true) -or 0 (false). - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` diff --git a/third_party/libtiff/doc/functions/TIFFFieldQuery.rst b/third_party/libtiff/doc/functions/TIFFFieldQuery.rst deleted file mode 100644 index 4e7a818..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldQuery.rst +++ /dev/null @@ -1,88 +0,0 @@ -TIFFFieldQuery -============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const TIFFField* TIFFFieldWithName(TIFF* tif, const char *field_name) - -.. c:function:: const TIFFField* TIFFFieldWithTag(TIFF* tif, uint32_t tag) - -.. c:function:: const TIFFField* TIFFFindField(TIFF* tif, uint32_t tag, TIFFDataType dt) - -.. c:function:: int TIFFFieldIsAnonymous(const TIFFField *fip) - -.. c:function:: int TIFFFieldSetGetSize(const TIFFField *fip) - -.. c:function:: int TIFFFieldSetGetCountSize(const TIFFField* fip) - -Description ------------ - -.. TODO: Check explanation and intended use of functions. - -:c:func:`TIFFFieldWithName` and :c:func:`TIFFFieldWithTag` -return a pointer to TIFF field information structure `fip` by the tag's -*field_name* or its *tag* number. - -:c:func:`TIFFFindField` searches for the TIFF field information structure -`fip` of a given *tag* number and a specific `TIFFDataType dt`. -With dt== :c:macro:`TIFF_ANY` the behaviour is the same than for -*TIFFFieldWithTag()*. - -All three functions return :c:var:`NULL`, when the tag is not -registered within ``libtiff`` (see also :ref:`Tag_Auto_registration` ). - - .. TODO: Check if ``libtiff`` is able to handle tag definitions with two different - definitions. From the code point of view, I don't believe that. - - Such a `TIFFDataType` dependent search could be useful when the same - tag is defined twice but with different data types, which is true for - rare cases like TIFFTAG_XCLIPPATHUNITS. However, the ``libtiff`` does - currently not support multiple definitions of the same tag. - - -The following routines return status information about TIFF fields. - -:c:var:`fip` is a field information pointer previously returned by -`TIFFFindField()`, `TIFFFieldWithTag()`, `TIFFFieldWithName()`. - -:c:func:`TIFFFieldIsAnonymous` returns true (nonzero) if the field, -read from file, is unknown to ``libtiff`` and an anonymous field has -been auto-registered. Return is zero "0" if field is known to ``libtiff``. -See :ref:`Tag_Auto_registration` for more information. - -:c:func:`TIFFFieldSetGetSize` returns the data size in bytes of -the field data type used for ``libtiff`` internal storage. -This is also the data size of the parameter to be provided to -:c:func:`TIFFSetField` and :c:func:`TIFFGetField`. Custom -:c:macro:`TIFF_RATIONAL` values can be stored internally either -as ``float`` or ``double``. :c:func:`TIFFFieldSetGetSize` would -then return "4" or "8", respectively. - -:c:func:`TIFFFieldSetGetCountSize` returns size of ``count`` parameter -of :c:func:`TIFFSetField` and :c:func:`TIFFGetField` and also if it is -required: 0=none, 2= :c:type:`uint16_t`, 4= :c:type:`uint32_t`. -See also description of :c:func:`TIFFFieldReadCount`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFieldReadCount.rst b/third_party/libtiff/doc/functions/TIFFFieldReadCount.rst deleted file mode 100644 index 9cd46dd..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldReadCount.rst +++ /dev/null @@ -1,49 +0,0 @@ -TIFFFieldReadCount -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldReadCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldReadCount` returns the number of values available to be read -from the specified TIFF field; that is, the number of arguments that should be -supplied to :c:func:`TIFFGetField`. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: - -* :c:macro:`TIFF_VARIABLE` ``= -1`` indicates that a variable number of - values is possible; then, a :c:type:`uint16_t` *count* argument and a - pointer *data* argument must be supplied to :c:func:`TIFFGetField`. -* :c:macro:`TIFF_VARIABLE2` ``= -3`` is the same as :c:macro:`TIFF_VARIABLE` - except that the *count* argument must have type :c:type:`uint32_t`. -* :c:macro:`TIFF_SPP` ``= -2`` indicates that the number of arguments is - equal to the image's number of samples per pixel. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldReadCount` returns an integer. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFieldTag.rst b/third_party/libtiff/doc/functions/TIFFFieldTag.rst deleted file mode 100644 index 9d76a70..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldTag.rst +++ /dev/null @@ -1,40 +0,0 @@ -TIFFFieldTag -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t TIFFFieldTag(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldTag` returns the numeric tag value for a TIFF field. -This can be compared to various constants exported by the :program:`libtiff` -header files, such as :c:macro:`TIFFTAG_IMAGEWIDTH`. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldTag` returns an integer tag value. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFieldWriteCount.rst b/third_party/libtiff/doc/functions/TIFFFieldWriteCount.rst deleted file mode 100644 index 4459f8f..0000000 --- a/third_party/libtiff/doc/functions/TIFFFieldWriteCount.rst +++ /dev/null @@ -1,54 +0,0 @@ -TIFFFieldWriteCount -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldWriteCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldWriteCount` returns the number of values to be written -into the specified TIFF field; that is, the number of arguments that should -be supplied to :c:func:`TIFFSetField`. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: - -* :c:macro:`TIFF_VARIABLE` indicates that a variable number of values is - possible; then, a :c:type:`uint16_t` *count* argument and a pointer *data* - argument must be supplied to :c:func:`TIFFSetField`. -* :c:macro:`TIFF_VARIABLE2` is the same as :c:macro:`TIFF_VARIABLE` except - that the *count* argument must have type :c:expr:`uint32_t`. (On most - modern machines, this makes no practical difference, and the *count* - argument can simply be an :c:expr:`int` in either case.) -* :c:type:`TIFF_SPP` indicates that the number of arguments must be equal - to the image's number of samples per pixel. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -For most field types, :c:func:`TIFFFieldWriteCount` returns the same value as -:c:func:`TIFFFieldReadCount`, but there are some exceptions. - -Return values -------------- - -:c:func:`TIFFFieldWriteCount` returns an integer. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFFlush.rst b/third_party/libtiff/doc/functions/TIFFFlush.rst deleted file mode 100644 index 6b56148..0000000 --- a/third_party/libtiff/doc/functions/TIFFFlush.rst +++ /dev/null @@ -1,50 +0,0 @@ -TIFFFlush -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFlush(TIFF* tif) - -.. c:function:: int TIFFFlushData(TIFF* tif) - -Description ------------ - -:c:func:`TIFFFlush` causes any pending writes for the specified file -(including writes for the current directory) to be done. In normal -operation this call is never needed—the library automatically does -any flushing required. - -:c:func:`TIFFFlushData` flushes any pending image data for the specified -file to be written out; directory-related data are not flushed. In normal -operation this call is never needed—the library automatically does any -flushing required. - -Return values -------------- - -0 is returned if an error is encountered, otherwise 1 is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFGetField.rst b/third_party/libtiff/doc/functions/TIFFGetField.rst deleted file mode 100644 index cd65896..0000000 --- a/third_party/libtiff/doc/functions/TIFFGetField.rst +++ /dev/null @@ -1,490 +0,0 @@ -TIFFGetField -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: int TIFFGetField(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - -.. c:function:: int TIFFGetFieldDefaulted(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVGetFieldDefaulted(TIFF* tif, uint32_t tag, va_list ap) - -Description ------------ - -:c:func:`TIFFGetField` returns the value of a tag or pseudo-tag associated with the -the current directory of the opened TIFF file *tif*. (A *pseudo-tag* is a -parameter that is used to control the operation of the TIFF library but whose value -is not read or written to the underlying file.) The file must have been previously -opened with :c:func:`TIFFOpen`. The tag is identified by *tag*, one of the values -defined in the include file :file:`tiff.h` (see also the table below). The type and -number of values returned is dependent on the tag being requested. The programming -interface uses a variable argument list as prescribed by the :file:`stdarg.h` -interface. The returned values should only be interpreted if :c:func:`TIFFGetField` -returns 1. - -:c:func:`TIFFVGetField` is functionally equivalent to :c:func:`TIFFGetField` -except that it takes a pointer to a variable argument list. :c:func:`TIFFVGetField` -is useful for layering interfaces on top of the functionality provided by -:c:func:`TIFFGetField`. - -:c:func:`TIFFGetFieldDefaulted` and :c:func:`TIFFVGetFieldDefaulted` are identical -to :c:func:`TIFFGetField` and :c:func:`TIFFVGetField`, respectively, except that if -a tag is not defined in the current directory and it has a default value, then the -default value is returned. - -The tags understood by :program:`libtiff` the number of parameter values, and the -types for the returned values are shown below. The data types are specified as in C -and correspond to the types used to specify tag values to -:c:func:`TIFFSetField`. Remember that :c:func:`TIFFGetField` returns parameter -values, so all the listed data types are pointers to storage where values should be -returned. Consult the TIFF specification (or relevant industry specification) for -information on the meaning of each tag and their possible values. - - .. list-table:: Tag properties - :widths: 5 3 5 10 - :header-rows: 1 - - * - Tag name - - Count - - Types - - Notes - - * - :c:macro:`TIFFTAG_ARTIST` - - 1 - - :c:expr:`const char**` - - - - * - :c:macro:`TIFFTAG_BADFAXLINES` - - 1 - - :c:expr:`uint32_t*` - - - - * - :c:macro:`TIFFTAG_BITSPERSAMPLE` - - 1 - - :c:expr:`uint16_t*` - - - - * - :c:macro:`TIFFTAG_CLEANFAXDATA` - - 1 - - :c:expr:`uint16_t*` - - - - * - :c:macro:`TIFFTAG_COLORMAP` - - 3 - - :c:expr:`const uint16_t**` - - :c:expr:`1< - -.. c:function:: int TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32_t n) - -Description ------------ - -:c:func:`TIFFMergeFieldInfo` is used to add application-defined TIFF tags -to the list of known ``libtiff`` tags. -A brief description is given at :ref:`Define_Application_Tags` -and a description of the :c:struct:`TIFFFieldInfo` array elements can be -found at :ref:`TIFFFFieldInfo definition `. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`/addingtags`, -:doc:`TIFFSetTagExtender` diff --git a/third_party/libtiff/doc/functions/TIFFOpen.rst b/third_party/libtiff/doc/functions/TIFFOpen.rst deleted file mode 100644 index 16d324e..0000000 --- a/third_party/libtiff/doc/functions/TIFFOpen.rst +++ /dev/null @@ -1,336 +0,0 @@ -TIFFOpen -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFF* TIFFOpen(const char* filename, const char* mode) - -.. c:function:: TIFF* TIFFOpenW(const wchar_t* name, const char* mode) - -.. c:function:: TIFF* TIFFFdOpen(const int fd, const char* filename, const char*mode) - -.. c:function:: TIFF* TIFFOpenExt(const char* filename, const char* mode, TIFFOpenOptions* opts) - -.. c:function:: TIFF* TIFFOpenWExt(const wchar_t* name, const char* mode, TIFFOpenOptions* opts) - -.. c:function:: TIFF* TIFFFdOpenExt(const int fd, const char* filename, const char*mode, TIFFOpenOptions* opts) - -.. c:function:: const char * TIFFSetFileName(TIFF* tif) - -.. c:function:: int TIFFSetFileno(TIFF* tif, int fd) - -.. c:function:: int TIFFSetMode(TIFF* tif, int mode) - -.. c:type:: tmsize_t (*TIFFReadWriteProc)(thandle_t, void *, tmsize_t) -.. c:type:: toff_t (*TIFFSeekProc)(thandle_t, toff_t, int) -.. c:type:: int (*TIFFCloseProc)(thandle_t) -.. c:type:: toff_t (*TIFFSizeProc)(thandle_t) -.. c:type:: int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size) -.. c:type:: void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size) - -.. c:function:: TIFF* TIFFClientOpen(const char* filename, const char* mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc) - -.. c:function:: TIFF* TIFFClientOpenExt(const char* filename, const char* mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, TIFFOpenOptions* opts) - -.. c:function:: thandle_t TIFFClientdata(TIFF* tif) - -.. c:function:: thandle_t TIFFSetClientdata(TIFF* tif, thandle_t newvalue) - -Description ------------ - -:c:func:`TIFFOpen` opens a TIFF file whose name is *filename* -and returns a handle to be used in subsequent calls to routines in -:program:`libtiff`. If the open operation fails, then -:c:macro:`NULL` (0) is returned. The *mode* parameter specifies if -the file is to be opened for reading (``r``) or (``r+``), writing (``w``), or -appending (``a``) and, optionally, whether to override certain -default aspects of library operation (see below Options_). - -The *mode* (``r``) opens only an **existing** file for reading and (``r+``) -for reading and writing. -When a file is opened for appending, existing data will not -be touched; instead new data will be written as additional subfiles. -If an existing file is opened for writing, all previous data is -overwritten. - -If a file is opened for reading, the first TIFF directory in the file -is automatically read. -If a file is opened for writing or appending, a default directory -is automatically created for writing subsequent data. -This directory has all the default values specified in TIFF Revision 6.0: - -* ``BitsPerSample`` = 1, -* ``ThreshHolding`` = "bilevel art scan" -* ``FillOrder`` = 1 (most significant bit of each data byte is filled first) -* ``Orientation`` = 1 (the 0th row represents the visual top of the image, - and the 0th column represents the visual left hand side), -* ``SamplesPerPixel`` = 1, -* ``RowsPerStrip`` = ∞, -* ``ResolutionUnit`` = 2 (inches), and -* ``Compression`` = 1 (no compression). - -To alter these values, or to define values for additional fields, -:c:func:`TIFFSetField` must be used. - -:c:func:`TIFFOpenW` opens a TIFF file with a Unicode filename, for read/writing. - -:c:func:`TIFFFdOpen` is like :c:func:`TIFFOpen` except that it opens a -TIFF file given an open file descriptor *fd*. -The file's name and mode must reflect that of the open descriptor. -Even for write-only mode, ``libtiff`` needs read permissions because -some of its functions need to read back the partially written TIFF file. -The object associated with the file descriptor **must support random access**. -In order to close a TIFF file opened with :c:func:`TIFFFdOpen` -first :c:func:`TIFFCleanup` should be called to free the internal -TIFF structure without closing the file handle and afterwards the -file should be closed using its file descriptor *fd*. - -:c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`, -but options, such as re-entrant error and warning handlers and a limit in byte -that libtiff internal memory allocation functions are allowed to request per call -may be passed with the *opts* argument. The *opts* argument may be NULL. -Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument -parameters. The allocated memory for :c:type:`TIFFOpenOptions` -can be released straight after successful execution of the related -"TIFFOpenExt" functions. - -:c:func:`TIFFOpenWExt` (added in libtiff 4.5) is like :c:func:`TIFFOpenExt`, -but opens a TIFF file with a Unicode filename. - -:c:func:`TIFFFdOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFFdOpen`, -but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. - -:c:func:`TIFFSetFileName` sets the file name in the tif-structure -and returns the old file name. - -:c:func:`TIFFSetFileno` overwrites a copy of the open file's I/O descriptor, -that was saved when the TIFF file was first opened, -and returns the previous value. See note below. - -:c:func:`TIFFSetMode` sets the ``libtiff`` open mode in the tif-structure -and returns the old mode. - -:c:func:`TIFFClientOpen` is like :c:func:`TIFFOpen` except that the caller -supplies a collection of functions that the library will use to do UNIX-like -I/O operations. The *readproc* and *writeproc* functions are called to read -and write data at the current file position. -*seekproc* is called to change the current file position à la :c:func:`lseek` (2). -*closeproc* is invoked to release any resources associated with an open file. -*sizeproc* is invoked to obtain the size in bytes of a file. -*mapproc* and *unmapproc* are called to map and unmap a file's contents in -memory; c.f. :c:func:`mmap` (2) and :c:func:`munmap` (2). -The *clientdata* parameter is an opaque "handle" passed to the client-specified -routines passed as parameters to :c:func:`TIFFClientOpen`. - -.. note:: - In contrast to the return values of :c:func:`mmap` (2) and :c:func:`munmap` (2), - the return values of *mapproc* and *unmapproc* must be: - TRUE for success and FALSE to indicate an error. - ``libtiff`` built in functions :c:func:`_tiffMapProc` and :c:func:`_tiffUnmapProc` - can be found in tif_unix.c as well as in tif_win32.c. - -:c:func:`TIFFClientOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFClientOpen`, -but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. - -:c:func:`TIFFClientdata` returns open file's clientdata handle, -which is the real open file's I/O descriptor used by ``libtiff``. -Note: Within tif_unix.c this handle is converted into an integer file descriptor. - -:c:func:`TIFFSetClientdata` sets open file's clientdata, and return previous value. -The clientdata is used as open file's I/O descriptor within ``libtiff``. - -.. note:: - *clientdata* is used as file descriptor or handle of the opened TIFF file within - `libtif`, whereas the file descriptor *fd* (changeable by :c:func:`TIFFSetFileno`) - is only set once to the value of *clientdata* converted to an integer - (in tif_win32.c as well as in tif_unix.c). - When updating the file's clientdata with :c:func:`TIFFSetClientdata`, - the *fd* value is **not** updated. - -Options -------- - -The open mode parameter can include the following flags in -addition to the ``r``, ``r+``, ``w``, and ``a`` flags. -Note however that option flags must follow the read-write-append -specification. - -Note 2: Also for ``w`` the file will be opened with *read access* rights -because ``libtiff`` needs to read back the partially written TIFF file -for some of its functions. - - -``l``: - - When creating a new file force information be written with - Little-Endian byte order (but see below). - By default the library will create new files using the native - CPU byte order. - -``b``: - - When creating a new file force information be written with - Big-Endian byte order (but see below). - By default the library will create new files using the native - CPU byte order. - -``L``: - - Force image data that is read or written to be treated with - bits filled from Least Significant Bit (LSB) to - Most Significant Bit (MSB). - Note that this is the opposite to the way the library has - worked from its inception. - -``B``: - - Force image data that is read or written to be treated with - bits filled from Most Significant Bit (MSB) to - Least Significant Bit (LSB); this is the default. - -``H``: - - Force image data that is read or written to be treated with - bits filled in the same order as the native - CPU. - -``M``: - - Enable the use of memory-mapped files for images opened read-only. - If the underlying system does not support memory-mapped files - or if the specific image being opened cannot be memory-mapped - then the library will fallback to using the normal system interface - for reading information. - By default the library will attempt to use memory-mapped files. - -``m``: - - Disable the use of memory-mapped files. - -``C``: - - Enable the use of "strip chopping" when reading images - that are comprised of a single strip or tile of uncompressed data. - Strip chopping is a mechanism by which the library will automatically - convert the single-strip image to multiple strips, - each of which has about 8 Kilobytes of data. - This facility can be useful in reducing the amount of memory used - to read an image because the library normally reads each strip - in its entirety. - Strip chopping does however alter the apparent contents of the - image because when an image is divided into multiple strips it - looks as though the underlying file contains multiple separate - strips. - Finally, note that default handling of strip chopping is a compile-time - configuration parameter. - The default behaviour, for backwards compatibility, is to enable - strip chopping. - -``c``: - - Disable the use of strip chopping when reading images. - -``h``: - - Read TIFF header only, do not load the first image directory. That could be - useful in case of the broken first directory. We can open the file and proceed - to the other directories. - -``4``: - - ClassicTIFF for creating a file (default) - -``8``: - - BigTIFF for creating a file. - -``D``: - - Enable use of deferred strip/tile offset/bytecount array loading. They will - be loaded the first time they are accessed to. This loading will be done in - its entirety unless the O flag is also specified. - -``O``: - - On-demand loading of values of the strip/tile offset/bytecount arrays, limited - to the requested strip/tile, instead of whole array loading (implies ``D``) - -Byte order ----------- - -The TIFF specification (**all versions**) states that compliant readers -"must be capable of reading images written in either byte order" . -Nonetheless some software that claims to support the reading of -TIFF images is incapable of reading images in anything but the native -CPU byte order on which the software was written. -(Especially notorious are applications written to run on Intel-based machines.) -By default the library will create new files with the native -byte-order of the CPU on which the application is run. -This ensures optimal performance and is portable to any application -that conforms to the TIFF specification. -To force the library to use a specific byte-order when creating -a new file the ``b`` and ``l`` option flags may be included in -the call to open a file; for example, ``wb`` or ``wl``. - -Return values -------------- - -Upon successful completion -:c:func:`TIFFOpen`, :c:func:`TIFFFdOpen`, and :c:func:`TIFFClientOpen` -return a TIFF pointer. Otherwise, :c:macro:`NULL` is returned. - -Diagnostics ------------ - - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -``"%s": Bad mode``: - - The specified *mode* parameter was not one of ``r`` (read), ``w`` (write), - or ``a`` (append). - -``"%s: Cannot open"``: - - :c:func:`TIFFOpen` was unable to open the specified filename for read/writing. - -``"Cannot read TIFF header"``: - - An error occurred while attempting to read the header information. - -``"Error writing TIFF header"``: - - An error occurred while writing the default header information - for a new file. - -``"Not a TIFF file, bad magic number %d (0x%x)"``: - - The magic number in the header was not (hex) - 0x4d4d or (hex) 0x4949. - -``"Not a TIFF file, bad version number %d (0x%x)"``: - - The version field in the header was not 42 (decimal). - -``"Cannot append to file that has opposite byte ordering"``: - - A file with a byte ordering opposite to the native byte - ordering of the current machine was opened for appending (``a``). - This is a limitation of the library. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFClose` (3tiff), -:doc:`TIFFStrileQuery` (3tiff), -:doc:`TIFFOpenOptions` \ No newline at end of file diff --git a/third_party/libtiff/doc/functions/TIFFOpenOptions.rst b/third_party/libtiff/doc/functions/TIFFOpenOptions.rst deleted file mode 100644 index 1768b37..0000000 --- a/third_party/libtiff/doc/functions/TIFFOpenOptions.rst +++ /dev/null @@ -1,129 +0,0 @@ -TIFFOpenOptions -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:type:: TIFFOpenOptions TIFFOpenOptions - -.. c:function:: TIFFOpenOptions* TIFFOpenOptionsAlloc(void) - -.. c:function:: void TIFFOpenOptionsFree(TIFFOpenOptions*) - -.. c:function:: void TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions* opts, tmsize_t max_single_mem_alloc) - -.. c:function:: void TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions* opts, tmsize_t max_cumulated_mem_alloc) - -.. c:function:: void TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions* opts, TIFFErrorHandlerExtR handler, void* errorhandler_user_data) - -.. c:function:: void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions* opts, TIFFErrorHandlerExtR handler, void* warnhandler_user_data) - -.. c:function:: void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, int warn_about_unknown_tags) - -Description ------------ - -:c:type:`TIFFOpenOptions` is an opaque structure which can be passed -to the TIFF open"Ext" functions to define some ``libtiff`` internal settings. -The settings are the maximum single memory allocation limit and -per-TIFF handle (re-entrant) error handler and warning handler functions. -For those handler a pointer to a **custom defined data structure** *user_data* -can be given along. - -:c:func:`TIFFOpenOptionsAlloc` allocates memory for the :c:type:`TIFFOpenOptions` -opaque structure and returns a :c:type:`TIFFOpenOptions` pointer. - -:c:func:`TIFFOpenOptionsFree` releases the allocated memory for -:c:type:`TIFFOpenOptions`. The allocated memory for :c:type:`TIFFOpenOptions` -can be released straight after successful execution of the related -TIFFOpen"Ext" functions like :c:func:`TIFFOpenExt`. - -:c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` (added in libtiff 4.5.0) sets -the value for the maximum single memory limit in byte that ``libtiff`` internal -memory allocation functions are allowed to request per call. - -.. note:: - However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` - and :c:func:`_TIFFrealloc` **do not apply** this internal memory - allocation limit set by :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`! - -:c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` (added in libtiff 4.6.1) sets -the maximum cumulated memory allocations in byte, for a given TIFF handle, -that ``libtiff`` internal memory allocation functions are allowed. - -.. note:: - However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` - and :c:func:`_TIFFrealloc` **do not apply** this internal memory - allocation limit set by :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc`! - -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` sets the function pointer to -an application-specific and per-TIFF handle (re-entrant) error handler. -Furthermore, a pointer to a **custom defined data structure** *errorhandler_user_data* -can be passed. This error handler is invoked through :c:func:`TIFFErrorExtR` -and the *errorhandler_user_data* pointer is given along. -The *errorhandler_user_data* argument may be NULL. - -:c:func:`TIFFOpenOptionsSetWarningHandlerExtR` works like -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler, -which is invoked through :c:func:`TIFFWarningExtR` - -:c:func:`TIFFOpenOptionsSetWarnAboutUnknownTags` sets whether libtiff should -emit a warning when encountering a unknown tag. This function has been added in -libtiff 4.7.1 and the default value is FALSE (change of behaviour compared to -earlier versions). - -Example -------- - -:: - - #include "tiffio.h" - - typedef struct MyErrorHandlerUserDataStruct - { - /* ... any user data structure ... */ - } MyErrorHandlerUserDataStruct; - - static int myErrorHandler(TIFF *tiff, void *user_data, const char *module, - const char *fmt, va_list ap) - { - MyErrorHandlerUserDataStruct *errorhandler_user_data = - (MyErrorHandlerUserDataStruct *)user_data; - /*... code of myErrorHandler ...*/ - return 1; - } - - - main() - { - tmsize_t limit = (256 * 1024 * 1024); - MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */}; - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); - TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data); - TIFF *tif = TIFFOpenExt("foo.tif", "r", opts); - TIFFOpenOptionsFree(opts); - /* ... go on here ... */ - - TIFFClose(tif); - } - -Note ----- - -This functionality was introduced with libtiff 4.5. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff), -:doc:`TIFFWarning` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFPrintDirectory.rst b/third_party/libtiff/doc/functions/TIFFPrintDirectory.rst deleted file mode 100644 index e84af5a..0000000 --- a/third_party/libtiff/doc/functions/TIFFPrintDirectory.rst +++ /dev/null @@ -1,58 +0,0 @@ -TIFFPrintDirectory -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - -Description ------------ - -:c:func:`TIFFPrintDirectory` prints a description of the current directory -in the specified TIFF file to the standard I/O output stream *fd*. -The *flags* parameter is used to control the "level of detail" -of the printed information; it is a bitwise-or of the flags defined in -:file:`tiffio.h`: - - -================================= ===== =========================== -Name Value Description -================================= ===== =========================== -:c:macro:`TIFFPRINT_NONE` 0x0 no extra info -:c:macro:`TIFFPRINT_STRIPS` 0x1 strips/tiles info -:c:macro:`TIFFPRINT_CURVES` 0x2 color/gray response curves -:c:macro:`TIFFPRINT_COLORMAP` 0x4 colormap -:c:macro:`TIFFPRINT_JPEGQTABLES` 0x100 JPEG Q matrices -:c:macro:`TIFFPRINT_JPEGACTABLES` 0x200 JPEG AC tables -:c:macro:`TIFFPRINT_JPEGDCTABLES` 0x200 JPEG DC tables -================================= ===== =========================== - -Notes ------ - -In C++ the *flags* parameter defaults to 0. - -Return values -------------- - -None. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFProcFunctions.rst b/third_party/libtiff/doc/functions/TIFFProcFunctions.rst deleted file mode 100644 index 73c77dd..0000000 --- a/third_party/libtiff/doc/functions/TIFFProcFunctions.rst +++ /dev/null @@ -1,57 +0,0 @@ -TIFFProcFunctions -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFCloseProc TIFFGetCloseProc(TIFF* tif) - -.. c:function:: TIFFMapFileProc TIFFGetMapFileProc(TIFF* tif) - -.. c:function:: TIFFReadWriteProc TIFFGetReadProc(TIFF* tif) - -.. c:function:: TIFFSeekProc TIFFGetSeekProc(TIFF* tif) - -.. c:function:: TIFFSizeProc TIFFGetSizeProc(TIFF* tif) - -.. c:function:: TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF* tif) - -.. c:function:: TIFFReadWriteProc TIFFGetWriteProc(TIFF* tif) - -Description ------------ - -.. TODO: Explain or link to explanation of procedure handling. - -The following routines return ?????? an open TIFF file. - -:c:func:`TIFFGetCloseProc` returns a pointer to file close method. - -:c:func:`TIFFGetMapFileProc` returns a pointer to memory mapping method. - -:c:func:`TIFFGetReadProc` returns a pointer to file read method. - -:c:func:`TIFFGetSeekProc` returns a pointer to file seek method. - -:c:func:`TIFFGetSizeProc` returns a pointer to file size requesting method. - -:c:func:`TIFFGetUnmapFileProc` returns a pointer to memory unmapping method. - -:c:func:`TIFFGetWriteProc` returns a pointer to file write method. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFRGBAImage.rst b/third_party/libtiff/doc/functions/TIFFRGBAImage.rst deleted file mode 100644 index 7f6771e..0000000 --- a/third_party/libtiff/doc/functions/TIFFRGBAImage.rst +++ /dev/null @@ -1,255 +0,0 @@ -TIFFRGBAImage -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:type:: unsigned char TIFFRGBValue - -.. c:type:: struct _TIFFRGBAImage TIFFRGBAImage - -.. c:function:: int TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) - -.. c:function:: int TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stopOnError, char emsg[1024]) - -.. c:function:: int TIFFRGBAImageGet(TIFFRGBAImage* img, uint32_t* raster, uint32_t width, uint32_t height) - -.. c:function:: void TIFFRGBAImageEnd(TIFFRGBAImage* img) - -Description ------------ - -The routines described here provide a high-level interface through which -TIFF images may be read into memory. -Images may be strip- or tile-based and have a variety of different -characteristics: bits/sample, samples/pixel, photometric, orientation, etc. -Decoding state is encapsulated in a :c:type:`TIFFRGBAImage` -structure making it possible to capture state for multiple images -and quickly switch between them. -The target raster format can be customized to a particular application's -needs by installing custom routines that manipulate image data -according to application requirements. - -The default usage for these routines is: - -* check if an image can be processed using :c:func:`TIFFRGBAImageOK` -* construct a decoder state block using :c:func:`TIFFRGBAImageBegin` -* read and decode an image into a target raster using - :c:func:`TIFFRGBAImageGet`, and then -* release resources using :c:func:`TIFFRGBAImageEnd` - -:c:func:`TIFFRGBAImageGet` can be called multiple times to decode an -image using different state parameters. -If multiple images are to be displayed and there is not enough -space for each of the decoded rasters, multiple state blocks can -be managed and then calls can be made to :c:func:`TIFFRGBAImageGet` -as needed to display an image. - -The generated raster is assumed to be an array of -*width* × *height* -32-bit entries, where *width* must be less than or equal to the width of -the image (*height* may be any non-zero size). -If the raster dimensions are smaller than the image, the image data -is cropped to the raster bounds. -If the raster height is greater than that of the image, then the -image data are placed in the lower part of the raster. -(Note that the raster is assumed to be organized such that the pixel -at location (*x*, *y*) is *raster* [ *y* × *width* + *x* ]; -with the raster origin in the *lower-left hand corner*.) - -Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros :c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, -and :c:macro:`TIFFGetA` should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). - -:c:func:`TIFFRGBAImageGet` converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. - -The parameter *stopOnError* specifies how to act if an error is -encountered while reading the image. If *stopOnError* is non-zero, -then an error will terminate the operation; otherwise -:c:func:`TIFFRGBAImageGet` will continue processing data until all the -possible data in the image have been requested. - -Alternate raster formats ------------------------- - -To use the core support for reading and processing TIFF images, but -write the resulting raster data in a different format one need only -override the "put methods" used to store raster data. -These methods are defined in the :c:type:`TIFFRGBAImage` -structure and initially setup by :c:func:`TIFFRGBAImageBegin` -to point to routines that pack raster data in the default -ABGR pixel format. -Two different routines are used according to the physical organization -of the image data in the file: -``PlanarConfiguration`` = 1 (packed samples), and -``PlanarConfiguration`` = 2 (separated samples). -Note that this mechanism can be used to transform the data before -storing it in the raster. -For example one can convert data to colormap indices for display on a -colormap display. - -Simultaneous raster store and display -------------------------------------- - -It is simple to display an image as it is being read into memory -by overriding the put methods as described above for supporting -alternate raster formats. -Simply keep a reference to the default put methods setup by -:c:func:`TIFFRGBAImageBegin` and then invoke them before or after -each display operation. For example, the -:doc:`/tools/tiffgt` utility uses the following put method to -update the display as the raster is being filled: - -:: - - static void - putContigAndDraw(TIFFRGBAImage* img, uint32_t* raster, - uint32_t x, uint32_t y, uint32_t w, uint32_t h, - int32_t fromskew, int32_t toskew, - unsigned char* cp) - { - (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp); - if (x+w == width) { - w = width; - if (img->orientation == ORIENTATION_TOPLEFT) - lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w); - else - lrectwrite(0, y, w-1, y+h-1, raster); - } - } - -(the original routine provided by the library is saved in the -variable :c:var:`putContig`.) - -Supporting additional TIFF formats ----------------------------------- - -The :c:func:`TIFFRGBAImage` routines support the most commonly -encountered flavors of TIFF. It is possible to extend this support by -overriding the "get method" invoked by :c:func:`TIFFRGBAImageGet` -to read TIFF image data. -Details of doing this are a bit involved, it is best to make a copy -of an existing get method and modify it to suit the needs of an -application. - -.. _TIFFRGBAImage_Restriction_Notes: - -Notes ------ - -In C++ the *stopOnError* parameter defaults to 0. - -``SamplesPerPixel`` must be either 1, 2, 4, 8, or 16 bits. -Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. -``SamplesPerPixel`` minus ``ExtraSamples``). - -Palette image colormaps that appear to be incorrectly written -as 8-bit values are automatically scaled to 16-bits. - -Within the :c:type:`TIFFRGBAImage` structure the TIFF orientation -and also the required orientation in the raster can be defined. -However, the lower level :c:func:`TIFFRGBAImageGet` functions -- also called by :c:func:`TIFFReadRGBAImage` and :c:func:`TIFFReadRGBAImageOriented` - -can mirror the image orientations across both axes, but cannot rotate them. -Therefore, images with a TIFF orientation of 5 (LeftTop) to 8 (LeftBottom) -are not stored correctly in the raster, as this would require an additional -rotation of 90 degrees and an exchange of width and height dimension. - -If an alpha channel is used in an image, there are two common representations -that are available: straight (unassociated) alpha and premultiplied (associated) -alpha, which is specified by the value of ExtraSamples tag. -For files with unassociated alpha, the :c:func:`TIFFRGBAImage` reading routines -multiply the RGB values by the alpha channel values before saving them in the raster. -The other TIFFReadxxx (like :c:func:`TIFFReadScanline`) functions do not do this. - -Return values -------------- - -All routines return 1 if the operation was successful. -Otherwise, 0 is returned if an error was encountered and -*stopOnError* is zero. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display - the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, - but because it has 3 or 4 samples/pixel, it is assumed to be - RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel`` and ``PhotometricInterpretation``) - that can not be handled. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map - data to 8-bit RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`TIFFcolor` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadDirectory.rst b/third_party/libtiff/doc/functions/TIFFReadDirectory.rst deleted file mode 100644 index 7a1fc03..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadDirectory.rst +++ /dev/null @@ -1,146 +0,0 @@ -TIFFReadDirectory -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadDirectory(TIFF* tif) - -Description ------------ - -Read the next directory in the specified file and make it the current -directory. Applications only need to call :c:func:`TIFFReadDirectory` -to read multiple subfiles in a single TIFF file—(the first directory -in a file is automatically read when :c:func:`TIFFOpen` is called. - -Notes ------ - -If the library is compiled with :c:macro:`STRIPCHOP_SUPPORT` enabled, then -images that have a single uncompressed strip or tile of data are -automatically treated as if they were made up of multiple strips or tiles of -approximately 8 kilobytes each. This operation is done only in-memory; it does -not alter the contents of the file. However, the construction of the "chopped -strips" is visible to the application through the number of strips [tiles] -returned by :c:func:`TIFFNumberOfStrips` [:c:func:`TIFFNumberOfTiles`]. - -Return values -------------- - -If the next directory was successfully read, 1 is returned. Otherwise, 0 is -returned if an error was encountered, or if there are no more directories to -be read. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -``Seek error accessing TIFF directory``: - - An error occurred while positioning to the location of the - directory. - -``Wrong data type %d for field "%s"``: - - The tag entry in the directory had an incorrect data type. - For example, an ``ImageDescription`` tag with a ``SHORT`` - data type. - -``TIFF directory is missing required "%s" field``: - - The specified tag is required to be present by the TIFF - 5.0 specification, but is missing. - The directory is (usually) unusable. - -``%s: Rational with zero denominator``: - - A directory tag has a ``RATIONAL`` value whose denominator is zero. - -``Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored``: - - The specified tag's count field is bad. - For example, a count other than 1 for a ``SubFileType`` tag. - -``Cannot handle different per-sample values for field "%s"``: - - The tag has ``SamplesPerPixel`` values and they are not all the same; e.g. - ``BitsPerSample``. The library is unable to handle images of this sort. - -``Count mismatch for field "%s"; expecting %d, got %d``: - - The count field in a tag does not agree with the number expected by the - library. This should never happen, so if it does, the library refuses to - read the directory. - -``Invalid TIFF directory; tags are not sorted in ascending order``: - - The directory tags are not properly sorted as specified - in the TIFF 5.0 specification. This error is not fatal. - -``Ignoring unknown field with tag %d (0x%x)``: - - An unknown tag was encountered in the directory; - the library ignores all such tags. - -``TIFF directory is missing required "ImageLength" field``: - - The image violates the specification by not having a necessary field. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "PlanarConfig" field``: - - The image violates the specification by not having a necessary field. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripOffsets" field``: - - The image has multiple strips, but is missing the tag that - specifies the file offset to each strip of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "TileOffsets" field``: - - The image has multiple tiles, but is missing the tag that - specifies the file offset to each tile of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripByteCounts" field``: - - The image has multiple strips, but is missing the tag that - specifies the size of each strip of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripByteCounts" field, calculating from imagelength``: - - The image violates the specification by not having a necessary field. - However, when the image is comprised of only one strip or tile, the - library will estimate the missing value based on the file size. - -``Bogus "StripByteCounts" field, ignoring and calculating from imagelength``: - - Certain vendors violate the specification by writing zero for - the StripByteCounts tag when they want to leave the value - unspecified. - If the image has a single strip, the library will estimate - the missing value based on the file size. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadEncodedStrip.rst b/third_party/libtiff/doc/functions/TIFFReadEncodedStrip.rst deleted file mode 100644 index cd75ce3..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadEncodedStrip.rst +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadEncodedStrip -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32_t strip, void* buf, tmsize_t size) - -Description ------------ - -Read the specified strip of data and place up to *size* bytes of decompressed -information in the (user supplied) data buffer. - -Notes ------ - -The value of *strip* is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by :c:func:`TIFFStripSize`. -If -1 is passed in the *size* parameter, the whole strip will be read. You -should be sure you have enough space allocated for the buffer. - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadEncodedStrip` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadEncodedTile.rst b/third_party/libtiff/doc/functions/TIFFReadEncodedTile.rst deleted file mode 100644 index 75a7693..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadEncodedTile.rst +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadEncodedTile -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Read the specified tile of data and place up to *size* bytes of decompressed -information in the (user supplied) data buffer. - -Notes ------ - -The value of *tile* is a "raw tile number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should be at least as large as the value returned by -:c:func:`TIFFTileSize`. - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadEncodedTile` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadFromUserBuffer.rst b/third_party/libtiff/doc/functions/TIFFReadFromUserBuffer.rst deleted file mode 100644 index 09807ec..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadFromUserBuffer.rst +++ /dev/null @@ -1,46 +0,0 @@ -TIFFReadFromUserBuffer -====================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadFromUserBuffer(TIFF* tif, uint32_t strile, void* inbuf, tmsize_t insize, void* outbuf, tmsize_t outsize) - -Description ------------ - -Use the provided input buffer (`inbuf`, `insize`) and decompress it -into (`outbuf`, `outsize`). This function replaces the use of -:c:func:`TIFFReadEncodedStrip` / :c:func:`TIFFReadEncodedTile` -when the user can provide the buffer for the input data, for example when -he wants to avoid ``libtiff`` to read the strile offset/count values from the -``StripOffsets`` / ``StripByteCounts`` or ``TileOffsets`` / -``TileByteCounts`` arrays. `inbuf` content must be writable -(if bit reversal is needed). - - -Return values -------------- - -Returns 1 in case of success, 0 otherwise. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/functions/TIFFReadRGBAImage.rst b/third_party/libtiff/doc/functions/TIFFReadRGBAImage.rst deleted file mode 100644 index b1f3b06..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadRGBAImage.rst +++ /dev/null @@ -1,167 +0,0 @@ -TIFFReadRGBAImage -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:macro:: TIFFGetR(abgr) - - :c:expr:`((abgr) & 0xff)` - -.. c:macro:: TIFFGetG(abgr) - - :c:expr:`(((abgr) >> 8) & 0xff)` - -.. c:macro:: TIFFGetB(abgr) - - :c:expr:`(((abgr) >> 16) & 0xff)` - -.. c:macro:: TIFFGetA(abgr) - - :c:expr:`(((abgr) >> 24) & 0xff)` - -.. c:function:: int TIFFReadRGBAImage(TIFF* tif, uint32_t width, uint32_t height, uint32_t* raster, int stopOnError) - -.. c:function:: int TIFFReadRGBAImageOriented(TIFF* tif, uint32_t width, uint32_t height, uint32_t * raster, int orientation, int stopOnError) - -Description ------------ - -:c:func:`TIFFReadRGBAImage` reads a strip- or tile-based image into memory, -storing the result in the user supplied *raster*. -The raster is assumed to be an array of *width* × *height* 32-bit entries, -where *width* must be less than or equal to the width of the image -(*height* may be any non-zero size). -If the raster dimensions are smaller than the image, the image data is -cropped to the raster bounds. -If the raster height is greater than that of the image, then the image data -are placed in the lower part of the raster. -(Note that the raster is assume to be organized such that the pixel -at location (*x*, *y*) is *raster* [ *y* × *width* + *x* ]; -with the raster origin in the lower-left hand corner.) - -:c:func:`TIFFReadRGBAImageOriented` works like :c:func:`TIFFReadRGBAImage` -except that the user can specify the raster origin position with the -*orientation* parameter. Four orientations are supported: - -* :c:macro:`ORIENTATION_TOPLEFT`: origin in top-left corner, -* :c:macro:`ORIENTATION_TOPRIGHT`: origin in top-right corner, -* :c:macro:`ORIENTATION_BOTLEFT`: origin in bottom-left corner -* :c:macro:`ORIENTATION_BOTRIGHT`: origin in bottom-right corner. - -If you choose :c:macro:`ORIENTATION_BOTLEFT`, the result will be the same -as returned by the :c:func:`TIFFReadRGBAImage`. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros :c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, -and :c:macro:`TIFFGetA` should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). - -:c:func:`TIFFReadRGBAImage` converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. - -The parameter *stopOnError* specifies how to act if an error is -encountered while reading the image. If *stopOnError* is non-zero, then -an error will terminate the operation; otherwise :c:func:`TIFFReadRGBAImage` -will continue processing data until all the possible data in the -image have been requested. - -Notes ------ - -:c:func:`IFFReadRGBAImage` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered and -*stopOnError* is zero. - -.. TODO: Specify, what the return value is if an error occurs and stopOnError was non-zero. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display - the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, - but because it has 3 or 4 samples/pixel, it is assumed to be - RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map - data to 8-bit RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadRGBAStrip.rst b/third_party/libtiff/doc/functions/TIFFReadRGBAStrip.rst deleted file mode 100644 index 75aed98..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadRGBAStrip.rst +++ /dev/null @@ -1,135 +0,0 @@ -TIFFReadRGBAStrip -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadRGBAStrip(TIFF* tif, uint32_t row, uint32_t* raster) - -.. c:function:: int TIFFReadRGBAStripExt(TIFF* tif, uint32_t row, uint32_t * raster, int stop_on_error) - -Description ------------ - -:c:func:`TIFFReadRGBAStrip` reads a single strip of a strip-based image -into memory, storing the result in the user supplied RGBA *raster*. -The raster is assumed to be an array of ``ImageWidth`` × ``RowsPerStrip`` -32-bit entries, where ``ImageWidth`` is the width of the image -(:c:macro:`TIFFTAG_IMAGEWIDTH`) and ``RowsPerStrip`` is the maximum lines -in a strip (:c:macro:`TIFFTAG_ROWSPERSTRIP`). - -:c:func:`TIFFReadRGBAStripExt` provides the parameter `stop_on_error`. -Its behaviour is described at :doc:`TIFFReadRGBAImage`. - -The *row* value should be the row of the first row in the strip -(*strip* × ``RowsPerStrip``, zero based). - -Note that the raster is assume to be organized such that the pixel at location -(*x*, *y*) is *raster* [ *y* × *width* + *x* ]; with the raster origin in the -*lower-left hand corner* of the strip. That is bottom to top organization. -When reading a partial last strip in the file the last line of the image will -begin at the beginning of the buffer. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -:c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, and -:c:macro:`TIFFGetA` should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). - -See the :doc:`TIFFRGBAImage` page for more details on how various image types -are converted to RGBA values. - -Notes ------ - -:c:func:`TIFFReadRGBAStrip` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar -:c:func:`TIFFReadRGBAImage` function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one strip. The :c:func:`TIFFReadRGBATile` function -does a similar operation for tiled images. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, but because it - has 3 or 4 samples/pixel, it is assumed to be RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black\fP``: - - The image was missing a tag that describes how to display it, but - because it has 1 sample/pixel, it is assumed to be a grayscale or - bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert image samples to - 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map grayscale data - to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map data to 8-bit - RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadRGBATile.rst b/third_party/libtiff/doc/functions/TIFFReadRGBATile.rst deleted file mode 100644 index 4644f9b..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadRGBATile.rst +++ /dev/null @@ -1,137 +0,0 @@ -TIFFReadRGBATile -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadRGBATile(TIFF* tif, uint32_t x, uint32_t y, uint32_t* raster) - -.. c:function:: int TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, int stop_on_error) - -Description ------------ - -:c:func:`TIFFReadRGBATile` reads a single tile of a tile-based image into -memory, storing the result in the user supplied RGBA *raster*. -The raster is assumed to be an array of ``TileWidth`` × ``TileLength`` -32-bit entries, where ``TileWidth`` is the width of a tile -(:c:macro:`TIFFTAG_TILEWIDTH`) and ``TileLength`` is the height of a -tile (:c:macro:`TIFFTAG_TILELENGTH`). - -:c:func:`TIFFReadRGBATileExt` provides the parameter `stop_on_error`. -Its behaviour is described at :doc:`TIFFReadRGBAImage`. - -The *x* and *y* values are the offsets from the top left corner to the top -left corner of the tile to be read. They must be an exact multiple of the -tile width and length. - -Note that the raster is assume to be organized such that the pixel at -location -(*x*, *y*) is *raster* [ *y* × *width* + *x* ]; with the raster origin -in the *lower-left hand corner* of the tile. That is bottom to top -organization. Edge tiles which partly fall off the image will be filled -out with appropriate zeroed areas. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -:c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, and -:c:macro:`TIFFGetA` should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). - -See the :doc:`TIFFRGBAImage` page for more details on how various image -types are converted to RGBA values. - -Notes ------ - -:c:func:`TIFFReadRGBATile` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar -:c:func:`TIFFReadRGBAImage` function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one tile. The :c:func:`TIFFReadRGBAStrip` function -does a similar operation for stripped images. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, but because it - has 3 or 4 samples/pixel, it is assumed to be RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map data to 8-bit - RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadRawStrip.rst b/third_party/libtiff/doc/functions/TIFFReadRawStrip.rst deleted file mode 100644 index 4a2da52..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadRawStrip.rst +++ /dev/null @@ -1,43 +0,0 @@ -TIFFReadRawStrip -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Read the contents of the specified strip into the (user supplied) data buffer. -Note that the value of *strip* is a "raw strip number". That is, the caller -must take into account whether or not the data is organized in separate planes -(``PlanarConfiguration`` = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by :c:func:`TIFFStripSize`. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadRawStrip` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFstrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadRawTile.rst b/third_party/libtiff/doc/functions/TIFFReadRawTile.rst deleted file mode 100644 index 3a651a4..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadRawTile.rst +++ /dev/null @@ -1,45 +0,0 @@ -TIFFReadRawTile -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Read the contents of the specified tile into the (user supplied) data buffer. -Note that the value of *tile* is a "raw tile number". That is, the caller -must take into account whether or not the data is organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should typically be at least as large as the value -returned by :c:func:`TIFFTileSize`. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadRawTile` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFtile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadScanline.rst b/third_party/libtiff/doc/functions/TIFFReadScanline.rst deleted file mode 100644 index 29cb7c0..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadScanline.rst +++ /dev/null @@ -1,75 +0,0 @@ -TIFFReadScanline -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample) - -Description ------------ - -Read the data for the specified row into the (user supplied) data buffer -*buf*. The data are returned decompressed and, in the native byte- and -bit-ordering, but are otherwise packed (see further below). The buffer -must be large enough to hold an entire scanline of data. Applications -should call the routine :c:func:`TIFFScanlineSize` to find out the size -(in bytes) of a scanline buffer. -The *row* parameter is always used by :c:func:`TIFFReadScanline`; the -*sample* parameter is used only if data are organized in separate planes -(``PlanarConfiguration`` = 2). - -Notes ------ - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order, - -In C++ the *sample* parameter defaults to 0. - -Return values -------------- - -:c:func:`TIFFReadScanline` returns -1 if it detects an error; otherwise 1 is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Compression algorithm does not support random access"``: - - Data was requested in a non-sequential order from a file that uses a - compression algorithm and that has ``RowsPerStrip`` greater than one. - That is, data in the image is stored in a compressed form, and with multiple - rows packed into a strip. In this case, the library does not support random - access to the data. The data should either be accessed sequentially, or the - file should be converted so that each strip is made up of one row of data. - -Bugs ----- - -Reading subsampled YCbCR data does not work correctly because, for -``PlanarConfiguration`` = 2, the size of a scanline is not calculated on a -per-sample basis, and for ``PlanarConfiguration`` = 1, the library does not -unpack the block-interleaved samples; use the strip- and -tile-based interfaces to read these formats. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFReadTile.rst b/third_party/libtiff/doc/functions/TIFFReadTile.rst deleted file mode 100644 index fc1afa7..0000000 --- a/third_party/libtiff/doc/functions/TIFFReadTile.rst +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadTile -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -Description ------------ - -Return the data for the tile *containing* the specified coordinates. The -data placed in *buf* are returned decompressed and, typically, in the -native byte- and bit-ordering, but are otherwise packed (see further -below). The buffer must be large enough to hold an entire tile of data. -Applications should call the routine :c:func:`TIFFTileSize` to find out -the size (in bytes) of a tile buffer. The *x* and *y* parameters are -always used by :c:func:`TIFFReadTile`. The *z* parameter is used if the -image is deeper than 1 slice (``ImageDepth`` > 1). The *sample* -parameter is used only if data are organized in separate planes ( -``PlanarConfiguration`` = 2). - -Notes ------ - -The library attempts to hide bit- and byte-ordering differences between -the image and the native machine by converting data to the native machine -order. Bit reversal is done if the ``FillOrder`` tag is opposite to the -native machine bit order. 16- and 32-bit samples are automatically -byte-swapped if the file was written with a byte order opposite to the -native machine byte order. - -Return values -------------- - -:c:func:`TIFFReadTile` returns -1 if it detects an error; otherwise the -number of bytes in the decoded tile is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFtile` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFSetDirectory.rst b/third_party/libtiff/doc/functions/TIFFSetDirectory.rst deleted file mode 100644 index 00a9f11..0000000 --- a/third_party/libtiff/doc/functions/TIFFSetDirectory.rst +++ /dev/null @@ -1,71 +0,0 @@ -TIFFSetDirectory -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFSetDirectory(TIFF* tif, tdir_t dirnum) - -.. c:function:: int TIFFSetSubDirectory(TIFF* tif, uint64_t diroff) - -Description ------------ - -:c:func:`TIFFSetDirectory` changes the current directory and reads its -contents with :c:func:`TIFFReadDirectory`. The parameter *dirnum* -specifies the subfile/directory as an integer number, with the first -directory numbered zero. -:c:func:`TIFFSetDirectory()` only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain. - -:c:func:`TIFFSetSubDirectory` acts like :c:func:`TIFFSetDirectory`, -except the directory is specified as a file offset instead of an index; -this is required for accessing subdirectories linked through a -``SubIFD`` tag. (see :ref:`MultiPage SubIFD `) - -Directory query functions :c:func:`TIFFCurrentDirectory`, -:c:func:`TIFFCurrentDirOffset`, :c:func:`TIFFLastDirectory` and -:c:func:`TIFFNumberOfDirectories` retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information! - -Return values -------------- - -On successful return 1 is returned. Otherwise, 0 is returned if *dirnum* -or *diroff* specifies a non-existent directory, or if an error was -encountered while reading the directory's contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"%s: Error fetching directory count"``: - - An error was encountered while reading the "directory count" field. - -``"%s: Error fetching directory link"``: - - An error was encountered while reading the "link value" that points to the - next directory in a file. - -See also --------- - -:doc:`TIFFquery` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFSetField.rst b/third_party/libtiff/doc/functions/TIFFSetField.rst deleted file mode 100644 index 82935ea..0000000 --- a/third_party/libtiff/doc/functions/TIFFSetField.rst +++ /dev/null @@ -1,402 +0,0 @@ -TIFFSetField -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include " - -.. c:function:: int TIFFSetField(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - -.. c:function:: int TIFFUnsetField(TIFF* tif, uint32_t tag) - -Description ------------ - -:c:func:`TIFFSetField` sets the value of a field or pseudo-tag in the -current directory associated with the open TIFF file *tif*. -(A *pseudo-tag* is a parameter that is used to control the operation of -the TIFF library but whose value is not read or written to the underlying -file.) To set the value of a field the file must have been previously -opened for writing with :c:func:`TIFFOpen`. -Pseudo-tags can be set whether the file was opened for reading or writing. -The field is identified by *tag*, one of the values defined in the include -file :file:`tiff.h` (see also the table below). -The actual value is specified using a variable argument list, as -prescribed by the :file:`stdarg.h` interface. - -:c:func:`TIFFVSetField` is functionally equivalent to :c:func:`TIFFSetField` -except that it takes a pointer to a variable argument list. -:c:func:`TIFFVSetField` is useful for writing routines that are layered on -top of the functionality provided by :c:func:`TIFFSetField`. - -:c:func:`TIFFUnsetField` clears the contents of the field in the internal -structure. If it is a custom field, it is removed from the list of known tags. - -The tags understood by :program:`libtiff`, the number of parameter values, -and the expected types for the parameter values are shown below. -The data types are: - -.. list-table:: Tag data types - :widths: 5 15 - :header-rows: 1 - - * - Type - - Description - - * - :c:expr:`char*` - - a null-terminated string corresponding to the ``ASCII`` data type - * - :c:expr:`uint16_t` - - an unsigned 16-bit value - * - :c:expr:`uint32_t` - - an unsigned 32-bit value; - * - :c:expr:`uint16_t*` - - an array of unsigned 16-bit values. - * - :c:expr:`void*` - - an array of data values of unspecified type. - -Consult the TIFF specification for information on the meaning of each tag. - - .. list-table:: Tag properties - :widths: 5 3 5 10 - :header-rows: 1 - - * - Tag name - - Count - - Types - - Notes - - - * - :c:macro:`TIFFTAG_ARTIST` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_BADFAXLINES` - - 1 - - :c:expr:`uint32_t` - - - * - :c:macro:`TIFFTAG_BITSPERSAMPLE` - - 1 - - :c:expr:`uint16_t` - - † - * - :c:macro:`TIFFTAG_CLEANFAXDATA` - - 1 - - :c:expr:`uint16_t` - - - * - :c:macro:`TIFFTAG_COLORMAP` - - 3 - - :c:expr:`uint16_t*` - - :c:expr:`1< 0 - * - :c:macro:`TIFFTAG_SAMPLEFORMAT` - - 1 - - :c:expr:`uint16_t` - - † - * - :c:macro:`TIFFTAG_SAMPLESPERPIXEL` - - 1 - - :c:expr:`uint16_t` - - † value must be ≤ 4 - * - :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` - - 1 - - :c:expr:`double` - - - * - :c:macro:`TIFFTAG_SMINSAMPLEVALUE` - - 1 - - :c:expr:`double` - - - * - :c:macro:`TIFFTAG_SOFTWARE` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_STONITS` - - 1 - - :c:expr:`double` - - † - * - :c:macro:`TIFFTAG_SUBFILETYPE` - - 1 - - :c:expr:`uint32_t` - - - * - :c:macro:`TIFFTAG_SUBIFD` - - 2 - - :c:expr:`uint16_t`, :c:expr:`uint64_t*` - - count, offsets array - * - :c:macro:`TIFFTAG_TARGETPRINTER` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_THRESHHOLDING` - - 1 - - :c:expr:`uint16_t` - - - * - :c:macro:`TIFFTAG_TILEDEPTH` - - 1 - - :c:expr:`uint32_t` - - † - * - :c:macro:`TIFFTAG_TILELENGTH` - - 1 - - :c:expr:`uint32_t` - - † must be a multiple of 8 - * - :c:macro:`TIFFTAG_TILEWIDTH` - - 1 - - :c:expr:`uint32_t` - - † must be a multiple of 8 - * - :c:macro:`TIFFTAG_TRANSFERFUNCTION` - - 1 or 3‡ - - :c:expr:`uint16_t*` - - :c:expr:`1< - -.. c:function:: TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc extender) - -Description ------------ - -:c:func:`TIFFSetTagExtender` is used to register the merge function -for user defined tags as an extender callback with ``libtiff``. -A brief description can be found at :ref:`define_application_tags`. - -.. note:: - - :c:func:`TIFFSetTagExtender` cannot be used to extend custom directories - (for example EXIF, GPS or other custom directories). - Only the TIFF directory can be extended with additional tags. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`/addingtags` (3tiff), -:doc:`TIFFMergeFieldInfo` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFStrileQuery.rst b/third_party/libtiff/doc/functions/TIFFStrileQuery.rst deleted file mode 100644 index 0a40bcf..0000000 --- a/third_party/libtiff/doc/functions/TIFFStrileQuery.rst +++ /dev/null @@ -1,80 +0,0 @@ -TIFFStrileQuery -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint64_t TIFFGetStrileByteCount(TIFF* tif, uint32_t strile); - -.. c:function:: uint64_t TIFFGetStrileOffset(TIFF* tif, uint32_t strile); - -.. c:function:: uint64_t TIFFGetStrileByteCountWithErr(TIFF* tif, uint32_t strile, int *pbErr); - -.. c:function:: uint64_t TIFFGetStrileOffsetWithErr(TIFF* tif, uint32_t strile, int *pbErr); - -Description ------------ - -Make defer strile offset/bytecount loading available at runtime -and add per-strile offset/bytecount loading capabilities. Part of -this commit makes the behaviour that was previously met when ``libtiff`` -was compiled with ``-DDEFER_STRILE_LOAD`` available for default builds. - -When specifying the new ``D`` (Deferred) :c:func:`TIFFOpen` flag, -the loading of strile offset/bytecount is deferred. -In that mode, the ``StripOffsets`` / ``StripByteCounts`` or -``TileOffsets`` / ``TileByteCounts`` arrays are only loaded when first -accessed. This can speed-up the opening of files stored on the network -when just metadata retrieval is needed. - -Another addition is the capability of loading only the values of -the offset/bytecount of the strile of interest instead of the -whole array. This is enabled with the new ``O`` (Ondemand) flag of -:c:func:`TIFFOpen` (which implies ``D``). - -The public :c:func:`TIFFGetStrileOffset`, :c:func:`TIFFGetStrileOffsetWithErr`, -:c:func:`TIFFGetStrileByteCount` and :c:func:`TIFFGetStrileByteCountWithErr` -functions have been added to API. -They are of particular interest when using sparse files (with -``offset == bytecount == 0``) and you want to detect if a strile is -present or not without decompressing the data, or updating an -existing sparse file. - -:c:func:`TIFFGetStrileByteCount` returns the value of the TileByteCounts / -StripByteCounts array for the specified tile/strile. - -:c:func:`TIFFGetStrileByteCountWithErr` additionally provides *pbErr* -as an *int* pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return. - -:c:func:`TIFFGetStrileOffset` returns the value of the TileOffsets / -StripOffsets array for the specified tile/strile. - -:c:func:`TIFFGetStrileOffsetWithErr` additionally provides *pbErr* -as an *int* pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -Note ----- - -This functionality was introduced with libtiff 4.1. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFDeferStrileArrayWriting` (3tiff) - diff --git a/third_party/libtiff/doc/functions/TIFFWarning.rst b/third_party/libtiff/doc/functions/TIFFWarning.rst deleted file mode 100644 index c5645eb..0000000 --- a/third_party/libtiff/doc/functions/TIFFWarning.rst +++ /dev/null @@ -1,105 +0,0 @@ -TIFFWarning -=========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: void TIFFWarning(const char* module, const char* fmt, ...) - -.. c:function:: void TIFFWarningExt(thandle_t fd, const char* module, const char* fmt, ...) - -.. c:function:: void TIFFWarningExtR(TIFF *tif, const char* module, const char* fmt, ...) - -.. c:type:: void (*TIFFWarningHandler)(const char * module, const char* fmt, va_list ap) - -.. c:type:: void (*TIFFWarningHandlerExt)(thandle_t fd, const char* module, const char* fmt, va_list ap) - -.. c:type:: int (*TIFFWarningHandlerExtR)(TIFF* tif, void* user_data, const char* module, const char* fmt, va_list ap) - -.. c:function:: TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler) - -.. c:function:: TIFFWarningHandlerExt TIFFSetWarningHandlerExt(TIFFWarningHandlerExt handler) - -Description ------------ - -:c:func:`TIFFWarning` invokes the library-wide warning handler function -to (normally) write a warning message to the ``stderr``. -The *fmt* parameter is a :c:func:`printf` format string, and any number -arguments can be supplied. The *module* parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which a warning is -detected. - -Applications that desire to capture control in the event of a warning -should use :c:func:`TIFFSetWarningHandler` to override the default -warning handler. A :c:macro:`NULL` (0) warning handler function may be -installed to suppress warning messages. - -Two more application-specific warning handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with a warning message function, i.e. -:c:func:`TIFFWarningExt` and :c:func:`TIFFWarningExtR` if the application -intends to call the handler with those extended parameters. - -:c:func:`TIFFWarningExt` provides a file handle as parameter. -Within ``libtiff`` :c:func:`TIFFWarningExt` is called passing ``tif->tif_clientdata`` -as *fd*, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for :c:func:`TIFFWarningExt` -is setup with :c:func:`TIFFSetWarningHandlerExt`. - -:c:func:`TIFFWarningExtR` (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -warning handler. That means for different TIFF handles, different warning -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -:c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt` -or :c:func:`TIFFClientOpenExt`. -Furthermore, a **custom defined data structure** *user_data* for the -warning handler can be given along. - -Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the -application-specific handler introduced with ``libtiff`` 4.5. - -Note ----- - -Both functions :c:func:`TIFFWarning` and :c:func:`TIFFWarningExt` -each attempt to call both handler functions if they are defined. -First :c:func:`TIFFWarningHandler` is called and then :c:func:`TIFFWarningHandlerExt`. -However, :c:func:`TIFFWarning` passes a "0" as a file handle to -:c:func:`TIFFWarningHandlerExt`. - -:c:func:`TIFFWarningExtR` tries first to call the per-TIFF handle defined -warning handler. If :c:func:`TIFFWarningHandlerExtR` is not defined or -returns 0, :c:func:`TIFFWarningHandler` and then :c:func:`TIFFWarningHandlerExt` -are called. From libtiff 4.5 onwards :c:func:`TIFFWarningExtR` is used -within the ``libtiff`` library. - -Return values -------------- - -:c:func:`TIFFSetWarningHandler` and :c:func:`TIFFSetWarningHandlerExt` -returns a reference to the previous warning handler function. - -:c:func:`TIFFWarningHandlerExtR` returns an integer as "stop" to control the call -of further warning handler functions within :c:func:`TIFFWarningExtR`: - - - 0: both functions :c:func:`TIFFWarningHandler` and :c:func:`TIFFWarningHandlerExt` are called. - - non-zero: no further warning message function is called. - -See also --------- - -:doc:`TIFFError` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`/functions/TIFFOpenOptions`, -:doc:`libtiff` (3tiff), -printf (3) diff --git a/third_party/libtiff/doc/functions/TIFFWriteDirectory.rst b/third_party/libtiff/doc/functions/TIFFWriteDirectory.rst deleted file mode 100644 index 5a2cf0c..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteDirectory.rst +++ /dev/null @@ -1,143 +0,0 @@ -TIFFWriteDirectory -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFWriteDirectory(TIFF* tif) - -.. c:function:: int TIFFRewriteDirectory(TIFF* tif) - -.. c:function:: int TIFFCheckpointDirectory(TIFF* tif) - -.. c:function:: void TIFFSetWriteOffset(TIFF* tif, toff_t off) - -.. c:function:: int TIFFWriteCheck(TIFF* tif, int tiles, const char* module) - -Description ------------ - -:c:func:`TIFFWriteDirectory` will write the contents of the current -directory (IFD) to the file and setup to create a new directory (IFD) -using :c:func:`TIFFCreateDirectory`. -Applications only need to call :c:func:`TIFFWriteDirectory` -when writing multiple subfiles (images) to a single TIFF file. -This is called "multi-page TIFF" or "multi-image TIFF" -(see :doc:`/multi_page`). -:c:func:`TIFFWriteDirectory` is automatically called by -:c:func:`TIFFClose` and :c:func:`TIFFFlush` to write a modified -directory if the file is open for writing. - -The :c:func:`TIFFRewriteDirectory` function operates similarly to -:c:func:`TIFFWriteDirectory`, but can be called with directories -previously read or written that already have an established location -in the file. It will rewrite the directory, but instead of placing it -at its old location (as :c:func:`TIFFWriteDirectory` would, if the size -of the directory has not grown) it will -place them at the end of the file, correcting the pointer from the -preceding directory or file header to point to it's new location. This -is particularly important in cases where the size of the directory and -pointed to data has grown, so it won't fit in the space available at the -old location. - -The :c:func:`TIFFCheckpointDirectory` writes the current state of the -tiff directory into the file to make what is currently in the file -readable. Unlike :c:func:`TIFFWriteDirectory`, -:c:func:`TIFFCheckpointDirectory` does not free up the directory data -structures in memory, so they can be updated (as strips/tiles are -written) and written again. Reading such a partial file you will at -worst get a tiff read error for the first strip/tile encountered that -is incomplete, but you will at least get all the valid data in the file -before that. When the file is complete, just use -:c:func:`TIFFWriteDirectory` as usual to finish it off cleanly. - -The :c:func:`TIFFSetWriteOffset` sets the current write offset for image data -(i.e.pixels). The offset for writing the directory (:ref:`IFD `) -data is not affected. -This should only be used to set the offset to a known previous location -(very carefully), or to 0 so that the next write gets appended to the end -of the file. - -The :c:func:`TIFFWriteCheck` verify file is writable and that the directory -information is setup properly. In doing the latter we also "freeze" -the state of the directory so that important information is not changed. - -Return values -------------- - -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing -the directory contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Error post-encoding before directory write"``: - - Before writing the contents of the current directory, any pending data are - flushed. This message indicates that an error occurred while doing this. - -``"Error flushing data before directory write"``: - - Before writing the contents of the current directory, any pending data are - flushed. This message indicates that an error occurred while doing this. - -``"Cannot write directory, out of space"``: - - There was not enough space to allocate a temporary area for the directory - that was to be written. - -``"Error writing directory count"``: - - A write error occurred when writing the count of fields in the directory. - -``"Error writing directory contents"``: - - A write error occurred when writing the directory fields. - -``"Error writing directory link"``: - - A write error occurred when writing the link to the next directory. - -``Error writing data for field "%s"``: - - A write error occurred when writing indirect data for the specified field. - -``"Error writing TIFF header"``: - - A write error occurred when re-writing header at the front of the file. - -``"Error fetching directory count"``: - - A read error occurred when fetching the directory count field for - a previous directory. - This can occur when setting up a link to the directory that is being - written. - -``"Error fetching directory link"``: - - A read error occurred when fetching the directory link field for - a previous directory. - This can occur when setting up a link to the directory that is being - written. - -See also --------- - -:doc:`TIFFquery` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`TIFFError` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteEncodedStrip.rst b/third_party/libtiff/doc/functions/TIFFWriteEncodedStrip.rst deleted file mode 100644 index ffb9184..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteEncodedStrip.rst +++ /dev/null @@ -1,80 +0,0 @@ -TIFFWriteEncodedStrip -===================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Compress *size* bytes of raw data from *buf* and write the result to the -specified strip; replacing any previously written data. Note that the -value of *strip* is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. - -The strip number must be valid according to the current settings of the -``ImageLength`` and ``RowsPerStrip`` tags. -An image may be dynamically grown by increasing the value of -``ImageLength`` prior to each call to ``TIFFWriteEncodedStrip``. - -Return values -------------- - --1 is returned if an error was encountered. Otherwise, the value of -*size* is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write scanlines to a tiled image``: - - The image is assumed to be organized in tiles because the - ``TileWidth`` and ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data\fP``: - - The image's width has not be set before the first write. See - :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first - write. See :c:func:`TIFFSetField` for information on how to do - this. - -``%s: No space for strip arrays"``: - - There was not enough space for the arrays that hold strip offsets and - byte counts. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteEncodedTile.rst b/third_party/libtiff/doc/functions/TIFFWriteEncodedTile.rst deleted file mode 100644 index 352a97b..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteEncodedTile.rst +++ /dev/null @@ -1,76 +0,0 @@ -TIFFWriteEncodedTile -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Compress *size* bytes of raw data from *buf* and **append** the result -to the end of the specified tile. Note that the value of *tile* is a -"raw tile number". That is, the caller must take into account whether -or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. - -Return values -------------- - --1 is returned if an error was encountered. Otherwise, the value of -*size* is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write tiles to a stripped image``: - - The image is assumed to be organized in strips because neither of the - ``TileWidth`` or ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not been set before the first write. See - :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for tile arrays"``: - - There was not enough space for the arrays that hold tile offsets and - byte counts. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteRawStrip.rst b/third_party/libtiff/doc/functions/TIFFWriteRawStrip.rst deleted file mode 100644 index 054cac9..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteRawStrip.rst +++ /dev/null @@ -1,75 +0,0 @@ -TIFFWriteRawStrip -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Append *size* bytes of raw data to the specified strip. - -Notes ------ - -The strip number must be valid according to the current settings of the -``ImageLength`` and ``RowsPerStrip`` tags. -An image may be dynamically grown by increasing the value of -``ImageLength`` prior to each call to :c:func:`TIFFWriteRawStrip`. - -Return values -------------- - --1 is returned if an error occurred. Otherwise, the value of *size* is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write scanlines to a tiled image``: - - The image is assumed to be organized in tiles because the - ``TileWidth`` and ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for strip arrays"``: - - There was not enough space for the arrays that hold strip - offsets and byte counts. - -``%s: Strip %d out of range, max %d``: - - The specified strip is not a valid strip according to the - currently specified image dimensions. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteRawTile.rst b/third_party/libtiff/doc/functions/TIFFWriteRawTile.rst deleted file mode 100644 index 5f4df50..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteRawTile.rst +++ /dev/null @@ -1,67 +0,0 @@ -TIFFWriteRawTile -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Append *size* bytes of raw data to the specified tile. - -Return values -------------- - --1 is returned if an error occurred. Otherwise, the value of *size* is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write tiles to a stripped image``: - - The image is assumed to be organized in strips because neither of the - ``TileWidth`` or ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for tile arrays``: - - There was not enough space for the arrays that hold tile offsets and - byte counts. - -``%s: Specified tile %d out of range, max %d``: - - The specified tile is not valid according to the currently specified - image dimensions. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteScanline.rst b/third_party/libtiff/doc/functions/TIFFWriteScanline.rst deleted file mode 100644 index 70988df..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteScanline.rst +++ /dev/null @@ -1,124 +0,0 @@ -TIFFWriteScanline -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFWriteScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample) - -Description ------------ - -Write data to a file at the specified row. The *sample* parameter is -used only if data are organized in separate planes -(``PlanarConfiguration`` = 2). -The data are assumed to be uncompressed and in the native bit- and -byte-order of the host machine. The data written to the file is -compressed according to the compression scheme of the current -TIFF directory (see further below). If the current scanline is past the -end of the current subfile, the ``ImageLength`` field is automatically -increased to include the scanline (except for ``PlanarConfiguration`` = 2, -where the ``ImageLength`` cannot be changed once the first data are -written). If the ``ImageLength`` is increased, the ``StripOffsets`` -and ``StripByteCounts`` fields are similarly enlarged to reflect data -written past the previous end of image. - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. The library attempts to hide bit-ordering differences -between the image and the native machine by converting data from the -native machine order. - -In C++ the *sample* parameter defaults to 0. - -Once data are written to a file for the current directory, the values of -certain tags may not be altered; see :c:func:`TIFFSetField` for more -information. - -It is not possible to write scanlines to a file that uses a tiled -organization. The routine :c:func:`TIFFIsTiled` can be used to -determine if the file is organized as tiles or strips. - -Return values -------------- - -:c:func:`TIFFWriteScanline` returns -1 if it immediately detects an -error and 1 for a successful write. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``"Can not write scanlines to a tiled image"``: - - An attempt was made to write a scanline to a tiled image. The image - is assumed to be organized in tiles because the ``TileWidth`` and - ``TileLength`` tags have been set with :c:func:`TIFFSetField`. - -``"Compression algorithm does not support random access"``: - - Data was written in a non-sequential order to a file that uses a - compression algorithm and that has ``RowsPerStrip`` greater than one. - That is, data in the image is to be stored in a compressed form, and - with multiple rows packed into a strip. In this case, the library - does not support random access to the data. The data should either be - written as entire strips, sequentially by rows, or the value of - ``RowsPerStrip`` should be set to one. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``Can not change "ImageLength" when using separate planes``: - - Separate image planes are being used (``PlanarConfiguration`` = 2), - but the number of rows has not been specified before the first write. - The library supports the dynamic growth of an image only when data - are organized in a contiguous manner (``PlanarConfiguration`` = 1). - -``"%d: Sample out of range, max %d"``: - - The *sample* parameter was greater than the value of the - ``SamplesPerPixel`` tag. - -``%s: No space for strip arrays``: - - There was not enough space for the arrays that hold strip offsets and - byte counts. - -Bugs ----- - -Writing subsampled YCbCR data does not work correctly because, for -``PlanarConfiguration`` = 2 the size of a scanline is not calculated on -a per-sample basis, and for ``PlanarConfiguration`` = 1 the library -does not pack the block-interleaved samples. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFWriteTile.rst b/third_party/libtiff/doc/functions/TIFFWriteTile.rst deleted file mode 100644 index bd9f30e..0000000 --- a/third_party/libtiff/doc/functions/TIFFWriteTile.rst +++ /dev/null @@ -1,51 +0,0 @@ -TIFFWriteTile -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -TIFFWriteTile \- encode and write a tile of data to an open TIFF file - -.. c:function:: tmsize_t TIFFWriteTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -Description ------------ - -Write the data for the tile *containing* the specified coordinates. The -data in *buf* are (potentially) compressed, and written to the -indicated file, normally being appended to the end of the file. The -buffer must be contain an entire tile of data. Applications should -call the routine :c:func:`TIFFTileSize` to find out the size (in bytes) -of a tile buffer. The *x* and *y* parameters are always used by -:c:func:`TIFFWriteTile`. The *z* parameter is used if the image is -deeper than 1 slice (``ImageDepth`` > 1). -The *sample* parameter is used only if data are organized in separate -planes (``PlanarConfiguration`` = 2). - -Return values -------------- - -:c:func:`TIFFWriteTile` returns -1 if it detects an error; otherwise -the number of bytes in the tile is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFtile` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFbuffer.rst b/third_party/libtiff/doc/functions/TIFFbuffer.rst deleted file mode 100644 index fd6e9aa..0000000 --- a/third_party/libtiff/doc/functions/TIFFbuffer.rst +++ /dev/null @@ -1,57 +0,0 @@ -TIFFbuffer -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - - -.. c:function:: int TIFFReadBufferSetup(TIFF* tif, void *buffer, tmsize_t size) -.. c:function:: int TIFFWriteBufferSetup(TIFF* tif, void *buffer, tmsize_t size) - -Description ------------ - -The following routines are provided for client-control of the I/O buffers -used by the library. Applications need never use these routines; they are -provided only for "intelligent clients" that wish to optimize memory usage -and/or eliminate potential copy operations that can occur when working with -images that have data stored without compression. - -:c:func:`TIFFReadBufferSetup` sets up the data buffer used to read raw (encoded) -data from a file. If the specified pointer is :c:macro:`NULL` (zero), then a -buffer of the appropriate size is allocated. Otherwise the caller must guarantee -that the buffer is large enough to hold any individual strip of raw data. -:c:func:`TIFFReadBufferSetup` returns a non-zero value if the setup was successful -and zero otherwise. - -:c:func:`TIFFWriteBufferSetup` sets up the data buffer used to write raw (encoded) -data to a file. If the specified *size* is -1, then the buffer size is selected to -hold a complete tile or strip, or at least 8 kilobytes, whichever is greater. If -the specified *buffer* is :c:macro:`NULL` (zero), then a buffer of the appropriate -size is dynamically allocated. -:c:func:`TIFFWriteBufferSetup` returns a non-zero value if the setup was successful -and zero otherwise. - -Diagnostics ------------ - -``%s: No space for data buffer at scanline %ld``: - - :c:func:`TIFFReadBufferSetup` was unable to dynamically allocate space - for a data buffer. - -``%s: No space for output buffer``: - - :c:func:`TIFFWriteBufferSetup` was unable to dynamically allocate space - for a data buffer. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFcodec.rst b/third_party/libtiff/doc/functions/TIFFcodec.rst deleted file mode 100644 index d9f658d..0000000 --- a/third_party/libtiff/doc/functions/TIFFcodec.rst +++ /dev/null @@ -1,75 +0,0 @@ -TIFFcodec -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const TIFFCodec* TIFFFindCODEC(uint16_t scheme) - -.. c:function:: TIFFCodec* TIFFRegisterCODEC(uint16_t scheme, const char *method, TIFFInitMethod init) - -.. c:function:: void TIFFUnRegisterCODEC(TIFFCodec * codec) - -.. c:function:: int TIFFIsCODECConfigured(uint16_t scheme) - -.. c:function:: TIFFCodec* TIFFGetConfiguredCODECs(uint16_t scheme) - -.. c:function:: int TIFFSetCompressionScheme(TIFF* tif, int scheme) - - -Description ------------ - -:program:`libtiff` supports a variety of compression schemes implemented -by software *codecs*. Each codec adheres to a modular interface that -provides for the decoding and encoding of image data; as well as some -other methods for initialization, setup, cleanup, and the control of -default strip and tile sizes. Codecs are identified by the associated -value of the TIFF ``Compression`` tag; e.g. 5 for LZW compression. - -.. ToDo: Describe functionality of next functions - -:c:func:`TIFFFindCODEC` ?????? - -:c:func:`TIFFUnRegisterCODEC` ????? - -The :c:func:`TIFFRegisterCODEC` routine can be used to augment or -override the set of codecs available to an application. If the -specified *scheme* already has a registered codec then it is -*overridden* and any images with data encoded with this compression -scheme will be decoded using the supplied codec. - -:c:func:`TIFFIsCODECConfigured` returns 1 if the codec is configured -and working. Otherwise 0 will be returned. - -:c:func:`TIFFGetConfiguredCODECs` gets list of configured codecs, -both built-in and registered by user. Function returns array of -:c:type:`TIFFCodec` records (the last record should be NULL) or NULL -if function failed. Caller is responsible to free this structure. - -:c:func:`TIFFSetCompressionScheme` ???? - - -Diagnostics ------------ - -``No space to register compression scheme %s``: - - :c:func:`TIFFRegisterCODEC` was unable to allocate memory for the - data structures needed to register a codec. - -``Cannot remove compression scheme %s; not registered``: - - :c:func:`TIFFUnRegisterCODEC` did not locate the specified codec in - the table of registered compression schemes. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/functions/TIFFcolor.rst b/third_party/libtiff/doc/functions/TIFFcolor.rst deleted file mode 100644 index bf0c237..0000000 --- a/third_party/libtiff/doc/functions/TIFFcolor.rst +++ /dev/null @@ -1,218 +0,0 @@ -TIFFcolor -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite) - -.. c:function:: void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *R, uint32_t *G, uint32_t *B) - -.. c:function:: int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *displayw, float *refWhite) - -.. c:function:: void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t L, int32_t a, int32_t b, float *X, float *Y, float *Z) - -.. c:function:: void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *R, uint32_t *G, uint32_t *B) - -Description ------------ - -TIFF supports several color spaces for images stored in that format. There is -usually a problem of application to handle the data properly and convert -between different colorspaces for displaying and printing purposes. To -simplify this task ``libtiff`` implements several color conversion routines -itself. In particular, these routines used in the :doc:`TIFFRGBAImage` -interface. - -:c:func:`TIFFYCbCrToRGBInit` used to initialize *YCbCr* to *RGB* -conversion state. - -.. note:: - The calling program is responsible for allocating and releasing the required - buffer for the structure :c:struct:`TIFFYCbCrToRGB` and its required tables, - pointed to by *ycbcr*. The pointers to these tables are stored in the - structure :c:struct:`TIFFYCbCrToRGB`, which is located at the beginning - of that buffer. Thus, this memory has to be allocated as shown in the example below. - -:c:struct:`TIFFYCbCrToRGB` is defined in :file:`tiffio.h` as: - -:: - - typedef struct { /* YCbCr->RGB support */ - TIFFRGBValue* clamptab; /* range clamping table */ - int* Cr_r_tab; - int* Cb_b_tab; - int32_t* Cr_g_tab; - int32_t* Cb_g_tab; - int32_t* Y_tab; - } TIFFYCbCrToRGB; - -*luma* is a float array of three values representing proportions of the -red, green and blue in luminance, Y (see section 21 of the TIFF 6.0 -specification, where YCbCr images are discussed). -:c:macro:`TIFFTAG_YCBCRCOEFFICIENTS` hold these values in TIFF file. -*refBlackWhite* is a float array of 6 values which specifies a pair of -headroom and footroom image data values (codes) for each image component -(see section 20 of the TIFF 6.0 specification where the colorimetry -fields are discussed). -:c:macro:`TIFFTAG_REFERENCEBLACKWHITE` is responsible for storing these -values in TIFF file. The following code snippet should help to -understand the the technique: - -:: - - float *luma, *refBlackWhite; - uint16_t hs, vs; - - /* Initialize structures */ - TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB*) - _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long)) - + 4*256*sizeof(TIFFRGBValue) - + 2*256*sizeof(int) - + 3*256*sizeof(int32_t)); - if (ycbcr == NULL) { - TIFFError("YCbCr->RGB", - "No space for YCbCr->RGB conversion state"); - exit(0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); - TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite); - if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0) { - exit(0); - } - - /* Start conversion */ - uint32_t r, g, b; - uint32_t Y; - int32_t Cb, Cr; - - for each pixel in image { - TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b); - } - - /* Free state structure */ - _TIFFfree(ycbcr); - -:c:func:`TIFFCIELabToRGBInit` initializes the *CIE L\*a\*b\* 1976* to -*RGB* conversion state. :c:struct:`TIFFCIELabToRGB` is defined as: - -:: - - #define CIELABTORGB_TABLE_RANGE 1500 - - typedef struct { /* CIE Lab 1976->RGB support */ - int range; /* Size of conversion table */ - float rstep, gstep, bstep; - float X0, Y0, Z0; /* Reference white point */ - TIFFDisplay display; - float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ - float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ - float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ - } TIFFCIELabToRGB; - -*display* is a display device description, declared as: - -:: - - typedef struct { - float d_mat[3][3]; /* XYZ -> luminance matrix */ - float d_YCR; /* Light o/p for reference white */ - float d_YCG; - float d_YCB; - uint32_t d_Vrwr; /* Pixel values for ref. white */ - uint32_t d_Vrwg; - uint32_t d_Vrwb; - float d_Y0R; /* Residual light for black pixel */ - float d_Y0G; - float d_Y0B; - float d_gammaR; /* Gamma values for the three guns */ - float d_gammaG; - float d_gammaB; - } TIFFDisplay; - -For example, one can use sRGB device, which has the following parameters: - -:: - - TIFFDisplay display_sRGB = { - { /* XYZ -> luminance matrix */ - { 3.2410F, -1.5374F, -0.4986F }, - { -0.9692F, 1.8760F, 0.0416F }, - { 0.0556F, -0.2040F, 1.0570F } - }, - 100.0F, 100.0F, 100.0F, /* Light o/p for reference white */ - 255, 255, 255, /* Pixel values for ref. white */ - 1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */ - 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */ - }; - -*refWhite* is a color temperature of the reference white. The -:c:macro:`TIFFTAG_WHITEPOINT` contains the chromaticity of the white -point of the image from where the reference white can be calculated -using following formulae: - -:: - - refWhite_Y = 100.0 - - refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y - - refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X - -The conversion itself performed in two steps: at the first one we will convert -*CIE L\*a\*b\* 1976* to *CIE XYZ* using the :c:func:`TIFFCIELabToXYZ` routine, -and at the second step we will convert *CIE XYZ* to *RGB* using -:c:func:`TIFFXYZToRGB`. Look at the code sample below: - -:: - - float *whitePoint; - float refWhite[3]; - - /* Initialize structures */ - img->cielab = (TIFFCIELabToRGB *) - _TIFFmalloc(sizeof(TIFFCIELabToRGB)); - if (!cielab) { - TIFFError("CIE L*a*b*->RGB", - "No space for CIE L*a*b*->RGB conversion state."); - exit(0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint); - refWhite[1] = 100.0F; - refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; - refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1]) - / whitePoint[1] * refWhite[1]; - if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) { - TIFFError("CIE L*a*b*->RGB", - "Failed to initialize CIE L*a*b*->RGB conversion state."); - _TIFFfree(cielab); - exit(0); - } - - /* Now we can start to convert */ - uint32_t r, g, b; - uint32_t L; - int32_t a, b; - float X, Y, Z; - - for each pixel in image { - TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z); - TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b); - } - - /* Don't forget to free the state structure */ - _TIFFfree(cielab); - -See also --------- - -:doc:`TIFFRGBAImage` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFmemory.rst b/third_party/libtiff/doc/functions/TIFFmemory.rst deleted file mode 100644 index 4aec018..0000000 --- a/third_party/libtiff/doc/functions/TIFFmemory.rst +++ /dev/null @@ -1,61 +0,0 @@ -TIFFmemory -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void *_TIFFmalloc(tmsize_t size) - -.. c:function:: void *_TIFFrealloc(void *buffer, tmsize_t size) - -.. c:function:: void _TIFFfree(void *buffer) - -.. c:function:: void _TIFFmemset(void *s, int c, tmsize_t n) - -.. c:function:: void _TIFFmemcpy(void *dest, const void *src, tmsize_t n) - -.. c:function:: int _TIFFmemcmp(const void *s1, const void *s2, tmsize_t n) - -.. c:function:: void* _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) - -.. c:function:: void* _TIFFCheckRealloc(TIFF* tif, void* buffer, tmsize_t nmemb, tmsize_t elem_size, const char* what) - -Description ------------ - -These routines are provided for writing portable software that uses -:program:`libtiff`; they hide any memory-management related issues, such as -dealing with segmented architectures found on 16-bit machines. - -:c:func:`_TIFFmalloc` and :c:func:`_TIFFrealloc` are used to dynamically -allocate and reallocate memory used by :program:`libtiff`; such as memory -passed into the I/O routines. Memory allocated through these interfaces is -released back to the system using the :c:func:`_TIFFfree` routine. - -Memory allocated through one of the above interfaces can be set to a known -value using :c:func:`_TIFFmemset`, copied to another memory location using -:c:func:`_TIFFmemcpy`, or compared for equality using :c:func:`_TIFFmemcmp`. -These routines conform to the equivalent C routines: -:c:func:`memset`, :c:func:`memcpy`, :c:func:`memcmp`, respectively. - -:c:func:`_TIFFCheckMalloc` and :c:func:`_TIFFCheckRealloc` are checking for -integer overflow before calling :c:func:`_TIFFmalloc` and :c:func:`_TIFFrealloc`, -respectively. - -Diagnostics ------------ - -None. - -See also --------- - -malloc (3), -memory (3), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFquery.rst b/third_party/libtiff/doc/functions/TIFFquery.rst deleted file mode 100644 index e18dec8..0000000 --- a/third_party/libtiff/doc/functions/TIFFquery.rst +++ /dev/null @@ -1,150 +0,0 @@ -TIFFquery -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tdir_t TIFFCurrentDirectory(TIFF* tif) - -.. c:function:: uint64_t TIFFCurrentDirOffset(TIFF* tif) - -.. c:function:: int TIFFLastDirectory(TIFF* tif) - -.. c:function:: tdir_t TIFFNumberOfDirectories(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentRow(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentStrip(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentTile(TIFF* tif) - -.. c:function:: int TIFFFileno(TIFF* tif) - -.. c:function:: char* TIFFFileName(TIFF* tif) - -.. c:function:: int TIFFGetMode(TIFF* tif) - -.. c:function:: int TIFFIsTiled(TIFF* tif) - -.. c:function:: int TIFFIsBigEndian(TIFF* tif) - -.. c:function:: int TIFFIsBigTIFF(TIFF* tif) - -.. c:function:: int TIFFIsByteSwapped(TIFF* tif) - -.. c:function:: int TIFFIsMSB2LSB(TIFF* tif) - -.. c:function:: int TIFFIsUpSampled(TIFF* tif) - -.. c:function:: const char* TIFFGetVersion(void) - -Description ------------ - -The following query routines return status information about the directory -structure of an open TIFF file. - -:c:func:`TIFFCurrentDirectory` returns the index of the current -:ref:`Image File Directory (IFD) `. -Directories are numbered starting at 0. This number is suitable for -use with the :c:func:`TIFFSetDirectory` routine. -There are :ref:`IFDs ` in the file and an "active" -:ref:`IFD ` in memory, from which fields -are "set" and "get". The index of the current directory returned is: - -a) 65535 (non-existing directory) if there is no IFD in the file after opening, - or the state is unknown, - or the last read (i.e. TIFFFetchDirectory()) failed, - or a custom directory was written. -b) IFD index of last IFD written in the file. - In this case the active IFD is a new (empty) one and the current directory offset - from TIFFCurrentDirOffset() is zero. - If writing fails, the IFD index is not changed. -c) IFD index of IFD read from file into memory (=active IFD), - even if IFD is corrupt and TIFFReadDirectory() returns 0. - Then the current directory offset is the offset of the IFD in the file. -d) IFD index „0“, whenever a custom directory or an unchained SubIFD - was read. - -:c:func:`TIFFCurrentDirOffset` returns the file offset of the current -directory (instead of an index). -The file offset is suitable for use with the :c:func:`TIFFSetSubDirectory` -routine. This is required for accessing subdirectories linked through a -``SubIFD`` tag. See also :ref:`SubIFD access `. - -:c:func:`TIFFLastDirectory` returns a non-zero value if the current -directory is the last directory in the file; otherwise zero is returned. -A new (empty) directory in the memory (after :c:func:`TIFFWriteDirectory` -or :c:func:`TIFFCreateDirectory`) -also counts as the last directory, even if it has not yet been written to a file. - -:c:func:`TIFFNumberOfDirectories` returns the number of directories in a -file. Be aware that just created directories, which are not "written" to -file do not count. - -.. note:: Be aware that the return value of the above directory query functions - is not valid until the directory is "written" to file AND read back - e.g. :c:func:`TIFFSetDirectory` or :c:func:`TIFFReadDirectory`. - -The following query routines return information about an open TIFF file -and its image data. - -:c:func:`TIFFCurrentRow`, :c:func:`TIFFCurrentStrip`, and -:c:func:`TIFFCurrentTile` return the current row, strip, and tile, -respectively, that is being read or written. These values are updated each -time a read or write is done. - -:c:func:`TIFFFileno` returns the underlying file descriptor used to access -the TIFF image in the filesystem. - -:c:func:`TIFFFileName` returns the pathname argument passed to -:c:func:`TIFFOpen` or :c:func:`TIFFFdOpen`. - -:c:func:`TIFFGetMode` returns the mode with which the underlying file -was opened. On UNIX systems, this is the value passed to the -:c:func:`open` (2) system call. - -:c:func:`TIFFIsTiled` returns a non-zero value if the image data has a tiled -organization. Zero is returned if the image data is organized in strips. - -:c:func:`TIFFIsBigEndian` returns a non-zero value if the file is BigEndian -and zero if the file is LittleEndian. - -:c:func:`TIFFIsBigTIFF` returns a non-zero value if the file is in -BigTIFF style. - - -:c:func:`TIFFIsByteSwapped` returns a non-zero value if the image data -was in a different byte-order than the host machine. Zero is returned if -the TIFF file and local host byte-orders are the same. Note that -:c:func:`TIFFReadTile`, :c:func:`TIFFReadEncodedStrip` and -:c:func:`TIFFReadScanline` functions already normally perform byte -swapping to local host order if needed. - -:c:func:`TIFFIsMSB2LSB` returns a non-zero value if the image data is being -returned with bit 0 as the most significant bit. - -:c:func:`TIFFIsUpSampled` returns a non-zero value if image data returned -through the read interface routines is being up-sampled. This can be -useful to applications that want to calculate I/O buffer sizes to reflect -this usage (though the usual strip and tile size routines already do this). - -:c:func:`TIFFGetVersion` returns an ``ASCII`` string that has a version -stamp for the TIFF library software. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFsize.rst b/third_party/libtiff/doc/functions/TIFFsize.rst deleted file mode 100644 index 3799ab5..0000000 --- a/third_party/libtiff/doc/functions/TIFFsize.rst +++ /dev/null @@ -1,51 +0,0 @@ -TIFFsize -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFRasterScanlineSize(TIFF* tif) - -.. c:function:: uint64_t TIFFRasterScanlineSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFScanlineSize(TIFF* tif) - -.. c:function:: uint64_t TIFFScanlineSize64(TIFF* tif) - -Description ------------ - -:c:func:`TIFFScanlineSize` returns the size in bytes of a row of data as -it would be returned in a call to :c:func:`TIFFReadScanline`, or as it -would be expected in a call to :c:func:`TIFFWriteScanline`. -Note that this number may be 1/samples-per-pixel if data is -stored as separate planes. -The `ScanlineSize` in case of YCbCrSubsampling is defined as the -strip size divided by the strip height, i.e. the size of a pack of vertical -subsampling lines divided by vertical subsampling. It should thus make -sense when multiplied by a multiple of vertical subsampling. -:c:func:`TIFFScanlineSize64` returns the size as :c:type:`uint64_t`. - -:c:func:`TIFFRasterScanlineSize` returns the size in bytes of a complete -decoded and packed raster scanline. Note that this value may be different -from the value returned by :c:func:`TIFFScanlineSize` if data is stored -as separate planes. -:c:func:`TIFFRasterScanlineSize64` returns the size as :c:type:`uint64_t`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFstrip.rst b/third_party/libtiff/doc/functions/TIFFstrip.rst deleted file mode 100644 index a02bbcc..0000000 --- a/third_party/libtiff/doc/functions/TIFFstrip.rst +++ /dev/null @@ -1,94 +0,0 @@ -TIFFstrip -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t TIFFDefaultStripSize(TIFF* tif, uint32_t estimate) - -.. c:function:: tmsize_t TIFFStripSize(TIFF* tif) - -.. c:function:: uint64_t TIFFStripSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFVStripSize(TIFF* tif, uint32_t nrows) - -.. c:function:: uint64_t TIFFVStripSize64(TIFF* tif, uint32_t nrows) - -.. c:function:: tmsize_t TIFFRawStripSize(TIFF* tif, uint32_t strip) - -.. c:function:: uint64_t TIFFRawStripSize64(TIFF* tif, uint32_t strip) - -.. c:function:: uint32_t TIFFComputeStrip(TIFF* tif, uint32_t row, uint16_t sample) - -.. c:function:: uint32_t TIFFNumberOfStrips(TIFF* tif) - -.. c:function:: int TIFFSetupStrips(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDefaultStripSize` returns the number of rows for a -reasonable-sized strip according to the current settings of the -``ImageWidth``, ``BitsPerSample`` and ``SamplesPerPixel``, -tags and any compression-specific requirements. If the *estimate* -parameter, sf non-zero, then it is taken as an estimate of the desired strip -size and adjusted according to any compression-specific requirements. The -value returned by this function is typically used to define the -``RowsPerStrip`` tag. In lieu of any unusual requirements -``TIFFDefaultStripSize`` tries to create strips that have approximately -8 kilobytes of uncompressed data. - -:c:func:`TIFFStripSize` returns the equivalent size for a strip of data -as it would be returned in a call to :c:func:`TIFFReadEncodedStrip` -or as it would be expected in a call to :c:func:`TIFFWriteEncodedStrip`. -If an error occurs, 0 is returned. - -:c:func:`TIFFStripSize64` returns the equivalent size for a strip of data -as :c:type:`uint64_t`. -If an error occurs, 0 is returned. - -:c:func:`TIFFVStripSize` returns the number of bytes in a strip with -*nrows* rows of data. -If an error occurs, 0 is returned. - -:c:func:`TIFFVStripSize64` returns the number of bytes in a strip with -*nrows* rows of data as :c:type:`uint64_t`. -If an error occurs, 0 is returned. - -:c:func:`TIFFRawStripSize` returns the number of bytes in a raw strip -(i.e. not decoded). -If an error occurs, 0xFFFFFFFF `(=(tmsize_t(-1))` is returned. - -:c:func:`TIFFRawStripSize64` returns the number of bytes in a raw strip -as :c:type:`uint64_t`. -If an error occurs, 0xFFFFFFFF `(=(uint64_t(-1))` is returned. - -:c:func:`TIFFComputeStrip` returns the strip that contains the specified -coordinates. A valid strip is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The *row* parameter is -always used in calculating a strip. The *sample* parameter is used only -if data are organized in separate planes (``PlanarConfiguration`` = 2). - -:c:func:`TIFFNumberOfStrips` returns the number of strips in the image. - -:c:func:`TIFFSetupStrips` setup or reset strip parameters and strip array memory. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFswab.rst b/third_party/libtiff/doc/functions/TIFFswab.rst deleted file mode 100644 index 0a61def..0000000 --- a/third_party/libtiff/doc/functions/TIFFswab.rst +++ /dev/null @@ -1,78 +0,0 @@ -TIFFswab -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const unsigned char* TIFFGetBitRevTable(int reversed) - -.. c:function:: void TIFFReverseBits(u_char* data, unsigned long nbytes) - -.. c:function:: void TIFFSwabShort(uint16_t* data) - -.. c:function:: void TIFFSwabLong(uint32_t* data) - -.. c:function:: void TIFFSwabLong8(uint64_t* lp) - -.. c:function:: void TIFFSwabFloat(float* fp) - -.. c:function:: void TIFFSwabDouble(double *dp) - -.. c:function:: void TIFFSwabArrayOfShort(uint16_t* wp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfTriples(uint8_t* tp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfLong(uint32_t* lp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfLong8(uint64_t* lp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfFloat(float* fp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfDouble(double* dp, tmsize_t n) - -Description ------------ - -The following routines are used by the library to swap 16-, 32- and 64-bit -data and to reverse the order of bits in bytes. - -:c:func:`TIFFSwabShort` and :c:func:`TIFFSwabLong` and :c:func:`TIFFSwabFloat` -swap the bytes in a single 16- and 32-bit item, respectively. - -:c:func:`TIFFSwabLong8` and :c:func:`TIFFSwabDouble` -swap the bytes in a single 64-bit item. - -:c:func:`TIFFSwabArrayOfTriples` swap the first and the third byte of -each triple (three bytes) within the byte array. The second byte of each -triple stays untouched. - -:c:func:`TIFFSwabArrayOfShort` and :c:func:`TIFFSwabArrayOfLong`, -:c:func:`TIFFSwabArrayOfFloat` swap the bytes in an array of 16- and 32-bit -items, respectively. - -:c:func:`TIFFSwabArrayOfLong8` and :c:func:`TIFFSwabArrayOfDouble` -swap the bytes in an array of 64-bit items. - -:c:func:`TIFFReverseBits` replaces each byte in *data* with the -equivalent bit-reversed value. This operation is performed with a -lookup table, which is returned using the :c:func:`TIFFGetBitRevTable` -function. The *reversed* parameter specifies which table should be -returned. Supply *1* if you want bit reversal table. Supply *0* to get -the table that do not reverse bit values. It is a lookup table that can -be used as an "identity function"; i.e. :c:expr:`TIFFNoBitRevTable[n] == n`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/TIFFtile.rst b/third_party/libtiff/doc/functions/TIFFtile.rst deleted file mode 100644 index fac3267..0000000 --- a/third_party/libtiff/doc/functions/TIFFtile.rst +++ /dev/null @@ -1,93 +0,0 @@ -TIFFtile -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFDefaultTileSize(TIFF* tif, uint32_t* tw, uint32_t* th) - -.. c:function:: tmsize_t TIFFTileSize(TIFF* tif) - -.. c:function:: uint64_t TIFFTileSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFTileRowSize(TIFF* tif) - -.. c:function:: uint64_t TIFFTileRowSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFVTileSize(TIFF* tif, uint32_t nrows) - -.. c:function:: uint64_t TIFFVTileSize64(TIFF* tif, uint32_t nrows) - -.. c:function:: uint32_t TIFFComputeTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -.. c:function:: int TIFFCheckTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -.. c:function:: uint32_t TIFFNumberOfTiles(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDefaultTileSize` returns the pixel width and height of a -reasonable-sized tile; suitable for setting up the ``TileWidth`` and -``TileLength`` tags. If the *tw* and *th* values passed in are -non-zero, then they are adjusted to reflect any compression-specific -requirements. The returned width and height are constrained to be a -multiple of 16 pixels to conform with the TIFF specification. - -:c:func:`TIFFTileSize` returns the equivalent size for a tile of data -as it would be returned in a call to :c:func:`TIFFReadTile` or as it -would be expected in a call to :c:func:`TIFFWriteTile`. -:c:func:`TIFFTileSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFVTileSize` returns the number of bytes in a row-aligned -tile with *nrows* of data. -:c:func:`TIFFVTileSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFTileRowSize` returns the number of bytes of a row of data -in a tile. -:c:func:`TIFFTileRowSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFComputeTile` returns the tile that contains the specified -coordinates. A valid tile is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The *x* and *y* -parameters are always used in calculating a tile. The *z* -parameter is used if the image is deeper than 1 slice -(``ImageDepth`` > 1). -The *sample* parameter is used only if data are organized in separate -planes (``PlanarConfiguration`` = 2). - -:c:func:`TIFFCheckTile` returns a non-zero value if the supplied -coordinates are within the bounds of the image and zero otherwise. The -*x* parameter is checked against the value of the ``ImageWidth`` tag. -The *y* parameter is checked against the value of the ``ImageLength`` -tag. The *z* parameter is checked against the value of the -``ImageDepth`` tag (if defined). The *sample* parameter is checked -against the value of the ``SamplesPerPixel`` parameter if the data are -organized in separate planes. - -:c:func:`TIFFNumberOfTiles` returns the number of tiles in the image. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/_TIFFRewriteField.rst b/third_party/libtiff/doc/functions/_TIFFRewriteField.rst deleted file mode 100644 index 0f4575b..0000000 --- a/third_party/libtiff/doc/functions/_TIFFRewriteField.rst +++ /dev/null @@ -1,33 +0,0 @@ -_TIFFRewriteField -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int _TIFFRewriteField(TIFF* tif, uint16_t tag, TIFFDataType in_datatype, tmsize_t count, void* data) - -Description ------------ - -:c:func:`_TIFFRewriteField` -Rewrite a field in the directory on disk without regard to updating the -TIFF directory structure in memory. Currently only supported for field -that already exist in the on-disk directory. -Mainly used for updating stripoffset / stripbytecount values after -the directory is already on disk. - -Return values -------------- - -Returns zero on failure, and one on success. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/functions/_TIFFauxiliary.rst b/third_party/libtiff/doc/functions/_TIFFauxiliary.rst deleted file mode 100644 index 46f9a19..0000000 --- a/third_party/libtiff/doc/functions/_TIFFauxiliary.rst +++ /dev/null @@ -1,34 +0,0 @@ -_TIFFauxiliary -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t _TIFFClampDoubleToUInt32(double val) - -.. c:function:: uint32_t _TIFFMultiply32(TIFF* tif, uint32_t first, uint32_t second, const char* where) - -.. c:function:: uint64_t _TIFFMultiply64(TIFF* tif, uint64_t first, uint64_t second, const char* where) - -Description ------------ - -:c:func:`_TIFFClampDoubleToUInt32` clamps double values into the range -of :c:type:`uint32_t` (i.e. 0 .. 0xFFFFFFFF) - -:c:func:`_TIFFMultiply32` and :c:func:`_TIFFMultiply64` checks for -an integer overflow of the multiplication result and return the multiplication -result or `0` if an overflow would happen. -The string `where` is printed in the error message in case an overflow -happens and can be used to indicate where the function was called. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/functions/libtiff.rst b/third_party/libtiff/doc/functions/libtiff.rst deleted file mode 100644 index bfc13bc..0000000 --- a/third_party/libtiff/doc/functions/libtiff.rst +++ /dev/null @@ -1,856 +0,0 @@ -libtiff -======= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. highlight:: shell - -:: - - cc file.c -ltiff - -Description ------------ - -:program:`libtiff` is a library for reading and writing data files encoded with the -*"Tag Image File"* format, Revision 6.0 (or revision 5.0 or revision 4.0). This file -format is suitable for archiving multi-color and monochromatic image data. - -The library supports several compression algorithms, as indicated by the -``Compression`` field, including: -no compression (1), -CCITT 1D Huffman compression (2), -CCITT Group 3 Facsimile compression (3), -CCITT Group 4 Facsimile compression (4), -Lempel-Ziv & Welch compression (5), -baseline JPEG compression (7), -word-aligned 1D Huffman compression (32771), -PackBits compression (32773). -In addition, several nonstandard compression algorithms are supported: the -4-bit compression algorithm used by the -*ThunderScan* program (32809) (decompression only), -NeXT's 2-bit compression algorithm (32766) (decompression only), -an experimental LZ-style algorithm known as Deflate (32946), -and an experimental CIE LogLuv compression scheme designed -for images with high dynamic range (32845 for LogL and 32845 for LogLuv). -Directory information may be in either little- or big-endian byte order; byte -swapping is automatically done by the library. Data bit ordering may be either -Most Significant Bit (``MSB``) to Least Significant Bit (``LSB``) or -LSB to MSB. -Finally, the library does not support files in which the -``BitsPerSample`` , -``Compression`` , -``MinSampleValue`` , -or -``MaxSampleValue`` -fields are defined differently on a per-sample basis -(in Rev. 6.0 the -``Compression`` -tag is not defined on a per-sample basis, so this is immaterial). - -.. _DataTypes: - -Data types ----------- - -The library makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. -The following typedefs are exposed to users either through function -definitions or through parameters passed through the varargs interfaces. - -.. highlight:: c - -:: - - typedef int64_t tmsize_t; /* signed size type (int32_t on 32-bit platforms) */ - typedef void* thandle_t; /* client data handle */ - typedef uint64_t toff_t; /* file offset */ - typedef uint32_t tdir_t; /* directory index */ - -The following typedefs are deprecated and should be replaced by their -defining counterparts. - -.. highlight:: c - -:: - - typedef uint32_t ttag_t; /* directory tag */ - typedef uint16_t tsample_t; /* sample number */ - typedef uint32_t tstrile_t; /* strip or tile number */ - typedef tstrile_t tstrip_t; /* strip number */ - typedef tstrile_t ttile_t; /* tile number */ - typedef tmsize_t tsize_t; /* i/o size in bytes */ - typedef void *tdata_t; /* image data ref */ - -Note that -:c:type:`tstrip_t`, -:c:type:`ttile_t`, -and -:c:type:`tsize_t` -are constrained to be no more than 32-bit quantities by 32-bit fields they are -stored in in the -TIFF -image. -Likewise -:c:type:`tsample_t` -is limited by the 16-bit field used to store the -``SamplesPerPixel`` -tag. - -:c:type:`tdir_t` -constrains the maximum number of -IFDs -that may appear in an image and may be an arbitrary size (w/o penalty). -Starting with libtiff 4.5.0, tdir_t is a 32-bit unsigned integer. Previously, -it was a 16-bit unsigned integer. - -:c:type:`ttag_t` -must be either int, unsigned int, pointer, or double because the library uses -a varargs interface and -C restricts the type of the parameter before an ellipsis to be a promoted type. -:c:type:`toff_t` -is defined as :c:type:`uint64_t` because TIFF file offsets are (unsigned) 32-bit -quantities, and BigTIFF file offsets are unsigned 64-bit quantities. -A signed value is used because some interfaces return -1 on -error. Finally, note that user-specified data references are passed as opaque -handles and only cast at the lowest layers where their type is presumed. - -.. TODO: Check why this toff_t was switched to unsigned and update description. - -.. _List_of_routines: - -List of routines ----------------- - -The following routines are part of the library. Consult specific manual pages -for details on their operation; on most systems doing :command:`man function-name` -will work. - -.. list-table:: *Libtiff functions* - :widths: 5 20 - :header-rows: 1 - - * - Name - - Description - * - :c:func:`TIFFAccessTagMethods` - - provides read/write access to the TIFFTagMethods within the TIFF structure - to application code without giving access to the private TIFF structure - * - :c:func:`TIFFCheckpointDirectory` - - writes the current state of the directory - * - :c:func:`TIFFCheckTile` - - very x,y,z,sample is within image - * - :c:func:`TIFFCIELabToRGBInit` - - initialize CIE L*a*b* 1976 to RGB conversion state - * - :c:func:`TIFFCIELabToXYZ` - - perform CIE L*a*b* 1976 to CIE XYZ conversion - * - :c:func:`TIFFCleanup` - - auxiliary function to free the TIFF structure - * - :c:func:`TIFFClientdata` - - return open file's clientdata handle, which represents - the file descriptor used within ``libtiff``. - * - :c:func:`TIFFClientOpen` - - open a file for reading or writing - * - :c:func:`TIFFClientOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFClose` - - close a previously opened TIFF file - * - :c:func:`TIFFComputeStrip` - - return strip containing y,sample - * - :c:func:`TIFFComputeTile` - - return tile containing x,y,z,sample - * - :c:func:`TIFFCreateCustomDirectory` - - setup for a *custom* directory in a open TIFF file - * - :c:func:`TIFFCreateDirectory` - - setup for a directory in a open TIFF file - * - :c:func:`TIFFCreateEXIFDirectory` - - setup for a *EXIF* custom directory in a open TIFF file within a TIFF tag - * - :c:func:`TIFFCreateGPSDirectory` - - setup for a *GPS* custom directory in a open TIFF file within a TIFF tag - * - :c:func:`TIFFCurrentDirectory` - - return index of current directory - * - :c:func:`TIFFCurrentDirOffset` - - return file offset of the current directory (instead of an index) - * - :c:func:`TIFFCurrentRow` - - return index of current scanline - * - :c:func:`TIFFCurrentStrip` - - return index of current strip - * - :c:func:`TIFFCurrentTile` - - return index of current tile - * - :c:func:`TIFFDataWidth` - - return the size of TIFF data types - * - :c:func:`TIFFDefaultStripSize` - - return number of rows for a reasonable-sized strip according to the - current settings of the ImageWidth, BitsPerSample and SamplesPerPixel, - tags and any compression-specific requirements - * - :c:func:`TIFFDefaultTileSize` - - return pixel width and height of a reasonable-sized tile; - suitable for setting up the TileWidth and TileLength tags - * - :c:func:`TIFFDeferStrileArrayWriting` - - is an advanced writing function to control when/where the - [Strip/Tile][Offsets/ByteCounts] arrays are written into the file, - and must be used in a particular sequence together with - TIFFForceStrileArrayWriting() (see description) - * - :c:func:`TIFFError` - - library-wide error handling function printing to ``stderr`` - * - :c:func:`TIFFErrorExt` - - user-specific library-wide error handling function that can be passed - a file handle, which is set to the open TIFF file within ``libtiff`` - * - :c:func:`TIFFErrorExtR` - - user-specific re-entrant library error handling function, - to which its TIFF structure is passed - containing the pointer to a user-specific data object - * - :c:func:`TIFFFdOpen` - - open a file for reading or writing - * - :c:func:`TIFFFdOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFFieldDataType` - - get data type from field information - * - :c:func:`TIFFFieldIsAnonymous` - - returns if field was unknown to ``libtiff`` and has been auto-registered - * - :c:func:`TIFFFieldName` - - get field name from field information - * - :c:func:`TIFFFieldPassCount` - - get whether to pass a value count to Get/SetField - * - :c:func:`TIFFFieldReadCount` - - get number of values to be read from field - * - :c:func:`TIFFFieldSetGetCountSize` - - returns size of ``count`` parameter of :c:func:`TIFFSetField` and - :c:func:`TIFFGetField` - * - :c:func:`TIFFFieldSetGetSize` - - return data size in bytes of the field data type used for ``libtiff`` - internal storage. - * - :c:func:`TIFFFieldTag` - - get tag value from field information - * - :c:func:`TIFFFieldWithName` - - get field information given field name - * - :c:func:`TIFFFieldWithTag` - - get field information given tag - * - :c:func:`TIFFFieldWriteCount` - - get number of values to be written to field - * - :c:func:`TIFFFileName` - - return name of open file - * - :c:func:`TIFFFileno` - - return open file descriptor - * - :c:func:`TIFFFindCODEC` - - find standard codec for the specific scheme - * - :c:func:`TIFFFindField` - - get field information given tag and data type - * - :c:func:`TIFFFlush` - - flush all pending writes - * - :c:func:`TIFFFlushData` - - flush pending data writes - * - :c:func:`TIFFForceStrileArrayWriting` - - is an advanced writing function that writes the - [Strip/Tile][Offsets/ByteCounts] arrays at the end of the file (see description) - * - :c:func:`TIFFFreeDirectory` - - release storage associated with a directory - * - :c:func:`TIFFGetBitRevTable` - - return bit reversal table - * - :c:func:`TIFFGetClientInfo` - - returns a pointer to the data of the named entry in the clientinfo-list - * - :c:func:`TIFFGetCloseProc` - - returns a pointer to file close method - * - :c:func:`TIFFGetConfiguredCODECs` - - gets list of configured codecs, both built-in and registered by user - * - :c:func:`TIFFGetField` - - return tag value in current directory - * - :c:func:`TIFFGetFieldDefaulted` - - return tag value in current directory with default value set if the - value is not already set and a default is defined - * - :c:func:`TIFFGetMapFileProc` - - returns a pointer to memory mapping method - * - :c:func:`TIFFGetMode` - - return open file mode - * - :c:func:`TIFFGetReadProc` - - returns a pointer to file read method - * - :c:func:`TIFFGetSeekProc` - - returns a pointer to file seek method - * - :c:func:`TIFFGetSizeProc` - - returns a pointer to file size requesting method - * - :c:func:`TIFFGetStrileByteCount` - - return value of the TileByteCounts/StripByteCounts array for the - specified tile/strile - * - :c:func:`TIFFGetStrileByteCountWithErr` - - same as `TIFFGetStrileByteCount()` and additionally provides an error return - * - :c:func:`TIFFGetStrileOffset` - - return value of the TileOffsets/StripOffsets array for the specified tile/strile - * - :c:func:`TIFFGetStrileOffsetWithErr` - - same as `TIFFGetStrileOffset()` and additionally provides an error return - * - :c:func:`TIFFGetTagListCount` - - return number of entries in the custom tag list - * - :c:func:`TIFFGetTagListEntry` - - return tag number of the (n.th - 1) entry within the custom tag list - * - :c:func:`TIFFGetUnmapFileProc` - - returns a pointer to memory unmapping method - * - :c:func:`TIFFGetVersion` - - return library version string - * - :c:func:`TIFFGetWriteProc` - - returns a pointer to file write method - * - :c:func:`TIFFIsBigEndian` - - returns a non-zero value if the file is BigEndian and zero if the file is - LittleEndian - * - :c:func:`TIFFIsBigTIFF` - - returns a non-zero value if the file is in BigTIFF style - * - :c:func:`TIFFIsByteSwapped` - - return true if image data is byte-swapped - * - :c:func:`TIFFIsCODECConfigured` - - check, whether we have working codec - * - :c:func:`TIFFIsMSB2LSB` - - return true if image data is being returned with bit 0 as the most significant bit - * - :c:func:`TIFFIsTiled` - - return true if image data is tiled - * - :c:func:`TIFFIsUpSampled` - - returns a non-zero value if image data returned through the read interface - Routines is being up-sampled - * - :c:func:`TIFFLastDirectory` - - returns a non-zero value if the current directory is the last directory - in the file; otherwise zero is returned - * - :c:func:`TIFFMergeFieldInfo` - - adds application defined TIFF tags to the list of known ``libtiff`` tags - * - :c:func:`TIFFNumberOfDirectories` - - return number of directories in a file - * - :c:func:`TIFFNumberOfStrips` - - return number of strips in an image - * - :c:func:`TIFFNumberOfTiles` - - return number of tiles in an image - * - :c:func:`TIFFOpen` - - open a file for reading or writing - * - :c:func:`TIFFOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFOpenW` - - opens a TIFF file with a Unicode filename, for read/writing - * - :c:func:`TIFFOpenWExt` - - opens a TIFF file with a Unicode filename, for read/writing - with options, such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFOpenOptionsAlloc` - - allocates memory for :c:type:`TIFFOpenOptions` opaque structure - * - :c:func:`TIFFOpenOptionsFree` - - releases the allocated memory for :c:type:`TIFFOpenOptions` - * - :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` - - limits the maximum single memory allocation within ``libtiff`` - * - :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` - - limits the maximum cumulated memory allocation within ``libtiff`` - * - :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` - - setup of a user-specific and per-TIFF handle (re-entrant) error handler - * - :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` - - setup of a user-specific and per-TIFF handle (re-entrant) warning handler - * - :c:func:`TIFFPrintDirectory` - - print description of the current directory - * - :c:func:`TIFFRasterScanlineSize` - - returns the size in bytes of a complete decoded and packed raster scanline - * - :c:func:`TIFFRasterScanlineSize64` - - return size as :c:type:`uint64_t` - * - :c:func:`TIFFRawStripSize` - - return number of bytes in a raw strip - * - :c:func:`TIFFRawStripSize64` - - return number of bytes in a raw strip as :c:type:`uint64_t` - * - :c:func:`TIFFReadBufferSetup` - - specify i/o buffer for reading - * - :c:func:`TIFFReadCustomDirectory` - - read the custom directory from the given offset - and set the context of the TIFF-handle tif to that custom directory - * - :c:func:`TIFFReadDirectory` - - read the next directory - * - :c:func:`TIFFReadEncodedStrip` - - read and decode a strip of data - * - :c:func:`TIFFReadEncodedTile` - - read and decode a tile of data - * - :c:func:`TIFFReadEXIFDirectory` - - read the EXIF directory from the given offset - and set the context of the TIFF-handle tif to that EXIF directory - * - :c:func:`TIFFReadFromUserBuffer` - - replaces the use of :c:func:`TIFFReadEncodedStrip` / :c:func:`TIFFReadEncodedTile` - when the user can provide the buffer for the input data - * - :c:func:`TIFFReadGPSDirectory` - - read the GPS directory from the given offset - and set the context of the TIFF-handle tif to that GPS directory - * - :c:func:`TIFFReadRawStrip` - - read a raw strip of data - * - :c:func:`TIFFReadRawTile` - - read a raw tile of data - * - :c:func:`TIFFReadRGBAImage` - - read an image into a fixed format raster - * - :c:func:`TIFFReadRGBAImageOriented` - - works like :c:func:`TIFFReadRGBAImage` except that the user can specify - the raster origin position - * - :c:func:`TIFFReadRGBAStrip` - - reads a single strip of a strip-based image into memory, storing the - result in the user supplied RGBA raster - * - :c:func:`TIFFReadRGBAStripExt` - - same as :c:func:`TIFFReadRGBAStrip` but providing the parameter `stop_on_error` - * - :c:func:`TIFFReadRGBATile` - - reads a single tile of a tile-based image into memory, storing the - result in the user supplied RGBA raster - * - :c:func:`TIFFReadRGBATileExt` - - same as :c:func:`TIFFReadRGBATile` but providing the parameter `stop_on_error` - * - :c:func:`TIFFReadScanline` - - read and decode a row of data - * - :c:func:`TIFFReadTile` - - read and decode a tile of data - * - :c:func:`TIFFRegisterCODEC` - - override standard codec for the specific scheme - * - :c:func:`TIFFReverseBits` - - reverse bits in an array of bytes - * - :c:func:`TIFFRewriteDirectory` - - operates similarly to :c:func:`TIFFWriteDirectory`, but can be called - with directories previously read or written that already have an established - location in the file and places it at the end of the file - * - :c:func:`TIFFRGBAImageBegin` - - setup decoder state for TIFFRGBAImageGet - * - :c:func:`TIFFRGBAImageEnd` - - release TIFFRGBAImage decoder state - * - :c:func:`TIFFRGBAImageGet` - - read and decode an image - * - :c:func:`TIFFRGBAImageOK` - - is image readable by TIFFRGBAImageGet - * - :c:func:`TIFFScanlineSize` - - return size of a scanline - * - :c:func:`TIFFScanlineSize64` - - return size of a scanline as :c:type:`uint64_t` - * - :c:func:`TIFFSetClientdata` - - set open file's clientdata (file descriptor/handle), - and return previous value - * - :c:func:`TIFFSetClientInfo` - - adds or replaces an entry in the clientinfo-list - * - :c:func:`TIFFSetCompressionScheme` - - set compression scheme - * - :c:func:`TIFFSetDirectory` - - set the current directory - * - :c:func:`TIFFSetErrorHandler` - - set error handler function - * - :c:func:`TIFFSetErrorHandlerExt` - - set error handler function with a file handle as parameter - * - :c:func:`TIFFSetField` - - set a tag's value in the current directory - * - :c:func:`TIFFSetFileName` - - sets the file name in the TIFF-structure and returns the old file name - * - :c:func:`TIFFSetFileno` - - overwrites a copy of the open file's I/O descriptor, and return previous value - (refer to detailed description) - * - :c:func:`TIFFSetMode` - - sets the ``libtiff`` open mode in the TIFF-structure and returns the old mode - * - :c:func:`TIFFSetSubDirectory` - - set the current directory - * - :c:func:`TIFFSetTagExtender` - - is used to register the merge function for user defined tags as an - extender callback with ``libtiff`` - * - :c:func:`TIFFSetupStrips` - - setup or reset strip parameters and strip array memory - * - :c:func:`TIFFSetWarningHandler` - - set warning handler function - * - :c:func:`TIFFSetWarningHandlerExt` - - set warning handler function with a file handle as parameter - * - :c:func:`TIFFSetWriteOffset` - - set current write offset - * - :c:func:`TIFFStripSize` - - return size of a strip - * - :c:func:`TIFFStripSize64` - - return equivalent size for a strip of data as :c:type:`uint64_t` - * - :c:func:`TIFFSwabArrayOfDouble` - - swap bytes of an array of doubles - * - :c:func:`TIFFSwabArrayOfFloat` - - swap bytes of an array of floats - * - :c:func:`TIFFSwabArrayOfLong` - - swap bytes of an array of longs - * - :c:func:`TIFFSwabArrayOfLong8` - - swap bytes of an array of uint64_t - * - :c:func:`TIFFSwabArrayOfShort` - - swap bytes of an array of shorts - * - :c:func:`TIFFSwabArrayOfTriples` - - swap the first and third byte of each triple within an array of bytes - * - :c:func:`TIFFSwabDouble` - - swap bytes of double - * - :c:func:`TIFFSwabFloat` - - swap bytes of float - * - :c:func:`TIFFSwabLong` - - swap bytes of long - * - :c:func:`TIFFSwabLong8` - - swap bytes of long long (uint64_t) - * - :c:func:`TIFFSwabShort` - - swap bytes of short - * - :c:func:`TIFFTileRowSize` - - return size of a row in a tile - * - :c:func:`TIFFTileRowSize64` - - return size of a row in a tile as :c:type:`uint64_t` - * - :c:func:`TIFFTileSize` - - return size of a tile - * - :c:func:`TIFFTileSize64` - - return size of a tile as :c:type:`uint64_t` - * - :c:func:`TIFFUnlinkDirectory` - - unlink the specified directory from the directory chain - * - :c:func:`TIFFUnRegisterCODEC` - - unregisters the codec - * - :c:func:`TIFFUnsetField` - - clear the contents of the field in the internal structure - * - :c:func:`TIFFVGetField` - - return tag value in current directory - * - :c:func:`TIFFVGetFieldDefaulted` - - return tag value in current directory - * - :c:func:`TIFFVSetField` - - set a tag's value in the current directory - * - :c:func:`TIFFVStripSize` - - return number of bytes in a strip - * - :c:func:`TIFFVStripSize64` - - return number of bytes in a strip with *nrows* rows of data as :c:type:`uint64_t` - * - :c:func:`TIFFVTileSize` - - returns the number of bytes in a row-aligned tile with *nrows* of data - * - :c:func:`TIFFVTileSize64` - - returns the number of bytes in a row-aligned tile with *nrows* of data - a :c:type:`uint64_t` number - * - :c:func:`TIFFWarning` - - library-wide warning handling function printing to ``stderr`` - * - :c:func:`TIFFWarningExt` - - user-specific library-wide warning handling function that can be passed - a file handle, which is set to the open TIFF file within ``libtiff`` - * - :c:func:`TIFFWarningExtR` - - user-specific re-entrant library warning handling function, - to which its TIFF structure is passed - containing the pointer to a user-specific data object - * - :c:func:`TIFFWriteBufferSetup` - - sets up the data buffer used to write raw (encoded) data to a file - * - :c:func:`TIFFWriteCheck` - - verify file is writable and that the directory information is setup properly - * - :c:func:`TIFFWriteCustomDirectory` - - write the current custom directory (also EXIF or GPS) to file - * - :c:func:`TIFFWriteDirectory` - - write the current directory - * - :c:func:`TIFFWriteEncodedStrip` - - compress and write a strip of data - * - :c:func:`TIFFWriteEncodedTile` - - compress and write a tile of data - * - :c:func:`TIFFWriteRawStrip` - - write a raw strip of data - * - :c:func:`TIFFWriteRawTile` - - write a raw tile of data - * - :c:func:`TIFFWriteScanline` - - write a scanline of data - * - :c:func:`TIFFWriteTile` - - compress and write a tile of data - * - :c:func:`TIFFXYZToRGB` - - perform CIE XYZ to RGB conversion - * - :c:func:`TIFFYCbCrtoRGB` - - perform YCbCr to RGB conversion - * - :c:func:`TIFFYCbCrToRGBInit` - - initialize YCbCr to RGB conversion state - -.. list-table:: *Libtiff auxiliary functions* - :widths: 5 20 - :header-rows: 1 - - * - Name - - Description - * - :c:func:`_TIFFCheckMalloc` - - checking for integer overflow before dynamically allocate memory buffer - * - :c:func:`_TIFFCheckRealloc` - - checking for integer overflow before dynamically reallocate memory buffer - * - :c:func:`_TIFFClampDoubleToUInt32` - - clamps double values into the range of :c:type:`uint32_t` (i.e. 0 .. 0xFFFFFFFF) - * - :c:func:`_TIFFfree` - - free memory buffer - * - :c:func:`_TIFFGetExifFields` - - return a pointer to the ``libtiff`` internal definition list of the EXIF tags - * - :c:func:`_TIFFGetGpsFields` - - return a pointer to the ``libtiff`` internal definition list of the GPS tags - * - :c:func:`_TIFFmalloc` - - dynamically allocate memory buffer - * - :c:func:`_TIFFmemcmp` - - compare contents of the memory buffers - * - :c:func:`_TIFFmemcpy` - - copy contents of the one buffer to another - * - :c:func:`_TIFFmemset` - - fill memory buffer with a constant byte - * - :c:func:`_TIFFMultiply32` - - checks for an integer overflow of the multiplication result of `uint32_t` and - return the multiplication result or `0` if an overflow would happen - * - :c:func:`_TIFFMultiply64` - - checks for an integer overflow of the multiplication result of `uint64_t` and - return the multiplication result or `0` if an overflow would happen - * - :c:func:`_TIFFrealloc` - - dynamically reallocate memory buffer - * - :c:func:`_TIFFRewriteField` - - Rewrite a field in the directory on disk without regard - to updating the TIFF directory structure in memory - - -Tag usage ---------- - -For a table of TIFF tags recognized by the library refer to -:doc:`/specification/coverage`. - -"Pseudo tags" -------------- - -In addition to the normal TIFF -tags the library supports a collection of -tags whose values lie in a range outside the valid range of TIFF -tags. These tags are termed *pseudo-tags* -and are used to control various codec-specific functions within the library. -The table below summarizes the defined pseudo-tags. - -.. list-table:: libtiff supported tags - :widths: 10 2 2 15 - :header-rows: 1 - - * - Tag name - - Codec - - R/W - - Library Use/Notes - - * - :c:macro:`TIFFTAG_FAXMODE` - - G3 - - R/W - - general codec operation - * - :c:macro:`TIFFTAG_FAXFILLFUNC` - - G3/G4 - - R/W - - bitmap fill function - * - :c:macro:`TIFFTAG_JPEGQUALITY` - - JPEG - - R/W - - compression quality control - * - :c:macro:`TIFFTAG_JPEGCOLORMODE` - - JPEG - - R/W - - control colorspace conversions - * - :c:macro:`TIFFTAG_JPEGTABLESMODE` - - JPEG - - R/W - - control contents of ``JPEGTables`` tag - * - :c:macro:`TIFFTAG_ZIPQUALITY` - - Deflate - - R/W - - compression quality level - * - :c:macro:`TIFFTAG_PIXARLOGDATAFMT` - - PixarLog - - R/W - - user data format - * - :c:macro:`TIFFTAG_PIXARLOGQUALITY` - - PixarLog - - R/W - - compression quality level - * - :c:macro:`TIFFTAG_SGILOGDATAFMT` - - SGILog - - R/W - - user data format - -:c:macro:`TIFFTAG_FAXMODE`: - - Control the operation of the Group 3 codec. - Possible values (independent bits that can be combined by - or'ing them together) are: - - :c:macro:`FAXMODE_CLASSIC`: - - (enable old-style format in which the ``RTC`` - is written at the end of the last strip), - - :c:macro:`FAXMODE_NORTC`: - - (opposite of :c:macro:`FAXMODE_CLASSIC`; also called - :c:macro:`FAXMODE_CLASSF`), - - :c:macro:`FAXMODE_NOEOL`: - - (do not write ``EOL`` codes at the start of each row of data), - - :c:macro:`FAXMODE_BYTEALIGN`: - - (align each encoded row to an 8-bit boundary), - - :c:macro:`FAXMODE_WORDALIGN`: - - (align each encoded row to an 16-bit boundary), - - The default value is dependent on the compression scheme; this - pseudo-tag is used by the various G3 and G4 codecs to share code. - -:c:macro:`TIFFTAG_FAXFILLFUNC`: - - Control the function used to convert arrays of black and white - runs to packed bit arrays. - This hook can be used to image decoded scanlines in multi-bit - depth rasters (e.g. for display in colormap mode) - or for other purposes. - The default value is a pointer to a builtin function that images - packed bilevel data. - -:c:macro:`TIFFTAG_IPTCNEWSPHOTO`: - - Tag contains image metadata per the IPTC newsphoto spec: Headline, - captioning, credit, etc... Used by most wire services. - -:c:macro:`TIFFTAG_PHOTOSHOP`: - - Tag contains Photoshop captioning information and metadata. Photoshop - uses in parallel and redundantly alongside :c:macro:`IPTCNEWSPHOTO` information. - -:c:macro:`TIFFTAG_JPEGQUALITY`: - - Control the compression quality level used in the baseline algorithm. - Note that quality levels are in the range 0-100 with a default value of 75. - -:c:macro:`TIFFTAG_JPEGCOLORMODE`: - - Control whether or not conversion is done between - RGB and YCbCr colorspaces. - Possible values are: - - :c:macro:`JPEGCOLORMODE_RAW`: - - (do not convert), and - - :c:macro:`JPEGCOLORMODE_RGB`: - - (convert to/from RGB) - - The default value is :c:macro:`JPEGCOLORMODE_RAW`. - -:c:macro:`TIFFTAG_JPEGTABLESMODE`: - - Control the information written in the ``JPEGTables`` tag. - Possible values (independent bits that can be combined by - or'ing them together) are: - - :c:macro:`JPEGTABLESMODE_QUANT`: - - (include quantization tables), and - - :c:macro:`JPEGTABLESMODE_HUFF`: - - (include Huffman encoding tables). - - The default value is :c:expr:`JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF`. - -:c:macro:`TIFFTAG_ZIPQUALITY`: - - Control the compression technique used by the Deflate codec. - Quality levels are in the range 1-9 with larger numbers yielding better - compression at the cost of more computation. - The default quality level is 6 which yields a good time-space tradeoff. - -:c:macro:`TIFFTAG_PIXARLOGDATAFMT`: - - Control the format of user data passed *in* - to the PixarLog codec when encoding and passed - *out* from when decoding. Possible values are: - - :c:macro:`PIXARLOGDATAFMT_8BIT`: - - for 8-bit unsigned pixels, - - :c:macro:`PIXARLOGDATAFMT_8BITABGR`: - - for 8-bit unsigned ABGR-ordered pixels, - - :c:macro:`PIXARLOGDATAFMT_11BITLOG`: - - for 11-bit log-encoded raw data, - - :c:macro:`PIXARLOGDATAFMT_12BITPICIO`: - - for 12-bit PICIO-compatible data, - - :c:macro:`PIXARLOGDATAFMT_16BIT`: - - for 16-bit signed samples, and - - :c:macro:`PIXARLOGDATAFMT_FLOAT`: - - for 32-bit IEEE floating point samples. - -:c:macro:`TIFFTAG_PIXARLOGQUALITY`: - - Control the compression technique used by the PixarLog codec. - This value is treated identically to :c:macro:`TIFFTAG_ZIPQUALITY`; see the - above description. - -:c:macro:`TIFFTAG_SGILOGDATAFMT`: - - Control the format of client data passed *in* - to the SGILog codec when encoding and passed - *out* from when decoding. Possible values are: - - :c:macro:`SGILOGDATAFMT_FLTXYZ`: - - for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels, - - :c:macro:`SGILOGDATAFMT_16BITLUV`: - - for 16-bit encoded Luv pixels, - - :c:macro:`SGILOGDATAFMT_32BITRAW`: - :c:macro:`SGILOGDATAFMT_24BITRAW`: - - for no conversion of data, - - :c:macro:`SGILOGDATAFMT_8BITRGB`: - - for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data), - - :c:macro:`SGILOGDATAFMT_FLTY`: - - for converting between LogL and 32-bit IEEE floating valued Y pixels, - - :c:macro:`SGILOGDATAFMT_16BITL`: - - for 16-bit encoded L pixels, and - - :c:macro:`SGILOGDATAFMT_8BITGRY`: - - for returning 8-bit greyscale data - (valid only when decoding LogL-encoded data). - -Diagnostics ------------ - -All error messages are directed through the :c:func:`TIFFErrorExtR` routine. -By default messages are directed to ``stderr`` in the form: -``module: message\n``. -Warning messages are likewise directed through the -:c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`/tools/fax2tiff`, -:doc:`/tools/pal2rgb`, -:doc:`/tools/ppm2tiff`, -:doc:`/tools/rgb2ycbcr`, -:doc:`/tools/raw2tiff`, -:doc:`/tools/tiff2bw`, -:doc:`/tools/tiffdither`, -:doc:`/tools/tiffdump`, -:doc:`/tools/tiffcp`, -:doc:`/tools/tiffcmp`, -:doc:`/tools/tiffgt`, -:doc:`/tools/tiffinfo`, -:doc:`/tools/tiffmedian`, -:doc:`/tools/tiffsplit`, - -**"Tag Image File Format Specification *Revision 6.0*"**, -an Aldus Technical Memorandum. - -**"The Spirit of TIFF Class F"** , -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. - -Bugs ----- - -* The library does not support multi-sample images - where some samples have different bits/sample. - -* The library does not support random access to compressed data - that is organized with more than one row per tile or strip. diff --git a/third_party/libtiff/doc/html-prebuilt/.buildinfo b/third_party/libtiff/doc/html-prebuilt/.buildinfo deleted file mode 100644 index 0ba08cc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: faa067a40c99368f93cb5f865f43beb7 -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/third_party/libtiff/doc/html-prebuilt/_images/bali.jpg b/third_party/libtiff/doc/html-prebuilt/_images/bali.jpg deleted file mode 100644 index 1f5c146dd5ed78b6f0f227773214b78aecd57c81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26152 zcmbrlcTiJZ_%(_Z>C!uSm8SHLBIQLC1O%jaBApOI5dr}MQIy_ZsnSJ+&_WM2fDnpO zg;1oEAV`%21R{iR`Q7i%cW3TjckVrzWG0hy_GF#&?ES1~t!H2SxLBpRZJ?{KOLOH4 z4b7Fy7tO^2jn3t_|9{8-4D$bPgv+ZhzR(_4FxPJZe?1;mmgI~W5P2#4eXJ&uQ&EpAcKi4;YZEkIo4i5hu9iNc@p8gN6D>T>s z_bvNh!2Tb&STAv1y?*`Lb=v>Ib>(Wv<@*}z^&5BOZ?b8d(mDsQ-&J^Xi{tV8;`$ys zVMQ|{r^~AedM*(qyeR2^p#7i7{@($M`u~LNe*^o!am~{(Ub}Mn@UF4aXwgtt{M7A3 zr1q~a)XaJ0+b=mRJ^C@Xn~&uS{SGpOikLt+%oso@E3eP-sS7f+zq67;vQM~G7G%ZF z6vl?tFKFCj+zoTY4(2yBaQ0&;4&QOchG>Pw*0_J(@c#N$>+8oooSgkN=Na3mfb)8O zt6`p&SdhFj>hrPgvf^#8-)3IFg&#X-e{CK+=W$_BTC%ZbcjnHc!aU5i-tL42Y`|GR~nENVi#`vHTe{cW3^34+Cf(HXtzmC(h zt75)<1Dly8@%ti`l|6ZM#4zX?co2Mj0411+WGET;hz?xOrlgAP%mm@m#u^ z^RopL?Z&U2!k;5-Q$r|_)rvUIzNw-h>n{(7R+$4JC zrC!{o&ue9TuYXnPE(u$$%`r|XLi9XEtX5pmaQSw7?OCq^znE~gV6|epX=R|Pv}Ei+ zB+m>Ir|c&{t~oK_10?V5!EIIkQsggaZh0Uz>sNudBJ!}r#Z4jU31z=He{#ZppGxF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u09Srk%&QAEP( zk3SMjL#{8&<|4&hF?%m1rswYKU^VqLk4Gfb* z6(VQTMA6n4JD+gQJ(Va$>geS6LaY-j%-B^kp&Xk3-f2HEk)Pk>$oTQA&|HB9u6~Qk z1G(0iGT-{TC$|ynMYGak&3U)!ve-XObmi%iey__ zP8c44bn!)6$%o)G^iYx>f#WQ-= zpR*3(CD9l~FvwA);DR<93nuA0ZF*+7SN|S1slE`+=aO88kk$La zo*Z5J(=N-Jwu_5549ohhIjK0uXyl{@)W=B;(_g3wfTu-)I6|1@D{>$bu5$e~Zq zHd7cJD~6-;rh?(ZllMbf$Ql$sa-9shh7vsMTRX#p6H=c!3_sSY*gkT+zz22K3rJ2= zDa6o@BuoraXF1|4X6YxV;B!}NB4p5$l7wb!zM!On75nNLVB7(}&=@@Co`EAPft%{B z3)?2+!ZhfDLmB=t?NsgS3huGiX3vAivhz2F_L*Lk{^kBEPxs}}=5c&_wK}f`1YGa? zx|&i;XkxDv#bcf))Fi<6>X^$+tQ(#RHYSD}4qrr*yYu!y-qs2e==13dFzN84C~$29 zI(dtDd7M^EXlWJ|5uB%fibJydtWa%^wEzIr!w@lr-X<-g>|DX&0vF$k0-#0vK^lc@ zUcv{Rw7 MpU}Qe9|!pSAJtj5%m4rY diff --git a/third_party/libtiff/doc/html-prebuilt/_images/cover.jpg b/third_party/libtiff/doc/html-prebuilt/_images/cover.jpg deleted file mode 100644 index 8698cfb064736d498501de801fcd727b8952bd3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20189 zcmbq)c{p3&|EE?}Rq?T}r5kFmU9F#1?IpD@L8@wrG?t>Gf-b~POGT}z5=%)_`yM4h zOHo_wOQNWtlGc(EF~0MgXJ(%HYo3{NpYz9k?z!)KU-z8*US99_Ii5ORV)@6?)WVeI z)F~F0Qzr+@@hpq+$=Uy3`;U?tFjtMMMC-2Gj zU$R;LM>}{mhr)SkaCK6mwYO_!kE2=$u!gU2s8&I<{Ph>A(e$X=I|*U;3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2v!4ZHEnyAs8Ak`_RI|NiKCpxVm>HJCI?)7ds0I>i604;+5C;$Ke diff --git a/third_party/libtiff/doc/html-prebuilt/_images/dave.gif b/third_party/libtiff/doc/html-prebuilt/_images/dave.gif deleted file mode 100644 index c36d447772a630e171de8e8fad5e7ce2cc1cf98e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8220 zcmWle`#;l<<40e6Z5TE-=924N=5FRL#N4ScaxF5~+#7NYZSL2QOD?Iot0YQMq`6B- z$SrcebWs$g(%#?C_xuOX-_G-KEUe6RPI?9bMZh5d>~&XueO|yN>W?_#7Htu5<)p<^ zP0ltk2p1H}3PQg`xbITVo)!_4=RUFXsA)R?=~RyIREmA48KKiqc-D+CVxWn!UIjk{u4mGw|$v?A?RIuZH@2 z%13Id%j+Q!@fmS3F%NOo#l;Y37j>(4ox1=4G2T%V|8%;&6KU}B@Z|_xOY^Vhse_jX zaR)J;WRR6lKgQp3xJAMQp--^%nYhcFd~UWY@@;*{dx0z1yO~{^3>pGZoOs}3M5mqd z9Yh`NctTlopgIwLbMj~}rZG}T%b!FrPR>9}x=;jriavsLVJ*|5qrML^;tKcNvkP+X z&*pNC+nr%!7`YbuLFo~UDnPFERpMcz=Z`Jx%2SHcIUHAd;9MdYIe^2l53I6}b!en| zCeiL4rb+DBNrKry^N&Jyzf1U1i{;0v-7ZY_aB!7sNKl0z`{lhl-sz2L?d#8buc!1l z7(JT)?Sopvmk#V|QtCR7bj!*o8nK>rJpOkF);MUZd7-K7;_u(;JH<8a4|m8kT6ZEd ze&>F`tY5Bx4$`NQNK1lY2DnAqS33u32z_`RHI`30y_a21Bm-oTcG)v#=lwE~9LPAr zCTW(trz0&EnEDKmQ=@55f>SclWi47d%Mu!UvZp2Qs+K5a)+QU*Mg@gkCh~$K$A*&O zG_xlV7GBKB9u`6=kj%o1I%#C6HAe>c`J|gtiNg?1tJK)?3|w=D zF}upN+%l7ByRzm5xKe|zmnh*p}0K;`%QD~Zhg5iS-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HI*1OJw+Ur~=w6JK8^&n+jsZnYxHBi1LhitERR3l)>Z=|!sa$hDAMxP|up=!77h(XjYGis# zf^zURiX$g^4OAd6EjMeAgBxlweZq|WU=E`$G0d|Pv&QqjnN-xR$LU%)yjJooWBv4O z%#H{nYAnu%^%EIjf-And5W$(!l9fBfL>dd6G+4{L+%fn#z~1EQ;=0hy{NI}aziNe( zg!P@fbs2uJ{ZF0X=R?*#zP)G@fCy14r4345j-5S2UDl#DNeF%eKhKV|WED$C%n7&p5VrBh@&oirV#-}?y#-da_?gV$i?v#xjjs<1DiF3NG zHP3SC=jDAjw=H?8Zym@LN_pLVKb31SBlcp|T>YI(yT&I*{62iHHoWEY7hhC?w`|CI z+vRUsak8hH>9}8%HyR+d?$Vn+7?5c)K~uGOHkncKs3`iDb61H=)kv;-`pJ0cSA~VC zIctskCzpcQ-~X8!Qpdynus)Dl-H9xj2x{k|U#i~}i|~iN`YG2S@`dN)^G;Dk0!u*z z3qqIi2lcYuv!UU<^KYbYll^+!{V#^jO{_jStoj|e8}Uu|ZKOf8uT&{CTKN3pmQ4E# zPdDGhJeOymKUB6Zi++d^Uzpfxe)8hg*)SSg#~9+0PX9+_aM0`Mp}@4m$20{%HK=Pf zwf?Y63V%8K+@BBjGeJ1^+;DHb#f1Z=PI1FkkJK8?1ucPJFN0pJs-L;FdD9@SJ^g(W zh0}de`7-(UBTlh3EtUCx##BeCZS#KmwHIsq&C#QF$S?eJ3rk&Hkgiqa&v^CseZk|) z8M)r!o$2kL*TyvsKDx&QLg@p9lZ8~sA(t8bW_v5)ryNzSYg HK=1zmtoJ7? diff --git a/third_party/libtiff/doc/html-prebuilt/_images/esri.png b/third_party/libtiff/doc/html-prebuilt/_images/esri.png deleted file mode 100644 index dce6c97e366fd50930c887dc28bfef1efe8673f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10281 zcmW-nWmMhV5{82nm*Vd3PATs0hXRG-?oiy_-QA_Q7I$~|gBCAEiWG-?zWX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!yv4ZF|pAl%=y3nz^o~M#I>GJs4 zt)E}?X8ITm?>7xO)8@ZewsbQZN1SUe46%e)xA5JY<=0G=#;Ml!0Ngi{k{}2`$^A>I puQpZcLoqfXee1g}*Lm9kT&p{gNwFoDAm3gAIVokyT5-dm{{dX7(wYDO diff --git a/third_party/libtiff/doc/html-prebuilt/_images/jim.gif b/third_party/libtiff/doc/html-prebuilt/_images/jim.gif deleted file mode 100644 index 9a18a031fac72973e00b7fee7055774cbc6a43f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14493 zcmWlgc{r5q`^KN=nUxu1hMBQ5#$fDY4N1?~w=~uyX$HwwO+qTwGsaFrk|K>YmFyM0 z)jNYMrCy}cJ|t<^uHHA_U%%`B`;Y6okK??L>vNvBx38C@lb{$l2Yds7yu3WISlry) z+|<lbuU}tBSm6f%3@7~(l+M1f0-rnBs?(X8^;(~&LprD|@z(5j-q^PK9 zWMsr*u`DbsOifMCo;`c!%$b;&m@Qkj&}cMORn_wH^3u{$TU*=2#Kidccn=ScjT<+H zg@rMhOa_Ai!?25sOG870mX?;LreW&>dGBPqcIy(IQ{SgGIuC8XY*_$_S=5RO^ z3Pn#(&&kQDt*!0!>C?Kpx@u}_$BrG-(a|vn{?z~X;)z{>>CN8e-y_;|x1Dg&HSsY# zGq}t7{AfzX*w$Tv=V_L={O9(W8Fm#8UZ_}mv1>G7q%f@ic;IcTPr(O*qavbn1ZHam zYaNRUdL%C6Sa#Al}M~ zY0sjtO>p$;qDb?d#Wm$?o69SvU8;^(tu=bQf(=t-K3m^t_Es?^*3G{K(uURz_h!L1KvMtrbO%oVq=!a`avSgz?h0fEivn>V_U} z)sc-`{zgMvo%&wJ4wEpZq5M&VDZbLZju&_v=H!-gdC#u%|HMXR0ZlRPn4q9MR6 zk{Pgh9%z~|AKg0OzP*cZP?=pLo6W|!x&p1=r0&JqRG&3<=sORcNT!X6Zd)%rY&>qW zvDy(B7{&xN*@TS>X5p?FlVC~pTBcj#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^KHj>Cnu4@MROeGxCKZ&gGSH{D!t}5e7;<~^%J;1s2+H_r`s8>xFM zCrI^7B7<<`f@2DdSoawovSDDp_WZL;rB_%WUmo_}+$esS+#)v~R$ z^ViAwj#7ci)UDs9QN6?jg?O)?lC@ErL%o)&XZbjH4_*jIe+WP|Np$w> zYe-bxtq(N3DQGW!>3#C{PUgLAWe>yV)9+s?6M5nTjxf43O@wzy6$NS`$HpeFIN4m@ zUORMi3+eflfCRVC1Y80!l|A?nBXD+Vt2gvc1!NnSv?>CozPa1OKklfV(rxmLbj%Fd z!yspC@PX6juxg&Vs_}vZF47v6E$Qih%dbHt=2`~eHfm&~nP?bsoc?+$U9z4y#X2gN z6st$bH&O<#_EX+)w_5T4{1<>jA5mpkX$J5>YZOkgh9No`h03gnyy1s~wJ4+T3R)Wg zCHKBz_%lvQ3v0Ba;oIX;cfPVldKV9`hfQjfw_$A!q<%ptr7_BZ17?0eX`!u=?2asXFG$OeFURoyJQ}EcSujreJ zo2TKrSBPfDS2QE*5n~2)%o=o7!hu4y<{SirfUzuOgJcA3kP1Adt2q_eK3G8lkWvYR zEZ|TZ3S_8g=$7EG4`LHeZho%}s+R=vLUCIMuh)j>3u~^#%>=a7(03@#*Gl~}QT-AR z=LkH(TIDuS_!(xZ1yUUOx z<|OoIgD{z2yHwF2_&Lg9-8Vy=d;8Ot6q5UW) diff --git a/third_party/libtiff/doc/html-prebuilt/_images/leica.png b/third_party/libtiff/doc/html-prebuilt/_images/leica.png deleted file mode 100644 index 758cf665b64ad11751843d02cda2e92324713e55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6451 zcmV-38O-L1P)U8P*7-ZbZ>KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO56)-X|e7nZL z$iTqBa9P*U#mSX{G{Bl%P*lRez;J+pfx##xwK$o9f#C}S14DXwNkIt%17i#W1A|CX zc0maP17iUL1A|C*NRTrF17iyV0~1e4YDEbH0|SF|enDkXW_m`6f}y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%Bx+);nbnt%#3e|+rF7^#~l}Z*vAH>&(|C`*02KdkbAMDrv4gi_gNbYq30zv=) N002ovPDHLkV1l^sC^i59 diff --git a/third_party/libtiff/doc/html-prebuilt/_images/quad.jpg b/third_party/libtiff/doc/html-prebuilt/_images/quad.jpg deleted file mode 100644 index 4b7df170beb5da5b9be8b5d00efe19c9d9f4435c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23904 zcmbq)cTiK$`)(|VG?CuPM`_Zf7lC{%^b+aPMWjZ03lNCXJJJ;?BE3uRAcP_yARR(Y z5Rjfw10><*`}^Iwcjo?e=iZY!XJ+T@?(DN?ci;DY-Y3`d*K2_LT56hVfEzaefE%PA z;Cd18oK*V%yZ+P3|6dQJ*4IA(baw$C0Y7ftcnG*jcjFe_jq5%DkTg!R|Lz;`Kd&1% zZ`~%lLw=Wnl8RKJ@jl?@ja#>F-o8afcKbG|b};EZ;5Ho@{R4@ocNp|-$sc+$N`6Sr zzsvKiwui}J0>dly#w(P9l9`2-jh&BQ;E|w^w2Z8ryn^EM7piLN8k$;$M#d(luguKt z-r74jIyt*|`}q3#LjwZC!XqN1qGMuHQq$5iGCzIJ`c_a_R9sS8R$f=%(Ad=6(%ROG z=<6RC{5do{IW;{qJ2$_8M4{LJY;11*-QK|-9iN<@o#QSp|AXrW;MV_|vi}D5f8e4c z;ktSI_O09G|G{RUHRAMX|&00g)OfG!_>drv7Cl0A{=nS8qc zFNLajwZg4V*6p9;@Ta)nH}$oX3<>a|0{k&C@V`oWaLT)bu#;6zGZX?OWw6?L|z80nIT-K?al4S+O*wJl)HyFh~S-&+EVq~iMSg~7`k zs*L}ATd9Y3JgC84^>=Y%z!41>r(im0h1t{z7kBTnzosX=Y-teU_F4YbI_*CJ#mO0u z9+>f`PxAU(zYR?MdOn~`zPs8O(sm8#c^txIzTL&sg*!*f7l;>s>86F=TQMGqyNaF_ z_3xufJrZrKtSU77ND(0B%YUI1on@1cdY8*~5R|!bx)Vgrr-jW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WkaXIUg z$2mDandwcUiqzOBqKW`q^YrL5)BOIm-gr~um&C6Dv2O%;`^H`mCm^2;_>))B8waQ@ zrrp~UoSgIAir}cMF&JDnGLxZ;!_dW1lTK7|6lvF_+S#~OjH2z*=;p=Xuz311!(*_R zY;GQQ=b?+COA|&`)pJs<3Bp!-tHs##FBbe-_@m?H3FD85zBciKr~yZb{86myyF%k= zU+p`~oB@G=F^corD5ZwNVQ^HH3?3T~grb{jjv9?R6q9?kPLyK=-&U5Q!QgONbrpuo z@OWGf9xb@x@OXMyYB6tC)haNBG~ZUEuTy74@fN?~tLU{q4(nQ`g{Z=JLw}>+T0_9=o-iE3-Pm7(4>e#CXK0lQ1Pwyl<bWGW^;(lpJhw8*J;aht zG^}1prIDnOZFoMB$7!am6A(D dl3FB|$S9(ULl-~i`h7jAD58K0D58Kr|Jfk5D3bsH diff --git a/third_party/libtiff/doc/html-prebuilt/_images/ring.gif b/third_party/libtiff/doc/html-prebuilt/_images/ring.gif deleted file mode 100644 index 2a614f4929e4cfbc14e656f576e320e1ee601e45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4275 zcmWO2i9geg1Hkd`cQ>1v``9qUa>d5xJ~rnhn)^u1eLgiRMJo4w-=vx=x+7Vb`3Hu8@s6# zu?;@C1AWnKY`14)`iBoZcnr2P|5#f5u?kS#VN-tp3?=RyAya>|jrQ!{A!-(cif>JV zjW3~V36fh!<;&lrvX({u*qV6lYC7y0d``y>-vhcwf%pxnux;Y&OE85WQTu)!mRvs_ zC;JV&{p2~cdB4Z5_J4%`BuRiRVvkYGWogS7jWxxM$CzB6YCUn_rtj_9;_;@L#rVFA z)8OREZsi+^_c6=T_w%y_*3C(ZDN9+*%|uWhkHv~+W@TaV^5A)ttR)GeXrZBQ0VBzo z3!B7Twj-k@RA3q!ie|Fn09H6`ACYQkpsS;!rKw4$(;f`qa03JVn!Vk+1_o53uQ3`A zh{q|l$S6pl$vjsR&=M98w-lGZP1d7!_THz786lDS+W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DJ*hzQXH^_5+rE)2+hicPJWr z6zn1wn-UT6Sv*($WcHsmS8zJLsOPZyFy=m8On^IUDX6&Pd+0}pqCb+Lye1Vg*K%$} z$1#FE5XIi)=av{mE^W&AaidQebWuZyIo!Yfe5<4K48jc6@~~YvX7qSo%!sE;14+@J%;MmtE}wJODt9*&#xU9j1QWw{Cf``uf4w RUk}#s0~@9TMlvwK^#83(8SVf8 diff --git a/third_party/libtiff/doc/html-prebuilt/_images/safe.png b/third_party/libtiff/doc/html-prebuilt/_images/safe.png deleted file mode 100644 index 50acc607f81090972672d81ecea71f9460e7de68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10285 zcmW++1ymH@+n!w(Sb8Y|sRijqK)P4Dm6C3d7U^0-N|X-iP`ZC2UD6;eAf3{o(*4c< zn{#IF&OLMPdGCFn_j#T>JJDJiiUhciaRC4zP*y_efGrw4h2U7=HCl9o0BmsFlngxp z0FU&4Cj`jIq69l(cCzZS08sle;6^(MyhmCo>8JyMA2T>W7yw*7fbA{-c=7?jo;d)B zr2_zkYob}N0sycUDx+jy`ph2$c>5&VG~eH~n`M4d<47_^k}E-Rm?z1)BBHA5xNs|) z4YX$q*XQ*Xb-iaLt8&g7Z^T3I+`{Xfv{8`V=Q1jA1TsE6K1c0o=~Tygdxx|wOI|3s zv84a_|C}4&oEvsh%VsGU@xkiy6CfX*1ub!wS<#cxz!IcbZG?_zp%Hkn zOvnVGfd^0oQNyhLje!DV$LzZE1Q^f=3^=ZNBjh!tM?~fr3KK^-L3$`V-(vj4jp9e5 zU>9__l5w>3&Ce1#d+qbQsq?G>KUQQP1`_buNiVU;cg&=dIRrlc8efiWAKwn;K3z=2 zgc-?VnGi1DG58$!BPW=VVYcXOAN(48EO%qfl0z9MD)Vcg5(7aB)Ki&rAjIkNp2;|3 zD`#N3k(${M%SKF?gmt#-GxThu4b~x}on2jR8tHc*5VY^m$gpx3ger}B3G$mPgW(%M z0kQZ});XGQi5p@0R3@2{vZ{ME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VPGYfI zxwb@eRd7tn!Q6k5A8AAr?KAqQtdvw$!2iHdO;yzv)x^)j-_dQA`S}cZ04^Th!(%w?$AHw< zXm-o!?>CZdE=yuj1yPrmKEDpVL})%v6&1wtH!ivG^~GmoGxU<}>c(#CJ<*NWbUx-pR!;q({7-@Nt%Ix{wH%uY zfb6T?u;jHM2sExmP#?KEIQUK-Usw&qGo*s{;Gm?cYBcC`(zG~(VhMU za#TTH9-yqO3_?0&b{`WEJy~2AO63oEN{F{GN6s$HK z$m*#0@uCDcpNr+78|Rjl<2Wc<28j@`>cc-hJ6qd`lcpOue$v!lwf`plKa@j;!uN|0 ziHRg^G3#8MoaL|nvsI@8$jHen$(|Ean7p0nqcHVZlj`P+PfOFUc9?Jf_>r(V=kh!ev6|m|We6z4^?U1o$3rt}FS_TF_uL$E)Q_qh;Ug4Q*^4K;} z{76HUm76O)^ZU)&_STk5hE(A7xBsbT9LPqW_(38c3Bw}zx8i@?=GyUZh_el>&)&+0 zu?5>1ZYC9rEE}8P)|V_#3|+nDkme1m4&4l zoKbAl!qDKLteP4=Ojg8aO!7j_wEp#U==Jq=0%2sKlCJL5#$TtF)lj^1W3M@z;Ha3G z^-v^@8JLz!-EzI922hetn3OrbB!72laBW_X;go8;+R98*O8g9NN&dS!*{J0KUC;0ndqdzWKKh@^2GX%pcvU}p>zuY^gsS3mY zmPZB#?5j&kWMpL_pqsyl>EHOYbLQtv7-`ir7JPrgQ9awj&d={291tJ@GMARIacp^Y z`?V_w-B;kDsh|)c2+H9h=&8EmJ+2ph9H&cp?;ijbyi&SdgWe1PJd~enpsM7|L;nv3 CC|be* diff --git a/third_party/libtiff/doc/html-prebuilt/_images/smallliz.jpg b/third_party/libtiff/doc/html-prebuilt/_images/smallliz.jpg deleted file mode 100644 index 8eb827f8ad56ff57e9324c5e2fcd07947aca0c49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16463 zcmbuFXHXPT*XIWTQ2`NJMFg`&9q>+}rn@|2_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*T<8PSa0d(B^&Cp( zHwU1iF9YE8@cyX|176wO77VaO3eRmfivGA|76dYh8hTVj1CwGw$ZyRxh+St*pevsxV9$f(k^y~+s4QJTA_N>9qvy4)8&5Ome2*T~6ZkAGYX{IIYh+bgMrY{@nwNXxjxg|0!i-1gZ6F^^i+4Cgx_qnWaXe~Xwc zUYg@YBPYCD%Q&xg74Dw%*06hWxj;CYSV-Y}Y5vC=6nG52pU-9&xnJFcBFF_PfwT96 zSoLq_FAZ9ZEEn8JG%mDUXg&lk={-}mJ5=Cna{48dd$CaUB)L47eSf_8+kpO45=T|9 zxW=g9K_5x+j)ms%6U3AJ+h4q|Q*x%(jVUD@Dy}4qY+4=SuHSTEtc8!919brX)abhFc!k^ch^tCh5%;9?5-CpS#4a*FCAJ zXP?J-hJUsJx%LA;jC6^rZ60&YDE67{*5(~!7OSCQj=hqwqW>ywB5p~+# zUn34oW0`%mIWpU~K4;d-2iA^GbUmJ| V9|w>FnA)HW1c~_VCk_EP{x9Pz_gw%0 diff --git a/third_party/libtiff/doc/html-prebuilt/_images/weogeo.png b/third_party/libtiff/doc/html-prebuilt/_images/weogeo.png deleted file mode 100644 index 2b7903e27a95b81e2f931cb2e32b350cb856ed5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4160 zcmV-G5Wnw(n&-?RCwC# zTM2YrWfi_}ok_Dc2}w#w%hpBO6bi+H?Wx*R7A;ahD?$+zL~%hpc-#&>xUpyvtD@pk zs1`)16hRP>oubf67rKYENz*i2vuE~s%m4iTH+R};%uE6Z+$}3Tdk1Zx`T><9cK}f^6HNT|Hgxe~fnA(dJp3G;DY62>zRmV28i2EG1fewnE7y z(Nk}fQeRkJLy+q#wB}tyw4@pv+6RryEA+6^Wz<%0AbZ! zG;QuYDjHu&8e(Z6^K~8BiS$;@0*dz?q*(iYvMt+J0zD|`xZ1LcS-tU3^qHY&zz!ud z*=4m+JYP8yt*+5%kz(aT@V`s|4bhGXO7=v_&^=ND$bP^qET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3`xF` z_gTf?E#nU0S>VeV0W~?xZ{h6vT*h@@<(_>VD}yAFo8dve!K!i|z8&l;KNberriy`{ z>oD<~G2Kt|y2tJek}dLs?a?(j#`X!L`HN%sv4LF0#W!u5WsCU*C9TO zKt>vBXVCA@`Xs5Ipi^5nw$Fd_`B~*dy>}xz&tuBlIHd}G0(rO=?9;mG3#kfi^t9HU z_v5amm${X@nS&gG5>~vq8NTG7O+>CAgy?1!XR?%G73~^=FOqa)wY&W5XS!c0gwGvU zol4xQS2YxDNP!DHHEXV%k+@2Ni zid?qtpnz59Lu^n(+!$B$8vo;dS#hcT*YE!#?X8}sm`<|Z(gTwUlaZ$RZ$7u{y$#PE ztGM2De>N2a(ZlsHuaC|CD6N}%4izQBblLiQXNGp8**k2$<=k*Jz)ldADZu~ z+Pa74TtyX;9x`2visM5KXSA$un9{jBRcy4;-=>X90MCQ!xCsQ`K1>D|d_ayQA&jP; zTHI01+ywAp%Qu0k?3Zm}6z6ai=?eN0^ilzHfeVU%vMSm;^HuSxEM=cTiqZv1z8yrU01^JUr)uiAo8Nb`03qhV6hWnwSFwGI=~x%w*t<31-U1T* zwzIUh2FIQ+6fLp+xLFS!-`gAq5$O2dCZ8PSQr6$*Z#q2{hRxYKQ%za!5hw(2qg{ zNZ?4|ma8=bW9jz57_!N7a9$-XjJKyToul#F7ymo4# zHz%kn0WbZ|Mj7$F^5K8*pNLEGS0n0%jS1xue9@ow8lGnZ4k_~ILGSEeE8om!^!kj~ z&zWNucLq`cmT#$>Eq}42g8)OkD)|I2@m6KL(c8>x3T3-4+Af>di`V@+qMO0wN!W_)09Q<3^I&vv1`_^Z#SWQ9kkn$P*w>fII>6BTs<*$P*wxj>7Q|0R{kE>YI)COM^N90000< KMNUMnLSTZ{3hIUc diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/addingtags.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/addingtags.rst.txt deleted file mode 100644 index 7c13e55..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/addingtags.rst.txt +++ /dev/null @@ -1,370 +0,0 @@ -Defining New TIFF Tags -====================== - -Libtiff has built-in knowledge of all the standard TIFF tags, as -well as extensions. The following describes how to add knowledge of -new tags as builtins to libtiff, or how to application specific tags can -be used by applications without modifying libtiff. - -.. _TIFFFieldInfo_Definition: - -TIFFFieldInfo -------------- - -How libtiff manages specific tags is primarily controlled by the -definition for that tag value stored internally as a TIFFFieldInfo structure. -This structure looks like this: - -.. highlight:: c - -:: - - typedef struct { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */ - short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */ - TIFFDataType field_type; /* type of associated data */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - } TIFFFieldInfo; - - -.. c:member:: uint32_t TIFFFieldInfo.field_tag - - The tag number. For instance 277 for the - SamplesPerPixel tag. Builtin tags will generally have a ``#define`` in - :file:`tiff.h` for each known tag. - -.. c:member:: short TIFFFieldInfo.field_readcount - - The number of values which should be read. - The special value :c:macro:`TIFF_VARIABLE` (-1) indicates that a variable number of - values may be read. The special value :c:macro:`TIFFTAG_SPP` (-2) indicates that there - should be one value for each sample as defined by :c:macro:`TIFFTAG_SAMPLESPERPIXEL`. - The special value :c:macro:`TIFF_VARIABLE2` (-3) is similar to :c:macro:`TIFF_VARIABLE` - but the required TIFFGetField() count value must be uint32_t* instead of uint16_t* as - for :c:macro:`TIFF_VARIABLE` (-1). - For ASCII fields with variable length, this field is :c:macro:`TIFF_VARIABLE`. - -.. c:member:: short TIFFFieldInfo.field_writecount - - The number of values which should be written. - Generally the same as field_readcount. A few built-in exceptions exist, but - I haven't analysed why they differ. - -.. c:member:: TIFFDataType TIFFFieldInfo.field_type - - Type of the field. One of :c:enumerator:`TIFF_BYTE`, :c:enumerator:`TIFF_ASCII`, - :c:enumerator:`TIFF_SHORT`, :c:enumerator:`TIFF_LONG`, - :c:enumerator:`TIFF_RATIONAL`, :c:enumerator:`TIFF_SBYTE`, - :c:enumerator:`TIFF_UNDEFINED`, :c:enumerator:`TIFF_SSHORT`, - :c:enumerator:`TIFF_SLONG`, :c:enumerator:`TIFF_SRATIONAL`, - :c:enumerator:`TIFF_FLOAT`, :c:enumerator:`TIFF_DOUBLE` or - :c:enumerator:`TIFF_IFD`. - And for BigTIFF :c:enumerator:`TIFF_LONG8`, - :c:enumerator:`TIFF_SLONG8` and :c:enumerator:`TIFF_IFD8`, - which are automatically reverted to 4 byte fields in - ClassicTIFF. - -.. c:member:: unsigned short TIFFFieldInfo.field_bit - - Built-in tags stored in special fields in the - TIFF structure have assigned field numbers to distinguish them (e.g. - :c:macro:`FIELD_SAMPLESPERPIXEL`). New tags should generally just use - :c:macro:`FIELD_CUSTOM` indicating they are stored in the generic tag list. - -.. c:member:: unsigned char TIFFFieldInfo.field_oktochange - - TRUE if it is OK to change this tag value - while an image is being written. FALSE for stuff that must be set once - and then left unchanged (like ImageWidth, or PhotometricInterpretation for - instance). - -.. c:member:: unsigned char TIFFFieldInfo.field_passcount - - If TRUE, then the count value must be passed - in :c:func:`TIFFSetField`, and :c:func:`TIFFGetField`, otherwise the count is not required. - This should generally be TRUE for non-ascii variable count tags unless - the count is implicit (such as with the colormap). - -.. c:member:: char * TIFFFieldInfo.field_name - - A name for the tag. Normally mixed case (studly caps) - like ``StripByteCounts``, and relatively short. - -Within :file:`tif_dirinfo.c` file, the built-in TIFF tags are defined with -:c:struct:`TIFFField` structure that has additional parameters defining the var_arg -interface of :c:func:`TIFFSetField` and :c:func:`TIFFGetField`. - -Various functions exist for getting the internal :c:struct:`TIFFFieldInfo` -definitions, including :c:func:`_TIFFFindFieldInfo`, and -:c:func:`_TIFFFindFieldInfoByName`. See -:file:`tif_dirinfo.c` for details. - -.. _Tag_Auto_registration: - -Default Tag Auto-registration ------------------------------ - -In libtiff 3.6.0 a new mechanism was introduced allowing libtiff to -read unrecognised tags automatically. When an unknown tags is encountered, -it is automatically internally defined with a default name and a type -derived from the tag value in the file. Applications only need to predefine -application specific tags if they need to be able to set them in a file, or -if particular calling conventions are desired for :c:func:`TIFFSetField` and -:c:func:`TIFFGetField`. - -When tags are autodefined like this the :c:member:`field_readcount` and -:c:member:`field_writecount` values are always :c:macro:`TIFF_VARIABLE2` (-3). The -:c:member:`field_passcount` is always TRUE, and the :c:member:`field_bit` is -:c:macro:`FIELD_CUSTOM`. The field name will be ``Tag %d`` where the ``%d`` -is the tag number. - -Thus, to read anonymous auto-registered tags use the following: - -:: - - uint32_t count; - void* value; //has to be a pointer to the expected value type. - TIFFGetField(tif, TIFFTAG_UNKNOWN_TO_LIBTIFF, &count, &value); - - -.. _Define_Application_Tags: - -Defining Application Tags -------------------------- - -For various reasons, it is common for applications to want to define -their own tags to store information outside the core TIFF specification. -This is done by calling :c:func:`TIFFMergeFieldInfo` with one or more -:c:struct:`TIFFFieldInfo`. - -The libgeotiff library provides geospatial information extensions within -a TIFF file. First, an array of :c:struct:`TIFFFieldInfo` is prepared with -information on the new tags: - -:: - - static const TIFFFieldInfo xtiffFieldInfo[] = { - - /* XXX Insert Your tags here */ - { TIFFTAG_GEOPIXELSCALE, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoPixelScale" }, - { TIFFTAG_GEOTRANSMATRIX, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoTransformationMatrix" }, - { TIFFTAG_GEOTIEPOINTS, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoTiePoints" }, - { TIFFTAG_GEOKEYDIRECTORY, -1,-1, TIFF_SHORT, FIELD_CUSTOM, - TRUE, TRUE, "GeoKeyDirectory" }, - { TIFFTAG_GEODOUBLEPARAMS, -1,-1, TIFF_DOUBLE, FIELD_CUSTOM, - TRUE, TRUE, "GeoDoubleParams" }, - { TIFFTAG_GEOASCIIPARAMS, -1,-1, TIFF_ASCII, FIELD_CUSTOM, - TRUE, FALSE, "GeoASCIIParams" } - }; - -In order to define the tags, we call :c:func:`TIFFMergeFieldInfo` on the -desired TIFF handle with the list of :c:struct:`TIFFFieldInfo`. - -:: - - #define N(a) (sizeof (a) / sizeof (a[0])) - - /* Install the extended Tag field info */ - TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo)); - -The tags need to be defined for each TIFF file opened - and when reading -they should be defined before the tags of the file are read, yet a valid -:c:expr:`TIFF *` is needed to merge the tags against. In order to get them -registered at the appropriate part of the setup process, it is necessary -to register our merge function as an extender callback with libtiff. -This is done with :c:func:`TIFFSetTagExtender`. We also keep track of the -previous tag extender (if any) so that we can call it from our extender -allowing a chain of customizations to take effect. - -:: - - static TIFFExtendProc _ParentExtender = NULL; - - static - void _XTIFFInitialize(void) - { - static int first_time=1; - - if (! first_time) return; /* Been there. Done that. */ - first_time = 0; - - /* Grab the inherited method and install */ - _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); - } - -The extender callback is looks like this. It merges in our new fields -and then calls the next extender if there is one in effect. - -:: - - static void - _XTIFFDefaultDirectory(TIFF *tif) - { - /* Install the extended Tag field info */ - TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo)); - - /* Since an XTIFF client module may have overridden - * the default directory method, we call it now to - * allow it to set up the rest of its own methods. - */ - - if (_ParentExtender) - (*_ParentExtender)(tif); - } - -The above approach ensures that our new definitions are used when reading -or writing any TIFF file. However, since on reading we already have -default definitions for tags, it is usually not critical to pre-define them. -If tag definitions are only required for writing custom tags, you can just -call :c:func:`TIFFMergeFieldInfo` before setting new tags. The whole extender -architecture can then be avoided. - -Adding New Builtin Tags ------------------------ - -A similar approach is taken to the above. However, the :c:struct:`_TIFFField` -information should be added to the :c:expr:`tiffFields[]` list in -:file:`tif_dirinfo.c`. This :c:struct:`_TIFFField` structure is like -TIFFFieldInfo structure but has additional members: - -The tags in the :c:expr:`tiffFields[]` list need not to be in sorted -order by the tag number. Sorting is done when setting up the -:c:expr:`TIFFFieldArray` at IFD initialization. - -.. highlight:: c - -:: - - typedef struct _TIFFField { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */ - short field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */ - TIFFDataType field_type; /* type of associated data */ - uint32_t field_anonymous; /* if true, this is a unknown / anonymous tag */ - TIFFSetGetFieldType set_field_type; /* type to be passed to TIFFSetField and TIFFGetField */ - TIFFSetGetFieldType get_field_type; /* not used */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - TIFFFieldArray *field_subfields; /* if field points to child ifds, child ifd field definition array */ - }; - - -.. c:member:: uint32_t _TIFFField.field_anonymous - - Used internally to indicate auto-registered tags. - See :c:func:`TIFFFieldIsAnonymous`. - -.. c:member:: TIFFSetGetFieldType _TIFFField.set_field_type - - | The enummeration identifier gives a hint and defines the `vararg` - parameters passed to :c:func:`TIFFSetField` and :c:func:`TIFFGetField`. - | For example :c:enum:`TIFF_SETGET_UINT64` defines a single - ``uint64_t`` parameter to be passed to `TIFFSetField()` and - `TIFFGetField()`, respectively. - | To distinguish the three different array types, there are three - strings before the value type within the enummeration identifier - (e.g. TIFF_SETGET_C0_UINT64): - | "**_C0_**" for fixed arrays and thus no count parameter is required - for TIFFSetField() and TIFFGetField(), respectively. - The array length is constant and given by `field_readcount` or - `field_writecount`, respectively. - | "**_C16_**" and "**_C32_**" are for variable arrays with ``uint16_t`` - or ``uint32_t`` count parameter required for TIFFSetField() and - TIFFGetField(), respectively. But then, `field_readcount` and - `field_writecount` has to be set to -1 for _C16_ and -3 for _C32_, - respectively. - -.. c:member:: TIFFSetGetFieldType _TIFFField.get_field_type - - Currently, this parameter is not used for TIFFGetField(). - Nevertheless, it is set as a copy of set_field_type or set to - `TIFF_SETGET_UNDEFINED`. - -Normally new built-in tags should be defined with :c:macro:`FIELD_CUSTOM` -and then only two points need to be done: - -#. Define the tag in :file:`tiff.h`. -#. Add an entry in the :c:expr:`tiffFields[]` array list defined at the - top of :file:`tif_dirinfo.c`. - -However, if it is desirable for the tag value to have its own field in -the :c:struct:`TIFFDirectory` structure, then you will also need to -``#define`` a new :c:macro:`FIELD_` value for it, and add appropriate -handling as follows: - -#. Add a field to the :c:struct:`TIFFDirectory` structure in :file:`tif_dir.h` - and define a ``FIELD_*`` bit number (also update the definition of - :c:macro:`FIELD_CODEC` to reflect your addition). -#. Add entries in :c:func:`_TIFFVSetField` and :c:func:`_TIFFVGetField` - for the new tag. -#. (*optional*) If the value associated with the tag is not a scalar value - (e.g. the array for ``TransferFunction``) and requires - special processing, - then add the appropriate code to :c:func:`TIFFReadDirectory` and - :c:func:`TIFFWriteDirectory`. You're best off finding a similar tag and - cribbing code. -#. Add support to :c:func:`TIFFPrintDirectory` in :file:`tif_print.c` - to print the tag's value. - -If you want to maintain portability, beware of making assumptions -about data types. Use the typedefs (:c:type:`uint16_t`, etc. when dealing with -data on disk and ``t*_t`` when stuff is in memory) and be careful about -passing items through printf or similar vararg interfaces. - -Adding New Codec-private Tags ------------------------------ - -To add tags that are meaningful *only when a particular compression -algorithm is used* follow these steps: - -#. Define the tag in :file:`tiff.h`. -#. Allocate storage for the tag values in the private state block of - the codec. -#. Insure the state block is created when the codec is initialized. -#. At :c:func:`TIFFInitfoo` time override the method pointers in the - :c:struct:`TIFF` structure for getting, setting and printing tag values. - For example, - - :: - - sp->vgetparent = tif->tif_vgetfield; - tif->tif_vgetfield = fooVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_vsetfield; - tif->tif_vsetfield = fooVSetField; /* hook for codec tags */ - tif->tif_printdir = fooPrintDir; /* hook for codec tags */ - - (Actually you may decide not to override the - :c:member:`tif_printdir` method, but rather just specify it). -#. Create a private :c:struct:`TIFFFieldInfo` array for your tags and - merge them into the core tags at initialization time using - :c:func:`_TIFFMergeFieldInfo`; e.g. - - :: - - _TIFFMergeFieldInfo(tif, fooFieldInfo, N(fooFieldInfo)); - - (where :c:macro:`N` is a macro used liberaly throughout the distributed code). - -#. Fill in the get and set routines. Be sure to call the parent method - for tags that you are not handled directly. Also be sure to set the - ``FIELD_*`` bits for tags that are to be written to the file. Note that - you can create "pseudo-tags" by defining tags that are processed - exclusively in the get/set routines and never written to file (see - the handling of :c:macro:`TIFFTAG_FAXMODE` in :file:`tif_fax3.c` - for an example of this). -#. Fill in the print routine, if appropriate. - -Note that space has been allocated in the ``FIELD_*`` bit space for -codec-private tags. Define your bits as ``FIELD_CODEC+`` to -keep them away from the core tags. If you need more tags than there -is room for, just increase :c:macro:`td_fieldsset` at the top of -:file:`tif_dir.h`. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/build.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/build.rst.txt deleted file mode 100644 index 68fe91d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/build.rst.txt +++ /dev/null @@ -1,754 +0,0 @@ -Building the TIFF Software Distribution -======================================= - -.. image:: images/cramps.gif - :width: 159 - :alt: cramps - -This chapter contains step-by-step instructions on how to configure -and build the TIFF software distribution. The software is most -easily built on a UNIX system, but with a little bit of work it can -easily be built and used on other non-UNIX platforms. - - -Building on all systems with CMake ----------------------------------- - -CMake may be used to -generate build files for most common build systems and IDEs, and -supports all UNIX-like systems as well as Windows. See -the `CMake website `_ for further -details. To build the software on you need to first run -:command:`cmake` to configure the build and generate the system-specific -build files. This reads the top-level :file:`CMakeLists.txt` file, -which probes the target system for necessary tools and functions, -checks any options you specified to configure the build, and then -outputs build files configured for your system. If using ``Unix -Makefiles``, once configuration is done, you simply -run :command:`make` (or :command:`gmake`) to build the software and -then :command:`make install` to do the installation. For other build -systems, you do the equivalent steps with the tool for that system. -For example, on any UNIX system: - -.. code-block:: shell - - $ cd ./tiff-4.0.5 - $ cmake - ...lots of messages... - $ make - ...lots of messages... - $ make test - ...lots of messages... - # make install - -Building is dependent on a :program:`make` utility and a C -(and optionally a C++) compiler, so you will need these tools. - -In general, the software is designed such that the following -targets will always be available: - -:: - - make [all] build stuff - make test run the test suite - make install build and install stuff - make clean remove object files, executables and cruft - -Build Trees -^^^^^^^^^^^ - -There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code. - -.. code-block:: shell - - $ gzip -dc tiff-4.0.5.tar.gz | tar -xf - - $ cd ./tiff-4.0.5 - $ cmake - $ make - $ make test - $ make install - -Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure. - - -.. code-block:: shell - - $ gzip -dc tiff-4.0.5.tar.gz | tar -xf - - $ mkdir tiff-4.0.5-build - $ cd ./tiff-4.0.5-build - $ cmake ../tiff-4.0.5 - $ make - $ make test - $ make install - -This second scheme is useful for: - -* building multiple targets from a single source tree -* building from a read-only source tree -* sharing the source files via a network, but building on - multiple systems -* keeping the source tree clean - (unlike :program:`autoconf`, :program:`cmake` does not provide - a ``distclean`` target, so out of source builds are - recommended) - -Generators -^^^^^^^^^^ - -The default generator for UNIX is ``Unix Makefiles``, and on Windows is -``NMake Makefiles`` or ``MSBuild`` depending upon the setup. -Run :command:`cmake --help` to list all the -generators available for your platform. For example, to use the Ninja -`build system `_ on UNIX or -Windows: - -.. code-block:: shell - - cmake -G Ninja - cmake --build . - ctest -V - cmake --build . --target install - -Note that :command:`cmake --build .` is a build-system-independent way -of building a target; you can always use the build system directly. - -Alternatively, using the MSBuild system on Windows (64-bit Release -build with VS2013): - -.. code-block:: shell - - cmake -G "Visual Studio 12 2013 Win64" - cmake --build . --config Release - ctest -V -C Release - cmake --build . --config Release --target install - -With the above configuration, it's also possible to open the generated -solution file with the Visual Studio IDE as well as building on the -command-line. - -Configuration Options -^^^^^^^^^^^^^^^^^^^^^ - -The configuration process is critical to the proper compilation, -installation, and operation of the -software. The :file:`CMakeLists.txt` script runs a series of tests to -decide whether or not the target system supports required -functionality and, if it does not, whether it can emulate or -workaround the missing functions. After running :command:`cmake`, check -the :file:`CMakeCache.txt` file; this contains all the results of the -checks performed and the options set by the user. If :program:`cmake` -failed to run, check :file:`CMakeFiles/CMakeOutput.log` -and :file:`CMakeFiles/CMakeError.log`; these should record the error -which caused the failure. - -A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are the -directories where the software is to be installed. By default the -software is installed in the :file:`/usr/local` hierarchy. To change -this behaviour the appropriate parameters can be specified on the -command line. Run :command:`cmake --help` to get a full list of possible -options, and :command:`cmake -LH` to list all the configurable options for -this software package, or :command:`cmake -LAH` to show all advanced -options in addition. Standard installation related options are shown -below. - - .. list-table:: Installation options - :widths: 10 15 - :header-rows: 1 - - * - Option - - Description - - * - ``CMAKE_INSTALL_PREFIX`` - - Installation root directory. The options below may be used to override - individual installation locations. - * - ``CMAKE_INSTALL_BINDIR`` - - user executables [:file:`PREFIX/bin`] - * - ``CMAKE_INSTALL_SBINDIR`` - - system admin executables [:file:`PREFIX/sbin`] - * - ``CMAKE_INSTALL_LIBEXECDIR`` - - program executables [:file:`PREFIX/libexec`] - * - ``CMAKE_INSTALL_SYSCONFDIR`` - - read-only single-machine data [:file:`PREFIX/etc`] - * - ``CMAKE_INSTALL_SHAREDSTATEDIR`` - - modifiable architecture-independent data [:file:`PREFIX/com`] - * - ``CMAKE_INSTALL_LOCALSTATEDIR`` - - modifiable single-machine data [:file:`PREFIX/var`] - * - ``CMAKE_INSTALL_LIBDIR`` - - object code libraries [:file:`PREFIX/lib`] - * - ``CMAKE_INSTALL_INCLUDEDIR`` - - C header files [:file:`PREFIX/include`] - * - ``CMAKE_INSTALL_OLDINCLUDEDIR`` - - C header files for non-gcc [:file:`/usr/include`] - * - ``CMAKE_INSTALL_DATAROOTDIR`` - - read-only architecture-independent data root [:file:`PREFIX/share`] - * - ``CMAKE_INSTALL_DATADIR`` - - read-only architecture-independent data [:file:`DATAROOTDIR`] - * - ``CMAKE_INSTALL_LOCALEDIR`` - - locale-dependent data [:file:`DATAROOTDIR/locale`] - * - ``CMAKE_INSTALL_MANDIR`` - - man documentation [:file:`DATAROOTDIR/man`] - * - ``CMAKE_INSTALL_DOCDIR`` - - documentation root [:file:`DATAROOTDIR/doc/tiff`] - -Also see the -CMake `documentation `_ -for `additional variables `_ -which may be set. - -Configuring Optional Packages/Support -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -:program:`cmake` commandline parameters. - -Static/Shared Objects Support -............................. - -``BUILD_SHARED_LIBS[=ON|OFF]``: - - Build shared libraries (default is ``ON``) - - This option controls whether or not to configure the software - to build a shared and static binaries for the TIFF library. Use of - shared libraries can significantly reduce the disk space needed for - users of the TIFF software. If shared libraries are not used then - the code is statically linked into each application that uses it. - -``ld-version-script[=ON|OFF]`` - - Enable linker version script (default is ``ON``) - - Add shared library symbol versioning on ELF-based systems (e.g. - Linux and FreeBSD) which use the GNU linker. This is needed if - several major versions of libtiff might be loaded at once into the - same program. - -JPEG Support -............ - -``jpeg[=ON|OFF]`` - - Enable IJG JPEG library usage (required for JPEG compression, enabled by default) - -``JPEG_INCLUDE_DIR=DIR``: - - Location of IJG JPEG library headers - -``JPEG_LIBRARY=DIR`` - - Location of IJG JPEG library binary - -The ``JPEG`` package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) ``libjpeg`` -distribution; this software is available at ``_. -The CMake script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above options for that. - -ZIP Support -........... - -The ``ZIP`` support enables support for the handling of TIFF -images with deflate-encoded data (enabled by default if -available). Support for deflate-encoded data requires the freely -available ``zlib`` distribution written by Jean-loup Gailly and -Mark Adler; this software is available at ``_. - - -Building on a UNIX System with Autoconf ---------------------------------------- - -.. program:: configure - -To build the software on a UNIX system you need to first run the -:program:`configure` shell script that is located in the top level of the -source directory. This script probes the target system for -necessary tools and functions and constructs a build environment in -which the software may be compiled. Once configuration is done, you -simply run :command:`make` (or :command:`gmake`) to build the software -and then :command:`make install` to do the installation; for example: - -.. code-block:: shell - - % cd ./tiff-4.0.5 - % ./configure - ...lots of messages... - % make - ...lots of messages... - % make check - ...lots of messages... - # make install - -Supplied Makefiles are dependent on a :program:`make` utility and a C -(and optionally a C++ compiler), so you will need these tools. - -In general, the software is designed such that the following -should be "make-able" in each directory: - - .. list-table:: Make targets - :widths: 10 15 - :header-rows: 1 - - * - Target - - Description - * - :command:`make [all]` - - build everything - * - :command:`make check` - - run the test suite - * - :command:`make install` - - build and install everything - * - :command:`make clean` - - remove object files, executables and cruft - * - :command:`make distclean` - - remove everything that can be recreated - -Note that after running :command:`make distclean` the -:program:`configure` script must be run again to create the :file:`Makefile` -and other make-related files. - -Build Trees -^^^^^^^^^^^ - -There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code. - -.. code-block:: shell - - % gzip -dc tiff-4.0.5.tar.gz | tar -xf - - % cd ./tiff-4.0.5 - % ./configure - % make - % make check - % make install - -Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure. - -.. code-block:: shell - - % gzip -dc tiff-4.0.5.tar.gz | tar -xf - - % mkdir tiff-4.0.5-build - % cd ./tiff-4.0.5-build - % ../tiff-4.0.5/configure - % make - % make check - % make install - -This second scheme is useful for: - -* building multiple targets from a single source tree -* building from a read-only source tree -* sharing the source files via a network, but building on - multiple systems - -Configuration Options -^^^^^^^^^^^^^^^^^^^^^ - -The configuration process is critical to the proper compilation, -installation, and operation of the software. The configure script -runs a series of tests to decide whether or not the target system -supports required functionality and, if it does not, whether it can -emulate or workaround the missing functions. This procedure is -fairly complicated and, due to the nonstandard nature of most UNIX -systems, prone to error. The first time that you configure the -software for use you should check the output from the configure -script and look for anything that does not make sense for your -system. - -A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are -the directories where the software is to be installed. By default -the software is installed in the :file:`/usr/local` hierarchy. To -change this behaviour the appropriate parameters can be specified -on the command line to configure. Run :command:`./configure --help` to -get a full list of possible options. Standard installation related -options are shown below. - -Installation directories: - -.. option:: --prefix=PREFIX - - install architecture-independent files in *PREFIX* [:file:`/usr/local`] - -.. option:: --exec-prefix=EPREFIX - - install architecture-dependent files in *EPREFIX* [:file:`PREFIX`] - -By default, :command:`make install` will install all the files in -:file:`/usr/local/bin`, :file:`/usr/local/lib` etc. You can specify -an installation prefix other than :file:`/usr/local` using :option:`--prefix`, -for instance ``--prefix=$HOME``. For better control, use the options below. - -Fine tuning of the installation directories: - -.. option:: --bindir=DIR - - user executables [:file:`EPREFIX/bin`] - -.. option:: --sbindir=DIR - - system admin executables [:file:`EPREFIX/sbin`] - -.. option:: --libexecdir=DIR - - program executables [:file:`EPREFIX/libexec`] - -.. option:: --sysconfdir=DIR - - read-only single-machine data [:file:`PREFIX/etc`] - -.. option:: --sharedstatedir=DIR - - modifiable architecture-independent data [:file:`PREFIX/com`] - -.. option:: --localstatedir=DIR - - modifiable single-machine data [:file:`PREFIX/var`] - -.. option:: --libdir=DIR - - object code libraries [:file:`EPREFIX/lib`] - -.. option:: --includedir=DIR - - C header files [:file:`PREFIX/include`] - -.. option:: --oldincludedir=DIR - - C header files for non-gcc [:file:`/usr/include`] - -.. option:: --datarootdir=DIR - - read-only architecture-independent data root [:file:`PREFIX/share`] - -.. option:: --datadir=DIR - - read-only architecture-independent data [:file:`DATAROOTDIR`] - -.. option:: --localedir=DIR - - locale-dependent data [:file:`DATAROOTDIR/locale`] - -.. option:: --mandir=DIR - - man documentation [:file:`DATAROOTDIR/man`] - -.. option:: --docdir=DIR - - documentation root [:file:`DATAROOTDIR/doc/tiff`] - -.. option:: --htmldir=DIR - - html documentation [:file:`DOCDIR`] - - -Program names: - -.. option:: --program-prefix=PREFIX - - prepend *PREFIX* to installed program names - -.. option:: --program-suffix=SUFFIX - -append *SUFFIX* to installed program names - -.. option:: --program-transform-name=PROGRAM - - run :command:`sed` *PROGRAM* on installed program names - -Configuring Optional Packages/Support -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -:program:`configure` script commandline parameters. - -Static/Shared Objects Support -............................. - -.. option:: --enable-shared[=PKGS] - - Build shared libraries [enabled] - -.. option:: --enable-static[=PKGS] - - Build static libraries [enabled] - - These options control whether or not to configure the software - to build a shared and static binaries for the TIFF library. Use of - shared libraries can significantly reduce the disk space needed for - users of the TIFF software. If shared libraries are not used then - the code is statically linked into each application that uses it. - By default both types of binaries are configured. - -.. option:: --enable-rpath - - Enable runtime linker paths (``-R`` libtool option) - - Add library directories (see other options below) to the TIFF - library run-time linker path. - -.. option:: --enable-ld-version-script - - Enable linker version script [yes] - - Add shared library symbol versioning on ELF-based systems (e.g. - Linux and FreeBSD) which use the GNU linker. This is needed if - several major versions of libtiff might be loaded at once into the - same program. - -JPEG Support -............ - -.. option:: --disable-jpeg - - Disable IJG JPEG library usage (required for JPEG compression, enabled by default) - -.. option:: --with-jpeg-include-dir=DIR - - Location of IJG JPEG library headers - -.. option:: --with-jpeg-lib-dir=DIR - - Location of IJG JPEG library binary) - -The ``JPEG`` package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) ``libjpeg`` -distribution; this software is available at -``_. The :program:`configure` -script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above switches for that. - -ZIP Support -........... - -The ``ZIP`` support enables support for the handling of -TIFF images with deflate-encoded data. Support for deflate-encoded -data requires the freely available ``zlib`` distribution -written by Jean-loup Gailly and Mark Adler; this software is -available at ``_. Support will be -enabled automatically if ``zlib`` is found. - - -Building the Software on Other Systems --------------------------------------- - -This section contains information that might be useful if you are -working on a non-UNIX system that is not directly supported. All -library-related files described below are located in the -:file:`libtiff` directory. - -The library requires two files that are generated -*on-the-fly*. The file :file:`tif_fax3sm.c` has the state -tables for the Group 3 and Group 4 decoders. This file is generated -by the :program:`mkg3states` program on a UNIX system; for -example: - -.. code-block:: shell - - cd libtiff - cc -o mkg3states mkg3states.c - rm -f tif_fax3sm.c - ./mkg3states -c const tif_fax3sm.c - -The ``-c`` option can be used to control whether or not the -resulting tables are generated with a ``const`` declaration. -The ``-s`` option can be used to specify a C storage class for -the table declarations. The ``-b`` option can be used to force -data values to be explicitly bracketed with ``{}`` (apparently -needed for some MS-Windows compilers); otherwise the structures are -emitted in as compact a format as possible. Consult the source code -for this program if you have questions. - -The second file required to build the library, :file:`version.h`, -contains the version information returned by the -:c:func:`TIFFGetVersion` routine. This file is built on most systems -using the :file:`mkversion` program and the contents of the -:file:`VERSION` and :file:`tiff.alpha` files; for example, - -.. code-block:: shell - - cd libtiff - cc -o mkversion mkversion.c - rm -f version.h - ./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h - -Otherwise, when building the library on a non-UNIX system be -sure to consult the files :file:`tiffcomp.h` and :file:`tiffconf.h`. -The former contains system compatibility definitions while the -latter is provided so that the software configuration can be -controlled on systems that do not support the make facility for -building the software. - -Systems without a 32-bit compiler may not be able to handle some -of the codecs in the library; especially the Group 3 and 4 decoder. -If you encounter problems try disabling support for a particular -codec; consult the :doc:`internals`. - -Programs in the tools directory are written to assume an ANSI C -compilation environment. There may be a few POSIX'isms as well. The -code in the :file:`port` directory is provided to emulate routines -that may be missing on some systems. On UNIX systems the -:program:`configure` script automatically figures out which routines -are not present on a system and enables the use of the equivalent -emulation routines from the :file:`port` directory. It may be -necessary to manually do this work on a non-UNIX system. - - -Testing the software --------------------- - -Assuming you have working versions of :doc:`/tools/tiffgt`, you can now use -it to view any of the sample images available for testing, or try -:doc:`/tools/tiffinfo` to display the file metadata. See the -:doc:`images` section on obtaining the test images. Otherwise, you can -do a cursory check of the library with the :doc:`/tools/tiffcp` and -:doc:`/tools/tiffcmp` programs. For example, - -.. code-block:: shell - - tiffcp -lzw cramps.tif x.tif - tiffcmp cramps.tif x.tif - -(:program:`tiffcmp` should be silent if the files compare -correctly). - - -LibTIFF source files --------------------- - -The following files make up the core library: - - .. list-table:: Core library source files - :widths: 5 15 - :header-rows: 1 - - * - File - - Description - - * - :file:`libtiff/tiff.h` - - TIFF spec definitions - * - :file:`libtiff/tiffconf.h` - - non-UNIX configuration definitions - * - :file:`libtiff/tiffio.h` - - public TIFF library definitions - * - :file:`libtiff/tiffiop.h` - - private TIFF library definitions - * - :file:`libtiff/t4.h` - - CCITT Group 3/4 code tables+definitions - * - :file:`libtiff/tif_dir.h` - - private defs for TIFF directory handling - * - :file:`libtiff/tif_fax3.h` - - CCITT Group 3/4-related definitions - * - :file:`libtiff/tif_predict.h` - - private defs for Predictor tag support - * - :file:`libtiff/tiffvers.h` - - version string - * - :file:`libtiff/uvcode.h` - - LogL/LogLuv codec-specific definitions - * - :file:`libtiff/tif_aux.c` - - auxiliary directory-related functions - * - :file:`libtiff/tif_close.c` - - close an open TIFF file - * - :file:`libtiff/tif_codec.c` - - configuration table of builtin codecs - * - :file:`libtiff/tif_color.c` - - colorspace transforms - * - :file:`libtiff/tif_compress.c` - - compression scheme support - * - :file:`libtiff/tif_dir.c` - - directory tag interface code - * - :file:`libtiff/tif_dirinfo.c` - - directory known tag support code - * - :file:`libtiff/tif_dirread.c` - - directory reading code - * - :file:`libtiff/tif_dirwrite.c` - - directory writing code - * - :file:`libtiff/tif_dumpmode.c` - - "no" compression codec - * - :file:`libtiff/tif_error.c` - - library error handler - * - :file:`libtiff/tif_fax3.c` - - CCITT Group 3 and 4 codec - * - :file:`libtiff/tif_fax3sm.c` - - G3/G4 state tables (generated by mkg3states) - * - :file:`libtiff/tif_flush.c` - - i/o and directory state flushing - * - :file:`libtiff/tif_getimage.c` - - :doc:`/functions/TIFFRGBAImage` support - * - :file:`libtiff/tif_jbig.c` - - JBIG codec - * - :file:`libtiff/tif_jpeg.c` - - JPEG codec (interface to the IJG distribution) - * - :file:`libtiff/tif_jpeg_12.c` - - 12-bit JPEG codec (interface to the IJG distribution) - * - :file:`libtiff/tif_lerc.c` - - LERC codec - * - :file:`libtiff/tif_luv.c` - - SGI LogL/LogLuv codec - * - :file:`libtiff/tif_lzma.c` - - LZMA codec - * - :file:`libtiff/tif_lzw.c` - - LZW codec - * - :file:`libtiff/tif_next.c` - - NeXT 2-bit scheme codec (decoding only) - * - :file:`libtiff/tif_ojpeg.c` - - Old JPEG codec (obsolete, decoding only) - * - :file:`libtiff/tif_open.c` - - open and simply query code - * - :file:`libtiff/tif_packbits.c` - - Packbits codec - * - :file:`libtiff/tif_pixarlog.c` - - Pixar codec - * - :file:`libtiff/tif_predict.c` - - Predictor tag support - * - :file:`libtiff/tif_print.c` - - directory printing support - * - :file:`libtiff/tif_read.c` - - image data reading support - * - :file:`libtiff/tif_strip.c` - - some strip-related code - * - :file:`libtiff/tif_swab.c` - - byte and bit swapping support - * - :file:`libtiff/tif_thunder.c` - - Thunderscan codec (decoding only) - * - :file:`libtiff/tif_tile.c` - - some tile-related code - * - :file:`libtiff/tif_unix.c` - - UNIX-related OS support - * - :file:`libtiff/tif_version.c` - - library version support - * - :file:`libtiff/tif_warning.c` - - library warning handler - * - :file:`libtiff/tif_win32.c` - - Win32 (Windows)-related OS support - * - :file:`libtiff/tif_write.c` - - image data writing support - * - :file:`libtiff/tif_zip.c` - - Deflate codec - * - :file:`libtiff/tif_zstd.c` - - ZSTD codec - - * - :file:`libtiff/mkg3states.c` - - program to generate G3/G4 decoder state tables - * - :file:`libtiff/mkspans.c` - - program to generate black-white span tables diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/contrib.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/contrib.rst.txt deleted file mode 100644 index 0b94970..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/contrib.rst.txt +++ /dev/null @@ -1,88 +0,0 @@ -Contributed TIFF Software -========================= - -.. image:: images/smallliz.jpg - :width: 108 - :alt: smallliz - -The :file:`contrib` directory has contributed software that -uses the TIFF library or which is associated with the library -(typically glue and guidance for ports to non-UNIX platforms, or tools that -aren't directly TIFF related). - -.. list-table:: Contributed software - :widths: 5 20 - :header-rows: 1 - - * - Location - - Description - - * - :file:`contrib/dbs` - - various tools from Dan & Chris Sears, including a simple X-based viewer - - * - :file:`contrib/ras` - - two programs by Patrick Naughton for converting - between Sun rasterfile format and TIFF (these - require :file:`libpixrect.a`, as opposed to the one in - tools that doesn't) - - * - :file:`contrib/mac-mpw` - - :file:`contrib/mac-cw` - - scripts and files from Niles Ritter for building - the library and tools under Macintosh/MPW C and - code warrior. - - * - :file:`contrib/acorn` - - scripts and files from Peter Greenham for building - the library and tools on an Acorn RISC OS system. - - * - :file:`contrib/win32` - - scripts and files from Scott Wagner for building - the library under Windows NT and Windows 95. (The makefile.vc in the - libtiff/libtiff directory may be sufficient for most users.) - - * - :file:`contrib/win_dib` - - two separate implementations of TIFF to DIB code suitable for any Win32 - platform. Contributed by Mark James, and Philippe Tenenhaus. - - * - :file:`contrib/ojpeg` - - Patch for IJG JPEG library related to support for some Old JPEG in TIFF files. - Contributed by Scott Marovich. - - * - :file:`contrib/dosdjgpp` - - scripts and files from Alexander Lehmann for building - the library under MSDOS with the DJGPP v2 compiler. - - * - :file:`contrib/tags` - - scripts and files from Niles Ritter for adding private - tag support at runtime, without changing libtiff. - - * - :file:`contrib/mfs` - - code from Mike Johnson to read+write images in memory - without modifying the library - - * - :file:`contrib/pds` - - various routines from Conrad Poelman; a TIFF image iterator and - code to support "private sub-directories" - - * - :file:`contrib/iptcutil` - - A utility by `Bill Radcliffe `_ to - convert an extracted IPTC Newsphoto caption from a binary blob to - ASCII text, and vice versa. IPTC binary blobs can be extracted from - images via the `ImageMagick `_ convert(1) - utility. - - * - :file:`contrib/addtiffo` - - A utility (and supporting subroutine) for building - one or more reduce resolution - overviews to an existing TIFF file. Supplied by - `Frank Warmerdam `_. - - * - :file:`contrib/stream` - - A class (TiffStream) for accessing TIFF files through a C++ stream - interface. Supplied by `Avi Bleiweiss `_. - - -Questions regarding these packages are usually best directed toward -their authors. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions.rst.txt deleted file mode 100644 index 8b721e3..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions.rst.txt +++ /dev/null @@ -1,66 +0,0 @@ -TIFF Functions Overview -======================= - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - functions/libtiff - functions/TIFFAccessTagMethods - functions/TIFFbuffer - functions/TIFFClientInfo - functions/TIFFClose - functions/TIFFcodec - functions/TIFFcolor - functions/TIFFCreateDirectory - functions/TIFFCustomDirectory - functions/TIFFCustomTagList - functions/TIFFDataWidth - functions/TIFFDeferStrileArrayWriting - functions/TIFFError - functions/TIFFFieldDataType - functions/TIFFFieldName - functions/TIFFFieldPassCount - functions/TIFFFieldQuery - functions/TIFFFieldReadCount - functions/TIFFFieldTag - functions/TIFFFieldWriteCount - functions/TIFFFlush - functions/TIFFGetField - functions/TIFFmemory - functions/TIFFMergeFieldInfo - functions/TIFFOpen - functions/TIFFOpenOptions - functions/TIFFPrintDirectory - functions/TIFFProcFunctions - functions/TIFFquery - functions/TIFFReadDirectory - functions/TIFFReadEncodedStrip - functions/TIFFReadEncodedTile - functions/TIFFReadFromUserBuffer - functions/TIFFReadRawStrip - functions/TIFFReadRawTile - functions/TIFFReadRGBAImage - functions/TIFFReadRGBAStrip - functions/TIFFReadRGBATile - functions/TIFFReadScanline - functions/TIFFReadTile - functions/TIFFRGBAImage - functions/TIFFSetDirectory - functions/TIFFSetField - functions/TIFFSetTagExtender - functions/TIFFsize - functions/TIFFStrileQuery - functions/TIFFstrip - functions/TIFFswab - functions/TIFFtile - functions/TIFFWarning - functions/TIFFWriteDirectory - functions/TIFFWriteEncodedStrip - functions/TIFFWriteEncodedTile - functions/TIFFWriteRawStrip - functions/TIFFWriteRawTile - functions/TIFFWriteScanline - functions/TIFFWriteTile - functions/_TIFFauxiliary - functions/_TIFFRewriteField diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFAccessTagMethods.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFAccessTagMethods.rst.txt deleted file mode 100644 index c9a53dc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFAccessTagMethods.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -TIFFAccessTagMethods -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFTagMethods *TIFFAccessTagMethods(TIFF* tif) - -Description ------------ - -This provides read/write access to the TIFFTagMethods within the TIFF -structure to application code without giving access to the private TIFF -structure. - -Diagnostics ------------ - -None - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClientInfo.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClientInfo.rst.txt deleted file mode 100644 index 7576d22..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClientInfo.rst.txt +++ /dev/null @@ -1,40 +0,0 @@ -TIFFClientInfo -============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void *TIFFGetClientInfo(TIFF* tif, const char *name) - -.. c:function:: void TIFFSetClientInfo(TIFF* tif, void *data, const char *name) - -Description ------------ - -.. TODO: Check explanation of clientinfo linked list intention and usage. - -The *clientinfo* linked list provides a method to hand over user defined -data from one routine to another via the internal ``tif`` storage of the -``libtiff`` library. - -:c:func:`TIFFGetClientInfo` returns a pointer to the data of the named entry -in the clientinfo-list. If the *name* is not found ``NULL`` is returned. - -:c:func:`TIFFSetClientInfo` adds or replaces an entry in the clientinfo-list -with the *name* and the pointer to the *data* provided by the caller. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClose.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClose.rst.txt deleted file mode 100644 index 3056e06..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFClose.rst.txt +++ /dev/null @@ -1,51 +0,0 @@ -TIFFClose -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFClose(TIFF* tif) - -.. c:function:: void TIFFCleanup(TIFF* tif) - -Description ------------ - -:c:func:`TIFFClose` closes a file that was previously opened with -:c:func:`TIFFOpen`. Any buffered data are flushed to the file, including -the contents of the current directory (if modified); and all resources -are reclaimed. :c:func:`TIFFClose` calls :c:func:`TIFFCleanup` and then -the associated function to close the file handle. - -:c:func:`TIFFCleanup` is an auxiliary function to free the TIFF structure. -The given structure will be completely freed, so you should save opened file -handle and pointer to the close procedure in external variables before -calling :c:func:`TIFFCleanup`, if you will need these ones to close the file. -:c:func:`TIFFCleanup` calls :c:func:`TIFFFlush`, which stores all pending data -in the file. - -.. note:: - Both functions have no return value. - If you want to check whether the data has been successfully written - to the file, you can call :c:func:`TIFFFlush`, which has a return value, - before :c:func:`TIFFClose`. - - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCreateDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCreateDirectory.rst.txt deleted file mode 100644 index 1f794d5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCreateDirectory.rst.txt +++ /dev/null @@ -1,83 +0,0 @@ -TIFFCreateDirectory -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFCreateDirectory(TIFF* tif) - -.. c:function:: int TIFFFreeDirectory(TIFF* tif) - -.. c:function:: int TIFFUnlinkDirectory(TIFF* tif, tdir_t dirn) - -Description ------------ - -The following routines create or release a directory. - -:c:func:`TIFFCreateDirectory` setup for a directory in a open TIFF file. -The newly created directory will not exist on the file till -:c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, -:c:func:`TIFFFlush` or :c:func:`TIFFClose` is called. -:c:func:`TIFFWriteDirectory` also creates a new directory, -frees the ``*tif`` structure and sets up a new one. - -:c:func:`TIFFFreeDirectory` releases allocated storage associated with a -directory, especially custom-fields. -However, the main part of the directory is not touched. Routine -:c:func:`TIFFCleanup` calls :c:func:`TIFFFreeDirectory` to release -the directory part of the `tif` structure. - -:c:func:`TIFFUnlinkDirectory` unlink the specified directory from the -directory chain. -The parameter *dirn* specifies the subfile/directory -as an integer number, with the first directory numbered one (1). -This is different to :c:func:`TIFFSetDirectory` or :c:func:`TIFFCurrentDirectory` where the first -directory starts with zero (0). - -Directory query functions :c:func:`TIFFCurrentDirectory`, -:c:func:`TIFFCurrentDirOffset`, :c:func:`TIFFLastDirectory` and -:c:func:`TIFFNumberOfDirectories` retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information! - -Notes ------ - -Be aware: - -- that until a directory is not written to file AND read back, the - query functions won't retrieve the correct information! -- that the newly created directory will not exist on the file till - :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, - :c:func:`TIFFFlush` or :c:func:`TIFFClose` has been called. -- that :c:func:`TIFFCreateDirectory` and :c:func:`TIFFWriteDirectory` - create a new directory, free the ``*tif`` structure and set up a new one. -- that unlike :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory` - does not free up the directory data structures in memory. - -After ``libtiff`` version 4.6.0 :c:func:`TIFFCreateDirectory` also releases -the directory part of the `tif` structure by calling :c:func:`TIFFFreeDirectory`, -which should have been called by the user application before creating a new directory. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomDirectory.rst.txt deleted file mode 100644 index c61b694..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomDirectory.rst.txt +++ /dev/null @@ -1,212 +0,0 @@ -TIFFCustomDirectory -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray) - -.. c:function:: int TIFFCreateEXIFDirectory(TIFF* tif) - -.. c:function:: int TIFFCreateGPSDirectory(TIFF* tif) - -.. c:function:: int TIFFWriteCustomDirectory(TIFF* tif, uint64 *pdiroff) - -.. c:function:: int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray) - -.. c:function:: int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff) - -.. c:function:: int TIFFReadGPSDirectory(TIFF* tif, toff_t diroff) - -.. c:function:: const TIFFFieldArray* _TIFFGetExifFields(void) - -.. c:function:: const TIFFFieldArray* _TIFFGetGpsFields(void) - -Description ------------ - -The following routines create a custom directory and retrieve information -about directories in an open TIFF file. - -:c:func:`TIFFCreateCustomDirectory`, :c:func:`TIFFCreateEXIFDirectory`, -:c:func:`TIFFCreateGPSDirectory` will setup a custom directory or one -of the predefined EXIF or GPS directories and set the context of the -TIFF-handle ``tif`` to that custom directory for functions -like :c:func:`TIFFSetField`. - -:c:func:`TIFFWriteCustomDirectory` will write the contents of the -current custom directory to the file and return the offset to that -directory in :c:var:`pdiroff`. That offset has to be written to the main-IFD: - -.. highlight:: c - -:: - - /* Go back to the first directory, and add the EXIFIFD pointer. */ - TIFFSetDirectory(tif, 0); - TIFFSetField(tif, TIFFTAG_EXIFIFD, pdiroff); - - -:c:func:`TIFFReadCustomDirectory` will read the custom directory from the -arbitrary offset into the :c:var:`infoarray` and sets the context of the -TIFF-handle :c:var:`tif` to that custom directory for functions like -:c:func:`TIFFReadField`. The :c:type:`TIFFFieldArray` :c:var:`infoarray` -has to be according the layout of the custom directory. For the predefined -EXIF and GPS directories, the relevant :c:type:`TIFFFieldArray` definitions -are hidden within the functions :c:func:`TIFFReadEXIFDirectory` and -:c:func:`TIFFReadGPSDirectory` The code is very similar to :c:func:`TIFFReadDirectory`. -The offset to the custom directory diroff has to be read from the -relative TIFF tag first. - -:c:func:`_TIFFGetExifFields` and :c:func:`_TIFFGetGpsFields` will -return a pointer to the ``libtiff`` internal definition list of the -EXIF and GPS tags, respectively. - -Notes ------ - -Be aware - -- that until a directory is not written to file AND read back, the query - functions won't retrieve the correct information! -- that the newly created directory will not exist on the file till - :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory`, - :c:func:`TIFFFlush` or :c:func:`TIFFClose` has been called. -- that :c:func:`TIFFCreateDirectory` and :c:func:`TIFFWriteDirectory` - create a new directory, free the ``*tif`` structure and set up a new one. -- that unlike :c:func:`TIFFWriteDirectory`, :c:func:`TIFFCheckpointDirectory` - does not free up the directory data structures in memory. -- that LibTiff does not support custom directory chains - (NextIFD pointing to another IFD). - NextIFD of custom directories is always set to zero - and should be zero when reading. - -Unfortunately to create or read custom directories with predefined fields -it is necessary to include the private tif_dir.h. However, for EXIF and -GPS directories, which have a predefined schema within ``libtiff``, this -is not necessary. There are some test programmes that briefly demonstrate -the creation and reading of EXIF, GPS and custom directories. -See test/custom_dir.c and test/custom_dir_EXIF_231.c - -After ``libtiff`` version 4.6.0 :c:func:`TIFFCreateCustomDirectory`, -:c:func:`TIFFCreateEXIFDirectory` and :c:func:`TIFFCreateGPSDirectory` also -releases the directory part of the `tif` structure by calling :c:func:`TIFFFreeDirectory`, -which should have been called by the user application before creating a new directory. - -Hints and detailed instructions -------------------------------- - -Writing TIFF files with more than one directory (IFD) is not easy because -some side effects need to be known. - -The main point here is that there can only be one ``tif`` structure in -the main memory for a file, which can only hold the tags of one directory -at a time. It is useless to work with two different tiffOut1, tiffOut2 -pointers, because there is only ONE TIFF object (TIFF directory) within -the ``libtiff``. If you want to address a second directory in the file, -the tags of the current directory must first be saved in the file, -otherwise they will be lost (overwritten or mixed). Then the ``tif`` -structure in the main memory must be tidied up, otherwise the old tags -will beincluded in the new directory. -This can be done either by creating a new, empty ``tif`` structure or by -reading in an directory previously saved in the file. - -A sequence to handle a second (or third) TIFF directory - in this case -the GPS IFD - is as follows: - -1) Create TIFF file -2) Complete the "normal" metadata -3) Set the tag for the custom directory with a “dummy” value in order to - get the tag reserved. The final value will be inserted lateron. This - prevents the main directory from being written to the file again at an - additional area, leaving the first memory area unused: - -.. highlight:: c - -:: - - TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); - -4) Save current TIFF-directory to file. Otherwise, it will be lost. - Remember also the number of the current directory: - -.. highlight:: c - -:: - - TIFFWriteDirectory(tiffOut); - dirNum = TIFFCurrentDirectory(tiffOut); - -5) Create the second TIFF-directory (e.g. custom directory) and set its - fields. The TIFFFieldArray infoarray has to be specified beforehand - somewhere in your private include files. - An example is given for the EXIF directory in tif_dirinfo.c - -.. highlight:: c - -:: - - TIFFCreateCustomDirectory(tiffOut, infoarray); /* for a real custom directory */ - /* or alternatively, use GPS or EXIF with pre-defined TIFFFieldArray IFD field structure */ - TIFFCreateGPSDirectory(tiffOut); - TIFFSetField(tiffOut, GPSTAG_VERSIONID, gpsVersion); /* set fields of the custom directory */ - -Be aware that every :c:func:`TIFFCreateDirectory` or :c:func:`TIFFWriteDirectory` -apparently frees the ``*tif`` structure and sets up a new one! - -6) Write custom directory to file. The offset to that directory in the file - is returned in :c:var:`dir_offset`. - -.. highlight:: c - -:: - - TIFFWriteCustomDirectory(tiffOut, &dir_offset); - -7) Reload the first directory (i.e. the original TIFF directory). - Apparently, this reads the data back from file. - -.. highlight:: c - -:: - - TIFFSetDirectory(tiffOut, dirNum); - -8) Set the correct offset value of the custom directory IFD tag and save - that changes to file. - -.. highlight:: c - -:: - - TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); - TIFFWriteDirectory(tiffOut); - -RETURN VALUES -------------- - -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing the -directory contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff) - diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomTagList.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomTagList.rst.txt deleted file mode 100644 index 4b18c7b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFCustomTagList.rst.txt +++ /dev/null @@ -1,47 +0,0 @@ -TIFFCustomTagList -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFGetTagListCount(TIFF* tif) - -.. c:function:: uint32_t TIFFGetTagListEntry(TIFF* tif, int tag_index) - -Description ------------ - -:c:func:`TIFFGetTagListCount` returns the number of entries in the -custom tag list. - -:c:func:`TIFFGetTagListEntry` returns the tag number of the (n.th - 1) -entry within the custom tag list. -If the :c:var:`tag_index` is larger or equal to the number of entries -in the tag list 0xFFFFFFFF `(=(uint32_t(-1))` is returned. - -Note ----- - -The known tags to ``libtiff`` are define as 'named' tags and a lot of them -as *custom* tags. The custom tag definitions are handled in an internal -custom tag list. This list can also be extended by adding tag definitions -to that list, so that ``libtiff`` is aware of those tags. -See :ref:`Define_Application_Tags` - -Diagnostics ------------ - -none - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDataWidth.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDataWidth.rst.txt deleted file mode 100644 index 8adaef6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDataWidth.rst.txt +++ /dev/null @@ -1,47 +0,0 @@ -TIFFDataWidth -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFDataWidth(TIFFDataType type) - -Description ------------ - -:c:func:`TIFFDataWidth` returns the size of *type* within TIFF file in bytes. -Currently following data types are supported: - -* :c:macro:`TIFF_BYTE` -* :c:macro:`TIFF_ASCII` -* :c:macro:`TIFF_SBYTE` -* :c:macro:`TIFF_UNDEFINED` -* :c:macro:`TIFF_SHORT` -* :c:macro:`TIFF_SSHORT` -* :c:macro:`TIFF_LONG` -* :c:macro:`TIFF_SLONG` -* :c:macro:`TIFF_FLOAT` -* :c:macro:`TIFF_IFD` -* :c:macro:`TIFF_RATIONAL` -* :c:macro:`TIFF_SRATIONAL` -* :c:macro:`TIFF_DOUBLE` -* :c:macro:`TIFF_LONG8` -* :c:macro:`TIFF_SLONG8` -* :c:macro:`TIFF_IFD8` - -Return values -------------- - -:c:func:`TIFFDataWidth` returns a number of bytes occupied by the item -of given type within the TIFF file. 0 returned when unknown data type supplied. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDeferStrileArrayWriting.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDeferStrileArrayWriting.rst.txt deleted file mode 100644 index 705aebc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFDeferStrileArrayWriting.rst.txt +++ /dev/null @@ -1,72 +0,0 @@ -TIFFDeferStrileArrayWriting -=========================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFDeferStrileArrayWriting(TIFF* tif) - -.. c:function:: int TIFFForceStrileArrayWriting(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDeferStrileArrayWriting` is an advanced writing function -that must be used in a particular sequence, and generally together -with :c:func:`TIFFForceStrileArrayWriting`, to achieve its intended -effect. Their aim is to control when and where the -``StripOffsets`` / ``StripByteCounts`` or ``TileOffsets`` / ``TileByteCounts`` -arrays are written into the file. - -The purpose of this is to generate 'cloud-optimized geotiff' files where -the first KB of the file only contain the IFD entries without the potentially -large strile arrays. Those are written afterwards. - -More precisely, when :c:func:`TIFFWriteCheck` is called, the tag entries for -those arrays will be written with type = count = offset = 0 as a temporary value. - -Its effect is only valid for the current directory, and before -:c:func:`TIFFWriteDirectory` is first called, and will be reset -when changing directory. - -The typical sequence of calls is: - -.. highlight:: c - -:: - - TIFFOpen() - /* or TIFFCreateDirectory(tif) */ - /* Set fields with calls to TIFFSetField(tif, ...) */ - TIFFDeferStrileArrayWriting(tif) - TIFFWriteCheck(tif, ...) - TIFFWriteDirectory(tif) - /* ... potentially create other directories and come back to the above directory */ - TIFFForceStrileArrayWriting(tif) /* emit the arrays at the end of file */ - -Returns -------- - -1 in case of success, 0 otherwise. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -Note ----- - -This functionality was introduced with libtiff 4.1. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFError.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFError.rst.txt deleted file mode 100644 index e770c35..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFError.rst.txt +++ /dev/null @@ -1,106 +0,0 @@ -TIFFError -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: void TIFFError(const char * module, const char * fmt, ...) - -.. c:function:: void TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...) - -.. c:function:: void TIFFErrorExtR(TIFF *tif, const char* module, const char* fmt, ...) - -.. c:type:: void (*TIFFErrorHandler)(const char * module, const char* fmt, va_list ap) - -.. c:type:: void (*TIFFErrorHandlerExt)(thandle_t fd, const char * module, const char* fmt, va_list ap) - -.. c:type:: int (*TIFFErrorHandlerExtR)(TIFF* tif, void* user_data, const char* module, const char* fmt, va_list ap) - -.. c:function:: TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler) - -.. c:function:: TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler) - -Description ------------ - -:c:func:`TIFFError` invokes the library-wide error handler function -to (normally) write an error message to ``stderr``. -The *fmt* parameter is a :c:func:`printf` format string, and any number -arguments can be supplied. The *module* parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which an error is -detected. - -Applications that desire to capture control in the event of an error -should use :c:func:`TIFFSetErrorHandler` to override the default -error handler. A :c:macro:`NULL` (0) error handler function may be -installed to suppress error messages. - -Two more application-specific error handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with an error message function, i.e. -:c:func:`TIFFErrorExt` and :c:func:`TIFFErrorExtR` if the application -intends to call the handler with those extended parameters. - -:c:func:`TIFFErrorExt` provides a file handle as parameter. -Within ``libtiff`` :c:func:`TIFFErrorExt` is called passing ``tif->tif_clientdata`` -as *fd*, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for :c:func:`TIFFErrorExt` -is setup with :c:func:`TIFFSetErrorHandlerExt`. - -:c:func:`TIFFErrorExtR` (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -error handler. That means for different TIFF handles, different error -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -:c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt` -or :c:func:`TIFFClientOpenExt`. -Furthermore, a **custom defined data structure** *user_data* for the -error handler can be given along. - -Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the -application-specific handler introduced with ``libtiff`` 4.5. - -Note ----- - -Both functions :c:func:`TIFFError` and :c:func:`TIFFErrorExt` -each attempt to call both handler functions if they are defined. -First :c:func:`TIFFErrorHandler` is called and then :c:func:`TIFFErrorHandlerExt`. -However, :c:func:`TIFFError` passes a "0" as a file handle to -:c:func:`TIFFErrorHandlerExt`. - -:c:func:`TIFFErrorExtR` tries first to call the per-TIFF handle defined -error handler. If :c:func:`TIFFErrorHandlerExtR` is not defined or -returns 0, :c:func:`TIFFErrorHandler` and then :c:func:`TIFFErrorHandlerExt` -are called. From libtiff 4.5 onwards :c:func:`TIFFErrorExtR` is used -within the ``libtiff`` library where the TIFF handle is available. -Otherwise, :c:func:`TIFFErrorExt` is used! - -Return values -------------- - -:c:func:`TIFFSetErrorHandler` and :c:func:`TIFFSetErrorHandlerExt` -returns a reference to the previous error handler function. - -:c:func:`TIFFErrorHandlerExtR` returns an integer as "stop" to control the call -of further error handler functions within :c:func:`TIFFErrorExtR`: - - - 0: both functions :c:func:`TIFFErrorHandler` and :c:func:`TIFFErrorHandlerExt` are called. - - non-zero: no further error message function is called. - -See also --------- - -:doc:`TIFFWarning` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`/functions/TIFFOpenOptions`, -:doc:`libtiff` (3tiff), -printf (3) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldDataType.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldDataType.rst.txt deleted file mode 100644 index 837004e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldDataType.rst.txt +++ /dev/null @@ -1,38 +0,0 @@ -TIFFFieldDataType -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFDataType TIFFFieldDataType(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldDataType` returns the data type stored in a TIFF field. -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, -or :c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldDataType` returns a member of the enum type -:c:type:`TIFFDataType`. - -See also --------- - -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldName.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldName.rst.txt deleted file mode 100644 index 67bedf7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldName.rst.txt +++ /dev/null @@ -1,37 +0,0 @@ -TIFFFieldName -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const char* TIFFFieldName(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldName` returns the textual name for a TIFF field. -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, -or :c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldName` returns a constant C string. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldPassCount.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldPassCount.rst.txt deleted file mode 100644 index a630b99..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldPassCount.rst.txt +++ /dev/null @@ -1,52 +0,0 @@ -TIFFFieldPassCount -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldPassCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldPassCount` returns true (nonzero) if -:c:func:`TIFFGetField` and :c:func:`TIFFSetField` -expect a :c:var:`count` value to be passed before the actual data pointer. - -:c:var:`fip` is a field information pointer previously returned by -:c:func:`TIFFFindField`, -:c:func:`TIFFFieldWithTag`, -:c:func:`TIFFFieldWithName`. - -When a :c:var:`count` is required, it will be of type :c:type:`uint32_t` -if :c:func:`TIFFFieldReadCount` reports :c:macro:`TIFF_VARIABLE2`, -and of type :c:type:`uint16_t` otherwise. Use :c:func:`TIFFFieldWriteCount` -for :c:func:`TIFFSetField`, respectively. (This distinction is -critical for use of :c:func:`TIFFGetField`, but normally not so for -use of :c:func:`TIFFSetField`.) - -An alternative function for the :c:var:`count` value determination -is :c:func:`TIFFFieldSetGetCountSize`. - -Return values -------------- - -:c:func:`TIFFFieldPassCount` returns an integer that is always 1 (true) -or 0 (false). - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldQuery.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldQuery.rst.txt deleted file mode 100644 index 4e7a818..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldQuery.rst.txt +++ /dev/null @@ -1,88 +0,0 @@ -TIFFFieldQuery -============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const TIFFField* TIFFFieldWithName(TIFF* tif, const char *field_name) - -.. c:function:: const TIFFField* TIFFFieldWithTag(TIFF* tif, uint32_t tag) - -.. c:function:: const TIFFField* TIFFFindField(TIFF* tif, uint32_t tag, TIFFDataType dt) - -.. c:function:: int TIFFFieldIsAnonymous(const TIFFField *fip) - -.. c:function:: int TIFFFieldSetGetSize(const TIFFField *fip) - -.. c:function:: int TIFFFieldSetGetCountSize(const TIFFField* fip) - -Description ------------ - -.. TODO: Check explanation and intended use of functions. - -:c:func:`TIFFFieldWithName` and :c:func:`TIFFFieldWithTag` -return a pointer to TIFF field information structure `fip` by the tag's -*field_name* or its *tag* number. - -:c:func:`TIFFFindField` searches for the TIFF field information structure -`fip` of a given *tag* number and a specific `TIFFDataType dt`. -With dt== :c:macro:`TIFF_ANY` the behaviour is the same than for -*TIFFFieldWithTag()*. - -All three functions return :c:var:`NULL`, when the tag is not -registered within ``libtiff`` (see also :ref:`Tag_Auto_registration` ). - - .. TODO: Check if ``libtiff`` is able to handle tag definitions with two different - definitions. From the code point of view, I don't believe that. - - Such a `TIFFDataType` dependent search could be useful when the same - tag is defined twice but with different data types, which is true for - rare cases like TIFFTAG_XCLIPPATHUNITS. However, the ``libtiff`` does - currently not support multiple definitions of the same tag. - - -The following routines return status information about TIFF fields. - -:c:var:`fip` is a field information pointer previously returned by -`TIFFFindField()`, `TIFFFieldWithTag()`, `TIFFFieldWithName()`. - -:c:func:`TIFFFieldIsAnonymous` returns true (nonzero) if the field, -read from file, is unknown to ``libtiff`` and an anonymous field has -been auto-registered. Return is zero "0" if field is known to ``libtiff``. -See :ref:`Tag_Auto_registration` for more information. - -:c:func:`TIFFFieldSetGetSize` returns the data size in bytes of -the field data type used for ``libtiff`` internal storage. -This is also the data size of the parameter to be provided to -:c:func:`TIFFSetField` and :c:func:`TIFFGetField`. Custom -:c:macro:`TIFF_RATIONAL` values can be stored internally either -as ``float`` or ``double``. :c:func:`TIFFFieldSetGetSize` would -then return "4" or "8", respectively. - -:c:func:`TIFFFieldSetGetCountSize` returns size of ``count`` parameter -of :c:func:`TIFFSetField` and :c:func:`TIFFGetField` and also if it is -required: 0=none, 2= :c:type:`uint16_t`, 4= :c:type:`uint32_t`. -See also description of :c:func:`TIFFFieldReadCount`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldReadCount.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldReadCount.rst.txt deleted file mode 100644 index 9cd46dd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldReadCount.rst.txt +++ /dev/null @@ -1,49 +0,0 @@ -TIFFFieldReadCount -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldReadCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldReadCount` returns the number of values available to be read -from the specified TIFF field; that is, the number of arguments that should be -supplied to :c:func:`TIFFGetField`. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: - -* :c:macro:`TIFF_VARIABLE` ``= -1`` indicates that a variable number of - values is possible; then, a :c:type:`uint16_t` *count* argument and a - pointer *data* argument must be supplied to :c:func:`TIFFGetField`. -* :c:macro:`TIFF_VARIABLE2` ``= -3`` is the same as :c:macro:`TIFF_VARIABLE` - except that the *count* argument must have type :c:type:`uint32_t`. -* :c:macro:`TIFF_SPP` ``= -2`` indicates that the number of arguments is - equal to the image's number of samples per pixel. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldReadCount` returns an integer. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldTag.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldTag.rst.txt deleted file mode 100644 index 9d76a70..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldTag.rst.txt +++ /dev/null @@ -1,40 +0,0 @@ -TIFFFieldTag -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t TIFFFieldTag(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldTag` returns the numeric tag value for a TIFF field. -This can be compared to various constants exported by the :program:`libtiff` -header files, such as :c:macro:`TIFFTAG_IMAGEWIDTH`. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -Return values -------------- - -:c:func:`TIFFFieldTag` returns an integer tag value. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldWriteCount` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldWriteCount.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldWriteCount.rst.txt deleted file mode 100644 index 4459f8f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFieldWriteCount.rst.txt +++ /dev/null @@ -1,54 +0,0 @@ -TIFFFieldWriteCount -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFieldWriteCount(const TIFFField* fip) - -Description ------------ - -:c:func:`TIFFFieldWriteCount` returns the number of values to be written -into the specified TIFF field; that is, the number of arguments that should -be supplied to :c:func:`TIFFSetField`. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: - -* :c:macro:`TIFF_VARIABLE` indicates that a variable number of values is - possible; then, a :c:type:`uint16_t` *count* argument and a pointer *data* - argument must be supplied to :c:func:`TIFFSetField`. -* :c:macro:`TIFF_VARIABLE2` is the same as :c:macro:`TIFF_VARIABLE` except - that the *count* argument must have type :c:expr:`uint32_t`. (On most - modern machines, this makes no practical difference, and the *count* - argument can simply be an :c:expr:`int` in either case.) -* :c:type:`TIFF_SPP` indicates that the number of arguments must be equal - to the image's number of samples per pixel. - -*fip* is a field information pointer previously returned by -:c:func:`TIFFFindField`, :c:func:`TIFFFieldWithTag`, or -:c:func:`TIFFFieldWithName`. - -For most field types, :c:func:`TIFFFieldWriteCount` returns the same value as -:c:func:`TIFFFieldReadCount`, but there are some exceptions. - -Return values -------------- - -:c:func:`TIFFFieldWriteCount` returns an integer. - -See also --------- - -:doc:`TIFFFieldDataType` (3tiff), -:doc:`TIFFFieldName` (3tiff), -:doc:`TIFFFieldPassCount` (3tiff), -:doc:`TIFFFieldQuery` (3tiff), -:doc:`TIFFFieldReadCount` (3tiff), -:doc:`TIFFFieldTag` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFlush.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFlush.rst.txt deleted file mode 100644 index 6b56148..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFFlush.rst.txt +++ /dev/null @@ -1,50 +0,0 @@ -TIFFFlush -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFFlush(TIFF* tif) - -.. c:function:: int TIFFFlushData(TIFF* tif) - -Description ------------ - -:c:func:`TIFFFlush` causes any pending writes for the specified file -(including writes for the current directory) to be done. In normal -operation this call is never needed—the library automatically does -any flushing required. - -:c:func:`TIFFFlushData` flushes any pending image data for the specified -file to be written out; directory-related data are not flushed. In normal -operation this call is never needed—the library automatically does any -flushing required. - -Return values -------------- - -0 is returned if an error is encountered, otherwise 1 is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFGetField.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFGetField.rst.txt deleted file mode 100644 index cd65896..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFGetField.rst.txt +++ /dev/null @@ -1,490 +0,0 @@ -TIFFGetField -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: int TIFFGetField(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - -.. c:function:: int TIFFGetFieldDefaulted(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVGetFieldDefaulted(TIFF* tif, uint32_t tag, va_list ap) - -Description ------------ - -:c:func:`TIFFGetField` returns the value of a tag or pseudo-tag associated with the -the current directory of the opened TIFF file *tif*. (A *pseudo-tag* is a -parameter that is used to control the operation of the TIFF library but whose value -is not read or written to the underlying file.) The file must have been previously -opened with :c:func:`TIFFOpen`. The tag is identified by *tag*, one of the values -defined in the include file :file:`tiff.h` (see also the table below). The type and -number of values returned is dependent on the tag being requested. The programming -interface uses a variable argument list as prescribed by the :file:`stdarg.h` -interface. The returned values should only be interpreted if :c:func:`TIFFGetField` -returns 1. - -:c:func:`TIFFVGetField` is functionally equivalent to :c:func:`TIFFGetField` -except that it takes a pointer to a variable argument list. :c:func:`TIFFVGetField` -is useful for layering interfaces on top of the functionality provided by -:c:func:`TIFFGetField`. - -:c:func:`TIFFGetFieldDefaulted` and :c:func:`TIFFVGetFieldDefaulted` are identical -to :c:func:`TIFFGetField` and :c:func:`TIFFVGetField`, respectively, except that if -a tag is not defined in the current directory and it has a default value, then the -default value is returned. - -The tags understood by :program:`libtiff` the number of parameter values, and the -types for the returned values are shown below. The data types are specified as in C -and correspond to the types used to specify tag values to -:c:func:`TIFFSetField`. Remember that :c:func:`TIFFGetField` returns parameter -values, so all the listed data types are pointers to storage where values should be -returned. Consult the TIFF specification (or relevant industry specification) for -information on the meaning of each tag and their possible values. - - .. list-table:: Tag properties - :widths: 5 3 5 10 - :header-rows: 1 - - * - Tag name - - Count - - Types - - Notes - - * - :c:macro:`TIFFTAG_ARTIST` - - 1 - - :c:expr:`const char**` - - - - * - :c:macro:`TIFFTAG_BADFAXLINES` - - 1 - - :c:expr:`uint32_t*` - - - - * - :c:macro:`TIFFTAG_BITSPERSAMPLE` - - 1 - - :c:expr:`uint16_t*` - - - - * - :c:macro:`TIFFTAG_CLEANFAXDATA` - - 1 - - :c:expr:`uint16_t*` - - - - * - :c:macro:`TIFFTAG_COLORMAP` - - 3 - - :c:expr:`const uint16_t**` - - :c:expr:`1< - -.. c:function:: int TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32_t n) - -Description ------------ - -:c:func:`TIFFMergeFieldInfo` is used to add application-defined TIFF tags -to the list of known ``libtiff`` tags. -A brief description is given at :ref:`Define_Application_Tags` -and a description of the :c:struct:`TIFFFieldInfo` array elements can be -found at :ref:`TIFFFFieldInfo definition `. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`/addingtags`, -:doc:`TIFFSetTagExtender` diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpen.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpen.rst.txt deleted file mode 100644 index 16d324e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpen.rst.txt +++ /dev/null @@ -1,336 +0,0 @@ -TIFFOpen -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFF* TIFFOpen(const char* filename, const char* mode) - -.. c:function:: TIFF* TIFFOpenW(const wchar_t* name, const char* mode) - -.. c:function:: TIFF* TIFFFdOpen(const int fd, const char* filename, const char*mode) - -.. c:function:: TIFF* TIFFOpenExt(const char* filename, const char* mode, TIFFOpenOptions* opts) - -.. c:function:: TIFF* TIFFOpenWExt(const wchar_t* name, const char* mode, TIFFOpenOptions* opts) - -.. c:function:: TIFF* TIFFFdOpenExt(const int fd, const char* filename, const char*mode, TIFFOpenOptions* opts) - -.. c:function:: const char * TIFFSetFileName(TIFF* tif) - -.. c:function:: int TIFFSetFileno(TIFF* tif, int fd) - -.. c:function:: int TIFFSetMode(TIFF* tif, int mode) - -.. c:type:: tmsize_t (*TIFFReadWriteProc)(thandle_t, void *, tmsize_t) -.. c:type:: toff_t (*TIFFSeekProc)(thandle_t, toff_t, int) -.. c:type:: int (*TIFFCloseProc)(thandle_t) -.. c:type:: toff_t (*TIFFSizeProc)(thandle_t) -.. c:type:: int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size) -.. c:type:: void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size) - -.. c:function:: TIFF* TIFFClientOpen(const char* filename, const char* mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc) - -.. c:function:: TIFF* TIFFClientOpenExt(const char* filename, const char* mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, TIFFOpenOptions* opts) - -.. c:function:: thandle_t TIFFClientdata(TIFF* tif) - -.. c:function:: thandle_t TIFFSetClientdata(TIFF* tif, thandle_t newvalue) - -Description ------------ - -:c:func:`TIFFOpen` opens a TIFF file whose name is *filename* -and returns a handle to be used in subsequent calls to routines in -:program:`libtiff`. If the open operation fails, then -:c:macro:`NULL` (0) is returned. The *mode* parameter specifies if -the file is to be opened for reading (``r``) or (``r+``), writing (``w``), or -appending (``a``) and, optionally, whether to override certain -default aspects of library operation (see below Options_). - -The *mode* (``r``) opens only an **existing** file for reading and (``r+``) -for reading and writing. -When a file is opened for appending, existing data will not -be touched; instead new data will be written as additional subfiles. -If an existing file is opened for writing, all previous data is -overwritten. - -If a file is opened for reading, the first TIFF directory in the file -is automatically read. -If a file is opened for writing or appending, a default directory -is automatically created for writing subsequent data. -This directory has all the default values specified in TIFF Revision 6.0: - -* ``BitsPerSample`` = 1, -* ``ThreshHolding`` = "bilevel art scan" -* ``FillOrder`` = 1 (most significant bit of each data byte is filled first) -* ``Orientation`` = 1 (the 0th row represents the visual top of the image, - and the 0th column represents the visual left hand side), -* ``SamplesPerPixel`` = 1, -* ``RowsPerStrip`` = ∞, -* ``ResolutionUnit`` = 2 (inches), and -* ``Compression`` = 1 (no compression). - -To alter these values, or to define values for additional fields, -:c:func:`TIFFSetField` must be used. - -:c:func:`TIFFOpenW` opens a TIFF file with a Unicode filename, for read/writing. - -:c:func:`TIFFFdOpen` is like :c:func:`TIFFOpen` except that it opens a -TIFF file given an open file descriptor *fd*. -The file's name and mode must reflect that of the open descriptor. -Even for write-only mode, ``libtiff`` needs read permissions because -some of its functions need to read back the partially written TIFF file. -The object associated with the file descriptor **must support random access**. -In order to close a TIFF file opened with :c:func:`TIFFFdOpen` -first :c:func:`TIFFCleanup` should be called to free the internal -TIFF structure without closing the file handle and afterwards the -file should be closed using its file descriptor *fd*. - -:c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`, -but options, such as re-entrant error and warning handlers and a limit in byte -that libtiff internal memory allocation functions are allowed to request per call -may be passed with the *opts* argument. The *opts* argument may be NULL. -Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument -parameters. The allocated memory for :c:type:`TIFFOpenOptions` -can be released straight after successful execution of the related -"TIFFOpenExt" functions. - -:c:func:`TIFFOpenWExt` (added in libtiff 4.5) is like :c:func:`TIFFOpenExt`, -but opens a TIFF file with a Unicode filename. - -:c:func:`TIFFFdOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFFdOpen`, -but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. - -:c:func:`TIFFSetFileName` sets the file name in the tif-structure -and returns the old file name. - -:c:func:`TIFFSetFileno` overwrites a copy of the open file's I/O descriptor, -that was saved when the TIFF file was first opened, -and returns the previous value. See note below. - -:c:func:`TIFFSetMode` sets the ``libtiff`` open mode in the tif-structure -and returns the old mode. - -:c:func:`TIFFClientOpen` is like :c:func:`TIFFOpen` except that the caller -supplies a collection of functions that the library will use to do UNIX-like -I/O operations. The *readproc* and *writeproc* functions are called to read -and write data at the current file position. -*seekproc* is called to change the current file position à la :c:func:`lseek` (2). -*closeproc* is invoked to release any resources associated with an open file. -*sizeproc* is invoked to obtain the size in bytes of a file. -*mapproc* and *unmapproc* are called to map and unmap a file's contents in -memory; c.f. :c:func:`mmap` (2) and :c:func:`munmap` (2). -The *clientdata* parameter is an opaque "handle" passed to the client-specified -routines passed as parameters to :c:func:`TIFFClientOpen`. - -.. note:: - In contrast to the return values of :c:func:`mmap` (2) and :c:func:`munmap` (2), - the return values of *mapproc* and *unmapproc* must be: - TRUE for success and FALSE to indicate an error. - ``libtiff`` built in functions :c:func:`_tiffMapProc` and :c:func:`_tiffUnmapProc` - can be found in tif_unix.c as well as in tif_win32.c. - -:c:func:`TIFFClientOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFClientOpen`, -but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. - -:c:func:`TIFFClientdata` returns open file's clientdata handle, -which is the real open file's I/O descriptor used by ``libtiff``. -Note: Within tif_unix.c this handle is converted into an integer file descriptor. - -:c:func:`TIFFSetClientdata` sets open file's clientdata, and return previous value. -The clientdata is used as open file's I/O descriptor within ``libtiff``. - -.. note:: - *clientdata* is used as file descriptor or handle of the opened TIFF file within - `libtif`, whereas the file descriptor *fd* (changeable by :c:func:`TIFFSetFileno`) - is only set once to the value of *clientdata* converted to an integer - (in tif_win32.c as well as in tif_unix.c). - When updating the file's clientdata with :c:func:`TIFFSetClientdata`, - the *fd* value is **not** updated. - -Options -------- - -The open mode parameter can include the following flags in -addition to the ``r``, ``r+``, ``w``, and ``a`` flags. -Note however that option flags must follow the read-write-append -specification. - -Note 2: Also for ``w`` the file will be opened with *read access* rights -because ``libtiff`` needs to read back the partially written TIFF file -for some of its functions. - - -``l``: - - When creating a new file force information be written with - Little-Endian byte order (but see below). - By default the library will create new files using the native - CPU byte order. - -``b``: - - When creating a new file force information be written with - Big-Endian byte order (but see below). - By default the library will create new files using the native - CPU byte order. - -``L``: - - Force image data that is read or written to be treated with - bits filled from Least Significant Bit (LSB) to - Most Significant Bit (MSB). - Note that this is the opposite to the way the library has - worked from its inception. - -``B``: - - Force image data that is read or written to be treated with - bits filled from Most Significant Bit (MSB) to - Least Significant Bit (LSB); this is the default. - -``H``: - - Force image data that is read or written to be treated with - bits filled in the same order as the native - CPU. - -``M``: - - Enable the use of memory-mapped files for images opened read-only. - If the underlying system does not support memory-mapped files - or if the specific image being opened cannot be memory-mapped - then the library will fallback to using the normal system interface - for reading information. - By default the library will attempt to use memory-mapped files. - -``m``: - - Disable the use of memory-mapped files. - -``C``: - - Enable the use of "strip chopping" when reading images - that are comprised of a single strip or tile of uncompressed data. - Strip chopping is a mechanism by which the library will automatically - convert the single-strip image to multiple strips, - each of which has about 8 Kilobytes of data. - This facility can be useful in reducing the amount of memory used - to read an image because the library normally reads each strip - in its entirety. - Strip chopping does however alter the apparent contents of the - image because when an image is divided into multiple strips it - looks as though the underlying file contains multiple separate - strips. - Finally, note that default handling of strip chopping is a compile-time - configuration parameter. - The default behaviour, for backwards compatibility, is to enable - strip chopping. - -``c``: - - Disable the use of strip chopping when reading images. - -``h``: - - Read TIFF header only, do not load the first image directory. That could be - useful in case of the broken first directory. We can open the file and proceed - to the other directories. - -``4``: - - ClassicTIFF for creating a file (default) - -``8``: - - BigTIFF for creating a file. - -``D``: - - Enable use of deferred strip/tile offset/bytecount array loading. They will - be loaded the first time they are accessed to. This loading will be done in - its entirety unless the O flag is also specified. - -``O``: - - On-demand loading of values of the strip/tile offset/bytecount arrays, limited - to the requested strip/tile, instead of whole array loading (implies ``D``) - -Byte order ----------- - -The TIFF specification (**all versions**) states that compliant readers -"must be capable of reading images written in either byte order" . -Nonetheless some software that claims to support the reading of -TIFF images is incapable of reading images in anything but the native -CPU byte order on which the software was written. -(Especially notorious are applications written to run on Intel-based machines.) -By default the library will create new files with the native -byte-order of the CPU on which the application is run. -This ensures optimal performance and is portable to any application -that conforms to the TIFF specification. -To force the library to use a specific byte-order when creating -a new file the ``b`` and ``l`` option flags may be included in -the call to open a file; for example, ``wb`` or ``wl``. - -Return values -------------- - -Upon successful completion -:c:func:`TIFFOpen`, :c:func:`TIFFFdOpen`, and :c:func:`TIFFClientOpen` -return a TIFF pointer. Otherwise, :c:macro:`NULL` is returned. - -Diagnostics ------------ - - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -``"%s": Bad mode``: - - The specified *mode* parameter was not one of ``r`` (read), ``w`` (write), - or ``a`` (append). - -``"%s: Cannot open"``: - - :c:func:`TIFFOpen` was unable to open the specified filename for read/writing. - -``"Cannot read TIFF header"``: - - An error occurred while attempting to read the header information. - -``"Error writing TIFF header"``: - - An error occurred while writing the default header information - for a new file. - -``"Not a TIFF file, bad magic number %d (0x%x)"``: - - The magic number in the header was not (hex) - 0x4d4d or (hex) 0x4949. - -``"Not a TIFF file, bad version number %d (0x%x)"``: - - The version field in the header was not 42 (decimal). - -``"Cannot append to file that has opposite byte ordering"``: - - A file with a byte ordering opposite to the native byte - ordering of the current machine was opened for appending (``a``). - This is a limitation of the library. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFClose` (3tiff), -:doc:`TIFFStrileQuery` (3tiff), -:doc:`TIFFOpenOptions` \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpenOptions.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpenOptions.rst.txt deleted file mode 100644 index 1768b37..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFOpenOptions.rst.txt +++ /dev/null @@ -1,129 +0,0 @@ -TIFFOpenOptions -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:type:: TIFFOpenOptions TIFFOpenOptions - -.. c:function:: TIFFOpenOptions* TIFFOpenOptionsAlloc(void) - -.. c:function:: void TIFFOpenOptionsFree(TIFFOpenOptions*) - -.. c:function:: void TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions* opts, tmsize_t max_single_mem_alloc) - -.. c:function:: void TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions* opts, tmsize_t max_cumulated_mem_alloc) - -.. c:function:: void TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions* opts, TIFFErrorHandlerExtR handler, void* errorhandler_user_data) - -.. c:function:: void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions* opts, TIFFErrorHandlerExtR handler, void* warnhandler_user_data) - -.. c:function:: void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, int warn_about_unknown_tags) - -Description ------------ - -:c:type:`TIFFOpenOptions` is an opaque structure which can be passed -to the TIFF open"Ext" functions to define some ``libtiff`` internal settings. -The settings are the maximum single memory allocation limit and -per-TIFF handle (re-entrant) error handler and warning handler functions. -For those handler a pointer to a **custom defined data structure** *user_data* -can be given along. - -:c:func:`TIFFOpenOptionsAlloc` allocates memory for the :c:type:`TIFFOpenOptions` -opaque structure and returns a :c:type:`TIFFOpenOptions` pointer. - -:c:func:`TIFFOpenOptionsFree` releases the allocated memory for -:c:type:`TIFFOpenOptions`. The allocated memory for :c:type:`TIFFOpenOptions` -can be released straight after successful execution of the related -TIFFOpen"Ext" functions like :c:func:`TIFFOpenExt`. - -:c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` (added in libtiff 4.5.0) sets -the value for the maximum single memory limit in byte that ``libtiff`` internal -memory allocation functions are allowed to request per call. - -.. note:: - However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` - and :c:func:`_TIFFrealloc` **do not apply** this internal memory - allocation limit set by :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`! - -:c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` (added in libtiff 4.6.1) sets -the maximum cumulated memory allocations in byte, for a given TIFF handle, -that ``libtiff`` internal memory allocation functions are allowed. - -.. note:: - However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` - and :c:func:`_TIFFrealloc` **do not apply** this internal memory - allocation limit set by :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc`! - -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` sets the function pointer to -an application-specific and per-TIFF handle (re-entrant) error handler. -Furthermore, a pointer to a **custom defined data structure** *errorhandler_user_data* -can be passed. This error handler is invoked through :c:func:`TIFFErrorExtR` -and the *errorhandler_user_data* pointer is given along. -The *errorhandler_user_data* argument may be NULL. - -:c:func:`TIFFOpenOptionsSetWarningHandlerExtR` works like -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler, -which is invoked through :c:func:`TIFFWarningExtR` - -:c:func:`TIFFOpenOptionsSetWarnAboutUnknownTags` sets whether libtiff should -emit a warning when encountering a unknown tag. This function has been added in -libtiff 4.7.1 and the default value is FALSE (change of behaviour compared to -earlier versions). - -Example -------- - -:: - - #include "tiffio.h" - - typedef struct MyErrorHandlerUserDataStruct - { - /* ... any user data structure ... */ - } MyErrorHandlerUserDataStruct; - - static int myErrorHandler(TIFF *tiff, void *user_data, const char *module, - const char *fmt, va_list ap) - { - MyErrorHandlerUserDataStruct *errorhandler_user_data = - (MyErrorHandlerUserDataStruct *)user_data; - /*... code of myErrorHandler ...*/ - return 1; - } - - - main() - { - tmsize_t limit = (256 * 1024 * 1024); - MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */}; - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); - TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data); - TIFF *tif = TIFFOpenExt("foo.tif", "r", opts); - TIFFOpenOptionsFree(opts); - /* ... go on here ... */ - - TIFFClose(tif); - } - -Note ----- - -This functionality was introduced with libtiff 4.5. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFError` (3tiff), -:doc:`TIFFWarning` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFPrintDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFPrintDirectory.rst.txt deleted file mode 100644 index e84af5a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFPrintDirectory.rst.txt +++ /dev/null @@ -1,58 +0,0 @@ -TIFFPrintDirectory -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - -Description ------------ - -:c:func:`TIFFPrintDirectory` prints a description of the current directory -in the specified TIFF file to the standard I/O output stream *fd*. -The *flags* parameter is used to control the "level of detail" -of the printed information; it is a bitwise-or of the flags defined in -:file:`tiffio.h`: - - -================================= ===== =========================== -Name Value Description -================================= ===== =========================== -:c:macro:`TIFFPRINT_NONE` 0x0 no extra info -:c:macro:`TIFFPRINT_STRIPS` 0x1 strips/tiles info -:c:macro:`TIFFPRINT_CURVES` 0x2 color/gray response curves -:c:macro:`TIFFPRINT_COLORMAP` 0x4 colormap -:c:macro:`TIFFPRINT_JPEGQTABLES` 0x100 JPEG Q matrices -:c:macro:`TIFFPRINT_JPEGACTABLES` 0x200 JPEG AC tables -:c:macro:`TIFFPRINT_JPEGDCTABLES` 0x200 JPEG DC tables -================================= ===== =========================== - -Notes ------ - -In C++ the *flags* parameter defaults to 0. - -Return values -------------- - -None. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFProcFunctions.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFProcFunctions.rst.txt deleted file mode 100644 index 73c77dd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFProcFunctions.rst.txt +++ /dev/null @@ -1,57 +0,0 @@ -TIFFProcFunctions -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: TIFFCloseProc TIFFGetCloseProc(TIFF* tif) - -.. c:function:: TIFFMapFileProc TIFFGetMapFileProc(TIFF* tif) - -.. c:function:: TIFFReadWriteProc TIFFGetReadProc(TIFF* tif) - -.. c:function:: TIFFSeekProc TIFFGetSeekProc(TIFF* tif) - -.. c:function:: TIFFSizeProc TIFFGetSizeProc(TIFF* tif) - -.. c:function:: TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF* tif) - -.. c:function:: TIFFReadWriteProc TIFFGetWriteProc(TIFF* tif) - -Description ------------ - -.. TODO: Explain or link to explanation of procedure handling. - -The following routines return ?????? an open TIFF file. - -:c:func:`TIFFGetCloseProc` returns a pointer to file close method. - -:c:func:`TIFFGetMapFileProc` returns a pointer to memory mapping method. - -:c:func:`TIFFGetReadProc` returns a pointer to file read method. - -:c:func:`TIFFGetSeekProc` returns a pointer to file seek method. - -:c:func:`TIFFGetSizeProc` returns a pointer to file size requesting method. - -:c:func:`TIFFGetUnmapFileProc` returns a pointer to memory unmapping method. - -:c:func:`TIFFGetWriteProc` returns a pointer to file write method. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFRGBAImage.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFRGBAImage.rst.txt deleted file mode 100644 index 7f6771e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFRGBAImage.rst.txt +++ /dev/null @@ -1,255 +0,0 @@ -TIFFRGBAImage -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:type:: unsigned char TIFFRGBValue - -.. c:type:: struct _TIFFRGBAImage TIFFRGBAImage - -.. c:function:: int TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) - -.. c:function:: int TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stopOnError, char emsg[1024]) - -.. c:function:: int TIFFRGBAImageGet(TIFFRGBAImage* img, uint32_t* raster, uint32_t width, uint32_t height) - -.. c:function:: void TIFFRGBAImageEnd(TIFFRGBAImage* img) - -Description ------------ - -The routines described here provide a high-level interface through which -TIFF images may be read into memory. -Images may be strip- or tile-based and have a variety of different -characteristics: bits/sample, samples/pixel, photometric, orientation, etc. -Decoding state is encapsulated in a :c:type:`TIFFRGBAImage` -structure making it possible to capture state for multiple images -and quickly switch between them. -The target raster format can be customized to a particular application's -needs by installing custom routines that manipulate image data -according to application requirements. - -The default usage for these routines is: - -* check if an image can be processed using :c:func:`TIFFRGBAImageOK` -* construct a decoder state block using :c:func:`TIFFRGBAImageBegin` -* read and decode an image into a target raster using - :c:func:`TIFFRGBAImageGet`, and then -* release resources using :c:func:`TIFFRGBAImageEnd` - -:c:func:`TIFFRGBAImageGet` can be called multiple times to decode an -image using different state parameters. -If multiple images are to be displayed and there is not enough -space for each of the decoded rasters, multiple state blocks can -be managed and then calls can be made to :c:func:`TIFFRGBAImageGet` -as needed to display an image. - -The generated raster is assumed to be an array of -*width* × *height* -32-bit entries, where *width* must be less than or equal to the width of -the image (*height* may be any non-zero size). -If the raster dimensions are smaller than the image, the image data -is cropped to the raster bounds. -If the raster height is greater than that of the image, then the -image data are placed in the lower part of the raster. -(Note that the raster is assumed to be organized such that the pixel -at location (*x*, *y*) is *raster* [ *y* × *width* + *x* ]; -with the raster origin in the *lower-left hand corner*.) - -Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros :c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, -and :c:macro:`TIFFGetA` should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). - -:c:func:`TIFFRGBAImageGet` converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. - -The parameter *stopOnError* specifies how to act if an error is -encountered while reading the image. If *stopOnError* is non-zero, -then an error will terminate the operation; otherwise -:c:func:`TIFFRGBAImageGet` will continue processing data until all the -possible data in the image have been requested. - -Alternate raster formats ------------------------- - -To use the core support for reading and processing TIFF images, but -write the resulting raster data in a different format one need only -override the "put methods" used to store raster data. -These methods are defined in the :c:type:`TIFFRGBAImage` -structure and initially setup by :c:func:`TIFFRGBAImageBegin` -to point to routines that pack raster data in the default -ABGR pixel format. -Two different routines are used according to the physical organization -of the image data in the file: -``PlanarConfiguration`` = 1 (packed samples), and -``PlanarConfiguration`` = 2 (separated samples). -Note that this mechanism can be used to transform the data before -storing it in the raster. -For example one can convert data to colormap indices for display on a -colormap display. - -Simultaneous raster store and display -------------------------------------- - -It is simple to display an image as it is being read into memory -by overriding the put methods as described above for supporting -alternate raster formats. -Simply keep a reference to the default put methods setup by -:c:func:`TIFFRGBAImageBegin` and then invoke them before or after -each display operation. For example, the -:doc:`/tools/tiffgt` utility uses the following put method to -update the display as the raster is being filled: - -:: - - static void - putContigAndDraw(TIFFRGBAImage* img, uint32_t* raster, - uint32_t x, uint32_t y, uint32_t w, uint32_t h, - int32_t fromskew, int32_t toskew, - unsigned char* cp) - { - (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp); - if (x+w == width) { - w = width; - if (img->orientation == ORIENTATION_TOPLEFT) - lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w); - else - lrectwrite(0, y, w-1, y+h-1, raster); - } - } - -(the original routine provided by the library is saved in the -variable :c:var:`putContig`.) - -Supporting additional TIFF formats ----------------------------------- - -The :c:func:`TIFFRGBAImage` routines support the most commonly -encountered flavors of TIFF. It is possible to extend this support by -overriding the "get method" invoked by :c:func:`TIFFRGBAImageGet` -to read TIFF image data. -Details of doing this are a bit involved, it is best to make a copy -of an existing get method and modify it to suit the needs of an -application. - -.. _TIFFRGBAImage_Restriction_Notes: - -Notes ------ - -In C++ the *stopOnError* parameter defaults to 0. - -``SamplesPerPixel`` must be either 1, 2, 4, 8, or 16 bits. -Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. -``SamplesPerPixel`` minus ``ExtraSamples``). - -Palette image colormaps that appear to be incorrectly written -as 8-bit values are automatically scaled to 16-bits. - -Within the :c:type:`TIFFRGBAImage` structure the TIFF orientation -and also the required orientation in the raster can be defined. -However, the lower level :c:func:`TIFFRGBAImageGet` functions -- also called by :c:func:`TIFFReadRGBAImage` and :c:func:`TIFFReadRGBAImageOriented` - -can mirror the image orientations across both axes, but cannot rotate them. -Therefore, images with a TIFF orientation of 5 (LeftTop) to 8 (LeftBottom) -are not stored correctly in the raster, as this would require an additional -rotation of 90 degrees and an exchange of width and height dimension. - -If an alpha channel is used in an image, there are two common representations -that are available: straight (unassociated) alpha and premultiplied (associated) -alpha, which is specified by the value of ExtraSamples tag. -For files with unassociated alpha, the :c:func:`TIFFRGBAImage` reading routines -multiply the RGB values by the alpha channel values before saving them in the raster. -The other TIFFReadxxx (like :c:func:`TIFFReadScanline`) functions do not do this. - -Return values -------------- - -All routines return 1 if the operation was successful. -Otherwise, 0 is returned if an error was encountered and -*stopOnError* is zero. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display - the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, - but because it has 3 or 4 samples/pixel, it is assumed to be - RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel`` and ``PhotometricInterpretation``) - that can not be handled. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map - data to 8-bit RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`TIFFcolor` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadDirectory.rst.txt deleted file mode 100644 index 7a1fc03..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadDirectory.rst.txt +++ /dev/null @@ -1,146 +0,0 @@ -TIFFReadDirectory -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadDirectory(TIFF* tif) - -Description ------------ - -Read the next directory in the specified file and make it the current -directory. Applications only need to call :c:func:`TIFFReadDirectory` -to read multiple subfiles in a single TIFF file—(the first directory -in a file is automatically read when :c:func:`TIFFOpen` is called. - -Notes ------ - -If the library is compiled with :c:macro:`STRIPCHOP_SUPPORT` enabled, then -images that have a single uncompressed strip or tile of data are -automatically treated as if they were made up of multiple strips or tiles of -approximately 8 kilobytes each. This operation is done only in-memory; it does -not alter the contents of the file. However, the construction of the "chopped -strips" is visible to the application through the number of strips [tiles] -returned by :c:func:`TIFFNumberOfStrips` [:c:func:`TIFFNumberOfTiles`]. - -Return values -------------- - -If the next directory was successfully read, 1 is returned. Otherwise, 0 is -returned if an error was encountered, or if there are no more directories to -be read. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -``Seek error accessing TIFF directory``: - - An error occurred while positioning to the location of the - directory. - -``Wrong data type %d for field "%s"``: - - The tag entry in the directory had an incorrect data type. - For example, an ``ImageDescription`` tag with a ``SHORT`` - data type. - -``TIFF directory is missing required "%s" field``: - - The specified tag is required to be present by the TIFF - 5.0 specification, but is missing. - The directory is (usually) unusable. - -``%s: Rational with zero denominator``: - - A directory tag has a ``RATIONAL`` value whose denominator is zero. - -``Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored``: - - The specified tag's count field is bad. - For example, a count other than 1 for a ``SubFileType`` tag. - -``Cannot handle different per-sample values for field "%s"``: - - The tag has ``SamplesPerPixel`` values and they are not all the same; e.g. - ``BitsPerSample``. The library is unable to handle images of this sort. - -``Count mismatch for field "%s"; expecting %d, got %d``: - - The count field in a tag does not agree with the number expected by the - library. This should never happen, so if it does, the library refuses to - read the directory. - -``Invalid TIFF directory; tags are not sorted in ascending order``: - - The directory tags are not properly sorted as specified - in the TIFF 5.0 specification. This error is not fatal. - -``Ignoring unknown field with tag %d (0x%x)``: - - An unknown tag was encountered in the directory; - the library ignores all such tags. - -``TIFF directory is missing required "ImageLength" field``: - - The image violates the specification by not having a necessary field. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "PlanarConfig" field``: - - The image violates the specification by not having a necessary field. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripOffsets" field``: - - The image has multiple strips, but is missing the tag that - specifies the file offset to each strip of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "TileOffsets" field``: - - The image has multiple tiles, but is missing the tag that - specifies the file offset to each tile of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripByteCounts" field``: - - The image has multiple strips, but is missing the tag that - specifies the size of each strip of data. - There is no way for the library to recover from this error. - -``TIFF directory is missing required "StripByteCounts" field, calculating from imagelength``: - - The image violates the specification by not having a necessary field. - However, when the image is comprised of only one strip or tile, the - library will estimate the missing value based on the file size. - -``Bogus "StripByteCounts" field, ignoring and calculating from imagelength``: - - Certain vendors violate the specification by writing zero for - the StripByteCounts tag when they want to leave the value - unspecified. - If the image has a single strip, the library will estimate - the missing value based on the file size. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFquery` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedStrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedStrip.rst.txt deleted file mode 100644 index cd75ce3..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedStrip.rst.txt +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadEncodedStrip -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32_t strip, void* buf, tmsize_t size) - -Description ------------ - -Read the specified strip of data and place up to *size* bytes of decompressed -information in the (user supplied) data buffer. - -Notes ------ - -The value of *strip* is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by :c:func:`TIFFStripSize`. -If -1 is passed in the *size* parameter, the whole strip will be read. You -should be sure you have enough space allocated for the buffer. - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadEncodedStrip` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedTile.rst.txt deleted file mode 100644 index 75a7693..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadEncodedTile.rst.txt +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadEncodedTile -=================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Read the specified tile of data and place up to *size* bytes of decompressed -information in the (user supplied) data buffer. - -Notes ------ - -The value of *tile* is a "raw tile number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should be at least as large as the value returned by -:c:func:`TIFFTileSize`. - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadEncodedTile` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadFromUserBuffer.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadFromUserBuffer.rst.txt deleted file mode 100644 index 09807ec..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadFromUserBuffer.rst.txt +++ /dev/null @@ -1,46 +0,0 @@ -TIFFReadFromUserBuffer -====================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadFromUserBuffer(TIFF* tif, uint32_t strile, void* inbuf, tmsize_t insize, void* outbuf, tmsize_t outsize) - -Description ------------ - -Use the provided input buffer (`inbuf`, `insize`) and decompress it -into (`outbuf`, `outsize`). This function replaces the use of -:c:func:`TIFFReadEncodedStrip` / :c:func:`TIFFReadEncodedTile` -when the user can provide the buffer for the input data, for example when -he wants to avoid ``libtiff`` to read the strile offset/count values from the -``StripOffsets`` / ``StripByteCounts`` or ``TileOffsets`` / -``TileByteCounts`` arrays. `inbuf` content must be writable -(if bit reversal is needed). - - -Return values -------------- - -Returns 1 in case of success, 0 otherwise. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAImage.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAImage.rst.txt deleted file mode 100644 index b1f3b06..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAImage.rst.txt +++ /dev/null @@ -1,167 +0,0 @@ -TIFFReadRGBAImage -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:macro:: TIFFGetR(abgr) - - :c:expr:`((abgr) & 0xff)` - -.. c:macro:: TIFFGetG(abgr) - - :c:expr:`(((abgr) >> 8) & 0xff)` - -.. c:macro:: TIFFGetB(abgr) - - :c:expr:`(((abgr) >> 16) & 0xff)` - -.. c:macro:: TIFFGetA(abgr) - - :c:expr:`(((abgr) >> 24) & 0xff)` - -.. c:function:: int TIFFReadRGBAImage(TIFF* tif, uint32_t width, uint32_t height, uint32_t* raster, int stopOnError) - -.. c:function:: int TIFFReadRGBAImageOriented(TIFF* tif, uint32_t width, uint32_t height, uint32_t * raster, int orientation, int stopOnError) - -Description ------------ - -:c:func:`TIFFReadRGBAImage` reads a strip- or tile-based image into memory, -storing the result in the user supplied *raster*. -The raster is assumed to be an array of *width* × *height* 32-bit entries, -where *width* must be less than or equal to the width of the image -(*height* may be any non-zero size). -If the raster dimensions are smaller than the image, the image data is -cropped to the raster bounds. -If the raster height is greater than that of the image, then the image data -are placed in the lower part of the raster. -(Note that the raster is assume to be organized such that the pixel -at location (*x*, *y*) is *raster* [ *y* × *width* + *x* ]; -with the raster origin in the lower-left hand corner.) - -:c:func:`TIFFReadRGBAImageOriented` works like :c:func:`TIFFReadRGBAImage` -except that the user can specify the raster origin position with the -*orientation* parameter. Four orientations are supported: - -* :c:macro:`ORIENTATION_TOPLEFT`: origin in top-left corner, -* :c:macro:`ORIENTATION_TOPRIGHT`: origin in top-right corner, -* :c:macro:`ORIENTATION_BOTLEFT`: origin in bottom-left corner -* :c:macro:`ORIENTATION_BOTRIGHT`: origin in bottom-right corner. - -If you choose :c:macro:`ORIENTATION_BOTLEFT`, the result will be the same -as returned by the :c:func:`TIFFReadRGBAImage`. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros :c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, -and :c:macro:`TIFFGetA` should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). - -:c:func:`TIFFReadRGBAImage` converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. - -The parameter *stopOnError* specifies how to act if an error is -encountered while reading the image. If *stopOnError* is non-zero, then -an error will terminate the operation; otherwise :c:func:`TIFFReadRGBAImage` -will continue processing data until all the possible data in the -image have been requested. - -Notes ------ - -:c:func:`IFFReadRGBAImage` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered and -*stopOnError* is zero. - -.. TODO: Specify, what the return value is if an error occurs and stopOnError was non-zero. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display - the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, - but because it has 3 or 4 samples/pixel, it is assumed to be - RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map - data to 8-bit RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAStrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAStrip.rst.txt deleted file mode 100644 index 75aed98..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBAStrip.rst.txt +++ /dev/null @@ -1,135 +0,0 @@ -TIFFReadRGBAStrip -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadRGBAStrip(TIFF* tif, uint32_t row, uint32_t* raster) - -.. c:function:: int TIFFReadRGBAStripExt(TIFF* tif, uint32_t row, uint32_t * raster, int stop_on_error) - -Description ------------ - -:c:func:`TIFFReadRGBAStrip` reads a single strip of a strip-based image -into memory, storing the result in the user supplied RGBA *raster*. -The raster is assumed to be an array of ``ImageWidth`` × ``RowsPerStrip`` -32-bit entries, where ``ImageWidth`` is the width of the image -(:c:macro:`TIFFTAG_IMAGEWIDTH`) and ``RowsPerStrip`` is the maximum lines -in a strip (:c:macro:`TIFFTAG_ROWSPERSTRIP`). - -:c:func:`TIFFReadRGBAStripExt` provides the parameter `stop_on_error`. -Its behaviour is described at :doc:`TIFFReadRGBAImage`. - -The *row* value should be the row of the first row in the strip -(*strip* × ``RowsPerStrip``, zero based). - -Note that the raster is assume to be organized such that the pixel at location -(*x*, *y*) is *raster* [ *y* × *width* + *x* ]; with the raster origin in the -*lower-left hand corner* of the strip. That is bottom to top organization. -When reading a partial last strip in the file the last line of the image will -begin at the beginning of the buffer. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -:c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, and -:c:macro:`TIFFGetA` should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). - -See the :doc:`TIFFRGBAImage` page for more details on how various image types -are converted to RGBA values. - -Notes ------ - -:c:func:`TIFFReadRGBAStrip` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar -:c:func:`TIFFReadRGBAImage` function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one strip. The :c:func:`TIFFReadRGBATile` function -does a similar operation for tiled images. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, but because it - has 3 or 4 samples/pixel, it is assumed to be RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black\fP``: - - The image was missing a tag that describes how to display it, but - because it has 1 sample/pixel, it is assumed to be a grayscale or - bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert image samples to - 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map grayscale data - to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map data to 8-bit - RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBATile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBATile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBATile.rst.txt deleted file mode 100644 index 4644f9b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRGBATile.rst.txt +++ /dev/null @@ -1,137 +0,0 @@ -TIFFReadRGBATile -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadRGBATile(TIFF* tif, uint32_t x, uint32_t y, uint32_t* raster) - -.. c:function:: int TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, int stop_on_error) - -Description ------------ - -:c:func:`TIFFReadRGBATile` reads a single tile of a tile-based image into -memory, storing the result in the user supplied RGBA *raster*. -The raster is assumed to be an array of ``TileWidth`` × ``TileLength`` -32-bit entries, where ``TileWidth`` is the width of a tile -(:c:macro:`TIFFTAG_TILEWIDTH`) and ``TileLength`` is the height of a -tile (:c:macro:`TIFFTAG_TILELENGTH`). - -:c:func:`TIFFReadRGBATileExt` provides the parameter `stop_on_error`. -Its behaviour is described at :doc:`TIFFReadRGBAImage`. - -The *x* and *y* values are the offsets from the top left corner to the top -left corner of the tile to be read. They must be an exact multiple of the -tile width and length. - -Note that the raster is assume to be organized such that the pixel at -location -(*x*, *y*) is *raster* [ *y* × *width* + *x* ]; with the raster origin -in the *lower-left hand corner* of the tile. That is bottom to top -organization. Edge tiles which partly fall off the image will be filled -out with appropriate zeroed areas. - -Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -:c:macro:`TIFFGetR`, :c:macro:`TIFFGetG`, :c:macro:`TIFFGetB`, and -:c:macro:`TIFFGetA` should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). - -See the :doc:`TIFFRGBAImage` page for more details on how various image -types are converted to RGBA values. - -Notes ------ - -:c:func:`TIFFReadRGBATile` is just a wrapper around the more general -:doc:`TIFFRGBAImage` facilities. It's main advantage over the similar -:c:func:`TIFFReadRGBAImage` function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one tile. The :c:func:`TIFFReadRGBAStrip` function -does a similar operation for stripped images. - -For general notes see -:ref:`TIFFRGBImage notes `. - -Return values -------------- - -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Sorry, can not handle %d-bit pictures"``: - - The image had ``BitsPerSample`` other than 1, 2, 4, 8, or 16. - -``"Sorry, can not handle %d-channel images"``: - - The image had ``SamplesPerPixel`` other than 1, 3, or 4. - -``Missing needed "PhotometricInterpretation" tag``: - - The image did not have a tag that describes how to display the data. - -``No "PhotometricInterpretation" tag, assuming RGB``: - - The image was missing a tag that describes how to display it, but because it - has 3 or 4 samples/pixel, it is assumed to be RGB. - -``No "PhotometricInterpretation" tag, assuming min-is-black``: - - The image was missing a tag that describes how to display it, - but because it has 1 sample/pixel, it is assumed to be a grayscale - or bilevel image. - -``"No space for photometric conversion table"``: - - There was insufficient memory for a table used to convert - image samples to 8-bit RGB. - -``Missing required "Colormap" tag``: - - A Palette image did not have a required ``Colormap`` tag. - -``"No space for tile buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"No space for strip buffer"``: - - There was insufficient memory to allocate an i/o buffer. - -``"Can not handle format"``: - - The image has a format (combination of ``BitsPerSample``, - ``SamplesPerPixel``, and ``PhotometricInterpretation``) - that :c:func:`TIFFReadRGBAImage` can not handle. - -``"No space for B&W mapping table"``: - - There was insufficient memory to allocate a table used to map - grayscale data to RGB. - -``"No space for Palette mapping table"``: - - There was insufficient memory to allocate a table used to map data to 8-bit - RGB. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFRGBAImage` (3tiff), -:doc:`TIFFReadRGBAImage` (3tiff), -:doc:`TIFFReadRGBAStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawStrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawStrip.rst.txt deleted file mode 100644 index 4a2da52..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawStrip.rst.txt +++ /dev/null @@ -1,43 +0,0 @@ -TIFFReadRawStrip -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Read the contents of the specified strip into the (user supplied) data buffer. -Note that the value of *strip* is a "raw strip number". That is, the caller -must take into account whether or not the data is organized in separate planes -(``PlanarConfiguration`` = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by :c:func:`TIFFStripSize`. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadRawStrip` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`TIFFstrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawTile.rst.txt deleted file mode 100644 index 3a651a4..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadRawTile.rst.txt +++ /dev/null @@ -1,45 +0,0 @@ -TIFFReadRawTile -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Read the contents of the specified tile into the (user supplied) data buffer. -Note that the value of *tile* is a "raw tile number". That is, the caller -must take into account whether or not the data is organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should typically be at least as large as the value -returned by :c:func:`TIFFTileSize`. - -Return values -------------- - -The actual number of bytes of data that were placed in *buf* is returned; -:c:func:`TIFFReadRawTile` returns -1 if an error was encountered. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFtile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadScanline.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadScanline.rst.txt deleted file mode 100644 index 29cb7c0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadScanline.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -TIFFReadScanline -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFReadScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample) - -Description ------------ - -Read the data for the specified row into the (user supplied) data buffer -*buf*. The data are returned decompressed and, in the native byte- and -bit-ordering, but are otherwise packed (see further below). The buffer -must be large enough to hold an entire scanline of data. Applications -should call the routine :c:func:`TIFFScanlineSize` to find out the size -(in bytes) of a scanline buffer. -The *row* parameter is always used by :c:func:`TIFFReadScanline`; the -*sample* parameter is used only if data are organized in separate planes -(``PlanarConfiguration`` = 2). - -Notes ------ - -The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the ``FillOrder`` tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order, - -In C++ the *sample* parameter defaults to 0. - -Return values -------------- - -:c:func:`TIFFReadScanline` returns -1 if it detects an error; otherwise 1 is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Compression algorithm does not support random access"``: - - Data was requested in a non-sequential order from a file that uses a - compression algorithm and that has ``RowsPerStrip`` greater than one. - That is, data in the image is stored in a compressed form, and with multiple - rows packed into a strip. In this case, the library does not support random - access to the data. The data should either be accessed sequentially, or the - file should be converted so that each strip is made up of one row of data. - -Bugs ----- - -Reading subsampled YCbCR data does not work correctly because, for -``PlanarConfiguration`` = 2, the size of a scanline is not calculated on a -per-sample basis, and for ``PlanarConfiguration`` = 1, the library does not -unpack the block-interleaved samples; use the strip- and -tile-based interfaces to read these formats. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadTile.rst.txt deleted file mode 100644 index fc1afa7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFReadTile.rst.txt +++ /dev/null @@ -1,57 +0,0 @@ -TIFFReadTile -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFReadTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -Description ------------ - -Return the data for the tile *containing* the specified coordinates. The -data placed in *buf* are returned decompressed and, typically, in the -native byte- and bit-ordering, but are otherwise packed (see further -below). The buffer must be large enough to hold an entire tile of data. -Applications should call the routine :c:func:`TIFFTileSize` to find out -the size (in bytes) of a tile buffer. The *x* and *y* parameters are -always used by :c:func:`TIFFReadTile`. The *z* parameter is used if the -image is deeper than 1 slice (``ImageDepth`` > 1). The *sample* -parameter is used only if data are organized in separate planes ( -``PlanarConfiguration`` = 2). - -Notes ------ - -The library attempts to hide bit- and byte-ordering differences between -the image and the native machine by converting data to the native machine -order. Bit reversal is done if the ``FillOrder`` tag is opposite to the -native machine bit order. 16- and 32-bit samples are automatically -byte-swapped if the file was written with a byte order opposite to the -native machine byte order. - -Return values -------------- - -:c:func:`TIFFReadTile` returns -1 if it detects an error; otherwise the -number of bytes in the decoded tile is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFtile` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetDirectory.rst.txt deleted file mode 100644 index 00a9f11..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetDirectory.rst.txt +++ /dev/null @@ -1,71 +0,0 @@ -TIFFSetDirectory -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFSetDirectory(TIFF* tif, tdir_t dirnum) - -.. c:function:: int TIFFSetSubDirectory(TIFF* tif, uint64_t diroff) - -Description ------------ - -:c:func:`TIFFSetDirectory` changes the current directory and reads its -contents with :c:func:`TIFFReadDirectory`. The parameter *dirnum* -specifies the subfile/directory as an integer number, with the first -directory numbered zero. -:c:func:`TIFFSetDirectory()` only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain. - -:c:func:`TIFFSetSubDirectory` acts like :c:func:`TIFFSetDirectory`, -except the directory is specified as a file offset instead of an index; -this is required for accessing subdirectories linked through a -``SubIFD`` tag. (see :ref:`MultiPage SubIFD `) - -Directory query functions :c:func:`TIFFCurrentDirectory`, -:c:func:`TIFFCurrentDirOffset`, :c:func:`TIFFLastDirectory` and -:c:func:`TIFFNumberOfDirectories` retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information! - -Return values -------------- - -On successful return 1 is returned. Otherwise, 0 is returned if *dirnum* -or *diroff* specifies a non-existent directory, or if an error was -encountered while reading the directory's contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"%s: Error fetching directory count"``: - - An error was encountered while reading the "directory count" field. - -``"%s: Error fetching directory link"``: - - An error was encountered while reading the "link value" that points to the - next directory in a file. - -See also --------- - -:doc:`TIFFquery` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFWriteDirectory` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetField.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetField.rst.txt deleted file mode 100644 index 82935ea..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFSetField.rst.txt +++ /dev/null @@ -1,402 +0,0 @@ -TIFFSetField -============ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include " - -.. c:function:: int TIFFSetField(TIFF* tif, uint32_t tag, ...) - -.. c:function:: int TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - -.. c:function:: int TIFFUnsetField(TIFF* tif, uint32_t tag) - -Description ------------ - -:c:func:`TIFFSetField` sets the value of a field or pseudo-tag in the -current directory associated with the open TIFF file *tif*. -(A *pseudo-tag* is a parameter that is used to control the operation of -the TIFF library but whose value is not read or written to the underlying -file.) To set the value of a field the file must have been previously -opened for writing with :c:func:`TIFFOpen`. -Pseudo-tags can be set whether the file was opened for reading or writing. -The field is identified by *tag*, one of the values defined in the include -file :file:`tiff.h` (see also the table below). -The actual value is specified using a variable argument list, as -prescribed by the :file:`stdarg.h` interface. - -:c:func:`TIFFVSetField` is functionally equivalent to :c:func:`TIFFSetField` -except that it takes a pointer to a variable argument list. -:c:func:`TIFFVSetField` is useful for writing routines that are layered on -top of the functionality provided by :c:func:`TIFFSetField`. - -:c:func:`TIFFUnsetField` clears the contents of the field in the internal -structure. If it is a custom field, it is removed from the list of known tags. - -The tags understood by :program:`libtiff`, the number of parameter values, -and the expected types for the parameter values are shown below. -The data types are: - -.. list-table:: Tag data types - :widths: 5 15 - :header-rows: 1 - - * - Type - - Description - - * - :c:expr:`char*` - - a null-terminated string corresponding to the ``ASCII`` data type - * - :c:expr:`uint16_t` - - an unsigned 16-bit value - * - :c:expr:`uint32_t` - - an unsigned 32-bit value; - * - :c:expr:`uint16_t*` - - an array of unsigned 16-bit values. - * - :c:expr:`void*` - - an array of data values of unspecified type. - -Consult the TIFF specification for information on the meaning of each tag. - - .. list-table:: Tag properties - :widths: 5 3 5 10 - :header-rows: 1 - - * - Tag name - - Count - - Types - - Notes - - - * - :c:macro:`TIFFTAG_ARTIST` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_BADFAXLINES` - - 1 - - :c:expr:`uint32_t` - - - * - :c:macro:`TIFFTAG_BITSPERSAMPLE` - - 1 - - :c:expr:`uint16_t` - - † - * - :c:macro:`TIFFTAG_CLEANFAXDATA` - - 1 - - :c:expr:`uint16_t` - - - * - :c:macro:`TIFFTAG_COLORMAP` - - 3 - - :c:expr:`uint16_t*` - - :c:expr:`1< 0 - * - :c:macro:`TIFFTAG_SAMPLEFORMAT` - - 1 - - :c:expr:`uint16_t` - - † - * - :c:macro:`TIFFTAG_SAMPLESPERPIXEL` - - 1 - - :c:expr:`uint16_t` - - † value must be ≤ 4 - * - :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` - - 1 - - :c:expr:`double` - - - * - :c:macro:`TIFFTAG_SMINSAMPLEVALUE` - - 1 - - :c:expr:`double` - - - * - :c:macro:`TIFFTAG_SOFTWARE` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_STONITS` - - 1 - - :c:expr:`double` - - † - * - :c:macro:`TIFFTAG_SUBFILETYPE` - - 1 - - :c:expr:`uint32_t` - - - * - :c:macro:`TIFFTAG_SUBIFD` - - 2 - - :c:expr:`uint16_t`, :c:expr:`uint64_t*` - - count, offsets array - * - :c:macro:`TIFFTAG_TARGETPRINTER` - - 1 - - :c:expr:`char*` - - - * - :c:macro:`TIFFTAG_THRESHHOLDING` - - 1 - - :c:expr:`uint16_t` - - - * - :c:macro:`TIFFTAG_TILEDEPTH` - - 1 - - :c:expr:`uint32_t` - - † - * - :c:macro:`TIFFTAG_TILELENGTH` - - 1 - - :c:expr:`uint32_t` - - † must be a multiple of 8 - * - :c:macro:`TIFFTAG_TILEWIDTH` - - 1 - - :c:expr:`uint32_t` - - † must be a multiple of 8 - * - :c:macro:`TIFFTAG_TRANSFERFUNCTION` - - 1 or 3‡ - - :c:expr:`uint16_t*` - - :c:expr:`1< - -.. c:function:: TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc extender) - -Description ------------ - -:c:func:`TIFFSetTagExtender` is used to register the merge function -for user defined tags as an extender callback with ``libtiff``. -A brief description can be found at :ref:`define_application_tags`. - -.. note:: - - :c:func:`TIFFSetTagExtender` cannot be used to extend custom directories - (for example EXIF, GPS or other custom directories). - Only the TIFF directory can be extended with additional tags. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`/addingtags` (3tiff), -:doc:`TIFFMergeFieldInfo` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFStrileQuery.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFStrileQuery.rst.txt deleted file mode 100644 index 0a40bcf..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFStrileQuery.rst.txt +++ /dev/null @@ -1,80 +0,0 @@ -TIFFStrileQuery -=============== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint64_t TIFFGetStrileByteCount(TIFF* tif, uint32_t strile); - -.. c:function:: uint64_t TIFFGetStrileOffset(TIFF* tif, uint32_t strile); - -.. c:function:: uint64_t TIFFGetStrileByteCountWithErr(TIFF* tif, uint32_t strile, int *pbErr); - -.. c:function:: uint64_t TIFFGetStrileOffsetWithErr(TIFF* tif, uint32_t strile, int *pbErr); - -Description ------------ - -Make defer strile offset/bytecount loading available at runtime -and add per-strile offset/bytecount loading capabilities. Part of -this commit makes the behaviour that was previously met when ``libtiff`` -was compiled with ``-DDEFER_STRILE_LOAD`` available for default builds. - -When specifying the new ``D`` (Deferred) :c:func:`TIFFOpen` flag, -the loading of strile offset/bytecount is deferred. -In that mode, the ``StripOffsets`` / ``StripByteCounts`` or -``TileOffsets`` / ``TileByteCounts`` arrays are only loaded when first -accessed. This can speed-up the opening of files stored on the network -when just metadata retrieval is needed. - -Another addition is the capability of loading only the values of -the offset/bytecount of the strile of interest instead of the -whole array. This is enabled with the new ``O`` (Ondemand) flag of -:c:func:`TIFFOpen` (which implies ``D``). - -The public :c:func:`TIFFGetStrileOffset`, :c:func:`TIFFGetStrileOffsetWithErr`, -:c:func:`TIFFGetStrileByteCount` and :c:func:`TIFFGetStrileByteCountWithErr` -functions have been added to API. -They are of particular interest when using sparse files (with -``offset == bytecount == 0``) and you want to detect if a strile is -present or not without decompressing the data, or updating an -existing sparse file. - -:c:func:`TIFFGetStrileByteCount` returns the value of the TileByteCounts / -StripByteCounts array for the specified tile/strile. - -:c:func:`TIFFGetStrileByteCountWithErr` additionally provides *pbErr* -as an *int* pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return. - -:c:func:`TIFFGetStrileOffset` returns the value of the TileOffsets / -StripOffsets array for the specified tile/strile. - -:c:func:`TIFFGetStrileOffsetWithErr` additionally provides *pbErr* -as an *int* pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. -Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. - -Note ----- - -This functionality was introduced with libtiff 4.1. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFDeferStrileArrayWriting` (3tiff) - diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWarning.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWarning.rst.txt deleted file mode 100644 index c5645eb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWarning.rst.txt +++ /dev/null @@ -1,105 +0,0 @@ -TIFFWarning -=========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - #include - -.. c:function:: void TIFFWarning(const char* module, const char* fmt, ...) - -.. c:function:: void TIFFWarningExt(thandle_t fd, const char* module, const char* fmt, ...) - -.. c:function:: void TIFFWarningExtR(TIFF *tif, const char* module, const char* fmt, ...) - -.. c:type:: void (*TIFFWarningHandler)(const char * module, const char* fmt, va_list ap) - -.. c:type:: void (*TIFFWarningHandlerExt)(thandle_t fd, const char* module, const char* fmt, va_list ap) - -.. c:type:: int (*TIFFWarningHandlerExtR)(TIFF* tif, void* user_data, const char* module, const char* fmt, va_list ap) - -.. c:function:: TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler) - -.. c:function:: TIFFWarningHandlerExt TIFFSetWarningHandlerExt(TIFFWarningHandlerExt handler) - -Description ------------ - -:c:func:`TIFFWarning` invokes the library-wide warning handler function -to (normally) write a warning message to the ``stderr``. -The *fmt* parameter is a :c:func:`printf` format string, and any number -arguments can be supplied. The *module* parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which a warning is -detected. - -Applications that desire to capture control in the event of a warning -should use :c:func:`TIFFSetWarningHandler` to override the default -warning handler. A :c:macro:`NULL` (0) warning handler function may be -installed to suppress warning messages. - -Two more application-specific warning handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with a warning message function, i.e. -:c:func:`TIFFWarningExt` and :c:func:`TIFFWarningExtR` if the application -intends to call the handler with those extended parameters. - -:c:func:`TIFFWarningExt` provides a file handle as parameter. -Within ``libtiff`` :c:func:`TIFFWarningExt` is called passing ``tif->tif_clientdata`` -as *fd*, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for :c:func:`TIFFWarningExt` -is setup with :c:func:`TIFFSetWarningHandlerExt`. - -:c:func:`TIFFWarningExtR` (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -warning handler. That means for different TIFF handles, different warning -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -:c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt` -or :c:func:`TIFFClientOpenExt`. -Furthermore, a **custom defined data structure** *user_data* for the -warning handler can be given along. - -Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the -application-specific handler introduced with ``libtiff`` 4.5. - -Note ----- - -Both functions :c:func:`TIFFWarning` and :c:func:`TIFFWarningExt` -each attempt to call both handler functions if they are defined. -First :c:func:`TIFFWarningHandler` is called and then :c:func:`TIFFWarningHandlerExt`. -However, :c:func:`TIFFWarning` passes a "0" as a file handle to -:c:func:`TIFFWarningHandlerExt`. - -:c:func:`TIFFWarningExtR` tries first to call the per-TIFF handle defined -warning handler. If :c:func:`TIFFWarningHandlerExtR` is not defined or -returns 0, :c:func:`TIFFWarningHandler` and then :c:func:`TIFFWarningHandlerExt` -are called. From libtiff 4.5 onwards :c:func:`TIFFWarningExtR` is used -within the ``libtiff`` library. - -Return values -------------- - -:c:func:`TIFFSetWarningHandler` and :c:func:`TIFFSetWarningHandlerExt` -returns a reference to the previous warning handler function. - -:c:func:`TIFFWarningHandlerExtR` returns an integer as "stop" to control the call -of further warning handler functions within :c:func:`TIFFWarningExtR`: - - - 0: both functions :c:func:`TIFFWarningHandler` and :c:func:`TIFFWarningHandlerExt` are called. - - non-zero: no further warning message function is called. - -See also --------- - -:doc:`TIFFError` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`/functions/TIFFOpenOptions`, -:doc:`libtiff` (3tiff), -printf (3) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteDirectory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteDirectory.rst.txt deleted file mode 100644 index 5a2cf0c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteDirectory.rst.txt +++ /dev/null @@ -1,143 +0,0 @@ -TIFFWriteDirectory -================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFWriteDirectory(TIFF* tif) - -.. c:function:: int TIFFRewriteDirectory(TIFF* tif) - -.. c:function:: int TIFFCheckpointDirectory(TIFF* tif) - -.. c:function:: void TIFFSetWriteOffset(TIFF* tif, toff_t off) - -.. c:function:: int TIFFWriteCheck(TIFF* tif, int tiles, const char* module) - -Description ------------ - -:c:func:`TIFFWriteDirectory` will write the contents of the current -directory (IFD) to the file and setup to create a new directory (IFD) -using :c:func:`TIFFCreateDirectory`. -Applications only need to call :c:func:`TIFFWriteDirectory` -when writing multiple subfiles (images) to a single TIFF file. -This is called "multi-page TIFF" or "multi-image TIFF" -(see :doc:`/multi_page`). -:c:func:`TIFFWriteDirectory` is automatically called by -:c:func:`TIFFClose` and :c:func:`TIFFFlush` to write a modified -directory if the file is open for writing. - -The :c:func:`TIFFRewriteDirectory` function operates similarly to -:c:func:`TIFFWriteDirectory`, but can be called with directories -previously read or written that already have an established location -in the file. It will rewrite the directory, but instead of placing it -at its old location (as :c:func:`TIFFWriteDirectory` would, if the size -of the directory has not grown) it will -place them at the end of the file, correcting the pointer from the -preceding directory or file header to point to it's new location. This -is particularly important in cases where the size of the directory and -pointed to data has grown, so it won't fit in the space available at the -old location. - -The :c:func:`TIFFCheckpointDirectory` writes the current state of the -tiff directory into the file to make what is currently in the file -readable. Unlike :c:func:`TIFFWriteDirectory`, -:c:func:`TIFFCheckpointDirectory` does not free up the directory data -structures in memory, so they can be updated (as strips/tiles are -written) and written again. Reading such a partial file you will at -worst get a tiff read error for the first strip/tile encountered that -is incomplete, but you will at least get all the valid data in the file -before that. When the file is complete, just use -:c:func:`TIFFWriteDirectory` as usual to finish it off cleanly. - -The :c:func:`TIFFSetWriteOffset` sets the current write offset for image data -(i.e.pixels). The offset for writing the directory (:ref:`IFD `) -data is not affected. -This should only be used to set the offset to a known previous location -(very carefully), or to 0 so that the next write gets appended to the end -of the file. - -The :c:func:`TIFFWriteCheck` verify file is writable and that the directory -information is setup properly. In doing the latter we also "freeze" -the state of the directory so that important information is not changed. - -Return values -------------- - -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing -the directory contents. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``"Error post-encoding before directory write"``: - - Before writing the contents of the current directory, any pending data are - flushed. This message indicates that an error occurred while doing this. - -``"Error flushing data before directory write"``: - - Before writing the contents of the current directory, any pending data are - flushed. This message indicates that an error occurred while doing this. - -``"Cannot write directory, out of space"``: - - There was not enough space to allocate a temporary area for the directory - that was to be written. - -``"Error writing directory count"``: - - A write error occurred when writing the count of fields in the directory. - -``"Error writing directory contents"``: - - A write error occurred when writing the directory fields. - -``"Error writing directory link"``: - - A write error occurred when writing the link to the next directory. - -``Error writing data for field "%s"``: - - A write error occurred when writing indirect data for the specified field. - -``"Error writing TIFF header"``: - - A write error occurred when re-writing header at the front of the file. - -``"Error fetching directory count"``: - - A read error occurred when fetching the directory count field for - a previous directory. - This can occur when setting up a link to the directory that is being - written. - -``"Error fetching directory link"``: - - A read error occurred when fetching the directory link field for - a previous directory. - This can occur when setting up a link to the directory that is being - written. - -See also --------- - -:doc:`TIFFquery` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFCreateDirectory` (3tiff), -:doc:`TIFFCustomDirectory` (3tiff), -:doc:`TIFFSetDirectory` (3tiff), -:doc:`TIFFReadDirectory` (3tiff), -:doc:`TIFFError` (3tiff), -:doc:`/multi_page`, -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedStrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedStrip.rst.txt deleted file mode 100644 index ffb9184..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedStrip.rst.txt +++ /dev/null @@ -1,80 +0,0 @@ -TIFFWriteEncodedStrip -===================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Compress *size* bytes of raw data from *buf* and write the result to the -specified strip; replacing any previously written data. Note that the -value of *strip* is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. - -The strip number must be valid according to the current settings of the -``ImageLength`` and ``RowsPerStrip`` tags. -An image may be dynamically grown by increasing the value of -``ImageLength`` prior to each call to ``TIFFWriteEncodedStrip``. - -Return values -------------- - --1 is returned if an error was encountered. Otherwise, the value of -*size* is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write scanlines to a tiled image``: - - The image is assumed to be organized in tiles because the - ``TileWidth`` and ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data\fP``: - - The image's width has not be set before the first write. See - :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first - write. See :c:func:`TIFFSetField` for information on how to do - this. - -``%s: No space for strip arrays"``: - - There was not enough space for the arrays that hold strip offsets and - byte counts. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedTile.rst.txt deleted file mode 100644 index 352a97b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteEncodedTile.rst.txt +++ /dev/null @@ -1,76 +0,0 @@ -TIFFWriteEncodedTile -==================== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Compress *size* bytes of raw data from *buf* and **append** the result -to the end of the specified tile. Note that the value of *tile* is a -"raw tile number". That is, the caller must take into account whether -or not the data are organized in separate planes -(``PlanarConfiguration`` = 2). -:c:func:`TIFFComputeTile` automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. - -Return values -------------- - --1 is returned if an error was encountered. Otherwise, the value of -*size* is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write tiles to a stripped image``: - - The image is assumed to be organized in strips because neither of the - ``TileWidth`` or ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not been set before the first write. See - :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for tile arrays"``: - - There was not enough space for the arrays that hold tile offsets and - byte counts. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawStrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawStrip.rst.txt deleted file mode 100644 index 054cac9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawStrip.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -TIFFWriteRawStrip -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32_t strip, void *buf, tmsize_t size) - -Description ------------ - -Append *size* bytes of raw data to the specified strip. - -Notes ------ - -The strip number must be valid according to the current settings of the -``ImageLength`` and ``RowsPerStrip`` tags. -An image may be dynamically grown by increasing the value of -``ImageLength`` prior to each call to :c:func:`TIFFWriteRawStrip`. - -Return values -------------- - --1 is returned if an error occurred. Otherwise, the value of *size* is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write scanlines to a tiled image``: - - The image is assumed to be organized in tiles because the - ``TileWidth`` and ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for strip arrays"``: - - There was not enough space for the arrays that hold strip - offsets and byte counts. - -``%s: Strip %d out of range, max %d``: - - The specified strip is not a valid strip according to the - currently specified image dimensions. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawTile.rst.txt deleted file mode 100644 index 5f4df50..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteRawTile.rst.txt +++ /dev/null @@ -1,67 +0,0 @@ -TIFFWriteRawTile -================ - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFWriteRawTile(TIFF* tif, uint32_t tile, void *buf, tmsize_t size) - -Description ------------ - -Append *size* bytes of raw data to the specified tile. - -Return values -------------- - --1 is returned if an error occurred. Otherwise, the value of *size* is -returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``Can not write tiles to a stripped image``: - - The image is assumed to be organized in strips because neither of the - ``TileWidth`` or ``TileLength`` tags have been set with - :c:func:`TIFFSetField`. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: No space for tile arrays``: - - There was not enough space for the arrays that hold tile offsets and - byte counts. - -``%s: Specified tile %d out of range, max %d``: - - The specified tile is not valid according to the currently specified - image dimensions. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteScanline.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteScanline.rst.txt deleted file mode 100644 index 70988df..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteScanline.rst.txt +++ /dev/null @@ -1,124 +0,0 @@ -TIFFWriteScanline -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFWriteScanline(TIFF* tif, void *buf, uint32_t row, uint16_t sample) - -Description ------------ - -Write data to a file at the specified row. The *sample* parameter is -used only if data are organized in separate planes -(``PlanarConfiguration`` = 2). -The data are assumed to be uncompressed and in the native bit- and -byte-order of the host machine. The data written to the file is -compressed according to the compression scheme of the current -TIFF directory (see further below). If the current scanline is past the -end of the current subfile, the ``ImageLength`` field is automatically -increased to include the scanline (except for ``PlanarConfiguration`` = 2, -where the ``ImageLength`` cannot be changed once the first data are -written). If the ``ImageLength`` is increased, the ``StripOffsets`` -and ``StripByteCounts`` fields are similarly enlarged to reflect data -written past the previous end of image. - -Notes ------ - -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with ``BitsPerSample`` -greater than 8. The library attempts to hide bit-ordering differences -between the image and the native machine by converting data from the -native machine order. - -In C++ the *sample* parameter defaults to 0. - -Once data are written to a file for the current directory, the values of -certain tags may not be altered; see :c:func:`TIFFSetField` for more -information. - -It is not possible to write scanlines to a file that uses a tiled -organization. The routine :c:func:`TIFFIsTiled` can be used to -determine if the file is organized as tiles or strips. - -Return values -------------- - -:c:func:`TIFFWriteScanline` returns -1 if it immediately detects an -error and 1 for a successful write. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -``%s: File not open for writing``: - - The file was opened for reading, not writing. - -``"Can not write scanlines to a tiled image"``: - - An attempt was made to write a scanline to a tiled image. The image - is assumed to be organized in tiles because the ``TileWidth`` and - ``TileLength`` tags have been set with :c:func:`TIFFSetField`. - -``"Compression algorithm does not support random access"``: - - Data was written in a non-sequential order to a file that uses a - compression algorithm and that has ``RowsPerStrip`` greater than one. - That is, data in the image is to be stored in a compressed form, and - with multiple rows packed into a strip. In this case, the library - does not support random access to the data. The data should either be - written as entire strips, sequentially by rows, or the value of - ``RowsPerStrip`` should be set to one. - -``%s: Must set "ImageWidth" before writing data``: - - The image's width has not be set before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``%s: Must set "PlanarConfiguration" before writing data``: - - The organization of data has not be defined before the first write. - See :c:func:`TIFFSetField` for information on how to do this. - -``Can not change "ImageLength" when using separate planes``: - - Separate image planes are being used (``PlanarConfiguration`` = 2), - but the number of rows has not been specified before the first write. - The library supports the dynamic growth of an image only when data - are organized in a contiguous manner (``PlanarConfiguration`` = 1). - -``"%d: Sample out of range, max %d"``: - - The *sample* parameter was greater than the value of the - ``SamplesPerPixel`` tag. - -``%s: No space for strip arrays``: - - There was not enough space for the arrays that hold strip offsets and - byte counts. - -Bugs ----- - -Writing subsampled YCbCR data does not work correctly because, for -``PlanarConfiguration`` = 2 the size of a scanline is not calculated on -a per-sample basis, and for ``PlanarConfiguration`` = 1 the library -does not pack the block-interleaved samples. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteTile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteTile.rst.txt deleted file mode 100644 index bd9f30e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFWriteTile.rst.txt +++ /dev/null @@ -1,51 +0,0 @@ -TIFFWriteTile -============= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -TIFFWriteTile \- encode and write a tile of data to an open TIFF file - -.. c:function:: tmsize_t TIFFWriteTile(TIFF* tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -Description ------------ - -Write the data for the tile *containing* the specified coordinates. The -data in *buf* are (potentially) compressed, and written to the -indicated file, normally being appended to the end of the file. The -buffer must be contain an entire tile of data. Applications should -call the routine :c:func:`TIFFTileSize` to find out the size (in bytes) -of a tile buffer. The *x* and *y* parameters are always used by -:c:func:`TIFFWriteTile`. The *z* parameter is used if the image is -deeper than 1 slice (``ImageDepth`` > 1). -The *sample* parameter is used only if data are organized in separate -planes (``PlanarConfiguration`` = 2). - -Return values -------------- - -:c:func:`TIFFWriteTile` returns -1 if it detects an error; otherwise -the number of bytes in the tile is returned. - -Diagnostics ------------ - -All error messages are directed to the :c:func:`TIFFErrorExtR` routine. - -See also --------- - -:doc:`TIFFtile` (3tiff), -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFWriteScanline` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFbuffer.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFbuffer.rst.txt deleted file mode 100644 index fd6e9aa..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFbuffer.rst.txt +++ /dev/null @@ -1,57 +0,0 @@ -TIFFbuffer -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - - -.. c:function:: int TIFFReadBufferSetup(TIFF* tif, void *buffer, tmsize_t size) -.. c:function:: int TIFFWriteBufferSetup(TIFF* tif, void *buffer, tmsize_t size) - -Description ------------ - -The following routines are provided for client-control of the I/O buffers -used by the library. Applications need never use these routines; they are -provided only for "intelligent clients" that wish to optimize memory usage -and/or eliminate potential copy operations that can occur when working with -images that have data stored without compression. - -:c:func:`TIFFReadBufferSetup` sets up the data buffer used to read raw (encoded) -data from a file. If the specified pointer is :c:macro:`NULL` (zero), then a -buffer of the appropriate size is allocated. Otherwise the caller must guarantee -that the buffer is large enough to hold any individual strip of raw data. -:c:func:`TIFFReadBufferSetup` returns a non-zero value if the setup was successful -and zero otherwise. - -:c:func:`TIFFWriteBufferSetup` sets up the data buffer used to write raw (encoded) -data to a file. If the specified *size* is -1, then the buffer size is selected to -hold a complete tile or strip, or at least 8 kilobytes, whichever is greater. If -the specified *buffer* is :c:macro:`NULL` (zero), then a buffer of the appropriate -size is dynamically allocated. -:c:func:`TIFFWriteBufferSetup` returns a non-zero value if the setup was successful -and zero otherwise. - -Diagnostics ------------ - -``%s: No space for data buffer at scanline %ld``: - - :c:func:`TIFFReadBufferSetup` was unable to dynamically allocate space - for a data buffer. - -``%s: No space for output buffer``: - - :c:func:`TIFFWriteBufferSetup` was unable to dynamically allocate space - for a data buffer. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcodec.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcodec.rst.txt deleted file mode 100644 index d9f658d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcodec.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -TIFFcodec -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const TIFFCodec* TIFFFindCODEC(uint16_t scheme) - -.. c:function:: TIFFCodec* TIFFRegisterCODEC(uint16_t scheme, const char *method, TIFFInitMethod init) - -.. c:function:: void TIFFUnRegisterCODEC(TIFFCodec * codec) - -.. c:function:: int TIFFIsCODECConfigured(uint16_t scheme) - -.. c:function:: TIFFCodec* TIFFGetConfiguredCODECs(uint16_t scheme) - -.. c:function:: int TIFFSetCompressionScheme(TIFF* tif, int scheme) - - -Description ------------ - -:program:`libtiff` supports a variety of compression schemes implemented -by software *codecs*. Each codec adheres to a modular interface that -provides for the decoding and encoding of image data; as well as some -other methods for initialization, setup, cleanup, and the control of -default strip and tile sizes. Codecs are identified by the associated -value of the TIFF ``Compression`` tag; e.g. 5 for LZW compression. - -.. ToDo: Describe functionality of next functions - -:c:func:`TIFFFindCODEC` ?????? - -:c:func:`TIFFUnRegisterCODEC` ????? - -The :c:func:`TIFFRegisterCODEC` routine can be used to augment or -override the set of codecs available to an application. If the -specified *scheme* already has a registered codec then it is -*overridden* and any images with data encoded with this compression -scheme will be decoded using the supplied codec. - -:c:func:`TIFFIsCODECConfigured` returns 1 if the codec is configured -and working. Otherwise 0 will be returned. - -:c:func:`TIFFGetConfiguredCODECs` gets list of configured codecs, -both built-in and registered by user. Function returns array of -:c:type:`TIFFCodec` records (the last record should be NULL) or NULL -if function failed. Caller is responsible to free this structure. - -:c:func:`TIFFSetCompressionScheme` ???? - - -Diagnostics ------------ - -``No space to register compression scheme %s``: - - :c:func:`TIFFRegisterCODEC` was unable to allocate memory for the - data structures needed to register a codec. - -``Cannot remove compression scheme %s; not registered``: - - :c:func:`TIFFUnRegisterCODEC` did not locate the specified codec in - the table of registered compression schemes. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcolor.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcolor.rst.txt deleted file mode 100644 index bf0c237..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFcolor.rst.txt +++ /dev/null @@ -1,218 +0,0 @@ -TIFFcolor -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite) - -.. c:function:: void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *R, uint32_t *G, uint32_t *B) - -.. c:function:: int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *displayw, float *refWhite) - -.. c:function:: void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t L, int32_t a, int32_t b, float *X, float *Y, float *Z) - -.. c:function:: void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *R, uint32_t *G, uint32_t *B) - -Description ------------ - -TIFF supports several color spaces for images stored in that format. There is -usually a problem of application to handle the data properly and convert -between different colorspaces for displaying and printing purposes. To -simplify this task ``libtiff`` implements several color conversion routines -itself. In particular, these routines used in the :doc:`TIFFRGBAImage` -interface. - -:c:func:`TIFFYCbCrToRGBInit` used to initialize *YCbCr* to *RGB* -conversion state. - -.. note:: - The calling program is responsible for allocating and releasing the required - buffer for the structure :c:struct:`TIFFYCbCrToRGB` and its required tables, - pointed to by *ycbcr*. The pointers to these tables are stored in the - structure :c:struct:`TIFFYCbCrToRGB`, which is located at the beginning - of that buffer. Thus, this memory has to be allocated as shown in the example below. - -:c:struct:`TIFFYCbCrToRGB` is defined in :file:`tiffio.h` as: - -:: - - typedef struct { /* YCbCr->RGB support */ - TIFFRGBValue* clamptab; /* range clamping table */ - int* Cr_r_tab; - int* Cb_b_tab; - int32_t* Cr_g_tab; - int32_t* Cb_g_tab; - int32_t* Y_tab; - } TIFFYCbCrToRGB; - -*luma* is a float array of three values representing proportions of the -red, green and blue in luminance, Y (see section 21 of the TIFF 6.0 -specification, where YCbCr images are discussed). -:c:macro:`TIFFTAG_YCBCRCOEFFICIENTS` hold these values in TIFF file. -*refBlackWhite* is a float array of 6 values which specifies a pair of -headroom and footroom image data values (codes) for each image component -(see section 20 of the TIFF 6.0 specification where the colorimetry -fields are discussed). -:c:macro:`TIFFTAG_REFERENCEBLACKWHITE` is responsible for storing these -values in TIFF file. The following code snippet should help to -understand the the technique: - -:: - - float *luma, *refBlackWhite; - uint16_t hs, vs; - - /* Initialize structures */ - TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB*) - _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long)) - + 4*256*sizeof(TIFFRGBValue) - + 2*256*sizeof(int) - + 3*256*sizeof(int32_t)); - if (ycbcr == NULL) { - TIFFError("YCbCr->RGB", - "No space for YCbCr->RGB conversion state"); - exit(0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); - TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite); - if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0) { - exit(0); - } - - /* Start conversion */ - uint32_t r, g, b; - uint32_t Y; - int32_t Cb, Cr; - - for each pixel in image { - TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b); - } - - /* Free state structure */ - _TIFFfree(ycbcr); - -:c:func:`TIFFCIELabToRGBInit` initializes the *CIE L\*a\*b\* 1976* to -*RGB* conversion state. :c:struct:`TIFFCIELabToRGB` is defined as: - -:: - - #define CIELABTORGB_TABLE_RANGE 1500 - - typedef struct { /* CIE Lab 1976->RGB support */ - int range; /* Size of conversion table */ - float rstep, gstep, bstep; - float X0, Y0, Z0; /* Reference white point */ - TIFFDisplay display; - float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ - float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ - float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ - } TIFFCIELabToRGB; - -*display* is a display device description, declared as: - -:: - - typedef struct { - float d_mat[3][3]; /* XYZ -> luminance matrix */ - float d_YCR; /* Light o/p for reference white */ - float d_YCG; - float d_YCB; - uint32_t d_Vrwr; /* Pixel values for ref. white */ - uint32_t d_Vrwg; - uint32_t d_Vrwb; - float d_Y0R; /* Residual light for black pixel */ - float d_Y0G; - float d_Y0B; - float d_gammaR; /* Gamma values for the three guns */ - float d_gammaG; - float d_gammaB; - } TIFFDisplay; - -For example, one can use sRGB device, which has the following parameters: - -:: - - TIFFDisplay display_sRGB = { - { /* XYZ -> luminance matrix */ - { 3.2410F, -1.5374F, -0.4986F }, - { -0.9692F, 1.8760F, 0.0416F }, - { 0.0556F, -0.2040F, 1.0570F } - }, - 100.0F, 100.0F, 100.0F, /* Light o/p for reference white */ - 255, 255, 255, /* Pixel values for ref. white */ - 1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */ - 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */ - }; - -*refWhite* is a color temperature of the reference white. The -:c:macro:`TIFFTAG_WHITEPOINT` contains the chromaticity of the white -point of the image from where the reference white can be calculated -using following formulae: - -:: - - refWhite_Y = 100.0 - - refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y - - refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X - -The conversion itself performed in two steps: at the first one we will convert -*CIE L\*a\*b\* 1976* to *CIE XYZ* using the :c:func:`TIFFCIELabToXYZ` routine, -and at the second step we will convert *CIE XYZ* to *RGB* using -:c:func:`TIFFXYZToRGB`. Look at the code sample below: - -:: - - float *whitePoint; - float refWhite[3]; - - /* Initialize structures */ - img->cielab = (TIFFCIELabToRGB *) - _TIFFmalloc(sizeof(TIFFCIELabToRGB)); - if (!cielab) { - TIFFError("CIE L*a*b*->RGB", - "No space for CIE L*a*b*->RGB conversion state."); - exit(0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint); - refWhite[1] = 100.0F; - refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; - refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1]) - / whitePoint[1] * refWhite[1]; - if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) { - TIFFError("CIE L*a*b*->RGB", - "Failed to initialize CIE L*a*b*->RGB conversion state."); - _TIFFfree(cielab); - exit(0); - } - - /* Now we can start to convert */ - uint32_t r, g, b; - uint32_t L; - int32_t a, b; - float X, Y, Z; - - for each pixel in image { - TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z); - TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b); - } - - /* Don't forget to free the state structure */ - _TIFFfree(cielab); - -See also --------- - -:doc:`TIFFRGBAImage` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFmemory.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFmemory.rst.txt deleted file mode 100644 index 4aec018..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFmemory.rst.txt +++ /dev/null @@ -1,61 +0,0 @@ -TIFFmemory -========== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void *_TIFFmalloc(tmsize_t size) - -.. c:function:: void *_TIFFrealloc(void *buffer, tmsize_t size) - -.. c:function:: void _TIFFfree(void *buffer) - -.. c:function:: void _TIFFmemset(void *s, int c, tmsize_t n) - -.. c:function:: void _TIFFmemcpy(void *dest, const void *src, tmsize_t n) - -.. c:function:: int _TIFFmemcmp(const void *s1, const void *s2, tmsize_t n) - -.. c:function:: void* _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) - -.. c:function:: void* _TIFFCheckRealloc(TIFF* tif, void* buffer, tmsize_t nmemb, tmsize_t elem_size, const char* what) - -Description ------------ - -These routines are provided for writing portable software that uses -:program:`libtiff`; they hide any memory-management related issues, such as -dealing with segmented architectures found on 16-bit machines. - -:c:func:`_TIFFmalloc` and :c:func:`_TIFFrealloc` are used to dynamically -allocate and reallocate memory used by :program:`libtiff`; such as memory -passed into the I/O routines. Memory allocated through these interfaces is -released back to the system using the :c:func:`_TIFFfree` routine. - -Memory allocated through one of the above interfaces can be set to a known -value using :c:func:`_TIFFmemset`, copied to another memory location using -:c:func:`_TIFFmemcpy`, or compared for equality using :c:func:`_TIFFmemcmp`. -These routines conform to the equivalent C routines: -:c:func:`memset`, :c:func:`memcpy`, :c:func:`memcmp`, respectively. - -:c:func:`_TIFFCheckMalloc` and :c:func:`_TIFFCheckRealloc` are checking for -integer overflow before calling :c:func:`_TIFFmalloc` and :c:func:`_TIFFrealloc`, -respectively. - -Diagnostics ------------ - -None. - -See also --------- - -malloc (3), -memory (3), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFquery.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFquery.rst.txt deleted file mode 100644 index e18dec8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFquery.rst.txt +++ /dev/null @@ -1,150 +0,0 @@ -TIFFquery -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tdir_t TIFFCurrentDirectory(TIFF* tif) - -.. c:function:: uint64_t TIFFCurrentDirOffset(TIFF* tif) - -.. c:function:: int TIFFLastDirectory(TIFF* tif) - -.. c:function:: tdir_t TIFFNumberOfDirectories(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentRow(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentStrip(TIFF* tif) - -.. c:function:: uint32_t TIFFCurrentTile(TIFF* tif) - -.. c:function:: int TIFFFileno(TIFF* tif) - -.. c:function:: char* TIFFFileName(TIFF* tif) - -.. c:function:: int TIFFGetMode(TIFF* tif) - -.. c:function:: int TIFFIsTiled(TIFF* tif) - -.. c:function:: int TIFFIsBigEndian(TIFF* tif) - -.. c:function:: int TIFFIsBigTIFF(TIFF* tif) - -.. c:function:: int TIFFIsByteSwapped(TIFF* tif) - -.. c:function:: int TIFFIsMSB2LSB(TIFF* tif) - -.. c:function:: int TIFFIsUpSampled(TIFF* tif) - -.. c:function:: const char* TIFFGetVersion(void) - -Description ------------ - -The following query routines return status information about the directory -structure of an open TIFF file. - -:c:func:`TIFFCurrentDirectory` returns the index of the current -:ref:`Image File Directory (IFD) `. -Directories are numbered starting at 0. This number is suitable for -use with the :c:func:`TIFFSetDirectory` routine. -There are :ref:`IFDs ` in the file and an "active" -:ref:`IFD ` in memory, from which fields -are "set" and "get". The index of the current directory returned is: - -a) 65535 (non-existing directory) if there is no IFD in the file after opening, - or the state is unknown, - or the last read (i.e. TIFFFetchDirectory()) failed, - or a custom directory was written. -b) IFD index of last IFD written in the file. - In this case the active IFD is a new (empty) one and the current directory offset - from TIFFCurrentDirOffset() is zero. - If writing fails, the IFD index is not changed. -c) IFD index of IFD read from file into memory (=active IFD), - even if IFD is corrupt and TIFFReadDirectory() returns 0. - Then the current directory offset is the offset of the IFD in the file. -d) IFD index „0“, whenever a custom directory or an unchained SubIFD - was read. - -:c:func:`TIFFCurrentDirOffset` returns the file offset of the current -directory (instead of an index). -The file offset is suitable for use with the :c:func:`TIFFSetSubDirectory` -routine. This is required for accessing subdirectories linked through a -``SubIFD`` tag. See also :ref:`SubIFD access `. - -:c:func:`TIFFLastDirectory` returns a non-zero value if the current -directory is the last directory in the file; otherwise zero is returned. -A new (empty) directory in the memory (after :c:func:`TIFFWriteDirectory` -or :c:func:`TIFFCreateDirectory`) -also counts as the last directory, even if it has not yet been written to a file. - -:c:func:`TIFFNumberOfDirectories` returns the number of directories in a -file. Be aware that just created directories, which are not "written" to -file do not count. - -.. note:: Be aware that the return value of the above directory query functions - is not valid until the directory is "written" to file AND read back - e.g. :c:func:`TIFFSetDirectory` or :c:func:`TIFFReadDirectory`. - -The following query routines return information about an open TIFF file -and its image data. - -:c:func:`TIFFCurrentRow`, :c:func:`TIFFCurrentStrip`, and -:c:func:`TIFFCurrentTile` return the current row, strip, and tile, -respectively, that is being read or written. These values are updated each -time a read or write is done. - -:c:func:`TIFFFileno` returns the underlying file descriptor used to access -the TIFF image in the filesystem. - -:c:func:`TIFFFileName` returns the pathname argument passed to -:c:func:`TIFFOpen` or :c:func:`TIFFFdOpen`. - -:c:func:`TIFFGetMode` returns the mode with which the underlying file -was opened. On UNIX systems, this is the value passed to the -:c:func:`open` (2) system call. - -:c:func:`TIFFIsTiled` returns a non-zero value if the image data has a tiled -organization. Zero is returned if the image data is organized in strips. - -:c:func:`TIFFIsBigEndian` returns a non-zero value if the file is BigEndian -and zero if the file is LittleEndian. - -:c:func:`TIFFIsBigTIFF` returns a non-zero value if the file is in -BigTIFF style. - - -:c:func:`TIFFIsByteSwapped` returns a non-zero value if the image data -was in a different byte-order than the host machine. Zero is returned if -the TIFF file and local host byte-orders are the same. Note that -:c:func:`TIFFReadTile`, :c:func:`TIFFReadEncodedStrip` and -:c:func:`TIFFReadScanline` functions already normally perform byte -swapping to local host order if needed. - -:c:func:`TIFFIsMSB2LSB` returns a non-zero value if the image data is being -returned with bit 0 as the most significant bit. - -:c:func:`TIFFIsUpSampled` returns a non-zero value if image data returned -through the read interface routines is being up-sampled. This can be -useful to applications that want to calculate I/O buffer sizes to reflect -this usage (though the usual strip and tile size routines already do this). - -:c:func:`TIFFGetVersion` returns an ``ASCII`` string that has a version -stamp for the TIFF library software. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff), -:doc:`TIFFOpen` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFsize.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFsize.rst.txt deleted file mode 100644 index 3799ab5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFsize.rst.txt +++ /dev/null @@ -1,51 +0,0 @@ -TIFFsize -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: tmsize_t TIFFRasterScanlineSize(TIFF* tif) - -.. c:function:: uint64_t TIFFRasterScanlineSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFScanlineSize(TIFF* tif) - -.. c:function:: uint64_t TIFFScanlineSize64(TIFF* tif) - -Description ------------ - -:c:func:`TIFFScanlineSize` returns the size in bytes of a row of data as -it would be returned in a call to :c:func:`TIFFReadScanline`, or as it -would be expected in a call to :c:func:`TIFFWriteScanline`. -Note that this number may be 1/samples-per-pixel if data is -stored as separate planes. -The `ScanlineSize` in case of YCbCrSubsampling is defined as the -strip size divided by the strip height, i.e. the size of a pack of vertical -subsampling lines divided by vertical subsampling. It should thus make -sense when multiplied by a multiple of vertical subsampling. -:c:func:`TIFFScanlineSize64` returns the size as :c:type:`uint64_t`. - -:c:func:`TIFFRasterScanlineSize` returns the size in bytes of a complete -decoded and packed raster scanline. Note that this value may be different -from the value returned by :c:func:`TIFFScanlineSize` if data is stored -as separate planes. -:c:func:`TIFFRasterScanlineSize64` returns the size as :c:type:`uint64_t`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFOpen` (3tiff), -:doc:`TIFFReadScanline` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFstrip.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFstrip.rst.txt deleted file mode 100644 index a02bbcc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFstrip.rst.txt +++ /dev/null @@ -1,94 +0,0 @@ -TIFFstrip -========= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t TIFFDefaultStripSize(TIFF* tif, uint32_t estimate) - -.. c:function:: tmsize_t TIFFStripSize(TIFF* tif) - -.. c:function:: uint64_t TIFFStripSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFVStripSize(TIFF* tif, uint32_t nrows) - -.. c:function:: uint64_t TIFFVStripSize64(TIFF* tif, uint32_t nrows) - -.. c:function:: tmsize_t TIFFRawStripSize(TIFF* tif, uint32_t strip) - -.. c:function:: uint64_t TIFFRawStripSize64(TIFF* tif, uint32_t strip) - -.. c:function:: uint32_t TIFFComputeStrip(TIFF* tif, uint32_t row, uint16_t sample) - -.. c:function:: uint32_t TIFFNumberOfStrips(TIFF* tif) - -.. c:function:: int TIFFSetupStrips(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDefaultStripSize` returns the number of rows for a -reasonable-sized strip according to the current settings of the -``ImageWidth``, ``BitsPerSample`` and ``SamplesPerPixel``, -tags and any compression-specific requirements. If the *estimate* -parameter, sf non-zero, then it is taken as an estimate of the desired strip -size and adjusted according to any compression-specific requirements. The -value returned by this function is typically used to define the -``RowsPerStrip`` tag. In lieu of any unusual requirements -``TIFFDefaultStripSize`` tries to create strips that have approximately -8 kilobytes of uncompressed data. - -:c:func:`TIFFStripSize` returns the equivalent size for a strip of data -as it would be returned in a call to :c:func:`TIFFReadEncodedStrip` -or as it would be expected in a call to :c:func:`TIFFWriteEncodedStrip`. -If an error occurs, 0 is returned. - -:c:func:`TIFFStripSize64` returns the equivalent size for a strip of data -as :c:type:`uint64_t`. -If an error occurs, 0 is returned. - -:c:func:`TIFFVStripSize` returns the number of bytes in a strip with -*nrows* rows of data. -If an error occurs, 0 is returned. - -:c:func:`TIFFVStripSize64` returns the number of bytes in a strip with -*nrows* rows of data as :c:type:`uint64_t`. -If an error occurs, 0 is returned. - -:c:func:`TIFFRawStripSize` returns the number of bytes in a raw strip -(i.e. not decoded). -If an error occurs, 0xFFFFFFFF `(=(tmsize_t(-1))` is returned. - -:c:func:`TIFFRawStripSize64` returns the number of bytes in a raw strip -as :c:type:`uint64_t`. -If an error occurs, 0xFFFFFFFF `(=(uint64_t(-1))` is returned. - -:c:func:`TIFFComputeStrip` returns the strip that contains the specified -coordinates. A valid strip is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The *row* parameter is -always used in calculating a strip. The *sample* parameter is used only -if data are organized in separate planes (``PlanarConfiguration`` = 2). - -:c:func:`TIFFNumberOfStrips` returns the number of strips in the image. - -:c:func:`TIFFSetupStrips` setup or reset strip parameters and strip array memory. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFReadEncodedStrip` (3tiff), -:doc:`TIFFReadRawStrip` (3tiff), -:doc:`TIFFWriteEncodedStrip` (3tiff), -:doc:`TIFFWriteRawStrip` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFswab.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFswab.rst.txt deleted file mode 100644 index 0a61def..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFswab.rst.txt +++ /dev/null @@ -1,78 +0,0 @@ -TIFFswab -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: const unsigned char* TIFFGetBitRevTable(int reversed) - -.. c:function:: void TIFFReverseBits(u_char* data, unsigned long nbytes) - -.. c:function:: void TIFFSwabShort(uint16_t* data) - -.. c:function:: void TIFFSwabLong(uint32_t* data) - -.. c:function:: void TIFFSwabLong8(uint64_t* lp) - -.. c:function:: void TIFFSwabFloat(float* fp) - -.. c:function:: void TIFFSwabDouble(double *dp) - -.. c:function:: void TIFFSwabArrayOfShort(uint16_t* wp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfTriples(uint8_t* tp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfLong(uint32_t* lp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfLong8(uint64_t* lp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfFloat(float* fp, tmsize_t n) - -.. c:function:: void TIFFSwabArrayOfDouble(double* dp, tmsize_t n) - -Description ------------ - -The following routines are used by the library to swap 16-, 32- and 64-bit -data and to reverse the order of bits in bytes. - -:c:func:`TIFFSwabShort` and :c:func:`TIFFSwabLong` and :c:func:`TIFFSwabFloat` -swap the bytes in a single 16- and 32-bit item, respectively. - -:c:func:`TIFFSwabLong8` and :c:func:`TIFFSwabDouble` -swap the bytes in a single 64-bit item. - -:c:func:`TIFFSwabArrayOfTriples` swap the first and the third byte of -each triple (three bytes) within the byte array. The second byte of each -triple stays untouched. - -:c:func:`TIFFSwabArrayOfShort` and :c:func:`TIFFSwabArrayOfLong`, -:c:func:`TIFFSwabArrayOfFloat` swap the bytes in an array of 16- and 32-bit -items, respectively. - -:c:func:`TIFFSwabArrayOfLong8` and :c:func:`TIFFSwabArrayOfDouble` -swap the bytes in an array of 64-bit items. - -:c:func:`TIFFReverseBits` replaces each byte in *data* with the -equivalent bit-reversed value. This operation is performed with a -lookup table, which is returned using the :c:func:`TIFFGetBitRevTable` -function. The *reversed* parameter specifies which table should be -returned. Supply *1* if you want bit reversal table. Supply *0* to get -the table that do not reverse bit values. It is a lookup table that can -be used as an "identity function"; i.e. :c:expr:`TIFFNoBitRevTable[n] == n`. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFtile.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFtile.rst.txt deleted file mode 100644 index fac3267..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/TIFFtile.rst.txt +++ /dev/null @@ -1,93 +0,0 @@ -TIFFtile -======== - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: void TIFFDefaultTileSize(TIFF* tif, uint32_t* tw, uint32_t* th) - -.. c:function:: tmsize_t TIFFTileSize(TIFF* tif) - -.. c:function:: uint64_t TIFFTileSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFTileRowSize(TIFF* tif) - -.. c:function:: uint64_t TIFFTileRowSize64(TIFF* tif) - -.. c:function:: tmsize_t TIFFVTileSize(TIFF* tif, uint32_t nrows) - -.. c:function:: uint64_t TIFFVTileSize64(TIFF* tif, uint32_t nrows) - -.. c:function:: uint32_t TIFFComputeTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -.. c:function:: int TIFFCheckTile(TIFF* tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) - -.. c:function:: uint32_t TIFFNumberOfTiles(TIFF* tif) - -Description ------------ - -:c:func:`TIFFDefaultTileSize` returns the pixel width and height of a -reasonable-sized tile; suitable for setting up the ``TileWidth`` and -``TileLength`` tags. If the *tw* and *th* values passed in are -non-zero, then they are adjusted to reflect any compression-specific -requirements. The returned width and height are constrained to be a -multiple of 16 pixels to conform with the TIFF specification. - -:c:func:`TIFFTileSize` returns the equivalent size for a tile of data -as it would be returned in a call to :c:func:`TIFFReadTile` or as it -would be expected in a call to :c:func:`TIFFWriteTile`. -:c:func:`TIFFTileSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFVTileSize` returns the number of bytes in a row-aligned -tile with *nrows* of data. -:c:func:`TIFFVTileSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFTileRowSize` returns the number of bytes of a row of data -in a tile. -:c:func:`TIFFTileRowSize64` returns a :c:type:`uint64_t` number. -If an error occurs, 0 is returned. - -:c:func:`TIFFComputeTile` returns the tile that contains the specified -coordinates. A valid tile is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The *x* and *y* -parameters are always used in calculating a tile. The *z* -parameter is used if the image is deeper than 1 slice -(``ImageDepth`` > 1). -The *sample* parameter is used only if data are organized in separate -planes (``PlanarConfiguration`` = 2). - -:c:func:`TIFFCheckTile` returns a non-zero value if the supplied -coordinates are within the bounds of the image and zero otherwise. The -*x* parameter is checked against the value of the ``ImageWidth`` tag. -The *y* parameter is checked against the value of the ``ImageLength`` -tag. The *z* parameter is checked against the value of the -``ImageDepth`` tag (if defined). The *sample* parameter is checked -against the value of the ``SamplesPerPixel`` parameter if the data are -organized in separate planes. - -:c:func:`TIFFNumberOfTiles` returns the number of tiles in the image. - -Diagnostics ------------ - -None. - -See also --------- - -:doc:`TIFFReadEncodedTile` (3tiff), -:doc:`TIFFReadRawTile` (3tiff), -:doc:`TIFFReadTile` (3tiff), -:doc:`TIFFWriteEncodedTile` (3tiff), -:doc:`TIFFWriteRawTile` (3tiff), -:doc:`TIFFWriteTile` (3tiff), -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFRewriteField.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFRewriteField.rst.txt deleted file mode 100644 index 0f4575b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFRewriteField.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -_TIFFRewriteField -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: int _TIFFRewriteField(TIFF* tif, uint16_t tag, TIFFDataType in_datatype, tmsize_t count, void* data) - -Description ------------ - -:c:func:`_TIFFRewriteField` -Rewrite a field in the directory on disk without regard to updating the -TIFF directory structure in memory. Currently only supported for field -that already exist in the on-disk directory. -Mainly used for updating stripoffset / stripbytecount values after -the directory is already on disk. - -Return values -------------- - -Returns zero on failure, and one on success. - -See also --------- - -:doc:`libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFauxiliary.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFauxiliary.rst.txt deleted file mode 100644 index 46f9a19..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/_TIFFauxiliary.rst.txt +++ /dev/null @@ -1,34 +0,0 @@ -_TIFFauxiliary -================= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. c:function:: uint32_t _TIFFClampDoubleToUInt32(double val) - -.. c:function:: uint32_t _TIFFMultiply32(TIFF* tif, uint32_t first, uint32_t second, const char* where) - -.. c:function:: uint64_t _TIFFMultiply64(TIFF* tif, uint64_t first, uint64_t second, const char* where) - -Description ------------ - -:c:func:`_TIFFClampDoubleToUInt32` clamps double values into the range -of :c:type:`uint32_t` (i.e. 0 .. 0xFFFFFFFF) - -:c:func:`_TIFFMultiply32` and :c:func:`_TIFFMultiply64` checks for -an integer overflow of the multiplication result and return the multiplication -result or `0` if an overflow would happen. -The string `where` is printed in the error message in case an overflow -happens and can be used to indicate where the function was called. - -See also --------- - -:doc:`libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/functions/libtiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/functions/libtiff.rst.txt deleted file mode 100644 index bfc13bc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/functions/libtiff.rst.txt +++ /dev/null @@ -1,856 +0,0 @@ -libtiff -======= - -Synopsis --------- - -.. highlight:: c - -:: - - #include - -.. highlight:: shell - -:: - - cc file.c -ltiff - -Description ------------ - -:program:`libtiff` is a library for reading and writing data files encoded with the -*"Tag Image File"* format, Revision 6.0 (or revision 5.0 or revision 4.0). This file -format is suitable for archiving multi-color and monochromatic image data. - -The library supports several compression algorithms, as indicated by the -``Compression`` field, including: -no compression (1), -CCITT 1D Huffman compression (2), -CCITT Group 3 Facsimile compression (3), -CCITT Group 4 Facsimile compression (4), -Lempel-Ziv & Welch compression (5), -baseline JPEG compression (7), -word-aligned 1D Huffman compression (32771), -PackBits compression (32773). -In addition, several nonstandard compression algorithms are supported: the -4-bit compression algorithm used by the -*ThunderScan* program (32809) (decompression only), -NeXT's 2-bit compression algorithm (32766) (decompression only), -an experimental LZ-style algorithm known as Deflate (32946), -and an experimental CIE LogLuv compression scheme designed -for images with high dynamic range (32845 for LogL and 32845 for LogLuv). -Directory information may be in either little- or big-endian byte order; byte -swapping is automatically done by the library. Data bit ordering may be either -Most Significant Bit (``MSB``) to Least Significant Bit (``LSB``) or -LSB to MSB. -Finally, the library does not support files in which the -``BitsPerSample`` , -``Compression`` , -``MinSampleValue`` , -or -``MaxSampleValue`` -fields are defined differently on a per-sample basis -(in Rev. 6.0 the -``Compression`` -tag is not defined on a per-sample basis, so this is immaterial). - -.. _DataTypes: - -Data types ----------- - -The library makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. -The following typedefs are exposed to users either through function -definitions or through parameters passed through the varargs interfaces. - -.. highlight:: c - -:: - - typedef int64_t tmsize_t; /* signed size type (int32_t on 32-bit platforms) */ - typedef void* thandle_t; /* client data handle */ - typedef uint64_t toff_t; /* file offset */ - typedef uint32_t tdir_t; /* directory index */ - -The following typedefs are deprecated and should be replaced by their -defining counterparts. - -.. highlight:: c - -:: - - typedef uint32_t ttag_t; /* directory tag */ - typedef uint16_t tsample_t; /* sample number */ - typedef uint32_t tstrile_t; /* strip or tile number */ - typedef tstrile_t tstrip_t; /* strip number */ - typedef tstrile_t ttile_t; /* tile number */ - typedef tmsize_t tsize_t; /* i/o size in bytes */ - typedef void *tdata_t; /* image data ref */ - -Note that -:c:type:`tstrip_t`, -:c:type:`ttile_t`, -and -:c:type:`tsize_t` -are constrained to be no more than 32-bit quantities by 32-bit fields they are -stored in in the -TIFF -image. -Likewise -:c:type:`tsample_t` -is limited by the 16-bit field used to store the -``SamplesPerPixel`` -tag. - -:c:type:`tdir_t` -constrains the maximum number of -IFDs -that may appear in an image and may be an arbitrary size (w/o penalty). -Starting with libtiff 4.5.0, tdir_t is a 32-bit unsigned integer. Previously, -it was a 16-bit unsigned integer. - -:c:type:`ttag_t` -must be either int, unsigned int, pointer, or double because the library uses -a varargs interface and -C restricts the type of the parameter before an ellipsis to be a promoted type. -:c:type:`toff_t` -is defined as :c:type:`uint64_t` because TIFF file offsets are (unsigned) 32-bit -quantities, and BigTIFF file offsets are unsigned 64-bit quantities. -A signed value is used because some interfaces return -1 on -error. Finally, note that user-specified data references are passed as opaque -handles and only cast at the lowest layers where their type is presumed. - -.. TODO: Check why this toff_t was switched to unsigned and update description. - -.. _List_of_routines: - -List of routines ----------------- - -The following routines are part of the library. Consult specific manual pages -for details on their operation; on most systems doing :command:`man function-name` -will work. - -.. list-table:: *Libtiff functions* - :widths: 5 20 - :header-rows: 1 - - * - Name - - Description - * - :c:func:`TIFFAccessTagMethods` - - provides read/write access to the TIFFTagMethods within the TIFF structure - to application code without giving access to the private TIFF structure - * - :c:func:`TIFFCheckpointDirectory` - - writes the current state of the directory - * - :c:func:`TIFFCheckTile` - - very x,y,z,sample is within image - * - :c:func:`TIFFCIELabToRGBInit` - - initialize CIE L*a*b* 1976 to RGB conversion state - * - :c:func:`TIFFCIELabToXYZ` - - perform CIE L*a*b* 1976 to CIE XYZ conversion - * - :c:func:`TIFFCleanup` - - auxiliary function to free the TIFF structure - * - :c:func:`TIFFClientdata` - - return open file's clientdata handle, which represents - the file descriptor used within ``libtiff``. - * - :c:func:`TIFFClientOpen` - - open a file for reading or writing - * - :c:func:`TIFFClientOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFClose` - - close a previously opened TIFF file - * - :c:func:`TIFFComputeStrip` - - return strip containing y,sample - * - :c:func:`TIFFComputeTile` - - return tile containing x,y,z,sample - * - :c:func:`TIFFCreateCustomDirectory` - - setup for a *custom* directory in a open TIFF file - * - :c:func:`TIFFCreateDirectory` - - setup for a directory in a open TIFF file - * - :c:func:`TIFFCreateEXIFDirectory` - - setup for a *EXIF* custom directory in a open TIFF file within a TIFF tag - * - :c:func:`TIFFCreateGPSDirectory` - - setup for a *GPS* custom directory in a open TIFF file within a TIFF tag - * - :c:func:`TIFFCurrentDirectory` - - return index of current directory - * - :c:func:`TIFFCurrentDirOffset` - - return file offset of the current directory (instead of an index) - * - :c:func:`TIFFCurrentRow` - - return index of current scanline - * - :c:func:`TIFFCurrentStrip` - - return index of current strip - * - :c:func:`TIFFCurrentTile` - - return index of current tile - * - :c:func:`TIFFDataWidth` - - return the size of TIFF data types - * - :c:func:`TIFFDefaultStripSize` - - return number of rows for a reasonable-sized strip according to the - current settings of the ImageWidth, BitsPerSample and SamplesPerPixel, - tags and any compression-specific requirements - * - :c:func:`TIFFDefaultTileSize` - - return pixel width and height of a reasonable-sized tile; - suitable for setting up the TileWidth and TileLength tags - * - :c:func:`TIFFDeferStrileArrayWriting` - - is an advanced writing function to control when/where the - [Strip/Tile][Offsets/ByteCounts] arrays are written into the file, - and must be used in a particular sequence together with - TIFFForceStrileArrayWriting() (see description) - * - :c:func:`TIFFError` - - library-wide error handling function printing to ``stderr`` - * - :c:func:`TIFFErrorExt` - - user-specific library-wide error handling function that can be passed - a file handle, which is set to the open TIFF file within ``libtiff`` - * - :c:func:`TIFFErrorExtR` - - user-specific re-entrant library error handling function, - to which its TIFF structure is passed - containing the pointer to a user-specific data object - * - :c:func:`TIFFFdOpen` - - open a file for reading or writing - * - :c:func:`TIFFFdOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFFieldDataType` - - get data type from field information - * - :c:func:`TIFFFieldIsAnonymous` - - returns if field was unknown to ``libtiff`` and has been auto-registered - * - :c:func:`TIFFFieldName` - - get field name from field information - * - :c:func:`TIFFFieldPassCount` - - get whether to pass a value count to Get/SetField - * - :c:func:`TIFFFieldReadCount` - - get number of values to be read from field - * - :c:func:`TIFFFieldSetGetCountSize` - - returns size of ``count`` parameter of :c:func:`TIFFSetField` and - :c:func:`TIFFGetField` - * - :c:func:`TIFFFieldSetGetSize` - - return data size in bytes of the field data type used for ``libtiff`` - internal storage. - * - :c:func:`TIFFFieldTag` - - get tag value from field information - * - :c:func:`TIFFFieldWithName` - - get field information given field name - * - :c:func:`TIFFFieldWithTag` - - get field information given tag - * - :c:func:`TIFFFieldWriteCount` - - get number of values to be written to field - * - :c:func:`TIFFFileName` - - return name of open file - * - :c:func:`TIFFFileno` - - return open file descriptor - * - :c:func:`TIFFFindCODEC` - - find standard codec for the specific scheme - * - :c:func:`TIFFFindField` - - get field information given tag and data type - * - :c:func:`TIFFFlush` - - flush all pending writes - * - :c:func:`TIFFFlushData` - - flush pending data writes - * - :c:func:`TIFFForceStrileArrayWriting` - - is an advanced writing function that writes the - [Strip/Tile][Offsets/ByteCounts] arrays at the end of the file (see description) - * - :c:func:`TIFFFreeDirectory` - - release storage associated with a directory - * - :c:func:`TIFFGetBitRevTable` - - return bit reversal table - * - :c:func:`TIFFGetClientInfo` - - returns a pointer to the data of the named entry in the clientinfo-list - * - :c:func:`TIFFGetCloseProc` - - returns a pointer to file close method - * - :c:func:`TIFFGetConfiguredCODECs` - - gets list of configured codecs, both built-in and registered by user - * - :c:func:`TIFFGetField` - - return tag value in current directory - * - :c:func:`TIFFGetFieldDefaulted` - - return tag value in current directory with default value set if the - value is not already set and a default is defined - * - :c:func:`TIFFGetMapFileProc` - - returns a pointer to memory mapping method - * - :c:func:`TIFFGetMode` - - return open file mode - * - :c:func:`TIFFGetReadProc` - - returns a pointer to file read method - * - :c:func:`TIFFGetSeekProc` - - returns a pointer to file seek method - * - :c:func:`TIFFGetSizeProc` - - returns a pointer to file size requesting method - * - :c:func:`TIFFGetStrileByteCount` - - return value of the TileByteCounts/StripByteCounts array for the - specified tile/strile - * - :c:func:`TIFFGetStrileByteCountWithErr` - - same as `TIFFGetStrileByteCount()` and additionally provides an error return - * - :c:func:`TIFFGetStrileOffset` - - return value of the TileOffsets/StripOffsets array for the specified tile/strile - * - :c:func:`TIFFGetStrileOffsetWithErr` - - same as `TIFFGetStrileOffset()` and additionally provides an error return - * - :c:func:`TIFFGetTagListCount` - - return number of entries in the custom tag list - * - :c:func:`TIFFGetTagListEntry` - - return tag number of the (n.th - 1) entry within the custom tag list - * - :c:func:`TIFFGetUnmapFileProc` - - returns a pointer to memory unmapping method - * - :c:func:`TIFFGetVersion` - - return library version string - * - :c:func:`TIFFGetWriteProc` - - returns a pointer to file write method - * - :c:func:`TIFFIsBigEndian` - - returns a non-zero value if the file is BigEndian and zero if the file is - LittleEndian - * - :c:func:`TIFFIsBigTIFF` - - returns a non-zero value if the file is in BigTIFF style - * - :c:func:`TIFFIsByteSwapped` - - return true if image data is byte-swapped - * - :c:func:`TIFFIsCODECConfigured` - - check, whether we have working codec - * - :c:func:`TIFFIsMSB2LSB` - - return true if image data is being returned with bit 0 as the most significant bit - * - :c:func:`TIFFIsTiled` - - return true if image data is tiled - * - :c:func:`TIFFIsUpSampled` - - returns a non-zero value if image data returned through the read interface - Routines is being up-sampled - * - :c:func:`TIFFLastDirectory` - - returns a non-zero value if the current directory is the last directory - in the file; otherwise zero is returned - * - :c:func:`TIFFMergeFieldInfo` - - adds application defined TIFF tags to the list of known ``libtiff`` tags - * - :c:func:`TIFFNumberOfDirectories` - - return number of directories in a file - * - :c:func:`TIFFNumberOfStrips` - - return number of strips in an image - * - :c:func:`TIFFNumberOfTiles` - - return number of tiles in an image - * - :c:func:`TIFFOpen` - - open a file for reading or writing - * - :c:func:`TIFFOpenExt` - - open a file for reading or writing with options, - such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFOpenW` - - opens a TIFF file with a Unicode filename, for read/writing - * - :c:func:`TIFFOpenWExt` - - opens a TIFF file with a Unicode filename, for read/writing - with options, such as re-entrant error and warning handlers may be passed - * - :c:func:`TIFFOpenOptionsAlloc` - - allocates memory for :c:type:`TIFFOpenOptions` opaque structure - * - :c:func:`TIFFOpenOptionsFree` - - releases the allocated memory for :c:type:`TIFFOpenOptions` - * - :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` - - limits the maximum single memory allocation within ``libtiff`` - * - :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` - - limits the maximum cumulated memory allocation within ``libtiff`` - * - :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` - - setup of a user-specific and per-TIFF handle (re-entrant) error handler - * - :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` - - setup of a user-specific and per-TIFF handle (re-entrant) warning handler - * - :c:func:`TIFFPrintDirectory` - - print description of the current directory - * - :c:func:`TIFFRasterScanlineSize` - - returns the size in bytes of a complete decoded and packed raster scanline - * - :c:func:`TIFFRasterScanlineSize64` - - return size as :c:type:`uint64_t` - * - :c:func:`TIFFRawStripSize` - - return number of bytes in a raw strip - * - :c:func:`TIFFRawStripSize64` - - return number of bytes in a raw strip as :c:type:`uint64_t` - * - :c:func:`TIFFReadBufferSetup` - - specify i/o buffer for reading - * - :c:func:`TIFFReadCustomDirectory` - - read the custom directory from the given offset - and set the context of the TIFF-handle tif to that custom directory - * - :c:func:`TIFFReadDirectory` - - read the next directory - * - :c:func:`TIFFReadEncodedStrip` - - read and decode a strip of data - * - :c:func:`TIFFReadEncodedTile` - - read and decode a tile of data - * - :c:func:`TIFFReadEXIFDirectory` - - read the EXIF directory from the given offset - and set the context of the TIFF-handle tif to that EXIF directory - * - :c:func:`TIFFReadFromUserBuffer` - - replaces the use of :c:func:`TIFFReadEncodedStrip` / :c:func:`TIFFReadEncodedTile` - when the user can provide the buffer for the input data - * - :c:func:`TIFFReadGPSDirectory` - - read the GPS directory from the given offset - and set the context of the TIFF-handle tif to that GPS directory - * - :c:func:`TIFFReadRawStrip` - - read a raw strip of data - * - :c:func:`TIFFReadRawTile` - - read a raw tile of data - * - :c:func:`TIFFReadRGBAImage` - - read an image into a fixed format raster - * - :c:func:`TIFFReadRGBAImageOriented` - - works like :c:func:`TIFFReadRGBAImage` except that the user can specify - the raster origin position - * - :c:func:`TIFFReadRGBAStrip` - - reads a single strip of a strip-based image into memory, storing the - result in the user supplied RGBA raster - * - :c:func:`TIFFReadRGBAStripExt` - - same as :c:func:`TIFFReadRGBAStrip` but providing the parameter `stop_on_error` - * - :c:func:`TIFFReadRGBATile` - - reads a single tile of a tile-based image into memory, storing the - result in the user supplied RGBA raster - * - :c:func:`TIFFReadRGBATileExt` - - same as :c:func:`TIFFReadRGBATile` but providing the parameter `stop_on_error` - * - :c:func:`TIFFReadScanline` - - read and decode a row of data - * - :c:func:`TIFFReadTile` - - read and decode a tile of data - * - :c:func:`TIFFRegisterCODEC` - - override standard codec for the specific scheme - * - :c:func:`TIFFReverseBits` - - reverse bits in an array of bytes - * - :c:func:`TIFFRewriteDirectory` - - operates similarly to :c:func:`TIFFWriteDirectory`, but can be called - with directories previously read or written that already have an established - location in the file and places it at the end of the file - * - :c:func:`TIFFRGBAImageBegin` - - setup decoder state for TIFFRGBAImageGet - * - :c:func:`TIFFRGBAImageEnd` - - release TIFFRGBAImage decoder state - * - :c:func:`TIFFRGBAImageGet` - - read and decode an image - * - :c:func:`TIFFRGBAImageOK` - - is image readable by TIFFRGBAImageGet - * - :c:func:`TIFFScanlineSize` - - return size of a scanline - * - :c:func:`TIFFScanlineSize64` - - return size of a scanline as :c:type:`uint64_t` - * - :c:func:`TIFFSetClientdata` - - set open file's clientdata (file descriptor/handle), - and return previous value - * - :c:func:`TIFFSetClientInfo` - - adds or replaces an entry in the clientinfo-list - * - :c:func:`TIFFSetCompressionScheme` - - set compression scheme - * - :c:func:`TIFFSetDirectory` - - set the current directory - * - :c:func:`TIFFSetErrorHandler` - - set error handler function - * - :c:func:`TIFFSetErrorHandlerExt` - - set error handler function with a file handle as parameter - * - :c:func:`TIFFSetField` - - set a tag's value in the current directory - * - :c:func:`TIFFSetFileName` - - sets the file name in the TIFF-structure and returns the old file name - * - :c:func:`TIFFSetFileno` - - overwrites a copy of the open file's I/O descriptor, and return previous value - (refer to detailed description) - * - :c:func:`TIFFSetMode` - - sets the ``libtiff`` open mode in the TIFF-structure and returns the old mode - * - :c:func:`TIFFSetSubDirectory` - - set the current directory - * - :c:func:`TIFFSetTagExtender` - - is used to register the merge function for user defined tags as an - extender callback with ``libtiff`` - * - :c:func:`TIFFSetupStrips` - - setup or reset strip parameters and strip array memory - * - :c:func:`TIFFSetWarningHandler` - - set warning handler function - * - :c:func:`TIFFSetWarningHandlerExt` - - set warning handler function with a file handle as parameter - * - :c:func:`TIFFSetWriteOffset` - - set current write offset - * - :c:func:`TIFFStripSize` - - return size of a strip - * - :c:func:`TIFFStripSize64` - - return equivalent size for a strip of data as :c:type:`uint64_t` - * - :c:func:`TIFFSwabArrayOfDouble` - - swap bytes of an array of doubles - * - :c:func:`TIFFSwabArrayOfFloat` - - swap bytes of an array of floats - * - :c:func:`TIFFSwabArrayOfLong` - - swap bytes of an array of longs - * - :c:func:`TIFFSwabArrayOfLong8` - - swap bytes of an array of uint64_t - * - :c:func:`TIFFSwabArrayOfShort` - - swap bytes of an array of shorts - * - :c:func:`TIFFSwabArrayOfTriples` - - swap the first and third byte of each triple within an array of bytes - * - :c:func:`TIFFSwabDouble` - - swap bytes of double - * - :c:func:`TIFFSwabFloat` - - swap bytes of float - * - :c:func:`TIFFSwabLong` - - swap bytes of long - * - :c:func:`TIFFSwabLong8` - - swap bytes of long long (uint64_t) - * - :c:func:`TIFFSwabShort` - - swap bytes of short - * - :c:func:`TIFFTileRowSize` - - return size of a row in a tile - * - :c:func:`TIFFTileRowSize64` - - return size of a row in a tile as :c:type:`uint64_t` - * - :c:func:`TIFFTileSize` - - return size of a tile - * - :c:func:`TIFFTileSize64` - - return size of a tile as :c:type:`uint64_t` - * - :c:func:`TIFFUnlinkDirectory` - - unlink the specified directory from the directory chain - * - :c:func:`TIFFUnRegisterCODEC` - - unregisters the codec - * - :c:func:`TIFFUnsetField` - - clear the contents of the field in the internal structure - * - :c:func:`TIFFVGetField` - - return tag value in current directory - * - :c:func:`TIFFVGetFieldDefaulted` - - return tag value in current directory - * - :c:func:`TIFFVSetField` - - set a tag's value in the current directory - * - :c:func:`TIFFVStripSize` - - return number of bytes in a strip - * - :c:func:`TIFFVStripSize64` - - return number of bytes in a strip with *nrows* rows of data as :c:type:`uint64_t` - * - :c:func:`TIFFVTileSize` - - returns the number of bytes in a row-aligned tile with *nrows* of data - * - :c:func:`TIFFVTileSize64` - - returns the number of bytes in a row-aligned tile with *nrows* of data - a :c:type:`uint64_t` number - * - :c:func:`TIFFWarning` - - library-wide warning handling function printing to ``stderr`` - * - :c:func:`TIFFWarningExt` - - user-specific library-wide warning handling function that can be passed - a file handle, which is set to the open TIFF file within ``libtiff`` - * - :c:func:`TIFFWarningExtR` - - user-specific re-entrant library warning handling function, - to which its TIFF structure is passed - containing the pointer to a user-specific data object - * - :c:func:`TIFFWriteBufferSetup` - - sets up the data buffer used to write raw (encoded) data to a file - * - :c:func:`TIFFWriteCheck` - - verify file is writable and that the directory information is setup properly - * - :c:func:`TIFFWriteCustomDirectory` - - write the current custom directory (also EXIF or GPS) to file - * - :c:func:`TIFFWriteDirectory` - - write the current directory - * - :c:func:`TIFFWriteEncodedStrip` - - compress and write a strip of data - * - :c:func:`TIFFWriteEncodedTile` - - compress and write a tile of data - * - :c:func:`TIFFWriteRawStrip` - - write a raw strip of data - * - :c:func:`TIFFWriteRawTile` - - write a raw tile of data - * - :c:func:`TIFFWriteScanline` - - write a scanline of data - * - :c:func:`TIFFWriteTile` - - compress and write a tile of data - * - :c:func:`TIFFXYZToRGB` - - perform CIE XYZ to RGB conversion - * - :c:func:`TIFFYCbCrtoRGB` - - perform YCbCr to RGB conversion - * - :c:func:`TIFFYCbCrToRGBInit` - - initialize YCbCr to RGB conversion state - -.. list-table:: *Libtiff auxiliary functions* - :widths: 5 20 - :header-rows: 1 - - * - Name - - Description - * - :c:func:`_TIFFCheckMalloc` - - checking for integer overflow before dynamically allocate memory buffer - * - :c:func:`_TIFFCheckRealloc` - - checking for integer overflow before dynamically reallocate memory buffer - * - :c:func:`_TIFFClampDoubleToUInt32` - - clamps double values into the range of :c:type:`uint32_t` (i.e. 0 .. 0xFFFFFFFF) - * - :c:func:`_TIFFfree` - - free memory buffer - * - :c:func:`_TIFFGetExifFields` - - return a pointer to the ``libtiff`` internal definition list of the EXIF tags - * - :c:func:`_TIFFGetGpsFields` - - return a pointer to the ``libtiff`` internal definition list of the GPS tags - * - :c:func:`_TIFFmalloc` - - dynamically allocate memory buffer - * - :c:func:`_TIFFmemcmp` - - compare contents of the memory buffers - * - :c:func:`_TIFFmemcpy` - - copy contents of the one buffer to another - * - :c:func:`_TIFFmemset` - - fill memory buffer with a constant byte - * - :c:func:`_TIFFMultiply32` - - checks for an integer overflow of the multiplication result of `uint32_t` and - return the multiplication result or `0` if an overflow would happen - * - :c:func:`_TIFFMultiply64` - - checks for an integer overflow of the multiplication result of `uint64_t` and - return the multiplication result or `0` if an overflow would happen - * - :c:func:`_TIFFrealloc` - - dynamically reallocate memory buffer - * - :c:func:`_TIFFRewriteField` - - Rewrite a field in the directory on disk without regard - to updating the TIFF directory structure in memory - - -Tag usage ---------- - -For a table of TIFF tags recognized by the library refer to -:doc:`/specification/coverage`. - -"Pseudo tags" -------------- - -In addition to the normal TIFF -tags the library supports a collection of -tags whose values lie in a range outside the valid range of TIFF -tags. These tags are termed *pseudo-tags* -and are used to control various codec-specific functions within the library. -The table below summarizes the defined pseudo-tags. - -.. list-table:: libtiff supported tags - :widths: 10 2 2 15 - :header-rows: 1 - - * - Tag name - - Codec - - R/W - - Library Use/Notes - - * - :c:macro:`TIFFTAG_FAXMODE` - - G3 - - R/W - - general codec operation - * - :c:macro:`TIFFTAG_FAXFILLFUNC` - - G3/G4 - - R/W - - bitmap fill function - * - :c:macro:`TIFFTAG_JPEGQUALITY` - - JPEG - - R/W - - compression quality control - * - :c:macro:`TIFFTAG_JPEGCOLORMODE` - - JPEG - - R/W - - control colorspace conversions - * - :c:macro:`TIFFTAG_JPEGTABLESMODE` - - JPEG - - R/W - - control contents of ``JPEGTables`` tag - * - :c:macro:`TIFFTAG_ZIPQUALITY` - - Deflate - - R/W - - compression quality level - * - :c:macro:`TIFFTAG_PIXARLOGDATAFMT` - - PixarLog - - R/W - - user data format - * - :c:macro:`TIFFTAG_PIXARLOGQUALITY` - - PixarLog - - R/W - - compression quality level - * - :c:macro:`TIFFTAG_SGILOGDATAFMT` - - SGILog - - R/W - - user data format - -:c:macro:`TIFFTAG_FAXMODE`: - - Control the operation of the Group 3 codec. - Possible values (independent bits that can be combined by - or'ing them together) are: - - :c:macro:`FAXMODE_CLASSIC`: - - (enable old-style format in which the ``RTC`` - is written at the end of the last strip), - - :c:macro:`FAXMODE_NORTC`: - - (opposite of :c:macro:`FAXMODE_CLASSIC`; also called - :c:macro:`FAXMODE_CLASSF`), - - :c:macro:`FAXMODE_NOEOL`: - - (do not write ``EOL`` codes at the start of each row of data), - - :c:macro:`FAXMODE_BYTEALIGN`: - - (align each encoded row to an 8-bit boundary), - - :c:macro:`FAXMODE_WORDALIGN`: - - (align each encoded row to an 16-bit boundary), - - The default value is dependent on the compression scheme; this - pseudo-tag is used by the various G3 and G4 codecs to share code. - -:c:macro:`TIFFTAG_FAXFILLFUNC`: - - Control the function used to convert arrays of black and white - runs to packed bit arrays. - This hook can be used to image decoded scanlines in multi-bit - depth rasters (e.g. for display in colormap mode) - or for other purposes. - The default value is a pointer to a builtin function that images - packed bilevel data. - -:c:macro:`TIFFTAG_IPTCNEWSPHOTO`: - - Tag contains image metadata per the IPTC newsphoto spec: Headline, - captioning, credit, etc... Used by most wire services. - -:c:macro:`TIFFTAG_PHOTOSHOP`: - - Tag contains Photoshop captioning information and metadata. Photoshop - uses in parallel and redundantly alongside :c:macro:`IPTCNEWSPHOTO` information. - -:c:macro:`TIFFTAG_JPEGQUALITY`: - - Control the compression quality level used in the baseline algorithm. - Note that quality levels are in the range 0-100 with a default value of 75. - -:c:macro:`TIFFTAG_JPEGCOLORMODE`: - - Control whether or not conversion is done between - RGB and YCbCr colorspaces. - Possible values are: - - :c:macro:`JPEGCOLORMODE_RAW`: - - (do not convert), and - - :c:macro:`JPEGCOLORMODE_RGB`: - - (convert to/from RGB) - - The default value is :c:macro:`JPEGCOLORMODE_RAW`. - -:c:macro:`TIFFTAG_JPEGTABLESMODE`: - - Control the information written in the ``JPEGTables`` tag. - Possible values (independent bits that can be combined by - or'ing them together) are: - - :c:macro:`JPEGTABLESMODE_QUANT`: - - (include quantization tables), and - - :c:macro:`JPEGTABLESMODE_HUFF`: - - (include Huffman encoding tables). - - The default value is :c:expr:`JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF`. - -:c:macro:`TIFFTAG_ZIPQUALITY`: - - Control the compression technique used by the Deflate codec. - Quality levels are in the range 1-9 with larger numbers yielding better - compression at the cost of more computation. - The default quality level is 6 which yields a good time-space tradeoff. - -:c:macro:`TIFFTAG_PIXARLOGDATAFMT`: - - Control the format of user data passed *in* - to the PixarLog codec when encoding and passed - *out* from when decoding. Possible values are: - - :c:macro:`PIXARLOGDATAFMT_8BIT`: - - for 8-bit unsigned pixels, - - :c:macro:`PIXARLOGDATAFMT_8BITABGR`: - - for 8-bit unsigned ABGR-ordered pixels, - - :c:macro:`PIXARLOGDATAFMT_11BITLOG`: - - for 11-bit log-encoded raw data, - - :c:macro:`PIXARLOGDATAFMT_12BITPICIO`: - - for 12-bit PICIO-compatible data, - - :c:macro:`PIXARLOGDATAFMT_16BIT`: - - for 16-bit signed samples, and - - :c:macro:`PIXARLOGDATAFMT_FLOAT`: - - for 32-bit IEEE floating point samples. - -:c:macro:`TIFFTAG_PIXARLOGQUALITY`: - - Control the compression technique used by the PixarLog codec. - This value is treated identically to :c:macro:`TIFFTAG_ZIPQUALITY`; see the - above description. - -:c:macro:`TIFFTAG_SGILOGDATAFMT`: - - Control the format of client data passed *in* - to the SGILog codec when encoding and passed - *out* from when decoding. Possible values are: - - :c:macro:`SGILOGDATAFMT_FLTXYZ`: - - for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels, - - :c:macro:`SGILOGDATAFMT_16BITLUV`: - - for 16-bit encoded Luv pixels, - - :c:macro:`SGILOGDATAFMT_32BITRAW`: - :c:macro:`SGILOGDATAFMT_24BITRAW`: - - for no conversion of data, - - :c:macro:`SGILOGDATAFMT_8BITRGB`: - - for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data), - - :c:macro:`SGILOGDATAFMT_FLTY`: - - for converting between LogL and 32-bit IEEE floating valued Y pixels, - - :c:macro:`SGILOGDATAFMT_16BITL`: - - for 16-bit encoded L pixels, and - - :c:macro:`SGILOGDATAFMT_8BITGRY`: - - for returning 8-bit greyscale data - (valid only when decoding LogL-encoded data). - -Diagnostics ------------ - -All error messages are directed through the :c:func:`TIFFErrorExtR` routine. -By default messages are directed to ``stderr`` in the form: -``module: message\n``. -Warning messages are likewise directed through the -:c:func:`TIFFWarningExtR` routine. - -See also --------- - -:doc:`/tools/fax2tiff`, -:doc:`/tools/pal2rgb`, -:doc:`/tools/ppm2tiff`, -:doc:`/tools/rgb2ycbcr`, -:doc:`/tools/raw2tiff`, -:doc:`/tools/tiff2bw`, -:doc:`/tools/tiffdither`, -:doc:`/tools/tiffdump`, -:doc:`/tools/tiffcp`, -:doc:`/tools/tiffcmp`, -:doc:`/tools/tiffgt`, -:doc:`/tools/tiffinfo`, -:doc:`/tools/tiffmedian`, -:doc:`/tools/tiffsplit`, - -**"Tag Image File Format Specification *Revision 6.0*"**, -an Aldus Technical Memorandum. - -**"The Spirit of TIFF Class F"** , -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. - -Bugs ----- - -* The library does not support multi-sample images - where some samples have different bits/sample. - -* The library does not support random access to compressed data - that is organized with more than one row per tile or strip. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/images.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/images.rst.txt deleted file mode 100644 index fe34287..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/images.rst.txt +++ /dev/null @@ -1,23 +0,0 @@ -TIFF Test Images -################ - -.. image:: images/bali.jpg - :width: 158 - :alt: bali - - -Test images are available for most formats supported by the library. -Most of the images included in the test kit are also part of this -documentation (albeit in TIFF rather than GIF or JFIF). -The images are kept in a separate archive that should be located in -the same directory as this software. - -The latest archive of test images is located at -``_, -or at ``_. - -There are two other good sources for TIFF test images: -the contributed software :file:`contrib/dbs` includes several -programs that generate test images suitable for debugging, and -the :program:`tiffcp` program can be used to generate a variety -of images with different storage characteristics. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/index.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/index.rst.txt deleted file mode 100644 index b9dfe96..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/index.rst.txt +++ /dev/null @@ -1,67 +0,0 @@ -#################################### -LibTIFF - TIFF Library and Utilities -#################################### - -.. table:: References - :widths: auto - - ===================== ===================================== - Name Reference - ===================== ===================================== - Home Page #1 http://www.simplesystems.org/libtiff/ - Home Page #2 https://libtiff.gitlab.io/libtiff/ - Latest Stable Release v4.7.1 - Primary Download Site `download.osgeo.org `_ - Mailing List `tiff@lists.osgeo.org `_ - List subscription http://lists.osgeo.org/mailman/listinfo/tiff/ - Source repository https://gitlab.com/libtiff/libtiff - ===================== ===================================== - -The LibTIFF software provides support for the *Tag Image File Format* (TIFF), -a widely used format for storing image data. The latest version of -the TIFF specification is :doc:`specification/index`. - -Included in this software distribution are: - -* a library, :file:`libtiff`, for reading and writing TIFF images -* a small collection of tools for performing simple manipulations of TIFF images -* documentation for the library and tools. - -The :file:`libtiff` library, along with associated tool programs, should handle most of -your needs for reading and writing TIFF images. - -LibTIFF is portable software, supported on various operating systems including -UNIX (Linux, BSD, MacOS X) and Windows. - -.. note:: - - At libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset) has been moved to archive/ directory - and was not built. - tiff2ps and tiff2pdf source code has been moved in a unsupported category, - no longer built by default, but were still part of the the source - distribution. - - With libtiff v4.7.0 those tools were restored. - - -The following sections are included in this documentation: - -.. toctree:: - :maxdepth: 2 - :titlesonly: - - specification/index - images - build - terms - libtiff - multi_page - functions - internals - addingtags - tools - contrib - rfcs/index - project/index - releases/index diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/internals.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/internals.rst.txt deleted file mode 100644 index 8a49776..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/internals.rst.txt +++ /dev/null @@ -1,426 +0,0 @@ -Modifying The TIFF Library -========================== - -.. image:: images/dave.gif - :width: 107 - :alt: dave - -This chapter provides information about the internal structure of -the library, how to control the configuration when building it, and -how to add new support to the library. -The following sections are found in this chapter: - -Library Configuration ---------------------- - -Information on compiling the library is given :doc:`build` -elsewhere in this documentation. -This section describes the low-level mechanisms used to control -the optional parts of the library that are configured at build -time. Control is based on -a collection of C defines that are specified either on the compiler -command line or in a configuration file such as :file:`port.h` -(as generated by the :program:`configure` script for UNIX systems) -or :file:`tiffconf.h`. - -Configuration defines are split into three areas: - -* those that control which compression schemes are - configured as part of the builtin codecs, -* those that control support for groups of tags that - are considered optional, and -* those that control operating system or machine-specific support. - -If the define :c:macro:`COMPRESSION_SUPPORT` is **not defined** -then a default set of compression schemes is automatically -configured: - -* CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771), -* the Macintosh PackBits algorithm (compression 32773), -* a 4-bit run-length encoding scheme from ThunderScan (compression 32809), -* a 2-bit encoding scheme used by NeXT (compression 32766), and -* two experimental schemes intended for images with high dynamic range - (compression 34676 and 34677). - -To override the default compression behaviour define -:c:macro:`COMPRESSION_SUPPORT` and then one or more additional defines -to enable configuration of the appropriate codecs (see the table -below); e.g. - -.. highlight:: c - -:: - - #define COMPRESSION_SUPPORT - #define CCITT_SUPPORT - #define PACKBITS_SUPPORT - -Several other compression schemes are configured separately from -the default set because they depend on ancillary software -packages that are not distributed with LibTIFF. - -Support for JPEG compression is controlled by :c:macro:`JPEG_SUPPORT`. -The JPEG codec that comes with LibTIFF is designed for -use with release 5 or later of the Independent JPEG Group's freely -available software distribution. - -This software can be retrieved from -``_ or as an alternative from ``_. - -.. note:: - - Enabling JPEG support automatically enables support for - the TIFF 6.0 colorimetry and YCbCr-related tags. - -Experimental support for the deflate algorithm is controlled by -:c:macro:`DEFLATE_SUPPORT`. -The deflate codec that comes with LibTIFF is designed -for use with version 0.99 or later of the freely available -``libz`` library written by Jean-loup Gailly and Mark Adler. - -The data format used by the zlib library is described by RFCs (Request for -Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 -(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). - -The ``libz`` library can be fetched from ``_, -and ``libdeflate`` from ``_ - -Other codec libraries supported by LibTIFF are: - -* JBIG: ``_ -* ESRI Lerc: ``_ -* LZMA2: ``_ -* | ZSTD: info at ``_ - | and can be retrieved from ``_ -* WebP: ``_ - -By default :file:`tiffconf.h` defines -:c:macro:`COLORIMETRY_SUPPORT`, -:c:macro:`YCBCR_SUPPORT`, -and -:c:macro:`CMYK_SUPPORT`. - -.. list-table:: :file:`tiffconf.h` defines - :widths: 5 20 - :header-rows: 1 - - * - Define - - Description - - * - :c:macro:`CCITT_SUPPORT` - - CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771) - - * - :c:macro:`PACKBITS_SUPPORT` - - Macintosh PackBits algorithm (compression 32773) - - * - :c:macro:`LZW_SUPPORT` - - Lempel-Ziv & Welch (LZW) algorithm (compression 5) - - * - :c:macro:`THUNDER_SUPPORT` - - 4-bit run-length encoding scheme from ThunderScan (compression 32809) - - * - :c:macro:`NEXT_SUPPORT` - - 2-bit encoding scheme used by NeXT (compression 32766) - - * - :c:macro:`OJPEG_SUPPORT` - - obsolete JPEG scheme defined in the 6.0 spec (compression 6) - (requires JPEG library with old JPEG support) - - * - :c:macro:`JPEG_SUPPORT` - - current JPEG scheme defined in TTN2 (compression 7) - (requires JPEG library) - - * - :c:macro:`JBIG_SUPPORT` - - current JBIG (compression 9=T85, 10=43 and 34661=ISO) - (requires JBIG-KIT library) - - * - :c:macro:`LERC_SUPPORT` - - current LERC (compression 34887) - (requires LERC and Zlib library) - - * - :c:macro:`ZIP_SUPPORT` - - experimental Deflate scheme (compression 32946) - (requires Zlib) - - * - :c:macro:`LIBDEFLATE_SUPPORT` - - support libdeflate enhanced compression (compression 32946) - (requires libdeflate and Zlib) - - * - :c:macro:`LZMA_SUPPORT` - - Lempel–Ziv–Markov chain algorithm (LZMA2) (compression 34925) - (requires liblzma) - - * - :c:macro:`ZSTD_SUPPORT` - - ZStandard (ZSTD) deflate like scheme - (compression 50000 - not registered in Adobe-maintained registry) - (requires zstd library) - - * - :c:macro:`WEBP_SUPPORT` - - WebP raster graphic compression support - (compression 50001 - not registered in Adobe-maintained registry) - (requires webp library) - - * - :c:macro:`PIXARLOG_SUPPORT` - - Pixar's compression scheme for high-resolution color images - (compression 32909) (requires Zlib) - - * - :c:macro:`SGILOG_SUPPORT` - - SGI's compression scheme for high-resolution color images - (compression 34676 and 34677) - - * - :c:macro:`COLORIMETRY_SUPPORT` - - support for the TIFF 6.0 colorimetry tags - - * - :c:macro:`YCBCR_SUPPORT` - - support for the TIFF 6.0 YCbCr-related tags - - * - :c:macro:`CMYK_SUPPORT` - - support for the TIFF 6.0 CMYK-related tags - - * - :c:macro:`ICC_SUPPORT` - - support for the ICC Profile tag; see - *The ICC Profile Format Specification*, - Annex B.3 "Embedding ICC Profiles in TIFF Files"; - available at - ``_ - -General Portability Comments ----------------------------- - -This software is developed on Silicon Graphics UNIX -systems (big-endian, MIPS CPU, 32-bit ints, -IEEE floating point). -The :program:`configure` shell script generates the appropriate -include files and make files for UNIX systems. -Makefiles exist for non-UNIX platforms that the -code runs on---this work has mostly been done by other people. - -In general, the code is guaranteed to work only on SGI machines. -In practice it is highly portable to any 32-bit or 64-bit system and much -work has been done to insure portability to 16-bit systems. -If you encounter portability problems please return fixes so -that future distributions can be improved. - -The software is written to assume an ANSI C compilation environment. -If your compiler does not support ANSI function prototypes, ``const``, -and :file:`` then you will have to make modifications to the -software. In the past I have tried to support compilers without ``const`` -and systems without :file:``, but I am -**no longer interested in these -antiquated environments**. With the general availability of -the freely available GCC compiler, I -see no reason to incorporate modifications to the software for these -purposes. - -An effort has been made to isolate as many of the -operating system-dependencies -as possible in two files: :file:`tiffcomp.h` and -:file:`libtiff/tif_.c`. The latter file contains -operating system-specific routines to do I/O and I/O-related operations. -The UNIX (:file:`tif_unix.c`) code has had the most use. - -Native CPU byte order is determined through the :c:macro:`WORDS_BIGENDIAN` -definition, which must be set to the appropriate value in :file:`tif_config.h` -by the build system. - -The following defines control general portability: - -.. list-table:: Portability defines - :widths: 5 20 - :header-rows: 1 - - * - Define - - Description - - * - :c:macro:`BSDTYPES` - - Define this if your system does **not** define the - usual BSD typedefs: :c:type:`u_char`, - :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`. - - * - :c:macro:`HAVE_IEEEFP` - - Define this as 0 or 1 according to the floating point - format supported by the machine. If your machine does - not support IEEE floating point then you will need to - add support to tif_machdep.c to convert between the - native format and IEEE format. - - * - :c:macro:`HAVE_MMAP` - - Define this if there is *mmap-style* support for - mapping files into memory (used only to read data). - - * - :c:macro:`HOST_FILLORDER` - - Define the native CPU bit order: one of :c:macro:`FILLORDER_MSB2LSB` - or :c:macro:`FILLORDER_LSB2MSB` - - * - :c:macro:`HOST_BIGENDIAN` - - Define the native CPU byte order: 1 if big-endian (Motorola) - or 0 if little-endian (Intel); this may be used - in codecs to optimize code - -On UNIX systems :c:macro:`HAVE_MMAP` is defined through the running of -the :program:`configure` script; otherwise support for memory-mapped -files is disabled. -Note that :file:`tiffcomp.h` defines :c:macro:`HAVE_IEEEFP` to be -1 (:c:macro:`BSDTYPES` is not defined). - -Types and Portability ---------------------- - -The software makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. There are interactions between these two to be careful -of, but for the most part you should be able to deal with portability -purely by fiddling with the following machine-dependent typedefs: - -.. list-table:: Portability typedefs - :widths: 5 15 5 - :header-rows: 1 - - * - Typedef - - Description - - Header - - * - :c:type:`uint8_t` - - 8-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int8_t` - - 8-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint16_t` - - 16-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int16_t` - - 16-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint32_t` - - 32-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int32_t` - - 32-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint64_t` - - 64-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int64_t` - - 64-bit signed integer - - :file:`tiff.h` - - -Most of the previously used type definitions that refer to -specific objects are deprecated. -For more information about typedefs see :ref:`Data Types `. - -General Comments ----------------- - -The library is designed to hide as much of the details of TIFF from -applications as -possible. In particular, TIFF directories are read in their entirety -into an internal format. Only the tags known by the library are -available to a user and certain tag data may be maintained that a user -does not care about (e.g. transfer function tables). - -Adding New Builtin Codecs -------------------------- - -To add builtin support for a new compression algorithm, you can either -use the "tag-extension" trick to override the handling of the -TIFF Compression tag (see :doc:`addingtags`), -or do the following to add support directly to the core library: - -* Define the tag value in :file:`tiff.h`. -* Edit the file :file:`tif_codec.c` to add an entry to the - :c:var:`_TIFFBuiltinCODECS` array (see how other algorithms are handled). -* Add the appropriate function prototype declaration to - :file:`tiffiop.h` (close to the bottom). -* Create a file with the compression scheme code, by convention files - are named :file:`tif_*.c` (except perhaps on some systems where the - ``tif_`` prefix pushes some filenames over 14 chars. -* Update build configuration to include new source file. - -A codec, say ``foo``, can have many different entry points: - -:: - - TIFFInitfoo(tif, scheme) /* initialize scheme and setup entry points in tif */ - fooSetupDecode(tif) /* called once per IFD after tags has been frozen */ - fooPreDecode(tif, sample) /* called once per strip/tile, after data is read, - but before the first row is decoded */ - fooDecode*(tif, bp, cc, sample) /* decode cc bytes of data into the buffer */ - fooDecodeRow(...) /* called to decode a single scanline */ - fooDecodeStrip(...) /* called to decode an entire strip */ - fooDecodeTile(...) /* called to decode an entire tile */ - fooSetupEncode(tif) /* called once per IFD after tags has been frozen */ - fooPreEncode(tif, sample) /* called once per strip/tile, before the first row in - a strip/tile is encoded */ - fooEncode*(tif, bp, cc, sample)/* encode cc bytes of user data (bp) */ - fooEncodeRow(...) /* called to decode a single scanline */ - fooEncodeStrip(...) /* called to decode an entire strip */ - fooEncodeTile(...) /* called to decode an entire tile */ - fooPostEncode(tif) /* called once per strip/tile, just before data is written */ - fooSeek(tif, row) /* seek forwards row scanlines from the beginning - of a strip (row will always be <0 and >rows/strip */ - fooCleanup(tif) /* called when compression scheme is replaced by user */ - -Note that the encoding and decoding variants are only needed when -a compression algorithm is dependent on the structure of the data. -For example, Group 3 2D encoding and decoding maintains a reference -scanline. The sample parameter identifies which sample is to be -encoded or decoded if the image is organized with ``PlanarConfig=2`` -(separate planes). This is important for algorithms such as JPEG. -If ``PlanarConfig=1`` (interleaved), then sample will always be 0. - -Other Comments --------------- - -The library handles most I/O buffering. There are two data buffers -when decoding data: a raw data buffer that holds all the data in a -strip, and a user-supplied scanline buffer that compression schemes -place decoded data into. When encoding data the data in the -user-supplied scanline buffer is encoded into the raw data buffer (from -where it is written). Decoding routines should never have to explicitly -read data -- a full strip/tile's worth of raw data is read and scanlines -never cross strip boundaries. Encoding routines must be cognizant of -the raw data buffer size and call :c:func:`TIFFFlushData1` when necessary. -Note that any pending data is automatically flushed when a new strip/tile is -started, so there's no need do that in the tif_postencode routine (if -one exists). Bit order is automatically handled by the library when -a raw strip or tile is filled. If the decoded samples are interpreted -by the decoding routine before they are passed back to the user, then -the decoding logic must handle byte-swapping by overriding the -:c:member:`tif_postdecode` -routine (set it to :c:func:`TIFFNoPostDecode`) and doing the required work -internally. For an example of doing this look at the horizontal -differencing code in the routines in :file:`tif_predict.c`. - -The variables :c:member:`tif_rawcc`, :c:member:`tif_rawdata`, and -:c:member:`tif_rawcp` in a :c:struct:`TIFF` structure -are associated with the raw data buffer. :c:member:`tif_rawcc` must be non-zero -for the library to automatically flush data. The variable -:c:member:`tif_scanlinesize` is the size a user's scanline buffer should be. The -variable :c:member:`tif_tilesize` is the size of a tile for tiled images. This -should not normally be used by compression routines, except where it -relates to the compression algorithm. That is, the ``cc`` parameter to the -:c:expr:`tif_decode*` and :c:expr:`tif_encode*` -routines should be used in terminating -decompression/compression. This ensures these routines can be used, -for example, to decode/encode entire strips of data. - -In general, if you have a new compression algorithm to add, work from -the code for an existing routine. In particular, -:file:`tif_dumpmode.c` -has the trivial code for the "nil" compression scheme, -:file:`tif_packbits.c` is a -simple byte-oriented scheme that has to watch out for buffer -boundaries, and :file:`tif_lzw.c` has the LZW scheme that has the most -complexity -- it tracks the buffer boundary at a bit level. -Of course, using a private compression scheme (or private tags) limits -the portability of your TIFF files. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/libtiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/libtiff.rst.txt deleted file mode 100644 index 694c33d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/libtiff.rst.txt +++ /dev/null @@ -1,744 +0,0 @@ -Using The TIFF Library -====================== - -.. image:: images/cat.gif - :width: 113 - :alt: cat - -``libtiff`` is a set of C functions (a library) that support -the manipulation of TIFF image files. -The library requires an ANSI C compilation environment for building -and presumes an ANSI C environment for use. - -``libtiff`` -provides interfaces to image data at several layers of abstraction (and cost). -At the highest level image data can be read into an 8-bit/sample, -ABGR pixel raster format without regard for the underlying data organization, -colorspace, or compression scheme. Below this high-level interface -the library provides scanline-, strip-, and tile-oriented interfaces that -return data decompressed but otherwise untransformed. These interfaces -require that the application first identify the organization of stored -data and select either a strip-based or tile-based API for manipulating -data. At the lowest level the library -provides access to the raw uncompressed strips or tiles, -returning the data exactly as it appears in the file. - -The material presented in this chapter is a basic introduction -to the capabilities of the library; it is not an attempt to describe -everything a developer needs to know about the library or about TIFF. -Detailed information on the interfaces to the library are given in -the :doc:`functions` that accompany this software. -An alphabetic list of all the public functions with a brief description can be found at :ref:`list_of_routines` - -How to tell which version you have ----------------------------------- - -The software version can be found by looking at the file named -:file:`VERSION` -that is located at the top of the source tree; the precise alpha number -is given in the file :file:`dist/tiff.alpha`. -If you have need to refer to this -specific software, you should identify it as: - -:: - - TIFF - -where ```` is whatever you get from -``cat VERSION`` and ```` is -what you get from ``cat dist/tiff.alpha``. - -Within an application that uses ``libtiff`` the :c:func:`TIFFGetVersion` -routine will return a pointer to a string that contains software version -information. -The library include file :file:`` contains a C pre-processor -define :c:macro:`TIFFLIB_VERSION` that can be used to check library -version compatibility at compile time. - -Library Datatypes ------------------ - -``libtiff`` defines a portable programming interface through the -use of a set of C type definitions. -These definitions, defined in in the files :file:`tiff.h` and -:file:`tiffio.h`, -isolate the ``libtiff`` API from the characteristics -of the underlying machine. -To insure portable code and correct operation, applications that use -``libtiff`` should use the typedefs and follow the function -prototypes for the library API. - -Memory Management ------------------ - -``libtiff`` uses a machine-specific set of routines for managing -dynamically allocated memory. -:c:func:`_TIFFmalloc`, :c:func:`_TIFFrealloc`, and :c:func:`_TIFFfree` -mimic the normal ANSI C routines. -Any dynamically allocated memory that is to be passed into the library -should be allocated using these interfaces in order to insure pointer -compatibility on machines with a segmented architecture. -(On 32-bit UNIX systems these routines just call the normal :c:func:`malloc`, -:c:func:`realloc`, and :c:func:`free` routines in the C library.) - -To deal with segmented pointer issues ``libtiff`` also provides -:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemcmp` -routines that mimic the equivalent ANSI C routines, but that are -intended for use with memory allocated through :c:func:`_TIFFmalloc` -and :c:func:`_TIFFrealloc`. - -With ``libtiff`` 4.5 a method was introduced to limit the internal -memory allocation that functions are allowed to request per call -(see :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` and :c:func:`TIFFOpenExt`). - -With ``libtiff`` 4.6.1 a method was introduced to limit the internal -cumulated memory allocation that functions are allowed to request for a given -TIFF handle -(see :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` and :c:func:`TIFFOpenExt`). - -Error Handling --------------- - -``libtiff`` handles most errors by returning an invalid/erroneous -value when returning from a function call. -Various diagnostic messages may also be generated by the library. -All error messages are directed to a single global error handler -routine that can be specified with a call to :c:func:`TIFFSetErrorHandler`. -Likewise warning messages are directed to a single handler routine -that can be specified with a call to :c:func:`TIFFSetWarningHandler` - -Further application-specific and per-TIFF handle (re-entrant) error handler -and warning handler can be set. Please refer to :doc:`/functions/TIFFError` -and :doc:`/functions/TIFFOpenOptions`. - -Basic File Handling -------------------- - -The library is modeled after the normal UNIX stdio library. -For example, to read from an existing TIFF image the -file must first be opened: - -.. highlight:: c - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("foo.tif", "r"); - /* ... do stuff ... */ - TIFFClose(tif); - } - -The handle returned by :c:func:`TIFFOpen` is *opaque*, that is -the application is not permitted to know about its contents. -All subsequent library calls for this file must pass the handle -as an argument. - -To create or overwrite a TIFF image the file is also opened, but with -a ``"w"`` argument: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("foo.tif", "w"); - /* ... do stuff ... */ - TIFFClose(tif); - } - -If the file already exists it is first truncated to zero length. - -.. warning:: - - Unlike the stdio library TIFF image files may not be - opened for both reading and writing; - there is no support for altering the contents of a TIFF file. - -``libtiff`` buffers much information associated with writing a -valid TIFF image. Consequently, when writing a TIFF image it is necessary -to always call :c:func:`TIFFClose` or :c:func:`TIFFFlush` to flush any -buffered information to a file. Note that if you call :c:func:`TIFFClose` -you do not need to call :c:func:`TIFFFlush`. - -.. warning:: - - In order to prevent out-of-memory issues when opening a TIFF file - :c:func:`TIFFOpenExt` can be used and then the maximum single memory - limit in bytes that ``libtiff`` internal memory allocation functions - are allowed to request per call can be set with - :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. - -Example - -:: - - tmsize_t limit = (256 * 1024 * 1024); - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); - TIFF *tif = TIFFOpenExt("foo.tif", "w", opts); - TIFFOpenOptionsFree(opts); - /* ... go on here ... */ - -TIFF Directories ----------------- - -TIFF supports the storage of multiple images in a single file. -Each image has an associated data structure termed a *directory* -that houses all the information about the format and content of the -image data. -Images in a file are usually related but they do not need to be; it -is perfectly alright to store a color image together with a black and -white image. -Note however that while images may be related their directories are -not. -That is, each directory stands on its own; there is no need to read -an unrelated directory in order to properly interpret the contents -of an image. - -``libtiff`` provides several routines for reading and writing -directories. In normal use there is no need to explicitly -read or write a directory: the library automatically reads the first -directory in a file when opened for reading, and directory information -to be written is automatically accumulated and written when writing -(assuming :c:func:`TIFFClose` or :c:func:`TIFFFlush` are called). - -For a file open for reading the :c:func:`TIFFSetDirectory` routine can -be used to select an arbitrary directory; directories are referenced by -number with the numbering starting at 0. Otherwise the -:c:func:`TIFFReadDirectory` and :c:func:`TIFFWriteDirectory` routines can -be used for sequential access to directories. -For example, to count the number of directories in a file the following -code might be used: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - int dircount = 0; - do { - dircount++; - } while (TIFFReadDirectory(tif)); - printf("%d directories in %s\n", dircount, argv[1]); - TIFFClose(tif); - } - exit(0); - } - - -Finally, note that there are several routines for querying the -directory status of an open file: -:c:func:`TIFFCurrentDirectory` returns the index of the current -directory and -:c:func:`TIFFLastDirectory` returns an indication of whether the -current directory is the last directory in a file. -There is also a routine, :c:func:`TIFFPrintDirectory`, that can -be called to print a formatted description of the contents of -the current directory; consult the manual page for complete details. - -TIFF Tags ---------- - -Image-related information such as the image width and height, number -of samples, orientation, colorimetric information, etc. -are stored in each image -directory in *fields* or *tags*. -Tags are identified by a number that is usually a value registered -with the Aldus (now Adobe) Corporation. -Beware however that some vendors write -TIFF images with tags that are unregistered; in this case interpreting -their contents is usually a waste of time. - -``libtiff`` reads the contents of a directory all at once -and converts the on-disk information to an appropriate in-memory -form. While the TIFF specification permits an arbitrary set of -tags to be defined and used in a file, the library only understands -a limited set of tags. -Any unknown tags that are encountered in a file are ignored. -There is a mechanism to extend the set of tags the library handles -without modifying the library itself; -this is described in :doc:`addingtags`. - -``libtiff`` provides two interfaces for getting and setting tag -values: :c:func:`TIFFGetField` and :c:func:`TIFFSetField`. -These routines use a variable argument list-style interface to pass -parameters of different type through a single function interface. -The *get interface* takes one or more pointers to memory locations -where the tag values are to be returned and also returns one or -zero according to whether the requested tag is defined in the directory. -The *set interface* takes the tag values either by-reference or -by-value. -The TIFF specification defines -*default values* for some tags. -To get the value of a tag, or its default value if it is undefined, -the :c:func:`TIFFGetFieldDefaulted` interface may be used. - -The manual pages for the tag get and set routines specify the exact data types -and calling conventions required for each tag supported by the library. - -TIFF Compression Schemes ------------------------- - -``libtiff`` includes support for a wide variety of -data compression schemes. -In normal operation a compression scheme is automatically used when -the TIFF ``Compression`` tag is set, either by opening a file -for reading, or by setting the tag when writing. - -Compression schemes are implemented by software modules termed *codecs* -that implement decoder and encoder routines that hook into the -core library i/o support. -Codecs other than those bundled with the library can be registered -for use with the :c:func:`TIFFRegisterCODEC` routine. -This interface can also be used to override the core-library -implementation for a compression scheme. - -Byte Order ----------- - -The TIFF specification says, and has always said, that -*a correct TIFF -reader must handle images in big-endian and little-endian byte order*. -``libtiff`` conforms in this respect. -Consequently there is no means to force a specific -byte order for the data written to a TIFF image file (data is -written in the native order of the host CPU unless appending to -an existing file, in which case it is written in the byte order -specified in the file). - -Data Placement --------------- - -The TIFF specification requires that all information except an -8-byte header can be placed anywhere in a file. -In particular, it is perfectly legitimate for directory information -to be written after the image data itself. -Consequently TIFF is inherently not suitable for passing through a -stream-oriented mechanism such as UNIX pipes. -Software that require that data be organized in a file in a particular -order (e.g. directory information before image data) does not -correctly support TIFF. -``libtiff`` provides no mechanism for controlling the placement -of data in a file; image data is typically written before directory -information. - -TIFFRGBAImage Support ---------------------- - -``libtiff`` provides a high-level interface for reading image -data from a TIFF file. This interface handles the details of -data organization and format for a wide variety of TIFF files; -at least the large majority of those files that one would normally -encounter. Image data is, by default, returned as ABGR -pixels packed into 32-bit words (8 bits per sample). Rectangular -rasters can be read or data can be intercepted at an intermediate -level and packed into memory in a format more suitable to the -application. -The library handles all the details of the format of data stored on -disk and, in most cases, if any colorspace conversions are required: -bilevel to RGB, greyscale to RGB, CMYK to RGB, YCbCr to RGB, 16-bit -samples to 8-bit samples, associated/unassociated alpha, etc. - -There are two ways to read image data using this interface. If -all the data is to be stored in memory and manipulated at once, -then the routine :c:func:`TIFFReadRGBAImage` can be used: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - uint32_t w, h; - size_t npixels; - uint32_t* raster; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - npixels = w * h; - raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t)); - if (raster != NULL) { - if (TIFFReadRGBAImage(tif, w, h, raster, 0)) { - ...process raster data... - } - _TIFFfree(raster); - } - TIFFClose(tif); - } - exit(0); - } - -Note above that :c:func:`_TIFFmalloc` is used to allocate memory for -the raster passed to :c:func:`TIFFReadRGBAImage`; this is important -to insure the "appropriate type of memory" is passed on machines -with segmented architectures. - -Alternatively, :c:func:`TIFFReadRGBAImage` can be replaced with a -more low-level interface that permits an application to have more -control over this reading procedure. The equivalent to the above -is: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - TIFFRGBAImage img; - char emsg[1024]; - - if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) { - size_t npixels; - uint32_t* raster; - - npixels = img.width * img.height; - raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t)); - if (raster != NULL) { - if (TIFFRGBAImageGet(&img, raster, img.width, img.height)) { - ...process raster data... - } - _TIFFfree(raster); - } - TIFFRGBAImageEnd(&img); - } else - TIFFError(argv[1], emsg); - TIFFClose(tif); - } - exit(0); - } - -However this usage does not take advantage of the more fine-grained -control that's possible. That is, by using this interface it is -possible to: - -* repeatedly fetch (and manipulate) an image without opening - and closing the file -* interpose a method for packing raster pixel data according to - application-specific needs (or write the data at all) -* interpose methods that handle TIFF formats that are not already - handled by the core library - -The first item means that, for example, image viewers that want to -handle multiple files can cache decoding information in order to -speedup the work required to display a TIFF image. - -The second item is the main reason for this interface. By interposing -a "put method" (the routine that is called to pack pixel data in -the raster) it is possible share the core logic that understands how -to deal with TIFF while packing the resultant pixels in a format that -is optimized for the application. This alternate format might be very -different than the 8-bit per sample ABGR format the library writes by -default. For example, if the application is going to display the image -on an 8-bit colormap display the put routine might take the data and -convert it on-the-fly to the best colormap indices for display. - -The last item permits an application to extend the library -without modifying the core code. -By overriding the code provided an application might add support -for some esoteric flavor of TIFF that it needs, or it might -substitute a packing routine that is able to do optimizations -using application/environment-specific information. - -The TIFF image viewer found in :file:`tools/sgigt.c` is an example -of an application that makes use of the :c:func:`TIFFRGBAImage` -support. - -Scanline-based Image I/O ------------------------- - -The simplest interface provided by ``libtiff`` is a -scanline-oriented interface that can be used to read TIFF -images that have their image data organized in strips -(trying to use this interface to read data written in tiles -will produce errors.) -A scanline is a one pixel high row of image data whose width -is the width of the image. -Data is returned packed if the image data is stored with samples -packed together, or as arrays of separate samples if the data -is stored with samples separated. -The major limitation of the scanline-oriented interface, other -than the need to first identify an existing file as having a -suitable organization, is that random access to individual -scanlines can only be provided when data is not stored in a -compressed format, or when the number of rows in a strip -of image data is set to one (``RowsPerStrip`` is one). - -Two routines are provided for scanline-based i/o: -:c:func:`TIFFReadScanline` -and -:c:func:`TIFFWriteScanline`. -For example, to read the contents of a file that -is assumed to be organized in strips, the following might be used: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imagelength; - void *buf; - uint32_t row; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); - buf = _TIFFmalloc(TIFFScanlineSize(tif)); - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, 0); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -:c:func:`TIFFScanlineSize` returns the number of bytes in -a decoded scanline, as returned by :c:func:`TIFFReadScanline`. -Note however that if the file had been create with samples -written in separate planes, then the above code would only -read data that contained the first sample of each pixel; -to handle either case one might use the following instead: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imagelength; - void *buf; - uint32_t row; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); - TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config); - buf = _TIFFmalloc(TIFFScanlineSize(tif)); - if (config == PLANARCONFIG_CONTIG) { - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, 0); - } else if (config == PLANARCONFIG_SEPARATE) { - uint16_t s, nsamples; - - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples); - for (s = 0; s < nsamples; s++) - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, s); - } - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Beware however that if the following code were used instead to -read data in the case ``PLANARCONFIG_SEPARATE``,... - -:: - - for (row = 0; row < imagelength; row++) - for (s = 0; s < nsamples; s++) - TIFFReadScanline(tif, buf, row, s); - -...then problems would arise if ``RowsPerStrip`` was not one -because the order in which scanlines are requested would require -random access to data within strips (something that is not supported -by the library when strips are compressed). - -Strip-oriented Image I/O ------------------------- - -The strip-oriented interfaces provided by the library provide -access to entire strips of data. Unlike the scanline-oriented -calls, data can be read or written compressed or uncompressed. -Accessing data at a strip (or tile) level is often desirable -because there are no complications with regard to random access -to data within strips. - -A simple example of reading an image by strips is: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t strip; - - buf = _TIFFmalloc(TIFFStripSize(tif)); - for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) - TIFFReadEncodedStrip(tif, strip, buf, (tmsize_t) -1); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Notice how a strip size of ``-1`` is used; :c:func:`TIFFReadEncodedStrip` -will calculate the appropriate size in this case. - -The above code reads strips in the order in which the -data is physically stored in the file. If multiple samples -are present and data is stored with ``PLANARCONFIG_SEPARATE`` -then all the strips of data holding the first sample will be -read, followed by strips for the second sample, etc. - -Finally, note that the last strip of data in an image may have fewer -rows in it than specified by the ``RowsPerStrip`` tag. A -reader should not assume that each decoded strip contains a full -set of rows in it. - -The following is an example of how to read raw strips of data from -a file: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t strip; - uint32_t *bc; - uint32_t stripsize; - - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc); - stripsize = bc[0]; - buf = _TIFFmalloc(stripsize); - for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) { - if (bc[strip] > stripsize) { - buf = _TIFFrealloc(buf, bc[strip]); - stripsize = bc[strip]; - } - TIFFReadRawStrip(tif, strip, buf, bc[strip]); - } - _TIFFfree(buf); - TIFFClose(tif); - } - } - -As above the strips are read in the order in which they are -physically stored in the file; this may be different from the -logical ordering expected by an application. - -Tile-oriented Image I/O ------------------------ - -Tiles of data may be read and written in a manner similar to strips. -With this interface, an image is -broken up into a set of rectangular areas that may have dimensions -less than the image width and height. All the tiles -in an image have the same size, and the tile width and length must each -be a multiple of 16 pixels. Tiles are ordered left-to-right and -top-to-bottom in an image. As for scanlines, samples can be packed -contiguously or separately. When separated, all the tiles for a sample -are colocated in the file. That is, all the tiles for sample 0 appear -before the tiles for sample 1, etc. - -Tiles and strips may also be extended in a z dimension to form -volumes. Data volumes are organized as "slices". That is, all the -data for a slice is colocated. Volumes whose data is organized in -tiles can also have a tile depth so that data can be organized in -cubes. - -There are actually two interfaces for tiles. -One interface is similar to scanlines, to read a tiled image, -code of the following sort might be used: - -:: - - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imageWidth, imageLength; - uint32_t tileWidth, tileLength; - uint32_t x, y; - void *buf; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tileWidth); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &tileLength); - buf = _TIFFmalloc(TIFFTileSize(tif)); - for (y = 0; y < imagelength; y += tilelength) - for (x = 0; x < imagewidth; x += tilewidth) - TIFFReadTile(tif, buf, x, y, 0); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -(once again, we assume samples are packed contiguously.) - -Alternatively a direct interface to the low-level data is provided -à la strips. Tiles can be read with -:c:func:`TIFFReadEncodedTile` or :c:func:`TIFFReadRawTile`, -and written with :c:func:`TIFFWriteEncodedTile` or -:c:func:`TIFFWriteRawTile`. For example, to read all the tiles in an image: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t tile; - - buf = _TIFFmalloc(TIFFTileSize(tif)); - for (tile = 0; tile < TIFFNumberOfTiles(tif); tile++) - TIFFReadEncodedTile(tif, tile, buf, (tmsize_t) -1); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Re-entrancy and Thread Safety ------------------------------ - -``Libtiff`` contains no static state except for the registered error / -warning handler. -All data for an opened TIFF file is encapsulated via the TIFF handle -returned by :c:func:`TIFFOpen`. Only the error handlers -:c:func:`TIFFError` and :c:func:`TIFFErrorExt`, -(as well as :c:func:`TIFFWarning` and :c:func:`TIFFWarningExt`) -use TIFF handle independent, common error handler functions. - -:c:func:`TIFFErrorHandlerExtR` and :c:func:`TIFFWarningHandlerExtR` -(introduced in ``libtiff`` 4.5) offer the option of registering -a separate error handler for each TIFF handle. -This error handler is called via the TIFF handle and is therefore -re-entrant, which means that it is naturally thread-safe. - -These handlers can already be set before opening a TIFF file using the -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and -:c:func:`TIFFOpenOptionsSetWarningHandlerExtR` functions, respectively. - -This allows multiple TIFF files to be processed simultaneously -with multiple threads, with each thread having its own TIFF file. -It is not possible (safe) to edit a single TIFF file with multiple -threads at the same time. - -Multi Page / Multi Image TIFF ------------------------------ - -TIFF images can contain more than one image or page and each image can -have sub-images. Furthermore, additional information about an image -can be put into *custom* TIFF directories, such as EXIF or GPS. -Writing TIFF files with more than one directory (IFD) is not easy -because some side effects need to be known. -How to read and write multi page TIFF files using ``libtiff`` is explained -in :doc:`/multi_page`. -For custom directories refer to :doc:`/functions/TIFFCustomDirectory`. - - -Other Stuff ------------ - -Some other stuff will almost certainly go here... diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/multi_page.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/multi_page.rst.txt deleted file mode 100644 index a3b9001..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/multi_page.rst.txt +++ /dev/null @@ -1,213 +0,0 @@ -Multi Page / Multi Image TIFF -============================= - -There may be more than one :ref:`Image File Directory (IFD) ` -in a TIFF file. Each IFD defines a :ref:`subfile `. - -One potential use of *subfiles* is to describe related images, -such as the pages of a facsimile transmission or reduced-resolution images -of the first full-resolution image. -Such files are also named "*multi-page* TIFF" or "*multi-image* TIFF". - -There are two mechanisms for storing multiple images in a TIFF file: - -1. A **main-IFD chain**, where the images are stored in linked IFDs (directories). - This mechanism is widely used. -2. A **SubIFD chain**, where additional images are stored within the SubIFD tag - of a main-IFD. Such child images provide extra information for the parent image - - such as a subsampled version of the parent image. - SubIFD chains are rarely supported. - For SubIFD refer also to - `Adobe PageMaker® 6.0 TIFF Technical Notes `_ - -.. _SubIFDAccess: - -Sub IFD chains --------------- - -In the case of several SubIFDs of a main image, there are two possibilities -that are not even mutually exclusive. - -a. The ``SubIFD`` tag contains an array with all offsets of the SubIFDs. - This is called SubIFD tree and DNG recommends the use of SubIFD trees, - as described in the TIFF-EP specification. SubIFD chains are not supported. -b. The SubIFDs are concatenated with their ``NextIFD`` parameters - to a SubIFD chain. - -LibTiff does support SubIFD chains partially. When the first -``SubIFD`` tag is activated and read with :c:func:`TIFFSetSubDirectory()`, -the following can be parsed with :c:func:`TIFFReadDirectory()`. -The *tif_curdir* is just incremented from its current value -and thus gets arbitrary values when parsing through SubIFD chains. -When the SubIFDs are not chained, each offset -within the SubIFD array has to be activated and read individually. -:c:func:`TIFFSetDirectory()` only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain. - -Writing Multi Page TIFF ------------------------ - -The following example code shows how to write multi-page TIFF -as main-IFD chain and as SubIFD chain. -``libtiff`` writes SubIFDs as an array of IFDs that are not chained -additionally, as Adobe PageMaker® 6.0 TIFF Technical Notes suggests. - -.. highlight:: c - -:: - - #include - - int main(int argc, const char **argv) - { - TIFF *tiff; - - /* Define the number of pages/images (main-IFDs) you are going to write */ - int number_of_images = 3; - - /* Define the number of sub - IFDs you are going to write */ - #define NUMBER_OF_SUBIFDs 2 - int number_of_sub_IFDs = NUMBER_OF_SUBIFDs; - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = { - 0UL}; /* array for SubIFD tag */ - int blnWriteSubIFD = 0; - - if (!(tiff = TIFFOpen("multiPageTiff2.tif", "w"))) - return 1; - - for (int i = 0; i < number_of_images; i++) - { - char pixel[1] = {128}; - - TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - - /* For the last but one multi-page image, add a SubIFD e.g. for a - * thumbnail */ - if (number_of_images - 2 == i) - blnWriteSubIFD = 1; - - if (blnWriteSubIFD) - { - /* Now here is the trick: the next n directories written - * will be sub-IFDs of the main-IFD (where n is number_of_sub_IFDs - * specified when you set the TIFFTAG_SUBIFD field. - * The SubIFD offset array sub_IFDs_offsets is filled automatically - * with the proper offset values by the following number_of_sub_IFDs - * TIFFWriteDirectory() calls and updated in the related main-IFD - * with the last call. - */ - if (!TIFFSetField(tiff, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - return 1; - } - - /* Write dummy pixel to image */ - if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0) - return 1; - /* Write image / directory to file */ - if (!TIFFWriteDirectory(tiff)) - return 1; - - if (blnWriteSubIFD) - { - /* A SubIFD tag has been written for that main-IFD and this - * triggers that previous TIFFWriteDirectory() to switch to the - * SubIFD-chain for the next number_of_sub_IFDs writings. - * Thus, only the thumbnail images need to be - * set up and written to file using TIFFWriteDirectory(). - * The last of this TIFFWriteDirectory() calls will setup - * the next fresh main-IFD. - */ - for (int i = 0; i < number_of_sub_IFDs; i++) - { - TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tiff, TIFFTAG_SUBFILETYPE, - FILETYPE_REDUCEDIMAGE)) - return 1; - - /* Write dummy pixel to thumbnail image */ - pixel[0] = 64; - if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0) - return 1; - /* Writes now in the SubIFD chain */ - if (!TIFFWriteDirectory(tiff)) - return 1; - - blnWriteSubIFD = 0; - } - } - } - TIFFClose(tiff); - return 0; - } - -Reading Multi Page TIFF ------------------------ - -For a reading example see code of `tools/tiffinfo.c` or below: - -.. highlight:: c - -:: - - /* Reading of multi-page and SubIFD images (subfiles) */ - if (!(tiff = TIFFOpen(filename, "r"))) - return 1; - - tdir_t currentDirNumber = TIFFCurrentDirectory(tiff); - - /* The first directory is already read through TIFFOpen() */ - int blnRead = 0; - do - { - /*Check if there are SubIFD subfiles */ - void *ptr; - if (TIFFGetField(tiff, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - - for (int i = 0; i < number_of_sub_IFDs; i++) - { - /* Read first SubIFD directory */ - if (!TIFFSetSubDirectory(tiff, sub_IFDs_offsets[i])) - return 1; - /* Check if there is a SubIFD chain behind the first one from - * the array, as specified by Adobe */ - while (TIFFReadDirectory(tiff)) - /* analyse subfile */ - ; - } - /* Go back to main-IFD chain and re-read that main-IFD directory */ - if (!TIFFSetDirectory(tiff, currentDirNumber)) - return 1; - } - /* Read next main-IFD directory (subfile) */ - blnRead = TIFFReadDirectory(tiff); - currentDirNumber = TIFFCurrentDirectory(tiff); - } while (blnRead); - TIFFClose(tiff); - - - - -See also --------- - -:doc:`terms`, -:doc:`/functions/TIFFSetDirectory` (3tiff), -:doc:`/functions/TIFFWriteDirectory` (3tiff), -`Adobe PageMaker® 6.0 TIFF Technical Notes `_, -`Example from StackOverflow `_ \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/acknowledgements.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/acknowledgements.rst.txt deleted file mode 100644 index a3d9da9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/acknowledgements.rst.txt +++ /dev/null @@ -1,102 +0,0 @@ -Acknowledgments -=============== - -.. image:: ../images/ring.gif - :width: 124 - :alt: ring - -Maintainers ------------ - -The LibTIFF software was written by Sam Leffler while working for -Silicon Graphics. - -Silicon Graphics has seen fit to allow us to give this work away. It -is free. There is no support or guarantee of any sort as to its -operations, correctness, or whatever. If you do anything useful with -all or parts of it you need to honor the copyright notices. It would -also be nice to be acknowledged. - -LibTIFF as been maintained by cast of others since 1999. - -The persons currently actively maintaining and releasing libtiff are: - -* Even Rouault -* `Bob Friesenhahn `_ - -Significant maintainers in the past (since the 3.5.1 release) were: - -* `Frank Warmerdam `_ -* `Andrey Kiselev `_ -* Joris Van Damme -* Lee Howard - - -Contributors ------------- - -The LZW algorithm is derived from the compress program (the proper attribution -is included in the source code). - -The Group 3 fax stuff originated as code from Jef Poskanzer, but has since -been rewritten several times. The latest version uses an algorithm from -Frank Cringle -- consult :file:`libtiff/mkg3states.c` and -:file:`libtiff/tif_fax3.h` for further information. - -The JPEG support was written by Tom Lane and is dependent on the -excellent work of Tom Lane and the Independent JPEG Group (IJG) who distribute -their work under friendly licensing similar to this software. Joris Van Damme -implemented the robust Old JPEG decoder (as included in libtiff since version -3.9.0, there was another Old JPEG module in older releases, which was -incomplete and unsuitable for many existing images of that format). - -JBIG module was written by Lee Howard and depends on JBIG library from the Markus -Kuhn. - -Many other people have by now helped with bug fixes and code; a few of -the more persistent contributors have been: - -.. list-table:: Contributors - :widths: 10 - :header-rows: 0 - - * - Bjorn P. Brox - * - Dan McCoy - * - J.T. Conklin - * - Richard Minner - * - Frank D. Cringle - * - Richard Mlynarik - * - Soren Pingel Dalsgaard - * - Niles Ritter - * - Steve Johnson - * - Karsten Spang - * - Tom Lane - * - Peter Smith - * - Brent Roman - * - Mike Welles - * - Frank Warmerdam - * - Greg Ward - * - Stanislav Brabec - * - Roman Shpount - * - Peter Skarpetis - * - Arvan Pritchard - * - Bernt Herd - * - Joseph Orost - * - Phil Beffery - * - Ivo Penzar - * - Francois Dagand - * - Albert Chin-A-Young - * - Bruce A. Mallett - * - Dwight Kelly - * - Andrey Kiselev - * - Ross Finlayson - * - Dmitry V. Levin - * - Bob Friesenhahn - * - Lee Howard - * - Joris Van Damme - * - Tavis Ormandy - * - Richard Nolde - * - Even Rouault - * - Roger Leigh - -(apologies to anyone that was inadvertently not listed.) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/bugs.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/bugs.rst.txt deleted file mode 100644 index 41cc209..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/bugs.rst.txt +++ /dev/null @@ -1,49 +0,0 @@ -Reporting Bugs -============== - -.. image:: ../images/cover.jpg - :width: 110 - :alt: cover - - -Overview --------- - -The LibTIFF project uses `GitLab issues `_ -to report and manage bugs and feature requests. - -Please let us know when you find a problem or fix a bug. - -Previously, the project used -`MapTools.org bugzilla `_ -to track bugs. All remaining tickets in that bugzilla instance were -migrated to GitLab issues, and this system should no longer be used. -All bugs filed in a older bugzilla at -'RemoteSensing.org (bugzilla.remotesensing.org)' (pre-April 2008) -have unfortunately been lost. - - -Reporting a bug ---------------- - -If you think you've discovered a bug, please first check to see if it is -already known by looking at the list of already reported bugs. Also, please -verify that the problem is still reproducible with the current development -software from GitLab. - -If you'd like to enter a new bug report, you can create a -`new GitLab issue `_ - -Of course, reporting bugs is no substitute for discussion. -Please see the :doc:`mailinglist` page for further details. - - -Reporting a security issue --------------------------- - -If you'd like to inform us about some kind of security issue that should not -be disclosed for a period of time, then you can contact the maintainers directly. -Send a copies of your report to the following people: - -* Frank Warmerdam ``_ -* Bob Friesenhahn ``_. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/index.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/index.rst.txt deleted file mode 100644 index 9f6971c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/index.rst.txt +++ /dev/null @@ -1,27 +0,0 @@ -############### -LibTIFF Project -############### - -The LibTIFF project provides free software maintained by a small community of software developers. See -:doc:`acknowledgements` for further details. - -Questions should be sent to the :doc:`mailinglist`. - -.. note:: - - Please do not email the maintainers personally, especially when asking - questions such as "when is the next release?". Please use the public mailing lists. - While the maintainers and contributors to LibTIFF are primarily professional software - developers, none of us are paid to work on LibTIFF directly, and almost all the - activity is voluntary and unpaid. - - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - license - mailinglist - bugs - psc - acknowledgements diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/license.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/license.rst.txt deleted file mode 100644 index 9c928bf..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/license.rst.txt +++ /dev/null @@ -1,24 +0,0 @@ -LibTIFF License -=============== - -| Copyright © 1988-1997 Sam Leffler -| Copyright © 1991-1997 Silicon Graphics, Inc. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/mailinglist.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/mailinglist.rst.txt deleted file mode 100644 index e6490f1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/mailinglist.rst.txt +++ /dev/null @@ -1,29 +0,0 @@ -Mailing List -============ - - -Overview --------- - -The `tiff@lists.osgeo.org `_ mailing list is for users of the LibTIFF software, and -discussion TIFF issues in general. - - -Subscription ------------- - -The mailing list managed with the Mailman software, and the web interface for subscribing -and managing your access to the list is at: ``_ - -Posts to the list are only accepted from members of the list. - - -Archive -------- - -A Long Term Archive -including most messages from April 2024 back to 1993 has been archived in a text file archive -that can be download: `TML.zip `_ -or `TML.tar.xz `_. - -There is no archive for the mailing list messages anymore. \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/project/psc.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/project/psc.rst.txt deleted file mode 100644 index b72f47b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/project/psc.rst.txt +++ /dev/null @@ -1,18 +0,0 @@ -.. _psc: - -Project Steering Committee -========================== - -As of April 2024, the project has been placed in the hands of a Project Steering Committee. This project steering committee operates under the rules of :ref:`rfc1_psc`, and is overall responsible for decisions related to the libtiff project. The current members are: - -- Bob Friesenhahn (@bobfriesenhahn) -- Su Laus (@Su_Laus) -- Roger Leigh (@rleigh) -- Timothy Lyanguzov (@theta682) -- Olivier Paquet (@1-Olivier) -- Leonard Rosenthol (@lrosenthol) -- Even Rouault (@rouault) - -Note that discussion of proposals to the PSC take place on the libtiff mailing list -(tiff@lists.osgeo.org, requiring subscription at https://lists.osgeo.org/mailman/listinfo/tiff), -and input from all subscribers is welcome. A list of past :ref:`rfcs` is available for review. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/historical.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/historical.rst.txt deleted file mode 100644 index a72482a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/historical.rst.txt +++ /dev/null @@ -1,48 +0,0 @@ -Old release history -=================== - -Older LibTIFF releases. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - v3.9.5 - v3.9.4 - v3.9.3 - v3.9.2 - v3.9.1 - v3.9.0 - v3.9.0beta - v3.8.2 - v3.8.1 - v3.8.0 - v3.7.4 - v3.7.3 - v3.7.2 - v3.7.1 - v3.7.0 - v3.7.0beta2 - v3.7.0beta - v3.7.0alpha - v3.6.1 - v3.6.0 - v3.5.7 - v3.5.6beta - v3.5.5 - v3.5.4 - v3.5.3 - v3.5.2 - v3.5.1 - v3.4beta036 - v3.4beta035 - v3.4beta034 - v3.4beta033 - v3.4beta032 - v3.4beta031 - v3.4beta029 - v3.4beta028 - v3.4beta024 - v3.4beta018 - v3.4beta016 - v3.4beta007 diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/index.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/index.rst.txt deleted file mode 100644 index d3a4018..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/index.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -Release history -=============== - -LibTIFF releases. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - v4.7.1 - v4.7.0 - v4.6.0 - v4.5.1 - v4.5.0 - v4.4.0 - v4.3.0 - v4.2.0 - v4.1.0 - v4.0.10 - v4.0.9 - v4.0.8 - v4.0.7 - v4.0.6 - v4.0.5 - v4.0.4 - v4.0.4beta - v4.0.3 - v4.0.2 - v4.0.1 - v4.0.0 - historical diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta007.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta007.rst.txt deleted file mode 100644 index 2c9cec9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta007.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -Changes in TIFF v3.4beta016 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta016 (no release tag) - Previous Version v3.4beta004 (no references to earlier releases exist) - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* bit order was corrected for Pentium systems -* a new define, :c:macro:`HOST_BIGENDIAN`, was added for code that - wants to statically use information about native cpu byte order - - -Library changes ---------------- - -* the G3/G4 decoder was replaced by a new one that is faster and - has smaller state tables -* Niles Ritter's client tag extension hooks were added -* a new routine :c:func:`TIFFCurrentDirOffset` was added for - applications that want to find out the file offset of a TIFF directory -* the calculation of the number of strips in an image was corrected - for images with certain esoteric configurations -* a potential memory leak (very unlikely) was plugged -* the ``TIFFReadRGBAImage`` support was completely rewritten - and new, more flexible support was added for reading images into - a fixed-format raster -* YCbCr to RGB conversion done in the :c:func:`TIFFReadRGBAImage` support - was optimized -* a bug in JPEG support calculation of strip size was corrected -* the LZW decoder was changed to initialize the code table to zero - to lessen potential problems that arise when invalid data is decoded -* :c:func:`tiffcomp.h` is now aware of OS/2 -* some function prototypes in :file:`tiffio.h` and :file:`tiffiop.h` - that contained parameter names have been changed to avoid complaints - from certain compilers - - -Portability support changes ---------------------------- - -* :file:`Makefile.in` has been corrected to use the parameters - chosen by the :program:`configure` script - - -Tools changes -------------- - -* :program:`fax2ps` has been rewritten and moved over from the user - contributed software -* an uninitialized variable in :program:`pal2rgb` has been fixed -* :program:`ras2tiff` now converts 24-bit RGB raster data so that - samples are written in the proper order -* :program:`tiff2ps` has been updated to include fixes - and enhancements from Alberto Accomazzi -* :program:`tiffcp` now has a "``-o``" option to select a directory - by file offset -* :program:`tiffinfo` is now capable of displaying the raw undecoded - image data in a file -* :program:`tiffgt` has been rewritten to use the new ``TIFFRGBAImage`` - support and to handle multiple files diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta016.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta016.rst.txt deleted file mode 100644 index b4b0817..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta016.rst.txt +++ /dev/null @@ -1,71 +0,0 @@ -Changes in TIFF v3.4beta016 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta016 (no release tag) - Previous Version :doc:`v3.4beta007 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for configuring the Deflate codec -* support was added for the HTML documentation -* codecs that are not configured for inclusion in the library - are no longer compiled - - -Library changes ---------------- - -* support was added for registering new codecs external to the library - and for overriding the codecs that are builtin to the library -* emulation support for the old ``DataType`` tag was improved -* support was added for the ``SMinSampleValue`` - and ``SMaxSampleValue`` tags -* the library no longer ignores ``TileWidth`` and ``TileLength`` - tags whose values are not a multiple of 16 (per the spec); this - permits old, improperly written, images to be read -* the support for the ``Predictor`` tag was placed in a reusable - module so that it can be shared by multiple codecs -* experimental compression support was added for the Deflate algorithm - (using the freely available zlib package) -* a new routine, :c:func:`TIFFWriteBufferSetup` was added à la the - routine :c:func:`TIFFReadBufferSetup` -* the DSO version of the library is now statically linked with the - JPEG and Deflate libraries; this means applications that link against - the DSO do not also need to link against these ancillary libraries - - -Tools changes -------------- - -* all the tools now use common code to process compress-oriented arguments -* :program:`tiffdump` should now compile on a Macintosh with MPW - - -Documentation changes ---------------------- - -* everything was updated - - -Contributed software changes ----------------------------- - -* :file:`contrib/dbs/xtiff` was made to compile -* :file:`contrib/mac-mpw` is new support for compiling the software on - a Macintosh under MPW -* :file:`contrib/tags` is information on how to use the tag extension - facilities; consult :file:`contrib/tags/README` for details diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta018.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta018.rst.txt deleted file mode 100644 index bffb023..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta018.rst.txt +++ /dev/null @@ -1,50 +0,0 @@ -Changes in TIFF v3.4beta018 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta018 (no release tag) - Previous Version :doc:`v3.4beta016 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* configure now recognizes IRIX 6.x systems -* configure now uses ``ENVOPTS`` when searching for an ANSI - C compiler; this fixes a problem configuring the software under - HP/UX with the native C compiler -* configure now correctly recognizes memory-mapped files are supported - under AIX - - -Library changes ---------------- - -* ``make install`` now properly installs the include files -* some portability fixes from Bjorn Brox -* the G3/G4 codec now warns about decoded rows that are longer than - the image/tile width -* changes from Frank Cringle to make the library work with the - gcc-specific bounds checking software -* miscellaneous fixes to :c:func:`TIFFPrintDirectory` -* bug fix to correct a problem where :c:func:`TIFFWriteRawStrip` - could not be used to automatically grow an image's length - - -Tools changes -------------- - -* fixes from Frank Cringle to update :program:`fax2tiff` -* portability fixes to :program:`tiff2bw` and :program:`tiffcmp` -* :program:`tiffdump` now uses the byte swapping routines in the library diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta024.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta024.rst.txt deleted file mode 100644 index 1713dd3..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta024.rst.txt +++ /dev/null @@ -1,99 +0,0 @@ -Changes in TIFF v3.4beta024 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta024 (no release tag) - Previous Version :doc:`v3.4beta018 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* It is now possible to setup the software to build only the - library; :program:`configure` recognizes this is the intent when the - :file:`VERSION`, :file:`tiff.alpha`, and :file:`tif_version.c` - files are in the local directory (i.e. :file:`.`) -* :program:`configure` no longer tries to setup HTML materials -* include file directories needed in building the library are now - specified with a ``DIRS_LIBINC`` config parameter -* configure no longer checks for alternate compilers if ``CC`` - is set; if the specified compiler is not found or is not appropriate - the configuration procedure aborts -* the :file:`port.h` file generated by configure is now used only by - the library and as such as have been moved to the :file:`libtiff` - directory -* there is beginning support for building DSO's on systems other than IRIX -* configure now verifies the JPEG and zlib directory pathnames by - checking for well-known include files in these directories -* configure no longer creates the :file:`dist` directory needed only - on SGI machines (for building SGI binary distributions) -* a bug was fixed whereby configure would incorrectly set - ``ENVOPTS`` when building the software with gcc under AIX - - -Library changes ---------------- - -* two new typedefs were added to :file:`tiff.h`: :c:type:`int8` - and :c:type:`uint8` for signed and unsigned 8-bit quantities, - respectively; these are currently used only by - programs in the :file:`tools` directory -* the ``BadFaxLines``, ``CleanFaxData``, and - ``ConsecutiveBadFaxLines`` tags are now supported with - Group 4 compression -* byte order is now correctly identified on 64-bit machines -* a bug was fixed in the PackBits decoder where input data would - appear short when a no-op run was present -* a bug was fixed in calculations with very wide strips -* :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteRawStrip` - were extended to support dynamically growing the number of - strips in an image (must set ``ImageLength`` prior to - making calls though) -* :c:func:`TIFFDefaultTileSize` now rounds tile width and height - up to a multiple of 16 pixels, as required by the TIFF 6.0 specification -* the file :file:`version.h` is now built by a new :program:`mkversion` - program; this was done for portability to non-UNIX systems -* support was added for the Acorn RISC OS (from Peter Greenham) -* the builtin codec table is now made ``const`` when compiling - under VMS so that :file:`libtiff` can be built as a shared library -* support for the PowerPC Mac (from Ruedi Boesch) -* support for Windows NT/Windows 95 (from Scott Wagner) - - -Tools changes -------------- - -* the tools no longer include :file:`port.h` -* various portability fixes; mostly to eliminate implicit assumptions - about how long :c:type:`int32` data types are -* PostScript Level II additions to :program:`tiff2ps` from Bjorn Brox -* :program:`sgi2tiff` now handles RGBA images - - -Documentation changes ---------------------- - -* the documentation has been updated to reflect the current state of - the software -* some routines have been moved to different manual pages - to group like-routines together - - -Contributed software changes ----------------------------- - -* support was added for the Acorn RISC OS (from Peter Greenham) -* support for Windows NT/Windows 95 contributed for a previous - version of this software was sort of incorporated (it's broken - right now) (from Scott Wagner) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta028.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta028.rst.txt deleted file mode 100644 index 77cd2fc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta028.rst.txt +++ /dev/null @@ -1,105 +0,0 @@ -Changes in TIFF v3.4beta028 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta028 (no release tag) - Previous Version :doc:`v3.4beta024 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* a "``-noninteractive``" flag was added to configure to - control whether or not it prints and prompts for configuration information -* various typos and fixes were made in configure for the the - library-only build support (this and other configure fixes from - `Richard Mlynarik `_) -* bugs were fixed in the handling of pathnames supplied for external - packages; e.g. ``DIR_JPEG`` -* the handling of ``SETMAKE`` is now done properly -* the default prototype function declaration for :c:func:`pow` was corrected -* a bug was fixed in :file:`libtiff/Makefile.in` that caused installation - to fail on systems without DSO support - - -Library changes ---------------- - -* Acorn RISC O/S support that was accidentally left out of the - left out of the previous distribution is present (from Peter Greenham) -* complaints about unknown and/or unsupported codecs have been - delayed until they are invoked; this permits applications to open - images and look at tags even if the image data is compressed with - an unknown/unsupported compression scheme -* bugs in handling unknown tags have been corrected; applications - that use multiple codecs, each with codec-specific tags, no longer - generate confusing error messages -* a missing pseudo-tag definition in the CCITT G3 codec was fixed - (this problem caused core dumps in the :program:`tiffcp` program) -* pseudo-tags are now treated specially; they are always considered - to be set (i.e. they do not use bits in the ``FIELD_*`` bit-vectors). -* the use of strip chopping can now be controlled on a per-file basis - through a mode parameter supplied when opening a file ("``C``" to - enable strip chopping and "``c``" to disable) -* two bugs were fixed in the writing of opposite-endian byte-order - files -* support was added for three new fax-related tags registered to - SGI: ``FaxRecvParams``, ``FaxRecvTime``, and ``FaxSubAddress`` -* the bit order of image data read and written can now be controlled - on a per-file basis through a mode parameter supplied when opening - a file ("``B``" to force MSB2LSB bit order, "``L``" for LSB2MSB bit - order, and "``H``" for the bit order of the native CPU) -* the byte order of image and tag data written to newly-created files - can now be controlled on a per-file basis through a mode parameter - supplied when opening a file ("``b``" to force Big-Endian byte order - and "``l``" to force Little-Endian byte order) -* the use memory-mapped files for images opened read-only can now - be controlled on a per-file basis through a mode parameter supplied - when opening a file ("``M``" to enable use of memory-mapped files - and "``m``" to disable use) -* the use of the :c:macro:`WIN32` define in :file:`tiffiop.h` has - been replaced by :c:macro:`__WIN32__` - - -Tools changes -------------- - -* :program:`fax2ps` now does a ``save`` and ``restore`` - around each page of PostScript; this fixes a problem with VM - overflow when printing a many-page document on some printers -* a bug in the handling of 3-channel images by :program:`ras2tiff` - was fixed -* :program:`tiffcp` has new options to control the byte order of - newly created files: "``-B``" for Big-Endian byte order, "``-L``" - for Little-Endian byte order; a "``-M``" option to disable the - use of memory-mapped files, and a "``-C``" option to disable the - use of strip chopping -* bugs were fixed in :program:`tiffcp` handling of codec-specific tags - - -Documentation changes ---------------------- - -* the :c:func:`TIFFOpen` page has been updated to reflect the new - optional open mode parameters - -Contributed software changes ----------------------------- - -* :file:`contrib/win95` contains information and code from `Philippe Tenenhaus - <100423.3705@compuserve.com>`_ - about using the software under Windows 95 -* :file:`contrib/winnt` contains information and code from `Dave Dyer - `_ - about using the software under Windows NT diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta029.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta029.rst.txt deleted file mode 100644 index c9112ae..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta029.rst.txt +++ /dev/null @@ -1,52 +0,0 @@ -Changes in TIFF v3.4beta029 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta029 (no release tag) - Previous Version :doc:`v3.4beta028 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :program:`configure` now relativizes pathname references given in - "``-L``" options (as frequently specified when configuring - ancillary packages) -* problems related to configuring the software on Ultrix 4.4 have - been corrected -* the shell to use in Makefiles and scripts can now be set with the - ``SCRIPT_SH`` configuration parameter -* comments in :file:`config.site` now correctly indicate how to setup the - use of ancillary packages - - -Library changes ---------------- - -* mods for building the software on a Mac using the - MetroWerks CodeWarrior compilers -* a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in - a strip/tile might not be decoded; this was seen only when decoding - multi-strip images -* a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not - being properly registered - - -Contributed software changes ----------------------------- - -* :file:`contrib/mac-cw` contains information and code from `Niles Ritter - `_ - about building the software with the MetroWerks CodeWarrior compilers - on Macintosh systems diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta031.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta031.rst.txt deleted file mode 100644 index 6384958..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta031.rst.txt +++ /dev/null @@ -1,59 +0,0 @@ -Changes in TIFF v3.4beta031 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta031 (no release tag) - Previous Version :doc:`v3.4beta029 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :program:`configure` now captures significantly more information - in the :file:`config.log` file and provides more information when - it is unable to setup a configuration -* support was added for building shared libraries on more systems: - AIX, HPUX, Solaris, and Linux. -* a new configuration parameter ``LIBCOPTS`` was added for - passing arguments to the C compiler to use when building only - the library; this is part of the enhanced support for building - shared libraries -* include files for optional packages that reside in :file:`/usr/include` - are now handled correctly -* build trees may now be configured using either relative or absolute - pathnames to the source distribution -* several new configuration parameters were added, mainly for building - shared libraries: ``DIST_MAJOR``, ``DIST_MINOR``, - ``DIST_ALPHA``, and ``DSOSUF_VERSION`` - - -Library changes ---------------- - -* the Deflate support has been revised: it requires version 0.99 of - the zlib software distribution, **the output format has changed and - is incompatible with previous versions of this library** (each - strip now includes a header read and written by the zlib library) -* the codec name printed by the :c:func:`TIFFPrintDirectory` routine is now - taken from the codec table instead of from a builtin table; this means - that application-defined codecs are handled correctly -* a new symbol was added that contains the library version number; - this can be used to do a compile-time compatibility check of the - library version - -Documentation changes ---------------------- - -* the creation and installation of manual pages was redone; it now - implements the documented "configuration scheme" diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta032.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta032.rst.txt deleted file mode 100644 index 54cd695..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta032.rst.txt +++ /dev/null @@ -1,53 +0,0 @@ -Changes in TIFF v3.4beta032 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta032 (no release tag) - Previous Version :doc:`v3.4beta031 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* various fixups and subtle improvements to :program:`configure` - from Richard Mlynarik - - -Library changes ---------------- - -* a new codec from Pixar designed for high-resolution color images; - note that this codec is not configured by default -* a bug fix for reading tags with a single ``FLOAT`` value -* change to the :c:func:`TIFFGetField` calling convention: - a tag that has a single value of - type ``DOUBLE`` is now retrieved by passing a - ``double*`` instead of a - ``double**`` (this change makes the handling of tags with - ``DOUBLE`` values identical to the handling of tags with - ``FLOAT`` values) -* fix to VMS support for the handling of floating point values - - -Tools changes -------------- - -* :program:`tiffdump` now handles tags with ``FLOAT`` and ``DOUBLE`` - values - - -Contributed software changes ----------------------------- - -* updates to the Acorn OS support from Peter Greenham diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta033.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta033.rst.txt deleted file mode 100644 index 2299b2b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta033.rst.txt +++ /dev/null @@ -1,45 +0,0 @@ -Changes in TIFF v3.4beta033 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta033 (aka the v3.4 release) (no release tag) - Previous Version :doc:`v3.4beta032 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under OSF/1 - - -Library changes ---------------- - -* fixes to the Pixar codec -* portability mods for VMS - - -Tools changes -------------- - -* fixes to :program:`gif2tiff` and :program:`ppm2tiff` for building under MS/DOS -* portability mods to :program:`fax2ps` and :program:`ycbcr` for VMS - - -Contributed software changes ----------------------------- - -* a new package from Alexander Lehmann - for building the library and tools under MS/DOS with DJGPP v2 -* updated VMS support from Karsten Spang diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta034.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta034.rst.txt deleted file mode 100644 index 1189024..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta034.rst.txt +++ /dev/null @@ -1,37 +0,0 @@ -Changes in TIFF v3.4beta034 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta034 (no release tag) - Previous Version :doc:`v3.4beta033 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under NetBSD -* a bug was fixed in the DSO support for Linux -* the handling of version strings has changed slightly to simplify parsing -* a new parameter, ``TIFFLIBREF``, was added to control how the - library is referenced when linking programs in the :file:`tools` directory - - -Library changes ---------------- - -* DSO creation under Solaris now forces the DSO name with a ``-h`` option -* the interface to the :program:`mkversion` program was changed - to eliminate the need to parse files -* a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder -* ANSI IT8 TIFF/IT tag definitions were added to :file:`tiff.h` diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta035.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta035.rst.txt deleted file mode 100644 index cc96db2..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta035.rst.txt +++ /dev/null @@ -1,32 +0,0 @@ -Changes in TIFF v3.4beta035 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta035 (no release tag) - Previous Version :doc:`v3.4beta034 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added installing the HTML documentation -* support was added for building the library as a DSO under FreeBSD - - -Library changes ---------------- - -* the interface to the :program:`mkversion` program was restored to - the form used prior to v3.4beta034 -* several portability problems for 16-bit systems were fixed diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta036.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta036.rst.txt deleted file mode 100644 index df3b615..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.4beta036.rst.txt +++ /dev/null @@ -1,86 +0,0 @@ -Changes in TIFF v3.4beta036 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta036 (no release tag) - Previous Version :doc:`v3.4beta035 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under HP-UX with - the native C compiler -* tools are now built with explicit pathnames for the DSO under IRIX, - Solaris, and Linux -* DSO configuration support for Linux was changed to require that - :file:`libc.so` only be readable (not executable) - - -Library changes ---------------- - -* support was add for ICC: ``NumberOfInks``, and ``ICCProfile`` -* a memory leak caused by doing ``TIFFSetDirectory(0)`` was fixed -* a bug was fixed whereby certain multi-directory files were not - properly handled when accessed by mapping the data into memory -* the strip chopping support is now always compiled - into the library with the default usage controlled by a - :c:macro:`STRIPCHOP_DEFAULT` configuration parameter -* the strip chopping support no longer chops tiled images -* all static strings are now const---for shared libraries -* the logic for estimating the strip size of images without - ``StripByteCounts`` tag was improved by handling - ``PlanarContig`` images differently from ``PlanarSeparate`` -* a bug was fixed in the G3 codec when converting the Y resolution - of data specified in metric units -* a bug was fixed in the G3/G4 decoder for data where lines terminate - with a ``v0`` code -* the ``TIFFRGBAImage`` support was changed to scale 16-bit colormap - entries more conservatively to avoid problems with applications - that do not generate fully saturated pixel values -* the LZW decoder was changed to use a more conservative scheme when - bounds checking the hash table array; this avoids pitfalls with - systems that load objects into memory in unusual locations -* a bug was fixed in :c:func:`TIFFPrintDirectory` handling of the - ``InkNames`` tag -* :c:func:`TIFFPrintDirectory` now understands ``NumberOfInks`` - and ICC-related tags -* the routines for reading image data now provide more useful information - when a read error is encountered -* support was added for compiling with Microsoft Visual C++ 4.0 - - -Tools changes -------------- - -* a bug was fixed in :program:`pal2rgb` colormap handling -* :program:`tiff2ps`: - - * now includes John Wehle's changes for maintaining - the aspect ratio of images when scaling and for honoring the deadzone - on a page when generating PostScript Level II - * does a better job guarding against the mishandling - of greyscale images - * now correctly converts X- and Y-resolution values - specified in metric units -* :program:`tiffdump`: - - * has a new "``-m``" option to control the maximum number of indirect - data values printed for a tag (by default 24) - * understands several new tags - * now shows any terminating null in ASCII strings - -* :program:`tiffinfo` now suppresses strip chopping when interpreting an image; - a new "``-z``" option has been added to enable strip chopping diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.1.rst.txt deleted file mode 100644 index 3333d0e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.1.rst.txt +++ /dev/null @@ -1,41 +0,0 @@ -Changes in TIFF v3.5.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.1 (no release tag) - Previous Version v3.4beta037 (missing release notes, go to :doc:`v3.4beta036 `) - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -None. - - -Library changes ---------------- - -* Support was added for IPTC Newsphoto metadata (:c:macro:`TIFFTAG_IPTCNEWSPHOTO`) -* Support was added for photoshop caption handling (:c:macro:`TIFFTAG_PHOTOSHOP`) - - -Contributed software changes ----------------------------- - -* `Bill Radcliffe's `_ :program:`iptcutil` was - added to the :file:`contrib` subdirectory . It can convert an IPTC binary - blob to ASCII text and vice-versa. The blob itself can be extracted - from or added to an image with the `ImageMagick `_ - :program:`convert` (1) utility. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.2.rst.txt deleted file mode 100644 index 3286f8d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.2.rst.txt +++ /dev/null @@ -1,74 +0,0 @@ -Changes in TIFF v3.5.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.2 (no release tag) - Previous Version :doc:`v3.5.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* Corrected alpha versioning. - -* Removed distinction between alpha and release targets in :file:`Makefile.in`. - -* Added release.stamp target, which tags cvs tree, and updates - :file:`RELEASE-DATE` - -* Added ``releasediff`` target, which diffs tree with source as of - date in :file:`RELEASE-DATE` - -* Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving - away from alpha/non-alpha distinctions). - - -Library changes ---------------- - -* Added IRIX/gcc, and OSF/1 4.x support on behalf of - `Albert Chin-A-Young `_. - -* Added :c:func:`TIFFReassignTagToIgnore` API on behalf of - `Bruce Cameron `_. Man page still pending. - -* pre-remove :file:`so` link before softlink in ``LINUXdso`` action in - :file:`libtiff/Makefile.in` to avoid failure on ``LINUXdso`` builds other than - the first. - -* Fixed problem with :c:func:`cvtcmap` in :file:`tif_getimage.c` modifying the - colormaps owned by the TIFF handle itself when trying to fixup wrong - (eight bit) colormaps. Corrected by maintaining a private copy of - the colormap. - -* Added :c:func:`TIFFReadRGBATile`/:c:func:`TIFFReadRGBAStrip` support in - :file:`tif_getimage.c`. - -* Applied "``a``" mode fix to :file:`tif_win32.c`/:c:func:`TIFFOpen` as suggested - by `Christopher Lawton `_. - -* Set ``O_BINARY`` for :file:`tif_unix.c` :c:func:`open` ... used on cygwin for instance. - -* Added ``CYGWIN`` case in configure. - -* Applied Francois Dagand's patch to handle fax decompression bug. - (sizes >= 65536 were failing) - - -Contributed software changes ----------------------------- - -* Added :program:`addtiffo` (add overviews to a TIFF file) in contrib. Didn't - put it in tools since part of it is in C++. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.3.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.3.rst.txt deleted file mode 100644 index 987568d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.3.rst.txt +++ /dev/null @@ -1,97 +0,0 @@ -Changes in TIFF v3.5.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.3 (:tag:`Release-v3-5-3`) - Previous Version :doc:`v3.5.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -Please note the most important change: **LZW compression has been removed**. - -Unisys has the patent on LZW compression and have been very active in -their enforcement of late, demanding payments of $5000 or more from -websites using unlicensed software to create GIF's. They could well -do the same do persons using libtiff to create LZW compressed TIFF -images. - -From `Burn All GIF's Day `_: - - The catch is that it appears to be difficult or impossible to get a - Unisys license to use LZW in free software that complies with the Open - Source Definition - -Unfortunately, the removal of LZW compression means that saved image size has -grown dramatically. Without a change in the TIFF spec to support -another lossless compression format, this is unavoidable. - -The library can use zip for lossless compression, but as this is not -part of the spec, TIFFs using zip compression may not work with other -software. - -We will be making a patch available that will contain the LZW -compression code for users who have either obtained a license from -Unisys or are willing to risk it. - -LZW decompression is unchanged. - - -Software configuration changes ------------------------------- - -* Added zip creation to release makefile target - - -Library changes ---------------- - -* Added html for :file:`TIFFWriteTile.3t` man page. - -* Added some changes to :file:`tif_write.c` to support rewriting existing - fixed sized tiles and strips. Code mods disabled by default, only - enabled if :c:macro:`REWRITE_HACK` is defined for now. - -* Added :file:`TIFFWriteTile.3t` man page. - -* Added notes on use of :file:`makefile.vc` in :file:`build.html`, and fixed - email subscription address. - -* Did some casts cleaning up to reduce compiler warnings in :file:`tif_fax3.c`, - from `Bruce Cameron `_---modifications of - changes made by Frank (sun cc still complained on cast). - -* fixed various VC++ warnings as suggested by `Gilles Vollant - `_. - -* Modified :file:`TIFFquery.3t` man pages info on :c:func:`TIFFIsByteSwapped` to - not imply applications are responsible for image data swapping. - -* HTML-ized the man pages, added to :file:`html/man`. - -* Removed LZW Compression to comply with Unisys patent extortion. - -* Corrected one remaining ``16 -> 32`` bit value in :file:`tif_fax3.c`, - From `Ivo Penzar `_. - -* Added patch from Ivo Penzar to have :c:func:`TiffAdvanceDirectory` handle - memory mapped files. `Ivo Penzar `_. - - -Contributed software changes ----------------------------- - -* Fixed apocalypse-inducing y2k bug in :file:`contrib/ras/ras2tiff.c` diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.4.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.4.rst.txt deleted file mode 100644 index d0d8349..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.4.rst.txt +++ /dev/null @@ -1,45 +0,0 @@ -Changes in TIFF v3.5.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.4 (:tag:`Release-v3-5-4`) - Previous Version :doc:`v3.5.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* None. - - -Library changes ---------------- - -* Added Pixar tag support. Contributed by `Phil Beffery `_. -* Made one more change to :file:`tif_dir.c` for removal of LZW compression. Also added notice - when LZW compression invoked. -* Fixed bug that caused LZW (non) compression to segfault. Added - warning about LZW compression removed being removed, and why. - - -Tools changes -------------- - -* Changed default compression in tools to :c:macro:`TIFF_PACKBITS`, and changed usage descriptions - in tools to reflect removal of LZW compression -* Added ``nostrip`` to install in :file:`tools/Makefile.in` so that debugging - symbols are kept. -* Made Packbits the default compression in :file:`tools/tiff2rgba.c` instead - of LZW. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.5.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.5.rst.txt deleted file mode 100644 index 8c10d52..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.5.rst.txt +++ /dev/null @@ -1,91 +0,0 @@ -Changes in TIFF v3.5.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.5 (:tag:`Release-v3-5-5`) - Previous Version :doc:`v3.5.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :file:`configure`: added test for libc6 for linux targets. Bug reported by - `Stanislav Brabec `_. -* :file:`configure`: fixed bugs in sed scripts - (applied sed script ``s:/@:s;@:;s:/s;;:;:`` to configure). - fix submitted by `Stanislav Brabec `_. -* :file:`tools/iptcutil` was not in files list, and wasn't being - added to tar archive. :file:`Updated Makefile.in`. -* Added 3.5 docs to :file:`html/Makefile.in`. - Thanks to `Stanislav Brabec `_ -* Fixed :file:`tools/tiffcmp` so that ``stopondiff`` testing works. - Patch care of `Joseph Orost `_. -* Added :file:`fax3sm_winnt.c` to distribution list in :file:`Makefile.in`. -* Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. - - -Library changes ---------------- - -* :file:`tif_fax3.c`: Fixed serious bug introduced during the ``uint16->uint32`` - conversion for the run arrays. -* Set :c:member:`td_sampleformat` default to :c:macro:`SAMPLEFORMAT_UINT` instead of - :c:macro:`SAMPLEFORMAT_VOID` in :c:func:`TIFFDefaultDirectory` in :file:`tif_dir.c`. -* Added "GetDefaulted" support for :c:macro:`TIFFTAG_SAMPLEFORMAT` in :file:`tif_aux.c`. -* Patched :file:`tif_fax3.c` so that ``dsp->runs`` is allocated a bit bigger - to avoid overruns encountered with :file:`frle_bug.tif`. -* Modified :file:`tif_unix.c` to support 2-4GB seeks if :c:macro:`USE_64BIT_API` is - set to 1, and added default (off) setting in :file:`tiffconf.h`. This - should eventually be set by the configure script somehow. - The original work on all these 2-4GB changes was done by - `Peter Smith `_. -* Modified :file:`tif_win32.c` to support 2-4GB seeks. -* tentatively changed :c:type:`toff_t` to be unsigned instead of signed to - facilitate support for 2-4GB files. -* Updated a variety of files to use :c:type:`toff_t`. Fixed some mixups - between :c:type:`toff_t` and :c:type:`tsize_t`. -* Set :c:member:`tif_rawdatasize` to zero when freeing raw data buffer in - :c:func:`TIFFWriteDirectory`. -* Enabled :c:macro:`REWRITE_HACK` in :file:`tif_write.c` by default. -* Fix bug in :file:`tif_write.c` when switching between reading one directory - and writing to another. -* Made :c:func:`TIFFWriteCheck` public, and added :c:func:`TIFFCreateDirectory` -* Added :doc:`/functions/TIFFmemory` functions to :file:`libtiff.def`. -* Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. - - -Tools changes -------------- - -* :program:`fax2ps`: - - * Fixed mixup of width and height in bounding box statement - as per submission by `Nalin Dahyabhai `_. - * Modified :c:var:`printruns` to take :c:type:`uint32` instead of :c:type:`uint16`. - Patch courtesy of `Bernt Herd `_. -* Largely reimplemented :file:`contrib/addtiffo` to avoid temp files, - updating the TIFF file in place. Fixed a few other bugs to. -* Altered descriptions in tools to reflect "by default" lzw not supported - - -LZW compression kit changes ---------------------------- - -* created :file:`mangle-src.sh` -- sed scripts to munge src into LZW enabled format. - Thanks to `Stanislav Brabec `_. -* created :file:`Makefile` -* merged :file:`tif_dir.c` with current source. -* Created lzw compression kit, as a new CVS module (``libtiff-lzw-compression-kit``). -* Updated :file:`index.html` to note lzw compression kit. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.6beta.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.6beta.rst.txt deleted file mode 100644 index 55d17bd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.6beta.rst.txt +++ /dev/null @@ -1,135 +0,0 @@ -Changes in TIFF v3.5.6beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.6beta (no release tag) - Previous Version :doc:`v3.5.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* Added ``GNULDdso`` target and switched linux and freebsd to use it. -* :file:`tools/Makefile.in`: Modified to install properly on SGI. -* :file:`configure`: Fixed DSO test for Linux as per patch from - `Jan Van Buggenhout `_. - - -Library changes ---------------- - -* :file:`tif_dir.c`: Clear :c:macro:`TIFF_ISTILED` flag in :c:macro:`TIFFDefaultDirectory` - as per :bugzilla-rs:`18` - from ``_. - -* Modified :file:`tif_packbits.c` decoding to avoid overrunning the - output buffer, and to issue a warning if data needs to be - discarded. See :bugzilla-rs:`18` - -* Modified :c:func:`TIFFClientOpen` to emit an error on an attempt to - open a compressed file for update (``O_RDWR``/"``r+``") access. This is - because the compressor/decompressor code gets very confused when - the mode is ``O_RDWR``, assuming this means writing only. See - bug :bugzilla-rs:`13` - -* Applied patch for 0x0000 sequences in :file:`tif_fax3.h` definition - of :c:macro:`EXPAND1D` as per bug :bugzilla-rs:`11` (from Roman). - -* Fixed :file:`tiffcomp.h` to avoid win32 stuff if unix ``#defined``, to improve - cygwin compatibility. - -* Applied patch from Roman Shpount to :file:`tif_fax3.c`. This seems to - be a proper fix to the buffer sizing problem. See - :bugzilla-rs:`11` - -* Fixed :file:`tif_getimage.c` to fix overrun bug with YCbCr images without - downsampling. :bugzilla-rs:`10` - Thanks to `Nick Lamb `_ for reporting the - bug and proving the patch. - -* Fixed :file:`tif_jpeg.c` to avoid destroying the decompressor before - we are done access data thanks to bug report from: - `Michael Eckstein `_. - -* :file:`tif_open.c`: Don't set ``MMAP`` for ``O_RDWR`` files. - -* :file:`tif_open.c`: Set :c:macro:`STRIPCHOP_DEFAULT` for ``O_RDWR`` as well as ``O_RDONLY`` - so that files opened for update can be strip chopped too. - -* :file:`tif_read.c`: fixed up bug with files missing rowsperstrip and - the strips per separation fix done a few weeks ago. - -* Tentatively added support for :c:macro:`SAMPLEFORMAT_COMPLEXIEEEFP`, and - :c:macro:`SAMPLEFORMAT_COMPLEXINT`. - -* :file:`index.html`, :file:`bugs.html`: added bugzilla info. - -* :file:`tif_read.c`: fix subtle bug with determining the number of - rows for strips that are the last strip in a separation but - not the last strip of all in :c:func:`TIFFReadEncodedStrip`. - -* Applied 16/32 bit fix to :file:`tif_fax3.c`. Fix supplied by - `Peter Skarpetis `_. - -* Modified :file:`tiffio.h` logic with regard to including :file:`windows.h`. It - won't include it when building with :c:macro:`__CYGWIN__`. - -* :file:`README`: update to mention {REDACTED - defunct web site}, don't list Sam's old - email address. - -* :file:`libtiff/tif_dirread.c`: Don't use estimate strip byte count for - one tile/strip images with an offset, and byte count of zero. These - could be "unpopulated" images. - -* :file:`tif_win32.c`: Applied patch to fix overreads and ovverwrites - caught by BoundsChecker. From `Arvan Pritchard `_ (untested). - -* :file:`tif_getimage.c`: Applied patch to silence VC6 warnings. From - `Arvan Pritchard `__. - -* :file:`tif_lzw.c`: Applied patch to silence VC6 warnings. From - `Arvan Pritchard `__. - -* :file:`libtiff/tif_apple.c`: Applied "Carbon" support patches supplied by - `Leonard Rosenthol `_. May interfere - with correct building on older systems. If so, please let me know. - - -Tools changes -------------- - -* :file:`tools/rgb2ycbcr.c`: fixed output strip size to account for vertical - roundup if rows_per_strip not a multiple of vertical sample size. - -* :file:`tools/tiffsplit.c`: Copy :c:macro:`TIFFTAG_SAMPLEFORMAT`. - -* Modified :program:`tiff2bw` to ensure portions add to 100%, and that - white is properly recovered. See bug - :bugzilla-rs:`15` Patch - c/o `Stanislav Brabec `_ - - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo`: Added "averaging" resampling option. - -* Added :file:`contrib/stream` (stream io) code submitted by Avi Bleiweiss. - - -LZW compression kit changes ---------------------------- - -* updated :file:`tif_dir.c` to reflect changes to no-lzw :file:`tif_dir.c`. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.7.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.7.rst.txt deleted file mode 100644 index 97e9a28..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.5.7.rst.txt +++ /dev/null @@ -1,219 +0,0 @@ -Changes in TIFF v3.5.7 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.7 (:tag:`Release-v3-5-7`) - Previous Version :doc:`v3.5.6beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :file:`libtiff/libtiff.def`: Brent Roman submitted new version adding - several missing entry points. Also add a few other entry points - later. - -* :file:`configure`, :file:`Makefile.in`, etc: added support for ``OPTIMIZER`` being - set from :file:`config.site`. -* :file:`config.guess`: updated wholesale to an FSF version apparently - from 1998 (as opposed to 1994). This is mainly inspired by - providing for MacOS X support. - -* :file:`configure/config.site`: modified to check if ``-lm`` is needed for - ``MACHDEPLIBS`` if not supplied by :file:`config.site`. Needed for Darwin. -* :file:`libtiff/tiff.h`: Applied hack to try and resolve the problem - with the :file:`inttypes.h` include file on AIX. (bug :bugzilla-rs:`39`) - -* :file:`configure`, :file:`*Makefile.in`: Various changes to improve configuration - for HP/UX specifically, and also in general. (bug :bugzilla-rs:`40`) They include: - - * Try to handle :program:`/usr/bin/sh` instead of :program:`/bin/sh` where necessary. - * Upgrade to HP/UX 10.x+ compiler, linker and dso options. - * Fixed :c:func:`mmap` test to avoid ``MMAP_FIXED`` ... it isn't available on HP - * Use ``-${MAKEFLAGS}`` in sub makes from makefiles. - * Fixed ``SCRIPT_SH``/``SHELL`` handling. - -* :file:`configure`: Changes for DSO generation on AIX provided by - `John Marquart `_. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Modified to build DSOs properly - on Darwin thanks to `Robert Krajewski `_ and - `Keisuke Fujii `_. - -* :file:`configure`, :file:`libtiff/Makefile.in`: applied OpenBSD patches as per bug :bugzilla-rs:`61`. - -* :file:`Makefile.in`: added ``DESTDIR`` support as per bug :bugzilla-rs:`60`. - -* :file:`libtiff/tif_jpeg.c`: Define :c:macro:`HAVE_BOOLEAN` on windows if :file:`RPCNDR.H` - has been included. -* :file:`man/Makefile.in`: add :c:func:`TIFFClientOpen` link as per debian submitted - bug :bugzilla-rs:`66`. -* :file:`libtiff/Makefile.in`: Fixed ``@DSOSUB_VERSION`` to be ``@DSOSUF_VERSION@`` - in two places. - - -Library changes ---------------- - -* :file:`tif_fax3.c`: keep :c:var:`rw_mode` flag internal to fax3 state to remember - whether we are encoding or decoding. This is to ensure graceful - recovery if :c:func:`TIFFClientOpen` discovers an attempt to open a compressed - file for "``r+``" access, and subsequently close it, as it resets the - :c:member:`tif_mode` flag to ``O_RDONLY`` in this case to avoid writes, confusing the - compressor's concept of whether it is in encode or decode mode. - -* :file:`tif_luv.c`, :file:`tiff.h`, :file:`tiffio.h`: - New version of TIFF LogLuv (SGILOG) modules contributed by `Greg Ward - `_. He writes: - - * I improved the gamut-mapping function in :file:`tif_luv.c` for imaginary - colors, because some images were being super-saturated on the input - side and this resulted in some strange color shifts in the output. - - * I added a psuedotag in :file:`tiff.h` to control random dithering during - LogLuv encoding. This is turned off by default for 32-bit LogLuv and - on for 24-bit LogLuv output. Dithering improves the average color - accuracy over the image. - - * I added a ``#define`` for :c:macro:`LOG_LUV_PUBLIC`, which is enabled by default in - :file:`tiffio.h`, to expose internal routines for converting between LogLuv and - XYZ coordinates. This is helpful for writing more efficient, - specialized conversion routines, especially for reading LogLuv files. - -* :file:`libtiff/tif_dirinfo.c`: don't declare :c:var:`tiffFieldInfo` static on VMS. - -* Added :c:macro:`TIFFTAG_COPYRIGHT` support. - -* :file:`tif_getimage.c`: Added support for 16bit minisblack/miniswhite - images in RGBA interface. - -* :file:`libtiff/tif_dirinfo.c`: removed duplicate :c:macro:`TIFFTAG_PHOTOSHOP` as per - bug :bugzilla-rs:`44`. - -* :file:`libtiff/tif_dirwrite.c`: Added support for :c:enumerator:`TIFF_VARIABLE2` in the - case of writing :c:enumerator:`TIFF_BYTE`/:c:enumerator:`TIFF_SBYTE` fields as per - bug :bugzilla-rs:`43`. - -* :file:`libtiff/tif_dirinfo.c`: Modified the :c:enumerator:`TIFF_BYTE` definition for - :c:macro:`TIFFTAG_PHOTOSHOP` to use a writecount of :c:enumerator:`TIFF_VARIABLE2` (-3) to - force use of :c:type:`uint32` counts instead of :c:expr:`short` counts. - -* :file:`libtiff/tif_dirinfo.c`: moved pixar and copyright flags to ensure everything is in order. - -* Integrated experimental OJPEG support from Scott Marovich of HP. - -* :file:`libtiff/tif_open.c`: Seek back to zero after failed read, before writing header. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: added check for :c:macro:`__LP64__` - when checking for 64 bit architectures as per bugzilla bug :bugzilla-rs:`67`. - -* :file:`libtiff/tif_getimage.c`: Use :c:func:`memmove` instead of :c:func:`TIFFmemcpy` - in :c:func:`TIFFReadRGBATile` to avoid issues in cases of overlapping - buffers. See bug :bugzilla-rs:`69` in Bugzilla. - -* :file:`libtiff/tif_getimage.c`: Don't complain for CMYK (separated) - images with more than four samples per pixel as per bug :bugzilla-rs:`73`. - -* :file:`libtiff/tif_getimage.c`: relax handling of contig case where - there are extra samples that are supposed to be ignored as per bug :bugzilla-rs:`75`. This - should now work for 8bit greyscale or paletted images. - -* :file:`libtiff/tif_packbits.c`: fixed memory overrun error as per bug :bugzilla-rs:`77`. - -* :file:`libtiff/tif_getimage.c`: Fixed problem with reading strips or - tiles that don't start on a tile boundary. Fix contributed by - Josep Vallverdu (from HP), and further described in bug :bugzilla-rs:`47`. - -* :file:`libtif/tif_fax3.c`: Removed ``#ifdef PURIFY`` logic, and modified to - always use the "safe" version, even if there is a very slight - cost in performance as per bug :bugzilla-rs:`54`. - -* :file:`libtiff/tif_lzw.c`: added dummy :c:func:`LZWSetupEncode` to report an - error about LZW not being available. - -* :file:`libtiff/tif_dir.c`: propagate failure to initialize compression - back from :c:func:`TIFFSetField` as an error status, so applications can - detect failure. - -* :file:`libtiff/tif_lzw.c`: Avoid MS VC++ 5.0 optimization bug as per bug :bugzilla-rs:`78`. - -* :file:`libtiff/tif_dirwrite.c`: added :c:func:`TIFFRewriteDirectory` function. - Updated :c:func:`TIFFWriteDirectory` man page to include :c:func:`TIFFRewriteDirectory`. - -* :file:`libtiff/tiff.h`: I have created :c:macro:`COMPRESSION_CCITT_T4`, - :c:macro:`COMPRESSION_CCITT_T6`, :c:macro:`TIFFTAG_T4OPTIONS` and :c:macro:`TIFFTAG_T6OPTIONS` aliases - in keeping with TIFF 6.0 standard in :file:`tiff.h` as per bug :bugzilla-rs:`83`. - -* Added :c:macro:`PHOTOMETRIC_ITULAB` as per bug :bugzilla-rs:`90`. - - -Tools changes -------------- - -* Brent Roman contributed updated :program:`tiffcp` utility (and :file:`tiffcp.1`) - with support for extracting subimages with the ``,n`` syntax, and also - adding the "``-b``" bias removal flag. - -* :file:`tiff2ps.c`, :file:`tiff2ps.1`: Substantial changes to :program:`tiff2ps` by - Bruce A. Mallett, including a faster encoder, fixes for level - 2 PostScript, and support for the imagemask operator. - -* fax2ps.c: Helge (libtiff at oldach.net) submitted fix - that corrects behaviour for non-Letter paper - sizes. (bug :bugzilla-rs:`35`) It fixes two problems: - - Without scaling ("``-S``") the fax is now centered on the page size specified - with "``-H``" and/or "``-W``". Before, :program:`fax2ps` was using an obscure and practically - useless algorithm to allocate the image relative to Letter sized paper - which sometime sled to useless whitespace on the paper, while at the - same time cutting of the faxes printable area at the opposite border. - - Second, scaling now preserves aspect ratio, which makes unusual faxes - (in particular short ones) print properly. - -* :file:`thumbnail.c`: changed default output compression - to packbits from LZW since LZW isn't generally available. - -* :file:`tiff2rgba.c`: added "``-n``" flag to avoid emitting alpha component. Also added - a man page for :program:`tiff2rgba`. - -* :file:`tiffcmp.c`: Fixed multi samples per pixel support for :c:func:`ContigCompare` - as per bug :bugzilla-rs:`53`. - Updated bug section of tiffcmp.1 to note tiled file issues. - -* :file:`libtiff/tif_getimage.c`: Fixed so that failure is properly - reported by :c:func:`gtTileContig`, :c:func:`gtStripContig`, :c:func:`gtTileSeparate` and - :c:func:`gtStripSeparate` as per bug :bugzilla-rs:`51`. - - -Contributed software changes ----------------------------- - -* Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c` - and :file:`contrib/addtiffo/tif_ovrcache.h`. - - -LZW compression kit changes ---------------------------- - -* Rewrote lzw patching process so that is required to enable full - LZW support is to drop the :file:`tif_lzw.c` from the - ``libtiff-lzw-compression-kit`` over the one in the libtiff directory. - -* Some changes were made to make recovery from failure to - initialize the LZW compressor more graceful. - -* Note that as distributed libtiff support LZW decompression, but - not LZW compression. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.0.rst.txt deleted file mode 100644 index 345c5f1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.0.rst.txt +++ /dev/null @@ -1,372 +0,0 @@ -Changes in TIFF v3.6.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.6.0 (:tag:`Release-v3-6-0`) - Previous Version :doc:`v3.5.7 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* New utility :program:`raw2tiff` for converting raw rasters into TIFF files. -* Lots of new :program:`tiff2ps` options. -* Lots of new :program:`fax2tiff` options. -* Lots of bug fixes for LZW, JPEG and OJPEG compression. - -Custom Tag Support -^^^^^^^^^^^^^^^^^^ - -The approach to extending libtiff with custom tags has changed radically. -Previously, all internally supported TIFF tags had a place in the -private :c:struct:`TIFFDirectory` structure within libtiff to hold the values (if read), -and a "field number" (ie. :c:macro:`FIELD_SUBFILETYPE`) used to identify that tag. -However, every time a new tag was added to the core, the size of the -:c:struct:`TIFFDirectory` structure would change, breaking any dynamically linked -software that used the private data structures. - -Also, any tag not recognised -by libtiff would not be read and accessible to applications without some -fairly complicated work on the applications part to pre-register the tags -as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on -libtiff. - -Among other things this approach required the extension code -to access the private libtiff structures ... which made the higher level -non-libtiff code be locked into a specific version of libtiff at compile time. -This caused no end of bug reports! - -The new approach is for libtiff to read all tags from TIFF files. Those that -aren't recognised as "core tags" (those having an associated ``FIELD_`` value, -and place for storage in the :c:struct:`TIFFDirectory` structure) are now read into a -dynamic list of extra tags (:c:member:`td_customValues` in :c:struct:`TIFFDirectory`). When a new -tag code is encountered for the first time in a given TIFF file, a new -anonymous tag definition is created for the tag in the tag definition list. -The type, and some other metadata is worked out from the instance encountered. -These fields are known as "custom tags". - -Custom tags can be set and fetched normally using :c:func:`TIFFSetField` and -:c:func:`TIFFGetField`, and appear pretty much like normal tags to application code. -However, they have no impact on internal libtiff processing (such as -compression). Some utilities, such as :program:`tiffcp` will now copy these custom -tags to the new output files. - -As well as the internal work with custom tags, new C API entry points -were added so that extension libraries, such as libgeotiff, could -define new tags more easily without accessing internal data structures. -Because tag handling of extension tags is done via the "custom fields" -mechanism as well, the definition provided externally mostly serves to provide -a meaningful name for the tag. - -The addition of "custom tags" and the altered approach to extending libtiff -with externally defined tags is the primary reason for the shift to the -3.6.x version number from 3.5.x. - -Software configuration changes ------------------------------- - -* :file:`configure`, :file:`config.site`: Fix for large files (>2GiB) support. New - option in the config.site: ``LARGEFILE="yes"``. Should be enough for the large - files I/O. - -* :file:`configure`: Set ``-DPIXARLOG_SUPPORT`` option along with ``-DZIP_SUPPORT``. - -* :file:`html/Makefile.in`: Updated to use :program:`groffhtml` for generating html pages - from man pages. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Added SCO OpenServer 5.0.6 support - from John H. DuBois III. - -* :file:`libtiff/Makefile.vc`, :file:`libtiff/libtiff.def`: Missed declarations added. - -* :file:`libtiff/Makefile.in`, :file:`tools/Makefile.in`: Shared library will not be - stripped when installing, utility binaries will do be stripped. As per bug :bugzilla-rs:`93`. - -* :file:`man/Makefile.in`: Patch ``DESTDIR`` handling as per bug :bugzilla-rs:`95`. - -* :file:`configure`: OpenBSD changes for Sparc64 and DSO version as per bug :bugzilla-rs:`96`. - -* :file:`config.site/configure`: added support for ``OJPEG=yes`` option to enable - OJPEG support from :file:`config.site`. - -* :file:`config.gues`, :file:`config.sub`: Updated from ``_. - -* :file:`configure`: Modify ``CheckForBigEndian`` so it can work in a cross - compiled situation. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Changes for building on MacOS 10.1 - as per bug :bugzilla-rs:`94`. - -* :file:`html/Makefile.in`: added missing images per bug :bugzilla-rs:`92`. - -* :file:`port/Makefile.in`: fixed clean target per bug :bugzilla-rs:`92`. - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`: New function :c:func:`TIFFReadRGBAImageOriented` - implemented to retrieve raster array with user-specified origin position. - -* :file:`libtiff/tif_fax3.c`: Fix wrong line numbering. - -* :file:`libtiff/tif_dirread.c`: Check field counter against number of fields. - -* Store a list of opened IFD to prevent directory looping. - -* :file:`libtiff/tif_jpeg.c`: modified segment_height calculation to always - be a full height tile for tiled images. Also changed error to just - be a warning. - -* :file:`libtiff/tif_lzw.c`: fixed so that decoder state isn't allocated till - :c:func:`LZWSetupDecode`. Needed to read LZW files in "``r+``" mode. - -* :file:`libtiff/tif_dir.c`: fixed up the :c:member:`tif_postdecode` settings responsible - for byte swapping complex image data. - -* :file:`libtiff/tif_open.c`: Removed error if opening a compressed file - in update mode bug (:bugzilla-rs:`198`). - -* :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteCheck` now fails if the image is - a pre-existing compressed image. That is, image writing to pre-existing - compressed images is not allowed. - -* :file:`html/man/*.html`: Web pages regenerated from man pages. - -* :file:`libtiff/tif_jpeg.c`: Hack to ensure that "boolean" is defined properly - on Windows so as to avoid the structure size mismatch error from libjpeg - (bug :bugzilla-rs:`188`). - -* :file:`libtiff/tiff.h`: ``#ifdef USING_VISUALAGE`` around previous Visual Age - AIX porting hack as it screwed up gcc. (bug :bugzilla-rs:`39`) - -* :file:`libtiff/tiff.h`: added :c:macro:`COMPRESSION_JP2000` (34712) for LEAD tools - custom compression. - -* :file:`libtiff/tif_dirread.c`: Another fix for the fetching ``SBYTE`` arrays - by the :c:func:`TIFFFetchByteArray` function. (bug :bugzilla-rs:`52`) - -* :file:`libtiff/tif_dirread.c`: Expand ``v[2]`` to ``v[4]`` in :c:func:`TIFFFetchShortPair` - as per bug :bugzilla-rs:`196`. - -* :file:`libtiff/tif_lzw.c`: Additional consistency checking added in - :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` fixing bugs - :bugzilla-rs:`190` and :bugzilla-rs:`100`. - -* :file:`libtiff/tif_lzw.c`: Added check for valid code lengths in :c:func:`LZWDecode` - and :c:func:`LZWDecodeCompat`. Fixes bug :bugzilla-rs:`115`. - -* :file:`tif_getimage.c`: Ensure that :c:func:`TIFFRGBAImageBegin` returns the - return code from the underlying pick function as per bug :bugzilla-rs:`177`. - -* :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`, :file:`libtiff/tif_print.c`: - Hacked :file:`tif_jpeg.c` to fetch :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` from the jpeg - data stream if it isn't present in the tiff tags as per bug :bugzilla-rs:`168`. - -* :file:`libtiff/tif_jpeg.c`: Fixed problem with setting of :c:var:`nrows` in - :c:func:`JPEGDecode` as per bug :bugzilla-rs:`129`. - -* :file:`libtiff/tif_read.c`, :file:`libtiff/tif_write.c`: :c:func:`TIFFReadScanline` and - :c:func:`TIFFWriteScanline` now set :c:member:`tif_row` explicitly in case the codec has - fooled with the value as per bug :bugzilla-rs:`129`. - -* :file:`libtiff/tif_ojpeg.c`: Major upgrade from Scott. Details in bug :bugzilla-rs:`156`. - -* :file:`libtiff/tif_open.c`: Pointers to custom procedures - in :c:func:`TIFFClientOpen` are checked to be not :c:macro:`NULL` pointers. - -* :file:`libtiff/tif_lzw.c`: Assertions in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` - replaced by warnings. Now libtiff should read corrupted LZW-compressed - files by skipping bad strips as per bug :bugzilla-rs:`100`. - -* :file:`libtiff/tif_dirwrite.c`, :file:`libtiff/tif_write.c`, :file:`libtiff/tiffio.h`: - :c:func:`TIFFCheckpointDirectory` routine added as per bug :bugzilla-rs:`124`. - The :doc:`/functions/TIFFWriteDirectory` man page discusses this new function as well as the related - :c:func:`TIFFRewriteDirectory`. - -* :file:`libtiff/tif_codec.c`, :file:`libtiff/tif_compress.c`, - :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_getimage.c`: - Introduced additional members ``tif->tif_decodestatus`` and ``tif->tif_encodestatus`` - for correct handling of unconfigured codecs (we should not try to read - data or to define data size without correct codecs). See bug :bugzilla-rs:`119`. - -* :file:`tif_dirread.c`: avoid div-by-zero if :c:var:`rowbytes` is zero in chop func as - per bug :bugzilla-rs:`111`. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, - :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: - Dwight Kelly added get/put code for new tag ``XMLPACKET`` as - defined in Adobe XMP Technote. Added missing ``INKSET`` tag value from TIFF 6.0 - spec ``INKSET_MULTIINK`` (=2). Added missing tags from Adobe TIFF technotes: - ``CLIPPATH``, ``XCLIPPATHUNITS``, ``YCLIPPATHUNITS``, ``OPIIMAGEID``, ``OPIPROXY`` and - ``INDEXED``. Added ``PHOTOMETRIC`` tag value from TIFF technote 4 ``ICCLAB`` (=9). - -* :file:`libtiff/tif_getimage.c`: Additional check for supported codecs added in - :c:func:`TIFFRGBAImageOK`, :c:func:`TIFFReadRGBAImage`, :c:func:`TIFFReadRGBAStrip` and - :c:func:`TIFFReadRGBATile` now use :c:func:`TIFFRGBAImageOK` before reading a per bug - :bugzilla-rs:`110`. - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, - :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: - Added routine :c:func:`TIFFDataWidth` for determining - :c:enum:`TIFFDataType` sizes instead of working with :c:var:`tiffDataWidth` array - directly as per bug :bugzilla-rs:`109`. - -* :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirwrite.c`: Added possibility to - read broken TIFFs with ``LONG`` type used for :c:macro:`TIFFTAG_COMPRESSION`, - :c:macro:`TIFFTAG_BITSPERSAMPLE`, :c:macro:`TIFFTAG_PHOTOMETRIC` as per bug - :bugzilla-rs:`99`. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Add support for - :c:macro:``__arch64__`` as per bug :bugzilla-rs:`94`. - -* :file:`libtiff/tif_read.c`: Fixed :c:func:`TIFFReadEncodedStrip` to fail if the - decodestrip function returns anything not greater than zero as per bug - :bugzilla-rs:`97`. - -* :file:`libtiff/tif_jpeg.c`: fixed computation of :c:var:`segment_width` for - tiled files to avoid error about it not matching the - ``cinfo.d.image_width`` values ("JPEGPreDecode: Improper JPEG strip/tile - size.") for ITIFF files. Apparently the problem was incorporated since - 3.5.5, presumably during the OJPEG/JPEG work recently. - -* :file:`libtiff/tif_getimage.c`: If :c:macro:`DEFAULT_EXTRASAMPLE_AS_ALPHA` is 1 - (defined in :file:`tiffconf.h` - 1 by default) then the RGBA interface - will assume that a fourth extra sample is ``ASSOCALPHA`` if the - ``EXTRASAMPLE`` value isn't set for it. This changes the behaviour of - the library, but makes it work better with RGBA files produced by - lots of applications that don't mark the alpha values properly. - As per bugs :bugzilla-rs:`93` and :bugzilla-rs:`65`. - -* :file:`libtiff/tif_jpeg.c`: allow jpeg data stream sampling values to - override those from tiff directory. This makes this work with - ImageGear generated files. - - -Tools changes -------------- - -* :program:`tiff2ps`: - - * Added page size setting when creating PS Level 2. - - * Fixed PS comment emitted when FlateDecode is being used. - -* :program:`tiffsplit`: increased the maximum number of pages that can be split. - -* :program:`raw2tiff`: - - * New utility for turning raw raster images into TIFF files - written by Andrey Kiselev. - - * Added option "``-p``" to explicitly select color space of input image data. - -* :program:`tiffmedian`: Support for large (> 2GB) images. - -* :program:`ppm2tiff`: Fixed possible endless loop. - -* :program:`tiff2rgba`: Switched to use :c:func:TIFFReadRGBAImageOriented - instead of :c:func:`TIFFReadRGBAImage`. - -* :program:`tiffcmp`: Fixed problem with unused data comparing (bug :bugzilla-rs:`349`). - "``-z``" option now can be used to set the number of reported different bytes. - -* :program:`tiffcp`: - - * Added possibility to specify value -1 to "``-r``" option to get the entire image as one strip - (bug :bugzilla-rs:`343`). - - * Set the correct ``RowsPerStrip`` and ``PageNumber`` values (bug :bugzilla-rs:`343`). - - * Fixed problem with colorspace conversion for JPEG encoded images (bugs :bugzilla-rs:`23` - and :bugzilla-rs:`275`) - - * Added support for ``Orientation`` tag. - -* :program:`fax2tiff`: - - * Page numbering fixed (bug :bugzilla-rs:`341`). - - * Applied patch from Julien Gaulmin. More switches for :program:`fax2tiff` tool for better control - of input and output (bugs :bugzilla-rs:`272` and :bugzilla-rs:`293`). - - * Updated to reflect latest changes in libtiff per bug :bugzilla-rs:`125`. - -* :program:`ppm2tiff`: PPM header parser improved: now able to skip comments. - -* :program:`tiff2ps`: - - * Sebastian Eken provided patches (bug :bugzilla-rs:`200`) to add new these new switches: - - "``-b #``": - for a bottom margin of # inches - "``-c``": - center image - "``-l #``": - for a left margin of # inches - "``-r``": - rotate the image by 180 degrees - - Also, new features merged with code for shrinking/overlapping. - - * Force deadzone printing when EPS output specified (bug :bugzilla-rs:`325`). - - * Add ability to generate PS Level 3. It basically allows one to use the ``/flateDecode`` - filter for ZIP compressed TIFF images. Patch supplied by Tom Kacvinsky - (bug :bugzilla-rs:`328`). - - * Don't emit ``BeginData``/``EndData`` DSC comments since we are unable to properly - include the amount to skip as per bug :bugzilla-rs:`80`. - - * Added workaround for some software that may crash when last strip of image contains fewer - number of scanlines than specified by the ``/Height`` variable as per bug :bugzilla-rs:`164`. - - * Patch from John Williams to add new functionality for splitting long images in several pages as - per bug :bugzilla-rs:`142`. New switches: - - "``-H #``": - split image if height is more than # inches - "``-L #``": - overLap split images by # inches - - * New commandline switches to override resolution units obtained from the input file per - bug :bugzilla-rs:`131`: - - "``-x``": - override resolution units as centimeters - "``-y``": - override resolution units as inches - - * tiff2ps: Division by zero fixed as per bug :bugzilla-rs:`88`. - -* :program:`tiffdump`: include :c:macro:`TIFFTAG_JPEGTABLES` in tag list. - -* :program:`tiffset`: fix bug in error reporting. - - -Contributed software changes ----------------------------- - -* Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c`, :file:`contrib/addtiffo/tif_ovrcache.h`. - -* :file:`libtiff/contrib/win95`: renamed to :file:`contrib/win_dib`. Added new - :file:`Tiffile.cpp` example of converting TIFF files into a DIB on Win32 as per - bug :bugzilla-rs:`143`. - - -LZW compression kit changes ---------------------------- - -* LZW compression kit synchronized with actual libtiff version. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.1.rst.txt deleted file mode 100644 index bb7cbdf..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.6.1.rst.txt +++ /dev/null @@ -1,135 +0,0 @@ -Changes in TIFF v3.6.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.6.1 (:tag:`Release-v3-6-1`) - Previous Version :doc:`v3.6.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* New utility :program:`tiff2pdf` - for converting TIFF images directly into PDF. -* New :doc:`/functions/TIFFcolor` color conversion module. -* Full support for ``Orientation`` tag in ``TIFFRGBAImage`` interface. -* Many bugs fixed. - - -Software configuration changes ------------------------------- - -* :file:`libtiff/makefile.vc`, :file:`tools/makefile.vc`: Support for IJG JPEG library. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - -* :file:`libtiff/tiffcomp.h`: ``#define _BSDTYPES_DEFINED`` when defining BSD typedefs. - -* :file:`configure`, :file:`libtiff/Makefile.in`, :file:`libtiff/mkversion.c`: Relative buildings fixed. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - - -Library changes ---------------- - -* :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: - Added support for ``ReferenceBlackWhite`` tag handling when converted from YCbCr color space as - per bug :bugzilla-rs:`120`. - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_aux.c`: Read ``WhitePoint`` tag from the - file and properly use it for CIE Lab 1976 to RGB transform. - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Finally resolved problems with - orientation handling. ``TIFFRGBAImage`` interface now properly supports all - possible orientations, i.e. images will be flipped both in horizontal and - vertical directions if required. 'Known bugs' section now removed from the - appropriate manual pages. - -* :file:`libtiff/tif_luv.c`: Fixed bug in 48-bit to 24-bit conversion routine, - reported by Antonio Scuri. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_codec.c`: Added new function - :c:func:`TIFFIsCODECConfigured`, suggested by Ross Finlayson. - -* :file:`libtiff/tif_ojpeg.c`: :c:func:`TIFFVGetField` function now can properly extract - the fields from the OJPEG files. Patch supplied by Ross Finlayson. - -* :file:`libtiff/tif_dir.h`: :c:func:`_TIFFFindOrRegisterdInfo` declaration replaced - with :c:func:`_TIFFFindOrRegisterFieldInfo` as reported by Ross Finlayson. - -* :file:`libtiff/tif_dirinfo.c`: Implemented binary search in :c:func:`_TIFFMergeFieldInfo`. - Patch supplied by Ross Finlayson. - -* :file:`tif_dirread.c`: do not mark all anonymously defined tags to be ``IGNORE`` (as - it was done in 3.6.0). - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_dirinfo.c`: Added support for IFD (13) datatype, - introduced in "Adobe PageMaker TIFF Technical Notes". - -* :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: New color space - conversion code: CIE L*a*b* 1976 images now supported by the ``TIFFRGBAImage`` - interface. YCbCr to RGB conversion code also moved there and now has - :doc:`/functions/TIFFcolor` publicly available interface. These - routines currently used in ``TIFFRGBAImage`` interface only and not supported in - other libtiff tools yet. So if you want, for example, to convert CIE Lab image - into PostScript file you should do it in two steps: change colorspace to RGB - using :program:`tiff2rgba` utility and then process - it with the :program:`tiff2ps`. - -* :file:`libtiff/tif_tile.c`: Remove spurious use of "s" (sample) in the - ``planarconfig_contig`` case in :c:func:`TIFFComputeTile` as per bug :bugzilla-rs:`387`. - -* :file:`libtiff/tiffiop.h`: New macros: :c:macro:`TIFFmax` and :c:macro:`TIFFmin`. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_strip.c`: Added :c:func:`TIFFRawStripSize` function - as suggested by Chris Hanson. - -* :file:`libtiff/tif_lzw.c`, :file:`libtiff/tif_fax3.c`: Proper support for update mode - as per bug :bugzilla-rs:`424`. - - -Tools changes -------------- - -* :program:`tiff2pdf`:: New tool, written by - Ross Finlayson, to directly convert TIFF files to PDF. - -* :program:`tiffgt`: Unmaintained and platform - dependent sgigt utility removed and replaced with the completely rewritten - portable tool (depend on OpenGL and - GLUT). This tool will not build by default. - -* :program:`ras2tiff`: Properly determine - SUN Rasterfiles with the reverse byte order (it is reported by the magic - header field). Problem reported by Andreas Wiesmann. - -* :program:`raw2tiff`: Implemented image size - guessing using correlation coefficient calculation between two neighbour - lines. - - -Contributed software changes ----------------------------- - -* :file:`contrib/pds/tif_pdsdirread.c`, :file:`contrib/pds/tif_pdsdirwrite.c`: - Use :c:func:`TIFFDataWidth` function instead of :c:var:`tiffDataWidth` array. - -LZW compression kit changes ---------------------------- - -* Proper support for update mode as per bug :bugzilla-rs:`424`. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0.rst.txt deleted file mode 100644 index b04ea49..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0.rst.txt +++ /dev/null @@ -1,78 +0,0 @@ -Changes in TIFF v3.7.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0 (:tag:`Release-v3-7-0`) - Previous Version :doc:`v3.7.0beta2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - - -* Several bugs found after 3.7.0beta2 release were fixed. - - -Software configuration changes ------------------------------- - -* :file:`ltmain.sh`: Fix for MinGW compilation. - - -Library changes ---------------- - -* :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_luv.c`, - :file:`libtiff/tif_ojpeg.c`, :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_write.c`: - Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner). - -* :file:`libtiff/tif_dirinfo.c`: Type of the :c:macro:`TIFFTAG_SUBIFD` field changed - to :c:enumerator:`TIFF_IFD`. - -* Preliminary support for BigTIFF files: now libtiff can - recognize and reject to open such images. ;-) - -* :file:`libtiff/tif_dir.c`: Initialize :c:member:`td_tilewidth` and :c:member:`td_tilelength` fields - of the :c:struct:`TIFFDirectory` structure with the 0 instead of -1 to avoid - confusing integer overflows in :c:func:`TIFFTileRowSize` for striped images. - -* :file:`libtiff/tif_dirinfo.c`: Fix bug with ``tif_foundfield`` and reallocation - of ``tif_fieldinfo`` as per bug - :bugzilla-rs:`630` - -* :file:`libtiff/tif_compress.c`: Improved error reporting in - :c:func:`TIFFGetConfiguredCODECs` (Dmitry V. Levin). - - -Tools changes -------------- - -* :file:`tiffcmp.c` (:c:func:`leof`): Renamed from "``eof``" in order to avoid - conflict noticed under MinGW. - -* :file:`tiff2pdf.c`: Fixed ``TransferFunction`` tag handling reported - by Ross A. Finlayson. - - -Contributed software changes ----------------------------- - -* None. - - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0alpha.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0alpha.rst.txt deleted file mode 100644 index cc25462..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0alpha.rst.txt +++ /dev/null @@ -1,179 +0,0 @@ -Changes in TIFF v3.7.0alpha -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0alpha (:tag:`Release-v3-7-0-alpha`) - Previous Version :doc:`v3.6.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* Significant changes in software configuration: we are switched - to GNU autotools now. - -* :program:`tiffset`: Set any libtiff supported tags. Tags - can be supplied by the mnemonic name or number. - - -Software configuration changes ------------------------------- - -* Get rid of the old configuration system and switch to - GNU autotools. - - -Library changes ---------------- - -* :file:`libtiff/tif_ojpeg.c`: Fixed problem with duplicated ``SOI`` and ``SOF`` - markers as per bug - :bugzilla-rs:`581`. - -* :file:`libtiff/tif_open.c`, :file:`libtiff/tiffio.h`: New function added: - :c:func:`TIFFIsBigEndian`. Function returns nonzero if given was file written - in big-endian order. - -* :file:`libtiff/tif_print.c`: added (untested) support for printing - ``SSHORT``, ``SLONG`` and ``SRATIONAL`` fields. - -* :file:`libtiff/tif_fax3.c`: Avoid reading CCITT compression options - if compression type mismatches. See - :bugzilla-rs:`565`. - -* :file:`libtiff/tif_strip.c`: Never return 0 from the :c:func:`TIFFNumberOfStrips`. - -* :file:`libtiff/tif_dirread.c`: Workaround for broken TIFF writers which - store single ``SampleFormat`` value for multisampled images. See - :bugzilla-rs:`562`. - -* :file:`libtiff/tif_write.c`: Allow in-place updating of the compressed - images (don't work properly with all codecs). For details see GDAL bug - :bugzilla-rs:`534`. - -* :file:`libtiff/tif_jpeg.c`: Workaround for wrong sampling factors used - in the Intergarph JPEG compressed TIFF images as per bug: - :bugzilla-rs:`532`. - -* :file:`libtiff/tif_open.c`: Use dummy :c:func:`mmap`/:c:func:`munmap` functions in - :c:func:`TIFFClientOpen` when the appropriate client functions was not - supplied by user. - -* :file:`libtiff/tif_dirread.c`: Fixed problem with handling :c:enumerator:`TIFF_UNDEFINED` - tag type in :c:func:`TIFFFetchNormalTag` as per bug - :bugzilla-rs:`508`. - -* :file:`libtiff/tif_codec.c`: Fixed typo in ``TIFFInitPackBits`` name as per: - :bugzilla-rs:`494`. - -* :file:`libtiff/tif_fax3.c`: Fixed problem, introdiced in 3.6.1 release, - with the CCITT encoding modes as per bug - :bugzilla-rs:`483`. - We need more work on fax codec to support update mode. - -* :file:`libtiff/tiff.h`: Fixed tag definitions for :c:macro:`TIFFTAG_YCLIPPATHUNITS` - and :c:macro:`TIFFTAG_INDEXED` as per bug - :bugzilla-rs:`475`. - -* :file:`libtiff/tif_win32.c`, :file:`libtiff/tif_unix.c`: Check whether the pointer is - :c:macro:`NULL` before proceeding further as per bug - :bugzilla-rs:`474`. - - Check results, returned by the :c:func:`TIFFFdOpen` before returning and close - file if :c:func:`TIFFFdOpen` failed as per bug - :bugzilla-rs:`468`. - -* :file:`libtiff/libtiff.def`, :file:`libtiff/tif_close.c`, - :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: - Separate :c:func:`TIFFCleanup` from the :c:func:`TIFFClose` in order to fix the bug - :bugzilla-rs:`468`. - -* :file:`libtiff/tif_dirwrite.c`: Fixed handling of writable ASCII tags - that are ``field_passcount=TRUE`` properly. Arguably anonymous custom - tags should be declared as ``passcount=FALSE``, but I don't want to change - that without a careful review. - -* :file:`libtiff/tif_write.c`: Fixed reporting size of the buffer in case - of stripped image in :c:func:`TIFFWriteBufferSetup`. As per bug - :bugzilla-rs:`460`. - -* :file:`libtiff/tif_dir.c`: Incomplete cleanup in :c:func:`TIFFFreeDirectory`, - patch from Gerben Koopmans. - -* :file:`libtiff/tif_dirread.c`: Check :c:member:`field_passcount` value before setting - the value of undefined type, patch from Gerben Koopmans. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: - Fixes for AMD 64 platform as suggested by Jeremy C. Reed. - -* :file:`libtiff/tif_win32.c`: Fixed problem with :c:func:`_TIFFrealloc` when - the :c:macro:`NULL` pointer passed. Patch supplied by Larry Grill. - - -Tools changes -------------- - -* :program:`tiffset`: Set any libtiff supported tags. Tags - can be supplied by the mnemonic name or number. - -* :file:`ycbcr.c`: fixed :c:func:`main` declaration as per: - :bugzilla-rs:`513`. - -* :program:`tiffsplit`: Don't forget - to copy ``PhotometricInterpretation`` tag. - -* :program:`tiffsplit`: - - * Fixed problem with - unproperly written multibyte files. Now output files will be written - using the same byte order flag as in the input image. See - :bugzilla-rs:`574`. - - * Copy ``JPEGTables`` - tag contents for JPEG compressed images. Reported by Artem Mirolubov. - -* :program:`tiffcp`: - - * Close output file on normal exit. - - * Don't emit warnings - when ``Orientation`` tag does not present in the input image. - - * Properly set - Photometric Interpretation in case of JPEG compression of grayscale - images. - - * Fixed problem with wrong - interpretation of the ``InkNames`` tag as per bug - :bugzilla-rs:`466`. - Memory leak fixed. - - * Fixed problem with - wrong ``PhotometricInterpretation`` setting for non-RGB images. - - -Contributed software changes ----------------------------- - -* Outdated stuff removed. - -* Almost all programs are synchronized with the current libtiff - and should compile without problems. - - -LZW compression kit changes ---------------------------- - -* No changes. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta.rst.txt deleted file mode 100644 index 8239faa..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta.rst.txt +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v3.7.0beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0beta (:tag:`Release-v3-7-0beta`) - Previous Version :doc:`v3.7.0alpha ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* LZW compression enabled by default. You don't need the separate - compression kit anymore. - -* :program:`bmp2tiff`: Added new utility to convert Windows BMP files - into TIFFs. - -* The first attempt to implement a test suite. - - -Software configuration changes ------------------------------- - -* Many portability fixes in the new autotooled build suite. - - -Library changes ---------------- - -* :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_next.c`, :file:`libtiff/tif_thunder.c`: - Several buffer overruns fixed, as noted by Chris Evans. - -* BSD data types (:c:type:`u_char`, :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`) - is no longer used internally in the libtiff. Should result in simpler configuration - and better portability. - -* :file:`libtiff/tiff.h`: Fix column tagging. Reference current Adobe XMP - specification. Reference libtiff bug tracking system to submit - private tag additions. - -* :file:`libtiff/tif_dirread.c`: Don't reject to read tags of the - ``SamplesPerPixel`` size when the tag count is greater than number of - samples as per bug - :bugzilla-rs:`576`. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Applied patches from - Joris Van Damme to avoid requirement for :file:`tiffiop.h` inclusion in - some applications. Look for details here: - ``_. - -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirinfo.c`: Fixed problem with the static - variable as per bug - :bugzilla-rs:`593`. - -* :file:`libtiff/tif_lzw.c`: LZW compression code is merged back from the - separate package. All libtiff tools are updated to not advertise an - absence of LZW support. - -* :file:`libtiff/tif_dir.c`: Call :c:func:`TIFFError` instead of producing warnings - when setting custom tags by value. Reported by Eric Fieleke. - - -Tools changes -------------- - -* :program:`tiff2ps`: Avoid zero division in :c:func:`setupPageState` function; - properly initialize array in :c:func:`PSDataBW`. - -* :program:`tiff2pdf`: Multiple bugfixes. - -* :program:`ras2tiff`: Fixed issue with missed big-endian checks as per bug - :bugzilla-rs:`586`. - -* :program:`bmp2tiff`: Added new utility to convert Windows BMP files - into TIFFs. - - -Contributed software changes ----------------------------- - -* No changes. - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta2.rst.txt deleted file mode 100644 index 832123c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.0beta2.rst.txt +++ /dev/null @@ -1,69 +0,0 @@ -Changes in TIFF v3.7.0beta2 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0beta2 (:tag:`Release-v3-7-0beta2`) - Previous Version :doc:`v3.7.0beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* The code has been reviewed by Dmitry Levin: added checks - for values, returned by the space allocation functions, fixed - problems with the possible integer overflows. - - -Software configuration changes ------------------------------- - -* Several fixes in the test suite. - - -Library changes ---------------- - -* Preliminary support for BigTIFF files: now libtiff can - recognize and reject to open such images. ;-) - -* :file:`libtiff/tif_dirinfo.c`: changed type of XMLPacket (tag 700) to - :c:enumerator:`TIFF_BYTE` instead of :c:enumerator:`TIFF_UNDEFINED` to comply with the info - in the Adobe XMP Specification. - -* Added many checks for integer overflow and for successful space - allocations in the different parts of library. Code review - completed by Dmitry V. Levin. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_compress.c`: Added - :c:func:`TIFFGetConfiguredCODECs` function to get the list of configured codecs. - - -Tools changes -------------- - -* :file:`tiff2bw`: Write ``ImageWidth``/``ImageHeight`` tags to output file, as - noted by Gennady Khokhorin. - - -Contributed software changes ----------------------------- - -* No changes. - - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.1.rst.txt deleted file mode 100644 index bf8bffe..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.1.rst.txt +++ /dev/null @@ -1,160 +0,0 @@ -Changes in TIFF v3.7.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.1 (:tag:`Release-v3-7-1`) - Previous Version :doc:`v3.7.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* This is mostly bugfix release. Most important fix is the one - related to wrong custom tag read/write code. - - -Software configuration changes ------------------------------- - -* :file:`autogen.sh`: :program:`aclocal` and :program:`autoheader` - should be executed after :program:`libtoolize`. - Also add ``-I .`` to aclocal invocation to check - current directory for macros. - -* nmake.opt: Link with the :file:`user32.lib` in windowed mode. As per bug - :bugzilla-rs:`697` - -* :file:`nmake.opt`, :file:`makefile.vc`: make it easier to rename the libtiff DLL. - -* :file:`configure`, :file:`configure.ac`: Added ``--enable-rpath`` option to embed - linker paths into library binary. - - -Library changes ---------------- - -* :file:`tiff.h`: Revert back libtiff data type definitions as per - bug :bugzilla-rs:`687` - -* :file:`tif_dirread.c`: Do not forget about :c:macro:`TIFF_VARIABLE2` when - checking for tag count in :c:func:`TIFFReadDirectory` function. As per bug - :bugzilla-rs:`713` - -* :file:`tif_getimage.c`: Support for multiple-alpha-channelled - RGB-images as per bug - :bugzilla-rs:`718` - -* :file:`tif_getimage.c`: ``#define A1`` bracketing for clean build on - SunPro compiler. - -* :file:`tif_dirwrite.c`: Always write :c:macro:`TIFFTAG_SUBIFD` using ``LONG`` type - as per bugs - :bugzilla-rs:`703` and - :bugzilla-rs:`704`. - -* :file:`tif_win32.c`: Use :c:expr:`char*` strings instead of :c:type:`TCHAR` in windowed - mode as per bug - :bugzilla-rs:`697` - -* :file:`tif_dir.c`, :file:`tif_dirread.c`: Remove :c:func:`TIFFReassignTagToIgnore` - call from the :c:func:`TIFFReadDirectory` function. :c:func:`TIFFReassignTagToIgnore` - must be removed in the future, as it was never used properly. As per - bug :bugzilla-rs:`692` - -* :file:`tif_jpeg.c`: Added a work-around in order to allow - compilation with the heavily modified version of libjpeg delivered - with Cygwin. - -* :file:`tif_dir.c`: Properly handle tags, which have the :c:type:`uint32` - counts. As per bug - :bugzilla-rs:`693` - -* :file:`tif_unix.c`: Make UNIX module compilable (and usable) - on Windows. - -* :file:`tiff.h`: Added Adobe DNG tags. - -* :file:`tif_aux.c`: Set the appropriate ``ReferenceBlackWhite`` array for - YCbCr image which lacks that tag (noted by Hans Petter Selasky). - -* :file:`tif_color.c`: Division by zero fixed (Hans Petter Selasky). - -* :file:`tif_stream.cxx`, :file:`tiffio.h`: Added C++ stream interface - contributed by Edward Lam (see - :bugzilla-rs:`654` - for details). Those who want to use C++ streams should - ``#include ``. - -* :file:`tif_open.c`: Removed :c:func:`close` in :c:func:`TIFFClientOpen` if file - is bad. This is the callers responsibility. - :bugzilla-rs:`651` - -* :file:`tiffio.h`, :file:`tif_win32.c`, :file:`libtiff.def`: Added :c:func:`TIFFOpenW` - function to work with the double byte strings (used to represent - filenames in some locales). As per bug - :bugzilla-rs:`625` - -* :file:`tif_dirread.c`: Fixed problem when fetching ``BitsPerSample`` and - ``Compression`` tags of type ``LONG`` from broken TIFFs as per bug - :bugzilla-rs:`662` - -* :file:`tif_dirinfo.c`: Fixed definition for ``TIFFTAG_RICHTIFFIPTC``, - the writecount should have :c:type:`uint32` type. As per bug - :bugzilla-rs:`662` - -* :file:`tif_write.c`: Fixed wrong ``if()`` statement in - :c:func:`TIFFAppendToStrip` function as per bug - :bugzilla-rs:`660` - -* :file:`tif_dirinfo.c`: Change definition for ``TIFFTAG_EXTRASAMPLES`` - field. The caller should supply a count when setting this field. As - per bug :bugzilla-rs:`648`. - -* :file:`tif_jpeg.c`, :file:`tif_ojpeg.c`: ``TIFFTAG_JPEGTABLES`` should have - uint32 count. Use this type everywhere. - -* :file:`tif_next.c`: avoid use of :c:type:`u_long` and :c:type:`u_char` types. - -* :file:`tif_fax3.c`: Fixed case with the wrong decode routines - choosing when the incorrect ``Group4Options`` tag set. As per bug - :bugzilla-rs:`323` - -* :file:`tif_dirwrite.c`: Fixed problem with passing count variable of - wrong type when writing the :c:macro:`TIFF_BYTE`/:c:macro:`TIFF_SBYTE` tags in - :c:func:`TIFFWriteNormalTag`. - -* :file:`tif_compress.c`: Zero division problem fixed (Vladimir Nadvornik, - Dmitry V. Levin). - - -Tools changes -------------- - -* :file:`fax2ps.c`: Be able to extract the first page (#0). As per bug - :bugzilla-rs:`690` - -* :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Position`` - tags (Tristan Hill). - -* :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Resolution`` - tags (Peter Fales). - -* :file:`tiffset.c`: Check the :c:func:`malloc` return value (Dmitry V. Levin). - - -Contributed software changes ----------------------------- - -* None. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.2.rst.txt deleted file mode 100644 index b7369cd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.2.rst.txt +++ /dev/null @@ -1,142 +0,0 @@ -Changes in TIFF v3.7.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.2 (:tag:`Release-v3-7-2`) - Previous Version :doc:`v3.7.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Maintenance release. Many bugfixes in the build environment - and compatibility improvements. - - -Software configuration changes ------------------------------- - -* :file:`configure.ac`: Use ``-rpath`` option instead of ``-R`` as per bug - :bugzilla-rs:`732` - -* :file:`tif_stream.cxx`: Fixes for C++ stream interface from - Michael Rinne and Edward Lam. - -* :file:`configure.ac`: Make the documentation directory location - configurable via the ``--with-docdir`` option (as suggested by - Jeremy C. Reed). - -* Place the C++ stream API in the separate library called - ``libtiffxx`` to avoid unneeded dependencies. Probably there will be - more C++ API in the future. As per bugs - :bugzilla-rs:`733` - and :bugzilla-rs:`730` - -* :file:`configure`, :file:`configure.ac`: Replace ``--disable-c++`` with the - ``--disable-cxx`` option as per bug - :bugzilla-rs:`730`. - - -Library changes ---------------- - -* Applied patch from Lee Howard to support a new tag ``TIFFTAG_FAXDCS`` - (34911) used in HylaFax software. As per bug - :bugzilla-rs:`771` - -* :file:`tif_open.c`: Remove unnecessary :c:func:`TIFFSeekFile` call as per - bug :bugzilla-rs:`756` - -* :file:`tiff.h`: Changed the :c:type:`int8` definition to be always :c:expr:`signed char` - as per bug - :bugzilla-rs:`727` - -* :file:`tiffio.h`: Move :c:func:`TIFFOpenW` function into the ``extern "C"{}`` - block as per bug - :bugzilla-rs:`763` - -* :file:`tif_dirread.c`: Estimate strip size in case of wrong or - suspicious values in the tags. As per bugs - :bugzilla-rs:`705` - and :bugzilla-rs:`320` - -* :file:`tif_color.c`: Use double as the second argument of :c:func:`pow` - function in :c:func:`TIFFCIELabToRGBInit`. As per bug - :bugzilla-rs:`741` - -* :file:`tif_pixarlog.c`: Avoid warnings when converting float to - integer as per bug - :bugzilla-rs:`740` - -* :file:`tif_getimage.c`: Always fill the error message buffer in - :c:func:`TIFFRGBAImageBegin` as per bug - :bugzilla-rs:`739` - -* :file:`tif_jpeg.c`: Added ability to read/write the fax specific - :c:macro:`TIFFTAG_FAXRECVPARAMS`, :c:macro:`TIFFTAG_FAXSUBADDRESS` - and :c:macro:`TIFFTAG_FAXRECVTIME` tags as per bug - :bugzilla-rs:`736` - -* :file:`tif_win32.c`: Fixed message formatting in functions - :c:func:`Win32WarningHandler` and :c:func:`Win32ErrorHandler` as per bug - :bugzilla-rs:`735` - -* :file:`tiffio.h`: Move the color conversion routines in the ``extern - "C"`` section as per bug - :bugzilla-rs:`727` - -* :file:`tiff.h`: Restore back the workaround for AIX Visual Age C - compiler to avoid double definition of BSD types as per bug - :bugzilla-rs:`39` - -* :file:`tif_getimage.c`: More fixes for multiple-alpha-channelled - RGB-images as per bug - :bugzilla-rs:`713` - - -Tools changes -------------- - -* :file:`tiffcmp.c`: Added ability to compare the 32-bit integer and - floating point data; complain on unsupported bit depths. - -* :file:`tiffcmp.c`: Use properly sized buffer in short arrays comparison - as per bug - :bugzilla-rs:`785` - -* :file:`fax2ps.c`: Replace insecure :c:func:`mktemp` function with the - :c:func:`tmpfile` as per bug - :bugzilla-rs:`786` - -* :file:`tiffgt.c`: Fix problem on big-endian CPUs so that images - display more correctly. Images display brighter than they should - on a Sun workstation. - -* :file:`tiff2ps.c`: Fixed problem with page sizes as per bug - :bugzilla-rs:`742` - -* :file:`tiff2ps.c`: Interpret the "``-w``" and "``-h``" options independently. As - per bug - :bugzilla-rs:`689` - -* :file:`tiffdump.c`: Fixed problem when read broken TIFFs with the - wrong tag counts (Dmitry V. Levin, Martin Pitt). - -* :file:`tiffset.c`: Convert character option to integer value as per - bug :bugzilla-rs:`725`. - -Contributed software changes ----------------------------- - -* None. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.3.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.3.rst.txt deleted file mode 100644 index c558e0d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.3.rst.txt +++ /dev/null @@ -1,169 +0,0 @@ -Changes in TIFF v3.7.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.3 (:tag:`Release-v3-7-3`) - Previous Version :doc:`v3.7.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Replace runtime endianness check with the compile time one. - -* Added support for the new predictor type (floating point - predictor), defined at the TIFF Technical Note 3. - -* Added Support for custom tags, passed by value. - -* Added support for all DNG tags. - - -Software configuration changes ------------------------------- - -* Do not use empty ``-R`` option when linking with ``--enable-rpath``. - -* Added workaround for OpenBSD/MirOS soname problem as per bug - :bugzilla-rs:`838` - -* Fixed parallel compilation of the libtiff and - libtiffxx libraries as per bug - :bugzilla-rs:`826` - -* :file:`configure.ac`, :file:`libtiff/Makefile.am`: Use libtool machinery to pass - ``rpath`` option. - -* :file:`make.opt`: Build with Win32 CRT library by default. - - -Library changes ---------------- - -* :file:`tiffiop.h`, :file:`tif_open.c`: Added open option "``h``" to avoid reading - the first IFD when needed. As per bug - :bugzilla-rs:`875` - -* :file:`tiff.h`: Use correct :c:expr:`int` size on Sparc 64bit/Sun compiler - platform. As per bug - :bugzilla-rs:`855` - -* :file:`tif_dirinfo.c`: Added support for ``ClipPath``, ``XClipPathUnits`` - and ``YClipPathUnits`` tags. - -* :file:`tif_dirinfo.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make - ``DocumentName``, ``Artist``, ``HostComputer``, ``ImageDescription``, ``Make``, ``Model``, - ``Copyright``, ``DateTime``, ``PageName``, ``TextureFormat``, ``TextureWrapModes`` and - ``TargetPrinter`` tags custom. - -* :file:`tif_jpeg.c`: Cleanup the codec state depending on :c:macro:`TIFF_CODERSETUP` - flag (to fix memory leaks). - -* :file:`tif_dirwrite.c`: Use :c:member:`tdir_count` when calling - :c:func:`TIFFCvtNativeToIEEEDouble` in the :c:func:`TIFFWriteDoubleArray` function as - per bug :bugzilla-rs:`845` - -* :file:`tif_dirinfo.c`, :file:`tif_print.c`: :c:func:`TIFFFetchByteArray` returns - :c:type:`uint16` array when fetching the ``BYTE`` and ``SBYTE`` fields, so we should - consider result as pointer to :c:type:`uint16` array and not as array of :c:expr:`char`. - As per bug - :bugzilla-rs:`831` - -* :file:`tif_dir.c`: More efficient custom tags retrieval as per bug - :bugzilla-rs:`830` - -* :file:`tif_win32.c`: Use ``FILE_SHARE_READ | FILE_SHARE_WRITE`` share - mode in :c:func:`CreateFile` call as per bug - :bugzilla-rs:`829` - -* :file:`tif_jpeg.c`: Substantial fix for :program:`addtiffo` problems with - JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables - in directory. - -* :file:`tif_dirread.c`: Changed the code that computes - ``stripbytecount[0]`` if it appears bogus to ignore if ``stripoffset[0]`` is - zero. This is a common case with GDAL indicating a "null" tile/strip. - -* :file:`tif_jpeg.c`: added ``LIB_JPEG_MK1`` support in :c:func:`JPEGDecodeRaw`. - -* :file:`tif_dirread.c`: Ensure that broken files with too many - values in :c:func:`TIFFFetchPerSampleShorts`, :c:func:`TIFFFetchPerSampleLongs` and - :c:func:`TIFFFetchPerSampleAnys` work ok instead of crashing. - :bugzilla-rs:`843` - -* :file:`tif_predict.h`, :file:`tif_predict.c`: Added ability to decode and encode - floating point predictor, as per TIFF Technical Note 3. - See http://chriscox.org/TIFF_TN3_Draft2.pdf for details. - -* :file:`tiffio.h`, :file:`tiffiop.h`, :file:`tif_dir.c`, :file:`tif_read.c`, :file:`tif_swab.c`: - Added :c:func:`_TIFFSwab24BitData` and :c:func:`TIFFSwabArrayOfLong` functions used to - swap 24-bit floating point values. - -* :file:`tiff.h`: Added predictor constants. - -* :file:`tiffiop.h`, :file:`tif_dir.c`: Use :c:type:`uint32` type for appropriate values - in :c:func:`_TIFFVSetField` function. Inspired by the bug - :bugzilla-rs:`816` - -* :file:`tif_open.c`: Do not read header in case the output file should - be truncated (Ron). - -* :file:`tif_dirinfo.c`, :file:`tif_config.h`.vc: Use :c:func:`lfind` instead of :c:func:`bsearch` - in :c:func:`_TIFFFindFieldInfoByName` function (Ron). - -* :file:`tif_dir.c`, :file:`tif_print.c`: Properly handle all data types in custom - tags. - -* :file:`dirinfo.c`: Added DNG tags. - -* :file:`tiff.h`: Added missed DNG tag (``LensInfo``); added DNG 1.1.0.0 tags. - -* :file:`tif_dir.c`, :file:`tif_print.c`: Added Support for custom tags, passed - by value. - -* :file:`tiff.h`, :file:`tif_dirinfo.c`, :file:`tiffiop.h`: Added EXIF related tags. - - -Tools changes -------------- - -* :file:`tiff2pdf.c`: Print two characters per loop in the - :c:func:`t2p_write_pdf_trailer`. As per bug - :bugzilla-rs:`594` - -* :file:`tiffgt.c`: Use MacOS X OpenGL framework when appropriate. As - per bug :bugzilla-rs:`844` - -* :file:`ppm2tiff.c`: Fixed format string when read PPM file header with - the :c:func:`fscanf` function. As per bug - :bugzilla-rs:`861` - -* :file:`tiffsplit.c`: Check for ``JPEGTables`` tag presence before copying. - -* :file:`tiff2pdfr.c`: Calculate the tile width properly; added new - option "``-b``" to use interpolation in output PDF files (Bruno Ledoux). - -* :file:`tiffdither.c`: Copy the `PhotometricInterpretation` tag from the - input file. - -* :file:`tif2pdf.c`: Fixed problem with alpha channel handling as per - bug :bugzilla-rs:`794`. - - -Contributed software changes ----------------------------- - -* :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, - :file:`addtiffo/tif_ovrcache.h`: - Make overviews working for contiguous images. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.4.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.4.rst.txt deleted file mode 100644 index 4ee369a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.7.4.rst.txt +++ /dev/null @@ -1,84 +0,0 @@ -Changes in TIFF v3.7.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.4 (:tag:`Release-v3-7-4`) - Previous Version :doc:`v3.7.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Fixed important bug in custom tags handling code. - - -Software configuration changes ------------------------------- - -* Applied patch from Patrick Welche (all scripts moved in the - :file:`config` and :file:`m4` directories). - -* :file:`SConstruct`, :file:`libtiff/SConstruct`: Added the first very preliminary - support for SCons software building tool (``_). - This is experimental infrastructure and it will exist along with the - autotools stuff. - -* :file:`port/lfind.c`: Added :c:func:`lfind` replacement module. - - -Library changes ---------------- - -* :file:`tif_dir.c`: When prefreeing ``tv->value`` in :c:func:`TIFFSetFieldV` - also set it to :c:macro:`NULL` to avoid double free when re-setting custom - string fields as per: - :bugzilla-rs:`922` - -* tif_dir.c: Fixed up support for swapping "double complex" - values (128 bits as 2 64 bits doubles). GDAL gcore tests now - pass on bigendian (macosx) system. - -* :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirinfo.c`: Do not upcast ``BYTE`` to - ``SHORT`` in the :c:func:`TIFFFetchByteArray`. Remove :c:func:`TIFFFetchExtraSamples` - function, use :c:func:`TIFFFetchNormalTag` instead as per bug - :bugzilla-rs:`831` - - Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` - instead. - -* :file:`tif_print.c`: Fixed printing of the ``BYTE`` and ``SBYTE`` arrays. - -* :file:`tif_write.c`: Do not check the ``PlanarConfiguration`` field in - the :c:func:`TIFFWriteCheck` function in case of single band images (as per - TIFF spec). - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, - :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_print.c`: - Make ``FieldOfViewCotangent``, ``MatrixWorldToScreen``, ``MatrixWorldToCamera``, - ``ImageFullWidth``, ``ImageFullLength`` and ``PrimaryChromaticities`` tags custom. - -Tools changes -------------- - -* :file:`tiffcp.c`: Fixed ``WhitePoint`` tag copying. - - -Contributed software changes ----------------------------- - -* :file:`tiffdump.c`: Added support for :c:enumerator:`TIFF_IFD` datatype. - -* :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, - :file:`addtiffo/tif_ovrcache.h`: - Make overviews working for contiguous images. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.0.rst.txt deleted file mode 100644 index 5ba2728..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.0.rst.txt +++ /dev/null @@ -1,140 +0,0 @@ -Changes in TIFF v3.8.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.0 (:tag:`Release-v3-8-0`) - Previous Version :doc:`v3.7.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Read-only support for custom directories (e.g. EXIF directory). - -* Preliminary support for MS MDI format. - - -Software configuration changes ------------------------------- - -* Make the default strip size configurable via the - ``--with-default-strip-size`` and :c:macro:`STRIP_SIZE_DEFAULT` options. - - -Library changes ---------------- - -* :file:`tiffio.h`: Added :c:macro:`VC_EXTRALEAN` definition before including - :file:`windows.h`, to reduce the compile time. - -* :file:`tif_jpeg.c`: Improve compilation under MinGW. - -* :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_dirwrite.c`, - :file:`tif_print.c`, :file:`tif_getimage.c`: Make ``InkSet``, ``NumberOfInks``, ``DotRange`` and - ``StoNits`` tags custom. - -* :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make - ``WhitePoint`` tag custom. - -* :file:`tiffio.h`: fixed typo that potentially resulted in - redefininition of :c:macro:`USE_WIN32_FILEIO` - -* :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``RichTIFFIPTC``, - ``Photoshop`` and ``ICCProfile`` tags custom. - -* :file:`libtiff/*`, :file:`contrib/*`: Added 'dual-mode' error handling, enabling - newer code to get context indicator in error handler and still - remain compatible with older code: Done :c:func:`TIFFError` calls everywhere - except in tools. - -* :file:`tiffinfo.c`: Print ``EXIF`` directory contents if exist. - -* :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`: - Custom directory read-only support. - -* :file:`tif_aux.c`, :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, - :file:`tif_dir.c`, :file:`tif_print.c`: Make ``YCbCrCoefficients`` and ``ReferenceBlackWhite`` - tags custom. - -* :file:`tif_dirread.c`: One more workaround for broken ``StripByteCounts`` - tag. Handle the case when ``StripByteCounts`` array filled with - completely wrong values. - -* :file:`tif_dirinfo.c`: Release file descriptor in case of failure - in the :c:func:`TIFFOpenW` function as per bug - :bugzilla-rs:`1003` - -* :file:`tif_dirinfo.c`: Correctly use :c:func:`bsearch` and :c:func:`lfind` - functions as per bug - :bugzilla-rs:`1008` - -* :file:`tif_open.c`, :file:`tiff.h`, :file:`tiffdump.c`: Incorporate preliminary support - for MS MDI format. - :bugzilla-rs:`1002` - -* libtiff.def, :file:`tiffiop.h`, :file:`tiffio.h`: Made :c:func:`TIFFFreeDirectory` - public. - -* :file:`/tif_dirinfo.c`: Make ``XResolution``, ``YResolution`` and - ``ResolutionUnit`` tags modifiable during write process. As per bug - :bugzilla-rs:`977` - -* :file:`if_dirread.c`: Don't try and split single strips into "0" strips - in :c:func:`ChopUpSingleUncompressedStrip`. This happens in some degenerate - cases (like 1×1 files with ``stripbytecounts==0`` (:file:`gtsmall.jp2` embed tiff) - -* :file:`tif_fax3.c`: changed '`at scanline ...`' style warning/errors - with incorrect use of tif_row, to '`at line ... of - strip/tile ...`' style. - - -Tools changes -------------- - -* :file:`tiffcp.c`: Added many error reporting messages; fixed integer - overflow as per bug - :bugzilla-rs:`789` - -* :file:`tiffcp.c`: Return non-zero status when reading fails. - -* :file:`fax2tiff.c`: Properly calculate sizes of temporary arrays - as per bug - :bugzilla-rs:`943` - -* :file:`fax2tiff.c`: Added option `-r` to set RowsPerStrip parameter - as per bug - :bugzilla-rs:`944` - -* :file:`tiffdump.c`: Fixed :c:var:`typeshift` and :c:var:`typemask` arrays initialization - problem as per bug - :bugzilla-rs:`946` - -* :file:`bmp2tiff.c`: Fixed possible integer overflow error as per bug - :bugzilla-rs:`965` - -* :file:`tiffsplit.c`: Copy fax related fields over split parts - as per bug - :bugzilla-rs:`983` - -* :file:`tiffdump.c`: Fixed crash when reading malformed tags. - -* :file:`tiff2pdf.c`: Added missed ``break`` statement as per bug - :bugzilla-rs:`932` - - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo/*`: Major upgrade by Joris to support subsampled - YCbCr images in jpeg compressed TIFF files. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.1.rst.txt deleted file mode 100644 index e6bd081..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.1.rst.txt +++ /dev/null @@ -1,147 +0,0 @@ -Changes in TIFF v3.8.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.1 (:tag:`Release-v3-8-1`) - Previous Version :doc:`v3.8.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Bug-fix release. - - -Software configuration changes ------------------------------- - -* libtool related stuff updated from the 2.1a branch. - -* Fix ``with_default_strip_size`` comparison as reported by - Norihiko Murase. - - -Library changes ---------------- - -* :file:`tif_dirread.c`: Fixed error reporting in :c:func:`TIFFFetchAnyArray` - function as per bug - :bugzilla-rs:`1102` - -* :file:`tif_jpeg.c`, :file:`tif_pixarlog.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`: - Properly restore ``setfield``/``getfield`` methods in cleanup functions. As - per bug - :bugzilla-rs:`1102` - -* :file:`tif_lzw.c`, :file:`tif_pixarlog.c`, :file:`tif_zip.c`: Use - :c:func:`TIFFPredictorCleanup` in codec cleanup methods. As per bug - :bugzilla-rs:`1102` - -* :file:`tif_predict.c`, :file:`tif_predict.h`: Added new function - :c:func:`TIFFPredictorCleanup` to restore parent decode/encode/field methods. - -* :file:`tif_dirread.c`: Fixed integer overflow condition in - :c:func:`TIFFFetchData` function. As per bug - :bugzilla-rs:`1102` - -* :file:`tif_ojpeg.c`: Set the ``ReferenceBlackWhite`` with the - :c:func:`TIFFSetField` method, not directly. As per bug - :bugzilla-rs:`1043` - -* :file:`tif_write.c`: Small code rearrangement in :c:func:`TIFFWriteScanline` - to avoid crash as per bug - :bugzilla-rs:`1081` - -* :file:`tif_dirwrite.c`: Properly write ``TIFFTAG_DOTRANGE`` tag as per - bug :bugzilla-rs:`1088` - -* :file:`tif_print.c`: Properly read :c:macro:`TIFFTAG_PAGENUMBER`, - :c:macro:`TIFFTAG_HALFTONEHINTS`, :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` - and :c:macro:`TIFFTAG_DOTRANGE` tags as per bug - :bugzilla-rs:`1088` - -* :file:`tif_tile.c`: Fix error reporting in :c:func:`TIFFCheckTile` as per - bug :bugzilla-rs:`1063` - -* :file:`tif_color.c`: Avoid overflow in case of wrong input as per - bug :bugzilla-rs:`1065` - -* :file:`tif_dirinfo.c`: Use :c:enumerator:`TIFF_NOTYPE` instead of 0 when - appropriate. As per bug - :bugzilla-rs:`1033` - -* :file:`tif_aux.c`: Fixed type of temporary variable in - :c:func:`_TIFFCheckMalloc` as per bug - :bugzilla-rs:`103` - -* :file:`tif_aux.c`: Return static array when fetching default - ``YCbCrCoefficients`` (another problem, reported a the - :bugzilla-rs:`1029` - entry). - -* :file:`tif_dir.c`: Special handling for ``PageNumber``, ``HalftoneHints``, - ``YCbCrSubsampling`` and ``DotRange`` tags as per bugs - :bugzilla-rs:`1029` - :bugzilla-rs:`1034` - -* :file:`tif_dirread.c`: Use :c:func:`_TIFFGetExifFieldInfo` instead of - :c:func:`_TIFFGetFieldInfo` in :c:func:`TIFFReadEXIFDirectory` call as per bug - :bugzilla-rs:`1026` - -* :file:`tif_dirinfo.c`: Change definitions for :c:macro:`TIFFTAG_ICCPROFILE`, - :c:macro:`TIFFTAG_PHOTOSHOP`, :c:macro:`TIFFTAG_RICHTIFFIPTC`, - :c:macro:`TIFFTAG_XMLPACKET`: readcount should be :c:type:`uint32` value. - - -Tools changes -------------- - -* :file:`ppm2tiff.c`: Added support for PBM files as per bug - :bugzilla-rs:`1044` - -* :file:`tiff2pdf.c`: Functions :c:func:`t2p_sample_rgbaa_to_rgb` and - :c:func:`t2p_sample_rgba_to_rgb` was used in place of each other, that was - resulted in problems with RGBA images with associated alpha. - As per bug - :bugzilla-rs:`1097` - -* :file:`tiff2ps.c`: Properly scale all the pages when converting - multipage TIFF with /width/height/center options set. As per bug - :bugzilla-rs:`1080` - -* :file:`tiff2pdf.c`: Do not create output file until all option checks - will be done. As per bug - :bugzilla-rs:`1072` - -* :file:`bmp2tiff.c`: Added ability to create multipage TIFFs from the - list of input files as per bug - :bugzilla-rs:`1077` - -* :file:`tiffgt.c`: Avoid crashing in case of image unsupported by - TIFFRGBAImage interface. - -* :file:`tiff2pdf.c`: Fixed support for non-YCbCr encoded JPEG - compressed TIFF files, per submission from Dan Cobra. - -* :program:`bmp2tiff`, :program:`pal2rgb`, :program:`ppm2tiff`, :program:`ras2tiff`, - :program:`raw2tiff`, :program:`sgi2tiff`, :program:`tiff2bw`, :program:`tiffcp`: - Fixed jpeg option processing so ``-c jpeg:r:50`` works - properly as per bug: - :bugzilla-rs:`1025` - -Contributed software changes ----------------------------- - -None. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.2.rst.txt deleted file mode 100644 index ef33685..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.8.2.rst.txt +++ /dev/null @@ -1,76 +0,0 @@ -Changes in TIFF v3.8.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.2 (:tag:`Release-v3-8-2`) - Previous Version :doc:`v3.8.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Bug-fix release. - - -Software configuration changes ------------------------------- - -* :file:`tools/Makefile.am`: Use runtime paths linker flags when rpath - option enabled. - -* Makefiles improvements as per bug :bugzilla-rs:`1128` - -* Fixed win32 I/O functions usage as per bug :bugzilla-rs:`1127` - - -Library changes ---------------- - -* :file:`tif_strip.c`: Take subsampling in account when calculating - :c:func:`TIFFScanlineSize`. - -* :file:`tif_jpeg.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`, :file:`tif_pixarlog.c`, - :file:`tif_lzw.c`, :file:`tif_luv.c`: Use :c:func:`_TIFFSetDefaultCompressionState` in all - codec cleanup methods. As per bug :bugzilla-rs:`1120` - -* :file:`tif_jpeg.c`: Do not cleanup codec state in :c:func:`TIFFInitJPEG`. As - per bug :bugzilla-rs:`1119` - -* :file:`tif_dir.c`: Use :c:expr:`double` type instead of :c:type:`dblparam_t`. - -* :file:`tif_dirread.c`: Do not check the ``PlanarConfig`` tag presence - in :c:func:`TIFFReadDirectory`, because it is always set at the start of - function and we allow TIFFs without that tag set. - - -Tools changes -------------- - -* :file:`tiffcp.c`: Do not set ``RowsPerStrip`` bigger than image length. - -* :file:`fax2tiff.c`: Fixed wrong :c:func:`TIFFerror` invocations as per bug - :bugzilla-rs:`1125` - -* :file:`fax2ps.c`: Fixed reading the input stream from stdin as per bug - :bugzilla-rs:`1124` - -* :file:`raw2tiff.c`: Do not set ``RowsPerStrip`` larger than ``ImageLength``. - As per bug :bugzilla-rs:`1110` - - -Contributed software changes ----------------------------- - -None. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0.rst.txt deleted file mode 100644 index e256199..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0.rst.txt +++ /dev/null @@ -1,203 +0,0 @@ -Changes in TIFF v3.9.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.0 (:tag:`Release-v3-9-0`) - Previous Version :doc:`v3.9.0beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* All of the major changes since 3.8.0 were incorporated in - the v3.9.0beta release. This is a stable release from a - stable maintenance branch which incorporates many bug and - security fixes needed by existing users of 3.X.X series - libraries. Any future major changes will be in the 4.0.X - series of releases. - - -Software configuration changes ------------------------------- - -* Updated autotools: Autoconf 2.64, Automake 1.11, libtool - 2.2.6. - -* Enabled support for Automake silent build rules - (``--enable-silent-rules`` or ``make V=0``) - -* Enabled support for Automake colorized tests. - -* Added detection of a 64-bit integer type so that bundled - utilities (like :program:`tiffcrop`) can use it when necessary. Note - that this version of libtiff does not require a 64-bit integer - type but libtiff 4.0 does. - - -Library changes ---------------- - -* :file:`libtiff/Makefile.am`, :file:`libtiff/Makefile.v`: Do not distribute - :file:`tiffconf.h`, remove :file:`tif_config.h`/:file:`tiffconf.h` during cleaning. As - per bug :bugzilla-rs:`1573` - -* :file:`tif_dirinfo.c`: :c:func:`_TIFFMergeFields()` now only merges in - field definitions that are missing. Existing definitions are - silently ignored. (:bugzilla-rs:`1585`) - -* :file:`tif_write.c`: Rip out the fancy logic in - :c:func:`TIFFAppendToStrip` for establishing if an existing tile can - be rewritten to the same location by comparing the current - size to all the other blocks in the same directory. This is - dangerous in many situations and can easily corrupt a file. - (observed in esoteric GDAL situation that's hard to document). - This change involves leaving the :c:expr:`stripbytecount[]` values - unaltered till :c:func:`TIFFAppendToStrip`. Now we only write a block - back to the same location it used to be at if the new data is - the same size or smaller - otherwise we move it to the end of - file. - -* :file:`tif_dirwrite.c`: Try to avoid writing out a full - readbuffer of tile data when writing the directory just - because we have :c:macro:`TIFF_BEENWRITING` at some point in the past. This - was causing odd junk to be written out in a tile of data when - a single tile had an interleaving of reading and writing with - reading last. (highlighted by gdal - :file:`autotest/gcore/tif_write.py` test 7.) - -* :file:`tif_predict.c`: use working buffer in :c:func:`PredictorEncodeTile` - to avoid modifying callers buffer. - :gdal-trac:`1965` - -* :file:`tif_predict.c`, :file:`tif_predict.h`, :file:`tif_lzw.c`, :file:`tif_zip.c`: Improvements so - that predictor based encoding and decoding works in read-write - update mode properly. - :gdal-trac:`1948` - -* :file:`configure.com`, :file:`libtiff/tif_vms.c`: Better OpenVMS - support. Patches from Alexey Chupahin. - -* :file:`tif_fax3.c`: fix leak of ``FAXCS`` state (per bug :bugzilla-rs:`1603`). - -* :file:`tif_fax3.c`: Make :c:func:`find0span` and :c:func:`find1span` non-inline - to make MSVC 6.0 compiler happy. - -* :file:`tif_codec.c`: Avoid :c:macro:`NULL` pointer dereferencing for exotic - compression codec codes. - -* :file:`tif_dirread.c`: zero ``tif->tif_dir`` after freeing the - directory in :c:func:`TIFFReadCustomDirectory`. I don't exactly - remember why this was important. - -* :file:`tif_dirwrite.c`: Fix potential memory leak writing large - double tags. - -* :file:`tif_dirread.c`: Fix unchecked :c:func:`malloc` result. - -* :file:`libtiff/tif_lzw.c`: Properly zero out the codetable. As - per bug :bugzilla:`1929` - -* :file:`libtiff/tif_lzw.c`: Properly zero out the string - table. Fixes :cve:`2008-2327` security issue. - -* :file:`libtiff/tif_jbig.c`: Support the JBIG-KIT 2.0 - (compatibility with the older versions retained). - -* :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: removed all use of - ``UaToAa`` and ``Bitmap16to8`` arrays in :c:struct:`TIFFRGBAImage` structure to - restore ABI compatibility. These were just an attempt to - speed up processing with precalculated tables. - :bugzilla:`1979` - -* :file:`libtiff/tif_codec.c`: Avoid printing ``c->name`` if it does not exist. - -* :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: More ABI corrections. - Removed ``SubsamplingHor/Ver`` from :c:struct:`TIFFRGBAImage` structure. - :bugzilla:`1980` - -* :file:`libtiff/tif_jpeg.c`: Avoid errors if the application - writes a full strip for the last partial strip in a jpeg - compressed file. :bugzilla:`1981` - -* :file:`libtiff/tiffio.h`: GCC will now validate format - specifications for :c:func:`TIFFError`, :c:func:`TIFFErrorExt`, :c:func:`TIFFWarning`, - and :c:func:`TIFFWarningExt` in order to reveal bugs. Cleaned up - resulting warnings throughout for 32 bit build only. - -* :file:`libtiff/tiffiop.h`: Add private type declarations for - :c:type:`int64`, and :c:type:`uint64` so that bundled utilities (like :program:`tiffcrop`) - can use it when necessary. - -* :file:`libtiff/tif_predict.c`: Add support for 32bit integer - horz. predictors. - :bugzilla:`1911` - -* :file:`libtiff/tif_luv.c`: Fix handling of tiled logluv images. - :bugzilla:`2005` - -* :file:`libtiff/tif_write.c`: do not override the planar - configuration to be contig for one sample files if planar - configuration is already set. - :bugzilla:`2057` - -* :file:`libtiff/tif_lzw.c`: Fix buffer underflow bug. - :bugzilla:`2065` - -* :file:`libtiff/tif_luv.c`: correct return codes from ``encoderow`` to - be 1 on success instead of zero. - :bugzilla:`2069` - -* :file:`libtiff/tif_print.c` (:c:func:`TIFFPrintDirectory`): Applied patch - for "tag error may cause segfault in tif_print.c." - :bugzilla:`1896` - - -Tools changes -------------- - -* :file:`tools/tiff2pdf.c`: Fixed setting of alpha value per report - on list. - -* :file:`tools/tiffsplit.c`: Get rid of unsafe :c:func:`strcpy`/:c:func:`strcat` - calls when doing the filename/path construction. - -* :file:`tools/tiff2pdf.c`: More appropriate format string in - :c:func:`t2p_write_pdf_string`; avoid signed/unsigned mismatch. - -* :file:`tools/tiffsplit.c`: Use dynamically allocated array - instead of static when constructing output file names. - -* :file:`tools/tiffcrop.c`, :file:`man/tiffcrop.1`: Incorporated - significant functionality update from Richard Nolde. - -* :file:`tools/tiff2ps.c`: Incorporated significant functionality - update from Richard Nolde. In particular, support for - rotating the image by 90, 180, 270, and 'auto' has been added. - -* :file:`tools/tiff2ps.c`: Remove spurious message printed to - ``stderr``. - -* :file:`tools/tiffsplit.c`: fix ``sampleformat`` to be :c:type:`shortv` instead - of :c:type:`longv`. - -* :file:`tools/rgb2ycbcr.c`, :file:`tools/tiff2rgba.c`: Applied patch for - :cve:`2009-2347` libtiff: integer overflows in various - inter-color space conversion tools. - :bugzilla:`2079` - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0beta.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0beta.rst.txt deleted file mode 100644 index 932097d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.0beta.rst.txt +++ /dev/null @@ -1,225 +0,0 @@ -Changes in TIFF v3.9.0beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.0beta (:tag:`Release-v3-9-0beta`) - Previous Version :doc:`v3.8.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* New :program:`tiffcrop` utility contributed by Richard Nolde. - :program:`tiffcrop` does the same as :program:`tiffcp`, but also can crop, - extract, rotate and mirror images. - -* :file:`tif_jbig.c`: Added support for JBIG compression scheme - (34661 code), contributed by Lee Howard. - -* Totally new implementation of OJPEG module from - Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files - should be supported now that was not supported previously. - -Software configuration changes ------------------------------- - -* :file:`tif_config.wince.h`, :file:`tiffconf.wince.h`, :file:`tif_wince.c`: WinCE-specific - compatibility stuff from Mateusz Loskot. - -* Rename :file:`config.h.vc` and :file:`tif_config.h.vc` to :file:`config.vc.h` and - :file:`tif_config.vc.h` for easier identification by folks using an IDE. - -* :file:`configure`, :file:`configure.ac`: OJPEG support enabled by default (i.e., - when conformant JPEG support is enabled). - -* :file:`README.vms`, :file:`Makefile.am`, :file:`configure.com`, :file:`libtiff/Makefile.am`, - :file:`libtiff/tif_config.h-vms`, :file:`libtiff/tif_stream.cxx`, - :file:`libtiff/tif_vms.c`, :file:`libtiff/tiffconf.h-vms`: - Added support for OpenVMS by Alexey Chupahin. - -* :file:`nmake.opt`: use ``/EHsc`` for VS2005 compatibility. Also define - :c:macro:`_CRT_SECURE_NO_DEPRECATE` to avoid noise on VS2005. - - -Library changes ---------------- - -* :file:`tif_dirinfo.c` (:c:func:`_TIFFFindFieldInfo`): Don't attempt to - :c:func:`bsearch` on a :c:macro:`NULL` fieldinfo list. - (:c:func:`_TIFFFindFieldInfoByName`): Don't attempt to :c:func:`lfind` on a :c:macro:`NULL` - fieldinfo list. - -* :file:`tif_jpeg.c`: Changed :c:func:`JPEGInitializeLibJPEG` so that it - will convert from decompressor to compressor or compress to decompress - if required by the force arguments. This works around a problem in - where the :c:func:`JPEGFixupTestSubsampling` may cause a decompressor to - be setup on a directory when later a compressor is required with the - force flag set. Occurs with the :program:`addtiffo` program for instance. - -* :file:`tif_dirwrite.c`: Fixed swapping of byte arrays stored - in-place in tag offsets as per bug - :bugzilla-rs:`1363` - -* :file:`tif_getimage.c`: workaround for "Fractional scanline" error - reading OJPEG images with rowsperstrip that is not a multiple of - vertical subsampling factor. This bug is mentioned in - :bugzilla-rs:`1390` and - ``_ - -* :file:`tif_dirread.c`: Added special function to handle - ``SubjectDistance`` EXIF tag as per bug - :bugzilla-rs:`1362` - -* :file:`tif_dirread.c`, :file:`tif_read.c`: Type of the byte counters - changed from :c:type:`tsize_t` to :c:type:`uint32` to be able to work with data arrays - larger than 2GB. Fixes bug - :bugzilla-rs:`890`. - Idea submitted by Matt Hancher. - -* :file:`tif_dir.c`: Workaround for incorrect TIFFs with - ``ExtraSamples == 999`` produced by Corel Draw. As per bug - :bugzilla-rs:`1490` - -* :file:`tif_write.c`: :c:func:`TIFFAppendToStrip` - clear sorted flag if - we move a strip. - :bugzilla-rs:`1359` - -* :file:`tif_fax3.c`: Save the state of printdir codec dependent method. - -* :file:`tif_jpeg.c`: Save the state of printdir codec dependent method - as per bug - :bugzilla-rs:`1273` - -* :file:`tif_win32.c`: Fixed problem with offset value manipulation - as per bug - :bugzilla-rs:`1322` - -* :file:`tif_fax3.c`, :file:`tif_next.c`, :file:`tif_pixarlog.c`: Fixed multiple - vulnerabilities, as per Gentoo bug (): - ``_ - -* :file:`tif_lzw.c`, :file:`tif_zip.c`: Fixed problems with mixing - encoding and decoding on the same read-write TIFF handle. The LZW - code can now maintain encode and decode state at the same time. The - ZIP code will switch back and forth as needed. - :bugzilla-rs:`757` - -* :file:`tif_msdos.c`: Avoid handle leak for failed opens. - c/o Thierry Pierron - -* :file:`tif_dirwrite.c`: take care not to flush out buffer of strip/tile - data in :c:func:`_TIFFWriteDirectory` if :c:macro:`TIFF_BEENWRITING` not set. Relates - to bug report by Peng Gao with black strip at bottom of images. - -* :file:`tif_dirwrite.c`: make sure to use :c:type:`uint32` for wordcount in - :c:func:`TIFFWriteNormalTag` if ``writecount`` is :c:macro:`VARIABLE2` for ASCII fields. - It already seems to have been done for other field types. Needed - for :program:`tiffset` on files with geotiff ascii text. - -* :file:`tif_dirinfo.c`: Added missed EXIF tag ``ColorSpace`` (40961). - -* :file:`tif_dirread.c`: Move IFD fetching code in the separate - function :c:func:`TIFFFetchDirectory` avoiding code duplication in - :c:func:`TIFFReadDirectory` and :c:func:`TIFFReadCustomDirectory`. - -* :file:`tif_readdir.c`: Added case in :c:func:`EstimateStripByteCounts` for tiled - files. Modified :c:func:`TIFFReadDirectory` to not invoke - :c:func:`EstimateStripByteCounts` for case where entry 0 and 1 are unequal but - one of them is zero. - :bugzilla-rs:`1204` - -* :file:`tif_open.c`, :file:`tif_dirread.c`, :file:`tiffiop.h`: Move IFD looping - checking code in the separate function :c:func:`TIFFCheckDirOffset`. - -* :file:`tif_aux.c`: Added :c:func:`_TIFFCheckRealloc` function. - -* :file:`tif_fax3.c`: Fixed problems in fax decoder as per bug - :bugzilla-rs:`1194` - -* :file:`tif_jbig.c`: Added support for JBIG compression scheme - (34661 code) contributed by Lee Howard. As per bug - :bugzilla-rs:`896`. - -* :file:`tif_getimage.c`: Added support for planarconfig separate - non-subsampled YCbCr (i.e. separate YCbCr with subsampling ``[1,1]``). - -* :file:`tif_getimage.c`: Revision of all RGB(A) put routines: - - * Conversion of unassociated alpha to associated alpha - now done with more performant LUT, and calculation more - correct. - * Conversion of 16bit data to 8bit data now done with - more performant LUT, and calculation more correct - * Bugfix of handling of 16bit RGB with unassociated alpha - -* :file:`tif_ojpeg.c`: totally new implementation - -* :file:`tif_getimage.c`: removed :c:macro:`TIFFTAG_JPEGCOLORMODE` handling - of OJPEG images in favor of tif_getimage.c native handling of - YCbCr and desubsampling. - -* :file:`tif_jpeg.c`: :c:func:`JPEGVSetField` so that altering the photometric - interpretation causes the "upsampled" flag to be recomputed. Fixes - peculiar bug where photometric flag had to be set before jpegcolormode - flag. - -Tools changes -------------- - -* :file:`tiff2ps.c`: Added support 16-bit images as per bug - :bugzilla-rs:`1566`. - Patch from William Bader. - -* :file:`tiff2pdf.c`: Fix for :c:macro:`TIFFTAG_JPEGTABLES` tag fetching and - significant upgrade of the whole utility as per bug - :bugzilla-rs:`1560`. - Now we don't need :file:`tiffiop.h` in :program:`tiff2pdf` anymore and will open output - PDF file using :c:func:`TIFFClientOpen` machinery as it is implemented - by Leon Bottou. - -* :file:`tiffcrop.c`: New tiffcrop utility contributed - by Richard Nolde. As per bug - :bugzilla-rs:`1383` - -* :file:`tiff2pdf.c`: Do not assume inches when the resolution units - do not specified. As per bug - :bugzilla-rs:`1366` - -* :file:`tiffset.c`: Properly handle tags with :c:macro:`TIFF_VARIABLE` writecount. - As per bug - :bugzilla-rs:`1350` - -* :file:`tif2rgba.c`: This utility does not work properly on big-endian - architectures. It was fixed including the bug - :bugzilla-rs:`1149` - -* :file:`tiff2pdf.c`: Fix handling of ``-q`` values. - :bugzilla-rs:`587` - -* :file:`tiffcmp.c`: Fixed floating point comparison logic as per bug - :bugzilla-rs:`1191` - -* :file:`tiff2pdf.c`: Fixed buffer overflow condition in - :c:func:`t2p_write_pdf_string` as per bug - :bugzilla-rs:`1196` - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo/tif_overview.c`: Fix problems with odd sized - output blocks in :c:func:`TIFF_DownSample_Subsampled` - (:bugzilla-rs:`1542`). - -* :file:`contrib/dbs/xtiff/xtiff.c`: Make xtiff utility compilable. - Though it is still far from the state of being working and useful. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.1.rst.txt deleted file mode 100644 index 24a3709..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.1.rst.txt +++ /dev/null @@ -1,63 +0,0 @@ -Changes in TIFF v3.9.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.1 (:tag:`Release-v3-9-1`) - Previous Version :doc:`v3.9.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* This is a bug-fix release for several bugs (two of which - are dire) which were discovered in the 3.9.0 release. - - -Software configuration changes ------------------------------- - -* Several defines were missing from :file:`tif_config.vc.h` which - are necessary to compile the library using MSVC. - -* Colorized tests were actually not enabled as expected. - Parallel tests mode is now also enabled so that tests can be - run in parallel, and test output is sent to :file:`.log` files. - - -Library changes ---------------- - -* :file:`libtiff/tif_write.c` (:c:func:`TIFFAppendToStrip`): Remove cast - which caused libtiff to output a wrong last strip with - byte-count and strip-offset of zero. This cast was added on - the day of the 3.9.0 release. - -* :file:`libtiff/tif_dirwrite.c`: Back out changes from 2007-11-22 - that resulted in the final strip not being written in some - circumstances. - :bugzilla:`2088` - - -Tools changes -------------- - -None - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.2.rst.txt deleted file mode 100644 index 961a27a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.2.rst.txt +++ /dev/null @@ -1,67 +0,0 @@ -Changes in TIFF v3.9.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.2 (:tag:`Release-v3-9-2`) - Previous Version :doc:`v3.9.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Fixes a number of bugs present in the 3.9.1 release. - -* OJPEG support updated to work with IJG JPEG 7 release. - -* :program:`tiffcrop` validated for most TIFF storage subformats and sample depths. - - -Software configuration changes ------------------------------- - -* x86_64 now uses the same default fill order as i386. - - -Library changes ---------------- - -* Writing tags with an array value of type :c:enumerator:`TIFF_DOUBLE` now - returns correct error status. The :c:macro:`TIFFTAG_SMINSAMPLEVALUE` and - :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` tags failed to write without this fix. - -* OJPEG decoder now works with IJG JPEG 7. Resolves "Bug - 2090 - OJPEG crash with libjpeg v7". - :bugzilla:`2090` - -* Eliminate most GCC "dereferencing type-punned pointer" - warnings. - - -Tools changes -------------- - -* New :program:`tiffcrop` from Richard Nolde. Major updates to add - significant functionality for reading and writing tile based - images with bit depths not a multiple of 8 which cannot be - handled by :program:`tiffcp`. - -* Allow building tools with GCC using the ``-Wformat - -Werror=format-security`` flags. - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.3.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.3.rst.txt deleted file mode 100644 index 0712788..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.3.rst.txt +++ /dev/null @@ -1,105 +0,0 @@ -Changes in TIFF v3.9.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.3 (:tag:`Release-v3-9-3`) - Previous Version :doc:`v3.9.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Fixes for :cve:`2010-1411`. - -* Various reported bug fixes. - - -Software configuration changes ------------------------------- - -* libtool is updated to version 2.2.10. - - -Library changes ---------------- - -* Fix a couple of issues that trigger failures in some - cases when using :c:func:`TIFFReadScanline` with JPEG compressed - subsampled ycbcr images. - :bugzilla:`1936` - -* Ensure tile and scanline sizes are reset when moving to - new directories. - :bugzilla:`1936` - -* Do not generate a ``JPEGTables`` tag when creating the JPEG - TIFF as is is not required in order to prevent it from being - unused and filled with invalid data. (Leave it to be - generated by later activity.) - :bugzilla:`2135` - -* Don't return error on badly-terminated MMR strips. - :bugzilla:`2029` - -* Have :c:macro:`TIFFTAG_REFERENCEBLACKWHITE` always print 6 floats - instead of ``2*SamplesPerPixel``. - :bugzilla:`2186` - -* Ensure that JPEG quality is always set in - :c:func:`JPEGPreEncode`, not just when we want to output local tables. - Otherwise the quality used during compression may not be right - and might not match the tables in the tables tag. This bug - only occurs when seeking between directories in the midst of - writing blocks. :gdal-trac:`3539` - -* OJPEG: Report an error and avoid a crash if the input - file is so broken that the strip offsets are not defined. - -* Eliminate FAX3 decoder buffer overrun possibility - (:cve:`2010-1411`). - -* Restore ``ReferenceBlackWhite`` as a non-custom field. This - avoids a multi-thread reentrancy problem as well as fixing - output of wrong tag value due to redundant definitions for the - same tag in the :c:expr:`tiffFieldInfo[]` array. Resolves - :bugzilla:`2185` - -Tools changes -------------- - -* :program:`tiff2pdf`: Write the JPEG SOI headers into the TIFF strip - data rather than skipping them. This fixes the ability to view in - Acrobat Reader, Evince, and Ghostscript. - :bugzilla:`2135` - -* :program:`ppm2tiff`: While case for parsing comment line - requires extra parenthesis to work as expected. Reported by - Thomas Sinclair. - -* :program:`tiffcp`: add a new option ``-x`` to force merged tiff - file ``PAGENUMBER`` value in sequence for users who care the page - sequence, this will also prevent :program:`tiff2pdf` from creating pdf file from - the merged tiff file with wrong page sequence. - -* :program:`tiffcp`: Applied Tom Lane's patch to reject YCbCr - subsampled data since :program:`tiffcp` currently doesn't support it. - :bugzilla:`2097` - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.4.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.4.rst.txt deleted file mode 100644 index f95bb7e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.4.rst.txt +++ /dev/null @@ -1,69 +0,0 @@ -Changes in TIFF v3.9.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.4 (:tag:`Release-v3-9-4`) - Previous Version :doc:`v3.9.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Complete the fixes for :cve:`2009-2347`. - -* :program:`tiffcrop` now supports custom page sizes. - - -Software configuration changes ------------------------------- - -* None. - - -Library changes ---------------- - -* Fixed inadequate validation of the ``SubjectDistance`` field. - -* Fixed bad handling of out of order tags definated late by a codec. - -* Avoid re-preparing jpeg tables unnecessarily. - - -Tools changes -------------- - -* :program:`tiffcrop`: Added an option to allow the user to specify a - custom page size on the command line. Fix the case where a - page size specified with a fractional part was being coerced - to an integer by retyping the variables that define the paper - size. Corrected European page size dimensions. - -* :program:`tiff2rgba`: Completed fixes for ":cve:`2009-2347` libtiff: - integer overflows in various inter-color space conversion - tools". :bugzilla:`2079` - -* :program:`tiff2pdf`: Fix assorted bugs in :program:`tiff2pdf`: missing ``return`` - in :c:func:`t2p_read_tiff_size` causes ``t2p->tiff_datasize`` to be set entirely - wrong for :c:macro:`COMPRESSION_JPEG` case, resulting in memory stomp if actual - size is larger. Also, there are a bunch of places that try to - :c:func:`memset` a malloc'd buffer before checking for malloc failure, which - would result in core dump if there actually were a failure. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.5.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.5.rst.txt deleted file mode 100644 index 1246deb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v3.9.5.rst.txt +++ /dev/null @@ -1,217 +0,0 @@ -Changes in TIFF v3.9.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.5 (:tag:`Release-v3-9-5`) - Previous Version :doc:`v3.9.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :file:`configure.ac`: Should use ``AC_CANONICAL_HOST`` since host specifies - the run-time target whereas target is used to specify the final - output target if the package is a build tool (like a compiler), - which libtiff is not. Resolves :bugzilla:`2307` "Use - AC_CANONICAL_HOST macro". - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`: Check the number of samples per pixel when - working with YCbCr image in :c:func:`PickContigCase`. As per bug - :bugzilla:`2216` - -* :file:`libtiff/tif_dir.c`: Set the bogus post-decoding hook when processing - :c:macro:`TIFFTAG_BITSPERSAMPLE` in :c:func:`_TIFFVSetField` for the case of 8 bit when - we don't need any post-processing. That helps to reset the hook if we - previously set this field to some other value and the hook was - initialized accordingly. As per bug - :bugzilla:`2035` - -* :file:`libtiff/tif_getimage.c`: Avoid wrong math du to the signed/unsigned - integer type conversions. As per bug - :bugzilla:`2207` - -* :file:`libtiff/tif_dirinfo.c`: Don't use assertions in :c:func:`_TIFFFieldWithTag` - and :c:func:`_TIFFFieldWithName` if the tag is not found in the tag table. - This should be normal situation and returned :c:macro:`NULL` value should be - properly handled by the caller. - -* :file:`libtiff/{tif_dirwrite.c, tif_print.c}`: Properly handle ``DotRange`` - tag as it can be either byte or short size and should be set and read - by value, not as an array. As per bug - :bugzilla:`2116` - -* :file:`libtiff/tif_dirread.c`: Really reset the tag count in :c:func:`CheckDirCount` - to expected value as the warning message suggests. As per bug - :bugzilla:`1963` - -* :file:`libtiff/tif_open.c`: Fix mode check before opening a file. - :bugzilla:`1906` - -* :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`: apply patch for - :cve:`2010-3087` per bug - :bugzilla:`2140` - -* :file:`libtiff/tif_dirread.c`: fix crash when reading a badly-constructed - TIFF per :bugzilla:`1994` - -* :file:`libtiff/tif_ojpeg.c`: fix buffer overflow on problem data - :bugzilla:`1999` - -* :file:`libtiff/tif_dirread.c`: modify warnings - :bugzilla:`2016` - -* :file:`libtiff/tif_jpeg.c`: fix use of clumplines calculation - :bugzilla:`2149` - -* :file:`libtiff/tif_color.c`: prevent crash in handling bad TIFFs - resolves :cve:`2010-2595`, - :bugzilla:`2208` - -* :file:`libtiff/tif_dirread.c`: fix needless tag ordering warning - :bugzilla:`2210` - -* :file:`libtiff/tif_jpeg.c`: reduce usage of ``JCS_UNKNOWN`` in order - to improve compatibility with various viewers - submitted by e-mail from `Dwight Kelly `_ - -* :file:`libtiff/tif_strip.c`: use :c:func:`TIFFGetFieldDefaulted` instead - of :c:func:`TIFFGetField` when we assume that it will succeed - :bugzilla:`2215` - -* :file:`libtiff/tif_dirread.c`: tolerate some cases where - ``FIELD_COLORMAP`` is missing - :bugzilla:`2189` - -* :file:`libtiff/tif_jpeg.c`: Fix regressions with 2 and 3 band images - caused by commit on 2010-12-14. Submitted by e-mail from - `Even Rouault `_ - -* :file:`libtiff/tif_dirwrite.c`: Avoid undefined behaviour when casting from - :c:expr:`float` to :c:expr:`unsigned int` in :c:func:`TIFFWriteRationalArray` as reported by - Kareem Shehata. - -* :file:`libtiff/tif_fax3.h`: Protect against a fax ``VL(n)`` codeword commanding - a move left. Without this, a malicious input file can generate an - indefinitely large series of runs without ``a0`` ever reaching the right - margin, thus overrunning our buffer of run lengths. Per :cve:`2011-0192`. - This is a modified version of a patch proposed by Drew Yao of Apple - Product Security. It adds an :c:func:`unexpected` report, and disallows the - equality case, since emitting a run without increasing ``a0`` still allows - buffer overrun. - -* :file:`libtiff/tif_fax3.h`: Fix to last change allowing zero length - runs at the start of a scanline---needed for legal cases. - -* :file:`libtiff/tif_thunder.c`: Correct potential buffer overflow with - thunder encoded files with wrong bitspersample set. The libtiff - development team would like to thank Marin Barbella and TippingPoint's - Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, - :cve:`2011-1167`). - :bugzilla:`2300` - -* :file:`libtiff/tiffiop.h`: avoid declaring :c:type:`int64`/:c:type:`uint64` on AIX with XLC - where they are already available. (:bugzilla:`2301`) - - -Tools changes -------------- - -* :file:`tools/tiffcrop.c`: Patch from Richard Nolde. Reject YCbCr - subsampled data since tiffcrop currently doesn't support it. Fix - JPEG support. - -* :file:`tools/tiffcp.c`: Initialize buffer arrays with zero to avoid - referencing to uninitialized memory in some cases (e.g. when tile size - set bigger than the image size). - -* :file:`tools/tiff2pdf.c`: Better generation of ID field in - :c:func:`t2p_write_pdf_trailer`. Get rid of GCC aliasing warnings. - -* :file:`tools/tiff2pdf.c`: Fixed computation of the tile buffer size when - converting JPEG encoded tiles. - -* :file:`tools/tiff2pdf.c`: Better handling of string fields, use static - string buffers instead of dynamically allocated, use :c:func:`strncpy` instead - of :c:func:`strcpy`, control the string lengths. - -* :file:`tools/tiff2bw.c`, :file:`tools/thumbnail.c`, :file:`tools/pal2rgb.c`: Fix the count for - ``WhitePoint`` tag as per bug - :bugzilla:`2042` - -* :file:`tools/tiffdump.c`: Use :c:func:`PrintData` function instead of - :c:func:`PrintByte`/:c:func:`PrintShort`/:c:func:`PrintLong`. Should fix an issue reported at - :bugzilla:`2116` - -* :file:`tools/tiffset.c`: Properly handle ``TIFFTAG_PAGENUMBER``, - ``TIFFTAG_HALFTONEHINTS``, ``TIFFTAG_YCBCRSUBSAMPLING``, ``TIFFTAG_DOTRANGE`` - which should be set by value. - -* :file:`tools/tiffdump.c`: Avoid integer overflows computing the buffer size - for large directories. As per bug - :bugzilla:`2218` - -* :file:`tools/tiff2pdf.c`: Fixed ID buffer filling in - :c:func:`t2p_write_pdf_trailer`, thanks to Dmitry V. Levin. - -* :file:`tools/tiffcrop.c`: Patch from Richard Nolde to avoid a - potentially unterminated buffer due to using an exceptionally long - file name. - -* :file:`tools/tiff2ps.c`: improvements and enhancements from Richard Nolde - with additional command line options for Document Title, - Document Creator, and Page Orientation - -* :file:`tools/tiffsplit.c`: abort when reading a TIFF without a byte-count - per :bugzilla:`1996` - -* :file:`tools/tiff2pdf.c`: add fill-page option - :bugzilla:`2051` - -* :file:`tools/fax2ps.c`: replace unsafe :c:func:`tmpfile` with :c:func:`mkstemp` - :bugzilla:`2118` - -* :file:`tools/tiff2pdf.c`: fix colors for images with RGBA - interleaved data - :bugzilla:`2250` - -* :file:`tools/tiffcrop.c`: new release by Richard Nolde - :bugzilla:`2004` - -* :file:`tools/fax2ps.c`: be consistent with page-numbering - :bugzilla:`2225` - -* :file:`tools/gif2tiff.c`: fix buffer overrun - :bugzilla:`2270` - -* :file:`tools/fax2ps.c` (:c:func:`main`): Use :c:func:`tmpfile` rather than :c:func:`mkstemp` since - it is much more portable. Tmpfile is included in ISO/IEC - 9899:1990 and the WIN32 CRT. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.0.rst.txt deleted file mode 100644 index 21b0102..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.0.rst.txt +++ /dev/null @@ -1,213 +0,0 @@ -Changes in TIFF v4.0.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.0 (:tag:`Release-v4-0-0`) - Previous Version :doc:`v3.9.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. Please consult -the ChangeLog file in the source package for full change details. The -following information is located here: - - -Major changes -------------- - -BigTIFF support changes: - -* The ``options`` parameter in the :c:func:`TIFFOpen` and :c:func:`TIFFClientOpen` funcs has - been extended. When creating new files, you can add option ``4`` to - specify you want to create a ClassicTIFF file, though that is the - default and the option is not strictly necessary. (As such, old - calling code will continue to function and create ClassicTIFF files.) - Or you can add option ``8`` to specify you want to create a BigTIFF file - instead. This new option is also reflected in some of the tools we - already upgraded. For instance, you can use the ``-8`` option on :program:`tiffcp` to - have :program:`tiffcp` produce BigTIFF files instead of the default ClassicTIFF. - (Whilst an additional option is provided for version selection when - creating new files, no such option is necessary when reading TIFF - files. LibTiff reads ClassicTIFF and BigTIFF both, and the application - does not need to be aware which TIFF version an opened file is.) - -* Although the tag count in BigTIFF is 64bit, we restricted the - count in the implementation to a much more reasonable size. This is - necessary in current implementation, because all tag data gets read - automatically in the IFD reading stage, so if there's half a dozen - private tags with multiple gigabytes of data that causes considerable - overhead even if the application level is never interested in these - tags. Our choice to ignore tags with data longer then a certain sanity - value is much needed as things stand. We also recommend to step away - from writing tiles that are 8 kilobyte in their uncompressed form, or - writing single-line strips, in really big files, resulting in mega's - of tiles or strips. It's much more efficient to choose bigger tile or - strip sizes, up to several megabyte if needed, and have a few kilo of - tiles or strips instead. - -* Although it's rare, some application code does directly access - file offsets. Some of these are automatically upgraded because they - used the :c:type:`toff_t` type, others need to be aware that the datatype - changed and need to start using :c:type:`toff_t` or :c:type:`uint64`. This impacts access - to tags like the ``EXIF`` IFD tag, for example, or the ``SubIfds`` tag, or to - ``StripOffsets`` or ``TileOffsets``, the return type of functions like - :c:func:`TIFFCurrentDirOffset`, and a parameter type to functions like - :c:func:`TIFFSetSubDirectory`. - -* Although it's rare, some application code does use structures - like :c:struct:`TIFFHeader` or :c:struct:`TIFFDirEntry` that used to be an exact binary - representation of TIFF structures. These need to change. The old - TIFFHeader structure is replaced by the new TIFFHeaderClassic, - TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact - binary representation of the ClassicTIFF and BigTIFF header, and of - the part that is common to both. There is no new equivalent for the - old :c:struct:`TIFFDirEntry` structure (or more precisely, there is still a - :c:struct:`TIFFDirEntry` structure, but it is changed, moved to library-private - definition, and no longer an exact binary representation of the tag - structure of either TIFF version). - -* Sizer functions, like :c:func:`TIFFTileSize` or :c:func:`TIFFScanlineSize` and the - like, return a :c:func:`tmsize_t` value (:c:func:`tmsize_t` is defined as :c:type:`int32` on 32bit - machines, and :c:type:`int64` on 64bit machines, and as such it is meant to - represent signed memory sizes). This is because we figure 98% of the - calling code uses the return value as sizes in allocations and the - like. So, any overflow that is theoretically possible with BigTIFF - when LibTiff is running on a 32bit system, is best detected inside the - sizer functions and it is best to return a type that makes sense as a - memory size. If your calling code is the exception and is interested - in actual file size, you best use the newer :c:func:`TIFFTileSize64` or - :c:func:`TIFFScanlineSize64` function that returns an :c:type:`uint64` type. - -* These TIFF tags require a 64-bit type as an argument in - libtiff 4.0.0: - - * :c:macro:`TIFFTAG_FREEBYTECOUNTS` - * :c:macro:`TIFFTAG_FREEOFFSETS` - * :c:macro:`TIFFTAG_STRIPBYTECOUNTS` - * :c:macro:`TIFFTAG_STRIPOFFSETS` - * :c:macro:`TIFFTAG_TILEBYTECOUNTS` - * :c:macro:`TIFFTAG_TILEOFFSETS` - -Other important backward incompatible changes in the public API: - -* :c:func:`TIFFRewriteField` renamed into :c:func:`_TIFFRewriteField` and moved out - from the public interface (from :file:`tiffio.h` to :file:`tiffiop.h`). Type of its - ``count`` parameter changed from :c:type:`uint32` to :c:type:`tmsize_t`. - -* :c:func:`TIFFMergeFieldInfo` returns non-void result now. It returns 0 - if successful and -1 if failed. Though this is now obsoleted function - and should not be used in new programs. Use the new tag extension - scheme instead. - -* :c:func:`TIFFFieldWithTag` and :c:func:`TIFFFieldWithName` functions now return - pointer to :c:struct:`TIFFField` constant object instead of :c:struct:`TIFFFieldInfo`. - -* :c:func:`TIFFReassignTagToIgnore` function and :c:enum:`TIFFIgnoreSense` enumeration - have been removed. They was unused and never been used properly. - Should be unneeded for high-level applications. - -* :c:struct:`TIFFTagValue` structure removed from the public :file:`tiffio.h` - to private :file:`tif_dir.h` and not accessible anymore. It should be unneeded - for high-level applications. - - -Software configuration changes ------------------------------- - -Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4. - -* Enabled support for Automake silent build rules - (``--enable-silent-rules`` or ``make V=0``) - -* Enabled support for Automake colorized and parallel tests. - -* Added detection of 64-bit integer types since libtiff 4.0 - requires use of 64-bit signed and unsigned integer types. - -* Libtiff now provides a more comprehensive test suite with - over 72 tests, which may be executed on Unix-like systems, or - under Microsoft Windows using MinGW/MSYS or Cygwin. - -* ``--disable-lzma`` configure option to disable use of liblzma. - -* ``--enable-defer-strile-load`` configure option to enable - experimental deferred strip/tile offset/size loading. May - cause some extremely sophisticated uses of libtiff to fail. - -* ``--enable-chunky-strip-read`` configure option to enable - experimental enable reading large strips in chunks in - :c:func:`TIFFReadScanline`. - -* Now always uses WIN32 native I/O functions for Microsoft - Windows except for under Cygwin. - -* Now provides a pkg-config support file (libtiff-4.pc). - - -Library changes ---------------- - -* Patches/fixes made to stable libtiff (v3.9.X) are also - applied to 4.0.0. There are too many to list here. See the - distribution :file:`ChangeLog` for a detailed change list. - -* There is considerable change in some files like - :c:func:`tif_dirread` and :c:func:`tif_dirwrite`. These changes don't impact - backwards compatibility, they are mostly a clean rewrite that - does allow BigTIFF support as well as somewhat more robust - reading of the unexpected already and will also serve future - API extension but does not impact current API or functionality - in a negative way that you need to know about. - -* Although there is still a functional definition for types - like :c:type:`toff_t` (file offset), :c:type:`tstrip_t` (strip index number), etc, - we recommend against using these in newer code. We have - learned that it is next to impossible to use these - consistently and make real abstraction of the binary format of - these types. Instead, at a certain level we always end up - doing casts anyway, and taking the exact binary format into - account, so these types are nothing but dangerously misleading - and obfuscating. You do not need to update calling code that - uses them, as 99.9% of such code will continue to work. But we - recommend against using them in newer calling code, and we - started replacing them with binary clear types like :c:type:`uint16`, - :c:type:`uint32` and such in the library. - -* We do use and will continue to use one functional type - that is an exception to the above rule, being :c:type:`tmsize_t`. This - is a signed memory size type, i.e. it is :c:type:`int32` on 32bit - machines, or :c:type:`int64` on 64bit machines. - -* Optionally support LZMA compression via TIFF tag 34925. - :program:`tiffcp` supports compression levels similar to ``-c lzma:p1`` or - ``-c zip:p9`` for setting the LZMA compression parameters. - -* Optionally defer the load of strip/tile offset and size - tags for optimized scanning of directories. Enabled with the - ``--enable-defer-strile-load`` configure option (:c:macro:`DEFER_STRILE_LOAD` - ``#define`` in :file:`tif_config.h`). - -* Optionally enable experimental support for reading big - strips in chunks. Enabled with the ``--enable-chunky-strip-read`` - configure option. - - -Tools changes -------------- - -* :program:`tiffset`: add ``-d`` and ``-sd`` switches to allow operation on - a particular directory, not just the first. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.1.rst.txt deleted file mode 100644 index a618290..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.1.rst.txt +++ /dev/null @@ -1,60 +0,0 @@ -Changes in TIFF v4.0.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.1 (:tag:`Release-v4-0-1`) - Previous Version :doc:`v4.0.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* ``--enable-ld-version-script``: New :program:`configure` option to - enable shared library symbol versioning on ELF-based systems - (e.g. Linux and FreeBSD) which use the GNU linker. This - allows multiple major versions of libtiff to be loaded - simultaneously into the same application or library without - conflict, as long as all libtiffs involved are built with - versioned symbols. This option is not enabled by default. - -* Added libtiff private dependency on ``-llzma`` for pkg-config. - - -Library changes ---------------- - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`: Extra caution around - assumption tag fetching is always successful. - -* :file:`libtiff/tif_jpeg.c`: Extra caution for case where :c:var:`sp` is :c:macro:`NULL`. - - -Tools changes -------------- - -* None - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.10.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.10.rst.txt deleted file mode 100644 index 8be8d02..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.10.rst.txt +++ /dev/null @@ -1,239 +0,0 @@ -Changes in TIFF v4.0.10 -======================= - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.10 (:tag:`v4.0.10`) - Previous Version :doc:`v4.0.9 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at - `Gitlab `_. - This is the first release to be made from the new Git repository. - - -Software configuration changes ------------------------------- - -* Minimum CMake version is now v2.8.11 for the CMake-based build. - -* Libwebp will be automatically detected and used by configure/cmake if present. - -* Libzstd will be automatically detected and used by configure/cmake if present. - - -Library changes ---------------- - -* Added ZSTD compression codec. - `Zstandard `_ or zstd as - short version, is a fast lossless compression algorithm, targeting - real-time compression scenarios at zlib-level and better - compression ratios. It's backed by a very fast entropy stage, - provided by Huff0 and FSE library. - - We require libzstd >= 1.0.0 so as to be able to use streaming - compression and decompression methods. - - The default compression level we have selected is 9 (range goes - from 1 to 22), which experimentally offers equivalent or better - compression ratio than the default deflate/ZIP level of 6, and - much faster compression. - - For example on a 6600×4400 16bit image, ``tiffcp -c zip`` runs in - 10.7 seconds, while ``tiffcp -c zstd`` runs in 5.3 - seconds. Decompression time for zip is 840 ms, and for zstd 650 - ms. File size is 42735936 for zip, and 42586822 for zstd. Similar - findings on other images. - - On a 25894×16701 16bit image: - - .. table:: Compressor Relative Performance - :widths: auto - - =========== ================ ================== =========== - Compressor Compression time Decompression time File size - =========== ================ ================== =========== - ZSTD 35 s 3.2 s 399,700,498 - ZIP/Deflate 1m 20 s 4.9 s 419,622,336 - =========== ================ ================== =========== - - Please note that ``COMPRESSION_ZSTD`` is self-assigned the id 50000 - by the libtiff project and is not officially registered with Adobe - since Adobe's registration function is defunct. - -* Added WebP compression codec. - - `WebP `_ is - a high performance compressor intended for photos as commonly used - on the Web. The WebP encoder is not designed for huge images, but - serves very well for compressing strips and tiles in TIFF as long - as the strips or tiles do not exceed the capability of the - encoder. - - As a test of compression performance metrics, GraphicsMagick - was used on an extremely high quality 8-bit TIFF image from a - Hasselblad H4D-200MS camera with pixel dimensions of - 16352×12264. The image was re-encoded with 1024×1024 tiles and - various compression algorithms, using default settings for each - algorithm. Based on this test, the compression and decompression - performance (in iterations per second), the resulting file size, - and the calculated total PSNR are provided here. It can be seen - that WebP provided excellent encode and decode performance, and - the compressed file size was very small: - - - .. table:: Compressor Relative Performance - :widths: auto - - ========== ============ ============= ========= ===== - Compressor Compression Decompression File size PSNR - ========== ============ ============= ========= ===== - None 0.536 iter/s 1.506 iter/s 576.03MiB ∞ - LZW 0.105 iter/s 0.266 iter/s 270.68MiB ∞ - ZStd 0.020 iter/s 0.518 iter/s 238.42MiB ∞ - LZMA 0.009 iter/s 0.056 iter/s 247.61MiB ∞ - ZIP 0.009 iter/s 0.301 iter/s 247.88MiB ∞ - JPEG 0.446 iter/s 0.760 iter/s 18.59MiB 39.00 - WebP 0.019 iter/s 0.330 iter/s 9.38MiB 37.78 - ========== ============ ============= ========= ===== - - Please note that ``COMPRESSION_WEBP`` is self-assigned the id 50001 - by the libtiff project and is not officially registered with Adobe - since Adobe's registration function is defunct. - -* :c:func:`TIFFPrintDirectory`: fix null pointer dereference on corrupted - file. Fixes :bugzilla:`Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF - image <2770>`. - -* :c:func:`_TIFFVGetField`: fix heap out-of-bounds access when requesting - ``TIFFTAG_NUMBEROFINKS`` on a EXIF - directory. Fixes :bugzilla:`Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422 - <2765>`. - Reported by Google Autofuzz project. - -* Fix a memory leak in :c:func:`TIFFStreamOpen`. :c:func:`TIFFStreamOpen` allocates a - new ``tiff{o,i}s_data``, but if :c:func:`TIFFClientOpen` fails then that struct is - leaked. - -* Fix for bug 2772. It is possible to craft a TIFF document where - the IFD list is circular, leading to an infinite loop while - traversing the chain. The libtiff directory reader has a failsafe - that will break out of this loop after reading 65535 directory - entries, but it will continue processing, consuming time and - resources to process what is essentially a bogus TIFFdocument. - - This change fixes the above behavior by breaking out of processing - when a TIFF document has >= 65535 directories and terminating with an - error. - -* :c:func:`ChopUpSingleUncompressedStrip`: avoid memory exhaustion - (:cve:`2017-11613`). In :c:func:`ChopUpSingleUncompressedStrip`, if the - computed number of strips is big enough and we are in read only - mode, validate that the file size is consistent with that number of - strips to avoid useless attempts at allocating a lot of memory for - the :c:member:`td_stripbytecount` and :c:member:`td_stripoffset` - arrays. Fixes :bugzilla:`Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip - <2724>`. - -* Port code: Add :c:func:`strtol`, :c:func:`strtoll` and :c:func:`strtoull`. Also update - :c:func:`strtoul`. All use the same implementation from NetBSD libc. - -* Fix for :cve:`2018-7456` "NULL pointer dereference in - :c:func:`TIFFPrintDirectory`". - -* :c:func:`TIFFWriteDirectorySec`: avoid - assertion. Fixes :bugzilla:`Bug 2795 - There is a reachable assertion abort in function - TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead - to remote denial of attack. (:cve:`2018-10963`) - <2795>`. - -* :c:func:`LZWDecodeCompat`: fix potential index-out-of-bounds - write. Fixes :bugzilla:`Bug - 2780 - A heap-buffer-overflow in function LZWDecodeCompat in - libtiff4.0.9 (:cve:`2018-8905`) - <2780>`. - The fix consists in using the - similar code as :c:func:`LZWDecode` to validate we don't write outside of - the output buffer. - -* Remove builtin support for GUI warning and error message - boxes. Now warnings always go to the console by default unless - applications define their own warning and error handlers. - - GUI applications (and Windows CE) are required to define such handlers. - -* Add tag and pseudo-tag definitions for ESRI LERC codec (out of - tree codec whose source is - at ``_. - -* Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API - Fixes :bugzilla:`Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode - <2800>`. - -* :c:func:`TIFFSetupStrips`: avoid potential :c:type:`uint32` overflow on 32-bit - systems with large number of strips. Probably relates - to :bugzilla:`Bug - 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c - (:cve:`2018-10779`) - <2788>`. - -* Fix out-of-bound read on some tiled images. - -* Avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms`. - -* Only read/write ``TIFFTAG_GROUP3OPTIONS`` or ``TIFFTAG_GROUP4OPTIONS`` - if compression is ``COMPRESSION_CCITTFAX3`` or - ``COMPRESSION_CCITTFAX4``. - -* JBIG: fix potential out-of-bounds write in :c:func:`JBIGDecode`. Also - fix a (harmless) potential use of uninitialized memory when - ``tif->tif_rawsize > tif->tif_rawcc``. In case libtiff is compiled with - ``CHUNKY_STRIP_READ_SUPPORT``, make sure that whole strip data is - provided to :c:func:`JBIGDecode`. - -* :c:func:`LZMAPreEncode`: emit verbose error if :c:func:`lzma_stream_encoder` fails - (typically because not enough memory available) - - -Tools changes -------------- - -* :program:`tiff2pdf`: Fix - :cve:`2017-9935`, :bugzilla:`Bug - 2704 - There is a heap based buffer overflow in the tiff2pdf tool of - the libtiff library. A crafted TIFF document can lead to a heap - based buffer overflow resulting in multiple damages. - <2704>`. - -* :program:`pal2rgb`: Add workaround to pal2rgb buffer overflow. - -* :program:`tiffset`: Add support for :c:macro:`LONG8`, :c:macro:`SLONG8` and :c:macro:`IFD8` field types - -* :program:`tiff2bw`: avoid null pointer dereference in case of out of memory - situation. Fixes :bugzilla:`Bug - 2819 - There is a NULL pointer dereference at function LZWDecode in - libtiff 4.0.9 (:cve:`2018-18661`) - <2819>`. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.2.rst.txt deleted file mode 100644 index 394f052..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.2.rst.txt +++ /dev/null @@ -1,64 +0,0 @@ -Changes in TIFF v4.0.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.2 (:tag:`Release-v4-0-2`) - Previous Version :doc:`v4.0.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* None - - -Library changes ---------------- - -* :file:`tif_getimage.c`: added support for _SEPARATED CMYK images. - -* :file:`tif_getimage.c`: Added support for greyscale + alpha. - -* Added :c:func:`TIFFCreateCustomDirectory` and :file:`TIFFCreateEXIFDirectory` functions. - -* :file:`tif_print.c`: Lots of fixes around printing corrupt or hostile input. - -* Improve handling of corrupt ycbcrsubsampling values. - -* :file:`tif_unix.c`: use :c:func:`strerror` to get meaningful error messages. - -* :file:`tif_jpeg.c`: fix serious bugs in :c:func:`JPEGDecodeRaw`. - -* :file:`tif_jpeg.c`: Fix size overflow (zdi-can-1221, :cve:`2012-1173`). - - -Tools changes -------------- - -* :program:`tiff2pdf`: Defend against integer overflows while - calculating required buffer sizes (:cve:`2012-2113`). - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.3.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.3.rst.txt deleted file mode 100644 index 868967e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.3.rst.txt +++ /dev/null @@ -1,68 +0,0 @@ -Changes in TIFF v4.0.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.3 (:tag:`Release-v4-0-3`) - Previous Version :doc:`v4.0.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* Updated to use Automake 1.12.4. Avoids security problem with - ``make distcheck`` (:cve:`2012-3386`). - - -Library changes ---------------- - -* Various memory buffer access fixes. - -* Fix handling when writing RGBA jpeg compressed imagery (:gdal-trac:`4732`). - -* Fix to work properly with IJG JPEG 7+. - -* New functions :c:func:`TIFFFieldTag`, :c:func:`TIFFFieldName`, - :c:func:`TIFFFieldDataType`, :c:func:`TIFFFieldPassCount`, :c:func:`TIFFFieldReadCount`, - :c:func:`TIFFFieldWriteCount` to use as external accessors for the opaque - type :c:type:`TIFFField`. - -* Fix bug rewriting image tiles in a compressed file (:gdal-trac:`4771`). - -* Add TIFF/FX tag support in libtiff. - - -Tools changes -------------- - -* :program:`tiff2pdf`: Fail when :c:func:`TIFFSetDirectory` fails. This prevents - core dumps or perhaps even arbitrary code execution when processing - a corrupt input file (:cve:`2012-3401`). - -* :program:`tiff2pdf`: Fix two places where :c:member:`t2p_error` didn't get set after a - :c:func:`malloc` failure. No crash risk AFAICS, but the program might not - report exit code 1 as desired. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4.rst.txt deleted file mode 100644 index b211b76..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4.rst.txt +++ /dev/null @@ -1,191 +0,0 @@ -Changes in TIFF v4.0.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.4 (:tag:`Release-v4-0-4`) - Previous Version :doc:`v4.0.4beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :bugzilla:`2405`: Correct shell equality operator. -* :bugzilla:`2498`: Adds an option to select the file I/O style on Windows hosts. - - -Library changes ---------------- - -* :c:func:`TIFFNumberOfDirectories`: Coverity 1134470 "Logically dead code" - -* :file:`tif_dirread.c`: - - * :c:func:`TIFFReadDirEntryDoubleArray`: Coverity 298626 "Logically dead code". - * :c:func:`TIFFReadDirEntryFloatArray`: Coverity 298627 "Logically dead code". - * :c:func:`TIFFReadDirEntryIfd8Array`: Coverity 298628 "Logically dead code". - * :c:func:`TIFFReadDirEntrySlong8Array`: Coverity 298629 "Logically dead code" - -* :file:`tif_dirwrite.c` - - * :c:func:`_TIFFRewriteField`: Coverity 1024310 "Resource leak". - -* :file:`tif_jpeg.c` - - * :c:func:`JPEGCleanup`: Coverity 298624 "Dereference before null check". - * :c:func:`JPEGDecode`: Coverity 602597 "Operands don't affect result". - -* :file:`tif_getimage.c` - - * :bugzilla:`2409`: Correct reading of certain tiled TIFFs. - -* :file:`tif_luv.c` - - * :c:func:`LogLuvDecodeStrip`: Coverity 991239 "Division or modulo by zero". - * :c:func:`LogLuvDecodeTile`: Coverity 991227 "Division or modulo by zero". - * :c:func:`LogLuvEncodeStrip`: Coverity 991240 "Division or modulo by zero". - * :c:func:`LogLuvEncodeTile`: Coverity 991241 "Division or modulo by zero". - -* :file:`tif_lzw.c` - - * Decode files that contain consecutive :c:macro:`CODE_CLEAR` codes. - -* :file:`tif_ojpeg.c` - - * :c:func:`OJPEGReadBufferFill`: Coverity 603400 "Missing break in switch". - * :c:func:`OJPEGReadHeaderInfoSecStreamDht`: Coverity 601720 "Resource leak". - -* :file:`tif_read.c` - - * :c:func:`TIFFStartTile`: Coverity 715973 and 715974 "Division or modulo by zero". - -* :file:`tif_unix.c` - - * :bugzilla:`2510`: Fix several harmless but still annoying warnings. - -* :file:`tif_write` - - * :c:func:`TIFFWriteEncodedStrip`: Coverity 715975 "Division or modulo by zero". - * :c:func:`TIFFWriteEncodedTile`: Coverity 715976 and 715977 "Division or modulo by zero". - * :c:func:`TIFFWriteRawStrip`: Coverity 715978 "Division or modulo by zero". - * :c:func:`TIFFWriteScanline`: Coverity 715979 "Division or modulo by zero". - - -Tools changes -------------- - -* :program:`bmp2tiff` - - * Coverity 1024225 "Untrusted value as argument". - * Coverity 1024678 "Unchecked return value from library". - * Coverity 1024679 "Unchecked return value from library". - * Coverity 1214160 "Ignoring number of bytes read". - -* :program:`gif2tiff` - - * Coverity 1024222 "Untrusted value as argument". - * Coverity 1024890 "Ignoring number of bytes read". - * Coverity 1024891 "Ignoring number of bytes read". - * Coverity 1024892 "Ignoring number of bytes read". - * Coverity 1024893 "Ignoring number of bytes read". - * Coverity 1024894 "Ignoring number of bytes read". - -* :program:`ras2tiff` - - * Corrected Sun Raster header definition to be safe for - 64-bit systems. Add some header validations. Fixes many - (unspecified) Coverity issues. - * Coverity 1024223 "Untrusted value as argument". - * Coverity 1301206: "Integer handling issues (BAD_SHIFT)". - -* :program:`raw2tiff` - - * Coverity 1024887 "Unchecked return value from library". - * Coverity 1024888 "Unchecked return value from library". - * Coverity 1024889 "Unchecked return value from library". - * Coverity 1214162 "Ignoring number of bytes read". - - -* :program:`tiff2pdf` - - * :bugzilla:`2078`: Suppress initial output of the header. - * :bugzilla:`2150`: Change ColorTransform from "0" to "1". - * Take care in using the return value from :c:func:`snprintf`. - * Coverity 1024181 "Structurally dead code". - * Coverity 1024181 "Structurally dead code". - * Coverity 1227690 "Unused value". - * Coverity 298621 "Resource leak". - -* :program:`tiff2ps` - - * Correct sizing and scaling problems with output document. - -* :program:`tiffcp` - - * Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak". - -* :program:`tiffcrop` - - * Correctly copy the compression tag from the source TIFF. - * Coverity 1024545 "Division or modulo by zero". - * Coverity 1024586 "Logically dead code". - * Coverity 1024796 "Nesting level does not match indentation". - * Coverity 1024797 "Nesting level does not match indentation". - * Coverity 1294542 "Logical vs. bitwise operator". - * Coverity 1299740 "Out-of-bounds write". - * Coverity 1299741 "Dereference before null check". - -* :program:`tiffdither` - - * Check memory allocations for failure. Also check - multiplication overflow. (Fixes #2501, :cve:`2014-8128`) - -* :program:`tiffgt.c` - - * :bugzilla:`2401`: Appropriately call :c:func:`glFlush`. - -* :program:`tiffmedian` - - * Coverity 1024386 "Out-of-bounds read". - * Coverity 1024386 "Out-of-bounds read". - * Coverity 1024795 "Nesting level does not match indentation". - * Coverity 1024795 "Nesting level does not match indentation". - -:program:`tiffsplit` - - * Coverity 1024304 "Resource leak". - * Coverity 1024305 "Resource leak". - - -Contributed software changes ----------------------------- - -* :program:`addtiffo` - - * Check buffer size calculation for overflow. - * Coverity 298615 "Resource leak". - * Coverity 1024649 "Unintended sign extension". - -* :program:`iptcutil` - - * Coverity 1024468 "Infinite loop". - * Coverity 1024727 "Truncated stdio return value". - * Coverity 1214240 "Untrusted loop bound". diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4beta.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4beta.rst.txt deleted file mode 100644 index f281d63..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.4beta.rst.txt +++ /dev/null @@ -1,236 +0,0 @@ -Changes in TIFF v4.0.4beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.4beta (:tag:`Release-v4-0-4beta`) - Previous Version :doc:`v4.0.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- -* None - - -Software configuration changes ------------------------------- - -* Updated to use Automake 1.15 and Libtool 2.4.5 - - -Library changes ---------------- - -* :c:func:`TIFFCheckDirOffset`: avoid :c:type:`uint16` overflow - when reading more than 65535 directories, and effectively error out when - reaching that limit. - -* :c:func:`TIFFNumberOfDirectories`: generate error in case of directory count - overflow. - -* :c:func:`TIFFAdvanceDirectory`: If nextdir is found to - be defective, then set it to zero before returning error in order - to terminate processing of truncated TIFF. - -* JPEG-in-TIFF: recognize ``SOF2``, ``SOF9`` and ``SOF10`` - markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. - Note: the default settings of mozjpeg will produce progressive scans, which - is forbidden by the TechNote. - -* JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused - all tiles/strips to include quantization tables even when the jpegtablesmode - had the :c:macro:`JPEGTABLESMODE_QUANT` bit set. - Also add explicit removal of Huffman tables when jpegtablesmode has the - :c:macro:`JPEGTABLESMODE_HUFF` bit set, which avoids Huffman tables to be emitted in the - first tile/strip (only useful in update scenarios. create-only was - fine) - -* JPEG-in-TIFF: fix segfault in :c:func:`JPEGFixupTagsSubsampling` on - corrupted image where ``tif->tif_dir.td_stripoffset == NULL``. - (:bugzilla:`2471`) - -* NeXT codec: add new tests to check that we don't read outside of - the compressed input stream buffer. - -* NeXT codec: check that ``BitsPerSample`` = 2. Fixes - :bugzilla:`2487` (:cve:`2014-8129`) - -* NeXT codec: in the "run mode", use tilewidth for tiled images - instead of imagewidth to avoid crash - -* tif_getimage.c: in OJPEG case, fix checks on strile width/height - in the ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile`` and - ``putcontig8bitYCbCr21tile`` cases. - -* in :c:func:`TIFFDefaultDirectory`, reset any already existing - extended tags installed by user code through the extender mechaninm before - calling the extender callback (GDAL #5054) - -* Fix warnings about unused parameters. - -* Fix various typos in comments found by Debian lintian tool (GDAL #5756) - -* tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. - (:bugzilla:`2235`) - -* :file:`tif_dirread.c`: In :c:func:`EstimateStripByteCounts`, check return code - of :c:func:`_TIFFFillStriles`. This solves crashing bug on corrupted - images generated by afl. - -* :file:`tif_read.c`: fix several invalid comparisons of a :c:type:`uint64` value with - ``<= 0`` by casting it to :c:type:`int64` first. This solves crashing bug on corrupted - images generated by afl. - -* :c:func:`TIFFSetField`: refuse to set negative values for - :c:macro:`TIFFTAG_XRESOLUTION` and :c:macro:`TIFFTAG_YRESOLUTION` that cause asserts when writing - the directory - -* :c:func:`TIFFReadDirectory`: refuse to read ``ColorMap`` or - ``TransferFunction`` if ``BitsPerSample`` has not yet been read, otherwise reading - it later will cause user code to crash if ``BitsPerSample > 1`` - -* :c:func:`TIFFRGBAImageOK`: return FALSE if LOGLUV with - ``SamplesPerPixel != 3``, or if CIELAB with - ``SamplesPerPixel != 3`` or ``BitsPerSample != 8`` - -* :file:`tif_config.vc.h`: no longer use ``#define snprintf _snprintf`` with - Visual Studio 2015 aka VC 14 aka MSVC 1900 - -* LZW codec: prevent potential null dereference of ``sp->dec_codetab`` in :c:func:`LZWPreDecode` - (:bugzilla:`2459`) - -* :c:func:`TIFFReadBufferSetup`: avoid passing -1 size - to :c:func:`TIFFmalloc` if passed user buffer size is 0 - (:bugzilla:`2459`) - -* :c:func:`TIFFReadDirEntryOutputErr`: Incorrect - count for tag should be a warning rather than an error since - errors terminate processing. - -* :file:`tif_dirinfo.c` (``TIFFField``) : Fix data type for :c:macro:`TIFFTAG_GLOBALPARAMETERSIFD` tag. - -* Add definitions for TIFF/EP ``CFARepeatPatternDim`` and ``CFAPattern`` tags - (:bugzilla:`2457`) - -* :file:`tif_codec.c`, :file:`tif_dirinfo.c`: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)`` - -* :file:`configure.ac`: Improve pkg-config static linking by adding ``-lm`` to ``Libs.private`` when needed. - -* :file:`tif_write.c`: :c:type:`tmsize_t` related casting warning fixed for - 64bit linux. - -* :file:`tif_read.c`: :c:type:`uint64`/:c:type:`tmsize_t` change for MSVC warnings. - (:bugzilla:`2427`) - -* Fix :c:func:`TIFFPrintDirectory` handling of - :c:member:`field_passcount` fields: it had the :c:macro:`TIFF_VARIABLE` and - :c:macro:`TIFF_VARIABLE2` cases backwards. - -* PixarLog codec: Improve previous patch for :cve:`2012-4447` - (to enlarge :c:member:`tbuf` for possible partial stride at end) so that - overflow in the integer addition is detected. - -* :file:`tif_{unix,vms,win32}.c` (:c:func:`_TIFFmalloc`): ANSI C does not - require :c:func:`malloc` to return :c:macro:`NULL` pointer if requested allocation - size is zero. Assure that :c:func:`_TIFFmalloc` does. - -* :file:`tif_zip.c`: Avoid crash on :c:macro:`NULL` error messages. - - -Tools changes -------------- -* :program:`tiff2pdf` Fix various crashes and memory buffer access errors (oCERT-2014-013). -* :program:`tiff2pdf` fix buffer overflow on some YCbCr JPEG compressed images. - (:bugzilla:`2445`) -* :program:`tiff2pdf` fix buffer overflow on YCbCr JPEG compressed image. - (:bugzilla:`2443`) -* :program:`tiff2pdf` check return code of :c:func:`TIFFGetField` when reading :c:macro:`TIFFTAG_SAMPLESPERPIXEL` -* :program:`tiff2pdf` fix crash due to invalid tile count. -* :program:`tiff2pdf` Detect invalid settings of ``BitsPerSample``/``SamplesPerPixel`` for CIELAB / ITULAB -* :program:`tiff2pdf` Assure that memory size calculations for - :c:func:`_TIFFmalloc` do not overflow the range of :c:type:`tmsize_t`. -* :program:`tiff2pdf` Avoid crash when :c:macro:`TIFFTAG_TRANSFERFUNCTION` tag returns one channel, - with the other two channels set to :c:macro:`NULL`. -* :program:`tiff2pdf` close PDF file. (:bugzilla:`2479`) -* :program:`tiff2pdf` Preserve input file directory order when pages - are tagged with the same page number. -* :program:`tiff2pdf.c` terminate after failure of allocating ycbcr buffer - (:bugzilla:`2449`, :cve:`2013-4232`) -* :program:`tiff2pdf` Rewrite JPEG marker parsing in - :c:func:`t2p_process_jpeg_strip` to be at least marginally competent. The - approach is still fundamentally flawed, but at least now it won't - stomp all over memory when given bogus input. Fixes :cve:`2013-1960`. -* :program:`tiffdump` Guard against arithmetic overflow when calculating allocation buffer sizes. -* :program:`tiffdump` fix crash due to overflow of entry count. -* :program:`tiffdump` Fix double-free bug. -* :program:`tiffdump` detect cycle in TIFF directory chaining. - (:bugzilla:`2463`) -* :program:`tiffdump` avoid passing a :c:macro:`NULL` pointer to :c:func:`read` if :c:func:`seek` failed before. - (:bugzilla:`2459`) -* :program:`tiff2bw` when ``Photometric = RGB``, the utility only works if ``SamplesPerPixel = 3``. Enforce that. - (:bugzilla:2485`, :cve:`2014-8127`) -* :program:`pal2rgb`, :program:`thumbnail`: fix crash by disabling :c:macro:`TIFFTAG_INKNAMES` copying. - (:bugzilla:`#2484`, :cve:`2014-8127`) -* :program:`thumbnail` fix out-of-buffer write. - (:bugzilla:`2489`, :cve:`2014-8128`) -* :program:`thumbnail`, :program:`tiffcmp`: only read/write :c:macro:`TIFFTAG_GROUP3OPTIONS` - or :c:macro:`TIFFTAG_GROUP4OPTIONS` if compression is :c:macro:`COMPRESSION_CCITTFAX3` or - :c:macro:`COMPRESSION_CCITTFAX4`. - (:bugzilla:`2493`, :cve:`2014-8128`) -* :program:`tiffcp` fix crash when converting YCbCr JPEG-compressed to none. - (:bugzilla:`2480`) -* :program:`bmp2tiff` fix crash due to int overflow related to input BMP dimensions -* :program:`tiffcrop` fix crash due to invalid ``TileWidth``/``TileHeight`` -* :program:`tiffcrop` fix segfault if bad value passed to ``-Z`` option - (:bugzilla:`2459`) and add missing ``va_end`` in :c:func:`dump_info` -* :program:`thumbnail`, :program:`tiffcrop`: "fix" heap read over-run found with - Valgrind and Address Sanitizer on test suite -* :program:`fax2ps` check :c:func:`malloc`/:c:func:`realloc` result. (:bugzilla:`2470`) -* :program:`gif2tiff` apply patch for :cve:`2013-4243`. (:bugzilla:`2451`) -* :program:`gif2tiff` fix possible OOB write. (:bugzilla:`2452`, :cve:`2013-4244`) -* :program:`gif2tiff` Be more careful about corrupt or hostile input files (:bugzilla:`2450`, :cve:`2013-4231`) -* :program:`tiff2rgba` fix usage message in that zip was wrongly described -* :program:`tiffinfo` Default various values fetched with :c:func:`TIFFGetField` to avoid being uninitialized. -* :program:`tiff2ps` Fix bug in auto rotate option code. -* :program:`ppm2tiff` avoid zero size buffer vulnerability (:cve:`2012-4564`). - check the linebytes calculation too, get the :c:func:`max` calculation - straight, avoid redundant error messages, check for :c:func:`malloc` - failure. -* :program:`tiffset` now supports a ``-u`` option to unset a tag. - (:bugzilla:`2419`) -* Fix warnings about unused parameters. -* :program:`rgb2ycbcr`, :program:`tiff2bw`, :program:`tiff2pdf`, :program:`tiff2ps`, :program:`tiffcrop`, :program:`tiffdither`: - Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to - protect against overflow of fixed-size buffers. This responds in - particular to :cve:`2013-1961` concerning overflow in :file:`tiff2pdf.c`'s - :c:func:`t2p_write_pdf_page`. -* :file:`html/man/tiff2ps.1.html`, :file:`html/man/tiffcp.1.html`, - :file:`html/man/tiffdither.1.html`, :file:`man/tiff2ps.1`, :file:`man/tiffcp.1`, - :file:`man/tiffdither.1`, :file:`tools/tiff2ps.c`, :file:`tools/tiffcp.c`, - :file:`tools/tiffdither.c`: Sync tool usage printouts and man pages with - reality - - -Contributed software changes ----------------------------- - -* Fix warnings about variables set but not used. -* :file:`contrib/dbs/xtiff/xtiff.c`: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to - protect against overflow of fixed-size buffers. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.5.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.5.rst.txt deleted file mode 100644 index 56cd7f5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.5.rst.txt +++ /dev/null @@ -1,85 +0,0 @@ -Changes in TIFF v4.0.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.5 (:tag:`Release-v4-0-5`) - Previous Version :doc:`v4.0.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Support for configure/build using CMake. -* Support for large (> 2GB) files under Microsoft Windows. - - -Software configuration changes ------------------------------- - -* :file:`CMakeLists.txt` / CMake - - * Configuration and building using CMake is now supported - under Microsoft Windows and on Unix-type systems. - -* :file:`configure.ac` / :program:`configure` - - * Test for and use :c:func:`fseeko` if it is available. This allows - supporting large files on Unix-type systems with a 32-bit :c:expr:`long` - type and a 64-bit :c:type:`off_t` type. - - -Library changes ---------------- - -* :file:`tiffiop.h`: - - * Macros added to use 64-bit equivalents for all standard I/O - and POSIX APIs used by libtiff and its tools which are limited - to 2GB in Windows builds. Note that these 64-bit equivalents - were introduced by the CRT provided with Visual Studio 2005 and - if the necessary CRT is not installed on the target computer, - the program will not run. The wrapper macros will not be - activated unless the definition :c:macro:`_MSC_VER` is at least 1400 or - :c:macro:``__MSVCRT_VERSION__`` is at least ``0x800``. - -* :file:`tif_unix.c`: - - * Updated to support large files under Microsoft Windows. - This makes :file:`tif_unix.c` a completely viable candidate for use - under Windows (in spite of its name) if the CRT is modern - enough. Please note that :file:`tif_win32.c` already supported large - files, but only :program:`tiffinfo` and :program:`tiffdump` made any provision to - support large files under Windows. - * :c:func:`_tiffReadProc` and :c:func:`_tiffWriteProc` are modified to chunk - I/O to a maximum size of 2GB for extremely large I/O - requests. This surmounts limitations in the Microsoft Windows - :c:func:`read` and :c:func:`write` APIs (which are limited to the range of a - 32-bit :c:expr:`int`), and may avoid poor behavior with extremely large - I/O requests on other systems. - - -Tools changes -------------- - -* All tools - - * Updated to use I/O wrapper macros from :file:`tiffiop.h` in order - to support large files under Microsoft Windows. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.6.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.6.rst.txt deleted file mode 100644 index 4228f18..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.6.rst.txt +++ /dev/null @@ -1,77 +0,0 @@ -Changes in TIFF v4.0.6 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.6 (:tag:`Release-v4-0-6`) - Previous Version :doc:`v4.0.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Now builds with CMake 2.8.9 and newer (previously required 3.0.0) - - -Software configuration changes ------------------------------- - -* :file:`CMakeLists.txt` / CMake - - * Supports CMake 2.8.9 and later. - * Add missing file which wasn't being distributed, causing - unit tests to fail. - * Make shared/static library building configurable. - * CMake reads all version information directly from - :file:`configure.ac` to avoid duplication of values. - * CMake builds are now included in ``distcheck`` target. - -* :file:`Makefile.am` - - * Autotools `make distcheck` now tests the CMake-based build - if CMake is available. - - -Library changes ---------------- - -* Fixes to avoid undefined behaviour of signed types (C - standard compliance). -* Fixes to avoid possible issues when casting to unsigned char. -* Fixes to avoid undefined behaviour with shifts. -* Fix generation of output with 16 bit or 32 bit integer, when - byte swapping is needed, in horizontal predictor (:bugzilla:`2521`). -* Fix decoding when there is a single pixel to decode (unlikely - case...) and byte swapping is involved. -* Add add explicit masking with ``0xff`` before casting to :c:type:`uchar` in - floating-point horizontal differencing and accumulation routines. -* Eliminate requirement for and use of 64-bit constant values. - - -Tools changes -------------- - -* :program:`tiffgt` - - * Silence glut API deprecation warnings on MacOS X. - -* :program:`fax2ps` - - * Detect failure to write to temporary file. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.7.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.7.rst.txt deleted file mode 100644 index 38e9ac5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.7.rst.txt +++ /dev/null @@ -1,350 +0,0 @@ -Changes in TIFF v4.0.7 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.7 (:tag:`Release-v4-0-7`) - Previous Version :doc:`v4.0.6 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - -Major changes -------------- - -* The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, - :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. - these tools were written in the late 1980s and early 1990s for - test and demonstration purposes. In some cases the tools were - never updated to support updates to the file format, or the - file formats are now rarely used. In all cases these tools - increased the libtiff security and maintenance exposure beyond - the value offered by the tool. - -Software configuration changes ------------------------------- - -* None - -Library changes ---------------- - -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, do not - dereference :c:macro:`NULL` pointer when values of tags with - :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are - 0-byte arrays. Fixes - :bugzilla:`2593` (regression - introduced by previous fix done on 2016-11-11 for - :cve:`2016-9297`). Reported by Henri Salo. Assigned as - :cve:`2016-9448` - -* :file:`libtiff/tif_aux.c`: fix crash in :c:func:`TIFFVGetFieldDefaulted` when - requesting Predictor tag and that the zip/lzw codec is not - configured. Fixes - :bugzilla:`2591` - -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, make sure - that values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / - :c:macro:`TIFF_SETGET_C32_ASCII` access are :c:macro:`NULL` terminated, to avoid - potential read outside buffer in :c:func:`_TIFFPrintField`. Fixes - :bugzilla:`2590` - -* :file:`libtiff/tif_dirread.c`: reject images with OJPEG compression - that have no ``TileOffsets``/``StripOffsets`` tag, when OJPEG - compression is disabled. Prevent :c:macro:`NULL` pointer dereference in - :c:func:`TIFFReadRawStrip1` and other functions that expect - :c:member:`td_stripbytecount` to be non :c:macro:`NULL`. Fixes - :bugzilla:`2585` - -* :file:`libtiff/tif_strip.c`: make :c:func:`TIFFNumberOfStrips` return the - ``td->td_nstrips`` value when it is non-zero, instead of - recomputing it. This is needed in :c:macro:`TIFF_STRIPCHOP` mode where - :c:member:`td_nstrips` is modified. Fixes a read outsize of array in - :program:`tiffsplit` (or other utilities using :c:func:`TIFFNumberOfStrips`). - Fixes :bugzilla:`2587` - (:cve:`2016-9273`) - -* :file:`libtiff/tif_predict.h`, :file:`libtiff/tif_predict.c`: Replace - assertions by runtime checks to avoid assertions in debug - mode, or buffer overflows in release mode. Can happen when - dealing with unusual tile size like YCbCr with - subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations - -* :file:`libtiff/tif_dir.c`: discard values of ``SMinSampleValue`` and - ``SMaxSampleValue`` when they have been read and the value of - ``SamplesPerPixel`` is changed afterwards (like when reading a - OJPEG compressed image with a missing ``SamplesPerPixel`` tag, and - whose photometric is ``RGB`` or ``YCbCr``, forcing ``SamplesPerPixel`` - being 3). Otherwise when rewriting the directory (for example - with tiffset, we will expect 3 values whereas the array had - been allocated with just one), thus causing a out of bound - read access. Fixes - :bugzilla:`2500` - (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) - -* :file:`libtiff/tif_dirwrite.c`: avoid :c:macro:`NULL` pointer dereference on - :c:member:`td_stripoffset` when writing directory, if :c:macro:`FIELD_STRIPOFFSETS` - was artificially set for a hack case in OJPEG case. Fixes - :bugzilla:`2500` - (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) - -* :file:`libtiff/tif_getimage.c` (:c:func:`TIFFRGBAImageOK`): Reject attempts to - read floating point images. - -* :file:`libtiff/tif_predict.c` (:c:func:`PredictorSetup`): Enforce - bits-per-sample requirements of floating point predictor (3). - Fixes :cve:`2016-3622` "Divide By Zero in the :program:`tiff2rgba` tool." - -* :file:`libtiff/tif_pixarlog.c`: fix out-of-bounds write vulnerabilities - in heap allocated buffers. Reported as MSVR 35094. Discovered by - Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`libtiff/tif_write.c`: fix issue in error code path of - :c:func:`TIFFFlushData1` that didn't reset the :c:member:`tif_rawcc` and :c:member:`tif_rawcp` - members. I'm not completely sure if that could happen in - practice outside of the odd behaviour of :c:func:`t2p_seekproc` of - tiff2pdf). The report points that a better fix could be to - check the return value of :c:func:`TIFFFlushData1` in places where it - isn't done currently, but it seems this patch is enough. - Reported as MSVR 35095. Discovered by Axel Souchet & Vishal - Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations - team. - -* :file:`libtiff/tif_pixarlog.c`: Fix write buffer overflow in - :c:func:`PixarLogEncode` if more input samples are provided than - expected by :c:func:`PixarLogSetupEncode`. Idea based on - :file:`libtiff-CVE-2016-3990.patch` from - :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, but with - different and simpler check. (:bugzilla:`2544`) - -* :file:`libtiff/tif_read.c`: Fix out-of-bounds read on memory-mapped - files in :c:func:`TIFFReadRawStrip1` and :c:func:`TIFFReadRawTile1` when - ``stripoffset`` is beyond :c:type:`tmsize_t` max value (reported by Mathias - Svensson) - -* :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadEncodedStrip` and - :c:func:`TIFFReadEncodedTile` directly use user provided buffer when - no compression (and other conditions) to save a :c:func:`memcpy` - -* :file:`libtiff/tif_write.c`: make :c:func:`TIFFWriteEncodedStrip` and - :c:func:`TIFFWriteEncodedTile` directly use user provided buffer when - no compression to save a :c:func:`memcpy`. - -* :file:`libtiff/tif_luv.c`: validate that for :c:macro:`COMPRESSION_SGILOG` and - :c:macro:`PHOTOMETRIC_LOGL`, there is only one sample per pixel. Avoid - potential invalid memory write on corrupted/unexpected images - when using the :c:func:`TIFFRGBAImageBegin` interface (reported by - Clay Wood) - -* :file:`libtiff/tif_pixarlog.c`: fix potential buffer write overrun in - :c:func:`PixarLogDecode` on corrupted/unexpected images (reported by - Mathias Svensson) (:cve:`2016-5875`) - -* libtiff/libtiff.def: Added ``_TIFFMultiply32`` and - ``_TIFFMultiply64`` to libtiff.def - -* :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Add a '1' to the - :c:macro:`HAVE_SNPRINTF` definition. - -* :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Applied patch by - Edward Lam to define :c:macro:`HAVE_SNPRINTF` for Visual Studio 2015. - -* :file:`libtiff/tif_dirread.c`: when compiled with :c:macro:`DEFER_STRILE_LOAD`, - fix regression, introduced on 2014-12-23, when reading a - one-strip file without a ``StripByteCounts`` tag. GDAL #6490 - -* :file:`libtiff/*`: upstream typo fixes (mostly contributed by Kurt - Schwehr) coming from GDAL internal libtiff - -* :file:`libtiff/tif_fax3.h`: make :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` - structure a :c:type:`uint16` to reduce size of the binary. - -* :file:`libtiff/tif_read.c`, :file:`tif_dirread.c`: fix indentation issues - raised by GCC 6 ``-Wmisleading-indentation`` - -* :file:`libtiff/tif_pixarlog.c`: avoid zlib error messages to pass a - :c:macro:`NULL` string to ``%s`` formatter, which is undefined behaviour in - :c:func:`sprintf`. - -* :file:`libtiff/tif_next.c`: fix potential out-of-bound write in :c:func:`NeXTDecode` - triggered by ``_ - (:bugzilla:`2508`) - -* :file:`libtiff/tif_luv.c`: fix potential out-of-bound writes in - decode functions in non debug builds by replacing :c:func:`assert` by - regular ``if`` checks (:bugzilla:`2522`). Fix potential - out-of-bound reads in case of short input data. - -* :file:`libtiff/tif_getimage.c`: fix out-of-bound reads in - :c:type:`TIFFRGBAImage` interface in case of unsupported values of - ``SamplesPerPixel``/``ExtraSamples`` for LogLUV / CIELab. Add explicit - call to :c:func:`TIFFRGBAImageOK` in :c:func:`TIFFRGBAImageBegin`. Fix - :cve:`2015-8665` reported by limingxing and :cve:`2015-8683` - reported by zzf of Alibaba. - -* :file:`libtiff/tif_dirread.c`: workaround false positive warning of - Clang Static Analyzer about :c:macro:`NULL` pointer dereference in - :c:func:`TIFFCheckDirOffset`. - -* :file:`libtiff/tif_fax3.c`: remove dead assignment in - :c:func:`Fax3PutEOLgdal`. Found by Clang Static Analyzer - -* :file:`libtiff/tif_dirwrite.c`: fix truncation to 32 bit of file - offsets in :c:func:`TIFFLinkDirectory` and :c:func:`TIFFWriteDirectorySec` - when aligning directory offsets on a even offset (affects - BigTIFF). This was a regression of the changeset of - 2015-10-19. - -* :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteEncodedStrip` and - :c:func:`TIFFWriteEncodedTile` should return -1 in case of failure of - :c:func:`tif_encodestrip` as documented - -* :file:`libtiff/tif_dumpmode.c`: :c:func:`DumpModeEncode` should return 0 in - case of failure so that the above mentioned functions detect - the error. - -* :file:`libtiff/*.c`: fix MSVC warnings related to cast shortening and - assignment within conditional expression - -* :file:`libtiff/*.c`: fix clang -Wshorten-64-to-32 warnings - -* :file:`libtiff/tif_dirread.c`: prevent reading ColorMap or - TransferFunction if ``BitsPerPixel`` > 24, so as to avoid huge - memory allocation and file read attempts - -* :file:`libtiff/tif_dirread.c`: remove duplicated assignment (reported - by Clang static analyzer) - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirinfo.c`, - :file:`libtiff/tif_compress.c`, :file:`libtiff/tif_jpeg_12.c`: suppress - warnings about 'no previous declaration/prototype' - -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirwrite.c`: suffix constants - by U to fix 'warning: negative integer implicitly converted to - unsigned type' warning (part of ``-Wconversion``) - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`, - :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_print.c`: fix ``-Wshadow`` - warnings (only in :file:`libtiff/`) - - -Tools changes -------------- - -* tools/Makefile.am: The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, - :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed - from the distribution. The libtiff tools :program:`rgb2ycbcr` and - :program:`thumbnail` are only built in the build tree for testing. Old - files are put in new :file:`archive` subdirectory of the source - repository, but not in distribution archives. These changes - are made in order to lessen the maintenance burden. - -* :file:`tools/tiff2pdf.c`: avoid undefined behaviour related to - overlapping of source and destination buffer in :c:func:`memcpy` call - in :c:func:`t2p_sample_rgbaa_to_rgb` Fixes - :bugzilla:`2577` - -* :file:`tools/tiff2pdf.c`: fix potential integer overflows on 32 bit - builds in :c:func:`t2p_read_tiff_size` Fixes - :bugzilla:`2576` - -* :file:`tools/fax2tiff.c`: fix segfault when specifying ``-r`` without - argument. Patch by Yuriy M. Kaminskiy. Fixes - :bugzilla:`2572` - -* :file:`tools/tiffinfo.c`: fix out-of-bound read on some tiled images. - (:bugzilla:`2517`) - -* :file:`tools/tiffcrop.c`: fix multiple uint32 overflows in - :c:func:`writeBufferToSeparateStrips`, :c:func:`writeBufferToContigTiles` and - :c:func:`writeBufferToSeparateTiles` that could cause heap buffer - overflows. Reported by Henri Salo from Nixu Corporation. - Fixes :bugzilla:`2592` - -* :file:`tools/tiffcrop.c`: fix out-of-bound read of up to 3 bytes in - :c:func:`readContigTilesIntoBuffer`. Reported as MSVR 35092 by Axel - Souchet & Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix write buffer overflow of 2 bytes on - JPEG compressed images. Reported by Tyler Bohan of Cisco Talos - as TALOS-CAN-0187 / :cve:`2016-5652`. Also prevents writing 2 - extra uninitialized bytes to the file stream. - -* :file:`tools/tiffcp.c`: fix out-of-bounds write on tiled images with odd - tile width vs image width. Reported as MSVR 35103 - by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix read -largely- outsize of buffer in - :c:func:`t2p_readwrite_pdf_image_tile`, causing crash, when reading a - JPEG compressed image with :c:macro:`TIFFTAG_JPEGTABLES` length being - one. Reported as MSVR 35101 by Axel Souchet and Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations team. - -* :file:`tools/tiffcp.c`: fix read of undefined variable in case of - missing required tags. Found on test case of MSVR 35100. - -* :file:`tools/tiffcrop.c`: fix read of undefined buffer in - :c:func:`readContigStripsIntoBuffer` due to uint16 overflow. Probably - not a security issue but I can be wrong. Reported as MSVR - 35100 by Axel Souchet from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiffcrop.c`: fix various out-of-bounds write - vulnerabilities in heap or stack allocated buffers. Reported - as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel - Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix out-of-bounds write vulnerabilities in - heap allocate buffer in :c:func:`t2p_process_jpeg_strip`. Reported as - MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from - the MSRC Vulnerabilities & Mitigations team. - -* :file:`tools/tiff2bw.c`: fix weight computation that could result of - color value overflow (no security implication). Fix :bugzilla:`2550`. - Patch by Frank Freudenberg. - -* :file:`tools/rgb2ycbcr.c`: validate values of ``-v`` and ``-h`` parameters to - avoid potential divide by zero. Fixes :cve:`2016-3623` (:bugzilla:`2569`) - -* :file:`tools/tiffcrop.c`: Fix out-of-bounds write in :c:func:`loadImage`. - From patch :file:`libtiff-CVE-2016-3991.patch` from - :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro (:bugzilla:`2543`) - -* :file:`tools/tiff2rgba.c`: Fix integer overflow in size of allocated - buffer, when ``-b`` mode is enabled, that could result in - out-of-bounds write. Based initially on patch - :file:`tiff-CVE-2016-3945.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` - by Nikola Forro, with correction for invalid tests that - rejected valid files. (:bugzilla:`2545`) - -* :file:`tools/tiffcrop.c`: Avoid access outside of stack allocated - array on a tiled separate TIFF with more than 8 samples per - pixel. Reported by Kaixiang Zhang of the Cloud Security Team, - Qihoo 360 (:cve:`2016-5321` / :cve:`2016-5323` , :bugzilla:`2558` / - :bugzilla:`2559`) - -* :file:`tools/tiffdump.c`: fix a few misaligned 64-bit reads warned by - ``-fsanitize`` - -* :file:`tools/tiffdump.c` (:c:func:`ReadDirectory`): Remove :c:type:`uint32` cast to - :c:func:`_TIFFmalloc` argument which resulted in Coverity report. - Added more multiplication overflow checks. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.8.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.8.rst.txt deleted file mode 100644 index 576f55c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.8.rst.txt +++ /dev/null @@ -1,390 +0,0 @@ -Changes in TIFF v4.0.8 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.8 (:tag:`Release-v4-0-8`) - Previous Version :doc:`v4.0.7 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* None - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_open.c`: add parenthesis - to fix cppcheck ``clarifyCalculation`` warnings - -* :file:`libtiff/tif_predict.c`, :file:`libtiff/tif_print.c`: fix printf - unsigned vs signed formatting (cppcheck - ``invalidPrintfArgType_uint`` warnings) - -* :file:`libtiff/tif_read.c`, :file:`libtiff/tiffiop.h`: fix :c:type:`uint32` overflow in - :c:func:`TIFFReadEncodedStrip` that caused an integer division by - zero. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2596` - -* :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_luv.c`: fix heap-based - buffer overflow on generation of PixarLog / LUV compressed - files, with ``ColorMap``, ``TransferFunction`` attached and nasty - plays with ``bitspersample``. The fix for LUV has not been - tested, but suffers from the same kind of issue of PixarLog. - Reported by Agostino Sarubbo. Fixes - :bugzilla:`2604` - -* :file:`libtiff/tif_strip.c`: revert the change in - :c:func:`TIFFNumberOfStrips` done for - :bugzilla:`2587` / - :cve:`2016-9273` since the above change is a better fix that - makes it unnecessary. - -* :file:`libtiff/tif_dirread.c`: modify :c:func:`ChopUpSingleUncompressedStrip` - to instantiate compute ``nstrips`` as - ``TIFFhowmany_32(td->td_imagelength, rowsperstrip)``, instead of a - logic based on the total size of data. Which is faulty is the - total size of data is not sufficient to fill the whole image, - and thus results in reading outside of the - ``StripByCounts``/``StripOffsets`` arrays when using - :c:func:`TIFFReadScanline`. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2608`. - -* :file:`libtiff/tif_ojpeg.c`: make :c:func:`OJPEGDecode` early exit in case of - failure in :c:func:`OJPEGPreDecode`. This will avoid a divide by zero, - and potential other issues. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2611` - -* :file:`libtiff/tif_write.c`: fix misleading indentation as warned by GCC. - - -* :file:`libtiff/tif_fax3.h`: revert change done on 2016-01-09 that - made :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to - reduce size of the binary. It happens that the Hylafax - software uses the tables that follow this typedef - (:c:var:`TIFFFaxMainTable`, :c:var:`TIFFFaxWhiteTable`, :c:var:`TIFFFaxBlackTable`), - although they are not in a public libtiff header. Raised by - Lee Howard. Fixes - :bugzilla:`2636` - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_getimage.c`: add - :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` variants of - the functions without ext, with an extra argument to control - the ``stop_on_error`` behaviour. - -* :file:`libtiff/tif_getimage.c`: fix potential memory leaks in error - code path of :c:func:`TIFFRGBAImageBegin`. Fixes - :bugzilla:`2627` - -* :file:`libtiff/tif_jpeg.c`: increase libjpeg max memory usable to 10 - MB instead of libjpeg 1MB default. This helps when creating - files with "big" tile, without using libjpeg temporary files. - Related to https://trac.osgeo.org/gdal/ticket/6757 - -* :file:`libtiff/tif_jpeg.c`: avoid integer division by zero in - :c:func:`JPEGSetupEncode` when horizontal or vertical sampling is set - to 0. Fixes :bugzilla:`2653` - -* :file:`libtiff/tif_dirwrite.c`: in - :c:func:`TIFFWriteDirectoryTagCheckedRational`, replace assertion by - runtime check to error out if passed value is strictly - negative. Fixes - :bugzilla:`2535` - -* :file:`libtiff/tif_dirread.c`: avoid division by floating point 0 in - :c:func:`TIFFReadDirEntryCheckedRational` and - :c:func:`TIFFReadDirEntryCheckedSrational`, and return 0 in that case - (instead of infinity as before presumably) Apparently some - sanitizers do not like those divisions by zero. Fixes - :bugzilla:`2644` - -* :file:`libtiff/tif_dir.c`, :file:`tif_dirread.c`, :file:`tif_dirwrite.c`: implement - various clampings of double to other data types to avoid - undefined behaviour if the output range isn't big enough to - hold the input value. Fixes - :bugzilla:`2643`, - :bugzilla:`2642`, - :bugzilla:`2646`, - :bugzilla:`2647` - -* :file:`libtiff/tif_jpeg.c`: validate ``BitsPerSample`` in - :c:func:`JPEGSetupEncode` to avoid undefined behaviour caused by - invalid shift exponent. Fixes - :bugzilla:`2648` - -* :file:`libtiff/tif_read.c`: avoid potential undefined behaviour on - signed integer addition in :c:func:`TIFFReadRawStrip1` in :c:func:`isMapped` - case. Fixes :bugzilla:`2650` - -* :file:`libtiff/tif_getimage.c`: add explicit :c:func:`uint32` cast in - :c:var:`putagreytile` to avoid ``UndefinedBehaviorSanitizer`` warning. - Patch by Nicolás Peña. Fixes - :bugzilla:`2658` - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFReadBufferSetup`: use :c:func:`_TIFFcalloc` - to zero initialize :c:member:`tif_rawdata`. Fixes - :bugzilla:`2651` - -* :file:`libtiff/tiffio.h`, :file:`tif_unix.c`, :file:`tif_win32.c`, :file:`tif_vms.c`: add - :c:func:`_TIFFcalloc` - -* :file:`libtiff/tif_luv.c`, :file:`tif_lzw.c`, :file:`tif_packbits.c`: return 0 in - Encode functions instead of -1 when :c:func:`TIFFFlushData1` fails. - Fixes :bugzilla:`2130` - -* :file:`libtiff/tif_ojpeg.c`: fix leak in - :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, - :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and - :c:func:`OJPEGReadHeaderInfoSecTablesAcTable` when read fails. Patch by - Nicolás Peña. Fixes - :bugzilla:`2659` - -* :file:`libtiff/tif_jpeg.c`: only run :c:func:`JPEGFixupTagsSubsampling` if - the ``YCbCrSubsampling`` tag is not explicitly present. This helps - a bit to reduce the I/O amount when the tag is present - (especially on cloud hosted files). - -* :file:`libtiff/tif_lzw.c`: in :c:func:`LZWPostEncode`, increase, if - necessary, the code bit-width after flushing the remaining - code and before emitting the EOI code. Fixes - :bugzilla:`1982` - -* :file:`libtiff/tif_pixarlog.c`: fix memory leak in error code path of - :c:func:`PixarLogSetupDecode`. Patch by Nicolás Peña. Fixes - :bugzilla:`2665` - -* :file:`libtiff/tif_fax3.c`, :file:`tif_predict.c`, :file:`tif_getimage.c`: fix GCC 7 - ``-Wimplicit-fallthrough`` warnings. - -* :file:`libtiff/tif_dirread.c`: fix memory leak in non - :c:macro:`DEFER_STRILE_LOAD` mode (ie default) when there is both a - ``StripOffsets`` and ``TileOffsets`` tag, or a ``StripByteCounts`` and - ``TileByteCounts``. Fixes - :bugzilla:`2689` - -* :file:`libtiff/tif_ojpeg.c`: fix potential memory leak in - :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, - :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and - :c:func:`OJPEGReadHeaderInfoSecTablesAcTable`. Patch by Nicolás Peña. - Fixes :bugzilla:`2670` - -* :file:`libtiff/tif_fax3.c`: avoid crash in :c:func:`Fax3Close` on empty file. - Patch by Alan Coopersmith + complement by myself. Fixes - :bugzilla:`2673` - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip`: add limitation to the - number of bytes read in case ``td_stripbytecount[strip]`` is - bigger than reasonable, so as to avoid excessive memory - allocation. - -* :file:`libtiff/tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_predict.c`: fix memory - leak when the underlying codec (ZIP, PixarLog) succeeds its - :c:func:`setupdecode` method, but :c:func:`PredictorSetup` fails. Credit to - OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` and :c:func:`TIFFFillTile`: avoid - excessive memory allocation in case of shorten files. Only - effective on 64 bit builds and non-mapped cases. Credit to - OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial` / :c:func:`TIFFSeek`, - avoid potential integer overflows with read_ahead in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. Should - especially occur on 32 bit platforms. - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial`: avoid excessive - memory allocation in case of shorten files. Only effective on - 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: update :c:member:`tif_rawcc` in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with :c:member:`tif_rawdataloaded` when - calling :c:func:`TIFFStartStrip` or :c:func:`TIFFFillStripPartial`. This - avoids reading beyond :c:func:`tif_rawdata` when ``bytecount > - tif_rawdatasize``. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. - Credit to OSS-Fuzz - -* :file:`libtiff/tif_color.c`: avoid potential :c:type:`int32` overflow in - :c:func:`TIFFYCbCrToRGBInit`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_pixarlog.c`, :file:`tif_luv.c`: avoid potential :c:type:`int32` - overflows in :c:func:`multiply_ms` and :c:func:`add_ms`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_packbits.c`: fix out-of-buffer read in - :c:func:`PackBitsDecode`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_luv.c`: :c:func:`LogL16InitState`: avoid excessive memory - allocation when ``RowsPerStrip`` tag is missing. - Credit to OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_lzw.c`: update dec_bitsleft at beginning of - LZWDecode(), and update tif_rawcc at end of LZWDecode(). This - is needed to properly work with the latest changes in - tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. - -* :file:`libtiff/tif_pixarlog.c`: :c:func:`PixarLogDecode`: resync :c:member:`tif_rawcp` - with :c:member:`next_in` and :c:member:`tif_rawcc` with :c:member:`avail_in` at beginning and end - of function, similarly to what is done in :c:func:`LZWDecode`. Likely - needed so that it works properly with latest changes in - :file:`tif_read.c` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. But untested... - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: add basic - validation of :c:var:`luma` and :c:var:`refBlackWhite` coefficients (just check - they are not NaN for now), to avoid potential :c:expr:`float` to :c:expr:`int` - overflows. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 - Credit to OSS Fuzz - -* :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast - of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` - is not zero to avoid division by zero. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -* :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast - of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` - is not zero to avoid division by zero. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter - validation for :c:var:`refBlackWhite` coefficients values. To avoid - invalid :c:expr:`float` to :c:expr:`int32` conversion. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 - Credit to OSS Fuzz - - -Tools changes -------------- - -* :file:`tools/fax2tiff.c` (:c:func:`main`): Applied patch by Jörg Ahrens to fix - passing client data for Win32 builds using :file:`tif_win32.c` - (:c:macro:`USE_WIN32_FILEIO` defined) for file I/O. Patch was provided - via email on November 20, 2016. - -* :file:`tools/tiffcp.c`: avoid :c:type:`uint32` underflow in :c:func:`cpDecodedStrips` - that can cause various issues, such as buffer overflows in the - library. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2598` - -* :file:`tools/tiffcrop.c`: fix :c:func:`readContigStripsIntoBuffer` in ``-i`` - (ignore) mode so that the output buffer is correctly - incremented to avoid write outside bounds. Reported by - Agostino Sarubbo. Fixes - :bugzilla:`2620` - -* :file:`tools/tiffcrop.c`: add 3 extra bytes at end of strip buffer in - :c:func:`readSeparateStripsIntoBuffer` to avoid read outside of heap - allocated buffer. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2621` - -* :file:`tools/tiffcrop.c`: fix integer division by zero when - ``BitsPerSample`` is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2619` - -* :file:`tools/tiffinfo.c`: fix null pointer dereference in ``-r`` mode - when the image has no ``StripByteCount`` tag. Reported by - Agostino Sarubbo. Fixes - :bugzilla:`2594` - -* :file:`tools/tiffcp.c`: avoid potential division by zero if - ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2597` - -* :file:`tools/tif_dir.c`: when ``TIFFGetField(, TIFFTAG_NUMBEROFINKS, )`` - is called, limit the return number of inks to ``SamplesPerPixel``, - so that code that parses ink names doesn't go past the end of - the buffer. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2599` - -* :file:`tools/tiffcp.c`: avoid potential division by zero if - ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2607` - -* :file:`tools/tiffcp.c`: fix :c:type:`uint32` underflow/overflow that can cause - heap-based buffer overflow. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2610` - -* :file:`tools/tiffcp.c`: replace ``assert( (bps % 8) == 0 )`` by a non - assert check. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2605` - -* :file:`tools/tiff2ps.c`: fix 2 heap-based buffer overflows (in - :c:func:`PSDataBW` and :c:func:`PSDataColorContig`). Reported by Agostino Sarubbo. - Fixes :bugzilla:`2633` and - :bugzilla:`2634`. - -* :file:`tools/tiff2pdf.c`: prevent heap-based buffer overflow in ``-j`` - mode on a paletted image. Note: this fix errors out before the - overflow happens. There could probably be a better fix. Fixes - :bugzilla:`2635` - -* :file:`tools/tiff2pdf.c`: fix wrong usage of :c:func:`memcpy` that can - trigger unspecified behaviour. Fixes - :bugzilla:`2638` - -* :file:`tools/tiff2pdf.c`: avoid potential invalid memory read in - :c:func:`t2p_writeproc`. Fixes - :bugzilla:`2639` - -* :file:`tools/tiff2pdf.c`: avoid potential heap-based overflow in - :c:func:`t2p_readwrite_pdf_image_tile`. Fixes - :bugzilla:`2640` - -* :file:`tools/tiffcrop.c`: remove extraneous :c:func:`TIFFClose` in error code - path, that caused double free. Related to - :bugzilla:`2535` - -* :file:`tools/tiffcp.c`: error out cleanly in :c:func:`cpContig2SeparateByRow` - and :c:func:`cpSeparate2ContigByRow` if ``BitsPerSample != 8`` to avoid heap - based overflow. Fixes - :bugzilla:`2656` and - :bugzilla:`2657` - -* :file:`tools/raw2tiff.c`: avoid integer division by zero. Fixes - :bugzilla:`2631` - -* :file:`tools/tiff2ps.c`: call :c:func:`TIFFClose` in error code paths. - -* :file:`tools/fax2tiff.c`: emit appropriate message if the input file - is empty. Patch by Alan Coopersmith. Fixes - :bugzilla:`2672` - -* :file:`tools/tiff2bw.c`: close :c:struct:`TIFF` handle in error code path. Fixes - :bugzilla:`2677` - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.9.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.9.rst.txt deleted file mode 100644 index 7a5318d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.0.9.rst.txt +++ /dev/null @@ -1,317 +0,0 @@ -Changes in TIFF v4.0.9 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.9 (:tag:`Release-v4-0-9`) - Previous Version :doc:`v4.0.8 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :file:`test/Makefile.am`: Add some tests for tiff2bw. -* :file:`.appveyor.yml`, :file:`.travis.yml`, :file:`build/travis-ci`: apply patches - :file:`0001-ci-Travis-script-improvements.patch` and - :file:`0002-ci-Invoke-helper-script-via-shell.patch` by Roger Leigh - (sent to mailing list) -* :file:`.travis.yml`, :file:`build/travis-ci`: new files from - :file:`0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch` by - Roger Leigh (sent to mailing list on 2017-06-08). - This patch adds support for the Travis-CI service. -* :file:`.appveyor.yml`: new file from - :file:`0002-ci-Add-AppVeyor-support.patch` by Roger Leigh (sent to mailing - list on 2017-06-08). - This patch adds a :file:`.appveyor.yml` file to the top-level. This allows - one to opt in to having a branch built on Windows with Cygwin, - MinGW and MSVC automatically when a branch is pushed to GitHub, - GitLab, BitBucket or any other supported git hosting service. -* :file:`CMakeLists.txt`, :file:`test/CMakeLists.txt`, :file:`test/TiffTestCommon.cmake`: apply - patch :file:`0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch` from Roger - Leigh (sent to mailing list on 2017-06-08). - This patch makes the CMake build system support running the tests - with MinGW or Cygwin. - -* :file:`test/tiffcp-lzw-compat.sh`, :file:`test/images/quad-lzw-compat.tiff`: new files - to test old-style LZW decompression -* :file:`test/common.sh`, :file:`Makefile.am`, :file:`CMakeList.txt`: updated with above -* :file:`test/Makefile.am`: add missing reference to images/quad-lzw-compat.tiff - to fix ``make distcheck``. Patch by Roger Leigh -* :file:`nmake.opt`: support a ``DEBUG=1`` option, so as to adjust ``OPTFLAGS`` and use - ``/MDd`` runtime in debug mode. - - -Library changes ---------------- - -* :file:`libtiff/tif_color.c`: :c:func:`TIFFYCbCrToRGBInit`: stricter clamping to avoid - :c:type:`int32` overflow in :c:func:`TIFFYCbCrtoRGB`. - Fixes :oss-fuzz:`1844`. - Credit to OSS Fuzz - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for - ``refBlackWhite`` coefficients values. To avoid invalid ``float->int32`` conversion - (when ``refBlackWhite[0] == 2147483648.f``) - Fixes :oss-fuzz:`1907`. - Credit to OSS Fuzz - -* :file:`libtiff/tif_dirinfo.c`, :file:`tif_dirread.c`: add :c:func:`_TIFFCheckFieldIsValidForCodec`, - and use it in :c:func:`TIFFReadDirectory` so as to ignore fields whose tag is a - codec-specified tag but this codec is not enabled. This avoids :c:func:`TIFFGetField` - to behave differently depending on whether the codec is enabled or not, and - thus can avoid stack based buffer overflows in a number of TIFF utilities - such as :program:`tiffsplit`, :program:`tiffcmp`, :program:`thumbnail`, etc. - Patch derived from :file:`0063-Handle-properly-CODEC-specific-tags.patch` - (:bugzilla:`2580`) by Raphaël Hertzog. - Fixes: - :bugzilla:`2580`, - :bugzilla:`2693`, - :bugzilla:`2625` (:cve:`2016-10095`), - :bugzilla:`2564` (:cve:`2015-7554`), - :bugzilla:`2561` (:cve:`2016-5318`), - :bugzilla:`2499` (:cve:`2014-8128`), - :bugzilla:`2441`, - :bugzilla:`2433`. - -* :file:`libtiff/tif_swab.c`: if :c:macro:`DISABLE_CHECK_TIFFSWABMACROS` is defined, do not do - the ``#ifdef TIFFSwabXXX`` checks. Make it easier for GDAL to rename the symbols - of its internal libtiff copy. - -* :file:`libtiff/tif_dirread.c`: fix regression of libtiff 4.0.8 in - :c:func:`ChopUpSingleUncompressedStrip` regarding update of newly single-strip - uncompressed files whose bytecount is 0. Before the change of 2016-12-03, - the condition ``bytecount==0`` used to trigger an early exit/disabling of - strip chop. Re-introduce that in update mode. Otherwise this cause - later incorrect setting for the value of ``StripByteCounts``/``StripOffsets``. - (:gdal-trac:`6924`). -* :file:`libtiff/tif_dirread.c`: :c:func:`TIFFFetchStripThing`: limit the number of items - read in ``StripOffsets``/``StripByteCounts`` tags to the number of strips to avoid - excessive memory allocation. - Fixes :oss-fuzz:`2215`. - Credit to OSS Fuzz -* :file:`libtiff/tif_getimage.c`: avoid many (harmless) :c:expr:`unsigned int` overflows. -* :file:`libtiff/tif_fax3.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`Fax3Encode2DRow`. Could - potentially be a bug with huge rows. -* :file:`libtiff/tif_jpeg.c`: avoid (harmless) :c:expr:`unsigned int` overflow on tiled images. -* :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` - and ``BYTECOUNTLOOKSBAD`` when file is too short. -* :file:`libtiff/tif_predict.c`: decorate legitimate functions where :c:expr:`unsigned int` - overflow occur with :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` -* :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` -* :file:`libtiff/tiffiop.h`: add :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` macro to - disable CLang warnings raised by ``-fsanitize=undefined,unsigned-integer-overflow`` -* :file:`libtiff/tif_jpeg.c`: add anti-denial of service measure to avoid excessive - CPU consumption on progressive JPEGs with a huge number of scans. - See ``_. - - .. note:: - - Only affects libtiff since 2014-12-29 where support of non-baseline JPEG - was added. - -* :file:`libtiff/tif_jpeg.c`: error out at decoding time if anticipated libjpeg - memory allocation is above 100 MB. libjpeg in case of multiple scans, - which is allowed even in baseline JPEG, if components are spread over several - scans and not interleavedin a single one, needs to allocate memory (or - backing store) for the whole strip/tile. - See ``_. - This limitation may be overridden by setting the - ``LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC`` environment variable, or recompiling - libtiff with a custom value of :c:macro:`TIFF_LIBJPEG_LARGEST_MEM_ALLOC` macro. -* :file:`libtiff/tif_jbig.c`: fix memory leak in error code path of :c:func:`JBIGDecode`. - Fixes :bugzilla:`2706`. - Reported by team OWL337 -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFReadDirEntryFloat`, check that a - double value can fit in a float before casting. Patch by Nicolas RUFF -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_jpeg_12.c`, - :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadScanline` works in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with JPEG stream with multiple scans. - Also make configurable through a ``LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER`` - environment variable the maximum number of scans allowed. Defaults to - 100. -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillTile`: add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation (similarly to - what was done for :c:func:`TIFFFileStrip` on 2017-05-10) -* :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadEncodedStripAndAllocBuffer`. - Fixes :bugzilla:`2708` and - :oss-fuzz:`2433`. - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedStripAndAllocBuffer` - function, variant of :c:func:`TIFFReadEncodedStrip` that allocates the - decoded buffer only after a first successful :c:func:`TIFFFillStrip`. This avoids - excessive memory allocation on corrupted files. -* :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedXXXX` - functions associated with LONG8/SLONG8 data type, replace assertion that - the file is BigTIFF, by a non-fatal error. - Fixes :bugzilla:`2712` - Reported by team OWL337 -* :file:`libtiff/tif_read.c`: :c:func:`TIFFStartTile`: set tif_rawcc to - tif_rawdataloaded when it is set. Similarly to :c:func:`TIFFStartStrip`. - This issue was revealed by the change of 2017-06-30 in :c:func:`TIFFFileTile`, - limiting the number of bytes read. But it could probably have been hit - too in CHUNKY_STRIP_READ_SUPPORT mode previously ? - Fixes :oss-fuzz:`2454` - Credit to OSS Fuzz -* :file:`libtiff/tif_error.c, tif_warning.c`: correctly use va_list when both - an old-style and new-style warning/error handlers are installed. - Patch by Paavo Helde (sent on the mailing list) -* :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadTileAndAllocBuffer`. - Fixes :oss-fuzz:`2470` - Credit to OSS Fuzz. -* :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedTileAndAllocBuffer` - and :c:func:`_TIFFReadTileAndAllocBuffer` variants of :c:func:`TIFFReadEncodedTile` and - :c:func:`TIFFReadTile` that allocates the decoded buffer only after a first - successful :c:func:`TIFFFillTile`. This avoids excessive memory allocation - on corrupted files. -* :file:`libtiff/tif_pixarlog.c`: avoid excessive memory allocation on decoding - when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) - Fixes :oss-fuzz:`2554` - Credit to OSS Fuzz -* :file:`libtiff/tif_lzw.c`: fix 4.0.8 regression in the decoding of old-style LZW - compressed files. -* :file:`libtiff/tif_lzw.c`: fix potential out-of-buffer read on 1-byte LZW - strips. Crashing issue only on memory mapped files, where the strip - offset is the last byte of the file, and the file size is a multiple - of one page size on the CPU architecture (typically 4096). Credit - to myself :-) -* :file:`libtiff/tif_dir.c`: avoid potential null pointer dereference in - :c:func:`_TIFFVGetField` on corrupted TIFFTAG_NUMBEROFINKS tag instance. - Fixes :bugzilla:`2713` -* :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" - mode on ``PlanarConfig=Contig`` input images. - Fixes :bugzilla:`2715` - Reported by team OWL337 -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. - Complementary fix for :bugzilla:`2708` - in the :c:func:`isMapped` case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. - Complementary fix for :bugzilla:`2708` - in the :c:func:`isMapped` case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. -* :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the - arrays that hold StripOffsets/StripByteCounts, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes :oss-fuzz:`2350` - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the - arrays that hold ``StripOffsets``/``StripByteCounts``, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes :oss-fuzz:`2350` - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`: add protection against excessive memory - allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes :bugzilla:`2675` -* :file:`libtiff/tif_read.c`: add protection against excessive memory - allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes :bugzilla:`2675` -* :file:`libtiff/tif_luv.c`: :c:func:`LogLuvInitState`: avoid excessive memory - allocation when ``RowsPerStrip`` tag is missing. - Fixes :oss-fuzz:`2683` - Credit to OSS-Fuzz -* :file:`libtiff/tif_getimage.c`: :c:func:`gtTileContig` and :c:func:`gtTileSeparate`: - properly break from loops on error when ``stoponerr`` is set, instead - of going on iterating on row based loop. -* :file:`libtiff/tif_getimage.c`: fix fromskew computation when to-be-skipped - pixel number is not a multiple of the horizontal subsampling, and - also in some other cases. Impact ``putcontig8bitYCbCr44tile``, - ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile``, - ``putcontig8bitYCbCr21tile`` and ``putcontig8bitYCbCr12tile``. - Fixes :bugzilla:`2637` (discovered by Agostino Sarubbo) - and :oss-fuzz:`2691` (credit to OSS Fuzz) -* :file:`libtiff/tif_luv.c`: further reduce memory requirements for temporary - buffer when ``RowsPerStrip >= image_length`` in :c:func:`LogLuvInitState` and - :c:func:`LogL16InitState`. - Fixes :oss-fuzz:`2700` - Credit to OSS Fuzz -* :file:`libtiff/tif_dirwrite.c`: replace assertion related to not finding the - ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectorySec`) - Fixes :bugzilla:`2727` - Reported by team OWL337 -* :file:`libtiff/tif_dirwrite.c`: replace assertion to tag value not fitting - on :c:type:`uint32` when selecting the value of ``SubIFD`` tag by runtime check - (in :c:func:`TIFFWriteDirectoryTagSubifd`). - Fixes :bugzilla:`2728` - Reported by team OWL337 -* :file:`libtiff/tif_jpeg.c`: accept reading the last strip of a JPEG compressed - file if the codestream height is larger than the truncated height of the - strip. Emit a warning in this situation since this is non compliant. -* :file:`libtiff/tiffiop.h`, :c:type:`tif_aux.c`: redirect :c:func:`SeekOK` macro to a :c:func:`_TIFFSeekoK` - function that checks if the offset is not bigger than :c:macro:`INT64_MAX`, so as - to avoid a ``-1`` error return code of :c:func:`TIFFSeekFile` to match a required - seek to :c:macro:`UINT64_MAX`/``-1``. - Fixes :bugzilla:`2726` - Adapted from proposal by Nicolas Ruff. -* :file:`libtiff/tif_dirread.c`: add :c:macro:`NULL` check to avoid likely false positive - null-pointer dereference warning by CLang Static Analyzer. -* :file:`libtiff/libtiff.def`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` - Fixes :bugzilla:`2735` -* :file:`libtiff/tif_jpeg.c`: add compatibility with libjpeg-turbo 1.5.2 that - honours ``max_memory_to_use > 0``. - Cf ``_. -* :file:`libtiff/tif_getimage.c`: avoid floating point division by zero in - :c:func:`initCIELabConversion` - Fixes :oss-fuzz:`3733` - Credit to OSS Fuzz - - -Tools changes -------------- - -* :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" - mode on ``PlanarConfig=Contig`` input images. - Fixes :bugzilla:`2715` - Reported by team OWL337 -* :file:`tools/tiffset.c`: fix setting a single value for the ``ExtraSamples`` tag - (and other tags with variable number of values). - So ``tiffset -s ExtraSamples 1 X``. This only worked - when setting 2 or more values, but not just one. -* :file:`tools/fax2tiff.c` (``_FAX_Client_Data``): Pass ``FAX_Client_Data`` as the - client data. This client data is not used at all at the moment, - but it makes the most sense. Issue that the value of - ``client_data.fd`` was passed where a pointer is expected was reported - via email by Gerald Schade on Sun, 29 Oct 2017. -* :file:`tools/tiff2pdf.c` (``t2p_sample_realize_palette``): Fix possible - arithmetic overflow in bounds checking code and eliminate - comparison between signed and unsigned type. -* :file:`tools/tiff2bw.c` (:c:func:`main`): Free memory allocated in the :program:`tiff2bw` - program. This is in response to the report associated with - :cve:`2017-16232` but does not solve the extremely high memory usage - with the associated POC file. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.1.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.1.0.rst.txt deleted file mode 100644 index 112346f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.1.0.rst.txt +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v4.1.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.1.0 (:tag:`v4.1.0`) - Previous Version :doc:`v4.0.10 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here. A change summary is also provided by the -:file:`ChangeLog` file included in the release package and by the Git commit -history: - - -Major changes -------------- - -* Make defer strile offset/bytecount loading available at runtime - and add per-strile offset/bytecount loading capabilities. Part of - this commit makes the behaviour that was previously met when libtiff - was compiled with ``-DDEFER_STRILE_LOAD`` available for default builds - when specifying the new ``D`` (Deferred) :c:func:`TIFFOpen` flag. In that - mode, the [``Tile``/``Strip``][``ByteCounts``/``Offsets``] arrays are only loaded - when first accessed. This can speed-up the opening of files stored - on the network when just metadata retrieval is needed. - - Another addition is the capability of loading only the values of - the offset/bytecount of the strile of interest instead of the - whole array. This is enabled with the new ``O`` (Ondemand) flag of - :c:func:`TIFFOpen` (which implies ``D``). - - The public :c:func:`TIFFGetStrileOffset`, - :c:func:`TIFFGetStrileOffsetWithErr`, - :c:func:`TIFFGetStrileByteCount` and - :c:func:`TIFFGetStrileByteCountWithErr` functions have been added to - API. They are of particular interest when using sparse files (with - ``offset == bytecount == 0``) and you want to detect if a strile is - present or not without decompressing the data, or updating an - existing sparse file. - -* The BigTIFF writer now optimizes file size by using 32-bit ``LONG`` - values (rather than 64-bit) where it is reasonable and safe to do - so. Likewise, the 16-bit ``SHORT`` type is used when possible for - ``StripByteCounts``/``TileByteCounts``. - - -Software configuration changes ------------------------------- - -* The ``WIN32`` build now uses :file:`tif_win32.c` when building with CMake. - -* Properly set value of :c:macro:`HOST_FILLORDER` to :c:macro:`LSB2MSB` for Windows - CMake builds. It was not being properly set! - - -Library changes ---------------- - -* Changes in the libtiff library may be viewed on-line - `Libtiff Library Commits `_.. - -* New function :c:func:`TIFFReadFromUserBuffer` which replaces the use of - :c:func:`TIFFReadEncodedStrip`/:c:func:`TIFFReadEncodedTile` when the user can - provide the buffer for the input data, for example when he wants - to avoid libtiff to read the strile offset/count values from the - ``[Strip|Tile][Offsets/ByteCounts]`` array. - -* New functions :c:func:`TIFFDeferStrileArrayWriting` and :c:func:`TIFFForceStrileArrayWriting`. - Those advanced writing functions must be used in a particular sequence - to make their intended effect. Their aim is to control when/where - the ``[Strip/Tile][Offsets/ByteCounts]`` arrays are written into the file. - - The purpose of this is to generate 'cloud-optimized geotiff' files where - the first KB of the file only contain the IFD entries without the potentially - large strile arrays. Those are written afterwards. - - -Tools changes -------------- - -* Changes in the libtiff utilities may be viewed on-line - at `Libtiff Tools Commits `_. - - -Contributed software changes ----------------------------- - -* Changes in the libtiff contrib area may be viewed on-line - at `Libtiff Contrib Commits `_. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.2.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.2.0.rst.txt deleted file mode 100644 index e1e8d58..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.2.0.rst.txt +++ /dev/null @@ -1,103 +0,0 @@ -Changes in TIFF v4.2.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.2.0 (:tag:`v4.2.0`) - Previous Version :doc:`v4.1.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - - -Major changes -------------- - -* Optional support for using libdeflate is added. -* Many of the tools now support a memory usage limit. - - -Software configuration changes ------------------------------- - -* The Microsoft Windows 'nmake' build is resuscitated and provides - a default ``HAVE_STRTOLL`` setting in 'nmake.opt' which is suitable for - MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in - order to compile with earlier compiler versions. - -* mingw-w64 cmake build fixes to not add libm - - -Library changes ---------------- - -* A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. -* EXIF 2.32 and GPS tags and functionality have been upgraded: - - * Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2 - * EXIF-GPS structure, tags and access functions are added as special ``CustomDirectory`` (like it was done for EXIF). - * Reading error for FileSource and SceneType tags corrected. - -* Make ``TIFFTAG_CFAPATTERN`` variable count. - -* Cmake configuration fixes for big-endian targets. - -* Added support for optional building against libdeflate for - faster Zip/Deflate compression/decompression. - - We now have 2 kinds of builds with the Zip/Deflate codec: - - * zlib only - * zlib + libdeflate - - Speed improvements in the 35%-50% range can be expected when libdeflate is used. - Compression level up to 12 is now supported (capped to 9 when zlib is used). - Still requires zlib for situations where libdeflate cannot be used (that - is for scanline access, since libdeflate has no streaming mode) - - Pseudo-tag ``TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE`` - is added to control which subcodec (zlib or libdeflate) should be used (it defaults - of course to libdeflate, when it is available). - This is mostly aimed at being used on the writing side, to be able to reproduce - output of previous libtiff versions at a binary level, in situations where this would - be really needed. Or as a safety belt in case there would be unforeseen issues - with using libdeflate. - It can be used to know when libdeflate is available at runtime (``DEFLATE_SUBCODEC_LIBDEFLATE`` - will be the default value in that situation). - - Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. - - -Tools changes -------------- - -* A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. - -* :program:`ppm2tiff`: support any bps value from 1 to 16. - -* :program:`tiff2ps`, :program:`tiff2rgba`: A default memory limit is now enforced (256MiB) and a ``-M`` option is added to allow the user to adjust the limit. - -* :program:`tiff2pdf`, :program:`tiffcp`: A default memory limit is now enforced (256MiB) and a ``-m`` option is added to allow the user to adjust the limit. - -* :program:`tiffcrop`: A default memory limit is now enforced (256MiB) and a ``-k`` option is added to allow the user to adjust the limit. - -* :program:`tiff2pdf`: fix "raw" copy of Deflate streams. - -* :program:`tiff2pdf.c`: properly calculate datasize when saving to JPEG YCbCr - -* :program:`tiffcp`: disable strip chopping when trying to convert to JBIG compression - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.3.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.3.0.rst.txt deleted file mode 100644 index 740efd6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.3.0.rst.txt +++ /dev/null @@ -1,85 +0,0 @@ -Changes in TIFF v4.3.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.3.0 (:tag:`v4.3.0`) - Previous Version :doc:`v4.2.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -* Build and usage of the library and its utilities requires a C99 capable - compiler. - -* New optional codec for the LERC (Limited Error Raster Compression) compression scheme. - To have it available, configure libtiff against the SDK available at - ``_ - -* CMake build: revamp of build scripts - -Software configuration changes ------------------------------- - -* cmake: revamp of the cmake build scripts. There are impacts on the case of - some options. - -* cmake: update minimum version and policy version to 3.9. - -* Remove NMake build support. The functionality provided by the NMake build - is now completely superseded by the CMake build. - -* Remove antiquated Scons and makefile.lcc build support. - -* Remove non-functional VMS and WinCE support. - -* :file:`autogen.sh` now updates :file:`config.guess` and :file:`config.sub` from master gnulib version. - -Library changes ---------------- - -* Use of :c:type:`int8`, :c:type:`uint8`, :c:type:`int16`, :c:type:`uint16`, - :c:type:`int32`, :c:type:`uint32`, :c:type:`int64`, :c:type:`uint64` - typedefs is now deprecated. libtiff code and headers no longer use them, - and use their C99 standard equivalents (with ``_t`` suffix). Those typedefs - are still available, with deprecation warnings, but external code is strongly - encouraged to use the corresponding C99 :file:`stdint.h` types. The deprecated - types might be removed in a future release. - -* Removal of unused, or now useless due to C99 availability, functions in :file:`port/` - -* A few issues spotted by static code analysis tools fixed. Compiler - warnings addressed. - -Tools changes -------------- - -* In usage text, insert a line of text summarizing each tool's purpose - -* tiff tools: made display of compression methods and their parameters - conditional on their actual availability - -* :program:`tiff2ps`: exit the loop in case of error (#232) - -* :program:`tiff2pdf`: check that tiff_datasize fits in a signed :c:type:`tsize_t` (#202) - -* :program:`tiffsplit`: exit with :c:macro:`EXIT_FAILURE` if there are extra args on the command line - -* :program:`tiffcmp`: fix comparison with pixels that are fractional number of bytes (#53) - -Contributed software changes ----------------------------- - -* :file:`iptcutil.c` - set ``#ifdef _WIN32`` (was ``#ifdef WIN32``, which failed at build time) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.4.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.4.0.rst.txt deleted file mode 100644 index af8cacd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.4.0.rst.txt +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v4.4.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.4.0 (:tag:`v4.4.0`) - Previous Version :doc:`v4.3.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Handle absolute paths in pkg-config file (:issue:`333`) -* Correct fix for the pkgconf file relative paths. -* cmake: allow running the tests with a read-only source directory. -* cmake: Fix ``STRIPCHOP_DEFAULT`` value in CMake builds. -* build: Fix static library imports in mingw related to LERC -* Fix version in :file:`libtiff-4.pc.in`, and CMake build: Add requirements to pc file -* cmake: Fix build with CMake 3.10. -* cmake: Export tiff targets. -* Make ``LERC_SUPPORT`` conditional on ``ZLIB_SUPPORT`` - -Library changes ---------------- - -New/improved functionalities: - -* :c:func:`TIFFIsBigTiff` function added. -* Functions :c:func:`TIFFFieldSetGetSize` and :c:func:`TIFFieldSetGetCountSize` added. -* :c:func:`LZWDecode`: major speed improvements (~30% faster) -* Predictor 2 (horizontal differentiation): support 64-bit -* Support libjpeg 9d - -Bug fixes: - -* Remove incorrect assert (:issue:`329`) -* avoid hang in :c:func:`TIFFRewriteDirectory` if a classic file > 4 GB is attempted to be created -* :file:`tif_jbig.c`: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes :issue:`385`) -* :c:func:`TIFFFetchNormalTag`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`383`) -* :c:func:`TIFFWriteDirectoryTagData`: turn assertion on data length into a runtime check -* :c:func:`TIFFFetchStripThing`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) -* :c:func:`TIFFReadDirectory`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) -* :c:func:`TIFFYCbCrToRGBInit`: avoid Integer-overflow -* ``TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS)``: return error if returned pointer is NULL (fixes :issue:`342`) -* OJPEG: avoid assertion when using :c:func:`TIFFReadScanline` (fixes :issue:`337`) -* :c:func:`TIFFReadDirectory`: fix OJPEG hack (fixes :issue:`319`) -* LZW codec: fix support for strips/tiles > 2 GB on Windows -* :c:func:`TIFFAppendToStrip`: fix rewrite-in-place logic (fixes :issue:`309`) -* Fix :c:func:`TIFFRewriteDirectory` discarding directories. -* :c:func:`TIFFReadCustomDirectory`: avoid crash when reading SubjectDistance tag on a non EXIF directory (:issue:`316`) -* Fix Segmentation fault printing GPS directory if ``Altitude`` tag is present -* :file:`tif_jpeg.c`: do not emit progressive scans with mozjpeg. (:issue:`266`) -* :c:func:`_TIFFRewriteField`: fix when writing a IFD with a single tile that is a sparse one, on big endian hosts -* Fix all remaining uses of legacy Deflate compression id and warn on use. - -Tools changes -------------- - -Bug fixes: - -* :program:`tiffcrop`: Fix issue :issue:`330` and some more from 320 to 349. -* :program:`tiffcrop`: fix issue :issue:`395`: generation of strange section images. -* :program:`tiffcrop`: fix issue :issue:`380` and :issue:`382` heap buffer overflow in extractImageSection -* :program:`tiffcrop`: fix FPE (:issue:`393`) -* :program:`tiffcrop`: buffsize check formula in :c:func:`loadImage` amended (fixes :issue:`273`, :issue:`275`) -* :program:`tiffcrop.c`: Fix issue :issue:`352` heap-buffer-overflow by correcting :c:type:`uint32_t` underflow. -* :program:`tiff2pdf`: handle 8-bit palette colormap. -* :program:`tiffcp`: avoid buffer overflow in "mode" string (fixes :issue:`400`) -* :program:`tiffcp`: Fix incomprehensible setting of orientation tag (fixes :issue:`29`) -* :program:`tiffcp`: do not try to fetch compressor-specific tags when not appropriate (fixes :issue:`396`) -* :program:`tiffcp`: fix heap buffer overflow (:issue:`278`) -* :program:`tiff2ps`: In :c:func:`limitMalloc` check for negative size (fixes :issue:`284`) -* :program:`tiffinfo`: add a ``-M`` switch to define the maximum heap allocation, and default it to 256 MiB (fixes :issue:`287`, :issue:`290`) -* :program:`tiffinfo`: limit more memory allocations using ``-M`` switch (fixes :issue:`288`) -* :program:`tiffset`: fix global-buffer-overflow for ASCII tags where count is required (fixes :issue:`355`) -* :program:`raw2tiff`: check that band number if not zero to avoid floating point exception(fixes :issue:`338`) -* :program:`tiffinfo`/:program:`tiffdump`: improve output for GDAL tags. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.0.rst.txt deleted file mode 100644 index a287b21..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.0.rst.txt +++ /dev/null @@ -1,142 +0,0 @@ -Changes in TIFF v4.5.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.5.0 (:tag:`v4.5.0`) - Previous Version :doc:`v4.4.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -* Whole code base reformatting of .c/.h files using new .clang-format format -* Documentation changed from static HTML and man pages to Restructured Text - (rst). HTML and man pages are now build artifacts. - -Software configuration changes ------------------------------- - -* SONAME version bumped to 6 due to changes in symbol versioning. -* autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into - its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build. -* autoconf/cmake: detect sphinx-build to build HTML and man pages -* CMakeLists.txt: fix warning with -Wdev -* CMake: correctly set default value of 'lzma' option when liblzma is detected - (:issue:`482`) -* CMake: Moved linking of CMath::CMath into CMath_LIBRARY check. -* Fix CMake build to be compatible with FetchContent. -* cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (:issue:`443`) -* cmake: Fixes for Visual Studio 2022. -* Adds Requires.private generation so that pkg-config can correctly find - the dependencies of libtiff. -* Fix dependency on libm on Android -* cmake: libtiffxx is static on win32 -* Fix build in tif_lzw.c -* CMake: Add options for disabling tools, tests, contrib and docs. - -Library changes ---------------- - -New/improved functionalities: - -* Addition of an open option concept with the new functions - :c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt`, - :c:func:`TIFFClientOpenExt`, :c:func:`TIFFOpenOptionsAlloc`, - :c:func:`TIFFOpenOptionsFree` -* Leveraging above mentioned open option concept, addition of a new capability - to limit the size of a single dynamic memory allocation done - by the library with :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` -* Leveraging above mentioned open option concept, addition of a new capability - to specify per-TIFF handle re-entrant error and warning callbacks - with :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and - :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` -* Related to IFD-Loop detection refactoring, the number of IFDs that libtiff - can browse through has been extended from 65535 to 1048576. This value is - a build-time setting that can be configured with CMake's TIFF_MAX_DIR_COUNT - variable or autoconf's --with-max-dir-count option. - -API/ABI breaks: - -* tdir_t type updated to uint32_t. This type is now used for the return value of - :c:func:`TIFFCurrentDirectory` and :c:func:`TIFFNumberOfDirectories`, and - as the argument of :c:func:`TIFFSetDirectory` and :c:func:`TIFFUnlinkDirectory` - -Bug fixes: - -* TIFFWriteRawStrip(): restore capabilities to append data in the current strip - (:issue:`489`) -* _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on - broken files (:issue:`479`) -* TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB - (oss-fuzz #53137) -* Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK -* Added warning messages for FIELD_IGNORE tags for writing and for - TIFF_SETGET_UNDEFINED for reading added. (:issue:`438`) -* tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (:issue:`439`) -* tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration - (:issue:`364`) -* Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value - (:issue:`149`, :issue:`150`, :issue:`152`, :issue:`168`, :issue:`250`, - :issue:`269`,:issue:`398`, CVE-2022-3599, :issue:`456`) -* TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case - (oss-fuzz #52309) -* Improved/fixes IFD-Loop Handling (:issue:`455`). -* Update getimage to support large raster images. -* Presetting of default tag values extended (e.g. PlanarConfig). (:issue:`449`) -* Deal with RichTIFFIPTC tag written with LONG type (:issue:`225`) -* TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected - (:issue:`442`) -* tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional - compile-time version check -* TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could - cause issues with reading JPEG compressed files -* _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific - tag and the codec is not configured (:issue:`433`, :issue:`486`, - CVE-2022-34526) -* Add basic 16 bit cielab support. -* WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding -* tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2 - -Tools changes -------------- - -New/improved functionality: - -* :program:`tiffinfo`: Updated to parse through SubIFDs and show their tags. - -Bug fixes: - -* :program:`tiffcrop`: add check if (bps != 1) in writeSingleSection() - (:issue:`169`) -* :program:`tiffcrop`: Fix too many 'mode' options on command line - (:issue:`470` and :issue:`450`) -* :program:`tiffcrop`: Fix memory allocation to require a larger buffer - (:issue:`271`, :issue:`381`, :issue:`386`, :issue:`388`, :issue:`389`, - :issue:`435`, CVE-2022-3570, CVE-2022-3598) -* :program:`tiffcrop`: disable incompatibility of -Z, -X, -Y, -z options with - any PAGE_MODE_x option (:issue:`411`, CVE-2022-3627, :issue:`413`, - CVE-2022-3597, :issue:`426`, CVE-2022-3626) -* :program:`tiffcrop`: -S option mutually exclusive (:issue:`349`, - :issue:`414`, :issue:`422`, :issue:`423`, :issue:`424`) -* :program:`tiffcrop`: fix floating-point exception (:issue:`415`, - :issue:`427`, :issue:`428`, CVE-2022-2056, CVE-2022-2057, CVE-2022-2058) -* :program:`tiff2pdf`: Don't try to seek into stdout (:issue:`441`) -* :program:`tiffinfo`: update curdir from uint16_t to tdir_t for more than 64k - IFD handling. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.1.rst.txt deleted file mode 100644 index a5c34d6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.5.1.rst.txt +++ /dev/null @@ -1,186 +0,0 @@ -Changes in TIFF v4.5.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.5.1 (:tag:`v4.5.1`) - Previous Version :doc:`v4.5.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -.. warning:: - - This version will be the last one supporting most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset), whose maintenance will be discontinued, due - to the lack of contributors able to address reported security issues. - Starting with libtiff v4.6.0, their source code, at this time ,will still be - available in the source distribution, but they will no longer be built by - default, and issues related to them will no longer be accepted in the - libtiff bug tracker. - - -.. warning:: - - Some CMake related changes, in particular related to the CMake config file - now installed, should be considered as a preview and may change in the next - releases based on user feedback. - See discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/496 - and https://gitlab.com/libtiff/libtiff/-/merge_requests/494 - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Definition of tags reformatted (clang-format off) for better - readability of tag comments in tiff.h and tif_dirinfo.c - -* Do not install libtiff-4.pc when tiff-install is reset. - -* Add versioninfo resource files for DLL and tools - compiled with Windows MSVC and MINGW. - -* Disable clang-formatting for tif_config.h.cmake.in and - tiffconf.h.cmake.in because sensitive for CMake scripts. - -* CMake: make WebP component name compatible with upstream ConfigWebP.cmake - -* CMake: make Findliblzma with upstream CMake config file - -* CMake: FindDeflate.cmake: fix several errors (:issue:`526`). - -* CMake: FindLERC.cmake: version string return added. - -* CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files - -* CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES - -Library changes ---------------- - -New/improved functionalities: - -* Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of - :c:func:`TIFFOpen` to warn and an alias of FILLORDER_MSB2LSB. - :file:`tif_lerc.c`: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN. - -* Optimize relative seeking within :c:func:`TIFFSetDirectory` - by using the learned list of IFD offsets. - -* Improve internal IFD offset and directory number map handling. - -* Behavior of :c:func:`TIFFOpen` mode "r+" in the Windows implementation - adjusted to that of Linux. - -API/ABI breaks: - -* None - -Bug fixes: - -* TIFFDirectory td_fieldsset type changed from unsigned long, which can - be 32 or 64 bits, to uint32_t (fixes :issue:`484`). - -* tif_ojpeg.c: checking for division by zero (fixes :issue:`554`). - -* LZWDecode(): avoid crash when trying to read again from a strip with - a missing end-of-information marker (fixes :issue:`548`). - -* Fixed runtime error: applying zero offset to null pointer - in :c:func:`countInkNamesString`. - -* Fixing crash in :c:func:`TIFFUnlinkDirectory` when called with - directory number zero ("TIFFUnlinkDirectory(**0**)") as well as fixing - incorrect behaviour when unlinking the first directory. - -* tif_luv: check and correct for NaN data in :c:func:`uv_encode` - (:issue:`530`). - -* :c:func:`TIFFClose` avoid NULL pointer dereferencing - (:issue:`515`). - -* tif_hash_set.c: include tif_hash_set.h after tif_config.h - to let a chance for GDAL symbol renaming trick. - -* Fax3: fix failure to decode some fax3 number_of_images - and add test for Fax3 decoding issues - (:issue:`513`). - -* :c:func:`TIFFSetDirectory` and :c:func:`TIFFWriteDirectorySec` - avoid harmless unsigned-integer-overflow - (due to gdal oss-fuzz #54311 and #54343). - -* :file:`tif_ojpeg.c`: fix :issue:`554` by checking for division by zero - in OJPEGWriteHeaderInfo(). - -* LZWDecode(): avoid crash when trying to read again from a strip with - a missing end-of-information marker (:issue:`548`). - -Documentation -------------- - -* mention TIFFSetTagExtender() cannot add tags to custom directories. - -* manpage: add multi page TIFF and SubIFDs description and read / write example. - -Tools changes -------------- - -New/improved functionality: - -* None - -Bug fixes: - -* :program:`tiffcrop`: Consider error return of writeSelections() (fixes :issue:`553`). - -* :program:`tiffcrop`: fix memory leak - (:issue:`475`). - -* :program:`tiffcrop`: do not reuse input buffer for subsequent images - (:issue:`527`). - -* :program:`tiffcrop`: Amend rotateImage() not to toggle the input - (main) image width and length parameters when only cropped image - sections are rotated. Remove buffptr from region structure - because never used. Fixes - :issue:`492`, :issue:`493`, :issue:`494`, :issue:`495`, - :issue:`499`, :issue:`518`, :issue:`519`. - -* :program:`tiffcrop`: correctly update buffersize after rotateImage() - (:issue:`520`). - -* :program:`tiffcrop`: added check for assumption on composite images. Fixes - :issue:`496`, :issue:`497`, :issue:`498`, :issue:`500`, :issue:`501`. - -* :program:`tiffmedian`: avoid zero num_colors - (:issue:`477`). - -* :program:`fax2ps`: fix buffer overflow in qsort function pcompar - (:issue:`475`). - -* :program:`tiffset`: get filesize to allocate only the required memory - (:issue:`241`). - -* :program:`tiffcrop`: fix :issue:`553` by considering error return of writeSelections(). - -* tif_ovrcache.c: check :c:func:`TIFFSetSubDirectory` return value (CID 1524573). - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.6.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.6.0.rst.txt deleted file mode 100644 index 78b5c9e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.6.0.rst.txt +++ /dev/null @@ -1,156 +0,0 @@ -Changes in TIFF v4.6.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.6.0 (:tag:`v4.6.0`) - Previous Version :doc:`v4.5.1 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -.. warning:: - - This version removes a big number of utilities that have suffered from lack - of maintenance over the years and were the source of various reported - security issues. - See "Removed functionality" below for the list of removed utilities. - Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors - able to address reported security issues. - tiff2ps and tiff2pdf source code has been moved in a unsupported category, - no longer built by default, but are still part of the the source - distribution. Other retired utilities are in a archive/ directory, only - available in the libtiff git repository. - Issues related to unsupported and archived tools will no longer be accepted - in the libtiff bug tracker. - - -Software configuration changes ------------------------------- - -* TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and - TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake - (fixes :issue:`589`) - -* Update CMake and autoconf scripts to consistently update LibTIFF version - defines and references in various files when version definition in - configure.ac has been changed. - - - Move in tiffvers.h from libtiff source directory to libtiff build directory. - - Remove unused version information from tif_config.h - - With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h - are consistently updated from configure.ac. The version release-date is - taken from file RELEASE-DATE. - - The files VERSION and RELEASE-DATE are only updated with a special CMake - target build: cmake --build . --target tiff_release. - - For autotools, version information is updated from configure.ac with - ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE. - - ./configure generates tiffvers.h with the cached version information and - LIBTIFF_RELEASE_DATE. - - "make release" updates tiffvers.h and VERSION file with cached version info - and RELEASE-DATE file and tiffves.h with the current date. - -* CMake: fix build with -Dstrip-chopping=off (fixes :issue:`600`) - -Library changes ---------------- - -New/improved functionalities: - -* Fix using ``__attribute__`` libtiff with clang-for-windows - -API/ABI breaks: - -* None - -Bug fixes: - -* WebP decoder: validate WebP blob width, height, band count against TIFF - parameters to avoid use of uninitialized variable, or decoding corrupted - content without explicit error (fixes :issue:`581`, :issue:`582`). - -* WebP codec: turn exact mode when creating lossless files to avoid altering - R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038) - -* Fix TransferFunction writing of only two transfer functions. - -* TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it - should be harmless in practice though - (https://gitlab.com/libtiff/libtiff/-/merge_requests/512) - -Documentation -------------- - -* TiffField functions documentation updated with return behaviour for not - defined tags and determination of write-/read-count size. - -Tools changes -------------- - -Removed functionality: - -* The following tools are no longer compiled and have been moved to archive/tools: - - - fax2ps - - fax2tiff - - pal2rgb - - ppm2tiff - - raw2tiff - - rgb2ycbcr - - thumbnail - - tiff2bw - - tiff2rgba - - tiffcmp - - tiffcrop - - tiffdither - - tiffgt - - tiffmedian - -* The following tools are no longer compiled by default: tiff2ps and tiff2pdf. - They have been moved to tools/unsupported. - They can be built by setting ``--enable-tools-unsupported`` for autoconf, - or ``-Dtiff-tools-unsupported`` for CMake, but as the name imply, they are - no longer supported by upstream. Packagers are suggested *not* to enable those - options. - -* tiffcp: remove -i option (ignore errors), because almost all - fuzzer issues were consequential errors from ignored errors because of the - "-i" option. - -New/improved functionality: - -* None - -Bug fixes: - -* tiffset: fix #597: warning: comparison of integer expressions of different - signedness. (fixes :issue:`597`) - -* tiffcp: fix memory corruption (overflow) on hostile images - (fixes :issue:`591`) - -Test changes ------------- - -* Add missing test_write_read_tags.c and test_transferfunction_write_read.c - in tarball (fixes :issue:`585`) and correct "long" issue. - -* Don't use "long" because can be int32_t or int64_t, depending on compiler and - system. - -Changes to contributed and unsupported tools --------------------------------------------- - -* raw2tiff: fix integer overflow and bypass of the check (fixes :issue:`592`) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.0.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.0.rst.txt deleted file mode 100644 index cff2bf6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.0.rst.txt +++ /dev/null @@ -1,211 +0,0 @@ -Changes in TIFF v4.7.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.7.0 (:tag:`v4.7.0`) - Previous Version :doc:`v4.6.0 ` - Primary Download Site ``_ - Home HTTP Site #1 ``_ - Home HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history. - -Major changes -------------- - -This version restores in the default build the availability of the tools that -had been dropped in v4.6.0 (cf :ref:`rfc2_restoring_needed_tools`) - -Software configuration changes ------------------------------- - -- autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection - -- autoconf build: fix error when running make clean (fixes :issue:`630`) - -- autoconf build: back off the minimum required automake version to 1.11 - -- autoconf.ac: fix detection of windows.h for mingw (fixes :issue:`605`) - -- libtiff-4.pc: Fix `Requires.private` missing `Lerc`. It provides a `.pc` file starting from version 4 - (in autoconf builds, we assume that liblerc is at least version 4) - -- CMake: Fix TIFF_INCLUDE_DIRS - -- CMake: MinGW compilers don't need a .def file for shared library - -- CMake: move libdeflate and Lerc to Requires.private - -- CMake: enable resource compilation on all Windows. - -Library changes ---------------- - -New/improved functionalities: - -- Add ``TIFFOpenOptionsSetMaxCumulatedMemAlloc()``. This function complements - ``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated - memory allocations in byte, for a given TIFF handle, that libtiff internal - memory allocation functions are allowed. - -API/ABI breaks: - -* None - -Bug fixes: - -- TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged. - -- TIFFXYZToRGB: avoid integer overflow (fixes :issue:`644`) - -- uv_decode() and uv_encode(): avoid potential out-of-bounds array index - (fixes :issue:`645`) - -- Fix cases where tif_curdir is set incorrectly. - Fix cases where the current directory number (tif_curdir) is set inconsistently - or incorrectly, depending on the previous history. - -- TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if - setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) - output buffer if failure (fixes :issue:`375`) - -- OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes :issue:`183`) - -- ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL - -- LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - -- tif_fax3.c: error out after a number of times end-of-file has been reached - (fixes :issue:`583`) - -- LZW: avoid warning about misaligned address with UBSAN (fixes :issue:`616`) - -- TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row - (fixes :issue:`622`, CVE-2023-52356) - -- tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - -- Avoid FPEs (division by zero) in tif_getimage.c. - -- Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros - by checking for denominator not zero before macros are executed. (fixes :issue:`628`) - -- Add non-zero check before division in TIFFComputeStrip() - -- Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active - -- Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - -- Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated - memory in the tif-structure. - -- For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is - set at the end to avoid deleting the last character. (fixes :issue:`579`) - -- Check return value of _TIFFCreateAnonField(). (fixes :issue:`624`, CVE-2024-7006) - -- Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857) - -- Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes :issue:`618`) - -- tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes :issue:`608`) - -Other changes: - -- Fix warnings with GCC 14 - -- tif_dir.c: Log source file, line number, and input tif for directory count error (fixes :issue:`627`) - -- Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() - changed to using set_field_type. - -- tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups - -- Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() - -- Remove support for _MSC_VER < 1500. - -- Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ - - -Documentation -------------- - -- Amend manpages for changes in current directory index behaviour - -- Note on using TIFFFlush() before TIFFClose() to check that the data has been - successfully written to the file. (fixes :issue:`506`) - -- Update TIFF documentation about TIFFOpenOptions.rst and - TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes - (relates to CVE-2024-7006) - -Tools changes -------------- - -Re-added tools: - - - fax2ps - - fax2tiff - - pal2rgb - - ppm2tiff - - raw2tiff - - rgb2ycbcr (not installed) - - thumbnail (not installed) - - tiff2bw - - tiff2rgba - - tiffcmp - - tiffcrop - - tiffdither - - tiffgt - - tiffmedian - - tiff2ps - - tiff2pdf - -New/improved functionality: - -- tiff2rgba: Add background gradient option for alpha compositing -- tiffcp: -i flag restored - -Bug fixes: - -- tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054 -- tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" -- tiffcrop: fix buffer overflows, use after free (fixes :issue:`542`, - :issue:`550`, :issue:`552`) -- tiff2pdf: address Coverity scan issues -- tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF -- tiff2pdf: fix issue with JPEG restart-interval marker when converting from - JPEG-compressed files (fixes :issue:`539`) -- tiff2pdf: red and blue were being swapped for RGBA decoding (fixes :issue:`253`) -- tiff2pdf: fixes :issue:`596` -- thumbnail: address Coverity scan issues -- tiffcp: Add check for limitMalloc return to fix Coverity 1603334 -- tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG -- tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs :issue:`571`) -- tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, - REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG -- tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`) -- Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. -- fax2ps and fax2tiff: memory leak fixes (fixes :issue:`476`) -- tiffmedian: memory leak fixes (fixes :issue:`599`) -- fax2tiff: fix EOFB interpretation (fixes :issue:`191`) -- fax2tiff: fix issue with unreasonable width input (fixes :issue:`249`) -- tiffcp and tiffcrop: fixes :issue:`228` -- tiff2rgba: fixes :issue:`469` -- tiffdither: fixes :issue:`473` -- tiffdump: fix wrong printf formatter in error message (Coverity 1472932) -- tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997) -- tifcp/tiffset: use correct format specifiers - -Changes to contributed and unsupported tools --------------------------------------------- - -- contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.1.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.1.rst.txt deleted file mode 100644 index 2214487..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/releases/v4.7.1.rst.txt +++ /dev/null @@ -1,273 +0,0 @@ -Changes in TIFF v4.7.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.7.1 (:tag:`v4.7.1`) - Previous Version :doc:`v4.7.0 ` - Primary Download Site ``_ - Home HTTP Site #1 ``_ - Home HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history. - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Define HAVE_JPEGTURBO_DUAL_MODE_8_12 and LERC_STATIC in tif_config.h. -* CMake: define WORDS_BIGENDIAN via tif_config.h -* doc/CMakeLists.txt: remove useless cmake_minimum_required() -* CMake: fix build with LLVM/Clang 17 (fixes :issue:`651`) -* CMake: set CMP0074 new policy -* Set LINKER_LANGUAGE for C targets with C deps -* Export tiffxx cmake target (fixes :issue:`674`) -* autogen.sh: Enable verbose wget. -* configure.ac: Syntax updates for Autoconf 2.71 -* autogen.sh: Re-implement based on autoreconf. Failure to update - config.guess/config.sub does not return error (fixes :issue:`672`) -* CMake: fix CMake 4.0 warning when minimum required version is < 3.10. -* CMake: Add build option tiff-static (fixes :issue:`709`) - -Library changes ---------------- - -New/improved functionalities: - -* Add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control about - emitting warnings for unknown tags. No longer emit warnings about unknown - tags by default - -* tif_predict.c: speed-up decompression in some cases. - -API/ABI breaks: - -* None - -Bug fixes: - -* tif_fax3: For fax group 3 data if no EOL is detected, reading is retried - without synchronisation for EOLs. (fixes :issue:`54`) - -* Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Improving handling when field_name = NULL. - (fixes :issue:`532`) - -* tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in - the DNG 1.7 specification - -* TIFFWriteDirectorySec: Increment string length for ASCII tags for codec tags - defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags. - (fixes :issue:`648`) - -* Do not error out on a tag whose tag count value is zero, just issue a warning. - Fix parsing a private tag 0x80a6 (fixes :issue:`647`) - -* TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24 - (Fixes https://github.com/OSGeo/gdal/issues/10875) - -* tif_getimage.c: Remove unnecessary calls to TIFFRGBAImageOK() - (fixes :issue:`175`) - -* Fix writing a Predictor=3 file with non-native endianness - -* _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds - read / nullptr dereference) in case of out-of-memory situation when dealing - with custom tags (fixes :issue:`663`) - -* tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal - 1 and PlanarConfiguration = Contiguous (fixes :issue:`26`) - -* tif_fax3.c: error out after a number of times end-of-line or unexpected bad - code words have been reached. (fixes :issue:`670`) - -* Fix memory leak in TIFFSetupStrips() (fixes :issue:`665`) - -* tif_zip.c: Provide zlib allocation functions. - Otherwise for zlib built with -DZ_SOLO inflating will fail. - -* Fix memory leak in _TIFFSetDefaultCompressionState. (fixes :issue:`676`) - -* tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if - "prediction" is enabled. Use extra working buffer in PredictorEncodeRow(). - (fixes :issue:`5`) - -* tif_getimage.c: update some integer overflow checks (fixes :issue:`79`) - -* tif_getimage.c: Fix buffer underflow crash for less raster rows at - TIFFReadRGBAImageOriented() (fixes :issue:`704`) - -* TIFFReadRGBAImage(): several fixes to avoid buffer overflows. - -* Correct passing arguments to TIFFCvtIEEEFloatToNative() and - TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. (fixes - :issue:`699`) - -* LZWDecode(): avoid nullptr dereference when trying to read again after EOI - marker has been found with remaining output bytes (fixes :issue:`698`) - -* TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return. - -* TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when - clearing tif_rawdata (fixes :issue:`711`) - -* JPEGEncodeRaw(): error out if a previous scanline failed to be written, to - avoid out-of-bounds access (fixes :issue:`714`) - -* tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for - 8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually - released as 3.0. (fixes :issue:`717`) - -* add assert for TIFFReadCustomDirectory infoarray check. - -Other changes: - -* tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value - -* tif_lzw.c / tif_packbits.c: use NULL instead of 0. - -* Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY - macros to disable compiling write-support for those codecs. - -* tif_lerc.c: add missing casts - -* Merge several functions implemented twice in different modules. - (see :issue:`154`) - -* Remove get_field_type form TIFFField structure because it is not used - anymore and rename other parameter to set_get_field_type - -* Silence some Coverity Scan warnigs and mark already dismissed ones. - -* References to codec libraries updated and missing codec compile defines - (tiffconf.h) added. - -* Move mkg3states under libtiff/tools. (fixes :issue:`708`) - -* tiff_itrunc(): don't use rand() to please Coverity Scan. - -* tiffio.h: fix compilation with LOGLUV_PUBLIC=0 - -* LICENSE.md: Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) - (fixes :issue:`431`) - -Documentation -------------- - -* TIFFRGBAImage.rst note added for incorrect saving of images with TIFF - orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster. - -* TIFFRGBAImage.rst note added about un-associated alpha handling - (fixes :issue:`67`) - -* Update "Defining New TIFF Tags" description. (fixes :issue:`642`) - -* Fix return type of TIFFReadEncodedTile() - -* Update the documentation to reflect deprecated typedefs. - -* TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for - image data and not for IFD data. - -* Update documentation on re-entrancy and thread safety. - -* Remove dead links to no more existing Awaresystems web-site. - -* Updating BigTIFF specification and some miscelaneous editions. - -* Replace some last links and remove last todos. - -* Added hints for correct allocation of TIFFYCbCrtoRGB structure and its - associated buffers. (fixes :issue:`681`) - -* Added chapter to "Using the TIFF Library" with links to handling multi-page - TIFF and custom directories. (fixes :issue:`43`) - -* update TIFFOpen.rst with the return values of mapproc and unmapproc. - (fixes :issue:`12`) - -Tools changes -------------- - -New/improved functionality: - -* tiffinfo: add a -W switch to warn about unknown tags. - -* tiffdither: process all pages in input TIFF file. - -Bug fixes: - -* ppm2tiff: Fix bug in `pack_words` trailing bytes, where last two bytes of - each line were written wrongly. (fixes :issue:`467`) - -* fax2ps: fix regression of commit 28c38d648b64a66c3218778c4745225fe3e3a06d - where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer - (fixes :issue:`649`) - -* tiff2pdf: Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH (fixes :issue:`650`) - -* tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by - zero. (fixes :issue:`654`) - -* tiff2pdf: avoid null pointer dereference. (fixes :issue:`741`) - -* Improve non-secure integer overflow check (comparison of division result - with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. (fixes :issue:`546`) - -* tiff2rgba: fix some "a partial expression can generate an overflow before it - is assigned to a broader type" warnings. (fixes :issue:`682`) - -* tiffdither/tiffmedian: Don't skip the first line of the input image. - (fixes :issue:`703`) - -* tiffdither: avoid out-of-bounds read identified in :issue:`733` - -* tiffmedian: error out if TIFFReadScanline() fails (fixes :issue:`707`) - -* tiffmedian: close input file. (fixes :issue:`735`) - -* thumbail: avoid potential out of bounds access (fixes :issue:`715`) - -* tiffcrop: close open TIFF files and release allocated buffers before exiting - in case of error to avoid memory leaks. (fixes :issue:`716`) - -* tiffcrop: fix double-free and memory leak exposed by :issue:`721` - -* tiffcrop: avoid buffer overflow. (fixes :issue:`740`) - -* tiffcrop: avoid nullptr dereference. (fixes :issue:`734`) - -* tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression - \*datamem to PrintData, which uses it as a divisor or modulus. - -* tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and - TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference. - (fixes :issue:`718`) - -* tiffcmp: fix memory leak when second file cannot be opened. - (fixes :issue:`718` and :issue:`729`) - -* tiffcp: fix setting compression level for lossless codecs. - (fixes :issue:`730`) - -* raw2tiff: close input file before exit (fixes :issue:`742`) - -Changes to contributed and unsupported tools --------------------------------------------- - -* addtiffo: Fixing MSVC compiler warnings - -* Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc. - -* oss-fuzz: fix memory leak in fuzz target. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/index.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/index.rst.txt deleted file mode 100644 index 58e890a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/index.rst.txt +++ /dev/null @@ -1,14 +0,0 @@ -.. _rfcs: - -Request For Comments (RFCs) -=========================== - -RFCs are the process through which major changes in the working or content -of the libtiff project are conducted. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - rfc1_psc - rfc2_restoring_needed_tools diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc1_psc.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc1_psc.rst.txt deleted file mode 100644 index b7aef7f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc1_psc.rst.txt +++ /dev/null @@ -1,107 +0,0 @@ -.. _rfc1_psc: - -============================================ -RFC 1: Project Steering Committee Guidelines -============================================ - -Author: Even Rouault - -Contact: even.rouault at spatials.com - -Status: Adopted - -Summary -------- - -This document describes how the libtiff Project Steering Committee -determines membership, and makes decisions on libtiff project issues. - -In brief, the committee votes on proposals on the libtiff mailing list. -Proposals are available for review for at least 5 business days, and a single -veto is sufficient to delay progress though ultimately a majority of members can -pass a proposal. - -Detailed Process ----------------- - -1. Proposals are written up and submitted on the libtiff mailing list - for discussion and voting, by any interested party, not just - committee members. -2. Proposals need to be available for review for at least 5 business - days before a final decision can be made. -3. Respondents may vote "+1" to indicate support for the proposal and a - willingness to support implementation. -4. Respondents may vote "-1" to veto a proposal, but must provide clear - reasoning and alternate approaches to resolving the problem within - the voting delay. -5. A vote of -0 indicates mild disagreement, but has no effect. A 0 - indicates no opinion. A +0 indicate mild support, but has no effect. -6. Anyone may comment on proposals on the list, but only members of the - Project Steering Committee's votes will be counted. -7. A proposal will be accepted if it receives at least +2 (including the - proposer) and no vetos (-1). -8. If a proposal is vetoed, and it cannot be revised to satisfy all - parties, then it can be resubmitted for an override vote in which a - majority of all eligible voters indicating +1 is sufficient to pass - it. Note that this is a majority of all committee members, not just - those who actively vote. -9. Upon completion of discussion and voting the proposer should - announce whether they are proceeding (proposal accepted) or are - withdrawing their proposal (vetoed). -10. The Chair gets a vote. -11. The Chair is responsible for keeping track of who is a member of the - Project Steering Committee. -12. Addition and removal of members from the committee, as well as - selection of a Chair should be handled as a proposal to the - committee. -13. The Chair adjudicates in cases of disputes about voting. - -When is Vote Required? ----------------------- - -- Anything that could cause backward compatibility issues. -- Adding, removing or modifying substantial amounts of code. -- Changing inter-subsystem APIs. -- Issues of procedure. -- When releases should take place. -- Anything that might be controversial - -Observations ------------- - -- The Chair is the ultimate adjudicator if things break down. -- The absolute majority rule can be used to override an obstructionist - veto, but it is intended that in normal circumstances vetoers need to - be convinced to withdraw their veto. We are trying to reach - consensus. -- It is strongly recommended that proposals subject to a vote be discussed - first on the mailing list to build consensus before proceeding to the vote. - -Bootstrapping -------------- - -The initial members of the Project Steering Committee are: - -- Bob Friesenhahn (@bobfriesenhahn) -- Su Laus (@Su_Laus) -- Roger Leigh (@rleigh) -- Timothy Lyanguzov (@theta682) -- Olivier Paquet (@1-Olivier) -- Leonard Rosenthol (@lrosenthol) -- Even Rouault (@rouault) - -Even Rouault is declared initial Chair of the Project Steering Committee. - -The current membership list can be found on the :ref:`psc` page. - -Credits -------- - -This document is a direct adaptation from -`GDAL Project Management Committee Guidelines `__, -authored by Frank Warmerdam. - -Voting history --------------- - -Adopted by +1 vote from all above mentioned initial members of the PSC. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc2_restoring_needed_tools.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc2_restoring_needed_tools.rst.txt deleted file mode 100644 index 432d568..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/rfcs/rfc2_restoring_needed_tools.rst.txt +++ /dev/null @@ -1,60 +0,0 @@ -.. _rfc2_restoring_needed_tools: - -===================================== -RFC 2: Restoring Needed LibTIFF Tools -===================================== - -Author: Su Laus - -Contact: (@Su_Laus) - -Status: Approved - -Summary -------- - -The purpose of this RFC is to clarify if and which tools that were moved -to the archive in libtiff 4.6.0 should be reactivated. - -Prehistory ----------- - -The tools in libtiff caused many vulnerabilities -and CVEs that were attributed to the libtiff library itself. -Trying to fix the security holes in the tools turned out to be a -Sisyphean task (can never be done). -Therefore, most of the tools in libtiff 4.6.0 were moved to the archive -and the existing problems were closed with "wontfix-unmaintained". - -It was later understood that some users depend on some of these archived tools. - -Some problems with the tools have now been fixed -(see e.g. https://gitlab.com/libtiff/libtiff/-/merge_requests/569). - -Proposed procedure ------------------- - -* All tools as of libtiff 4.5.1 shall be restored. -* Bugfixes in MR !569 are applied in single merge requests for traceability - and selectively as some changes might not be applicable. -* Remove “wontfix-unmaintained” from closed issues, when fixed. -* All issues related to utilities / tools shall get label “utility”. -* The documentation and other references shall point to - https://libtiff.gitlab.io/libtiff/. -* After an initial merge has been applied for restoring the tools, - the http://www.libtiff.org page shall be reset as a mirror of - https://libtiff.gitlab.io/libtiff/. -* Finally release as 4.7.0 when all known issues of the tools are closed. - -References to previous contributions to the discussion ------------------------------------------------------- -https://gitlab.com/libtiff/libtiff/-/issues/580 and related merge request, -https://gitlab.com/libtiff/libtiff/-/merge_requests/569, -and discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/581 - -Voting history --------------- - -+1 from PSC members @bobfriesenhahn, @1-Olivier, @Su_Laus - -+0 from PSC members @theta682 and @rouault diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/specification/bigtiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/specification/bigtiff.rst.txt deleted file mode 100644 index a8a24f8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/specification/bigtiff.rst.txt +++ /dev/null @@ -1,236 +0,0 @@ -BigTIFF Design -============== - -The classic TIFF file format uses 32bit offsets and, as such, is limited to 4 gigabytes. -The **BigTIFF** design details a 64-bit (larger than 4GB) TIFF format specification. -The design is based on a proposal by Steve Carlsen of Adobe, with input -from various other parties. - -Overview of BigTIFF Extension ------------------------------ - -* The Version ID, in header bytes 2-3, formerly decimal 42, changes to **43** for BigTIFF. -* Header bytes 4-5 contain the decimal number **8**. - - * If there is some other number here, a reader should give up. - * This is to provide a nice way to move to 16-byte pointers some day. - -* Header bytes 6-7 are reserved and must be **zero**. - - * If they're not, a reader should give up. - -* Header bytes 8-15 contain the 8-byte offset to the first IFD. -* Value/Offset fields are 8 bytes long, and take up bytes 8-15 in an IFD entry. - - * If the value is ≤ 8 bytes, it must be stored in the field. - * All values must begin at an 8-byte-aligned address. - -* 8-byte offset to the Next_IFD, at the end of an IFD. -* To keep IFD entries 8-byte-aligned, we begin with an 8-byte - (instead of 2-byte) count of the number of directory entries. -* Add ``TIFFDataTypes`` of ``TIFF_LONG8`` (= 16), an 8-byte unsigned int, - and ``TIFF_SLONG8`` (= 17), an 8-byte signed int. -* Add ``TIFFDataType`` ``TIFF_IFD8`` (=18) an 8-byte IFD offset. -* ``StripOffsets`` and ``TileOffsets`` and ``ByteCounts`` may be ``TIFF_LONG8`` - or the traditionally allowed ``TIFF_LONG`` or ``TIFF_SHORT``. - -* The proposed extension is :file:`.tf8` or :file:`.btf`, and call it "BigTIFF". - -Otherwise, it's just like "original TIFF" or "classic TIFF". - -BigTIFF Structures compared to Classic TIFF -------------------------------------------- - -TIFF and BigTIFF File Header -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Here's the classic TIFF file header ... - -.. list-table:: Classic File Header - :widths: auto - :header-rows: 1 - :align: left - :width: 90% - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Byte order indication - * - 2 - - UInt16 - - Version number (always 42) - * - 4 - - UInt32 - - Offset to first IFD - -And this is the **BigTIFF** file header ... - -.. list-table:: BigTIFF File Header - :widths: auto - :header-rows: 1 - :align: left - :width: 90% - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Byte order indication - * - 2 - - UInt16 - - Version number, always **43** for BigTIFF - * - 4 - - UInt16 - - | Bytesize of offsets. - | Always 8 in BigTIFF, it provides a nice way to move to 16-byte pointers some day. - | If there is some other value here, a reader should give up. - * - 6 - - UInt16 - - | Reserved, always 0. - | If there is some other value here, a reader should give up. - * - 8 - - UInt64 - - Offset to first IFD - -The last members in both variants of the structure point to the first IFD -(Image File Directory). -This IFD can be located anywhere in the file. Every 'page' in a multi-page TIFF, -classic TIFF or BigTIFF, is represented by exactly one IFD. - -TIFF and BigTIFF Image File Directory Structure -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Here's a more detailed view of the classic IFD ... - -.. list-table:: Classic IFD - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Number of tags in IFD - * - 2 + x * 12 - - Tag structure - - Tag data - * - 2 + (Number of tags in IFD) * 12 - - UInt32 - - | Offset to next IFD, if there is a next IFD, - | 0 otherwise. - -And this is how the IFD looks like in the **BigTIFF** file format ... - -.. list-table:: BigTIFF IFD - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt64 - - Number of tags in IFD - * - 8 + x * 20 - - Tag structure - - Tag data - * - 8 + (Number of tags in IFD) * 20 - - UInt64 - - | Offset to next IFD, if there is a next IFD, - | 0 otherwise. - -TIFF and BigTIFF Tag Structure -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The tags in this IFD should be sorted by code, in both classic TIFF and BigTIFF. -Every tag takes up exactly 12 bytes in classic TIFF, and looks like this ... - -.. list-table:: Classic Tag Structure - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Tag identifying code - * - 2 - - UInt16 - - Datatype of tag data - * - 4 - - UInt32 - - Number of values - * - 8 - - | x * tag data datatype - | or UInt32 offset - - | Tag data - | or offset to tag data - -This same tag structure, in **BigTIFF**, takes up 20 bytes, and looks like this ... - -.. list-table:: BigTIFF Tag Structure - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Tag identifying code - * - 2 - - UInt16 - - Datatype of tag data - * - 4 - - UInt64 - - Number of values - * - 12 - - | x * tag data datatype - | or UInt64 offset - - | Tag data - | or offset to tag data - -The same rule for 'inlining' the tag data applies to both classic TIFF and BigTIFF, -only the threshold size differs. -In classic TIFF, the tag data was written inside the tag structure, in the IFD, -if its size was smaller than or equal to 4 bytes. Otherwise, it's written elsewhere, -and pointed to. -In BigTIFF, the tag data is written inside the tag structure, in the IFD, -if its size is smaller than or equal to 8 bytes. - -Other miscellaneous details ---------------------------- - -Amongst the suggested file extensions are 'tif', 'tf8' and 'btf'. - -Three datatypes are added to classic TIFF: - -- ``TIFF_LONG8`` = 16, being unsigned 8-byte (64-bit) integer -- ``TIFF_SLONG8`` = 17, being signed 8-byte (64-bit) integer -- ``TIFF_IFD8`` = 18, being a new unsigned 8-byte (64-bit) IFD offset. - -The ``StripOffsets``, ``StripByteCounts``, ``TileOffsets``, and ``TileByteCounts`` tags are allowed -to have the datatype ``TIFF_LONG8`` in BigTIFF. Old datatypes ``TIFF_LONG``, and ``TIFF_SHORT`` -where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too. - -Likewise, tags that point to other IFDs, like e.g. the SubIFDs tag, are now allowed -to have the datatype ``TIFF_IFD8`` in BigTIFF. Again, the old datatypes TIFF_IFD, -and the hardly recommendable ``TIFF_LONG``, are still valid, too. - -Samples -------- -BigTIFF sample file BigTIFFSamples.zip contains a series of 8 different BigTIFF files. -Especially note the BigTIFFSamples.html file in this zip, documenting their characteristics. - -That sample file from Joris Van Damme can still be found at the Wayback Machine: -`BigTIFF Example files `_ - diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage-bigtiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage-bigtiff.rst.txt deleted file mode 100644 index ecd4eb5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage-bigtiff.rst.txt +++ /dev/null @@ -1,59 +0,0 @@ -LibTIFF Coverage of the BigTIFF Specification -============================================= - -Since LibTIFF version 4.0.0, the BigTIFF format specification has been implemented within LibTIFF. -BigTIFF is a backward-compatible extension to the TIFF file format. - -BigTIFF logically extends the original TIFF file format (referred to as 'ClassicTIFF' from now on). -The BigTIFF specification is the result of work by a variety of parties on the LibTIFF mailing list, including -the then current LibTIFF maintainers, Joris Van Damme and Adobe staff. The BigTIFF specification has not yet -been officially approved by the TIFF specification owner (Adobe), but implementation within LibTIFF -could accelerate that process. For more information on the BigTIFF file format, for example see :doc:`bigtiff`. -Another overview and some further links can be found at -``_. - -BigTIFF is especially useful for people and vendors that are confronted with very large images, and -still seek to use an open, simple, and extendable format. This requirement is frequently encountered in the -geospatial field, but also concerns large format scanners, medical imaging and other fields. - -The LibTiff BigTIFF support was made possible by four sponsors funding the project. The programming work was -primarily done by Joris Van Damme (AWare Systems) from 2004 to 2008. - -The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order: - -.. list-table:: Sponsors - :widths: 5 20 - :header-rows: 0 - - * - .. image:: bigtiffpr_images/esri.png - :width: 100% - :alt: ESRI - - `ESRI `_ has been giving customers around the world the power to - think and plan geographically since 1969. As the leader in GIS, ESRI applies innovative technologies to help - organizations create, analyze, and visualize information for more informed decisions. Running on more than - a million desktops and thousands of servers, ESRI applications are the foundation of the world's mapping and - spatial analysis infrastructure. - * - .. image:: bigtiffpr_images/leica.png - :width: 100% - :alt: Leica Geosystems Geospatial Imaging - - 'Leica Geosystems Geospatial Imaging' offers a - range of workflow solutions for photogrammetry, mapping, remote sensing, catalog management and exploitation - of geospatial imagery. Enterprise organizations use this imagery as the basis for generating information for - both education and decision making processes. Those who use Leica Geosystems products every day trust them - for their precision, seamless integration, interoperability and superior customer support. - * - .. image:: bigtiffpr_images/safe.png - :width: 100% - :alt: Safe Software - - `Safe Software `_ is the maker of FME, a powerful spatial ETL (Extract, - Transform and Load) tool that enables true data interoperability. FME manages the translation, - transformation, integration and web-based distribution of geospatial data in 200 GIS, CAD, raster and - database formats. Safe Software's FME technology is also embedded in numerous market-leading GIS and - ETL applications. - * - .. image:: bigtiffpr_images/weogeo.png - :width: 100% - :alt: WeoGeo - - 'WeoGeo' is a web-based data management resource for the geospatial - industry that allows the free market exchange of mapping related imagery products, featuring an innovative - solution that efficiently manages digital mapping files of any size. With an intuitive user interface - and the scalable power of Amazon Web Services (AWS), geospatial professionals can view, sort, search, - and share complex, high volume maps quickly and effectively. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage.rst.txt deleted file mode 100644 index 524f78d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/specification/coverage.rst.txt +++ /dev/null @@ -1,1693 +0,0 @@ -LibTIFF Coverage of the TIFF 6.0 Specification -============================================== - -The library is capable of dealing with images that are written to -follow the 5.0 or 6.0 TIFF spec. There is also considerable support -for some of the more esoteric portions of the 6.0 TIFF spec. - -Baseline --------- - -.. list-table:: Core requirements - :widths: 5 20 - :header-rows: 0 - - * - Core requirements - - Both ``MM`` and ``II`` byte orders are handled. - Both packed and separated planar configuration of samples. - Any number of samples per pixel (memory permitting). - Any image width and height (memory permitting). - Multiple subfiles can be read and written. - Editing is **not** supported in that related subfiles (e.g. - a reduced resolution version of an image) are not automatically - updated. - - Tags handled: ``ExtraSamples``, ``ImageWidth``, - ``ImageLength``, ``NewSubfileType``, ``ResolutionUnit``. - ``Rowsperstrip``, ``StripOffsets``, ``StripByteCounts``, - ``XResolution``, ``YResolution`` - - * - Tiled Images - - ``TileWidth``, ``TileLength``, ``TileOffsets``, - ``TileByteCounts`` - - * - Image Colorimetry Information - - ``WhitePoint``, ``PrimaryChromaticities``, ``TransferFunction``, - ``ReferenceBlackWhite`` - - * - Class B for bilevel images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 1 - - ``Compression`` = 1 (none), 2 (CCITT 1D), or 32773 (PackBits) - - ``PhotometricInterpretation`` = 0 (Min-is-White), 1 (Min-is-Black) - - * - Class G for grayscale images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 4, 8 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 0 (Min-is-White), 1 (Min-is-Black) - - * - Class P for palette color images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 1-8 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 3 (Palette RGB) - - ``ColorMap`` - - * - Class R for RGB full color images - - ``SamplesPerPixel`` = 3 - - ``BitsPerSample`` = <8,8,8> - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 2 (RGB) - - * - Class F for facsimile - - (*Class B tags plus...*) - - ``Compression`` = 3 (CCITT Group 3), 4 (CCITT Group 4) - - ``FillOrder`` = 1 (MSB), 2 (LSB) - - ``Group3Options`` = 1 (2d encoding), 4 (zero fill), 5 (2d+fill) - - ``ImageWidth`` = 1728, 2048, 2482 - - ``NewSubFileType`` = 2 - - ``ResolutionUnit`` = 2 (Inch), 3 (Centimeter) - - ``PageNumber``, - ``XResolution``, - ``YResolution``, - ``Software``, - ``BadFaxLines``, - ``CleanFaxData``, - ``ConsecutiveBadFaxLines``, - ``DateTime``, - ``DocumentName``, - ``ImageDescription``, - ``Orientation`` - - * - Class S for separated images - - ``SamplesPerPixel`` = 4 - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none), 5 (LZW) - - ``PhotometricInterpretation`` = 5 (Separated) - - ``InkSet`` = 1 (CMYK) - - ``DotRange``, - ``InkNames``, - ``DotRange``, - ``TargetPrinter`` - - * - Class Y for YCbCr images - - ``SamplesPerPixel`` = 3 - - ``BitsPerSample`` = <8,8,8> - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none), 5 (LZW), 7 (JPEG) - - ``PhotometricInterpretation`` = 6 (YCbCr) - - ``YCbCrCoefficients``, - ``YCbCrSubsampling``, - ``YCbCrPositioning`` - - (*colorimetry info from Appendix H; see above*) - - * - Class "JPEG" for JPEG images (per TTN2) - - ``PhotometricInterpretation`` = 1 (grayscale), 2 (RGB), 5 (CMYK), 6 (YCbCr) - - (*Class Y tags if YCbCr*) - - (*Class S tags if CMYK*) - - ``Compression`` = 7 (JPEG) - -In addition, the library supports some optional compression algorithms -that are, in some cases, of dubious value. - -.. list-table:: Compression algorithms - :widths: 5 20 - :header-rows: 1 - - * - Compression tag value - - Compression algorithm - * - 32766 - - NeXT 2-bit encoding - * - 32809 - - ThunderScan 4-bit encoding - * - 32909 - - Pixar companded 11-bit ZIP encoding - * - 32946 - - PKZIP-style Deflate encoding (experimental) - * - 34676 - - SGI 32-bit Log Luminance encoding (experimental) - * - 34677 - - SGI 24-bit Log Luminance encoding (experimental) - -Note that there is no support for the JPEG-related tags defined -in the 6.0 specification; the JPEG support is based on the post-6.0 -proposal given in TIFF Technical Note #2. - -.. note:: - - For more information on the experimental Log Luminance encoding - consult the materials available at - http://www.anyhere.com/gward/pixformat/tiffluv.html. - -The following table shows the tags that are recognized -and how they are used by the library. If no use is indicated, -then the library reads and writes the tag, but does not use it internally. - -Apart of the TIFF 6.0 specification the meaning of tags can be found on various places -in the internet. For example: -https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml - -:file:`libtiff` supports also many private tags allocated for organizations that wish to -store additional information in a TIFF file. -Tags for TIFF/EP and for Digital Negative (DNG) Specification 1.1.0 -are included. - -Note that some tags are meaningful only when a particular -compression scheme is being used; e.g. ``Group3Options`` -is only useful if ``Compression`` -is set to CCITT Group 3 encoding. -Tags of this sort are considered *codec-specific* -tags and the library does not recognize them except when the -``Compression`` -tag has been previously set to the relevant compression scheme. - -Tags Recognized by LibTIFF --------------------------- - -.. list-table:: Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``SubfileType`` - - 254 - - R/W - - none (also known as ``NewSubfileType``) - - * - ``OldSubfileType`` - - 255 - - R/W - - parsed but ignored (also known as ``SubFileType``) - - * - ``ImageWidth`` - - 256 - - R/W - - lots - - * - ``ImageLength`` - - 257 - - R/W - - lots - - * - ``BitsPerSample`` - - 258 - - R/W - - lots - - * - ``Compression`` - - 259 - - R/W - - to select appropriate codec - - * - ``PhotometricInterpretation`` - - 262 - - R/W - - lots - - * - ``Thresholding`` - - 263 - - R/W - - (tag in tif.h wrongly written as "Threshholding") - - * - ``CellWidth`` - - 264 - - R/W - - - - * - ``CellLength`` - - 265 - - R/W - - - - * - ``FillOrder`` - - 266 - - R/W - - control bit order - - * - ``DocumentName`` - - 269 - - R/W - - - - * - ``ImageDescription`` - - 270 - - R/W - - - - * - ``Make`` - - 271 - - R/W - - - - * - ``Model`` - - 272 - - R/W - - - - * - ``StripOffsets`` - - 273 - - R/W - - data i/o - - * - ``Orientation`` - - 274 - - R/W - - - - * - ``SamplesPerPixel`` - - 277 - - R/W - - lots - - * - ``RowsPerStrip`` - - 278 - - R/W - - data i/o - - * - ``StripByteCounts`` - - 279 - - R/W - - data i/o - - * - ``MinSampleValue`` - - 280 - - R/W - - - - * - ``MaxSampleValue`` - - 281 - - R/W - - - - * - ``XResolution`` - - 282 - - R/W - - - - * - ``YResolution`` - - 283 - - R/W - - used by Group 3 2d encoder - - * - ``PlanarConfiguration`` - - 284 - - R/W - - data i/o - - * - ``PageName`` - - 285 - - R/W - - - - * - ``XPosition`` - - 286 - - R/W - - - - * - ``YPosition`` - - 287 - - R/W - - - - * - ``FreeOffsets`` - - 288 - - R/W - - parsed but ignored - - * - ``FreeByteCounts`` - - 289 - - R/W - - parsed but ignored - - * - ``GrayResponseUnit`` - - 290 - - R/W - - parsed but ignored - - * - ``GrayResponseCurve`` - - 291 - - R/W - - parsed but ignored - - * - ``ResolutionUnit`` - - 296 - - R/W - - used by Group 3 2d encoder - - * - ``PageNumber`` - - 297 - - R/W - - - - * - ``ColorResponseUnit`` - - 300 - - R/W - - parsed but ignored - - * - ``TransferFunction`` - - 301 - - R/W - - - - * - ``Software`` - - 305 - - R/W - - - - * - ``DateTime`` - - 306 - - R/W - - - - * - ``Artist`` - - 315 - - R/W - - - - * - ``HostComputer`` - - 316 - - R/W - - - - * - ``WhitePoint`` - - 318 - - R/W - - - - * - ``PrimaryChromaticities`` - - 319 - - R/W - - - - * - ``ColorMap`` - - 320 - - R/W - - - - * - ``HalftoneHints`` - - 321 - - R/W - - - - * - ``TileWidth`` - - 322 - - R/W - - data i/o - - * - ``TileLength`` - - 323 - - R/W - - data i/o - - * - ``TileOffsets`` - - 324 - - R/W - - data i/o - - * - ``TileByteCounts`` - - 325 - - R/W - - data i/o - - * - ``SubIFD`` - - 330 - - R/W - - subimage descriptor support - - * - ``InkSet`` - - 332 - - R/W - - - - * - ``InkNames`` - - 333 - - R/W - - - - * - ``NumberOfInks`` - - 334 - - R/W - - - - * - ``DotRange`` - - 336 - - R/W - - - - * - ``TargetPrinter`` - - 337 - - R/W - - - - * - ``ExtraSamples`` - - 338 - - R/W - - lots - - * - ``SampleFormat`` - - 339 - - R/W - - - - * - ``SMinSampleValue`` - - 340 - - R/W - - - - * - ``SMaxSampleValue`` - - 341 - - R/W - - - - * - ``ClipPath`` - - 343 - - R/W - - - - * - ``XClipPathUnits`` - - 344 - - R/W - - - - * - ``YClipPathUnits`` - - 345 - - R/W - - - - * - ``YCbCrCoefficients`` - - 529 - - R/W - - used by ``TIFFReadRGBAImage`` support - - * - ``YCbCrSubsampling`` - - 530 - - R/W - - tile / strip size calculations - - * - ``YCbCrPositioning`` - - 531 - - R/W - - - - * - ``ReferenceBlackWhite`` - - 532 - - R/W - - - - * - ``XMLPacket`` - - 700 - - R/W - - - - * - ``Matteing`` - - 32995 - - R - - none (obsoleted by ``ExtraSamples`` tag) - - * - ``DataType`` - - 32996 - - R - - none (obsoleted by ``SampleFormat`` tag) - - * - ``ImageDepth`` - - 32997 - - R/W - - tile / strip size calculations - - * - ``TileDepth`` - - 32998 - - R/W - - tile / strip size calculations - - * - ``ImageFullWidth`` - - 33300 - - R/W - - - - * - ``ImageFullLength`` - - 33301 - - R/W - - - - * - ``TextureFormat`` - - 33302 - - R/W - - - - * - ``TextureWrapModes`` - - 33303 - - R/W - - - - * - ``FieldOfViewCotangent`` - - 33304 - - R/W - - - - * - ``MatrixWorldToScreen`` - - 33305 - - R/W - - - - * - ``MatrixWorldToCamera`` - - 33306 - - R/W - - - - * - ``Copyright`` - - 33432 - - R/W - - - - * - ``RichTIFFIPTC`` - - 33723 - - R/W - - (also known as TIFF/EP IPTC/NAA; - :file:`libtiff` type is UNDEFINED or BYTE, - but often times incorrectly specified as LONG, - because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII) - - * - ``Photoshop`` - - 34377 - - R/W - - - - * - ``EXIFIFDOffset`` - - 34665 - - R/W - - - - * - ``ICC Profile`` - - 34675 - - R/W - - - - * - ``GPSIFDOffset`` - - 34853 - - R/W - - - - * - ``FaxRecvParams`` - - 34908 - - R/W - - - - * - ``FaxSubAddress`` - - 34909 - - R/W - - - - * - ``FaxRecvTime`` - - 34910 - - R/W - - - - * - ``FaxDcs`` - - 34911 - - R/W - - - - * - ``StoNits`` - - 37439 - - R/W - - - - * - ``Adobe Photoshop Document Data Block`` - - 37724 - - R/W - - - - * - ``InteroperabilityIFDOffset`` - - 40965 - - R/W - - - - * - ``DNGVersion`` - - 50706 - - R/W - - DNG 1.0 tags - - * - ``DNGBackwardVersion`` - - 50707 - - R/W - - - - * - ``UniqueCameraModel`` - - 50708 - - R/W - - - - * - ``LocalizedCameraModel`` - - 50709 - - R/W - - - - * - ``CFAPlaneColor`` - - 50710 - - R/W - - - - * - ``CFALayout`` - - 50711 - - R/W - - - - * - ``LinearizationTable`` - - 50712 - - R/W - - - - * - ``BlackLevelRepeatDim`` - - 50713 - - R/W - - - - * - ``BlackLevel`` - - 50714 - - R/W - - - - * - ``BlackLevelDeltaH`` - - 50715 - - R/W - - - - * - ``BlackLevelDeltaV`` - - 50716 - - R/W - - - - * - ``WhiteLevel`` - - 50717 - - R/W - - - - * - ``DefaultScale`` - - 50718 - - R/W - - - - * - ``DefaultCropOrigin`` - - 50719 - - R/W - - - - * - ``DefaultCropSize`` - - 50720 - - R/W - - - - * - ``ColorMatrix1`` - - 50721 - - R/W - - - - * - ``ColorMatrix2`` - - 50722 - - R/W - - - - * - ``CameraCalibration1`` - - 50723 - - R/W - - - - * - ``CameraCalibration2`` - - 50724 - - R/W - - - - * - ``ReductionMatrix1`` - - 50725 - - R/W - - - - * - ``ReductionMatrix2`` - - 50726 - - R/W - - - - * - ``AnalogBalance`` - - 50727 - - R/W - - - - * - ``AsShotNeutral`` - - 50728 - - R/W - - - - * - ``AsShotWhiteXY`` - - 50729 - - R/W - - - - * - ``BaselineExposure`` - - 50730 - - R/W - - - - * - ``BaselineNoise`` - - 50731 - - R/W - - - - * - ``BaselineSharpness`` - - 50732 - - R/W - - - - * - ``BayerGreenSplit`` - - 50733 - - R/W - - - - * - ``LinearResponseLimit`` - - 50734 - - R/W - - - - * - ``CameraSerialNumber`` - - 50735 - - R/W - - - - * - ``LensInfo`` - - 50736 - - R/W - - - - * - ``ChromaBlurRadius`` - - 50737 - - R/W - - - - * - ``AntiAliasStrength`` - - 50738 - - R/W - - - - * - ``ShadowScale`` - - 50739 - - R/W - - - - * - ``DNGPrivateData`` - - 50740 - - R/W - - - - * - ``MakerNoteSafety`` - - 50741 - - R/W - - - - * - ``CalibrationIlluminant1`` - - 50778 - - R/W - - - - * - ``CalibrationIlluminant2`` - - 50779 - - R/W - - - - * - ``BestQualityScale`` - - 50780 - - R/W - - - - * - ``RawDataUniqueID`` - - 50781 - - R/W - - - - * - ``OriginalRawFileName`` - - 50827 - - R/W - - - - * - ``OriginalRawFileData`` - - 50828 - - R/W - - - - * - ``ActiveArea`` - - 50829 - - R/W - - - - * - ``MaskedAreas`` - - 50830 - - R/W - - - - * - ``AsShotICCProfile`` - - 50831 - - R/W - - - - * - ``AsShotPreProfileMatrix`` - - 50832 - - R/W - - - - * - ``CurrentICCProfile`` - - 50833 - - R/W - - - - * - ``CurrentPreProfileMatrix`` - - 50834 - - R/W - - - - * - ``PerSample`` - - 65563 - - R/W - - (only internal pseudo tag) - - * - ``Indexed`` - - 346 - - R/W - - TIFF/FX tags - - * - ``GlobalParametersIFD`` - - 400 - - R/W - - - - * - ``ProfileType`` - - 401 - - R/W - - - - * - ``FaxProfile`` - - 402 - - R/W - - - - * - ``CodingMethods`` - - 403 - - R/W - - - - * - ``VersionYear`` - - 404 - - R/W - - - - * - ``ModeNumber`` - - 405 - - R/W - - - - * - ``Decode`` - - 433 - - R/W - - - - * - ``ImageBaseColor`` - - 434 - - R/W - - - - * - ``T82Options`` - - 435 - - R/W - - - - * - ``StripRowCounts`` - - 559 - - R/W - - part of RFC 2301 for fax - - * - ``ImageLayer`` - - 34732 - - R/W - - - -The ``Matteing`` and ``DataType`` -tags have been obsoleted by the 6.0 -``ExtraSamples`` and ``SampleFormat`` tags. -Consult the documentation on the -``ExtraSamples`` tag and Associated Alpha for elaboration. Note however -that if you use Associated Alpha, you are expected to save data that is -pre-multipled by Alpha. If this means nothing to you, check out -Porter & Duff's paper in the '84 SIGGRAPH proceedings: "Compositing Digital -Images". - -Tag ``RichTIFFIPTC`` (33723) is defined wrongly in TIFF/EP definition as "LONG or ASCII". -``libtiff`` defines it as "UNDEFINED or BYTE". - -The ``ImageDepth`` -tag is a non-standard, but registered tag that specifies -the Z-dimension of volumetric data. The combination of ``ImageWidth``, -``ImageLength``, and ``ImageDepth``, -defines a 3D volume of pixels that are -further specified by ``BitsPerSample`` and -``SamplesPerPixel``. The ``TileDepth`` -tag (also non-standard, but registered) can be used to specified a -subvolume "tiling" of a volume of data. - -The Colorimetry, and CMYK tags are additions that appear in TIFF 6.0. -Consult the TIFF 6.0 specification and :doc:`index`. - -Codecs / Compression --------------------- - -The following tags are used by codecs. - -.. list-table:: Codec / Compression Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``Predictor`` - - 317 - - R/W - - LZW codec - - * - ``JPEGTables`` - - 347 - - R/W - - JPEG - - * - ``JpegInterchangeFormat`` - - 513 - - R/W - - OJPEG - - * - ``JpegInterchangeFormatLength`` - - 514 - - R/W - - OJPEG - - * - ``JpegQTables`` - - 519 - - R/W - - OJPEG - - * - ``JpegDcTables`` - - 520 - - R/W - - OJPEG - - * - ``JpegAcTables`` - - 521 - - R/W - - OJPEG - - * - ``JpegProc`` - - 512 - - R/W - - OJPEG - - * - ``JpegRestartInterval`` - - 515 - - R/W - - OJPEG - - * - ``BadFaxLines`` - - 326 - - R/W - - CCITT / fax - - * - ``CleanFaxData`` - - 327 - - R/W - - CCITT / fax - - * - ``ConsecutiveBadFaxLines`` - - 328 - - R/W - - CCITT / fax - - * - ``Group3Options`` - - 292 - - R/W - - CCITT / fax - - * - ``Group4Options`` - - 293 - - R/W - - CCITT / fax - - * - ``LercParameters`` - - 50674 - - R/W - - LERC - -Note: This *codec-specific* -tags and the library does not recognize them except when the -``Compression`` -tag has been previously set to the relevant compression scheme. - -The JPEG-related tag is specified in -:doc:`technote2`, which defines -a revised JPEG-in-TIFF scheme (revised over the appendix that was -part of the TIFF 6.0 specification). - -EXIF / GPS Custom IFDs ----------------------- - -In addition to the standard TIFF tags, :file:`libtiff` has predefined IFDs -(image file directories) with the tags for EXIF (version 2.32) and EXIF-GPS -as custom directories. -For reading / writing of this IFDs refer to :doc:`/functions/TIFFCustomDirectory`. - -EXIF Custom Tags -................ - -.. list-table:: EXIF 2.32 Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``ExposureTime`` - - 33434 - - R/W - - - - * - ``FNumber`` - - 33437 - - R/W - - - - * - ``ExposureProgram`` - - 34850 - - R/W - - - - * - ``SpectralSensitivity`` - - 34852 - - R/W - - - - * - ``ISOSpeedRatings`` - - 34855 - - R/W - - After EXIF 2.2.1 ISOSpeedRatings is named ``PhotographicSensitivity``. - In addition, while "Count=Any", only 1 count should be used. - - * - ``OptoelectricConversionFactor`` - - 34856 - - R/W - - - - * - ``SensitivityType`` - - 34864 - - R/W - - - - * - ``StandardOutputSensitivity`` - - 34865 - - R/W - - - - * - ``RecommendedExposureIndex`` - - 34866 - - R/W - - - - * - ``ISOSpeed`` - - 34867 - - R/W - - - - * - ``ISOSpeedLatitudeyyy`` - - 34868 - - R/W - - - - * - ``ISOSpeedLatitudezzz`` - - 34869 - - R/W - - - - * - ``ExifVersion`` - - 36864 - - R/W - - - - * - ``DateTimeOriginal`` - - 36867 - - R/W - - - - * - ``DateTimeDigitized`` - - 36868 - - R/W - - - - * - ``OffsetTime`` - - 36880 - - R/W - - - - * - ``OffsetTimeOriginal`` - - 36881 - - R/W - - - - * - ``OffsetTimeDigitized`` - - 36882 - - R/W - - - - * - ``ComponentsConfiguration`` - - 37121 - - R/W - - - - * - ``CompressedBitsPerPixel`` - - 37122 - - R/W - - - - * - ``ShutterSpeedValue`` - - 37377 - - R/W - - - - * - ``ApertureValue`` - - 37378 - - R/W - - - - * - ``BrightnessValue`` - - 37379 - - R/W - - - - * - ``ExposureBiasValue`` - - 37380 - - R/W - - - - * - ``MaxApertureValue`` - - 37381 - - R/W - - - - * - ``SubjectDistance`` - - 37382 - - R/W - - - - * - ``MeteringMode`` - - 37383 - - R/W - - - - * - ``LightSource`` - - 37384 - - R/W - - - - * - ``Flash`` - - 37385 - - R/W - - - - * - ``FocalLength`` - - 37386 - - R/W - - - - * - ``SubjectArea`` - - 37396 - - R/W - - - - * - ``MakerNote`` - - 37500 - - R/W - - - - * - ``UserComment`` - - 37510 - - R/W - - - - * - ``SubSecTime`` - - 37520 - - R/W - - - - * - ``SubSecTimeOriginal`` - - 37521 - - R/W - - - - * - ``SubSecTimeDigitized`` - - 37522 - - R/W - - - - * - ``Temperature`` - - 37888 - - R/W - - - - * - ``Humidity`` - - 37889 - - R/W - - - - * - ``Pressure`` - - 37890 - - R/W - - - - * - ``WaterDepth`` - - 37891 - - R/W - - - - * - ``Acceleration`` - - 37892 - - R/W - - - - * - ``CameraElevationAngle`` - - 37893 - - R/W - - - - * - ``FlashpixVersion`` - - 40960 - - R/W - - - - * - ``ColorSpace`` - - 40961 - - R/W - - - - * - ``PixelXDimension`` - - 40962 - - R/W - - - - * - ``PixelYDimension`` - - 40963 - - R/W - - - - * - ``RelatedSoundFile`` - - 40964 - - R/W - - - - * - ``FlashEnergy`` - - 41483 - - R/W - - - - * - ``SpatialFrequencyResponse`` - - 41484 - - R/W - - - - * - ``FocalPlaneXResolution`` - - 41486 - - R/W - - - - * - ``FocalPlaneYResolution`` - - 41487 - - R/W - - - - * - ``FocalPlaneResolutionUnit`` - - 41488 - - R/W - - - - * - ``SubjectLocation`` - - 41492 - - R/W - - - - * - ``ExposureIndex`` - - 41493 - - R/W - - - - * - ``SensingMethod`` - - 41495 - - R/W - - - - * - ``FileSource`` - - 41728 - - R/W - - - - * - ``SceneType`` - - 41729 - - R/W - - - - * - ``CFAPattern`` - - 41730 - - R/W - - - - * - ``CustomRendered`` - - 41985 - - R/W - - - - * - ``ExposureMode`` - - 41986 - - R/W - - - - * - ``WhiteBalance`` - - 41987 - - R/W - - - - * - ``DigitalZoomRatio`` - - 41988 - - R/W - - - - * - ``FocalLengthIn35mmFilm`` - - 41989 - - R/W - - - - * - ``SceneCaptureType`` - - 41990 - - R/W - - - - * - ``GainControl`` - - 41991 - - R/W - - - - * - ``Contrast`` - - 41992 - - R/W - - - - * - ``Saturation`` - - 41993 - - R/W - - - - * - ``Sharpness`` - - 41994 - - R/W - - - - * - ``DeviceSettingDescription`` - - 41995 - - R/W - - - - * - ``SubjectDistanceRange`` - - 41996 - - R/W - - - - * - ``ImageUniqueID`` - - 42016 - - R/W - - - - * - ``CameraOwnerName`` - - 42032 - - R/W - - - - * - ``BodySerialNumber`` - - 42033 - - R/W - - - - * - ``LensSpecification`` - - 42034 - - R/W - - - - * - ``LensMake`` - - 42035 - - R/W - - - - * - ``LensModel`` - - 42036 - - R/W - - - - * - ``LensSerialNumber`` - - 42037 - - R/W - - - - * - ``Gamma`` - - 42240 - - R/W - - - - * - ``CompositeImage`` - - 42080 - - R/W - - - - * - ``SourceImageNumberOfCompositeImage`` - - 42081 - - R/W - - - - * - ``SourceExposureTimesOfCompositeImage`` - - 42082 - - R/W - - - -GPS Custom Tags -............... - -.. list-table:: GPS 2.32 Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``VersionID`` - - 0 - - R/W - - - - * - ``LatitudeRef`` - - 1 - - R/W - - - - * - ``Latitude`` - - 2 - - R/W - - - - * - ``LongitudeRef`` - - 3 - - R/W - - - - * - ``Longitude`` - - 4 - - R/W - - - - * - ``AltitudeRef`` - - 5 - - R/W - - - - * - ``Altitude`` - - 6 - - R/W - - - - * - ``TimeStamp`` - - 7 - - R/W - - - - * - ``Satellites`` - - 8 - - R/W - - - - * - ``Status`` - - 9 - - R/W - - - - * - ``MeasureMode`` - - 10 - - R/W - - - - * - ``DOP`` - - 11 - - R/W - - - - * - ``SpeedRef`` - - 12 - - R/W - - - - * - ``Speed`` - - 13 - - R/W - - - - * - ``TrackRef`` - - 14 - - R/W - - - - * - ``Track`` - - 15 - - R/W - - - - * - ``ImgDirectionRef`` - - 16 - - R/W - - - - * - ``ImgDirection`` - - 17 - - R/W - - - - * - ``MapDatum`` - - 18 - - R/W - - - - * - ``DestLatitudeRef`` - - 19 - - R/W - - - - * - ``DestLatitude`` - - 20 - - R/W - - - - * - ``DestLongitudeRef`` - - 21 - - R/W - - - - * - ``DestLongitude`` - - 22 - - R/W - - - - * - ``DestBearingRef`` - - 23 - - R/W - - - - * - ``DestBearing`` - - 24 - - R/W - - - - * - ``DestDistanceRef`` - - 25 - - R/W - - - - * - ``DestDistance`` - - 26 - - R/W - - - - * - ``ProcessingMethod`` - - 27 - - R/W - - - - * - ``AreaInformation`` - - 28 - - R/W - - - - * - ``DateStamp`` - - 29 - - R/W - - - - * - ``Differential`` - - 30 - - R/W - - - - * - ``HorizontalPositioningError`` - - 31 - - R/W - - - diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/specification/index.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/specification/index.rst.txt deleted file mode 100644 index 2966364..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/specification/index.rst.txt +++ /dev/null @@ -1,28 +0,0 @@ -TIFF File Format Specification -============================== - -.. image:: ../images/jim.gif - :width: 139 - :alt: jim - -| A copy of the 6.0 specification is available from the libtiff - ftp site at ``_. -| Other places are ``_ - and ``_ - -Draft :doc:`technote2` covers problems -with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and -describes an alternative. - -The LibTIFF coverage of the TIFF 6.0 specification is detailed in :doc:`coverage`. - -A design for a TIFF variation supporting files larger than 4GB is detailed in :doc:`bigtiff`. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - technote2 - coverage - bigtiff - coverage-bigtiff diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/specification/technote2.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/specification/technote2.rst.txt deleted file mode 100644 index a88eab7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/specification/technote2.rst.txt +++ /dev/null @@ -1,720 +0,0 @@ -DRAFT TIFF Technical Note #2 -############################ - -17-Mar-95 - -This Technical Note describes serious problems that have been found in -TIFF 6.0's design for embedding JPEG-compressed data in TIFF (Section 22 -of the TIFF 6.0 spec of 3 June 1992). A replacement TIFF/JPEG -specification is given. Some corrections to Section 21 are also given. - -To permit TIFF implementations to continue to read existing files, the 6.0 -JPEG fields and tag values will remain reserved indefinitely. However, -TIFF writers are strongly discouraged from using the 6.0 JPEG design. It -is expected that the next full release of the TIFF specification will not -describe the old design at all, except to note that certain tag numbers -are reserved. The existing Section 22 will be replaced by the -specification text given in the second part of this Tech Note. - - -Problems in TIFF 6.0 JPEG -========================= - -Abandoning a published spec is not a step to be taken lightly. This -section summarizes the reasons that have forced this decision. -TIFF 6.0's JPEG design suffers from design errors and limitations, -ambiguities, and unnecessary complexity. - - -Design errors and limitations ------------------------------ - -The fundamental design error in the existing Section 22 is that JPEG's -various tables and parameters are broken out as separate fields which the -TIFF control logic must manage. This is bad software engineering: that -information should be treated as private to the JPEG codec -(compressor/decompressor). Worse, the fields themselves are specified -without sufficient thought for future extension and without regard to -well-established TIFF conventions. Here are some of the significant -problems: - -* The ``JPEGxxTable`` fields do not store the table data directly in the - IFD/field structure; rather, the fields hold pointers to information - elsewhere in the file. This requires special-purpose code to be added to - *every* TIFF-manipulating application, whether it needs to decode JPEG - image data or not. Even a trivial TIFF editor, for example a program to - add an ``ImageDescription`` field to a TIFF file, must be explicitly aware of - the internal structure of the JPEG-related tables, or else it will probably - break the file. Every other auxiliary field in the TIFF spec contains - data, not pointers, and can be copied or relocated by standard code that - doesn't know anything about the particular field. This is a crucial - property of the TIFF format that must not be given up. - -* To manipulate these fields, the TIFF control logic is required to know a - great deal about JPEG details, for example such arcana as how to compute - the length of a Huffman code table --- the length is not supplied in the - field structure and can only be found by inspecting the table contents. - This is again a violation of good software practice. Moreover, it will - prevent easy adoption of future JPEG extensions that might change these - low-level details. - -* The design neglects the fact that baseline JPEG codecs support only two - sets of Huffman tables: it specifies a separate table for each color - component. This implies that encoders must waste space (by storing - duplicate Huffman tables) or else violate the well-founded TIFF convention - that prohibits duplicate pointers. Furthermore, baseline decoders must - test to find out which tables are identical, a waste of time and code - space. - -* The ``JPEGInterchangeFormat`` field also violates TIFF's proscription against - duplicate pointers: the normal strip/tile pointers are expected to point - into the larger data area pointed to by ``JPEGInterchangeFormat``. All TIFF - editing applications must be specifically aware of this relationship, since - they must maintain it or else delete the ``JPEGInterchangeFormat field``. The - ``JPEGxxTables`` fields are also likely to point into the ``JPEGInterchangeFormat`` - area, creating additional pointer relationships that must be maintained. - -* The ``JPEGQTables`` field is fixed at a byte per table entry; there is no - way to support 16-bit quantization values. This is a serious impediment - to extending TIFF to use 12-bit JPEG. - -* The 6.0 design cannot support using different quantization tables in - different strips/tiles of an image (so as to encode some areas at higher - quality than others). Furthermore, since quantization tables are tied - one-for-one to color components, the design cannot support table switching - options that are likely to be added in future JPEG revisions. - - -Ambiguities ------------ - -Several incompatible interpretations are possible for 6.0's treatment of -JPEG restart markers: - -* It is unclear whether restart markers must be omitted at TIFF segment - (strip/tile) boundaries, or whether they are optional. - -* It is unclear whether the segment size is required to be chosen as - a multiple of the specified restart interval (if any); perhaps the - JPEG codec is supposed to be reset at each segment boundary as if - there were a restart marker there, even if the boundary does not fall - at a multiple of the nominal restart interval. - -* The spec fails to address the question of restart marker numbering: - do the numbers begin again within each segment, or not? - -That last point is particularly nasty. If we make numbering begin again -within each segment, we give up the ability to impose a TIFF strip/tile -structure on an existing JPEG datastream with restarts (which was clearly a -goal of Section 22's authors). But the other choice interferes with random -access to the image segments: a reader must compute the first restart -number to be expected within a segment, and must have a way to reset its -JPEG decoder to expect a nonzero restart number first. This may not even -be possible with some JPEG chips. - -The tile height restriction found on page 104 contradicts Section 15's -general description of tiles. For an image that is not vertically -downsampled, page 104 specifies a tile height of one MCU or 8 pixels; but -Section 15 requires tiles to be a multiple of 16 pixels high. - -This Tech Note does not attempt to resolve these ambiguities, so -implementations that follow the 6.0 design should be aware that -inter-application compatibility problems are likely to arise. - - -Unnecessary complexity ----------------------- - -The 6.0 design creates problems for implementations that need to keep the -JPEG codec separate from the TIFF control logic --- for example, consider -using a JPEG chip that was not designed specifically for TIFF. JPEG codecs -generally want to produce or consume a standard ISO JPEG datastream, not -just raw compressed data. (If they were to handle raw data, a separate -out-of-band mechanism would be needed to load tables into the codec.) -With such a codec, the TIFF control logic must parse JPEG markers emitted -by the codec to create the TIFF table fields (when writing) or synthesize -JPEG markers from the TIFF fields to feed the codec (when reading). This -means that the control logic must know a great deal more about JPEG details -than we would like. The parsing and reconstruction of the markers also -represents a fair amount of unnecessary work. - -Quite a few implementers have proposed writing "TIFF/JPEG" files in which -a standard JPEG datastream is simply dumped into the file and pointed to -by JPEGInterchangeFormat. To avoid parsing the JPEG datastream, they -suggest not writing the JPEG auxiliary fields (JPEGxxTables etc) nor even -the basic TIFF strip/tile data pointers. This approach is incompatible -with implementations that handle the full TIFF 6.0 JPEG design, since they -will expect to find strip/tile pointers and auxiliary fields. Indeed this -is arguably not TIFF at all, since *all* TIFF-reading applications expect -to find strip or tile pointers. A subset implementation that is not -upward-compatible with the full spec is clearly unacceptable. However, -the frequency with which this idea has come up makes it clear that -implementers find the existing Section 22 too complex. - - -Overview of the solution -======================== - -To solve these problems, we adopt a new design for embedding -JPEG-compressed data in TIFF files. The new design uses only complete, -uninterpreted ISO JPEG datastreams, so it should be much more forgiving of -extensions to the ISO standard. It should also be far easier to implement -using unmodified JPEG codecs. - -To reduce overhead in multi-segment TIFF files, we allow JPEG overhead -tables to be stored just once in a ``JPEGTables`` auxiliary field. This -feature does not violate the integrity of the JPEG datastreams, because it -uses the notions of "tables-only datastreams" and "abbreviated image -datastreams" as defined by the ISO standard. - -To prevent confusion with the old design, the new design is given a new -``Compression`` tag value, ``Compression=7``. Readers that need to handle -existing 6.0 JPEG files may read both old and new files, using whatever -interpretation of the 6.0 spec they did before. ``Compression`` tag value 6 -and the field tag numbers defined by 6.0 section 22 will remain reserved -indefinitely, even though detailed descriptions of them will be dropped -from future editions of the TIFF specification. - - -Replacement TIFF/JPEG specification -=================================== - -[This section of the Tech Note is expected to replace Section 22 in the -next release of the TIFF specification.] - -This section describes TIFF compression scheme 7, a high-performance -compression method for continuous-tone images. - -Introduction ------------- - -This TIFF compression method uses the international standard for image -compression ISO/IEC 10918-1, usually known as "JPEG" (after the original -name of the standards committee, Joint Photographic Experts Group). JPEG -is a joint ISO/CCITT standard for compression of continuous-tone images. - -The JPEG committee decided that because of the broad scope of the standard, -no one algorithmic procedure was able to satisfy the requirements of all -applications. Instead, the JPEG standard became a "toolkit" of multiple -algorithms and optional capabilities. Individual applications may select -a subset of the JPEG standard that meets their requirements. - -The most important distinction among the JPEG processes is between lossy -and lossless compression. Lossy compression methods provide high -compression but allow only approximate reconstruction of the original -image. JPEG's lossy processes allow the encoder to trade off compressed -file size against reconstruction fidelity over a wide range. Typically, -10:1 or more compression of full-color data can be obtained while keeping -the reconstructed image visually indistinguishable from the original. Much -higher compression ratios are possible if a low-quality reconstructed image -is acceptable. Lossless compression provides exact reconstruction of the -source data, but the achievable compression ratio is much lower than for -the lossy processes; JPEG's rather simple lossless process typically -achieves around 2:1 compression of full-color data. - -The most widely implemented JPEG subset is the "baseline" JPEG process. -This provides lossy compression of 8-bit-per-channel data. Optional -extensions include 12-bit-per-channel data, arithmetic entropy coding for -better compression, and progressive/hierarchical representations. The -lossless process is an independent algorithm that has little in -common with the lossy processes. - -It should be noted that the optional arithmetic-coding extension is subject -to several US and Japanese patents. To avoid patent problems, use of -arithmetic coding processes in TIFF files intended for inter-application -interchange is discouraged. - -All of the JPEG processes are useful only for "continuous tone" data, -in which the difference between adjacent pixel values is usually small. -Low-bit-depth source data is not appropriate for JPEG compression, nor -are palette-color images good candidates. The JPEG processes work well -on grayscale and full-color data. - -Describing the JPEG compression algorithms in sufficient detail to permit -implementation would require more space than we have here. Instead, we -refer the reader to the References section. - - -What data is being compressed? ------------------------------- - -In lossy JPEG compression, it is customary to convert color source data -to YCbCr and then downsample it before JPEG compression. This gives -2:1 data compression with hardly any visible image degradation, and it -permits additional space savings within the JPEG compression step proper. -However, these steps are not considered part of the ISO JPEG standard. -The ISO standard is "color blind": it accepts data in any color space. - -For TIFF purposes, the JPEG compression tag is considered to represent the -ISO JPEG compression standard only. The ISO standard is applied to the -same data that would be stored in the TIFF file if no compression were -used. Therefore, if color conversion or downsampling are used, they must -be reflected in the regular TIFF fields; these steps are not considered to -be implicit in the JPEG compression tag value. ``PhotometricInterpretation`` -and related fields shall describe the color space actually stored in the -file. With the TIFF 6.0 field definitions, downsampling is permissible -only for YCbCr data, and it must correspond to the ``YCbCrSubSampling`` field. -(Note that the default value for this field is not 1,1; so the default for -YCbCr is to apply downsampling!) It is likely that future versions of TIFF -will provide additional ``PhotometricInterpretation`` values and a more general -way of defining subsampling, so as to allow more flexibility in -JPEG-compressed files. But that issue is not addressed in this Tech Note. - -Implementers should note that many popular JPEG codecs -(compressor/decompressors) provide automatic color conversion and -downsampling, so that the application may supply full-size RGB data which -is nonetheless converted to downsampled YCbCr. This is an implementation -convenience which does not excuse the TIFF control layer from its -responsibility to know what is really going on. The -``PhotometricInterpretation`` and subsampling fields written to the file must -describe what is actually in the file. - -A JPEG-compressed TIFF file will typically have ``PhotometricInterpretation = -YCbCr`` and ``YCbCrSubSampling = [2,1]`` or ``[2,2]``, unless the source data was -grayscale or CMYK. - - -Basic representation of JPEG-compressed images ----------------------------------------------- - -JPEG compression works in either strip-based or tile-based TIFF files. -Rather than repeating "strip or tile" constantly, we will use the term -"segment" to mean either a strip or a tile. - -When the ``Compression`` field has the value 7, each image segment contains -a complete JPEG datastream which is valid according to the ISO JPEG -standard (ISO/IEC 10918-1). Any sequential JPEG process can be used, -including lossless JPEG, but progressive and hierarchical processes are not -supported. Since JPEG is useful only for continuous-tone images, the -PhotometricInterpretation of the image shall not be 3 (palette color) nor -4 (transparency mask). The bit depth of the data is also restricted as -specified below. - -Each image segment in a JPEG-compressed TIFF file shall contain a valid -JPEG datastream according to the ISO JPEG standard's rules for -interchange-format or abbreviated-image-format data. The datastream shall -contain a single JPEG frame storing that segment of the image. The -required JPEG markers within a segment are: - -* ``SOI`` (must appear at very beginning of segment) -* ``SOFn`` -* ``SOS`` (one for each scan, if there is more than one scan) -* ``EOI`` (must appear at very end of segment) - -The actual compressed data follows ``SOS``; it may contain ``RSTn`` markers if ``DRI`` -is used. - -Additional JPEG "tables and miscellaneous" markers may appear between ``SOI`` -and ``SOFn``, between ``SOFn`` and ``SOS``, and before each subsequent ``SOS`` if there is -more than one scan. These markers include: - -* ``DQT`` -* ``DHT`` -* ``DAC`` (not to appear unless arithmetic coding is used) -* ``DRI`` -* ``APPn`` (shall be ignored by TIFF readers) -* ``COM`` (shall be ignored by TIFF readers) - -``DNL`` markers shall not be used in TIFF files. Readers should abort if any -other marker type is found, especially the JPEG reserved markers; -occurrence of such a marker is likely to indicate a JPEG extension. - -The tables/miscellaneous markers may appear in any order. Readers are -cautioned that although the ``SOFn`` marker refers to ``DQT`` tables, JPEG does not -require those tables to precede the ``SOFn``, only the ``SOS``. Missing-table -checks should be made when SOS is reached. - -If no ``JPEGTables`` field is used, then each image segment shall be a complete -JPEG interchange datastream. Each segment must define all the tables it -references. To allow readers to decode segments in any order, no segment -may rely on tables being carried over from a previous segment. - -When a ``JPEGTables`` field is used, image segments may omit tables that have -been specified in the ``JPEGTables`` field. Further details appear below. - -The ``SOFn`` marker shall be of type ``SOF0`` for strict baseline JPEG data, of -type ``SOF1`` for non-baseline lossy JPEG data, or of type ``SOF3`` for lossless -JPEG data. (``SOF9`` or ``SOF11`` would be used for arithmetic coding.) All -segments of a JPEG-compressed TIFF image shall use the same JPEG -compression process, in particular the same ``SOFn`` type. - -The data precision field of the ``SOFn`` marker shall agree with the TIFF -``BitsPerSample`` field. (Note that when ``PlanarConfiguration=1``, this implies -that all components must have the same ``BitsPerSample`` value; when -``PlanarConfiguration=2``, different components could have different bit -depths.) For ``SOF0`` only precision 8 is permitted; for ``SOF1``, precision 8 or -12 is permitted; for ``SOF3``, precisions 2 to 16 are permitted. - -The image dimensions given in the ``SOFn`` marker shall agree with the logical -dimensions of that particular strip or tile. For strip images, the ``SOFn`` -image width shall equal ``ImageWidth`` and the height shall equal ``RowsPerStrip``, -except in the last strip; its ``SOFn`` height shall equal the number of rows -remaining in the ``ImageLength``. (In other words, no padding data is counted -in the ``SOFn`` dimensions.) For tile images, each ``SOFn`` shall have width -``TileWidth`` and height ``TileHeight``; adding and removing any padding needed in -the edge tiles is the concern of some higher level of the TIFF software. -(The dimensional rules are slightly different when ``PlanarConfiguration=2``, -as described below.) - -The ISO JPEG standard only permits images up to 65535 pixels in width or -height, due to 2-byte fields in the ``SOFn`` markers. In TIFF, this limits -the size of an individual JPEG-compressed strip or tile, but the total -image size can be greater. - -The number of components in the JPEG datastream shall equal ``SamplesPerPixel`` -for ``PlanarConfiguration=1``, and shall be 1 for ``PlanarConfiguration=2``. The -components shall be stored in the same order as they are described at the -TIFF field level. (This applies both to their order in the ``SOFn`` marker, -and to the order in which they are scanned if multiple JPEG scans are -used.) The component ID bytes are arbitrary so long as each component -within an image segment is given a distinct ID. To avoid any possible -confusion, we require that all segments of a TIFF image use the same ID -code for a given component. - -In ``PlanarConfiguration 1``, the sampling factors given in ``SOFn`` markers shall -agree with the sampling factors defined by the related TIFF fields (or with -the default values that are specified in the absence of those fields). - -When DCT-based JPEG is used in a strip TIFF file, ``RowsPerStrip`` is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., a -multiple of the height of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) For example, if ``YCbCrSubSampling = [2,2]`` then ``RowsPerStrip`` -must be a multiple of 16. An exception to this rule is made for -single-strip images (``RowsPerStrip >= ImageLength``): the exact value of -``RowsPerStrip`` is unimportant in that case. This rule ensures that no data -padding is needed at the bottom of a strip, except perhaps the last strip. -Any padding required at the right edge of the image, or at the bottom of -the last strip, is expected to occur internally to the JPEG codec. - -When DCT-based JPEG is used in a tiled TIFF file, ``TileLength`` is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., -a multiple of the height of an interleaved MCU; and ``TileWidth`` is required -to be a multiple of 8 times the largest horizontal sampling factor, i.e., -a multiple of the width of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) All edge padding required will therefore occur in the course -of normal TIFF tile padding; it is not special to JPEG. - -Lossless JPEG does not impose these constraints on strip and tile sizes, -since it is not DCT-based. - -Note that within JPEG datastreams, multibyte values appear in the MSB-first -order specified by the JPEG standard, regardless of the byte ordering of -the surrounding TIFF file. - - -JPEGTables field ----------------- - -The only auxiliary TIFF field added for ``Compression=7`` is the optional -``JPEGTables`` field. The purpose of ``JPEGTables`` is to predefine JPEG -quantization and/or Huffman tables for subsequent use by JPEG image -segments. When this is done, these rather bulky tables need not be -duplicated in each segment, thus saving space and processing time. -``JPEGTables`` may be used even in a single-segment file, although there is no -space savings in that case. - -``JPEGTables``: - - * Tag = 347 (15B.H) - * Type = UNDEFINED - * N = number of bytes in tables datastream, typically a few hundred - -JPEGTables provides default JPEG quantization and/or Huffman tables which -are used whenever a segment datastream does not contain its own tables, as -specified below. - -Notice that the JPEGTables field is required to have type code UNDEFINED, -not type code BYTE. This is to cue readers that expanding individual bytes -to short or long integers is not appropriate. A TIFF reader will generally -need to store the field value as an uninterpreted byte sequence until it is -fed to the JPEG decoder. - -Multibyte quantities within the tables follow the ISO JPEG convention of -MSB-first storage, regardless of the byte ordering of the surrounding TIFF -file. - -When the JPEGTables field is present, it shall contain a valid JPEG -"abbreviated table specification" datastream. This datastream shall begin -with ``SOI`` and end with ``EOI``. It may contain zero or more JPEG "tables and -miscellaneous" markers, namely: - -* ``DQT`` -* ``DHT`` -* ``DAC`` (not to appear unless arithmetic coding is used) -* ``DRI`` -* ``APPn*`` (shall be ignored by TIFF readers) -* ``COM`` (shall be ignored by TIFF readers) - -Since JPEG defines the ``SOI`` marker to reset the ``DAC`` and ``DRI`` state, these two -markers' values cannot be carried over into any image datastream, and thus -they are effectively no-ops in the ``JPEGTables`` field. To avoid confusion, -it is recommended that writers not place ``DAC`` or ``DRI`` markers in ``JPEGTables``. -However readers must properly skip over them if they appear. - -When ``JPEGTables`` is present, readers shall load the table specifications -contained in ``JPEGTables`` before processing image segment datastreams. -Image segments may simply refer to these preloaded tables without defining -them. An image segment can still define and use its own tables, subject to -the restrictions below. - -An image segment may not redefine any table defined in ``JPEGTables``. (This -restriction is imposed to allow readers to process image segments in random -order without having to reload ``JPEGTables`` between segments.) Therefore, use -of ``JPEGTables`` divides the available table slots into two groups: "global" -slots are defined in ``JPEGTables`` and may be used but not redefined by -segments; "local" slots are available for local definition and use in each -segment. To permit random access, a segment may not reference any local -tables that it does not itself define. - - -Special considerations for PlanarConfiguration 2 ------------------------------------------------- - -In ``PlanarConfiguration`` 2, each image segment contains data for only one -color component. To avoid confusing the JPEG codec, we wish the segments -to look like valid single-channel (i.e., grayscale) JPEG datastreams. This -means that different rules must be used for the ``SOFn`` parameters. - -In ``PlanarConfiguration`` 2, the dimensions given in the ``SOFn`` of a subsampled -component shall be scaled down by the sampling factors compared to the ``SOFn`` -dimensions that would be used in ``PlanarConfiguration`` 1. This is necessary -to match the actual number of samples stored in that segment, so that the -JPEG codec doesn't complain about too much or too little data. In strip -TIFF files the computed dimensions may need to be rounded up to the next -integer; in tiled files, the restrictions on tile size make this case -impossible. - -Furthermore, all ``SOFn`` sampling factors shall be given as 1. (This is -merely to avoid confusion, since the sampling factors in a single-channel -JPEG datastream have no real effect.) - -Any downsampling will need to happen externally to the JPEG codec, since -JPEG sampling factors are defined with reference to the full-precision -component. In ``PlanarConfiguration`` 2, the JPEG codec will be working on -only one component at a time and thus will have no reference component to -downsample against. - - -Minimum requirements for TIFF/JPEG ----------------------------------- - -ISO JPEG is a large and complex standard; most implementations support only -a subset of it. Here we define a "core" subset of TIFF/JPEG which readers -must support to claim TIFF/JPEG compatibility. For maximum -cross-application compatibility, we recommend that writers confine -themselves to this subset unless there is very good reason to do otherwise. - -Use the ISO baseline JPEG process: 8-bit data precision, Huffman coding, -with no more than 2 DC and 2 AC Huffman tables. Note that this implies -``BitsPerSample`` = 8 for each component. We recommend deviating from baseline -JPEG only if 12-bit data precision or lossless coding is required. - -Use no subsampling (all JPEG sampling factors = 1) for color spaces other -than YCbCr. (This is, in fact, required with the TIFF 6.0 field -definitions, but may not be so in future revisions.) For YCbCr, use one of -the following choices: - -====================== ===================== -YCbCrSubSampling field JPEG sampling factors -====================== ===================== -1,1 1h1v, 1h1v, 1h1v -2,1 2h1v, 1h1v, 1h1v -2,2 (default value) 2h2v, 1h1v, 1h1v -====================== ===================== - -We recommend that RGB source data be converted to YCbCr for best compression -results. Other source data colorspaces should probably be left alone. -Minimal readers need not support JPEG images with colorspaces other than -YCbCr and grayscale (`PhotometricInterpretation` = 6 or 1). - -A minimal reader also need not support JPEG YCbCr images with nondefault -values of ``YCbCrCoefficients`` or ``YCbCrPositioning``, nor with values of -``ReferenceBlackWhite`` other than [0,255,128,255,128,255]. (These values -correspond to the RGB<=>YCbCr conversion specified by JFIF, which is widely -implemented in JPEG codecs.) - -Writers are reminded that a ``ReferenceBlackWhite`` field *must* be included -when ``PhotometricInterpretation`` is YCbCr, because the default -``ReferenceBlackWhite`` values are inappropriate for YCbCr. - -If any subsampling is used, ``PlanarConfiguration=1`` is preferred to avoid the -possibly-confusing requirements of ``PlanarConfiguration=2``. In any case, -readers are not required to support ``PlanarConfiguration=2``. - -If possible, use a single interleaved scan in each image segment. This is -not legal JPEG if there are more than 4 ``SamplesPerPixel`` or if the sampling -factors are such that more than 10 blocks would be needed per MCU; in that -case, use a separate scan for each component. (The recommended color -spaces and sampling factors will not run into that restriction, so a -minimal reader need not support more than one scan per segment.) - -To claim TIFF/JPEG compatibility, readers shall support multiple-strip TIFF -files and the optional ``JPEGTables`` field; it is not acceptable to read only -single-datastream files. Support for tiled TIFF files is strongly -recommended but not required. - - -Other recommendations for implementers --------------------------------------- - -The TIFF tag ``Compression=7`` guarantees only that the compressed data is -represented as ISO JPEG datastreams. Since JPEG is a large and evolving -standard, readers should apply careful error checking to the JPEG markers -to ensure that the compression process is within their capabilities. In -particular, to avoid being confused by future extensions to the JPEG -standard, it is important to abort if unknown marker codes are seen. - -The point of requiring that all image segments use the same JPEG process is -to ensure that a reader need check only one segment to determine whether it -can handle the image. For example, consider a TIFF reader that has access -to fast but restricted JPEG hardware, as well as a slower, more general -software implementation. It is desirable to check only one image segment -to find out whether the fast hardware can be used. Thus, writers should -try to ensure that all segments of an image look as much "alike" as -possible: there should be no variation in scan layout, use of options such -as ``DRI``, etc. Ideally, segments will be processed identically except -perhaps for using different local quantization or entropy-coding tables. - -Writers should avoid including "noise" JPEG markers (``COM`` and ``APPn`` markers). -Standard TIFF fields provide a better way to transport any non-image data. -Some JPEG codecs may change behavior if they see an ``APPn`` marker they -think they understand; since the TIFF spec requires these markers to be -ignored, this behavior is undesirable. - -It is possible to convert an interchange-JPEG file (e.g., a JFIF file) to -TIFF simply by dropping the interchange datastream into a single strip. -(However, designers are reminded that the TIFF spec discourages huge -strips; splitting the image is somewhat more work but may give better -results.) Conversion from TIFF to interchange JPEG is more complex. A -strip-based TIFF/JPEG file can be converted fairly easily if all strips use -identical JPEG tables and no ``RSTn`` markers: just delete the overhead markers -and insert ``RSTn`` markers between strips. Converting tiled images is harder, -since the data will usually not be in the right order (unless the tiles are -only one MCU high). This can still be done losslessly, but it will require -undoing and redoing the entropy coding so that the DC coefficient -differences can be updated. - -There is no default value for ``JPEGTables``: standard TIFF files must define all -tables that they reference. For some closed systems in which many files will -have identical tables, it might make sense to define a default ``JPEGTables`` -value to avoid actually storing the tables. Or even better, invent a -private field selecting one of N default ``JPEGTables`` settings, so as to allow -for future expansion. Either of these must be regarded as a private -extension that will render the files unreadable by other applications. - - -References ----------- - -[1] Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. - -This is the best short technical introduction to the JPEG algorithms. -It is a good overview but does not provide sufficiently detailed -information to write an implementation. - -[2] Pennebaker, William B. and Mitchell, Joan L. "JPEG Still Image Data -Compression Standard", Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. -638pp. - -This textbook is by far the most complete exposition of JPEG in existence. -It includes the full text of the ISO JPEG standards (DIS 10918-1 and draft -DIS 10918-2). No would-be JPEG implementer should be without it. - -[3] ISO/IEC IS 10918-1, "Digital Compression and Coding of Continuous-tone -Still Images, Part 1: Requirements and guidelines", February 1994. -ISO/IEC DIS 10918-2, "Digital Compression and Coding of Continuous-tone -Still Images, Part 2: Compliance testing", final approval expected 1994. - -These are the official standards documents. Note that the Pennebaker and -Mitchell textbook is likely to be cheaper and more useful than the official -standards. - - -Changes to Section 21: YCbCr Images -=================================== - -[This section of the Tech Note clarifies section 21 to make clear the -interpretation of image dimensions in a subsampled image. Furthermore, -the section is changed to allow the original image dimensions not to be -multiples of the sampling factors. This change is necessary to support use -of JPEG compression on odd-size images.] - -Add the following paragraphs to the Section 21 introduction (p. 89), -just after the paragraph beginning "When a Class Y image is subsampled": - - In a subsampled image, it is understood that all TIFF image - dimensions are measured in terms of the highest-resolution - (luminance) component. In particular, ``ImageWidth``, ``ImageLength``, - ``RowsPerStrip``, ``TileWidth``, ``TileLength``, ``XResolution``, and ``YResolution`` - are measured in luminance samples. - - ``RowsPerStrip``, ``TileWidth``, and ``TileLength`` are constrained so that - there are an integral number of samples of each component in a - complete strip or tile. However, ``ImageWidth``/``ImageLength`` are not - constrained. If an odd-size image is to be converted to subsampled - format, the writer should pad the source data to a multiple of the - sampling factors by replication of the last column and/or row, then - downsample. The number of luminance samples actually stored in the - file will be a multiple of the sampling factors. Conversely, - readers must ignore any extra data (outside the specified image - dimensions) after upsampling. - - When ``PlanarConfiguration=2``, each strip or tile covers the same - image area despite subsampling; that is, the total number of strips - or tiles in the image is the same for each component. Therefore - strips or tiles of the subsampled components contain fewer samples - than strips or tiles of the luminance component. - - If there are extra samples per pixel (see field ``ExtraSamples``), - these data channels have the same number of samples as the - luminance component. - -Rewrite the ``YCbCrSubSampling`` field description (pp 91-92) as follows -(largely to eliminate possibly-misleading references to -``ImageWidth``/``ImageLength`` of the subsampled components): - - (first paragraph unchanged) - - The two elements of this field are defined as follows: - - Short 0: ``ChromaSubsampleHoriz``: - - 1 = there are equal numbers of luma and chroma samples horizontally. - - 2 = there are twice as many luma samples as chroma samples - horizontally. - - 4 = there are four times as many luma samples as chroma samples - horizontally. - - Short 1: ``ChromaSubsampleVert``: - - 1 = there are equal numbers of luma and chroma samples vertically. - - 2 = there are twice as many luma samples as chroma samples - vertically. - - 4 = there are four times as many luma samples as chroma samples - vertically. - - ``ChromaSubsampleVert`` shall always be less than or equal to - ``ChromaSubsampleHoriz``. Note that Cb and Cr have the same sampling - ratios. - - In a strip TIFF file, ``RowsPerStrip`` is required to be an integer - multiple of ``ChromaSubSampleVert`` (unless ``RowsPerStrip >= - ImageLength``, in which case its exact value is unimportant). - If ``ImageWidth`` and ``ImageLength`` are not multiples of - ``ChromaSubsampleHoriz`` and ``ChromaSubsampleVert`` respectively, then the - source data shall be padded to the next integer multiple of these - values before downsampling. - - In a tiled TIFF file, ``TileWidth`` must be an integer multiple of - ``ChromaSubsampleHoriz`` and ``TileLength`` must be an integer multiple of - ``ChromaSubsampleVert``. Padding will occur to tile boundaries. - - The default values of this field are [ 2,2 ]. Thus, YCbCr data is - downsampled by default! diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/terms.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/terms.rst.txt deleted file mode 100644 index 3d4012a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/terms.rst.txt +++ /dev/null @@ -1,79 +0,0 @@ -Terminology -=========== - -.. image:: images/strike.gif - :width: 128 - :alt: strike - -The following definitions are used throughout this documentation. -They are consistent with the terminology used in the TIFF 6.0 specification. - -Sample: - The unit of information stored in an image; often called a - channel elsewhere. Sample values are numbers, usually unsigned - integers, but possibly in some other format if the SampleFormat - tag is specified in a TIFF - -Pixel: - A collection of one or more samples that go together. - -Row: - An Nx1 rectangular collection of pixels. - -Tile: - An NxM rectangular organization of data (or pixels). - -Strip: - A tile whose width is the full image width. - -Compression: - A scheme by which pixel or sample data are stored in - an encoded form, specifically with the intent of reducing the - storage cost. - -Codec: - Software that implements the decoding and encoding algorithms - of a compression scheme. - -.. _ImageFileDirectory: - -Image File Directory (IFD): - An Image File Directory - in short also *directory* - - contains information about the image, - as well as pointers (offsets) to the actual image data - within the on-disk file. - An IFD points either to the next IFD or shows with a ''0'' - that it is the last IFD in the IFD-chain. - -Multi Images per TIFF file: - There may be more than one IFD in a TIFF file. - Each IFD defines a *subfile*. - One potential use of *subfiles* is to describe related images, - such as the pages of a facsimile transmission. - Such files are also named "*multi-page* TIFF" or "*multi-image* TIFF". - Refer also to :doc:`/multi_page`. - -.. _SubFile: - -Subfile: - *Subfile* is a term in the TIFF 6.0 specification for - an image and its associated *Image File Directory (IFD)* - in a TIFF file containing one or more images. - -In order to better understand how TIFF works (and consequently this -software) it is important to recognize the distinction between the -physical organization of image data as it is stored in a TIFF and how -the data is interpreted and manipulated as pixels in an image. TIFF -supports a wide variety of storage and data compression schemes that -can be used to optimize retrieval time and/or minimize storage space. -These on-disk formats are independent of the image characteristics; it -is the responsibility of the TIFF reader to process the on-disk storage -into an in-memory format suitable for an application. Furthermore, it -is the responsibility of the application to properly interpret the -visual characteristics of the image data. TIFF defines a framework for -specifying the on-disk storage format and image characteristics with -few restrictions. This permits significant complexity that can be -daunting. Good applications that handle TIFF work by handling as wide -a range of storage formats as possible, while constraining the -acceptable image characteristics to those that make sense for the -application. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools.rst.txt deleted file mode 100644 index df102f0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools.rst.txt +++ /dev/null @@ -1,155 +0,0 @@ -TIFF Tools Overview -=================== - -.. image:: images/quad.jpg - :width: 144 - :alt: quad - -This software distribution comes with a small collection of -programs for converting non-TIFF format images to TIFF and for -manipulating and interrogating the contents of TIFF images. Several -of these tools are useful in their own right. Many of them however -are more intended to serve as programming examples for using the -TIFF library. - -Manual pages ------------- - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - tools/fax2ps - tools/fax2tiff - tools/pal2rgb - tools/ppm2tiff - tools/raw2tiff - tools/rgb2ycbcr - tools/thumbnail - tools/tiff2bw - tools/tiff2pdf - tools/tiff2ps - tools/tiff2rgba - tools/tiffcmp - tools/tiffcp - tools/tiffcrop - tools/tiffdither - tools/tiffdump - tools/tiffgt - tools/tiffinfo - tools/tiffmedian - tools/tiffset - tools/tiffsplit - -Device-dependent Programs -------------------------- - -There are two device-dependent programs that serve as simple -examples for writing programs to display and save TIFF images. - -.. list-table:: Device-dependent programs - :widths: 5 20 - :header-rows: 1 - - * - Tool - - Description - - * - :doc:`tools/tiffgt` - - Display the contents of one or more TIFF images using OpenGL. - The software makes extensive use of the ``TIFFRGBAImage`` - facilities described elsewhere. - -Device-independent Programs ---------------------------- - -The remaining programs should be device-independent: - -.. list-table:: Device-dependent programs - :widths: 5 20 - :header-rows: 1 - - * - Tool - - Description - - * - :doc:`tools/fax2ps` - - Convert a Group 3- or Group 4- compressed TIFF to PostScript - that is significantly more compressed than is generated by - :program:`tiff2ps` (unless :program:`tiff2ps` writes PS Level II) - - * - :doc:`tools/fax2tiff` - - Convert raw Group 3 or Group 4 facsimile data to TIFF - - * - :doc:`tools/pal2rgb` - - Convert a Palette-style image to a full color RGB image by - applying the colormap - - * - :doc:`tools/ppm2tiff` - - A quick hack that converts 8-bit PPM format images to TIFF - - * - :doc:`tools/raw2tiff` - - Create a TIFF file from raw data - - * - :doc:`tools/rgb2ycbcr` - - Convert an RGB, grayscale, or bilevel TIFF image to a YCbCr - TIFF image; it's mainly provided for testing - - * - :doc:`tools/thumbnail` - - Copy a bilevel TIFF to one that includes 8-bit greyscale - "thumbnail images" for each page; it is provided as an example of - how one might use the ``SubIFD`` tag (and the library support - for it) - - * - :doc:`tools/tiff2bw` - - A simple program to convert a color image to grayscale - - * - :doc:`tools/tiff2pdf` - - Convert TIFF images to PDF - - * - :doc:`tools/tiff2ps` - - Convert TIFF images to PostScript - - * - :doc:`tools/tiff2rgba` - - Convert a TIFF image to RGBA color space - - * - :doc:`tools/tiffcmp` - - Compare the contents of two TIFF files (it does not check all - the directory information, but does check all the data) - - * - :doc:`tools/tiffcp` - - Copy, concatenate, and convert TIFF images (e.g. switching from - ``Compression=5`` to ``Compression=1``) - - * - :doc:`tools/tiffcrop` - - Provides selection of images from within one or more multi-image - TIFF files, with orthogonal rotation, mirroring, cropping, and - extraction of multiple sections and exporting to one or more files. - It extends the functionality of :program:`tiffcp` to support additional bit - depths in strips and tiles and enhances the selection capabilities of - tiffsplit. Bilevel images can be inverted and images may be split into - segments to fit on multiple /pages/ (standard paper sizes), plus other - functions described in the tiffcrop man page - - * - :doc:`tools/tiffdither` - - Dither a b&w image into a bilevel image (suitable for use - in creating fax files) - - * - :doc:`tools/tiffdump` - - Display the verbatim contents of the TIFF directory in a file - (it's very useful for debugging bogus files that you may get from - someone that claims they support TIFF) - - * - :doc:`tools/tiffinfo` - - Display information about one or more TIFF files - - * - :doc:`tools/tiffmedian` - - A version of Paul Heckbert's median cut program that reads an - RGB TIFF image, and creates a TIFF palette file as a result - - * - :doc:`tools/tiffset` - - Set a field in a TIFF header - - * - :doc:`tools/tiffsplit` - - Create one or more single-image files from a (possibly) - multi-image file - -Check out the manual pages for details about the above programs. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2ps.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2ps.rst.txt deleted file mode 100644 index 48dbafd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2ps.rst.txt +++ /dev/null @@ -1,129 +0,0 @@ -fax2ps -====== - -.. program:: fax2ps - -Synopsis --------- - -**fax2ps** [ *options* ] [ *file …* ] - -Description ------------ - -:program:`fax2ps` reads one or more TIFF -facsimile image files and prints a compressed form of -PostScript on the standard output that is suitable for printing. - -By default, each page is scaled to reflect the -image dimensions and resolutions stored in the file. -The :option:`-x` and :option:`-y` -options can be used to specify the horizontal and vertical -image resolutions (lines/inch), respectively. -If the :option:`-S` -option is specified, each page is scaled to fill an output page. -The default output page is 8.5 by 11 inches. -Alternate page dimensions can be specified in inches with the -:option:`-W` and :option:`-H` -options. - -By default :program:`fax2ps` -generates PostScript for all pages in the file. -The :option:`-p` -option can be used to select one or more pages from -a multi-page document. - - -:program:`fax2ps` -generates a compressed form of PostScript that is -optimized for sending pages of text to a PostScript -printer attached to a host through a low-speed link (such -as a serial line). -Each output page is filled with white and then only -the black areas are drawn. -The PostScript specification of the black drawing operations -is optimized by using a special font that encodes the -move-draw operations required to fill -the black regions on the page. -This compression scheme typically results in a substantially -reduced PostScript description, relative to the straightforward -imaging of the page with a PostScript -``image`` -operator. -This algorithm can, however, be ineffective -for continuous-tone and white-on-black images. -For these images, it sometimes is more efficient to send -the raster bitmap image directly; see -.BR tiff2ps (1). - -Options -------- - -.. option:: -p number - - Print only the indicated page. - Multiple pages may be printed by specifying - this option more than once. - -.. option:: -x resolution - - Use *resolution* - as the horizontal resolution, in dots/inch, of the image data. - By default this value is taken from the file. - -.. option:: -y resolution - - Use *resolution* - as the vertical resolution, in lines/inch, of the image data. - By default this value is taken from the file. - -.. option:: -S - - Scale each page of image data to fill the output page dimensions. - By default images are presented according to the dimension - information recorded in the TIFF file. - -.. option:: -W width - - Use *width* - as the width, in inches, of the output page. - -.. option:: -H height - - Use *height* - as the height, in inches, of the output page. - -Diagnostics ------------ - -Some messages about malformed TIFF images come from the -TIFF library. - -Various messages about badly formatted facsimile images -may be generated due to transmission errors in received -facsimile. -:program:`fax2ps` -attempts to recover from such data errors by resynchronizing -decoding at the end of the current scanline. -This can result in long horizontal black lines in the resultant -PostScript image. - -Notes ------ - -If the destination printer supports PostScript Level II then -it is always faster to just send the encoded bitmap generated -by the :program:`tiff2ps` program. - -Bugs ----- - -:program:`fax2ps` -should probably figure out when it is doing a poor -job of compressing the output and just generate -PostScript to image the bitmap raster instead. - -See also --------- - -:doc`tiff2ps` (1), :doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2tiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2tiff.rst.txt deleted file mode 100644 index fcf56e7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/fax2tiff.rst.txt +++ /dev/null @@ -1,246 +0,0 @@ -fax2tiff -======== - -.. program:: fax2tiff - -Synopsis --------- - -**fax2tiff** [ *options* ] [ **-o** *output.tif* ] *input.raw* - -Description ------------ - -:program:`fax2tiff` creates a TIFF file containing CCITT -Group 3 or Group 4 encoded data from one or more files containing "raw" -Group 3 or Group 4 encoded data (typically obtained directly from a fax modem). -By default, each row of data in the resultant TIFF -file is 1-dimensionally encoded and -padded or truncated to 1728 pixels, as needed. -The resultant image is a set of low resolution (98 lines/inch) -or medium resolution (196 lines/inch) -pages, each of which is a single strip of data. -The generated file conforms to the TIFF -Class F (FAX) specification for storing facsimile data. -This means, in particular, that each page of the data does -**not** include the trailing -*"return to control"* (``RTC``) code; as required -for transmission by the CCITT Group 3 specifications. -The old, "classic", format is created if the -:option:`-c` option is used. -(The Class F format can also be requested with the -:option:`-f` option.) - -The default name of the output image is :file:`fax.tif`; -this can be changed with the :option:`-o` option. -Each input file is assumed to be a separate page of facsimile data -from the same document. -The order in which input files are specified on the command -line is the order in which the resultant pages appear in the -output file. - -Options -------- - -Options that affect the interpretation of input data are: - -.. option:: -3 - - Assume input data is CCITT Group 3 encoded (default). - -.. option:: -4 - - Assume input data is CCITT Group 4 encoded. - -.. option:: -U - - Assume input data is uncompressed (Group 3 or Group 4). - -.. option:: -1 - - Assume input data is encoded with the 1-dimensional version of the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -2 - - Assume input data is 2-dimensional version of the CCITT - Group 3 Huffman encoding algorithm. - -.. option:: -P - - Assume input data is **not** - EOL-aligned (default). This option has effect with Group 3 encoded input only. - -.. option:: -A - - Assume input data is EOL-aligned. This option has effect with Group 3 - encoded input only. - -.. option:: -M - - Treat input data as having bits filled from most significant bit (``MSB``) to most least bit (``LSB``). - -.. option:: -L - - Treat input data as having bits filled from least significant bit (``LSB``) to most significant bit - (``MSB``) (default). - -.. option:: -B - - Assume input data was encoded with black as 0 and white as 1. - -.. option:: -W - - Assume input data was encoded with black as 1 and white as 0 (default). - -.. option:: -R - - Specify the vertical resolution, in lines/inch, of the input images. - By default input are assumed to have a vertical resolution of 196 lines/inch. - If images are low resolution facsimile, a value of 98 lines/inch should - be specified. - -.. option:: -X - - Specify the width, in pixels, of the input images. - By default input are assumed to have a width of 1728 pixels. - -Options that affect the output file format are: - -.. option:: -o - - Specify the name of the output file. - - -.. option:: -7 - - Force output to be compressed with the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -8 - - Force output to be compressed with the CCITT - Group 4 Huffman encoding. - -.. option:: -u - - Force output to be uncompressed (Group 3 or Group 4). - -.. option:: -5 - - Force output to be encoded with the 1-dimensional version of the CCITT - Group 3 Huffman encoding algorithm. - -.. option:: -6 - - Force output to be encoded with the 2-dimensional version of the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -a - - Force the last bit of each *"End Of Line"* (``EOL``) - code to land on a byte boundary (default). This "zero padding" will - be reflected in the contents of the ``Group3Options`` - tag of the resultant TIFF file. This option has effect with Group 3 encoded output only. - -.. option:: -p - - Do not EOL-align output. This option has effect with Group 3 encoded - output only. - -.. option:: -c - - Generate "classic" Group 3 TIFF format. - -.. option:: -f - - Generate TIFF Class F (TIFF/F) format (default). - -.. option:: -m - - Force output data to have bits filled from most significant bit (``MSB``) - to most least bit (``LSB``). - -.. option:: -l - - Force output data to have bits filled from least significant bit (``LSB``) - to most significant bit (``MSB``) (default). - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. - By default (or when value ``0`` is specified), :program:`tiffcp` - attempts to set the rows/strip - that no more than 8 kilobytes of data appear in a strip (with except of G3/G4 - compression schemes). If you specify special value ``-1`` - it will results in infinite number of the rows per strip. The entire image - will be the one strip in that case. This is default in case of G3/G4 output - compression schemes. - -.. option:: -s - - Stretch the input image vertically by writing each input row of - data twice to the output file. - -.. option:: -v - - Force :program:`fax2tiff` - to print the number of rows of data it retrieved from the input file. - -.. option:: -z - - Force output to be compressed with the LZW encoding. - -Diagnostics ------------ - -The following warnings and errors come from the decoding -routines in the library. - -**"Warning, %s: Premature EOL at scanline %d (x %d).\en"**: - - The input data had a row that was shorter than the expected width. - The row is padded with white. - -**"%s: Premature EOF at scanline %d (x %d).\en"**: - - The decoder ran out of data in the middle of a scanline. - The resultant row is padded with white. - -**"%s: Bad code word at row %d, x %d\en"**: - - An invalid Group 3 ``code`` - was encountered while decoding the input file. - The row number and horizontal position is given. - The remainder of the input row is discarded, while - the corresponding output row is padded with white. - -**"%s: Bad 2D code word at scanline %d.\en"**: - - An invalid Group 4 or 2D Group 3 ``code`` - was encountered while decoding the input file. - The row number and horizontal position is given. - The remainder of the input row is discarded, while - the corresponding output row is padded with white. - -Bugs ----- - -Input data are assumed to have a a "top left" orientation; -it should be possible to override this assumption -from the command line. - -See also --------- - -"CCITT Recommendation T.4" -(Standardization of Group 3 Facsimile Apparatus for Document Transmission). - -"The Spirit of TIFF Class F", -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. - -:doc:`tiffinfo` (1), -:doc:`tiffdither` (1), -:doc:`tiffgt` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/pal2rgb.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/pal2rgb.rst.txt deleted file mode 100644 index 9f949ab..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/pal2rgb.rst.txt +++ /dev/null @@ -1,80 +0,0 @@ -pal2rgb -======= - -.. program:: pal2rgb - -Synopsis --------- - -**pal2rgb** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`pal2rgb` converts a palette color image to a full color image by -applying the colormap of the palette image to each sample to generate a full color -RGB image. - -Options -------- - -Options that affect the interpretation of input data are: - -.. option:: -C numentries - - This option overrides the default behavior of :program:`pal2rgb` - in determining whether or not - colormap entries contain 16-bit or 8-bit values. - By default the colormap is inspected and - if no colormap entry greater than 255 is found, - the colormap is assumed to have only 8-bit values; otherwise - 16-bit values (as required by the TIFF - specification) are assumed. - The - :option:`-C` - option can be used to explicitly specify the number of - bits for colormap entries: - :command:`-C 8` for 8-bit values, - :command:`-C 16` for 16-bit values. - -Options that affect the output file format are: - -.. option:: -p planarconfig - - Explicitly select the planar configuration used in organizing - data samples in the output image: - :command:`-p contig` for samples packed contiguously, and - :command:`-p separate` for samples stored separately. - By default samples are packed. - -.. option:: -c compress - - Use the specified compression algorithm to encoded image data - in the output file: - :command:`-c packbits` for Macintosh Packbits, - :command:`-c lzw` for Lempel-Ziv & Welch, - :command:`-c zip` for Deflate, - :command:`-c none` - for no compression. - If no compression-related option is specified, the input - file's compression algorithm is used. - -.. option:: -r striprows - - Explicitly specify the number of rows in each strip of the - output file. If the :option:`-r` - option is not specified, a number is selected such that each - output strip has approximately 8 kilobytes of data in it. - -Bugs ----- - -Only 8-bit images are handled. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/ppm2tiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/ppm2tiff.rst.txt deleted file mode 100644 index c69f8ff..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/ppm2tiff.rst.txt +++ /dev/null @@ -1,56 +0,0 @@ -ppm2tiff -======== - -.. program:: ppm2tiff - -Synopsis - -**ppm2tiff** [ *options* ] [ *input.ppm* ] *output.tif* - -Description ------------ - -:program:`ppm2tiff` converts a file in the PPM, PGM and PBM image formats to -TIFF. By default, the TIFF image is created with data samples packed -(``PlanarConfiguration=1``), compressed with the Packbits algorithm -(``Compression=32773``), and with each strip no more than 8 kilobytes. -These characteristics can be overridden, or explicitly specified with the -options described below. - -If the PPM file contains greyscale data, then the ``PhotometricInterpretation`` -tag is set to 1 (min-is-black), otherwise it is set to 2 (RGB). - -If no PPM file is specified on the command line, :program:`ppm2tiff` -will read from the standard input. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression (will be used by default), - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c jpeg` for baseline JPEG compression, - :command:`-c zip` for Deflate compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, and - :command:`-c g4` for CCITT Group 4 (T.6) compression. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; by default the number of - rows/strip is selected so that each strip is approximately 8 kilobytes. - -.. option:: -R resolution - - Mark the resultant image to have the specified X and Y resolution (in - dots/inch). - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/raw2tiff.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/raw2tiff.rst.txt deleted file mode 100644 index a9378da..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/raw2tiff.rst.txt +++ /dev/null @@ -1,143 +0,0 @@ -raw2tiff -======== - -.. program:: raw2tiff - - -Synopsis --------- - -**raw2tiff** [ *options ] *input.raw* *output.tif* - -Description ------------ - -:program:`raw2tiff` converts a raw byte sequence into TIFF. -By default, the TIFF image is created with data samples packed -(``PlanarConfiguration=1``), compressed with the PackBits algorithm -(``Compression=32773``), and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. - -Options -------- - -.. option:: -H number - - Size of input image file header in bytes (0 by default). This amount of data - just will be skipped from the start of file while reading. - -.. option:: -w number - - Width of input image in pixels (can be guessed, see :ref:`raw-guess` below). - -.. option: -l number - - length of input image in lines (can be guessed, see :ref:`raw-guess` below). - -:option: -b number - - number of bands in input image (1 by default). - -.. option:: -d datatype - - type of samples in input image, where *datatype* may be one of: - - ========= =================================== - Data type Description - ========= =================================== - byte 8-bit unsigned integer (default) - short 16-bit unsigned integer - long 32-bit unsigned integer - sbyte 8-bit signed integer - sshort 16-bit signed integer - slong 32-bit signed integer - float 32-bit IEEE floating point - double 64-bit IEEE floating point - ========= =================================== - -.. option:: -i config - - type of sample interleaving in input image, where *config* may be one of: - - ============= ================================ - Configuration Description - ============= ================================ - pixel pixel interleaved data (default) - band band interleaved data. - ============= ================================ - -.. option:: -p photo - - photometric interpretation (color space) of the input image, where *photo* may - be one of: - - =========== ============================================== - Photometric Description - =========== ============================================== - miniswhite white color represented with 0 value - minisblack black color represented with 0 value (default) - rgb image has RGB color model - cmyk image has CMYK (separated) color model - ycbcr image has YCbCr color model - cielab image has CIE L*a*b color model - icclab image has ICC L*a*b color model - itulab image has ITU L*a*b color model - =========== ============================================== - -.. option:: -s - - swap bytes fetched from the input file. - -.. option:: -L - - input data has LSB2MSB bit order (default). - -.. option:: -M - - input data has MSB2LSB bit order. - -.. option:: -c - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm (the default), - :command:`-c jpeg` for the baseline JPEG compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`\-c lzw` for Lempel-Ziv & Welch. - -.. option -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. _raw-guess: - -Guessing the image geometry ---------------------------- - -:program:`raw2tif` can guess image width and height in case one or both of these parameters are -not specified. If you omit one of those parameters, the complementary one will -be calculated based on the file size (taking into account header size, number -of bands and data type). If you omit both parameters, the statistical approach -will be used. Utility will compute correlation coefficient between two lines -at the image center using several appropriate line sizes and the highest -absolute value of the coefficient will indicate the right line size. That is -why you should be cautious with the very large images, because guessing -process may take a while (depending on your system performance). Of course, the -utility can't guess the header size, number of bands and data type, so it -should be specified manually. If you don't know anything about your image, -just try with the several combinations of those options. - -There is no magic, it is just a mathematical statistics, so it can be wrong -in some cases. But for most ordinary images guessing method will work fine. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/rgb2ycbcr.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/rgb2ycbcr.rst.txt deleted file mode 100644 index 70a92e0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/rgb2ycbcr.rst.txt +++ /dev/null @@ -1,63 +0,0 @@ -rgb2ycbcr -========= - -.. program:: rgb2ycbcr - -Synopsis --------- - -**rgb2ycbcr** [ *options* ] *src1.tif src2.tif … dst.tif* - -Description ------------ - -:program:`rgb2ycbcr` converts RGB color, greyscale, or bi-level TIFF -images to YCbCr images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is converted to a -separate directory in the destination file. - -By default, chrominance samples are created by sampling -2 by 2 blocks of luminance values; this can be changed with the -:option:`-h` and :option:`-v` options. -Output data are compressed with the ``PackBits`` -compression scheme, by default; an alternate scheme can be selected with the -:option:`-c` option. -By default, output data are compressed in strips with -the number of rows in each strip selected so that the -size of a strip is never more than 8 kilobytes; -the :option:`-r` -option can be used to explicitly set the number of -rows per strip. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm (the default), - :command:`-c jpeg` for the JPEG compression algorithm, - :command:`\-c zip` for the deflate compression algorithm, and - :command:`-c lzw` for Lempel-Ziv & Welch. - -.. option:: -h size - - Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. option:: -v size - - Set the vertical sampling dimension to one of: 1, 2 (default), or 4. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/thumbnail.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/thumbnail.rst.txt deleted file mode 100644 index 46f241d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/thumbnail.rst.txt +++ /dev/null @@ -1,66 +0,0 @@ -thumbnail -========= - -.. program:: thumbnail - -Synopsis --------- - -**thumbnail** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`thumbnail` is a program written to show how one might use the -``SubIFD`` tag (#330) to store thumbnail images. -:program:`thumbnail` -copies a TIFF Class F facsimile file to the output file -and for each image an 8-bit greyscale "thumbnail sketch" is created. -The output file contains the thumbnail image with the associated -full-resolution page linked below with the SubIFD tag. - -By default, thumbnail images are 216 pixels wide by 274 pixels high. -Pixels are calculated by sampling and filtering the input image -with each pixel value passed through a contrast curve. - -Options -------- - -.. option:: -w width - - Specify the width of thumbnail images in pixels. - -.. option:: -h height - - Specify the height of thumbnail images in pixels. - -.. option:: -c contrast - - Specify a contrast curve to apply in generating the thumbnail images. - By default pixels values are passed through a linear contrast curve - that simply maps the pixel value ranges. Alternative curves are: - - ====== ====================== - Curve Description - ====== ====================== - exp50 50% exponential curve - exp60 60% exponential curve - exp70 70% exponential curve - exp80 80% exponential curve - exp90 90% exponential curve - exp pure exponential curve - linear linear curve - ====== ====================== - -Bugs ----- - -There are no options to control the format of the saved thumbnail images. - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffgt` (1), -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2bw.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2bw.rst.txt deleted file mode 100644 index 0ac3248..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2bw.rst.txt +++ /dev/null @@ -1,60 +0,0 @@ -tiff2bw -======= - -.. program:: tiff2bw - -Synopsis --------- - -**tiff2bw** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiff2bw` converts an RGB or Palette color TIFF -image to a greyscale image by -combining percentages of the red, green, and blue channels. -By default, output samples are created by taking -28% of the red channel, 59% of the green channel, and 11% of -the blue channel. To alter these percentages, the -:option:`-R`, :option:`-G`, and :option:`-B` options may be used. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`-c g3` for the CCITT Group 3 compression algorithm, - :command:`-c g4` for the CCITT Group 4 compression algorithm, - :command:`-c lzw` for Lempel-Ziv & Welch (the default). - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. option:: -R redperc - - Specify the percentage of the red channel to use (default 28). - -.. option:: -G greenperc - - Specify the percentage of the green channel to use (default 59). - -.. option:: -B blueperc - - Specify the percentage of the blue channel to use (default 11). - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2pdf.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2pdf.rst.txt deleted file mode 100644 index 84c5314..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2pdf.rst.txt +++ /dev/null @@ -1,211 +0,0 @@ -tiff2pdf -======== - -.. program:: tiff2pdf - -Synopsis --------- - -**tiff2pdf** [ *options* ] *input.tiff* - -Description ------------ - -:program:`tiff2pdf` opens a TIFF image and writes a PDF document to standard output. - -The program converts one TIFF file to one PDF file, including multiple page -TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF -files that contain data of TIFF photometric interpretations of bilevel, -grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by -:program:`libtiff` and PDF. - -If you have multiple TIFF files to convert into one PDF file then use :program:`tiffcp` -or other program to concatenate the files into a multiple page TIFF file. -If the input TIFF file is of huge dimensions (greater than 10000 pixels height -or width) convert the input image to a tiled TIFF if it is not already. - -The standard output is standard output. Set the output file name with the -:option:`-o` option. - -All black and white files are compressed into a single strip CCITT G4 Fax -compressed PDF, unless tiled, where tiled black and white images are -compressed into tiled CCITT G4 Fax compressed PDF, -:program:`libtiff` CCITT support is assumed. - -Color and grayscale data can be compressed using either JPEG compression, -ITU-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using -the :option:`-j` or :option:`-z` options. JPEG compression support -requires that :program:`libtiff` be configured with JPEG support, and -Zip/Deflate compression support requires that :program:`libtiff` -be configured with Zip support. Use only one or the other of -:option:`-j` and :option:`-z`. - -If the input TIFF contains single strip CCITT G4 Fax compressed information, -then that is written to the PDF file without transcoding, unless the options -of no compression and no passthrough are set, :option:`-d` and :option:`-n`. - -If the input TIFF contains JPEG or single strip Zip/Deflate compressed -information, and they are configured, then that is written to the PDF file -without transcoding, unless the options of no compression and no passthrough -are set. - -The default page size upon which the TIFF image is placed is determined by -the resolution and extent of the image data. Default values for the TIFF -image resolution can be set using the :option:`-x` and :option:`-y` -options. The page size can be set using the :option:`-p` -option for paper size, or :option:`-w` and :option:`-l` -for paper width and length, then each page of the TIFF image is centered on -its page. The distance unit for default resolution and page width and -length can be set by the :option:`-u` option, the default unit is inch. - -Various items of the output document information can be set with the -:option:`-e`, :option:`-c`, :option:`-a`, :option:`-t`, :option:`-s`, -and :option:`-k` options. Setting the argument of the option to ``""`` for these -tags causes the relevant document information field to be not written. Some -of the document information values otherwise get their information from the -input TIFF image, the software, author, document name, and image description. - -The Portable Document Format (PDF) specification is copyrighted by Adobe -Systems, Incorporated. - -Options -------- - -.. option:: -o output-file - - Set the output to go to file *output-file* - -.. option:: -j - - Compress with JPEG (requires :program:`libjpeg` configured with - :program:`libtiff`). - -.. option:: -z - - Compress with Zip/Deflate (requires :program`zlib` configured with - :program:`libtiff`). - -.. option:: -q quality - - Set the compression quality, 1-100 for JPEG. - -.. option:: -n - - Do not allow data to be converted without uncompressing, no compressed - data passthrough. - -.. option:: -b - - Set PDF ``Interpolate`` user preference. - -.. option:: -d - - Do not compress (decompress) - except monochrome to CCITT Group 4. - -.. option:: -i - - Invert colors. - -.. option:: -p paper-size - - Set paper size, e.g., ``letter``, ``legal``, ``A4``. - -.. option:: -F - - Cause the tiff to fill the PDF page. - -.. option:: -u [ i | m ] - - Set distance unit, ``i`` for inch, ``m`` for centimeter. - -.. option:: -w width - - Set width in units. - -.. option:: -l length - - Set length in units. - -.. option:: -x xres - - Set x/width resolution default. - -.. option:: -y yres - - Set y/length resolution default. - -.. option:: -r [ d | o ] - - Set ``d`` for resolution default for images without resolution, - ``o`` for resolution override for all images. - -.. option:: -f - - Set PDF ``Fit Window`` user preference. - -.. option:: -e YYYYMMDDHHMMSS - - Set document information date, overrides image or current date/time default, - ``YYYYMMDDHHMMSS``. - -.. option:: -c creator - - Set document information creator, overrides image software default. - -.. option:: -a author - - Set document information author, overrides image artist default. - -.. option:: -t title - - Set document information title, overrides image document name default. - -.. option:: -s subject - - Set document information subject, overrides image image description default. - -.. option:: -k keywords - - Set document information keywords. - -.. option:: -m size - - Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit. - -.. option:: -h - - List usage reminder to stderr and exit. - -Examples --------- - -The following example would generate the file output.pdf from input.tiff: - -.. highlight:: shell - -:: - - tiff2pdf -o output.pdf input.tiff - -The following example would generate PDF output from input.tiff and write it -to standard output: - -:: - - tiff2pdf input.tiff - -The following example would generate the file output.pdf from input.tiff, -putting the image pages on a letter sized page, compressing the output -with JPEG, with JPEG quality 75, setting the title to ``Document``, and setting -the ``Fit Window`` option: - -:: - - tiff2pdf -p letter -j -q 75 -t "Document" -f -o output.pdf input.tiff - -See also --------- - -:doc:`tiffcp` (1), -:doc:`tiff2ps` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2ps.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2ps.rst.txt deleted file mode 100644 index fc88b4d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2ps.rst.txt +++ /dev/null @@ -1,251 +0,0 @@ -tiff2ps -======== - -.. program:: tiff2ps - -Synopsis --------- - -**tiff2ps** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiff2ps` reads TIFF images and writes PostScript™ or Encapsulated -PostScript™ (EPS) on the standard output. By default :program:`tiff2ps` -writes Encapsulated PostScript™ for the first image in the specified -TIFF image file. - -By default, :program:`tiff2ps` will generate PostScript™ that fills a -printed area specified by the TIFF tags in the input file. -If the file does not contain ``XResolution`` or ``YResolution`` -tags, then the printed area is set according to the image dimensions. -The :option:`-w` and :option:`-h` options (see below) -can be used to set the dimensions of the printed area in inches; -overriding any relevant TIFF tags. - -The PostScript™ generated for RGB, palette, and CMYK images uses the -``colorimage`` operator. The PostScript™ generated for greyscale and -bilevel images uses the ``image`` operator. When the ``colorimage`` -operator is used, PostScript™ code to emulate this operator -on older PostScript™ printers is also generated. -Note that this emulation code can be very slow. - -Color images with associated alpha data are composited over -a white background. - -Options -------- - -.. option:: -1 - - Generate PostScript™ Level 1 (the default). - -.. option:: -2 - - Generate PostScript™ Level 2. - -.. option:: -3 - - Generate PostScript™ Level 3. It basically allows one to use the ```/flateDecode`` - filter for ZIP compressed TIFF images. - -.. option:: -8 - - Disable use of ASCII85 encoding with PostScript™ Level 2/3. - -.. option:: -a - - Generate output for all IFDs (pages) in the input file. - -.. option:: -b margin - - Specify the bottom margin for the output (in inches). This does not affect - the height of the printed image. - -.. option:: -c - - Center the image in the output. This option only shows an effect if both - the :option:`-w` and the :option:`-h` option are given. - -.. option:: -C name - - Specify the document creator name. - -.. option:: -d dir - - Set the initial TIFF - directory to the specified directory number. - (NB: Directories are numbered starting at zero.) - This option is useful for selecting individual pages in a - multi-page (e.g. facsimile) file. - -.. option:: -D - - Enable duplex printing (two pages per sheet of paper). - -.. option:: -e - - Force the generation of Encapsulated PostScript™ (implies - :option:`-z`). - -.. option:: -h size - - Specify the vertical size of the printed area (in inches). - -.. option:: -H - - Specify the maximum height of image (in inches). Images with larger sizes will - be split in several pages. Option :option:`-L` - may be used for specifying size of split images overlapping. - -.. option:: -i - - Enable/disable pixel interpolation. This option requires a - single numeric value: zero to disable pixel interpolation and - non-zero to enable. The default is enabled. - -.. option:: -L - - Specify the size of overlapping for split images (in inches). Used in - conjunction with :option:`-H` and :option:`-W` options. - -.. option:: -l - - Specify the left margin for the output (in inches). This does not affect - the width of the printed image. - -.. option:: -M size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - - -.. option:: -m - - Where possible render using the ``imagemask`` PostScript™ operator instead of the - ``image`` operator. When this option is specified :program:`tiff2ps` will use - ``imagemask`` for rendering 1 bit deep images. If this option is not specified - or if the image depth is greater than 1 then the ``image`` operator is used. - -.. option:: -o ifdoffset - - Set the initial TIFF directory to the IFD at the specified file offset. - This option is useful for selecting thumbnail images and the - like which are hidden using the ``SubIFD`` tag. - -.. option:: -O - - Write PostScript™ to specified file instead of standard output. - -.. option:: -p - - Force the generation of (non-Encapsulated) PostScript™. - -.. option:: -P L|P - - Set optional PageOrientation DSC comment to Landscape or Portrait. - -.. option:: -r 90|180|270|auto - - Rotate image by 90, 180, 270 degrees or auto. Auto picks the best - fit for the image on the specified paper size (eg portrait - or landscape) if :option:`-h` or :option:`-w` is specified. Rotation is in degrees - counterclockwise. Auto rotates 90 degrees ccw to produce landscape. - -.. option:: -s - - Generate output for a single IFD (page) in the input file. - -.. option:: -t title - - Specify the document title string. - -.. option:: -T - - Print pages for top edge binding. - -.. option:: -w size - - Specify the horizontal size of the printed area (in inches). - -.. option:: -W size - - Specify the maximum width of image (in inches). Images with larger sizes will - be split in several pages. Options :option:`-L` and :option:`-W` - are mutually exclusive. - -.. option:: -x - - Override resolution units specified in the TIFF as centimeters. - -.. option:: -y - - Override resolution units specified in the TIFF as inches. - -.. option:: -z - - When generating PostScript™ Level 2, data is scaled so that it does not - image into the ``deadzone`` on a page (the outer margin that the printing device - is unable to mark). This option suppresses this behavior. - When PostScript™ Level 1 is generated, data is imaged to the entire printed - page and this option has no affect. - -Examples --------- - -The following generates PostScript™ Level 2 for all pages of a facsimile: - -.. highlight:: shell - -:: - - tiff2ps \-a2 fax.tif | lpr - -Note also that if you have version 2.6.1 or newer of Ghostscript then you -can efficiently preview facsimile generated with the above command. - -To generate Encapsulated PostScript™ for a the image at directory 2 -of an image use: - -:: - - tiff2ps \-d 1 foo.tif - -(Notice that directories are numbered starting at zero.) - -If you have a long image, it may be split in several pages: - -:: - - tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps - -The page size is set to 8.5x11 by :option:`-w` and :option:`-h` -options. We will accept a small amount of vertical compression, so -:option:`-H` set to 14. Any pages between 11 and 14 inches will be fit onto one page. -Pages longer than 14 inches are cut off at 11 and continued on the next -page. The :command:`-L.5` -option says to repeat a half inch on the next page (to improve readability). - -Bugs ----- - -Because PostScript™ does not support the notion of a colormap, -8-bit palette images produce 24-bit PostScript™ images. -This conversion results in output that is six times -bigger than the original image and which takes a long time -to send to a printer over a serial line. -Matters are even worse for 4-, 2-, and 1-bit palette images. - -Does not handle tiled images when generating PostScript™ Level I output. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffgt` (1), -:doc:`tiffmedian` (1), -:doc:`tiff2bw` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2rgba.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2rgba.rst.txt deleted file mode 100644 index 9c06780..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiff2rgba.rst.txt +++ /dev/null @@ -1,77 +0,0 @@ -tiff2rgba -========= - -.. program:: tiff2rgba - -Synopsis --------- - -**tiff2rgba** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiff2rgba` converts a wide variety of TIFF images into an RGBA TIFF image. This -includes the ability to translate different color spaces and photometric -interpretation into RGBA, support for alpha blending, and translation -of many different bit depths into a 32bit RGBA image. - -Internally this program is implemented using the :c:func:`TIFFReadRGBAImage` -function, and it suffers any limitations of that function. This includes -limited support for > 8 ``BitsPerSample`` images, and flaws with some -esoteric combinations of ``BitsPerSample``, photometric interpretation, -block organization and planar configuration. - -The generated images are stripped images with four samples per pixel -(red, green, blue and alpha) or if the :option:`-n` flag is used, three samples -per pixel (red, green, and blue). The resulting images are always planar -configuration contiguous. For this reason, this program is a useful utility -for transform exotic TIFF files into a form ingestible by almost any TIFF -supporting software. - -Options -------- - -.. option:: -c - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression (the default), - :command:`-c packbits` for the PackBits compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`-c jpeg` for the JPEG compression algorithm, and - :command:`-c lzw` for Lempel-Ziv & Welch. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - - -.. option:: -b - - Process the image one block (strip/tile) at a time instead of by reading - the whole image into memory at once. This may be necessary for very large - images on systems with limited RAM. - -.. option:: -n - - Drop the alpha component from the output file, producing a pure RGB file. - Currently this does not work if the :option:`-b` flag is also in effect. - -.. option:: -B - - Use this value as the background when doing alpha compositing (dropping the - alpha component). - -.. option:: -M size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -See also --------- - -:doc:`tiff2bw` (1), -:doc:`/functions/TIFFReadRGBAImage` (3tiff), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcmp.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcmp.rst.txt deleted file mode 100644 index 8b22aa1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcmp.rst.txt +++ /dev/null @@ -1,59 +0,0 @@ -tiffcmp -======= - -.. program:: tiffcmp - -Synopsis --------- - -**tiffcmp** [ *options* ] *file1.tif* *file2.tif* - -Description ------------ - -:program:`tiffcmp` compares the tags and data in two files created according -to the Tagged Image File Format, Revision 6.0. -The schemes used for compressing data in each file -are immaterial when data are compared\-data are compared on -a scanline-by-scanline basis after decompression. -Most directory tags are checked; notable exceptions are: -``GrayResponseCurve``, ``ColorResponseCurve``, and ``ColorMap`` tags. -Data will not be compared if any of the ``BitsPerSample``, -``SamplesPerPixel``, or ``ImageWidth`` values are not equal. -By default, :program:`tiffcmp` will terminate if it encounters any difference. - -Options -------- - -.. option:: -l - - List each byte of image data that differs between the files. - -.. option:: -z number - - List specified number of image data bytes that differs between the files. - -.. option:: -t - - Ignore any differences in directory tags. - -Bugs ----- - -Tags that are not recognized by the library are not -compared; they may also generate spurious diagnostics. - -The image data of tiled files is not compared, since the :c:func:`TIFFReadScanline` -function is used. An error will be reported for tiled files. - -The pixel and/or sample number reported in differences may be off -in some exotic cases. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcp.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcp.rst.txt deleted file mode 100644 index b38c69f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcp.rst.txt +++ /dev/null @@ -1,255 +0,0 @@ -tiffcp -====== - -.. program:: tiffcp - -Synopsis --------- - -**tiffcp** [ *options* ] *src1.tif* … *srcN.tif* *dst.tif* - -Description ------------ -:program:`tiffcp` combines one or more files created according -to the Tag Image File Format, Revision 6.0 into a single TIFF file. -Because the output file may be compressed using a different -algorithm than the input files, :program:`tiffcp` is most often -used to convert between different compression schemes. - -By default, :program:`tiffcp` will copy all the understood tags in a -TIFF directory of an input file to the associated directory in the output file. - -:program:`tiffcp` can be used to reorganize the storage characteristics of data -in a file, but it is explicitly intended to not alter or convert -the image data content in any way. - -Options -------- - -.. option:: -a - - Append to an existing output file instead of overwriting it. - -.. option:: -b image - - subtract the following monochrome image from all others - processed. This can be used to remove a noise bias - from a set of images. This bias image is typically an - image of noise the camera saw with its shutter closed. - -.. option:: -B - - Force output to be written with Big-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -C - - Suppress the use of "strip chopping" when reading images - that have a single strip/tile of uncompressed data. - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c zip` for Deflate compression, - :command:`-c lzma` for LZMA2 compression, - :command:`-c jpeg` for baseline JPEG compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, - :command:`-c g4` for CCITT Group 4 (T.6) compression, or - :command:`-c sgilog` for SGILOG compression. - - By default :program:`tiffcp` will compress data according to the - value of the ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - - * ``1d`` for 1-dimensional encoding, - * ``2d`` for 2-dimensional encoding, and - * ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. :command:`-c g3:2d:fill` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW, Deflate and LZMA2 compression can be specified together with a - ``predictor`` value. A predictor value of 2 causes each scanline of the output image to - undergo horizontal differencing before it is encoded; a value of 1 forces each - scanline to be encoded without differencing. A value 3 is for floating point - predictor which you can use if the encoded data are in floating point format. - LZW-specific options are specified by appending a ``:``-separated list to the - ``lzw`` option; e.g. :command:`-c lzw:2` for LZW compression with horizontal differencing. - - Deflate and LZMA2 encoders support various compression levels (or encoder presets) set as - character ``p`` and a preset number. ``p1`` is the fastest one with the worst - compression ratio and ``p9`` is the slowest but with the best possible ratio; - e.g. :command:`-c zip:3:p9` for - Deflate encoding with maximum compression level and floating point predictor. - - For the Deflate codec, and in a libtiff build with libdeflate enabled, ``p12`` is - actually the maximum level. - - For the Deflate codec, and in a libtiff build with libdeflate enabled, ``s0`` can be used to - require zlib to be used, and ``s1`` for libdeflate (defaults to libdeflate when - it is available). - -.. option:: -f fillorder - - Specify the bit fill order to use in writing output data. By default, :program:`tiffcp` - will create a new file with the same fill order as the original. Specifying :command:`\-f lsb2msb` - will force data to be written with the ``FillOrder`` tag set to ``LSB2MSB``, while - :command:`\-f msb2lsb` will force data to be written with the ``FillOrder`` tag set to - ``MSB2LSB``. - -.. option:: -i - - Ignore non-fatal read errors and continue processing of the input file. - -.. option:: -l - - Specify the length of a tile (in pixels). - - :program:`tiffcp` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -L - - Force output to be written with Little-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -M - - Suppress the use of memory-mapped files when reading images. - -.. option:: -o offset - - Set initial directory offset. - -.. option:: -p - - Specify the planar configuration to use in writing image data - that has one 8-bit sample per pixel. By default, :program:`tiffcp` - will create a new file with the same planar configuration as - the original. Specifying :command:`\-p contig` - will force data to be written with multi-sample data packed - together, while :command:`-p separate` - will force samples to be written in separate planes. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. By default (or when value **0** - is specified), :program:`tiffcp` attempts to set the rows/strip - that no more than 8 kilobytes of data appear in a strip. If you specify - special value **-1** it will results in infinite number of the rows per - strip. The entire image will be the one strip in that case. - -.. option:: -s - - Force the output file to be written with data organized in strips - (rather than tiles). - -.. option:: -t - - Force the output file to be written with data organized in tiles (rather than - strips). options can be used to force the resultant image to be written as - strips or tiles of data, respectively. - -.. option:: -w - - Specify the width of a tile (in pixels). :program::`tiffcp` - attempts to set the tile dimensions so that no more than 8 kilobytes of data - appear in a tile. - -.. option:: -x - - Force the output file to be written with ``PAGENUMBER`` value in sequence. - -.. option:: -8 - - Write BigTIFF instead of classic TIFF format. - -.. option:: -,= character - - substitute *character* for ``,`` - in parsing image directory indices - in files. This is necessary if filenames contain commas. - Note that ``-,=`` - with whitespace immediately following will disable - the special meaning of the ``,`` entirely. See examples. - -.. option:: -m size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -Examples --------- - -The following concatenates two files and writes the result using LZW encoding: - -.. highlight:: shell - -:: - - tiffcp -c lzw a.tif b.tif result.tif - -To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used: - -:: - - tiffcp -c g4 -r 10000 g3.tif g4.tif - -(1000 is just a number that is larger than the number of rows in -the source file.) - -To extract a selected set of images from a multi-image TIFF file, the file -name may be immediately followed by a ``,`` separated list of image directory -indices. The first image is always in directory 0. Thus, to copy the 1st and -3rd images of image file :file:`album.tif` to :file:`result.tif`: - -:: - - tiffcp album.tif,0,2 result.tif - -A trailing comma denotes remaining images in sequence. The following command -will copy all image with except the first one: - -:: - - tiffcp album.tif,1, result.tif - -Given file :file:`CCD.tif` whose first image is a noise bias -followed by images which include that bias, -subtract the noise from all those images following it -(while decompressing) with the command: - -:: - - tiffcp -c none -b CCD.tif CCD.tif,1, result.tif - -If the file above were named :file:`CCD,X.tif`, the ``-,=`` -option would be required to correctly parse this filename with image numbers, -as follows: - -:: - - tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcmp` (1), -:doc:`tiffmedian` (1), -:doc:`tiffsplit` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcrop.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcrop.rst.txt deleted file mode 100644 index d7d89ca..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffcrop.rst.txt +++ /dev/null @@ -1,547 +0,0 @@ -tiffcrop -======== - -.. program:: tiffcrop - -Synopsis --------- - -**tiffcrop** [ *options* ] *src1.tif* … *srcN.tif* *dst.tif* - -Description ------------ - -:program:`tiffcrop` processes one or more files created according -to the Tag Image File Format, Revision 6.0, specification -into one or more TIFF file(s). -:program:`tiffcrop` is most often used to extract portions of an image for processing -with bar code recognizer or OCR software when that software cannot -restrict the region of interest to a specific portion of the image -or to improve efficiency when the regions of interest must be rotated. -It can also be used to subdivide all or part of a processed image into -smaller sections and export individual images or sections of images -as separate files or separate images within one or more files derived -from the original input image or images. - -The available functions can be grouped broadly into three classes: - -#. Those that select individual images or sections of images from the input files. - The options :option:`-N` for sequences or lists of individual images in the input files, - :option:`-Z` for zones, :option:`-z` for regions, :option:`-X` and :option:`-Y` for fixed sized selections, - :option:`-m` for margins, :option:`-U` for units, and :option:`-E` for edge reference provide a variety of - ways to specify portions of the input image. - -#. Those that allow the individual images or selections to be exported to one or - more output files in different groupings and control the organization of the - data in the output images. The options :option:`-P` for page size grouping, :option:`-S` for - subdivision into columns and rows and :option:`-e` for export mode options that produce - one or more files from each input image. The options :option:`-r`, :option:`-s`, :option:`-t`, :option:`-w` control - strip and tile format and sizes while :option:`-B`, :option:`-L`, :option:`-c`, :option:`-f` modify the endian addressing - scheme, the compression options, and the bit fill sequence of images as they - are written. - -#. Those that perform some action on each image that is selected from the input file. - The options include :option:`-R` for rotate, :option:`-I` for inversion of the photometric - interpretation and/or data values, and :option:`-F` to flip (mirror) the image horizontally - or vertically. - -Functions are applied to the input image(s) in the following order: -cropping, fixed area extraction, zone and region extraction, -inversion, mirroring, rotation. - -Functions are applied to the output image(s) in the following order: -export mode options for grouping zones, regions, or images into -one or more files, *or* row and column divisions with output margins, -*or* page size divisions with page orientation options. - -Finally, strip, tile, byte order, output resolution, and compression options are -applied to all output images. - -The output file(s) may be organized and compressed using a different -algorithm from the input files. -By default, :program:`tiffcrop` will copy all the understood tags in a TIFF -directory of an input file to the associated directory in the output file. -Options can be used to force the resultant image to be written as strips -or tiles of data, respectively. - -:program:`tiffcrop` can be used to reorganize the storage characteristics of data -in a file, and to reorganize, extract, rotate, and otherwise -process the image data as specified at the same time whereas -:program:`tiffcp` does not alter the image data within the file. - -Using the options for selecting individual input images and the -options for exporting images and/or segments defined as zones or -regions of each input image, :program:`tiffcrop` can perform the -functions of :program:`tiffcp` and :program:`tiffsplit` in a single pass -while applying multiple operations to individual selections or images. - -Options -------- - -.. option:: -h - - Display the syntax summary for tiffcrop. - -.. option:: -v - - Report the current version and last modification date for tiffcrop. - -.. option:: -N odd|even|#,#-#,#|last - - Specify one or more series or range(s) of images within each file to process. - The words ``odd`` or ``even`` - may be used to specify all odd or even numbered images counting from one. - Note that internally, TIFF images are numbered from zero rather than one - but since this convention is not obvious to most users, :program:`tiffcrop` used 1 - to specify the first image in a multipage file. The word ``last`` - may be used in place of a number in the sequence to indicate the - final image in the file without knowing how many images there are. - Ranges of images may be specified with a dash and multiple sets - can be indicated by joining them in a comma-separated list. eg. use - ``-N 1,5-7,last`` - to process the 1st, 5th through 7th, and final image in the file. - -.. option:: -E top|bottom|left|right - - Specify the ``top``, ``bottom``, ``left``, or ``right`` edge as the reference from - which to calculate the width and length of crop regions or sequence - of positions for zones. When used with the :option:`-e` option for exporting - zones or regions, the reference edge determines how composite images - are arranged. Using ``-E left`` or ``-E right`` causes successive zones or - regions to be merged horizontally whereas using ``-E top`` or ``-E bottom`` - causes successive zones or regions to be arranged vertically. This - option has no effect on export layout when multiple zones or regions - are not being exported to composite images. Edges may be abbreviated - to the first letter. - -.. option:: -e combined|divided|image|multiple|separate - - Specify the export mode for images and selections from input images. - The final filename on the command line is considered to be the - destination file or filename stem for automatically generated - sequences of files. Modes may be abbreviated to the first letter. - - .. list-table:: Export modes - :widths: 5 20 - :header-rows: 1 - - * - Export mode - - Description - - * - combined - - All images and selections are written to a single file with - multiple selections from one image combined into a single image (default) - * - divided - - All images and selections are written to a single file - with each selection from one image written to a new image - * - image - - Each input image is written to a new file (numeric filename sequence) - with multiple selections from the image combined into one image - * - multiple - - Each input image is written to a new file (numeric filename sequence) - with each selection from the image written to a new image - * - separate - - Individual selections from each image are written to separate files - -.. option:: -U in|cm|px - - Specify the type of units to apply to dimensions for margins and - crop regions for input and output images. Inches or centimeters - are converted to pixels using the resolution unit specified in the - TIFF file (which defaults to inches if not specified in the IFD). - -.. option:: -m top,left,bottom,right - - Specify margins to be removed from the input image. The order must - be *top*, *left*, *bottom*, *right* with only commas separating the elements - of the list. Margins are scaled according to the current units and - removed before any other extractions are computed. - -.. option:: -X # - - Set the horizontal (X-axis) dimension of a region to extract relative to - the specified origin reference. If the origin is the top or bottom - edge, the X axis value will be assumed to start at the left edge. - -.. option:: -Y # - - Set the vertical (Y-axis) dimension of a region to extract relative to - the specified origin reference. If the origin is the left or right - edge, the Y axis value will be assumed to start at the top. - -.. option:: -Z #:#,#:# - - Specify zones of the image designated as position X of Y equal sized portions - measured from the reference edge, eg 1:3 would be first third of the - image starting from the reference edge minus any margins specified - for the confining edges. Multiple zones can be specified as a comma - separated list but they must reference the same edge. To extract the - top quarter and the bottom third of an image you would use - ``-Z 1:4,3:3``. - -.. option:: -z x1,y1,x2,y2: ... :xN,yN,xN+1,yN+1 - - Specify a series of coordinates to define regions for processing and exporting. - The coordinates represent the top left and lower right corners of each region - in the current units, eg inch, cm, or pixels. Pixels are counted from one to - width or height and inches or cm are calculated from image resolution data. - - Each colon delimited series of four values represents the horizontal and vertical - offsets from the top and left edges of the image, regardless of the edge specified - with the :option:`-E` option. The first and third values represent the horizontal offsets of - the corner points from the left edge while the second and fourth values represent - the vertical offsets from the top edge. - -.. option:: -F horiz|vert - - Flip, ie mirror, the image or extracted region horizontally or vertically. - -.. option:: -R 90|180|270 - - Rotate the image or extracted region 90, 180, or 270 degrees clockwise. - -.. option:: -I [black|white|data|both] - - Invert color space, eg dark to light for bilevel and grayscale images. - This can be used to modify negative images to positive or to correct - images that have the ``PHOTOMETRIC_INTERPRETATION`` tag set incorrectly. - If the value is black or white, the ``PHOTOMETRIC_INTERPRETATION`` tag is set to - MinIsBlack or MinIsWhite, without altering the image data. If the argument - is data or both, the data values of the image are modified. Specifying both - inverts the data and the ``PHOTOMETRIC_INTERPRETATION`` tag, whereas using data - inverts the data but not the ``PHOTOMETRIC_INTERPRETATION`` tag. - No support for modifying the color space of color images in this release. - -.. option:: -H # - - Set the horizontal resolution of output images to *#*, - expressed in the current units. - -.. option:: -V # - - Set the vertical resolution of the output images to *#* - expressed in the current units. - -.. option:: -J # - - Set the horizontal margin of an output page size to *#* - expressed in the current units when sectioning image into *columns* × *rows* - subimages using the :option:`-S` ``cols:rows`` option. - -.. option:: -K # - - Set the vertical margin of an output page size to *#* - expressed in the current units when sectioning image into *columns* × *rows* - subimages using the :option:`-S` ``cols:rows`` option. - -.. option:: -O portrait|landscape|auto - - Set the output orientation of the pages or sections. - Auto will use the arrangement that requires the fewest pages. - This option is only meaningful in conjunction with the :option:`-P` - option to format an image to fit on a specific paper size. - -.. option:: -P page - - Format the output images to fit on page size paper. Use - ``-P list`` to show the supported page sizes and dimensions. - You can define a custom page size by entering the width and length of the - page in the current units with the following format ``#.#x#.#``. - -.. option:: -S cols:rows - - Divide each image into cols across and rows down equal sections. - -.. option:: -B - - Force output to be written with Big-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -C - - Suppress the use of "strip chopping" when reading images - that have a single strip/tile of uncompressed data. - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c jpeg` for baseline JPEG compression. - :command:`-c zip` for Deflate compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, - :command:`-c g4` for CCITT Group 4 (T.6) compression. - By default :program:`tiffcrop` will compress data according to the value of the - ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - ``1d`` for 1-dimensional encoding, - ``2d`` for 2-dimensional encoding, - ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. ``-c g3:2d:fill`` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW compression can be specified together with a ``predictor`` - value. A predictor value of 2 causes - each scanline of the output image to undergo horizontal - differencing before it is encoded; a value - of 1 forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW - compression with horizontal differencing. - -.. option:: -f - - Specify the bit fill order to use in writing output data. - By default, :program:`tiffcrop` - will create a new file with the same fill order as the original. - Specifying - ``-f lsb2msb`` - will force data to be written with the ``FillOrder`` tag set to - ``LSB2MSB``, while - ``-f msb2lsb`` will force data to be written with the ``FillOrder`` - tag set to ``MSB2LSB``. - -.. option:: -i - - Ignore non-fatal read errors and continue processing of the input file. - -.. option:: -k size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -.. option:: -l - - Specify the length of a tile (in pixels). - :program:`tiffcrop` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -L - - Force output to be written with Little-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -M - - Suppress the use of memory-mapped files when reading images. - -.. option:: -p - - Specify the planar configuration to use in writing image data - that has more than one sample per pixel. - By default, :program:`tiffcrop` - will create a new file with the same planar configuration as - the original. - Specifying :command:`-p contig` - will force data to be written with multi-sample data packed - together, while - :command:`-p separate` - will force samples to be written in separate planes. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. - By default (or when value **0** is specified), :program:`tiffcrop` - attempts to set the rows/strip that no more than 8 kilobytes of - data appear in a strip. If you specify the special value - **-1** it will results in infinite number of the rows per strip. The entire image - will be the one strip in that case. - -.. option:: -s - - Force the output file to be written with data organized in strips - (rather than tiles). - -.. option:: -t - - Force the output file to be written with data organized in tiles - (rather than strips). - -.. option:: -w - - Specify the width of a tile (in pixels). - :program:`tiffcrop` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -D opt1:value1,opt2:value2,opt3:value3:opt4:value4 - - Debug and dump facility - - Display program progress and/or dump raw data to non-TIFF files. - Options include the following and must be joined as a comma - separated list. The use of this option is generally limited to - program debugging and development of future options. An equal sign - may be substituted for the colon in option:value pairs. - - ``debug:N``: - - Display limited program progress indicators where larger *N* - increases the level of detail. - - ``format:txt|raw``: - - Format any logged data as ASCII text or raw binary - values. ASCII text dumps include strings of ones and zeroes representing - the binary values in the image data plus identifying headers. - - ``level:N``: - - Specify the level of detail presented in the dump files. - This can vary from dumps of the entire input or output image data to dumps - of data processed by specific functions. Current range of levels is 1 to 3. - - ``input:full-path-to-directory/input-dumpname``: - - ``output:full-path-to-directory/output-dumpname``: - - When dump files are being written, each image will be written to a separate - file with the name built by adding a numeric sequence value to the dumpname - and an extension of :file:`.txt` for ASCII dumps or :file:`.bin` for binary dumps. - - The four debug/dump options are independent, though it makes little sense to - specify a dump file without specifying a detail level. - - Note: :program:`tiffcrop` may be compiled with :command:`-DDEVELMODE` to enable - additional very low level debug reporting. - -However, not all option combinations are permitted. - - Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive. - In no case should the options be applied to a given selection successively. - - Note 2: Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options - such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. - -Examples --------- - -The following concatenates two files and writes the result using LZW -encoding: - -.. highlight:: shell - -:: - - tiffcrop -c lzw a.tif b.tif result.tif - -To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used: - -:: - - tiffcrop -c g4 -r 10000 g3.tif g4.tif - -(1000 is just a number that is larger than the number of rows in -the source file.) - -To extract a selected set of images from a multi-image TIFF file -use the :option:`-N` option described above. Thus, to copy the 1st and 3rd -images of image file :file:`album.tif` to :file:`result.tif`: - -:: - - tiffcrop -N 1,3 album.tif result.tif - -Invert a bilevel image scan of a microfilmed document and crop off margins of -0.25 inches on the left and right, 0.5 inch on the top, and 0.75 inch on the -bottom. From the remaining portion of the image, select the second and third -quarters, ie, one half of the area left from the center to each margin: - -:: - - tiffcrop -U in -m 0.5,0.25,0.75,0.25 -E left -Z 2:4,3:4 -I both MicrofilmNegative.tif MicrofilmPostiveCenter.tif - -Extract only the final image of a large Architectural E sized -multipage TIFF file and rotate it 90 degrees clockwise while -reformatting the output to fit on tabloid sized sheets with one -quarter of an inch on each side: - -:: - - tiffcrop -N last -R 90 -O auto -P tabloid -U in -J 0.25 -K 0.25 -H 300 -V 300 Big-PlatMap.tif BigPlatMap-Tabloid.tif - -The output images will have a specified resolution of 300 dpi in both -directions. The orientation of each page will be determined by whichever -choice requires the fewest pages. To specify a specific orientation, use -the portrait or landscape option. The paper size option does not resample -the image. It breaks each original image into a series of smaller images -that will fit on the target paper size at the specified resolution. - -Extract two regions 2048 pixels wide by 2048 pixels high from each page of -a multi-page input file and write each region to a separate output file: - -:: - - tiffcrop -U px -z 1,1,2048,2048:1,2049,2048,4097 -e separate CheckScans.tiff Check - -The output file names will use the stem :file:`Check` with a numeric suffix which is -incremented for each region of each image, eg :file:`Check-001.tiff`, -:file:`Check-002.tiff` … :file:`Check-NNN.tiff`. To produce a unique file for each page -of the input image with one new image for each region of the input image on that page -change the export option to ``-e multiple``. - -Notes ------ - -In general, bilevel, grayscale, palette and RGB(A) data with bit depths -from 1 to 32 bits should work in both interleaved and separate plane -formats. Unlike :program:`tiffcp`, :program:`tiffcrop` can read and write tiled images with -bits per sample that are not a multiple of 8 in both interleaved and -separate planar format. Floating point data types are supported at -bit depths of 16, 24, 32 and 64 bits per sample. - -Not all images can be converted from one compression scheme to another. -Data with some photometric interpretations and/or bit depths are tied to -specific compression schemes and vice-versa, e.g. Group 3/4 compression -is only usable for bilevel data. JPEG compression is only usable on 8 -bit per sample data (or 12 bit if :program:`libtiff` -was compiled with 12 bit JPEG support). Support for OJPEG compressed -images is problematic at best. Since OJPEG compression is no longer -supported for writing images with LibTIFF, these images will be updated -to the newer JPEG compression when they are copied or processed. This -may cause the image to appear color shifted or distorted after conversion. -In some cases, it is possible to remove the original compression from -image data using the option ``-c none``. - -:program:`tiffcrop` does not currently provide options to up or downsample data to -different bit depths or convert data from one photometric interpretation -to another, e.g. 16 bits per sample to 8 bits per sample or RGB to grayscale. - -:program:`tiffcrop` is very loosely derived from code in :program:`tiffcp` -with extensive modifications and additions to support the selection of input -images and regions and the exporting of them to one or more output files in -various groupings. The image manipulation routines are entirely new and -additional ones may be added in the future. It will handle tiled images with -bit depths that are not a multiple of eight that tiffcp may refuse to read. - -:program:`tiffcrop` was designed to handle large files containing many moderate sized images -with memory usage that is independent of the number of images in the file. -In order to support compression modes that are not based on individual -scanlines, e.g. JPEG, it now reads images by strip or tile rather than by -individual scanlines. In addition to the memory required by the input and -output buffers associated with :program:`libtiff` -one or more buffers at least as large as the largest image to be read are -required. The design favors large volume document processing uses over -scientific or graphical manipulation of large datasets as might be found -in research or remote sensing scenarios. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcmp` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`tiffsplit` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdither.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdither.rst.txt deleted file mode 100644 index 9183259..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdither.rst.txt +++ /dev/null @@ -1,93 +0,0 @@ -tiffdither -========== - -.. program:: tiffdither - -Synopsis --------- - -**tiffdither** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiffdither` converts a single channel 8-bit greyscale image to a bilevel image -using Floyd-Steinberg error propagation with thresholding. - -Options -------- - -.. option:: -c compress - - Specify the compression to use for data written to the output file: - - =========== =================================== - Compression Description - =========== =================================== - none no compression - packbits PackBits compression - lzw Lempel-Ziv & Welch compression - zip Deflate compression - g3 CCITT Group 3 (T.4) compression - g4 for CCITT Group 4 (T.6) compression - =========== =================================== - - By default :program:`tiffdither` - will compress data according to the value of the - ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - ``1d`` for 1-dimensional encoding, - ``2d`` for 2-dimensional encoding, and - ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. ``-c g3:2d:fill`` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW compression can be specified together with a ``predictor`` value. - A predictor value of 2 causes each scanline of the output image to undergo - horizontal differencing before it is encoded; a value - of 1 forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW - compression with horizontal differencing. - -.. option:: -f - - Specify the bit fill order to use in writing output data. - By default, :program:`tiffdither` - will create a new file with the same fill order as the original. - Specifying - :command:`-f lsb2msb` will force data to be written with the - ``FillOrder`` tag set to ``LSB2MSB``, while - :command:`-f msb2lsb` will force data to be written with the - ``FillOrder`` tag set to ``MSB2LSB``. - -.. option:: -r - - Make each strip have no more than the given number of rows. - -.. option:: -t - - Set the threshold value for dithering. - By default the threshold value is 128. - -Notes ------ - -The dither algorithm is taken from the :program:`tiffmedian` -program (written by Paul Heckbert). - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`fax2tiff` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiff2bw` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdump.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdump.rst.txt deleted file mode 100644 index 713f17d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffdump.rst.txt +++ /dev/null @@ -1,52 +0,0 @@ -tiffdump -======== - -.. program:: tiffdump - -Synopsis --------- - -**tiffdump** [ *options* ] *name* … - -Description ------------ - -:program:`tiffdump` displays directory information from files created according -to the Tag Image File Format, Revision 6.0. -The header of each TIFF file (magic number, version, and first directory offset) -is displayed, followed by the tag contents of each directory in the file. -For each tag, the name, data type, count, and value(s) is displayed. -When the symbolic name for a tag or data type is known, the symbolic -name is displayed followed by it's numeric (decimal) value. -Tag values are displayed enclosed in ``<>`` characters immediately -preceded by the value of the count field. -For example, an ``ImageWidth`` -tag might be displayed as ``ImageWidth (256) SHORT (3) 1<800>``. - -:program:`tiffdump` is particularly useful for investigating the contents of -TIFF files that :program:`libtiff` does not understand. - -Options -------- - -.. option:: -h - - Force numeric data to be printed in hexadecimal rather than the - default decimal. - -.. option:: -m items - - Change the number of indirect data items that are printed. By default, this - will be 24. - -.. option:: -o offset - - Dump the contents of the IFD at the a particular file offset. - The file offset may be specified using the usual C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffgt.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffgt.rst.txt deleted file mode 100644 index ad83f43..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffgt.rst.txt +++ /dev/null @@ -1,186 +0,0 @@ -tiffgt -====== - -.. program:: tiffgt - -Synopsis --------- - -**tiffgt** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiffgt` displays one or more images stored using the -Tag Image File Format, Revision 6.0. - -:program:`tiffgt` correctly handles files with any of the following characteristics: - - .. list-table:: Supported tag values - :widths: 5 20 - :header-rows: 1 - - * - Tag - - Value - - * - BitsPerSample - - 1, 2, 4, 8, 16 - * - SamplesPerPixel - - 1, 3, 4 (the 4th sample is ignored) - * - PhotometricInterpretation - - 0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr) - * - PlanarConfiguration - - 1 (contiguous), 2 (separate) - * - Orientation - - 1 (top-left), 4 (bottom-left) - -Data may be organized as strips or tiles and may be -compressed with any of the compression algorithms supported -by the :program:`libtiff` library. - -For palette images (``PhotometricInterpretation=3``), :program:`tiffgt` -inspects the colormap values and assumes either 16-bit -or 8-bit values according to the maximum value. -That is, if no colormap entry greater than 255 is found, -:program:`tiffgt` assumes the colormap has only 8-bit values; otherwise -it assumes 16-bit values. -This inspection is done to handle old images written by -previous (incorrect) versions of -:program:`libtiff`. - -:program:`tiffgt` can be used to display multiple images one-at-a-time. -The left mouse button switches the display to the first image in the -*next* file in the list of files specified on the command line. -The right mouse button switches to the first image in the -*previous* file in the list. -The middle mouse button causes the first image in the first file -specified on the command line to be displayed. -In addition the following keyboard commands are recognized: - - .. list-table:: Action keys - :widths: 2 23 - :header-rows: 1 - - * - Key - - Description - - * - :kbd:`b` - - Use a ``PhotometricInterpretation`` - of ``MinIsBlack`` in displaying the current image - * - :kbd:`l` - - Use a ``FillOrder`` of lsb-to-msb in decoding the current image - * - :kbd:`m` - - Use a ``FillOrder`` of msb-to-lsb in decoding the current image - * - :kbd:`c` - - Use a colormap visual to display the current image - * - :kbd:`r` - - Use a true color (24-bit RGB) visual to display the current image - * - :kbd:`w` - - Use a ``PhotometricInterpretation`` of ``MinIsWhite`` in displaying - the current image - * - :kbd:`W` - - Toggle (enable/disable) display of warning messages from the - TIFF library when decoding images - * - :kbd:`E` - - Toggle (enable/disable) display of error messages from the - TIFF library when decoding images. - * - :kbd:`z` - - Reset all parameters to their default settings (``FillOrder``, - ``PhotometricInterpretation``, handling of warnings and errors) - * - :kbd:`PageUp` - - Display the previous image in the current file or the last - image in the previous file - * - :kbd:`PageDown` - - Display the next image in the current file or the first image - in the next file - * - :kbd:`Home` - - Display the first image in the current file - * - :kbd:`End` - - Display the last image in the current file (unimplemented) - -Options -------- - -.. option:: -c - - Force image display in a colormap window. - -.. option:: -d - - Specify an image to display by directory number. - By default the first image in the file is displayed. - Directories are numbered starting at zero. - -.. option:: -e - - Enable reporting of error messages from the TIFF library. - By default :program:`tiffgt` silently ignores images that cannot be read. - -.. option:: -f - - Force :program:`tiffgt` to run as a foreground process. - By default :program:`tiffgt` will place itself in the background once it - has opened the requested image file. - -.. option:: -l - - Force the presumed bit ordering to be LSB to MSB. - -.. option:: -m - - Force the presumed bit ordering to be MSB to LSB. - - -.. option:: -o - - Specify an image to display by directory offset. - By default the first image in the file is displayed. - Directories offsets may be specified using C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - - -.. option:: -p - - Override the value of the ``PhotometricInterpretation`` - tag; the parameter may be one of: ``miniswhite`` , - ``minisblack``, ``rgb``, ``palette``, ``mask``, - ``separated``, ``ycbcr``, and ``cielab``. - -.. option:: -r - - Force image display in a full color window. - -.. option:: -s - - Stop on the first read error. - By default all errors in the input data are ignored and - :program:`tiffgt` - does it's best to display as much of an image as possible. - -.. option:: -w - - Enable reporting of warning messages from the TIFF library. - By default :program:`tiffgt` - ignores warning messages generated when reading an image. - -.. option:: -v - - Place information in the title bar describing - what type of window (full color or colormap) is being - used, the name of the input file, and the directory - index of the image (if non-zero). - By default, the window type is not shown in the title bar. - -Bugs ----- - -Images wider and taller than the display are silently truncated to avoid -crashing old versions of the window manager. - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffinfo.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffinfo.rst.txt deleted file mode 100644 index 60b4969..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffinfo.rst.txt +++ /dev/null @@ -1,69 +0,0 @@ -tiffinfo -======== - -.. program:: tiffinfo - -Synopsis --------- - -**tiffinfo** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiffinfo` displays information about files created according -to the Tag Image File Format, Revision 6.0. By default, the contents of -each TIFF directory in each file are displayed, with the value of each -tag shown symbolically (where sensible). - -Options -------- - -.. option:: -c - - Display the colormap and color/gray response curves, if present. - -.. option:: -D - - In addition to displaying the directory tags, - read and decompress all the data in each image (but not display it). - -.. option:: -d - - In addition to displaying the directory tags, - print each byte of decompressed data in hexadecimal. - -.. option:: -j - - Display any JPEG-related tags that are present. - -.. option:: -o - - Set the initial TIFF directory according to the specified file offset. - The file offset may be specified using the usual C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - -.. option:: -s - - Display the offsets and byte counts for each data strip in a directory. - -.. option:: -z - - Enable strip chopping when reading image data. - -.. option:: -# - - Set the initial TIFF directory to *#*. - -.. option:: -W - - Warn about unknown tags. - -See also --------- - -:doc:`pal2rgb`, -:doc:`tiffcp`, -:doc:`tiffcmp`, -:doc:`tiffmedian`, -:doc:`/functions/libtiff` diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffmedian.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffmedian.rst.txt deleted file mode 100644 index db0f687..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffmedian.rst.txt +++ /dev/null @@ -1,73 +0,0 @@ -tiffmedian -========== - -.. program:: tiffmedian - -Synopsis --------- - -**tiffmedian** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiffmedian` applies the median cut algorithm to an RGB -image in *input.tif* to generate a palette image that is written to -*output.tif*. The generated colormap has, by default, 256 entries. -The image data is quantized by mapping each pixel to the closest color -values in the colormap. - -Options -------- - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c zip` for Deflate compression. - - By default :program:`tiffmedian` will compress data according to the - value of the ``Compression`` tag found in the source file. - - LZW compression can be specified together with a ``predictor`` value. - A predictor value of 2 causes each scanline of the output image to - undergo horizontal differencing before it is encoded; a value of 1 - forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW compression - with horizontal differencing. - -.. option:: -C - - Specify the number of entries to use in the generated colormap. - By default all 256 entries/colors are used. - -.. option:: -f - - Apply Floyd-Steinberg dithering before selecting a colormap entry. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. By default, :program:`tiffmedian` - attempts to set the rows/strip that no more than 8 kilobytes of - data appear in a strip. - -Notes ------ - -This program is derived from Paul Heckbert's :program:`median` program. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffcmp` (1), -:doc:`/functions/libtiff` (3tiff), - -**"Color Image Quantization for Frame Buffer Display"**, -Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307. diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffset.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffset.rst.txt deleted file mode 100644 index d58cecd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffset.rst.txt +++ /dev/null @@ -1,82 +0,0 @@ -tiffset -======== - -.. program:: tiffset - -Synopsis --------- - -**tiffset** [ *options* ] *filename.tif* - -Description ------------ - -:program:`tiffset` sets the value of a TIFF header to a specified value -or removes an existing setting. - -Options -------- - -.. option:: -d dirnumber - - Change the current directory (starting at 0). - -.. option:: -s tagnumber [ count ] value … - - Set the value of the named tag to the value or values specified. - -.. option:: -sd diroffset - - Change the current directory by offset. - -.. option:: -sf tagnumber filename - - Set the value of the tag to the contents of filename. This option is - supported for ASCII tags only. - -.. option:: -u tagnumber - - Unset the tag. - -Examples --------- - -The following example sets the image description tag (270) of :file:`a.tif` to -the contents of the file :file:`descrip`: - -.. highlight:: shell - -:: - - tiffset -sf 270 descrip a.tif - -The following example sets the artist tag (315) of :file:`a.tif` to the string -``Anonymous``: - -:: - - tiffset -s 315 Anonymous a.tif - - -This example sets the resolution of the file :file:`a.tif` to 300 dpi: - -:: - - tiffset -s 296 2 a.tif - tiffset -s 282 300.0 a.tif - tiffset -s 283 300.0 a.tif - -Set the photometric interpretation of the third page of :file:`a.tif` to -min-is-black (ie. inverts it): - -:: - - tiffset -d 2 -s 262 1 a.tif - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffsplit.rst.txt b/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffsplit.rst.txt deleted file mode 100644 index 8bddb98..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_sources/tools/tiffsplit.rst.txt +++ /dev/null @@ -1,52 +0,0 @@ -tiffsplit -========= - -.. program:: tiffsplit - -Synopsis --------- - -**tiffsplit** *src.tif* [ *prefix* ] - -Description ------------ - -:program:`tiffsplit` takes a multi-directory (page) TIFF -file and creates one or more single-directory (page) TIFF -files from it. -The output files are given names created by concatenating -a prefix, a lexically ordered suffix in the range [aaa--zzz], -the suffix :file:`.tif` -(e.g. :file:`xaaa.tif`, :file:`xaab.tif`, :file:`…`, :file:`xzzz.tif`). -If a prefix is not specified on the command line, the default prefix of -:file:`x` is used. - -Options -------- - -None. - -Exit status ------------ - -:program:`tiffsplit` exits with one of the following values: - -0: - - Success - -1: - - An error occurred either reading the input or writing results. - -Bugs ----- - -Only a select set of "known tags" are copied when splitting. - -See also --------- - -:doc:`tiffcp` (1), -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/html-prebuilt/_static/basic.css b/third_party/libtiff/doc/html-prebuilt/_static/basic.css deleted file mode 100644 index cfc60b8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/basic.css +++ /dev/null @@ -1,921 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -div.section::after { - display: block; - content: ''; - clear: left; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; - word-wrap: break-word; - overflow-wrap : break-word; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox form.search { - overflow: hidden; -} - -div.sphinxsidebar #searchbox input[type="text"] { - float: left; - width: 80%; - padding: 0.25em; - box-sizing: border-box; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - float: left; - width: 20%; - border-left: none; - padding: 0.25em; - box-sizing: border-box; -} - - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li p.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; - margin-left: auto; - margin-right: auto; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable ul { - margin-top: 0; - margin-bottom: 0; - list-style-type: none; -} - -table.indextable > tbody > tr > td > ul { - padding-left: 0em; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- domain module index --------------------------------------------------- */ - -table.modindextable td { - padding: 2px; - border-collapse: collapse; -} - -/* -- general body styles --------------------------------------------------- */ - -div.body { - min-width: 360px; - max-width: 800px; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - -moz-hyphens: auto; - -ms-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, figure.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, figure.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, figure.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.align-default, figure.align-default, .figure.align-default { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-default { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar, -aside.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px; - background-color: #ffe; - width: 40%; - float: right; - clear: right; - overflow-x: auto; -} - -p.sidebar-title { - font-weight: bold; -} - -nav.contents, -aside.topic, -div.admonition, div.topic, blockquote { - clear: left; -} - -/* -- topics ---------------------------------------------------------------- */ - -nav.contents, -aside.topic, -div.topic { - border: 1px solid #ccc; - padding: 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- content of sidebars/topics/admonitions -------------------------------- */ - -div.sidebar > :last-child, -aside.sidebar > :last-child, -nav.contents > :last-child, -aside.topic > :last-child, -div.topic > :last-child, -div.admonition > :last-child { - margin-bottom: 0; -} - -div.sidebar::after, -aside.sidebar::after, -nav.contents::after, -aside.topic::after, -div.topic::after, -div.admonition::after, -blockquote::after { - display: block; - content: ''; - clear: both; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - margin-top: 10px; - margin-bottom: 10px; - border: 0; - border-collapse: collapse; -} - -table.align-center { - margin-left: auto; - margin-right: auto; -} - -table.align-default { - margin-left: auto; - margin-right: auto; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > :first-child, -td > :first-child { - margin-top: 0px; -} - -th > :last-child, -td > :last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure, figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption, figcaption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number, -figcaption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text, -figcaption span.caption-text { -} - -/* -- field list styles ----------------------------------------------------- */ - -table.field-list td, table.field-list th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.field-name { - -moz-hyphens: manual; - -ms-hyphens: manual; - -webkit-hyphens: manual; - hyphens: manual; -} - -/* -- hlist styles ---------------------------------------------------------- */ - -table.hlist { - margin: 1em 0; -} - -table.hlist td { - vertical-align: top; -} - -/* -- object description styles --------------------------------------------- */ - -.sig { - font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; -} - -.sig-name, code.descname { - background-color: transparent; - font-weight: bold; -} - -.sig-name { - font-size: 1.1em; -} - -code.descname { - font-size: 1.2em; -} - -.sig-prename, code.descclassname { - background-color: transparent; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.sig-param.n { - font-style: italic; -} - -/* C++ specific styling */ - -.sig-inline.c-texpr, -.sig-inline.cpp-texpr { - font-family: unset; -} - -.sig.c .k, .sig.c .kt, -.sig.cpp .k, .sig.cpp .kt { - color: #0033B3; -} - -.sig.c .m, -.sig.cpp .m { - color: #1750EB; -} - -.sig.c .s, .sig.c .sc, -.sig.cpp .s, .sig.cpp .sc { - color: #067D17; -} - - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -:not(li) > ol > li:first-child > :first-child, -:not(li) > ul > li:first-child > :first-child { - margin-top: 0px; -} - -:not(li) > ol > li:last-child > :last-child, -:not(li) > ul > li:last-child > :last-child { - margin-bottom: 0px; -} - -ol.simple ol p, -ol.simple ul p, -ul.simple ol p, -ul.simple ul p { - margin-top: 0; -} - -ol.simple > li:not(:first-child) > p, -ul.simple > li:not(:first-child) > p { - margin-top: 0; -} - -ol.simple p, -ul.simple p { - margin-bottom: 0; -} - -aside.footnote > span, -div.citation > span { - float: left; -} -aside.footnote > span:last-of-type, -div.citation > span:last-of-type { - padding-right: 0.5em; -} -aside.footnote > p { - margin-left: 2em; -} -div.citation > p { - margin-left: 4em; -} -aside.footnote > p:last-of-type, -div.citation > p:last-of-type { - margin-bottom: 0em; -} -aside.footnote > p:last-of-type:after, -div.citation > p:last-of-type:after { - content: ""; - clear: both; -} - -dl.field-list { - display: grid; - grid-template-columns: fit-content(30%) auto; -} - -dl.field-list > dt { - font-weight: bold; - word-break: break-word; - padding-left: 0.5em; - padding-right: 5px; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > :first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -.sig dd { - margin-top: 0px; - margin-bottom: 0px; -} - -.sig dl { - margin-top: 0px; - margin-bottom: 0px; -} - -dl > dd:last-child, -dl > dd:last-child > :last-child { - margin-bottom: 0; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -.classifier:before { - font-style: normal; - margin: 0 0.5em; - content: ":"; - display: inline-block; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -.translated { - background-color: rgba(207, 255, 207, 0.2) -} - -.untranslated { - background-color: rgba(255, 207, 207, 0.2) -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -pre, div[class*="highlight-"] { - clear: both; -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; - white-space: nowrap; -} - -div[class*="highlight-"] { - margin: 1em 0; -} - -td.linenos pre { - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - display: block; -} - -table.highlighttable tbody { - display: block; -} - -table.highlighttable tr { - display: flex; -} - -table.highlighttable td { - margin: 0; - padding: 0; -} - -table.highlighttable td.linenos { - padding-right: 0.5em; -} - -table.highlighttable td.code { - flex: 1; - overflow: hidden; -} - -.highlight .hll { - display: block; -} - -div.highlight pre, -table.highlighttable pre { - margin: 0; -} - -div.code-block-caption + div { - margin-top: 0; -} - -div.code-block-caption { - margin-top: 1em; - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -table.highlighttable td.linenos, -span.linenos, -div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; - -webkit-user-select: text; /* Safari fallback only */ - -webkit-user-select: none; /* Chrome/Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+ */ -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - margin: 1em 0; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -span.eqno a.headerlink { - position: absolute; - z-index: 1; -} - -div.math:hover a.headerlink { - visibility: visible; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_static/contents.png b/third_party/libtiff/doc/html-prebuilt/_static/contents.png deleted file mode 100644 index 6c59aa1f9c8c3b754b258b8ab4f6b95971c99109..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfx!2~2XTwzxLQbwLGjv*C{Q@c%>8XN?UO#1VG zcLb|!+10i0Jzf{Gv>fyFaQYL)bKk!I{mJd!3^2Uu$-u=wds-dX_E&EV { - if (document.readyState !== "loading") { - callback(); - } else { - document.addEventListener("DOMContentLoaded", callback); - } -}; - -/** - * Small JavaScript module for the documentation. - */ -const Documentation = { - init: () => { - Documentation.initDomainIndexTable(); - Documentation.initOnKeyListeners(); - }, - - /** - * i18n support - */ - TRANSLATIONS: {}, - PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), - LOCALE: "unknown", - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext: (string) => { - const translated = Documentation.TRANSLATIONS[string]; - switch (typeof translated) { - case "undefined": - return string; // no translation - case "string": - return translated; // translation exists - default: - return translated[0]; // (singular, plural) translation tuple exists - } - }, - - ngettext: (singular, plural, n) => { - const translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated !== "undefined") - return translated[Documentation.PLURAL_EXPR(n)]; - return n === 1 ? singular : plural; - }, - - addTranslations: (catalog) => { - Object.assign(Documentation.TRANSLATIONS, catalog.messages); - Documentation.PLURAL_EXPR = new Function( - "n", - `return (${catalog.plural_expr})` - ); - Documentation.LOCALE = catalog.locale; - }, - - /** - * helper function to focus on search bar - */ - focusSearchBar: () => { - document.querySelectorAll("input[name=q]")[0]?.focus(); - }, - - /** - * Initialise the domain index toggle buttons - */ - initDomainIndexTable: () => { - const toggler = (el) => { - const idNumber = el.id.substr(7); - const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); - if (el.src.substr(-9) === "minus.png") { - el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; - toggledRows.forEach((el) => (el.style.display = "none")); - } else { - el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; - toggledRows.forEach((el) => (el.style.display = "")); - } - }; - - const togglerElements = document.querySelectorAll("img.toggler"); - togglerElements.forEach((el) => - el.addEventListener("click", (event) => toggler(event.currentTarget)) - ); - togglerElements.forEach((el) => (el.style.display = "")); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); - }, - - initOnKeyListeners: () => { - // only install a listener if it is really needed - if ( - !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && - !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS - ) - return; - - document.addEventListener("keydown", (event) => { - // bail for input elements - if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; - // bail with special keys - if (event.altKey || event.ctrlKey || event.metaKey) return; - - if (!event.shiftKey) { - switch (event.key) { - case "ArrowLeft": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const prevLink = document.querySelector('link[rel="prev"]'); - if (prevLink && prevLink.href) { - window.location.href = prevLink.href; - event.preventDefault(); - } - break; - case "ArrowRight": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const nextLink = document.querySelector('link[rel="next"]'); - if (nextLink && nextLink.href) { - window.location.href = nextLink.href; - event.preventDefault(); - } - break; - } - } - - // some keyboard layouts may need Shift to get / - switch (event.key) { - case "/": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.focusSearchBar(); - event.preventDefault(); - } - }); - }, -}; - -// quick alias for translations -const _ = Documentation.gettext; - -_ready(Documentation.init); diff --git a/third_party/libtiff/doc/html-prebuilt/_static/documentation_options.js b/third_party/libtiff/doc/html-prebuilt/_static/documentation_options.js deleted file mode 100644 index cd433ca..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/documentation_options.js +++ /dev/null @@ -1,14 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '4.7.1', - LANGUAGE: 'en', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - LINK_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false, - SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: true, -}; \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_static/file.png b/third_party/libtiff/doc/html-prebuilt/_static/file.png deleted file mode 100644 index a858a410e4faa62ce324d814e4b816fff83a6fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmV+(0pb3MP)s`hMrGg#P~ix$^RISR_I47Y|r1 z_CyJOe}D1){SET-^Amu_i71Lt6eYfZjRyw@I6OQAIXXHDfiX^GbOlHe=Ae4>0m)d(f|Me07*qoM6N<$f}vM^LjV8( diff --git a/third_party/libtiff/doc/html-prebuilt/_static/language_data.js b/third_party/libtiff/doc/html-prebuilt/_static/language_data.js deleted file mode 100644 index 250f566..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/language_data.js +++ /dev/null @@ -1,199 +0,0 @@ -/* - * language_data.js - * ~~~~~~~~~~~~~~~~ - * - * This script contains the language-specific data used by searchtools.js, - * namely the list of stopwords, stemmer, scorer and splitter. - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; - - -/* Non-minified version is copied as a separate JS file, is available */ - -/** - * Porter Stemmer - */ -var Stemmer = function() { - - var step2list = { - ational: 'ate', - tional: 'tion', - enci: 'ence', - anci: 'ance', - izer: 'ize', - bli: 'ble', - alli: 'al', - entli: 'ent', - eli: 'e', - ousli: 'ous', - ization: 'ize', - ation: 'ate', - ator: 'ate', - alism: 'al', - iveness: 'ive', - fulness: 'ful', - ousness: 'ous', - aliti: 'al', - iviti: 'ive', - biliti: 'ble', - logi: 'log' - }; - - var step3list = { - icate: 'ic', - ative: '', - alize: 'al', - iciti: 'ic', - ical: 'ic', - ful: '', - ness: '' - }; - - var c = "[^aeiou]"; // consonant - var v = "[aeiouy]"; // vowel - var C = c + "[^aeiouy]*"; // consonant sequence - var V = v + "[aeiou]*"; // vowel sequence - - var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 - var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 - var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 - var s_v = "^(" + C + ")?" + v; // vowel in stem - - this.stemWord = function (w) { - var stem; - var suffix; - var firstch; - var origword = w; - - if (w.length < 3) - return w; - - var re; - var re2; - var re3; - var re4; - - firstch = w.substr(0,1); - if (firstch == "y") - w = firstch.toUpperCase() + w.substr(1); - - // Step 1a - re = /^(.+?)(ss|i)es$/; - re2 = /^(.+?)([^s])s$/; - - if (re.test(w)) - w = w.replace(re,"$1$2"); - else if (re2.test(w)) - w = w.replace(re2,"$1$2"); - - // Step 1b - re = /^(.+?)eed$/; - re2 = /^(.+?)(ed|ing)$/; - if (re.test(w)) { - var fp = re.exec(w); - re = new RegExp(mgr0); - if (re.test(fp[1])) { - re = /.$/; - w = w.replace(re,""); - } - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1]; - re2 = new RegExp(s_v); - if (re2.test(stem)) { - w = stem; - re2 = /(at|bl|iz)$/; - re3 = new RegExp("([^aeiouylsz])\\1$"); - re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re2.test(w)) - w = w + "e"; - else if (re3.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - else if (re4.test(w)) - w = w + "e"; - } - } - - // Step 1c - re = /^(.+?)y$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(s_v); - if (re.test(stem)) - w = stem + "i"; - } - - // Step 2 - re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step2list[suffix]; - } - - // Step 3 - re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step3list[suffix]; - } - - // Step 4 - re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; - re2 = /^(.+?)(s|t)(ion)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - if (re.test(stem)) - w = stem; - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1] + fp[2]; - re2 = new RegExp(mgr1); - if (re2.test(stem)) - w = stem; - } - - // Step 5 - re = /^(.+?)e$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - re2 = new RegExp(meq1); - re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) - w = stem; - } - re = /ll$/; - re2 = new RegExp(mgr1); - if (re.test(w) && re2.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - - // and turn initial Y back to y - if (firstch == "y") - w = firstch.toLowerCase() + w.substr(1); - return w; - } -} - diff --git a/third_party/libtiff/doc/html-prebuilt/_static/minus.png b/third_party/libtiff/doc/html-prebuilt/_static/minus.png deleted file mode 100644 index d96755fdaf8bb2214971e0db9c1fd3077d7c419d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu=nj kDsEF_5m^0CR;1wuP-*O&G^0G}KYk!hp00i_>zopr08q^qX#fBK diff --git a/third_party/libtiff/doc/html-prebuilt/_static/navigation.png b/third_party/libtiff/doc/html-prebuilt/_static/navigation.png deleted file mode 100644 index fda6cd29ede1be6168ce8b5e02d099ea9055ccfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI|!2~2VCcCc%QudxMjv*C{TfG{24>0g7{2zat zIm@i@&@2&y-PR1xY$qjFM{J&XU;25XW1{_&{(Ldr+IaofPcAOcp2zd*+4*{gj8%&M U)(>{V3jhEB diff --git a/third_party/libtiff/doc/html-prebuilt/_static/plus.png b/third_party/libtiff/doc/html-prebuilt/_static/plus.png deleted file mode 100644 index 7107cec93a979b9a5f64843235a16651d563ce2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu>-2 m3q%Vub%g%s<8sJhVPMczOq}xhg9DJoz~JfX=d#Wzp$Pyb1r*Kz diff --git a/third_party/libtiff/doc/html-prebuilt/_static/pygments.css b/third_party/libtiff/doc/html-prebuilt/_static/pygments.css deleted file mode 100644 index 7a18115..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/pygments.css +++ /dev/null @@ -1,74 +0,0 @@ -pre { line-height: 125%; } -td.linenos .normal { color: #666666; background-color: transparent; padding-left: 5px; padding-right: 5px; } -span.linenos { color: #666666; background-color: transparent; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight .hll { background-color: #ffffcc } -.highlight { background: #f0f0f0; } -.highlight .c { color: #60a0b0; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #007020; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #007020 } /* Comment.Preproc */ -.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ -.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #007020 } /* Keyword.Pseudo */ -.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #902000 } /* Keyword.Type */ -.highlight .m { color: #40a070 } /* Literal.Number */ -.highlight .s { color: #4070a0 } /* Literal.String */ -.highlight .na { color: #4070a0 } /* Name.Attribute */ -.highlight .nb { color: #007020 } /* Name.Builtin */ -.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.highlight .no { color: #60add5 } /* Name.Constant */ -.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #007020 } /* Name.Exception */ -.highlight .nf { color: #06287e } /* Name.Function */ -.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #bb60d5 } /* Name.Variable */ -.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mb { color: #40a070 } /* Literal.Number.Bin */ -.highlight .mf { color: #40a070 } /* Literal.Number.Float */ -.highlight .mh { color: #40a070 } /* Literal.Number.Hex */ -.highlight .mi { color: #40a070 } /* Literal.Number.Integer */ -.highlight .mo { color: #40a070 } /* Literal.Number.Oct */ -.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ -.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ -.highlight .sc { color: #4070a0 } /* Literal.String.Char */ -.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ -.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ -.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ -.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.highlight .sx { color: #c65d09 } /* Literal.String.Other */ -.highlight .sr { color: #235388 } /* Literal.String.Regex */ -.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ -.highlight .ss { color: #517918 } /* Literal.String.Symbol */ -.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #06287e } /* Name.Function.Magic */ -.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ -.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ -.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ -.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ -.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/_static/searchtools.js b/third_party/libtiff/doc/html-prebuilt/_static/searchtools.js deleted file mode 100644 index 97d56a7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/searchtools.js +++ /dev/null @@ -1,566 +0,0 @@ -/* - * searchtools.js - * ~~~~~~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for the full-text search. - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ -"use strict"; - -/** - * Simple result scoring code. - */ -if (typeof Scorer === "undefined") { - var Scorer = { - // Implement the following function to further tweak the score for each result - // The function takes a result array [docname, title, anchor, descr, score, filename] - // and returns the new score. - /* - score: result => { - const [docname, title, anchor, descr, score, filename] = result - return score - }, - */ - - // query matches the full name of an object - objNameMatch: 11, - // or matches in the last dotted part of the object name - objPartialMatch: 6, - // Additive scores depending on the priority of the object - objPrio: { - 0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5, // used to be unimportantResults - }, - // Used when the priority is not in the mapping. - objPrioDefault: 0, - - // query found in title - title: 15, - partialTitle: 7, - // query found in terms - term: 5, - partialTerm: 2, - }; -} - -const _removeChildren = (element) => { - while (element && element.lastChild) element.removeChild(element.lastChild); -}; - -/** - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - */ -const _escapeRegExp = (string) => - string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string - -const _displayItem = (item, searchTerms) => { - const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; - const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; - const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; - const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - - const [docName, title, anchor, descr, score, _filename] = item; - - let listItem = document.createElement("li"); - let requestUrl; - let linkUrl; - if (docBuilder === "dirhtml") { - // dirhtml builder - let dirname = docName + "/"; - if (dirname.match(/\/index\/$/)) - dirname = dirname.substring(0, dirname.length - 6); - else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; - linkUrl = requestUrl; - } else { - // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; - linkUrl = docName + docLinkSuffix; - } - let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + anchor; - linkEl.dataset.score = score; - linkEl.innerHTML = title; - if (descr) - listItem.appendChild(document.createElement("span")).innerHTML = - " (" + descr + ")"; - else if (showSearchSummary) - fetch(requestUrl) - .then((responseData) => responseData.text()) - .then((data) => { - if (data) - listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) - ); - }); - Search.output.appendChild(listItem); -}; -const _finishSearch = (resultCount) => { - Search.stopPulse(); - Search.title.innerText = _("Search Results"); - if (!resultCount) - Search.status.innerText = Documentation.gettext( - "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." - ); - else - Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); -}; -const _displayNextItem = ( - results, - resultCount, - searchTerms -) => { - // results left, load the summary and display it - // this is intended to be dynamic (don't sub resultsCount) - if (results.length) { - _displayItem(results.pop(), searchTerms); - setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), - 5 - ); - } - // search finished, update title and status message - else _finishSearch(resultCount); -}; - -/** - * Default splitQuery function. Can be overridden in ``sphinx.search`` with a - * custom function per language. - * - * The regular expression works by splitting the string on consecutive characters - * that are not Unicode letters, numbers, underscores, or emoji characters. - * This is the same as ``\W+`` in Python, preserving the surrogate pair area. - */ -if (typeof splitQuery === "undefined") { - var splitQuery = (query) => query - .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) - .filter(term => term) // remove remaining empty strings -} - -/** - * Search Module - */ -const Search = { - _index: null, - _queued_query: null, - _pulse_status: -1, - - htmlToText: (htmlString) => { - const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); - const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; - console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." - ); - return ""; - }, - - init: () => { - const query = new URLSearchParams(window.location.search).get("q"); - document - .querySelectorAll('input[name="q"]') - .forEach((el) => (el.value = query)); - if (query) Search.performSearch(query); - }, - - loadIndex: (url) => - (document.body.appendChild(document.createElement("script")).src = url), - - setIndex: (index) => { - Search._index = index; - if (Search._queued_query !== null) { - const query = Search._queued_query; - Search._queued_query = null; - Search.query(query); - } - }, - - hasIndex: () => Search._index !== null, - - deferQuery: (query) => (Search._queued_query = query), - - stopPulse: () => (Search._pulse_status = -1), - - startPulse: () => { - if (Search._pulse_status >= 0) return; - - const pulse = () => { - Search._pulse_status = (Search._pulse_status + 1) % 4; - Search.dots.innerText = ".".repeat(Search._pulse_status); - if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); - }; - pulse(); - }, - - /** - * perform a search for something (or wait until index is loaded) - */ - performSearch: (query) => { - // create the required interface elements - const searchText = document.createElement("h2"); - searchText.textContent = _("Searching"); - const searchSummary = document.createElement("p"); - searchSummary.classList.add("search-summary"); - searchSummary.innerText = ""; - const searchList = document.createElement("ul"); - searchList.classList.add("search"); - - const out = document.getElementById("search-results"); - Search.title = out.appendChild(searchText); - Search.dots = Search.title.appendChild(document.createElement("span")); - Search.status = out.appendChild(searchSummary); - Search.output = out.appendChild(searchList); - - const searchProgress = document.getElementById("search-progress"); - // Some themes don't use the search progress node - if (searchProgress) { - searchProgress.innerText = _("Preparing search..."); - } - Search.startPulse(); - - // index already loaded, the browser was quick! - if (Search.hasIndex()) Search.query(query); - else Search.deferQuery(query); - }, - - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - - // stem the search terms and add them to the correct list - const stemmer = new Stemmer(); - const searchTerms = new Set(); - const excludedTerms = new Set(); - const highlightTerms = new Set(); - const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); - splitQuery(query.trim()).forEach((queryTerm) => { - const queryTermLower = queryTerm.toLowerCase(); - - // maybe skip this "word" - // stopwords array is from language_data.js - if ( - stopwords.indexOf(queryTermLower) !== -1 || - queryTerm.match(/^\d+$/) - ) - return; - - // stem the word - let word = stemmer.stemWord(queryTermLower); - // select the correct list - if (word[0] === "-") excludedTerms.add(word.substr(1)); - else { - searchTerms.add(word); - highlightTerms.add(queryTermLower); - } - }); - - if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js - localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) - } - - // console.debug("SEARCH: searching for:"); - // console.info("required: ", [...searchTerms]); - // console.info("excluded: ", [...excludedTerms]); - - // array of [docname, title, anchor, descr, score, filename] - let results = []; - _removeChildren(document.getElementById("search-progress")); - - const queryLower = query.toLowerCase(); - for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { - for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) - results.push([ - docNames[file], - titles[file] !== title ? `${titles[file]} > ${title}` : title, - id !== null ? "#" + id : "", - null, - score, - filenames[file], - ]); - } - } - } - - // search for explicit entries in index directives - for (const [entry, foundEntries] of Object.entries(indexEntries)) { - if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id] of foundEntries) { - let score = Math.round(100 * queryLower.length / entry.length) - results.push([ - docNames[file], - titles[file], - id ? "#" + id : "", - null, - score, - filenames[file], - ]); - } - } - } - - // lookup as object - objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) - ); - - // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); - - // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); - - // remove duplicate search results - // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept - let seen = new Set(); - results = results.reverse().reduce((acc, result) => { - let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); - if (!seen.has(resultStr)) { - acc.push(result); - seen.add(resultStr); - } - return acc; - }, []); - - results = results.reverse(); - - // for debugging - //Search.lastresults = results.slice(); // a copy - // console.info("search results:", Search.lastresults); - - // print the results - _displayNextItem(results, results.length, searchTerms); - }, - - /** - * search for object names - */ - performObjectSearch: (object, objectTerms) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const objects = Search._index.objects; - const objNames = Search._index.objnames; - const titles = Search._index.titles; - - const results = []; - - const objectSearchCallback = (prefix, match) => { - const name = match[4] - const fullname = (prefix ? prefix + "." : "") + name; - const fullnameLower = fullname.toLowerCase(); - if (fullnameLower.indexOf(object) < 0) return; - - let score = 0; - const parts = fullnameLower.split("."); - - // check for different match types: exact matches of full name or - // "last name" (i.e. last dotted part) - if (fullnameLower === object || parts.slice(-1)[0] === object) - score += Scorer.objNameMatch; - else if (parts.slice(-1)[0].indexOf(object) > -1) - score += Scorer.objPartialMatch; // matches in last name - - const objName = objNames[match[1]][2]; - const title = titles[match[0]]; - - // If more than one term searched for, we require other words to be - // found in the name/title/description - const otherTerms = new Set(objectTerms); - otherTerms.delete(object); - if (otherTerms.size > 0) { - const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); - if ( - [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) - ) - return; - } - - let anchor = match[3]; - if (anchor === "") anchor = fullname; - else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; - - const descr = objName + _(", in ") + title; - - // add custom score for some objects according to scorer - if (Scorer.objPrio.hasOwnProperty(match[2])) - score += Scorer.objPrio[match[2]]; - else score += Scorer.objPrioDefault; - - results.push([ - docNames[match[0]], - fullname, - "#" + anchor, - descr, - score, - filenames[match[0]], - ]); - }; - Object.keys(objects).forEach((prefix) => - objects[prefix].forEach((array) => - objectSearchCallback(prefix, array) - ) - ); - return results; - }, - - /** - * search for full-text terms in the index - */ - performTermsSearch: (searchTerms, excludedTerms) => { - // prepare search - const terms = Search._index.terms; - const titleTerms = Search._index.titleterms; - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - - const scoreMap = new Map(); - const fileMap = new Map(); - - // perform the search on the required terms - searchTerms.forEach((word) => { - const files = []; - const arr = [ - { files: terms[word], score: Scorer.term }, - { files: titleTerms[word], score: Scorer.title }, - ]; - // add support for partial matches - if (word.length > 2) { - const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); - } - - // no match but word was a required one - if (arr.every((record) => record.files === undefined)) return; - - // found search word in contents - arr.forEach((record) => { - if (record.files === undefined) return; - - let recordFiles = record.files; - if (recordFiles.length === undefined) recordFiles = [recordFiles]; - files.push(...recordFiles); - - // set score for the word in each file - recordFiles.forEach((file) => { - if (!scoreMap.has(file)) scoreMap.set(file, {}); - scoreMap.get(file)[word] = record.score; - }); - }); - - // create the mapping - files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); - }); - }); - - // now check if the files don't contain excluded terms - const results = []; - for (const [file, wordList] of fileMap) { - // check if all requirements are matched - - // as search terms with length < 3 are discarded - const filteredTermCount = [...searchTerms].filter( - (term) => term.length > 2 - ).length; - if ( - wordList.length !== searchTerms.size && - wordList.length !== filteredTermCount - ) - continue; - - // ensure that none of the excluded terms is in the search result - if ( - [...excludedTerms].some( - (term) => - terms[term] === file || - titleTerms[term] === file || - (terms[term] || []).includes(file) || - (titleTerms[term] || []).includes(file) - ) - ) - break; - - // select one (max) score for the file. - const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); - // add result to the result list - results.push([ - docNames[file], - titles[file], - "", - null, - score, - filenames[file], - ]); - } - return results; - }, - - /** - * helper function to return a node containing the - * search summary for a given text. keywords is a list - * of stemmed words. - */ - makeSearchSummary: (htmlText, keywords) => { - const text = Search.htmlToText(htmlText); - if (text === "") return null; - - const textLower = text.toLowerCase(); - const actualStartPosition = [...keywords] - .map((k) => textLower.indexOf(k.toLowerCase())) - .filter((i) => i > -1) - .slice(-1)[0]; - const startWithContext = Math.max(actualStartPosition - 120, 0); - - const top = startWithContext === 0 ? "" : "..."; - const tail = startWithContext + 240 < text.length ? "..." : ""; - - let summary = document.createElement("p"); - summary.classList.add("context"); - summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; - - return summary; - }, -}; - -_ready(Search.init); diff --git a/third_party/libtiff/doc/html-prebuilt/_static/sphinx_highlight.js b/third_party/libtiff/doc/html-prebuilt/_static/sphinx_highlight.js deleted file mode 100644 index aae669d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/sphinx_highlight.js +++ /dev/null @@ -1,144 +0,0 @@ -/* Highlighting utilities for Sphinx HTML documentation. */ -"use strict"; - -const SPHINX_HIGHLIGHT_ENABLED = true - -/** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. - */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; - - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } - - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); - } - } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); - } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); -}; - -/** - * Small JavaScript module for the documentation. - */ -const SphinxHighlight = { - - /** - * highlight the search words provided in localstorage in the text - */ - highlightSearchWords: () => { - if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight - - // get and clear terms from localstorage - const url = new URL(window.location); - const highlight = - localStorage.getItem("sphinx_highlight_terms") - || url.searchParams.get("highlight") - || ""; - localStorage.removeItem("sphinx_highlight_terms") - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); - - // get individual terms from highlight string - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do - - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); - - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '" - ) - ); - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - localStorage.removeItem("sphinx_highlight_terms") - }, - - initEscapeListener: () => { - // only install a listener if it is really needed - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; - - document.addEventListener("keydown", (event) => { - // bail for input elements - if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; - // bail with special keys - if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; - if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { - SphinxHighlight.hideSearchWords(); - event.preventDefault(); - } - }); - }, -}; - -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); diff --git a/third_party/libtiff/doc/html-prebuilt/_static/sphinxdoc.css b/third_party/libtiff/doc/html-prebuilt/_static/sphinxdoc.css deleted file mode 100644 index 3dadf44..0000000 --- a/third_party/libtiff/doc/html-prebuilt/_static/sphinxdoc.css +++ /dev/null @@ -1,350 +0,0 @@ -/* - * sphinxdoc.css_t - * ~~~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; - font-size: 14px; - letter-spacing: -0.01em; - line-height: 150%; - text-align: center; - background-color: #BFD1D4; - color: black; - padding: 0; - border: 1px solid #aaa; - - margin: 0px 80px 0px 80px; - min-width: 740px; -} - -div.document { - background-color: white; - text-align: left; - background-image: url(contents.png); - background-repeat: repeat-x; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 calc(230px + 10px) 0 0; - border-right: 1px solid #ccc; -} - -div.body { - margin: 0; - padding: 0.5em 20px 20px 20px; -} - -div.related { - font-size: 1em; -} - -div.related ul { - background-image: url(navigation.png); - height: 2em; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -div.related ul li { - margin: 0; - padding: 0; - height: 2em; - float: left; -} - -div.related ul li.right { - float: right; - margin-right: 5px; -} - -div.related ul li a { - margin: 0; - padding: 0 5px 0 5px; - line-height: 1.75em; - color: #EE9816; -} - -div.related ul li a:hover { - color: #3CA8E7; -} - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - padding: 0.5em 15px 15px 0; - width: calc(230px - 20px); - float: right; - font-size: 1em; - text-align: left; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1em 0 0.5em 0; - font-size: 1em; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border: 1px solid #86989B; - background-color: #AFC1C4; -} - -div.sphinxsidebar h3 a { - color: white; -} - -div.sphinxsidebar ul { - padding-left: 1.5em; - margin-top: 7px; - padding: 0; - line-height: 130%; -} - -div.sphinxsidebar ul ul { - margin-left: 20px; -} - -div.footer { - background-color: #E3EFF1; - color: #86989B; - padding: 3px 8px 3px 0; - clear: both; - font-size: 0.8em; - text-align: right; -} - -div.footer a { - color: #86989B; - text-decoration: underline; -} - -/* -- body styles ----------------------------------------------------------- */ - -p { - margin: 0.8em 0 0.5em 0; -} - -a { - color: #CA7900; - text-decoration: none; -} - -a:hover { - color: #2491CF; -} - -div.body a { - text-decoration: underline; -} - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - color: #11557C; -} - -h2 { - margin: 1.3em 0 0.2em 0; - font-size: 1.35em; - padding: 0; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black!important; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa!important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - -a.headerlink { - color: #c60f0f!important; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none!important; -} - -a.headerlink:hover { - background-color: #ccc; - color: white!important; -} - -cite, code, code { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -code { - background-color: #f2f2f2; - border-bottom: 1px solid #ddd; - color: #333; -} - -code.descname, code.descclassname, code.xref { - border: 0; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -a code { - border: 0; - color: #CA7900; -} - -a code:hover { - color: #2491CF; -} - -pre { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid #ccc; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -nav.contents, -aside.topic, -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - -div.admonition, div.warning { - font-size: 0.9em; - margin: 1em 0 1em 0; - border: 1px solid #86989B; - background-color: #f7f7f7; - padding: 0; -} - -div.admonition p, div.warning p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} - -div.admonition pre, div.warning pre { - margin: 0.4em 1em 0.4em 1em; -} - -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border-bottom: 1px solid #86989B; - font-weight: bold; - background-color: #AFC1C4; -} - -div.warning { - border: 1px solid #940000; -} - -div.warning p.admonition-title { - background-color: #CF0000; - border-bottom-color: #940000; -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - background-color: #ddd; - color: #222; - border: 1px solid #ccc; -} \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/addingtags.html b/third_party/libtiff/doc/html-prebuilt/addingtags.html deleted file mode 100644 index ac70501..0000000 --- a/third_party/libtiff/doc/html-prebuilt/addingtags.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - - Defining New TIFF Tags — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Defining New TIFF Tags

-

Libtiff has built-in knowledge of all the standard TIFF tags, as -well as extensions. The following describes how to add knowledge of -new tags as builtins to libtiff, or how to application specific tags can -be used by applications without modifying libtiff.

-
-

TIFFFieldInfo

-

How libtiff manages specific tags is primarily controlled by the -definition for that tag value stored internally as a TIFFFieldInfo structure. -This structure looks like this:

-
typedef struct {
-  uint32_t       field_tag;        /* field's tag */
-  short          field_readcount;  /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */
-  short          field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */
-  TIFFDataType   field_type;       /* type of associated data */
-  unsigned short field_bit;        /* bit in fieldsset bit vector */
-  unsigned char  field_oktochange; /* if true, can change while writing */
-  unsigned char  field_passcount;  /* if true, pass dir count on set */
-  char          *field_name;       /* ASCII name */
-} TIFFFieldInfo;
-
-
-
-
-uint32_t TIFFFieldInfo.field_tag
-

The tag number. For instance 277 for the -SamplesPerPixel tag. Builtin tags will generally have a #define in -tiff.h for each known tag.

-
- -
-
-short TIFFFieldInfo.field_readcount
-

The number of values which should be read. -The special value TIFF_VARIABLE (-1) indicates that a variable number of -values may be read. The special value TIFFTAG_SPP (-2) indicates that there -should be one value for each sample as defined by TIFFTAG_SAMPLESPERPIXEL. -The special value TIFF_VARIABLE2 (-3) is similar to TIFF_VARIABLE -but the required TIFFGetField() count value must be uint32_t* instead of uint16_t* as -for TIFF_VARIABLE (-1). -For ASCII fields with variable length, this field is TIFF_VARIABLE.

-
- -
-
-short TIFFFieldInfo.field_writecount
-

The number of values which should be written. -Generally the same as field_readcount. A few built-in exceptions exist, but -I haven't analysed why they differ.

-
- -
-
-TIFFDataType TIFFFieldInfo.field_type
-

Type of the field. One of TIFF_BYTE, TIFF_ASCII, -TIFF_SHORT, TIFF_LONG, -TIFF_RATIONAL, TIFF_SBYTE, -TIFF_UNDEFINED, TIFF_SSHORT, -TIFF_SLONG, TIFF_SRATIONAL, -TIFF_FLOAT, TIFF_DOUBLE or -TIFF_IFD. -And for BigTIFF TIFF_LONG8, -TIFF_SLONG8 and TIFF_IFD8, -which are automatically reverted to 4 byte fields in -ClassicTIFF.

-
- -
-
-unsigned short TIFFFieldInfo.field_bit
-

Built-in tags stored in special fields in the -TIFF structure have assigned field numbers to distinguish them (e.g. -FIELD_SAMPLESPERPIXEL). New tags should generally just use -FIELD_CUSTOM indicating they are stored in the generic tag list.

-
- -
-
-unsigned char TIFFFieldInfo.field_oktochange
-

TRUE if it is OK to change this tag value -while an image is being written. FALSE for stuff that must be set once -and then left unchanged (like ImageWidth, or PhotometricInterpretation for -instance).

-
- -
-
-unsigned char TIFFFieldInfo.field_passcount
-

If TRUE, then the count value must be passed -in TIFFSetField(), and TIFFGetField(), otherwise the count is not required. -This should generally be TRUE for non-ascii variable count tags unless -the count is implicit (such as with the colormap).

-
- -
-
-char *TIFFFieldInfo.field_name
-

A name for the tag. Normally mixed case (studly caps) -like StripByteCounts, and relatively short.

-
- -

Within tif_dirinfo.c file, the built-in TIFF tags are defined with -TIFFField structure that has additional parameters defining the var_arg -interface of TIFFSetField() and TIFFGetField().

-

Various functions exist for getting the internal TIFFFieldInfo -definitions, including _TIFFFindFieldInfo(), and -_TIFFFindFieldInfoByName(). See -tif_dirinfo.c for details.

-
-
-

Default Tag Auto-registration

-

In libtiff 3.6.0 a new mechanism was introduced allowing libtiff to -read unrecognised tags automatically. When an unknown tags is encountered, -it is automatically internally defined with a default name and a type -derived from the tag value in the file. Applications only need to predefine -application specific tags if they need to be able to set them in a file, or -if particular calling conventions are desired for TIFFSetField() and -TIFFGetField().

-

When tags are autodefined like this the field_readcount and -field_writecount values are always TIFF_VARIABLE2 (-3). The -field_passcount is always TRUE, and the field_bit is -FIELD_CUSTOM. The field name will be Tag %d where the %d -is the tag number.

-

Thus, to read anonymous auto-registered tags use the following:

-
uint32_t count;
-void* value;  //has to be a pointer to the expected value type.
-TIFFGetField(tif, TIFFTAG_UNKNOWN_TO_LIBTIFF, &count, &value);
-
-
-
-
-

Defining Application Tags

-

For various reasons, it is common for applications to want to define -their own tags to store information outside the core TIFF specification. -This is done by calling TIFFMergeFieldInfo() with one or more -TIFFFieldInfo.

-

The libgeotiff library provides geospatial information extensions within -a TIFF file. First, an array of TIFFFieldInfo is prepared with -information on the new tags:

-
static const TIFFFieldInfo xtiffFieldInfo[] = {
-
-    /* XXX Insert Your tags here */
-    { TIFFTAG_GEOPIXELSCALE,        -1,-1, TIFF_DOUBLE,     FIELD_CUSTOM,
-      TRUE, TRUE,   "GeoPixelScale" },
-    { TIFFTAG_GEOTRANSMATRIX,       -1,-1, TIFF_DOUBLE,     FIELD_CUSTOM,
-      TRUE, TRUE,   "GeoTransformationMatrix" },
-    { TIFFTAG_GEOTIEPOINTS, -1,-1, TIFF_DOUBLE,     FIELD_CUSTOM,
-      TRUE, TRUE,   "GeoTiePoints" },
-    { TIFFTAG_GEOKEYDIRECTORY, -1,-1, TIFF_SHORT,   FIELD_CUSTOM,
-      TRUE, TRUE,   "GeoKeyDirectory" },
-    { TIFFTAG_GEODOUBLEPARAMS,      -1,-1, TIFF_DOUBLE,     FIELD_CUSTOM,
-      TRUE, TRUE,   "GeoDoubleParams" },
-    { TIFFTAG_GEOASCIIPARAMS,       -1,-1, TIFF_ASCII,      FIELD_CUSTOM,
-      TRUE, FALSE,  "GeoASCIIParams" }
-};
-
-
-

In order to define the tags, we call TIFFMergeFieldInfo() on the -desired TIFF handle with the list of TIFFFieldInfo.

-
#define     N(a)    (sizeof (a) / sizeof (a[0]))
-
-/* Install the extended Tag field info */
-TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo));
-
-
-

The tags need to be defined for each TIFF file opened - and when reading -they should be defined before the tags of the file are read, yet a valid -TIFF* is needed to merge the tags against. In order to get them -registered at the appropriate part of the setup process, it is necessary -to register our merge function as an extender callback with libtiff. -This is done with TIFFSetTagExtender(). We also keep track of the -previous tag extender (if any) so that we can call it from our extender -allowing a chain of customizations to take effect.

-
static TIFFExtendProc _ParentExtender = NULL;
-
-static
-void _XTIFFInitialize(void)
-{
-    static int first_time=1;
-
-    if (! first_time) return; /* Been there. Done that. */
-    first_time = 0;
-
-    /* Grab the inherited method and install */
-    _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory);
-}
-
-
-

The extender callback is looks like this. It merges in our new fields -and then calls the next extender if there is one in effect.

-
static void
-_XTIFFDefaultDirectory(TIFF *tif)
-{
-    /* Install the extended Tag field info */
-    TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo));
-
-    /* Since an XTIFF client module may have overridden
-     * the default directory method, we call it now to
-     * allow it to set up the rest of its own methods.
-     */
-
-    if (_ParentExtender)
-        (*_ParentExtender)(tif);
-}
-
-
-

The above approach ensures that our new definitions are used when reading -or writing any TIFF file. However, since on reading we already have -default definitions for tags, it is usually not critical to pre-define them. -If tag definitions are only required for writing custom tags, you can just -call TIFFMergeFieldInfo() before setting new tags. The whole extender -architecture can then be avoided.

-
-
-

Adding New Builtin Tags

-

A similar approach is taken to the above. However, the _TIFFField -information should be added to the tiffFields[] list in -tif_dirinfo.c. This _TIFFField structure is like -TIFFFieldInfo structure but has additional members:

-

The tags in the tiffFields[] list need not to be in sorted -order by the tag number. Sorting is done when setting up the -TIFFFieldArray at IFD initialization.

-
typedef struct _TIFFField {
-  uint32_t             field_tag;        /* field's tag */
-  short                field_readcount;  /* read count / TIFF_VARIABLE / TIFF_VARIABLE2 / TIFF_SPP */
-  short                field_writecount; /* write count / TIFF_VARIABLE / TIFF_VARIABLE2 */
-  TIFFDataType         field_type;       /* type of associated data */
-  uint32_t             field_anonymous;  /* if true, this is a unknown / anonymous tag */
-  TIFFSetGetFieldType  set_field_type;   /* type to be passed to TIFFSetField and TIFFGetField */
-  TIFFSetGetFieldType  get_field_type;   /* not used */
-  unsigned short       field_bit;        /* bit in fieldsset bit vector */
-  unsigned char        field_oktochange; /* if true, can change while writing */
-  unsigned char        field_passcount;  /* if true, pass dir count on set */
-  char                *field_name;       /* ASCII name */
-  TIFFFieldArray      *field_subfields;  /* if field points to child ifds, child ifd field definition array */
-};
-
-
-
-
-uint32_t _TIFFField.field_anonymous
-

Used internally to indicate auto-registered tags. -See TIFFFieldIsAnonymous().

-
- -
-
-TIFFSetGetFieldType _TIFFField.set_field_type
-
-
The enummeration identifier gives a hint and defines the vararg -parameters passed to TIFFSetField() and TIFFGetField().
-
For example TIFF_SETGET_UINT64 defines a single -uint64_t parameter to be passed to TIFFSetField() and -TIFFGetField(), respectively.
-
To distinguish the three different array types, there are three -strings before the value type within the enummeration identifier -(e.g. TIFF_SETGET_C0_UINT64):
-
"_C0_" for fixed arrays and thus no count parameter is required -for TIFFSetField() and TIFFGetField(), respectively. -The array length is constant and given by field_readcount or -field_writecount, respectively.
-
"_C16_" and "_C32_" are for variable arrays with uint16_t -or uint32_t count parameter required for TIFFSetField() and -TIFFGetField(), respectively. But then, field_readcount and -field_writecount has to be set to -1 for _C16_ and -3 for _C32_, -respectively.
-
-
- -
-
-TIFFSetGetFieldType _TIFFField.get_field_type
-

Currently, this parameter is not used for TIFFGetField(). -Nevertheless, it is set as a copy of set_field_type or set to -TIFF_SETGET_UNDEFINED.

-
- -

Normally new built-in tags should be defined with FIELD_CUSTOM -and then only two points need to be done:

-
    -
  1. Define the tag in tiff.h.

  2. -
  3. Add an entry in the tiffFields[] array list defined at the -top of tif_dirinfo.c.

  4. -
-

However, if it is desirable for the tag value to have its own field in -the TIFFDirectory structure, then you will also need to -#define a new FIELD_ value for it, and add appropriate -handling as follows:

-
    -
  1. Add a field to the TIFFDirectory structure in tif_dir.h -and define a FIELD_* bit number (also update the definition of -FIELD_CODEC to reflect your addition).

  2. -
  3. Add entries in _TIFFVSetField() and _TIFFVGetField() -for the new tag.

  4. -
  5. (optional) If the value associated with the tag is not a scalar value -(e.g. the array for TransferFunction) and requires -special processing, -then add the appropriate code to TIFFReadDirectory() and -TIFFWriteDirectory(). You're best off finding a similar tag and -cribbing code.

  6. -
  7. Add support to TIFFPrintDirectory() in tif_print.c -to print the tag's value.

  8. -
-

If you want to maintain portability, beware of making assumptions -about data types. Use the typedefs (uint16_t, etc. when dealing with -data on disk and t*_t when stuff is in memory) and be careful about -passing items through printf or similar vararg interfaces.

-
-
-

Adding New Codec-private Tags

-

To add tags that are meaningful only when a particular compression -algorithm is used follow these steps:

-
    -
  1. Define the tag in tiff.h.

  2. -
  3. Allocate storage for the tag values in the private state block of -the codec.

  4. -
  5. Insure the state block is created when the codec is initialized.

  6. -
  7. At TIFFInitfoo() time override the method pointers in the -TIFF structure for getting, setting and printing tag values. -For example,

    -
    sp->vgetparent = tif->tif_vgetfield;
    -tif->tif_vgetfield = fooVGetField;        /* hook for codec tags */
    -sp->vsetparent = tif->tif_vsetfield;
    -tif->tif_vsetfield = fooVSetField;        /* hook for codec tags */
    -tif->tif_printdir = fooPrintDir;  /* hook for codec tags */
    -
    -
    -

    (Actually you may decide not to override the -tif_printdir method, but rather just specify it).

    -
  8. -
  9. Create a private TIFFFieldInfo array for your tags and -merge them into the core tags at initialization time using -_TIFFMergeFieldInfo(); e.g.

    -
    _TIFFMergeFieldInfo(tif, fooFieldInfo, N(fooFieldInfo));
    -
    -
    -

    (where N is a macro used liberaly throughout the distributed code).

    -
  10. -
  11. Fill in the get and set routines. Be sure to call the parent method -for tags that you are not handled directly. Also be sure to set the -FIELD_* bits for tags that are to be written to the file. Note that -you can create "pseudo-tags" by defining tags that are processed -exclusively in the get/set routines and never written to file (see -the handling of TIFFTAG_FAXMODE in tif_fax3.c -for an example of this).

  12. -
  13. Fill in the print routine, if appropriate.

  14. -
-

Note that space has been allocated in the FIELD_* bit space for -codec-private tags. Define your bits as FIELD_CODEC+<offset> to -keep them away from the core tags. If you need more tags than there -is room for, just increase td_fieldsset at the top of -tif_dir.h.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/build.html b/third_party/libtiff/doc/html-prebuilt/build.html deleted file mode 100644 index 39be83c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/build.html +++ /dev/null @@ -1,972 +0,0 @@ - - - - - - - - Building the TIFF Software Distribution — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Building the TIFF Software Distribution

-cramps -

This chapter contains step-by-step instructions on how to configure -and build the TIFF software distribution. The software is most -easily built on a UNIX system, but with a little bit of work it can -easily be built and used on other non-UNIX platforms.

-
-

Building on all systems with CMake

-

CMake may be used to -generate build files for most common build systems and IDEs, and -supports all UNIX-like systems as well as Windows. See -the CMake website for further -details. To build the software on you need to first run -cmake to configure the build and generate the system-specific -build files. This reads the top-level CMakeLists.txt file, -which probes the target system for necessary tools and functions, -checks any options you specified to configure the build, and then -outputs build files configured for your system. If using Unix -Makefiles, once configuration is done, you simply -run make (or gmake) to build the software and -then make install to do the installation. For other build -systems, you do the equivalent steps with the tool for that system. -For example, on any UNIX system:

-
$ cd ./tiff-4.0.5
-$ cmake
-    ...lots of messages...
-$ make
-    ...lots of messages...
-$ make test
-    ...lots of messages...
-# make install
-
-
-

Building is dependent on a make utility and a C -(and optionally a C++) compiler, so you will need these tools.

-

In general, the software is designed such that the following -targets will always be available:

-
make [all]      build stuff
-make test       run the test suite
-make install    build and install stuff
-make clean      remove object files, executables and cruft
-
-
-
-

Build Trees

-

There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code.

-
$ gzip -dc tiff-4.0.5.tar.gz | tar -xf -
-$ cd ./tiff-4.0.5
-$ cmake
-$ make
-$ make test
-$ make install
-
-
-

Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure.

-
$ gzip -dc tiff-4.0.5.tar.gz | tar -xf -
-$ mkdir tiff-4.0.5-build
-$ cd ./tiff-4.0.5-build
-$ cmake ../tiff-4.0.5
-$ make
-$ make test
-$ make install
-
-
-

This second scheme is useful for:

-
    -
  • building multiple targets from a single source tree

  • -
  • building from a read-only source tree

  • -
  • sharing the source files via a network, but building on -multiple systems

  • -
  • keeping the source tree clean -(unlike autoconf, cmake does not provide -a distclean target, so out of source builds are -recommended)

  • -
-
-
-

Generators

-

The default generator for UNIX is Unix Makefiles, and on Windows is -NMake Makefiles or MSBuild depending upon the setup. -Run cmake --help to list all the -generators available for your platform. For example, to use the Ninja -build system on UNIX or -Windows:

-
cmake -G Ninja
-cmake --build .
-ctest -V
-cmake --build . --target install
-
-
-

Note that cmake --build . is a build-system-independent way -of building a target; you can always use the build system directly.

-

Alternatively, using the MSBuild system on Windows (64-bit Release -build with VS2013):

-
cmake -G "Visual Studio 12 2013 Win64"
-cmake --build . --config Release
-ctest -V -C Release
-cmake --build . --config Release --target install
-
-
-

With the above configuration, it's also possible to open the generated -solution file with the Visual Studio IDE as well as building on the -command-line.

-
-
-

Configuration Options

-

The configuration process is critical to the proper compilation, -installation, and operation of the -software. The CMakeLists.txt script runs a series of tests to -decide whether or not the target system supports required -functionality and, if it does not, whether it can emulate or -workaround the missing functions. After running cmake, check -the CMakeCache.txt file; this contains all the results of the -checks performed and the options set by the user. If cmake -failed to run, check CMakeFiles/CMakeOutput.log -and CMakeFiles/CMakeError.log; these should record the error -which caused the failure.

-

A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are the -directories where the software is to be installed. By default the -software is installed in the /usr/local hierarchy. To change -this behaviour the appropriate parameters can be specified on the -command line. Run cmake --help to get a full list of possible -options, and cmake -LH to list all the configurable options for -this software package, or cmake -LAH to show all advanced -options in addition. Standard installation related options are shown -below.

-
-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Installation options

Option

Description

CMAKE_INSTALL_PREFIX

Installation root directory. The options below may be used to override -individual installation locations.

CMAKE_INSTALL_BINDIR

user executables [PREFIX/bin]

CMAKE_INSTALL_SBINDIR

system admin executables [PREFIX/sbin]

CMAKE_INSTALL_LIBEXECDIR

program executables [PREFIX/libexec]

CMAKE_INSTALL_SYSCONFDIR

read-only single-machine data [PREFIX/etc]

CMAKE_INSTALL_SHAREDSTATEDIR

modifiable architecture-independent data [PREFIX/com]

CMAKE_INSTALL_LOCALSTATEDIR

modifiable single-machine data [PREFIX/var]

CMAKE_INSTALL_LIBDIR

object code libraries [PREFIX/lib]

CMAKE_INSTALL_INCLUDEDIR

C header files [PREFIX/include]

CMAKE_INSTALL_OLDINCLUDEDIR

C header files for non-gcc [/usr/include]

CMAKE_INSTALL_DATAROOTDIR

read-only architecture-independent data root [PREFIX/share]

CMAKE_INSTALL_DATADIR

read-only architecture-independent data [DATAROOTDIR]

CMAKE_INSTALL_LOCALEDIR

locale-dependent data [DATAROOTDIR/locale]

CMAKE_INSTALL_MANDIR

man documentation [DATAROOTDIR/man]

CMAKE_INSTALL_DOCDIR

documentation root [DATAROOTDIR/doc/tiff]

-
-

Also see the -CMake documentation -for additional variables -which may be set.

-
-
-

Configuring Optional Packages/Support

-

The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -cmake commandline parameters.

-
-

Static/Shared Objects Support

-

BUILD_SHARED_LIBS[=ON|OFF]:

-
-

Build shared libraries (default is ON)

-

This option controls whether or not to configure the software -to build a shared and static binaries for the TIFF library. Use of -shared libraries can significantly reduce the disk space needed for -users of the TIFF software. If shared libraries are not used then -the code is statically linked into each application that uses it.

-
-

ld-version-script[=ON|OFF]

-
-

Enable linker version script (default is ON)

-

Add shared library symbol versioning on ELF-based systems (e.g. -Linux and FreeBSD) which use the GNU linker. This is needed if -several major versions of libtiff might be loaded at once into the -same program.

-
-
-
-

JPEG Support

-

jpeg[=ON|OFF]

-
-

Enable IJG JPEG library usage (required for JPEG compression, enabled by default)

-
-

JPEG_INCLUDE_DIR=DIR:

-
-

Location of IJG JPEG library headers

-
-

JPEG_LIBRARY=DIR

-
-

Location of IJG JPEG library binary

-
-

The JPEG package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) libjpeg -distribution; this software is available at http://www.ijg.org/. -The CMake script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above options for that.

-
-
-

ZIP Support

-

The ZIP support enables support for the handling of TIFF -images with deflate-encoded data (enabled by default if -available). Support for deflate-encoded data requires the freely -available zlib distribution written by Jean-loup Gailly and -Mark Adler; this software is available at http://www.zlib.org/.

-
-
-
-
-

Building on a UNIX System with Autoconf

-

To build the software on a UNIX system you need to first run the -configure shell script that is located in the top level of the -source directory. This script probes the target system for -necessary tools and functions and constructs a build environment in -which the software may be compiled. Once configuration is done, you -simply run make (or gmake) to build the software -and then make install to do the installation; for example:

-
% cd ./tiff-4.0.5
-% ./configure
-    ...lots of messages...
-% make
-    ...lots of messages...
-% make check
-    ...lots of messages...
-# make install
-
-
-

Supplied Makefiles are dependent on a make utility and a C -(and optionally a C++ compiler), so you will need these tools.

-

In general, the software is designed such that the following -should be "make-able" in each directory:

-
-
- ---- - - - - - - - - - - - - - - - - - - - - - - -
Make targets

Target

Description

make [all]

build everything

make check

run the test suite

make install

build and install everything

make clean

remove object files, executables and cruft

make distclean

remove everything that can be recreated

-
-

Note that after running make distclean the -configure script must be run again to create the Makefile -and other make-related files.

-
-

Build Trees

-

There are two schemes for configuring and building the software. If -you intend to build the software for only one target system, you -can configure the software so that it is built in the same -directories as the source code.

-
% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
-% cd ./tiff-4.0.5
-% ./configure
-% make
-% make check
-% make install
-
-
-

Otherwise, you can configure a build tree that is parallel to -the source tree hierarchy (or in some completely different place) -but which contains only configured files and files created during -the build procedure.

-
% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
-% mkdir tiff-4.0.5-build
-% cd ./tiff-4.0.5-build
-% ../tiff-4.0.5/configure
-% make
-% make check
-% make install
-
-
-

This second scheme is useful for:

-
    -
  • building multiple targets from a single source tree

  • -
  • building from a read-only source tree

  • -
  • sharing the source files via a network, but building on -multiple systems

  • -
-
-
-

Configuration Options

-

The configuration process is critical to the proper compilation, -installation, and operation of the software. The configure script -runs a series of tests to decide whether or not the target system -supports required functionality and, if it does not, whether it can -emulate or workaround the missing functions. This procedure is -fairly complicated and, due to the nonstandard nature of most UNIX -systems, prone to error. The first time that you configure the -software for use you should check the output from the configure -script and look for anything that does not make sense for your -system.

-

A second function of the configure script is to set the default -configuration parameters for the software. Of particular note are -the directories where the software is to be installed. By default -the software is installed in the /usr/local hierarchy. To -change this behaviour the appropriate parameters can be specified -on the command line to configure. Run ./configure --help to -get a full list of possible options. Standard installation related -options are shown below.

-

Installation directories:

-
-
---prefix=PREFIX
-

install architecture-independent files in PREFIX [/usr/local]

-
- -
-
---exec-prefix=EPREFIX
-

install architecture-dependent files in EPREFIX [PREFIX]

-
- -

By default, make install will install all the files in -/usr/local/bin, /usr/local/lib etc. You can specify -an installation prefix other than /usr/local using --prefix, -for instance --prefix=$HOME. For better control, use the options below.

-

Fine tuning of the installation directories:

-
-
---bindir=DIR
-

user executables [EPREFIX/bin]

-
- -
-
---sbindir=DIR
-

system admin executables [EPREFIX/sbin]

-
- -
-
---libexecdir=DIR
-

program executables [EPREFIX/libexec]

-
- -
-
---sysconfdir=DIR
-

read-only single-machine data [PREFIX/etc]

-
- -
-
---sharedstatedir=DIR
-

modifiable architecture-independent data [PREFIX/com]

-
- -
-
---localstatedir=DIR
-

modifiable single-machine data [PREFIX/var]

-
- -
-
---libdir=DIR
-

object code libraries [EPREFIX/lib]

-
- -
-
---includedir=DIR
-

C header files [PREFIX/include]

-
- -
-
---oldincludedir=DIR
-

C header files for non-gcc [/usr/include]

-
- -
-
---datarootdir=DIR
-

read-only architecture-independent data root [PREFIX/share]

-
- -
-
---datadir=DIR
-

read-only architecture-independent data [DATAROOTDIR]

-
- -
-
---localedir=DIR
-

locale-dependent data [DATAROOTDIR/locale]

-
- -
-
---mandir=DIR
-

man documentation [DATAROOTDIR/man]

-
- -
-
---docdir=DIR
-

documentation root [DATAROOTDIR/doc/tiff]

-
- -
-
---htmldir=DIR
-

html documentation [DOCDIR]

-
- -

Program names:

-
-
---program-prefix=PREFIX
-

prepend PREFIX to installed program names

-
- -
-
---program-suffix=SUFFIX
-
- -

append SUFFIX to installed program names

-
-
---program-transform-name=PROGRAM
-

run sed PROGRAM on installed program names

-
- -
-
-

Configuring Optional Packages/Support

-

The TIFF software comes with several packages that are installed -only as needed, or only if specifically configured at the time the -configure script is run. Packages can be configured via the -configure script commandline parameters.

-
-

Static/Shared Objects Support

-
-
---enable-shared[=PKGS]
-

Build shared libraries [enabled]

-
- -
-
---enable-static[=PKGS]
-

Build static libraries [enabled]

-

These options control whether or not to configure the software -to build a shared and static binaries for the TIFF library. Use of -shared libraries can significantly reduce the disk space needed for -users of the TIFF software. If shared libraries are not used then -the code is statically linked into each application that uses it. -By default both types of binaries are configured.

-
- -
-
---enable-rpath
-

Enable runtime linker paths (-R libtool option)

-

Add library directories (see other options below) to the TIFF -library run-time linker path.

-
- -
-
---enable-ld-version-script
-

Enable linker version script [yes]

-

Add shared library symbol versioning on ELF-based systems (e.g. -Linux and FreeBSD) which use the GNU linker. This is needed if -several major versions of libtiff might be loaded at once into the -same program.

-
- -
-
-

JPEG Support

-
-
---disable-jpeg
-

Disable IJG JPEG library usage (required for JPEG compression, enabled by default)

-
- -
-
---with-jpeg-include-dir=DIR
-

Location of IJG JPEG library headers

-
- -
-
---with-jpeg-lib-dir=DIR
-

Location of IJG JPEG library binary)

-
- -

The JPEG package enables support for the handling of -TIFF images with JPEG-encoded data. Support for JPEG-encoded data -requires the Independent JPEG Group (IJG) libjpeg -distribution; this software is available at -http://www.ijg.org/. The configure -script automatically tries to search for a working IJG JPEG -installation. If it fails to find library, JPEG support will be -automatically disabled. If you want specify the exact paths to -library binary and headers, use above switches for that.

-
-
-

ZIP Support

-

The ZIP support enables support for the handling of -TIFF images with deflate-encoded data. Support for deflate-encoded -data requires the freely available zlib distribution -written by Jean-loup Gailly and Mark Adler; this software is -available at http://www.zlib.org/. Support will be -enabled automatically if zlib is found.

-
-
-
-
-

Building the Software on Other Systems

-

This section contains information that might be useful if you are -working on a non-UNIX system that is not directly supported. All -library-related files described below are located in the -libtiff directory.

-

The library requires two files that are generated -on-the-fly. The file tif_fax3sm.c has the state -tables for the Group 3 and Group 4 decoders. This file is generated -by the mkg3states program on a UNIX system; for -example:

-
cd libtiff
-cc -o mkg3states mkg3states.c
-rm -f tif_fax3sm.c
-./mkg3states -c const tif_fax3sm.c
-
-
-

The -c option can be used to control whether or not the -resulting tables are generated with a const declaration. -The -s option can be used to specify a C storage class for -the table declarations. The -b option can be used to force -data values to be explicitly bracketed with {} (apparently -needed for some MS-Windows compilers); otherwise the structures are -emitted in as compact a format as possible. Consult the source code -for this program if you have questions.

-

The second file required to build the library, version.h, -contains the version information returned by the -TIFFGetVersion() routine. This file is built on most systems -using the mkversion program and the contents of the -VERSION and tiff.alpha files; for example,

-
cd libtiff
-cc -o mkversion mkversion.c
-rm -f version.h
-./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h
-
-
-

Otherwise, when building the library on a non-UNIX system be -sure to consult the files tiffcomp.h and tiffconf.h. -The former contains system compatibility definitions while the -latter is provided so that the software configuration can be -controlled on systems that do not support the make facility for -building the software.

-

Systems without a 32-bit compiler may not be able to handle some -of the codecs in the library; especially the Group 3 and 4 decoder. -If you encounter problems try disabling support for a particular -codec; consult the Modifying The TIFF Library.

-

Programs in the tools directory are written to assume an ANSI C -compilation environment. There may be a few POSIX'isms as well. The -code in the port directory is provided to emulate routines -that may be missing on some systems. On UNIX systems the -configure script automatically figures out which routines -are not present on a system and enables the use of the equivalent -emulation routines from the port directory. It may be -necessary to manually do this work on a non-UNIX system.

-
-
-

Testing the software

-

Assuming you have working versions of tiffgt, you can now use -it to view any of the sample images available for testing, or try -tiffinfo to display the file metadata. See the -TIFF Test Images section on obtaining the test images. Otherwise, you can -do a cursory check of the library with the tiffcp and -tiffcmp programs. For example,

-
tiffcp -lzw cramps.tif x.tif
-tiffcmp cramps.tif x.tif
-
-
-

(tiffcmp should be silent if the files compare -correctly).

-
-
-

LibTIFF source files

-

The following files make up the core library:

-
-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core library source files

File

Description

libtiff/tiff.h

TIFF spec definitions

libtiff/tiffconf.h

non-UNIX configuration definitions

libtiff/tiffio.h

public TIFF library definitions

libtiff/tiffiop.h

private TIFF library definitions

libtiff/t4.h

CCITT Group 3/4 code tables+definitions

libtiff/tif_dir.h

private defs for TIFF directory handling

libtiff/tif_fax3.h

CCITT Group 3/4-related definitions

libtiff/tif_predict.h

private defs for Predictor tag support

libtiff/tiffvers.h

version string

libtiff/uvcode.h

LogL/LogLuv codec-specific definitions

libtiff/tif_aux.c

auxiliary directory-related functions

libtiff/tif_close.c

close an open TIFF file

libtiff/tif_codec.c

configuration table of builtin codecs

libtiff/tif_color.c

colorspace transforms

libtiff/tif_compress.c

compression scheme support

libtiff/tif_dir.c

directory tag interface code

libtiff/tif_dirinfo.c

directory known tag support code

libtiff/tif_dirread.c

directory reading code

libtiff/tif_dirwrite.c

directory writing code

libtiff/tif_dumpmode.c

"no" compression codec

libtiff/tif_error.c

library error handler

libtiff/tif_fax3.c

CCITT Group 3 and 4 codec

libtiff/tif_fax3sm.c

G3/G4 state tables (generated by mkg3states)

libtiff/tif_flush.c

i/o and directory state flushing

libtiff/tif_getimage.c

TIFFRGBAImage support

libtiff/tif_jbig.c

JBIG codec

libtiff/tif_jpeg.c

JPEG codec (interface to the IJG distribution)

libtiff/tif_jpeg_12.c

12-bit JPEG codec (interface to the IJG distribution)

libtiff/tif_lerc.c

LERC codec

libtiff/tif_luv.c

SGI LogL/LogLuv codec

libtiff/tif_lzma.c

LZMA codec

libtiff/tif_lzw.c

LZW codec

libtiff/tif_next.c

NeXT 2-bit scheme codec (decoding only)

libtiff/tif_ojpeg.c

Old JPEG codec (obsolete, decoding only)

libtiff/tif_open.c

open and simply query code

libtiff/tif_packbits.c

Packbits codec

libtiff/tif_pixarlog.c

Pixar codec

libtiff/tif_predict.c

Predictor tag support

libtiff/tif_print.c

directory printing support

libtiff/tif_read.c

image data reading support

libtiff/tif_strip.c

some strip-related code

libtiff/tif_swab.c

byte and bit swapping support

libtiff/tif_thunder.c

Thunderscan codec (decoding only)

libtiff/tif_tile.c

some tile-related code

libtiff/tif_unix.c

UNIX-related OS support

libtiff/tif_version.c

library version support

libtiff/tif_warning.c

library warning handler

libtiff/tif_win32.c

Win32 (Windows)-related OS support

libtiff/tif_write.c

image data writing support

libtiff/tif_zip.c

Deflate codec

libtiff/tif_zstd.c

ZSTD codec

libtiff/mkg3states.c

program to generate G3/G4 decoder state tables

libtiff/mkspans.c

program to generate black-white span tables

-
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/contrib.html b/third_party/libtiff/doc/html-prebuilt/contrib.html deleted file mode 100644 index 8f4434f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/contrib.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - Contributed TIFF Software — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Contributed TIFF Software

-smallliz -

The contrib directory has contributed software that -uses the TIFF library or which is associated with the library -(typically glue and guidance for ports to non-UNIX platforms, or tools that -aren't directly TIFF related).

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Contributed software

Location

Description

contrib/dbs

various tools from Dan & Chris Sears, including a simple X-based viewer

contrib/ras

two programs by Patrick Naughton for converting -between Sun rasterfile format and TIFF (these -require libpixrect.a, as opposed to the one in -tools that doesn't)

contrib/mac-mpw

-

contrib/mac-cw

-

scripts and files from Niles Ritter for building -the library and tools under Macintosh/MPW C and -code warrior.

contrib/acorn

scripts and files from Peter Greenham for building -the library and tools on an Acorn RISC OS system.

contrib/win32

scripts and files from Scott Wagner for building -the library under Windows NT and Windows 95. (The makefile.vc in the -libtiff/libtiff directory may be sufficient for most users.)

contrib/win_dib

two separate implementations of TIFF to DIB code suitable for any Win32 -platform. Contributed by Mark James, and Philippe Tenenhaus.

contrib/ojpeg

Patch for IJG JPEG library related to support for some Old JPEG in TIFF files. -Contributed by Scott Marovich.

contrib/dosdjgpp

scripts and files from Alexander Lehmann for building -the library under MSDOS with the DJGPP v2 compiler.

contrib/tags

scripts and files from Niles Ritter for adding private -tag support at runtime, without changing libtiff.

contrib/mfs

code from Mike Johnson to read+write images in memory -without modifying the library

contrib/pds

various routines from Conrad Poelman; a TIFF image iterator and -code to support "private sub-directories"

contrib/iptcutil

A utility by Bill Radcliffe to -convert an extracted IPTC Newsphoto caption from a binary blob to -ASCII text, and vice versa. IPTC binary blobs can be extracted from -images via the ImageMagick convert(1) -utility.

contrib/addtiffo

A utility (and supporting subroutine) for building -one or more reduce resolution -overviews to an existing TIFF file. Supplied by -Frank Warmerdam.

contrib/stream

A class (TiffStream) for accessing TIFF files through a C++ stream -interface. Supplied by Avi Bleiweiss.

-

Questions regarding these packages are usually best directed toward -their authors.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions.html b/third_party/libtiff/doc/html-prebuilt/functions.html deleted file mode 100644 index 7dc659d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - TIFF Functions Overview — LibTIFF 4.7.1 documentation - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFAccessTagMethods.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFAccessTagMethods.html deleted file mode 100644 index 6c281e9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFAccessTagMethods.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - TIFFAccessTagMethods — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFAccessTagMethods

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFFTagMethods *TIFFAccessTagMethods(TIFF *tif)
-
- -
-
-

Description

-

This provides read/write access to the TIFFTagMethods within the TIFF -structure to application code without giving access to the private TIFF -structure.

-
-
-

Diagnostics

-

None

-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFClientInfo.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFClientInfo.html deleted file mode 100644 index 498e00c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFClientInfo.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - TIFFClientInfo — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFClientInfo

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-void *TIFFGetClientInfo(TIFF *tif, const char *name)
-
- -
-
-void TIFFSetClientInfo(TIFF *tif, void *data, const char *name)
-
- -
-
-

Description

-

The clientinfo linked list provides a method to hand over user defined -data from one routine to another via the internal tif storage of the -libtiff library.

-

TIFFGetClientInfo() returns a pointer to the data of the named entry -in the clientinfo-list. If the name is not found NULL is returned.

-

TIFFSetClientInfo() adds or replaces an entry in the clientinfo-list -with the name and the pointer to the data provided by the caller.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFClose.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFClose.html deleted file mode 100644 index dac387d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFClose.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - TIFFClose — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFClose

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-void TIFFClose(TIFF *tif)
-
- -
-
-void TIFFCleanup(TIFF *tif)
-
- -
-
-

Description

-

TIFFClose() closes a file that was previously opened with -TIFFOpen(). Any buffered data are flushed to the file, including -the contents of the current directory (if modified); and all resources -are reclaimed. TIFFClose() calls TIFFCleanup() and then -the associated function to close the file handle.

-

TIFFCleanup() is an auxiliary function to free the TIFF structure. -The given structure will be completely freed, so you should save opened file -handle and pointer to the close procedure in external variables before -calling TIFFCleanup(), if you will need these ones to close the file. -TIFFCleanup() calls TIFFFlush(), which stores all pending data -in the file.

-
-

Note

-

Both functions have no return value. -If you want to check whether the data has been successfully written -to the file, you can call TIFFFlush(), which has a return value, -before TIFFClose().

-
-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff), -TIFFError (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCreateDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFCreateDirectory.html deleted file mode 100644 index dd77842..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCreateDirectory.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - TIFFCreateDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFCreateDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFCreateDirectory(TIFF *tif)
-
- -
-
-int TIFFFreeDirectory(TIFF *tif)
-
- -
-
-int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn)
-
- -
-
-

Description

-

The following routines create or release a directory.

-

TIFFCreateDirectory() setup for a directory in a open TIFF file. -The newly created directory will not exist on the file till -TIFFWriteDirectory(), TIFFCheckpointDirectory(), -TIFFFlush() or TIFFClose() is called. -TIFFWriteDirectory() also creates a new directory, -frees the *tif structure and sets up a new one.

-

TIFFFreeDirectory() releases allocated storage associated with a -directory, especially custom-fields. -However, the main part of the directory is not touched. Routine -TIFFCleanup() calls TIFFFreeDirectory() to release -the directory part of the tif structure.

-

TIFFUnlinkDirectory() unlink the specified directory from the -directory chain. -The parameter dirn specifies the subfile/directory -as an integer number, with the first directory numbered one (1). -This is different to TIFFSetDirectory() or TIFFCurrentDirectory() where the first -directory starts with zero (0).

-

Directory query functions TIFFCurrentDirectory(), -TIFFCurrentDirOffset(), TIFFLastDirectory() and -TIFFNumberOfDirectories() retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information!

-
-
-

Notes

-

Be aware:

- -

After libtiff version 4.6.0 TIFFCreateDirectory() also releases -the directory part of the tif structure by calling TIFFFreeDirectory(), -which should have been called by the user application before creating a new directory.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-
-
-

See also

-

libtiff (3tiff), -TIFFCustomDirectory (3tiff), -TIFFquery (3tiff), -TIFFSetDirectory (3tiff), -TIFFWriteDirectory (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomDirectory.html deleted file mode 100644 index ce22622..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomDirectory.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - - TIFFCustomDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFCustomDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFCreateCustomDirectory(TIFF *tif, const TIFFFieldArray *infoarray)
-
- -
-
-int TIFFCreateEXIFDirectory(TIFF *tif)
-
- -
-
-int TIFFCreateGPSDirectory(TIFF *tif)
-
- -
-
-int TIFFWriteCustomDirectory(TIFF *tif, uint64 *pdiroff)
-
- -
-
-int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, const TIFFFieldArray *infoarray)
-
- -
-
-int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff)
-
- -
-
-int TIFFReadGPSDirectory(TIFF *tif, toff_t diroff)
-
- -
-
-const TIFFFieldArray *_TIFFGetExifFields(void)
-
- -
-
-const TIFFFieldArray *_TIFFGetGpsFields(void)
-
- -
-
-

Description

-

The following routines create a custom directory and retrieve information -about directories in an open TIFF file.

-

TIFFCreateCustomDirectory(), TIFFCreateEXIFDirectory(), -TIFFCreateGPSDirectory() will setup a custom directory or one -of the predefined EXIF or GPS directories and set the context of the -TIFF-handle tif to that custom directory for functions -like TIFFSetField().

-

TIFFWriteCustomDirectory() will write the contents of the -current custom directory to the file and return the offset to that -directory in pdiroff. That offset has to be written to the main-IFD:

-
 /* Go back to the first directory, and add the EXIFIFD pointer. */
-TIFFSetDirectory(tif, 0);
-TIFFSetField(tif, TIFFTAG_EXIFIFD, pdiroff);
-
-
-

TIFFReadCustomDirectory() will read the custom directory from the -arbitrary offset into the infoarray and sets the context of the -TIFF-handle tif to that custom directory for functions like -TIFFReadField(). The TIFFFieldArray infoarray -has to be according the layout of the custom directory. For the predefined -EXIF and GPS directories, the relevant TIFFFieldArray definitions -are hidden within the functions TIFFReadEXIFDirectory() and -TIFFReadGPSDirectory() The code is very similar to TIFFReadDirectory(). -The offset to the custom directory diroff has to be read from the -relative TIFF tag first.

-

_TIFFGetExifFields() and _TIFFGetGpsFields() will -return a pointer to the libtiff internal definition list of the -EXIF and GPS tags, respectively.

-
-
-

Notes

-

Be aware

- -

Unfortunately to create or read custom directories with predefined fields -it is necessary to include the private tif_dir.h. However, for EXIF and -GPS directories, which have a predefined schema within libtiff, this -is not necessary. There are some test programmes that briefly demonstrate -the creation and reading of EXIF, GPS and custom directories. -See test/custom_dir.c and test/custom_dir_EXIF_231.c

-

After libtiff version 4.6.0 TIFFCreateCustomDirectory(), -TIFFCreateEXIFDirectory() and TIFFCreateGPSDirectory() also -releases the directory part of the tif structure by calling TIFFFreeDirectory(), -which should have been called by the user application before creating a new directory.

-
-
-

Hints and detailed instructions

-

Writing TIFF files with more than one directory (IFD) is not easy because -some side effects need to be known.

-

The main point here is that there can only be one tif structure in -the main memory for a file, which can only hold the tags of one directory -at a time. It is useless to work with two different tiffOut1, tiffOut2 -pointers, because there is only ONE TIFF object (TIFF directory) within -the libtiff. If you want to address a second directory in the file, -the tags of the current directory must first be saved in the file, -otherwise they will be lost (overwritten or mixed). Then the tif -structure in the main memory must be tidied up, otherwise the old tags -will beincluded in the new directory. -This can be done either by creating a new, empty tif structure or by -reading in an directory previously saved in the file.

-

A sequence to handle a second (or third) TIFF directory - in this case -the GPS IFD - is as follows:

-
    -
  1. Create TIFF file

  2. -
  3. Complete the "normal" metadata

  4. -
  5. Set the tag for the custom directory with a “dummy” value in order to -get the tag reserved. The final value will be inserted lateron. This -prevents the main directory from being written to the file again at an -additional area, leaving the first memory area unused:

  6. -
-
TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset);
-
-
-
    -
  1. Save current TIFF-directory to file. Otherwise, it will be lost. -Remember also the number of the current directory:

  2. -
-
TIFFWriteDirectory(tiffOut);
-dirNum = TIFFCurrentDirectory(tiffOut);
-
-
-
    -
  1. Create the second TIFF-directory (e.g. custom directory) and set its -fields. The TIFFFieldArray infoarray has to be specified beforehand -somewhere in your private include files. -An example is given for the EXIF directory in tif_dirinfo.c

  2. -
-
TIFFCreateCustomDirectory(tiffOut, infoarray);        /* for a real custom directory */
-/* or alternatively, use GPS or EXIF with pre-defined TIFFFieldArray IFD field structure */
-TIFFCreateGPSDirectory(tiffOut);
-TIFFSetField(tiffOut, GPSTAG_VERSIONID, gpsVersion);  /* set fields of the custom directory */
-
-
-

Be aware that every TIFFCreateDirectory() or TIFFWriteDirectory() -apparently frees the *tif structure and sets up a new one!

-
    -
  1. Write custom directory to file. The offset to that directory in the file -is returned in dir_offset.

  2. -
-
TIFFWriteCustomDirectory(tiffOut, &dir_offset);
-
-
-
    -
  1. Reload the first directory (i.e. the original TIFF directory). -Apparently, this reads the data back from file.

  2. -
-
TIFFSetDirectory(tiffOut, dirNum);
-
-
-
    -
  1. Set the correct offset value of the custom directory IFD tag and save -that changes to file.

  2. -
-
TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset);
-TIFFWriteDirectory(tiffOut);
-
-
-
-
-

RETURN VALUES

-

1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing the -directory contents.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-
-
-

See also

-

libtiff (3tiff), -TIFFCreateDirectory (3tiff), -TIFFquery (3tiff), -TIFFSetDirectory (3tiff), -TIFFWriteDirectory (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomTagList.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomTagList.html deleted file mode 100644 index c7d4664..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFCustomTagList.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - TIFFCustomTagList — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFCustomTagList

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFGetTagListCount(TIFF *tif)
-
- -
-
-uint32_t TIFFGetTagListEntry(TIFF *tif, int tag_index)
-
- -
-
-

Description

-

TIFFGetTagListCount() returns the number of entries in the -custom tag list.

-

TIFFGetTagListEntry() returns the tag number of the (n.th - 1) -entry within the custom tag list. -If the tag_index is larger or equal to the number of entries -in the tag list 0xFFFFFFFF (=(uint32_t(-1)) is returned.

-
-
-

Note

-

The known tags to libtiff are define as 'named' tags and a lot of them -as custom tags. The custom tag definitions are handled in an internal -custom tag list. This list can also be extended by adding tag definitions -to that list, so that libtiff is aware of those tags. -See Defining Application Tags

-
-
-

Diagnostics

-

none

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff), -TIFFError (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFDataWidth.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFDataWidth.html deleted file mode 100644 index 03d79ef..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFDataWidth.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - TIFFDataWidth — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFDataWidth

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFDataWidth(TIFFDataType type)
-
- -
-
-

Description

-

TIFFDataWidth() returns the size of type within TIFF file in bytes. -Currently following data types are supported:

-
    -
  • TIFF_BYTE

  • -
  • TIFF_ASCII

  • -
  • TIFF_SBYTE

  • -
  • TIFF_UNDEFINED

  • -
  • TIFF_SHORT

  • -
  • TIFF_SSHORT

  • -
  • TIFF_LONG

  • -
  • TIFF_SLONG

  • -
  • TIFF_FLOAT

  • -
  • TIFF_IFD

  • -
  • TIFF_RATIONAL

  • -
  • TIFF_SRATIONAL

  • -
  • TIFF_DOUBLE

  • -
  • TIFF_LONG8

  • -
  • TIFF_SLONG8

  • -
  • TIFF_IFD8

  • -
-
-
-

Return values

-

TIFFDataWidth() returns a number of bytes occupied by the item -of given type within the TIFF file. 0 returned when unknown data type supplied.

-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFDeferStrileArrayWriting.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFDeferStrileArrayWriting.html deleted file mode 100644 index e5cad82..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFDeferStrileArrayWriting.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - TIFFDeferStrileArrayWriting — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFDeferStrileArrayWriting

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFDeferStrileArrayWriting(TIFF *tif)
-
- -
-
-int TIFFForceStrileArrayWriting(TIFF *tif)
-
- -
-
-

Description

-

TIFFDeferStrileArrayWriting() is an advanced writing function -that must be used in a particular sequence, and generally together -with TIFFForceStrileArrayWriting(), to achieve its intended -effect. Their aim is to control when and where the -StripOffsets / StripByteCounts or TileOffsets / TileByteCounts -arrays are written into the file.

-

The purpose of this is to generate 'cloud-optimized geotiff' files where -the first KB of the file only contain the IFD entries without the potentially -large strile arrays. Those are written afterwards.

-

More precisely, when TIFFWriteCheck() is called, the tag entries for -those arrays will be written with type = count = offset = 0 as a temporary value.

-

Its effect is only valid for the current directory, and before -TIFFWriteDirectory() is first called, and will be reset -when changing directory.

-

The typical sequence of calls is:

-
TIFFOpen()
-/* or TIFFCreateDirectory(tif) */
-/* Set fields with calls to TIFFSetField(tif, ...) */
-TIFFDeferStrileArrayWriting(tif)
-TIFFWriteCheck(tif, ...)
-TIFFWriteDirectory(tif)
-/* ... potentially create other directories and come back to the above directory */
-TIFFForceStrileArrayWriting(tif) /* emit the arrays at the end of file */
-
-
-
-
-

Returns

-

1 in case of success, 0 otherwise.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-
-
-

Note

-

This functionality was introduced with libtiff 4.1.

-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFError.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFError.html deleted file mode 100644 index 0387e95..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFError.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - TIFFError — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFError

-
-

Synopsis

-
#include <tiffio.h>
-#include <stdarg.h>
-
-
-
-
-void TIFFError(const char *module, const char *fmt, ...)
-
- -
-
-void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt, ...)
-
- -
-
-void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt, ...)
-
- -
-
-typedef void (*TIFFErrorHandler)(const char *module, const char *fmt, va_list ap)
-
- -
-
-typedef void (*TIFFErrorHandlerExt)(thandle_t fd, const char *module, const char *fmt, va_list ap)
-
- -
-
-typedef int (*TIFFErrorHandlerExtR)(TIFF *tif, void *user_data, const char *module, const char *fmt, va_list ap)
-
- -
-
-TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler)
-
- -
-
-TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler)
-
- -
-
-

Description

-

TIFFError() invokes the library-wide error handler function -to (normally) write an error message to stderr. -The fmt parameter is a printf() format string, and any number -arguments can be supplied. The module parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which an error is -detected.

-

Applications that desire to capture control in the event of an error -should use TIFFSetErrorHandler() to override the default -error handler. A NULL (0) error handler function may be -installed to suppress error messages.

-

Two more application-specific error handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with an error message function, i.e. -TIFFErrorExt() and TIFFErrorExtR() if the application -intends to call the handler with those extended parameters.

-

TIFFErrorExt() provides a file handle as parameter. -Within libtiff TIFFErrorExt() is called passing tif->tif_clientdata -as fd, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for TIFFErrorExt() -is setup with TIFFSetErrorHandlerExt().

-

TIFFErrorExtR() (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -error handler. That means for different TIFF handles, different error -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -TIFFOpenExt(), TIFFOpenWExt(), TIFFFdOpenExt() -or TIFFClientOpenExt(). -Furthermore, a custom defined data structure user_data for the -error handler can be given along.

-

Please refer to TIFFOpenOptions for how to setup the -application-specific handler introduced with libtiff 4.5.

-
-
-

Note

-

Both functions TIFFError() and TIFFErrorExt() -each attempt to call both handler functions if they are defined. -First TIFFErrorHandler() is called and then TIFFErrorHandlerExt(). -However, TIFFError() passes a "0" as a file handle to -TIFFErrorHandlerExt().

-

TIFFErrorExtR() tries first to call the per-TIFF handle defined -error handler. If TIFFErrorHandlerExtR() is not defined or -returns 0, TIFFErrorHandler() and then TIFFErrorHandlerExt() -are called. From libtiff 4.5 onwards TIFFErrorExtR() is used -within the libtiff library where the TIFF handle is available. -Otherwise, TIFFErrorExt() is used!

-
-
-

Return values

-

TIFFSetErrorHandler() and TIFFSetErrorHandlerExt() -returns a reference to the previous error handler function.

-

TIFFErrorHandlerExtR() returns an integer as "stop" to control the call -of further error handler functions within TIFFErrorExtR():

-
-
-
-
-
-

See also

-

TIFFWarning (3tiff), -TIFFOpen (3tiff), -TIFFOpenOptions, -libtiff (3tiff), -printf (3)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldDataType.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldDataType.html deleted file mode 100644 index db074e1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldDataType.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - TIFFFieldDataType — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldDataType

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFFDataType TIFFFieldDataType(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldDataType() returns the data type stored in a TIFF field. -fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), -or TIFFFieldWithName().

-
-
-

Return values

-

TIFFFieldDataType() returns a member of the enum type -TIFFDataType.

-
-
-

See also

-

TIFFFieldName (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldTag (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldName.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldName.html deleted file mode 100644 index e798be1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldName.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - TIFFFieldName — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldName

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-const char *TIFFFieldName(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldName() returns the textual name for a TIFF field. -fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), -or TIFFFieldWithName().

-
-
-

Return values

-

TIFFFieldName() returns a constant C string.

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldTag (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldPassCount.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldPassCount.html deleted file mode 100644 index 88dafaa..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldPassCount.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - TIFFFieldPassCount — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldPassCount

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFFieldPassCount(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldPassCount() returns true (nonzero) if -TIFFGetField() and TIFFSetField() -expect a count value to be passed before the actual data pointer.

-

fip is a field information pointer previously returned by -TIFFFindField(), -TIFFFieldWithTag(), -TIFFFieldWithName().

-

When a count is required, it will be of type uint32_t -if TIFFFieldReadCount() reports TIFF_VARIABLE2, -and of type uint16_t otherwise. Use TIFFFieldWriteCount() -for TIFFSetField(), respectively. (This distinction is -critical for use of TIFFGetField(), but normally not so for -use of TIFFSetField().)

-

An alternative function for the count value determination -is TIFFFieldSetGetCountSize().

-
-
-

Return values

-

TIFFFieldPassCount() returns an integer that is always 1 (true) -or 0 (false).

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldName (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldTag (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldQuery.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldQuery.html deleted file mode 100644 index b18996d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldQuery.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - TIFFFieldQuery — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldQuery

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-const TIFFField *TIFFFieldWithName(TIFF *tif, const char *field_name)
-
- -
-
-const TIFFField *TIFFFieldWithTag(TIFF *tif, uint32_t tag)
-
- -
-
-const TIFFField *TIFFFindField(TIFF *tif, uint32_t tag, TIFFDataType dt)
-
- -
-
-int TIFFFieldIsAnonymous(const TIFFField *fip)
-
- -
-
-int TIFFFieldSetGetSize(const TIFFField *fip)
-
- -
-
-int TIFFFieldSetGetCountSize(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldWithName() and TIFFFieldWithTag() -return a pointer to TIFF field information structure fip by the tag's -field_name or its tag number.

-

TIFFFindField() searches for the TIFF field information structure -fip of a given tag number and a specific TIFFDataType dt. -With dt== TIFF_ANY the behaviour is the same than for -TIFFFieldWithTag().

-

All three functions return NULL, when the tag is not -registered within libtiff (see also Default Tag Auto-registration ).

-
-

Such a TIFFDataType dependent search could be useful when the same -tag is defined twice but with different data types, which is true for -rare cases like TIFFTAG_XCLIPPATHUNITS. However, the libtiff does -currently not support multiple definitions of the same tag.

-
-

The following routines return status information about TIFF fields.

-

fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), TIFFFieldWithName().

-

TIFFFieldIsAnonymous() returns true (nonzero) if the field, -read from file, is unknown to libtiff and an anonymous field has -been auto-registered. Return is zero "0" if field is known to libtiff. -See Default Tag Auto-registration for more information.

-

TIFFFieldSetGetSize() returns the data size in bytes of -the field data type used for libtiff internal storage. -This is also the data size of the parameter to be provided to -TIFFSetField() and TIFFGetField(). Custom -TIFF_RATIONAL values can be stored internally either -as float or double. TIFFFieldSetGetSize() would -then return "4" or "8", respectively.

-

TIFFFieldSetGetCountSize() returns size of count parameter -of TIFFSetField() and TIFFGetField() and also if it is -required: 0=none, 2= uint16_t, 4= uint32_t. -See also description of TIFFFieldReadCount().

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldName (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldTag (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldReadCount.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldReadCount.html deleted file mode 100644 index 32de3fc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldReadCount.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - TIFFFieldReadCount — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldReadCount

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFFieldReadCount(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldReadCount() returns the number of values available to be read -from the specified TIFF field; that is, the number of arguments that should be -supplied to TIFFGetField(). For most field types this is a small -positive integer, typically 1 or 2, but there are some special values:

-
    -
  • TIFF_VARIABLE = -1 indicates that a variable number of -values is possible; then, a uint16_t count argument and a -pointer data argument must be supplied to TIFFGetField().

  • -
  • TIFF_VARIABLE2 = -3 is the same as TIFF_VARIABLE -except that the count argument must have type uint32_t.

  • -
  • TIFF_SPP = -2 indicates that the number of arguments is -equal to the image's number of samples per pixel.

  • -
-

fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), or -TIFFFieldWithName().

-
-
-

Return values

-

TIFFFieldReadCount() returns an integer.

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldName (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldTag (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldTag.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldTag.html deleted file mode 100644 index 98135b0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldTag.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - TIFFFieldTag — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldTag

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-uint32_t TIFFFieldTag(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldTag() returns the numeric tag value for a TIFF field. -This can be compared to various constants exported by the libtiff -header files, such as TIFFTAG_IMAGEWIDTH.

-

fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), or -TIFFFieldWithName().

-
-
-

Return values

-

TIFFFieldTag() returns an integer tag value.

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldName (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldWriteCount (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldWriteCount.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldWriteCount.html deleted file mode 100644 index 12c19f8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFieldWriteCount.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - TIFFFieldWriteCount — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFieldWriteCount

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFFieldWriteCount(const TIFFField *fip)
-
- -
-
-

Description

-

TIFFFieldWriteCount() returns the number of values to be written -into the specified TIFF field; that is, the number of arguments that should -be supplied to TIFFSetField(). For most field types this is a small -positive integer, typically 1 or 2, but there are some special values:

-
    -
  • TIFF_VARIABLE indicates that a variable number of values is -possible; then, a uint16_t count argument and a pointer data -argument must be supplied to TIFFSetField().

  • -
  • TIFF_VARIABLE2 is the same as TIFF_VARIABLE except -that the count argument must have type uint32_t. (On most -modern machines, this makes no practical difference, and the count -argument can simply be an int in either case.)

  • -
  • TIFF_SPP indicates that the number of arguments must be equal -to the image's number of samples per pixel.

  • -
-

fip is a field information pointer previously returned by -TIFFFindField(), TIFFFieldWithTag(), or -TIFFFieldWithName().

-

For most field types, TIFFFieldWriteCount() returns the same value as -TIFFFieldReadCount(), but there are some exceptions.

-
-
-

Return values

-

TIFFFieldWriteCount() returns an integer.

-
-
-

See also

-

TIFFFieldDataType (3tiff), -TIFFFieldName (3tiff), -TIFFFieldPassCount (3tiff), -TIFFFieldQuery (3tiff), -TIFFFieldReadCount (3tiff), -TIFFFieldTag (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFlush.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFFlush.html deleted file mode 100644 index 042c8fc..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFFlush.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - TIFFFlush — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFFlush

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFFlush(TIFF *tif)
-
- -
-
-int TIFFFlushData(TIFF *tif)
-
- -
-
-

Description

-

TIFFFlush() causes any pending writes for the specified file -(including writes for the current directory) to be done. In normal -operation this call is never needed—the library automatically does -any flushing required.

-

TIFFFlushData() flushes any pending image data for the specified -file to be written out; directory-related data are not flushed. In normal -operation this call is never needed—the library automatically does any -flushing required.

-
-
-

Return values

-

0 is returned if an error is encountered, otherwise 1 is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteEncodedStrip (3tiff), -TIFFWriteEncodedTile (3tiff), -TIFFWriteRawStrip (3tiff), -TIFFWriteRawTile (3tiff), -TIFFWriteScanline (3tiff), -TIFFWriteTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFGetField.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFGetField.html deleted file mode 100644 index b9e7500..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFGetField.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - - - TIFFGetField — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFGetField

-
-

Synopsis

-
#include <tiffio.h>
-#include <stdarg.h>
-
-
-
-
-int TIFFGetField(TIFF *tif, uint32_t tag, ...)
-
- -
-
-int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap)
-
- -
-
-int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag, ...)
-
- -
-
-int TIFFVGetFieldDefaulted(TIFF *tif, uint32_t tag, va_list ap)
-
- -
-
-

Description

-

TIFFGetField() returns the value of a tag or pseudo-tag associated with the -the current directory of the opened TIFF file tif. (A pseudo-tag is a -parameter that is used to control the operation of the TIFF library but whose value -is not read or written to the underlying file.) The file must have been previously -opened with TIFFOpen(). The tag is identified by tag, one of the values -defined in the include file tiff.h (see also the table below). The type and -number of values returned is dependent on the tag being requested. The programming -interface uses a variable argument list as prescribed by the stdarg.h -interface. The returned values should only be interpreted if TIFFGetField() -returns 1.

-

TIFFVGetField() is functionally equivalent to TIFFGetField() -except that it takes a pointer to a variable argument list. TIFFVGetField() -is useful for layering interfaces on top of the functionality provided by -TIFFGetField().

-

TIFFGetFieldDefaulted() and TIFFVGetFieldDefaulted() are identical -to TIFFGetField() and TIFFVGetField(), respectively, except that if -a tag is not defined in the current directory and it has a default value, then the -default value is returned.

-

The tags understood by libtiff the number of parameter values, and the -types for the returned values are shown below. The data types are specified as in C -and correspond to the types used to specify tag values to -TIFFSetField(). Remember that TIFFGetField() returns parameter -values, so all the listed data types are pointers to storage where values should be -returned. Consult the TIFF specification (or relevant industry specification) for -information on the meaning of each tag and their possible values.

-
-
- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tag properties

Tag name

Count

Types

Notes

TIFFTAG_ARTIST

1

const char**

TIFFTAG_BADFAXLINES

1

uint32_t*

TIFFTAG_BITSPERSAMPLE

1

uint16_t*

TIFFTAG_CLEANFAXDATA

1

uint16_t*

TIFFTAG_COLORMAP

3

const uint16_t**

1 << BitsPerSample arrays

TIFFTAG_COMPRESSION

1

uint16_t*

TIFFTAG_CONSECUTIVEBADFAXLINES

1

uint32_t*

TIFFTAG_COPYRIGHT

1

const char**

TIFFTAG_DATATYPE

1

uint16_t*

TIFFTAG_DATETIME

1

const char**

TIFFTAG_DOCUMENTNAME

1

const char**

TIFFTAG_DOTRANGE

2

uint16_t*

TIFFTAG_EXTRASAMPLES

2

uint16_t*, const uint16_t**

count, types array

TIFFTAG_FAXFILLFUNC

1

TIFFFaxFillFunc*

G3/G4 compression pseudo-tag

TIFFTAG_FAXMODE

1

int*

G3/G4 compression pseudo-tag

TIFFTAG_FILLORDER

1

uint16_t*

TIFFTAG_GROUP3OPTIONS

1

uint32_t*

TIFFTAG_GROUP4OPTIONS

1

uint32_t*

TIFFTAG_HALFTONEHINTS

2

uint16_t*

TIFFTAG_HOSTCOMPUTER

1

const char**

TIFFTAG_ICCPROFILE

2

const uint32_t*, const void**

count, profile data‡

TIFFTAG_IMAGEDEPTH

1

uint32_t*

TIFFTAG_IMAGEDESCRIPTION

1

const char**

TIFFTAG_IMAGELENGTH

1

uint32_t*

TIFFTAG_IMAGEWIDTH

1

uint32_t*

TIFFTAG_INKNAMES

1

const char**

TIFFTAG_INKSET

1

uint16_t*

TIFFTAG_JPEGCOLORMODE

1

int*

JPEG pseudo-tag

TIFFTAG_JPEGQUALITY

1

int*

JPEG pseudo-tag

TIFFTAG_JPEGTABLES

2

uint32_t*, const void**

count, tables

TIFFTAG_JPEGTABLESMODE

1

int*

JPEG pseudo-tag

TIFFTAG_MAKE

1

const char**

TIFFTAG_MATTEING

1

uint16_t*

TIFFTAG_MAXSAMPLEVALUE

1

uint16_t*

TIFFTAG_MINSAMPLEVALUE

1

uint16_t*

TIFFTAG_MODEL

1

const char**

TIFFTAG_ORIENTATION

1

uint16_t*

TIFFTAG_PAGENAME

1

const char**

TIFFTAG_PAGENUMBER

2

uint16_t*

TIFFTAG_PHOTOMETRIC

1

uint16_t*

TIFFTAG_PHOTOSHOP

2

uint32_t*, const void**

count, data

TIFFTAG_PLANARCONFIG

1

uint16_t*

TIFFTAG_PREDICTOR

1

uint16_t*

TIFFTAG_PRIMARYCHROMATICITIES

1

const float**

6-entry array

TIFFTAG_REFERENCEBLACKWHITE

1

const float**

6-entry array

TIFFTAG_RESOLUTIONUNIT

1

uint16_t*

TIFFTAG_RICHTIFFIPTC

2

uint32_t*, const void**

count, data

TIFFTAG_ROWSPERSTRIP

1

uint32_t*

TIFFTAG_SAMPLEFORMAT

1

uint16_t*

TIFFTAG_SAMPLESPERPIXEL

1

uint16_t*

TIFFTAG_SMAXSAMPLEVALUE

1

double*

TIFFTAG_SMINSAMPLEVALUE

1

double*

TIFFTAG_SOFTWARE

1

const char**

TIFFTAG_STONITS

1

double*

TIFFTAG_STRIPBYTECOUNTS

1

const uint64_t**

TIFFTAG_STRIPOFFSETS

1

const uint64_t**

TIFFTAG_SUBFILETYPE

1

uint32_t*

TIFFTAG_SUBIFD

2

uint16_t*, const uint64_t**

count, offsets array

TIFFTAG_TARGETPRINTER

1

const char**

TIFFTAG_THRESHHOLDING

1

uint16_t*

TIFFTAG_TILEBYTECOUNTS

1

const uint64_t**

TIFFTAG_TILEDEPTH

1

uint32_t*

TIFFTAG_TILELENGTH

1

uint32_t*

TIFFTAG_TILEOFFSETS

1

const uint64_t**

TIFFTAG_TILEWIDTH

1

uint32_t*

TIFFTAG_TRANSFERFUNCTION

1 or 3†

const uint16_t**

1 << BitsPerSample entry arrays

TIFFTAG_WHITEPOINT

1

const float**

2-entry array

TIFFTAG_XMLPACKET

2

uint32_t*, const void**

count, data

TIFFTAG_XPOSITION

1

float*

TIFFTAG_XRESOLUTION

1

float*

TIFFTAG_YCBCRCOEFFICIENTS

1

const float**

3-entry array

TIFFTAG_YCBCRPOSITIONING

1

uint16_t*

TIFFTAG_YCBCRSUBSAMPLING

2

uint16_t*

TIFFTAG_YPOSITION

1

float*

TIFFTAG_YRESOLUTION

1

float*

-
-
-
†:

If SamplesPerPixel is one, then a single array is returned; otherwise -three arrays are returned.

-
-
‡:

The contents of this field are quite complex. See -"The ICC Profile Format Specification", -Annex B.3 "Embedding ICC Profiles in TIFF Files" (available at -http://www.color.org) for an explanation.

-
-
-
-
-

Autoregistered tags

-

If you can't find the tag in the table above that means this is an unsupported -tag and is not directly supported by the libtiff library. You will -still be able to read it's value if you know the data type of that tag. For -example, if you want to read the LONG value from the tag 33424 -and ASCII string from the tag 36867 you can use the following code:

-
uint32_t  count;
-void    *data;
-
-TIFFGetField(tiff, 33424, &count, &data);
-printf("Tag %d: %d, count %d\n", 33424, *(uint32_t *)data, count);
-TIFFGetField(tiff, 36867, &count, &data);
-printf("Tag %d: %s, count %d\n", 36867, (char *)data, count);
-
-
-
-
-

Return values

-

1 is returned if the tag is defined in the current directory; otherwise a 0 is -returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

Unknown field, tag 0x%x:

-
-

An unknown tag was supplied.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFSetField (3tiff), -TIFFSetDirectory (3tiff), -TIFFReadDirectory (3tiff), -TIFFWriteDirectory (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFMergeFieldInfo.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFMergeFieldInfo.html deleted file mode 100644 index 9ea360c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFMergeFieldInfo.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - TIFFMergeFieldInfo — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFMergeFieldInfo

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFMergeFieldInfo(TIFF *tif, const TIFFFieldInfo info[], uint32_t n)
-
- -
-
-

Description

-

TIFFMergeFieldInfo() is used to add application-defined TIFF tags -to the list of known libtiff tags. -A brief description is given at Defining Application Tags -and a description of the TIFFFieldInfo array elements can be -found at TIFFFFieldInfo definition.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff), -Defining New TIFF Tags, -TIFFSetTagExtender

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpen.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpen.html deleted file mode 100644 index ebc4f7d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpen.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - TIFFOpen — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFOpen

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFF *TIFFOpen(const char *filename, const char *mode)
-
- -
-
-TIFF *TIFFOpenW(const wchar_t *name, const char *mode)
-
- -
-
-TIFF *TIFFFdOpen(const int fd, const char *filename, const char *mode)
-
- -
-
-TIFF *TIFFOpenExt(const char *filename, const char *mode, TIFFOpenOptions *opts)
-
- -
-
-TIFF *TIFFOpenWExt(const wchar_t *name, const char *mode, TIFFOpenOptions *opts)
-
- -
-
-TIFF *TIFFFdOpenExt(const int fd, const char *filename, const char *mode, TIFFOpenOptions *opts)
-
- -
-
-const char *TIFFSetFileName(TIFF *tif)
-
- -
-
-int TIFFSetFileno(TIFF *tif, int fd)
-
- -
-
-int TIFFSetMode(TIFF *tif, int mode)
-
- -
-
-typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void*, tmsize_t)
-
- -
-
-typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int)
-
- -
-
-typedef int (*TIFFCloseProc)(thandle_t)
-
- -
-
-typedef toff_t (*TIFFSizeProc)(thandle_t)
-
- -
-
-typedef int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size)
-
- -
-
-typedef void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size)
-
- -
-
-TIFF *TIFFClientOpen(const char *filename, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
-
- -
-
-TIFF *TIFFClientOpenExt(const char *filename, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, TIFFOpenOptions *opts)
-
- -
-
-thandle_t TIFFClientdata(TIFF *tif)
-
- -
-
-thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue)
-
- -
-
-

Description

-

TIFFOpen() opens a TIFF file whose name is filename -and returns a handle to be used in subsequent calls to routines in -libtiff. If the open operation fails, then -NULL (0) is returned. The mode parameter specifies if -the file is to be opened for reading (r) or (r+), writing (w), or -appending (a) and, optionally, whether to override certain -default aspects of library operation (see below Options).

-

The mode (r) opens only an existing file for reading and (r+) -for reading and writing. -When a file is opened for appending, existing data will not -be touched; instead new data will be written as additional subfiles. -If an existing file is opened for writing, all previous data is -overwritten.

-

If a file is opened for reading, the first TIFF directory in the file -is automatically read. -If a file is opened for writing or appending, a default directory -is automatically created for writing subsequent data. -This directory has all the default values specified in TIFF Revision 6.0:

-
    -
  • BitsPerSample = 1,

  • -
  • ThreshHolding = "bilevel art scan"

  • -
  • FillOrder = 1 (most significant bit of each data byte is filled first)

  • -
  • Orientation = 1 (the 0th row represents the visual top of the image, -and the 0th column represents the visual left hand side),

  • -
  • SamplesPerPixel = 1,

  • -
  • RowsPerStrip = ∞,

  • -
  • ResolutionUnit = 2 (inches), and

  • -
  • Compression = 1 (no compression).

  • -
-

To alter these values, or to define values for additional fields, -TIFFSetField() must be used.

-

TIFFOpenW() opens a TIFF file with a Unicode filename, for read/writing.

-

TIFFFdOpen() is like TIFFOpen() except that it opens a -TIFF file given an open file descriptor fd. -The file's name and mode must reflect that of the open descriptor. -Even for write-only mode, libtiff needs read permissions because -some of its functions need to read back the partially written TIFF file. -The object associated with the file descriptor must support random access. -In order to close a TIFF file opened with TIFFFdOpen() -first TIFFCleanup() should be called to free the internal -TIFF structure without closing the file handle and afterwards the -file should be closed using its file descriptor fd.

-

TIFFOpenExt() (added in libtiff 4.5) is like TIFFOpen(), -but options, such as re-entrant error and warning handlers and a limit in byte -that libtiff internal memory allocation functions are allowed to request per call -may be passed with the opts argument. The opts argument may be NULL. -Refer to TIFFOpenOptions for allocating and filling the opts argument -parameters. The allocated memory for TIFFOpenOptions -can be released straight after successful execution of the related -"TIFFOpenExt" functions.

-

TIFFOpenWExt() (added in libtiff 4.5) is like TIFFOpenExt(), -but opens a TIFF file with a Unicode filename.

-

TIFFFdOpenExt() (added in libtiff 4.5) is like TIFFFdOpen(), -but options argument opts like for TIFFOpenExt() can be passed.

-

TIFFSetFileName() sets the file name in the tif-structure -and returns the old file name.

-

TIFFSetFileno() overwrites a copy of the open file's I/O descriptor, -that was saved when the TIFF file was first opened, -and returns the previous value. See note below.

-

TIFFSetMode() sets the libtiff open mode in the tif-structure -and returns the old mode.

-

TIFFClientOpen() is like TIFFOpen() except that the caller -supplies a collection of functions that the library will use to do UNIX-like -I/O operations. The readproc and writeproc functions are called to read -and write data at the current file position. -seekproc is called to change the current file position à la lseek() (2). -closeproc is invoked to release any resources associated with an open file. -sizeproc is invoked to obtain the size in bytes of a file. -mapproc and unmapproc are called to map and unmap a file's contents in -memory; c.f. mmap() (2) and munmap() (2). -The clientdata parameter is an opaque "handle" passed to the client-specified -routines passed as parameters to TIFFClientOpen().

-
-

Note

-

In contrast to the return values of mmap() (2) and munmap() (2), -the return values of mapproc and unmapproc must be: -TRUE for success and FALSE to indicate an error. -libtiff built in functions _tiffMapProc() and _tiffUnmapProc() -can be found in tif_unix.c as well as in tif_win32.c.

-
-

TIFFClientOpenExt() (added in libtiff 4.5) is like TIFFClientOpen(), -but options argument opts like for TIFFOpenExt() can be passed.

-

TIFFClientdata() returns open file's clientdata handle, -which is the real open file's I/O descriptor used by libtiff. -Note: Within tif_unix.c this handle is converted into an integer file descriptor.

-

TIFFSetClientdata() sets open file's clientdata, and return previous value. -The clientdata is used as open file's I/O descriptor within libtiff.

-
-

Note

-

clientdata is used as file descriptor or handle of the opened TIFF file within -libtif, whereas the file descriptor fd (changeable by TIFFSetFileno()) -is only set once to the value of clientdata converted to an integer -(in tif_win32.c as well as in tif_unix.c). -When updating the file's clientdata with TIFFSetClientdata(), -the fd value is not updated.

-
-
-
-

Options

-

The open mode parameter can include the following flags in -addition to the r, r+, w, and a flags. -Note however that option flags must follow the read-write-append -specification.

-

Note 2: Also for w the file will be opened with read access rights -because libtiff needs to read back the partially written TIFF file -for some of its functions.

-

l:

-
-

When creating a new file force information be written with -Little-Endian byte order (but see below). -By default the library will create new files using the native -CPU byte order.

-
-

b:

-
-

When creating a new file force information be written with -Big-Endian byte order (but see below). -By default the library will create new files using the native -CPU byte order.

-
-

L:

-
-

Force image data that is read or written to be treated with -bits filled from Least Significant Bit (LSB) to -Most Significant Bit (MSB). -Note that this is the opposite to the way the library has -worked from its inception.

-
-

B:

-
-

Force image data that is read or written to be treated with -bits filled from Most Significant Bit (MSB) to -Least Significant Bit (LSB); this is the default.

-
-

H:

-
-

Force image data that is read or written to be treated with -bits filled in the same order as the native -CPU.

-
-

M:

-
-

Enable the use of memory-mapped files for images opened read-only. -If the underlying system does not support memory-mapped files -or if the specific image being opened cannot be memory-mapped -then the library will fallback to using the normal system interface -for reading information. -By default the library will attempt to use memory-mapped files.

-
-

m:

-
-

Disable the use of memory-mapped files.

-
-

C:

-
-

Enable the use of "strip chopping" when reading images -that are comprised of a single strip or tile of uncompressed data. -Strip chopping is a mechanism by which the library will automatically -convert the single-strip image to multiple strips, -each of which has about 8 Kilobytes of data. -This facility can be useful in reducing the amount of memory used -to read an image because the library normally reads each strip -in its entirety. -Strip chopping does however alter the apparent contents of the -image because when an image is divided into multiple strips it -looks as though the underlying file contains multiple separate -strips. -Finally, note that default handling of strip chopping is a compile-time -configuration parameter. -The default behaviour, for backwards compatibility, is to enable -strip chopping.

-
-

c:

-
-

Disable the use of strip chopping when reading images.

-
-

h:

-
-

Read TIFF header only, do not load the first image directory. That could be -useful in case of the broken first directory. We can open the file and proceed -to the other directories.

-
-

4:

-
-

ClassicTIFF for creating a file (default)

-
-

8:

-
-

BigTIFF for creating a file.

-
-

D:

-
-

Enable use of deferred strip/tile offset/bytecount array loading. They will -be loaded the first time they are accessed to. This loading will be done in -its entirety unless the O flag is also specified.

-
-

O:

-
-

On-demand loading of values of the strip/tile offset/bytecount arrays, limited -to the requested strip/tile, instead of whole array loading (implies D)

-
-
-
-

Byte order

-

The TIFF specification (all versions) states that compliant readers -"must be capable of reading images written in either byte order" . -Nonetheless some software that claims to support the reading of -TIFF images is incapable of reading images in anything but the native -CPU byte order on which the software was written. -(Especially notorious are applications written to run on Intel-based machines.) -By default the library will create new files with the native -byte-order of the CPU on which the application is run. -This ensures optimal performance and is portable to any application -that conforms to the TIFF specification. -To force the library to use a specific byte-order when creating -a new file the b and l option flags may be included in -the call to open a file; for example, wb or wl.

-
-
-

Return values

-

Upon successful completion -TIFFOpen(), TIFFFdOpen(), and TIFFClientOpen() -return a TIFF pointer. Otherwise, NULL is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-

"%s": Bad mode:

-
-

The specified mode parameter was not one of r (read), w (write), -or a (append).

-
-

"%s: Cannot open":

-
-

TIFFOpen() was unable to open the specified filename for read/writing.

-
-

"Cannot read TIFF header":

-
-

An error occurred while attempting to read the header information.

-
-

"Error writing TIFF header":

-
-

An error occurred while writing the default header information -for a new file.

-
-

"Not a TIFF file, bad magic number %d (0x%x)":

-
-

The magic number in the header was not (hex) -0x4d4d or (hex) 0x4949.

-
-

"Not a TIFF file, bad version number %d (0x%x)":

-
-

The version field in the header was not 42 (decimal).

-
-

"Cannot append to file that has opposite byte ordering":

-
-

A file with a byte ordering opposite to the native byte -ordering of the current machine was opened for appending (a). -This is a limitation of the library.

-
-
-
-

See also

-

libtiff (3tiff), -TIFFClose (3tiff), -TIFFStrileQuery (3tiff), -TIFFOpenOptions

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpenOptions.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpenOptions.html deleted file mode 100644 index 64c07a1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFOpenOptions.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - TIFFOpenOptions — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFOpenOptions

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-typedef TIFFOpenOptions TIFFOpenOptions
-
- -
-
-TIFFOpenOptions *TIFFOpenOptionsAlloc(void)
-
- -
-
-void TIFFOpenOptionsFree(TIFFOpenOptions*)
-
- -
-
-void TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts, tmsize_t max_single_mem_alloc)
-
- -
-
-void TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions *opts, tmsize_t max_cumulated_mem_alloc)
-
- -
-
-void TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *errorhandler_user_data)
-
- -
-
-void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *warnhandler_user_data)
-
- -
-
-void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, int warn_about_unknown_tags)
-
- -
-
-

Description

-

TIFFOpenOptions is an opaque structure which can be passed -to the TIFF open"Ext" functions to define some libtiff internal settings. -The settings are the maximum single memory allocation limit and -per-TIFF handle (re-entrant) error handler and warning handler functions. -For those handler a pointer to a custom defined data structure user_data -can be given along.

-

TIFFOpenOptionsAlloc() allocates memory for the TIFFOpenOptions -opaque structure and returns a TIFFOpenOptions pointer.

-

TIFFOpenOptionsFree() releases the allocated memory for -TIFFOpenOptions. The allocated memory for TIFFOpenOptions -can be released straight after successful execution of the related -TIFFOpen"Ext" functions like TIFFOpenExt().

-

TIFFOpenOptionsSetMaxSingleMemAlloc() (added in libtiff 4.5.0) sets -the value for the maximum single memory limit in byte that libtiff internal -memory allocation functions are allowed to request per call.

-
-

Note

-

However, the libtiff external functions _TIFFmalloc() -and _TIFFrealloc() do not apply this internal memory -allocation limit set by TIFFOpenOptionsSetMaxSingleMemAlloc()!

-
-

TIFFOpenOptionsSetMaxCumulatedMemAlloc() (added in libtiff 4.6.1) sets -the maximum cumulated memory allocations in byte, for a given TIFF handle, -that libtiff internal memory allocation functions are allowed.

-
-

Note

-

However, the libtiff external functions _TIFFmalloc() -and _TIFFrealloc() do not apply this internal memory -allocation limit set by TIFFOpenOptionsSetMaxCumulatedMemAlloc()!

-
-

TIFFOpenOptionsSetErrorHandlerExtR() sets the function pointer to -an application-specific and per-TIFF handle (re-entrant) error handler. -Furthermore, a pointer to a custom defined data structure errorhandler_user_data -can be passed. This error handler is invoked through TIFFErrorExtR() -and the errorhandler_user_data pointer is given along. -The errorhandler_user_data argument may be NULL.

-

TIFFOpenOptionsSetWarningHandlerExtR() works like -TIFFOpenOptionsSetErrorHandlerExtR() but for the warning handler, -which is invoked through TIFFWarningExtR()

-

TIFFOpenOptionsSetWarnAboutUnknownTags() sets whether libtiff should -emit a warning when encountering a unknown tag. This function has been added in -libtiff 4.7.1 and the default value is FALSE (change of behaviour compared to -earlier versions).

-
-
-

Example

-
#include "tiffio.h"
-
-typedef struct MyErrorHandlerUserDataStruct
-{
-    /* ... any user data structure ... */
-} MyErrorHandlerUserDataStruct;
-
-static int myErrorHandler(TIFF *tiff, void *user_data, const char *module,
-                      const char *fmt, va_list ap)
-{
-    MyErrorHandlerUserDataStruct *errorhandler_user_data =
-        (MyErrorHandlerUserDataStruct *)user_data;
-    /*... code of myErrorHandler ...*/
-    return 1;
-}
-
-
-main()
-{
-    tmsize_t limit = (256 * 1024 * 1024);
-    MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */};
-
-    TIFFOpenOptions *opts = TIFFOpenOptionsAlloc();
-    TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit);
-    TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data);
-    TIFF *tif = TIFFOpenExt("foo.tif", "r", opts);
-    TIFFOpenOptionsFree(opts);
-    /* ... go on here ... */
-
-    TIFFClose(tif);
-}
-
-
-
-
-

Note

-

This functionality was introduced with libtiff 4.5.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff), -TIFFError (3tiff), -TIFFWarning (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFPrintDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFPrintDirectory.html deleted file mode 100644 index 4bab3a9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFPrintDirectory.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - TIFFPrintDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFPrintDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-void TIFFPrintDirectory(TIFF *tif, FILE *fd, long flags)
-
- -
-
-

Description

-

TIFFPrintDirectory() prints a description of the current directory -in the specified TIFF file to the standard I/O output stream fd. -The flags parameter is used to control the "level of detail" -of the printed information; it is a bitwise-or of the flags defined in -tiffio.h:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Value

Description

TIFFPRINT_NONE

0x0

no extra info

TIFFPRINT_STRIPS

0x1

strips/tiles info

TIFFPRINT_CURVES

0x2

color/gray response curves

TIFFPRINT_COLORMAP

0x4

colormap

TIFFPRINT_JPEGQTABLES

0x100

JPEG Q matrices

TIFFPRINT_JPEGACTABLES

0x200

JPEG AC tables

TIFFPRINT_JPEGDCTABLES

0x200

JPEG DC tables

-
-
-

Notes

-

In C++ the flags parameter defaults to 0.

-
-
-

Return values

-

None.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff), -TIFFReadDirectory (3tiff), -TIFFSetDirectory (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFProcFunctions.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFProcFunctions.html deleted file mode 100644 index ef43bb2..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFProcFunctions.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - TIFFProcFunctions — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFProcFunctions

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFFCloseProc TIFFGetCloseProc(TIFF *tif)
-
- -
-
-TIFFMapFileProc TIFFGetMapFileProc(TIFF *tif)
-
- -
-
-TIFFReadWriteProc TIFFGetReadProc(TIFF *tif)
-
- -
-
-TIFFSeekProc TIFFGetSeekProc(TIFF *tif)
-
- -
-
-TIFFSizeProc TIFFGetSizeProc(TIFF *tif)
-
- -
-
-TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *tif)
-
- -
-
-TIFFReadWriteProc TIFFGetWriteProc(TIFF *tif)
-
- -
-
-

Description

-

The following routines return ?????? an open TIFF file.

-

TIFFGetCloseProc() returns a pointer to file close method.

-

TIFFGetMapFileProc() returns a pointer to memory mapping method.

-

TIFFGetReadProc() returns a pointer to file read method.

-

TIFFGetSeekProc() returns a pointer to file seek method.

-

TIFFGetSizeProc() returns a pointer to file size requesting method.

-

TIFFGetUnmapFileProc() returns a pointer to memory unmapping method.

-

TIFFGetWriteProc() returns a pointer to file write method.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFRGBAImage.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFRGBAImage.html deleted file mode 100644 index 8a5ebd9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFRGBAImage.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - - TIFFRGBAImage — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFRGBAImage

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-typedef unsigned char TIFFRGBValue
-
- -
-
-typedef struct _TIFFRGBAImage TIFFRGBAImage
-
- -
-
-int TIFFRGBAImageOK(TIFF *tif, char emsg[1024])
-
- -
-
-int TIFFRGBAImageBegin(TIFFRGBAImage *img, TIFF *tif, int stopOnError, char emsg[1024])
-
- -
-
-int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t width, uint32_t height)
-
- -
-
-void TIFFRGBAImageEnd(TIFFRGBAImage *img)
-
- -
-
-

Description

-

The routines described here provide a high-level interface through which -TIFF images may be read into memory. -Images may be strip- or tile-based and have a variety of different -characteristics: bits/sample, samples/pixel, photometric, orientation, etc. -Decoding state is encapsulated in a TIFFRGBAImage -structure making it possible to capture state for multiple images -and quickly switch between them. -The target raster format can be customized to a particular application's -needs by installing custom routines that manipulate image data -according to application requirements.

-

The default usage for these routines is:

- -

TIFFRGBAImageGet() can be called multiple times to decode an -image using different state parameters. -If multiple images are to be displayed and there is not enough -space for each of the decoded rasters, multiple state blocks can -be managed and then calls can be made to TIFFRGBAImageGet() -as needed to display an image.

-

The generated raster is assumed to be an array of -width × height -32-bit entries, where width must be less than or equal to the width of -the image (height may be any non-zero size). -If the raster dimensions are smaller than the image, the image data -is cropped to the raster bounds. -If the raster height is greater than that of the image, then the -image data are placed in the lower part of the raster. -(Note that the raster is assumed to be organized such that the pixel -at location (x, y) is raster [ y × width + x ]; -with the raster origin in the lower-left hand corner.)

-

Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros TIFFGetR, TIFFGetG, TIFFGetB, -and TIFFGetA should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255).

-

TIFFRGBAImageGet() converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory.

-

The parameter stopOnError specifies how to act if an error is -encountered while reading the image. If stopOnError is non-zero, -then an error will terminate the operation; otherwise -TIFFRGBAImageGet() will continue processing data until all the -possible data in the image have been requested.

-
-
-

Alternate raster formats

-

To use the core support for reading and processing TIFF images, but -write the resulting raster data in a different format one need only -override the "put methods" used to store raster data. -These methods are defined in the TIFFRGBAImage -structure and initially setup by TIFFRGBAImageBegin() -to point to routines that pack raster data in the default -ABGR pixel format. -Two different routines are used according to the physical organization -of the image data in the file: -PlanarConfiguration = 1 (packed samples), and -PlanarConfiguration = 2 (separated samples). -Note that this mechanism can be used to transform the data before -storing it in the raster. -For example one can convert data to colormap indices for display on a -colormap display.

-
-
-

Simultaneous raster store and display

-

It is simple to display an image as it is being read into memory -by overriding the put methods as described above for supporting -alternate raster formats. -Simply keep a reference to the default put methods setup by -TIFFRGBAImageBegin() and then invoke them before or after -each display operation. For example, the -tiffgt utility uses the following put method to -update the display as the raster is being filled:

-
static void
-putContigAndDraw(TIFFRGBAImage* img, uint32_t* raster,
-    uint32_t x, uint32_t y, uint32_t w, uint32_t h,
-    int32_t fromskew, int32_t toskew,
-    unsigned char* cp)
-{
-    (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp);
-    if (x+w == width) {
-        w = width;
-        if (img->orientation == ORIENTATION_TOPLEFT)
-            lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w);
-        else
-            lrectwrite(0, y, w-1, y+h-1, raster);
-    }
-}
-
-
-

(the original routine provided by the library is saved in the -variable putContig.)

-
-
-

Supporting additional TIFF formats

-

The TIFFRGBAImage() routines support the most commonly -encountered flavors of TIFF. It is possible to extend this support by -overriding the "get method" invoked by TIFFRGBAImageGet() -to read TIFF image data. -Details of doing this are a bit involved, it is best to make a copy -of an existing get method and modify it to suit the needs of an -application.

-
-
-

Notes

-

In C++ the stopOnError parameter defaults to 0.

-

SamplesPerPixel must be either 1, 2, 4, 8, or 16 bits. -Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. -SamplesPerPixel minus ExtraSamples).

-

Palette image colormaps that appear to be incorrectly written -as 8-bit values are automatically scaled to 16-bits.

-

Within the TIFFRGBAImage structure the TIFF orientation -and also the required orientation in the raster can be defined. -However, the lower level TIFFRGBAImageGet() functions -- also called by TIFFReadRGBAImage() and TIFFReadRGBAImageOriented() - -can mirror the image orientations across both axes, but cannot rotate them. -Therefore, images with a TIFF orientation of 5 (LeftTop) to 8 (LeftBottom) -are not stored correctly in the raster, as this would require an additional -rotation of 90 degrees and an exchange of width and height dimension.

-

If an alpha channel is used in an image, there are two common representations -that are available: straight (unassociated) alpha and premultiplied (associated) -alpha, which is specified by the value of ExtraSamples tag. -For files with unassociated alpha, the TIFFRGBAImage() reading routines -multiply the RGB values by the alpha channel values before saving them in the raster. -The other TIFFReadxxx (like TIFFReadScanline()) functions do not do this.

-
-
-

Return values

-

All routines return 1 if the operation was successful. -Otherwise, 0 is returned if an error was encountered and -stopOnError is zero.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Sorry, can not handle %d-bit pictures":

-
-

The image had BitsPerSample other than 1, 2, 4, 8, or 16.

-
-

"Sorry, can not handle %d-channel images":

-
-

The image had SamplesPerPixel other than 1, 3, or 4.

-
-

Missing needed "PhotometricInterpretation" tag:

-
-

The image did not have a tag that describes how to display -the data.

-
-

No "PhotometricInterpretation" tag, assuming RGB:

-
-

The image was missing a tag that describes how to display it, -but because it has 3 or 4 samples/pixel, it is assumed to be -RGB.

-
-

No "PhotometricInterpretation" tag, assuming min-is-black:

-
-

The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image.

-
-

"No space for photometric conversion table":

-
-

There was insufficient memory for a table used to convert -image samples to 8-bit RGB.

-
-

Missing required "Colormap" tag:

-
-

A Palette image did not have a required Colormap tag.

-
-

"No space for tile buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"No space for strip buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"Can not handle format":

-
-

The image has a format (combination of BitsPerSample, -SamplesPerPixel and PhotometricInterpretation) -that can not be handled.

-
-

"No space for B&W mapping table":

-
-

There was insufficient memory to allocate a table used to map -grayscale data to RGB.

-
-

"No space for Palette mapping table":

-
-

There was insufficient memory to allocate a table used to map -data to 8-bit RGB.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadRGBAImage (3tiff), -TIFFReadRGBAStrip (3tiff), -TIFFReadRGBATile (3tiff), -TIFFcolor (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadDirectory.html deleted file mode 100644 index da0c974..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadDirectory.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - TIFFReadDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadDirectory(TIFF *tif)
-
- -
-
-

Description

-

Read the next directory in the specified file and make it the current -directory. Applications only need to call TIFFReadDirectory() -to read multiple subfiles in a single TIFF file—(the first directory -in a file is automatically read when TIFFOpen() is called.

-
-
-

Notes

-

If the library is compiled with STRIPCHOP_SUPPORT enabled, then -images that have a single uncompressed strip or tile of data are -automatically treated as if they were made up of multiple strips or tiles of -approximately 8 kilobytes each. This operation is done only in-memory; it does -not alter the contents of the file. However, the construction of the "chopped -strips" is visible to the application through the number of strips [tiles] -returned by TIFFNumberOfStrips() [TIFFNumberOfTiles()].

-
-
-

Return values

-

If the next directory was successfully read, 1 is returned. Otherwise, 0 is -returned if an error was encountered, or if there are no more directories to -be read.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-

Seek error accessing TIFF directory:

-
-

An error occurred while positioning to the location of the -directory.

-
-

Wrong data type %d for field "%s":

-
-

The tag entry in the directory had an incorrect data type. -For example, an ImageDescription tag with a SHORT -data type.

-
-

TIFF directory is missing required "%s" field:

-
-

The specified tag is required to be present by the TIFF -5.0 specification, but is missing. -The directory is (usually) unusable.

-
-

%s: Rational with zero denominator:

-
-

A directory tag has a RATIONAL value whose denominator is zero.

-
-

Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored:

-
-

The specified tag's count field is bad. -For example, a count other than 1 for a SubFileType tag.

-
-

Cannot handle different per-sample values for field "%s":

-
-

The tag has SamplesPerPixel values and they are not all the same; e.g. -BitsPerSample. The library is unable to handle images of this sort.

-
-

Count mismatch for field "%s"; expecting %d, got %d:

-
-

The count field in a tag does not agree with the number expected by the -library. This should never happen, so if it does, the library refuses to -read the directory.

-
-

Invalid TIFF directory; tags are not sorted in ascending order:

-
-

The directory tags are not properly sorted as specified -in the TIFF 5.0 specification. This error is not fatal.

-
-

Ignoring unknown field with tag %d (0x%x):

-
-

An unknown tag was encountered in the directory; -the library ignores all such tags.

-
-

TIFF directory is missing required "ImageLength" field:

-
-

The image violates the specification by not having a necessary field. -There is no way for the library to recover from this error.

-
-

TIFF directory is missing required "PlanarConfig" field:

-
-

The image violates the specification by not having a necessary field. -There is no way for the library to recover from this error.

-
-

TIFF directory is missing required "StripOffsets" field:

-
-

The image has multiple strips, but is missing the tag that -specifies the file offset to each strip of data. -There is no way for the library to recover from this error.

-
-

TIFF directory is missing required "TileOffsets" field:

-
-

The image has multiple tiles, but is missing the tag that -specifies the file offset to each tile of data. -There is no way for the library to recover from this error.

-
-

TIFF directory is missing required "StripByteCounts" field:

-
-

The image has multiple strips, but is missing the tag that -specifies the size of each strip of data. -There is no way for the library to recover from this error.

-
-

TIFF directory is missing required "StripByteCounts" field, calculating from imagelength:

-
-

The image violates the specification by not having a necessary field. -However, when the image is comprised of only one strip or tile, the -library will estimate the missing value based on the file size.

-
-

Bogus "StripByteCounts" field, ignoring and calculating from imagelength:

-
-

Certain vendors violate the specification by writing zero for -the StripByteCounts tag when they want to leave the value -unspecified. -If the image has a single strip, the library will estimate -the missing value based on the file size.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFCreateDirectory (3tiff), -TIFFCustomDirectory (3tiff), -TIFFquery (3tiff), -TIFFWriteDirectory (3tiff), -TIFFSetDirectory (3tiff), -Multi Page / Multi Image TIFF, -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedStrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedStrip.html deleted file mode 100644 index 8f04ae0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedStrip.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - TIFFReadEncodedStrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadEncodedStrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Read the specified strip of data and place up to size bytes of decompressed -information in the (user supplied) data buffer.

-
-
-

Notes

-

The value of strip is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(PlanarConfiguration = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by TIFFStripSize(). -If -1 is passed in the size parameter, the whole strip will be read. You -should be sure you have enough space allocated for the buffer.

-

The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the FillOrder tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order.

-
-
-

Return values

-

The actual number of bytes of data that were placed in buf is returned; -TIFFReadEncodedStrip() returns -1 if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadRawStrip (3tiff), -TIFFReadScanline (3tiff), -TIFFReadEncodedTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedTile.html deleted file mode 100644 index 6af9d4f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadEncodedTile.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - TIFFReadEncodedTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadEncodedTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Read the specified tile of data and place up to size bytes of decompressed -information in the (user supplied) data buffer.

-
-
-

Notes

-

The value of tile is a "raw tile number". That is, the caller must take -into account whether or not the data are organized in separate planes -(PlanarConfiguration = 2). -TIFFComputeTile() automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should be at least as large as the value returned by -TIFFTileSize().

-

The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the FillOrder tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order.

-
-
-

Return values

-

The actual number of bytes of data that were placed in buf is returned; -TIFFReadEncodedTile() returns -1 if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadRawTile (3tiff), -TIFFReadTile (3tiff), -TIFFReadEncodedStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadFromUserBuffer.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadFromUserBuffer.html deleted file mode 100644 index 94fffdf..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadFromUserBuffer.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - TIFFReadFromUserBuffer — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadFromUserBuffer

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadFromUserBuffer(TIFF *tif, uint32_t strile, void *inbuf, tmsize_t insize, void *outbuf, tmsize_t outsize)
-
- -
-
-

Description

-

Use the provided input buffer (inbuf, insize) and decompress it -into (outbuf, outsize). This function replaces the use of -TIFFReadEncodedStrip() / TIFFReadEncodedTile() -when the user can provide the buffer for the input data, for example when -he wants to avoid libtiff to read the strile offset/count values from the -StripOffsets / StripByteCounts or TileOffsets / -TileByteCounts arrays. inbuf content must be writable -(if bit reversal is needed).

-
-
-

Return values

-

Returns 1 in case of success, 0 otherwise.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadRawStrip (3tiff), -TIFFReadScanline (3tiff), -TIFFReadEncodedStrip (3tiff), -TIFFReadEncodedTile (3tiff), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAImage.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAImage.html deleted file mode 100644 index 20a9b7f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAImage.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - TIFFReadRGBAImage — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadRGBAImage

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFFGetR(abgr)
-

((abgr)&0xff)

-
- -
-
-TIFFGetG(abgr)
-

(((abgr) >> 8) & 0xff)

-
- -
-
-TIFFGetB(abgr)
-

(((abgr) >> 16) & 0xff)

-
- -
-
-TIFFGetA(abgr)
-

(((abgr) >> 24) & 0xff)

-
- -
-
-int TIFFReadRGBAImage(TIFF *tif, uint32_t width, uint32_t height, uint32_t *raster, int stopOnError)
-
- -
-
-int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t width, uint32_t height, uint32_t *raster, int orientation, int stopOnError)
-
- -
-
-

Description

-

TIFFReadRGBAImage() reads a strip- or tile-based image into memory, -storing the result in the user supplied raster. -The raster is assumed to be an array of width × height 32-bit entries, -where width must be less than or equal to the width of the image -(height may be any non-zero size). -If the raster dimensions are smaller than the image, the image data is -cropped to the raster bounds. -If the raster height is greater than that of the image, then the image data -are placed in the lower part of the raster. -(Note that the raster is assume to be organized such that the pixel -at location (x, y) is raster [ y × width + x ]; -with the raster origin in the lower-left hand corner.)

-

TIFFReadRGBAImageOriented() works like TIFFReadRGBAImage() -except that the user can specify the raster origin position with the -orientation parameter. Four orientations are supported:

-
    -
  • ORIENTATION_TOPLEFT: origin in top-left corner,

  • -
  • ORIENTATION_TOPRIGHT: origin in top-right corner,

  • -
  • ORIENTATION_BOTLEFT: origin in bottom-left corner

  • -
  • ORIENTATION_BOTRIGHT: origin in bottom-right corner.

  • -
-

If you choose ORIENTATION_BOTLEFT, the result will be the same -as returned by the TIFFReadRGBAImage().

-

Raster pixels are 8-bit packed red, green, blue, alpha samples. -The macros TIFFGetR, TIFFGetG, TIFFGetB, -and TIFFGetA should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255).

-

TIFFReadRGBAImage() converts non-8-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory.

-

The parameter stopOnError specifies how to act if an error is -encountered while reading the image. If stopOnError is non-zero, then -an error will terminate the operation; otherwise TIFFReadRGBAImage() -will continue processing data until all the possible data in the -image have been requested.

-
-
-

Notes

-

IFFReadRGBAImage() is just a wrapper around the more general -TIFFRGBAImage facilities.

-

For general notes see -TIFFRGBImage notes.

-
-
-

Return values

-

1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered and -stopOnError is zero.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Sorry, can not handle %d-bit pictures":

-
-

The image had BitsPerSample other than 1, 2, 4, 8, or 16.

-
-

"Sorry, can not handle %d-channel images":

-
-

The image had SamplesPerPixel other than 1, 3, or 4.

-
-

Missing needed "PhotometricInterpretation" tag:

-
-

The image did not have a tag that describes how to display -the data.

-
-

No "PhotometricInterpretation" tag, assuming RGB:

-
-

The image was missing a tag that describes how to display it, -but because it has 3 or 4 samples/pixel, it is assumed to be -RGB.

-
-

No "PhotometricInterpretation" tag, assuming min-is-black:

-
-

The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image.

-
-

"No space for photometric conversion table":

-
-

There was insufficient memory for a table used to convert -image samples to 8-bit RGB.

-
-

Missing required "Colormap" tag:

-
-

A Palette image did not have a required Colormap tag.

-
-

"No space for tile buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"No space for strip buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"Can not handle format":

-
-

The image has a format (combination of BitsPerSample, -SamplesPerPixel, and PhotometricInterpretation) -that TIFFReadRGBAImage() can not handle.

-
-

"No space for B&W mapping table":

-
-

There was insufficient memory to allocate a table used to map -grayscale data to RGB.

-
-

"No space for Palette mapping table":

-
-

There was insufficient memory to allocate a table used to map -data to 8-bit RGB.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFRGBAImage (3tiff), -TIFFReadRGBAStrip (3tiff), -TIFFReadRGBATile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAStrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAStrip.html deleted file mode 100644 index c735c84..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBAStrip.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - TIFFReadRGBAStrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadRGBAStrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadRGBAStrip(TIFF *tif, uint32_t row, uint32_t *raster)
-
- -
-
-int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, int stop_on_error)
-
- -
-
-

Description

-

TIFFReadRGBAStrip() reads a single strip of a strip-based image -into memory, storing the result in the user supplied RGBA raster. -The raster is assumed to be an array of ImageWidth × RowsPerStrip -32-bit entries, where ImageWidth is the width of the image -(TIFFTAG_IMAGEWIDTH) and RowsPerStrip is the maximum lines -in a strip (TIFFTAG_ROWSPERSTRIP).

-

TIFFReadRGBAStripExt() provides the parameter stop_on_error. -Its behaviour is described at TIFFReadRGBAImage.

-

The row value should be the row of the first row in the strip -(strip × RowsPerStrip, zero based).

-

Note that the raster is assume to be organized such that the pixel at location -(x, y) is raster [ y × width + x ]; with the raster origin in the -lower-left hand corner of the strip. That is bottom to top organization. -When reading a partial last strip in the file the last line of the image will -begin at the beginning of the buffer.

-

Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -TIFFGetR, TIFFGetG, TIFFGetB, and -TIFFGetA should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255).

-

See the TIFFRGBAImage page for more details on how various image types -are converted to RGBA values.

-
-
-

Notes

-

TIFFReadRGBAStrip() is just a wrapper around the more general -TIFFRGBAImage facilities. It's main advantage over the similar -TIFFReadRGBAImage() function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one strip. The TIFFReadRGBATile() function -does a similar operation for tiled images.

-

For general notes see -TIFFRGBImage notes.

-
-
-

Return values

-

1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Sorry, can not handle %d-bit pictures":

-
-

The image had BitsPerSample other than 1, 2, 4, 8, or 16.

-
-

"Sorry, can not handle %d-channel images":

-
-

The image had SamplesPerPixel other than 1, 3, or 4.

-
-

Missing needed "PhotometricInterpretation" tag:

-
-

The image did not have a tag that describes how to display the data.

-
-

No "PhotometricInterpretation" tag, assuming RGB:

-
-

The image was missing a tag that describes how to display it, but because it -has 3 or 4 samples/pixel, it is assumed to be RGB.

-
-

No "PhotometricInterpretation" tag, assuming min-is-black\fP:

-
-

The image was missing a tag that describes how to display it, but -because it has 1 sample/pixel, it is assumed to be a grayscale or -bilevel image.

-
-

"No space for photometric conversion table":

-
-

There was insufficient memory for a table used to convert image samples to -8-bit RGB.

-
-

Missing required "Colormap" tag:

-
-

A Palette image did not have a required Colormap tag.

-
-

"No space for tile buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"No space for strip buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"Can not handle format":

-
-

The image has a format (combination of BitsPerSample, -SamplesPerPixel, and PhotometricInterpretation) -that TIFFReadRGBAImage() can not handle.

-
-

"No space for B&W mapping table":

-
-

There was insufficient memory to allocate a table used to map grayscale data -to RGB.

-
-

"No space for Palette mapping table":

-
-

There was insufficient memory to allocate a table used to map data to 8-bit -RGB.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFRGBAImage (3tiff), -TIFFReadRGBAImage (3tiff), -TIFFReadRGBATile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBATile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBATile.html deleted file mode 100644 index 630d592..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRGBATile.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - TIFFReadRGBATile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadRGBATile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadRGBATile(TIFF *tif, uint32_t x, uint32_t y, uint32_t *raster)
-
- -
-
-int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, int stop_on_error)
-
- -
-
-

Description

-

TIFFReadRGBATile() reads a single tile of a tile-based image into -memory, storing the result in the user supplied RGBA raster. -The raster is assumed to be an array of TileWidth × TileLength -32-bit entries, where TileWidth is the width of a tile -(TIFFTAG_TILEWIDTH) and TileLength is the height of a -tile (TIFFTAG_TILELENGTH).

-

TIFFReadRGBATileExt() provides the parameter stop_on_error. -Its behaviour is described at TIFFReadRGBAImage.

-

The x and y values are the offsets from the top left corner to the top -left corner of the tile to be read. They must be an exact multiple of the -tile width and length.

-

Note that the raster is assume to be organized such that the pixel at -location -(x, y) is raster [ y × width + x ]; with the raster origin -in the lower-left hand corner of the tile. That is bottom to top -organization. Edge tiles which partly fall off the image will be filled -out with appropriate zeroed areas.

-

Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros -TIFFGetR, TIFFGetG, TIFFGetB, and -TIFFGetA should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255).

-

See the TIFFRGBAImage page for more details on how various image -types are converted to RGBA values.

-
-
-

Notes

-

TIFFReadRGBATile() is just a wrapper around the more general -TIFFRGBAImage facilities. It's main advantage over the similar -TIFFReadRGBAImage() function is that for large images a single -buffer capable of holding the whole image doesn't need to be allocated, -only enough for one tile. The TIFFReadRGBAStrip() function -does a similar operation for stripped images.

-

For general notes see -TIFFRGBImage notes.

-
-
-

Return values

-

1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Sorry, can not handle %d-bit pictures":

-
-

The image had BitsPerSample other than 1, 2, 4, 8, or 16.

-
-

"Sorry, can not handle %d-channel images":

-
-

The image had SamplesPerPixel other than 1, 3, or 4.

-
-

Missing needed "PhotometricInterpretation" tag:

-
-

The image did not have a tag that describes how to display the data.

-
-

No "PhotometricInterpretation" tag, assuming RGB:

-
-

The image was missing a tag that describes how to display it, but because it -has 3 or 4 samples/pixel, it is assumed to be RGB.

-
-

No "PhotometricInterpretation" tag, assuming min-is-black:

-
-

The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image.

-
-

"No space for photometric conversion table":

-
-

There was insufficient memory for a table used to convert -image samples to 8-bit RGB.

-
-

Missing required "Colormap" tag:

-
-

A Palette image did not have a required Colormap tag.

-
-

"No space for tile buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"No space for strip buffer":

-
-

There was insufficient memory to allocate an i/o buffer.

-
-

"Can not handle format":

-
-

The image has a format (combination of BitsPerSample, -SamplesPerPixel, and PhotometricInterpretation) -that TIFFReadRGBAImage() can not handle.

-
-

"No space for B&W mapping table":

-
-

There was insufficient memory to allocate a table used to map -grayscale data to RGB.

-
-

"No space for Palette mapping table":

-
-

There was insufficient memory to allocate a table used to map data to 8-bit -RGB.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFRGBAImage (3tiff), -TIFFReadRGBAImage (3tiff), -TIFFReadRGBAStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawStrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawStrip.html deleted file mode 100644 index 41a0dd9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawStrip.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - TIFFReadRawStrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadRawStrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFReadRawStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Read the contents of the specified strip into the (user supplied) data buffer. -Note that the value of strip is a "raw strip number". That is, the caller -must take into account whether or not the data is organized in separate planes -(PlanarConfiguration = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by TIFFStripSize().

-
-
-

Return values

-

The actual number of bytes of data that were placed in buf is returned; -TIFFReadRawStrip() returns -1 if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadEncodedStrip (3tiff), -TIFFReadScanline (3tiff), -TIFFstrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawTile.html deleted file mode 100644 index 892fbca..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadRawTile.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - TIFFReadRawTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadRawTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFReadRawTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Read the contents of the specified tile into the (user supplied) data buffer. -Note that the value of tile is a "raw tile number". That is, the caller -must take into account whether or not the data is organized in separate planes -(PlanarConfiguration = 2). -TIFFComputeTile() automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should typically be at least as large as the value -returned by TIFFTileSize().

-
-
-

Return values

-

The actual number of bytes of data that were placed in buf is returned; -TIFFReadRawTile() returns -1 if an error was encountered.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadEncodedTile (3tiff), -TIFFReadTile (3tiff), -TIFFtile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadScanline.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadScanline.html deleted file mode 100644 index 64a2270..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadScanline.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - TIFFReadScanline — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadScanline

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample)
-
- -
-
-

Description

-

Read the data for the specified row into the (user supplied) data buffer -buf. The data are returned decompressed and, in the native byte- and -bit-ordering, but are otherwise packed (see further below). The buffer -must be large enough to hold an entire scanline of data. Applications -should call the routine TIFFScanlineSize() to find out the size -(in bytes) of a scanline buffer. -The row parameter is always used by TIFFReadScanline(); the -sample parameter is used only if data are organized in separate planes -(PlanarConfiguration = 2).

-
-
-

Notes

-

The library attempts to hide bit- and byte-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the FillOrder tag is opposite to the native -machine bit order. 16- and 32-bit samples are automatically byte-swapped if -the file was written with a byte order opposite to the native machine byte -order,

-

In C++ the sample parameter defaults to 0.

-
-
-

Return values

-

TIFFReadScanline() returns -1 if it detects an error; otherwise 1 is -returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Compression algorithm does not support random access":

-
-

Data was requested in a non-sequential order from a file that uses a -compression algorithm and that has RowsPerStrip greater than one. -That is, data in the image is stored in a compressed form, and with multiple -rows packed into a strip. In this case, the library does not support random -access to the data. The data should either be accessed sequentially, or the -file should be converted so that each strip is made up of one row of data.

-
-
-
-

Bugs

-

Reading subsampled YCbCR data does not work correctly because, for -PlanarConfiguration = 2, the size of a scanline is not calculated on a -per-sample basis, and for PlanarConfiguration = 1, the library does not -unpack the block-interleaved samples; use the strip- and -tile-based interfaces to read these formats.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadEncodedStrip (3tiff), -TIFFReadRawStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadTile.html deleted file mode 100644 index c722b55..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFReadTile.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - TIFFReadTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFReadTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
-
- -
-
-

Description

-

Return the data for the tile containing the specified coordinates. The -data placed in buf are returned decompressed and, typically, in the -native byte- and bit-ordering, but are otherwise packed (see further -below). The buffer must be large enough to hold an entire tile of data. -Applications should call the routine TIFFTileSize() to find out -the size (in bytes) of a tile buffer. The x and y parameters are -always used by TIFFReadTile(). The z parameter is used if the -image is deeper than 1 slice (ImageDepth > 1). The sample -parameter is used only if data are organized in separate planes ( -PlanarConfiguration = 2).

-
-
-

Notes

-

The library attempts to hide bit- and byte-ordering differences between -the image and the native machine by converting data to the native machine -order. Bit reversal is done if the FillOrder tag is opposite to the -native machine bit order. 16- and 32-bit samples are automatically -byte-swapped if the file was written with a byte order opposite to the -native machine byte order.

-
-
-

Return values

-

TIFFReadTile() returns -1 if it detects an error; otherwise the -number of bytes in the decoded tile is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFtile (3tiff), -TIFFOpen (3tiff), -TIFFReadEncodedTile (3tiff), -TIFFReadRawTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetDirectory.html deleted file mode 100644 index 720e569..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetDirectory.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - TIFFSetDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFSetDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFSetDirectory(TIFF *tif, tdir_t dirnum)
-
- -
-
-int TIFFSetSubDirectory(TIFF *tif, uint64_t diroff)
-
- -
-
-

Description

-

TIFFSetDirectory() changes the current directory and reads its -contents with TIFFReadDirectory(). The parameter dirnum -specifies the subfile/directory as an integer number, with the first -directory numbered zero. -TIFFSetDirectory() only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain.

-

TIFFSetSubDirectory() acts like TIFFSetDirectory(), -except the directory is specified as a file offset instead of an index; -this is required for accessing subdirectories linked through a -SubIFD tag. (see MultiPage SubIFD)

-

Directory query functions TIFFCurrentDirectory(), -TIFFCurrentDirOffset(), TIFFLastDirectory() and -TIFFNumberOfDirectories() retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won't retrieve -the correct information!

-
-
-

Return values

-

On successful return 1 is returned. Otherwise, 0 is returned if dirnum -or diroff specifies a non-existent directory, or if an error was -encountered while reading the directory's contents.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"%s: Error fetching directory count":

-
-

An error was encountered while reading the "directory count" field.

-
-

"%s: Error fetching directory link":

-
-

An error was encountered while reading the "link value" that points to the -next directory in a file.

-
-
-
-

See also

-

TIFFquery (3tiff), -TIFFOpen (3tiff), -TIFFCreateDirectory (3tiff), -TIFFCustomDirectory (3tiff), -TIFFWriteDirectory (3tiff), -TIFFReadDirectory (3tiff), -Multi Page / Multi Image TIFF, -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetField.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetField.html deleted file mode 100644 index 5497049..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetField.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - - TIFFSetField — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFSetField

-
-

Synopsis

-
#include <tiffio.h>
-#include <stdarg.h>"
-
-
-
-
-int TIFFSetField(TIFF *tif, uint32_t tag, ...)
-
- -
-
-int TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap)
-
- -
-
-int TIFFUnsetField(TIFF *tif, uint32_t tag)
-
- -
-
-

Description

-

TIFFSetField() sets the value of a field or pseudo-tag in the -current directory associated with the open TIFF file tif. -(A pseudo-tag is a parameter that is used to control the operation of -the TIFF library but whose value is not read or written to the underlying -file.) To set the value of a field the file must have been previously -opened for writing with TIFFOpen(). -Pseudo-tags can be set whether the file was opened for reading or writing. -The field is identified by tag, one of the values defined in the include -file tiff.h (see also the table below). -The actual value is specified using a variable argument list, as -prescribed by the stdarg.h interface.

-

TIFFVSetField() is functionally equivalent to TIFFSetField() -except that it takes a pointer to a variable argument list. -TIFFVSetField() is useful for writing routines that are layered on -top of the functionality provided by TIFFSetField().

-

TIFFUnsetField() clears the contents of the field in the internal -structure. If it is a custom field, it is removed from the list of known tags.

-

The tags understood by libtiff, the number of parameter values, -and the expected types for the parameter values are shown below. -The data types are:

- - ---- - - - - - - - - - - - - - - - - - - - - - - -
Tag data types

Type

Description

char*

a null-terminated string corresponding to the ASCII data type

uint16_t

an unsigned 16-bit value

uint32_t

an unsigned 32-bit value;

uint16_t*

an array of unsigned 16-bit values.

void*

an array of data values of unspecified type.

-

Consult the TIFF specification for information on the meaning of each tag.

-
-
- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tag properties

Tag name

Count

Types

Notes

TIFFTAG_ARTIST

1

char*

TIFFTAG_BADFAXLINES

1

uint32_t

TIFFTAG_BITSPERSAMPLE

1

uint16_t

†

TIFFTAG_CLEANFAXDATA

1

uint16_t

TIFFTAG_COLORMAP

3

uint16_t*

1 << BitsPerSample arrays

TIFFTAG_COMPRESSION

1

uint16_t

†

TIFFTAG_CONSECUTIVEBADFAXLINES

1

uint32_t

TIFFTAG_COPYRIGHT

1

char*

TIFFTAG_DATETIME

1

char*

TIFFTAG_DOCUMENTNAME

1

char*

TIFFTAG_DOTRANGE

2

uint16_t

TIFFTAG_EXTRASAMPLES

2

uint16_t, uint16_t*

† count, types array

TIFFTAG_FAXFILLFUNC

1

TIFFFaxFillFunc

G3/G4 compression pseudo-tag

TIFFTAG_FAXMODE

1

int

† G3/G4 compression pseudo-tag

TIFFTAG_FILLORDER

1

uint16_t

†

TIFFTAG_GROUP3OPTIONS

1

uint32_t

†

TIFFTAG_GROUP4OPTIONS

1

uint32_t

†

TIFFTAG_HALFTONEHINTS

2

uint16_t

TIFFTAG_HOSTCOMPUTER

1

char*

TIFFTAG_ICCPROFILE

2

uint32_t, void*

count, profile data*

TIFFTAG_IMAGEDEPTH

1

uint32_t

†

TIFFTAG_IMAGEDESCRIPTION

1

char*

TIFFTAG_IMAGELENGTH

1

uint32_t

TIFFTAG_IMAGEWIDTH

1

uint32_t

†

TIFFTAG_INKNAMES

2

uint16_t, char*

TIFFTAG_INKSET

1

uint16_t

†

TIFFTAG_JPEGCOLORMODE

1

int

† JPEG pseudo-tag

TIFFTAG_JPEGQUALITY

1

int

JPEG pseudo-tag

TIFFTAG_JPEGTABLES

2

uint32_t*, void*

† count, tables

TIFFTAG_JPEGTABLESMODE

1

int

† JPEG pseudo-tag

TIFFTAG_MAKE

1

char*

TIFFTAG_MATTEING

1

uint16_t

†

TIFFTAG_MAXSAMPLEVALUE

1

uint16_t

TIFFTAG_MINSAMPLEVALUE

1

uint16_t

TIFFTAG_MODEL

1

char*

TIFFTAG_ORIENTATION

1

uint16_t

TIFFTAG_PAGENAME

1

char*

TIFFTAG_PAGENUMBER

2

uint16_t

TIFFTAG_PHOTOMETRIC

1

uint16_t

TIFFTAG_PHOTOSHOP

?

uint32_t, void*

count, data

TIFFTAG_PLANARCONFIG

1

uint16_t

†

TIFFTAG_PREDICTOR

1

uint16_t

†

TIFFTAG_PRIMARYCHROMATICITIES

1

float*

6-entry array

TIFFTAG_REFERENCEBLACKWHITE

1

float*

† 6-entry array

TIFFTAG_RESOLUTIONUNIT

1

uint16_t

TIFFTAG_RICHTIFFIPTC

2

uint32_t, void*

count, data

TIFFTAG_ROWSPERSTRIP

1

uint32_t

† must be > 0

TIFFTAG_SAMPLEFORMAT

1

uint16_t

†

TIFFTAG_SAMPLESPERPIXEL

1

uint16_t

† value must be ≤ 4

TIFFTAG_SMAXSAMPLEVALUE

1

double

TIFFTAG_SMINSAMPLEVALUE

1

double

TIFFTAG_SOFTWARE

1

char*

TIFFTAG_STONITS

1

double

†

TIFFTAG_SUBFILETYPE

1

uint32_t

TIFFTAG_SUBIFD

2

uint16_t, uint64_t*

count, offsets array

TIFFTAG_TARGETPRINTER

1

char*

TIFFTAG_THRESHHOLDING

1

uint16_t

TIFFTAG_TILEDEPTH

1

uint32_t

†

TIFFTAG_TILELENGTH

1

uint32_t

† must be a multiple of 8

TIFFTAG_TILEWIDTH

1

uint32_t

† must be a multiple of 8

TIFFTAG_TRANSFERFUNCTION

1 or 3‡

uint16_t*

1 << BitsPerSample entry arrays

TIFFTAG_WHITEPOINT

1

float*

2-entry array

TIFFTAG_XMLPACKET

2

uint32_t, void*

count, data

TIFFTAG_XPOSITION

1

float

TIFFTAG_XRESOLUTION

1

float

TIFFTAG_YCBCRCOEFFICIENTS

1

float*

† 3-entry array

TIFFTAG_YCBCRPOSITIONING

1

uint16_t

†

TIFFTAG_YCBCRSAMPLING

2

uint16_t

†

TIFFTAG_YPOSITION

1

float

TIFFTAG_YRESOLUTION

1

float

-
-
-
†:

Tag may not have its values changed once data is written.

-
-
-

‡:

-
-

If SamplesPerPixel is one, then a single array is passed; -otherwise three arrays should be passed.

-
-
-
*:

The contents of this field are quite complex. See -"The ICC Profile Format Specification", -Annex B.3 "Embedding ICC Profiles in TIFF Files" -(available at http://www.color.org) for an explanation.

-
-
-
-
-

Return values

-

1 is returned if the operation was successful. -Otherwise, 0 is returned if an error was detected.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: Cannot modify tag "%s" while writing:

-
-

Data has already been written to the file, so the -specified tag's value can not be changed. -This restriction is applied to all tags that affect -the format of written data.

-
-

%d: Bad value for "%s":

-
-

An invalid value was supplied for the named tag.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFGetField (3tiff), -TIFFSetDirectory (3tiff), -TIFFWriteDirectory (3tiff), -TIFFReadDirectory (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetTagExtender.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetTagExtender.html deleted file mode 100644 index f031ccd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFSetTagExtender.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - TIFFSetTagExtender — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFSetTagExtender

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc extender)
-
- -
-
-

Description

-

TIFFSetTagExtender() is used to register the merge function -for user defined tags as an extender callback with libtiff. -A brief description can be found at Defining Application Tags.

-
-

Note

-

TIFFSetTagExtender() cannot be used to extend custom directories -(for example EXIF, GPS or other custom directories). -Only the TIFF directory can be extended with additional tags.

-
-
-
-

See also

-

libtiff (3tiff), -Defining New TIFF Tags (3tiff), -TIFFMergeFieldInfo (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFStrileQuery.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFStrileQuery.html deleted file mode 100644 index 315fef9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFStrileQuery.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - TIFFStrileQuery — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFStrileQuery

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile);
-
- -
-
-uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile);
-
- -
-
-uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, int *pbErr);
-
- -
-
-uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, int *pbErr);
-
- -
-
-

Description

-

Make defer strile offset/bytecount loading available at runtime -and add per-strile offset/bytecount loading capabilities. Part of -this commit makes the behaviour that was previously met when libtiff -was compiled with -DDEFER_STRILE_LOAD available for default builds.

-

When specifying the new D (Deferred) TIFFOpen() flag, -the loading of strile offset/bytecount is deferred. -In that mode, the StripOffsets / StripByteCounts or -TileOffsets / TileByteCounts arrays are only loaded when first -accessed. This can speed-up the opening of files stored on the network -when just metadata retrieval is needed.

-

Another addition is the capability of loading only the values of -the offset/bytecount of the strile of interest instead of the -whole array. This is enabled with the new O (Ondemand) flag of -TIFFOpen() (which implies D).

-

The public TIFFGetStrileOffset(), TIFFGetStrileOffsetWithErr(), -TIFFGetStrileByteCount() and TIFFGetStrileByteCountWithErr() -functions have been added to API. -They are of particular interest when using sparse files (with -offset == bytecount == 0) and you want to detect if a strile is -present or not without decompressing the data, or updating an -existing sparse file.

-

TIFFGetStrileByteCount() returns the value of the TileByteCounts / -StripByteCounts array for the specified tile/strile.

-

TIFFGetStrileByteCountWithErr() additionally provides pbErr -as an int pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return.

-

TIFFGetStrileOffset() returns the value of the TileOffsets / -StripOffsets array for the specified tile/strile.

-

TIFFGetStrileOffsetWithErr() additionally provides pbErr -as an int pointer to an error return variable, -which is set to "0" for successful return or to "1" for an error return.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine. -Likewise, warning messages are directed to the TIFFWarningExtR() routine.

-
-
-

Note

-

This functionality was introduced with libtiff 4.1.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff), -TIFFDeferStrileArrayWriting (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWarning.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWarning.html deleted file mode 100644 index 255d27a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWarning.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - TIFFWarning — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWarning

-
-

Synopsis

-
#include <tiffio.h>
-#include <stdarg.h>
-
-
-
-
-void TIFFWarning(const char *module, const char *fmt, ...)
-
- -
-
-void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt, ...)
-
- -
-
-void TIFFWarningExtR(TIFF *tif, const char *module, const char *fmt, ...)
-
- -
-
-typedef void (*TIFFWarningHandler)(const char *module, const char *fmt, va_list ap)
-
- -
-
-typedef void (*TIFFWarningHandlerExt)(thandle_t fd, const char *module, const char *fmt, va_list ap)
-
- -
-
-typedef int (*TIFFWarningHandlerExtR)(TIFF *tif, void *user_data, const char *module, const char *fmt, va_list ap)
-
- -
-
-TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler)
-
- -
-
-TIFFWarningHandlerExt TIFFSetWarningHandlerExt(TIFFWarningHandlerExt handler)
-
- -
-
-

Description

-

TIFFWarning() invokes the library-wide warning handler function -to (normally) write a warning message to the stderr. -The fmt parameter is a printf() format string, and any number -arguments can be supplied. The module parameter is interpreted as a -string that, if non-zero, should be printed before the message; it -typically is used to identify the software module in which a warning is -detected.

-

Applications that desire to capture control in the event of a warning -should use TIFFSetWarningHandler() to override the default -warning handler. A NULL (0) warning handler function may be -installed to suppress warning messages.

-

Two more application-specific warning handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with a warning message function, i.e. -TIFFWarningExt() and TIFFWarningExtR() if the application -intends to call the handler with those extended parameters.

-

TIFFWarningExt() provides a file handle as parameter. -Within libtiff TIFFWarningExt() is called passing tif->tif_clientdata -as fd, which represents the TIFF file handle (file descriptor). -The application-specific and library-wide handler for TIFFWarningExt() -is setup with TIFFSetWarningHandlerExt().

-

TIFFWarningExtR() (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per-TIFF handle (re-entrant) -warning handler. That means for different TIFF handles, different warning -handlers can be setup. This application-specific handler -can be setup when a TIFF file is opened with one of the following functions: -TIFFOpenExt(), TIFFOpenWExt(), TIFFFdOpenExt() -or TIFFClientOpenExt(). -Furthermore, a custom defined data structure user_data for the -warning handler can be given along.

-

Please refer to TIFFOpenOptions for how to setup the -application-specific handler introduced with libtiff 4.5.

-
-
-

Note

-

Both functions TIFFWarning() and TIFFWarningExt() -each attempt to call both handler functions if they are defined. -First TIFFWarningHandler() is called and then TIFFWarningHandlerExt(). -However, TIFFWarning() passes a "0" as a file handle to -TIFFWarningHandlerExt().

-

TIFFWarningExtR() tries first to call the per-TIFF handle defined -warning handler. If TIFFWarningHandlerExtR() is not defined or -returns 0, TIFFWarningHandler() and then TIFFWarningHandlerExt() -are called. From libtiff 4.5 onwards TIFFWarningExtR() is used -within the libtiff library.

-
-
-

Return values

-

TIFFSetWarningHandler() and TIFFSetWarningHandlerExt() -returns a reference to the previous warning handler function.

-

TIFFWarningHandlerExtR() returns an integer as "stop" to control the call -of further warning handler functions within TIFFWarningExtR():

-
-
-
-
-
-

See also

-

TIFFError (3tiff), -TIFFOpen (3tiff), -TIFFOpenOptions, -libtiff (3tiff), -printf (3)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteDirectory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteDirectory.html deleted file mode 100644 index a01d6d5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteDirectory.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - TIFFWriteDirectory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteDirectory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFWriteDirectory(TIFF *tif)
-
- -
-
-int TIFFRewriteDirectory(TIFF *tif)
-
- -
-
-int TIFFCheckpointDirectory(TIFF *tif)
-
- -
-
-void TIFFSetWriteOffset(TIFF *tif, toff_t off)
-
- -
-
-int TIFFWriteCheck(TIFF *tif, int tiles, const char *module)
-
- -
-
-

Description

-

TIFFWriteDirectory() will write the contents of the current -directory (IFD) to the file and setup to create a new directory (IFD) -using TIFFCreateDirectory(). -Applications only need to call TIFFWriteDirectory() -when writing multiple subfiles (images) to a single TIFF file. -This is called "multi-page TIFF" or "multi-image TIFF" -(see Multi Page / Multi Image TIFF). -TIFFWriteDirectory() is automatically called by -TIFFClose() and TIFFFlush() to write a modified -directory if the file is open for writing.

-

The TIFFRewriteDirectory() function operates similarly to -TIFFWriteDirectory(), but can be called with directories -previously read or written that already have an established location -in the file. It will rewrite the directory, but instead of placing it -at its old location (as TIFFWriteDirectory() would, if the size -of the directory has not grown) it will -place them at the end of the file, correcting the pointer from the -preceding directory or file header to point to it's new location. This -is particularly important in cases where the size of the directory and -pointed to data has grown, so it won't fit in the space available at the -old location.

-

The TIFFCheckpointDirectory() writes the current state of the -tiff directory into the file to make what is currently in the file -readable. Unlike TIFFWriteDirectory(), -TIFFCheckpointDirectory() does not free up the directory data -structures in memory, so they can be updated (as strips/tiles are -written) and written again. Reading such a partial file you will at -worst get a tiff read error for the first strip/tile encountered that -is incomplete, but you will at least get all the valid data in the file -before that. When the file is complete, just use -TIFFWriteDirectory() as usual to finish it off cleanly.

-

The TIFFSetWriteOffset() sets the current write offset for image data -(i.e.pixels). The offset for writing the directory (IFD) -data is not affected. -This should only be used to set the offset to a known previous location -(very carefully), or to 0 so that the next write gets appended to the end -of the file.

-

The TIFFWriteCheck() verify file is writable and that the directory -information is setup properly. In doing the latter we also "freeze" -the state of the directory so that important information is not changed.

-
-
-

Return values

-

1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing -the directory contents.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

"Error post-encoding before directory write":

-
-

Before writing the contents of the current directory, any pending data are -flushed. This message indicates that an error occurred while doing this.

-
-

"Error flushing data before directory write":

-
-

Before writing the contents of the current directory, any pending data are -flushed. This message indicates that an error occurred while doing this.

-
-

"Cannot write directory, out of space":

-
-

There was not enough space to allocate a temporary area for the directory -that was to be written.

-
-

"Error writing directory count":

-
-

A write error occurred when writing the count of fields in the directory.

-
-

"Error writing directory contents":

-
-

A write error occurred when writing the directory fields.

-
-

"Error writing directory link":

-
-

A write error occurred when writing the link to the next directory.

-
-

Error writing data for field "%s":

-
-

A write error occurred when writing indirect data for the specified field.

-
-

"Error writing TIFF header":

-
-

A write error occurred when re-writing header at the front of the file.

-
-

"Error fetching directory count":

-
-

A read error occurred when fetching the directory count field for -a previous directory. -This can occur when setting up a link to the directory that is being -written.

-
-

"Error fetching directory link":

-
-

A read error occurred when fetching the directory link field for -a previous directory. -This can occur when setting up a link to the directory that is being -written.

-
-
-
-

See also

-

TIFFquery (3tiff), -TIFFOpen (3tiff), -TIFFCreateDirectory (3tiff), -TIFFCustomDirectory (3tiff), -TIFFSetDirectory (3tiff), -TIFFReadDirectory (3tiff), -TIFFError (3tiff), -Multi Page / Multi Image TIFF, -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedStrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedStrip.html deleted file mode 100644 index fc33716..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedStrip.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - TIFFWriteEncodedStrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteEncodedStrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFWriteEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Compress size bytes of raw data from buf and write the result to the -specified strip; replacing any previously written data. Note that the -value of strip is a "raw strip number". That is, the caller must take -into account whether or not the data are organized in separate planes -(PlanarConfiguration = 2).

-
-
-

Notes

-

The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with BitsPerSample -greater than 8.

-

The strip number must be valid according to the current settings of the -ImageLength and RowsPerStrip tags. -An image may be dynamically grown by increasing the value of -ImageLength prior to each call to TIFFWriteEncodedStrip.

-
-
-

Return values

-

-1 is returned if an error was encountered. Otherwise, the value of -size is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: File not open for writing:

-
-

The file was opened for reading, not writing.

-
-

Can not write scanlines to a tiled image:

-
-

The image is assumed to be organized in tiles because the -TileWidth and TileLength tags have been set with -TIFFSetField().

-
-

%s: Must set "ImageWidth" before writing data\fP:

-
-

The image's width has not be set before the first write. See -TIFFSetField() for information on how to do this.

-
-

%s: Must set "PlanarConfiguration" before writing data:

-
-

The organization of data has not be defined before the first -write. See TIFFSetField() for information on how to do -this.

-
-

%s: No space for strip arrays":

-
-

There was not enough space for the arrays that hold strip offsets and -byte counts.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteScanline (3tiff), -TIFFWriteRawStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedTile.html deleted file mode 100644 index e3c8df4..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteEncodedTile.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - TIFFWriteEncodedTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteEncodedTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFWriteEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Compress size bytes of raw data from buf and append the result -to the end of the specified tile. Note that the value of tile is a -"raw tile number". That is, the caller must take into account whether -or not the data are organized in separate planes -(PlanarConfiguration = 2). -TIFFComputeTile() automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number.

-
-
-

Notes

-

The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with BitsPerSample -greater than 8.

-
-
-

Return values

-

-1 is returned if an error was encountered. Otherwise, the value of -size is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: File not open for writing:

-
-

The file was opened for reading, not writing.

-
-

Can not write tiles to a stripped image:

-
-

The image is assumed to be organized in strips because neither of the -TileWidth or TileLength tags have been set with -TIFFSetField().

-
-

%s: Must set "ImageWidth" before writing data:

-
-

The image's width has not been set before the first write. See -TIFFSetField() for information on how to do this.

-
-

%s: Must set "PlanarConfiguration" before writing data:

-
-

The organization of data has not be defined before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: No space for tile arrays":

-
-

There was not enough space for the arrays that hold tile offsets and -byte counts.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteTile (3tiff), -TIFFWriteRawTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawStrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawStrip.html deleted file mode 100644 index efbbdf5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawStrip.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - TIFFWriteRawStrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteRawStrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFWriteRawStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Append size bytes of raw data to the specified strip.

-
-
-

Notes

-

The strip number must be valid according to the current settings of the -ImageLength and RowsPerStrip tags. -An image may be dynamically grown by increasing the value of -ImageLength prior to each call to TIFFWriteRawStrip().

-
-
-

Return values

-

-1 is returned if an error occurred. Otherwise, the value of size is -returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: File not open for writing:

-
-

The file was opened for reading, not writing.

-
-

Can not write scanlines to a tiled image:

-
-

The image is assumed to be organized in tiles because the -TileWidth and TileLength tags have been set with -TIFFSetField().

-
-

%s: Must set "ImageWidth" before writing data:

-
-

The image's width has not be set before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: Must set "PlanarConfiguration" before writing data:

-
-

The organization of data has not be defined before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: No space for strip arrays":

-
-

There was not enough space for the arrays that hold strip -offsets and byte counts.

-
-

%s: Strip %d out of range, max %d:

-
-

The specified strip is not a valid strip according to the -currently specified image dimensions.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteEncodedStrip (3tiff), -TIFFWriteScanline (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawTile.html deleted file mode 100644 index b720be4..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteRawTile.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - TIFFWriteRawTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteRawTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFWriteRawTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
-
- -
-
-

Description

-

Append size bytes of raw data to the specified tile.

-
-
-

Return values

-

-1 is returned if an error occurred. Otherwise, the value of size is -returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: File not open for writing:

-
-

The file was opened for reading, not writing.

-
-

Can not write tiles to a stripped image:

-
-

The image is assumed to be organized in strips because neither of the -TileWidth or TileLength tags have been set with -TIFFSetField().

-
-

%s: Must set "ImageWidth" before writing data:

-
-

The image's width has not be set before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: Must set "PlanarConfiguration" before writing data:

-
-

The organization of data has not be defined before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: No space for tile arrays:

-
-

There was not enough space for the arrays that hold tile offsets and -byte counts.

-
-

%s: Specified tile %d out of range, max %d:

-
-

The specified tile is not valid according to the currently specified -image dimensions.

-
-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteEncodedTile (3tiff), -TIFFWriteScanline (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteScanline.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteScanline.html deleted file mode 100644 index ba6013a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteScanline.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - TIFFWriteScanline — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteScanline

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample)
-
- -
-
-

Description

-

Write data to a file at the specified row. The sample parameter is -used only if data are organized in separate planes -(PlanarConfiguration = 2). -The data are assumed to be uncompressed and in the native bit- and -byte-order of the host machine. The data written to the file is -compressed according to the compression scheme of the current -TIFF directory (see further below). If the current scanline is past the -end of the current subfile, the ImageLength field is automatically -increased to include the scanline (except for PlanarConfiguration = 2, -where the ImageLength cannot be changed once the first data are -written). If the ImageLength is increased, the StripOffsets -and StripByteCounts fields are similarly enlarged to reflect data -written past the previous end of image.

-
-
-

Notes

-

The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte-swapping to correctly process image data with BitsPerSample -greater than 8. The library attempts to hide bit-ordering differences -between the image and the native machine by converting data from the -native machine order.

-

In C++ the sample parameter defaults to 0.

-

Once data are written to a file for the current directory, the values of -certain tags may not be altered; see TIFFSetField() for more -information.

-

It is not possible to write scanlines to a file that uses a tiled -organization. The routine TIFFIsTiled() can be used to -determine if the file is organized as tiles or strips.

-
-
-

Return values

-

TIFFWriteScanline() returns -1 if it immediately detects an -error and 1 for a successful write.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-

%s: File not open for writing:

-
-

The file was opened for reading, not writing.

-
-

"Can not write scanlines to a tiled image":

-
-

An attempt was made to write a scanline to a tiled image. The image -is assumed to be organized in tiles because the TileWidth and -TileLength tags have been set with TIFFSetField().

-
-

"Compression algorithm does not support random access":

-
-

Data was written in a non-sequential order to a file that uses a -compression algorithm and that has RowsPerStrip greater than one. -That is, data in the image is to be stored in a compressed form, and -with multiple rows packed into a strip. In this case, the library -does not support random access to the data. The data should either be -written as entire strips, sequentially by rows, or the value of -RowsPerStrip should be set to one.

-
-

%s: Must set "ImageWidth" before writing data:

-
-

The image's width has not be set before the first write. -See TIFFSetField() for information on how to do this.

-
-

%s: Must set "PlanarConfiguration" before writing data:

-
-

The organization of data has not be defined before the first write. -See TIFFSetField() for information on how to do this.

-
-

Can not change "ImageLength" when using separate planes:

-
-

Separate image planes are being used (PlanarConfiguration = 2), -but the number of rows has not been specified before the first write. -The library supports the dynamic growth of an image only when data -are organized in a contiguous manner (PlanarConfiguration = 1).

-
-

"%d: Sample out of range, max %d":

-
-

The sample parameter was greater than the value of the -SamplesPerPixel tag.

-
-

%s: No space for strip arrays:

-
-

There was not enough space for the arrays that hold strip offsets and -byte counts.

-
-
-
-

Bugs

-

Writing subsampled YCbCR data does not work correctly because, for -PlanarConfiguration = 2 the size of a scanline is not calculated on -a per-sample basis, and for PlanarConfiguration = 1 the library -does not pack the block-interleaved samples.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFWriteEncodedStrip (3tiff), -TIFFWriteRawStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteTile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteTile.html deleted file mode 100644 index e98767f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFWriteTile.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - TIFFWriteTile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFWriteTile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-

TIFFWriteTile - encode and write a tile of data to an open TIFF file

-
-
-tmsize_t TIFFWriteTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
-
- -
-
-

Description

-

Write the data for the tile containing the specified coordinates. The -data in buf are (potentially) compressed, and written to the -indicated file, normally being appended to the end of the file. The -buffer must be contain an entire tile of data. Applications should -call the routine TIFFTileSize() to find out the size (in bytes) -of a tile buffer. The x and y parameters are always used by -TIFFWriteTile(). The z parameter is used if the image is -deeper than 1 slice (ImageDepth > 1). -The sample parameter is used only if data are organized in separate -planes (PlanarConfiguration = 2).

-
-
-

Return values

-

TIFFWriteTile() returns -1 if it detects an error; otherwise -the number of bytes in the tile is returned.

-
-
-

Diagnostics

-

All error messages are directed to the TIFFErrorExtR() routine.

-
-
-

See also

-

TIFFtile (3tiff), -TIFFOpen (3tiff), -TIFFReadTile (3tiff), -TIFFWriteScanline (3tiff), -TIFFWriteEncodedTile (3tiff), -TIFFWriteRawTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFbuffer.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFbuffer.html deleted file mode 100644 index e803ef6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFbuffer.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - TIFFbuffer — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFbuffer

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFReadBufferSetup(TIFF *tif, void *buffer, tmsize_t size)
-
- -
-
-int TIFFWriteBufferSetup(TIFF *tif, void *buffer, tmsize_t size)
-
- -
-
-

Description

-

The following routines are provided for client-control of the I/O buffers -used by the library. Applications need never use these routines; they are -provided only for "intelligent clients" that wish to optimize memory usage -and/or eliminate potential copy operations that can occur when working with -images that have data stored without compression.

-

TIFFReadBufferSetup() sets up the data buffer used to read raw (encoded) -data from a file. If the specified pointer is NULL (zero), then a -buffer of the appropriate size is allocated. Otherwise the caller must guarantee -that the buffer is large enough to hold any individual strip of raw data. -TIFFReadBufferSetup() returns a non-zero value if the setup was successful -and zero otherwise.

-

TIFFWriteBufferSetup() sets up the data buffer used to write raw (encoded) -data to a file. If the specified size is -1, then the buffer size is selected to -hold a complete tile or strip, or at least 8 kilobytes, whichever is greater. If -the specified buffer is NULL (zero), then a buffer of the appropriate -size is dynamically allocated. -TIFFWriteBufferSetup() returns a non-zero value if the setup was successful -and zero otherwise.

-
-
-

Diagnostics

-

%s: No space for data buffer at scanline %ld:

-
-

TIFFReadBufferSetup() was unable to dynamically allocate space -for a data buffer.

-
-

%s: No space for output buffer:

-
-

TIFFWriteBufferSetup() was unable to dynamically allocate space -for a data buffer.

-
-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFcodec.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFcodec.html deleted file mode 100644 index a3e4edf..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFcodec.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - TIFFcodec — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFcodec

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-const TIFFCodec *TIFFFindCODEC(uint16_t scheme)
-
- -
-
-TIFFCodec *TIFFRegisterCODEC(uint16_t scheme, const char *method, TIFFInitMethod init)
-
- -
-
-void TIFFUnRegisterCODEC(TIFFCodec *codec)
-
- -
-
-int TIFFIsCODECConfigured(uint16_t scheme)
-
- -
-
-TIFFCodec *TIFFGetConfiguredCODECs(uint16_t scheme)
-
- -
-
-int TIFFSetCompressionScheme(TIFF *tif, int scheme)
-
- -
-
-

Description

-

libtiff supports a variety of compression schemes implemented -by software codecs. Each codec adheres to a modular interface that -provides for the decoding and encoding of image data; as well as some -other methods for initialization, setup, cleanup, and the control of -default strip and tile sizes. Codecs are identified by the associated -value of the TIFF Compression tag; e.g. 5 for LZW compression.

-

TIFFFindCODEC() ??????

-

TIFFUnRegisterCODEC() ?????

-

The TIFFRegisterCODEC() routine can be used to augment or -override the set of codecs available to an application. If the -specified scheme already has a registered codec then it is -overridden and any images with data encoded with this compression -scheme will be decoded using the supplied codec.

-

TIFFIsCODECConfigured() returns 1 if the codec is configured -and working. Otherwise 0 will be returned.

-

TIFFGetConfiguredCODECs() gets list of configured codecs, -both built-in and registered by user. Function returns array of -TIFFCodec records (the last record should be NULL) or NULL -if function failed. Caller is responsible to free this structure.

-

TIFFSetCompressionScheme() ????

-
-
-

Diagnostics

-

No space to register compression scheme %s:

-
-

TIFFRegisterCODEC() was unable to allocate memory for the -data structures needed to register a codec.

-
-

Cannot remove compression scheme %s; not registered:

-
-

TIFFUnRegisterCODEC() did not locate the specified codec in -the table of registered compression schemes.

-
-
-
-

See also

-

libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFcolor.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFcolor.html deleted file mode 100644 index cb68bcb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFcolor.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - TIFFcolor — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFcolor

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
-
- -
-
-void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *R, uint32_t *G, uint32_t *B)
-
- -
-
-int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *displayw, float *refWhite)
-
- -
-
-void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t L, int32_t a, int32_t b, float *X, float *Y, float *Z)
-
- -
-
-void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *R, uint32_t *G, uint32_t *B)
-
- -
-
-

Description

-

TIFF supports several color spaces for images stored in that format. There is -usually a problem of application to handle the data properly and convert -between different colorspaces for displaying and printing purposes. To -simplify this task libtiff implements several color conversion routines -itself. In particular, these routines used in the TIFFRGBAImage -interface.

-

TIFFYCbCrToRGBInit() used to initialize YCbCr to RGB -conversion state.

-
-

Note

-

The calling program is responsible for allocating and releasing the required -buffer for the structure TIFFYCbCrToRGB and its required tables, -pointed to by ycbcr. The pointers to these tables are stored in the -structure TIFFYCbCrToRGB, which is located at the beginning -of that buffer. Thus, this memory has to be allocated as shown in the example below.

-
-

TIFFYCbCrToRGB is defined in tiffio.h as:

-
typedef struct {                /* YCbCr->RGB support */
-        TIFFRGBValue* clamptab; /* range clamping table */
-        int*          Cr_r_tab;
-        int*          Cb_b_tab;
-        int32_t*      Cr_g_tab;
-        int32_t*      Cb_g_tab;
-        int32_t*      Y_tab;
-} TIFFYCbCrToRGB;
-
-
-

luma is a float array of three values representing proportions of the -red, green and blue in luminance, Y (see section 21 of the TIFF 6.0 -specification, where YCbCr images are discussed). -TIFFTAG_YCBCRCOEFFICIENTS hold these values in TIFF file. -refBlackWhite is a float array of 6 values which specifies a pair of -headroom and footroom image data values (codes) for each image component -(see section 20 of the TIFF 6.0 specification where the colorimetry -fields are discussed). -TIFFTAG_REFERENCEBLACKWHITE is responsible for storing these -values in TIFF file. The following code snippet should help to -understand the the technique:

-
float *luma, *refBlackWhite;
-uint16_t hs, vs;
-
-/* Initialize structures */
-TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB*)
-    _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))
-        + 4*256*sizeof(TIFFRGBValue)
-        + 2*256*sizeof(int)
-        + 3*256*sizeof(int32_t));
-if (ycbcr == NULL) {
-    TIFFError("YCbCr->RGB",
-    "No space for YCbCr->RGB conversion state");
-    exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
-TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite);
-if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0) {
-    exit(0);
-}
-
-/* Start conversion */
-uint32_t r, g, b;
-uint32_t Y;
-int32_t Cb, Cr;
-
-for each pixel in image {
-    TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b);
-}
-
-/* Free state structure */
-_TIFFfree(ycbcr);
-
-
-

TIFFCIELabToRGBInit() initializes the CIE L*a*b* 1976 to -RGB conversion state. TIFFCIELabToRGB is defined as:

-
#define CIELABTORGB_TABLE_RANGE 1500
-
-typedef struct {                                /* CIE Lab 1976->RGB support */
-    int      range;                             /* Size of conversion table */
-    float    rstep, gstep, bstep;
-    float    X0, Y0, Z0;                        /* Reference white point */
-    TIFFDisplay display;
-    float    Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */
-    float    Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */
-    float    Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */
-} TIFFCIELabToRGB;
-
-
-

display is a display device description, declared as:

-
typedef struct {
-    float d_mat[3][3]; /* XYZ -> luminance matrix */
-    float d_YCR;       /* Light o/p for reference white */
-    float d_YCG;
-    float d_YCB;
-    uint32_t d_Vrwr;   /* Pixel values for ref. white */
-    uint32_t d_Vrwg;
-    uint32_t d_Vrwb;
-    float d_Y0R;       /* Residual light for black pixel */
-    float d_Y0G;
-    float d_Y0B;
-    float d_gammaR;    /* Gamma values for the three guns */
-    float d_gammaG;
-    float d_gammaB;
-} TIFFDisplay;
-
-
-

For example, one can use sRGB device, which has the following parameters:

-
TIFFDisplay display_sRGB = {
-    {   /* XYZ -> luminance matrix */
-        {  3.2410F, -1.5374F, -0.4986F },
-        {  -0.9692F, 1.8760F, 0.0416F },
-        {  0.0556F, -0.2040F, 1.0570F }
-    },
-    100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
-    255, 255, 255,          /* Pixel values for ref. white */
-    1.0F, 1.0F, 1.0F,       /* Residual light o/p for black pixel */
-    2.4F, 2.4F, 2.4F,       /* Gamma values for the three guns */
-};
-
-
-

refWhite is a color temperature of the reference white. The -TIFFTAG_WHITEPOINT contains the chromaticity of the white -point of the image from where the reference white can be calculated -using following formulae:

-
refWhite_Y = 100.0
-
-refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y
-
-refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X
-
-
-

The conversion itself performed in two steps: at the first one we will convert -CIE L*a*b* 1976 to CIE XYZ using the TIFFCIELabToXYZ() routine, -and at the second step we will convert CIE XYZ to RGB using -TIFFXYZToRGB(). Look at the code sample below:

-
float   *whitePoint;
-float   refWhite[3];
-
-/* Initialize structures */
-img->cielab = (TIFFCIELabToRGB *)
-    _TIFFmalloc(sizeof(TIFFCIELabToRGB));
-if (!cielab) {
-    TIFFError("CIE L*a*b*->RGB",
-        "No space for CIE L*a*b*->RGB conversion state.");
-    exit(0);
-}
-
-TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint);
-refWhite[1] = 100.0F;
-refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
-refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
-    / whitePoint[1] * refWhite[1];
-if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) {
-    TIFFError("CIE L*a*b*->RGB",
-        "Failed to initialize CIE L*a*b*->RGB conversion state.");
-    _TIFFfree(cielab);
-    exit(0);
-}
-
-/* Now we can start to convert */
-uint32_t r, g, b;
-uint32_t L;
-int32_t a, b;
-float X, Y, Z;
-
-for each pixel in image {
-    TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z);
-    TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b);
-}
-
-/* Don't forget to free the state structure */
-_TIFFfree(cielab);
-
-
-
-
-

See also

-

TIFFRGBAImage (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFmemory.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFmemory.html deleted file mode 100644 index 26ea2d1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFmemory.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - TIFFmemory — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFmemory

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-void *_TIFFmalloc(tmsize_t size)
-
- -
-
-void *_TIFFrealloc(void *buffer, tmsize_t size)
-
- -
-
-void _TIFFfree(void *buffer)
-
- -
-
-void _TIFFmemset(void *s, int c, tmsize_t n)
-
- -
-
-void _TIFFmemcpy(void *dest, const void *src, tmsize_t n)
-
- -
-
-int _TIFFmemcmp(const void *s1, const void *s2, tmsize_t n)
-
- -
-
-void *_TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what)
-
- -
-
-void *_TIFFCheckRealloc(TIFF *tif, void *buffer, tmsize_t nmemb, tmsize_t elem_size, const char *what)
-
- -
-
-

Description

-

These routines are provided for writing portable software that uses -libtiff; they hide any memory-management related issues, such as -dealing with segmented architectures found on 16-bit machines.

-

_TIFFmalloc() and _TIFFrealloc() are used to dynamically -allocate and reallocate memory used by libtiff; such as memory -passed into the I/O routines. Memory allocated through these interfaces is -released back to the system using the _TIFFfree() routine.

-

Memory allocated through one of the above interfaces can be set to a known -value using _TIFFmemset(), copied to another memory location using -_TIFFmemcpy(), or compared for equality using _TIFFmemcmp(). -These routines conform to the equivalent C routines: -memset(), memcpy(), memcmp(), respectively.

-

_TIFFCheckMalloc() and _TIFFCheckRealloc() are checking for -integer overflow before calling _TIFFmalloc() and _TIFFrealloc(), -respectively.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

malloc (3), -memory (3), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFquery.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFquery.html deleted file mode 100644 index 6af7b73..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFquery.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - TIFFquery — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFquery

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tdir_t TIFFCurrentDirectory(TIFF *tif)
-
- -
-
-uint64_t TIFFCurrentDirOffset(TIFF *tif)
-
- -
-
-int TIFFLastDirectory(TIFF *tif)
-
- -
-
-tdir_t TIFFNumberOfDirectories(TIFF *tif)
-
- -
-
-uint32_t TIFFCurrentRow(TIFF *tif)
-
- -
-
-uint32_t TIFFCurrentStrip(TIFF *tif)
-
- -
-
-uint32_t TIFFCurrentTile(TIFF *tif)
-
- -
-
-int TIFFFileno(TIFF *tif)
-
- -
-
-char *TIFFFileName(TIFF *tif)
-
- -
-
-int TIFFGetMode(TIFF *tif)
-
- -
-
-int TIFFIsTiled(TIFF *tif)
-
- -
-
-int TIFFIsBigEndian(TIFF *tif)
-
- -
-
-int TIFFIsBigTIFF(TIFF *tif)
-
- -
-
-int TIFFIsByteSwapped(TIFF *tif)
-
- -
-
-int TIFFIsMSB2LSB(TIFF *tif)
-
- -
-
-int TIFFIsUpSampled(TIFF *tif)
-
- -
-
-const char *TIFFGetVersion(void)
-
- -
-
-

Description

-

The following query routines return status information about the directory -structure of an open TIFF file.

-

TIFFCurrentDirectory() returns the index of the current -Image File Directory (IFD). -Directories are numbered starting at 0. This number is suitable for -use with the TIFFSetDirectory() routine. -There are IFDs in the file and an "active" -IFD in memory, from which fields -are "set" and "get". The index of the current directory returned is:

-
    -
  1. 65535 (non-existing directory) if there is no IFD in the file after opening, -or the state is unknown, -or the last read (i.e. TIFFFetchDirectory()) failed, -or a custom directory was written.

  2. -
  3. IFD index of last IFD written in the file. -In this case the active IFD is a new (empty) one and the current directory offset -from TIFFCurrentDirOffset() is zero. -If writing fails, the IFD index is not changed.

  4. -
  5. IFD index of IFD read from file into memory (=active IFD), -even if IFD is corrupt and TIFFReadDirectory() returns 0. -Then the current directory offset is the offset of the IFD in the file.

  6. -
  7. IFD index „0“, whenever a custom directory or an unchained SubIFD -was read.

  8. -
-

TIFFCurrentDirOffset() returns the file offset of the current -directory (instead of an index). -The file offset is suitable for use with the TIFFSetSubDirectory() -routine. This is required for accessing subdirectories linked through a -SubIFD tag. See also SubIFD access.

-

TIFFLastDirectory() returns a non-zero value if the current -directory is the last directory in the file; otherwise zero is returned. -A new (empty) directory in the memory (after TIFFWriteDirectory() -or TIFFCreateDirectory()) -also counts as the last directory, even if it has not yet been written to a file.

-

TIFFNumberOfDirectories() returns the number of directories in a -file. Be aware that just created directories, which are not "written" to -file do not count.

-
-

Note

-

Be aware that the return value of the above directory query functions -is not valid until the directory is "written" to file AND read back -e.g. TIFFSetDirectory() or TIFFReadDirectory().

-
-

The following query routines return information about an open TIFF file -and its image data.

-

TIFFCurrentRow(), TIFFCurrentStrip(), and -TIFFCurrentTile() return the current row, strip, and tile, -respectively, that is being read or written. These values are updated each -time a read or write is done.

-

TIFFFileno() returns the underlying file descriptor used to access -the TIFF image in the filesystem.

-

TIFFFileName() returns the pathname argument passed to -TIFFOpen() or TIFFFdOpen().

-

TIFFGetMode() returns the mode with which the underlying file -was opened. On UNIX systems, this is the value passed to the -open() (2) system call.

-

TIFFIsTiled() returns a non-zero value if the image data has a tiled -organization. Zero is returned if the image data is organized in strips.

-

TIFFIsBigEndian() returns a non-zero value if the file is BigEndian -and zero if the file is LittleEndian.

-

TIFFIsBigTIFF() returns a non-zero value if the file is in -BigTIFF style.

-

TIFFIsByteSwapped() returns a non-zero value if the image data -was in a different byte-order than the host machine. Zero is returned if -the TIFF file and local host byte-orders are the same. Note that -TIFFReadTile(), TIFFReadEncodedStrip() and -TIFFReadScanline() functions already normally perform byte -swapping to local host order if needed.

-

TIFFIsMSB2LSB() returns a non-zero value if the image data is being -returned with bit 0 as the most significant bit.

-

TIFFIsUpSampled() returns a non-zero value if image data returned -through the read interface routines is being up-sampled. This can be -useful to applications that want to calculate I/O buffer sizes to reflect -this usage (though the usual strip and tile size routines already do this).

-

TIFFGetVersion() returns an ASCII string that has a version -stamp for the TIFF library software.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff), -TIFFOpen (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFsize.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFsize.html deleted file mode 100644 index 373fcf9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFsize.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - TIFFsize — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFsize

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-tmsize_t TIFFRasterScanlineSize(TIFF *tif)
-
- -
-
-uint64_t TIFFRasterScanlineSize64(TIFF *tif)
-
- -
-
-tmsize_t TIFFScanlineSize(TIFF *tif)
-
- -
-
-uint64_t TIFFScanlineSize64(TIFF *tif)
-
- -
-
-

Description

-

TIFFScanlineSize() returns the size in bytes of a row of data as -it would be returned in a call to TIFFReadScanline(), or as it -would be expected in a call to TIFFWriteScanline(). -Note that this number may be 1/samples-per-pixel if data is -stored as separate planes. -The ScanlineSize in case of YCbCrSubsampling is defined as the -strip size divided by the strip height, i.e. the size of a pack of vertical -subsampling lines divided by vertical subsampling. It should thus make -sense when multiplied by a multiple of vertical subsampling. -TIFFScanlineSize64() returns the size as uint64_t.

-

TIFFRasterScanlineSize() returns the size in bytes of a complete -decoded and packed raster scanline. Note that this value may be different -from the value returned by TIFFScanlineSize() if data is stored -as separate planes. -TIFFRasterScanlineSize64() returns the size as uint64_t.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

TIFFOpen (3tiff), -TIFFReadScanline (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFstrip.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFstrip.html deleted file mode 100644 index 09e4aef..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFstrip.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - TIFFstrip — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFstrip

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t estimate)
-
- -
-
-tmsize_t TIFFStripSize(TIFF *tif)
-
- -
-
-uint64_t TIFFStripSize64(TIFF *tif)
-
- -
-
-tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows)
-
- -
-
-uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows)
-
- -
-
-tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip)
-
- -
-
-uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip)
-
- -
-
-uint32_t TIFFComputeStrip(TIFF *tif, uint32_t row, uint16_t sample)
-
- -
-
-uint32_t TIFFNumberOfStrips(TIFF *tif)
-
- -
-
-int TIFFSetupStrips(TIFF *tif)
-
- -
-
-

Description

-

TIFFDefaultStripSize() returns the number of rows for a -reasonable-sized strip according to the current settings of the -ImageWidth, BitsPerSample and SamplesPerPixel, -tags and any compression-specific requirements. If the estimate -parameter, sf non-zero, then it is taken as an estimate of the desired strip -size and adjusted according to any compression-specific requirements. The -value returned by this function is typically used to define the -RowsPerStrip tag. In lieu of any unusual requirements -TIFFDefaultStripSize tries to create strips that have approximately -8 kilobytes of uncompressed data.

-

TIFFStripSize() returns the equivalent size for a strip of data -as it would be returned in a call to TIFFReadEncodedStrip() -or as it would be expected in a call to TIFFWriteEncodedStrip(). -If an error occurs, 0 is returned.

-

TIFFStripSize64() returns the equivalent size for a strip of data -as uint64_t. -If an error occurs, 0 is returned.

-

TIFFVStripSize() returns the number of bytes in a strip with -nrows rows of data. -If an error occurs, 0 is returned.

-

TIFFVStripSize64() returns the number of bytes in a strip with -nrows rows of data as uint64_t. -If an error occurs, 0 is returned.

-

TIFFRawStripSize() returns the number of bytes in a raw strip -(i.e. not decoded). -If an error occurs, 0xFFFFFFFF (=(tmsize_t(-1)) is returned.

-

TIFFRawStripSize64() returns the number of bytes in a raw strip -as uint64_t. -If an error occurs, 0xFFFFFFFF (=(uint64_t(-1)) is returned.

-

TIFFComputeStrip() returns the strip that contains the specified -coordinates. A valid strip is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The row parameter is -always used in calculating a strip. The sample parameter is used only -if data are organized in separate planes (PlanarConfiguration = 2).

-

TIFFNumberOfStrips() returns the number of strips in the image.

-

TIFFSetupStrips() setup or reset strip parameters and strip array memory.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

TIFFReadEncodedStrip (3tiff), -TIFFReadRawStrip (3tiff), -TIFFWriteEncodedStrip (3tiff), -TIFFWriteRawStrip (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFswab.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFswab.html deleted file mode 100644 index a3a515a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFswab.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - TIFFswab — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFswab

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-const unsigned char *TIFFGetBitRevTable(int reversed)
-
- -
-
-void TIFFReverseBits(u_char *data, unsigned long nbytes)
-
- -
-
-void TIFFSwabShort(uint16_t *data)
-
- -
-
-void TIFFSwabLong(uint32_t *data)
-
- -
-
-void TIFFSwabLong8(uint64_t *lp)
-
- -
-
-void TIFFSwabFloat(float *fp)
-
- -
-
-void TIFFSwabDouble(double *dp)
-
- -
-
-void TIFFSwabArrayOfShort(uint16_t *wp, tmsize_t n)
-
- -
-
-void TIFFSwabArrayOfTriples(uint8_t *tp, tmsize_t n)
-
- -
-
-void TIFFSwabArrayOfLong(uint32_t *lp, tmsize_t n)
-
- -
-
-void TIFFSwabArrayOfLong8(uint64_t *lp, tmsize_t n)
-
- -
-
-void TIFFSwabArrayOfFloat(float *fp, tmsize_t n)
-
- -
-
-void TIFFSwabArrayOfDouble(double *dp, tmsize_t n)
-
- -
-
-

Description

-

The following routines are used by the library to swap 16-, 32- and 64-bit -data and to reverse the order of bits in bytes.

-

TIFFSwabShort() and TIFFSwabLong() and TIFFSwabFloat() -swap the bytes in a single 16- and 32-bit item, respectively.

-

TIFFSwabLong8() and TIFFSwabDouble() -swap the bytes in a single 64-bit item.

-

TIFFSwabArrayOfTriples() swap the first and the third byte of -each triple (three bytes) within the byte array. The second byte of each -triple stays untouched.

-

TIFFSwabArrayOfShort() and TIFFSwabArrayOfLong(), -TIFFSwabArrayOfFloat() swap the bytes in an array of 16- and 32-bit -items, respectively.

-

TIFFSwabArrayOfLong8() and TIFFSwabArrayOfDouble() -swap the bytes in an array of 64-bit items.

-

TIFFReverseBits() replaces each byte in data with the -equivalent bit-reversed value. This operation is performed with a -lookup table, which is returned using the TIFFGetBitRevTable() -function. The reversed parameter specifies which table should be -returned. Supply 1 if you want bit reversal table. Supply 0 to get -the table that do not reverse bit values. It is a lookup table that can -be used as an "identity function"; i.e. TIFFNoBitRevTable[n] == n.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/TIFFtile.html b/third_party/libtiff/doc/html-prebuilt/functions/TIFFtile.html deleted file mode 100644 index 562bb99..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/TIFFtile.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - TIFFtile — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFFtile

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-void TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th)
-
- -
-
-tmsize_t TIFFTileSize(TIFF *tif)
-
- -
-
-uint64_t TIFFTileSize64(TIFF *tif)
-
- -
-
-tmsize_t TIFFTileRowSize(TIFF *tif)
-
- -
-
-uint64_t TIFFTileRowSize64(TIFF *tif)
-
- -
-
-tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows)
-
- -
-
-uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows)
-
- -
-
-uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
-
- -
-
-int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample)
-
- -
-
-uint32_t TIFFNumberOfTiles(TIFF *tif)
-
- -
-
-

Description

-

TIFFDefaultTileSize() returns the pixel width and height of a -reasonable-sized tile; suitable for setting up the TileWidth and -TileLength tags. If the tw and th values passed in are -non-zero, then they are adjusted to reflect any compression-specific -requirements. The returned width and height are constrained to be a -multiple of 16 pixels to conform with the TIFF specification.

-

TIFFTileSize() returns the equivalent size for a tile of data -as it would be returned in a call to TIFFReadTile() or as it -would be expected in a call to TIFFWriteTile(). -TIFFTileSize64() returns a uint64_t number. -If an error occurs, 0 is returned.

-

TIFFVTileSize() returns the number of bytes in a row-aligned -tile with nrows of data. -TIFFVTileSize64() returns a uint64_t number. -If an error occurs, 0 is returned.

-

TIFFTileRowSize() returns the number of bytes of a row of data -in a tile. -TIFFTileRowSize64() returns a uint64_t number. -If an error occurs, 0 is returned.

-

TIFFComputeTile() returns the tile that contains the specified -coordinates. A valid tile is always returned; out-of-range coordinate -values are clamped to the bounds of the image. The x and y -parameters are always used in calculating a tile. The z -parameter is used if the image is deeper than 1 slice -(ImageDepth > 1). -The sample parameter is used only if data are organized in separate -planes (PlanarConfiguration = 2).

-

TIFFCheckTile() returns a non-zero value if the supplied -coordinates are within the bounds of the image and zero otherwise. The -x parameter is checked against the value of the ImageWidth tag. -The y parameter is checked against the value of the ImageLength -tag. The z parameter is checked against the value of the -ImageDepth tag (if defined). The sample parameter is checked -against the value of the SamplesPerPixel parameter if the data are -organized in separate planes.

-

TIFFNumberOfTiles() returns the number of tiles in the image.

-
-
-

Diagnostics

-

None.

-
-
-

See also

-

TIFFReadEncodedTile (3tiff), -TIFFReadRawTile (3tiff), -TIFFReadTile (3tiff), -TIFFWriteEncodedTile (3tiff), -TIFFWriteRawTile (3tiff), -TIFFWriteTile (3tiff), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/_TIFFRewriteField.html b/third_party/libtiff/doc/html-prebuilt/functions/_TIFFRewriteField.html deleted file mode 100644 index a69e3df..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/_TIFFRewriteField.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - _TIFFRewriteField — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

_TIFFRewriteField

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-int _TIFFRewriteField(TIFF *tif, uint16_t tag, TIFFDataType in_datatype, tmsize_t count, void *data)
-
- -
-
-

Description

-

_TIFFRewriteField() -Rewrite a field in the directory on disk without regard to updating the -TIFF directory structure in memory. Currently only supported for field -that already exist in the on-disk directory. -Mainly used for updating stripoffset / stripbytecount values after -the directory is already on disk.

-
-
-

Return values

-

Returns zero on failure, and one on success.

-
-
-

See also

-

libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/_TIFFauxiliary.html b/third_party/libtiff/doc/html-prebuilt/functions/_TIFFauxiliary.html deleted file mode 100644 index bb0cf52..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/_TIFFauxiliary.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - _TIFFauxiliary — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

_TIFFauxiliary

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
-
-uint32_t _TIFFClampDoubleToUInt32(double val)
-
- -
-
-uint32_t _TIFFMultiply32(TIFF *tif, uint32_t first, uint32_t second, const char *where)
-
- -
-
-uint64_t _TIFFMultiply64(TIFF *tif, uint64_t first, uint64_t second, const char *where)
-
- -
-
-

Description

-

_TIFFClampDoubleToUInt32() clamps double values into the range -of uint32_t (i.e. 0 .. 0xFFFFFFFF)

-

_TIFFMultiply32() and _TIFFMultiply64() checks for -an integer overflow of the multiplication result and return the multiplication -result or 0 if an overflow would happen. -The string where is printed in the error message in case an overflow -happens and can be used to indicate where the function was called.

-
-
-

See also

-

libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/functions/libtiff.html b/third_party/libtiff/doc/html-prebuilt/functions/libtiff.html deleted file mode 100644 index 9fb8728..0000000 --- a/third_party/libtiff/doc/html-prebuilt/functions/libtiff.html +++ /dev/null @@ -1,1169 +0,0 @@ - - - - - - - - libtiff — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

libtiff

-
-

Synopsis

-
#include <tiffio.h>
-
-
-
cc file.c -ltiff
-
-
-
-
-

Description

-

libtiff is a library for reading and writing data files encoded with the -"Tag Image File" format, Revision 6.0 (or revision 5.0 or revision 4.0). This file -format is suitable for archiving multi-color and monochromatic image data.

-

The library supports several compression algorithms, as indicated by the -Compression field, including: -no compression (1), -CCITT 1D Huffman compression (2), -CCITT Group 3 Facsimile compression (3), -CCITT Group 4 Facsimile compression (4), -Lempel-Ziv & Welch compression (5), -baseline JPEG compression (7), -word-aligned 1D Huffman compression (32771), -PackBits compression (32773). -In addition, several nonstandard compression algorithms are supported: the -4-bit compression algorithm used by the -ThunderScan program (32809) (decompression only), -NeXT's 2-bit compression algorithm (32766) (decompression only), -an experimental LZ-style algorithm known as Deflate (32946), -and an experimental CIE LogLuv compression scheme designed -for images with high dynamic range (32845 for LogL and 32845 for LogLuv). -Directory information may be in either little- or big-endian byte order; byte -swapping is automatically done by the library. Data bit ordering may be either -Most Significant Bit (MSB) to Least Significant Bit (LSB) or -LSB to MSB. -Finally, the library does not support files in which the -BitsPerSample , -Compression , -MinSampleValue , -or -MaxSampleValue -fields are defined differently on a per-sample basis -(in Rev. 6.0 the -Compression -tag is not defined on a per-sample basis, so this is immaterial).

-
-
-

Data types

-

The library makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. -The following typedefs are exposed to users either through function -definitions or through parameters passed through the varargs interfaces.

-
typedef int64_t tmsize_t;   /* signed size type (int32_t on 32-bit platforms) */
-typedef void* thandle_t;    /* client data handle */
-typedef uint64_t toff_t;    /* file offset */
-typedef uint32_t tdir_t;    /* directory index */
-
-
-

The following typedefs are deprecated and should be replaced by their -defining counterparts.

-
typedef uint32_t ttag_t;    /* directory tag */
-typedef uint16_t tsample_t; /* sample number */
-typedef uint32_t tstrile_t; /* strip or tile number */
-typedef tstrile_t tstrip_t; /* strip number */
-typedef tstrile_t ttile_t;  /* tile number */
-typedef tmsize_t tsize_t;   /* i/o size in bytes */
-typedef void *tdata_t;      /* image data ref */
-
-
-

Note that -tstrip_t, -ttile_t, -and -tsize_t -are constrained to be no more than 32-bit quantities by 32-bit fields they are -stored in in the -TIFF -image. -Likewise -tsample_t -is limited by the 16-bit field used to store the -SamplesPerPixel -tag.

-

tdir_t -constrains the maximum number of -IFDs -that may appear in an image and may be an arbitrary size (w/o penalty). -Starting with libtiff 4.5.0, tdir_t is a 32-bit unsigned integer. Previously, -it was a 16-bit unsigned integer.

-

ttag_t -must be either int, unsigned int, pointer, or double because the library uses -a varargs interface and -C restricts the type of the parameter before an ellipsis to be a promoted type. -toff_t -is defined as uint64_t because TIFF file offsets are (unsigned) 32-bit -quantities, and BigTIFF file offsets are unsigned 64-bit quantities. -A signed value is used because some interfaces return -1 on -error. Finally, note that user-specified data references are passed as opaque -handles and only cast at the lowest layers where their type is presumed.

-
-
-

List of routines

-

The following routines are part of the library. Consult specific manual pages -for details on their operation; on most systems doing man function-name -will work.

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Libtiff functions

Name

Description

TIFFAccessTagMethods()

provides read/write access to the TIFFTagMethods within the TIFF structure -to application code without giving access to the private TIFF structure

TIFFCheckpointDirectory()

writes the current state of the directory

TIFFCheckTile()

very x,y,z,sample is within image

TIFFCIELabToRGBInit()

initialize CIE L*a*b* 1976 to RGB conversion state

TIFFCIELabToXYZ()

perform CIE L*a*b* 1976 to CIE XYZ conversion

TIFFCleanup()

auxiliary function to free the TIFF structure

TIFFClientdata()

return open file's clientdata handle, which represents -the file descriptor used within libtiff.

TIFFClientOpen()

open a file for reading or writing

TIFFClientOpenExt()

open a file for reading or writing with options, -such as re-entrant error and warning handlers may be passed

TIFFClose()

close a previously opened TIFF file

TIFFComputeStrip()

return strip containing y,sample

TIFFComputeTile()

return tile containing x,y,z,sample

TIFFCreateCustomDirectory()

setup for a custom directory in a open TIFF file

TIFFCreateDirectory()

setup for a directory in a open TIFF file

TIFFCreateEXIFDirectory()

setup for a EXIF custom directory in a open TIFF file within a TIFF tag

TIFFCreateGPSDirectory()

setup for a GPS custom directory in a open TIFF file within a TIFF tag

TIFFCurrentDirectory()

return index of current directory

TIFFCurrentDirOffset()

return file offset of the current directory (instead of an index)

TIFFCurrentRow()

return index of current scanline

TIFFCurrentStrip()

return index of current strip

TIFFCurrentTile()

return index of current tile

TIFFDataWidth()

return the size of TIFF data types

TIFFDefaultStripSize()

return number of rows for a reasonable-sized strip according to the -current settings of the ImageWidth, BitsPerSample and SamplesPerPixel, -tags and any compression-specific requirements

TIFFDefaultTileSize()

return pixel width and height of a reasonable-sized tile; -suitable for setting up the TileWidth and TileLength tags

TIFFDeferStrileArrayWriting()

is an advanced writing function to control when/where the -[Strip/Tile][Offsets/ByteCounts] arrays are written into the file, -and must be used in a particular sequence together with -TIFFForceStrileArrayWriting() (see description)

TIFFError()

library-wide error handling function printing to stderr

TIFFErrorExt()

user-specific library-wide error handling function that can be passed -a file handle, which is set to the open TIFF file within libtiff

TIFFErrorExtR()

user-specific re-entrant library error handling function, -to which its TIFF structure is passed -containing the pointer to a user-specific data object

TIFFFdOpen()

open a file for reading or writing

TIFFFdOpenExt()

open a file for reading or writing with options, -such as re-entrant error and warning handlers may be passed

TIFFFieldDataType()

get data type from field information

TIFFFieldIsAnonymous()

returns if field was unknown to libtiff and has been auto-registered

TIFFFieldName()

get field name from field information

TIFFFieldPassCount()

get whether to pass a value count to Get/SetField

TIFFFieldReadCount()

get number of values to be read from field

TIFFFieldSetGetCountSize()

returns size of count parameter of TIFFSetField() and -TIFFGetField()

TIFFFieldSetGetSize()

return data size in bytes of the field data type used for libtiff -internal storage.

TIFFFieldTag()

get tag value from field information

TIFFFieldWithName()

get field information given field name

TIFFFieldWithTag()

get field information given tag

TIFFFieldWriteCount()

get number of values to be written to field

TIFFFileName()

return name of open file

TIFFFileno()

return open file descriptor

TIFFFindCODEC()

find standard codec for the specific scheme

TIFFFindField()

get field information given tag and data type

TIFFFlush()

flush all pending writes

TIFFFlushData()

flush pending data writes

TIFFForceStrileArrayWriting()

is an advanced writing function that writes the -[Strip/Tile][Offsets/ByteCounts] arrays at the end of the file (see description)

TIFFFreeDirectory()

release storage associated with a directory

TIFFGetBitRevTable()

return bit reversal table

TIFFGetClientInfo()

returns a pointer to the data of the named entry in the clientinfo-list

TIFFGetCloseProc()

returns a pointer to file close method

TIFFGetConfiguredCODECs()

gets list of configured codecs, both built-in and registered by user

TIFFGetField()

return tag value in current directory

TIFFGetFieldDefaulted()

return tag value in current directory with default value set if the -value is not already set and a default is defined

TIFFGetMapFileProc()

returns a pointer to memory mapping method

TIFFGetMode()

return open file mode

TIFFGetReadProc()

returns a pointer to file read method

TIFFGetSeekProc()

returns a pointer to file seek method

TIFFGetSizeProc()

returns a pointer to file size requesting method

TIFFGetStrileByteCount()

return value of the TileByteCounts/StripByteCounts array for the -specified tile/strile

TIFFGetStrileByteCountWithErr()

same as TIFFGetStrileByteCount() and additionally provides an error return

TIFFGetStrileOffset()

return value of the TileOffsets/StripOffsets array for the specified tile/strile

TIFFGetStrileOffsetWithErr()

same as TIFFGetStrileOffset() and additionally provides an error return

TIFFGetTagListCount()

return number of entries in the custom tag list

TIFFGetTagListEntry()

return tag number of the (n.th - 1) entry within the custom tag list

TIFFGetUnmapFileProc()

returns a pointer to memory unmapping method

TIFFGetVersion()

return library version string

TIFFGetWriteProc()

returns a pointer to file write method

TIFFIsBigEndian()

returns a non-zero value if the file is BigEndian and zero if the file is -LittleEndian

TIFFIsBigTIFF()

returns a non-zero value if the file is in BigTIFF style

TIFFIsByteSwapped()

return true if image data is byte-swapped

TIFFIsCODECConfigured()

check, whether we have working codec

TIFFIsMSB2LSB()

return true if image data is being returned with bit 0 as the most significant bit

TIFFIsTiled()

return true if image data is tiled

TIFFIsUpSampled()

returns a non-zero value if image data returned through the read interface -Routines is being up-sampled

TIFFLastDirectory()

returns a non-zero value if the current directory is the last directory -in the file; otherwise zero is returned

TIFFMergeFieldInfo()

adds application defined TIFF tags to the list of known libtiff tags

TIFFNumberOfDirectories()

return number of directories in a file

TIFFNumberOfStrips()

return number of strips in an image

TIFFNumberOfTiles()

return number of tiles in an image

TIFFOpen()

open a file for reading or writing

TIFFOpenExt()

open a file for reading or writing with options, -such as re-entrant error and warning handlers may be passed

TIFFOpenW()

opens a TIFF file with a Unicode filename, for read/writing

TIFFOpenWExt()

opens a TIFF file with a Unicode filename, for read/writing -with options, such as re-entrant error and warning handlers may be passed

TIFFOpenOptionsAlloc()

allocates memory for TIFFOpenOptions opaque structure

TIFFOpenOptionsFree()

releases the allocated memory for TIFFOpenOptions

TIFFOpenOptionsSetMaxSingleMemAlloc()

limits the maximum single memory allocation within libtiff

TIFFOpenOptionsSetMaxCumulatedMemAlloc()

limits the maximum cumulated memory allocation within libtiff

TIFFOpenOptionsSetErrorHandlerExtR()

setup of a user-specific and per-TIFF handle (re-entrant) error handler

TIFFOpenOptionsSetWarningHandlerExtR()

setup of a user-specific and per-TIFF handle (re-entrant) warning handler

TIFFPrintDirectory()

print description of the current directory

TIFFRasterScanlineSize()

returns the size in bytes of a complete decoded and packed raster scanline

TIFFRasterScanlineSize64()

return size as uint64_t

TIFFRawStripSize()

return number of bytes in a raw strip

TIFFRawStripSize64()

return number of bytes in a raw strip as uint64_t

TIFFReadBufferSetup()

specify i/o buffer for reading

TIFFReadCustomDirectory()

read the custom directory from the given offset -and set the context of the TIFF-handle tif to that custom directory

TIFFReadDirectory()

read the next directory

TIFFReadEncodedStrip()

read and decode a strip of data

TIFFReadEncodedTile()

read and decode a tile of data

TIFFReadEXIFDirectory()

read the EXIF directory from the given offset -and set the context of the TIFF-handle tif to that EXIF directory

TIFFReadFromUserBuffer()

replaces the use of TIFFReadEncodedStrip() / TIFFReadEncodedTile() -when the user can provide the buffer for the input data

TIFFReadGPSDirectory()

read the GPS directory from the given offset -and set the context of the TIFF-handle tif to that GPS directory

TIFFReadRawStrip()

read a raw strip of data

TIFFReadRawTile()

read a raw tile of data

TIFFReadRGBAImage()

read an image into a fixed format raster

TIFFReadRGBAImageOriented()

works like TIFFReadRGBAImage() except that the user can specify -the raster origin position

TIFFReadRGBAStrip()

reads a single strip of a strip-based image into memory, storing the -result in the user supplied RGBA raster

TIFFReadRGBAStripExt()

same as TIFFReadRGBAStrip() but providing the parameter stop_on_error

TIFFReadRGBATile()

reads a single tile of a tile-based image into memory, storing the -result in the user supplied RGBA raster

TIFFReadRGBATileExt()

same as TIFFReadRGBATile() but providing the parameter stop_on_error

TIFFReadScanline()

read and decode a row of data

TIFFReadTile()

read and decode a tile of data

TIFFRegisterCODEC()

override standard codec for the specific scheme

TIFFReverseBits()

reverse bits in an array of bytes

TIFFRewriteDirectory()

operates similarly to TIFFWriteDirectory(), but can be called -with directories previously read or written that already have an established -location in the file and places it at the end of the file

TIFFRGBAImageBegin()

setup decoder state for TIFFRGBAImageGet

TIFFRGBAImageEnd()

release TIFFRGBAImage decoder state

TIFFRGBAImageGet()

read and decode an image

TIFFRGBAImageOK()

is image readable by TIFFRGBAImageGet

TIFFScanlineSize()

return size of a scanline

TIFFScanlineSize64()

return size of a scanline as uint64_t

TIFFSetClientdata()

set open file's clientdata (file descriptor/handle), -and return previous value

TIFFSetClientInfo()

adds or replaces an entry in the clientinfo-list

TIFFSetCompressionScheme()

set compression scheme

TIFFSetDirectory()

set the current directory

TIFFSetErrorHandler()

set error handler function

TIFFSetErrorHandlerExt()

set error handler function with a file handle as parameter

TIFFSetField()

set a tag's value in the current directory

TIFFSetFileName()

sets the file name in the TIFF-structure and returns the old file name

TIFFSetFileno()

overwrites a copy of the open file's I/O descriptor, and return previous value -(refer to detailed description)

TIFFSetMode()

sets the libtiff open mode in the TIFF-structure and returns the old mode

TIFFSetSubDirectory()

set the current directory

TIFFSetTagExtender()

is used to register the merge function for user defined tags as an -extender callback with libtiff

TIFFSetupStrips()

setup or reset strip parameters and strip array memory

TIFFSetWarningHandler()

set warning handler function

TIFFSetWarningHandlerExt()

set warning handler function with a file handle as parameter

TIFFSetWriteOffset()

set current write offset

TIFFStripSize()

return size of a strip

TIFFStripSize64()

return equivalent size for a strip of data as uint64_t

TIFFSwabArrayOfDouble()

swap bytes of an array of doubles

TIFFSwabArrayOfFloat()

swap bytes of an array of floats

TIFFSwabArrayOfLong()

swap bytes of an array of longs

TIFFSwabArrayOfLong8()

swap bytes of an array of uint64_t

TIFFSwabArrayOfShort()

swap bytes of an array of shorts

TIFFSwabArrayOfTriples()

swap the first and third byte of each triple within an array of bytes

TIFFSwabDouble()

swap bytes of double

TIFFSwabFloat()

swap bytes of float

TIFFSwabLong()

swap bytes of long

TIFFSwabLong8()

swap bytes of long long (uint64_t)

TIFFSwabShort()

swap bytes of short

TIFFTileRowSize()

return size of a row in a tile

TIFFTileRowSize64()

return size of a row in a tile as uint64_t

TIFFTileSize()

return size of a tile

TIFFTileSize64()

return size of a tile as uint64_t

TIFFUnlinkDirectory()

unlink the specified directory from the directory chain

TIFFUnRegisterCODEC()

unregisters the codec

TIFFUnsetField()

clear the contents of the field in the internal structure

TIFFVGetField()

return tag value in current directory

TIFFVGetFieldDefaulted()

return tag value in current directory

TIFFVSetField()

set a tag's value in the current directory

TIFFVStripSize()

return number of bytes in a strip

TIFFVStripSize64()

return number of bytes in a strip with nrows rows of data as uint64_t

TIFFVTileSize()

returns the number of bytes in a row-aligned tile with nrows of data

TIFFVTileSize64()

returns the number of bytes in a row-aligned tile with nrows of data -a uint64_t number

TIFFWarning()

library-wide warning handling function printing to stderr

TIFFWarningExt()

user-specific library-wide warning handling function that can be passed -a file handle, which is set to the open TIFF file within libtiff

TIFFWarningExtR()

user-specific re-entrant library warning handling function, -to which its TIFF structure is passed -containing the pointer to a user-specific data object

TIFFWriteBufferSetup()

sets up the data buffer used to write raw (encoded) data to a file

TIFFWriteCheck()

verify file is writable and that the directory information is setup properly

TIFFWriteCustomDirectory()

write the current custom directory (also EXIF or GPS) to file

TIFFWriteDirectory()

write the current directory

TIFFWriteEncodedStrip()

compress and write a strip of data

TIFFWriteEncodedTile()

compress and write a tile of data

TIFFWriteRawStrip()

write a raw strip of data

TIFFWriteRawTile()

write a raw tile of data

TIFFWriteScanline()

write a scanline of data

TIFFWriteTile()

compress and write a tile of data

TIFFXYZToRGB()

perform CIE XYZ to RGB conversion

TIFFYCbCrtoRGB()

perform YCbCr to RGB conversion

TIFFYCbCrToRGBInit()

initialize YCbCr to RGB conversion state

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Libtiff auxiliary functions

Name

Description

_TIFFCheckMalloc()

checking for integer overflow before dynamically allocate memory buffer

_TIFFCheckRealloc()

checking for integer overflow before dynamically reallocate memory buffer

_TIFFClampDoubleToUInt32()

clamps double values into the range of uint32_t (i.e. 0 .. 0xFFFFFFFF)

_TIFFfree()

free memory buffer

_TIFFGetExifFields()

return a pointer to the libtiff internal definition list of the EXIF tags

_TIFFGetGpsFields()

return a pointer to the libtiff internal definition list of the GPS tags

_TIFFmalloc()

dynamically allocate memory buffer

_TIFFmemcmp()

compare contents of the memory buffers

_TIFFmemcpy()

copy contents of the one buffer to another

_TIFFmemset()

fill memory buffer with a constant byte

_TIFFMultiply32()

checks for an integer overflow of the multiplication result of uint32_t and -return the multiplication result or 0 if an overflow would happen

_TIFFMultiply64()

checks for an integer overflow of the multiplication result of uint64_t and -return the multiplication result or 0 if an overflow would happen

_TIFFrealloc()

dynamically reallocate memory buffer

_TIFFRewriteField()

Rewrite a field in the directory on disk without regard -to updating the TIFF directory structure in memory

-
-
-

Tag usage

-

For a table of TIFF tags recognized by the library refer to -LibTIFF Coverage of the TIFF 6.0 Specification.

-
-
-

"Pseudo tags"

-

In addition to the normal TIFF -tags the library supports a collection of -tags whose values lie in a range outside the valid range of TIFF -tags. These tags are termed pseudo-tags -and are used to control various codec-specific functions within the library. -The table below summarizes the defined pseudo-tags.

- - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
libtiff supported tags

Tag name

Codec

R/W

Library Use/Notes

TIFFTAG_FAXMODE

G3

R/W

general codec operation

TIFFTAG_FAXFILLFUNC

G3/G4

R/W

bitmap fill function

TIFFTAG_JPEGQUALITY

JPEG

R/W

compression quality control

TIFFTAG_JPEGCOLORMODE

JPEG

R/W

control colorspace conversions

TIFFTAG_JPEGTABLESMODE

JPEG

R/W

control contents of JPEGTables tag

TIFFTAG_ZIPQUALITY

Deflate

R/W

compression quality level

TIFFTAG_PIXARLOGDATAFMT

PixarLog

R/W

user data format

TIFFTAG_PIXARLOGQUALITY

PixarLog

R/W

compression quality level

TIFFTAG_SGILOGDATAFMT

SGILog

R/W

user data format

-

TIFFTAG_FAXMODE:

-
-

Control the operation of the Group 3 codec. -Possible values (independent bits that can be combined by -or'ing them together) are:

-

FAXMODE_CLASSIC:

-
-

(enable old-style format in which the RTC -is written at the end of the last strip),

-
-

FAXMODE_NORTC:

-
-

(opposite of FAXMODE_CLASSIC; also called -FAXMODE_CLASSF),

-
-

FAXMODE_NOEOL:

-
-

(do not write EOL codes at the start of each row of data),

-
-

FAXMODE_BYTEALIGN:

-
-

(align each encoded row to an 8-bit boundary),

-
-

FAXMODE_WORDALIGN:

-
-

(align each encoded row to an 16-bit boundary),

-
-

The default value is dependent on the compression scheme; this -pseudo-tag is used by the various G3 and G4 codecs to share code.

-
-

TIFFTAG_FAXFILLFUNC:

-
-

Control the function used to convert arrays of black and white -runs to packed bit arrays. -This hook can be used to image decoded scanlines in multi-bit -depth rasters (e.g. for display in colormap mode) -or for other purposes. -The default value is a pointer to a builtin function that images -packed bilevel data.

-
-

TIFFTAG_IPTCNEWSPHOTO:

-
-

Tag contains image metadata per the IPTC newsphoto spec: Headline, -captioning, credit, etc... Used by most wire services.

-
-

TIFFTAG_PHOTOSHOP:

-
-

Tag contains Photoshop captioning information and metadata. Photoshop -uses in parallel and redundantly alongside IPTCNEWSPHOTO information.

-
-

TIFFTAG_JPEGQUALITY:

-
-

Control the compression quality level used in the baseline algorithm. -Note that quality levels are in the range 0-100 with a default value of 75.

-
-

TIFFTAG_JPEGCOLORMODE:

-
-

Control whether or not conversion is done between -RGB and YCbCr colorspaces. -Possible values are:

-

JPEGCOLORMODE_RAW:

-
-

(do not convert), and

-
-

JPEGCOLORMODE_RGB:

-
-

(convert to/from RGB)

-
-

The default value is JPEGCOLORMODE_RAW.

-
-

TIFFTAG_JPEGTABLESMODE:

-
-

Control the information written in the JPEGTables tag. -Possible values (independent bits that can be combined by -or'ing them together) are:

-

JPEGTABLESMODE_QUANT:

-
-

(include quantization tables), and

-
-

JPEGTABLESMODE_HUFF:

-
-

(include Huffman encoding tables).

-
-

The default value is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF.

-
-

TIFFTAG_ZIPQUALITY:

-
-

Control the compression technique used by the Deflate codec. -Quality levels are in the range 1-9 with larger numbers yielding better -compression at the cost of more computation. -The default quality level is 6 which yields a good time-space tradeoff.

-
-

TIFFTAG_PIXARLOGDATAFMT:

-
-

Control the format of user data passed in -to the PixarLog codec when encoding and passed -out from when decoding. Possible values are:

-

PIXARLOGDATAFMT_8BIT:

-
-

for 8-bit unsigned pixels,

-
-

PIXARLOGDATAFMT_8BITABGR:

-
-

for 8-bit unsigned ABGR-ordered pixels,

-
-

PIXARLOGDATAFMT_11BITLOG:

-
-

for 11-bit log-encoded raw data,

-
-

PIXARLOGDATAFMT_12BITPICIO:

-
-

for 12-bit PICIO-compatible data,

-
-

PIXARLOGDATAFMT_16BIT:

-
-

for 16-bit signed samples, and

-
-

PIXARLOGDATAFMT_FLOAT:

-
-

for 32-bit IEEE floating point samples.

-
-
-

TIFFTAG_PIXARLOGQUALITY:

-
-

Control the compression technique used by the PixarLog codec. -This value is treated identically to TIFFTAG_ZIPQUALITY; see the -above description.

-
-

TIFFTAG_SGILOGDATAFMT:

-
-

Control the format of client data passed in -to the SGILog codec when encoding and passed -out from when decoding. Possible values are:

-

SGILOGDATAFMT_FLTXYZ:

-
-

for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels,

-
-

SGILOGDATAFMT_16BITLUV:

-
-

for 16-bit encoded Luv pixels,

-
-

SGILOGDATAFMT_32BITRAW: -SGILOGDATAFMT_24BITRAW:

-
-

for no conversion of data,

-
-

SGILOGDATAFMT_8BITRGB:

-
-

for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data),

-
-

SGILOGDATAFMT_FLTY:

-
-

for converting between LogL and 32-bit IEEE floating valued Y pixels,

-
-

SGILOGDATAFMT_16BITL:

-
-

for 16-bit encoded L pixels, and

-
-

SGILOGDATAFMT_8BITGRY:

-
-

for returning 8-bit greyscale data -(valid only when decoding LogL-encoded data).

-
-
-
-
-

Diagnostics

-

All error messages are directed through the TIFFErrorExtR() routine. -By default messages are directed to stderr in the form: -module: message\n. -Warning messages are likewise directed through the -TIFFWarningExtR() routine.

-
-
-

See also

-

fax2tiff, -pal2rgb, -ppm2tiff, -rgb2ycbcr, -raw2tiff, -tiff2bw, -tiffdither, -tiffdump, -tiffcp, -tiffcmp, -tiffgt, -tiffinfo, -tiffmedian, -tiffsplit,

-

"Tag Image File Format Specification *Revision 6.0*", -an Aldus Technical Memorandum.

-

"The Spirit of TIFF Class F" , -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.

-
-
-

Bugs

-
    -
  • The library does not support multi-sample images -where some samples have different bits/sample.

  • -
  • The library does not support random access to compressed data -that is organized with more than one row per tile or strip.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/genindex.html b/third_party/libtiff/doc/html-prebuilt/genindex.html deleted file mode 100644 index 95ad3d1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/genindex.html +++ /dev/null @@ -1,2130 +0,0 @@ - - - - - - - Index — LibTIFF 4.7.1 documentation - - - - - - - - - - -
-
-
-
- - -

Index

- -
- Symbols - | _ - | C - | F - | P - | R - | T - -
-

Symbols

- - - -
- -

_

- - - -
- -

C

- - -
- -

F

- - -
- -

P

- - - -
    -
  • - pal2rgb command line option - -
  • -
    -
  • - ppm2tiff command line option - -
  • -
- -

R

- - - -
    -
  • - raw2tiff command line option - -
  • -
    -
  • - rgb2ycbcr command line option - -
  • -
- -

T

- - - -
- - - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/images.html b/third_party/libtiff/doc/html-prebuilt/images.html deleted file mode 100644 index 08847db..0000000 --- a/third_party/libtiff/doc/html-prebuilt/images.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - TIFF Test Images — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFF Test Images

-bali -

Test images are available for most formats supported by the library. -Most of the images included in the test kit are also part of this -documentation (albeit in TIFF rather than GIF or JFIF). -The images are kept in a separate archive that should be located in -the same directory as this software.

-

The latest archive of test images is located at -https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz, -or at https://gitlab.com/libtiff/libtiff-pics.

-

There are two other good sources for TIFF test images: -the contributed software contrib/dbs includes several -programs that generate test images suitable for debugging, and -the tiffcp program can be used to generate a variety -of images with different storage characteristics.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/index.html b/third_party/libtiff/doc/html-prebuilt/index.html deleted file mode 100644 index 045df14..0000000 --- a/third_party/libtiff/doc/html-prebuilt/index.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - LibTIFF - TIFF Library and Utilities — LibTIFF 4.7.1 documentation - - - - - - - - - - - -
-
-
-
- -
-

LibTIFF - TIFF Library and Utilities

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
References

Name

Reference

Home Page #1

http://www.simplesystems.org/libtiff/

Home Page #2

https://libtiff.gitlab.io/libtiff/

Latest Stable Release

v4.7.1

Primary Download Site

download.osgeo.org

Mailing List

tiff@lists.osgeo.org

List subscription

http://lists.osgeo.org/mailman/listinfo/tiff/

Source repository

https://gitlab.com/libtiff/libtiff

-

The LibTIFF software provides support for the Tag Image File Format (TIFF), -a widely used format for storing image data. The latest version of -the TIFF specification is TIFF File Format Specification.

-

Included in this software distribution are:

-
    -
  • a library, libtiff, for reading and writing TIFF images

  • -
  • a small collection of tools for performing simple manipulations of TIFF images

  • -
  • documentation for the library and tools.

  • -
-

The libtiff library, along with associated tool programs, should handle most of -your needs for reading and writing TIFF images.

-

LibTIFF is portable software, supported on various operating systems including -UNIX (Linux, BSD, MacOS X) and Windows.

-
-

Note

-

At libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, -tiffdump, tiffcp and tiffset) has been moved to archive/ directory -and was not built. -tiff2ps and tiff2pdf source code has been moved in a unsupported category, -no longer built by default, but were still part of the the source -distribution.

-

With libtiff v4.7.0 those tools were restored.

-
-

The following sections are included in this documentation:

-
- -
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/internals.html b/third_party/libtiff/doc/html-prebuilt/internals.html deleted file mode 100644 index 8d6a23b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/internals.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - Modifying The TIFF Library — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Modifying The TIFF Library

-dave -

This chapter provides information about the internal structure of -the library, how to control the configuration when building it, and -how to add new support to the library. -The following sections are found in this chapter:

-
-

Library Configuration

-

Information on compiling the library is given Building the TIFF Software Distribution -elsewhere in this documentation. -This section describes the low-level mechanisms used to control -the optional parts of the library that are configured at build -time. Control is based on -a collection of C defines that are specified either on the compiler -command line or in a configuration file such as port.h -(as generated by the configure script for UNIX systems) -or tiffconf.h.

-

Configuration defines are split into three areas:

-
    -
  • those that control which compression schemes are -configured as part of the builtin codecs,

  • -
  • those that control support for groups of tags that -are considered optional, and

  • -
  • those that control operating system or machine-specific support.

  • -
-

If the define COMPRESSION_SUPPORT is not defined -then a default set of compression schemes is automatically -configured:

-
    -
  • CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771),

  • -
  • the Macintosh PackBits algorithm (compression 32773),

  • -
  • a 4-bit run-length encoding scheme from ThunderScan (compression 32809),

  • -
  • a 2-bit encoding scheme used by NeXT (compression 32766), and

  • -
  • two experimental schemes intended for images with high dynamic range -(compression 34676 and 34677).

  • -
-

To override the default compression behaviour define -COMPRESSION_SUPPORT and then one or more additional defines -to enable configuration of the appropriate codecs (see the table -below); e.g.

-
#define COMPRESSION_SUPPORT
-#define CCITT_SUPPORT
-#define PACKBITS_SUPPORT
-
-
-

Several other compression schemes are configured separately from -the default set because they depend on ancillary software -packages that are not distributed with LibTIFF.

-

Support for JPEG compression is controlled by JPEG_SUPPORT. -The JPEG codec that comes with LibTIFF is designed for -use with release 5 or later of the Independent JPEG Group's freely -available software distribution.

-

This software can be retrieved from -https://ijg.org/ or as an alternative from https://libjpeg-turbo.org/.

-
-

Note

-

Enabling JPEG support automatically enables support for -the TIFF 6.0 colorimetry and YCbCr-related tags.

-
-

Experimental support for the deflate algorithm is controlled by -DEFLATE_SUPPORT. -The deflate codec that comes with LibTIFF is designed -for use with version 0.99 or later of the freely available -libz library written by Jean-loup Gailly and Mark Adler.

-

The data format used by the zlib library is described by RFCs (Request for -Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 -(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).

-

The libz library can be fetched from https://www.zlib.net/, -and libdeflate from https://github.com/ebiggers/libdeflate

-

Other codec libraries supported by LibTIFF are:

- -

By default tiffconf.h defines -COLORIMETRY_SUPPORT, -YCBCR_SUPPORT, -and -CMYK_SUPPORT.

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
tiffconf.h defines

Define

Description

CCITT_SUPPORT

CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771)

PACKBITS_SUPPORT

Macintosh PackBits algorithm (compression 32773)

LZW_SUPPORT

Lempel-Ziv & Welch (LZW) algorithm (compression 5)

THUNDER_SUPPORT

4-bit run-length encoding scheme from ThunderScan (compression 32809)

NEXT_SUPPORT

2-bit encoding scheme used by NeXT (compression 32766)

OJPEG_SUPPORT

obsolete JPEG scheme defined in the 6.0 spec (compression 6) -(requires JPEG library with old JPEG support)

JPEG_SUPPORT

current JPEG scheme defined in TTN2 (compression 7) -(requires JPEG library)

JBIG_SUPPORT

current JBIG (compression 9=T85, 10=43 and 34661=ISO) -(requires JBIG-KIT library)

LERC_SUPPORT

current LERC (compression 34887) -(requires LERC and Zlib library)

ZIP_SUPPORT

experimental Deflate scheme (compression 32946) -(requires Zlib)

LIBDEFLATE_SUPPORT

support libdeflate enhanced compression (compression 32946) -(requires libdeflate and Zlib)

LZMA_SUPPORT

Lempel–Ziv–Markov chain algorithm (LZMA2) (compression 34925) -(requires liblzma)

ZSTD_SUPPORT

ZStandard (ZSTD) deflate like scheme -(compression 50000 - not registered in Adobe-maintained registry) -(requires zstd library)

WEBP_SUPPORT

WebP raster graphic compression support -(compression 50001 - not registered in Adobe-maintained registry) -(requires webp library)

PIXARLOG_SUPPORT

Pixar's compression scheme for high-resolution color images -(compression 32909) (requires Zlib)

SGILOG_SUPPORT

SGI's compression scheme for high-resolution color images -(compression 34676 and 34677)

COLORIMETRY_SUPPORT

support for the TIFF 6.0 colorimetry tags

YCBCR_SUPPORT

support for the TIFF 6.0 YCbCr-related tags

CMYK_SUPPORT

support for the TIFF 6.0 CMYK-related tags

ICC_SUPPORT

support for the ICC Profile tag; see -The ICC Profile Format Specification, -Annex B.3 "Embedding ICC Profiles in TIFF Files"; -available at -http://www.color.org/

-
-
-

General Portability Comments

-

This software is developed on Silicon Graphics UNIX -systems (big-endian, MIPS CPU, 32-bit ints, -IEEE floating point). -The configure shell script generates the appropriate -include files and make files for UNIX systems. -Makefiles exist for non-UNIX platforms that the -code runs on---this work has mostly been done by other people.

-

In general, the code is guaranteed to work only on SGI machines. -In practice it is highly portable to any 32-bit or 64-bit system and much -work has been done to insure portability to 16-bit systems. -If you encounter portability problems please return fixes so -that future distributions can be improved.

-

The software is written to assume an ANSI C compilation environment. -If your compiler does not support ANSI function prototypes, const, -and <stdarg.h> then you will have to make modifications to the -software. In the past I have tried to support compilers without const -and systems without <stdarg.h>, but I am -no longer interested in these -antiquated environments. With the general availability of -the freely available GCC compiler, I -see no reason to incorporate modifications to the software for these -purposes.

-

An effort has been made to isolate as many of the -operating system-dependencies -as possible in two files: tiffcomp.h and -libtiff/tif_<os>.c. The latter file contains -operating system-specific routines to do I/O and I/O-related operations. -The UNIX (tif_unix.c) code has had the most use.

-

Native CPU byte order is determined through the WORDS_BIGENDIAN -definition, which must be set to the appropriate value in tif_config.h -by the build system.

-

The following defines control general portability:

- - ---- - - - - - - - - - - - - - - - - - - - - - - -
Portability defines

Define

Description

BSDTYPES

Define this if your system does not define the -usual BSD typedefs: u_char, -u_short, u_int, u_long.

HAVE_IEEEFP

Define this as 0 or 1 according to the floating point -format supported by the machine. If your machine does -not support IEEE floating point then you will need to -add support to tif_machdep.c to convert between the -native format and IEEE format.

HAVE_MMAP

Define this if there is mmap-style support for -mapping files into memory (used only to read data).

HOST_FILLORDER

Define the native CPU bit order: one of FILLORDER_MSB2LSB -or FILLORDER_LSB2MSB

HOST_BIGENDIAN

Define the native CPU byte order: 1 if big-endian (Motorola) -or 0 if little-endian (Intel); this may be used -in codecs to optimize code

-

On UNIX systems HAVE_MMAP is defined through the running of -the configure script; otherwise support for memory-mapped -files is disabled. -Note that tiffcomp.h defines HAVE_IEEEFP to be -1 (BSDTYPES is not defined).

-
-
-

Types and Portability

-

The software makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. There are interactions between these two to be careful -of, but for the most part you should be able to deal with portability -purely by fiddling with the following machine-dependent typedefs:

- - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Portability typedefs

Typedef

Description

Header

uint8_t

8-bit unsigned integer

tiff.h

int8_t

8-bit signed integer

tiff.h

uint16_t

16-bit unsigned integer

tiff.h

int16_t

16-bit signed integer

tiff.h

uint32_t

32-bit unsigned integer

tiff.h

int32_t

32-bit signed integer

tiff.h

uint64_t

64-bit unsigned integer

tiff.h

int64_t

64-bit signed integer

tiff.h

-

Most of the previously used type definitions that refer to -specific objects are deprecated. -For more information about typedefs see Data Types.

-
-
-

General Comments

-

The library is designed to hide as much of the details of TIFF from -applications as -possible. In particular, TIFF directories are read in their entirety -into an internal format. Only the tags known by the library are -available to a user and certain tag data may be maintained that a user -does not care about (e.g. transfer function tables).

-
-
-

Adding New Builtin Codecs

-

To add builtin support for a new compression algorithm, you can either -use the "tag-extension" trick to override the handling of the -TIFF Compression tag (see Defining New TIFF Tags), -or do the following to add support directly to the core library:

-
    -
  • Define the tag value in tiff.h.

  • -
  • Edit the file tif_codec.c to add an entry to the -_TIFFBuiltinCODECS array (see how other algorithms are handled).

  • -
  • Add the appropriate function prototype declaration to -tiffiop.h (close to the bottom).

  • -
  • Create a file with the compression scheme code, by convention files -are named tif_*.c (except perhaps on some systems where the -tif_ prefix pushes some filenames over 14 chars.

  • -
  • Update build configuration to include new source file.

  • -
-

A codec, say foo, can have many different entry points:

-
TIFFInitfoo(tif, scheme) /* initialize scheme and setup entry points in tif */
-fooSetupDecode(tif) /* called once per IFD after tags has been frozen */
-fooPreDecode(tif, sample) /* called once per strip/tile, after data is read,
-                             but before the first row is decoded */
-fooDecode*(tif, bp, cc, sample) /* decode cc bytes of data into the buffer */
-    fooDecodeRow(...)       /* called to decode a single scanline */
-    fooDecodeStrip(...)     /* called to decode an entire strip */
-    fooDecodeTile(...)      /* called to decode an entire tile */
-    fooSetupEncode(tif)     /* called once per IFD after tags has been frozen */
-    fooPreEncode(tif, sample) /* called once per strip/tile, before the first row in
-                                 a strip/tile is encoded */
-fooEncode*(tif, bp, cc, sample)/* encode cc bytes of user data (bp) */
-    fooEncodeRow(...)       /* called to decode a single scanline */
-    fooEncodeStrip(...)     /* called to decode an entire strip */
-    fooEncodeTile(...)      /* called to decode an entire tile */
-fooPostEncode(tif)  /* called once per strip/tile, just before data is written */
-fooSeek(tif, row)   /* seek forwards row scanlines from the beginning
-                       of a strip (row will always be <0 and >rows/strip */
-fooCleanup(tif) /* called when compression scheme is replaced by user */
-
-
-

Note that the encoding and decoding variants are only needed when -a compression algorithm is dependent on the structure of the data. -For example, Group 3 2D encoding and decoding maintains a reference -scanline. The sample parameter identifies which sample is to be -encoded or decoded if the image is organized with PlanarConfig=2 -(separate planes). This is important for algorithms such as JPEG. -If PlanarConfig=1 (interleaved), then sample will always be 0.

-
-
-

Other Comments

-

The library handles most I/O buffering. There are two data buffers -when decoding data: a raw data buffer that holds all the data in a -strip, and a user-supplied scanline buffer that compression schemes -place decoded data into. When encoding data the data in the -user-supplied scanline buffer is encoded into the raw data buffer (from -where it is written). Decoding routines should never have to explicitly -read data -- a full strip/tile's worth of raw data is read and scanlines -never cross strip boundaries. Encoding routines must be cognizant of -the raw data buffer size and call TIFFFlushData1() when necessary. -Note that any pending data is automatically flushed when a new strip/tile is -started, so there's no need do that in the tif_postencode routine (if -one exists). Bit order is automatically handled by the library when -a raw strip or tile is filled. If the decoded samples are interpreted -by the decoding routine before they are passed back to the user, then -the decoding logic must handle byte-swapping by overriding the -tif_postdecode -routine (set it to TIFFNoPostDecode()) and doing the required work -internally. For an example of doing this look at the horizontal -differencing code in the routines in tif_predict.c.

-

The variables tif_rawcc, tif_rawdata, and -tif_rawcp in a TIFF structure -are associated with the raw data buffer. tif_rawcc must be non-zero -for the library to automatically flush data. The variable -tif_scanlinesize is the size a user's scanline buffer should be. The -variable tif_tilesize is the size of a tile for tiled images. This -should not normally be used by compression routines, except where it -relates to the compression algorithm. That is, the cc parameter to the -tif_decode* and tif_encode* -routines should be used in terminating -decompression/compression. This ensures these routines can be used, -for example, to decode/encode entire strips of data.

-

In general, if you have a new compression algorithm to add, work from -the code for an existing routine. In particular, -tif_dumpmode.c -has the trivial code for the "nil" compression scheme, -tif_packbits.c is a -simple byte-oriented scheme that has to watch out for buffer -boundaries, and tif_lzw.c has the LZW scheme that has the most -complexity -- it tracks the buffer boundary at a bit level. -Of course, using a private compression scheme (or private tags) limits -the portability of your TIFF files.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/libtiff.html b/third_party/libtiff/doc/html-prebuilt/libtiff.html deleted file mode 100644 index 77828a6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/libtiff.html +++ /dev/null @@ -1,789 +0,0 @@ - - - - - - - - Using The TIFF Library — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Using The TIFF Library

-cat -

libtiff is a set of C functions (a library) that support -the manipulation of TIFF image files. -The library requires an ANSI C compilation environment for building -and presumes an ANSI C environment for use.

-

libtiff -provides interfaces to image data at several layers of abstraction (and cost). -At the highest level image data can be read into an 8-bit/sample, -ABGR pixel raster format without regard for the underlying data organization, -colorspace, or compression scheme. Below this high-level interface -the library provides scanline-, strip-, and tile-oriented interfaces that -return data decompressed but otherwise untransformed. These interfaces -require that the application first identify the organization of stored -data and select either a strip-based or tile-based API for manipulating -data. At the lowest level the library -provides access to the raw uncompressed strips or tiles, -returning the data exactly as it appears in the file.

-

The material presented in this chapter is a basic introduction -to the capabilities of the library; it is not an attempt to describe -everything a developer needs to know about the library or about TIFF. -Detailed information on the interfaces to the library are given in -the TIFF Functions Overview that accompany this software. -An alphabetic list of all the public functions with a brief description can be found at List of routines

-
-

How to tell which version you have

-

The software version can be found by looking at the file named -VERSION -that is located at the top of the source tree; the precise alpha number -is given in the file dist/tiff.alpha. -If you have need to refer to this -specific software, you should identify it as:

-
TIFF <version> <alpha>
-
-
-

where <version> is whatever you get from -cat VERSION and <alpha> is -what you get from cat dist/tiff.alpha.

-

Within an application that uses libtiff the TIFFGetVersion() -routine will return a pointer to a string that contains software version -information. -The library include file <tiffio.h> contains a C pre-processor -define TIFFLIB_VERSION that can be used to check library -version compatibility at compile time.

-
-
-

Library Datatypes

-

libtiff defines a portable programming interface through the -use of a set of C type definitions. -These definitions, defined in in the files tiff.h and -tiffio.h, -isolate the libtiff API from the characteristics -of the underlying machine. -To insure portable code and correct operation, applications that use -libtiff should use the typedefs and follow the function -prototypes for the library API.

-
-
-

Memory Management

-

libtiff uses a machine-specific set of routines for managing -dynamically allocated memory. -_TIFFmalloc(), _TIFFrealloc(), and _TIFFfree() -mimic the normal ANSI C routines. -Any dynamically allocated memory that is to be passed into the library -should be allocated using these interfaces in order to insure pointer -compatibility on machines with a segmented architecture. -(On 32-bit UNIX systems these routines just call the normal malloc(), -realloc(), and free() routines in the C library.)

-

To deal with segmented pointer issues libtiff also provides -_TIFFmemcpy(), _TIFFmemset(), and _TIFFmemcmp() -routines that mimic the equivalent ANSI C routines, but that are -intended for use with memory allocated through _TIFFmalloc() -and _TIFFrealloc().

-

With libtiff 4.5 a method was introduced to limit the internal -memory allocation that functions are allowed to request per call -(see TIFFOpenOptionsSetMaxSingleMemAlloc() and TIFFOpenExt()).

-

With libtiff 4.6.1 a method was introduced to limit the internal -cumulated memory allocation that functions are allowed to request for a given -TIFF handle -(see TIFFOpenOptionsSetMaxCumulatedMemAlloc() and TIFFOpenExt()).

-
-
-

Error Handling

-

libtiff handles most errors by returning an invalid/erroneous -value when returning from a function call. -Various diagnostic messages may also be generated by the library. -All error messages are directed to a single global error handler -routine that can be specified with a call to TIFFSetErrorHandler(). -Likewise warning messages are directed to a single handler routine -that can be specified with a call to TIFFSetWarningHandler()

-

Further application-specific and per-TIFF handle (re-entrant) error handler -and warning handler can be set. Please refer to TIFFError -and TIFFOpenOptions.

-
-
-

Basic File Handling

-

The library is modeled after the normal UNIX stdio library. -For example, to read from an existing TIFF image the -file must first be opened:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("foo.tif", "r");
-    /* ... do stuff ... */
-    TIFFClose(tif);
-}
-
-
-

The handle returned by TIFFOpen() is opaque, that is -the application is not permitted to know about its contents. -All subsequent library calls for this file must pass the handle -as an argument.

-

To create or overwrite a TIFF image the file is also opened, but with -a "w" argument:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("foo.tif", "w");
-    /* ... do stuff ... */
-    TIFFClose(tif);
-}
-
-
-

If the file already exists it is first truncated to zero length.

-
-

Warning

-

Unlike the stdio library TIFF image files may not be -opened for both reading and writing; -there is no support for altering the contents of a TIFF file.

-
-

libtiff buffers much information associated with writing a -valid TIFF image. Consequently, when writing a TIFF image it is necessary -to always call TIFFClose() or TIFFFlush() to flush any -buffered information to a file. Note that if you call TIFFClose() -you do not need to call TIFFFlush().

-
-

Warning

-

In order to prevent out-of-memory issues when opening a TIFF file -TIFFOpenExt() can be used and then the maximum single memory -limit in bytes that libtiff internal memory allocation functions -are allowed to request per call can be set with -TIFFOpenOptionsSetMaxSingleMemAlloc().

-
-

Example

-
tmsize_t limit = (256 * 1024 * 1024);
-TIFFOpenOptions *opts = TIFFOpenOptionsAlloc();
-TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit);
-TIFF *tif = TIFFOpenExt("foo.tif", "w", opts);
-TIFFOpenOptionsFree(opts);
-/* ... go on here ... */
-
-
-
-
-

TIFF Directories

-

TIFF supports the storage of multiple images in a single file. -Each image has an associated data structure termed a directory -that houses all the information about the format and content of the -image data. -Images in a file are usually related but they do not need to be; it -is perfectly alright to store a color image together with a black and -white image. -Note however that while images may be related their directories are -not. -That is, each directory stands on its own; there is no need to read -an unrelated directory in order to properly interpret the contents -of an image.

-

libtiff provides several routines for reading and writing -directories. In normal use there is no need to explicitly -read or write a directory: the library automatically reads the first -directory in a file when opened for reading, and directory information -to be written is automatically accumulated and written when writing -(assuming TIFFClose() or TIFFFlush() are called).

-

For a file open for reading the TIFFSetDirectory() routine can -be used to select an arbitrary directory; directories are referenced by -number with the numbering starting at 0. Otherwise the -TIFFReadDirectory() and TIFFWriteDirectory() routines can -be used for sequential access to directories. -For example, to count the number of directories in a file the following -code might be used:

-
#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-        int dircount = 0;
-        do {
-            dircount++;
-        } while (TIFFReadDirectory(tif));
-        printf("%d directories in %s\n", dircount, argv[1]);
-        TIFFClose(tif);
-    }
-    exit(0);
-}
-
-
-

Finally, note that there are several routines for querying the -directory status of an open file: -TIFFCurrentDirectory() returns the index of the current -directory and -TIFFLastDirectory() returns an indication of whether the -current directory is the last directory in a file. -There is also a routine, TIFFPrintDirectory(), that can -be called to print a formatted description of the contents of -the current directory; consult the manual page for complete details.

-
-
-

TIFF Tags

-

Image-related information such as the image width and height, number -of samples, orientation, colorimetric information, etc. -are stored in each image -directory in fields or tags. -Tags are identified by a number that is usually a value registered -with the Aldus (now Adobe) Corporation. -Beware however that some vendors write -TIFF images with tags that are unregistered; in this case interpreting -their contents is usually a waste of time.

-

libtiff reads the contents of a directory all at once -and converts the on-disk information to an appropriate in-memory -form. While the TIFF specification permits an arbitrary set of -tags to be defined and used in a file, the library only understands -a limited set of tags. -Any unknown tags that are encountered in a file are ignored. -There is a mechanism to extend the set of tags the library handles -without modifying the library itself; -this is described in Defining New TIFF Tags.

-

libtiff provides two interfaces for getting and setting tag -values: TIFFGetField() and TIFFSetField(). -These routines use a variable argument list-style interface to pass -parameters of different type through a single function interface. -The get interface takes one or more pointers to memory locations -where the tag values are to be returned and also returns one or -zero according to whether the requested tag is defined in the directory. -The set interface takes the tag values either by-reference or -by-value. -The TIFF specification defines -default values for some tags. -To get the value of a tag, or its default value if it is undefined, -the TIFFGetFieldDefaulted() interface may be used.

-

The manual pages for the tag get and set routines specify the exact data types -and calling conventions required for each tag supported by the library.

-
-
-

TIFF Compression Schemes

-

libtiff includes support for a wide variety of -data compression schemes. -In normal operation a compression scheme is automatically used when -the TIFF Compression tag is set, either by opening a file -for reading, or by setting the tag when writing.

-

Compression schemes are implemented by software modules termed codecs -that implement decoder and encoder routines that hook into the -core library i/o support. -Codecs other than those bundled with the library can be registered -for use with the TIFFRegisterCODEC() routine. -This interface can also be used to override the core-library -implementation for a compression scheme.

-
-
-

Byte Order

-

The TIFF specification says, and has always said, that -a correct TIFF -reader must handle images in big-endian and little-endian byte order. -libtiff conforms in this respect. -Consequently there is no means to force a specific -byte order for the data written to a TIFF image file (data is -written in the native order of the host CPU unless appending to -an existing file, in which case it is written in the byte order -specified in the file).

-
-
-

Data Placement

-

The TIFF specification requires that all information except an -8-byte header can be placed anywhere in a file. -In particular, it is perfectly legitimate for directory information -to be written after the image data itself. -Consequently TIFF is inherently not suitable for passing through a -stream-oriented mechanism such as UNIX pipes. -Software that require that data be organized in a file in a particular -order (e.g. directory information before image data) does not -correctly support TIFF. -libtiff provides no mechanism for controlling the placement -of data in a file; image data is typically written before directory -information.

-
-
-

TIFFRGBAImage Support

-

libtiff provides a high-level interface for reading image -data from a TIFF file. This interface handles the details of -data organization and format for a wide variety of TIFF files; -at least the large majority of those files that one would normally -encounter. Image data is, by default, returned as ABGR -pixels packed into 32-bit words (8 bits per sample). Rectangular -rasters can be read or data can be intercepted at an intermediate -level and packed into memory in a format more suitable to the -application. -The library handles all the details of the format of data stored on -disk and, in most cases, if any colorspace conversions are required: -bilevel to RGB, greyscale to RGB, CMYK to RGB, YCbCr to RGB, 16-bit -samples to 8-bit samples, associated/unassociated alpha, etc.

-

There are two ways to read image data using this interface. If -all the data is to be stored in memory and manipulated at once, -then the routine TIFFReadRGBAImage() can be used:

-
#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-        uint32_t w, h;
-        size_t npixels;
-        uint32_t* raster;
-
-        TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
-        TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
-        npixels = w * h;
-        raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t));
-        if (raster != NULL) {
-            if (TIFFReadRGBAImage(tif, w, h, raster, 0)) {
-                ...process raster data...
-            }
-            _TIFFfree(raster);
-        }
-        TIFFClose(tif);
-    }
-    exit(0);
-}
-
-
-

Note above that _TIFFmalloc() is used to allocate memory for -the raster passed to TIFFReadRGBAImage(); this is important -to insure the "appropriate type of memory" is passed on machines -with segmented architectures.

-

Alternatively, TIFFReadRGBAImage() can be replaced with a -more low-level interface that permits an application to have more -control over this reading procedure. The equivalent to the above -is:

-
#include "tiffio.h"
-main(int argc, char* argv[])
-{
-    TIFF* tif = TIFFOpen(argv[1], "r");
-    if (tif) {
-        TIFFRGBAImage img;
-        char emsg[1024];
-
-        if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-            size_t npixels;
-            uint32_t* raster;
-
-            npixels = img.width * img.height;
-            raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t));
-            if (raster != NULL) {
-                if (TIFFRGBAImageGet(&img, raster, img.width, img.height)) {
-                    ...process raster data...
-                }
-                _TIFFfree(raster);
-            }
-            TIFFRGBAImageEnd(&img);
-        } else
-            TIFFError(argv[1], emsg);
-        TIFFClose(tif);
-    }
-    exit(0);
-}
-
-
-

However this usage does not take advantage of the more fine-grained -control that's possible. That is, by using this interface it is -possible to:

-
    -
  • repeatedly fetch (and manipulate) an image without opening -and closing the file

  • -
  • interpose a method for packing raster pixel data according to -application-specific needs (or write the data at all)

  • -
  • interpose methods that handle TIFF formats that are not already -handled by the core library

  • -
-

The first item means that, for example, image viewers that want to -handle multiple files can cache decoding information in order to -speedup the work required to display a TIFF image.

-

The second item is the main reason for this interface. By interposing -a "put method" (the routine that is called to pack pixel data in -the raster) it is possible share the core logic that understands how -to deal with TIFF while packing the resultant pixels in a format that -is optimized for the application. This alternate format might be very -different than the 8-bit per sample ABGR format the library writes by -default. For example, if the application is going to display the image -on an 8-bit colormap display the put routine might take the data and -convert it on-the-fly to the best colormap indices for display.

-

The last item permits an application to extend the library -without modifying the core code. -By overriding the code provided an application might add support -for some esoteric flavor of TIFF that it needs, or it might -substitute a packing routine that is able to do optimizations -using application/environment-specific information.

-

The TIFF image viewer found in tools/sgigt.c is an example -of an application that makes use of the TIFFRGBAImage() -support.

-
-
-

Scanline-based Image I/O

-

The simplest interface provided by libtiff is a -scanline-oriented interface that can be used to read TIFF -images that have their image data organized in strips -(trying to use this interface to read data written in tiles -will produce errors.) -A scanline is a one pixel high row of image data whose width -is the width of the image. -Data is returned packed if the image data is stored with samples -packed together, or as arrays of separate samples if the data -is stored with samples separated. -The major limitation of the scanline-oriented interface, other -than the need to first identify an existing file as having a -suitable organization, is that random access to individual -scanlines can only be provided when data is not stored in a -compressed format, or when the number of rows in a strip -of image data is set to one (RowsPerStrip is one).

-

Two routines are provided for scanline-based i/o: -TIFFReadScanline() -and -TIFFWriteScanline(). -For example, to read the contents of a file that -is assumed to be organized in strips, the following might be used:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        uint32_t imagelength;
-        void *buf;
-        uint32_t row;
-
-        TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
-        buf = _TIFFmalloc(TIFFScanlineSize(tif));
-        for (row = 0; row < imagelength; row++)
-            TIFFReadScanline(tif, buf, row, 0);
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-

TIFFScanlineSize() returns the number of bytes in -a decoded scanline, as returned by TIFFReadScanline(). -Note however that if the file had been create with samples -written in separate planes, then the above code would only -read data that contained the first sample of each pixel; -to handle either case one might use the following instead:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        uint32_t imagelength;
-        void *buf;
-        uint32_t row;
-
-        TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
-        TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config);
-        buf = _TIFFmalloc(TIFFScanlineSize(tif));
-        if (config == PLANARCONFIG_CONTIG) {
-            for (row = 0; row < imagelength; row++)
-                TIFFReadScanline(tif, buf, row, 0);
-        } else if (config == PLANARCONFIG_SEPARATE) {
-            uint16_t s, nsamples;
-
-            TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples);
-            for (s = 0; s < nsamples; s++)
-                for (row = 0; row < imagelength; row++)
-                    TIFFReadScanline(tif, buf, row, s);
-        }
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-

Beware however that if the following code were used instead to -read data in the case PLANARCONFIG_SEPARATE,...

-
for (row = 0; row < imagelength; row++)
-    for (s = 0; s < nsamples; s++)
-        TIFFReadScanline(tif, buf, row, s);
-
-
-

...then problems would arise if RowsPerStrip was not one -because the order in which scanlines are requested would require -random access to data within strips (something that is not supported -by the library when strips are compressed).

-
-
-

Strip-oriented Image I/O

-

The strip-oriented interfaces provided by the library provide -access to entire strips of data. Unlike the scanline-oriented -calls, data can be read or written compressed or uncompressed. -Accessing data at a strip (or tile) level is often desirable -because there are no complications with regard to random access -to data within strips.

-

A simple example of reading an image by strips is:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        void *buf;
-        uint32_t strip;
-
-        buf = _TIFFmalloc(TIFFStripSize(tif));
-        for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++)
-            TIFFReadEncodedStrip(tif, strip, buf, (tmsize_t) -1);
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-

Notice how a strip size of -1 is used; TIFFReadEncodedStrip() -will calculate the appropriate size in this case.

-

The above code reads strips in the order in which the -data is physically stored in the file. If multiple samples -are present and data is stored with PLANARCONFIG_SEPARATE -then all the strips of data holding the first sample will be -read, followed by strips for the second sample, etc.

-

Finally, note that the last strip of data in an image may have fewer -rows in it than specified by the RowsPerStrip tag. A -reader should not assume that each decoded strip contains a full -set of rows in it.

-

The following is an example of how to read raw strips of data from -a file:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        void *buf;
-        uint32_t strip;
-        uint32_t *bc;
-        uint32_t stripsize;
-
-        TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc);
-        stripsize = bc[0];
-        buf = _TIFFmalloc(stripsize);
-        for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) {
-            if (bc[strip] > stripsize) {
-                buf = _TIFFrealloc(buf, bc[strip]);
-                stripsize = bc[strip];
-            }
-            TIFFReadRawStrip(tif, strip, buf, bc[strip]);
-        }
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-

As above the strips are read in the order in which they are -physically stored in the file; this may be different from the -logical ordering expected by an application.

-
-
-

Tile-oriented Image I/O

-

Tiles of data may be read and written in a manner similar to strips. -With this interface, an image is -broken up into a set of rectangular areas that may have dimensions -less than the image width and height. All the tiles -in an image have the same size, and the tile width and length must each -be a multiple of 16 pixels. Tiles are ordered left-to-right and -top-to-bottom in an image. As for scanlines, samples can be packed -contiguously or separately. When separated, all the tiles for a sample -are colocated in the file. That is, all the tiles for sample 0 appear -before the tiles for sample 1, etc.

-

Tiles and strips may also be extended in a z dimension to form -volumes. Data volumes are organized as "slices". That is, all the -data for a slice is colocated. Volumes whose data is organized in -tiles can also have a tile depth so that data can be organized in -cubes.

-

There are actually two interfaces for tiles. -One interface is similar to scanlines, to read a tiled image, -code of the following sort might be used:

-
main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        uint32_t imageWidth, imageLength;
-        uint32_t tileWidth, tileLength;
-        uint32_t x, y;
-        void *buf;
-
-        TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
-        TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);
-        TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tileWidth);
-        TIFFGetField(tif, TIFFTAG_TILELENGTH, &tileLength);
-        buf = _TIFFmalloc(TIFFTileSize(tif));
-        for (y = 0; y < imagelength; y += tilelength)
-            for (x = 0; x < imagewidth; x += tilewidth)
-                TIFFReadTile(tif, buf, x, y, 0);
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-

(once again, we assume samples are packed contiguously.)

-

Alternatively a direct interface to the low-level data is provided -à la strips. Tiles can be read with -TIFFReadEncodedTile() or TIFFReadRawTile(), -and written with TIFFWriteEncodedTile() or -TIFFWriteRawTile(). For example, to read all the tiles in an image:

-
#include "tiffio.h"
-main()
-{
-    TIFF* tif = TIFFOpen("myfile.tif", "r");
-    if (tif) {
-        void *buf;
-        uint32_t tile;
-
-        buf = _TIFFmalloc(TIFFTileSize(tif));
-        for (tile = 0; tile < TIFFNumberOfTiles(tif); tile++)
-            TIFFReadEncodedTile(tif, tile, buf, (tmsize_t) -1);
-        _TIFFfree(buf);
-        TIFFClose(tif);
-    }
-}
-
-
-
-
-

Re-entrancy and Thread Safety

-

Libtiff contains no static state except for the registered error / -warning handler. -All data for an opened TIFF file is encapsulated via the TIFF handle -returned by TIFFOpen(). Only the error handlers -TIFFError() and TIFFErrorExt(), -(as well as TIFFWarning() and TIFFWarningExt()) -use TIFF handle independent, common error handler functions.

-

TIFFErrorHandlerExtR() and TIFFWarningHandlerExtR() -(introduced in libtiff 4.5) offer the option of registering -a separate error handler for each TIFF handle. -This error handler is called via the TIFF handle and is therefore -re-entrant, which means that it is naturally thread-safe.

-

These handlers can already be set before opening a TIFF file using the -TIFFOpenOptionsSetErrorHandlerExtR() and -TIFFOpenOptionsSetWarningHandlerExtR() functions, respectively.

-

This allows multiple TIFF files to be processed simultaneously -with multiple threads, with each thread having its own TIFF file. -It is not possible (safe) to edit a single TIFF file with multiple -threads at the same time.

-
-
-

Multi Page / Multi Image TIFF

-

TIFF images can contain more than one image or page and each image can -have sub-images. Furthermore, additional information about an image -can be put into custom TIFF directories, such as EXIF or GPS. -Writing TIFF files with more than one directory (IFD) is not easy -because some side effects need to be known. -How to read and write multi page TIFF files using libtiff is explained -in Multi Page / Multi Image TIFF. -For custom directories refer to TIFFCustomDirectory.

-
-
-

Other Stuff

-

Some other stuff will almost certainly go here...

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/multi_page.html b/third_party/libtiff/doc/html-prebuilt/multi_page.html deleted file mode 100644 index cf71c63..0000000 --- a/third_party/libtiff/doc/html-prebuilt/multi_page.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - Multi Page / Multi Image TIFF — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Multi Page / Multi Image TIFF

-

There may be more than one Image File Directory (IFD) -in a TIFF file. Each IFD defines a subfile.

-

One potential use of subfiles is to describe related images, -such as the pages of a facsimile transmission or reduced-resolution images -of the first full-resolution image. -Such files are also named "multi-page TIFF" or "multi-image TIFF".

-

There are two mechanisms for storing multiple images in a TIFF file:

-
    -
  1. A main-IFD chain, where the images are stored in linked IFDs (directories). -This mechanism is widely used.

  2. -
  3. A SubIFD chain, where additional images are stored within the SubIFD tag -of a main-IFD. Such child images provide extra information for the parent image -- such as a subsampled version of the parent image. -SubIFD chains are rarely supported. -For SubIFD refer also to -Adobe PageMaker® 6.0 TIFF Technical Notes

  4. -
-
-

Sub IFD chains

-

In the case of several SubIFDs of a main image, there are two possibilities -that are not even mutually exclusive.

-
    -
  1. The SubIFD tag contains an array with all offsets of the SubIFDs. -This is called SubIFD tree and DNG recommends the use of SubIFD trees, -as described in the TIFF-EP specification. SubIFD chains are not supported.

  2. -
  3. The SubIFDs are concatenated with their NextIFD parameters -to a SubIFD chain.

  4. -
-

LibTiff does support SubIFD chains partially. When the first -SubIFD tag is activated and read with TIFFSetSubDirectory(), -the following can be parsed with TIFFReadDirectory(). -The tif_curdir is just incremented from its current value -and thus gets arbitrary values when parsing through SubIFD chains. -When the SubIFDs are not chained, each offset -within the SubIFD array has to be activated and read individually. -TIFFSetDirectory() only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain.

-
-
-

Writing Multi Page TIFF

-

The following example code shows how to write multi-page TIFF -as main-IFD chain and as SubIFD chain. -libtiff writes SubIFDs as an array of IFDs that are not chained -additionally, as Adobe PageMaker® 6.0 TIFF Technical Notes suggests.

-
#include <tiffio.h>
-
-int main(int argc, const char **argv)
-{
-    TIFF *tiff;
-
-    /* Define the number of pages/images (main-IFDs) you are going to write */
-    int number_of_images = 3;
-
-/* Define the number of sub - IFDs you are going to write */
-#define NUMBER_OF_SUBIFDs 2
-    int number_of_sub_IFDs = NUMBER_OF_SUBIFDs;
-    toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = {
-        0UL}; /* array for SubIFD tag */
-    int blnWriteSubIFD = 0;
-
-    if (!(tiff = TIFFOpen("multiPageTiff2.tif", "w")))
-        return 1;
-
-    for (int i = 0; i < number_of_images; i++)
-    {
-        char pixel[1] = {128};
-
-        TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1);
-        TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1);
-        TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1);
-        TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8);
-        TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-
-        /* For the last but one multi-page image, add a SubIFD e.g. for a
-        * thumbnail */
-        if (number_of_images - 2 == i)
-            blnWriteSubIFD = 1;
-
-        if (blnWriteSubIFD)
-        {
-           /* Now here is the trick: the next n directories written
-            * will be sub-IFDs of the main-IFD (where n is number_of_sub_IFDs
-            * specified when you set the TIFFTAG_SUBIFD field.
-            * The SubIFD offset array sub_IFDs_offsets is filled automatically
-            * with the proper offset values by the following number_of_sub_IFDs
-            * TIFFWriteDirectory() calls and updated in the related main-IFD
-            * with the last call.
-            */
-            if (!TIFFSetField(tiff, TIFFTAG_SUBIFD, number_of_sub_IFDs,
-                              sub_IFDs_offsets))
-                return 1;
-        }
-
-        /* Write dummy pixel to image */
-        if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0)
-            return 1;
-        /* Write image / directory to file */
-        if (!TIFFWriteDirectory(tiff))
-            return 1;
-
-        if (blnWriteSubIFD)
-        {
-           /* A SubIFD tag has been written for that main-IFD and this
-            * triggers that previous TIFFWriteDirectory() to switch to the
-            * SubIFD-chain for the next number_of_sub_IFDs writings.
-            * Thus, only the thumbnail images need to be
-            * set up and written to file using TIFFWriteDirectory().
-            * The last of this TIFFWriteDirectory() calls will setup
-            * the next fresh main-IFD.
-            */
-            for (int i = 0; i < number_of_sub_IFDs; i++)
-            {
-                TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1);
-                TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1);
-                TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1);
-                TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8);
-                TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-                /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a
-                * good idea to indicate thumbnails */
-                if (!TIFFSetField(tiff, TIFFTAG_SUBFILETYPE,
-                                  FILETYPE_REDUCEDIMAGE))
-                    return 1;
-
-                /* Write dummy pixel to thumbnail image */
-                pixel[0] = 64;
-                if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0)
-                    return 1;
-                /* Writes now in the SubIFD chain */
-                if (!TIFFWriteDirectory(tiff))
-                    return 1;
-
-                blnWriteSubIFD = 0;
-            }
-        }
-    }
-    TIFFClose(tiff);
-    return 0;
-  }
-
-
-
-
-

Reading Multi Page TIFF

-

For a reading example see code of tools/tiffinfo.c or below:

-
/* Reading of multi-page and SubIFD images (subfiles) */
-if (!(tiff = TIFFOpen(filename, "r")))
-    return 1;
-
-tdir_t currentDirNumber = TIFFCurrentDirectory(tiff);
-
-/* The first directory is already read through TIFFOpen() */
-int blnRead = 0;
-do
-{
-    /*Check if there are SubIFD subfiles */
-    void *ptr;
-    if (TIFFGetField(tiff, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr))
-    {
-        /* Copy SubIFD array from pointer */
-        memcpy(sub_IFDs_offsets, ptr,
-               number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0]));
-
-        for (int i = 0; i < number_of_sub_IFDs; i++)
-        {
-            /* Read first SubIFD directory */
-            if (!TIFFSetSubDirectory(tiff, sub_IFDs_offsets[i]))
-                return 1;
-            /* Check if there is a SubIFD chain behind the first one from
-             * the array, as specified by Adobe */
-            while (TIFFReadDirectory(tiff))
-                /* analyse subfile */
-                ;
-        }
-        /* Go back to main-IFD chain and re-read that main-IFD directory */
-        if (!TIFFSetDirectory(tiff, currentDirNumber))
-            return 1;
-    }
-    /* Read next main-IFD directory (subfile) */
-    blnRead = TIFFReadDirectory(tiff);
-    currentDirNumber = TIFFCurrentDirectory(tiff);
-} while (blnRead);
-TIFFClose(tiff);
-
-
-
-
-

See also

-

Terminology, -TIFFSetDirectory (3tiff), -TIFFWriteDirectory (3tiff), -Adobe PageMaker® 6.0 TIFF Technical Notes, -Example from StackOverflow

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/objects.inv b/third_party/libtiff/doc/html-prebuilt/objects.inv deleted file mode 100644 index 2f9b787aaf3d846193af38140dadc072737bddf6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9148 zcmZ8`bx<5Y^X1~f2`)i`J1i0iPH=a34Q`9O1cEzZafe{RHOL~nK(OHM?(TN^e&1bP z-TgH^(^EA)(_Qu6>!G32aIvv<@}{zN^0abtcXsok^0aaT**ZH>aiP&rsk%AaSy{LX zP$}A)YsyJW|69`juUmkMhn?@=RMWtIFoZ?tfB zbaAr+fvha4JV3TiU#WZ@Y|YuxyceN42B0PW`hm3@CQaU_+Ok7g?jJe*xh?bY!k_IE z8h+q?-Gxf2CHA8_OQw)X}eqqp(jbwpfcU~q-EU?kLeXuH4P zfawWK-p%b%N^nfcdD4i=TjnIcEZ>07s(jPn2}=>mYC3stbJF|lFYuaumVHPXM&BL> z^0u=_9ryU$#g{#Z?q@!oV=qBO9TCWvAZd>4^UXA>UL!BJ>ko=LNA*Ho8V7cLK8J{P zYil@?@2*)9lms|Iiw#nr#Ny~mRZ;4G=3m|ysmDIMK*>V-R~X3|I@8d{gk zCL*BTfGRw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| r%N* - - - - - - - Acknowledgments — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Acknowledgments

-ring -
-

Maintainers

-

The LibTIFF software was written by Sam Leffler while working for -Silicon Graphics.

-

Silicon Graphics has seen fit to allow us to give this work away. It -is free. There is no support or guarantee of any sort as to its -operations, correctness, or whatever. If you do anything useful with -all or parts of it you need to honor the copyright notices. It would -also be nice to be acknowledged.

-

LibTIFF as been maintained by cast of others since 1999.

-

The persons currently actively maintaining and releasing libtiff are:

- -

Significant maintainers in the past (since the 3.5.1 release) were:

- -
-
-

Contributors

-

The LZW algorithm is derived from the compress program (the proper attribution -is included in the source code).

-

The Group 3 fax stuff originated as code from Jef Poskanzer, but has since -been rewritten several times. The latest version uses an algorithm from -Frank Cringle -- consult libtiff/mkg3states.c and -libtiff/tif_fax3.h for further information.

-

The JPEG support was written by Tom Lane and is dependent on the -excellent work of Tom Lane and the Independent JPEG Group (IJG) who distribute -their work under friendly licensing similar to this software. Joris Van Damme -implemented the robust Old JPEG decoder (as included in libtiff since version -3.9.0, there was another Old JPEG module in older releases, which was -incomplete and unsuitable for many existing images of that format).

-

JBIG module was written by Lee Howard and depends on JBIG library from the Markus -Kuhn.

-

Many other people have by now helped with bug fixes and code; a few of -the more persistent contributors have been:

- - --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Contributors

Bjorn P. Brox

Dan McCoy

J.T. Conklin

Richard Minner

Frank D. Cringle

Richard Mlynarik

Soren Pingel Dalsgaard

Niles Ritter

Steve Johnson

Karsten Spang

Tom Lane

Peter Smith

Brent Roman

Mike Welles

Frank Warmerdam

Greg Ward

Stanislav Brabec

Roman Shpount

Peter Skarpetis

Arvan Pritchard

Bernt Herd

Joseph Orost

Phil Beffery

Ivo Penzar

Francois Dagand

Albert Chin-A-Young

Bruce A. Mallett

Dwight Kelly

Andrey Kiselev

Ross Finlayson

Dmitry V. Levin

Bob Friesenhahn

Lee Howard

Joris Van Damme

Tavis Ormandy

Richard Nolde

Even Rouault

Roger Leigh

-

(apologies to anyone that was inadvertently not listed.)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/project/bugs.html b/third_party/libtiff/doc/html-prebuilt/project/bugs.html deleted file mode 100644 index 8b83b23..0000000 --- a/third_party/libtiff/doc/html-prebuilt/project/bugs.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - Reporting Bugs — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Reporting Bugs

-cover -
-

Overview

-

The LibTIFF project uses GitLab issues -to report and manage bugs and feature requests.

-

Please let us know when you find a problem or fix a bug.

-

Previously, the project used -MapTools.org bugzilla -to track bugs. All remaining tickets in that bugzilla instance were -migrated to GitLab issues, and this system should no longer be used. -All bugs filed in a older bugzilla at -'RemoteSensing.org (bugzilla.remotesensing.org)' (pre-April 2008) -have unfortunately been lost.

-
-
-

Reporting a bug

-

If you think you've discovered a bug, please first check to see if it is -already known by looking at the list of already reported bugs. Also, please -verify that the problem is still reproducible with the current development -software from GitLab.

-

If you'd like to enter a new bug report, you can create a -new GitLab issue

-

Of course, reporting bugs is no substitute for discussion. -Please see the Mailing List page for further details.

-
-
-

Reporting a security issue

-

If you'd like to inform us about some kind of security issue that should not -be disclosed for a period of time, then you can contact the maintainers directly. -Send a copies of your report to the following people:

- -
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/project/index.html b/third_party/libtiff/doc/html-prebuilt/project/index.html deleted file mode 100644 index 0112836..0000000 --- a/third_party/libtiff/doc/html-prebuilt/project/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - LibTIFF Project — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

LibTIFF Project

-

The LibTIFF project provides free software maintained by a small community of software developers. See -Acknowledgments for further details.

-

Questions should be sent to the Mailing List.

-
-

Note

-

Please do not email the maintainers personally, especially when asking -questions such as "when is the next release?". Please use the public mailing lists. -While the maintainers and contributors to LibTIFF are primarily professional software -developers, none of us are paid to work on LibTIFF directly, and almost all the -activity is voluntary and unpaid.

-
- -
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/project/license.html b/third_party/libtiff/doc/html-prebuilt/project/license.html deleted file mode 100644 index c66ab90..0000000 --- a/third_party/libtiff/doc/html-prebuilt/project/license.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - LibTIFF License — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

LibTIFF License

-
-
Copyright © 1988-1997 Sam Leffler
-
Copyright © 1991-1997 Silicon Graphics, Inc.
-
-

Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics.

-

THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

-

IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/project/mailinglist.html b/third_party/libtiff/doc/html-prebuilt/project/mailinglist.html deleted file mode 100644 index 45a4a4a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/project/mailinglist.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - Mailing List — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Mailing List

-
-

Overview

-

The tiff@lists.osgeo.org mailing list is for users of the LibTIFF software, and -discussion TIFF issues in general.

-
-
-

Subscription

-

The mailing list managed with the Mailman software, and the web interface for subscribing -and managing your access to the list is at: http://lists.osgeo.org/mailman/listinfo/tiff/

-

Posts to the list are only accepted from members of the list.

-
-
-

Archive

-

A Long Term Archive -including most messages from April 2024 back to 1993 has been archived in a text file archive -that can be download: TML.zip -or TML.tar.xz.

-

There is no archive for the mailing list messages anymore.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/project/psc.html b/third_party/libtiff/doc/html-prebuilt/project/psc.html deleted file mode 100644 index de69236..0000000 --- a/third_party/libtiff/doc/html-prebuilt/project/psc.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - Project Steering Committee — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Project Steering Committee

-

As of April 2024, the project has been placed in the hands of a Project Steering Committee. This project steering committee operates under the rules of RFC 1: Project Steering Committee Guidelines, and is overall responsible for decisions related to the libtiff project. The current members are:

-
    -
  • Bob Friesenhahn (@bobfriesenhahn)

  • -
  • Su Laus (@Su_Laus)

  • -
  • Roger Leigh (@rleigh)

  • -
  • Timothy Lyanguzov (@theta682)

  • -
  • Olivier Paquet (@1-Olivier)

  • -
  • Leonard Rosenthol (@lrosenthol)

  • -
  • Even Rouault (@rouault)

  • -
-

Note that discussion of proposals to the PSC take place on the libtiff mailing list -(tiff@lists.osgeo.org, requiring subscription at https://lists.osgeo.org/mailman/listinfo/tiff), -and input from all subscribers is welcome. A list of past Request For Comments (RFCs) is available for review.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/historical.html b/third_party/libtiff/doc/html-prebuilt/releases/historical.html deleted file mode 100644 index faf80de..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/historical.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - Old release history — LibTIFF 4.7.1 documentation - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/index.html b/third_party/libtiff/doc/html-prebuilt/releases/index.html deleted file mode 100644 index 42e8e7e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/index.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - Release history — LibTIFF 4.7.1 documentation - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta007.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta007.html deleted file mode 100644 index 086bbe7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta007.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta016 — LibTIFF 4.7.1 documentation - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta016

- - - - - - - - - - - - - -
References

Current Version

v3.4beta016 (no release tag)

Previous Version

v3.4beta004 (no references to earlier releases exist)

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • bit order was corrected for Pentium systems

  • -
  • a new define, HOST_BIGENDIAN, was added for code that -wants to statically use information about native cpu byte order

  • -
-
-
-

Library changes

-
    -
  • the G3/G4 decoder was replaced by a new one that is faster and -has smaller state tables

  • -
  • Niles Ritter's client tag extension hooks were added

  • -
  • a new routine TIFFCurrentDirOffset() was added for -applications that want to find out the file offset of a TIFF directory

  • -
  • the calculation of the number of strips in an image was corrected -for images with certain esoteric configurations

  • -
  • a potential memory leak (very unlikely) was plugged

  • -
  • the TIFFReadRGBAImage support was completely rewritten -and new, more flexible support was added for reading images into -a fixed-format raster

  • -
  • YCbCr to RGB conversion done in the TIFFReadRGBAImage() support -was optimized

  • -
  • a bug in JPEG support calculation of strip size was corrected

  • -
  • the LZW decoder was changed to initialize the code table to zero -to lessen potential problems that arise when invalid data is decoded

  • -
  • tiffcomp.h() is now aware of OS/2

  • -
  • some function prototypes in tiffio.h and tiffiop.h -that contained parameter names have been changed to avoid complaints -from certain compilers

  • -
-
-
-

Portability support changes

-
    -
  • Makefile.in has been corrected to use the parameters -chosen by the configure script

  • -
-
-
-

Tools changes

-
    -
  • fax2ps has been rewritten and moved over from the user -contributed software

  • -
  • an uninitialized variable in pal2rgb has been fixed

  • -
  • ras2tiff now converts 24-bit RGB raster data so that -samples are written in the proper order

  • -
  • tiff2ps has been updated to include fixes -and enhancements from Alberto Accomazzi

  • -
  • tiffcp now has a "-o" option to select a directory -by file offset

  • -
  • tiffinfo is now capable of displaying the raw undecoded -image data in a file

  • -
  • tiffgt has been rewritten to use the new TIFFRGBAImage -support and to handle multiple files

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta016.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta016.html deleted file mode 100644 index ab37bd7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta016.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta016 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta016

- - - - - - - - - - - - - -
References

Current Version

v3.4beta016 (no release tag)

Previous Version

v3.4beta007

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • support was added for configuring the Deflate codec

  • -
  • support was added for the HTML documentation

  • -
  • codecs that are not configured for inclusion in the library -are no longer compiled

  • -
-
-
-

Library changes

-
    -
  • support was added for registering new codecs external to the library -and for overriding the codecs that are builtin to the library

  • -
  • emulation support for the old DataType tag was improved

  • -
  • support was added for the SMinSampleValue -and SMaxSampleValue tags

  • -
  • the library no longer ignores TileWidth and TileLength -tags whose values are not a multiple of 16 (per the spec); this -permits old, improperly written, images to be read

  • -
  • the support for the Predictor tag was placed in a reusable -module so that it can be shared by multiple codecs

  • -
  • experimental compression support was added for the Deflate algorithm -(using the freely available zlib package)

  • -
  • a new routine, TIFFWriteBufferSetup() was added à la the -routine TIFFReadBufferSetup()

  • -
  • the DSO version of the library is now statically linked with the -JPEG and Deflate libraries; this means applications that link against -the DSO do not also need to link against these ancillary libraries

  • -
-
-
-

Tools changes

-
    -
  • all the tools now use common code to process compress-oriented arguments

  • -
  • tiffdump should now compile on a Macintosh with MPW

  • -
-
-
-

Documentation changes

-
    -
  • everything was updated

  • -
-
-
-

Contributed software changes

-
    -
  • contrib/dbs/xtiff was made to compile

  • -
  • contrib/mac-mpw is new support for compiling the software on -a Macintosh under MPW

  • -
  • contrib/tags is information on how to use the tag extension -facilities; consult contrib/tags/README for details

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta018.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta018.html deleted file mode 100644 index cb8a92a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta018.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta018 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta018

- - - - - - - - - - - - - -
References

Current Version

v3.4beta018 (no release tag)

Previous Version

v3.4beta016

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • configure now recognizes IRIX 6.x systems

  • -
  • configure now uses ENVOPTS when searching for an ANSI -C compiler; this fixes a problem configuring the software under -HP/UX with the native C compiler

  • -
  • configure now correctly recognizes memory-mapped files are supported -under AIX

  • -
-
-
-

Library changes

-
    -
  • make install now properly installs the include files

  • -
  • some portability fixes from Bjorn Brox

  • -
  • the G3/G4 codec now warns about decoded rows that are longer than -the image/tile width

  • -
  • changes from Frank Cringle to make the library work with the -gcc-specific bounds checking software

  • -
  • miscellaneous fixes to TIFFPrintDirectory()

  • -
  • bug fix to correct a problem where TIFFWriteRawStrip() -could not be used to automatically grow an image's length

  • -
-
-
-

Tools changes

-
    -
  • fixes from Frank Cringle to update fax2tiff

  • -
  • portability fixes to tiff2bw and tiffcmp

  • -
  • tiffdump now uses the byte swapping routines in the library

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta024.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta024.html deleted file mode 100644 index aec8cbb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta024.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta024 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta024

- - - - - - - - - - - - - -
References

Current Version

v3.4beta024 (no release tag)

Previous Version

v3.4beta018

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • It is now possible to setup the software to build only the -library; configure recognizes this is the intent when the -VERSION, tiff.alpha, and tif_version.c -files are in the local directory (i.e. .)

  • -
  • configure no longer tries to setup HTML materials

  • -
  • include file directories needed in building the library are now -specified with a DIRS_LIBINC config parameter

  • -
  • configure no longer checks for alternate compilers if CC -is set; if the specified compiler is not found or is not appropriate -the configuration procedure aborts

  • -
  • the port.h file generated by configure is now used only by -the library and as such as have been moved to the libtiff -directory

  • -
  • there is beginning support for building DSO's on systems other than IRIX

  • -
  • configure now verifies the JPEG and zlib directory pathnames by -checking for well-known include files in these directories

  • -
  • configure no longer creates the dist directory needed only -on SGI machines (for building SGI binary distributions)

  • -
  • a bug was fixed whereby configure would incorrectly set -ENVOPTS when building the software with gcc under AIX

  • -
-
-
-

Library changes

-
    -
  • two new typedefs were added to tiff.h: int8 -and uint8 for signed and unsigned 8-bit quantities, -respectively; these are currently used only by -programs in the tools directory

  • -
  • the BadFaxLines, CleanFaxData, and -ConsecutiveBadFaxLines tags are now supported with -Group 4 compression

  • -
  • byte order is now correctly identified on 64-bit machines

  • -
  • a bug was fixed in the PackBits decoder where input data would -appear short when a no-op run was present

  • -
  • a bug was fixed in calculations with very wide strips

  • -
  • TIFFWriteEncodedStrip() and TIFFWriteRawStrip() -were extended to support dynamically growing the number of -strips in an image (must set ImageLength prior to -making calls though)

  • -
  • TIFFDefaultTileSize() now rounds tile width and height -up to a multiple of 16 pixels, as required by the TIFF 6.0 specification

  • -
  • the file version.h is now built by a new mkversion -program; this was done for portability to non-UNIX systems

  • -
  • support was added for the Acorn RISC OS (from Peter Greenham)

  • -
  • the builtin codec table is now made const when compiling -under VMS so that libtiff can be built as a shared library

  • -
  • support for the PowerPC Mac (from Ruedi Boesch)

  • -
  • support for Windows NT/Windows 95 (from Scott Wagner)

  • -
-
-
-

Tools changes

-
    -
  • the tools no longer include port.h

  • -
  • various portability fixes; mostly to eliminate implicit assumptions -about how long int32 data types are

  • -
  • PostScript Level II additions to tiff2ps from Bjorn Brox

  • -
  • sgi2tiff now handles RGBA images

  • -
-
-
-

Documentation changes

-
    -
  • the documentation has been updated to reflect the current state of -the software

  • -
  • some routines have been moved to different manual pages -to group like-routines together

  • -
-
-
-

Contributed software changes

-
    -
  • support was added for the Acorn RISC OS (from Peter Greenham)

  • -
  • support for Windows NT/Windows 95 contributed for a previous -version of this software was sort of incorporated (it's broken -right now) (from Scott Wagner)

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta028.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta028.html deleted file mode 100644 index fdb0ad4..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta028.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta028 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta028

- - - - - - - - - - - - - -
References

Current Version

v3.4beta028 (no release tag)

Previous Version

v3.4beta024

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • a "-noninteractive" flag was added to configure to -control whether or not it prints and prompts for configuration information

  • -
  • various typos and fixes were made in configure for the the -library-only build support (this and other configure fixes from -Richard Mlynarik)

  • -
  • bugs were fixed in the handling of pathnames supplied for external -packages; e.g. DIR_JPEG

  • -
  • the handling of SETMAKE is now done properly

  • -
  • the default prototype function declaration for pow() was corrected

  • -
  • a bug was fixed in libtiff/Makefile.in that caused installation -to fail on systems without DSO support

  • -
-
-
-

Library changes

-
    -
  • Acorn RISC O/S support that was accidentally left out of the -left out of the previous distribution is present (from Peter Greenham)

  • -
  • complaints about unknown and/or unsupported codecs have been -delayed until they are invoked; this permits applications to open -images and look at tags even if the image data is compressed with -an unknown/unsupported compression scheme

  • -
  • bugs in handling unknown tags have been corrected; applications -that use multiple codecs, each with codec-specific tags, no longer -generate confusing error messages

  • -
  • a missing pseudo-tag definition in the CCITT G3 codec was fixed -(this problem caused core dumps in the tiffcp program)

  • -
  • pseudo-tags are now treated specially; they are always considered -to be set (i.e. they do not use bits in the FIELD_* bit-vectors).

  • -
  • the use of strip chopping can now be controlled on a per-file basis -through a mode parameter supplied when opening a file ("C" to -enable strip chopping and "c" to disable)

  • -
  • two bugs were fixed in the writing of opposite-endian byte-order -files

  • -
  • support was added for three new fax-related tags registered to -SGI: FaxRecvParams, FaxRecvTime, and FaxSubAddress

  • -
  • the bit order of image data read and written can now be controlled -on a per-file basis through a mode parameter supplied when opening -a file ("B" to force MSB2LSB bit order, "L" for LSB2MSB bit -order, and "H" for the bit order of the native CPU)

  • -
  • the byte order of image and tag data written to newly-created files -can now be controlled on a per-file basis through a mode parameter -supplied when opening a file ("b" to force Big-Endian byte order -and "l" to force Little-Endian byte order)

  • -
  • the use memory-mapped files for images opened read-only can now -be controlled on a per-file basis through a mode parameter supplied -when opening a file ("M" to enable use of memory-mapped files -and "m" to disable use)

  • -
  • the use of the WIN32 define in tiffiop.h has -been replaced by __WIN32__

  • -
-
-
-

Tools changes

-
    -
  • fax2ps now does a save and restore -around each page of PostScript; this fixes a problem with VM -overflow when printing a many-page document on some printers

  • -
  • a bug in the handling of 3-channel images by ras2tiff -was fixed

  • -
  • tiffcp has new options to control the byte order of -newly created files: "-B" for Big-Endian byte order, "-L" -for Little-Endian byte order; a "-M" option to disable the -use of memory-mapped files, and a "-C" option to disable the -use of strip chopping

  • -
  • bugs were fixed in tiffcp handling of codec-specific tags

  • -
-
-
-

Documentation changes

-
    -
  • the TIFFOpen() page has been updated to reflect the new -optional open mode parameters

  • -
-
-
-

Contributed software changes

-
    -
  • contrib/win95 contains information and code from Philippe Tenenhaus -about using the software under Windows 95

  • -
  • contrib/winnt contains information and code from Dave Dyer -about using the software under Windows NT

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta029.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta029.html deleted file mode 100644 index b0d5e96..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta029.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta029 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta029

- - - - - - - - - - - - - -
References

Current Version

v3.4beta029 (no release tag)

Previous Version

v3.4beta028

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • configure now relativizes pathname references given in -"-L" options (as frequently specified when configuring -ancillary packages)

  • -
  • problems related to configuring the software on Ultrix 4.4 have -been corrected

  • -
  • the shell to use in Makefiles and scripts can now be set with the -SCRIPT_SH configuration parameter

  • -
  • comments in config.site now correctly indicate how to setup the -use of ancillary packages

  • -
-
-
-

Library changes

-
    -
  • mods for building the software on a Mac using the -MetroWerks CodeWarrior compilers

  • -
  • a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in -a strip/tile might not be decoded; this was seen only when decoding -multi-strip images

  • -
  • a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not -being properly registered

  • -
-
-
-

Contributed software changes

-
    -
  • contrib/mac-cw contains information and code from Niles Ritter -about building the software with the MetroWerks CodeWarrior compilers -on Macintosh systems

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta031.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta031.html deleted file mode 100644 index ffdd1cb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta031.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta031 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta031

- - - - - - - - - - - - - -
References

Current Version

v3.4beta031 (no release tag)

Previous Version

v3.4beta029

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • configure now captures significantly more information -in the config.log file and provides more information when -it is unable to setup a configuration

  • -
  • support was added for building shared libraries on more systems: -AIX, HPUX, Solaris, and Linux.

  • -
  • a new configuration parameter LIBCOPTS was added for -passing arguments to the C compiler to use when building only -the library; this is part of the enhanced support for building -shared libraries

  • -
  • include files for optional packages that reside in /usr/include -are now handled correctly

  • -
  • build trees may now be configured using either relative or absolute -pathnames to the source distribution

  • -
  • several new configuration parameters were added, mainly for building -shared libraries: DIST_MAJOR, DIST_MINOR, -DIST_ALPHA, and DSOSUF_VERSION

  • -
-
-
-

Library changes

-
    -
  • the Deflate support has been revised: it requires version 0.99 of -the zlib software distribution, the output format has changed and -is incompatible with previous versions of this library (each -strip now includes a header read and written by the zlib library)

  • -
  • the codec name printed by the TIFFPrintDirectory() routine is now -taken from the codec table instead of from a builtin table; this means -that application-defined codecs are handled correctly

  • -
  • a new symbol was added that contains the library version number; -this can be used to do a compile-time compatibility check of the -library version

  • -
-
-
-

Documentation changes

-
    -
  • the creation and installation of manual pages was redone; it now -implements the documented "configuration scheme"

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta032.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta032.html deleted file mode 100644 index b9f0205..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta032.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta032 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta032

- - - - - - - - - - - - - -
References

Current Version

v3.4beta032 (no release tag)

Previous Version

v3.4beta031

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • various fixups and subtle improvements to configure -from Richard Mlynarik

  • -
-
-
-

Library changes

-
    -
  • a new codec from Pixar designed for high-resolution color images; -note that this codec is not configured by default

  • -
  • a bug fix for reading tags with a single FLOAT value

  • -
  • change to the TIFFGetField() calling convention: -a tag that has a single value of -type DOUBLE is now retrieved by passing a -double* instead of a -double** (this change makes the handling of tags with -DOUBLE values identical to the handling of tags with -FLOAT values)

  • -
  • fix to VMS support for the handling of floating point values

  • -
-
-
-

Tools changes

-
    -
  • tiffdump now handles tags with FLOAT and DOUBLE -values

  • -
-
-
-

Contributed software changes

-
    -
  • updates to the Acorn OS support from Peter Greenham

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta033.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta033.html deleted file mode 100644 index 9d27f3a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta033.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta033 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta033

- - - - - - - - - - - - - -
References

Current Version

v3.4beta033 (aka the v3.4 release) (no release tag)

Previous Version

v3.4beta032

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • support was added for building the library as a DSO under OSF/1

  • -
-
-
-

Library changes

-
    -
  • fixes to the Pixar codec

  • -
  • portability mods for VMS

  • -
-
-
-

Tools changes

-
    -
  • fixes to gif2tiff and ppm2tiff for building under MS/DOS

  • -
  • portability mods to fax2ps and ycbcr for VMS

  • -
-
-
-

Contributed software changes

-
    -
  • a new package from Alexander Lehmann -for building the library and tools under MS/DOS with DJGPP v2

  • -
  • updated VMS support from Karsten Spang

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta034.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta034.html deleted file mode 100644 index 870f7be..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta034.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta034 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta034

- - - - - - - - - - - - - -
References

Current Version

v3.4beta034 (no release tag)

Previous Version

v3.4beta033

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • support was added for building the library as a DSO under NetBSD

  • -
  • a bug was fixed in the DSO support for Linux

  • -
  • the handling of version strings has changed slightly to simplify parsing

  • -
  • a new parameter, TIFFLIBREF, was added to control how the -library is referenced when linking programs in the tools directory

  • -
-
-
-

Library changes

-
    -
  • DSO creation under Solaris now forces the DSO name with a -h option

  • -
  • the interface to the mkversion program was changed -to eliminate the need to parse files

  • -
  • a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder

  • -
  • ANSI IT8 TIFF/IT tag definitions were added to tiff.h

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta035.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta035.html deleted file mode 100644 index 8934dc8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta035.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta035 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta035

- - - - - - - - - - - - - -
References

Current Version

v3.4beta035 (no release tag)

Previous Version

v3.4beta034

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • support was added installing the HTML documentation

  • -
  • support was added for building the library as a DSO under FreeBSD

  • -
-
-
-

Library changes

-
    -
  • the interface to the mkversion program was restored to -the form used prior to v3.4beta034

  • -
  • several portability problems for 16-bit systems were fixed

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta036.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta036.html deleted file mode 100644 index e866753..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.4beta036.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - Changes in TIFF v3.4beta036 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.4beta036

- - - - - - - - - - - - - -
References

Current Version

v3.4beta036 (no release tag)

Previous Version

v3.4beta035

Master Download Site

ftp://ftp.sgi.com/graphics/tiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • support was added for building the library as a DSO under HP-UX with -the native C compiler

  • -
  • tools are now built with explicit pathnames for the DSO under IRIX, -Solaris, and Linux

  • -
  • DSO configuration support for Linux was changed to require that -libc.so only be readable (not executable)

  • -
-
-
-

Library changes

-
    -
  • support was add for ICC: NumberOfInks, and ICCProfile

  • -
  • a memory leak caused by doing TIFFSetDirectory(0) was fixed

  • -
  • a bug was fixed whereby certain multi-directory files were not -properly handled when accessed by mapping the data into memory

  • -
  • the strip chopping support is now always compiled -into the library with the default usage controlled by a -STRIPCHOP_DEFAULT configuration parameter

  • -
  • the strip chopping support no longer chops tiled images

  • -
  • all static strings are now const---for shared libraries

  • -
  • the logic for estimating the strip size of images without -StripByteCounts tag was improved by handling -PlanarContig images differently from PlanarSeparate

  • -
  • a bug was fixed in the G3 codec when converting the Y resolution -of data specified in metric units

  • -
  • a bug was fixed in the G3/G4 decoder for data where lines terminate -with a v0 code

  • -
  • the TIFFRGBAImage support was changed to scale 16-bit colormap -entries more conservatively to avoid problems with applications -that do not generate fully saturated pixel values

  • -
  • the LZW decoder was changed to use a more conservative scheme when -bounds checking the hash table array; this avoids pitfalls with -systems that load objects into memory in unusual locations

  • -
  • a bug was fixed in TIFFPrintDirectory() handling of the -InkNames tag

  • -
  • TIFFPrintDirectory() now understands NumberOfInks -and ICC-related tags

  • -
  • the routines for reading image data now provide more useful information -when a read error is encountered

  • -
  • support was added for compiling with Microsoft Visual C++ 4.0

  • -
-
-
-

Tools changes

-
    -
  • a bug was fixed in pal2rgb colormap handling

  • -
  • tiff2ps:

    -
      -
    • now includes John Wehle's changes for maintaining -the aspect ratio of images when scaling and for honoring the deadzone -on a page when generating PostScript Level II

    • -
    • does a better job guarding against the mishandling -of greyscale images

    • -
    • now correctly converts X- and Y-resolution values -specified in metric units

    • -
    -
  • -
  • tiffdump:

    -
      -
    • has a new "-m" option to control the maximum number of indirect -data values printed for a tag (by default 24)

    • -
    • understands several new tags

    • -
    • now shows any terminating null in ASCII strings

    • -
    -
  • -
  • tiffinfo now suppresses strip chopping when interpreting an image; -a new "-z" option has been added to enable strip chopping

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.1.html deleted file mode 100644 index b1073cd..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.1.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.1

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.1 (no release tag)

Previous Version

v3.4beta037 (missing release notes, go to v3.4beta036)

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-

None.

-
-
-

Library changes

-
    -
  • Support was added for IPTC Newsphoto metadata (TIFFTAG_IPTCNEWSPHOTO)

  • -
  • Support was added for photoshop caption handling (TIFFTAG_PHOTOSHOP)

  • -
-
-
-

Contributed software changes

-
    -
  • Bill Radcliffe's iptcutil was -added to the contrib subdirectory . It can convert an IPTC binary -blob to ASCII text and vice-versa. The blob itself can be extracted -from or added to an image with the ImageMagick -convert (1) utility.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.2.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.2.html deleted file mode 100644 index 892097e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.2

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.2 (no release tag)

Previous Version

v3.5.1

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • Corrected alpha versioning.

  • -
  • Removed distinction between alpha and release targets in Makefile.in.

  • -
  • Added release.stamp target, which tags cvs tree, and updates -RELEASE-DATE

  • -
  • Added releasediff target, which diffs tree with source as of -date in RELEASE-DATE

  • -
  • Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving -away from alpha/non-alpha distinctions).

  • -
-
-
-

Library changes

-
    -
  • Added IRIX/gcc, and OSF/1 4.x support on behalf of -Albert Chin-A-Young.

  • -
  • Added TIFFReassignTagToIgnore() API on behalf of -Bruce Cameron. Man page still pending.

  • -
  • pre-remove so link before softlink in LINUXdso action in -libtiff/Makefile.in to avoid failure on LINUXdso builds other than -the first.

  • -
  • Fixed problem with cvtcmap() in tif_getimage.c modifying the -colormaps owned by the TIFF handle itself when trying to fixup wrong -(eight bit) colormaps. Corrected by maintaining a private copy of -the colormap.

  • -
  • Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in -tif_getimage.c.

  • -
  • Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested -by Christopher Lawton.

  • -
  • Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.

  • -
  • Added CYGWIN case in configure.

  • -
  • Applied Francois Dagand's patch to handle fax decompression bug. -(sizes >= 65536 were failing)

  • -
-
-
-

Contributed software changes

-
    -
  • Added addtiffo (add overviews to a TIFF file) in contrib. Didn't -put it in tools since part of it is in C++.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.3.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.3.html deleted file mode 100644 index c0f6e12..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.3.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.3 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.3

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.3 (tag Release-v3-5-3)

Previous Version

v3.5.2

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-

Please note the most important change: LZW compression has been removed.

-

Unisys has the patent on LZW compression and have been very active in -their enforcement of late, demanding payments of $5000 or more from -websites using unlicensed software to create GIF's. They could well -do the same do persons using libtiff to create LZW compressed TIFF -images.

-

From Burn All GIF's Day:

-
-

The catch is that it appears to be difficult or impossible to get a -Unisys license to use LZW in free software that complies with the Open -Source Definition

-
-

Unfortunately, the removal of LZW compression means that saved image size has -grown dramatically. Without a change in the TIFF spec to support -another lossless compression format, this is unavoidable.

-

The library can use zip for lossless compression, but as this is not -part of the spec, TIFFs using zip compression may not work with other -software.

-

We will be making a patch available that will contain the LZW -compression code for users who have either obtained a license from -Unisys or are willing to risk it.

-

LZW decompression is unchanged.

-
-
-

Software configuration changes

-
    -
  • Added zip creation to release makefile target

  • -
-
-
-

Library changes

-
    -
  • Added html for TIFFWriteTile.3t man page.

  • -
  • Added some changes to tif_write.c to support rewriting existing -fixed sized tiles and strips. Code mods disabled by default, only -enabled if REWRITE_HACK is defined for now.

  • -
  • Added TIFFWriteTile.3t man page.

  • -
  • Added notes on use of makefile.vc in build.html, and fixed -email subscription address.

  • -
  • Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, -from Bruce Cameron---modifications of -changes made by Frank (sun cc still complained on cast).

  • -
  • fixed various VC++ warnings as suggested by Gilles Vollant.

  • -
  • Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to -not imply applications are responsible for image data swapping.

  • -
  • HTML-ized the man pages, added to html/man.

  • -
  • Removed LZW Compression to comply with Unisys patent extortion.

  • -
  • Corrected one remaining 16 -> 32 bit value in tif_fax3.c, -From Ivo Penzar.

  • -
  • Added patch from Ivo Penzar to have TiffAdvanceDirectory() handle -memory mapped files. Ivo Penzar.

  • -
-
-
-

Contributed software changes

-
    -
  • Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.4.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.4.html deleted file mode 100644 index 70e4c44..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.4.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.4 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.4

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.4 (tag Release-v3-5-4)

Previous Version

v3.5.3

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • None.

  • -
-
-
-

Library changes

-
    -
  • Added Pixar tag support. Contributed by Phil Beffery.

  • -
  • Made one more change to tif_dir.c for removal of LZW compression. Also added notice -when LZW compression invoked.

  • -
  • Fixed bug that caused LZW (non) compression to segfault. Added -warning about LZW compression removed being removed, and why.

  • -
-
-
-

Tools changes

-
    -
  • Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions -in tools to reflect removal of LZW compression

  • -
  • Added nostrip to install in tools/Makefile.in so that debugging -symbols are kept.

  • -
  • Made Packbits the default compression in tools/tiff2rgba.c instead -of LZW.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.5.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.5.html deleted file mode 100644 index 7509ad7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.5.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.5 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.5

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.5 (tag Release-v3-5-5)

Previous Version

v3.5.4

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • configure: added test for libc6 for linux targets. Bug reported by -Stanislav Brabec.

  • -
  • configure: fixed bugs in sed scripts -(applied sed script s:/@:s;@:;s:/s;;:;: to configure). -fix submitted by Stanislav Brabec.

  • -
  • tools/iptcutil was not in files list, and wasn't being -added to tar archive. Updated Makefile.in.

  • -
  • Added 3.5 docs to html/Makefile.in. -Thanks to Stanislav Brabec

  • -
  • Fixed tools/tiffcmp so that stopondiff testing works. -Patch care of Joseph Orost.

  • -
  • Added fax3sm_winnt.c to distribution list in Makefile.in.

  • -
  • Added libtiff/libtiff.def to TIFFILES distribution list.

  • -
-
-
-

Library changes

-
    -
  • tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 -conversion for the run arrays.

  • -
  • Set td_sampleformat default to SAMPLEFORMAT_UINT instead of -SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c.

  • -
  • Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c.

  • -
  • Patched tif_fax3.c so that dsp->runs is allocated a bit bigger -to avoid overruns encountered with frle_bug.tif.

  • -
  • Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is -set to 1, and added default (off) setting in tiffconf.h. This -should eventually be set by the configure script somehow. -The original work on all these 2-4GB changes was done by -Peter Smith.

  • -
  • Modified tif_win32.c to support 2-4GB seeks.

  • -
  • tentatively changed toff_t to be unsigned instead of signed to -facilitate support for 2-4GB files.

  • -
  • Updated a variety of files to use toff_t. Fixed some mixups -between toff_t and tsize_t.

  • -
  • Set tif_rawdatasize to zero when freeing raw data buffer in -TIFFWriteDirectory().

  • -
  • Enabled REWRITE_HACK in tif_write.c by default.

  • -
  • Fix bug in tif_write.c when switching between reading one directory -and writing to another.

  • -
  • Made TIFFWriteCheck() public, and added TIFFCreateDirectory()

  • -
  • Added TIFFmemory functions to libtiff.def.

  • -
  • Added libtiff/libtiff.def to TIFFILES distribution list.

  • -
-
-
-

Tools changes

-
    -
  • fax2ps:

    -
      -
    • Fixed mixup of width and height in bounding box statement -as per submission by Nalin Dahyabhai.

    • -
    • Modified printruns to take uint32 instead of uint16. -Patch courtesy of Bernt Herd.

    • -
    -
  • -
  • Largely reimplemented contrib/addtiffo to avoid temp files, -updating the TIFF file in place. Fixed a few other bugs to.

  • -
  • Altered descriptions in tools to reflect "by default" lzw not supported

  • -
-
-
-

LZW compression kit changes

-
    -
  • created mangle-src.sh -- sed scripts to munge src into LZW enabled format. -Thanks to Stanislav Brabec.

  • -
  • created Makefile

  • -
  • merged tif_dir.c with current source.

  • -
  • Created lzw compression kit, as a new CVS module (libtiff-lzw-compression-kit).

  • -
  • Updated index.html to note lzw compression kit.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.6beta.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.6beta.html deleted file mode 100644 index 07cd654..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.6beta.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.6beta — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.6beta

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.6beta (no release tag)

Previous Version

v3.5.5

Master Download Site

ftp://ftp.onshore.com/pub/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • Added GNULDdso target and switched linux and freebsd to use it.

  • -
  • tools/Makefile.in: Modified to install properly on SGI.

  • -
  • configure: Fixed DSO test for Linux as per patch from -Jan Van Buggenhout.

  • -
-
-
-

Library changes

-
    -
  • tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory -as per Remote Sensing bugzilla #18 [no longer available] -from mailto:vandrove@vc.cvut.cz.

  • -
  • Modified tif_packbits.c decoding to avoid overrunning the -output buffer, and to issue a warning if data needs to be -discarded. See Remote Sensing bugzilla #18 [no longer available]

  • -
  • Modified TIFFClientOpen() to emit an error on an attempt to -open a compressed file for update (O_RDWR/"r+") access. This is -because the compressor/decompressor code gets very confused when -the mode is O_RDWR, assuming this means writing only. See -bug Remote Sensing bugzilla #13 [no longer available]

  • -
  • Applied patch for 0x0000 sequences in tif_fax3.h definition -of EXPAND1D as per bug Remote Sensing bugzilla #11 [no longer available] (from Roman).

  • -
  • Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve -cygwin compatibility.

  • -
  • Applied patch from Roman Shpount to tif_fax3.c. This seems to -be a proper fix to the buffer sizing problem. See -Remote Sensing bugzilla #11 [no longer available]

  • -
  • Fixed tif_getimage.c to fix overrun bug with YCbCr images without -downsampling. Remote Sensing bugzilla #10 [no longer available] -Thanks to Nick Lamb for reporting the -bug and proving the patch.

  • -
  • Fixed tif_jpeg.c to avoid destroying the decompressor before -we are done access data thanks to bug report from: -Michael Eckstein.

  • -
  • tif_open.c: Don't set MMAP for O_RDWR files.

  • -
  • tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY -so that files opened for update can be strip chopped too.

  • -
  • tif_read.c: fixed up bug with files missing rowsperstrip and -the strips per separation fix done a few weeks ago.

  • -
  • Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and -SAMPLEFORMAT_COMPLEXINT.

  • -
  • index.html, bugs.html: added bugzilla info.

  • -
  • tif_read.c: fix subtle bug with determining the number of -rows for strips that are the last strip in a separation but -not the last strip of all in TIFFReadEncodedStrip().

  • -
  • Applied 16/32 bit fix to tif_fax3.c. Fix supplied by -Peter Skarpetis.

  • -
  • Modified tiffio.h logic with regard to including windows.h. It -won't include it when building with __CYGWIN__.

  • -
  • README: update to mention {REDACTED - defunct web site}, don't list Sam's old -email address.

  • -
  • libtiff/tif_dirread.c: Don't use estimate strip byte count for -one tile/strip images with an offset, and byte count of zero. These -could be "unpopulated" images.

  • -
  • tif_win32.c: Applied patch to fix overreads and ovverwrites -caught by BoundsChecker. From Arvan Pritchard (untested).

  • -
  • tif_getimage.c: Applied patch to silence VC6 warnings. From -Arvan Pritchard.

  • -
  • tif_lzw.c: Applied patch to silence VC6 warnings. From -Arvan Pritchard.

  • -
  • libtiff/tif_apple.c: Applied "Carbon" support patches supplied by -Leonard Rosenthol. May interfere -with correct building on older systems. If so, please let me know.

  • -
-
-
-

Tools changes

-
    -
  • tools/rgb2ycbcr.c: fixed output strip size to account for vertical -roundup if rows_per_strip not a multiple of vertical sample size.

  • -
  • tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT.

  • -
  • Modified tiff2bw to ensure portions add to 100%, and that -white is properly recovered. See bug -Remote Sensing bugzilla #15 [no longer available] Patch -c/o Stanislav Brabec

  • -
-
-
-

Contributed software changes

-
    -
  • contrib/addtiffo: Added "averaging" resampling option.

  • -
  • Added contrib/stream (stream io) code submitted by Avi Bleiweiss.

  • -
-
-
-

LZW compression kit changes

-
    -
  • updated tif_dir.c to reflect changes to no-lzw tif_dir.c.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.7.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.5.7.html deleted file mode 100644 index db96930..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.5.7.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - Changes in TIFF v3.5.7 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.5.7

- - - - - - - - - - - - - - - - -
References

Current Version

v3.5.7 (tag Release-v3-5-7)

Previous Version

v3.5.6beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Software configuration changes

-
    -
  • libtiff/libtiff.def: Brent Roman submitted new version adding -several missing entry points. Also add a few other entry points -later.

  • -
  • configure, Makefile.in, etc: added support for OPTIMIZER being -set from config.site.

  • -
  • config.guess: updated wholesale to an FSF version apparently -from 1998 (as opposed to 1994). This is mainly inspired by -providing for MacOS X support.

  • -
  • configure/config.site: modified to check if -lm is needed for -MACHDEPLIBS if not supplied by config.site. Needed for Darwin.

  • -
  • libtiff/tiff.h: Applied hack to try and resolve the problem -with the inttypes.h include file on AIX. (bug Remote Sensing bugzilla #39 [no longer available])

  • -
  • configure, *Makefile.in: Various changes to improve configuration -for HP/UX specifically, and also in general. (bug Remote Sensing bugzilla #40 [no longer available]) They include:

    -
    -
      -
    • Try to handle /usr/bin/sh instead of /bin/sh where necessary.

    • -
    • Upgrade to HP/UX 10.x+ compiler, linker and dso options.

    • -
    • Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP

    • -
    • Use -${MAKEFLAGS} in sub makes from makefiles.

    • -
    • Fixed SCRIPT_SH/SHELL handling.

    • -
    -
    -
  • -
  • configure: Changes for DSO generation on AIX provided by -John Marquart.

  • -
  • configure, libtiff/Makefile.in: Modified to build DSOs properly -on Darwin thanks to Robert Krajewski and -Keisuke Fujii.

  • -
  • configure, libtiff/Makefile.in: applied OpenBSD patches as per bug Remote Sensing bugzilla #61 [no longer available].

  • -
  • Makefile.in: added DESTDIR support as per bug Remote Sensing bugzilla #60 [no longer available].

  • -
  • libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H -has been included.

  • -
  • man/Makefile.in: add TIFFClientOpen() link as per debian submitted -bug Remote Sensing bugzilla #66 [no longer available].

  • -
  • libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ -in two places.

  • -
-
-
-

Library changes

-
    -
  • tif_fax3.c: keep rw_mode flag internal to fax3 state to remember -whether we are encoding or decoding. This is to ensure graceful -recovery if TIFFClientOpen() discovers an attempt to open a compressed -file for "r+" access, and subsequently close it, as it resets the -tif_mode flag to O_RDONLY in this case to avoid writes, confusing the -compressor's concept of whether it is in encode or decode mode.

  • -
  • tif_luv.c, tiff.h, tiffio.h: -New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward. He writes:

    -
      -
    • I improved the gamut-mapping function in tif_luv.c for imaginary -colors, because some images were being super-saturated on the input -side and this resulted in some strange color shifts in the output.

    • -
    • I added a psuedotag in tiff.h to control random dithering during -LogLuv encoding. This is turned off by default for 32-bit LogLuv and -on for 24-bit LogLuv output. Dithering improves the average color -accuracy over the image.

    • -
    • I added a #define for LOG_LUV_PUBLIC, which is enabled by default in -tiffio.h, to expose internal routines for converting between LogLuv and -XYZ coordinates. This is helpful for writing more efficient, -specialized conversion routines, especially for reading LogLuv files.

    • -
    -
  • -
  • libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS.

  • -
  • Added TIFFTAG_COPYRIGHT support.

  • -
  • tif_getimage.c: Added support for 16bit minisblack/miniswhite -images in RGBA interface.

  • -
  • libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per -bug Remote Sensing bugzilla #44 [no longer available].

  • -
  • libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the -case of writing TIFF_BYTE/TIFF_SBYTE fields as per -bug Remote Sensing bugzilla #43 [no longer available].

  • -
  • libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for -TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to -force use of uint32 counts instead of short counts.

  • -
  • libtiff/tif_dirinfo.c: moved pixar and copyright flags to ensure everything is in order.

  • -
  • Integrated experimental OJPEG support from Scott Marovich of HP.

  • -
  • libtiff/tif_open.c: Seek back to zero after failed read, before writing header.

  • -
  • libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ -when checking for 64 bit architectures as per bugzilla bug Remote Sensing bugzilla #67 [no longer available].

  • -
  • libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() -in TIFFReadRGBATile() to avoid issues in cases of overlapping -buffers. See bug Remote Sensing bugzilla #69 [no longer available] in Bugzilla.

  • -
  • libtiff/tif_getimage.c: Don't complain for CMYK (separated) -images with more than four samples per pixel as per bug Remote Sensing bugzilla #73 [no longer available].

  • -
  • libtiff/tif_getimage.c: relax handling of contig case where -there are extra samples that are supposed to be ignored as per bug Remote Sensing bugzilla #75 [no longer available]. This -should now work for 8bit greyscale or paletted images.

  • -
  • libtiff/tif_packbits.c: fixed memory overrun error as per bug Remote Sensing bugzilla #77 [no longer available].

  • -
  • libtiff/tif_getimage.c: Fixed problem with reading strips or -tiles that don't start on a tile boundary. Fix contributed by -Josep Vallverdu (from HP), and further described in bug Remote Sensing bugzilla #47 [no longer available].

  • -
  • libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to -always use the "safe" version, even if there is a very slight -cost in performance as per bug Remote Sensing bugzilla #54 [no longer available].

  • -
  • libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an -error about LZW not being available.

  • -
  • libtiff/tif_dir.c: propagate failure to initialize compression -back from TIFFSetField() as an error status, so applications can -detect failure.

  • -
  • libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug as per bug Remote Sensing bugzilla #78 [no longer available].

  • -
  • libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. -Updated TIFFWriteDirectory() man page to include TIFFRewriteDirectory().

  • -
  • libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, -COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases -in keeping with TIFF 6.0 standard in tiff.h as per bug Remote Sensing bugzilla #83 [no longer available].

  • -
  • Added PHOTOMETRIC_ITULAB as per bug Remote Sensing bugzilla #90 [no longer available].

  • -
-
-
-

Tools changes

-
    -
  • Brent Roman contributed updated tiffcp utility (and tiffcp.1) -with support for extracting subimages with the ,n syntax, and also -adding the "-b" bias removal flag.

  • -
  • tiff2ps.c, tiff2ps.1: Substantial changes to tiff2ps by -Bruce A. Mallett, including a faster encoder, fixes for level -2 PostScript, and support for the imagemask operator.

  • -
  • fax2ps.c: Helge (libtiff at oldach.net) submitted fix -that corrects behaviour for non-Letter paper -sizes. (bug Remote Sensing bugzilla #35 [no longer available]) It fixes two problems:

    -

    Without scaling ("-S") the fax is now centered on the page size specified -with "-H" and/or "-W". Before, fax2ps was using an obscure and practically -useless algorithm to allocate the image relative to Letter sized paper -which sometime sled to useless whitespace on the paper, while at the -same time cutting of the faxes printable area at the opposite border.

    -

    Second, scaling now preserves aspect ratio, which makes unusual faxes -(in particular short ones) print properly.

    -
  • -
  • thumbnail.c: changed default output compression -to packbits from LZW since LZW isn't generally available.

  • -
  • tiff2rgba.c: added "-n" flag to avoid emitting alpha component. Also added -a man page for tiff2rgba.

  • -
  • tiffcmp.c: Fixed multi samples per pixel support for ContigCompare() -as per bug Remote Sensing bugzilla #53 [no longer available]. -Updated bug section of tiffcmp.1 to note tiled file issues.

  • -
  • libtiff/tif_getimage.c: Fixed so that failure is properly -reported by gtTileContig(), gtStripContig(), gtTileSeparate() and -gtStripSeparate() as per bug Remote Sensing bugzilla #51 [no longer available].

  • -
-
-
-

Contributed software changes

-
    -
  • Fixed distribution to include contrib/addtiffo/tif_ovrcache.c -and contrib/addtiffo/tif_ovrcache.h.

  • -
-
-
-

LZW compression kit changes

-
    -
  • Rewrote lzw patching process so that is required to enable full -LZW support is to drop the tif_lzw.c from the -libtiff-lzw-compression-kit over the one in the libtiff directory.

  • -
  • Some changes were made to make recovery from failure to -initialize the LZW compressor more graceful.

  • -
  • Note that as distributed libtiff support LZW decompression, but -not LZW compression.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.6.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.6.0.html deleted file mode 100644 index c7671d8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.6.0.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - - Changes in TIFF v3.6.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.6.0

- - - - - - - - - - - - - - - - -
References

Current Version

v3.6.0 (tag Release-v3-6-0)

Previous Version

v3.5.7

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • New utility raw2tiff for converting raw rasters into TIFF files.

  • -
  • Lots of new tiff2ps options.

  • -
  • Lots of new fax2tiff options.

  • -
  • Lots of bug fixes for LZW, JPEG and OJPEG compression.

  • -
-
-

Custom Tag Support

-

The approach to extending libtiff with custom tags has changed radically. -Previously, all internally supported TIFF tags had a place in the -private TIFFDirectory structure within libtiff to hold the values (if read), -and a "field number" (ie. FIELD_SUBFILETYPE) used to identify that tag. -However, every time a new tag was added to the core, the size of the -TIFFDirectory structure would change, breaking any dynamically linked -software that used the private data structures.

-

Also, any tag not recognised -by libtiff would not be read and accessible to applications without some -fairly complicated work on the applications part to pre-register the tags -as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on -libtiff.

-

Among other things this approach required the extension code -to access the private libtiff structures ... which made the higher level -non-libtiff code be locked into a specific version of libtiff at compile time. -This caused no end of bug reports!

-

The new approach is for libtiff to read all tags from TIFF files. Those that -aren't recognised as "core tags" (those having an associated FIELD_ value, -and place for storage in the TIFFDirectory structure) are now read into a -dynamic list of extra tags (td_customValues in TIFFDirectory). When a new -tag code is encountered for the first time in a given TIFF file, a new -anonymous tag definition is created for the tag in the tag definition list. -The type, and some other metadata is worked out from the instance encountered. -These fields are known as "custom tags".

-

Custom tags can be set and fetched normally using TIFFSetField() and -TIFFGetField(), and appear pretty much like normal tags to application code. -However, they have no impact on internal libtiff processing (such as -compression). Some utilities, such as tiffcp will now copy these custom -tags to the new output files.

-

As well as the internal work with custom tags, new C API entry points -were added so that extension libraries, such as libgeotiff, could -define new tags more easily without accessing internal data structures. -Because tag handling of extension tags is done via the "custom fields" -mechanism as well, the definition provided externally mostly serves to provide -a meaningful name for the tag.

-

The addition of "custom tags" and the altered approach to extending libtiff -with externally defined tags is the primary reason for the shift to the -3.6.x version number from 3.5.x.

-
-
-
-

Software configuration changes

- -
-
-

Library changes

- -
-
-

Tools changes

- -
-
-

Contributed software changes

-
    -
  • Fixed distribution to include contrib/addtiffo/tif_ovrcache.c, contrib/addtiffo/tif_ovrcache.h.

  • -
  • libtiff/contrib/win95: renamed to contrib/win_dib. Added new -Tiffile.cpp example of converting TIFF files into a DIB on Win32 as per -bug Remote Sensing bugzilla #143 [no longer available].

  • -
-
-
-

LZW compression kit changes

-
    -
  • LZW compression kit synchronized with actual libtiff version.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.6.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.6.1.html deleted file mode 100644 index f876ae6..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.6.1.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - Changes in TIFF v3.6.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.6.1

- - - - - - - - - - - - - - - - -
References

Current Version

v3.6.1 (tag Release-v3-6-1)

Previous Version

v3.6.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • New utility tiff2pdf -for converting TIFF images directly into PDF.

  • -
  • New TIFFcolor color conversion module.

  • -
  • Full support for Orientation tag in TIFFRGBAImage interface.

  • -
  • Many bugs fixed.

  • -
-
-
-

Software configuration changes

-
    -
  • libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG library.

  • -
  • Makefile.in: Add an absolute path to the test_pics.sh call.

  • -
  • Makefile.in: Add an absolute path to the test_pics.sh call.

  • -
  • libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD typedefs.

  • -
  • configure, libtiff/Makefile.in, libtiff/mkversion.c: Relative buildings fixed.

  • -
  • Makefile.in: Add an absolute path to the test_pics.sh call.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h: -Added support for ReferenceBlackWhite tag handling when converted from YCbCr color space as -per bug Remote Sensing bugzilla #120 [no longer available].

  • -
  • libtiff/tif_getimage.c, libtiff/tif_aux.c: Read WhitePoint tag from the -file and properly use it for CIE Lab 1976 to RGB transform.

  • -
  • libtiff/tif_getimage.c, libtiff/tiffio.h: Finally resolved problems with -orientation handling. TIFFRGBAImage interface now properly supports all -possible orientations, i.e. images will be flipped both in horizontal and -vertical directions if required. 'Known bugs' section now removed from the -appropriate manual pages.

  • -
  • libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, -reported by Antonio Scuri.

  • -
  • libtiff/tiffio.h, libtiff/tif_codec.c: Added new function -TIFFIsCODECConfigured(), suggested by Ross Finlayson.

  • -
  • libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly extract -the fields from the OJPEG files. Patch supplied by Ross Finlayson.

  • -
  • libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo() declaration replaced -with _TIFFFindOrRegisterFieldInfo() as reported by Ross Finlayson.

  • -
  • libtiff/tif_dirinfo.c: Implemented binary search in _TIFFMergeFieldInfo(). -Patch supplied by Ross Finlayson.

  • -
  • tif_dirread.c: do not mark all anonymously defined tags to be IGNORE (as -it was done in 3.6.0).

  • -
  • libtiff/tiff.h, libtiff/tif_dirinfo.c: Added support for IFD (13) datatype, -introduced in "Adobe PageMaker TIFF Technical Notes".

  • -
  • libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h: New color space -conversion code: CIE L*a*b* 1976 images now supported by the TIFFRGBAImage -interface. YCbCr to RGB conversion code also moved there and now has -TIFFcolor publicly available interface. These -routines currently used in TIFFRGBAImage interface only and not supported in -other libtiff tools yet. So if you want, for example, to convert CIE Lab image -into PostScript file you should do it in two steps: change colorspace to RGB -using tiff2rgba utility and then process -it with the tiff2ps.

  • -
  • libtiff/tif_tile.c: Remove spurious use of "s" (sample) in the -planarconfig_contig case in TIFFComputeTile() as per bug Remote Sensing bugzilla #387 [no longer available].

  • -
  • libtiff/tiffiop.h: New macros: TIFFmax and TIFFmin.

  • -
  • libtiff/tiffio.h, libtiff/tif_strip.c: Added TIFFRawStripSize() function -as suggested by Chris Hanson.

  • -
  • libtiff/tif_lzw.c, libtiff/tif_fax3.c: Proper support for update mode -as per bug Remote Sensing bugzilla #424 [no longer available].

  • -
-
-
-

Tools changes

-
    -
  • tiff2pdf:: New tool, written by -Ross Finlayson, to directly convert TIFF files to PDF.

  • -
  • tiffgt: Unmaintained and platform -dependent sgigt utility removed and replaced with the completely rewritten -portable tool (depend on OpenGL and -GLUT). This tool will not build by default.

  • -
  • ras2tiff: Properly determine -SUN Rasterfiles with the reverse byte order (it is reported by the magic -header field). Problem reported by Andreas Wiesmann.

  • -
  • raw2tiff: Implemented image size -guessing using correlation coefficient calculation between two neighbour -lines.

  • -
-
-
-

Contributed software changes

-
    -
  • contrib/pds/tif_pdsdirread.c, contrib/pds/tif_pdsdirwrite.c: -Use TIFFDataWidth() function instead of tiffDataWidth array.

  • -
-
-
-

LZW compression kit changes

- -
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0.html deleted file mode 100644 index ad5e0c9..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.0

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.0 (tag Release-v3-7-0)

Previous Version

v3.7.0beta2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Several bugs found after 3.7.0beta2 release were fixed.

  • -
-
-
-

Software configuration changes

-
    -
  • ltmain.sh: Fix for MinGW compilation.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_dirread.c, libtiff/tif_jpeg.c, libtiff/tif_luv.c, -libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, libtiff/tif_write.c: -Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner).

  • -
  • libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed -to TIFF_IFD.

  • -
  • Preliminary support for BigTIFF files: now libtiff can -recognize and reject to open such images. ;-)

  • -
  • libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields -of the TIFFDirectory structure with the 0 instead of -1 to avoid -confusing integer overflows in TIFFTileRowSize() for striped images.

  • -
  • libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation -of tif_fieldinfo as per bug -Remote Sensing bugzilla #630 [no longer available]

  • -
  • libtiff/tif_compress.c: Improved error reporting in -TIFFGetConfiguredCODECs() (Dmitry V. Levin).

  • -
-
-
-

Tools changes

-
    -
  • tiffcmp.c (leof()): Renamed from "eof" in order to avoid -conflict noticed under MinGW.

  • -
  • tiff2pdf.c: Fixed TransferFunction tag handling reported -by Ross A. Finlayson.

  • -
-
-
-

Contributed software changes

-
    -
  • None.

  • -
-
-
-

LZW compression kit changes

-
    -
  • This one is not longer needed.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0alpha.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0alpha.html deleted file mode 100644 index 2641a50..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0alpha.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.0alpha — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.0alpha

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.0alpha (tag Release-v3-7-0-alpha)

Previous Version

v3.6.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Significant changes in software configuration: we are switched -to GNU autotools now.

  • -
  • tiffset: Set any libtiff supported tags. Tags -can be supplied by the mnemonic name or number.

  • -
-
-
-

Software configuration changes

-
    -
  • Get rid of the old configuration system and switch to -GNU autotools.

  • -
-
-
-

Library changes

- -
-
-

Tools changes

-
    -
  • tiffset: Set any libtiff supported tags. Tags -can be supplied by the mnemonic name or number.

  • -
  • ycbcr.c: fixed main() declaration as per: -Remote Sensing bugzilla #513 [no longer available].

  • -
  • tiffsplit: Don't forget -to copy PhotometricInterpretation tag.

  • -
  • tiffsplit:

    -
      -
    • Fixed problem with -unproperly written multibyte files. Now output files will be written -using the same byte order flag as in the input image. See -Remote Sensing bugzilla #574 [no longer available].

    • -
    • Copy JPEGTables -tag contents for JPEG compressed images. Reported by Artem Mirolubov.

    • -
    -
  • -
  • tiffcp:

    -
      -
    • Close output file on normal exit.

    • -
    • Don't emit warnings -when Orientation tag does not present in the input image.

    • -
    • Properly set -Photometric Interpretation in case of JPEG compression of grayscale -images.

    • -
    • Fixed problem with wrong -interpretation of the InkNames tag as per bug -Remote Sensing bugzilla #466 [no longer available]. -Memory leak fixed.

    • -
    • Fixed problem with -wrong PhotometricInterpretation setting for non-RGB images.

    • -
    -
  • -
-
-
-

Contributed software changes

-
    -
  • Outdated stuff removed.

  • -
  • Almost all programs are synchronized with the current libtiff -and should compile without problems.

  • -
-
-
-

LZW compression kit changes

-
    -
  • No changes.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta.html deleted file mode 100644 index 9dfee26..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.0beta — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.0beta

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.0beta (tag Release-v3-7-0beta)

Previous Version

v3.7.0alpha

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • LZW compression enabled by default. You don't need the separate -compression kit anymore.

  • -
  • bmp2tiff: Added new utility to convert Windows BMP files -into TIFFs.

  • -
  • The first attempt to implement a test suite.

  • -
-
-
-

Software configuration changes

-
    -
  • Many portability fixes in the new autotooled build suite.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_luv.c, libtiff/tif_next.c, libtiff/tif_thunder.c: -Several buffer overruns fixed, as noted by Chris Evans.

  • -
  • BSD data types (u_char, u_short, u_int, u_long) -is no longer used internally in the libtiff. Should result in simpler configuration -and better portability.

  • -
  • libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP -specification. Reference libtiff bug tracking system to submit -private tag additions.

  • -
  • libtiff/tif_dirread.c: Don't reject to read tags of the -SamplesPerPixel size when the tag count is greater than number of -samples as per bug -Remote Sensing bugzilla #576 [no longer available].

  • -
  • libtiff/tiffio.h, libtiff/tif_open.c: Applied patches from -Joris Van Damme to avoid requirement for tiffiop.h inclusion in -some applications. Look for details here: -http://www.asmail.be/msg0054799560.html.

  • -
  • libtiff/tiffiop.h, libtiff/tif_dirinfo.c: Fixed problem with the static -variable as per bug -Remote Sensing bugzilla #593 [no longer available].

  • -
  • libtiff/tif_lzw.c: LZW compression code is merged back from the -separate package. All libtiff tools are updated to not advertise an -absence of LZW support.

  • -
  • libtiff/tif_dir.c: Call TIFFError() instead of producing warnings -when setting custom tags by value. Reported by Eric Fieleke.

  • -
-
-
-

Tools changes

-
    -
  • tiff2ps: Avoid zero division in setupPageState() function; -properly initialize array in PSDataBW().

  • -
  • tiff2pdf: Multiple bugfixes.

  • -
  • ras2tiff: Fixed issue with missed big-endian checks as per bug -Remote Sensing bugzilla #586 [no longer available].

  • -
  • bmp2tiff: Added new utility to convert Windows BMP files -into TIFFs.

  • -
-
-
-

Contributed software changes

-
    -
  • No changes.

  • -
-
-
-

LZW compression kit changes

-
    -
  • This one is not longer needed.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta2.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta2.html deleted file mode 100644 index 516083d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.0beta2.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.0beta2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.0beta2

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.0beta2 (tag Release-v3-7-0beta2)

Previous Version

v3.7.0beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • The code has been reviewed by Dmitry Levin: added checks -for values, returned by the space allocation functions, fixed -problems with the possible integer overflows.

  • -
-
-
-

Software configuration changes

-
    -
  • Several fixes in the test suite.

  • -
-
-
-

Library changes

-
    -
  • Preliminary support for BigTIFF files: now libtiff can -recognize and reject to open such images. ;-)

  • -
  • libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to -TIFF_BYTE instead of TIFF_UNDEFINED to comply with the info -in the Adobe XMP Specification.

  • -
  • Added many checks for integer overflow and for successful space -allocations in the different parts of library. Code review -completed by Dmitry V. Levin.

  • -
  • libtiff/tiffio.h, libtiff/tif_compress.c: Added -TIFFGetConfiguredCODECs() function to get the list of configured codecs.

  • -
-
-
-

Tools changes

-
    -
  • tiff2bw: Write ImageWidth/ImageHeight tags to output file, as -noted by Gennady Khokhorin.

  • -
-
-
-

Contributed software changes

-
    -
  • No changes.

  • -
-
-
-

LZW compression kit changes

-
    -
  • This one is not longer needed.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.1.html deleted file mode 100644 index d25483b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.1.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.1

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.1 (tag Release-v3-7-1)

Previous Version

v3.7.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • This is mostly bugfix release. Most important fix is the one -related to wrong custom tag read/write code.

  • -
-
-
-

Software configuration changes

-
    -
  • autogen.sh: aclocal and autoheader -should be executed after libtoolize. -Also add -I . to aclocal invocation to check -current directory for macros.

  • -
  • nmake.opt: Link with the user32.lib in windowed mode. As per bug -Remote Sensing bugzilla #697 [no longer available]

  • -
  • nmake.opt, makefile.vc: make it easier to rename the libtiff DLL.

  • -
  • configure, configure.ac: Added --enable-rpath option to embed -linker paths into library binary.

  • -
-
-
-

Library changes

- -
-
-

Tools changes

-
    -
  • fax2ps.c: Be able to extract the first page (#0). As per bug -Remote Sensing bugzilla #690 [no longer available]

  • -
  • tiff2ps.c: Fixed wrong variable data type when read Position -tags (Tristan Hill).

  • -
  • tiff2ps.c: Fixed wrong variable data type when read Resolution -tags (Peter Fales).

  • -
  • tiffset.c: Check the malloc() return value (Dmitry V. Levin).

  • -
-
-
-

Contributed software changes

-
    -
  • None.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.2.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.2.html deleted file mode 100644 index 8aece66..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.2.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.2

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.2 (tag Release-v3-7-2)

Previous Version

v3.7.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Maintenance release. Many bugfixes in the build environment -and compatibility improvements.

  • -
-
-
-

Software configuration changes

- -
-
-

Library changes

- -
-
-

Tools changes

- -
-
-

Contributed software changes

-
    -
  • None.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.3.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.3.html deleted file mode 100644 index 3fb2526..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.3.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.3 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.3

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.3 (tag Release-v3-7-3)

Previous Version

v3.7.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Replace runtime endianness check with the compile time one.

  • -
  • Added support for the new predictor type (floating point -predictor), defined at the TIFF Technical Note 3.

  • -
  • Added Support for custom tags, passed by value.

  • -
  • Added support for all DNG tags.

  • -
-
-
-

Software configuration changes

- -
-
-

Library changes

-
    -
  • tiffiop.h, tif_open.c: Added open option "h" to avoid reading -the first IFD when needed. As per bug -Remote Sensing bugzilla #875 [no longer available]

  • -
  • tiff.h: Use correct int size on Sparc 64bit/Sun compiler -platform. As per bug -Remote Sensing bugzilla #855 [no longer available]

  • -
  • tif_dirinfo.c: Added support for ClipPath, XClipPathUnits -and YClipPathUnits tags.

  • -
  • tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c: Make -DocumentName, Artist, HostComputer, ImageDescription, Make, Model, -Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and -TargetPrinter tags custom.

  • -
  • tif_jpeg.c: Cleanup the codec state depending on TIFF_CODERSETUP -flag (to fix memory leaks).

  • -
  • tif_dirwrite.c: Use tdir_count when calling -TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as -per bug Remote Sensing bugzilla #845 [no longer available]

  • -
  • tif_dirinfo.c, tif_print.c: TIFFFetchByteArray() returns -uint16 array when fetching the BYTE and SBYTE fields, so we should -consider result as pointer to uint16 array and not as array of char. -As per bug -Remote Sensing bugzilla #831 [no longer available]

  • -
  • tif_dir.c: More efficient custom tags retrieval as per bug -Remote Sensing bugzilla #830 [no longer available]

  • -
  • tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share -mode in CreateFile() call as per bug -Remote Sensing bugzilla #829 [no longer available]

  • -
  • tif_jpeg.c: Substantial fix for addtiffo problems with -JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables -in directory.

  • -
  • tif_dirread.c: Changed the code that computes -stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is -zero. This is a common case with GDAL indicating a "null" tile/strip.

  • -
  • tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw().

  • -
  • tif_dirread.c: Ensure that broken files with too many -values in TIFFFetchPerSampleShorts(), TIFFFetchPerSampleLongs() and -TIFFFetchPerSampleAnys() work ok instead of crashing. -Remote Sensing bugzilla #843 [no longer available]

  • -
  • tif_predict.h, tif_predict.c: Added ability to decode and encode -floating point predictor, as per TIFF Technical Note 3. -See http://chriscox.org/TIFF_TN3_Draft2.pdf for details.

  • -
  • tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c: -Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to -swap 24-bit floating point values.

  • -
  • tiff.h: Added predictor constants.

  • -
  • tiffiop.h, tif_dir.c: Use uint32 type for appropriate values -in _TIFFVSetField() function. Inspired by the bug -Remote Sensing bugzilla #816 [no longer available]

  • -
  • tif_open.c: Do not read header in case the output file should -be truncated (Ron).

  • -
  • tif_dirinfo.c, tif_config.h.vc: Use lfind() instead of bsearch() -in _TIFFFindFieldInfoByName() function (Ron).

  • -
  • tif_dir.c, tif_print.c: Properly handle all data types in custom -tags.

  • -
  • dirinfo.c: Added DNG tags.

  • -
  • tiff.h: Added missed DNG tag (LensInfo); added DNG 1.1.0.0 tags.

  • -
  • tif_dir.c, tif_print.c: Added Support for custom tags, passed -by value.

  • -
  • tiff.h, tif_dirinfo.c, tiffiop.h: Added EXIF related tags.

  • -
-
-
-

Tools changes

- -
-
-

Contributed software changes

-
    -
  • addtiffo/tif_overview.c, addtiffo/tif_ovrcache.c, -addtiffo/tif_ovrcache.h: -Make overviews working for contiguous images.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.4.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.7.4.html deleted file mode 100644 index ec35b71..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.7.4.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - Changes in TIFF v3.7.4 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.7.4

- - - - - - - - - - - - - - - - -
References

Current Version

v3.7.4 (tag Release-v3-7-4)

Previous Version

v3.7.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Fixed important bug in custom tags handling code.

  • -
-
-
-

Software configuration changes

-
    -
  • Applied patch from Patrick Welche (all scripts moved in the -config and m4 directories).

  • -
  • SConstruct, libtiff/SConstruct: Added the first very preliminary -support for SCons software building tool (http://www.scons.org/). -This is experimental infrastructure and it will exist along with the -autotools stuff.

  • -
  • port/lfind.c: Added lfind() replacement module.

  • -
-
-
-

Library changes

-
    -
  • tif_dir.c: When prefreeing tv->value in TIFFSetFieldV() -also set it to NULL to avoid double free when re-setting custom -string fields as per: -Remote Sensing bugzilla #922 [no longer available]

  • -
  • tif_dir.c: Fixed up support for swapping "double complex" -values (128 bits as 2 64 bits doubles). GDAL gcore tests now -pass on bigendian (macosx) system.

  • -
  • libtiff/tif_dirread.c, libtiff/tif_dirinfo.c: Do not upcast BYTE to -SHORT in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() -function, use TIFFFetchNormalTag() instead as per bug -Remote Sensing bugzilla #831 [no longer available]

    -

    Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() -instead.

    -
  • -
  • tif_print.c: Fixed printing of the BYTE and SBYTE arrays.

  • -
  • tif_write.c: Do not check the PlanarConfiguration field in -the TIFFWriteCheck() function in case of single band images (as per -TIFF spec).

  • -
  • libtiff/tif_dir.c, libtiff/tif_dir.h, -libtiff/tif_dirinfo.c, libtiff/tif_print.c: -Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, -ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom.

  • -
-
-
-

Tools changes

-
    -
  • tiffcp.c: Fixed WhitePoint tag copying.

  • -
-
-
-

Contributed software changes

-
    -
  • tiffdump.c: Added support for TIFF_IFD datatype.

  • -
  • addtiffo/tif_overview.c, addtiffo/tif_ovrcache.c, -addtiffo/tif_ovrcache.h: -Make overviews working for contiguous images.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.8.0.html deleted file mode 100644 index 4bd5a8a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.0.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - Changes in TIFF v3.8.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.8.0

- - - - - - - - - - - - - - - - -
References

Current Version

v3.8.0 (tag Release-v3-8-0)

Previous Version

v3.7.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Read-only support for custom directories (e.g. EXIF directory).

  • -
  • Preliminary support for MS MDI format.

  • -
-
-
-

Software configuration changes

-
    -
  • Make the default strip size configurable via the ---with-default-strip-size and STRIP_SIZE_DEFAULT options.

  • -
-
-
-

Library changes

-
    -
  • tiffio.h: Added VC_EXTRALEAN definition before including -windows.h, to reduce the compile time.

  • -
  • tif_jpeg.c: Improve compilation under MinGW.

  • -
  • tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, -tif_print.c, tif_getimage.c: Make InkSet, NumberOfInks, DotRange and -StoNits tags custom.

  • -
  • tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c: Make -WhitePoint tag custom.

  • -
  • tiffio.h: fixed typo that potentially resulted in -redefininition of USE_WIN32_FILEIO

  • -
  • tif_dir.c, tif_dir.h, tif_print.c: Make RichTIFFIPTC, -Photoshop and ICCProfile tags custom.

  • -
  • libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling -newer code to get context indicator in error handler and still -remain compatible with older code: Done TIFFError() calls everywhere -except in tools.

  • -
  • tiffinfo.c: Print EXIF directory contents if exist.

  • -
  • tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c: -Custom directory read-only support.

  • -
  • tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, -tif_dir.c, tif_print.c: Make YCbCrCoefficients and ReferenceBlackWhite -tags custom.

  • -
  • tif_dirread.c: One more workaround for broken StripByteCounts -tag. Handle the case when StripByteCounts array filled with -completely wrong values.

  • -
  • tif_dirinfo.c: Release file descriptor in case of failure -in the TIFFOpenW() function as per bug -Remote Sensing bugzilla #1003 [no longer available]

  • -
  • tif_dirinfo.c: Correctly use bsearch() and lfind() -functions as per bug -Remote Sensing bugzilla #1008 [no longer available]

  • -
  • tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support -for MS MDI format. -Remote Sensing bugzilla #1002 [no longer available]

  • -
  • libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory() -public.

  • -
  • /tif_dirinfo.c: Make XResolution, YResolution and -ResolutionUnit tags modifiable during write process. As per bug -Remote Sensing bugzilla #977 [no longer available]

  • -
  • if_dirread.c: Don't try and split single strips into "0" strips -in ChopUpSingleUncompressedStrip(). This happens in some degenerate -cases (like 1×1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff)

  • -
  • tif_fax3.c: changed 'at scanline ...' style warning/errors -with incorrect use of tif_row, to 'at line ... of -strip/tile ...' style.

  • -
-
-
-

Tools changes

- -
-
-

Contributed software changes

-
    -
  • contrib/addtiffo/*: Major upgrade by Joris to support subsampled -YCbCr images in jpeg compressed TIFF files.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.8.1.html deleted file mode 100644 index 77ce02b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.1.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - Changes in TIFF v3.8.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.8.1

- - - - - - - - - - - - - - - - -
References

Current Version

v3.8.1 (tag Release-v3-8-1)

Previous Version

v3.8.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Bug-fix release.

  • -
-
-
-

Software configuration changes

-
    -
  • libtool related stuff updated from the 2.1a branch.

  • -
  • Fix with_default_strip_size comparison as reported by -Norihiko Murase.

  • -
-
-
-

Library changes

- -
-
-

Tools changes

- -
-
-

Contributed software changes

-

None.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.2.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.8.2.html deleted file mode 100644 index 7a5323a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.8.2.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - Changes in TIFF v3.8.2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.8.2

- - - - - - - - - - - - - - - - -
References

Current Version

v3.8.2 (tag Release-v3-8-2)

Previous Version

v3.8.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • Bug-fix release.

  • -
-
-
-

Software configuration changes

- -
-
-

Library changes

- -
-
-

Tools changes

- -
-
-

Contributed software changes

-

None.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0.html deleted file mode 100644 index b537a19..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.0

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.0 (tag Release-v3-9-0)

Previous Version

v3.9.0beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • All of the major changes since 3.8.0 were incorporated in -the v3.9.0beta release. This is a stable release from a -stable maintenance branch which incorporates many bug and -security fixes needed by existing users of 3.X.X series -libraries. Any future major changes will be in the 4.0.X -series of releases.

  • -
-
-
-

Software configuration changes

-
    -
  • Updated autotools: Autoconf 2.64, Automake 1.11, libtool -2.2.6.

  • -
  • Enabled support for Automake silent build rules -(--enable-silent-rules or make V=0)

  • -
  • Enabled support for Automake colorized tests.

  • -
  • Added detection of a 64-bit integer type so that bundled -utilities (like tiffcrop) can use it when necessary. Note -that this version of libtiff does not require a 64-bit integer -type but libtiff 4.0 does.

  • -
-
-
-

Library changes

-
    -
  • libtiff/Makefile.am, libtiff/Makefile.v: Do not distribute -tiffconf.h, remove tif_config.h/tiffconf.h during cleaning. As -per bug Remote Sensing bugzilla #1573 [no longer available]

  • -
  • tif_dirinfo.c: _TIFFMergeFields() now only merges in -field definitions that are missing. Existing definitions are -silently ignored. (Remote Sensing bugzilla #1585 [no longer available])

  • -
  • tif_write.c: Rip out the fancy logic in -TIFFAppendToStrip() for establishing if an existing tile can -be rewritten to the same location by comparing the current -size to all the other blocks in the same directory. This is -dangerous in many situations and can easily corrupt a file. -(observed in esoteric GDAL situation that's hard to document). -This change involves leaving the stripbytecount[] values -unaltered till TIFFAppendToStrip(). Now we only write a block -back to the same location it used to be at if the new data is -the same size or smaller - otherwise we move it to the end of -file.

  • -
  • tif_dirwrite.c: Try to avoid writing out a full -readbuffer of tile data when writing the directory just -because we have TIFF_BEENWRITING at some point in the past. This -was causing odd junk to be written out in a tile of data when -a single tile had an interleaving of reading and writing with -reading last. (highlighted by gdal -autotest/gcore/tif_write.py test 7.)

  • -
  • tif_predict.c: use working buffer in PredictorEncodeTile() -to avoid modifying callers buffer. -GDAL trac #1965

  • -
  • tif_predict.c, tif_predict.h, tif_lzw.c, tif_zip.c: Improvements so -that predictor based encoding and decoding works in read-write -update mode properly. -GDAL trac #1948

  • -
  • configure.com, libtiff/tif_vms.c: Better OpenVMS -support. Patches from Alexey Chupahin.

  • -
  • tif_fax3.c: fix leak of FAXCS state (per bug Remote Sensing bugzilla #1603 [no longer available]).

  • -
  • tif_fax3.c: Make find0span() and find1span() non-inline -to make MSVC 6.0 compiler happy.

  • -
  • tif_codec.c: Avoid NULL pointer dereferencing for exotic -compression codec codes.

  • -
  • tif_dirread.c: zero tif->tif_dir after freeing the -directory in TIFFReadCustomDirectory(). I don't exactly -remember why this was important.

  • -
  • tif_dirwrite.c: Fix potential memory leak writing large -double tags.

  • -
  • tif_dirread.c: Fix unchecked malloc() result.

  • -
  • libtiff/tif_lzw.c: Properly zero out the codetable. As -per bug MapTools bugzilla #1929

  • -
  • libtiff/tif_lzw.c: Properly zero out the string -table. Fixes CVE-2008-2327 security issue.

  • -
  • libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 -(compatibility with the older versions retained).

  • -
  • libtiff/tif_getimage.c, tiffio.h: removed all use of -UaToAa and Bitmap16to8 arrays in TIFFRGBAImage structure to -restore ABI compatibility. These were just an attempt to -speed up processing with precalculated tables. -MapTools bugzilla #1979

  • -
  • libtiff/tif_codec.c: Avoid printing c->name if it does not exist.

  • -
  • libtiff/tif_getimage.c, tiffio.h: More ABI corrections. -Removed SubsamplingHor/Ver from TIFFRGBAImage structure. -MapTools bugzilla #1980

  • -
  • libtiff/tif_jpeg.c: Avoid errors if the application -writes a full strip for the last partial strip in a jpeg -compressed file. MapTools bugzilla #1981

  • -
  • libtiff/tiffio.h: GCC will now validate format -specifications for TIFFError(), TIFFErrorExt(), TIFFWarning(), -and TIFFWarningExt() in order to reveal bugs. Cleaned up -resulting warnings throughout for 32 bit build only.

  • -
  • libtiff/tiffiop.h: Add private type declarations for -int64, and uint64 so that bundled utilities (like tiffcrop) -can use it when necessary.

  • -
  • libtiff/tif_predict.c: Add support for 32bit integer -horz. predictors. -MapTools bugzilla #1911

  • -
  • libtiff/tif_luv.c: Fix handling of tiled logluv images. -MapTools bugzilla #2005

  • -
  • libtiff/tif_write.c: do not override the planar -configuration to be contig for one sample files if planar -configuration is already set. -MapTools bugzilla #2057

  • -
  • libtiff/tif_lzw.c: Fix buffer underflow bug. -MapTools bugzilla #2065

  • -
  • libtiff/tif_luv.c: correct return codes from encoderow to -be 1 on success instead of zero. -MapTools bugzilla #2069

  • -
  • libtiff/tif_print.c (TIFFPrintDirectory()): Applied patch -for "tag error may cause segfault in tif_print.c." -MapTools bugzilla #1896

  • -
-
-
-

Tools changes

-
    -
  • tools/tiff2pdf.c: Fixed setting of alpha value per report -on list.

  • -
  • tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() -calls when doing the filename/path construction.

  • -
  • tools/tiff2pdf.c: More appropriate format string in -t2p_write_pdf_string(); avoid signed/unsigned mismatch.

  • -
  • tools/tiffsplit.c: Use dynamically allocated array -instead of static when constructing output file names.

  • -
  • tools/tiffcrop.c, man/tiffcrop.1: Incorporated -significant functionality update from Richard Nolde.

  • -
  • tools/tiff2ps.c: Incorporated significant functionality -update from Richard Nolde. In particular, support for -rotating the image by 90, 180, 270, and 'auto' has been added.

  • -
  • tools/tiff2ps.c: Remove spurious message printed to -stderr.

  • -
  • tools/tiffsplit.c: fix sampleformat to be shortv instead -of longv.

  • -
  • tools/rgb2ycbcr.c, tools/tiff2rgba.c: Applied patch for -CVE-2009-2347 libtiff: integer overflows in various -inter-color space conversion tools. -MapTools bugzilla #2079

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0beta.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0beta.html deleted file mode 100644 index 37c3c7b..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.0beta.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.0beta — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.0beta

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.0beta (tag Release-v3-9-0beta)

Previous Version

v3.8.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here:

-
-

Major changes

-
    -
  • New tiffcrop utility contributed by Richard Nolde. -tiffcrop does the same as tiffcp, but also can crop, -extract, rotate and mirror images.

  • -
  • tif_jbig.c: Added support for JBIG compression scheme -(34661 code), contributed by Lee Howard.

  • -
  • Totally new implementation of OJPEG module from -Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files -should be supported now that was not supported previously.

  • -
-
-
-

Software configuration changes

-
    -
  • tif_config.wince.h, tiffconf.wince.h, tif_wince.c: WinCE-specific -compatibility stuff from Mateusz Loskot.

  • -
  • Rename config.h.vc and tif_config.h.vc to config.vc.h and -tif_config.vc.h for easier identification by folks using an IDE.

  • -
  • configure, configure.ac: OJPEG support enabled by default (i.e., -when conformant JPEG support is enabled).

  • -
  • README.vms, Makefile.am, configure.com, libtiff/Makefile.am, -libtiff/tif_config.h-vms, libtiff/tif_stream.cxx, -libtiff/tif_vms.c, libtiff/tiffconf.h-vms: -Added support for OpenVMS by Alexey Chupahin.

  • -
  • nmake.opt: use /EHsc for VS2005 compatibility. Also define -_CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.

  • -
-
-
-

Library changes

-
    -
  • tif_dirinfo.c (_TIFFFindFieldInfo()): Don't attempt to -bsearch() on a NULL fieldinfo list. -(_TIFFFindFieldInfoByName()): Don't attempt to lfind() on a NULL -fieldinfo list.

  • -
  • tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it -will convert from decompressor to compressor or compress to decompress -if required by the force arguments. This works around a problem in -where the JPEGFixupTestSubsampling() may cause a decompressor to -be setup on a directory when later a compressor is required with the -force flag set. Occurs with the addtiffo program for instance.

  • -
  • tif_dirwrite.c: Fixed swapping of byte arrays stored -in-place in tag offsets as per bug -Remote Sensing bugzilla #1363 [no longer available]

  • -
  • tif_getimage.c: workaround for "Fractional scanline" error -reading OJPEG images with rowsperstrip that is not a multiple of -vertical subsampling factor. This bug is mentioned in -Remote Sensing bugzilla #1390 [no longer available] and -http://www.asmail.be/msg0054766825.html

  • -
  • tif_dirread.c: Added special function to handle -SubjectDistance EXIF tag as per bug -Remote Sensing bugzilla #1362 [no longer available]

  • -
  • tif_dirread.c, tif_read.c: Type of the byte counters -changed from tsize_t to uint32 to be able to work with data arrays -larger than 2GB. Fixes bug -Remote Sensing bugzilla #890 [no longer available]. -Idea submitted by Matt Hancher.

  • -
  • tif_dir.c: Workaround for incorrect TIFFs with -ExtraSamples == 999 produced by Corel Draw. As per bug -Remote Sensing bugzilla #1490 [no longer available]

  • -
  • tif_write.c: TIFFAppendToStrip() - clear sorted flag if -we move a strip. -Remote Sensing bugzilla #1359 [no longer available]

  • -
  • tif_fax3.c: Save the state of printdir codec dependent method.

  • -
  • tif_jpeg.c: Save the state of printdir codec dependent method -as per bug -Remote Sensing bugzilla #1273 [no longer available]

  • -
  • tif_win32.c: Fixed problem with offset value manipulation -as per bug -Remote Sensing bugzilla #1322 [no longer available]

  • -
  • tif_fax3.c, tif_next.c, tif_pixarlog.c: Fixed multiple -vulnerabilities, as per Gentoo bug (): -http://bugs.gentoo.org/show_bug.cgi?id=142383

  • -
  • tif_lzw.c, tif_zip.c: Fixed problems with mixing -encoding and decoding on the same read-write TIFF handle. The LZW -code can now maintain encode and decode state at the same time. The -ZIP code will switch back and forth as needed. -Remote Sensing bugzilla #757 [no longer available]

  • -
  • tif_msdos.c: Avoid handle leak for failed opens. -c/o Thierry Pierron

  • -
  • tif_dirwrite.c: take care not to flush out buffer of strip/tile -data in _TIFFWriteDirectory() if TIFF_BEENWRITING not set. Relates -to bug report by Peng Gao with black strip at bottom of images.

  • -
  • tif_dirwrite.c: make sure to use uint32 for wordcount in -TIFFWriteNormalTag() if writecount is VARIABLE2 for ASCII fields. -It already seems to have been done for other field types. Needed -for tiffset on files with geotiff ascii text.

  • -
  • tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961).

  • -
  • tif_dirread.c: Move IFD fetching code in the separate -function TIFFFetchDirectory() avoiding code duplication in -TIFFReadDirectory() and TIFFReadCustomDirectory().

  • -
  • tif_readdir.c: Added case in EstimateStripByteCounts() for tiled -files. Modified TIFFReadDirectory() to not invoke -EstimateStripByteCounts() for case where entry 0 and 1 are unequal but -one of them is zero. -Remote Sensing bugzilla #1204 [no longer available]

  • -
  • tif_open.c, tif_dirread.c, tiffiop.h: Move IFD looping -checking code in the separate function TIFFCheckDirOffset().

  • -
  • tif_aux.c: Added _TIFFCheckRealloc() function.

  • -
  • tif_fax3.c: Fixed problems in fax decoder as per bug -Remote Sensing bugzilla #1194 [no longer available]

  • -
  • tif_jbig.c: Added support for JBIG compression scheme -(34661 code) contributed by Lee Howard. As per bug -Remote Sensing bugzilla #896 [no longer available].

  • -
  • tif_getimage.c: Added support for planarconfig separate -non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]).

  • -
  • tif_getimage.c: Revision of all RGB(A) put routines:

    -
      -
    • Conversion of unassociated alpha to associated alpha -now done with more performant LUT, and calculation more -correct.

    • -
    • Conversion of 16bit data to 8bit data now done with -more performant LUT, and calculation more correct

    • -
    • Bugfix of handling of 16bit RGB with unassociated alpha

    • -
    -
  • -
  • tif_ojpeg.c: totally new implementation

  • -
  • tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling -of OJPEG images in favor of tif_getimage.c native handling of -YCbCr and desubsampling.

  • -
  • tif_jpeg.c: JPEGVSetField() so that altering the photometric -interpretation causes the "upsampled" flag to be recomputed. Fixes -peculiar bug where photometric flag had to be set before jpegcolormode -flag.

  • -
-
-
-

Tools changes

- -
-
-

Contributed software changes

-
    -
  • contrib/addtiffo/tif_overview.c: Fix problems with odd sized -output blocks in TIFF_DownSample_Subsampled() -(Remote Sensing bugzilla #1542 [no longer available]).

  • -
  • contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. -Though it is still far from the state of being working and useful.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.1.html deleted file mode 100644 index d4f54e7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.1.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.1

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.1 (tag Release-v3-9-1)

Previous Version

v3.9.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • This is a bug-fix release for several bugs (two of which -are dire) which were discovered in the 3.9.0 release.

  • -
-
-
-

Software configuration changes

-
    -
  • Several defines were missing from tif_config.vc.h which -are necessary to compile the library using MSVC.

  • -
  • Colorized tests were actually not enabled as expected. -Parallel tests mode is now also enabled so that tests can be -run in parallel, and test output is sent to .log files.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_write.c (TIFFAppendToStrip()): Remove cast -which caused libtiff to output a wrong last strip with -byte-count and strip-offset of zero. This cast was added on -the day of the 3.9.0 release.

  • -
  • libtiff/tif_dirwrite.c: Back out changes from 2007-11-22 -that resulted in the final strip not being written in some -circumstances. -MapTools bugzilla #2088

  • -
-
-
-

Tools changes

-

None

-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.2.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.2.html deleted file mode 100644 index 60508cb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.2.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.2

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.2 (tag Release-v3-9-2)

Previous Version

v3.9.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • Fixes a number of bugs present in the 3.9.1 release.

  • -
  • OJPEG support updated to work with IJG JPEG 7 release.

  • -
  • tiffcrop validated for most TIFF storage subformats and sample depths.

  • -
-
-
-

Software configuration changes

-
    -
  • x86_64 now uses the same default fill order as i386.

  • -
-
-
-

Library changes

-
    -
  • Writing tags with an array value of type TIFF_DOUBLE now -returns correct error status. The TIFFTAG_SMINSAMPLEVALUE and -TIFFTAG_SMAXSAMPLEVALUE tags failed to write without this fix.

  • -
  • OJPEG decoder now works with IJG JPEG 7. Resolves "Bug -2090 - OJPEG crash with libjpeg v7". -MapTools bugzilla #2090

  • -
  • Eliminate most GCC "dereferencing type-punned pointer" -warnings.

  • -
-
-
-

Tools changes

-
    -
  • New tiffcrop from Richard Nolde. Major updates to add -significant functionality for reading and writing tile based -images with bit depths not a multiple of 8 which cannot be -handled by tiffcp.

  • -
  • Allow building tools with GCC using the -Wformat --Werror=format-security flags.

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.3.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.3.html deleted file mode 100644 index defb595..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.3.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.3 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.3

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.3 (tag Release-v3-9-3)

Previous Version

v3.9.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

- -
-
-

Software configuration changes

-
    -
  • libtool is updated to version 2.2.10.

  • -
-
-
-

Library changes

-
    -
  • Fix a couple of issues that trigger failures in some -cases when using TIFFReadScanline() with JPEG compressed -subsampled ycbcr images. -MapTools bugzilla #1936

  • -
  • Ensure tile and scanline sizes are reset when moving to -new directories. -MapTools bugzilla #1936

  • -
  • Do not generate a JPEGTables tag when creating the JPEG -TIFF as is is not required in order to prevent it from being -unused and filled with invalid data. (Leave it to be -generated by later activity.) -MapTools bugzilla #2135

  • -
  • Don't return error on badly-terminated MMR strips. -MapTools bugzilla #2029

  • -
  • Have TIFFTAG_REFERENCEBLACKWHITE always print 6 floats -instead of 2*SamplesPerPixel. -MapTools bugzilla #2186

  • -
  • Ensure that JPEG quality is always set in -JPEGPreEncode(), not just when we want to output local tables. -Otherwise the quality used during compression may not be right -and might not match the tables in the tables tag. This bug -only occurs when seeking between directories in the midst of -writing blocks. GDAL trac #3539

  • -
  • OJPEG: Report an error and avoid a crash if the input -file is so broken that the strip offsets are not defined.

  • -
  • Eliminate FAX3 decoder buffer overrun possibility -(CVE-2010-1411).

  • -
  • Restore ReferenceBlackWhite as a non-custom field. This -avoids a multi-thread reentrancy problem as well as fixing -output of wrong tag value due to redundant definitions for the -same tag in the tiffFieldInfo[] array. Resolves -MapTools bugzilla #2185

  • -
-
-
-

Tools changes

-
    -
  • tiff2pdf: Write the JPEG SOI headers into the TIFF strip -data rather than skipping them. This fixes the ability to view in -Acrobat Reader, Evince, and Ghostscript. -MapTools bugzilla #2135

  • -
  • ppm2tiff: While case for parsing comment line -requires extra parenthesis to work as expected. Reported by -Thomas Sinclair.

  • -
  • tiffcp: add a new option -x to force merged tiff -file PAGENUMBER value in sequence for users who care the page -sequence, this will also prevent tiff2pdf from creating pdf file from -the merged tiff file with wrong page sequence.

  • -
  • tiffcp: Applied Tom Lane's patch to reject YCbCr -subsampled data since tiffcp currently doesn't support it. -MapTools bugzilla #2097

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.4.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.4.html deleted file mode 100644 index ba7bd92..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.4.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.4 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.4

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.4 (tag Release-v3-9-4)

Previous Version

v3.9.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • Complete the fixes for CVE-2009-2347.

  • -
  • tiffcrop now supports custom page sizes.

  • -
-
-
-

Software configuration changes

-
    -
  • None.

  • -
-
-
-

Library changes

-
    -
  • Fixed inadequate validation of the SubjectDistance field.

  • -
  • Fixed bad handling of out of order tags definated late by a codec.

  • -
  • Avoid re-preparing jpeg tables unnecessarily.

  • -
-
-
-

Tools changes

-
    -
  • tiffcrop: Added an option to allow the user to specify a -custom page size on the command line. Fix the case where a -page size specified with a fractional part was being coerced -to an integer by retyping the variables that define the paper -size. Corrected European page size dimensions.

  • -
  • tiff2rgba: Completed fixes for "CVE-2009-2347 libtiff: -integer overflows in various inter-color space conversion -tools". MapTools bugzilla #2079

  • -
  • tiff2pdf: Fix assorted bugs in tiff2pdf: missing return -in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely -wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual -size is larger. Also, there are a bunch of places that try to -memset() a malloc'd buffer before checking for malloc failure, which -would result in core dump if there actually were a failure.

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.5.html b/third_party/libtiff/doc/html-prebuilt/releases/v3.9.5.html deleted file mode 100644 index 9d66e70..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v3.9.5.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - Changes in TIFF v3.9.5 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v3.9.5

- - - - - - - - - - - - - - - - -
References

Current Version

v3.9.5 (tag Release-v3-9-5)

Previous Version

v3.9.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

http://www.simplesystems.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • configure.ac: Should use AC_CANONICAL_HOST since host specifies -the run-time target whereas target is used to specify the final -output target if the package is a build tool (like a compiler), -which libtiff is not. Resolves MapTools bugzilla #2307 "Use -AC_CANONICAL_HOST macro".

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_getimage.c: Check the number of samples per pixel when -working with YCbCr image in PickContigCase(). As per bug -MapTools bugzilla #2216

  • -
  • libtiff/tif_dir.c: Set the bogus post-decoding hook when processing -TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when -we don't need any post-processing. That helps to reset the hook if we -previously set this field to some other value and the hook was -initialized accordingly. As per bug -MapTools bugzilla #2035

  • -
  • libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned -integer type conversions. As per bug -MapTools bugzilla #2207

  • -
  • libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() -and _TIFFFieldWithName() if the tag is not found in the tag table. -This should be normal situation and returned NULL value should be -properly handled by the caller.

  • -
  • libtiff/tif_dirwrite.c, tif_print.c: Properly handle DotRange -tag as it can be either byte or short size and should be set and read -by value, not as an array. As per bug -MapTools bugzilla #2116

  • -
  • libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() -to expected value as the warning message suggests. As per bug -MapTools bugzilla #1963

  • -
  • libtiff/tif_open.c: Fix mode check before opening a file. -MapTools bugzilla #1906

  • -
  • libtiff/tif_jpeg.c, libtiff/tif_strip.c: apply patch for -CVE-2010-3087 per bug -MapTools bugzilla #2140

  • -
  • libtiff/tif_dirread.c: fix crash when reading a badly-constructed -TIFF per MapTools bugzilla #1994

  • -
  • libtiff/tif_ojpeg.c: fix buffer overflow on problem data -MapTools bugzilla #1999

  • -
  • libtiff/tif_dirread.c: modify warnings -MapTools bugzilla #2016

  • -
  • libtiff/tif_jpeg.c: fix use of clumplines calculation -MapTools bugzilla #2149

  • -
  • libtiff/tif_color.c: prevent crash in handling bad TIFFs -resolves CVE-2010-2595, -MapTools bugzilla #2208

  • -
  • libtiff/tif_dirread.c: fix needless tag ordering warning -MapTools bugzilla #2210

  • -
  • libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order -to improve compatibility with various viewers -submitted by e-mail from Dwight Kelly

  • -
  • libtiff/tif_strip.c: use TIFFGetFieldDefaulted() instead -of TIFFGetField() when we assume that it will succeed -MapTools bugzilla #2215

  • -
  • libtiff/tif_dirread.c: tolerate some cases where -FIELD_COLORMAP is missing -MapTools bugzilla #2189

  • -
  • libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images -caused by commit on 2010-12-14. Submitted by e-mail from -Even Rouault

  • -
  • libtiff/tif_dirwrite.c: Avoid undefined behaviour when casting from -float to unsigned int in TIFFWriteRationalArray() as reported by -Kareem Shehata.

  • -
  • libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding -a move left. Without this, a malicious input file can generate an -indefinitely large series of runs without a0 ever reaching the right -margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. -This is a modified version of a patch proposed by Drew Yao of Apple -Product Security. It adds an unexpected() report, and disallows the -equality case, since emitting a run without increasing a0 still allows -buffer overrun.

  • -
  • libtiff/tif_fax3.h: Fix to last change allowing zero length -runs at the start of a scanline---needed for legal cases.

  • -
  • libtiff/tif_thunder.c: Correct potential buffer overflow with -thunder encoded files with wrong bitspersample set. The libtiff -development team would like to thank Marin Barbella and TippingPoint's -Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, -CVE-2011-1167). -MapTools bugzilla #2300

  • -
  • libtiff/tiffiop.h: avoid declaring int64/uint64 on AIX with XLC -where they are already available. (MapTools bugzilla #2301)

  • -
-
-
-

Tools changes

-
    -
  • tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr -subsampled data since tiffcrop currently doesn't support it. Fix -JPEG support.

  • -
  • tools/tiffcp.c: Initialize buffer arrays with zero to avoid -referencing to uninitialized memory in some cases (e.g. when tile size -set bigger than the image size).

  • -
  • tools/tiff2pdf.c: Better generation of ID field in -t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings.

  • -
  • tools/tiff2pdf.c: Fixed computation of the tile buffer size when -converting JPEG encoded tiles.

  • -
  • tools/tiff2pdf.c: Better handling of string fields, use static -string buffers instead of dynamically allocated, use strncpy() instead -of strcpy(), control the string lengths.

  • -
  • tools/tiff2bw.c, tools/thumbnail.c, tools/pal2rgb.c: Fix the count for -WhitePoint tag as per bug -MapTools bugzilla #2042

  • -
  • tools/tiffdump.c: Use PrintData() function instead of -PrintByte()/PrintShort()/PrintLong(). Should fix an issue reported at -MapTools bugzilla #2116

  • -
  • tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, -TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE -which should be set by value.

  • -
  • tools/tiffdump.c: Avoid integer overflows computing the buffer size -for large directories. As per bug -MapTools bugzilla #2218

  • -
  • tools/tiff2pdf.c: Fixed ID buffer filling in -t2p_write_pdf_trailer(), thanks to Dmitry V. Levin.

  • -
  • tools/tiffcrop.c: Patch from Richard Nolde to avoid a -potentially unterminated buffer due to using an exceptionally long -file name.

  • -
  • tools/tiff2ps.c: improvements and enhancements from Richard Nolde -with additional command line options for Document Title, -Document Creator, and Page Orientation

  • -
  • tools/tiffsplit.c: abort when reading a TIFF without a byte-count -per MapTools bugzilla #1996

  • -
  • tools/tiff2pdf.c: add fill-page option -MapTools bugzilla #2051

  • -
  • tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() -MapTools bugzilla #2118

  • -
  • tools/tiff2pdf.c: fix colors for images with RGBA -interleaved data -MapTools bugzilla #2250

  • -
  • tools/tiffcrop.c: new release by Richard Nolde -MapTools bugzilla #2004

  • -
  • tools/fax2ps.c: be consistent with page-numbering -MapTools bugzilla #2225

  • -
  • tools/gif2tiff.c: fix buffer overrun -MapTools bugzilla #2270

  • -
  • tools/fax2ps.c (main()): Use tmpfile() rather than mkstemp() since -it is much more portable. Tmpfile is included in ISO/IEC -9899:1990 and the WIN32 CRT.

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.0.html deleted file mode 100644 index e2a371e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.0.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.0

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.0 (tag Release-v4-0-0)

Previous Version

v3.9.5

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. Please consult -the ChangeLog file in the source package for full change details. The -following information is located here:

-
-

Major changes

-

BigTIFF support changes:

-
    -
  • The options parameter in the TIFFOpen() and TIFFClientOpen() funcs has -been extended. When creating new files, you can add option 4 to -specify you want to create a ClassicTIFF file, though that is the -default and the option is not strictly necessary. (As such, old -calling code will continue to function and create ClassicTIFF files.) -Or you can add option 8 to specify you want to create a BigTIFF file -instead. This new option is also reflected in some of the tools we -already upgraded. For instance, you can use the -8 option on tiffcp to -have tiffcp produce BigTIFF files instead of the default ClassicTIFF. -(Whilst an additional option is provided for version selection when -creating new files, no such option is necessary when reading TIFF -files. LibTiff reads ClassicTIFF and BigTIFF both, and the application -does not need to be aware which TIFF version an opened file is.)

  • -
  • Although the tag count in BigTIFF is 64bit, we restricted the -count in the implementation to a much more reasonable size. This is -necessary in current implementation, because all tag data gets read -automatically in the IFD reading stage, so if there's half a dozen -private tags with multiple gigabytes of data that causes considerable -overhead even if the application level is never interested in these -tags. Our choice to ignore tags with data longer then a certain sanity -value is much needed as things stand. We also recommend to step away -from writing tiles that are 8 kilobyte in their uncompressed form, or -writing single-line strips, in really big files, resulting in mega's -of tiles or strips. It's much more efficient to choose bigger tile or -strip sizes, up to several megabyte if needed, and have a few kilo of -tiles or strips instead.

  • -
  • Although it's rare, some application code does directly access -file offsets. Some of these are automatically upgraded because they -used the toff_t type, others need to be aware that the datatype -changed and need to start using toff_t or uint64. This impacts access -to tags like the EXIF IFD tag, for example, or the SubIfds tag, or to -StripOffsets or TileOffsets, the return type of functions like -TIFFCurrentDirOffset(), and a parameter type to functions like -TIFFSetSubDirectory().

  • -
  • Although it's rare, some application code does use structures -like TIFFHeader or TIFFDirEntry that used to be an exact binary -representation of TIFF structures. These need to change. The old -TIFFHeader structure is replaced by the new TIFFHeaderClassic, -TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact -binary representation of the ClassicTIFF and BigTIFF header, and of -the part that is common to both. There is no new equivalent for the -old TIFFDirEntry structure (or more precisely, there is still a -TIFFDirEntry structure, but it is changed, moved to library-private -definition, and no longer an exact binary representation of the tag -structure of either TIFF version).

  • -
  • Sizer functions, like TIFFTileSize() or TIFFScanlineSize() and the -like, return a tmsize_t() value (tmsize_t() is defined as int32 on 32bit -machines, and int64 on 64bit machines, and as such it is meant to -represent signed memory sizes). This is because we figure 98% of the -calling code uses the return value as sizes in allocations and the -like. So, any overflow that is theoretically possible with BigTIFF -when LibTiff is running on a 32bit system, is best detected inside the -sizer functions and it is best to return a type that makes sense as a -memory size. If your calling code is the exception and is interested -in actual file size, you best use the newer TIFFTileSize64() or -TIFFScanlineSize64() function that returns an uint64 type.

  • -
  • These TIFF tags require a 64-bit type as an argument in -libtiff 4.0.0:

    -
      -
    • TIFFTAG_FREEBYTECOUNTS

    • -
    • TIFFTAG_FREEOFFSETS

    • -
    • TIFFTAG_STRIPBYTECOUNTS

    • -
    • TIFFTAG_STRIPOFFSETS

    • -
    • TIFFTAG_TILEBYTECOUNTS

    • -
    • TIFFTAG_TILEOFFSETS

    • -
    -
  • -
-

Other important backward incompatible changes in the public API:

-
    -
  • TIFFRewriteField() renamed into _TIFFRewriteField() and moved out -from the public interface (from tiffio.h to tiffiop.h). Type of its -count parameter changed from uint32 to tmsize_t.

  • -
  • TIFFMergeFieldInfo() returns non-void result now. It returns 0 -if successful and -1 if failed. Though this is now obsoleted function -and should not be used in new programs. Use the new tag extension -scheme instead.

  • -
  • TIFFFieldWithTag() and TIFFFieldWithName() functions now return -pointer to TIFFField constant object instead of TIFFFieldInfo.

  • -
  • TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration -have been removed. They was unused and never been used properly. -Should be unneeded for high-level applications.

  • -
  • TIFFTagValue structure removed from the public tiffio.h -to private tif_dir.h and not accessible anymore. It should be unneeded -for high-level applications.

  • -
-
-
-

Software configuration changes

-

Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4.

-
    -
  • Enabled support for Automake silent build rules -(--enable-silent-rules or make V=0)

  • -
  • Enabled support for Automake colorized and parallel tests.

  • -
  • Added detection of 64-bit integer types since libtiff 4.0 -requires use of 64-bit signed and unsigned integer types.

  • -
  • Libtiff now provides a more comprehensive test suite with -over 72 tests, which may be executed on Unix-like systems, or -under Microsoft Windows using MinGW/MSYS or Cygwin.

  • -
  • --disable-lzma configure option to disable use of liblzma.

  • -
  • --enable-defer-strile-load configure option to enable -experimental deferred strip/tile offset/size loading. May -cause some extremely sophisticated uses of libtiff to fail.

  • -
  • --enable-chunky-strip-read configure option to enable -experimental enable reading large strips in chunks in -TIFFReadScanline().

  • -
  • Now always uses WIN32 native I/O functions for Microsoft -Windows except for under Cygwin.

  • -
  • Now provides a pkg-config support file (libtiff-4.pc).

  • -
-
-
-

Library changes

-
    -
  • Patches/fixes made to stable libtiff (v3.9.X) are also -applied to 4.0.0. There are too many to list here. See the -distribution ChangeLog for a detailed change list.

  • -
  • There is considerable change in some files like -tif_dirread() and tif_dirwrite(). These changes don't impact -backwards compatibility, they are mostly a clean rewrite that -does allow BigTIFF support as well as somewhat more robust -reading of the unexpected already and will also serve future -API extension but does not impact current API or functionality -in a negative way that you need to know about.

  • -
  • Although there is still a functional definition for types -like toff_t (file offset), tstrip_t (strip index number), etc, -we recommend against using these in newer code. We have -learned that it is next to impossible to use these -consistently and make real abstraction of the binary format of -these types. Instead, at a certain level we always end up -doing casts anyway, and taking the exact binary format into -account, so these types are nothing but dangerously misleading -and obfuscating. You do not need to update calling code that -uses them, as 99.9% of such code will continue to work. But we -recommend against using them in newer calling code, and we -started replacing them with binary clear types like uint16, -uint32 and such in the library.

  • -
  • We do use and will continue to use one functional type -that is an exception to the above rule, being tmsize_t. This -is a signed memory size type, i.e. it is int32 on 32bit -machines, or int64 on 64bit machines.

  • -
  • Optionally support LZMA compression via TIFF tag 34925. -tiffcp supports compression levels similar to -c lzma:p1 or --c zip:p9 for setting the LZMA compression parameters.

  • -
  • Optionally defer the load of strip/tile offset and size -tags for optimized scanning of directories. Enabled with the ---enable-defer-strile-load configure option (DEFER_STRILE_LOAD -#define in tif_config.h).

  • -
  • Optionally enable experimental support for reading big -strips in chunks. Enabled with the --enable-chunky-strip-read -configure option.

  • -
-
-
-

Tools changes

-
    -
  • tiffset: add -d and -sd switches to allow operation on -a particular directory, not just the first.

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.1.html deleted file mode 100644 index 3b6d19f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.1.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.1

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.1 (tag Release-v4-0-1)

Previous Version

v4.0.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • --enable-ld-version-script: New configure option to -enable shared library symbol versioning on ELF-based systems -(e.g. Linux and FreeBSD) which use the GNU linker. This -allows multiple major versions of libtiff to be loaded -simultaneously into the same application or library without -conflict, as long as all libtiffs involved are built with -versioned symbols. This option is not enabled by default.

  • -
  • Added libtiff private dependency on -llzma for pkg-config.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around -assumption tag fetching is always successful.

  • -
  • libtiff/tif_jpeg.c: Extra caution for case where sp is NULL.

  • -
-
-
-

Tools changes

-
    -
  • None

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.10.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.10.html deleted file mode 100644 index d5beeff..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.10.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.10 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.10

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.0.10 (tag v4.0.10)

Previous Version

v4.0.9

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at -Gitlab. -This is the first release to be made from the new Git repository.

  • -
-
-
-

Software configuration changes

-
    -
  • Minimum CMake version is now v2.8.11 for the CMake-based build.

  • -
  • Libwebp will be automatically detected and used by configure/cmake if present.

  • -
  • Libzstd will be automatically detected and used by configure/cmake if present.

  • -
-
-
-

Library changes

-
    -
  • Added ZSTD compression codec. -Zstandard or zstd as -short version, is a fast lossless compression algorithm, targeting -real-time compression scenarios at zlib-level and better -compression ratios. It's backed by a very fast entropy stage, -provided by Huff0 and FSE library.

    -

    We require libzstd >= 1.0.0 so as to be able to use streaming -compression and decompression methods.

    -

    The default compression level we have selected is 9 (range goes -from 1 to 22), which experimentally offers equivalent or better -compression ratio than the default deflate/ZIP level of 6, and -much faster compression.

    -

    For example on a 6600×4400 16bit image, tiffcp -c zip runs in -10.7 seconds, while tiffcp -c zstd runs in 5.3 -seconds. Decompression time for zip is 840 ms, and for zstd 650 -ms. File size is 42735936 for zip, and 42586822 for zstd. Similar -findings on other images.

    -

    On a 25894×16701 16bit image:

    - - - - - - - - - - - - - - - - - - - - - -
    Compressor Relative Performance

    Compressor

    Compression time

    Decompression time

    File size

    ZSTD

    35 s

    3.2 s

    399,700,498

    ZIP/Deflate

    1m 20 s

    4.9 s

    419,622,336

    -

    Please note that COMPRESSION_ZSTD is self-assigned the id 50000 -by the libtiff project and is not officially registered with Adobe -since Adobe's registration function is defunct.

    -
  • -
  • Added WebP compression codec.

    -

    WebP is -a high performance compressor intended for photos as commonly used -on the Web. The WebP encoder is not designed for huge images, but -serves very well for compressing strips and tiles in TIFF as long -as the strips or tiles do not exceed the capability of the -encoder.

    -

    As a test of compression performance metrics, GraphicsMagick -was used on an extremely high quality 8-bit TIFF image from a -Hasselblad H4D-200MS camera with pixel dimensions of -16352×12264. The image was re-encoded with 1024×1024 tiles and -various compression algorithms, using default settings for each -algorithm. Based on this test, the compression and decompression -performance (in iterations per second), the resulting file size, -and the calculated total PSNR are provided here. It can be seen -that WebP provided excellent encode and decode performance, and -the compressed file size was very small:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Compressor Relative Performance

    Compressor

    Compression

    Decompression

    File size

    PSNR

    None

    0.536 iter/s

    1.506 iter/s

    576.03MiB

    ∞

    LZW

    0.105 iter/s

    0.266 iter/s

    270.68MiB

    ∞

    ZStd

    0.020 iter/s

    0.518 iter/s

    238.42MiB

    ∞

    LZMA

    0.009 iter/s

    0.056 iter/s

    247.61MiB

    ∞

    ZIP

    0.009 iter/s

    0.301 iter/s

    247.88MiB

    ∞

    JPEG

    0.446 iter/s

    0.760 iter/s

    18.59MiB

    39.00

    WebP

    0.019 iter/s

    0.330 iter/s

    9.38MiB

    37.78

    -

    Please note that COMPRESSION_WEBP is self-assigned the id 50001 -by the libtiff project and is not officially registered with Adobe -since Adobe's registration function is defunct.

    -
  • -
  • TIFFPrintDirectory(): fix null pointer dereference on corrupted -file. Fixes Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF -image.

  • -
  • _TIFFVGetField(): fix heap out-of-bounds access when requesting -TIFFTAG_NUMBEROFINKS on a EXIF -directory. Fixes Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422. -Reported by Google Autofuzz project.

  • -
  • Fix a memory leak in TIFFStreamOpen(). TIFFStreamOpen() allocates a -new tiff{o,i}s_data, but if TIFFClientOpen() fails then that struct is -leaked.

  • -
  • Fix for bug 2772. It is possible to craft a TIFF document where -the IFD list is circular, leading to an infinite loop while -traversing the chain. The libtiff directory reader has a failsafe -that will break out of this loop after reading 65535 directory -entries, but it will continue processing, consuming time and -resources to process what is essentially a bogus TIFFdocument.

    -

    This change fixes the above behavior by breaking out of processing -when a TIFF document has >= 65535 directories and terminating with an -error.

    -
  • -
  • ChopUpSingleUncompressedStrip(): avoid memory exhaustion -(CVE-2017-11613). In ChopUpSingleUncompressedStrip(), if the -computed number of strips is big enough and we are in read only -mode, validate that the file size is consistent with that number of -strips to avoid useless attempts at allocating a lot of memory for -the td_stripbytecount and td_stripoffset -arrays. Fixes Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip.

  • -
  • Port code: Add strtol(), strtoll() and strtoull(). Also update -strtoul(). All use the same implementation from NetBSD libc.

  • -
  • Fix for CVE-2018-7456 "NULL pointer dereference in -TIFFPrintDirectory()".

  • -
  • TIFFWriteDirectorySec(): avoid -assertion. Fixes MapTools bugzilla #Bug 2795 - There is a reachable assertion abort in function -TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead -to remote denial of attack. (:cve:`2018-10963) -<2795>`.

  • -
  • LZWDecodeCompat(): fix potential index-out-of-bounds -write. Fixes MapTools bugzilla #Bug -2780 - A heap-buffer-overflow in function LZWDecodeCompat in -libtiff4.0.9 (:cve:`2018-8905) -<2780>`. -The fix consists in using the -similar code as LZWDecode() to validate we don't write outside of -the output buffer.

  • -
  • Remove builtin support for GUI warning and error message -boxes. Now warnings always go to the console by default unless -applications define their own warning and error handlers.

    -

    GUI applications (and Windows CE) are required to define such handlers.

    -
  • -
  • Add tag and pseudo-tag definitions for ESRI LERC codec (out of -tree codec whose source is -at https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c.

  • -
  • Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API -Fixes Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode.

  • -
  • TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit -systems with large number of strips. Probably relates -to MapTools bugzilla #Bug -2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c -(:cve:`2018-10779) -<2788>`.

  • -
  • Fix out-of-bound read on some tiled images.

  • -
  • Avoid potential int32 overflows in multiply_ms().

  • -
  • Only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS -if compression is COMPRESSION_CCITTFAX3 or -COMPRESSION_CCITTFAX4.

  • -
  • JBIG: fix potential out-of-bounds write in JBIGDecode(). Also -fix a (harmless) potential use of uninitialized memory when -tif->tif_rawsize > tif->tif_rawcc. In case libtiff is compiled with -CHUNKY_STRIP_READ_SUPPORT, make sure that whole strip data is -provided to JBIGDecode().

  • -
  • LZMAPreEncode(): emit verbose error if lzma_stream_encoder() fails -(typically because not enough memory available)

  • -
-
-
-

Tools changes

- -
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.2.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.2.html deleted file mode 100644 index 895ae3d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.2.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.2

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.2 (tag Release-v4-0-2)

Previous Version

v4.0.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • None

  • -
-
-
-

Library changes

-
    -
  • tif_getimage.c: added support for _SEPARATED CMYK images.

  • -
  • tif_getimage.c: Added support for greyscale + alpha.

  • -
  • Added TIFFCreateCustomDirectory() and TIFFCreateEXIFDirectory functions.

  • -
  • tif_print.c: Lots of fixes around printing corrupt or hostile input.

  • -
  • Improve handling of corrupt ycbcrsubsampling values.

  • -
  • tif_unix.c: use strerror() to get meaningful error messages.

  • -
  • tif_jpeg.c: fix serious bugs in JPEGDecodeRaw().

  • -
  • tif_jpeg.c: Fix size overflow (zdi-can-1221, CVE-2012-1173).

  • -
-
-
-

Tools changes

-
    -
  • tiff2pdf: Defend against integer overflows while -calculating required buffer sizes (CVE-2012-2113).

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.3.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.3.html deleted file mode 100644 index b92032d..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.3.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.3 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.3

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.3 (tag Release-v4-0-3)

Previous Version

v4.0.2

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • Updated to use Automake 1.12.4. Avoids security problem with -make distcheck (CVE-2012-3386).

  • -
-
-
-

Library changes

- -
-
-

Tools changes

-
    -
  • tiff2pdf: Fail when TIFFSetDirectory() fails. This prevents -core dumps or perhaps even arbitrary code execution when processing -a corrupt input file (CVE-2012-3401).

  • -
  • tiff2pdf: Fix two places where t2p_error didn't get set after a -malloc() failure. No crash risk AFAICS, but the program might not -report exit code 1 as desired.

  • -
-
-
-

Contributed software changes

-
    -
  • None

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4.html deleted file mode 100644 index 7a63ba2..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.4 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.4

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.4 (tag Release-v4-0-4)

Previous Version

v4.0.4beta

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

- -
-
-

Library changes

-
    -
  • TIFFNumberOfDirectories(): Coverity 1134470 "Logically dead code"

  • -
  • tif_dirread.c:

    -
      -
    • TIFFReadDirEntryDoubleArray(): Coverity 298626 "Logically dead code".

    • -
    • TIFFReadDirEntryFloatArray(): Coverity 298627 "Logically dead code".

    • -
    • TIFFReadDirEntryIfd8Array(): Coverity 298628 "Logically dead code".

    • -
    • TIFFReadDirEntrySlong8Array(): Coverity 298629 "Logically dead code"

    • -
    -
  • -
  • tif_dirwrite.c

    - -
  • -
  • tif_jpeg.c

    -
      -
    • JPEGCleanup(): Coverity 298624 "Dereference before null check".

    • -
    • JPEGDecode(): Coverity 602597 "Operands don't affect result".

    • -
    -
  • -
  • tif_getimage.c

    - -
  • -
  • tif_luv.c

    -
      -
    • LogLuvDecodeStrip(): Coverity 991239 "Division or modulo by zero".

    • -
    • LogLuvDecodeTile(): Coverity 991227 "Division or modulo by zero".

    • -
    • LogLuvEncodeStrip(): Coverity 991240 "Division or modulo by zero".

    • -
    • LogLuvEncodeTile(): Coverity 991241 "Division or modulo by zero".

    • -
    -
  • -
  • tif_lzw.c

    -
      -
    • Decode files that contain consecutive CODE_CLEAR codes.

    • -
    -
  • -
  • tif_ojpeg.c

    -
      -
    • OJPEGReadBufferFill(): Coverity 603400 "Missing break in switch".

    • -
    • OJPEGReadHeaderInfoSecStreamDht(): Coverity 601720 "Resource leak".

    • -
    -
  • -
  • tif_read.c

    -
      -
    • TIFFStartTile(): Coverity 715973 and 715974 "Division or modulo by zero".

    • -
    -
  • -
  • tif_unix.c

    - -
  • -
  • tif_write

    - -
  • -
-
-
-

Tools changes

-
    -
  • bmp2tiff

    -
      -
    • Coverity 1024225 "Untrusted value as argument".

    • -
    • Coverity 1024678 "Unchecked return value from library".

    • -
    • Coverity 1024679 "Unchecked return value from library".

    • -
    • Coverity 1214160 "Ignoring number of bytes read".

    • -
    -
  • -
  • gif2tiff

    -
      -
    • Coverity 1024222 "Untrusted value as argument".

    • -
    • Coverity 1024890 "Ignoring number of bytes read".

    • -
    • Coverity 1024891 "Ignoring number of bytes read".

    • -
    • Coverity 1024892 "Ignoring number of bytes read".

    • -
    • Coverity 1024893 "Ignoring number of bytes read".

    • -
    • Coverity 1024894 "Ignoring number of bytes read".

    • -
    -
  • -
  • ras2tiff

    -
      -
    • Corrected Sun Raster header definition to be safe for -64-bit systems. Add some header validations. Fixes many -(unspecified) Coverity issues.

    • -
    • Coverity 1024223 "Untrusted value as argument".

    • -
    • Coverity 1301206: "Integer handling issues (BAD_SHIFT)".

    • -
    -
  • -
  • raw2tiff

    -
      -
    • Coverity 1024887 "Unchecked return value from library".

    • -
    • Coverity 1024888 "Unchecked return value from library".

    • -
    • Coverity 1024889 "Unchecked return value from library".

    • -
    • Coverity 1214162 "Ignoring number of bytes read".

    • -
    -
  • -
  • tiff2pdf

    -
      -
    • MapTools bugzilla #2078: Suppress initial output of the header.

    • -
    • MapTools bugzilla #2150: Change ColorTransform from "0" to "1".

    • -
    • Take care in using the return value from snprintf().

    • -
    • Coverity 1024181 "Structurally dead code".

    • -
    • Coverity 1024181 "Structurally dead code".

    • -
    • Coverity 1227690 "Unused value".

    • -
    • Coverity 298621 "Resource leak".

    • -
    -
  • -
  • tiff2ps

    -
      -
    • Correct sizing and scaling problems with output document.

    • -
    -
  • -
  • tiffcp

    -
      -
    • Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak".

    • -
    -
  • -
  • tiffcrop

    -
      -
    • Correctly copy the compression tag from the source TIFF.

    • -
    • Coverity 1024545 "Division or modulo by zero".

    • -
    • Coverity 1024586 "Logically dead code".

    • -
    • Coverity 1024796 "Nesting level does not match indentation".

    • -
    • Coverity 1024797 "Nesting level does not match indentation".

    • -
    • Coverity 1294542 "Logical vs. bitwise operator".

    • -
    • Coverity 1299740 "Out-of-bounds write".

    • -
    • Coverity 1299741 "Dereference before null check".

    • -
    -
  • -
  • tiffdither

    -
      -
    • Check memory allocations for failure. Also check -multiplication overflow. (Fixes #2501, CVE-2014-8128)

    • -
    -
  • -
  • tiffgt.c

    - -
  • -
  • tiffmedian

    -
      -
    • Coverity 1024386 "Out-of-bounds read".

    • -
    • Coverity 1024386 "Out-of-bounds read".

    • -
    • Coverity 1024795 "Nesting level does not match indentation".

    • -
    • Coverity 1024795 "Nesting level does not match indentation".

    • -
    -
  • -
-

tiffsplit

-
-
    -
  • Coverity 1024304 "Resource leak".

  • -
  • Coverity 1024305 "Resource leak".

  • -
-
-
-
-

Contributed software changes

-
    -
  • addtiffo

    -
      -
    • Check buffer size calculation for overflow.

    • -
    • Coverity 298615 "Resource leak".

    • -
    • Coverity 1024649 "Unintended sign extension".

    • -
    -
  • -
  • iptcutil

    -
      -
    • Coverity 1024468 "Infinite loop".

    • -
    • Coverity 1024727 "Truncated stdio return value".

    • -
    • Coverity 1214240 "Untrusted loop bound".

    • -
    -
  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4beta.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4beta.html deleted file mode 100644 index 38ae74a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.4beta.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.4beta — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.4beta

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.4beta (tag Release-v4-0-4beta)

Previous Version

v4.0.3

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • Updated to use Automake 1.15 and Libtool 2.4.5

  • -
-
-
-

Library changes

-
    -
  • TIFFCheckDirOffset(): avoid uint16 overflow -when reading more than 65535 directories, and effectively error out when -reaching that limit.

  • -
  • TIFFNumberOfDirectories(): generate error in case of directory count -overflow.

  • -
  • TIFFAdvanceDirectory(): If nextdir is found to -be defective, then set it to zero before returning error in order -to terminate processing of truncated TIFF.

  • -
  • JPEG-in-TIFF: recognize SOF2, SOF9 and SOF10 -markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. -Note: the default settings of mozjpeg will produce progressive scans, which -is forbidden by the TechNote.

  • -
  • JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused -all tiles/strips to include quantization tables even when the jpegtablesmode -had the JPEGTABLESMODE_QUANT bit set. -Also add explicit removal of Huffman tables when jpegtablesmode has the -JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the -first tile/strip (only useful in update scenarios. create-only was -fine)

  • -
  • JPEG-in-TIFF: fix segfault in JPEGFixupTagsSubsampling() on -corrupted image where tif->tif_dir.td_stripoffset == NULL. -(MapTools bugzilla #2471)

  • -
  • NeXT codec: add new tests to check that we don't read outside of -the compressed input stream buffer.

  • -
  • NeXT codec: check that BitsPerSample = 2. Fixes -MapTools bugzilla #2487 (CVE-2014-8129)

  • -
  • NeXT codec: in the "run mode", use tilewidth for tiled images -instead of imagewidth to avoid crash

  • -
  • tif_getimage.c: in OJPEG case, fix checks on strile width/height -in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and -putcontig8bitYCbCr21tile cases.

  • -
  • in TIFFDefaultDirectory(), reset any already existing -extended tags installed by user code through the extender mechaninm before -calling the extender callback (GDAL #5054)

  • -
  • Fix warnings about unused parameters.

  • -
  • Fix various typos in comments found by Debian lintian tool (GDAL #5756)

  • -
  • tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. -(MapTools bugzilla #2235)

  • -
  • tif_dirread.c: In EstimateStripByteCounts(), check return code -of _TIFFFillStriles(). This solves crashing bug on corrupted -images generated by afl.

  • -
  • tif_read.c: fix several invalid comparisons of a uint64 value with -<= 0 by casting it to int64 first. This solves crashing bug on corrupted -images generated by afl.

  • -
  • TIFFSetField(): refuse to set negative values for -TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing -the directory

  • -
  • TIFFReadDirectory(): refuse to read ColorMap or -TransferFunction if BitsPerSample has not yet been read, otherwise reading -it later will cause user code to crash if BitsPerSample > 1

  • -
  • TIFFRGBAImageOK(): return FALSE if LOGLUV with -SamplesPerPixel != 3, or if CIELAB with -SamplesPerPixel != 3 or BitsPerSample != 8

  • -
  • -
    tif_config.vc.h: no longer use #define snprintf _snprintf with

    Visual Studio 2015 aka VC 14 aka MSVC 1900

    -
    -
    -
  • -
  • LZW codec: prevent potential null dereference of sp->dec_codetab in LZWPreDecode() -(MapTools bugzilla #2459)

  • -
  • TIFFReadBufferSetup(): avoid passing -1 size -to TIFFmalloc() if passed user buffer size is 0 -(MapTools bugzilla #2459)

  • -
  • TIFFReadDirEntryOutputErr(): Incorrect -count for tag should be a warning rather than an error since -errors terminate processing.

  • -
  • tif_dirinfo.c (TIFFField) : Fix data type for TIFFTAG_GLOBALPARAMETERSIFD tag.

  • -
  • Add definitions for TIFF/EP CFARepeatPatternDim and CFAPattern tags -(MapTools bugzilla #2457)

  • -
  • tif_codec.c, tif_dirinfo.c: Enlarge some fixed-size buffers that weren't -large enough, and eliminate substantially all uses of sprintf(buf, -...) in favor of using snprintf(buf, sizeof(buf), ...)

  • -
  • configure.ac: Improve pkg-config static linking by adding -lm to Libs.private when needed.

  • -
  • tif_write.c: tmsize_t related casting warning fixed for -64bit linux.

  • -
  • tif_read.c: uint64/tmsize_t change for MSVC warnings. -(MapTools bugzilla #2427)

  • -
  • Fix TIFFPrintDirectory() handling of -field_passcount fields: it had the TIFF_VARIABLE and -TIFF_VARIABLE2 cases backwards.

  • -
  • PixarLog codec: Improve previous patch for CVE-2012-4447 -(to enlarge tbuf for possible partial stride at end) so that -overflow in the integer addition is detected.

  • -
  • tif_unix,vms,win32.c (_TIFFmalloc()): ANSI C does not -require malloc() to return NULL pointer if requested allocation -size is zero. Assure that _TIFFmalloc() does.

  • -
  • tif_zip.c: Avoid crash on NULL error messages.

  • -
-
-
-

Tools changes

-
    -
  • tiff2pdf Fix various crashes and memory buffer access errors (oCERT-2014-013).

  • -
  • tiff2pdf fix buffer overflow on some YCbCr JPEG compressed images. -(MapTools bugzilla #2445)

  • -
  • tiff2pdf fix buffer overflow on YCbCr JPEG compressed image. -(MapTools bugzilla #2443)

  • -
  • tiff2pdf check return code of TIFFGetField() when reading TIFFTAG_SAMPLESPERPIXEL

  • -
  • tiff2pdf fix crash due to invalid tile count.

  • -
  • tiff2pdf Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB

  • -
  • tiff2pdf Assure that memory size calculations for -_TIFFmalloc() do not overflow the range of tmsize_t.

  • -
  • tiff2pdf Avoid crash when TIFFTAG_TRANSFERFUNCTION tag returns one channel, -with the other two channels set to NULL.

  • -
  • tiff2pdf close PDF file. (MapTools bugzilla #2479)

  • -
  • tiff2pdf Preserve input file directory order when pages -are tagged with the same page number.

  • -
  • tiff2pdf.c terminate after failure of allocating ycbcr buffer -(MapTools bugzilla #2449, CVE-2013-4232)

  • -
  • tiff2pdf Rewrite JPEG marker parsing in -t2p_process_jpeg_strip() to be at least marginally competent. The -approach is still fundamentally flawed, but at least now it won't -stomp all over memory when given bogus input. Fixes CVE-2013-1960.

  • -
  • tiffdump Guard against arithmetic overflow when calculating allocation buffer sizes.

  • -
  • tiffdump fix crash due to overflow of entry count.

  • -
  • tiffdump Fix double-free bug.

  • -
  • tiffdump detect cycle in TIFF directory chaining. -(MapTools bugzilla #2463)

  • -
  • tiffdump avoid passing a NULL pointer to read() if seek() failed before. -(MapTools bugzilla #2459)

  • -
  • tiff2bw when Photometric = RGB, the utility only works if SamplesPerPixel = 3. Enforce that. -(:bugzilla:2485`, CVE-2014-8127)

  • -
  • pal2rgb, thumbnail: fix crash by disabling TIFFTAG_INKNAMES copying. -(MapTools bugzilla ##2484, CVE-2014-8127)

  • -
  • thumbnail fix out-of-buffer write. -(MapTools bugzilla #2489, CVE-2014-8128)

  • -
  • thumbnail, tiffcmp: only read/write TIFFTAG_GROUP3OPTIONS -or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or -COMPRESSION_CCITTFAX4. -(MapTools bugzilla #2493, CVE-2014-8128)

  • -
  • tiffcp fix crash when converting YCbCr JPEG-compressed to none. -(MapTools bugzilla #2480)

  • -
  • bmp2tiff fix crash due to int overflow related to input BMP dimensions

  • -
  • tiffcrop fix crash due to invalid TileWidth/TileHeight

  • -
  • tiffcrop fix segfault if bad value passed to -Z option -(MapTools bugzilla #2459) and add missing va_end in dump_info()

  • -
  • thumbnail, tiffcrop: "fix" heap read over-run found with -Valgrind and Address Sanitizer on test suite

  • -
  • fax2ps check malloc()/realloc() result. (MapTools bugzilla #2470)

  • -
  • gif2tiff apply patch for CVE-2013-4243. (MapTools bugzilla #2451)

  • -
  • gif2tiff fix possible OOB write. (MapTools bugzilla #2452, CVE-2013-4244)

  • -
  • gif2tiff Be more careful about corrupt or hostile input files (MapTools bugzilla #2450, CVE-2013-4231)

  • -
  • tiff2rgba fix usage message in that zip was wrongly described

  • -
  • tiffinfo Default various values fetched with TIFFGetField() to avoid being uninitialized.

  • -
  • tiff2ps Fix bug in auto rotate option code.

  • -
  • ppm2tiff avoid zero size buffer vulnerability (CVE-2012-4564). -check the linebytes calculation too, get the max() calculation -straight, avoid redundant error messages, check for malloc() -failure.

  • -
  • -
    tiffset now supports a -u option to unset a tag.

    (MapTools bugzilla #2419)

    -
    -
    -
  • -
  • Fix warnings about unused parameters.

  • -
  • rgb2ycbcr, tiff2bw, tiff2pdf, tiff2ps, tiffcrop, tiffdither: -Enlarge some fixed-size buffers that weren't -large enough, and eliminate substantially all uses of sprintf(buf, -...) in favor of using snprintf(buf, sizeof(buf), ...), so as to -protect against overflow of fixed-size buffers. This responds in -particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's -t2p_write_pdf_page().

  • -
  • html/man/tiff2ps.1.html, html/man/tiffcp.1.html, -html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, -man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, -tools/tiffdither.c: Sync tool usage printouts and man pages with -reality

  • -
-
-
-

Contributed software changes

-
    -
  • Fix warnings about variables set but not used.

  • -
  • contrib/dbs/xtiff/xtiff.c: Enlarge some fixed-size buffers that weren't -large enough, and eliminate substantially all uses of sprintf(buf, -...) in favor of using snprintf(buf, sizeof(buf), ...), so as to -protect against overflow of fixed-size buffers.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.5.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.5.html deleted file mode 100644 index a9fa08c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.5.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.5 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.5

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.5 (tag Release-v4-0-5)

Previous Version

v4.0.4

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • Support for configure/build using CMake.

  • -
  • Support for large (> 2GB) files under Microsoft Windows.

  • -
-
-
-

Software configuration changes

-
    -
  • CMakeLists.txt / CMake

    -
      -
    • Configuration and building using CMake is now supported -under Microsoft Windows and on Unix-type systems.

    • -
    -
  • -
  • configure.ac / configure

    -
      -
    • Test for and use fseeko() if it is available. This allows -supporting large files on Unix-type systems with a 32-bit long -type and a 64-bit off_t type.

    • -
    -
  • -
-
-
-

Library changes

-
    -
  • tiffiop.h:

    -
      -
    • Macros added to use 64-bit equivalents for all standard I/O -and POSIX APIs used by libtiff and its tools which are limited -to 2GB in Windows builds. Note that these 64-bit equivalents -were introduced by the CRT provided with Visual Studio 2005 and -if the necessary CRT is not installed on the target computer, -the program will not run. The wrapper macros will not be -activated unless the definition _MSC_VER is at least 1400 or -:c:macro:__MSVCRT_VERSION__ is at least 0x800.

    • -
    -
  • -
  • tif_unix.c:

    -
      -
    • Updated to support large files under Microsoft Windows. -This makes tif_unix.c a completely viable candidate for use -under Windows (in spite of its name) if the CRT is modern -enough. Please note that tif_win32.c already supported large -files, but only tiffinfo and tiffdump made any provision to -support large files under Windows.

    • -
    • _tiffReadProc() and _tiffWriteProc() are modified to chunk -I/O to a maximum size of 2GB for extremely large I/O -requests. This surmounts limitations in the Microsoft Windows -read() and write() APIs (which are limited to the range of a -32-bit int), and may avoid poor behavior with extremely large -I/O requests on other systems.

    • -
    -
  • -
-
-
-

Tools changes

-
    -
  • All tools

    -
      -
    • Updated to use I/O wrapper macros from tiffiop.h in order -to support large files under Microsoft Windows.

    • -
    -
  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.6.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.6.html deleted file mode 100644 index 9671328..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.6.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.6 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.6

- - - - - - - - - - - - - - - - -
References

Current Version

v4.0.6 (tag Release-v4-0-6)

Previous Version

v4.0.5

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site

https://download.osgeo.org/libtiff/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • Now builds with CMake 2.8.9 and newer (previously required 3.0.0)

  • -
-
-
-

Software configuration changes

-
    -
  • CMakeLists.txt / CMake

    -
      -
    • Supports CMake 2.8.9 and later.

    • -
    • Add missing file which wasn't being distributed, causing -unit tests to fail.

    • -
    • Make shared/static library building configurable.

    • -
    • CMake reads all version information directly from -configure.ac to avoid duplication of values.

    • -
    • CMake builds are now included in distcheck target.

    • -
    -
  • -
  • Makefile.am

    -
      -
    • Autotools make distcheck now tests the CMake-based build -if CMake is available.

    • -
    -
  • -
-
-
-

Library changes

-
    -
  • Fixes to avoid undefined behaviour of signed types (C -standard compliance).

  • -
  • Fixes to avoid possible issues when casting to unsigned char.

  • -
  • Fixes to avoid undefined behaviour with shifts.

  • -
  • Fix generation of output with 16 bit or 32 bit integer, when -byte swapping is needed, in horizontal predictor (MapTools bugzilla #2521).

  • -
  • Fix decoding when there is a single pixel to decode (unlikely -case...) and byte swapping is involved.

  • -
  • Add add explicit masking with 0xff before casting to uchar in -floating-point horizontal differencing and accumulation routines.

  • -
  • Eliminate requirement for and use of 64-bit constant values.

  • -
-
-
-

Tools changes

-
    -
  • tiffgt

    -
      -
    • Silence glut API deprecation warnings on MacOS X.

    • -
    -
  • -
  • fax2ps

    -
      -
    • Detect failure to write to temporary file.

    • -
    -
  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.7.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.7.html deleted file mode 100644 index 891ecb7..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.7.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.7 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.7

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.0.7 (tag Release-v4-0-7)

Previous Version

v4.0.6

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, -sgisv, and ycbcr are completely removed from the distribution. -these tools were written in the late 1980s and early 1990s for -test and demonstration purposes. In some cases the tools were -never updated to support updates to the file format, or the -file formats are now rarely used. In all cases these tools -increased the libtiff security and maintenance exposure beyond -the value offered by the tool.

  • -
-
-
-

Software configuration changes

-
    -
  • None

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not -dereference NULL pointer when values of tags with -TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII access are -0-byte arrays. Fixes -MapTools bugzilla #2593 (regression -introduced by previous fix done on 2016-11-11 for -CVE-2016-9297). Reported by Henri Salo. Assigned as -CVE-2016-9448

  • -
  • libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() when -requesting Predictor tag and that the zip/lzw codec is not -configured. Fixes -MapTools bugzilla #2591

  • -
  • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure -that values of tags with TIFF_SETGET_C16_ASCII / -TIFF_SETGET_C32_ASCII access are NULL terminated, to avoid -potential read outside buffer in _TIFFPrintField(). Fixes -MapTools bugzilla #2590

  • -
  • libtiff/tif_dirread.c: reject images with OJPEG compression -that have no TileOffsets/StripOffsets tag, when OJPEG -compression is disabled. Prevent NULL pointer dereference in -TIFFReadRawStrip1() and other functions that expect -td_stripbytecount to be non NULL. Fixes -MapTools bugzilla #2585

  • -
  • libtiff/tif_strip.c: make TIFFNumberOfStrips() return the -td->td_nstrips value when it is non-zero, instead of -recomputing it. This is needed in TIFF_STRIPCHOP mode where -td_nstrips is modified. Fixes a read outsize of array in -tiffsplit (or other utilities using TIFFNumberOfStrips()). -Fixes MapTools bugzilla #2587 -(CVE-2016-9273)

  • -
  • libtiff/tif_predict.h, libtiff/tif_predict.c: Replace -assertions by runtime checks to avoid assertions in debug -mode, or buffer overflows in release mode. Can happen when -dealing with unusual tile size like YCbCr with -subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal -Chauhan from the MSRC Vulnerabilities & Mitigations

  • -
  • libtiff/tif_dir.c: discard values of SMinSampleValue and -SMaxSampleValue when they have been read and the value of -SamplesPerPixel is changed afterwards (like when reading a -OJPEG compressed image with a missing SamplesPerPixel tag, and -whose photometric is RGB or YCbCr, forcing SamplesPerPixel -being 3). Otherwise when rewriting the directory (for example -with tiffset, we will expect 3 values whereas the array had -been allocated with just one), thus causing a out of bound -read access. Fixes -MapTools bugzilla #2500 -(CVE-2014-8127, duplicate: CVE-2016-3658)

  • -
  • libtiff/tif_dirwrite.c: avoid NULL pointer dereference on -td_stripoffset when writing directory, if FIELD_STRIPOFFSETS -was artificially set for a hack case in OJPEG case. Fixes -MapTools bugzilla #2500 -(CVE-2014-8127, duplicate: CVE-2016-3658)

  • -
  • libtiff/tif_getimage.c (TIFFRGBAImageOK()): Reject attempts to -read floating point images.

  • -
  • libtiff/tif_predict.c (PredictorSetup()): Enforce -bits-per-sample requirements of floating point predictor (3). -Fixes CVE-2016-3622 "Divide By Zero in the tiff2rgba tool."

  • -
  • libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities -in heap allocated buffers. Reported as MSVR 35094. Discovered by -Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & -Mitigations team.

  • -
  • libtiff/tif_write.c: fix issue in error code path of -TIFFFlushData1() that didn't reset the tif_rawcc and tif_rawcp -members. I'm not completely sure if that could happen in -practice outside of the odd behaviour of t2p_seekproc() of -tiff2pdf). The report points that a better fix could be to -check the return value of TIFFFlushData1() in places where it -isn't done currently, but it seems this patch is enough. -Reported as MSVR 35095. Discovered by Axel Souchet & Vishal -Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations -team.

  • -
  • libtiff/tif_pixarlog.c: Fix write buffer overflow in -PixarLogEncode() if more input samples are provided than -expected by PixarLogSetupEncode(). Idea based on -libtiff-CVE-2016-3990.patch from -libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with -different and simpler check. (MapTools bugzilla #2544)

  • -
  • libtiff/tif_read.c: Fix out-of-bounds read on memory-mapped -files in TIFFReadRawStrip1() and TIFFReadRawTile1() when -stripoffset is beyond tmsize_t max value (reported by Mathias -Svensson)

  • -
  • libtiff/tif_read.c: make TIFFReadEncodedStrip() and -TIFFReadEncodedTile() directly use user provided buffer when -no compression (and other conditions) to save a memcpy()

  • -
  • libtiff/tif_write.c: make TIFFWriteEncodedStrip() and -TIFFWriteEncodedTile() directly use user provided buffer when -no compression to save a memcpy().

  • -
  • libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and -PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid -potential invalid memory write on corrupted/unexpected images -when using the TIFFRGBAImageBegin() interface (reported by -Clay Wood)

  • -
  • libtiff/tif_pixarlog.c: fix potential buffer write overrun in -PixarLogDecode() on corrupted/unexpected images (reported by -Mathias Svensson) (CVE-2016-5875)

  • -
  • libtiff/libtiff.def: Added _TIFFMultiply32 and -_TIFFMultiply64 to libtiff.def

  • -
  • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the -HAVE_SNPRINTF definition.

  • -
  • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by -Edward Lam to define HAVE_SNPRINTF for Visual Studio 2015.

  • -
  • libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, -fix regression, introduced on 2014-12-23, when reading a -one-strip file without a StripByteCounts tag. GDAL #6490

  • -
  • libtiff/*: upstream typo fixes (mostly contributed by Kurt -Schwehr) coming from GDAL internal libtiff

  • -
  • libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt -structure a uint16 to reduce size of the binary.

  • -
  • libtiff/tif_read.c, tif_dirread.c: fix indentation issues -raised by GCC 6 -Wmisleading-indentation

  • -
  • libtiff/tif_pixarlog.c: avoid zlib error messages to pass a -NULL string to %s formatter, which is undefined behaviour in -sprintf().

  • -
  • libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() -triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif -(MapTools bugzilla #2508)

  • -
  • libtiff/tif_luv.c: fix potential out-of-bound writes in -decode functions in non debug builds by replacing assert() by -regular if checks (MapTools bugzilla #2522). Fix potential -out-of-bound reads in case of short input data.

  • -
  • libtiff/tif_getimage.c: fix out-of-bound reads in -TIFFRGBAImage interface in case of unsupported values of -SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit -call to TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix -CVE-2015-8665 reported by limingxing and CVE-2015-8683 -reported by zzf of Alibaba.

  • -
  • libtiff/tif_dirread.c: workaround false positive warning of -Clang Static Analyzer about NULL pointer dereference in -TIFFCheckDirOffset().

  • -
  • libtiff/tif_fax3.c: remove dead assignment in -Fax3PutEOLgdal(). Found by Clang Static Analyzer

  • -
  • libtiff/tif_dirwrite.c: fix truncation to 32 bit of file -offsets in TIFFLinkDirectory() and TIFFWriteDirectorySec() -when aligning directory offsets on a even offset (affects -BigTIFF). This was a regression of the changeset of -2015-10-19.

  • -
  • libtiff/tif_write.c: TIFFWriteEncodedStrip() and -TIFFWriteEncodedTile() should return -1 in case of failure of -tif_encodestrip() as documented

  • -
  • libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in -case of failure so that the above mentioned functions detect -the error.

  • -
  • libtiff/*.c: fix MSVC warnings related to cast shortening and -assignment within conditional expression

  • -
  • libtiff/*.c: fix clang -Wshorten-64-to-32 warnings

  • -
  • libtiff/tif_dirread.c: prevent reading ColorMap or -TransferFunction if BitsPerPixel > 24, so as to avoid huge -memory allocation and file read attempts

  • -
  • libtiff/tif_dirread.c: remove duplicated assignment (reported -by Clang static analyzer)

  • -
  • libtiff/tif_dir.c, libtiff/tif_dirinfo.c, -libtiff/tif_compress.c, libtiff/tif_jpeg_12.c: suppress -warnings about 'no previous declaration/prototype'

  • -
  • libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants -by U to fix 'warning: negative integer implicitly converted to -unsigned type' warning (part of -Wconversion)

  • -
  • libtiff/tif_dir.c, libtiff/tif_dirread.c, -libtiff/tif_getimage.c, libtiff/tif_print.c: fix -Wshadow -warnings (only in libtiff/)

  • -
-
-
-

Tools changes

-
    -
  • tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, -ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed -from the distribution. The libtiff tools rgb2ycbcr and -thumbnail are only built in the build tree for testing. Old -files are put in new archive subdirectory of the source -repository, but not in distribution archives. These changes -are made in order to lessen the maintenance burden.

  • -
  • tools/tiff2pdf.c: avoid undefined behaviour related to -overlapping of source and destination buffer in memcpy() call -in t2p_sample_rgbaa_to_rgb() Fixes -MapTools bugzilla #2577

  • -
  • tools/tiff2pdf.c: fix potential integer overflows on 32 bit -builds in t2p_read_tiff_size() Fixes -MapTools bugzilla #2576

  • -
  • tools/fax2tiff.c: fix segfault when specifying -r without -argument. Patch by Yuriy M. Kaminskiy. Fixes -MapTools bugzilla #2572

  • -
  • tools/tiffinfo.c: fix out-of-bound read on some tiled images. -(MapTools bugzilla #2517)

  • -
  • tools/tiffcrop.c: fix multiple uint32 overflows in -writeBufferToSeparateStrips(), writeBufferToContigTiles() and -writeBufferToSeparateTiles() that could cause heap buffer -overflows. Reported by Henri Salo from Nixu Corporation. -Fixes MapTools bugzilla #2592

  • -
  • tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in -readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel -Souchet & Vishal Chauhan from the MSRC Vulnerabilities & -Mitigations team.

  • -
  • tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on -JPEG compressed images. Reported by Tyler Bohan of Cisco Talos -as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 -extra uninitialized bytes to the file stream.

  • -
  • tools/tiffcp.c: fix out-of-bounds write on tiled images with odd -tile width vs image width. Reported as MSVR 35103 -by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & -Mitigations team.

  • -
  • tools/tiff2pdf.c: fix read -largely- outsize of buffer in -t2p_readwrite_pdf_image_tile(), causing crash, when reading a -JPEG compressed image with TIFFTAG_JPEGTABLES length being -one. Reported as MSVR 35101 by Axel Souchet and Vishal -Chauhan from the MSRC Vulnerabilities & Mitigations team.

  • -
  • tools/tiffcp.c: fix read of undefined variable in case of -missing required tags. Found on test case of MSVR 35100.

  • -
  • tools/tiffcrop.c: fix read of undefined buffer in -readContigStripsIntoBuffer() due to uint16 overflow. Probably -not a security issue but I can be wrong. Reported as MSVR -35100 by Axel Souchet from the MSRC Vulnerabilities & -Mitigations team.

  • -
  • tools/tiffcrop.c: fix various out-of-bounds write -vulnerabilities in heap or stack allocated buffers. Reported -as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel -Souchet and Vishal Chauhan from the MSRC Vulnerabilities & -Mitigations team.

  • -
  • tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in -heap allocate buffer in t2p_process_jpeg_strip(). Reported as -MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from -the MSRC Vulnerabilities & Mitigations team.

  • -
  • tools/tiff2bw.c: fix weight computation that could result of -color value overflow (no security implication). Fix MapTools bugzilla #2550. -Patch by Frank Freudenberg.

  • -
  • tools/rgb2ycbcr.c: validate values of -v and -h parameters to -avoid potential divide by zero. Fixes CVE-2016-3623 (MapTools bugzilla #2569)

  • -
  • tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). -From patch libtiff-CVE-2016-3991.patch from -libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (MapTools bugzilla #2543)

  • -
  • tools/tiff2rgba.c: Fix integer overflow in size of allocated -buffer, when -b mode is enabled, that could result in -out-of-bounds write. Based initially on patch -tiff-CVE-2016-3945.patch from libtiff-4.0.3-25.el7_2.src.rpm -by Nikola Forro, with correction for invalid tests that -rejected valid files. (MapTools bugzilla #2545)

  • -
  • tools/tiffcrop.c: Avoid access outside of stack allocated -array on a tiled separate TIFF with more than 8 samples per -pixel. Reported by Kaixiang Zhang of the Cloud Security Team, -Qihoo 360 (CVE-2016-5321 / CVE-2016-5323 , MapTools bugzilla #2558 / -MapTools bugzilla #2559)

  • -
  • tools/tiffdump.c: fix a few misaligned 64-bit reads warned by --fsanitize

  • -
  • tools/tiffdump.c (ReadDirectory()): Remove uint32 cast to -_TIFFmalloc() argument which resulted in Coverity report. -Added more multiplication overflow checks.

  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.8.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.8.html deleted file mode 100644 index 1d67dda..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.8.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.8 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.8

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.0.8 (tag Release-v4-0-8)

Previous Version

v4.0.7

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • None

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis -to fix cppcheck clarifyCalculation warnings

  • -
  • libtiff/tif_predict.c, libtiff/tif_print.c: fix printf -unsigned vs signed formatting (cppcheck -invalidPrintfArgType_uint warnings)

  • -
  • libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in -TIFFReadEncodedStrip() that caused an integer division by -zero. Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2596

  • -
  • libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based -buffer overflow on generation of PixarLog / LUV compressed -files, with ColorMap, TransferFunction attached and nasty -plays with bitspersample. The fix for LUV has not been -tested, but suffers from the same kind of issue of PixarLog. -Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2604

  • -
  • libtiff/tif_strip.c: revert the change in -TIFFNumberOfStrips() done for -MapTools bugzilla #2587 / -CVE-2016-9273 since the above change is a better fix that -makes it unnecessary.

  • -
  • libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() -to instantiate compute nstrips as -TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a -logic based on the total size of data. Which is faulty is the -total size of data is not sufficient to fill the whole image, -and thus results in reading outside of the -StripByCounts/StripOffsets arrays when using -TIFFReadScanline(). Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2608.

  • -
  • libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of -failure in OJPEGPreDecode(). This will avoid a divide by zero, -and potential other issues. Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2611

  • -
  • libtiff/tif_write.c: fix misleading indentation as warned by GCC.

  • -
  • libtiff/tif_fax3.h: revert change done on 2016-01-09 that -made Param member of TIFFFaxTabEnt structure a uint16 to -reduce size of the binary. It happens that the Hylafax -software uses the tables that follow this typedef -(TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), -although they are not in a public libtiff header. Raised by -Lee Howard. Fixes -MapTools bugzilla #2636

  • -
  • libtiff/tiffio.h, libtiff/tif_getimage.c: add -TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() variants of -the functions without ext, with an extra argument to control -the stop_on_error behaviour.

  • -
  • libtiff/tif_getimage.c: fix potential memory leaks in error -code path of TIFFRGBAImageBegin(). Fixes -MapTools bugzilla #2627

  • -
  • libtiff/tif_jpeg.c: increase libjpeg max memory usable to 10 -MB instead of libjpeg 1MB default. This helps when creating -files with "big" tile, without using libjpeg temporary files. -Related to https://trac.osgeo.org/gdal/ticket/6757

  • -
  • libtiff/tif_jpeg.c: avoid integer division by zero in -JPEGSetupEncode() when horizontal or vertical sampling is set -to 0. Fixes MapTools bugzilla #2653

  • -
  • libtiff/tif_dirwrite.c: in -TIFFWriteDirectoryTagCheckedRational(), replace assertion by -runtime check to error out if passed value is strictly -negative. Fixes -MapTools bugzilla #2535

  • -
  • libtiff/tif_dirread.c: avoid division by floating point 0 in -TIFFReadDirEntryCheckedRational() and -TIFFReadDirEntryCheckedSrational(), and return 0 in that case -(instead of infinity as before presumably) Apparently some -sanitizers do not like those divisions by zero. Fixes -MapTools bugzilla #2644

  • -
  • libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement -various clampings of double to other data types to avoid -undefined behaviour if the output range isn't big enough to -hold the input value. Fixes -MapTools bugzilla #2643, -MapTools bugzilla #2642, -MapTools bugzilla #2646, -MapTools bugzilla #2647

  • -
  • libtiff/tif_jpeg.c: validate BitsPerSample in -JPEGSetupEncode() to avoid undefined behaviour caused by -invalid shift exponent. Fixes -MapTools bugzilla #2648

  • -
  • libtiff/tif_read.c: avoid potential undefined behaviour on -signed integer addition in TIFFReadRawStrip1() in isMapped() -case. Fixes MapTools bugzilla #2650

  • -
  • libtiff/tif_getimage.c: add explicit uint32() cast in -putagreytile to avoid UndefinedBehaviorSanitizer warning. -Patch by Nicolás Peña. Fixes -MapTools bugzilla #2658

  • -
  • libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() -to zero initialize tif_rawdata. Fixes -MapTools bugzilla #2651

  • -
  • -
    libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add

    _TIFFcalloc()

    -
    -
    -
  • -
  • libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in -Encode functions instead of -1 when TIFFFlushData1() fails. -Fixes MapTools bugzilla #2130

  • -
  • libtiff/tif_ojpeg.c: fix leak in -OJPEGReadHeaderInfoSecTablesQTable(), -OJPEGReadHeaderInfoSecTablesDcTable() and -OJPEGReadHeaderInfoSecTablesAcTable() when read fails. Patch by -Nicolás Peña. Fixes -MapTools bugzilla #2659

  • -
  • libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if -the YCbCrSubsampling tag is not explicitly present. This helps -a bit to reduce the I/O amount when the tag is present -(especially on cloud hosted files).

  • -
  • libtiff/tif_lzw.c: in LZWPostEncode(), increase, if -necessary, the code bit-width after flushing the remaining -code and before emitting the EOI code. Fixes -MapTools bugzilla #1982

  • -
  • libtiff/tif_pixarlog.c: fix memory leak in error code path of -PixarLogSetupDecode(). Patch by Nicolás Peña. Fixes -MapTools bugzilla #2665

  • -
  • libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 --Wimplicit-fallthrough warnings.

  • -
  • libtiff/tif_dirread.c: fix memory leak in non -DEFER_STRILE_LOAD mode (ie default) when there is both a -StripOffsets and TileOffsets tag, or a StripByteCounts and -TileByteCounts. Fixes -MapTools bugzilla #2689

  • -
  • libtiff/tif_ojpeg.c: fix potential memory leak in -OJPEGReadHeaderInfoSecTablesQTable(), -OJPEGReadHeaderInfoSecTablesDcTable() and -OJPEGReadHeaderInfoSecTablesAcTable(). Patch by Nicolás Peña. -Fixes MapTools bugzilla #2670

  • -
  • libtiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. -Patch by Alan Coopersmith + complement by myself. Fixes -MapTools bugzilla #2673

  • -
  • libtiff/tif_read.c: TIFFFillStrip(): add limitation to the -number of bytes read in case td_stripbytecount[strip] is -bigger than reasonable, so as to avoid excessive memory -allocation.

  • -
  • libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory -leak when the underlying codec (ZIP, PixarLog) succeeds its -setupdecode() method, but PredictorSetup() fails. Credit to -OSS-Fuzz (locally run, on GDAL)

  • -
  • libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): avoid -excessive memory allocation in case of shorten files. Only -effective on 64 bit builds and non-mapped cases. Credit to -OSS-Fuzz (locally run, on GDAL)

  • -
  • libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), -avoid potential integer overflows with read_ahead in -CHUNKY_STRIP_READ_SUPPORT mode. Should -especially occur on 32 bit platforms.

  • -
  • libtiff/tif_read.c: TIFFFillStripPartial(): avoid excessive -memory allocation in case of shorten files. Only effective on -64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL)

  • -
  • libtiff/tif_read.c: update tif_rawcc in -CHUNKY_STRIP_READ_SUPPORT mode with tif_rawdataloaded when -calling TIFFStartStrip() or TIFFFillStripPartial(). This -avoids reading beyond tif_rawdata() when bytecount > -tif_rawdatasize. Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. -Credit to OSS-Fuzz

  • -
  • libtiff/tif_color.c: avoid potential int32 overflow in -TIFFYCbCrToRGBInit(). Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 -Credit to OSS-Fuzz

  • -
  • libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 -overflows in multiply_ms() and add_ms(). Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 -Credit to OSS-Fuzz

  • -
  • libtiff/tif_packbits.c: fix out-of-buffer read in -PackBitsDecode(). Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 -Credit to OSS-Fuzz

  • -
  • libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory -allocation when RowsPerStrip tag is missing. -Credit to OSS-Fuzz (locally run, on GDAL)

  • -
  • libtiff/tif_lzw.c: update dec_bitsleft at beginning of -LZWDecode(), and update tif_rawcc at end of LZWDecode(). This -is needed to properly work with the latest changes in -tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode.

  • -
  • libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp -with next_in and tif_rawcc with avail_in at beginning and end -of function, similarly to what is done in LZWDecode(). Likely -needed so that it works properly with latest changes in -tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. But untested...

  • -
  • libtiff/tif_getimage.c: initYCbCrConversion(): add basic -validation of luma and refBlackWhite coefficients (just check -they are not NaN for now), to avoid potential float to int -overflows. Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 -Credit to OSS Fuzz

  • -
  • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast -of double to float. Credit to Google Autofuzz project

  • -
  • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] -is not zero to avoid division by zero. Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 -Credit to OSS Fuzz

  • -
  • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast -of double to float. Credit to Google Autofuzz project

  • -
  • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] -is not zero to avoid division by zero. Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 -Credit to OSS Fuzz

  • -
  • libtiff/tif_getimage.c: initYCbCrConversion(): stricter -validation for refBlackWhite coefficients values. To avoid -invalid float to int32 conversion. Fixes -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 -Credit to OSS Fuzz

  • -
-
-
-

Tools changes

-
    -
  • tools/fax2tiff.c (main()): Applied patch by Jörg Ahrens to fix -passing client data for Win32 builds using tif_win32.c -(USE_WIN32_FILEIO defined) for file I/O. Patch was provided -via email on November 20, 2016.

  • -
  • tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips() -that can cause various issues, such as buffer overflows in the -library. Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2598

  • -
  • tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i -(ignore) mode so that the output buffer is correctly -incremented to avoid write outside bounds. Reported by -Agostino Sarubbo. Fixes -MapTools bugzilla #2620

  • -
  • tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in -readSeparateStripsIntoBuffer() to avoid read outside of heap -allocated buffer. Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2621

  • -
  • tools/tiffcrop.c: fix integer division by zero when -BitsPerSample is missing. Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2619

  • -
  • tools/tiffinfo.c: fix null pointer dereference in -r mode -when the image has no StripByteCount tag. Reported by -Agostino Sarubbo. Fixes -MapTools bugzilla #2594

  • -
  • tools/tiffcp.c: avoid potential division by zero if -BitsPerSamples tag is missing. Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2597

  • -
  • tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) -is called, limit the return number of inks to SamplesPerPixel, -so that code that parses ink names doesn't go past the end of -the buffer. Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2599

  • -
  • tools/tiffcp.c: avoid potential division by zero if -BitsPerSamples tag is missing. Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2607

  • -
  • tools/tiffcp.c: fix uint32 underflow/overflow that can cause -heap-based buffer overflow. Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2610

  • -
  • tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non -assert check. Reported by Agostino Sarubbo. Fixes -MapTools bugzilla #2605

  • -
  • tools/tiff2ps.c: fix 2 heap-based buffer overflows (in -PSDataBW() and PSDataColorContig()). Reported by Agostino Sarubbo. -Fixes MapTools bugzilla #2633 and -MapTools bugzilla #2634.

  • -
  • tools/tiff2pdf.c: prevent heap-based buffer overflow in -j -mode on a paletted image. Note: this fix errors out before the -overflow happens. There could probably be a better fix. Fixes -MapTools bugzilla #2635

  • -
  • tools/tiff2pdf.c: fix wrong usage of memcpy() that can -trigger unspecified behaviour. Fixes -MapTools bugzilla #2638

  • -
  • tools/tiff2pdf.c: avoid potential invalid memory read in -t2p_writeproc(). Fixes -MapTools bugzilla #2639

  • -
  • tools/tiff2pdf.c: avoid potential heap-based overflow in -t2p_readwrite_pdf_image_tile(). Fixes -MapTools bugzilla #2640

  • -
  • tools/tiffcrop.c: remove extraneous TIFFClose() in error code -path, that caused double free. Related to -MapTools bugzilla #2535

  • -
  • tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow() -and cpSeparate2ContigByRow() if BitsPerSample != 8 to avoid heap -based overflow. Fixes -MapTools bugzilla #2656 and -MapTools bugzilla #2657

  • -
  • tools/raw2tiff.c: avoid integer division by zero. Fixes -MapTools bugzilla #2631

  • -
  • tools/tiff2ps.c: call TIFFClose() in error code paths.

  • -
  • tools/fax2tiff.c: emit appropriate message if the input file -is empty. Patch by Alan Coopersmith. Fixes -MapTools bugzilla #2672

  • -
  • tools/tiff2bw.c: close TIFF handle in error code path. Fixes -MapTools bugzilla #2677

  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.9.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.0.9.html deleted file mode 100644 index 0657083..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.0.9.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - - Changes in TIFF v4.0.9 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.0.9

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.0.9 (tag Release-v4-0-9)

Previous Version

v4.0.8

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here:

-
-

Major changes

-
    -
  • None

  • -
-
-
-

Software configuration changes

-
    -
  • test/Makefile.am: Add some tests for tiff2bw.

  • -
  • .appveyor.yml, .travis.yml, build/travis-ci: apply patches -0001-ci-Travis-script-improvements.patch and -0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh -(sent to mailing list)

  • -
  • .travis.yml, build/travis-ci: new files from -0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by -Roger Leigh (sent to mailing list on 2017-06-08). -This patch adds support for the Travis-CI service.

  • -
  • .appveyor.yml: new file from -0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing -list on 2017-06-08). -This patch adds a .appveyor.yml file to the top-level. This allows -one to opt in to having a branch built on Windows with Cygwin, -MinGW and MSVC automatically when a branch is pushed to GitHub, -GitLab, BitBucket or any other supported git hosting service.

  • -
  • CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply -patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger -Leigh (sent to mailing list on 2017-06-08). -This patch makes the CMake build system support running the tests -with MinGW or Cygwin.

  • -
  • test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files -to test old-style LZW decompression

  • -
  • test/common.sh, Makefile.am, CMakeList.txt: updated with above

  • -
  • test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff -to fix make distcheck. Patch by Roger Leigh

  • -
  • nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use -/MDd runtime in debug mode.

  • -
-
-
-

Library changes

-
    -
  • libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid -int32 overflow in TIFFYCbCrtoRGB(). -Fixes OSS-Fuzz #1844. -Credit to OSS Fuzz

  • -
  • libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for -refBlackWhite coefficients values. To avoid invalid float->int32 conversion -(when refBlackWhite[0] == 2147483648.f) -Fixes OSS-Fuzz #1907. -Credit to OSS Fuzz

  • -
  • libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), -and use it in TIFFReadDirectory() so as to ignore fields whose tag is a -codec-specified tag but this codec is not enabled. This avoids TIFFGetField() -to behave differently depending on whether the codec is enabled or not, and -thus can avoid stack based buffer overflows in a number of TIFF utilities -such as tiffsplit, tiffcmp, thumbnail, etc. -Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch -(MapTools bugzilla #2580) by Raphaël Hertzog. -Fixes: -MapTools bugzilla #2580, -MapTools bugzilla #2693, -MapTools bugzilla #2625 (CVE-2016-10095), -MapTools bugzilla #2564 (CVE-2015-7554), -MapTools bugzilla #2561 (CVE-2016-5318), -MapTools bugzilla #2499 (CVE-2014-8128), -MapTools bugzilla #2441, -MapTools bugzilla #2433.

  • -
  • libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do -the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols -of its internal libtiff copy.

  • -
  • libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in -ChopUpSingleUncompressedStrip() regarding update of newly single-strip -uncompressed files whose bytecount is 0. Before the change of 2016-12-03, -the condition bytecount==0 used to trigger an early exit/disabling of -strip chop. Re-introduce that in update mode. Otherwise this cause -later incorrect setting for the value of StripByteCounts/StripOffsets. -(GDAL trac #6924).

  • -
  • libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items -read in StripOffsets/StripByteCounts tags to the number of strips to avoid -excessive memory allocation. -Fixes OSS-Fuzz #2215. -Credit to OSS Fuzz

  • -
  • libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows.

  • -
  • libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could -potentially be a bug with huge rows.

  • -
  • libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images.

  • -
  • libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() -and BYTECOUNTLOOKSBAD when file is too short.

  • -
  • libtiff/tif_predict.c: decorate legitimate functions where unsigned int -overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW

  • -
  • libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts()

  • -
  • libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to -disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow

  • -
  • libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive -CPU consumption on progressive JPEGs with a huge number of scans. -See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf.

    -
    -

    Note

    -

    Only affects libtiff since 2014-12-29 where support of non-baseline JPEG -was added.

    -
    -
  • -
  • libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg -memory allocation is above 100 MB. libjpeg in case of multiple scans, -which is allowed even in baseline JPEG, if components are spread over several -scans and not interleavedin a single one, needs to allocate memory (or -backing store) for the whole strip/tile. -See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf. -This limitation may be overridden by setting the -LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling -libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro.

  • -
  • libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode(). -Fixes MapTools bugzilla #2706. -Reported by team OWL337

  • -
  • libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a -double value can fit in a float before casting. Patch by Nicolas RUFF

  • -
  • libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, -libtiff/tif_read.c: make TIFFReadScanline() works in -CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. -Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER -environment variable the maximum number of scans allowed. Defaults to -100.

  • -
  • libtiff/tif_read.c: TIFFFillTile(): add limitation to the number -of bytes read in case td_stripbytecount[strip] is bigger than -reasonable, so as to avoid excessive memory allocation (similarly to -what was done for TIFFFileStrip() on 2017-05-10)

  • -
  • libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). -Fixes MapTools bugzilla #2708 and -OSS-Fuzz #2433. -Credit to OSS Fuzz

  • -
  • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() -function, variant of TIFFReadEncodedStrip() that allocates the -decoded buffer only after a first successful TIFFFillStrip(). This avoids -excessive memory allocation on corrupted files.

  • -
  • libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() -functions associated with LONG8/SLONG8 data type, replace assertion that -the file is BigTIFF, by a non-fatal error. -Fixes MapTools bugzilla #2712 -Reported by team OWL337

  • -
  • libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to -tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). -This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), -limiting the number of bytes read. But it could probably have been hit -too in CHUNKY_STRIP_READ_SUPPORT mode previously ? -Fixes OSS-Fuzz #2454 -Credit to OSS Fuzz

  • -
  • libtiff/tif_error.c, tif_warning.c: correctly use va_list when both -an old-style and new-style warning/error handlers are installed. -Patch by Paavo Helde (sent on the mailing list)

  • -
  • libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). -Fixes OSS-Fuzz #2470 -Credit to OSS Fuzz.

  • -
  • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() -and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and -TIFFReadTile() that allocates the decoded buffer only after a first -successful TIFFFillTile(). This avoids excessive memory allocation -on corrupted files.

  • -
  • libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding -when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) -Fixes OSS-Fuzz #2554 -Credit to OSS Fuzz

  • -
  • libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW -compressed files.

  • -
  • libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW -strips. Crashing issue only on memory mapped files, where the strip -offset is the last byte of the file, and the file size is a multiple -of one page size on the CPU architecture (typically 4096). Credit -to myself :-)

  • -
  • libtiff/tif_dir.c: avoid potential null pointer dereference in -_TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. -Fixes MapTools bugzilla #2713

  • -
  • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" -mode on PlanarConfig=Contig input images. -Fixes MapTools bugzilla #2715 -Reported by team OWL337

  • -
  • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). -Complementary fix for MapTools bugzilla #2708 -in the isMapped() case, so as to avoid excessive memory allocation -when we need a temporary buffer but the file is truncated.

  • -
  • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). -Complementary fix for MapTools bugzilla #2708 -in the isMapped() case, so as to avoid excessive memory allocation -when we need a temporary buffer but the file is truncated.

  • -
  • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the -arrays that hold StripOffsets/StripByteCounts, when they are smaller -than the expected number of striles, up to 1 million striles, and -error out beyond. Can be tweaked by setting the environment variable -LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. -This partially goes against a change added on 2002-12-17 to accept -those arrays of wrong sizes, but is needed to avoid denial of services. -Fixes OSS-Fuzz #2350 -Credit to OSS Fuzz

  • -
  • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the -arrays that hold StripOffsets/StripByteCounts, when they are smaller -than the expected number of striles, up to 1 million striles, and -error out beyond. Can be tweaked by setting the environment variable -LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. -This partially goes against a change added on 2002-12-17 to accept -those arrays of wrong sizes, but is needed to avoid denial of services. -Fixes OSS-Fuzz #2350 -Credit to OSS Fuzz

  • -
  • libtiff/tif_read.c: add protection against excessive memory -allocation attempts in TIFFReadDirEntryArray() on short files. -Effective for mmap'ed case. And non-mmap'ed case, but restricted -to 64bit builds. -Fixes MapTools bugzilla #2675

  • -
  • libtiff/tif_read.c: add protection against excessive memory -allocation attempts in TIFFReadDirEntryArray() on short files. -Effective for mmap'ed case. And non-mmap'ed case, but restricted -to 64bit builds. -Fixes MapTools bugzilla #2675

  • -
  • libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory -allocation when RowsPerStrip tag is missing. -Fixes OSS-Fuzz #2683 -Credit to OSS-Fuzz

  • -
  • libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): -properly break from loops on error when stoponerr is set, instead -of going on iterating on row based loop.

  • -
  • libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped -pixel number is not a multiple of the horizontal subsampling, and -also in some other cases. Impact putcontig8bitYCbCr44tile, -putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, -putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile. -Fixes MapTools bugzilla #2637 (discovered by Agostino Sarubbo) -and OSS-Fuzz #2691 (credit to OSS Fuzz)

  • -
  • libtiff/tif_luv.c: further reduce memory requirements for temporary -buffer when RowsPerStrip >= image_length in LogLuvInitState() and -LogL16InitState(). -Fixes OSS-Fuzz #2700 -Credit to OSS Fuzz

  • -
  • libtiff/tif_dirwrite.c: replace assertion related to not finding the -SubIFD tag by runtime check (in TIFFWriteDirectorySec()) -Fixes MapTools bugzilla #2727 -Reported by team OWL337

  • -
  • libtiff/tif_dirwrite.c: replace assertion to tag value not fitting -on uint32 when selecting the value of SubIFD tag by runtime check -(in TIFFWriteDirectoryTagSubifd()). -Fixes MapTools bugzilla #2728 -Reported by team OWL337

  • -
  • libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed -file if the codestream height is larger than the truncated height of the -strip. Emit a warning in this situation since this is non compliant.

  • -
  • libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() -function that checks if the offset is not bigger than INT64_MAX, so as -to avoid a -1 error return code of TIFFSeekFile() to match a required -seek to UINT64_MAX/-1. -Fixes MapTools bugzilla #2726 -Adapted from proposal by Nicolas Ruff.

  • -
  • libtiff/tif_dirread.c: add NULL check to avoid likely false positive -null-pointer dereference warning by CLang Static Analyzer.

  • -
  • libtiff/libtiff.def: add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() -Fixes MapTools bugzilla #2735

  • -
  • libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that -honours max_memory_to_use > 0. -Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162.

  • -
  • libtiff/tif_getimage.c: avoid floating point division by zero in -initCIELabConversion() -Fixes OSS-Fuzz #3733 -Credit to OSS Fuzz

  • -
-
-
-

Tools changes

-
    -
  • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" -mode on PlanarConfig=Contig input images. -Fixes MapTools bugzilla #2715 -Reported by team OWL337

  • -
  • tools/tiffset.c: fix setting a single value for the ExtraSamples tag -(and other tags with variable number of values). -So tiffset -s ExtraSamples 1 X. This only worked -when setting 2 or more values, but not just one.

  • -
  • tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the -client data. This client data is not used at all at the moment, -but it makes the most sense. Issue that the value of -client_data.fd was passed where a pointer is expected was reported -via email by Gerald Schade on Sun, 29 Oct 2017.

  • -
  • tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible -arithmetic overflow in bounds checking code and eliminate -comparison between signed and unsigned type.

  • -
  • tools/tiff2bw.c (main()): Free memory allocated in the tiff2bw -program. This is in response to the report associated with -CVE-2017-16232 but does not solve the extremely high memory usage -with the associated POC file.

  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.1.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.1.0.html deleted file mode 100644 index 7d0d31e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.1.0.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - Changes in TIFF v4.1.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.1.0

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.1.0 (tag v4.1.0)

Previous Version

v4.0.10

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

http://libtiff.maptools.org/

-

This document describes the changes made to the software between the -previous and current versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here. A change summary is also provided by the -ChangeLog file included in the release package and by the Git commit -history:

-
-

Major changes

-
    -
  • Make defer strile offset/bytecount loading available at runtime -and add per-strile offset/bytecount loading capabilities. Part of -this commit makes the behaviour that was previously met when libtiff -was compiled with -DDEFER_STRILE_LOAD available for default builds -when specifying the new D (Deferred) TIFFOpen() flag. In that -mode, the [Tile/Strip][ByteCounts/Offsets] arrays are only loaded -when first accessed. This can speed-up the opening of files stored -on the network when just metadata retrieval is needed.

    -

    Another addition is the capability of loading only the values of -the offset/bytecount of the strile of interest instead of the -whole array. This is enabled with the new O (Ondemand) flag of -TIFFOpen() (which implies D).

    -

    The public TIFFGetStrileOffset(), -TIFFGetStrileOffsetWithErr(), -TIFFGetStrileByteCount() and -TIFFGetStrileByteCountWithErr() functions have been added to -API. They are of particular interest when using sparse files (with -offset == bytecount == 0) and you want to detect if a strile is -present or not without decompressing the data, or updating an -existing sparse file.

    -
  • -
  • The BigTIFF writer now optimizes file size by using 32-bit LONG -values (rather than 64-bit) where it is reasonable and safe to do -so. Likewise, the 16-bit SHORT type is used when possible for -StripByteCounts/TileByteCounts.

  • -
-
-
-

Software configuration changes

-
    -
  • The WIN32 build now uses tif_win32.c when building with CMake.

  • -
  • Properly set value of HOST_FILLORDER to LSB2MSB for Windows -CMake builds. It was not being properly set!

  • -
-
-
-

Library changes

-
    -
  • Changes in the libtiff library may be viewed on-line -Libtiff Library Commits..

  • -
  • New function TIFFReadFromUserBuffer() which replaces the use of -TIFFReadEncodedStrip()/TIFFReadEncodedTile() when the user can -provide the buffer for the input data, for example when he wants -to avoid libtiff to read the strile offset/count values from the -[Strip|Tile][Offsets/ByteCounts] array.

  • -
  • New functions TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting(). -Those advanced writing functions must be used in a particular sequence -to make their intended effect. Their aim is to control when/where -the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file.

    -

    The purpose of this is to generate 'cloud-optimized geotiff' files where -the first KB of the file only contain the IFD entries without the potentially -large strile arrays. Those are written afterwards.

    -
  • -
-
-
-

Tools changes

- -
-
-

Contributed software changes

- -
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.2.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.2.0.html deleted file mode 100644 index 249a1c1..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.2.0.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - Changes in TIFF v4.2.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.2.0

- - - - - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.2.0 (tag v4.2.0)

Previous Version

v4.1.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Major changes

-
    -
  • Optional support for using libdeflate is added.

  • -
  • Many of the tools now support a memory usage limit.

  • -
-
-
-

Software configuration changes

-
    -
  • The Microsoft Windows 'nmake' build is resuscitated and provides -a default HAVE_STRTOLL setting in 'nmake.opt' which is suitable for -MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in -order to compile with earlier compiler versions.

  • -
  • mingw-w64 cmake build fixes to not add libm

  • -
-
-
-

Library changes

-
    -
  • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.

  • -
  • EXIF 2.32 and GPS tags and functionality have been upgraded:

    -
    -
      -
    • Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2

    • -
    • EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF).

    • -
    • Reading error for FileSource and SceneType tags corrected.

    • -
    -
    -
  • -
  • Make TIFFTAG_CFAPATTERN variable count.

  • -
  • Cmake configuration fixes for big-endian targets.

  • -
  • Added support for optional building against libdeflate for -faster Zip/Deflate compression/decompression.

    -

    We now have 2 kinds of builds with the Zip/Deflate codec:

    -
    -
      -
    • zlib only

    • -
    • zlib + libdeflate

    • -
    -
    -

    Speed improvements in the 35%-50% range can be expected when libdeflate is used. -Compression level up to 12 is now supported (capped to 9 when zlib is used). -Still requires zlib for situations where libdeflate cannot be used (that -is for scanline access, since libdeflate has no streaming mode)

    -

    Pseudo-tag TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE -is added to control which subcodec (zlib or libdeflate) should be used (it defaults -of course to libdeflate, when it is available). -This is mostly aimed at being used on the writing side, to be able to reproduce -output of previous libtiff versions at a binary level, in situations where this would -be really needed. Or as a safety belt in case there would be unforeseen issues -with using libdeflate. -It can be used to know when libdeflate is available at runtime (DEFLATE_SUBCODEC_LIBDEFLATE -will be the default value in that situation).

    -

    Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa.

    -
  • -
-
-
-

Tools changes

-
    -
  • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.

  • -
  • ppm2tiff: support any bps value from 1 to 16.

  • -
  • tiff2ps, tiff2rgba: A default memory limit is now enforced (256MiB) and a -M option is added to allow the user to adjust the limit.

  • -
  • tiff2pdf, tiffcp: A default memory limit is now enforced (256MiB) and a -m option is added to allow the user to adjust the limit.

  • -
  • tiffcrop: A default memory limit is now enforced (256MiB) and a -k option is added to allow the user to adjust the limit.

  • -
  • tiff2pdf: fix "raw" copy of Deflate streams.

  • -
  • tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr

  • -
  • tiffcp: disable strip chopping when trying to convert to JBIG compression

  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.3.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.3.0.html deleted file mode 100644 index 5657f62..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.3.0.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - Changes in TIFF v4.3.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.3.0

- - - - - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.3.0 (tag v4.3.0)

Previous Version

v4.2.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Major changes

-
    -
  • Build and usage of the library and its utilities requires a C99 capable -compiler.

  • -
  • New optional codec for the LERC (Limited Error Raster Compression) compression scheme. -To have it available, configure libtiff against the SDK available at -https://github.com/esri/lerc

  • -
  • CMake build: revamp of build scripts

  • -
-
-
-

Software configuration changes

-
    -
  • cmake: revamp of the cmake build scripts. There are impacts on the case of -some options.

  • -
  • cmake: update minimum version and policy version to 3.9.

  • -
  • Remove NMake build support. The functionality provided by the NMake build -is now completely superseded by the CMake build.

  • -
  • Remove antiquated Scons and makefile.lcc build support.

  • -
  • Remove non-functional VMS and WinCE support.

  • -
  • autogen.sh now updates config.guess and config.sub from master gnulib version.

  • -
-
-
-

Library changes

-
    -
  • Use of int8, uint8, int16, uint16, -int32, uint32, int64, uint64 -typedefs is now deprecated. libtiff code and headers no longer use them, -and use their C99 standard equivalents (with _t suffix). Those typedefs -are still available, with deprecation warnings, but external code is strongly -encouraged to use the corresponding C99 stdint.h types. The deprecated -types might be removed in a future release.

  • -
  • Removal of unused, or now useless due to C99 availability, functions in port/

  • -
  • A few issues spotted by static code analysis tools fixed. Compiler -warnings addressed.

  • -
-
-
-

Tools changes

-
    -
  • In usage text, insert a line of text summarizing each tool's purpose

  • -
  • tiff tools: made display of compression methods and their parameters -conditional on their actual availability

  • -
  • tiff2ps: exit the loop in case of error (#232)

  • -
  • tiff2pdf: check that tiff_datasize fits in a signed tsize_t (#202)

  • -
  • tiffsplit: exit with EXIT_FAILURE if there are extra args on the command line

  • -
  • tiffcmp: fix comparison with pixels that are fractional number of bytes (#53)

  • -
-
-
-

Contributed software changes

-
    -
  • iptcutil.c - set #ifdef _WIN32 (was #ifdef WIN32, which failed at build time)

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.4.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.4.0.html deleted file mode 100644 index a1c7b94..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.4.0.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - Changes in TIFF v4.4.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.4.0

- - - - - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.4.0 (tag v4.4.0)

Previous Version

v4.3.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Major changes

-

None

-
-
-

Software configuration changes

-
    -
  • Handle absolute paths in pkg-config file (issue #333)

  • -
  • Correct fix for the pkgconf file relative paths.

  • -
  • cmake: allow running the tests with a read-only source directory.

  • -
  • cmake: Fix STRIPCHOP_DEFAULT value in CMake builds.

  • -
  • build: Fix static library imports in mingw related to LERC

  • -
  • Fix version in libtiff-4.pc.in, and CMake build: Add requirements to pc file

  • -
  • cmake: Fix build with CMake 3.10.

  • -
  • cmake: Export tiff targets.

  • -
  • Make LERC_SUPPORT conditional on ZLIB_SUPPORT

  • -
-
-
-

Library changes

-

New/improved functionalities:

-
    -
  • TIFFIsBigTiff() function added.

  • -
  • Functions TIFFFieldSetGetSize() and TIFFieldSetGetCountSize() added.

  • -
  • LZWDecode(): major speed improvements (~30% faster)

  • -
  • Predictor 2 (horizontal differentiation): support 64-bit

  • -
  • Support libjpeg 9d

  • -
-

Bug fixes:

-
    -
  • Remove incorrect assert (issue #329)

  • -
  • avoid hang in TIFFRewriteDirectory() if a classic file > 4 GB is attempted to be created

  • -
  • tif_jbig.c: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes issue #385)

  • -
  • TIFFFetchNormalTag(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #383)

  • -
  • TIFFWriteDirectoryTagData(): turn assertion on data length into a runtime check

  • -
  • TIFFFetchStripThing(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #362)

  • -
  • TIFFReadDirectory(): avoid calling memcpy() with a null source pointer and size of zero (fixes issue #362)

  • -
  • TIFFYCbCrToRGBInit(): avoid Integer-overflow

  • -
  • TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS): return error if returned pointer is NULL (fixes issue #342)

  • -
  • OJPEG: avoid assertion when using TIFFReadScanline() (fixes issue #337)

  • -
  • TIFFReadDirectory(): fix OJPEG hack (fixes issue #319)

  • -
  • LZW codec: fix support for strips/tiles > 2 GB on Windows

  • -
  • TIFFAppendToStrip(): fix rewrite-in-place logic (fixes issue #309)

  • -
  • Fix TIFFRewriteDirectory() discarding directories.

  • -
  • TIFFReadCustomDirectory(): avoid crash when reading SubjectDistance tag on a non EXIF directory (issue #316)

  • -
  • Fix Segmentation fault printing GPS directory if Altitude tag is present

  • -
  • tif_jpeg.c: do not emit progressive scans with mozjpeg. (issue #266)

  • -
  • _TIFFRewriteField(): fix when writing a IFD with a single tile that is a sparse one, on big endian hosts

  • -
  • Fix all remaining uses of legacy Deflate compression id and warn on use.

  • -
-
-
-

Tools changes

-

Bug fixes:

-
    -
  • tiffcrop: Fix issue issue #330 and some more from 320 to 349.

  • -
  • tiffcrop: fix issue issue #395: generation of strange section images.

  • -
  • tiffcrop: fix issue issue #380 and issue #382 heap buffer overflow in extractImageSection

  • -
  • tiffcrop: fix FPE (issue #393)

  • -
  • tiffcrop: buffsize check formula in loadImage() amended (fixes issue #273, issue #275)

  • -
  • tiffcrop.c: Fix issue issue #352 heap-buffer-overflow by correcting uint32_t underflow.

  • -
  • tiff2pdf: handle 8-bit palette colormap.

  • -
  • tiffcp: avoid buffer overflow in "mode" string (fixes issue #400)

  • -
  • tiffcp: Fix incomprehensible setting of orientation tag (fixes issue #29)

  • -
  • tiffcp: do not try to fetch compressor-specific tags when not appropriate (fixes issue #396)

  • -
  • tiffcp: fix heap buffer overflow (issue #278)

  • -
  • tiff2ps: In limitMalloc() check for negative size (fixes issue #284)

  • -
  • tiffinfo: add a -M switch to define the maximum heap allocation, and default it to 256 MiB (fixes issue #287, issue #290)

  • -
  • tiffinfo: limit more memory allocations using -M switch (fixes issue #288)

  • -
  • tiffset: fix global-buffer-overflow for ASCII tags where count is required (fixes issue #355)

  • -
  • raw2tiff: check that band number if not zero to avoid floating point exception(fixes issue #338)

  • -
  • tiffinfo/tiffdump: improve output for GDAL tags.

  • -
-
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.5.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.5.0.html deleted file mode 100644 index a8e84f0..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.5.0.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - Changes in TIFF v4.5.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.5.0

- - - - - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.5.0 (tag v4.5.0)

Previous Version

v4.4.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Major changes

-
    -
  • Whole code base reformatting of .c/.h files using new .clang-format format

  • -
  • Documentation changed from static HTML and man pages to Restructured Text -(rst). HTML and man pages are now build artifacts.

  • -
-
-
-

Software configuration changes

-
    -
  • SONAME version bumped to 6 due to changes in symbol versioning.

  • -
  • autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into -its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build.

  • -
  • autoconf/cmake: detect sphinx-build to build HTML and man pages

  • -
  • CMakeLists.txt: fix warning with -Wdev

  • -
  • CMake: correctly set default value of 'lzma' option when liblzma is detected -(issue #482)

  • -
  • CMake: Moved linking of CMath::CMath into CMath_LIBRARY check.

  • -
  • Fix CMake build to be compatible with FetchContent.

  • -
  • cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (issue #443)

  • -
  • cmake: Fixes for Visual Studio 2022.

  • -
  • Adds Requires.private generation so that pkg-config can correctly find -the dependencies of libtiff.

  • -
  • Fix dependency on libm on Android

  • -
  • cmake: libtiffxx is static on win32

  • -
  • Fix build in tif_lzw.c

  • -
  • CMake: Add options for disabling tools, tests, contrib and docs.

  • -
-
-
-

Library changes

-

New/improved functionalities:

- -

API/ABI breaks:

- -

Bug fixes:

-
    -
  • TIFFWriteRawStrip(): restore capabilities to append data in the current strip -(issue #489)

  • -
  • _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on -broken files (issue #479)

  • -
  • TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB -(oss-fuzz #53137)

  • -
  • Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK

  • -
  • Added warning messages for FIELD_IGNORE tags for writing and for -TIFF_SETGET_UNDEFINED for reading added. (issue #438)

  • -
  • tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (issue #439)

  • -
  • tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration -(issue #364)

  • -
  • Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value -(issue #149, issue #150, issue #152, issue #168, issue #250, -issue #269,:issue:398, CVE-2022-3599, issue #456)

  • -
  • TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case -(oss-fuzz #52309)

  • -
  • Improved/fixes IFD-Loop Handling (issue #455).

  • -
  • Update getimage to support large raster images.

  • -
  • Presetting of default tag values extended (e.g. PlanarConfig). (issue #449)

  • -
  • Deal with RichTIFFIPTC tag written with LONG type (issue #225)

  • -
  • TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected -(issue #442)

  • -
  • tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional -compile-time version check

  • -
  • TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could -cause issues with reading JPEG compressed files

  • -
  • _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific -tag and the codec is not configured (issue #433, issue #486, -CVE-2022-34526)

  • -
  • Add basic 16 bit cielab support.

  • -
  • WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding

  • -
  • tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2

  • -
-
-
-

Tools changes

-

New/improved functionality:

-
    -
  • tiffinfo: Updated to parse through SubIFDs and show their tags.

  • -
-

Bug fixes:

- -
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.5.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.5.1.html deleted file mode 100644 index b90ae93..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.5.1.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - Changes in TIFF v4.5.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.5.1

- - - - - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.5.1 (tag v4.5.1)

Previous Version

v4.5.0

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

Master HTTP Site #3

http://libtiff.maptools.org/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Warning

-

This version will be the last one supporting most TIFF tools (except tiffinfo, -tiffdump, tiffcp and tiffset), whose maintenance will be discontinued, due -to the lack of contributors able to address reported security issues. -Starting with libtiff v4.6.0, their source code, at this time ,will still be -available in the source distribution, but they will no longer be built by -default, and issues related to them will no longer be accepted in the -libtiff bug tracker.

-
-
-

Warning

-

Some CMake related changes, in particular related to the CMake config file -now installed, should be considered as a preview and may change in the next -releases based on user feedback. -See discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/496 -and https://gitlab.com/libtiff/libtiff/-/merge_requests/494

-
-
-

Major changes

-

None

-
-
-

Software configuration changes

-
    -
  • Definition of tags reformatted (clang-format off) for better -readability of tag comments in tiff.h and tif_dirinfo.c

  • -
  • Do not install libtiff-4.pc when tiff-install is reset.

  • -
  • Add versioninfo resource files for DLL and tools -compiled with Windows MSVC and MINGW.

  • -
  • Disable clang-formatting for tif_config.h.cmake.in and -tiffconf.h.cmake.in because sensitive for CMake scripts.

  • -
  • CMake: make WebP component name compatible with upstream ConfigWebP.cmake

  • -
  • CMake: make Findliblzma with upstream CMake config file

  • -
  • CMake: FindDeflate.cmake: fix several errors (issue #526).

  • -
  • CMake: FindLERC.cmake: version string return added.

  • -
  • CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files

  • -
  • CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES

  • -
-
-
-

Library changes

-

New/improved functionalities:

-
    -
  • Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of -TIFFOpen() to warn and an alias of FILLORDER_MSB2LSB. -tif_lerc.c: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN.

  • -
  • Optimize relative seeking within TIFFSetDirectory() -by using the learned list of IFD offsets.

  • -
  • Improve internal IFD offset and directory number map handling.

  • -
  • Behavior of TIFFOpen() mode "r+" in the Windows implementation -adjusted to that of Linux.

  • -
-

API/ABI breaks:

-
    -
  • None

  • -
-

Bug fixes:

-
    -
  • TIFFDirectory td_fieldsset type changed from unsigned long, which can -be 32 or 64 bits, to uint32_t (fixes issue #484).

  • -
  • tif_ojpeg.c: checking for division by zero (fixes issue #554).

  • -
  • LZWDecode(): avoid crash when trying to read again from a strip with -a missing end-of-information marker (fixes issue #548).

  • -
  • Fixed runtime error: applying zero offset to null pointer -in countInkNamesString().

  • -
  • Fixing crash in TIFFUnlinkDirectory() when called with -directory number zero ("TIFFUnlinkDirectory(0)") as well as fixing -incorrect behaviour when unlinking the first directory.

  • -
  • tif_luv: check and correct for NaN data in uv_encode() -(issue #530).

  • -
  • TIFFClose() avoid NULL pointer dereferencing -(issue #515).

  • -
  • tif_hash_set.c: include tif_hash_set.h after tif_config.h -to let a chance for GDAL symbol renaming trick.

  • -
  • Fax3: fix failure to decode some fax3 number_of_images -and add test for Fax3 decoding issues -(issue #513).

  • -
  • TIFFSetDirectory() and TIFFWriteDirectorySec() -avoid harmless unsigned-integer-overflow -(due to gdal oss-fuzz #54311 and #54343).

  • -
  • tif_ojpeg.c: fix issue #554 by checking for division by zero -in OJPEGWriteHeaderInfo().

  • -
  • LZWDecode(): avoid crash when trying to read again from a strip with -a missing end-of-information marker (issue #548).

  • -
-
-
-

Documentation

-
    -
  • mention TIFFSetTagExtender() cannot add tags to custom directories.

  • -
  • manpage: add multi page TIFF and SubIFDs description and read / write example.

  • -
-
-
-

Tools changes

-

New/improved functionality:

-
    -
  • None

  • -
-

Bug fixes:

- -
-
-

Contributed software changes

-

None

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.6.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.6.0.html deleted file mode 100644 index 8117507..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.6.0.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - Changes in TIFF v4.6.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.6.0

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.6.0 (tag v4.6.0)

Previous Version

v4.5.1

Master Download Site

https://download.osgeo.org/libtiff/

Master HTTP Site #1

http://www.simplesystems.org/libtiff/

Master HTTP Site #2

https://libtiff.gitlab.io/libtiff/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history:

-
-

Major changes

-
-

Warning

-

This version removes a big number of utilities that have suffered from lack -of maintenance over the years and were the source of various reported -security issues. -See "Removed functionality" below for the list of removed utilities. -Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, -tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors -able to address reported security issues. -tiff2ps and tiff2pdf source code has been moved in a unsupported category, -no longer built by default, but are still part of the the source -distribution. Other retired utilities are in a archive/ directory, only -available in the libtiff git repository. -Issues related to unsupported and archived tools will no longer be accepted -in the libtiff bug tracker.

-
-
-
-

Software configuration changes

-
    -
  • TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and -TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake -(fixes issue #589)

  • -
  • Update CMake and autoconf scripts to consistently update LibTIFF version -defines and references in various files when version definition in -configure.ac has been changed.

    -
      -
    • Move in tiffvers.h from libtiff source directory to libtiff build directory.

    • -
    • Remove unused version information from tif_config.h

    • -
    • With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h -are consistently updated from configure.ac. The version release-date is -taken from file RELEASE-DATE.

    • -
    • The files VERSION and RELEASE-DATE are only updated with a special CMake -target build: cmake --build . --target tiff_release.

    • -
    • For autotools, version information is updated from configure.ac with -./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE.

    • -
    • ./configure generates tiffvers.h with the cached version information and -LIBTIFF_RELEASE_DATE.

    • -
    • "make release" updates tiffvers.h and VERSION file with cached version info -and RELEASE-DATE file and tiffves.h with the current date.

    • -
    -
  • -
  • CMake: fix build with -Dstrip-chopping=off (fixes issue #600)

  • -
-
-
-

Library changes

-

New/improved functionalities:

-
    -
  • Fix using __attribute__ libtiff with clang-for-windows

  • -
-

API/ABI breaks:

-
    -
  • None

  • -
-

Bug fixes:

-
    -
  • WebP decoder: validate WebP blob width, height, band count against TIFF -parameters to avoid use of uninitialized variable, or decoding corrupted -content without explicit error (fixes issue #581, issue #582).

  • -
  • WebP codec: turn exact mode when creating lossless files to avoid altering -R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038)

  • -
  • Fix TransferFunction writing of only two transfer functions.

  • -
  • TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it -should be harmless in practice though -(https://gitlab.com/libtiff/libtiff/-/merge_requests/512)

  • -
-
-
-

Documentation

-
    -
  • TiffField functions documentation updated with return behaviour for not -defined tags and determination of write-/read-count size.

  • -
-
-
-

Tools changes

-

Removed functionality:

-
    -
  • The following tools are no longer compiled and have been moved to archive/tools:

    -
      -
    • fax2ps

    • -
    • fax2tiff

    • -
    • pal2rgb

    • -
    • ppm2tiff

    • -
    • raw2tiff

    • -
    • rgb2ycbcr

    • -
    • thumbnail

    • -
    • tiff2bw

    • -
    • tiff2rgba

    • -
    • tiffcmp

    • -
    • tiffcrop

    • -
    • tiffdither

    • -
    • tiffgt

    • -
    • tiffmedian

    • -
    -
  • -
  • The following tools are no longer compiled by default: tiff2ps and tiff2pdf. -They have been moved to tools/unsupported. -They can be built by setting --enable-tools-unsupported for autoconf, -or -Dtiff-tools-unsupported for CMake, but as the name imply, they are -no longer supported by upstream. Packagers are suggested not to enable those -options.

  • -
  • tiffcp: remove -i option (ignore errors), because almost all -fuzzer issues were consequential errors from ignored errors because of the -"-i" option.

  • -
-

New/improved functionality:

-
    -
  • None

  • -
-

Bug fixes:

-
    -
  • tiffset: fix #597: warning: comparison of integer expressions of different -signedness. (fixes issue #597)

  • -
  • tiffcp: fix memory corruption (overflow) on hostile images -(fixes issue #591)

  • -
-
-
-

Test changes

-
    -
  • Add missing test_write_read_tags.c and test_transferfunction_write_read.c -in tarball (fixes issue #585) and correct "long" issue.

  • -
  • Don't use "long" because can be int32_t or int64_t, depending on compiler and -system.

  • -
-
-
-

Changes to contributed and unsupported tools

-
    -
  • raw2tiff: fix integer overflow and bypass of the check (fixes issue #592)

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.7.0.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.7.0.html deleted file mode 100644 index 451c008..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.7.0.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - Changes in TIFF v4.7.0 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.7.0

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.7.0 (tag v4.7.0)

Previous Version

v4.6.0

Primary Download Site

https://download.osgeo.org/libtiff/

Home HTTP Site #1

http://www.simplesystems.org/libtiff/

Home HTTP Site #2

https://libtiff.gitlab.io/libtiff/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history.

-
-

Major changes

-

This version restores in the default build the availability of the tools that -had been dropped in v4.6.0 (cf RFC 2: Restoring Needed LibTIFF Tools)

-
-
-

Software configuration changes

-
    -
  • autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection

  • -
  • autoconf build: fix error when running make clean (fixes issue #630)

  • -
  • autoconf build: back off the minimum required automake version to 1.11

  • -
  • autoconf.ac: fix detection of windows.h for mingw (fixes issue #605)

  • -
  • libtiff-4.pc: Fix Requires.private missing Lerc. It provides a .pc file starting from version 4 -(in autoconf builds, we assume that liblerc is at least version 4)

  • -
  • CMake: Fix TIFF_INCLUDE_DIRS

  • -
  • CMake: MinGW compilers don't need a .def file for shared library

  • -
  • CMake: move libdeflate and Lerc to Requires.private

  • -
  • CMake: enable resource compilation on all Windows.

  • -
-
-
-

Library changes

-

New/improved functionalities:

-
    -
  • Add TIFFOpenOptionsSetMaxCumulatedMemAlloc(). This function complements -TIFFOpenOptionsSetMaxSingleMemAlloc() to define the maximum cumulated -memory allocations in byte, for a given TIFF handle, that libtiff internal -memory allocation functions are allowed.

  • -
-

API/ABI breaks:

-
    -
  • None

  • -
-

Bug fixes:

-
    -
  • TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged.

  • -
  • TIFFXYZToRGB: avoid integer overflow (fixes issue #644)

  • -
  • uv_decode() and uv_encode(): avoid potential out-of-bounds array index -(fixes issue #645)

  • -
  • Fix cases where tif_curdir is set incorrectly. -Fix cases where the current directory number (tif_curdir) is set inconsistently -or incorrectly, depending on the previous history.

  • -
  • TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if -setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) -output buffer if failure (fixes issue #375)

  • -
  • OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes issue #183)

  • -
  • ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL

  • -
  • LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values

  • -
  • tif_fax3.c: error out after a number of times end-of-file has been reached -(fixes issue #583)

  • -
  • LZW: avoid warning about misaligned address with UBSAN (fixes issue #616)

  • -
  • TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row -(fixes issue #622, CVE-2023-52356)

  • -
  • tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests

  • -
  • Avoid FPEs (division by zero) in tif_getimage.c.

  • -
  • Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros -by checking for denominator not zero before macros are executed. (fixes issue #628)

  • -
  • Add non-zero check before division in TIFFComputeStrip()

  • -
  • Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active

  • -
  • Setting the TIFFFieldInfo field set_field_type should consider field_writecount not field_readcount

  • -
  • Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated -memory in the tif-structure.

  • -
  • For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is -set at the end to avoid deleting the last character. (fixes issue #579)

  • -
  • Check return value of _TIFFCreateAnonField(). (fixes issue #624, CVE-2024-7006)

  • -
  • Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857)

  • -
  • Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes issue #618)

  • -
  • tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes issue #608)

  • -
-

Other changes:

-
    -
  • Fix warnings with GCC 14

  • -
  • tif_dir.c: Log source file, line number, and input tif for directory count error (fixes issue #627)

  • -
  • Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() -changed to using set_field_type.

  • -
  • tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups

  • -
  • Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble()

  • -
  • Remove support for _MSC_VER < 1500.

  • -
  • Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__

  • -
-
-
-

Documentation

-
    -
  • Amend manpages for changes in current directory index behaviour

  • -
  • Note on using TIFFFlush() before TIFFClose() to check that the data has been -successfully written to the file. (fixes issue #506)

  • -
  • Update TIFF documentation about TIFFOpenOptions.rst and -TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes -(relates to CVE-2024-7006)

  • -
-
-
-

Tools changes

-

Re-added tools:

-
-
    -
  • fax2ps

  • -
  • fax2tiff

  • -
  • pal2rgb

  • -
  • ppm2tiff

  • -
  • raw2tiff

  • -
  • rgb2ycbcr (not installed)

  • -
  • thumbnail (not installed)

  • -
  • tiff2bw

  • -
  • tiff2rgba

  • -
  • tiffcmp

  • -
  • tiffcrop

  • -
  • tiffdither

  • -
  • tiffgt

  • -
  • tiffmedian

  • -
  • tiff2ps

  • -
  • tiff2pdf

  • -
-
-

New/improved functionality:

-
    -
  • tiff2rgba: Add background gradient option for alpha compositing

  • -
  • tiffcp: -i flag restored

  • -
-

Bug fixes:

-
    -
  • tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054

  • -
  • tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection"

  • -
  • tiffcrop: fix buffer overflows, use after free (fixes issue #542, -issue #550, issue #552)

  • -
  • tiff2pdf: address Coverity scan issues

  • -
  • tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF

  • -
  • tiff2pdf: fix issue with JPEG restart-interval marker when converting from -JPEG-compressed files (fixes issue #539)

  • -
  • tiff2pdf: red and blue were being swapped for RGBA decoding (fixes issue #253)

  • -
  • tiff2pdf: fixes issue #596

  • -
  • thumbnail: address Coverity scan issues

  • -
  • tiffcp: Add check for limitMalloc return to fix Coverity 1603334

  • -
  • tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG

  • -
  • tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs issue #571)

  • -
  • tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, -REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG

  • -
  • tiffcp: Check also codec of input image, not only from output image (fixes issue #606)

  • -
  • Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions.

  • -
  • fax2ps and fax2tiff: memory leak fixes (fixes issue #476)

  • -
  • tiffmedian: memory leak fixes (fixes issue #599)

  • -
  • fax2tiff: fix EOFB interpretation (fixes issue #191)

  • -
  • fax2tiff: fix issue with unreasonable width input (fixes issue #249)

  • -
  • tiffcp and tiffcrop: fixes issue #228

  • -
  • tiff2rgba: fixes issue #469

  • -
  • tiffdither: fixes issue #473

  • -
  • tiffdump: fix wrong printf formatter in error message (Coverity 1472932)

  • -
  • tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997)

  • -
  • tifcp/tiffset: use correct format specifiers

  • -
-
-
-

Changes to contributed and unsupported tools

-
    -
  • contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680)

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/releases/v4.7.1.html b/third_party/libtiff/doc/html-prebuilt/releases/v4.7.1.html deleted file mode 100644 index b67e5ce..0000000 --- a/third_party/libtiff/doc/html-prebuilt/releases/v4.7.1.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - Changes in TIFF v4.7.1 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Changes in TIFF v4.7.1

- - - - - - - - - - - - - - - - - - - -
References

Current Version

v4.7.1 (tag v4.7.1)

Previous Version

v4.7.0

Primary Download Site

https://download.osgeo.org/libtiff/

Home HTTP Site #1

http://www.simplesystems.org/libtiff/

Home HTTP Site #2

https://libtiff.gitlab.io/libtiff/

-

This document provides a summary of significant changes made to the -software between the previous and current versions (see -above). A fully-detailed change summary is provided by the ChangeLog file -included in the release package and by the Git commit history.

-
-

Major changes

-

None

-
-
-

Software configuration changes

-
    -
  • Define HAVE_JPEGTURBO_DUAL_MODE_8_12 and LERC_STATIC in tif_config.h.

  • -
  • CMake: define WORDS_BIGENDIAN via tif_config.h

  • -
  • doc/CMakeLists.txt: remove useless cmake_minimum_required()

  • -
  • CMake: fix build with LLVM/Clang 17 (fixes issue #651)

  • -
  • CMake: set CMP0074 new policy

  • -
  • Set LINKER_LANGUAGE for C targets with C deps

  • -
  • Export tiffxx cmake target (fixes issue #674)

  • -
  • autogen.sh: Enable verbose wget.

  • -
  • configure.ac: Syntax updates for Autoconf 2.71

  • -
  • autogen.sh: Re-implement based on autoreconf. Failure to update -config.guess/config.sub does not return error (fixes issue #672)

  • -
  • CMake: fix CMake 4.0 warning when minimum required version is < 3.10.

  • -
  • CMake: Add build option tiff-static (fixes issue #709)

  • -
-
-
-

Library changes

-

New/improved functionalities:

-
    -
  • Add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control about -emitting warnings for unknown tags. No longer emit warnings about unknown -tags by default

  • -
  • tif_predict.c: speed-up decompression in some cases.

  • -
-

API/ABI breaks:

-
    -
  • None

  • -
-

Bug fixes:

-
    -
  • tif_fax3: For fax group 3 data if no EOL is detected, reading is retried -without synchronisation for EOLs. (fixes issue #54)

  • -
  • Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. -Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. -Improving handling when field_name = NULL. -(fixes issue #532)

  • -
  • tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in -the DNG 1.7 specification

  • -
  • TIFFWriteDirectorySec: Increment string length for ASCII tags for codec tags -defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags. -(fixes issue #648)

  • -
  • Do not error out on a tag whose tag count value is zero, just issue a warning. -Fix parsing a private tag 0x80a6 (fixes issue #647)

  • -
  • TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24 -(Fixes https://github.com/OSGeo/gdal/issues/10875)

  • -
  • tif_getimage.c: Remove unnecessary calls to TIFFRGBAImageOK() -(fixes issue #175)

  • -
  • Fix writing a Predictor=3 file with non-native endianness

  • -
  • -
    _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds

    read / nullptr dereference) in case of out-of-memory situation when dealing -with custom tags (fixes issue #663)

    -
    -
    -
  • -
  • tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal -1 and PlanarConfiguration = Contiguous (fixes issue #26)

  • -
  • tif_fax3.c: error out after a number of times end-of-line or unexpected bad -code words have been reached. (fixes issue #670)

  • -
  • Fix memory leak in TIFFSetupStrips() (fixes issue #665)

  • -
  • tif_zip.c: Provide zlib allocation functions. -Otherwise for zlib built with -DZ_SOLO inflating will fail.

  • -
  • Fix memory leak in _TIFFSetDefaultCompressionState. (fixes issue #676)

  • -
  • tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if -"prediction" is enabled. Use extra working buffer in PredictorEncodeRow(). -(fixes issue #5)

  • -
  • tif_getimage.c: update some integer overflow checks (fixes issue #79)

  • -
  • tif_getimage.c: Fix buffer underflow crash for less raster rows at -TIFFReadRGBAImageOriented() (fixes issue #704)

  • -
  • TIFFReadRGBAImage(): several fixes to avoid buffer overflows.

  • -
  • Correct passing arguments to TIFFCvtIEEEFloatToNative() and -TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. (fixes -issue #699)

  • -
  • LZWDecode(): avoid nullptr dereference when trying to read again after EOI -marker has been found with remaining output bytes (fixes issue #698)

  • -
  • TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return.

  • -
  • TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when -clearing tif_rawdata (fixes issue #711)

  • -
  • JPEGEncodeRaw(): error out if a previous scanline failed to be written, to -avoid out-of-bounds access (fixes issue #714)

  • -
  • tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for -8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually -released as 3.0. (fixes issue #717)

  • -
  • add assert for TIFFReadCustomDirectory infoarray check.

  • -
-

Other changes:

-
    -
  • tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value

  • -
  • tif_lzw.c / tif_packbits.c: use NULL instead of 0.

  • -
  • Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY -macros to disable compiling write-support for those codecs.

  • -
  • tif_lerc.c: add missing casts

  • -
  • Merge several functions implemented twice in different modules. -(see issue #154)

  • -
  • Remove get_field_type form TIFFField structure because it is not used -anymore and rename other parameter to set_get_field_type

  • -
  • Silence some Coverity Scan warnigs and mark already dismissed ones.

  • -
  • References to codec libraries updated and missing codec compile defines -(tiffconf.h) added.

  • -
  • Move mkg3states under libtiff/tools. (fixes issue #708)

  • -
  • tiff_itrunc(): don't use rand() to please Coverity Scan.

  • -
  • tiffio.h: fix compilation with LOGLUV_PUBLIC=0

  • -
  • LICENSE.md: Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) -(fixes issue #431)

  • -
-
-
-

Documentation

-
    -
  • TIFFRGBAImage.rst note added for incorrect saving of images with TIFF -orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster.

  • -
  • TIFFRGBAImage.rst note added about un-associated alpha handling -(fixes issue #67)

  • -
  • Update "Defining New TIFF Tags" description. (fixes issue #642)

  • -
  • Fix return type of TIFFReadEncodedTile()

  • -
  • Update the documentation to reflect deprecated typedefs.

  • -
  • TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for -image data and not for IFD data.

  • -
  • Update documentation on re-entrancy and thread safety.

  • -
  • Remove dead links to no more existing Awaresystems web-site.

  • -
  • Updating BigTIFF specification and some miscelaneous editions.

  • -
  • Replace some last links and remove last todos.

  • -
  • Added hints for correct allocation of TIFFYCbCrtoRGB structure and its -associated buffers. (fixes issue #681)

  • -
  • Added chapter to "Using the TIFF Library" with links to handling multi-page -TIFF and custom directories. (fixes issue #43)

  • -
  • update TIFFOpen.rst with the return values of mapproc and unmapproc. -(fixes issue #12)

  • -
-
-
-

Tools changes

-

New/improved functionality:

-
    -
  • tiffinfo: add a -W switch to warn about unknown tags.

  • -
  • tiffdither: process all pages in input TIFF file.

  • -
-

Bug fixes:

-
    -
  • ppm2tiff: Fix bug in pack_words trailing bytes, where last two bytes of -each line were written wrongly. (fixes issue #467)

  • -
  • fax2ps: fix regression of commit 28c38d648b64a66c3218778c4745225fe3e3a06d -where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer -(fixes issue #649)

  • -
  • tiff2pdf: Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH (fixes issue #650)

  • -
  • tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by -zero. (fixes issue #654)

  • -
  • tiff2pdf: avoid null pointer dereference. (fixes issue #741)

  • -
  • Improve non-secure integer overflow check (comparison of division result -with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. (fixes issue #546)

  • -
  • tiff2rgba: fix some "a partial expression can generate an overflow before it -is assigned to a broader type" warnings. (fixes issue #682)

  • -
  • tiffdither/tiffmedian: Don't skip the first line of the input image. -(fixes issue #703)

  • -
  • tiffdither: avoid out-of-bounds read identified in issue #733

  • -
  • tiffmedian: error out if TIFFReadScanline() fails (fixes issue #707)

  • -
  • tiffmedian: close input file. (fixes issue #735)

  • -
  • thumbail: avoid potential out of bounds access (fixes issue #715)

  • -
  • tiffcrop: close open TIFF files and release allocated buffers before exiting -in case of error to avoid memory leaks. (fixes issue #716)

  • -
  • tiffcrop: fix double-free and memory leak exposed by issue #721

  • -
  • tiffcrop: avoid buffer overflow. (fixes issue #740)

  • -
  • tiffcrop: avoid nullptr dereference. (fixes issue #734)

  • -
  • tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression -*datamem to PrintData, which uses it as a divisor or modulus.

  • -
  • tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and -TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference. -(fixes issue #718)

  • -
  • tiffcmp: fix memory leak when second file cannot be opened. -(fixes issue #718 and issue #729)

  • -
  • tiffcp: fix setting compression level for lossless codecs. -(fixes issue #730)

  • -
  • raw2tiff: close input file before exit (fixes issue #742)

  • -
-
-
-

Changes to contributed and unsupported tools

-
    -
  • addtiffo: Fixing MSVC compiler warnings

  • -
  • Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc.

  • -
  • oss-fuzz: fix memory leak in fuzz target.

  • -
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/rfcs/index.html b/third_party/libtiff/doc/html-prebuilt/rfcs/index.html deleted file mode 100644 index 667a357..0000000 --- a/third_party/libtiff/doc/html-prebuilt/rfcs/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - Request For Comments (RFCs) — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Request For Comments (RFCs)

-

RFCs are the process through which major changes in the working or content -of the libtiff project are conducted.

- -
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/rfcs/rfc1_psc.html b/third_party/libtiff/doc/html-prebuilt/rfcs/rfc1_psc.html deleted file mode 100644 index 3affe37..0000000 --- a/third_party/libtiff/doc/html-prebuilt/rfcs/rfc1_psc.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - RFC 1: Project Steering Committee Guidelines — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

RFC 1: Project Steering Committee Guidelines

-

Author: Even Rouault

-

Contact: even.rouault at spatials.com

-

Status: Adopted

-
-

Summary

-

This document describes how the libtiff Project Steering Committee -determines membership, and makes decisions on libtiff project issues.

-

In brief, the committee votes on proposals on the libtiff mailing list. -Proposals are available for review for at least 5 business days, and a single -veto is sufficient to delay progress though ultimately a majority of members can -pass a proposal.

-
-
-

Detailed Process

-
    -
  1. Proposals are written up and submitted on the libtiff mailing list -for discussion and voting, by any interested party, not just -committee members.

  2. -
  3. Proposals need to be available for review for at least 5 business -days before a final decision can be made.

  4. -
  5. Respondents may vote "+1" to indicate support for the proposal and a -willingness to support implementation.

  6. -
  7. Respondents may vote "-1" to veto a proposal, but must provide clear -reasoning and alternate approaches to resolving the problem within -the voting delay.

  8. -
  9. A vote of -0 indicates mild disagreement, but has no effect. A 0 -indicates no opinion. A +0 indicate mild support, but has no effect.

  10. -
  11. Anyone may comment on proposals on the list, but only members of the -Project Steering Committee's votes will be counted.

  12. -
  13. A proposal will be accepted if it receives at least +2 (including the -proposer) and no vetos (-1).

  14. -
  15. If a proposal is vetoed, and it cannot be revised to satisfy all -parties, then it can be resubmitted for an override vote in which a -majority of all eligible voters indicating +1 is sufficient to pass -it. Note that this is a majority of all committee members, not just -those who actively vote.

  16. -
  17. Upon completion of discussion and voting the proposer should -announce whether they are proceeding (proposal accepted) or are -withdrawing their proposal (vetoed).

  18. -
  19. The Chair gets a vote.

  20. -
  21. The Chair is responsible for keeping track of who is a member of the -Project Steering Committee.

  22. -
  23. Addition and removal of members from the committee, as well as -selection of a Chair should be handled as a proposal to the -committee.

  24. -
  25. The Chair adjudicates in cases of disputes about voting.

  26. -
-
-
-

When is Vote Required?

-
    -
  • Anything that could cause backward compatibility issues.

  • -
  • Adding, removing or modifying substantial amounts of code.

  • -
  • Changing inter-subsystem APIs.

  • -
  • Issues of procedure.

  • -
  • When releases should take place.

  • -
  • Anything that might be controversial

  • -
-
-
-

Observations

-
    -
  • The Chair is the ultimate adjudicator if things break down.

  • -
  • The absolute majority rule can be used to override an obstructionist -veto, but it is intended that in normal circumstances vetoers need to -be convinced to withdraw their veto. We are trying to reach -consensus.

  • -
  • It is strongly recommended that proposals subject to a vote be discussed -first on the mailing list to build consensus before proceeding to the vote.

  • -
-
-
-

Bootstrapping

-

The initial members of the Project Steering Committee are:

-
    -
  • Bob Friesenhahn (@bobfriesenhahn)

  • -
  • Su Laus (@Su_Laus)

  • -
  • Roger Leigh (@rleigh)

  • -
  • Timothy Lyanguzov (@theta682)

  • -
  • Olivier Paquet (@1-Olivier)

  • -
  • Leonard Rosenthol (@lrosenthol)

  • -
  • Even Rouault (@rouault)

  • -
-

Even Rouault is declared initial Chair of the Project Steering Committee.

-

The current membership list can be found on the Project Steering Committee page.

-
-
-

Credits

-

This document is a direct adaptation from -GDAL Project Management Committee Guidelines, -authored by Frank Warmerdam.

-
-
-

Voting history

-

Adopted by +1 vote from all above mentioned initial members of the PSC.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/rfcs/rfc2_restoring_needed_tools.html b/third_party/libtiff/doc/html-prebuilt/rfcs/rfc2_restoring_needed_tools.html deleted file mode 100644 index f62f540..0000000 --- a/third_party/libtiff/doc/html-prebuilt/rfcs/rfc2_restoring_needed_tools.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - RFC 2: Restoring Needed LibTIFF Tools — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

RFC 2: Restoring Needed LibTIFF Tools

-

Author: Su Laus

-

Contact: (@Su_Laus)

-

Status: Approved

-
-

Summary

-

The purpose of this RFC is to clarify if and which tools that were moved -to the archive in libtiff 4.6.0 should be reactivated.

-
-
-

Prehistory

-

The tools in libtiff caused many vulnerabilities -and CVEs that were attributed to the libtiff library itself. -Trying to fix the security holes in the tools turned out to be a -Sisyphean task (can never be done). -Therefore, most of the tools in libtiff 4.6.0 were moved to the archive -and the existing problems were closed with "wontfix-unmaintained".

-

It was later understood that some users depend on some of these archived tools.

-

Some problems with the tools have now been fixed -(see e.g. https://gitlab.com/libtiff/libtiff/-/merge_requests/569).

-
-
-

Proposed procedure

-
    -
  • All tools as of libtiff 4.5.1 shall be restored.

  • -
  • Bugfixes in MR !569 are applied in single merge requests for traceability -and selectively as some changes might not be applicable.

  • -
  • Remove “wontfix-unmaintained” from closed issues, when fixed.

  • -
  • All issues related to utilities / tools shall get label “utility”.

  • -
  • The documentation and other references shall point to -https://libtiff.gitlab.io/libtiff/.

  • -
  • After an initial merge has been applied for restoring the tools, -the http://www.libtiff.org page shall be reset as a mirror of -https://libtiff.gitlab.io/libtiff/.

  • -
  • Finally release as 4.7.0 when all known issues of the tools are closed.

  • -
-
-
-

References to previous contributions to the discussion

-

https://gitlab.com/libtiff/libtiff/-/issues/580 and related merge request, -https://gitlab.com/libtiff/libtiff/-/merge_requests/569, -and discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/581

-
-
-

Voting history

-

+1 from PSC members @bobfriesenhahn, @1-Olivier, @Su_Laus

-

+0 from PSC members @theta682 and @rouault

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/search.html b/third_party/libtiff/doc/html-prebuilt/search.html deleted file mode 100644 index 6b926ba..0000000 --- a/third_party/libtiff/doc/html-prebuilt/search.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - Search — LibTIFF 4.7.1 documentation - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

- - - - -

- Searching for multiple words only shows matches that contain - all words. -

- - -
- - - -
- - - -
- -
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/searchindex.js b/third_party/libtiff/doc/html-prebuilt/searchindex.js deleted file mode 100644 index d4c8b3f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({"docnames": ["addingtags", "build", "contrib", "functions", "functions/TIFFAccessTagMethods", "functions/TIFFClientInfo", "functions/TIFFClose", "functions/TIFFCreateDirectory", "functions/TIFFCustomDirectory", "functions/TIFFCustomTagList", "functions/TIFFDataWidth", "functions/TIFFDeferStrileArrayWriting", "functions/TIFFError", "functions/TIFFFieldDataType", "functions/TIFFFieldName", "functions/TIFFFieldPassCount", "functions/TIFFFieldQuery", "functions/TIFFFieldReadCount", "functions/TIFFFieldTag", "functions/TIFFFieldWriteCount", "functions/TIFFFlush", "functions/TIFFGetField", "functions/TIFFMergeFieldInfo", "functions/TIFFOpen", "functions/TIFFOpenOptions", "functions/TIFFPrintDirectory", "functions/TIFFProcFunctions", "functions/TIFFRGBAImage", "functions/TIFFReadDirectory", "functions/TIFFReadEncodedStrip", "functions/TIFFReadEncodedTile", "functions/TIFFReadFromUserBuffer", "functions/TIFFReadRGBAImage", "functions/TIFFReadRGBAStrip", "functions/TIFFReadRGBATile", "functions/TIFFReadRawStrip", "functions/TIFFReadRawTile", "functions/TIFFReadScanline", "functions/TIFFReadTile", "functions/TIFFSetDirectory", "functions/TIFFSetField", "functions/TIFFSetTagExtender", "functions/TIFFStrileQuery", "functions/TIFFWarning", "functions/TIFFWriteDirectory", "functions/TIFFWriteEncodedStrip", "functions/TIFFWriteEncodedTile", "functions/TIFFWriteRawStrip", "functions/TIFFWriteRawTile", "functions/TIFFWriteScanline", "functions/TIFFWriteTile", "functions/TIFFbuffer", "functions/TIFFcodec", "functions/TIFFcolor", "functions/TIFFmemory", "functions/TIFFquery", "functions/TIFFsize", "functions/TIFFstrip", "functions/TIFFswab", "functions/TIFFtile", "functions/_TIFFRewriteField", "functions/_TIFFauxiliary", "functions/libtiff", "images", "index", "internals", "libtiff", "multi_page", "project/acknowledgements", "project/bugs", "project/index", "project/license", "project/mailinglist", "project/psc", "releases/historical", "releases/index", "releases/v3.4beta007", "releases/v3.4beta016", "releases/v3.4beta018", "releases/v3.4beta024", "releases/v3.4beta028", "releases/v3.4beta029", "releases/v3.4beta031", "releases/v3.4beta032", "releases/v3.4beta033", "releases/v3.4beta034", "releases/v3.4beta035", "releases/v3.4beta036", "releases/v3.5.1", "releases/v3.5.2", "releases/v3.5.3", "releases/v3.5.4", "releases/v3.5.5", "releases/v3.5.6beta", "releases/v3.5.7", "releases/v3.6.0", "releases/v3.6.1", "releases/v3.7.0", "releases/v3.7.0alpha", "releases/v3.7.0beta", "releases/v3.7.0beta2", "releases/v3.7.1", "releases/v3.7.2", "releases/v3.7.3", "releases/v3.7.4", "releases/v3.8.0", "releases/v3.8.1", "releases/v3.8.2", "releases/v3.9.0", "releases/v3.9.0beta", "releases/v3.9.1", "releases/v3.9.2", "releases/v3.9.3", "releases/v3.9.4", "releases/v3.9.5", "releases/v4.0.0", "releases/v4.0.1", "releases/v4.0.10", "releases/v4.0.2", "releases/v4.0.3", "releases/v4.0.4", "releases/v4.0.4beta", "releases/v4.0.5", "releases/v4.0.6", "releases/v4.0.7", "releases/v4.0.8", "releases/v4.0.9", "releases/v4.1.0", "releases/v4.2.0", "releases/v4.3.0", "releases/v4.4.0", "releases/v4.5.0", "releases/v4.5.1", "releases/v4.6.0", "releases/v4.7.0", "releases/v4.7.1", "rfcs/index", "rfcs/rfc1_psc", "rfcs/rfc2_restoring_needed_tools", "specification/bigtiff", "specification/coverage", "specification/coverage-bigtiff", "specification/index", "specification/technote2", "terms", "tools", "tools/fax2ps", "tools/fax2tiff", "tools/pal2rgb", "tools/ppm2tiff", "tools/raw2tiff", "tools/rgb2ycbcr", "tools/thumbnail", "tools/tiff2bw", "tools/tiff2pdf", "tools/tiff2ps", "tools/tiff2rgba", "tools/tiffcmp", "tools/tiffcp", "tools/tiffcrop", "tools/tiffdither", "tools/tiffdump", "tools/tiffgt", "tools/tiffinfo", "tools/tiffmedian", "tools/tiffset", "tools/tiffsplit"], "filenames": ["addingtags.rst", "build.rst", "contrib.rst", "functions.rst", "functions/TIFFAccessTagMethods.rst", "functions/TIFFClientInfo.rst", "functions/TIFFClose.rst", "functions/TIFFCreateDirectory.rst", "functions/TIFFCustomDirectory.rst", "functions/TIFFCustomTagList.rst", "functions/TIFFDataWidth.rst", "functions/TIFFDeferStrileArrayWriting.rst", "functions/TIFFError.rst", "functions/TIFFFieldDataType.rst", "functions/TIFFFieldName.rst", "functions/TIFFFieldPassCount.rst", "functions/TIFFFieldQuery.rst", "functions/TIFFFieldReadCount.rst", "functions/TIFFFieldTag.rst", "functions/TIFFFieldWriteCount.rst", "functions/TIFFFlush.rst", "functions/TIFFGetField.rst", "functions/TIFFMergeFieldInfo.rst", "functions/TIFFOpen.rst", "functions/TIFFOpenOptions.rst", "functions/TIFFPrintDirectory.rst", "functions/TIFFProcFunctions.rst", "functions/TIFFRGBAImage.rst", "functions/TIFFReadDirectory.rst", "functions/TIFFReadEncodedStrip.rst", "functions/TIFFReadEncodedTile.rst", "functions/TIFFReadFromUserBuffer.rst", "functions/TIFFReadRGBAImage.rst", "functions/TIFFReadRGBAStrip.rst", "functions/TIFFReadRGBATile.rst", "functions/TIFFReadRawStrip.rst", "functions/TIFFReadRawTile.rst", "functions/TIFFReadScanline.rst", "functions/TIFFReadTile.rst", "functions/TIFFSetDirectory.rst", "functions/TIFFSetField.rst", "functions/TIFFSetTagExtender.rst", "functions/TIFFStrileQuery.rst", "functions/TIFFWarning.rst", "functions/TIFFWriteDirectory.rst", "functions/TIFFWriteEncodedStrip.rst", "functions/TIFFWriteEncodedTile.rst", "functions/TIFFWriteRawStrip.rst", "functions/TIFFWriteRawTile.rst", "functions/TIFFWriteScanline.rst", "functions/TIFFWriteTile.rst", "functions/TIFFbuffer.rst", "functions/TIFFcodec.rst", "functions/TIFFcolor.rst", "functions/TIFFmemory.rst", "functions/TIFFquery.rst", "functions/TIFFsize.rst", "functions/TIFFstrip.rst", "functions/TIFFswab.rst", "functions/TIFFtile.rst", "functions/_TIFFRewriteField.rst", "functions/_TIFFauxiliary.rst", "functions/libtiff.rst", "images.rst", "index.rst", "internals.rst", "libtiff.rst", "multi_page.rst", "project/acknowledgements.rst", "project/bugs.rst", "project/index.rst", "project/license.rst", "project/mailinglist.rst", "project/psc.rst", "releases/historical.rst", "releases/index.rst", "releases/v3.4beta007.rst", "releases/v3.4beta016.rst", "releases/v3.4beta018.rst", "releases/v3.4beta024.rst", "releases/v3.4beta028.rst", "releases/v3.4beta029.rst", "releases/v3.4beta031.rst", "releases/v3.4beta032.rst", "releases/v3.4beta033.rst", "releases/v3.4beta034.rst", "releases/v3.4beta035.rst", "releases/v3.4beta036.rst", "releases/v3.5.1.rst", "releases/v3.5.2.rst", "releases/v3.5.3.rst", "releases/v3.5.4.rst", "releases/v3.5.5.rst", "releases/v3.5.6beta.rst", "releases/v3.5.7.rst", "releases/v3.6.0.rst", "releases/v3.6.1.rst", "releases/v3.7.0.rst", "releases/v3.7.0alpha.rst", "releases/v3.7.0beta.rst", "releases/v3.7.0beta2.rst", "releases/v3.7.1.rst", "releases/v3.7.2.rst", "releases/v3.7.3.rst", "releases/v3.7.4.rst", "releases/v3.8.0.rst", "releases/v3.8.1.rst", "releases/v3.8.2.rst", "releases/v3.9.0.rst", "releases/v3.9.0beta.rst", "releases/v3.9.1.rst", "releases/v3.9.2.rst", "releases/v3.9.3.rst", "releases/v3.9.4.rst", "releases/v3.9.5.rst", "releases/v4.0.0.rst", "releases/v4.0.1.rst", "releases/v4.0.10.rst", "releases/v4.0.2.rst", "releases/v4.0.3.rst", "releases/v4.0.4.rst", "releases/v4.0.4beta.rst", "releases/v4.0.5.rst", "releases/v4.0.6.rst", "releases/v4.0.7.rst", "releases/v4.0.8.rst", "releases/v4.0.9.rst", "releases/v4.1.0.rst", "releases/v4.2.0.rst", "releases/v4.3.0.rst", "releases/v4.4.0.rst", "releases/v4.5.0.rst", "releases/v4.5.1.rst", "releases/v4.6.0.rst", "releases/v4.7.0.rst", "releases/v4.7.1.rst", "rfcs/index.rst", "rfcs/rfc1_psc.rst", "rfcs/rfc2_restoring_needed_tools.rst", "specification/bigtiff.rst", "specification/coverage.rst", "specification/coverage-bigtiff.rst", "specification/index.rst", "specification/technote2.rst", "terms.rst", "tools.rst", "tools/fax2ps.rst", "tools/fax2tiff.rst", "tools/pal2rgb.rst", "tools/ppm2tiff.rst", "tools/raw2tiff.rst", "tools/rgb2ycbcr.rst", "tools/thumbnail.rst", "tools/tiff2bw.rst", "tools/tiff2pdf.rst", "tools/tiff2ps.rst", "tools/tiff2rgba.rst", "tools/tiffcmp.rst", "tools/tiffcp.rst", "tools/tiffcrop.rst", "tools/tiffdither.rst", "tools/tiffdump.rst", "tools/tiffgt.rst", "tools/tiffinfo.rst", "tools/tiffmedian.rst", "tools/tiffset.rst", "tools/tiffsplit.rst"], "titles": ["Defining New TIFF Tags", "Building the TIFF Software Distribution", "Contributed TIFF Software", "TIFF Functions Overview", "TIFFAccessTagMethods", "TIFFClientInfo", "TIFFClose", "TIFFCreateDirectory", "TIFFCustomDirectory", "TIFFCustomTagList", "TIFFDataWidth", "TIFFDeferStrileArrayWriting", "TIFFError", "TIFFFieldDataType", "TIFFFieldName", "TIFFFieldPassCount", "TIFFFieldQuery", "TIFFFieldReadCount", "TIFFFieldTag", "TIFFFieldWriteCount", "TIFFFlush", "TIFFGetField", "TIFFMergeFieldInfo", "TIFFOpen", "TIFFOpenOptions", "TIFFPrintDirectory", "TIFFProcFunctions", "TIFFRGBAImage", "TIFFReadDirectory", "TIFFReadEncodedStrip", "TIFFReadEncodedTile", "TIFFReadFromUserBuffer", "TIFFReadRGBAImage", "TIFFReadRGBAStrip", "TIFFReadRGBATile", "TIFFReadRawStrip", "TIFFReadRawTile", "TIFFReadScanline", "TIFFReadTile", "TIFFSetDirectory", "TIFFSetField", "TIFFSetTagExtender", "TIFFStrileQuery", "TIFFWarning", "TIFFWriteDirectory", "TIFFWriteEncodedStrip", "TIFFWriteEncodedTile", "TIFFWriteRawStrip", "TIFFWriteRawTile", "TIFFWriteScanline", "TIFFWriteTile", "TIFFbuffer", "TIFFcodec", "TIFFcolor", "TIFFmemory", "TIFFquery", "TIFFsize", "TIFFstrip", "TIFFswab", "TIFFtile", "_TIFFRewriteField", "_TIFFauxiliary", "libtiff", "TIFF Test Images", "LibTIFF - TIFF Library and Utilities", "Modifying The TIFF Library", "Using The TIFF Library", "Multi Page / Multi Image TIFF", "Acknowledgments", "Reporting Bugs", "LibTIFF Project", "LibTIFF License", "Mailing List", "Project Steering Committee", "Old release history", "Release history", "Changes in TIFF v3.4beta016", "Changes in TIFF v3.4beta016", "Changes in TIFF v3.4beta018", "Changes in TIFF v3.4beta024", "Changes in TIFF v3.4beta028", "Changes in TIFF v3.4beta029", "Changes in TIFF v3.4beta031", "Changes in TIFF v3.4beta032", "Changes in TIFF v3.4beta033", "Changes in TIFF v3.4beta034", "Changes in TIFF v3.4beta035", "Changes in TIFF v3.4beta036", "Changes in TIFF v3.5.1", "Changes in TIFF v3.5.2", "Changes in TIFF v3.5.3", "Changes in TIFF v3.5.4", "Changes in TIFF v3.5.5", "Changes in TIFF v3.5.6beta", "Changes in TIFF v3.5.7", "Changes in TIFF v3.6.0", "Changes in TIFF v3.6.1", "Changes in TIFF v3.7.0", "Changes in TIFF v3.7.0alpha", "Changes in TIFF v3.7.0beta", "Changes in TIFF v3.7.0beta2", "Changes in TIFF v3.7.1", "Changes in TIFF v3.7.2", "Changes in TIFF v3.7.3", "Changes in TIFF v3.7.4", "Changes in TIFF v3.8.0", "Changes in TIFF v3.8.1", "Changes in TIFF v3.8.2", "Changes in TIFF v3.9.0", "Changes in TIFF v3.9.0beta", "Changes in TIFF v3.9.1", "Changes in TIFF v3.9.2", "Changes in TIFF v3.9.3", "Changes in TIFF v3.9.4", "Changes in TIFF v3.9.5", "Changes in TIFF v4.0.0", "Changes in TIFF v4.0.1", "Changes in TIFF v4.0.10", "Changes in TIFF v4.0.2", "Changes in TIFF v4.0.3", "Changes in TIFF v4.0.4", "Changes in TIFF v4.0.4beta", "Changes in TIFF v4.0.5", "Changes in TIFF v4.0.6", "Changes in TIFF v4.0.7", "Changes in TIFF v4.0.8", "Changes in TIFF v4.0.9", "Changes in TIFF v4.1.0", "Changes in TIFF v4.2.0", "Changes in TIFF v4.3.0", "Changes in TIFF v4.4.0", "Changes in TIFF v4.5.0", "Changes in TIFF v4.5.1", "Changes in TIFF v4.6.0", "Changes in TIFF v4.7.0", "Changes in TIFF v4.7.1", "Request For Comments (RFCs)", "RFC 1: Project Steering Committee Guidelines", "RFC 2: Restoring Needed LibTIFF Tools", "BigTIFF Design", "LibTIFF Coverage of the TIFF 6.0 Specification", "LibTIFF Coverage of the BigTIFF Specification", "TIFF File Format Specification", "DRAFT TIFF Technical Note #2", "Terminology", "TIFF Tools Overview", "fax2ps", "fax2tiff", "pal2rgb", "ppm2tiff", "raw2tiff", "rgb2ycbcr", "thumbnail", "tiff2bw", "tiff2pdf", "tiff2ps", "tiff2rgba", "tiffcmp", "tiffcp", "tiffcrop", "tiffdither", "tiffdump", "tiffgt", "tiffinfo", "tiffmedian", "tiffset", "tiffsplit"], "terms": {"libtiff": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 65, 66, 67, 68, 69, 72, 73, 74, 75, 79, 80, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 142, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166], "ha": [0, 1, 2, 6, 7, 8, 16, 21, 23, 24, 27, 28, 32, 33, 34, 37, 40, 44, 45, 46, 47, 48, 49, 52, 53, 55, 62, 64, 65, 66, 67, 68, 72, 73, 76, 79, 80, 82, 83, 85, 87, 90, 94, 95, 96, 100, 108, 115, 117, 121, 125, 128, 131, 133, 134, 135, 137, 138, 140, 141, 143, 147, 148, 150, 155, 158, 159, 162, 164], "built": [0, 1, 23, 52, 62, 64, 79, 87, 116, 124, 126, 132, 133, 135, 159], "knowledg": 0, "all": [0, 6, 7, 8, 11, 16, 20, 21, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 62, 65, 66, 67, 68, 69, 70, 71, 73, 77, 87, 90, 92, 93, 95, 96, 98, 99, 103, 104, 106, 107, 108, 109, 115, 116, 117, 121, 122, 123, 124, 126, 130, 133, 134, 135, 137, 138, 139, 143, 145, 146, 154, 155, 158, 159, 162, 163, 164], "standard": [0, 1, 25, 62, 94, 122, 123, 129, 140, 143, 145, 146, 147, 149, 154, 155], "well": [0, 1, 23, 52, 66, 68, 79, 90, 93, 95, 112, 115, 117, 132, 137, 143, 144], "extens": [0, 62, 65, 76, 77, 95, 115, 120, 141, 143, 145, 159], "The": [0, 1, 2, 5, 6, 7, 8, 9, 11, 12, 16, 21, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 67, 68, 69, 70, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 133, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "follow": [0, 1, 7, 8, 10, 12, 16, 21, 23, 26, 27, 43, 51, 53, 55, 58, 62, 64, 65, 66, 67, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 133, 134, 140, 143, 144, 147, 154, 155, 158, 159, 161, 162, 165, 166], "describ": [0, 1, 27, 32, 33, 34, 65, 66, 67, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 137, 142, 143, 144, 145, 149, 150, 159, 162], "how": [0, 1, 12, 27, 32, 33, 34, 43, 45, 46, 47, 48, 49, 65, 67, 77, 79, 81, 85, 137, 139, 140, 143, 144, 145, 152, 159], "add": [0, 1, 5, 8, 22, 42, 62, 65, 66, 67, 87, 89, 93, 94, 95, 96, 101, 108, 111, 112, 114, 115, 117, 119, 120, 121, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 139, 143], "specif": [0, 1, 12, 16, 21, 23, 24, 28, 40, 43, 53, 57, 59, 62, 64, 65, 66, 67, 71, 78, 79, 80, 94, 95, 99, 100, 102, 108, 109, 126, 130, 131, 135, 139, 144, 146, 147, 148, 154, 158, 159, 160, 164], "can": [0, 1, 2, 6, 8, 9, 12, 16, 18, 19, 21, 22, 23, 24, 27, 31, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 58, 61, 62, 63, 65, 66, 67, 69, 72, 77, 79, 80, 81, 82, 88, 90, 93, 94, 95, 96, 97, 98, 100, 108, 109, 110, 114, 115, 117, 118, 124, 125, 126, 127, 128, 131, 132, 133, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 154, 155, 158, 159, 160, 162, 164], "us": [0, 1, 2, 8, 11, 12, 15, 16, 21, 22, 23, 25, 27, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 76, 77, 78, 79, 80, 81, 82, 86, 87, 89, 90, 92, 93, 94, 95, 96, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 139, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166], "without": [0, 1, 2, 4, 11, 23, 27, 32, 33, 34, 42, 51, 60, 62, 65, 66, 71, 80, 87, 90, 93, 94, 95, 98, 107, 111, 114, 116, 124, 125, 127, 133, 135, 143, 154, 158, 159, 160, 164], "modifi": [0, 1, 2, 6, 27, 40, 44, 64, 66, 71, 89, 90, 92, 93, 94, 95, 101, 105, 108, 109, 114, 122, 124, 125, 137, 159], "manag": [0, 27, 54, 69, 72, 137, 141, 143, 162], "i": [0, 1, 2, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "primarili": [0, 70, 141], "control": [0, 1, 11, 12, 21, 25, 40, 43, 51, 52, 62, 65, 66, 80, 85, 87, 94, 95, 114, 125, 127, 128, 135, 140, 143, 147, 152, 159], "definit": [0, 1, 8, 9, 16, 22, 62, 65, 66, 80, 85, 90, 93, 94, 95, 98, 101, 102, 105, 106, 108, 112, 115, 117, 120, 121, 122, 124, 128, 131, 132, 133, 134, 140, 143, 144], "valu": [0, 1, 6, 11, 16, 24, 42, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 77, 83, 87, 90, 95, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 111, 112, 114, 115, 118, 120, 121, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 139, 140, 143, 144, 146, 147, 148, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 161, 163, 164, 165, 166], "store": [0, 6, 13, 16, 32, 33, 34, 37, 42, 49, 51, 53, 56, 62, 64, 66, 67, 95, 98, 109, 126, 127, 139, 140, 143, 144, 146, 147, 148, 152, 162], "intern": [0, 5, 8, 9, 16, 23, 24, 40, 62, 65, 66, 94, 95, 99, 124, 126, 132, 134, 140, 143, 156, 159], "structur": [0, 1, 4, 6, 7, 8, 12, 16, 23, 24, 27, 40, 43, 44, 52, 53, 55, 60, 62, 65, 66, 95, 97, 108, 115, 120, 124, 125, 128, 132, 134, 135, 143], "thi": [0, 1, 4, 7, 8, 9, 11, 12, 15, 16, 17, 18, 19, 20, 21, 23, 24, 27, 28, 30, 31, 36, 37, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 55, 56, 57, 58, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 150, 151, 155, 156, 158, 159, 161, 162, 164, 165], "look": [0, 1, 23, 53, 65, 66, 69, 80, 99, 139, 143], "like": [0, 1, 8, 16, 23, 24, 27, 32, 39, 62, 65, 69, 79, 95, 105, 108, 114, 115, 124, 125, 126, 128, 134, 139, 143, 155], "typedef": [0, 12, 23, 24, 27, 43, 53, 62, 66, 79, 96, 125, 129, 135], "struct": [0, 24, 27, 53, 117], "uint32_t": [0, 9, 15, 16, 17, 18, 19, 21, 22, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 42, 45, 46, 47, 48, 49, 50, 53, 55, 57, 58, 59, 61, 62, 65, 66, 130, 131, 132], "field_tag": 0, "field": [0, 7, 8, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 28, 39, 40, 44, 49, 53, 55, 60, 62, 66, 67, 94, 95, 96, 97, 98, 101, 103, 104, 105, 106, 108, 109, 112, 113, 114, 117, 121, 126, 128, 134, 139, 141, 145, 154, 161], "": [0, 1, 16, 17, 19, 21, 23, 27, 28, 33, 34, 39, 40, 44, 45, 46, 47, 48, 49, 51, 52, 54, 62, 65, 66, 76, 78, 79, 80, 87, 88, 89, 90, 92, 93, 94, 96, 108, 112, 114, 115, 117, 121, 124, 126, 129, 131, 137, 139, 140, 141, 143, 145, 146, 147, 148, 150, 154, 155, 158, 159, 161, 162, 163, 164, 165], "short": [0, 28, 62, 79, 94, 102, 104, 114, 117, 124, 126, 127, 143, 144, 150, 161], "field_readcount": [0, 134], "read": [0, 1, 2, 4, 7, 8, 16, 17, 21, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 44, 45, 46, 47, 48, 49, 51, 55, 62, 64, 65, 66, 76, 77, 80, 82, 83, 87, 92, 94, 95, 96, 98, 99, 101, 102, 103, 105, 106, 107, 108, 109, 111, 114, 115, 117, 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 135, 140, 143, 145, 146, 149, 150, 155, 156, 158, 159, 162, 163, 166], "count": [0, 11, 15, 16, 17, 19, 21, 28, 31, 39, 40, 44, 45, 46, 47, 48, 49, 55, 60, 62, 66, 93, 94, 99, 101, 102, 110, 114, 115, 121, 127, 128, 130, 131, 133, 134, 135, 137, 139, 140, 143, 159, 161, 163, 165], "tiff_vari": [0, 17, 19, 109, 121], "tiff_variable2": [0, 15, 17, 19, 94, 101, 121], "tiff_spp": [0, 17, 19], "field_writecount": [0, 134], "write": [0, 1, 2, 4, 8, 11, 12, 20, 23, 26, 27, 28, 40, 43, 44, 45, 46, 47, 48, 49, 50, 51, 54, 55, 62, 64, 66, 80, 92, 93, 94, 95, 100, 101, 102, 105, 106, 108, 109, 111, 112, 115, 117, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 135, 140, 143, 145, 147, 149, 150, 151, 153, 154, 155, 156, 158, 159, 160, 166], "tiffdatatyp": [0, 10, 13, 16, 60, 95, 139], "field_typ": 0, "type": [0, 1, 10, 11, 13, 15, 16, 17, 19, 21, 28, 33, 34, 66, 79, 83, 95, 97, 98, 99, 100, 101, 102, 103, 106, 107, 108, 109, 111, 114, 115, 117, 119, 121, 122, 123, 124, 125, 126, 127, 129, 131, 132, 135, 140, 143, 150, 154, 159, 161, 162], "associ": [0, 2, 6, 7, 21, 23, 27, 32, 33, 34, 40, 52, 62, 64, 65, 66, 95, 106, 109, 126, 135, 140, 144, 152, 155, 158, 159], "data": [0, 1, 5, 6, 7, 8, 10, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 64, 65, 71, 76, 79, 80, 87, 90, 92, 93, 95, 99, 101, 102, 103, 108, 109, 112, 114, 115, 117, 121, 124, 125, 126, 127, 130, 131, 132, 134, 135, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164], "unsign": [0, 27, 40, 58, 62, 65, 79, 92, 108, 114, 115, 123, 124, 125, 126, 131, 132, 139, 144, 150], "field_bit": 0, "bit": [0, 1, 23, 27, 29, 30, 31, 32, 33, 34, 37, 38, 40, 49, 54, 55, 58, 62, 65, 66, 76, 79, 80, 86, 87, 89, 90, 92, 93, 94, 96, 102, 103, 104, 108, 109, 111, 114, 115, 117, 120, 121, 122, 123, 124, 125, 127, 130, 131, 132, 134, 135, 139, 140, 143, 145, 147, 148, 150, 152, 155, 156, 158, 159, 160, 162], "fieldsset": 0, "vector": [0, 80], "char": [0, 5, 12, 14, 16, 21, 23, 24, 27, 40, 43, 44, 52, 54, 55, 58, 61, 65, 66, 67, 101, 102, 103, 123], "field_oktochang": 0, "true": [0, 15, 16, 23, 62, 98, 141, 162], "chang": [0, 1, 2, 8, 11, 23, 24, 39, 40, 44, 49, 55, 64, 74, 75, 136, 137, 138, 139, 147, 151, 159, 161, 165], "while": [0, 1, 23, 27, 28, 32, 39, 40, 44, 66, 67, 68, 70, 94, 112, 117, 118, 140, 143, 144, 147, 150, 158, 159, 160], "field_passcount": [0, 98, 121], "pass": [0, 12, 15, 23, 24, 29, 40, 43, 54, 55, 59, 62, 65, 66, 82, 83, 98, 101, 103, 104, 121, 124, 125, 126, 131, 134, 135, 137, 152, 159], "dir": [0, 1, 131, 155], "set": [0, 1, 7, 8, 11, 23, 24, 40, 42, 44, 45, 46, 47, 48, 49, 51, 52, 54, 55, 57, 59, 62, 65, 66, 67, 79, 80, 81, 89, 92, 93, 94, 95, 98, 99, 101, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 117, 119, 121, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 140, 143, 145, 147, 149, 151, 154, 155, 156, 158, 159, 160, 162, 163, 164, 165, 166], "field_nam": [0, 16, 135], "ascii": [0, 2, 21, 40, 55, 87, 88, 98, 109, 130, 134, 135, 140, 159, 165], "name": [0, 1, 5, 9, 14, 21, 23, 25, 40, 62, 64, 65, 66, 67, 71, 76, 82, 85, 95, 98, 108, 114, 122, 125, 132, 133, 140, 143, 144, 147, 154, 155, 158, 159, 161, 162, 165, 166], "number": [0, 7, 8, 9, 10, 12, 16, 17, 19, 21, 23, 28, 29, 30, 35, 36, 38, 39, 40, 43, 45, 46, 47, 49, 50, 55, 56, 57, 59, 62, 66, 67, 76, 79, 82, 87, 93, 95, 98, 99, 111, 114, 115, 117, 120, 121, 125, 126, 129, 130, 131, 132, 133, 134, 135, 139, 140, 143, 144, 146, 147, 148, 149, 150, 151, 153, 155, 156, 157, 158, 159, 160, 161, 162, 164], "For": [0, 1, 8, 17, 19, 21, 24, 27, 28, 32, 33, 34, 53, 62, 64, 65, 66, 67, 73, 98, 115, 117, 133, 134, 135, 140, 141, 143, 146, 156, 158, 161, 162], "instanc": [0, 1, 69, 89, 95, 109, 115, 126], "277": [0, 140], "samplesperpixel": [0, 21, 23, 27, 28, 32, 33, 34, 40, 49, 57, 59, 62, 99, 112, 121, 124, 125, 135, 140, 143, 157, 162], "gener": [0, 11, 27, 32, 33, 34, 62, 63, 66, 72, 79, 80, 87, 94, 95, 112, 114, 121, 123, 125, 127, 130, 131, 133, 134, 135, 141, 143, 145, 146, 147, 148, 152, 154, 155, 156, 157, 159, 162, 164], "have": [0, 1, 6, 7, 8, 17, 19, 21, 27, 28, 29, 32, 33, 34, 40, 42, 44, 45, 46, 47, 48, 49, 51, 57, 62, 65, 68, 69, 76, 79, 80, 81, 90, 94, 95, 101, 108, 109, 112, 115, 117, 124, 126, 127, 128, 129, 133, 135, 138, 139, 140, 143, 147, 148, 149, 154, 155, 158, 159, 160], "h": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 67, 68, 76, 79, 80, 85, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 114, 115, 121, 122, 124, 125, 126, 129, 131, 132, 133, 134, 135, 140, 143, 146, 150, 151, 152, 154, 155, 159, 161], "each": [0, 1, 12, 21, 23, 27, 28, 37, 40, 43, 45, 47, 52, 53, 55, 58, 62, 66, 67, 80, 82, 106, 117, 129, 135, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 156, 157, 158, 159, 160, 161, 163, 164], "known": [0, 1, 8, 9, 16, 22, 40, 44, 54, 62, 65, 66, 69, 79, 95, 96, 138, 140, 143, 161, 166], "which": [0, 1, 2, 6, 7, 8, 12, 16, 23, 24, 27, 34, 42, 43, 53, 55, 58, 62, 65, 68, 89, 94, 95, 98, 101, 108, 110, 111, 113, 114, 115, 116, 117, 121, 122, 123, 124, 125, 126, 127, 128, 129, 132, 135, 136, 137, 138, 140, 143, 144, 147, 154, 155, 158, 159], "should": [0, 1, 6, 7, 8, 12, 17, 19, 21, 23, 24, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 43, 44, 49, 50, 52, 53, 56, 58, 62, 63, 64, 65, 66, 69, 70, 77, 92, 94, 95, 96, 98, 99, 101, 102, 103, 106, 109, 114, 115, 121, 124, 125, 128, 132, 133, 134, 137, 138, 139, 140, 143, 145, 146, 147, 150, 159], "special": [0, 17, 19, 71, 80, 94, 106, 109, 128, 133, 146, 147, 158, 159], "1": [0, 2, 7, 8, 9, 11, 15, 17, 19, 20, 21, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 62, 64, 65, 66, 67, 68, 73, 74, 75, 84, 89, 92, 94, 95, 97, 98, 102, 103, 105, 107, 108, 109, 111, 115, 117, 118, 119, 120, 121, 124, 125, 126, 128, 129, 130, 131, 133, 134, 136, 138, 140, 143, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166], "indic": [0, 17, 19, 23, 27, 44, 50, 61, 62, 66, 67, 81, 103, 105, 137, 139, 140, 143, 146, 150, 158, 159], "variabl": [0, 1, 6, 17, 19, 21, 27, 40, 42, 65, 66, 76, 95, 99, 101, 106, 113, 121, 124, 126, 128, 131, 133], "mai": [0, 1, 2, 12, 23, 24, 27, 32, 40, 43, 45, 47, 49, 56, 62, 65, 66, 67, 71, 82, 90, 93, 95, 108, 109, 112, 115, 122, 126, 127, 128, 132, 137, 139, 143, 144, 145, 146, 150, 153, 155, 156, 157, 158, 159, 161, 162, 163], "tifftag_spp": 0, "2": [0, 1, 16, 17, 19, 21, 23, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 45, 46, 49, 50, 53, 55, 57, 59, 62, 64, 65, 67, 74, 75, 76, 90, 92, 94, 95, 103, 104, 106, 108, 109, 112, 114, 115, 117, 119, 121, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 142, 147, 149, 151, 155, 158, 159, 160, 162, 164, 165], "one": [0, 1, 2, 5, 7, 8, 12, 21, 23, 27, 28, 33, 34, 37, 40, 43, 49, 53, 54, 55, 60, 62, 65, 66, 67, 76, 90, 91, 92, 93, 94, 95, 97, 99, 100, 101, 103, 108, 109, 115, 121, 124, 126, 130, 132, 139, 143, 144, 145, 146, 147, 150, 151, 152, 154, 155, 156, 158, 159, 162, 166], "sampl": [0, 1, 17, 19, 27, 28, 29, 30, 32, 33, 34, 36, 37, 38, 46, 49, 50, 53, 55, 56, 57, 59, 62, 65, 66, 76, 93, 94, 95, 96, 98, 99, 108, 111, 114, 124, 125, 140, 143, 144, 148, 149, 150, 151, 152, 153, 156, 157, 158, 159, 162], "tifftag_samplesperpixel": [0, 21, 40, 66, 67, 121], "3": [0, 1, 12, 17, 21, 27, 32, 33, 34, 40, 43, 53, 54, 62, 63, 64, 65, 67, 68, 74, 75, 80, 89, 91, 92, 94, 95, 96, 97, 98, 104, 108, 110, 111, 113, 114, 117, 121, 123, 124, 125, 128, 130, 131, 132, 135, 139, 140, 143, 145, 147, 149, 153, 155, 158, 159, 160, 161, 162], "similar": [0, 8, 33, 34, 66, 68, 115, 117], "requir": [0, 1, 2, 15, 16, 20, 27, 28, 32, 33, 34, 39, 53, 55, 57, 59, 62, 65, 66, 73, 79, 82, 87, 94, 95, 96, 99, 108, 109, 112, 115, 117, 118, 121, 123, 124, 126, 128, 129, 130, 131, 132, 134, 135, 141, 146, 147, 148, 154, 155, 158, 159], "tiffgetfield": [0, 3, 15, 16, 17, 40, 62, 64, 66, 67, 83, 95, 114, 121, 125, 126, 130], "must": [0, 1, 8, 11, 17, 19, 21, 23, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, 45, 46, 47, 48, 49, 50, 51, 62, 65, 66, 79, 101, 127, 137, 139, 143, 159], "instead": [0, 23, 39, 42, 44, 55, 62, 66, 82, 83, 91, 92, 94, 95, 96, 97, 99, 100, 101, 102, 103, 104, 106, 107, 108, 112, 114, 115, 121, 124, 125, 126, 127, 132, 135, 139, 143, 146, 155, 156, 158], "uint16_t": [0, 15, 16, 17, 19, 21, 37, 38, 40, 49, 50, 52, 53, 57, 58, 59, 60, 62, 65, 66, 131], "length": [0, 34, 65, 66, 78, 95, 107, 114, 124, 130, 132, 135, 143, 154, 158, 159], "written": [0, 1, 6, 7, 8, 11, 19, 20, 21, 23, 27, 29, 30, 37, 38, 39, 40, 44, 45, 49, 50, 55, 62, 65, 66, 67, 68, 71, 76, 77, 80, 82, 95, 96, 98, 108, 110, 124, 127, 131, 134, 135, 137, 139, 140, 143, 147, 152, 154, 158, 159, 160, 162, 164], "same": [0, 1, 16, 17, 19, 23, 28, 32, 55, 62, 63, 66, 90, 94, 98, 108, 109, 111, 112, 116, 117, 121, 125, 139, 143, 147, 158, 159, 160], "A": [0, 1, 2, 8, 12, 21, 22, 23, 27, 28, 32, 33, 34, 40, 41, 43, 44, 55, 57, 59, 62, 65, 66, 67, 68, 71, 72, 73, 89, 94, 97, 109, 117, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 142, 143, 144, 145, 147, 158, 159, 160, 164], "few": [0, 1, 68, 92, 93, 94, 115, 124, 129, 143, 144], "except": [0, 17, 19, 21, 23, 32, 39, 40, 49, 62, 64, 65, 66, 105, 115, 130, 131, 132, 133, 140, 143, 147, 154, 157, 158], "exist": [0, 2, 7, 8, 23, 27, 39, 42, 55, 60, 65, 66, 68, 76, 90, 95, 104, 105, 108, 121, 127, 128, 135, 138, 143, 158, 165], "haven": 0, "t": [0, 2, 7, 8, 21, 33, 34, 39, 44, 53, 68, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 133, 134, 135, 142, 143, 147, 149, 150, 154, 155, 157, 158, 159, 160], "analys": [0, 67], "why": [0, 91, 108, 150], "thei": [0, 8, 12, 23, 28, 34, 42, 43, 44, 51, 54, 59, 62, 65, 66, 80, 90, 94, 95, 102, 114, 115, 124, 125, 126, 127, 132, 133, 137, 139, 140, 143, 144, 145, 154, 157, 159], "differ": [0, 1, 7, 8, 12, 16, 19, 27, 28, 29, 30, 37, 38, 43, 49, 53, 55, 56, 62, 63, 65, 66, 79, 87, 95, 100, 124, 126, 133, 135, 139, 143, 156, 157, 158, 159], "One": [0, 66, 67, 105, 144], "tiff_byt": [0, 10, 94, 100, 101], "tiff_ascii": [0, 10], "tiff_short": [0, 10, 139], "tiff_long": [0, 10, 139], "tiff_rat": [0, 10, 16], "tiff_sbyt": [0, 10, 94, 101], "tiff_undefin": [0, 10, 98, 100], "tiff_sshort": [0, 10], "tiff_slong": [0, 10], "tiff_srat": [0, 10], "tiff_float": [0, 10], "tiff_doubl": [0, 10, 111], "tiff_ifd": [0, 10, 97, 104, 139], "And": [0, 126, 139], "bigtiff": [0, 23, 55, 62, 64, 97, 100, 115, 124, 126, 127, 135, 142, 158], "tiff_long8": [0, 10, 139], "tiff_slong8": [0, 10, 139], "tiff_ifd8": [0, 10, 139], "ar": [0, 1, 2, 6, 7, 8, 9, 10, 11, 12, 17, 19, 20, 21, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 76, 77, 78, 79, 80, 82, 87, 90, 91, 93, 94, 95, 98, 99, 108, 109, 110, 112, 113, 114, 115, 116, 117, 121, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166], "automat": [0, 1, 20, 23, 27, 28, 29, 30, 36, 37, 38, 44, 46, 49, 62, 65, 66, 67, 78, 115, 117, 126, 140, 143, 159], "revert": [0, 101, 125], "4": [0, 1, 7, 8, 11, 12, 16, 23, 24, 27, 32, 33, 34, 40, 42, 43, 53, 62, 64, 65, 66, 74, 75, 79, 81, 84, 85, 87, 89, 92, 95, 105, 108, 114, 115, 117, 119, 121, 122, 124, 126, 131, 132, 133, 134, 135, 138, 139, 140, 141, 143, 145, 147, 149, 151, 153, 154, 155, 158, 159, 160, 162], "byte": [0, 1, 10, 16, 24, 29, 30, 35, 36, 37, 38, 45, 46, 47, 48, 49, 50, 55, 56, 57, 58, 59, 62, 65, 76, 78, 79, 80, 93, 95, 96, 98, 101, 103, 104, 109, 110, 114, 120, 123, 124, 125, 126, 129, 134, 135, 139, 140, 143, 147, 150, 157, 158, 159, 160, 163], "classictiff": [0, 23, 115, 131, 141], "assign": [0, 117, 124, 135], "distinguish": 0, "them": [0, 9, 27, 44, 62, 109, 112, 115, 129, 132, 140, 141, 143, 145, 159], "e": [0, 1, 8, 12, 27, 28, 43, 44, 52, 55, 56, 57, 58, 61, 62, 65, 66, 67, 79, 80, 96, 105, 109, 114, 115, 116, 131, 133, 138, 139, 140, 143, 145, 154, 155, 158, 159, 160, 161, 162, 163, 164, 166], "g": [0, 1, 8, 28, 52, 53, 55, 62, 65, 66, 67, 80, 105, 114, 116, 131, 133, 138, 139, 140, 143, 145, 153, 154, 155, 158, 159, 160, 164, 166], "field_samplesperpixel": 0, "just": [0, 32, 33, 34, 42, 44, 55, 65, 66, 67, 95, 108, 112, 115, 124, 125, 126, 127, 135, 137, 139, 143, 146, 150, 158, 159], "field_custom": [0, 135], "list": [0, 1, 5, 8, 9, 21, 22, 40, 52, 64, 66, 68, 69, 70, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 132, 133, 137, 141, 154, 157, 158, 159, 160, 162, 164], "ok": [0, 103], "an": [0, 1, 2, 5, 6, 7, 8, 9, 11, 12, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 55, 57, 58, 59, 61, 62, 65, 66, 67, 68, 76, 78, 79, 80, 87, 88, 93, 94, 95, 96, 99, 108, 109, 111, 112, 113, 114, 115, 117, 120, 121, 125, 126, 127, 131, 132, 134, 135, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 151, 152, 153, 155, 156, 157, 158, 159, 161, 162, 164, 165, 166], "imag": [0, 1, 2, 17, 19, 20, 23, 27, 28, 29, 30, 32, 33, 34, 37, 38, 39, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 59, 62, 64, 65, 68, 76, 77, 78, 79, 80, 81, 83, 87, 88, 90, 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 114, 117, 118, 119, 121, 124, 125, 126, 130, 131, 132, 133, 134, 135, 140, 141, 144, 145, 146, 147, 148, 149, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165], "being": [0, 8, 21, 23, 27, 44, 49, 50, 55, 62, 81, 91, 92, 94, 95, 109, 110, 112, 113, 115, 121, 123, 124, 127, 128, 134, 135, 139, 140, 159, 162], "fals": [0, 15, 23, 24, 98, 121, 124, 126, 131, 134], "stuff": [0, 1, 68, 93, 98, 104, 106, 109], "onc": [0, 1, 23, 40, 49, 65, 66, 143, 146, 156, 162], "left": [0, 23, 27, 32, 33, 34, 66, 80, 95, 114, 143, 147, 155, 159, 162], "unchang": [0, 90, 143], "imagewidth": [0, 33, 45, 46, 47, 48, 49, 57, 59, 62, 66, 100, 121, 140, 143, 157, 161], "photometricinterpret": [0, 27, 32, 33, 34, 98, 103, 140, 143, 149, 162], "If": [0, 1, 5, 6, 8, 9, 12, 21, 23, 27, 28, 29, 32, 40, 43, 49, 51, 52, 55, 57, 59, 65, 66, 68, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 137, 139, 140, 143, 146, 147, 148, 149, 150, 151, 154, 155, 158, 159, 166], "tiffsetfield": [0, 3, 8, 11, 15, 16, 19, 21, 23, 45, 46, 47, 48, 49, 62, 64, 66, 67, 94, 95, 106, 121], "otherwis": [0, 1, 8, 11, 12, 15, 20, 21, 23, 27, 28, 31, 32, 33, 34, 37, 38, 39, 40, 44, 45, 46, 47, 48, 50, 51, 52, 55, 59, 62, 65, 66, 71, 108, 112, 121, 124, 126, 135, 139, 143, 148, 149, 154, 159, 162], "non": [0, 1, 2, 12, 27, 32, 37, 39, 43, 49, 51, 55, 57, 59, 62, 65, 79, 89, 91, 94, 95, 98, 105, 106, 108, 109, 112, 115, 124, 125, 126, 129, 130, 134, 135, 140, 143, 145, 155, 158, 159, 162], "unless": [0, 23, 66, 117, 122, 143, 145, 154], "implicit": [0, 79, 143], "colormap": [0, 25, 27, 32, 33, 34, 62, 66, 87, 89, 121, 124, 125, 130, 140, 145, 148, 155, 157, 162, 163, 164], "normal": [0, 8, 12, 15, 20, 23, 43, 50, 55, 62, 65, 66, 95, 98, 114, 137, 143], "mix": [0, 8, 109], "case": [0, 8, 11, 16, 19, 23, 31, 37, 44, 49, 55, 56, 61, 66, 67, 89, 94, 95, 96, 98, 101, 102, 103, 104, 105, 106, 109, 112, 113, 114, 116, 117, 121, 123, 124, 125, 126, 128, 129, 131, 134, 135, 137, 140, 143, 147, 150, 157, 158, 159], "studli": 0, "cap": [0, 128], "stripbytecount": [0, 11, 28, 31, 42, 49, 60, 62, 87, 103, 105, 108, 124, 125, 126, 127, 139, 140], "rel": [0, 8, 82, 94, 96, 130, 132, 146, 159], "within": [0, 4, 8, 9, 10, 12, 16, 23, 27, 43, 58, 59, 62, 66, 67, 95, 124, 132, 133, 137, 141, 143, 144, 145, 159], "tif_dirinfo": [0, 1, 8, 94, 95, 96, 97, 99, 100, 101, 103, 104, 105, 106, 108, 109, 114, 121, 124, 126, 131, 132, 134], "c": [0, 1, 2, 8, 14, 21, 23, 25, 27, 37, 49, 54, 62, 65, 66, 67, 68, 78, 79, 80, 82, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, 160, 161, 162, 163, 164], "file": [0, 2, 6, 7, 8, 10, 11, 12, 16, 18, 20, 21, 23, 25, 26, 27, 28, 29, 30, 33, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 55, 62, 64, 65, 67, 69, 72, 76, 78, 79, 80, 82, 85, 87, 89, 90, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 103, 105, 106, 108, 109, 110, 112, 114, 115, 117, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "tifffield": [0, 13, 14, 15, 16, 17, 18, 19, 115, 119, 121, 133, 134, 135], "addit": [0, 1, 8, 23, 41, 42, 62, 65, 66, 67, 79, 95, 99, 114, 115, 121, 125, 127, 131, 137, 140, 143, 145, 159, 162, 163], "paramet": [0, 1, 7, 12, 16, 21, 23, 25, 27, 29, 32, 33, 34, 37, 38, 39, 40, 43, 49, 50, 53, 57, 58, 59, 62, 65, 66, 67, 76, 79, 80, 81, 82, 85, 87, 105, 115, 121, 124, 129, 132, 133, 135, 143, 150, 162], "var_arg": 0, "interfac": [0, 1, 2, 21, 23, 27, 37, 40, 52, 53, 54, 55, 62, 66, 72, 85, 86, 94, 95, 96, 101, 102, 106, 115, 124, 141], "variou": [0, 2, 18, 33, 34, 62, 64, 66, 79, 80, 83, 90, 94, 108, 112, 113, 114, 117, 119, 121, 124, 125, 133, 139, 140, 143, 146, 154, 158, 159], "function": [0, 1, 6, 7, 8, 11, 12, 15, 16, 21, 23, 24, 27, 31, 33, 34, 39, 40, 41, 42, 43, 44, 52, 55, 57, 58, 61, 64, 65, 66, 76, 80, 92, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 114, 115, 117, 118, 119, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 145, 156, 157, 159], "get": [0, 1, 8, 27, 44, 52, 55, 58, 62, 66, 67, 90, 93, 95, 98, 100, 105, 108, 114, 115, 118, 119, 121, 132, 137, 138, 145, 154, 158, 159, 160], "includ": [0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 76, 78, 79, 82, 87, 93, 94, 95, 101, 105, 109, 114, 121, 123, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 140, 141, 143, 145, 147, 154, 156, 158, 159], "_tifffindfieldinfo": [0, 109], "_tifffindfieldinfobynam": [0, 103, 109], "see": [0, 1, 65, 66, 69, 70, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 140, 141, 143], "detail": [0, 1, 25, 27, 33, 34, 62, 65, 66, 69, 70, 77, 95, 98, 99, 101, 103, 115, 125, 128, 129, 130, 131, 132, 133, 134, 135, 142, 143, 145, 159], "In": [0, 1, 20, 23, 25, 27, 37, 42, 44, 49, 53, 55, 57, 62, 65, 66, 67, 108, 117, 121, 124, 127, 129, 130, 137, 139, 140, 143, 144, 159, 162, 163], "6": [0, 7, 8, 21, 23, 24, 40, 53, 62, 64, 65, 66, 67, 74, 75, 78, 79, 81, 85, 94, 98, 108, 112, 117, 124, 131, 132, 134, 138, 139, 142, 144, 147, 149, 155, 157, 158, 159, 160, 161, 162, 163], "0": [0, 1, 7, 8, 10, 11, 12, 15, 16, 20, 21, 23, 24, 25, 27, 28, 31, 32, 33, 34, 37, 39, 40, 42, 43, 44, 49, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 74, 75, 79, 82, 87, 94, 96, 98, 101, 103, 106, 109, 110, 132, 135, 137, 138, 139, 141, 142, 144, 147, 150, 154, 155, 156, 157, 158, 159, 161, 162, 163, 165, 166], "mechan": [0, 23, 27, 65, 66, 67, 95, 143], "wa": [0, 6, 8, 11, 21, 23, 24, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 51, 52, 55, 61, 62, 64, 66, 68, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 133, 135, 138, 139, 140, 141, 143, 147, 159], "introduc": [0, 11, 12, 24, 42, 43, 66, 92, 95, 96, 121, 122, 124, 126, 135], "allow": [0, 23, 24, 66, 68, 95, 98, 101, 107, 111, 113, 114, 115, 116, 122, 126, 128, 130, 131, 134, 139, 141, 143, 154, 155, 159], "unrecognis": 0, "when": [0, 1, 8, 10, 11, 12, 15, 16, 23, 24, 28, 30, 31, 33, 36, 42, 43, 44, 46, 49, 51, 56, 62, 65, 66, 67, 69, 70, 76, 78, 79, 80, 81, 82, 85, 87, 89, 91, 92, 93, 94, 95, 96, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 112, 114, 115, 117, 119, 121, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 138, 140, 143, 146, 147, 149, 150, 151, 153, 155, 156, 157, 158, 159, 161, 162, 163, 166], "unknown": [0, 10, 16, 21, 24, 28, 55, 62, 66, 80, 135, 143, 163], "encount": [0, 1, 8, 20, 24, 27, 28, 29, 30, 32, 33, 34, 35, 36, 39, 44, 45, 46, 65, 66, 87, 92, 95, 141, 147, 157], "deriv": [0, 68, 126, 159, 164], "from": [0, 1, 2, 5, 7, 8, 12, 16, 17, 21, 23, 28, 31, 34, 37, 40, 43, 44, 45, 46, 49, 51, 53, 55, 56, 62, 65, 66, 67, 68, 69, 71, 72, 73, 76, 78, 79, 80, 81, 82, 83, 84, 87, 88, 89, 90, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 114, 115, 117, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 145, 146, 147, 149, 150, 154, 156, 158, 159, 160, 161, 162, 164, 166], "onli": [0, 1, 8, 11, 21, 23, 27, 28, 33, 34, 37, 38, 39, 41, 42, 44, 49, 50, 51, 57, 59, 60, 62, 65, 66, 67, 72, 79, 80, 81, 82, 87, 90, 93, 96, 105, 108, 112, 117, 121, 122, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 137, 139, 140, 143, 146, 147, 148, 154, 155, 158, 159, 160, 162, 165, 166], "need": [0, 1, 6, 8, 20, 23, 27, 28, 31, 32, 33, 34, 42, 44, 51, 52, 55, 64, 65, 66, 67, 68, 77, 79, 85, 93, 94, 95, 97, 98, 99, 100, 103, 108, 109, 114, 115, 121, 123, 124, 125, 126, 127, 128, 130, 134, 136, 137, 143, 147], "predefin": [0, 8, 140, 143], "abl": [0, 1, 21, 39, 65, 66, 67, 95, 101, 109, 117, 128, 132, 133, 143], "particular": [0, 1, 11, 27, 42, 53, 62, 65, 66, 71, 94, 108, 115, 121, 127, 132, 140, 143, 147, 161], "call": [0, 6, 7, 8, 11, 12, 20, 23, 24, 27, 28, 37, 38, 43, 44, 45, 47, 50, 53, 54, 55, 56, 57, 59, 61, 62, 65, 66, 67, 79, 83, 96, 99, 101, 102, 103, 105, 106, 108, 115, 120, 121, 124, 125, 130, 131, 132, 134, 135, 139, 144], "convent": [0, 65, 66, 83, 143, 159], "desir": [0, 12, 43, 57, 66, 119, 143], "autodefin": 0, "alwai": [0, 1, 8, 15, 37, 38, 39, 50, 57, 59, 65, 66, 67, 80, 87, 94, 95, 101, 102, 107, 112, 115, 116, 117, 139, 143, 146, 156, 158], "d": [0, 21, 23, 27, 28, 32, 33, 34, 40, 42, 47, 48, 49, 66, 68, 69, 95, 113, 115, 127, 147, 150, 154, 155, 159, 162, 163, 165], "where": [0, 1, 7, 11, 12, 21, 27, 32, 33, 34, 44, 49, 53, 61, 62, 65, 66, 67, 78, 79, 81, 87, 94, 109, 113, 114, 116, 117, 119, 121, 124, 126, 127, 128, 130, 133, 134, 135, 139, 150, 154, 155, 159, 163], "thu": [0, 12, 39, 43, 53, 56, 67, 114, 124, 125, 126, 143, 158, 159], "anonym": [0, 16, 95, 96, 98, 165], "regist": [0, 16, 41, 52, 62, 65, 66, 77, 80, 81, 95, 117, 140], "void": [0, 5, 6, 8, 12, 21, 23, 24, 25, 27, 29, 30, 31, 35, 36, 37, 38, 40, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 62, 66, 67, 115], "pointer": [0, 5, 6, 8, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 26, 40, 42, 44, 51, 53, 62, 66, 67, 95, 98, 103, 108, 111, 115, 117, 121, 124, 125, 126, 130, 132, 135, 139, 143, 144], "expect": [0, 15, 28, 40, 45, 46, 49, 56, 57, 59, 66, 110, 112, 114, 124, 126, 128, 140, 143, 147], "tif": [0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 16, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 65, 66, 67, 92, 95, 108, 117, 121, 124, 134, 139, 140, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 158, 159, 160, 162, 163, 164, 165, 166], "tifftag_unknown_to_libtiff": 0, "reason": [0, 57, 59, 62, 65, 66, 95, 115, 125, 126, 127, 137, 143, 156], "common": [0, 1, 27, 66, 77, 103, 115, 126, 143], "want": [0, 1, 6, 8, 21, 28, 31, 42, 55, 58, 66, 76, 96, 98, 101, 112, 115, 127, 143], "own": [0, 66, 89, 117, 143, 145], "inform": [0, 1, 7, 8, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 27, 29, 30, 32, 33, 34, 39, 40, 44, 45, 46, 47, 48, 49, 55, 62, 65, 66, 67, 68, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 132, 133, 140, 141, 143, 144, 145, 146, 154, 161, 162, 163], "outsid": [0, 62, 117, 121, 124, 125, 143], "core": [0, 27, 65, 66, 80, 95, 113, 119, 143], "done": [0, 1, 8, 20, 23, 28, 29, 30, 37, 38, 55, 62, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 131, 135, 138, 141, 143, 162], "tiffmergefieldinfo": [0, 3, 41, 62, 64, 115, 135], "more": [0, 2, 8, 11, 12, 16, 28, 32, 33, 34, 43, 49, 62, 65, 66, 67, 68, 76, 82, 87, 90, 91, 94, 95, 98, 102, 103, 105, 108, 109, 114, 115, 121, 124, 126, 130, 131, 134, 135, 139, 140, 141, 143, 144, 145, 146, 147, 149, 150, 151, 158, 159, 160, 162, 164, 166], "libgeotiff": [0, 95], "librari": [0, 2, 5, 12, 20, 21, 23, 27, 28, 29, 30, 37, 38, 40, 43, 45, 46, 49, 51, 55, 58, 62, 63, 68, 138, 140, 145, 146, 147, 157, 162], "provid": [0, 1, 4, 5, 12, 16, 21, 27, 31, 33, 34, 40, 42, 43, 51, 52, 54, 62, 64, 65, 66, 67, 70, 71, 82, 87, 94, 95, 115, 117, 122, 124, 125, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 139, 143, 145, 159], "geospati": [0, 141], "first": [0, 1, 7, 8, 11, 12, 23, 28, 33, 39, 42, 43, 44, 45, 46, 47, 48, 49, 53, 58, 61, 62, 65, 66, 67, 69, 89, 95, 99, 101, 103, 104, 115, 117, 121, 126, 127, 132, 134, 135, 137, 139, 143, 155, 158, 159, 161, 162], "arrai": [0, 11, 21, 22, 23, 27, 31, 32, 33, 34, 40, 42, 45, 46, 47, 48, 49, 52, 53, 57, 58, 62, 65, 66, 67, 87, 92, 95, 96, 99, 101, 102, 103, 104, 105, 106, 108, 109, 111, 112, 114, 117, 124, 125, 126, 127, 134], "prepar": [0, 62, 113, 147], "static": [0, 24, 27, 66, 76, 77, 87, 94, 99, 106, 108, 114, 121, 123, 124, 126, 129, 130, 131, 135], "const": [0, 1, 5, 8, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 43, 44, 52, 53, 54, 55, 58, 61, 65, 67, 79, 87], "xtifffieldinfo": 0, "xxx": 0, "insert": [0, 8, 129, 143], "your": [0, 1, 8, 64, 65, 69, 72, 115, 150], "here": [0, 8, 24, 27, 66, 67, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 139, 143], "tifftag_geopixelscal": 0, "geopixelscal": 0, "tifftag_geotransmatrix": 0, "geotransformationmatrix": 0, "tifftag_geotiepoint": 0, "geotiepoint": 0, "tifftag_geokeydirectori": 0, "geokeydirectori": 0, "tifftag_geodoubleparam": 0, "geodoubleparam": 0, "tifftag_geoasciiparam": 0, "geoasciiparam": 0, "order": [0, 8, 28, 29, 30, 37, 38, 45, 46, 49, 55, 58, 62, 65, 76, 79, 80, 94, 96, 97, 98, 101, 108, 111, 112, 113, 114, 121, 122, 124, 128, 139, 140, 141, 143, 144, 147, 150, 158, 159, 160, 162, 166], "we": [0, 23, 44, 53, 62, 66, 89, 90, 93, 94, 95, 98, 103, 107, 108, 109, 112, 114, 115, 117, 121, 124, 126, 128, 134, 137, 139, 143, 155], "handl": [0, 1, 6, 8, 9, 12, 23, 24, 27, 28, 32, 33, 34, 43, 53, 62, 64, 65, 76, 79, 80, 82, 83, 85, 87, 88, 89, 90, 94, 95, 96, 97, 98, 101, 103, 104, 105, 106, 108, 109, 111, 113, 114, 118, 119, 120, 121, 125, 126, 130, 131, 132, 134, 135, 137, 140, 143, 144, 148, 155, 159, 162], "n": [0, 9, 21, 22, 54, 58, 62, 66, 67, 94, 114, 143, 154, 156, 159], "sizeof": [0, 53, 66, 67, 121], "instal": [0, 12, 27, 43, 78, 80, 82, 86, 91, 93, 95, 121, 122, 126, 132, 134], "extend": [0, 9, 12, 27, 41, 43, 62, 66, 79, 95, 115, 121, 131, 141, 143, 145], "info": [0, 22, 25, 65, 90, 93, 100, 133, 140], "open": [0, 1, 6, 7, 8, 12, 21, 23, 24, 26, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 55, 62, 66, 80, 89, 90, 93, 94, 95, 97, 100, 103, 109, 114, 115, 117, 127, 131, 135, 141, 154, 162], "befor": [0, 6, 7, 8, 11, 12, 15, 27, 43, 44, 45, 46, 47, 48, 49, 54, 62, 65, 66, 89, 93, 94, 95, 98, 103, 105, 109, 113, 114, 120, 121, 123, 125, 126, 134, 135, 137, 143, 158, 159, 160, 164], "yet": [0, 55, 96, 121, 131, 134, 141], "valid": [0, 11, 44, 45, 47, 48, 55, 57, 59, 62, 66, 95, 108, 111, 113, 117, 120, 124, 125, 126, 133, 134, 139, 143], "merg": [0, 41, 62, 92, 95, 99, 108, 112, 135, 138, 159], "against": [0, 59, 77, 87, 95, 114, 115, 118, 121, 126, 128, 129, 133, 143], "appropri": [0, 1, 34, 51, 65, 66, 79, 96, 98, 101, 103, 106, 108, 120, 125, 130, 140, 143, 150], "part": [0, 7, 8, 27, 32, 42, 62, 63, 64, 65, 68, 82, 89, 90, 95, 100, 105, 113, 115, 124, 127, 133, 134, 140, 143, 159], "setup": [0, 1, 7, 8, 12, 27, 43, 44, 51, 52, 57, 62, 65, 67, 79, 81, 82, 109, 134], "process": [0, 1, 27, 32, 45, 46, 49, 66, 77, 94, 95, 96, 105, 106, 108, 114, 117, 119, 121, 135, 136, 141, 143, 144, 150, 156, 158, 159, 162], "necessari": [0, 1, 8, 28, 45, 46, 49, 65, 66, 94, 108, 110, 115, 122, 125, 143, 156, 158], "our": [0, 114, 115], "callback": [0, 12, 41, 43, 62, 121, 131], "tiffsettagextend": [0, 3, 22, 62, 64, 132], "also": [0, 1, 63, 66, 68, 69, 77, 91, 94, 95, 96, 101, 104, 109, 110, 112, 113, 115, 117, 120, 121, 124, 126, 127, 134, 140, 141, 143, 144], "keep": [0, 1, 27, 94, 137, 139, 143], "track": [0, 65, 69, 99, 137, 140], "previou": [0, 12, 23, 43, 44, 49, 62, 67, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 143, 162], "ani": [0, 1, 2, 6, 12, 20, 23, 24, 27, 32, 43, 44, 45, 46, 49, 51, 52, 54, 57, 59, 62, 65, 66, 68, 71, 87, 95, 98, 108, 114, 115, 121, 122, 126, 128, 131, 137, 140, 141, 143, 155, 156, 157, 158, 159, 162, 163], "so": [0, 1, 6, 9, 15, 21, 28, 37, 40, 44, 62, 65, 66, 76, 77, 79, 87, 89, 91, 92, 93, 94, 95, 96, 102, 103, 106, 108, 109, 110, 112, 115, 117, 121, 124, 125, 126, 127, 131, 143, 149, 150, 151, 153, 155, 156, 158, 159, 160], "chain": [0, 7, 8, 39, 62, 65, 117, 121, 144], "custom": [0, 7, 8, 9, 12, 16, 24, 27, 40, 41, 43, 55, 62, 66, 98, 99, 101, 103, 104, 105, 112, 113, 126, 132, 135, 141, 159], "take": [0, 21, 29, 30, 35, 36, 40, 45, 46, 66, 73, 92, 107, 109, 115, 120, 131, 135, 137, 139, 150, 153, 155, 166], "effect": [0, 8, 11, 66, 121, 125, 126, 127, 137, 141, 143, 147, 155, 156, 158, 159], "tiffextendproc": [0, 41], "_parentextend": 0, "null": [0, 5, 12, 16, 23, 24, 40, 43, 51, 52, 53, 66, 87, 95, 98, 103, 104, 108, 109, 114, 116, 117, 120, 121, 124, 125, 126, 130, 132, 134, 135], "_xtiffiniti": 0, "int": [0, 7, 8, 9, 10, 11, 12, 15, 16, 17, 19, 20, 21, 22, 23, 24, 27, 28, 31, 32, 33, 34, 37, 39, 40, 42, 43, 44, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 65, 66, 67, 103, 114, 121, 122, 125, 126, 139, 142], "first_tim": 0, "return": [0, 1, 5, 6, 9, 16, 24, 26, 42, 51, 52, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 95, 98, 100, 101, 103, 105, 106, 108, 111, 112, 113, 114, 115, 120, 121, 124, 125, 126, 130, 131, 132, 133, 134, 135, 147], "been": [0, 6, 7, 8, 16, 21, 24, 27, 32, 40, 42, 45, 46, 47, 48, 49, 55, 62, 64, 65, 66, 67, 68, 69, 72, 73, 76, 79, 80, 81, 82, 87, 90, 94, 100, 108, 109, 115, 121, 124, 125, 126, 127, 128, 131, 133, 134, 135, 138, 140, 141, 143], "grab": 0, "inherit": 0, "method": [0, 5, 26, 27, 52, 62, 66, 106, 107, 109, 117, 125, 129, 143, 150], "_xtiffdefaultdirectori": 0, "It": [0, 1, 8, 27, 33, 34, 44, 49, 56, 58, 66, 68, 79, 88, 93, 94, 95, 109, 114, 115, 117, 125, 127, 128, 134, 137, 138, 143, 145, 155, 159], "next": [0, 1, 28, 39, 44, 62, 65, 67, 70, 115, 121, 132, 139, 140, 143, 144, 155, 162], "sinc": [0, 68, 89, 94, 95, 108, 112, 114, 115, 117, 121, 125, 126, 128, 141, 143, 157, 159], "xtiff": [0, 77, 109, 121], "client": [0, 23, 51, 62, 65, 76, 98, 125, 126], "modul": [0, 12, 24, 43, 44, 62, 66, 68, 77, 92, 94, 96, 101, 104, 109, 135], "overridden": [0, 52, 126, 149, 150], "directori": [0, 1, 2, 6, 7, 8, 11, 20, 21, 23, 25, 27, 28, 32, 39, 40, 41, 44, 49, 55, 60, 62, 63, 64, 65, 67, 76, 79, 85, 87, 92, 94, 95, 101, 102, 103, 104, 105, 108, 109, 112, 114, 115, 117, 121, 124, 130, 132, 133, 134, 135, 140, 144, 145, 151, 155, 157, 158, 159, 161, 162, 163, 165, 166], "now": [0, 1, 53, 66, 67, 68, 76, 77, 78, 79, 80, 81, 82, 83, 85, 87, 90, 94, 95, 96, 97, 98, 100, 104, 108, 109, 110, 111, 113, 115, 117, 121, 122, 123, 124, 125, 127, 128, 129, 131, 132, 138, 139, 141, 159], "up": [0, 1, 7, 8, 28, 29, 30, 37, 42, 44, 51, 55, 59, 62, 66, 67, 79, 89, 90, 93, 95, 104, 108, 115, 124, 126, 127, 128, 135, 137, 139, 143, 159], "rest": 0, "its": [0, 8, 11, 12, 16, 23, 39, 40, 43, 44, 53, 55, 62, 66, 67, 68, 71, 115, 122, 125, 126, 129, 131, 135, 139, 143, 144, 154, 158], "abov": [0, 1, 11, 21, 27, 54, 55, 62, 66, 71, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 140, 145, 155, 158, 159], "approach": [0, 95, 121, 137, 143, 150], "ensur": [0, 23, 65, 93, 94, 95, 103, 112, 134, 143], "howev": [0, 7, 8, 12, 16, 23, 24, 27, 28, 43, 66, 95, 140, 143, 145, 146, 159], "alreadi": [0, 40, 44, 52, 55, 60, 62, 66, 67, 69, 108, 109, 114, 115, 121, 122, 135, 154], "usual": [0, 2, 28, 44, 53, 55, 65, 66, 143, 144, 161, 163], "critic": [0, 1, 15], "pre": [0, 8, 66, 69, 89, 95, 103, 140], "you": [0, 1, 6, 8, 21, 29, 32, 42, 44, 58, 65, 67, 68, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 140, 145, 147, 150, 154, 155, 158, 159], "whole": [0, 23, 29, 33, 34, 42, 109, 117, 125, 126, 127, 131, 156], "architectur": [0, 1, 54, 66, 94, 109, 126, 159], "avoid": [0, 31, 76, 87, 89, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 104, 106, 108, 109, 112, 113, 114, 117, 119, 121, 122, 123, 124, 125, 126, 127, 130, 131, 132, 133, 134, 135, 143, 162], "taken": [0, 57, 82, 133, 143, 146, 160], "_tifffield": 0, "member": [0, 13, 72, 73, 95, 124, 125, 137, 138, 139], "sort": [0, 28, 66, 68, 79, 109, 139, 140, 141], "tifffieldarrai": [0, 8], "ifd": [0, 8, 11, 39, 44, 55, 62, 65, 66, 95, 96, 103, 109, 115, 117, 127, 130, 131, 132, 134, 135, 143, 144, 155, 159, 161], "initi": [0, 27, 52, 53, 62, 65, 76, 94, 97, 99, 105, 114, 120, 124, 125, 134, 137, 138, 155, 158, 163], "field_anonym": 0, "tiffsetgetfieldtyp": 0, "set_field_typ": [0, 134], "get_field_typ": [0, 134, 135], "field_subfield": 0, "point": [0, 8, 27, 39, 44, 53, 62, 65, 83, 94, 95, 102, 103, 108, 109, 123, 124, 125, 126, 130, 131, 138, 139, 143, 144, 150, 158, 159], "child": [0, 67], "tifffieldisanonym": [0, 16, 62], "enummer": 0, "identifi": [0, 12, 21, 40, 43, 52, 65, 66, 79, 95, 135, 139, 159], "give": [0, 4, 62, 68, 117, 135, 139, 141, 143], "hint": [0, 135], "vararg": [0, 62], "exampl": [0, 1, 8, 21, 23, 27, 28, 31, 41, 53, 65, 66, 67, 95, 96, 115, 117, 124, 127, 132, 139, 140, 141, 143, 145, 161], "tiff_setget_uint64": 0, "singl": [0, 1, 21, 23, 24, 28, 33, 34, 40, 44, 58, 62, 65, 66, 83, 98, 104, 105, 108, 115, 123, 126, 130, 131, 137, 138, 143, 145, 147, 154, 155, 158, 159, 160, 166], "uint64_t": [0, 21, 39, 40, 42, 55, 56, 57, 58, 59, 61, 62, 65], "respect": [0, 8, 15, 16, 21, 54, 55, 58, 66, 79, 143, 146, 158, 159], "To": [0, 1, 23, 27, 29, 30, 35, 36, 40, 53, 65, 66, 125, 126, 129, 139, 143, 153, 155, 158, 159], "three": [0, 16, 21, 40, 53, 58, 65, 80, 139, 156, 159], "string": [0, 1, 12, 14, 21, 40, 43, 55, 61, 62, 66, 85, 87, 101, 103, 104, 108, 114, 124, 130, 132, 135, 155, 159, 165], "tiff_setget_c0_uint64": 0, "_c0_": 0, "fix": [0, 62, 65, 68, 69, 76, 78, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 117, 118, 119, 120, 121, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 138, 143, 159], "constant": [0, 14, 18, 27, 32, 33, 34, 62, 103, 115, 123, 124, 135], "given": [0, 6, 8, 10, 12, 16, 22, 23, 24, 43, 62, 65, 66, 81, 95, 98, 121, 134, 140, 143, 147, 155, 158, 159, 160, 166], "_c16_": 0, "_c32_": 0, "But": [0, 115, 125, 126, 143, 150], "current": [0, 6, 8, 10, 11, 16, 20, 21, 23, 25, 28, 39, 40, 44, 45, 47, 48, 49, 55, 57, 60, 62, 65, 66, 67, 68, 69, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 141, 146, 154, 156, 159, 162, 165], "nevertheless": 0, "copi": [0, 23, 27, 51, 54, 62, 67, 69, 71, 89, 93, 95, 98, 103, 104, 105, 120, 121, 126, 128, 134, 142, 143, 145, 152, 158, 159, 166], "tiff_setget_undefin": [0, 131], "two": [0, 1, 2, 8, 12, 27, 43, 53, 62, 63, 65, 66, 67, 79, 80, 94, 96, 103, 110, 119, 121, 133, 135, 143, 145, 150, 155, 157, 158, 159], "entri": [0, 5, 9, 11, 21, 27, 28, 32, 33, 34, 40, 62, 65, 87, 94, 95, 106, 109, 117, 121, 127, 139, 143, 148, 162, 164], "top": [0, 1, 21, 23, 32, 33, 34, 40, 66, 126, 147, 155, 159, 162], "tiffdirectori": [0, 95, 97, 132], "field_": [0, 80, 95], "tif_dir": [0, 1, 8, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 104, 105, 106, 107, 108, 109, 114, 115, 116, 121, 124, 125, 126, 134], "updat": [0, 23, 27, 42, 44, 55, 60, 62, 65, 67, 76, 77, 78, 79, 80, 83, 84, 89, 92, 93, 94, 95, 96, 98, 99, 106, 108, 111, 112, 115, 117, 119, 121, 122, 124, 125, 126, 127, 129, 131, 132, 133, 134, 135, 140, 143, 159], "field_codec": 0, "reflect": [0, 23, 49, 55, 59, 79, 80, 91, 92, 93, 95, 115, 135, 143, 146, 147], "_tiffvsetfield": [0, 103, 114, 125, 135], "_tiffvgetfield": [0, 117, 126], "option": [0, 62, 65, 66, 76, 80, 81, 82, 85, 87, 93, 94, 95, 98, 101, 102, 103, 105, 106, 107, 112, 113, 114, 115, 116, 120, 121, 126, 128, 129, 131, 133, 134, 135, 140, 143], "scalar": 0, "transferfunct": [0, 97, 121, 124, 125, 133, 140], "code": [0, 1, 2, 4, 8, 21, 24, 53, 62, 64, 65, 66, 67, 68, 76, 77, 80, 81, 87, 90, 93, 95, 96, 99, 100, 101, 103, 104, 105, 106, 108, 109, 115, 117, 119, 120, 121, 124, 125, 126, 129, 131, 132, 133, 135, 137, 139, 143, 147, 155, 158, 159, 160], "tiffreaddirectori": [0, 3, 8, 21, 25, 39, 40, 44, 55, 62, 64, 66, 67, 101, 107, 109, 121, 126, 130, 134], "tiffwritedirectori": [0, 3, 7, 8, 11, 21, 28, 39, 40, 55, 62, 64, 66, 67, 92, 94, 95, 134, 135], "re": [0, 12, 23, 24, 43, 44, 62, 67, 104, 113, 117, 126, 131, 134, 135, 139], "best": [0, 2, 27, 66, 115, 143, 155, 158, 159, 162], "off": [0, 1, 34, 44, 92, 94, 132, 133, 134, 143, 155, 157, 159], "find": [0, 1, 21, 37, 38, 50, 62, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 143], "crib": 0, "support": [0, 2, 8, 10, 16, 21, 23, 32, 37, 49, 52, 53, 60, 63, 64, 65, 67, 68, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 111, 112, 113, 114, 115, 117, 118, 119, 121, 122, 123, 124, 126, 128, 129, 130, 131, 132, 133, 134, 135, 137, 140, 141, 142, 143, 144, 145, 146, 154, 155, 156, 158, 159, 165], "tiffprintdirectori": [0, 3, 62, 64, 66, 78, 82, 87, 108, 117, 121], "tif_print": [0, 1, 95, 98, 103, 104, 105, 106, 108, 114, 118, 124, 125], "print": [0, 1, 12, 25, 43, 53, 61, 62, 66, 80, 82, 87, 94, 95, 98, 103, 104, 105, 108, 112, 118, 130, 146, 147, 155, 161, 163], "maintain": [0, 65, 69, 70, 87, 89, 109, 141, 143], "portabl": [0, 23, 54, 62, 64, 66, 78, 79, 84, 86, 96, 99, 114, 154], "bewar": [0, 66], "make": [0, 19, 27, 28, 42, 44, 56, 62, 65, 66, 78, 79, 83, 90, 94, 95, 101, 102, 103, 104, 105, 108, 109, 115, 117, 119, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 137, 140, 141, 143, 144, 145, 159, 160], "assumpt": [0, 79, 116, 132, 147], "about": [0, 7, 8, 16, 23, 39, 55, 65, 66, 69, 76, 78, 79, 80, 81, 91, 94, 95, 101, 115, 121, 124, 126, 134, 135, 137, 143, 144, 145, 146, 150, 163], "etc": [0, 1, 27, 62, 66, 94, 115, 126, 143], "deal": [0, 54, 65, 66, 124, 131, 134, 135, 140, 143], "disk": [0, 1, 60, 62, 66, 144], "_t": [0, 129], "memori": [0, 2, 7, 8, 23, 24, 26, 27, 28, 32, 33, 34, 44, 51, 52, 53, 54, 55, 57, 60, 62, 65, 76, 78, 80, 87, 90, 94, 98, 103, 108, 113, 114, 115, 117, 119, 120, 121, 124, 125, 126, 128, 130, 131, 132, 133, 134, 135, 140, 144, 154, 155, 156, 158, 159], "care": [0, 65, 92, 98, 109, 112, 120, 121, 143], "item": [0, 10, 58, 66, 126, 154, 161], "through": [0, 2, 24, 27, 28, 39, 54, 55, 62, 65, 66, 67, 80, 121, 126, 131, 136, 146, 152, 159], "printf": [0, 12, 21, 43, 66, 125, 134], "meaning": [0, 95, 118, 140, 159], "compress": [0, 1, 21, 23, 37, 40, 45, 46, 49, 50, 51, 52, 57, 59, 62, 65, 68, 77, 79, 80, 90, 91, 101, 105, 106, 108, 109, 112, 115, 117, 119, 120, 121, 124, 125, 126, 128, 129, 130, 131, 134, 135, 142, 144, 145, 146, 147, 148, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 160, 162, 164], "algorithm": [0, 37, 49, 62, 65, 68, 77, 94, 117, 143, 144, 146, 147, 148, 149, 150, 151, 153, 156, 158, 159, 160, 162, 164], "step": [0, 1, 53, 96, 115, 143], "alloc": [0, 7, 23, 24, 27, 29, 32, 33, 34, 44, 51, 52, 53, 54, 62, 66, 92, 94, 95, 100, 103, 108, 114, 115, 117, 120, 121, 124, 125, 126, 130, 131, 132, 134, 135, 140, 154, 155, 156, 158, 159], "storag": [0, 1, 5, 7, 16, 21, 62, 63, 66, 95, 111, 143, 144, 158, 159], "state": [0, 1, 23, 27, 44, 53, 55, 62, 66, 76, 79, 94, 95, 103, 107, 108, 109, 143], "block": [0, 27, 37, 49, 102, 108, 109, 112, 140, 143, 151, 156], "insur": [0, 65, 66], "creat": [0, 1, 7, 8, 11, 23, 44, 55, 57, 65, 66, 69, 79, 80, 90, 92, 94, 95, 106, 112, 115, 121, 125, 130, 133, 141, 143, 145, 147, 149, 150, 151, 152, 153, 157, 158, 159, 160, 161, 163, 166], "At": [0, 64, 66], "tiffinitfoo": [0, 65], "time": [0, 1, 8, 23, 27, 55, 62, 65, 66, 68, 69, 82, 94, 95, 103, 105, 109, 114, 117, 126, 129, 131, 132, 134, 135, 140, 143, 144, 154, 155, 156, 159, 162], "overrid": [0, 1, 12, 23, 27, 43, 52, 62, 65, 66, 77, 95, 108, 137, 147, 148, 154, 155, 162], "sp": [0, 116, 121], "vgetpar": 0, "tif_vgetfield": 0, "foovgetfield": 0, "hook": [0, 62, 66, 76, 114], "vsetpar": 0, "tif_vsetfield": 0, "foovsetfield": 0, "tif_printdir": 0, "fooprintdir": 0, "actual": [0, 15, 29, 30, 35, 36, 40, 66, 95, 110, 113, 115, 129, 135, 143, 144, 158], "decid": [0, 1, 143], "rather": [0, 63, 112, 114, 121, 127, 135, 143, 158, 159, 161], "specifi": [0, 1, 7, 8, 17, 19, 20, 21, 23, 25, 27, 28, 29, 30, 32, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 57, 58, 59, 62, 65, 66, 67, 79, 81, 87, 94, 95, 109, 113, 114, 115, 124, 126, 127, 131, 134, 140, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "_tiffmergefieldinfo": [0, 96], "foofieldinfo": 0, "macro": [0, 27, 32, 33, 34, 95, 96, 101, 114, 122, 126, 134, 135], "liberali": 0, "throughout": [0, 108, 144], "distribut": [0, 64, 65, 68, 71, 79, 80, 82, 92, 94, 95, 108, 115, 123, 124, 132, 133, 141, 145], "fill": [0, 23, 27, 34, 62, 65, 67, 102, 105, 111, 112, 114, 125, 140, 146, 147, 154, 155, 158, 159, 160], "routin": [0, 1, 2, 5, 6, 7, 8, 11, 16, 20, 21, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 65, 66, 76, 77, 78, 79, 82, 87, 94, 95, 96, 101, 102, 109, 123, 147, 159], "Be": [0, 7, 8, 39, 55, 101, 121], "sure": [0, 1, 29, 109, 117, 124], "parent": [0, 67, 106], "directli": [0, 1, 2, 21, 65, 69, 70, 95, 96, 106, 115, 123, 124, 143, 146, 147], "note": [0, 1, 21, 23, 35, 36, 40, 55, 56, 62, 64, 65, 66, 67, 73, 83, 88, 90, 92, 94, 96, 99, 100, 101, 103, 108, 117, 121, 122, 125, 134, 135, 137, 139, 140, 142, 155, 158], "pseudo": [0, 21, 40, 80, 81, 117, 128, 140], "exclus": [0, 67, 131, 155, 159], "never": [0, 20, 28, 51, 65, 98, 101, 115, 124, 132, 138, 151], "tifftag_faxmod": [0, 21, 40, 62], "tif_fax3": [0, 1, 68, 90, 92, 93, 94, 95, 96, 98, 101, 105, 106, 107, 108, 109, 114, 124, 125, 126, 134, 135], "space": [0, 1, 27, 29, 32, 33, 34, 44, 45, 46, 47, 48, 49, 51, 52, 53, 62, 95, 96, 100, 103, 108, 113, 143, 144, 145, 150, 156, 159], "offset": [0, 8, 11, 21, 23, 28, 31, 34, 39, 40, 42, 44, 45, 46, 47, 48, 49, 55, 62, 67, 76, 93, 109, 110, 112, 115, 124, 126, 127, 132, 135, 139, 144, 155, 158, 159, 161, 162, 163, 165], "awai": [0, 68, 89, 115], "than": [0, 1, 8, 16, 27, 28, 32, 33, 34, 37, 38, 45, 46, 49, 50, 55, 59, 62, 63, 66, 67, 78, 79, 89, 94, 95, 99, 102, 107, 109, 112, 114, 117, 121, 124, 125, 126, 127, 131, 135, 139, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 154, 155, 158, 159, 160, 161, 162, 164], "room": 0, "increas": [0, 45, 47, 49, 95, 114, 124, 125, 159], "td_fieldsset": [0, 132], "chapter": [1, 65, 66, 135], "contain": [1, 11, 23, 38, 50, 53, 57, 59, 62, 65, 66, 67, 76, 80, 81, 82, 90, 95, 120, 127, 139, 143, 144, 147, 148, 149, 152, 154, 155, 158, 159], "instruct": 1, "most": [1, 2, 17, 19, 23, 27, 55, 62, 63, 64, 65, 66, 72, 90, 101, 111, 126, 132, 133, 134, 138, 143, 147, 150, 157, 158, 159], "easili": [1, 95, 108, 143], "littl": [1, 23, 62, 65, 66, 80, 143, 158, 159], "work": [1, 8, 23, 24, 32, 37, 39, 49, 51, 52, 62, 65, 66, 67, 68, 70, 78, 90, 92, 94, 95, 98, 101, 103, 104, 106, 108, 109, 111, 112, 114, 115, 119, 121, 125, 126, 131, 135, 136, 141, 143, 144, 150, 156, 159], "platform": [1, 2, 62, 65, 96, 98, 103, 125], "id": [1, 109, 114, 117, 125, 130, 139, 143], "window": [1, 2, 64, 79, 80, 93, 94, 95, 99, 101, 105, 115, 117, 120, 122, 126, 127, 128, 130, 132, 133, 134, 154, 162], "websit": [1, 90], "further": [1, 12, 37, 38, 43, 49, 66, 68, 69, 70, 94, 98, 126, 140, 141, 143], "run": [1, 23, 62, 65, 79, 92, 110, 114, 115, 117, 121, 122, 125, 126, 130, 134, 141, 143, 162], "level": [1, 25, 27, 62, 65, 66, 79, 87, 94, 95, 115, 117, 120, 126, 128, 135, 143, 145, 146, 151, 155, 158, 159], "cmakelist": [1, 122, 123, 126, 131, 135], "txt": [1, 122, 123, 126, 131, 135, 159], "probe": 1, "tool": [1, 2, 64, 65, 66, 67, 85, 89, 136, 141], "check": [1, 6, 27, 54, 59, 61, 62, 66, 67, 69, 78, 79, 82, 87, 94, 95, 98, 99, 100, 101, 103, 104, 106, 107, 109, 113, 114, 120, 121, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 140, 143, 145, 157, 159], "output": [1, 25, 51, 82, 93, 94, 95, 98, 100, 103, 106, 108, 109, 110, 112, 114, 117, 120, 123, 125, 128, 130, 134, 135, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, 160, 164, 166], "makefil": [1, 2, 65, 76, 80, 81, 89, 90, 91, 92, 93, 94, 95, 96, 101, 103, 107, 108, 109, 123, 124, 126, 129], "simpli": [1, 19, 27, 143, 152], "gmake": 1, "do": [1, 23, 24, 27, 44, 45, 46, 47, 48, 49, 55, 58, 62, 65, 66, 67, 68, 70, 77, 80, 82, 84, 87, 90, 95, 96, 101, 103, 104, 106, 107, 108, 109, 112, 115, 117, 121, 124, 125, 126, 127, 130, 131, 132, 134, 135, 143, 146, 147, 154, 156], "equival": [1, 21, 40, 54, 57, 58, 59, 62, 66, 115, 117, 122, 129], "cd": 1, "5": [1, 12, 23, 24, 27, 28, 43, 52, 62, 64, 65, 66, 68, 74, 75, 95, 115, 117, 121, 123, 126, 133, 135, 137, 138, 139, 140, 145, 146, 147, 155, 159], "lot": [1, 9, 95, 103, 117, 118, 140], "messag": [1, 6, 7, 8, 11, 12, 20, 21, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 61, 62, 66, 72, 80, 102, 105, 108, 114, 117, 118, 121, 124, 125, 131, 134, 146, 162], "depend": [1, 16, 21, 62, 65, 68, 96, 102, 103, 109, 116, 126, 131, 133, 134, 138, 150], "util": [1, 2, 27, 88, 94, 95, 96, 99, 108, 109, 121, 124, 126, 127, 129, 133, 138, 150, 156], "compil": [1, 2, 23, 28, 42, 65, 66, 76, 77, 78, 79, 81, 82, 87, 90, 94, 95, 97, 98, 101, 102, 103, 105, 108, 109, 110, 114, 117, 124, 127, 128, 129, 131, 132, 133, 134, 135, 159], "design": [1, 62, 64, 65, 83, 117, 141, 142, 159], "avail": [1, 12, 17, 21, 27, 40, 42, 43, 44, 52, 63, 65, 73, 77, 90, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 114, 117, 122, 123, 127, 128, 129, 132, 133, 134, 137, 140, 142, 143, 158, 159], "suit": [1, 27, 99, 100, 115, 121], "clean": [1, 90, 95, 101, 108, 115, 134], "remov": [1, 40, 52, 89, 90, 91, 94, 95, 96, 98, 101, 102, 104, 108, 109, 110, 115, 117, 121, 124, 125, 129, 130, 132, 133, 134, 135, 137, 138, 143, 158, 159, 165], "execut": [1, 23, 24, 87, 101, 115, 119, 134], "cruft": 1, "There": [1, 8, 27, 28, 32, 33, 34, 44, 45, 46, 47, 48, 49, 53, 55, 63, 65, 66, 67, 68, 72, 115, 117, 125, 129, 140, 143, 144, 145, 150, 152], "scheme": [1, 49, 52, 62, 65, 80, 82, 87, 109, 115, 129, 140, 143, 144, 146, 147, 149, 150, 151, 153, 156, 157, 158, 159], "intend": [1, 11, 12, 43, 65, 66, 117, 127, 137, 143, 145, 158], "gzip": [1, 65], "dc": [1, 25, 143], "tar": [1, 63, 72, 92], "gz": [1, 63], "xf": 1, "parallel": [1, 62, 103, 110, 115], "hierarchi": 1, "some": [1, 2, 8, 17, 19, 23, 24, 52, 62, 65, 66, 69, 76, 78, 79, 80, 90, 92, 94, 95, 99, 101, 105, 108, 110, 112, 114, 115, 117, 120, 121, 124, 125, 126, 129, 130, 132, 134, 135, 138, 139, 140, 141, 143, 144, 146, 150, 154, 156, 157, 159], "complet": [1, 6, 8, 23, 44, 51, 56, 62, 66, 76, 96, 100, 105, 113, 122, 124, 129, 137, 143], "place": [1, 27, 29, 30, 32, 35, 36, 38, 44, 62, 65, 66, 73, 77, 92, 94, 95, 98, 102, 106, 109, 113, 119, 124, 130, 137, 140, 142, 143, 154, 159, 162], "dure": [1, 92, 94, 95, 105, 108, 112], "procedur": [1, 6, 66, 79, 95, 137, 143], "mkdir": 1, "second": [1, 8, 53, 58, 61, 66, 94, 102, 117, 135, 143, 159], "multipl": [1, 16, 23, 27, 28, 34, 37, 40, 44, 49, 56, 59, 61, 62, 66, 67, 76, 77, 79, 80, 93, 99, 101, 102, 109, 111, 115, 116, 117, 120, 124, 126, 130, 140, 143, 145, 146, 151, 154, 159, 162], "via": [1, 2, 5, 66, 95, 102, 105, 115, 125, 126, 128, 135], "network": [1, 42, 127], "unlik": [1, 7, 8, 44, 66, 76, 123, 159], "doe": [1, 7, 8, 16, 20, 23, 28, 30, 33, 34, 36, 37, 44, 46, 49, 62, 65, 66, 67, 80, 87, 98, 108, 109, 115, 120, 121, 126, 135, 140, 143, 145, 147, 155, 156, 159, 161, 162], "distclean": 1, "out": [1, 20, 34, 37, 38, 44, 47, 48, 49, 50, 57, 59, 62, 65, 66, 71, 76, 80, 95, 108, 109, 110, 113, 115, 117, 120, 121, 124, 125, 126, 134, 135, 138, 140, 143, 145, 146, 147], "recommend": [1, 67, 115, 137, 139, 147], "default": [1, 12, 16, 21, 23, 24, 25, 27, 37, 42, 43, 49, 52, 62, 64, 65, 66, 80, 83, 87, 90, 91, 92, 94, 95, 96, 99, 103, 105, 106, 109, 111, 115, 116, 117, 121, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 143, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166], "nmake": [1, 101, 109, 126, 128, 129], "msbuild": 1, "upon": [1, 23, 137, 154], "help": [1, 53, 68, 94, 114, 125, 141], "ninja": 1, "ctest": 1, "v": [1, 53, 68, 95, 97, 100, 101, 102, 108, 114, 115, 120, 124, 125, 147, 151, 159, 162], "independ": [1, 62, 65, 66, 68, 102, 134, 143, 144, 159], "wai": [1, 23, 28, 66, 115, 139, 143, 158, 159], "altern": [1, 8, 15, 65, 66, 79, 137, 142, 146, 151, 152], "64": [1, 58, 62, 65, 67, 79, 94, 98, 104, 108, 115, 120, 122, 123, 124, 125, 127, 130, 132, 134, 139, 150, 159], "releas": [1, 7, 8, 23, 24, 27, 53, 54, 62, 64, 65, 68, 70, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 143, 159], "vs2013": 1, "visual": [1, 23, 87, 95, 102, 121, 122, 124, 128, 131, 141, 143, 144, 162], "studio": [1, 121, 122, 124, 128, 131], "12": [1, 62, 114, 119, 124, 126, 128, 131, 135, 139, 140, 143, 159], "2013": [1, 121], "win64": 1, "config": [1, 66, 79, 81, 82, 94, 95, 104, 109, 115, 116, 121, 129, 130, 131, 132, 135, 150], "With": [1, 16, 64, 65, 66, 133, 141, 143], "possibl": [1, 17, 19, 21, 27, 32, 49, 62, 65, 66, 67, 71, 79, 95, 96, 100, 105, 112, 115, 117, 121, 123, 126, 127, 141, 143, 144, 147, 155, 158, 159, 162], "solut": [1, 141], "command": [1, 65, 113, 114, 129, 131, 147, 149, 151, 155, 158, 159, 162, 166], "line": [1, 33, 56, 65, 87, 95, 96, 105, 112, 113, 114, 115, 127, 129, 131, 134, 135, 146, 147, 149, 150, 151, 155, 159, 162, 166], "proper": [1, 67, 68, 76, 93, 96, 143], "oper": [1, 20, 21, 23, 27, 28, 32, 33, 34, 40, 44, 51, 58, 62, 64, 65, 66, 68, 73, 94, 115, 120, 146, 155, 159], "script": [1, 2, 65, 76, 81, 92, 104, 116, 126, 129, 132, 133], "seri": [1, 108, 114, 139, 159], "whether": [1, 6, 23, 24, 29, 30, 35, 36, 40, 45, 46, 62, 66, 71, 80, 94, 98, 126, 137, 143, 148], "emul": [1, 77, 155], "workaround": [1, 95, 98, 102, 103, 105, 109, 117, 124], "miss": [1, 27, 28, 32, 33, 34, 80, 88, 93, 94, 95, 99, 103, 105, 108, 109, 110, 113, 114, 120, 121, 123, 124, 125, 126, 132, 133, 134, 135, 143], "after": [1, 7, 8, 23, 24, 27, 55, 60, 65, 66, 94, 97, 101, 108, 117, 119, 121, 125, 126, 132, 134, 135, 138, 140, 143, 157, 159], "cmakecach": 1, "result": [1, 27, 32, 33, 34, 45, 46, 61, 62, 66, 71, 94, 98, 99, 103, 105, 106, 108, 110, 113, 115, 117, 120, 121, 124, 125, 135, 141, 143, 145, 146, 147, 149, 155, 156, 158, 159, 166], "perform": [1, 23, 53, 55, 58, 62, 64, 71, 94, 109, 143, 150, 159], "user": [1, 2, 5, 7, 8, 24, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41, 52, 62, 65, 72, 76, 90, 95, 98, 108, 112, 113, 121, 124, 127, 128, 132, 138, 141, 154, 159], "fail": [1, 23, 52, 53, 55, 80, 89, 94, 95, 98, 105, 109, 111, 115, 117, 119, 121, 123, 125, 129, 134, 135, 143], "cmakefil": 1, "cmakeoutput": 1, "log": [1, 62, 82, 110, 134, 140, 159], "cmakeerror": 1, "record": [1, 52, 146], "error": [1, 6, 7, 8, 11, 12, 20, 21, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 57, 59, 61, 62, 80, 87, 93, 94, 95, 97, 102, 105, 106, 108, 109, 111, 112, 117, 118, 121, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 146, 147, 157, 158, 159, 160, 162, 166], "caus": [1, 20, 80, 87, 91, 95, 108, 109, 110, 113, 114, 115, 121, 123, 124, 125, 126, 131, 137, 138, 154, 158, 159, 160, 162, 164], "failur": [1, 60, 89, 94, 105, 112, 113, 119, 120, 121, 123, 124, 125, 132, 134, 135], "Of": [1, 65, 69, 117, 128, 147, 150], "By": [1, 23, 62, 65, 66, 124, 146, 147, 148, 149, 150, 151, 152, 153, 155, 157, 158, 159, 160, 161, 162, 163, 164], "usr": [1, 82, 94], "local": [1, 55, 79, 101, 112, 125, 143], "behaviour": [1, 16, 23, 24, 33, 34, 42, 65, 94, 95, 114, 123, 124, 125, 127, 132, 133, 134], "full": [1, 29, 30, 35, 36, 65, 66, 67, 94, 95, 96, 108, 115, 140, 143, 144, 145, 148, 152, 159, 162], "lh": 1, "lah": 1, "show": [1, 67, 87, 131, 140, 144, 152, 155, 159], "advanc": [1, 11, 62, 127], "relat": [1, 2, 20, 23, 24, 54, 65, 66, 67, 71, 73, 80, 81, 87, 95, 101, 103, 105, 106, 109, 117, 121, 124, 125, 126, 130, 131, 132, 133, 134, 138, 140, 141, 143, 144, 148, 163], "shown": [1, 21, 40, 53, 162, 163], "below": [1, 21, 23, 37, 38, 40, 49, 53, 62, 65, 66, 67, 133, 143, 149, 150, 152, 155], "descript": [1, 2, 65, 66, 91, 92, 132, 135, 143, 145], "cmake_install_prefix": 1, "root": 1, "individu": [1, 27, 32, 33, 34, 51, 66, 67, 143, 155, 159], "locat": [1, 2, 27, 28, 32, 33, 34, 44, 52, 53, 54, 62, 63, 66, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 139], "cmake_install_bindir": 1, "prefix": [1, 65, 166], "bin": [1, 94, 159], "cmake_install_sbindir": 1, "admin": 1, "sbin": 1, "cmake_install_libexecdir": 1, "program": [1, 2, 21, 53, 62, 63, 64, 66, 68, 79, 80, 85, 86, 98, 109, 115, 119, 122, 126, 141, 143, 146, 152, 154, 156, 158, 159, 160, 164], "libexec": 1, "cmake_install_sysconfdir": 1, "machin": [1, 19, 23, 29, 30, 37, 38, 45, 46, 49, 54, 55, 65, 66, 79, 115, 139], "cmake_install_sharedstatedir": 1, "com": [1, 63, 64, 65, 69, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 108, 109, 117, 126, 129, 132, 133, 134, 135, 137, 138, 140, 143], "cmake_install_localstatedir": 1, "var": 1, "cmake_install_libdir": 1, "lib": [1, 101, 121], "cmake_install_includedir": 1, "header": [1, 18, 23, 44, 65, 66, 82, 94, 95, 96, 103, 112, 115, 120, 125, 129, 145, 150, 159, 161, 165], "cmake_install_oldincludedir": 1, "gcc": [1, 65, 78, 79, 89, 95, 108, 111, 114, 124, 125, 134], "cmake_install_datarootdir": 1, "cmake_install_datadir": 1, "datarootdir": 1, "cmake_install_localedir": 1, "cmake_install_mandir": 1, "man": [1, 62, 89, 90, 94, 95, 108, 121, 131, 145], "document": [1, 63, 64, 65, 71, 76, 78, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 137, 138, 139, 140, 143, 144, 146, 147, 154, 155, 159], "cmake_install_docdir": 1, "doc": [1, 92, 131, 135, 142, 146], "come": [1, 11, 65, 124, 143, 145, 146, 147], "sever": [1, 53, 62, 63, 65, 66, 67, 68, 82, 86, 87, 94, 95, 97, 99, 100, 110, 115, 120, 121, 126, 132, 135, 143, 145, 150, 155, 158, 159, 160], "commandlin": [1, 95], "build_shared_lib": 1, "ON": [1, 71], "binari": [1, 2, 79, 88, 95, 96, 101, 115, 124, 125, 128, 159], "significantli": [1, 82, 145], "reduc": [1, 2, 23, 67, 90, 105, 114, 124, 125, 126, 140, 143, 144, 146], "link": [1, 5, 12, 39, 43, 44, 55, 67, 77, 85, 89, 94, 95, 101, 103, 121, 131, 135, 141, 146, 152], "applic": [1, 4, 7, 8, 9, 12, 22, 23, 24, 27, 28, 37, 38, 41, 43, 44, 50, 51, 52, 53, 55, 62, 65, 66, 76, 77, 80, 82, 87, 90, 94, 95, 99, 108, 115, 116, 117, 138, 141, 143, 144], "ld": [1, 51, 116], "version": [1, 7, 8, 23, 24, 55, 62, 64, 65, 67, 68, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 139, 140, 141, 143, 145, 147, 155, 159, 161, 162], "enabl": [1, 23, 28, 42, 62, 65, 80, 87, 90, 92, 94, 95, 99, 101, 103, 105, 107, 108, 109, 110, 115, 116, 124, 126, 127, 133, 134, 135, 141, 155, 158, 159, 162, 163], "linker": [1, 94, 101, 107, 116], "symbol": [1, 82, 91, 116, 126, 131, 132, 161, 163], "elf": [1, 116], "base": [1, 2, 23, 27, 28, 32, 33, 34, 37, 62, 65, 108, 111, 116, 117, 123, 124, 125, 126, 131, 132, 135, 139, 140, 141, 143, 150, 159], "linux": [1, 64, 82, 85, 87, 92, 93, 116, 121, 126, 132], "freebsd": [1, 86, 93, 116], "gnu": [1, 95, 98, 116], "major": [1, 66, 136, 137], "might": [1, 66, 81, 112, 119, 129, 137, 138, 143, 145, 152, 158, 159, 161], "load": [1, 23, 42, 87, 115, 116, 127, 141, 143], "ijg": [1, 2, 65, 68, 96, 111, 119], "usag": [1, 27, 51, 55, 66, 87, 91, 107, 114, 121, 125, 126, 128, 129, 134, 154, 159], "jpeg_include_dir": 1, "jpeg_librari": 1, "encod": [1, 44, 45, 46, 49, 50, 51, 52, 62, 65, 66, 94, 95, 98, 103, 106, 108, 109, 114, 117, 125, 135, 140, 143, 144, 146, 147, 148, 155, 158, 159, 160, 164], "group": [1, 62, 65, 68, 79, 135, 140, 143, 145, 147, 149, 153, 154, 158, 159, 160], "libjpeg": [1, 65, 95, 101, 109, 111, 125, 126, 130, 131, 135, 154], "http": [1, 21, 40, 63, 64, 65, 72, 73, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 140, 141, 142], "www": [1, 21, 40, 64, 65, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 140, 141, 142], "org": [1, 21, 40, 63, 64, 65, 69, 72, 73, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 142], "tri": [1, 12, 43, 57, 65, 79], "search": [1, 16, 78, 96, 141], "disabl": [1, 23, 65, 80, 90, 102, 115, 121, 124, 126, 128, 131, 132, 135, 154, 155, 156, 158, 159, 162], "exact": [1, 34, 66, 115, 133, 143], "path": [1, 96, 101, 107, 108, 124, 125, 126, 130, 159], "deflat": [1, 62, 65, 77, 82, 117, 128, 130, 140, 148, 149, 150, 151, 153, 154, 156, 158, 159, 160, 164], "freeli": [1, 65, 77], "zlib": [1, 65, 77, 79, 82, 117, 124, 128, 135, 154, 158], "jean": [1, 65], "loup": [1, 65], "gailli": [1, 65], "mark": [1, 2, 65, 95, 96, 135, 149, 155], "adler": [1, 65], "shell": [1, 65, 81, 94, 120, 126], "construct": [1, 27, 28, 108, 114], "environ": [1, 65, 66, 102, 126], "suppli": [1, 2, 10, 12, 17, 19, 21, 23, 29, 30, 32, 33, 34, 35, 36, 37, 40, 43, 52, 58, 59, 62, 65, 80, 93, 94, 95, 96, 98, 101, 143], "everyth": [1, 66, 77, 94], "recreat": 1, "again": [1, 8, 44, 66, 132, 135, 139, 143], "fairli": [1, 95, 143], "complic": [1, 66, 95], "due": [1, 112, 114, 121, 124, 129, 131, 132, 133, 143, 146], "nonstandard": [1, 62], "natur": [1, 66], "prone": 1, "anyth": [1, 23, 68, 95, 137, 143, 150], "sens": [1, 56, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 115, 126, 141, 143, 144, 159], "exec": 1, "eprefix": 1, "home": [1, 64, 134, 135, 162], "better": [1, 62, 87, 95, 99, 108, 114, 117, 124, 125, 132, 143, 144], "fine": [1, 66, 121, 150], "tune": 1, "bindir": 1, "sbindir": 1, "libexecdir": 1, "sysconfdir": 1, "sharedstatedir": 1, "localstatedir": 1, "libdir": 1, "includedir": 1, "oldincludedir": 1, "datadir": 1, "localedir": 1, "mandir": 1, "docdir": [1, 102], "htmldir": 1, "html": [1, 65, 77, 79, 86, 90, 92, 93, 95, 99, 109, 121, 131, 139, 140], "prepend": 1, "suffix": [1, 124, 129, 159, 166], "append": [1, 23, 44, 46, 47, 48, 50, 66, 131, 158, 159, 160, 164], "transform": [1, 27, 96, 141, 151, 156], "sed": [1, 92], "pkg": [1, 115, 116, 121, 130, 131], "These": [1, 27, 54, 55, 62, 66, 93, 95, 96, 108, 115, 124, 143, 144, 149, 150], "both": [1, 6, 12, 27, 43, 52, 62, 66, 96, 115, 125, 126, 131, 139, 140, 141, 143, 150, 155, 159], "rpath": [1, 101, 102, 103, 107], "runtim": [1, 2, 42, 103, 107, 124, 125, 126, 127, 128, 130, 132], "r": [1, 23, 24, 53, 62, 66, 67, 93, 94, 95, 102, 103, 105, 106, 124, 125, 132, 133, 140, 147, 148, 149, 151, 153, 154, 155, 156, 158, 159, 160, 162, 164], "libtool": [1, 101, 103, 106, 108, 112, 115, 121], "ye": [1, 95], "switch": [1, 27, 67, 92, 93, 95, 98, 109, 115, 120, 130, 135, 143, 145, 162], "found": [1, 5, 22, 23, 41, 54, 65, 66, 79, 97, 114, 121, 124, 135, 137, 139, 140, 141, 143, 148, 158, 159, 160, 162, 164], "section": [1, 53, 64, 65, 94, 96, 102, 130, 132, 145, 159], "fly": [1, 66], "tif_fax3sm": 1, "tabl": [1, 21, 25, 27, 32, 33, 34, 40, 52, 53, 58, 62, 65, 76, 79, 82, 87, 108, 112, 113, 114, 121, 125, 140, 143], "decod": [1, 27, 38, 52, 56, 57, 62, 65, 66, 68, 76, 78, 79, 81, 85, 87, 93, 94, 95, 101, 103, 106, 108, 109, 111, 112, 114, 117, 120, 123, 124, 126, 131, 132, 133, 134, 140, 143, 144, 146, 147, 162], "mkg3state": [1, 68, 135], "cc": [1, 62, 65, 79, 90, 135], "o": [1, 2, 23, 25, 27, 32, 33, 34, 42, 51, 53, 54, 55, 62, 65, 76, 79, 80, 83, 93, 95, 107, 109, 115, 117, 120, 122, 125, 127, 140, 147, 154, 155, 158, 159, 161, 162, 163], "rm": 1, "f": [1, 23, 62, 126, 140, 147, 152, 154, 158, 159, 160, 162, 164], "declar": [1, 53, 65, 80, 94, 95, 96, 98, 108, 114, 124, 131, 137], "class": [1, 2, 62, 140, 143, 147, 152, 159], "b": [1, 21, 23, 27, 32, 33, 34, 40, 53, 62, 65, 80, 94, 95, 96, 103, 124, 133, 140, 143, 145, 147, 150, 153, 154, 155, 156, 158, 159, 162], "forc": [1, 23, 66, 80, 85, 94, 95, 109, 112, 124, 134, 143, 147, 155, 158, 159, 160, 161, 162, 164], "explicitli": [1, 65, 66, 95, 125, 143, 148, 149, 150, 151, 158], "bracket": [1, 101], "appar": [1, 8, 23, 94, 95, 125], "m": [1, 23, 80, 84, 87, 94, 105, 117, 124, 128, 130, 147, 150, 154, 155, 156, 158, 159, 161, 162], "emit": [1, 11, 24, 93, 94, 95, 98, 114, 117, 121, 125, 126, 130, 135, 143], "compact": 1, "format": [1, 2, 12, 21, 32, 33, 34, 37, 40, 43, 53, 62, 63, 64, 65, 66, 68, 76, 82, 90, 92, 102, 103, 105, 108, 111, 115, 124, 125, 131, 132, 134, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 152, 154, 157, 158, 159, 161, 162, 163], "consult": [1, 21, 40, 62, 66, 68, 77, 115, 140], "question": [1, 2, 70, 143], "tiffgetvers": [1, 55, 62, 66], "mkversion": [1, 79, 85, 86, 96], "content": [1, 6, 8, 21, 23, 28, 31, 35, 36, 39, 40, 44, 62, 66, 98, 105, 133, 136, 140, 143, 145, 147, 158, 161, 163, 165], "alpha": [1, 27, 32, 33, 34, 66, 79, 89, 94, 95, 98, 101, 102, 103, 106, 108, 109, 118, 133, 134, 135, 140, 155, 156], "dist": [1, 66, 79], "tiffcomp": [1, 65, 76, 93, 96], "tiffconf": [1, 92, 95, 108, 109, 132, 135], "former": 1, "compat": [1, 23, 62, 66, 82, 93, 102, 105, 108, 109, 114, 115, 121, 126, 131, 132, 133, 137, 141, 143], "latter": [1, 44, 65], "facil": [1, 23, 32, 33, 34, 77, 145, 159], "32": [1, 27, 29, 30, 32, 33, 34, 37, 38, 40, 58, 62, 65, 66, 90, 93, 94, 102, 108, 117, 122, 123, 124, 125, 127, 128, 132, 150, 159], "codec": [1, 52, 62, 66, 77, 78, 79, 80, 81, 82, 83, 84, 87, 95, 98, 100, 103, 106, 107, 108, 109, 113, 117, 121, 124, 125, 126, 128, 129, 130, 131, 133, 134, 135, 143, 144, 158], "especi": [1, 7, 23, 70, 94, 125, 139, 141, 143], "problem": [1, 53, 65, 66, 69, 76, 78, 80, 81, 86, 87, 89, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 105, 106, 109, 112, 114, 119, 120, 137, 138, 142], "try": [1, 66, 89, 94, 95, 105, 108, 113, 128, 130, 131, 132, 135, 137, 138, 143, 150], "assum": [1, 27, 32, 33, 34, 45, 46, 47, 48, 49, 65, 66, 93, 95, 109, 114, 134, 147, 148, 154, 159, 162], "ansi": [1, 65, 66, 78, 85, 121], "posix": [1, 122], "ism": 1, "port": [1, 2, 65, 79, 95, 104, 117, 129], "On": [1, 19, 23, 39, 55, 65, 66, 117], "figur": [1, 115, 146], "present": [1, 27, 28, 32, 42, 66, 79, 80, 95, 98, 111, 117, 125, 127, 130, 143, 146, 159, 163], "manual": [1, 62, 66, 79, 82, 96, 150], "tiffgt": [1, 27, 62, 64, 76, 96, 102, 103, 106, 120, 123, 133, 134, 145, 147, 152, 155], "view": [1, 112, 127, 139, 141], "tiffinfo": [1, 62, 64, 67, 76, 87, 105, 117, 121, 122, 124, 125, 130, 131, 132, 133, 135, 145, 147, 148, 149, 150, 151, 152, 153, 155, 157, 158, 159, 160, 161, 162, 164, 165, 166], "displai": [1, 32, 33, 34, 53, 62, 66, 76, 102, 129, 145, 159, 161, 162, 163, 164], "metadata": [1, 8, 42, 62, 88, 95, 127], "obtain": [1, 23, 90, 95, 143, 147], "cursori": 1, "tiffcp": [1, 62, 63, 64, 76, 80, 94, 95, 98, 104, 105, 106, 107, 109, 111, 112, 114, 115, 117, 120, 121, 124, 125, 126, 128, 130, 132, 133, 134, 135, 145, 147, 148, 149, 150, 151, 153, 154, 155, 157, 159, 160, 162, 163, 164, 165, 166], "tiffcmp": [1, 62, 64, 78, 92, 94, 95, 97, 102, 109, 121, 126, 129, 133, 134, 135, 145, 158, 159, 163, 164], "lzw": [1, 52, 65, 68, 76, 87, 90, 91, 109, 117, 121, 124, 126, 130, 134, 140, 147, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164], "cramp": 1, "x": [1, 2, 21, 23, 27, 28, 30, 32, 33, 34, 36, 38, 46, 50, 53, 59, 62, 64, 66, 78, 87, 89, 94, 95, 103, 108, 112, 115, 123, 126, 131, 139, 146, 147, 149, 154, 155, 158, 159, 166], "silent": [1, 108, 115, 162], "compar": [1, 18, 24, 54, 62, 95, 102, 108, 143, 145, 157], "correctli": [1, 27, 37, 45, 46, 49, 66, 78, 79, 81, 82, 87, 102, 105, 120, 125, 126, 131, 132, 158, 162], "spec": [1, 62, 65, 77, 90, 95, 104, 140, 143], "tiffio": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66, 67, 76, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 105, 108, 115, 125, 134, 135], "public": [1, 42, 66, 70, 71, 92, 105, 115, 125, 127], "tiffiop": [1, 65, 76, 80, 95, 96, 99, 103, 105, 108, 109, 114, 115, 122, 124, 125, 126], "privat": [1, 2, 4, 8, 62, 65, 89, 95, 99, 108, 115, 116, 121, 131, 134, 135, 140, 143], "t4": 1, "ccitt": [1, 62, 65, 80, 81, 98, 135, 140, 143, 147, 149, 153, 154, 158, 159, 160], "def": [1, 92, 94, 95, 98, 101, 105, 124, 126, 134], "tif_predict": [1, 65, 103, 106, 108, 124, 125, 126, 131, 135], "predictor": [1, 77, 103, 108, 123, 124, 130, 135, 140, 158, 159, 160, 164], "tag": [1, 2, 8, 9, 11, 16, 18, 22, 24, 27, 28, 29, 30, 32, 33, 34, 37, 38, 39, 41, 45, 46, 47, 48, 49, 52, 55, 57, 59, 60, 64, 65, 67, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 143, 144, 145, 147, 149, 152, 154, 155, 157, 158, 159, 160, 161, 163, 164, 165, 166], "tiffver": [1, 133], "uvcod": 1, "logl": [1, 62], "logluv": [1, 62, 94, 108, 121, 124], "tif_aux": [1, 92, 96, 101, 105, 106, 109, 124, 126], "auxiliari": [1, 6, 143], "tif_clos": [1, 98], "close": [1, 6, 23, 26, 62, 65, 66, 94, 98, 101, 121, 125, 135, 138, 143, 158], "tif_codec": [1, 65, 95, 96, 98, 108, 121], "builtin": [1, 62, 77, 79, 82, 117], "tif_color": [1, 96, 101, 102, 106, 114, 125, 126], "colorspac": [1, 53, 62, 66, 95, 96, 109, 140, 143], "tif_compress": [1, 95, 97, 100, 101, 124], "tif_dirread": [1, 93, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 114, 115, 116, 120, 121, 124, 125, 126, 134], "tif_dirwrit": [1, 94, 95, 98, 101, 103, 105, 106, 108, 109, 110, 114, 115, 120, 124, 125, 126], "tif_dumpmod": [1, 65, 124], "tif_error": [1, 126], "handler": [1, 12, 23, 24, 43, 62, 66, 105, 117, 126], "g3": [1, 21, 40, 62, 76, 78, 80, 87, 147, 149, 153, 158, 159, 160], "g4": [1, 21, 40, 62, 76, 78, 87, 147, 149, 153, 154, 158, 159, 160], "tif_flush": 1, "flush": [1, 6, 20, 44, 62, 65, 66, 109, 125], "tif_getimag": [1, 89, 93, 94, 95, 96, 101, 102, 105, 108, 109, 114, 118, 120, 121, 124, 125, 126, 134, 135], "tiffrgbaimag": [1, 3, 32, 33, 34, 53, 62, 64, 76, 87, 96, 106, 108, 124, 135, 145], "tif_jbig": [1, 108, 109, 126, 130], "jbig": [1, 65, 68, 108, 109, 117, 128], "tif_jpeg": [1, 93, 94, 95, 97, 98, 101, 102, 103, 105, 106, 107, 108, 109, 114, 116, 118, 120, 125, 126, 130, 131, 134, 135], "tif_jpeg_12": [1, 124, 126], "tif_lerc": [1, 117, 132, 135], "lerc": [1, 65, 117, 129, 130, 134, 140], "tif_luv": [1, 94, 96, 97, 99, 107, 108, 120, 124, 125, 126, 132], "sgi": [1, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 93, 140], "tif_lzma": 1, "lzma": [1, 115, 117, 131, 158], "tif_lzw": [1, 65, 93, 94, 95, 96, 99, 106, 107, 108, 109, 120, 125, 126, 131, 135], "tif_next": [1, 99, 101, 109, 124], "tif_ojpeg": [1, 95, 96, 97, 98, 101, 106, 109, 114, 120, 125, 132, 134], "old": [1, 2, 8, 23, 44, 62, 64, 65, 68, 75, 77, 93, 98, 115, 124, 126, 134, 139, 143, 147, 162], "obsolet": [1, 65, 115, 140], "tif_open": [1, 93, 94, 95, 98, 99, 101, 102, 103, 105, 109, 114, 125], "queri": [1, 7, 8, 39, 55, 66], "tif_packbit": [1, 65, 93, 94, 125, 135], "packbit": [1, 62, 65, 79, 91, 94, 140, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164], "tif_pixarlog": [1, 97, 102, 106, 107, 109, 124, 125, 126], "pixar": [1, 65, 83, 84, 91, 94, 140], "tif_read": [1, 93, 95, 103, 109, 120, 121, 124, 125, 126], "tif_strip": [1, 95, 96, 98, 107, 114, 124, 125], "strip": [1, 23, 25, 27, 28, 29, 32, 33, 34, 35, 37, 44, 45, 46, 47, 48, 49, 51, 52, 55, 56, 57, 62, 65, 76, 79, 80, 81, 82, 87, 90, 93, 94, 95, 97, 98, 102, 103, 105, 108, 109, 110, 112, 115, 117, 121, 124, 125, 126, 127, 128, 130, 131, 132, 140, 143, 144, 145, 147, 148, 149, 150, 151, 153, 154, 156, 158, 159, 160, 162, 163, 164], "tif_swab": [1, 103, 126], "swap": [1, 29, 30, 37, 38, 45, 46, 49, 55, 58, 62, 65, 78, 90, 95, 103, 104, 109, 123, 134, 150], "tif_thund": [1, 99, 114], "thunderscan": [1, 62, 65, 140], "tif_til": [1, 96, 106], "tile": [1, 23, 25, 27, 28, 30, 32, 33, 34, 36, 37, 38, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55, 59, 62, 65, 78, 79, 81, 87, 90, 93, 94, 95, 97, 103, 105, 108, 109, 111, 112, 114, 115, 117, 119, 120, 121, 124, 125, 126, 127, 130, 131, 140, 143, 144, 145, 154, 155, 156, 157, 158, 159, 162], "tif_unix": [1, 23, 65, 89, 92, 98, 101, 118, 120, 122, 125], "tif_vers": [1, 79], "tif_warn": [1, 126], "warn": [1, 6, 7, 8, 11, 23, 24, 28, 42, 43, 62, 66, 78, 90, 91, 93, 95, 98, 99, 102, 105, 108, 111, 114, 117, 120, 121, 123, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 147, 162, 163], "tif_win32": [1, 23, 89, 92, 93, 98, 101, 102, 103, 109, 122, 125, 127], "win32": [1, 2, 80, 93, 95, 103, 107, 114, 115, 121, 125, 127, 129, 131], "tif_writ": [1, 90, 92, 95, 97, 98, 101, 104, 106, 108, 109, 110, 117, 120, 121, 124, 125], "tif_zip": [1, 106, 107, 108, 109, 121, 125, 135], "tif_zstd": 1, "zstd": [1, 65, 117], "mkspan": 1, "black": [1, 27, 32, 33, 34, 53, 62, 66, 109, 140, 146, 147, 149, 150, 154, 159, 162, 165], "white": [1, 53, 62, 66, 93, 140, 146, 147, 150, 154, 155, 159, 162], "span": 1, "contrib": [2, 63, 77, 80, 81, 88, 89, 90, 92, 93, 94, 95, 96, 105, 109, 121, 127, 131, 134], "typic": [2, 11, 12, 17, 19, 29, 35, 36, 38, 43, 57, 66, 117, 126, 143, 146, 147, 158], "glue": 2, "guidanc": 2, "unix": [2, 23, 55, 64, 65, 66, 79, 93, 101, 115, 121, 122], "aren": [2, 95], "db": [2, 63, 77, 109, 121], "dan": [2, 68, 106], "chri": [2, 96, 99], "sear": 2, "simpl": [2, 27, 64, 65, 66, 69, 141, 143, 145], "viewer": [2, 66, 114], "ra": [2, 90], "patrick": [2, 104], "naughton": 2, "convert": [2, 23, 27, 29, 30, 32, 33, 34, 36, 37, 38, 46, 49, 53, 62, 65, 66, 76, 87, 88, 94, 95, 96, 99, 102, 106, 109, 114, 121, 124, 128, 134, 143, 145, 148, 149, 150, 151, 153, 154, 156, 158, 159, 160], "between": [2, 27, 29, 30, 37, 38, 49, 53, 62, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 143, 144, 150, 155, 157, 158], "sun": [2, 90, 96, 102, 103, 120, 126], "rasterfil": [2, 96], "libpixrect": 2, "oppos": [2, 94], "doesn": [2, 33, 34, 112, 114, 125, 143], "mac": [2, 77, 79, 81], "mpw": [2, 77], "cw": [2, 81], "nile": [2, 68, 76, 81], "ritter": [2, 68, 76, 81], "build": [2, 42, 64, 65, 66, 79, 80, 81, 82, 84, 85, 86, 87, 89, 90, 93, 94, 95, 96, 99, 101, 102, 103, 104, 108, 111, 114, 115, 117, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 137, 158], "under": [2, 68, 73, 77, 78, 79, 80, 84, 85, 86, 87, 97, 105, 115, 122, 135], "macintosh": [2, 65, 77, 81, 148], "warrior": 2, "acorn": [2, 79, 80, 83], "peter": [2, 68, 79, 80, 83, 92, 93, 101], "greenham": [2, 79, 80, 83], "risc": [2, 79, 80], "system": [2, 23, 54, 55, 62, 64, 65, 66, 69, 76, 78, 79, 80, 81, 82, 86, 87, 93, 98, 99, 104, 115, 116, 117, 120, 122, 126, 133, 141, 143, 150, 154, 156], "scott": [2, 79, 94, 95], "wagner": [2, 79], "nt": [2, 79, 80], "95": [2, 79, 80, 95, 143], "vc": [2, 90, 93, 94, 95, 96, 101, 103, 109, 110, 121, 124], "suffici": [2, 125, 137, 143], "win_dib": [2, 95], "separ": [2, 23, 27, 29, 30, 35, 36, 37, 38, 45, 46, 49, 50, 56, 57, 59, 63, 65, 66, 93, 94, 98, 99, 102, 109, 124, 140, 143, 147, 148, 150, 151, 154, 158, 159, 160, 162, 164], "implement": [2, 45, 46, 49, 52, 53, 66, 68, 82, 95, 96, 99, 109, 115, 117, 125, 132, 135, 137, 141, 144, 156], "dib": [2, 95], "suitabl": [2, 55, 59, 62, 63, 66, 128, 144, 145, 146], "jame": 2, "philipp": [2, 80], "tenenhau": [2, 80], "ojpeg": [2, 94, 95, 96, 109, 111, 112, 121, 124, 130, 134, 140, 159], "patch": [2, 89, 90, 92, 93, 94, 95, 96, 98, 99, 102, 104, 108, 109, 112, 114, 115, 121, 124, 125, 126], "jpeg": [2, 21, 25, 40, 62, 65, 68, 76, 77, 79, 95, 96, 98, 103, 105, 106, 108, 109, 111, 112, 113, 114, 117, 119, 121, 124, 126, 128, 131, 134, 140, 142, 149, 150, 151, 154, 156, 158, 159, 163], "marovich": [2, 94], "dosdjgpp": 2, "alexand": [2, 84], "lehmann": [2, 84], "msdo": 2, "djgpp": [2, 84], "v2": [2, 84, 117], "ad": [2, 9, 23, 24, 42, 76, 77, 79, 80, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 113, 115, 116, 117, 118, 121, 122, 124, 126, 127, 128, 130, 131, 132, 134, 135, 137, 139, 143, 159], "mf": 2, "mike": [2, 68], "johnson": [2, 68], "pd": [2, 96], "conrad": 2, "poelman": 2, "iter": [2, 117, 126], "sub": [2, 66, 94, 95, 129, 135], "iptcutil": [2, 88, 92, 120, 129], "bill": [2, 88], "radcliff": [2, 88], "extract": [2, 88, 94, 96, 101, 109, 141, 145, 158, 159], "iptc": [2, 62, 88, 140], "newsphoto": [2, 62, 88], "caption": [2, 62, 88], "blob": [2, 88, 117, 133], "text": [2, 72, 88, 109, 129, 131, 143, 146, 159], "vice": [2, 88, 128, 159], "versa": [2, 88, 128, 159], "imagemagick": [2, 88], "addtiffo": [2, 89, 92, 93, 94, 95, 103, 104, 105, 109, 120, 134, 135], "subroutin": 2, "resolut": [2, 65, 67, 83, 87, 95, 101, 109, 140, 143, 146, 147, 149, 152, 154, 155, 159, 165], "overview": [2, 64, 66, 89, 103, 104, 141], "frank": [2, 68, 69, 78, 90, 124, 137], "warmerdam": [2, 68, 69, 137], "stream": [2, 25, 66, 93, 95, 101, 102, 107, 117, 121, 124, 126, 128], "tiffstream": 2, "access": [2, 4, 12, 23, 27, 28, 32, 33, 34, 37, 39, 42, 43, 49, 55, 62, 66, 72, 87, 93, 94, 95, 115, 117, 119, 121, 124, 127, 128, 135, 143], "avi": [2, 93], "bleiweiss": [2, 93], "regard": [2, 60, 62, 66, 93, 126, 143], "packag": [2, 65, 77, 80, 81, 82, 84, 99, 114, 115, 127, 128, 129, 130, 131, 132, 133, 134, 135], "direct": [2, 6, 7, 8, 11, 20, 21, 23, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 62, 66, 96, 137, 159], "toward": 2, "author": [2, 137, 138, 143, 154], "tiffaccesstagmethod": [3, 62, 64], "tiffbuff": [3, 64], "tiffclientinfo": [3, 64], "tiffclos": [3, 7, 8, 23, 24, 44, 62, 64, 66, 67, 98, 125, 132, 134], "tiffcodec": [3, 64], "tiffcolor": [3, 27, 64, 96], "tiffcreatedirectori": [3, 8, 11, 28, 39, 44, 55, 62, 64, 92, 134], "tiffcustomdirectori": [3, 7, 28, 39, 44, 64, 66, 140], "tiffcustomtaglist": [3, 64], "tiffdatawidth": [3, 62, 64, 95, 96], "tiffdeferstrilearraywrit": [3, 42, 62, 64, 127], "tifferror": [3, 6, 9, 24, 43, 44, 53, 62, 64, 66, 99, 105, 107, 108], "tifffielddatatyp": [3, 14, 15, 16, 17, 18, 19, 62, 64, 119], "tifffieldnam": [3, 13, 15, 16, 17, 18, 19, 62, 64, 119], "tifffieldpasscount": [3, 13, 14, 16, 17, 18, 19, 62, 64, 119], "tifffieldqueri": [3, 13, 14, 15, 17, 18, 19, 64], "tifffieldreadcount": [3, 13, 14, 15, 16, 18, 19, 62, 64, 119], "tifffieldtag": [3, 13, 14, 15, 16, 17, 19, 62, 64, 119], "tifffieldwritecount": [3, 13, 14, 15, 16, 17, 18, 62, 64, 119], "tiffflush": [3, 6, 7, 8, 44, 62, 64, 66, 134], "tiffmemori": [3, 64, 92], "tiffopen": [3, 6, 9, 11, 12, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 55, 56, 62, 64, 66, 67, 80, 89, 115, 127, 132, 135], "tiffopenopt": [3, 12, 23, 43, 62, 64, 66, 134], "tiffprocfunct": [3, 64], "tiffqueri": [3, 7, 8, 28, 39, 44, 64, 90], "tiffreadencodedstrip": [3, 30, 31, 35, 37, 55, 57, 62, 64, 66, 93, 95, 124, 125, 126, 127], "tiffreadencodedtil": [3, 29, 31, 36, 38, 59, 62, 64, 66, 124, 126, 127, 135], "tiffreadfromuserbuff": [3, 62, 64, 127, 131], "tiffreadrawstrip": [3, 29, 31, 37, 57, 62, 64, 66], "tiffreadrawtil": [3, 30, 38, 59, 62, 64, 66], "tiffreadrgbaimag": [3, 27, 33, 34, 62, 64, 66, 76, 95, 135, 140, 156], "tiffreadrgbastrip": [3, 27, 32, 34, 62, 64, 89, 95, 134], "tiffreadrgbatil": [3, 27, 32, 33, 62, 64, 89, 94, 95, 134], "tiffreadscanlin": [3, 27, 29, 31, 35, 55, 56, 62, 64, 66, 95, 112, 115, 125, 126, 130, 135, 157], "tiffreadtil": [3, 30, 36, 50, 55, 59, 62, 64, 66, 126], "tiffsetdirectori": [3, 7, 8, 21, 25, 28, 40, 44, 55, 62, 64, 66, 67, 87, 119, 131, 132], "tiffsiz": [3, 64], "tiffstrilequeri": [3, 23, 64], "tiffstrip": [3, 35, 64], "tiffswab": [3, 64], "tifftil": [3, 36, 38, 50, 64], "tiffwarn": [3, 12, 24, 62, 64, 66, 108], "tiffwriteencodedstrip": [3, 20, 47, 49, 57, 62, 64, 79, 120, 124], "tiffwriteencodedtil": [3, 20, 48, 50, 59, 62, 64, 66, 120, 124], "tiffwriterawstrip": [3, 20, 45, 49, 57, 62, 64, 78, 79, 120, 131], "tiffwriterawtil": [3, 20, 46, 50, 59, 62, 64, 66], "tiffwritescanlin": [3, 20, 45, 47, 48, 50, 56, 62, 64, 66, 67, 95, 106, 117, 120, 135], "tiffwritetil": [3, 20, 46, 59, 62, 64, 90], "_tiffauxiliari": [3, 64], "_tiffrewritefield": [3, 62, 64, 115, 120, 130], "tifftagmethod": [4, 62], "tiff": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 72, 73, 74, 75, 141, 144, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 158, 159, 161, 162, 163, 165, 166], "none": [4, 5, 9, 16, 22, 25, 26, 54, 55, 56, 57, 58, 59, 70, 88, 91, 97, 101, 102, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 130, 131, 132, 133, 134, 135, 140, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164, 166], "3tiff": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 67, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166], "tiffgetclientinfo": [5, 62], "tiffsetclientinfo": [5, 62], "clientinfo": [5, 62], "hand": [5, 23, 27, 32, 33, 34, 73], "over": [5, 33, 34, 65, 66, 76, 94, 105, 115, 121, 126, 133, 140, 143, 155, 159], "defin": [5, 8, 9, 12, 16, 21, 22, 23, 24, 25, 27, 40, 41, 43, 45, 46, 47, 48, 49, 53, 56, 57, 59, 62, 64, 66, 67, 76, 80, 82, 90, 93, 94, 95, 96, 101, 103, 109, 110, 112, 113, 115, 117, 121, 124, 125, 126, 130, 133, 134, 135, 140, 143, 144, 159], "anoth": [5, 8, 42, 54, 62, 68, 90, 92, 95, 106, 127, 141, 159], "replac": [5, 31, 45, 58, 62, 65, 66, 76, 80, 95, 96, 102, 103, 104, 114, 115, 124, 125, 126, 127, 131, 134, 135], "caller": [5, 23, 29, 30, 35, 36, 45, 46, 51, 52, 101, 108, 114], "tiffcleanup": [6, 7, 23, 62, 98], "previous": [6, 8, 13, 14, 15, 16, 17, 18, 19, 21, 40, 42, 44, 45, 62, 65, 69, 95, 109, 114, 123, 126, 127, 140], "buffer": [6, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 50, 51, 53, 54, 55, 62, 65, 66, 92, 93, 94, 98, 99, 102, 108, 109, 112, 113, 114, 117, 118, 119, 120, 121, 124, 125, 126, 127, 130, 131, 132, 134, 135, 159, 164], "resourc": [6, 23, 27, 117, 120, 132, 134, 141], "reclaim": 6, "free": [6, 7, 8, 23, 44, 52, 53, 62, 66, 68, 70, 90, 92, 104, 108, 121, 125, 126, 134, 135, 141], "freed": 6, "save": [6, 8, 23, 27, 80, 90, 109, 124, 128, 135, 140, 143, 145, 152], "extern": [6, 24, 77, 80, 95, 102, 119, 129, 143], "ones": [6, 94, 135, 159], "pend": [6, 20, 44, 62, 65, 89], "successfulli": [6, 8, 28, 32, 33, 34, 44, 134], "tifferrorextr": [6, 7, 8, 11, 12, 20, 21, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 62], "likewis": [6, 7, 8, 11, 23, 28, 42, 62, 66, 127, 139], "tiffwarningextr": [6, 7, 8, 11, 23, 24, 28, 42, 43, 62], "tifffreedirectori": [7, 8, 62, 98, 105], "tiffunlinkdirectori": [7, 62, 131, 132, 135], "tdir_t": [7, 39, 55, 62, 67, 131], "dirn": 7, "newli": [7, 8, 80, 126], "till": [7, 8, 95, 108], "tiffcheckpointdirectori": [7, 8, 44, 62, 95], "new": [7, 8, 22, 23, 41, 42, 44, 55, 64, 66, 69, 76, 77, 79, 80, 82, 83, 84, 85, 87, 92, 94, 95, 96, 98, 99, 102, 103, 106, 108, 109, 111, 112, 114, 115, 116, 117, 119, 121, 124, 126, 127, 129, 130, 131, 132, 133, 134, 135, 139, 143, 158, 159, 160], "main": [7, 8, 24, 33, 34, 39, 66, 67, 98, 114, 125, 126, 132], "touch": [7, 23], "unlink": [7, 62, 132], "subfil": [7, 23, 28, 39, 44, 49, 67, 140, 144], "integ": [7, 12, 15, 17, 18, 19, 23, 39, 43, 54, 61, 62, 65, 97, 100, 102, 105, 106, 108, 113, 114, 115, 118, 120, 121, 123, 124, 125, 126, 130, 131, 132, 133, 134, 135, 139, 143, 144, 150], "tiffcurrentdirectori": [7, 8, 39, 55, 62, 66, 67, 131], "start": [7, 39, 53, 55, 62, 65, 66, 67, 94, 107, 114, 115, 132, 133, 134, 150, 155, 159, 162, 165], "zero": [7, 8, 12, 16, 27, 28, 32, 33, 34, 39, 43, 51, 55, 57, 59, 60, 62, 65, 66, 76, 92, 93, 94, 95, 97, 99, 101, 103, 105, 108, 109, 110, 114, 120, 121, 124, 125, 126, 130, 132, 134, 135, 139, 140, 143, 147, 155, 158, 159, 160, 162], "tiffcurrentdiroffset": [7, 39, 55, 62, 76, 115], "tifflastdirectori": [7, 39, 55, 62, 66], "tiffnumberofdirectori": [7, 39, 55, 62, 120, 121, 131], "retriev": [7, 8, 39, 42, 65, 83, 95, 103, 127, 144, 147], "awar": [7, 8, 9, 39, 55, 76, 115, 141, 143], "until": [7, 8, 27, 32, 39, 55, 80, 106, 143], "AND": [7, 8, 39, 55, 71], "back": [7, 8, 11, 23, 39, 54, 55, 65, 67, 72, 94, 99, 101, 102, 108, 109, 110, 117, 126, 134], "won": [7, 8, 39, 44, 93, 121], "correct": [7, 8, 39, 44, 66, 68, 76, 78, 80, 81, 89, 90, 93, 94, 95, 103, 108, 109, 111, 113, 114, 120, 124, 128, 130, 131, 132, 133, 134, 135, 143, 159], "tiffcreatecustomdirectori": [8, 62, 118], "infoarrai": [8, 135], "tiffcreateexifdirectori": [8, 62, 118], "tiffcreategpsdirectori": [8, 62], "tiffwritecustomdirectori": [8, 62], "uint64": [8, 108, 114, 115, 121, 129, 139], "pdiroff": 8, "tiffreadcustomdirectori": [8, 62, 108, 109, 130, 135], "toff_t": [8, 23, 44, 62, 67, 92, 115], "diroff": [8, 39], "tiffreadexifdirectori": [8, 62, 106], "tiffreadgpsdirectori": [8, 62], "_tiffgetexiffield": [8, 62], "_tiffgetgpsfield": [8, 62], "exif": [8, 41, 62, 66, 103, 105, 109, 115, 117, 128, 130], "gp": [8, 41, 62, 66, 128, 130], "context": [8, 62, 105], "That": [8, 12, 23, 29, 30, 33, 34, 35, 36, 37, 43, 45, 46, 49, 65, 66, 95, 114, 139, 143, 150, 162], "go": [8, 24, 66, 67, 88, 117, 125, 126, 143, 144, 154], "exififd": 8, "tifftag_exififd": 8, "arbitrari": [8, 62, 66, 67, 119, 143], "tiffreadfield": 8, "accord": [8, 27, 45, 47, 48, 49, 57, 62, 65, 66, 143, 146, 155, 157, 158, 159, 160, 161, 162, 163, 164], "layout": [8, 143, 159], "relev": [8, 21, 140, 154, 155], "hidden": [8, 155], "veri": [8, 44, 62, 66, 76, 79, 90, 93, 94, 104, 117, 141, 143, 145, 150, 155, 156, 159], "nextifd": [8, 67], "unfortun": [8, 69, 90], "schema": 8, "test": [8, 64, 92, 93, 94, 99, 100, 104, 108, 110, 115, 117, 121, 122, 123, 124, 125, 126, 130, 131, 132, 134, 143, 145], "programm": 8, "briefli": 8, "demonstr": [8, 124], "creation": [8, 82, 85, 90], "custom_dir": 8, "custom_dir_exif_231": 8, "easi": [8, 66, 143], "becaus": [8, 23, 27, 32, 33, 34, 37, 39, 45, 46, 47, 48, 49, 62, 65, 66, 67, 93, 94, 95, 107, 108, 115, 117, 132, 133, 135, 140, 143, 150, 155, 158], "side": [8, 23, 66, 94, 128, 159], "hold": [8, 33, 34, 37, 38, 45, 46, 47, 48, 49, 51, 53, 65, 66, 95, 125, 126, 143], "useless": [8, 94, 117, 129, 135], "tiffout1": 8, "tiffout2": 8, "ONE": 8, "object": [8, 23, 62, 65, 87, 115], "address": [8, 90, 93, 121, 128, 129, 132, 133, 134, 139, 143, 159], "lost": [8, 69], "overwritten": [8, 23, 158, 159], "Then": [8, 55], "tidi": 8, "beinclud": 8, "either": [8, 16, 19, 23, 27, 37, 49, 62, 65, 66, 82, 90, 114, 115, 143, 144, 154, 162, 166], "empti": [8, 55, 103, 125], "sequenc": [8, 11, 62, 93, 112, 127, 143, 150, 158, 159], "third": [8, 58, 62, 159, 165], "dummi": [8, 67, 94, 98], "reserv": [8, 139, 143], "final": [8, 23, 62, 66, 96, 110, 114, 137, 138, 143, 159], "lateron": 8, "prevent": [8, 66, 95, 112, 114, 119, 121, 124, 125, 126, 134, 143], "area": [8, 34, 44, 65, 66, 94, 127, 133, 143, 146, 155, 159], "leav": [8, 28, 108, 112], "unus": [8, 28, 95, 112, 115, 120, 121, 129, 133], "tiffout": 8, "tifftag_gpsifd": 8, "dir_offset": 8, "rememb": [8, 21, 94, 108], "dirnum": [8, 39], "beforehand": 8, "somewher": 8, "real": [8, 23, 115, 117, 143], "gpstag_versionid": 8, "gpsversion": 8, "everi": [8, 95, 133, 139, 141, 143], "reload": [8, 143], "origin": [8, 27, 32, 33, 34, 62, 68, 92, 95, 139, 141, 143, 155, 158, 159, 160], "tiffgettaglistcount": [9, 62], "tiffgettaglistentri": [9, 62], "tag_index": 9, "th": [9, 59, 62], "larger": [9, 62, 107, 109, 113, 126, 131, 139, 142, 143, 155, 158, 159], "equal": [9, 17, 19, 27, 32, 54, 114, 120, 135, 139, 143, 157, 159], "0xffffffff": [9, 57, 61, 62], "those": [9, 11, 12, 24, 43, 64, 65, 66, 95, 101, 125, 126, 127, 129, 133, 135, 137, 141, 143, 144, 150, 158, 159], "size": [10, 16, 23, 26, 27, 28, 29, 30, 32, 35, 36, 37, 38, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 62, 65, 66, 76, 87, 89, 90, 93, 94, 95, 96, 97, 98, 99, 102, 103, 105, 108, 109, 112, 113, 114, 115, 117, 118, 120, 121, 122, 124, 125, 126, 127, 130, 131, 133, 139, 140, 141, 143, 145, 150, 151, 154, 155, 156, 158, 159], "occupi": 10, "tiffforcestrilearraywrit": [11, 62, 127], "togeth": [11, 62, 66, 79, 144, 158, 159, 160, 164], "achiev": [11, 143], "Their": [11, 127], "aim": [11, 127, 128], "stripoffset": [11, 28, 31, 42, 49, 60, 62, 103, 115, 124, 125, 126, 139, 140], "tileoffset": [11, 28, 31, 42, 62, 115, 124, 125, 139, 140], "tilebytecount": [11, 31, 42, 62, 125, 127, 139, 140], "purpos": [11, 53, 62, 65, 71, 124, 127, 129, 138, 143], "cloud": [11, 124, 125, 127], "optim": [11, 23, 51, 65, 66, 76, 94, 115, 127, 132, 144, 146], "geotiff": [11, 109, 127], "kb": [11, 127], "potenti": [11, 50, 51, 67, 76, 105, 108, 114, 117, 121, 124, 125, 126, 127, 134, 135, 144], "larg": [11, 29, 30, 33, 34, 35, 36, 37, 38, 51, 66, 92, 95, 108, 114, 115, 117, 121, 122, 124, 127, 131, 134, 141, 143, 150, 156, 159], "strile": [11, 31, 42, 62, 115, 121, 126, 127], "afterward": [11, 23, 124, 127], "precis": [11, 66, 115, 141, 143], "tiffwritecheck": [11, 44, 62, 92, 95, 104], "temporari": [11, 44, 105, 106, 123, 125, 126, 131], "Its": [11, 33, 34], "reset": [11, 39, 57, 62, 67, 94, 112, 114, 121, 124, 132, 134, 138, 143, 162], "other": [11, 23, 27, 28, 32, 33, 34, 41, 52, 62, 63, 68, 79, 80, 89, 90, 92, 94, 95, 96, 106, 108, 109, 114, 115, 117, 121, 122, 124, 125, 126, 128, 133, 134, 135, 138, 141, 142, 144, 145, 154, 158, 159], "end": [11, 44, 46, 49, 50, 62, 95, 108, 115, 121, 125, 132, 134, 135, 139, 143, 146, 147, 162], "success": [11, 23, 24, 27, 31, 39, 40, 42, 49, 51, 60, 100, 108, 115, 116, 126, 134, 159, 166], "stdarg": [12, 21, 40, 43, 65], "fmt": [12, 24, 43], "tifferrorext": [12, 62, 66, 108], "thandle_t": [12, 23, 43, 62], "fd": [12, 23, 25, 43, 126], "tifferrorhandl": 12, "va_list": [12, 21, 24, 40, 43, 126], "ap": [12, 21, 24, 40, 43], "tifferrorhandlerext": 12, "tifferrorhandlerextr": [12, 24, 66], "user_data": [12, 24, 43], "tiffseterrorhandl": [12, 62, 66], "tiffseterrorhandlerext": [12, 62], "invok": [12, 23, 24, 27, 43, 80, 91, 109, 126], "wide": [12, 43, 62, 64, 66, 67, 79, 143, 144, 152, 156, 159], "stderr": [12, 43, 62, 108, 154], "argument": [12, 17, 19, 21, 23, 24, 40, 43, 55, 66, 77, 82, 102, 109, 115, 120, 124, 125, 131, 135, 154, 159], "interpret": [12, 21, 43, 65, 66, 87, 98, 102, 109, 134, 143, 144, 147, 148, 150, 154, 156, 159, 165], "softwar": [12, 23, 43, 52, 54, 55, 63, 64, 65, 66, 68, 69, 70, 71, 72, 140, 141, 143, 144, 145, 154, 156, 159], "detect": [12, 37, 38, 40, 42, 43, 49, 50, 85, 94, 108, 115, 117, 121, 123, 124, 127, 131, 134, 135], "captur": [12, 27, 43, 82], "event": [12, 43, 71], "suppress": [12, 43, 87, 120, 124, 155, 158, 159], "tif_clientdata": [12, 43], "repres": [12, 23, 43, 53, 62, 101, 115, 139, 143, 150, 159], "descriptor": [12, 23, 43, 55, 62, 105, 140], "per": [12, 17, 19, 23, 24, 28, 37, 42, 43, 49, 56, 62, 65, 66, 77, 80, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 114, 117, 124, 127, 131, 140, 143, 144, 147, 149, 151, 153, 155, 156, 158, 159], "entrant": [12, 23, 24, 43, 62, 66, 131], "mean": [12, 21, 40, 43, 66, 77, 82, 90, 93, 140, 143, 147, 158], "tiffopenext": [12, 23, 24, 43, 62, 66, 131], "tiffopenwext": [12, 23, 43, 62, 131], "tifffdopenext": [12, 23, 43, 62, 131], "tiffclientopenext": [12, 23, 43, 62, 131], "furthermor": [12, 24, 43, 66, 143, 144], "along": [12, 24, 43, 64, 95, 104], "pleas": [12, 43, 65, 66, 69, 70, 90, 93, 115, 117, 122, 135], "refer": [12, 23, 27, 43, 53, 62, 65, 66, 67, 140, 141, 144, 159], "attempt": [12, 23, 29, 30, 37, 38, 43, 49, 66, 93, 94, 99, 108, 109, 117, 124, 126, 130, 143, 146, 147, 158, 159, 164], "onward": [12, 43], "stop": [12, 43, 162], "fip": [13, 14, 15, 16, 17, 18, 19], "tifffindfield": [13, 14, 15, 16, 17, 18, 19, 62], "tifffieldwithtag": [13, 14, 15, 16, 17, 18, 19, 62, 115], "tifffieldwithnam": [13, 14, 15, 16, 17, 18, 19, 62, 115], "enum": 13, "textual": 14, "nonzero": [15, 16, 98, 143], "report": [15, 64, 70, 92, 93, 94, 95, 96, 97, 98, 99, 105, 106, 108, 109, 112, 114, 117, 119, 124, 125, 126, 128, 132, 133, 157, 159, 162], "distinct": [15, 89, 143, 144], "determin": [15, 49, 65, 93, 95, 96, 133, 137, 143, 148, 154, 159], "tifffieldsetgetcounts": [15, 16, 62], "dt": 16, "tifffieldsetgets": [16, 62, 130], "tiff_ani": 16, "auto": [16, 62, 108, 121, 155, 159], "registr": [16, 117], "Such": [16, 67, 144], "could": [16, 23, 78, 90, 93, 95, 124, 125, 126, 131, 137, 141, 143], "twice": [16, 135, 143, 147], "rare": [16, 67, 115, 124], "tifftag_xclippathunit": 16, "statu": [16, 55, 66, 94, 105, 111, 137, 138, 140], "float": [16, 21, 40, 53, 58, 62, 65, 83, 102, 103, 109, 112, 114, 123, 124, 125, 126, 130, 131, 150, 158, 159], "doubl": [16, 21, 40, 58, 61, 62, 83, 101, 102, 104, 107, 108, 121, 125, 126, 135, 150], "would": [16, 27, 44, 56, 57, 59, 61, 62, 66, 68, 79, 95, 113, 114, 128, 143, 154, 158, 159], "8": [16, 23, 27, 28, 32, 33, 34, 40, 45, 46, 49, 51, 57, 62, 63, 64, 65, 66, 67, 74, 75, 79, 108, 109, 111, 114, 115, 117, 121, 123, 124, 126, 130, 131, 135, 139, 140, 143, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 158, 159, 160, 162, 164], "small": [17, 19, 64, 70, 106, 117, 134, 143, 145, 155], "posit": [17, 19, 23, 28, 32, 62, 95, 101, 124, 126, 134, 147, 159], "pixel": [17, 19, 27, 32, 33, 34, 44, 53, 56, 59, 62, 66, 67, 79, 87, 94, 114, 117, 123, 124, 126, 129, 140, 143, 144, 147, 150, 151, 152, 154, 155, 156, 157, 158, 159, 164], "numer": [18, 141, 155, 159, 161], "export": [18, 130, 132, 135, 145], "tifftag_imagewidth": [18, 21, 33, 40, 66, 67], "modern": [19, 122], "practic": [19, 65, 94, 124, 133, 143], "tiffflushdata": [20, 62], "tiffvgetfield": [21, 62, 96], "tiffgetfielddefault": [21, 53, 62, 66, 114], "tiffvgetfielddefault": [21, 62, 124], "whose": [21, 23, 28, 40, 62, 66, 77, 117, 124, 126, 132, 135, 144, 158], "underli": [21, 23, 40, 55, 66, 95, 125], "request": [21, 23, 24, 26, 27, 32, 37, 62, 64, 65, 66, 69, 73, 117, 121, 122, 124, 134, 138, 147, 162], "prescrib": [21, 40], "layer": [21, 40, 62, 66, 95, 143], "ident": [21, 58, 62, 83, 143], "understood": [21, 40, 138, 143, 158, 159], "correspond": [21, 40, 129, 143, 147], "industri": [21, 141], "tifftag_artist": [21, 40], "tifftag_badfaxlin": [21, 40], "tifftag_bitspersampl": [21, 40, 67, 95, 114], "tifftag_cleanfaxdata": [21, 40], "tifftag_colormap": [21, 40], "bitspersampl": [21, 23, 27, 28, 32, 33, 34, 40, 45, 46, 49, 57, 62, 101, 114, 121, 125, 140, 143, 156, 157, 162], "tifftag_compress": [21, 40, 95, 131], "tifftag_consecutivebadfaxlin": [21, 40], "tifftag_copyright": [21, 40, 94], "tifftag_datatyp": 21, "tifftag_datetim": [21, 40], "tifftag_documentnam": [21, 40], "tifftag_dotrang": [21, 40, 106, 114], "tifftag_extrasampl": [21, 40, 101], "tifftag_faxfillfunc": [21, 40, 62, 135], "tifffaxfillfunc": [21, 40], "tifftag_fillord": [21, 40], "tifftag_group3opt": [21, 40, 117, 121], "tifftag_group4opt": [21, 40, 117, 121], "tifftag_halftonehint": [21, 40, 106, 114], "tifftag_hostcomput": [21, 40], "tifftag_iccprofil": [21, 40, 106], "profil": [21, 40, 65, 140], "tifftag_imagedepth": [21, 40], "tifftag_imagedescript": [21, 40], "tifftag_imagelength": [21, 40, 66, 67], "tifftag_inknam": [21, 40, 121, 131], "tifftag_inkset": [21, 40], "tifftag_jpegcolormod": [21, 40, 62, 109], "tifftag_jpegqu": [21, 40, 62], "tifftag_jpegt": [21, 40, 95, 101, 109, 124], "tifftag_jpegtablesmod": [21, 40, 62], "tifftag_mak": [21, 40], "tifftag_matt": [21, 40], "tifftag_maxsamplevalu": [21, 40], "tifftag_minsamplevalu": [21, 40], "tifftag_model": [21, 40], "tifftag_orient": [21, 40], "tifftag_pagenam": [21, 40], "tifftag_pagenumb": [21, 40, 106, 114], "tifftag_photometr": [21, 40, 67, 95], "tifftag_photoshop": [21, 40, 62, 88, 94, 106], "tifftag_planarconfig": [21, 40, 66], "tifftag_predictor": [21, 40], "tifftag_primarychromat": [21, 40], "tifftag_referenceblackwhit": [21, 40, 53, 112, 134], "tifftag_resolutionunit": [21, 40], "tifftag_richtiffiptc": [21, 40, 101, 106], "tifftag_rowsperstrip": [21, 33, 40], "tifftag_sampleformat": [21, 40, 92, 93], "tifftag_smaxsamplevalu": [21, 40, 111], "tifftag_sminsamplevalu": [21, 40, 111], "tifftag_softwar": [21, 40], "tifftag_stonit": [21, 40], "tifftag_stripbytecount": [21, 66, 115, 130, 135], "tifftag_stripoffset": [21, 115, 130], "tifftag_subfiletyp": [21, 40, 67], "tifftag_subifd": [21, 40, 67, 97, 101], "tifftag_targetprint": [21, 40], "tifftag_threshhold": [21, 40], "tifftag_tilebytecount": [21, 115, 135], "tifftag_tiledepth": [21, 40], "tifftag_tilelength": [21, 34, 40, 66, 135], "tifftag_tileoffset": [21, 115], "tifftag_tilewidth": [21, 34, 40, 66], "tifftag_transferfunct": [21, 40, 121], "tifftag_whitepoint": [21, 40, 53], "tifftag_xmlpacket": [21, 40, 106], "tifftag_xposit": [21, 40], "tifftag_xresolut": [21, 40, 121], "tifftag_ycbcrcoeffici": [21, 40, 53], "tifftag_ycbcrposit": [21, 40], "tifftag_ycbcrsubsampl": [21, 95, 106, 114], "tifftag_yposit": [21, 40], "tifftag_yresolut": [21, 40, 121], "quit": [21, 40, 143], "complex": [21, 40, 65, 95, 104, 141, 144], "icc": [21, 40, 65, 87, 131, 140, 150, 154], "annex": [21, 40, 65], "embed": [21, 40, 65, 141, 142, 143], "color": [21, 25, 40, 53, 62, 65, 66, 83, 94, 95, 96, 102, 108, 110, 113, 114, 115, 124, 140, 143, 145, 148, 150, 151, 153, 154, 155, 156, 159, 162, 163, 164], "explan": [21, 40], "unsupport": [21, 64, 80, 102, 106, 124], "still": [21, 64, 69, 89, 90, 105, 109, 114, 115, 120, 121, 128, 129, 132, 133, 139, 141, 143], "know": [21, 66, 69, 93, 115, 128, 143, 150, 159], "long": [21, 25, 53, 58, 62, 72, 79, 95, 101, 114, 116, 117, 122, 127, 131, 132, 133, 139, 140, 143, 146, 150, 155], "33424": 21, "36867": [21, 140], "0x": [21, 23, 28, 161, 162, 163], "tifffieldinfo": [22, 94, 112, 115, 134], "brief": [22, 41, 66, 137], "element": [22, 143, 159], "tiffffieldinfo": 22, "filenam": [23, 62, 65, 67, 101, 108, 158, 159, 165], "mode": [23, 42, 55, 62, 80, 89, 93, 94, 95, 96, 98, 101, 103, 105, 108, 110, 114, 117, 121, 124, 125, 126, 127, 128, 130, 131, 132, 133, 135], "tiffopenw": [23, 62, 101, 102, 105], "wchar_t": 23, "tifffdopen": [23, 55, 62, 98], "opt": [23, 24, 66, 101, 103, 109, 126, 128], "tiffsetfilenam": [23, 62], "tiffsetfileno": [23, 62], "tiffsetmod": [23, 62], "tmsize_t": [23, 24, 29, 30, 31, 35, 36, 38, 45, 46, 47, 48, 50, 51, 54, 56, 57, 58, 59, 60, 62, 66, 115, 121, 124], "tiffreadwriteproc": [23, 26], "tiffseekproc": [23, 26], "tiffcloseproc": [23, 26], "tiffsizeproc": [23, 26], "tiffmapfileproc": [23, 26], "tiffunmapfileproc": [23, 26], "tiffclientopen": [23, 62, 93, 94, 95, 98, 101, 109, 115, 117], "clientdata": [23, 62], "readproc": 23, "writeproc": 23, "seekproc": 23, "closeproc": 23, "sizeproc": 23, "mapproc": [23, 135], "unmapproc": [23, 135], "tiffclientdata": [23, 62], "tiffsetclientdata": [23, 62], "newvalu": 23, "subsequ": [23, 66, 94, 132, 143], "w": [23, 27, 32, 33, 34, 62, 66, 67, 94, 102, 135, 140, 145, 146, 147, 150, 152, 154, 155, 158, 159, 162, 163], "certain": [23, 28, 49, 65, 76, 87, 115, 120, 143], "aspect": [23, 87, 94], "revis": [23, 62, 82, 109, 131, 137, 140, 143, 157, 158, 159, 161, 162, 163], "threshhold": [23, 140], "bilevel": [23, 27, 32, 33, 34, 62, 66, 140, 145, 154, 155, 158, 159, 160], "art": 23, "scan": [23, 115, 121, 126, 130, 134, 135, 143, 159], "fillord": [23, 29, 30, 37, 38, 140, 158, 159, 160, 162], "signific": [23, 55, 62, 68, 98, 108, 109, 111, 128, 129, 130, 131, 132, 133, 134, 135, 143, 144, 147], "orient": [23, 27, 32, 65, 77, 95, 96, 98, 114, 130, 135, 140, 147, 159, 162], "0th": 23, "row": [23, 33, 34, 37, 49, 55, 56, 57, 59, 62, 65, 66, 78, 93, 126, 134, 135, 143, 144, 147, 148, 149, 151, 153, 156, 158, 159, 160, 164], "column": [23, 99, 143, 159], "rowsperstrip": [23, 33, 37, 45, 47, 49, 57, 66, 93, 95, 105, 107, 109, 125, 126, 140, 143], "resolutionunit": [23, 105, 140], "inch": [23, 95, 109, 140, 146, 147, 149, 154, 155, 159], "alter": [23, 28, 49, 66, 92, 95, 109, 133, 153, 158, 159], "unicod": [23, 62], "even": [23, 55, 67, 68, 73, 80, 94, 114, 115, 119, 121, 124, 126, 137, 143, 155, 159], "permiss": [23, 71, 143], "partial": [23, 33, 44, 67, 108, 121, 126, 135], "random": [23, 37, 49, 62, 66, 94, 143], "limit": [23, 24, 62, 65, 66, 71, 121, 122, 125, 126, 128, 129, 130, 131, 139, 154, 155, 156, 158, 159], "straight": [23, 24, 27, 121], "overwrit": [23, 62, 66, 134, 135, 158], "collect": [23, 62, 64, 65, 144, 145], "\u00e0": [23, 66, 77], "la": [23, 66, 77], "lseek": 23, "map": [23, 26, 27, 32, 33, 34, 62, 65, 78, 80, 87, 90, 94, 124, 125, 126, 130, 131, 132, 141, 152, 158, 159, 164], "unmap": [23, 26, 62], "mmap": [23, 65, 93, 94, 98, 126], "munmap": [23, 98], "opaqu": [23, 24, 62, 66, 119], "contrast": [23, 140, 152], "_tiffmapproc": 23, "_tiffunmapproc": 23, "libtif": [23, 94], "wherea": [23, 114, 124, 159], "changeabl": 23, "flag": [23, 25, 42, 80, 93, 94, 98, 103, 107, 109, 111, 127, 131, 132, 134, 156], "right": [23, 32, 66, 79, 112, 114, 143, 145, 150, 159, 162], "l": [23, 53, 62, 80, 81, 95, 96, 143, 147, 150, 154, 155, 157, 158, 159, 162], "endian": [23, 62, 65, 66, 80, 98, 99, 102, 103, 109, 128, 130, 135, 158, 159], "nativ": [23, 29, 30, 37, 38, 45, 46, 49, 65, 66, 76, 78, 80, 87, 109, 115, 135], "cpu": [23, 65, 66, 76, 80, 102, 126], "big": [23, 62, 65, 66, 80, 98, 99, 102, 109, 115, 117, 125, 128, 130, 133, 158, 159], "treat": [23, 28, 62, 80, 143, 147], "least": [23, 29, 30, 35, 36, 44, 51, 62, 66, 121, 122, 134, 137, 147, 159], "lsb": [23, 62, 140, 147, 162], "msb": [23, 62, 140, 143, 147, 162], "opposit": [23, 29, 30, 37, 38, 62, 80, 94], "incept": 23, "cannot": [23, 27, 28, 40, 41, 44, 49, 52, 111, 128, 132, 135, 137, 143, 159, 162], "fallback": 23, "chop": [23, 28, 80, 87, 93, 95, 126, 128, 133, 158, 159, 163], "compris": [23, 28], "uncompress": [23, 28, 49, 57, 66, 115, 126, 147, 154, 158, 159], "kilobyt": [23, 28, 51, 57, 115, 147, 148, 149, 150, 151, 153, 156, 158, 159, 164], "amount": [23, 95, 125, 137, 143, 150, 155], "entireti": [23, 65], "divid": [23, 56, 121, 124, 125, 143, 159], "though": [23, 55, 79, 109, 115, 133, 137, 143, 159], "configur": [23, 52, 62, 140, 148, 150, 154, 156, 158, 159], "backward": [23, 115, 121, 137, 141], "broken": [23, 66, 79, 95, 98, 101, 102, 103, 105, 112, 131, 143], "proce": 23, "defer": [23, 42, 115, 127], "bytecount": [23, 42, 62, 125, 126, 127, 139], "demand": [23, 90], "impli": [23, 42, 71, 90, 127, 133, 143, 155], "compliant": [23, 126], "reader": [23, 45, 46, 49, 66, 112, 117, 139, 143, 144], "capabl": [23, 33, 34, 42, 66, 76, 117, 127, 129, 131, 140, 143, 145], "nonetheless": [23, 143], "claim": [23, 143, 145], "incap": 23, "notori": 23, "intel": [23, 65], "conform": [23, 54, 59, 66, 109, 147], "wb": 23, "wl": 23, "bad": [23, 28, 40, 95, 101, 113, 114, 121, 135, 143, 147], "unabl": [23, 28, 51, 52, 82, 95, 155], "occur": [23, 28, 44, 47, 48, 51, 57, 59, 109, 112, 125, 126, 133, 143, 166], "Not": [23, 159], "magic": [23, 96, 150, 161], "hex": 23, "0x4d4d": 23, "0x4949": 23, "42": [23, 139], "decim": [23, 139, 161], "tiffopenoptionsalloc": [24, 62, 66, 131], "tiffopenoptionsfre": [24, 62, 66, 131], "tiffopenoptionssetmaxsinglememalloc": [24, 62, 66, 131, 134], "max_single_mem_alloc": 24, "tiffopenoptionssetmaxcumulatedmemalloc": [24, 62, 66, 134], "max_cumulated_mem_alloc": 24, "tiffopenoptionsseterrorhandlerextr": [24, 62, 66, 131], "errorhandler_user_data": 24, "tiffopenoptionssetwarninghandlerextr": [24, 62, 66, 131], "warnhandler_user_data": 24, "tiffopenoptionssetwarnaboutunknowntag": [24, 135], "warn_about_unknown_tag": 24, "ext": [24, 125], "maximum": [24, 33, 62, 66, 87, 95, 122, 126, 130, 134, 143, 155, 156, 158, 159, 162], "_tiffmalloc": [24, 53, 54, 62, 66, 121, 124], "_tiffrealloc": [24, 54, 62, 66, 98], "appli": [24, 40, 89, 92, 93, 94, 95, 99, 102, 104, 108, 112, 114, 115, 121, 124, 125, 126, 132, 134, 138, 139, 141, 143, 145, 148, 152, 159, 164], "cumul": [24, 62, 66, 134], "7": [24, 62, 64, 65, 74, 75, 95, 105, 108, 111, 117, 119, 125, 138, 139, 140, 143, 147, 159], "earlier": [24, 76, 128], "myerrorhandleruserdatastruct": 24, "myerrorhandl": 24, "256": [24, 53, 66, 130, 140, 161, 164], "1024": [24, 27, 66, 117], "foo": [24, 65, 66, 155], "bitwis": [25, 120], "tiffprint_non": 25, "0x0": 25, "extra": [25, 67, 94, 95, 112, 116, 124, 125, 129, 135, 143], "tiffprint_strip": 25, "0x1": 25, "tiffprint_curv": 25, "0x2": 25, "grai": [25, 163], "respons": [25, 52, 53, 73, 90, 95, 101, 126, 137, 143, 144, 163], "curv": [25, 152, 163], "tiffprint_colormap": 25, "0x4": 25, "tiffprint_jpegqt": 25, "0x100": 25, "q": [25, 109, 154], "matric": 25, "tiffprint_jpegact": 25, "0x200": 25, "ac": [25, 65, 101, 102, 103, 109, 114, 121, 122, 123, 133, 134, 135, 143], "tiffprint_jpegdct": 25, "tiffgetcloseproc": [26, 62], "tiffgetmapfileproc": [26, 62], "tiffgetreadproc": [26, 62], "tiffgetseekproc": [26, 62], "tiffgetsizeproc": [26, 62], "tiffgetunmapfileproc": [26, 62], "tiffgetwriteproc": [26, 62], "seek": [26, 28, 62, 65, 92, 94, 112, 121, 126, 131, 132, 134, 141], "tiffrgbvalu": [27, 53], "_tiffrgbaimag": 27, "tiffrgbaimageok": [27, 62, 95, 121, 124, 135], "emsg": [27, 66], "tiffrgbaimagebegin": [27, 62, 66, 95, 102, 124, 125], "img": [27, 53, 66], "stoponerror": [27, 32], "tiffrgbaimageget": [27, 62, 66], "width": [27, 32, 33, 34, 45, 46, 47, 48, 49, 59, 62, 66, 78, 79, 92, 103, 106, 121, 124, 125, 132, 133, 134, 140, 143, 144, 146, 147, 150, 152, 154, 155, 158, 159], "height": [27, 32, 34, 56, 59, 62, 66, 79, 92, 95, 106, 121, 126, 133, 140, 143, 146, 150, 152, 154, 155, 159], "tiffrgbaimageend": [27, 62, 66], "high": [27, 62, 65, 66, 83, 115, 117, 126, 141, 143, 152, 159], "varieti": [27, 52, 63, 66, 92, 141, 144, 156, 159], "characterist": [27, 63, 66, 139, 144, 149, 150, 158, 159, 162], "photometr": [27, 32, 33, 34, 95, 98, 109, 121, 124, 150, 154, 156, 159, 165], "encapsul": [27, 66, 155], "quickli": [27, 141], "target": [27, 89, 90, 92, 93, 95, 114, 117, 122, 123, 128, 130, 133, 135, 159], "manipul": [27, 64, 66, 109, 143, 144, 145, 159], "enough": [27, 29, 33, 34, 37, 38, 44, 45, 46, 47, 48, 49, 51, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 134], "made": [27, 28, 37, 49, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 141, 143], "less": [27, 32, 66, 135, 143], "dimens": [27, 32, 47, 48, 66, 113, 117, 121, 140, 143, 146, 151, 154, 155, 158, 159], "smaller": [27, 32, 76, 108, 126, 139, 159], "crop": [27, 32, 109, 132, 145, 159], "bound": [27, 32, 57, 59, 78, 87, 92, 117, 120, 124, 125, 126, 134, 135], "greater": [27, 32, 37, 45, 46, 49, 51, 95, 99, 143, 148, 154, 155, 162], "lower": [27, 32, 33, 34, 143, 159], "organ": [27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 45, 46, 47, 48, 49, 50, 55, 57, 59, 62, 65, 66, 140, 141, 144, 148, 156, 158, 159, 162], "y": [27, 30, 32, 33, 34, 36, 38, 46, 50, 53, 59, 62, 66, 87, 95, 131, 140, 143, 146, 149, 154, 155, 159], "corner": [27, 32, 33, 34, 159], "pack": [27, 32, 33, 34, 37, 38, 49, 56, 62, 66, 140, 148, 149, 150, 158, 159], "red": [27, 32, 33, 34, 53, 134, 153, 156], "green": [27, 32, 33, 34, 53, 153, 156], "blue": [27, 32, 33, 34, 53, 134, 153, 156], "tiffgetr": [27, 32, 33, 34], "tiffgetg": [27, 32, 33, 34], "tiffgetb": [27, 32, 33, 34], "tiffgeta": [27, 32, 33, 34], "mat": [27, 32, 33, 34], "255": [27, 32, 33, 34, 53, 140, 143, 148, 162], "scale": [27, 32, 87, 94, 106, 120, 143, 146, 155, 159], "palett": [27, 32, 33, 34, 130, 140, 143, 145, 148, 153, 155, 159, 162, 164], "grayscal": [27, 32, 33, 34, 98, 140, 143, 145, 154, 159], "cmyk": [27, 32, 65, 66, 94, 118, 140, 143, 150, 154, 155], "ycbcr": [27, 32, 37, 49, 53, 62, 65, 66, 76, 84, 93, 96, 98, 101, 105, 106, 109, 112, 114, 121, 124, 128, 134, 140, 145, 150, 151, 154, 162], "rgb": [27, 32, 33, 34, 53, 62, 66, 76, 96, 98, 101, 102, 109, 121, 124, 134, 140, 143, 145, 148, 149, 150, 151, 153, 154, 155, 156, 159, 162, 164], "transpar": [27, 32, 143], "uncorrect": [27, 32], "colorimetri": [27, 32, 53, 65, 140], "act": [27, 32, 39], "termin": [27, 32, 40, 65, 87, 112, 117, 121, 124, 134, 157, 158, 159, 160], "continu": [27, 32, 115, 117, 143, 146, 155, 158, 159], "put": [27, 66, 89, 95, 109, 124, 154], "abgr": [27, 32, 62, 66], "physic": [27, 66, 144], "planarconfigur": [27, 29, 30, 35, 36, 37, 38, 45, 46, 47, 48, 49, 50, 57, 59, 104, 135, 140, 149, 150, 162], "putcontiganddraw": 27, "int32_t": [27, 53, 62, 65, 133], "fromskew": [27, 126], "toskew": 27, "cp": 27, "putcontig": 27, "orientation_topleft": [27, 32], "lrectwrit": 27, "els": [27, 66, 143], "commonli": [27, 117], "flavor": [27, 66], "involv": [27, 108, 116, 123], "16": [27, 29, 30, 32, 33, 34, 37, 38, 40, 54, 58, 59, 62, 65, 66, 77, 79, 86, 87, 90, 93, 109, 123, 127, 128, 131, 139, 140, 143, 148, 150, 159, 162], "colorimetr": [27, 66], "minu": [27, 159], "extrasampl": [27, 95, 109, 124, 126, 140, 143], "appear": [27, 62, 66, 71, 79, 90, 95, 103, 140, 143, 147, 158, 159, 164], "incorrectli": [27, 79, 134, 140, 159], "tiffreadrgbaimageori": [27, 32, 62, 95, 135], "mirror": [27, 109, 138, 145, 159], "across": [27, 159], "ax": 27, "rotat": [27, 95, 108, 109, 121, 132, 145, 155, 159], "therefor": [27, 66, 138, 143], "lefttop": [27, 135], "leftbottom": [27, 135], "90": [27, 94, 108, 152, 155, 159], "degre": [27, 95, 155, 159], "exchang": [27, 141], "channel": [27, 32, 33, 34, 80, 101, 102, 103, 121, 143, 144, 153, 160], "represent": [27, 115], "unassoci": [27, 66, 109], "premultipli": 27, "multipli": [27, 56], "tiffreadxxx": 27, "sorri": [27, 32, 33, 34], "pictur": [27, 32, 33, 34, 143], "had": [27, 28, 32, 33, 34, 65, 66, 95, 108, 109, 121, 124, 134, 147], "did": [27, 32, 33, 34, 52, 90, 143], "No": [27, 32, 33, 34, 45, 46, 47, 48, 49, 51, 52, 53, 98, 99, 100, 109, 119, 135, 143, 159], "min": [27, 32, 33, 34, 140, 149, 162, 165], "convers": [27, 32, 33, 34, 53, 62, 66, 76, 92, 94, 95, 96, 102, 108, 109, 113, 114, 125, 126, 134, 143, 155, 159], "insuffici": [27, 32, 33, 34], "combin": [27, 32, 33, 34, 62, 140, 150, 153, 156, 158, 159], "stripchop_support": 28, "were": [28, 29, 30, 35, 36, 64, 66, 68, 69, 76, 79, 80, 81, 82, 85, 86, 87, 89, 94, 95, 97, 108, 110, 113, 122, 124, 133, 134, 135, 138, 143, 158], "approxim": [28, 57, 143, 148, 149, 151, 153, 156], "visibl": [28, 143], "tiffnumberofstrip": [28, 57, 62, 66, 98, 124, 125], "tiffnumberoftil": [28, 59, 62, 66], "wrong": [28, 89, 95, 98, 101, 102, 105, 106, 107, 110, 112, 113, 114, 124, 125, 126, 134, 150], "incorrect": [28, 101, 105, 109, 121, 126, 130, 132, 135, 162], "imagedescript": [28, 103, 140, 143], "ration": 28, "denomin": [28, 134], "lu": 28, "ignor": [28, 66, 77, 94, 96, 103, 108, 115, 120, 125, 126, 133, 140, 143, 157, 158, 159, 162], "subfiletyp": [28, 67, 140], "mismatch": [28, 95, 98, 108], "got": 28, "agre": [28, 143], "happen": [28, 61, 62, 105, 124, 125, 143], "refus": [28, 121, 159], "invalid": [28, 40, 66, 76, 112, 121, 124, 125, 126, 147], "ascend": 28, "properli": [28, 44, 53, 62, 66, 78, 80, 81, 87, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 105, 106, 108, 109, 114, 115, 119, 125, 126, 127, 128, 143, 144], "fatal": [28, 126, 158, 159], "imagelength": [28, 45, 47, 49, 59, 66, 79, 107, 140, 143], "violat": [28, 143], "recov": [28, 93, 146], "planarconfig": [28, 65, 107, 109, 126, 131, 134, 148], "calcul": [28, 37, 49, 53, 55, 57, 59, 66, 76, 79, 95, 96, 103, 105, 107, 109, 114, 117, 118, 120, 121, 128, 140, 150, 152, 159], "estim": [28, 57, 87, 93, 102], "bogu": [28, 103, 114, 117, 121, 145], "vendor": [28, 66, 141], "unspecifi": [28, 40, 120, 125], "multi": [28, 39, 44, 62, 64, 81, 87, 94, 112, 132, 134, 135, 139, 143, 144, 145, 146, 155, 158, 159, 166], "page": [28, 33, 34, 39, 44, 62, 64, 69, 79, 80, 82, 87, 89, 90, 94, 95, 96, 101, 102, 106, 112, 113, 114, 121, 126, 131, 132, 135, 137, 138, 139, 143, 144, 146, 147, 152, 154, 155, 159, 165, 166], "buf": [29, 30, 35, 36, 37, 38, 45, 46, 47, 48, 49, 50, 66, 121], "decompress": [29, 30, 31, 37, 38, 42, 62, 65, 66, 89, 90, 94, 109, 117, 126, 127, 128, 135, 154, 157, 158, 163], "raw": [29, 30, 35, 36, 45, 46, 47, 48, 51, 57, 62, 65, 66, 76, 92, 95, 126, 128, 143, 145, 147, 150, 159], "account": [29, 30, 35, 36, 45, 46, 93, 107, 115, 135, 150], "plane": [29, 30, 35, 36, 37, 38, 45, 46, 49, 50, 56, 57, 59, 65, 66, 158, 159], "tiffstrips": [29, 35, 57, 62, 66], "hide": [29, 30, 37, 38, 49, 54, 65], "revers": [29, 30, 31, 37, 38, 58, 62, 96, 130], "tiffcomputetil": [30, 36, 46, 59, 62, 96], "z": [30, 36, 38, 46, 50, 53, 59, 62, 66, 87, 95, 121, 131, 140, 147, 154, 155, 157, 159, 162, 163], "coordin": [30, 36, 38, 46, 50, 57, 59, 94, 159], "quadrupl": [30, 36, 46], "tifftiles": [30, 36, 38, 50, 59, 62, 66, 115], "inbuf": 31, "insiz": 31, "outbuf": 31, "outsiz": [31, 124], "input": [31, 62, 73, 79, 94, 95, 98, 103, 106, 107, 112, 114, 117, 118, 119, 121, 124, 125, 126, 127, 132, 134, 135, 139, 147, 148, 149, 150, 152, 153, 154, 155, 156, 158, 159, 160, 162, 163, 164, 166], "he": [31, 94, 127], "writabl": [31, 44, 62, 98], "0xff": [32, 123], "24": [32, 76, 87, 94, 96, 103, 124, 135, 140, 155, 159, 161, 162], "raster": [32, 33, 34, 56, 62, 65, 66, 76, 95, 120, 129, 131, 135, 141, 146], "four": [32, 94, 141, 143, 156, 159], "orientation_topright": 32, "orientation_botleft": 32, "bottom": [32, 33, 34, 65, 66, 95, 109, 143, 155, 159, 162], "orientation_botright": 32, "choos": [32, 101, 115], "iffreadrgbaimag": 32, "wrapper": [32, 33, 34, 122], "around": [32, 33, 34, 80, 95, 101, 109, 116, 118, 141, 143], "tiffrgbimag": [32, 33, 34], "tiffreadrgbastripext": [33, 62, 125, 126], "stop_on_error": [33, 34, 62, 125], "rgba": [33, 34, 62, 79, 94, 95, 106, 114, 119, 134, 145, 156], "last": [33, 52, 55, 62, 66, 67, 81, 93, 95, 108, 110, 114, 126, 132, 134, 135, 139, 143, 144, 147, 159, 162], "begin": [33, 53, 65, 79, 125, 139, 143], "advantag": [33, 34, 66], "fp": [33, 45, 58], "tiffreadrgbatileext": [34, 62, 125, 126, 131], "col": [34, 134, 159], "tilewidth": [34, 45, 46, 47, 48, 49, 59, 62, 66, 77, 121, 140, 143], "tilelength": [34, 45, 46, 47, 48, 49, 59, 62, 66, 77, 140, 143], "edg": [34, 143, 155, 159], "partli": 34, "fall": [34, 143], "entir": [37, 38, 49, 50, 65, 66, 95, 113, 147, 155, 158, 159], "scanlin": [37, 45, 47, 49, 51, 56, 62, 65, 95, 105, 109, 112, 114, 117, 128, 134, 135, 146, 147, 157, 158, 159, 160, 164], "tiffscanlines": [37, 56, 62, 66, 107, 115], "sequenti": [37, 49, 66, 143], "form": [37, 49, 62, 66, 86, 115, 133, 135, 144, 146, 156], "subsampl": [37, 49, 56, 67, 105, 107, 109, 112, 114, 121, 124, 126, 143], "basi": [37, 49, 62, 80, 141, 157], "unpack": 37, "interleav": [37, 49, 65, 108, 114, 143, 150, 159], "deeper": [38, 50, 59], "slice": [38, 50, 59, 66], "imagedepth": [38, 50, 59, 140], "tiffsetsubdirectori": [39, 55, 62, 67, 115, 132, 135], "subifd": [39, 55, 67, 115, 126, 131, 132, 139, 140, 145, 152, 155], "index": [39, 55, 62, 66, 92, 93, 95, 115, 117, 134, 140, 162], "subdirectori": [39, 55, 88, 124], "multipag": [39, 106, 159], "fetch": [39, 44, 65, 66, 95, 101, 103, 106, 109, 116, 121, 130, 150], "tiffvsetfield": [40, 62], "tiffunsetfield": [40, 62], "clear": [40, 62, 93, 109, 115, 131, 135, 137, 143], "tifftag_ycbcrsampl": 40, "restrict": [40, 62, 115, 126, 143, 144, 159], "affect": [40, 44, 120, 124, 126, 147, 148, 155], "tiffgetstrilebytecount": [42, 62, 127], "tiffgetstrileoffset": [42, 62, 127], "tiffgetstrilebytecountwitherr": [42, 62, 127], "pberr": 42, "tiffgetstrileoffsetwitherr": [42, 62, 127], "commit": [42, 114, 127, 128, 129, 130, 131, 132, 133, 134, 135], "met": [42, 127], "ddefer_strile_load": [42, 127], "speed": [42, 65, 108, 127, 128, 130, 135, 140, 146], "interest": [42, 65, 115, 127, 137, 159], "ondemand": [42, 127], "api": [42, 66, 89, 95, 102, 115, 117, 122, 123, 127, 131, 132, 133, 134, 135, 137], "spars": [42, 127, 130], "addition": [42, 62, 67], "tiffwarningext": [43, 62, 66, 108], "tiffwarninghandl": 43, "tiffwarninghandlerext": 43, "tiffwarninghandlerextr": [43, 66], "tiffsetwarninghandl": [43, 62, 66], "tiffsetwarninghandlerext": [43, 62], "tiffrewritedirectori": [44, 62, 94, 95, 130], "tiffsetwriteoffset": [44, 62, 135], "similarli": [44, 49, 62, 125, 126], "establish": [44, 62, 108, 143], "rewrit": [44, 60, 62, 90, 115, 119, 121, 124, 130, 143], "grown": [44, 45, 47, 90], "preced": [44, 143, 161], "particularli": [44, 143, 161], "import": [44, 65, 66, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 130, 143, 144], "fit": [44, 68, 71, 126, 129, 145, 154, 155, 159], "what": [44, 54, 66, 117, 125, 126, 162], "readabl": [44, 62, 87, 132, 155], "worst": [44, 158], "incomplet": [44, 68, 98], "finish": 44, "cleanli": [44, 125], "carefulli": 44, "verifi": [44, 62, 69, 79], "freez": 44, "post": [44, 72, 114, 140], "indirect": [44, 71, 87, 161], "front": 44, "dynam": [45, 47, 49, 51, 54, 62, 65, 66, 79, 95, 108, 114, 131], "prior": [45, 47, 71, 79, 86], "neither": [46, 48], "rang": [47, 48, 49, 53, 57, 59, 61, 62, 65, 117, 121, 122, 125, 128, 135, 141, 143, 144, 152, 159, 166], "max": [47, 48, 49, 121, 124, 125, 131], "host": [49, 55, 66, 114, 120, 125, 126, 130, 146], "past": [49, 65, 68, 73, 108, 125], "enlarg": [49, 121, 134], "tiffistil": [49, 55, 62], "immedi": [49, 158, 161], "growth": 49, "contigu": [49, 66, 103, 104, 135, 148, 156, 162], "manner": [49, 66], "tiffreadbuffersetup": [51, 62, 77, 121, 125], "tiffwritebuffersetup": [51, 62, 77, 98], "intellig": 51, "wish": [51, 140, 143], "elimin": [51, 79, 85, 111, 112, 121, 123, 126, 143], "guarante": [51, 65, 68, 143], "select": [51, 66, 76, 95, 115, 117, 120, 126, 137, 138, 140, 143, 145, 146, 148, 149, 151, 153, 155, 156, 158, 159, 164, 166], "whichev": [51, 159], "tifffindcodec": [52, 62], "tiffregistercodec": [52, 62, 66], "tiffinitmethod": 52, "init": 52, "tiffunregistercodec": [52, 62], "tiffiscodecconfigur": [52, 62, 96], "tiffgetconfiguredcodec": [52, 62, 97, 100], "tiffsetcompressionschem": [52, 62], "adher": 52, "modular": 52, "cleanup": [52, 98, 103, 106, 107], "augment": 52, "tiffycbcrtorgbinit": [53, 62, 125, 126, 130], "tiffycbcrtorgb": [53, 62, 126, 135], "luma": [53, 125, 143], "refblackwhit": [53, 125, 126], "cb": [53, 143], "cr": [53, 143], "tiffcielabtorgbinit": [53, 62, 102], "tiffcielabtorgb": 53, "cielab": [53, 121, 124, 131, 150, 162], "tiffdisplai": 53, "displayw": 53, "refwhit": 53, "tiffcielabtoxyz": [53, 62], "tiffxyztorgb": [53, 62, 134], "simplifi": [53, 85], "task": [53, 138], "itself": [53, 66, 88, 89, 138, 143, 162], "clamptab": 53, "clamp": [53, 57, 59, 61, 62, 125, 126], "cr_r_tab": 53, "cb_b_tab": 53, "cr_g_tab": 53, "cb_g_tab": 53, "y_tab": 53, "proport": 53, "lumin": [53, 140, 143, 151], "21": [53, 140], "discuss": [53, 69, 72, 73, 95, 132, 137], "pair": [53, 159], "headroom": 53, "footroom": 53, "compon": [53, 94, 126, 132, 143, 156], "20": [53, 117, 125, 139, 140], "snippet": 53, "understand": [53, 66, 87, 143, 144, 161], "techniqu": [53, 62], "tiffroundup": 53, "exit": [53, 66, 98, 119, 125, 126, 129, 135, 154], "_tifffre": [53, 54, 62, 66], "cie": [53, 62, 96, 150], "1976": [53, 62, 96], "cielabtorgb_table_rang": 53, "1500": [53, 134], "lab": [53, 96], "rstep": 53, "gstep": 53, "bstep": 53, "x0": 53, "y0": 53, "z0": 53, "yr2r": 53, "yr": 53, "yg2g": 53, "yg": 53, "yb2b": 53, "yb": 53, "devic": [53, 155], "d_mat": 53, "xyz": [53, 62, 94], "matrix": 53, "d_ycr": 53, "light": [53, 159], "p": [53, 68, 95, 125, 140, 143, 145, 146, 147, 148, 150, 154, 155, 158, 159, 162], "d_ycg": 53, "d_ycb": 53, "d_vrwr": 53, "ref": [53, 62, 134], "d_vrwg": 53, "d_vrwb": 53, "d_y0r": 53, "residu": 53, "d_y0g": 53, "d_y0b": 53, "d_gammar": 53, "gamma": [53, 140], "gun": 53, "d_gammag": 53, "d_gammab": 53, "srgb": 53, "display_srgb": 53, "2410f": 53, "5374f": 53, "4986f": 53, "9692f": 53, "8760f": 53, "0416f": 53, "0556f": 53, "2040f": 53, "0570f": 53, "100": [53, 62, 93, 95, 126, 154], "0f": 53, "4f": 53, "temperatur": [53, 140], "chromat": 53, "formula": [53, 130], "refwhite_i": 53, "refwhite_x": 53, "whitepoint_x": 53, "whitepoint_i": 53, "refwhite_z": 53, "whitepoint": [53, 96, 104, 105, 114, 140], "don": [53, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 133, 134, 135, 150], "forget": [53, 98, 101], "_tiffmemset": [54, 62, 66], "_tiffmemcpi": [54, 62, 66], "dest": 54, "src": [54, 92, 124, 166], "_tiffmemcmp": [54, 62, 66], "s1": [54, 158], "s2": 54, "_tiffcheckmalloc": [54, 62, 106], "nmemb": 54, "elem_s": 54, "_tiffcheckrealloc": [54, 62, 109], "issu": [54, 66, 72, 93, 94, 99, 108, 112, 114, 120, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 143], "segment": [54, 66, 130, 143, 145, 159], "realloc": [54, 62, 66, 97, 121], "memset": [54, 113], "memcpi": [54, 67, 124, 125, 130, 131], "memcmp": 54, "overflow": [54, 61, 62, 80, 97, 100, 105, 106, 108, 109, 113, 114, 115, 117, 118, 120, 121, 124, 125, 126, 130, 131, 132, 133, 134, 135, 159], "malloc": [54, 66, 101, 108, 113, 119, 121], "tiffcurrentrow": [55, 62], "tiffcurrentstrip": [55, 62], "tiffcurrenttil": [55, 62], "tifffileno": [55, 62], "tifffilenam": [55, 62], "tiffgetmod": [55, 62], "tiffisbigendian": [55, 62, 98], "tiffisbigtiff": [55, 62, 130, 134], "tiffisbyteswap": [55, 62, 90], "tiffismsb2lsb": [55, 62], "tiffisupsampl": [55, 62], "activ": [55, 67, 68, 70, 90, 112, 122, 134, 137], "65535": [55, 117, 121, 131, 135, 143], "tifffetchdirectori": [55, 109], "corrupt": [55, 95, 108, 117, 118, 119, 121, 124, 126, 133], "whenev": [55, 143], "unchain": 55, "filesystem": 55, "pathnam": [55, 79, 80, 81, 82, 87], "bigendian": [55, 62, 104], "littleendian": [55, 62], "style": [55, 62, 65, 66, 105, 120, 126, 140, 145, 161, 162, 163], "stamp": [55, 89], "tiffrasterscanlines": [56, 62], "tiffrasterscanlinesize64": [56, 62], "tiffscanlinesize64": [56, 62, 115], "scanlines": 56, "ycbcrsubsampl": [56, 106, 118, 125, 134, 140, 143], "vertic": [56, 93, 96, 109, 125, 143, 146, 147, 151, 155, 159], "tiffdefaultstrips": [57, 62], "tiffstripsize64": [57, 62], "tiffvstrips": [57, 62], "nrow": [57, 59, 62, 95], "tiffvstripsize64": [57, 62], "tiffrawstrips": [57, 62, 96], "tiffrawstripsize64": [57, 62], "tiffcomputestrip": [57, 62, 134], "tiffsetupstrip": [57, 62, 117, 135], "sf": [57, 165], "adjust": [57, 59, 126, 128, 132], "lieu": 57, "unusu": [57, 87, 94, 124, 134], "tiffgetbitrevt": [58, 62], "tiffreversebit": [58, 62], "u_char": [58, 65, 99, 101], "nbyte": 58, "tiffswabshort": [58, 62], "tiffswablong": [58, 62], "tiffswablong8": [58, 62], "lp": 58, "tiffswabfloat": [58, 62], "tiffswabdoubl": [58, 62], "dp": 58, "tiffswabarrayofshort": [58, 62], "wp": 58, "tiffswabarrayoftripl": [58, 62], "uint8_t": [58, 65], "tp": 58, "tiffswabarrayoflong": [58, 62, 103], "tiffswabarrayoflong8": [58, 62], "tiffswabarrayoffloat": [58, 62], "tiffswabarrayofdoubl": [58, 62], "tripl": [58, 62], "stai": 58, "untouch": 58, "lookup": 58, "tiffnobitrevt": 58, "tiffdefaulttiles": [59, 62, 79], "tw": 59, "tifftilesize64": [59, 62, 115], "tifftilerows": [59, 62, 97], "tifftilerowsize64": [59, 62], "tiffvtiles": [59, 62], "tiffvtilesize64": [59, 62], "tiffchecktil": [59, 62, 106], "constrain": [59, 62, 143, 144], "align": [59, 62, 124, 139, 147, 158, 159, 160], "in_datatyp": 60, "mainli": [60, 82, 94, 145], "_tiffclampdoubletouint32": [61, 62], "val": 61, "_tiffmultiply32": [61, 62, 124], "_tiffmultiply64": [61, 62, 124], "ltiff": 62, "archiv": [62, 63, 64, 92, 124, 133, 138], "monochromat": 62, "1d": [62, 140, 158, 159, 160], "huffman": [62, 121, 143, 147], "facsimil": [62, 67, 140, 144, 145, 146, 147, 152, 155], "lempel": [62, 65, 135, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164], "ziv": [62, 65, 135, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164], "welch": [62, 65, 104, 135, 148, 149, 150, 151, 153, 156, 158, 159, 160, 164], "baselin": [62, 126, 143, 149, 150, 158, 159], "word": [62, 66, 135, 143, 147, 159], "32771": [62, 65], "32773": [62, 65, 140, 149, 150], "32809": [62, 65, 140], "32766": [62, 65, 140], "experiment": [62, 65, 77, 94, 104, 115, 117, 140], "lz": 62, "32946": [62, 65, 140], "32845": 62, "minsamplevalu": [62, 140], "maxsamplevalu": [62, 140], "rev": 62, "immateri": [62, 157], "promot": [62, 65], "commun": [62, 65, 70, 143], "pars": [62, 65, 67, 85, 112, 121, 125, 131, 135, 140, 143, 158], "expos": [62, 94, 135], "int64_t": [62, 65, 133], "sign": [62, 65, 79, 92, 102, 108, 114, 115, 120, 123, 125, 126, 129, 139, 150, 159], "deprec": [62, 65, 123, 129, 135], "counterpart": 62, "ttag_t": 62, "tsample_t": 62, "tstrile_t": 62, "tstrip_t": [62, 115], "ttile_t": 62, "tsize_t": [62, 92, 109, 129], "tdata_t": 62, "quantiti": [62, 79, 143], "penalti": 62, "ellipsi": 62, "cast": [62, 68, 90, 110, 114, 115, 121, 123, 124, 125, 126, 135], "lowest": [62, 66], "presum": [62, 66, 95, 125, 162], "setfield": [62, 106], "unregist": [62, 66], "recogn": [62, 78, 79, 97, 100, 121, 144, 157, 159, 162], "coverag": [62, 64, 142], "lie": 62, "term": [62, 66, 72, 143, 144], "summar": [62, 129, 143], "bitmap": [62, 146], "qualiti": [62, 112, 117, 143, 154], "jpegtabl": [62, 98, 103, 112, 140], "tifftag_zipqu": 62, "tifftag_pixarlogdatafmt": 62, "pixarlog": [62, 121, 125], "tifftag_pixarlogqu": 62, "tifftag_sgilogdatafmt": 62, "sgilog": [62, 94, 158], "ing": 62, "faxmode_class": 62, "rtc": [62, 147], "faxmode_nortc": 62, "faxmode_classf": 62, "faxmode_noeol": 62, "eol": [62, 85, 135, 147, 158, 159, 160], "faxmode_bytealign": 62, "boundari": [62, 65, 94, 143, 147, 158, 159, 160], "faxmode_wordalign": 62, "share": [62, 66, 77, 79, 82, 87, 95, 103, 116, 123, 134, 141], "depth": [62, 66, 102, 111, 143, 145, 155, 156, 159], "tifftag_iptcnewsphoto": [62, 88], "headlin": 62, "credit": [62, 125, 126], "wire": 62, "servic": [62, 126, 141], "photoshop": [62, 88, 105, 140], "redundantli": 62, "alongsid": 62, "iptcnewsphoto": 62, "75": [62, 94, 154, 159], "jpegcolormode_raw": 62, "jpegcolormode_rgb": 62, "jpegtablesmode_qu": [62, 121], "quantiz": [62, 121, 143, 164], "jpegtablesmode_huff": [62, 121], "9": [62, 64, 65, 68, 74, 75, 95, 115, 117, 121, 123, 128, 129, 140], "yield": 62, "cost": [62, 66, 94, 144], "comput": [62, 95, 103, 114, 117, 122, 124, 125, 126, 143, 150, 159], "good": [62, 63, 67, 143, 144], "tradeoff": 62, "pixarlogdatafmt_8bit": 62, "pixarlogdatafmt_8bitabgr": 62, "pixarlogdatafmt_11bitlog": 62, "11": [62, 93, 108, 110, 115, 117, 124, 134, 140, 146, 153, 155], "pixarlogdatafmt_12bitpicio": 62, "picio": 62, "pixarlogdatafmt_16bit": 62, "pixarlogdatafmt_float": 62, "ieee": [62, 65, 150], "sgilogdatafmt_fltxyz": 62, "sgilogdatafmt_16bitluv": 62, "luv": [62, 125], "sgilogdatafmt_32bitraw": 62, "sgilogdatafmt_24bitraw": 62, "sgilogdatafmt_8bitrgb": 62, "sgilogdatafmt_flti": 62, "sgilogdatafmt_16bitl": 62, "sgilogdatafmt_8bitgri": 62, "greyscal": [62, 66, 87, 94, 118, 145, 149, 151, 152, 153, 155, 160], "fax2tiff": [62, 64, 78, 95, 105, 107, 124, 125, 126, 133, 134, 145, 160], "pal2rgb": [62, 64, 76, 87, 106, 114, 117, 121, 133, 134, 145, 150, 153, 155, 157, 158, 159, 160, 163, 164], "ppm2tiff": [62, 64, 84, 95, 103, 106, 112, 121, 128, 133, 134, 135, 145], "rgb2ycbcr": [62, 64, 93, 108, 121, 124, 133, 134, 135, 145], "raw2tiff": [62, 64, 95, 96, 106, 107, 120, 125, 130, 133, 134, 135, 145], "tiff2bw": [62, 64, 78, 93, 100, 106, 114, 117, 121, 124, 125, 126, 133, 134, 145, 155, 156, 160], "tiffdith": [62, 64, 103, 120, 121, 133, 134, 135, 145, 147], "tiffdump": [62, 64, 77, 78, 83, 87, 95, 102, 104, 105, 114, 121, 122, 124, 130, 132, 133, 134, 135, 145, 152, 162, 165], "tiffmedian": [62, 64, 95, 120, 132, 133, 134, 135, 145, 148, 149, 150, 153, 155, 157, 158, 159, 160, 163], "tiffsplit": [62, 64, 93, 95, 98, 103, 105, 108, 114, 120, 124, 126, 129, 145, 158, 159], "aldu": [62, 66], "technic": [62, 64, 67, 96, 103, 140, 142], "memorandum": 62, "spirit": [62, 147], "appendix": [62, 140, 147], "cygnet": [62, 147], "technologi": [62, 141, 147], "kit": [63, 65, 108], "albeit": 63, "gif": [63, 90], "jfif": [63, 143], "kept": [63, 91], "latest": [63, 64, 68, 95, 125], "download": [63, 64, 72, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 142], "osgeo": [63, 64, 72, 73, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 142], "pic": 63, "gitlab": [63, 64, 69, 117, 126, 128, 129, 130, 131, 132, 133, 134, 135, 138], "sourc": [63, 64, 65, 66, 68, 82, 89, 90, 92, 115, 117, 120, 124, 130, 132, 133, 134, 143, 151, 158, 159, 160, 164], "contribut": [63, 64, 76, 91], "debug": [63, 91, 124, 126, 145, 159], "simplesystem": [64, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "io": [64, 65, 93, 128, 129, 130, 131, 132, 133, 134, 135, 138], "stabl": [64, 108, 115], "v4": [64, 75], "primari": [64, 95, 134, 135], "site": [64, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 142], "mail": [64, 69, 70, 73, 114, 126, 137, 141], "subscript": [64, 73, 90], "mailman": [64, 72, 73], "listinfo": [64, 72, 73], "repositori": [64, 117, 124, 133], "bsd": [64, 65, 96, 99, 102, 135], "maco": [64, 94, 95, 103, 123, 131], "tiffset": [64, 95, 98, 101, 102, 109, 114, 115, 117, 121, 124, 126, 130, 132, 133, 134, 145], "move": [64, 76, 79, 89, 94, 96, 102, 104, 108, 109, 112, 114, 115, 131, 133, 134, 135, 138, 139, 146], "tiff2p": [64, 76, 79, 87, 94, 95, 96, 99, 101, 102, 106, 108, 109, 114, 120, 121, 125, 128, 129, 130, 133, 134, 135, 145, 146, 154], "tiff2pdf": [64, 96, 97, 99, 103, 105, 106, 108, 109, 112, 113, 114, 117, 118, 119, 120, 121, 124, 125, 126, 128, 129, 130, 131, 133, 134, 135, 145], "categori": [64, 133], "longer": [64, 65, 69, 77, 78, 79, 80, 87, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 115, 121, 129, 132, 133, 135, 155, 159], "restor": [64, 80, 86, 102, 106, 108, 112, 131, 134, 136], "draft": [64, 140, 142], "terminologi": [64, 67], "fax2p": [64, 76, 80, 84, 92, 94, 101, 102, 107, 114, 121, 123, 132, 133, 134, 135, 145], "thumbnail": [64, 67, 94, 114, 121, 124, 126, 133, 134, 145, 155], "tiff2rgba": [64, 91, 94, 95, 96, 108, 113, 121, 124, 128, 133, 134, 135, 145], "tiffcrop": [64, 108, 109, 111, 113, 114, 120, 121, 124, 125, 128, 130, 131, 132, 133, 134, 135, 145], "comment": [64, 73, 81, 95, 112, 121, 132, 137, 140, 155], "rfc": [64, 65, 73, 134, 140], "project": [64, 69, 117, 125, 136, 141], "steer": [64, 70, 136], "committe": [64, 70, 136, 143], "guidelin": [64, 73, 136, 143], "licens": [64, 68, 70, 90, 135], "bug": [64, 68, 70, 76, 78, 79, 80, 81, 83, 85, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 118, 119, 121, 125, 126, 130, 131, 132, 133, 134, 135], "acknowledg": [64, 70], "histori": [64, 127, 128, 129, 130, 131, 132, 133, 134, 135], "10": [64, 65, 75, 93, 94, 95, 112, 124, 125, 126, 127, 130, 135, 140, 143], "4beta": [64, 75, 120], "elsewher": [65, 139, 143, 144, 145], "low": [65, 66, 143, 146, 147, 159], "split": [65, 95, 105, 143, 145, 155, 166], "consid": [65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 132, 134, 140, 143, 159], "compression_support": 65, "34676": [65, 140], "34677": [65, 140], "ccitt_support": 65, "packbits_support": 65, "ancillari": [65, 77, 81], "jpeg_support": 65, "later": [65, 94, 109, 112, 121, 123, 126, 128, 138], "turbo": [65, 126, 131, 135], "deflate_support": 65, "99": [65, 82, 95, 115], "libz": 65, "1950": 65, "1952": 65, "ietf": 65, "rfc1950": 65, "rfc1951": 65, "rfc1952": 65, "net": [65, 94], "libdefl": [65, 128, 134, 158], "github": [65, 117, 126, 129, 133, 135], "ebigg": 65, "cl": 65, "cam": 65, "uk": 65, "mgk25": 65, "jbigkit": 65, "esri": [65, 117, 129, 141], "lzma2": [65, 158], "tukaani": 65, "xz": [65, 72], "facebook": 65, "webp": [65, 117, 131, 132, 133], "develop": [65, 66, 69, 70, 114, 159], "googl": [65, 117, 125], "colorimetry_support": 65, "ycbcr_support": 65, "cmyk_support": 65, "lzw_support": 65, "thunder_support": 65, "next_support": 65, "ojpeg_support": 65, "ttn2": [65, 140], "jbig_support": 65, "t85": 65, "43": [65, 94, 135, 139], "34661": [65, 109], "iso": [65, 114, 140, 143], "lerc_support": [65, 130], "34887": 65, "zip_support": 65, "libdeflate_support": 65, "enhanc": [65, 76, 82, 114, 145], "lzma_support": 65, "markov": 65, "34925": [65, 115], "liblzma": [65, 115, 131], "zstd_support": 65, "zstandard": [65, 117], "50000": [65, 117], "adob": [65, 66, 67, 95, 96, 99, 100, 101, 117, 139, 140, 141, 154], "registri": 65, "webp_support": 65, "graphic": [65, 68, 71, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 159], "50001": [65, 117], "pixarlog_support": 65, "32909": [65, 140], "sgilog_support": 65, "icc_support": 65, "silicon": [65, 68, 71], "mip": 65, "mostli": [65, 79, 95, 101, 115, 124, 128], "peopl": [65, 68, 69, 141], "highli": 65, "much": [65, 66, 95, 114, 115, 117, 143, 162], "futur": [65, 101, 102, 108, 115, 129, 143, 159], "improv": [65, 77, 83, 87, 93, 94, 95, 97, 102, 105, 107, 108, 114, 118, 121, 126, 128, 130, 131, 132, 133, 134, 135, 155, 159], "prototyp": [65, 66, 76, 80, 124], "modif": [65, 90, 159], "am": [65, 103, 107, 108, 109, 123, 124, 126], "antiqu": [65, 129], "incorpor": [65, 79, 95, 105, 108, 154], "effort": 65, "isol": [65, 66], "mani": [65, 68, 80, 96, 99, 100, 102, 103, 105, 108, 109, 115, 120, 126, 128, 131, 138, 140, 143, 145, 156, 159], "tif_": [65, 121], "words_bigendian": [65, 132, 135], "tif_config": [65, 103, 108, 109, 110, 115, 121, 124, 132, 133, 135], "bsdtype": 65, "u_short": [65, 99], "u_int": [65, 99], "u_long": [65, 99, 101], "have_ieeefp": [65, 135], "tif_machdep": 65, "have_mmap": 65, "host_fillord": [65, 127, 132], "fillorder_msb2lsb": [65, 132], "fillorder_lsb2msb": [65, 132], "host_bigendian": [65, 76, 132], "motorola": 65, "interact": 65, "pure": [65, 152, 156], "fiddl": 65, "int8_t": 65, "int16_t": 65, "transfer": [65, 133], "trick": [65, 67, 132, 134], "edit": [65, 66, 135, 140, 143], "_tiffbuiltincodec": 65, "perhap": [65, 119, 143], "push": [65, 126], "14": [65, 114, 121, 128, 134, 140, 155], "sai": [65, 66, 155], "foosetupdecod": 65, "frozen": 65, "foopredecod": 65, "foodecod": 65, "bp": [65, 125, 128, 131], "foodecoderow": 65, "foodecodestrip": 65, "foodecodetil": 65, "foosetupencod": 65, "foopreencod": 65, "fooencod": 65, "fooencoderow": 65, "fooencodestrip": 65, "fooencodetil": 65, "foopostencod": 65, "fooseek": 65, "forward": 65, "foocleanup": 65, "variant": [65, 125, 126, 139], "2d": [65, 140, 147, 158, 159, 160], "worth": 65, "cross": [65, 95, 143], "cogniz": 65, "tiffflushdata1": [65, 124, 125], "tif_postencod": 65, "logic": [65, 66, 85, 87, 93, 94, 108, 109, 120, 125, 130, 141, 143], "tif_postdecod": [65, 95], "tiffnopostdecod": 65, "horizont": [65, 96, 123, 125, 126, 130, 143, 146, 147, 151, 155, 158, 159, 160, 164], "differenc": [65, 123, 158, 159, 160, 164], "tif_rawcc": [65, 117, 124, 125, 126], "tif_rawdata": [65, 125, 135], "tif_rawcp": [65, 124, 125, 135], "tif_scanlines": 65, "tif_tiles": 65, "tif_decod": 65, "tif_encod": 65, "trivial": [65, 143], "nil": 65, "watch": 65, "cours": [65, 69, 128, 143, 150], "abstract": [66, 115], "highest": [66, 143, 150], "untransform": 66, "exactli": [66, 108, 139], "materi": [66, 79, 140], "introduct": 66, "accompani": 66, "alphabet": [66, 141], "tree": [66, 67, 82, 89, 117, 124], "whatev": [66, 68, 143], "cat": 66, "processor": 66, "tifflib_vers": 66, "mimic": 66, "erron": 66, "diagnost": [66, 157], "global": [66, 130, 143], "model": [66, 103, 140, 150], "stdio": [66, 120], "permit": [66, 77, 80, 140, 143, 144, 159], "truncat": [66, 103, 120, 121, 124, 126, 147, 162], "consequ": [66, 144], "hous": 66, "perfectli": 66, "alright": 66, "stand": [66, 115], "unrel": 66, "accumul": [66, 123], "referenc": [66, 85, 114], "argc": [66, 67], "argv": [66, 67], "dircount": 66, "corpor": [66, 124], "wast": [66, 143], "undefin": [66, 98, 114, 123, 124, 125, 126, 140, 143], "bundl": [66, 108], "said": 66, "anywher": [66, 139], "legitim": [66, 126], "inher": 66, "pipe": 66, "rectangular": [66, 144], "intercept": 66, "intermedi": 66, "size_t": 66, "npixel": 66, "grain": 66, "repeatedli": 66, "interpos": 66, "cach": [66, 133], "speedup": 66, "esoter": [66, 76, 108, 140, 156], "substitut": [66, 69, 158, 159], "sgigt": [66, 96], "simplest": 66, "produc": [66, 95, 99, 109, 115, 121, 128, 143, 155, 156, 159], "myfil": 66, "planarconfig_contig": [66, 96], "planarconfig_separ": 66, "nsampl": 66, "aris": [66, 71, 76, 143], "someth": [66, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "often": [66, 140, 144, 158, 159], "notic": [66, 68, 71, 91, 97, 143, 155], "fewer": [66, 95, 143], "bc": 66, "stripsiz": 66, "As": [66, 73, 95, 98, 101, 102, 103, 105, 106, 107, 108, 109, 114, 115, 117, 141], "coloc": 66, "volum": [66, 140, 141, 159], "cube": 66, "offer": [66, 117, 124, 141], "safe": [66, 94, 120, 127, 141], "simultan": [66, 116], "explain": 66, "almost": [66, 70, 98, 133, 156], "certainli": 66, "transmiss": [67, 144, 146, 147], "pagemak": [67, 96], "mutual": [67, 131, 155, 159], "dng": [67, 101, 103, 135, 140], "ep": [67, 95, 121, 140, 155], "concaten": [67, 145, 154, 158, 159, 166], "tif_curdir": [67, 134], "increment": [67, 125, 135, 159], "suggest": [67, 89, 90, 96, 98, 102, 114, 133, 139, 143], "number_of_imag": [67, 132], "number_of_subifd": 67, "number_of_sub_ifd": 67, "sub_ifds_offset": 67, "0ul": 67, "blnwritesubifd": 67, "multipagetiff2": 67, "128": [67, 104, 143, 160], "photometric_minisblack": 67, "trigger": [67, 112, 124, 125, 126], "fresh": 67, "mandatori": 67, "idea": [67, 109, 124, 143], "filetype_reducedimag": 67, "currentdirnumb": 67, "blnread": 67, "ptr": 67, "behind": 67, "stackoverflow": 67, "sam": [68, 71, 93], "leffler": [68, 71], "seen": [68, 81, 117, 134, 143], "u": [68, 69, 70, 121, 124, 143, 147, 154, 159, 165], "honor": [68, 87], "copyright": [68, 71, 94, 103, 140, 154], "nice": [68, 139], "1999": [68, 114], "person": [68, 70, 90], "rouault": [68, 73, 114, 137, 138], "bob": [68, 69, 73, 137], "friesenhahn": [68, 69, 73, 137], "andrei": [68, 95], "kiselev": [68, 95], "jori": [68, 99, 105, 109, 139, 141], "van": [68, 93, 99, 109, 139, 141, 143], "damm": [68, 99, 109, 139, 141], "lee": [68, 102, 109, 125], "howard": [68, 102, 109, 125], "attribut": [68, 138], "fax": [68, 80, 89, 94, 98, 102, 105, 109, 114, 135, 140, 145, 147, 154, 155], "jef": 68, "poskanz": 68, "rewritten": [68, 76, 96, 108], "cringl": [68, 78], "tom": [68, 95, 112], "lane": [68, 112], "excel": [68, 117], "who": [68, 90, 101, 112, 137, 141], "friendli": 68, "robust": [68, 115], "older": [68, 69, 74, 93, 105, 108, 155], "unsuit": 68, "marku": 68, "kuhn": 68, "persist": 68, "bjorn": [68, 78, 79], "brox": [68, 78, 79], "mccoi": 68, "j": [68, 125, 154, 159, 163], "conklin": 68, "richard": [68, 80, 83, 108, 109, 111, 114], "minner": 68, "mlynarik": [68, 80, 83], "soren": 68, "pingel": 68, "dalsgaard": 68, "steve": [68, 139], "karsten": [68, 84], "spang": [68, 84], "smith": [68, 92], "brent": [68, 94], "roman": [68, 93, 94], "greg": [68, 94], "ward": [68, 94], "stanislav": [68, 92, 93], "brabec": [68, 92, 93], "shpount": [68, 93], "skarpeti": [68, 93], "arvan": [68, 93], "pritchard": [68, 93], "bernt": [68, 92], "herd": [68, 92], "joseph": [68, 92], "orost": [68, 92], "phil": [68, 91], "befferi": [68, 91], "ivo": [68, 90], "penzar": [68, 90], "francoi": [68, 89], "dagand": [68, 89], "albert": [68, 89], "chin": [68, 89], "young": [68, 89], "bruce": [68, 89, 90, 94], "mallett": [68, 94], "dwight": [68, 95, 114], "kelli": [68, 95, 114], "ross": [68, 96, 97], "finlayson": [68, 96, 97], "dmitri": [68, 97, 100, 101, 102, 114], "levin": [68, 97, 100, 101, 102, 114], "tavi": 68, "ormandi": 68, "nold": [68, 108, 109, 111, 114], "roger": [68, 73, 126, 137], "leigh": [68, 73, 126, 137], "apologi": 68, "anyon": [68, 137], "inadvert": 68, "featur": [69, 95, 134, 141, 143], "let": [69, 93, 132], "maptool": [69, 108, 110, 111, 112, 113, 114, 117, 120, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132], "bugzilla": [69, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 117, 120, 121, 123, 124, 125, 126], "remain": [69, 90, 105, 125, 130, 135, 143, 145, 158, 159], "ticket": [69, 125], "migrat": 69, "remotesens": 69, "april": [69, 72, 73, 143], "2008": [69, 108, 141], "think": [69, 89, 141, 143], "ve": 69, "discov": [69, 94, 110, 124, 126, 128], "reproduc": [69, 128], "enter": [69, 159], "kind": [69, 71, 125, 128], "disclos": 69, "period": 69, "contact": [69, 137, 138], "send": [69, 146, 155], "mailto": [69, 93], "pobox": 69, "bfriesen": 69, "dalla": 69, "tx": 69, "sent": [70, 110, 126], "email": [70, 90, 93, 125, 126], "ask": 70, "contributor": [70, 132, 133], "profession": [70, 141], "paid": 70, "voluntari": 70, "unpaid": 70, "1988": 71, "1997": 71, "1991": [71, 143], "inc": 71, "sell": 71, "herebi": 71, "grant": 71, "fee": 71, "ii": [71, 79, 87, 140, 145, 146], "advertis": [71, 99], "THE": 71, "AS": 71, "warranti": 71, "OF": 71, "express": [71, 124, 133, 135, 159], "OR": 71, "merchant": 71, "FOR": 71, "IN": 71, "NO": 71, "shall": [71, 138, 143], "BE": 71, "liabl": 71, "incident": 71, "consequenti": [71, 133], "damag": [71, 117], "whatsoev": 71, "loss": 71, "profit": 71, "NOT": 71, "advis": 71, "theori": 71, "liabil": 71, "connect": 71, "WITH": 71, "web": [72, 93, 95, 117, 135, 141], "subscrib": [72, 73], "accept": [72, 126, 132, 133, 137, 143, 144, 155], "2024": [72, 73, 134], "1993": [72, 143], "tml": 72, "zip": [72, 90, 95, 109, 115, 117, 121, 124, 125, 128, 139, 140, 148, 149, 150, 151, 153, 154, 155, 156, 158, 159, 160, 164], "anymor": [72, 99, 109, 115, 135], "rule": [73, 108, 115, 137, 139, 143], "overal": 73, "decis": [73, 137, 141, 143], "bobfriesenhahn": [73, 137, 138], "su": [73, 137, 138], "lau": [73, 137, 138], "su_lau": [73, 137, 138], "rleigh": [73, 137], "timothi": [73, 137], "lyanguzov": [73, 137], "theta682": [73, 137, 138], "olivi": [73, 137, 138], "paquet": [73, 137], "leonard": [73, 93, 137], "rosenthol": [73, 93, 137], "lrosenthol": [73, 137], "propos": [73, 114, 126, 137, 139, 140, 143], "psc": [73, 137, 138], "welcom": 73, "review": [73, 98, 100, 137], "v3": [74, 115], "0beta": [74, 100, 108], "0beta2": [74, 97], "0alpha": [74, 99], "6beta": [74, 94], "4beta036": [74, 88], "4beta035": [74, 87], "4beta034": [74, 86], "4beta033": [74, 85], "4beta032": [74, 84], "4beta031": [74, 83], "4beta029": [74, 82], "4beta028": [74, 81], "4beta024": [74, 80], "4beta018": [74, 79], "4beta016": [74, 78], "4beta004": 76, "master": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133], "ftp": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 142], "timefram": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "mention": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 132, 137], "pentium": 76, "faster": [76, 94, 117, 128, 130, 146], "leak": [76, 87, 98, 103, 108, 109, 117, 120, 125, 126, 132, 134, 135], "plug": 76, "flexibl": [76, 143], "lessen": [76, 124], "complaint": [76, 80], "chosen": [76, 143], "uniniti": [76, 114, 117, 121, 124, 133], "ras2tiff": [76, 80, 90, 96, 99, 106, 120, 124], "alberto": 76, "accomazzi": 76, "undecod": 76, "4beta007": 77, "inclus": [77, 99], "datatyp": [77, 96, 104, 115, 139, 140, 150], "sminsamplevalu": [77, 124, 140], "smaxsamplevalu": [77, 124, 140], "improperli": 77, "reusabl": 77, "dso": [77, 79, 80, 84, 85, 86, 87, 93, 94, 95], "readm": [77, 93, 109], "irix": [78, 79, 87, 89], "envopt": [78, 79], "hp": [78, 87, 94], "ux": [78, 87, 94], "aix": [78, 79, 82, 94, 95, 102, 114], "miscellan": [78, 143], "grow": [78, 79, 126], "intent": [79, 144], "dirs_libinc": 79, "abort": [79, 114, 117, 143], "wherebi": [79, 81, 87], "int8": [79, 102, 129], "uint8": [79, 129], "badfaxlin": [79, 140], "cleanfaxdata": [79, 140], "consecutivebadfaxlin": [79, 140], "op": [79, 143], "round": [79, 143], "vm": [79, 80, 83, 84, 94, 109, 121, 129], "powerpc": 79, "ruedi": 79, "boesch": 79, "int32": [79, 115, 117, 125, 126, 129], "postscript": [79, 80, 87, 94, 96, 145, 146, 155], "sgi2tiff": [79, 106, 124], "noninteract": 80, "prompt": 80, "typo": [80, 98, 105, 121, 124], "dir_jpeg": 80, "setmak": 80, "pow": [80, 102], "accident": 80, "delai": [80, 137], "confus": [80, 93, 94, 97, 143], "dump": [80, 113, 119, 143, 159, 161], "faxrecvparam": [80, 140], "faxrecvtim": [80, 140], "faxsubaddress": [80, 140], "msb2lsb": [80, 150, 158, 159, 160], "lsb2msb": [80, 127, 150, 158, 159, 160], "__win32__": [80, 134], "printer": [80, 146, 155], "win95": [80, 95], "winnt": 80, "dave": 80, "dyer": 80, "relativ": 81, "frequent": [81, 141], "ultrix": 81, "script_sh": [81, 94], "mod": [81, 84, 90], "metrowerk": 81, "codewarrior": 81, "codeword": [81, 114], "rle": 81, "hpux": 82, "solari": [82, 85, 87], "libcopt": 82, "resid": 82, "absolut": [82, 96, 130, 134, 137, 150], "dist_major": 82, "dist_minor": 82, "dist_alpha": 82, "dsosuf_vers": [82, 94], "incompat": [82, 115, 131, 143], "redon": 82, "fixup": [83, 89], "subtl": [83, 93], "aka": [84, 121], "osf": [84, 89], "gif2tiff": [84, 114, 120, 121, 124], "netbsd": [85, 117], "slightli": [85, 143], "tifflibref": 85, "it8": 85, "IT": 85, "explicit": [87, 121, 123, 124, 125, 133, 135], "libc": [87, 117], "numberofink": [87, 105, 140], "iccprofil": [87, 105], "stripchop_default": [87, 93, 130], "planarcontig": 87, "planarsepar": 87, "metric": [87, 117], "unit": [87, 95, 109, 123, 144, 154, 155, 159], "v0": 87, "conserv": 87, "fulli": [87, 128, 129, 130, 131, 132, 133, 134, 135], "satur": [87, 94, 140], "hash": 87, "pitfal": 87, "inknam": [87, 98, 140], "microsoft": [87, 115, 122, 128], "john": [87, 94, 95], "wehl": 87, "ratio": [87, 94, 117, 143, 158], "deadzon": [87, 95, 155], "job": [87, 146], "guard": [87, 121], "mishandl": 87, "4beta037": 88, "onshor": [88, 89, 90, 91, 92, 93], "pub": [88, 89, 90, 91, 92, 93, 95], "cv": [89, 92, 117], "date": [89, 133, 154, 159], "releasediff": 89, "diff": 89, "tick": 89, "01": [89, 125], "ll": 89, "behalf": 89, "tiffreassigntagtoignor": [89, 101, 115], "cameron": [89, 90], "softlink": 89, "linuxdso": 89, "action": [89, 159], "cvtcmap": 89, "eight": [89, 159], "christoph": 89, "lawton": 89, "o_binari": 89, "cygwin": [89, 93, 101, 115, 126], "65536": 89, "didn": [89, 119, 124], "unisi": 90, "patent": [90, 143], "enforc": [90, 121, 124, 128], "late": [90, 113, 124], "payment": 90, "5000": 90, "unlicens": 90, "burn": 90, "dai": [90, 110, 114, 137, 139, 141], "catch": 90, "difficult": 90, "imposs": [90, 115, 143], "compli": [90, 100], "dramat": 90, "lossless": [90, 117, 133, 135, 143], "unavoid": 90, "willing": [90, 137], "risk": [90, 119], "3t": 90, "rewrite_hack": [90, 92], "complain": [90, 94, 102, 143], "gill": 90, "vollant": 90, "iz": 90, "extort": 90, "tiffadvancedirectori": [90, 121, 131], "apocalyps": 90, "induc": 90, "y2k": 90, "segfault": [91, 108, 121, 124], "tiff_packbit": 91, "nostrip": 91, "libc6": 92, "submit": [92, 93, 94, 99, 109, 114, 137], "wasn": [92, 123], "thank": [92, 93, 94, 114], "stopondiff": 92, "fax3sm_winnt": 92, "tiffil": [92, 95], "seriou": [92, 118, 143], "uint16": [92, 103, 115, 121, 124, 125, 129, 139], "uint32": [92, 94, 101, 103, 106, 109, 115, 117, 124, 125, 126, 129, 139], "td_sampleformat": 92, "sampleformat_uint": 92, "sampleformat_void": 92, "tiffdefaultdirectori": [92, 93, 121], "getdefault": 92, "dsp": 92, "bigger": [92, 107, 114, 115, 125, 126, 155], "overrun": [92, 93, 94, 99, 112, 114, 124], "frle_bug": 92, "4gb": [92, 139, 142], "use_64bit_api": 92, "eventu": 92, "somehow": 92, "tent": [92, 93], "facilit": 92, "mixup": 92, "tif_rawdatas": [92, 125], "box": [92, 117], "statement": [92, 101, 105], "submiss": [92, 106], "nalin": 92, "dahyabhai": 92, "printrun": 92, "courtesi": 92, "reimplement": 92, "temp": 92, "mangl": 92, "sh": [92, 94, 96, 97, 101, 126, 129, 133, 135], "mung": 92, "gnulddso": 93, "jan": 93, "buggenhout": 93, "tiff_istil": 93, "remot": [93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 117, 141, 159], "18": [93, 117, 139, 140], "vandrov": 93, "cvut": 93, "cz": 93, "discard": [93, 124, 130, 147], "o_rdwr": 93, "compressor": [93, 94, 109, 130, 143], "decompressor": [93, 109, 143], "13": [93, 96, 131, 140], "0x0000": 93, "expand1d": 93, "seem": [93, 109, 124], "downsampl": [93, 143, 159], "nick": 93, "lamb": 93, "prove": 93, "destroi": 93, "michael": [93, 102], "eckstein": 93, "o_rdonli": [93, 94], "too": [93, 103, 115, 121, 126, 131, 139, 143], "week": 93, "ago": 93, "sampleformat_complexieeefp": 93, "sampleformat_complexint": 93, "__cygwin__": 93, "redact": 93, "defunct": [93, 117], "unpopul": 93, "overread": 93, "ovverwrit": 93, "caught": 93, "boundscheck": 93, "untest": [93, 98, 125], "silenc": [93, 123, 135], "vc6": 93, "tif_appl": 93, "carbon": 93, "interfer": [93, 134, 143], "me": 93, "roundup": 93, "rows_per_strip": 93, "portion": [93, 140, 159], "15": [93, 121, 139, 140, 143], "averag": [93, 94], "resampl": [93, 159], "guess": [94, 96, 129, 135], "wholesal": 94, "fsf": 94, "1998": 94, "1994": [94, 114, 143], "inspir": [94, 103], "lm": [94, 121], "machdeplib": 94, "darwin": 94, "hack": [94, 95, 124, 130, 145], "resolv": [94, 96, 111, 112, 114, 137, 143], "inttyp": 94, "39": [94, 95, 102, 117], "40": 94, "upgrad": [94, 95, 105, 109, 115, 128], "mmap_fix": 94, "isn": [94, 95, 124, 125], "makeflag": 94, "marquart": 94, "robert": 94, "krajewski": 94, "keisuk": 94, "fujii": 94, "openbsd": [94, 95, 103], "61": 94, "destdir": [94, 95], "60": [94, 152], "have_boolean": 94, "rpcndr": 94, "debian": [94, 121], "66": 94, "dsosub_vers": 94, "rw_mode": 94, "fax3": [94, 112, 132], "grace": 94, "recoveri": 94, "tif_mod": 94, "concept": [94, 131], "gamut": 94, "imaginari": 94, "super": 94, "strang": [94, 130], "shift": [94, 95, 123, 125, 159], "psuedotag": 94, "dither": [94, 145, 160, 164], "turn": [94, 95, 130, 133, 138], "accuraci": 94, "log_luv_publ": 94, "effici": [94, 103, 115, 141, 146, 155, 159], "16bit": [94, 109, 117], "minisblack": [94, 150, 159, 162], "miniswhit": [94, 150, 159, 162], "duplic": [94, 98, 109, 123, 124, 131, 143], "44": [94, 143], "writecount": [94, 101, 109], "integr": [94, 141, 143], "__lp64__": 94, "67": [94, 135], "memmov": 94, "tiffmemcpi": 94, "overlap": [94, 95, 124, 155], "69": 94, "73": 94, "relax": 94, "contig": [94, 108, 126, 134, 148, 158, 159], "suppos": [94, 143], "8bit": [94, 109], "palet": [94, 125], "77": 94, "josep": 94, "vallverdu": 94, "47": 94, "ifdef": [94, 95, 126, 129, 134], "purifi": 94, "slight": 94, "54": [94, 135], "lzwsetupencod": 94, "propag": [94, 160], "78": [94, 117], "compression_ccitt_t4": 94, "compression_ccitt_t6": 94, "tifftag_t4opt": 94, "tifftag_t6opt": 94, "alias": [94, 114], "83": 94, "photometric_itulab": 94, "subimag": [94, 140, 159], "syntax": [94, 135, 159, 161, 162, 163], "bia": [94, 158], "substanti": [94, 103, 121, 137, 146], "imagemask": [94, 155], "helg": 94, "oldach": 94, "letter": [94, 154, 159], "paper": [94, 113, 140, 145, 154, 155, 159], "35": [94, 117, 128], "center": [94, 95, 106, 150, 154, 155, 159], "obscur": 94, "sometim": [94, 146], "sled": 94, "whitespac": [94, 158], "cut": [94, 145, 155, 164], "printabl": 94, "border": 94, "preserv": [94, 121, 134, 140, 141, 142], "contigcompar": 94, "53": [94, 129], "gttilecontig": [94, 126], "gtstripcontig": 94, "gttilesepar": [94, 126], "gtstripsepar": 94, "51": 94, "tif_ovrcach": [94, 95, 103, 104, 132], "rewrot": 94, "drop": [94, 134, 143, 156], "radic": 95, "ie": [95, 125, 159, 165], "field_subfiletyp": 95, "break": [95, 105, 117, 120, 126, 131, 132, 133, 134, 135, 137, 143, 159], "recognis": 95, "exemplifi": 95, "geo": 95, "among": [95, 143], "thing": [95, 115, 137], "higher": [95, 143], "lock": 95, "td_customvalu": 95, "pretti": 95, "impact": [95, 115, 126, 129], "serv": [95, 115, 117, 145], "2gib": 95, "largefil": 95, "dpixarlog_support": 95, "dzip_support": 95, "groffhtml": 95, "sco": 95, "openserv": 95, "duboi": 95, "iii": 95, "93": 95, "sparc64": 95, "96": 95, "gue": 95, "checkforbigendian": 95, "situat": [95, 108, 114, 117, 126, 128, 135], "94": 95, "92": [95, 143], "counter": [95, 109], "loop": [95, 103, 109, 117, 120, 126, 129, 131], "segment_height": 95, "lzwsetupdecod": 95, "198": 95, "regener": 95, "boolean": 95, "188": 95, "using_visualag": 95, "ag": [95, 102], "screw": 95, "compression_jp2000": 95, "34712": 95, "lead": [95, 117, 141, 161, 162, 163], "sbyte": [95, 103, 104, 150], "tifffetchbytearrai": [95, 103, 104], "52": 95, "expand": [95, 143], "tifffetchshortpair": 95, "196": [95, 147], "consist": [95, 114, 115, 117, 133, 144], "lzwdecod": [95, 117, 125, 130, 132, 135], "lzwdecodecompat": [95, 117], "190": 95, "115": 95, "pick": [95, 155], "177": 95, "168": [95, 131], "jpegdecod": [95, 120], "129": 95, "tif_row": [95, 105], "fool": 95, "156": 95, "assert": [95, 114, 117, 121, 124, 125, 126, 130, 135], "skip": [95, 112, 126, 135, 143, 150], "124": 95, "tif_decodestatu": 95, "tif_encodestatu": 95, "unconfigur": 95, "119": 95, "div": 95, "rowbyt": 95, "func": [95, 115], "111": 95, "xmlpacket": [95, 100, 140], "xmp": [95, 99, 100], "technot": [95, 121], "inkset": [95, 105, 140], "inkset_multiink": 95, "clippath": [95, 103, 140], "xclippathunit": [95, 103, 140], "yclippathunit": [95, 103, 140], "opiimageid": 95, "opiproxi": 95, "icclab": [95, 150], "110": 95, "109": 95, "__arch64__": 95, "decodestrip": 95, "97": 95, "segment_width": 95, "match": [95, 112, 120, 126, 143], "cinfo": 95, "image_width": 95, "jpegpredecod": 95, "improp": 95, "itiff": 95, "recent": 95, "default_extrasample_as_alpha": 95, "fourth": [95, 159], "assocalpha": 95, "65": 95, "imagegear": 95, "flatedecod": [95, 155], "2gb": [95, 109, 122], "endless": 95, "349": [95, 130, 131], "343": [95, 140], "pagenumb": [95, 106, 112, 140, 158], "23": [95, 124, 140], "275": [95, 130], "341": [95, 140], "julien": 95, "gaulmin": 95, "272": [95, 140], "293": [95, 140], "125": 95, "ppm": [95, 103, 145, 149], "parser": 95, "sebastian": 95, "eken": 95, "200": [95, 141], "margin": [95, 114, 121, 155, 159], "180": [95, 108, 155, 159], "shrink": 95, "325": [95, 140], "abil": [95, 102, 103, 106, 112, 143, 156], "basic": [95, 125, 131, 134, 155], "filter": [95, 152, 155], "kacvinski": 95, "328": [95, 140], "begindata": 95, "enddata": 95, "dsc": [95, 155], "80": [95, 152], "crash": [95, 103, 105, 106, 111, 112, 114, 119, 121, 124, 125, 126, 130, 132, 135, 162], "164": 95, "william": [95, 109, 143], "142": 95, "131": 95, "centimet": [95, 140, 154, 155, 159], "divis": [95, 99, 101, 120, 125, 126, 132, 134, 135, 159], "88": 95, "renam": [95, 97, 101, 109, 115, 126, 132, 135], "cpp": 95, "143": 95, "synchron": [95, 98], "pdf": [96, 103, 109, 112, 121, 126, 142, 145, 154], "test_pic": 96, "_bsdtypes_defin": 96, "referenceblackwhit": [96, 101, 105, 106, 112, 134, 140, 143], "120": 96, "flip": [96, 159], "48": 96, "antonio": 96, "scuri": 96, "_tifffindorregisterdinfo": 96, "_tifffindorregisterfieldinfo": 96, "publicli": 96, "spuriou": [96, 108, 157], "387": 96, "tiffmax": 96, "tiffmin": 96, "hanson": 96, "424": [96, 131], "unmaintain": [96, 138], "opengl": [96, 103, 145], "glut": [96, 123], "andrea": 96, "wiesmann": 96, "correl": [96, 150], "coeffici": [96, 125, 126, 143, 150], "neighbour": 96, "tif_pdsdirread": 96, "tif_pdsdirwrit": 96, "ltmain": 97, "mingw": [97, 105, 115, 126, 128, 130, 132, 134], "marcu": 97, "meissner": 97, "preliminari": [97, 100, 104, 105], "reject": [97, 99, 100, 112, 114, 124], "td_tilewidth": 97, "td_tilelength": 97, "stripe": 97, "tif_foundfield": 97, "tif_fieldinfo": 97, "630": [97, 134], "leof": 97, "eof": [97, 147], "conflict": [97, 116], "autotool": [98, 99, 104, 108, 115, 123, 133], "mnemon": 98, "rid": [98, 108, 114], "soi": [98, 112, 143], "sof": 98, "marker": [98, 121, 132, 134, 135, 143], "581": [98, 133, 138], "sshort": [98, 150], "slong": [98, 150], "sration": 98, "565": 98, "writer": [98, 127, 143], "sampleformat": [98, 108, 140, 144], "multisampl": 98, "562": 98, "gdal": [98, 103, 104, 108, 112, 117, 119, 121, 124, 125, 126, 130, 132, 133, 135, 137], "534": 98, "factor": [98, 109, 143], "intergarph": 98, "532": [98, 135, 140], "tifffetchnormaltag": [98, 104, 124, 130], "508": 98, "tiffinitpackbit": 98, "494": [98, 132], "introd": 98, "483": 98, "tifftag_yclippathunit": 98, "tifftag_index": 98, "475": [98, 132], "proceed": [98, 137, 140, 164], "474": 98, "468": 98, "arguabl": [98, 143], "passcount": 98, "460": 98, "gerben": 98, "koopman": 98, "amd": 98, "jeremi": [98, 102], "reed": [98, 102], "larri": 98, "grill": 98, "513": [98, 132, 140], "unproperli": 98, "multibyt": [98, 143], "574": 98, "artem": 98, "mirolubov": 98, "466": 98, "outdat": 98, "bmp2tiff": [99, 105, 106, 120, 121, 124], "bmp": [99, 121], "evan": 99, "simpler": [99, 124], "576": [99, 117], "asmail": [99, 109], "msg0054799560": 99, "593": 99, "absenc": [99, 143], "eric": 99, "fielek": 99, "setuppagest": 99, "psdatabw": [99, 125], "bugfix": [99, 101, 102, 109, 138], "586": 99, "700": [100, 117, 140], "imageheight": 100, "gennadi": 100, "khokhorin": 100, "autogen": [101, 129, 133, 135], "acloc": 101, "autohead": 101, "invoc": [101, 107], "user32": 101, "697": 101, "easier": [101, 109, 126, 143], "dll": [101, 132], "emb": [101, 105], "687": 101, "713": [101, 102], "718": [101, 135], "a1": 101, "sunpro": 101, "703": [101, 135], "704": [101, 135], "tchar": 101, "692": 101, "heavili": 101, "deliv": 101, "693": 101, "usabl": [101, 125, 159], "lack": [101, 132, 133], "han": 101, "petter": 101, "selaski": 101, "tif_stream": [101, 102, 109], "cxx": [101, 102, 109], "edward": [101, 102, 124], "lam": [101, 102, 124], "654": [101, 135], "hxx": 101, "651": [101, 135], "625": 101, "662": 101, "tiffappendtostrip": [101, 108, 109, 110, 130], "660": 101, "648": [101, 135], "everywher": [101, 105], "group4opt": [101, 140], "323": [101, 140], "tiffwritenormaltag": [101, 109], "vladimir": 101, "nadvornik": 101, "690": 101, "tristan": 101, "hill": 101, "fale": 101, "mainten": [102, 108, 124, 132, 133], "732": 102, "rinn": 102, "libtiffxx": [102, 103, 131], "unneed": [102, 115], "probabl": [102, 117, 124, 125, 126, 143, 146], "733": [102, 135], "730": [102, 135], "tifftag_faxdc": 102, "34911": [102, 140], "hylafax": [102, 125], "771": 102, "unnecessari": [102, 125, 135], "tiffseekfil": [102, 126], "756": 102, "727": 102, "763": 102, "suspici": 102, "705": 102, "320": [102, 130, 140], "741": [102, 135], "740": [102, 135], "739": 102, "tifftag_faxrecvparam": 102, "tifftag_faxsubaddress": 102, "tifftag_faxrecvtim": 102, "736": 102, "win32warninghandl": 102, "win32errorhandl": 102, "735": [102, 135], "comparison": [102, 106, 109, 121, 126, 129, 133, 135], "785": 102, "insecur": 102, "mktemp": 102, "tmpfile": [102, 114], "786": 102, "brighter": 102, "workstat": 102, "742": [102, 135], "689": 102, "martin": 102, "pitt": 102, "charact": [102, 103, 134, 158, 161], "725": 102, "miro": 103, "sonam": [103, 131], "838": 103, "826": 103, "machineri": [103, 109], "crt": [103, 114, 122], "875": 103, "sparc": 103, "64bit": [103, 115, 121, 126], "855": 103, "documentnam": [103, 140], "artist": [103, 140, 154, 165], "hostcomput": [103, 140], "datetim": [103, 140], "pagenam": [103, 140], "textureformat": [103, 140], "texturewrapmod": [103, 140], "targetprint": [103, 140], "tiff_codersetup": [103, 131], "tdir_count": 103, "tiffcvtnativetoieeedoubl": 103, "tiffwritedoublearrai": 103, "845": 103, "831": [103, 104], "830": 103, "file_share_read": 103, "file_share_writ": 103, "createfil": 103, "829": 103, "lib_jpeg_mk1": 103, "jpegdecoderaw": [103, 118, 135], "tifffetchpersampleshort": 103, "tifffetchpersamplelong": 103, "tifffetchpersampleani": 103, "843": 103, "chriscox": 103, "tiff_tn3_draft2": 103, "_tiffswab24bitdata": 103, "816": 103, "ron": 103, "lfind": [103, 104, 105, 109], "bsearch": [103, 105, 109], "dirinfo": 103, "lensinfo": [103, 140], "t2p_write_pdf_trail": [103, 114], "594": 103, "framework": [103, 144], "844": 103, "fscanf": 103, "861": 103, "presenc": [103, 107], "tiff2pdfr": 103, "interpol": [103, 154, 155], "bruno": 103, "ledoux": 103, "tif2pdf": 103, "794": 103, "tif_overview": [103, 104, 109], "m4": 104, "sconstruct": 104, "scon": [104, 129], "infrastructur": [104, 141], "prefre": 104, "tv": 104, "tiffsetfieldv": 104, "922": 104, "gcore": [104, 108], "macosx": 104, "upcast": 104, "tifffetchextrasampl": 104, "band": [104, 114, 130, 133, 134, 143, 150], "fieldofviewcotang": [104, 140], "matrixworldtoscreen": [104, 140], "matrixworldtocamera": [104, 140], "imagefullwidth": [104, 140], "imagefulllength": [104, 140], "primarychromat": [104, 140], "mdi": 105, "strip_size_default": 105, "vc_extralean": 105, "dotrang": [105, 106, 114, 140], "stonit": [105, 140], "redefininit": 105, "use_win32_fileio": [105, 125], "richtiffiptc": [105, 131, 140], "dual": [105, 135], "newer": [105, 115, 123, 155, 159], "ycbcrcoeffici": [105, 106, 134, 140, 143], "1003": 105, "1008": 105, "1002": 105, "xresolut": [105, 140, 143, 155], "yresolut": [105, 140, 143, 155], "977": 105, "if_dirread": 105, "chopupsingleuncompressedstrip": [105, 117, 125, 126], "degener": 105, "gtsmall": 105, "jp2": 105, "789": 105, "943": 105, "944": 105, "typeshift": 105, "typemask": 105, "946": 105, "965": 105, "983": 105, "malform": [105, 146], "932": 105, "1a": 106, "branch": [106, 108, 126], "with_default_strip_s": 106, "norihiko": 106, "muras": 106, "tifffetchanyarrai": 106, "1102": 106, "getfield": 106, "tiffpredictorcleanup": 106, "condit": [106, 109, 124, 126, 129, 130], "tifffetchdata": 106, "1043": 106, "rearrang": 106, "1081": 106, "1088": 106, "1063": 106, "1065": 106, "tiff_notyp": 106, "1033": 106, "103": 106, "1029": 106, "halftonehint": [106, 140], "1034": 106, "_tiffgetexiffieldinfo": 106, "_tiffgetfieldinfo": 106, "1026": 106, "readcount": 106, "pbm": [106, 149], "1044": 106, "t2p_sample_rgbaa_to_rgb": [106, 124], "t2p_sample_rgba_to_rgb": 106, "1097": 106, "1080": 106, "1072": 106, "1077": 106, "cobra": 106, "50": [106, 128, 152], "1025": 106, "1128": 107, "1127": 107, "_tiffsetdefaultcompressionst": [107, 135], "1120": 107, "tiffinitjpeg": 107, "1119": 107, "dblparam_t": 107, "1125": 107, "stdin": 107, "1124": 107, "1110": 107, "secur": [108, 111, 114, 119, 124, 132, 133, 135, 138], "autoconf": [108, 115, 126, 131, 133, 134, 135], "automak": [108, 115, 119, 121, 134], "1573": 108, "_tiffmergefield": 108, "1585": 108, "rip": 108, "fanci": 108, "danger": [108, 115], "observ": 108, "hard": [108, 135], "unalt": 108, "readbuff": 108, "tiff_beenwrit": [108, 109], "odd": [108, 109, 124, 143, 159], "junk": 108, "highlight": 108, "autotest": 108, "py": 108, "predictorencodetil": 108, "trac": [108, 112, 119, 125, 126], "1965": 108, "1948": 108, "tif_vm": [108, 109, 125], "openvm": [108, 109], "alexei": [108, 109], "chupahin": [108, 109], "faxc": 108, "1603": 108, "find0span": 108, "find1span": 108, "inlin": [108, 139], "msvc": [108, 110, 121, 124, 126, 128, 132, 135], "happi": 108, "dereferenc": [108, 111, 132], "exot": [108, 156, 157], "uncheck": [108, 120], "codet": 108, "1929": 108, "cve": [108, 112, 113, 114, 117, 118, 119, 120, 121, 124, 125, 126, 131, 134, 138], "2327": 108, "retain": 108, "uatoaa": 108, "bitmap16to8": 108, "abi": [108, 131, 132, 133, 134, 135], "precalcul": 108, "1979": 108, "subsamplinghor": 108, "ver": 108, "1980": [108, 124], "1981": 108, "reveal": [108, 126], "int64": [108, 114, 115, 121, 129], "32bit": [108, 115, 139, 156], "horz": 108, "1911": 108, "2005": [108, 122], "planar": [108, 140, 148, 156, 158, 159], "2057": [108, 131], "underflow": [108, 125, 130, 135], "2065": 108, "encoderow": 108, "2069": 108, "1896": 108, "unsaf": [108, 114], "strcpy": [108, 114], "strcat": 108, "t2p_write_pdf_str": [108, 109], "270": [108, 117, 140, 155, 159, 165], "shortv": 108, "longv": 108, "2009": [108, 113], "2347": [108, 113], "inter": [108, 113, 137, 143], "2079": [108, 113], "total": [109, 117, 125, 143], "winc": [109, 129], "tif_winc": 109, "mateusz": 109, "loskot": 109, "identif": 109, "folk": 109, "ehsc": 109, "vs2005": 109, "_crt_secure_no_deprec": 109, "nois": [109, 143, 158], "fieldinfo": 109, "jpeginitializelibjpeg": 109, "jpegfixuptestsubsampl": 109, "1363": 109, "fraction": [109, 113, 129], "1390": 109, "msg0054766825": 109, "subjectdist": [109, 113, 130, 140], "1362": 109, "890": 109, "matt": [109, 140], "hancher": 109, "999": 109, "corel": 109, "draw": [109, 146], "1490": 109, "1359": 109, "printdir": 109, "1273": 109, "1322": 109, "vulner": [109, 114, 121, 124, 138], "gentoo": 109, "show_bug": 109, "cgi": 109, "142383": 109, "forth": 109, "757": 109, "tif_msdo": 109, "thierri": 109, "pierron": 109, "_tiffwritedirectori": 109, "peng": 109, "gao": 109, "wordcount": 109, "variable2": 109, "40961": [109, 140], "tif_readdir": 109, "estimatestripbytecount": [109, 121, 126], "unequ": 109, "1204": 109, "tiffcheckdiroffset": [109, 121, 124], "1194": 109, "896": 109, "lut": 109, "favor": [109, 121, 159], "desubsampl": 109, "jpegvsetfield": 109, "upsampl": [109, 143], "recomput": [109, 124], "peculiar": 109, "jpegcolormod": 109, "1566": 109, "bader": 109, "1560": 109, "leon": 109, "bottou": 109, "1383": 109, "1366": 109, "1350": 109, "tif2rgba": 109, "1149": 109, "587": 109, "1191": 109, "1196": 109, "tiff_downsample_subsampl": 109, "1542": 109, "far": [109, 143], "dire": 110, "2007": 110, "22": [110, 117, 140, 143], "circumst": [110, 137], "2088": 110, "subformat": 111, "x86_64": 111, "i386": 111, "2090": 111, "v7": 111, "pun": 111, "wformat": 111, "werror": [111, 134], "2010": [112, 114], "1411": 112, "coupl": 112, "1936": 112, "2135": 112, "badli": [112, 114, 146], "mmr": 112, "2029": 112, "2186": 112, "jpegpreencod": 112, "midst": 112, "3539": 112, "thread": [112, 135], "reentranc": 112, "redund": [112, 121], "2185": 112, "acrobat": 112, "evinc": 112, "ghostscript": [112, 155], "parenthesi": [112, 125], "thoma": 112, "sinclair": 112, "2097": 112, "inadequ": 113, "unnecessarili": 113, "coerc": 113, "retyp": 113, "european": 113, "assort": 113, "t2p_read_tiff_s": [113, 124], "t2p": 113, "tiff_datas": [113, 129], "compression_jpeg": 113, "stomp": [113, 121], "bunch": 113, "ac_canonical_host": 114, "2307": 114, "pickcontigcas": 114, "2216": 114, "accordingli": 114, "2035": 114, "math": 114, "du": 114, "2207": 114, "_tifffieldwithtag": 114, "_tifffieldwithnam": 114, "2116": 114, "realli": [114, 115, 128, 143], "checkdircount": 114, "1963": 114, "1906": 114, "3087": 114, "2140": 114, "2016": [114, 124, 125, 126], "clumplin": 114, "2149": 114, "2595": 114, "2208": 114, "needless": 114, "2210": 114, "jcs_unknown": 114, "succe": [114, 125], "2215": [114, 126], "toler": 114, "field_colormap": 114, "2189": 114, "regress": [114, 117, 121, 124, 126, 135], "tiffwriterationalarrai": 114, "kareem": 114, "shehata": 114, "protect": [114, 121, 126], "vl": 114, "malici": 114, "indefinit": [114, 143], "a0": 114, "ever": 114, "reach": [114, 121, 134, 135, 137, 143], "2011": 114, "0192": 114, "drew": 114, "yao": 114, "appl": 114, "product": [114, 141], "unexpect": [114, 115, 124, 135], "disallow": 114, "legal": [114, 143, 154], "thunder": 114, "team": [114, 124, 126], "marin": 114, "barbella": 114, "tippingpoint": 114, "zdi": [114, 118], "1004": 114, "1167": 114, "2300": 114, "xlc": 114, "2301": [114, 140], "strncpy": 114, "2042": 114, "printdata": [114, 135], "printbyt": 114, "printshort": 114, "printlong": 114, "2218": 114, "untermin": 114, "exception": 114, "titl": [114, 154, 155, 162], "creator": [114, 154, 155], "1996": 114, "2051": 114, "mkstemp": 114, "2118": 114, "2250": 114, "2004": [114, 141], "2225": 114, "2270": 114, "iec": [114, 143], "9899": 114, "1990": [114, 124], "changelog": [115, 127, 128, 129, 130, 131, 132, 133, 134, 135], "strictli": [115, 125], "Or": [115, 128, 143], "whilst": 115, "although": [115, 125, 143], "stage": [115, 117], "half": [115, 155, 159], "dozen": 115, "gigabyt": [115, 139], "consider": [115, 140], "overhead": [115, 143], "choic": [115, 143, 159], "saniti": [115, 134], "mega": 115, "megabyt": 115, "kilo": 115, "tiffhead": 115, "tiffdirentri": 115, "tiffheaderclass": 115, "tiffheaderbig": 115, "tiffheadercommon": 115, "sizer": 115, "meant": 115, "98": [115, 147], "theoret": 115, "insid": [115, 139], "tifftag_freebytecount": 115, "tifftag_freeoffset": 115, "tiffrewritefield": 115, "tiffignoresens": 115, "enumer": 115, "tifftagvalu": 115, "68": 115, "comprehens": 115, "72": 115, "msy": 115, "extrem": [115, 117, 122, 126], "sophist": 115, "chunki": 115, "chunk": [115, 122], "pc": [115, 130, 132, 134], "somewhat": [115, 143], "neg": [115, 121, 124, 125, 130, 140, 159], "learn": [115, 132], "anywai": 115, "noth": [115, 140], "mislead": [115, 125, 143], "obfusc": 115, "p1": [115, 158], "p9": [115, 158], "defer_strile_load": [115, 124, 125], "sd": [115, 165], "llzma": 116, "caution": [116, 143], "git": [117, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "minimum": [117, 129, 134, 135], "cmake": [117, 122, 123, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "libwebp": 117, "libzstd": 117, "fast": [117, 143], "scenario": [117, 121, 159], "entropi": [117, 143], "huff0": 117, "fse": 117, "goe": [117, 126], "6600": 117, "4400": 117, "840": 117, "650": [117, 135], "42735936": 117, "42586822": 117, "25894": 117, "16701": 117, "399": 117, "498": [117, 132], "1m": 117, "419": 117, "622": [117, 134], "336": [117, 140], "compression_zstd": 117, "self": 117, "offici": [117, 141, 143], "photo": [117, 150], "huge": [117, 124, 126, 143, 154], "exce": 117, "graphicsmagick": 117, "hasselblad": 117, "h4d": 117, "200m": 117, "camera": [117, 158], "16352": 117, "12264": 117, "psnr": 117, "536": 117, "506": [117, 134], "03mib": 117, "105": 117, "266": [117, 130, 140], "68mib": 117, "020": 117, "518": [117, 132], "238": 117, "42mib": 117, "009": 117, "056": 117, "247": 117, "61mib": 117, "301": [117, 140], "88mib": 117, "446": 117, "760": 117, "59mib": 117, "00": 117, "019": 117, "330": [117, 130, 140, 152], "38mib": 117, "37": 117, "compression_webp": 117, "derefer": [117, 120, 121, 124, 125, 126, 135], "2770": 117, "craft": 117, "heap": [117, 121, 124, 125, 126, 130, 134], "tifftag_numberofink": [117, 125, 126, 131], "2765": 117, "68122422": 117, "autofuzz": [117, 125], "tiffstreamopen": 117, "s_data": 117, "2772": 117, "circular": 117, "infinit": [117, 120, 147, 158, 159], "travers": 117, "failsaf": 117, "consum": [117, 143], "essenti": 117, "tiffdocu": 117, "behavior": [117, 122, 132, 143, 148, 155], "exhaust": 117, "2017": [117, 126], "11613": 117, "td_stripbytecount": [117, 124, 125, 126], "td_stripoffset": [117, 121, 124], "2724": 117, "strtol": 117, "strtoll": 117, "strtoull": 117, "strtoul": 117, "2018": 117, "7456": 117, "tiffwritedirectorysec": [117, 124, 126, 132, 134, 135], "2795": 117, "reachabl": 117, "denial": [117, 126], "attack": [117, 134], "10963": 117, "2780": 117, "libtiff4": 117, "8905": 117, "gui": 117, "consol": 117, "ce": 117, "frmt": 117, "gtiff": 117, "2800": 117, "2788": 117, "10779": 117, "multiply_m": [117, 125], "compression_ccittfax3": [117, 121], "compression_ccittfax4": [117, 121], "jbigdecod": [117, 126], "harmless": [117, 120, 126, 132, 133], "tif_raws": 117, "chunky_strip_read_support": [117, 125, 126], "lzmapreencod": 117, "verbos": [117, 135], "lzma_stream_encod": 117, "9935": 117, "2704": 117, "long8": [117, 126, 131], "slong8": [117, 126], "ifd8": [117, 131], "2819": 117, "18661": 117, "_separ": 118, "hostil": [118, 121, 133], "strerror": 118, "1221": 118, "2012": [118, 119, 121], "1173": 118, "defend": 118, "2113": 118, "distcheck": [119, 123, 126], "3386": 119, "imageri": [119, 141], "4732": 119, "accessor": 119, "4771": 119, "fx": [119, 140, 142], "3401": 119, "t2p_error": 119, "afaic": 119, "2405": 120, "2498": 120, "cover": [120, 124, 134, 135, 142, 143], "1134470": 120, "dead": [120, 124, 135], "tiffreaddirentrydoublearrai": 120, "298626": 120, "tiffreaddirentryfloatarrai": 120, "298627": 120, "tiffreaddirentryifd8arrai": 120, "298628": 120, "tiffreaddirentryslong8arrai": 120, "298629": 120, "1024310": 120, "jpegcleanup": 120, "298624": 120, "602597": 120, "operand": 120, "2409": 120, "logluvdecodestrip": 120, "991239": 120, "modulo": 120, "logluvdecodetil": 120, "991227": 120, "logluvencodestrip": 120, "991240": 120, "logluvencodetil": 120, "991241": 120, "consecut": 120, "code_clear": 120, "ojpegreadbufferfil": 120, "603400": 120, "ojpegreadheaderinfosecstreamdht": 120, "601720": 120, "tiffstarttil": [120, 126], "715973": 120, "715974": 120, "2510": 120, "annoi": 120, "715975": 120, "715976": 120, "715977": 120, "715978": 120, "715979": 120, "1024225": 120, "untrust": 120, "1024678": 120, "1024679": 120, "1214160": 120, "1024222": 120, "1024890": 120, "1024891": 120, "1024892": 120, "1024893": 120, "1024894": 120, "1024223": 120, "1301206": 120, "bad_shift": 120, "1024887": 120, "1024888": 120, "1024889": 120, "1214162": 120, "2078": 120, "2150": 120, "colortransform": 120, "snprintf": [120, 121, 131], "1024181": 120, "1227690": 120, "298621": 120, "1024306": 120, "1024307": 120, "1024308": 120, "1024309": 120, "1024545": 120, "1024586": 120, "1024796": 120, "nest": 120, "indent": [120, 124, 125], "1024797": 120, "1294542": 120, "1299740": 120, "1299741": 120, "2501": 120, "2014": [120, 121, 124, 126], "8128": [120, 121, 126], "2401": 120, "glflush": 120, "1024386": 120, "1024795": 120, "1024304": 120, "1024305": 120, "298615": 120, "1024649": 120, "unintend": 120, "1024468": 120, "1024727": 120, "1214240": 120, "nextdir": 121, "defect": 121, "sof2": 121, "sof9": [121, 143], "sof10": 121, "mozjpeg": [121, 130], "progress": [121, 126, 130, 137, 143, 159], "forbidden": 121, "jpegtablesmod": 121, "jpegfixuptagssubsampl": [121, 125], "2471": 121, "2487": 121, "8129": 121, "putcontig8bitycbcr42til": [121, 126], "putcontig8bitycbcr41til": [121, 126], "putcontig8bitycbcr21til": [121, 126], "mechaninm": 121, "5054": 121, "lintian": 121, "5756": 121, "2235": 121, "_tifffillstril": 121, "solv": [121, 126, 143], "afl": [121, 124], "_snprintf": 121, "2015": [121, 124, 126, 128], "1900": 121, "dec_codetab": 121, "lzwpredecod": 121, "2459": 121, "tiffmalloc": 121, "tiffreaddirentryoutputerr": 121, "tifftag_globalparametersifd": 121, "cfarepeatpatterndim": 121, "cfapattern": [121, 140], "2457": 121, "weren": 121, "sprintf": [121, 124, 131], "2427": 121, "4447": 121, "tbuf": 121, "stride": 121, "assur": 121, "ocert": 121, "013": 121, "2445": 121, "2443": 121, "itulab": [121, 150], "2479": 121, "2449": 121, "4232": 121, "t2p_process_jpeg_strip": [121, 124], "compet": 121, "fundament": [121, 143], "flaw": [121, 156], "1960": 121, "arithmet": [121, 126, 143], "cycl": 121, "2463": 121, "2485": 121, "8127": [121, 124], "2484": 121, "2489": 121, "2493": 121, "2480": 121, "tileheight": [121, 143], "va_end": 121, "dump_info": 121, "valgrind": 121, "sanit": [121, 125], "2470": [121, 126], "4243": 121, "2451": 121, "oob": 121, "2452": 121, "4244": 121, "2450": 121, "4231": 121, "wrongli": [121, 135, 140], "4564": 121, "linebyt": 121, "unset": [121, 165], "2419": 121, "respond": [121, 137], "1961": 121, "concern": [121, 141, 143], "t2p_write_pdf_pag": 121, "sync": 121, "printout": 121, "realiti": 121, "fseeko": 122, "off_t": 122, "_msc_ver": [122, 134], "1400": 122, "__msvcrt_version__": 122, "0x800": 122, "viabl": 122, "candid": [122, 143], "spite": 122, "provis": 122, "_tiffreadproc": 122, "_tiffwriteproc": 122, "surmount": 122, "poor": [122, 146], "complianc": [123, 143], "2521": 123, "mask": [123, 143, 162], "uchar": 123, "sgisv": 124, "earli": [124, 125, 126], "exposur": 124, "beyond": [124, 125, 126, 135], "tiff_setget_c16_ascii": 124, "tiff_setget_c32_ascii": 124, "2593": 124, "9297": 124, "henri": 124, "salo": 124, "9448": 124, "2591": 124, "_tiffprintfield": 124, "2590": 124, "tiffreadrawstrip1": [124, 125], "2585": 124, "td": [124, 125], "td_nstrip": 124, "tiff_stripchop": 124, "2587": [124, 125], "9273": [124, 125], "msvr": 124, "35105": 124, "axel": 124, "souchet": 124, "vishal": 124, "chauhan": 124, "msrc": 124, "mitig": 124, "2500": 124, "3658": 124, "field_stripoffset": 124, "artifici": 124, "predictorsetup": [124, 125], "3622": 124, "35094": 124, "t2p_seekproc": 124, "35095": 124, "suha": 124, "pixarlogencod": 124, "pixarlogsetupencod": 124, "3990": 124, "25": [124, 140, 159], "el7_2": 124, "rpm": 124, "nikola": 124, "forro": 124, "2544": 124, "tiffreadrawtile1": 124, "mathia": 124, "svensson": 124, "compression_sgilog": 124, "photometric_logl": 124, "clai": 124, "wood": 124, "pixarlogdecod": [124, 125], "5875": 124, "have_snprintf": 124, "6490": 124, "upstream": [124, 132, 133], "kurt": 124, "schwehr": 124, "param": [124, 125], "tifffaxtab": [124, 125], "rais": [124, 125, 126], "wmislead": 124, "formatt": [124, 134], "nextdecod": 124, "lcamtuf": 124, "coredump": 124, "cx": 124, "vuln": 124, "libtiff5": 124, "2508": 124, "regular": [124, 143], "2522": 124, "8665": 124, "limingx": 124, "8683": 124, "zzf": 124, "alibaba": 124, "clang": [124, 126, 131, 132, 133, 135], "analyz": [124, 126, 141], "fax3puteolgd": 124, "tifflinkdirectori": 124, "changeset": 124, "19": [124, 140], "tif_encodestrip": 124, "dumpmodeencod": 124, "shorten": [124, 125], "wshorten": 124, "bitsperpixel": 124, "implicitli": 124, "wconvers": 124, "wshadow": 124, "burden": 124, "destin": [124, 146, 151, 159], "2577": 124, "2576": 124, "yurii": 124, "kaminskii": 124, "2572": 124, "2517": 124, "writebuffertoseparatestrip": 124, "writebuffertocontigtil": 124, "writebuffertoseparatetil": 124, "nixu": 124, "2592": 124, "readcontigtilesintobuff": 124, "35092": 124, "tyler": 124, "bohan": 124, "cisco": 124, "talo": 124, "0187": 124, "5652": 124, "35103": 124, "t2p_readwrite_pdf_image_til": [124, 125], "35101": 124, "35100": 124, "readcontigstripsintobuff": [124, 125], "stack": [124, 126], "35093": 124, "35096": 124, "35097": 124, "35098": 124, "weight": 124, "implic": 124, "2550": 124, "freudenberg": 124, "3623": 124, "2569": 124, "loadimag": [124, 130], "3991": 124, "2543": 124, "3945": 124, "2545": 124, "kaixiang": 124, "zhang": 124, "qihoo": 124, "360": 124, "5321": 124, "5323": 124, "2558": 124, "2559": 124, "misalign": [124, 134], "fsanit": [124, 126], "readdirectori": 124, "cppcheck": 125, "clarifycalcul": 125, "invalidprintfargtype_uint": 125, "agostino": [125, 126], "sarubbo": [125, 126], "2596": 125, "attach": [125, 146], "nasti": [125, 143], "plai": 125, "suffer": [125, 133, 143, 156], "2604": 125, "instanti": 125, "nstrip": 125, "tiffhowmany_32": [125, 134], "td_imagelength": 125, "faulti": 125, "stripbycount": 125, "2608": 125, "ojpegdecod": 125, "ojpegpredecod": [125, 134], "2611": 125, "09": 125, "tifffaxmaint": 125, "tifffaxwhitet": 125, "tifffaxblackt": 125, "2636": 125, "2627": 125, "mb": [125, 126], "1mb": 125, "6757": 125, "jpegsetupencod": 125, "2653": 125, "tiffwritedirectorytagcheckedr": 125, "2535": 125, "tiffreaddirentrycheckedr": 125, "tiffreaddirentrycheckedsr": 125, "infin": 125, "2644": 125, "2643": 125, "2642": 125, "2646": 125, "2647": 125, "expon": 125, "2648": 125, "ismap": [125, 126], "2650": 125, "putagreytil": 125, "undefinedbehaviorsanit": 125, "nicol\u00e1": 125, "pe\u00f1a": 125, "2658": 125, "_tiffcalloc": 125, "2651": 125, "2130": 125, "ojpegreadheaderinfosectablesqt": 125, "ojpegreadheaderinfosectablesdct": 125, "ojpegreadheaderinfosectablesact": 125, "2659": 125, "lzwpostencod": 125, "eoi": [125, 135, 143], "1982": [125, 164], "pixarlogsetupdecod": 125, "2665": 125, "wimplicit": 125, "fallthrough": 125, "2689": 125, "2670": 125, "fax3clos": 125, "alan": 125, "coopersmith": 125, "complement": [125, 134], "myself": [125, 126], "2673": 125, "tifffillstrip": [125, 126], "excess": [125, 126, 131], "setupdecod": [125, 134], "oss": [125, 126, 128, 131, 132, 135], "fuzz": [125, 126, 128, 131, 132, 135], "tifffilltil": [125, 126], "tifffillstripparti": 125, "tiffseek": 125, "read_ahead": 125, "tif_rawdataload": [125, 126], "tiffstartstrip": [125, 126], "chromium": 125, "1545": 125, "1533": 125, "add_m": 125, "1558": 125, "packbitsdecod": 125, "1563": 125, "logl16initst": [125, 126], "dec_bitsleft": 125, "resync": 125, "next_in": 125, "avail_in": 125, "initycbcrconvers": [125, 126], "nan": [125, 132, 134], "1663": 125, "1665": 125, "stricter": [125, 126], "1718": 125, "j\u00f6rg": 125, "ahren": 125, "novemb": 125, "cpdecodedstrip": 125, "2598": 125, "2620": 125, "readseparatestripsintobuff": 125, "2621": 125, "2619": 125, "2594": 125, "2597": 125, "ink": 125, "2599": 125, "2607": 125, "2610": 125, "2605": 125, "psdatacolorcontig": 125, "2633": 125, "2634": 125, "2635": 125, "2638": 125, "t2p_writeproc": 125, "2639": 125, "2640": 125, "extran": 125, "cpcontig2separatebyrow": 125, "cpseparate2contigbyrow": 125, "2656": 125, "2657": 125, "2631": 125, "2672": 125, "2677": 125, "appveyor": 126, "yml": 126, "travi": 126, "ci": 126, "0001": 126, "0002": 126, "helper": 126, "06": 126, "08": 126, "bitbucket": 126, "tifftestcommon": 126, "minggw": 126, "quad": 126, "optflag": 126, "mdd": 126, "1844": 126, "2147483648": 126, "1907": 126, "_tiffcheckfieldisvalidforcodec": [126, 131], "behav": 126, "0063": 126, "2580": 126, "rapha\u00ebl": 126, "hertzog": 126, "2693": 126, "2625": 126, "10095": 126, "2564": 126, "7554": 126, "2561": 126, "5318": 126, "2499": 126, "2441": 126, "2433": 126, "disable_check_tiffswabmacro": 126, "tiffswabxxx": 126, "03": 126, "6924": 126, "tifffetchstripth": [126, 130], "fax3encode2drow": 126, "bytecountlooksbad": 126, "decor": 126, "tiff_nosanitize_unsigned_int_overflow": 126, "anti": 126, "measur": [126, 143, 159], "consumpt": 126, "pmwiki": 126, "upload": 126, "twoissueswiththejpegstandard": 126, "29": [126, 130, 140], "anticip": 126, "spread": 126, "interleavedin": 126, "libtiff_allow_large_libjpeg_mem_alloc": 126, "recompil": 126, "tiff_libjpeg_largest_mem_alloc": 126, "2706": 126, "owl337": 126, "tiffreaddirentryfloat": 126, "nicola": 126, "ruff": 126, "libtiff_jpeg_max_allowed_scan_numb": 126, "tifffilestrip": 126, "05": 126, "_tiffreadencodedstripandallocbuff": 126, "2708": 126, "tiffwritedirectorytagcheckedxxxx": 126, "2712": 126, "30": [126, 130, 140, 143], "tifffiletil": 126, "hit": 126, "2454": 126, "paavo": 126, "held": 126, "_tiffreadtileandallocbuff": 126, "_tiffreadencodedtileandallocbuff": [126, 131], "td_rowsperstrip": 126, "uint_max": 126, "2554": 126, "4096": 126, "2713": 126, "2715": 126, "complementari": [126, 150], "million": [126, 141], "tweak": 126, "libtiff_strile_array_max_resize_count": 126, "2002": 126, "17": [126, 135, 139, 140, 143], "2350": 126, "tiffreaddirentryarrai": 126, "ed": 126, "2675": 126, "logluvinitst": 126, "2683": 126, "stoponerr": 126, "putcontig8bitycbcr44til": 126, "putcontig8bitycbcr12til": 126, "2637": 126, "2691": 126, "image_length": 126, "2700": 126, "2727": 126, "tiffwritedirectorytagsubifd": 126, "2728": 126, "codestream": [126, 128], "redirect": 126, "seekok": 126, "_tiffseekok": 126, "int64_max": 126, "uint64_max": 126, "2726": 126, "adapt": [126, 137], "2735": 126, "honour": 126, "max_memory_to_us": 126, "cf": [126, 134], "162": 126, "initcielabconvers": 126, "3733": 126, "_fax_client_data": 126, "fax_client_data": 126, "moment": 126, "client_data": 126, "gerald": 126, "schade": 126, "oct": 126, "t2p_sample_realize_palett": 126, "16232": 126, "poc": 126, "summari": [127, 128, 129, 130, 131, 132, 133, 134, 135, 159], "resuscit": 128, "have_strtol": 128, "w64": 128, "libm": [128, 131], "great": [128, 143], "fuzzer": [128, 133, 135], "customdirectori": 128, "filesourc": [128, 140], "scenetyp": [128, 140], "tifftag_cfapattern": 128, "tifftag_deflate_subcodec": 128, "deflate_subcodec_zlib": 128, "deflate_subcodec_libdefl": 128, "subcodec": 128, "safeti": [128, 135], "belt": 128, "unforeseen": 128, "256mib": [128, 154, 155, 156, 158, 159], "k": [128, 143, 154, 159], "datas": 128, "c99": 129, "sdk": [129, 131], "revamp": 129, "polici": [129, 135], "supersed": 129, "lcc": 129, "gnulib": 129, "int16": 129, "strongli": [129, 137, 143], "encourag": 129, "stdint": 129, "spot": 129, "analysi": [129, 141], "232": 129, "202": 129, "exit_failur": 129, "arg": 129, "_win32": [129, 134], "333": [130, 140], "pkgconf": 130, "zlib_support": 130, "tiffieldsetgetcounts": 130, "differenti": [130, 140], "9d": 130, "329": 130, "hang": 130, "classic": [130, 147, 158], "gb": [130, 131], "385": 130, "383": 130, "tiffwritedirectorytagdata": 130, "362": 130, "342": 130, "337": [130, 140], "319": [130, 140], "309": 130, "316": [130, 140], "fault": 130, "altitud": [130, 140], "legaci": 130, "395": 130, "380": 130, "382": 130, "extractimagesect": [130, 134], "fpe": [130, 134], "393": 130, "buffsiz": 130, "amend": [130, 132, 134], "273": [130, 140], "352": 130, "400": [130, 140], "incomprehens": 130, "396": 130, "278": [130, 140], "limitmalloc": [130, 134], "284": [130, 140], "mib": [130, 154, 155, 156, 158, 159], "287": [130, 140], "290": [130, 140], "288": [130, 140], "355": 130, "338": [130, 140], "reformat": [131, 132, 159], "restructur": 131, "rst": [131, 134, 135], "artifact": 131, "bump": 131, "sphinx": 131, "wdev": 131, "482": 131, "cmath": 131, "cmath_librari": 131, "fetchcont": 131, "_crt_secure_no_warn": 131, "443": 131, "2022": 131, "android": 131, "leverag": 131, "refactor": 131, "brows": 131, "1048576": 131, "tiff_max_dir_count": 131, "489": 131, "479": 131, "53137": 131, "field_ignor": [131, 135], "438": 131, "tifftag_clippath": 131, "439": 131, "_bitspersampl": 131, "364": 131, "149": 131, "150": 131, "152": 131, "250": 131, "269": [131, 140], "398": 131, "3599": 131, "456": 131, "52309": 131, "455": 131, "getimag": 131, "preset": [131, 158], "449": 131, "225": 131, "tiffsetvalu": 131, "442": [131, 143], "dexpected_jpeg_lib_vers": 131, "433": [131, 140], "486": 131, "34526": 131, "horacc8": 131, "2021": 131, "20220226": 131, "o2": 131, "writesinglesect": 131, "169": 131, "470": 131, "450": 131, "271": [131, 140], "381": 131, "386": 131, "388": 131, "389": 131, "435": [131, 140], "3570": 131, "3598": 131, "page_mode_x": [131, 159], "411": 131, "3627": 131, "413": 131, "3597": 131, "426": 131, "3626": 131, "414": 131, "422": 131, "423": 131, "415": 131, "427": 131, "428": 131, "2056": 131, "2058": 131, "stdout": 131, "441": 131, "curdir": 131, "64k": 131, "discontinu": [132, 133], "tracker": [132, 133], "preview": [132, 155], "feedback": 132, "merge_request": [132, 133, 138], "496": 132, "versioninfo": 132, "sensit": 132, "configwebp": 132, "findliblzma": 132, "finddefl": 132, "526": 132, "findlerc": 132, "tiffconfig": [132, 133], "tiffconfigvers": 132, "interface_include_directori": 132, "hardcod": 132, "alia": 132, "484": 132, "554": 132, "548": 132, "countinknamesstr": 132, "uv_encod": [132, 134], "530": [132, 140], "515": [132, 140], "tif_hash_set": 132, "chanc": 132, "54311": 132, "54343": 132, "ojpegwriteheaderinfo": 132, "manpag": [132, 134], "writeselect": 132, "553": 132, "reus": 132, "527": 132, "rotateimag": 132, "toggl": [132, 162], "buffptr": 132, "region": [132, 146, 159], "492": 132, "493": 132, "495": 132, "499": 132, "519": [132, 140], "buffers": 132, "520": [132, 140], "composit": [132, 134, 140, 155, 156, 159], "497": 132, "500": 132, "501": 132, "num_color": 132, "477": 132, "qsort": 132, "pcompar": 132, "files": 132, "241": 132, "cid": [132, 135], "1524573": 132, "year": 133, "retir": 133, "tiff_include_dir": [133, 134], "tiff_librari": 133, "findtiff": 133, "ship": 133, "589": 133, "tiff_releas": 133, "libtiff_release_d": 133, "tiffv": 133, "dstrip": 133, "600": 133, "__attribute__": 133, "582": 133, "8038": 133, "tiffreaddirectorycheckord": 133, "512": [133, 140], "dtiff": 133, "597": 133, "signed": 133, "591": 133, "test_write_read_tag": 133, "test_transferfunction_write_read": 133, "tarbal": 133, "585": 133, "bypass": 133, "592": 133, "cflag": 134, "605": 134, "liblerc": 134, "644": 134, "uv_decod": 134, "645": 134, "inconsist": 134, "tiffread": 134, "encodedstrip": 134, "encodetil": 134, "375": 134, "subsampling_convert_st": 134, "183": 134, "thunderrl": 134, "ghostpdl": 134, "583": 134, "ubsan": 134, "616": 134, "2023": 134, "52356": 134, "tiffgetfiles": 134, "ram": [134, 156], "tiffhowmany_64": 134, "628": 134, "delet": [134, 143], "579": 134, "_tiffcreateanonfield": 134, "624": 134, "7006": 134, "614": 134, "note_1602683857": 134, "618": 134, "tifftag_ep_cfarepeatpatterndim": 134, "tifftag_ep_cfapattern": 134, "608": 134, "627": 134, "_tiffuint64tofloat": 134, "_tiffuint64todoubl": 134, "background": [134, 155, 156, 162], "gradient": 134, "1605444": 134, "1605445": 134, "16054": 134, "542": 134, "550": 134, "552": 134, "restart": [134, 143], "interv": [134, 143], "539": 134, "253": 134, "596": 134, "1603334": 134, "photometric_ycbcr": 134, "photometric_rgb": 134, "571": 134, "ycbcrposit": [134, 140, 143], "606": 134, "476": 134, "599": 134, "eofb": 134, "191": 134, "unreason": 134, "249": 134, "228": 134, "469": 134, "473": 134, "1472932": 134, "1518997": 134, "tifcp": 134, "tiffwriteencodedxxxx": 134, "1024680": 134, "have_jpegturbo_dual_mode_8_12": 135, "lerc_stat": 135, "cmake_minimum_requir": 135, "llvm": 135, "cmp0074": 135, "linker_languag": 135, "dep": 135, "tiffxx": 135, "674": 135, "wget": 135, "71": 135, "autoreconf": 135, "672": 135, "709": 135, "retri": 135, "synchronis": 135, "read_count": 135, "write_count": 135, "compression_jxl_dng_1_7": 135, "52546": 135, "jpegxl": 135, "field_xxx": 135, "0x80a6": 135, "647": 135, "tiffdefaulttransferfunct": 135, "td_bitspersampl": 135, "10875": 135, "175": 135, "unalloc": 135, "nullptr": 135, "663": 135, "26": [135, 140], "670": 135, "665": 135, "dz_solo": 135, "inflat": 135, "676": 135, "predict": 135, "predictorencoderow": 135, "79": 135, "tiffcvtieeefloatton": 135, "tiffcvtieeedoubleton": 135, "699": 135, "698": 135, "_tiffcheckdirnumberandoffset": 135, "711": 135, "jpegencoderaw": 135, "714": 135, "jpeg_lib_mk1_or_12bit": 135, "12bit": 135, "717": 135, "jpeg_max_dimens": 135, "packbits_read_onli": 135, "lzw_read_onli": 135, "lerc_read_onli": 135, "154": 135, "set_get_field_typ": 135, "warnig": 135, "dismiss": 135, "708": 135, "tiff_itrunc": 135, "rand": 135, "logluv_publ": 135, "md": 135, "431": 135, "un": 135, "642": 135, "clarifi": [135, 138, 143], "entranc": 135, "awaresystem": 135, "miscelan": 135, "todo": 135, "681": 135, "pack_word": 135, "trail": [135, 147, 158], "467": 135, "28c38d648b64a66c3218778c4745225fe3e3a06d": 135, "649": 135, "tifftagtilewidth": 135, "h_samp": 135, "v_samp": 135, "multiplic": 135, "optimis": 135, "546": 135, "broader": 135, "682": 135, "707": 135, "thumbail": 135, "715": 135, "716": 135, "721": 135, "734": 135, "1373365": 135, "taint": 135, "datamem": 135, "divisor": 135, "modulu": 135, "tiffgetfil": 135, "729": 135, "tiff_read_rgba_fuzz": 135, "conduct": 136, "spatial": [137, 141], "adopt": [137, 143], "membership": 137, "busi": 137, "veto": 137, "ultim": 137, "parti": [137, 139, 141], "mild": 137, "disagr": 137, "opinion": 137, "receiv": [137, 146], "satisfi": [137, 143], "resubmit": 137, "elig": 137, "voter": 137, "announc": 137, "withdraw": 137, "chair": 137, "adjud": 137, "disput": 137, "subsystem": 137, "controversi": 137, "down": [137, 143, 159], "obstructionist": 137, "vetoer": 137, "convinc": 137, "consensu": 137, "subject": [137, 143, 154], "approv": [138, 141, 143], "reactiv": 138, "hole": 138, "sisyphean": 138, "wontfix": 138, "569": 138, "mr": 138, "traceabl": 138, "label": 138, "580": 138, "carlsen": 139, "formerli": 139, "next_ifd": 139, "tradition": 139, "tf8": 139, "btf": 139, "bytes": 139, "threshold": [139, 140, 160], "amongst": 139, "hardli": [139, 143], "bigtiffsampl": 139, "wayback": 139, "mm": 140, "newsubfiletyp": 140, "plu": [140, 145, 159], "group3opt": [140, 147], "1728": [140, 147], "2048": [140, 159], "2482": 140, "dubiou": 140, "compand": 140, "pkzip": 140, "anyher": 140, "gward": 140, "pixformat": 140, "tiffluv": 140, "apart": 140, "internet": 140, "loc": [140, 141, 142], "gov": [140, 141, 142], "digit": [140, 141, 142, 143], "tiff_tag": 140, "shtml": [140, 141, 142], "254": 140, "oldsubfiletyp": 140, "257": 140, "258": 140, "259": 140, "262": [140, 165], "263": 140, "cellwidth": 140, "264": 140, "celllength": 140, "265": 140, "274": [140, 152], "279": 140, "280": 140, "281": 140, "282": [140, 165], "283": [140, 165], "285": 140, "xposit": 140, "286": 140, "yposit": 140, "freeoffset": 140, "freebytecount": 140, "289": 140, "grayresponseunit": 140, "grayresponsecurv": [140, 157], "291": 140, "296": [140, 165], "297": [140, 164], "colorresponseunit": 140, "300": [140, 159, 165], "305": 140, "306": 140, "315": [140, 165], "318": 140, "321": 140, "322": 140, "324": 140, "332": 140, "334": 140, "339": 140, "340": 140, "344": 140, "345": 140, "529": 140, "531": 140, "32995": 140, "32996": 140, "32997": 140, "tiledepth": 140, "32998": 140, "33300": 140, "33301": 140, "33302": 140, "33303": 140, "33304": 140, "33305": 140, "33306": 140, "33432": 140, "33723": 140, "naa": 140, "di": [140, 143], "12234": 140, "34377": 140, "exififdoffset": 140, "34665": 140, "34675": 140, "gpsifdoffset": 140, "34853": 140, "34908": 140, "34909": 140, "34910": 140, "faxdc": 140, "37439": 140, "37724": 140, "interoperabilityifdoffset": 140, "40965": 140, "dngversion": 140, "50706": 140, "dngbackwardvers": 140, "50707": 140, "uniquecameramodel": 140, "50708": 140, "localizedcameramodel": 140, "50709": 140, "cfaplanecolor": 140, "50710": 140, "cfalayout": 140, "50711": 140, "linearizationt": 140, "50712": 140, "blacklevelrepeatdim": 140, "50713": 140, "blacklevel": 140, "50714": 140, "blackleveldeltah": 140, "50715": 140, "blackleveldeltav": 140, "50716": 140, "whitelevel": 140, "50717": 140, "defaultscal": 140, "50718": 140, "defaultcroporigin": 140, "50719": 140, "defaultcrops": 140, "50720": 140, "colormatrix1": 140, "50721": 140, "colormatrix2": 140, "50722": 140, "cameracalibration1": 140, "50723": 140, "cameracalibration2": 140, "50724": 140, "reductionmatrix1": 140, "50725": 140, "reductionmatrix2": 140, "50726": 140, "analogbal": 140, "50727": 140, "asshotneutr": 140, "50728": 140, "asshotwhitexi": 140, "50729": 140, "baselineexposur": 140, "50730": 140, "baselinenois": 140, "50731": 140, "baselinesharp": 140, "50732": 140, "bayergreensplit": 140, "50733": 140, "linearresponselimit": 140, "50734": 140, "cameraserialnumb": 140, "50735": 140, "50736": 140, "chromablurradiu": 140, "50737": 140, "antialiasstrength": 140, "50738": 140, "shadowscal": 140, "50739": 140, "dngprivatedata": 140, "50740": 140, "makernotesafeti": 140, "50741": 140, "calibrationilluminant1": 140, "50778": 140, "calibrationilluminant2": 140, "50779": 140, "bestqualityscal": 140, "50780": 140, "rawdatauniqueid": 140, "50781": 140, "originalrawfilenam": 140, "50827": 140, "originalrawfiledata": 140, "50828": 140, "activearea": 140, "50829": 140, "maskedarea": 140, "50830": 140, "asshoticcprofil": 140, "50831": 140, "asshotpreprofilematrix": 140, "50832": 140, "currenticcprofil": 140, "50833": 140, "currentpreprofilematrix": 140, "50834": 140, "persampl": 140, "65563": 140, "346": 140, "globalparametersifd": 140, "profiletyp": 140, "401": 140, "faxprofil": 140, "402": 140, "codingmethod": 140, "403": 140, "versionyear": 140, "404": 140, "modenumb": 140, "405": 140, "imagebasecolor": 140, "434": 140, "t82option": 140, "striprowcount": 140, "559": 140, "imagelay": 140, "34732": 140, "elabor": 140, "porter": 140, "duff": 140, "84": 140, "siggraph": [140, 164], "volumetr": 140, "3d": 140, "subvolum": 140, "317": 140, "347": [140, 143], "jpeginterchangeformat": [140, 143], "jpeginterchangeformatlength": 140, "514": 140, "jpegqtabl": [140, 143], "jpegdctabl": 140, "jpegact": 140, "521": 140, "jpegproc": 140, "jpegrestartinterv": 140, "326": 140, "327": 140, "292": 140, "lercparamet": 140, "50674": 140, "exposuretim": 140, "33434": 140, "fnumber": 140, "33437": 140, "exposureprogram": 140, "34850": 140, "spectralsensit": 140, "34852": 140, "isospeedr": 140, "34855": 140, "photographicsensit": 140, "optoelectricconversionfactor": 140, "34856": 140, "sensitivitytyp": 140, "34864": 140, "standardoutputsensit": 140, "34865": 140, "recommendedexposureindex": 140, "34866": 140, "isospe": 140, "34867": 140, "isospeedlatitudeyyi": 140, "34868": 140, "isospeedlatitudezzz": 140, "34869": 140, "exifvers": 140, "36864": 140, "datetimeorigin": 140, "datetimedigit": 140, "36868": 140, "offsettim": 140, "36880": 140, "offsettimeorigin": 140, "36881": 140, "offsettimedigit": 140, "36882": 140, "componentsconfigur": 140, "37121": 140, "compressedbitsperpixel": 140, "37122": 140, "shutterspeedvalu": 140, "37377": 140, "aperturevalu": 140, "37378": 140, "brightnessvalu": 140, "37379": 140, "exposurebiasvalu": 140, "37380": 140, "maxaperturevalu": 140, "37381": 140, "37382": 140, "meteringmod": 140, "37383": 140, "lightsourc": 140, "37384": 140, "flash": 140, "37385": 140, "focallength": 140, "37386": 140, "subjectarea": 140, "37396": 140, "makernot": 140, "37500": 140, "usercom": 140, "37510": 140, "subsectim": 140, "37520": 140, "subsectimeorigin": 140, "37521": 140, "subsectimedigit": 140, "37522": 140, "37888": 140, "humid": 140, "37889": 140, "pressur": 140, "37890": 140, "waterdepth": 140, "37891": 140, "acceler": [140, 141], "37892": 140, "cameraelevationangl": 140, "37893": 140, "flashpixvers": 140, "40960": 140, "pixelxdimens": 140, "40962": 140, "pixelydimens": 140, "40963": 140, "relatedsoundfil": 140, "40964": 140, "flashenergi": 140, "41483": 140, "spatialfrequencyrespons": 140, "41484": 140, "focalplanexresolut": 140, "41486": 140, "focalplaneyresolut": 140, "41487": 140, "focalplaneresolutionunit": 140, "41488": 140, "subjectloc": 140, "41492": 140, "exposureindex": 140, "41493": 140, "sensingmethod": 140, "41495": 140, "41728": 140, "41729": 140, "41730": 140, "customrend": 140, "41985": 140, "exposuremod": 140, "41986": 140, "whitebal": 140, "41987": 140, "digitalzoomratio": 140, "41988": 140, "focallengthin35mmfilm": 140, "41989": 140, "scenecapturetyp": 140, "41990": 140, "gaincontrol": 140, "41991": 140, "41992": 140, "41993": 140, "sharp": 140, "41994": 140, "devicesettingdescript": 140, "41995": 140, "subjectdistancerang": 140, "41996": 140, "imageuniqueid": 140, "42016": 140, "cameraownernam": 140, "42032": 140, "bodyserialnumb": 140, "42033": 140, "lensspecif": 140, "42034": 140, "lensmak": 140, "42035": 140, "lensmodel": 140, "42036": 140, "lensserialnumb": 140, "42037": 140, "42240": 140, "compositeimag": 140, "42080": 140, "sourceimagenumberofcompositeimag": 140, "42081": 140, "sourceexposuretimesofcompositeimag": 140, "42082": 140, "versionid": 140, "latituderef": 140, "latitud": 140, "longituderef": 140, "longitud": 140, "altituderef": 140, "timestamp": 140, "satellit": 140, "measuremod": 140, "dop": 140, "speedref": 140, "trackref": 140, "imgdirectionref": 140, "imgdirect": 140, "mapdatum": 140, "destlatituderef": 140, "destlatitud": 140, "destlongituderef": 140, "destlongitud": 140, "destbearingref": 140, "destbear": 140, "destdistanceref": 140, "destdist": 140, "processingmethod": 140, "27": 140, "areainform": 140, "28": [140, 153], "datestamp": 140, "horizontalpositioningerror": 140, "31": 140, "staff": 141, "owner": 141, "fdd": [141, 142], "fdd000328": 141, "confront": 141, "scanner": 141, "medic": 141, "fund": 141, "world": 141, "power": 141, "plan": 141, "geograph": 141, "1969": 141, "leader": 141, "gi": 141, "innov": 141, "desktop": 141, "thousand": 141, "server": 141, "foundat": 141, "leica": 141, "geosystem": 141, "workflow": 141, "photogrammetri": 141, "catalog": 141, "exploit": 141, "enterpris": 141, "educ": 141, "trust": 141, "seamless": 141, "interoper": 141, "superior": 141, "maker": 141, "fme": 141, "etl": 141, "translat": [141, 156], "cad": 141, "databas": 141, "market": 141, "weogeo": 141, "intuit": 141, "scalabl": 141, "amazon": 141, "aw": 141, "tiff6": 142, "itu": [142, 150, 154], "itudoc": 142, "com16": 142, "fdd000022": 142, "variat": [142, 143], "mar": 143, "june": 143, "1992": 143, "discourag": 143, "tech": 143, "abandon": 143, "publish": 143, "lightli": 143, "engin": 143, "wors": [143, 155], "themselv": 143, "thought": 143, "jpegxxtabl": 143, "editor": 143, "reloc": 143, "crucial": 143, "properti": 143, "arcana": 143, "inspect": [143, 148, 162], "moreov": 143, "neglect": 143, "fact": 143, "prohibit": 143, "proscript": 143, "relationship": 143, "impedi": 143, "ti": [143, 159], "treatment": 143, "unclear": 143, "omit": [143, 150], "nomin": 143, "impos": 143, "datastream": 143, "clearli": 143, "goal": 143, "chip": 143, "104": 143, "contradict": 143, "mcu": 143, "synthes": 143, "feed": 143, "reconstruct": 143, "fair": 143, "nor": 143, "inde": 143, "subset": 143, "upward": 143, "unaccept": 143, "frequenc": 143, "uninterpret": 143, "forgiv": 143, "unmodifi": 143, "notion": [143, 155], "abbrevi": [143, 159], "tone": [143, 146], "10918": 143, "joint": 143, "photograph": 143, "expert": 143, "broad": 143, "scope": 143, "becam": 143, "toolkit": 143, "meet": 143, "lossi": 143, "trade": 143, "fidel": 143, "indistinguish": 143, "hierarch": 143, "japanes": 143, "interchang": 143, "adjac": 143, "customari": 143, "degrad": 143, "blind": 143, "popular": 143, "conveni": 143, "excus": 143, "repeat": [143, 155], "constantli": 143, "frame": [143, 164], "sofn": 143, "rstn": 143, "dri": 143, "dqt": 143, "dht": 143, "dac": 143, "appn": 143, "dnl": 143, "occurr": 143, "reli": 143, "carri": 143, "sof0": 143, "strict": 143, "sof1": 143, "sof3": 143, "sof11": 143, "pad": [143, 147], "dimension": [143, 147, 158, 159, 160], "dct": 143, "largest": [143, 159], "simplic": 143, "unimport": 143, "constraint": 143, "regardless": [143, 159], "surround": 143, "bulki": 143, "15b": 143, "hundr": 143, "cue": 143, "fed": 143, "preload": 143, "redefin": 143, "slot": 143, "mere": 143, "confin": [143, 159], "deviat": 143, "1h1v": 143, "2h1v": 143, "2h2v": 143, "alon": 143, "minim": [143, 144], "nondefault": 143, "remind": [143, 154], "inappropri": 143, "prefer": [143, 154], "possibli": [143, 144, 145], "evolv": 143, "hardwar": 143, "slower": 143, "alik": 143, "ideal": 143, "transport": 143, "undesir": 143, "harder": 143, "losslessli": 143, "undo": 143, "redo": 143, "invent": 143, "expans": 143, "render": [143, 155], "unread": 143, "wallac": 143, "gregori": 143, "acm": 143, "vol": 143, "34": 143, "pp": [143, 164], "pennebak": 143, "mitchel": 143, "joan": 143, "nostrand": 143, "reinhold": 143, "isbn": 143, "01272": 143, "638pp": 143, "textbook": 143, "exposit": 143, "februari": 143, "cheaper": 143, "paragraph": 143, "89": 143, "replic": 143, "despit": 143, "91": 143, "chromasubsamplehoriz": 143, "chroma": 143, "chromasubsamplevert": 143, "nx1": 144, "nxm": 144, "daunt": 144, "interrog": 145, "quick": 145, "orthogon": 145, "invert": [145, 154, 159, 165], "verbatim": 145, "someon": 145, "paul": [145, 160, 164], "heckbert": [145, 160, 164], "median": [145, 164], "serial": [146, 155], "drawn": 146, "font": 146, "straightforward": 146, "ineffect": 146, "br": 146, "dot": [146, 149], "resynchron": 146, "modem": 147, "medium": 147, "land": 147, "stretch": 147, "prematur": 147, "en": 147, "shorter": 147, "ran": 147, "middl": [147, 162], "den": 147, "remaind": 147, "apparatu": 147, "numentri": 148, "striprow": [148, 149, 151, 153, 156], "synopsi": 149, "pgm": 149, "raw2tif": 150, "statist": 150, "cautiou": 150, "mathemat": 150, "ordinari": 150, "src1": [151, 158, 159], "src2": 151, "dst": [151, 158, 159], "bi": 151, "chromin": 151, "sketch": 152, "216": 152, "linear": 152, "exp50": 152, "exponenti": 152, "exp60": 152, "exp70": 152, "70": 152, "exp80": 152, "exp90": 152, "exp": 152, "percentag": 153, "59": 153, "redperc": 153, "greenperc": 153, "blueperc": 153, "10000": [154, 158, 159], "81": 154, "lz77": 154, "transcod": 154, "passthrough": 154, "extent": 154, "distanc": 154, "monochrom": [154, 158], "a4": 154, "xre": 154, "yre": 154, "yyyymmddhhmmss": 154, "keyword": 154, "colorimag": 155, "slow": 155, "ascii85": 155, "nb": 155, "duplex": 155, "sheet": [155, 159], "conjunct": [155, 159], "deep": 155, "ifdoffset": 155, "pageorient": 155, "landscap": [155, 159], "portrait": [155, 159], "eg": [155, 159], "counterclockwis": 155, "ccw": 155, "bind": 155, "outer": 155, "a2": 155, "lpr": 155, "h11": 155, "w8": 155, "h14": 155, "5x11": 155, "onto": 155, "six": 155, "matter": 155, "blend": 156, "ingest": 156, "file1": 157, "file2": 157, "notabl": 157, "colorresponsecurv": 157, "srcn": [158, 159], "reorgan": [158, 159], "subtract": 158, "saw": 158, "shutter": 158, "li": [158, 159, 160], "undergo": [158, 159, 160, 164], "fastest": 158, "slowest": 158, "p12": 158, "s0": 158, "comma": [158, 159], "1000": [158, 159], "1st": [158, 159], "3rd": [158, 159], "album": [158, 159], "denot": 158, "ccd": 158, "bar": [159, 162], "ocr": 159, "subdivid": 159, "broadli": 159, "zone": 159, "subdivis": 159, "invers": 159, "obviou": 159, "dash": 159, "join": 159, "5th": 159, "7th": 159, "arrang": 159, "stem": 159, "cm": 159, "px": 159, "axi": 159, "quarter": 159, "x1": 159, "y1": 159, "x2": 159, "y2": 159, "xn": 159, "yn": 159, "colon": 159, "delimit": 159, "horiz": 159, "vert": 159, "clockwis": 159, "dark": 159, "photometric_interpret": 159, "fewest": 159, "opt1": 159, "value1": 159, "opt2": 159, "value2": 159, "opt3": 159, "value3": 159, "opt4": 159, "value4": 159, "vari": 159, "dumpnam": 159, "ddevelmod": 159, "microfilm": 159, "microfilmneg": 159, "microfilmpostivecent": 159, "tabloid": 159, "platmap": 159, "bigplatmap": 159, "dpi": [159, 165], "2049": 159, "4097": 159, "checkscan": 159, "001": 159, "002": 159, "nnn": 159, "uniqu": 159, "problemat": 159, "distort": 159, "loos": 159, "moder": 159, "scientif": 159, "dataset": 159, "research": 159, "floyd": [160, 164], "steinberg": [160, 164], "enclos": 161, "800": 161, "investig": 161, "hexadecim": [161, 162, 163], "octal": [161, 162, 163], "4th": 162, "mous": 162, "button": 162, "keyboard": 162, "pageup": 162, "pagedown": 162, "unimpl": 162, "foreground": 162, "wider": 162, "taller": 162, "sensibl": 163, "closest": 164, "307": 164, "dirnumb": 165, "tagnumb": 165, "diroffset": 165, "descrip": 165, "lexic": 166, "aaa": 166, "zzz": 166, "xaaa": 166, "xaab": 166, "xzzz": 166}, "objects": {"": [[4, 0, 1, "c.TIFFAccessTagMethods", "TIFFAccessTagMethods"], [53, 0, 1, "c.TIFFCIELabToRGBInit", "TIFFCIELabToRGBInit"], [53, 0, 1, "c.TIFFCIELabToXYZ", "TIFFCIELabToXYZ"], [59, 0, 1, "c.TIFFCheckTile", "TIFFCheckTile"], [44, 0, 1, "c.TIFFCheckpointDirectory", "TIFFCheckpointDirectory"], [6, 0, 1, "c.TIFFCleanup", "TIFFCleanup"], [23, 0, 1, "c.TIFFClientOpen", "TIFFClientOpen"], [23, 0, 1, "c.TIFFClientOpenExt", "TIFFClientOpenExt"], [23, 0, 1, "c.TIFFClientdata", "TIFFClientdata"], [6, 0, 1, "c.TIFFClose", "TIFFClose"], [23, 2, 1, "c.TIFFCloseProc", "TIFFCloseProc"], [57, 0, 1, "c.TIFFComputeStrip", "TIFFComputeStrip"], [59, 0, 1, "c.TIFFComputeTile", "TIFFComputeTile"], [8, 0, 1, "c.TIFFCreateCustomDirectory", "TIFFCreateCustomDirectory"], [7, 0, 1, "c.TIFFCreateDirectory", "TIFFCreateDirectory"], [8, 0, 1, "c.TIFFCreateEXIFDirectory", "TIFFCreateEXIFDirectory"], [8, 0, 1, "c.TIFFCreateGPSDirectory", "TIFFCreateGPSDirectory"], [55, 0, 1, "c.TIFFCurrentDirOffset", "TIFFCurrentDirOffset"], [55, 0, 1, "c.TIFFCurrentDirectory", "TIFFCurrentDirectory"], [55, 0, 1, "c.TIFFCurrentRow", "TIFFCurrentRow"], [55, 0, 1, "c.TIFFCurrentStrip", "TIFFCurrentStrip"], [55, 0, 1, "c.TIFFCurrentTile", "TIFFCurrentTile"], [10, 0, 1, "c.TIFFDataWidth", "TIFFDataWidth"], [57, 0, 1, "c.TIFFDefaultStripSize", "TIFFDefaultStripSize"], [59, 0, 1, "c.TIFFDefaultTileSize", "TIFFDefaultTileSize"], [11, 0, 1, "c.TIFFDeferStrileArrayWriting", "TIFFDeferStrileArrayWriting"], [12, 0, 1, "c.TIFFError", "TIFFError"], [12, 0, 1, "c.TIFFErrorExt", "TIFFErrorExt"], [12, 0, 1, "c.TIFFErrorExtR", "TIFFErrorExtR"], [12, 2, 1, "c.TIFFErrorHandler", "TIFFErrorHandler"], [12, 2, 1, "c.TIFFErrorHandlerExt", "TIFFErrorHandlerExt"], [12, 2, 1, "c.TIFFErrorHandlerExtR", "TIFFErrorHandlerExtR"], [23, 0, 1, "c.TIFFFdOpen", "TIFFFdOpen"], [23, 0, 1, "c.TIFFFdOpenExt", "TIFFFdOpenExt"], [13, 0, 1, "c.TIFFFieldDataType", "TIFFFieldDataType"], [16, 0, 1, "c.TIFFFieldIsAnonymous", "TIFFFieldIsAnonymous"], [14, 0, 1, "c.TIFFFieldName", "TIFFFieldName"], [15, 0, 1, "c.TIFFFieldPassCount", "TIFFFieldPassCount"], [17, 0, 1, "c.TIFFFieldReadCount", "TIFFFieldReadCount"], [16, 0, 1, "c.TIFFFieldSetGetCountSize", "TIFFFieldSetGetCountSize"], [16, 0, 1, "c.TIFFFieldSetGetSize", "TIFFFieldSetGetSize"], [18, 0, 1, "c.TIFFFieldTag", "TIFFFieldTag"], [16, 0, 1, "c.TIFFFieldWithName", "TIFFFieldWithName"], [16, 0, 1, "c.TIFFFieldWithTag", "TIFFFieldWithTag"], [19, 0, 1, "c.TIFFFieldWriteCount", "TIFFFieldWriteCount"], [55, 0, 1, "c.TIFFFileName", "TIFFFileName"], [55, 0, 1, "c.TIFFFileno", "TIFFFileno"], [52, 0, 1, "c.TIFFFindCODEC", "TIFFFindCODEC"], [16, 0, 1, "c.TIFFFindField", "TIFFFindField"], [20, 0, 1, "c.TIFFFlush", "TIFFFlush"], [20, 0, 1, "c.TIFFFlushData", "TIFFFlushData"], [11, 0, 1, "c.TIFFForceStrileArrayWriting", "TIFFForceStrileArrayWriting"], [7, 0, 1, "c.TIFFFreeDirectory", "TIFFFreeDirectory"], [32, 4, 1, "c.TIFFGetA", "TIFFGetA"], [32, 4, 1, "c.TIFFGetB", "TIFFGetB"], [58, 0, 1, "c.TIFFGetBitRevTable", "TIFFGetBitRevTable"], [5, 0, 1, "c.TIFFGetClientInfo", "TIFFGetClientInfo"], [26, 0, 1, "c.TIFFGetCloseProc", "TIFFGetCloseProc"], [52, 0, 1, "c.TIFFGetConfiguredCODECs", "TIFFGetConfiguredCODECs"], [21, 0, 1, "c.TIFFGetField", "TIFFGetField"], [21, 0, 1, "c.TIFFGetFieldDefaulted", "TIFFGetFieldDefaulted"], [32, 4, 1, "c.TIFFGetG", "TIFFGetG"], [26, 0, 1, "c.TIFFGetMapFileProc", "TIFFGetMapFileProc"], [55, 0, 1, "c.TIFFGetMode", "TIFFGetMode"], [32, 4, 1, "c.TIFFGetR", "TIFFGetR"], [26, 0, 1, "c.TIFFGetReadProc", "TIFFGetReadProc"], [26, 0, 1, "c.TIFFGetSeekProc", "TIFFGetSeekProc"], [26, 0, 1, "c.TIFFGetSizeProc", "TIFFGetSizeProc"], [42, 0, 1, "c.TIFFGetStrileByteCount", "TIFFGetStrileByteCount"], [42, 0, 1, "c.TIFFGetStrileByteCountWithErr", "TIFFGetStrileByteCountWithErr"], [42, 0, 1, "c.TIFFGetStrileOffset", "TIFFGetStrileOffset"], [42, 0, 1, "c.TIFFGetStrileOffsetWithErr", "TIFFGetStrileOffsetWithErr"], [9, 0, 1, "c.TIFFGetTagListCount", "TIFFGetTagListCount"], [9, 0, 1, "c.TIFFGetTagListEntry", "TIFFGetTagListEntry"], [26, 0, 1, "c.TIFFGetUnmapFileProc", "TIFFGetUnmapFileProc"], [55, 0, 1, "c.TIFFGetVersion", "TIFFGetVersion"], [26, 0, 1, "c.TIFFGetWriteProc", "TIFFGetWriteProc"], [55, 0, 1, "c.TIFFIsBigEndian", "TIFFIsBigEndian"], [55, 0, 1, "c.TIFFIsBigTIFF", "TIFFIsBigTIFF"], [55, 0, 1, "c.TIFFIsByteSwapped", "TIFFIsByteSwapped"], [52, 0, 1, "c.TIFFIsCODECConfigured", "TIFFIsCODECConfigured"], [55, 0, 1, "c.TIFFIsMSB2LSB", "TIFFIsMSB2LSB"], [55, 0, 1, "c.TIFFIsTiled", "TIFFIsTiled"], [55, 0, 1, "c.TIFFIsUpSampled", "TIFFIsUpSampled"], [55, 0, 1, "c.TIFFLastDirectory", "TIFFLastDirectory"], [23, 2, 1, "c.TIFFMapFileProc", "TIFFMapFileProc"], [22, 0, 1, "c.TIFFMergeFieldInfo", "TIFFMergeFieldInfo"], [55, 0, 1, "c.TIFFNumberOfDirectories", "TIFFNumberOfDirectories"], [57, 0, 1, "c.TIFFNumberOfStrips", "TIFFNumberOfStrips"], [59, 0, 1, "c.TIFFNumberOfTiles", "TIFFNumberOfTiles"], [23, 0, 1, "c.TIFFOpen", "TIFFOpen"], [23, 0, 1, "c.TIFFOpenExt", "TIFFOpenExt"], [24, 2, 1, "c.TIFFOpenOptions", "TIFFOpenOptions"], [24, 0, 1, "c.TIFFOpenOptionsAlloc", "TIFFOpenOptionsAlloc"], [24, 0, 1, "c.TIFFOpenOptionsFree", "TIFFOpenOptionsFree"], [24, 0, 1, "c.TIFFOpenOptionsSetErrorHandlerExtR", "TIFFOpenOptionsSetErrorHandlerExtR"], [24, 0, 1, "c.TIFFOpenOptionsSetMaxCumulatedMemAlloc", "TIFFOpenOptionsSetMaxCumulatedMemAlloc"], [24, 0, 1, "c.TIFFOpenOptionsSetMaxSingleMemAlloc", "TIFFOpenOptionsSetMaxSingleMemAlloc"], [24, 0, 1, "c.TIFFOpenOptionsSetWarnAboutUnknownTags", "TIFFOpenOptionsSetWarnAboutUnknownTags"], [24, 0, 1, "c.TIFFOpenOptionsSetWarningHandlerExtR", "TIFFOpenOptionsSetWarningHandlerExtR"], [23, 0, 1, "c.TIFFOpenW", "TIFFOpenW"], [23, 0, 1, "c.TIFFOpenWExt", "TIFFOpenWExt"], [25, 0, 1, "c.TIFFPrintDirectory", "TIFFPrintDirectory"], [27, 2, 1, "c.TIFFRGBAImage", "TIFFRGBAImage"], [27, 0, 1, "c.TIFFRGBAImageBegin", "TIFFRGBAImageBegin"], [27, 0, 1, "c.TIFFRGBAImageEnd", "TIFFRGBAImageEnd"], [27, 0, 1, "c.TIFFRGBAImageGet", "TIFFRGBAImageGet"], [27, 0, 1, "c.TIFFRGBAImageOK", "TIFFRGBAImageOK"], [27, 2, 1, "c.TIFFRGBValue", "TIFFRGBValue"], [56, 0, 1, "c.TIFFRasterScanlineSize", "TIFFRasterScanlineSize"], [56, 0, 1, "c.TIFFRasterScanlineSize64", "TIFFRasterScanlineSize64"], [57, 0, 1, "c.TIFFRawStripSize", "TIFFRawStripSize"], [57, 0, 1, "c.TIFFRawStripSize64", "TIFFRawStripSize64"], [51, 0, 1, "c.TIFFReadBufferSetup", "TIFFReadBufferSetup"], [8, 0, 1, "c.TIFFReadCustomDirectory", "TIFFReadCustomDirectory"], [28, 0, 1, "c.TIFFReadDirectory", "TIFFReadDirectory"], [8, 0, 1, "c.TIFFReadEXIFDirectory", "TIFFReadEXIFDirectory"], [29, 0, 1, "c.TIFFReadEncodedStrip", "TIFFReadEncodedStrip"], [30, 0, 1, "c.TIFFReadEncodedTile", "TIFFReadEncodedTile"], [31, 0, 1, "c.TIFFReadFromUserBuffer", "TIFFReadFromUserBuffer"], [8, 0, 1, "c.TIFFReadGPSDirectory", "TIFFReadGPSDirectory"], [32, 0, 1, "c.TIFFReadRGBAImage", "TIFFReadRGBAImage"], [32, 0, 1, "c.TIFFReadRGBAImageOriented", "TIFFReadRGBAImageOriented"], [33, 0, 1, "c.TIFFReadRGBAStrip", "TIFFReadRGBAStrip"], [33, 0, 1, "c.TIFFReadRGBAStripExt", "TIFFReadRGBAStripExt"], [34, 0, 1, "c.TIFFReadRGBATile", "TIFFReadRGBATile"], [34, 0, 1, "c.TIFFReadRGBATileExt", "TIFFReadRGBATileExt"], [35, 0, 1, "c.TIFFReadRawStrip", "TIFFReadRawStrip"], [36, 0, 1, "c.TIFFReadRawTile", "TIFFReadRawTile"], [37, 0, 1, "c.TIFFReadScanline", "TIFFReadScanline"], [38, 0, 1, "c.TIFFReadTile", "TIFFReadTile"], [23, 2, 1, "c.TIFFReadWriteProc", "TIFFReadWriteProc"], [52, 0, 1, "c.TIFFRegisterCODEC", "TIFFRegisterCODEC"], [58, 0, 1, "c.TIFFReverseBits", "TIFFReverseBits"], [44, 0, 1, "c.TIFFRewriteDirectory", "TIFFRewriteDirectory"], [56, 0, 1, "c.TIFFScanlineSize", "TIFFScanlineSize"], [56, 0, 1, "c.TIFFScanlineSize64", "TIFFScanlineSize64"], [23, 2, 1, "c.TIFFSeekProc", "TIFFSeekProc"], [5, 0, 1, "c.TIFFSetClientInfo", "TIFFSetClientInfo"], [23, 0, 1, "c.TIFFSetClientdata", "TIFFSetClientdata"], [52, 0, 1, "c.TIFFSetCompressionScheme", "TIFFSetCompressionScheme"], [39, 0, 1, "c.TIFFSetDirectory", "TIFFSetDirectory"], [12, 0, 1, "c.TIFFSetErrorHandler", "TIFFSetErrorHandler"], [12, 0, 1, "c.TIFFSetErrorHandlerExt", "TIFFSetErrorHandlerExt"], [40, 0, 1, "c.TIFFSetField", "TIFFSetField"], [23, 0, 1, "c.TIFFSetFileName", "TIFFSetFileName"], [23, 0, 1, "c.TIFFSetFileno", "TIFFSetFileno"], [23, 0, 1, "c.TIFFSetMode", "TIFFSetMode"], [39, 0, 1, "c.TIFFSetSubDirectory", "TIFFSetSubDirectory"], [41, 0, 1, "c.TIFFSetTagExtender", "TIFFSetTagExtender"], [43, 0, 1, "c.TIFFSetWarningHandler", "TIFFSetWarningHandler"], [43, 0, 1, "c.TIFFSetWarningHandlerExt", "TIFFSetWarningHandlerExt"], [44, 0, 1, "c.TIFFSetWriteOffset", "TIFFSetWriteOffset"], [57, 0, 1, "c.TIFFSetupStrips", "TIFFSetupStrips"], [23, 2, 1, "c.TIFFSizeProc", "TIFFSizeProc"], [57, 0, 1, "c.TIFFStripSize", "TIFFStripSize"], [57, 0, 1, "c.TIFFStripSize64", "TIFFStripSize64"], [58, 0, 1, "c.TIFFSwabArrayOfDouble", "TIFFSwabArrayOfDouble"], [58, 0, 1, "c.TIFFSwabArrayOfFloat", "TIFFSwabArrayOfFloat"], [58, 0, 1, "c.TIFFSwabArrayOfLong", "TIFFSwabArrayOfLong"], [58, 0, 1, "c.TIFFSwabArrayOfLong8", "TIFFSwabArrayOfLong8"], [58, 0, 1, "c.TIFFSwabArrayOfShort", "TIFFSwabArrayOfShort"], [58, 0, 1, "c.TIFFSwabArrayOfTriples", "TIFFSwabArrayOfTriples"], [58, 0, 1, "c.TIFFSwabDouble", "TIFFSwabDouble"], [58, 0, 1, "c.TIFFSwabFloat", "TIFFSwabFloat"], [58, 0, 1, "c.TIFFSwabLong", "TIFFSwabLong"], [58, 0, 1, "c.TIFFSwabLong8", "TIFFSwabLong8"], [58, 0, 1, "c.TIFFSwabShort", "TIFFSwabShort"], [59, 0, 1, "c.TIFFTileRowSize", "TIFFTileRowSize"], [59, 0, 1, "c.TIFFTileRowSize64", "TIFFTileRowSize64"], [59, 0, 1, "c.TIFFTileSize", "TIFFTileSize"], [59, 0, 1, "c.TIFFTileSize64", "TIFFTileSize64"], [52, 0, 1, "c.TIFFUnRegisterCODEC", "TIFFUnRegisterCODEC"], [7, 0, 1, "c.TIFFUnlinkDirectory", "TIFFUnlinkDirectory"], [23, 2, 1, "c.TIFFUnmapFileProc", "TIFFUnmapFileProc"], [40, 0, 1, "c.TIFFUnsetField", "TIFFUnsetField"], [21, 0, 1, "c.TIFFVGetField", "TIFFVGetField"], [21, 0, 1, "c.TIFFVGetFieldDefaulted", "TIFFVGetFieldDefaulted"], [40, 0, 1, "c.TIFFVSetField", "TIFFVSetField"], [57, 0, 1, "c.TIFFVStripSize", "TIFFVStripSize"], [57, 0, 1, "c.TIFFVStripSize64", "TIFFVStripSize64"], [59, 0, 1, "c.TIFFVTileSize", "TIFFVTileSize"], [59, 0, 1, "c.TIFFVTileSize64", "TIFFVTileSize64"], [43, 0, 1, "c.TIFFWarning", "TIFFWarning"], [43, 0, 1, "c.TIFFWarningExt", "TIFFWarningExt"], [43, 0, 1, "c.TIFFWarningExtR", "TIFFWarningExtR"], [43, 2, 1, "c.TIFFWarningHandler", "TIFFWarningHandler"], [43, 2, 1, "c.TIFFWarningHandlerExt", "TIFFWarningHandlerExt"], [43, 2, 1, "c.TIFFWarningHandlerExtR", "TIFFWarningHandlerExtR"], [51, 0, 1, "c.TIFFWriteBufferSetup", "TIFFWriteBufferSetup"], [44, 0, 1, "c.TIFFWriteCheck", "TIFFWriteCheck"], [8, 0, 1, "c.TIFFWriteCustomDirectory", "TIFFWriteCustomDirectory"], [44, 0, 1, "c.TIFFWriteDirectory", "TIFFWriteDirectory"], [45, 0, 1, "c.TIFFWriteEncodedStrip", "TIFFWriteEncodedStrip"], [46, 0, 1, "c.TIFFWriteEncodedTile", "TIFFWriteEncodedTile"], [47, 0, 1, "c.TIFFWriteRawStrip", "TIFFWriteRawStrip"], [48, 0, 1, "c.TIFFWriteRawTile", "TIFFWriteRawTile"], [49, 0, 1, "c.TIFFWriteScanline", "TIFFWriteScanline"], [50, 0, 1, "c.TIFFWriteTile", "TIFFWriteTile"], [53, 0, 1, "c.TIFFXYZToRGB", "TIFFXYZToRGB"], [53, 0, 1, "c.TIFFYCbCrToRGBInit", "TIFFYCbCrToRGBInit"], [53, 0, 1, "c.TIFFYCbCrtoRGB", "TIFFYCbCrtoRGB"], [54, 0, 1, "c._TIFFCheckMalloc", "_TIFFCheckMalloc"], [54, 0, 1, "c._TIFFCheckRealloc", "_TIFFCheckRealloc"], [61, 0, 1, "c._TIFFClampDoubleToUInt32", "_TIFFClampDoubleToUInt32"], [8, 0, 1, "c._TIFFGetExifFields", "_TIFFGetExifFields"], [8, 0, 1, "c._TIFFGetGpsFields", "_TIFFGetGpsFields"], [61, 0, 1, "c._TIFFMultiply32", "_TIFFMultiply32"], [61, 0, 1, "c._TIFFMultiply64", "_TIFFMultiply64"], [60, 0, 1, "c._TIFFRewriteField", "_TIFFRewriteField"], [54, 0, 1, "c._TIFFfree", "_TIFFfree"], [54, 0, 1, "c._TIFFmalloc", "_TIFFmalloc"], [54, 0, 1, "c._TIFFmemcmp", "_TIFFmemcmp"], [54, 0, 1, "c._TIFFmemcpy", "_TIFFmemcpy"], [54, 0, 1, "c._TIFFmemset", "_TIFFmemset"], [54, 0, 1, "c._TIFFrealloc", "_TIFFrealloc"]], "TIFFAccessTagMethods": [[4, 1, 1, "c.TIFFAccessTagMethods", "tif"]], "TIFFCIELabToRGBInit": [[53, 1, 1, "c.TIFFCIELabToRGBInit", "cielab"], [53, 1, 1, "c.TIFFCIELabToRGBInit", "displayw"], [53, 1, 1, "c.TIFFCIELabToRGBInit", "refWhite"]], "TIFFCIELabToXYZ": [[53, 1, 1, "c.TIFFCIELabToXYZ", "L"], [53, 1, 1, "c.TIFFCIELabToXYZ", "X"], [53, 1, 1, "c.TIFFCIELabToXYZ", "Y"], [53, 1, 1, "c.TIFFCIELabToXYZ", "Z"], [53, 1, 1, "c.TIFFCIELabToXYZ", "a"], [53, 1, 1, "c.TIFFCIELabToXYZ", "b"], [53, 1, 1, "c.TIFFCIELabToXYZ", "cielab"]], "TIFFCheckTile": [[59, 1, 1, "c.TIFFCheckTile", "sample"], [59, 1, 1, "c.TIFFCheckTile", "tif"], [59, 1, 1, "c.TIFFCheckTile", "x"], [59, 1, 1, "c.TIFFCheckTile", "y"], [59, 1, 1, "c.TIFFCheckTile", "z"]], "TIFFCheckpointDirectory": [[44, 1, 1, "c.TIFFCheckpointDirectory", "tif"]], "TIFFCleanup": [[6, 1, 1, "c.TIFFCleanup", "tif"]], "TIFFClientOpen": [[23, 1, 1, "c.TIFFClientOpen", "clientdata"], [23, 1, 1, "c.TIFFClientOpen", "closeproc"], [23, 1, 1, "c.TIFFClientOpen", "filename"], [23, 1, 1, "c.TIFFClientOpen", "mapproc"], [23, 1, 1, "c.TIFFClientOpen", "mode"], [23, 1, 1, "c.TIFFClientOpen", "readproc"], [23, 1, 1, "c.TIFFClientOpen", "seekproc"], [23, 1, 1, "c.TIFFClientOpen", "sizeproc"], [23, 1, 1, "c.TIFFClientOpen", "unmapproc"], [23, 1, 1, "c.TIFFClientOpen", "writeproc"]], "TIFFClientOpenExt": [[23, 1, 1, "c.TIFFClientOpenExt", "clientdata"], [23, 1, 1, "c.TIFFClientOpenExt", "closeproc"], [23, 1, 1, "c.TIFFClientOpenExt", "filename"], [23, 1, 1, "c.TIFFClientOpenExt", "mapproc"], [23, 1, 1, "c.TIFFClientOpenExt", "mode"], [23, 1, 1, "c.TIFFClientOpenExt", "opts"], [23, 1, 1, "c.TIFFClientOpenExt", "readproc"], [23, 1, 1, "c.TIFFClientOpenExt", "seekproc"], [23, 1, 1, "c.TIFFClientOpenExt", "sizeproc"], [23, 1, 1, "c.TIFFClientOpenExt", "unmapproc"], [23, 1, 1, "c.TIFFClientOpenExt", "writeproc"]], "TIFFClientdata": [[23, 1, 1, "c.TIFFClientdata", "tif"]], "TIFFClose": [[6, 1, 1, "c.TIFFClose", "tif"]], "TIFFComputeStrip": [[57, 1, 1, "c.TIFFComputeStrip", "row"], [57, 1, 1, "c.TIFFComputeStrip", "sample"], [57, 1, 1, "c.TIFFComputeStrip", "tif"]], "TIFFComputeTile": [[59, 1, 1, "c.TIFFComputeTile", "sample"], [59, 1, 1, "c.TIFFComputeTile", "tif"], [59, 1, 1, "c.TIFFComputeTile", "x"], [59, 1, 1, "c.TIFFComputeTile", "y"], [59, 1, 1, "c.TIFFComputeTile", "z"]], "TIFFCreateCustomDirectory": [[8, 1, 1, "c.TIFFCreateCustomDirectory", "infoarray"], [8, 1, 1, "c.TIFFCreateCustomDirectory", "tif"]], "TIFFCreateDirectory": [[7, 1, 1, "c.TIFFCreateDirectory", "tif"]], "TIFFCreateEXIFDirectory": [[8, 1, 1, "c.TIFFCreateEXIFDirectory", "tif"]], "TIFFCreateGPSDirectory": [[8, 1, 1, "c.TIFFCreateGPSDirectory", "tif"]], "TIFFCurrentDirOffset": [[55, 1, 1, "c.TIFFCurrentDirOffset", "tif"]], "TIFFCurrentDirectory": [[55, 1, 1, "c.TIFFCurrentDirectory", "tif"]], "TIFFCurrentRow": [[55, 1, 1, "c.TIFFCurrentRow", "tif"]], "TIFFCurrentStrip": [[55, 1, 1, "c.TIFFCurrentStrip", "tif"]], "TIFFCurrentTile": [[55, 1, 1, "c.TIFFCurrentTile", "tif"]], "TIFFDataWidth": [[10, 1, 1, "c.TIFFDataWidth", "type"]], "TIFFDefaultStripSize": [[57, 1, 1, "c.TIFFDefaultStripSize", "estimate"], [57, 1, 1, "c.TIFFDefaultStripSize", "tif"]], "TIFFDefaultTileSize": [[59, 1, 1, "c.TIFFDefaultTileSize", "th"], [59, 1, 1, "c.TIFFDefaultTileSize", "tif"], [59, 1, 1, "c.TIFFDefaultTileSize", "tw"]], "TIFFDeferStrileArrayWriting": [[11, 1, 1, "c.TIFFDeferStrileArrayWriting", "tif"]], "TIFFError": [[12, 1, 1, "c.TIFFError", "fmt"], [12, 1, 1, "c.TIFFError", "module"]], "TIFFErrorExt": [[12, 1, 1, "c.TIFFErrorExt", "fd"], [12, 1, 1, "c.TIFFErrorExt", "fmt"], [12, 1, 1, "c.TIFFErrorExt", "module"]], "TIFFErrorExtR": [[12, 1, 1, "c.TIFFErrorExtR", "fmt"], [12, 1, 1, "c.TIFFErrorExtR", "module"], [12, 1, 1, "c.TIFFErrorExtR", "tif"]], "TIFFFdOpen": [[23, 1, 1, "c.TIFFFdOpen", "fd"], [23, 1, 1, "c.TIFFFdOpen", "filename"], [23, 1, 1, "c.TIFFFdOpen", "mode"]], "TIFFFdOpenExt": [[23, 1, 1, "c.TIFFFdOpenExt", "fd"], [23, 1, 1, "c.TIFFFdOpenExt", "filename"], [23, 1, 1, "c.TIFFFdOpenExt", "mode"], [23, 1, 1, "c.TIFFFdOpenExt", "opts"]], "TIFFFieldDataType": [[13, 1, 1, "c.TIFFFieldDataType", "fip"]], "TIFFFieldInfo": [[0, 3, 1, "c.TIFFFieldInfo.field_bit", "field_bit"], [0, 3, 1, "c.TIFFFieldInfo.field_name", "field_name"], [0, 3, 1, "c.TIFFFieldInfo.field_oktochange", "field_oktochange"], [0, 3, 1, "c.TIFFFieldInfo.field_passcount", "field_passcount"], [0, 3, 1, "c.TIFFFieldInfo.field_readcount", "field_readcount"], [0, 3, 1, "c.TIFFFieldInfo.field_tag", "field_tag"], [0, 3, 1, "c.TIFFFieldInfo.field_type", "field_type"], [0, 3, 1, "c.TIFFFieldInfo.field_writecount", "field_writecount"]], "TIFFFieldIsAnonymous": [[16, 1, 1, "c.TIFFFieldIsAnonymous", "fip"]], "TIFFFieldName": [[14, 1, 1, "c.TIFFFieldName", "fip"]], "TIFFFieldPassCount": [[15, 1, 1, "c.TIFFFieldPassCount", "fip"]], "TIFFFieldReadCount": [[17, 1, 1, "c.TIFFFieldReadCount", "fip"]], "TIFFFieldSetGetCountSize": [[16, 1, 1, "c.TIFFFieldSetGetCountSize", "fip"]], "TIFFFieldSetGetSize": [[16, 1, 1, "c.TIFFFieldSetGetSize", "fip"]], "TIFFFieldTag": [[18, 1, 1, "c.TIFFFieldTag", "fip"]], "TIFFFieldWithName": [[16, 1, 1, "c.TIFFFieldWithName", "field_name"], [16, 1, 1, "c.TIFFFieldWithName", "tif"]], "TIFFFieldWithTag": [[16, 1, 1, "c.TIFFFieldWithTag", "tag"], [16, 1, 1, "c.TIFFFieldWithTag", "tif"]], "TIFFFieldWriteCount": [[19, 1, 1, "c.TIFFFieldWriteCount", "fip"]], "TIFFFileName": [[55, 1, 1, "c.TIFFFileName", "tif"]], "TIFFFileno": [[55, 1, 1, "c.TIFFFileno", "tif"]], "TIFFFindCODEC": [[52, 1, 1, "c.TIFFFindCODEC", "scheme"]], "TIFFFindField": [[16, 1, 1, "c.TIFFFindField", "dt"], [16, 1, 1, "c.TIFFFindField", "tag"], [16, 1, 1, "c.TIFFFindField", "tif"]], "TIFFFlush": [[20, 1, 1, "c.TIFFFlush", "tif"]], "TIFFFlushData": [[20, 1, 1, "c.TIFFFlushData", "tif"]], "TIFFForceStrileArrayWriting": [[11, 1, 1, "c.TIFFForceStrileArrayWriting", "tif"]], "TIFFFreeDirectory": [[7, 1, 1, "c.TIFFFreeDirectory", "tif"]], "TIFFGetBitRevTable": [[58, 1, 1, "c.TIFFGetBitRevTable", "reversed"]], "TIFFGetClientInfo": [[5, 1, 1, "c.TIFFGetClientInfo", "name"], [5, 1, 1, "c.TIFFGetClientInfo", "tif"]], "TIFFGetCloseProc": [[26, 1, 1, "c.TIFFGetCloseProc", "tif"]], "TIFFGetConfiguredCODECs": [[52, 1, 1, "c.TIFFGetConfiguredCODECs", "scheme"]], "TIFFGetField": [[21, 1, 1, "c.TIFFGetField", "tag"], [21, 1, 1, "c.TIFFGetField", "tif"]], "TIFFGetFieldDefaulted": [[21, 1, 1, "c.TIFFGetFieldDefaulted", "tag"], [21, 1, 1, "c.TIFFGetFieldDefaulted", "tif"]], "TIFFGetMapFileProc": [[26, 1, 1, "c.TIFFGetMapFileProc", "tif"]], "TIFFGetMode": [[55, 1, 1, "c.TIFFGetMode", "tif"]], "TIFFGetReadProc": [[26, 1, 1, "c.TIFFGetReadProc", "tif"]], "TIFFGetSeekProc": [[26, 1, 1, "c.TIFFGetSeekProc", "tif"]], "TIFFGetSizeProc": [[26, 1, 1, "c.TIFFGetSizeProc", "tif"]], "TIFFGetStrileByteCount": [[42, 1, 1, "c.TIFFGetStrileByteCount", "strile"], [42, 1, 1, "c.TIFFGetStrileByteCount", "tif"]], "TIFFGetStrileByteCountWithErr": [[42, 1, 1, "c.TIFFGetStrileByteCountWithErr", "pbErr"], [42, 1, 1, "c.TIFFGetStrileByteCountWithErr", "strile"], [42, 1, 1, "c.TIFFGetStrileByteCountWithErr", "tif"]], "TIFFGetStrileOffset": [[42, 1, 1, "c.TIFFGetStrileOffset", "strile"], [42, 1, 1, "c.TIFFGetStrileOffset", "tif"]], "TIFFGetStrileOffsetWithErr": [[42, 1, 1, "c.TIFFGetStrileOffsetWithErr", "pbErr"], [42, 1, 1, "c.TIFFGetStrileOffsetWithErr", "strile"], [42, 1, 1, "c.TIFFGetStrileOffsetWithErr", "tif"]], "TIFFGetTagListCount": [[9, 1, 1, "c.TIFFGetTagListCount", "tif"]], "TIFFGetTagListEntry": [[9, 1, 1, "c.TIFFGetTagListEntry", "tag_index"], [9, 1, 1, "c.TIFFGetTagListEntry", "tif"]], "TIFFGetUnmapFileProc": [[26, 1, 1, "c.TIFFGetUnmapFileProc", "tif"]], "TIFFGetWriteProc": [[26, 1, 1, "c.TIFFGetWriteProc", "tif"]], "TIFFIsBigEndian": [[55, 1, 1, "c.TIFFIsBigEndian", "tif"]], "TIFFIsBigTIFF": [[55, 1, 1, "c.TIFFIsBigTIFF", "tif"]], "TIFFIsByteSwapped": [[55, 1, 1, "c.TIFFIsByteSwapped", "tif"]], "TIFFIsCODECConfigured": [[52, 1, 1, "c.TIFFIsCODECConfigured", "scheme"]], "TIFFIsMSB2LSB": [[55, 1, 1, "c.TIFFIsMSB2LSB", "tif"]], "TIFFIsTiled": [[55, 1, 1, "c.TIFFIsTiled", "tif"]], "TIFFIsUpSampled": [[55, 1, 1, "c.TIFFIsUpSampled", "tif"]], "TIFFLastDirectory": [[55, 1, 1, "c.TIFFLastDirectory", "tif"]], "TIFFMergeFieldInfo": [[22, 1, 1, "c.TIFFMergeFieldInfo", "info"], [22, 1, 1, "c.TIFFMergeFieldInfo", "n"], [22, 1, 1, "c.TIFFMergeFieldInfo", "tif"]], "TIFFNumberOfDirectories": [[55, 1, 1, "c.TIFFNumberOfDirectories", "tif"]], "TIFFNumberOfStrips": [[57, 1, 1, "c.TIFFNumberOfStrips", "tif"]], "TIFFNumberOfTiles": [[59, 1, 1, "c.TIFFNumberOfTiles", "tif"]], "TIFFOpen": [[23, 1, 1, "c.TIFFOpen", "filename"], [23, 1, 1, "c.TIFFOpen", "mode"]], "TIFFOpenExt": [[23, 1, 1, "c.TIFFOpenExt", "filename"], [23, 1, 1, "c.TIFFOpenExt", "mode"], [23, 1, 1, "c.TIFFOpenExt", "opts"]], "TIFFOpenOptionsSetErrorHandlerExtR": [[24, 1, 1, "c.TIFFOpenOptionsSetErrorHandlerExtR", "errorhandler_user_data"], [24, 1, 1, "c.TIFFOpenOptionsSetErrorHandlerExtR", "handler"], [24, 1, 1, "c.TIFFOpenOptionsSetErrorHandlerExtR", "opts"]], "TIFFOpenOptionsSetMaxCumulatedMemAlloc": [[24, 1, 1, "c.TIFFOpenOptionsSetMaxCumulatedMemAlloc", "max_cumulated_mem_alloc"], [24, 1, 1, "c.TIFFOpenOptionsSetMaxCumulatedMemAlloc", "opts"]], "TIFFOpenOptionsSetMaxSingleMemAlloc": [[24, 1, 1, "c.TIFFOpenOptionsSetMaxSingleMemAlloc", "max_single_mem_alloc"], [24, 1, 1, "c.TIFFOpenOptionsSetMaxSingleMemAlloc", "opts"]], "TIFFOpenOptionsSetWarnAboutUnknownTags": [[24, 1, 1, "c.TIFFOpenOptionsSetWarnAboutUnknownTags", "opts"], [24, 1, 1, "c.TIFFOpenOptionsSetWarnAboutUnknownTags", "warn_about_unknown_tags"]], "TIFFOpenOptionsSetWarningHandlerExtR": [[24, 1, 1, "c.TIFFOpenOptionsSetWarningHandlerExtR", "handler"], [24, 1, 1, "c.TIFFOpenOptionsSetWarningHandlerExtR", "opts"], [24, 1, 1, "c.TIFFOpenOptionsSetWarningHandlerExtR", "warnhandler_user_data"]], "TIFFOpenW": [[23, 1, 1, "c.TIFFOpenW", "mode"], [23, 1, 1, "c.TIFFOpenW", "name"]], "TIFFOpenWExt": [[23, 1, 1, "c.TIFFOpenWExt", "mode"], [23, 1, 1, "c.TIFFOpenWExt", "name"], [23, 1, 1, "c.TIFFOpenWExt", "opts"]], "TIFFPrintDirectory": [[25, 1, 1, "c.TIFFPrintDirectory", "fd"], [25, 1, 1, "c.TIFFPrintDirectory", "flags"], [25, 1, 1, "c.TIFFPrintDirectory", "tif"]], "TIFFRGBAImageBegin": [[27, 1, 1, "c.TIFFRGBAImageBegin", "emsg"], [27, 1, 1, "c.TIFFRGBAImageBegin", "img"], [27, 1, 1, "c.TIFFRGBAImageBegin", "stopOnError"], [27, 1, 1, "c.TIFFRGBAImageBegin", "tif"]], "TIFFRGBAImageEnd": [[27, 1, 1, "c.TIFFRGBAImageEnd", "img"]], "TIFFRGBAImageGet": [[27, 1, 1, "c.TIFFRGBAImageGet", "height"], [27, 1, 1, "c.TIFFRGBAImageGet", "img"], [27, 1, 1, "c.TIFFRGBAImageGet", "raster"], [27, 1, 1, "c.TIFFRGBAImageGet", "width"]], "TIFFRGBAImageOK": [[27, 1, 1, "c.TIFFRGBAImageOK", "emsg"], [27, 1, 1, "c.TIFFRGBAImageOK", "tif"]], "TIFFRasterScanlineSize": [[56, 1, 1, "c.TIFFRasterScanlineSize", "tif"]], "TIFFRasterScanlineSize64": [[56, 1, 1, "c.TIFFRasterScanlineSize64", "tif"]], "TIFFRawStripSize": [[57, 1, 1, "c.TIFFRawStripSize", "strip"], [57, 1, 1, "c.TIFFRawStripSize", "tif"]], "TIFFRawStripSize64": [[57, 1, 1, "c.TIFFRawStripSize64", "strip"], [57, 1, 1, "c.TIFFRawStripSize64", "tif"]], "TIFFReadBufferSetup": [[51, 1, 1, "c.TIFFReadBufferSetup", "buffer"], [51, 1, 1, "c.TIFFReadBufferSetup", "size"], [51, 1, 1, "c.TIFFReadBufferSetup", "tif"]], "TIFFReadCustomDirectory": [[8, 1, 1, "c.TIFFReadCustomDirectory", "diroff"], [8, 1, 1, "c.TIFFReadCustomDirectory", "infoarray"], [8, 1, 1, "c.TIFFReadCustomDirectory", "tif"]], "TIFFReadDirectory": [[28, 1, 1, "c.TIFFReadDirectory", "tif"]], "TIFFReadEXIFDirectory": [[8, 1, 1, "c.TIFFReadEXIFDirectory", "diroff"], [8, 1, 1, "c.TIFFReadEXIFDirectory", "tif"]], "TIFFReadEncodedStrip": [[29, 1, 1, "c.TIFFReadEncodedStrip", "buf"], [29, 1, 1, "c.TIFFReadEncodedStrip", "size"], [29, 1, 1, "c.TIFFReadEncodedStrip", "strip"], [29, 1, 1, "c.TIFFReadEncodedStrip", "tif"]], "TIFFReadEncodedTile": [[30, 1, 1, "c.TIFFReadEncodedTile", "buf"], [30, 1, 1, "c.TIFFReadEncodedTile", "size"], [30, 1, 1, "c.TIFFReadEncodedTile", "tif"], [30, 1, 1, "c.TIFFReadEncodedTile", "tile"]], "TIFFReadFromUserBuffer": [[31, 1, 1, "c.TIFFReadFromUserBuffer", "inbuf"], [31, 1, 1, "c.TIFFReadFromUserBuffer", "insize"], [31, 1, 1, "c.TIFFReadFromUserBuffer", "outbuf"], [31, 1, 1, "c.TIFFReadFromUserBuffer", "outsize"], [31, 1, 1, "c.TIFFReadFromUserBuffer", "strile"], [31, 1, 1, "c.TIFFReadFromUserBuffer", "tif"]], "TIFFReadGPSDirectory": [[8, 1, 1, "c.TIFFReadGPSDirectory", "diroff"], [8, 1, 1, "c.TIFFReadGPSDirectory", "tif"]], "TIFFReadRGBAImage": [[32, 1, 1, "c.TIFFReadRGBAImage", "height"], [32, 1, 1, "c.TIFFReadRGBAImage", "raster"], [32, 1, 1, "c.TIFFReadRGBAImage", "stopOnError"], [32, 1, 1, "c.TIFFReadRGBAImage", "tif"], [32, 1, 1, "c.TIFFReadRGBAImage", "width"]], "TIFFReadRGBAImageOriented": [[32, 1, 1, "c.TIFFReadRGBAImageOriented", "height"], [32, 1, 1, "c.TIFFReadRGBAImageOriented", "orientation"], [32, 1, 1, "c.TIFFReadRGBAImageOriented", "raster"], [32, 1, 1, "c.TIFFReadRGBAImageOriented", "stopOnError"], [32, 1, 1, "c.TIFFReadRGBAImageOriented", "tif"], [32, 1, 1, "c.TIFFReadRGBAImageOriented", "width"]], "TIFFReadRGBAStrip": [[33, 1, 1, "c.TIFFReadRGBAStrip", "raster"], [33, 1, 1, "c.TIFFReadRGBAStrip", "row"], [33, 1, 1, "c.TIFFReadRGBAStrip", "tif"]], "TIFFReadRGBAStripExt": [[33, 1, 1, "c.TIFFReadRGBAStripExt", "raster"], [33, 1, 1, "c.TIFFReadRGBAStripExt", "row"], [33, 1, 1, "c.TIFFReadRGBAStripExt", "stop_on_error"], [33, 1, 1, "c.TIFFReadRGBAStripExt", "tif"]], "TIFFReadRGBATile": [[34, 1, 1, "c.TIFFReadRGBATile", "raster"], [34, 1, 1, "c.TIFFReadRGBATile", "tif"], [34, 1, 1, "c.TIFFReadRGBATile", "x"], [34, 1, 1, "c.TIFFReadRGBATile", "y"]], "TIFFReadRGBATileExt": [[34, 1, 1, "c.TIFFReadRGBATileExt", "col"], [34, 1, 1, "c.TIFFReadRGBATileExt", "raster"], [34, 1, 1, "c.TIFFReadRGBATileExt", "row"], [34, 1, 1, "c.TIFFReadRGBATileExt", "stop_on_error"], [34, 1, 1, "c.TIFFReadRGBATileExt", "tif"]], "TIFFReadRawStrip": [[35, 1, 1, "c.TIFFReadRawStrip", "buf"], [35, 1, 1, "c.TIFFReadRawStrip", "size"], [35, 1, 1, "c.TIFFReadRawStrip", "strip"], [35, 1, 1, "c.TIFFReadRawStrip", "tif"]], "TIFFReadRawTile": [[36, 1, 1, "c.TIFFReadRawTile", "buf"], [36, 1, 1, "c.TIFFReadRawTile", "size"], [36, 1, 1, "c.TIFFReadRawTile", "tif"], [36, 1, 1, "c.TIFFReadRawTile", "tile"]], "TIFFReadScanline": [[37, 1, 1, "c.TIFFReadScanline", "buf"], [37, 1, 1, "c.TIFFReadScanline", "row"], [37, 1, 1, "c.TIFFReadScanline", "sample"], [37, 1, 1, "c.TIFFReadScanline", "tif"]], "TIFFReadTile": [[38, 1, 1, "c.TIFFReadTile", "buf"], [38, 1, 1, "c.TIFFReadTile", "sample"], [38, 1, 1, "c.TIFFReadTile", "tif"], [38, 1, 1, "c.TIFFReadTile", "x"], [38, 1, 1, "c.TIFFReadTile", "y"], [38, 1, 1, "c.TIFFReadTile", "z"]], "TIFFRegisterCODEC": [[52, 1, 1, "c.TIFFRegisterCODEC", "init"], [52, 1, 1, "c.TIFFRegisterCODEC", "method"], [52, 1, 1, "c.TIFFRegisterCODEC", "scheme"]], "TIFFReverseBits": [[58, 1, 1, "c.TIFFReverseBits", "data"], [58, 1, 1, "c.TIFFReverseBits", "nbytes"]], "TIFFRewriteDirectory": [[44, 1, 1, "c.TIFFRewriteDirectory", "tif"]], "TIFFScanlineSize": [[56, 1, 1, "c.TIFFScanlineSize", "tif"]], "TIFFScanlineSize64": [[56, 1, 1, "c.TIFFScanlineSize64", "tif"]], "TIFFSetClientInfo": [[5, 1, 1, "c.TIFFSetClientInfo", "data"], [5, 1, 1, "c.TIFFSetClientInfo", "name"], [5, 1, 1, "c.TIFFSetClientInfo", "tif"]], "TIFFSetClientdata": [[23, 1, 1, "c.TIFFSetClientdata", "newvalue"], [23, 1, 1, "c.TIFFSetClientdata", "tif"]], "TIFFSetCompressionScheme": [[52, 1, 1, "c.TIFFSetCompressionScheme", "scheme"], [52, 1, 1, "c.TIFFSetCompressionScheme", "tif"]], "TIFFSetDirectory": [[39, 1, 1, "c.TIFFSetDirectory", "dirnum"], [39, 1, 1, "c.TIFFSetDirectory", "tif"]], "TIFFSetErrorHandler": [[12, 1, 1, "c.TIFFSetErrorHandler", "handler"]], "TIFFSetErrorHandlerExt": [[12, 1, 1, "c.TIFFSetErrorHandlerExt", "handler"]], "TIFFSetField": [[40, 1, 1, "c.TIFFSetField", "tag"], [40, 1, 1, "c.TIFFSetField", "tif"]], "TIFFSetFileName": [[23, 1, 1, "c.TIFFSetFileName", "tif"]], "TIFFSetFileno": [[23, 1, 1, "c.TIFFSetFileno", "fd"], [23, 1, 1, "c.TIFFSetFileno", "tif"]], "TIFFSetMode": [[23, 1, 1, "c.TIFFSetMode", "mode"], [23, 1, 1, "c.TIFFSetMode", "tif"]], "TIFFSetSubDirectory": [[39, 1, 1, "c.TIFFSetSubDirectory", "diroff"], [39, 1, 1, "c.TIFFSetSubDirectory", "tif"]], "TIFFSetTagExtender": [[41, 1, 1, "c.TIFFSetTagExtender", "extender"]], "TIFFSetWarningHandler": [[43, 1, 1, "c.TIFFSetWarningHandler", "handler"]], "TIFFSetWarningHandlerExt": [[43, 1, 1, "c.TIFFSetWarningHandlerExt", "handler"]], "TIFFSetWriteOffset": [[44, 1, 1, "c.TIFFSetWriteOffset", "off"], [44, 1, 1, "c.TIFFSetWriteOffset", "tif"]], "TIFFSetupStrips": [[57, 1, 1, "c.TIFFSetupStrips", "tif"]], "TIFFStripSize": [[57, 1, 1, "c.TIFFStripSize", "tif"]], "TIFFStripSize64": [[57, 1, 1, "c.TIFFStripSize64", "tif"]], "TIFFSwabArrayOfDouble": [[58, 1, 1, "c.TIFFSwabArrayOfDouble", "dp"], [58, 1, 1, "c.TIFFSwabArrayOfDouble", "n"]], "TIFFSwabArrayOfFloat": [[58, 1, 1, "c.TIFFSwabArrayOfFloat", "fp"], [58, 1, 1, "c.TIFFSwabArrayOfFloat", "n"]], "TIFFSwabArrayOfLong": [[58, 1, 1, "c.TIFFSwabArrayOfLong", "lp"], [58, 1, 1, "c.TIFFSwabArrayOfLong", "n"]], "TIFFSwabArrayOfLong8": [[58, 1, 1, "c.TIFFSwabArrayOfLong8", "lp"], [58, 1, 1, "c.TIFFSwabArrayOfLong8", "n"]], "TIFFSwabArrayOfShort": [[58, 1, 1, "c.TIFFSwabArrayOfShort", "n"], [58, 1, 1, "c.TIFFSwabArrayOfShort", "wp"]], "TIFFSwabArrayOfTriples": [[58, 1, 1, "c.TIFFSwabArrayOfTriples", "n"], [58, 1, 1, "c.TIFFSwabArrayOfTriples", "tp"]], "TIFFSwabDouble": [[58, 1, 1, "c.TIFFSwabDouble", "dp"]], "TIFFSwabFloat": [[58, 1, 1, "c.TIFFSwabFloat", "fp"]], "TIFFSwabLong": [[58, 1, 1, "c.TIFFSwabLong", "data"]], "TIFFSwabLong8": [[58, 1, 1, "c.TIFFSwabLong8", "lp"]], "TIFFSwabShort": [[58, 1, 1, "c.TIFFSwabShort", "data"]], "TIFFTileRowSize": [[59, 1, 1, "c.TIFFTileRowSize", "tif"]], "TIFFTileRowSize64": [[59, 1, 1, "c.TIFFTileRowSize64", "tif"]], "TIFFTileSize": [[59, 1, 1, "c.TIFFTileSize", "tif"]], "TIFFTileSize64": [[59, 1, 1, "c.TIFFTileSize64", "tif"]], "TIFFUnRegisterCODEC": [[52, 1, 1, "c.TIFFUnRegisterCODEC", "codec"]], "TIFFUnlinkDirectory": [[7, 1, 1, "c.TIFFUnlinkDirectory", "dirn"], [7, 1, 1, "c.TIFFUnlinkDirectory", "tif"]], "TIFFUnsetField": [[40, 1, 1, "c.TIFFUnsetField", "tag"], [40, 1, 1, "c.TIFFUnsetField", "tif"]], "TIFFVGetField": [[21, 1, 1, "c.TIFFVGetField", "ap"], [21, 1, 1, "c.TIFFVGetField", "tag"], [21, 1, 1, "c.TIFFVGetField", "tif"]], "TIFFVGetFieldDefaulted": [[21, 1, 1, "c.TIFFVGetFieldDefaulted", "ap"], [21, 1, 1, "c.TIFFVGetFieldDefaulted", "tag"], [21, 1, 1, "c.TIFFVGetFieldDefaulted", "tif"]], "TIFFVSetField": [[40, 1, 1, "c.TIFFVSetField", "ap"], [40, 1, 1, "c.TIFFVSetField", "tag"], [40, 1, 1, "c.TIFFVSetField", "tif"]], "TIFFVStripSize": [[57, 1, 1, "c.TIFFVStripSize", "nrows"], [57, 1, 1, "c.TIFFVStripSize", "tif"]], "TIFFVStripSize64": [[57, 1, 1, "c.TIFFVStripSize64", "nrows"], [57, 1, 1, "c.TIFFVStripSize64", "tif"]], "TIFFVTileSize": [[59, 1, 1, "c.TIFFVTileSize", "nrows"], [59, 1, 1, "c.TIFFVTileSize", "tif"]], "TIFFVTileSize64": [[59, 1, 1, "c.TIFFVTileSize64", "nrows"], [59, 1, 1, "c.TIFFVTileSize64", "tif"]], "TIFFWarning": [[43, 1, 1, "c.TIFFWarning", "fmt"], [43, 1, 1, "c.TIFFWarning", "module"]], "TIFFWarningExt": [[43, 1, 1, "c.TIFFWarningExt", "fd"], [43, 1, 1, "c.TIFFWarningExt", "fmt"], [43, 1, 1, "c.TIFFWarningExt", "module"]], "TIFFWarningExtR": [[43, 1, 1, "c.TIFFWarningExtR", "fmt"], [43, 1, 1, "c.TIFFWarningExtR", "module"], [43, 1, 1, "c.TIFFWarningExtR", "tif"]], "TIFFWriteBufferSetup": [[51, 1, 1, "c.TIFFWriteBufferSetup", "buffer"], [51, 1, 1, "c.TIFFWriteBufferSetup", "size"], [51, 1, 1, "c.TIFFWriteBufferSetup", "tif"]], "TIFFWriteCheck": [[44, 1, 1, "c.TIFFWriteCheck", "module"], [44, 1, 1, "c.TIFFWriteCheck", "tif"], [44, 1, 1, "c.TIFFWriteCheck", "tiles"]], "TIFFWriteCustomDirectory": [[8, 1, 1, "c.TIFFWriteCustomDirectory", "pdiroff"], [8, 1, 1, "c.TIFFWriteCustomDirectory", "tif"]], "TIFFWriteDirectory": [[44, 1, 1, "c.TIFFWriteDirectory", "tif"]], "TIFFWriteEncodedStrip": [[45, 1, 1, "c.TIFFWriteEncodedStrip", "buf"], [45, 1, 1, "c.TIFFWriteEncodedStrip", "size"], [45, 1, 1, "c.TIFFWriteEncodedStrip", "strip"], [45, 1, 1, "c.TIFFWriteEncodedStrip", "tif"]], "TIFFWriteEncodedTile": [[46, 1, 1, "c.TIFFWriteEncodedTile", "buf"], [46, 1, 1, "c.TIFFWriteEncodedTile", "size"], [46, 1, 1, "c.TIFFWriteEncodedTile", "tif"], [46, 1, 1, "c.TIFFWriteEncodedTile", "tile"]], "TIFFWriteRawStrip": [[47, 1, 1, "c.TIFFWriteRawStrip", "buf"], [47, 1, 1, "c.TIFFWriteRawStrip", "size"], [47, 1, 1, "c.TIFFWriteRawStrip", "strip"], [47, 1, 1, "c.TIFFWriteRawStrip", "tif"]], "TIFFWriteRawTile": [[48, 1, 1, "c.TIFFWriteRawTile", "buf"], [48, 1, 1, "c.TIFFWriteRawTile", "size"], [48, 1, 1, "c.TIFFWriteRawTile", "tif"], [48, 1, 1, "c.TIFFWriteRawTile", "tile"]], "TIFFWriteScanline": [[49, 1, 1, "c.TIFFWriteScanline", "buf"], [49, 1, 1, "c.TIFFWriteScanline", "row"], [49, 1, 1, "c.TIFFWriteScanline", "sample"], [49, 1, 1, "c.TIFFWriteScanline", "tif"]], "TIFFWriteTile": [[50, 1, 1, "c.TIFFWriteTile", "buf"], [50, 1, 1, "c.TIFFWriteTile", "sample"], [50, 1, 1, "c.TIFFWriteTile", "tif"], [50, 1, 1, "c.TIFFWriteTile", "x"], [50, 1, 1, "c.TIFFWriteTile", "y"], [50, 1, 1, "c.TIFFWriteTile", "z"]], "TIFFXYZToRGB": [[53, 1, 1, "c.TIFFXYZToRGB", "B"], [53, 1, 1, "c.TIFFXYZToRGB", "G"], [53, 1, 1, "c.TIFFXYZToRGB", "R"], [53, 1, 1, "c.TIFFXYZToRGB", "X"], [53, 1, 1, "c.TIFFXYZToRGB", "Y"], [53, 1, 1, "c.TIFFXYZToRGB", "Z"], [53, 1, 1, "c.TIFFXYZToRGB", "cielab"]], "TIFFYCbCrToRGBInit": [[53, 1, 1, "c.TIFFYCbCrToRGBInit", "luma"], [53, 1, 1, "c.TIFFYCbCrToRGBInit", "refBlackWhite"], [53, 1, 1, "c.TIFFYCbCrToRGBInit", "ycbcr"]], "TIFFYCbCrtoRGB": [[53, 1, 1, "c.TIFFYCbCrtoRGB", "B"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "Cb"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "Cr"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "G"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "R"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "Y"], [53, 1, 1, "c.TIFFYCbCrtoRGB", "ycbcr"]], "_TIFFCheckMalloc": [[54, 1, 1, "c._TIFFCheckMalloc", "elem_size"], [54, 1, 1, "c._TIFFCheckMalloc", "nmemb"], [54, 1, 1, "c._TIFFCheckMalloc", "tif"], [54, 1, 1, "c._TIFFCheckMalloc", "what"]], "_TIFFCheckRealloc": [[54, 1, 1, "c._TIFFCheckRealloc", "buffer"], [54, 1, 1, "c._TIFFCheckRealloc", "elem_size"], [54, 1, 1, "c._TIFFCheckRealloc", "nmemb"], [54, 1, 1, "c._TIFFCheckRealloc", "tif"], [54, 1, 1, "c._TIFFCheckRealloc", "what"]], "_TIFFClampDoubleToUInt32": [[61, 1, 1, "c._TIFFClampDoubleToUInt32", "val"]], "_TIFFField": [[0, 3, 1, "c._TIFFField.field_anonymous", "field_anonymous"], [0, 3, 1, "c._TIFFField.get_field_type", "get_field_type"], [0, 3, 1, "c._TIFFField.set_field_type", "set_field_type"]], "_TIFFMultiply32": [[61, 1, 1, "c._TIFFMultiply32", "first"], [61, 1, 1, "c._TIFFMultiply32", "second"], [61, 1, 1, "c._TIFFMultiply32", "tif"], [61, 1, 1, "c._TIFFMultiply32", "where"]], "_TIFFMultiply64": [[61, 1, 1, "c._TIFFMultiply64", "first"], [61, 1, 1, "c._TIFFMultiply64", "second"], [61, 1, 1, "c._TIFFMultiply64", "tif"], [61, 1, 1, "c._TIFFMultiply64", "where"]], "_TIFFRewriteField": [[60, 1, 1, "c._TIFFRewriteField", "count"], [60, 1, 1, "c._TIFFRewriteField", "data"], [60, 1, 1, "c._TIFFRewriteField", "in_datatype"], [60, 1, 1, "c._TIFFRewriteField", "tag"], [60, 1, 1, "c._TIFFRewriteField", "tif"]], "_TIFFfree": [[54, 1, 1, "c._TIFFfree", "buffer"]], "_TIFFmalloc": [[54, 1, 1, "c._TIFFmalloc", "size"]], "_TIFFmemcmp": [[54, 1, 1, "c._TIFFmemcmp", "n"], [54, 1, 1, "c._TIFFmemcmp", "s1"], [54, 1, 1, "c._TIFFmemcmp", "s2"]], "_TIFFmemcpy": [[54, 1, 1, "c._TIFFmemcpy", "dest"], [54, 1, 1, "c._TIFFmemcpy", "n"], [54, 1, 1, "c._TIFFmemcpy", "src"]], "_TIFFmemset": [[54, 1, 1, "c._TIFFmemset", "c"], [54, 1, 1, "c._TIFFmemset", "n"], [54, 1, 1, "c._TIFFmemset", "s"]], "_TIFFrealloc": [[54, 1, 1, "c._TIFFrealloc", "buffer"], [54, 1, 1, "c._TIFFrealloc", "size"]], "configure": [[1, 5, 1, "cmdoption-configure-bindir", "--bindir"], [1, 5, 1, "cmdoption-configure-datadir", "--datadir"], [1, 5, 1, "cmdoption-configure-datarootdir", "--datarootdir"], [1, 5, 1, "cmdoption-configure-disable-jpeg", "--disable-jpeg"], [1, 5, 1, "cmdoption-configure-docdir", "--docdir"], [1, 5, 1, "cmdoption-configure-enable-ld-version-script", "--enable-ld-version-script"], [1, 5, 1, "cmdoption-configure-enable-rpath", "--enable-rpath"], [1, 5, 1, "cmdoption-configure-enable-shared", "--enable-shared"], [1, 5, 1, "cmdoption-configure-enable-static", "--enable-static"], [1, 5, 1, "cmdoption-configure-exec-prefix", "--exec-prefix"], [1, 5, 1, "cmdoption-configure-htmldir", "--htmldir"], [1, 5, 1, "cmdoption-configure-includedir", "--includedir"], [1, 5, 1, "cmdoption-configure-libdir", "--libdir"], [1, 5, 1, "cmdoption-configure-libexecdir", "--libexecdir"], [1, 5, 1, "cmdoption-configure-localedir", "--localedir"], [1, 5, 1, "cmdoption-configure-localstatedir", "--localstatedir"], [1, 5, 1, "cmdoption-configure-mandir", "--mandir"], [1, 5, 1, "cmdoption-configure-oldincludedir", "--oldincludedir"], [1, 5, 1, "cmdoption-configure-prefix", "--prefix"], [1, 5, 1, "cmdoption-configure-program-prefix", "--program-prefix"], [1, 5, 1, "cmdoption-configure-program-suffix", "--program-suffix"], [1, 5, 1, "cmdoption-configure-program-transform-name", "--program-transform-name"], [1, 5, 1, "cmdoption-configure-sbindir", "--sbindir"], [1, 5, 1, "cmdoption-configure-sharedstatedir", "--sharedstatedir"], [1, 5, 1, "cmdoption-configure-sysconfdir", "--sysconfdir"], [1, 5, 1, "cmdoption-configure-with-jpeg-include-dir", "--with-jpeg-include-dir"], [1, 5, 1, "cmdoption-configure-with-jpeg-lib-dir", "--with-jpeg-lib-dir"]], "fax2ps": [[146, 5, 1, "cmdoption-fax2ps-H", "-H"], [146, 5, 1, "cmdoption-fax2ps-S", "-S"], [146, 5, 1, "cmdoption-fax2ps-W", "-W"], [146, 5, 1, "cmdoption-fax2ps-p", "-p"], [146, 5, 1, "cmdoption-fax2ps-x", "-x"], [146, 5, 1, "cmdoption-fax2ps-y", "-y"]], "fax2tiff": [[147, 5, 1, "cmdoption-fax2tiff-1", "-1"], [147, 5, 1, "cmdoption-fax2tiff-2", "-2"], [147, 5, 1, "cmdoption-fax2tiff-3", "-3"], [147, 5, 1, "cmdoption-fax2tiff-4", "-4"], [147, 5, 1, "cmdoption-fax2tiff-5", "-5"], [147, 5, 1, "cmdoption-fax2tiff-6", "-6"], [147, 5, 1, "cmdoption-fax2tiff-7", "-7"], [147, 5, 1, "cmdoption-fax2tiff-8", "-8"], [147, 5, 1, "cmdoption-fax2tiff-A", "-A"], [147, 5, 1, "cmdoption-fax2tiff-B", "-B"], [147, 5, 1, "cmdoption-fax2tiff-L", "-L"], [147, 5, 1, "cmdoption-fax2tiff-M", "-M"], [147, 5, 1, "cmdoption-fax2tiff-P", "-P"], [147, 5, 1, "cmdoption-fax2tiff-R", "-R"], [147, 5, 1, "cmdoption-fax2tiff-U", "-U"], [147, 5, 1, "cmdoption-fax2tiff-W", "-W"], [147, 5, 1, "cmdoption-fax2tiff-X", "-X"], [147, 5, 1, "cmdoption-fax2tiff-a", "-a"], [147, 5, 1, "cmdoption-fax2tiff-c", "-c"], [147, 5, 1, "cmdoption-fax2tiff-f", "-f"], [147, 5, 1, "cmdoption-fax2tiff-l", "-l"], [147, 5, 1, "cmdoption-fax2tiff-m", "-m"], [147, 5, 1, "cmdoption-fax2tiff-o", "-o"], [147, 5, 1, "cmdoption-fax2tiff-p", "-p"], [147, 5, 1, "cmdoption-fax2tiff-r", "-r"], [147, 5, 1, "cmdoption-fax2tiff-s", "-s"], [147, 5, 1, "cmdoption-fax2tiff-u", "-u"], [147, 5, 1, "cmdoption-fax2tiff-v", "-v"], [147, 5, 1, "cmdoption-fax2tiff-z", "-z"]], "pal2rgb": [[148, 5, 1, "cmdoption-pal2rgb-C", "-C"], [148, 5, 1, "cmdoption-pal2rgb-c", "-c"], [148, 5, 1, "cmdoption-pal2rgb-p", "-p"], [148, 5, 1, "cmdoption-pal2rgb-r", "-r"]], "ppm2tiff": [[149, 5, 1, "cmdoption-ppm2tiff-R", "-R"], [149, 5, 1, "cmdoption-ppm2tiff-c", "-c"], [149, 5, 1, "cmdoption-ppm2tiff-r", "-r"]], "raw2tiff": [[150, 5, 1, "cmdoption-raw2tiff-H", "-H"], [150, 5, 1, "cmdoption-raw2tiff-L", "-L"], [150, 5, 1, "cmdoption-raw2tiff-M", "-M"], [150, 5, 1, "cmdoption-raw2tiff-c", "-c"], [150, 5, 1, "cmdoption-raw2tiff-d", "-d"], [150, 5, 1, "cmdoption-raw2tiff-i", "-i"], [150, 5, 1, "cmdoption-raw2tiff-p", "-p"], [150, 5, 1, "cmdoption-raw2tiff-s", "-s"], [150, 5, 1, "cmdoption-raw2tiff-w", "-w"]], "rgb2ycbcr": [[151, 5, 1, "cmdoption-rgb2ycbcr-c", "-c"], [151, 5, 1, "cmdoption-rgb2ycbcr-h", "-h"], [151, 5, 1, "cmdoption-rgb2ycbcr-r", "-r"], [151, 5, 1, "cmdoption-rgb2ycbcr-v", "-v"]], "thumbnail": [[152, 5, 1, "cmdoption-thumbnail-c", "-c"], [152, 5, 1, "cmdoption-thumbnail-h", "-h"], [152, 5, 1, "cmdoption-thumbnail-w", "-w"]], "tiff2bw": [[153, 5, 1, "cmdoption-tiff2bw-B", "-B"], [153, 5, 1, "cmdoption-tiff2bw-G", "-G"], [153, 5, 1, "cmdoption-tiff2bw-R", "-R"], [153, 5, 1, "cmdoption-tiff2bw-c", "-c"], [153, 5, 1, "cmdoption-tiff2bw-r", "-r"]], "tiff2pdf": [[154, 5, 1, "cmdoption-tiff2pdf-F", "-F"], [154, 5, 1, "cmdoption-tiff2pdf-a", "-a"], [154, 5, 1, "cmdoption-tiff2pdf-b", "-b"], [154, 5, 1, "cmdoption-tiff2pdf-c", "-c"], [154, 5, 1, "cmdoption-tiff2pdf-d", "-d"], [154, 5, 1, "cmdoption-tiff2pdf-e", "-e"], [154, 5, 1, "cmdoption-tiff2pdf-f", "-f"], [154, 5, 1, "cmdoption-tiff2pdf-h", "-h"], [154, 5, 1, "cmdoption-tiff2pdf-i", "-i"], [154, 5, 1, "cmdoption-tiff2pdf-j", "-j"], [154, 5, 1, "cmdoption-tiff2pdf-k", "-k"], [154, 5, 1, "cmdoption-tiff2pdf-l", "-l"], [154, 5, 1, "cmdoption-tiff2pdf-m", "-m"], [154, 5, 1, "cmdoption-tiff2pdf-n", "-n"], [154, 5, 1, "cmdoption-tiff2pdf-o", "-o"], [154, 5, 1, "cmdoption-tiff2pdf-p", "-p"], [154, 5, 1, "cmdoption-tiff2pdf-q", "-q"], [154, 5, 1, "cmdoption-tiff2pdf-r", "-r"], [154, 5, 1, "cmdoption-tiff2pdf-s", "-s"], [154, 5, 1, "cmdoption-tiff2pdf-t", "-t"], [154, 5, 1, "cmdoption-tiff2pdf-u", "-u"], [154, 5, 1, "cmdoption-tiff2pdf-w", "-w"], [154, 5, 1, "cmdoption-tiff2pdf-x", "-x"], [154, 5, 1, "cmdoption-tiff2pdf-y", "-y"], [154, 5, 1, "cmdoption-tiff2pdf-z", "-z"]], "tiff2ps": [[155, 5, 1, "cmdoption-tiff2ps-1", "-1"], [155, 5, 1, "cmdoption-tiff2ps-2", "-2"], [155, 5, 1, "cmdoption-tiff2ps-3", "-3"], [155, 5, 1, "cmdoption-tiff2ps-8", "-8"], [155, 5, 1, "cmdoption-tiff2ps-C", "-C"], [155, 5, 1, "cmdoption-tiff2ps-D", "-D"], [155, 5, 1, "cmdoption-tiff2ps-H", "-H"], [155, 5, 1, "cmdoption-tiff2ps-L", "-L"], [155, 5, 1, "cmdoption-tiff2ps-M", "-M"], [155, 5, 1, "cmdoption-tiff2ps-O", "-O"], [155, 5, 1, "cmdoption-tiff2ps-P", "-P"], [155, 5, 1, "cmdoption-tiff2ps-T", "-T"], [155, 5, 1, "cmdoption-tiff2ps-W", "-W"], [155, 5, 1, "cmdoption-tiff2ps-a", "-a"], [155, 5, 1, "cmdoption-tiff2ps-b", "-b"], [155, 5, 1, "cmdoption-tiff2ps-c", "-c"], [155, 5, 1, "cmdoption-tiff2ps-d", "-d"], [155, 5, 1, "cmdoption-tiff2ps-e", "-e"], [155, 5, 1, "cmdoption-tiff2ps-h", "-h"], [155, 5, 1, "cmdoption-tiff2ps-i", "-i"], [155, 5, 1, "cmdoption-tiff2ps-l", "-l"], [155, 5, 1, "cmdoption-tiff2ps-m", "-m"], [155, 5, 1, "cmdoption-tiff2ps-o", "-o"], [155, 5, 1, "cmdoption-tiff2ps-p", "-p"], [155, 5, 1, "cmdoption-tiff2ps-r", "-r"], [155, 5, 1, "cmdoption-tiff2ps-s", "-s"], [155, 5, 1, "cmdoption-tiff2ps-t", "-t"], [155, 5, 1, "cmdoption-tiff2ps-w", "-w"], [155, 5, 1, "cmdoption-tiff2ps-x", "-x"], [155, 5, 1, "cmdoption-tiff2ps-y", "-y"], [155, 5, 1, "cmdoption-tiff2ps-z", "-z"]], "tiff2rgba": [[156, 5, 1, "cmdoption-tiff2rgba-B", "-B"], [156, 5, 1, "cmdoption-tiff2rgba-M", "-M"], [156, 5, 1, "cmdoption-tiff2rgba-b", "-b"], [156, 5, 1, "cmdoption-tiff2rgba-c", "-c"], [156, 5, 1, "cmdoption-tiff2rgba-n", "-n"], [156, 5, 1, "cmdoption-tiff2rgba-r", "-r"]], "tiffcmp": [[157, 5, 1, "cmdoption-tiffcmp-l", "-l"], [157, 5, 1, "cmdoption-tiffcmp-t", "-t"], [157, 5, 1, "cmdoption-tiffcmp-z", "-z"]], "tiffcp": [[158, 5, 1, "cmdoption-tiffcp-0", "-,"], [158, 5, 1, "cmdoption-tiffcp-8", "-8"], [158, 5, 1, "cmdoption-tiffcp-B", "-B"], [158, 5, 1, "cmdoption-tiffcp-C", "-C"], [158, 5, 1, "cmdoption-tiffcp-L", "-L"], [158, 5, 1, "cmdoption-tiffcp-M", "-M"], [158, 5, 1, "cmdoption-tiffcp-a", "-a"], [158, 5, 1, "cmdoption-tiffcp-b", "-b"], [158, 5, 1, "cmdoption-tiffcp-c", "-c"], [158, 5, 1, "cmdoption-tiffcp-f", "-f"], [158, 5, 1, "cmdoption-tiffcp-i", "-i"], [158, 5, 1, "cmdoption-tiffcp-l", "-l"], [158, 5, 1, "cmdoption-tiffcp-m", "-m"], [158, 5, 1, "cmdoption-tiffcp-o", "-o"], [158, 5, 1, "cmdoption-tiffcp-p", "-p"], [158, 5, 1, "cmdoption-tiffcp-r", "-r"], [158, 5, 1, "cmdoption-tiffcp-s", "-s"], [158, 5, 1, "cmdoption-tiffcp-t", "-t"], [158, 5, 1, "cmdoption-tiffcp-w", "-w"], [158, 5, 1, "cmdoption-tiffcp-x", "-x"]], "tiffcrop": [[159, 5, 1, "cmdoption-tiffcrop-B", "-B"], [159, 5, 1, "cmdoption-tiffcrop-C", "-C"], [159, 5, 1, "cmdoption-tiffcrop-D", "-D"], [159, 5, 1, "cmdoption-tiffcrop-E", "-E"], [159, 5, 1, "cmdoption-tiffcrop-F", "-F"], [159, 5, 1, "cmdoption-tiffcrop-H", "-H"], [159, 5, 1, "cmdoption-tiffcrop-I", "-I"], [159, 5, 1, "cmdoption-tiffcrop-J", "-J"], [159, 5, 1, "cmdoption-tiffcrop-K", "-K"], [159, 5, 1, "cmdoption-tiffcrop-L", "-L"], [159, 5, 1, "cmdoption-tiffcrop-M", "-M"], [159, 5, 1, "cmdoption-tiffcrop-N", "-N"], [159, 5, 1, "cmdoption-tiffcrop-O", "-O"], [159, 5, 1, "cmdoption-tiffcrop-P", "-P"], [159, 5, 1, "cmdoption-tiffcrop-R", "-R"], [159, 5, 1, "cmdoption-tiffcrop-S", "-S"], [159, 5, 1, "cmdoption-tiffcrop-U", "-U"], [159, 5, 1, "cmdoption-tiffcrop-V", "-V"], [159, 5, 1, "cmdoption-tiffcrop-X", "-X"], [159, 5, 1, "cmdoption-tiffcrop-Y", "-Y"], [159, 5, 1, "cmdoption-tiffcrop-Z", "-Z"], [159, 5, 1, "cmdoption-tiffcrop-c", "-c"], [159, 5, 1, "cmdoption-tiffcrop-e", "-e"], [159, 5, 1, "cmdoption-tiffcrop-f", "-f"], [159, 5, 1, "cmdoption-tiffcrop-h", "-h"], [159, 5, 1, "cmdoption-tiffcrop-i", "-i"], [159, 5, 1, "cmdoption-tiffcrop-k", "-k"], [159, 5, 1, "cmdoption-tiffcrop-l", "-l"], [159, 5, 1, "cmdoption-tiffcrop-m", "-m"], [159, 5, 1, "cmdoption-tiffcrop-p", "-p"], [159, 5, 1, "cmdoption-tiffcrop-r", "-r"], [159, 5, 1, "cmdoption-tiffcrop-s", "-s"], [159, 5, 1, "cmdoption-tiffcrop-t", "-t"], [159, 5, 1, "cmdoption-tiffcrop-v", "-v"], [159, 5, 1, "cmdoption-tiffcrop-w", "-w"], [159, 5, 1, "cmdoption-tiffcrop-z", "-z"]], "tiffdither": [[160, 5, 1, "cmdoption-tiffdither-c", "-c"], [160, 5, 1, "cmdoption-tiffdither-f", "-f"], [160, 5, 1, "cmdoption-tiffdither-r", "-r"], [160, 5, 1, "cmdoption-tiffdither-t", "-t"]], "tiffdump": [[161, 5, 1, "cmdoption-tiffdump-h", "-h"], [161, 5, 1, "cmdoption-tiffdump-m", "-m"], [161, 5, 1, "cmdoption-tiffdump-o", "-o"]], "tiffgt": [[162, 5, 1, "cmdoption-tiffgt-c", "-c"], [162, 5, 1, "cmdoption-tiffgt-d", "-d"], [162, 5, 1, "cmdoption-tiffgt-e", "-e"], [162, 5, 1, "cmdoption-tiffgt-f", "-f"], [162, 5, 1, "cmdoption-tiffgt-l", "-l"], [162, 5, 1, "cmdoption-tiffgt-m", "-m"], [162, 5, 1, "cmdoption-tiffgt-o", "-o"], [162, 5, 1, "cmdoption-tiffgt-p", "-p"], [162, 5, 1, "cmdoption-tiffgt-r", "-r"], [162, 5, 1, "cmdoption-tiffgt-s", "-s"], [162, 5, 1, "cmdoption-tiffgt-v", "-v"], [162, 5, 1, "cmdoption-tiffgt-w", "-w"]], "tiffinfo": [[163, 5, 1, "cmdoption-tiffinfo-0", "-#"], [163, 5, 1, "cmdoption-tiffinfo-D", "-D"], [163, 5, 1, "cmdoption-tiffinfo-W", "-W"], [163, 5, 1, "cmdoption-tiffinfo-c", "-c"], [163, 5, 1, "cmdoption-tiffinfo-d", "-d"], [163, 5, 1, "cmdoption-tiffinfo-j", "-j"], [163, 5, 1, "cmdoption-tiffinfo-o", "-o"], [163, 5, 1, "cmdoption-tiffinfo-s", "-s"], [163, 5, 1, "cmdoption-tiffinfo-z", "-z"]], "tiffmedian": [[164, 5, 1, "cmdoption-tiffmedian-C", "-C"], [164, 5, 1, "cmdoption-tiffmedian-c", "-c"], [164, 5, 1, "cmdoption-tiffmedian-f", "-f"], [164, 5, 1, "cmdoption-tiffmedian-r", "-r"]], "tiffset": [[165, 5, 1, "cmdoption-tiffset-d", "-d"], [165, 5, 1, "cmdoption-tiffset-s", "-s"], [165, 5, 1, "cmdoption-tiffset-sd", "-sd"], [165, 5, 1, "cmdoption-tiffset-sf", "-sf"], [165, 5, 1, "cmdoption-tiffset-u", "-u"]]}, "objtypes": {"0": "c:function", "1": "c:functionParam", "2": "c:type", "3": "c:member", "4": "c:macro", "5": "std:cmdoption"}, "objnames": {"0": ["c", "function", "C function"], "1": ["c", "functionParam", "C function parameter"], "2": ["c", "type", "C type"], "3": ["c", "member", "C member"], "4": ["c", "macro", "C macro"], "5": ["std", "cmdoption", "program option"]}, "titleterms": {"defin": [0, 65], "new": [0, 65], "tiff": [0, 1, 2, 3, 27, 63, 64, 65, 66, 67, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 139, 140, 142, 143, 145], "tag": [0, 21, 40, 62, 66, 95, 139, 140, 162], "tifffieldinfo": 0, "default": 0, "auto": 0, "registr": 0, "applic": 0, "ad": [0, 65], "builtin": [0, 65], "codec": [0, 65, 140], "privat": 0, "build": 1, "softwar": [1, 2, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "distribut": 1, "all": 1, "system": 1, "cmake": 1, "tree": 1, "gener": [1, 65], "configur": [1, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "option": [1, 23, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "instal": 1, "packag": 1, "support": [1, 27, 62, 66, 76, 95, 162], "static": 1, "share": 1, "object": 1, "jpeg": [1, 143], "zip": 1, "unix": 1, "autoconf": 1, "make": 1, "target": 1, "other": [1, 65, 66, 139, 143], "test": [1, 63, 133], "libtiff": [1, 62, 64, 70, 71, 138, 140, 141], "sourc": 1, "file": [1, 66, 139, 142], "core": [1, 140], "librari": [1, 64, 65, 66, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "contribut": [2, 77, 79, 80, 81, 83, 84, 88, 89, 90, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138], "function": [3, 62], "overview": [3, 69, 72, 139, 143, 145], "tiffaccesstagmethod": 4, "synopsi": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "descript": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "diagnost": [4, 5, 6, 7, 8, 9, 11, 16, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 62, 146, 147], "see": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 67, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "also": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 67, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166], "tiffclientinfo": 5, "tiffclos": 6, "tiffcreatedirectori": 7, "note": [7, 8, 9, 11, 12, 24, 25, 27, 28, 29, 30, 32, 33, 34, 37, 38, 42, 43, 45, 46, 47, 49, 143, 146, 159, 160, 164], "tiffcustomdirectori": 8, "hint": 8, "detail": [8, 137, 139], "instruct": 8, "return": [8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 47, 48, 49, 50, 60], "valu": [8, 10, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 47, 48, 49, 50, 60, 162], "tiffcustomtaglist": 9, "tiffdatawidth": 10, "tiffdeferstrilearraywrit": 11, "tifferror": 12, "tifffielddatatyp": 13, "tifffieldnam": 14, "tifffieldpasscount": 15, "tifffieldqueri": 16, "tifffieldreadcount": 17, "tifffieldtag": 18, "tifffieldwritecount": 19, "tiffflush": 20, "tiffgetfield": 21, "properti": [21, 40], "autoregist": 21, "tiffmergefieldinfo": 22, "tiffopen": 23, "byte": [23, 66], "order": [23, 66], "tiffopenopt": 24, "exampl": [24, 154, 155, 158, 159, 165], "tiffprintdirectori": 25, "tiffprocfunct": 26, "tiffrgbaimag": [27, 66], "altern": 27, "raster": 27, "format": [27, 142], "simultan": 27, "store": 27, "displai": 27, "addit": 27, "tiffreaddirectori": 28, "tiffreadencodedstrip": 29, "tiffreadencodedtil": 30, "tiffreadfromuserbuff": 31, "tiffreadrgbaimag": 32, "tiffreadrgbastrip": 33, "tiffreadrgbatil": 34, "tiffreadrawstrip": 35, "tiffreadrawtil": 36, "tiffreadscanlin": 37, "bug": [37, 49, 62, 69, 146, 147, 148, 152, 155, 157, 162, 166], "tiffreadtil": 38, "tiffsetdirectori": 39, "tiffsetfield": 40, "data": [40, 62, 66, 143], "type": [40, 62, 65], "tiffsettagextend": 41, "tiffstrilequeri": 42, "tiffwarn": 43, "tiffwritedirectori": 44, "tiffwriteencodedstrip": 45, "tiffwriteencodedtil": 46, "tiffwriterawstrip": 47, "tiffwriterawtil": 48, "tiffwritescanlin": 49, "tiffwritetil": 50, "tiffbuff": 51, "tiffcodec": 52, "tiffcolor": 53, "tiffmemori": 54, "tiffqueri": 55, "tiffsiz": 56, "tiffstrip": 57, "tiffswab": 58, "tifftil": 59, "_tiffrewritefield": 60, "_tiffauxiliari": 61, "list": [62, 72], "routin": 62, "auxiliari": 62, "usag": 62, "pseudo": 62, "imag": [63, 66, 67, 139, 143, 150], "util": 64, "refer": [64, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 143], "modifi": 65, "The": [65, 66], "tiffconf": 65, "h": 65, "portabl": [65, 76], "comment": [65, 136], "typedef": 65, "us": [66, 140], "how": 66, "tell": 66, "which": 66, "version": 66, "you": 66, "have": 66, "datatyp": 66, "memori": 66, "manag": 66, "error": [66, 143], "handl": 66, "basic": [66, 143], "directori": [66, 139], "compress": [66, 92, 93, 94, 95, 96, 97, 98, 99, 100, 140, 143], "scheme": 66, "placement": 66, "scanlin": 66, "base": 66, "i": [66, 137, 143], "o": 66, "strip": 66, "orient": 66, "tile": 66, "re": 66, "entranc": 66, "thread": 66, "safeti": 66, "multi": [66, 67], "page": [66, 67, 145], "stuff": 66, "sub": 67, "ifd": [67, 139, 140], "chain": 67, "write": 67, "read": 67, "acknowledg": 68, "maintain": 68, "contributor": 68, "report": 69, "secur": 69, "issu": 69, "project": [70, 73, 137], "licens": 71, "mail": 72, "subscript": 72, "archiv": 72, "steer": [73, 137], "committe": [73, 137], "old": 74, "releas": [74, 75], "histori": [74, 75, 137, 138], "chang": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 143], "v3": [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114], "4beta016": [76, 77], "tool": [76, 77, 78, 79, 80, 83, 84, 87, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 138, 145], "document": [77, 79, 80, 82, 132, 133, 134, 135], "4beta018": 78, "4beta024": 79, "4beta028": 80, "4beta029": 81, "4beta031": 82, "4beta032": 83, "4beta033": 84, "4beta034": 85, "4beta035": 86, "4beta036": 87, "5": [88, 89, 90, 91, 92, 93, 94, 114, 122, 131, 132], "1": [88, 96, 101, 106, 110, 116, 127, 132, 135, 137], "2": [89, 102, 107, 111, 118, 128, 138, 140, 143], "3": [90, 103, 112, 119, 129], "major": [90, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "4": [91, 104, 113, 120, 130], "lzw": [92, 93, 94, 95, 96, 97, 98, 99, 100], "kit": [92, 93, 94, 95, 96, 97, 98, 99, 100], "6beta": 93, "7": [94, 97, 98, 99, 100, 101, 102, 103, 104, 124, 134, 135], "6": [95, 96, 123, 133, 140, 143], "0": [95, 97, 105, 108, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 140, 143], "custom": [95, 140], "0alpha": 98, "0beta": [99, 109], "0beta2": 100, "8": [105, 106, 107, 125], "9": [108, 109, 110, 111, 112, 113, 114, 126], "v4": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135], "10": 117, "compressor": 117, "rel": 117, "perform": 117, "4beta": 121, "unsupport": [133, 134, 135], "request": 136, "For": 136, "rfc": [136, 137, 138], "guidelin": 137, "summari": [137, 138], "process": 137, "when": 137, "vote": [137, 138], "requir": [137, 140, 143], "observ": 137, "bootstrap": 137, "credit": 137, "restor": 138, "need": 138, "prehistori": 138, "propos": 138, "procedur": 138, "previou": 138, "discuss": 138, "bigtiff": [139, 141], "design": [139, 143], "extens": 139, "structur": 139, "compar": 139, "classic": 139, "header": 139, "miscellan": 139, "sampl": 139, "coverag": [140, 141], "specif": [140, 141, 142, 143], "baselin": 140, "algorithm": 140, "recogn": 140, "exif": 140, "gp": 140, "32": 140, "sponsor": 141, "draft": 143, "technic": 143, "problem": 143, "limit": 143, "ambigu": 143, "unnecessari": 143, "complex": 143, "solut": 143, "replac": 143, "introduct": 143, "what": 143, "being": 143, "represent": 143, "jpegtabl": 143, "field": 143, "special": 143, "consider": 143, "planarconfigur": 143, "minimum": 143, "recommend": 143, "implement": 143, "section": 143, "21": 143, "ycbcr": 143, "terminologi": 144, "manual": 145, "devic": 145, "depend": 145, "program": 145, "independ": 145, "fax2p": 146, "fax2tiff": 147, "pal2rgb": 148, "ppm2tiff": 149, "raw2tiff": 150, "guess": 150, "geometri": 150, "rgb2ycbcr": 151, "thumbnail": 152, "tiff2bw": 153, "tiff2pdf": 154, "tiff2p": 155, "tiff2rgba": 156, "tiffcmp": 157, "tiffcp": 158, "tiffcrop": 159, "export": 159, "mode": 159, "tiffdith": 160, "tiffdump": 161, "tiffgt": 162, "action": 162, "kei": 162, "tiffinfo": 163, "tiffmedian": 164, "tiffset": 165, "tiffsplit": 166, "exit": 166, "statu": 166}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 58}, "alltitles": {"Defining New TIFF Tags": [[0, "defining-new-tiff-tags"]], "TIFFFieldInfo": [[0, "tifffieldinfo"]], "Default Tag Auto-registration": [[0, "default-tag-auto-registration"]], "Defining Application Tags": [[0, "defining-application-tags"]], "Adding New Builtin Tags": [[0, "adding-new-builtin-tags"]], "Adding New Codec-private Tags": [[0, "adding-new-codec-private-tags"]], "Building the TIFF Software Distribution": [[1, "building-the-tiff-software-distribution"]], "Building on all systems with CMake": [[1, "building-on-all-systems-with-cmake"]], "Build Trees": [[1, "build-trees"], [1, "id1"]], "Generators": [[1, "generators"]], "Configuration Options": [[1, "configuration-options"], [1, "id2"]], "Installation options": [[1, "id9"]], "Configuring Optional Packages/Support": [[1, "configuring-optional-packages-support"], [1, "id3"]], "Static/Shared Objects Support": [[1, "static-shared-objects-support"], [1, "id4"]], "JPEG Support": [[1, "jpeg-support"], [1, "id5"]], "ZIP Support": [[1, "zip-support"], [1, "id7"]], "Building on a UNIX System with Autoconf": [[1, "building-on-a-unix-system-with-autoconf"]], "Make targets": [[1, "id10"]], "Building the Software on Other Systems": [[1, "building-the-software-on-other-systems"]], "Testing the software": [[1, "testing-the-software"]], "LibTIFF source files": [[1, "libtiff-source-files"]], "Core library source files": [[1, "id11"]], "Contributed TIFF Software": [[2, "contributed-tiff-software"]], "Contributed software": [[2, "id1"]], "TIFF Functions Overview": [[3, "tiff-functions-overview"]], "TIFFAccessTagMethods": [[4, "tiffaccesstagmethods"]], "Synopsis": [[4, "synopsis"], [5, "synopsis"], [6, "synopsis"], [7, "synopsis"], [8, "synopsis"], [9, "synopsis"], [10, "synopsis"], [11, "synopsis"], [12, "synopsis"], [13, "synopsis"], [14, "synopsis"], [15, "synopsis"], [16, "synopsis"], [17, "synopsis"], [18, "synopsis"], [19, "synopsis"], [20, "synopsis"], [21, "synopsis"], [22, "synopsis"], [23, "synopsis"], [24, "synopsis"], [25, "synopsis"], [26, "synopsis"], [27, "synopsis"], [28, "synopsis"], [29, "synopsis"], [30, "synopsis"], [31, "synopsis"], [32, "synopsis"], [33, "synopsis"], [34, "synopsis"], [35, "synopsis"], [36, "synopsis"], [37, "synopsis"], [38, "synopsis"], [39, "synopsis"], [40, "synopsis"], [41, "synopsis"], [42, "synopsis"], [43, "synopsis"], [44, "synopsis"], [45, "synopsis"], [46, "synopsis"], [47, "synopsis"], [48, "synopsis"], [49, "synopsis"], [50, "synopsis"], [51, "synopsis"], [52, "synopsis"], [53, "synopsis"], [54, "synopsis"], [55, "synopsis"], [56, "synopsis"], [57, "synopsis"], [58, "synopsis"], [59, "synopsis"], [60, "synopsis"], [61, "synopsis"], [62, "synopsis"], [146, "synopsis"], [147, "synopsis"], [148, "synopsis"], [150, "synopsis"], [151, "synopsis"], [152, "synopsis"], [153, "synopsis"], [154, "synopsis"], [155, "synopsis"], [156, "synopsis"], [157, "synopsis"], [158, "synopsis"], [159, "synopsis"], [160, "synopsis"], [161, "synopsis"], [162, "synopsis"], [163, "synopsis"], [164, "synopsis"], [165, "synopsis"], [166, "synopsis"]], "Description": [[4, "description"], [5, "description"], [6, "description"], [7, "description"], [8, "description"], [9, "description"], [10, "description"], [11, "description"], [12, "description"], [13, "description"], [14, "description"], [15, "description"], [16, "description"], [17, "description"], [18, "description"], [19, "description"], [20, "description"], [21, "description"], [22, "description"], [23, "description"], [24, "description"], [25, "description"], [26, "description"], [27, "description"], [28, "description"], [29, "description"], [30, "description"], [31, "description"], [32, "description"], [33, "description"], [34, "description"], [35, "description"], [36, "description"], [37, "description"], [38, "description"], [39, "description"], [40, "description"], [41, "description"], [42, "description"], [43, "description"], [44, "description"], [45, "description"], [46, "description"], [47, "description"], [48, "description"], [49, "description"], [50, "description"], [51, "description"], [52, "description"], [53, "description"], [54, "description"], [55, "description"], [56, "description"], [57, "description"], [58, "description"], [59, "description"], [60, "description"], [61, "description"], [62, "description"], [146, "description"], [147, "description"], [148, "description"], [149, "description"], [150, "description"], [151, "description"], [152, "description"], [153, "description"], [154, "description"], [155, "description"], [156, "description"], [157, "description"], [158, "description"], [159, "description"], [160, "description"], [161, "description"], [162, "description"], [163, "description"], [164, "description"], [165, "description"], [166, "description"]], "Diagnostics": [[4, "diagnostics"], [5, "diagnostics"], [6, "diagnostics"], [7, "diagnostics"], [8, "diagnostics"], [9, "diagnostics"], [11, "diagnostics"], [16, "diagnostics"], [20, "diagnostics"], [21, "diagnostics"], [22, "diagnostics"], [23, "diagnostics"], [25, "diagnostics"], [26, "diagnostics"], [27, "diagnostics"], [28, "diagnostics"], [29, "diagnostics"], [30, "diagnostics"], [31, "diagnostics"], [32, "diagnostics"], [33, "diagnostics"], [34, "diagnostics"], [35, "diagnostics"], [36, "diagnostics"], [37, "diagnostics"], [38, "diagnostics"], [39, "diagnostics"], [40, "diagnostics"], [42, "diagnostics"], [44, "diagnostics"], [45, "diagnostics"], [46, "diagnostics"], [47, "diagnostics"], [48, "diagnostics"], [49, "diagnostics"], [50, "diagnostics"], [51, "diagnostics"], [52, "diagnostics"], [54, "diagnostics"], [55, "diagnostics"], [56, "diagnostics"], [57, "diagnostics"], [58, "diagnostics"], [59, "diagnostics"], [62, "diagnostics"], [146, "diagnostics"], [147, "diagnostics"]], "See also": [[4, "see-also"], [5, "see-also"], [6, "see-also"], [7, "see-also"], [8, "see-also"], [9, "see-also"], [10, "see-also"], [11, "see-also"], [12, "see-also"], [13, "see-also"], [14, "see-also"], [15, "see-also"], [16, "see-also"], [17, "see-also"], [18, "see-also"], [19, "see-also"], [20, "see-also"], [21, "see-also"], [22, "see-also"], [23, "see-also"], [24, "see-also"], [25, "see-also"], [26, "see-also"], [27, "see-also"], [28, "see-also"], [29, "see-also"], [30, "see-also"], [31, "see-also"], [32, "see-also"], [33, "see-also"], [34, "see-also"], [35, "see-also"], [36, "see-also"], [37, "see-also"], [38, "see-also"], [39, "see-also"], [40, "see-also"], [41, "see-also"], [42, "see-also"], [43, "see-also"], [44, "see-also"], [45, "see-also"], [46, "see-also"], [47, "see-also"], [48, "see-also"], [49, "see-also"], [50, "see-also"], [51, "see-also"], [52, "see-also"], [53, "see-also"], [54, "see-also"], [55, "see-also"], [56, "see-also"], [57, "see-also"], [58, "see-also"], [59, "see-also"], [60, "see-also"], [61, "see-also"], [62, "see-also"], [67, "see-also"], [146, "see-also"], [147, "see-also"], [148, "see-also"], [149, "see-also"], [150, "see-also"], [151, "see-also"], [152, "see-also"], [153, "see-also"], [154, "see-also"], [155, "see-also"], [156, "see-also"], [157, "see-also"], [158, "see-also"], [159, "see-also"], [160, "see-also"], [161, "see-also"], [162, "see-also"], [163, "see-also"], [164, "see-also"], [165, "see-also"], [166, "see-also"]], "TIFFClientInfo": [[5, "tiffclientinfo"]], "TIFFClose": [[6, "tiffclose"]], "TIFFCreateDirectory": [[7, "tiffcreatedirectory"]], "Notes": [[7, "notes"], [8, "notes"], [25, "notes"], [27, "notes"], [28, "notes"], [29, "notes"], [30, "notes"], [32, "notes"], [33, "notes"], [34, "notes"], [37, "notes"], [38, "notes"], [45, "notes"], [46, "notes"], [47, "notes"], [49, "notes"], [146, "notes"], [159, "notes"], [160, "notes"], [164, "notes"]], "TIFFCustomDirectory": [[8, "tiffcustomdirectory"]], "Hints and detailed instructions": [[8, "hints-and-detailed-instructions"]], "RETURN VALUES": [[8, "return-values"]], "TIFFCustomTagList": [[9, "tiffcustomtaglist"]], "Note": [[9, "note"], [11, "note"], [12, "note"], [24, "note"], [42, "note"], [43, "note"]], "TIFFDataWidth": [[10, "tiffdatawidth"]], "Return values": [[10, "return-values"], [12, "return-values"], [13, "return-values"], [14, "return-values"], [15, "return-values"], [17, "return-values"], [18, "return-values"], [19, "return-values"], [20, "return-values"], [21, "return-values"], [23, "return-values"], [25, "return-values"], [27, "return-values"], [28, "return-values"], [29, "return-values"], [30, "return-values"], [31, "return-values"], [32, "return-values"], [33, "return-values"], [34, "return-values"], [35, "return-values"], [36, "return-values"], [37, "return-values"], [38, "return-values"], [39, "return-values"], [40, "return-values"], [43, "return-values"], [44, "return-values"], [45, "return-values"], [46, "return-values"], [47, "return-values"], [48, "return-values"], [49, "return-values"], [50, "return-values"], [60, "return-values"]], "TIFFDeferStrileArrayWriting": [[11, "tiffdeferstrilearraywriting"]], "Returns": [[11, "returns"]], "TIFFError": [[12, "tifferror"]], "TIFFFieldDataType": [[13, "tifffielddatatype"]], "TIFFFieldName": [[14, "tifffieldname"]], "TIFFFieldPassCount": [[15, "tifffieldpasscount"]], "TIFFFieldQuery": [[16, "tifffieldquery"]], "TIFFFieldReadCount": [[17, "tifffieldreadcount"]], "TIFFFieldTag": [[18, "tifffieldtag"]], "TIFFFieldWriteCount": [[19, "tifffieldwritecount"]], "TIFFFlush": [[20, "tiffflush"]], "TIFFGetField": [[21, "tiffgetfield"]], "Tag properties": [[21, "id1"], [40, "id2"]], "Autoregistered tags": [[21, "autoregistered-tags"]], "TIFFMergeFieldInfo": [[22, "tiffmergefieldinfo"]], "TIFFOpen": [[23, "tiffopen"]], "Options": [[23, "options"], [146, "options"], [147, "options"], [148, "options"], [149, "options"], [150, "options"], [151, "options"], [152, "options"], [153, "options"], [154, "options"], [155, "options"], [156, "options"], [157, "options"], [158, "options"], [159, "options"], [160, "options"], [161, "options"], [162, "options"], [163, "options"], [164, "options"], [165, "options"], [166, "options"]], "Byte order": [[23, "byte-order"]], "TIFFOpenOptions": [[24, "tiffopenoptions"]], "Example": [[24, "example"]], "TIFFPrintDirectory": [[25, "tiffprintdirectory"]], "TIFFProcFunctions": [[26, "tiffprocfunctions"]], "TIFFRGBAImage": [[27, "tiffrgbaimage"]], "Alternate raster formats": [[27, "alternate-raster-formats"]], "Simultaneous raster store and display": [[27, "simultaneous-raster-store-and-display"]], "Supporting additional TIFF formats": [[27, "supporting-additional-tiff-formats"]], "TIFFReadDirectory": [[28, "tiffreaddirectory"]], "TIFFReadEncodedStrip": [[29, "tiffreadencodedstrip"]], "TIFFReadEncodedTile": [[30, "tiffreadencodedtile"]], "TIFFReadFromUserBuffer": [[31, "tiffreadfromuserbuffer"]], "TIFFReadRGBAImage": [[32, "tiffreadrgbaimage"]], "TIFFReadRGBAStrip": [[33, "tiffreadrgbastrip"]], "TIFFReadRGBATile": [[34, "tiffreadrgbatile"]], "TIFFReadRawStrip": [[35, "tiffreadrawstrip"]], "TIFFReadRawTile": [[36, "tiffreadrawtile"]], "TIFFReadScanline": [[37, "tiffreadscanline"]], "Bugs": [[37, "bugs"], [49, "bugs"], [62, "bugs"], [146, "bugs"], [147, "bugs"], [148, "bugs"], [152, "bugs"], [155, "bugs"], [157, "bugs"], [162, "bugs"], [166, "bugs"]], "TIFFReadTile": [[38, "tiffreadtile"]], "TIFFSetDirectory": [[39, "tiffsetdirectory"]], "TIFFSetField": [[40, "tiffsetfield"]], "Tag data types": [[40, "id1"]], "TIFFSetTagExtender": [[41, "tiffsettagextender"]], "TIFFStrileQuery": [[42, "tiffstrilequery"]], "TIFFWarning": [[43, "tiffwarning"]], "TIFFWriteDirectory": [[44, "tiffwritedirectory"]], "TIFFWriteEncodedStrip": [[45, "tiffwriteencodedstrip"]], "TIFFWriteEncodedTile": [[46, "tiffwriteencodedtile"]], "TIFFWriteRawStrip": [[47, "tiffwriterawstrip"]], "TIFFWriteRawTile": [[48, "tiffwriterawtile"]], "TIFFWriteScanline": [[49, "tiffwritescanline"]], "TIFFWriteTile": [[50, "tiffwritetile"]], "TIFFbuffer": [[51, "tiffbuffer"]], "TIFFcodec": [[52, "tiffcodec"]], "TIFFcolor": [[53, "tiffcolor"]], "TIFFmemory": [[54, "tiffmemory"]], "TIFFquery": [[55, "tiffquery"]], "TIFFsize": [[56, "tiffsize"]], "TIFFstrip": [[57, "tiffstrip"]], "TIFFswab": [[58, "tiffswab"]], "TIFFtile": [[59, "tifftile"]], "_TIFFRewriteField": [[60, "tiffrewritefield"]], "_TIFFauxiliary": [[61, "tiffauxiliary"]], "libtiff": [[62, "libtiff"]], "Data types": [[62, "data-types"]], "List of routines": [[62, "list-of-routines"]], "Libtiff functions": [[62, "id2"]], "Libtiff auxiliary functions": [[62, "id3"]], "Tag usage": [[62, "tag-usage"]], "\"Pseudo tags\"": [[62, "pseudo-tags"]], "libtiff supported tags": [[62, "id4"]], "TIFF Test Images": [[63, "tiff-test-images"]], "LibTIFF - TIFF Library and Utilities": [[64, "libtiff-tiff-library-and-utilities"]], "References": [[64, "id1"], [76, "id1"], [77, "id1"], [78, "id1"], [79, "id1"], [80, "id1"], [81, "id1"], [82, "id1"], [83, "id1"], [84, "id1"], [85, "id1"], [86, "id1"], [87, "id1"], [88, "id1"], [89, "id1"], [90, "id2"], [91, "id1"], [92, "id4"], [93, "id1"], [94, "id1"], [95, "id1"], [96, "id1"], [97, "id1"], [98, "id1"], [99, "id1"], [100, "id1"], [101, "id1"], [102, "id1"], [103, "id1"], [104, "id1"], [105, "id1"], [106, "id1"], [107, "id1"], [108, "id1"], [109, "id1"], [110, "id1"], [111, "id1"], [112, "id1"], [113, "id1"], [114, "id1"], [115, "id2"], [116, "id2"], [117, "id1"], [118, "id2"], [119, "id2"], [120, "id2"], [121, "id2"], [122, "id2"], [123, "id2"], [124, "id1"], [125, "id1"], [126, "id2"], [127, "id1"], [128, "id1"], [129, "id1"], [130, "id1"], [131, "id1"], [132, "id1"], [133, "id1"], [134, "id1"], [143, "references"], [135, "id1"]], "Modifying The TIFF Library": [[65, "modifying-the-tiff-library"]], "Library Configuration": [[65, "library-configuration"]], "tiffconf.h defines": [[65, "id1"]], "General Portability Comments": [[65, "general-portability-comments"]], "Portability defines": [[65, "id2"]], "Types and Portability": [[65, "types-and-portability"]], "Portability typedefs": [[65, "id3"]], "General Comments": [[65, "general-comments"]], "Adding New Builtin Codecs": [[65, "adding-new-builtin-codecs"]], "Other Comments": [[65, "other-comments"]], "Using The TIFF Library": [[66, "using-the-tiff-library"]], "How to tell which version you have": [[66, "how-to-tell-which-version-you-have"]], "Library Datatypes": [[66, "library-datatypes"]], "Memory Management": [[66, "memory-management"]], "Error Handling": [[66, "error-handling"]], "Basic File Handling": [[66, "basic-file-handling"]], "TIFF Directories": [[66, "tiff-directories"]], "TIFF Tags": [[66, "tiff-tags"]], "TIFF Compression Schemes": [[66, "tiff-compression-schemes"]], "Byte Order": [[66, "byte-order"]], "Data Placement": [[66, "data-placement"]], "TIFFRGBAImage Support": [[66, "tiffrgbaimage-support"]], "Scanline-based Image I/O": [[66, "scanline-based-image-i-o"]], "Strip-oriented Image I/O": [[66, "strip-oriented-image-i-o"]], "Tile-oriented Image I/O": [[66, "tile-oriented-image-i-o"]], "Re-entrancy and Thread Safety": [[66, "re-entrancy-and-thread-safety"]], "Multi Page / Multi Image TIFF": [[66, "multi-page-multi-image-tiff"], [67, "multi-page-multi-image-tiff"]], "Other Stuff": [[66, "other-stuff"]], "Sub IFD chains": [[67, "sub-ifd-chains"]], "Writing Multi Page TIFF": [[67, "writing-multi-page-tiff"]], "Reading Multi Page TIFF": [[67, "reading-multi-page-tiff"]], "Acknowledgments": [[68, "acknowledgments"]], "Maintainers": [[68, "maintainers"]], "Contributors": [[68, "contributors"], [68, "id1"]], "Reporting Bugs": [[69, "reporting-bugs"]], "Overview": [[69, "overview"], [72, "overview"]], "Reporting a bug": [[69, "reporting-a-bug"]], "Reporting a security issue": [[69, "reporting-a-security-issue"]], "LibTIFF Project": [[70, "libtiff-project"]], "LibTIFF License": [[71, "libtiff-license"]], "Mailing List": [[72, "mailing-list"]], "Subscription": [[72, "subscription"]], "Archive": [[72, "archive"]], "Project Steering Committee": [[73, "project-steering-committee"]], "Old release history": [[74, "old-release-history"]], "Release history": [[75, "release-history"]], "Changes in TIFF v3.4beta016": [[76, "changes-in-tiff-v3-4beta016"], [77, "changes-in-tiff-v3-4beta016"]], "Software configuration changes": [[76, "software-configuration-changes"], [77, "software-configuration-changes"], [78, "software-configuration-changes"], [79, "software-configuration-changes"], [80, "software-configuration-changes"], [81, "software-configuration-changes"], [82, "software-configuration-changes"], [83, "software-configuration-changes"], [84, "software-configuration-changes"], [85, "software-configuration-changes"], [86, "software-configuration-changes"], [87, "software-configuration-changes"], [88, "software-configuration-changes"], [89, "software-configuration-changes"], [90, "software-configuration-changes"], [91, "software-configuration-changes"], [92, "software-configuration-changes"], [93, "software-configuration-changes"], [94, "software-configuration-changes"], [95, "software-configuration-changes"], [96, "software-configuration-changes"], [97, "software-configuration-changes"], [98, "software-configuration-changes"], [99, "software-configuration-changes"], [100, "software-configuration-changes"], [101, "software-configuration-changes"], [102, "software-configuration-changes"], [103, "software-configuration-changes"], [104, "software-configuration-changes"], [105, "software-configuration-changes"], [106, "software-configuration-changes"], [107, "software-configuration-changes"], [108, "software-configuration-changes"], [109, "software-configuration-changes"], [110, "software-configuration-changes"], [111, "software-configuration-changes"], [112, "software-configuration-changes"], [113, "software-configuration-changes"], [114, "software-configuration-changes"], [115, "software-configuration-changes"], [116, "software-configuration-changes"], [117, "software-configuration-changes"], [118, "software-configuration-changes"], [119, "software-configuration-changes"], [120, "software-configuration-changes"], [121, "software-configuration-changes"], [122, "software-configuration-changes"], [123, "software-configuration-changes"], [124, "software-configuration-changes"], [125, "software-configuration-changes"], [126, "software-configuration-changes"], [127, "software-configuration-changes"], [128, "software-configuration-changes"], [129, "software-configuration-changes"], [130, "software-configuration-changes"], [131, "software-configuration-changes"], [132, "software-configuration-changes"], [133, "software-configuration-changes"], [134, "software-configuration-changes"], [135, "software-configuration-changes"]], "Library changes": [[76, "library-changes"], [77, "library-changes"], [78, "library-changes"], [79, "library-changes"], [80, "library-changes"], [81, "library-changes"], [82, "library-changes"], [83, "library-changes"], [84, "library-changes"], [85, "library-changes"], [86, "library-changes"], [87, "library-changes"], [88, "library-changes"], [89, "library-changes"], [90, "library-changes"], [91, "library-changes"], [92, "library-changes"], [93, "library-changes"], [94, "library-changes"], [95, "library-changes"], [96, "library-changes"], [97, "library-changes"], [98, "library-changes"], [99, "library-changes"], [100, "library-changes"], [101, "library-changes"], [102, "library-changes"], [103, "library-changes"], [104, "library-changes"], [105, "library-changes"], [106, "library-changes"], [107, "library-changes"], [108, "library-changes"], [109, "library-changes"], [110, "library-changes"], [111, "library-changes"], [112, "library-changes"], [113, "library-changes"], [114, "library-changes"], [115, "library-changes"], [116, "library-changes"], [117, "library-changes"], [118, "library-changes"], [119, "library-changes"], [120, "library-changes"], [121, "library-changes"], [122, "library-changes"], [123, "library-changes"], [124, "library-changes"], [125, "library-changes"], [126, "library-changes"], [127, "library-changes"], [128, "library-changes"], [129, "library-changes"], [130, "library-changes"], [131, "library-changes"], [132, "library-changes"], [133, "library-changes"], [134, "library-changes"], [135, "library-changes"]], "Portability support changes": [[76, "portability-support-changes"]], "Tools changes": [[76, "tools-changes"], [77, "tools-changes"], [78, "tools-changes"], [79, "tools-changes"], [80, "tools-changes"], [83, "tools-changes"], [84, "tools-changes"], [87, "tools-changes"], [91, "tools-changes"], [92, "tools-changes"], [93, "tools-changes"], [94, "tools-changes"], [95, "tools-changes"], [96, "tools-changes"], [97, "tools-changes"], [98, "tools-changes"], [99, "tools-changes"], [100, "tools-changes"], [101, "tools-changes"], [102, "tools-changes"], [103, "tools-changes"], [104, "tools-changes"], [105, "tools-changes"], [106, "tools-changes"], [107, "tools-changes"], [108, "tools-changes"], [109, "tools-changes"], [110, "tools-changes"], [111, "tools-changes"], [112, "tools-changes"], [113, "tools-changes"], [114, "tools-changes"], [115, "tools-changes"], [116, "tools-changes"], [117, "tools-changes"], [118, "tools-changes"], [119, "tools-changes"], [120, "tools-changes"], [121, "tools-changes"], [122, "tools-changes"], [123, "tools-changes"], [124, "tools-changes"], [125, "tools-changes"], [126, "tools-changes"], [127, "tools-changes"], [128, "tools-changes"], [129, "tools-changes"], [130, "tools-changes"], [131, "tools-changes"], [132, "tools-changes"], [133, "tools-changes"], [134, "tools-changes"], [135, "tools-changes"]], "Documentation changes": [[77, "documentation-changes"], [79, "documentation-changes"], [80, "documentation-changes"], [82, "documentation-changes"]], "Contributed software changes": [[77, "contributed-software-changes"], [79, "contributed-software-changes"], [80, "contributed-software-changes"], [81, "contributed-software-changes"], [83, "contributed-software-changes"], [84, "contributed-software-changes"], [88, "contributed-software-changes"], [89, "contributed-software-changes"], [90, "contributed-software-changes"], [93, "contributed-software-changes"], [94, "contributed-software-changes"], [95, "contributed-software-changes"], [96, "contributed-software-changes"], [97, "contributed-software-changes"], [98, "contributed-software-changes"], [99, "contributed-software-changes"], [100, "contributed-software-changes"], [101, "contributed-software-changes"], [102, "contributed-software-changes"], [103, "contributed-software-changes"], [104, "contributed-software-changes"], [105, "contributed-software-changes"], [106, "contributed-software-changes"], [107, "contributed-software-changes"], [108, "contributed-software-changes"], [109, "contributed-software-changes"], [110, "contributed-software-changes"], [111, "contributed-software-changes"], [112, "contributed-software-changes"], [113, "contributed-software-changes"], [114, "contributed-software-changes"], [115, "contributed-software-changes"], [116, "contributed-software-changes"], [117, "contributed-software-changes"], [118, "contributed-software-changes"], [119, "contributed-software-changes"], [120, "contributed-software-changes"], [121, "contributed-software-changes"], [122, "contributed-software-changes"], [123, "contributed-software-changes"], [124, "contributed-software-changes"], [125, "contributed-software-changes"], [126, "contributed-software-changes"], [127, "contributed-software-changes"], [128, "contributed-software-changes"], [129, "contributed-software-changes"], [130, "contributed-software-changes"], [131, "contributed-software-changes"], [132, "contributed-software-changes"]], "Changes in TIFF v3.4beta018": [[78, "changes-in-tiff-v3-4beta018"]], "Changes in TIFF v3.4beta024": [[79, "changes-in-tiff-v3-4beta024"]], "Changes in TIFF v3.4beta028": [[80, "changes-in-tiff-v3-4beta028"]], "Changes in TIFF v3.4beta029": [[81, "changes-in-tiff-v3-4beta029"]], "Changes in TIFF v3.4beta031": [[82, "changes-in-tiff-v3-4beta031"]], "Changes in TIFF v3.4beta032": [[83, "changes-in-tiff-v3-4beta032"]], "Changes in TIFF v3.4beta033": [[84, "changes-in-tiff-v3-4beta033"]], "Changes in TIFF v3.4beta034": [[85, "changes-in-tiff-v3-4beta034"]], "Changes in TIFF v3.4beta035": [[86, "changes-in-tiff-v3-4beta035"]], "Changes in TIFF v3.4beta036": [[87, "changes-in-tiff-v3-4beta036"]], "Changes in TIFF v3.5.1": [[88, "changes-in-tiff-v3-5-1"]], "Changes in TIFF v3.5.2": [[89, "changes-in-tiff-v3-5-2"]], "Changes in TIFF v3.5.3": [[90, "changes-in-tiff-v3-5-3"]], "Major changes": [[90, "major-changes"], [95, "major-changes"], [96, "major-changes"], [97, "major-changes"], [98, "major-changes"], [99, "major-changes"], [100, "major-changes"], [101, "major-changes"], [102, "major-changes"], [103, "major-changes"], [104, "major-changes"], [105, "major-changes"], [106, "major-changes"], [107, "major-changes"], [108, "major-changes"], [109, "major-changes"], [110, "major-changes"], [111, "major-changes"], [112, "major-changes"], [113, "major-changes"], [114, "major-changes"], [115, "major-changes"], [116, "major-changes"], [117, "major-changes"], [118, "major-changes"], [119, "major-changes"], [120, "major-changes"], [121, "major-changes"], [122, "major-changes"], [123, "major-changes"], [124, "major-changes"], [125, "major-changes"], [126, "major-changes"], [127, "major-changes"], [128, "major-changes"], [129, "major-changes"], [130, "major-changes"], [131, "major-changes"], [132, "major-changes"], [133, "major-changes"], [134, "major-changes"], [135, "major-changes"]], "Changes in TIFF v3.5.4": [[91, "changes-in-tiff-v3-5-4"]], "Changes in TIFF v3.5.5": [[92, "changes-in-tiff-v3-5-5"]], "LZW compression kit changes": [[92, "lzw-compression-kit-changes"], [93, "lzw-compression-kit-changes"], [94, "lzw-compression-kit-changes"], [95, "lzw-compression-kit-changes"], [96, "lzw-compression-kit-changes"], [97, "lzw-compression-kit-changes"], [98, "lzw-compression-kit-changes"], [99, "lzw-compression-kit-changes"], [100, "lzw-compression-kit-changes"]], "Changes in TIFF v3.5.6beta": [[93, "changes-in-tiff-v3-5-6beta"]], "Changes in TIFF v3.5.7": [[94, "changes-in-tiff-v3-5-7"]], "Changes in TIFF v3.6.0": [[95, "changes-in-tiff-v3-6-0"]], "Custom Tag Support": [[95, "custom-tag-support"]], "Changes in TIFF v3.6.1": [[96, "changes-in-tiff-v3-6-1"]], "Changes in TIFF v3.7.0": [[97, "changes-in-tiff-v3-7-0"]], "Changes in TIFF v3.7.0alpha": [[98, "changes-in-tiff-v3-7-0alpha"]], "Changes in TIFF v3.7.0beta": [[99, "changes-in-tiff-v3-7-0beta"]], "Changes in TIFF v3.7.0beta2": [[100, "changes-in-tiff-v3-7-0beta2"]], "Changes in TIFF v3.7.1": [[101, "changes-in-tiff-v3-7-1"]], "Changes in TIFF v3.7.2": [[102, "changes-in-tiff-v3-7-2"]], "Changes in TIFF v3.7.3": [[103, "changes-in-tiff-v3-7-3"]], "Changes in TIFF v3.7.4": [[104, "changes-in-tiff-v3-7-4"]], "Changes in TIFF v3.8.0": [[105, "changes-in-tiff-v3-8-0"]], "Changes in TIFF v3.8.1": [[106, "changes-in-tiff-v3-8-1"]], "Changes in TIFF v3.8.2": [[107, "changes-in-tiff-v3-8-2"]], "Changes in TIFF v3.9.0": [[108, "changes-in-tiff-v3-9-0"]], "Changes in TIFF v3.9.0beta": [[109, "changes-in-tiff-v3-9-0beta"]], "Changes in TIFF v3.9.1": [[110, "changes-in-tiff-v3-9-1"]], "Changes in TIFF v3.9.2": [[111, "changes-in-tiff-v3-9-2"]], "Changes in TIFF v3.9.3": [[112, "changes-in-tiff-v3-9-3"]], "Changes in TIFF v3.9.4": [[113, "changes-in-tiff-v3-9-4"]], "Changes in TIFF v3.9.5": [[114, "changes-in-tiff-v3-9-5"]], "Changes in TIFF v4.0.0": [[115, "changes-in-tiff-v4-0-0"]], "Changes in TIFF v4.0.1": [[116, "changes-in-tiff-v4-0-1"]], "Changes in TIFF v4.0.10": [[117, "changes-in-tiff-v4-0-10"]], "Compressor Relative Performance": [[117, "id2"], [117, "id3"]], "Changes in TIFF v4.0.2": [[118, "changes-in-tiff-v4-0-2"]], "Changes in TIFF v4.0.3": [[119, "changes-in-tiff-v4-0-3"]], "Changes in TIFF v4.0.4": [[120, "changes-in-tiff-v4-0-4"]], "Changes in TIFF v4.0.4beta": [[121, "changes-in-tiff-v4-0-4beta"]], "Changes in TIFF v4.0.5": [[122, "changes-in-tiff-v4-0-5"]], "Changes in TIFF v4.0.6": [[123, "changes-in-tiff-v4-0-6"]], "Changes in TIFF v4.0.7": [[124, "changes-in-tiff-v4-0-7"]], "Changes in TIFF v4.0.8": [[125, "changes-in-tiff-v4-0-8"]], "Changes in TIFF v4.0.9": [[126, "changes-in-tiff-v4-0-9"]], "Changes in TIFF v4.1.0": [[127, "changes-in-tiff-v4-1-0"]], "Changes in TIFF v4.2.0": [[128, "changes-in-tiff-v4-2-0"]], "Changes in TIFF v4.3.0": [[129, "changes-in-tiff-v4-3-0"]], "Changes in TIFF v4.4.0": [[130, "changes-in-tiff-v4-4-0"]], "Changes in TIFF v4.5.0": [[131, "changes-in-tiff-v4-5-0"]], "Changes in TIFF v4.5.1": [[132, "changes-in-tiff-v4-5-1"]], "Documentation": [[132, "documentation"], [133, "documentation"], [134, "documentation"], [135, "documentation"]], "Changes in TIFF v4.6.0": [[133, "changes-in-tiff-v4-6-0"]], "Test changes": [[133, "test-changes"]], "Changes to contributed and unsupported tools": [[133, "changes-to-contributed-and-unsupported-tools"], [134, "changes-to-contributed-and-unsupported-tools"], [135, "changes-to-contributed-and-unsupported-tools"]], "Changes in TIFF v4.7.0": [[134, "changes-in-tiff-v4-7-0"]], "Request For Comments (RFCs)": [[136, "request-for-comments-rfcs"]], "RFC 1: Project Steering Committee Guidelines": [[137, "rfc-1-project-steering-committee-guidelines"]], "Summary": [[137, "summary"], [138, "summary"]], "Detailed Process": [[137, "detailed-process"]], "When is Vote Required?": [[137, "when-is-vote-required"]], "Observations": [[137, "observations"]], "Bootstrapping": [[137, "bootstrapping"]], "Credits": [[137, "credits"]], "Voting history": [[137, "voting-history"], [138, "voting-history"]], "RFC 2: Restoring Needed LibTIFF Tools": [[138, "rfc-2-restoring-needed-libtiff-tools"]], "Prehistory": [[138, "prehistory"]], "Proposed procedure": [[138, "proposed-procedure"]], "References to previous contributions to the discussion": [[138, "references-to-previous-contributions-to-the-discussion"]], "BigTIFF Design": [[139, "bigtiff-design"]], "Overview of BigTIFF Extension": [[139, "overview-of-bigtiff-extension"]], "BigTIFF Structures compared to Classic TIFF": [[139, "bigtiff-structures-compared-to-classic-tiff"]], "TIFF and BigTIFF File Header": [[139, "tiff-and-bigtiff-file-header"]], "Classic File Header": [[139, "id1"]], "BigTIFF File Header": [[139, "id2"]], "TIFF and BigTIFF Image File Directory Structure": [[139, "tiff-and-bigtiff-image-file-directory-structure"]], "Classic IFD": [[139, "id3"]], "BigTIFF IFD": [[139, "id4"]], "TIFF and BigTIFF Tag Structure": [[139, "tiff-and-bigtiff-tag-structure"]], "Classic Tag Structure": [[139, "id5"]], "BigTIFF Tag Structure": [[139, "id6"]], "Other miscellaneous details": [[139, "other-miscellaneous-details"]], "Samples": [[139, "samples"]], "LibTIFF Coverage of the TIFF 6.0 Specification": [[140, "libtiff-coverage-of-the-tiff-6-0-specification"]], "Baseline": [[140, "baseline"]], "Core requirements": [[140, "id1"]], "Compression algorithms": [[140, "id2"]], "Tags Recognized by LibTIFF": [[140, "tags-recognized-by-libtiff"]], "Tags used by libtiff": [[140, "id3"]], "Codecs / Compression": [[140, "codecs-compression"]], "Codec / Compression Tags used by libtiff": [[140, "id4"]], "EXIF / GPS Custom IFDs": [[140, "exif-gps-custom-ifds"]], "EXIF Custom Tags": [[140, "exif-custom-tags"]], "EXIF 2.32 Tags used by libtiff": [[140, "id5"]], "GPS Custom Tags": [[140, "gps-custom-tags"]], "GPS 2.32 Tags used by libtiff": [[140, "id6"]], "LibTIFF Coverage of the BigTIFF Specification": [[141, "libtiff-coverage-of-the-bigtiff-specification"]], "Sponsors": [[141, "id1"]], "TIFF File Format Specification": [[142, "tiff-file-format-specification"]], "DRAFT TIFF Technical Note #2": [[143, "draft-tiff-technical-note-2"]], "Problems in TIFF 6.0 JPEG": [[143, "problems-in-tiff-6-0-jpeg"]], "Design errors and limitations": [[143, "design-errors-and-limitations"]], "Ambiguities": [[143, "ambiguities"]], "Unnecessary complexity": [[143, "unnecessary-complexity"]], "Overview of the solution": [[143, "overview-of-the-solution"]], "Replacement TIFF/JPEG specification": [[143, "replacement-tiff-jpeg-specification"]], "Introduction": [[143, "introduction"]], "What data is being compressed?": [[143, "what-data-is-being-compressed"]], "Basic representation of JPEG-compressed images": [[143, "basic-representation-of-jpeg-compressed-images"]], "JPEGTables field": [[143, "jpegtables-field"]], "Special considerations for PlanarConfiguration 2": [[143, "special-considerations-for-planarconfiguration-2"]], "Minimum requirements for TIFF/JPEG": [[143, "minimum-requirements-for-tiff-jpeg"]], "Other recommendations for implementers": [[143, "other-recommendations-for-implementers"]], "Changes to Section 21: YCbCr Images": [[143, "changes-to-section-21-ycbcr-images"]], "Terminology": [[144, "terminology"]], "TIFF Tools Overview": [[145, "tiff-tools-overview"]], "Manual pages": [[145, "manual-pages"]], "Device-dependent Programs": [[145, "device-dependent-programs"]], "Device-dependent programs": [[145, "id1"], [145, "id2"]], "Device-independent Programs": [[145, "device-independent-programs"]], "fax2ps": [[146, "fax2ps"]], "fax2tiff": [[147, "fax2tiff"]], "pal2rgb": [[148, "pal2rgb"]], "ppm2tiff": [[149, "ppm2tiff"]], "raw2tiff": [[150, "raw2tiff"]], "Guessing the image geometry": [[150, "guessing-the-image-geometry"]], "rgb2ycbcr": [[151, "rgb2ycbcr"]], "thumbnail": [[152, "thumbnail"]], "tiff2bw": [[153, "tiff2bw"]], "tiff2pdf": [[154, "tiff2pdf"]], "Examples": [[154, "examples"], [155, "examples"], [158, "examples"], [159, "examples"], [165, "examples"]], "tiff2ps": [[155, "tiff2ps"]], "tiff2rgba": [[156, "tiff2rgba"]], "tiffcmp": [[157, "tiffcmp"]], "tiffcp": [[158, "tiffcp"]], "tiffcrop": [[159, "tiffcrop"]], "Export modes": [[159, "id1"]], "tiffdither": [[160, "tiffdither"]], "tiffdump": [[161, "tiffdump"]], "tiffgt": [[162, "tiffgt"]], "Supported tag values": [[162, "id1"]], "Action keys": [[162, "id2"]], "tiffinfo": [[163, "tiffinfo"]], "tiffmedian": [[164, "tiffmedian"]], "tiffset": [[165, "tiffset"]], "tiffsplit": [[166, "tiffsplit"]], "Exit status": [[166, "exit-status"]], "Changes in TIFF v4.7.1": [[135, "changes-in-tiff-v4-7-1"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/specification/bigtiff.html b/third_party/libtiff/doc/html-prebuilt/specification/bigtiff.html deleted file mode 100644 index f33c1af..0000000 --- a/third_party/libtiff/doc/html-prebuilt/specification/bigtiff.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - - BigTIFF Design — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

BigTIFF Design

-

The classic TIFF file format uses 32bit offsets and, as such, is limited to 4 gigabytes. -The BigTIFF design details a 64-bit (larger than 4GB) TIFF format specification. -The design is based on a proposal by Steve Carlsen of Adobe, with input -from various other parties.

-
-

Overview of BigTIFF Extension

-
    -
  • The Version ID, in header bytes 2-3, formerly decimal 42, changes to 43 for BigTIFF.

  • -
  • Header bytes 4-5 contain the decimal number 8.

    -
      -
    • If there is some other number here, a reader should give up.

    • -
    • This is to provide a nice way to move to 16-byte pointers some day.

    • -
    -
  • -
  • Header bytes 6-7 are reserved and must be zero.

    -
      -
    • If they're not, a reader should give up.

    • -
    -
  • -
  • Header bytes 8-15 contain the 8-byte offset to the first IFD.

  • -
  • Value/Offset fields are 8 bytes long, and take up bytes 8-15 in an IFD entry.

    -
      -
    • If the value is ≤ 8 bytes, it must be stored in the field.

    • -
    • All values must begin at an 8-byte-aligned address.

    • -
    -
  • -
  • 8-byte offset to the Next_IFD, at the end of an IFD.

  • -
  • To keep IFD entries 8-byte-aligned, we begin with an 8-byte -(instead of 2-byte) count of the number of directory entries.

  • -
  • Add TIFFDataTypes of TIFF_LONG8 (= 16), an 8-byte unsigned int, -and TIFF_SLONG8 (= 17), an 8-byte signed int.

  • -
  • Add TIFFDataType TIFF_IFD8 (=18) an 8-byte IFD offset.

  • -
  • StripOffsets and TileOffsets and ByteCounts may be TIFF_LONG8 -or the traditionally allowed TIFF_LONG or TIFF_SHORT.

  • -
  • The proposed extension is .tf8 or .btf, and call it "BigTIFF".

  • -
-

Otherwise, it's just like "original TIFF" or "classic TIFF".

-
-
-

BigTIFF Structures compared to Classic TIFF

-
-

TIFF and BigTIFF File Header

-

Here's the classic TIFF file header ...

- - - - - - - - - - - - - - - - - - - - - - -
Classic File Header

Offset

Datatype

Value

0

UInt16

Byte order indication

2

UInt16

Version number (always 42)

4

UInt32

Offset to first IFD

-

And this is the BigTIFF file header ...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BigTIFF File Header

Offset

Datatype

Value

0

UInt16

Byte order indication

2

UInt16

Version number, always 43 for BigTIFF

4

UInt16

-
Bytesize of offsets.
-
Always 8 in BigTIFF, it provides a nice way to move to 16-byte pointers some day.
-
If there is some other value here, a reader should give up.
-
-

6

UInt16

-
Reserved, always 0.
-
If there is some other value here, a reader should give up.
-
-

8

UInt64

Offset to first IFD

-

The last members in both variants of the structure point to the first IFD -(Image File Directory). -This IFD can be located anywhere in the file. Every 'page' in a multi-page TIFF, -classic TIFF or BigTIFF, is represented by exactly one IFD.

-
-
-

TIFF and BigTIFF Image File Directory Structure

-

Here's a more detailed view of the classic IFD ...

- - - - - - - - - - - - - - - - - - - - - - -
Classic IFD

Offset

Datatype

Value

0

UInt16

Number of tags in IFD

2 + x * 12

Tag structure

Tag data

2 + (Number of tags in IFD) * 12

UInt32

-
Offset to next IFD, if there is a next IFD,
-
0 otherwise.
-
-
-

And this is how the IFD looks like in the BigTIFF file format ...

- - - - - - - - - - - - - - - - - - - - - - -
BigTIFF IFD

Offset

Datatype

Value

0

UInt64

Number of tags in IFD

8 + x * 20

Tag structure

Tag data

8 + (Number of tags in IFD) * 20

UInt64

-
Offset to next IFD, if there is a next IFD,
-
0 otherwise.
-
-
-
-
-

TIFF and BigTIFF Tag Structure

-

The tags in this IFD should be sorted by code, in both classic TIFF and BigTIFF. -Every tag takes up exactly 12 bytes in classic TIFF, and looks like this ...

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Classic Tag Structure

Offset

Datatype

Value

0

UInt16

Tag identifying code

2

UInt16

Datatype of tag data

4

UInt32

Number of values

8

-
x * tag data datatype
-
or UInt32 offset
-
-
-
Tag data
-
or offset to tag data
-
-
-

This same tag structure, in BigTIFF, takes up 20 bytes, and looks like this ...

- - - - - - - - - - - - - - - - - - - - - - - - - - -
BigTIFF Tag Structure

Offset

Datatype

Value

0

UInt16

Tag identifying code

2

UInt16

Datatype of tag data

4

UInt64

Number of values

12

-
x * tag data datatype
-
or UInt64 offset
-
-
-
Tag data
-
or offset to tag data
-
-
-

The same rule for 'inlining' the tag data applies to both classic TIFF and BigTIFF, -only the threshold size differs. -In classic TIFF, the tag data was written inside the tag structure, in the IFD, -if its size was smaller than or equal to 4 bytes. Otherwise, it's written elsewhere, -and pointed to. -In BigTIFF, the tag data is written inside the tag structure, in the IFD, -if its size is smaller than or equal to 8 bytes.

-
-
-
-

Other miscellaneous details

-

Amongst the suggested file extensions are 'tif', 'tf8' and 'btf'.

-

Three datatypes are added to classic TIFF:

-
    -
  • TIFF_LONG8 = 16, being unsigned 8-byte (64-bit) integer

  • -
  • TIFF_SLONG8 = 17, being signed 8-byte (64-bit) integer

  • -
  • TIFF_IFD8 = 18, being a new unsigned 8-byte (64-bit) IFD offset.

  • -
-

The StripOffsets, StripByteCounts, TileOffsets, and TileByteCounts tags are allowed -to have the datatype TIFF_LONG8 in BigTIFF. Old datatypes TIFF_LONG, and TIFF_SHORT -where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too.

-

Likewise, tags that point to other IFDs, like e.g. the SubIFDs tag, are now allowed -to have the datatype TIFF_IFD8 in BigTIFF. Again, the old datatypes TIFF_IFD, -and the hardly recommendable TIFF_LONG, are still valid, too.

-
-
-

Samples

-

BigTIFF sample file BigTIFFSamples.zip contains a series of 8 different BigTIFF files. -Especially note the BigTIFFSamples.html file in this zip, documenting their characteristics.

-

That sample file from Joris Van Damme can still be found at the Wayback Machine: -BigTIFF Example files

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/specification/coverage-bigtiff.html b/third_party/libtiff/doc/html-prebuilt/specification/coverage-bigtiff.html deleted file mode 100644 index ebe000f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/specification/coverage-bigtiff.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - LibTIFF Coverage of the BigTIFF Specification — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

LibTIFF Coverage of the BigTIFF Specification

-

Since LibTIFF version 4.0.0, the BigTIFF format specification has been implemented within LibTIFF. -BigTIFF is a backward-compatible extension to the TIFF file format.

-

BigTIFF logically extends the original TIFF file format (referred to as 'ClassicTIFF' from now on). -The BigTIFF specification is the result of work by a variety of parties on the LibTIFF mailing list, including -the then current LibTIFF maintainers, Joris Van Damme and Adobe staff. The BigTIFF specification has not yet -been officially approved by the TIFF specification owner (Adobe), but implementation within LibTIFF -could accelerate that process. For more information on the BigTIFF file format, for example see BigTIFF Design. -Another overview and some further links can be found at -https://www.loc.gov/preservation/digital/formats/fdd/fdd000328.shtml.

-

BigTIFF is especially useful for people and vendors that are confronted with very large images, and -still seek to use an open, simple, and extendable format. This requirement is frequently encountered in the -geospatial field, but also concerns large format scanners, medical imaging and other fields.

-

The LibTiff BigTIFF support was made possible by four sponsors funding the project. The programming work was -primarily done by Joris Van Damme (AWare Systems) from 2004 to 2008.

-

The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order:

- - ---- - - - - - - - - - - - - - - -
Sponsors
ESRI -

ESRI has been giving customers around the world the power to -think and plan geographically since 1969. As the leader in GIS, ESRI applies innovative technologies to help -organizations create, analyze, and visualize information for more informed decisions. Running on more than -a million desktops and thousands of servers, ESRI applications are the foundation of the world's mapping and -spatial analysis infrastructure.

Leica Geosystems Geospatial Imaging -

'Leica Geosystems Geospatial Imaging' offers a -range of workflow solutions for photogrammetry, mapping, remote sensing, catalog management and exploitation -of geospatial imagery. Enterprise organizations use this imagery as the basis for generating information for -both education and decision making processes. Those who use Leica Geosystems products every day trust them -for their precision, seamless integration, interoperability and superior customer support.

Safe Software -

Safe Software is the maker of FME, a powerful spatial ETL (Extract, -Transform and Load) tool that enables true data interoperability. FME manages the translation, -transformation, integration and web-based distribution of geospatial data in 200 GIS, CAD, raster and -database formats. Safe Software's FME technology is also embedded in numerous market-leading GIS and -ETL applications.

WeoGeo -

'WeoGeo' is a web-based data management resource for the geospatial -industry that allows the free market exchange of mapping related imagery products, featuring an innovative -solution that efficiently manages digital mapping files of any size. With an intuitive user interface -and the scalable power of Amazon Web Services (AWS), geospatial professionals can view, sort, search, -and share complex, high volume maps quickly and effectively.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/specification/coverage.html b/third_party/libtiff/doc/html-prebuilt/specification/coverage.html deleted file mode 100644 index 6478c33..0000000 --- a/third_party/libtiff/doc/html-prebuilt/specification/coverage.html +++ /dev/null @@ -1,1825 +0,0 @@ - - - - - - - - LibTIFF Coverage of the TIFF 6.0 Specification — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

LibTIFF Coverage of the TIFF 6.0 Specification

-

The library is capable of dealing with images that are written to -follow the 5.0 or 6.0 TIFF spec. There is also considerable support -for some of the more esoteric portions of the 6.0 TIFF spec.

-
-

Baseline

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core requirements

Core requirements

Both MM and II byte orders are handled. -Both packed and separated planar configuration of samples. -Any number of samples per pixel (memory permitting). -Any image width and height (memory permitting). -Multiple subfiles can be read and written. -Editing is not supported in that related subfiles (e.g. -a reduced resolution version of an image) are not automatically -updated.

-

Tags handled: ExtraSamples, ImageWidth, -ImageLength, NewSubfileType, ResolutionUnit. -Rowsperstrip, StripOffsets, StripByteCounts, -XResolution, YResolution

-

Tiled Images

TileWidth, TileLength, TileOffsets, -TileByteCounts

Image Colorimetry Information

WhitePoint, PrimaryChromaticities, TransferFunction, -ReferenceBlackWhite

Class B for bilevel images

SamplesPerPixel = 1

-

BitsPerSample = 1

-

Compression = 1 (none), 2 (CCITT 1D), or 32773 (PackBits)

-

PhotometricInterpretation = 0 (Min-is-White), 1 (Min-is-Black)

-

Class G for grayscale images

SamplesPerPixel = 1

-

BitsPerSample = 4, 8

-

Compression = 1 (none) 5 (LZW)

-

PhotometricInterpretation = 0 (Min-is-White), 1 (Min-is-Black)

-

Class P for palette color images

SamplesPerPixel = 1

-

BitsPerSample = 1-8

-

Compression = 1 (none) 5 (LZW)

-

PhotometricInterpretation = 3 (Palette RGB)

-

ColorMap

-

Class R for RGB full color images

SamplesPerPixel = 3

-

BitsPerSample = <8,8,8>

-

PlanarConfiguration = 1, 2

-

Compression = 1 (none) 5 (LZW)

-

PhotometricInterpretation = 2 (RGB)

-

Class F for facsimile

(Class B tags plus...)

-

Compression = 3 (CCITT Group 3), 4 (CCITT Group 4)

-

FillOrder = 1 (MSB), 2 (LSB)

-

Group3Options = 1 (2d encoding), 4 (zero fill), 5 (2d+fill)

-

ImageWidth = 1728, 2048, 2482

-

NewSubFileType = 2

-

ResolutionUnit = 2 (Inch), 3 (Centimeter)

-

PageNumber, -XResolution, -YResolution, -Software, -BadFaxLines, -CleanFaxData, -ConsecutiveBadFaxLines, -DateTime, -DocumentName, -ImageDescription, -Orientation

-

Class S for separated images

SamplesPerPixel = 4

-

PlanarConfiguration = 1, 2

-

Compression = 1 (none), 5 (LZW)

-

PhotometricInterpretation = 5 (Separated)

-

InkSet = 1 (CMYK)

-

DotRange, -InkNames, -DotRange, -TargetPrinter

-

Class Y for YCbCr images

SamplesPerPixel = 3

-

BitsPerSample = <8,8,8>

-

PlanarConfiguration = 1, 2

-

Compression = 1 (none), 5 (LZW), 7 (JPEG)

-

PhotometricInterpretation = 6 (YCbCr)

-

YCbCrCoefficients, -YCbCrSubsampling, -YCbCrPositioning

-

(colorimetry info from Appendix H; see above)

-

Class "JPEG" for JPEG images (per TTN2)

PhotometricInterpretation = 1 (grayscale), 2 (RGB), 5 (CMYK), 6 (YCbCr)

-

(Class Y tags if YCbCr)

-

(Class S tags if CMYK)

-

Compression = 7 (JPEG)

-
-

In addition, the library supports some optional compression algorithms -that are, in some cases, of dubious value.

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
Compression algorithms

Compression tag value

Compression algorithm

32766

NeXT 2-bit encoding

32809

ThunderScan 4-bit encoding

32909

Pixar companded 11-bit ZIP encoding

32946

PKZIP-style Deflate encoding (experimental)

34676

SGI 32-bit Log Luminance encoding (experimental)

34677

SGI 24-bit Log Luminance encoding (experimental)

-

Note that there is no support for the JPEG-related tags defined -in the 6.0 specification; the JPEG support is based on the post-6.0 -proposal given in TIFF Technical Note #2.

-
-

Note

-

For more information on the experimental Log Luminance encoding -consult the materials available at -http://www.anyhere.com/gward/pixformat/tiffluv.html.

-
-

The following table shows the tags that are recognized -and how they are used by the library. If no use is indicated, -then the library reads and writes the tag, but does not use it internally.

-

Apart of the TIFF 6.0 specification the meaning of tags can be found on various places -in the internet. For example: -https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml

-

libtiff supports also many private tags allocated for organizations that wish to -store additional information in a TIFF file. -Tags for TIFF/EP and for Digital Negative (DNG) Specification 1.1.0 -are included.

-

Note that some tags are meaningful only when a particular -compression scheme is being used; e.g. Group3Options -is only useful if Compression -is set to CCITT Group 3 encoding. -Tags of this sort are considered codec-specific -tags and the library does not recognize them except when the -Compression -tag has been previously set to the relevant compression scheme.

-
-
-

Tags Recognized by LibTIFF

- - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tags used by libtiff

Tag Name

Value

R/W<

Library's Use (Comments)

SubfileType

254

R/W

none (also known as NewSubfileType)

OldSubfileType

255

R/W

parsed but ignored (also known as SubFileType)

ImageWidth

256

R/W

lots

ImageLength

257

R/W

lots

BitsPerSample

258

R/W

lots

Compression

259

R/W

to select appropriate codec

PhotometricInterpretation

262

R/W

lots

Thresholding

263

R/W

(tag in tif.h wrongly written as "Threshholding")

CellWidth

264

R/W

CellLength

265

R/W

FillOrder

266

R/W

control bit order

DocumentName

269

R/W

ImageDescription

270

R/W

Make

271

R/W

Model

272

R/W

StripOffsets

273

R/W

data i/o

Orientation

274

R/W

SamplesPerPixel

277

R/W

lots

RowsPerStrip

278

R/W

data i/o

StripByteCounts

279

R/W

data i/o

MinSampleValue

280

R/W

MaxSampleValue

281

R/W

XResolution

282

R/W

YResolution

283

R/W

used by Group 3 2d encoder

PlanarConfiguration

284

R/W

data i/o

PageName

285

R/W

XPosition

286

R/W

YPosition

287

R/W

FreeOffsets

288

R/W

parsed but ignored

FreeByteCounts

289

R/W

parsed but ignored

GrayResponseUnit

290

R/W

parsed but ignored

GrayResponseCurve

291

R/W

parsed but ignored

ResolutionUnit

296

R/W

used by Group 3 2d encoder

PageNumber

297

R/W

ColorResponseUnit

300

R/W

parsed but ignored

TransferFunction

301

R/W

Software

305

R/W

DateTime

306

R/W

Artist

315

R/W

HostComputer

316

R/W

WhitePoint

318

R/W

PrimaryChromaticities

319

R/W

ColorMap

320

R/W

HalftoneHints

321

R/W

TileWidth

322

R/W

data i/o

TileLength

323

R/W

data i/o

TileOffsets

324

R/W

data i/o

TileByteCounts

325

R/W

data i/o

SubIFD

330

R/W

subimage descriptor support

InkSet

332

R/W

InkNames

333

R/W

NumberOfInks

334

R/W

DotRange

336

R/W

TargetPrinter

337

R/W

ExtraSamples

338

R/W

lots

SampleFormat

339

R/W

SMinSampleValue

340

R/W

SMaxSampleValue

341

R/W

ClipPath

343

R/W

XClipPathUnits

344

R/W

YClipPathUnits

345

R/W

YCbCrCoefficients

529

R/W

used by TIFFReadRGBAImage support

YCbCrSubsampling

530

R/W

tile / strip size calculations

YCbCrPositioning

531

R/W

ReferenceBlackWhite

532

R/W

XMLPacket

700

R/W

Matteing

32995

R

none (obsoleted by ExtraSamples tag)

DataType

32996

R

none (obsoleted by SampleFormat tag)

ImageDepth

32997

R/W

tile / strip size calculations

TileDepth

32998

R/W

tile / strip size calculations

ImageFullWidth

33300

R/W

ImageFullLength

33301

R/W

TextureFormat

33302

R/W

TextureWrapModes

33303

R/W

FieldOfViewCotangent

33304

R/W

MatrixWorldToScreen

33305

R/W

MatrixWorldToCamera

33306

R/W

Copyright

33432

R/W

RichTIFFIPTC

33723

R/W

(also known as TIFF/EP IPTC/NAA; -libtiff type is UNDEFINED or BYTE, -but often times incorrectly specified as LONG, -because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII)

Photoshop

34377

R/W

EXIFIFDOffset

34665

R/W

ICC Profile

34675

R/W

GPSIFDOffset

34853

R/W

FaxRecvParams

34908

R/W

FaxSubAddress

34909

R/W

FaxRecvTime

34910

R/W

FaxDcs

34911

R/W

StoNits

37439

R/W

Adobe Photoshop Document Data Block

37724

R/W

InteroperabilityIFDOffset

40965

R/W

DNGVersion

50706

R/W

DNG 1.0 tags

DNGBackwardVersion

50707

R/W

UniqueCameraModel

50708

R/W

LocalizedCameraModel

50709

R/W

CFAPlaneColor

50710

R/W

CFALayout

50711

R/W

LinearizationTable

50712

R/W

BlackLevelRepeatDim

50713

R/W

BlackLevel

50714

R/W

BlackLevelDeltaH

50715

R/W

BlackLevelDeltaV

50716

R/W

WhiteLevel

50717

R/W

DefaultScale

50718

R/W

DefaultCropOrigin

50719

R/W

DefaultCropSize

50720

R/W

ColorMatrix1

50721

R/W

ColorMatrix2

50722

R/W

CameraCalibration1

50723

R/W

CameraCalibration2

50724

R/W

ReductionMatrix1

50725

R/W

ReductionMatrix2

50726

R/W

AnalogBalance

50727

R/W

AsShotNeutral

50728

R/W

AsShotWhiteXY

50729

R/W

BaselineExposure

50730

R/W

BaselineNoise

50731

R/W

BaselineSharpness

50732

R/W

BayerGreenSplit

50733

R/W

LinearResponseLimit

50734

R/W

CameraSerialNumber

50735

R/W

LensInfo

50736

R/W

ChromaBlurRadius

50737

R/W

AntiAliasStrength

50738

R/W

ShadowScale

50739

R/W

DNGPrivateData

50740

R/W

MakerNoteSafety

50741

R/W

CalibrationIlluminant1

50778

R/W

CalibrationIlluminant2

50779

R/W

BestQualityScale

50780

R/W

RawDataUniqueID

50781

R/W

OriginalRawFileName

50827

R/W

OriginalRawFileData

50828

R/W

ActiveArea

50829

R/W

MaskedAreas

50830

R/W

AsShotICCProfile

50831

R/W

AsShotPreProfileMatrix

50832

R/W

CurrentICCProfile

50833

R/W

CurrentPreProfileMatrix

50834

R/W

PerSample

65563

R/W

(only internal pseudo tag)

Indexed

346

R/W

TIFF/FX tags

GlobalParametersIFD

400

R/W

ProfileType

401

R/W

FaxProfile

402

R/W

CodingMethods

403

R/W

VersionYear

404

R/W

ModeNumber

405

R/W

Decode

433

R/W

ImageBaseColor

434

R/W

T82Options

435

R/W

StripRowCounts

559

R/W

part of RFC 2301 for fax

ImageLayer

34732

R/W

-

The Matteing and DataType -tags have been obsoleted by the 6.0 -ExtraSamples and SampleFormat tags. -Consult the documentation on the -ExtraSamples tag and Associated Alpha for elaboration. Note however -that if you use Associated Alpha, you are expected to save data that is -pre-multipled by Alpha. If this means nothing to you, check out -Porter & Duff's paper in the '84 SIGGRAPH proceedings: "Compositing Digital -Images".

-

Tag RichTIFFIPTC (33723) is defined wrongly in TIFF/EP definition as "LONG or ASCII". -libtiff defines it as "UNDEFINED or BYTE".

-

The ImageDepth -tag is a non-standard, but registered tag that specifies -the Z-dimension of volumetric data. The combination of ImageWidth, -ImageLength, and ImageDepth, -defines a 3D volume of pixels that are -further specified by BitsPerSample and -SamplesPerPixel. The TileDepth -tag (also non-standard, but registered) can be used to specified a -subvolume "tiling" of a volume of data.

-

The Colorimetry, and CMYK tags are additions that appear in TIFF 6.0. -Consult the TIFF 6.0 specification and TIFF File Format Specification.

-
-
-

Codecs / Compression

-

The following tags are used by codecs.

- - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Codec / Compression Tags used by libtiff

Tag Name

Value

R/W<

Library's Use (Comments)

Predictor

317

R/W

LZW codec

JPEGTables

347

R/W

JPEG

JpegInterchangeFormat

513

R/W

OJPEG

JpegInterchangeFormatLength

514

R/W

OJPEG

JpegQTables

519

R/W

OJPEG

JpegDcTables

520

R/W

OJPEG

JpegAcTables

521

R/W

OJPEG

JpegProc

512

R/W

OJPEG

JpegRestartInterval

515

R/W

OJPEG

BadFaxLines

326

R/W

CCITT / fax

CleanFaxData

327

R/W

CCITT / fax

ConsecutiveBadFaxLines

328

R/W

CCITT / fax

Group3Options

292

R/W

CCITT / fax

Group4Options

293

R/W

CCITT / fax

LercParameters

50674

R/W

LERC

-

Note: This codec-specific -tags and the library does not recognize them except when the -Compression -tag has been previously set to the relevant compression scheme.

-

The JPEG-related tag is specified in -DRAFT TIFF Technical Note #2, which defines -a revised JPEG-in-TIFF scheme (revised over the appendix that was -part of the TIFF 6.0 specification).

-
-
-

EXIF / GPS Custom IFDs

-

In addition to the standard TIFF tags, libtiff has predefined IFDs -(image file directories) with the tags for EXIF (version 2.32) and EXIF-GPS -as custom directories. -For reading / writing of this IFDs refer to TIFFCustomDirectory.

-
-

EXIF Custom Tags

- - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXIF 2.32 Tags used by libtiff

Tag Name

Value

R/W<

Library's Use (Comments)

ExposureTime

33434

R/W

FNumber

33437

R/W

ExposureProgram

34850

R/W

SpectralSensitivity

34852

R/W

ISOSpeedRatings

34855

R/W

After EXIF 2.2.1 ISOSpeedRatings is named PhotographicSensitivity. -In addition, while "Count=Any", only 1 count should be used.

OptoelectricConversionFactor

34856

R/W

SensitivityType

34864

R/W

StandardOutputSensitivity

34865

R/W

RecommendedExposureIndex

34866

R/W

ISOSpeed

34867

R/W

ISOSpeedLatitudeyyy

34868

R/W

ISOSpeedLatitudezzz

34869

R/W

ExifVersion

36864

R/W

DateTimeOriginal

36867

R/W

DateTimeDigitized

36868

R/W

OffsetTime

36880

R/W

OffsetTimeOriginal

36881

R/W

OffsetTimeDigitized

36882

R/W

ComponentsConfiguration

37121

R/W

CompressedBitsPerPixel

37122

R/W

ShutterSpeedValue

37377

R/W

ApertureValue

37378

R/W

BrightnessValue

37379

R/W

ExposureBiasValue

37380

R/W

MaxApertureValue

37381

R/W

SubjectDistance

37382

R/W

MeteringMode

37383

R/W

LightSource

37384

R/W

Flash

37385

R/W

FocalLength

37386

R/W

SubjectArea

37396

R/W

MakerNote

37500

R/W

UserComment

37510

R/W

SubSecTime

37520

R/W

SubSecTimeOriginal

37521

R/W

SubSecTimeDigitized

37522

R/W

Temperature

37888

R/W

Humidity

37889

R/W

Pressure

37890

R/W

WaterDepth

37891

R/W

Acceleration

37892

R/W

CameraElevationAngle

37893

R/W

FlashpixVersion

40960

R/W

ColorSpace

40961

R/W

PixelXDimension

40962

R/W

PixelYDimension

40963

R/W

RelatedSoundFile

40964

R/W

FlashEnergy

41483

R/W

SpatialFrequencyResponse

41484

R/W

FocalPlaneXResolution

41486

R/W

FocalPlaneYResolution

41487

R/W

FocalPlaneResolutionUnit

41488

R/W

SubjectLocation

41492

R/W

ExposureIndex

41493

R/W

SensingMethod

41495

R/W

FileSource

41728

R/W

SceneType

41729

R/W

CFAPattern

41730

R/W

CustomRendered

41985

R/W

ExposureMode

41986

R/W

WhiteBalance

41987

R/W

DigitalZoomRatio

41988

R/W

FocalLengthIn35mmFilm

41989

R/W

SceneCaptureType

41990

R/W

GainControl

41991

R/W

Contrast

41992

R/W

Saturation

41993

R/W

Sharpness

41994

R/W

DeviceSettingDescription

41995

R/W

SubjectDistanceRange

41996

R/W

ImageUniqueID

42016

R/W

CameraOwnerName

42032

R/W

BodySerialNumber

42033

R/W

LensSpecification

42034

R/W

LensMake

42035

R/W

LensModel

42036

R/W

LensSerialNumber

42037

R/W

Gamma

42240

R/W

CompositeImage

42080

R/W

SourceImageNumberOfCompositeImage

42081

R/W

SourceExposureTimesOfCompositeImage

42082

R/W

-
-
-

GPS Custom Tags

- - ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GPS 2.32 Tags used by libtiff

Tag Name

Value

R/W<

Library's Use (Comments)

VersionID

0

R/W

LatitudeRef

1

R/W

Latitude

2

R/W

LongitudeRef

3

R/W

Longitude

4

R/W

AltitudeRef

5

R/W

Altitude

6

R/W

TimeStamp

7

R/W

Satellites

8

R/W

Status

9

R/W

MeasureMode

10

R/W

DOP

11

R/W

SpeedRef

12

R/W

Speed

13

R/W

TrackRef

14

R/W

Track

15

R/W

ImgDirectionRef

16

R/W

ImgDirection

17

R/W

MapDatum

18

R/W

DestLatitudeRef

19

R/W

DestLatitude

20

R/W

DestLongitudeRef

21

R/W

DestLongitude

22

R/W

DestBearingRef

23

R/W

DestBearing

24

R/W

DestDistanceRef

25

R/W

DestDistance

26

R/W

ProcessingMethod

27

R/W

AreaInformation

28

R/W

DateStamp

29

R/W

Differential

30

R/W

HorizontalPositioningError

31

R/W

-
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/specification/index.html b/third_party/libtiff/doc/html-prebuilt/specification/index.html deleted file mode 100644 index da75bb5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/specification/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - TIFF File Format Specification — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFF File Format Specification

-jim - -

Draft DRAFT TIFF Technical Note #2 covers problems -with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and -describes an alternative.

-

The LibTIFF coverage of the TIFF 6.0 specification is detailed in LibTIFF Coverage of the TIFF 6.0 Specification.

-

A design for a TIFF variation supporting files larger than 4GB is detailed in BigTIFF Design.

- -
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/specification/technote2.html b/third_party/libtiff/doc/html-prebuilt/specification/technote2.html deleted file mode 100644 index cf7b203..0000000 --- a/third_party/libtiff/doc/html-prebuilt/specification/technote2.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - - - - - DRAFT TIFF Technical Note #2 — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

DRAFT TIFF Technical Note #2

-

17-Mar-95

-

This Technical Note describes serious problems that have been found in -TIFF 6.0's design for embedding JPEG-compressed data in TIFF (Section 22 -of the TIFF 6.0 spec of 3 June 1992). A replacement TIFF/JPEG -specification is given. Some corrections to Section 21 are also given.

-

To permit TIFF implementations to continue to read existing files, the 6.0 -JPEG fields and tag values will remain reserved indefinitely. However, -TIFF writers are strongly discouraged from using the 6.0 JPEG design. It -is expected that the next full release of the TIFF specification will not -describe the old design at all, except to note that certain tag numbers -are reserved. The existing Section 22 will be replaced by the -specification text given in the second part of this Tech Note.

-
-

Problems in TIFF 6.0 JPEG

-

Abandoning a published spec is not a step to be taken lightly. This -section summarizes the reasons that have forced this decision. -TIFF 6.0's JPEG design suffers from design errors and limitations, -ambiguities, and unnecessary complexity.

-
-

Design errors and limitations

-

The fundamental design error in the existing Section 22 is that JPEG's -various tables and parameters are broken out as separate fields which the -TIFF control logic must manage. This is bad software engineering: that -information should be treated as private to the JPEG codec -(compressor/decompressor). Worse, the fields themselves are specified -without sufficient thought for future extension and without regard to -well-established TIFF conventions. Here are some of the significant -problems:

-
    -
  • The JPEGxxTable fields do not store the table data directly in the -IFD/field structure; rather, the fields hold pointers to information -elsewhere in the file. This requires special-purpose code to be added to -every TIFF-manipulating application, whether it needs to decode JPEG -image data or not. Even a trivial TIFF editor, for example a program to -add an ImageDescription field to a TIFF file, must be explicitly aware of -the internal structure of the JPEG-related tables, or else it will probably -break the file. Every other auxiliary field in the TIFF spec contains -data, not pointers, and can be copied or relocated by standard code that -doesn't know anything about the particular field. This is a crucial -property of the TIFF format that must not be given up.

  • -
  • To manipulate these fields, the TIFF control logic is required to know a -great deal about JPEG details, for example such arcana as how to compute -the length of a Huffman code table --- the length is not supplied in the -field structure and can only be found by inspecting the table contents. -This is again a violation of good software practice. Moreover, it will -prevent easy adoption of future JPEG extensions that might change these -low-level details.

  • -
  • The design neglects the fact that baseline JPEG codecs support only two -sets of Huffman tables: it specifies a separate table for each color -component. This implies that encoders must waste space (by storing -duplicate Huffman tables) or else violate the well-founded TIFF convention -that prohibits duplicate pointers. Furthermore, baseline decoders must -test to find out which tables are identical, a waste of time and code -space.

  • -
  • The JPEGInterchangeFormat field also violates TIFF's proscription against -duplicate pointers: the normal strip/tile pointers are expected to point -into the larger data area pointed to by JPEGInterchangeFormat. All TIFF -editing applications must be specifically aware of this relationship, since -they must maintain it or else delete the JPEGInterchangeFormat field. The -JPEGxxTables fields are also likely to point into the JPEGInterchangeFormat -area, creating additional pointer relationships that must be maintained.

  • -
  • The JPEGQTables field is fixed at a byte per table entry; there is no -way to support 16-bit quantization values. This is a serious impediment -to extending TIFF to use 12-bit JPEG.

  • -
  • The 6.0 design cannot support using different quantization tables in -different strips/tiles of an image (so as to encode some areas at higher -quality than others). Furthermore, since quantization tables are tied -one-for-one to color components, the design cannot support table switching -options that are likely to be added in future JPEG revisions.

  • -
-
-
-

Ambiguities

-

Several incompatible interpretations are possible for 6.0's treatment of -JPEG restart markers:

-
    -
  • It is unclear whether restart markers must be omitted at TIFF segment -(strip/tile) boundaries, or whether they are optional.

  • -
  • It is unclear whether the segment size is required to be chosen as -a multiple of the specified restart interval (if any); perhaps the -JPEG codec is supposed to be reset at each segment boundary as if -there were a restart marker there, even if the boundary does not fall -at a multiple of the nominal restart interval.

  • -
  • The spec fails to address the question of restart marker numbering: -do the numbers begin again within each segment, or not?

  • -
-

That last point is particularly nasty. If we make numbering begin again -within each segment, we give up the ability to impose a TIFF strip/tile -structure on an existing JPEG datastream with restarts (which was clearly a -goal of Section 22's authors). But the other choice interferes with random -access to the image segments: a reader must compute the first restart -number to be expected within a segment, and must have a way to reset its -JPEG decoder to expect a nonzero restart number first. This may not even -be possible with some JPEG chips.

-

The tile height restriction found on page 104 contradicts Section 15's -general description of tiles. For an image that is not vertically -downsampled, page 104 specifies a tile height of one MCU or 8 pixels; but -Section 15 requires tiles to be a multiple of 16 pixels high.

-

This Tech Note does not attempt to resolve these ambiguities, so -implementations that follow the 6.0 design should be aware that -inter-application compatibility problems are likely to arise.

-
-
-

Unnecessary complexity

-

The 6.0 design creates problems for implementations that need to keep the -JPEG codec separate from the TIFF control logic --- for example, consider -using a JPEG chip that was not designed specifically for TIFF. JPEG codecs -generally want to produce or consume a standard ISO JPEG datastream, not -just raw compressed data. (If they were to handle raw data, a separate -out-of-band mechanism would be needed to load tables into the codec.) -With such a codec, the TIFF control logic must parse JPEG markers emitted -by the codec to create the TIFF table fields (when writing) or synthesize -JPEG markers from the TIFF fields to feed the codec (when reading). This -means that the control logic must know a great deal more about JPEG details -than we would like. The parsing and reconstruction of the markers also -represents a fair amount of unnecessary work.

-

Quite a few implementers have proposed writing "TIFF/JPEG" files in which -a standard JPEG datastream is simply dumped into the file and pointed to -by JPEGInterchangeFormat. To avoid parsing the JPEG datastream, they -suggest not writing the JPEG auxiliary fields (JPEGxxTables etc) nor even -the basic TIFF strip/tile data pointers. This approach is incompatible -with implementations that handle the full TIFF 6.0 JPEG design, since they -will expect to find strip/tile pointers and auxiliary fields. Indeed this -is arguably not TIFF at all, since all TIFF-reading applications expect -to find strip or tile pointers. A subset implementation that is not -upward-compatible with the full spec is clearly unacceptable. However, -the frequency with which this idea has come up makes it clear that -implementers find the existing Section 22 too complex.

-
-
-
-

Overview of the solution

-

To solve these problems, we adopt a new design for embedding -JPEG-compressed data in TIFF files. The new design uses only complete, -uninterpreted ISO JPEG datastreams, so it should be much more forgiving of -extensions to the ISO standard. It should also be far easier to implement -using unmodified JPEG codecs.

-

To reduce overhead in multi-segment TIFF files, we allow JPEG overhead -tables to be stored just once in a JPEGTables auxiliary field. This -feature does not violate the integrity of the JPEG datastreams, because it -uses the notions of "tables-only datastreams" and "abbreviated image -datastreams" as defined by the ISO standard.

-

To prevent confusion with the old design, the new design is given a new -Compression tag value, Compression=7. Readers that need to handle -existing 6.0 JPEG files may read both old and new files, using whatever -interpretation of the 6.0 spec they did before. Compression tag value 6 -and the field tag numbers defined by 6.0 section 22 will remain reserved -indefinitely, even though detailed descriptions of them will be dropped -from future editions of the TIFF specification.

-
-
-

Replacement TIFF/JPEG specification

-

[This section of the Tech Note is expected to replace Section 22 in the -next release of the TIFF specification.]

-

This section describes TIFF compression scheme 7, a high-performance -compression method for continuous-tone images.

-
-

Introduction

-

This TIFF compression method uses the international standard for image -compression ISO/IEC 10918-1, usually known as "JPEG" (after the original -name of the standards committee, Joint Photographic Experts Group). JPEG -is a joint ISO/CCITT standard for compression of continuous-tone images.

-

The JPEG committee decided that because of the broad scope of the standard, -no one algorithmic procedure was able to satisfy the requirements of all -applications. Instead, the JPEG standard became a "toolkit" of multiple -algorithms and optional capabilities. Individual applications may select -a subset of the JPEG standard that meets their requirements.

-

The most important distinction among the JPEG processes is between lossy -and lossless compression. Lossy compression methods provide high -compression but allow only approximate reconstruction of the original -image. JPEG's lossy processes allow the encoder to trade off compressed -file size against reconstruction fidelity over a wide range. Typically, -10:1 or more compression of full-color data can be obtained while keeping -the reconstructed image visually indistinguishable from the original. Much -higher compression ratios are possible if a low-quality reconstructed image -is acceptable. Lossless compression provides exact reconstruction of the -source data, but the achievable compression ratio is much lower than for -the lossy processes; JPEG's rather simple lossless process typically -achieves around 2:1 compression of full-color data.

-

The most widely implemented JPEG subset is the "baseline" JPEG process. -This provides lossy compression of 8-bit-per-channel data. Optional -extensions include 12-bit-per-channel data, arithmetic entropy coding for -better compression, and progressive/hierarchical representations. The -lossless process is an independent algorithm that has little in -common with the lossy processes.

-

It should be noted that the optional arithmetic-coding extension is subject -to several US and Japanese patents. To avoid patent problems, use of -arithmetic coding processes in TIFF files intended for inter-application -interchange is discouraged.

-

All of the JPEG processes are useful only for "continuous tone" data, -in which the difference between adjacent pixel values is usually small. -Low-bit-depth source data is not appropriate for JPEG compression, nor -are palette-color images good candidates. The JPEG processes work well -on grayscale and full-color data.

-

Describing the JPEG compression algorithms in sufficient detail to permit -implementation would require more space than we have here. Instead, we -refer the reader to the References section.

-
-
-

What data is being compressed?

-

In lossy JPEG compression, it is customary to convert color source data -to YCbCr and then downsample it before JPEG compression. This gives -2:1 data compression with hardly any visible image degradation, and it -permits additional space savings within the JPEG compression step proper. -However, these steps are not considered part of the ISO JPEG standard. -The ISO standard is "color blind": it accepts data in any color space.

-

For TIFF purposes, the JPEG compression tag is considered to represent the -ISO JPEG compression standard only. The ISO standard is applied to the -same data that would be stored in the TIFF file if no compression were -used. Therefore, if color conversion or downsampling are used, they must -be reflected in the regular TIFF fields; these steps are not considered to -be implicit in the JPEG compression tag value. PhotometricInterpretation -and related fields shall describe the color space actually stored in the -file. With the TIFF 6.0 field definitions, downsampling is permissible -only for YCbCr data, and it must correspond to the YCbCrSubSampling field. -(Note that the default value for this field is not 1,1; so the default for -YCbCr is to apply downsampling!) It is likely that future versions of TIFF -will provide additional PhotometricInterpretation values and a more general -way of defining subsampling, so as to allow more flexibility in -JPEG-compressed files. But that issue is not addressed in this Tech Note.

-

Implementers should note that many popular JPEG codecs -(compressor/decompressors) provide automatic color conversion and -downsampling, so that the application may supply full-size RGB data which -is nonetheless converted to downsampled YCbCr. This is an implementation -convenience which does not excuse the TIFF control layer from its -responsibility to know what is really going on. The -PhotometricInterpretation and subsampling fields written to the file must -describe what is actually in the file.

-

A JPEG-compressed TIFF file will typically have PhotometricInterpretation = -YCbCr and YCbCrSubSampling = [2,1] or [2,2], unless the source data was -grayscale or CMYK.

-
-
-

Basic representation of JPEG-compressed images

-

JPEG compression works in either strip-based or tile-based TIFF files. -Rather than repeating "strip or tile" constantly, we will use the term -"segment" to mean either a strip or a tile.

-

When the Compression field has the value 7, each image segment contains -a complete JPEG datastream which is valid according to the ISO JPEG -standard (ISO/IEC 10918-1). Any sequential JPEG process can be used, -including lossless JPEG, but progressive and hierarchical processes are not -supported. Since JPEG is useful only for continuous-tone images, the -PhotometricInterpretation of the image shall not be 3 (palette color) nor -4 (transparency mask). The bit depth of the data is also restricted as -specified below.

-

Each image segment in a JPEG-compressed TIFF file shall contain a valid -JPEG datastream according to the ISO JPEG standard's rules for -interchange-format or abbreviated-image-format data. The datastream shall -contain a single JPEG frame storing that segment of the image. The -required JPEG markers within a segment are:

-
    -
  • SOI (must appear at very beginning of segment)

  • -
  • SOFn

  • -
  • SOS (one for each scan, if there is more than one scan)

  • -
  • EOI (must appear at very end of segment)

  • -
-

The actual compressed data follows SOS; it may contain RSTn markers if DRI -is used.

-

Additional JPEG "tables and miscellaneous" markers may appear between SOI -and SOFn, between SOFn and SOS, and before each subsequent SOS if there is -more than one scan. These markers include:

-
    -
  • DQT

  • -
  • DHT

  • -
  • DAC (not to appear unless arithmetic coding is used)

  • -
  • DRI

  • -
  • APPn (shall be ignored by TIFF readers)

  • -
  • COM (shall be ignored by TIFF readers)

  • -
-

DNL markers shall not be used in TIFF files. Readers should abort if any -other marker type is found, especially the JPEG reserved markers; -occurrence of such a marker is likely to indicate a JPEG extension.

-

The tables/miscellaneous markers may appear in any order. Readers are -cautioned that although the SOFn marker refers to DQT tables, JPEG does not -require those tables to precede the SOFn, only the SOS. Missing-table -checks should be made when SOS is reached.

-

If no JPEGTables field is used, then each image segment shall be a complete -JPEG interchange datastream. Each segment must define all the tables it -references. To allow readers to decode segments in any order, no segment -may rely on tables being carried over from a previous segment.

-

When a JPEGTables field is used, image segments may omit tables that have -been specified in the JPEGTables field. Further details appear below.

-

The SOFn marker shall be of type SOF0 for strict baseline JPEG data, of -type SOF1 for non-baseline lossy JPEG data, or of type SOF3 for lossless -JPEG data. (SOF9 or SOF11 would be used for arithmetic coding.) All -segments of a JPEG-compressed TIFF image shall use the same JPEG -compression process, in particular the same SOFn type.

-

The data precision field of the SOFn marker shall agree with the TIFF -BitsPerSample field. (Note that when PlanarConfiguration=1, this implies -that all components must have the same BitsPerSample value; when -PlanarConfiguration=2, different components could have different bit -depths.) For SOF0 only precision 8 is permitted; for SOF1, precision 8 or -12 is permitted; for SOF3, precisions 2 to 16 are permitted.

-

The image dimensions given in the SOFn marker shall agree with the logical -dimensions of that particular strip or tile. For strip images, the SOFn -image width shall equal ImageWidth and the height shall equal RowsPerStrip, -except in the last strip; its SOFn height shall equal the number of rows -remaining in the ImageLength. (In other words, no padding data is counted -in the SOFn dimensions.) For tile images, each SOFn shall have width -TileWidth and height TileHeight; adding and removing any padding needed in -the edge tiles is the concern of some higher level of the TIFF software. -(The dimensional rules are slightly different when PlanarConfiguration=2, -as described below.)

-

The ISO JPEG standard only permits images up to 65535 pixels in width or -height, due to 2-byte fields in the SOFn markers. In TIFF, this limits -the size of an individual JPEG-compressed strip or tile, but the total -image size can be greater.

-

The number of components in the JPEG datastream shall equal SamplesPerPixel -for PlanarConfiguration=1, and shall be 1 for PlanarConfiguration=2. The -components shall be stored in the same order as they are described at the -TIFF field level. (This applies both to their order in the SOFn marker, -and to the order in which they are scanned if multiple JPEG scans are -used.) The component ID bytes are arbitrary so long as each component -within an image segment is given a distinct ID. To avoid any possible -confusion, we require that all segments of a TIFF image use the same ID -code for a given component.

-

In PlanarConfiguration 1, the sampling factors given in SOFn markers shall -agree with the sampling factors defined by the related TIFF fields (or with -the default values that are specified in the absence of those fields).

-

When DCT-based JPEG is used in a strip TIFF file, RowsPerStrip is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., a -multiple of the height of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) For example, if YCbCrSubSampling = [2,2] then RowsPerStrip -must be a multiple of 16. An exception to this rule is made for -single-strip images (RowsPerStrip >= ImageLength): the exact value of -RowsPerStrip is unimportant in that case. This rule ensures that no data -padding is needed at the bottom of a strip, except perhaps the last strip. -Any padding required at the right edge of the image, or at the bottom of -the last strip, is expected to occur internally to the JPEG codec.

-

When DCT-based JPEG is used in a tiled TIFF file, TileLength is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., -a multiple of the height of an interleaved MCU; and TileWidth is required -to be a multiple of 8 times the largest horizontal sampling factor, i.e., -a multiple of the width of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) All edge padding required will therefore occur in the course -of normal TIFF tile padding; it is not special to JPEG.

-

Lossless JPEG does not impose these constraints on strip and tile sizes, -since it is not DCT-based.

-

Note that within JPEG datastreams, multibyte values appear in the MSB-first -order specified by the JPEG standard, regardless of the byte ordering of -the surrounding TIFF file.

-
-
-

JPEGTables field

-

The only auxiliary TIFF field added for Compression=7 is the optional -JPEGTables field. The purpose of JPEGTables is to predefine JPEG -quantization and/or Huffman tables for subsequent use by JPEG image -segments. When this is done, these rather bulky tables need not be -duplicated in each segment, thus saving space and processing time. -JPEGTables may be used even in a single-segment file, although there is no -space savings in that case.

-

JPEGTables:

-
-
    -
  • Tag = 347 (15B.H)

  • -
  • Type = UNDEFINED

  • -
  • N = number of bytes in tables datastream, typically a few hundred

  • -
-
-

JPEGTables provides default JPEG quantization and/or Huffman tables which -are used whenever a segment datastream does not contain its own tables, as -specified below.

-

Notice that the JPEGTables field is required to have type code UNDEFINED, -not type code BYTE. This is to cue readers that expanding individual bytes -to short or long integers is not appropriate. A TIFF reader will generally -need to store the field value as an uninterpreted byte sequence until it is -fed to the JPEG decoder.

-

Multibyte quantities within the tables follow the ISO JPEG convention of -MSB-first storage, regardless of the byte ordering of the surrounding TIFF -file.

-

When the JPEGTables field is present, it shall contain a valid JPEG -"abbreviated table specification" datastream. This datastream shall begin -with SOI and end with EOI. It may contain zero or more JPEG "tables and -miscellaneous" markers, namely:

-
    -
  • DQT

  • -
  • DHT

  • -
  • DAC (not to appear unless arithmetic coding is used)

  • -
  • DRI

  • -
  • APPn* (shall be ignored by TIFF readers)

  • -
  • COM (shall be ignored by TIFF readers)

  • -
-

Since JPEG defines the SOI marker to reset the DAC and DRI state, these two -markers' values cannot be carried over into any image datastream, and thus -they are effectively no-ops in the JPEGTables field. To avoid confusion, -it is recommended that writers not place DAC or DRI markers in JPEGTables. -However readers must properly skip over them if they appear.

-

When JPEGTables is present, readers shall load the table specifications -contained in JPEGTables before processing image segment datastreams. -Image segments may simply refer to these preloaded tables without defining -them. An image segment can still define and use its own tables, subject to -the restrictions below.

-

An image segment may not redefine any table defined in JPEGTables. (This -restriction is imposed to allow readers to process image segments in random -order without having to reload JPEGTables between segments.) Therefore, use -of JPEGTables divides the available table slots into two groups: "global" -slots are defined in JPEGTables and may be used but not redefined by -segments; "local" slots are available for local definition and use in each -segment. To permit random access, a segment may not reference any local -tables that it does not itself define.

-
-
-

Special considerations for PlanarConfiguration 2

-

In PlanarConfiguration 2, each image segment contains data for only one -color component. To avoid confusing the JPEG codec, we wish the segments -to look like valid single-channel (i.e., grayscale) JPEG datastreams. This -means that different rules must be used for the SOFn parameters.

-

In PlanarConfiguration 2, the dimensions given in the SOFn of a subsampled -component shall be scaled down by the sampling factors compared to the SOFn -dimensions that would be used in PlanarConfiguration 1. This is necessary -to match the actual number of samples stored in that segment, so that the -JPEG codec doesn't complain about too much or too little data. In strip -TIFF files the computed dimensions may need to be rounded up to the next -integer; in tiled files, the restrictions on tile size make this case -impossible.

-

Furthermore, all SOFn sampling factors shall be given as 1. (This is -merely to avoid confusion, since the sampling factors in a single-channel -JPEG datastream have no real effect.)

-

Any downsampling will need to happen externally to the JPEG codec, since -JPEG sampling factors are defined with reference to the full-precision -component. In PlanarConfiguration 2, the JPEG codec will be working on -only one component at a time and thus will have no reference component to -downsample against.

-
-
-

Minimum requirements for TIFF/JPEG

-

ISO JPEG is a large and complex standard; most implementations support only -a subset of it. Here we define a "core" subset of TIFF/JPEG which readers -must support to claim TIFF/JPEG compatibility. For maximum -cross-application compatibility, we recommend that writers confine -themselves to this subset unless there is very good reason to do otherwise.

-

Use the ISO baseline JPEG process: 8-bit data precision, Huffman coding, -with no more than 2 DC and 2 AC Huffman tables. Note that this implies -BitsPerSample = 8 for each component. We recommend deviating from baseline -JPEG only if 12-bit data precision or lossless coding is required.

-

Use no subsampling (all JPEG sampling factors = 1) for color spaces other -than YCbCr. (This is, in fact, required with the TIFF 6.0 field -definitions, but may not be so in future revisions.) For YCbCr, use one of -the following choices:

- - - - - - - - - - - - - - - - - -

YCbCrSubSampling field

JPEG sampling factors

1,1

1h1v, 1h1v, 1h1v

2,1

2h1v, 1h1v, 1h1v

2,2 (default value)

2h2v, 1h1v, 1h1v

-

We recommend that RGB source data be converted to YCbCr for best compression -results. Other source data colorspaces should probably be left alone. -Minimal readers need not support JPEG images with colorspaces other than -YCbCr and grayscale (PhotometricInterpretation = 6 or 1).

-

A minimal reader also need not support JPEG YCbCr images with nondefault -values of YCbCrCoefficients or YCbCrPositioning, nor with values of -ReferenceBlackWhite other than [0,255,128,255,128,255]. (These values -correspond to the RGB<=>YCbCr conversion specified by JFIF, which is widely -implemented in JPEG codecs.)

-

Writers are reminded that a ReferenceBlackWhite field must be included -when PhotometricInterpretation is YCbCr, because the default -ReferenceBlackWhite values are inappropriate for YCbCr.

-

If any subsampling is used, PlanarConfiguration=1 is preferred to avoid the -possibly-confusing requirements of PlanarConfiguration=2. In any case, -readers are not required to support PlanarConfiguration=2.

-

If possible, use a single interleaved scan in each image segment. This is -not legal JPEG if there are more than 4 SamplesPerPixel or if the sampling -factors are such that more than 10 blocks would be needed per MCU; in that -case, use a separate scan for each component. (The recommended color -spaces and sampling factors will not run into that restriction, so a -minimal reader need not support more than one scan per segment.)

-

To claim TIFF/JPEG compatibility, readers shall support multiple-strip TIFF -files and the optional JPEGTables field; it is not acceptable to read only -single-datastream files. Support for tiled TIFF files is strongly -recommended but not required.

-
-
-

Other recommendations for implementers

-

The TIFF tag Compression=7 guarantees only that the compressed data is -represented as ISO JPEG datastreams. Since JPEG is a large and evolving -standard, readers should apply careful error checking to the JPEG markers -to ensure that the compression process is within their capabilities. In -particular, to avoid being confused by future extensions to the JPEG -standard, it is important to abort if unknown marker codes are seen.

-

The point of requiring that all image segments use the same JPEG process is -to ensure that a reader need check only one segment to determine whether it -can handle the image. For example, consider a TIFF reader that has access -to fast but restricted JPEG hardware, as well as a slower, more general -software implementation. It is desirable to check only one image segment -to find out whether the fast hardware can be used. Thus, writers should -try to ensure that all segments of an image look as much "alike" as -possible: there should be no variation in scan layout, use of options such -as DRI, etc. Ideally, segments will be processed identically except -perhaps for using different local quantization or entropy-coding tables.

-

Writers should avoid including "noise" JPEG markers (COM and APPn markers). -Standard TIFF fields provide a better way to transport any non-image data. -Some JPEG codecs may change behavior if they see an APPn marker they -think they understand; since the TIFF spec requires these markers to be -ignored, this behavior is undesirable.

-

It is possible to convert an interchange-JPEG file (e.g., a JFIF file) to -TIFF simply by dropping the interchange datastream into a single strip. -(However, designers are reminded that the TIFF spec discourages huge -strips; splitting the image is somewhat more work but may give better -results.) Conversion from TIFF to interchange JPEG is more complex. A -strip-based TIFF/JPEG file can be converted fairly easily if all strips use -identical JPEG tables and no RSTn markers: just delete the overhead markers -and insert RSTn markers between strips. Converting tiled images is harder, -since the data will usually not be in the right order (unless the tiles are -only one MCU high). This can still be done losslessly, but it will require -undoing and redoing the entropy coding so that the DC coefficient -differences can be updated.

-

There is no default value for JPEGTables: standard TIFF files must define all -tables that they reference. For some closed systems in which many files will -have identical tables, it might make sense to define a default JPEGTables -value to avoid actually storing the tables. Or even better, invent a -private field selecting one of N default JPEGTables settings, so as to allow -for future expansion. Either of these must be regarded as a private -extension that will render the files unreadable by other applications.

-
-
-

References

-

[1] Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.

-

This is the best short technical introduction to the JPEG algorithms. -It is a good overview but does not provide sufficiently detailed -information to write an implementation.

-

[2] Pennebaker, William B. and Mitchell, Joan L. "JPEG Still Image Data -Compression Standard", Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. -638pp.

-

This textbook is by far the most complete exposition of JPEG in existence. -It includes the full text of the ISO JPEG standards (DIS 10918-1 and draft -DIS 10918-2). No would-be JPEG implementer should be without it.

-

[3] ISO/IEC IS 10918-1, "Digital Compression and Coding of Continuous-tone -Still Images, Part 1: Requirements and guidelines", February 1994. -ISO/IEC DIS 10918-2, "Digital Compression and Coding of Continuous-tone -Still Images, Part 2: Compliance testing", final approval expected 1994.

-

These are the official standards documents. Note that the Pennebaker and -Mitchell textbook is likely to be cheaper and more useful than the official -standards.

-
-
-
-

Changes to Section 21: YCbCr Images

-

[This section of the Tech Note clarifies section 21 to make clear the -interpretation of image dimensions in a subsampled image. Furthermore, -the section is changed to allow the original image dimensions not to be -multiples of the sampling factors. This change is necessary to support use -of JPEG compression on odd-size images.]

-

Add the following paragraphs to the Section 21 introduction (p. 89), -just after the paragraph beginning "When a Class Y image is subsampled":

-
-

In a subsampled image, it is understood that all TIFF image -dimensions are measured in terms of the highest-resolution -(luminance) component. In particular, ImageWidth, ImageLength, -RowsPerStrip, TileWidth, TileLength, XResolution, and YResolution -are measured in luminance samples.

-

RowsPerStrip, TileWidth, and TileLength are constrained so that -there are an integral number of samples of each component in a -complete strip or tile. However, ImageWidth/ImageLength are not -constrained. If an odd-size image is to be converted to subsampled -format, the writer should pad the source data to a multiple of the -sampling factors by replication of the last column and/or row, then -downsample. The number of luminance samples actually stored in the -file will be a multiple of the sampling factors. Conversely, -readers must ignore any extra data (outside the specified image -dimensions) after upsampling.

-

When PlanarConfiguration=2, each strip or tile covers the same -image area despite subsampling; that is, the total number of strips -or tiles in the image is the same for each component. Therefore -strips or tiles of the subsampled components contain fewer samples -than strips or tiles of the luminance component.

-

If there are extra samples per pixel (see field ExtraSamples), -these data channels have the same number of samples as the -luminance component.

-
-

Rewrite the YCbCrSubSampling field description (pp 91-92) as follows -(largely to eliminate possibly-misleading references to -ImageWidth/ImageLength of the subsampled components):

-
-

(first paragraph unchanged)

-

The two elements of this field are defined as follows:

-

Short 0: ChromaSubsampleHoriz:

-
-

1 = there are equal numbers of luma and chroma samples horizontally.

-

2 = there are twice as many luma samples as chroma samples -horizontally.

-

4 = there are four times as many luma samples as chroma samples -horizontally.

-
-

Short 1: ChromaSubsampleVert:

-
-

1 = there are equal numbers of luma and chroma samples vertically.

-

2 = there are twice as many luma samples as chroma samples -vertically.

-

4 = there are four times as many luma samples as chroma samples -vertically.

-
-

ChromaSubsampleVert shall always be less than or equal to -ChromaSubsampleHoriz. Note that Cb and Cr have the same sampling -ratios.

-

In a strip TIFF file, RowsPerStrip is required to be an integer -multiple of ChromaSubSampleVert (unless RowsPerStrip >= -ImageLength, in which case its exact value is unimportant). -If ImageWidth and ImageLength are not multiples of -ChromaSubsampleHoriz and ChromaSubsampleVert respectively, then the -source data shall be padded to the next integer multiple of these -values before downsampling.

-

In a tiled TIFF file, TileWidth must be an integer multiple of -ChromaSubsampleHoriz and TileLength must be an integer multiple of -ChromaSubsampleVert. Padding will occur to tile boundaries.

-

The default values of this field are [ 2,2 ]. Thus, YCbCr data is -downsampled by default!

-
-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/terms.html b/third_party/libtiff/doc/html-prebuilt/terms.html deleted file mode 100644 index 3515fe3..0000000 --- a/third_party/libtiff/doc/html-prebuilt/terms.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - Terminology — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

Terminology

-strike -

The following definitions are used throughout this documentation. -They are consistent with the terminology used in the TIFF 6.0 specification.

-
-
Sample:

The unit of information stored in an image; often called a -channel elsewhere. Sample values are numbers, usually unsigned -integers, but possibly in some other format if the SampleFormat -tag is specified in a TIFF

-
-
Pixel:

A collection of one or more samples that go together.

-
-
Row:

An Nx1 rectangular collection of pixels.

-
-
Tile:

An NxM rectangular organization of data (or pixels).

-
-
Strip:

A tile whose width is the full image width.

-
-
Compression:

A scheme by which pixel or sample data are stored in -an encoded form, specifically with the intent of reducing the -storage cost.

-
-
Codec:

Software that implements the decoding and encoding algorithms -of a compression scheme.

-
-
-
-
Image File Directory (IFD):

An Image File Directory - in short also directory - -contains information about the image, -as well as pointers (offsets) to the actual image data -within the on-disk file. -An IFD points either to the next IFD or shows with a ''0'' -that it is the last IFD in the IFD-chain.

-
-
Multi Images per TIFF file:

There may be more than one IFD in a TIFF file. -Each IFD defines a subfile. -One potential use of subfiles is to describe related images, -such as the pages of a facsimile transmission. -Such files are also named "multi-page TIFF" or "multi-image TIFF". -Refer also to Multi Page / Multi Image TIFF.

-
-
-
-
Subfile:

Subfile is a term in the TIFF 6.0 specification for -an image and its associated Image File Directory (IFD) -in a TIFF file containing one or more images.

-
-
-

In order to better understand how TIFF works (and consequently this -software) it is important to recognize the distinction between the -physical organization of image data as it is stored in a TIFF and how -the data is interpreted and manipulated as pixels in an image. TIFF -supports a wide variety of storage and data compression schemes that -can be used to optimize retrieval time and/or minimize storage space. -These on-disk formats are independent of the image characteristics; it -is the responsibility of the TIFF reader to process the on-disk storage -into an in-memory format suitable for an application. Furthermore, it -is the responsibility of the application to properly interpret the -visual characteristics of the image data. TIFF defines a framework for -specifying the on-disk storage format and image characteristics with -few restrictions. This permits significant complexity that can be -daunting. Good applications that handle TIFF work by handling as wide -a range of storage formats as possible, while constraining the -acceptable image characteristics to those that make sense for the -application.

-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools.html b/third_party/libtiff/doc/html-prebuilt/tools.html deleted file mode 100644 index 53ac427..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - TIFF Tools Overview — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

TIFF Tools Overview

-quad -

This software distribution comes with a small collection of -programs for converting non-TIFF format images to TIFF and for -manipulating and interrogating the contents of TIFF images. Several -of these tools are useful in their own right. Many of them however -are more intended to serve as programming examples for using the -TIFF library.

-
-

Manual pages

- -
-
-

Device-dependent Programs

-

There are two device-dependent programs that serve as simple -examples for writing programs to display and save TIFF images.

- - ---- - - - - - - - - - - -
Device-dependent programs

Tool

Description

tiffgt

Display the contents of one or more TIFF images using OpenGL. -The software makes extensive use of the TIFFRGBAImage -facilities described elsewhere.

-
-
-

Device-independent Programs

-

The remaining programs should be device-independent:

- - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Device-dependent programs

Tool

Description

fax2ps

Convert a Group 3- or Group 4- compressed TIFF to PostScript -that is significantly more compressed than is generated by -tiff2ps (unless tiff2ps writes PS Level II)

fax2tiff

Convert raw Group 3 or Group 4 facsimile data to TIFF

pal2rgb

Convert a Palette-style image to a full color RGB image by -applying the colormap

ppm2tiff

A quick hack that converts 8-bit PPM format images to TIFF

raw2tiff

Create a TIFF file from raw data

rgb2ycbcr

Convert an RGB, grayscale, or bilevel TIFF image to a YCbCr -TIFF image; it's mainly provided for testing

thumbnail

Copy a bilevel TIFF to one that includes 8-bit greyscale -"thumbnail images" for each page; it is provided as an example of -how one might use the SubIFD tag (and the library support -for it)

tiff2bw

A simple program to convert a color image to grayscale

tiff2pdf

Convert TIFF images to PDF

tiff2ps

Convert TIFF images to PostScript

tiff2rgba

Convert a TIFF image to RGBA color space

tiffcmp

Compare the contents of two TIFF files (it does not check all -the directory information, but does check all the data)

tiffcp

Copy, concatenate, and convert TIFF images (e.g. switching from -Compression=5 to Compression=1)

tiffcrop

Provides selection of images from within one or more multi-image -TIFF files, with orthogonal rotation, mirroring, cropping, and -extraction of multiple sections and exporting to one or more files. -It extends the functionality of tiffcp to support additional bit -depths in strips and tiles and enhances the selection capabilities of -tiffsplit. Bilevel images can be inverted and images may be split into -segments to fit on multiple /pages/ (standard paper sizes), plus other -functions described in the tiffcrop man page

tiffdither

Dither a b&w image into a bilevel image (suitable for use -in creating fax files)

tiffdump

Display the verbatim contents of the TIFF directory in a file -(it's very useful for debugging bogus files that you may get from -someone that claims they support TIFF)

tiffinfo

Display information about one or more TIFF files

tiffmedian

A version of Paul Heckbert's median cut program that reads an -RGB TIFF image, and creates a TIFF palette file as a result

tiffset

Set a field in a TIFF header

tiffsplit

Create one or more single-image files from a (possibly) -multi-image file

-

Check out the manual pages for details about the above programs.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/fax2ps.html b/third_party/libtiff/doc/html-prebuilt/tools/fax2ps.html deleted file mode 100644 index 0513483..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/fax2ps.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - fax2ps — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

fax2ps

-
-

Synopsis

-

fax2ps [ options ] [ file … ]

-
-
-

Description

-

fax2ps reads one or more TIFF -facsimile image files and prints a compressed form of -PostScript on the standard output that is suitable for printing.

-

By default, each page is scaled to reflect the -image dimensions and resolutions stored in the file. -The -x and -y -options can be used to specify the horizontal and vertical -image resolutions (lines/inch), respectively. -If the -S -option is specified, each page is scaled to fill an output page. -The default output page is 8.5 by 11 inches. -Alternate page dimensions can be specified in inches with the --W and -H -options.

-

By default fax2ps -generates PostScript for all pages in the file. -The -p -option can be used to select one or more pages from -a multi-page document.

-

fax2ps -generates a compressed form of PostScript that is -optimized for sending pages of text to a PostScript -printer attached to a host through a low-speed link (such -as a serial line). -Each output page is filled with white and then only -the black areas are drawn. -The PostScript specification of the black drawing operations -is optimized by using a special font that encodes the -move-draw operations required to fill -the black regions on the page. -This compression scheme typically results in a substantially -reduced PostScript description, relative to the straightforward -imaging of the page with a PostScript -image -operator. -This algorithm can, however, be ineffective -for continuous-tone and white-on-black images. -For these images, it sometimes is more efficient to send -the raster bitmap image directly; see -.BR tiff2ps (1).

-
-
-

Options

-
-
--p number
-

Print only the indicated page. -Multiple pages may be printed by specifying -this option more than once.

-
- -
-
--x resolution
-

Use resolution -as the horizontal resolution, in dots/inch, of the image data. -By default this value is taken from the file.

-
- -
-
--y resolution
-

Use resolution -as the vertical resolution, in lines/inch, of the image data. -By default this value is taken from the file.

-
- -
-
--S
-

Scale each page of image data to fill the output page dimensions. -By default images are presented according to the dimension -information recorded in the TIFF file.

-
- -
-
--W width
-

Use width -as the width, in inches, of the output page.

-
- -
-
--H height
-

Use height -as the height, in inches, of the output page.

-
- -
-
-

Diagnostics

-

Some messages about malformed TIFF images come from the -TIFF library.

-

Various messages about badly formatted facsimile images -may be generated due to transmission errors in received -facsimile. -fax2ps -attempts to recover from such data errors by resynchronizing -decoding at the end of the current scanline. -This can result in long horizontal black lines in the resultant -PostScript image.

-
-
-

Notes

-

If the destination printer supports PostScript Level II then -it is always faster to just send the encoded bitmap generated -by the tiff2ps program.

-
-
-

Bugs

-

fax2ps -should probably figure out when it is doing a poor -job of compressing the output and just generate -PostScript to image the bitmap raster instead.

-
-
-

See also

-

:doc`tiff2ps` (1), libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/fax2tiff.html b/third_party/libtiff/doc/html-prebuilt/tools/fax2tiff.html deleted file mode 100644 index 64b87cb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/fax2tiff.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - - fax2tiff — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

fax2tiff

-
-

Synopsis

-

fax2tiff [ options ] [ -o output.tif ] input.raw

-
-
-

Description

-

fax2tiff creates a TIFF file containing CCITT -Group 3 or Group 4 encoded data from one or more files containing "raw" -Group 3 or Group 4 encoded data (typically obtained directly from a fax modem). -By default, each row of data in the resultant TIFF -file is 1-dimensionally encoded and -padded or truncated to 1728 pixels, as needed. -The resultant image is a set of low resolution (98 lines/inch) -or medium resolution (196 lines/inch) -pages, each of which is a single strip of data. -The generated file conforms to the TIFF -Class F (FAX) specification for storing facsimile data. -This means, in particular, that each page of the data does -not include the trailing -"return to control" (RTC) code; as required -for transmission by the CCITT Group 3 specifications. -The old, "classic", format is created if the --c option is used. -(The Class F format can also be requested with the --f option.)

-

The default name of the output image is fax.tif; -this can be changed with the -o option. -Each input file is assumed to be a separate page of facsimile data -from the same document. -The order in which input files are specified on the command -line is the order in which the resultant pages appear in the -output file.

-
-
-

Options

-

Options that affect the interpretation of input data are:

-
-
--3
-

Assume input data is CCITT Group 3 encoded (default).

-
- -
-
--4
-

Assume input data is CCITT Group 4 encoded.

-
- -
-
--U
-

Assume input data is uncompressed (Group 3 or Group 4).

-
- -
-
--1
-

Assume input data is encoded with the 1-dimensional version of the CCITT -Group 3 Huffman encoding algorithm (default).

-
- -
-
--2
-

Assume input data is 2-dimensional version of the CCITT -Group 3 Huffman encoding algorithm.

-
- -
-
--P
-

Assume input data is not -EOL-aligned (default). This option has effect with Group 3 encoded input only.

-
- -
-
--A
-

Assume input data is EOL-aligned. This option has effect with Group 3 -encoded input only.

-
- -
-
--M
-

Treat input data as having bits filled from most significant bit (MSB) to most least bit (LSB).

-
- -
-
--L
-

Treat input data as having bits filled from least significant bit (LSB) to most significant bit -(MSB) (default).

-
- -
-
--B
-

Assume input data was encoded with black as 0 and white as 1.

-
- -
-
--W
-

Assume input data was encoded with black as 1 and white as 0 (default).

-
- -
-
--R
-

Specify the vertical resolution, in lines/inch, of the input images. -By default input are assumed to have a vertical resolution of 196 lines/inch. -If images are low resolution facsimile, a value of 98 lines/inch should -be specified.

-
- -
-
--X
-

Specify the width, in pixels, of the input images. -By default input are assumed to have a width of 1728 pixels.

-
- -

Options that affect the output file format are:

-
-
--o
-

Specify the name of the output file.

-
- -
-
--7
-

Force output to be compressed with the CCITT -Group 3 Huffman encoding algorithm (default).

-
- -
-
--8
-

Force output to be compressed with the CCITT -Group 4 Huffman encoding.

-
- -
-
--u
-

Force output to be uncompressed (Group 3 or Group 4).

-
- -
-
--5
-

Force output to be encoded with the 1-dimensional version of the CCITT -Group 3 Huffman encoding algorithm.

-
- -
-
--6
-

Force output to be encoded with the 2-dimensional version of the CCITT -Group 3 Huffman encoding algorithm (default).

-
- -
-
--a
-

Force the last bit of each "End Of Line" (EOL) -code to land on a byte boundary (default). This "zero padding" will -be reflected in the contents of the Group3Options -tag of the resultant TIFF file. This option has effect with Group 3 encoded output only.

-
- -
-
--p
-

Do not EOL-align output. This option has effect with Group 3 encoded -output only.

-
- -
-
--c
-

Generate "classic" Group 3 TIFF format.

-
- -
-
--f
-

Generate TIFF Class F (TIFF/F) format (default).

-
- -
-
--m
-

Force output data to have bits filled from most significant bit (MSB) -to most least bit (LSB).

-
- -
-
--l
-

Force output data to have bits filled from least significant bit (LSB) -to most significant bit (MSB) (default).

-
- -
-
--r
-

Specify the number of rows (scanlines) in each strip of data -written to the output file. -By default (or when value 0 is specified), tiffcp -attempts to set the rows/strip -that no more than 8 kilobytes of data appear in a strip (with except of G3/G4 -compression schemes). If you specify special value -1 -it will results in infinite number of the rows per strip. The entire image -will be the one strip in that case. This is default in case of G3/G4 output -compression schemes.

-
- -
-
--s
-

Stretch the input image vertically by writing each input row of -data twice to the output file.

-
- -
-
--v
-

Force fax2tiff -to print the number of rows of data it retrieved from the input file.

-
- -
-
--z
-

Force output to be compressed with the LZW encoding.

-
- -
-
-

Diagnostics

-

The following warnings and errors come from the decoding -routines in the library.

-

"Warning, %s: Premature EOL at scanline %d (x %d).en":

-
-

The input data had a row that was shorter than the expected width. -The row is padded with white.

-
-

"%s: Premature EOF at scanline %d (x %d).en":

-
-

The decoder ran out of data in the middle of a scanline. -The resultant row is padded with white.

-
-

"%s: Bad code word at row %d, x %den":

-
-

An invalid Group 3 code -was encountered while decoding the input file. -The row number and horizontal position is given. -The remainder of the input row is discarded, while -the corresponding output row is padded with white.

-
-

"%s: Bad 2D code word at scanline %d.en":

-
-

An invalid Group 4 or 2D Group 3 code -was encountered while decoding the input file. -The row number and horizontal position is given. -The remainder of the input row is discarded, while -the corresponding output row is padded with white.

-
-
-
-

Bugs

-

Input data are assumed to have a a "top left" orientation; -it should be possible to override this assumption -from the command line.

-
-
-

See also

-

"CCITT Recommendation T.4" -(Standardization of Group 3 Facsimile Apparatus for Document Transmission).

-

"The Spirit of TIFF Class F", -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.

-

tiffinfo (1), -tiffdither (1), -tiffgt (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/pal2rgb.html b/third_party/libtiff/doc/html-prebuilt/tools/pal2rgb.html deleted file mode 100644 index 9c4051f..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/pal2rgb.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - pal2rgb — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

pal2rgb

-
-

Synopsis

-

pal2rgb [ options ] input.tif output.tif

-
-
-

Description

-

pal2rgb converts a palette color image to a full color image by -applying the colormap of the palette image to each sample to generate a full color -RGB image.

-
-
-

Options

-

Options that affect the interpretation of input data are:

-
-
--C numentries
-

This option overrides the default behavior of pal2rgb -in determining whether or not -colormap entries contain 16-bit or 8-bit values. -By default the colormap is inspected and -if no colormap entry greater than 255 is found, -the colormap is assumed to have only 8-bit values; otherwise -16-bit values (as required by the TIFF -specification) are assumed. -The --C -option can be used to explicitly specify the number of -bits for colormap entries: --C 8 for 8-bit values, --C 16 for 16-bit values.

-
- -

Options that affect the output file format are:

-
-
--p planarconfig
-

Explicitly select the planar configuration used in organizing -data samples in the output image: --p contig for samples packed contiguously, and --p separate for samples stored separately. -By default samples are packed.

-
- -
-
--c compress
-

Use the specified compression algorithm to encoded image data -in the output file: --c packbits for Macintosh Packbits, --c lzw for Lempel-Ziv & Welch, --c zip for Deflate, --c none -for no compression. -If no compression-related option is specified, the input -file's compression algorithm is used.

-
- -
-
--r striprows
-

Explicitly specify the number of rows in each strip of the -output file. If the -r -option is not specified, a number is selected such that each -output strip has approximately 8 kilobytes of data in it.

-
- -
-
-

Bugs

-

Only 8-bit images are handled.

-
-
-

See also

-

tiffinfo (1), -tiffcp (1), -tiffmedian (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/ppm2tiff.html b/third_party/libtiff/doc/html-prebuilt/tools/ppm2tiff.html deleted file mode 100644 index 948ab64..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/ppm2tiff.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - ppm2tiff — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

ppm2tiff

-

Synopsis

-

ppm2tiff [ options ] [ input.ppm ] output.tif

-
-

Description

-

ppm2tiff converts a file in the PPM, PGM and PBM image formats to -TIFF. By default, the TIFF image is created with data samples packed -(PlanarConfiguration=1), compressed with the Packbits algorithm -(Compression=32773), and with each strip no more than 8 kilobytes. -These characteristics can be overridden, or explicitly specified with the -options described below.

-

If the PPM file contains greyscale data, then the PhotometricInterpretation -tag is set to 1 (min-is-black), otherwise it is set to 2 (RGB).

-

If no PPM file is specified on the command line, ppm2tiff -will read from the standard input.

-
-
-

Options

-
-
--c compress
-

Specify a compression scheme to use when writing image data: --c none for no compression, --c packbits for PackBits compression (will be used by default), --c lzw for Lempel-Ziv & Welch compression, --c jpeg for baseline JPEG compression, --c zip for Deflate compression, --c g3 for CCITT Group 3 (T.4) compression, and --c g4 for CCITT Group 4 (T.6) compression.

-
- -
-
--r striprows
-

Write data with a specified number of rows per strip; by default the number of -rows/strip is selected so that each strip is approximately 8 kilobytes.

-
- -
-
--R resolution
-

Mark the resultant image to have the specified X and Y resolution (in -dots/inch).

-
- -
-
-

See also

-

tiffinfo (1), -tiffcp (1), -tiffmedian (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/raw2tiff.html b/third_party/libtiff/doc/html-prebuilt/tools/raw2tiff.html deleted file mode 100644 index d7e8d6a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/raw2tiff.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - raw2tiff — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

raw2tiff

-
-

Synopsis

-

raw2tiff [ options ] *input.raw output.tif

-
-
-

Description

-

raw2tiff converts a raw byte sequence into TIFF. -By default, the TIFF image is created with data samples packed -(PlanarConfiguration=1), compressed with the PackBits algorithm -(Compression=32773), and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below.

-
-
-

Options

-
-
--H number
-

Size of input image file header in bytes (0 by default). This amount of data -just will be skipped from the start of file while reading.

-
- -
-
--w number
-

Width of input image in pixels (can be guessed, see Guessing the image geometry below).

-
- -
-
option:
-

-b number

-

number of bands in input image (1 by default).

-
-
-
-
--d datatype
-

type of samples in input image, where datatype may be one of:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data type

Description

byte

8-bit unsigned integer (default)

short

16-bit unsigned integer

long

32-bit unsigned integer

sbyte

8-bit signed integer

sshort

16-bit signed integer

slong

32-bit signed integer

float

32-bit IEEE floating point

double

64-bit IEEE floating point

-
- -
-
--i config
-

type of sample interleaving in input image, where config may be one of:

- - - - - - - - - - - - - - -

Configuration

Description

pixel

pixel interleaved data (default)

band

band interleaved data.

-
- -
-
--p  photo
-

photometric interpretation (color space) of the input image, where photo may -be one of:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Photometric

Description

miniswhite

white color represented with 0 value

minisblack

black color represented with 0 value (default)

rgb

image has RGB color model

cmyk

image has CMYK (separated) color model

ycbcr

image has YCbCr color model

cielab

image has CIE L*a*b color model

icclab

image has ICC L*a*b color model

itulab

image has ITU L*a*b color model

-
- -
-
--s
-

swap bytes fetched from the input file.

-
- -
-
--L
-

input data has LSB2MSB bit order (default).

-
- -
-
--M
-

input data has MSB2LSB bit order.

-
- -
-
--c
-

Specify a compression scheme to use when writing image data: --c none for no compression, --c packbits for the PackBits compression algorithm (the default), --c jpeg for the baseline JPEG compression algorithm, --c zip for the Deflate compression algorithm, --c lzw for Lempel-Ziv & Welch.

-
- -
-
-

Guessing the image geometry

-

raw2tif can guess image width and height in case one or both of these parameters are -not specified. If you omit one of those parameters, the complementary one will -be calculated based on the file size (taking into account header size, number -of bands and data type). If you omit both parameters, the statistical approach -will be used. Utility will compute correlation coefficient between two lines -at the image center using several appropriate line sizes and the highest -absolute value of the coefficient will indicate the right line size. That is -why you should be cautious with the very large images, because guessing -process may take a while (depending on your system performance). Of course, the -utility can't guess the header size, number of bands and data type, so it -should be specified manually. If you don't know anything about your image, -just try with the several combinations of those options.

-

There is no magic, it is just a mathematical statistics, so it can be wrong -in some cases. But for most ordinary images guessing method will work fine.

-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcp (1), -tiffmedian (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/rgb2ycbcr.html b/third_party/libtiff/doc/html-prebuilt/tools/rgb2ycbcr.html deleted file mode 100644 index cd14a94..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/rgb2ycbcr.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - rgb2ycbcr — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

rgb2ycbcr

-
-

Synopsis

-

rgb2ycbcr [ options ] src1.tif src2.tif … dst.tif

-
-
-

Description

-

rgb2ycbcr converts RGB color, greyscale, or bi-level TIFF -images to YCbCr images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is converted to a -separate directory in the destination file.

-

By default, chrominance samples are created by sampling -2 by 2 blocks of luminance values; this can be changed with the --h and -v options. -Output data are compressed with the PackBits -compression scheme, by default; an alternate scheme can be selected with the --c option. -By default, output data are compressed in strips with -the number of rows in each strip selected so that the -size of a strip is never more than 8 kilobytes; -the -r -option can be used to explicitly set the number of -rows per strip.

-
-
-

Options

-
-
--c compress
-

Specify a compression scheme to use when writing image data: --c none for no compression, --c packbits for the PackBits compression algorithm (the default), --c jpeg for the JPEG compression algorithm, --c zip for the deflate compression algorithm, and --c lzw for Lempel-Ziv & Welch.

-
- -
-
--h size
-

Set the horizontal sampling dimension to one of: 1, 2 (default), or 4.

-
- -
-
--r striprows
-

Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes.

-
- -
-
--v size
-

Set the vertical sampling dimension to one of: 1, 2 (default), or 4.

-
- -
-
-

See also

-

tiffinfo (1), -tiffcp (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/thumbnail.html b/third_party/libtiff/doc/html-prebuilt/tools/thumbnail.html deleted file mode 100644 index 9941f8a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/thumbnail.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - thumbnail — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

thumbnail

-
-

Synopsis

-

thumbnail [ options ] input.tif output.tif

-
-
-

Description

-

thumbnail is a program written to show how one might use the -SubIFD tag (#330) to store thumbnail images. -thumbnail -copies a TIFF Class F facsimile file to the output file -and for each image an 8-bit greyscale "thumbnail sketch" is created. -The output file contains the thumbnail image with the associated -full-resolution page linked below with the SubIFD tag.

-

By default, thumbnail images are 216 pixels wide by 274 pixels high. -Pixels are calculated by sampling and filtering the input image -with each pixel value passed through a contrast curve.

-
-
-

Options

-
-
--w width
-

Specify the width of thumbnail images in pixels.

-
- -
-
--h height
-

Specify the height of thumbnail images in pixels.

-
- -
-
--c contrast
-

Specify a contrast curve to apply in generating the thumbnail images. -By default pixels values are passed through a linear contrast curve -that simply maps the pixel value ranges. Alternative curves are:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Curve

Description

exp50

50% exponential curve

exp60

60% exponential curve

exp70

70% exponential curve

exp80

80% exponential curve

exp90

90% exponential curve

exp

pure exponential curve

linear

linear curve

-
- -
-
-

Bugs

-

There are no options to control the format of the saved thumbnail images.

-
-
-

See also

-

tiffdump (1), -tiffgt (1), -tiffinfo (1), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiff2bw.html b/third_party/libtiff/doc/html-prebuilt/tools/tiff2bw.html deleted file mode 100644 index 93f6de8..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiff2bw.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - tiff2bw — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiff2bw

-
-

Synopsis

-

tiff2bw [ options ] input.tif output.tif

-
-
-

Description

-

tiff2bw converts an RGB or Palette color TIFF -image to a greyscale image by -combining percentages of the red, green, and blue channels. -By default, output samples are created by taking -28% of the red channel, 59% of the green channel, and 11% of -the blue channel. To alter these percentages, the --R, -G, and -B options may be used.

-
-
-

Options

-
-
--c compress
-

Specify a compression scheme to use when writing image data: --c none for no compression, --c packbits for the PackBits compression algorithm, --c zip for the Deflate compression algorithm, --c g3 for the CCITT Group 3 compression algorithm, --c g4 for the CCITT Group 4 compression algorithm, --c lzw for Lempel-Ziv & Welch (the default).

-
- -
-
--r striprows
-

Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes.

-
- -
-
--R redperc
-

Specify the percentage of the red channel to use (default 28).

-
- -
-
--G greenperc
-

Specify the percentage of the green channel to use (default 59).

-
- -
-
--B blueperc
-

Specify the percentage of the blue channel to use (default 11).

-
- -
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcp (1), -tiffmedian (1), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiff2pdf.html b/third_party/libtiff/doc/html-prebuilt/tools/tiff2pdf.html deleted file mode 100644 index c16bb36..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiff2pdf.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - tiff2pdf — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiff2pdf

-
-

Synopsis

-

tiff2pdf [ options ] input.tiff

-
-
-

Description

-

tiff2pdf opens a TIFF image and writes a PDF document to standard output.

-

The program converts one TIFF file to one PDF file, including multiple page -TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF -files that contain data of TIFF photometric interpretations of bilevel, -grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by -libtiff and PDF.

-

If you have multiple TIFF files to convert into one PDF file then use tiffcp -or other program to concatenate the files into a multiple page TIFF file. -If the input TIFF file is of huge dimensions (greater than 10000 pixels height -or width) convert the input image to a tiled TIFF if it is not already.

-

The standard output is standard output. Set the output file name with the --o option.

-

All black and white files are compressed into a single strip CCITT G4 Fax -compressed PDF, unless tiled, where tiled black and white images are -compressed into tiled CCITT G4 Fax compressed PDF, -libtiff CCITT support is assumed.

-

Color and grayscale data can be compressed using either JPEG compression, -ITU-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using -the -j or -z options. JPEG compression support -requires that libtiff be configured with JPEG support, and -Zip/Deflate compression support requires that libtiff -be configured with Zip support. Use only one or the other of --j and -z.

-

If the input TIFF contains single strip CCITT G4 Fax compressed information, -then that is written to the PDF file without transcoding, unless the options -of no compression and no passthrough are set, -d and -n.

-

If the input TIFF contains JPEG or single strip Zip/Deflate compressed -information, and they are configured, then that is written to the PDF file -without transcoding, unless the options of no compression and no passthrough -are set.

-

The default page size upon which the TIFF image is placed is determined by -the resolution and extent of the image data. Default values for the TIFF -image resolution can be set using the -x and -y -options. The page size can be set using the -p -option for paper size, or -w and -l -for paper width and length, then each page of the TIFF image is centered on -its page. The distance unit for default resolution and page width and -length can be set by the -u option, the default unit is inch.

-

Various items of the output document information can be set with the --e, -c, -a, -t, -s, -and -k options. Setting the argument of the option to "" for these -tags causes the relevant document information field to be not written. Some -of the document information values otherwise get their information from the -input TIFF image, the software, author, document name, and image description.

-

The Portable Document Format (PDF) specification is copyrighted by Adobe -Systems, Incorporated.

-
-
-

Options

-
-
--o output-file
-

Set the output to go to file output-file

-
- -
-
--j
-

Compress with JPEG (requires libjpeg configured with -libtiff).

-
- -
-
--z
-

Compress with Zip/Deflate (requires :program`zlib` configured with -libtiff).

-
- -
-
--q quality
-

Set the compression quality, 1-100 for JPEG.

-
- -
-
--n
-

Do not allow data to be converted without uncompressing, no compressed -data passthrough.

-
- -
-
--b
-

Set PDF Interpolate user preference.

-
- -
-
--d
-

Do not compress (decompress) - except monochrome to CCITT Group 4.

-
- -
-
--i
-

Invert colors.

-
- -
-
--p paper-size
-

Set paper size, e.g., letter, legal, A4.

-
- -
-
--F
-

Cause the tiff to fill the PDF page.

-
- -
-
--u [ i | m ]
-

Set distance unit, i for inch, m for centimeter.

-
- -
-
--w width
-

Set width in units.

-
- -
-
--l length
-

Set length in units.

-
- -
-
--x xres
-

Set x/width resolution default.

-
- -
-
--y yres
-

Set y/length resolution default.

-
- -
-
--r [ d | o ]
-

Set d for resolution default for images without resolution, -o for resolution override for all images.

-
- -
-
--f
-

Set PDF Fit Window user preference.

-
- -
-
--e YYYYMMDDHHMMSS
-

Set document information date, overrides image or current date/time default, -YYYYMMDDHHMMSS.

-
- -
-
--c creator
-

Set document information creator, overrides image software default.

-
- -
-
--a author
-

Set document information author, overrides image artist default.

-
- -
-
--t title
-

Set document information title, overrides image document name default.

-
- -
-
--s subject
-

Set document information subject, overrides image image description default.

-
- -
-
--k keywords
-

Set document information keywords.

-
- -
-
--m size
-

Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit.

-
- -
-
--h
-

List usage reminder to stderr and exit.

-
- -
-
-

Examples

-

The following example would generate the file output.pdf from input.tiff:

-
tiff2pdf -o output.pdf input.tiff
-
-
-

The following example would generate PDF output from input.tiff and write it -to standard output:

-
tiff2pdf input.tiff
-
-
-

The following example would generate the file output.pdf from input.tiff, -putting the image pages on a letter sized page, compressing the output -with JPEG, with JPEG quality 75, setting the title to Document, and setting -the Fit Window option:

-
tiff2pdf -p letter -j -q 75 -t "Document" -f -o output.pdf input.tiff
-
-
-
-
-

See also

-

tiffcp (1), -tiff2ps (1), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiff2ps.html b/third_party/libtiff/doc/html-prebuilt/tools/tiff2ps.html deleted file mode 100644 index 5b64f4c..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiff2ps.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - - tiff2ps — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiff2ps

-
-

Synopsis

-

tiff2ps [ options ] input.tif …

-
-
-

Description

-

tiff2ps reads TIFF images and writes PostScript™ or Encapsulated -PostScript™ (EPS) on the standard output. By default tiff2ps -writes Encapsulated PostScript™ for the first image in the specified -TIFF image file.

-

By default, tiff2ps will generate PostScript™ that fills a -printed area specified by the TIFF tags in the input file. -If the file does not contain XResolution or YResolution -tags, then the printed area is set according to the image dimensions. -The -w and -h options (see below) -can be used to set the dimensions of the printed area in inches; -overriding any relevant TIFF tags.

-

The PostScript™ generated for RGB, palette, and CMYK images uses the -colorimage operator. The PostScript™ generated for greyscale and -bilevel images uses the image operator. When the colorimage -operator is used, PostScript™ code to emulate this operator -on older PostScript™ printers is also generated. -Note that this emulation code can be very slow.

-

Color images with associated alpha data are composited over -a white background.

-
-
-

Options

-
-
--1
-

Generate PostScript™ Level 1 (the default).

-
- -
-
--2
-

Generate PostScript™ Level 2.

-
- -
-
--3
-

Generate PostScript™ Level 3. It basically allows one to use the `/flateDecode -filter for ZIP compressed TIFF images.

-
- -
-
--8
-

Disable use of ASCII85 encoding with PostScript™ Level 2/3.

-
- -
-
--a
-

Generate output for all IFDs (pages) in the input file.

-
- -
-
--b margin
-

Specify the bottom margin for the output (in inches). This does not affect -the height of the printed image.

-
- -
-
--c
-

Center the image in the output. This option only shows an effect if both -the -w and the -h option are given.

-
- -
-
--C name
-

Specify the document creator name.

-
- -
-
--d dir
-

Set the initial TIFF -directory to the specified directory number. -(NB: Directories are numbered starting at zero.) -This option is useful for selecting individual pages in a -multi-page (e.g. facsimile) file.

-
- -
-
--D
-

Enable duplex printing (two pages per sheet of paper).

-
- -
-
--e
-

Force the generation of Encapsulated PostScript™ (implies --z).

-
- -
-
--h size
-

Specify the vertical size of the printed area (in inches).

-
- -
-
--H
-

Specify the maximum height of image (in inches). Images with larger sizes will -be split in several pages. Option -L -may be used for specifying size of split images overlapping.

-
- -
-
--i
-

Enable/disable pixel interpolation. This option requires a -single numeric value: zero to disable pixel interpolation and -non-zero to enable. The default is enabled.

-
- -
-
--L
-

Specify the size of overlapping for split images (in inches). Used in -conjunction with -H and -W options.

-
- -
-
--l
-

Specify the left margin for the output (in inches). This does not affect -the width of the printed image.

-
- -
-
--M size
-

Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit.

-
- -
-
--m
-

Where possible render using the imagemask PostScript™ operator instead of the -image operator. When this option is specified tiff2ps will use -imagemask for rendering 1 bit deep images. If this option is not specified -or if the image depth is greater than 1 then the image operator is used.

-
- -
-
--o ifdoffset
-

Set the initial TIFF directory to the IFD at the specified file offset. -This option is useful for selecting thumbnail images and the -like which are hidden using the SubIFD tag.

-
- -
-
--O
-

Write PostScript™ to specified file instead of standard output.

-
- -
-
--p
-

Force the generation of (non-Encapsulated) PostScript™.

-
- -
-
--P L|P
-

Set optional PageOrientation DSC comment to Landscape or Portrait.

-
- -
-
--r 90|180|270|auto
-

Rotate image by 90, 180, 270 degrees or auto. Auto picks the best -fit for the image on the specified paper size (eg portrait -or landscape) if -h or -w is specified. Rotation is in degrees -counterclockwise. Auto rotates 90 degrees ccw to produce landscape.

-
- -
-
--s
-

Generate output for a single IFD (page) in the input file.

-
- -
-
--t title
-

Specify the document title string.

-
- -
-
--T
-

Print pages for top edge binding.

-
- -
-
--w size
-

Specify the horizontal size of the printed area (in inches).

-
- -
-
--W size
-

Specify the maximum width of image (in inches). Images with larger sizes will -be split in several pages. Options -L and -W -are mutually exclusive.

-
- -
-
--x
-

Override resolution units specified in the TIFF as centimeters.

-
- -
-
--y
-

Override resolution units specified in the TIFF as inches.

-
- -
-
--z
-

When generating PostScript™ Level 2, data is scaled so that it does not -image into the deadzone on a page (the outer margin that the printing device -is unable to mark). This option suppresses this behavior. -When PostScript™ Level 1 is generated, data is imaged to the entire printed -page and this option has no affect.

-
- -
-
-

Examples

-

The following generates PostScript™ Level 2 for all pages of a facsimile:

-
tiff2ps \-a2 fax.tif | lpr
-
-
-

Note also that if you have version 2.6.1 or newer of Ghostscript then you -can efficiently preview facsimile generated with the above command.

-

To generate Encapsulated PostScript™ for a the image at directory 2 -of an image use:

-
tiff2ps \-d 1 foo.tif
-
-
-

(Notice that directories are numbered starting at zero.)

-

If you have a long image, it may be split in several pages:

-
tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps
-
-
-

The page size is set to 8.5x11 by -w and -h -options. We will accept a small amount of vertical compression, so --H set to 14. Any pages between 11 and 14 inches will be fit onto one page. -Pages longer than 14 inches are cut off at 11 and continued on the next -page. The -L.5 -option says to repeat a half inch on the next page (to improve readability).

-
-
-

Bugs

-

Because PostScript™ does not support the notion of a colormap, -8-bit palette images produce 24-bit PostScript™ images. -This conversion results in output that is six times -bigger than the original image and which takes a long time -to send to a printer over a serial line. -Matters are even worse for 4-, 2-, and 1-bit palette images.

-

Does not handle tiled images when generating PostScript™ Level I output.

-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcp (1), -tiffgt (1), -tiffmedian (1), -tiff2bw (1), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiff2rgba.html b/third_party/libtiff/doc/html-prebuilt/tools/tiff2rgba.html deleted file mode 100644 index e95e67e..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiff2rgba.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - tiff2rgba — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiff2rgba

-
-

Synopsis

-

tiff2rgba [ options ] input.tif output.tif

-
-
-

Description

-

tiff2rgba converts a wide variety of TIFF images into an RGBA TIFF image. This -includes the ability to translate different color spaces and photometric -interpretation into RGBA, support for alpha blending, and translation -of many different bit depths into a 32bit RGBA image.

-

Internally this program is implemented using the TIFFReadRGBAImage() -function, and it suffers any limitations of that function. This includes -limited support for > 8 BitsPerSample images, and flaws with some -esoteric combinations of BitsPerSample, photometric interpretation, -block organization and planar configuration.

-

The generated images are stripped images with four samples per pixel -(red, green, blue and alpha) or if the -n flag is used, three samples -per pixel (red, green, and blue). The resulting images are always planar -configuration contiguous. For this reason, this program is a useful utility -for transform exotic TIFF files into a form ingestible by almost any TIFF -supporting software.

-
-
-

Options

-
-
--c
-

Specify a compression scheme to use when writing image data: --c none for no compression (the default), --c packbits for the PackBits compression algorithm, --c zip for the Deflate compression algorithm, --c jpeg for the JPEG compression algorithm, and --c lzw for Lempel-Ziv & Welch.

-
- -
-
--r striprows
-

Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes.

-
- -
-
--b
-

Process the image one block (strip/tile) at a time instead of by reading -the whole image into memory at once. This may be necessary for very large -images on systems with limited RAM.

-
- -
-
--n
-

Drop the alpha component from the output file, producing a pure RGB file. -Currently this does not work if the -b flag is also in effect.

-
- -
-
--B
-

Use this value as the background when doing alpha compositing (dropping the -alpha component).

-
- -
-
--M size
-

Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit.

-
- -
-
-

See also

-

tiff2bw (1), -TIFFReadRGBAImage (3tiff), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffcmp.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffcmp.html deleted file mode 100644 index a50bf57..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffcmp.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - tiffcmp — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffcmp

-
-

Synopsis

-

tiffcmp [ options ] file1.tif file2.tif

-
-
-

Description

-

tiffcmp compares the tags and data in two files created according -to the Tagged Image File Format, Revision 6.0. -The schemes used for compressing data in each file -are immaterial when data are compared-data are compared on -a scanline-by-scanline basis after decompression. -Most directory tags are checked; notable exceptions are: -GrayResponseCurve, ColorResponseCurve, and ColorMap tags. -Data will not be compared if any of the BitsPerSample, -SamplesPerPixel, or ImageWidth values are not equal. -By default, tiffcmp will terminate if it encounters any difference.

-
-
-

Options

-
-
--l
-

List each byte of image data that differs between the files.

-
- -
-
--z number
-

List specified number of image data bytes that differs between the files.

-
- -
-
--t
-

Ignore any differences in directory tags.

-
- -
-
-

Bugs

-

Tags that are not recognized by the library are not -compared; they may also generate spurious diagnostics.

-

The image data of tiled files is not compared, since the TIFFReadScanline() -function is used. An error will be reported for tiled files.

-

The pixel and/or sample number reported in differences may be off -in some exotic cases.

-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcp (1), -tiffmedian (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffcp.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffcp.html deleted file mode 100644 index 6fb5695..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffcp.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - tiffcp — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffcp

-
-

Synopsis

-

tiffcp [ options ] src1.tif … srcN.tif dst.tif

-
-
-

Description

-

tiffcp combines one or more files created according -to the Tag Image File Format, Revision 6.0 into a single TIFF file. -Because the output file may be compressed using a different -algorithm than the input files, tiffcp is most often -used to convert between different compression schemes.

-

By default, tiffcp will copy all the understood tags in a -TIFF directory of an input file to the associated directory in the output file.

-

tiffcp can be used to reorganize the storage characteristics of data -in a file, but it is explicitly intended to not alter or convert -the image data content in any way.

-
-
-

Options

-
-
--a
-

Append to an existing output file instead of overwriting it.

-
- -
-
--b image
-

subtract the following monochrome image from all others -processed. This can be used to remove a noise bias -from a set of images. This bias image is typically an -image of noise the camera saw with its shutter closed.

-
- -
-
--B
-

Force output to be written with Big-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to.

-
- -
-
--C
-

Suppress the use of "strip chopping" when reading images -that have a single strip/tile of uncompressed data.

-
- -
-
--c
-

Specify the compression to use for data written to the output file: --c none for no compression, --c packbits for PackBits compression, --c lzw for Lempel-Ziv & Welch compression, --c zip for Deflate compression, --c lzma for LZMA2 compression, --c jpeg for baseline JPEG compression, --c g3 for CCITT Group 3 (T.4) compression, --c g4 for CCITT Group 4 (T.6) compression, or --c sgilog for SGILOG compression.

-

By default tiffcp will compress data according to the -value of the Compression tag found in the source file.

-

The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data.

-

Group 3 compression can be specified together with several -T.4-specific options:

-
    -
  • 1d for 1-dimensional encoding,

  • -
  • 2d for 2-dimensional encoding, and

  • -
  • fill to force each encoded scanline to be zero-filled so that the -terminating EOL code lies on a byte boundary.

  • -
-

Group 3-specific options are specified by appending a :-separated -list to the g3 option; e.g. -c g3:2d:fill -to get 2D-encoded data with byte-aligned EOL codes.

-

LZW, Deflate and LZMA2 compression can be specified together with a -predictor value. A predictor value of 2 causes each scanline of the output image to -undergo horizontal differencing before it is encoded; a value of 1 forces each -scanline to be encoded without differencing. A value 3 is for floating point -predictor which you can use if the encoded data are in floating point format. -LZW-specific options are specified by appending a :-separated list to the -lzw option; e.g. -c lzw:2 for LZW compression with horizontal differencing.

-

Deflate and LZMA2 encoders support various compression levels (or encoder presets) set as -character p and a preset number. p1 is the fastest one with the worst -compression ratio and p9 is the slowest but with the best possible ratio; -e.g. -c zip:3:p9 for -Deflate encoding with maximum compression level and floating point predictor.

-

For the Deflate codec, and in a libtiff build with libdeflate enabled, p12 is -actually the maximum level.

-

For the Deflate codec, and in a libtiff build with libdeflate enabled, s0 can be used to -require zlib to be used, and s1 for libdeflate (defaults to libdeflate when -it is available).

-
- -
-
--f fillorder
-

Specify the bit fill order to use in writing output data. By default, tiffcp -will create a new file with the same fill order as the original. Specifying -f lsb2msb -will force data to be written with the FillOrder tag set to LSB2MSB, while --f msb2lsb will force data to be written with the FillOrder tag set to -MSB2LSB.

-
- -
-
--i
-

Ignore non-fatal read errors and continue processing of the input file.

-
- -
-
--l
-

Specify the length of a tile (in pixels).

-

tiffcp attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile.

-
- -
-
--L
-

Force output to be written with Little-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to.

-
- -
-
--M
-

Suppress the use of memory-mapped files when reading images.

-
- -
-
--o offset
-

Set initial directory offset.

-
- -
-
--p
-

Specify the planar configuration to use in writing image data -that has one 8-bit sample per pixel. By default, tiffcp -will create a new file with the same planar configuration as -the original. Specifying -p contig -will force data to be written with multi-sample data packed -together, while -p separate -will force samples to be written in separate planes.

-
- -
-
--r
-

Specify the number of rows (scanlines) in each strip of data -written to the output file. By default (or when value 0 -is specified), tiffcp attempts to set the rows/strip -that no more than 8 kilobytes of data appear in a strip. If you specify -special value -1 it will results in infinite number of the rows per -strip. The entire image will be the one strip in that case.

-
- -
-
--s
-

Force the output file to be written with data organized in strips -(rather than tiles).

-
- -
-
--t
-

Force the output file to be written with data organized in tiles (rather than -strips). options can be used to force the resultant image to be written as -strips or tiles of data, respectively.

-
- -
-
--w
-

Specify the width of a tile (in pixels). :program::tiffcp -attempts to set the tile dimensions so that no more than 8 kilobytes of data -appear in a tile.

-
- -
-
--x
-

Force the output file to be written with PAGENUMBER value in sequence.

-
- -
-
--8
-

Write BigTIFF instead of classic TIFF format.

-
- -
-
--,= character
-

substitute character for , -in parsing image directory indices -in files. This is necessary if filenames contain commas. -Note that -,= -with whitespace immediately following will disable -the special meaning of the , entirely. See examples.

-
- -
-
--m size
-

Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit.

-
- -
-
-

Examples

-

The following concatenates two files and writes the result using LZW encoding:

-
tiffcp -c lzw a.tif b.tif result.tif
-
-
-

To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used:

-
tiffcp -c g4 -r 10000 g3.tif g4.tif
-
-
-

(1000 is just a number that is larger than the number of rows in -the source file.)

-

To extract a selected set of images from a multi-image TIFF file, the file -name may be immediately followed by a , separated list of image directory -indices. The first image is always in directory 0. Thus, to copy the 1st and -3rd images of image file album.tif to result.tif:

-
tiffcp album.tif,0,2 result.tif
-
-
-

A trailing comma denotes remaining images in sequence. The following command -will copy all image with except the first one:

-
tiffcp album.tif,1, result.tif
-
-
-

Given file CCD.tif whose first image is a noise bias -followed by images which include that bias, -subtract the noise from all those images following it -(while decompressing) with the command:

-
tiffcp -c none -b CCD.tif CCD.tif,1, result.tif
-
-
-

If the file above were named CCD,X.tif, the -,= -option would be required to correctly parse this filename with image numbers, -as follows:

-
tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif
-
-
-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcmp (1), -tiffmedian (1), -tiffsplit (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffcrop.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffcrop.html deleted file mode 100644 index a71af7a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffcrop.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - - - - - tiffcrop — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffcrop

-
-

Synopsis

-

tiffcrop [ options ] src1.tif … srcN.tif dst.tif

-
-
-

Description

-

tiffcrop processes one or more files created according -to the Tag Image File Format, Revision 6.0, specification -into one or more TIFF file(s). -tiffcrop is most often used to extract portions of an image for processing -with bar code recognizer or OCR software when that software cannot -restrict the region of interest to a specific portion of the image -or to improve efficiency when the regions of interest must be rotated. -It can also be used to subdivide all or part of a processed image into -smaller sections and export individual images or sections of images -as separate files or separate images within one or more files derived -from the original input image or images.

-

The available functions can be grouped broadly into three classes:

-
    -
  1. Those that select individual images or sections of images from the input files. -The options -N for sequences or lists of individual images in the input files, --Z for zones, -z for regions, -X and -Y for fixed sized selections, --m for margins, -U for units, and -E for edge reference provide a variety of -ways to specify portions of the input image.

  2. -
  3. Those that allow the individual images or selections to be exported to one or -more output files in different groupings and control the organization of the -data in the output images. The options -P for page size grouping, -S for -subdivision into columns and rows and -e for export mode options that produce -one or more files from each input image. The options -r, -s, -t, -w control -strip and tile format and sizes while -B, -L, -c, -f modify the endian addressing -scheme, the compression options, and the bit fill sequence of images as they -are written.

  4. -
  5. Those that perform some action on each image that is selected from the input file. -The options include -R for rotate, -I for inversion of the photometric -interpretation and/or data values, and -F to flip (mirror) the image horizontally -or vertically.

  6. -
-

Functions are applied to the input image(s) in the following order: -cropping, fixed area extraction, zone and region extraction, -inversion, mirroring, rotation.

-

Functions are applied to the output image(s) in the following order: -export mode options for grouping zones, regions, or images into -one or more files, or row and column divisions with output margins, -or page size divisions with page orientation options.

-

Finally, strip, tile, byte order, output resolution, and compression options are -applied to all output images.

-

The output file(s) may be organized and compressed using a different -algorithm from the input files. -By default, tiffcrop will copy all the understood tags in a TIFF -directory of an input file to the associated directory in the output file. -Options can be used to force the resultant image to be written as strips -or tiles of data, respectively.

-

tiffcrop can be used to reorganize the storage characteristics of data -in a file, and to reorganize, extract, rotate, and otherwise -process the image data as specified at the same time whereas -tiffcp does not alter the image data within the file.

-

Using the options for selecting individual input images and the -options for exporting images and/or segments defined as zones or -regions of each input image, tiffcrop can perform the -functions of tiffcp and tiffsplit in a single pass -while applying multiple operations to individual selections or images.

-
-
-

Options

-
-
--h
-

Display the syntax summary for tiffcrop.

-
- -
-
--v
-

Report the current version and last modification date for tiffcrop.

-
- -
-
--N odd|even|#,#-#,#|last
-

Specify one or more series or range(s) of images within each file to process. -The words odd or even -may be used to specify all odd or even numbered images counting from one. -Note that internally, TIFF images are numbered from zero rather than one -but since this convention is not obvious to most users, tiffcrop used 1 -to specify the first image in a multipage file. The word last -may be used in place of a number in the sequence to indicate the -final image in the file without knowing how many images there are. -Ranges of images may be specified with a dash and multiple sets -can be indicated by joining them in a comma-separated list. eg. use --N 1,5-7,last -to process the 1st, 5th through 7th, and final image in the file.

-
- -
-
--E top|bottom|left|right
-

Specify the top, bottom, left, or right edge as the reference from -which to calculate the width and length of crop regions or sequence -of positions for zones. When used with the -e option for exporting -zones or regions, the reference edge determines how composite images -are arranged. Using -E left or -E right causes successive zones or -regions to be merged horizontally whereas using -E top or -E bottom -causes successive zones or regions to be arranged vertically. This -option has no effect on export layout when multiple zones or regions -are not being exported to composite images. Edges may be abbreviated -to the first letter.

-
- -
-
--e combined|divided|image|multiple|separate
-

Specify the export mode for images and selections from input images. -The final filename on the command line is considered to be the -destination file or filename stem for automatically generated -sequences of files. Modes may be abbreviated to the first letter.

- - ---- - - - - - - - - - - - - - - - - - - - - - - -
Export modes

Export mode

Description

combined

All images and selections are written to a single file with -multiple selections from one image combined into a single image (default)

divided

All images and selections are written to a single file -with each selection from one image written to a new image

image

Each input image is written to a new file (numeric filename sequence) -with multiple selections from the image combined into one image

multiple

Each input image is written to a new file (numeric filename sequence) -with each selection from the image written to a new image

separate

Individual selections from each image are written to separate files

-
- -
-
--U in|cm|px
-

Specify the type of units to apply to dimensions for margins and -crop regions for input and output images. Inches or centimeters -are converted to pixels using the resolution unit specified in the -TIFF file (which defaults to inches if not specified in the IFD).

-
- -
-
--m top,left,bottom,right
-

Specify margins to be removed from the input image. The order must -be top, left, bottom, right with only commas separating the elements -of the list. Margins are scaled according to the current units and -removed before any other extractions are computed.

-
- -
-
--X #
-

Set the horizontal (X-axis) dimension of a region to extract relative to -the specified origin reference. If the origin is the top or bottom -edge, the X axis value will be assumed to start at the left edge.

-
- -
-
--Y #
-

Set the vertical (Y-axis) dimension of a region to extract relative to -the specified origin reference. If the origin is the left or right -edge, the Y axis value will be assumed to start at the top.

-
- -
-
--Z  #:#,#:#
-

Specify zones of the image designated as position X of Y equal sized portions -measured from the reference edge, eg 1:3 would be first third of the -image starting from the reference edge minus any margins specified -for the confining edges. Multiple zones can be specified as a comma -separated list but they must reference the same edge. To extract the -top quarter and the bottom third of an image you would use --Z 1:4,3:3.

-
- -
-
--z x1,y1,x2,y2: ... :xN,yN,xN+1,yN+1
-

Specify a series of coordinates to define regions for processing and exporting. -The coordinates represent the top left and lower right corners of each region -in the current units, eg inch, cm, or pixels. Pixels are counted from one to -width or height and inches or cm are calculated from image resolution data.

-

Each colon delimited series of four values represents the horizontal and vertical -offsets from the top and left edges of the image, regardless of the edge specified -with the -E option. The first and third values represent the horizontal offsets of -the corner points from the left edge while the second and fourth values represent -the vertical offsets from the top edge.

-
- -
-
--F horiz|vert
-

Flip, ie mirror, the image or extracted region horizontally or vertically.

-
- -
-
--R 90|180|270
-

Rotate the image or extracted region 90, 180, or 270 degrees clockwise.

-
- -
-
--I [black|white|data|both]
-

Invert color space, eg dark to light for bilevel and grayscale images. -This can be used to modify negative images to positive or to correct -images that have the PHOTOMETRIC_INTERPRETATION tag set incorrectly. -If the value is black or white, the PHOTOMETRIC_INTERPRETATION tag is set to -MinIsBlack or MinIsWhite, without altering the image data. If the argument -is data or both, the data values of the image are modified. Specifying both -inverts the data and the PHOTOMETRIC_INTERPRETATION tag, whereas using data -inverts the data but not the PHOTOMETRIC_INTERPRETATION tag. -No support for modifying the color space of color images in this release.

-
- -
-
--H #
-

Set the horizontal resolution of output images to #, -expressed in the current units.

-
- -
-
--V #
-

Set the vertical resolution of the output images to # -expressed in the current units.

-
- -
-
--J #
-

Set the horizontal margin of an output page size to # -expressed in the current units when sectioning image into columns × rows -subimages using the -S cols:rows option.

-
- -
-
--K #
-

Set the vertical margin of an output page size to # -expressed in the current units when sectioning image into columns × rows -subimages using the -S cols:rows option.

-
- -
-
--O portrait|landscape|auto
-

Set the output orientation of the pages or sections. -Auto will use the arrangement that requires the fewest pages. -This option is only meaningful in conjunction with the -P -option to format an image to fit on a specific paper size.

-
- -
-
--P page
-

Format the output images to fit on page size paper. Use --P list to show the supported page sizes and dimensions. -You can define a custom page size by entering the width and length of the -page in the current units with the following format #.#x#.#.

-
- -
-
--S cols:rows
-

Divide each image into cols across and rows down equal sections.

-
- -
-
--B
-

Force output to be written with Big-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to.

-
- -
-
--C
-

Suppress the use of "strip chopping" when reading images -that have a single strip/tile of uncompressed data.

-
- -
-
--c
-

Specify the compression to use for data written to the output file: --c none for no compression, --c packbits for PackBits compression, --c lzw for Lempel-Ziv & Welch compression, --c jpeg for baseline JPEG compression. --c zip for Deflate compression, --c g3 for CCITT Group 3 (T.4) compression, --c g4 for CCITT Group 4 (T.6) compression. -By default tiffcrop will compress data according to the value of the -Compression tag found in the source file.

-

The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data.

-

Group 3 compression can be specified together with several -T.4-specific options: -1d for 1-dimensional encoding, -2d for 2-dimensional encoding, -fill to force each encoded scanline to be zero-filled so that the -terminating EOL code lies on a byte boundary. -Group 3-specific options are specified by appending a :-separated -list to the g3 option; e.g. -c g3:2d:fill -to get 2D-encoded data with byte-aligned EOL codes.

-

LZW compression can be specified together with a predictor -value. A predictor value of 2 causes -each scanline of the output image to undergo horizontal -differencing before it is encoded; a value -of 1 forces each scanline to be encoded without differencing. -LZW-specific options are specified by appending a :-separated -list to the lzw option; e.g. -c lzw:2 for LZW -compression with horizontal differencing.

-
- -
-
--f
-

Specify the bit fill order to use in writing output data. -By default, tiffcrop -will create a new file with the same fill order as the original. -Specifying --f lsb2msb -will force data to be written with the FillOrder tag set to -LSB2MSB, while --f msb2lsb will force data to be written with the FillOrder -tag set to MSB2LSB.

-
- -
-
--i
-

Ignore non-fatal read errors and continue processing of the input file.

-
- -
-
--k size
-

Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit.

-
- -
-
--l
-

Specify the length of a tile (in pixels). -tiffcrop attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile.

-
- -
-
--L
-

Force output to be written with Little-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to.

-
- -
-
--M
-

Suppress the use of memory-mapped files when reading images.

-
- -
-
--p
-

Specify the planar configuration to use in writing image data -that has more than one sample per pixel. -By default, tiffcrop -will create a new file with the same planar configuration as -the original. -Specifying -p contig -will force data to be written with multi-sample data packed -together, while --p separate -will force samples to be written in separate planes.

-
- -
-
--r
-

Specify the number of rows (scanlines) in each strip of data -written to the output file. -By default (or when value 0 is specified), tiffcrop -attempts to set the rows/strip that no more than 8 kilobytes of -data appear in a strip. If you specify the special value --1 it will results in infinite number of the rows per strip. The entire image -will be the one strip in that case.

-
- -
-
--s
-

Force the output file to be written with data organized in strips -(rather than tiles).

-
- -
-
--t
-

Force the output file to be written with data organized in tiles -(rather than strips).

-
- -
-
--w
-

Specify the width of a tile (in pixels). -tiffcrop attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile.

-
- -
-
--D opt1:value1,opt2:value2,opt3:value3:opt4:value4
-

Debug and dump facility

-

Display program progress and/or dump raw data to non-TIFF files. -Options include the following and must be joined as a comma -separated list. The use of this option is generally limited to -program debugging and development of future options. An equal sign -may be substituted for the colon in option:value pairs.

-

debug:N:

-
-

Display limited program progress indicators where larger N -increases the level of detail.

-
-

format:txt|raw:

-
-

Format any logged data as ASCII text or raw binary -values. ASCII text dumps include strings of ones and zeroes representing -the binary values in the image data plus identifying headers.

-
-

level:N:

-
-

Specify the level of detail presented in the dump files. -This can vary from dumps of the entire input or output image data to dumps -of data processed by specific functions. Current range of levels is 1 to 3.

-
-

input:full-path-to-directory/input-dumpname:

-

output:full-path-to-directory/output-dumpname:

-
-

When dump files are being written, each image will be written to a separate -file with the name built by adding a numeric sequence value to the dumpname -and an extension of .txt for ASCII dumps or .bin for binary dumps.

-
-

The four debug/dump options are independent, though it makes little sense to -specify a dump file without specifying a detail level.

-

Note: tiffcrop may be compiled with -DDEVELMODE to enable -additional very low level debug reporting.

-
- -

However, not all option combinations are permitted.

-
-

Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive. -In no case should the options be applied to a given selection successively.

-

Note 2: Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows.

-
-
-
-

Examples

-

The following concatenates two files and writes the result using LZW -encoding:

-
tiffcrop -c lzw a.tif b.tif result.tif
-
-
-

To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used:

-
tiffcrop -c g4 -r 10000 g3.tif g4.tif
-
-
-

(1000 is just a number that is larger than the number of rows in -the source file.)

-

To extract a selected set of images from a multi-image TIFF file -use the -N option described above. Thus, to copy the 1st and 3rd -images of image file album.tif to result.tif:

-
tiffcrop -N 1,3 album.tif result.tif
-
-
-

Invert a bilevel image scan of a microfilmed document and crop off margins of -0.25 inches on the left and right, 0.5 inch on the top, and 0.75 inch on the -bottom. From the remaining portion of the image, select the second and third -quarters, ie, one half of the area left from the center to each margin:

-
tiffcrop -U in -m 0.5,0.25,0.75,0.25 -E left -Z 2:4,3:4 -I both MicrofilmNegative.tif MicrofilmPostiveCenter.tif
-
-
-

Extract only the final image of a large Architectural E sized -multipage TIFF file and rotate it 90 degrees clockwise while -reformatting the output to fit on tabloid sized sheets with one -quarter of an inch on each side:

-
tiffcrop -N last -R 90 -O auto -P tabloid -U in -J 0.25 -K 0.25 -H 300 -V 300 Big-PlatMap.tif BigPlatMap-Tabloid.tif
-
-
-

The output images will have a specified resolution of 300 dpi in both -directions. The orientation of each page will be determined by whichever -choice requires the fewest pages. To specify a specific orientation, use -the portrait or landscape option. The paper size option does not resample -the image. It breaks each original image into a series of smaller images -that will fit on the target paper size at the specified resolution.

-

Extract two regions 2048 pixels wide by 2048 pixels high from each page of -a multi-page input file and write each region to a separate output file:

-
tiffcrop -U px -z 1,1,2048,2048:1,2049,2048,4097 -e separate  CheckScans.tiff Check
-
-
-

The output file names will use the stem Check with a numeric suffix which is -incremented for each region of each image, eg Check-001.tiff, -Check-002.tiff … Check-NNN.tiff. To produce a unique file for each page -of the input image with one new image for each region of the input image on that page -change the export option to -e multiple.

-
-
-

Notes

-

In general, bilevel, grayscale, palette and RGB(A) data with bit depths -from 1 to 32 bits should work in both interleaved and separate plane -formats. Unlike tiffcp, tiffcrop can read and write tiled images with -bits per sample that are not a multiple of 8 in both interleaved and -separate planar format. Floating point data types are supported at -bit depths of 16, 24, 32 and 64 bits per sample.

-

Not all images can be converted from one compression scheme to another. -Data with some photometric interpretations and/or bit depths are tied to -specific compression schemes and vice-versa, e.g. Group 3/4 compression -is only usable for bilevel data. JPEG compression is only usable on 8 -bit per sample data (or 12 bit if libtiff -was compiled with 12 bit JPEG support). Support for OJPEG compressed -images is problematic at best. Since OJPEG compression is no longer -supported for writing images with LibTIFF, these images will be updated -to the newer JPEG compression when they are copied or processed. This -may cause the image to appear color shifted or distorted after conversion. -In some cases, it is possible to remove the original compression from -image data using the option -c none.

-

tiffcrop does not currently provide options to up or downsample data to -different bit depths or convert data from one photometric interpretation -to another, e.g. 16 bits per sample to 8 bits per sample or RGB to grayscale.

-

tiffcrop is very loosely derived from code in tiffcp -with extensive modifications and additions to support the selection of input -images and regions and the exporting of them to one or more output files in -various groupings. The image manipulation routines are entirely new and -additional ones may be added in the future. It will handle tiled images with -bit depths that are not a multiple of eight that tiffcp may refuse to read.

-

tiffcrop was designed to handle large files containing many moderate sized images -with memory usage that is independent of the number of images in the file. -In order to support compression modes that are not based on individual -scanlines, e.g. JPEG, it now reads images by strip or tile rather than by -individual scanlines. In addition to the memory required by the input and -output buffers associated with libtiff -one or more buffers at least as large as the largest image to be read are -required. The design favors large volume document processing uses over -scientific or graphical manipulation of large datasets as might be found -in research or remote sensing scenarios.

-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcmp (1), -tiffcp (1), -tiffmedian (1), -tiffsplit (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffdither.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffdither.html deleted file mode 100644 index 44f2770..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffdither.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - tiffdither — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffdither

-
-

Synopsis

-

tiffdither [ options ] input.tif output.tif

-
-
-

Description

-

tiffdither converts a single channel 8-bit greyscale image to a bilevel image -using Floyd-Steinberg error propagation with thresholding.

-
-
-

Options

-
-
--c compress
-

Specify the compression to use for data written to the output file:

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Compression

Description

none

no compression

packbits

PackBits compression

lzw

Lempel-Ziv & Welch compression

zip

Deflate compression

g3

CCITT Group 3 (T.4) compression

g4

for CCITT Group 4 (T.6) compression

-

By default tiffdither -will compress data according to the value of the -Compression tag found in the source file.

-

The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data.

-

Group 3 compression can be specified together with several -T.4-specific options: -1d for 1-dimensional encoding, -2d for 2-dimensional encoding, and -fill to force each encoded scanline to be zero-filled so that the -terminating EOL code lies on a byte boundary. -Group 3-specific options are specified by appending a :-separated -list to the g3 option; e.g. -c g3:2d:fill -to get 2D-encoded data with byte-aligned EOL codes.

-

LZW compression can be specified together with a predictor value. -A predictor value of 2 causes each scanline of the output image to undergo -horizontal differencing before it is encoded; a value -of 1 forces each scanline to be encoded without differencing. -LZW-specific options are specified by appending a :-separated -list to the lzw option; e.g. -c lzw:2 for LZW -compression with horizontal differencing.

-
- -
-
--f
-

Specify the bit fill order to use in writing output data. -By default, tiffdither -will create a new file with the same fill order as the original. -Specifying --f lsb2msb will force data to be written with the -FillOrder tag set to LSB2MSB, while --f msb2lsb will force data to be written with the -FillOrder tag set to MSB2LSB.

-
- -
-
--r
-

Make each strip have no more than the given number of rows.

-
- -
-
--t
-

Set the threshold value for dithering. -By default the threshold value is 128.

-
- -
-
-

Notes

-

The dither algorithm is taken from the tiffmedian -program (written by Paul Heckbert).

-
-
-

See also

-

pal2rgb (1), -fax2tiff (1), -tiffinfo (1), -tiffcp (1), -tiff2bw (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffdump.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffdump.html deleted file mode 100644 index 03a9fcb..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffdump.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - tiffdump — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffdump

-
-

Synopsis

-

tiffdump [ options ] name …

-
-
-

Description

-

tiffdump displays directory information from files created according -to the Tag Image File Format, Revision 6.0. -The header of each TIFF file (magic number, version, and first directory offset) -is displayed, followed by the tag contents of each directory in the file. -For each tag, the name, data type, count, and value(s) is displayed. -When the symbolic name for a tag or data type is known, the symbolic -name is displayed followed by it's numeric (decimal) value. -Tag values are displayed enclosed in <> characters immediately -preceded by the value of the count field. -For example, an ImageWidth -tag might be displayed as ImageWidth (256) SHORT (3) 1<800>.

-

tiffdump is particularly useful for investigating the contents of -TIFF files that libtiff does not understand.

-
-
-

Options

-
-
--h
-

Force numeric data to be printed in hexadecimal rather than the -default decimal.

-
- -
-
--m items
-

Change the number of indirect data items that are printed. By default, this -will be 24.

-
- -
-
--o offset
-

Dump the contents of the IFD at the a particular file offset. -The file offset may be specified using the usual C-style syntax; -i.e. a leading 0x for hexadecimal and a leading 0 for octal.

-
- -
-
-

See also

-

tiffinfo (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffgt.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffgt.html deleted file mode 100644 index 4526198..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffgt.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - - tiffgt — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffgt

-
-

Synopsis

-

tiffgt [ options ] input.tif …

-
-
-

Description

-

tiffgt displays one or more images stored using the -Tag Image File Format, Revision 6.0.

-

tiffgt correctly handles files with any of the following characteristics:

-
-
- ---- - - - - - - - - - - - - - - - - - - - - - - -
Supported tag values

Tag

Value

BitsPerSample

1, 2, 4, 8, 16

SamplesPerPixel

1, 3, 4 (the 4th sample is ignored)

PhotometricInterpretation

0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr)

PlanarConfiguration

1 (contiguous), 2 (separate)

Orientation

1 (top-left), 4 (bottom-left)

-
-

Data may be organized as strips or tiles and may be -compressed with any of the compression algorithms supported -by the libtiff library.

-

For palette images (PhotometricInterpretation=3), tiffgt -inspects the colormap values and assumes either 16-bit -or 8-bit values according to the maximum value. -That is, if no colormap entry greater than 255 is found, -tiffgt assumes the colormap has only 8-bit values; otherwise -it assumes 16-bit values. -This inspection is done to handle old images written by -previous (incorrect) versions of -libtiff.

-

tiffgt can be used to display multiple images one-at-a-time. -The left mouse button switches the display to the first image in the -next file in the list of files specified on the command line. -The right mouse button switches to the first image in the -previous file in the list. -The middle mouse button causes the first image in the first file -specified on the command line to be displayed. -In addition the following keyboard commands are recognized:

-
-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Action keys

Key

Description

b

Use a PhotometricInterpretation -of MinIsBlack in displaying the current image

l

Use a FillOrder of lsb-to-msb in decoding the current image

m

Use a FillOrder of msb-to-lsb in decoding the current image

c

Use a colormap visual to display the current image

r

Use a true color (24-bit RGB) visual to display the current image

w

Use a PhotometricInterpretation of MinIsWhite in displaying -the current image

W

Toggle (enable/disable) display of warning messages from the -TIFF library when decoding images

E

Toggle (enable/disable) display of error messages from the -TIFF library when decoding images.

z

Reset all parameters to their default settings (FillOrder, -PhotometricInterpretation, handling of warnings and errors)

PageUp

Display the previous image in the current file or the last -image in the previous file

PageDown

Display the next image in the current file or the first image -in the next file

Home

Display the first image in the current file

End

Display the last image in the current file (unimplemented)

-
-
-
-

Options

-
-
--c
-

Force image display in a colormap window.

-
- -
-
--d
-

Specify an image to display by directory number. -By default the first image in the file is displayed. -Directories are numbered starting at zero.

-
- -
-
--e
-

Enable reporting of error messages from the TIFF library. -By default tiffgt silently ignores images that cannot be read.

-
- -
-
--f
-

Force tiffgt to run as a foreground process. -By default tiffgt will place itself in the background once it -has opened the requested image file.

-
- -
-
--l
-

Force the presumed bit ordering to be LSB to MSB.

-
- -
-
--m
-

Force the presumed bit ordering to be MSB to LSB.

-
- -
-
--o
-

Specify an image to display by directory offset. -By default the first image in the file is displayed. -Directories offsets may be specified using C-style syntax; -i.e. a leading 0x for hexadecimal and a leading 0 for octal.

-
- -
-
--p
-

Override the value of the PhotometricInterpretation -tag; the parameter may be one of: miniswhite , -minisblack, rgb, palette, mask, -separated, ycbcr, and cielab.

-
- -
-
--r
-

Force image display in a full color window.

-
- -
-
--s
-

Stop on the first read error. -By default all errors in the input data are ignored and -tiffgt -does it's best to display as much of an image as possible.

-
- -
-
--w
-

Enable reporting of warning messages from the TIFF library. -By default tiffgt -ignores warning messages generated when reading an image.

-
- -
-
--v
-

Place information in the title bar describing -what type of window (full color or colormap) is being -used, the name of the input file, and the directory -index of the image (if non-zero). -By default, the window type is not shown in the title bar.

-
- -
-
-

Bugs

-

Images wider and taller than the display are silently truncated to avoid -crashing old versions of the window manager.

-
-
-

See also

-

tiffdump (1), -tiffinfo (1), -tiffcp (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffinfo.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffinfo.html deleted file mode 100644 index 3e60f2a..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffinfo.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - tiffinfo — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffinfo

-
-

Synopsis

-

tiffinfo [ options ] input.tif …

-
-
-

Description

-

tiffinfo displays information about files created according -to the Tag Image File Format, Revision 6.0. By default, the contents of -each TIFF directory in each file are displayed, with the value of each -tag shown symbolically (where sensible).

-
-
-

Options

-
-
--c
-

Display the colormap and color/gray response curves, if present.

-
- -
-
--D
-

In addition to displaying the directory tags, -read and decompress all the data in each image (but not display it).

-
- -
-
--d
-

In addition to displaying the directory tags, -print each byte of decompressed data in hexadecimal.

-
- -
-
--j
-

Display any JPEG-related tags that are present.

-
- -
-
--o
-

Set the initial TIFF directory according to the specified file offset. -The file offset may be specified using the usual C-style syntax; -i.e. a leading 0x for hexadecimal and a leading 0 for octal.

-
- -
-
--s
-

Display the offsets and byte counts for each data strip in a directory.

-
- -
-
--z
-

Enable strip chopping when reading image data.

-
- -
-
--#
-

Set the initial TIFF directory to #.

-
- -
-
--W
-

Warn about unknown tags.

-
- -
-
-

See also

-

pal2rgb, -tiffcp, -tiffcmp, -tiffmedian, -libtiff

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffmedian.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffmedian.html deleted file mode 100644 index 680bff5..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffmedian.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - tiffmedian — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffmedian

-
-

Synopsis

-

tiffmedian [ options ] input.tif output.tif

-
-
-

Description

-

tiffmedian applies the median cut algorithm to an RGB -image in input.tif to generate a palette image that is written to -output.tif. The generated colormap has, by default, 256 entries. -The image data is quantized by mapping each pixel to the closest color -values in the colormap.

-
-
-

Options

-
-
--c
-

Specify the compression to use for data written to the output file: --c none for no compression, --c packbits for PackBits compression, --c lzw for Lempel-Ziv & Welch compression, --c zip for Deflate compression.

-

By default tiffmedian will compress data according to the -value of the Compression tag found in the source file.

-

LZW compression can be specified together with a predictor value. -A predictor value of 2 causes each scanline of the output image to -undergo horizontal differencing before it is encoded; a value of 1 -forces each scanline to be encoded without differencing. -LZW-specific options are specified by appending a :-separated -list to the lzw option; e.g. -c lzw:2 for LZW compression -with horizontal differencing.

-
- -
-
--C
-

Specify the number of entries to use in the generated colormap. -By default all 256 entries/colors are used.

-
- -
-
--f
-

Apply Floyd-Steinberg dithering before selecting a colormap entry.

-
- -
-
--r
-

Specify the number of rows (scanlines) in each strip of data -written to the output file. By default, tiffmedian -attempts to set the rows/strip that no more than 8 kilobytes of -data appear in a strip.

-
- -
-
-

Notes

-

This program is derived from Paul Heckbert's median program.

-
-
-

See also

-

pal2rgb (1), -tiffinfo (1), -tiffcp (1), -tiffcmp (1), -libtiff (3tiff),

-

"Color Image Quantization for Frame Buffer Display", -Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffset.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffset.html deleted file mode 100644 index 70d3b49..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffset.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - tiffset — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffset

-
-

Synopsis

-

tiffset [ options ] filename.tif

-
-
-

Description

-

tiffset sets the value of a TIFF header to a specified value -or removes an existing setting.

-
-
-

Options

-
-
--d dirnumber
-

Change the current directory (starting at 0).

-
- -
-
--s tagnumber [ count ] value …
-

Set the value of the named tag to the value or values specified.

-
- -
-
--sd diroffset
-

Change the current directory by offset.

-
- -
-
--sf tagnumber filename
-

Set the value of the tag to the contents of filename. This option is -supported for ASCII tags only.

-
- -
-
--u tagnumber
-

Unset the tag.

-
- -
-
-

Examples

-

The following example sets the image description tag (270) of a.tif to -the contents of the file descrip:

-
tiffset -sf 270 descrip a.tif
-
-
-

The following example sets the artist tag (315) of a.tif to the string -Anonymous:

-
tiffset -s 315 Anonymous a.tif
-
-
-

This example sets the resolution of the file a.tif to 300 dpi:

-
tiffset -s 296 2 a.tif
-tiffset -s 282 300.0 a.tif
-tiffset -s 283 300.0 a.tif
-
-
-

Set the photometric interpretation of the third page of a.tif to -min-is-black (ie. inverts it):

-
tiffset -d 2 -s 262 1 a.tif
-
-
-
-
-

See also

-

tiffdump (1), -tiffinfo (1), -tiffcp (1), -libtiff (3tiff)

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/html-prebuilt/tools/tiffsplit.html b/third_party/libtiff/doc/html-prebuilt/tools/tiffsplit.html deleted file mode 100644 index 4127233..0000000 --- a/third_party/libtiff/doc/html-prebuilt/tools/tiffsplit.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - tiffsplit — LibTIFF 4.7.1 documentation - - - - - - - - - - - - -
-
-
-
- -
-

tiffsplit

-
-

Synopsis

-

tiffsplit src.tif [ prefix ]

-
-
-

Description

-

tiffsplit takes a multi-directory (page) TIFF -file and creates one or more single-directory (page) TIFF -files from it. -The output files are given names created by concatenating -a prefix, a lexically ordered suffix in the range [aaa--zzz], -the suffix .tif -(e.g. xaaa.tif, xaab.tif, …, xzzz.tif). -If a prefix is not specified on the command line, the default prefix of -x is used.

-
-
-

Options

-

None.

-
-
-

Exit status

-

tiffsplit exits with one of the following values:

-

0:

-
-

Success

-
-

1:

-
-

An error occurred either reading the input or writing results.

-
-
-
-

Bugs

-

Only a select set of "known tags" are copied when splitting.

-
-
-

See also

-

tiffcp (1), -tiffinfo (1), -libtiff (3tiff),

-
-
- - -
-
-
-
- -
-
- - - - \ No newline at end of file diff --git a/third_party/libtiff/doc/images.rst b/third_party/libtiff/doc/images.rst deleted file mode 100644 index fe34287..0000000 --- a/third_party/libtiff/doc/images.rst +++ /dev/null @@ -1,23 +0,0 @@ -TIFF Test Images -################ - -.. image:: images/bali.jpg - :width: 158 - :alt: bali - - -Test images are available for most formats supported by the library. -Most of the images included in the test kit are also part of this -documentation (albeit in TIFF rather than GIF or JFIF). -The images are kept in a separate archive that should be located in -the same directory as this software. - -The latest archive of test images is located at -``_, -or at ``_. - -There are two other good sources for TIFF test images: -the contributed software :file:`contrib/dbs` includes several -programs that generate test images suitable for debugging, and -the :program:`tiffcp` program can be used to generate a variety -of images with different storage characteristics. diff --git a/third_party/libtiff/doc/images/back.gif b/third_party/libtiff/doc/images/back.gif deleted file mode 100644 index 11d0c35f4671f6086d992776c7521efef880e914..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1000 zcmW-gKWN_t5XGNTq-cg9Ar)LgJSnMm(7^~n2LtBPLMf#uf;dDfV&p`m?p24{>frr~ zj#5jgaPU*9dUG`BP%BCY|D16tMMZQGTts+&^S$x7d+*@$Zf*VXhnF|zFo)l;R{|*D zKmY|az_BX=6}TV-C1?T1QBkPE6`?3aD>&|pLmlo2M>*QTQB(pN@IVAA&;gE4QqY1I zqELk{aI}|(HoOsyYIK9+O+qN)L=Z(Z!M#IGU@LiP$p$s=4DY6KAgm0ih7bV{dodS`T2XLqs_Okpb1nZYb( zGszsnGUQ^2z(9KdJ1`t@4P+n`p$c6X!Vi zYS4obtY8N@CP0c>^kNjN*hP-9kft`h8O>^TlVer}|G{cd9R!Bip*__7dmpg(3)ue+ z{`%?P<&PIWfBm*QCRcvQ_jk_D-re{7^Y*1LpE$5IdH%T<-kiQMyY%RPYggxYE=-Tt zV;7%2x^lkeUpuY0-@1Qh@!;j%bCZqx7M34)dH2SJUv~~~UpzCre*NaL6DN*MCi`aY z+V|G&fhqGaP`COGkWCYXVa~7tKVMnqX(W`jHzDUmFbH=%iJrQ z1LZ>t>ys`0;;DyTI`ZK5rN3{kZ~ne^_SDw3(?5Rt!L|36Hm>f@T>tabcaN-07FRdF R{^R?Pp8n+BUk)u`<$t1E;KBd^ diff --git a/third_party/libtiff/doc/images/bali.jpg b/third_party/libtiff/doc/images/bali.jpg deleted file mode 100644 index 1f5c146dd5ed78b6f0f227773214b78aecd57c81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26152 zcmbrlcTiJZ_%(_Z>C!uSm8SHLBIQLC1O%jaBApOI5dr}MQIy_ZsnSJ+&_WM2f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K0uXyl{@)W=B;(_g3wfTu-)I6|1@D{>$bu5$e~Zq zHd7cJD~6-;rh?(ZllMbf$Ql$sa-9shh7vsMTRX#p6H=c!3_sSY*gkT+zz22K3rJ2= zDa6o@BuoraXF1|4X6YxV;B!}NB4p5$l7wb!zM!On75nNLVB7(}&=@@Co`EAPft%{B z3)?2+!ZhfDLmB=t?NsgS3huGiX3vAivhz2F_L*Lk{^kBEPxs}}=5c&_wK}f`1YGa? zx|&i;XkxDv#bcf))Fi<6>X^$+tQ(#RHYSD}4qrr*yYu!y-qs2e==13dFzN84C~$29 zI(dtDd7M^EXlWJ|5uB%fibJydtWa%^wEzIr!w@lr-X<-g>|DX&0vF$k0-#0vK^lc@ zUcv{Rw7 MpU}Qe9|!pSAJtj5%m4rY diff --git a/third_party/libtiff/doc/images/cover.jpg b/third_party/libtiff/doc/images/cover.jpg deleted file mode 100644 index 8698cfb064736d498501de801fcd727b8952bd3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20189 zcmbq)c{p3&|EE?}Rq?T}r5kFmU9F#1?IpD@L8@wrG?t>Gf-b~POGT}z5=%)_`yM4h zOHo_wOQNWtlGc(EF~0MgXJ(%HYo3{NpYz9k?z!)KU-z8*US99_Ii5ORV)@6?)WVeI z)F~F0Qzr+@@hpq+$=Uy3`;U?tFjtMMMC-2Gj zU$R;LM>}{mhr)SkaCK6mwYO_!kE2=$u!gU2s8&I<{Ph>A(e$X=I|*U;3`*14%`e8EgJm zZbub-@Ob3B&@~N`H0?jo{yVb&J76#VpOF1eVE+r(49f-9Qzw(h%FANJa?E0MaQ*$W z^Kxd_cmVYd!JtT<0fj5Bxb?-Nkd zkK?L&zq0qkxrxDdRD`?42yUb;G86`MG}Ej;GcPvLG=IfeDOXjw6yBcchH1E*SM&4) zqNmypuZI`8ki1UoSFjv~AH6d2t%^Mj2U0t?IIFDQ&zO;XCKY$FtTL&STv{DfFjuIC zPFRPsKh(+UuZps!`N#UhHXZ0k>Dn8!7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z!d5Bz+pIq~zd(ELj$f-Fao(0pu7YSnReAX`A)`+e)Q(&DOL)v~WV?Vf>zsjvH;`PB z<>x#8EqVXy5l(>4EpuUdvGQ@5$k3j(ZhTt|>`0YZO-`LuJgV*J?Y#Zo!E-47&m~|6Q|cc*Gq}$<@7R$qw6e4C*+{mhian7or#Bq_5J1x- zPP|axOnww+*SzNp>b!-CIspmWzIQA%pXQ#B#!AeR-5tLBS+2WcX$`g@D8I%z*I7 z9`EH)qkDeR+ErZgx#@?8Dn%71bDDHyBOE>qf76*9=+f!hLV}EG^=d#gifF7rNJ8h~ zr`Q+?2o&YRR_H42(kcOr2TzU(0%#*ph&M%CQGL zq!$)6cae{~@%1z~Cgu?YZ<`5jAP)^usB~5D6*_A^DUmsbi&PE8!S;bLC1}Gb2^&2% zc|g%c-ZTJzE-_nGc5zIq*q%$Of5}w^`>Txi(kqpdEm^7cWy;^@67uE|OKTO%C?4@uCcusOpqD z%X!6wd3|Z9%U2PpJrLfls>~{UjE5LA+s9FqAs?$rqz+9FF3%?93VoV%Ak_A*u*EES z=AEkAf#>dCs}G2!AlcC(3E2g0PJbm$lFSB?k{3a=;ZDgUpvzwmi!th3um9(DxOoCl zj`q^Ly0g+$)C>mfMD4sh(colCh8zxX3P+clj`K8fM?9jVNL?>#;jMSnEb^HWFN5-J zCDDAB#|!AP@u$8oj34wa3#4AR>COsFRD98oJO6;YNngist%S%JxuUL#vtK0ZfMcHO wS+tU~3$H+5{zA2v!4ZHEnyAs8Ak`_RI|NiKCpxVm>HJCI?)7ds0I>i604;+5C;$Ke diff --git a/third_party/libtiff/doc/images/dave.gif b/third_party/libtiff/doc/images/dave.gif deleted file mode 100644 index c36d447772a630e171de8e8fad5e7ce2cc1cf98e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8220 zcmWle`#;l<<40e6Z5TE-=924N=5FRL#N4ScaxF5~+#7NYZSL2QOD?Iot0YQMq`6B- z$SrcebWs$g(%#?C_xuOX-_G-KE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jjs<1DiF3NG zHP3SC=jDAjw=H?8Zym@LN_pLVKb31SBlcp|T>YI(yT&I*{62iHHoWEY7hhC?w`|CI z+vRUsak8hH>9}8%HyR+d?$Vn+7?5c)K~uGOHkncKs3`iDb61H=)kv;-`pJ0cSA~VC zIctskCzpcQ-~X8!Qpdynus)Dl-H9xj2x{k|U#i~}i|~iN`YG2S@`dN)^G;Dk0!u*z z3qqIi2lcYuv!UU<^KYbYll^+!{V#^jO{_jStoj|e8}Uu|ZKOf8uT&{CTKN3pmQ4E# zPdDGhJeOymKUB6Zi++d^Uzpfxe)8hg*)SSg#~9+0PX9+_aM0`Mp}@4m$20{%HK=Pf zwf?Y63V%8K+@BBjGeJ1^+;DHb#f1Z=PI1FkkJK8?1ucPJFN0pJs-L;FdD9@SJ^g(W zh0}de`7-(UBTlh3EtUCx##BeCZS#KmwHIsq&C#QF$S?eJ3rk&Hkgiqa&v^CseZk|) z8M)r!o$2kL*TyvsKDx&QLg@p9lZ8~sA(t8bW_v5)ryNzSYg HK=1zmtoJ7? diff --git a/third_party/libtiff/doc/images/info.gif b/third_party/libtiff/doc/images/info.gif deleted file mode 100644 index 783d63153ec9268f7e17f3887a844c2a8741e3ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131 zcmZ?wbhEHbRA5kG_{hMJl$4Z^knsQie+GtUia%Kx8Gt|sM1bTOnL=9nSDt>$zj%&F zZ+E`$&d0nJj~sf{IOnFX>g(4$lFfWt?d~d{b^7T#FEq2Z&FGFqlI!W hi^EyjTy^5q9{u&HSRnS|fz|5kZ?^q@tHHov4FK7YGsge` diff --git a/third_party/libtiff/doc/images/jello.jpg b/third_party/libtiff/doc/images/jello.jpg deleted file mode 100644 index df99e663ef3b35d30b6031435bb3e3d6d57faeab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13744 zcmbVzdpy&9`1f}vL$VIK+iEsN>6}A{jm@Y#r^=-h0&m8Ao^ zb4)^Nql3v5g{Vz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#9r+!{9W+rh1;{;Bnz=fksKUGs* z(@@VCwB%P#n8ljrIP@#7fzjVEy>hbHXJX_8F4pAHu{bm1aZQ8 zOrJC4c?z3@)jua}uORJ?=0*8|jzY+20-X)_#}43>Sd>^)?hvhYIB^>@`|ZC0&ugv6 diff --git a/third_party/libtiff/doc/images/jim.gif b/third_party/libtiff/doc/images/jim.gif deleted file mode 100644 index 9a18a031fac72973e00b7fee7055774cbc6a43f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14493 zcmWlgc{r5q`^KN=nUxu1hMBQ5#$fDY4N1?~w=~uyX$HwwO+qTwGsaFrk|K>YmFyM0 z)jNYMrCy}cJ|t<^uHHA_U%%`B`;Y6okK??L>vNvBx38C@lb{$l2Yds7yu3WISlry) z+|<lbuU}tBSm6f%3@7~(l+M1f0-rnBs?(X8^;(~&LprD|@z(5j-q^PK9 zWMsr*u`DbsOifMCo;`c!%$b;&m@Qkj&}cMORn_wH^3u{$TU*=2#Kidccn=ScjT<+H zg@rMhOa_Ai!?25sOG870mX?;LreW&>dGBPqcIy(IQ{SgGIuC8XY*_$_S=5RO^ z3Pn#(&&kQDt*!0!>C?Kpx@u}_$BrG-(a|vn{?z~X;)z{>>CN8e-y_;|x1Dg&HSsY# zGq}t7{AfzX*w$Tv=V_L={O9(W8Fm#8UZ_}mv1>G7q%f@ic;IcTPr(O*qavbn1ZHam zYaNRUdL%C6Sa#Al}M~ zY0sjtO>p$;qDb?d#Wm$?o69SvU8;^(tu=bQf(=t-K3m^t_Es?^*3G{K(uURz_h!L1KvMtrbO%oVq=!a`avSgz?h0fEivn>V_U} z)sc-`{zgMvo%&wJ4wEpZq5M&VDZbLZju&_v=H!-gdC#u%|HMXR0ZlRPn4q9MR6 zk{Pgh9%z~|AKg0OzP*cZP?=pLo6W|!x&p1=r0&JqRG&3<=sORcNT!X6Zd)%rY&>qW zvDy(B7{&xN*@TS>X5p?FlVC~pTBcj#LCfgTbDJh`5s%_tOHf1(2S8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SH{D!t}5e7;<~^%J;1s2+H_r`s8>xFM zCrI^7B7<<`f@2DdSoawovSDDp_WZL;rB_%WUmo_}+$esS+#)v~R$ z^ViAwj#7ci)UDs9QN6?jg?O)?lC@ErL%o)&XZbjH4_*jIe+WP|Np$w> zYe-bxtq(N3DQGW!>3#C{PUgLAWe>yV)9+s?6M5nTjxf43O@wzy6$NS`$HpeFIN4m@ zUORMi3+eflfCRVC1Y80!l|A?nBXD+Vt2gvc1!NnSv?>CozPa1OKklfV(rxmLbj%Fd z!yspC@PX6juxg&Vs_}vZF47v6E$Qih%dbHt=2`~eHfm&~nP?bsoc?+$U9z4y#X2gN z6st$bH&O<#_EX+)w_5T4{1<>jA5mpkX$J5>YZOkgh9No`h03gnyy1s~wJ4+T3R)Wg zCHKBz_%lvQ3v0Ba;oIX;cfPVldKV9`hfQjfw_$A!q<%ptr7_BZ17?0eX`!u=?2asXFG$OeFURoyJQ}EcSujreJ zo2TKrSBPfDS2QE*5n~2)%o=o7!hu4y<{SirfUzuOgJcA3kP1Adt2q_eK3G8lkWvYR zEZ|TZ3S_8g=$7EG4`LHeZho%}s+R=vLUCIMuh)j>3u~^#%>=a7(03@#*Gl~}QT-AR z=LkH(TIDuS_!(xZ1yUUOx z<|OoIgD{z2yHwF2_&Lg9-8Vy=d;8Ot6q5UW) diff --git a/third_party/libtiff/doc/images/note.gif b/third_party/libtiff/doc/images/note.gif deleted file mode 100644 index 7177d68a19ff69dadbbc166fe9386fdff45bcba4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmZ?wbh9u|RA5kG_{`4$1Px%^0Hzv%yao_BaNxjyp!k1=|6mG816e?z0~7@6RA69c z*(-3;b2Y2P?X%hj3LGU%#OEbPGM&?0HAPI?FIHNU$EI7SR^tZCh6lDalJnP{c%tfj zYU;+Dhqo43+$}k^sVh!<)yD3_4u_+kJ(tRQYGGX{n6Z1R^~WzaRIPXx*%w87O4c#g zi#Ihf)b)0VS9LKk_w^f2oH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q5MKF1^;fY4x=h5W)El2}e~V${A;*#BY0Sm)FhEz03c z)uH&!d3eVdc*(@kx>lTznyzt*CuZS(!PgB#SNYE=*8viae;Y-(TK?( zvH%)`%F#_J7e^_>-N~I)hE8~fU`*MPoq?`W#>*|ml4Rat{`|!u&3o+)gX;a=C}_vz z?A^>wdb`k$`JJ`ssNd+w3;K=OQ5N7$R^Z{d-vEB#k&EEHVBk*HWK2uo2maqs2H^?5 z-xl8B0&d~{EshH=;GiA3ORM1u9^eY@;h+t-uMjgc)8a1v;xHcLGCt$#z&22L-wI^N z*R99FGBEgtX08p;Qe4>H~vrdd2eG-MM(*pezUI8-e!jXuz?6H*4(wIaVX{Zq z#6%XOA-Cus?ja$zqVV_L+!&9F5x-A@Js_>99|GX#KQu9GQYM_I0A}xv%*^&k5>F5n zCS8IdU_X0Gt%BZU?S39h6h-FWt>#ycC)AjV3iFNuLnNopD*_{n5N+oPcuJ5z`w7GI zwE%S~5HN^njJc99T|Ob}A^No>{GNx}rN7d=f=M)gFbRP6&d(ibUoN^>higy!*3W{L zG)}{!A1@zKC5TB+vi!xgNWy~li~gh@pijin0gJ%F9em6kfdJbW^4jOZ{?#8&dWo3K za3hYn|BIO-5K!b~)iP=4=G}iV6vt8HFp43F0=v8`Cfm4bvkjf$yI^4*=eJ=6ISynJ ziEuEJ2&nQYZ6Xy-rc;@%M!i&RQ=!O0&1ZC4y*^*DY^_+|SeC*4$Z7*artw<;-8!<6`8?Och>q1M21e&zI^)FC9L#7f&+x{+5tGokKns_5&I!j zI15@vcNYCAl=u&0K8X|ASz)LTL4k@O7otpwttGp449mSUhpk-6k_Bxt{I~PsQGF*9 vb~9CzlEVTBlHxm6b7{wmKqVSgS=DRDPA#hv6^oQ=yR6xK;p2L?QUm}ynrck% diff --git a/third_party/libtiff/doc/images/quad.jpg b/third_party/libtiff/doc/images/quad.jpg deleted file mode 100644 index 4b7df170beb5da5b9be8b5d00efe19c9d9f4435c..0000000000000000000000000000000000000000 GIT binary patch literal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D5ZwNVQ^HH3?3T~grb{jjv9?R6q9?kPLyK=-&U5Q!QgONbrpuo z@OWGf9xb@x@OXMyYB6tC)haNBG~ZUEuTy74@fN?~tLU{q4(nQ`g{Z=JLw}>+T0_9=o-iE3-Pm7(4>e#CXK0lQ1Pwyl<bWGW^;(lpJhw8*J;aht zG^}1prIDnOZFoMB$7!am6A(D dl3FB|$S9(ULl-~i`h7jAD58K0D58Kr|Jfk5D3bsH diff --git a/third_party/libtiff/doc/images/ring.gif b/third_party/libtiff/doc/images/ring.gif deleted file mode 100644 index 2a614f4929e4cfbc14e656f576e320e1ee601e45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4275 zcmWO2i9geg1Hkd`cQ>1v``9qUa>d5xJ~rnhn)^u1eLgiRMJo4w-=vx=x+7Vb`3Hu8@s6# zu?;@C1AWnKY`14)`iBoZcnr2P|5#f5u?kS#VN-tp3?=RyAya>|jrQ!{A!-(cif>JV zjW3~V36fh!<;&lrvX({u*qV6lYC7y0d``y>-vhcwf%pxnux;Y&OE85WQTu)!mRvs_ zC;JV&{p2~cdB4Z5_J4%`BuRiRVvkYGWogS7jWxxM$CzB6YCUn_rtj_9;_;@L#rVFA z)8OREZsi+^_c6=T_w%y_*3C(ZDN9+*%|uWhkHv~+W@TaV^5A)ttR)GeXrZBQ0VBzo z3!B7Twj-k@RA3q!ie|Fn09H6`ACYQkpsS;!rKw4$(;f`qa03JVn!Vk+1_o53uQ3`A zh{q|l$S6pl$vjsR&=M98w-lGZP1d7!_THz786lDS+WWWmtE#H)s9}EXsco-44`!|< zg9Nek=j_;Mxoinz$%x{$#$*MECFJycyz0Y3A+r^~?djlQtb%gTtnV}$(huGAU5)1R znD7fyaVu}e@9x{nxJ>&6YM%zOhNN@|59S!_Lkfx#@lEehR`x|=N^EZdd!s2I-{U^T z)hP0}I45#$BYm*z=Id^5;ARX?l7p7k&$SYC&W{vaLlam64mgs9HIL(NW)oF~L0Q0T zEYM2fmcJNgqS{3_z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/smallliz.jpg b/third_party/libtiff/doc/images/smallliz.jpg deleted file mode 100644 index 8eb827f8ad56ff57e9324c5e2fcd07947aca0c49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16463 zcmbuFXHXPT*XIWTQ2`NJMFg`&9q>+}rn@|2_Bf_iKP>YD%g~02~|u0O#KUxL*V) z{JZ-9YyUCw|7YRf)Azptq>lif0H1Jim;nz+ad1g-?)v~t|K1b-zib2kSHpRLi--S^ z;L+nJg#S7;JOezy!Nq-mhl`Johxe~{(7*ctJW_nJmx6B}l51HIFuOk&`kYkoh(*4p zn?idM#VTy+5&HNEB^5OdEgL%rCl|MfsF=8fq?E!tMI~hwRW%)5J$(a1BV#LT8(TYj zu!E`yve}A(70{cI>NdIv?z{A7E zBlr&&&I8|nCoU--{!77!WN)`!Kn{TA??8>s&97>Ozk|ZN=6|RZM=L*`!=aQv z9+%zwb)2suza?(?`=bF#{RZg-hl?QejpG0wqZpn>2B_X*VJlKo=4G1wiz0)K_>N?nf;Bmn6adQ79*_5< zFZr}z^Qd8*ZIBX4%&mQ-F`o2f@3w=DHlmOzp7e*T;>&t;Z^u-vDgs~3xgZ+RVktyI zCcA%~W<|K79!Q~l{ zp3ny7Q9E?q2(I`%VW-soE8ifG9a?B#T)gN2^Jsc^{8XXdQ~UUeARgMBqeU1-k=A~uKIaEyYFLX6=)Gw zd>E7~v2Y`m)Ns4oLmCrPUs$1;<*{2m;a*MZmPbHH#BLLw0IM0BE>v?+pUG+UO8$`S zs_eC#y}Xx@-34ZXr}TrL-#tPZ-vewLi=Q+WBkkWMno!#i)5ClegU^a8(xFLdZWXyd zI{8rBU+Zr{s&mKuuIMsDP|o}jyNBtfhtWvh&x4H`Ng1eZmtHV4_95!ue(@sW_wC|Z^7GGMuH$)N zA}!w4)F$(Wef$OYfUnZ;#q{Op{6}rUr2I5LVgy`9H8WGb+2N?A;a41J*rP`DX58G4arFj1&-M$RYhk7em$o8pI!&zovwWHttt7c`&INu2i5O_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L`&0_w-G&jFvsj#%~*kXUL`iE(gKJ<)3)AFOot&@Wd&mfkf z?v#bZGpw^r7s_i!09T+Aj&*TqABl*VvJmPPjucI*8TI1G&pCQ01qR2$HRKo`+eE$; zneQJS751xM?9MHLU7$0==w=#X@0_p#v4up=EB&r3!WF$bO46C*T<8PSa0d(B^&Cp( zHwU1iF9YE8@cyX|176wO77VaO3eRmfivGA|76dYh8hTVj1CwGw$ZyRxh+St*pevsxV9$f(k^y~+s4QJTA_N>9qvy4)8&5Ome2*T~6ZkAGYX{IIYh+bgMrY{@nwNXxjxg|0!i-1gZ6F^^i+4Cgx_qnWaXe~Xwc zUYg@YBPYCD%Q&xg74Dw%*06hWxj;CYSV-Y}Y5vC=6nG52pU-9&xnJFcBFF_PfwT96 zSoLq_FAZ9ZEEn8JG%mDUXg&lk={-}mJ5=Cna{48dd$CaUB)L47eSf_8+kpO45=T|9 zxW=g9K_5x+j)ms%6U3AJ+h4q|Q*x%(jVUD@Dy}4qY+4=SuHSTEtc8!919brX)abhFc!k^ch^tCh5%;9?5-CpS#4a*FCAJ zXP?J-hJUsJx%LA;jC6^rZ60&YDE67{*5(~!7OSCQj=hqwqW>ywB5p~+# zUn34oW0`%mIWpU~K4;d-2iA^GbUmJ| V9|w>FnA)HW1c~_VCk_EP{x9Pz_gw%0 diff --git a/third_party/libtiff/doc/images/warning.gif b/third_party/libtiff/doc/images/warning.gif deleted file mode 100644 index f51eb4b1a7b7f392b183e183ec2d93aab7d3090b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 287 zcmV+)0pR{eNk%w1VJHA70P+9;=jZ2cZf?H5zWe|H{{R300000000000A^8LW00062 zEC2ui04M+`000Bz2)f+N_DFSAmXsV{#*oJWIwOJ|OFii%yF#J7% z?sfYSfViQp$QksMJQ>pGyg`|rs_Ys=7BN zq^_xzt7fP!iL*hxLbX0Icy*7uWw0Hxn;d(N$#=tpw8qOJ%GF%XpIE=t$i1gmKjY-( l=I2P+=`_ - Mailing List `tiff@lists.osgeo.org `_ - List subscription http://lists.osgeo.org/mailman/listinfo/tiff/ - Source repository https://gitlab.com/libtiff/libtiff - ===================== ===================================== - -The LibTIFF software provides support for the *Tag Image File Format* (TIFF), -a widely used format for storing image data. The latest version of -the TIFF specification is :doc:`specification/index`. - -Included in this software distribution are: - -* a library, :file:`libtiff`, for reading and writing TIFF images -* a small collection of tools for performing simple manipulations of TIFF images -* documentation for the library and tools. - -The :file:`libtiff` library, along with associated tool programs, should handle most of -your needs for reading and writing TIFF images. - -LibTIFF is portable software, supported on various operating systems including -UNIX (Linux, BSD, MacOS X) and Windows. - -.. note:: - - At libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset) has been moved to archive/ directory - and was not built. - tiff2ps and tiff2pdf source code has been moved in a unsupported category, - no longer built by default, but were still part of the the source - distribution. - - With libtiff v4.7.0 those tools were restored. - - -The following sections are included in this documentation: - -.. toctree:: - :maxdepth: 2 - :titlesonly: - - specification/index - images - build - terms - libtiff - multi_page - functions - internals - addingtags - tools - contrib - rfcs/index - project/index - releases/index diff --git a/third_party/libtiff/doc/internals.rst b/third_party/libtiff/doc/internals.rst deleted file mode 100644 index 8a49776..0000000 --- a/third_party/libtiff/doc/internals.rst +++ /dev/null @@ -1,426 +0,0 @@ -Modifying The TIFF Library -========================== - -.. image:: images/dave.gif - :width: 107 - :alt: dave - -This chapter provides information about the internal structure of -the library, how to control the configuration when building it, and -how to add new support to the library. -The following sections are found in this chapter: - -Library Configuration ---------------------- - -Information on compiling the library is given :doc:`build` -elsewhere in this documentation. -This section describes the low-level mechanisms used to control -the optional parts of the library that are configured at build -time. Control is based on -a collection of C defines that are specified either on the compiler -command line or in a configuration file such as :file:`port.h` -(as generated by the :program:`configure` script for UNIX systems) -or :file:`tiffconf.h`. - -Configuration defines are split into three areas: - -* those that control which compression schemes are - configured as part of the builtin codecs, -* those that control support for groups of tags that - are considered optional, and -* those that control operating system or machine-specific support. - -If the define :c:macro:`COMPRESSION_SUPPORT` is **not defined** -then a default set of compression schemes is automatically -configured: - -* CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771), -* the Macintosh PackBits algorithm (compression 32773), -* a 4-bit run-length encoding scheme from ThunderScan (compression 32809), -* a 2-bit encoding scheme used by NeXT (compression 32766), and -* two experimental schemes intended for images with high dynamic range - (compression 34676 and 34677). - -To override the default compression behaviour define -:c:macro:`COMPRESSION_SUPPORT` and then one or more additional defines -to enable configuration of the appropriate codecs (see the table -below); e.g. - -.. highlight:: c - -:: - - #define COMPRESSION_SUPPORT - #define CCITT_SUPPORT - #define PACKBITS_SUPPORT - -Several other compression schemes are configured separately from -the default set because they depend on ancillary software -packages that are not distributed with LibTIFF. - -Support for JPEG compression is controlled by :c:macro:`JPEG_SUPPORT`. -The JPEG codec that comes with LibTIFF is designed for -use with release 5 or later of the Independent JPEG Group's freely -available software distribution. - -This software can be retrieved from -``_ or as an alternative from ``_. - -.. note:: - - Enabling JPEG support automatically enables support for - the TIFF 6.0 colorimetry and YCbCr-related tags. - -Experimental support for the deflate algorithm is controlled by -:c:macro:`DEFLATE_SUPPORT`. -The deflate codec that comes with LibTIFF is designed -for use with version 0.99 or later of the freely available -``libz`` library written by Jean-loup Gailly and Mark Adler. - -The data format used by the zlib library is described by RFCs (Request for -Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 -(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). - -The ``libz`` library can be fetched from ``_, -and ``libdeflate`` from ``_ - -Other codec libraries supported by LibTIFF are: - -* JBIG: ``_ -* ESRI Lerc: ``_ -* LZMA2: ``_ -* | ZSTD: info at ``_ - | and can be retrieved from ``_ -* WebP: ``_ - -By default :file:`tiffconf.h` defines -:c:macro:`COLORIMETRY_SUPPORT`, -:c:macro:`YCBCR_SUPPORT`, -and -:c:macro:`CMYK_SUPPORT`. - -.. list-table:: :file:`tiffconf.h` defines - :widths: 5 20 - :header-rows: 1 - - * - Define - - Description - - * - :c:macro:`CCITT_SUPPORT` - - CCITT Group 3 and 4 algorithms (compression codes 2, 3, 4, and 32771) - - * - :c:macro:`PACKBITS_SUPPORT` - - Macintosh PackBits algorithm (compression 32773) - - * - :c:macro:`LZW_SUPPORT` - - Lempel-Ziv & Welch (LZW) algorithm (compression 5) - - * - :c:macro:`THUNDER_SUPPORT` - - 4-bit run-length encoding scheme from ThunderScan (compression 32809) - - * - :c:macro:`NEXT_SUPPORT` - - 2-bit encoding scheme used by NeXT (compression 32766) - - * - :c:macro:`OJPEG_SUPPORT` - - obsolete JPEG scheme defined in the 6.0 spec (compression 6) - (requires JPEG library with old JPEG support) - - * - :c:macro:`JPEG_SUPPORT` - - current JPEG scheme defined in TTN2 (compression 7) - (requires JPEG library) - - * - :c:macro:`JBIG_SUPPORT` - - current JBIG (compression 9=T85, 10=43 and 34661=ISO) - (requires JBIG-KIT library) - - * - :c:macro:`LERC_SUPPORT` - - current LERC (compression 34887) - (requires LERC and Zlib library) - - * - :c:macro:`ZIP_SUPPORT` - - experimental Deflate scheme (compression 32946) - (requires Zlib) - - * - :c:macro:`LIBDEFLATE_SUPPORT` - - support libdeflate enhanced compression (compression 32946) - (requires libdeflate and Zlib) - - * - :c:macro:`LZMA_SUPPORT` - - Lempel–Ziv–Markov chain algorithm (LZMA2) (compression 34925) - (requires liblzma) - - * - :c:macro:`ZSTD_SUPPORT` - - ZStandard (ZSTD) deflate like scheme - (compression 50000 - not registered in Adobe-maintained registry) - (requires zstd library) - - * - :c:macro:`WEBP_SUPPORT` - - WebP raster graphic compression support - (compression 50001 - not registered in Adobe-maintained registry) - (requires webp library) - - * - :c:macro:`PIXARLOG_SUPPORT` - - Pixar's compression scheme for high-resolution color images - (compression 32909) (requires Zlib) - - * - :c:macro:`SGILOG_SUPPORT` - - SGI's compression scheme for high-resolution color images - (compression 34676 and 34677) - - * - :c:macro:`COLORIMETRY_SUPPORT` - - support for the TIFF 6.0 colorimetry tags - - * - :c:macro:`YCBCR_SUPPORT` - - support for the TIFF 6.0 YCbCr-related tags - - * - :c:macro:`CMYK_SUPPORT` - - support for the TIFF 6.0 CMYK-related tags - - * - :c:macro:`ICC_SUPPORT` - - support for the ICC Profile tag; see - *The ICC Profile Format Specification*, - Annex B.3 "Embedding ICC Profiles in TIFF Files"; - available at - ``_ - -General Portability Comments ----------------------------- - -This software is developed on Silicon Graphics UNIX -systems (big-endian, MIPS CPU, 32-bit ints, -IEEE floating point). -The :program:`configure` shell script generates the appropriate -include files and make files for UNIX systems. -Makefiles exist for non-UNIX platforms that the -code runs on---this work has mostly been done by other people. - -In general, the code is guaranteed to work only on SGI machines. -In practice it is highly portable to any 32-bit or 64-bit system and much -work has been done to insure portability to 16-bit systems. -If you encounter portability problems please return fixes so -that future distributions can be improved. - -The software is written to assume an ANSI C compilation environment. -If your compiler does not support ANSI function prototypes, ``const``, -and :file:`` then you will have to make modifications to the -software. In the past I have tried to support compilers without ``const`` -and systems without :file:``, but I am -**no longer interested in these -antiquated environments**. With the general availability of -the freely available GCC compiler, I -see no reason to incorporate modifications to the software for these -purposes. - -An effort has been made to isolate as many of the -operating system-dependencies -as possible in two files: :file:`tiffcomp.h` and -:file:`libtiff/tif_.c`. The latter file contains -operating system-specific routines to do I/O and I/O-related operations. -The UNIX (:file:`tif_unix.c`) code has had the most use. - -Native CPU byte order is determined through the :c:macro:`WORDS_BIGENDIAN` -definition, which must be set to the appropriate value in :file:`tif_config.h` -by the build system. - -The following defines control general portability: - -.. list-table:: Portability defines - :widths: 5 20 - :header-rows: 1 - - * - Define - - Description - - * - :c:macro:`BSDTYPES` - - Define this if your system does **not** define the - usual BSD typedefs: :c:type:`u_char`, - :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`. - - * - :c:macro:`HAVE_IEEEFP` - - Define this as 0 or 1 according to the floating point - format supported by the machine. If your machine does - not support IEEE floating point then you will need to - add support to tif_machdep.c to convert between the - native format and IEEE format. - - * - :c:macro:`HAVE_MMAP` - - Define this if there is *mmap-style* support for - mapping files into memory (used only to read data). - - * - :c:macro:`HOST_FILLORDER` - - Define the native CPU bit order: one of :c:macro:`FILLORDER_MSB2LSB` - or :c:macro:`FILLORDER_LSB2MSB` - - * - :c:macro:`HOST_BIGENDIAN` - - Define the native CPU byte order: 1 if big-endian (Motorola) - or 0 if little-endian (Intel); this may be used - in codecs to optimize code - -On UNIX systems :c:macro:`HAVE_MMAP` is defined through the running of -the :program:`configure` script; otherwise support for memory-mapped -files is disabled. -Note that :file:`tiffcomp.h` defines :c:macro:`HAVE_IEEEFP` to be -1 (:c:macro:`BSDTYPES` is not defined). - -Types and Portability ---------------------- - -The software makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. There are interactions between these two to be careful -of, but for the most part you should be able to deal with portability -purely by fiddling with the following machine-dependent typedefs: - -.. list-table:: Portability typedefs - :widths: 5 15 5 - :header-rows: 1 - - * - Typedef - - Description - - Header - - * - :c:type:`uint8_t` - - 8-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int8_t` - - 8-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint16_t` - - 16-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int16_t` - - 16-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint32_t` - - 32-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int32_t` - - 32-bit signed integer - - :file:`tiff.h` - - * - :c:type:`uint64_t` - - 64-bit unsigned integer - - :file:`tiff.h` - - * - :c:type:`int64_t` - - 64-bit signed integer - - :file:`tiff.h` - - -Most of the previously used type definitions that refer to -specific objects are deprecated. -For more information about typedefs see :ref:`Data Types `. - -General Comments ----------------- - -The library is designed to hide as much of the details of TIFF from -applications as -possible. In particular, TIFF directories are read in their entirety -into an internal format. Only the tags known by the library are -available to a user and certain tag data may be maintained that a user -does not care about (e.g. transfer function tables). - -Adding New Builtin Codecs -------------------------- - -To add builtin support for a new compression algorithm, you can either -use the "tag-extension" trick to override the handling of the -TIFF Compression tag (see :doc:`addingtags`), -or do the following to add support directly to the core library: - -* Define the tag value in :file:`tiff.h`. -* Edit the file :file:`tif_codec.c` to add an entry to the - :c:var:`_TIFFBuiltinCODECS` array (see how other algorithms are handled). -* Add the appropriate function prototype declaration to - :file:`tiffiop.h` (close to the bottom). -* Create a file with the compression scheme code, by convention files - are named :file:`tif_*.c` (except perhaps on some systems where the - ``tif_`` prefix pushes some filenames over 14 chars. -* Update build configuration to include new source file. - -A codec, say ``foo``, can have many different entry points: - -:: - - TIFFInitfoo(tif, scheme) /* initialize scheme and setup entry points in tif */ - fooSetupDecode(tif) /* called once per IFD after tags has been frozen */ - fooPreDecode(tif, sample) /* called once per strip/tile, after data is read, - but before the first row is decoded */ - fooDecode*(tif, bp, cc, sample) /* decode cc bytes of data into the buffer */ - fooDecodeRow(...) /* called to decode a single scanline */ - fooDecodeStrip(...) /* called to decode an entire strip */ - fooDecodeTile(...) /* called to decode an entire tile */ - fooSetupEncode(tif) /* called once per IFD after tags has been frozen */ - fooPreEncode(tif, sample) /* called once per strip/tile, before the first row in - a strip/tile is encoded */ - fooEncode*(tif, bp, cc, sample)/* encode cc bytes of user data (bp) */ - fooEncodeRow(...) /* called to decode a single scanline */ - fooEncodeStrip(...) /* called to decode an entire strip */ - fooEncodeTile(...) /* called to decode an entire tile */ - fooPostEncode(tif) /* called once per strip/tile, just before data is written */ - fooSeek(tif, row) /* seek forwards row scanlines from the beginning - of a strip (row will always be <0 and >rows/strip */ - fooCleanup(tif) /* called when compression scheme is replaced by user */ - -Note that the encoding and decoding variants are only needed when -a compression algorithm is dependent on the structure of the data. -For example, Group 3 2D encoding and decoding maintains a reference -scanline. The sample parameter identifies which sample is to be -encoded or decoded if the image is organized with ``PlanarConfig=2`` -(separate planes). This is important for algorithms such as JPEG. -If ``PlanarConfig=1`` (interleaved), then sample will always be 0. - -Other Comments --------------- - -The library handles most I/O buffering. There are two data buffers -when decoding data: a raw data buffer that holds all the data in a -strip, and a user-supplied scanline buffer that compression schemes -place decoded data into. When encoding data the data in the -user-supplied scanline buffer is encoded into the raw data buffer (from -where it is written). Decoding routines should never have to explicitly -read data -- a full strip/tile's worth of raw data is read and scanlines -never cross strip boundaries. Encoding routines must be cognizant of -the raw data buffer size and call :c:func:`TIFFFlushData1` when necessary. -Note that any pending data is automatically flushed when a new strip/tile is -started, so there's no need do that in the tif_postencode routine (if -one exists). Bit order is automatically handled by the library when -a raw strip or tile is filled. If the decoded samples are interpreted -by the decoding routine before they are passed back to the user, then -the decoding logic must handle byte-swapping by overriding the -:c:member:`tif_postdecode` -routine (set it to :c:func:`TIFFNoPostDecode`) and doing the required work -internally. For an example of doing this look at the horizontal -differencing code in the routines in :file:`tif_predict.c`. - -The variables :c:member:`tif_rawcc`, :c:member:`tif_rawdata`, and -:c:member:`tif_rawcp` in a :c:struct:`TIFF` structure -are associated with the raw data buffer. :c:member:`tif_rawcc` must be non-zero -for the library to automatically flush data. The variable -:c:member:`tif_scanlinesize` is the size a user's scanline buffer should be. The -variable :c:member:`tif_tilesize` is the size of a tile for tiled images. This -should not normally be used by compression routines, except where it -relates to the compression algorithm. That is, the ``cc`` parameter to the -:c:expr:`tif_decode*` and :c:expr:`tif_encode*` -routines should be used in terminating -decompression/compression. This ensures these routines can be used, -for example, to decode/encode entire strips of data. - -In general, if you have a new compression algorithm to add, work from -the code for an existing routine. In particular, -:file:`tif_dumpmode.c` -has the trivial code for the "nil" compression scheme, -:file:`tif_packbits.c` is a -simple byte-oriented scheme that has to watch out for buffer -boundaries, and :file:`tif_lzw.c` has the LZW scheme that has the most -complexity -- it tracks the buffer boundary at a bit level. -Of course, using a private compression scheme (or private tags) limits -the portability of your TIFF files. diff --git a/third_party/libtiff/doc/libtiff.rst b/third_party/libtiff/doc/libtiff.rst deleted file mode 100644 index 694c33d..0000000 --- a/third_party/libtiff/doc/libtiff.rst +++ /dev/null @@ -1,744 +0,0 @@ -Using The TIFF Library -====================== - -.. image:: images/cat.gif - :width: 113 - :alt: cat - -``libtiff`` is a set of C functions (a library) that support -the manipulation of TIFF image files. -The library requires an ANSI C compilation environment for building -and presumes an ANSI C environment for use. - -``libtiff`` -provides interfaces to image data at several layers of abstraction (and cost). -At the highest level image data can be read into an 8-bit/sample, -ABGR pixel raster format without regard for the underlying data organization, -colorspace, or compression scheme. Below this high-level interface -the library provides scanline-, strip-, and tile-oriented interfaces that -return data decompressed but otherwise untransformed. These interfaces -require that the application first identify the organization of stored -data and select either a strip-based or tile-based API for manipulating -data. At the lowest level the library -provides access to the raw uncompressed strips or tiles, -returning the data exactly as it appears in the file. - -The material presented in this chapter is a basic introduction -to the capabilities of the library; it is not an attempt to describe -everything a developer needs to know about the library or about TIFF. -Detailed information on the interfaces to the library are given in -the :doc:`functions` that accompany this software. -An alphabetic list of all the public functions with a brief description can be found at :ref:`list_of_routines` - -How to tell which version you have ----------------------------------- - -The software version can be found by looking at the file named -:file:`VERSION` -that is located at the top of the source tree; the precise alpha number -is given in the file :file:`dist/tiff.alpha`. -If you have need to refer to this -specific software, you should identify it as: - -:: - - TIFF - -where ```` is whatever you get from -``cat VERSION`` and ```` is -what you get from ``cat dist/tiff.alpha``. - -Within an application that uses ``libtiff`` the :c:func:`TIFFGetVersion` -routine will return a pointer to a string that contains software version -information. -The library include file :file:`` contains a C pre-processor -define :c:macro:`TIFFLIB_VERSION` that can be used to check library -version compatibility at compile time. - -Library Datatypes ------------------ - -``libtiff`` defines a portable programming interface through the -use of a set of C type definitions. -These definitions, defined in in the files :file:`tiff.h` and -:file:`tiffio.h`, -isolate the ``libtiff`` API from the characteristics -of the underlying machine. -To insure portable code and correct operation, applications that use -``libtiff`` should use the typedefs and follow the function -prototypes for the library API. - -Memory Management ------------------ - -``libtiff`` uses a machine-specific set of routines for managing -dynamically allocated memory. -:c:func:`_TIFFmalloc`, :c:func:`_TIFFrealloc`, and :c:func:`_TIFFfree` -mimic the normal ANSI C routines. -Any dynamically allocated memory that is to be passed into the library -should be allocated using these interfaces in order to insure pointer -compatibility on machines with a segmented architecture. -(On 32-bit UNIX systems these routines just call the normal :c:func:`malloc`, -:c:func:`realloc`, and :c:func:`free` routines in the C library.) - -To deal with segmented pointer issues ``libtiff`` also provides -:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemcmp` -routines that mimic the equivalent ANSI C routines, but that are -intended for use with memory allocated through :c:func:`_TIFFmalloc` -and :c:func:`_TIFFrealloc`. - -With ``libtiff`` 4.5 a method was introduced to limit the internal -memory allocation that functions are allowed to request per call -(see :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` and :c:func:`TIFFOpenExt`). - -With ``libtiff`` 4.6.1 a method was introduced to limit the internal -cumulated memory allocation that functions are allowed to request for a given -TIFF handle -(see :c:func:`TIFFOpenOptionsSetMaxCumulatedMemAlloc` and :c:func:`TIFFOpenExt`). - -Error Handling --------------- - -``libtiff`` handles most errors by returning an invalid/erroneous -value when returning from a function call. -Various diagnostic messages may also be generated by the library. -All error messages are directed to a single global error handler -routine that can be specified with a call to :c:func:`TIFFSetErrorHandler`. -Likewise warning messages are directed to a single handler routine -that can be specified with a call to :c:func:`TIFFSetWarningHandler` - -Further application-specific and per-TIFF handle (re-entrant) error handler -and warning handler can be set. Please refer to :doc:`/functions/TIFFError` -and :doc:`/functions/TIFFOpenOptions`. - -Basic File Handling -------------------- - -The library is modeled after the normal UNIX stdio library. -For example, to read from an existing TIFF image the -file must first be opened: - -.. highlight:: c - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("foo.tif", "r"); - /* ... do stuff ... */ - TIFFClose(tif); - } - -The handle returned by :c:func:`TIFFOpen` is *opaque*, that is -the application is not permitted to know about its contents. -All subsequent library calls for this file must pass the handle -as an argument. - -To create or overwrite a TIFF image the file is also opened, but with -a ``"w"`` argument: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("foo.tif", "w"); - /* ... do stuff ... */ - TIFFClose(tif); - } - -If the file already exists it is first truncated to zero length. - -.. warning:: - - Unlike the stdio library TIFF image files may not be - opened for both reading and writing; - there is no support for altering the contents of a TIFF file. - -``libtiff`` buffers much information associated with writing a -valid TIFF image. Consequently, when writing a TIFF image it is necessary -to always call :c:func:`TIFFClose` or :c:func:`TIFFFlush` to flush any -buffered information to a file. Note that if you call :c:func:`TIFFClose` -you do not need to call :c:func:`TIFFFlush`. - -.. warning:: - - In order to prevent out-of-memory issues when opening a TIFF file - :c:func:`TIFFOpenExt` can be used and then the maximum single memory - limit in bytes that ``libtiff`` internal memory allocation functions - are allowed to request per call can be set with - :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. - -Example - -:: - - tmsize_t limit = (256 * 1024 * 1024); - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); - TIFF *tif = TIFFOpenExt("foo.tif", "w", opts); - TIFFOpenOptionsFree(opts); - /* ... go on here ... */ - -TIFF Directories ----------------- - -TIFF supports the storage of multiple images in a single file. -Each image has an associated data structure termed a *directory* -that houses all the information about the format and content of the -image data. -Images in a file are usually related but they do not need to be; it -is perfectly alright to store a color image together with a black and -white image. -Note however that while images may be related their directories are -not. -That is, each directory stands on its own; there is no need to read -an unrelated directory in order to properly interpret the contents -of an image. - -``libtiff`` provides several routines for reading and writing -directories. In normal use there is no need to explicitly -read or write a directory: the library automatically reads the first -directory in a file when opened for reading, and directory information -to be written is automatically accumulated and written when writing -(assuming :c:func:`TIFFClose` or :c:func:`TIFFFlush` are called). - -For a file open for reading the :c:func:`TIFFSetDirectory` routine can -be used to select an arbitrary directory; directories are referenced by -number with the numbering starting at 0. Otherwise the -:c:func:`TIFFReadDirectory` and :c:func:`TIFFWriteDirectory` routines can -be used for sequential access to directories. -For example, to count the number of directories in a file the following -code might be used: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - int dircount = 0; - do { - dircount++; - } while (TIFFReadDirectory(tif)); - printf("%d directories in %s\n", dircount, argv[1]); - TIFFClose(tif); - } - exit(0); - } - - -Finally, note that there are several routines for querying the -directory status of an open file: -:c:func:`TIFFCurrentDirectory` returns the index of the current -directory and -:c:func:`TIFFLastDirectory` returns an indication of whether the -current directory is the last directory in a file. -There is also a routine, :c:func:`TIFFPrintDirectory`, that can -be called to print a formatted description of the contents of -the current directory; consult the manual page for complete details. - -TIFF Tags ---------- - -Image-related information such as the image width and height, number -of samples, orientation, colorimetric information, etc. -are stored in each image -directory in *fields* or *tags*. -Tags are identified by a number that is usually a value registered -with the Aldus (now Adobe) Corporation. -Beware however that some vendors write -TIFF images with tags that are unregistered; in this case interpreting -their contents is usually a waste of time. - -``libtiff`` reads the contents of a directory all at once -and converts the on-disk information to an appropriate in-memory -form. While the TIFF specification permits an arbitrary set of -tags to be defined and used in a file, the library only understands -a limited set of tags. -Any unknown tags that are encountered in a file are ignored. -There is a mechanism to extend the set of tags the library handles -without modifying the library itself; -this is described in :doc:`addingtags`. - -``libtiff`` provides two interfaces for getting and setting tag -values: :c:func:`TIFFGetField` and :c:func:`TIFFSetField`. -These routines use a variable argument list-style interface to pass -parameters of different type through a single function interface. -The *get interface* takes one or more pointers to memory locations -where the tag values are to be returned and also returns one or -zero according to whether the requested tag is defined in the directory. -The *set interface* takes the tag values either by-reference or -by-value. -The TIFF specification defines -*default values* for some tags. -To get the value of a tag, or its default value if it is undefined, -the :c:func:`TIFFGetFieldDefaulted` interface may be used. - -The manual pages for the tag get and set routines specify the exact data types -and calling conventions required for each tag supported by the library. - -TIFF Compression Schemes ------------------------- - -``libtiff`` includes support for a wide variety of -data compression schemes. -In normal operation a compression scheme is automatically used when -the TIFF ``Compression`` tag is set, either by opening a file -for reading, or by setting the tag when writing. - -Compression schemes are implemented by software modules termed *codecs* -that implement decoder and encoder routines that hook into the -core library i/o support. -Codecs other than those bundled with the library can be registered -for use with the :c:func:`TIFFRegisterCODEC` routine. -This interface can also be used to override the core-library -implementation for a compression scheme. - -Byte Order ----------- - -The TIFF specification says, and has always said, that -*a correct TIFF -reader must handle images in big-endian and little-endian byte order*. -``libtiff`` conforms in this respect. -Consequently there is no means to force a specific -byte order for the data written to a TIFF image file (data is -written in the native order of the host CPU unless appending to -an existing file, in which case it is written in the byte order -specified in the file). - -Data Placement --------------- - -The TIFF specification requires that all information except an -8-byte header can be placed anywhere in a file. -In particular, it is perfectly legitimate for directory information -to be written after the image data itself. -Consequently TIFF is inherently not suitable for passing through a -stream-oriented mechanism such as UNIX pipes. -Software that require that data be organized in a file in a particular -order (e.g. directory information before image data) does not -correctly support TIFF. -``libtiff`` provides no mechanism for controlling the placement -of data in a file; image data is typically written before directory -information. - -TIFFRGBAImage Support ---------------------- - -``libtiff`` provides a high-level interface for reading image -data from a TIFF file. This interface handles the details of -data organization and format for a wide variety of TIFF files; -at least the large majority of those files that one would normally -encounter. Image data is, by default, returned as ABGR -pixels packed into 32-bit words (8 bits per sample). Rectangular -rasters can be read or data can be intercepted at an intermediate -level and packed into memory in a format more suitable to the -application. -The library handles all the details of the format of data stored on -disk and, in most cases, if any colorspace conversions are required: -bilevel to RGB, greyscale to RGB, CMYK to RGB, YCbCr to RGB, 16-bit -samples to 8-bit samples, associated/unassociated alpha, etc. - -There are two ways to read image data using this interface. If -all the data is to be stored in memory and manipulated at once, -then the routine :c:func:`TIFFReadRGBAImage` can be used: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - uint32_t w, h; - size_t npixels; - uint32_t* raster; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - npixels = w * h; - raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t)); - if (raster != NULL) { - if (TIFFReadRGBAImage(tif, w, h, raster, 0)) { - ...process raster data... - } - _TIFFfree(raster); - } - TIFFClose(tif); - } - exit(0); - } - -Note above that :c:func:`_TIFFmalloc` is used to allocate memory for -the raster passed to :c:func:`TIFFReadRGBAImage`; this is important -to insure the "appropriate type of memory" is passed on machines -with segmented architectures. - -Alternatively, :c:func:`TIFFReadRGBAImage` can be replaced with a -more low-level interface that permits an application to have more -control over this reading procedure. The equivalent to the above -is: - -:: - - #include "tiffio.h" - main(int argc, char* argv[]) - { - TIFF* tif = TIFFOpen(argv[1], "r"); - if (tif) { - TIFFRGBAImage img; - char emsg[1024]; - - if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) { - size_t npixels; - uint32_t* raster; - - npixels = img.width * img.height; - raster = (uint32_t*) _TIFFmalloc(npixels * sizeof (uint32_t)); - if (raster != NULL) { - if (TIFFRGBAImageGet(&img, raster, img.width, img.height)) { - ...process raster data... - } - _TIFFfree(raster); - } - TIFFRGBAImageEnd(&img); - } else - TIFFError(argv[1], emsg); - TIFFClose(tif); - } - exit(0); - } - -However this usage does not take advantage of the more fine-grained -control that's possible. That is, by using this interface it is -possible to: - -* repeatedly fetch (and manipulate) an image without opening - and closing the file -* interpose a method for packing raster pixel data according to - application-specific needs (or write the data at all) -* interpose methods that handle TIFF formats that are not already - handled by the core library - -The first item means that, for example, image viewers that want to -handle multiple files can cache decoding information in order to -speedup the work required to display a TIFF image. - -The second item is the main reason for this interface. By interposing -a "put method" (the routine that is called to pack pixel data in -the raster) it is possible share the core logic that understands how -to deal with TIFF while packing the resultant pixels in a format that -is optimized for the application. This alternate format might be very -different than the 8-bit per sample ABGR format the library writes by -default. For example, if the application is going to display the image -on an 8-bit colormap display the put routine might take the data and -convert it on-the-fly to the best colormap indices for display. - -The last item permits an application to extend the library -without modifying the core code. -By overriding the code provided an application might add support -for some esoteric flavor of TIFF that it needs, or it might -substitute a packing routine that is able to do optimizations -using application/environment-specific information. - -The TIFF image viewer found in :file:`tools/sgigt.c` is an example -of an application that makes use of the :c:func:`TIFFRGBAImage` -support. - -Scanline-based Image I/O ------------------------- - -The simplest interface provided by ``libtiff`` is a -scanline-oriented interface that can be used to read TIFF -images that have their image data organized in strips -(trying to use this interface to read data written in tiles -will produce errors.) -A scanline is a one pixel high row of image data whose width -is the width of the image. -Data is returned packed if the image data is stored with samples -packed together, or as arrays of separate samples if the data -is stored with samples separated. -The major limitation of the scanline-oriented interface, other -than the need to first identify an existing file as having a -suitable organization, is that random access to individual -scanlines can only be provided when data is not stored in a -compressed format, or when the number of rows in a strip -of image data is set to one (``RowsPerStrip`` is one). - -Two routines are provided for scanline-based i/o: -:c:func:`TIFFReadScanline` -and -:c:func:`TIFFWriteScanline`. -For example, to read the contents of a file that -is assumed to be organized in strips, the following might be used: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imagelength; - void *buf; - uint32_t row; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); - buf = _TIFFmalloc(TIFFScanlineSize(tif)); - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, 0); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -:c:func:`TIFFScanlineSize` returns the number of bytes in -a decoded scanline, as returned by :c:func:`TIFFReadScanline`. -Note however that if the file had been create with samples -written in separate planes, then the above code would only -read data that contained the first sample of each pixel; -to handle either case one might use the following instead: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imagelength; - void *buf; - uint32_t row; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength); - TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config); - buf = _TIFFmalloc(TIFFScanlineSize(tif)); - if (config == PLANARCONFIG_CONTIG) { - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, 0); - } else if (config == PLANARCONFIG_SEPARATE) { - uint16_t s, nsamples; - - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &nsamples); - for (s = 0; s < nsamples; s++) - for (row = 0; row < imagelength; row++) - TIFFReadScanline(tif, buf, row, s); - } - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Beware however that if the following code were used instead to -read data in the case ``PLANARCONFIG_SEPARATE``,... - -:: - - for (row = 0; row < imagelength; row++) - for (s = 0; s < nsamples; s++) - TIFFReadScanline(tif, buf, row, s); - -...then problems would arise if ``RowsPerStrip`` was not one -because the order in which scanlines are requested would require -random access to data within strips (something that is not supported -by the library when strips are compressed). - -Strip-oriented Image I/O ------------------------- - -The strip-oriented interfaces provided by the library provide -access to entire strips of data. Unlike the scanline-oriented -calls, data can be read or written compressed or uncompressed. -Accessing data at a strip (or tile) level is often desirable -because there are no complications with regard to random access -to data within strips. - -A simple example of reading an image by strips is: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t strip; - - buf = _TIFFmalloc(TIFFStripSize(tif)); - for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) - TIFFReadEncodedStrip(tif, strip, buf, (tmsize_t) -1); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Notice how a strip size of ``-1`` is used; :c:func:`TIFFReadEncodedStrip` -will calculate the appropriate size in this case. - -The above code reads strips in the order in which the -data is physically stored in the file. If multiple samples -are present and data is stored with ``PLANARCONFIG_SEPARATE`` -then all the strips of data holding the first sample will be -read, followed by strips for the second sample, etc. - -Finally, note that the last strip of data in an image may have fewer -rows in it than specified by the ``RowsPerStrip`` tag. A -reader should not assume that each decoded strip contains a full -set of rows in it. - -The following is an example of how to read raw strips of data from -a file: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t strip; - uint32_t *bc; - uint32_t stripsize; - - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc); - stripsize = bc[0]; - buf = _TIFFmalloc(stripsize); - for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) { - if (bc[strip] > stripsize) { - buf = _TIFFrealloc(buf, bc[strip]); - stripsize = bc[strip]; - } - TIFFReadRawStrip(tif, strip, buf, bc[strip]); - } - _TIFFfree(buf); - TIFFClose(tif); - } - } - -As above the strips are read in the order in which they are -physically stored in the file; this may be different from the -logical ordering expected by an application. - -Tile-oriented Image I/O ------------------------ - -Tiles of data may be read and written in a manner similar to strips. -With this interface, an image is -broken up into a set of rectangular areas that may have dimensions -less than the image width and height. All the tiles -in an image have the same size, and the tile width and length must each -be a multiple of 16 pixels. Tiles are ordered left-to-right and -top-to-bottom in an image. As for scanlines, samples can be packed -contiguously or separately. When separated, all the tiles for a sample -are colocated in the file. That is, all the tiles for sample 0 appear -before the tiles for sample 1, etc. - -Tiles and strips may also be extended in a z dimension to form -volumes. Data volumes are organized as "slices". That is, all the -data for a slice is colocated. Volumes whose data is organized in -tiles can also have a tile depth so that data can be organized in -cubes. - -There are actually two interfaces for tiles. -One interface is similar to scanlines, to read a tiled image, -code of the following sort might be used: - -:: - - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - uint32_t imageWidth, imageLength; - uint32_t tileWidth, tileLength; - uint32_t x, y; - void *buf; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tileWidth); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &tileLength); - buf = _TIFFmalloc(TIFFTileSize(tif)); - for (y = 0; y < imagelength; y += tilelength) - for (x = 0; x < imagewidth; x += tilewidth) - TIFFReadTile(tif, buf, x, y, 0); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -(once again, we assume samples are packed contiguously.) - -Alternatively a direct interface to the low-level data is provided -à la strips. Tiles can be read with -:c:func:`TIFFReadEncodedTile` or :c:func:`TIFFReadRawTile`, -and written with :c:func:`TIFFWriteEncodedTile` or -:c:func:`TIFFWriteRawTile`. For example, to read all the tiles in an image: - -:: - - #include "tiffio.h" - main() - { - TIFF* tif = TIFFOpen("myfile.tif", "r"); - if (tif) { - void *buf; - uint32_t tile; - - buf = _TIFFmalloc(TIFFTileSize(tif)); - for (tile = 0; tile < TIFFNumberOfTiles(tif); tile++) - TIFFReadEncodedTile(tif, tile, buf, (tmsize_t) -1); - _TIFFfree(buf); - TIFFClose(tif); - } - } - -Re-entrancy and Thread Safety ------------------------------ - -``Libtiff`` contains no static state except for the registered error / -warning handler. -All data for an opened TIFF file is encapsulated via the TIFF handle -returned by :c:func:`TIFFOpen`. Only the error handlers -:c:func:`TIFFError` and :c:func:`TIFFErrorExt`, -(as well as :c:func:`TIFFWarning` and :c:func:`TIFFWarningExt`) -use TIFF handle independent, common error handler functions. - -:c:func:`TIFFErrorHandlerExtR` and :c:func:`TIFFWarningHandlerExtR` -(introduced in ``libtiff`` 4.5) offer the option of registering -a separate error handler for each TIFF handle. -This error handler is called via the TIFF handle and is therefore -re-entrant, which means that it is naturally thread-safe. - -These handlers can already be set before opening a TIFF file using the -:c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and -:c:func:`TIFFOpenOptionsSetWarningHandlerExtR` functions, respectively. - -This allows multiple TIFF files to be processed simultaneously -with multiple threads, with each thread having its own TIFF file. -It is not possible (safe) to edit a single TIFF file with multiple -threads at the same time. - -Multi Page / Multi Image TIFF ------------------------------ - -TIFF images can contain more than one image or page and each image can -have sub-images. Furthermore, additional information about an image -can be put into *custom* TIFF directories, such as EXIF or GPS. -Writing TIFF files with more than one directory (IFD) is not easy -because some side effects need to be known. -How to read and write multi page TIFF files using ``libtiff`` is explained -in :doc:`/multi_page`. -For custom directories refer to :doc:`/functions/TIFFCustomDirectory`. - - -Other Stuff ------------ - -Some other stuff will almost certainly go here... diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFAccessTagMethods.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFAccessTagMethods.3tiff deleted file mode 100644 index 1023b78..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFAccessTagMethods.3tiff +++ /dev/null @@ -1,64 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFACCESSTAGMETHODS" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFAccessTagMethods \- provides read/write access to the TIFFTagMethods -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFTagMethods *TIFFAccessTagMethods(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -This provides read/write access to the TIFFTagMethods within the TIFF -structure to application code without giving access to the private TIFF -structure. -.SH DIAGNOSTICS -.sp -None -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFClientInfo.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFClientInfo.3tiff deleted file mode 100644 index 0536a7d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFClientInfo.3tiff +++ /dev/null @@ -1,74 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCLIENTINFO" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFClientInfo \- provides a method to hand over user defined data from one routine to another -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void *TIFFGetClientInfo(TIFF *tif, const char *name) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSetClientInfo(TIFF *tif, void *data, const char *name) -.UNINDENT -.SH DESCRIPTION -.sp -The \fIclientinfo\fP linked list provides a method to hand over user defined -data from one routine to another via the internal \fBtif\fP storage of the -\fBlibtiff\fP library. -.sp -\fI\%TIFFGetClientInfo()\fP returns a pointer to the data of the named entry -in the clientinfo\-list. If the \fIname\fP is not found \fBNULL\fP is returned. -.sp -\fI\%TIFFSetClientInfo()\fP adds or replaces an entry in the clientinfo\-list -with the \fIname\fP and the pointer to the \fIdata\fP provided by the caller. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFClose.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFClose.3tiff deleted file mode 100644 index e0858d4..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFClose.3tiff +++ /dev/null @@ -1,90 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCLOSE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFClose \- close a previously opened TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFClose(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFCleanup(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFClose()\fP closes a file that was previously opened with -\fI\%TIFFOpen()\fP\&. Any buffered data are flushed to the file, including -the contents of the current directory (if modified); and all resources -are reclaimed. \fI\%TIFFClose()\fP calls \fI\%TIFFCleanup()\fP and then -the associated function to close the file handle. -.sp -\fI\%TIFFCleanup()\fP is an auxiliary function to free the TIFF structure. -The given structure will be completely freed, so you should save opened file -handle and pointer to the close procedure in external variables before -calling \fI\%TIFFCleanup()\fP, if you will need these ones to close the file. -\fI\%TIFFCleanup()\fP calls \fI\%TIFFFlush()\fP, which stores all pending data -in the file. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -Both functions have no return value. -If you want to check whether the data has been successfully written -to the file, you can call \fI\%TIFFFlush()\fP, which has a return value, -before \fI\%TIFFClose()\fP\&. -.UNINDENT -.UNINDENT -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFError\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFCreateDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFCreateDirectory.3tiff deleted file mode 100644 index 97e341e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFCreateDirectory.3tiff +++ /dev/null @@ -1,124 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCREATEDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFCreateDirectory \- routines to create a directory and retrieve information about directories -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCreateDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFreeDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn) -.UNINDENT -.SH DESCRIPTION -.sp -The following routines create or release a directory. -.sp -\fI\%TIFFCreateDirectory()\fP setup for a directory in a open TIFF file. -The newly created directory will not exist on the file till -\fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP, -\fI\%TIFFFlush()\fP or \fI\%TIFFClose()\fP is called. -\fI\%TIFFWriteDirectory()\fP also creates a new directory, -frees the \fB*tif\fP structure and sets up a new one. -.sp -\fI\%TIFFFreeDirectory()\fP releases allocated storage associated with a -directory, especially custom\-fields. -However, the main part of the directory is not touched. Routine -\fI\%TIFFCleanup()\fP calls \fI\%TIFFFreeDirectory()\fP to release -the directory part of the \fItif\fP structure. -.sp -\fI\%TIFFUnlinkDirectory()\fP unlink the specified directory from the -directory chain. -The parameter \fIdirn\fP specifies the subfile/directory -as an integer number, with the first directory numbered one (1). -This is different to \fI\%TIFFSetDirectory()\fP or \fI\%TIFFCurrentDirectory()\fP where the first -directory starts with zero (0). -.sp -Directory query functions \fI\%TIFFCurrentDirectory()\fP, -\fI\%TIFFCurrentDirOffset()\fP, \fI\%TIFFLastDirectory()\fP and -\fI\%TIFFNumberOfDirectories()\fP retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won\(aqt retrieve -the correct information! -.SH NOTES -.sp -Be aware: -.INDENT 0.0 -.IP \(bu 2 -that until a directory is not written to file AND read back, the -query functions won\(aqt retrieve the correct information! -.IP \(bu 2 -that the newly created directory will not exist on the file till -\fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP, -\fI\%TIFFFlush()\fP or \fI\%TIFFClose()\fP has been called. -.IP \(bu 2 -that \fI\%TIFFCreateDirectory()\fP and \fI\%TIFFWriteDirectory()\fP -create a new directory, free the \fB*tif\fP structure and set up a new one. -.IP \(bu 2 -that unlike \fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP -does not free up the directory data structures in memory. -.UNINDENT -.sp -After \fBlibtiff\fP version 4.6.0 \fI\%TIFFCreateDirectory()\fP also releases -the directory part of the \fItif\fP structure by calling \fI\%TIFFFreeDirectory()\fP, -which should have been called by the user application before creating a new directory. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFCustomDirectory\fP (3tiff), -\fI\%TIFFquery\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFCustomDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFCustomDirectory.3tiff deleted file mode 100644 index 4d68af6..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFCustomDirectory.3tiff +++ /dev/null @@ -1,302 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCUSTOMDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFCustomDirectory \- routines to create a custom directory -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCreateCustomDirectory(TIFF *tif, const TIFFFieldArray *infoarray) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCreateEXIFDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCreateGPSDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFWriteCustomDirectory(TIFF *tif, uint64 *pdiroff) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, const TIFFFieldArray *infoarray) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadGPSDirectory(TIFF *tif, toff_t diroff) -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFFieldArray *_TIFFGetExifFields(void) -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFFieldArray *_TIFFGetGpsFields(void) -.UNINDENT -.SH DESCRIPTION -.sp -The following routines create a custom directory and retrieve information -about directories in an open TIFF file. -.sp -\fI\%TIFFCreateCustomDirectory()\fP, \fI\%TIFFCreateEXIFDirectory()\fP, -\fI\%TIFFCreateGPSDirectory()\fP will setup a custom directory or one -of the predefined EXIF or GPS directories and set the context of the -TIFF\-handle \fBtif\fP to that custom directory for functions -like \fI\%TIFFSetField()\fP\&. -.sp -\fI\%TIFFWriteCustomDirectory()\fP will write the contents of the -current custom directory to the file and return the offset to that -directory in \fBpdiroff\fP\&. That offset has to be written to the main\-IFD: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C - /* Go back to the first directory, and add the EXIFIFD pointer. */ -TIFFSetDirectory(tif, 0); -TIFFSetField(tif, TIFFTAG_EXIFIFD, pdiroff); -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -\fI\%TIFFReadCustomDirectory()\fP will read the custom directory from the -arbitrary offset into the \fBinfoarray\fP and sets the context of the -TIFF\-handle \fBtif\fP to that custom directory for functions like -\fBTIFFReadField()\fP\&. The \fBTIFFFieldArray\fP \fBinfoarray\fP -has to be according the layout of the custom directory. For the predefined -EXIF and GPS directories, the relevant \fBTIFFFieldArray\fP definitions -are hidden within the functions \fI\%TIFFReadEXIFDirectory()\fP and -\fI\%TIFFReadGPSDirectory()\fP The code is very similar to \fI\%TIFFReadDirectory()\fP\&. -The offset to the custom directory diroff has to be read from the -relative TIFF tag first. -.sp -\fI\%_TIFFGetExifFields()\fP and \fI\%_TIFFGetGpsFields()\fP will -return a pointer to the \fBlibtiff\fP internal definition list of the -EXIF and GPS tags, respectively. -.SH NOTES -.sp -Be aware -.INDENT 0.0 -.IP \(bu 2 -that until a directory is not written to file AND read back, the query -functions won\(aqt retrieve the correct information! -.IP \(bu 2 -that the newly created directory will not exist on the file till -\fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP, -\fI\%TIFFFlush()\fP or \fI\%TIFFClose()\fP has been called. -.IP \(bu 2 -that \fI\%TIFFCreateDirectory()\fP and \fI\%TIFFWriteDirectory()\fP -create a new directory, free the \fB*tif\fP structure and set up a new one. -.IP \(bu 2 -that unlike \fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP -does not free up the directory data structures in memory. -.IP \(bu 2 -that LibTiff does not support custom directory chains -(NextIFD pointing to another IFD). -NextIFD of custom directories is always set to zero -and should be zero when reading. -.UNINDENT -.sp -Unfortunately to create or read custom directories with predefined fields -it is necessary to include the private tif_dir.h. However, for EXIF and -GPS directories, which have a predefined schema within \fBlibtiff\fP, this -is not necessary. There are some test programmes that briefly demonstrate -the creation and reading of EXIF, GPS and custom directories. -See test/custom_dir.c and test/custom_dir_EXIF_231.c -.sp -After \fBlibtiff\fP version 4.6.0 \fI\%TIFFCreateCustomDirectory()\fP, -\fI\%TIFFCreateEXIFDirectory()\fP and \fI\%TIFFCreateGPSDirectory()\fP also -releases the directory part of the \fItif\fP structure by calling \fI\%TIFFFreeDirectory()\fP, -which should have been called by the user application before creating a new directory. -.SH HINTS AND DETAILED INSTRUCTIONS -.sp -Writing TIFF files with more than one directory (IFD) is not easy because -some side effects need to be known. -.sp -The main point here is that there can only be one \fBtif\fP structure in -the main memory for a file, which can only hold the tags of one directory -at a time. It is useless to work with two different tiffOut1, tiffOut2 -pointers, because there is only ONE TIFF object (TIFF directory) within -the \fBlibtiff\fP\&. If you want to address a second directory in the file, -the tags of the current directory must first be saved in the file, -otherwise they will be lost (overwritten or mixed). Then the \fBtif\fP -structure in the main memory must be tidied up, otherwise the old tags -will beincluded in the new directory. -This can be done either by creating a new, empty \fBtif\fP structure or by -reading in an directory previously saved in the file. -.sp -A sequence to handle a second (or third) TIFF directory \- in this case -the GPS IFD \- is as follows: -.INDENT 0.0 -.IP 1. 3 -Create TIFF file -.IP 2. 3 -Complete the \(dqnormal\(dq metadata -.IP 3. 3 -Set the tag for the custom directory with a “dummy” value in order to -get the tag reserved. The final value will be inserted lateron. This -prevents the main directory from being written to the file again at an -additional area, leaving the first memory area unused: -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.IP 4. 3 -Save current TIFF\-directory to file. Otherwise, it will be lost. -Remember also the number of the current directory: -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFWriteDirectory(tiffOut); -dirNum = TIFFCurrentDirectory(tiffOut); -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.IP 5. 3 -Create the second TIFF\-directory (e.g. custom directory) and set its -fields. The TIFFFieldArray infoarray has to be specified beforehand -somewhere in your private include files. -An example is given for the EXIF directory in tif_dirinfo.c -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFCreateCustomDirectory(tiffOut, infoarray); /* for a real custom directory */ -/* or alternatively, use GPS or EXIF with pre\-defined TIFFFieldArray IFD field structure */ -TIFFCreateGPSDirectory(tiffOut); -TIFFSetField(tiffOut, GPSTAG_VERSIONID, gpsVersion); /* set fields of the custom directory */ -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Be aware that every \fI\%TIFFCreateDirectory()\fP or \fI\%TIFFWriteDirectory()\fP -apparently frees the \fB*tif\fP structure and sets up a new one! -.INDENT 0.0 -.IP 6. 3 -Write custom directory to file. The offset to that directory in the file -is returned in \fBdir_offset\fP\&. -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFWriteCustomDirectory(tiffOut, &dir_offset); -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.IP 7. 3 -Reload the first directory (i.e. the original TIFF directory). -Apparently, this reads the data back from file. -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFSetDirectory(tiffOut, dirNum); -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.IP 8. 3 -Set the correct offset value of the custom directory IFD tag and save -that changes to file. -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFSetField(tiffOut, TIFFTAG_GPSIFD, dir_offset); -TIFFWriteDirectory(tiffOut); -.ft P -.fi -.UNINDENT -.UNINDENT -.SH RETURN VALUES -.sp -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing the -directory contents. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFCreateDirectory\fP (3tiff), -\fI\%TIFFquery\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFCustomTagList.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFCustomTagList.3tiff deleted file mode 100644 index 1c25481..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFCustomTagList.3tiff +++ /dev/null @@ -1,81 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCUSTOMTAGLIST" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFCustomTagList \- returns information about the custom tag list -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFGetTagListCount(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFGetTagListEntry(TIFF *tif, int tag_index) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFGetTagListCount()\fP returns the number of entries in the -custom tag list. -.sp -\fI\%TIFFGetTagListEntry()\fP returns the tag number of the (n.th \- 1) -entry within the custom tag list. -If the \fBtag_index\fP is larger or equal to the number of entries -in the tag list 0xFFFFFFFF \fI(=(uint32_t(\-1))\fP is returned. -.SH NOTE -.sp -The known tags to \fBlibtiff\fP are define as \(aqnamed\(aq tags and a lot of them -as \fIcustom\fP tags. The custom tag definitions are handled in an internal -custom tag list. This list can also be extended by adding tag definitions -to that list, so that \fBlibtiff\fP is aware of those tags. -See \fI\%Defining Application Tags\fP -.SH DIAGNOSTICS -.sp -none -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFError\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFDataWidth.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFDataWidth.3tiff deleted file mode 100644 index b8cf6de..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFDataWidth.3tiff +++ /dev/null @@ -1,98 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFDATAWIDTH" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFDataWidth \- get the size of TIFF data types -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFDataWidth(TIFFDataType type) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFDataWidth()\fP returns the size of \fItype\fP within TIFF file in bytes. -Currently following data types are supported: -.INDENT 0.0 -.IP \(bu 2 -\fBTIFF_BYTE\fP -.IP \(bu 2 -\fBTIFF_ASCII\fP -.IP \(bu 2 -\fBTIFF_SBYTE\fP -.IP \(bu 2 -\fBTIFF_UNDEFINED\fP -.IP \(bu 2 -\fBTIFF_SHORT\fP -.IP \(bu 2 -\fBTIFF_SSHORT\fP -.IP \(bu 2 -\fBTIFF_LONG\fP -.IP \(bu 2 -\fBTIFF_SLONG\fP -.IP \(bu 2 -\fBTIFF_FLOAT\fP -.IP \(bu 2 -\fBTIFF_IFD\fP -.IP \(bu 2 -\fBTIFF_RATIONAL\fP -.IP \(bu 2 -\fBTIFF_SRATIONAL\fP -.IP \(bu 2 -\fBTIFF_DOUBLE\fP -.IP \(bu 2 -\fBTIFF_LONG8\fP -.IP \(bu 2 -\fBTIFF_SLONG8\fP -.IP \(bu 2 -\fBTIFF_IFD8\fP -.UNINDENT -.SH RETURN VALUES -.sp -\fI\%TIFFDataWidth()\fP returns a number of bytes occupied by the item -of given type within the TIFF file. 0 returned when unknown data type supplied. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFDeferStrileArrayWriting.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFDeferStrileArrayWriting.3tiff deleted file mode 100644 index 7d342fa..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFDeferStrileArrayWriting.3tiff +++ /dev/null @@ -1,108 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFDEFERSTRILEARRAYWRITING" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFDeferStrileArrayWriting \- defer strile array writing -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFDeferStrileArrayWriting(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFForceStrileArrayWriting(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFDeferStrileArrayWriting()\fP is an advanced writing function -that must be used in a particular sequence, and generally together -with \fI\%TIFFForceStrileArrayWriting()\fP, to achieve its intended -effect. Their aim is to control when and where the -\fBStripOffsets\fP / \fBStripByteCounts\fP or \fBTileOffsets\fP / \fBTileByteCounts\fP -arrays are written into the file. -.sp -The purpose of this is to generate \(aqcloud\-optimized geotiff\(aq files where -the first KB of the file only contain the IFD entries without the potentially -large strile arrays. Those are written afterwards. -.sp -More precisely, when \fI\%TIFFWriteCheck()\fP is called, the tag entries for -those arrays will be written with type = count = offset = 0 as a temporary value. -.sp -Its effect is only valid for the current directory, and before -\fI\%TIFFWriteDirectory()\fP is first called, and will be reset -when changing directory. -.sp -The typical sequence of calls is: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFOpen() -/* or TIFFCreateDirectory(tif) */ -/* Set fields with calls to TIFFSetField(tif, ...) */ -TIFFDeferStrileArrayWriting(tif) -TIFFWriteCheck(tif, ...) -TIFFWriteDirectory(tif) -/* ... potentially create other directories and come back to the above directory */ -TIFFForceStrileArrayWriting(tif) /* emit the arrays at the end of file */ -.ft P -.fi -.UNINDENT -.UNINDENT -.SH RETURNS -.sp -1 in case of success, 0 otherwise. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.SH NOTE -.sp -This functionality was introduced with libtiff 4.1. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFError.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFError.3tiff deleted file mode 100644 index 89ab418..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFError.3tiff +++ /dev/null @@ -1,159 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFERROR" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFError \- library error handling interface -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFError(const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef void (*TIFFErrorHandler)(const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef void (*TIFFErrorHandlerExt)(thandle_t fd, const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef int (*TIFFErrorHandlerExtR)(TIFF *tif, void *user_data, const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFErrorHandler\fP TIFFSetErrorHandler(\fI\%TIFFErrorHandler\fP handler) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFErrorHandlerExt\fP TIFFSetErrorHandlerExt(\fI\%TIFFErrorHandlerExt\fP handler) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFError()\fP invokes the library\-wide error handler function -to (normally) write an error message to \fBstderr\fP\&. -The \fIfmt\fP parameter is a \fBprintf()\fP format string, and any number -arguments can be supplied. The \fImodule\fP parameter is interpreted as a -string that, if non\-zero, should be printed before the message; it -typically is used to identify the software module in which an error is -detected. -.sp -Applications that desire to capture control in the event of an error -should use \fI\%TIFFSetErrorHandler()\fP to override the default -error handler. A \fBNULL\fP (0) error handler function may be -installed to suppress error messages. -.sp -Two more application\-specific error handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with an error message function, i.e. -\fI\%TIFFErrorExt()\fP and \fI\%TIFFErrorExtR()\fP if the application -intends to call the handler with those extended parameters. -.sp -\fI\%TIFFErrorExt()\fP provides a file handle as parameter. -Within \fBlibtiff\fP \fI\%TIFFErrorExt()\fP is called passing \fBtif\->tif_clientdata\fP -as \fIfd\fP, which represents the TIFF file handle (file descriptor). -The application\-specific and library\-wide handler for \fI\%TIFFErrorExt()\fP -is setup with \fI\%TIFFSetErrorHandlerExt()\fP\&. -.sp -\fI\%TIFFErrorExtR()\fP (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per\-TIFF handle (re\-entrant) -error handler. That means for different TIFF handles, different error -handlers can be setup. This application\-specific handler -can be setup when a TIFF file is opened with one of the following functions: -\fI\%TIFFOpenExt()\fP, \fI\%TIFFOpenWExt()\fP, \fI\%TIFFFdOpenExt()\fP -or \fI\%TIFFClientOpenExt()\fP\&. -Furthermore, a \fBcustom defined data structure\fP \fIuser_data\fP for the -error handler can be given along. -.sp -Please refer to \fI\%TIFFOpenOptions\fP for how to setup the -application\-specific handler introduced with \fBlibtiff\fP 4.5. -.SH NOTE -.sp -Both functions \fI\%TIFFError()\fP and \fI\%TIFFErrorExt()\fP -each attempt to call both handler functions if they are defined. -First \fI\%TIFFErrorHandler()\fP is called and then \fI\%TIFFErrorHandlerExt()\fP\&. -However, \fI\%TIFFError()\fP passes a \(dq0\(dq as a file handle to -\fI\%TIFFErrorHandlerExt()\fP\&. -.sp -\fI\%TIFFErrorExtR()\fP tries first to call the per\-TIFF handle defined -error handler. If \fI\%TIFFErrorHandlerExtR()\fP is not defined or -returns 0, \fI\%TIFFErrorHandler()\fP and then \fI\%TIFFErrorHandlerExt()\fP -are called. From libtiff 4.5 onwards \fI\%TIFFErrorExtR()\fP is used -within the \fBlibtiff\fP library where the TIFF handle is available. -Otherwise, \fI\%TIFFErrorExt()\fP is used! -.SH RETURN VALUES -.sp -\fI\%TIFFSetErrorHandler()\fP and \fI\%TIFFSetErrorHandlerExt()\fP -returns a reference to the previous error handler function. -.sp -\fI\%TIFFErrorHandlerExtR()\fP returns an integer as \(dqstop\(dq to control the call -of further error handler functions within \fI\%TIFFErrorExtR()\fP: -.INDENT 0.0 -.INDENT 3.5 -.INDENT 0.0 -.IP \(bu 2 -0: both functions \fI\%TIFFErrorHandler()\fP and \fI\%TIFFErrorHandlerExt()\fP are called. -.IP \(bu 2 -non\-zero: no further error message function is called. -.UNINDENT -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFWarning\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFOpenOptions\fP, -\fI\%libtiff\fP (3tiff), -printf (3) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldDataType.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldDataType.3tiff deleted file mode 100644 index ba36e66..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldDataType.3tiff +++ /dev/null @@ -1,72 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDDATATYPE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldDataType \- get TIFF data type from field information -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFDataType TIFFFieldDataType(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldDataType()\fP returns the data type stored in a TIFF field. -\fIfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, \fI\%TIFFFieldWithTag()\fP, -or \fI\%TIFFFieldWithName()\fP\&. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldDataType()\fP returns a member of the enum type -\fBTIFFDataType\fP\&. -.SH SEE ALSO -.sp -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldName.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldName.3tiff deleted file mode 100644 index 39000c3..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldName.3tiff +++ /dev/null @@ -1,71 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDNAME" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldName \- get TIFF field name from field information -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B const char *TIFFFieldName(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldName()\fP returns the textual name for a TIFF field. -\fIfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, \fI\%TIFFFieldWithTag()\fP, -or \fI\%TIFFFieldWithName()\fP\&. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldName()\fP returns a constant C string. -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldPassCount.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldPassCount.3tiff deleted file mode 100644 index 81fea0f..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldPassCount.3tiff +++ /dev/null @@ -1,86 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDPASSCOUNT" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldPassCount \- get whether to pass a count to TIFFGetField/TIFFSetField -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldPassCount(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldPassCount()\fP returns true (nonzero) if -\fI\%TIFFGetField()\fP and \fI\%TIFFSetField()\fP -expect a \fBcount\fP value to be passed before the actual data pointer. -.sp -\fBfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, -\fI\%TIFFFieldWithTag()\fP, -\fI\%TIFFFieldWithName()\fP\&. -.sp -When a \fBcount\fP is required, it will be of type \fBuint32_t\fP -if \fI\%TIFFFieldReadCount()\fP reports \fBTIFF_VARIABLE2\fP, -and of type \fBuint16_t\fP otherwise. Use \fI\%TIFFFieldWriteCount()\fP -for \fI\%TIFFSetField()\fP, respectively. (This distinction is -critical for use of \fI\%TIFFGetField()\fP, but normally not so for -use of \fI\%TIFFSetField()\fP\&.) -.sp -An alternative function for the \fBcount\fP value determination -is \fI\%TIFFFieldSetGetCountSize()\fP\&. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldPassCount()\fP returns an integer that is always 1 (true) -or 0 (false). -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldQuery.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldQuery.3tiff deleted file mode 100644 index 510d487..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldQuery.3tiff +++ /dev/null @@ -1,129 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDQUERY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldQuery \- routines to query TIFF field information -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFField *TIFFFieldWithName(TIFF *tif, const char *field_name) -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFField *TIFFFieldWithTag(TIFF *tif, uint32_t tag) -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFField *TIFFFindField(TIFF *tif, uint32_t tag, TIFFDataType dt) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldIsAnonymous(const TIFFField *fip) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldSetGetSize(const TIFFField *fip) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldSetGetCountSize(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldWithName()\fP and \fI\%TIFFFieldWithTag()\fP -return a pointer to TIFF field information structure \fIfip\fP by the tag\(aqs -\fIfield_name\fP or its \fItag\fP number. -.sp -\fI\%TIFFFindField()\fP searches for the TIFF field information structure -\fIfip\fP of a given \fItag\fP number and a specific \fITIFFDataType dt\fP\&. -With dt== \fBTIFF_ANY\fP the behaviour is the same than for -\fITIFFFieldWithTag()\fP\&. -.sp -All three functions return \fBNULL\fP, when the tag is not -registered within \fBlibtiff\fP (see also \fI\%Default Tag Auto\-registration\fP ). -.INDENT 0.0 -.INDENT 3.5 -Such a \fITIFFDataType\fP dependent search could be useful when the same -tag is defined twice but with different data types, which is true for -rare cases like TIFFTAG_XCLIPPATHUNITS. However, the \fBlibtiff\fP does -currently not support multiple definitions of the same tag. -.UNINDENT -.UNINDENT -.sp -The following routines return status information about TIFF fields. -.sp -\fBfip\fP is a field information pointer previously returned by -\fITIFFFindField()\fP, \fITIFFFieldWithTag()\fP, \fITIFFFieldWithName()\fP\&. -.sp -\fI\%TIFFFieldIsAnonymous()\fP returns true (nonzero) if the field, -read from file, is unknown to \fBlibtiff\fP and an anonymous field has -been auto\-registered. Return is zero \(dq0\(dq if field is known to \fBlibtiff\fP\&. -See \fI\%Default Tag Auto\-registration\fP for more information. -.sp -\fI\%TIFFFieldSetGetSize()\fP returns the data size in bytes of -the field data type used for \fBlibtiff\fP internal storage. -This is also the data size of the parameter to be provided to -\fI\%TIFFSetField()\fP and \fI\%TIFFGetField()\fP\&. Custom -\fBTIFF_RATIONAL\fP values can be stored internally either -as \fBfloat\fP or \fBdouble\fP\&. \fI\%TIFFFieldSetGetSize()\fP would -then return \(dq4\(dq or \(dq8\(dq, respectively. -.sp -\fI\%TIFFFieldSetGetCountSize()\fP returns size of \fBcount\fP parameter -of \fI\%TIFFSetField()\fP and \fI\%TIFFGetField()\fP and also if it is -required: 0=none, 2= \fBuint16_t\fP, 4= \fBuint32_t\fP\&. -See also description of \fI\%TIFFFieldReadCount()\fP\&. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldReadCount.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldReadCount.3tiff deleted file mode 100644 index cf1075f..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldReadCount.3tiff +++ /dev/null @@ -1,87 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDREADCOUNT" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldReadCount \- get number of values to be read from field -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldReadCount(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldReadCount()\fP returns the number of values available to be read -from the specified TIFF field; that is, the number of arguments that should be -supplied to \fI\%TIFFGetField()\fP\&. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: -.INDENT 0.0 -.IP \(bu 2 -\fBTIFF_VARIABLE\fP \fB= \-1\fP indicates that a variable number of -values is possible; then, a \fBuint16_t\fP \fIcount\fP argument and a -pointer \fIdata\fP argument must be supplied to \fI\%TIFFGetField()\fP\&. -.IP \(bu 2 -\fBTIFF_VARIABLE2\fP \fB= \-3\fP is the same as \fBTIFF_VARIABLE\fP -except that the \fIcount\fP argument must have type \fBuint32_t\fP\&. -.IP \(bu 2 -\fBTIFF_SPP\fP \fB= \-2\fP indicates that the number of arguments is -equal to the image\(aqs number of samples per pixel. -.UNINDENT -.sp -\fIfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, \fI\%TIFFFieldWithTag()\fP, or -\fI\%TIFFFieldWithName()\fP\&. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldReadCount()\fP returns an integer. -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldTag.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldTag.3tiff deleted file mode 100644 index e8ac59e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldTag.3tiff +++ /dev/null @@ -1,74 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDTAG" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldTag \- get TIFF field tag value from field information -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFFieldTag(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldTag()\fP returns the numeric tag value for a TIFF field. -This can be compared to various constants exported by the \fBlibtiff\fP -header files, such as \fBTIFFTAG_IMAGEWIDTH\fP\&. -.sp -\fIfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, \fI\%TIFFFieldWithTag()\fP, or -\fI\%TIFFFieldWithName()\fP\&. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldTag()\fP returns an integer tag value. -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldWriteCount\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFieldWriteCount.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFieldWriteCount.3tiff deleted file mode 100644 index 8dfca0a..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFieldWriteCount.3tiff +++ /dev/null @@ -1,92 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFIELDWRITECOUNT" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFieldWriteCount \- get number of values to be written to field -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFieldWriteCount(const TIFFField *fip) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFieldWriteCount()\fP returns the number of values to be written -into the specified TIFF field; that is, the number of arguments that should -be supplied to \fI\%TIFFSetField()\fP\&. For most field types this is a small -positive integer, typically 1 or 2, but there are some special values: -.INDENT 0.0 -.IP \(bu 2 -\fBTIFF_VARIABLE\fP indicates that a variable number of values is -possible; then, a \fBuint16_t\fP \fIcount\fP argument and a pointer \fIdata\fP -argument must be supplied to \fI\%TIFFSetField()\fP\&. -.IP \(bu 2 -\fBTIFF_VARIABLE2\fP is the same as \fBTIFF_VARIABLE\fP except -that the \fIcount\fP argument must have type uint32_t\&. (On most -modern machines, this makes no practical difference, and the \fIcount\fP -argument can simply be an int in either case.) -.IP \(bu 2 -\fBTIFF_SPP\fP indicates that the number of arguments must be equal -to the image\(aqs number of samples per pixel. -.UNINDENT -.sp -\fIfip\fP is a field information pointer previously returned by -\fI\%TIFFFindField()\fP, \fI\%TIFFFieldWithTag()\fP, or -\fI\%TIFFFieldWithName()\fP\&. -.sp -For most field types, \fI\%TIFFFieldWriteCount()\fP returns the same value as -\fI\%TIFFFieldReadCount()\fP, but there are some exceptions. -.SH RETURN VALUES -.sp -\fI\%TIFFFieldWriteCount()\fP returns an integer. -.SH SEE ALSO -.sp -\fI\%TIFFFieldDataType\fP (3tiff), -\fI\%TIFFFieldName\fP (3tiff), -\fI\%TIFFFieldPassCount\fP (3tiff), -\fI\%TIFFFieldQuery\fP (3tiff), -\fI\%TIFFFieldReadCount\fP (3tiff), -\fI\%TIFFFieldTag\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFFlush.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFFlush.3tiff deleted file mode 100644 index c77cdec..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFFlush.3tiff +++ /dev/null @@ -1,84 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFFLUSH" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFFlush \- flush pending writes to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFlush(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFlushData(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFFlush()\fP causes any pending writes for the specified file -(including writes for the current directory) to be done. In normal -operation this call is never needed—the library automatically does -any flushing required. -.sp -\fI\%TIFFFlushData()\fP flushes any pending image data for the specified -file to be written out; directory\-related data are not flushed. In normal -operation this call is never needed—the library automatically does any -flushing required. -.SH RETURN VALUES -.sp -0 is returned if an error is encountered, otherwise 1 is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteEncodedStrip\fP (3tiff), -\fI\%TIFFWriteEncodedTile\fP (3tiff), -\fI\%TIFFWriteRawStrip\fP (3tiff), -\fI\%TIFFWriteRawTile\fP (3tiff), -\fI\%TIFFWriteScanline\fP (3tiff), -\fI\%TIFFWriteTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFGetField.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFGetField.3tiff deleted file mode 100644 index d0c10b9..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFGetField.3tiff +++ /dev/null @@ -1,866 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFGETFIELD" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFGetField \- get the value(s) of a tag in an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFGetField(TIFF *tif, uint32_t tag, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFVGetFieldDefaulted(TIFF *tif, uint32_t tag, va_list ap) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFGetField()\fP returns the value of a tag or pseudo\-tag associated with the -the current directory of the opened TIFF file \fItif\fP\&. (A \fIpseudo\-tag\fP is a -parameter that is used to control the operation of the TIFF library but whose value -is not read or written to the underlying file.) The file must have been previously -opened with \fI\%TIFFOpen()\fP\&. The tag is identified by \fItag\fP, one of the values -defined in the include file \fBtiff.h\fP (see also the table below). The type and -number of values returned is dependent on the tag being requested. The programming -interface uses a variable argument list as prescribed by the \fBstdarg.h\fP -interface. The returned values should only be interpreted if \fI\%TIFFGetField()\fP -returns 1. -.sp -\fI\%TIFFVGetField()\fP is functionally equivalent to \fI\%TIFFGetField()\fP -except that it takes a pointer to a variable argument list. \fI\%TIFFVGetField()\fP -is useful for layering interfaces on top of the functionality provided by -\fI\%TIFFGetField()\fP\&. -.sp -\fI\%TIFFGetFieldDefaulted()\fP and \fI\%TIFFVGetFieldDefaulted()\fP are identical -to \fI\%TIFFGetField()\fP and \fI\%TIFFVGetField()\fP, respectively, except that if -a tag is not defined in the current directory and it has a default value, then the -default value is returned. -.sp -The tags understood by \fBlibtiff\fP the number of parameter values, and the -types for the returned values are shown below. The data types are specified as in C -and correspond to the types used to specify tag values to -\fI\%TIFFSetField()\fP\&. Remember that \fI\%TIFFGetField()\fP returns parameter -values, so all the listed data types are pointers to storage where values should be -returned. Consult the TIFF specification (or relevant industry specification) for -information on the meaning of each tag and their possible values. -.INDENT 0.0 -.INDENT 3.5 -.SH TAG PROPERTIES -.TS -center; -|l|l|l|l|. -_ -T{ -Tag name -T} T{ -Count -T} T{ -Types -T} T{ -Notes -T} -_ -T{ -\fBTIFFTAG_ARTIST\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_BADFAXLINES\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_BITSPERSAMPLE\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_CLEANFAXDATA\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_COLORMAP\fP -T} T{ -3 -T} T{ -const uint16_t** -T} T{ -1 << BitsPerSample arrays -T} -_ -T{ -\fBTIFFTAG_COMPRESSION\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_CONSECUTIVEBADFAXLINES\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_COPYRIGHT\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_DATATYPE\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_DATETIME\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_DOCUMENTNAME\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_DOTRANGE\fP -T} T{ -2 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_EXTRASAMPLES\fP -T} T{ -2 -T} T{ -uint16_t*, const uint16_t** -T} T{ -count, types array -T} -_ -T{ -\fBTIFFTAG_FAXFILLFUNC\fP -T} T{ -1 -T} T{ -TIFFFaxFillFunc* -T} T{ -G3/G4 compression pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_FAXMODE\fP -T} T{ -1 -T} T{ -int* -T} T{ -G3/G4 compression pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_FILLORDER\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_GROUP3OPTIONS\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_GROUP4OPTIONS\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_HALFTONEHINTS\fP -T} T{ -2 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_HOSTCOMPUTER\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_ICCPROFILE\fP -T} T{ -2 -T} T{ -const uint32_t*, const void** -T} T{ -count, profile data‡ -T} -_ -T{ -\fBTIFFTAG_IMAGEDEPTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_IMAGEDESCRIPTION\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_IMAGELENGTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_IMAGEWIDTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_INKNAMES\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_INKSET\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_JPEGCOLORMODE\fP -T} T{ -1 -T} T{ -int* -T} T{ -JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_JPEGQUALITY\fP -T} T{ -1 -T} T{ -int* -T} T{ -JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_JPEGTABLES\fP -T} T{ -2 -T} T{ -uint32_t*, const void** -T} T{ -count, tables -T} -_ -T{ -\fBTIFFTAG_JPEGTABLESMODE\fP -T} T{ -1 -T} T{ -int* -T} T{ -JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_MAKE\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_MATTEING\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_MAXSAMPLEVALUE\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_MINSAMPLEVALUE\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_MODEL\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_ORIENTATION\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PAGENAME\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_PAGENUMBER\fP -T} T{ -2 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PHOTOMETRIC\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PHOTOSHOP\fP -T} T{ -2 -T} T{ -uint32_t*, const void** -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_PLANARCONFIG\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PREDICTOR\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PRIMARYCHROMATICITIES\fP -T} T{ -1 -T} T{ -const float** -T} T{ -6\-entry array -T} -_ -T{ -\fBTIFFTAG_REFERENCEBLACKWHITE\fP -T} T{ -1 -T} T{ -const float** -T} T{ -6\-entry array -T} -_ -T{ -\fBTIFFTAG_RESOLUTIONUNIT\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_RICHTIFFIPTC\fP -T} T{ -2 -T} T{ -uint32_t*, const void** -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_ROWSPERSTRIP\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SAMPLEFORMAT\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SAMPLESPERPIXEL\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SMAXSAMPLEVALUE\fP -T} T{ -1 -T} T{ -double* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SMINSAMPLEVALUE\fP -T} T{ -1 -T} T{ -double* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SOFTWARE\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_STONITS\fP -T} T{ -1 -T} T{ -double* -T} T{ -T} -_ -T{ -\fBTIFFTAG_STRIPBYTECOUNTS\fP -T} T{ -1 -T} T{ -const uint64_t** -T} T{ -T} -_ -T{ -\fBTIFFTAG_STRIPOFFSETS\fP -T} T{ -1 -T} T{ -const uint64_t** -T} T{ -T} -_ -T{ -\fBTIFFTAG_SUBFILETYPE\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_SUBIFD\fP -T} T{ -2 -T} T{ -uint16_t*, const uint64_t** -T} T{ -count, offsets array -T} -_ -T{ -\fBTIFFTAG_TARGETPRINTER\fP -T} T{ -1 -T} T{ -const char** -T} T{ -T} -_ -T{ -\fBTIFFTAG_THRESHHOLDING\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILEBYTECOUNTS\fP -T} T{ -1 -T} T{ -const uint64_t** -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILEDEPTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILELENGTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILEOFFSETS\fP -T} T{ -1 -T} T{ -const uint64_t** -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILEWIDTH\fP -T} T{ -1 -T} T{ -uint32_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_TRANSFERFUNCTION\fP -T} T{ -1 or 3\(dg -T} T{ -const uint16_t** -T} T{ -1 << BitsPerSample entry arrays -T} -_ -T{ -\fBTIFFTAG_WHITEPOINT\fP -T} T{ -1 -T} T{ -const float** -T} T{ -2\-entry array -T} -_ -T{ -\fBTIFFTAG_XMLPACKET\fP -T} T{ -2 -T} T{ -uint32_t*, const void** -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_XPOSITION\fP -T} T{ -1 -T} T{ -float* -T} T{ -T} -_ -T{ -\fBTIFFTAG_XRESOLUTION\fP -T} T{ -1 -T} T{ -float* -T} T{ -T} -_ -T{ -\fBTIFFTAG_YCBCRCOEFFICIENTS\fP -T} T{ -1 -T} T{ -const float** -T} T{ -3\-entry array -T} -_ -T{ -\fBTIFFTAG_YCBCRPOSITIONING\fP -T} T{ -1 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_YCBCRSUBSAMPLING\fP -T} T{ -2 -T} T{ -uint16_t* -T} T{ -T} -_ -T{ -\fBTIFFTAG_YPOSITION\fP -T} T{ -1 -T} T{ -float* -T} T{ -T} -_ -T{ -\fBTIFFTAG_YRESOLUTION\fP -T} T{ -1 -T} T{ -float* -T} T{ -T} -_ -.TE -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B \(dg: -If \fBSamplesPerPixel\fP is one, then a single array is returned; otherwise -three arrays are returned. -.TP -.B ‡: -The contents of this field are quite complex. See -\(dqThe ICC Profile Format Specification\(dq, -Annex B.3 \(dqEmbedding ICC Profiles in TIFF Files\(dq (available at -\fI\%http://www.color.org\fP) for an explanation. -.UNINDENT -.SH AUTOREGISTERED TAGS -.sp -If you can\(aqt find the tag in the table above that means this is an unsupported -tag and is not directly supported by the \fBlibtiff\fP library. You will -still be able to read it\(aqs value if you know the data type of that tag. For -example, if you want to read the \fBLONG\fP value from the tag 33424 -and \fBASCII\fP string from the tag 36867 you can use the following code: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -uint32_t count; -void *data; - -TIFFGetField(tiff, 33424, &count, &data); -printf(\(dqTag %d: %d, count %d\en\(dq, 33424, *(uint32_t *)data, count); -TIFFGetField(tiff, 36867, &count, &data); -printf(\(dqTag %d: %s, count %d\en\(dq, 36867, (char *)data, count); -.ft P -.fi -.UNINDENT -.UNINDENT -.SH RETURN VALUES -.sp -1 is returned if the tag is defined in the current directory; otherwise a 0 is -returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fBUnknown field, tag 0x%x\fP: -.INDENT 0.0 -.INDENT 3.5 -An unknown tag was supplied. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFSetField\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%TIFFReadDirectory\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFMergeFieldInfo.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFMergeFieldInfo.3tiff deleted file mode 100644 index c665995..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFMergeFieldInfo.3tiff +++ /dev/null @@ -1,68 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFMERGEFIELDINFO" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFMergeFieldInfo \- add application-defined TIFF tags to the list of known libtiff tags -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFMergeFieldInfo(TIFF *tif, const TIFFFieldInfo info[], uint32_t n) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFMergeFieldInfo()\fP is used to add application\-defined TIFF tags -to the list of known \fBlibtiff\fP tags. -A brief description is given at \fI\%Defining Application Tags\fP -and a description of the \fBTIFFFieldInfo\fP array elements can be -found at \fI\%TIFFFFieldInfo definition\fP\&. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%Defining New TIFF Tags\fP, -\fI\%TIFFSetTagExtender\fP -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFOpen.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFOpen.3tiff deleted file mode 100644 index 877418f..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFOpen.3tiff +++ /dev/null @@ -1,483 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFOPEN" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFOpen \- open a TIFF file for reading or writing -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFOpen(const char *filename, const char *mode) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFOpenW(const wchar_t *name, const char *mode) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFFdOpen(const int fd, const char *filename, const char *mode) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFOpenExt(const char *filename, const char *mode, \fI\%TIFFOpenOptions\fP *opts) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFOpenWExt(const wchar_t *name, const char *mode, \fI\%TIFFOpenOptions\fP *opts) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFFdOpenExt(const int fd, const char *filename, const char *mode, \fI\%TIFFOpenOptions\fP *opts) -.UNINDENT -.INDENT 0.0 -.TP -.B const char *TIFFSetFileName(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetFileno(TIFF *tif, int fd) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetMode(TIFF *tif, int mode) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void*, tmsize_t) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef int (*TIFFCloseProc)(thandle_t) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef toff_t (*TIFFSizeProc)(thandle_t) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFClientOpen(const char *filename, const char *mode, thandle_t clientdata, \fI\%TIFFReadWriteProc\fP readproc, \fI\%TIFFReadWriteProc\fP writeproc, \fI\%TIFFSeekProc\fP seekproc, \fI\%TIFFCloseProc\fP closeproc, \fI\%TIFFSizeProc\fP sizeproc, \fI\%TIFFMapFileProc\fP mapproc, \fI\%TIFFUnmapFileProc\fP unmapproc) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFF *TIFFClientOpenExt(const char *filename, const char *mode, thandle_t clientdata, \fI\%TIFFReadWriteProc\fP readproc, \fI\%TIFFReadWriteProc\fP writeproc, \fI\%TIFFSeekProc\fP seekproc, \fI\%TIFFCloseProc\fP closeproc, \fI\%TIFFSizeProc\fP sizeproc, \fI\%TIFFMapFileProc\fP mapproc, \fI\%TIFFUnmapFileProc\fP unmapproc, \fI\%TIFFOpenOptions\fP *opts) -.UNINDENT -.INDENT 0.0 -.TP -.B thandle_t TIFFClientdata(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFOpen()\fP opens a TIFF file whose name is \fIfilename\fP -and returns a handle to be used in subsequent calls to routines in -\fBlibtiff\fP\&. If the open operation fails, then -\fBNULL\fP (0) is returned. The \fImode\fP parameter specifies if -the file is to be opened for reading (\fBr\fP) or (\fBr+\fP), writing (\fBw\fP), or -appending (\fBa\fP) and, optionally, whether to override certain -default aspects of library operation (see below \fI\%Options\fP). -.sp -The \fImode\fP (\fBr\fP) opens only an \fBexisting\fP file for reading and (\fBr+\fP) -for reading and writing. -When a file is opened for appending, existing data will not -be touched; instead new data will be written as additional subfiles. -If an existing file is opened for writing, all previous data is -overwritten. -.sp -If a file is opened for reading, the first TIFF directory in the file -is automatically read. -If a file is opened for writing or appending, a default directory -is automatically created for writing subsequent data. -This directory has all the default values specified in TIFF Revision 6.0: -.INDENT 0.0 -.IP \(bu 2 -\fBBitsPerSample\fP = 1, -.IP \(bu 2 -\fBThreshHolding\fP = \(dqbilevel art scan\(dq -.IP \(bu 2 -\fBFillOrder\fP = 1 (most significant bit of each data byte is filled first) -.IP \(bu 2 -\fBOrientation\fP = 1 (the 0th row represents the visual top of the image, -and the 0th column represents the visual left hand side), -.IP \(bu 2 -\fBSamplesPerPixel\fP = 1, -.IP \(bu 2 -\fBRowsPerStrip\fP = ∞, -.IP \(bu 2 -\fBResolutionUnit\fP = 2 (inches), and -.IP \(bu 2 -\fBCompression\fP = 1 (no compression). -.UNINDENT -.sp -To alter these values, or to define values for additional fields, -\fI\%TIFFSetField()\fP must be used. -.sp -\fI\%TIFFOpenW()\fP opens a TIFF file with a Unicode filename, for read/writing. -.sp -\fI\%TIFFFdOpen()\fP is like \fI\%TIFFOpen()\fP except that it opens a -TIFF file given an open file descriptor \fIfd\fP\&. -The file\(aqs name and mode must reflect that of the open descriptor. -Even for write\-only mode, \fBlibtiff\fP needs read permissions because -some of its functions need to read back the partially written TIFF file. -The object associated with the file descriptor \fBmust support random access\fP\&. -In order to close a TIFF file opened with \fI\%TIFFFdOpen()\fP -first \fI\%TIFFCleanup()\fP should be called to free the internal -TIFF structure without closing the file handle and afterwards the -file should be closed using its file descriptor \fIfd\fP\&. -.sp -\fI\%TIFFOpenExt()\fP (added in libtiff 4.5) is like \fI\%TIFFOpen()\fP, -but options, such as re\-entrant error and warning handlers and a limit in byte -that libtiff internal memory allocation functions are allowed to request per call -may be passed with the \fIopts\fP argument. The \fIopts\fP argument may be NULL. -Refer to \fI\%TIFFOpenOptions\fP for allocating and filling the \fIopts\fP argument -parameters. The allocated memory for \fI\%TIFFOpenOptions\fP -can be released straight after successful execution of the related -\(dqTIFFOpenExt\(dq functions. -.sp -\fI\%TIFFOpenWExt()\fP (added in libtiff 4.5) is like \fI\%TIFFOpenExt()\fP, -but opens a TIFF file with a Unicode filename. -.sp -\fI\%TIFFFdOpenExt()\fP (added in libtiff 4.5) is like \fI\%TIFFFdOpen()\fP, -but options argument \fIopts\fP like for \fI\%TIFFOpenExt()\fP can be passed. -.sp -\fI\%TIFFSetFileName()\fP sets the file name in the tif\-structure -and returns the old file name. -.sp -\fI\%TIFFSetFileno()\fP overwrites a copy of the open file\(aqs I/O descriptor, -that was saved when the TIFF file was first opened, -and returns the previous value. See note below. -.sp -\fI\%TIFFSetMode()\fP sets the \fBlibtiff\fP open mode in the tif\-structure -and returns the old mode. -.sp -\fI\%TIFFClientOpen()\fP is like \fI\%TIFFOpen()\fP except that the caller -supplies a collection of functions that the library will use to do UNIX\-like -I/O operations. The \fIreadproc\fP and \fIwriteproc\fP functions are called to read -and write data at the current file position. -\fIseekproc\fP is called to change the current file position à la \fBlseek()\fP (2). -\fIcloseproc\fP is invoked to release any resources associated with an open file. -\fIsizeproc\fP is invoked to obtain the size in bytes of a file. -\fImapproc\fP and \fIunmapproc\fP are called to map and unmap a file\(aqs contents in -memory; c.f. \fBmmap()\fP (2) and \fBmunmap()\fP (2). -The \fIclientdata\fP parameter is an opaque \(dqhandle\(dq passed to the client\-specified -routines passed as parameters to \fI\%TIFFClientOpen()\fP\&. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -In contrast to the return values of \fBmmap()\fP (2) and \fBmunmap()\fP (2), -the return values of \fImapproc\fP and \fIunmapproc\fP must be: -TRUE for success and FALSE to indicate an error. -\fBlibtiff\fP built in functions \fB_tiffMapProc()\fP and \fB_tiffUnmapProc()\fP -can be found in tif_unix.c as well as in tif_win32.c. -.UNINDENT -.UNINDENT -.sp -\fI\%TIFFClientOpenExt()\fP (added in libtiff 4.5) is like \fI\%TIFFClientOpen()\fP, -but options argument \fIopts\fP like for \fI\%TIFFOpenExt()\fP can be passed. -.sp -\fI\%TIFFClientdata()\fP returns open file\(aqs clientdata handle, -which is the real open file\(aqs I/O descriptor used by \fBlibtiff\fP\&. -Note: Within tif_unix.c this handle is converted into an integer file descriptor. -.sp -\fI\%TIFFSetClientdata()\fP sets open file\(aqs clientdata, and return previous value. -The clientdata is used as open file\(aqs I/O descriptor within \fBlibtiff\fP\&. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -\fIclientdata\fP is used as file descriptor or handle of the opened TIFF file within -\fIlibtif\fP, whereas the file descriptor \fIfd\fP (changeable by \fI\%TIFFSetFileno()\fP) -is only set once to the value of \fIclientdata\fP converted to an integer -(in tif_win32.c as well as in tif_unix.c). -When updating the file\(aqs clientdata with \fI\%TIFFSetClientdata()\fP, -the \fIfd\fP value is \fBnot\fP updated. -.UNINDENT -.UNINDENT -.SH OPTIONS -.sp -The open mode parameter can include the following flags in -addition to the \fBr\fP, \fBr+\fP, \fBw\fP, and \fBa\fP flags. -Note however that option flags must follow the read\-write\-append -specification. -.sp -Note 2: Also for \fBw\fP the file will be opened with \fIread access\fP rights -because \fBlibtiff\fP needs to read back the partially written TIFF file -for some of its functions. -.sp -\fBl\fP: -.INDENT 0.0 -.INDENT 3.5 -When creating a new file force information be written with -Little\-Endian byte order (but see below). -By default the library will create new files using the native -CPU byte order. -.UNINDENT -.UNINDENT -.sp -\fBb\fP: -.INDENT 0.0 -.INDENT 3.5 -When creating a new file force information be written with -Big\-Endian byte order (but see below). -By default the library will create new files using the native -CPU byte order. -.UNINDENT -.UNINDENT -.sp -\fBL\fP: -.INDENT 0.0 -.INDENT 3.5 -Force image data that is read or written to be treated with -bits filled from Least Significant Bit (LSB) to -Most Significant Bit (MSB). -Note that this is the opposite to the way the library has -worked from its inception. -.UNINDENT -.UNINDENT -.sp -\fBB\fP: -.INDENT 0.0 -.INDENT 3.5 -Force image data that is read or written to be treated with -bits filled from Most Significant Bit (MSB) to -Least Significant Bit (LSB); this is the default. -.UNINDENT -.UNINDENT -.sp -\fBH\fP: -.INDENT 0.0 -.INDENT 3.5 -Force image data that is read or written to be treated with -bits filled in the same order as the native -CPU. -.UNINDENT -.UNINDENT -.sp -\fBM\fP: -.INDENT 0.0 -.INDENT 3.5 -Enable the use of memory\-mapped files for images opened read\-only. -If the underlying system does not support memory\-mapped files -or if the specific image being opened cannot be memory\-mapped -then the library will fallback to using the normal system interface -for reading information. -By default the library will attempt to use memory\-mapped files. -.UNINDENT -.UNINDENT -.sp -\fBm\fP: -.INDENT 0.0 -.INDENT 3.5 -Disable the use of memory\-mapped files. -.UNINDENT -.UNINDENT -.sp -\fBC\fP: -.INDENT 0.0 -.INDENT 3.5 -Enable the use of \(dqstrip chopping\(dq when reading images -that are comprised of a single strip or tile of uncompressed data. -Strip chopping is a mechanism by which the library will automatically -convert the single\-strip image to multiple strips, -each of which has about 8 Kilobytes of data. -This facility can be useful in reducing the amount of memory used -to read an image because the library normally reads each strip -in its entirety. -Strip chopping does however alter the apparent contents of the -image because when an image is divided into multiple strips it -looks as though the underlying file contains multiple separate -strips. -Finally, note that default handling of strip chopping is a compile\-time -configuration parameter. -The default behaviour, for backwards compatibility, is to enable -strip chopping. -.UNINDENT -.UNINDENT -.sp -\fBc\fP: -.INDENT 0.0 -.INDENT 3.5 -Disable the use of strip chopping when reading images. -.UNINDENT -.UNINDENT -.sp -\fBh\fP: -.INDENT 0.0 -.INDENT 3.5 -Read TIFF header only, do not load the first image directory. That could be -useful in case of the broken first directory. We can open the file and proceed -to the other directories. -.UNINDENT -.UNINDENT -.sp -\fB4\fP: -.INDENT 0.0 -.INDENT 3.5 -ClassicTIFF for creating a file (default) -.UNINDENT -.UNINDENT -.sp -\fB8\fP: -.INDENT 0.0 -.INDENT 3.5 -BigTIFF for creating a file. -.UNINDENT -.UNINDENT -.sp -\fBD\fP: -.INDENT 0.0 -.INDENT 3.5 -Enable use of deferred strip/tile offset/bytecount array loading. They will -be loaded the first time they are accessed to. This loading will be done in -its entirety unless the O flag is also specified. -.UNINDENT -.UNINDENT -.sp -\fBO\fP: -.INDENT 0.0 -.INDENT 3.5 -On\-demand loading of values of the strip/tile offset/bytecount arrays, limited -to the requested strip/tile, instead of whole array loading (implies \fBD\fP) -.UNINDENT -.UNINDENT -.SH BYTE ORDER -.sp -The TIFF specification (\fBall versions\fP) states that compliant readers -\(dqmust be capable of reading images written in either byte order\(dq . -Nonetheless some software that claims to support the reading of -TIFF images is incapable of reading images in anything but the native -CPU byte order on which the software was written. -(Especially notorious are applications written to run on Intel\-based machines.) -By default the library will create new files with the native -byte\-order of the CPU on which the application is run. -This ensures optimal performance and is portable to any application -that conforms to the TIFF specification. -To force the library to use a specific byte\-order when creating -a new file the \fBb\fP and \fBl\fP option flags may be included in -the call to open a file; for example, \fBwb\fP or \fBwl\fP\&. -.SH RETURN VALUES -.sp -Upon successful completion -\fI\%TIFFOpen()\fP, \fI\%TIFFFdOpen()\fP, and \fI\%TIFFClientOpen()\fP -return a TIFF pointer. Otherwise, \fBNULL\fP is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.sp -\fB\(dq%s\(dq: Bad mode\fP: -.INDENT 0.0 -.INDENT 3.5 -The specified \fImode\fP parameter was not one of \fBr\fP (read), \fBw\fP (write), -or \fBa\fP (append). -.UNINDENT -.UNINDENT -.sp -\fB\(dq%s: Cannot open\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFOpen()\fP was unable to open the specified filename for read/writing. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCannot read TIFF header\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An error occurred while attempting to read the header information. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError writing TIFF header\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An error occurred while writing the default header information -for a new file. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNot a TIFF file, bad magic number %d (0x%x)\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The magic number in the header was not (hex) -0x4d4d or (hex) 0x4949. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNot a TIFF file, bad version number %d (0x%x)\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The version field in the header was not 42 (decimal). -.UNINDENT -.UNINDENT -.sp -\fB\(dqCannot append to file that has opposite byte ordering\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A file with a byte ordering opposite to the native byte -ordering of the current machine was opened for appending (\fBa\fP). -This is a limitation of the library. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFClose\fP (3tiff), -\fI\%TIFFStrileQuery\fP (3tiff), -\fI\%TIFFOpenOptions\fP -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFPrintDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFPrintDirectory.3tiff deleted file mode 100644 index e3ea82d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFPrintDirectory.3tiff +++ /dev/null @@ -1,144 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFPRINTDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFPrintDirectory \- print a description of a TIFF directory -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFPrintDirectory(TIFF *tif, FILE *fd, long flags) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFPrintDirectory()\fP prints a description of the current directory -in the specified TIFF file to the standard I/O output stream \fIfd\fP\&. -The \fIflags\fP parameter is used to control the \(dqlevel of detail\(dq -of the printed information; it is a bitwise\-or of the flags defined in -\fBtiffio.h\fP: -.TS -center; -|l|l|l|. -_ -T{ -Name -T} T{ -Value -T} T{ -Description -T} -_ -T{ -\fBTIFFPRINT_NONE\fP -T} T{ -0x0 -T} T{ -no extra info -T} -_ -T{ -\fBTIFFPRINT_STRIPS\fP -T} T{ -0x1 -T} T{ -strips/tiles info -T} -_ -T{ -\fBTIFFPRINT_CURVES\fP -T} T{ -0x2 -T} T{ -color/gray response curves -T} -_ -T{ -\fBTIFFPRINT_COLORMAP\fP -T} T{ -0x4 -T} T{ -colormap -T} -_ -T{ -\fBTIFFPRINT_JPEGQTABLES\fP -T} T{ -0x100 -T} T{ -JPEG Q matrices -T} -_ -T{ -\fBTIFFPRINT_JPEGACTABLES\fP -T} T{ -0x200 -T} T{ -JPEG AC tables -T} -_ -T{ -\fBTIFFPRINT_JPEGDCTABLES\fP -T} T{ -0x200 -T} T{ -JPEG DC tables -T} -_ -.TE -.SH NOTES -.sp -In C++ the \fIflags\fP parameter defaults to 0. -.SH RETURN VALUES -.sp -None. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadDirectory\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFProcFunctions.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFProcFunctions.3tiff deleted file mode 100644 index 2034206..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFProcFunctions.3tiff +++ /dev/null @@ -1,101 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFPROCFUNCTIONS" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFProcFunctions \- set TIFF processing functions -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFCloseProc\fP TIFFGetCloseProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFMapFileProc\fP TIFFGetMapFileProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFReadWriteProc\fP TIFFGetReadProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFSeekProc\fP TIFFGetSeekProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFSizeProc\fP TIFFGetSizeProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFUnmapFileProc\fP TIFFGetUnmapFileProc(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFReadWriteProc\fP TIFFGetWriteProc(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -The following routines return ?????? an open TIFF file. -.sp -\fI\%TIFFGetCloseProc()\fP returns a pointer to file close method. -.sp -\fI\%TIFFGetMapFileProc()\fP returns a pointer to memory mapping method. -.sp -\fI\%TIFFGetReadProc()\fP returns a pointer to file read method. -.sp -\fI\%TIFFGetSeekProc()\fP returns a pointer to file seek method. -.sp -\fI\%TIFFGetSizeProc()\fP returns a pointer to file size requesting method. -.sp -\fI\%TIFFGetUnmapFileProc()\fP returns a pointer to memory unmapping method. -.sp -\fI\%TIFFGetWriteProc()\fP returns a pointer to file write method. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFRGBAImage.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFRGBAImage.3tiff deleted file mode 100644 index 2046427..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFRGBAImage.3tiff +++ /dev/null @@ -1,334 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFRGBAIMAGE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFRGBAImage \- read and decode an image into a raster -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B typedef unsigned char TIFFRGBValue -.UNINDENT -.INDENT 0.0 -.TP -.B typedef struct _TIFFRGBAImage TIFFRGBAImage -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFRGBAImageOK(TIFF *tif, char emsg[1024]) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFRGBAImageBegin(\fI\%TIFFRGBAImage\fP *img, TIFF *tif, int stopOnError, char emsg[1024]) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFRGBAImageGet(\fI\%TIFFRGBAImage\fP *img, uint32_t *raster, uint32_t width, uint32_t height) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFRGBAImageEnd(\fI\%TIFFRGBAImage\fP *img) -.UNINDENT -.SH DESCRIPTION -.sp -The routines described here provide a high\-level interface through which -TIFF images may be read into memory. -Images may be strip\- or tile\-based and have a variety of different -characteristics: bits/sample, samples/pixel, photometric, orientation, etc. -Decoding state is encapsulated in a \fI\%TIFFRGBAImage\fP -structure making it possible to capture state for multiple images -and quickly switch between them. -The target raster format can be customized to a particular application\(aqs -needs by installing custom routines that manipulate image data -according to application requirements. -.sp -The default usage for these routines is: -.INDENT 0.0 -.IP \(bu 2 -check if an image can be processed using \fI\%TIFFRGBAImageOK()\fP -.IP \(bu 2 -construct a decoder state block using \fI\%TIFFRGBAImageBegin()\fP -.IP \(bu 2 -read and decode an image into a target raster using -\fI\%TIFFRGBAImageGet()\fP, and then -.IP \(bu 2 -release resources using \fI\%TIFFRGBAImageEnd()\fP -.UNINDENT -.sp -\fI\%TIFFRGBAImageGet()\fP can be called multiple times to decode an -image using different state parameters. -If multiple images are to be displayed and there is not enough -space for each of the decoded rasters, multiple state blocks can -be managed and then calls can be made to \fI\%TIFFRGBAImageGet()\fP -as needed to display an image. -.sp -The generated raster is assumed to be an array of -\fIwidth\fP × \fIheight\fP -32\-bit entries, where \fIwidth\fP must be less than or equal to the width of -the image (\fIheight\fP may be any non\-zero size). -If the raster dimensions are smaller than the image, the image data -is cropped to the raster bounds. -If the raster height is greater than that of the image, then the -image data are placed in the lower part of the raster. -(Note that the raster is assumed to be organized such that the pixel -at location (\fIx\fP, \fIy\fP) is \fIraster\fP [ \fIy\fP × \fIwidth\fP + \fIx\fP ]; -with the raster origin in the \fIlower\-left hand corner\fP\&.) -.sp -Raster pixels are 8\-bit packed red, green, blue, alpha samples. -The macros \fI\%TIFFGetR\fP, \fI\%TIFFGetG\fP, \fI\%TIFFGetB\fP, -and \fI\%TIFFGetA\fP should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). -.sp -\fI\%TIFFRGBAImageGet()\fP converts non\-8\-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. -.sp -The parameter \fIstopOnError\fP specifies how to act if an error is -encountered while reading the image. If \fIstopOnError\fP is non\-zero, -then an error will terminate the operation; otherwise -\fI\%TIFFRGBAImageGet()\fP will continue processing data until all the -possible data in the image have been requested. -.SH ALTERNATE RASTER FORMATS -.sp -To use the core support for reading and processing TIFF images, but -write the resulting raster data in a different format one need only -override the \(dqput methods\(dq used to store raster data. -These methods are defined in the \fI\%TIFFRGBAImage\fP -structure and initially setup by \fI\%TIFFRGBAImageBegin()\fP -to point to routines that pack raster data in the default -ABGR pixel format. -Two different routines are used according to the physical organization -of the image data in the file: -\fBPlanarConfiguration\fP = 1 (packed samples), and -\fBPlanarConfiguration\fP = 2 (separated samples). -Note that this mechanism can be used to transform the data before -storing it in the raster. -For example one can convert data to colormap indices for display on a -colormap display. -.SH SIMULTANEOUS RASTER STORE AND DISPLAY -.sp -It is simple to display an image as it is being read into memory -by overriding the put methods as described above for supporting -alternate raster formats. -Simply keep a reference to the default put methods setup by -\fI\%TIFFRGBAImageBegin()\fP and then invoke them before or after -each display operation. For example, the -\fI\%tiffgt\fP utility uses the following put method to -update the display as the raster is being filled: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -static void -putContigAndDraw(TIFFRGBAImage* img, uint32_t* raster, - uint32_t x, uint32_t y, uint32_t w, uint32_t h, - int32_t fromskew, int32_t toskew, - unsigned char* cp) -{ - (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp); - if (x+w == width) { - w = width; - if (img\->orientation == ORIENTATION_TOPLEFT) - lrectwrite(0, y\-(h\-1), w\-1, y, raster\-x\-(h\-1)*w); - else - lrectwrite(0, y, w\-1, y+h\-1, raster); - } -} -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -(the original routine provided by the library is saved in the -variable \fBputContig\fP\&.) -.SH SUPPORTING ADDITIONAL TIFF FORMATS -.sp -The \fI\%TIFFRGBAImage()\fP routines support the most commonly -encountered flavors of TIFF. It is possible to extend this support by -overriding the \(dqget method\(dq invoked by \fI\%TIFFRGBAImageGet()\fP -to read TIFF image data. -Details of doing this are a bit involved, it is best to make a copy -of an existing get method and modify it to suit the needs of an -application. -.SH NOTES -.sp -In C++ the \fIstopOnError\fP parameter defaults to 0. -.sp -\fBSamplesPerPixel\fP must be either 1, 2, 4, 8, or 16 bits. -Colorimetric samples/pixel must be either 1, 3, or 4 (i.e. -\fBSamplesPerPixel\fP minus \fBExtraSamples\fP). -.sp -Palette image colormaps that appear to be incorrectly written -as 8\-bit values are automatically scaled to 16\-bits. -.sp -Within the \fI\%TIFFRGBAImage\fP structure the TIFF orientation -and also the required orientation in the raster can be defined. -However, the lower level \fI\%TIFFRGBAImageGet()\fP functions -\- also called by \fI\%TIFFReadRGBAImage()\fP and \fI\%TIFFReadRGBAImageOriented()\fP \- -can mirror the image orientations across both axes, but cannot rotate them. -Therefore, images with a TIFF orientation of 5 (LeftTop) to 8 (LeftBottom) -are not stored correctly in the raster, as this would require an additional -rotation of 90 degrees and an exchange of width and height dimension. -.sp -If an alpha channel is used in an image, there are two common representations -that are available: straight (unassociated) alpha and premultiplied (associated) -alpha, which is specified by the value of ExtraSamples tag. -For files with unassociated alpha, the \fI\%TIFFRGBAImage()\fP reading routines -multiply the RGB values by the alpha channel values before saving them in the raster. -The other TIFFReadxxx (like \fI\%TIFFReadScanline()\fP) functions do not do this. -.SH RETURN VALUES -.sp -All routines return 1 if the operation was successful. -Otherwise, 0 is returned if an error was encountered and -\fIstopOnError\fP is zero. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqSorry, can not handle %d\-bit pictures\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBBitsPerSample\fP other than 1, 2, 4, 8, or 16. -.UNINDENT -.UNINDENT -.sp -\fB\(dqSorry, can not handle %d\-channel images\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBSamplesPerPixel\fP other than 1, 3, or 4. -.UNINDENT -.UNINDENT -.sp -\fBMissing needed \(dqPhotometricInterpretation\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -The image did not have a tag that describes how to display -the data. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming RGB\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, -but because it has 3 or 4 samples/pixel, it is assumed to be -RGB. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming min\-is\-black\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for photometric conversion table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory for a table used to convert -image samples to 8\-bit RGB. -.UNINDENT -.UNINDENT -.sp -\fBMissing required \(dqColormap\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -A Palette image did not have a required \fBColormap\fP tag. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for tile buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for strip buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCan not handle format\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has a format (combination of \fBBitsPerSample\fP, -\fBSamplesPerPixel\fP and \fBPhotometricInterpretation\fP) -that can not be handled. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for B&W mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map -grayscale data to RGB. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for Palette mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map -data to 8\-bit RGB. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBAStrip\fP (3tiff), -\fI\%TIFFReadRGBATile\fP (3tiff), -\fI\%TIFFcolor\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadDirectory.3tiff deleted file mode 100644 index c88ef05..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadDirectory.3tiff +++ /dev/null @@ -1,224 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadDirectory \- get the contents of the next directory in an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadDirectory(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -Read the next directory in the specified file and make it the current -directory. Applications only need to call \fI\%TIFFReadDirectory()\fP -to read multiple subfiles in a single TIFF file—(the first directory -in a file is automatically read when \fI\%TIFFOpen()\fP is called. -.SH NOTES -.sp -If the library is compiled with \fBSTRIPCHOP_SUPPORT\fP enabled, then -images that have a single uncompressed strip or tile of data are -automatically treated as if they were made up of multiple strips or tiles of -approximately 8 kilobytes each. This operation is done only in\-memory; it does -not alter the contents of the file. However, the construction of the \(dqchopped -strips\(dq is visible to the application through the number of strips [tiles] -returned by \fI\%TIFFNumberOfStrips()\fP [\fI\%TIFFNumberOfTiles()\fP]. -.SH RETURN VALUES -.sp -If the next directory was successfully read, 1 is returned. Otherwise, 0 is -returned if an error was encountered, or if there are no more directories to -be read. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.sp -\fBSeek error accessing TIFF directory\fP: -.INDENT 0.0 -.INDENT 3.5 -An error occurred while positioning to the location of the -directory. -.UNINDENT -.UNINDENT -.sp -\fBWrong data type %d for field \(dq%s\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The tag entry in the directory had an incorrect data type. -For example, an \fBImageDescription\fP tag with a \fBSHORT\fP -data type. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dq%s\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The specified tag is required to be present by the TIFF -5.0 specification, but is missing. -The directory is (usually) unusable. -.UNINDENT -.UNINDENT -.sp -\fB%s: Rational with zero denominator\fP: -.INDENT 0.0 -.INDENT 3.5 -A directory tag has a \fBRATIONAL\fP value whose denominator is zero. -.UNINDENT -.UNINDENT -.sp -\fBIncorrect count %d for field \(dq%s\(dq (%lu, expecting %lu); tag ignored\fP: -.INDENT 0.0 -.INDENT 3.5 -The specified tag\(aqs count field is bad. -For example, a count other than 1 for a \fBSubFileType\fP tag. -.UNINDENT -.UNINDENT -.sp -\fBCannot handle different per\-sample values for field \(dq%s\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The tag has \fBSamplesPerPixel\fP values and they are not all the same; e.g. -\fBBitsPerSample\fP\&. The library is unable to handle images of this sort. -.UNINDENT -.UNINDENT -.sp -\fBCount mismatch for field \(dq%s\(dq; expecting %d, got %d\fP: -.INDENT 0.0 -.INDENT 3.5 -The count field in a tag does not agree with the number expected by the -library. This should never happen, so if it does, the library refuses to -read the directory. -.UNINDENT -.UNINDENT -.sp -\fBInvalid TIFF directory; tags are not sorted in ascending order\fP: -.INDENT 0.0 -.INDENT 3.5 -The directory tags are not properly sorted as specified -in the TIFF 5.0 specification. This error is not fatal. -.UNINDENT -.UNINDENT -.sp -\fBIgnoring unknown field with tag %d (0x%x)\fP: -.INDENT 0.0 -.INDENT 3.5 -An unknown tag was encountered in the directory; -the library ignores all such tags. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqImageLength\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The image violates the specification by not having a necessary field. -There is no way for the library to recover from this error. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqPlanarConfig\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The image violates the specification by not having a necessary field. -There is no way for the library to recover from this error. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqStripOffsets\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has multiple strips, but is missing the tag that -specifies the file offset to each strip of data. -There is no way for the library to recover from this error. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqTileOffsets\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has multiple tiles, but is missing the tag that -specifies the file offset to each tile of data. -There is no way for the library to recover from this error. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqStripByteCounts\(dq field\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has multiple strips, but is missing the tag that -specifies the size of each strip of data. -There is no way for the library to recover from this error. -.UNINDENT -.UNINDENT -.sp -\fBTIFF directory is missing required \(dqStripByteCounts\(dq field, calculating from imagelength\fP: -.INDENT 0.0 -.INDENT 3.5 -The image violates the specification by not having a necessary field. -However, when the image is comprised of only one strip or tile, the -library will estimate the missing value based on the file size. -.UNINDENT -.UNINDENT -.sp -\fBBogus \(dqStripByteCounts\(dq field, ignoring and calculating from imagelength\fP: -.INDENT 0.0 -.INDENT 3.5 -Certain vendors violate the specification by writing zero for -the StripByteCounts tag when they want to leave the value -unspecified. -If the image has a single strip, the library will estimate -the missing value based on the file size. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFCreateDirectory\fP (3tiff), -\fI\%TIFFCustomDirectory\fP (3tiff), -\fI\%TIFFquery\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%Multi Page / Multi Image TIFF\fP, -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedStrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedStrip.3tiff deleted file mode 100644 index 40cae01..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedStrip.3tiff +++ /dev/null @@ -1,87 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADENCODEDSTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadEncodedStrip \- read and decode a strip of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Read the specified strip of data and place up to \fIsize\fP bytes of decompressed -information in the (user supplied) data buffer. -.SH NOTES -.sp -The value of \fIstrip\fP is a \(dqraw strip number\(dq. That is, the caller must take -into account whether or not the data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by \fI\%TIFFStripSize()\fP\&. -If \-1 is passed in the \fIsize\fP parameter, the whole strip will be read. You -should be sure you have enough space allocated for the buffer. -.sp -The library attempts to hide bit\- and byte\-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the \fBFillOrder\fP tag is opposite to the native -machine bit order. 16\- and 32\-bit samples are automatically byte\-swapped if -the file was written with a byte order opposite to the native machine byte -order. -.SH RETURN VALUES -.sp -The actual number of bytes of data that were placed in \fIbuf\fP is returned; -\fI\%TIFFReadEncodedStrip()\fP returns \-1 if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadRawStrip\fP (3tiff), -\fI\%TIFFReadScanline\fP (3tiff), -\fI\%TIFFReadEncodedTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedTile.3tiff deleted file mode 100644 index 57c43bd..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadEncodedTile.3tiff +++ /dev/null @@ -1,87 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADENCODEDTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadEncodedTile \- read and decode a tile of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Read the specified tile of data and place up to \fIsize\fP bytes of decompressed -information in the (user supplied) data buffer. -.SH NOTES -.sp -The value of \fItile\fP is a \(dqraw tile number\(dq. That is, the caller must take -into account whether or not the data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -\fI\%TIFFComputeTile()\fP automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should be at least as large as the value returned by -\fI\%TIFFTileSize()\fP\&. -.sp -The library attempts to hide bit\- and byte\-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the \fBFillOrder\fP tag is opposite to the native -machine bit order. 16\- and 32\-bit samples are automatically byte\-swapped if -the file was written with a byte order opposite to the native machine byte -order. -.SH RETURN VALUES -.sp -The actual number of bytes of data that were placed in \fIbuf\fP is returned; -\fI\%TIFFReadEncodedTile()\fP returns \-1 if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadRawTile\fP (3tiff), -\fI\%TIFFReadTile\fP (3tiff), -\fI\%TIFFReadEncodedStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadFromUserBuffer.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadFromUserBuffer.3tiff deleted file mode 100644 index 7dec343..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadFromUserBuffer.3tiff +++ /dev/null @@ -1,77 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADFROMUSERBUFFER" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadFromUserBuffer \- decode data using an user defined buffer -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadFromUserBuffer(TIFF *tif, uint32_t strile, void *inbuf, tmsize_t insize, void *outbuf, tmsize_t outsize) -.UNINDENT -.SH DESCRIPTION -.sp -Use the provided input buffer (\fIinbuf\fP, \fIinsize\fP) and decompress it -into (\fIoutbuf\fP, \fIoutsize\fP). This function replaces the use of -\fI\%TIFFReadEncodedStrip()\fP / \fI\%TIFFReadEncodedTile()\fP -when the user can provide the buffer for the input data, for example when -he wants to avoid \fBlibtiff\fP to read the strile offset/count values from the -\fBStripOffsets\fP / \fBStripByteCounts\fP or \fBTileOffsets\fP / -\fBTileByteCounts\fP arrays. \fIinbuf\fP content must be writable -(if bit reversal is needed). -.SH RETURN VALUES -.sp -Returns 1 in case of success, 0 otherwise. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadRawStrip\fP (3tiff), -\fI\%TIFFReadScanline\fP (3tiff), -\fI\%TIFFReadEncodedStrip\fP (3tiff), -\fI\%TIFFReadEncodedTile\fP (3tiff), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAImage.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAImage.3tiff deleted file mode 100644 index a7a1300..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAImage.3tiff +++ /dev/null @@ -1,242 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADRGBAIMAGE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadRGBAImage \- read and decode an image into a fixed-format raster -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFGetR(abgr) -((abgr)&0xff) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFGetG(abgr) -(((abgr) >> 8) & 0xff) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFGetB(abgr) -(((abgr) >> 16) & 0xff) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFGetA(abgr) -(((abgr) >> 24) & 0xff) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBAImage(TIFF *tif, uint32_t width, uint32_t height, uint32_t *raster, int stopOnError) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t width, uint32_t height, uint32_t *raster, int orientation, int stopOnError) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFReadRGBAImage()\fP reads a strip\- or tile\-based image into memory, -storing the result in the user supplied \fIraster\fP\&. -The raster is assumed to be an array of \fIwidth\fP × \fIheight\fP 32\-bit entries, -where \fIwidth\fP must be less than or equal to the width of the image -(\fIheight\fP may be any non\-zero size). -If the raster dimensions are smaller than the image, the image data is -cropped to the raster bounds. -If the raster height is greater than that of the image, then the image data -are placed in the lower part of the raster. -(Note that the raster is assume to be organized such that the pixel -at location (\fIx\fP, \fIy\fP) is \fIraster\fP [ \fIy\fP × \fIwidth\fP + \fIx\fP ]; -with the raster origin in the lower\-left hand corner.) -.sp -\fI\%TIFFReadRGBAImageOriented()\fP works like \fI\%TIFFReadRGBAImage()\fP -except that the user can specify the raster origin position with the -\fIorientation\fP parameter. Four orientations are supported: -.INDENT 0.0 -.IP \(bu 2 -\fBORIENTATION_TOPLEFT\fP: origin in top\-left corner, -.IP \(bu 2 -\fBORIENTATION_TOPRIGHT\fP: origin in top\-right corner, -.IP \(bu 2 -\fBORIENTATION_BOTLEFT\fP: origin in bottom\-left corner -.IP \(bu 2 -\fBORIENTATION_BOTRIGHT\fP: origin in bottom\-right corner. -.UNINDENT -.sp -If you choose \fBORIENTATION_BOTLEFT\fP, the result will be the same -as returned by the \fI\%TIFFReadRGBAImage()\fP\&. -.sp -Raster pixels are 8\-bit packed red, green, blue, alpha samples. -The macros \fI\%TIFFGetR\fP, \fI\%TIFFGetG\fP, \fI\%TIFFGetB\fP, -and \fI\%TIFFGetA\fP should be used to access individual samples. -Images without Associated Alpha matting information have a constant -Alpha of 1.0 (255). -.sp -\fI\%TIFFReadRGBAImage()\fP converts non\-8\-bit images by scaling sample -values. Palette, grayscale, bilevel, CMYK, and YCbCr images are -converted to RGB transparently. -Raster pixels are returned uncorrected by any colorimetry information -present in the directory. -.sp -The parameter \fIstopOnError\fP specifies how to act if an error is -encountered while reading the image. If \fIstopOnError\fP is non\-zero, then -an error will terminate the operation; otherwise \fI\%TIFFReadRGBAImage()\fP -will continue processing data until all the possible data in the -image have been requested. -.SH NOTES -.sp -\fBIFFReadRGBAImage()\fP is just a wrapper around the more general -\fI\%TIFFRGBAImage\fP facilities. -.sp -For general notes see -\fI\%TIFFRGBImage notes\fP\&. -.SH RETURN VALUES -.sp -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered and -\fIstopOnError\fP is zero. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqSorry, can not handle %d\-bit pictures\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBBitsPerSample\fP other than 1, 2, 4, 8, or 16. -.UNINDENT -.UNINDENT -.sp -\fB\(dqSorry, can not handle %d\-channel images\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBSamplesPerPixel\fP other than 1, 3, or 4. -.UNINDENT -.UNINDENT -.sp -\fBMissing needed \(dqPhotometricInterpretation\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -The image did not have a tag that describes how to display -the data. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming RGB\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, -but because it has 3 or 4 samples/pixel, it is assumed to be -RGB. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming min\-is\-black\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for photometric conversion table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory for a table used to convert -image samples to 8\-bit RGB. -.UNINDENT -.UNINDENT -.sp -\fBMissing required \(dqColormap\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -A Palette image did not have a required \fBColormap\fP tag. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for tile buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for strip buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCan not handle format\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has a format (combination of \fBBitsPerSample\fP, -\fBSamplesPerPixel\fP, and \fBPhotometricInterpretation\fP) -that \fI\%TIFFReadRGBAImage()\fP can not handle. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for B&W mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map -grayscale data to RGB. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for Palette mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map -data to 8\-bit RGB. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBAStrip\fP (3tiff), -\fI\%TIFFReadRGBATile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAStrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAStrip.3tiff deleted file mode 100644 index 0bba4ad..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBAStrip.3tiff +++ /dev/null @@ -1,203 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADRGBASTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadRGBAStrip \- read and decode an image strip into a fixed-format raster -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBAStrip(TIFF *tif, uint32_t row, uint32_t *raster) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, int stop_on_error) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFReadRGBAStrip()\fP reads a single strip of a strip\-based image -into memory, storing the result in the user supplied RGBA \fIraster\fP\&. -The raster is assumed to be an array of \fBImageWidth\fP × \fBRowsPerStrip\fP -32\-bit entries, where \fBImageWidth\fP is the width of the image -(\fBTIFFTAG_IMAGEWIDTH\fP) and \fBRowsPerStrip\fP is the maximum lines -in a strip (\fBTIFFTAG_ROWSPERSTRIP\fP). -.sp -\fI\%TIFFReadRGBAStripExt()\fP provides the parameter \fIstop_on_error\fP\&. -Its behaviour is described at \fI\%TIFFReadRGBAImage\fP\&. -.sp -The \fIrow\fP value should be the row of the first row in the strip -(\fIstrip\fP × \fBRowsPerStrip\fP, zero based). -.sp -Note that the raster is assume to be organized such that the pixel at location -(\fIx\fP, \fIy\fP) is \fIraster\fP [ \fIy\fP × \fIwidth\fP + \fIx\fP ]; with the raster origin in the -\fIlower\-left hand corner\fP of the strip. That is bottom to top organization. -When reading a partial last strip in the file the last line of the image will -begin at the beginning of the buffer. -.sp -Raster pixels are 8\-bit packed red, green, blue, alpha samples. The macros -\fI\%TIFFGetR\fP, \fI\%TIFFGetG\fP, \fI\%TIFFGetB\fP, and -\fI\%TIFFGetA\fP should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). -.sp -See the \fI\%TIFFRGBAImage\fP page for more details on how various image types -are converted to RGBA values. -.SH NOTES -.sp -\fI\%TIFFReadRGBAStrip()\fP is just a wrapper around the more general -\fI\%TIFFRGBAImage\fP facilities. It\(aqs main advantage over the similar -\fI\%TIFFReadRGBAImage()\fP function is that for large images a single -buffer capable of holding the whole image doesn\(aqt need to be allocated, -only enough for one strip. The \fI\%TIFFReadRGBATile()\fP function -does a similar operation for tiled images. -.sp -For general notes see -\fI\%TIFFRGBImage notes\fP\&. -.SH RETURN VALUES -.sp -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqSorry, can not handle %d\-bit pictures\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBBitsPerSample\fP other than 1, 2, 4, 8, or 16. -.UNINDENT -.UNINDENT -.sp -\fB\(dqSorry, can not handle %d\-channel images\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBSamplesPerPixel\fP other than 1, 3, or 4. -.UNINDENT -.UNINDENT -.sp -\fBMissing needed \(dqPhotometricInterpretation\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -The image did not have a tag that describes how to display the data. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming RGB\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, but because it -has 3 or 4 samples/pixel, it is assumed to be RGB. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming min\-is\-black\efP\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, but -because it has 1 sample/pixel, it is assumed to be a grayscale or -bilevel image. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for photometric conversion table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory for a table used to convert image samples to -8\-bit RGB. -.UNINDENT -.UNINDENT -.sp -\fBMissing required \(dqColormap\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -A Palette image did not have a required \fBColormap\fP tag. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for tile buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for strip buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCan not handle format\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has a format (combination of \fBBitsPerSample\fP, -\fBSamplesPerPixel\fP, and \fBPhotometricInterpretation\fP) -that \fI\%TIFFReadRGBAImage()\fP can not handle. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for B&W mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map grayscale data -to RGB. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for Palette mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map data to 8\-bit -RGB. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBATile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBATile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBATile.3tiff deleted file mode 100644 index 13cc19c..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadRGBATile.3tiff +++ /dev/null @@ -1,205 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADRGBATILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadRGBATile \- read and decode an image tile into a fixed-format raster -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBATile(TIFF *tif, uint32_t x, uint32_t y, uint32_t *raster) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, int stop_on_error) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFReadRGBATile()\fP reads a single tile of a tile\-based image into -memory, storing the result in the user supplied RGBA \fIraster\fP\&. -The raster is assumed to be an array of \fBTileWidth\fP × \fBTileLength\fP -32\-bit entries, where \fBTileWidth\fP is the width of a tile -(\fBTIFFTAG_TILEWIDTH\fP) and \fBTileLength\fP is the height of a -tile (\fBTIFFTAG_TILELENGTH\fP). -.sp -\fI\%TIFFReadRGBATileExt()\fP provides the parameter \fIstop_on_error\fP\&. -Its behaviour is described at \fI\%TIFFReadRGBAImage\fP\&. -.sp -The \fIx\fP and \fIy\fP values are the offsets from the top left corner to the top -left corner of the tile to be read. They must be an exact multiple of the -tile width and length. -.sp -Note that the raster is assume to be organized such that the pixel at -location -(\fIx\fP, \fIy\fP) is \fIraster\fP [ \fIy\fP × \fIwidth\fP + \fIx\fP ]; with the raster origin -in the \fIlower\-left hand corner\fP of the tile. That is bottom to top -organization. Edge tiles which partly fall off the image will be filled -out with appropriate zeroed areas. -.sp -Raster pixels are 8\-bit packed red, green, blue, alpha samples. The macros -\fI\%TIFFGetR\fP, \fI\%TIFFGetG\fP, \fI\%TIFFGetB\fP, and -\fI\%TIFFGetA\fP should be used to access individual samples. Images -without Associated Alpha matting information have a constant Alpha of 1.0 -(255). -.sp -See the \fI\%TIFFRGBAImage\fP page for more details on how various image -types are converted to RGBA values. -.SH NOTES -.sp -\fI\%TIFFReadRGBATile()\fP is just a wrapper around the more general -\fI\%TIFFRGBAImage\fP facilities. It\(aqs main advantage over the similar -\fI\%TIFFReadRGBAImage()\fP function is that for large images a single -buffer capable of holding the whole image doesn\(aqt need to be allocated, -only enough for one tile. The \fI\%TIFFReadRGBAStrip()\fP function -does a similar operation for stripped images. -.sp -For general notes see -\fI\%TIFFRGBImage notes\fP\&. -.SH RETURN VALUES -.sp -1 is returned if the image was successfully read and converted. -Otherwise, 0 is returned if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqSorry, can not handle %d\-bit pictures\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBBitsPerSample\fP other than 1, 2, 4, 8, or 16. -.UNINDENT -.UNINDENT -.sp -\fB\(dqSorry, can not handle %d\-channel images\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image had \fBSamplesPerPixel\fP other than 1, 3, or 4. -.UNINDENT -.UNINDENT -.sp -\fBMissing needed \(dqPhotometricInterpretation\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -The image did not have a tag that describes how to display the data. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming RGB\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, but because it -has 3 or 4 samples/pixel, it is assumed to be RGB. -.UNINDENT -.UNINDENT -.sp -\fBNo \(dqPhotometricInterpretation\(dq tag, assuming min\-is\-black\fP: -.INDENT 0.0 -.INDENT 3.5 -The image was missing a tag that describes how to display it, -but because it has 1 sample/pixel, it is assumed to be a grayscale -or bilevel image. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for photometric conversion table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory for a table used to convert -image samples to 8\-bit RGB. -.UNINDENT -.UNINDENT -.sp -\fBMissing required \(dqColormap\(dq tag\fP: -.INDENT 0.0 -.INDENT 3.5 -A Palette image did not have a required \fBColormap\fP tag. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for tile buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for strip buffer\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate an i/o buffer. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCan not handle format\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The image has a format (combination of \fBBitsPerSample\fP, -\fBSamplesPerPixel\fP, and \fBPhotometricInterpretation\fP) -that \fI\%TIFFReadRGBAImage()\fP can not handle. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for B&W mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map -grayscale data to RGB. -.UNINDENT -.UNINDENT -.sp -\fB\(dqNo space for Palette mapping table\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was insufficient memory to allocate a table used to map data to 8\-bit -RGB. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBAImage\fP (3tiff), -\fI\%TIFFReadRGBAStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadRawStrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadRawStrip.3tiff deleted file mode 100644 index 8d29c7e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadRawStrip.3tiff +++ /dev/null @@ -1,75 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADRAWSTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadRawStrip \- return the undecoded contents of a strip of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFReadRawStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Read the contents of the specified strip into the (user supplied) data buffer. -Note that the value of \fIstrip\fP is a \(dqraw strip number\(dq. That is, the caller -must take into account whether or not the data is organized in separate planes -(\fBPlanarConfiguration\fP = 2). -To read a full strip of data the data buffer should typically be at least as -large as the number returned by \fI\%TIFFStripSize()\fP\&. -.SH RETURN VALUES -.sp -The actual number of bytes of data that were placed in \fIbuf\fP is returned; -\fI\%TIFFReadRawStrip()\fP returns \-1 if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadEncodedStrip\fP (3tiff), -\fI\%TIFFReadScanline\fP (3tiff), -\fI\%TIFFstrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadRawTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadRawTile.3tiff deleted file mode 100644 index 9ad4950..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadRawTile.3tiff +++ /dev/null @@ -1,77 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADRAWTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadRawTile \- return an undecoded tile of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFReadRawTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Read the contents of the specified tile into the (user supplied) data buffer. -Note that the value of \fItile\fP is a \(dqraw tile number\(dq. That is, the caller -must take into account whether or not the data is organized in separate planes -(\fBPlanarConfiguration\fP = 2). -\fI\%TIFFComputeTile()\fP automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. To read a full tile -of data the data buffer should typically be at least as large as the value -returned by \fI\%TIFFTileSize()\fP\&. -.SH RETURN VALUES -.sp -The actual number of bytes of data that were placed in \fIbuf\fP is returned; -\fI\%TIFFReadRawTile()\fP returns \-1 if an error was encountered. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadEncodedTile\fP (3tiff), -\fI\%TIFFReadTile\fP (3tiff), -\fI\%TIFFtile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadScanline.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadScanline.3tiff deleted file mode 100644 index e9a4283..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadScanline.3tiff +++ /dev/null @@ -1,106 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADSCANLINE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadScanline \- read and decode a scanline of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample) -.UNINDENT -.SH DESCRIPTION -.sp -Read the data for the specified row into the (user supplied) data buffer -\fIbuf\fP\&. The data are returned decompressed and, in the native byte\- and -bit\-ordering, but are otherwise packed (see further below). The buffer -must be large enough to hold an entire scanline of data. Applications -should call the routine \fI\%TIFFScanlineSize()\fP to find out the size -(in bytes) of a scanline buffer. -The \fIrow\fP parameter is always used by \fI\%TIFFReadScanline()\fP; the -\fIsample\fP parameter is used only if data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -.SH NOTES -.sp -The library attempts to hide bit\- and byte\-ordering differences between the -image and the native machine by converting data to the native machine order. -Bit reversal is done if the \fBFillOrder\fP tag is opposite to the native -machine bit order. 16\- and 32\-bit samples are automatically byte\-swapped if -the file was written with a byte order opposite to the native machine byte -order, -.sp -In C++ the \fIsample\fP parameter defaults to 0. -.SH RETURN VALUES -.sp -\fI\%TIFFReadScanline()\fP returns \-1 if it detects an error; otherwise 1 is -returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqCompression algorithm does not support random access\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -Data was requested in a non\-sequential order from a file that uses a -compression algorithm and that has \fBRowsPerStrip\fP greater than one. -That is, data in the image is stored in a compressed form, and with multiple -rows packed into a strip. In this case, the library does not support random -access to the data. The data should either be accessed sequentially, or the -file should be converted so that each strip is made up of one row of data. -.UNINDENT -.UNINDENT -.SH BUGS -.sp -Reading subsampled YCbCR data does not work correctly because, for -\fBPlanarConfiguration\fP = 2, the size of a scanline is not calculated on a -per\-sample basis, and for \fBPlanarConfiguration\fP = 1, the library does not -unpack the block\-interleaved samples; use the strip\- and -tile\-based interfaces to read these formats. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadEncodedStrip\fP (3tiff), -\fI\%TIFFReadRawStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFReadTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFReadTile.3tiff deleted file mode 100644 index 48f2bab..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFReadTile.3tiff +++ /dev/null @@ -1,87 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFREADTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFReadTile \- read and decode a tile of data from an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) -.UNINDENT -.SH DESCRIPTION -.sp -Return the data for the tile \fIcontaining\fP the specified coordinates. The -data placed in \fIbuf\fP are returned decompressed and, typically, in the -native byte\- and bit\-ordering, but are otherwise packed (see further -below). The buffer must be large enough to hold an entire tile of data. -Applications should call the routine \fI\%TIFFTileSize()\fP to find out -the size (in bytes) of a tile buffer. The \fIx\fP and \fIy\fP parameters are -always used by \fI\%TIFFReadTile()\fP\&. The \fIz\fP parameter is used if the -image is deeper than 1 slice (\fBImageDepth\fP > 1). The \fIsample\fP -parameter is used only if data are organized in separate planes ( -\fBPlanarConfiguration\fP = 2). -.SH NOTES -.sp -The library attempts to hide bit\- and byte\-ordering differences between -the image and the native machine by converting data to the native machine -order. Bit reversal is done if the \fBFillOrder\fP tag is opposite to the -native machine bit order. 16\- and 32\-bit samples are automatically -byte\-swapped if the file was written with a byte order opposite to the -native machine byte order. -.SH RETURN VALUES -.sp -\fI\%TIFFReadTile()\fP returns \-1 if it detects an error; otherwise the -number of bytes in the decoded tile is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFtile\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadEncodedTile\fP (3tiff), -\fI\%TIFFReadRawTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFSetDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFSetDirectory.3tiff deleted file mode 100644 index 243ccae..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFSetDirectory.3tiff +++ /dev/null @@ -1,111 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSETDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFSetDirectory \- set the current directory for an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetDirectory(TIFF *tif, tdir_t dirnum) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetSubDirectory(TIFF *tif, uint64_t diroff) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFSetDirectory()\fP changes the current directory and reads its -contents with \fI\%TIFFReadDirectory()\fP\&. The parameter \fIdirnum\fP -specifies the subfile/directory as an integer number, with the first -directory numbered zero. -\fI\%TIFFSetDirectory()\fP only works with main\-IFD chains because -always starts with the first main\-IFD and thus is able to reset -the SubIFD reading chain to the main\-IFD chain. -.sp -\fI\%TIFFSetSubDirectory()\fP acts like \fI\%TIFFSetDirectory()\fP, -except the directory is specified as a file offset instead of an index; -this is required for accessing subdirectories linked through a -\fBSubIFD\fP tag. (see \fI\%MultiPage SubIFD\fP) -.sp -Directory query functions \fI\%TIFFCurrentDirectory()\fP, -\fI\%TIFFCurrentDirOffset()\fP, \fI\%TIFFLastDirectory()\fP and -\fI\%TIFFNumberOfDirectories()\fP retrieve information about directories -in an open TIFF file. Be aware that until a directory is -not written to file AND read back, the query functions won\(aqt retrieve -the correct information! -.SH RETURN VALUES -.sp -On successful return 1 is returned. Otherwise, 0 is returned if \fIdirnum\fP -or \fIdiroff\fP specifies a non\-existent directory, or if an error was -encountered while reading the directory\(aqs contents. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dq%s: Error fetching directory count\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An error was encountered while reading the \(dqdirectory count\(dq field. -.UNINDENT -.UNINDENT -.sp -\fB\(dq%s: Error fetching directory link\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An error was encountered while reading the \(dqlink value\(dq that points to the -next directory in a file. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFquery\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFCreateDirectory\fP (3tiff), -\fI\%TIFFCustomDirectory\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff), -\fI\%TIFFReadDirectory\fP (3tiff), -\fI\%Multi Page / Multi Image TIFF\fP, -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFSetField.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFSetField.3tiff deleted file mode 100644 index afaf985..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFSetField.3tiff +++ /dev/null @@ -1,872 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSETFIELD" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFSetField \- set the value(s) of a tag in a TIFF file open for writing -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -#include \(dq -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetField(TIFF *tif, uint32_t tag, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFUnsetField(TIFF *tif, uint32_t tag) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFSetField()\fP sets the value of a field or pseudo\-tag in the -current directory associated with the open TIFF file \fItif\fP\&. -(A \fIpseudo\-tag\fP is a parameter that is used to control the operation of -the TIFF library but whose value is not read or written to the underlying -file.) To set the value of a field the file must have been previously -opened for writing with \fI\%TIFFOpen()\fP\&. -Pseudo\-tags can be set whether the file was opened for reading or writing. -The field is identified by \fItag\fP, one of the values defined in the include -file \fBtiff.h\fP (see also the table below). -The actual value is specified using a variable argument list, as -prescribed by the \fBstdarg.h\fP interface. -.sp -\fI\%TIFFVSetField()\fP is functionally equivalent to \fI\%TIFFSetField()\fP -except that it takes a pointer to a variable argument list. -\fI\%TIFFVSetField()\fP is useful for writing routines that are layered on -top of the functionality provided by \fI\%TIFFSetField()\fP\&. -.sp -\fI\%TIFFUnsetField()\fP clears the contents of the field in the internal -structure. If it is a custom field, it is removed from the list of known tags. -.sp -The tags understood by \fBlibtiff\fP, the number of parameter values, -and the expected types for the parameter values are shown below. -The data types are: -.SH TAG DATA TYPES -.TS -center; -|l|l|. -_ -T{ -Type -T} T{ -Description -T} -_ -T{ -char* -T} T{ -a null\-terminated string corresponding to the \fBASCII\fP data type -T} -_ -T{ -uint16_t -T} T{ -an unsigned 16\-bit value -T} -_ -T{ -uint32_t -T} T{ -an unsigned 32\-bit value; -T} -_ -T{ -uint16_t* -T} T{ -an array of unsigned 16\-bit values. -T} -_ -T{ -void* -T} T{ -an array of data values of unspecified type. -T} -_ -.TE -.sp -Consult the TIFF specification for information on the meaning of each tag. -.INDENT 0.0 -.INDENT 3.5 -.SH TAG PROPERTIES -.TS -center; -|l|l|l|l|. -_ -T{ -Tag name -T} T{ -Count -T} T{ -Types -T} T{ -Notes -T} -_ -T{ -\fBTIFFTAG_ARTIST\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_BADFAXLINES\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_BITSPERSAMPLE\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_CLEANFAXDATA\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_COLORMAP\fP -T} T{ -3 -T} T{ -uint16_t* -T} T{ -1 << BitsPerSample arrays -T} -_ -T{ -\fBTIFFTAG_COMPRESSION\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_CONSECUTIVEBADFAXLINES\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_COPYRIGHT\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_DATETIME\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_DOCUMENTNAME\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_DOTRANGE\fP -T} T{ -2 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_EXTRASAMPLES\fP -T} T{ -2 -T} T{ -uint16_t, uint16_t* -T} T{ -\(dg count, types array -T} -_ -T{ -\fBTIFFTAG_FAXFILLFUNC\fP -T} T{ -1 -T} T{ -TIFFFaxFillFunc -T} T{ -G3/G4 compression pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_FAXMODE\fP -T} T{ -1 -T} T{ -int -T} T{ -\(dg G3/G4 compression pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_FILLORDER\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_GROUP3OPTIONS\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_GROUP4OPTIONS\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_HALFTONEHINTS\fP -T} T{ -2 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_HOSTCOMPUTER\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_ICCPROFILE\fP -T} T{ -2 -T} T{ -uint32_t, void* -T} T{ -count, profile data* -T} -_ -T{ -\fBTIFFTAG_IMAGEDEPTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_IMAGEDESCRIPTION\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_IMAGELENGTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_IMAGEWIDTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_INKNAMES\fP -T} T{ -2 -T} T{ -uint16_t, char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_INKSET\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_JPEGCOLORMODE\fP -T} T{ -1 -T} T{ -int -T} T{ -\(dg JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_JPEGQUALITY\fP -T} T{ -1 -T} T{ -int -T} T{ -JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_JPEGTABLES\fP -T} T{ -2 -T} T{ -uint32_t*, void* -T} T{ -\(dg count, tables -T} -_ -T{ -\fBTIFFTAG_JPEGTABLESMODE\fP -T} T{ -1 -T} T{ -int -T} T{ -\(dg JPEG pseudo\-tag -T} -_ -T{ -\fBTIFFTAG_MAKE\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_MATTEING\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_MAXSAMPLEVALUE\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_MINSAMPLEVALUE\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_MODEL\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_ORIENTATION\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_PAGENAME\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_PAGENUMBER\fP -T} T{ -2 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_PHOTOMETRIC\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_PHOTOSHOP\fP -T} T{ -? -T} T{ -uint32_t, void* -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_PLANARCONFIG\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_PREDICTOR\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_PRIMARYCHROMATICITIES\fP -T} T{ -1 -T} T{ -float* -T} T{ -6\-entry array -T} -_ -T{ -\fBTIFFTAG_REFERENCEBLACKWHITE\fP -T} T{ -1 -T} T{ -float* -T} T{ -\(dg 6\-entry array -T} -_ -T{ -\fBTIFFTAG_RESOLUTIONUNIT\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_RICHTIFFIPTC\fP -T} T{ -2 -T} T{ -uint32_t, void* -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_ROWSPERSTRIP\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg must be > 0 -T} -_ -T{ -\fBTIFFTAG_SAMPLEFORMAT\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_SAMPLESPERPIXEL\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg value must be ≤ 4 -T} -_ -T{ -\fBTIFFTAG_SMAXSAMPLEVALUE\fP -T} T{ -1 -T} T{ -double -T} T{ -T} -_ -T{ -\fBTIFFTAG_SMINSAMPLEVALUE\fP -T} T{ -1 -T} T{ -double -T} T{ -T} -_ -T{ -\fBTIFFTAG_SOFTWARE\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_STONITS\fP -T} T{ -1 -T} T{ -double -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_SUBFILETYPE\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_SUBIFD\fP -T} T{ -2 -T} T{ -uint16_t, uint64_t* -T} T{ -count, offsets array -T} -_ -T{ -\fBTIFFTAG_TARGETPRINTER\fP -T} T{ -1 -T} T{ -char* -T} T{ -T} -_ -T{ -\fBTIFFTAG_THRESHHOLDING\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -T} -_ -T{ -\fBTIFFTAG_TILEDEPTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_TILELENGTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg must be a multiple of 8 -T} -_ -T{ -\fBTIFFTAG_TILEWIDTH\fP -T} T{ -1 -T} T{ -uint32_t -T} T{ -\(dg must be a multiple of 8 -T} -_ -T{ -\fBTIFFTAG_TRANSFERFUNCTION\fP -T} T{ -1 or 3‡ -T} T{ -uint16_t* -T} T{ -1 << BitsPerSample entry arrays -T} -_ -T{ -\fBTIFFTAG_WHITEPOINT\fP -T} T{ -1 -T} T{ -float* -T} T{ -2\-entry array -T} -_ -T{ -\fBTIFFTAG_XMLPACKET\fP -T} T{ -2 -T} T{ -uint32_t, void* -T} T{ -count, data -T} -_ -T{ -\fBTIFFTAG_XPOSITION\fP -T} T{ -1 -T} T{ -float -T} T{ -T} -_ -T{ -\fBTIFFTAG_XRESOLUTION\fP -T} T{ -1 -T} T{ -float -T} T{ -T} -_ -T{ -\fBTIFFTAG_YCBCRCOEFFICIENTS\fP -T} T{ -1 -T} T{ -float* -T} T{ -\(dg 3\-entry array -T} -_ -T{ -\fBTIFFTAG_YCBCRPOSITIONING\fP -T} T{ -1 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_YCBCRSAMPLING\fP -T} T{ -2 -T} T{ -uint16_t -T} T{ -\(dg -T} -_ -T{ -\fBTIFFTAG_YPOSITION\fP -T} T{ -1 -T} T{ -float -T} T{ -T} -_ -T{ -\fBTIFFTAG_YRESOLUTION\fP -T} T{ -1 -T} T{ -float -T} T{ -T} -_ -.TE -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B \(dg: -Tag may not have its values changed once data is written. -.UNINDENT -.sp -‡: -.INDENT 0.0 -.INDENT 3.5 -If \fBSamplesPerPixel\fP is one, then a single array is passed; -otherwise three arrays should be passed. -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B *: -The contents of this field are quite complex. See -\(dqThe ICC Profile Format Specification\(dq, -Annex B.3 \(dqEmbedding ICC Profiles in TIFF Files\(dq -(available at \fI\%http://www.color.org\fP) for an explanation. -.UNINDENT -.SH RETURN VALUES -.sp -1 is returned if the operation was successful. -Otherwise, 0 is returned if an error was detected. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: Cannot modify tag \(dq%s\(dq while writing\fP: -.INDENT 0.0 -.INDENT 3.5 -Data has already been written to the file, so the -specified tag\(aqs value can not be changed. -This restriction is applied to all tags that affect -the format of written data. -.UNINDENT -.UNINDENT -.sp -\fB%d: Bad value for \(dq%s\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An invalid value was supplied for the named tag. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFGetField\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%TIFFWriteDirectory\fP (3tiff), -\fI\%TIFFReadDirectory\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFSetTagExtender.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFSetTagExtender.3tiff deleted file mode 100644 index eeb02bb..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFSetTagExtender.3tiff +++ /dev/null @@ -1,72 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSETTAGEXTENDER" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFSetTagExtender \- register the merge function for user defined tags as an extender callback with libtiff -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc extender) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFSetTagExtender()\fP is used to register the merge function -for user defined tags as an extender callback with \fBlibtiff\fP\&. -A brief description can be found at \fI\%Defining Application Tags\fP\&. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFSetTagExtender()\fP cannot be used to extend custom directories -(for example EXIF, GPS or other custom directories). -Only the TIFF directory can be extended with additional tags. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%Defining New TIFF Tags\fP (3tiff), -\fI\%TIFFMergeFieldInfo\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFStrileQuery.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFStrileQuery.3tiff deleted file mode 100644 index 2dfebfc..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFStrileQuery.3tiff +++ /dev/null @@ -1,117 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSTRILEQUERY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFStrileQuery \- get strile byte count and offset -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile); -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile); -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, int *pbErr); -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, int *pbErr); -.UNINDENT -.SH DESCRIPTION -.sp -Make defer strile offset/bytecount loading available at runtime -and add per\-strile offset/bytecount loading capabilities. Part of -this commit makes the behaviour that was previously met when \fBlibtiff\fP -was compiled with \fB\-DDEFER_STRILE_LOAD\fP available for default builds. -.sp -When specifying the new \fBD\fP (Deferred) \fI\%TIFFOpen()\fP flag, -the loading of strile offset/bytecount is deferred. -In that mode, the \fBStripOffsets\fP / \fBStripByteCounts\fP or -\fBTileOffsets\fP / \fBTileByteCounts\fP arrays are only loaded when first -accessed. This can speed\-up the opening of files stored on the network -when just metadata retrieval is needed. -.sp -Another addition is the capability of loading only the values of -the offset/bytecount of the strile of interest instead of the -whole array. This is enabled with the new \fBO\fP (Ondemand) flag of -\fI\%TIFFOpen()\fP (which implies \fBD\fP). -.sp -The public \fI\%TIFFGetStrileOffset()\fP, \fI\%TIFFGetStrileOffsetWithErr()\fP, -\fI\%TIFFGetStrileByteCount()\fP and \fI\%TIFFGetStrileByteCountWithErr()\fP -functions have been added to API. -They are of particular interest when using sparse files (with -\fBoffset == bytecount == 0\fP) and you want to detect if a strile is -present or not without decompressing the data, or updating an -existing sparse file. -.sp -\fI\%TIFFGetStrileByteCount()\fP returns the value of the TileByteCounts / -StripByteCounts array for the specified tile/strile. -.sp -\fI\%TIFFGetStrileByteCountWithErr()\fP additionally provides \fIpbErr\fP -as an \fIint\fP pointer to an error return variable, -which is set to \(dq0\(dq for successful return or to \(dq1\(dq for an error return. -.sp -\fI\%TIFFGetStrileOffset()\fP returns the value of the TileOffsets / -StripOffsets array for the specified tile/strile. -.sp -\fI\%TIFFGetStrileOffsetWithErr()\fP additionally provides \fIpbErr\fP -as an \fIint\fP pointer to an error return variable, -which is set to \(dq0\(dq for successful return or to \(dq1\(dq for an error return. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. -.SH NOTE -.sp -This functionality was introduced with libtiff 4.1. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFDeferStrileArrayWriting\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWarning.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWarning.3tiff deleted file mode 100644 index 66cb94d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWarning.3tiff +++ /dev/null @@ -1,158 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWARNING" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWarning \- library warning interface -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFWarning(const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFWarningExtR(TIFF *tif, const char *module, const char *fmt, \&...) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef void (*TIFFWarningHandler)(const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef void (*TIFFWarningHandlerExt)(thandle_t fd, const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B typedef int (*TIFFWarningHandlerExtR)(TIFF *tif, void *user_data, const char *module, const char *fmt, va_list ap) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFWarningHandler\fP TIFFSetWarningHandler(\fI\%TIFFWarningHandler\fP handler) -.UNINDENT -.INDENT 0.0 -.TP -.B \fI\%TIFFWarningHandlerExt\fP TIFFSetWarningHandlerExt(\fI\%TIFFWarningHandlerExt\fP handler) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFWarning()\fP invokes the library\-wide warning handler function -to (normally) write a warning message to the \fBstderr\fP\&. -The \fIfmt\fP parameter is a \fBprintf()\fP format string, and any number -arguments can be supplied. The \fImodule\fP parameter is interpreted as a -string that, if non\-zero, should be printed before the message; it -typically is used to identify the software module in which a warning is -detected. -.sp -Applications that desire to capture control in the event of a warning -should use \fI\%TIFFSetWarningHandler()\fP to override the default -warning handler. A \fBNULL\fP (0) warning handler function may be -installed to suppress warning messages. -.sp -Two more application\-specific warning handler callbacks are available, -each with different call parameters and passing parameters to the handler. -Each handler is also linked with a warning message function, i.e. -\fI\%TIFFWarningExt()\fP and \fI\%TIFFWarningExtR()\fP if the application -intends to call the handler with those extended parameters. -.sp -\fI\%TIFFWarningExt()\fP provides a file handle as parameter. -Within \fBlibtiff\fP \fI\%TIFFWarningExt()\fP is called passing \fBtif\->tif_clientdata\fP -as \fIfd\fP, which represents the TIFF file handle (file descriptor). -The application\-specific and library\-wide handler for \fI\%TIFFWarningExt()\fP -is setup with \fI\%TIFFSetWarningHandlerExt()\fP\&. -.sp -\fI\%TIFFWarningExtR()\fP (introduced with libtiff 4.5) is called with its -TIFF handle and thus provides access to a per\-TIFF handle (re\-entrant) -warning handler. That means for different TIFF handles, different warning -handlers can be setup. This application\-specific handler -can be setup when a TIFF file is opened with one of the following functions: -\fI\%TIFFOpenExt()\fP, \fI\%TIFFOpenWExt()\fP, \fI\%TIFFFdOpenExt()\fP -or \fI\%TIFFClientOpenExt()\fP\&. -Furthermore, a \fBcustom defined data structure\fP \fIuser_data\fP for the -warning handler can be given along. -.sp -Please refer to \fI\%TIFFOpenOptions\fP for how to setup the -application\-specific handler introduced with \fBlibtiff\fP 4.5. -.SH NOTE -.sp -Both functions \fI\%TIFFWarning()\fP and \fI\%TIFFWarningExt()\fP -each attempt to call both handler functions if they are defined. -First \fI\%TIFFWarningHandler()\fP is called and then \fI\%TIFFWarningHandlerExt()\fP\&. -However, \fI\%TIFFWarning()\fP passes a \(dq0\(dq as a file handle to -\fI\%TIFFWarningHandlerExt()\fP\&. -.sp -\fI\%TIFFWarningExtR()\fP tries first to call the per\-TIFF handle defined -warning handler. If \fI\%TIFFWarningHandlerExtR()\fP is not defined or -returns 0, \fI\%TIFFWarningHandler()\fP and then \fI\%TIFFWarningHandlerExt()\fP -are called. From libtiff 4.5 onwards \fI\%TIFFWarningExtR()\fP is used -within the \fBlibtiff\fP library. -.SH RETURN VALUES -.sp -\fI\%TIFFSetWarningHandler()\fP and \fI\%TIFFSetWarningHandlerExt()\fP -returns a reference to the previous warning handler function. -.sp -\fI\%TIFFWarningHandlerExtR()\fP returns an integer as \(dqstop\(dq to control the call -of further warning handler functions within \fI\%TIFFWarningExtR()\fP: -.INDENT 0.0 -.INDENT 3.5 -.INDENT 0.0 -.IP \(bu 2 -0: both functions \fI\%TIFFWarningHandler()\fP and \fI\%TIFFWarningHandlerExt()\fP are called. -.IP \(bu 2 -non\-zero: no further warning message function is called. -.UNINDENT -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFError\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFOpenOptions\fP, -\fI\%libtiff\fP (3tiff), -printf (3) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteDirectory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteDirectory.3tiff deleted file mode 100644 index 7ad30a4..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteDirectory.3tiff +++ /dev/null @@ -1,213 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITEDIRECTORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteDirectory \- write the current directory in an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFWriteDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFRewriteDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCheckpointDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSetWriteOffset(TIFF *tif, toff_t off) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFWriteCheck(TIFF *tif, int tiles, const char *module) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFWriteDirectory()\fP will write the contents of the current -directory (IFD) to the file and setup to create a new directory (IFD) -using \fI\%TIFFCreateDirectory()\fP\&. -Applications only need to call \fI\%TIFFWriteDirectory()\fP -when writing multiple subfiles (images) to a single TIFF file. -This is called \(dqmulti\-page TIFF\(dq or \(dqmulti\-image TIFF\(dq -(see \fI\%Multi Page / Multi Image TIFF\fP). -\fI\%TIFFWriteDirectory()\fP is automatically called by -\fI\%TIFFClose()\fP and \fI\%TIFFFlush()\fP to write a modified -directory if the file is open for writing. -.sp -The \fI\%TIFFRewriteDirectory()\fP function operates similarly to -\fI\%TIFFWriteDirectory()\fP, but can be called with directories -previously read or written that already have an established location -in the file. It will rewrite the directory, but instead of placing it -at its old location (as \fI\%TIFFWriteDirectory()\fP would, if the size -of the directory has not grown) it will -place them at the end of the file, correcting the pointer from the -preceding directory or file header to point to it\(aqs new location. This -is particularly important in cases where the size of the directory and -pointed to data has grown, so it won\(aqt fit in the space available at the -old location. -.sp -The \fI\%TIFFCheckpointDirectory()\fP writes the current state of the -tiff directory into the file to make what is currently in the file -readable. Unlike \fI\%TIFFWriteDirectory()\fP, -\fI\%TIFFCheckpointDirectory()\fP does not free up the directory data -structures in memory, so they can be updated (as strips/tiles are -written) and written again. Reading such a partial file you will at -worst get a tiff read error for the first strip/tile encountered that -is incomplete, but you will at least get all the valid data in the file -before that. When the file is complete, just use -\fI\%TIFFWriteDirectory()\fP as usual to finish it off cleanly. -.sp -The \fI\%TIFFSetWriteOffset()\fP sets the current write offset for image data -(i.e.pixels). The offset for writing the directory (\fI\%IFD\fP) -data is not affected. -This should only be used to set the offset to a known previous location -(very carefully), or to 0 so that the next write gets appended to the end -of the file. -.sp -The \fI\%TIFFWriteCheck()\fP verify file is writable and that the directory -information is setup properly. In doing the latter we also \(dqfreeze\(dq -the state of the directory so that important information is not changed. -.SH RETURN VALUES -.sp -1 is returned when the contents are successfully written to the file. -Otherwise, 0 is returned if an error was encountered when writing -the directory contents. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB\(dqError post\-encoding before directory write\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -Before writing the contents of the current directory, any pending data are -flushed. This message indicates that an error occurred while doing this. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError flushing data before directory write\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -Before writing the contents of the current directory, any pending data are -flushed. This message indicates that an error occurred while doing this. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCannot write directory, out of space\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space to allocate a temporary area for the directory -that was to be written. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError writing directory count\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A write error occurred when writing the count of fields in the directory. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError writing directory contents\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A write error occurred when writing the directory fields. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError writing directory link\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A write error occurred when writing the link to the next directory. -.UNINDENT -.UNINDENT -.sp -\fBError writing data for field \(dq%s\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A write error occurred when writing indirect data for the specified field. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError writing TIFF header\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A write error occurred when re\-writing header at the front of the file. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError fetching directory count\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A read error occurred when fetching the directory count field for -a previous directory. -This can occur when setting up a link to the directory that is being -written. -.UNINDENT -.UNINDENT -.sp -\fB\(dqError fetching directory link\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -A read error occurred when fetching the directory link field for -a previous directory. -This can occur when setting up a link to the directory that is being -written. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFquery\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFCreateDirectory\fP (3tiff), -\fI\%TIFFCustomDirectory\fP (3tiff), -\fI\%TIFFSetDirectory\fP (3tiff), -\fI\%TIFFReadDirectory\fP (3tiff), -\fI\%TIFFError\fP (3tiff), -\fI\%Multi Page / Multi Image TIFF\fP, -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedStrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedStrip.3tiff deleted file mode 100644 index dd80b80..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedStrip.3tiff +++ /dev/null @@ -1,125 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITEENCODEDSTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteEncodedStrip \- compress and write a strip of data to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFWriteEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Compress \fIsize\fP bytes of raw data from \fIbuf\fP and write the result to the -specified strip; replacing any previously written data. Note that the -value of \fIstrip\fP is a \(dqraw strip number\(dq. That is, the caller must take -into account whether or not the data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -.SH NOTES -.sp -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte\-swapping to correctly process image data with \fBBitsPerSample\fP -greater than 8. -.sp -The strip number must be valid according to the current settings of the -\fBImageLength\fP and \fBRowsPerStrip\fP tags. -An image may be dynamically grown by increasing the value of -\fBImageLength\fP prior to each call to \fBTIFFWriteEncodedStrip\fP\&. -.SH RETURN VALUES -.sp -\-1 is returned if an error was encountered. Otherwise, the value of -\fIsize\fP is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: File not open for writing\fP: -.INDENT 0.0 -.INDENT 3.5 -The file was opened for reading, not writing. -.UNINDENT -.UNINDENT -.sp -\fBCan not write scanlines to a tiled image\fP: -.INDENT 0.0 -.INDENT 3.5 -The image is assumed to be organized in tiles because the -\fBTileWidth\fP and \fBTileLength\fP tags have been set with -\fI\%TIFFSetField()\fP\&. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqImageWidth\(dq before writing data\efP\fP: -.INDENT 0.0 -.INDENT 3.5 -The image\(aqs width has not be set before the first write. See -\fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The organization of data has not be defined before the first -write. See \fI\%TIFFSetField()\fP for information on how to do -this. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for strip arrays\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space for the arrays that hold strip offsets and -byte counts. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteScanline\fP (3tiff), -\fI\%TIFFWriteRawStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedTile.3tiff deleted file mode 100644 index 25c6961..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteEncodedTile.3tiff +++ /dev/null @@ -1,121 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITEENCODEDTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteEncodedTile \- compress and write a tile of data to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFWriteEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Compress \fIsize\fP bytes of raw data from \fIbuf\fP and \fBappend\fP the result -to the end of the specified tile. Note that the value of \fItile\fP is a -\(dqraw tile number\(dq. That is, the caller must take into account whether -or not the data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -\fI\%TIFFComputeTile()\fP automatically does this when converting an -(x,y,z,sample) coordinate quadruple to a tile number. -.SH NOTES -.sp -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte\-swapping to correctly process image data with \fBBitsPerSample\fP -greater than 8. -.SH RETURN VALUES -.sp -\-1 is returned if an error was encountered. Otherwise, the value of -\fIsize\fP is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: File not open for writing\fP: -.INDENT 0.0 -.INDENT 3.5 -The file was opened for reading, not writing. -.UNINDENT -.UNINDENT -.sp -\fBCan not write tiles to a stripped image\fP: -.INDENT 0.0 -.INDENT 3.5 -The image is assumed to be organized in strips because neither of the -\fBTileWidth\fP or \fBTileLength\fP tags have been set with -\fI\%TIFFSetField()\fP\&. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqImageWidth\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The image\(aqs width has not been set before the first write. See -\fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The organization of data has not be defined before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for tile arrays\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space for the arrays that hold tile offsets and -byte counts. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteTile\fP (3tiff), -\fI\%TIFFWriteRawTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawStrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawStrip.3tiff deleted file mode 100644 index 47dd806..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawStrip.3tiff +++ /dev/null @@ -1,123 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITERAWSTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteRawStrip \- write a strip of raw data to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFWriteRawStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Append \fIsize\fP bytes of raw data to the specified strip. -.SH NOTES -.sp -The strip number must be valid according to the current settings of the -\fBImageLength\fP and \fBRowsPerStrip\fP tags. -An image may be dynamically grown by increasing the value of -\fBImageLength\fP prior to each call to \fI\%TIFFWriteRawStrip()\fP\&. -.SH RETURN VALUES -.sp -\-1 is returned if an error occurred. Otherwise, the value of \fIsize\fP is -returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: File not open for writing\fP: -.INDENT 0.0 -.INDENT 3.5 -The file was opened for reading, not writing. -.UNINDENT -.UNINDENT -.sp -\fBCan not write scanlines to a tiled image\fP: -.INDENT 0.0 -.INDENT 3.5 -The image is assumed to be organized in tiles because the -\fBTileWidth\fP and \fBTileLength\fP tags have been set with -\fI\%TIFFSetField()\fP\&. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqImageWidth\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The image\(aqs width has not be set before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The organization of data has not be defined before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for strip arrays\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space for the arrays that hold strip -offsets and byte counts. -.UNINDENT -.UNINDENT -.sp -\fB%s: Strip %d out of range, max %d\fP: -.INDENT 0.0 -.INDENT 3.5 -The specified strip is not a valid strip according to the -currently specified image dimensions. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteEncodedStrip\fP (3tiff), -\fI\%TIFFWriteScanline\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawTile.3tiff deleted file mode 100644 index ef77082..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteRawTile.3tiff +++ /dev/null @@ -1,117 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITERAWTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteRawTile \- write a tile of raw data to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFWriteRawTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -Append \fIsize\fP bytes of raw data to the specified tile. -.SH RETURN VALUES -.sp -\-1 is returned if an error occurred. Otherwise, the value of \fIsize\fP is -returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: File not open for writing\fP: -.INDENT 0.0 -.INDENT 3.5 -The file was opened for reading, not writing. -.UNINDENT -.UNINDENT -.sp -\fBCan not write tiles to a stripped image\fP: -.INDENT 0.0 -.INDENT 3.5 -The image is assumed to be organized in strips because neither of the -\fBTileWidth\fP or \fBTileLength\fP tags have been set with -\fI\%TIFFSetField()\fP\&. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqImageWidth\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The image\(aqs width has not be set before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The organization of data has not be defined before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for tile arrays\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space for the arrays that hold tile offsets and -byte counts. -.UNINDENT -.UNINDENT -.sp -\fB%s: Specified tile %d out of range, max %d\fP: -.INDENT 0.0 -.INDENT 3.5 -The specified tile is not valid according to the currently specified -image dimensions. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteEncodedTile\fP (3tiff), -\fI\%TIFFWriteScanline\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteScanline.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteScanline.3tiff deleted file mode 100644 index 88fedf7..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteScanline.3tiff +++ /dev/null @@ -1,176 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITESCANLINE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteScanline \- write a scanline to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample) -.UNINDENT -.SH DESCRIPTION -.sp -Write data to a file at the specified row. The \fIsample\fP parameter is -used only if data are organized in separate planes -(\fBPlanarConfiguration\fP = 2). -The data are assumed to be uncompressed and in the native bit\- and -byte\-order of the host machine. The data written to the file is -compressed according to the compression scheme of the current -TIFF directory (see further below). If the current scanline is past the -end of the current subfile, the \fBImageLength\fP field is automatically -increased to include the scanline (except for \fBPlanarConfiguration\fP = 2, -where the \fBImageLength\fP cannot be changed once the first data are -written). If the \fBImageLength\fP is increased, the \fBStripOffsets\fP -and \fBStripByteCounts\fP fields are similarly enlarged to reflect data -written past the previous end of image. -.SH NOTES -.sp -The library writes encoded data using the native machine byte order. -Correctly implemented TIFF readers are expected to do any necessary -byte\-swapping to correctly process image data with \fBBitsPerSample\fP -greater than 8. The library attempts to hide bit\-ordering differences -between the image and the native machine by converting data from the -native machine order. -.sp -In C++ the \fIsample\fP parameter defaults to 0. -.sp -Once data are written to a file for the current directory, the values of -certain tags may not be altered; see \fI\%TIFFSetField()\fP for more -information. -.sp -It is not possible to write scanlines to a file that uses a tiled -organization. The routine \fI\%TIFFIsTiled()\fP can be used to -determine if the file is organized as tiles or strips. -.SH RETURN VALUES -.sp -\fI\%TIFFWriteScanline()\fP returns \-1 if it immediately detects an -error and 1 for a successful write. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.sp -\fB%s: File not open for writing\fP: -.INDENT 0.0 -.INDENT 3.5 -The file was opened for reading, not writing. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCan not write scanlines to a tiled image\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An attempt was made to write a scanline to a tiled image. The image -is assumed to be organized in tiles because the \fBTileWidth\fP and -\fBTileLength\fP tags have been set with \fI\%TIFFSetField()\fP\&. -.UNINDENT -.UNINDENT -.sp -\fB\(dqCompression algorithm does not support random access\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -Data was written in a non\-sequential order to a file that uses a -compression algorithm and that has \fBRowsPerStrip\fP greater than one. -That is, data in the image is to be stored in a compressed form, and -with multiple rows packed into a strip. In this case, the library -does not support random access to the data. The data should either be -written as entire strips, sequentially by rows, or the value of -\fBRowsPerStrip\fP should be set to one. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqImageWidth\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The image\(aqs width has not be set before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fB%s: Must set \(dqPlanarConfiguration\(dq before writing data\fP: -.INDENT 0.0 -.INDENT 3.5 -The organization of data has not be defined before the first write. -See \fI\%TIFFSetField()\fP for information on how to do this. -.UNINDENT -.UNINDENT -.sp -\fBCan not change \(dqImageLength\(dq when using separate planes\fP: -.INDENT 0.0 -.INDENT 3.5 -Separate image planes are being used (\fBPlanarConfiguration\fP = 2), -but the number of rows has not been specified before the first write. -The library supports the dynamic growth of an image only when data -are organized in a contiguous manner (\fBPlanarConfiguration\fP = 1). -.UNINDENT -.UNINDENT -.sp -\fB\(dq%d: Sample out of range, max %d\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The \fIsample\fP parameter was greater than the value of the -\fBSamplesPerPixel\fP tag. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for strip arrays\fP: -.INDENT 0.0 -.INDENT 3.5 -There was not enough space for the arrays that hold strip offsets and -byte counts. -.UNINDENT -.UNINDENT -.SH BUGS -.sp -Writing subsampled YCbCR data does not work correctly because, for -\fBPlanarConfiguration\fP = 2 the size of a scanline is not calculated on -a per\-sample basis, and for \fBPlanarConfiguration\fP = 1 the library -does not pack the block\-interleaved samples. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFWriteEncodedStrip\fP (3tiff), -\fI\%TIFFWriteRawStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFWriteTile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFWriteTile.3tiff deleted file mode 100644 index bb8613b..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFWriteTile.3tiff +++ /dev/null @@ -1,83 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFWRITETILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFWriteTile \- encode and write a tile of data to an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -TIFFWriteTile \- encode and write a tile of data to an open TIFF file -.INDENT 0.0 -.TP -.B tmsize_t TIFFWriteTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) -.UNINDENT -.SH DESCRIPTION -.sp -Write the data for the tile \fIcontaining\fP the specified coordinates. The -data in \fIbuf\fP are (potentially) compressed, and written to the -indicated file, normally being appended to the end of the file. The -buffer must be contain an entire tile of data. Applications should -call the routine \fI\%TIFFTileSize()\fP to find out the size (in bytes) -of a tile buffer. The \fIx\fP and \fIy\fP parameters are always used by -\fI\%TIFFWriteTile()\fP\&. The \fIz\fP parameter is used if the image is -deeper than 1 slice (\fBImageDepth\fP > 1). -The \fIsample\fP parameter is used only if data are organized in separate -planes (\fBPlanarConfiguration\fP = 2). -.SH RETURN VALUES -.sp -\fI\%TIFFWriteTile()\fP returns \-1 if it detects an error; otherwise -the number of bytes in the tile is returned. -.SH DIAGNOSTICS -.sp -All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%TIFFtile\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadTile\fP (3tiff), -\fI\%TIFFWriteScanline\fP (3tiff), -\fI\%TIFFWriteEncodedTile\fP (3tiff), -\fI\%TIFFWriteRawTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFbuffer.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFbuffer.3tiff deleted file mode 100644 index f97dd6b..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFbuffer.3tiff +++ /dev/null @@ -1,99 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFBUFFER" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFbuffer \- I/O buffering control routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFReadBufferSetup(TIFF *tif, void *buffer, tmsize_t size) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFWriteBufferSetup(TIFF *tif, void *buffer, tmsize_t size) -.UNINDENT -.SH DESCRIPTION -.sp -The following routines are provided for client\-control of the I/O buffers -used by the library. Applications need never use these routines; they are -provided only for \(dqintelligent clients\(dq that wish to optimize memory usage -and/or eliminate potential copy operations that can occur when working with -images that have data stored without compression. -.sp -\fI\%TIFFReadBufferSetup()\fP sets up the data buffer used to read raw (encoded) -data from a file. If the specified pointer is \fBNULL\fP (zero), then a -buffer of the appropriate size is allocated. Otherwise the caller must guarantee -that the buffer is large enough to hold any individual strip of raw data. -\fI\%TIFFReadBufferSetup()\fP returns a non\-zero value if the setup was successful -and zero otherwise. -.sp -\fI\%TIFFWriteBufferSetup()\fP sets up the data buffer used to write raw (encoded) -data to a file. If the specified \fIsize\fP is \-1, then the buffer size is selected to -hold a complete tile or strip, or at least 8 kilobytes, whichever is greater. If -the specified \fIbuffer\fP is \fBNULL\fP (zero), then a buffer of the appropriate -size is dynamically allocated. -\fI\%TIFFWriteBufferSetup()\fP returns a non\-zero value if the setup was successful -and zero otherwise. -.SH DIAGNOSTICS -.sp -\fB%s: No space for data buffer at scanline %ld\fP: -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFReadBufferSetup()\fP was unable to dynamically allocate space -for a data buffer. -.UNINDENT -.UNINDENT -.sp -\fB%s: No space for output buffer\fP: -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFWriteBufferSetup()\fP was unable to dynamically allocate space -for a data buffer. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFcodec.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFcodec.3tiff deleted file mode 100644 index b13d7d0..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFcodec.3tiff +++ /dev/null @@ -1,121 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCODEC" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFcodec \- codec-related utility routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B const TIFFCodec *TIFFFindCODEC(uint16_t scheme) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFCodec *TIFFRegisterCODEC(uint16_t scheme, const char *method, TIFFInitMethod init) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFUnRegisterCODEC(TIFFCodec *codec) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsCODECConfigured(uint16_t scheme) -.UNINDENT -.INDENT 0.0 -.TP -.B TIFFCodec *TIFFGetConfiguredCODECs(uint16_t scheme) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetCompressionScheme(TIFF *tif, int scheme) -.UNINDENT -.SH DESCRIPTION -.sp -\fBlibtiff\fP supports a variety of compression schemes implemented -by software \fIcodecs\fP\&. Each codec adheres to a modular interface that -provides for the decoding and encoding of image data; as well as some -other methods for initialization, setup, cleanup, and the control of -default strip and tile sizes. Codecs are identified by the associated -value of the TIFF \fBCompression\fP tag; e.g. 5 for LZW compression. -.sp -\fI\%TIFFFindCODEC()\fP ?????? -.sp -\fI\%TIFFUnRegisterCODEC()\fP ????? -.sp -The \fI\%TIFFRegisterCODEC()\fP routine can be used to augment or -override the set of codecs available to an application. If the -specified \fIscheme\fP already has a registered codec then it is -\fIoverridden\fP and any images with data encoded with this compression -scheme will be decoded using the supplied codec. -.sp -\fI\%TIFFIsCODECConfigured()\fP returns 1 if the codec is configured -and working. Otherwise 0 will be returned. -.sp -\fI\%TIFFGetConfiguredCODECs()\fP gets list of configured codecs, -both built\-in and registered by user. Function returns array of -\fBTIFFCodec\fP records (the last record should be NULL) or NULL -if function failed. Caller is responsible to free this structure. -.sp -\fI\%TIFFSetCompressionScheme()\fP ???? -.SH DIAGNOSTICS -.sp -\fBNo space to register compression scheme %s\fP: -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFRegisterCODEC()\fP was unable to allocate memory for the -data structures needed to register a codec. -.UNINDENT -.UNINDENT -.sp -\fBCannot remove compression scheme %s; not registered\fP: -.INDENT 0.0 -.INDENT 3.5 -\fI\%TIFFUnRegisterCODEC()\fP did not locate the specified codec in -the table of registered compression schemes. -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFcolor.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFcolor.3tiff deleted file mode 100644 index 766fe85..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFcolor.3tiff +++ /dev/null @@ -1,308 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCOLOR" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFcolor \- color conversion routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *R, uint32_t *G, uint32_t *B) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *displayw, float *refWhite) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t L, int32_t a, int32_t b, float *X, float *Y, float *Z) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *R, uint32_t *G, uint32_t *B) -.UNINDENT -.SH DESCRIPTION -.sp -TIFF supports several color spaces for images stored in that format. There is -usually a problem of application to handle the data properly and convert -between different colorspaces for displaying and printing purposes. To -simplify this task \fBlibtiff\fP implements several color conversion routines -itself. In particular, these routines used in the \fI\%TIFFRGBAImage\fP -interface. -.sp -\fI\%TIFFYCbCrToRGBInit()\fP used to initialize \fIYCbCr\fP to \fIRGB\fP -conversion state. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -The calling program is responsible for allocating and releasing the required -buffer for the structure \fBTIFFYCbCrToRGB\fP and its required tables, -pointed to by \fIycbcr\fP\&. The pointers to these tables are stored in the -structure \fBTIFFYCbCrToRGB\fP, which is located at the beginning -of that buffer. Thus, this memory has to be allocated as shown in the example below. -.UNINDENT -.UNINDENT -.sp -\fBTIFFYCbCrToRGB\fP is defined in \fBtiffio.h\fP as: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -typedef struct { /* YCbCr\->RGB support */ - TIFFRGBValue* clamptab; /* range clamping table */ - int* Cr_r_tab; - int* Cb_b_tab; - int32_t* Cr_g_tab; - int32_t* Cb_g_tab; - int32_t* Y_tab; -} TIFFYCbCrToRGB; -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -\fIluma\fP is a float array of three values representing proportions of the -red, green and blue in luminance, Y (see section 21 of the TIFF 6.0 -specification, where YCbCr images are discussed). -\fBTIFFTAG_YCBCRCOEFFICIENTS\fP hold these values in TIFF file. -\fIrefBlackWhite\fP is a float array of 6 values which specifies a pair of -headroom and footroom image data values (codes) for each image component -(see section 20 of the TIFF 6.0 specification where the colorimetry -fields are discussed). -\fBTIFFTAG_REFERENCEBLACKWHITE\fP is responsible for storing these -values in TIFF file. The following code snippet should help to -understand the the technique: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -float *luma, *refBlackWhite; -uint16_t hs, vs; - -/* Initialize structures */ -TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB*) - _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long)) - + 4*256*sizeof(TIFFRGBValue) - + 2*256*sizeof(int) - + 3*256*sizeof(int32_t)); -if (ycbcr == NULL) { - TIFFError(\(dqYCbCr\->RGB\(dq, - \(dqNo space for YCbCr\->RGB conversion state\(dq); - exit(0); -} - -TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); -TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite); -if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0) { - exit(0); -} - -/* Start conversion */ -uint32_t r, g, b; -uint32_t Y; -int32_t Cb, Cr; - -for each pixel in image { - TIFFYCbCrtoRGB(img\->ycbcr, Y, Cb, Cr, &r, &g, &b); -} - -/* Free state structure */ -_TIFFfree(ycbcr); -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -\fI\%TIFFCIELabToRGBInit()\fP initializes the \fICIE L*a*b* 1976\fP to -\fIRGB\fP conversion state. \fBTIFFCIELabToRGB\fP is defined as: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#define CIELABTORGB_TABLE_RANGE 1500 - -typedef struct { /* CIE Lab 1976\->RGB support */ - int range; /* Size of conversion table */ - float rstep, gstep, bstep; - float X0, Y0, Z0; /* Reference white point */ - TIFFDisplay display; - float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ - float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ - float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ -} TIFFCIELabToRGB; -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -\fIdisplay\fP is a display device description, declared as: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -typedef struct { - float d_mat[3][3]; /* XYZ \-> luminance matrix */ - float d_YCR; /* Light o/p for reference white */ - float d_YCG; - float d_YCB; - uint32_t d_Vrwr; /* Pixel values for ref. white */ - uint32_t d_Vrwg; - uint32_t d_Vrwb; - float d_Y0R; /* Residual light for black pixel */ - float d_Y0G; - float d_Y0B; - float d_gammaR; /* Gamma values for the three guns */ - float d_gammaG; - float d_gammaB; -} TIFFDisplay; -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -For example, one can use sRGB device, which has the following parameters: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -TIFFDisplay display_sRGB = { - { /* XYZ \-> luminance matrix */ - { 3.2410F, \-1.5374F, \-0.4986F }, - { \-0.9692F, 1.8760F, 0.0416F }, - { 0.0556F, \-0.2040F, 1.0570F } - }, - 100.0F, 100.0F, 100.0F, /* Light o/p for reference white */ - 255, 255, 255, /* Pixel values for ref. white */ - 1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */ - 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */ -}; -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -\fIrefWhite\fP is a color temperature of the reference white. The -\fBTIFFTAG_WHITEPOINT\fP contains the chromaticity of the white -point of the image from where the reference white can be calculated -using following formulae: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -refWhite_Y = 100.0 - -refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y - -refWhite_Z = (1.0 \- whitePoint_x \- whitePoint_y) / whitePoint_y * refWhite_X -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The conversion itself performed in two steps: at the first one we will convert -\fICIE L*a*b* 1976\fP to \fICIE XYZ\fP using the \fI\%TIFFCIELabToXYZ()\fP routine, -and at the second step we will convert \fICIE XYZ\fP to \fIRGB\fP using -\fI\%TIFFXYZToRGB()\fP\&. Look at the code sample below: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -float *whitePoint; -float refWhite[3]; - -/* Initialize structures */ -img\->cielab = (TIFFCIELabToRGB *) - _TIFFmalloc(sizeof(TIFFCIELabToRGB)); -if (!cielab) { - TIFFError(\(dqCIE L*a*b*\->RGB\(dq, - \(dqNo space for CIE L*a*b*\->RGB conversion state.\(dq); - exit(0); -} - -TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint); -refWhite[1] = 100.0F; -refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; -refWhite[2] = (1.0F \- whitePoint[0] \- whitePoint[1]) - / whitePoint[1] * refWhite[1]; -if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) { - TIFFError(\(dqCIE L*a*b*\->RGB\(dq, - \(dqFailed to initialize CIE L*a*b*\->RGB conversion state.\(dq); - _TIFFfree(cielab); - exit(0); -} - -/* Now we can start to convert */ -uint32_t r, g, b; -uint32_t L; -int32_t a, b; -float X, Y, Z; - -for each pixel in image { - TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z); - TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b); -} - -/* Don\(aqt forget to free the state structure */ -_TIFFfree(cielab); -.ft P -.fi -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%TIFFRGBAImage\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFmemory.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFmemory.3tiff deleted file mode 100644 index 20888fa..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFmemory.3tiff +++ /dev/null @@ -1,109 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFMEMORY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFmemory \- memory management-related functions for use with TIFF files -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void *_TIFFmalloc(tmsize_t size) -.UNINDENT -.INDENT 0.0 -.TP -.B void *_TIFFrealloc(void *buffer, tmsize_t size) -.UNINDENT -.INDENT 0.0 -.TP -.B void _TIFFfree(void *buffer) -.UNINDENT -.INDENT 0.0 -.TP -.B void _TIFFmemset(void *s, int c, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void _TIFFmemcpy(void *dest, const void *src, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B int _TIFFmemcmp(const void *s1, const void *s2, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void *_TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what) -.UNINDENT -.INDENT 0.0 -.TP -.B void *_TIFFCheckRealloc(TIFF *tif, void *buffer, tmsize_t nmemb, tmsize_t elem_size, const char *what) -.UNINDENT -.SH DESCRIPTION -.sp -These routines are provided for writing portable software that uses -\fBlibtiff\fP; they hide any memory\-management related issues, such as -dealing with segmented architectures found on 16\-bit machines. -.sp -\fI\%_TIFFmalloc()\fP and \fI\%_TIFFrealloc()\fP are used to dynamically -allocate and reallocate memory used by \fBlibtiff\fP; such as memory -passed into the I/O routines. Memory allocated through these interfaces is -released back to the system using the \fI\%_TIFFfree()\fP routine. -.sp -Memory allocated through one of the above interfaces can be set to a known -value using \fI\%_TIFFmemset()\fP, copied to another memory location using -\fI\%_TIFFmemcpy()\fP, or compared for equality using \fI\%_TIFFmemcmp()\fP\&. -These routines conform to the equivalent C routines: -\fBmemset()\fP, \fBmemcpy()\fP, \fBmemcmp()\fP, respectively. -.sp -\fI\%_TIFFCheckMalloc()\fP and \fI\%_TIFFCheckRealloc()\fP are checking for -integer overflow before calling \fI\%_TIFFmalloc()\fP and \fI\%_TIFFrealloc()\fP, -respectively. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -malloc (3), -memory (3), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFquery.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFquery.3tiff deleted file mode 100644 index 9c5925e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFquery.3tiff +++ /dev/null @@ -1,225 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFQUERY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFquery \- query routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tdir_t TIFFCurrentDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFCurrentDirOffset(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFLastDirectory(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B tdir_t TIFFNumberOfDirectories(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFCurrentRow(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFCurrentStrip(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFCurrentTile(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFFileno(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B char *TIFFFileName(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFGetMode(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsTiled(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsBigEndian(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsBigTIFF(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsByteSwapped(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsMSB2LSB(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFIsUpSampled(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B const char *TIFFGetVersion(void) -.UNINDENT -.SH DESCRIPTION -.sp -The following query routines return status information about the directory -structure of an open TIFF file. -.sp -\fI\%TIFFCurrentDirectory()\fP returns the index of the current -\fI\%Image File Directory (IFD)\fP\&. -Directories are numbered starting at 0. This number is suitable for -use with the \fI\%TIFFSetDirectory()\fP routine. -There are \fI\%IFDs\fP in the file and an \(dqactive\(dq -\fI\%IFD\fP in memory, from which fields -are \(dqset\(dq and \(dqget\(dq. The index of the current directory returned is: -.INDENT 0.0 -.IP a. 3 -65535 (non\-existing directory) if there is no IFD in the file after opening, -or the state is unknown, -or the last read (i.e. TIFFFetchDirectory()) failed, -or a custom directory was written. -.IP b. 3 -IFD index of last IFD written in the file. -In this case the active IFD is a new (empty) one and the current directory offset -from TIFFCurrentDirOffset() is zero. -If writing fails, the IFD index is not changed. -.IP c. 3 -IFD index of IFD read from file into memory (=active IFD), -even if IFD is corrupt and TIFFReadDirectory() returns 0. -Then the current directory offset is the offset of the IFD in the file. -.IP d. 3 -IFD index „0“, whenever a custom directory or an unchained SubIFD -was read. -.UNINDENT -.sp -\fI\%TIFFCurrentDirOffset()\fP returns the file offset of the current -directory (instead of an index). -The file offset is suitable for use with the \fI\%TIFFSetSubDirectory()\fP -routine. This is required for accessing subdirectories linked through a -\fBSubIFD\fP tag. See also \fI\%SubIFD access\fP\&. -.sp -\fI\%TIFFLastDirectory()\fP returns a non\-zero value if the current -directory is the last directory in the file; otherwise zero is returned. -A new (empty) directory in the memory (after \fI\%TIFFWriteDirectory()\fP -or \fI\%TIFFCreateDirectory()\fP) -also counts as the last directory, even if it has not yet been written to a file. -.sp -\fI\%TIFFNumberOfDirectories()\fP returns the number of directories in a -file. Be aware that just created directories, which are not \(dqwritten\(dq to -file do not count. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -Be aware that the return value of the above directory query functions -is not valid until the directory is \(dqwritten\(dq to file AND read back -e.g. \fI\%TIFFSetDirectory()\fP or \fI\%TIFFReadDirectory()\fP\&. -.UNINDENT -.UNINDENT -.sp -The following query routines return information about an open TIFF file -and its image data. -.sp -\fI\%TIFFCurrentRow()\fP, \fI\%TIFFCurrentStrip()\fP, and -\fI\%TIFFCurrentTile()\fP return the current row, strip, and tile, -respectively, that is being read or written. These values are updated each -time a read or write is done. -.sp -\fI\%TIFFFileno()\fP returns the underlying file descriptor used to access -the TIFF image in the filesystem. -.sp -\fI\%TIFFFileName()\fP returns the pathname argument passed to -\fI\%TIFFOpen()\fP or \fI\%TIFFFdOpen()\fP\&. -.sp -\fI\%TIFFGetMode()\fP returns the mode with which the underlying file -was opened. On UNIX systems, this is the value passed to the -\fBopen()\fP (2) system call. -.sp -\fI\%TIFFIsTiled()\fP returns a non\-zero value if the image data has a tiled -organization. Zero is returned if the image data is organized in strips. -.sp -\fI\%TIFFIsBigEndian()\fP returns a non\-zero value if the file is BigEndian -and zero if the file is LittleEndian. -.sp -\fI\%TIFFIsBigTIFF()\fP returns a non\-zero value if the file is in -BigTIFF style. -.sp -\fI\%TIFFIsByteSwapped()\fP returns a non\-zero value if the image data -was in a different byte\-order than the host machine. Zero is returned if -the TIFF file and local host byte\-orders are the same. Note that -\fI\%TIFFReadTile()\fP, \fI\%TIFFReadEncodedStrip()\fP and -\fI\%TIFFReadScanline()\fP functions already normally perform byte -swapping to local host order if needed. -.sp -\fI\%TIFFIsMSB2LSB()\fP returns a non\-zero value if the image data is being -returned with bit 0 as the most significant bit. -.sp -\fI\%TIFFIsUpSampled()\fP returns a non\-zero value if image data returned -through the read interface routines is being up\-sampled. This can be -useful to applications that want to calculate I/O buffer sizes to reflect -this usage (though the usual strip and tile size routines already do this). -.sp -\fI\%TIFFGetVersion()\fP returns an \fBASCII\fP string that has a version -stamp for the TIFF library software. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -\fI\%TIFFOpen\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFsize.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFsize.3tiff deleted file mode 100644 index 1cf6b4e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFsize.3tiff +++ /dev/null @@ -1,91 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSIZE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFsize \- return the size of various items associated with an open TIFF file -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFRasterScanlineSize(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFRasterScanlineSize64(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFScanlineSize(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFScanlineSize64(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFScanlineSize()\fP returns the size in bytes of a row of data as -it would be returned in a call to \fI\%TIFFReadScanline()\fP, or as it -would be expected in a call to \fI\%TIFFWriteScanline()\fP\&. -Note that this number may be 1/samples\-per\-pixel if data is -stored as separate planes. -The \fIScanlineSize\fP in case of YCbCrSubsampling is defined as the -strip size divided by the strip height, i.e. the size of a pack of vertical -subsampling lines divided by vertical subsampling. It should thus make -sense when multiplied by a multiple of vertical subsampling. -\fI\%TIFFScanlineSize64()\fP returns the size as \fBuint64_t\fP\&. -.sp -\fI\%TIFFRasterScanlineSize()\fP returns the size in bytes of a complete -decoded and packed raster scanline. Note that this value may be different -from the value returned by \fI\%TIFFScanlineSize()\fP if data is stored -as separate planes. -\fI\%TIFFRasterScanlineSize64()\fP returns the size as \fBuint64_t\fP\&. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%TIFFOpen\fP (3tiff), -\fI\%TIFFReadScanline\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFstrip.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFstrip.3tiff deleted file mode 100644 index 3d0a11e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFstrip.3tiff +++ /dev/null @@ -1,146 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSTRIP" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFstrip \- strip-related utility routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t estimate) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFStripSize(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFStripSize64(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFComputeStrip(TIFF *tif, uint32_t row, uint16_t sample) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFNumberOfStrips(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFSetupStrips(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFDefaultStripSize()\fP returns the number of rows for a -reasonable\-sized strip according to the current settings of the -\fBImageWidth\fP, \fBBitsPerSample\fP and \fBSamplesPerPixel\fP, -tags and any compression\-specific requirements. If the \fIestimate\fP -parameter, sf non\-zero, then it is taken as an estimate of the desired strip -size and adjusted according to any compression\-specific requirements. The -value returned by this function is typically used to define the -\fBRowsPerStrip\fP tag. In lieu of any unusual requirements -\fBTIFFDefaultStripSize\fP tries to create strips that have approximately -8 kilobytes of uncompressed data. -.sp -\fI\%TIFFStripSize()\fP returns the equivalent size for a strip of data -as it would be returned in a call to \fI\%TIFFReadEncodedStrip()\fP -or as it would be expected in a call to \fI\%TIFFWriteEncodedStrip()\fP\&. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFStripSize64()\fP returns the equivalent size for a strip of data -as \fBuint64_t\fP\&. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFVStripSize()\fP returns the number of bytes in a strip with -\fInrows\fP rows of data. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFVStripSize64()\fP returns the number of bytes in a strip with -\fInrows\fP rows of data as \fBuint64_t\fP\&. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFRawStripSize()\fP returns the number of bytes in a raw strip -(i.e. not decoded). -If an error occurs, 0xFFFFFFFF \fI(=(tmsize_t(\-1))\fP is returned. -.sp -\fI\%TIFFRawStripSize64()\fP returns the number of bytes in a raw strip -as \fBuint64_t\fP\&. -If an error occurs, 0xFFFFFFFF \fI(=(uint64_t(\-1))\fP is returned. -.sp -\fI\%TIFFComputeStrip()\fP returns the strip that contains the specified -coordinates. A valid strip is always returned; out\-of\-range coordinate -values are clamped to the bounds of the image. The \fIrow\fP parameter is -always used in calculating a strip. The \fIsample\fP parameter is used only -if data are organized in separate planes (\fBPlanarConfiguration\fP = 2). -.sp -\fI\%TIFFNumberOfStrips()\fP returns the number of strips in the image. -.sp -\fI\%TIFFSetupStrips()\fP setup or reset strip parameters and strip array memory. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%TIFFReadEncodedStrip\fP (3tiff), -\fI\%TIFFReadRawStrip\fP (3tiff), -\fI\%TIFFWriteEncodedStrip\fP (3tiff), -\fI\%TIFFWriteRawStrip\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFswab.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFswab.3tiff deleted file mode 100644 index 1453c12..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFswab.3tiff +++ /dev/null @@ -1,136 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSWAB" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFswab \- byte- and bit-swapping routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B const unsigned char *TIFFGetBitRevTable(int reversed) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFReverseBits(u_char *data, unsigned long nbytes) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabShort(uint16_t *data) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabLong(uint32_t *data) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabLong8(uint64_t *lp) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabFloat(float *fp) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabDouble(double *dp) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfShort(uint16_t *wp, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfTriples(uint8_t *tp, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfLong(uint32_t *lp, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfLong8(uint64_t *lp, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfFloat(float *fp, tmsize_t n) -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFSwabArrayOfDouble(double *dp, tmsize_t n) -.UNINDENT -.SH DESCRIPTION -.sp -The following routines are used by the library to swap 16\-, 32\- and 64\-bit -data and to reverse the order of bits in bytes. -.sp -\fI\%TIFFSwabShort()\fP and \fI\%TIFFSwabLong()\fP and \fI\%TIFFSwabFloat()\fP -swap the bytes in a single 16\- and 32\-bit item, respectively. -.sp -\fI\%TIFFSwabLong8()\fP and \fI\%TIFFSwabDouble()\fP -swap the bytes in a single 64\-bit item. -.sp -\fI\%TIFFSwabArrayOfTriples()\fP swap the first and the third byte of -each triple (three bytes) within the byte array. The second byte of each -triple stays untouched. -.sp -\fI\%TIFFSwabArrayOfShort()\fP and \fI\%TIFFSwabArrayOfLong()\fP, -\fI\%TIFFSwabArrayOfFloat()\fP swap the bytes in an array of 16\- and 32\-bit -items, respectively. -.sp -\fI\%TIFFSwabArrayOfLong8()\fP and \fI\%TIFFSwabArrayOfDouble()\fP -swap the bytes in an array of 64\-bit items. -.sp -\fI\%TIFFReverseBits()\fP replaces each byte in \fIdata\fP with the -equivalent bit\-reversed value. This operation is performed with a -lookup table, which is returned using the \fI\%TIFFGetBitRevTable()\fP -function. The \fIreversed\fP parameter specifies which table should be -returned. Supply \fI1\fP if you want bit reversal table. Supply \fI0\fP to get -the table that do not reverse bit values. It is a lookup table that can -be used as an \(dqidentity function\(dq; i.e. TIFFNoBitRevTable[n] == n\&. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/TIFFtile.3tiff b/third_party/libtiff/doc/man-prebuilt/TIFFtile.3tiff deleted file mode 100644 index 2ae924d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/TIFFtile.3tiff +++ /dev/null @@ -1,145 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFTILE" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -TIFFtile \- tile-related utility routines -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B void TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFTileSize(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFTileSize64(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFTileRowSize(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFTileRowSize64(TIFF *tif) -.UNINDENT -.INDENT 0.0 -.TP -.B tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) -.UNINDENT -.INDENT 0.0 -.TP -.B int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t sample) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t TIFFNumberOfTiles(TIFF *tif) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%TIFFDefaultTileSize()\fP returns the pixel width and height of a -reasonable\-sized tile; suitable for setting up the \fBTileWidth\fP and -\fBTileLength\fP tags. If the \fItw\fP and \fIth\fP values passed in are -non\-zero, then they are adjusted to reflect any compression\-specific -requirements. The returned width and height are constrained to be a -multiple of 16 pixels to conform with the TIFF specification. -.sp -\fI\%TIFFTileSize()\fP returns the equivalent size for a tile of data -as it would be returned in a call to \fI\%TIFFReadTile()\fP or as it -would be expected in a call to \fI\%TIFFWriteTile()\fP\&. -\fI\%TIFFTileSize64()\fP returns a \fBuint64_t\fP number. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFVTileSize()\fP returns the number of bytes in a row\-aligned -tile with \fInrows\fP of data. -\fI\%TIFFVTileSize64()\fP returns a \fBuint64_t\fP number. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFTileRowSize()\fP returns the number of bytes of a row of data -in a tile. -\fI\%TIFFTileRowSize64()\fP returns a \fBuint64_t\fP number. -If an error occurs, 0 is returned. -.sp -\fI\%TIFFComputeTile()\fP returns the tile that contains the specified -coordinates. A valid tile is always returned; out\-of\-range coordinate -values are clamped to the bounds of the image. The \fIx\fP and \fIy\fP -parameters are always used in calculating a tile. The \fIz\fP -parameter is used if the image is deeper than 1 slice -(\fBImageDepth\fP > 1). -The \fIsample\fP parameter is used only if data are organized in separate -planes (\fBPlanarConfiguration\fP = 2). -.sp -\fI\%TIFFCheckTile()\fP returns a non\-zero value if the supplied -coordinates are within the bounds of the image and zero otherwise. The -\fIx\fP parameter is checked against the value of the \fBImageWidth\fP tag. -The \fIy\fP parameter is checked against the value of the \fBImageLength\fP -tag. The \fIz\fP parameter is checked against the value of the -\fBImageDepth\fP tag (if defined). The \fIsample\fP parameter is checked -against the value of the \fBSamplesPerPixel\fP parameter if the data are -organized in separate planes. -.sp -\fI\%TIFFNumberOfTiles()\fP returns the number of tiles in the image. -.SH DIAGNOSTICS -.sp -None. -.SH SEE ALSO -.sp -\fI\%TIFFReadEncodedTile\fP (3tiff), -\fI\%TIFFReadRawTile\fP (3tiff), -\fI\%TIFFReadTile\fP (3tiff), -\fI\%TIFFWriteEncodedTile\fP (3tiff), -\fI\%TIFFWriteRawTile\fP (3tiff), -\fI\%TIFFWriteTile\fP (3tiff), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/_TIFFRewriteField.3tiff b/third_party/libtiff/doc/man-prebuilt/_TIFFRewriteField.3tiff deleted file mode 100644 index 43ea759..0000000 --- a/third_party/libtiff/doc/man-prebuilt/_TIFFRewriteField.3tiff +++ /dev/null @@ -1,67 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "_TIFFREWRITEFIELD" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -_TIFFRewriteField \- rewrite a field in the directory on disk -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B int _TIFFRewriteField(TIFF *tif, uint16_t tag, TIFFDataType in_datatype, tmsize_t count, void *data) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%_TIFFRewriteField()\fP -Rewrite a field in the directory on disk without regard to updating the -TIFF directory structure in memory. Currently only supported for field -that already exist in the on\-disk directory. -Mainly used for updating stripoffset / stripbytecount values after -the directory is already on disk. -.SH RETURN VALUES -.sp -Returns zero on failure, and one on success. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/_TIFFauxiliary.3tiff b/third_party/libtiff/doc/man-prebuilt/_TIFFauxiliary.3tiff deleted file mode 100644 index 71e91cd..0000000 --- a/third_party/libtiff/doc/man-prebuilt/_TIFFauxiliary.3tiff +++ /dev/null @@ -1,74 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "_TIFFAUXILIARY" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -_TIFFauxiliary \- auxiliary functions -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t _TIFFClampDoubleToUInt32(double val) -.UNINDENT -.INDENT 0.0 -.TP -.B uint32_t _TIFFMultiply32(TIFF *tif, uint32_t first, uint32_t second, const char *where) -.UNINDENT -.INDENT 0.0 -.TP -.B uint64_t _TIFFMultiply64(TIFF *tif, uint64_t first, uint64_t second, const char *where) -.UNINDENT -.SH DESCRIPTION -.sp -\fI\%_TIFFClampDoubleToUInt32()\fP clamps double values into the range -of \fBuint32_t\fP (i.e. 0 .. 0xFFFFFFFF) -.sp -\fI\%_TIFFMultiply32()\fP and \fI\%_TIFFMultiply64()\fP checks for -an integer overflow of the multiplication result and return the multiplication -result or \fI0\fP if an overflow would happen. -The string \fIwhere\fP is printed in the error message in case an overflow -happens and can be used to indicate where the function was called. -.SH SEE ALSO -.sp -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/fax2ps.1 b/third_party/libtiff/doc/man-prebuilt/fax2ps.1 deleted file mode 100644 index e02d9e0..0000000 --- a/third_party/libtiff/doc/man-prebuilt/fax2ps.1 +++ /dev/null @@ -1,154 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "FAX2PS" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -fax2ps \- convert a TIFF facsimile to compressed PostScript™ -.SH SYNOPSIS -.sp -\fBfax2ps\fP [ \fIoptions\fP ] [ \fIfile …\fP ] -.SH DESCRIPTION -.sp -\fBfax2ps\fP reads one or more TIFF -facsimile image files and prints a compressed form of -PostScript on the standard output that is suitable for printing. -.sp -By default, each page is scaled to reflect the -image dimensions and resolutions stored in the file. -The \fI\%\-x\fP and \fI\%\-y\fP -options can be used to specify the horizontal and vertical -image resolutions (lines/inch), respectively. -If the \fI\%\-S\fP -option is specified, each page is scaled to fill an output page. -The default output page is 8.5 by 11 inches. -Alternate page dimensions can be specified in inches with the -\fI\%\-W\fP and \fI\%\-H\fP -options. -.sp -By default \fBfax2ps\fP -generates PostScript for all pages in the file. -The \fI\%\-p\fP -option can be used to select one or more pages from -a multi\-page document. -.sp -\fBfax2ps\fP -generates a compressed form of PostScript that is -optimized for sending pages of text to a PostScript -printer attached to a host through a low\-speed link (such -as a serial line). -Each output page is filled with white and then only -the black areas are drawn. -The PostScript specification of the black drawing operations -is optimized by using a special font that encodes the -move\-draw operations required to fill -the black regions on the page. -This compression scheme typically results in a substantially -reduced PostScript description, relative to the straightforward -imaging of the page with a PostScript -\fBimage\fP -operator. -This algorithm can, however, be ineffective -for continuous\-tone and white\-on\-black images. -For these images, it sometimes is more efficient to send -the raster bitmap image directly; see -\&.BR tiff2ps (1). -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-p number -Print only the indicated page. -Multiple pages may be printed by specifying -this option more than once. -.UNINDENT -.INDENT 0.0 -.TP -.B \-x resolution -Use \fIresolution\fP -as the horizontal resolution, in dots/inch, of the image data. -By default this value is taken from the file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-y resolution -Use \fIresolution\fP -as the vertical resolution, in lines/inch, of the image data. -By default this value is taken from the file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-S -Scale each page of image data to fill the output page dimensions. -By default images are presented according to the dimension -information recorded in the TIFF file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-W width -Use \fIwidth\fP -as the width, in inches, of the output page. -.UNINDENT -.INDENT 0.0 -.TP -.B \-H height -Use \fIheight\fP -as the height, in inches, of the output page. -.UNINDENT -.SH DIAGNOSTICS -.sp -Some messages about malformed TIFF images come from the -TIFF library. -.sp -Various messages about badly formatted facsimile images -may be generated due to transmission errors in received -facsimile. -\fBfax2ps\fP -attempts to recover from such data errors by resynchronizing -decoding at the end of the current scanline. -This can result in long horizontal black lines in the resultant -PostScript image. -.SH NOTES -.sp -If the destination printer supports PostScript Level II then -it is always faster to just send the encoded bitmap generated -by the \fBtiff2ps\fP program. -.SH BUGS -.sp -\fBfax2ps\fP -should probably figure out when it is doing a poor -job of compressing the output and just generate -PostScript to image the bitmap raster instead. -.SH SEE ALSO -.sp -:doc\(gatiff2ps\(ga (1), \fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/fax2tiff.1 b/third_party/libtiff/doc/man-prebuilt/fax2tiff.1 deleted file mode 100644 index b962950..0000000 --- a/third_party/libtiff/doc/man-prebuilt/fax2tiff.1 +++ /dev/null @@ -1,308 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "FAX2TIFF" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -fax2tiff \- create a TIFF Class F fax file from raw fax data -.SH SYNOPSIS -.sp -\fBfax2tiff\fP [ \fIoptions\fP ] [ \fB\-o\fP \fIoutput.tif\fP ] \fIinput.raw\fP -.SH DESCRIPTION -.sp -\fBfax2tiff\fP creates a TIFF file containing CCITT -Group 3 or Group 4 encoded data from one or more files containing \(dqraw\(dq -Group 3 or Group 4 encoded data (typically obtained directly from a fax modem). -By default, each row of data in the resultant TIFF -file is 1\-dimensionally encoded and -padded or truncated to 1728 pixels, as needed. -The resultant image is a set of low resolution (98 lines/inch) -or medium resolution (196 lines/inch) -pages, each of which is a single strip of data. -The generated file conforms to the TIFF -Class F (FAX) specification for storing facsimile data. -This means, in particular, that each page of the data does -\fBnot\fP include the trailing -\fI\(dqreturn to control\(dq\fP (\fBRTC\fP) code; as required -for transmission by the CCITT Group 3 specifications. -The old, \(dqclassic\(dq, format is created if the -\fI\%\-c\fP option is used. -(The Class F format can also be requested with the -\fI\%\-f\fP option.) -.sp -The default name of the output image is \fBfax.tif\fP; -this can be changed with the \fI\%\-o\fP option. -Each input file is assumed to be a separate page of facsimile data -from the same document. -The order in which input files are specified on the command -line is the order in which the resultant pages appear in the -output file. -.SH OPTIONS -.sp -Options that affect the interpretation of input data are: -.INDENT 0.0 -.TP -.B \-3 -Assume input data is CCITT Group 3 encoded (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-4 -Assume input data is CCITT Group 4 encoded. -.UNINDENT -.INDENT 0.0 -.TP -.B \-U -Assume input data is uncompressed (Group 3 or Group 4). -.UNINDENT -.INDENT 0.0 -.TP -.B \-1 -Assume input data is encoded with the 1\-dimensional version of the CCITT -Group 3 Huffman encoding algorithm (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-2 -Assume input data is 2\-dimensional version of the CCITT -Group 3 Huffman encoding algorithm. -.UNINDENT -.INDENT 0.0 -.TP -.B \-P -Assume input data is \fBnot\fP -EOL\-aligned (default). This option has effect with Group 3 encoded input only. -.UNINDENT -.INDENT 0.0 -.TP -.B \-A -Assume input data is EOL\-aligned. This option has effect with Group 3 -encoded input only. -.UNINDENT -.INDENT 0.0 -.TP -.B \-M -Treat input data as having bits filled from most significant bit (\fBMSB\fP) to most least bit (\fBLSB\fP). -.UNINDENT -.INDENT 0.0 -.TP -.B \-L -Treat input data as having bits filled from least significant bit (\fBLSB\fP) to most significant bit -(\fBMSB\fP) (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-B -Assume input data was encoded with black as 0 and white as 1. -.UNINDENT -.INDENT 0.0 -.TP -.B \-W -Assume input data was encoded with black as 1 and white as 0 (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-R -Specify the vertical resolution, in lines/inch, of the input images. -By default input are assumed to have a vertical resolution of 196 lines/inch. -If images are low resolution facsimile, a value of 98 lines/inch should -be specified. -.UNINDENT -.INDENT 0.0 -.TP -.B \-X -Specify the width, in pixels, of the input images. -By default input are assumed to have a width of 1728 pixels. -.UNINDENT -.sp -Options that affect the output file format are: -.INDENT 0.0 -.TP -.B \-o -Specify the name of the output file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-7 -Force output to be compressed with the CCITT -Group 3 Huffman encoding algorithm (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-8 -Force output to be compressed with the CCITT -Group 4 Huffman encoding. -.UNINDENT -.INDENT 0.0 -.TP -.B \-u -Force output to be uncompressed (Group 3 or Group 4). -.UNINDENT -.INDENT 0.0 -.TP -.B \-5 -Force output to be encoded with the 1\-dimensional version of the CCITT -Group 3 Huffman encoding algorithm. -.UNINDENT -.INDENT 0.0 -.TP -.B \-6 -Force output to be encoded with the 2\-dimensional version of the CCITT -Group 3 Huffman encoding algorithm (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-a -Force the last bit of each \fI\(dqEnd Of Line\(dq\fP (\fBEOL\fP) -code to land on a byte boundary (default). This \(dqzero padding\(dq will -be reflected in the contents of the \fBGroup3Options\fP -tag of the resultant TIFF file. This option has effect with Group 3 encoded output only. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p -Do not EOL\-align output. This option has effect with Group 3 encoded -output only. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c -Generate \(dqclassic\(dq Group 3 TIFF format. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Generate TIFF Class F (TIFF/F) format (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-m -Force output data to have bits filled from most significant bit (\fBMSB\fP) -to most least bit (\fBLSB\fP). -.UNINDENT -.INDENT 0.0 -.TP -.B \-l -Force output data to have bits filled from least significant bit (\fBLSB\fP) -to most significant bit (\fBMSB\fP) (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Specify the number of rows (scanlines) in each strip of data -written to the output file. -By default (or when value \fB0\fP is specified), \fBtiffcp\fP -attempts to set the rows/strip -that no more than 8 kilobytes of data appear in a strip (with except of G3/G4 -compression schemes). If you specify special value \fB\-1\fP -it will results in infinite number of the rows per strip. The entire image -will be the one strip in that case. This is default in case of G3/G4 output -compression schemes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Stretch the input image vertically by writing each input row of -data twice to the output file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-v -Force \fBfax2tiff\fP -to print the number of rows of data it retrieved from the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-z -Force output to be compressed with the LZW encoding. -.UNINDENT -.SH DIAGNOSTICS -.sp -The following warnings and errors come from the decoding -routines in the library. -.sp -\fB\(dqWarning, %s: Premature EOL at scanline %d (x %d).en\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The input data had a row that was shorter than the expected width. -The row is padded with white. -.UNINDENT -.UNINDENT -.sp -\fB\(dq%s: Premature EOF at scanline %d (x %d).en\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -The decoder ran out of data in the middle of a scanline. -The resultant row is padded with white. -.UNINDENT -.UNINDENT -.sp -\fB\(dq%s: Bad code word at row %d, x %den\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An invalid Group 3 \fBcode\fP -was encountered while decoding the input file. -The row number and horizontal position is given. -The remainder of the input row is discarded, while -the corresponding output row is padded with white. -.UNINDENT -.UNINDENT -.sp -\fB\(dq%s: Bad 2D code word at scanline %d.en\(dq\fP: -.INDENT 0.0 -.INDENT 3.5 -An invalid Group 4 or 2D Group 3 \fBcode\fP -was encountered while decoding the input file. -The row number and horizontal position is given. -The remainder of the input row is discarded, while -the corresponding output row is padded with white. -.UNINDENT -.UNINDENT -.SH BUGS -.sp -Input data are assumed to have a a \(dqtop left\(dq orientation; -it should be possible to override this assumption -from the command line. -.SH SEE ALSO -.sp -\(dqCCITT Recommendation T.4\(dq -(Standardization of Group 3 Facsimile Apparatus for Document Transmission). -.sp -\(dqThe Spirit of TIFF Class F\(dq, -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. -.sp -\fI\%tiffinfo\fP (1), -\fI\%tiffdither\fP (1), -\fI\%tiffgt\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/libtiff.3tiff b/third_party/libtiff/doc/man-prebuilt/libtiff.3tiff deleted file mode 100644 index 7e72f8a..0000000 --- a/third_party/libtiff/doc/man-prebuilt/libtiff.3tiff +++ /dev/null @@ -1,1838 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "LIBTIFF" "3tiff" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -libtiff \- introduction to libtiff, a library for reading and writing TIFF files -.SH SYNOPSIS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -#include -.ft P -.fi -.UNINDENT -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -cc file.c \-ltiff -.ft P -.fi -.UNINDENT -.UNINDENT -.SH DESCRIPTION -.sp -\fBlibtiff\fP is a library for reading and writing data files encoded with the -\fI\(dqTag Image File\(dq\fP format, Revision 6.0 (or revision 5.0 or revision 4.0). This file -format is suitable for archiving multi\-color and monochromatic image data. -.sp -The library supports several compression algorithms, as indicated by the -\fBCompression\fP field, including: -no compression (1), -CCITT 1D Huffman compression (2), -CCITT Group 3 Facsimile compression (3), -CCITT Group 4 Facsimile compression (4), -Lempel\-Ziv & Welch compression (5), -baseline JPEG compression (7), -word\-aligned 1D Huffman compression (32771), -PackBits compression (32773). -In addition, several nonstandard compression algorithms are supported: the -4\-bit compression algorithm used by the -\fIThunderScan\fP program (32809) (decompression only), -NeXT\(aqs 2\-bit compression algorithm (32766) (decompression only), -an experimental LZ\-style algorithm known as Deflate (32946), -and an experimental CIE LogLuv compression scheme designed -for images with high dynamic range (32845 for LogL and 32845 for LogLuv). -Directory information may be in either little\- or big\-endian byte order; byte -swapping is automatically done by the library. Data bit ordering may be either -Most Significant Bit (\fBMSB\fP) to Least Significant Bit (\fBLSB\fP) or -LSB to MSB. -Finally, the library does not support files in which the -\fBBitsPerSample\fP , -\fBCompression\fP , -\fBMinSampleValue\fP , -or -\fBMaxSampleValue\fP -fields are defined differently on a per\-sample basis -(in Rev. 6.0 the -\fBCompression\fP -tag is not defined on a per\-sample basis, so this is immaterial). -.SH DATA TYPES -.sp -The library makes extensive use of C typedefs to promote portability. -Two sets of typedefs are used, one for communication with clients -of the library and one for internal data structures and parsing of the -TIFF format. -The following typedefs are exposed to users either through function -definitions or through parameters passed through the varargs interfaces. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -typedef int64_t tmsize_t; /* signed size type (int32_t on 32\-bit platforms) */ -typedef void* thandle_t; /* client data handle */ -typedef uint64_t toff_t; /* file offset */ -typedef uint32_t tdir_t; /* directory index */ -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The following typedefs are deprecated and should be replaced by their -defining counterparts. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -typedef uint32_t ttag_t; /* directory tag */ -typedef uint16_t tsample_t; /* sample number */ -typedef uint32_t tstrile_t; /* strip or tile number */ -typedef tstrile_t tstrip_t; /* strip number */ -typedef tstrile_t ttile_t; /* tile number */ -typedef tmsize_t tsize_t; /* i/o size in bytes */ -typedef void *tdata_t; /* image data ref */ -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Note that -\fBtstrip_t\fP, -\fBttile_t\fP, -and -\fBtsize_t\fP -are constrained to be no more than 32\-bit quantities by 32\-bit fields they are -stored in in the -TIFF -image. -Likewise -\fBtsample_t\fP -is limited by the 16\-bit field used to store the -\fBSamplesPerPixel\fP -tag. -.sp -\fBtdir_t\fP -constrains the maximum number of -IFDs -that may appear in an image and may be an arbitrary size (w/o penalty). -Starting with libtiff 4.5.0, tdir_t is a 32\-bit unsigned integer. Previously, -it was a 16\-bit unsigned integer. -.sp -\fBttag_t\fP -must be either int, unsigned int, pointer, or double because the library uses -a varargs interface and -C restricts the type of the parameter before an ellipsis to be a promoted type. -\fBtoff_t\fP -is defined as \fBuint64_t\fP because TIFF file offsets are (unsigned) 32\-bit -quantities, and BigTIFF file offsets are unsigned 64\-bit quantities. -A signed value is used because some interfaces return \-1 on -error. Finally, note that user\-specified data references are passed as opaque -handles and only cast at the lowest layers where their type is presumed. -.SH LIST OF ROUTINES -.sp -The following routines are part of the library. Consult specific manual pages -for details on their operation; on most systems doing \fBman function\-name\fP -will work. -.SH LIBTIFF FUNCTIONS -.TS -center; -|l|l|. -_ -T{ -Name -T} T{ -Description -T} -_ -T{ -\fI\%TIFFAccessTagMethods()\fP -T} T{ -provides read/write access to the TIFFTagMethods within the TIFF structure -to application code without giving access to the private TIFF structure -T} -_ -T{ -\fI\%TIFFCheckpointDirectory()\fP -T} T{ -writes the current state of the directory -T} -_ -T{ -\fI\%TIFFCheckTile()\fP -T} T{ -very x,y,z,sample is within image -T} -_ -T{ -\fI\%TIFFCIELabToRGBInit()\fP -T} T{ -initialize CIE L*a*b* 1976 to RGB conversion state -T} -_ -T{ -\fI\%TIFFCIELabToXYZ()\fP -T} T{ -perform CIE L*a*b* 1976 to CIE XYZ conversion -T} -_ -T{ -\fI\%TIFFCleanup()\fP -T} T{ -auxiliary function to free the TIFF structure -T} -_ -T{ -\fI\%TIFFClientdata()\fP -T} T{ -return open file\(aqs clientdata handle, which represents -the file descriptor used within \fBlibtiff\fP\&. -T} -_ -T{ -\fI\%TIFFClientOpen()\fP -T} T{ -open a file for reading or writing -T} -_ -T{ -\fI\%TIFFClientOpenExt()\fP -T} T{ -open a file for reading or writing with options, -such as re\-entrant error and warning handlers may be passed -T} -_ -T{ -\fI\%TIFFClose()\fP -T} T{ -close a previously opened TIFF file -T} -_ -T{ -\fI\%TIFFComputeStrip()\fP -T} T{ -return strip containing y,sample -T} -_ -T{ -\fI\%TIFFComputeTile()\fP -T} T{ -return tile containing x,y,z,sample -T} -_ -T{ -\fI\%TIFFCreateCustomDirectory()\fP -T} T{ -setup for a \fIcustom\fP directory in a open TIFF file -T} -_ -T{ -\fI\%TIFFCreateDirectory()\fP -T} T{ -setup for a directory in a open TIFF file -T} -_ -T{ -\fI\%TIFFCreateEXIFDirectory()\fP -T} T{ -setup for a \fIEXIF\fP custom directory in a open TIFF file within a TIFF tag -T} -_ -T{ -\fI\%TIFFCreateGPSDirectory()\fP -T} T{ -setup for a \fIGPS\fP custom directory in a open TIFF file within a TIFF tag -T} -_ -T{ -\fI\%TIFFCurrentDirectory()\fP -T} T{ -return index of current directory -T} -_ -T{ -\fI\%TIFFCurrentDirOffset()\fP -T} T{ -return file offset of the current directory (instead of an index) -T} -_ -T{ -\fI\%TIFFCurrentRow()\fP -T} T{ -return index of current scanline -T} -_ -T{ -\fI\%TIFFCurrentStrip()\fP -T} T{ -return index of current strip -T} -_ -T{ -\fI\%TIFFCurrentTile()\fP -T} T{ -return index of current tile -T} -_ -T{ -\fI\%TIFFDataWidth()\fP -T} T{ -return the size of TIFF data types -T} -_ -T{ -\fI\%TIFFDefaultStripSize()\fP -T} T{ -return number of rows for a reasonable\-sized strip according to the -current settings of the ImageWidth, BitsPerSample and SamplesPerPixel, -tags and any compression\-specific requirements -T} -_ -T{ -\fI\%TIFFDefaultTileSize()\fP -T} T{ -return pixel width and height of a reasonable\-sized tile; -suitable for setting up the TileWidth and TileLength tags -T} -_ -T{ -\fI\%TIFFDeferStrileArrayWriting()\fP -T} T{ -is an advanced writing function to control when/where the -[Strip/Tile][Offsets/ByteCounts] arrays are written into the file, -and must be used in a particular sequence together with -TIFFForceStrileArrayWriting() (see description) -T} -_ -T{ -\fI\%TIFFError()\fP -T} T{ -library\-wide error handling function printing to \fBstderr\fP -T} -_ -T{ -\fI\%TIFFErrorExt()\fP -T} T{ -user\-specific library\-wide error handling function that can be passed -a file handle, which is set to the open TIFF file within \fBlibtiff\fP -T} -_ -T{ -\fI\%TIFFErrorExtR()\fP -T} T{ -user\-specific re\-entrant library error handling function, -to which its TIFF structure is passed -containing the pointer to a user\-specific data object -T} -_ -T{ -\fI\%TIFFFdOpen()\fP -T} T{ -open a file for reading or writing -T} -_ -T{ -\fI\%TIFFFdOpenExt()\fP -T} T{ -open a file for reading or writing with options, -such as re\-entrant error and warning handlers may be passed -T} -_ -T{ -\fI\%TIFFFieldDataType()\fP -T} T{ -get data type from field information -T} -_ -T{ -\fI\%TIFFFieldIsAnonymous()\fP -T} T{ -returns if field was unknown to \fBlibtiff\fP and has been auto\-registered -T} -_ -T{ -\fI\%TIFFFieldName()\fP -T} T{ -get field name from field information -T} -_ -T{ -\fI\%TIFFFieldPassCount()\fP -T} T{ -get whether to pass a value count to Get/SetField -T} -_ -T{ -\fI\%TIFFFieldReadCount()\fP -T} T{ -get number of values to be read from field -T} -_ -T{ -\fI\%TIFFFieldSetGetCountSize()\fP -T} T{ -returns size of \fBcount\fP parameter of \fI\%TIFFSetField()\fP and -\fI\%TIFFGetField()\fP -T} -_ -T{ -\fI\%TIFFFieldSetGetSize()\fP -T} T{ -return data size in bytes of the field data type used for \fBlibtiff\fP -internal storage. -T} -_ -T{ -\fI\%TIFFFieldTag()\fP -T} T{ -get tag value from field information -T} -_ -T{ -\fI\%TIFFFieldWithName()\fP -T} T{ -get field information given field name -T} -_ -T{ -\fI\%TIFFFieldWithTag()\fP -T} T{ -get field information given tag -T} -_ -T{ -\fI\%TIFFFieldWriteCount()\fP -T} T{ -get number of values to be written to field -T} -_ -T{ -\fI\%TIFFFileName()\fP -T} T{ -return name of open file -T} -_ -T{ -\fI\%TIFFFileno()\fP -T} T{ -return open file descriptor -T} -_ -T{ -\fI\%TIFFFindCODEC()\fP -T} T{ -find standard codec for the specific scheme -T} -_ -T{ -\fI\%TIFFFindField()\fP -T} T{ -get field information given tag and data type -T} -_ -T{ -\fI\%TIFFFlush()\fP -T} T{ -flush all pending writes -T} -_ -T{ -\fI\%TIFFFlushData()\fP -T} T{ -flush pending data writes -T} -_ -T{ -\fI\%TIFFForceStrileArrayWriting()\fP -T} T{ -is an advanced writing function that writes the -[Strip/Tile][Offsets/ByteCounts] arrays at the end of the file (see description) -T} -_ -T{ -\fI\%TIFFFreeDirectory()\fP -T} T{ -release storage associated with a directory -T} -_ -T{ -\fI\%TIFFGetBitRevTable()\fP -T} T{ -return bit reversal table -T} -_ -T{ -\fI\%TIFFGetClientInfo()\fP -T} T{ -returns a pointer to the data of the named entry in the clientinfo\-list -T} -_ -T{ -\fI\%TIFFGetCloseProc()\fP -T} T{ -returns a pointer to file close method -T} -_ -T{ -\fI\%TIFFGetConfiguredCODECs()\fP -T} T{ -gets list of configured codecs, both built\-in and registered by user -T} -_ -T{ -\fI\%TIFFGetField()\fP -T} T{ -return tag value in current directory -T} -_ -T{ -\fI\%TIFFGetFieldDefaulted()\fP -T} T{ -return tag value in current directory with default value set if the -value is not already set and a default is defined -T} -_ -T{ -\fI\%TIFFGetMapFileProc()\fP -T} T{ -returns a pointer to memory mapping method -T} -_ -T{ -\fI\%TIFFGetMode()\fP -T} T{ -return open file mode -T} -_ -T{ -\fI\%TIFFGetReadProc()\fP -T} T{ -returns a pointer to file read method -T} -_ -T{ -\fI\%TIFFGetSeekProc()\fP -T} T{ -returns a pointer to file seek method -T} -_ -T{ -\fI\%TIFFGetSizeProc()\fP -T} T{ -returns a pointer to file size requesting method -T} -_ -T{ -\fI\%TIFFGetStrileByteCount()\fP -T} T{ -return value of the TileByteCounts/StripByteCounts array for the -specified tile/strile -T} -_ -T{ -\fI\%TIFFGetStrileByteCountWithErr()\fP -T} T{ -same as \fITIFFGetStrileByteCount()\fP and additionally provides an error return -T} -_ -T{ -\fI\%TIFFGetStrileOffset()\fP -T} T{ -return value of the TileOffsets/StripOffsets array for the specified tile/strile -T} -_ -T{ -\fI\%TIFFGetStrileOffsetWithErr()\fP -T} T{ -same as \fITIFFGetStrileOffset()\fP and additionally provides an error return -T} -_ -T{ -\fI\%TIFFGetTagListCount()\fP -T} T{ -return number of entries in the custom tag list -T} -_ -T{ -\fI\%TIFFGetTagListEntry()\fP -T} T{ -return tag number of the (n.th \- 1) entry within the custom tag list -T} -_ -T{ -\fI\%TIFFGetUnmapFileProc()\fP -T} T{ -returns a pointer to memory unmapping method -T} -_ -T{ -\fI\%TIFFGetVersion()\fP -T} T{ -return library version string -T} -_ -T{ -\fI\%TIFFGetWriteProc()\fP -T} T{ -returns a pointer to file write method -T} -_ -T{ -\fI\%TIFFIsBigEndian()\fP -T} T{ -returns a non\-zero value if the file is BigEndian and zero if the file is -LittleEndian -T} -_ -T{ -\fI\%TIFFIsBigTIFF()\fP -T} T{ -returns a non\-zero value if the file is in BigTIFF style -T} -_ -T{ -\fI\%TIFFIsByteSwapped()\fP -T} T{ -return true if image data is byte\-swapped -T} -_ -T{ -\fI\%TIFFIsCODECConfigured()\fP -T} T{ -check, whether we have working codec -T} -_ -T{ -\fI\%TIFFIsMSB2LSB()\fP -T} T{ -return true if image data is being returned with bit 0 as the most significant bit -T} -_ -T{ -\fI\%TIFFIsTiled()\fP -T} T{ -return true if image data is tiled -T} -_ -T{ -\fI\%TIFFIsUpSampled()\fP -T} T{ -returns a non\-zero value if image data returned through the read interface -Routines is being up\-sampled -T} -_ -T{ -\fI\%TIFFLastDirectory()\fP -T} T{ -returns a non\-zero value if the current directory is the last directory -in the file; otherwise zero is returned -T} -_ -T{ -\fI\%TIFFMergeFieldInfo()\fP -T} T{ -adds application defined TIFF tags to the list of known \fBlibtiff\fP tags -T} -_ -T{ -\fI\%TIFFNumberOfDirectories()\fP -T} T{ -return number of directories in a file -T} -_ -T{ -\fI\%TIFFNumberOfStrips()\fP -T} T{ -return number of strips in an image -T} -_ -T{ -\fI\%TIFFNumberOfTiles()\fP -T} T{ -return number of tiles in an image -T} -_ -T{ -\fI\%TIFFOpen()\fP -T} T{ -open a file for reading or writing -T} -_ -T{ -\fI\%TIFFOpenExt()\fP -T} T{ -open a file for reading or writing with options, -such as re\-entrant error and warning handlers may be passed -T} -_ -T{ -\fI\%TIFFOpenW()\fP -T} T{ -opens a TIFF file with a Unicode filename, for read/writing -T} -_ -T{ -\fI\%TIFFOpenWExt()\fP -T} T{ -opens a TIFF file with a Unicode filename, for read/writing -with options, such as re\-entrant error and warning handlers may be passed -T} -_ -T{ -\fI\%TIFFOpenOptionsAlloc()\fP -T} T{ -allocates memory for \fI\%TIFFOpenOptions\fP opaque structure -T} -_ -T{ -\fI\%TIFFOpenOptionsFree()\fP -T} T{ -releases the allocated memory for \fI\%TIFFOpenOptions\fP -T} -_ -T{ -\fI\%TIFFOpenOptionsSetMaxSingleMemAlloc()\fP -T} T{ -limits the maximum single memory allocation within \fBlibtiff\fP -T} -_ -T{ -\fI\%TIFFOpenOptionsSetMaxCumulatedMemAlloc()\fP -T} T{ -limits the maximum cumulated memory allocation within \fBlibtiff\fP -T} -_ -T{ -\fI\%TIFFOpenOptionsSetErrorHandlerExtR()\fP -T} T{ -setup of a user\-specific and per\-TIFF handle (re\-entrant) error handler -T} -_ -T{ -\fI\%TIFFOpenOptionsSetWarningHandlerExtR()\fP -T} T{ -setup of a user\-specific and per\-TIFF handle (re\-entrant) warning handler -T} -_ -T{ -\fI\%TIFFPrintDirectory()\fP -T} T{ -print description of the current directory -T} -_ -T{ -\fI\%TIFFRasterScanlineSize()\fP -T} T{ -returns the size in bytes of a complete decoded and packed raster scanline -T} -_ -T{ -\fI\%TIFFRasterScanlineSize64()\fP -T} T{ -return size as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFRawStripSize()\fP -T} T{ -return number of bytes in a raw strip -T} -_ -T{ -\fI\%TIFFRawStripSize64()\fP -T} T{ -return number of bytes in a raw strip as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFReadBufferSetup()\fP -T} T{ -specify i/o buffer for reading -T} -_ -T{ -\fI\%TIFFReadCustomDirectory()\fP -T} T{ -read the custom directory from the given offset -and set the context of the TIFF\-handle tif to that custom directory -T} -_ -T{ -\fI\%TIFFReadDirectory()\fP -T} T{ -read the next directory -T} -_ -T{ -\fI\%TIFFReadEncodedStrip()\fP -T} T{ -read and decode a strip of data -T} -_ -T{ -\fI\%TIFFReadEncodedTile()\fP -T} T{ -read and decode a tile of data -T} -_ -T{ -\fI\%TIFFReadEXIFDirectory()\fP -T} T{ -read the EXIF directory from the given offset -and set the context of the TIFF\-handle tif to that EXIF directory -T} -_ -T{ -\fI\%TIFFReadFromUserBuffer()\fP -T} T{ -replaces the use of \fI\%TIFFReadEncodedStrip()\fP / \fI\%TIFFReadEncodedTile()\fP -when the user can provide the buffer for the input data -T} -_ -T{ -\fI\%TIFFReadGPSDirectory()\fP -T} T{ -read the GPS directory from the given offset -and set the context of the TIFF\-handle tif to that GPS directory -T} -_ -T{ -\fI\%TIFFReadRawStrip()\fP -T} T{ -read a raw strip of data -T} -_ -T{ -\fI\%TIFFReadRawTile()\fP -T} T{ -read a raw tile of data -T} -_ -T{ -\fI\%TIFFReadRGBAImage()\fP -T} T{ -read an image into a fixed format raster -T} -_ -T{ -\fI\%TIFFReadRGBAImageOriented()\fP -T} T{ -works like \fI\%TIFFReadRGBAImage()\fP except that the user can specify -the raster origin position -T} -_ -T{ -\fI\%TIFFReadRGBAStrip()\fP -T} T{ -reads a single strip of a strip\-based image into memory, storing the -result in the user supplied RGBA raster -T} -_ -T{ -\fI\%TIFFReadRGBAStripExt()\fP -T} T{ -same as \fI\%TIFFReadRGBAStrip()\fP but providing the parameter \fIstop_on_error\fP -T} -_ -T{ -\fI\%TIFFReadRGBATile()\fP -T} T{ -reads a single tile of a tile\-based image into memory, storing the -result in the user supplied RGBA raster -T} -_ -T{ -\fI\%TIFFReadRGBATileExt()\fP -T} T{ -same as \fI\%TIFFReadRGBATile()\fP but providing the parameter \fIstop_on_error\fP -T} -_ -T{ -\fI\%TIFFReadScanline()\fP -T} T{ -read and decode a row of data -T} -_ -T{ -\fI\%TIFFReadTile()\fP -T} T{ -read and decode a tile of data -T} -_ -T{ -\fI\%TIFFRegisterCODEC()\fP -T} T{ -override standard codec for the specific scheme -T} -_ -T{ -\fI\%TIFFReverseBits()\fP -T} T{ -reverse bits in an array of bytes -T} -_ -T{ -\fI\%TIFFRewriteDirectory()\fP -T} T{ -operates similarly to \fI\%TIFFWriteDirectory()\fP, but can be called -with directories previously read or written that already have an established -location in the file and places it at the end of the file -T} -_ -T{ -\fI\%TIFFRGBAImageBegin()\fP -T} T{ -setup decoder state for TIFFRGBAImageGet -T} -_ -T{ -\fI\%TIFFRGBAImageEnd()\fP -T} T{ -release TIFFRGBAImage decoder state -T} -_ -T{ -\fI\%TIFFRGBAImageGet()\fP -T} T{ -read and decode an image -T} -_ -T{ -\fI\%TIFFRGBAImageOK()\fP -T} T{ -is image readable by TIFFRGBAImageGet -T} -_ -T{ -\fI\%TIFFScanlineSize()\fP -T} T{ -return size of a scanline -T} -_ -T{ -\fI\%TIFFScanlineSize64()\fP -T} T{ -return size of a scanline as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFSetClientdata()\fP -T} T{ -set open file\(aqs clientdata (file descriptor/handle), -and return previous value -T} -_ -T{ -\fI\%TIFFSetClientInfo()\fP -T} T{ -adds or replaces an entry in the clientinfo\-list -T} -_ -T{ -\fI\%TIFFSetCompressionScheme()\fP -T} T{ -set compression scheme -T} -_ -T{ -\fI\%TIFFSetDirectory()\fP -T} T{ -set the current directory -T} -_ -T{ -\fI\%TIFFSetErrorHandler()\fP -T} T{ -set error handler function -T} -_ -T{ -\fI\%TIFFSetErrorHandlerExt()\fP -T} T{ -set error handler function with a file handle as parameter -T} -_ -T{ -\fI\%TIFFSetField()\fP -T} T{ -set a tag\(aqs value in the current directory -T} -_ -T{ -\fI\%TIFFSetFileName()\fP -T} T{ -sets the file name in the TIFF\-structure and returns the old file name -T} -_ -T{ -\fI\%TIFFSetFileno()\fP -T} T{ -overwrites a copy of the open file\(aqs I/O descriptor, and return previous value -(refer to detailed description) -T} -_ -T{ -\fI\%TIFFSetMode()\fP -T} T{ -sets the \fBlibtiff\fP open mode in the TIFF\-structure and returns the old mode -T} -_ -T{ -\fI\%TIFFSetSubDirectory()\fP -T} T{ -set the current directory -T} -_ -T{ -\fI\%TIFFSetTagExtender()\fP -T} T{ -is used to register the merge function for user defined tags as an -extender callback with \fBlibtiff\fP -T} -_ -T{ -\fI\%TIFFSetupStrips()\fP -T} T{ -setup or reset strip parameters and strip array memory -T} -_ -T{ -\fI\%TIFFSetWarningHandler()\fP -T} T{ -set warning handler function -T} -_ -T{ -\fI\%TIFFSetWarningHandlerExt()\fP -T} T{ -set warning handler function with a file handle as parameter -T} -_ -T{ -\fI\%TIFFSetWriteOffset()\fP -T} T{ -set current write offset -T} -_ -T{ -\fI\%TIFFStripSize()\fP -T} T{ -return size of a strip -T} -_ -T{ -\fI\%TIFFStripSize64()\fP -T} T{ -return equivalent size for a strip of data as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFSwabArrayOfDouble()\fP -T} T{ -swap bytes of an array of doubles -T} -_ -T{ -\fI\%TIFFSwabArrayOfFloat()\fP -T} T{ -swap bytes of an array of floats -T} -_ -T{ -\fI\%TIFFSwabArrayOfLong()\fP -T} T{ -swap bytes of an array of longs -T} -_ -T{ -\fI\%TIFFSwabArrayOfLong8()\fP -T} T{ -swap bytes of an array of uint64_t -T} -_ -T{ -\fI\%TIFFSwabArrayOfShort()\fP -T} T{ -swap bytes of an array of shorts -T} -_ -T{ -\fI\%TIFFSwabArrayOfTriples()\fP -T} T{ -swap the first and third byte of each triple within an array of bytes -T} -_ -T{ -\fI\%TIFFSwabDouble()\fP -T} T{ -swap bytes of double -T} -_ -T{ -\fI\%TIFFSwabFloat()\fP -T} T{ -swap bytes of float -T} -_ -T{ -\fI\%TIFFSwabLong()\fP -T} T{ -swap bytes of long -T} -_ -T{ -\fI\%TIFFSwabLong8()\fP -T} T{ -swap bytes of long long (uint64_t) -T} -_ -T{ -\fI\%TIFFSwabShort()\fP -T} T{ -swap bytes of short -T} -_ -T{ -\fI\%TIFFTileRowSize()\fP -T} T{ -return size of a row in a tile -T} -_ -T{ -\fI\%TIFFTileRowSize64()\fP -T} T{ -return size of a row in a tile as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFTileSize()\fP -T} T{ -return size of a tile -T} -_ -T{ -\fI\%TIFFTileSize64()\fP -T} T{ -return size of a tile as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFUnlinkDirectory()\fP -T} T{ -unlink the specified directory from the directory chain -T} -_ -T{ -\fI\%TIFFUnRegisterCODEC()\fP -T} T{ -unregisters the codec -T} -_ -T{ -\fI\%TIFFUnsetField()\fP -T} T{ -clear the contents of the field in the internal structure -T} -_ -T{ -\fI\%TIFFVGetField()\fP -T} T{ -return tag value in current directory -T} -_ -T{ -\fI\%TIFFVGetFieldDefaulted()\fP -T} T{ -return tag value in current directory -T} -_ -T{ -\fI\%TIFFVSetField()\fP -T} T{ -set a tag\(aqs value in the current directory -T} -_ -T{ -\fI\%TIFFVStripSize()\fP -T} T{ -return number of bytes in a strip -T} -_ -T{ -\fI\%TIFFVStripSize64()\fP -T} T{ -return number of bytes in a strip with \fInrows\fP rows of data as \fBuint64_t\fP -T} -_ -T{ -\fI\%TIFFVTileSize()\fP -T} T{ -returns the number of bytes in a row\-aligned tile with \fInrows\fP of data -T} -_ -T{ -\fI\%TIFFVTileSize64()\fP -T} T{ -returns the number of bytes in a row\-aligned tile with \fInrows\fP of data -a \fBuint64_t\fP number -T} -_ -T{ -\fI\%TIFFWarning()\fP -T} T{ -library\-wide warning handling function printing to \fBstderr\fP -T} -_ -T{ -\fI\%TIFFWarningExt()\fP -T} T{ -user\-specific library\-wide warning handling function that can be passed -a file handle, which is set to the open TIFF file within \fBlibtiff\fP -T} -_ -T{ -\fI\%TIFFWarningExtR()\fP -T} T{ -user\-specific re\-entrant library warning handling function, -to which its TIFF structure is passed -containing the pointer to a user\-specific data object -T} -_ -T{ -\fI\%TIFFWriteBufferSetup()\fP -T} T{ -sets up the data buffer used to write raw (encoded) data to a file -T} -_ -T{ -\fI\%TIFFWriteCheck()\fP -T} T{ -verify file is writable and that the directory information is setup properly -T} -_ -T{ -\fI\%TIFFWriteCustomDirectory()\fP -T} T{ -write the current custom directory (also EXIF or GPS) to file -T} -_ -T{ -\fI\%TIFFWriteDirectory()\fP -T} T{ -write the current directory -T} -_ -T{ -\fI\%TIFFWriteEncodedStrip()\fP -T} T{ -compress and write a strip of data -T} -_ -T{ -\fI\%TIFFWriteEncodedTile()\fP -T} T{ -compress and write a tile of data -T} -_ -T{ -\fI\%TIFFWriteRawStrip()\fP -T} T{ -write a raw strip of data -T} -_ -T{ -\fI\%TIFFWriteRawTile()\fP -T} T{ -write a raw tile of data -T} -_ -T{ -\fI\%TIFFWriteScanline()\fP -T} T{ -write a scanline of data -T} -_ -T{ -\fI\%TIFFWriteTile()\fP -T} T{ -compress and write a tile of data -T} -_ -T{ -\fI\%TIFFXYZToRGB()\fP -T} T{ -perform CIE XYZ to RGB conversion -T} -_ -T{ -\fI\%TIFFYCbCrtoRGB()\fP -T} T{ -perform YCbCr to RGB conversion -T} -_ -T{ -\fI\%TIFFYCbCrToRGBInit()\fP -T} T{ -initialize YCbCr to RGB conversion state -T} -_ -.TE -.SH LIBTIFF AUXILIARY FUNCTIONS -.TS -center; -|l|l|. -_ -T{ -Name -T} T{ -Description -T} -_ -T{ -\fI\%_TIFFCheckMalloc()\fP -T} T{ -checking for integer overflow before dynamically allocate memory buffer -T} -_ -T{ -\fI\%_TIFFCheckRealloc()\fP -T} T{ -checking for integer overflow before dynamically reallocate memory buffer -T} -_ -T{ -\fI\%_TIFFClampDoubleToUInt32()\fP -T} T{ -clamps double values into the range of \fBuint32_t\fP (i.e. 0 .. 0xFFFFFFFF) -T} -_ -T{ -\fI\%_TIFFfree()\fP -T} T{ -free memory buffer -T} -_ -T{ -\fI\%_TIFFGetExifFields()\fP -T} T{ -return a pointer to the \fBlibtiff\fP internal definition list of the EXIF tags -T} -_ -T{ -\fI\%_TIFFGetGpsFields()\fP -T} T{ -return a pointer to the \fBlibtiff\fP internal definition list of the GPS tags -T} -_ -T{ -\fI\%_TIFFmalloc()\fP -T} T{ -dynamically allocate memory buffer -T} -_ -T{ -\fI\%_TIFFmemcmp()\fP -T} T{ -compare contents of the memory buffers -T} -_ -T{ -\fI\%_TIFFmemcpy()\fP -T} T{ -copy contents of the one buffer to another -T} -_ -T{ -\fI\%_TIFFmemset()\fP -T} T{ -fill memory buffer with a constant byte -T} -_ -T{ -\fI\%_TIFFMultiply32()\fP -T} T{ -checks for an integer overflow of the multiplication result of \fIuint32_t\fP and -return the multiplication result or \fI0\fP if an overflow would happen -T} -_ -T{ -\fI\%_TIFFMultiply64()\fP -T} T{ -checks for an integer overflow of the multiplication result of \fIuint64_t\fP and -return the multiplication result or \fI0\fP if an overflow would happen -T} -_ -T{ -\fI\%_TIFFrealloc()\fP -T} T{ -dynamically reallocate memory buffer -T} -_ -T{ -\fI\%_TIFFRewriteField()\fP -T} T{ -Rewrite a field in the directory on disk without regard -to updating the TIFF directory structure in memory -T} -_ -.TE -.SH TAG USAGE -.sp -For a table of TIFF tags recognized by the library refer to -\fI\%LibTIFF Coverage of the TIFF 6.0 Specification\fP\&. -.SH "PSEUDO TAGS" -.sp -In addition to the normal TIFF -tags the library supports a collection of -tags whose values lie in a range outside the valid range of TIFF -tags. These tags are termed \fIpseudo\-tags\fP -and are used to control various codec\-specific functions within the library. -The table below summarizes the defined pseudo\-tags. -.SH LIBTIFF SUPPORTED TAGS -.TS -center; -|l|l|l|l|. -_ -T{ -Tag name -T} T{ -Codec -T} T{ -R/W -T} T{ -Library Use/Notes -T} -_ -T{ -\fBTIFFTAG_FAXMODE\fP -T} T{ -G3 -T} T{ -R/W -T} T{ -general codec operation -T} -_ -T{ -\fBTIFFTAG_FAXFILLFUNC\fP -T} T{ -G3/G4 -T} T{ -R/W -T} T{ -bitmap fill function -T} -_ -T{ -\fBTIFFTAG_JPEGQUALITY\fP -T} T{ -JPEG -T} T{ -R/W -T} T{ -compression quality control -T} -_ -T{ -\fBTIFFTAG_JPEGCOLORMODE\fP -T} T{ -JPEG -T} T{ -R/W -T} T{ -control colorspace conversions -T} -_ -T{ -\fBTIFFTAG_JPEGTABLESMODE\fP -T} T{ -JPEG -T} T{ -R/W -T} T{ -control contents of \fBJPEGTables\fP tag -T} -_ -T{ -\fBTIFFTAG_ZIPQUALITY\fP -T} T{ -Deflate -T} T{ -R/W -T} T{ -compression quality level -T} -_ -T{ -\fBTIFFTAG_PIXARLOGDATAFMT\fP -T} T{ -PixarLog -T} T{ -R/W -T} T{ -user data format -T} -_ -T{ -\fBTIFFTAG_PIXARLOGQUALITY\fP -T} T{ -PixarLog -T} T{ -R/W -T} T{ -compression quality level -T} -_ -T{ -\fBTIFFTAG_SGILOGDATAFMT\fP -T} T{ -SGILog -T} T{ -R/W -T} T{ -user data format -T} -_ -.TE -.sp -\fBTIFFTAG_FAXMODE\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the operation of the Group 3 codec. -Possible values (independent bits that can be combined by -or\(aqing them together) are: -.sp -\fBFAXMODE_CLASSIC\fP: -.INDENT 0.0 -.INDENT 3.5 -(enable old\-style format in which the \fBRTC\fP -is written at the end of the last strip), -.UNINDENT -.UNINDENT -.sp -\fBFAXMODE_NORTC\fP: -.INDENT 0.0 -.INDENT 3.5 -(opposite of \fBFAXMODE_CLASSIC\fP; also called -\fBFAXMODE_CLASSF\fP), -.UNINDENT -.UNINDENT -.sp -\fBFAXMODE_NOEOL\fP: -.INDENT 0.0 -.INDENT 3.5 -(do not write \fBEOL\fP codes at the start of each row of data), -.UNINDENT -.UNINDENT -.sp -\fBFAXMODE_BYTEALIGN\fP: -.INDENT 0.0 -.INDENT 3.5 -(align each encoded row to an 8\-bit boundary), -.UNINDENT -.UNINDENT -.sp -\fBFAXMODE_WORDALIGN\fP: -.INDENT 0.0 -.INDENT 3.5 -(align each encoded row to an 16\-bit boundary), -.UNINDENT -.UNINDENT -.sp -The default value is dependent on the compression scheme; this -pseudo\-tag is used by the various G3 and G4 codecs to share code. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_FAXFILLFUNC\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the function used to convert arrays of black and white -runs to packed bit arrays. -This hook can be used to image decoded scanlines in multi\-bit -depth rasters (e.g. for display in colormap mode) -or for other purposes. -The default value is a pointer to a builtin function that images -packed bilevel data. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_IPTCNEWSPHOTO\fP: -.INDENT 0.0 -.INDENT 3.5 -Tag contains image metadata per the IPTC newsphoto spec: Headline, -captioning, credit, etc... Used by most wire services. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_PHOTOSHOP\fP: -.INDENT 0.0 -.INDENT 3.5 -Tag contains Photoshop captioning information and metadata. Photoshop -uses in parallel and redundantly alongside \fBIPTCNEWSPHOTO\fP information. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_JPEGQUALITY\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the compression quality level used in the baseline algorithm. -Note that quality levels are in the range 0\-100 with a default value of 75. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_JPEGCOLORMODE\fP: -.INDENT 0.0 -.INDENT 3.5 -Control whether or not conversion is done between -RGB and YCbCr colorspaces. -Possible values are: -.sp -\fBJPEGCOLORMODE_RAW\fP: -.INDENT 0.0 -.INDENT 3.5 -(do not convert), and -.UNINDENT -.UNINDENT -.sp -\fBJPEGCOLORMODE_RGB\fP: -.INDENT 0.0 -.INDENT 3.5 -(convert to/from RGB) -.UNINDENT -.UNINDENT -.sp -The default value is \fBJPEGCOLORMODE_RAW\fP\&. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_JPEGTABLESMODE\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the information written in the \fBJPEGTables\fP tag. -Possible values (independent bits that can be combined by -or\(aqing them together) are: -.sp -\fBJPEGTABLESMODE_QUANT\fP: -.INDENT 0.0 -.INDENT 3.5 -(include quantization tables), and -.UNINDENT -.UNINDENT -.sp -\fBJPEGTABLESMODE_HUFF\fP: -.INDENT 0.0 -.INDENT 3.5 -(include Huffman encoding tables). -.UNINDENT -.UNINDENT -.sp -The default value is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF\&. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_ZIPQUALITY\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the compression technique used by the Deflate codec. -Quality levels are in the range 1\-9 with larger numbers yielding better -compression at the cost of more computation. -The default quality level is 6 which yields a good time\-space tradeoff. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_PIXARLOGDATAFMT\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the format of user data passed \fIin\fP -to the PixarLog codec when encoding and passed -\fIout\fP from when decoding. Possible values are: -.sp -\fBPIXARLOGDATAFMT_8BIT\fP: -.INDENT 0.0 -.INDENT 3.5 -for 8\-bit unsigned pixels, -.UNINDENT -.UNINDENT -.sp -\fBPIXARLOGDATAFMT_8BITABGR\fP: -.INDENT 0.0 -.INDENT 3.5 -for 8\-bit unsigned ABGR\-ordered pixels, -.UNINDENT -.UNINDENT -.sp -\fBPIXARLOGDATAFMT_11BITLOG\fP: -.INDENT 0.0 -.INDENT 3.5 -for 11\-bit log\-encoded raw data, -.UNINDENT -.UNINDENT -.sp -\fBPIXARLOGDATAFMT_12BITPICIO\fP: -.INDENT 0.0 -.INDENT 3.5 -for 12\-bit PICIO\-compatible data, -.UNINDENT -.UNINDENT -.sp -\fBPIXARLOGDATAFMT_16BIT\fP: -.INDENT 0.0 -.INDENT 3.5 -for 16\-bit signed samples, and -.UNINDENT -.UNINDENT -.sp -\fBPIXARLOGDATAFMT_FLOAT\fP: -.INDENT 0.0 -.INDENT 3.5 -for 32\-bit IEEE floating point samples. -.UNINDENT -.UNINDENT -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_PIXARLOGQUALITY\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the compression technique used by the PixarLog codec. -This value is treated identically to \fBTIFFTAG_ZIPQUALITY\fP; see the -above description. -.UNINDENT -.UNINDENT -.sp -\fBTIFFTAG_SGILOGDATAFMT\fP: -.INDENT 0.0 -.INDENT 3.5 -Control the format of client data passed \fIin\fP -to the SGILog codec when encoding and passed -\fIout\fP from when decoding. Possible values are: -.sp -\fBSGILOGDATAFMT_FLTXYZ\fP: -.INDENT 0.0 -.INDENT 3.5 -for converting between LogLuv and 32\-bit IEEE floating valued XYZ pixels, -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_16BITLUV\fP: -.INDENT 0.0 -.INDENT 3.5 -for 16\-bit encoded Luv pixels, -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_32BITRAW\fP: -\fBSGILOGDATAFMT_24BITRAW\fP: -.INDENT 0.0 -.INDENT 3.5 -for no conversion of data, -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_8BITRGB\fP: -.INDENT 0.0 -.INDENT 3.5 -for returning 8\-bit RGB data (valid only when decoding LogLuv\-encoded data), -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_FLTY\fP: -.INDENT 0.0 -.INDENT 3.5 -for converting between LogL and 32\-bit IEEE floating valued Y pixels, -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_16BITL\fP: -.INDENT 0.0 -.INDENT 3.5 -for 16\-bit encoded L pixels, and -.UNINDENT -.UNINDENT -.sp -\fBSGILOGDATAFMT_8BITGRY\fP: -.INDENT 0.0 -.INDENT 3.5 -for returning 8\-bit greyscale data -(valid only when decoding LogL\-encoded data). -.UNINDENT -.UNINDENT -.UNINDENT -.UNINDENT -.SH DIAGNOSTICS -.sp -All error messages are directed through the \fI\%TIFFErrorExtR()\fP routine. -By default messages are directed to \fBstderr\fP in the form: -\fBmodule: message\en\fP\&. -Warning messages are likewise directed through the -\fI\%TIFFWarningExtR()\fP routine. -.SH SEE ALSO -.sp -\fI\%fax2tiff\fP, -\fI\%pal2rgb\fP, -\fI\%ppm2tiff\fP, -\fI\%rgb2ycbcr\fP, -\fI\%raw2tiff\fP, -\fI\%tiff2bw\fP, -\fI\%tiffdither\fP, -\fI\%tiffdump\fP, -\fI\%tiffcp\fP, -\fI\%tiffcmp\fP, -\fI\%tiffgt\fP, -\fI\%tiffinfo\fP, -\fI\%tiffmedian\fP, -\fI\%tiffsplit\fP, -.sp -\fB\(dqTag Image File Format Specification *Revision 6.0*\(dq\fP, -an Aldus Technical Memorandum. -.sp -\fB\(dqThe Spirit of TIFF Class F\(dq\fP , -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. -.SH BUGS -.INDENT 0.0 -.IP \(bu 2 -The library does not support multi\-sample images -where some samples have different bits/sample. -.IP \(bu 2 -The library does not support random access to compressed data -that is organized with more than one row per tile or strip. -.UNINDENT -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/pal2rgb.1 b/third_party/libtiff/doc/man-prebuilt/pal2rgb.1 deleted file mode 100644 index 6bc83a4..0000000 --- a/third_party/libtiff/doc/man-prebuilt/pal2rgb.1 +++ /dev/null @@ -1,108 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "PAL2RGB" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -pal2rgb \- convert a palette color TIFF image to a full color image -.SH SYNOPSIS -.sp -\fBpal2rgb\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBpal2rgb\fP converts a palette color image to a full color image by -applying the colormap of the palette image to each sample to generate a full color -RGB image. -.SH OPTIONS -.sp -Options that affect the interpretation of input data are: -.INDENT 0.0 -.TP -.B \-C numentries -This option overrides the default behavior of \fBpal2rgb\fP -in determining whether or not -colormap entries contain 16\-bit or 8\-bit values. -By default the colormap is inspected and -if no colormap entry greater than 255 is found, -the colormap is assumed to have only 8\-bit values; otherwise -16\-bit values (as required by the TIFF -specification) are assumed. -The -\fI\%\-C\fP -option can be used to explicitly specify the number of -bits for colormap entries: -\fB\-C 8\fP for 8\-bit values, -\fB\-C 16\fP for 16\-bit values. -.UNINDENT -.sp -Options that affect the output file format are: -.INDENT 0.0 -.TP -.B \-p planarconfig -Explicitly select the planar configuration used in organizing -data samples in the output image: -\fB\-p contig\fP for samples packed contiguously, and -\fB\-p separate\fP for samples stored separately. -By default samples are packed. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c compress -Use the specified compression algorithm to encoded image data -in the output file: -\fB\-c packbits\fP for Macintosh Packbits, -\fB\-c lzw\fP for Lempel\-Ziv & Welch, -\fB\-c zip\fP for Deflate, -\fB\-c none\fP -for no compression. -If no compression\-related option is specified, the input -file\(aqs compression algorithm is used. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r striprows -Explicitly specify the number of rows in each strip of the -output file. If the \fI\%\-r\fP -option is not specified, a number is selected such that each -output strip has approximately 8 kilobytes of data in it. -.UNINDENT -.SH BUGS -.sp -Only 8\-bit images are handled. -.SH SEE ALSO -.sp -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/ppm2tiff.1 b/third_party/libtiff/doc/man-prebuilt/ppm2tiff.1 deleted file mode 100644 index 73344f5..0000000 --- a/third_party/libtiff/doc/man-prebuilt/ppm2tiff.1 +++ /dev/null @@ -1,87 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "PPM2TIFF" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -ppm2tiff \- create a TIFF file from PPM, PGM and PBM image files -.sp -Synopsis -.sp -\fBppm2tiff\fP [ \fIoptions\fP ] [ \fIinput.ppm\fP ] \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBppm2tiff\fP converts a file in the PPM, PGM and PBM image formats to -TIFF. By default, the TIFF image is created with data samples packed -(\fBPlanarConfiguration=1\fP), compressed with the Packbits algorithm -(\fBCompression=32773\fP), and with each strip no more than 8 kilobytes. -These characteristics can be overridden, or explicitly specified with the -options described below. -.sp -If the PPM file contains greyscale data, then the \fBPhotometricInterpretation\fP -tag is set to 1 (min\-is\-black), otherwise it is set to 2 (RGB). -.sp -If no PPM file is specified on the command line, \fBppm2tiff\fP -will read from the standard input. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c compress -Specify a compression scheme to use when writing image data: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for PackBits compression (will be used by default), -\fB\-c lzw\fP for Lempel\-Ziv & Welch compression, -\fB\-c jpeg\fP for baseline JPEG compression, -\fB\-c zip\fP for Deflate compression, -\fB\-c g3\fP for CCITT Group 3 (T.4) compression, and -\fB\-c g4\fP for CCITT Group 4 (T.6) compression. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r striprows -Write data with a specified number of rows per strip; by default the number of -rows/strip is selected so that each strip is approximately 8 kilobytes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-R resolution -Mark the resultant image to have the specified X and Y resolution (in -dots/inch). -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/raw2tiff.1 b/third_party/libtiff/doc/man-prebuilt/raw2tiff.1 deleted file mode 100644 index 91969d8..0000000 --- a/third_party/libtiff/doc/man-prebuilt/raw2tiff.1 +++ /dev/null @@ -1,274 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "RAW2TIFF" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -raw2tiff \- create a TIFF file from a raw data file -.SH SYNOPSIS -.sp -\fBraw2tiff\fP [ \fIoptions ] *input.raw\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBraw2tiff\fP converts a raw byte sequence into TIFF. -By default, the TIFF image is created with data samples packed -(\fBPlanarConfiguration=1\fP), compressed with the PackBits algorithm -(\fBCompression=32773\fP), and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-H number -Size of input image file header in bytes (0 by default). This amount of data -just will be skipped from the start of file while reading. -.UNINDENT -.INDENT 0.0 -.TP -.B \-w number -Width of input image in pixels (can be guessed, see \fI\%Guessing the image geometry\fP below). -.UNINDENT -.INDENT 0.0 -.TP -.B option -\-b number -.sp -number of bands in input image (1 by default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-d datatype -type of samples in input image, where \fIdatatype\fP may be one of: -.TS -center; -|l|l|. -_ -T{ -Data type -T} T{ -Description -T} -_ -T{ -byte -T} T{ -8\-bit unsigned integer (default) -T} -_ -T{ -short -T} T{ -16\-bit unsigned integer -T} -_ -T{ -long -T} T{ -32\-bit unsigned integer -T} -_ -T{ -sbyte -T} T{ -8\-bit signed integer -T} -_ -T{ -sshort -T} T{ -16\-bit signed integer -T} -_ -T{ -slong -T} T{ -32\-bit signed integer -T} -_ -T{ -float -T} T{ -32\-bit IEEE floating point -T} -_ -T{ -double -T} T{ -64\-bit IEEE floating point -T} -_ -.TE -.UNINDENT -.INDENT 0.0 -.TP -.B \-i config -type of sample interleaving in input image, where \fIconfig\fP may be one of: -.TS -center; -|l|l|. -_ -T{ -Configuration -T} T{ -Description -T} -_ -T{ -pixel -T} T{ -pixel interleaved data (default) -T} -_ -T{ -band -T} T{ -band interleaved data. -T} -_ -.TE -.UNINDENT -.INDENT 0.0 -.TP -.B \-p photo -photometric interpretation (color space) of the input image, where \fIphoto\fP may -be one of: -.TS -center; -|l|l|. -_ -T{ -Photometric -T} T{ -Description -T} -_ -T{ -miniswhite -T} T{ -white color represented with 0 value -T} -_ -T{ -minisblack -T} T{ -black color represented with 0 value (default) -T} -_ -T{ -rgb -T} T{ -image has RGB color model -T} -_ -T{ -cmyk -T} T{ -image has CMYK (separated) color model -T} -_ -T{ -ycbcr -T} T{ -image has YCbCr color model -T} -_ -T{ -cielab -T} T{ -image has CIE L*a*b color model -T} -_ -T{ -icclab -T} T{ -image has ICC L*a*b color model -T} -_ -T{ -itulab -T} T{ -image has ITU L*a*b color model -T} -_ -.TE -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -swap bytes fetched from the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-L -input data has LSB2MSB bit order (default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-M -input data has MSB2LSB bit order. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c -Specify a compression scheme to use when writing image data: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for the PackBits compression algorithm (the default), -\fB\-c jpeg\fP for the baseline JPEG compression algorithm, -\fB\-c zip\fP for the Deflate compression algorithm, -\fB\-c lzw\fP for Lempel\-Ziv & Welch. -.UNINDENT -.SH GUESSING THE IMAGE GEOMETRY -.sp -\fBraw2tif\fP can guess image width and height in case one or both of these parameters are -not specified. If you omit one of those parameters, the complementary one will -be calculated based on the file size (taking into account header size, number -of bands and data type). If you omit both parameters, the statistical approach -will be used. Utility will compute correlation coefficient between two lines -at the image center using several appropriate line sizes and the highest -absolute value of the coefficient will indicate the right line size. That is -why you should be cautious with the very large images, because guessing -process may take a while (depending on your system performance). Of course, the -utility can\(aqt guess the header size, number of bands and data type, so it -should be specified manually. If you don\(aqt know anything about your image, -just try with the several combinations of those options. -.sp -There is no magic, it is just a mathematical statistics, so it can be wrong -in some cases. But for most ordinary images guessing method will work fine. -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/rgb2ycbcr.1 b/third_party/libtiff/doc/man-prebuilt/rgb2ycbcr.1 deleted file mode 100644 index f96a33d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/rgb2ycbcr.1 +++ /dev/null @@ -1,93 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "RGB2YCBCR" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -rgb2ycbcr \- convert non-YCbCr TIFF images to a YCbCr TIFF image -.SH SYNOPSIS -.sp -\fBrgb2ycbcr\fP [ \fIoptions\fP ] \fIsrc1.tif src2.tif … dst.tif\fP -.SH DESCRIPTION -.sp -\fBrgb2ycbcr\fP converts RGB color, greyscale, or bi\-level TIFF -images to YCbCr images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is converted to a -separate directory in the destination file. -.sp -By default, chrominance samples are created by sampling -2 by 2 blocks of luminance values; this can be changed with the -\fI\%\-h\fP and \fI\%\-v\fP options. -Output data are compressed with the \fBPackBits\fP -compression scheme, by default; an alternate scheme can be selected with the -\fI\%\-c\fP option. -By default, output data are compressed in strips with -the number of rows in each strip selected so that the -size of a strip is never more than 8 kilobytes; -the \fI\%\-r\fP -option can be used to explicitly set the number of -rows per strip. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c compress -Specify a compression scheme to use when writing image data: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for the PackBits compression algorithm (the default), -\fB\-c jpeg\fP for the JPEG compression algorithm, -\fB\-c zip\fP for the deflate compression algorithm, and -\fB\-c lzw\fP for Lempel\-Ziv & Welch. -.UNINDENT -.INDENT 0.0 -.TP -.B \-h size -Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r striprows -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-v size -Set the vertical sampling dimension to one of: 1, 2 (default), or 4. -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/thumbnail.1 b/third_party/libtiff/doc/man-prebuilt/thumbnail.1 deleted file mode 100644 index 2070c51..0000000 --- a/third_party/libtiff/doc/man-prebuilt/thumbnail.1 +++ /dev/null @@ -1,134 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "THUMBNAIL" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -thumbnail \- create a TIFF file with thumbnail images -.SH SYNOPSIS -.sp -\fBthumbnail\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBthumbnail\fP is a program written to show how one might use the -\fBSubIFD\fP tag (#330) to store thumbnail images. -\fBthumbnail\fP -copies a TIFF Class F facsimile file to the output file -and for each image an 8\-bit greyscale \(dqthumbnail sketch\(dq is created. -The output file contains the thumbnail image with the associated -full\-resolution page linked below with the SubIFD tag. -.sp -By default, thumbnail images are 216 pixels wide by 274 pixels high. -Pixels are calculated by sampling and filtering the input image -with each pixel value passed through a contrast curve. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-w width -Specify the width of thumbnail images in pixels. -.UNINDENT -.INDENT 0.0 -.TP -.B \-h height -Specify the height of thumbnail images in pixels. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c contrast -Specify a contrast curve to apply in generating the thumbnail images. -By default pixels values are passed through a linear contrast curve -that simply maps the pixel value ranges. Alternative curves are: -.TS -center; -|l|l|. -_ -T{ -Curve -T} T{ -Description -T} -_ -T{ -exp50 -T} T{ -50% exponential curve -T} -_ -T{ -exp60 -T} T{ -60% exponential curve -T} -_ -T{ -exp70 -T} T{ -70% exponential curve -T} -_ -T{ -exp80 -T} T{ -80% exponential curve -T} -_ -T{ -exp90 -T} T{ -90% exponential curve -T} -_ -T{ -exp -T} T{ -pure exponential curve -T} -_ -T{ -linear -T} T{ -linear curve -T} -_ -.TE -.UNINDENT -.SH BUGS -.sp -There are no options to control the format of the saved thumbnail images. -.SH SEE ALSO -.sp -\fI\%tiffdump\fP (1), -\fI\%tiffgt\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiff2bw.1 b/third_party/libtiff/doc/man-prebuilt/tiff2bw.1 deleted file mode 100644 index 5f1862d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiff2bw.1 +++ /dev/null @@ -1,91 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFF2BW" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiff2bw \- convert a color TIFF image to greyscale -.SH SYNOPSIS -.sp -\fBtiff2bw\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBtiff2bw\fP converts an RGB or Palette color TIFF -image to a greyscale image by -combining percentages of the red, green, and blue channels. -By default, output samples are created by taking -28% of the red channel, 59% of the green channel, and 11% of -the blue channel. To alter these percentages, the -\fI\%\-R\fP, \fI\%\-G\fP, and \fI\%\-B\fP options may be used. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c compress -Specify a compression scheme to use when writing image data: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for the PackBits compression algorithm, -\fB\-c zip\fP for the Deflate compression algorithm, -\fB\-c g3\fP for the CCITT Group 3 compression algorithm, -\fB\-c g4\fP for the CCITT Group 4 compression algorithm, -\fB\-c lzw\fP for Lempel\-Ziv & Welch (the default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-r striprows -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-R redperc -Specify the percentage of the red channel to use (default 28). -.UNINDENT -.INDENT 0.0 -.TP -.B \-G greenperc -Specify the percentage of the green channel to use (default 59). -.UNINDENT -.INDENT 0.0 -.TP -.B \-B blueperc -Specify the percentage of the blue channel to use (default 11). -.UNINDENT -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiff2pdf.1 b/third_party/libtiff/doc/man-prebuilt/tiff2pdf.1 deleted file mode 100644 index 530dcb5..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiff2pdf.1 +++ /dev/null @@ -1,276 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFF2PDF" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiff2pdf \- convert a TIFF image to a PDF document -.SH SYNOPSIS -.sp -\fBtiff2pdf\fP [ \fIoptions\fP ] \fIinput.tiff\fP -.SH DESCRIPTION -.sp -\fBtiff2pdf\fP opens a TIFF image and writes a PDF document to standard output. -.sp -The program converts one TIFF file to one PDF file, including multiple page -TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF -files that contain data of TIFF photometric interpretations of bilevel, -grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by -\fBlibtiff\fP and PDF. -.sp -If you have multiple TIFF files to convert into one PDF file then use \fBtiffcp\fP -or other program to concatenate the files into a multiple page TIFF file. -If the input TIFF file is of huge dimensions (greater than 10000 pixels height -or width) convert the input image to a tiled TIFF if it is not already. -.sp -The standard output is standard output. Set the output file name with the -\fI\%\-o\fP option. -.sp -All black and white files are compressed into a single strip CCITT G4 Fax -compressed PDF, unless tiled, where tiled black and white images are -compressed into tiled CCITT G4 Fax compressed PDF, -\fBlibtiff\fP CCITT support is assumed. -.sp -Color and grayscale data can be compressed using either JPEG compression, -ITU\-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using -the \fI\%\-j\fP or \fI\%\-z\fP options. JPEG compression support -requires that \fBlibtiff\fP be configured with JPEG support, and -Zip/Deflate compression support requires that \fBlibtiff\fP -be configured with Zip support. Use only one or the other of -\fI\%\-j\fP and \fI\%\-z\fP\&. -.sp -If the input TIFF contains single strip CCITT G4 Fax compressed information, -then that is written to the PDF file without transcoding, unless the options -of no compression and no passthrough are set, \fI\%\-d\fP and \fI\%\-n\fP\&. -.sp -If the input TIFF contains JPEG or single strip Zip/Deflate compressed -information, and they are configured, then that is written to the PDF file -without transcoding, unless the options of no compression and no passthrough -are set. -.sp -The default page size upon which the TIFF image is placed is determined by -the resolution and extent of the image data. Default values for the TIFF -image resolution can be set using the \fI\%\-x\fP and \fI\%\-y\fP -options. The page size can be set using the \fI\%\-p\fP -option for paper size, or \fI\%\-w\fP and \fI\%\-l\fP -for paper width and length, then each page of the TIFF image is centered on -its page. The distance unit for default resolution and page width and -length can be set by the \fI\%\-u\fP option, the default unit is inch. -.sp -Various items of the output document information can be set with the -\fI\%\-e\fP, \fI\%\-c\fP, \fI\%\-a\fP, \fI\%\-t\fP, \fI\%\-s\fP, -and \fI\%\-k\fP options. Setting the argument of the option to \fB\(dq\(dq\fP for these -tags causes the relevant document information field to be not written. Some -of the document information values otherwise get their information from the -input TIFF image, the software, author, document name, and image description. -.sp -The Portable Document Format (PDF) specification is copyrighted by Adobe -Systems, Incorporated. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-o output\-file -Set the output to go to file \fIoutput\-file\fP -.UNINDENT -.INDENT 0.0 -.TP -.B \-j -Compress with JPEG (requires \fBlibjpeg\fP configured with -\fBlibtiff\fP). -.UNINDENT -.INDENT 0.0 -.TP -.B \-z -Compress with Zip/Deflate (requires :program\(gazlib\(ga configured with -\fBlibtiff\fP). -.UNINDENT -.INDENT 0.0 -.TP -.B \-q quality -Set the compression quality, 1\-100 for JPEG. -.UNINDENT -.INDENT 0.0 -.TP -.B \-n -Do not allow data to be converted without uncompressing, no compressed -data passthrough. -.UNINDENT -.INDENT 0.0 -.TP -.B \-b -Set PDF \fBInterpolate\fP user preference. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d -Do not compress (decompress) \- except monochrome to CCITT Group 4. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i -Invert colors. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p paper\-size -Set paper size, e.g., \fBletter\fP, \fBlegal\fP, \fBA4\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-F -Cause the tiff to fill the PDF page. -.UNINDENT -.INDENT 0.0 -.TP -.B \-u [ i | m ] -Set distance unit, \fBi\fP for inch, \fBm\fP for centimeter. -.UNINDENT -.INDENT 0.0 -.TP -.B \-w width -Set width in units. -.UNINDENT -.INDENT 0.0 -.TP -.B \-l length -Set length in units. -.UNINDENT -.INDENT 0.0 -.TP -.B \-x xres -Set x/width resolution default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-y yres -Set y/length resolution default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r [ d | o ] -Set \fBd\fP for resolution default for images without resolution, -\fBo\fP for resolution override for all images. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Set PDF \fBFit Window\fP user preference. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e YYYYMMDDHHMMSS -Set document information date, overrides image or current date/time default, -\fBYYYYMMDDHHMMSS\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c creator -Set document information creator, overrides image software default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-a author -Set document information author, overrides image artist default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-t title -Set document information title, overrides image document name default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s subject -Set document information subject, overrides image image description default. -.UNINDENT -.INDENT 0.0 -.TP -.B \-k keywords -Set document information keywords. -.UNINDENT -.INDENT 0.0 -.TP -.B \-m size -Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit. -.UNINDENT -.INDENT 0.0 -.TP -.B \-h -List usage reminder to stderr and exit. -.UNINDENT -.SH EXAMPLES -.sp -The following example would generate the file output.pdf from input.tiff: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2pdf \-o output.pdf input.tiff -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The following example would generate PDF output from input.tiff and write it -to standard output: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2pdf input.tiff -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The following example would generate the file output.pdf from input.tiff, -putting the image pages on a letter sized page, compressing the output -with JPEG, with JPEG quality 75, setting the title to \fBDocument\fP, and setting -the \fBFit Window\fP option: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2pdf \-p letter \-j \-q 75 \-t \(dqDocument\(dq \-f \-o output.pdf input.tiff -.ft P -.fi -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiffcp\fP (1), -\fI\%tiff2ps\fP (1), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiff2ps.1 b/third_party/libtiff/doc/man-prebuilt/tiff2ps.1 deleted file mode 100644 index 1ea273d..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiff2ps.1 +++ /dev/null @@ -1,319 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFF2PS" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiff2ps \- convert TIFF image to PostScript™ -.SH SYNOPSIS -.sp -\fBtiff2ps\fP [ \fIoptions\fP ] \fIinput.tif\fP … -.SH DESCRIPTION -.sp -\fBtiff2ps\fP reads TIFF images and writes PostScript™ or Encapsulated -PostScript™ (EPS) on the standard output. By default \fBtiff2ps\fP -writes Encapsulated PostScript™ for the first image in the specified -TIFF image file. -.sp -By default, \fBtiff2ps\fP will generate PostScript™ that fills a -printed area specified by the TIFF tags in the input file. -If the file does not contain \fBXResolution\fP or \fBYResolution\fP -tags, then the printed area is set according to the image dimensions. -The \fI\%\-w\fP and \fI\%\-h\fP options (see below) -can be used to set the dimensions of the printed area in inches; -overriding any relevant TIFF tags. -.sp -The PostScript™ generated for RGB, palette, and CMYK images uses the -\fBcolorimage\fP operator. The PostScript™ generated for greyscale and -bilevel images uses the \fBimage\fP operator. When the \fBcolorimage\fP -operator is used, PostScript™ code to emulate this operator -on older PostScript™ printers is also generated. -Note that this emulation code can be very slow. -.sp -Color images with associated alpha data are composited over -a white background. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-1 -Generate PostScript™ Level 1 (the default). -.UNINDENT -.INDENT 0.0 -.TP -.B \-2 -Generate PostScript™ Level 2. -.UNINDENT -.INDENT 0.0 -.TP -.B \-3 -Generate PostScript™ Level 3. It basically allows one to use the \fB\(ga/flateDecode\fP -filter for ZIP compressed TIFF images. -.UNINDENT -.INDENT 0.0 -.TP -.B \-8 -Disable use of ASCII85 encoding with PostScript™ Level 2/3. -.UNINDENT -.INDENT 0.0 -.TP -.B \-a -Generate output for all IFDs (pages) in the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-b margin -Specify the bottom margin for the output (in inches). This does not affect -the height of the printed image. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c -Center the image in the output. This option only shows an effect if both -the \fI\%\-w\fP and the \fI\%\-h\fP option are given. -.UNINDENT -.INDENT 0.0 -.TP -.B \-C name -Specify the document creator name. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d dir -Set the initial TIFF -directory to the specified directory number. -(NB: Directories are numbered starting at zero.) -This option is useful for selecting individual pages in a -multi\-page (e.g. facsimile) file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-D -Enable duplex printing (two pages per sheet of paper). -.UNINDENT -.INDENT 0.0 -.TP -.B \-e -Force the generation of Encapsulated PostScript™ (implies -\fI\%\-z\fP). -.UNINDENT -.INDENT 0.0 -.TP -.B \-h size -Specify the vertical size of the printed area (in inches). -.UNINDENT -.INDENT 0.0 -.TP -.B \-H -Specify the maximum height of image (in inches). Images with larger sizes will -be split in several pages. Option \fI\%\-L\fP -may be used for specifying size of split images overlapping. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i -Enable/disable pixel interpolation. This option requires a -single numeric value: zero to disable pixel interpolation and -non\-zero to enable. The default is enabled. -.UNINDENT -.INDENT 0.0 -.TP -.B \-L -Specify the size of overlapping for split images (in inches). Used in -conjunction with \fI\%\-H\fP and \fI\%\-W\fP options. -.UNINDENT -.INDENT 0.0 -.TP -.B \-l -Specify the left margin for the output (in inches). This does not affect -the width of the printed image. -.UNINDENT -.INDENT 0.0 -.TP -.B \-M size -Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit. -.UNINDENT -.INDENT 0.0 -.TP -.B \-m -Where possible render using the \fBimagemask\fP PostScript™ operator instead of the -\fBimage\fP operator. When this option is specified \fBtiff2ps\fP will use -\fBimagemask\fP for rendering 1 bit deep images. If this option is not specified -or if the image depth is greater than 1 then the \fBimage\fP operator is used. -.UNINDENT -.INDENT 0.0 -.TP -.B \-o ifdoffset -Set the initial TIFF directory to the IFD at the specified file offset. -This option is useful for selecting thumbnail images and the -like which are hidden using the \fBSubIFD\fP tag. -.UNINDENT -.INDENT 0.0 -.TP -.B \-O -Write PostScript™ to specified file instead of standard output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p -Force the generation of (non\-Encapsulated) PostScript™. -.UNINDENT -.INDENT 0.0 -.TP -.B \-P L|P -Set optional PageOrientation DSC comment to Landscape or Portrait. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r 90|180|270|auto -Rotate image by 90, 180, 270 degrees or auto. Auto picks the best -fit for the image on the specified paper size (eg portrait -or landscape) if \fI\%\-h\fP or \fI\%\-w\fP is specified. Rotation is in degrees -counterclockwise. Auto rotates 90 degrees ccw to produce landscape. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Generate output for a single IFD (page) in the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-t title -Specify the document title string. -.UNINDENT -.INDENT 0.0 -.TP -.B \-T -Print pages for top edge binding. -.UNINDENT -.INDENT 0.0 -.TP -.B \-w size -Specify the horizontal size of the printed area (in inches). -.UNINDENT -.INDENT 0.0 -.TP -.B \-W size -Specify the maximum width of image (in inches). Images with larger sizes will -be split in several pages. Options \fI\%\-L\fP and \fI\%\-W\fP -are mutually exclusive. -.UNINDENT -.INDENT 0.0 -.TP -.B \-x -Override resolution units specified in the TIFF as centimeters. -.UNINDENT -.INDENT 0.0 -.TP -.B \-y -Override resolution units specified in the TIFF as inches. -.UNINDENT -.INDENT 0.0 -.TP -.B \-z -When generating PostScript™ Level 2, data is scaled so that it does not -image into the \fBdeadzone\fP on a page (the outer margin that the printing device -is unable to mark). This option suppresses this behavior. -When PostScript™ Level 1 is generated, data is imaged to the entire printed -page and this option has no affect. -.UNINDENT -.SH EXAMPLES -.sp -The following generates PostScript™ Level 2 for all pages of a facsimile: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2ps \e\-a2 fax.tif | lpr -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Note also that if you have version 2.6.1 or newer of Ghostscript then you -can efficiently preview facsimile generated with the above command. -.sp -To generate Encapsulated PostScript™ for a the image at directory 2 -of an image use: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2ps \e\-d 1 foo.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -(Notice that directories are numbered starting at zero.) -.sp -If you have a long image, it may be split in several pages: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiff2ps \e\-h11 \e\-w8.5 \e\-H14 \e\-L.5 foo.tif > foo.ps -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The page size is set to 8.5x11 by \fI\%\-w\fP and \fI\%\-h\fP -options. We will accept a small amount of vertical compression, so -\fI\%\-H\fP set to 14. Any pages between 11 and 14 inches will be fit onto one page. -Pages longer than 14 inches are cut off at 11 and continued on the next -page. The \fB\-L.5\fP -option says to repeat a half inch on the next page (to improve readability). -.SH BUGS -.sp -Because PostScript™ does not support the notion of a colormap, -8\-bit palette images produce 24\-bit PostScript™ images. -This conversion results in output that is six times -bigger than the original image and which takes a long time -to send to a printer over a serial line. -Matters are even worse for 4\-, 2\-, and 1\-bit palette images. -.sp -Does not handle tiled images when generating PostScript™ Level I output. -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffgt\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%tiff2bw\fP (1), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiff2rgba.1 b/third_party/libtiff/doc/man-prebuilt/tiff2rgba.1 deleted file mode 100644 index bd09354..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiff2rgba.1 +++ /dev/null @@ -1,108 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFF2RGBA" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiff2rgba \- convert a TIFF image to RGBA color space -.SH SYNOPSIS -.sp -\fBtiff2rgba\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBtiff2rgba\fP converts a wide variety of TIFF images into an RGBA TIFF image. This -includes the ability to translate different color spaces and photometric -interpretation into RGBA, support for alpha blending, and translation -of many different bit depths into a 32bit RGBA image. -.sp -Internally this program is implemented using the \fI\%TIFFReadRGBAImage()\fP -function, and it suffers any limitations of that function. This includes -limited support for > 8 \fBBitsPerSample\fP images, and flaws with some -esoteric combinations of \fBBitsPerSample\fP, photometric interpretation, -block organization and planar configuration. -.sp -The generated images are stripped images with four samples per pixel -(red, green, blue and alpha) or if the \fI\%\-n\fP flag is used, three samples -per pixel (red, green, and blue). The resulting images are always planar -configuration contiguous. For this reason, this program is a useful utility -for transform exotic TIFF files into a form ingestible by almost any TIFF -supporting software. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c -Specify a compression scheme to use when writing image data: -\fB\-c none\fP for no compression (the default), -\fB\-c packbits\fP for the PackBits compression algorithm, -\fB\-c zip\fP for the Deflate compression algorithm, -\fB\-c jpeg\fP for the JPEG compression algorithm, and -\fB\-c lzw\fP for Lempel\-Ziv & Welch. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r striprows -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-b -Process the image one block (strip/tile) at a time instead of by reading -the whole image into memory at once. This may be necessary for very large -images on systems with limited RAM. -.UNINDENT -.INDENT 0.0 -.TP -.B \-n -Drop the alpha component from the output file, producing a pure RGB file. -Currently this does not work if the \fI\%\-b\fP flag is also in effect. -.UNINDENT -.INDENT 0.0 -.TP -.B \-B -Use this value as the background when doing alpha compositing (dropping the -alpha component). -.UNINDENT -.INDENT 0.0 -.TP -.B \-M size -Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit. -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiff2bw\fP (1), -\fI\%TIFFReadRGBAImage\fP (3tiff), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffcmp.1 b/third_party/libtiff/doc/man-prebuilt/tiffcmp.1 deleted file mode 100644 index 61b8310..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffcmp.1 +++ /dev/null @@ -1,86 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCMP" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffcmp \- compare two TIFF files -.SH SYNOPSIS -.sp -\fBtiffcmp\fP [ \fIoptions\fP ] \fIfile1.tif\fP \fIfile2.tif\fP -.SH DESCRIPTION -.sp -\fBtiffcmp\fP compares the tags and data in two files created according -to the Tagged Image File Format, Revision 6.0. -The schemes used for compressing data in each file -are immaterial when data are compared\-data are compared on -a scanline\-by\-scanline basis after decompression. -Most directory tags are checked; notable exceptions are: -\fBGrayResponseCurve\fP, \fBColorResponseCurve\fP, and \fBColorMap\fP tags. -Data will not be compared if any of the \fBBitsPerSample\fP, -\fBSamplesPerPixel\fP, or \fBImageWidth\fP values are not equal. -By default, \fBtiffcmp\fP will terminate if it encounters any difference. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-l -List each byte of image data that differs between the files. -.UNINDENT -.INDENT 0.0 -.TP -.B \-z number -List specified number of image data bytes that differs between the files. -.UNINDENT -.INDENT 0.0 -.TP -.B \-t -Ignore any differences in directory tags. -.UNINDENT -.SH BUGS -.sp -Tags that are not recognized by the library are not -compared; they may also generate spurious diagnostics. -.sp -The image data of tiled files is not compared, since the \fI\%TIFFReadScanline()\fP -function is used. An error will be reported for tiled files. -.sp -The pixel and/or sample number reported in differences may be off -in some exotic cases. -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffcp.1 b/third_party/libtiff/doc/man-prebuilt/tiffcp.1 deleted file mode 100644 index f0cb825..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffcp.1 +++ /dev/null @@ -1,338 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCP" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffcp \- copy (and possibly convert) a TIFF file -.SH SYNOPSIS -.sp -\fBtiffcp\fP [ \fIoptions\fP ] \fIsrc1.tif\fP … \fIsrcN.tif\fP \fIdst.tif\fP -.SH DESCRIPTION -.sp -\fBtiffcp\fP combines one or more files created according -to the Tag Image File Format, Revision 6.0 into a single TIFF file. -Because the output file may be compressed using a different -algorithm than the input files, \fBtiffcp\fP is most often -used to convert between different compression schemes. -.sp -By default, \fBtiffcp\fP will copy all the understood tags in a -TIFF directory of an input file to the associated directory in the output file. -.sp -\fBtiffcp\fP can be used to reorganize the storage characteristics of data -in a file, but it is explicitly intended to not alter or convert -the image data content in any way. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-a -Append to an existing output file instead of overwriting it. -.UNINDENT -.INDENT 0.0 -.TP -.B \-b image -subtract the following monochrome image from all others -processed. This can be used to remove a noise bias -from a set of images. This bias image is typically an -image of noise the camera saw with its shutter closed. -.UNINDENT -.INDENT 0.0 -.TP -.B \-B -Force output to be written with Big\-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to. -.UNINDENT -.INDENT 0.0 -.TP -.B \-C -Suppress the use of \(dqstrip chopping\(dq when reading images -that have a single strip/tile of uncompressed data. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c -Specify the compression to use for data written to the output file: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for PackBits compression, -\fB\-c lzw\fP for Lempel\-Ziv & Welch compression, -\fB\-c zip\fP for Deflate compression, -\fB\-c lzma\fP for LZMA2 compression, -\fB\-c jpeg\fP for baseline JPEG compression, -\fB\-c g3\fP for CCITT Group 3 (T.4) compression, -\fB\-c g4\fP for CCITT Group 4 (T.6) compression, or -\fB\-c sgilog\fP for SGILOG compression. -.sp -By default \fBtiffcp\fP will compress data according to the -value of the \fBCompression\fP tag found in the source file. -.sp -The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data. -.sp -Group 3 compression can be specified together with several -T.4\-specific options: -.INDENT 7.0 -.IP \(bu 2 -\fB1d\fP for 1\-dimensional encoding, -.IP \(bu 2 -\fB2d\fP for 2\-dimensional encoding, and -.IP \(bu 2 -\fBfill\fP to force each encoded scanline to be zero\-filled so that the -terminating EOL code lies on a byte boundary. -.UNINDENT -.sp -Group 3\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBg3\fP option; e.g. \fB\-c g3:2d:fill\fP -to get 2D\-encoded data with byte\-aligned EOL codes. -.sp -LZW, Deflate and LZMA2 compression can be specified together with a -\fBpredictor\fP value. A predictor value of 2 causes each scanline of the output image to -undergo horizontal differencing before it is encoded; a value of 1 forces each -scanline to be encoded without differencing. A value 3 is for floating point -predictor which you can use if the encoded data are in floating point format. -LZW\-specific options are specified by appending a \fB:\fP\-separated list to the -\fBlzw\fP option; e.g. \fB\-c lzw:2\fP for LZW compression with horizontal differencing. -.sp -Deflate and LZMA2 encoders support various compression levels (or encoder presets) set as -character \fBp\fP and a preset number. \fBp1\fP is the fastest one with the worst -compression ratio and \fBp9\fP is the slowest but with the best possible ratio; -e.g. \fB\-c zip:3:p9\fP for -Deflate encoding with maximum compression level and floating point predictor. -.sp -For the Deflate codec, and in a libtiff build with libdeflate enabled, \fBp12\fP is -actually the maximum level. -.sp -For the Deflate codec, and in a libtiff build with libdeflate enabled, \fBs0\fP can be used to -require zlib to be used, and \fBs1\fP for libdeflate (defaults to libdeflate when -it is available). -.UNINDENT -.INDENT 0.0 -.TP -.B \-f fillorder -Specify the bit fill order to use in writing output data. By default, \fBtiffcp\fP -will create a new file with the same fill order as the original. Specifying \fB\-f lsb2msb\fP -will force data to be written with the \fBFillOrder\fP tag set to \fBLSB2MSB\fP, while -\fB\-f msb2lsb\fP will force data to be written with the \fBFillOrder\fP tag set to -\fBMSB2LSB\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i -Ignore non\-fatal read errors and continue processing of the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-l -Specify the length of a tile (in pixels). -.sp -\fBtiffcp\fP attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile. -.UNINDENT -.INDENT 0.0 -.TP -.B \-L -Force output to be written with Little\-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to. -.UNINDENT -.INDENT 0.0 -.TP -.B \-M -Suppress the use of memory\-mapped files when reading images. -.UNINDENT -.INDENT 0.0 -.TP -.B \-o offset -Set initial directory offset. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p -Specify the planar configuration to use in writing image data -that has one 8\-bit sample per pixel. By default, \fBtiffcp\fP -will create a new file with the same planar configuration as -the original. Specifying \fB\-p contig\fP -will force data to be written with multi\-sample data packed -together, while \fB\-p separate\fP -will force samples to be written in separate planes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Specify the number of rows (scanlines) in each strip of data -written to the output file. By default (or when value \fB0\fP -is specified), \fBtiffcp\fP attempts to set the rows/strip -that no more than 8 kilobytes of data appear in a strip. If you specify -special value \fB\-1\fP it will results in infinite number of the rows per -strip. The entire image will be the one strip in that case. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Force the output file to be written with data organized in strips -(rather than tiles). -.UNINDENT -.INDENT 0.0 -.TP -.B \-t -Force the output file to be written with data organized in tiles (rather than -strips). options can be used to force the resultant image to be written as -strips or tiles of data, respectively. -.UNINDENT -.INDENT 0.0 -.TP -.B \-w -Specify the width of a tile (in pixels). :program::\fItiffcp\fP -attempts to set the tile dimensions so that no more than 8 kilobytes of data -appear in a tile. -.UNINDENT -.INDENT 0.0 -.TP -.B \-x -Force the output file to be written with \fBPAGENUMBER\fP value in sequence. -.UNINDENT -.INDENT 0.0 -.TP -.B \-8 -Write BigTIFF instead of classic TIFF format. -.UNINDENT -.INDENT 0.0 -.TP -.B \-,= character -substitute \fIcharacter\fP for \fB,\fP -in parsing image directory indices -in files. This is necessary if filenames contain commas. -Note that \fB\-,=\fP -with whitespace immediately following will disable -the special meaning of the \fB,\fP entirely. See examples. -.UNINDENT -.INDENT 0.0 -.TP -.B \-m size -Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit. -.UNINDENT -.SH EXAMPLES -.sp -The following concatenates two files and writes the result using LZW encoding: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp \-c lzw a.tif b.tif result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -To convert a G3 1d\-encoded TIFF to a single strip of G4\-encoded data the following might be used: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp \-c g4 \-r 10000 g3.tif g4.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -(1000 is just a number that is larger than the number of rows in -the source file.) -.sp -To extract a selected set of images from a multi\-image TIFF file, the file -name may be immediately followed by a \fB,\fP separated list of image directory -indices. The first image is always in directory 0. Thus, to copy the 1st and -3rd images of image file \fBalbum.tif\fP to \fBresult.tif\fP: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp album.tif,0,2 result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -A trailing comma denotes remaining images in sequence. The following command -will copy all image with except the first one: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp album.tif,1, result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Given file \fBCCD.tif\fP whose first image is a noise bias -followed by images which include that bias, -subtract the noise from all those images following it -(while decompressing) with the command: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp \-c none \-b CCD.tif CCD.tif,1, result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -If the file above were named \fBCCD,X.tif\fP, the \fB\-,=\fP -option would be required to correctly parse this filename with image numbers, -as follows: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcp \-c none \-,=% \-b CCD,X.tif CCD,X%1%.tif result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcmp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%tiffsplit\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffcrop.1 b/third_party/libtiff/doc/man-prebuilt/tiffcrop.1 deleted file mode 100644 index 93b0aee..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffcrop.1 +++ /dev/null @@ -1,680 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFCROP" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffcrop \- select, copy, crop, convert, extract, and/or process one or more TIFF files -.SH SYNOPSIS -.sp -\fBtiffcrop\fP [ \fIoptions\fP ] \fIsrc1.tif\fP … \fIsrcN.tif\fP \fIdst.tif\fP -.SH DESCRIPTION -.sp -\fBtiffcrop\fP processes one or more files created according -to the Tag Image File Format, Revision 6.0, specification -into one or more TIFF file(s). -\fBtiffcrop\fP is most often used to extract portions of an image for processing -with bar code recognizer or OCR software when that software cannot -restrict the region of interest to a specific portion of the image -or to improve efficiency when the regions of interest must be rotated. -It can also be used to subdivide all or part of a processed image into -smaller sections and export individual images or sections of images -as separate files or separate images within one or more files derived -from the original input image or images. -.sp -The available functions can be grouped broadly into three classes: -.INDENT 0.0 -.IP 1. 3 -Those that select individual images or sections of images from the input files. -The options \fI\%\-N\fP for sequences or lists of individual images in the input files, -\fI\%\-Z\fP for zones, \fI\%\-z\fP for regions, \fI\%\-X\fP and \fI\%\-Y\fP for fixed sized selections, -\fI\%\-m\fP for margins, \fI\%\-U\fP for units, and \fI\%\-E\fP for edge reference provide a variety of -ways to specify portions of the input image. -.IP 2. 3 -Those that allow the individual images or selections to be exported to one or -more output files in different groupings and control the organization of the -data in the output images. The options \fI\%\-P\fP for page size grouping, \fI\%\-S\fP for -subdivision into columns and rows and \fI\%\-e\fP for export mode options that produce -one or more files from each input image. The options \fI\%\-r\fP, \fI\%\-s\fP, \fI\%\-t\fP, \fI\%\-w\fP control -strip and tile format and sizes while \fI\%\-B\fP, \fI\%\-L\fP, \fI\%\-c\fP, \fI\%\-f\fP modify the endian addressing -scheme, the compression options, and the bit fill sequence of images as they -are written. -.IP 3. 3 -Those that perform some action on each image that is selected from the input file. -The options include \fI\%\-R\fP for rotate, \fI\%\-I\fP for inversion of the photometric -interpretation and/or data values, and \fI\%\-F\fP to flip (mirror) the image horizontally -or vertically. -.UNINDENT -.sp -Functions are applied to the input image(s) in the following order: -cropping, fixed area extraction, zone and region extraction, -inversion, mirroring, rotation. -.sp -Functions are applied to the output image(s) in the following order: -export mode options for grouping zones, regions, or images into -one or more files, \fIor\fP row and column divisions with output margins, -\fIor\fP page size divisions with page orientation options. -.sp -Finally, strip, tile, byte order, output resolution, and compression options are -applied to all output images. -.sp -The output file(s) may be organized and compressed using a different -algorithm from the input files. -By default, \fBtiffcrop\fP will copy all the understood tags in a TIFF -directory of an input file to the associated directory in the output file. -Options can be used to force the resultant image to be written as strips -or tiles of data, respectively. -.sp -\fBtiffcrop\fP can be used to reorganize the storage characteristics of data -in a file, and to reorganize, extract, rotate, and otherwise -process the image data as specified at the same time whereas -\fBtiffcp\fP does not alter the image data within the file. -.sp -Using the options for selecting individual input images and the -options for exporting images and/or segments defined as zones or -regions of each input image, \fBtiffcrop\fP can perform the -functions of \fBtiffcp\fP and \fBtiffsplit\fP in a single pass -while applying multiple operations to individual selections or images. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-h -Display the syntax summary for tiffcrop. -.UNINDENT -.INDENT 0.0 -.TP -.B \-v -Report the current version and last modification date for tiffcrop. -.UNINDENT -.INDENT 0.0 -.TP -.B \-N odd|even|#,#\-#,#|last -Specify one or more series or range(s) of images within each file to process. -The words \fBodd\fP or \fBeven\fP -may be used to specify all odd or even numbered images counting from one. -Note that internally, TIFF images are numbered from zero rather than one -but since this convention is not obvious to most users, \fBtiffcrop\fP used 1 -to specify the first image in a multipage file. The word \fBlast\fP -may be used in place of a number in the sequence to indicate the -final image in the file without knowing how many images there are. -Ranges of images may be specified with a dash and multiple sets -can be indicated by joining them in a comma\-separated list. eg. use -\fB\-N 1,5\-7,last\fP -to process the 1st, 5th through 7th, and final image in the file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-E top|bottom|left|right -Specify the \fBtop\fP, \fBbottom\fP, \fBleft\fP, or \fBright\fP edge as the reference from -which to calculate the width and length of crop regions or sequence -of positions for zones. When used with the \fI\%\-e\fP option for exporting -zones or regions, the reference edge determines how composite images -are arranged. Using \fB\-E left\fP or \fB\-E right\fP causes successive zones or -regions to be merged horizontally whereas using \fB\-E top\fP or \fB\-E bottom\fP -causes successive zones or regions to be arranged vertically. This -option has no effect on export layout when multiple zones or regions -are not being exported to composite images. Edges may be abbreviated -to the first letter. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e combined|divided|image|multiple|separate -Specify the export mode for images and selections from input images. -The final filename on the command line is considered to be the -destination file or filename stem for automatically generated -sequences of files. Modes may be abbreviated to the first letter. -.SH EXPORT MODES -.TS -center; -|l|l|. -_ -T{ -Export mode -T} T{ -Description -T} -_ -T{ -combined -T} T{ -All images and selections are written to a single file with -multiple selections from one image combined into a single image (default) -T} -_ -T{ -divided -T} T{ -All images and selections are written to a single file -with each selection from one image written to a new image -T} -_ -T{ -image -T} T{ -Each input image is written to a new file (numeric filename sequence) -with multiple selections from the image combined into one image -T} -_ -T{ -multiple -T} T{ -Each input image is written to a new file (numeric filename sequence) -with each selection from the image written to a new image -T} -_ -T{ -separate -T} T{ -Individual selections from each image are written to separate files -T} -_ -.TE -.UNINDENT -.INDENT 0.0 -.TP -.B \-U in|cm|px -Specify the type of units to apply to dimensions for margins and -crop regions for input and output images. Inches or centimeters -are converted to pixels using the resolution unit specified in the -TIFF file (which defaults to inches if not specified in the IFD). -.UNINDENT -.INDENT 0.0 -.TP -.B \-m top,left,bottom,right -Specify margins to be removed from the input image. The order must -be \fItop\fP, \fIleft\fP, \fIbottom\fP, \fIright\fP with only commas separating the elements -of the list. Margins are scaled according to the current units and -removed before any other extractions are computed. -.UNINDENT -.INDENT 0.0 -.TP -.B \-X # -Set the horizontal (X\-axis) dimension of a region to extract relative to -the specified origin reference. If the origin is the top or bottom -edge, the X axis value will be assumed to start at the left edge. -.UNINDENT -.INDENT 0.0 -.TP -.B \-Y # -Set the vertical (Y\-axis) dimension of a region to extract relative to -the specified origin reference. If the origin is the left or right -edge, the Y axis value will be assumed to start at the top. -.UNINDENT -.INDENT 0.0 -.TP -.B \-Z #:#,#:# -Specify zones of the image designated as position X of Y equal sized portions -measured from the reference edge, eg 1:3 would be first third of the -image starting from the reference edge minus any margins specified -for the confining edges. Multiple zones can be specified as a comma -separated list but they must reference the same edge. To extract the -top quarter and the bottom third of an image you would use -\fB\-Z 1:4,3:3\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-z x1,y1,x2,y2: ... :xN,yN,xN+1,yN+1 -Specify a series of coordinates to define regions for processing and exporting. -The coordinates represent the top left and lower right corners of each region -in the current units, eg inch, cm, or pixels. Pixels are counted from one to -width or height and inches or cm are calculated from image resolution data. -.sp -Each colon delimited series of four values represents the horizontal and vertical -offsets from the top and left edges of the image, regardless of the edge specified -with the \fI\%\-E\fP option. The first and third values represent the horizontal offsets of -the corner points from the left edge while the second and fourth values represent -the vertical offsets from the top edge. -.UNINDENT -.INDENT 0.0 -.TP -.B \-F horiz|vert -Flip, ie mirror, the image or extracted region horizontally or vertically. -.UNINDENT -.INDENT 0.0 -.TP -.B \-R 90|180|270 -Rotate the image or extracted region 90, 180, or 270 degrees clockwise. -.UNINDENT -.INDENT 0.0 -.TP -.B \-I [black|white|data|both] -Invert color space, eg dark to light for bilevel and grayscale images. -This can be used to modify negative images to positive or to correct -images that have the \fBPHOTOMETRIC_INTERPRETATION\fP tag set incorrectly. -If the value is black or white, the \fBPHOTOMETRIC_INTERPRETATION\fP tag is set to -MinIsBlack or MinIsWhite, without altering the image data. If the argument -is data or both, the data values of the image are modified. Specifying both -inverts the data and the \fBPHOTOMETRIC_INTERPRETATION\fP tag, whereas using data -inverts the data but not the \fBPHOTOMETRIC_INTERPRETATION\fP tag. -No support for modifying the color space of color images in this release. -.UNINDENT -.INDENT 0.0 -.TP -.B \-H # -Set the horizontal resolution of output images to \fI#\fP, -expressed in the current units. -.UNINDENT -.INDENT 0.0 -.TP -.B \-V # -Set the vertical resolution of the output images to \fI#\fP -expressed in the current units. -.UNINDENT -.INDENT 0.0 -.TP -.B \-J # -Set the horizontal margin of an output page size to \fI#\fP -expressed in the current units when sectioning image into \fIcolumns\fP × \fIrows\fP -subimages using the \fI\%\-S\fP \fBcols:rows\fP option. -.UNINDENT -.INDENT 0.0 -.TP -.B \-K # -Set the vertical margin of an output page size to \fI#\fP -expressed in the current units when sectioning image into \fIcolumns\fP × \fIrows\fP -subimages using the \fI\%\-S\fP \fBcols:rows\fP option. -.UNINDENT -.INDENT 0.0 -.TP -.B \-O portrait|landscape|auto -Set the output orientation of the pages or sections. -Auto will use the arrangement that requires the fewest pages. -This option is only meaningful in conjunction with the \fI\%\-P\fP -option to format an image to fit on a specific paper size. -.UNINDENT -.INDENT 0.0 -.TP -.B \-P page -Format the output images to fit on page size paper. Use -\fB\-P list\fP to show the supported page sizes and dimensions. -You can define a custom page size by entering the width and length of the -page in the current units with the following format \fB#.#x#.#\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-S cols:rows -Divide each image into cols across and rows down equal sections. -.UNINDENT -.INDENT 0.0 -.TP -.B \-B -Force output to be written with Big\-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to. -.UNINDENT -.INDENT 0.0 -.TP -.B \-C -Suppress the use of \(dqstrip chopping\(dq when reading images -that have a single strip/tile of uncompressed data. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c -Specify the compression to use for data written to the output file: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for PackBits compression, -\fB\-c lzw\fP for Lempel\-Ziv & Welch compression, -\fB\-c jpeg\fP for baseline JPEG compression. -\fB\-c zip\fP for Deflate compression, -\fB\-c g3\fP for CCITT Group 3 (T.4) compression, -\fB\-c g4\fP for CCITT Group 4 (T.6) compression. -By default \fBtiffcrop\fP will compress data according to the value of the -\fBCompression\fP tag found in the source file. -.sp -The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data. -.sp -Group 3 compression can be specified together with several -T.4\-specific options: -\fB1d\fP for 1\-dimensional encoding, -\fB2d\fP for 2\-dimensional encoding, -\fBfill\fP to force each encoded scanline to be zero\-filled so that the -terminating EOL code lies on a byte boundary. -Group 3\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBg3\fP option; e.g. \fB\-c g3:2d:fill\fP -to get 2D\-encoded data with byte\-aligned EOL codes. -.sp -LZW compression can be specified together with a \fBpredictor\fP -value. A predictor value of 2 causes -each scanline of the output image to undergo horizontal -differencing before it is encoded; a value -of 1 forces each scanline to be encoded without differencing. -LZW\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBlzw\fP option; e.g. \fB\-c lzw:2\fP for LZW -compression with horizontal differencing. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Specify the bit fill order to use in writing output data. -By default, \fBtiffcrop\fP -will create a new file with the same fill order as the original. -Specifying -\fB\-f lsb2msb\fP -will force data to be written with the \fBFillOrder\fP tag set to -\fBLSB2MSB\fP, while -\fB\-f msb2lsb\fP will force data to be written with the \fBFillOrder\fP -tag set to \fBMSB2LSB\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i -Ignore non\-fatal read errors and continue processing of the input file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-k size -Set maximum memory allocation size (in MiB). The default is 256MiB. -Set to 0 to disable the limit. -.UNINDENT -.INDENT 0.0 -.TP -.B \-l -Specify the length of a tile (in pixels). -\fBtiffcrop\fP attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile. -.UNINDENT -.INDENT 0.0 -.TP -.B \-L -Force output to be written with Little\-Endian byte order. -This option only has an effect when the output file is created or -overwritten and not when it is appended to. -.UNINDENT -.INDENT 0.0 -.TP -.B \-M -Suppress the use of memory\-mapped files when reading images. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p -Specify the planar configuration to use in writing image data -that has more than one sample per pixel. -By default, \fBtiffcrop\fP -will create a new file with the same planar configuration as -the original. -Specifying \fB\-p contig\fP -will force data to be written with multi\-sample data packed -together, while -\fB\-p separate\fP -will force samples to be written in separate planes. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Specify the number of rows (scanlines) in each strip of data -written to the output file. -By default (or when value \fB0\fP is specified), \fBtiffcrop\fP -attempts to set the rows/strip that no more than 8 kilobytes of -data appear in a strip. If you specify the special value -\fB\-1\fP it will results in infinite number of the rows per strip. The entire image -will be the one strip in that case. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Force the output file to be written with data organized in strips -(rather than tiles). -.UNINDENT -.INDENT 0.0 -.TP -.B \-t -Force the output file to be written with data organized in tiles -(rather than strips). -.UNINDENT -.INDENT 0.0 -.TP -.B \-w -Specify the width of a tile (in pixels). -\fBtiffcrop\fP attempts to set the tile dimensions so -that no more than 8 kilobytes of data appear in a tile. -.UNINDENT -.INDENT 0.0 -.TP -.B \-D opt1:value1,opt2:value2,opt3:value3:opt4:value4 -Debug and dump facility -.sp -Display program progress and/or dump raw data to non\-TIFF files. -Options include the following and must be joined as a comma -separated list. The use of this option is generally limited to -program debugging and development of future options. An equal sign -may be substituted for the colon in option:value pairs. -.sp -\fBdebug:N\fP: -.INDENT 7.0 -.INDENT 3.5 -Display limited program progress indicators where larger \fIN\fP -increases the level of detail. -.UNINDENT -.UNINDENT -.sp -\fBformat:txt|raw\fP: -.INDENT 7.0 -.INDENT 3.5 -Format any logged data as ASCII text or raw binary -values. ASCII text dumps include strings of ones and zeroes representing -the binary values in the image data plus identifying headers. -.UNINDENT -.UNINDENT -.sp -\fBlevel:N\fP: -.INDENT 7.0 -.INDENT 3.5 -Specify the level of detail presented in the dump files. -This can vary from dumps of the entire input or output image data to dumps -of data processed by specific functions. Current range of levels is 1 to 3. -.UNINDENT -.UNINDENT -.sp -\fBinput:full\-path\-to\-directory/input\-dumpname\fP: -.sp -\fBoutput:full\-path\-to\-directory/output\-dumpname\fP: -.INDENT 7.0 -.INDENT 3.5 -When dump files are being written, each image will be written to a separate -file with the name built by adding a numeric sequence value to the dumpname -and an extension of \fB\&.txt\fP for ASCII dumps or \fB\&.bin\fP for binary dumps. -.UNINDENT -.UNINDENT -.sp -The four debug/dump options are independent, though it makes little sense to -specify a dump file without specifying a detail level. -.sp -Note: \fBtiffcrop\fP may be compiled with \fB\-DDEVELMODE\fP to enable -additional very low level debug reporting. -.UNINDENT -.sp -However, not all option combinations are permitted. -.INDENT 0.0 -.INDENT 3.5 -Note 1: The (\-X|\-Y), \-Z, \-z and \-S options are mutually exclusive. -In no case should the options be applied to a given selection successively. -.sp -Note 2: Any of the \-X, \-Y, \-Z and \-z options together with other PAGE_MODE_x options -such as \-H, \-V, \-P, \-J or \-K are not supported and may cause buffer overflows. -.UNINDENT -.UNINDENT -.SH EXAMPLES -.sp -The following concatenates two files and writes the result using LZW -encoding: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-c lzw a.tif b.tif result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -To convert a G3 1d\-encoded TIFF to a single strip of G4\-encoded data the following might be used: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-c g4 \-r 10000 g3.tif g4.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -(1000 is just a number that is larger than the number of rows in -the source file.) -.sp -To extract a selected set of images from a multi\-image TIFF file -use the \fI\%\-N\fP option described above. Thus, to copy the 1st and 3rd -images of image file \fBalbum.tif\fP to \fBresult.tif\fP: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-N 1,3 album.tif result.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Invert a bilevel image scan of a microfilmed document and crop off margins of -0.25 inches on the left and right, 0.5 inch on the top, and 0.75 inch on the -bottom. From the remaining portion of the image, select the second and third -quarters, ie, one half of the area left from the center to each margin: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-U in \-m 0.5,0.25,0.75,0.25 \-E left \-Z 2:4,3:4 \-I both MicrofilmNegative.tif MicrofilmPostiveCenter.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Extract only the final image of a large Architectural E sized -multipage TIFF file and rotate it 90 degrees clockwise while -reformatting the output to fit on tabloid sized sheets with one -quarter of an inch on each side: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-N last \-R 90 \-O auto \-P tabloid \-U in \-J 0.25 \-K 0.25 \-H 300 \-V 300 Big\-PlatMap.tif BigPlatMap\-Tabloid.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The output images will have a specified resolution of 300 dpi in both -directions. The orientation of each page will be determined by whichever -choice requires the fewest pages. To specify a specific orientation, use -the portrait or landscape option. The paper size option does not resample -the image. It breaks each original image into a series of smaller images -that will fit on the target paper size at the specified resolution. -.sp -Extract two regions 2048 pixels wide by 2048 pixels high from each page of -a multi\-page input file and write each region to a separate output file: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffcrop \-U px \-z 1,1,2048,2048:1,2049,2048,4097 \-e separate CheckScans.tiff Check -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The output file names will use the stem \fBCheck\fP with a numeric suffix which is -incremented for each region of each image, eg \fBCheck\-001.tiff\fP, -\fBCheck\-002.tiff\fP … \fBCheck\-NNN.tiff\fP\&. To produce a unique file for each page -of the input image with one new image for each region of the input image on that page -change the export option to \fB\-e multiple\fP\&. -.SH NOTES -.sp -In general, bilevel, grayscale, palette and RGB(A) data with bit depths -from 1 to 32 bits should work in both interleaved and separate plane -formats. Unlike \fBtiffcp\fP, \fBtiffcrop\fP can read and write tiled images with -bits per sample that are not a multiple of 8 in both interleaved and -separate planar format. Floating point data types are supported at -bit depths of 16, 24, 32 and 64 bits per sample. -.sp -Not all images can be converted from one compression scheme to another. -Data with some photometric interpretations and/or bit depths are tied to -specific compression schemes and vice\-versa, e.g. Group 3/4 compression -is only usable for bilevel data. JPEG compression is only usable on 8 -bit per sample data (or 12 bit if \fBlibtiff\fP -was compiled with 12 bit JPEG support). Support for OJPEG compressed -images is problematic at best. Since OJPEG compression is no longer -supported for writing images with LibTIFF, these images will be updated -to the newer JPEG compression when they are copied or processed. This -may cause the image to appear color shifted or distorted after conversion. -In some cases, it is possible to remove the original compression from -image data using the option \fB\-c none\fP\&. -.sp -\fBtiffcrop\fP does not currently provide options to up or downsample data to -different bit depths or convert data from one photometric interpretation -to another, e.g. 16 bits per sample to 8 bits per sample or RGB to grayscale. -.sp -\fBtiffcrop\fP is very loosely derived from code in \fBtiffcp\fP -with extensive modifications and additions to support the selection of input -images and regions and the exporting of them to one or more output files in -various groupings. The image manipulation routines are entirely new and -additional ones may be added in the future. It will handle tiled images with -bit depths that are not a multiple of eight that tiffcp may refuse to read. -.sp -\fBtiffcrop\fP was designed to handle large files containing many moderate sized images -with memory usage that is independent of the number of images in the file. -In order to support compression modes that are not based on individual -scanlines, e.g. JPEG, it now reads images by strip or tile rather than by -individual scanlines. In addition to the memory required by the input and -output buffers associated with \fBlibtiff\fP -one or more buffers at least as large as the largest image to be read are -required. The design favors large volume document processing uses over -scientific or graphical manipulation of large datasets as might be found -in research or remote sensing scenarios. -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcmp\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffmedian\fP (1), -\fI\%tiffsplit\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffdither.1 b/third_party/libtiff/doc/man-prebuilt/tiffdither.1 deleted file mode 100644 index 469d796..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffdither.1 +++ /dev/null @@ -1,157 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFDITHER" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffdither \- convert a greyscale TIFF image to bilevel using dithering -.SH SYNOPSIS -.sp -\fBtiffdither\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBtiffdither\fP converts a single channel 8\-bit greyscale image to a bilevel image -using Floyd\-Steinberg error propagation with thresholding. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c compress -Specify the compression to use for data written to the output file: -.TS -center; -|l|l|. -_ -T{ -Compression -T} T{ -Description -T} -_ -T{ -none -T} T{ -no compression -T} -_ -T{ -packbits -T} T{ -PackBits compression -T} -_ -T{ -lzw -T} T{ -Lempel\-Ziv & Welch compression -T} -_ -T{ -zip -T} T{ -Deflate compression -T} -_ -T{ -g3 -T} T{ -CCITT Group 3 (T.4) compression -T} -_ -T{ -g4 -T} T{ -for CCITT Group 4 (T.6) compression -T} -_ -.TE -.sp -By default \fBtiffdither\fP -will compress data according to the value of the -\fBCompression\fP tag found in the source file. -.sp -The CCITT Group 3 and Group 4 compression algorithms can only -be used with bilevel data. -.sp -Group 3 compression can be specified together with several -T.4\-specific options: -\fB1d\fP for 1\-dimensional encoding, -\fB2d\fP for 2\-dimensional encoding, and -\fBfill\fP to force each encoded scanline to be zero\-filled so that the -terminating EOL code lies on a byte boundary. -Group 3\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBg3\fP option; e.g. \fB\-c g3:2d:fill\fP -to get 2D\-encoded data with byte\-aligned EOL codes. -.sp -LZW compression can be specified together with a \fBpredictor\fP value. -A predictor value of 2 causes each scanline of the output image to undergo -horizontal differencing before it is encoded; a value -of 1 forces each scanline to be encoded without differencing. -LZW\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBlzw\fP option; e.g. \fB\-c lzw:2\fP for LZW -compression with horizontal differencing. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Specify the bit fill order to use in writing output data. -By default, \fBtiffdither\fP -will create a new file with the same fill order as the original. -Specifying -\fB\-f lsb2msb\fP will force data to be written with the -\fBFillOrder\fP tag set to \fBLSB2MSB\fP, while -\fB\-f msb2lsb\fP will force data to be written with the -\fBFillOrder\fP tag set to \fBMSB2LSB\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Make each strip have no more than the given number of rows. -.UNINDENT -.INDENT 0.0 -.TP -.B \-t -Set the threshold value for dithering. -By default the threshold value is 128. -.UNINDENT -.SH NOTES -.sp -The dither algorithm is taken from the \fBtiffmedian\fP -program (written by Paul Heckbert). -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%fax2tiff\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiff2bw\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffdump.1 b/third_party/libtiff/doc/man-prebuilt/tiffdump.1 deleted file mode 100644 index 3f9e04e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffdump.1 +++ /dev/null @@ -1,81 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFDUMP" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffdump \- print verbatim information about TIFF files -.SH SYNOPSIS -.sp -\fBtiffdump\fP [ \fIoptions\fP ] \fIname\fP … -.SH DESCRIPTION -.sp -\fBtiffdump\fP displays directory information from files created according -to the Tag Image File Format, Revision 6.0. -The header of each TIFF file (magic number, version, and first directory offset) -is displayed, followed by the tag contents of each directory in the file. -For each tag, the name, data type, count, and value(s) is displayed. -When the symbolic name for a tag or data type is known, the symbolic -name is displayed followed by it\(aqs numeric (decimal) value. -Tag values are displayed enclosed in \fB<>\fP characters immediately -preceded by the value of the count field. -For example, an \fBImageWidth\fP -tag might be displayed as \fBImageWidth (256) SHORT (3) 1<800>\fP\&. -.sp -\fBtiffdump\fP is particularly useful for investigating the contents of -TIFF files that \fBlibtiff\fP does not understand. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-h -Force numeric data to be printed in hexadecimal rather than the -default decimal. -.UNINDENT -.INDENT 0.0 -.TP -.B \-m items -Change the number of indirect data items that are printed. By default, this -will be 24. -.UNINDENT -.INDENT 0.0 -.TP -.B \-o offset -Dump the contents of the IFD at the a particular file offset. -The file offset may be specified using the usual C\-style syntax; -i.e. a leading \fB0x\fP for hexadecimal and a leading \fB0\fP for octal. -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiffinfo\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffgt.1 b/third_party/libtiff/doc/man-prebuilt/tiffgt.1 deleted file mode 100644 index f85f284..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffgt.1 +++ /dev/null @@ -1,308 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFGT" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffgt \- display an image stored in a TIFF file (Silicon Graphics version) -.SH SYNOPSIS -.sp -\fBtiffgt\fP [ \fIoptions\fP ] \fIinput.tif\fP … -.SH DESCRIPTION -.sp -\fBtiffgt\fP displays one or more images stored using the -Tag Image File Format, Revision 6.0. -.sp -\fBtiffgt\fP correctly handles files with any of the following characteristics: -.INDENT 0.0 -.INDENT 3.5 -.SH SUPPORTED TAG VALUES -.TS -center; -|l|l|. -_ -T{ -Tag -T} T{ -Value -T} -_ -T{ -BitsPerSample -T} T{ -1, 2, 4, 8, 16 -T} -_ -T{ -SamplesPerPixel -T} T{ -1, 3, 4 (the 4th sample is ignored) -T} -_ -T{ -PhotometricInterpretation -T} T{ -0 (min\-is\-white), 1 (min\-is\-black), 2 (RGB), 3 (palette), 6 (YCbCr) -T} -_ -T{ -PlanarConfiguration -T} T{ -1 (contiguous), 2 (separate) -T} -_ -T{ -Orientation -T} T{ -1 (top\-left), 4 (bottom\-left) -T} -_ -.TE -.UNINDENT -.UNINDENT -.sp -Data may be organized as strips or tiles and may be -compressed with any of the compression algorithms supported -by the \fBlibtiff\fP library. -.sp -For palette images (\fBPhotometricInterpretation=3\fP), \fBtiffgt\fP -inspects the colormap values and assumes either 16\-bit -or 8\-bit values according to the maximum value. -That is, if no colormap entry greater than 255 is found, -\fBtiffgt\fP assumes the colormap has only 8\-bit values; otherwise -it assumes 16\-bit values. -This inspection is done to handle old images written by -previous (incorrect) versions of -\fBlibtiff\fP\&. -.sp -\fBtiffgt\fP can be used to display multiple images one\-at\-a\-time. -The left mouse button switches the display to the first image in the -\fInext\fP file in the list of files specified on the command line. -The right mouse button switches to the first image in the -\fIprevious\fP file in the list. -The middle mouse button causes the first image in the first file -specified on the command line to be displayed. -In addition the following keyboard commands are recognized: -.INDENT 0.0 -.INDENT 3.5 -.SH ACTION KEYS -.TS -center; -|l|l|. -_ -T{ -Key -T} T{ -Description -T} -_ -T{ -\fBb\fP -T} T{ -Use a \fBPhotometricInterpretation\fP -of \fBMinIsBlack\fP in displaying the current image -T} -_ -T{ -\fBl\fP -T} T{ -Use a \fBFillOrder\fP of lsb\-to\-msb in decoding the current image -T} -_ -T{ -\fBm\fP -T} T{ -Use a \fBFillOrder\fP of msb\-to\-lsb in decoding the current image -T} -_ -T{ -\fBc\fP -T} T{ -Use a colormap visual to display the current image -T} -_ -T{ -\fBr\fP -T} T{ -Use a true color (24\-bit RGB) visual to display the current image -T} -_ -T{ -\fBw\fP -T} T{ -Use a \fBPhotometricInterpretation\fP of \fBMinIsWhite\fP in displaying -the current image -T} -_ -T{ -\fBW\fP -T} T{ -Toggle (enable/disable) display of warning messages from the -TIFF library when decoding images -T} -_ -T{ -\fBE\fP -T} T{ -Toggle (enable/disable) display of error messages from the -TIFF library when decoding images. -T} -_ -T{ -\fBz\fP -T} T{ -Reset all parameters to their default settings (\fBFillOrder\fP, -\fBPhotometricInterpretation\fP, handling of warnings and errors) -T} -_ -T{ -\fBPageUp\fP -T} T{ -Display the previous image in the current file or the last -image in the previous file -T} -_ -T{ -\fBPageDown\fP -T} T{ -Display the next image in the current file or the first image -in the next file -T} -_ -T{ -\fBHome\fP -T} T{ -Display the first image in the current file -T} -_ -T{ -\fBEnd\fP -T} T{ -Display the last image in the current file (unimplemented) -T} -_ -.TE -.UNINDENT -.UNINDENT -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c -Force image display in a colormap window. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d -Specify an image to display by directory number. -By default the first image in the file is displayed. -Directories are numbered starting at zero. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e -Enable reporting of error messages from the TIFF library. -By default \fBtiffgt\fP silently ignores images that cannot be read. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Force \fBtiffgt\fP to run as a foreground process. -By default \fBtiffgt\fP will place itself in the background once it -has opened the requested image file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-l -Force the presumed bit ordering to be LSB to MSB. -.UNINDENT -.INDENT 0.0 -.TP -.B \-m -Force the presumed bit ordering to be MSB to LSB. -.UNINDENT -.INDENT 0.0 -.TP -.B \-o -Specify an image to display by directory offset. -By default the first image in the file is displayed. -Directories offsets may be specified using C\-style syntax; -i.e. a leading \fB0x\fP for hexadecimal and a leading \fB0\fP for octal. -.UNINDENT -.INDENT 0.0 -.TP -.B \-p -Override the value of the \fBPhotometricInterpretation\fP -tag; the parameter may be one of: \fBminiswhite\fP , -\fBminisblack\fP, \fBrgb\fP, \fBpalette\fP, \fBmask\fP, -\fBseparated\fP, \fBycbcr\fP, and \fBcielab\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Force image display in a full color window. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Stop on the first read error. -By default all errors in the input data are ignored and -\fBtiffgt\fP -does it\(aqs best to display as much of an image as possible. -.UNINDENT -.INDENT 0.0 -.TP -.B \-w -Enable reporting of warning messages from the TIFF library. -By default \fBtiffgt\fP -ignores warning messages generated when reading an image. -.UNINDENT -.INDENT 0.0 -.TP -.B \-v -Place information in the title bar describing -what type of window (full color or colormap) is being -used, the name of the input file, and the directory -index of the image (if non\-zero). -By default, the window type is not shown in the title bar. -.UNINDENT -.SH BUGS -.sp -Images wider and taller than the display are silently truncated to avoid -crashing old versions of the window manager. -.SH SEE ALSO -.sp -\fI\%tiffdump\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffinfo.1 b/third_party/libtiff/doc/man-prebuilt/tiffinfo.1 deleted file mode 100644 index 55c7431..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffinfo.1 +++ /dev/null @@ -1,104 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFINFO" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffinfo \- print information about TIFF files -.SH SYNOPSIS -.sp -\fBtiffinfo\fP [ \fIoptions\fP ] \fIinput.tif\fP … -.SH DESCRIPTION -.sp -\fBtiffinfo\fP displays information about files created according -to the Tag Image File Format, Revision 6.0. By default, the contents of -each TIFF directory in each file are displayed, with the value of each -tag shown symbolically (where sensible). -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c -Display the colormap and color/gray response curves, if present. -.UNINDENT -.INDENT 0.0 -.TP -.B \-D -In addition to displaying the directory tags, -read and decompress all the data in each image (but not display it). -.UNINDENT -.INDENT 0.0 -.TP -.B \-d -In addition to displaying the directory tags, -print each byte of decompressed data in hexadecimal. -.UNINDENT -.INDENT 0.0 -.TP -.B \-j -Display any JPEG\-related tags that are present. -.UNINDENT -.INDENT 0.0 -.TP -.B \-o -Set the initial TIFF directory according to the specified file offset. -The file offset may be specified using the usual C\-style syntax; -i.e. a leading \fB0x\fP for hexadecimal and a leading \fB0\fP for octal. -.UNINDENT -.INDENT 0.0 -.TP -.B \-s -Display the offsets and byte counts for each data strip in a directory. -.UNINDENT -.INDENT 0.0 -.TP -.B \-z -Enable strip chopping when reading image data. -.UNINDENT -.INDENT 0.0 -.TP -.B \-# -Set the initial TIFF directory to \fI#\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-W -Warn about unknown tags. -.UNINDENT -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP, -\fI\%tiffcp\fP, -\fI\%tiffcmp\fP, -\fI\%tiffmedian\fP, -\fI\%libtiff\fP -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffmedian.1 b/third_party/libtiff/doc/man-prebuilt/tiffmedian.1 deleted file mode 100644 index d70840e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffmedian.1 +++ /dev/null @@ -1,101 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFMEDIAN" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffmedian \- apply the median cut algorithm to data in a TIFF file -.SH SYNOPSIS -.sp -\fBtiffmedian\fP [ \fIoptions\fP ] \fIinput.tif\fP \fIoutput.tif\fP -.SH DESCRIPTION -.sp -\fBtiffmedian\fP applies the median cut algorithm to an RGB -image in \fIinput.tif\fP to generate a palette image that is written to -\fIoutput.tif\fP\&. The generated colormap has, by default, 256 entries. -The image data is quantized by mapping each pixel to the closest color -values in the colormap. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-c -Specify the compression to use for data written to the output file: -\fB\-c none\fP for no compression, -\fB\-c packbits\fP for PackBits compression, -\fB\-c lzw\fP for Lempel\-Ziv & Welch compression, -\fB\-c zip\fP for Deflate compression. -.sp -By default \fBtiffmedian\fP will compress data according to the -value of the \fBCompression\fP tag found in the source file. -.sp -LZW compression can be specified together with a \fBpredictor\fP value. -A predictor value of 2 causes each scanline of the output image to -undergo horizontal differencing before it is encoded; a value of 1 -forces each scanline to be encoded without differencing. -LZW\-specific options are specified by appending a \fB:\fP\-separated -list to the \fBlzw\fP option; e.g. \fB\-c lzw:2\fP for LZW compression -with horizontal differencing. -.UNINDENT -.INDENT 0.0 -.TP -.B \-C -Specify the number of entries to use in the generated colormap. -By default all 256 entries/colors are used. -.UNINDENT -.INDENT 0.0 -.TP -.B \-f -Apply Floyd\-Steinberg dithering before selecting a colormap entry. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r -Specify the number of rows (scanlines) in each strip of data -written to the output file. By default, \fBtiffmedian\fP -attempts to set the rows/strip that no more than 8 kilobytes of -data appear in a strip. -.UNINDENT -.SH NOTES -.sp -This program is derived from Paul Heckbert\(aqs \fBmedian\fP program. -.SH SEE ALSO -.sp -\fI\%pal2rgb\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%tiffcmp\fP (1), -\fI\%libtiff\fP (3tiff), -.sp -\fB\(dqColor Image Quantization for Frame Buffer Display\(dq\fP, -Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297\-307. -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffset.1 b/third_party/libtiff/doc/man-prebuilt/tiffset.1 deleted file mode 100644 index 223563e..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffset.1 +++ /dev/null @@ -1,132 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSET" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffset \- set or unset a field in a TIFF header -.SH SYNOPSIS -.sp -\fBtiffset\fP [ \fIoptions\fP ] \fIfilename.tif\fP -.SH DESCRIPTION -.sp -\fBtiffset\fP sets the value of a TIFF header to a specified value -or removes an existing setting. -.SH OPTIONS -.INDENT 0.0 -.TP -.B \-d dirnumber -Change the current directory (starting at 0). -.UNINDENT -.INDENT 0.0 -.TP -.B \-s tagnumber [ count ] value … -Set the value of the named tag to the value or values specified. -.UNINDENT -.INDENT 0.0 -.TP -.B \-sd diroffset -Change the current directory by offset. -.UNINDENT -.INDENT 0.0 -.TP -.B \-sf tagnumber filename -Set the value of the tag to the contents of filename. This option is -supported for ASCII tags only. -.UNINDENT -.INDENT 0.0 -.TP -.B \-u tagnumber -Unset the tag. -.UNINDENT -.SH EXAMPLES -.sp -The following example sets the image description tag (270) of \fBa.tif\fP to -the contents of the file \fBdescrip\fP: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffset \-sf 270 descrip a.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -The following example sets the artist tag (315) of \fBa.tif\fP to the string -\fBAnonymous\fP: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffset \-s 315 Anonymous a.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -This example sets the resolution of the file \fBa.tif\fP to 300 dpi: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffset \-s 296 2 a.tif -tiffset \-s 282 300.0 a.tif -tiffset \-s 283 300.0 a.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -Set the photometric interpretation of the third page of \fBa.tif\fP to -min\-is\-black (ie. inverts it): -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -tiffset \-d 2 \-s 262 1 a.tif -.ft P -.fi -.UNINDENT -.UNINDENT -.SH SEE ALSO -.sp -\fI\%tiffdump\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%tiffcp\fP (1), -\fI\%libtiff\fP (3tiff) -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/man-prebuilt/tiffsplit.1 b/third_party/libtiff/doc/man-prebuilt/tiffsplit.1 deleted file mode 100644 index d28fa39..0000000 --- a/third_party/libtiff/doc/man-prebuilt/tiffsplit.1 +++ /dev/null @@ -1,80 +0,0 @@ -.\" Man page generated from reStructuredText. -. -. -.nr rst2man-indent-level 0 -. -.de1 rstReportMargin -\\$1 \\n[an-margin] -level \\n[rst2man-indent-level] -level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] -- -\\n[rst2man-indent0] -\\n[rst2man-indent1] -\\n[rst2man-indent2] -.. -.de1 INDENT -.\" .rstReportMargin pre: -. RS \\$1 -. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] -. nr rst2man-indent-level +1 -.\" .rstReportMargin post: -.. -.de UNINDENT -. RE -.\" indent \\n[an-margin] -.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] -.nr rst2man-indent-level -1 -.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] -.in \\n[rst2man-indent\\n[rst2man-indent-level]]u -.. -.TH "TIFFSPLIT" "1" "Sep 11, 2025" "4.7" "LibTIFF" -.SH NAME -tiffsplit \- split a multi-image TIFF into single-image TIFF files -.SH SYNOPSIS -.sp -\fBtiffsplit\fP \fIsrc.tif\fP [ \fIprefix\fP ] -.SH DESCRIPTION -.sp -\fBtiffsplit\fP takes a multi\-directory (page) TIFF -file and creates one or more single\-directory (page) TIFF -files from it. -The output files are given names created by concatenating -a prefix, a lexically ordered suffix in the range [aaa\-\-zzz], -the suffix \fB\&.tif\fP -(e.g. \fBxaaa.tif\fP, \fBxaab.tif\fP, \fB…\fP, \fBxzzz.tif\fP). -If a prefix is not specified on the command line, the default prefix of -\fBx\fP is used. -.SH OPTIONS -.sp -None. -.SH EXIT STATUS -.sp -\fBtiffsplit\fP exits with one of the following values: -.sp -0: -.INDENT 0.0 -.INDENT 3.5 -Success -.UNINDENT -.UNINDENT -.sp -1: -.INDENT 0.0 -.INDENT 3.5 -An error occurred either reading the input or writing results. -.UNINDENT -.UNINDENT -.SH BUGS -.sp -Only a select set of \(dqknown tags\(dq are copied when splitting. -.SH SEE ALSO -.sp -\fI\%tiffcp\fP (1), -\fI\%tiffinfo\fP (1), -\fI\%libtiff\fP (3tiff), -.SH AUTHOR -LibTIFF contributors -.SH COPYRIGHT -1988-2025, LibTIFF contributors -.\" Generated by docutils manpage writer. -. diff --git a/third_party/libtiff/doc/multi_page.rst b/third_party/libtiff/doc/multi_page.rst deleted file mode 100644 index a3b9001..0000000 --- a/third_party/libtiff/doc/multi_page.rst +++ /dev/null @@ -1,213 +0,0 @@ -Multi Page / Multi Image TIFF -============================= - -There may be more than one :ref:`Image File Directory (IFD) ` -in a TIFF file. Each IFD defines a :ref:`subfile `. - -One potential use of *subfiles* is to describe related images, -such as the pages of a facsimile transmission or reduced-resolution images -of the first full-resolution image. -Such files are also named "*multi-page* TIFF" or "*multi-image* TIFF". - -There are two mechanisms for storing multiple images in a TIFF file: - -1. A **main-IFD chain**, where the images are stored in linked IFDs (directories). - This mechanism is widely used. -2. A **SubIFD chain**, where additional images are stored within the SubIFD tag - of a main-IFD. Such child images provide extra information for the parent image - - such as a subsampled version of the parent image. - SubIFD chains are rarely supported. - For SubIFD refer also to - `Adobe PageMaker® 6.0 TIFF Technical Notes `_ - -.. _SubIFDAccess: - -Sub IFD chains --------------- - -In the case of several SubIFDs of a main image, there are two possibilities -that are not even mutually exclusive. - -a. The ``SubIFD`` tag contains an array with all offsets of the SubIFDs. - This is called SubIFD tree and DNG recommends the use of SubIFD trees, - as described in the TIFF-EP specification. SubIFD chains are not supported. -b. The SubIFDs are concatenated with their ``NextIFD`` parameters - to a SubIFD chain. - -LibTiff does support SubIFD chains partially. When the first -``SubIFD`` tag is activated and read with :c:func:`TIFFSetSubDirectory()`, -the following can be parsed with :c:func:`TIFFReadDirectory()`. -The *tif_curdir* is just incremented from its current value -and thus gets arbitrary values when parsing through SubIFD chains. -When the SubIFDs are not chained, each offset -within the SubIFD array has to be activated and read individually. -:c:func:`TIFFSetDirectory()` only works with main-IFD chains because -always starts with the first main-IFD and thus is able to reset -the SubIFD reading chain to the main-IFD chain. - -Writing Multi Page TIFF ------------------------ - -The following example code shows how to write multi-page TIFF -as main-IFD chain and as SubIFD chain. -``libtiff`` writes SubIFDs as an array of IFDs that are not chained -additionally, as Adobe PageMaker® 6.0 TIFF Technical Notes suggests. - -.. highlight:: c - -:: - - #include - - int main(int argc, const char **argv) - { - TIFF *tiff; - - /* Define the number of pages/images (main-IFDs) you are going to write */ - int number_of_images = 3; - - /* Define the number of sub - IFDs you are going to write */ - #define NUMBER_OF_SUBIFDs 2 - int number_of_sub_IFDs = NUMBER_OF_SUBIFDs; - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = { - 0UL}; /* array for SubIFD tag */ - int blnWriteSubIFD = 0; - - if (!(tiff = TIFFOpen("multiPageTiff2.tif", "w"))) - return 1; - - for (int i = 0; i < number_of_images; i++) - { - char pixel[1] = {128}; - - TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - - /* For the last but one multi-page image, add a SubIFD e.g. for a - * thumbnail */ - if (number_of_images - 2 == i) - blnWriteSubIFD = 1; - - if (blnWriteSubIFD) - { - /* Now here is the trick: the next n directories written - * will be sub-IFDs of the main-IFD (where n is number_of_sub_IFDs - * specified when you set the TIFFTAG_SUBIFD field. - * The SubIFD offset array sub_IFDs_offsets is filled automatically - * with the proper offset values by the following number_of_sub_IFDs - * TIFFWriteDirectory() calls and updated in the related main-IFD - * with the last call. - */ - if (!TIFFSetField(tiff, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - return 1; - } - - /* Write dummy pixel to image */ - if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0) - return 1; - /* Write image / directory to file */ - if (!TIFFWriteDirectory(tiff)) - return 1; - - if (blnWriteSubIFD) - { - /* A SubIFD tag has been written for that main-IFD and this - * triggers that previous TIFFWriteDirectory() to switch to the - * SubIFD-chain for the next number_of_sub_IFDs writings. - * Thus, only the thumbnail images need to be - * set up and written to file using TIFFWriteDirectory(). - * The last of this TIFFWriteDirectory() calls will setup - * the next fresh main-IFD. - */ - for (int i = 0; i < number_of_sub_IFDs; i++) - { - TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tiff, TIFFTAG_SUBFILETYPE, - FILETYPE_REDUCEDIMAGE)) - return 1; - - /* Write dummy pixel to thumbnail image */ - pixel[0] = 64; - if (TIFFWriteScanline(tiff, pixel, 0, 0) < 0) - return 1; - /* Writes now in the SubIFD chain */ - if (!TIFFWriteDirectory(tiff)) - return 1; - - blnWriteSubIFD = 0; - } - } - } - TIFFClose(tiff); - return 0; - } - -Reading Multi Page TIFF ------------------------ - -For a reading example see code of `tools/tiffinfo.c` or below: - -.. highlight:: c - -:: - - /* Reading of multi-page and SubIFD images (subfiles) */ - if (!(tiff = TIFFOpen(filename, "r"))) - return 1; - - tdir_t currentDirNumber = TIFFCurrentDirectory(tiff); - - /* The first directory is already read through TIFFOpen() */ - int blnRead = 0; - do - { - /*Check if there are SubIFD subfiles */ - void *ptr; - if (TIFFGetField(tiff, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - - for (int i = 0; i < number_of_sub_IFDs; i++) - { - /* Read first SubIFD directory */ - if (!TIFFSetSubDirectory(tiff, sub_IFDs_offsets[i])) - return 1; - /* Check if there is a SubIFD chain behind the first one from - * the array, as specified by Adobe */ - while (TIFFReadDirectory(tiff)) - /* analyse subfile */ - ; - } - /* Go back to main-IFD chain and re-read that main-IFD directory */ - if (!TIFFSetDirectory(tiff, currentDirNumber)) - return 1; - } - /* Read next main-IFD directory (subfile) */ - blnRead = TIFFReadDirectory(tiff); - currentDirNumber = TIFFCurrentDirectory(tiff); - } while (blnRead); - TIFFClose(tiff); - - - - -See also --------- - -:doc:`terms`, -:doc:`/functions/TIFFSetDirectory` (3tiff), -:doc:`/functions/TIFFWriteDirectory` (3tiff), -`Adobe PageMaker® 6.0 TIFF Technical Notes `_, -`Example from StackOverflow `_ \ No newline at end of file diff --git a/third_party/libtiff/doc/project/acknowledgements.rst b/third_party/libtiff/doc/project/acknowledgements.rst deleted file mode 100644 index a3d9da9..0000000 --- a/third_party/libtiff/doc/project/acknowledgements.rst +++ /dev/null @@ -1,102 +0,0 @@ -Acknowledgments -=============== - -.. image:: ../images/ring.gif - :width: 124 - :alt: ring - -Maintainers ------------ - -The LibTIFF software was written by Sam Leffler while working for -Silicon Graphics. - -Silicon Graphics has seen fit to allow us to give this work away. It -is free. There is no support or guarantee of any sort as to its -operations, correctness, or whatever. If you do anything useful with -all or parts of it you need to honor the copyright notices. It would -also be nice to be acknowledged. - -LibTIFF as been maintained by cast of others since 1999. - -The persons currently actively maintaining and releasing libtiff are: - -* Even Rouault -* `Bob Friesenhahn `_ - -Significant maintainers in the past (since the 3.5.1 release) were: - -* `Frank Warmerdam `_ -* `Andrey Kiselev `_ -* Joris Van Damme -* Lee Howard - - -Contributors ------------- - -The LZW algorithm is derived from the compress program (the proper attribution -is included in the source code). - -The Group 3 fax stuff originated as code from Jef Poskanzer, but has since -been rewritten several times. The latest version uses an algorithm from -Frank Cringle -- consult :file:`libtiff/mkg3states.c` and -:file:`libtiff/tif_fax3.h` for further information. - -The JPEG support was written by Tom Lane and is dependent on the -excellent work of Tom Lane and the Independent JPEG Group (IJG) who distribute -their work under friendly licensing similar to this software. Joris Van Damme -implemented the robust Old JPEG decoder (as included in libtiff since version -3.9.0, there was another Old JPEG module in older releases, which was -incomplete and unsuitable for many existing images of that format). - -JBIG module was written by Lee Howard and depends on JBIG library from the Markus -Kuhn. - -Many other people have by now helped with bug fixes and code; a few of -the more persistent contributors have been: - -.. list-table:: Contributors - :widths: 10 - :header-rows: 0 - - * - Bjorn P. Brox - * - Dan McCoy - * - J.T. Conklin - * - Richard Minner - * - Frank D. Cringle - * - Richard Mlynarik - * - Soren Pingel Dalsgaard - * - Niles Ritter - * - Steve Johnson - * - Karsten Spang - * - Tom Lane - * - Peter Smith - * - Brent Roman - * - Mike Welles - * - Frank Warmerdam - * - Greg Ward - * - Stanislav Brabec - * - Roman Shpount - * - Peter Skarpetis - * - Arvan Pritchard - * - Bernt Herd - * - Joseph Orost - * - Phil Beffery - * - Ivo Penzar - * - Francois Dagand - * - Albert Chin-A-Young - * - Bruce A. Mallett - * - Dwight Kelly - * - Andrey Kiselev - * - Ross Finlayson - * - Dmitry V. Levin - * - Bob Friesenhahn - * - Lee Howard - * - Joris Van Damme - * - Tavis Ormandy - * - Richard Nolde - * - Even Rouault - * - Roger Leigh - -(apologies to anyone that was inadvertently not listed.) diff --git a/third_party/libtiff/doc/project/bugs.rst b/third_party/libtiff/doc/project/bugs.rst deleted file mode 100644 index 41cc209..0000000 --- a/third_party/libtiff/doc/project/bugs.rst +++ /dev/null @@ -1,49 +0,0 @@ -Reporting Bugs -============== - -.. image:: ../images/cover.jpg - :width: 110 - :alt: cover - - -Overview --------- - -The LibTIFF project uses `GitLab issues `_ -to report and manage bugs and feature requests. - -Please let us know when you find a problem or fix a bug. - -Previously, the project used -`MapTools.org bugzilla `_ -to track bugs. All remaining tickets in that bugzilla instance were -migrated to GitLab issues, and this system should no longer be used. -All bugs filed in a older bugzilla at -'RemoteSensing.org (bugzilla.remotesensing.org)' (pre-April 2008) -have unfortunately been lost. - - -Reporting a bug ---------------- - -If you think you've discovered a bug, please first check to see if it is -already known by looking at the list of already reported bugs. Also, please -verify that the problem is still reproducible with the current development -software from GitLab. - -If you'd like to enter a new bug report, you can create a -`new GitLab issue `_ - -Of course, reporting bugs is no substitute for discussion. -Please see the :doc:`mailinglist` page for further details. - - -Reporting a security issue --------------------------- - -If you'd like to inform us about some kind of security issue that should not -be disclosed for a period of time, then you can contact the maintainers directly. -Send a copies of your report to the following people: - -* Frank Warmerdam ``_ -* Bob Friesenhahn ``_. diff --git a/third_party/libtiff/doc/project/index.rst b/third_party/libtiff/doc/project/index.rst deleted file mode 100644 index 9f6971c..0000000 --- a/third_party/libtiff/doc/project/index.rst +++ /dev/null @@ -1,27 +0,0 @@ -############### -LibTIFF Project -############### - -The LibTIFF project provides free software maintained by a small community of software developers. See -:doc:`acknowledgements` for further details. - -Questions should be sent to the :doc:`mailinglist`. - -.. note:: - - Please do not email the maintainers personally, especially when asking - questions such as "when is the next release?". Please use the public mailing lists. - While the maintainers and contributors to LibTIFF are primarily professional software - developers, none of us are paid to work on LibTIFF directly, and almost all the - activity is voluntary and unpaid. - - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - license - mailinglist - bugs - psc - acknowledgements diff --git a/third_party/libtiff/doc/project/license.rst b/third_party/libtiff/doc/project/license.rst deleted file mode 100644 index 9c928bf..0000000 --- a/third_party/libtiff/doc/project/license.rst +++ /dev/null @@ -1,24 +0,0 @@ -LibTIFF License -=============== - -| Copyright © 1988-1997 Sam Leffler -| Copyright © 1991-1997 Silicon Graphics, Inc. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, provided -that (i) the above copyright notices and this permission notice appear in -all copies of the software and related documentation, and (ii) the names of -Sam Leffler and Silicon Graphics may not be used in any advertising or -publicity relating to the software without the specific, prior written -permission of Sam Leffler and Silicon Graphics. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS SOFTWARE. diff --git a/third_party/libtiff/doc/project/mailinglist.rst b/third_party/libtiff/doc/project/mailinglist.rst deleted file mode 100644 index e6490f1..0000000 --- a/third_party/libtiff/doc/project/mailinglist.rst +++ /dev/null @@ -1,29 +0,0 @@ -Mailing List -============ - - -Overview --------- - -The `tiff@lists.osgeo.org `_ mailing list is for users of the LibTIFF software, and -discussion TIFF issues in general. - - -Subscription ------------- - -The mailing list managed with the Mailman software, and the web interface for subscribing -and managing your access to the list is at: ``_ - -Posts to the list are only accepted from members of the list. - - -Archive -------- - -A Long Term Archive -including most messages from April 2024 back to 1993 has been archived in a text file archive -that can be download: `TML.zip `_ -or `TML.tar.xz `_. - -There is no archive for the mailing list messages anymore. \ No newline at end of file diff --git a/third_party/libtiff/doc/project/psc.rst b/third_party/libtiff/doc/project/psc.rst deleted file mode 100644 index b72f47b..0000000 --- a/third_party/libtiff/doc/project/psc.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. _psc: - -Project Steering Committee -========================== - -As of April 2024, the project has been placed in the hands of a Project Steering Committee. This project steering committee operates under the rules of :ref:`rfc1_psc`, and is overall responsible for decisions related to the libtiff project. The current members are: - -- Bob Friesenhahn (@bobfriesenhahn) -- Su Laus (@Su_Laus) -- Roger Leigh (@rleigh) -- Timothy Lyanguzov (@theta682) -- Olivier Paquet (@1-Olivier) -- Leonard Rosenthol (@lrosenthol) -- Even Rouault (@rouault) - -Note that discussion of proposals to the PSC take place on the libtiff mailing list -(tiff@lists.osgeo.org, requiring subscription at https://lists.osgeo.org/mailman/listinfo/tiff), -and input from all subscribers is welcome. A list of past :ref:`rfcs` is available for review. diff --git a/third_party/libtiff/doc/releases/historical.rst b/third_party/libtiff/doc/releases/historical.rst deleted file mode 100644 index a72482a..0000000 --- a/third_party/libtiff/doc/releases/historical.rst +++ /dev/null @@ -1,48 +0,0 @@ -Old release history -=================== - -Older LibTIFF releases. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - v3.9.5 - v3.9.4 - v3.9.3 - v3.9.2 - v3.9.1 - v3.9.0 - v3.9.0beta - v3.8.2 - v3.8.1 - v3.8.0 - v3.7.4 - v3.7.3 - v3.7.2 - v3.7.1 - v3.7.0 - v3.7.0beta2 - v3.7.0beta - v3.7.0alpha - v3.6.1 - v3.6.0 - v3.5.7 - v3.5.6beta - v3.5.5 - v3.5.4 - v3.5.3 - v3.5.2 - v3.5.1 - v3.4beta036 - v3.4beta035 - v3.4beta034 - v3.4beta033 - v3.4beta032 - v3.4beta031 - v3.4beta029 - v3.4beta028 - v3.4beta024 - v3.4beta018 - v3.4beta016 - v3.4beta007 diff --git a/third_party/libtiff/doc/releases/index.rst b/third_party/libtiff/doc/releases/index.rst deleted file mode 100644 index d3a4018..0000000 --- a/third_party/libtiff/doc/releases/index.rst +++ /dev/null @@ -1,31 +0,0 @@ -Release history -=============== - -LibTIFF releases. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - v4.7.1 - v4.7.0 - v4.6.0 - v4.5.1 - v4.5.0 - v4.4.0 - v4.3.0 - v4.2.0 - v4.1.0 - v4.0.10 - v4.0.9 - v4.0.8 - v4.0.7 - v4.0.6 - v4.0.5 - v4.0.4 - v4.0.4beta - v4.0.3 - v4.0.2 - v4.0.1 - v4.0.0 - historical diff --git a/third_party/libtiff/doc/releases/v3.4beta007.rst b/third_party/libtiff/doc/releases/v3.4beta007.rst deleted file mode 100644 index 2c9cec9..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta007.rst +++ /dev/null @@ -1,75 +0,0 @@ -Changes in TIFF v3.4beta016 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta016 (no release tag) - Previous Version v3.4beta004 (no references to earlier releases exist) - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* bit order was corrected for Pentium systems -* a new define, :c:macro:`HOST_BIGENDIAN`, was added for code that - wants to statically use information about native cpu byte order - - -Library changes ---------------- - -* the G3/G4 decoder was replaced by a new one that is faster and - has smaller state tables -* Niles Ritter's client tag extension hooks were added -* a new routine :c:func:`TIFFCurrentDirOffset` was added for - applications that want to find out the file offset of a TIFF directory -* the calculation of the number of strips in an image was corrected - for images with certain esoteric configurations -* a potential memory leak (very unlikely) was plugged -* the ``TIFFReadRGBAImage`` support was completely rewritten - and new, more flexible support was added for reading images into - a fixed-format raster -* YCbCr to RGB conversion done in the :c:func:`TIFFReadRGBAImage` support - was optimized -* a bug in JPEG support calculation of strip size was corrected -* the LZW decoder was changed to initialize the code table to zero - to lessen potential problems that arise when invalid data is decoded -* :c:func:`tiffcomp.h` is now aware of OS/2 -* some function prototypes in :file:`tiffio.h` and :file:`tiffiop.h` - that contained parameter names have been changed to avoid complaints - from certain compilers - - -Portability support changes ---------------------------- - -* :file:`Makefile.in` has been corrected to use the parameters - chosen by the :program:`configure` script - - -Tools changes -------------- - -* :program:`fax2ps` has been rewritten and moved over from the user - contributed software -* an uninitialized variable in :program:`pal2rgb` has been fixed -* :program:`ras2tiff` now converts 24-bit RGB raster data so that - samples are written in the proper order -* :program:`tiff2ps` has been updated to include fixes - and enhancements from Alberto Accomazzi -* :program:`tiffcp` now has a "``-o``" option to select a directory - by file offset -* :program:`tiffinfo` is now capable of displaying the raw undecoded - image data in a file -* :program:`tiffgt` has been rewritten to use the new ``TIFFRGBAImage`` - support and to handle multiple files diff --git a/third_party/libtiff/doc/releases/v3.4beta016.rst b/third_party/libtiff/doc/releases/v3.4beta016.rst deleted file mode 100644 index b4b0817..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta016.rst +++ /dev/null @@ -1,71 +0,0 @@ -Changes in TIFF v3.4beta016 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta016 (no release tag) - Previous Version :doc:`v3.4beta007 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for configuring the Deflate codec -* support was added for the HTML documentation -* codecs that are not configured for inclusion in the library - are no longer compiled - - -Library changes ---------------- - -* support was added for registering new codecs external to the library - and for overriding the codecs that are builtin to the library -* emulation support for the old ``DataType`` tag was improved -* support was added for the ``SMinSampleValue`` - and ``SMaxSampleValue`` tags -* the library no longer ignores ``TileWidth`` and ``TileLength`` - tags whose values are not a multiple of 16 (per the spec); this - permits old, improperly written, images to be read -* the support for the ``Predictor`` tag was placed in a reusable - module so that it can be shared by multiple codecs -* experimental compression support was added for the Deflate algorithm - (using the freely available zlib package) -* a new routine, :c:func:`TIFFWriteBufferSetup` was added à la the - routine :c:func:`TIFFReadBufferSetup` -* the DSO version of the library is now statically linked with the - JPEG and Deflate libraries; this means applications that link against - the DSO do not also need to link against these ancillary libraries - - -Tools changes -------------- - -* all the tools now use common code to process compress-oriented arguments -* :program:`tiffdump` should now compile on a Macintosh with MPW - - -Documentation changes ---------------------- - -* everything was updated - - -Contributed software changes ----------------------------- - -* :file:`contrib/dbs/xtiff` was made to compile -* :file:`contrib/mac-mpw` is new support for compiling the software on - a Macintosh under MPW -* :file:`contrib/tags` is information on how to use the tag extension - facilities; consult :file:`contrib/tags/README` for details diff --git a/third_party/libtiff/doc/releases/v3.4beta018.rst b/third_party/libtiff/doc/releases/v3.4beta018.rst deleted file mode 100644 index bffb023..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta018.rst +++ /dev/null @@ -1,50 +0,0 @@ -Changes in TIFF v3.4beta018 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta018 (no release tag) - Previous Version :doc:`v3.4beta016 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* configure now recognizes IRIX 6.x systems -* configure now uses ``ENVOPTS`` when searching for an ANSI - C compiler; this fixes a problem configuring the software under - HP/UX with the native C compiler -* configure now correctly recognizes memory-mapped files are supported - under AIX - - -Library changes ---------------- - -* ``make install`` now properly installs the include files -* some portability fixes from Bjorn Brox -* the G3/G4 codec now warns about decoded rows that are longer than - the image/tile width -* changes from Frank Cringle to make the library work with the - gcc-specific bounds checking software -* miscellaneous fixes to :c:func:`TIFFPrintDirectory` -* bug fix to correct a problem where :c:func:`TIFFWriteRawStrip` - could not be used to automatically grow an image's length - - -Tools changes -------------- - -* fixes from Frank Cringle to update :program:`fax2tiff` -* portability fixes to :program:`tiff2bw` and :program:`tiffcmp` -* :program:`tiffdump` now uses the byte swapping routines in the library diff --git a/third_party/libtiff/doc/releases/v3.4beta024.rst b/third_party/libtiff/doc/releases/v3.4beta024.rst deleted file mode 100644 index 1713dd3..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta024.rst +++ /dev/null @@ -1,99 +0,0 @@ -Changes in TIFF v3.4beta024 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta024 (no release tag) - Previous Version :doc:`v3.4beta018 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* It is now possible to setup the software to build only the - library; :program:`configure` recognizes this is the intent when the - :file:`VERSION`, :file:`tiff.alpha`, and :file:`tif_version.c` - files are in the local directory (i.e. :file:`.`) -* :program:`configure` no longer tries to setup HTML materials -* include file directories needed in building the library are now - specified with a ``DIRS_LIBINC`` config parameter -* configure no longer checks for alternate compilers if ``CC`` - is set; if the specified compiler is not found or is not appropriate - the configuration procedure aborts -* the :file:`port.h` file generated by configure is now used only by - the library and as such as have been moved to the :file:`libtiff` - directory -* there is beginning support for building DSO's on systems other than IRIX -* configure now verifies the JPEG and zlib directory pathnames by - checking for well-known include files in these directories -* configure no longer creates the :file:`dist` directory needed only - on SGI machines (for building SGI binary distributions) -* a bug was fixed whereby configure would incorrectly set - ``ENVOPTS`` when building the software with gcc under AIX - - -Library changes ---------------- - -* two new typedefs were added to :file:`tiff.h`: :c:type:`int8` - and :c:type:`uint8` for signed and unsigned 8-bit quantities, - respectively; these are currently used only by - programs in the :file:`tools` directory -* the ``BadFaxLines``, ``CleanFaxData``, and - ``ConsecutiveBadFaxLines`` tags are now supported with - Group 4 compression -* byte order is now correctly identified on 64-bit machines -* a bug was fixed in the PackBits decoder where input data would - appear short when a no-op run was present -* a bug was fixed in calculations with very wide strips -* :c:func:`TIFFWriteEncodedStrip` and :c:func:`TIFFWriteRawStrip` - were extended to support dynamically growing the number of - strips in an image (must set ``ImageLength`` prior to - making calls though) -* :c:func:`TIFFDefaultTileSize` now rounds tile width and height - up to a multiple of 16 pixels, as required by the TIFF 6.0 specification -* the file :file:`version.h` is now built by a new :program:`mkversion` - program; this was done for portability to non-UNIX systems -* support was added for the Acorn RISC OS (from Peter Greenham) -* the builtin codec table is now made ``const`` when compiling - under VMS so that :file:`libtiff` can be built as a shared library -* support for the PowerPC Mac (from Ruedi Boesch) -* support for Windows NT/Windows 95 (from Scott Wagner) - - -Tools changes -------------- - -* the tools no longer include :file:`port.h` -* various portability fixes; mostly to eliminate implicit assumptions - about how long :c:type:`int32` data types are -* PostScript Level II additions to :program:`tiff2ps` from Bjorn Brox -* :program:`sgi2tiff` now handles RGBA images - - -Documentation changes ---------------------- - -* the documentation has been updated to reflect the current state of - the software -* some routines have been moved to different manual pages - to group like-routines together - - -Contributed software changes ----------------------------- - -* support was added for the Acorn RISC OS (from Peter Greenham) -* support for Windows NT/Windows 95 contributed for a previous - version of this software was sort of incorporated (it's broken - right now) (from Scott Wagner) diff --git a/third_party/libtiff/doc/releases/v3.4beta028.rst b/third_party/libtiff/doc/releases/v3.4beta028.rst deleted file mode 100644 index 77cd2fc..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta028.rst +++ /dev/null @@ -1,105 +0,0 @@ -Changes in TIFF v3.4beta028 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta028 (no release tag) - Previous Version :doc:`v3.4beta024 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* a "``-noninteractive``" flag was added to configure to - control whether or not it prints and prompts for configuration information -* various typos and fixes were made in configure for the the - library-only build support (this and other configure fixes from - `Richard Mlynarik `_) -* bugs were fixed in the handling of pathnames supplied for external - packages; e.g. ``DIR_JPEG`` -* the handling of ``SETMAKE`` is now done properly -* the default prototype function declaration for :c:func:`pow` was corrected -* a bug was fixed in :file:`libtiff/Makefile.in` that caused installation - to fail on systems without DSO support - - -Library changes ---------------- - -* Acorn RISC O/S support that was accidentally left out of the - left out of the previous distribution is present (from Peter Greenham) -* complaints about unknown and/or unsupported codecs have been - delayed until they are invoked; this permits applications to open - images and look at tags even if the image data is compressed with - an unknown/unsupported compression scheme -* bugs in handling unknown tags have been corrected; applications - that use multiple codecs, each with codec-specific tags, no longer - generate confusing error messages -* a missing pseudo-tag definition in the CCITT G3 codec was fixed - (this problem caused core dumps in the :program:`tiffcp` program) -* pseudo-tags are now treated specially; they are always considered - to be set (i.e. they do not use bits in the ``FIELD_*`` bit-vectors). -* the use of strip chopping can now be controlled on a per-file basis - through a mode parameter supplied when opening a file ("``C``" to - enable strip chopping and "``c``" to disable) -* two bugs were fixed in the writing of opposite-endian byte-order - files -* support was added for three new fax-related tags registered to - SGI: ``FaxRecvParams``, ``FaxRecvTime``, and ``FaxSubAddress`` -* the bit order of image data read and written can now be controlled - on a per-file basis through a mode parameter supplied when opening - a file ("``B``" to force MSB2LSB bit order, "``L``" for LSB2MSB bit - order, and "``H``" for the bit order of the native CPU) -* the byte order of image and tag data written to newly-created files - can now be controlled on a per-file basis through a mode parameter - supplied when opening a file ("``b``" to force Big-Endian byte order - and "``l``" to force Little-Endian byte order) -* the use memory-mapped files for images opened read-only can now - be controlled on a per-file basis through a mode parameter supplied - when opening a file ("``M``" to enable use of memory-mapped files - and "``m``" to disable use) -* the use of the :c:macro:`WIN32` define in :file:`tiffiop.h` has - been replaced by :c:macro:`__WIN32__` - - -Tools changes -------------- - -* :program:`fax2ps` now does a ``save`` and ``restore`` - around each page of PostScript; this fixes a problem with VM - overflow when printing a many-page document on some printers -* a bug in the handling of 3-channel images by :program:`ras2tiff` - was fixed -* :program:`tiffcp` has new options to control the byte order of - newly created files: "``-B``" for Big-Endian byte order, "``-L``" - for Little-Endian byte order; a "``-M``" option to disable the - use of memory-mapped files, and a "``-C``" option to disable the - use of strip chopping -* bugs were fixed in :program:`tiffcp` handling of codec-specific tags - - -Documentation changes ---------------------- - -* the :c:func:`TIFFOpen` page has been updated to reflect the new - optional open mode parameters - -Contributed software changes ----------------------------- - -* :file:`contrib/win95` contains information and code from `Philippe Tenenhaus - <100423.3705@compuserve.com>`_ - about using the software under Windows 95 -* :file:`contrib/winnt` contains information and code from `Dave Dyer - `_ - about using the software under Windows NT diff --git a/third_party/libtiff/doc/releases/v3.4beta029.rst b/third_party/libtiff/doc/releases/v3.4beta029.rst deleted file mode 100644 index c9112ae..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta029.rst +++ /dev/null @@ -1,52 +0,0 @@ -Changes in TIFF v3.4beta029 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta029 (no release tag) - Previous Version :doc:`v3.4beta028 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :program:`configure` now relativizes pathname references given in - "``-L``" options (as frequently specified when configuring - ancillary packages) -* problems related to configuring the software on Ultrix 4.4 have - been corrected -* the shell to use in Makefiles and scripts can now be set with the - ``SCRIPT_SH`` configuration parameter -* comments in :file:`config.site` now correctly indicate how to setup the - use of ancillary packages - - -Library changes ---------------- - -* mods for building the software on a Mac using the - MetroWerks CodeWarrior compilers -* a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in - a strip/tile might not be decoded; this was seen only when decoding - multi-strip images -* a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not - being properly registered - - -Contributed software changes ----------------------------- - -* :file:`contrib/mac-cw` contains information and code from `Niles Ritter - `_ - about building the software with the MetroWerks CodeWarrior compilers - on Macintosh systems diff --git a/third_party/libtiff/doc/releases/v3.4beta031.rst b/third_party/libtiff/doc/releases/v3.4beta031.rst deleted file mode 100644 index 6384958..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta031.rst +++ /dev/null @@ -1,59 +0,0 @@ -Changes in TIFF v3.4beta031 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta031 (no release tag) - Previous Version :doc:`v3.4beta029 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :program:`configure` now captures significantly more information - in the :file:`config.log` file and provides more information when - it is unable to setup a configuration -* support was added for building shared libraries on more systems: - AIX, HPUX, Solaris, and Linux. -* a new configuration parameter ``LIBCOPTS`` was added for - passing arguments to the C compiler to use when building only - the library; this is part of the enhanced support for building - shared libraries -* include files for optional packages that reside in :file:`/usr/include` - are now handled correctly -* build trees may now be configured using either relative or absolute - pathnames to the source distribution -* several new configuration parameters were added, mainly for building - shared libraries: ``DIST_MAJOR``, ``DIST_MINOR``, - ``DIST_ALPHA``, and ``DSOSUF_VERSION`` - - -Library changes ---------------- - -* the Deflate support has been revised: it requires version 0.99 of - the zlib software distribution, **the output format has changed and - is incompatible with previous versions of this library** (each - strip now includes a header read and written by the zlib library) -* the codec name printed by the :c:func:`TIFFPrintDirectory` routine is now - taken from the codec table instead of from a builtin table; this means - that application-defined codecs are handled correctly -* a new symbol was added that contains the library version number; - this can be used to do a compile-time compatibility check of the - library version - -Documentation changes ---------------------- - -* the creation and installation of manual pages was redone; it now - implements the documented "configuration scheme" diff --git a/third_party/libtiff/doc/releases/v3.4beta032.rst b/third_party/libtiff/doc/releases/v3.4beta032.rst deleted file mode 100644 index 54cd695..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta032.rst +++ /dev/null @@ -1,53 +0,0 @@ -Changes in TIFF v3.4beta032 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta032 (no release tag) - Previous Version :doc:`v3.4beta031 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* various fixups and subtle improvements to :program:`configure` - from Richard Mlynarik - - -Library changes ---------------- - -* a new codec from Pixar designed for high-resolution color images; - note that this codec is not configured by default -* a bug fix for reading tags with a single ``FLOAT`` value -* change to the :c:func:`TIFFGetField` calling convention: - a tag that has a single value of - type ``DOUBLE`` is now retrieved by passing a - ``double*`` instead of a - ``double**`` (this change makes the handling of tags with - ``DOUBLE`` values identical to the handling of tags with - ``FLOAT`` values) -* fix to VMS support for the handling of floating point values - - -Tools changes -------------- - -* :program:`tiffdump` now handles tags with ``FLOAT`` and ``DOUBLE`` - values - - -Contributed software changes ----------------------------- - -* updates to the Acorn OS support from Peter Greenham diff --git a/third_party/libtiff/doc/releases/v3.4beta033.rst b/third_party/libtiff/doc/releases/v3.4beta033.rst deleted file mode 100644 index 2299b2b..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta033.rst +++ /dev/null @@ -1,45 +0,0 @@ -Changes in TIFF v3.4beta033 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta033 (aka the v3.4 release) (no release tag) - Previous Version :doc:`v3.4beta032 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under OSF/1 - - -Library changes ---------------- - -* fixes to the Pixar codec -* portability mods for VMS - - -Tools changes -------------- - -* fixes to :program:`gif2tiff` and :program:`ppm2tiff` for building under MS/DOS -* portability mods to :program:`fax2ps` and :program:`ycbcr` for VMS - - -Contributed software changes ----------------------------- - -* a new package from Alexander Lehmann - for building the library and tools under MS/DOS with DJGPP v2 -* updated VMS support from Karsten Spang diff --git a/third_party/libtiff/doc/releases/v3.4beta034.rst b/third_party/libtiff/doc/releases/v3.4beta034.rst deleted file mode 100644 index 1189024..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta034.rst +++ /dev/null @@ -1,37 +0,0 @@ -Changes in TIFF v3.4beta034 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta034 (no release tag) - Previous Version :doc:`v3.4beta033 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under NetBSD -* a bug was fixed in the DSO support for Linux -* the handling of version strings has changed slightly to simplify parsing -* a new parameter, ``TIFFLIBREF``, was added to control how the - library is referenced when linking programs in the :file:`tools` directory - - -Library changes ---------------- - -* DSO creation under Solaris now forces the DSO name with a ``-h`` option -* the interface to the :program:`mkversion` program was changed - to eliminate the need to parse files -* a bug was fixed in the EOL-detection logic of the T.4/T.6 decoder -* ANSI IT8 TIFF/IT tag definitions were added to :file:`tiff.h` diff --git a/third_party/libtiff/doc/releases/v3.4beta035.rst b/third_party/libtiff/doc/releases/v3.4beta035.rst deleted file mode 100644 index cc96db2..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta035.rst +++ /dev/null @@ -1,32 +0,0 @@ -Changes in TIFF v3.4beta035 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta035 (no release tag) - Previous Version :doc:`v3.4beta034 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added installing the HTML documentation -* support was added for building the library as a DSO under FreeBSD - - -Library changes ---------------- - -* the interface to the :program:`mkversion` program was restored to - the form used prior to v3.4beta034 -* several portability problems for 16-bit systems were fixed diff --git a/third_party/libtiff/doc/releases/v3.4beta036.rst b/third_party/libtiff/doc/releases/v3.4beta036.rst deleted file mode 100644 index df3b615..0000000 --- a/third_party/libtiff/doc/releases/v3.4beta036.rst +++ /dev/null @@ -1,86 +0,0 @@ -Changes in TIFF v3.4beta036 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.4beta036 (no release tag) - Previous Version :doc:`v3.4beta035 ` - Master Download Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* support was added for building the library as a DSO under HP-UX with - the native C compiler -* tools are now built with explicit pathnames for the DSO under IRIX, - Solaris, and Linux -* DSO configuration support for Linux was changed to require that - :file:`libc.so` only be readable (not executable) - - -Library changes ---------------- - -* support was add for ICC: ``NumberOfInks``, and ``ICCProfile`` -* a memory leak caused by doing ``TIFFSetDirectory(0)`` was fixed -* a bug was fixed whereby certain multi-directory files were not - properly handled when accessed by mapping the data into memory -* the strip chopping support is now always compiled - into the library with the default usage controlled by a - :c:macro:`STRIPCHOP_DEFAULT` configuration parameter -* the strip chopping support no longer chops tiled images -* all static strings are now const---for shared libraries -* the logic for estimating the strip size of images without - ``StripByteCounts`` tag was improved by handling - ``PlanarContig`` images differently from ``PlanarSeparate`` -* a bug was fixed in the G3 codec when converting the Y resolution - of data specified in metric units -* a bug was fixed in the G3/G4 decoder for data where lines terminate - with a ``v0`` code -* the ``TIFFRGBAImage`` support was changed to scale 16-bit colormap - entries more conservatively to avoid problems with applications - that do not generate fully saturated pixel values -* the LZW decoder was changed to use a more conservative scheme when - bounds checking the hash table array; this avoids pitfalls with - systems that load objects into memory in unusual locations -* a bug was fixed in :c:func:`TIFFPrintDirectory` handling of the - ``InkNames`` tag -* :c:func:`TIFFPrintDirectory` now understands ``NumberOfInks`` - and ICC-related tags -* the routines for reading image data now provide more useful information - when a read error is encountered -* support was added for compiling with Microsoft Visual C++ 4.0 - - -Tools changes -------------- - -* a bug was fixed in :program:`pal2rgb` colormap handling -* :program:`tiff2ps`: - - * now includes John Wehle's changes for maintaining - the aspect ratio of images when scaling and for honoring the deadzone - on a page when generating PostScript Level II - * does a better job guarding against the mishandling - of greyscale images - * now correctly converts X- and Y-resolution values - specified in metric units -* :program:`tiffdump`: - - * has a new "``-m``" option to control the maximum number of indirect - data values printed for a tag (by default 24) - * understands several new tags - * now shows any terminating null in ASCII strings - -* :program:`tiffinfo` now suppresses strip chopping when interpreting an image; - a new "``-z``" option has been added to enable strip chopping diff --git a/third_party/libtiff/doc/releases/v3.5.1.rst b/third_party/libtiff/doc/releases/v3.5.1.rst deleted file mode 100644 index 3333d0e..0000000 --- a/third_party/libtiff/doc/releases/v3.5.1.rst +++ /dev/null @@ -1,41 +0,0 @@ -Changes in TIFF v3.5.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.1 (no release tag) - Previous Version v3.4beta037 (missing release notes, go to :doc:`v3.4beta036 `) - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -None. - - -Library changes ---------------- - -* Support was added for IPTC Newsphoto metadata (:c:macro:`TIFFTAG_IPTCNEWSPHOTO`) -* Support was added for photoshop caption handling (:c:macro:`TIFFTAG_PHOTOSHOP`) - - -Contributed software changes ----------------------------- - -* `Bill Radcliffe's `_ :program:`iptcutil` was - added to the :file:`contrib` subdirectory . It can convert an IPTC binary - blob to ASCII text and vice-versa. The blob itself can be extracted - from or added to an image with the `ImageMagick `_ - :program:`convert` (1) utility. diff --git a/third_party/libtiff/doc/releases/v3.5.2.rst b/third_party/libtiff/doc/releases/v3.5.2.rst deleted file mode 100644 index 3286f8d..0000000 --- a/third_party/libtiff/doc/releases/v3.5.2.rst +++ /dev/null @@ -1,74 +0,0 @@ -Changes in TIFF v3.5.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.2 (no release tag) - Previous Version :doc:`v3.5.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* Corrected alpha versioning. - -* Removed distinction between alpha and release targets in :file:`Makefile.in`. - -* Added release.stamp target, which tags cvs tree, and updates - :file:`RELEASE-DATE` - -* Added ``releasediff`` target, which diffs tree with source as of - date in :file:`RELEASE-DATE` - -* Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving - away from alpha/non-alpha distinctions). - - -Library changes ---------------- - -* Added IRIX/gcc, and OSF/1 4.x support on behalf of - `Albert Chin-A-Young `_. - -* Added :c:func:`TIFFReassignTagToIgnore` API on behalf of - `Bruce Cameron `_. Man page still pending. - -* pre-remove :file:`so` link before softlink in ``LINUXdso`` action in - :file:`libtiff/Makefile.in` to avoid failure on ``LINUXdso`` builds other than - the first. - -* Fixed problem with :c:func:`cvtcmap` in :file:`tif_getimage.c` modifying the - colormaps owned by the TIFF handle itself when trying to fixup wrong - (eight bit) colormaps. Corrected by maintaining a private copy of - the colormap. - -* Added :c:func:`TIFFReadRGBATile`/:c:func:`TIFFReadRGBAStrip` support in - :file:`tif_getimage.c`. - -* Applied "``a``" mode fix to :file:`tif_win32.c`/:c:func:`TIFFOpen` as suggested - by `Christopher Lawton `_. - -* Set ``O_BINARY`` for :file:`tif_unix.c` :c:func:`open` ... used on cygwin for instance. - -* Added ``CYGWIN`` case in configure. - -* Applied Francois Dagand's patch to handle fax decompression bug. - (sizes >= 65536 were failing) - - -Contributed software changes ----------------------------- - -* Added :program:`addtiffo` (add overviews to a TIFF file) in contrib. Didn't - put it in tools since part of it is in C++. diff --git a/third_party/libtiff/doc/releases/v3.5.3.rst b/third_party/libtiff/doc/releases/v3.5.3.rst deleted file mode 100644 index 987568d..0000000 --- a/third_party/libtiff/doc/releases/v3.5.3.rst +++ /dev/null @@ -1,97 +0,0 @@ -Changes in TIFF v3.5.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.3 (:tag:`Release-v3-5-3`) - Previous Version :doc:`v3.5.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -Please note the most important change: **LZW compression has been removed**. - -Unisys has the patent on LZW compression and have been very active in -their enforcement of late, demanding payments of $5000 or more from -websites using unlicensed software to create GIF's. They could well -do the same do persons using libtiff to create LZW compressed TIFF -images. - -From `Burn All GIF's Day `_: - - The catch is that it appears to be difficult or impossible to get a - Unisys license to use LZW in free software that complies with the Open - Source Definition - -Unfortunately, the removal of LZW compression means that saved image size has -grown dramatically. Without a change in the TIFF spec to support -another lossless compression format, this is unavoidable. - -The library can use zip for lossless compression, but as this is not -part of the spec, TIFFs using zip compression may not work with other -software. - -We will be making a patch available that will contain the LZW -compression code for users who have either obtained a license from -Unisys or are willing to risk it. - -LZW decompression is unchanged. - - -Software configuration changes ------------------------------- - -* Added zip creation to release makefile target - - -Library changes ---------------- - -* Added html for :file:`TIFFWriteTile.3t` man page. - -* Added some changes to :file:`tif_write.c` to support rewriting existing - fixed sized tiles and strips. Code mods disabled by default, only - enabled if :c:macro:`REWRITE_HACK` is defined for now. - -* Added :file:`TIFFWriteTile.3t` man page. - -* Added notes on use of :file:`makefile.vc` in :file:`build.html`, and fixed - email subscription address. - -* Did some casts cleaning up to reduce compiler warnings in :file:`tif_fax3.c`, - from `Bruce Cameron `_---modifications of - changes made by Frank (sun cc still complained on cast). - -* fixed various VC++ warnings as suggested by `Gilles Vollant - `_. - -* Modified :file:`TIFFquery.3t` man pages info on :c:func:`TIFFIsByteSwapped` to - not imply applications are responsible for image data swapping. - -* HTML-ized the man pages, added to :file:`html/man`. - -* Removed LZW Compression to comply with Unisys patent extortion. - -* Corrected one remaining ``16 -> 32`` bit value in :file:`tif_fax3.c`, - From `Ivo Penzar `_. - -* Added patch from Ivo Penzar to have :c:func:`TiffAdvanceDirectory` handle - memory mapped files. `Ivo Penzar `_. - - -Contributed software changes ----------------------------- - -* Fixed apocalypse-inducing y2k bug in :file:`contrib/ras/ras2tiff.c` diff --git a/third_party/libtiff/doc/releases/v3.5.4.rst b/third_party/libtiff/doc/releases/v3.5.4.rst deleted file mode 100644 index d0d8349..0000000 --- a/third_party/libtiff/doc/releases/v3.5.4.rst +++ /dev/null @@ -1,45 +0,0 @@ -Changes in TIFF v3.5.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.4 (:tag:`Release-v3-5-4`) - Previous Version :doc:`v3.5.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* None. - - -Library changes ---------------- - -* Added Pixar tag support. Contributed by `Phil Beffery `_. -* Made one more change to :file:`tif_dir.c` for removal of LZW compression. Also added notice - when LZW compression invoked. -* Fixed bug that caused LZW (non) compression to segfault. Added - warning about LZW compression removed being removed, and why. - - -Tools changes -------------- - -* Changed default compression in tools to :c:macro:`TIFF_PACKBITS`, and changed usage descriptions - in tools to reflect removal of LZW compression -* Added ``nostrip`` to install in :file:`tools/Makefile.in` so that debugging - symbols are kept. -* Made Packbits the default compression in :file:`tools/tiff2rgba.c` instead - of LZW. diff --git a/third_party/libtiff/doc/releases/v3.5.5.rst b/third_party/libtiff/doc/releases/v3.5.5.rst deleted file mode 100644 index 8c10d52..0000000 --- a/third_party/libtiff/doc/releases/v3.5.5.rst +++ /dev/null @@ -1,91 +0,0 @@ -Changes in TIFF v3.5.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.5 (:tag:`Release-v3-5-5`) - Previous Version :doc:`v3.5.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :file:`configure`: added test for libc6 for linux targets. Bug reported by - `Stanislav Brabec `_. -* :file:`configure`: fixed bugs in sed scripts - (applied sed script ``s:/@:s;@:;s:/s;;:;:`` to configure). - fix submitted by `Stanislav Brabec `_. -* :file:`tools/iptcutil` was not in files list, and wasn't being - added to tar archive. :file:`Updated Makefile.in`. -* Added 3.5 docs to :file:`html/Makefile.in`. - Thanks to `Stanislav Brabec `_ -* Fixed :file:`tools/tiffcmp` so that ``stopondiff`` testing works. - Patch care of `Joseph Orost `_. -* Added :file:`fax3sm_winnt.c` to distribution list in :file:`Makefile.in`. -* Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. - - -Library changes ---------------- - -* :file:`tif_fax3.c`: Fixed serious bug introduced during the ``uint16->uint32`` - conversion for the run arrays. -* Set :c:member:`td_sampleformat` default to :c:macro:`SAMPLEFORMAT_UINT` instead of - :c:macro:`SAMPLEFORMAT_VOID` in :c:func:`TIFFDefaultDirectory` in :file:`tif_dir.c`. -* Added "GetDefaulted" support for :c:macro:`TIFFTAG_SAMPLEFORMAT` in :file:`tif_aux.c`. -* Patched :file:`tif_fax3.c` so that ``dsp->runs`` is allocated a bit bigger - to avoid overruns encountered with :file:`frle_bug.tif`. -* Modified :file:`tif_unix.c` to support 2-4GB seeks if :c:macro:`USE_64BIT_API` is - set to 1, and added default (off) setting in :file:`tiffconf.h`. This - should eventually be set by the configure script somehow. - The original work on all these 2-4GB changes was done by - `Peter Smith `_. -* Modified :file:`tif_win32.c` to support 2-4GB seeks. -* tentatively changed :c:type:`toff_t` to be unsigned instead of signed to - facilitate support for 2-4GB files. -* Updated a variety of files to use :c:type:`toff_t`. Fixed some mixups - between :c:type:`toff_t` and :c:type:`tsize_t`. -* Set :c:member:`tif_rawdatasize` to zero when freeing raw data buffer in - :c:func:`TIFFWriteDirectory`. -* Enabled :c:macro:`REWRITE_HACK` in :file:`tif_write.c` by default. -* Fix bug in :file:`tif_write.c` when switching between reading one directory - and writing to another. -* Made :c:func:`TIFFWriteCheck` public, and added :c:func:`TIFFCreateDirectory` -* Added :doc:`/functions/TIFFmemory` functions to :file:`libtiff.def`. -* Added :file:`libtiff/libtiff.def` to ``TIFFILES`` distribution list. - - -Tools changes -------------- - -* :program:`fax2ps`: - - * Fixed mixup of width and height in bounding box statement - as per submission by `Nalin Dahyabhai `_. - * Modified :c:var:`printruns` to take :c:type:`uint32` instead of :c:type:`uint16`. - Patch courtesy of `Bernt Herd `_. -* Largely reimplemented :file:`contrib/addtiffo` to avoid temp files, - updating the TIFF file in place. Fixed a few other bugs to. -* Altered descriptions in tools to reflect "by default" lzw not supported - - -LZW compression kit changes ---------------------------- - -* created :file:`mangle-src.sh` -- sed scripts to munge src into LZW enabled format. - Thanks to `Stanislav Brabec `_. -* created :file:`Makefile` -* merged :file:`tif_dir.c` with current source. -* Created lzw compression kit, as a new CVS module (``libtiff-lzw-compression-kit``). -* Updated :file:`index.html` to note lzw compression kit. diff --git a/third_party/libtiff/doc/releases/v3.5.6beta.rst b/third_party/libtiff/doc/releases/v3.5.6beta.rst deleted file mode 100644 index 55d17bd..0000000 --- a/third_party/libtiff/doc/releases/v3.5.6beta.rst +++ /dev/null @@ -1,135 +0,0 @@ -Changes in TIFF v3.5.6beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.6beta (no release tag) - Previous Version :doc:`v3.5.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* Added ``GNULDdso`` target and switched linux and freebsd to use it. -* :file:`tools/Makefile.in`: Modified to install properly on SGI. -* :file:`configure`: Fixed DSO test for Linux as per patch from - `Jan Van Buggenhout `_. - - -Library changes ---------------- - -* :file:`tif_dir.c`: Clear :c:macro:`TIFF_ISTILED` flag in :c:macro:`TIFFDefaultDirectory` - as per :bugzilla-rs:`18` - from ``_. - -* Modified :file:`tif_packbits.c` decoding to avoid overrunning the - output buffer, and to issue a warning if data needs to be - discarded. See :bugzilla-rs:`18` - -* Modified :c:func:`TIFFClientOpen` to emit an error on an attempt to - open a compressed file for update (``O_RDWR``/"``r+``") access. This is - because the compressor/decompressor code gets very confused when - the mode is ``O_RDWR``, assuming this means writing only. See - bug :bugzilla-rs:`13` - -* Applied patch for 0x0000 sequences in :file:`tif_fax3.h` definition - of :c:macro:`EXPAND1D` as per bug :bugzilla-rs:`11` (from Roman). - -* Fixed :file:`tiffcomp.h` to avoid win32 stuff if unix ``#defined``, to improve - cygwin compatibility. - -* Applied patch from Roman Shpount to :file:`tif_fax3.c`. This seems to - be a proper fix to the buffer sizing problem. See - :bugzilla-rs:`11` - -* Fixed :file:`tif_getimage.c` to fix overrun bug with YCbCr images without - downsampling. :bugzilla-rs:`10` - Thanks to `Nick Lamb `_ for reporting the - bug and proving the patch. - -* Fixed :file:`tif_jpeg.c` to avoid destroying the decompressor before - we are done access data thanks to bug report from: - `Michael Eckstein `_. - -* :file:`tif_open.c`: Don't set ``MMAP`` for ``O_RDWR`` files. - -* :file:`tif_open.c`: Set :c:macro:`STRIPCHOP_DEFAULT` for ``O_RDWR`` as well as ``O_RDONLY`` - so that files opened for update can be strip chopped too. - -* :file:`tif_read.c`: fixed up bug with files missing rowsperstrip and - the strips per separation fix done a few weeks ago. - -* Tentatively added support for :c:macro:`SAMPLEFORMAT_COMPLEXIEEEFP`, and - :c:macro:`SAMPLEFORMAT_COMPLEXINT`. - -* :file:`index.html`, :file:`bugs.html`: added bugzilla info. - -* :file:`tif_read.c`: fix subtle bug with determining the number of - rows for strips that are the last strip in a separation but - not the last strip of all in :c:func:`TIFFReadEncodedStrip`. - -* Applied 16/32 bit fix to :file:`tif_fax3.c`. Fix supplied by - `Peter Skarpetis `_. - -* Modified :file:`tiffio.h` logic with regard to including :file:`windows.h`. It - won't include it when building with :c:macro:`__CYGWIN__`. - -* :file:`README`: update to mention {REDACTED - defunct web site}, don't list Sam's old - email address. - -* :file:`libtiff/tif_dirread.c`: Don't use estimate strip byte count for - one tile/strip images with an offset, and byte count of zero. These - could be "unpopulated" images. - -* :file:`tif_win32.c`: Applied patch to fix overreads and ovverwrites - caught by BoundsChecker. From `Arvan Pritchard `_ (untested). - -* :file:`tif_getimage.c`: Applied patch to silence VC6 warnings. From - `Arvan Pritchard `__. - -* :file:`tif_lzw.c`: Applied patch to silence VC6 warnings. From - `Arvan Pritchard `__. - -* :file:`libtiff/tif_apple.c`: Applied "Carbon" support patches supplied by - `Leonard Rosenthol `_. May interfere - with correct building on older systems. If so, please let me know. - - -Tools changes -------------- - -* :file:`tools/rgb2ycbcr.c`: fixed output strip size to account for vertical - roundup if rows_per_strip not a multiple of vertical sample size. - -* :file:`tools/tiffsplit.c`: Copy :c:macro:`TIFFTAG_SAMPLEFORMAT`. - -* Modified :program:`tiff2bw` to ensure portions add to 100%, and that - white is properly recovered. See bug - :bugzilla-rs:`15` Patch - c/o `Stanislav Brabec `_ - - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo`: Added "averaging" resampling option. - -* Added :file:`contrib/stream` (stream io) code submitted by Avi Bleiweiss. - - -LZW compression kit changes ---------------------------- - -* updated :file:`tif_dir.c` to reflect changes to no-lzw :file:`tif_dir.c`. diff --git a/third_party/libtiff/doc/releases/v3.5.7.rst b/third_party/libtiff/doc/releases/v3.5.7.rst deleted file mode 100644 index 97e9a28..0000000 --- a/third_party/libtiff/doc/releases/v3.5.7.rst +++ /dev/null @@ -1,219 +0,0 @@ -Changes in TIFF v3.5.7 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.5.7 (:tag:`Release-v3-5-7`) - Previous Version :doc:`v3.5.6beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Software configuration changes ------------------------------- - -* :file:`libtiff/libtiff.def`: Brent Roman submitted new version adding - several missing entry points. Also add a few other entry points - later. - -* :file:`configure`, :file:`Makefile.in`, etc: added support for ``OPTIMIZER`` being - set from :file:`config.site`. -* :file:`config.guess`: updated wholesale to an FSF version apparently - from 1998 (as opposed to 1994). This is mainly inspired by - providing for MacOS X support. - -* :file:`configure/config.site`: modified to check if ``-lm`` is needed for - ``MACHDEPLIBS`` if not supplied by :file:`config.site`. Needed for Darwin. -* :file:`libtiff/tiff.h`: Applied hack to try and resolve the problem - with the :file:`inttypes.h` include file on AIX. (bug :bugzilla-rs:`39`) - -* :file:`configure`, :file:`*Makefile.in`: Various changes to improve configuration - for HP/UX specifically, and also in general. (bug :bugzilla-rs:`40`) They include: - - * Try to handle :program:`/usr/bin/sh` instead of :program:`/bin/sh` where necessary. - * Upgrade to HP/UX 10.x+ compiler, linker and dso options. - * Fixed :c:func:`mmap` test to avoid ``MMAP_FIXED`` ... it isn't available on HP - * Use ``-${MAKEFLAGS}`` in sub makes from makefiles. - * Fixed ``SCRIPT_SH``/``SHELL`` handling. - -* :file:`configure`: Changes for DSO generation on AIX provided by - `John Marquart `_. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Modified to build DSOs properly - on Darwin thanks to `Robert Krajewski `_ and - `Keisuke Fujii `_. - -* :file:`configure`, :file:`libtiff/Makefile.in`: applied OpenBSD patches as per bug :bugzilla-rs:`61`. - -* :file:`Makefile.in`: added ``DESTDIR`` support as per bug :bugzilla-rs:`60`. - -* :file:`libtiff/tif_jpeg.c`: Define :c:macro:`HAVE_BOOLEAN` on windows if :file:`RPCNDR.H` - has been included. -* :file:`man/Makefile.in`: add :c:func:`TIFFClientOpen` link as per debian submitted - bug :bugzilla-rs:`66`. -* :file:`libtiff/Makefile.in`: Fixed ``@DSOSUB_VERSION`` to be ``@DSOSUF_VERSION@`` - in two places. - - -Library changes ---------------- - -* :file:`tif_fax3.c`: keep :c:var:`rw_mode` flag internal to fax3 state to remember - whether we are encoding or decoding. This is to ensure graceful - recovery if :c:func:`TIFFClientOpen` discovers an attempt to open a compressed - file for "``r+``" access, and subsequently close it, as it resets the - :c:member:`tif_mode` flag to ``O_RDONLY`` in this case to avoid writes, confusing the - compressor's concept of whether it is in encode or decode mode. - -* :file:`tif_luv.c`, :file:`tiff.h`, :file:`tiffio.h`: - New version of TIFF LogLuv (SGILOG) modules contributed by `Greg Ward - `_. He writes: - - * I improved the gamut-mapping function in :file:`tif_luv.c` for imaginary - colors, because some images were being super-saturated on the input - side and this resulted in some strange color shifts in the output. - - * I added a psuedotag in :file:`tiff.h` to control random dithering during - LogLuv encoding. This is turned off by default for 32-bit LogLuv and - on for 24-bit LogLuv output. Dithering improves the average color - accuracy over the image. - - * I added a ``#define`` for :c:macro:`LOG_LUV_PUBLIC`, which is enabled by default in - :file:`tiffio.h`, to expose internal routines for converting between LogLuv and - XYZ coordinates. This is helpful for writing more efficient, - specialized conversion routines, especially for reading LogLuv files. - -* :file:`libtiff/tif_dirinfo.c`: don't declare :c:var:`tiffFieldInfo` static on VMS. - -* Added :c:macro:`TIFFTAG_COPYRIGHT` support. - -* :file:`tif_getimage.c`: Added support for 16bit minisblack/miniswhite - images in RGBA interface. - -* :file:`libtiff/tif_dirinfo.c`: removed duplicate :c:macro:`TIFFTAG_PHOTOSHOP` as per - bug :bugzilla-rs:`44`. - -* :file:`libtiff/tif_dirwrite.c`: Added support for :c:enumerator:`TIFF_VARIABLE2` in the - case of writing :c:enumerator:`TIFF_BYTE`/:c:enumerator:`TIFF_SBYTE` fields as per - bug :bugzilla-rs:`43`. - -* :file:`libtiff/tif_dirinfo.c`: Modified the :c:enumerator:`TIFF_BYTE` definition for - :c:macro:`TIFFTAG_PHOTOSHOP` to use a writecount of :c:enumerator:`TIFF_VARIABLE2` (-3) to - force use of :c:type:`uint32` counts instead of :c:expr:`short` counts. - -* :file:`libtiff/tif_dirinfo.c`: moved pixar and copyright flags to ensure everything is in order. - -* Integrated experimental OJPEG support from Scott Marovich of HP. - -* :file:`libtiff/tif_open.c`: Seek back to zero after failed read, before writing header. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: added check for :c:macro:`__LP64__` - when checking for 64 bit architectures as per bugzilla bug :bugzilla-rs:`67`. - -* :file:`libtiff/tif_getimage.c`: Use :c:func:`memmove` instead of :c:func:`TIFFmemcpy` - in :c:func:`TIFFReadRGBATile` to avoid issues in cases of overlapping - buffers. See bug :bugzilla-rs:`69` in Bugzilla. - -* :file:`libtiff/tif_getimage.c`: Don't complain for CMYK (separated) - images with more than four samples per pixel as per bug :bugzilla-rs:`73`. - -* :file:`libtiff/tif_getimage.c`: relax handling of contig case where - there are extra samples that are supposed to be ignored as per bug :bugzilla-rs:`75`. This - should now work for 8bit greyscale or paletted images. - -* :file:`libtiff/tif_packbits.c`: fixed memory overrun error as per bug :bugzilla-rs:`77`. - -* :file:`libtiff/tif_getimage.c`: Fixed problem with reading strips or - tiles that don't start on a tile boundary. Fix contributed by - Josep Vallverdu (from HP), and further described in bug :bugzilla-rs:`47`. - -* :file:`libtif/tif_fax3.c`: Removed ``#ifdef PURIFY`` logic, and modified to - always use the "safe" version, even if there is a very slight - cost in performance as per bug :bugzilla-rs:`54`. - -* :file:`libtiff/tif_lzw.c`: added dummy :c:func:`LZWSetupEncode` to report an - error about LZW not being available. - -* :file:`libtiff/tif_dir.c`: propagate failure to initialize compression - back from :c:func:`TIFFSetField` as an error status, so applications can - detect failure. - -* :file:`libtiff/tif_lzw.c`: Avoid MS VC++ 5.0 optimization bug as per bug :bugzilla-rs:`78`. - -* :file:`libtiff/tif_dirwrite.c`: added :c:func:`TIFFRewriteDirectory` function. - Updated :c:func:`TIFFWriteDirectory` man page to include :c:func:`TIFFRewriteDirectory`. - -* :file:`libtiff/tiff.h`: I have created :c:macro:`COMPRESSION_CCITT_T4`, - :c:macro:`COMPRESSION_CCITT_T6`, :c:macro:`TIFFTAG_T4OPTIONS` and :c:macro:`TIFFTAG_T6OPTIONS` aliases - in keeping with TIFF 6.0 standard in :file:`tiff.h` as per bug :bugzilla-rs:`83`. - -* Added :c:macro:`PHOTOMETRIC_ITULAB` as per bug :bugzilla-rs:`90`. - - -Tools changes -------------- - -* Brent Roman contributed updated :program:`tiffcp` utility (and :file:`tiffcp.1`) - with support for extracting subimages with the ``,n`` syntax, and also - adding the "``-b``" bias removal flag. - -* :file:`tiff2ps.c`, :file:`tiff2ps.1`: Substantial changes to :program:`tiff2ps` by - Bruce A. Mallett, including a faster encoder, fixes for level - 2 PostScript, and support for the imagemask operator. - -* fax2ps.c: Helge (libtiff at oldach.net) submitted fix - that corrects behaviour for non-Letter paper - sizes. (bug :bugzilla-rs:`35`) It fixes two problems: - - Without scaling ("``-S``") the fax is now centered on the page size specified - with "``-H``" and/or "``-W``". Before, :program:`fax2ps` was using an obscure and practically - useless algorithm to allocate the image relative to Letter sized paper - which sometime sled to useless whitespace on the paper, while at the - same time cutting of the faxes printable area at the opposite border. - - Second, scaling now preserves aspect ratio, which makes unusual faxes - (in particular short ones) print properly. - -* :file:`thumbnail.c`: changed default output compression - to packbits from LZW since LZW isn't generally available. - -* :file:`tiff2rgba.c`: added "``-n``" flag to avoid emitting alpha component. Also added - a man page for :program:`tiff2rgba`. - -* :file:`tiffcmp.c`: Fixed multi samples per pixel support for :c:func:`ContigCompare` - as per bug :bugzilla-rs:`53`. - Updated bug section of tiffcmp.1 to note tiled file issues. - -* :file:`libtiff/tif_getimage.c`: Fixed so that failure is properly - reported by :c:func:`gtTileContig`, :c:func:`gtStripContig`, :c:func:`gtTileSeparate` and - :c:func:`gtStripSeparate` as per bug :bugzilla-rs:`51`. - - -Contributed software changes ----------------------------- - -* Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c` - and :file:`contrib/addtiffo/tif_ovrcache.h`. - - -LZW compression kit changes ---------------------------- - -* Rewrote lzw patching process so that is required to enable full - LZW support is to drop the :file:`tif_lzw.c` from the - ``libtiff-lzw-compression-kit`` over the one in the libtiff directory. - -* Some changes were made to make recovery from failure to - initialize the LZW compressor more graceful. - -* Note that as distributed libtiff support LZW decompression, but - not LZW compression. diff --git a/third_party/libtiff/doc/releases/v3.6.0.rst b/third_party/libtiff/doc/releases/v3.6.0.rst deleted file mode 100644 index 345c5f1..0000000 --- a/third_party/libtiff/doc/releases/v3.6.0.rst +++ /dev/null @@ -1,372 +0,0 @@ -Changes in TIFF v3.6.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.6.0 (:tag:`Release-v3-6-0`) - Previous Version :doc:`v3.5.7 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* New utility :program:`raw2tiff` for converting raw rasters into TIFF files. -* Lots of new :program:`tiff2ps` options. -* Lots of new :program:`fax2tiff` options. -* Lots of bug fixes for LZW, JPEG and OJPEG compression. - -Custom Tag Support -^^^^^^^^^^^^^^^^^^ - -The approach to extending libtiff with custom tags has changed radically. -Previously, all internally supported TIFF tags had a place in the -private :c:struct:`TIFFDirectory` structure within libtiff to hold the values (if read), -and a "field number" (ie. :c:macro:`FIELD_SUBFILETYPE`) used to identify that tag. -However, every time a new tag was added to the core, the size of the -:c:struct:`TIFFDirectory` structure would change, breaking any dynamically linked -software that used the private data structures. - -Also, any tag not recognised -by libtiff would not be read and accessible to applications without some -fairly complicated work on the applications part to pre-register the tags -as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on -libtiff. - -Among other things this approach required the extension code -to access the private libtiff structures ... which made the higher level -non-libtiff code be locked into a specific version of libtiff at compile time. -This caused no end of bug reports! - -The new approach is for libtiff to read all tags from TIFF files. Those that -aren't recognised as "core tags" (those having an associated ``FIELD_`` value, -and place for storage in the :c:struct:`TIFFDirectory` structure) are now read into a -dynamic list of extra tags (:c:member:`td_customValues` in :c:struct:`TIFFDirectory`). When a new -tag code is encountered for the first time in a given TIFF file, a new -anonymous tag definition is created for the tag in the tag definition list. -The type, and some other metadata is worked out from the instance encountered. -These fields are known as "custom tags". - -Custom tags can be set and fetched normally using :c:func:`TIFFSetField` and -:c:func:`TIFFGetField`, and appear pretty much like normal tags to application code. -However, they have no impact on internal libtiff processing (such as -compression). Some utilities, such as :program:`tiffcp` will now copy these custom -tags to the new output files. - -As well as the internal work with custom tags, new C API entry points -were added so that extension libraries, such as libgeotiff, could -define new tags more easily without accessing internal data structures. -Because tag handling of extension tags is done via the "custom fields" -mechanism as well, the definition provided externally mostly serves to provide -a meaningful name for the tag. - -The addition of "custom tags" and the altered approach to extending libtiff -with externally defined tags is the primary reason for the shift to the -3.6.x version number from 3.5.x. - -Software configuration changes ------------------------------- - -* :file:`configure`, :file:`config.site`: Fix for large files (>2GiB) support. New - option in the config.site: ``LARGEFILE="yes"``. Should be enough for the large - files I/O. - -* :file:`configure`: Set ``-DPIXARLOG_SUPPORT`` option along with ``-DZIP_SUPPORT``. - -* :file:`html/Makefile.in`: Updated to use :program:`groffhtml` for generating html pages - from man pages. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Added SCO OpenServer 5.0.6 support - from John H. DuBois III. - -* :file:`libtiff/Makefile.vc`, :file:`libtiff/libtiff.def`: Missed declarations added. - -* :file:`libtiff/Makefile.in`, :file:`tools/Makefile.in`: Shared library will not be - stripped when installing, utility binaries will do be stripped. As per bug :bugzilla-rs:`93`. - -* :file:`man/Makefile.in`: Patch ``DESTDIR`` handling as per bug :bugzilla-rs:`95`. - -* :file:`configure`: OpenBSD changes for Sparc64 and DSO version as per bug :bugzilla-rs:`96`. - -* :file:`config.site/configure`: added support for ``OJPEG=yes`` option to enable - OJPEG support from :file:`config.site`. - -* :file:`config.gues`, :file:`config.sub`: Updated from ``_. - -* :file:`configure`: Modify ``CheckForBigEndian`` so it can work in a cross - compiled situation. - -* :file:`configure`, :file:`libtiff/Makefile.in`: Changes for building on MacOS 10.1 - as per bug :bugzilla-rs:`94`. - -* :file:`html/Makefile.in`: added missing images per bug :bugzilla-rs:`92`. - -* :file:`port/Makefile.in`: fixed clean target per bug :bugzilla-rs:`92`. - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`: New function :c:func:`TIFFReadRGBAImageOriented` - implemented to retrieve raster array with user-specified origin position. - -* :file:`libtiff/tif_fax3.c`: Fix wrong line numbering. - -* :file:`libtiff/tif_dirread.c`: Check field counter against number of fields. - -* Store a list of opened IFD to prevent directory looping. - -* :file:`libtiff/tif_jpeg.c`: modified segment_height calculation to always - be a full height tile for tiled images. Also changed error to just - be a warning. - -* :file:`libtiff/tif_lzw.c`: fixed so that decoder state isn't allocated till - :c:func:`LZWSetupDecode`. Needed to read LZW files in "``r+``" mode. - -* :file:`libtiff/tif_dir.c`: fixed up the :c:member:`tif_postdecode` settings responsible - for byte swapping complex image data. - -* :file:`libtiff/tif_open.c`: Removed error if opening a compressed file - in update mode bug (:bugzilla-rs:`198`). - -* :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteCheck` now fails if the image is - a pre-existing compressed image. That is, image writing to pre-existing - compressed images is not allowed. - -* :file:`html/man/*.html`: Web pages regenerated from man pages. - -* :file:`libtiff/tif_jpeg.c`: Hack to ensure that "boolean" is defined properly - on Windows so as to avoid the structure size mismatch error from libjpeg - (bug :bugzilla-rs:`188`). - -* :file:`libtiff/tiff.h`: ``#ifdef USING_VISUALAGE`` around previous Visual Age - AIX porting hack as it screwed up gcc. (bug :bugzilla-rs:`39`) - -* :file:`libtiff/tiff.h`: added :c:macro:`COMPRESSION_JP2000` (34712) for LEAD tools - custom compression. - -* :file:`libtiff/tif_dirread.c`: Another fix for the fetching ``SBYTE`` arrays - by the :c:func:`TIFFFetchByteArray` function. (bug :bugzilla-rs:`52`) - -* :file:`libtiff/tif_dirread.c`: Expand ``v[2]`` to ``v[4]`` in :c:func:`TIFFFetchShortPair` - as per bug :bugzilla-rs:`196`. - -* :file:`libtiff/tif_lzw.c`: Additional consistency checking added in - :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` fixing bugs - :bugzilla-rs:`190` and :bugzilla-rs:`100`. - -* :file:`libtiff/tif_lzw.c`: Added check for valid code lengths in :c:func:`LZWDecode` - and :c:func:`LZWDecodeCompat`. Fixes bug :bugzilla-rs:`115`. - -* :file:`tif_getimage.c`: Ensure that :c:func:`TIFFRGBAImageBegin` returns the - return code from the underlying pick function as per bug :bugzilla-rs:`177`. - -* :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`, :file:`libtiff/tif_print.c`: - Hacked :file:`tif_jpeg.c` to fetch :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` from the jpeg - data stream if it isn't present in the tiff tags as per bug :bugzilla-rs:`168`. - -* :file:`libtiff/tif_jpeg.c`: Fixed problem with setting of :c:var:`nrows` in - :c:func:`JPEGDecode` as per bug :bugzilla-rs:`129`. - -* :file:`libtiff/tif_read.c`, :file:`libtiff/tif_write.c`: :c:func:`TIFFReadScanline` and - :c:func:`TIFFWriteScanline` now set :c:member:`tif_row` explicitly in case the codec has - fooled with the value as per bug :bugzilla-rs:`129`. - -* :file:`libtiff/tif_ojpeg.c`: Major upgrade from Scott. Details in bug :bugzilla-rs:`156`. - -* :file:`libtiff/tif_open.c`: Pointers to custom procedures - in :c:func:`TIFFClientOpen` are checked to be not :c:macro:`NULL` pointers. - -* :file:`libtiff/tif_lzw.c`: Assertions in :c:func:`LZWDecode` and :c:func:`LZWDecodeCompat` - replaced by warnings. Now libtiff should read corrupted LZW-compressed - files by skipping bad strips as per bug :bugzilla-rs:`100`. - -* :file:`libtiff/tif_dirwrite.c`, :file:`libtiff/tif_write.c`, :file:`libtiff/tiffio.h`: - :c:func:`TIFFCheckpointDirectory` routine added as per bug :bugzilla-rs:`124`. - The :doc:`/functions/TIFFWriteDirectory` man page discusses this new function as well as the related - :c:func:`TIFFRewriteDirectory`. - -* :file:`libtiff/tif_codec.c`, :file:`libtiff/tif_compress.c`, - :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_getimage.c`: - Introduced additional members ``tif->tif_decodestatus`` and ``tif->tif_encodestatus`` - for correct handling of unconfigured codecs (we should not try to read - data or to define data size without correct codecs). See bug :bugzilla-rs:`119`. - -* :file:`tif_dirread.c`: avoid div-by-zero if :c:var:`rowbytes` is zero in chop func as - per bug :bugzilla-rs:`111`. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, - :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: - Dwight Kelly added get/put code for new tag ``XMLPACKET`` as - defined in Adobe XMP Technote. Added missing ``INKSET`` tag value from TIFF 6.0 - spec ``INKSET_MULTIINK`` (=2). Added missing tags from Adobe TIFF technotes: - ``CLIPPATH``, ``XCLIPPATHUNITS``, ``YCLIPPATHUNITS``, ``OPIIMAGEID``, ``OPIPROXY`` and - ``INDEXED``. Added ``PHOTOMETRIC`` tag value from TIFF technote 4 ``ICCLAB`` (=9). - -* :file:`libtiff/tif_getimage.c`: Additional check for supported codecs added in - :c:func:`TIFFRGBAImageOK`, :c:func:`TIFFReadRGBAImage`, :c:func:`TIFFReadRGBAStrip` and - :c:func:`TIFFReadRGBATile` now use :c:func:`TIFFRGBAImageOK` before reading a per bug - :bugzilla-rs:`110`. - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, :file:`libtiff/tif_dirinfo.c`, - :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirwrite.c`: - Added routine :c:func:`TIFFDataWidth` for determining - :c:enum:`TIFFDataType` sizes instead of working with :c:var:`tiffDataWidth` array - directly as per bug :bugzilla-rs:`109`. - -* :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_dirwrite.c`: Added possibility to - read broken TIFFs with ``LONG`` type used for :c:macro:`TIFFTAG_COMPRESSION`, - :c:macro:`TIFFTAG_BITSPERSAMPLE`, :c:macro:`TIFFTAG_PHOTOMETRIC` as per bug - :bugzilla-rs:`99`. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: Add support for - :c:macro:``__arch64__`` as per bug :bugzilla-rs:`94`. - -* :file:`libtiff/tif_read.c`: Fixed :c:func:`TIFFReadEncodedStrip` to fail if the - decodestrip function returns anything not greater than zero as per bug - :bugzilla-rs:`97`. - -* :file:`libtiff/tif_jpeg.c`: fixed computation of :c:var:`segment_width` for - tiled files to avoid error about it not matching the - ``cinfo.d.image_width`` values ("JPEGPreDecode: Improper JPEG strip/tile - size.") for ITIFF files. Apparently the problem was incorporated since - 3.5.5, presumably during the OJPEG/JPEG work recently. - -* :file:`libtiff/tif_getimage.c`: If :c:macro:`DEFAULT_EXTRASAMPLE_AS_ALPHA` is 1 - (defined in :file:`tiffconf.h` - 1 by default) then the RGBA interface - will assume that a fourth extra sample is ``ASSOCALPHA`` if the - ``EXTRASAMPLE`` value isn't set for it. This changes the behaviour of - the library, but makes it work better with RGBA files produced by - lots of applications that don't mark the alpha values properly. - As per bugs :bugzilla-rs:`93` and :bugzilla-rs:`65`. - -* :file:`libtiff/tif_jpeg.c`: allow jpeg data stream sampling values to - override those from tiff directory. This makes this work with - ImageGear generated files. - - -Tools changes -------------- - -* :program:`tiff2ps`: - - * Added page size setting when creating PS Level 2. - - * Fixed PS comment emitted when FlateDecode is being used. - -* :program:`tiffsplit`: increased the maximum number of pages that can be split. - -* :program:`raw2tiff`: - - * New utility for turning raw raster images into TIFF files - written by Andrey Kiselev. - - * Added option "``-p``" to explicitly select color space of input image data. - -* :program:`tiffmedian`: Support for large (> 2GB) images. - -* :program:`ppm2tiff`: Fixed possible endless loop. - -* :program:`tiff2rgba`: Switched to use :c:func:TIFFReadRGBAImageOriented - instead of :c:func:`TIFFReadRGBAImage`. - -* :program:`tiffcmp`: Fixed problem with unused data comparing (bug :bugzilla-rs:`349`). - "``-z``" option now can be used to set the number of reported different bytes. - -* :program:`tiffcp`: - - * Added possibility to specify value -1 to "``-r``" option to get the entire image as one strip - (bug :bugzilla-rs:`343`). - - * Set the correct ``RowsPerStrip`` and ``PageNumber`` values (bug :bugzilla-rs:`343`). - - * Fixed problem with colorspace conversion for JPEG encoded images (bugs :bugzilla-rs:`23` - and :bugzilla-rs:`275`) - - * Added support for ``Orientation`` tag. - -* :program:`fax2tiff`: - - * Page numbering fixed (bug :bugzilla-rs:`341`). - - * Applied patch from Julien Gaulmin. More switches for :program:`fax2tiff` tool for better control - of input and output (bugs :bugzilla-rs:`272` and :bugzilla-rs:`293`). - - * Updated to reflect latest changes in libtiff per bug :bugzilla-rs:`125`. - -* :program:`ppm2tiff`: PPM header parser improved: now able to skip comments. - -* :program:`tiff2ps`: - - * Sebastian Eken provided patches (bug :bugzilla-rs:`200`) to add new these new switches: - - "``-b #``": - for a bottom margin of # inches - "``-c``": - center image - "``-l #``": - for a left margin of # inches - "``-r``": - rotate the image by 180 degrees - - Also, new features merged with code for shrinking/overlapping. - - * Force deadzone printing when EPS output specified (bug :bugzilla-rs:`325`). - - * Add ability to generate PS Level 3. It basically allows one to use the ``/flateDecode`` - filter for ZIP compressed TIFF images. Patch supplied by Tom Kacvinsky - (bug :bugzilla-rs:`328`). - - * Don't emit ``BeginData``/``EndData`` DSC comments since we are unable to properly - include the amount to skip as per bug :bugzilla-rs:`80`. - - * Added workaround for some software that may crash when last strip of image contains fewer - number of scanlines than specified by the ``/Height`` variable as per bug :bugzilla-rs:`164`. - - * Patch from John Williams to add new functionality for splitting long images in several pages as - per bug :bugzilla-rs:`142`. New switches: - - "``-H #``": - split image if height is more than # inches - "``-L #``": - overLap split images by # inches - - * New commandline switches to override resolution units obtained from the input file per - bug :bugzilla-rs:`131`: - - "``-x``": - override resolution units as centimeters - "``-y``": - override resolution units as inches - - * tiff2ps: Division by zero fixed as per bug :bugzilla-rs:`88`. - -* :program:`tiffdump`: include :c:macro:`TIFFTAG_JPEGTABLES` in tag list. - -* :program:`tiffset`: fix bug in error reporting. - - -Contributed software changes ----------------------------- - -* Fixed distribution to include :file:`contrib/addtiffo/tif_ovrcache.c`, :file:`contrib/addtiffo/tif_ovrcache.h`. - -* :file:`libtiff/contrib/win95`: renamed to :file:`contrib/win_dib`. Added new - :file:`Tiffile.cpp` example of converting TIFF files into a DIB on Win32 as per - bug :bugzilla-rs:`143`. - - -LZW compression kit changes ---------------------------- - -* LZW compression kit synchronized with actual libtiff version. diff --git a/third_party/libtiff/doc/releases/v3.6.1.rst b/third_party/libtiff/doc/releases/v3.6.1.rst deleted file mode 100644 index bb7cbdf..0000000 --- a/third_party/libtiff/doc/releases/v3.6.1.rst +++ /dev/null @@ -1,135 +0,0 @@ -Changes in TIFF v3.6.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.6.1 (:tag:`Release-v3-6-1`) - Previous Version :doc:`v3.6.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* New utility :program:`tiff2pdf` - for converting TIFF images directly into PDF. -* New :doc:`/functions/TIFFcolor` color conversion module. -* Full support for ``Orientation`` tag in ``TIFFRGBAImage`` interface. -* Many bugs fixed. - - -Software configuration changes ------------------------------- - -* :file:`libtiff/makefile.vc`, :file:`tools/makefile.vc`: Support for IJG JPEG library. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - -* :file:`libtiff/tiffcomp.h`: ``#define _BSDTYPES_DEFINED`` when defining BSD typedefs. - -* :file:`configure`, :file:`libtiff/Makefile.in`, :file:`libtiff/mkversion.c`: Relative buildings fixed. - -* :file:`Makefile.in`: Add an absolute path to the :file:`test_pics.sh` call. - - -Library changes ---------------- - -* :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: - Added support for ``ReferenceBlackWhite`` tag handling when converted from YCbCr color space as - per bug :bugzilla-rs:`120`. - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_aux.c`: Read ``WhitePoint`` tag from the - file and properly use it for CIE Lab 1976 to RGB transform. - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: Finally resolved problems with - orientation handling. ``TIFFRGBAImage`` interface now properly supports all - possible orientations, i.e. images will be flipped both in horizontal and - vertical directions if required. 'Known bugs' section now removed from the - appropriate manual pages. - -* :file:`libtiff/tif_luv.c`: Fixed bug in 48-bit to 24-bit conversion routine, - reported by Antonio Scuri. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_codec.c`: Added new function - :c:func:`TIFFIsCODECConfigured`, suggested by Ross Finlayson. - -* :file:`libtiff/tif_ojpeg.c`: :c:func:`TIFFVGetField` function now can properly extract - the fields from the OJPEG files. Patch supplied by Ross Finlayson. - -* :file:`libtiff/tif_dir.h`: :c:func:`_TIFFFindOrRegisterdInfo` declaration replaced - with :c:func:`_TIFFFindOrRegisterFieldInfo` as reported by Ross Finlayson. - -* :file:`libtiff/tif_dirinfo.c`: Implemented binary search in :c:func:`_TIFFMergeFieldInfo`. - Patch supplied by Ross Finlayson. - -* :file:`tif_dirread.c`: do not mark all anonymously defined tags to be ``IGNORE`` (as - it was done in 3.6.0). - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_dirinfo.c`: Added support for IFD (13) datatype, - introduced in "Adobe PageMaker TIFF Technical Notes". - -* :file:`libtiff/tif_color.c`, :file:`libtiff/tif_getimage.c`, :file:`libtiff/tiffio.h`: New color space - conversion code: CIE L*a*b* 1976 images now supported by the ``TIFFRGBAImage`` - interface. YCbCr to RGB conversion code also moved there and now has - :doc:`/functions/TIFFcolor` publicly available interface. These - routines currently used in ``TIFFRGBAImage`` interface only and not supported in - other libtiff tools yet. So if you want, for example, to convert CIE Lab image - into PostScript file you should do it in two steps: change colorspace to RGB - using :program:`tiff2rgba` utility and then process - it with the :program:`tiff2ps`. - -* :file:`libtiff/tif_tile.c`: Remove spurious use of "s" (sample) in the - ``planarconfig_contig`` case in :c:func:`TIFFComputeTile` as per bug :bugzilla-rs:`387`. - -* :file:`libtiff/tiffiop.h`: New macros: :c:macro:`TIFFmax` and :c:macro:`TIFFmin`. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_strip.c`: Added :c:func:`TIFFRawStripSize` function - as suggested by Chris Hanson. - -* :file:`libtiff/tif_lzw.c`, :file:`libtiff/tif_fax3.c`: Proper support for update mode - as per bug :bugzilla-rs:`424`. - - -Tools changes -------------- - -* :program:`tiff2pdf`:: New tool, written by - Ross Finlayson, to directly convert TIFF files to PDF. - -* :program:`tiffgt`: Unmaintained and platform - dependent sgigt utility removed and replaced with the completely rewritten - portable tool (depend on OpenGL and - GLUT). This tool will not build by default. - -* :program:`ras2tiff`: Properly determine - SUN Rasterfiles with the reverse byte order (it is reported by the magic - header field). Problem reported by Andreas Wiesmann. - -* :program:`raw2tiff`: Implemented image size - guessing using correlation coefficient calculation between two neighbour - lines. - - -Contributed software changes ----------------------------- - -* :file:`contrib/pds/tif_pdsdirread.c`, :file:`contrib/pds/tif_pdsdirwrite.c`: - Use :c:func:`TIFFDataWidth` function instead of :c:var:`tiffDataWidth` array. - -LZW compression kit changes ---------------------------- - -* Proper support for update mode as per bug :bugzilla-rs:`424`. diff --git a/third_party/libtiff/doc/releases/v3.7.0.rst b/third_party/libtiff/doc/releases/v3.7.0.rst deleted file mode 100644 index b04ea49..0000000 --- a/third_party/libtiff/doc/releases/v3.7.0.rst +++ /dev/null @@ -1,78 +0,0 @@ -Changes in TIFF v3.7.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0 (:tag:`Release-v3-7-0`) - Previous Version :doc:`v3.7.0beta2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - - -* Several bugs found after 3.7.0beta2 release were fixed. - - -Software configuration changes ------------------------------- - -* :file:`ltmain.sh`: Fix for MinGW compilation. - - -Library changes ---------------- - -* :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_luv.c`, - :file:`libtiff/tif_ojpeg.c`, :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_write.c`: - Handle the zero strip/tile sizes properly (Dmitry V. Levin, Marcus Meissner). - -* :file:`libtiff/tif_dirinfo.c`: Type of the :c:macro:`TIFFTAG_SUBIFD` field changed - to :c:enumerator:`TIFF_IFD`. - -* Preliminary support for BigTIFF files: now libtiff can - recognize and reject to open such images. ;-) - -* :file:`libtiff/tif_dir.c`: Initialize :c:member:`td_tilewidth` and :c:member:`td_tilelength` fields - of the :c:struct:`TIFFDirectory` structure with the 0 instead of -1 to avoid - confusing integer overflows in :c:func:`TIFFTileRowSize` for striped images. - -* :file:`libtiff/tif_dirinfo.c`: Fix bug with ``tif_foundfield`` and reallocation - of ``tif_fieldinfo`` as per bug - :bugzilla-rs:`630` - -* :file:`libtiff/tif_compress.c`: Improved error reporting in - :c:func:`TIFFGetConfiguredCODECs` (Dmitry V. Levin). - - -Tools changes -------------- - -* :file:`tiffcmp.c` (:c:func:`leof`): Renamed from "``eof``" in order to avoid - conflict noticed under MinGW. - -* :file:`tiff2pdf.c`: Fixed ``TransferFunction`` tag handling reported - by Ross A. Finlayson. - - -Contributed software changes ----------------------------- - -* None. - - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/releases/v3.7.0alpha.rst b/third_party/libtiff/doc/releases/v3.7.0alpha.rst deleted file mode 100644 index cc25462..0000000 --- a/third_party/libtiff/doc/releases/v3.7.0alpha.rst +++ /dev/null @@ -1,179 +0,0 @@ -Changes in TIFF v3.7.0alpha -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0alpha (:tag:`Release-v3-7-0-alpha`) - Previous Version :doc:`v3.6.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* Significant changes in software configuration: we are switched - to GNU autotools now. - -* :program:`tiffset`: Set any libtiff supported tags. Tags - can be supplied by the mnemonic name or number. - - -Software configuration changes ------------------------------- - -* Get rid of the old configuration system and switch to - GNU autotools. - - -Library changes ---------------- - -* :file:`libtiff/tif_ojpeg.c`: Fixed problem with duplicated ``SOI`` and ``SOF`` - markers as per bug - :bugzilla-rs:`581`. - -* :file:`libtiff/tif_open.c`, :file:`libtiff/tiffio.h`: New function added: - :c:func:`TIFFIsBigEndian`. Function returns nonzero if given was file written - in big-endian order. - -* :file:`libtiff/tif_print.c`: added (untested) support for printing - ``SSHORT``, ``SLONG`` and ``SRATIONAL`` fields. - -* :file:`libtiff/tif_fax3.c`: Avoid reading CCITT compression options - if compression type mismatches. See - :bugzilla-rs:`565`. - -* :file:`libtiff/tif_strip.c`: Never return 0 from the :c:func:`TIFFNumberOfStrips`. - -* :file:`libtiff/tif_dirread.c`: Workaround for broken TIFF writers which - store single ``SampleFormat`` value for multisampled images. See - :bugzilla-rs:`562`. - -* :file:`libtiff/tif_write.c`: Allow in-place updating of the compressed - images (don't work properly with all codecs). For details see GDAL bug - :bugzilla-rs:`534`. - -* :file:`libtiff/tif_jpeg.c`: Workaround for wrong sampling factors used - in the Intergarph JPEG compressed TIFF images as per bug: - :bugzilla-rs:`532`. - -* :file:`libtiff/tif_open.c`: Use dummy :c:func:`mmap`/:c:func:`munmap` functions in - :c:func:`TIFFClientOpen` when the appropriate client functions was not - supplied by user. - -* :file:`libtiff/tif_dirread.c`: Fixed problem with handling :c:enumerator:`TIFF_UNDEFINED` - tag type in :c:func:`TIFFFetchNormalTag` as per bug - :bugzilla-rs:`508`. - -* :file:`libtiff/tif_codec.c`: Fixed typo in ``TIFFInitPackBits`` name as per: - :bugzilla-rs:`494`. - -* :file:`libtiff/tif_fax3.c`: Fixed problem, introdiced in 3.6.1 release, - with the CCITT encoding modes as per bug - :bugzilla-rs:`483`. - We need more work on fax codec to support update mode. - -* :file:`libtiff/tiff.h`: Fixed tag definitions for :c:macro:`TIFFTAG_YCLIPPATHUNITS` - and :c:macro:`TIFFTAG_INDEXED` as per bug - :bugzilla-rs:`475`. - -* :file:`libtiff/tif_win32.c`, :file:`libtiff/tif_unix.c`: Check whether the pointer is - :c:macro:`NULL` before proceeding further as per bug - :bugzilla-rs:`474`. - - Check results, returned by the :c:func:`TIFFFdOpen` before returning and close - file if :c:func:`TIFFFdOpen` failed as per bug - :bugzilla-rs:`468`. - -* :file:`libtiff/libtiff.def`, :file:`libtiff/tif_close.c`, - :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: - Separate :c:func:`TIFFCleanup` from the :c:func:`TIFFClose` in order to fix the bug - :bugzilla-rs:`468`. - -* :file:`libtiff/tif_dirwrite.c`: Fixed handling of writable ASCII tags - that are ``field_passcount=TRUE`` properly. Arguably anonymous custom - tags should be declared as ``passcount=FALSE``, but I don't want to change - that without a careful review. - -* :file:`libtiff/tif_write.c`: Fixed reporting size of the buffer in case - of stripped image in :c:func:`TIFFWriteBufferSetup`. As per bug - :bugzilla-rs:`460`. - -* :file:`libtiff/tif_dir.c`: Incomplete cleanup in :c:func:`TIFFFreeDirectory`, - patch from Gerben Koopmans. - -* :file:`libtiff/tif_dirread.c`: Check :c:member:`field_passcount` value before setting - the value of undefined type, patch from Gerben Koopmans. - -* :file:`libtiff/tiff.h`, :file:`libtiff/tif_fax3.c`: - Fixes for AMD 64 platform as suggested by Jeremy C. Reed. - -* :file:`libtiff/tif_win32.c`: Fixed problem with :c:func:`_TIFFrealloc` when - the :c:macro:`NULL` pointer passed. Patch supplied by Larry Grill. - - -Tools changes -------------- - -* :program:`tiffset`: Set any libtiff supported tags. Tags - can be supplied by the mnemonic name or number. - -* :file:`ycbcr.c`: fixed :c:func:`main` declaration as per: - :bugzilla-rs:`513`. - -* :program:`tiffsplit`: Don't forget - to copy ``PhotometricInterpretation`` tag. - -* :program:`tiffsplit`: - - * Fixed problem with - unproperly written multibyte files. Now output files will be written - using the same byte order flag as in the input image. See - :bugzilla-rs:`574`. - - * Copy ``JPEGTables`` - tag contents for JPEG compressed images. Reported by Artem Mirolubov. - -* :program:`tiffcp`: - - * Close output file on normal exit. - - * Don't emit warnings - when ``Orientation`` tag does not present in the input image. - - * Properly set - Photometric Interpretation in case of JPEG compression of grayscale - images. - - * Fixed problem with wrong - interpretation of the ``InkNames`` tag as per bug - :bugzilla-rs:`466`. - Memory leak fixed. - - * Fixed problem with - wrong ``PhotometricInterpretation`` setting for non-RGB images. - - -Contributed software changes ----------------------------- - -* Outdated stuff removed. - -* Almost all programs are synchronized with the current libtiff - and should compile without problems. - - -LZW compression kit changes ---------------------------- - -* No changes. diff --git a/third_party/libtiff/doc/releases/v3.7.0beta.rst b/third_party/libtiff/doc/releases/v3.7.0beta.rst deleted file mode 100644 index 8239faa..0000000 --- a/third_party/libtiff/doc/releases/v3.7.0beta.rst +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v3.7.0beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0beta (:tag:`Release-v3-7-0beta`) - Previous Version :doc:`v3.7.0alpha ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* LZW compression enabled by default. You don't need the separate - compression kit anymore. - -* :program:`bmp2tiff`: Added new utility to convert Windows BMP files - into TIFFs. - -* The first attempt to implement a test suite. - - -Software configuration changes ------------------------------- - -* Many portability fixes in the new autotooled build suite. - - -Library changes ---------------- - -* :file:`libtiff/tif_luv.c`, :file:`libtiff/tif_next.c`, :file:`libtiff/tif_thunder.c`: - Several buffer overruns fixed, as noted by Chris Evans. - -* BSD data types (:c:type:`u_char`, :c:type:`u_short`, :c:type:`u_int`, :c:type:`u_long`) - is no longer used internally in the libtiff. Should result in simpler configuration - and better portability. - -* :file:`libtiff/tiff.h`: Fix column tagging. Reference current Adobe XMP - specification. Reference libtiff bug tracking system to submit - private tag additions. - -* :file:`libtiff/tif_dirread.c`: Don't reject to read tags of the - ``SamplesPerPixel`` size when the tag count is greater than number of - samples as per bug - :bugzilla-rs:`576`. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_open.c`: Applied patches from - Joris Van Damme to avoid requirement for :file:`tiffiop.h` inclusion in - some applications. Look for details here: - ``_. - -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirinfo.c`: Fixed problem with the static - variable as per bug - :bugzilla-rs:`593`. - -* :file:`libtiff/tif_lzw.c`: LZW compression code is merged back from the - separate package. All libtiff tools are updated to not advertise an - absence of LZW support. - -* :file:`libtiff/tif_dir.c`: Call :c:func:`TIFFError` instead of producing warnings - when setting custom tags by value. Reported by Eric Fieleke. - - -Tools changes -------------- - -* :program:`tiff2ps`: Avoid zero division in :c:func:`setupPageState` function; - properly initialize array in :c:func:`PSDataBW`. - -* :program:`tiff2pdf`: Multiple bugfixes. - -* :program:`ras2tiff`: Fixed issue with missed big-endian checks as per bug - :bugzilla-rs:`586`. - -* :program:`bmp2tiff`: Added new utility to convert Windows BMP files - into TIFFs. - - -Contributed software changes ----------------------------- - -* No changes. - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/releases/v3.7.0beta2.rst b/third_party/libtiff/doc/releases/v3.7.0beta2.rst deleted file mode 100644 index 832123c..0000000 --- a/third_party/libtiff/doc/releases/v3.7.0beta2.rst +++ /dev/null @@ -1,69 +0,0 @@ -Changes in TIFF v3.7.0beta2 -=========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.0beta2 (:tag:`Release-v3-7-0beta2`) - Previous Version :doc:`v3.7.0beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* The code has been reviewed by Dmitry Levin: added checks - for values, returned by the space allocation functions, fixed - problems with the possible integer overflows. - - -Software configuration changes ------------------------------- - -* Several fixes in the test suite. - - -Library changes ---------------- - -* Preliminary support for BigTIFF files: now libtiff can - recognize and reject to open such images. ;-) - -* :file:`libtiff/tif_dirinfo.c`: changed type of XMLPacket (tag 700) to - :c:enumerator:`TIFF_BYTE` instead of :c:enumerator:`TIFF_UNDEFINED` to comply with the info - in the Adobe XMP Specification. - -* Added many checks for integer overflow and for successful space - allocations in the different parts of library. Code review - completed by Dmitry V. Levin. - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_compress.c`: Added - :c:func:`TIFFGetConfiguredCODECs` function to get the list of configured codecs. - - -Tools changes -------------- - -* :file:`tiff2bw`: Write ``ImageWidth``/``ImageHeight`` tags to output file, as - noted by Gennady Khokhorin. - - -Contributed software changes ----------------------------- - -* No changes. - - -LZW compression kit changes ---------------------------- - -* This one is not longer needed. diff --git a/third_party/libtiff/doc/releases/v3.7.1.rst b/third_party/libtiff/doc/releases/v3.7.1.rst deleted file mode 100644 index bf8bffe..0000000 --- a/third_party/libtiff/doc/releases/v3.7.1.rst +++ /dev/null @@ -1,160 +0,0 @@ -Changes in TIFF v3.7.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.1 (:tag:`Release-v3-7-1`) - Previous Version :doc:`v3.7.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - - -Major changes -------------- - -* This is mostly bugfix release. Most important fix is the one - related to wrong custom tag read/write code. - - -Software configuration changes ------------------------------- - -* :file:`autogen.sh`: :program:`aclocal` and :program:`autoheader` - should be executed after :program:`libtoolize`. - Also add ``-I .`` to aclocal invocation to check - current directory for macros. - -* nmake.opt: Link with the :file:`user32.lib` in windowed mode. As per bug - :bugzilla-rs:`697` - -* :file:`nmake.opt`, :file:`makefile.vc`: make it easier to rename the libtiff DLL. - -* :file:`configure`, :file:`configure.ac`: Added ``--enable-rpath`` option to embed - linker paths into library binary. - - -Library changes ---------------- - -* :file:`tiff.h`: Revert back libtiff data type definitions as per - bug :bugzilla-rs:`687` - -* :file:`tif_dirread.c`: Do not forget about :c:macro:`TIFF_VARIABLE2` when - checking for tag count in :c:func:`TIFFReadDirectory` function. As per bug - :bugzilla-rs:`713` - -* :file:`tif_getimage.c`: Support for multiple-alpha-channelled - RGB-images as per bug - :bugzilla-rs:`718` - -* :file:`tif_getimage.c`: ``#define A1`` bracketing for clean build on - SunPro compiler. - -* :file:`tif_dirwrite.c`: Always write :c:macro:`TIFFTAG_SUBIFD` using ``LONG`` type - as per bugs - :bugzilla-rs:`703` and - :bugzilla-rs:`704`. - -* :file:`tif_win32.c`: Use :c:expr:`char*` strings instead of :c:type:`TCHAR` in windowed - mode as per bug - :bugzilla-rs:`697` - -* :file:`tif_dir.c`, :file:`tif_dirread.c`: Remove :c:func:`TIFFReassignTagToIgnore` - call from the :c:func:`TIFFReadDirectory` function. :c:func:`TIFFReassignTagToIgnore` - must be removed in the future, as it was never used properly. As per - bug :bugzilla-rs:`692` - -* :file:`tif_jpeg.c`: Added a work-around in order to allow - compilation with the heavily modified version of libjpeg delivered - with Cygwin. - -* :file:`tif_dir.c`: Properly handle tags, which have the :c:type:`uint32` - counts. As per bug - :bugzilla-rs:`693` - -* :file:`tif_unix.c`: Make UNIX module compilable (and usable) - on Windows. - -* :file:`tiff.h`: Added Adobe DNG tags. - -* :file:`tif_aux.c`: Set the appropriate ``ReferenceBlackWhite`` array for - YCbCr image which lacks that tag (noted by Hans Petter Selasky). - -* :file:`tif_color.c`: Division by zero fixed (Hans Petter Selasky). - -* :file:`tif_stream.cxx`, :file:`tiffio.h`: Added C++ stream interface - contributed by Edward Lam (see - :bugzilla-rs:`654` - for details). Those who want to use C++ streams should - ``#include ``. - -* :file:`tif_open.c`: Removed :c:func:`close` in :c:func:`TIFFClientOpen` if file - is bad. This is the callers responsibility. - :bugzilla-rs:`651` - -* :file:`tiffio.h`, :file:`tif_win32.c`, :file:`libtiff.def`: Added :c:func:`TIFFOpenW` - function to work with the double byte strings (used to represent - filenames in some locales). As per bug - :bugzilla-rs:`625` - -* :file:`tif_dirread.c`: Fixed problem when fetching ``BitsPerSample`` and - ``Compression`` tags of type ``LONG`` from broken TIFFs as per bug - :bugzilla-rs:`662` - -* :file:`tif_dirinfo.c`: Fixed definition for ``TIFFTAG_RICHTIFFIPTC``, - the writecount should have :c:type:`uint32` type. As per bug - :bugzilla-rs:`662` - -* :file:`tif_write.c`: Fixed wrong ``if()`` statement in - :c:func:`TIFFAppendToStrip` function as per bug - :bugzilla-rs:`660` - -* :file:`tif_dirinfo.c`: Change definition for ``TIFFTAG_EXTRASAMPLES`` - field. The caller should supply a count when setting this field. As - per bug :bugzilla-rs:`648`. - -* :file:`tif_jpeg.c`, :file:`tif_ojpeg.c`: ``TIFFTAG_JPEGTABLES`` should have - uint32 count. Use this type everywhere. - -* :file:`tif_next.c`: avoid use of :c:type:`u_long` and :c:type:`u_char` types. - -* :file:`tif_fax3.c`: Fixed case with the wrong decode routines - choosing when the incorrect ``Group4Options`` tag set. As per bug - :bugzilla-rs:`323` - -* :file:`tif_dirwrite.c`: Fixed problem with passing count variable of - wrong type when writing the :c:macro:`TIFF_BYTE`/:c:macro:`TIFF_SBYTE` tags in - :c:func:`TIFFWriteNormalTag`. - -* :file:`tif_compress.c`: Zero division problem fixed (Vladimir Nadvornik, - Dmitry V. Levin). - - -Tools changes -------------- - -* :file:`fax2ps.c`: Be able to extract the first page (#0). As per bug - :bugzilla-rs:`690` - -* :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Position`` - tags (Tristan Hill). - -* :file:`tiff2ps.c`: Fixed wrong variable data type when read ``Resolution`` - tags (Peter Fales). - -* :file:`tiffset.c`: Check the :c:func:`malloc` return value (Dmitry V. Levin). - - -Contributed software changes ----------------------------- - -* None. diff --git a/third_party/libtiff/doc/releases/v3.7.2.rst b/third_party/libtiff/doc/releases/v3.7.2.rst deleted file mode 100644 index b7369cd..0000000 --- a/third_party/libtiff/doc/releases/v3.7.2.rst +++ /dev/null @@ -1,142 +0,0 @@ -Changes in TIFF v3.7.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.2 (:tag:`Release-v3-7-2`) - Previous Version :doc:`v3.7.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Maintenance release. Many bugfixes in the build environment - and compatibility improvements. - - -Software configuration changes ------------------------------- - -* :file:`configure.ac`: Use ``-rpath`` option instead of ``-R`` as per bug - :bugzilla-rs:`732` - -* :file:`tif_stream.cxx`: Fixes for C++ stream interface from - Michael Rinne and Edward Lam. - -* :file:`configure.ac`: Make the documentation directory location - configurable via the ``--with-docdir`` option (as suggested by - Jeremy C. Reed). - -* Place the C++ stream API in the separate library called - ``libtiffxx`` to avoid unneeded dependencies. Probably there will be - more C++ API in the future. As per bugs - :bugzilla-rs:`733` - and :bugzilla-rs:`730` - -* :file:`configure`, :file:`configure.ac`: Replace ``--disable-c++`` with the - ``--disable-cxx`` option as per bug - :bugzilla-rs:`730`. - - -Library changes ---------------- - -* Applied patch from Lee Howard to support a new tag ``TIFFTAG_FAXDCS`` - (34911) used in HylaFax software. As per bug - :bugzilla-rs:`771` - -* :file:`tif_open.c`: Remove unnecessary :c:func:`TIFFSeekFile` call as per - bug :bugzilla-rs:`756` - -* :file:`tiff.h`: Changed the :c:type:`int8` definition to be always :c:expr:`signed char` - as per bug - :bugzilla-rs:`727` - -* :file:`tiffio.h`: Move :c:func:`TIFFOpenW` function into the ``extern "C"{}`` - block as per bug - :bugzilla-rs:`763` - -* :file:`tif_dirread.c`: Estimate strip size in case of wrong or - suspicious values in the tags. As per bugs - :bugzilla-rs:`705` - and :bugzilla-rs:`320` - -* :file:`tif_color.c`: Use double as the second argument of :c:func:`pow` - function in :c:func:`TIFFCIELabToRGBInit`. As per bug - :bugzilla-rs:`741` - -* :file:`tif_pixarlog.c`: Avoid warnings when converting float to - integer as per bug - :bugzilla-rs:`740` - -* :file:`tif_getimage.c`: Always fill the error message buffer in - :c:func:`TIFFRGBAImageBegin` as per bug - :bugzilla-rs:`739` - -* :file:`tif_jpeg.c`: Added ability to read/write the fax specific - :c:macro:`TIFFTAG_FAXRECVPARAMS`, :c:macro:`TIFFTAG_FAXSUBADDRESS` - and :c:macro:`TIFFTAG_FAXRECVTIME` tags as per bug - :bugzilla-rs:`736` - -* :file:`tif_win32.c`: Fixed message formatting in functions - :c:func:`Win32WarningHandler` and :c:func:`Win32ErrorHandler` as per bug - :bugzilla-rs:`735` - -* :file:`tiffio.h`: Move the color conversion routines in the ``extern - "C"`` section as per bug - :bugzilla-rs:`727` - -* :file:`tiff.h`: Restore back the workaround for AIX Visual Age C - compiler to avoid double definition of BSD types as per bug - :bugzilla-rs:`39` - -* :file:`tif_getimage.c`: More fixes for multiple-alpha-channelled - RGB-images as per bug - :bugzilla-rs:`713` - - -Tools changes -------------- - -* :file:`tiffcmp.c`: Added ability to compare the 32-bit integer and - floating point data; complain on unsupported bit depths. - -* :file:`tiffcmp.c`: Use properly sized buffer in short arrays comparison - as per bug - :bugzilla-rs:`785` - -* :file:`fax2ps.c`: Replace insecure :c:func:`mktemp` function with the - :c:func:`tmpfile` as per bug - :bugzilla-rs:`786` - -* :file:`tiffgt.c`: Fix problem on big-endian CPUs so that images - display more correctly. Images display brighter than they should - on a Sun workstation. - -* :file:`tiff2ps.c`: Fixed problem with page sizes as per bug - :bugzilla-rs:`742` - -* :file:`tiff2ps.c`: Interpret the "``-w``" and "``-h``" options independently. As - per bug - :bugzilla-rs:`689` - -* :file:`tiffdump.c`: Fixed problem when read broken TIFFs with the - wrong tag counts (Dmitry V. Levin, Martin Pitt). - -* :file:`tiffset.c`: Convert character option to integer value as per - bug :bugzilla-rs:`725`. - -Contributed software changes ----------------------------- - -* None. diff --git a/third_party/libtiff/doc/releases/v3.7.3.rst b/third_party/libtiff/doc/releases/v3.7.3.rst deleted file mode 100644 index c558e0d..0000000 --- a/third_party/libtiff/doc/releases/v3.7.3.rst +++ /dev/null @@ -1,169 +0,0 @@ -Changes in TIFF v3.7.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.3 (:tag:`Release-v3-7-3`) - Previous Version :doc:`v3.7.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Replace runtime endianness check with the compile time one. - -* Added support for the new predictor type (floating point - predictor), defined at the TIFF Technical Note 3. - -* Added Support for custom tags, passed by value. - -* Added support for all DNG tags. - - -Software configuration changes ------------------------------- - -* Do not use empty ``-R`` option when linking with ``--enable-rpath``. - -* Added workaround for OpenBSD/MirOS soname problem as per bug - :bugzilla-rs:`838` - -* Fixed parallel compilation of the libtiff and - libtiffxx libraries as per bug - :bugzilla-rs:`826` - -* :file:`configure.ac`, :file:`libtiff/Makefile.am`: Use libtool machinery to pass - ``rpath`` option. - -* :file:`make.opt`: Build with Win32 CRT library by default. - - -Library changes ---------------- - -* :file:`tiffiop.h`, :file:`tif_open.c`: Added open option "``h``" to avoid reading - the first IFD when needed. As per bug - :bugzilla-rs:`875` - -* :file:`tiff.h`: Use correct :c:expr:`int` size on Sparc 64bit/Sun compiler - platform. As per bug - :bugzilla-rs:`855` - -* :file:`tif_dirinfo.c`: Added support for ``ClipPath``, ``XClipPathUnits`` - and ``YClipPathUnits`` tags. - -* :file:`tif_dirinfo.c`, :file:`tif_dir.h`, :file:`tif_dir.c`, :file:`tif_print.c`: Make - ``DocumentName``, ``Artist``, ``HostComputer``, ``ImageDescription``, ``Make``, ``Model``, - ``Copyright``, ``DateTime``, ``PageName``, ``TextureFormat``, ``TextureWrapModes`` and - ``TargetPrinter`` tags custom. - -* :file:`tif_jpeg.c`: Cleanup the codec state depending on :c:macro:`TIFF_CODERSETUP` - flag (to fix memory leaks). - -* :file:`tif_dirwrite.c`: Use :c:member:`tdir_count` when calling - :c:func:`TIFFCvtNativeToIEEEDouble` in the :c:func:`TIFFWriteDoubleArray` function as - per bug :bugzilla-rs:`845` - -* :file:`tif_dirinfo.c`, :file:`tif_print.c`: :c:func:`TIFFFetchByteArray` returns - :c:type:`uint16` array when fetching the ``BYTE`` and ``SBYTE`` fields, so we should - consider result as pointer to :c:type:`uint16` array and not as array of :c:expr:`char`. - As per bug - :bugzilla-rs:`831` - -* :file:`tif_dir.c`: More efficient custom tags retrieval as per bug - :bugzilla-rs:`830` - -* :file:`tif_win32.c`: Use ``FILE_SHARE_READ | FILE_SHARE_WRITE`` share - mode in :c:func:`CreateFile` call as per bug - :bugzilla-rs:`829` - -* :file:`tif_jpeg.c`: Substantial fix for :program:`addtiffo` problems with - JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables - in directory. - -* :file:`tif_dirread.c`: Changed the code that computes - ``stripbytecount[0]`` if it appears bogus to ignore if ``stripoffset[0]`` is - zero. This is a common case with GDAL indicating a "null" tile/strip. - -* :file:`tif_jpeg.c`: added ``LIB_JPEG_MK1`` support in :c:func:`JPEGDecodeRaw`. - -* :file:`tif_dirread.c`: Ensure that broken files with too many - values in :c:func:`TIFFFetchPerSampleShorts`, :c:func:`TIFFFetchPerSampleLongs` and - :c:func:`TIFFFetchPerSampleAnys` work ok instead of crashing. - :bugzilla-rs:`843` - -* :file:`tif_predict.h`, :file:`tif_predict.c`: Added ability to decode and encode - floating point predictor, as per TIFF Technical Note 3. - See http://chriscox.org/TIFF_TN3_Draft2.pdf for details. - -* :file:`tiffio.h`, :file:`tiffiop.h`, :file:`tif_dir.c`, :file:`tif_read.c`, :file:`tif_swab.c`: - Added :c:func:`_TIFFSwab24BitData` and :c:func:`TIFFSwabArrayOfLong` functions used to - swap 24-bit floating point values. - -* :file:`tiff.h`: Added predictor constants. - -* :file:`tiffiop.h`, :file:`tif_dir.c`: Use :c:type:`uint32` type for appropriate values - in :c:func:`_TIFFVSetField` function. Inspired by the bug - :bugzilla-rs:`816` - -* :file:`tif_open.c`: Do not read header in case the output file should - be truncated (Ron). - -* :file:`tif_dirinfo.c`, :file:`tif_config.h`.vc: Use :c:func:`lfind` instead of :c:func:`bsearch` - in :c:func:`_TIFFFindFieldInfoByName` function (Ron). - -* :file:`tif_dir.c`, :file:`tif_print.c`: Properly handle all data types in custom - tags. - -* :file:`dirinfo.c`: Added DNG tags. - -* :file:`tiff.h`: Added missed DNG tag (``LensInfo``); added DNG 1.1.0.0 tags. - -* :file:`tif_dir.c`, :file:`tif_print.c`: Added Support for custom tags, passed - by value. - -* :file:`tiff.h`, :file:`tif_dirinfo.c`, :file:`tiffiop.h`: Added EXIF related tags. - - -Tools changes -------------- - -* :file:`tiff2pdf.c`: Print two characters per loop in the - :c:func:`t2p_write_pdf_trailer`. As per bug - :bugzilla-rs:`594` - -* :file:`tiffgt.c`: Use MacOS X OpenGL framework when appropriate. As - per bug :bugzilla-rs:`844` - -* :file:`ppm2tiff.c`: Fixed format string when read PPM file header with - the :c:func:`fscanf` function. As per bug - :bugzilla-rs:`861` - -* :file:`tiffsplit.c`: Check for ``JPEGTables`` tag presence before copying. - -* :file:`tiff2pdfr.c`: Calculate the tile width properly; added new - option "``-b``" to use interpolation in output PDF files (Bruno Ledoux). - -* :file:`tiffdither.c`: Copy the `PhotometricInterpretation` tag from the - input file. - -* :file:`tif2pdf.c`: Fixed problem with alpha channel handling as per - bug :bugzilla-rs:`794`. - - -Contributed software changes ----------------------------- - -* :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, - :file:`addtiffo/tif_ovrcache.h`: - Make overviews working for contiguous images. diff --git a/third_party/libtiff/doc/releases/v3.7.4.rst b/third_party/libtiff/doc/releases/v3.7.4.rst deleted file mode 100644 index 4ee369a..0000000 --- a/third_party/libtiff/doc/releases/v3.7.4.rst +++ /dev/null @@ -1,84 +0,0 @@ -Changes in TIFF v3.7.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.7.4 (:tag:`Release-v3-7-4`) - Previous Version :doc:`v3.7.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Fixed important bug in custom tags handling code. - - -Software configuration changes ------------------------------- - -* Applied patch from Patrick Welche (all scripts moved in the - :file:`config` and :file:`m4` directories). - -* :file:`SConstruct`, :file:`libtiff/SConstruct`: Added the first very preliminary - support for SCons software building tool (``_). - This is experimental infrastructure and it will exist along with the - autotools stuff. - -* :file:`port/lfind.c`: Added :c:func:`lfind` replacement module. - - -Library changes ---------------- - -* :file:`tif_dir.c`: When prefreeing ``tv->value`` in :c:func:`TIFFSetFieldV` - also set it to :c:macro:`NULL` to avoid double free when re-setting custom - string fields as per: - :bugzilla-rs:`922` - -* tif_dir.c: Fixed up support for swapping "double complex" - values (128 bits as 2 64 bits doubles). GDAL gcore tests now - pass on bigendian (macosx) system. - -* :file:`libtiff/tif_dirread.c`, :file:`libtiff/tif_dirinfo.c`: Do not upcast ``BYTE`` to - ``SHORT`` in the :c:func:`TIFFFetchByteArray`. Remove :c:func:`TIFFFetchExtraSamples` - function, use :c:func:`TIFFFetchNormalTag` instead as per bug - :bugzilla-rs:`831` - - Remove :c:func:`TIFFFetchExtraSamples` function, use :c:func:`TIFFFetchNormalTag` - instead. - -* :file:`tif_print.c`: Fixed printing of the ``BYTE`` and ``SBYTE`` arrays. - -* :file:`tif_write.c`: Do not check the ``PlanarConfiguration`` field in - the :c:func:`TIFFWriteCheck` function in case of single band images (as per - TIFF spec). - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dir.h`, - :file:`libtiff/tif_dirinfo.c`, :file:`libtiff/tif_print.c`: - Make ``FieldOfViewCotangent``, ``MatrixWorldToScreen``, ``MatrixWorldToCamera``, - ``ImageFullWidth``, ``ImageFullLength`` and ``PrimaryChromaticities`` tags custom. - -Tools changes -------------- - -* :file:`tiffcp.c`: Fixed ``WhitePoint`` tag copying. - - -Contributed software changes ----------------------------- - -* :file:`tiffdump.c`: Added support for :c:enumerator:`TIFF_IFD` datatype. - -* :file:`addtiffo/tif_overview.c`, :file:`addtiffo/tif_ovrcache.c`, - :file:`addtiffo/tif_ovrcache.h`: - Make overviews working for contiguous images. diff --git a/third_party/libtiff/doc/releases/v3.8.0.rst b/third_party/libtiff/doc/releases/v3.8.0.rst deleted file mode 100644 index 5ba2728..0000000 --- a/third_party/libtiff/doc/releases/v3.8.0.rst +++ /dev/null @@ -1,140 +0,0 @@ -Changes in TIFF v3.8.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.0 (:tag:`Release-v3-8-0`) - Previous Version :doc:`v3.7.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Read-only support for custom directories (e.g. EXIF directory). - -* Preliminary support for MS MDI format. - - -Software configuration changes ------------------------------- - -* Make the default strip size configurable via the - ``--with-default-strip-size`` and :c:macro:`STRIP_SIZE_DEFAULT` options. - - -Library changes ---------------- - -* :file:`tiffio.h`: Added :c:macro:`VC_EXTRALEAN` definition before including - :file:`windows.h`, to reduce the compile time. - -* :file:`tif_jpeg.c`: Improve compilation under MinGW. - -* :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_dirwrite.c`, - :file:`tif_print.c`, :file:`tif_getimage.c`: Make ``InkSet``, ``NumberOfInks``, ``DotRange`` and - ``StoNits`` tags custom. - -* :file:`tif_aux.c`, :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make - ``WhitePoint`` tag custom. - -* :file:`tiffio.h`: fixed typo that potentially resulted in - redefininition of :c:macro:`USE_WIN32_FILEIO` - -* :file:`tif_dir.c`, :file:`tif_dir.h`, :file:`tif_print.c`: Make ``RichTIFFIPTC``, - ``Photoshop`` and ``ICCProfile`` tags custom. - -* :file:`libtiff/*`, :file:`contrib/*`: Added 'dual-mode' error handling, enabling - newer code to get context indicator in error handler and still - remain compatible with older code: Done :c:func:`TIFFError` calls everywhere - except in tools. - -* :file:`tiffinfo.c`: Print ``EXIF`` directory contents if exist. - -* :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, :file:`tif_dir.c`: - Custom directory read-only support. - -* :file:`tif_aux.c`, :file:`tif_dirinfo.c`, :file:`tif_dirread.c`, :file:`tif_dir.h`, - :file:`tif_dir.c`, :file:`tif_print.c`: Make ``YCbCrCoefficients`` and ``ReferenceBlackWhite`` - tags custom. - -* :file:`tif_dirread.c`: One more workaround for broken ``StripByteCounts`` - tag. Handle the case when ``StripByteCounts`` array filled with - completely wrong values. - -* :file:`tif_dirinfo.c`: Release file descriptor in case of failure - in the :c:func:`TIFFOpenW` function as per bug - :bugzilla-rs:`1003` - -* :file:`tif_dirinfo.c`: Correctly use :c:func:`bsearch` and :c:func:`lfind` - functions as per bug - :bugzilla-rs:`1008` - -* :file:`tif_open.c`, :file:`tiff.h`, :file:`tiffdump.c`: Incorporate preliminary support - for MS MDI format. - :bugzilla-rs:`1002` - -* libtiff.def, :file:`tiffiop.h`, :file:`tiffio.h`: Made :c:func:`TIFFFreeDirectory` - public. - -* :file:`/tif_dirinfo.c`: Make ``XResolution``, ``YResolution`` and - ``ResolutionUnit`` tags modifiable during write process. As per bug - :bugzilla-rs:`977` - -* :file:`if_dirread.c`: Don't try and split single strips into "0" strips - in :c:func:`ChopUpSingleUncompressedStrip`. This happens in some degenerate - cases (like 1×1 files with ``stripbytecounts==0`` (:file:`gtsmall.jp2` embed tiff) - -* :file:`tif_fax3.c`: changed '`at scanline ...`' style warning/errors - with incorrect use of tif_row, to '`at line ... of - strip/tile ...`' style. - - -Tools changes -------------- - -* :file:`tiffcp.c`: Added many error reporting messages; fixed integer - overflow as per bug - :bugzilla-rs:`789` - -* :file:`tiffcp.c`: Return non-zero status when reading fails. - -* :file:`fax2tiff.c`: Properly calculate sizes of temporary arrays - as per bug - :bugzilla-rs:`943` - -* :file:`fax2tiff.c`: Added option `-r` to set RowsPerStrip parameter - as per bug - :bugzilla-rs:`944` - -* :file:`tiffdump.c`: Fixed :c:var:`typeshift` and :c:var:`typemask` arrays initialization - problem as per bug - :bugzilla-rs:`946` - -* :file:`bmp2tiff.c`: Fixed possible integer overflow error as per bug - :bugzilla-rs:`965` - -* :file:`tiffsplit.c`: Copy fax related fields over split parts - as per bug - :bugzilla-rs:`983` - -* :file:`tiffdump.c`: Fixed crash when reading malformed tags. - -* :file:`tiff2pdf.c`: Added missed ``break`` statement as per bug - :bugzilla-rs:`932` - - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo/*`: Major upgrade by Joris to support subsampled - YCbCr images in jpeg compressed TIFF files. diff --git a/third_party/libtiff/doc/releases/v3.8.1.rst b/third_party/libtiff/doc/releases/v3.8.1.rst deleted file mode 100644 index e6bd081..0000000 --- a/third_party/libtiff/doc/releases/v3.8.1.rst +++ /dev/null @@ -1,147 +0,0 @@ -Changes in TIFF v3.8.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.1 (:tag:`Release-v3-8-1`) - Previous Version :doc:`v3.8.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Bug-fix release. - - -Software configuration changes ------------------------------- - -* libtool related stuff updated from the 2.1a branch. - -* Fix ``with_default_strip_size`` comparison as reported by - Norihiko Murase. - - -Library changes ---------------- - -* :file:`tif_dirread.c`: Fixed error reporting in :c:func:`TIFFFetchAnyArray` - function as per bug - :bugzilla-rs:`1102` - -* :file:`tif_jpeg.c`, :file:`tif_pixarlog.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`: - Properly restore ``setfield``/``getfield`` methods in cleanup functions. As - per bug - :bugzilla-rs:`1102` - -* :file:`tif_lzw.c`, :file:`tif_pixarlog.c`, :file:`tif_zip.c`: Use - :c:func:`TIFFPredictorCleanup` in codec cleanup methods. As per bug - :bugzilla-rs:`1102` - -* :file:`tif_predict.c`, :file:`tif_predict.h`: Added new function - :c:func:`TIFFPredictorCleanup` to restore parent decode/encode/field methods. - -* :file:`tif_dirread.c`: Fixed integer overflow condition in - :c:func:`TIFFFetchData` function. As per bug - :bugzilla-rs:`1102` - -* :file:`tif_ojpeg.c`: Set the ``ReferenceBlackWhite`` with the - :c:func:`TIFFSetField` method, not directly. As per bug - :bugzilla-rs:`1043` - -* :file:`tif_write.c`: Small code rearrangement in :c:func:`TIFFWriteScanline` - to avoid crash as per bug - :bugzilla-rs:`1081` - -* :file:`tif_dirwrite.c`: Properly write ``TIFFTAG_DOTRANGE`` tag as per - bug :bugzilla-rs:`1088` - -* :file:`tif_print.c`: Properly read :c:macro:`TIFFTAG_PAGENUMBER`, - :c:macro:`TIFFTAG_HALFTONEHINTS`, :c:macro:`TIFFTAG_YCBCRSUBSAMPLING` - and :c:macro:`TIFFTAG_DOTRANGE` tags as per bug - :bugzilla-rs:`1088` - -* :file:`tif_tile.c`: Fix error reporting in :c:func:`TIFFCheckTile` as per - bug :bugzilla-rs:`1063` - -* :file:`tif_color.c`: Avoid overflow in case of wrong input as per - bug :bugzilla-rs:`1065` - -* :file:`tif_dirinfo.c`: Use :c:enumerator:`TIFF_NOTYPE` instead of 0 when - appropriate. As per bug - :bugzilla-rs:`1033` - -* :file:`tif_aux.c`: Fixed type of temporary variable in - :c:func:`_TIFFCheckMalloc` as per bug - :bugzilla-rs:`103` - -* :file:`tif_aux.c`: Return static array when fetching default - ``YCbCrCoefficients`` (another problem, reported a the - :bugzilla-rs:`1029` - entry). - -* :file:`tif_dir.c`: Special handling for ``PageNumber``, ``HalftoneHints``, - ``YCbCrSubsampling`` and ``DotRange`` tags as per bugs - :bugzilla-rs:`1029` - :bugzilla-rs:`1034` - -* :file:`tif_dirread.c`: Use :c:func:`_TIFFGetExifFieldInfo` instead of - :c:func:`_TIFFGetFieldInfo` in :c:func:`TIFFReadEXIFDirectory` call as per bug - :bugzilla-rs:`1026` - -* :file:`tif_dirinfo.c`: Change definitions for :c:macro:`TIFFTAG_ICCPROFILE`, - :c:macro:`TIFFTAG_PHOTOSHOP`, :c:macro:`TIFFTAG_RICHTIFFIPTC`, - :c:macro:`TIFFTAG_XMLPACKET`: readcount should be :c:type:`uint32` value. - - -Tools changes -------------- - -* :file:`ppm2tiff.c`: Added support for PBM files as per bug - :bugzilla-rs:`1044` - -* :file:`tiff2pdf.c`: Functions :c:func:`t2p_sample_rgbaa_to_rgb` and - :c:func:`t2p_sample_rgba_to_rgb` was used in place of each other, that was - resulted in problems with RGBA images with associated alpha. - As per bug - :bugzilla-rs:`1097` - -* :file:`tiff2ps.c`: Properly scale all the pages when converting - multipage TIFF with /width/height/center options set. As per bug - :bugzilla-rs:`1080` - -* :file:`tiff2pdf.c`: Do not create output file until all option checks - will be done. As per bug - :bugzilla-rs:`1072` - -* :file:`bmp2tiff.c`: Added ability to create multipage TIFFs from the - list of input files as per bug - :bugzilla-rs:`1077` - -* :file:`tiffgt.c`: Avoid crashing in case of image unsupported by - TIFFRGBAImage interface. - -* :file:`tiff2pdf.c`: Fixed support for non-YCbCr encoded JPEG - compressed TIFF files, per submission from Dan Cobra. - -* :program:`bmp2tiff`, :program:`pal2rgb`, :program:`ppm2tiff`, :program:`ras2tiff`, - :program:`raw2tiff`, :program:`sgi2tiff`, :program:`tiff2bw`, :program:`tiffcp`: - Fixed jpeg option processing so ``-c jpeg:r:50`` works - properly as per bug: - :bugzilla-rs:`1025` - -Contributed software changes ----------------------------- - -None. diff --git a/third_party/libtiff/doc/releases/v3.8.2.rst b/third_party/libtiff/doc/releases/v3.8.2.rst deleted file mode 100644 index ef33685..0000000 --- a/third_party/libtiff/doc/releases/v3.8.2.rst +++ /dev/null @@ -1,76 +0,0 @@ -Changes in TIFF v3.8.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.8.2 (:tag:`Release-v3-8-2`) - Previous Version :doc:`v3.8.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* Bug-fix release. - - -Software configuration changes ------------------------------- - -* :file:`tools/Makefile.am`: Use runtime paths linker flags when rpath - option enabled. - -* Makefiles improvements as per bug :bugzilla-rs:`1128` - -* Fixed win32 I/O functions usage as per bug :bugzilla-rs:`1127` - - -Library changes ---------------- - -* :file:`tif_strip.c`: Take subsampling in account when calculating - :c:func:`TIFFScanlineSize`. - -* :file:`tif_jpeg.c`, :file:`tif_fax3.c`, :file:`tif_zip.c`, :file:`tif_pixarlog.c`, - :file:`tif_lzw.c`, :file:`tif_luv.c`: Use :c:func:`_TIFFSetDefaultCompressionState` in all - codec cleanup methods. As per bug :bugzilla-rs:`1120` - -* :file:`tif_jpeg.c`: Do not cleanup codec state in :c:func:`TIFFInitJPEG`. As - per bug :bugzilla-rs:`1119` - -* :file:`tif_dir.c`: Use :c:expr:`double` type instead of :c:type:`dblparam_t`. - -* :file:`tif_dirread.c`: Do not check the ``PlanarConfig`` tag presence - in :c:func:`TIFFReadDirectory`, because it is always set at the start of - function and we allow TIFFs without that tag set. - - -Tools changes -------------- - -* :file:`tiffcp.c`: Do not set ``RowsPerStrip`` bigger than image length. - -* :file:`fax2tiff.c`: Fixed wrong :c:func:`TIFFerror` invocations as per bug - :bugzilla-rs:`1125` - -* :file:`fax2ps.c`: Fixed reading the input stream from stdin as per bug - :bugzilla-rs:`1124` - -* :file:`raw2tiff.c`: Do not set ``RowsPerStrip`` larger than ``ImageLength``. - As per bug :bugzilla-rs:`1110` - - -Contributed software changes ----------------------------- - -None. diff --git a/third_party/libtiff/doc/releases/v3.9.0.rst b/third_party/libtiff/doc/releases/v3.9.0.rst deleted file mode 100644 index e256199..0000000 --- a/third_party/libtiff/doc/releases/v3.9.0.rst +++ /dev/null @@ -1,203 +0,0 @@ -Changes in TIFF v3.9.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.0 (:tag:`Release-v3-9-0`) - Previous Version :doc:`v3.9.0beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* All of the major changes since 3.8.0 were incorporated in - the v3.9.0beta release. This is a stable release from a - stable maintenance branch which incorporates many bug and - security fixes needed by existing users of 3.X.X series - libraries. Any future major changes will be in the 4.0.X - series of releases. - - -Software configuration changes ------------------------------- - -* Updated autotools: Autoconf 2.64, Automake 1.11, libtool - 2.2.6. - -* Enabled support for Automake silent build rules - (``--enable-silent-rules`` or ``make V=0``) - -* Enabled support for Automake colorized tests. - -* Added detection of a 64-bit integer type so that bundled - utilities (like :program:`tiffcrop`) can use it when necessary. Note - that this version of libtiff does not require a 64-bit integer - type but libtiff 4.0 does. - - -Library changes ---------------- - -* :file:`libtiff/Makefile.am`, :file:`libtiff/Makefile.v`: Do not distribute - :file:`tiffconf.h`, remove :file:`tif_config.h`/:file:`tiffconf.h` during cleaning. As - per bug :bugzilla-rs:`1573` - -* :file:`tif_dirinfo.c`: :c:func:`_TIFFMergeFields()` now only merges in - field definitions that are missing. Existing definitions are - silently ignored. (:bugzilla-rs:`1585`) - -* :file:`tif_write.c`: Rip out the fancy logic in - :c:func:`TIFFAppendToStrip` for establishing if an existing tile can - be rewritten to the same location by comparing the current - size to all the other blocks in the same directory. This is - dangerous in many situations and can easily corrupt a file. - (observed in esoteric GDAL situation that's hard to document). - This change involves leaving the :c:expr:`stripbytecount[]` values - unaltered till :c:func:`TIFFAppendToStrip`. Now we only write a block - back to the same location it used to be at if the new data is - the same size or smaller - otherwise we move it to the end of - file. - -* :file:`tif_dirwrite.c`: Try to avoid writing out a full - readbuffer of tile data when writing the directory just - because we have :c:macro:`TIFF_BEENWRITING` at some point in the past. This - was causing odd junk to be written out in a tile of data when - a single tile had an interleaving of reading and writing with - reading last. (highlighted by gdal - :file:`autotest/gcore/tif_write.py` test 7.) - -* :file:`tif_predict.c`: use working buffer in :c:func:`PredictorEncodeTile` - to avoid modifying callers buffer. - :gdal-trac:`1965` - -* :file:`tif_predict.c`, :file:`tif_predict.h`, :file:`tif_lzw.c`, :file:`tif_zip.c`: Improvements so - that predictor based encoding and decoding works in read-write - update mode properly. - :gdal-trac:`1948` - -* :file:`configure.com`, :file:`libtiff/tif_vms.c`: Better OpenVMS - support. Patches from Alexey Chupahin. - -* :file:`tif_fax3.c`: fix leak of ``FAXCS`` state (per bug :bugzilla-rs:`1603`). - -* :file:`tif_fax3.c`: Make :c:func:`find0span` and :c:func:`find1span` non-inline - to make MSVC 6.0 compiler happy. - -* :file:`tif_codec.c`: Avoid :c:macro:`NULL` pointer dereferencing for exotic - compression codec codes. - -* :file:`tif_dirread.c`: zero ``tif->tif_dir`` after freeing the - directory in :c:func:`TIFFReadCustomDirectory`. I don't exactly - remember why this was important. - -* :file:`tif_dirwrite.c`: Fix potential memory leak writing large - double tags. - -* :file:`tif_dirread.c`: Fix unchecked :c:func:`malloc` result. - -* :file:`libtiff/tif_lzw.c`: Properly zero out the codetable. As - per bug :bugzilla:`1929` - -* :file:`libtiff/tif_lzw.c`: Properly zero out the string - table. Fixes :cve:`2008-2327` security issue. - -* :file:`libtiff/tif_jbig.c`: Support the JBIG-KIT 2.0 - (compatibility with the older versions retained). - -* :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: removed all use of - ``UaToAa`` and ``Bitmap16to8`` arrays in :c:struct:`TIFFRGBAImage` structure to - restore ABI compatibility. These were just an attempt to - speed up processing with precalculated tables. - :bugzilla:`1979` - -* :file:`libtiff/tif_codec.c`: Avoid printing ``c->name`` if it does not exist. - -* :file:`libtiff/tif_getimage.c`, :file:`tiffio.h`: More ABI corrections. - Removed ``SubsamplingHor/Ver`` from :c:struct:`TIFFRGBAImage` structure. - :bugzilla:`1980` - -* :file:`libtiff/tif_jpeg.c`: Avoid errors if the application - writes a full strip for the last partial strip in a jpeg - compressed file. :bugzilla:`1981` - -* :file:`libtiff/tiffio.h`: GCC will now validate format - specifications for :c:func:`TIFFError`, :c:func:`TIFFErrorExt`, :c:func:`TIFFWarning`, - and :c:func:`TIFFWarningExt` in order to reveal bugs. Cleaned up - resulting warnings throughout for 32 bit build only. - -* :file:`libtiff/tiffiop.h`: Add private type declarations for - :c:type:`int64`, and :c:type:`uint64` so that bundled utilities (like :program:`tiffcrop`) - can use it when necessary. - -* :file:`libtiff/tif_predict.c`: Add support for 32bit integer - horz. predictors. - :bugzilla:`1911` - -* :file:`libtiff/tif_luv.c`: Fix handling of tiled logluv images. - :bugzilla:`2005` - -* :file:`libtiff/tif_write.c`: do not override the planar - configuration to be contig for one sample files if planar - configuration is already set. - :bugzilla:`2057` - -* :file:`libtiff/tif_lzw.c`: Fix buffer underflow bug. - :bugzilla:`2065` - -* :file:`libtiff/tif_luv.c`: correct return codes from ``encoderow`` to - be 1 on success instead of zero. - :bugzilla:`2069` - -* :file:`libtiff/tif_print.c` (:c:func:`TIFFPrintDirectory`): Applied patch - for "tag error may cause segfault in tif_print.c." - :bugzilla:`1896` - - -Tools changes -------------- - -* :file:`tools/tiff2pdf.c`: Fixed setting of alpha value per report - on list. - -* :file:`tools/tiffsplit.c`: Get rid of unsafe :c:func:`strcpy`/:c:func:`strcat` - calls when doing the filename/path construction. - -* :file:`tools/tiff2pdf.c`: More appropriate format string in - :c:func:`t2p_write_pdf_string`; avoid signed/unsigned mismatch. - -* :file:`tools/tiffsplit.c`: Use dynamically allocated array - instead of static when constructing output file names. - -* :file:`tools/tiffcrop.c`, :file:`man/tiffcrop.1`: Incorporated - significant functionality update from Richard Nolde. - -* :file:`tools/tiff2ps.c`: Incorporated significant functionality - update from Richard Nolde. In particular, support for - rotating the image by 90, 180, 270, and 'auto' has been added. - -* :file:`tools/tiff2ps.c`: Remove spurious message printed to - ``stderr``. - -* :file:`tools/tiffsplit.c`: fix ``sampleformat`` to be :c:type:`shortv` instead - of :c:type:`longv`. - -* :file:`tools/rgb2ycbcr.c`, :file:`tools/tiff2rgba.c`: Applied patch for - :cve:`2009-2347` libtiff: integer overflows in various - inter-color space conversion tools. - :bugzilla:`2079` - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v3.9.0beta.rst b/third_party/libtiff/doc/releases/v3.9.0beta.rst deleted file mode 100644 index 932097d..0000000 --- a/third_party/libtiff/doc/releases/v3.9.0beta.rst +++ /dev/null @@ -1,225 +0,0 @@ -Changes in TIFF v3.9.0beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.0beta (:tag:`Release-v3-9-0beta`) - Previous Version :doc:`v3.8.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). -If you don't find something listed here, then it was not done in this -timeframe, or it was not considered important enough to be mentioned. -The following information is located here: - -Major changes -------------- - -* New :program:`tiffcrop` utility contributed by Richard Nolde. - :program:`tiffcrop` does the same as :program:`tiffcp`, but also can crop, - extract, rotate and mirror images. - -* :file:`tif_jbig.c`: Added support for JBIG compression scheme - (34661 code), contributed by Lee Howard. - -* Totally new implementation of OJPEG module from - Joris Van Damme. No need to patch libjpeg anymore. Many OJPEG files - should be supported now that was not supported previously. - -Software configuration changes ------------------------------- - -* :file:`tif_config.wince.h`, :file:`tiffconf.wince.h`, :file:`tif_wince.c`: WinCE-specific - compatibility stuff from Mateusz Loskot. - -* Rename :file:`config.h.vc` and :file:`tif_config.h.vc` to :file:`config.vc.h` and - :file:`tif_config.vc.h` for easier identification by folks using an IDE. - -* :file:`configure`, :file:`configure.ac`: OJPEG support enabled by default (i.e., - when conformant JPEG support is enabled). - -* :file:`README.vms`, :file:`Makefile.am`, :file:`configure.com`, :file:`libtiff/Makefile.am`, - :file:`libtiff/tif_config.h-vms`, :file:`libtiff/tif_stream.cxx`, - :file:`libtiff/tif_vms.c`, :file:`libtiff/tiffconf.h-vms`: - Added support for OpenVMS by Alexey Chupahin. - -* :file:`nmake.opt`: use ``/EHsc`` for VS2005 compatibility. Also define - :c:macro:`_CRT_SECURE_NO_DEPRECATE` to avoid noise on VS2005. - - -Library changes ---------------- - -* :file:`tif_dirinfo.c` (:c:func:`_TIFFFindFieldInfo`): Don't attempt to - :c:func:`bsearch` on a :c:macro:`NULL` fieldinfo list. - (:c:func:`_TIFFFindFieldInfoByName`): Don't attempt to :c:func:`lfind` on a :c:macro:`NULL` - fieldinfo list. - -* :file:`tif_jpeg.c`: Changed :c:func:`JPEGInitializeLibJPEG` so that it - will convert from decompressor to compressor or compress to decompress - if required by the force arguments. This works around a problem in - where the :c:func:`JPEGFixupTestSubsampling` may cause a decompressor to - be setup on a directory when later a compressor is required with the - force flag set. Occurs with the :program:`addtiffo` program for instance. - -* :file:`tif_dirwrite.c`: Fixed swapping of byte arrays stored - in-place in tag offsets as per bug - :bugzilla-rs:`1363` - -* :file:`tif_getimage.c`: workaround for "Fractional scanline" error - reading OJPEG images with rowsperstrip that is not a multiple of - vertical subsampling factor. This bug is mentioned in - :bugzilla-rs:`1390` and - ``_ - -* :file:`tif_dirread.c`: Added special function to handle - ``SubjectDistance`` EXIF tag as per bug - :bugzilla-rs:`1362` - -* :file:`tif_dirread.c`, :file:`tif_read.c`: Type of the byte counters - changed from :c:type:`tsize_t` to :c:type:`uint32` to be able to work with data arrays - larger than 2GB. Fixes bug - :bugzilla-rs:`890`. - Idea submitted by Matt Hancher. - -* :file:`tif_dir.c`: Workaround for incorrect TIFFs with - ``ExtraSamples == 999`` produced by Corel Draw. As per bug - :bugzilla-rs:`1490` - -* :file:`tif_write.c`: :c:func:`TIFFAppendToStrip` - clear sorted flag if - we move a strip. - :bugzilla-rs:`1359` - -* :file:`tif_fax3.c`: Save the state of printdir codec dependent method. - -* :file:`tif_jpeg.c`: Save the state of printdir codec dependent method - as per bug - :bugzilla-rs:`1273` - -* :file:`tif_win32.c`: Fixed problem with offset value manipulation - as per bug - :bugzilla-rs:`1322` - -* :file:`tif_fax3.c`, :file:`tif_next.c`, :file:`tif_pixarlog.c`: Fixed multiple - vulnerabilities, as per Gentoo bug (): - ``_ - -* :file:`tif_lzw.c`, :file:`tif_zip.c`: Fixed problems with mixing - encoding and decoding on the same read-write TIFF handle. The LZW - code can now maintain encode and decode state at the same time. The - ZIP code will switch back and forth as needed. - :bugzilla-rs:`757` - -* :file:`tif_msdos.c`: Avoid handle leak for failed opens. - c/o Thierry Pierron - -* :file:`tif_dirwrite.c`: take care not to flush out buffer of strip/tile - data in :c:func:`_TIFFWriteDirectory` if :c:macro:`TIFF_BEENWRITING` not set. Relates - to bug report by Peng Gao with black strip at bottom of images. - -* :file:`tif_dirwrite.c`: make sure to use :c:type:`uint32` for wordcount in - :c:func:`TIFFWriteNormalTag` if ``writecount`` is :c:macro:`VARIABLE2` for ASCII fields. - It already seems to have been done for other field types. Needed - for :program:`tiffset` on files with geotiff ascii text. - -* :file:`tif_dirinfo.c`: Added missed EXIF tag ``ColorSpace`` (40961). - -* :file:`tif_dirread.c`: Move IFD fetching code in the separate - function :c:func:`TIFFFetchDirectory` avoiding code duplication in - :c:func:`TIFFReadDirectory` and :c:func:`TIFFReadCustomDirectory`. - -* :file:`tif_readdir.c`: Added case in :c:func:`EstimateStripByteCounts` for tiled - files. Modified :c:func:`TIFFReadDirectory` to not invoke - :c:func:`EstimateStripByteCounts` for case where entry 0 and 1 are unequal but - one of them is zero. - :bugzilla-rs:`1204` - -* :file:`tif_open.c`, :file:`tif_dirread.c`, :file:`tiffiop.h`: Move IFD looping - checking code in the separate function :c:func:`TIFFCheckDirOffset`. - -* :file:`tif_aux.c`: Added :c:func:`_TIFFCheckRealloc` function. - -* :file:`tif_fax3.c`: Fixed problems in fax decoder as per bug - :bugzilla-rs:`1194` - -* :file:`tif_jbig.c`: Added support for JBIG compression scheme - (34661 code) contributed by Lee Howard. As per bug - :bugzilla-rs:`896`. - -* :file:`tif_getimage.c`: Added support for planarconfig separate - non-subsampled YCbCr (i.e. separate YCbCr with subsampling ``[1,1]``). - -* :file:`tif_getimage.c`: Revision of all RGB(A) put routines: - - * Conversion of unassociated alpha to associated alpha - now done with more performant LUT, and calculation more - correct. - * Conversion of 16bit data to 8bit data now done with - more performant LUT, and calculation more correct - * Bugfix of handling of 16bit RGB with unassociated alpha - -* :file:`tif_ojpeg.c`: totally new implementation - -* :file:`tif_getimage.c`: removed :c:macro:`TIFFTAG_JPEGCOLORMODE` handling - of OJPEG images in favor of tif_getimage.c native handling of - YCbCr and desubsampling. - -* :file:`tif_jpeg.c`: :c:func:`JPEGVSetField` so that altering the photometric - interpretation causes the "upsampled" flag to be recomputed. Fixes - peculiar bug where photometric flag had to be set before jpegcolormode - flag. - -Tools changes -------------- - -* :file:`tiff2ps.c`: Added support 16-bit images as per bug - :bugzilla-rs:`1566`. - Patch from William Bader. - -* :file:`tiff2pdf.c`: Fix for :c:macro:`TIFFTAG_JPEGTABLES` tag fetching and - significant upgrade of the whole utility as per bug - :bugzilla-rs:`1560`. - Now we don't need :file:`tiffiop.h` in :program:`tiff2pdf` anymore and will open output - PDF file using :c:func:`TIFFClientOpen` machinery as it is implemented - by Leon Bottou. - -* :file:`tiffcrop.c`: New tiffcrop utility contributed - by Richard Nolde. As per bug - :bugzilla-rs:`1383` - -* :file:`tiff2pdf.c`: Do not assume inches when the resolution units - do not specified. As per bug - :bugzilla-rs:`1366` - -* :file:`tiffset.c`: Properly handle tags with :c:macro:`TIFF_VARIABLE` writecount. - As per bug - :bugzilla-rs:`1350` - -* :file:`tif2rgba.c`: This utility does not work properly on big-endian - architectures. It was fixed including the bug - :bugzilla-rs:`1149` - -* :file:`tiff2pdf.c`: Fix handling of ``-q`` values. - :bugzilla-rs:`587` - -* :file:`tiffcmp.c`: Fixed floating point comparison logic as per bug - :bugzilla-rs:`1191` - -* :file:`tiff2pdf.c`: Fixed buffer overflow condition in - :c:func:`t2p_write_pdf_string` as per bug - :bugzilla-rs:`1196` - -Contributed software changes ----------------------------- - -* :file:`contrib/addtiffo/tif_overview.c`: Fix problems with odd sized - output blocks in :c:func:`TIFF_DownSample_Subsampled` - (:bugzilla-rs:`1542`). - -* :file:`contrib/dbs/xtiff/xtiff.c`: Make xtiff utility compilable. - Though it is still far from the state of being working and useful. diff --git a/third_party/libtiff/doc/releases/v3.9.1.rst b/third_party/libtiff/doc/releases/v3.9.1.rst deleted file mode 100644 index 24a3709..0000000 --- a/third_party/libtiff/doc/releases/v3.9.1.rst +++ /dev/null @@ -1,63 +0,0 @@ -Changes in TIFF v3.9.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.1 (:tag:`Release-v3-9-1`) - Previous Version :doc:`v3.9.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* This is a bug-fix release for several bugs (two of which - are dire) which were discovered in the 3.9.0 release. - - -Software configuration changes ------------------------------- - -* Several defines were missing from :file:`tif_config.vc.h` which - are necessary to compile the library using MSVC. - -* Colorized tests were actually not enabled as expected. - Parallel tests mode is now also enabled so that tests can be - run in parallel, and test output is sent to :file:`.log` files. - - -Library changes ---------------- - -* :file:`libtiff/tif_write.c` (:c:func:`TIFFAppendToStrip`): Remove cast - which caused libtiff to output a wrong last strip with - byte-count and strip-offset of zero. This cast was added on - the day of the 3.9.0 release. - -* :file:`libtiff/tif_dirwrite.c`: Back out changes from 2007-11-22 - that resulted in the final strip not being written in some - circumstances. - :bugzilla:`2088` - - -Tools changes -------------- - -None - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v3.9.2.rst b/third_party/libtiff/doc/releases/v3.9.2.rst deleted file mode 100644 index 961a27a..0000000 --- a/third_party/libtiff/doc/releases/v3.9.2.rst +++ /dev/null @@ -1,67 +0,0 @@ -Changes in TIFF v3.9.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.2 (:tag:`Release-v3-9-2`) - Previous Version :doc:`v3.9.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Fixes a number of bugs present in the 3.9.1 release. - -* OJPEG support updated to work with IJG JPEG 7 release. - -* :program:`tiffcrop` validated for most TIFF storage subformats and sample depths. - - -Software configuration changes ------------------------------- - -* x86_64 now uses the same default fill order as i386. - - -Library changes ---------------- - -* Writing tags with an array value of type :c:enumerator:`TIFF_DOUBLE` now - returns correct error status. The :c:macro:`TIFFTAG_SMINSAMPLEVALUE` and - :c:macro:`TIFFTAG_SMAXSAMPLEVALUE` tags failed to write without this fix. - -* OJPEG decoder now works with IJG JPEG 7. Resolves "Bug - 2090 - OJPEG crash with libjpeg v7". - :bugzilla:`2090` - -* Eliminate most GCC "dereferencing type-punned pointer" - warnings. - - -Tools changes -------------- - -* New :program:`tiffcrop` from Richard Nolde. Major updates to add - significant functionality for reading and writing tile based - images with bit depths not a multiple of 8 which cannot be - handled by :program:`tiffcp`. - -* Allow building tools with GCC using the ``-Wformat - -Werror=format-security`` flags. - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v3.9.3.rst b/third_party/libtiff/doc/releases/v3.9.3.rst deleted file mode 100644 index 0712788..0000000 --- a/third_party/libtiff/doc/releases/v3.9.3.rst +++ /dev/null @@ -1,105 +0,0 @@ -Changes in TIFF v3.9.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.3 (:tag:`Release-v3-9-3`) - Previous Version :doc:`v3.9.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Fixes for :cve:`2010-1411`. - -* Various reported bug fixes. - - -Software configuration changes ------------------------------- - -* libtool is updated to version 2.2.10. - - -Library changes ---------------- - -* Fix a couple of issues that trigger failures in some - cases when using :c:func:`TIFFReadScanline` with JPEG compressed - subsampled ycbcr images. - :bugzilla:`1936` - -* Ensure tile and scanline sizes are reset when moving to - new directories. - :bugzilla:`1936` - -* Do not generate a ``JPEGTables`` tag when creating the JPEG - TIFF as is is not required in order to prevent it from being - unused and filled with invalid data. (Leave it to be - generated by later activity.) - :bugzilla:`2135` - -* Don't return error on badly-terminated MMR strips. - :bugzilla:`2029` - -* Have :c:macro:`TIFFTAG_REFERENCEBLACKWHITE` always print 6 floats - instead of ``2*SamplesPerPixel``. - :bugzilla:`2186` - -* Ensure that JPEG quality is always set in - :c:func:`JPEGPreEncode`, not just when we want to output local tables. - Otherwise the quality used during compression may not be right - and might not match the tables in the tables tag. This bug - only occurs when seeking between directories in the midst of - writing blocks. :gdal-trac:`3539` - -* OJPEG: Report an error and avoid a crash if the input - file is so broken that the strip offsets are not defined. - -* Eliminate FAX3 decoder buffer overrun possibility - (:cve:`2010-1411`). - -* Restore ``ReferenceBlackWhite`` as a non-custom field. This - avoids a multi-thread reentrancy problem as well as fixing - output of wrong tag value due to redundant definitions for the - same tag in the :c:expr:`tiffFieldInfo[]` array. Resolves - :bugzilla:`2185` - -Tools changes -------------- - -* :program:`tiff2pdf`: Write the JPEG SOI headers into the TIFF strip - data rather than skipping them. This fixes the ability to view in - Acrobat Reader, Evince, and Ghostscript. - :bugzilla:`2135` - -* :program:`ppm2tiff`: While case for parsing comment line - requires extra parenthesis to work as expected. Reported by - Thomas Sinclair. - -* :program:`tiffcp`: add a new option ``-x`` to force merged tiff - file ``PAGENUMBER`` value in sequence for users who care the page - sequence, this will also prevent :program:`tiff2pdf` from creating pdf file from - the merged tiff file with wrong page sequence. - -* :program:`tiffcp`: Applied Tom Lane's patch to reject YCbCr - subsampled data since :program:`tiffcp` currently doesn't support it. - :bugzilla:`2097` - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v3.9.4.rst b/third_party/libtiff/doc/releases/v3.9.4.rst deleted file mode 100644 index f95bb7e..0000000 --- a/third_party/libtiff/doc/releases/v3.9.4.rst +++ /dev/null @@ -1,69 +0,0 @@ -Changes in TIFF v3.9.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.4 (:tag:`Release-v3-9-4`) - Previous Version :doc:`v3.9.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Complete the fixes for :cve:`2009-2347`. - -* :program:`tiffcrop` now supports custom page sizes. - - -Software configuration changes ------------------------------- - -* None. - - -Library changes ---------------- - -* Fixed inadequate validation of the ``SubjectDistance`` field. - -* Fixed bad handling of out of order tags definated late by a codec. - -* Avoid re-preparing jpeg tables unnecessarily. - - -Tools changes -------------- - -* :program:`tiffcrop`: Added an option to allow the user to specify a - custom page size on the command line. Fix the case where a - page size specified with a fractional part was being coerced - to an integer by retyping the variables that define the paper - size. Corrected European page size dimensions. - -* :program:`tiff2rgba`: Completed fixes for ":cve:`2009-2347` libtiff: - integer overflows in various inter-color space conversion - tools". :bugzilla:`2079` - -* :program:`tiff2pdf`: Fix assorted bugs in :program:`tiff2pdf`: missing ``return`` - in :c:func:`t2p_read_tiff_size` causes ``t2p->tiff_datasize`` to be set entirely - wrong for :c:macro:`COMPRESSION_JPEG` case, resulting in memory stomp if actual - size is larger. Also, there are a bunch of places that try to - :c:func:`memset` a malloc'd buffer before checking for malloc failure, which - would result in core dump if there actually were a failure. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v3.9.5.rst b/third_party/libtiff/doc/releases/v3.9.5.rst deleted file mode 100644 index 1246deb..0000000 --- a/third_party/libtiff/doc/releases/v3.9.5.rst +++ /dev/null @@ -1,217 +0,0 @@ -Changes in TIFF v3.9.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v3.9.5 (:tag:`Release-v3-9-5`) - Previous Version :doc:`v3.9.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :file:`configure.ac`: Should use ``AC_CANONICAL_HOST`` since host specifies - the run-time target whereas target is used to specify the final - output target if the package is a build tool (like a compiler), - which libtiff is not. Resolves :bugzilla:`2307` "Use - AC_CANONICAL_HOST macro". - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`: Check the number of samples per pixel when - working with YCbCr image in :c:func:`PickContigCase`. As per bug - :bugzilla:`2216` - -* :file:`libtiff/tif_dir.c`: Set the bogus post-decoding hook when processing - :c:macro:`TIFFTAG_BITSPERSAMPLE` in :c:func:`_TIFFVSetField` for the case of 8 bit when - we don't need any post-processing. That helps to reset the hook if we - previously set this field to some other value and the hook was - initialized accordingly. As per bug - :bugzilla:`2035` - -* :file:`libtiff/tif_getimage.c`: Avoid wrong math du to the signed/unsigned - integer type conversions. As per bug - :bugzilla:`2207` - -* :file:`libtiff/tif_dirinfo.c`: Don't use assertions in :c:func:`_TIFFFieldWithTag` - and :c:func:`_TIFFFieldWithName` if the tag is not found in the tag table. - This should be normal situation and returned :c:macro:`NULL` value should be - properly handled by the caller. - -* :file:`libtiff/{tif_dirwrite.c, tif_print.c}`: Properly handle ``DotRange`` - tag as it can be either byte or short size and should be set and read - by value, not as an array. As per bug - :bugzilla:`2116` - -* :file:`libtiff/tif_dirread.c`: Really reset the tag count in :c:func:`CheckDirCount` - to expected value as the warning message suggests. As per bug - :bugzilla:`1963` - -* :file:`libtiff/tif_open.c`: Fix mode check before opening a file. - :bugzilla:`1906` - -* :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_strip.c`: apply patch for - :cve:`2010-3087` per bug - :bugzilla:`2140` - -* :file:`libtiff/tif_dirread.c`: fix crash when reading a badly-constructed - TIFF per :bugzilla:`1994` - -* :file:`libtiff/tif_ojpeg.c`: fix buffer overflow on problem data - :bugzilla:`1999` - -* :file:`libtiff/tif_dirread.c`: modify warnings - :bugzilla:`2016` - -* :file:`libtiff/tif_jpeg.c`: fix use of clumplines calculation - :bugzilla:`2149` - -* :file:`libtiff/tif_color.c`: prevent crash in handling bad TIFFs - resolves :cve:`2010-2595`, - :bugzilla:`2208` - -* :file:`libtiff/tif_dirread.c`: fix needless tag ordering warning - :bugzilla:`2210` - -* :file:`libtiff/tif_jpeg.c`: reduce usage of ``JCS_UNKNOWN`` in order - to improve compatibility with various viewers - submitted by e-mail from `Dwight Kelly `_ - -* :file:`libtiff/tif_strip.c`: use :c:func:`TIFFGetFieldDefaulted` instead - of :c:func:`TIFFGetField` when we assume that it will succeed - :bugzilla:`2215` - -* :file:`libtiff/tif_dirread.c`: tolerate some cases where - ``FIELD_COLORMAP`` is missing - :bugzilla:`2189` - -* :file:`libtiff/tif_jpeg.c`: Fix regressions with 2 and 3 band images - caused by commit on 2010-12-14. Submitted by e-mail from - `Even Rouault `_ - -* :file:`libtiff/tif_dirwrite.c`: Avoid undefined behaviour when casting from - :c:expr:`float` to :c:expr:`unsigned int` in :c:func:`TIFFWriteRationalArray` as reported by - Kareem Shehata. - -* :file:`libtiff/tif_fax3.h`: Protect against a fax ``VL(n)`` codeword commanding - a move left. Without this, a malicious input file can generate an - indefinitely large series of runs without ``a0`` ever reaching the right - margin, thus overrunning our buffer of run lengths. Per :cve:`2011-0192`. - This is a modified version of a patch proposed by Drew Yao of Apple - Product Security. It adds an :c:func:`unexpected` report, and disallows the - equality case, since emitting a run without increasing ``a0`` still allows - buffer overrun. - -* :file:`libtiff/tif_fax3.h`: Fix to last change allowing zero length - runs at the start of a scanline---needed for legal cases. - -* :file:`libtiff/tif_thunder.c`: Correct potential buffer overflow with - thunder encoded files with wrong bitspersample set. The libtiff - development team would like to thank Marin Barbella and TippingPoint's - Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, - :cve:`2011-1167`). - :bugzilla:`2300` - -* :file:`libtiff/tiffiop.h`: avoid declaring :c:type:`int64`/:c:type:`uint64` on AIX with XLC - where they are already available. (:bugzilla:`2301`) - - -Tools changes -------------- - -* :file:`tools/tiffcrop.c`: Patch from Richard Nolde. Reject YCbCr - subsampled data since tiffcrop currently doesn't support it. Fix - JPEG support. - -* :file:`tools/tiffcp.c`: Initialize buffer arrays with zero to avoid - referencing to uninitialized memory in some cases (e.g. when tile size - set bigger than the image size). - -* :file:`tools/tiff2pdf.c`: Better generation of ID field in - :c:func:`t2p_write_pdf_trailer`. Get rid of GCC aliasing warnings. - -* :file:`tools/tiff2pdf.c`: Fixed computation of the tile buffer size when - converting JPEG encoded tiles. - -* :file:`tools/tiff2pdf.c`: Better handling of string fields, use static - string buffers instead of dynamically allocated, use :c:func:`strncpy` instead - of :c:func:`strcpy`, control the string lengths. - -* :file:`tools/tiff2bw.c`, :file:`tools/thumbnail.c`, :file:`tools/pal2rgb.c`: Fix the count for - ``WhitePoint`` tag as per bug - :bugzilla:`2042` - -* :file:`tools/tiffdump.c`: Use :c:func:`PrintData` function instead of - :c:func:`PrintByte`/:c:func:`PrintShort`/:c:func:`PrintLong`. Should fix an issue reported at - :bugzilla:`2116` - -* :file:`tools/tiffset.c`: Properly handle ``TIFFTAG_PAGENUMBER``, - ``TIFFTAG_HALFTONEHINTS``, ``TIFFTAG_YCBCRSUBSAMPLING``, ``TIFFTAG_DOTRANGE`` - which should be set by value. - -* :file:`tools/tiffdump.c`: Avoid integer overflows computing the buffer size - for large directories. As per bug - :bugzilla:`2218` - -* :file:`tools/tiff2pdf.c`: Fixed ID buffer filling in - :c:func:`t2p_write_pdf_trailer`, thanks to Dmitry V. Levin. - -* :file:`tools/tiffcrop.c`: Patch from Richard Nolde to avoid a - potentially unterminated buffer due to using an exceptionally long - file name. - -* :file:`tools/tiff2ps.c`: improvements and enhancements from Richard Nolde - with additional command line options for Document Title, - Document Creator, and Page Orientation - -* :file:`tools/tiffsplit.c`: abort when reading a TIFF without a byte-count - per :bugzilla:`1996` - -* :file:`tools/tiff2pdf.c`: add fill-page option - :bugzilla:`2051` - -* :file:`tools/fax2ps.c`: replace unsafe :c:func:`tmpfile` with :c:func:`mkstemp` - :bugzilla:`2118` - -* :file:`tools/tiff2pdf.c`: fix colors for images with RGBA - interleaved data - :bugzilla:`2250` - -* :file:`tools/tiffcrop.c`: new release by Richard Nolde - :bugzilla:`2004` - -* :file:`tools/fax2ps.c`: be consistent with page-numbering - :bugzilla:`2225` - -* :file:`tools/gif2tiff.c`: fix buffer overrun - :bugzilla:`2270` - -* :file:`tools/fax2ps.c` (:c:func:`main`): Use :c:func:`tmpfile` rather than :c:func:`mkstemp` since - it is much more portable. Tmpfile is included in ISO/IEC - 9899:1990 and the WIN32 CRT. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v4.0.0.rst b/third_party/libtiff/doc/releases/v4.0.0.rst deleted file mode 100644 index 21b0102..0000000 --- a/third_party/libtiff/doc/releases/v4.0.0.rst +++ /dev/null @@ -1,213 +0,0 @@ -Changes in TIFF v4.0.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.0 (:tag:`Release-v4-0-0`) - Previous Version :doc:`v3.9.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. Please consult -the ChangeLog file in the source package for full change details. The -following information is located here: - - -Major changes -------------- - -BigTIFF support changes: - -* The ``options`` parameter in the :c:func:`TIFFOpen` and :c:func:`TIFFClientOpen` funcs has - been extended. When creating new files, you can add option ``4`` to - specify you want to create a ClassicTIFF file, though that is the - default and the option is not strictly necessary. (As such, old - calling code will continue to function and create ClassicTIFF files.) - Or you can add option ``8`` to specify you want to create a BigTIFF file - instead. This new option is also reflected in some of the tools we - already upgraded. For instance, you can use the ``-8`` option on :program:`tiffcp` to - have :program:`tiffcp` produce BigTIFF files instead of the default ClassicTIFF. - (Whilst an additional option is provided for version selection when - creating new files, no such option is necessary when reading TIFF - files. LibTiff reads ClassicTIFF and BigTIFF both, and the application - does not need to be aware which TIFF version an opened file is.) - -* Although the tag count in BigTIFF is 64bit, we restricted the - count in the implementation to a much more reasonable size. This is - necessary in current implementation, because all tag data gets read - automatically in the IFD reading stage, so if there's half a dozen - private tags with multiple gigabytes of data that causes considerable - overhead even if the application level is never interested in these - tags. Our choice to ignore tags with data longer then a certain sanity - value is much needed as things stand. We also recommend to step away - from writing tiles that are 8 kilobyte in their uncompressed form, or - writing single-line strips, in really big files, resulting in mega's - of tiles or strips. It's much more efficient to choose bigger tile or - strip sizes, up to several megabyte if needed, and have a few kilo of - tiles or strips instead. - -* Although it's rare, some application code does directly access - file offsets. Some of these are automatically upgraded because they - used the :c:type:`toff_t` type, others need to be aware that the datatype - changed and need to start using :c:type:`toff_t` or :c:type:`uint64`. This impacts access - to tags like the ``EXIF`` IFD tag, for example, or the ``SubIfds`` tag, or to - ``StripOffsets`` or ``TileOffsets``, the return type of functions like - :c:func:`TIFFCurrentDirOffset`, and a parameter type to functions like - :c:func:`TIFFSetSubDirectory`. - -* Although it's rare, some application code does use structures - like :c:struct:`TIFFHeader` or :c:struct:`TIFFDirEntry` that used to be an exact binary - representation of TIFF structures. These need to change. The old - TIFFHeader structure is replaced by the new TIFFHeaderClassic, - TIFFHeaderBig, and TIFFHeaderCommon structures that are an exact - binary representation of the ClassicTIFF and BigTIFF header, and of - the part that is common to both. There is no new equivalent for the - old :c:struct:`TIFFDirEntry` structure (or more precisely, there is still a - :c:struct:`TIFFDirEntry` structure, but it is changed, moved to library-private - definition, and no longer an exact binary representation of the tag - structure of either TIFF version). - -* Sizer functions, like :c:func:`TIFFTileSize` or :c:func:`TIFFScanlineSize` and the - like, return a :c:func:`tmsize_t` value (:c:func:`tmsize_t` is defined as :c:type:`int32` on 32bit - machines, and :c:type:`int64` on 64bit machines, and as such it is meant to - represent signed memory sizes). This is because we figure 98% of the - calling code uses the return value as sizes in allocations and the - like. So, any overflow that is theoretically possible with BigTIFF - when LibTiff is running on a 32bit system, is best detected inside the - sizer functions and it is best to return a type that makes sense as a - memory size. If your calling code is the exception and is interested - in actual file size, you best use the newer :c:func:`TIFFTileSize64` or - :c:func:`TIFFScanlineSize64` function that returns an :c:type:`uint64` type. - -* These TIFF tags require a 64-bit type as an argument in - libtiff 4.0.0: - - * :c:macro:`TIFFTAG_FREEBYTECOUNTS` - * :c:macro:`TIFFTAG_FREEOFFSETS` - * :c:macro:`TIFFTAG_STRIPBYTECOUNTS` - * :c:macro:`TIFFTAG_STRIPOFFSETS` - * :c:macro:`TIFFTAG_TILEBYTECOUNTS` - * :c:macro:`TIFFTAG_TILEOFFSETS` - -Other important backward incompatible changes in the public API: - -* :c:func:`TIFFRewriteField` renamed into :c:func:`_TIFFRewriteField` and moved out - from the public interface (from :file:`tiffio.h` to :file:`tiffiop.h`). Type of its - ``count`` parameter changed from :c:type:`uint32` to :c:type:`tmsize_t`. - -* :c:func:`TIFFMergeFieldInfo` returns non-void result now. It returns 0 - if successful and -1 if failed. Though this is now obsoleted function - and should not be used in new programs. Use the new tag extension - scheme instead. - -* :c:func:`TIFFFieldWithTag` and :c:func:`TIFFFieldWithName` functions now return - pointer to :c:struct:`TIFFField` constant object instead of :c:struct:`TIFFFieldInfo`. - -* :c:func:`TIFFReassignTagToIgnore` function and :c:enum:`TIFFIgnoreSense` enumeration - have been removed. They was unused and never been used properly. - Should be unneeded for high-level applications. - -* :c:struct:`TIFFTagValue` structure removed from the public :file:`tiffio.h` - to private :file:`tif_dir.h` and not accessible anymore. It should be unneeded - for high-level applications. - - -Software configuration changes ------------------------------- - -Updated autotools: Autoconf 2.68, Automake 1.11.1, libtool 2.4. - -* Enabled support for Automake silent build rules - (``--enable-silent-rules`` or ``make V=0``) - -* Enabled support for Automake colorized and parallel tests. - -* Added detection of 64-bit integer types since libtiff 4.0 - requires use of 64-bit signed and unsigned integer types. - -* Libtiff now provides a more comprehensive test suite with - over 72 tests, which may be executed on Unix-like systems, or - under Microsoft Windows using MinGW/MSYS or Cygwin. - -* ``--disable-lzma`` configure option to disable use of liblzma. - -* ``--enable-defer-strile-load`` configure option to enable - experimental deferred strip/tile offset/size loading. May - cause some extremely sophisticated uses of libtiff to fail. - -* ``--enable-chunky-strip-read`` configure option to enable - experimental enable reading large strips in chunks in - :c:func:`TIFFReadScanline`. - -* Now always uses WIN32 native I/O functions for Microsoft - Windows except for under Cygwin. - -* Now provides a pkg-config support file (libtiff-4.pc). - - -Library changes ---------------- - -* Patches/fixes made to stable libtiff (v3.9.X) are also - applied to 4.0.0. There are too many to list here. See the - distribution :file:`ChangeLog` for a detailed change list. - -* There is considerable change in some files like - :c:func:`tif_dirread` and :c:func:`tif_dirwrite`. These changes don't impact - backwards compatibility, they are mostly a clean rewrite that - does allow BigTIFF support as well as somewhat more robust - reading of the unexpected already and will also serve future - API extension but does not impact current API or functionality - in a negative way that you need to know about. - -* Although there is still a functional definition for types - like :c:type:`toff_t` (file offset), :c:type:`tstrip_t` (strip index number), etc, - we recommend against using these in newer code. We have - learned that it is next to impossible to use these - consistently and make real abstraction of the binary format of - these types. Instead, at a certain level we always end up - doing casts anyway, and taking the exact binary format into - account, so these types are nothing but dangerously misleading - and obfuscating. You do not need to update calling code that - uses them, as 99.9% of such code will continue to work. But we - recommend against using them in newer calling code, and we - started replacing them with binary clear types like :c:type:`uint16`, - :c:type:`uint32` and such in the library. - -* We do use and will continue to use one functional type - that is an exception to the above rule, being :c:type:`tmsize_t`. This - is a signed memory size type, i.e. it is :c:type:`int32` on 32bit - machines, or :c:type:`int64` on 64bit machines. - -* Optionally support LZMA compression via TIFF tag 34925. - :program:`tiffcp` supports compression levels similar to ``-c lzma:p1`` or - ``-c zip:p9`` for setting the LZMA compression parameters. - -* Optionally defer the load of strip/tile offset and size - tags for optimized scanning of directories. Enabled with the - ``--enable-defer-strile-load`` configure option (:c:macro:`DEFER_STRILE_LOAD` - ``#define`` in :file:`tif_config.h`). - -* Optionally enable experimental support for reading big - strips in chunks. Enabled with the ``--enable-chunky-strip-read`` - configure option. - - -Tools changes -------------- - -* :program:`tiffset`: add ``-d`` and ``-sd`` switches to allow operation on - a particular directory, not just the first. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v4.0.1.rst b/third_party/libtiff/doc/releases/v4.0.1.rst deleted file mode 100644 index a618290..0000000 --- a/third_party/libtiff/doc/releases/v4.0.1.rst +++ /dev/null @@ -1,60 +0,0 @@ -Changes in TIFF v4.0.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.1 (:tag:`Release-v4-0-1`) - Previous Version :doc:`v4.0.0 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* ``--enable-ld-version-script``: New :program:`configure` option to - enable shared library symbol versioning on ELF-based systems - (e.g. Linux and FreeBSD) which use the GNU linker. This - allows multiple major versions of libtiff to be loaded - simultaneously into the same application or library without - conflict, as long as all libtiffs involved are built with - versioned symbols. This option is not enabled by default. - -* Added libtiff private dependency on ``-llzma`` for pkg-config. - - -Library changes ---------------- - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`: Extra caution around - assumption tag fetching is always successful. - -* :file:`libtiff/tif_jpeg.c`: Extra caution for case where :c:var:`sp` is :c:macro:`NULL`. - - -Tools changes -------------- - -* None - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v4.0.10.rst b/third_party/libtiff/doc/releases/v4.0.10.rst deleted file mode 100644 index 8be8d02..0000000 --- a/third_party/libtiff/doc/releases/v4.0.10.rst +++ /dev/null @@ -1,239 +0,0 @@ -Changes in TIFF v4.0.10 -======================= - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.10 (:tag:`v4.0.10`) - Previous Version :doc:`v4.0.9 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at - `Gitlab `_. - This is the first release to be made from the new Git repository. - - -Software configuration changes ------------------------------- - -* Minimum CMake version is now v2.8.11 for the CMake-based build. - -* Libwebp will be automatically detected and used by configure/cmake if present. - -* Libzstd will be automatically detected and used by configure/cmake if present. - - -Library changes ---------------- - -* Added ZSTD compression codec. - `Zstandard `_ or zstd as - short version, is a fast lossless compression algorithm, targeting - real-time compression scenarios at zlib-level and better - compression ratios. It's backed by a very fast entropy stage, - provided by Huff0 and FSE library. - - We require libzstd >= 1.0.0 so as to be able to use streaming - compression and decompression methods. - - The default compression level we have selected is 9 (range goes - from 1 to 22), which experimentally offers equivalent or better - compression ratio than the default deflate/ZIP level of 6, and - much faster compression. - - For example on a 6600×4400 16bit image, ``tiffcp -c zip`` runs in - 10.7 seconds, while ``tiffcp -c zstd`` runs in 5.3 - seconds. Decompression time for zip is 840 ms, and for zstd 650 - ms. File size is 42735936 for zip, and 42586822 for zstd. Similar - findings on other images. - - On a 25894×16701 16bit image: - - .. table:: Compressor Relative Performance - :widths: auto - - =========== ================ ================== =========== - Compressor Compression time Decompression time File size - =========== ================ ================== =========== - ZSTD 35 s 3.2 s 399,700,498 - ZIP/Deflate 1m 20 s 4.9 s 419,622,336 - =========== ================ ================== =========== - - Please note that ``COMPRESSION_ZSTD`` is self-assigned the id 50000 - by the libtiff project and is not officially registered with Adobe - since Adobe's registration function is defunct. - -* Added WebP compression codec. - - `WebP `_ is - a high performance compressor intended for photos as commonly used - on the Web. The WebP encoder is not designed for huge images, but - serves very well for compressing strips and tiles in TIFF as long - as the strips or tiles do not exceed the capability of the - encoder. - - As a test of compression performance metrics, GraphicsMagick - was used on an extremely high quality 8-bit TIFF image from a - Hasselblad H4D-200MS camera with pixel dimensions of - 16352×12264. The image was re-encoded with 1024×1024 tiles and - various compression algorithms, using default settings for each - algorithm. Based on this test, the compression and decompression - performance (in iterations per second), the resulting file size, - and the calculated total PSNR are provided here. It can be seen - that WebP provided excellent encode and decode performance, and - the compressed file size was very small: - - - .. table:: Compressor Relative Performance - :widths: auto - - ========== ============ ============= ========= ===== - Compressor Compression Decompression File size PSNR - ========== ============ ============= ========= ===== - None 0.536 iter/s 1.506 iter/s 576.03MiB ∞ - LZW 0.105 iter/s 0.266 iter/s 270.68MiB ∞ - ZStd 0.020 iter/s 0.518 iter/s 238.42MiB ∞ - LZMA 0.009 iter/s 0.056 iter/s 247.61MiB ∞ - ZIP 0.009 iter/s 0.301 iter/s 247.88MiB ∞ - JPEG 0.446 iter/s 0.760 iter/s 18.59MiB 39.00 - WebP 0.019 iter/s 0.330 iter/s 9.38MiB 37.78 - ========== ============ ============= ========= ===== - - Please note that ``COMPRESSION_WEBP`` is self-assigned the id 50001 - by the libtiff project and is not officially registered with Adobe - since Adobe's registration function is defunct. - -* :c:func:`TIFFPrintDirectory`: fix null pointer dereference on corrupted - file. Fixes :bugzilla:`Bug 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF - image <2770>`. - -* :c:func:`_TIFFVGetField`: fix heap out-of-bounds access when requesting - ``TIFFTAG_NUMBEROFINKS`` on a EXIF - directory. Fixes :bugzilla:`Bug 2765 - Heap Out-Of-Bounds Memory Access - 68122422 - <2765>`. - Reported by Google Autofuzz project. - -* Fix a memory leak in :c:func:`TIFFStreamOpen`. :c:func:`TIFFStreamOpen` allocates a - new ``tiff{o,i}s_data``, but if :c:func:`TIFFClientOpen` fails then that struct is - leaked. - -* Fix for bug 2772. It is possible to craft a TIFF document where - the IFD list is circular, leading to an infinite loop while - traversing the chain. The libtiff directory reader has a failsafe - that will break out of this loop after reading 65535 directory - entries, but it will continue processing, consuming time and - resources to process what is essentially a bogus TIFFdocument. - - This change fixes the above behavior by breaking out of processing - when a TIFF document has >= 65535 directories and terminating with an - error. - -* :c:func:`ChopUpSingleUncompressedStrip`: avoid memory exhaustion - (:cve:`2017-11613`). In :c:func:`ChopUpSingleUncompressedStrip`, if the - computed number of strips is big enough and we are in read only - mode, validate that the file size is consistent with that number of - strips to avoid useless attempts at allocating a lot of memory for - the :c:member:`td_stripbytecount` and :c:member:`td_stripoffset` - arrays. Fixes :bugzilla:`Bug 2724 - memory exhaustion in ChopUpSingleUncompressedStrip - <2724>`. - -* Port code: Add :c:func:`strtol`, :c:func:`strtoll` and :c:func:`strtoull`. Also update - :c:func:`strtoul`. All use the same implementation from NetBSD libc. - -* Fix for :cve:`2018-7456` "NULL pointer dereference in - :c:func:`TIFFPrintDirectory`". - -* :c:func:`TIFFWriteDirectorySec`: avoid - assertion. Fixes :bugzilla:`Bug 2795 - There is a reachable assertion abort in function - TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead - to remote denial of attack. (:cve:`2018-10963`) - <2795>`. - -* :c:func:`LZWDecodeCompat`: fix potential index-out-of-bounds - write. Fixes :bugzilla:`Bug - 2780 - A heap-buffer-overflow in function LZWDecodeCompat in - libtiff4.0.9 (:cve:`2018-8905`) - <2780>`. - The fix consists in using the - similar code as :c:func:`LZWDecode` to validate we don't write outside of - the output buffer. - -* Remove builtin support for GUI warning and error message - boxes. Now warnings always go to the console by default unless - applications define their own warning and error handlers. - - GUI applications (and Windows CE) are required to define such handlers. - -* Add tag and pseudo-tag definitions for ESRI LERC codec (out of - tree codec whose source is - at ``_. - -* Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API - Fixes :bugzilla:`Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode - <2800>`. - -* :c:func:`TIFFSetupStrips`: avoid potential :c:type:`uint32` overflow on 32-bit - systems with large number of strips. Probably relates - to :bugzilla:`Bug - 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c - (:cve:`2018-10779`) - <2788>`. - -* Fix out-of-bound read on some tiled images. - -* Avoid potential :c:type:`int32` overflows in :c:func:`multiply_ms`. - -* Only read/write ``TIFFTAG_GROUP3OPTIONS`` or ``TIFFTAG_GROUP4OPTIONS`` - if compression is ``COMPRESSION_CCITTFAX3`` or - ``COMPRESSION_CCITTFAX4``. - -* JBIG: fix potential out-of-bounds write in :c:func:`JBIGDecode`. Also - fix a (harmless) potential use of uninitialized memory when - ``tif->tif_rawsize > tif->tif_rawcc``. In case libtiff is compiled with - ``CHUNKY_STRIP_READ_SUPPORT``, make sure that whole strip data is - provided to :c:func:`JBIGDecode`. - -* :c:func:`LZMAPreEncode`: emit verbose error if :c:func:`lzma_stream_encoder` fails - (typically because not enough memory available) - - -Tools changes -------------- - -* :program:`tiff2pdf`: Fix - :cve:`2017-9935`, :bugzilla:`Bug - 2704 - There is a heap based buffer overflow in the tiff2pdf tool of - the libtiff library. A crafted TIFF document can lead to a heap - based buffer overflow resulting in multiple damages. - <2704>`. - -* :program:`pal2rgb`: Add workaround to pal2rgb buffer overflow. - -* :program:`tiffset`: Add support for :c:macro:`LONG8`, :c:macro:`SLONG8` and :c:macro:`IFD8` field types - -* :program:`tiff2bw`: avoid null pointer dereference in case of out of memory - situation. Fixes :bugzilla:`Bug - 2819 - There is a NULL pointer dereference at function LZWDecode in - libtiff 4.0.9 (:cve:`2018-18661`) - <2819>`. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.0.2.rst b/third_party/libtiff/doc/releases/v4.0.2.rst deleted file mode 100644 index 394f052..0000000 --- a/third_party/libtiff/doc/releases/v4.0.2.rst +++ /dev/null @@ -1,64 +0,0 @@ -Changes in TIFF v4.0.2 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.2 (:tag:`Release-v4-0-2`) - Previous Version :doc:`v4.0.1 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* None - - -Library changes ---------------- - -* :file:`tif_getimage.c`: added support for _SEPARATED CMYK images. - -* :file:`tif_getimage.c`: Added support for greyscale + alpha. - -* Added :c:func:`TIFFCreateCustomDirectory` and :file:`TIFFCreateEXIFDirectory` functions. - -* :file:`tif_print.c`: Lots of fixes around printing corrupt or hostile input. - -* Improve handling of corrupt ycbcrsubsampling values. - -* :file:`tif_unix.c`: use :c:func:`strerror` to get meaningful error messages. - -* :file:`tif_jpeg.c`: fix serious bugs in :c:func:`JPEGDecodeRaw`. - -* :file:`tif_jpeg.c`: Fix size overflow (zdi-can-1221, :cve:`2012-1173`). - - -Tools changes -------------- - -* :program:`tiff2pdf`: Defend against integer overflows while - calculating required buffer sizes (:cve:`2012-2113`). - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v4.0.3.rst b/third_party/libtiff/doc/releases/v4.0.3.rst deleted file mode 100644 index 868967e..0000000 --- a/third_party/libtiff/doc/releases/v4.0.3.rst +++ /dev/null @@ -1,68 +0,0 @@ -Changes in TIFF v4.0.3 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.3 (:tag:`Release-v4-0-3`) - Previous Version :doc:`v4.0.2 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* Updated to use Automake 1.12.4. Avoids security problem with - ``make distcheck`` (:cve:`2012-3386`). - - -Library changes ---------------- - -* Various memory buffer access fixes. - -* Fix handling when writing RGBA jpeg compressed imagery (:gdal-trac:`4732`). - -* Fix to work properly with IJG JPEG 7+. - -* New functions :c:func:`TIFFFieldTag`, :c:func:`TIFFFieldName`, - :c:func:`TIFFFieldDataType`, :c:func:`TIFFFieldPassCount`, :c:func:`TIFFFieldReadCount`, - :c:func:`TIFFFieldWriteCount` to use as external accessors for the opaque - type :c:type:`TIFFField`. - -* Fix bug rewriting image tiles in a compressed file (:gdal-trac:`4771`). - -* Add TIFF/FX tag support in libtiff. - - -Tools changes -------------- - -* :program:`tiff2pdf`: Fail when :c:func:`TIFFSetDirectory` fails. This prevents - core dumps or perhaps even arbitrary code execution when processing - a corrupt input file (:cve:`2012-3401`). - -* :program:`tiff2pdf`: Fix two places where :c:member:`t2p_error` didn't get set after a - :c:func:`malloc` failure. No crash risk AFAICS, but the program might not - report exit code 1 as desired. - - -Contributed software changes ----------------------------- - -* None diff --git a/third_party/libtiff/doc/releases/v4.0.4.rst b/third_party/libtiff/doc/releases/v4.0.4.rst deleted file mode 100644 index b211b76..0000000 --- a/third_party/libtiff/doc/releases/v4.0.4.rst +++ /dev/null @@ -1,191 +0,0 @@ -Changes in TIFF v4.0.4 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.4 (:tag:`Release-v4-0-4`) - Previous Version :doc:`v4.0.4beta ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :bugzilla:`2405`: Correct shell equality operator. -* :bugzilla:`2498`: Adds an option to select the file I/O style on Windows hosts. - - -Library changes ---------------- - -* :c:func:`TIFFNumberOfDirectories`: Coverity 1134470 "Logically dead code" - -* :file:`tif_dirread.c`: - - * :c:func:`TIFFReadDirEntryDoubleArray`: Coverity 298626 "Logically dead code". - * :c:func:`TIFFReadDirEntryFloatArray`: Coverity 298627 "Logically dead code". - * :c:func:`TIFFReadDirEntryIfd8Array`: Coverity 298628 "Logically dead code". - * :c:func:`TIFFReadDirEntrySlong8Array`: Coverity 298629 "Logically dead code" - -* :file:`tif_dirwrite.c` - - * :c:func:`_TIFFRewriteField`: Coverity 1024310 "Resource leak". - -* :file:`tif_jpeg.c` - - * :c:func:`JPEGCleanup`: Coverity 298624 "Dereference before null check". - * :c:func:`JPEGDecode`: Coverity 602597 "Operands don't affect result". - -* :file:`tif_getimage.c` - - * :bugzilla:`2409`: Correct reading of certain tiled TIFFs. - -* :file:`tif_luv.c` - - * :c:func:`LogLuvDecodeStrip`: Coverity 991239 "Division or modulo by zero". - * :c:func:`LogLuvDecodeTile`: Coverity 991227 "Division or modulo by zero". - * :c:func:`LogLuvEncodeStrip`: Coverity 991240 "Division or modulo by zero". - * :c:func:`LogLuvEncodeTile`: Coverity 991241 "Division or modulo by zero". - -* :file:`tif_lzw.c` - - * Decode files that contain consecutive :c:macro:`CODE_CLEAR` codes. - -* :file:`tif_ojpeg.c` - - * :c:func:`OJPEGReadBufferFill`: Coverity 603400 "Missing break in switch". - * :c:func:`OJPEGReadHeaderInfoSecStreamDht`: Coverity 601720 "Resource leak". - -* :file:`tif_read.c` - - * :c:func:`TIFFStartTile`: Coverity 715973 and 715974 "Division or modulo by zero". - -* :file:`tif_unix.c` - - * :bugzilla:`2510`: Fix several harmless but still annoying warnings. - -* :file:`tif_write` - - * :c:func:`TIFFWriteEncodedStrip`: Coverity 715975 "Division or modulo by zero". - * :c:func:`TIFFWriteEncodedTile`: Coverity 715976 and 715977 "Division or modulo by zero". - * :c:func:`TIFFWriteRawStrip`: Coverity 715978 "Division or modulo by zero". - * :c:func:`TIFFWriteScanline`: Coverity 715979 "Division or modulo by zero". - - -Tools changes -------------- - -* :program:`bmp2tiff` - - * Coverity 1024225 "Untrusted value as argument". - * Coverity 1024678 "Unchecked return value from library". - * Coverity 1024679 "Unchecked return value from library". - * Coverity 1214160 "Ignoring number of bytes read". - -* :program:`gif2tiff` - - * Coverity 1024222 "Untrusted value as argument". - * Coverity 1024890 "Ignoring number of bytes read". - * Coverity 1024891 "Ignoring number of bytes read". - * Coverity 1024892 "Ignoring number of bytes read". - * Coverity 1024893 "Ignoring number of bytes read". - * Coverity 1024894 "Ignoring number of bytes read". - -* :program:`ras2tiff` - - * Corrected Sun Raster header definition to be safe for - 64-bit systems. Add some header validations. Fixes many - (unspecified) Coverity issues. - * Coverity 1024223 "Untrusted value as argument". - * Coverity 1301206: "Integer handling issues (BAD_SHIFT)". - -* :program:`raw2tiff` - - * Coverity 1024887 "Unchecked return value from library". - * Coverity 1024888 "Unchecked return value from library". - * Coverity 1024889 "Unchecked return value from library". - * Coverity 1214162 "Ignoring number of bytes read". - - -* :program:`tiff2pdf` - - * :bugzilla:`2078`: Suppress initial output of the header. - * :bugzilla:`2150`: Change ColorTransform from "0" to "1". - * Take care in using the return value from :c:func:`snprintf`. - * Coverity 1024181 "Structurally dead code". - * Coverity 1024181 "Structurally dead code". - * Coverity 1227690 "Unused value". - * Coverity 298621 "Resource leak". - -* :program:`tiff2ps` - - * Correct sizing and scaling problems with output document. - -* :program:`tiffcp` - - * Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak". - -* :program:`tiffcrop` - - * Correctly copy the compression tag from the source TIFF. - * Coverity 1024545 "Division or modulo by zero". - * Coverity 1024586 "Logically dead code". - * Coverity 1024796 "Nesting level does not match indentation". - * Coverity 1024797 "Nesting level does not match indentation". - * Coverity 1294542 "Logical vs. bitwise operator". - * Coverity 1299740 "Out-of-bounds write". - * Coverity 1299741 "Dereference before null check". - -* :program:`tiffdither` - - * Check memory allocations for failure. Also check - multiplication overflow. (Fixes #2501, :cve:`2014-8128`) - -* :program:`tiffgt.c` - - * :bugzilla:`2401`: Appropriately call :c:func:`glFlush`. - -* :program:`tiffmedian` - - * Coverity 1024386 "Out-of-bounds read". - * Coverity 1024386 "Out-of-bounds read". - * Coverity 1024795 "Nesting level does not match indentation". - * Coverity 1024795 "Nesting level does not match indentation". - -:program:`tiffsplit` - - * Coverity 1024304 "Resource leak". - * Coverity 1024305 "Resource leak". - - -Contributed software changes ----------------------------- - -* :program:`addtiffo` - - * Check buffer size calculation for overflow. - * Coverity 298615 "Resource leak". - * Coverity 1024649 "Unintended sign extension". - -* :program:`iptcutil` - - * Coverity 1024468 "Infinite loop". - * Coverity 1024727 "Truncated stdio return value". - * Coverity 1214240 "Untrusted loop bound". diff --git a/third_party/libtiff/doc/releases/v4.0.4beta.rst b/third_party/libtiff/doc/releases/v4.0.4beta.rst deleted file mode 100644 index f281d63..0000000 --- a/third_party/libtiff/doc/releases/v4.0.4beta.rst +++ /dev/null @@ -1,236 +0,0 @@ -Changes in TIFF v4.0.4beta -========================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.4beta (:tag:`Release-v4-0-4beta`) - Previous Version :doc:`v4.0.3 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- -* None - - -Software configuration changes ------------------------------- - -* Updated to use Automake 1.15 and Libtool 2.4.5 - - -Library changes ---------------- - -* :c:func:`TIFFCheckDirOffset`: avoid :c:type:`uint16` overflow - when reading more than 65535 directories, and effectively error out when - reaching that limit. - -* :c:func:`TIFFNumberOfDirectories`: generate error in case of directory count - overflow. - -* :c:func:`TIFFAdvanceDirectory`: If nextdir is found to - be defective, then set it to zero before returning error in order - to terminate processing of truncated TIFF. - -* JPEG-in-TIFF: recognize ``SOF2``, ``SOF9`` and ``SOF10`` - markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. - Note: the default settings of mozjpeg will produce progressive scans, which - is forbidden by the TechNote. - -* JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused - all tiles/strips to include quantization tables even when the jpegtablesmode - had the :c:macro:`JPEGTABLESMODE_QUANT` bit set. - Also add explicit removal of Huffman tables when jpegtablesmode has the - :c:macro:`JPEGTABLESMODE_HUFF` bit set, which avoids Huffman tables to be emitted in the - first tile/strip (only useful in update scenarios. create-only was - fine) - -* JPEG-in-TIFF: fix segfault in :c:func:`JPEGFixupTagsSubsampling` on - corrupted image where ``tif->tif_dir.td_stripoffset == NULL``. - (:bugzilla:`2471`) - -* NeXT codec: add new tests to check that we don't read outside of - the compressed input stream buffer. - -* NeXT codec: check that ``BitsPerSample`` = 2. Fixes - :bugzilla:`2487` (:cve:`2014-8129`) - -* NeXT codec: in the "run mode", use tilewidth for tiled images - instead of imagewidth to avoid crash - -* tif_getimage.c: in OJPEG case, fix checks on strile width/height - in the ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile`` and - ``putcontig8bitYCbCr21tile`` cases. - -* in :c:func:`TIFFDefaultDirectory`, reset any already existing - extended tags installed by user code through the extender mechaninm before - calling the extender callback (GDAL #5054) - -* Fix warnings about unused parameters. - -* Fix various typos in comments found by Debian lintian tool (GDAL #5756) - -* tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. - (:bugzilla:`2235`) - -* :file:`tif_dirread.c`: In :c:func:`EstimateStripByteCounts`, check return code - of :c:func:`_TIFFFillStriles`. This solves crashing bug on corrupted - images generated by afl. - -* :file:`tif_read.c`: fix several invalid comparisons of a :c:type:`uint64` value with - ``<= 0`` by casting it to :c:type:`int64` first. This solves crashing bug on corrupted - images generated by afl. - -* :c:func:`TIFFSetField`: refuse to set negative values for - :c:macro:`TIFFTAG_XRESOLUTION` and :c:macro:`TIFFTAG_YRESOLUTION` that cause asserts when writing - the directory - -* :c:func:`TIFFReadDirectory`: refuse to read ``ColorMap`` or - ``TransferFunction`` if ``BitsPerSample`` has not yet been read, otherwise reading - it later will cause user code to crash if ``BitsPerSample > 1`` - -* :c:func:`TIFFRGBAImageOK`: return FALSE if LOGLUV with - ``SamplesPerPixel != 3``, or if CIELAB with - ``SamplesPerPixel != 3`` or ``BitsPerSample != 8`` - -* :file:`tif_config.vc.h`: no longer use ``#define snprintf _snprintf`` with - Visual Studio 2015 aka VC 14 aka MSVC 1900 - -* LZW codec: prevent potential null dereference of ``sp->dec_codetab`` in :c:func:`LZWPreDecode` - (:bugzilla:`2459`) - -* :c:func:`TIFFReadBufferSetup`: avoid passing -1 size - to :c:func:`TIFFmalloc` if passed user buffer size is 0 - (:bugzilla:`2459`) - -* :c:func:`TIFFReadDirEntryOutputErr`: Incorrect - count for tag should be a warning rather than an error since - errors terminate processing. - -* :file:`tif_dirinfo.c` (``TIFFField``) : Fix data type for :c:macro:`TIFFTAG_GLOBALPARAMETERSIFD` tag. - -* Add definitions for TIFF/EP ``CFARepeatPatternDim`` and ``CFAPattern`` tags - (:bugzilla:`2457`) - -* :file:`tif_codec.c`, :file:`tif_dirinfo.c`: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)`` - -* :file:`configure.ac`: Improve pkg-config static linking by adding ``-lm`` to ``Libs.private`` when needed. - -* :file:`tif_write.c`: :c:type:`tmsize_t` related casting warning fixed for - 64bit linux. - -* :file:`tif_read.c`: :c:type:`uint64`/:c:type:`tmsize_t` change for MSVC warnings. - (:bugzilla:`2427`) - -* Fix :c:func:`TIFFPrintDirectory` handling of - :c:member:`field_passcount` fields: it had the :c:macro:`TIFF_VARIABLE` and - :c:macro:`TIFF_VARIABLE2` cases backwards. - -* PixarLog codec: Improve previous patch for :cve:`2012-4447` - (to enlarge :c:member:`tbuf` for possible partial stride at end) so that - overflow in the integer addition is detected. - -* :file:`tif_{unix,vms,win32}.c` (:c:func:`_TIFFmalloc`): ANSI C does not - require :c:func:`malloc` to return :c:macro:`NULL` pointer if requested allocation - size is zero. Assure that :c:func:`_TIFFmalloc` does. - -* :file:`tif_zip.c`: Avoid crash on :c:macro:`NULL` error messages. - - -Tools changes -------------- -* :program:`tiff2pdf` Fix various crashes and memory buffer access errors (oCERT-2014-013). -* :program:`tiff2pdf` fix buffer overflow on some YCbCr JPEG compressed images. - (:bugzilla:`2445`) -* :program:`tiff2pdf` fix buffer overflow on YCbCr JPEG compressed image. - (:bugzilla:`2443`) -* :program:`tiff2pdf` check return code of :c:func:`TIFFGetField` when reading :c:macro:`TIFFTAG_SAMPLESPERPIXEL` -* :program:`tiff2pdf` fix crash due to invalid tile count. -* :program:`tiff2pdf` Detect invalid settings of ``BitsPerSample``/``SamplesPerPixel`` for CIELAB / ITULAB -* :program:`tiff2pdf` Assure that memory size calculations for - :c:func:`_TIFFmalloc` do not overflow the range of :c:type:`tmsize_t`. -* :program:`tiff2pdf` Avoid crash when :c:macro:`TIFFTAG_TRANSFERFUNCTION` tag returns one channel, - with the other two channels set to :c:macro:`NULL`. -* :program:`tiff2pdf` close PDF file. (:bugzilla:`2479`) -* :program:`tiff2pdf` Preserve input file directory order when pages - are tagged with the same page number. -* :program:`tiff2pdf.c` terminate after failure of allocating ycbcr buffer - (:bugzilla:`2449`, :cve:`2013-4232`) -* :program:`tiff2pdf` Rewrite JPEG marker parsing in - :c:func:`t2p_process_jpeg_strip` to be at least marginally competent. The - approach is still fundamentally flawed, but at least now it won't - stomp all over memory when given bogus input. Fixes :cve:`2013-1960`. -* :program:`tiffdump` Guard against arithmetic overflow when calculating allocation buffer sizes. -* :program:`tiffdump` fix crash due to overflow of entry count. -* :program:`tiffdump` Fix double-free bug. -* :program:`tiffdump` detect cycle in TIFF directory chaining. - (:bugzilla:`2463`) -* :program:`tiffdump` avoid passing a :c:macro:`NULL` pointer to :c:func:`read` if :c:func:`seek` failed before. - (:bugzilla:`2459`) -* :program:`tiff2bw` when ``Photometric = RGB``, the utility only works if ``SamplesPerPixel = 3``. Enforce that. - (:bugzilla:2485`, :cve:`2014-8127`) -* :program:`pal2rgb`, :program:`thumbnail`: fix crash by disabling :c:macro:`TIFFTAG_INKNAMES` copying. - (:bugzilla:`#2484`, :cve:`2014-8127`) -* :program:`thumbnail` fix out-of-buffer write. - (:bugzilla:`2489`, :cve:`2014-8128`) -* :program:`thumbnail`, :program:`tiffcmp`: only read/write :c:macro:`TIFFTAG_GROUP3OPTIONS` - or :c:macro:`TIFFTAG_GROUP4OPTIONS` if compression is :c:macro:`COMPRESSION_CCITTFAX3` or - :c:macro:`COMPRESSION_CCITTFAX4`. - (:bugzilla:`2493`, :cve:`2014-8128`) -* :program:`tiffcp` fix crash when converting YCbCr JPEG-compressed to none. - (:bugzilla:`2480`) -* :program:`bmp2tiff` fix crash due to int overflow related to input BMP dimensions -* :program:`tiffcrop` fix crash due to invalid ``TileWidth``/``TileHeight`` -* :program:`tiffcrop` fix segfault if bad value passed to ``-Z`` option - (:bugzilla:`2459`) and add missing ``va_end`` in :c:func:`dump_info` -* :program:`thumbnail`, :program:`tiffcrop`: "fix" heap read over-run found with - Valgrind and Address Sanitizer on test suite -* :program:`fax2ps` check :c:func:`malloc`/:c:func:`realloc` result. (:bugzilla:`2470`) -* :program:`gif2tiff` apply patch for :cve:`2013-4243`. (:bugzilla:`2451`) -* :program:`gif2tiff` fix possible OOB write. (:bugzilla:`2452`, :cve:`2013-4244`) -* :program:`gif2tiff` Be more careful about corrupt or hostile input files (:bugzilla:`2450`, :cve:`2013-4231`) -* :program:`tiff2rgba` fix usage message in that zip was wrongly described -* :program:`tiffinfo` Default various values fetched with :c:func:`TIFFGetField` to avoid being uninitialized. -* :program:`tiff2ps` Fix bug in auto rotate option code. -* :program:`ppm2tiff` avoid zero size buffer vulnerability (:cve:`2012-4564`). - check the linebytes calculation too, get the :c:func:`max` calculation - straight, avoid redundant error messages, check for :c:func:`malloc` - failure. -* :program:`tiffset` now supports a ``-u`` option to unset a tag. - (:bugzilla:`2419`) -* Fix warnings about unused parameters. -* :program:`rgb2ycbcr`, :program:`tiff2bw`, :program:`tiff2pdf`, :program:`tiff2ps`, :program:`tiffcrop`, :program:`tiffdither`: - Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to - protect against overflow of fixed-size buffers. This responds in - particular to :cve:`2013-1961` concerning overflow in :file:`tiff2pdf.c`'s - :c:func:`t2p_write_pdf_page`. -* :file:`html/man/tiff2ps.1.html`, :file:`html/man/tiffcp.1.html`, - :file:`html/man/tiffdither.1.html`, :file:`man/tiff2ps.1`, :file:`man/tiffcp.1`, - :file:`man/tiffdither.1`, :file:`tools/tiff2ps.c`, :file:`tools/tiffcp.c`, - :file:`tools/tiffdither.c`: Sync tool usage printouts and man pages with - reality - - -Contributed software changes ----------------------------- - -* Fix warnings about variables set but not used. -* :file:`contrib/dbs/xtiff/xtiff.c`: Enlarge some fixed-size buffers that weren't - large enough, and eliminate substantially all uses of ``sprintf(buf, - ...)`` in favor of using ``snprintf(buf, sizeof(buf), ...)``, so as to - protect against overflow of fixed-size buffers. diff --git a/third_party/libtiff/doc/releases/v4.0.5.rst b/third_party/libtiff/doc/releases/v4.0.5.rst deleted file mode 100644 index 56cd7f5..0000000 --- a/third_party/libtiff/doc/releases/v4.0.5.rst +++ /dev/null @@ -1,85 +0,0 @@ -Changes in TIFF v4.0.5 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.5 (:tag:`Release-v4-0-5`) - Previous Version :doc:`v4.0.4 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Support for configure/build using CMake. -* Support for large (> 2GB) files under Microsoft Windows. - - -Software configuration changes ------------------------------- - -* :file:`CMakeLists.txt` / CMake - - * Configuration and building using CMake is now supported - under Microsoft Windows and on Unix-type systems. - -* :file:`configure.ac` / :program:`configure` - - * Test for and use :c:func:`fseeko` if it is available. This allows - supporting large files on Unix-type systems with a 32-bit :c:expr:`long` - type and a 64-bit :c:type:`off_t` type. - - -Library changes ---------------- - -* :file:`tiffiop.h`: - - * Macros added to use 64-bit equivalents for all standard I/O - and POSIX APIs used by libtiff and its tools which are limited - to 2GB in Windows builds. Note that these 64-bit equivalents - were introduced by the CRT provided with Visual Studio 2005 and - if the necessary CRT is not installed on the target computer, - the program will not run. The wrapper macros will not be - activated unless the definition :c:macro:`_MSC_VER` is at least 1400 or - :c:macro:``__MSVCRT_VERSION__`` is at least ``0x800``. - -* :file:`tif_unix.c`: - - * Updated to support large files under Microsoft Windows. - This makes :file:`tif_unix.c` a completely viable candidate for use - under Windows (in spite of its name) if the CRT is modern - enough. Please note that :file:`tif_win32.c` already supported large - files, but only :program:`tiffinfo` and :program:`tiffdump` made any provision to - support large files under Windows. - * :c:func:`_tiffReadProc` and :c:func:`_tiffWriteProc` are modified to chunk - I/O to a maximum size of 2GB for extremely large I/O - requests. This surmounts limitations in the Microsoft Windows - :c:func:`read` and :c:func:`write` APIs (which are limited to the range of a - 32-bit :c:expr:`int`), and may avoid poor behavior with extremely large - I/O requests on other systems. - - -Tools changes -------------- - -* All tools - - * Updated to use I/O wrapper macros from :file:`tiffiop.h` in order - to support large files under Microsoft Windows. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.0.6.rst b/third_party/libtiff/doc/releases/v4.0.6.rst deleted file mode 100644 index 4228f18..0000000 --- a/third_party/libtiff/doc/releases/v4.0.6.rst +++ /dev/null @@ -1,77 +0,0 @@ -Changes in TIFF v4.0.6 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.6 (:tag:`Release-v4-0-6`) - Previous Version :doc:`v4.0.5 ` - Master Download Site ``_ - Master HTTP Site ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* Now builds with CMake 2.8.9 and newer (previously required 3.0.0) - - -Software configuration changes ------------------------------- - -* :file:`CMakeLists.txt` / CMake - - * Supports CMake 2.8.9 and later. - * Add missing file which wasn't being distributed, causing - unit tests to fail. - * Make shared/static library building configurable. - * CMake reads all version information directly from - :file:`configure.ac` to avoid duplication of values. - * CMake builds are now included in ``distcheck`` target. - -* :file:`Makefile.am` - - * Autotools `make distcheck` now tests the CMake-based build - if CMake is available. - - -Library changes ---------------- - -* Fixes to avoid undefined behaviour of signed types (C - standard compliance). -* Fixes to avoid possible issues when casting to unsigned char. -* Fixes to avoid undefined behaviour with shifts. -* Fix generation of output with 16 bit or 32 bit integer, when - byte swapping is needed, in horizontal predictor (:bugzilla:`2521`). -* Fix decoding when there is a single pixel to decode (unlikely - case...) and byte swapping is involved. -* Add add explicit masking with ``0xff`` before casting to :c:type:`uchar` in - floating-point horizontal differencing and accumulation routines. -* Eliminate requirement for and use of 64-bit constant values. - - -Tools changes -------------- - -* :program:`tiffgt` - - * Silence glut API deprecation warnings on MacOS X. - -* :program:`fax2ps` - - * Detect failure to write to temporary file. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.0.7.rst b/third_party/libtiff/doc/releases/v4.0.7.rst deleted file mode 100644 index 38e9ac5..0000000 --- a/third_party/libtiff/doc/releases/v4.0.7.rst +++ /dev/null @@ -1,350 +0,0 @@ -Changes in TIFF v4.0.7 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.7 (:tag:`Release-v4-0-7`) - Previous Version :doc:`v4.0.6 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - -Major changes -------------- - -* The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, :program:`ras2tiff`, :program:`sgi2tiff`, - :program:`sgisv`, and :program:`ycbcr` are completely removed from the distribution. - these tools were written in the late 1980s and early 1990s for - test and demonstration purposes. In some cases the tools were - never updated to support updates to the file format, or the - file formats are now rarely used. In all cases these tools - increased the libtiff security and maintenance exposure beyond - the value offered by the tool. - -Software configuration changes ------------------------------- - -* None - -Library changes ---------------- - -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, do not - dereference :c:macro:`NULL` pointer when values of tags with - :c:macro:`TIFF_SETGET_C16_ASCII` / :c:macro:`TIFF_SETGET_C32_ASCII` access are - 0-byte arrays. Fixes - :bugzilla:`2593` (regression - introduced by previous fix done on 2016-11-11 for - :cve:`2016-9297`). Reported by Henri Salo. Assigned as - :cve:`2016-9448` - -* :file:`libtiff/tif_aux.c`: fix crash in :c:func:`TIFFVGetFieldDefaulted` when - requesting Predictor tag and that the zip/lzw codec is not - configured. Fixes - :bugzilla:`2591` - -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFFetchNormalTag`, make sure - that values of tags with :c:macro:`TIFF_SETGET_C16_ASCII` / - :c:macro:`TIFF_SETGET_C32_ASCII` access are :c:macro:`NULL` terminated, to avoid - potential read outside buffer in :c:func:`_TIFFPrintField`. Fixes - :bugzilla:`2590` - -* :file:`libtiff/tif_dirread.c`: reject images with OJPEG compression - that have no ``TileOffsets``/``StripOffsets`` tag, when OJPEG - compression is disabled. Prevent :c:macro:`NULL` pointer dereference in - :c:func:`TIFFReadRawStrip1` and other functions that expect - :c:member:`td_stripbytecount` to be non :c:macro:`NULL`. Fixes - :bugzilla:`2585` - -* :file:`libtiff/tif_strip.c`: make :c:func:`TIFFNumberOfStrips` return the - ``td->td_nstrips`` value when it is non-zero, instead of - recomputing it. This is needed in :c:macro:`TIFF_STRIPCHOP` mode where - :c:member:`td_nstrips` is modified. Fixes a read outsize of array in - :program:`tiffsplit` (or other utilities using :c:func:`TIFFNumberOfStrips`). - Fixes :bugzilla:`2587` - (:cve:`2016-9273`) - -* :file:`libtiff/tif_predict.h`, :file:`libtiff/tif_predict.c`: Replace - assertions by runtime checks to avoid assertions in debug - mode, or buffer overflows in release mode. Can happen when - dealing with unusual tile size like YCbCr with - subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations - -* :file:`libtiff/tif_dir.c`: discard values of ``SMinSampleValue`` and - ``SMaxSampleValue`` when they have been read and the value of - ``SamplesPerPixel`` is changed afterwards (like when reading a - OJPEG compressed image with a missing ``SamplesPerPixel`` tag, and - whose photometric is ``RGB`` or ``YCbCr``, forcing ``SamplesPerPixel`` - being 3). Otherwise when rewriting the directory (for example - with tiffset, we will expect 3 values whereas the array had - been allocated with just one), thus causing a out of bound - read access. Fixes - :bugzilla:`2500` - (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) - -* :file:`libtiff/tif_dirwrite.c`: avoid :c:macro:`NULL` pointer dereference on - :c:member:`td_stripoffset` when writing directory, if :c:macro:`FIELD_STRIPOFFSETS` - was artificially set for a hack case in OJPEG case. Fixes - :bugzilla:`2500` - (:cve:`2014-8127`, duplicate: :cve:`2016-3658`) - -* :file:`libtiff/tif_getimage.c` (:c:func:`TIFFRGBAImageOK`): Reject attempts to - read floating point images. - -* :file:`libtiff/tif_predict.c` (:c:func:`PredictorSetup`): Enforce - bits-per-sample requirements of floating point predictor (3). - Fixes :cve:`2016-3622` "Divide By Zero in the :program:`tiff2rgba` tool." - -* :file:`libtiff/tif_pixarlog.c`: fix out-of-bounds write vulnerabilities - in heap allocated buffers. Reported as MSVR 35094. Discovered by - Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`libtiff/tif_write.c`: fix issue in error code path of - :c:func:`TIFFFlushData1` that didn't reset the :c:member:`tif_rawcc` and :c:member:`tif_rawcp` - members. I'm not completely sure if that could happen in - practice outside of the odd behaviour of :c:func:`t2p_seekproc` of - tiff2pdf). The report points that a better fix could be to - check the return value of :c:func:`TIFFFlushData1` in places where it - isn't done currently, but it seems this patch is enough. - Reported as MSVR 35095. Discovered by Axel Souchet & Vishal - Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations - team. - -* :file:`libtiff/tif_pixarlog.c`: Fix write buffer overflow in - :c:func:`PixarLogEncode` if more input samples are provided than - expected by :c:func:`PixarLogSetupEncode`. Idea based on - :file:`libtiff-CVE-2016-3990.patch` from - :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro, but with - different and simpler check. (:bugzilla:`2544`) - -* :file:`libtiff/tif_read.c`: Fix out-of-bounds read on memory-mapped - files in :c:func:`TIFFReadRawStrip1` and :c:func:`TIFFReadRawTile1` when - ``stripoffset`` is beyond :c:type:`tmsize_t` max value (reported by Mathias - Svensson) - -* :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadEncodedStrip` and - :c:func:`TIFFReadEncodedTile` directly use user provided buffer when - no compression (and other conditions) to save a :c:func:`memcpy` - -* :file:`libtiff/tif_write.c`: make :c:func:`TIFFWriteEncodedStrip` and - :c:func:`TIFFWriteEncodedTile` directly use user provided buffer when - no compression to save a :c:func:`memcpy`. - -* :file:`libtiff/tif_luv.c`: validate that for :c:macro:`COMPRESSION_SGILOG` and - :c:macro:`PHOTOMETRIC_LOGL`, there is only one sample per pixel. Avoid - potential invalid memory write on corrupted/unexpected images - when using the :c:func:`TIFFRGBAImageBegin` interface (reported by - Clay Wood) - -* :file:`libtiff/tif_pixarlog.c`: fix potential buffer write overrun in - :c:func:`PixarLogDecode` on corrupted/unexpected images (reported by - Mathias Svensson) (:cve:`2016-5875`) - -* libtiff/libtiff.def: Added ``_TIFFMultiply32`` and - ``_TIFFMultiply64`` to libtiff.def - -* :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Add a '1' to the - :c:macro:`HAVE_SNPRINTF` definition. - -* :file:`libtiff/tif_config.vc.h` (:c:macro:`HAVE_SNPRINTF`): Applied patch by - Edward Lam to define :c:macro:`HAVE_SNPRINTF` for Visual Studio 2015. - -* :file:`libtiff/tif_dirread.c`: when compiled with :c:macro:`DEFER_STRILE_LOAD`, - fix regression, introduced on 2014-12-23, when reading a - one-strip file without a ``StripByteCounts`` tag. GDAL #6490 - -* :file:`libtiff/*`: upstream typo fixes (mostly contributed by Kurt - Schwehr) coming from GDAL internal libtiff - -* :file:`libtiff/tif_fax3.h`: make :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` - structure a :c:type:`uint16` to reduce size of the binary. - -* :file:`libtiff/tif_read.c`, :file:`tif_dirread.c`: fix indentation issues - raised by GCC 6 ``-Wmisleading-indentation`` - -* :file:`libtiff/tif_pixarlog.c`: avoid zlib error messages to pass a - :c:macro:`NULL` string to ``%s`` formatter, which is undefined behaviour in - :c:func:`sprintf`. - -* :file:`libtiff/tif_next.c`: fix potential out-of-bound write in :c:func:`NeXTDecode` - triggered by ``_ - (:bugzilla:`2508`) - -* :file:`libtiff/tif_luv.c`: fix potential out-of-bound writes in - decode functions in non debug builds by replacing :c:func:`assert` by - regular ``if`` checks (:bugzilla:`2522`). Fix potential - out-of-bound reads in case of short input data. - -* :file:`libtiff/tif_getimage.c`: fix out-of-bound reads in - :c:type:`TIFFRGBAImage` interface in case of unsupported values of - ``SamplesPerPixel``/``ExtraSamples`` for LogLUV / CIELab. Add explicit - call to :c:func:`TIFFRGBAImageOK` in :c:func:`TIFFRGBAImageBegin`. Fix - :cve:`2015-8665` reported by limingxing and :cve:`2015-8683` - reported by zzf of Alibaba. - -* :file:`libtiff/tif_dirread.c`: workaround false positive warning of - Clang Static Analyzer about :c:macro:`NULL` pointer dereference in - :c:func:`TIFFCheckDirOffset`. - -* :file:`libtiff/tif_fax3.c`: remove dead assignment in - :c:func:`Fax3PutEOLgdal`. Found by Clang Static Analyzer - -* :file:`libtiff/tif_dirwrite.c`: fix truncation to 32 bit of file - offsets in :c:func:`TIFFLinkDirectory` and :c:func:`TIFFWriteDirectorySec` - when aligning directory offsets on a even offset (affects - BigTIFF). This was a regression of the changeset of - 2015-10-19. - -* :file:`libtiff/tif_write.c`: :c:func:`TIFFWriteEncodedStrip` and - :c:func:`TIFFWriteEncodedTile` should return -1 in case of failure of - :c:func:`tif_encodestrip` as documented - -* :file:`libtiff/tif_dumpmode.c`: :c:func:`DumpModeEncode` should return 0 in - case of failure so that the above mentioned functions detect - the error. - -* :file:`libtiff/*.c`: fix MSVC warnings related to cast shortening and - assignment within conditional expression - -* :file:`libtiff/*.c`: fix clang -Wshorten-64-to-32 warnings - -* :file:`libtiff/tif_dirread.c`: prevent reading ColorMap or - TransferFunction if ``BitsPerPixel`` > 24, so as to avoid huge - memory allocation and file read attempts - -* :file:`libtiff/tif_dirread.c`: remove duplicated assignment (reported - by Clang static analyzer) - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirinfo.c`, - :file:`libtiff/tif_compress.c`, :file:`libtiff/tif_jpeg_12.c`: suppress - warnings about 'no previous declaration/prototype' - -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_dirwrite.c`: suffix constants - by U to fix 'warning: negative integer implicitly converted to - unsigned type' warning (part of ``-Wconversion``) - -* :file:`libtiff/tif_dir.c`, :file:`libtiff/tif_dirread.c`, - :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_print.c`: fix ``-Wshadow`` - warnings (only in :file:`libtiff/`) - - -Tools changes -------------- - -* tools/Makefile.am: The libtiff tools :program:`bmp2tiff`, :program:`gif2tiff`, - :program:`ras2tiff`, :program:`sgi2tiff`, :program:`sgisv`, and :program:`ycbcr` are completely removed - from the distribution. The libtiff tools :program:`rgb2ycbcr` and - :program:`thumbnail` are only built in the build tree for testing. Old - files are put in new :file:`archive` subdirectory of the source - repository, but not in distribution archives. These changes - are made in order to lessen the maintenance burden. - -* :file:`tools/tiff2pdf.c`: avoid undefined behaviour related to - overlapping of source and destination buffer in :c:func:`memcpy` call - in :c:func:`t2p_sample_rgbaa_to_rgb` Fixes - :bugzilla:`2577` - -* :file:`tools/tiff2pdf.c`: fix potential integer overflows on 32 bit - builds in :c:func:`t2p_read_tiff_size` Fixes - :bugzilla:`2576` - -* :file:`tools/fax2tiff.c`: fix segfault when specifying ``-r`` without - argument. Patch by Yuriy M. Kaminskiy. Fixes - :bugzilla:`2572` - -* :file:`tools/tiffinfo.c`: fix out-of-bound read on some tiled images. - (:bugzilla:`2517`) - -* :file:`tools/tiffcrop.c`: fix multiple uint32 overflows in - :c:func:`writeBufferToSeparateStrips`, :c:func:`writeBufferToContigTiles` and - :c:func:`writeBufferToSeparateTiles` that could cause heap buffer - overflows. Reported by Henri Salo from Nixu Corporation. - Fixes :bugzilla:`2592` - -* :file:`tools/tiffcrop.c`: fix out-of-bound read of up to 3 bytes in - :c:func:`readContigTilesIntoBuffer`. Reported as MSVR 35092 by Axel - Souchet & Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix write buffer overflow of 2 bytes on - JPEG compressed images. Reported by Tyler Bohan of Cisco Talos - as TALOS-CAN-0187 / :cve:`2016-5652`. Also prevents writing 2 - extra uninitialized bytes to the file stream. - -* :file:`tools/tiffcp.c`: fix out-of-bounds write on tiled images with odd - tile width vs image width. Reported as MSVR 35103 - by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix read -largely- outsize of buffer in - :c:func:`t2p_readwrite_pdf_image_tile`, causing crash, when reading a - JPEG compressed image with :c:macro:`TIFFTAG_JPEGTABLES` length being - one. Reported as MSVR 35101 by Axel Souchet and Vishal - Chauhan from the MSRC Vulnerabilities & Mitigations team. - -* :file:`tools/tiffcp.c`: fix read of undefined variable in case of - missing required tags. Found on test case of MSVR 35100. - -* :file:`tools/tiffcrop.c`: fix read of undefined buffer in - :c:func:`readContigStripsIntoBuffer` due to uint16 overflow. Probably - not a security issue but I can be wrong. Reported as MSVR - 35100 by Axel Souchet from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiffcrop.c`: fix various out-of-bounds write - vulnerabilities in heap or stack allocated buffers. Reported - as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel - Souchet and Vishal Chauhan from the MSRC Vulnerabilities & - Mitigations team. - -* :file:`tools/tiff2pdf.c`: fix out-of-bounds write vulnerabilities in - heap allocate buffer in :c:func:`t2p_process_jpeg_strip`. Reported as - MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from - the MSRC Vulnerabilities & Mitigations team. - -* :file:`tools/tiff2bw.c`: fix weight computation that could result of - color value overflow (no security implication). Fix :bugzilla:`2550`. - Patch by Frank Freudenberg. - -* :file:`tools/rgb2ycbcr.c`: validate values of ``-v`` and ``-h`` parameters to - avoid potential divide by zero. Fixes :cve:`2016-3623` (:bugzilla:`2569`) - -* :file:`tools/tiffcrop.c`: Fix out-of-bounds write in :c:func:`loadImage`. - From patch :file:`libtiff-CVE-2016-3991.patch` from - :file:`libtiff-4.0.3-25.el7_2.src.rpm` by Nikola Forro (:bugzilla:`2543`) - -* :file:`tools/tiff2rgba.c`: Fix integer overflow in size of allocated - buffer, when ``-b`` mode is enabled, that could result in - out-of-bounds write. Based initially on patch - :file:`tiff-CVE-2016-3945.patch` from :file:`libtiff-4.0.3-25.el7_2.src.rpm` - by Nikola Forro, with correction for invalid tests that - rejected valid files. (:bugzilla:`2545`) - -* :file:`tools/tiffcrop.c`: Avoid access outside of stack allocated - array on a tiled separate TIFF with more than 8 samples per - pixel. Reported by Kaixiang Zhang of the Cloud Security Team, - Qihoo 360 (:cve:`2016-5321` / :cve:`2016-5323` , :bugzilla:`2558` / - :bugzilla:`2559`) - -* :file:`tools/tiffdump.c`: fix a few misaligned 64-bit reads warned by - ``-fsanitize`` - -* :file:`tools/tiffdump.c` (:c:func:`ReadDirectory`): Remove :c:type:`uint32` cast to - :c:func:`_TIFFmalloc` argument which resulted in Coverity report. - Added more multiplication overflow checks. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.0.8.rst b/third_party/libtiff/doc/releases/v4.0.8.rst deleted file mode 100644 index 576f55c..0000000 --- a/third_party/libtiff/doc/releases/v4.0.8.rst +++ /dev/null @@ -1,390 +0,0 @@ -Changes in TIFF v4.0.8 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.8 (:tag:`Release-v4-0-8`) - Previous Version :doc:`v4.0.7 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* None - - -Library changes ---------------- - -* :file:`libtiff/tif_getimage.c`, :file:`libtiff/tif_open.c`: add parenthesis - to fix cppcheck ``clarifyCalculation`` warnings - -* :file:`libtiff/tif_predict.c`, :file:`libtiff/tif_print.c`: fix printf - unsigned vs signed formatting (cppcheck - ``invalidPrintfArgType_uint`` warnings) - -* :file:`libtiff/tif_read.c`, :file:`libtiff/tiffiop.h`: fix :c:type:`uint32` overflow in - :c:func:`TIFFReadEncodedStrip` that caused an integer division by - zero. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2596` - -* :file:`libtiff/tif_pixarlog.c`, :file:`libtiff/tif_luv.c`: fix heap-based - buffer overflow on generation of PixarLog / LUV compressed - files, with ``ColorMap``, ``TransferFunction`` attached and nasty - plays with ``bitspersample``. The fix for LUV has not been - tested, but suffers from the same kind of issue of PixarLog. - Reported by Agostino Sarubbo. Fixes - :bugzilla:`2604` - -* :file:`libtiff/tif_strip.c`: revert the change in - :c:func:`TIFFNumberOfStrips` done for - :bugzilla:`2587` / - :cve:`2016-9273` since the above change is a better fix that - makes it unnecessary. - -* :file:`libtiff/tif_dirread.c`: modify :c:func:`ChopUpSingleUncompressedStrip` - to instantiate compute ``nstrips`` as - ``TIFFhowmany_32(td->td_imagelength, rowsperstrip)``, instead of a - logic based on the total size of data. Which is faulty is the - total size of data is not sufficient to fill the whole image, - and thus results in reading outside of the - ``StripByCounts``/``StripOffsets`` arrays when using - :c:func:`TIFFReadScanline`. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2608`. - -* :file:`libtiff/tif_ojpeg.c`: make :c:func:`OJPEGDecode` early exit in case of - failure in :c:func:`OJPEGPreDecode`. This will avoid a divide by zero, - and potential other issues. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2611` - -* :file:`libtiff/tif_write.c`: fix misleading indentation as warned by GCC. - - -* :file:`libtiff/tif_fax3.h`: revert change done on 2016-01-09 that - made :c:member:`Param` member of :c:struct:`TIFFFaxTabEnt` structure a :c:type:`uint16` to - reduce size of the binary. It happens that the Hylafax - software uses the tables that follow this typedef - (:c:var:`TIFFFaxMainTable`, :c:var:`TIFFFaxWhiteTable`, :c:var:`TIFFFaxBlackTable`), - although they are not in a public libtiff header. Raised by - Lee Howard. Fixes - :bugzilla:`2636` - -* :file:`libtiff/tiffio.h`, :file:`libtiff/tif_getimage.c`: add - :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` variants of - the functions without ext, with an extra argument to control - the ``stop_on_error`` behaviour. - -* :file:`libtiff/tif_getimage.c`: fix potential memory leaks in error - code path of :c:func:`TIFFRGBAImageBegin`. Fixes - :bugzilla:`2627` - -* :file:`libtiff/tif_jpeg.c`: increase libjpeg max memory usable to 10 - MB instead of libjpeg 1MB default. This helps when creating - files with "big" tile, without using libjpeg temporary files. - Related to https://trac.osgeo.org/gdal/ticket/6757 - -* :file:`libtiff/tif_jpeg.c`: avoid integer division by zero in - :c:func:`JPEGSetupEncode` when horizontal or vertical sampling is set - to 0. Fixes :bugzilla:`2653` - -* :file:`libtiff/tif_dirwrite.c`: in - :c:func:`TIFFWriteDirectoryTagCheckedRational`, replace assertion by - runtime check to error out if passed value is strictly - negative. Fixes - :bugzilla:`2535` - -* :file:`libtiff/tif_dirread.c`: avoid division by floating point 0 in - :c:func:`TIFFReadDirEntryCheckedRational` and - :c:func:`TIFFReadDirEntryCheckedSrational`, and return 0 in that case - (instead of infinity as before presumably) Apparently some - sanitizers do not like those divisions by zero. Fixes - :bugzilla:`2644` - -* :file:`libtiff/tif_dir.c`, :file:`tif_dirread.c`, :file:`tif_dirwrite.c`: implement - various clampings of double to other data types to avoid - undefined behaviour if the output range isn't big enough to - hold the input value. Fixes - :bugzilla:`2643`, - :bugzilla:`2642`, - :bugzilla:`2646`, - :bugzilla:`2647` - -* :file:`libtiff/tif_jpeg.c`: validate ``BitsPerSample`` in - :c:func:`JPEGSetupEncode` to avoid undefined behaviour caused by - invalid shift exponent. Fixes - :bugzilla:`2648` - -* :file:`libtiff/tif_read.c`: avoid potential undefined behaviour on - signed integer addition in :c:func:`TIFFReadRawStrip1` in :c:func:`isMapped` - case. Fixes :bugzilla:`2650` - -* :file:`libtiff/tif_getimage.c`: add explicit :c:func:`uint32` cast in - :c:var:`putagreytile` to avoid ``UndefinedBehaviorSanitizer`` warning. - Patch by Nicolás Peña. Fixes - :bugzilla:`2658` - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFReadBufferSetup`: use :c:func:`_TIFFcalloc` - to zero initialize :c:member:`tif_rawdata`. Fixes - :bugzilla:`2651` - -* :file:`libtiff/tiffio.h`, :file:`tif_unix.c`, :file:`tif_win32.c`, :file:`tif_vms.c`: add - :c:func:`_TIFFcalloc` - -* :file:`libtiff/tif_luv.c`, :file:`tif_lzw.c`, :file:`tif_packbits.c`: return 0 in - Encode functions instead of -1 when :c:func:`TIFFFlushData1` fails. - Fixes :bugzilla:`2130` - -* :file:`libtiff/tif_ojpeg.c`: fix leak in - :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, - :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and - :c:func:`OJPEGReadHeaderInfoSecTablesAcTable` when read fails. Patch by - Nicolás Peña. Fixes - :bugzilla:`2659` - -* :file:`libtiff/tif_jpeg.c`: only run :c:func:`JPEGFixupTagsSubsampling` if - the ``YCbCrSubsampling`` tag is not explicitly present. This helps - a bit to reduce the I/O amount when the tag is present - (especially on cloud hosted files). - -* :file:`libtiff/tif_lzw.c`: in :c:func:`LZWPostEncode`, increase, if - necessary, the code bit-width after flushing the remaining - code and before emitting the EOI code. Fixes - :bugzilla:`1982` - -* :file:`libtiff/tif_pixarlog.c`: fix memory leak in error code path of - :c:func:`PixarLogSetupDecode`. Patch by Nicolás Peña. Fixes - :bugzilla:`2665` - -* :file:`libtiff/tif_fax3.c`, :file:`tif_predict.c`, :file:`tif_getimage.c`: fix GCC 7 - ``-Wimplicit-fallthrough`` warnings. - -* :file:`libtiff/tif_dirread.c`: fix memory leak in non - :c:macro:`DEFER_STRILE_LOAD` mode (ie default) when there is both a - ``StripOffsets`` and ``TileOffsets`` tag, or a ``StripByteCounts`` and - ``TileByteCounts``. Fixes - :bugzilla:`2689` - -* :file:`libtiff/tif_ojpeg.c`: fix potential memory leak in - :c:func:`OJPEGReadHeaderInfoSecTablesQTable`, - :c:func:`OJPEGReadHeaderInfoSecTablesDcTable` and - :c:func:`OJPEGReadHeaderInfoSecTablesAcTable`. Patch by Nicolás Peña. - Fixes :bugzilla:`2670` - -* :file:`libtiff/tif_fax3.c`: avoid crash in :c:func:`Fax3Close` on empty file. - Patch by Alan Coopersmith + complement by myself. Fixes - :bugzilla:`2673` - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip`: add limitation to the - number of bytes read in case ``td_stripbytecount[strip]`` is - bigger than reasonable, so as to avoid excessive memory - allocation. - -* :file:`libtiff/tif_zip.c`, :file:`tif_pixarlog.c`, :file:`tif_predict.c`: fix memory - leak when the underlying codec (ZIP, PixarLog) succeeds its - :c:func:`setupdecode` method, but :c:func:`PredictorSetup` fails. Credit to - OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` and :c:func:`TIFFFillTile`: avoid - excessive memory allocation in case of shorten files. Only - effective on 64 bit builds and non-mapped cases. Credit to - OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial` / :c:func:`TIFFSeek`, - avoid potential integer overflows with read_ahead in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. Should - especially occur on 32 bit platforms. - -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStripPartial`: avoid excessive - memory allocation in case of shorten files. Only effective on - 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_read.c`: update :c:member:`tif_rawcc` in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with :c:member:`tif_rawdataloaded` when - calling :c:func:`TIFFStartStrip` or :c:func:`TIFFFillStripPartial`. This - avoids reading beyond :c:func:`tif_rawdata` when ``bytecount > - tif_rawdatasize``. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. - Credit to OSS-Fuzz - -* :file:`libtiff/tif_color.c`: avoid potential :c:type:`int32` overflow in - :c:func:`TIFFYCbCrToRGBInit`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_pixarlog.c`, :file:`tif_luv.c`: avoid potential :c:type:`int32` - overflows in :c:func:`multiply_ms` and :c:func:`add_ms`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_packbits.c`: fix out-of-buffer read in - :c:func:`PackBitsDecode`. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 - Credit to OSS-Fuzz - -* :file:`libtiff/tif_luv.c`: :c:func:`LogL16InitState`: avoid excessive memory - allocation when ``RowsPerStrip`` tag is missing. - Credit to OSS-Fuzz (locally run, on GDAL) - -* :file:`libtiff/tif_lzw.c`: update dec_bitsleft at beginning of - LZWDecode(), and update tif_rawcc at end of LZWDecode(). This - is needed to properly work with the latest changes in - tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. - -* :file:`libtiff/tif_pixarlog.c`: :c:func:`PixarLogDecode`: resync :c:member:`tif_rawcp` - with :c:member:`next_in` and :c:member:`tif_rawcc` with :c:member:`avail_in` at beginning and end - of function, similarly to what is done in :c:func:`LZWDecode`. Likely - needed so that it works properly with latest changes in - :file:`tif_read.c` in :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode. But untested... - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: add basic - validation of :c:var:`luma` and :c:var:`refBlackWhite` coefficients (just check - they are not NaN for now), to avoid potential :c:expr:`float` to :c:expr:`int` - overflows. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 - Credit to OSS Fuzz - -* :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast - of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` - is not zero to avoid division by zero. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -* :file:`libtiff/tif_read.c`: :c:func:`_TIFFVSetField`: fix outside range cast - of :c:expr:`double` to :c:expr:`float`. Credit to Google Autofuzz project - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: check ``luma[1]`` - is not zero to avoid division by zero. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 - Credit to OSS Fuzz - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter - validation for :c:var:`refBlackWhite` coefficients values. To avoid - invalid :c:expr:`float` to :c:expr:`int32` conversion. Fixes - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 - Credit to OSS Fuzz - - -Tools changes -------------- - -* :file:`tools/fax2tiff.c` (:c:func:`main`): Applied patch by Jörg Ahrens to fix - passing client data for Win32 builds using :file:`tif_win32.c` - (:c:macro:`USE_WIN32_FILEIO` defined) for file I/O. Patch was provided - via email on November 20, 2016. - -* :file:`tools/tiffcp.c`: avoid :c:type:`uint32` underflow in :c:func:`cpDecodedStrips` - that can cause various issues, such as buffer overflows in the - library. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2598` - -* :file:`tools/tiffcrop.c`: fix :c:func:`readContigStripsIntoBuffer` in ``-i`` - (ignore) mode so that the output buffer is correctly - incremented to avoid write outside bounds. Reported by - Agostino Sarubbo. Fixes - :bugzilla:`2620` - -* :file:`tools/tiffcrop.c`: add 3 extra bytes at end of strip buffer in - :c:func:`readSeparateStripsIntoBuffer` to avoid read outside of heap - allocated buffer. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2621` - -* :file:`tools/tiffcrop.c`: fix integer division by zero when - ``BitsPerSample`` is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2619` - -* :file:`tools/tiffinfo.c`: fix null pointer dereference in ``-r`` mode - when the image has no ``StripByteCount`` tag. Reported by - Agostino Sarubbo. Fixes - :bugzilla:`2594` - -* :file:`tools/tiffcp.c`: avoid potential division by zero if - ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2597` - -* :file:`tools/tif_dir.c`: when ``TIFFGetField(, TIFFTAG_NUMBEROFINKS, )`` - is called, limit the return number of inks to ``SamplesPerPixel``, - so that code that parses ink names doesn't go past the end of - the buffer. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2599` - -* :file:`tools/tiffcp.c`: avoid potential division by zero if - ``BitsPerSamples`` tag is missing. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2607` - -* :file:`tools/tiffcp.c`: fix :c:type:`uint32` underflow/overflow that can cause - heap-based buffer overflow. Reported by Agostino Sarubbo. - Fixes :bugzilla:`2610` - -* :file:`tools/tiffcp.c`: replace ``assert( (bps % 8) == 0 )`` by a non - assert check. Reported by Agostino Sarubbo. Fixes - :bugzilla:`2605` - -* :file:`tools/tiff2ps.c`: fix 2 heap-based buffer overflows (in - :c:func:`PSDataBW` and :c:func:`PSDataColorContig`). Reported by Agostino Sarubbo. - Fixes :bugzilla:`2633` and - :bugzilla:`2634`. - -* :file:`tools/tiff2pdf.c`: prevent heap-based buffer overflow in ``-j`` - mode on a paletted image. Note: this fix errors out before the - overflow happens. There could probably be a better fix. Fixes - :bugzilla:`2635` - -* :file:`tools/tiff2pdf.c`: fix wrong usage of :c:func:`memcpy` that can - trigger unspecified behaviour. Fixes - :bugzilla:`2638` - -* :file:`tools/tiff2pdf.c`: avoid potential invalid memory read in - :c:func:`t2p_writeproc`. Fixes - :bugzilla:`2639` - -* :file:`tools/tiff2pdf.c`: avoid potential heap-based overflow in - :c:func:`t2p_readwrite_pdf_image_tile`. Fixes - :bugzilla:`2640` - -* :file:`tools/tiffcrop.c`: remove extraneous :c:func:`TIFFClose` in error code - path, that caused double free. Related to - :bugzilla:`2535` - -* :file:`tools/tiffcp.c`: error out cleanly in :c:func:`cpContig2SeparateByRow` - and :c:func:`cpSeparate2ContigByRow` if ``BitsPerSample != 8`` to avoid heap - based overflow. Fixes - :bugzilla:`2656` and - :bugzilla:`2657` - -* :file:`tools/raw2tiff.c`: avoid integer division by zero. Fixes - :bugzilla:`2631` - -* :file:`tools/tiff2ps.c`: call :c:func:`TIFFClose` in error code paths. - -* :file:`tools/fax2tiff.c`: emit appropriate message if the input file - is empty. Patch by Alan Coopersmith. Fixes - :bugzilla:`2672` - -* :file:`tools/tiff2bw.c`: close :c:struct:`TIFF` handle in error code path. Fixes - :bugzilla:`2677` - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.0.9.rst b/third_party/libtiff/doc/releases/v4.0.9.rst deleted file mode 100644 index 7a5318d..0000000 --- a/third_party/libtiff/doc/releases/v4.0.9.rst +++ /dev/null @@ -1,317 +0,0 @@ -Changes in TIFF v4.0.9 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.0.9 (:tag:`Release-v4-0-9`) - Previous Version :doc:`v4.0.8 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here: - - -Major changes -------------- - -* None - - -Software configuration changes ------------------------------- - -* :file:`test/Makefile.am`: Add some tests for tiff2bw. -* :file:`.appveyor.yml`, :file:`.travis.yml`, :file:`build/travis-ci`: apply patches - :file:`0001-ci-Travis-script-improvements.patch` and - :file:`0002-ci-Invoke-helper-script-via-shell.patch` by Roger Leigh - (sent to mailing list) -* :file:`.travis.yml`, :file:`build/travis-ci`: new files from - :file:`0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch` by - Roger Leigh (sent to mailing list on 2017-06-08). - This patch adds support for the Travis-CI service. -* :file:`.appveyor.yml`: new file from - :file:`0002-ci-Add-AppVeyor-support.patch` by Roger Leigh (sent to mailing - list on 2017-06-08). - This patch adds a :file:`.appveyor.yml` file to the top-level. This allows - one to opt in to having a branch built on Windows with Cygwin, - MinGW and MSVC automatically when a branch is pushed to GitHub, - GitLab, BitBucket or any other supported git hosting service. -* :file:`CMakeLists.txt`, :file:`test/CMakeLists.txt`, :file:`test/TiffTestCommon.cmake`: apply - patch :file:`0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch` from Roger - Leigh (sent to mailing list on 2017-06-08). - This patch makes the CMake build system support running the tests - with MinGW or Cygwin. - -* :file:`test/tiffcp-lzw-compat.sh`, :file:`test/images/quad-lzw-compat.tiff`: new files - to test old-style LZW decompression -* :file:`test/common.sh`, :file:`Makefile.am`, :file:`CMakeList.txt`: updated with above -* :file:`test/Makefile.am`: add missing reference to images/quad-lzw-compat.tiff - to fix ``make distcheck``. Patch by Roger Leigh -* :file:`nmake.opt`: support a ``DEBUG=1`` option, so as to adjust ``OPTFLAGS`` and use - ``/MDd`` runtime in debug mode. - - -Library changes ---------------- - -* :file:`libtiff/tif_color.c`: :c:func:`TIFFYCbCrToRGBInit`: stricter clamping to avoid - :c:type:`int32` overflow in :c:func:`TIFFYCbCrtoRGB`. - Fixes :oss-fuzz:`1844`. - Credit to OSS Fuzz - -* :file:`libtiff/tif_getimage.c`: :c:func:`initYCbCrConversion`: stricter validation for - ``refBlackWhite`` coefficients values. To avoid invalid ``float->int32`` conversion - (when ``refBlackWhite[0] == 2147483648.f``) - Fixes :oss-fuzz:`1907`. - Credit to OSS Fuzz - -* :file:`libtiff/tif_dirinfo.c`, :file:`tif_dirread.c`: add :c:func:`_TIFFCheckFieldIsValidForCodec`, - and use it in :c:func:`TIFFReadDirectory` so as to ignore fields whose tag is a - codec-specified tag but this codec is not enabled. This avoids :c:func:`TIFFGetField` - to behave differently depending on whether the codec is enabled or not, and - thus can avoid stack based buffer overflows in a number of TIFF utilities - such as :program:`tiffsplit`, :program:`tiffcmp`, :program:`thumbnail`, etc. - Patch derived from :file:`0063-Handle-properly-CODEC-specific-tags.patch` - (:bugzilla:`2580`) by Raphaël Hertzog. - Fixes: - :bugzilla:`2580`, - :bugzilla:`2693`, - :bugzilla:`2625` (:cve:`2016-10095`), - :bugzilla:`2564` (:cve:`2015-7554`), - :bugzilla:`2561` (:cve:`2016-5318`), - :bugzilla:`2499` (:cve:`2014-8128`), - :bugzilla:`2441`, - :bugzilla:`2433`. - -* :file:`libtiff/tif_swab.c`: if :c:macro:`DISABLE_CHECK_TIFFSWABMACROS` is defined, do not do - the ``#ifdef TIFFSwabXXX`` checks. Make it easier for GDAL to rename the symbols - of its internal libtiff copy. - -* :file:`libtiff/tif_dirread.c`: fix regression of libtiff 4.0.8 in - :c:func:`ChopUpSingleUncompressedStrip` regarding update of newly single-strip - uncompressed files whose bytecount is 0. Before the change of 2016-12-03, - the condition ``bytecount==0`` used to trigger an early exit/disabling of - strip chop. Re-introduce that in update mode. Otherwise this cause - later incorrect setting for the value of ``StripByteCounts``/``StripOffsets``. - (:gdal-trac:`6924`). -* :file:`libtiff/tif_dirread.c`: :c:func:`TIFFFetchStripThing`: limit the number of items - read in ``StripOffsets``/``StripByteCounts`` tags to the number of strips to avoid - excessive memory allocation. - Fixes :oss-fuzz:`2215`. - Credit to OSS Fuzz -* :file:`libtiff/tif_getimage.c`: avoid many (harmless) :c:expr:`unsigned int` overflows. -* :file:`libtiff/tif_fax3.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`Fax3Encode2DRow`. Could - potentially be a bug with huge rows. -* :file:`libtiff/tif_jpeg.c`: avoid (harmless) :c:expr:`unsigned int` overflow on tiled images. -* :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` - and ``BYTECOUNTLOOKSBAD`` when file is too short. -* :file:`libtiff/tif_predict.c`: decorate legitimate functions where :c:expr:`unsigned int` - overflow occur with :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` -* :file:`libtiff/tif_dirread.c`: avoid :c:expr:`unsigned int` overflow in :c:func:`EstimateStripByteCounts` -* :file:`libtiff/tiffiop.h`: add :c:macro:`TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW` macro to - disable CLang warnings raised by ``-fsanitize=undefined,unsigned-integer-overflow`` -* :file:`libtiff/tif_jpeg.c`: add anti-denial of service measure to avoid excessive - CPU consumption on progressive JPEGs with a huge number of scans. - See ``_. - - .. note:: - - Only affects libtiff since 2014-12-29 where support of non-baseline JPEG - was added. - -* :file:`libtiff/tif_jpeg.c`: error out at decoding time if anticipated libjpeg - memory allocation is above 100 MB. libjpeg in case of multiple scans, - which is allowed even in baseline JPEG, if components are spread over several - scans and not interleavedin a single one, needs to allocate memory (or - backing store) for the whole strip/tile. - See ``_. - This limitation may be overridden by setting the - ``LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC`` environment variable, or recompiling - libtiff with a custom value of :c:macro:`TIFF_LIBJPEG_LARGEST_MEM_ALLOC` macro. -* :file:`libtiff/tif_jbig.c`: fix memory leak in error code path of :c:func:`JBIGDecode`. - Fixes :bugzilla:`2706`. - Reported by team OWL337 -* :file:`libtiff/tif_dirread.c`: in :c:func:`TIFFReadDirEntryFloat`, check that a - double value can fit in a float before casting. Patch by Nicolas RUFF -* :file:`libtiff/tiffiop.h`, :file:`libtiff/tif_jpeg.c`, :file:`libtiff/tif_jpeg_12.c`, - :file:`libtiff/tif_read.c`: make :c:func:`TIFFReadScanline` works in - :c:macro:`CHUNKY_STRIP_READ_SUPPORT` mode with JPEG stream with multiple scans. - Also make configurable through a ``LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER`` - environment variable the maximum number of scans allowed. Defaults to - 100. -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillTile`: add limitation to the number - of bytes read in case td_stripbytecount[strip] is bigger than - reasonable, so as to avoid excessive memory allocation (similarly to - what was done for :c:func:`TIFFFileStrip` on 2017-05-10) -* :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadEncodedStripAndAllocBuffer`. - Fixes :bugzilla:`2708` and - :oss-fuzz:`2433`. - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedStripAndAllocBuffer` - function, variant of :c:func:`TIFFReadEncodedStrip` that allocates the - decoded buffer only after a first successful :c:func:`TIFFFillStrip`. This avoids - excessive memory allocation on corrupted files. -* :file:`libtiff/tif_dirwrite.c`: in :c:func:`TIFFWriteDirectoryTagCheckedXXXX` - functions associated with LONG8/SLONG8 data type, replace assertion that - the file is BigTIFF, by a non-fatal error. - Fixes :bugzilla:`2712` - Reported by team OWL337 -* :file:`libtiff/tif_read.c`: :c:func:`TIFFStartTile`: set tif_rawcc to - tif_rawdataloaded when it is set. Similarly to :c:func:`TIFFStartStrip`. - This issue was revealed by the change of 2017-06-30 in :c:func:`TIFFFileTile`, - limiting the number of bytes read. But it could probably have been hit - too in CHUNKY_STRIP_READ_SUPPORT mode previously ? - Fixes :oss-fuzz:`2454` - Credit to OSS Fuzz -* :file:`libtiff/tif_error.c, tif_warning.c`: correctly use va_list when both - an old-style and new-style warning/error handlers are installed. - Patch by Paavo Helde (sent on the mailing list) -* :file:`libtiff/tif_getimage.c`: use :c:func:`_TIFFReadTileAndAllocBuffer`. - Fixes :oss-fuzz:`2470` - Credit to OSS Fuzz. -* :file:`libtiff/tif_read.c`, tiffiop.h: add a :c:func:`_TIFFReadEncodedTileAndAllocBuffer` - and :c:func:`_TIFFReadTileAndAllocBuffer` variants of :c:func:`TIFFReadEncodedTile` and - :c:func:`TIFFReadTile` that allocates the decoded buffer only after a first - successful :c:func:`TIFFFillTile`. This avoids excessive memory allocation - on corrupted files. -* :file:`libtiff/tif_pixarlog.c`: avoid excessive memory allocation on decoding - when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) - Fixes :oss-fuzz:`2554` - Credit to OSS Fuzz -* :file:`libtiff/tif_lzw.c`: fix 4.0.8 regression in the decoding of old-style LZW - compressed files. -* :file:`libtiff/tif_lzw.c`: fix potential out-of-buffer read on 1-byte LZW - strips. Crashing issue only on memory mapped files, where the strip - offset is the last byte of the file, and the file size is a multiple - of one page size on the CPU architecture (typically 4096). Credit - to myself :-) -* :file:`libtiff/tif_dir.c`: avoid potential null pointer dereference in - :c:func:`_TIFFVGetField` on corrupted TIFFTAG_NUMBEROFINKS tag instance. - Fixes :bugzilla:`2713` -* :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" - mode on ``PlanarConfig=Contig`` input images. - Fixes :bugzilla:`2715` - Reported by team OWL337 -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. - Complementary fix for :bugzilla:`2708` - in the :c:func:`isMapped` case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. -* :file:`libtiff/tif_read.c`: :c:func:`TIFFFillStrip` / :c:func:`TIFFFillTile`. - Complementary fix for :bugzilla:`2708` - in the :c:func:`isMapped` case, so as to avoid excessive memory allocation - when we need a temporary buffer but the file is truncated. -* :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the - arrays that hold StripOffsets/StripByteCounts, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes :oss-fuzz:`2350` - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`: in :c:func:`TIFFFetchStripThing`, only grow the - arrays that hold ``StripOffsets``/``StripByteCounts``, when they are smaller - than the expected number of striles, up to 1 million striles, and - error out beyond. Can be tweaked by setting the environment variable - ``LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT``. - This partially goes against a change added on 2002-12-17 to accept - those arrays of wrong sizes, but is needed to avoid denial of services. - Fixes :oss-fuzz:`2350` - Credit to OSS Fuzz -* :file:`libtiff/tif_read.c`: add protection against excessive memory - allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes :bugzilla:`2675` -* :file:`libtiff/tif_read.c`: add protection against excessive memory - allocation attempts in :c:func:`TIFFReadDirEntryArray` on short files. - Effective for mmap'ed case. And non-mmap'ed case, but restricted - to 64bit builds. - Fixes :bugzilla:`2675` -* :file:`libtiff/tif_luv.c`: :c:func:`LogLuvInitState`: avoid excessive memory - allocation when ``RowsPerStrip`` tag is missing. - Fixes :oss-fuzz:`2683` - Credit to OSS-Fuzz -* :file:`libtiff/tif_getimage.c`: :c:func:`gtTileContig` and :c:func:`gtTileSeparate`: - properly break from loops on error when ``stoponerr`` is set, instead - of going on iterating on row based loop. -* :file:`libtiff/tif_getimage.c`: fix fromskew computation when to-be-skipped - pixel number is not a multiple of the horizontal subsampling, and - also in some other cases. Impact ``putcontig8bitYCbCr44tile``, - ``putcontig8bitYCbCr42tile``, ``putcontig8bitYCbCr41tile``, - ``putcontig8bitYCbCr21tile`` and ``putcontig8bitYCbCr12tile``. - Fixes :bugzilla:`2637` (discovered by Agostino Sarubbo) - and :oss-fuzz:`2691` (credit to OSS Fuzz) -* :file:`libtiff/tif_luv.c`: further reduce memory requirements for temporary - buffer when ``RowsPerStrip >= image_length`` in :c:func:`LogLuvInitState` and - :c:func:`LogL16InitState`. - Fixes :oss-fuzz:`2700` - Credit to OSS Fuzz -* :file:`libtiff/tif_dirwrite.c`: replace assertion related to not finding the - ``SubIFD`` tag by runtime check (in :c:func:`TIFFWriteDirectorySec`) - Fixes :bugzilla:`2727` - Reported by team OWL337 -* :file:`libtiff/tif_dirwrite.c`: replace assertion to tag value not fitting - on :c:type:`uint32` when selecting the value of ``SubIFD`` tag by runtime check - (in :c:func:`TIFFWriteDirectoryTagSubifd`). - Fixes :bugzilla:`2728` - Reported by team OWL337 -* :file:`libtiff/tif_jpeg.c`: accept reading the last strip of a JPEG compressed - file if the codestream height is larger than the truncated height of the - strip. Emit a warning in this situation since this is non compliant. -* :file:`libtiff/tiffiop.h`, :c:type:`tif_aux.c`: redirect :c:func:`SeekOK` macro to a :c:func:`_TIFFSeekoK` - function that checks if the offset is not bigger than :c:macro:`INT64_MAX`, so as - to avoid a ``-1`` error return code of :c:func:`TIFFSeekFile` to match a required - seek to :c:macro:`UINT64_MAX`/``-1``. - Fixes :bugzilla:`2726` - Adapted from proposal by Nicolas Ruff. -* :file:`libtiff/tif_dirread.c`: add :c:macro:`NULL` check to avoid likely false positive - null-pointer dereference warning by CLang Static Analyzer. -* :file:`libtiff/libtiff.def`: add :c:func:`TIFFReadRGBAStripExt` and :c:func:`TIFFReadRGBATileExt` - Fixes :bugzilla:`2735` -* :file:`libtiff/tif_jpeg.c`: add compatibility with libjpeg-turbo 1.5.2 that - honours ``max_memory_to_use > 0``. - Cf ``_. -* :file:`libtiff/tif_getimage.c`: avoid floating point division by zero in - :c:func:`initCIELabConversion` - Fixes :oss-fuzz:`3733` - Credit to OSS Fuzz - - -Tools changes -------------- - -* :file:`tools/tiff2pdf.c`: prevent heap buffer overflow write in "Raw" - mode on ``PlanarConfig=Contig`` input images. - Fixes :bugzilla:`2715` - Reported by team OWL337 -* :file:`tools/tiffset.c`: fix setting a single value for the ``ExtraSamples`` tag - (and other tags with variable number of values). - So ``tiffset -s ExtraSamples 1 X``. This only worked - when setting 2 or more values, but not just one. -* :file:`tools/fax2tiff.c` (``_FAX_Client_Data``): Pass ``FAX_Client_Data`` as the - client data. This client data is not used at all at the moment, - but it makes the most sense. Issue that the value of - ``client_data.fd`` was passed where a pointer is expected was reported - via email by Gerald Schade on Sun, 29 Oct 2017. -* :file:`tools/tiff2pdf.c` (``t2p_sample_realize_palette``): Fix possible - arithmetic overflow in bounds checking code and eliminate - comparison between signed and unsigned type. -* :file:`tools/tiff2bw.c` (:c:func:`main`): Free memory allocated in the :program:`tiff2bw` - program. This is in response to the report associated with - :cve:`2017-16232` but does not solve the extremely high memory usage - with the associated POC file. - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.1.0.rst b/third_party/libtiff/doc/releases/v4.1.0.rst deleted file mode 100644 index 112346f..0000000 --- a/third_party/libtiff/doc/releases/v4.1.0.rst +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v4.1.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.1.0 (:tag:`v4.1.0`) - Previous Version :doc:`v4.0.10 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document describes the changes made to the software between the -*previous* and *current* versions (see above). If you don't -find something listed here, then it was not done in this timeframe, or -it was not considered important enough to be mentioned. The following -information is located here. A change summary is also provided by the -:file:`ChangeLog` file included in the release package and by the Git commit -history: - - -Major changes -------------- - -* Make defer strile offset/bytecount loading available at runtime - and add per-strile offset/bytecount loading capabilities. Part of - this commit makes the behaviour that was previously met when libtiff - was compiled with ``-DDEFER_STRILE_LOAD`` available for default builds - when specifying the new ``D`` (Deferred) :c:func:`TIFFOpen` flag. In that - mode, the [``Tile``/``Strip``][``ByteCounts``/``Offsets``] arrays are only loaded - when first accessed. This can speed-up the opening of files stored - on the network when just metadata retrieval is needed. - - Another addition is the capability of loading only the values of - the offset/bytecount of the strile of interest instead of the - whole array. This is enabled with the new ``O`` (Ondemand) flag of - :c:func:`TIFFOpen` (which implies ``D``). - - The public :c:func:`TIFFGetStrileOffset`, - :c:func:`TIFFGetStrileOffsetWithErr`, - :c:func:`TIFFGetStrileByteCount` and - :c:func:`TIFFGetStrileByteCountWithErr` functions have been added to - API. They are of particular interest when using sparse files (with - ``offset == bytecount == 0``) and you want to detect if a strile is - present or not without decompressing the data, or updating an - existing sparse file. - -* The BigTIFF writer now optimizes file size by using 32-bit ``LONG`` - values (rather than 64-bit) where it is reasonable and safe to do - so. Likewise, the 16-bit ``SHORT`` type is used when possible for - ``StripByteCounts``/``TileByteCounts``. - - -Software configuration changes ------------------------------- - -* The ``WIN32`` build now uses :file:`tif_win32.c` when building with CMake. - -* Properly set value of :c:macro:`HOST_FILLORDER` to :c:macro:`LSB2MSB` for Windows - CMake builds. It was not being properly set! - - -Library changes ---------------- - -* Changes in the libtiff library may be viewed on-line - `Libtiff Library Commits `_.. - -* New function :c:func:`TIFFReadFromUserBuffer` which replaces the use of - :c:func:`TIFFReadEncodedStrip`/:c:func:`TIFFReadEncodedTile` when the user can - provide the buffer for the input data, for example when he wants - to avoid libtiff to read the strile offset/count values from the - ``[Strip|Tile][Offsets/ByteCounts]`` array. - -* New functions :c:func:`TIFFDeferStrileArrayWriting` and :c:func:`TIFFForceStrileArrayWriting`. - Those advanced writing functions must be used in a particular sequence - to make their intended effect. Their aim is to control when/where - the ``[Strip/Tile][Offsets/ByteCounts]`` arrays are written into the file. - - The purpose of this is to generate 'cloud-optimized geotiff' files where - the first KB of the file only contain the IFD entries without the potentially - large strile arrays. Those are written afterwards. - - -Tools changes -------------- - -* Changes in the libtiff utilities may be viewed on-line - at `Libtiff Tools Commits `_. - - -Contributed software changes ----------------------------- - -* Changes in the libtiff contrib area may be viewed on-line - at `Libtiff Contrib Commits `_. diff --git a/third_party/libtiff/doc/releases/v4.2.0.rst b/third_party/libtiff/doc/releases/v4.2.0.rst deleted file mode 100644 index e1e8d58..0000000 --- a/third_party/libtiff/doc/releases/v4.2.0.rst +++ /dev/null @@ -1,103 +0,0 @@ -Changes in TIFF v4.2.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.2.0 (:tag:`v4.2.0`) - Previous Version :doc:`v4.1.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - - -Major changes -------------- - -* Optional support for using libdeflate is added. -* Many of the tools now support a memory usage limit. - - -Software configuration changes ------------------------------- - -* The Microsoft Windows 'nmake' build is resuscitated and provides - a default ``HAVE_STRTOLL`` setting in 'nmake.opt' which is suitable for - MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in - order to compile with earlier compiler versions. - -* mingw-w64 cmake build fixes to not add libm - - -Library changes ---------------- - -* A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. -* EXIF 2.32 and GPS tags and functionality have been upgraded: - - * Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2 - * EXIF-GPS structure, tags and access functions are added as special ``CustomDirectory`` (like it was done for EXIF). - * Reading error for FileSource and SceneType tags corrected. - -* Make ``TIFFTAG_CFAPATTERN`` variable count. - -* Cmake configuration fixes for big-endian targets. - -* Added support for optional building against libdeflate for - faster Zip/Deflate compression/decompression. - - We now have 2 kinds of builds with the Zip/Deflate codec: - - * zlib only - * zlib + libdeflate - - Speed improvements in the 35%-50% range can be expected when libdeflate is used. - Compression level up to 12 is now supported (capped to 9 when zlib is used). - Still requires zlib for situations where libdeflate cannot be used (that - is for scanline access, since libdeflate has no streaming mode) - - Pseudo-tag ``TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE`` - is added to control which subcodec (zlib or libdeflate) should be used (it defaults - of course to libdeflate, when it is available). - This is mostly aimed at being used on the writing side, to be able to reproduce - output of previous libtiff versions at a binary level, in situations where this would - be really needed. Or as a safety belt in case there would be unforeseen issues - with using libdeflate. - It can be used to know when libdeflate is available at runtime (``DEFLATE_SUBCODEC_LIBDEFLATE`` - will be the default value in that situation). - - Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. - - -Tools changes -------------- - -* A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed. - -* :program:`ppm2tiff`: support any bps value from 1 to 16. - -* :program:`tiff2ps`, :program:`tiff2rgba`: A default memory limit is now enforced (256MiB) and a ``-M`` option is added to allow the user to adjust the limit. - -* :program:`tiff2pdf`, :program:`tiffcp`: A default memory limit is now enforced (256MiB) and a ``-m`` option is added to allow the user to adjust the limit. - -* :program:`tiffcrop`: A default memory limit is now enforced (256MiB) and a ``-k`` option is added to allow the user to adjust the limit. - -* :program:`tiff2pdf`: fix "raw" copy of Deflate streams. - -* :program:`tiff2pdf.c`: properly calculate datasize when saving to JPEG YCbCr - -* :program:`tiffcp`: disable strip chopping when trying to convert to JBIG compression - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.3.0.rst b/third_party/libtiff/doc/releases/v4.3.0.rst deleted file mode 100644 index 740efd6..0000000 --- a/third_party/libtiff/doc/releases/v4.3.0.rst +++ /dev/null @@ -1,85 +0,0 @@ -Changes in TIFF v4.3.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.3.0 (:tag:`v4.3.0`) - Previous Version :doc:`v4.2.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -* Build and usage of the library and its utilities requires a C99 capable - compiler. - -* New optional codec for the LERC (Limited Error Raster Compression) compression scheme. - To have it available, configure libtiff against the SDK available at - ``_ - -* CMake build: revamp of build scripts - -Software configuration changes ------------------------------- - -* cmake: revamp of the cmake build scripts. There are impacts on the case of - some options. - -* cmake: update minimum version and policy version to 3.9. - -* Remove NMake build support. The functionality provided by the NMake build - is now completely superseded by the CMake build. - -* Remove antiquated Scons and makefile.lcc build support. - -* Remove non-functional VMS and WinCE support. - -* :file:`autogen.sh` now updates :file:`config.guess` and :file:`config.sub` from master gnulib version. - -Library changes ---------------- - -* Use of :c:type:`int8`, :c:type:`uint8`, :c:type:`int16`, :c:type:`uint16`, - :c:type:`int32`, :c:type:`uint32`, :c:type:`int64`, :c:type:`uint64` - typedefs is now deprecated. libtiff code and headers no longer use them, - and use their C99 standard equivalents (with ``_t`` suffix). Those typedefs - are still available, with deprecation warnings, but external code is strongly - encouraged to use the corresponding C99 :file:`stdint.h` types. The deprecated - types might be removed in a future release. - -* Removal of unused, or now useless due to C99 availability, functions in :file:`port/` - -* A few issues spotted by static code analysis tools fixed. Compiler - warnings addressed. - -Tools changes -------------- - -* In usage text, insert a line of text summarizing each tool's purpose - -* tiff tools: made display of compression methods and their parameters - conditional on their actual availability - -* :program:`tiff2ps`: exit the loop in case of error (#232) - -* :program:`tiff2pdf`: check that tiff_datasize fits in a signed :c:type:`tsize_t` (#202) - -* :program:`tiffsplit`: exit with :c:macro:`EXIT_FAILURE` if there are extra args on the command line - -* :program:`tiffcmp`: fix comparison with pixels that are fractional number of bytes (#53) - -Contributed software changes ----------------------------- - -* :file:`iptcutil.c` - set ``#ifdef _WIN32`` (was ``#ifdef WIN32``, which failed at build time) diff --git a/third_party/libtiff/doc/releases/v4.4.0.rst b/third_party/libtiff/doc/releases/v4.4.0.rst deleted file mode 100644 index af8cacd..0000000 --- a/third_party/libtiff/doc/releases/v4.4.0.rst +++ /dev/null @@ -1,98 +0,0 @@ -Changes in TIFF v4.4.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.4.0 (:tag:`v4.4.0`) - Previous Version :doc:`v4.3.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Handle absolute paths in pkg-config file (:issue:`333`) -* Correct fix for the pkgconf file relative paths. -* cmake: allow running the tests with a read-only source directory. -* cmake: Fix ``STRIPCHOP_DEFAULT`` value in CMake builds. -* build: Fix static library imports in mingw related to LERC -* Fix version in :file:`libtiff-4.pc.in`, and CMake build: Add requirements to pc file -* cmake: Fix build with CMake 3.10. -* cmake: Export tiff targets. -* Make ``LERC_SUPPORT`` conditional on ``ZLIB_SUPPORT`` - -Library changes ---------------- - -New/improved functionalities: - -* :c:func:`TIFFIsBigTiff` function added. -* Functions :c:func:`TIFFFieldSetGetSize` and :c:func:`TIFFieldSetGetCountSize` added. -* :c:func:`LZWDecode`: major speed improvements (~30% faster) -* Predictor 2 (horizontal differentiation): support 64-bit -* Support libjpeg 9d - -Bug fixes: - -* Remove incorrect assert (:issue:`329`) -* avoid hang in :c:func:`TIFFRewriteDirectory` if a classic file > 4 GB is attempted to be created -* :file:`tif_jbig.c`: fix crash when reading a file with multiple IFD in memory-mapped mode and when bit reversal is needed (fixes :issue:`385`) -* :c:func:`TIFFFetchNormalTag`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`383`) -* :c:func:`TIFFWriteDirectoryTagData`: turn assertion on data length into a runtime check -* :c:func:`TIFFFetchStripThing`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) -* :c:func:`TIFFReadDirectory`: avoid calling :c:func:`memcpy` with a null source pointer and size of zero (fixes :issue:`362`) -* :c:func:`TIFFYCbCrToRGBInit`: avoid Integer-overflow -* ``TIFFGetField(TIFFTAG_STRIPBYTECOUNTS/TIFFTAG_STRIPOFFSETS)``: return error if returned pointer is NULL (fixes :issue:`342`) -* OJPEG: avoid assertion when using :c:func:`TIFFReadScanline` (fixes :issue:`337`) -* :c:func:`TIFFReadDirectory`: fix OJPEG hack (fixes :issue:`319`) -* LZW codec: fix support for strips/tiles > 2 GB on Windows -* :c:func:`TIFFAppendToStrip`: fix rewrite-in-place logic (fixes :issue:`309`) -* Fix :c:func:`TIFFRewriteDirectory` discarding directories. -* :c:func:`TIFFReadCustomDirectory`: avoid crash when reading SubjectDistance tag on a non EXIF directory (:issue:`316`) -* Fix Segmentation fault printing GPS directory if ``Altitude`` tag is present -* :file:`tif_jpeg.c`: do not emit progressive scans with mozjpeg. (:issue:`266`) -* :c:func:`_TIFFRewriteField`: fix when writing a IFD with a single tile that is a sparse one, on big endian hosts -* Fix all remaining uses of legacy Deflate compression id and warn on use. - -Tools changes -------------- - -Bug fixes: - -* :program:`tiffcrop`: Fix issue :issue:`330` and some more from 320 to 349. -* :program:`tiffcrop`: fix issue :issue:`395`: generation of strange section images. -* :program:`tiffcrop`: fix issue :issue:`380` and :issue:`382` heap buffer overflow in extractImageSection -* :program:`tiffcrop`: fix FPE (:issue:`393`) -* :program:`tiffcrop`: buffsize check formula in :c:func:`loadImage` amended (fixes :issue:`273`, :issue:`275`) -* :program:`tiffcrop.c`: Fix issue :issue:`352` heap-buffer-overflow by correcting :c:type:`uint32_t` underflow. -* :program:`tiff2pdf`: handle 8-bit palette colormap. -* :program:`tiffcp`: avoid buffer overflow in "mode" string (fixes :issue:`400`) -* :program:`tiffcp`: Fix incomprehensible setting of orientation tag (fixes :issue:`29`) -* :program:`tiffcp`: do not try to fetch compressor-specific tags when not appropriate (fixes :issue:`396`) -* :program:`tiffcp`: fix heap buffer overflow (:issue:`278`) -* :program:`tiff2ps`: In :c:func:`limitMalloc` check for negative size (fixes :issue:`284`) -* :program:`tiffinfo`: add a ``-M`` switch to define the maximum heap allocation, and default it to 256 MiB (fixes :issue:`287`, :issue:`290`) -* :program:`tiffinfo`: limit more memory allocations using ``-M`` switch (fixes :issue:`288`) -* :program:`tiffset`: fix global-buffer-overflow for ASCII tags where count is required (fixes :issue:`355`) -* :program:`raw2tiff`: check that band number if not zero to avoid floating point exception(fixes :issue:`338`) -* :program:`tiffinfo`/:program:`tiffdump`: improve output for GDAL tags. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.5.0.rst b/third_party/libtiff/doc/releases/v4.5.0.rst deleted file mode 100644 index a287b21..0000000 --- a/third_party/libtiff/doc/releases/v4.5.0.rst +++ /dev/null @@ -1,142 +0,0 @@ -Changes in TIFF v4.5.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.5.0 (:tag:`v4.5.0`) - Previous Version :doc:`v4.4.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -* Whole code base reformatting of .c/.h files using new .clang-format format -* Documentation changed from static HTML and man pages to Restructured Text - (rst). HTML and man pages are now build artifacts. - -Software configuration changes ------------------------------- - -* SONAME version bumped to 6 due to changes in symbol versioning. -* autoconf/cmake: detect (not yet released) libjpeg-turbo 2.2 to take into - its capability of handling both 8-bit JPEG and 12-bit JPEG in a single build. -* autoconf/cmake: detect sphinx-build to build HTML and man pages -* CMakeLists.txt: fix warning with -Wdev -* CMake: correctly set default value of 'lzma' option when liblzma is detected - (:issue:`482`) -* CMake: Moved linking of CMath::CMath into CMath_LIBRARY check. -* Fix CMake build to be compatible with FetchContent. -* cmake: Correct duplicate definition of _CRT_SECURE_NO_WARNINGS (:issue:`443`) -* cmake: Fixes for Visual Studio 2022. -* Adds Requires.private generation so that pkg-config can correctly find - the dependencies of libtiff. -* Fix dependency on libm on Android -* cmake: libtiffxx is static on win32 -* Fix build in tif_lzw.c -* CMake: Add options for disabling tools, tests, contrib and docs. - -Library changes ---------------- - -New/improved functionalities: - -* Addition of an open option concept with the new functions - :c:func:`TIFFOpenExt`, :c:func:`TIFFOpenWExt`, :c:func:`TIFFFdOpenExt`, - :c:func:`TIFFClientOpenExt`, :c:func:`TIFFOpenOptionsAlloc`, - :c:func:`TIFFOpenOptionsFree` -* Leveraging above mentioned open option concept, addition of a new capability - to limit the size of a single dynamic memory allocation done - by the library with :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` -* Leveraging above mentioned open option concept, addition of a new capability - to specify per-TIFF handle re-entrant error and warning callbacks - with :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` and - :c:func:`TIFFOpenOptionsSetWarningHandlerExtR` -* Related to IFD-Loop detection refactoring, the number of IFDs that libtiff - can browse through has been extended from 65535 to 1048576. This value is - a build-time setting that can be configured with CMake's TIFF_MAX_DIR_COUNT - variable or autoconf's --with-max-dir-count option. - -API/ABI breaks: - -* tdir_t type updated to uint32_t. This type is now used for the return value of - :c:func:`TIFFCurrentDirectory` and :c:func:`TIFFNumberOfDirectories`, and - as the argument of :c:func:`TIFFSetDirectory` and :c:func:`TIFFUnlinkDirectory` - -Bug fixes: - -* TIFFWriteRawStrip(): restore capabilities to append data in the current strip - (:issue:`489`) -* _TIFFReadEncodedTileAndAllocBuffer(): avoid excessive memory allocation on - broken files (:issue:`479`) -* TIFFReadRGBATileExt(): fix (unsigned) integer overflow on strips/tiles > 2 GB - (oss-fuzz #53137) -* Replace sprintf calls with snprintf to fix warnings on macOS 13 SDK -* Added warning messages for FIELD_IGNORE tags for writing and for - TIFF_SETGET_UNDEFINED for reading added. (:issue:`438`) -* tif_dirinfo.c: fix TIFFTAG_CLIPPATH tag declaration (:issue:`439`) -* tif_dirinfo.c: fix TIFFTAG_COMPRESSION and _BITSPERSAMPLE tag declaration - (:issue:`364`) -* Revised handling of TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value - (:issue:`149`, :issue:`150`, :issue:`152`, :issue:`168`, :issue:`250`, - :issue:`269`,:issue:`398`, CVE-2022-3599, :issue:`456`) -* TIFFAdvanceDirectory(): fix unsigned-integer-overflow in mapped case - (oss-fuzz #52309) -* Improved/fixes IFD-Loop Handling (:issue:`455`). -* Update getimage to support large raster images. -* Presetting of default tag values extended (e.g. PlanarConfig). (:issue:`449`) -* Deal with RichTIFFIPTC tag written with LONG type (:issue:`225`) -* TIFFSetValue(): Writing IFD8 & LONG8 tags to ClassicTIFF corrected - (:issue:`442`) -* tif_jpeg.c: allow to pass -DEXPECTED_JPEG_LIB_VERSION=number to do optional - compile-time version check -* TIFFReadFromUserBuffer(): fix clearing of TIFF_CODERSETUP flag that could - cause issues with reading JPEG compressed files -* _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a codec-specific - tag and the codec is not configured (:issue:`433`, :issue:`486`, - CVE-2022-34526) -* Add basic 16 bit cielab support. -* WEBP codec: avoid temporary buffer and memcpy() on whole tile/strip decoding -* tif_predict.c: make horAcc8() work with icc (ICC) 2021.6.0 20220226 -O2 - -Tools changes -------------- - -New/improved functionality: - -* :program:`tiffinfo`: Updated to parse through SubIFDs and show their tags. - -Bug fixes: - -* :program:`tiffcrop`: add check if (bps != 1) in writeSingleSection() - (:issue:`169`) -* :program:`tiffcrop`: Fix too many 'mode' options on command line - (:issue:`470` and :issue:`450`) -* :program:`tiffcrop`: Fix memory allocation to require a larger buffer - (:issue:`271`, :issue:`381`, :issue:`386`, :issue:`388`, :issue:`389`, - :issue:`435`, CVE-2022-3570, CVE-2022-3598) -* :program:`tiffcrop`: disable incompatibility of -Z, -X, -Y, -z options with - any PAGE_MODE_x option (:issue:`411`, CVE-2022-3627, :issue:`413`, - CVE-2022-3597, :issue:`426`, CVE-2022-3626) -* :program:`tiffcrop`: -S option mutually exclusive (:issue:`349`, - :issue:`414`, :issue:`422`, :issue:`423`, :issue:`424`) -* :program:`tiffcrop`: fix floating-point exception (:issue:`415`, - :issue:`427`, :issue:`428`, CVE-2022-2056, CVE-2022-2057, CVE-2022-2058) -* :program:`tiff2pdf`: Don't try to seek into stdout (:issue:`441`) -* :program:`tiffinfo`: update curdir from uint16_t to tdir_t for more than 64k - IFD handling. - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.5.1.rst b/third_party/libtiff/doc/releases/v4.5.1.rst deleted file mode 100644 index a5c34d6..0000000 --- a/third_party/libtiff/doc/releases/v4.5.1.rst +++ /dev/null @@ -1,186 +0,0 @@ -Changes in TIFF v4.5.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.5.1 (:tag:`v4.5.1`) - Previous Version :doc:`v4.5.0 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - Master HTTP Site #3 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -.. warning:: - - This version will be the last one supporting most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset), whose maintenance will be discontinued, due - to the lack of contributors able to address reported security issues. - Starting with libtiff v4.6.0, their source code, at this time ,will still be - available in the source distribution, but they will no longer be built by - default, and issues related to them will no longer be accepted in the - libtiff bug tracker. - - -.. warning:: - - Some CMake related changes, in particular related to the CMake config file - now installed, should be considered as a preview and may change in the next - releases based on user feedback. - See discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/496 - and https://gitlab.com/libtiff/libtiff/-/merge_requests/494 - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Definition of tags reformatted (clang-format off) for better - readability of tag comments in tiff.h and tif_dirinfo.c - -* Do not install libtiff-4.pc when tiff-install is reset. - -* Add versioninfo resource files for DLL and tools - compiled with Windows MSVC and MINGW. - -* Disable clang-formatting for tif_config.h.cmake.in and - tiffconf.h.cmake.in because sensitive for CMake scripts. - -* CMake: make WebP component name compatible with upstream ConfigWebP.cmake - -* CMake: make Findliblzma with upstream CMake config file - -* CMake: FindDeflate.cmake: fix several errors (:issue:`526`). - -* CMake: FindLERC.cmake: version string return added. - -* CMake: export TiffConfig.cmake and TiffConfigVersion.cmake files - -* CMake: fix export of INTERFACE_INCLUDE_DIRECTORIES - -Library changes ---------------- - -New/improved functionalities: - -* Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of - :c:func:`TIFFOpen` to warn and an alias of FILLORDER_MSB2LSB. - :file:`tif_lerc.c`: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN. - -* Optimize relative seeking within :c:func:`TIFFSetDirectory` - by using the learned list of IFD offsets. - -* Improve internal IFD offset and directory number map handling. - -* Behavior of :c:func:`TIFFOpen` mode "r+" in the Windows implementation - adjusted to that of Linux. - -API/ABI breaks: - -* None - -Bug fixes: - -* TIFFDirectory td_fieldsset type changed from unsigned long, which can - be 32 or 64 bits, to uint32_t (fixes :issue:`484`). - -* tif_ojpeg.c: checking for division by zero (fixes :issue:`554`). - -* LZWDecode(): avoid crash when trying to read again from a strip with - a missing end-of-information marker (fixes :issue:`548`). - -* Fixed runtime error: applying zero offset to null pointer - in :c:func:`countInkNamesString`. - -* Fixing crash in :c:func:`TIFFUnlinkDirectory` when called with - directory number zero ("TIFFUnlinkDirectory(**0**)") as well as fixing - incorrect behaviour when unlinking the first directory. - -* tif_luv: check and correct for NaN data in :c:func:`uv_encode` - (:issue:`530`). - -* :c:func:`TIFFClose` avoid NULL pointer dereferencing - (:issue:`515`). - -* tif_hash_set.c: include tif_hash_set.h after tif_config.h - to let a chance for GDAL symbol renaming trick. - -* Fax3: fix failure to decode some fax3 number_of_images - and add test for Fax3 decoding issues - (:issue:`513`). - -* :c:func:`TIFFSetDirectory` and :c:func:`TIFFWriteDirectorySec` - avoid harmless unsigned-integer-overflow - (due to gdal oss-fuzz #54311 and #54343). - -* :file:`tif_ojpeg.c`: fix :issue:`554` by checking for division by zero - in OJPEGWriteHeaderInfo(). - -* LZWDecode(): avoid crash when trying to read again from a strip with - a missing end-of-information marker (:issue:`548`). - -Documentation -------------- - -* mention TIFFSetTagExtender() cannot add tags to custom directories. - -* manpage: add multi page TIFF and SubIFDs description and read / write example. - -Tools changes -------------- - -New/improved functionality: - -* None - -Bug fixes: - -* :program:`tiffcrop`: Consider error return of writeSelections() (fixes :issue:`553`). - -* :program:`tiffcrop`: fix memory leak - (:issue:`475`). - -* :program:`tiffcrop`: do not reuse input buffer for subsequent images - (:issue:`527`). - -* :program:`tiffcrop`: Amend rotateImage() not to toggle the input - (main) image width and length parameters when only cropped image - sections are rotated. Remove buffptr from region structure - because never used. Fixes - :issue:`492`, :issue:`493`, :issue:`494`, :issue:`495`, - :issue:`499`, :issue:`518`, :issue:`519`. - -* :program:`tiffcrop`: correctly update buffersize after rotateImage() - (:issue:`520`). - -* :program:`tiffcrop`: added check for assumption on composite images. Fixes - :issue:`496`, :issue:`497`, :issue:`498`, :issue:`500`, :issue:`501`. - -* :program:`tiffmedian`: avoid zero num_colors - (:issue:`477`). - -* :program:`fax2ps`: fix buffer overflow in qsort function pcompar - (:issue:`475`). - -* :program:`tiffset`: get filesize to allocate only the required memory - (:issue:`241`). - -* :program:`tiffcrop`: fix :issue:`553` by considering error return of writeSelections(). - -* tif_ovrcache.c: check :c:func:`TIFFSetSubDirectory` return value (CID 1524573). - - -Contributed software changes ----------------------------- - -None diff --git a/third_party/libtiff/doc/releases/v4.6.0.rst b/third_party/libtiff/doc/releases/v4.6.0.rst deleted file mode 100644 index 78b5c9e..0000000 --- a/third_party/libtiff/doc/releases/v4.6.0.rst +++ /dev/null @@ -1,156 +0,0 @@ -Changes in TIFF v4.6.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.6.0 (:tag:`v4.6.0`) - Previous Version :doc:`v4.5.1 ` - Master Download Site ``_ - Master HTTP Site #1 ``_ - Master HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history: - -Major changes -------------- - -.. warning:: - - This version removes a big number of utilities that have suffered from lack - of maintenance over the years and were the source of various reported - security issues. - See "Removed functionality" below for the list of removed utilities. - Starting with libtiff v4.6.0, the source code for most TIFF tools (except tiffinfo, - tiffdump, tiffcp and tiffset) was discontinued, due to the lack of contributors - able to address reported security issues. - tiff2ps and tiff2pdf source code has been moved in a unsupported category, - no longer built by default, but are still part of the the source - distribution. Other retired utilities are in a archive/ directory, only - available in the libtiff git repository. - Issues related to unsupported and archived tools will no longer be accepted - in the libtiff bug tracker. - - -Software configuration changes ------------------------------- - -* TiffConfig.cmake.in: set TIFF_INCLUDE_DIR, TIFF_INCLUDE_DIRS and - TIFF_LIBRARIES for compatibility with FindTIFF.cmake as shipped by CMake - (fixes :issue:`589`) - -* Update CMake and autoconf scripts to consistently update LibTIFF version - defines and references in various files when version definition in - configure.ac has been changed. - - - Move in tiffvers.h from libtiff source directory to libtiff build directory. - - Remove unused version information from tif_config.h - - With every CMake build the version defines (e.g. 4.5.1) within tiffvers.h - are consistently updated from configure.ac. The version release-date is - taken from file RELEASE-DATE. - - The files VERSION and RELEASE-DATE are only updated with a special CMake - target build: cmake --build . --target tiff_release. - - For autotools, version information is updated from configure.ac with - ./autogen.sh. LIBTIFF_RELEASE_DATE is taken form file RELEASE-DATE. - - ./configure generates tiffvers.h with the cached version information and - LIBTIFF_RELEASE_DATE. - - "make release" updates tiffvers.h and VERSION file with cached version info - and RELEASE-DATE file and tiffves.h with the current date. - -* CMake: fix build with -Dstrip-chopping=off (fixes :issue:`600`) - -Library changes ---------------- - -New/improved functionalities: - -* Fix using ``__attribute__`` libtiff with clang-for-windows - -API/ABI breaks: - -* None - -Bug fixes: - -* WebP decoder: validate WebP blob width, height, band count against TIFF - parameters to avoid use of uninitialized variable, or decoding corrupted - content without explicit error (fixes :issue:`581`, :issue:`582`). - -* WebP codec: turn exact mode when creating lossless files to avoid altering - R,G,B values in areas where alpha=0 (https://github.com/OSGeo/gdal/issues/8038) - -* Fix TransferFunction writing of only two transfer functions. - -* TIFFReadDirectoryCheckOrder: avoid integer overflow. When it occurs, it - should be harmless in practice though - (https://gitlab.com/libtiff/libtiff/-/merge_requests/512) - -Documentation -------------- - -* TiffField functions documentation updated with return behaviour for not - defined tags and determination of write-/read-count size. - -Tools changes -------------- - -Removed functionality: - -* The following tools are no longer compiled and have been moved to archive/tools: - - - fax2ps - - fax2tiff - - pal2rgb - - ppm2tiff - - raw2tiff - - rgb2ycbcr - - thumbnail - - tiff2bw - - tiff2rgba - - tiffcmp - - tiffcrop - - tiffdither - - tiffgt - - tiffmedian - -* The following tools are no longer compiled by default: tiff2ps and tiff2pdf. - They have been moved to tools/unsupported. - They can be built by setting ``--enable-tools-unsupported`` for autoconf, - or ``-Dtiff-tools-unsupported`` for CMake, but as the name imply, they are - no longer supported by upstream. Packagers are suggested *not* to enable those - options. - -* tiffcp: remove -i option (ignore errors), because almost all - fuzzer issues were consequential errors from ignored errors because of the - "-i" option. - -New/improved functionality: - -* None - -Bug fixes: - -* tiffset: fix #597: warning: comparison of integer expressions of different - signedness. (fixes :issue:`597`) - -* tiffcp: fix memory corruption (overflow) on hostile images - (fixes :issue:`591`) - -Test changes ------------- - -* Add missing test_write_read_tags.c and test_transferfunction_write_read.c - in tarball (fixes :issue:`585`) and correct "long" issue. - -* Don't use "long" because can be int32_t or int64_t, depending on compiler and - system. - -Changes to contributed and unsupported tools --------------------------------------------- - -* raw2tiff: fix integer overflow and bypass of the check (fixes :issue:`592`) diff --git a/third_party/libtiff/doc/releases/v4.7.0.rst b/third_party/libtiff/doc/releases/v4.7.0.rst deleted file mode 100644 index cff2bf6..0000000 --- a/third_party/libtiff/doc/releases/v4.7.0.rst +++ /dev/null @@ -1,211 +0,0 @@ -Changes in TIFF v4.7.0 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.7.0 (:tag:`v4.7.0`) - Previous Version :doc:`v4.6.0 ` - Primary Download Site ``_ - Home HTTP Site #1 ``_ - Home HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history. - -Major changes -------------- - -This version restores in the default build the availability of the tools that -had been dropped in v4.6.0 (cf :ref:`rfc2_restoring_needed_tools`) - -Software configuration changes ------------------------------- - -- autoconf build: configure.ac: avoid -Werror passed to CFLAGS to interfere with feature detection - -- autoconf build: fix error when running make clean (fixes :issue:`630`) - -- autoconf build: back off the minimum required automake version to 1.11 - -- autoconf.ac: fix detection of windows.h for mingw (fixes :issue:`605`) - -- libtiff-4.pc: Fix `Requires.private` missing `Lerc`. It provides a `.pc` file starting from version 4 - (in autoconf builds, we assume that liblerc is at least version 4) - -- CMake: Fix TIFF_INCLUDE_DIRS - -- CMake: MinGW compilers don't need a .def file for shared library - -- CMake: move libdeflate and Lerc to Requires.private - -- CMake: enable resource compilation on all Windows. - -Library changes ---------------- - -New/improved functionalities: - -- Add ``TIFFOpenOptionsSetMaxCumulatedMemAlloc()``. This function complements - ``TIFFOpenOptionsSetMaxSingleMemAlloc()`` to define the maximum cumulated - memory allocations in byte, for a given TIFF handle, that libtiff internal - memory allocation functions are allowed. - -API/ABI breaks: - -* None - -Bug fixes: - -- TIFFWriteDirectory(): Avoid overwriting following data if an IFD is enlarged. - -- TIFFXYZToRGB: avoid integer overflow (fixes :issue:`644`) - -- uv_decode() and uv_encode(): avoid potential out-of-bounds array index - (fixes :issue:`645`) - -- Fix cases where tif_curdir is set incorrectly. - Fix cases where the current directory number (tif_curdir) is set inconsistently - or incorrectly, depending on the previous history. - -- TIFFRead[Scanline/EncodedStrip/EncodeTile]: 0-initialize output buffer if - setupdecode fails ; most codecs: zero-initialize (not-yet-written parts of) - output buffer if failure (fixes :issue:`375`) - -- OJPEG: reset subsampling_convert_state=0 in OJPEGPreDecode (fixes :issue:`183`) - -- ThunderRLE: fix failure when decoding last run. Bug seen with GhostPDL - -- LERC codec: deal with issues with multi-band PlanarConfig=Contig and NaN values - -- tif_fax3.c: error out after a number of times end-of-file has been reached - (fixes :issue:`583`) - -- LZW: avoid warning about misaligned address with UBSAN (fixes :issue:`616`) - -- TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of col/row - (fixes :issue:`622`, CVE-2023-52356) - -- tif_dirread.c: only issue TIFFGetFileSize() for large enough RAM requests - -- Avoid FPEs (division by zero) in tif_getimage.c. - -- Avoiding FPE (division by zero) for TIFFhowmany_32() and TIFFhowmany_64() macros - by checking for denominator not zero before macros are executed. (fixes :issue:`628`) - -- Add non-zero check before division in TIFFComputeStrip() - -- Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is active - -- Setting the TIFFFieldInfo field `set_field_type` should consider `field_writecount` not `field_readcount` - -- Avoid memory leaks when using TIFFCreateDirectory() by releasing the allocated - memory in the tif-structure. - -- For non-terminated ASCII arrays, the buffer is first enlarged before a NULL is - set at the end to avoid deleting the last character. (fixes :issue:`579`) - -- Check return value of _TIFFCreateAnonField(). (fixes :issue:`624`, CVE-2024-7006) - -- Prevent some out-of-memory attacks (https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857) - -- Ensure absolute seeking is forced independent of TIFFReadDirectory success. (fixes :issue:`618`) - -- tif_dirinfo.c: re-enable TIFFTAG_EP_CFAREPEATPATTERNDIM and TIFFTAG_EP_CFAPATTERN tags (fixes :issue:`608`) - -Other changes: - -- Fix warnings with GCC 14 - -- tif_dir.c: Log source file, line number, and input tif for directory count error (fixes :issue:`627`) - -- Last usage of get_field_type of TIFFField structure at TIFFWriteDirectorySec() - changed to using set_field_type. - -- tif_jpeg.c/tif_ojpeg.c: remove likely ifdef tricks related to old compilers or unusual setups - -- Remove _TIFFUInt64ToFloat() and _TIFFUInt64ToDouble() - -- Remove support for _MSC_VER < 1500. - -- Use #ifdef _WIN32 to test for Windows, and tiffio.h: remove definition of __WIN32__ - - -Documentation -------------- - -- Amend manpages for changes in current directory index behaviour - -- Note on using TIFFFlush() before TIFFClose() to check that the data has been - successfully written to the file. (fixes :issue:`506`) - -- Update TIFF documentation about TIFFOpenOptions.rst and - TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes - (relates to CVE-2024-7006) - -Tools changes -------------- - -Re-added tools: - - - fax2ps - - fax2tiff - - pal2rgb - - ppm2tiff - - raw2tiff - - rgb2ycbcr (not installed) - - thumbnail (not installed) - - tiff2bw - - tiff2rgba - - tiffcmp - - tiffcrop - - tiffdither - - tiffgt - - tiffmedian - - tiff2ps - - tiff2pdf - -New/improved functionality: - -- tiff2rgba: Add background gradient option for alpha compositing -- tiffcp: -i flag restored - -Bug fixes: - -- tiffcrop: address Coverity scan issues 1605444, 1605445, and 16054 -- tiffcrop: Apply "Fix heap-buffer-overflow in function extractImageSection" -- tiffcrop: fix buffer overflows, use after free (fixes :issue:`542`, - :issue:`550`, :issue:`552`) -- tiff2pdf: address Coverity scan issues -- tiff2pdf: fix inconsistent PLANARCONFIG value for the input and output TIFF -- tiff2pdf: fix issue with JPEG restart-interval marker when converting from - JPEG-compressed files (fixes :issue:`539`) -- tiff2pdf: red and blue were being swapped for RGBA decoding (fixes :issue:`253`) -- tiff2pdf: fixes :issue:`596` -- thumbnail: address Coverity scan issues -- tiffcp: Add check for limitMalloc return to fix Coverity 1603334 -- tiffcp: preserve TIFFTAG_REFERENCEBLACKWHITE when doing YCbCr JPEG -> YCbCr JPEG -- tiffcp: replace PHOTOMETRIC_YCBCR with PHOTOMETRIC_RGB when outputting to compression != JPEG (refs :issue:`571`) -- tiffcp: do not copy tags YCBCRCOEFFICIENTS, YCBCRSUBSAMPLING, YCBCRPOSITIONING, - REFERENCEBLACKWHITE. Only set YCBCRSUBSAMPLING when generating YCbCr JPEG -- tiffcp: Check also codec of input image, not only from output image (fixes :issue:`606`) -- Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions. -- fax2ps and fax2tiff: memory leak fixes (fixes :issue:`476`) -- tiffmedian: memory leak fixes (fixes :issue:`599`) -- fax2tiff: fix EOFB interpretation (fixes :issue:`191`) -- fax2tiff: fix issue with unreasonable width input (fixes :issue:`249`) -- tiffcp and tiffcrop: fixes :issue:`228` -- tiff2rgba: fixes :issue:`469` -- tiffdither: fixes :issue:`473` -- tiffdump: fix wrong printf formatter in error message (Coverity 1472932) -- tiffset: avoid false positive Coverity Scan warning on 64-bit builds (Coverity 1518997) -- tifcp/tiffset: use correct format specifiers - -Changes to contributed and unsupported tools --------------------------------------------- - -- contrib/addtiffo: validate return of TIFFWriteEncodedXXXX() calls (Coverity 1024680) diff --git a/third_party/libtiff/doc/releases/v4.7.1.rst b/third_party/libtiff/doc/releases/v4.7.1.rst deleted file mode 100644 index 2214487..0000000 --- a/third_party/libtiff/doc/releases/v4.7.1.rst +++ /dev/null @@ -1,273 +0,0 @@ -Changes in TIFF v4.7.1 -====================== - -.. table:: References - :widths: auto - - ====================== ========================================== - Current Version v4.7.1 (:tag:`v4.7.1`) - Previous Version :doc:`v4.7.0 ` - Primary Download Site ``_ - Home HTTP Site #1 ``_ - Home HTTP Site #2 ``_ - ====================== ========================================== - -This document provides a summary of significant changes made to the -software between the *previous* and *current* versions (see -above). A fully-detailed change summary is provided by the :file:`ChangeLog` file -included in the release package and by the Git commit history. - -Major changes -------------- - -None - -Software configuration changes ------------------------------- - -* Define HAVE_JPEGTURBO_DUAL_MODE_8_12 and LERC_STATIC in tif_config.h. -* CMake: define WORDS_BIGENDIAN via tif_config.h -* doc/CMakeLists.txt: remove useless cmake_minimum_required() -* CMake: fix build with LLVM/Clang 17 (fixes :issue:`651`) -* CMake: set CMP0074 new policy -* Set LINKER_LANGUAGE for C targets with C deps -* Export tiffxx cmake target (fixes :issue:`674`) -* autogen.sh: Enable verbose wget. -* configure.ac: Syntax updates for Autoconf 2.71 -* autogen.sh: Re-implement based on autoreconf. Failure to update - config.guess/config.sub does not return error (fixes :issue:`672`) -* CMake: fix CMake 4.0 warning when minimum required version is < 3.10. -* CMake: Add build option tiff-static (fixes :issue:`709`) - -Library changes ---------------- - -New/improved functionalities: - -* Add TIFFOpenOptionsSetWarnAboutUnknownTags() for explicit control about - emitting warnings for unknown tags. No longer emit warnings about unknown - tags by default - -* tif_predict.c: speed-up decompression in some cases. - -API/ABI breaks: - -* None - -Bug fixes: - -* tif_fax3: For fax group 3 data if no EOL is detected, reading is retried - without synchronisation for EOLs. (fixes :issue:`54`) - -* Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Updating TIFFMergeFieldInfo() with read_count=write_count=0 for FIELD_IGNORE. - Improving handling when field_name = NULL. - (fixes :issue:`532`) - -* tiff.h: add COMPRESSION_JXL_DNG_1_7=52546 as used for JPEGXL compression in - the DNG 1.7 specification - -* TIFFWriteDirectorySec: Increment string length for ASCII tags for codec tags - defined with FIELD_xxx bits, as it is done for FIELD_CUSTOM tags. - (fixes :issue:`648`) - -* Do not error out on a tag whose tag count value is zero, just issue a warning. - Fix parsing a private tag 0x80a6 (fixes :issue:`647`) - -* TIFFDefaultTransferFunction(): give up beyond td_bitspersample = 24 - (Fixes https://github.com/OSGeo/gdal/issues/10875) - -* tif_getimage.c: Remove unnecessary calls to TIFFRGBAImageOK() - (fixes :issue:`175`) - -* Fix writing a Predictor=3 file with non-native endianness - -* _TIFFVSetField(): fix potential use of unallocated memory (out-of-bounds - read / nullptr dereference) in case of out-of-memory situation when dealing - with custom tags (fixes :issue:`663`) - -* tif_fax3.c: Error out for CCITT fax encoding if SamplesPerPixel is not equal - 1 and PlanarConfiguration = Contiguous (fixes :issue:`26`) - -* tif_fax3.c: error out after a number of times end-of-line or unexpected bad - code words have been reached. (fixes :issue:`670`) - -* Fix memory leak in TIFFSetupStrips() (fixes :issue:`665`) - -* tif_zip.c: Provide zlib allocation functions. - Otherwise for zlib built with -DZ_SOLO inflating will fail. - -* Fix memory leak in _TIFFSetDefaultCompressionState. (fixes :issue:`676`) - -* tif_predict.c: Don’t overwrite input buffer of TIFFWriteScanline() if - "prediction" is enabled. Use extra working buffer in PredictorEncodeRow(). - (fixes :issue:`5`) - -* tif_getimage.c: update some integer overflow checks (fixes :issue:`79`) - -* tif_getimage.c: Fix buffer underflow crash for less raster rows at - TIFFReadRGBAImageOriented() (fixes :issue:`704`) - -* TIFFReadRGBAImage(): several fixes to avoid buffer overflows. - -* Correct passing arguments to TIFFCvtIEEEFloatToNative() and - TIFFCvtIEEEDoubleToNative() if HAVE_IEEEFP is not defined. (fixes - :issue:`699`) - -* LZWDecode(): avoid nullptr dereference when trying to read again after EOI - marker has been found with remaining output bytes (fixes :issue:`698`) - -* TIFFSetSubDirectory(): check _TIFFCheckDirNumberAndOffset() return. - -* TIFFUnlinkDirectory() and TIFFWriteDirectorySec(): clear tif_rawcp when - clearing tif_rawdata (fixes :issue:`711`) - -* JPEGEncodeRaw(): error out if a previous scanline failed to be written, to - avoid out-of-bounds access (fixes :issue:`714`) - -* tif_jpeg: Fix bug in JPEGDecodeRaw() if JPEG_LIB_MK1_OR_12BIT is defined for - 8/12bit dual mode, introduced in libjpeg-turbo 2.2, which was actually - released as 3.0. (fixes :issue:`717`) - -* add assert for TIFFReadCustomDirectory infoarray check. - -Other changes: - -* tif_jpeg.c: use JPEG_MAX_DIMENSION constant instead of hard-coded 65535 value - -* tif_lzw.c / tif_packbits.c: use NULL instead of 0. - -* Take into account PACKBITS_READ_ONLY, LZW_READ_ONLY, and LERC_READ_ONLY - macros to disable compiling write-support for those codecs. - -* tif_lerc.c: add missing casts - -* Merge several functions implemented twice in different modules. - (see :issue:`154`) - -* Remove get_field_type form TIFFField structure because it is not used - anymore and rename other parameter to set_get_field_type - -* Silence some Coverity Scan warnigs and mark already dismissed ones. - -* References to codec libraries updated and missing codec compile defines - (tiffconf.h) added. - -* Move mkg3states under libtiff/tools. (fixes :issue:`708`) - -* tiff_itrunc(): don't use rand() to please Coverity Scan. - -* tiffio.h: fix compilation with LOGLUV_PUBLIC=0 - -* LICENSE.md: Add BSD license for Lempel-Ziv & Welch compression (tif_lzw.c) - (fixes :issue:`431`) - -Documentation -------------- - -* TIFFRGBAImage.rst note added for incorrect saving of images with TIFF - orientation from 5 (LeftTop) to 8 (LeftBottom) in the raster. - -* TIFFRGBAImage.rst note added about un-associated alpha handling - (fixes :issue:`67`) - -* Update "Defining New TIFF Tags" description. (fixes :issue:`642`) - -* Fix return type of TIFFReadEncodedTile() - -* Update the documentation to reflect deprecated typedefs. - -* TIFFWriteDirectory.rst: Clarify TIFFSetWriteOffset() only sets offset for - image data and not for IFD data. - -* Update documentation on re-entrancy and thread safety. - -* Remove dead links to no more existing Awaresystems web-site. - -* Updating BigTIFF specification and some miscelaneous editions. - -* Replace some last links and remove last todos. - -* Added hints for correct allocation of TIFFYCbCrtoRGB structure and its - associated buffers. (fixes :issue:`681`) - -* Added chapter to "Using the TIFF Library" with links to handling multi-page - TIFF and custom directories. (fixes :issue:`43`) - -* update TIFFOpen.rst with the return values of mapproc and unmapproc. - (fixes :issue:`12`) - -Tools changes -------------- - -New/improved functionality: - -* tiffinfo: add a -W switch to warn about unknown tags. - -* tiffdither: process all pages in input TIFF file. - -Bug fixes: - -* ppm2tiff: Fix bug in `pack_words` trailing bytes, where last two bytes of - each line were written wrongly. (fixes :issue:`467`) - -* fax2ps: fix regression of commit 28c38d648b64a66c3218778c4745225fe3e3a06d - where TIFFTAG_FAXFILLFUNC is being used rather than an output buffer - (fixes :issue:`649`) - -* tiff2pdf: Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH (fixes :issue:`650`) - -* tiff2pdf: check h_samp and v_samp for range 1 to 4 to avoid division by - zero. (fixes :issue:`654`) - -* tiff2pdf: avoid null pointer dereference. (fixes :issue:`741`) - -* Improve non-secure integer overflow check (comparison of division result - with multiplicant) at compiler optimisation in tiffcp, rgb2ycbcr and tiff2rgba. (fixes :issue:`546`) - -* tiff2rgba: fix some "a partial expression can generate an overflow before it - is assigned to a broader type" warnings. (fixes :issue:`682`) - -* tiffdither/tiffmedian: Don't skip the first line of the input image. - (fixes :issue:`703`) - -* tiffdither: avoid out-of-bounds read identified in :issue:`733` - -* tiffmedian: error out if TIFFReadScanline() fails (fixes :issue:`707`) - -* tiffmedian: close input file. (fixes :issue:`735`) - -* thumbail: avoid potential out of bounds access (fixes :issue:`715`) - -* tiffcrop: close open TIFF files and release allocated buffers before exiting - in case of error to avoid memory leaks. (fixes :issue:`716`) - -* tiffcrop: fix double-free and memory leak exposed by :issue:`721` - -* tiffcrop: avoid buffer overflow. (fixes :issue:`740`) - -* tiffcrop: avoid nullptr dereference. (fixes :issue:`734`) - -* tiffdump: Fix coverity scan issue CID 1373365: Passing tainted expression - \*datamem to PrintData, which uses it as a divisor or modulus. - -* tiff2ps: check return of TIFFGetFiled() for TIFFTAG_STRIPBYTECOUNTS and - TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer dereference. - (fixes :issue:`718`) - -* tiffcmp: fix memory leak when second file cannot be opened. - (fixes :issue:`718` and :issue:`729`) - -* tiffcp: fix setting compression level for lossless codecs. - (fixes :issue:`730`) - -* raw2tiff: close input file before exit (fixes :issue:`742`) - -Changes to contributed and unsupported tools --------------------------------------------- - -* addtiffo: Fixing MSVC compiler warnings - -* Improved oss-fuzz fuzzer tiff_read_rgba_fuzzer.cc. - -* oss-fuzz: fix memory leak in fuzz target. diff --git a/third_party/libtiff/doc/rfcs/index.rst b/third_party/libtiff/doc/rfcs/index.rst deleted file mode 100644 index 58e890a..0000000 --- a/third_party/libtiff/doc/rfcs/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _rfcs: - -Request For Comments (RFCs) -=========================== - -RFCs are the process through which major changes in the working or content -of the libtiff project are conducted. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - rfc1_psc - rfc2_restoring_needed_tools diff --git a/third_party/libtiff/doc/rfcs/rfc1_psc.rst b/third_party/libtiff/doc/rfcs/rfc1_psc.rst deleted file mode 100644 index b7aef7f..0000000 --- a/third_party/libtiff/doc/rfcs/rfc1_psc.rst +++ /dev/null @@ -1,107 +0,0 @@ -.. _rfc1_psc: - -============================================ -RFC 1: Project Steering Committee Guidelines -============================================ - -Author: Even Rouault - -Contact: even.rouault at spatials.com - -Status: Adopted - -Summary -------- - -This document describes how the libtiff Project Steering Committee -determines membership, and makes decisions on libtiff project issues. - -In brief, the committee votes on proposals on the libtiff mailing list. -Proposals are available for review for at least 5 business days, and a single -veto is sufficient to delay progress though ultimately a majority of members can -pass a proposal. - -Detailed Process ----------------- - -1. Proposals are written up and submitted on the libtiff mailing list - for discussion and voting, by any interested party, not just - committee members. -2. Proposals need to be available for review for at least 5 business - days before a final decision can be made. -3. Respondents may vote "+1" to indicate support for the proposal and a - willingness to support implementation. -4. Respondents may vote "-1" to veto a proposal, but must provide clear - reasoning and alternate approaches to resolving the problem within - the voting delay. -5. A vote of -0 indicates mild disagreement, but has no effect. A 0 - indicates no opinion. A +0 indicate mild support, but has no effect. -6. Anyone may comment on proposals on the list, but only members of the - Project Steering Committee's votes will be counted. -7. A proposal will be accepted if it receives at least +2 (including the - proposer) and no vetos (-1). -8. If a proposal is vetoed, and it cannot be revised to satisfy all - parties, then it can be resubmitted for an override vote in which a - majority of all eligible voters indicating +1 is sufficient to pass - it. Note that this is a majority of all committee members, not just - those who actively vote. -9. Upon completion of discussion and voting the proposer should - announce whether they are proceeding (proposal accepted) or are - withdrawing their proposal (vetoed). -10. The Chair gets a vote. -11. The Chair is responsible for keeping track of who is a member of the - Project Steering Committee. -12. Addition and removal of members from the committee, as well as - selection of a Chair should be handled as a proposal to the - committee. -13. The Chair adjudicates in cases of disputes about voting. - -When is Vote Required? ----------------------- - -- Anything that could cause backward compatibility issues. -- Adding, removing or modifying substantial amounts of code. -- Changing inter-subsystem APIs. -- Issues of procedure. -- When releases should take place. -- Anything that might be controversial - -Observations ------------- - -- The Chair is the ultimate adjudicator if things break down. -- The absolute majority rule can be used to override an obstructionist - veto, but it is intended that in normal circumstances vetoers need to - be convinced to withdraw their veto. We are trying to reach - consensus. -- It is strongly recommended that proposals subject to a vote be discussed - first on the mailing list to build consensus before proceeding to the vote. - -Bootstrapping -------------- - -The initial members of the Project Steering Committee are: - -- Bob Friesenhahn (@bobfriesenhahn) -- Su Laus (@Su_Laus) -- Roger Leigh (@rleigh) -- Timothy Lyanguzov (@theta682) -- Olivier Paquet (@1-Olivier) -- Leonard Rosenthol (@lrosenthol) -- Even Rouault (@rouault) - -Even Rouault is declared initial Chair of the Project Steering Committee. - -The current membership list can be found on the :ref:`psc` page. - -Credits -------- - -This document is a direct adaptation from -`GDAL Project Management Committee Guidelines `__, -authored by Frank Warmerdam. - -Voting history --------------- - -Adopted by +1 vote from all above mentioned initial members of the PSC. diff --git a/third_party/libtiff/doc/rfcs/rfc2_restoring_needed_tools.rst b/third_party/libtiff/doc/rfcs/rfc2_restoring_needed_tools.rst deleted file mode 100644 index 432d568..0000000 --- a/third_party/libtiff/doc/rfcs/rfc2_restoring_needed_tools.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. _rfc2_restoring_needed_tools: - -===================================== -RFC 2: Restoring Needed LibTIFF Tools -===================================== - -Author: Su Laus - -Contact: (@Su_Laus) - -Status: Approved - -Summary -------- - -The purpose of this RFC is to clarify if and which tools that were moved -to the archive in libtiff 4.6.0 should be reactivated. - -Prehistory ----------- - -The tools in libtiff caused many vulnerabilities -and CVEs that were attributed to the libtiff library itself. -Trying to fix the security holes in the tools turned out to be a -Sisyphean task (can never be done). -Therefore, most of the tools in libtiff 4.6.0 were moved to the archive -and the existing problems were closed with "wontfix-unmaintained". - -It was later understood that some users depend on some of these archived tools. - -Some problems with the tools have now been fixed -(see e.g. https://gitlab.com/libtiff/libtiff/-/merge_requests/569). - -Proposed procedure ------------------- - -* All tools as of libtiff 4.5.1 shall be restored. -* Bugfixes in MR !569 are applied in single merge requests for traceability - and selectively as some changes might not be applicable. -* Remove “wontfix-unmaintained” from closed issues, when fixed. -* All issues related to utilities / tools shall get label “utility”. -* The documentation and other references shall point to - https://libtiff.gitlab.io/libtiff/. -* After an initial merge has been applied for restoring the tools, - the http://www.libtiff.org page shall be reset as a mirror of - https://libtiff.gitlab.io/libtiff/. -* Finally release as 4.7.0 when all known issues of the tools are closed. - -References to previous contributions to the discussion ------------------------------------------------------- -https://gitlab.com/libtiff/libtiff/-/issues/580 and related merge request, -https://gitlab.com/libtiff/libtiff/-/merge_requests/569, -and discussion in https://gitlab.com/libtiff/libtiff/-/merge_requests/581 - -Voting history --------------- - -+1 from PSC members @bobfriesenhahn, @1-Olivier, @Su_Laus - -+0 from PSC members @theta682 and @rouault diff --git a/third_party/libtiff/doc/specification/bigtiff.rst b/third_party/libtiff/doc/specification/bigtiff.rst deleted file mode 100644 index a8a24f8..0000000 --- a/third_party/libtiff/doc/specification/bigtiff.rst +++ /dev/null @@ -1,236 +0,0 @@ -BigTIFF Design -============== - -The classic TIFF file format uses 32bit offsets and, as such, is limited to 4 gigabytes. -The **BigTIFF** design details a 64-bit (larger than 4GB) TIFF format specification. -The design is based on a proposal by Steve Carlsen of Adobe, with input -from various other parties. - -Overview of BigTIFF Extension ------------------------------ - -* The Version ID, in header bytes 2-3, formerly decimal 42, changes to **43** for BigTIFF. -* Header bytes 4-5 contain the decimal number **8**. - - * If there is some other number here, a reader should give up. - * This is to provide a nice way to move to 16-byte pointers some day. - -* Header bytes 6-7 are reserved and must be **zero**. - - * If they're not, a reader should give up. - -* Header bytes 8-15 contain the 8-byte offset to the first IFD. -* Value/Offset fields are 8 bytes long, and take up bytes 8-15 in an IFD entry. - - * If the value is ≤ 8 bytes, it must be stored in the field. - * All values must begin at an 8-byte-aligned address. - -* 8-byte offset to the Next_IFD, at the end of an IFD. -* To keep IFD entries 8-byte-aligned, we begin with an 8-byte - (instead of 2-byte) count of the number of directory entries. -* Add ``TIFFDataTypes`` of ``TIFF_LONG8`` (= 16), an 8-byte unsigned int, - and ``TIFF_SLONG8`` (= 17), an 8-byte signed int. -* Add ``TIFFDataType`` ``TIFF_IFD8`` (=18) an 8-byte IFD offset. -* ``StripOffsets`` and ``TileOffsets`` and ``ByteCounts`` may be ``TIFF_LONG8`` - or the traditionally allowed ``TIFF_LONG`` or ``TIFF_SHORT``. - -* The proposed extension is :file:`.tf8` or :file:`.btf`, and call it "BigTIFF". - -Otherwise, it's just like "original TIFF" or "classic TIFF". - -BigTIFF Structures compared to Classic TIFF -------------------------------------------- - -TIFF and BigTIFF File Header -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Here's the classic TIFF file header ... - -.. list-table:: Classic File Header - :widths: auto - :header-rows: 1 - :align: left - :width: 90% - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Byte order indication - * - 2 - - UInt16 - - Version number (always 42) - * - 4 - - UInt32 - - Offset to first IFD - -And this is the **BigTIFF** file header ... - -.. list-table:: BigTIFF File Header - :widths: auto - :header-rows: 1 - :align: left - :width: 90% - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Byte order indication - * - 2 - - UInt16 - - Version number, always **43** for BigTIFF - * - 4 - - UInt16 - - | Bytesize of offsets. - | Always 8 in BigTIFF, it provides a nice way to move to 16-byte pointers some day. - | If there is some other value here, a reader should give up. - * - 6 - - UInt16 - - | Reserved, always 0. - | If there is some other value here, a reader should give up. - * - 8 - - UInt64 - - Offset to first IFD - -The last members in both variants of the structure point to the first IFD -(Image File Directory). -This IFD can be located anywhere in the file. Every 'page' in a multi-page TIFF, -classic TIFF or BigTIFF, is represented by exactly one IFD. - -TIFF and BigTIFF Image File Directory Structure -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Here's a more detailed view of the classic IFD ... - -.. list-table:: Classic IFD - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Number of tags in IFD - * - 2 + x * 12 - - Tag structure - - Tag data - * - 2 + (Number of tags in IFD) * 12 - - UInt32 - - | Offset to next IFD, if there is a next IFD, - | 0 otherwise. - -And this is how the IFD looks like in the **BigTIFF** file format ... - -.. list-table:: BigTIFF IFD - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt64 - - Number of tags in IFD - * - 8 + x * 20 - - Tag structure - - Tag data - * - 8 + (Number of tags in IFD) * 20 - - UInt64 - - | Offset to next IFD, if there is a next IFD, - | 0 otherwise. - -TIFF and BigTIFF Tag Structure -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The tags in this IFD should be sorted by code, in both classic TIFF and BigTIFF. -Every tag takes up exactly 12 bytes in classic TIFF, and looks like this ... - -.. list-table:: Classic Tag Structure - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Tag identifying code - * - 2 - - UInt16 - - Datatype of tag data - * - 4 - - UInt32 - - Number of values - * - 8 - - | x * tag data datatype - | or UInt32 offset - - | Tag data - | or offset to tag data - -This same tag structure, in **BigTIFF**, takes up 20 bytes, and looks like this ... - -.. list-table:: BigTIFF Tag Structure - :widths: auto - :header-rows: 1 - :align: left - - * - Offset - - Datatype - - Value - * - 0 - - UInt16 - - Tag identifying code - * - 2 - - UInt16 - - Datatype of tag data - * - 4 - - UInt64 - - Number of values - * - 12 - - | x * tag data datatype - | or UInt64 offset - - | Tag data - | or offset to tag data - -The same rule for 'inlining' the tag data applies to both classic TIFF and BigTIFF, -only the threshold size differs. -In classic TIFF, the tag data was written inside the tag structure, in the IFD, -if its size was smaller than or equal to 4 bytes. Otherwise, it's written elsewhere, -and pointed to. -In BigTIFF, the tag data is written inside the tag structure, in the IFD, -if its size is smaller than or equal to 8 bytes. - -Other miscellaneous details ---------------------------- - -Amongst the suggested file extensions are 'tif', 'tf8' and 'btf'. - -Three datatypes are added to classic TIFF: - -- ``TIFF_LONG8`` = 16, being unsigned 8-byte (64-bit) integer -- ``TIFF_SLONG8`` = 17, being signed 8-byte (64-bit) integer -- ``TIFF_IFD8`` = 18, being a new unsigned 8-byte (64-bit) IFD offset. - -The ``StripOffsets``, ``StripByteCounts``, ``TileOffsets``, and ``TileByteCounts`` tags are allowed -to have the datatype ``TIFF_LONG8`` in BigTIFF. Old datatypes ``TIFF_LONG``, and ``TIFF_SHORT`` -where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too. - -Likewise, tags that point to other IFDs, like e.g. the SubIFDs tag, are now allowed -to have the datatype ``TIFF_IFD8`` in BigTIFF. Again, the old datatypes TIFF_IFD, -and the hardly recommendable ``TIFF_LONG``, are still valid, too. - -Samples -------- -BigTIFF sample file BigTIFFSamples.zip contains a series of 8 different BigTIFF files. -Especially note the BigTIFFSamples.html file in this zip, documenting their characteristics. - -That sample file from Joris Van Damme can still be found at the Wayback Machine: -`BigTIFF Example files `_ - diff --git a/third_party/libtiff/doc/specification/bigtiffpr_images/esri.png b/third_party/libtiff/doc/specification/bigtiffpr_images/esri.png deleted file mode 100644 index dce6c97e366fd50930c887dc28bfef1efe8673f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10281 zcmW-nWmMhV5{82nm*Vd3PATs0hXRG-?oiy_-QA_Q7I$~|gBCAEiWG-?zWXEDD_L2| z-jk8%og`9KSq2q}5D5SPR5@8mb;uY1*_07JK=vn_r09?V(NR|CI{@fO|F=P5r$~qa z0FsK8goLW9rGtyZcS{FHaybbJaz|$eb1Pdj0Pxtz)vy3*oZ<@IZ{Lb5Lh`~`~Mu|dNgFm1siVH4|h?;ob z^Deeo>AF9fe*3v9d|Z8#+cXQ`hk%kM%caH>fKnk&`f)dSbZBJnfK@aQiP{msKxi_h z`2I=-1w8l(3Nlgl!S?`A9*f8bK%Y`}A3JgQJNj?&Og*T85U4(v#7_zc0oZ`3SDbhm zASw+NkeflP0TjRjhLa}7`+zD7U`XeGvRW-n84Tn`009MHSBnT`0ARfV!!ar<4lHm?!1QI;s{fM+HFXCOEF?#&bc z6eQw6R(td6F@sh+Gs7F#f@Z+-yZ6I8rLpn;+u>}LqbLCEx%kb$F|#!h1_*ozuzM?_ zxq!9QM=o%^k2Y^a7yStooNj2{IR0lFsltTz_4UJpgEjdfab2ScE#Ehb0fRoRSKCKF z!I%5H-JW06ft=q0Wndq62c~WnONnQb5JQYNkK$!sT9MyhNERuFhEnqH4FW9S7oibNsbITG^C68~I+BCxRr!bQ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`fICSE!z7enc2%={QGgvEKJwcFE));vbC3=5NL{S-uA_-BDB!&?R~d+UTbt^+IhZwx0`V7 z)}J-7^N-;=j|?Sk66&pN_}B`L1)nRY$_XdK^$8|^b^^ipc!P`Ewvtb`XQJ^Q&zaa% z+6{EIMk_}&ft1wLhJtElyCJe&#pg^0+rrhe`7=6|k}*L)i0BY$Dq(V*Tp1Ul7I}ES z+;{6N-+Ui$nsqGe&MlUSbH3_>+O+3;r;2^svgh+9KoVZup7G7*E#1Dq`vwsVJ+ic} z<-IC#8|C-H!;m@J%4cfE#%}hW`t>wlY%j^G0G3R;E%r*?@14Dmx=&9}>M@BtP&bMb z3)1(Q|J-Jp^E1nSl;2+*?gqkawpwAiZ~1D;?;&c;eS!llHo)ZpmYVyFe!jbXDV(`@ zY<|C<&o!_bl2}|}b81dbKvBXayYR2v;H+!yv4ZF|pAl%=y3nz^o~M#I>GJs4 zt)E}?X8ITm?>7xO)8@ZewsbQZN1SUe46%e)xA5JY<=0G=#;Ml!0Ngi{k{}2`$^A>I puQpZcLoqfXee1g}*Lm9kT&p{gNwFoDAm3gAIVokyT5-dm{{dX7(wYDO diff --git a/third_party/libtiff/doc/specification/bigtiffpr_images/leica.png b/third_party/libtiff/doc/specification/bigtiffpr_images/leica.png deleted file mode 100644 index 758cf665b64ad11751843d02cda2e92324713e55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6451 zcmV-38O-L1P)U8P*7-ZbZ>KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO56)-X|e7nZL z$iTqBa9P*U#mSX{G{Bl%P*lRez;J+pfx##xwK$o9f#C}S14DXwNkIt%17i#W1A|CX zc0maP17iUL1A|C*NRTrF17iyV0~1e4YDEbH0|SF|enDkXW_m`6f}y3QrGjHhep0GJ zaAk2xYHqQDXI^rCQ9*uDVo7QW0|Nup4h9AW240u^5(W3f%sd4n162kpgNVo|1qcff zJ_s=cNG>fZg9jx8g8+j9g8_pBLjXe}Lp{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/safe.png b/third_party/libtiff/doc/specification/bigtiffpr_images/safe.png deleted file mode 100644 index 50acc607f81090972672d81ecea71f9460e7de68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10285 zcmW++1ymH@+n!w(Sb8Y|sRijqK)P4Dm6C3d7U^0-N|X-iP`ZC2UD6;eAf3{o(*4c< zn{#IF&OLMPdGCFn_j#T>JJDJiiUhciaRC4zP*y_efGrw4h2U7=HCl9o0BmsFlngxp z0FU&4Cj`jIq69l(cCzZS08sle;6^(MyhmCo>8JyMA2T>W7yw*7fbA{-c=7?jo;d)B zr2_zkYob}N0sycUDx+jy`ph2$c>5&VG~eH~n`M4d<47_^k}E-Rm?z1)BBHA5xNs|) z4YX$q*XQ*Xb-iaLt8&g7Z^T3I+`{Xfv{8`V=Q1jA1TsE6K1c0o=~Tygdxx|wOI|3s zv84a_|C}4&oEvsh%VsGU@xkiy6CfX*1ub!wS<#cxz!IcbZG?_zp%Hkn zOvnVGfd^0oQNyhLje!DV$LzZE1Q^f=3^=ZNBjh!tM?~fr3KK^-L3$`V-(vj4jp9e5 zU>9__l5w>3&Ce1#d+qbQsq?G>KUQQP1`_buNiVU;cg&=dIRrlc8efiWAKwn;K3z=2 zgc-?VnGi1DG58$!BPW=VVYcXOAN(48EO%qfl0z9MD)Vcg5(7aB)Ki&rAjIkNp2;|3 zD`#N3k(${M%SKF?gmt#-GxThu4b~x}on2jR8tHc*5VY^m$gpx3ger}B3G$mPgW(%M z0kQZ});XGQi5p@0R3@2{vZ{MEgbwWyrTj#e3Gc@}3xfF(>SO4x818G$kX`3UL^h%2 z2aF3(oAmpt_iXpBcdFcs9OkCmx-NO{+li}2;T{a5T8x9?D2 zf8Nsr_vER_kg#G$f=nsKM9*-(l2sP1dEC)Iyifp&hNAE#ON35^ov4tBo~t4pk#R}i zS8gm;gcF?1bG{8@_}{mhy~SU#V{iJ+%13~a1p#^F&%7wb^Wsr+wgf6WUq zmdX|W$w&gwqw)`7?Oar-s)${T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`WEJy~2AO63oEN{F{GN6s$HK z$m*#0@uCDcpNr+78|Rjl<2Wc<28j@`>cc-hJ6qd`lcpOue$v!lwf`plKa@j;!uN|0 ziHRg^G3#8MoaL|nvsI@8$jHen$(|Ean7p0nqcHVZlj`P+PfOFUc9?Jf_>r(V=kh!ev6|m|We6z4^?U1o$3rt}FS_TF_uL$E)Q_qh;Ug4Q*^4K;} z{76HUm76O)^ZU)&_STk5hE(A7xBsbT9LPqW_(38c3Bw}zx8i@?=GyUZh_el>&)&+0 zu?5>1ZYC9rEE}8P)|V_#3|+nDkme1m4&4l zoKbAl!qDKLteP4=Ojg8aO!7j_wEp#U==Jq=0%2sKlCJL5#$TtF)lj^1W3M@z;Ha3G z^-v^@8JLz!-EzI922hetn3OrbB!72laBW_X;go8;+R98*O8g9NN&dS!*{J0KUC;0ndqdzWKKh@^2GX%pcvU}p>zuY^gsS3mY zmPZB#?5j&kWMpL_pqsyl>EHOYbLQtv7-`ir7JPrgQ9awj&d={291tJ@GMARIacp^Y z`?V_w-B;kDsh|)c2+H9h=&8EmJ+2ph9H&cp?;ijbyi&SdgWe1PJd~enpsM7|L;nv3 CC|be* diff --git a/third_party/libtiff/doc/specification/bigtiffpr_images/weogeo.png b/third_party/libtiff/doc/specification/bigtiffpr_images/weogeo.png deleted file mode 100644 index 2b7903e27a95b81e2f931cb2e32b350cb856ed5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4160 zcmV-G5Wnw(n&-?RCwC# zTM2YrWfi_}ok_Dc2}w#w%hpBO6bi+H?Wx*R7A;ahD?$+zL~%hpc-#&>xUpyvtD@pk zs1`)16hRP>oubf67rKYENz*i2vuE~s%m4iTH+R};%uE6Z+$}3Tdk1Zx`T><9cK}f^6HNT|Hgxe~fnA(dJp3G;DY62>zRmV28i2EG1fewnE7y z(Nk}fQeRkJLy+q#wB}tyw4@pv+6RryEA+6^Wz<%0AbZ! zG;QuYDjHu&8e(Z6^K~8BiS$;@0*dz?q*(iY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tiff/doc/specification/coverage-bigtiff.rst deleted file mode 100644 index ecd4eb5..0000000 --- a/third_party/libtiff/doc/specification/coverage-bigtiff.rst +++ /dev/null @@ -1,59 +0,0 @@ -LibTIFF Coverage of the BigTIFF Specification -============================================= - -Since LibTIFF version 4.0.0, the BigTIFF format specification has been implemented within LibTIFF. -BigTIFF is a backward-compatible extension to the TIFF file format. - -BigTIFF logically extends the original TIFF file format (referred to as 'ClassicTIFF' from now on). -The BigTIFF specification is the result of work by a variety of parties on the LibTIFF mailing list, including -the then current LibTIFF maintainers, Joris Van Damme and Adobe staff. The BigTIFF specification has not yet -been officially approved by the TIFF specification owner (Adobe), but implementation within LibTIFF -could accelerate that process. For more information on the BigTIFF file format, for example see :doc:`bigtiff`. -Another overview and some further links can be found at -``_. - -BigTIFF is especially useful for people and vendors that are confronted with very large images, and -still seek to use an open, simple, and extendable format. This requirement is frequently encountered in the -geospatial field, but also concerns large format scanners, medical imaging and other fields. - -The LibTiff BigTIFF support was made possible by four sponsors funding the project. The programming work was -primarily done by Joris Van Damme (AWare Systems) from 2004 to 2008. - -The sponsors for the BigTIFF support work in LibTIFF, in alphabetical order: - -.. list-table:: Sponsors - :widths: 5 20 - :header-rows: 0 - - * - .. image:: bigtiffpr_images/esri.png - :width: 100% - :alt: ESRI - - `ESRI `_ has been giving customers around the world the power to - think and plan geographically since 1969. As the leader in GIS, ESRI applies innovative technologies to help - organizations create, analyze, and visualize information for more informed decisions. Running on more than - a million desktops and thousands of servers, ESRI applications are the foundation of the world's mapping and - spatial analysis infrastructure. - * - .. image:: bigtiffpr_images/leica.png - :width: 100% - :alt: Leica Geosystems Geospatial Imaging - - 'Leica Geosystems Geospatial Imaging' offers a - range of workflow solutions for photogrammetry, mapping, remote sensing, catalog management and exploitation - of geospatial imagery. Enterprise organizations use this imagery as the basis for generating information for - both education and decision making processes. Those who use Leica Geosystems products every day trust them - for their precision, seamless integration, interoperability and superior customer support. - * - .. image:: bigtiffpr_images/safe.png - :width: 100% - :alt: Safe Software - - `Safe Software `_ is the maker of FME, a powerful spatial ETL (Extract, - Transform and Load) tool that enables true data interoperability. FME manages the translation, - transformation, integration and web-based distribution of geospatial data in 200 GIS, CAD, raster and - database formats. Safe Software's FME technology is also embedded in numerous market-leading GIS and - ETL applications. - * - .. image:: bigtiffpr_images/weogeo.png - :width: 100% - :alt: WeoGeo - - 'WeoGeo' is a web-based data management resource for the geospatial - industry that allows the free market exchange of mapping related imagery products, featuring an innovative - solution that efficiently manages digital mapping files of any size. With an intuitive user interface - and the scalable power of Amazon Web Services (AWS), geospatial professionals can view, sort, search, - and share complex, high volume maps quickly and effectively. diff --git a/third_party/libtiff/doc/specification/coverage.rst b/third_party/libtiff/doc/specification/coverage.rst deleted file mode 100644 index 524f78d..0000000 --- a/third_party/libtiff/doc/specification/coverage.rst +++ /dev/null @@ -1,1693 +0,0 @@ -LibTIFF Coverage of the TIFF 6.0 Specification -============================================== - -The library is capable of dealing with images that are written to -follow the 5.0 or 6.0 TIFF spec. There is also considerable support -for some of the more esoteric portions of the 6.0 TIFF spec. - -Baseline --------- - -.. list-table:: Core requirements - :widths: 5 20 - :header-rows: 0 - - * - Core requirements - - Both ``MM`` and ``II`` byte orders are handled. - Both packed and separated planar configuration of samples. - Any number of samples per pixel (memory permitting). - Any image width and height (memory permitting). - Multiple subfiles can be read and written. - Editing is **not** supported in that related subfiles (e.g. - a reduced resolution version of an image) are not automatically - updated. - - Tags handled: ``ExtraSamples``, ``ImageWidth``, - ``ImageLength``, ``NewSubfileType``, ``ResolutionUnit``. - ``Rowsperstrip``, ``StripOffsets``, ``StripByteCounts``, - ``XResolution``, ``YResolution`` - - * - Tiled Images - - ``TileWidth``, ``TileLength``, ``TileOffsets``, - ``TileByteCounts`` - - * - Image Colorimetry Information - - ``WhitePoint``, ``PrimaryChromaticities``, ``TransferFunction``, - ``ReferenceBlackWhite`` - - * - Class B for bilevel images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 1 - - ``Compression`` = 1 (none), 2 (CCITT 1D), or 32773 (PackBits) - - ``PhotometricInterpretation`` = 0 (Min-is-White), 1 (Min-is-Black) - - * - Class G for grayscale images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 4, 8 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 0 (Min-is-White), 1 (Min-is-Black) - - * - Class P for palette color images - - ``SamplesPerPixel`` = 1 - - ``BitsPerSample`` = 1-8 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 3 (Palette RGB) - - ``ColorMap`` - - * - Class R for RGB full color images - - ``SamplesPerPixel`` = 3 - - ``BitsPerSample`` = <8,8,8> - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none) 5 (LZW) - - ``PhotometricInterpretation`` = 2 (RGB) - - * - Class F for facsimile - - (*Class B tags plus...*) - - ``Compression`` = 3 (CCITT Group 3), 4 (CCITT Group 4) - - ``FillOrder`` = 1 (MSB), 2 (LSB) - - ``Group3Options`` = 1 (2d encoding), 4 (zero fill), 5 (2d+fill) - - ``ImageWidth`` = 1728, 2048, 2482 - - ``NewSubFileType`` = 2 - - ``ResolutionUnit`` = 2 (Inch), 3 (Centimeter) - - ``PageNumber``, - ``XResolution``, - ``YResolution``, - ``Software``, - ``BadFaxLines``, - ``CleanFaxData``, - ``ConsecutiveBadFaxLines``, - ``DateTime``, - ``DocumentName``, - ``ImageDescription``, - ``Orientation`` - - * - Class S for separated images - - ``SamplesPerPixel`` = 4 - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none), 5 (LZW) - - ``PhotometricInterpretation`` = 5 (Separated) - - ``InkSet`` = 1 (CMYK) - - ``DotRange``, - ``InkNames``, - ``DotRange``, - ``TargetPrinter`` - - * - Class Y for YCbCr images - - ``SamplesPerPixel`` = 3 - - ``BitsPerSample`` = <8,8,8> - - ``PlanarConfiguration`` = 1, 2 - - ``Compression`` = 1 (none), 5 (LZW), 7 (JPEG) - - ``PhotometricInterpretation`` = 6 (YCbCr) - - ``YCbCrCoefficients``, - ``YCbCrSubsampling``, - ``YCbCrPositioning`` - - (*colorimetry info from Appendix H; see above*) - - * - Class "JPEG" for JPEG images (per TTN2) - - ``PhotometricInterpretation`` = 1 (grayscale), 2 (RGB), 5 (CMYK), 6 (YCbCr) - - (*Class Y tags if YCbCr*) - - (*Class S tags if CMYK*) - - ``Compression`` = 7 (JPEG) - -In addition, the library supports some optional compression algorithms -that are, in some cases, of dubious value. - -.. list-table:: Compression algorithms - :widths: 5 20 - :header-rows: 1 - - * - Compression tag value - - Compression algorithm - * - 32766 - - NeXT 2-bit encoding - * - 32809 - - ThunderScan 4-bit encoding - * - 32909 - - Pixar companded 11-bit ZIP encoding - * - 32946 - - PKZIP-style Deflate encoding (experimental) - * - 34676 - - SGI 32-bit Log Luminance encoding (experimental) - * - 34677 - - SGI 24-bit Log Luminance encoding (experimental) - -Note that there is no support for the JPEG-related tags defined -in the 6.0 specification; the JPEG support is based on the post-6.0 -proposal given in TIFF Technical Note #2. - -.. note:: - - For more information on the experimental Log Luminance encoding - consult the materials available at - http://www.anyhere.com/gward/pixformat/tiffluv.html. - -The following table shows the tags that are recognized -and how they are used by the library. If no use is indicated, -then the library reads and writes the tag, but does not use it internally. - -Apart of the TIFF 6.0 specification the meaning of tags can be found on various places -in the internet. For example: -https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml - -:file:`libtiff` supports also many private tags allocated for organizations that wish to -store additional information in a TIFF file. -Tags for TIFF/EP and for Digital Negative (DNG) Specification 1.1.0 -are included. - -Note that some tags are meaningful only when a particular -compression scheme is being used; e.g. ``Group3Options`` -is only useful if ``Compression`` -is set to CCITT Group 3 encoding. -Tags of this sort are considered *codec-specific* -tags and the library does not recognize them except when the -``Compression`` -tag has been previously set to the relevant compression scheme. - -Tags Recognized by LibTIFF --------------------------- - -.. list-table:: Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``SubfileType`` - - 254 - - R/W - - none (also known as ``NewSubfileType``) - - * - ``OldSubfileType`` - - 255 - - R/W - - parsed but ignored (also known as ``SubFileType``) - - * - ``ImageWidth`` - - 256 - - R/W - - lots - - * - ``ImageLength`` - - 257 - - R/W - - lots - - * - ``BitsPerSample`` - - 258 - - R/W - - lots - - * - ``Compression`` - - 259 - - R/W - - to select appropriate codec - - * - ``PhotometricInterpretation`` - - 262 - - R/W - - lots - - * - ``Thresholding`` - - 263 - - R/W - - (tag in tif.h wrongly written as "Threshholding") - - * - ``CellWidth`` - - 264 - - R/W - - - - * - ``CellLength`` - - 265 - - R/W - - - - * - ``FillOrder`` - - 266 - - R/W - - control bit order - - * - ``DocumentName`` - - 269 - - R/W - - - - * - ``ImageDescription`` - - 270 - - R/W - - - - * - ``Make`` - - 271 - - R/W - - - - * - ``Model`` - - 272 - - R/W - - - - * - ``StripOffsets`` - - 273 - - R/W - - data i/o - - * - ``Orientation`` - - 274 - - R/W - - - - * - ``SamplesPerPixel`` - - 277 - - R/W - - lots - - * - ``RowsPerStrip`` - - 278 - - R/W - - data i/o - - * - ``StripByteCounts`` - - 279 - - R/W - - data i/o - - * - ``MinSampleValue`` - - 280 - - R/W - - - - * - ``MaxSampleValue`` - - 281 - - R/W - - - - * - ``XResolution`` - - 282 - - R/W - - - - * - ``YResolution`` - - 283 - - R/W - - used by Group 3 2d encoder - - * - ``PlanarConfiguration`` - - 284 - - R/W - - data i/o - - * - ``PageName`` - - 285 - - R/W - - - - * - ``XPosition`` - - 286 - - R/W - - - - * - ``YPosition`` - - 287 - - R/W - - - - * - ``FreeOffsets`` - - 288 - - R/W - - parsed but ignored - - * - ``FreeByteCounts`` - - 289 - - R/W - - parsed but ignored - - * - ``GrayResponseUnit`` - - 290 - - R/W - - parsed but ignored - - * - ``GrayResponseCurve`` - - 291 - - R/W - - parsed but ignored - - * - ``ResolutionUnit`` - - 296 - - R/W - - used by Group 3 2d encoder - - * - ``PageNumber`` - - 297 - - R/W - - - - * - ``ColorResponseUnit`` - - 300 - - R/W - - parsed but ignored - - * - ``TransferFunction`` - - 301 - - R/W - - - - * - ``Software`` - - 305 - - R/W - - - - * - ``DateTime`` - - 306 - - R/W - - - - * - ``Artist`` - - 315 - - R/W - - - - * - ``HostComputer`` - - 316 - - R/W - - - - * - ``WhitePoint`` - - 318 - - R/W - - - - * - ``PrimaryChromaticities`` - - 319 - - R/W - - - - * - ``ColorMap`` - - 320 - - R/W - - - - * - ``HalftoneHints`` - - 321 - - R/W - - - - * - ``TileWidth`` - - 322 - - R/W - - data i/o - - * - ``TileLength`` - - 323 - - R/W - - data i/o - - * - ``TileOffsets`` - - 324 - - R/W - - data i/o - - * - ``TileByteCounts`` - - 325 - - R/W - - data i/o - - * - ``SubIFD`` - - 330 - - R/W - - subimage descriptor support - - * - ``InkSet`` - - 332 - - R/W - - - - * - ``InkNames`` - - 333 - - R/W - - - - * - ``NumberOfInks`` - - 334 - - R/W - - - - * - ``DotRange`` - - 336 - - R/W - - - - * - ``TargetPrinter`` - - 337 - - R/W - - - - * - ``ExtraSamples`` - - 338 - - R/W - - lots - - * - ``SampleFormat`` - - 339 - - R/W - - - - * - ``SMinSampleValue`` - - 340 - - R/W - - - - * - ``SMaxSampleValue`` - - 341 - - R/W - - - - * - ``ClipPath`` - - 343 - - R/W - - - - * - ``XClipPathUnits`` - - 344 - - R/W - - - - * - ``YClipPathUnits`` - - 345 - - R/W - - - - * - ``YCbCrCoefficients`` - - 529 - - R/W - - used by ``TIFFReadRGBAImage`` support - - * - ``YCbCrSubsampling`` - - 530 - - R/W - - tile / strip size calculations - - * - ``YCbCrPositioning`` - - 531 - - R/W - - - - * - ``ReferenceBlackWhite`` - - 532 - - R/W - - - - * - ``XMLPacket`` - - 700 - - R/W - - - - * - ``Matteing`` - - 32995 - - R - - none (obsoleted by ``ExtraSamples`` tag) - - * - ``DataType`` - - 32996 - - R - - none (obsoleted by ``SampleFormat`` tag) - - * - ``ImageDepth`` - - 32997 - - R/W - - tile / strip size calculations - - * - ``TileDepth`` - - 32998 - - R/W - - tile / strip size calculations - - * - ``ImageFullWidth`` - - 33300 - - R/W - - - - * - ``ImageFullLength`` - - 33301 - - R/W - - - - * - ``TextureFormat`` - - 33302 - - R/W - - - - * - ``TextureWrapModes`` - - 33303 - - R/W - - - - * - ``FieldOfViewCotangent`` - - 33304 - - R/W - - - - * - ``MatrixWorldToScreen`` - - 33305 - - R/W - - - - * - ``MatrixWorldToCamera`` - - 33306 - - R/W - - - - * - ``Copyright`` - - 33432 - - R/W - - - - * - ``RichTIFFIPTC`` - - 33723 - - R/W - - (also known as TIFF/EP IPTC/NAA; - :file:`libtiff` type is UNDEFINED or BYTE, - but often times incorrectly specified as LONG, - because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII) - - * - ``Photoshop`` - - 34377 - - R/W - - - - * - ``EXIFIFDOffset`` - - 34665 - - R/W - - - - * - ``ICC Profile`` - - 34675 - - R/W - - - - * - ``GPSIFDOffset`` - - 34853 - - R/W - - - - * - ``FaxRecvParams`` - - 34908 - - R/W - - - - * - ``FaxSubAddress`` - - 34909 - - R/W - - - - * - ``FaxRecvTime`` - - 34910 - - R/W - - - - * - ``FaxDcs`` - - 34911 - - R/W - - - - * - ``StoNits`` - - 37439 - - R/W - - - - * - ``Adobe Photoshop Document Data Block`` - - 37724 - - R/W - - - - * - ``InteroperabilityIFDOffset`` - - 40965 - - R/W - - - - * - ``DNGVersion`` - - 50706 - - R/W - - DNG 1.0 tags - - * - ``DNGBackwardVersion`` - - 50707 - - R/W - - - - * - ``UniqueCameraModel`` - - 50708 - - R/W - - - - * - ``LocalizedCameraModel`` - - 50709 - - R/W - - - - * - ``CFAPlaneColor`` - - 50710 - - R/W - - - - * - ``CFALayout`` - - 50711 - - R/W - - - - * - ``LinearizationTable`` - - 50712 - - R/W - - - - * - ``BlackLevelRepeatDim`` - - 50713 - - R/W - - - - * - ``BlackLevel`` - - 50714 - - R/W - - - - * - ``BlackLevelDeltaH`` - - 50715 - - R/W - - - - * - ``BlackLevelDeltaV`` - - 50716 - - R/W - - - - * - ``WhiteLevel`` - - 50717 - - R/W - - - - * - ``DefaultScale`` - - 50718 - - R/W - - - - * - ``DefaultCropOrigin`` - - 50719 - - R/W - - - - * - ``DefaultCropSize`` - - 50720 - - R/W - - - - * - ``ColorMatrix1`` - - 50721 - - R/W - - - - * - ``ColorMatrix2`` - - 50722 - - R/W - - - - * - ``CameraCalibration1`` - - 50723 - - R/W - - - - * - ``CameraCalibration2`` - - 50724 - - R/W - - - - * - ``ReductionMatrix1`` - - 50725 - - R/W - - - - * - ``ReductionMatrix2`` - - 50726 - - R/W - - - - * - ``AnalogBalance`` - - 50727 - - R/W - - - - * - ``AsShotNeutral`` - - 50728 - - R/W - - - - * - ``AsShotWhiteXY`` - - 50729 - - R/W - - - - * - ``BaselineExposure`` - - 50730 - - R/W - - - - * - ``BaselineNoise`` - - 50731 - - R/W - - - - * - ``BaselineSharpness`` - - 50732 - - R/W - - - - * - ``BayerGreenSplit`` - - 50733 - - R/W - - - - * - ``LinearResponseLimit`` - - 50734 - - R/W - - - - * - ``CameraSerialNumber`` - - 50735 - - R/W - - - - * - ``LensInfo`` - - 50736 - - R/W - - - - * - ``ChromaBlurRadius`` - - 50737 - - R/W - - - - * - ``AntiAliasStrength`` - - 50738 - - R/W - - - - * - ``ShadowScale`` - - 50739 - - R/W - - - - * - ``DNGPrivateData`` - - 50740 - - R/W - - - - * - ``MakerNoteSafety`` - - 50741 - - R/W - - - - * - ``CalibrationIlluminant1`` - - 50778 - - R/W - - - - * - ``CalibrationIlluminant2`` - - 50779 - - R/W - - - - * - ``BestQualityScale`` - - 50780 - - R/W - - - - * - ``RawDataUniqueID`` - - 50781 - - R/W - - - - * - ``OriginalRawFileName`` - - 50827 - - R/W - - - - * - ``OriginalRawFileData`` - - 50828 - - R/W - - - - * - ``ActiveArea`` - - 50829 - - R/W - - - - * - ``MaskedAreas`` - - 50830 - - R/W - - - - * - ``AsShotICCProfile`` - - 50831 - - R/W - - - - * - ``AsShotPreProfileMatrix`` - - 50832 - - R/W - - - - * - ``CurrentICCProfile`` - - 50833 - - R/W - - - - * - ``CurrentPreProfileMatrix`` - - 50834 - - R/W - - - - * - ``PerSample`` - - 65563 - - R/W - - (only internal pseudo tag) - - * - ``Indexed`` - - 346 - - R/W - - TIFF/FX tags - - * - ``GlobalParametersIFD`` - - 400 - - R/W - - - - * - ``ProfileType`` - - 401 - - R/W - - - - * - ``FaxProfile`` - - 402 - - R/W - - - - * - ``CodingMethods`` - - 403 - - R/W - - - - * - ``VersionYear`` - - 404 - - R/W - - - - * - ``ModeNumber`` - - 405 - - R/W - - - - * - ``Decode`` - - 433 - - R/W - - - - * - ``ImageBaseColor`` - - 434 - - R/W - - - - * - ``T82Options`` - - 435 - - R/W - - - - * - ``StripRowCounts`` - - 559 - - R/W - - part of RFC 2301 for fax - - * - ``ImageLayer`` - - 34732 - - R/W - - - -The ``Matteing`` and ``DataType`` -tags have been obsoleted by the 6.0 -``ExtraSamples`` and ``SampleFormat`` tags. -Consult the documentation on the -``ExtraSamples`` tag and Associated Alpha for elaboration. Note however -that if you use Associated Alpha, you are expected to save data that is -pre-multipled by Alpha. If this means nothing to you, check out -Porter & Duff's paper in the '84 SIGGRAPH proceedings: "Compositing Digital -Images". - -Tag ``RichTIFFIPTC`` (33723) is defined wrongly in TIFF/EP definition as "LONG or ASCII". -``libtiff`` defines it as "UNDEFINED or BYTE". - -The ``ImageDepth`` -tag is a non-standard, but registered tag that specifies -the Z-dimension of volumetric data. The combination of ``ImageWidth``, -``ImageLength``, and ``ImageDepth``, -defines a 3D volume of pixels that are -further specified by ``BitsPerSample`` and -``SamplesPerPixel``. The ``TileDepth`` -tag (also non-standard, but registered) can be used to specified a -subvolume "tiling" of a volume of data. - -The Colorimetry, and CMYK tags are additions that appear in TIFF 6.0. -Consult the TIFF 6.0 specification and :doc:`index`. - -Codecs / Compression --------------------- - -The following tags are used by codecs. - -.. list-table:: Codec / Compression Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``Predictor`` - - 317 - - R/W - - LZW codec - - * - ``JPEGTables`` - - 347 - - R/W - - JPEG - - * - ``JpegInterchangeFormat`` - - 513 - - R/W - - OJPEG - - * - ``JpegInterchangeFormatLength`` - - 514 - - R/W - - OJPEG - - * - ``JpegQTables`` - - 519 - - R/W - - OJPEG - - * - ``JpegDcTables`` - - 520 - - R/W - - OJPEG - - * - ``JpegAcTables`` - - 521 - - R/W - - OJPEG - - * - ``JpegProc`` - - 512 - - R/W - - OJPEG - - * - ``JpegRestartInterval`` - - 515 - - R/W - - OJPEG - - * - ``BadFaxLines`` - - 326 - - R/W - - CCITT / fax - - * - ``CleanFaxData`` - - 327 - - R/W - - CCITT / fax - - * - ``ConsecutiveBadFaxLines`` - - 328 - - R/W - - CCITT / fax - - * - ``Group3Options`` - - 292 - - R/W - - CCITT / fax - - * - ``Group4Options`` - - 293 - - R/W - - CCITT / fax - - * - ``LercParameters`` - - 50674 - - R/W - - LERC - -Note: This *codec-specific* -tags and the library does not recognize them except when the -``Compression`` -tag has been previously set to the relevant compression scheme. - -The JPEG-related tag is specified in -:doc:`technote2`, which defines -a revised JPEG-in-TIFF scheme (revised over the appendix that was -part of the TIFF 6.0 specification). - -EXIF / GPS Custom IFDs ----------------------- - -In addition to the standard TIFF tags, :file:`libtiff` has predefined IFDs -(image file directories) with the tags for EXIF (version 2.32) and EXIF-GPS -as custom directories. -For reading / writing of this IFDs refer to :doc:`/functions/TIFFCustomDirectory`. - -EXIF Custom Tags -................ - -.. list-table:: EXIF 2.32 Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``ExposureTime`` - - 33434 - - R/W - - - - * - ``FNumber`` - - 33437 - - R/W - - - - * - ``ExposureProgram`` - - 34850 - - R/W - - - - * - ``SpectralSensitivity`` - - 34852 - - R/W - - - - * - ``ISOSpeedRatings`` - - 34855 - - R/W - - After EXIF 2.2.1 ISOSpeedRatings is named ``PhotographicSensitivity``. - In addition, while "Count=Any", only 1 count should be used. - - * - ``OptoelectricConversionFactor`` - - 34856 - - R/W - - - - * - ``SensitivityType`` - - 34864 - - R/W - - - - * - ``StandardOutputSensitivity`` - - 34865 - - R/W - - - - * - ``RecommendedExposureIndex`` - - 34866 - - R/W - - - - * - ``ISOSpeed`` - - 34867 - - R/W - - - - * - ``ISOSpeedLatitudeyyy`` - - 34868 - - R/W - - - - * - ``ISOSpeedLatitudezzz`` - - 34869 - - R/W - - - - * - ``ExifVersion`` - - 36864 - - R/W - - - - * - ``DateTimeOriginal`` - - 36867 - - R/W - - - - * - ``DateTimeDigitized`` - - 36868 - - R/W - - - - * - ``OffsetTime`` - - 36880 - - R/W - - - - * - ``OffsetTimeOriginal`` - - 36881 - - R/W - - - - * - ``OffsetTimeDigitized`` - - 36882 - - R/W - - - - * - ``ComponentsConfiguration`` - - 37121 - - R/W - - - - * - ``CompressedBitsPerPixel`` - - 37122 - - R/W - - - - * - ``ShutterSpeedValue`` - - 37377 - - R/W - - - - * - ``ApertureValue`` - - 37378 - - R/W - - - - * - ``BrightnessValue`` - - 37379 - - R/W - - - - * - ``ExposureBiasValue`` - - 37380 - - R/W - - - - * - ``MaxApertureValue`` - - 37381 - - R/W - - - - * - ``SubjectDistance`` - - 37382 - - R/W - - - - * - ``MeteringMode`` - - 37383 - - R/W - - - - * - ``LightSource`` - - 37384 - - R/W - - - - * - ``Flash`` - - 37385 - - R/W - - - - * - ``FocalLength`` - - 37386 - - R/W - - - - * - ``SubjectArea`` - - 37396 - - R/W - - - - * - ``MakerNote`` - - 37500 - - R/W - - - - * - ``UserComment`` - - 37510 - - R/W - - - - * - ``SubSecTime`` - - 37520 - - R/W - - - - * - ``SubSecTimeOriginal`` - - 37521 - - R/W - - - - * - ``SubSecTimeDigitized`` - - 37522 - - R/W - - - - * - ``Temperature`` - - 37888 - - R/W - - - - * - ``Humidity`` - - 37889 - - R/W - - - - * - ``Pressure`` - - 37890 - - R/W - - - - * - ``WaterDepth`` - - 37891 - - R/W - - - - * - ``Acceleration`` - - 37892 - - R/W - - - - * - ``CameraElevationAngle`` - - 37893 - - R/W - - - - * - ``FlashpixVersion`` - - 40960 - - R/W - - - - * - ``ColorSpace`` - - 40961 - - R/W - - - - * - ``PixelXDimension`` - - 40962 - - R/W - - - - * - ``PixelYDimension`` - - 40963 - - R/W - - - - * - ``RelatedSoundFile`` - - 40964 - - R/W - - - - * - ``FlashEnergy`` - - 41483 - - R/W - - - - * - ``SpatialFrequencyResponse`` - - 41484 - - R/W - - - - * - ``FocalPlaneXResolution`` - - 41486 - - R/W - - - - * - ``FocalPlaneYResolution`` - - 41487 - - R/W - - - - * - ``FocalPlaneResolutionUnit`` - - 41488 - - R/W - - - - * - ``SubjectLocation`` - - 41492 - - R/W - - - - * - ``ExposureIndex`` - - 41493 - - R/W - - - - * - ``SensingMethod`` - - 41495 - - R/W - - - - * - ``FileSource`` - - 41728 - - R/W - - - - * - ``SceneType`` - - 41729 - - R/W - - - - * - ``CFAPattern`` - - 41730 - - R/W - - - - * - ``CustomRendered`` - - 41985 - - R/W - - - - * - ``ExposureMode`` - - 41986 - - R/W - - - - * - ``WhiteBalance`` - - 41987 - - R/W - - - - * - ``DigitalZoomRatio`` - - 41988 - - R/W - - - - * - ``FocalLengthIn35mmFilm`` - - 41989 - - R/W - - - - * - ``SceneCaptureType`` - - 41990 - - R/W - - - - * - ``GainControl`` - - 41991 - - R/W - - - - * - ``Contrast`` - - 41992 - - R/W - - - - * - ``Saturation`` - - 41993 - - R/W - - - - * - ``Sharpness`` - - 41994 - - R/W - - - - * - ``DeviceSettingDescription`` - - 41995 - - R/W - - - - * - ``SubjectDistanceRange`` - - 41996 - - R/W - - - - * - ``ImageUniqueID`` - - 42016 - - R/W - - - - * - ``CameraOwnerName`` - - 42032 - - R/W - - - - * - ``BodySerialNumber`` - - 42033 - - R/W - - - - * - ``LensSpecification`` - - 42034 - - R/W - - - - * - ``LensMake`` - - 42035 - - R/W - - - - * - ``LensModel`` - - 42036 - - R/W - - - - * - ``LensSerialNumber`` - - 42037 - - R/W - - - - * - ``Gamma`` - - 42240 - - R/W - - - - * - ``CompositeImage`` - - 42080 - - R/W - - - - * - ``SourceImageNumberOfCompositeImage`` - - 42081 - - R/W - - - - * - ``SourceExposureTimesOfCompositeImage`` - - 42082 - - R/W - - - -GPS Custom Tags -............... - -.. list-table:: GPS 2.32 Tags used by libtiff - :widths: 5 1 1 5 - :header-rows: 1 - - * - Tag Name - - Value - - R/W< - - Library's Use (Comments) - - * - ``VersionID`` - - 0 - - R/W - - - - * - ``LatitudeRef`` - - 1 - - R/W - - - - * - ``Latitude`` - - 2 - - R/W - - - - * - ``LongitudeRef`` - - 3 - - R/W - - - - * - ``Longitude`` - - 4 - - R/W - - - - * - ``AltitudeRef`` - - 5 - - R/W - - - - * - ``Altitude`` - - 6 - - R/W - - - - * - ``TimeStamp`` - - 7 - - R/W - - - - * - ``Satellites`` - - 8 - - R/W - - - - * - ``Status`` - - 9 - - R/W - - - - * - ``MeasureMode`` - - 10 - - R/W - - - - * - ``DOP`` - - 11 - - R/W - - - - * - ``SpeedRef`` - - 12 - - R/W - - - - * - ``Speed`` - - 13 - - R/W - - - - * - ``TrackRef`` - - 14 - - R/W - - - - * - ``Track`` - - 15 - - R/W - - - - * - ``ImgDirectionRef`` - - 16 - - R/W - - - - * - ``ImgDirection`` - - 17 - - R/W - - - - * - ``MapDatum`` - - 18 - - R/W - - - - * - ``DestLatitudeRef`` - - 19 - - R/W - - - - * - ``DestLatitude`` - - 20 - - R/W - - - - * - ``DestLongitudeRef`` - - 21 - - R/W - - - - * - ``DestLongitude`` - - 22 - - R/W - - - - * - ``DestBearingRef`` - - 23 - - R/W - - - - * - ``DestBearing`` - - 24 - - R/W - - - - * - ``DestDistanceRef`` - - 25 - - R/W - - - - * - ``DestDistance`` - - 26 - - R/W - - - - * - ``ProcessingMethod`` - - 27 - - R/W - - - - * - ``AreaInformation`` - - 28 - - R/W - - - - * - ``DateStamp`` - - 29 - - R/W - - - - * - ``Differential`` - - 30 - - R/W - - - - * - ``HorizontalPositioningError`` - - 31 - - R/W - - - diff --git a/third_party/libtiff/doc/specification/index.rst b/third_party/libtiff/doc/specification/index.rst deleted file mode 100644 index 2966364..0000000 --- a/third_party/libtiff/doc/specification/index.rst +++ /dev/null @@ -1,28 +0,0 @@ -TIFF File Format Specification -============================== - -.. image:: ../images/jim.gif - :width: 139 - :alt: jim - -| A copy of the 6.0 specification is available from the libtiff - ftp site at ``_. -| Other places are ``_ - and ``_ - -Draft :doc:`technote2` covers problems -with the TIFF 6.0 design for embedding JPEG-compressed data in TIFF, and -describes an alternative. - -The LibTIFF coverage of the TIFF 6.0 specification is detailed in :doc:`coverage`. - -A design for a TIFF variation supporting files larger than 4GB is detailed in :doc:`bigtiff`. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - technote2 - coverage - bigtiff - coverage-bigtiff diff --git a/third_party/libtiff/doc/specification/technote2.rst b/third_party/libtiff/doc/specification/technote2.rst deleted file mode 100644 index a88eab7..0000000 --- a/third_party/libtiff/doc/specification/technote2.rst +++ /dev/null @@ -1,720 +0,0 @@ -DRAFT TIFF Technical Note #2 -############################ - -17-Mar-95 - -This Technical Note describes serious problems that have been found in -TIFF 6.0's design for embedding JPEG-compressed data in TIFF (Section 22 -of the TIFF 6.0 spec of 3 June 1992). A replacement TIFF/JPEG -specification is given. Some corrections to Section 21 are also given. - -To permit TIFF implementations to continue to read existing files, the 6.0 -JPEG fields and tag values will remain reserved indefinitely. However, -TIFF writers are strongly discouraged from using the 6.0 JPEG design. It -is expected that the next full release of the TIFF specification will not -describe the old design at all, except to note that certain tag numbers -are reserved. The existing Section 22 will be replaced by the -specification text given in the second part of this Tech Note. - - -Problems in TIFF 6.0 JPEG -========================= - -Abandoning a published spec is not a step to be taken lightly. This -section summarizes the reasons that have forced this decision. -TIFF 6.0's JPEG design suffers from design errors and limitations, -ambiguities, and unnecessary complexity. - - -Design errors and limitations ------------------------------ - -The fundamental design error in the existing Section 22 is that JPEG's -various tables and parameters are broken out as separate fields which the -TIFF control logic must manage. This is bad software engineering: that -information should be treated as private to the JPEG codec -(compressor/decompressor). Worse, the fields themselves are specified -without sufficient thought for future extension and without regard to -well-established TIFF conventions. Here are some of the significant -problems: - -* The ``JPEGxxTable`` fields do not store the table data directly in the - IFD/field structure; rather, the fields hold pointers to information - elsewhere in the file. This requires special-purpose code to be added to - *every* TIFF-manipulating application, whether it needs to decode JPEG - image data or not. Even a trivial TIFF editor, for example a program to - add an ``ImageDescription`` field to a TIFF file, must be explicitly aware of - the internal structure of the JPEG-related tables, or else it will probably - break the file. Every other auxiliary field in the TIFF spec contains - data, not pointers, and can be copied or relocated by standard code that - doesn't know anything about the particular field. This is a crucial - property of the TIFF format that must not be given up. - -* To manipulate these fields, the TIFF control logic is required to know a - great deal about JPEG details, for example such arcana as how to compute - the length of a Huffman code table --- the length is not supplied in the - field structure and can only be found by inspecting the table contents. - This is again a violation of good software practice. Moreover, it will - prevent easy adoption of future JPEG extensions that might change these - low-level details. - -* The design neglects the fact that baseline JPEG codecs support only two - sets of Huffman tables: it specifies a separate table for each color - component. This implies that encoders must waste space (by storing - duplicate Huffman tables) or else violate the well-founded TIFF convention - that prohibits duplicate pointers. Furthermore, baseline decoders must - test to find out which tables are identical, a waste of time and code - space. - -* The ``JPEGInterchangeFormat`` field also violates TIFF's proscription against - duplicate pointers: the normal strip/tile pointers are expected to point - into the larger data area pointed to by ``JPEGInterchangeFormat``. All TIFF - editing applications must be specifically aware of this relationship, since - they must maintain it or else delete the ``JPEGInterchangeFormat field``. The - ``JPEGxxTables`` fields are also likely to point into the ``JPEGInterchangeFormat`` - area, creating additional pointer relationships that must be maintained. - -* The ``JPEGQTables`` field is fixed at a byte per table entry; there is no - way to support 16-bit quantization values. This is a serious impediment - to extending TIFF to use 12-bit JPEG. - -* The 6.0 design cannot support using different quantization tables in - different strips/tiles of an image (so as to encode some areas at higher - quality than others). Furthermore, since quantization tables are tied - one-for-one to color components, the design cannot support table switching - options that are likely to be added in future JPEG revisions. - - -Ambiguities ------------ - -Several incompatible interpretations are possible for 6.0's treatment of -JPEG restart markers: - -* It is unclear whether restart markers must be omitted at TIFF segment - (strip/tile) boundaries, or whether they are optional. - -* It is unclear whether the segment size is required to be chosen as - a multiple of the specified restart interval (if any); perhaps the - JPEG codec is supposed to be reset at each segment boundary as if - there were a restart marker there, even if the boundary does not fall - at a multiple of the nominal restart interval. - -* The spec fails to address the question of restart marker numbering: - do the numbers begin again within each segment, or not? - -That last point is particularly nasty. If we make numbering begin again -within each segment, we give up the ability to impose a TIFF strip/tile -structure on an existing JPEG datastream with restarts (which was clearly a -goal of Section 22's authors). But the other choice interferes with random -access to the image segments: a reader must compute the first restart -number to be expected within a segment, and must have a way to reset its -JPEG decoder to expect a nonzero restart number first. This may not even -be possible with some JPEG chips. - -The tile height restriction found on page 104 contradicts Section 15's -general description of tiles. For an image that is not vertically -downsampled, page 104 specifies a tile height of one MCU or 8 pixels; but -Section 15 requires tiles to be a multiple of 16 pixels high. - -This Tech Note does not attempt to resolve these ambiguities, so -implementations that follow the 6.0 design should be aware that -inter-application compatibility problems are likely to arise. - - -Unnecessary complexity ----------------------- - -The 6.0 design creates problems for implementations that need to keep the -JPEG codec separate from the TIFF control logic --- for example, consider -using a JPEG chip that was not designed specifically for TIFF. JPEG codecs -generally want to produce or consume a standard ISO JPEG datastream, not -just raw compressed data. (If they were to handle raw data, a separate -out-of-band mechanism would be needed to load tables into the codec.) -With such a codec, the TIFF control logic must parse JPEG markers emitted -by the codec to create the TIFF table fields (when writing) or synthesize -JPEG markers from the TIFF fields to feed the codec (when reading). This -means that the control logic must know a great deal more about JPEG details -than we would like. The parsing and reconstruction of the markers also -represents a fair amount of unnecessary work. - -Quite a few implementers have proposed writing "TIFF/JPEG" files in which -a standard JPEG datastream is simply dumped into the file and pointed to -by JPEGInterchangeFormat. To avoid parsing the JPEG datastream, they -suggest not writing the JPEG auxiliary fields (JPEGxxTables etc) nor even -the basic TIFF strip/tile data pointers. This approach is incompatible -with implementations that handle the full TIFF 6.0 JPEG design, since they -will expect to find strip/tile pointers and auxiliary fields. Indeed this -is arguably not TIFF at all, since *all* TIFF-reading applications expect -to find strip or tile pointers. A subset implementation that is not -upward-compatible with the full spec is clearly unacceptable. However, -the frequency with which this idea has come up makes it clear that -implementers find the existing Section 22 too complex. - - -Overview of the solution -======================== - -To solve these problems, we adopt a new design for embedding -JPEG-compressed data in TIFF files. The new design uses only complete, -uninterpreted ISO JPEG datastreams, so it should be much more forgiving of -extensions to the ISO standard. It should also be far easier to implement -using unmodified JPEG codecs. - -To reduce overhead in multi-segment TIFF files, we allow JPEG overhead -tables to be stored just once in a ``JPEGTables`` auxiliary field. This -feature does not violate the integrity of the JPEG datastreams, because it -uses the notions of "tables-only datastreams" and "abbreviated image -datastreams" as defined by the ISO standard. - -To prevent confusion with the old design, the new design is given a new -``Compression`` tag value, ``Compression=7``. Readers that need to handle -existing 6.0 JPEG files may read both old and new files, using whatever -interpretation of the 6.0 spec they did before. ``Compression`` tag value 6 -and the field tag numbers defined by 6.0 section 22 will remain reserved -indefinitely, even though detailed descriptions of them will be dropped -from future editions of the TIFF specification. - - -Replacement TIFF/JPEG specification -=================================== - -[This section of the Tech Note is expected to replace Section 22 in the -next release of the TIFF specification.] - -This section describes TIFF compression scheme 7, a high-performance -compression method for continuous-tone images. - -Introduction ------------- - -This TIFF compression method uses the international standard for image -compression ISO/IEC 10918-1, usually known as "JPEG" (after the original -name of the standards committee, Joint Photographic Experts Group). JPEG -is a joint ISO/CCITT standard for compression of continuous-tone images. - -The JPEG committee decided that because of the broad scope of the standard, -no one algorithmic procedure was able to satisfy the requirements of all -applications. Instead, the JPEG standard became a "toolkit" of multiple -algorithms and optional capabilities. Individual applications may select -a subset of the JPEG standard that meets their requirements. - -The most important distinction among the JPEG processes is between lossy -and lossless compression. Lossy compression methods provide high -compression but allow only approximate reconstruction of the original -image. JPEG's lossy processes allow the encoder to trade off compressed -file size against reconstruction fidelity over a wide range. Typically, -10:1 or more compression of full-color data can be obtained while keeping -the reconstructed image visually indistinguishable from the original. Much -higher compression ratios are possible if a low-quality reconstructed image -is acceptable. Lossless compression provides exact reconstruction of the -source data, but the achievable compression ratio is much lower than for -the lossy processes; JPEG's rather simple lossless process typically -achieves around 2:1 compression of full-color data. - -The most widely implemented JPEG subset is the "baseline" JPEG process. -This provides lossy compression of 8-bit-per-channel data. Optional -extensions include 12-bit-per-channel data, arithmetic entropy coding for -better compression, and progressive/hierarchical representations. The -lossless process is an independent algorithm that has little in -common with the lossy processes. - -It should be noted that the optional arithmetic-coding extension is subject -to several US and Japanese patents. To avoid patent problems, use of -arithmetic coding processes in TIFF files intended for inter-application -interchange is discouraged. - -All of the JPEG processes are useful only for "continuous tone" data, -in which the difference between adjacent pixel values is usually small. -Low-bit-depth source data is not appropriate for JPEG compression, nor -are palette-color images good candidates. The JPEG processes work well -on grayscale and full-color data. - -Describing the JPEG compression algorithms in sufficient detail to permit -implementation would require more space than we have here. Instead, we -refer the reader to the References section. - - -What data is being compressed? ------------------------------- - -In lossy JPEG compression, it is customary to convert color source data -to YCbCr and then downsample it before JPEG compression. This gives -2:1 data compression with hardly any visible image degradation, and it -permits additional space savings within the JPEG compression step proper. -However, these steps are not considered part of the ISO JPEG standard. -The ISO standard is "color blind": it accepts data in any color space. - -For TIFF purposes, the JPEG compression tag is considered to represent the -ISO JPEG compression standard only. The ISO standard is applied to the -same data that would be stored in the TIFF file if no compression were -used. Therefore, if color conversion or downsampling are used, they must -be reflected in the regular TIFF fields; these steps are not considered to -be implicit in the JPEG compression tag value. ``PhotometricInterpretation`` -and related fields shall describe the color space actually stored in the -file. With the TIFF 6.0 field definitions, downsampling is permissible -only for YCbCr data, and it must correspond to the ``YCbCrSubSampling`` field. -(Note that the default value for this field is not 1,1; so the default for -YCbCr is to apply downsampling!) It is likely that future versions of TIFF -will provide additional ``PhotometricInterpretation`` values and a more general -way of defining subsampling, so as to allow more flexibility in -JPEG-compressed files. But that issue is not addressed in this Tech Note. - -Implementers should note that many popular JPEG codecs -(compressor/decompressors) provide automatic color conversion and -downsampling, so that the application may supply full-size RGB data which -is nonetheless converted to downsampled YCbCr. This is an implementation -convenience which does not excuse the TIFF control layer from its -responsibility to know what is really going on. The -``PhotometricInterpretation`` and subsampling fields written to the file must -describe what is actually in the file. - -A JPEG-compressed TIFF file will typically have ``PhotometricInterpretation = -YCbCr`` and ``YCbCrSubSampling = [2,1]`` or ``[2,2]``, unless the source data was -grayscale or CMYK. - - -Basic representation of JPEG-compressed images ----------------------------------------------- - -JPEG compression works in either strip-based or tile-based TIFF files. -Rather than repeating "strip or tile" constantly, we will use the term -"segment" to mean either a strip or a tile. - -When the ``Compression`` field has the value 7, each image segment contains -a complete JPEG datastream which is valid according to the ISO JPEG -standard (ISO/IEC 10918-1). Any sequential JPEG process can be used, -including lossless JPEG, but progressive and hierarchical processes are not -supported. Since JPEG is useful only for continuous-tone images, the -PhotometricInterpretation of the image shall not be 3 (palette color) nor -4 (transparency mask). The bit depth of the data is also restricted as -specified below. - -Each image segment in a JPEG-compressed TIFF file shall contain a valid -JPEG datastream according to the ISO JPEG standard's rules for -interchange-format or abbreviated-image-format data. The datastream shall -contain a single JPEG frame storing that segment of the image. The -required JPEG markers within a segment are: - -* ``SOI`` (must appear at very beginning of segment) -* ``SOFn`` -* ``SOS`` (one for each scan, if there is more than one scan) -* ``EOI`` (must appear at very end of segment) - -The actual compressed data follows ``SOS``; it may contain ``RSTn`` markers if ``DRI`` -is used. - -Additional JPEG "tables and miscellaneous" markers may appear between ``SOI`` -and ``SOFn``, between ``SOFn`` and ``SOS``, and before each subsequent ``SOS`` if there is -more than one scan. These markers include: - -* ``DQT`` -* ``DHT`` -* ``DAC`` (not to appear unless arithmetic coding is used) -* ``DRI`` -* ``APPn`` (shall be ignored by TIFF readers) -* ``COM`` (shall be ignored by TIFF readers) - -``DNL`` markers shall not be used in TIFF files. Readers should abort if any -other marker type is found, especially the JPEG reserved markers; -occurrence of such a marker is likely to indicate a JPEG extension. - -The tables/miscellaneous markers may appear in any order. Readers are -cautioned that although the ``SOFn`` marker refers to ``DQT`` tables, JPEG does not -require those tables to precede the ``SOFn``, only the ``SOS``. Missing-table -checks should be made when SOS is reached. - -If no ``JPEGTables`` field is used, then each image segment shall be a complete -JPEG interchange datastream. Each segment must define all the tables it -references. To allow readers to decode segments in any order, no segment -may rely on tables being carried over from a previous segment. - -When a ``JPEGTables`` field is used, image segments may omit tables that have -been specified in the ``JPEGTables`` field. Further details appear below. - -The ``SOFn`` marker shall be of type ``SOF0`` for strict baseline JPEG data, of -type ``SOF1`` for non-baseline lossy JPEG data, or of type ``SOF3`` for lossless -JPEG data. (``SOF9`` or ``SOF11`` would be used for arithmetic coding.) All -segments of a JPEG-compressed TIFF image shall use the same JPEG -compression process, in particular the same ``SOFn`` type. - -The data precision field of the ``SOFn`` marker shall agree with the TIFF -``BitsPerSample`` field. (Note that when ``PlanarConfiguration=1``, this implies -that all components must have the same ``BitsPerSample`` value; when -``PlanarConfiguration=2``, different components could have different bit -depths.) For ``SOF0`` only precision 8 is permitted; for ``SOF1``, precision 8 or -12 is permitted; for ``SOF3``, precisions 2 to 16 are permitted. - -The image dimensions given in the ``SOFn`` marker shall agree with the logical -dimensions of that particular strip or tile. For strip images, the ``SOFn`` -image width shall equal ``ImageWidth`` and the height shall equal ``RowsPerStrip``, -except in the last strip; its ``SOFn`` height shall equal the number of rows -remaining in the ``ImageLength``. (In other words, no padding data is counted -in the ``SOFn`` dimensions.) For tile images, each ``SOFn`` shall have width -``TileWidth`` and height ``TileHeight``; adding and removing any padding needed in -the edge tiles is the concern of some higher level of the TIFF software. -(The dimensional rules are slightly different when ``PlanarConfiguration=2``, -as described below.) - -The ISO JPEG standard only permits images up to 65535 pixels in width or -height, due to 2-byte fields in the ``SOFn`` markers. In TIFF, this limits -the size of an individual JPEG-compressed strip or tile, but the total -image size can be greater. - -The number of components in the JPEG datastream shall equal ``SamplesPerPixel`` -for ``PlanarConfiguration=1``, and shall be 1 for ``PlanarConfiguration=2``. The -components shall be stored in the same order as they are described at the -TIFF field level. (This applies both to their order in the ``SOFn`` marker, -and to the order in which they are scanned if multiple JPEG scans are -used.) The component ID bytes are arbitrary so long as each component -within an image segment is given a distinct ID. To avoid any possible -confusion, we require that all segments of a TIFF image use the same ID -code for a given component. - -In ``PlanarConfiguration 1``, the sampling factors given in ``SOFn`` markers shall -agree with the sampling factors defined by the related TIFF fields (or with -the default values that are specified in the absence of those fields). - -When DCT-based JPEG is used in a strip TIFF file, ``RowsPerStrip`` is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., a -multiple of the height of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) For example, if ``YCbCrSubSampling = [2,2]`` then ``RowsPerStrip`` -must be a multiple of 16. An exception to this rule is made for -single-strip images (``RowsPerStrip >= ImageLength``): the exact value of -``RowsPerStrip`` is unimportant in that case. This rule ensures that no data -padding is needed at the bottom of a strip, except perhaps the last strip. -Any padding required at the right edge of the image, or at the bottom of -the last strip, is expected to occur internally to the JPEG codec. - -When DCT-based JPEG is used in a tiled TIFF file, ``TileLength`` is required -to be a multiple of 8 times the largest vertical sampling factor, i.e., -a multiple of the height of an interleaved MCU; and ``TileWidth`` is required -to be a multiple of 8 times the largest horizontal sampling factor, i.e., -a multiple of the width of an interleaved MCU. (For simplicity of -specification, we require this even if the data is not actually -interleaved.) All edge padding required will therefore occur in the course -of normal TIFF tile padding; it is not special to JPEG. - -Lossless JPEG does not impose these constraints on strip and tile sizes, -since it is not DCT-based. - -Note that within JPEG datastreams, multibyte values appear in the MSB-first -order specified by the JPEG standard, regardless of the byte ordering of -the surrounding TIFF file. - - -JPEGTables field ----------------- - -The only auxiliary TIFF field added for ``Compression=7`` is the optional -``JPEGTables`` field. The purpose of ``JPEGTables`` is to predefine JPEG -quantization and/or Huffman tables for subsequent use by JPEG image -segments. When this is done, these rather bulky tables need not be -duplicated in each segment, thus saving space and processing time. -``JPEGTables`` may be used even in a single-segment file, although there is no -space savings in that case. - -``JPEGTables``: - - * Tag = 347 (15B.H) - * Type = UNDEFINED - * N = number of bytes in tables datastream, typically a few hundred - -JPEGTables provides default JPEG quantization and/or Huffman tables which -are used whenever a segment datastream does not contain its own tables, as -specified below. - -Notice that the JPEGTables field is required to have type code UNDEFINED, -not type code BYTE. This is to cue readers that expanding individual bytes -to short or long integers is not appropriate. A TIFF reader will generally -need to store the field value as an uninterpreted byte sequence until it is -fed to the JPEG decoder. - -Multibyte quantities within the tables follow the ISO JPEG convention of -MSB-first storage, regardless of the byte ordering of the surrounding TIFF -file. - -When the JPEGTables field is present, it shall contain a valid JPEG -"abbreviated table specification" datastream. This datastream shall begin -with ``SOI`` and end with ``EOI``. It may contain zero or more JPEG "tables and -miscellaneous" markers, namely: - -* ``DQT`` -* ``DHT`` -* ``DAC`` (not to appear unless arithmetic coding is used) -* ``DRI`` -* ``APPn*`` (shall be ignored by TIFF readers) -* ``COM`` (shall be ignored by TIFF readers) - -Since JPEG defines the ``SOI`` marker to reset the ``DAC`` and ``DRI`` state, these two -markers' values cannot be carried over into any image datastream, and thus -they are effectively no-ops in the ``JPEGTables`` field. To avoid confusion, -it is recommended that writers not place ``DAC`` or ``DRI`` markers in ``JPEGTables``. -However readers must properly skip over them if they appear. - -When ``JPEGTables`` is present, readers shall load the table specifications -contained in ``JPEGTables`` before processing image segment datastreams. -Image segments may simply refer to these preloaded tables without defining -them. An image segment can still define and use its own tables, subject to -the restrictions below. - -An image segment may not redefine any table defined in ``JPEGTables``. (This -restriction is imposed to allow readers to process image segments in random -order without having to reload ``JPEGTables`` between segments.) Therefore, use -of ``JPEGTables`` divides the available table slots into two groups: "global" -slots are defined in ``JPEGTables`` and may be used but not redefined by -segments; "local" slots are available for local definition and use in each -segment. To permit random access, a segment may not reference any local -tables that it does not itself define. - - -Special considerations for PlanarConfiguration 2 ------------------------------------------------- - -In ``PlanarConfiguration`` 2, each image segment contains data for only one -color component. To avoid confusing the JPEG codec, we wish the segments -to look like valid single-channel (i.e., grayscale) JPEG datastreams. This -means that different rules must be used for the ``SOFn`` parameters. - -In ``PlanarConfiguration`` 2, the dimensions given in the ``SOFn`` of a subsampled -component shall be scaled down by the sampling factors compared to the ``SOFn`` -dimensions that would be used in ``PlanarConfiguration`` 1. This is necessary -to match the actual number of samples stored in that segment, so that the -JPEG codec doesn't complain about too much or too little data. In strip -TIFF files the computed dimensions may need to be rounded up to the next -integer; in tiled files, the restrictions on tile size make this case -impossible. - -Furthermore, all ``SOFn`` sampling factors shall be given as 1. (This is -merely to avoid confusion, since the sampling factors in a single-channel -JPEG datastream have no real effect.) - -Any downsampling will need to happen externally to the JPEG codec, since -JPEG sampling factors are defined with reference to the full-precision -component. In ``PlanarConfiguration`` 2, the JPEG codec will be working on -only one component at a time and thus will have no reference component to -downsample against. - - -Minimum requirements for TIFF/JPEG ----------------------------------- - -ISO JPEG is a large and complex standard; most implementations support only -a subset of it. Here we define a "core" subset of TIFF/JPEG which readers -must support to claim TIFF/JPEG compatibility. For maximum -cross-application compatibility, we recommend that writers confine -themselves to this subset unless there is very good reason to do otherwise. - -Use the ISO baseline JPEG process: 8-bit data precision, Huffman coding, -with no more than 2 DC and 2 AC Huffman tables. Note that this implies -``BitsPerSample`` = 8 for each component. We recommend deviating from baseline -JPEG only if 12-bit data precision or lossless coding is required. - -Use no subsampling (all JPEG sampling factors = 1) for color spaces other -than YCbCr. (This is, in fact, required with the TIFF 6.0 field -definitions, but may not be so in future revisions.) For YCbCr, use one of -the following choices: - -====================== ===================== -YCbCrSubSampling field JPEG sampling factors -====================== ===================== -1,1 1h1v, 1h1v, 1h1v -2,1 2h1v, 1h1v, 1h1v -2,2 (default value) 2h2v, 1h1v, 1h1v -====================== ===================== - -We recommend that RGB source data be converted to YCbCr for best compression -results. Other source data colorspaces should probably be left alone. -Minimal readers need not support JPEG images with colorspaces other than -YCbCr and grayscale (`PhotometricInterpretation` = 6 or 1). - -A minimal reader also need not support JPEG YCbCr images with nondefault -values of ``YCbCrCoefficients`` or ``YCbCrPositioning``, nor with values of -``ReferenceBlackWhite`` other than [0,255,128,255,128,255]. (These values -correspond to the RGB<=>YCbCr conversion specified by JFIF, which is widely -implemented in JPEG codecs.) - -Writers are reminded that a ``ReferenceBlackWhite`` field *must* be included -when ``PhotometricInterpretation`` is YCbCr, because the default -``ReferenceBlackWhite`` values are inappropriate for YCbCr. - -If any subsampling is used, ``PlanarConfiguration=1`` is preferred to avoid the -possibly-confusing requirements of ``PlanarConfiguration=2``. In any case, -readers are not required to support ``PlanarConfiguration=2``. - -If possible, use a single interleaved scan in each image segment. This is -not legal JPEG if there are more than 4 ``SamplesPerPixel`` or if the sampling -factors are such that more than 10 blocks would be needed per MCU; in that -case, use a separate scan for each component. (The recommended color -spaces and sampling factors will not run into that restriction, so a -minimal reader need not support more than one scan per segment.) - -To claim TIFF/JPEG compatibility, readers shall support multiple-strip TIFF -files and the optional ``JPEGTables`` field; it is not acceptable to read only -single-datastream files. Support for tiled TIFF files is strongly -recommended but not required. - - -Other recommendations for implementers --------------------------------------- - -The TIFF tag ``Compression=7`` guarantees only that the compressed data is -represented as ISO JPEG datastreams. Since JPEG is a large and evolving -standard, readers should apply careful error checking to the JPEG markers -to ensure that the compression process is within their capabilities. In -particular, to avoid being confused by future extensions to the JPEG -standard, it is important to abort if unknown marker codes are seen. - -The point of requiring that all image segments use the same JPEG process is -to ensure that a reader need check only one segment to determine whether it -can handle the image. For example, consider a TIFF reader that has access -to fast but restricted JPEG hardware, as well as a slower, more general -software implementation. It is desirable to check only one image segment -to find out whether the fast hardware can be used. Thus, writers should -try to ensure that all segments of an image look as much "alike" as -possible: there should be no variation in scan layout, use of options such -as ``DRI``, etc. Ideally, segments will be processed identically except -perhaps for using different local quantization or entropy-coding tables. - -Writers should avoid including "noise" JPEG markers (``COM`` and ``APPn`` markers). -Standard TIFF fields provide a better way to transport any non-image data. -Some JPEG codecs may change behavior if they see an ``APPn`` marker they -think they understand; since the TIFF spec requires these markers to be -ignored, this behavior is undesirable. - -It is possible to convert an interchange-JPEG file (e.g., a JFIF file) to -TIFF simply by dropping the interchange datastream into a single strip. -(However, designers are reminded that the TIFF spec discourages huge -strips; splitting the image is somewhat more work but may give better -results.) Conversion from TIFF to interchange JPEG is more complex. A -strip-based TIFF/JPEG file can be converted fairly easily if all strips use -identical JPEG tables and no ``RSTn`` markers: just delete the overhead markers -and insert ``RSTn`` markers between strips. Converting tiled images is harder, -since the data will usually not be in the right order (unless the tiles are -only one MCU high). This can still be done losslessly, but it will require -undoing and redoing the entropy coding so that the DC coefficient -differences can be updated. - -There is no default value for ``JPEGTables``: standard TIFF files must define all -tables that they reference. For some closed systems in which many files will -have identical tables, it might make sense to define a default ``JPEGTables`` -value to avoid actually storing the tables. Or even better, invent a -private field selecting one of N default ``JPEGTables`` settings, so as to allow -for future expansion. Either of these must be regarded as a private -extension that will render the files unreadable by other applications. - - -References ----------- - -[1] Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. - -This is the best short technical introduction to the JPEG algorithms. -It is a good overview but does not provide sufficiently detailed -information to write an implementation. - -[2] Pennebaker, William B. and Mitchell, Joan L. "JPEG Still Image Data -Compression Standard", Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. -638pp. - -This textbook is by far the most complete exposition of JPEG in existence. -It includes the full text of the ISO JPEG standards (DIS 10918-1 and draft -DIS 10918-2). No would-be JPEG implementer should be without it. - -[3] ISO/IEC IS 10918-1, "Digital Compression and Coding of Continuous-tone -Still Images, Part 1: Requirements and guidelines", February 1994. -ISO/IEC DIS 10918-2, "Digital Compression and Coding of Continuous-tone -Still Images, Part 2: Compliance testing", final approval expected 1994. - -These are the official standards documents. Note that the Pennebaker and -Mitchell textbook is likely to be cheaper and more useful than the official -standards. - - -Changes to Section 21: YCbCr Images -=================================== - -[This section of the Tech Note clarifies section 21 to make clear the -interpretation of image dimensions in a subsampled image. Furthermore, -the section is changed to allow the original image dimensions not to be -multiples of the sampling factors. This change is necessary to support use -of JPEG compression on odd-size images.] - -Add the following paragraphs to the Section 21 introduction (p. 89), -just after the paragraph beginning "When a Class Y image is subsampled": - - In a subsampled image, it is understood that all TIFF image - dimensions are measured in terms of the highest-resolution - (luminance) component. In particular, ``ImageWidth``, ``ImageLength``, - ``RowsPerStrip``, ``TileWidth``, ``TileLength``, ``XResolution``, and ``YResolution`` - are measured in luminance samples. - - ``RowsPerStrip``, ``TileWidth``, and ``TileLength`` are constrained so that - there are an integral number of samples of each component in a - complete strip or tile. However, ``ImageWidth``/``ImageLength`` are not - constrained. If an odd-size image is to be converted to subsampled - format, the writer should pad the source data to a multiple of the - sampling factors by replication of the last column and/or row, then - downsample. The number of luminance samples actually stored in the - file will be a multiple of the sampling factors. Conversely, - readers must ignore any extra data (outside the specified image - dimensions) after upsampling. - - When ``PlanarConfiguration=2``, each strip or tile covers the same - image area despite subsampling; that is, the total number of strips - or tiles in the image is the same for each component. Therefore - strips or tiles of the subsampled components contain fewer samples - than strips or tiles of the luminance component. - - If there are extra samples per pixel (see field ``ExtraSamples``), - these data channels have the same number of samples as the - luminance component. - -Rewrite the ``YCbCrSubSampling`` field description (pp 91-92) as follows -(largely to eliminate possibly-misleading references to -``ImageWidth``/``ImageLength`` of the subsampled components): - - (first paragraph unchanged) - - The two elements of this field are defined as follows: - - Short 0: ``ChromaSubsampleHoriz``: - - 1 = there are equal numbers of luma and chroma samples horizontally. - - 2 = there are twice as many luma samples as chroma samples - horizontally. - - 4 = there are four times as many luma samples as chroma samples - horizontally. - - Short 1: ``ChromaSubsampleVert``: - - 1 = there are equal numbers of luma and chroma samples vertically. - - 2 = there are twice as many luma samples as chroma samples - vertically. - - 4 = there are four times as many luma samples as chroma samples - vertically. - - ``ChromaSubsampleVert`` shall always be less than or equal to - ``ChromaSubsampleHoriz``. Note that Cb and Cr have the same sampling - ratios. - - In a strip TIFF file, ``RowsPerStrip`` is required to be an integer - multiple of ``ChromaSubSampleVert`` (unless ``RowsPerStrip >= - ImageLength``, in which case its exact value is unimportant). - If ``ImageWidth`` and ``ImageLength`` are not multiples of - ``ChromaSubsampleHoriz`` and ``ChromaSubsampleVert`` respectively, then the - source data shall be padded to the next integer multiple of these - values before downsampling. - - In a tiled TIFF file, ``TileWidth`` must be an integer multiple of - ``ChromaSubsampleHoriz`` and ``TileLength`` must be an integer multiple of - ``ChromaSubsampleVert``. Padding will occur to tile boundaries. - - The default values of this field are [ 2,2 ]. Thus, YCbCr data is - downsampled by default! diff --git a/third_party/libtiff/doc/terms.rst b/third_party/libtiff/doc/terms.rst deleted file mode 100644 index 3d4012a..0000000 --- a/third_party/libtiff/doc/terms.rst +++ /dev/null @@ -1,79 +0,0 @@ -Terminology -=========== - -.. image:: images/strike.gif - :width: 128 - :alt: strike - -The following definitions are used throughout this documentation. -They are consistent with the terminology used in the TIFF 6.0 specification. - -Sample: - The unit of information stored in an image; often called a - channel elsewhere. Sample values are numbers, usually unsigned - integers, but possibly in some other format if the SampleFormat - tag is specified in a TIFF - -Pixel: - A collection of one or more samples that go together. - -Row: - An Nx1 rectangular collection of pixels. - -Tile: - An NxM rectangular organization of data (or pixels). - -Strip: - A tile whose width is the full image width. - -Compression: - A scheme by which pixel or sample data are stored in - an encoded form, specifically with the intent of reducing the - storage cost. - -Codec: - Software that implements the decoding and encoding algorithms - of a compression scheme. - -.. _ImageFileDirectory: - -Image File Directory (IFD): - An Image File Directory - in short also *directory* - - contains information about the image, - as well as pointers (offsets) to the actual image data - within the on-disk file. - An IFD points either to the next IFD or shows with a ''0'' - that it is the last IFD in the IFD-chain. - -Multi Images per TIFF file: - There may be more than one IFD in a TIFF file. - Each IFD defines a *subfile*. - One potential use of *subfiles* is to describe related images, - such as the pages of a facsimile transmission. - Such files are also named "*multi-page* TIFF" or "*multi-image* TIFF". - Refer also to :doc:`/multi_page`. - -.. _SubFile: - -Subfile: - *Subfile* is a term in the TIFF 6.0 specification for - an image and its associated *Image File Directory (IFD)* - in a TIFF file containing one or more images. - -In order to better understand how TIFF works (and consequently this -software) it is important to recognize the distinction between the -physical organization of image data as it is stored in a TIFF and how -the data is interpreted and manipulated as pixels in an image. TIFF -supports a wide variety of storage and data compression schemes that -can be used to optimize retrieval time and/or minimize storage space. -These on-disk formats are independent of the image characteristics; it -is the responsibility of the TIFF reader to process the on-disk storage -into an in-memory format suitable for an application. Furthermore, it -is the responsibility of the application to properly interpret the -visual characteristics of the image data. TIFF defines a framework for -specifying the on-disk storage format and image characteristics with -few restrictions. This permits significant complexity that can be -daunting. Good applications that handle TIFF work by handling as wide -a range of storage formats as possible, while constraining the -acceptable image characteristics to those that make sense for the -application. diff --git a/third_party/libtiff/doc/tools.rst b/third_party/libtiff/doc/tools.rst deleted file mode 100644 index df102f0..0000000 --- a/third_party/libtiff/doc/tools.rst +++ /dev/null @@ -1,155 +0,0 @@ -TIFF Tools Overview -=================== - -.. image:: images/quad.jpg - :width: 144 - :alt: quad - -This software distribution comes with a small collection of -programs for converting non-TIFF format images to TIFF and for -manipulating and interrogating the contents of TIFF images. Several -of these tools are useful in their own right. Many of them however -are more intended to serve as programming examples for using the -TIFF library. - -Manual pages ------------- - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - tools/fax2ps - tools/fax2tiff - tools/pal2rgb - tools/ppm2tiff - tools/raw2tiff - tools/rgb2ycbcr - tools/thumbnail - tools/tiff2bw - tools/tiff2pdf - tools/tiff2ps - tools/tiff2rgba - tools/tiffcmp - tools/tiffcp - tools/tiffcrop - tools/tiffdither - tools/tiffdump - tools/tiffgt - tools/tiffinfo - tools/tiffmedian - tools/tiffset - tools/tiffsplit - -Device-dependent Programs -------------------------- - -There are two device-dependent programs that serve as simple -examples for writing programs to display and save TIFF images. - -.. list-table:: Device-dependent programs - :widths: 5 20 - :header-rows: 1 - - * - Tool - - Description - - * - :doc:`tools/tiffgt` - - Display the contents of one or more TIFF images using OpenGL. - The software makes extensive use of the ``TIFFRGBAImage`` - facilities described elsewhere. - -Device-independent Programs ---------------------------- - -The remaining programs should be device-independent: - -.. list-table:: Device-dependent programs - :widths: 5 20 - :header-rows: 1 - - * - Tool - - Description - - * - :doc:`tools/fax2ps` - - Convert a Group 3- or Group 4- compressed TIFF to PostScript - that is significantly more compressed than is generated by - :program:`tiff2ps` (unless :program:`tiff2ps` writes PS Level II) - - * - :doc:`tools/fax2tiff` - - Convert raw Group 3 or Group 4 facsimile data to TIFF - - * - :doc:`tools/pal2rgb` - - Convert a Palette-style image to a full color RGB image by - applying the colormap - - * - :doc:`tools/ppm2tiff` - - A quick hack that converts 8-bit PPM format images to TIFF - - * - :doc:`tools/raw2tiff` - - Create a TIFF file from raw data - - * - :doc:`tools/rgb2ycbcr` - - Convert an RGB, grayscale, or bilevel TIFF image to a YCbCr - TIFF image; it's mainly provided for testing - - * - :doc:`tools/thumbnail` - - Copy a bilevel TIFF to one that includes 8-bit greyscale - "thumbnail images" for each page; it is provided as an example of - how one might use the ``SubIFD`` tag (and the library support - for it) - - * - :doc:`tools/tiff2bw` - - A simple program to convert a color image to grayscale - - * - :doc:`tools/tiff2pdf` - - Convert TIFF images to PDF - - * - :doc:`tools/tiff2ps` - - Convert TIFF images to PostScript - - * - :doc:`tools/tiff2rgba` - - Convert a TIFF image to RGBA color space - - * - :doc:`tools/tiffcmp` - - Compare the contents of two TIFF files (it does not check all - the directory information, but does check all the data) - - * - :doc:`tools/tiffcp` - - Copy, concatenate, and convert TIFF images (e.g. switching from - ``Compression=5`` to ``Compression=1``) - - * - :doc:`tools/tiffcrop` - - Provides selection of images from within one or more multi-image - TIFF files, with orthogonal rotation, mirroring, cropping, and - extraction of multiple sections and exporting to one or more files. - It extends the functionality of :program:`tiffcp` to support additional bit - depths in strips and tiles and enhances the selection capabilities of - tiffsplit. Bilevel images can be inverted and images may be split into - segments to fit on multiple /pages/ (standard paper sizes), plus other - functions described in the tiffcrop man page - - * - :doc:`tools/tiffdither` - - Dither a b&w image into a bilevel image (suitable for use - in creating fax files) - - * - :doc:`tools/tiffdump` - - Display the verbatim contents of the TIFF directory in a file - (it's very useful for debugging bogus files that you may get from - someone that claims they support TIFF) - - * - :doc:`tools/tiffinfo` - - Display information about one or more TIFF files - - * - :doc:`tools/tiffmedian` - - A version of Paul Heckbert's median cut program that reads an - RGB TIFF image, and creates a TIFF palette file as a result - - * - :doc:`tools/tiffset` - - Set a field in a TIFF header - - * - :doc:`tools/tiffsplit` - - Create one or more single-image files from a (possibly) - multi-image file - -Check out the manual pages for details about the above programs. diff --git a/third_party/libtiff/doc/tools/fax2ps.rst b/third_party/libtiff/doc/tools/fax2ps.rst deleted file mode 100644 index 48dbafd..0000000 --- a/third_party/libtiff/doc/tools/fax2ps.rst +++ /dev/null @@ -1,129 +0,0 @@ -fax2ps -====== - -.. program:: fax2ps - -Synopsis --------- - -**fax2ps** [ *options* ] [ *file …* ] - -Description ------------ - -:program:`fax2ps` reads one or more TIFF -facsimile image files and prints a compressed form of -PostScript on the standard output that is suitable for printing. - -By default, each page is scaled to reflect the -image dimensions and resolutions stored in the file. -The :option:`-x` and :option:`-y` -options can be used to specify the horizontal and vertical -image resolutions (lines/inch), respectively. -If the :option:`-S` -option is specified, each page is scaled to fill an output page. -The default output page is 8.5 by 11 inches. -Alternate page dimensions can be specified in inches with the -:option:`-W` and :option:`-H` -options. - -By default :program:`fax2ps` -generates PostScript for all pages in the file. -The :option:`-p` -option can be used to select one or more pages from -a multi-page document. - - -:program:`fax2ps` -generates a compressed form of PostScript that is -optimized for sending pages of text to a PostScript -printer attached to a host through a low-speed link (such -as a serial line). -Each output page is filled with white and then only -the black areas are drawn. -The PostScript specification of the black drawing operations -is optimized by using a special font that encodes the -move-draw operations required to fill -the black regions on the page. -This compression scheme typically results in a substantially -reduced PostScript description, relative to the straightforward -imaging of the page with a PostScript -``image`` -operator. -This algorithm can, however, be ineffective -for continuous-tone and white-on-black images. -For these images, it sometimes is more efficient to send -the raster bitmap image directly; see -.BR tiff2ps (1). - -Options -------- - -.. option:: -p number - - Print only the indicated page. - Multiple pages may be printed by specifying - this option more than once. - -.. option:: -x resolution - - Use *resolution* - as the horizontal resolution, in dots/inch, of the image data. - By default this value is taken from the file. - -.. option:: -y resolution - - Use *resolution* - as the vertical resolution, in lines/inch, of the image data. - By default this value is taken from the file. - -.. option:: -S - - Scale each page of image data to fill the output page dimensions. - By default images are presented according to the dimension - information recorded in the TIFF file. - -.. option:: -W width - - Use *width* - as the width, in inches, of the output page. - -.. option:: -H height - - Use *height* - as the height, in inches, of the output page. - -Diagnostics ------------ - -Some messages about malformed TIFF images come from the -TIFF library. - -Various messages about badly formatted facsimile images -may be generated due to transmission errors in received -facsimile. -:program:`fax2ps` -attempts to recover from such data errors by resynchronizing -decoding at the end of the current scanline. -This can result in long horizontal black lines in the resultant -PostScript image. - -Notes ------ - -If the destination printer supports PostScript Level II then -it is always faster to just send the encoded bitmap generated -by the :program:`tiff2ps` program. - -Bugs ----- - -:program:`fax2ps` -should probably figure out when it is doing a poor -job of compressing the output and just generate -PostScript to image the bitmap raster instead. - -See also --------- - -:doc`tiff2ps` (1), :doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/fax2tiff.rst b/third_party/libtiff/doc/tools/fax2tiff.rst deleted file mode 100644 index fcf56e7..0000000 --- a/third_party/libtiff/doc/tools/fax2tiff.rst +++ /dev/null @@ -1,246 +0,0 @@ -fax2tiff -======== - -.. program:: fax2tiff - -Synopsis --------- - -**fax2tiff** [ *options* ] [ **-o** *output.tif* ] *input.raw* - -Description ------------ - -:program:`fax2tiff` creates a TIFF file containing CCITT -Group 3 or Group 4 encoded data from one or more files containing "raw" -Group 3 or Group 4 encoded data (typically obtained directly from a fax modem). -By default, each row of data in the resultant TIFF -file is 1-dimensionally encoded and -padded or truncated to 1728 pixels, as needed. -The resultant image is a set of low resolution (98 lines/inch) -or medium resolution (196 lines/inch) -pages, each of which is a single strip of data. -The generated file conforms to the TIFF -Class F (FAX) specification for storing facsimile data. -This means, in particular, that each page of the data does -**not** include the trailing -*"return to control"* (``RTC``) code; as required -for transmission by the CCITT Group 3 specifications. -The old, "classic", format is created if the -:option:`-c` option is used. -(The Class F format can also be requested with the -:option:`-f` option.) - -The default name of the output image is :file:`fax.tif`; -this can be changed with the :option:`-o` option. -Each input file is assumed to be a separate page of facsimile data -from the same document. -The order in which input files are specified on the command -line is the order in which the resultant pages appear in the -output file. - -Options -------- - -Options that affect the interpretation of input data are: - -.. option:: -3 - - Assume input data is CCITT Group 3 encoded (default). - -.. option:: -4 - - Assume input data is CCITT Group 4 encoded. - -.. option:: -U - - Assume input data is uncompressed (Group 3 or Group 4). - -.. option:: -1 - - Assume input data is encoded with the 1-dimensional version of the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -2 - - Assume input data is 2-dimensional version of the CCITT - Group 3 Huffman encoding algorithm. - -.. option:: -P - - Assume input data is **not** - EOL-aligned (default). This option has effect with Group 3 encoded input only. - -.. option:: -A - - Assume input data is EOL-aligned. This option has effect with Group 3 - encoded input only. - -.. option:: -M - - Treat input data as having bits filled from most significant bit (``MSB``) to most least bit (``LSB``). - -.. option:: -L - - Treat input data as having bits filled from least significant bit (``LSB``) to most significant bit - (``MSB``) (default). - -.. option:: -B - - Assume input data was encoded with black as 0 and white as 1. - -.. option:: -W - - Assume input data was encoded with black as 1 and white as 0 (default). - -.. option:: -R - - Specify the vertical resolution, in lines/inch, of the input images. - By default input are assumed to have a vertical resolution of 196 lines/inch. - If images are low resolution facsimile, a value of 98 lines/inch should - be specified. - -.. option:: -X - - Specify the width, in pixels, of the input images. - By default input are assumed to have a width of 1728 pixels. - -Options that affect the output file format are: - -.. option:: -o - - Specify the name of the output file. - - -.. option:: -7 - - Force output to be compressed with the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -8 - - Force output to be compressed with the CCITT - Group 4 Huffman encoding. - -.. option:: -u - - Force output to be uncompressed (Group 3 or Group 4). - -.. option:: -5 - - Force output to be encoded with the 1-dimensional version of the CCITT - Group 3 Huffman encoding algorithm. - -.. option:: -6 - - Force output to be encoded with the 2-dimensional version of the CCITT - Group 3 Huffman encoding algorithm (default). - -.. option:: -a - - Force the last bit of each *"End Of Line"* (``EOL``) - code to land on a byte boundary (default). This "zero padding" will - be reflected in the contents of the ``Group3Options`` - tag of the resultant TIFF file. This option has effect with Group 3 encoded output only. - -.. option:: -p - - Do not EOL-align output. This option has effect with Group 3 encoded - output only. - -.. option:: -c - - Generate "classic" Group 3 TIFF format. - -.. option:: -f - - Generate TIFF Class F (TIFF/F) format (default). - -.. option:: -m - - Force output data to have bits filled from most significant bit (``MSB``) - to most least bit (``LSB``). - -.. option:: -l - - Force output data to have bits filled from least significant bit (``LSB``) - to most significant bit (``MSB``) (default). - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. - By default (or when value ``0`` is specified), :program:`tiffcp` - attempts to set the rows/strip - that no more than 8 kilobytes of data appear in a strip (with except of G3/G4 - compression schemes). If you specify special value ``-1`` - it will results in infinite number of the rows per strip. The entire image - will be the one strip in that case. This is default in case of G3/G4 output - compression schemes. - -.. option:: -s - - Stretch the input image vertically by writing each input row of - data twice to the output file. - -.. option:: -v - - Force :program:`fax2tiff` - to print the number of rows of data it retrieved from the input file. - -.. option:: -z - - Force output to be compressed with the LZW encoding. - -Diagnostics ------------ - -The following warnings and errors come from the decoding -routines in the library. - -**"Warning, %s: Premature EOL at scanline %d (x %d).\en"**: - - The input data had a row that was shorter than the expected width. - The row is padded with white. - -**"%s: Premature EOF at scanline %d (x %d).\en"**: - - The decoder ran out of data in the middle of a scanline. - The resultant row is padded with white. - -**"%s: Bad code word at row %d, x %d\en"**: - - An invalid Group 3 ``code`` - was encountered while decoding the input file. - The row number and horizontal position is given. - The remainder of the input row is discarded, while - the corresponding output row is padded with white. - -**"%s: Bad 2D code word at scanline %d.\en"**: - - An invalid Group 4 or 2D Group 3 ``code`` - was encountered while decoding the input file. - The row number and horizontal position is given. - The remainder of the input row is discarded, while - the corresponding output row is padded with white. - -Bugs ----- - -Input data are assumed to have a a "top left" orientation; -it should be possible to override this assumption -from the command line. - -See also --------- - -"CCITT Recommendation T.4" -(Standardization of Group 3 Facsimile Apparatus for Document Transmission). - -"The Spirit of TIFF Class F", -an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. - -:doc:`tiffinfo` (1), -:doc:`tiffdither` (1), -:doc:`tiffgt` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/pal2rgb.rst b/third_party/libtiff/doc/tools/pal2rgb.rst deleted file mode 100644 index 9f949ab..0000000 --- a/third_party/libtiff/doc/tools/pal2rgb.rst +++ /dev/null @@ -1,80 +0,0 @@ -pal2rgb -======= - -.. program:: pal2rgb - -Synopsis --------- - -**pal2rgb** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`pal2rgb` converts a palette color image to a full color image by -applying the colormap of the palette image to each sample to generate a full color -RGB image. - -Options -------- - -Options that affect the interpretation of input data are: - -.. option:: -C numentries - - This option overrides the default behavior of :program:`pal2rgb` - in determining whether or not - colormap entries contain 16-bit or 8-bit values. - By default the colormap is inspected and - if no colormap entry greater than 255 is found, - the colormap is assumed to have only 8-bit values; otherwise - 16-bit values (as required by the TIFF - specification) are assumed. - The - :option:`-C` - option can be used to explicitly specify the number of - bits for colormap entries: - :command:`-C 8` for 8-bit values, - :command:`-C 16` for 16-bit values. - -Options that affect the output file format are: - -.. option:: -p planarconfig - - Explicitly select the planar configuration used in organizing - data samples in the output image: - :command:`-p contig` for samples packed contiguously, and - :command:`-p separate` for samples stored separately. - By default samples are packed. - -.. option:: -c compress - - Use the specified compression algorithm to encoded image data - in the output file: - :command:`-c packbits` for Macintosh Packbits, - :command:`-c lzw` for Lempel-Ziv & Welch, - :command:`-c zip` for Deflate, - :command:`-c none` - for no compression. - If no compression-related option is specified, the input - file's compression algorithm is used. - -.. option:: -r striprows - - Explicitly specify the number of rows in each strip of the - output file. If the :option:`-r` - option is not specified, a number is selected such that each - output strip has approximately 8 kilobytes of data in it. - -Bugs ----- - -Only 8-bit images are handled. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/ppm2tiff.rst b/third_party/libtiff/doc/tools/ppm2tiff.rst deleted file mode 100644 index c69f8ff..0000000 --- a/third_party/libtiff/doc/tools/ppm2tiff.rst +++ /dev/null @@ -1,56 +0,0 @@ -ppm2tiff -======== - -.. program:: ppm2tiff - -Synopsis - -**ppm2tiff** [ *options* ] [ *input.ppm* ] *output.tif* - -Description ------------ - -:program:`ppm2tiff` converts a file in the PPM, PGM and PBM image formats to -TIFF. By default, the TIFF image is created with data samples packed -(``PlanarConfiguration=1``), compressed with the Packbits algorithm -(``Compression=32773``), and with each strip no more than 8 kilobytes. -These characteristics can be overridden, or explicitly specified with the -options described below. - -If the PPM file contains greyscale data, then the ``PhotometricInterpretation`` -tag is set to 1 (min-is-black), otherwise it is set to 2 (RGB). - -If no PPM file is specified on the command line, :program:`ppm2tiff` -will read from the standard input. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression (will be used by default), - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c jpeg` for baseline JPEG compression, - :command:`-c zip` for Deflate compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, and - :command:`-c g4` for CCITT Group 4 (T.6) compression. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; by default the number of - rows/strip is selected so that each strip is approximately 8 kilobytes. - -.. option:: -R resolution - - Mark the resultant image to have the specified X and Y resolution (in - dots/inch). - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/raw2tiff.rst b/third_party/libtiff/doc/tools/raw2tiff.rst deleted file mode 100644 index a9378da..0000000 --- a/third_party/libtiff/doc/tools/raw2tiff.rst +++ /dev/null @@ -1,143 +0,0 @@ -raw2tiff -======== - -.. program:: raw2tiff - - -Synopsis --------- - -**raw2tiff** [ *options ] *input.raw* *output.tif* - -Description ------------ - -:program:`raw2tiff` converts a raw byte sequence into TIFF. -By default, the TIFF image is created with data samples packed -(``PlanarConfiguration=1``), compressed with the PackBits algorithm -(``Compression=32773``), and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. - -Options -------- - -.. option:: -H number - - Size of input image file header in bytes (0 by default). This amount of data - just will be skipped from the start of file while reading. - -.. option:: -w number - - Width of input image in pixels (can be guessed, see :ref:`raw-guess` below). - -.. option: -l number - - length of input image in lines (can be guessed, see :ref:`raw-guess` below). - -:option: -b number - - number of bands in input image (1 by default). - -.. option:: -d datatype - - type of samples in input image, where *datatype* may be one of: - - ========= =================================== - Data type Description - ========= =================================== - byte 8-bit unsigned integer (default) - short 16-bit unsigned integer - long 32-bit unsigned integer - sbyte 8-bit signed integer - sshort 16-bit signed integer - slong 32-bit signed integer - float 32-bit IEEE floating point - double 64-bit IEEE floating point - ========= =================================== - -.. option:: -i config - - type of sample interleaving in input image, where *config* may be one of: - - ============= ================================ - Configuration Description - ============= ================================ - pixel pixel interleaved data (default) - band band interleaved data. - ============= ================================ - -.. option:: -p photo - - photometric interpretation (color space) of the input image, where *photo* may - be one of: - - =========== ============================================== - Photometric Description - =========== ============================================== - miniswhite white color represented with 0 value - minisblack black color represented with 0 value (default) - rgb image has RGB color model - cmyk image has CMYK (separated) color model - ycbcr image has YCbCr color model - cielab image has CIE L*a*b color model - icclab image has ICC L*a*b color model - itulab image has ITU L*a*b color model - =========== ============================================== - -.. option:: -s - - swap bytes fetched from the input file. - -.. option:: -L - - input data has LSB2MSB bit order (default). - -.. option:: -M - - input data has MSB2LSB bit order. - -.. option:: -c - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm (the default), - :command:`-c jpeg` for the baseline JPEG compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`\-c lzw` for Lempel-Ziv & Welch. - -.. option -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. _raw-guess: - -Guessing the image geometry ---------------------------- - -:program:`raw2tif` can guess image width and height in case one or both of these parameters are -not specified. If you omit one of those parameters, the complementary one will -be calculated based on the file size (taking into account header size, number -of bands and data type). If you omit both parameters, the statistical approach -will be used. Utility will compute correlation coefficient between two lines -at the image center using several appropriate line sizes and the highest -absolute value of the coefficient will indicate the right line size. That is -why you should be cautious with the very large images, because guessing -process may take a while (depending on your system performance). Of course, the -utility can't guess the header size, number of bands and data type, so it -should be specified manually. If you don't know anything about your image, -just try with the several combinations of those options. - -There is no magic, it is just a mathematical statistics, so it can be wrong -in some cases. But for most ordinary images guessing method will work fine. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/rgb2ycbcr.rst b/third_party/libtiff/doc/tools/rgb2ycbcr.rst deleted file mode 100644 index 70a92e0..0000000 --- a/third_party/libtiff/doc/tools/rgb2ycbcr.rst +++ /dev/null @@ -1,63 +0,0 @@ -rgb2ycbcr -========= - -.. program:: rgb2ycbcr - -Synopsis --------- - -**rgb2ycbcr** [ *options* ] *src1.tif src2.tif … dst.tif* - -Description ------------ - -:program:`rgb2ycbcr` converts RGB color, greyscale, or bi-level TIFF -images to YCbCr images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is converted to a -separate directory in the destination file. - -By default, chrominance samples are created by sampling -2 by 2 blocks of luminance values; this can be changed with the -:option:`-h` and :option:`-v` options. -Output data are compressed with the ``PackBits`` -compression scheme, by default; an alternate scheme can be selected with the -:option:`-c` option. -By default, output data are compressed in strips with -the number of rows in each strip selected so that the -size of a strip is never more than 8 kilobytes; -the :option:`-r` -option can be used to explicitly set the number of -rows per strip. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm (the default), - :command:`-c jpeg` for the JPEG compression algorithm, - :command:`\-c zip` for the deflate compression algorithm, and - :command:`-c lzw` for Lempel-Ziv & Welch. - -.. option:: -h size - - Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. option:: -v size - - Set the vertical sampling dimension to one of: 1, 2 (default), or 4. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/thumbnail.rst b/third_party/libtiff/doc/tools/thumbnail.rst deleted file mode 100644 index 46f241d..0000000 --- a/third_party/libtiff/doc/tools/thumbnail.rst +++ /dev/null @@ -1,66 +0,0 @@ -thumbnail -========= - -.. program:: thumbnail - -Synopsis --------- - -**thumbnail** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`thumbnail` is a program written to show how one might use the -``SubIFD`` tag (#330) to store thumbnail images. -:program:`thumbnail` -copies a TIFF Class F facsimile file to the output file -and for each image an 8-bit greyscale "thumbnail sketch" is created. -The output file contains the thumbnail image with the associated -full-resolution page linked below with the SubIFD tag. - -By default, thumbnail images are 216 pixels wide by 274 pixels high. -Pixels are calculated by sampling and filtering the input image -with each pixel value passed through a contrast curve. - -Options -------- - -.. option:: -w width - - Specify the width of thumbnail images in pixels. - -.. option:: -h height - - Specify the height of thumbnail images in pixels. - -.. option:: -c contrast - - Specify a contrast curve to apply in generating the thumbnail images. - By default pixels values are passed through a linear contrast curve - that simply maps the pixel value ranges. Alternative curves are: - - ====== ====================== - Curve Description - ====== ====================== - exp50 50% exponential curve - exp60 60% exponential curve - exp70 70% exponential curve - exp80 80% exponential curve - exp90 90% exponential curve - exp pure exponential curve - linear linear curve - ====== ====================== - -Bugs ----- - -There are no options to control the format of the saved thumbnail images. - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffgt` (1), -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/tools/tiff2bw.rst b/third_party/libtiff/doc/tools/tiff2bw.rst deleted file mode 100644 index 0ac3248..0000000 --- a/third_party/libtiff/doc/tools/tiff2bw.rst +++ /dev/null @@ -1,60 +0,0 @@ -tiff2bw -======= - -.. program:: tiff2bw - -Synopsis --------- - -**tiff2bw** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiff2bw` converts an RGB or Palette color TIFF -image to a greyscale image by -combining percentages of the red, green, and blue channels. -By default, output samples are created by taking -28% of the red channel, 59% of the green channel, and 11% of -the blue channel. To alter these percentages, the -:option:`-R`, :option:`-G`, and :option:`-B` options may be used. - -Options -------- - -.. option:: -c compress - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression, - :command:`-c packbits` for the PackBits compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`-c g3` for the CCITT Group 3 compression algorithm, - :command:`-c g4` for the CCITT Group 4 compression algorithm, - :command:`-c lzw` for Lempel-Ziv & Welch (the default). - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - -.. option:: -R redperc - - Specify the percentage of the red channel to use (default 28). - -.. option:: -G greenperc - - Specify the percentage of the green channel to use (default 59). - -.. option:: -B blueperc - - Specify the percentage of the blue channel to use (default 11). - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/tools/tiff2pdf.rst b/third_party/libtiff/doc/tools/tiff2pdf.rst deleted file mode 100644 index 84c5314..0000000 --- a/third_party/libtiff/doc/tools/tiff2pdf.rst +++ /dev/null @@ -1,211 +0,0 @@ -tiff2pdf -======== - -.. program:: tiff2pdf - -Synopsis --------- - -**tiff2pdf** [ *options* ] *input.tiff* - -Description ------------ - -:program:`tiff2pdf` opens a TIFF image and writes a PDF document to standard output. - -The program converts one TIFF file to one PDF file, including multiple page -TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF -files that contain data of TIFF photometric interpretations of bilevel, -grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by -:program:`libtiff` and PDF. - -If you have multiple TIFF files to convert into one PDF file then use :program:`tiffcp` -or other program to concatenate the files into a multiple page TIFF file. -If the input TIFF file is of huge dimensions (greater than 10000 pixels height -or width) convert the input image to a tiled TIFF if it is not already. - -The standard output is standard output. Set the output file name with the -:option:`-o` option. - -All black and white files are compressed into a single strip CCITT G4 Fax -compressed PDF, unless tiled, where tiled black and white images are -compressed into tiled CCITT G4 Fax compressed PDF, -:program:`libtiff` CCITT support is assumed. - -Color and grayscale data can be compressed using either JPEG compression, -ITU-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using -the :option:`-j` or :option:`-z` options. JPEG compression support -requires that :program:`libtiff` be configured with JPEG support, and -Zip/Deflate compression support requires that :program:`libtiff` -be configured with Zip support. Use only one or the other of -:option:`-j` and :option:`-z`. - -If the input TIFF contains single strip CCITT G4 Fax compressed information, -then that is written to the PDF file without transcoding, unless the options -of no compression and no passthrough are set, :option:`-d` and :option:`-n`. - -If the input TIFF contains JPEG or single strip Zip/Deflate compressed -information, and they are configured, then that is written to the PDF file -without transcoding, unless the options of no compression and no passthrough -are set. - -The default page size upon which the TIFF image is placed is determined by -the resolution and extent of the image data. Default values for the TIFF -image resolution can be set using the :option:`-x` and :option:`-y` -options. The page size can be set using the :option:`-p` -option for paper size, or :option:`-w` and :option:`-l` -for paper width and length, then each page of the TIFF image is centered on -its page. The distance unit for default resolution and page width and -length can be set by the :option:`-u` option, the default unit is inch. - -Various items of the output document information can be set with the -:option:`-e`, :option:`-c`, :option:`-a`, :option:`-t`, :option:`-s`, -and :option:`-k` options. Setting the argument of the option to ``""`` for these -tags causes the relevant document information field to be not written. Some -of the document information values otherwise get their information from the -input TIFF image, the software, author, document name, and image description. - -The Portable Document Format (PDF) specification is copyrighted by Adobe -Systems, Incorporated. - -Options -------- - -.. option:: -o output-file - - Set the output to go to file *output-file* - -.. option:: -j - - Compress with JPEG (requires :program:`libjpeg` configured with - :program:`libtiff`). - -.. option:: -z - - Compress with Zip/Deflate (requires :program`zlib` configured with - :program:`libtiff`). - -.. option:: -q quality - - Set the compression quality, 1-100 for JPEG. - -.. option:: -n - - Do not allow data to be converted without uncompressing, no compressed - data passthrough. - -.. option:: -b - - Set PDF ``Interpolate`` user preference. - -.. option:: -d - - Do not compress (decompress) - except monochrome to CCITT Group 4. - -.. option:: -i - - Invert colors. - -.. option:: -p paper-size - - Set paper size, e.g., ``letter``, ``legal``, ``A4``. - -.. option:: -F - - Cause the tiff to fill the PDF page. - -.. option:: -u [ i | m ] - - Set distance unit, ``i`` for inch, ``m`` for centimeter. - -.. option:: -w width - - Set width in units. - -.. option:: -l length - - Set length in units. - -.. option:: -x xres - - Set x/width resolution default. - -.. option:: -y yres - - Set y/length resolution default. - -.. option:: -r [ d | o ] - - Set ``d`` for resolution default for images without resolution, - ``o`` for resolution override for all images. - -.. option:: -f - - Set PDF ``Fit Window`` user preference. - -.. option:: -e YYYYMMDDHHMMSS - - Set document information date, overrides image or current date/time default, - ``YYYYMMDDHHMMSS``. - -.. option:: -c creator - - Set document information creator, overrides image software default. - -.. option:: -a author - - Set document information author, overrides image artist default. - -.. option:: -t title - - Set document information title, overrides image document name default. - -.. option:: -s subject - - Set document information subject, overrides image image description default. - -.. option:: -k keywords - - Set document information keywords. - -.. option:: -m size - - Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit. - -.. option:: -h - - List usage reminder to stderr and exit. - -Examples --------- - -The following example would generate the file output.pdf from input.tiff: - -.. highlight:: shell - -:: - - tiff2pdf -o output.pdf input.tiff - -The following example would generate PDF output from input.tiff and write it -to standard output: - -:: - - tiff2pdf input.tiff - -The following example would generate the file output.pdf from input.tiff, -putting the image pages on a letter sized page, compressing the output -with JPEG, with JPEG quality 75, setting the title to ``Document``, and setting -the ``Fit Window`` option: - -:: - - tiff2pdf -p letter -j -q 75 -t "Document" -f -o output.pdf input.tiff - -See also --------- - -:doc:`tiffcp` (1), -:doc:`tiff2ps` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/tools/tiff2ps.rst b/third_party/libtiff/doc/tools/tiff2ps.rst deleted file mode 100644 index fc88b4d..0000000 --- a/third_party/libtiff/doc/tools/tiff2ps.rst +++ /dev/null @@ -1,251 +0,0 @@ -tiff2ps -======== - -.. program:: tiff2ps - -Synopsis --------- - -**tiff2ps** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiff2ps` reads TIFF images and writes PostScript™ or Encapsulated -PostScript™ (EPS) on the standard output. By default :program:`tiff2ps` -writes Encapsulated PostScript™ for the first image in the specified -TIFF image file. - -By default, :program:`tiff2ps` will generate PostScript™ that fills a -printed area specified by the TIFF tags in the input file. -If the file does not contain ``XResolution`` or ``YResolution`` -tags, then the printed area is set according to the image dimensions. -The :option:`-w` and :option:`-h` options (see below) -can be used to set the dimensions of the printed area in inches; -overriding any relevant TIFF tags. - -The PostScript™ generated for RGB, palette, and CMYK images uses the -``colorimage`` operator. The PostScript™ generated for greyscale and -bilevel images uses the ``image`` operator. When the ``colorimage`` -operator is used, PostScript™ code to emulate this operator -on older PostScript™ printers is also generated. -Note that this emulation code can be very slow. - -Color images with associated alpha data are composited over -a white background. - -Options -------- - -.. option:: -1 - - Generate PostScript™ Level 1 (the default). - -.. option:: -2 - - Generate PostScript™ Level 2. - -.. option:: -3 - - Generate PostScript™ Level 3. It basically allows one to use the ```/flateDecode`` - filter for ZIP compressed TIFF images. - -.. option:: -8 - - Disable use of ASCII85 encoding with PostScript™ Level 2/3. - -.. option:: -a - - Generate output for all IFDs (pages) in the input file. - -.. option:: -b margin - - Specify the bottom margin for the output (in inches). This does not affect - the height of the printed image. - -.. option:: -c - - Center the image in the output. This option only shows an effect if both - the :option:`-w` and the :option:`-h` option are given. - -.. option:: -C name - - Specify the document creator name. - -.. option:: -d dir - - Set the initial TIFF - directory to the specified directory number. - (NB: Directories are numbered starting at zero.) - This option is useful for selecting individual pages in a - multi-page (e.g. facsimile) file. - -.. option:: -D - - Enable duplex printing (two pages per sheet of paper). - -.. option:: -e - - Force the generation of Encapsulated PostScript™ (implies - :option:`-z`). - -.. option:: -h size - - Specify the vertical size of the printed area (in inches). - -.. option:: -H - - Specify the maximum height of image (in inches). Images with larger sizes will - be split in several pages. Option :option:`-L` - may be used for specifying size of split images overlapping. - -.. option:: -i - - Enable/disable pixel interpolation. This option requires a - single numeric value: zero to disable pixel interpolation and - non-zero to enable. The default is enabled. - -.. option:: -L - - Specify the size of overlapping for split images (in inches). Used in - conjunction with :option:`-H` and :option:`-W` options. - -.. option:: -l - - Specify the left margin for the output (in inches). This does not affect - the width of the printed image. - -.. option:: -M size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - - -.. option:: -m - - Where possible render using the ``imagemask`` PostScript™ operator instead of the - ``image`` operator. When this option is specified :program:`tiff2ps` will use - ``imagemask`` for rendering 1 bit deep images. If this option is not specified - or if the image depth is greater than 1 then the ``image`` operator is used. - -.. option:: -o ifdoffset - - Set the initial TIFF directory to the IFD at the specified file offset. - This option is useful for selecting thumbnail images and the - like which are hidden using the ``SubIFD`` tag. - -.. option:: -O - - Write PostScript™ to specified file instead of standard output. - -.. option:: -p - - Force the generation of (non-Encapsulated) PostScript™. - -.. option:: -P L|P - - Set optional PageOrientation DSC comment to Landscape or Portrait. - -.. option:: -r 90|180|270|auto - - Rotate image by 90, 180, 270 degrees or auto. Auto picks the best - fit for the image on the specified paper size (eg portrait - or landscape) if :option:`-h` or :option:`-w` is specified. Rotation is in degrees - counterclockwise. Auto rotates 90 degrees ccw to produce landscape. - -.. option:: -s - - Generate output for a single IFD (page) in the input file. - -.. option:: -t title - - Specify the document title string. - -.. option:: -T - - Print pages for top edge binding. - -.. option:: -w size - - Specify the horizontal size of the printed area (in inches). - -.. option:: -W size - - Specify the maximum width of image (in inches). Images with larger sizes will - be split in several pages. Options :option:`-L` and :option:`-W` - are mutually exclusive. - -.. option:: -x - - Override resolution units specified in the TIFF as centimeters. - -.. option:: -y - - Override resolution units specified in the TIFF as inches. - -.. option:: -z - - When generating PostScript™ Level 2, data is scaled so that it does not - image into the ``deadzone`` on a page (the outer margin that the printing device - is unable to mark). This option suppresses this behavior. - When PostScript™ Level 1 is generated, data is imaged to the entire printed - page and this option has no affect. - -Examples --------- - -The following generates PostScript™ Level 2 for all pages of a facsimile: - -.. highlight:: shell - -:: - - tiff2ps \-a2 fax.tif | lpr - -Note also that if you have version 2.6.1 or newer of Ghostscript then you -can efficiently preview facsimile generated with the above command. - -To generate Encapsulated PostScript™ for a the image at directory 2 -of an image use: - -:: - - tiff2ps \-d 1 foo.tif - -(Notice that directories are numbered starting at zero.) - -If you have a long image, it may be split in several pages: - -:: - - tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps - -The page size is set to 8.5x11 by :option:`-w` and :option:`-h` -options. We will accept a small amount of vertical compression, so -:option:`-H` set to 14. Any pages between 11 and 14 inches will be fit onto one page. -Pages longer than 14 inches are cut off at 11 and continued on the next -page. The :command:`-L.5` -option says to repeat a half inch on the next page (to improve readability). - -Bugs ----- - -Because PostScript™ does not support the notion of a colormap, -8-bit palette images produce 24-bit PostScript™ images. -This conversion results in output that is six times -bigger than the original image and which takes a long time -to send to a printer over a serial line. -Matters are even worse for 4-, 2-, and 1-bit palette images. - -Does not handle tiled images when generating PostScript™ Level I output. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffgt` (1), -:doc:`tiffmedian` (1), -:doc:`tiff2bw` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/tools/tiff2rgba.rst b/third_party/libtiff/doc/tools/tiff2rgba.rst deleted file mode 100644 index 9c06780..0000000 --- a/third_party/libtiff/doc/tools/tiff2rgba.rst +++ /dev/null @@ -1,77 +0,0 @@ -tiff2rgba -========= - -.. program:: tiff2rgba - -Synopsis --------- - -**tiff2rgba** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiff2rgba` converts a wide variety of TIFF images into an RGBA TIFF image. This -includes the ability to translate different color spaces and photometric -interpretation into RGBA, support for alpha blending, and translation -of many different bit depths into a 32bit RGBA image. - -Internally this program is implemented using the :c:func:`TIFFReadRGBAImage` -function, and it suffers any limitations of that function. This includes -limited support for > 8 ``BitsPerSample`` images, and flaws with some -esoteric combinations of ``BitsPerSample``, photometric interpretation, -block organization and planar configuration. - -The generated images are stripped images with four samples per pixel -(red, green, blue and alpha) or if the :option:`-n` flag is used, three samples -per pixel (red, green, and blue). The resulting images are always planar -configuration contiguous. For this reason, this program is a useful utility -for transform exotic TIFF files into a form ingestible by almost any TIFF -supporting software. - -Options -------- - -.. option:: -c - - Specify a compression scheme to use when writing image data: - :command:`-c none` for no compression (the default), - :command:`-c packbits` for the PackBits compression algorithm, - :command:`-c zip` for the Deflate compression algorithm, - :command:`-c jpeg` for the JPEG compression algorithm, and - :command:`-c lzw` for Lempel-Ziv & Welch. - -.. option:: -r striprows - - Write data with a specified number of rows per strip; - by default the number of rows/strip is selected so that each strip - is approximately 8 kilobytes. - - -.. option:: -b - - Process the image one block (strip/tile) at a time instead of by reading - the whole image into memory at once. This may be necessary for very large - images on systems with limited RAM. - -.. option:: -n - - Drop the alpha component from the output file, producing a pure RGB file. - Currently this does not work if the :option:`-b` flag is also in effect. - -.. option:: -B - - Use this value as the background when doing alpha compositing (dropping the - alpha component). - -.. option:: -M size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -See also --------- - -:doc:`tiff2bw` (1), -:doc:`/functions/TIFFReadRGBAImage` (3tiff), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/doc/tools/tiffcmp.rst b/third_party/libtiff/doc/tools/tiffcmp.rst deleted file mode 100644 index 8b22aa1..0000000 --- a/third_party/libtiff/doc/tools/tiffcmp.rst +++ /dev/null @@ -1,59 +0,0 @@ -tiffcmp -======= - -.. program:: tiffcmp - -Synopsis --------- - -**tiffcmp** [ *options* ] *file1.tif* *file2.tif* - -Description ------------ - -:program:`tiffcmp` compares the tags and data in two files created according -to the Tagged Image File Format, Revision 6.0. -The schemes used for compressing data in each file -are immaterial when data are compared\-data are compared on -a scanline-by-scanline basis after decompression. -Most directory tags are checked; notable exceptions are: -``GrayResponseCurve``, ``ColorResponseCurve``, and ``ColorMap`` tags. -Data will not be compared if any of the ``BitsPerSample``, -``SamplesPerPixel``, or ``ImageWidth`` values are not equal. -By default, :program:`tiffcmp` will terminate if it encounters any difference. - -Options -------- - -.. option:: -l - - List each byte of image data that differs between the files. - -.. option:: -z number - - List specified number of image data bytes that differs between the files. - -.. option:: -t - - Ignore any differences in directory tags. - -Bugs ----- - -Tags that are not recognized by the library are not -compared; they may also generate spurious diagnostics. - -The image data of tiled files is not compared, since the :c:func:`TIFFReadScanline` -function is used. An error will be reported for tiled files. - -The pixel and/or sample number reported in differences may be off -in some exotic cases. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffcp.rst b/third_party/libtiff/doc/tools/tiffcp.rst deleted file mode 100644 index b38c69f..0000000 --- a/third_party/libtiff/doc/tools/tiffcp.rst +++ /dev/null @@ -1,255 +0,0 @@ -tiffcp -====== - -.. program:: tiffcp - -Synopsis --------- - -**tiffcp** [ *options* ] *src1.tif* … *srcN.tif* *dst.tif* - -Description ------------ -:program:`tiffcp` combines one or more files created according -to the Tag Image File Format, Revision 6.0 into a single TIFF file. -Because the output file may be compressed using a different -algorithm than the input files, :program:`tiffcp` is most often -used to convert between different compression schemes. - -By default, :program:`tiffcp` will copy all the understood tags in a -TIFF directory of an input file to the associated directory in the output file. - -:program:`tiffcp` can be used to reorganize the storage characteristics of data -in a file, but it is explicitly intended to not alter or convert -the image data content in any way. - -Options -------- - -.. option:: -a - - Append to an existing output file instead of overwriting it. - -.. option:: -b image - - subtract the following monochrome image from all others - processed. This can be used to remove a noise bias - from a set of images. This bias image is typically an - image of noise the camera saw with its shutter closed. - -.. option:: -B - - Force output to be written with Big-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -C - - Suppress the use of "strip chopping" when reading images - that have a single strip/tile of uncompressed data. - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c zip` for Deflate compression, - :command:`-c lzma` for LZMA2 compression, - :command:`-c jpeg` for baseline JPEG compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, - :command:`-c g4` for CCITT Group 4 (T.6) compression, or - :command:`-c sgilog` for SGILOG compression. - - By default :program:`tiffcp` will compress data according to the - value of the ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - - * ``1d`` for 1-dimensional encoding, - * ``2d`` for 2-dimensional encoding, and - * ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. :command:`-c g3:2d:fill` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW, Deflate and LZMA2 compression can be specified together with a - ``predictor`` value. A predictor value of 2 causes each scanline of the output image to - undergo horizontal differencing before it is encoded; a value of 1 forces each - scanline to be encoded without differencing. A value 3 is for floating point - predictor which you can use if the encoded data are in floating point format. - LZW-specific options are specified by appending a ``:``-separated list to the - ``lzw`` option; e.g. :command:`-c lzw:2` for LZW compression with horizontal differencing. - - Deflate and LZMA2 encoders support various compression levels (or encoder presets) set as - character ``p`` and a preset number. ``p1`` is the fastest one with the worst - compression ratio and ``p9`` is the slowest but with the best possible ratio; - e.g. :command:`-c zip:3:p9` for - Deflate encoding with maximum compression level and floating point predictor. - - For the Deflate codec, and in a libtiff build with libdeflate enabled, ``p12`` is - actually the maximum level. - - For the Deflate codec, and in a libtiff build with libdeflate enabled, ``s0`` can be used to - require zlib to be used, and ``s1`` for libdeflate (defaults to libdeflate when - it is available). - -.. option:: -f fillorder - - Specify the bit fill order to use in writing output data. By default, :program:`tiffcp` - will create a new file with the same fill order as the original. Specifying :command:`\-f lsb2msb` - will force data to be written with the ``FillOrder`` tag set to ``LSB2MSB``, while - :command:`\-f msb2lsb` will force data to be written with the ``FillOrder`` tag set to - ``MSB2LSB``. - -.. option:: -i - - Ignore non-fatal read errors and continue processing of the input file. - -.. option:: -l - - Specify the length of a tile (in pixels). - - :program:`tiffcp` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -L - - Force output to be written with Little-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -M - - Suppress the use of memory-mapped files when reading images. - -.. option:: -o offset - - Set initial directory offset. - -.. option:: -p - - Specify the planar configuration to use in writing image data - that has one 8-bit sample per pixel. By default, :program:`tiffcp` - will create a new file with the same planar configuration as - the original. Specifying :command:`\-p contig` - will force data to be written with multi-sample data packed - together, while :command:`-p separate` - will force samples to be written in separate planes. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. By default (or when value **0** - is specified), :program:`tiffcp` attempts to set the rows/strip - that no more than 8 kilobytes of data appear in a strip. If you specify - special value **-1** it will results in infinite number of the rows per - strip. The entire image will be the one strip in that case. - -.. option:: -s - - Force the output file to be written with data organized in strips - (rather than tiles). - -.. option:: -t - - Force the output file to be written with data organized in tiles (rather than - strips). options can be used to force the resultant image to be written as - strips or tiles of data, respectively. - -.. option:: -w - - Specify the width of a tile (in pixels). :program::`tiffcp` - attempts to set the tile dimensions so that no more than 8 kilobytes of data - appear in a tile. - -.. option:: -x - - Force the output file to be written with ``PAGENUMBER`` value in sequence. - -.. option:: -8 - - Write BigTIFF instead of classic TIFF format. - -.. option:: -,= character - - substitute *character* for ``,`` - in parsing image directory indices - in files. This is necessary if filenames contain commas. - Note that ``-,=`` - with whitespace immediately following will disable - the special meaning of the ``,`` entirely. See examples. - -.. option:: -m size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -Examples --------- - -The following concatenates two files and writes the result using LZW encoding: - -.. highlight:: shell - -:: - - tiffcp -c lzw a.tif b.tif result.tif - -To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used: - -:: - - tiffcp -c g4 -r 10000 g3.tif g4.tif - -(1000 is just a number that is larger than the number of rows in -the source file.) - -To extract a selected set of images from a multi-image TIFF file, the file -name may be immediately followed by a ``,`` separated list of image directory -indices. The first image is always in directory 0. Thus, to copy the 1st and -3rd images of image file :file:`album.tif` to :file:`result.tif`: - -:: - - tiffcp album.tif,0,2 result.tif - -A trailing comma denotes remaining images in sequence. The following command -will copy all image with except the first one: - -:: - - tiffcp album.tif,1, result.tif - -Given file :file:`CCD.tif` whose first image is a noise bias -followed by images which include that bias, -subtract the noise from all those images following it -(while decompressing) with the command: - -:: - - tiffcp -c none -b CCD.tif CCD.tif,1, result.tif - -If the file above were named :file:`CCD,X.tif`, the ``-,=`` -option would be required to correctly parse this filename with image numbers, -as follows: - -:: - - tiffcp -c none -,=% -b CCD,X.tif CCD,X%1%.tif result.tif - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcmp` (1), -:doc:`tiffmedian` (1), -:doc:`tiffsplit` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffcrop.rst b/third_party/libtiff/doc/tools/tiffcrop.rst deleted file mode 100644 index d7d89ca..0000000 --- a/third_party/libtiff/doc/tools/tiffcrop.rst +++ /dev/null @@ -1,547 +0,0 @@ -tiffcrop -======== - -.. program:: tiffcrop - -Synopsis --------- - -**tiffcrop** [ *options* ] *src1.tif* … *srcN.tif* *dst.tif* - -Description ------------ - -:program:`tiffcrop` processes one or more files created according -to the Tag Image File Format, Revision 6.0, specification -into one or more TIFF file(s). -:program:`tiffcrop` is most often used to extract portions of an image for processing -with bar code recognizer or OCR software when that software cannot -restrict the region of interest to a specific portion of the image -or to improve efficiency when the regions of interest must be rotated. -It can also be used to subdivide all or part of a processed image into -smaller sections and export individual images or sections of images -as separate files or separate images within one or more files derived -from the original input image or images. - -The available functions can be grouped broadly into three classes: - -#. Those that select individual images or sections of images from the input files. - The options :option:`-N` for sequences or lists of individual images in the input files, - :option:`-Z` for zones, :option:`-z` for regions, :option:`-X` and :option:`-Y` for fixed sized selections, - :option:`-m` for margins, :option:`-U` for units, and :option:`-E` for edge reference provide a variety of - ways to specify portions of the input image. - -#. Those that allow the individual images or selections to be exported to one or - more output files in different groupings and control the organization of the - data in the output images. The options :option:`-P` for page size grouping, :option:`-S` for - subdivision into columns and rows and :option:`-e` for export mode options that produce - one or more files from each input image. The options :option:`-r`, :option:`-s`, :option:`-t`, :option:`-w` control - strip and tile format and sizes while :option:`-B`, :option:`-L`, :option:`-c`, :option:`-f` modify the endian addressing - scheme, the compression options, and the bit fill sequence of images as they - are written. - -#. Those that perform some action on each image that is selected from the input file. - The options include :option:`-R` for rotate, :option:`-I` for inversion of the photometric - interpretation and/or data values, and :option:`-F` to flip (mirror) the image horizontally - or vertically. - -Functions are applied to the input image(s) in the following order: -cropping, fixed area extraction, zone and region extraction, -inversion, mirroring, rotation. - -Functions are applied to the output image(s) in the following order: -export mode options for grouping zones, regions, or images into -one or more files, *or* row and column divisions with output margins, -*or* page size divisions with page orientation options. - -Finally, strip, tile, byte order, output resolution, and compression options are -applied to all output images. - -The output file(s) may be organized and compressed using a different -algorithm from the input files. -By default, :program:`tiffcrop` will copy all the understood tags in a TIFF -directory of an input file to the associated directory in the output file. -Options can be used to force the resultant image to be written as strips -or tiles of data, respectively. - -:program:`tiffcrop` can be used to reorganize the storage characteristics of data -in a file, and to reorganize, extract, rotate, and otherwise -process the image data as specified at the same time whereas -:program:`tiffcp` does not alter the image data within the file. - -Using the options for selecting individual input images and the -options for exporting images and/or segments defined as zones or -regions of each input image, :program:`tiffcrop` can perform the -functions of :program:`tiffcp` and :program:`tiffsplit` in a single pass -while applying multiple operations to individual selections or images. - -Options -------- - -.. option:: -h - - Display the syntax summary for tiffcrop. - -.. option:: -v - - Report the current version and last modification date for tiffcrop. - -.. option:: -N odd|even|#,#-#,#|last - - Specify one or more series or range(s) of images within each file to process. - The words ``odd`` or ``even`` - may be used to specify all odd or even numbered images counting from one. - Note that internally, TIFF images are numbered from zero rather than one - but since this convention is not obvious to most users, :program:`tiffcrop` used 1 - to specify the first image in a multipage file. The word ``last`` - may be used in place of a number in the sequence to indicate the - final image in the file without knowing how many images there are. - Ranges of images may be specified with a dash and multiple sets - can be indicated by joining them in a comma-separated list. eg. use - ``-N 1,5-7,last`` - to process the 1st, 5th through 7th, and final image in the file. - -.. option:: -E top|bottom|left|right - - Specify the ``top``, ``bottom``, ``left``, or ``right`` edge as the reference from - which to calculate the width and length of crop regions or sequence - of positions for zones. When used with the :option:`-e` option for exporting - zones or regions, the reference edge determines how composite images - are arranged. Using ``-E left`` or ``-E right`` causes successive zones or - regions to be merged horizontally whereas using ``-E top`` or ``-E bottom`` - causes successive zones or regions to be arranged vertically. This - option has no effect on export layout when multiple zones or regions - are not being exported to composite images. Edges may be abbreviated - to the first letter. - -.. option:: -e combined|divided|image|multiple|separate - - Specify the export mode for images and selections from input images. - The final filename on the command line is considered to be the - destination file or filename stem for automatically generated - sequences of files. Modes may be abbreviated to the first letter. - - .. list-table:: Export modes - :widths: 5 20 - :header-rows: 1 - - * - Export mode - - Description - - * - combined - - All images and selections are written to a single file with - multiple selections from one image combined into a single image (default) - * - divided - - All images and selections are written to a single file - with each selection from one image written to a new image - * - image - - Each input image is written to a new file (numeric filename sequence) - with multiple selections from the image combined into one image - * - multiple - - Each input image is written to a new file (numeric filename sequence) - with each selection from the image written to a new image - * - separate - - Individual selections from each image are written to separate files - -.. option:: -U in|cm|px - - Specify the type of units to apply to dimensions for margins and - crop regions for input and output images. Inches or centimeters - are converted to pixels using the resolution unit specified in the - TIFF file (which defaults to inches if not specified in the IFD). - -.. option:: -m top,left,bottom,right - - Specify margins to be removed from the input image. The order must - be *top*, *left*, *bottom*, *right* with only commas separating the elements - of the list. Margins are scaled according to the current units and - removed before any other extractions are computed. - -.. option:: -X # - - Set the horizontal (X-axis) dimension of a region to extract relative to - the specified origin reference. If the origin is the top or bottom - edge, the X axis value will be assumed to start at the left edge. - -.. option:: -Y # - - Set the vertical (Y-axis) dimension of a region to extract relative to - the specified origin reference. If the origin is the left or right - edge, the Y axis value will be assumed to start at the top. - -.. option:: -Z #:#,#:# - - Specify zones of the image designated as position X of Y equal sized portions - measured from the reference edge, eg 1:3 would be first third of the - image starting from the reference edge minus any margins specified - for the confining edges. Multiple zones can be specified as a comma - separated list but they must reference the same edge. To extract the - top quarter and the bottom third of an image you would use - ``-Z 1:4,3:3``. - -.. option:: -z x1,y1,x2,y2: ... :xN,yN,xN+1,yN+1 - - Specify a series of coordinates to define regions for processing and exporting. - The coordinates represent the top left and lower right corners of each region - in the current units, eg inch, cm, or pixels. Pixels are counted from one to - width or height and inches or cm are calculated from image resolution data. - - Each colon delimited series of four values represents the horizontal and vertical - offsets from the top and left edges of the image, regardless of the edge specified - with the :option:`-E` option. The first and third values represent the horizontal offsets of - the corner points from the left edge while the second and fourth values represent - the vertical offsets from the top edge. - -.. option:: -F horiz|vert - - Flip, ie mirror, the image or extracted region horizontally or vertically. - -.. option:: -R 90|180|270 - - Rotate the image or extracted region 90, 180, or 270 degrees clockwise. - -.. option:: -I [black|white|data|both] - - Invert color space, eg dark to light for bilevel and grayscale images. - This can be used to modify negative images to positive or to correct - images that have the ``PHOTOMETRIC_INTERPRETATION`` tag set incorrectly. - If the value is black or white, the ``PHOTOMETRIC_INTERPRETATION`` tag is set to - MinIsBlack or MinIsWhite, without altering the image data. If the argument - is data or both, the data values of the image are modified. Specifying both - inverts the data and the ``PHOTOMETRIC_INTERPRETATION`` tag, whereas using data - inverts the data but not the ``PHOTOMETRIC_INTERPRETATION`` tag. - No support for modifying the color space of color images in this release. - -.. option:: -H # - - Set the horizontal resolution of output images to *#*, - expressed in the current units. - -.. option:: -V # - - Set the vertical resolution of the output images to *#* - expressed in the current units. - -.. option:: -J # - - Set the horizontal margin of an output page size to *#* - expressed in the current units when sectioning image into *columns* × *rows* - subimages using the :option:`-S` ``cols:rows`` option. - -.. option:: -K # - - Set the vertical margin of an output page size to *#* - expressed in the current units when sectioning image into *columns* × *rows* - subimages using the :option:`-S` ``cols:rows`` option. - -.. option:: -O portrait|landscape|auto - - Set the output orientation of the pages or sections. - Auto will use the arrangement that requires the fewest pages. - This option is only meaningful in conjunction with the :option:`-P` - option to format an image to fit on a specific paper size. - -.. option:: -P page - - Format the output images to fit on page size paper. Use - ``-P list`` to show the supported page sizes and dimensions. - You can define a custom page size by entering the width and length of the - page in the current units with the following format ``#.#x#.#``. - -.. option:: -S cols:rows - - Divide each image into cols across and rows down equal sections. - -.. option:: -B - - Force output to be written with Big-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -C - - Suppress the use of "strip chopping" when reading images - that have a single strip/tile of uncompressed data. - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c jpeg` for baseline JPEG compression. - :command:`-c zip` for Deflate compression, - :command:`-c g3` for CCITT Group 3 (T.4) compression, - :command:`-c g4` for CCITT Group 4 (T.6) compression. - By default :program:`tiffcrop` will compress data according to the value of the - ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - ``1d`` for 1-dimensional encoding, - ``2d`` for 2-dimensional encoding, - ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. ``-c g3:2d:fill`` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW compression can be specified together with a ``predictor`` - value. A predictor value of 2 causes - each scanline of the output image to undergo horizontal - differencing before it is encoded; a value - of 1 forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW - compression with horizontal differencing. - -.. option:: -f - - Specify the bit fill order to use in writing output data. - By default, :program:`tiffcrop` - will create a new file with the same fill order as the original. - Specifying - ``-f lsb2msb`` - will force data to be written with the ``FillOrder`` tag set to - ``LSB2MSB``, while - ``-f msb2lsb`` will force data to be written with the ``FillOrder`` - tag set to ``MSB2LSB``. - -.. option:: -i - - Ignore non-fatal read errors and continue processing of the input file. - -.. option:: -k size - - Set maximum memory allocation size (in MiB). The default is 256MiB. - Set to 0 to disable the limit. - -.. option:: -l - - Specify the length of a tile (in pixels). - :program:`tiffcrop` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -L - - Force output to be written with Little-Endian byte order. - This option only has an effect when the output file is created or - overwritten and not when it is appended to. - -.. option:: -M - - Suppress the use of memory-mapped files when reading images. - -.. option:: -p - - Specify the planar configuration to use in writing image data - that has more than one sample per pixel. - By default, :program:`tiffcrop` - will create a new file with the same planar configuration as - the original. - Specifying :command:`-p contig` - will force data to be written with multi-sample data packed - together, while - :command:`-p separate` - will force samples to be written in separate planes. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. - By default (or when value **0** is specified), :program:`tiffcrop` - attempts to set the rows/strip that no more than 8 kilobytes of - data appear in a strip. If you specify the special value - **-1** it will results in infinite number of the rows per strip. The entire image - will be the one strip in that case. - -.. option:: -s - - Force the output file to be written with data organized in strips - (rather than tiles). - -.. option:: -t - - Force the output file to be written with data organized in tiles - (rather than strips). - -.. option:: -w - - Specify the width of a tile (in pixels). - :program:`tiffcrop` attempts to set the tile dimensions so - that no more than 8 kilobytes of data appear in a tile. - -.. option:: -D opt1:value1,opt2:value2,opt3:value3:opt4:value4 - - Debug and dump facility - - Display program progress and/or dump raw data to non-TIFF files. - Options include the following and must be joined as a comma - separated list. The use of this option is generally limited to - program debugging and development of future options. An equal sign - may be substituted for the colon in option:value pairs. - - ``debug:N``: - - Display limited program progress indicators where larger *N* - increases the level of detail. - - ``format:txt|raw``: - - Format any logged data as ASCII text or raw binary - values. ASCII text dumps include strings of ones and zeroes representing - the binary values in the image data plus identifying headers. - - ``level:N``: - - Specify the level of detail presented in the dump files. - This can vary from dumps of the entire input or output image data to dumps - of data processed by specific functions. Current range of levels is 1 to 3. - - ``input:full-path-to-directory/input-dumpname``: - - ``output:full-path-to-directory/output-dumpname``: - - When dump files are being written, each image will be written to a separate - file with the name built by adding a numeric sequence value to the dumpname - and an extension of :file:`.txt` for ASCII dumps or :file:`.bin` for binary dumps. - - The four debug/dump options are independent, though it makes little sense to - specify a dump file without specifying a detail level. - - Note: :program:`tiffcrop` may be compiled with :command:`-DDEVELMODE` to enable - additional very low level debug reporting. - -However, not all option combinations are permitted. - - Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive. - In no case should the options be applied to a given selection successively. - - Note 2: Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options - such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. - -Examples --------- - -The following concatenates two files and writes the result using LZW -encoding: - -.. highlight:: shell - -:: - - tiffcrop -c lzw a.tif b.tif result.tif - -To convert a G3 1d-encoded TIFF to a single strip of G4-encoded data the following might be used: - -:: - - tiffcrop -c g4 -r 10000 g3.tif g4.tif - -(1000 is just a number that is larger than the number of rows in -the source file.) - -To extract a selected set of images from a multi-image TIFF file -use the :option:`-N` option described above. Thus, to copy the 1st and 3rd -images of image file :file:`album.tif` to :file:`result.tif`: - -:: - - tiffcrop -N 1,3 album.tif result.tif - -Invert a bilevel image scan of a microfilmed document and crop off margins of -0.25 inches on the left and right, 0.5 inch on the top, and 0.75 inch on the -bottom. From the remaining portion of the image, select the second and third -quarters, ie, one half of the area left from the center to each margin: - -:: - - tiffcrop -U in -m 0.5,0.25,0.75,0.25 -E left -Z 2:4,3:4 -I both MicrofilmNegative.tif MicrofilmPostiveCenter.tif - -Extract only the final image of a large Architectural E sized -multipage TIFF file and rotate it 90 degrees clockwise while -reformatting the output to fit on tabloid sized sheets with one -quarter of an inch on each side: - -:: - - tiffcrop -N last -R 90 -O auto -P tabloid -U in -J 0.25 -K 0.25 -H 300 -V 300 Big-PlatMap.tif BigPlatMap-Tabloid.tif - -The output images will have a specified resolution of 300 dpi in both -directions. The orientation of each page will be determined by whichever -choice requires the fewest pages. To specify a specific orientation, use -the portrait or landscape option. The paper size option does not resample -the image. It breaks each original image into a series of smaller images -that will fit on the target paper size at the specified resolution. - -Extract two regions 2048 pixels wide by 2048 pixels high from each page of -a multi-page input file and write each region to a separate output file: - -:: - - tiffcrop -U px -z 1,1,2048,2048:1,2049,2048,4097 -e separate CheckScans.tiff Check - -The output file names will use the stem :file:`Check` with a numeric suffix which is -incremented for each region of each image, eg :file:`Check-001.tiff`, -:file:`Check-002.tiff` … :file:`Check-NNN.tiff`. To produce a unique file for each page -of the input image with one new image for each region of the input image on that page -change the export option to ``-e multiple``. - -Notes ------ - -In general, bilevel, grayscale, palette and RGB(A) data with bit depths -from 1 to 32 bits should work in both interleaved and separate plane -formats. Unlike :program:`tiffcp`, :program:`tiffcrop` can read and write tiled images with -bits per sample that are not a multiple of 8 in both interleaved and -separate planar format. Floating point data types are supported at -bit depths of 16, 24, 32 and 64 bits per sample. - -Not all images can be converted from one compression scheme to another. -Data with some photometric interpretations and/or bit depths are tied to -specific compression schemes and vice-versa, e.g. Group 3/4 compression -is only usable for bilevel data. JPEG compression is only usable on 8 -bit per sample data (or 12 bit if :program:`libtiff` -was compiled with 12 bit JPEG support). Support for OJPEG compressed -images is problematic at best. Since OJPEG compression is no longer -supported for writing images with LibTIFF, these images will be updated -to the newer JPEG compression when they are copied or processed. This -may cause the image to appear color shifted or distorted after conversion. -In some cases, it is possible to remove the original compression from -image data using the option ``-c none``. - -:program:`tiffcrop` does not currently provide options to up or downsample data to -different bit depths or convert data from one photometric interpretation -to another, e.g. 16 bits per sample to 8 bits per sample or RGB to grayscale. - -:program:`tiffcrop` is very loosely derived from code in :program:`tiffcp` -with extensive modifications and additions to support the selection of input -images and regions and the exporting of them to one or more output files in -various groupings. The image manipulation routines are entirely new and -additional ones may be added in the future. It will handle tiled images with -bit depths that are not a multiple of eight that tiffcp may refuse to read. - -:program:`tiffcrop` was designed to handle large files containing many moderate sized images -with memory usage that is independent of the number of images in the file. -In order to support compression modes that are not based on individual -scanlines, e.g. JPEG, it now reads images by strip or tile rather than by -individual scanlines. In addition to the memory required by the input and -output buffers associated with :program:`libtiff` -one or more buffers at least as large as the largest image to be read are -required. The design favors large volume document processing uses over -scientific or graphical manipulation of large datasets as might be found -in research or remote sensing scenarios. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcmp` (1), -:doc:`tiffcp` (1), -:doc:`tiffmedian` (1), -:doc:`tiffsplit` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffdither.rst b/third_party/libtiff/doc/tools/tiffdither.rst deleted file mode 100644 index 9183259..0000000 --- a/third_party/libtiff/doc/tools/tiffdither.rst +++ /dev/null @@ -1,93 +0,0 @@ -tiffdither -========== - -.. program:: tiffdither - -Synopsis --------- - -**tiffdither** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiffdither` converts a single channel 8-bit greyscale image to a bilevel image -using Floyd-Steinberg error propagation with thresholding. - -Options -------- - -.. option:: -c compress - - Specify the compression to use for data written to the output file: - - =========== =================================== - Compression Description - =========== =================================== - none no compression - packbits PackBits compression - lzw Lempel-Ziv & Welch compression - zip Deflate compression - g3 CCITT Group 3 (T.4) compression - g4 for CCITT Group 4 (T.6) compression - =========== =================================== - - By default :program:`tiffdither` - will compress data according to the value of the - ``Compression`` tag found in the source file. - - The CCITT Group 3 and Group 4 compression algorithms can only - be used with bilevel data. - - Group 3 compression can be specified together with several - T.4-specific options: - ``1d`` for 1-dimensional encoding, - ``2d`` for 2-dimensional encoding, and - ``fill`` to force each encoded scanline to be zero-filled so that the - terminating EOL code lies on a byte boundary. - Group 3-specific options are specified by appending a ``:``-separated - list to the ``g3`` option; e.g. ``-c g3:2d:fill`` - to get 2D-encoded data with byte-aligned EOL codes. - - LZW compression can be specified together with a ``predictor`` value. - A predictor value of 2 causes each scanline of the output image to undergo - horizontal differencing before it is encoded; a value - of 1 forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW - compression with horizontal differencing. - -.. option:: -f - - Specify the bit fill order to use in writing output data. - By default, :program:`tiffdither` - will create a new file with the same fill order as the original. - Specifying - :command:`-f lsb2msb` will force data to be written with the - ``FillOrder`` tag set to ``LSB2MSB``, while - :command:`-f msb2lsb` will force data to be written with the - ``FillOrder`` tag set to ``MSB2LSB``. - -.. option:: -r - - Make each strip have no more than the given number of rows. - -.. option:: -t - - Set the threshold value for dithering. - By default the threshold value is 128. - -Notes ------ - -The dither algorithm is taken from the :program:`tiffmedian` -program (written by Paul Heckbert). - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`fax2tiff` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiff2bw` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffdump.rst b/third_party/libtiff/doc/tools/tiffdump.rst deleted file mode 100644 index 713f17d..0000000 --- a/third_party/libtiff/doc/tools/tiffdump.rst +++ /dev/null @@ -1,52 +0,0 @@ -tiffdump -======== - -.. program:: tiffdump - -Synopsis --------- - -**tiffdump** [ *options* ] *name* … - -Description ------------ - -:program:`tiffdump` displays directory information from files created according -to the Tag Image File Format, Revision 6.0. -The header of each TIFF file (magic number, version, and first directory offset) -is displayed, followed by the tag contents of each directory in the file. -For each tag, the name, data type, count, and value(s) is displayed. -When the symbolic name for a tag or data type is known, the symbolic -name is displayed followed by it's numeric (decimal) value. -Tag values are displayed enclosed in ``<>`` characters immediately -preceded by the value of the count field. -For example, an ``ImageWidth`` -tag might be displayed as ``ImageWidth (256) SHORT (3) 1<800>``. - -:program:`tiffdump` is particularly useful for investigating the contents of -TIFF files that :program:`libtiff` does not understand. - -Options -------- - -.. option:: -h - - Force numeric data to be printed in hexadecimal rather than the - default decimal. - -.. option:: -m items - - Change the number of indirect data items that are printed. By default, this - will be 24. - -.. option:: -o offset - - Dump the contents of the IFD at the a particular file offset. - The file offset may be specified using the usual C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - -See also --------- - -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffgt.rst b/third_party/libtiff/doc/tools/tiffgt.rst deleted file mode 100644 index ad83f43..0000000 --- a/third_party/libtiff/doc/tools/tiffgt.rst +++ /dev/null @@ -1,186 +0,0 @@ -tiffgt -====== - -.. program:: tiffgt - -Synopsis --------- - -**tiffgt** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiffgt` displays one or more images stored using the -Tag Image File Format, Revision 6.0. - -:program:`tiffgt` correctly handles files with any of the following characteristics: - - .. list-table:: Supported tag values - :widths: 5 20 - :header-rows: 1 - - * - Tag - - Value - - * - BitsPerSample - - 1, 2, 4, 8, 16 - * - SamplesPerPixel - - 1, 3, 4 (the 4th sample is ignored) - * - PhotometricInterpretation - - 0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr) - * - PlanarConfiguration - - 1 (contiguous), 2 (separate) - * - Orientation - - 1 (top-left), 4 (bottom-left) - -Data may be organized as strips or tiles and may be -compressed with any of the compression algorithms supported -by the :program:`libtiff` library. - -For palette images (``PhotometricInterpretation=3``), :program:`tiffgt` -inspects the colormap values and assumes either 16-bit -or 8-bit values according to the maximum value. -That is, if no colormap entry greater than 255 is found, -:program:`tiffgt` assumes the colormap has only 8-bit values; otherwise -it assumes 16-bit values. -This inspection is done to handle old images written by -previous (incorrect) versions of -:program:`libtiff`. - -:program:`tiffgt` can be used to display multiple images one-at-a-time. -The left mouse button switches the display to the first image in the -*next* file in the list of files specified on the command line. -The right mouse button switches to the first image in the -*previous* file in the list. -The middle mouse button causes the first image in the first file -specified on the command line to be displayed. -In addition the following keyboard commands are recognized: - - .. list-table:: Action keys - :widths: 2 23 - :header-rows: 1 - - * - Key - - Description - - * - :kbd:`b` - - Use a ``PhotometricInterpretation`` - of ``MinIsBlack`` in displaying the current image - * - :kbd:`l` - - Use a ``FillOrder`` of lsb-to-msb in decoding the current image - * - :kbd:`m` - - Use a ``FillOrder`` of msb-to-lsb in decoding the current image - * - :kbd:`c` - - Use a colormap visual to display the current image - * - :kbd:`r` - - Use a true color (24-bit RGB) visual to display the current image - * - :kbd:`w` - - Use a ``PhotometricInterpretation`` of ``MinIsWhite`` in displaying - the current image - * - :kbd:`W` - - Toggle (enable/disable) display of warning messages from the - TIFF library when decoding images - * - :kbd:`E` - - Toggle (enable/disable) display of error messages from the - TIFF library when decoding images. - * - :kbd:`z` - - Reset all parameters to their default settings (``FillOrder``, - ``PhotometricInterpretation``, handling of warnings and errors) - * - :kbd:`PageUp` - - Display the previous image in the current file or the last - image in the previous file - * - :kbd:`PageDown` - - Display the next image in the current file or the first image - in the next file - * - :kbd:`Home` - - Display the first image in the current file - * - :kbd:`End` - - Display the last image in the current file (unimplemented) - -Options -------- - -.. option:: -c - - Force image display in a colormap window. - -.. option:: -d - - Specify an image to display by directory number. - By default the first image in the file is displayed. - Directories are numbered starting at zero. - -.. option:: -e - - Enable reporting of error messages from the TIFF library. - By default :program:`tiffgt` silently ignores images that cannot be read. - -.. option:: -f - - Force :program:`tiffgt` to run as a foreground process. - By default :program:`tiffgt` will place itself in the background once it - has opened the requested image file. - -.. option:: -l - - Force the presumed bit ordering to be LSB to MSB. - -.. option:: -m - - Force the presumed bit ordering to be MSB to LSB. - - -.. option:: -o - - Specify an image to display by directory offset. - By default the first image in the file is displayed. - Directories offsets may be specified using C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - - -.. option:: -p - - Override the value of the ``PhotometricInterpretation`` - tag; the parameter may be one of: ``miniswhite`` , - ``minisblack``, ``rgb``, ``palette``, ``mask``, - ``separated``, ``ycbcr``, and ``cielab``. - -.. option:: -r - - Force image display in a full color window. - -.. option:: -s - - Stop on the first read error. - By default all errors in the input data are ignored and - :program:`tiffgt` - does it's best to display as much of an image as possible. - -.. option:: -w - - Enable reporting of warning messages from the TIFF library. - By default :program:`tiffgt` - ignores warning messages generated when reading an image. - -.. option:: -v - - Place information in the title bar describing - what type of window (full color or colormap) is being - used, the name of the input file, and the directory - index of the image (if non-zero). - By default, the window type is not shown in the title bar. - -Bugs ----- - -Images wider and taller than the display are silently truncated to avoid -crashing old versions of the window manager. - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffinfo.rst b/third_party/libtiff/doc/tools/tiffinfo.rst deleted file mode 100644 index 60b4969..0000000 --- a/third_party/libtiff/doc/tools/tiffinfo.rst +++ /dev/null @@ -1,69 +0,0 @@ -tiffinfo -======== - -.. program:: tiffinfo - -Synopsis --------- - -**tiffinfo** [ *options* ] *input.tif* … - -Description ------------ - -:program:`tiffinfo` displays information about files created according -to the Tag Image File Format, Revision 6.0. By default, the contents of -each TIFF directory in each file are displayed, with the value of each -tag shown symbolically (where sensible). - -Options -------- - -.. option:: -c - - Display the colormap and color/gray response curves, if present. - -.. option:: -D - - In addition to displaying the directory tags, - read and decompress all the data in each image (but not display it). - -.. option:: -d - - In addition to displaying the directory tags, - print each byte of decompressed data in hexadecimal. - -.. option:: -j - - Display any JPEG-related tags that are present. - -.. option:: -o - - Set the initial TIFF directory according to the specified file offset. - The file offset may be specified using the usual C-style syntax; - i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal. - -.. option:: -s - - Display the offsets and byte counts for each data strip in a directory. - -.. option:: -z - - Enable strip chopping when reading image data. - -.. option:: -# - - Set the initial TIFF directory to *#*. - -.. option:: -W - - Warn about unknown tags. - -See also --------- - -:doc:`pal2rgb`, -:doc:`tiffcp`, -:doc:`tiffcmp`, -:doc:`tiffmedian`, -:doc:`/functions/libtiff` diff --git a/third_party/libtiff/doc/tools/tiffmedian.rst b/third_party/libtiff/doc/tools/tiffmedian.rst deleted file mode 100644 index db0f687..0000000 --- a/third_party/libtiff/doc/tools/tiffmedian.rst +++ /dev/null @@ -1,73 +0,0 @@ -tiffmedian -========== - -.. program:: tiffmedian - -Synopsis --------- - -**tiffmedian** [ *options* ] *input.tif* *output.tif* - -Description ------------ - -:program:`tiffmedian` applies the median cut algorithm to an RGB -image in *input.tif* to generate a palette image that is written to -*output.tif*. The generated colormap has, by default, 256 entries. -The image data is quantized by mapping each pixel to the closest color -values in the colormap. - -Options -------- - -.. option:: -c - - Specify the compression to use for data written to the output file: - :command:`-c none` for no compression, - :command:`-c packbits` for PackBits compression, - :command:`-c lzw` for Lempel-Ziv & Welch compression, - :command:`-c zip` for Deflate compression. - - By default :program:`tiffmedian` will compress data according to the - value of the ``Compression`` tag found in the source file. - - LZW compression can be specified together with a ``predictor`` value. - A predictor value of 2 causes each scanline of the output image to - undergo horizontal differencing before it is encoded; a value of 1 - forces each scanline to be encoded without differencing. - LZW-specific options are specified by appending a ``:``-separated - list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW compression - with horizontal differencing. - -.. option:: -C - - Specify the number of entries to use in the generated colormap. - By default all 256 entries/colors are used. - -.. option:: -f - - Apply Floyd-Steinberg dithering before selecting a colormap entry. - -.. option:: -r - - Specify the number of rows (scanlines) in each strip of data - written to the output file. By default, :program:`tiffmedian` - attempts to set the rows/strip that no more than 8 kilobytes of - data appear in a strip. - -Notes ------ - -This program is derived from Paul Heckbert's :program:`median` program. - -See also --------- - -:doc:`pal2rgb` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`tiffcmp` (1), -:doc:`/functions/libtiff` (3tiff), - -**"Color Image Quantization for Frame Buffer Display"**, -Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307. diff --git a/third_party/libtiff/doc/tools/tiffset.rst b/third_party/libtiff/doc/tools/tiffset.rst deleted file mode 100644 index d58cecd..0000000 --- a/third_party/libtiff/doc/tools/tiffset.rst +++ /dev/null @@ -1,82 +0,0 @@ -tiffset -======== - -.. program:: tiffset - -Synopsis --------- - -**tiffset** [ *options* ] *filename.tif* - -Description ------------ - -:program:`tiffset` sets the value of a TIFF header to a specified value -or removes an existing setting. - -Options -------- - -.. option:: -d dirnumber - - Change the current directory (starting at 0). - -.. option:: -s tagnumber [ count ] value … - - Set the value of the named tag to the value or values specified. - -.. option:: -sd diroffset - - Change the current directory by offset. - -.. option:: -sf tagnumber filename - - Set the value of the tag to the contents of filename. This option is - supported for ASCII tags only. - -.. option:: -u tagnumber - - Unset the tag. - -Examples --------- - -The following example sets the image description tag (270) of :file:`a.tif` to -the contents of the file :file:`descrip`: - -.. highlight:: shell - -:: - - tiffset -sf 270 descrip a.tif - -The following example sets the artist tag (315) of :file:`a.tif` to the string -``Anonymous``: - -:: - - tiffset -s 315 Anonymous a.tif - - -This example sets the resolution of the file :file:`a.tif` to 300 dpi: - -:: - - tiffset -s 296 2 a.tif - tiffset -s 282 300.0 a.tif - tiffset -s 283 300.0 a.tif - -Set the photometric interpretation of the third page of :file:`a.tif` to -min-is-black (ie. inverts it): - -:: - - tiffset -d 2 -s 262 1 a.tif - -See also --------- - -:doc:`tiffdump` (1), -:doc:`tiffinfo` (1), -:doc:`tiffcp` (1), -:doc:`/functions/libtiff` (3tiff) diff --git a/third_party/libtiff/doc/tools/tiffsplit.rst b/third_party/libtiff/doc/tools/tiffsplit.rst deleted file mode 100644 index 8bddb98..0000000 --- a/third_party/libtiff/doc/tools/tiffsplit.rst +++ /dev/null @@ -1,52 +0,0 @@ -tiffsplit -========= - -.. program:: tiffsplit - -Synopsis --------- - -**tiffsplit** *src.tif* [ *prefix* ] - -Description ------------ - -:program:`tiffsplit` takes a multi-directory (page) TIFF -file and creates one or more single-directory (page) TIFF -files from it. -The output files are given names created by concatenating -a prefix, a lexically ordered suffix in the range [aaa--zzz], -the suffix :file:`.tif` -(e.g. :file:`xaaa.tif`, :file:`xaab.tif`, :file:`…`, :file:`xzzz.tif`). -If a prefix is not specified on the command line, the default prefix of -:file:`x` is used. - -Options -------- - -None. - -Exit status ------------ - -:program:`tiffsplit` exits with one of the following values: - -0: - - Success - -1: - - An error occurred either reading the input or writing results. - -Bugs ----- - -Only a select set of "known tags" are copied when splitting. - -See also --------- - -:doc:`tiffcp` (1), -:doc:`tiffinfo` (1), -:doc:`/functions/libtiff` (3tiff), diff --git a/third_party/libtiff/libtiff-4.pc.in b/third_party/libtiff/libtiff-4.pc.in deleted file mode 100644 index 92305ac..0000000 --- a/third_party/libtiff/libtiff-4.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libtiff -Description: Tag Image File Format (TIFF) library. -Version: @LIBTIFF_MAJOR_VERSION@.@LIBTIFF_MINOR_VERSION@.@LIBTIFF_MICRO_VERSION@ -Libs: -L${libdir} -ltiff -Libs.private: @tiff_libs_private@ -Cflags: -I${includedir} -Requires.private: @tiff_requires_private@ diff --git a/third_party/libtiff/libtiff/CMakeLists.txt b/third_party/libtiff/libtiff/CMakeLists.txt deleted file mode 100644 index 2d76d1e..0000000 --- a/third_party/libtiff/libtiff/CMakeLists.txt +++ /dev/null @@ -1,278 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Generate headers -# and update configuration settings and package / version information. -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h - @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h - @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffvers.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/tiffvers.h - @ONLY) - -set(tiff_public_HEADERS - tiff.h - tiffio.h - ${CMAKE_CURRENT_BINARY_DIR}/tiffvers.h - ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h) - -set(tiff_private_HEADERS - t4.h - tif_dir.h - tif_predict.h - tiffiop.h - uvcode.h - ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h) - - -add_library(tiff ${TIFF_BUILD_LIB_VALUE} libtiff.def) -add_library(TIFF::tiff ALIAS tiff) - -target_sources(tiff PRIVATE - ${tiff_public_HEADERS} - ${tiff_private_HEADERS} - tif_aux.c - tif_close.c - tif_codec.c - tif_color.c - tif_compress.c - tif_dir.c - tif_dirinfo.c - tif_dirread.c - tif_dirwrite.c - tif_dumpmode.c - tif_error.c - tif_extension.c - tif_fax3.c - tif_fax3sm.c - tif_flush.c - tif_getimage.c - tif_hash_set.c - tif_jbig.c - tif_jpeg.c - tif_jpeg_12.c - tif_lerc.c - tif_luv.c - tif_lzma.c - tif_lzw.c - tif_next.c - tif_ojpeg.c - tif_open.c - tif_packbits.c - tif_pixarlog.c - tif_predict.c - tif_print.c - tif_read.c - tif_strip.c - tif_swab.c - tif_thunder.c - tif_tile.c - tif_version.c - tif_warning.c - tif_webp.c - tif_write.c - tif_zip.c - tif_zstd.c) - -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) - set_property(SOURCE tif_jpeg.c tif_jpeg12.c PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) -endif () - -# For all files (but tif_open.c, tif_unix.c and tif_win32.c), forbid the use -# of _TIFFmalloc/_TIFFfree and require the use of their "Ext" versions -target_compile_definitions(tiff PRIVATE TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS) -set_property(SOURCE tif_open.c APPEND PROPERTY COMPILE_DEFINITIONS ALLOW_TIFF_NON_EXT_ALLOC_FUNCTIONS) - -if(USE_WIN32_FILEIO) - target_sources(tiff PRIVATE tif_win32.c) - set_property(SOURCE tif_win32.c APPEND PROPERTY COMPILE_DEFINITIONS ALLOW_TIFF_NON_EXT_ALLOC_FUNCTIONS) -else() - target_sources(tiff PRIVATE tif_unix.c) - set_property(SOURCE tif_unix.c APPEND PROPERTY COMPILE_DEFINITIONS ALLOW_TIFF_NON_EXT_ALLOC_FUNCTIONS) -endif() - -target_include_directories(tiff - PUBLIC - $ - $ - $ - PRIVATE - ${TIFF_INCLUDES} -) - -# Windows specific resource preparation -if (WIN32) - message(STATUS "Include resource version information for LibTIFF") - target_sources(tiff PRIVATE tif_win32_versioninfo.rc) - source_group("Resource Files" FILES tif_win32_versioninfo.rc) -endif () - - -set(tiff_libs_private_list "") # cmake list -set(tiff_requires_private "") # cmake string - -if(ZIP_SUPPORT) - target_link_libraries(tiff PRIVATE ZLIB::ZLIB) - string(APPEND tiff_requires_private " zlib") -endif() -if(ZIP_SUPPORT AND LIBDEFLATE_SUPPORT) - target_link_libraries(tiff PRIVATE Deflate::Deflate) - if(Deflate_VERSION_STRING VERSION_GREATER_EQUAL "1.9") - string(APPEND tiff_requires_private " libdeflate") - else() - list(APPEND tiff_libs_private_list "${Deflate_LIBRARY}") - endif() -endif() -if(JPEG_SUPPORT) - target_link_libraries(tiff PRIVATE JPEG::JPEG) - string(APPEND tiff_requires_private " libjpeg") - if(JPEG_DUAL_MODE_8_12 AND NOT HAVE_JPEGTURBO_DUAL_MODE_8_12) - target_include_directories(tiff PRIVATE ${JPEG12_INCLUDE_DIR}) - target_link_libraries(tiff PRIVATE ${JPEG12_LIBRARIES}) - endif() -endif() -if(JBIG_SUPPORT) - target_link_libraries(tiff PRIVATE JBIG::JBIG) - list(APPEND tiff_libs_private_list "${JBIG_LIBRARY}") -endif() -if(LERC_SUPPORT) - target_link_libraries(tiff PRIVATE LERC::LERC) - if(LERC_VERSION_STRING VERSION_GREATER_EQUAL "4.0") - string(APPEND tiff_requires_private " Lerc") - else() - list(APPEND tiff_libs_private_list "${LERC_LIBRARY}") - endif() -endif() -if(LZMA_SUPPORT) - target_link_libraries(tiff PRIVATE liblzma::liblzma) - string(APPEND tiff_requires_private " liblzma") -endif() -if(ZSTD_SUPPORT) - target_link_libraries(tiff PRIVATE ZSTD::ZSTD) - string(APPEND tiff_requires_private " libzstd") -endif() -if(WEBP_SUPPORT) - target_link_libraries(tiff PRIVATE WebP::webp) - string(APPEND tiff_requires_private " libwebp") -endif() -if(CMath_LIBRARY) - target_link_libraries(tiff PRIVATE CMath::CMath) - list(APPEND tiff_libs_private_list "${CMath_LIBRARY}") -endif() - -set(tiff_libs_private_list "${tiff_libs_private_list}" PARENT_SCOPE) -set(tiff_requires_private "${tiff_requires_private}" PARENT_SCOPE) - -set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION}) -if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because - # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll - # seems to be the default. - set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION}) -endif() -if(HAVE_LD_VERSION_SCRIPT) - if (CMAKE_VERSION GREATER_EQUAL 3.29 AND CMAKE_C_COMPILER_LINKER_ID STREQUAL "LLD" AND CMAKE_C_COMPILER_LINKER_VERSION GREATER_EQUAL 17) - set_target_properties(tiff PROPERTIES LINK_FLAGS - "-Wl,--undefined-version -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map") - else() - set_target_properties(tiff PROPERTIES LINK_FLAGS - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map") - endif() -endif() - -if(tiff-install) - export(TARGETS tiff NAMESPACE TIFF:: FILE "${CMAKE_CURRENT_BINARY_DIR}/libtiffTargets.cmake") - install(TARGETS tiff EXPORT TiffTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - install(FILES ${tiff_public_HEADERS} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - - set(TIFF_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/tiff) - install(EXPORT TiffTargets - FILE TiffTargets.cmake - NAMESPACE TIFF:: - DESTINATION ${TIFF_CONFIGDIR} - ) - - include(CMakePackageConfigHelpers) - write_basic_package_version_file( - TiffConfigVersion.cmake - VERSION ${LIBTIFF_VERSION} - COMPATIBILITY SameMajorVersion) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TiffConfigVersion.cmake DESTINATION ${TIFF_CONFIGDIR}) - - configure_file(${PROJECT_SOURCE_DIR}/cmake/TiffConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/TiffConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TiffConfig.cmake DESTINATION ${TIFF_CONFIGDIR}) -endif() - -if(CXX_SUPPORT) - set(tiffxx_HEADERS - tiffio.hxx) - - # No .def file for this library. - if (WIN32 AND NOT MINGW) - add_library(tiffxx STATIC ../placeholder.h) - else() - add_library(tiffxx ${TIFF_BUILD_LIB_VALUE} ../placeholder.h) - endif() - - add_library(TIFF::CXX ALIAS tiffxx) - - target_sources(tiffxx PRIVATE - ${tiffxx_HEADERS} - tif_stream.cxx) - target_link_libraries(tiffxx tiff) - set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) - if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because - # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll - # seems to be the default. - set_target_properties(tiffxx PROPERTIES VERSION ${SO_VERSION}) - endif() - if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(tiffxx PROPERTIES LINK_FLAGS - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiffxx.map") - endif() - - if(tiff-install) - install(TARGETS tiffxx EXPORT TiffTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - install(FILES ${tiffxx_HEADERS} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - endif() - -endif() - diff --git a/third_party/libtiff/libtiff/Makefile.am b/third_party/libtiff/libtiff/Makefile.am deleted file mode 100644 index c2407c0..0000000 --- a/third_party/libtiff/libtiff/Makefile.am +++ /dev/null @@ -1,140 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -LIBPORT = $(top_builddir)/port/libport.la -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -libtiffincludedir = $(includedir) - -EXTRA_DIST = \ - CMakeLists.txt \ - libtiff.def \ - libtiff.map \ - libtiffxx.map \ - tiffvers.h.cmake.in \ - tif_config.h.cmake.in \ - tiffconf.h.cmake.in \ - tif_win32_versioninfo.rc - -libtiffinclude_HEADERS = \ - tiff.h \ - tiffio.h \ - tiffvers.h - -if HAVE_CXX -libtiffinclude_HEADERS += tiffio.hxx -endif - -noinst_HEADERS = \ - t4.h \ - tif_dir.h \ - tif_hash_set.h \ - tif_predict.h \ - tiffiop.h \ - uvcode.h - -nodist_libtiffinclude_HEADERS = \ - tiffconf.h - -libtiff_la_SOURCES = \ - tif_aux.c \ - tif_close.c \ - tif_codec.c \ - tif_color.c \ - tif_compress.c \ - tif_dir.c \ - tif_dirinfo.c \ - tif_dirread.c \ - tif_dirwrite.c \ - tif_dumpmode.c \ - tif_error.c \ - tif_extension.c \ - tif_fax3.c \ - tif_fax3sm.c \ - tif_flush.c \ - tif_getimage.c \ - tif_hash_set.c \ - tif_jbig.c \ - tif_jpeg.c \ - tif_jpeg_12.c \ - tif_lerc.c \ - tif_luv.c \ - tif_lzma.c \ - tif_lzw.c \ - tif_next.c \ - tif_ojpeg.c \ - tif_open.c \ - tif_packbits.c \ - tif_pixarlog.c \ - tif_predict.c \ - tif_print.c \ - tif_read.c \ - tif_strip.c \ - tif_swab.c \ - tif_thunder.c \ - tif_tile.c \ - tif_version.c \ - tif_warning.c \ - tif_webp.c \ - tif_write.c \ - tif_zip.c \ - tif_zstd.c - -libtiffxx_la_SOURCES = \ - tif_stream.cxx - -if WIN32_IO -EXTRA_DIST += tif_unix.c -libtiff_la_SOURCES += tif_win32.c -else -EXTRA_DIST += tif_win32.c -libtiff_la_SOURCES += tif_unix.c -endif - -lib_LTLIBRARIES = libtiff.la -if HAVE_CXX -lib_LTLIBRARIES += libtiffxx.la -endif - -libtiff_la_LDFLAGS = \ - -no-undefined \ - -version-info $(LIBTIFF_VERSION_INFO) -if HAVE_RPATH -libtiff_la_LDFLAGS += $(LIBDIR) -endif -if HAVE_LD_VERSION_SCRIPT -libtiff_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtiff.map -endif - -libtiffxx_la_LDFLAGS = \ - -no-undefined \ - -version-info $(LIBTIFF_VERSION_INFO) -if HAVE_RPATH -libtiffxx_la_LDFLAGS += $(LIBDIR) -endif -if HAVE_LD_VERSION_SCRIPT -libtiffxx_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtiffxx.map -endif -libtiffxx_la_LIBADD = $(LIBTIFF) -libtiffxx_la_DEPENDENCIES = libtiff.la diff --git a/third_party/libtiff/libtiff/Makefile.in b/third_party/libtiff/libtiff/Makefile.in deleted file mode 100644 index a120b18..0000000 --- a/third_party/libtiff/libtiff/Makefile.in +++ /dev/null @@ -1,1069 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_CXX_TRUE@am__append_1 = tiffio.hxx -@WIN32_IO_TRUE@am__append_2 = tif_unix.c -@WIN32_IO_TRUE@am__append_3 = tif_win32.c -@WIN32_IO_FALSE@am__append_4 = tif_win32.c -@WIN32_IO_FALSE@am__append_5 = tif_unix.c -@HAVE_CXX_TRUE@am__append_6 = libtiffxx.la -@HAVE_RPATH_TRUE@am__append_7 = $(LIBDIR) -@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_8 = -Wl,--version-script=$(srcdir)/libtiff.map -@HAVE_RPATH_TRUE@am__append_9 = $(LIBDIR) -@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_10 = -Wl,--version-script=$(srcdir)/libtiffxx.map -subdir = libtiff -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__libtiffinclude_HEADERS_DIST) \ - $(noinst_HEADERS) $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h tif_config.h \ - tiffconf.h $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = tiffvers.h -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libtiffincludedir)" \ - "$(DESTDIR)$(libtiffincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libtiff_la_LIBADD = -am__libtiff_la_SOURCES_DIST = tif_aux.c tif_close.c tif_codec.c \ - tif_color.c tif_compress.c tif_dir.c tif_dirinfo.c \ - tif_dirread.c tif_dirwrite.c tif_dumpmode.c tif_error.c \ - tif_extension.c tif_fax3.c tif_fax3sm.c tif_flush.c \ - tif_getimage.c tif_hash_set.c tif_jbig.c tif_jpeg.c \ - tif_jpeg_12.c tif_lerc.c tif_luv.c tif_lzma.c tif_lzw.c \ - tif_next.c tif_ojpeg.c tif_open.c tif_packbits.c \ - tif_pixarlog.c tif_predict.c tif_print.c tif_read.c \ - tif_strip.c tif_swab.c tif_thunder.c tif_tile.c tif_version.c \ - tif_warning.c tif_webp.c tif_write.c tif_zip.c tif_zstd.c \ - tif_win32.c tif_unix.c -@WIN32_IO_TRUE@am__objects_1 = tif_win32.lo -@WIN32_IO_FALSE@am__objects_2 = tif_unix.lo -am_libtiff_la_OBJECTS = tif_aux.lo tif_close.lo tif_codec.lo \ - tif_color.lo tif_compress.lo tif_dir.lo tif_dirinfo.lo \ - tif_dirread.lo tif_dirwrite.lo tif_dumpmode.lo tif_error.lo \ - tif_extension.lo tif_fax3.lo tif_fax3sm.lo tif_flush.lo \ - tif_getimage.lo tif_hash_set.lo tif_jbig.lo tif_jpeg.lo \ - tif_jpeg_12.lo tif_lerc.lo tif_luv.lo tif_lzma.lo tif_lzw.lo \ - tif_next.lo tif_ojpeg.lo tif_open.lo tif_packbits.lo \ - tif_pixarlog.lo tif_predict.lo tif_print.lo tif_read.lo \ - tif_strip.lo tif_swab.lo tif_thunder.lo tif_tile.lo \ - tif_version.lo tif_warning.lo tif_webp.lo tif_write.lo \ - tif_zip.lo tif_zstd.lo $(am__objects_1) $(am__objects_2) -libtiff_la_OBJECTS = $(am_libtiff_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libtiff_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtiff_la_LDFLAGS) $(LDFLAGS) -o $@ -am_libtiffxx_la_OBJECTS = tif_stream.lo -libtiffxx_la_OBJECTS = $(am_libtiffxx_la_OBJECTS) -libtiffxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libtiffxx_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_CXX_TRUE@am_libtiffxx_la_rpath = -rpath $(libdir) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/tif_aux.Plo \ - ./$(DEPDIR)/tif_close.Plo ./$(DEPDIR)/tif_codec.Plo \ - ./$(DEPDIR)/tif_color.Plo ./$(DEPDIR)/tif_compress.Plo \ - ./$(DEPDIR)/tif_dir.Plo ./$(DEPDIR)/tif_dirinfo.Plo \ - ./$(DEPDIR)/tif_dirread.Plo ./$(DEPDIR)/tif_dirwrite.Plo \ - ./$(DEPDIR)/tif_dumpmode.Plo ./$(DEPDIR)/tif_error.Plo \ - ./$(DEPDIR)/tif_extension.Plo ./$(DEPDIR)/tif_fax3.Plo \ - ./$(DEPDIR)/tif_fax3sm.Plo ./$(DEPDIR)/tif_flush.Plo \ - ./$(DEPDIR)/tif_getimage.Plo ./$(DEPDIR)/tif_hash_set.Plo \ - ./$(DEPDIR)/tif_jbig.Plo ./$(DEPDIR)/tif_jpeg.Plo \ - ./$(DEPDIR)/tif_jpeg_12.Plo ./$(DEPDIR)/tif_lerc.Plo \ - ./$(DEPDIR)/tif_luv.Plo ./$(DEPDIR)/tif_lzma.Plo \ - ./$(DEPDIR)/tif_lzw.Plo ./$(DEPDIR)/tif_next.Plo \ - ./$(DEPDIR)/tif_ojpeg.Plo ./$(DEPDIR)/tif_open.Plo \ - ./$(DEPDIR)/tif_packbits.Plo ./$(DEPDIR)/tif_pixarlog.Plo \ - ./$(DEPDIR)/tif_predict.Plo ./$(DEPDIR)/tif_print.Plo \ - ./$(DEPDIR)/tif_read.Plo ./$(DEPDIR)/tif_stream.Plo \ - ./$(DEPDIR)/tif_strip.Plo ./$(DEPDIR)/tif_swab.Plo \ - ./$(DEPDIR)/tif_thunder.Plo ./$(DEPDIR)/tif_tile.Plo \ - ./$(DEPDIR)/tif_unix.Plo ./$(DEPDIR)/tif_version.Plo \ - ./$(DEPDIR)/tif_warning.Plo ./$(DEPDIR)/tif_webp.Plo \ - ./$(DEPDIR)/tif_win32.Plo ./$(DEPDIR)/tif_write.Plo \ - ./$(DEPDIR)/tif_zip.Plo ./$(DEPDIR)/tif_zstd.Plo -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_@AM_V@) -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; -am__v_CXX_1 = -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -am__v_CXXLD_1 = -SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) -DIST_SOURCES = $(am__libtiff_la_SOURCES_DIST) $(libtiffxx_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__libtiffinclude_HEADERS_DIST = tiff.h tiffio.h tiffvers.h \ - tiffio.hxx -HEADERS = $(libtiffinclude_HEADERS) $(nodist_libtiffinclude_HEADERS) \ - $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)tif_config.h.in tiffconf.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/tif_config.h.in \ - $(srcdir)/tiffconf.h.in $(srcdir)/tiffvers.h.in \ - $(top_srcdir)/config/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -LIBPORT = $(top_builddir)/port/libport.la -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -libtiffincludedir = $(includedir) -EXTRA_DIST = CMakeLists.txt libtiff.def libtiff.map libtiffxx.map \ - tiffvers.h.cmake.in tif_config.h.cmake.in tiffconf.h.cmake.in \ - tif_win32_versioninfo.rc $(am__append_2) $(am__append_4) -libtiffinclude_HEADERS = tiff.h tiffio.h tiffvers.h $(am__append_1) -noinst_HEADERS = \ - t4.h \ - tif_dir.h \ - tif_hash_set.h \ - tif_predict.h \ - tiffiop.h \ - uvcode.h - -nodist_libtiffinclude_HEADERS = \ - tiffconf.h - -libtiff_la_SOURCES = tif_aux.c tif_close.c tif_codec.c tif_color.c \ - tif_compress.c tif_dir.c tif_dirinfo.c tif_dirread.c \ - tif_dirwrite.c tif_dumpmode.c tif_error.c tif_extension.c \ - tif_fax3.c tif_fax3sm.c tif_flush.c tif_getimage.c \ - tif_hash_set.c tif_jbig.c tif_jpeg.c tif_jpeg_12.c tif_lerc.c \ - tif_luv.c tif_lzma.c tif_lzw.c tif_next.c tif_ojpeg.c \ - tif_open.c tif_packbits.c tif_pixarlog.c tif_predict.c \ - tif_print.c tif_read.c tif_strip.c tif_swab.c tif_thunder.c \ - tif_tile.c tif_version.c tif_warning.c tif_webp.c tif_write.c \ - tif_zip.c tif_zstd.c $(am__append_3) $(am__append_5) -libtiffxx_la_SOURCES = \ - tif_stream.cxx - -lib_LTLIBRARIES = libtiff.la $(am__append_6) -libtiff_la_LDFLAGS = -no-undefined -version-info \ - $(LIBTIFF_VERSION_INFO) $(am__append_7) $(am__append_8) -libtiffxx_la_LDFLAGS = -no-undefined -version-info \ - $(LIBTIFF_VERSION_INFO) $(am__append_9) $(am__append_10) -libtiffxx_la_LIBADD = $(LIBTIFF) -libtiffxx_la_DEPENDENCIES = libtiff.la -all: tif_config.h tiffconf.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .cxx .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libtiff/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libtiff/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -tif_config.h: stamp-h2 - @test -f $@ || rm -f stamp-h2 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 - -stamp-h2: $(srcdir)/tif_config.h.in $(top_builddir)/config.status - @rm -f stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status libtiff/tif_config.h - -tiffconf.h: stamp-h3 - @test -f $@ || rm -f stamp-h3 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h3 - -stamp-h3: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status - @rm -f stamp-h3 - cd $(top_builddir) && $(SHELL) ./config.status libtiff/tiffconf.h - -distclean-hdr: - -rm -f tif_config.h stamp-h2 tiffconf.h stamp-h3 -tiffvers.h: $(top_builddir)/config.status $(srcdir)/tiffvers.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES) $(EXTRA_libtiff_la_DEPENDENCIES) - $(AM_V_CCLD)$(libtiff_la_LINK) -rpath $(libdir) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS) - -libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES) $(EXTRA_libtiffxx_la_DEPENDENCIES) - $(AM_V_CXXLD)$(libtiffxx_la_LINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_aux.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_close.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_codec.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_color.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_compress.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dir.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirinfo.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirread.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirwrite.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dumpmode.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_error.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_extension.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3sm.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_flush.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_hash_set.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jbig.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg_12.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lerc.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_luv.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzma.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzw.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_next.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ojpeg.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_open.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_packbits.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_pixarlog.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_predict.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_print.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_read.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_stream.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_strip.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_swab.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_thunder.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_tile.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_unix.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_version.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_warning.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_webp.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_win32.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_write.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zip.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zstd.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -.cxx.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< - -.cxx.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cxx.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-libtiffincludeHEADERS: $(libtiffinclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtiffincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtiffincludedir)" || exit $$?; \ - done - -uninstall-libtiffincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir) -install-nodist_libtiffincludeHEADERS: $(nodist_libtiffinclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nodist_libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtiffincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtiffincludedir)" || exit $$?; \ - done - -uninstall-nodist_libtiffincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) tif_config.h tiffconf.h -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libtiffincludedir)" "$(DESTDIR)$(libtiffincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/tif_aux.Plo - -rm -f ./$(DEPDIR)/tif_close.Plo - -rm -f ./$(DEPDIR)/tif_codec.Plo - -rm -f ./$(DEPDIR)/tif_color.Plo - -rm -f ./$(DEPDIR)/tif_compress.Plo - -rm -f ./$(DEPDIR)/tif_dir.Plo - -rm -f ./$(DEPDIR)/tif_dirinfo.Plo - -rm -f ./$(DEPDIR)/tif_dirread.Plo - -rm -f ./$(DEPDIR)/tif_dirwrite.Plo - -rm -f ./$(DEPDIR)/tif_dumpmode.Plo - -rm -f ./$(DEPDIR)/tif_error.Plo - -rm -f ./$(DEPDIR)/tif_extension.Plo - -rm -f ./$(DEPDIR)/tif_fax3.Plo - -rm -f ./$(DEPDIR)/tif_fax3sm.Plo - -rm -f ./$(DEPDIR)/tif_flush.Plo - -rm -f ./$(DEPDIR)/tif_getimage.Plo - -rm -f ./$(DEPDIR)/tif_hash_set.Plo - -rm -f ./$(DEPDIR)/tif_jbig.Plo - -rm -f ./$(DEPDIR)/tif_jpeg.Plo - -rm -f ./$(DEPDIR)/tif_jpeg_12.Plo - -rm -f ./$(DEPDIR)/tif_lerc.Plo - -rm -f ./$(DEPDIR)/tif_luv.Plo - -rm -f ./$(DEPDIR)/tif_lzma.Plo - -rm -f ./$(DEPDIR)/tif_lzw.Plo - -rm -f ./$(DEPDIR)/tif_next.Plo - -rm -f ./$(DEPDIR)/tif_ojpeg.Plo - -rm -f ./$(DEPDIR)/tif_open.Plo - -rm -f ./$(DEPDIR)/tif_packbits.Plo - -rm -f ./$(DEPDIR)/tif_pixarlog.Plo - -rm -f ./$(DEPDIR)/tif_predict.Plo - -rm -f ./$(DEPDIR)/tif_print.Plo - -rm -f ./$(DEPDIR)/tif_read.Plo - -rm -f ./$(DEPDIR)/tif_stream.Plo - -rm -f ./$(DEPDIR)/tif_strip.Plo - -rm -f ./$(DEPDIR)/tif_swab.Plo - -rm -f ./$(DEPDIR)/tif_thunder.Plo - -rm -f ./$(DEPDIR)/tif_tile.Plo - -rm -f ./$(DEPDIR)/tif_unix.Plo - -rm -f ./$(DEPDIR)/tif_version.Plo - -rm -f ./$(DEPDIR)/tif_warning.Plo - -rm -f ./$(DEPDIR)/tif_webp.Plo - -rm -f ./$(DEPDIR)/tif_win32.Plo - -rm -f ./$(DEPDIR)/tif_write.Plo - -rm -f ./$(DEPDIR)/tif_zip.Plo - -rm -f ./$(DEPDIR)/tif_zstd.Plo - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-libtiffincludeHEADERS \ - install-nodist_libtiffincludeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/tif_aux.Plo - -rm -f ./$(DEPDIR)/tif_close.Plo - -rm -f ./$(DEPDIR)/tif_codec.Plo - -rm -f ./$(DEPDIR)/tif_color.Plo - -rm -f ./$(DEPDIR)/tif_compress.Plo - -rm -f ./$(DEPDIR)/tif_dir.Plo - -rm -f ./$(DEPDIR)/tif_dirinfo.Plo - -rm -f ./$(DEPDIR)/tif_dirread.Plo - -rm -f ./$(DEPDIR)/tif_dirwrite.Plo - -rm -f ./$(DEPDIR)/tif_dumpmode.Plo - -rm -f ./$(DEPDIR)/tif_error.Plo - -rm -f ./$(DEPDIR)/tif_extension.Plo - -rm -f ./$(DEPDIR)/tif_fax3.Plo - -rm -f ./$(DEPDIR)/tif_fax3sm.Plo - -rm -f ./$(DEPDIR)/tif_flush.Plo - -rm -f ./$(DEPDIR)/tif_getimage.Plo - -rm -f ./$(DEPDIR)/tif_hash_set.Plo - -rm -f ./$(DEPDIR)/tif_jbig.Plo - -rm -f ./$(DEPDIR)/tif_jpeg.Plo - -rm -f ./$(DEPDIR)/tif_jpeg_12.Plo - -rm -f ./$(DEPDIR)/tif_lerc.Plo - -rm -f ./$(DEPDIR)/tif_luv.Plo - -rm -f ./$(DEPDIR)/tif_lzma.Plo - -rm -f ./$(DEPDIR)/tif_lzw.Plo - -rm -f ./$(DEPDIR)/tif_next.Plo - -rm -f ./$(DEPDIR)/tif_ojpeg.Plo - -rm -f ./$(DEPDIR)/tif_open.Plo - -rm -f ./$(DEPDIR)/tif_packbits.Plo - -rm -f ./$(DEPDIR)/tif_pixarlog.Plo - -rm -f ./$(DEPDIR)/tif_predict.Plo - -rm -f ./$(DEPDIR)/tif_print.Plo - -rm -f ./$(DEPDIR)/tif_read.Plo - -rm -f ./$(DEPDIR)/tif_stream.Plo - -rm -f ./$(DEPDIR)/tif_strip.Plo - -rm -f ./$(DEPDIR)/tif_swab.Plo - -rm -f ./$(DEPDIR)/tif_thunder.Plo - -rm -f ./$(DEPDIR)/tif_tile.Plo - -rm -f ./$(DEPDIR)/tif_unix.Plo - -rm -f ./$(DEPDIR)/tif_version.Plo - -rm -f ./$(DEPDIR)/tif_warning.Plo - -rm -f ./$(DEPDIR)/tif_webp.Plo - -rm -f ./$(DEPDIR)/tif_win32.Plo - -rm -f ./$(DEPDIR)/tif_write.Plo - -rm -f ./$(DEPDIR)/tif_zip.Plo - -rm -f ./$(DEPDIR)/tif_zstd.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES uninstall-libtiffincludeHEADERS \ - uninstall-nodist_libtiffincludeHEADERS - -.MAKE: all install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-libtiffincludeHEADERS install-man \ - install-nodist_libtiffincludeHEADERS install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \ - uninstall-libtiffincludeHEADERS \ - uninstall-nodist_libtiffincludeHEADERS - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/libtiff/libtiff.def b/third_party/libtiff/libtiff/libtiff.def deleted file mode 100644 index 20f1ff5..0000000 --- a/third_party/libtiff/libtiff/libtiff.def +++ /dev/null @@ -1,197 +0,0 @@ -EXPORTS TIFFAccessTagMethods - TIFFCIELabToRGBInit - TIFFCIELabToXYZ - TIFFCheckTile - TIFFCheckpointDirectory - TIFFCleanup - TIFFClientOpen - TIFFClientOpenExt - TIFFClientdata - TIFFClose - TIFFComputeStrip - TIFFComputeTile - TIFFCreateCustomDirectory - TIFFCreateDirectory - TIFFCreateEXIFDirectory - TIFFCreateGPSDirectory - TIFFCurrentDirOffset - TIFFCurrentDirectory - TIFFCurrentRow - TIFFCurrentStrip - TIFFCurrentTile - TIFFDataWidth - TIFFDefaultStripSize - TIFFDefaultTileSize - TIFFDeferStrileArrayWriting - TIFFError - TIFFErrorExt - TIFFErrorExtR - TIFFFdOpen - TIFFFdOpenExt - TIFFFieldDataType - TIFFFieldName - TIFFFieldPassCount - TIFFFieldReadCount - TIFFFieldIsAnonymous - TIFFFieldTag - TIFFFieldWithName - TIFFFieldWithTag - TIFFFieldWriteCount - TIFFFieldSetGetSize - TIFFFieldSetGetCountSize - TIFFFileName - TIFFFileno - TIFFFindCODEC - TIFFFindField - TIFFFlush - TIFFFlushData - TIFFForceStrileArrayWriting - TIFFFreeDirectory - TIFFGetBitRevTable - TIFFGetClientInfo - TIFFGetCloseProc - TIFFGetConfiguredCODECs - TIFFGetField - TIFFGetFieldDefaulted - TIFFGetMapFileProc - TIFFGetMode - TIFFGetReadProc - TIFFGetSeekProc - TIFFGetSizeProc - TIFFGetStrileByteCount - TIFFGetStrileByteCountWithErr - TIFFGetStrileOffset - TIFFGetStrileOffsetWithErr - TIFFGetTagListCount - TIFFGetTagListEntry - TIFFGetUnmapFileProc - TIFFGetVersion - TIFFGetWriteProc - TIFFIsBigEndian - TIFFIsBigTIFF - TIFFIsByteSwapped - TIFFIsCODECConfigured - TIFFIsMSB2LSB - TIFFIsTiled - TIFFIsUpSampled - TIFFLastDirectory - TIFFMergeFieldInfo - TIFFNumberOfDirectories - TIFFNumberOfStrips - TIFFNumberOfTiles - TIFFOpen - TIFFOpenExt - TIFFOpenW - TIFFOpenWExt - TIFFOpenOptionsAlloc - TIFFOpenOptionsFree - TIFFOpenOptionsSetMaxCumulatedMemAlloc - TIFFOpenOptionsSetMaxSingleMemAlloc - TIFFOpenOptionsSetErrorHandlerExtR - TIFFOpenOptionsSetWarnAboutUnknownTags - TIFFOpenOptionsSetWarningHandlerExtR - TIFFPrintDirectory - TIFFRGBAImageBegin - TIFFRGBAImageEnd - TIFFRGBAImageGet - TIFFRGBAImageOK - TIFFRasterScanlineSize - TIFFRasterScanlineSize64 - TIFFRawStripSize - TIFFRawStripSize64 - TIFFReadBufferSetup - TIFFReadCustomDirectory - TIFFReadDirectory - TIFFReadEXIFDirectory - TIFFReadGPSDirectory - TIFFReadEncodedStrip - TIFFReadEncodedTile - TIFFReadFromUserBuffer - TIFFReadRGBAImage - TIFFReadRGBAImageOriented - TIFFReadRGBAStrip - TIFFReadRGBAStripExt - TIFFReadRGBATile - TIFFReadRGBATileExt - TIFFReadRawStrip - TIFFReadRawTile - TIFFReadScanline - TIFFReadTile - TIFFRegisterCODEC - TIFFReverseBits - TIFFRewriteDirectory - TIFFScanlineSize - TIFFScanlineSize64 - TIFFSetClientInfo - TIFFSetClientdata - TIFFSetCompressionScheme - TIFFSetDirectory - TIFFSetErrorHandler - TIFFSetErrorHandlerExt - TIFFSetField - TIFFSetFileName - TIFFSetFileno - TIFFSetMode - TIFFSetSubDirectory - TIFFSetTagExtender - TIFFSetWarningHandler - TIFFSetWarningHandlerExt - TIFFSetWriteOffset - TIFFSetupStrips - TIFFStripSize - TIFFStripSize64 - TIFFSwabArrayOfDouble - TIFFSwabArrayOfFloat - TIFFSwabArrayOfLong - TIFFSwabArrayOfLong8 - TIFFSwabArrayOfShort - TIFFSwabArrayOfTriples - TIFFSwabDouble - TIFFSwabFloat - TIFFSwabLong - TIFFSwabLong8 - TIFFSwabShort - TIFFTileRowSize - TIFFTileRowSize64 - TIFFTileSize - TIFFTileSize64 - TIFFUnRegisterCODEC - TIFFUnlinkDirectory - TIFFUnsetField - TIFFVGetField - TIFFVGetFieldDefaulted - TIFFVSetField - TIFFVStripSize - TIFFVStripSize64 - TIFFVTileSize - TIFFVTileSize64 - TIFFWarning - TIFFWarningExt - TIFFWarningExtR - TIFFWriteBufferSetup - TIFFWriteCheck - TIFFWriteCustomDirectory - TIFFWriteDirectory - TIFFWriteEncodedStrip - TIFFWriteEncodedTile - TIFFWriteRawStrip - TIFFWriteRawTile - TIFFWriteScanline - TIFFWriteTile - TIFFXYZToRGB - TIFFYCbCrToRGBInit - TIFFYCbCrtoRGB - _TIFFCheckMalloc - _TIFFCheckRealloc - _TIFFClampDoubleToUInt32 - _TIFFRewriteField - _TIFFfree - _TIFFmalloc - _TIFFmemcmp - _TIFFmemcpy - _TIFFmemset - _TIFFrealloc - _TIFFMultiply32 - _TIFFMultiply64 - _TIFFGetExifFields - _TIFFGetGpsFields diff --git a/third_party/libtiff/libtiff/libtiff.map b/third_party/libtiff/libtiff/libtiff.map deleted file mode 100644 index 4564192..0000000 --- a/third_party/libtiff/libtiff/libtiff.map +++ /dev/null @@ -1,224 +0,0 @@ -LIBTIFF_4.0 { - global: - TIFFAccessTagMethods; - TIFFCIELabToRGBInit; - TIFFCIELabToXYZ; - TIFFCheckTile; - TIFFCheckpointDirectory; - TIFFCleanup; - TIFFClientOpen; - TIFFClientdata; - TIFFClose; - TIFFComputeStrip; - TIFFComputeTile; - TIFFCreateDirectory; - TIFFCurrentDirOffset; - TIFFCurrentDirectory; - TIFFCurrentRow; - TIFFCurrentStrip; - TIFFCurrentTile; - TIFFDataWidth; - TIFFDefaultStripSize; - TIFFDefaultTileSize; - TIFFError; - TIFFErrorExt; - TIFFFdOpen; - TIFFFieldWithName; - TIFFFieldWithTag; - TIFFFileName; - TIFFFileno; - TIFFFindCODEC; - TIFFFindField; - TIFFFlush; - TIFFFlushData; - TIFFFreeDirectory; - TIFFGetBitRevTable; - TIFFGetClientInfo; - TIFFGetCloseProc; - TIFFGetConfiguredCODECs; - TIFFGetField; - TIFFGetFieldDefaulted; - TIFFGetMapFileProc; - TIFFGetMode; - TIFFGetReadProc; - TIFFGetSeekProc; - TIFFGetSizeProc; - TIFFGetTagListCount; - TIFFGetTagListEntry; - TIFFGetUnmapFileProc; - TIFFGetVersion; - TIFFGetWriteProc; - TIFFIsBigEndian; - TIFFIsByteSwapped; - TIFFIsCODECConfigured; - TIFFIsMSB2LSB; - TIFFIsTiled; - TIFFIsUpSampled; - TIFFLastDirectory; - TIFFMergeFieldInfo; - TIFFNumberOfDirectories; - TIFFNumberOfStrips; - TIFFNumberOfTiles; - TIFFOpen; - TIFFOpenW; - TIFFPrintDirectory; - TIFFRGBAImageBegin; - TIFFRGBAImageEnd; - TIFFRGBAImageGet; - TIFFRGBAImageOK; - TIFFRasterScanlineSize; - TIFFRasterScanlineSize64; - TIFFRawStripSize; - TIFFRawStripSize64; - TIFFReadBufferSetup; - TIFFReadCustomDirectory; - TIFFReadDirectory; - TIFFReadEXIFDirectory; - TIFFReadEncodedStrip; - TIFFReadEncodedTile; - TIFFReadRGBAImage; - TIFFReadRGBAImageOriented; - TIFFReadRGBAStrip; - TIFFReadRGBATile; - TIFFReadRawStrip; - TIFFReadRawTile; - TIFFReadScanline; - TIFFReadTile; - TIFFRegisterCODEC; - TIFFReverseBits; - TIFFRewriteDirectory; - TIFFScanlineSize; - TIFFScanlineSize64; - TIFFSetClientInfo; - TIFFSetClientdata; - TIFFSetDirectory; - TIFFSetErrorHandler; - TIFFSetErrorHandlerExt; - TIFFSetField; - TIFFSetFileName; - TIFFSetFileno; - TIFFSetMode; - TIFFSetSubDirectory; - TIFFSetTagExtender; - TIFFSetWarningHandler; - TIFFSetWarningHandlerExt; - TIFFSetWriteOffset; - TIFFSetupStrips; - TIFFStripSize; - TIFFStripSize64; - TIFFSwabArrayOfDouble; - TIFFSwabArrayOfFloat; - TIFFSwabArrayOfLong; - TIFFSwabArrayOfLong8; - TIFFSwabArrayOfShort; - TIFFSwabArrayOfTriples; - TIFFSwabDouble; - TIFFSwabFloat; - TIFFSwabLong; - TIFFSwabLong8; - TIFFSwabShort; - TIFFTileRowSize; - TIFFTileRowSize64; - TIFFTileSize; - TIFFTileSize64; - TIFFUnRegisterCODEC; - TIFFUnlinkDirectory; - TIFFUnsetField; - TIFFVGetField; - TIFFVGetFieldDefaulted; - TIFFVSetField; - TIFFVStripSize; - TIFFVStripSize64; - TIFFVTileSize; - TIFFVTileSize64; - TIFFWarning; - TIFFWarningExt; - TIFFWriteBufferSetup; - TIFFWriteCheck; - TIFFWriteDirectory; - TIFFWriteEncodedStrip; - TIFFWriteEncodedTile; - TIFFWriteRawStrip; - TIFFWriteRawTile; - TIFFWriteScanline; - TIFFWriteTile; - TIFFXYZToRGB; - TIFFYCbCrToRGBInit; - TIFFYCbCrtoRGB; - _TIFFfree; - _TIFFmalloc; - _TIFFmemcmp; - _TIFFmemcpy; - _TIFFmemset; - _TIFFrealloc; - - local: - *; -}; - -LIBTIFF_4.1 { - _TIFFCheckMalloc; - _TIFFCheckRealloc; - _TIFFMultiply32; - _TIFFMultiply64; - _TIFFRewriteField; - TIFFCreateCustomDirectory; - TIFFCreateEXIFDirectory; - TIFFDeferStrileArrayWriting; - TIFFFieldDataType; - TIFFFieldName; - TIFFFieldPassCount; - TIFFFieldReadCount; - TIFFFieldTag; - TIFFFieldWriteCount; - TIFFForceStrileArrayWriting; - TIFFGetStrileByteCount; - TIFFGetStrileByteCountWithErr; - TIFFGetStrileOffset; - TIFFGetStrileOffsetWithErr; - TIFFReadFromUserBuffer; - TIFFReadRGBAStripExt; - TIFFReadRGBATileExt; - TIFFSetCompressionScheme; - TIFFWriteCustomDirectory; -} LIBTIFF_4.0; - -LIBTIFF_4.2 { - TIFFCreateGPSDirectory; - TIFFReadGPSDirectory; - _TIFFGetExifFields; - _TIFFGetGpsFields; -} LIBTIFF_4.1; - -LIBTIFF_4.3 { -} LIBTIFF_4.2; - -LIBTIFF_4.4 { - TIFFFieldIsAnonymous; - TIFFFieldSetGetSize; - TIFFFieldSetGetCountSize; - TIFFIsBigTIFF; -} LIBTIFF_4.3; - -LIBTIFF_4.5 { - _TIFFClampDoubleToUInt32; - TIFFClientOpenExt; - TIFFFdOpenExt; - TIFFOpenExt; - TIFFOpenWExt; - TIFFErrorExtR; - TIFFWarningExtR; - TIFFOpenOptionsAlloc; - TIFFOpenOptionsFree; - TIFFOpenOptionsSetMaxSingleMemAlloc; - TIFFOpenOptionsSetErrorHandlerExtR; - TIFFOpenOptionsSetWarningHandlerExtR; -} LIBTIFF_4.4; - -LIBTIFF_4.6.1 { - TIFFOpenOptionsSetMaxCumulatedMemAlloc; -} LIBTIFF_4.5; - -LIBTIFF_4.7.1 { - TIFFOpenOptionsSetWarnAboutUnknownTags; -} LIBTIFF_4.6.1; diff --git a/third_party/libtiff/libtiff/libtiffxx.map b/third_party/libtiff/libtiff/libtiffxx.map deleted file mode 100644 index e2f648f..0000000 --- a/third_party/libtiff/libtiff/libtiffxx.map +++ /dev/null @@ -1,4 +0,0 @@ -LIBTIFFXX_4.0 { - global: - *; -}; diff --git a/third_party/libtiff/libtiff/t4.h b/third_party/libtiff/libtiff/t4.h deleted file mode 100644 index f63ce38..0000000 --- a/third_party/libtiff/libtiff/t4.h +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _T4_ -#define _T4_ -/* - * CCITT T.4 1D Huffman runlength codes and - * related definitions. Given the small sizes - * of these tables it does not seem - * worthwhile to make code & length 8 bits. - */ -typedef struct tableentry -{ - unsigned short length; /* bit length of g3 code */ - unsigned short code; /* g3 code */ - short runlen; /* run length in bits */ -} tableentry; - -#define EOL 0x001 /* EOL code value - 0000 0000 0000 1 */ - -/* status values returned instead of a run length */ -#define G3CODE_EOL -1 /* NB: ACT_EOL - ACT_WRUNT */ -#define G3CODE_INVALID -2 /* NB: ACT_INVALID - ACT_WRUNT */ -#define G3CODE_EOF -3 /* end of input data */ -#define G3CODE_INCOMP -4 /* incomplete run code */ - -/* - * Note that these tables are ordered such that the - * index into the table is known to be either the - * run length, or (run length / 64) + a fixed offset. - * - * NB: The G3CODE_INVALID entries are only used - * during state generation (see mkg3states.c). - */ -#ifdef G3CODES -const tableentry TIFFFaxWhiteCodes[] = { - {8, 0x35, 0}, /* 0011 0101 */ - {6, 0x7, 1}, /* 0001 11 */ - {4, 0x7, 2}, /* 0111 */ - {4, 0x8, 3}, /* 1000 */ - {4, 0xB, 4}, /* 1011 */ - {4, 0xC, 5}, /* 1100 */ - {4, 0xE, 6}, /* 1110 */ - {4, 0xF, 7}, /* 1111 */ - {5, 0x13, 8}, /* 1001 1 */ - {5, 0x14, 9}, /* 1010 0 */ - {5, 0x7, 10}, /* 0011 1 */ - {5, 0x8, 11}, /* 0100 0 */ - {6, 0x8, 12}, /* 0010 00 */ - {6, 0x3, 13}, /* 0000 11 */ - {6, 0x34, 14}, /* 1101 00 */ - {6, 0x35, 15}, /* 1101 01 */ - {6, 0x2A, 16}, /* 1010 10 */ - {6, 0x2B, 17}, /* 1010 11 */ - {7, 0x27, 18}, /* 0100 111 */ - {7, 0xC, 19}, /* 0001 100 */ - {7, 0x8, 20}, /* 0001 000 */ - {7, 0x17, 21}, /* 0010 111 */ - {7, 0x3, 22}, /* 0000 011 */ - {7, 0x4, 23}, /* 0000 100 */ - {7, 0x28, 24}, /* 0101 000 */ - {7, 0x2B, 25}, /* 0101 011 */ - {7, 0x13, 26}, /* 0010 011 */ - {7, 0x24, 27}, /* 0100 100 */ - {7, 0x18, 28}, /* 0011 000 */ - {8, 0x2, 29}, /* 0000 0010 */ - {8, 0x3, 30}, /* 0000 0011 */ - {8, 0x1A, 31}, /* 0001 1010 */ - {8, 0x1B, 32}, /* 0001 1011 */ - {8, 0x12, 33}, /* 0001 0010 */ - {8, 0x13, 34}, /* 0001 0011 */ - {8, 0x14, 35}, /* 0001 0100 */ - {8, 0x15, 36}, /* 0001 0101 */ - {8, 0x16, 37}, /* 0001 0110 */ - {8, 0x17, 38}, /* 0001 0111 */ - {8, 0x28, 39}, /* 0010 1000 */ - {8, 0x29, 40}, /* 0010 1001 */ - {8, 0x2A, 41}, /* 0010 1010 */ - {8, 0x2B, 42}, /* 0010 1011 */ - {8, 0x2C, 43}, /* 0010 1100 */ - {8, 0x2D, 44}, /* 0010 1101 */ - {8, 0x4, 45}, /* 0000 0100 */ - {8, 0x5, 46}, /* 0000 0101 */ - {8, 0xA, 47}, /* 0000 1010 */ - {8, 0xB, 48}, /* 0000 1011 */ - {8, 0x52, 49}, /* 0101 0010 */ - {8, 0x53, 50}, /* 0101 0011 */ - {8, 0x54, 51}, /* 0101 0100 */ - {8, 0x55, 52}, /* 0101 0101 */ - {8, 0x24, 53}, /* 0010 0100 */ - {8, 0x25, 54}, /* 0010 0101 */ - {8, 0x58, 55}, /* 0101 1000 */ - {8, 0x59, 56}, /* 0101 1001 */ - {8, 0x5A, 57}, /* 0101 1010 */ - {8, 0x5B, 58}, /* 0101 1011 */ - {8, 0x4A, 59}, /* 0100 1010 */ - {8, 0x4B, 60}, /* 0100 1011 */ - {8, 0x32, 61}, /* 0011 0010 */ - {8, 0x33, 62}, /* 0011 0011 */ - {8, 0x34, 63}, /* 0011 0100 */ - {5, 0x1B, 64}, /* 1101 1 */ - {5, 0x12, 128}, /* 1001 0 */ - {6, 0x17, 192}, /* 0101 11 */ - {7, 0x37, 256}, /* 0110 111 */ - {8, 0x36, 320}, /* 0011 0110 */ - {8, 0x37, 384}, /* 0011 0111 */ - {8, 0x64, 448}, /* 0110 0100 */ - {8, 0x65, 512}, /* 0110 0101 */ - {8, 0x68, 576}, /* 0110 1000 */ - {8, 0x67, 640}, /* 0110 0111 */ - {9, 0xCC, 704}, /* 0110 0110 0 */ - {9, 0xCD, 768}, /* 0110 0110 1 */ - {9, 0xD2, 832}, /* 0110 1001 0 */ - {9, 0xD3, 896}, /* 0110 1001 1 */ - {9, 0xD4, 960}, /* 0110 1010 0 */ - {9, 0xD5, 1024}, /* 0110 1010 1 */ - {9, 0xD6, 1088}, /* 0110 1011 0 */ - {9, 0xD7, 1152}, /* 0110 1011 1 */ - {9, 0xD8, 1216}, /* 0110 1100 0 */ - {9, 0xD9, 1280}, /* 0110 1100 1 */ - {9, 0xDA, 1344}, /* 0110 1101 0 */ - {9, 0xDB, 1408}, /* 0110 1101 1 */ - {9, 0x98, 1472}, /* 0100 1100 0 */ - {9, 0x99, 1536}, /* 0100 1100 1 */ - {9, 0x9A, 1600}, /* 0100 1101 0 */ - {6, 0x18, 1664}, /* 0110 00 */ - {9, 0x9B, 1728}, /* 0100 1101 1 */ - {11, 0x8, 1792}, /* 0000 0001 000 */ - {11, 0xC, 1856}, /* 0000 0001 100 */ - {11, 0xD, 1920}, /* 0000 0001 101 */ - {12, 0x12, 1984}, /* 0000 0001 0010 */ - {12, 0x13, 2048}, /* 0000 0001 0011 */ - {12, 0x14, 2112}, /* 0000 0001 0100 */ - {12, 0x15, 2176}, /* 0000 0001 0101 */ - {12, 0x16, 2240}, /* 0000 0001 0110 */ - {12, 0x17, 2304}, /* 0000 0001 0111 */ - {12, 0x1C, 2368}, /* 0000 0001 1100 */ - {12, 0x1D, 2432}, /* 0000 0001 1101 */ - {12, 0x1E, 2496}, /* 0000 0001 1110 */ - {12, 0x1F, 2560}, /* 0000 0001 1111 */ - {12, 0x1, G3CODE_EOL}, /* 0000 0000 0001 */ - {9, 0x1, G3CODE_INVALID}, /* 0000 0000 1 */ - {10, 0x1, G3CODE_INVALID}, /* 0000 0000 01 */ - {11, 0x1, G3CODE_INVALID}, /* 0000 0000 001 */ - {12, 0x0, G3CODE_INVALID}, /* 0000 0000 0000 */ -}; - -const tableentry TIFFFaxBlackCodes[] = { - {10, 0x37, 0}, /* 0000 1101 11 */ - {3, 0x2, 1}, /* 010 */ - {2, 0x3, 2}, /* 11 */ - {2, 0x2, 3}, /* 10 */ - {3, 0x3, 4}, /* 011 */ - {4, 0x3, 5}, /* 0011 */ - {4, 0x2, 6}, /* 0010 */ - {5, 0x3, 7}, /* 0001 1 */ - {6, 0x5, 8}, /* 0001 01 */ - {6, 0x4, 9}, /* 0001 00 */ - {7, 0x4, 10}, /* 0000 100 */ - {7, 0x5, 11}, /* 0000 101 */ - {7, 0x7, 12}, /* 0000 111 */ - {8, 0x4, 13}, /* 0000 0100 */ - {8, 0x7, 14}, /* 0000 0111 */ - {9, 0x18, 15}, /* 0000 1100 0 */ - {10, 0x17, 16}, /* 0000 0101 11 */ - {10, 0x18, 17}, /* 0000 0110 00 */ - {10, 0x8, 18}, /* 0000 0010 00 */ - {11, 0x67, 19}, /* 0000 1100 111 */ - {11, 0x68, 20}, /* 0000 1101 000 */ - {11, 0x6C, 21}, /* 0000 1101 100 */ - {11, 0x37, 22}, /* 0000 0110 111 */ - {11, 0x28, 23}, /* 0000 0101 000 */ - {11, 0x17, 24}, /* 0000 0010 111 */ - {11, 0x18, 25}, /* 0000 0011 000 */ - {12, 0xCA, 26}, /* 0000 1100 1010 */ - {12, 0xCB, 27}, /* 0000 1100 1011 */ - {12, 0xCC, 28}, /* 0000 1100 1100 */ - {12, 0xCD, 29}, /* 0000 1100 1101 */ - {12, 0x68, 30}, /* 0000 0110 1000 */ - {12, 0x69, 31}, /* 0000 0110 1001 */ - {12, 0x6A, 32}, /* 0000 0110 1010 */ - {12, 0x6B, 33}, /* 0000 0110 1011 */ - {12, 0xD2, 34}, /* 0000 1101 0010 */ - {12, 0xD3, 35}, /* 0000 1101 0011 */ - {12, 0xD4, 36}, /* 0000 1101 0100 */ - {12, 0xD5, 37}, /* 0000 1101 0101 */ - {12, 0xD6, 38}, /* 0000 1101 0110 */ - {12, 0xD7, 39}, /* 0000 1101 0111 */ - {12, 0x6C, 40}, /* 0000 0110 1100 */ - {12, 0x6D, 41}, /* 0000 0110 1101 */ - {12, 0xDA, 42}, /* 0000 1101 1010 */ - {12, 0xDB, 43}, /* 0000 1101 1011 */ - {12, 0x54, 44}, /* 0000 0101 0100 */ - {12, 0x55, 45}, /* 0000 0101 0101 */ - {12, 0x56, 46}, /* 0000 0101 0110 */ - {12, 0x57, 47}, /* 0000 0101 0111 */ - {12, 0x64, 48}, /* 0000 0110 0100 */ - {12, 0x65, 49}, /* 0000 0110 0101 */ - {12, 0x52, 50}, /* 0000 0101 0010 */ - {12, 0x53, 51}, /* 0000 0101 0011 */ - {12, 0x24, 52}, /* 0000 0010 0100 */ - {12, 0x37, 53}, /* 0000 0011 0111 */ - {12, 0x38, 54}, /* 0000 0011 1000 */ - {12, 0x27, 55}, /* 0000 0010 0111 */ - {12, 0x28, 56}, /* 0000 0010 1000 */ - {12, 0x58, 57}, /* 0000 0101 1000 */ - {12, 0x59, 58}, /* 0000 0101 1001 */ - {12, 0x2B, 59}, /* 0000 0010 1011 */ - {12, 0x2C, 60}, /* 0000 0010 1100 */ - {12, 0x5A, 61}, /* 0000 0101 1010 */ - {12, 0x66, 62}, /* 0000 0110 0110 */ - {12, 0x67, 63}, /* 0000 0110 0111 */ - {10, 0xF, 64}, /* 0000 0011 11 */ - {12, 0xC8, 128}, /* 0000 1100 1000 */ - {12, 0xC9, 192}, /* 0000 1100 1001 */ - {12, 0x5B, 256}, /* 0000 0101 1011 */ - {12, 0x33, 320}, /* 0000 0011 0011 */ - {12, 0x34, 384}, /* 0000 0011 0100 */ - {12, 0x35, 448}, /* 0000 0011 0101 */ - {13, 0x6C, 512}, /* 0000 0011 0110 0 */ - {13, 0x6D, 576}, /* 0000 0011 0110 1 */ - {13, 0x4A, 640}, /* 0000 0010 0101 0 */ - {13, 0x4B, 704}, /* 0000 0010 0101 1 */ - {13, 0x4C, 768}, /* 0000 0010 0110 0 */ - {13, 0x4D, 832}, /* 0000 0010 0110 1 */ - {13, 0x72, 896}, /* 0000 0011 1001 0 */ - {13, 0x73, 960}, /* 0000 0011 1001 1 */ - {13, 0x74, 1024}, /* 0000 0011 1010 0 */ - {13, 0x75, 1088}, /* 0000 0011 1010 1 */ - {13, 0x76, 1152}, /* 0000 0011 1011 0 */ - {13, 0x77, 1216}, /* 0000 0011 1011 1 */ - {13, 0x52, 1280}, /* 0000 0010 1001 0 */ - {13, 0x53, 1344}, /* 0000 0010 1001 1 */ - {13, 0x54, 1408}, /* 0000 0010 1010 0 */ - {13, 0x55, 1472}, /* 0000 0010 1010 1 */ - {13, 0x5A, 1536}, /* 0000 0010 1101 0 */ - {13, 0x5B, 1600}, /* 0000 0010 1101 1 */ - {13, 0x64, 1664}, /* 0000 0011 0010 0 */ - {13, 0x65, 1728}, /* 0000 0011 0010 1 */ - {11, 0x8, 1792}, /* 0000 0001 000 */ - {11, 0xC, 1856}, /* 0000 0001 100 */ - {11, 0xD, 1920}, /* 0000 0001 101 */ - {12, 0x12, 1984}, /* 0000 0001 0010 */ - {12, 0x13, 2048}, /* 0000 0001 0011 */ - {12, 0x14, 2112}, /* 0000 0001 0100 */ - {12, 0x15, 2176}, /* 0000 0001 0101 */ - {12, 0x16, 2240}, /* 0000 0001 0110 */ - {12, 0x17, 2304}, /* 0000 0001 0111 */ - {12, 0x1C, 2368}, /* 0000 0001 1100 */ - {12, 0x1D, 2432}, /* 0000 0001 1101 */ - {12, 0x1E, 2496}, /* 0000 0001 1110 */ - {12, 0x1F, 2560}, /* 0000 0001 1111 */ - {12, 0x1, G3CODE_EOL}, /* 0000 0000 0001 */ - {9, 0x1, G3CODE_INVALID}, /* 0000 0000 1 */ - {10, 0x1, G3CODE_INVALID}, /* 0000 0000 01 */ - {11, 0x1, G3CODE_INVALID}, /* 0000 0000 001 */ - {12, 0x0, G3CODE_INVALID}, /* 0000 0000 0000 */ -}; -#else -extern const tableentry TIFFFaxWhiteCodes[]; -extern const tableentry TIFFFaxBlackCodes[]; -#endif -#endif /* _T4_ */ - diff --git a/third_party/libtiff/libtiff/tif_aux.c b/third_party/libtiff/libtiff/tif_aux.c deleted file mode 100644 index 31b2400..0000000 --- a/third_party/libtiff/libtiff/tif_aux.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Auxiliary Support Routines. - */ -#include "tif_predict.h" -#include "tiffiop.h" -#include -#include - -uint32_t _TIFFMultiply32(TIFF *tif, uint32_t first, uint32_t second, - const char *where) -{ - if (second && first > UINT32_MAX / second) - { - TIFFErrorExtR(tif, where, "Integer overflow in %s", where); - return 0; - } - - return first * second; -} - -uint64_t _TIFFMultiply64(TIFF *tif, uint64_t first, uint64_t second, - const char *where) -{ - if (second && first > UINT64_MAX / second) - { - TIFFErrorExtR(tif, where, "Integer overflow in %s", where); - return 0; - } - - return first * second; -} - -tmsize_t _TIFFMultiplySSize(TIFF *tif, tmsize_t first, tmsize_t second, - const char *where) -{ - if (first <= 0 || second <= 0) - { - if (tif != NULL && where != NULL) - { - TIFFErrorExtR(tif, where, - "Invalid argument to _TIFFMultiplySSize() in %s", - where); - } - return 0; - } - - if (first > TIFF_TMSIZE_T_MAX / second) - { - if (tif != NULL && where != NULL) - { - TIFFErrorExtR(tif, where, "Integer overflow in %s", where); - } - return 0; - } - return first * second; -} - -tmsize_t _TIFFCastUInt64ToSSize(TIFF *tif, uint64_t val, const char *module) -{ - if (val > (uint64_t)TIFF_TMSIZE_T_MAX) - { - if (tif != NULL && module != NULL) - { - TIFFErrorExtR(tif, module, "Integer overflow"); - } - return 0; - } - return (tmsize_t)val; -} - -void *_TIFFCheckRealloc(TIFF *tif, void *buffer, tmsize_t nmemb, - tmsize_t elem_size, const char *what) -{ - void *cp = NULL; - tmsize_t count = _TIFFMultiplySSize(tif, nmemb, elem_size, NULL); - /* - * Check for integer overflow. - */ - if (count != 0) - { - cp = _TIFFreallocExt(tif, buffer, count); - } - - if (cp == NULL) - { - TIFFErrorExtR(tif, tif->tif_name, - "Failed to allocate memory for %s " - "(%" TIFF_SSIZE_FORMAT " elements of %" TIFF_SSIZE_FORMAT - " bytes each)", - what, nmemb, elem_size); - } - - return cp; -} - -void *_TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, - const char *what) -{ - return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what); -} - -static int TIFFDefaultTransferFunction(TIFF *tif, TIFFDirectory *td) -{ - uint16_t **tf = td->td_transferfunction; - tmsize_t i, n, nbytes; - - tf[0] = tf[1] = tf[2] = 0; - // Do not try to generate a default TransferFunction beyond 24 bits. - // This otherwise leads to insane amounts, resulting in denial of service - // See https://github.com/OSGeo/gdal/issues/10875 - if (td->td_bitspersample > 24) - return 0; - - n = ((tmsize_t)1) << td->td_bitspersample; - nbytes = n * sizeof(uint16_t); - tf[0] = (uint16_t *)_TIFFmallocExt(tif, nbytes); - if (tf[0] == NULL) - return 0; - tf[0][0] = 0; - for (i = 1; i < n; i++) - { - double t = (double)i / ((double)n - 1.); - tf[0][i] = (uint16_t)floor(65535. * pow(t, 2.2) + .5); - } - - if (td->td_samplesperpixel - td->td_extrasamples > 1) - { - tf[1] = (uint16_t *)_TIFFmallocExt(tif, nbytes); - if (tf[1] == NULL) - goto bad; - _TIFFmemcpy(tf[1], tf[0], nbytes); - tf[2] = (uint16_t *)_TIFFmallocExt(tif, nbytes); - if (tf[2] == NULL) - goto bad; - _TIFFmemcpy(tf[2], tf[0], nbytes); - } - return 1; - -bad: - if (tf[0]) - _TIFFfreeExt(tif, tf[0]); - if (tf[1]) - _TIFFfreeExt(tif, tf[1]); - if (tf[2]) - _TIFFfreeExt(tif, tf[2]); - tf[0] = tf[1] = tf[2] = 0; - return 0; -} - -static int TIFFDefaultRefBlackWhite(TIFF *tif, TIFFDirectory *td) -{ - int i; - - td->td_refblackwhite = (float *)_TIFFmallocExt(tif, 6 * sizeof(float)); - if (td->td_refblackwhite == NULL) - return 0; - if (td->td_photometric == PHOTOMETRIC_YCBCR) - { - /* - * YCbCr (Class Y) images must have the ReferenceBlackWhite - * tag set. Fix the broken images, which lacks that tag. - */ - td->td_refblackwhite[0] = 0.0F; - td->td_refblackwhite[1] = td->td_refblackwhite[3] = - td->td_refblackwhite[5] = 255.0F; - td->td_refblackwhite[2] = td->td_refblackwhite[4] = 128.0F; - } - else - { - /* - * Assume RGB (Class R) - */ - for (i = 0; i < 3; i++) - { - td->td_refblackwhite[2 * i + 0] = 0; - td->td_refblackwhite[2 * i + 1] = - (float)((1L << td->td_bitspersample) - 1L); - } - } - return 1; -} - -/* - * Like TIFFGetField, but return any default - * value if the tag is not present in the directory. - * - * NB: We use the value in the directory, rather than - * explicit values so that defaults exist only one - * place in the library -- in TIFFDefaultDirectory. - */ -int TIFFVGetFieldDefaulted(TIFF *tif, uint32_t tag, va_list ap) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (TIFFVGetField(tif, tag, ap)) - return (1); - switch (tag) - { - case TIFFTAG_SUBFILETYPE: - *va_arg(ap, uint32_t *) = td->td_subfiletype; - return (1); - case TIFFTAG_BITSPERSAMPLE: - *va_arg(ap, uint16_t *) = td->td_bitspersample; - return (1); - case TIFFTAG_THRESHHOLDING: - *va_arg(ap, uint16_t *) = td->td_threshholding; - return (1); - case TIFFTAG_FILLORDER: - *va_arg(ap, uint16_t *) = td->td_fillorder; - return (1); - case TIFFTAG_ORIENTATION: - *va_arg(ap, uint16_t *) = td->td_orientation; - return (1); - case TIFFTAG_SAMPLESPERPIXEL: - *va_arg(ap, uint16_t *) = td->td_samplesperpixel; - return (1); - case TIFFTAG_ROWSPERSTRIP: - *va_arg(ap, uint32_t *) = td->td_rowsperstrip; - return (1); - case TIFFTAG_MINSAMPLEVALUE: - *va_arg(ap, uint16_t *) = td->td_minsamplevalue; - return (1); - case TIFFTAG_MAXSAMPLEVALUE: - { - uint16_t maxsamplevalue; - /* td_bitspersample=1 is always set in TIFFDefaultDirectory(). - * Therefore, td_maxsamplevalue has to be re-calculated in - * TIFFGetFieldDefaulted(). */ - if (td->td_bitspersample > 0) - { - /* This shift operation into a uint16_t limits the value to - * 65535 even if td_bitspersamle is > 16 */ - if (td->td_bitspersample <= 16) - { - maxsamplevalue = (1 << td->td_bitspersample) - - 1; /* 2**(BitsPerSample) - 1 */ - } - else - { - maxsamplevalue = 65535; - } - } - else - { - maxsamplevalue = 0; - } - *va_arg(ap, uint16_t *) = maxsamplevalue; - return (1); - } - case TIFFTAG_PLANARCONFIG: - *va_arg(ap, uint16_t *) = td->td_planarconfig; - return (1); - case TIFFTAG_RESOLUTIONUNIT: - *va_arg(ap, uint16_t *) = td->td_resolutionunit; - return (1); - case TIFFTAG_PREDICTOR: - { - TIFFPredictorState *sp = (TIFFPredictorState *)tif->tif_data; - if (sp == NULL) - { - TIFFErrorExtR( - tif, tif->tif_name, - "Cannot get \"Predictor\" tag as plugin is not configured"); - *va_arg(ap, uint16_t *) = 0; - return 0; - } - *va_arg(ap, uint16_t *) = (uint16_t)sp->predictor; - return 1; - } - case TIFFTAG_DOTRANGE: - *va_arg(ap, uint16_t *) = 0; - *va_arg(ap, uint16_t *) = (1 << td->td_bitspersample) - 1; - return (1); - case TIFFTAG_INKSET: - *va_arg(ap, uint16_t *) = INKSET_CMYK; - return 1; - case TIFFTAG_NUMBEROFINKS: - *va_arg(ap, uint16_t *) = 4; - return (1); - case TIFFTAG_EXTRASAMPLES: - *va_arg(ap, uint16_t *) = td->td_extrasamples; - *va_arg(ap, const uint16_t **) = td->td_sampleinfo; - return (1); - case TIFFTAG_MATTEING: - *va_arg(ap, uint16_t *) = - (td->td_extrasamples == 1 && - td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); - return (1); - case TIFFTAG_TILEDEPTH: - *va_arg(ap, uint32_t *) = td->td_tiledepth; - return (1); - case TIFFTAG_DATATYPE: - *va_arg(ap, uint16_t *) = td->td_sampleformat - 1; - return (1); - case TIFFTAG_SAMPLEFORMAT: - *va_arg(ap, uint16_t *) = td->td_sampleformat; - return (1); - case TIFFTAG_IMAGEDEPTH: - *va_arg(ap, uint32_t *) = td->td_imagedepth; - return (1); - case TIFFTAG_YCBCRCOEFFICIENTS: - { - /* defaults are from CCIR Recommendation 601-1 */ - static const float ycbcrcoeffs[] = {0.299f, 0.587f, 0.114f}; - *va_arg(ap, const float **) = ycbcrcoeffs; - return 1; - } - case TIFFTAG_YCBCRSUBSAMPLING: - *va_arg(ap, uint16_t *) = td->td_ycbcrsubsampling[0]; - *va_arg(ap, uint16_t *) = td->td_ycbcrsubsampling[1]; - return (1); - case TIFFTAG_YCBCRPOSITIONING: - *va_arg(ap, uint16_t *) = td->td_ycbcrpositioning; - return (1); - case TIFFTAG_WHITEPOINT: - { - /* TIFF 6.0 specification tells that it is no default - value for the WhitePoint, but AdobePhotoshop TIFF - Technical Note tells that it should be CIE D50. */ - static const float whitepoint[] = { - D50_X0 / (D50_X0 + D50_Y0 + D50_Z0), - D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0)}; - *va_arg(ap, const float **) = whitepoint; - return 1; - } - case TIFFTAG_TRANSFERFUNCTION: - if (!td->td_transferfunction[0] && - !TIFFDefaultTransferFunction(tif, td)) - { - TIFFErrorExtR(tif, tif->tif_name, - "No space for \"TransferFunction\" tag"); - return (0); - } - *va_arg(ap, const uint16_t **) = td->td_transferfunction[0]; - if (td->td_samplesperpixel - td->td_extrasamples > 1) - { - *va_arg(ap, const uint16_t **) = td->td_transferfunction[1]; - *va_arg(ap, const uint16_t **) = td->td_transferfunction[2]; - } - return (1); - case TIFFTAG_REFERENCEBLACKWHITE: - if (!td->td_refblackwhite && !TIFFDefaultRefBlackWhite(tif, td)) - return (0); - *va_arg(ap, const float **) = td->td_refblackwhite; - return (1); - } - return 0; -} - -/* - * Like TIFFGetField, but return any default - * value if the tag is not present in the directory. - */ -int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag, ...) -{ - int ok; - va_list ap; - - va_start(ap, tag); - ok = TIFFVGetFieldDefaulted(tif, tag, ap); - va_end(ap); - return (ok); -} - -float _TIFFClampDoubleToFloat(double val) -{ - if (val > FLT_MAX) - return FLT_MAX; - if (val < -FLT_MAX) - return -FLT_MAX; - return (float)val; -} - -uint32_t _TIFFClampDoubleToUInt32(double val) -{ - if (val < 0) - return 0; - if (val > 0xFFFFFFFFU || val != val) - return 0xFFFFFFFFU; - return (uint32_t)val; -} - -int _TIFFSeekOK(TIFF *tif, toff_t off) -{ - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ - /* See http://bugzilla.maptools.org/show_bug.cgi?id=2726 */ - return off <= (~(uint64_t)0) / 2 && TIFFSeekFile(tif, off, SEEK_SET) == off; -} diff --git a/third_party/libtiff/libtiff/tif_close.c b/third_party/libtiff/libtiff/tif_close.c deleted file mode 100644 index d498010..0000000 --- a/third_party/libtiff/libtiff/tif_close.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" -#include - -/************************************************************************/ -/* TIFFCleanup() */ -/************************************************************************/ - -/** - * Auxiliary function to free the TIFF structure. Given structure will be - * completely freed, so you should save opened file handle and pointer - * to the close procedure in external variables before calling - * _TIFFCleanup(), if you will need these ones to close the file. - * - * @param tif A TIFF pointer. - */ - -void TIFFCleanup(TIFF *tif) -{ - /* - * Flush buffered data and directory (if dirty). - */ - if (tif->tif_mode != O_RDONLY) - TIFFFlush(tif); - TIFFFreeDirectory(tif); - - _TIFFCleanupIFDOffsetAndNumberMaps(tif); - - /* - * Clean up client info links. - */ - while (tif->tif_clientinfo) - { - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - tif->tif_clientinfo = psLink->next; - _TIFFfreeExt(tif, psLink->name); - _TIFFfreeExt(tif, psLink); - } - - if (tif->tif_rawdata && (tif->tif_flags & TIFF_MYBUFFER)) - _TIFFfreeExt(tif, tif->tif_rawdata); - if (isMapped(tif)) - TIFFUnmapFileContents(tif, tif->tif_base, (toff_t)tif->tif_size); - - /* - * Clean up custom fields. - */ - if (tif->tif_fields && tif->tif_nfields > 0) - { - uint32_t i; - - for (i = 0; i < tif->tif_nfields; i++) - { - TIFFField *fld = tif->tif_fields[i]; - if (fld->field_name != NULL) - { - if (fld->field_bit == FIELD_CUSTOM && - /* caution: tif_fields[i] must not be the beginning of a - * fields-array. Otherwise the following tags are also freed - * with the first free(). - */ - TIFFFieldIsAnonymous(fld)) - { - _TIFFfreeExt(tif, fld->field_name); - _TIFFfreeExt(tif, fld); - } - } - } - - _TIFFfreeExt(tif, tif->tif_fields); - } - - if (tif->tif_nfieldscompat > 0) - { - uint32_t i; - - for (i = 0; i < tif->tif_nfieldscompat; i++) - { - if (tif->tif_fieldscompat[i].allocated_size) - _TIFFfreeExt(tif, tif->tif_fieldscompat[i].fields); - } - _TIFFfreeExt(tif, tif->tif_fieldscompat); - } - - if (tif->tif_cur_cumulated_mem_alloc != 0) - { - TIFFErrorExtR(tif, "TIFFCleanup", - "tif_cur_cumulated_mem_alloc = %" PRIu64 " whereas it " - "should be 0", - (uint64_t)tif->tif_cur_cumulated_mem_alloc); - } - - _TIFFfreeExt(NULL, tif); -} - -/************************************************************************/ -/* _TIFFCleanupIFDOffsetAndNumberMaps() */ -/************************************************************************/ - -void _TIFFCleanupIFDOffsetAndNumberMaps(TIFF *tif) -{ - if (tif->tif_map_dir_offset_to_number) - { - TIFFHashSetDestroy(tif->tif_map_dir_offset_to_number); - tif->tif_map_dir_offset_to_number = NULL; - } - if (tif->tif_map_dir_number_to_offset) - { - TIFFHashSetDestroy(tif->tif_map_dir_number_to_offset); - tif->tif_map_dir_number_to_offset = NULL; - } -} - -/************************************************************************/ -/* TIFFClose() */ -/************************************************************************/ - -/** - * Close a previously opened TIFF file. - * - * TIFFClose closes a file that was previously opened with TIFFOpen(). - * Any buffered data are flushed to the file, including the contents of - * the current directory (if modified); and all resources are reclaimed. - * - * @param tif A TIFF pointer. - */ - -void TIFFClose(TIFF *tif) -{ - if (tif != NULL) - { - TIFFCloseProc closeproc = tif->tif_closeproc; - thandle_t fd = tif->tif_clientdata; - - TIFFCleanup(tif); - (void)(*closeproc)(fd); - } -} diff --git a/third_party/libtiff/libtiff/tif_codec.c b/third_party/libtiff/libtiff/tif_codec.c deleted file mode 100644 index d499b63..0000000 --- a/third_party/libtiff/libtiff/tif_codec.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Builtin Compression Scheme Configuration Support. - */ -#include "tiffiop.h" - -static int NotConfigured(TIFF *, int); - -#ifndef LZW_SUPPORT -#define TIFFInitLZW NotConfigured -#endif -#ifndef PACKBITS_SUPPORT -#define TIFFInitPackBits NotConfigured -#endif -#ifndef THUNDER_SUPPORT -#define TIFFInitThunderScan NotConfigured -#endif -#ifndef NEXT_SUPPORT -#define TIFFInitNeXT NotConfigured -#endif -#ifndef JPEG_SUPPORT -#define TIFFInitJPEG NotConfigured -#endif -#ifndef OJPEG_SUPPORT -#define TIFFInitOJPEG NotConfigured -#endif -#ifndef CCITT_SUPPORT -#define TIFFInitCCITTRLE NotConfigured -#define TIFFInitCCITTRLEW NotConfigured -#define TIFFInitCCITTFax3 NotConfigured -#define TIFFInitCCITTFax4 NotConfigured -#endif -#ifndef JBIG_SUPPORT -#define TIFFInitJBIG NotConfigured -#endif -#ifndef ZIP_SUPPORT -#define TIFFInitZIP NotConfigured -#endif -#ifndef PIXARLOG_SUPPORT -#define TIFFInitPixarLog NotConfigured -#endif -#ifndef LOGLUV_SUPPORT -#define TIFFInitSGILog NotConfigured -#endif -#ifndef LERC_SUPPORT -#define TIFFInitLERC NotConfigured -#endif -#ifndef LZMA_SUPPORT -#define TIFFInitLZMA NotConfigured -#endif -#ifndef ZSTD_SUPPORT -#define TIFFInitZSTD NotConfigured -#endif -#ifndef WEBP_SUPPORT -#define TIFFInitWebP NotConfigured -#endif - -/* - * Compression schemes statically built into the library. - */ -const TIFFCodec _TIFFBuiltinCODECS[] = { - {"None", COMPRESSION_NONE, TIFFInitDumpMode}, - {"LZW", COMPRESSION_LZW, TIFFInitLZW}, - {"PackBits", COMPRESSION_PACKBITS, TIFFInitPackBits}, - {"ThunderScan", COMPRESSION_THUNDERSCAN, TIFFInitThunderScan}, - {"NeXT", COMPRESSION_NEXT, TIFFInitNeXT}, - {"JPEG", COMPRESSION_JPEG, TIFFInitJPEG}, - {"Old-style JPEG", COMPRESSION_OJPEG, TIFFInitOJPEG}, - {"CCITT RLE", COMPRESSION_CCITTRLE, TIFFInitCCITTRLE}, - {"CCITT RLE/W", COMPRESSION_CCITTRLEW, TIFFInitCCITTRLEW}, - {"CCITT Group 3", COMPRESSION_CCITTFAX3, TIFFInitCCITTFax3}, - {"CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4}, - {"ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG}, - {"Deflate", COMPRESSION_DEFLATE, TIFFInitZIP}, - {"AdobeDeflate", COMPRESSION_ADOBE_DEFLATE, TIFFInitZIP}, - {"PixarLog", COMPRESSION_PIXARLOG, TIFFInitPixarLog}, - {"SGILog", COMPRESSION_SGILOG, TIFFInitSGILog}, - {"SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog}, - {"LZMA", COMPRESSION_LZMA, TIFFInitLZMA}, - {"ZSTD", COMPRESSION_ZSTD, TIFFInitZSTD}, - {"WEBP", COMPRESSION_WEBP, TIFFInitWebP}, - {"LERC", COMPRESSION_LERC, TIFFInitLERC}, - {NULL, 0, NULL}}; - -static int _notConfigured(TIFF *tif) -{ - const TIFFCodec *c = TIFFFindCODEC(tif->tif_dir.td_compression); - char compression_code[20]; - - snprintf(compression_code, sizeof(compression_code), "%" PRIu16, - tif->tif_dir.td_compression); - TIFFErrorExtR(tif, tif->tif_name, - "%s compression support is not configured", - c ? c->name : compression_code); - return (0); -} - -static int NotConfigured(TIFF *tif, int scheme) -{ - (void)scheme; - - tif->tif_fixuptags = _notConfigured; - tif->tif_decodestatus = FALSE; - tif->tif_setupdecode = _notConfigured; - tif->tif_encodestatus = FALSE; - tif->tif_setupencode = _notConfigured; - return (1); -} - -/************************************************************************/ -/* TIFFIsCODECConfigured() */ -/************************************************************************/ - -/** - * Check whether we have working codec for the specific coding scheme. - * - * @return returns 1 if the codec is configured and working. Otherwise - * 0 will be returned. - */ - -int TIFFIsCODECConfigured(uint16_t scheme) -{ - const TIFFCodec *codec = TIFFFindCODEC(scheme); - - if (codec == NULL) - { - return 0; - } - if (codec->init == NULL) - { - return 0; - } - if (codec->init != NotConfigured) - { - return 1; - } - return 0; -} diff --git a/third_party/libtiff/libtiff/tif_color.c b/third_party/libtiff/libtiff/tif_color.c deleted file mode 100644 index a52fdac..0000000 --- a/third_party/libtiff/libtiff/tif_color.c +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * CIE L*a*b* to CIE XYZ and CIE XYZ to RGB conversion routines are taken - * from the VIPS library (http://www.vips.ecs.soton.ac.uk) with - * the permission of John Cupitt, the VIPS author. - */ - -/* - * TIFF Library. - * - * Color space conversion routines. - */ - -#include "tiffiop.h" -#include - -/* - * Convert color value from the CIE L*a*b* 1976 space to CIE XYZ. - */ -void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t l, int32_t a, int32_t b, - float *X, float *Y, float *Z) -{ - TIFFCIELab16ToXYZ(cielab, l * 257, a * 256, b * 256, X, Y, Z); -} - -/* - * For CIELab encoded in 16 bits, L is an unsigned integer range [0,65535]. - * The a* and b* components are signed integers range [-32768,32767]. The 16 - * bit chrominance values are encoded as 256 times the 1976 CIE a* and b* - * values - */ -void TIFFCIELab16ToXYZ(TIFFCIELabToRGB *cielab, uint32_t l, int32_t a, - int32_t b, float *X, float *Y, float *Z) -{ - float L = (float)l * 100.0F / 65535.0F; - float cby, tmp; - - if (L < 8.856F) - { - *Y = (L * cielab->Y0) / 903.292F; - cby = 7.787F * (*Y / cielab->Y0) + 16.0F / 116.0F; - } - else - { - cby = (L + 16.0F) / 116.0F; - *Y = cielab->Y0 * cby * cby * cby; - } - - tmp = (float)a / 256.0F / 500.0F + cby; - if (tmp < 0.2069F) - *X = cielab->X0 * (tmp - 0.13793F) / 7.787F; - else - *X = cielab->X0 * tmp * tmp * tmp; - - tmp = cby - (float)b / 256.0F / 200.0F; - if (tmp < 0.2069F) - *Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F; - else - *Z = cielab->Z0 * tmp * tmp * tmp; -} - -#define RINT(R) ((uint32_t)((R) > 0 ? ((R) + 0.5) : ((R)-0.5))) -/* - * Convert color value from the XYZ space to RGB. - */ -void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, - uint32_t *r, uint32_t *g, uint32_t *b) -{ - size_t i; - float Yr, Yg, Yb; - float *matrix = &cielab->display.d_mat[0][0]; - - /* Multiply through the matrix to get luminosity values. */ - Yr = matrix[0] * X + matrix[1] * Y + matrix[2] * Z; - Yg = matrix[3] * X + matrix[4] * Y + matrix[5] * Z; - Yb = matrix[6] * X + matrix[7] * Y + matrix[8] * Z; - - /* Clip input */ - Yr = TIFFmax(Yr, cielab->display.d_Y0R); - Yg = TIFFmax(Yg, cielab->display.d_Y0G); - Yb = TIFFmax(Yb, cielab->display.d_Y0B); - - /* Avoid overflow in case of wrong input values */ - Yr = TIFFmin(Yr, cielab->display.d_YCR); - Yg = TIFFmin(Yg, cielab->display.d_YCG); - Yb = TIFFmin(Yb, cielab->display.d_YCB); - - /* Turn luminosity to colour value. */ - i = (size_t)((Yr - cielab->display.d_Y0R) / cielab->rstep); - i = TIFFmin((size_t)cielab->range, i); - *r = RINT(cielab->Yr2r[i]); - - i = (size_t)((Yg - cielab->display.d_Y0G) / cielab->gstep); - i = TIFFmin((size_t)cielab->range, i); - *g = RINT(cielab->Yg2g[i]); - - i = (size_t)((Yb - cielab->display.d_Y0B) / cielab->bstep); - i = TIFFmin((size_t)cielab->range, i); - *b = RINT(cielab->Yb2b[i]); - - /* Clip output. */ - *r = TIFFmin(*r, cielab->display.d_Vrwr); - *g = TIFFmin(*g, cielab->display.d_Vrwg); - *b = TIFFmin(*b, cielab->display.d_Vrwb); -} -#undef RINT - -/* - * Allocate conversion state structures and make look_up tables for - * the Yr,Yb,Yg <=> r,g,b conversions. - */ -int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *display, - float *refWhite) -{ - size_t i; - double dfGamma; - - cielab->range = CIELABTORGB_TABLE_RANGE; - - _TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay)); - - /* Red */ - dfGamma = 1.0 / cielab->display.d_gammaR; - cielab->rstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for (i = 0; i <= (size_t)cielab->range; i++) - { - cielab->Yr2r[i] = cielab->display.d_Vrwr * - ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Green */ - dfGamma = 1.0 / cielab->display.d_gammaG; - cielab->gstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for (i = 0; i <= (size_t)cielab->range; i++) - { - cielab->Yg2g[i] = cielab->display.d_Vrwg * - ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Blue */ - dfGamma = 1.0 / cielab->display.d_gammaB; - cielab->bstep = - (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; - for (i = 0; i <= (size_t)cielab->range; i++) - { - cielab->Yb2b[i] = cielab->display.d_Vrwb * - ((float)pow((double)i / cielab->range, dfGamma)); - } - - /* Init reference white point */ - cielab->X0 = refWhite[0]; - cielab->Y0 = refWhite[1]; - cielab->Z0 = refWhite[2]; - - return 0; -} - -/* - * Convert color value from the YCbCr space to RGB. - * The colorspace conversion algorithm comes from the IJG v5a code; - * see below for more information on how it works. - */ -#define SHIFT 16 -#define FIX(x) ((int32_t)((x) * (1L << SHIFT) + 0.5)) -#define ONE_HALF ((int32_t)(1 << (SHIFT - 1))) -#define Code2V(c, RB, RW, CR) \ - ((((c) - (int32_t)(RB)) * (float)(CR)) / \ - (float)(((RW) - (RB) != 0) ? ((RW) - (RB)) : 1)) -/* !((f)>=(min)) written that way to deal with NaN */ -#define CLAMP(f, min, max) \ - ((!((f) >= (min))) ? (min) : (f) > (max) ? (max) : (f)) -#define HICLAMP(f, max) ((f) > (max) ? (max) : (f)) - -void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, - uint32_t *r, uint32_t *g, uint32_t *b) -{ - int32_t i; - - /* XXX: Only 8-bit YCbCr input supported for now */ - Y = HICLAMP(Y, 255); - Cb = CLAMP(Cb, 0, 255); - Cr = CLAMP(Cr, 0, 255); - - i = ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr]; - *r = CLAMP(i, 0, 255); - i = ycbcr->Y_tab[Y] + - (int)((ycbcr->Cb_g_tab[Cb] + ycbcr->Cr_g_tab[Cr]) >> SHIFT); - *g = CLAMP(i, 0, 255); - i = ycbcr->Y_tab[Y] + ycbcr->Cb_b_tab[Cb]; - *b = CLAMP(i, 0, 255); -} - -/* Clamp function for sanitization purposes. Normally clamping should not */ -/* occur for well behaved chroma and refBlackWhite coefficients */ -static float CLAMPw(float v, float vmin, float vmax) -{ - if (v < vmin) - { - /* printf("%f clamped to %f\n", v, vmin); */ - return vmin; - } - if (v > vmax) - { - /* printf("%f clamped to %f\n", v, vmax); */ - return vmax; - } - return v; -} - -/* - * Initialize the YCbCr->RGB conversion tables. The conversion - * is done according to the 6.0 spec: - * - * R = Y + Cr*(2 - 2*LumaRed) - * B = Y + Cb*(2 - 2*LumaBlue) - * G = Y - * - LumaBlue*Cb*(2-2*LumaBlue)/LumaGreen - * - LumaRed*Cr*(2-2*LumaRed)/LumaGreen - * - * To avoid floating point arithmetic the fractional constants that - * come out of the equations are represented as fixed point values - * in the range 0...2^16. We also eliminate multiplications by - * pre-calculating possible values indexed by Cb and Cr (this code - * assumes conversion is being done for 8-bit samples). - */ -int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite) -{ - TIFFRGBValue *clamptab; - int i; - -#define LumaRed luma[0] -#define LumaGreen luma[1] -#define LumaBlue luma[2] - - clamptab = - (TIFFRGBValue *)((uint8_t *)ycbcr + - TIFFroundup_32(sizeof(TIFFYCbCrToRGB), sizeof(long))); - _TIFFmemset(clamptab, 0, 256); /* v < 0 => 0 */ - ycbcr->clamptab = (clamptab += 256); - for (i = 0; i < 256; i++) - clamptab[i] = (TIFFRGBValue)i; - _TIFFmemset(clamptab + 256, 255, 2 * 256); /* v > 255 => 255 */ - ycbcr->Cr_r_tab = (int *)(clamptab + 3 * 256); - ycbcr->Cb_b_tab = ycbcr->Cr_r_tab + 256; - ycbcr->Cr_g_tab = (int32_t *)(ycbcr->Cb_b_tab + 256); - ycbcr->Cb_g_tab = ycbcr->Cr_g_tab + 256; - ycbcr->Y_tab = ycbcr->Cb_g_tab + 256; - - { - float f1 = 2 - 2 * LumaRed; - int32_t D1 = FIX(CLAMP(f1, 0.0F, 2.0F)); - float f2 = LumaRed * f1 / LumaGreen; - int32_t D2 = -FIX(CLAMP(f2, 0.0F, 2.0F)); - float f3 = 2 - 2 * LumaBlue; - int32_t D3 = FIX(CLAMP(f3, 0.0F, 2.0F)); - float f4 = LumaBlue * f3 / LumaGreen; - int32_t D4 = -FIX(CLAMP(f4, 0.0F, 2.0F)); - int x; - -#undef LumaBlue -#undef LumaGreen -#undef LumaRed - - /* - * i is the actual input pixel value in the range 0..255 - * Cb and Cr values are in the range -128..127 (actually - * they are in a range defined by the ReferenceBlackWhite - * tag) so there is some range shifting to do here when - * constructing tables indexed by the raw pixel data. - */ - for (i = 0, x = -128; i < 256; i++, x++) - { - int32_t Cr = (int32_t)CLAMPw(Code2V(x, refBlackWhite[4] - 128.0F, - refBlackWhite[5] - 128.0F, 127), - -128.0F * 32, 128.0F * 32); - int32_t Cb = (int32_t)CLAMPw(Code2V(x, refBlackWhite[2] - 128.0F, - refBlackWhite[3] - 128.0F, 127), - -128.0F * 32, 128.0F * 32); - - ycbcr->Cr_r_tab[i] = (int32_t)((D1 * Cr + ONE_HALF) >> SHIFT); - ycbcr->Cb_b_tab[i] = (int32_t)((D3 * Cb + ONE_HALF) >> SHIFT); - ycbcr->Cr_g_tab[i] = D2 * Cr; - ycbcr->Cb_g_tab[i] = D4 * Cb + ONE_HALF; - ycbcr->Y_tab[i] = (int32_t)CLAMPw( - Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255), - -128.0F * 32, 128.0F * 32); - } - } - - return 0; -} -#undef HICLAMP -#undef CLAMP -#undef Code2V -#undef SHIFT -#undef ONE_HALF -#undef FIX diff --git a/third_party/libtiff/libtiff/tif_compress.c b/third_party/libtiff/libtiff/tif_compress.c deleted file mode 100644 index c6e17d3..0000000 --- a/third_party/libtiff/libtiff/tif_compress.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Compression Scheme Configuration Support. - */ -#include "tiffiop.h" - -static int TIFFNoEncode(TIFF *tif, const char *method) -{ - const TIFFCodec *c = TIFFFindCODEC(tif->tif_dir.td_compression); - - if (c) - { - TIFFErrorExtR(tif, tif->tif_name, "%s %s encoding is not implemented", - c->name, method); - } - else - { - TIFFErrorExtR(tif, tif->tif_name, - "Compression scheme %" PRIu16 - " %s encoding is not implemented", - tif->tif_dir.td_compression, method); - } - return (-1); -} - -int _TIFFNoRowEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoEncode(tif, "scanline")); -} - -int _TIFFNoStripEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoEncode(tif, "strip")); -} - -int _TIFFNoTileEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoEncode(tif, "tile")); -} - -static int TIFFNoDecode(TIFF *tif, const char *method) -{ - const TIFFCodec *c = TIFFFindCODEC(tif->tif_dir.td_compression); - - if (c) - TIFFErrorExtR(tif, tif->tif_name, "%s %s decoding is not implemented", - c->name, method); - else - TIFFErrorExtR(tif, tif->tif_name, - "Compression scheme %" PRIu16 - " %s decoding is not implemented", - tif->tif_dir.td_compression, method); - return (0); -} - -static int _TIFFNoFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -int _TIFFNoRowDecode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoDecode(tif, "scanline")); -} - -int _TIFFNoStripDecode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoDecode(tif, "strip")); -} - -int _TIFFNoTileDecode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)pp; - (void)cc; - (void)s; - return (TIFFNoDecode(tif, "tile")); -} - -int _TIFFNoSeek(TIFF *tif, uint32_t off) -{ - (void)off; - TIFFErrorExtR(tif, tif->tif_name, - "Compression algorithm does not support random access"); - return (0); -} - -int _TIFFNoPreCode(TIFF *tif, uint16_t s) -{ - (void)tif; - (void)s; - return (1); -} - -static int _TIFFtrue(TIFF *tif) -{ - (void)tif; - return (1); -} -static void _TIFFvoid(TIFF *tif) { (void)tif; } - -void _TIFFSetDefaultCompressionState(TIFF *tif) -{ - tif->tif_fixuptags = _TIFFNoFixupTags; - tif->tif_decodestatus = TRUE; - tif->tif_setupdecode = _TIFFtrue; - tif->tif_predecode = _TIFFNoPreCode; - tif->tif_decoderow = _TIFFNoRowDecode; - tif->tif_decodestrip = _TIFFNoStripDecode; - tif->tif_decodetile = _TIFFNoTileDecode; - tif->tif_encodestatus = TRUE; - tif->tif_setupencode = _TIFFtrue; - tif->tif_preencode = _TIFFNoPreCode; - tif->tif_postencode = _TIFFtrue; - tif->tif_encoderow = _TIFFNoRowEncode; - tif->tif_encodestrip = _TIFFNoStripEncode; - tif->tif_encodetile = _TIFFNoTileEncode; - tif->tif_close = _TIFFvoid; - tif->tif_seek = _TIFFNoSeek; - tif->tif_cleanup = _TIFFvoid; - tif->tif_defstripsize = _TIFFDefaultStripSize; - tif->tif_deftilesize = _TIFFDefaultTileSize; - tif->tif_flags &= ~(TIFF_NOBITREV | TIFF_NOREADRAW); -} - -int TIFFSetCompressionScheme(TIFF *tif, int scheme) -{ - const TIFFCodec *c = TIFFFindCODEC((uint16_t)scheme); - - _TIFFSetDefaultCompressionState(tif); - /* - * Don't treat an unknown compression scheme as an error. - * This permits applications to open files with data that - * the library does not have builtin support for, but which - * may still be meaningful. - */ - return (c ? (*c->init)(tif, scheme) : 1); -} - -/* - * Other compression schemes may be registered. Registered - * schemes can also override the builtin versions provided - * by this library. - */ -typedef struct _codec -{ - struct _codec *next; - TIFFCodec *info; -} codec_t; -static codec_t *registeredCODECS = NULL; - -const TIFFCodec *TIFFFindCODEC(uint16_t scheme) -{ - const TIFFCodec *c; - codec_t *cd; - - for (cd = registeredCODECS; cd; cd = cd->next) - if (cd->info->scheme == scheme) - return ((const TIFFCodec *)cd->info); - for (c = _TIFFBuiltinCODECS; c->name; c++) - if (c->scheme == scheme) - return (c); - return ((const TIFFCodec *)0); -} - -TIFFCodec *TIFFRegisterCODEC(uint16_t scheme, const char *name, - TIFFInitMethod init) -{ - codec_t *cd = (codec_t *)_TIFFmallocExt( - NULL, - (tmsize_t)(sizeof(codec_t) + sizeof(TIFFCodec) + strlen(name) + 1)); - - if (cd != NULL) - { - cd->info = (TIFFCodec *)((uint8_t *)cd + sizeof(codec_t)); - cd->info->name = (char *)((uint8_t *)cd->info + sizeof(TIFFCodec)); - strcpy(cd->info->name, name); - cd->info->scheme = scheme; - cd->info->init = init; - cd->next = registeredCODECS; - registeredCODECS = cd; - } - else - { - TIFFErrorExt(0, "TIFFRegisterCODEC", - "No space to register compression scheme %s", name); - return NULL; - } - return (cd->info); -} - -void TIFFUnRegisterCODEC(TIFFCodec *c) -{ - codec_t *cd; - codec_t **pcd; - - for (pcd = ®isteredCODECS; (cd = *pcd) != NULL; pcd = &cd->next) - if (cd->info == c) - { - *pcd = cd->next; - _TIFFfreeExt(NULL, cd); - return; - } - TIFFErrorExt(0, "TIFFUnRegisterCODEC", - "Cannot remove compression scheme %s; not registered", - c->name); -} - -/************************************************************************/ -/* TIFFGetConfisuredCODECs() */ -/************************************************************************/ - -/** - * Get list of configured codecs, both built-in and registered by user. - * Caller is responsible to free this structure. - * - * @return returns array of TIFFCodec records (the last record should be NULL) - * or NULL if function failed. - */ - -TIFFCodec *TIFFGetConfiguredCODECs() -{ - int i = 1; - codec_t *cd; - const TIFFCodec *c; - TIFFCodec *codecs = NULL; - TIFFCodec *new_codecs; - - for (cd = registeredCODECS; cd; cd = cd->next) - { - new_codecs = - (TIFFCodec *)_TIFFreallocExt(NULL, codecs, i * sizeof(TIFFCodec)); - if (!new_codecs) - { - _TIFFfreeExt(NULL, codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemcpy(codecs + i - 1, cd->info, sizeof(TIFFCodec)); - i++; - } - for (c = _TIFFBuiltinCODECS; c->name; c++) - { - if (TIFFIsCODECConfigured(c->scheme)) - { - new_codecs = (TIFFCodec *)_TIFFreallocExt(NULL, codecs, - i * sizeof(TIFFCodec)); - if (!new_codecs) - { - _TIFFfreeExt(NULL, codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemcpy(codecs + i - 1, (const void *)c, sizeof(TIFFCodec)); - i++; - } - } - - new_codecs = - (TIFFCodec *)_TIFFreallocExt(NULL, codecs, i * sizeof(TIFFCodec)); - if (!new_codecs) - { - _TIFFfreeExt(NULL, codecs); - return NULL; - } - codecs = new_codecs; - _TIFFmemset(codecs + i - 1, 0, sizeof(TIFFCodec)); - - return codecs; -} diff --git a/third_party/libtiff/libtiff/tif_config.h.cmake.in b/third_party/libtiff/libtiff/tif_config.h.cmake.in deleted file mode 100644 index 8fc2466..0000000 --- a/third_party/libtiff/libtiff/tif_config.h.cmake.in +++ /dev/null @@ -1,163 +0,0 @@ -/* clang-format off */ -/* clang-format disabled because CMake scripts are very sensitive to the - * formatting of this file. configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted. - */ - -/* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */ -/* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */ - -#include "tiffconf.h" - -/* Support CCITT Group 3 & 4 algorithms */ -#cmakedefine CCITT_SUPPORT 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* enable partial strip reading for large strips (experimental) */ -#cmakedefine CHUNKY_STRIP_READ_SUPPORT 1 - -/* Support C++ stream API (requires C++ compiler) */ -#cmakedefine CXX_SUPPORT 1 - -/* enable deferred strip/tile offset/size loading (experimental) */ -#cmakedefine DEFER_STRILE_LOAD 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */ -#cmakedefine HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FCNTL_H 1 - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#cmakedefine HAVE_FSEEKO 1 - -/* Define to 1 if you have the `getopt' function. */ -#cmakedefine HAVE_GETOPT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GLUT_GLUT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GLUT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GLU_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GL_GL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IO_H 1 - -/* Define to 1 if you have the `jbg_newlen' function. */ -#cmakedefine HAVE_JBG_NEWLEN 1 - -/* Define to 1 if you have the `mmap' function. */ -#cmakedefine HAVE_MMAP 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENGL_GLU_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENGL_GL_H 1 - -/* Define to 1 if you have the `setmode' function. */ -#cmakedefine HAVE_SETMODE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* 8/12 bit libjpeg dual mode enabled */ -#cmakedefine JPEG_DUAL_MODE_8_12 1 - -/* 8/12 bit dual mode JPEG built into libjpeg-turbo 3.0+ */ -#cmakedefine HAVE_JPEGTURBO_DUAL_MODE_8_12 1 - -/* Support LERC compression */ -#cmakedefine LERC_SUPPORT 1 - -/* Define to 1 when building a static libtiff with LERC enabled. */ -#cmakedefine LERC_STATIC - -/* 12bit libjpeg primary include file with path */ -#define LIBJPEG_12_PATH "@LIBJPEG_12_PATH@" - -/* Support LZMA2 compression */ -#cmakedefine LZMA_SUPPORT 1 - -/* Name of package */ -#define PACKAGE "@PACKAGE_NAME@" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PACKAGE_NAME@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "@PACKAGE_URL@" - -/* Size of size_t */ -#define SIZEOF_SIZE_T @SIZEOF_SIZE_T@ - -/* Default size of the strip in bytes (when strip chopping enabled) */ -#cmakedefine STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@ - -/** Maximum number of TIFF IFDs that libtiff can iterate through in a file. */ -#define TIFF_MAX_DIR_COUNT @TIFF_MAX_DIR_COUNT@ - -/* define to use win32 IO system */ -#cmakedefine USE_WIN32_FILEIO 1 - -/* Support WEBP compression */ -#cmakedefine WEBP_SUPPORT 1 - -/* Support ZSTD compression */ -#cmakedefine ZSTD_SUPPORT 1 - - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# cmakedefine WORDS_BIGENDIAN 1 -# endif -#endif - -#if !defined(__MINGW32__) -# define TIFF_SIZE_FORMAT "zu" -#endif -#if SIZEOF_SIZE_T == 8 -# define TIFF_SSIZE_FORMAT PRId64 -# if defined(__MINGW32__) -# define TIFF_SIZE_FORMAT PRIu64 -# endif -#elif SIZEOF_SIZE_T == 4 -# define TIFF_SSIZE_FORMAT PRId32 -# if defined(__MINGW32__) -# define TIFF_SIZE_FORMAT PRIu32 -# endif -#else -# error "Unsupported size_t size; please submit a bug report" -#endif - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/tif_config.h.in b/third_party/libtiff/libtiff/tif_config.h.in deleted file mode 100644 index 39befe5..0000000 --- a/third_party/libtiff/libtiff/tif_config.h.in +++ /dev/null @@ -1,179 +0,0 @@ -/* clang-format off */ -/* clang-format disabled because CMake scripts are very sensitive to the - * formatting of this file. configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted. - */ - -/* libtiff/tif_config.h.in. Not generated, but originated from autoheader. */ - -#include "tiffconf.h" - -/* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING - -/* enable partial strip reading for large strips (experimental) */ -#undef CHUNKY_STRIP_READ_SUPPORT - -/* Support C++ stream API (requires C++ compiler) */ -#undef CXX_SUPPORT - -/* enable deferred strip/tile offset/size loading */ -#undef DEFER_STRILE_LOAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#undef HAVE_DECL_OPTARG - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `getopt' function. */ -#undef HAVE_GETOPT - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLUT_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_IO_H - -/* Define to 1 if you have the `jbg_newlen' function. */ -#undef HAVE_JBG_NEWLEN - -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENGL_GL_H - -/* Define to 1 if you have the `setmode' function. */ -#undef HAVE_SETMODE - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* 8/12 bit libjpeg dual mode enabled */ -#undef JPEG_DUAL_MODE_8_12 - -/* 8/12 bit dual mode JPEG built into libjpeg-turbo 3.0+ */ -#undef HAVE_JPEGTURBO_DUAL_MODE_8_12 - -/* Support LERC compression */ -#undef LERC_SUPPORT - -/* Define to 1 when building a static libtiff with LERC enabled. */ -#undef LERC_STATIC - -/* 12bit libjpeg primary include file with path */ -#undef LIBJPEG_12_PATH - -/* Support LZMA2 compression */ -#undef LZMA_SUPPORT - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* Default size of the strip in bytes (when strip chopping enabled) */ -#undef STRIP_SIZE_DEFAULT - -/* Maximum number of TIFF IFDs that libtiff can iterate through in a file. */ -#undef TIFF_MAX_DIR_COUNT - -/* define to use win32 IO system */ -#undef USE_WIN32_FILEIO - -/* Support webp compression */ -#undef WEBP_SUPPORT - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Support zstd compression */ -#undef ZSTD_SUPPORT - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -#if !defined(__MINGW32__) -# define TIFF_SIZE_FORMAT "zu" -#endif -#if SIZEOF_SIZE_T == 8 -# define TIFF_SSIZE_FORMAT PRId64 -# if defined(__MINGW32__) -# define TIFF_SIZE_FORMAT PRIu64 -# endif -#elif SIZEOF_SIZE_T == 4 -# define TIFF_SSIZE_FORMAT PRId32 -# if defined(__MINGW32__) -# define TIFF_SIZE_FORMAT PRIu32 -# endif -#else -# error "Unsupported size_t size; please submit a bug report" -#endif - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/tif_dir.c b/third_party/libtiff/libtiff/tif_dir.c deleted file mode 100644 index 7421c73..0000000 --- a/third_party/libtiff/libtiff/tif_dir.c +++ /dev/null @@ -1,2366 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Tag Get & Set Routines. - * (and also some miscellaneous stuff) - */ -#include "tiffiop.h" -#include /*--: for Rational2Double */ -#include - -/* - * These are used in the backwards compatibility code... - */ -#define DATATYPE_VOID 0 /* !untyped data */ -#define DATATYPE_INT 1 /* !signed integer data */ -#define DATATYPE_UINT 2 /* !unsigned integer data */ -#define DATATYPE_IEEEFP 3 /* !IEEE floating point data */ - -static void setByteArray(TIFF *tif, void **vpp, const void *vp, size_t nmemb, - size_t elem_size) -{ - if (*vpp) - { - _TIFFfreeExt(tif, *vpp); - *vpp = 0; - } - if (vp) - { - tmsize_t bytes = _TIFFMultiplySSize(NULL, nmemb, elem_size, NULL); - if (bytes) - *vpp = (void *)_TIFFmallocExt(tif, bytes); - if (*vpp) - _TIFFmemcpy(*vpp, vp, bytes); - } -} -void _TIFFsetByteArray(void **vpp, const void *vp, uint32_t n) -{ - setByteArray(NULL, vpp, vp, n, 1); -} -void _TIFFsetByteArrayExt(TIFF *tif, void **vpp, const void *vp, uint32_t n) -{ - setByteArray(tif, vpp, vp, n, 1); -} - -static void _TIFFsetNString(TIFF *tif, char **cpp, const char *cp, uint32_t n) -{ - setByteArray(tif, (void **)cpp, cp, n, 1); -} - -void _TIFFsetShortArray(uint16_t **wpp, const uint16_t *wp, uint32_t n) -{ - setByteArray(NULL, (void **)wpp, wp, n, sizeof(uint16_t)); -} -void _TIFFsetShortArrayExt(TIFF *tif, uint16_t **wpp, const uint16_t *wp, - uint32_t n) -{ - setByteArray(tif, (void **)wpp, wp, n, sizeof(uint16_t)); -} - -void _TIFFsetLongArray(uint32_t **lpp, const uint32_t *lp, uint32_t n) -{ - setByteArray(NULL, (void **)lpp, lp, n, sizeof(uint32_t)); -} -void _TIFFsetLongArrayExt(TIFF *tif, uint32_t **lpp, const uint32_t *lp, - uint32_t n) -{ - setByteArray(tif, (void **)lpp, lp, n, sizeof(uint32_t)); -} - -static void _TIFFsetLong8Array(TIFF *tif, uint64_t **lpp, const uint64_t *lp, - uint32_t n) -{ - setByteArray(tif, (void **)lpp, lp, n, sizeof(uint64_t)); -} - -void _TIFFsetFloatArray(float **fpp, const float *fp, uint32_t n) -{ - setByteArray(NULL, (void **)fpp, fp, n, sizeof(float)); -} -void _TIFFsetFloatArrayExt(TIFF *tif, float **fpp, const float *fp, uint32_t n) -{ - setByteArray(tif, (void **)fpp, fp, n, sizeof(float)); -} - -void _TIFFsetDoubleArray(double **dpp, const double *dp, uint32_t n) -{ - setByteArray(NULL, (void **)dpp, dp, n, sizeof(double)); -} -void _TIFFsetDoubleArrayExt(TIFF *tif, double **dpp, const double *dp, - uint32_t n) -{ - setByteArray(tif, (void **)dpp, dp, n, sizeof(double)); -} - -static void setDoubleArrayOneValue(TIFF *tif, double **vpp, double value, - size_t nmemb) -{ - if (*vpp) - _TIFFfreeExt(tif, *vpp); - *vpp = _TIFFmallocExt(tif, nmemb * sizeof(double)); - if (*vpp) - { - while (nmemb--) - ((double *)*vpp)[nmemb] = value; - } -} - -/* - * Install extra samples information. - */ -static int setExtraSamples(TIFF *tif, va_list ap, uint32_t *v) -{ -/* XXX: Unassociated alpha data == 999 is a known Corel Draw bug, see below */ -#define EXTRASAMPLE_COREL_UNASSALPHA 999 - - uint16_t *va; - uint32_t i; - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "setExtraSamples"; - - *v = (uint16_t)va_arg(ap, uint16_vap); - if ((uint16_t)*v > td->td_samplesperpixel) - return 0; - va = va_arg(ap, uint16_t *); - if (*v > 0 && va == NULL) /* typically missing param */ - return 0; - for (i = 0; i < *v; i++) - { - if (va[i] > EXTRASAMPLE_UNASSALPHA) - { - /* - * XXX: Corel Draw is known to produce incorrect - * ExtraSamples tags which must be patched here if we - * want to be able to open some of the damaged TIFF - * files: - */ - if (va[i] == EXTRASAMPLE_COREL_UNASSALPHA) - va[i] = EXTRASAMPLE_UNASSALPHA; - else - return 0; - } - } - - if (td->td_transferfunction[0] != NULL && - (td->td_samplesperpixel - *v > 1) && - !(td->td_samplesperpixel - td->td_extrasamples > 1)) - { - TIFFWarningExtR(tif, module, - "ExtraSamples tag value is changing, " - "but TransferFunction was read with a different value. " - "Canceling it"); - TIFFClrFieldBit(tif, FIELD_TRANSFERFUNCTION); - _TIFFfreeExt(tif, td->td_transferfunction[0]); - td->td_transferfunction[0] = NULL; - } - - td->td_extrasamples = (uint16_t)*v; - _TIFFsetShortArrayExt(tif, &td->td_sampleinfo, va, td->td_extrasamples); - return 1; - -#undef EXTRASAMPLE_COREL_UNASSALPHA -} - -/* - * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ -static uint16_t countInkNamesString(TIFF *tif, uint32_t slen, const char *s) -{ - uint16_t i = 0; - - if (slen > 0) - { - const char *ep = s + slen; - const char *cp = s; - do - { - for (; cp < ep && *cp != '\0'; cp++) - { - } - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ - i++; - } while (cp < ep); - return (i); - } -bad: - TIFFErrorExtR(tif, "TIFFSetField", - "%s: Invalid InkNames value; no null at given buffer end " - "location %" PRIu32 ", after %" PRIu16 " ink", - tif->tif_name, slen, i); - return (0); -} - -static int _TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "_TIFFVSetField"; - - TIFFDirectory *td = &tif->tif_dir; - int status = 1; - uint32_t v32, v; - double dblval; - char *s; - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - uint32_t standard_tag = tag; - if (fip == NULL) /* cannot happen since OkToChangeTag() already checks it */ - return 0; - /* - * We want to force the custom code to be used for custom - * fields even if the tag happens to match a well known - * one - important for reinterpreted handling of standard - * tag values in custom directories (i.e. EXIF) - */ - if (fip->field_bit == FIELD_CUSTOM) - { - standard_tag = 0; - } - - switch (standard_tag) - { - case TIFFTAG_SUBFILETYPE: - td->td_subfiletype = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_IMAGEWIDTH: - td->td_imagewidth = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_IMAGELENGTH: - td->td_imagelength = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_BITSPERSAMPLE: - td->td_bitspersample = (uint16_t)va_arg(ap, uint16_vap); - /* - * If the data require post-decoding processing to byte-swap - * samples, set it up here. Note that since tags are required - * to be ordered, compression code can override this behavior - * in the setup method if it wants to roll the post decoding - * work in with its normal work. - */ - if (tif->tif_flags & TIFF_SWAB) - { - if (td->td_bitspersample == 8) - tif->tif_postdecode = _TIFFNoPostDecode; - else if (td->td_bitspersample == 16) - tif->tif_postdecode = _TIFFSwab16BitData; - else if (td->td_bitspersample == 24) - tif->tif_postdecode = _TIFFSwab24BitData; - else if (td->td_bitspersample == 32) - tif->tif_postdecode = _TIFFSwab32BitData; - else if (td->td_bitspersample == 64) - tif->tif_postdecode = _TIFFSwab64BitData; - else if (td->td_bitspersample == 128) /* two 64's */ - tif->tif_postdecode = _TIFFSwab64BitData; - } - break; - case TIFFTAG_COMPRESSION: - v = (uint16_t)va_arg(ap, uint16_vap); - /* - * If we're changing the compression scheme, notify the - * previous module so that it can cleanup any state it's - * setup. - */ - if (TIFFFieldSet(tif, FIELD_COMPRESSION)) - { - if ((uint32_t)td->td_compression == v) - break; - (*tif->tif_cleanup)(tif); - tif->tif_flags &= ~TIFF_CODERSETUP; - } - /* - * Setup new compression routine state. - */ - if ((status = TIFFSetCompressionScheme(tif, v)) != 0) - td->td_compression = (uint16_t)v; - else - status = 0; - break; - case TIFFTAG_PHOTOMETRIC: - td->td_photometric = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_THRESHHOLDING: - td->td_threshholding = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_FILLORDER: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v != FILLORDER_LSB2MSB && v != FILLORDER_MSB2LSB) - goto badvalue; - td->td_fillorder = (uint16_t)v; - break; - case TIFFTAG_ORIENTATION: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) - goto badvalue; - else - td->td_orientation = (uint16_t)v; - break; - case TIFFTAG_SAMPLESPERPIXEL: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v == 0) - goto badvalue; - if (v != td->td_samplesperpixel) - { - /* See http://bugzilla.maptools.org/show_bug.cgi?id=2500 */ - if (td->td_sminsamplevalue != NULL) - { - TIFFWarningExtR(tif, module, - "SamplesPerPixel tag value is changing, " - "but SMinSampleValue tag was read with a " - "different value. Canceling it"); - TIFFClrFieldBit(tif, FIELD_SMINSAMPLEVALUE); - _TIFFfreeExt(tif, td->td_sminsamplevalue); - td->td_sminsamplevalue = NULL; - } - if (td->td_smaxsamplevalue != NULL) - { - TIFFWarningExtR(tif, module, - "SamplesPerPixel tag value is changing, " - "but SMaxSampleValue tag was read with a " - "different value. Canceling it"); - TIFFClrFieldBit(tif, FIELD_SMAXSAMPLEVALUE); - _TIFFfreeExt(tif, td->td_smaxsamplevalue); - td->td_smaxsamplevalue = NULL; - } - /* Test if 3 transfer functions instead of just one are now - needed See http://bugzilla.maptools.org/show_bug.cgi?id=2820 - */ - if (td->td_transferfunction[0] != NULL && - (v - td->td_extrasamples > 1) && - !(td->td_samplesperpixel - td->td_extrasamples > 1)) - { - TIFFWarningExtR(tif, module, - "SamplesPerPixel tag value is changing, " - "but TransferFunction was read with a " - "different value. Canceling it"); - TIFFClrFieldBit(tif, FIELD_TRANSFERFUNCTION); - _TIFFfreeExt(tif, td->td_transferfunction[0]); - td->td_transferfunction[0] = NULL; - } - } - td->td_samplesperpixel = (uint16_t)v; - break; - case TIFFTAG_ROWSPERSTRIP: - v32 = (uint32_t)va_arg(ap, uint32_t); - if (v32 == 0) - goto badvalue32; - td->td_rowsperstrip = v32; - if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) - { - td->td_tilelength = v32; - td->td_tilewidth = td->td_imagewidth; - } - break; - case TIFFTAG_MINSAMPLEVALUE: - td->td_minsamplevalue = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_MAXSAMPLEVALUE: - td->td_maxsamplevalue = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_SMINSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - _TIFFsetDoubleArrayExt(tif, &td->td_sminsamplevalue, - va_arg(ap, double *), - td->td_samplesperpixel); - else - setDoubleArrayOneValue(tif, &td->td_sminsamplevalue, - va_arg(ap, double), - td->td_samplesperpixel); - break; - case TIFFTAG_SMAXSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - _TIFFsetDoubleArrayExt(tif, &td->td_smaxsamplevalue, - va_arg(ap, double *), - td->td_samplesperpixel); - else - setDoubleArrayOneValue(tif, &td->td_smaxsamplevalue, - va_arg(ap, double), - td->td_samplesperpixel); - break; - case TIFFTAG_XRESOLUTION: - dblval = va_arg(ap, double); - if (dblval != dblval || dblval < 0) - goto badvaluedouble; - td->td_xresolution = _TIFFClampDoubleToFloat(dblval); - break; - case TIFFTAG_YRESOLUTION: - dblval = va_arg(ap, double); - if (dblval != dblval || dblval < 0) - goto badvaluedouble; - td->td_yresolution = _TIFFClampDoubleToFloat(dblval); - break; - case TIFFTAG_PLANARCONFIG: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v != PLANARCONFIG_CONTIG && v != PLANARCONFIG_SEPARATE) - goto badvalue; - td->td_planarconfig = (uint16_t)v; - break; - case TIFFTAG_XPOSITION: - td->td_xposition = _TIFFClampDoubleToFloat(va_arg(ap, double)); - break; - case TIFFTAG_YPOSITION: - td->td_yposition = _TIFFClampDoubleToFloat(va_arg(ap, double)); - break; - case TIFFTAG_RESOLUTIONUNIT: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v < RESUNIT_NONE || RESUNIT_CENTIMETER < v) - goto badvalue; - td->td_resolutionunit = (uint16_t)v; - break; - case TIFFTAG_PAGENUMBER: - td->td_pagenumber[0] = (uint16_t)va_arg(ap, uint16_vap); - td->td_pagenumber[1] = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_HALFTONEHINTS: - td->td_halftonehints[0] = (uint16_t)va_arg(ap, uint16_vap); - td->td_halftonehints[1] = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_COLORMAP: - v32 = (uint32_t)(1L << td->td_bitspersample); - _TIFFsetShortArrayExt(tif, &td->td_colormap[0], - va_arg(ap, uint16_t *), v32); - _TIFFsetShortArrayExt(tif, &td->td_colormap[1], - va_arg(ap, uint16_t *), v32); - _TIFFsetShortArrayExt(tif, &td->td_colormap[2], - va_arg(ap, uint16_t *), v32); - break; - case TIFFTAG_EXTRASAMPLES: - if (!setExtraSamples(tif, ap, &v)) - goto badvalue; - break; - case TIFFTAG_MATTEING: - td->td_extrasamples = (((uint16_t)va_arg(ap, uint16_vap)) != 0); - if (td->td_extrasamples) - { - uint16_t sv = EXTRASAMPLE_ASSOCALPHA; - _TIFFsetShortArrayExt(tif, &td->td_sampleinfo, &sv, 1); - } - break; - case TIFFTAG_TILEWIDTH: - v32 = (uint32_t)va_arg(ap, uint32_t); - if (v32 % 16) - { - if (tif->tif_mode != O_RDONLY) - goto badvalue32; - TIFFWarningExtR( - tif, tif->tif_name, - "Nonstandard tile width %" PRIu32 ", convert file", v32); - } - td->td_tilewidth = v32; - tif->tif_flags |= TIFF_ISTILED; - break; - case TIFFTAG_TILELENGTH: - v32 = (uint32_t)va_arg(ap, uint32_t); - if (v32 % 16) - { - if (tif->tif_mode != O_RDONLY) - goto badvalue32; - TIFFWarningExtR( - tif, tif->tif_name, - "Nonstandard tile length %" PRIu32 ", convert file", v32); - } - td->td_tilelength = v32; - tif->tif_flags |= TIFF_ISTILED; - break; - case TIFFTAG_TILEDEPTH: - v32 = (uint32_t)va_arg(ap, uint32_t); - if (v32 == 0) - goto badvalue32; - td->td_tiledepth = v32; - break; - case TIFFTAG_DATATYPE: - v = (uint16_t)va_arg(ap, uint16_vap); - switch (v) - { - case DATATYPE_VOID: - v = SAMPLEFORMAT_VOID; - break; - case DATATYPE_INT: - v = SAMPLEFORMAT_INT; - break; - case DATATYPE_UINT: - v = SAMPLEFORMAT_UINT; - break; - case DATATYPE_IEEEFP: - v = SAMPLEFORMAT_IEEEFP; - break; - default: - goto badvalue; - } - td->td_sampleformat = (uint16_t)v; - break; - case TIFFTAG_SAMPLEFORMAT: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v < SAMPLEFORMAT_UINT || SAMPLEFORMAT_COMPLEXIEEEFP < v) - goto badvalue; - td->td_sampleformat = (uint16_t)v; - - /* Try to fix up the SWAB function for complex data. */ - if (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT && - td->td_bitspersample == 32 && - tif->tif_postdecode == _TIFFSwab32BitData) - tif->tif_postdecode = _TIFFSwab16BitData; - else if ((td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT || - td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP) && - td->td_bitspersample == 64 && - tif->tif_postdecode == _TIFFSwab64BitData) - tif->tif_postdecode = _TIFFSwab32BitData; - break; - case TIFFTAG_IMAGEDEPTH: - td->td_imagedepth = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_SUBIFD: - if ((tif->tif_flags & TIFF_INSUBIFD) == 0) - { - td->td_nsubifd = (uint16_t)va_arg(ap, uint16_vap); - _TIFFsetLong8Array(tif, &td->td_subifd, - (uint64_t *)va_arg(ap, uint64_t *), - (uint32_t)td->td_nsubifd); - } - else - { - TIFFErrorExtR(tif, module, "%s: Sorry, cannot nest SubIFDs", - tif->tif_name); - status = 0; - } - break; - case TIFFTAG_YCBCRPOSITIONING: - td->td_ycbcrpositioning = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_YCBCRSUBSAMPLING: - td->td_ycbcrsubsampling[0] = (uint16_t)va_arg(ap, uint16_vap); - td->td_ycbcrsubsampling[1] = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_TRANSFERFUNCTION: - { - uint32_t i; - v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1; - for (i = 0; i < v; i++) - _TIFFsetShortArrayExt(tif, &td->td_transferfunction[i], - va_arg(ap, uint16_t *), - 1U << td->td_bitspersample); - break; - } - case TIFFTAG_REFERENCEBLACKWHITE: - /* XXX should check for null range */ - _TIFFsetFloatArrayExt(tif, &td->td_refblackwhite, - va_arg(ap, float *), 6); - break; - case TIFFTAG_INKNAMES: - { - v = (uint16_t)va_arg(ap, uint16_vap); - s = va_arg(ap, char *); - uint16_t ninksinstring; - ninksinstring = countInkNamesString(tif, v, s); - status = ninksinstring > 0; - if (ninksinstring > 0) - { - _TIFFsetNString(tif, &td->td_inknames, s, v); - td->td_inknameslen = v; - /* Set NumberOfInks to the value ninksinstring */ - if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) - { - if (td->td_numberofinks != ninksinstring) - { - TIFFErrorExtR( - tif, module, - "Warning %s; Tag %s:\n Value %" PRIu16 - " of NumberOfInks is different from the number of " - "inks %" PRIu16 - ".\n -> NumberOfInks value adapted to %" PRIu16 "", - tif->tif_name, fip->field_name, td->td_numberofinks, - ninksinstring, ninksinstring); - td->td_numberofinks = ninksinstring; - } - } - else - { - td->td_numberofinks = ninksinstring; - TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); - } - if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) - { - if (td->td_numberofinks != td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, - "Warning %s; Tag %s:\n Value %" PRIu16 - " of NumberOfInks is different from the " - "SamplesPerPixel value %" PRIu16 "", - tif->tif_name, fip->field_name, - td->td_numberofinks, - td->td_samplesperpixel); - } - } - } - } - break; - case TIFFTAG_NUMBEROFINKS: - v = (uint16_t)va_arg(ap, uint16_vap); - /* If InkNames already set also NumberOfInks is set accordingly and - * should be equal */ - if (TIFFFieldSet(tif, FIELD_INKNAMES)) - { - if (v != td->td_numberofinks) - { - TIFFErrorExtR( - tif, module, - "Error %s; Tag %s:\n It is not possible to set the " - "value %" PRIu32 - " for NumberOfInks\n which is different from the " - "number of inks in the InkNames tag (%" PRIu16 ")", - tif->tif_name, fip->field_name, v, td->td_numberofinks); - /* Do not set / overwrite number of inks already set by - * InkNames case accordingly. */ - status = 0; - } - } - else - { - td->td_numberofinks = (uint16_t)v; - if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) - { - if (td->td_numberofinks != td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, - "Warning %s; Tag %s:\n Value %" PRIu32 - " of NumberOfInks is different from the " - "SamplesPerPixel value %" PRIu16 "", - tif->tif_name, fip->field_name, v, - td->td_samplesperpixel); - } - } - } - break; - case TIFFTAG_PERSAMPLE: - v = (uint16_t)va_arg(ap, uint16_vap); - if (v == PERSAMPLE_MULTI) - tif->tif_flags |= TIFF_PERSAMPLE; - else - tif->tif_flags &= ~TIFF_PERSAMPLE; - break; - default: - { - TIFFTagValue *tv; - int tv_size, iCustom; - - /* - * This can happen if multiple images are open with different - * codecs which have private tags. The global tag information - * table may then have tags that are valid for one file but not - * the other. If the client tries to set a tag that is not valid - * for the image's codec then we'll arrive here. This - * happens, for example, when tiffcp is used to convert between - * compression schemes and codec-specific tags are blindly copied. - * - * This also happens when a FIELD_IGNORE tag is written. - */ - if (fip->field_bit == FIELD_IGNORE) - { - TIFFErrorExtR( - tif, module, - "%s: Ignored %stag \"%s\" (not supported by libtiff)", - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip->field_name); - status = 0; - break; - } - if (fip->field_bit != FIELD_CUSTOM) - { - TIFFErrorExtR( - tif, module, - "%s: Invalid %stag \"%s\" (not supported by codec)", - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip->field_name); - status = 0; - break; - } - - /* - * Find the existing entry for this custom value. - */ - tv = NULL; - for (iCustom = 0; iCustom < td->td_customValueCount; iCustom++) - { - if (td->td_customValues[iCustom].info->field_tag == tag) - { - tv = td->td_customValues + iCustom; - if (tv->value != NULL) - { - _TIFFfreeExt(tif, tv->value); - tv->value = NULL; - } - break; - } - } - - /* - * Grow the custom list if the entry was not found. - */ - if (tv == NULL) - { - TIFFTagValue *new_customValues; - - new_customValues = (TIFFTagValue *)_TIFFreallocExt( - tif, td->td_customValues, - sizeof(TIFFTagValue) * (td->td_customValueCount + 1)); - if (!new_customValues) - { - TIFFErrorExtR(tif, module, - "%s: Failed to allocate space for list of " - "custom values", - tif->tif_name); - status = 0; - goto end; - } - - td->td_customValueCount++; - td->td_customValues = new_customValues; - - tv = td->td_customValues + (td->td_customValueCount - 1); - tv->info = fip; - tv->value = NULL; - tv->count = 0; - } - - /* - * Set custom value ... save a copy of the custom tag value. - */ - /*--: Rational2Double: For Rationals evaluate "set_get_field_type" - * to determine internal storage size. */ - tv_size = TIFFFieldSetGetSize(fip); - if (tv_size == 0) - { - status = 0; - TIFFErrorExtR(tif, module, "%s: Bad field type %d for \"%s\"", - tif->tif_name, fip->field_type, fip->field_name); - goto end; - } - - if (fip->field_type == TIFF_ASCII) - { - uint32_t ma; - const char *mb; - if (fip->field_passcount) - { - assert(fip->field_writecount == TIFF_VARIABLE2); - ma = (uint32_t)va_arg(ap, uint32_t); - mb = (const char *)va_arg(ap, const char *); - } - else - { - mb = (const char *)va_arg(ap, const char *); - size_t len = strlen(mb) + 1; - if (len >= 0x80000000U) - { - status = 0; - TIFFErrorExtR(tif, module, - "%s: Too long string value for \"%s\". " - "Maximum supported is 2147483647 bytes", - tif->tif_name, fip->field_name); - goto end; - } - ma = (uint32_t)len; - } - tv->count = ma; - setByteArray(tif, &tv->value, mb, ma, 1); - } - else - { - if (fip->field_passcount) - { - if (fip->field_writecount == TIFF_VARIABLE2) - tv->count = (uint32_t)va_arg(ap, uint32_t); - else - tv->count = (int)va_arg(ap, int); - } - else if (fip->field_writecount == TIFF_VARIABLE || - fip->field_writecount == TIFF_VARIABLE2) - tv->count = 1; - else if (fip->field_writecount == TIFF_SPP) - tv->count = td->td_samplesperpixel; - else - tv->count = fip->field_writecount; - - if (tv->count == 0) - { - TIFFWarningExtR(tif, module, - "%s: Null count for \"%s\" (type " - "%d, writecount %d, passcount %d)", - tif->tif_name, fip->field_name, - fip->field_type, fip->field_writecount, - fip->field_passcount); - break; - } - - tv->value = _TIFFCheckMalloc(tif, tv->count, tv_size, - "custom tag binary object"); - if (!tv->value) - { - status = 0; - goto end; - } - - if (fip->field_tag == TIFFTAG_DOTRANGE && - strcmp(fip->field_name, "DotRange") == 0) - { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - uint16_t v2[2]; - v2[0] = (uint16_t)va_arg(ap, int); - v2[1] = (uint16_t)va_arg(ap, int); - _TIFFmemcpy(tv->value, &v2, 4); - } - - else if (fip->field_passcount || - fip->field_writecount == TIFF_VARIABLE || - fip->field_writecount == TIFF_VARIABLE2 || - fip->field_writecount == TIFF_SPP || tv->count > 1) - { - /*--: Rational2Double: For Rationals tv_size is set above to - * 4 or 8 according to fip->set_get_field_type! */ - _TIFFmemcpy(tv->value, va_arg(ap, void *), - tv->count * tv_size); - /* Test here for too big values for LONG8, SLONG8 in - * ClassicTIFF and delete custom field from custom list */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (tv->info->field_type == TIFF_LONG8) - { - uint64_t *pui64 = (uint64_t *)tv->value; - for (int i = 0; i < tv->count; i++) - { - if (pui64[i] > 0xffffffffu) - { - TIFFErrorExtR( - tif, module, - "%s: Bad LONG8 value %" PRIu64 - " at %d. array position for \"%s\" tag " - "%d in ClassicTIFF. Tag won't be " - "written to file", - tif->tif_name, pui64[i], i, - fip->field_name, tag); - goto badvalueifd8long8; - } - } - } - else if (tv->info->field_type == TIFF_SLONG8) - { - int64_t *pi64 = (int64_t *)tv->value; - for (int i = 0; i < tv->count; i++) - { - if (pi64[i] > 2147483647 || - pi64[i] < (-2147483647 - 1)) - { - TIFFErrorExtR( - tif, module, - "%s: Bad SLONG8 value %" PRIi64 - " at %d. array position for \"%s\" tag " - "%d in ClassicTIFF. Tag won't be " - "written to file", - tif->tif_name, pi64[i], i, - fip->field_name, tag); - goto badvalueifd8long8; - } - } - } - } - } - else - { - char *val = (char *)tv->value; - assert(tv->count == 1); - - switch (fip->field_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - { - uint8_t v2 = (uint8_t)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SBYTE: - { - int8_t v2 = (int8_t)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SHORT: - { - uint16_t v2 = (uint16_t)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SSHORT: - { - int16_t v2 = (int16_t)va_arg(ap, int); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_LONG: - case TIFF_IFD: - { - uint32_t v2 = va_arg(ap, uint32_t); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_SLONG: - { - int32_t v2 = va_arg(ap, int32_t); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_LONG8: - case TIFF_IFD8: - { - uint64_t v2 = va_arg(ap, uint64_t); - _TIFFmemcpy(val, &v2, tv_size); - /* Test here for too big values for ClassicTIFF and - * delete custom field from custom list */ - if (!(tif->tif_flags & TIFF_BIGTIFF) && - (v2 > 0xffffffffu)) - { - TIFFErrorExtR( - tif, module, - "%s: Bad LONG8 or IFD8 value %" PRIu64 - " for \"%s\" tag %d in ClassicTIFF. Tag " - "won't be written to file", - tif->tif_name, v2, fip->field_name, tag); - goto badvalueifd8long8; - } - } - break; - case TIFF_SLONG8: - { - int64_t v2 = va_arg(ap, int64_t); - _TIFFmemcpy(val, &v2, tv_size); - /* Test here for too big values for ClassicTIFF and - * delete custom field from custom list */ - if (!(tif->tif_flags & TIFF_BIGTIFF) && - ((v2 > 2147483647) || (v2 < (-2147483647 - 1)))) - { - TIFFErrorExtR( - tif, module, - "%s: Bad SLONG8 value %" PRIi64 - " for \"%s\" tag %d in ClassicTIFF. Tag " - "won't be written to file", - tif->tif_name, v2, fip->field_name, tag); - goto badvalueifd8long8; - } - } - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - /*-- Rational2Double: For Rationals tv_size is set - * above to 4 or 8 according to - * fip->set_get_field_type! - */ - { - if (tv_size == 8) - { - double v2 = va_arg(ap, double); - _TIFFmemcpy(val, &v2, tv_size); - } - else - { - /*-- default should be tv_size == 4 */ - float v3 = (float)va_arg(ap, double); - _TIFFmemcpy(val, &v3, tv_size); - /*-- ToDo: After Testing, this should be - * removed and tv_size==4 should be set as - * default. */ - if (tv_size != 4) - { - TIFFErrorExtR(tif, module, - "Rational2Double: " - ".set_get_field_type " - "in not 4 but %d", - tv_size); - } - } - } - break; - case TIFF_FLOAT: - { - float v2 = - _TIFFClampDoubleToFloat(va_arg(ap, double)); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - case TIFF_DOUBLE: - { - double v2 = va_arg(ap, double); - _TIFFmemcpy(val, &v2, tv_size); - } - break; - default: - _TIFFmemset(val, 0, tv_size); - status = 0; - break; - } - } - } - } - } - if (status) - { - const TIFFField *fip2 = TIFFFieldWithTag(tif, tag); - if (fip2) - TIFFSetFieldBit(tif, fip2->field_bit); - tif->tif_flags |= TIFF_DIRTYDIRECT; - } - -end: - va_end(ap); - return (status); -badvalue: -{ - const TIFFField *fip2 = TIFFFieldWithTag(tif, tag); - TIFFErrorExtR(tif, module, "%s: Bad value %" PRIu32 " for \"%s\" tag", - tif->tif_name, v, fip2 ? fip2->field_name : "Unknown"); - va_end(ap); -} - return (0); -badvalue32: -{ - const TIFFField *fip2 = TIFFFieldWithTag(tif, tag); - TIFFErrorExtR(tif, module, "%s: Bad value %" PRIu32 " for \"%s\" tag", - tif->tif_name, v32, fip2 ? fip2->field_name : "Unknown"); - va_end(ap); -} - return (0); -badvaluedouble: -{ - const TIFFField *fip2 = TIFFFieldWithTag(tif, tag); - TIFFErrorExtR(tif, module, "%s: Bad value %f for \"%s\" tag", tif->tif_name, - dblval, fip2 ? fip2->field_name : "Unknown"); - va_end(ap); -} - return (0); -badvalueifd8long8: -{ - /* Error message issued already above. */ - TIFFTagValue *tv2 = NULL; - int iCustom2, iC2; - /* Find the existing entry for this custom value. */ - for (iCustom2 = 0; iCustom2 < td->td_customValueCount; iCustom2++) - { - if (td->td_customValues[iCustom2].info->field_tag == tag) - { - tv2 = td->td_customValues + (iCustom2); - break; - } - } - if (tv2 != NULL) - { - /* Remove custom field from custom list */ - if (tv2->value != NULL) - { - _TIFFfreeExt(tif, tv2->value); - tv2->value = NULL; - } - /* Shorten list and close gap in customValues list. - * Re-allocation of td_customValues not necessary here. */ - td->td_customValueCount--; - for (iC2 = iCustom2; iC2 < td->td_customValueCount; iC2++) - { - td->td_customValues[iC2] = td->td_customValues[iC2 + 1]; - } - } - else - { - assert(0); - } - va_end(ap); -} - return (0); -} /*-- _TIFFVSetField() --*/ - -/* - * Return 1/0 according to whether or not - * it is permissible to set the tag's value. - * Note that we allow ImageLength to be changed - * so that we can append and extend to images. - * Any other tag may not be altered once writing - * has commenced, unless its value has no effect - * on the format of the data that is written. - */ -static int OkToChangeTag(TIFF *tif, uint32_t tag) -{ - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - if (!fip) - { /* unknown tag */ - TIFFErrorExtR(tif, "TIFFSetField", "%s: Unknown %stag %" PRIu32, - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag); - return (0); - } - if (tag != TIFFTAG_IMAGELENGTH && (tif->tif_flags & TIFF_BEENWRITING) && - !fip->field_oktochange) - { - /* - * Consult info table to see if tag can be changed - * after we've started writing. We only allow changes - * to those tags that don't/shouldn't affect the - * compression and/or format of the data. - */ - TIFFErrorExtR(tif, "TIFFSetField", - "%s: Cannot modify tag \"%s\" while writing", - tif->tif_name, fip->field_name); - return (0); - } - return (1); -} - -/* - * Record the value of a field in the - * internal directory structure. The - * field will be written to the file - * when/if the directory structure is - * updated. - */ -int TIFFSetField(TIFF *tif, uint32_t tag, ...) -{ - va_list ap; - int status; - - va_start(ap, tag); - status = TIFFVSetField(tif, tag, ap); - va_end(ap); - return (status); -} - -/* - * Clear the contents of the field in the internal structure. - */ -int TIFFUnsetField(TIFF *tif, uint32_t tag) -{ - const TIFFField *fip = TIFFFieldWithTag(tif, tag); - TIFFDirectory *td = &tif->tif_dir; - - if (!fip) - return 0; - - if (fip->field_bit != FIELD_CUSTOM) - TIFFClrFieldBit(tif, fip->field_bit); - else - { - TIFFTagValue *tv = NULL; - int i; - - for (i = 0; i < td->td_customValueCount; i++) - { - - tv = td->td_customValues + i; - if (tv->info->field_tag == tag) - break; - } - - if (i < td->td_customValueCount) - { - _TIFFfreeExt(tif, tv->value); - for (; i < td->td_customValueCount - 1; i++) - { - td->td_customValues[i] = td->td_customValues[i + 1]; - } - td->td_customValueCount--; - } - } - - tif->tif_flags |= TIFF_DIRTYDIRECT; - - return (1); -} - -/* - * Like TIFFSetField, but taking a varargs - * parameter list. This routine is useful - * for building higher-level interfaces on - * top of the library. - */ -int TIFFVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - return OkToChangeTag(tif, tag) - ? (*tif->tif_tagmethods.vsetfield)(tif, tag, ap) - : 0; -} - -static int _TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - TIFFDirectory *td = &tif->tif_dir; - int ret_val = 1; - uint32_t standard_tag = tag; - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - if (fip == NULL) /* cannot happen since TIFFGetField() already checks it */ - return 0; - - /* - * We want to force the custom code to be used for custom - * fields even if the tag happens to match a well known - * one - important for reinterpreted handling of standard - * tag values in custom directories (i.e. EXIF) - */ - if (fip->field_bit == FIELD_CUSTOM) - { - standard_tag = 0; - } - - switch (standard_tag) - { - case TIFFTAG_SUBFILETYPE: - *va_arg(ap, uint32_t *) = td->td_subfiletype; - break; - case TIFFTAG_IMAGEWIDTH: - *va_arg(ap, uint32_t *) = td->td_imagewidth; - break; - case TIFFTAG_IMAGELENGTH: - *va_arg(ap, uint32_t *) = td->td_imagelength; - break; - case TIFFTAG_BITSPERSAMPLE: - *va_arg(ap, uint16_t *) = td->td_bitspersample; - break; - case TIFFTAG_COMPRESSION: - *va_arg(ap, uint16_t *) = td->td_compression; - break; - case TIFFTAG_PHOTOMETRIC: - *va_arg(ap, uint16_t *) = td->td_photometric; - break; - case TIFFTAG_THRESHHOLDING: - *va_arg(ap, uint16_t *) = td->td_threshholding; - break; - case TIFFTAG_FILLORDER: - *va_arg(ap, uint16_t *) = td->td_fillorder; - break; - case TIFFTAG_ORIENTATION: - *va_arg(ap, uint16_t *) = td->td_orientation; - break; - case TIFFTAG_SAMPLESPERPIXEL: - *va_arg(ap, uint16_t *) = td->td_samplesperpixel; - break; - case TIFFTAG_ROWSPERSTRIP: - *va_arg(ap, uint32_t *) = td->td_rowsperstrip; - break; - case TIFFTAG_MINSAMPLEVALUE: - *va_arg(ap, uint16_t *) = td->td_minsamplevalue; - break; - case TIFFTAG_MAXSAMPLEVALUE: - *va_arg(ap, uint16_t *) = td->td_maxsamplevalue; - break; - case TIFFTAG_SMINSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - *va_arg(ap, double **) = td->td_sminsamplevalue; - else - { - /* libtiff historically treats this as a single value. */ - uint16_t i; - double v = td->td_sminsamplevalue[0]; - for (i = 1; i < td->td_samplesperpixel; ++i) - if (td->td_sminsamplevalue[i] < v) - v = td->td_sminsamplevalue[i]; - *va_arg(ap, double *) = v; - } - break; - case TIFFTAG_SMAXSAMPLEVALUE: - if (tif->tif_flags & TIFF_PERSAMPLE) - *va_arg(ap, double **) = td->td_smaxsamplevalue; - else - { - /* libtiff historically treats this as a single value. */ - uint16_t i; - double v = td->td_smaxsamplevalue[0]; - for (i = 1; i < td->td_samplesperpixel; ++i) - if (td->td_smaxsamplevalue[i] > v) - v = td->td_smaxsamplevalue[i]; - *va_arg(ap, double *) = v; - } - break; - case TIFFTAG_XRESOLUTION: - *va_arg(ap, float *) = td->td_xresolution; - break; - case TIFFTAG_YRESOLUTION: - *va_arg(ap, float *) = td->td_yresolution; - break; - case TIFFTAG_PLANARCONFIG: - *va_arg(ap, uint16_t *) = td->td_planarconfig; - break; - case TIFFTAG_XPOSITION: - *va_arg(ap, float *) = td->td_xposition; - break; - case TIFFTAG_YPOSITION: - *va_arg(ap, float *) = td->td_yposition; - break; - case TIFFTAG_RESOLUTIONUNIT: - *va_arg(ap, uint16_t *) = td->td_resolutionunit; - break; - case TIFFTAG_PAGENUMBER: - *va_arg(ap, uint16_t *) = td->td_pagenumber[0]; - *va_arg(ap, uint16_t *) = td->td_pagenumber[1]; - break; - case TIFFTAG_HALFTONEHINTS: - *va_arg(ap, uint16_t *) = td->td_halftonehints[0]; - *va_arg(ap, uint16_t *) = td->td_halftonehints[1]; - break; - case TIFFTAG_COLORMAP: - *va_arg(ap, const uint16_t **) = td->td_colormap[0]; - *va_arg(ap, const uint16_t **) = td->td_colormap[1]; - *va_arg(ap, const uint16_t **) = td->td_colormap[2]; - break; - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_TILEOFFSETS: - _TIFFFillStriles(tif); - *va_arg(ap, const uint64_t **) = td->td_stripoffset_p; - if (td->td_stripoffset_p == NULL) - ret_val = 0; - break; - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEBYTECOUNTS: - _TIFFFillStriles(tif); - *va_arg(ap, const uint64_t **) = td->td_stripbytecount_p; - if (td->td_stripbytecount_p == NULL) - ret_val = 0; - break; - case TIFFTAG_MATTEING: - *va_arg(ap, uint16_t *) = - (td->td_extrasamples == 1 && - td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); - break; - case TIFFTAG_EXTRASAMPLES: - *va_arg(ap, uint16_t *) = td->td_extrasamples; - *va_arg(ap, const uint16_t **) = td->td_sampleinfo; - break; - case TIFFTAG_TILEWIDTH: - *va_arg(ap, uint32_t *) = td->td_tilewidth; - break; - case TIFFTAG_TILELENGTH: - *va_arg(ap, uint32_t *) = td->td_tilelength; - break; - case TIFFTAG_TILEDEPTH: - *va_arg(ap, uint32_t *) = td->td_tiledepth; - break; - case TIFFTAG_DATATYPE: - switch (td->td_sampleformat) - { - case SAMPLEFORMAT_UINT: - *va_arg(ap, uint16_t *) = DATATYPE_UINT; - break; - case SAMPLEFORMAT_INT: - *va_arg(ap, uint16_t *) = DATATYPE_INT; - break; - case SAMPLEFORMAT_IEEEFP: - *va_arg(ap, uint16_t *) = DATATYPE_IEEEFP; - break; - case SAMPLEFORMAT_VOID: - *va_arg(ap, uint16_t *) = DATATYPE_VOID; - break; - } - break; - case TIFFTAG_SAMPLEFORMAT: - *va_arg(ap, uint16_t *) = td->td_sampleformat; - break; - case TIFFTAG_IMAGEDEPTH: - *va_arg(ap, uint32_t *) = td->td_imagedepth; - break; - case TIFFTAG_SUBIFD: - *va_arg(ap, uint16_t *) = td->td_nsubifd; - *va_arg(ap, const uint64_t **) = td->td_subifd; - break; - case TIFFTAG_YCBCRPOSITIONING: - *va_arg(ap, uint16_t *) = td->td_ycbcrpositioning; - break; - case TIFFTAG_YCBCRSUBSAMPLING: - *va_arg(ap, uint16_t *) = td->td_ycbcrsubsampling[0]; - *va_arg(ap, uint16_t *) = td->td_ycbcrsubsampling[1]; - break; - case TIFFTAG_TRANSFERFUNCTION: - *va_arg(ap, const uint16_t **) = td->td_transferfunction[0]; - if (td->td_samplesperpixel - td->td_extrasamples > 1) - { - *va_arg(ap, const uint16_t **) = td->td_transferfunction[1]; - *va_arg(ap, const uint16_t **) = td->td_transferfunction[2]; - } - else - { - *va_arg(ap, const uint16_t **) = NULL; - *va_arg(ap, const uint16_t **) = NULL; - } - break; - case TIFFTAG_REFERENCEBLACKWHITE: - *va_arg(ap, const float **) = td->td_refblackwhite; - break; - case TIFFTAG_INKNAMES: - *va_arg(ap, const char **) = td->td_inknames; - break; - case TIFFTAG_NUMBEROFINKS: - *va_arg(ap, uint16_t *) = td->td_numberofinks; - break; - default: - { - int i; - - /* - * This can happen if multiple images are open - * with different codecs which have private - * tags. The global tag information table may - * then have tags that are valid for one file - * but not the other. If the client tries to - * get a tag that is not valid for the image's - * codec then we'll arrive here. - */ - if (fip->field_bit != FIELD_CUSTOM) - { - TIFFErrorExtR(tif, "_TIFFVGetField", - "%s: Invalid %stag \"%s\" " - "(not supported by codec)", - tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip->field_name); - ret_val = 0; - break; - } - - /* - * Do we have a custom value? - */ - ret_val = 0; - for (i = 0; i < td->td_customValueCount; i++) - { - TIFFTagValue *tv = td->td_customValues + i; - - if (tv->info->field_tag != tag) - continue; - - if (fip->field_passcount) - { - if (fip->field_readcount == TIFF_VARIABLE2) - *va_arg(ap, uint32_t *) = (uint32_t)tv->count; - else /* Assume TIFF_VARIABLE */ - *va_arg(ap, uint16_t *) = (uint16_t)tv->count; - *va_arg(ap, const void **) = tv->value; - ret_val = 1; - } - else if (fip->field_tag == TIFFTAG_DOTRANGE && - strcmp(fip->field_name, "DotRange") == 0) - { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - *va_arg(ap, uint16_t *) = ((uint16_t *)tv->value)[0]; - *va_arg(ap, uint16_t *) = ((uint16_t *)tv->value)[1]; - ret_val = 1; - } - else - { - if (fip->field_type == TIFF_ASCII || - fip->field_readcount == TIFF_VARIABLE || - fip->field_readcount == TIFF_VARIABLE2 || - fip->field_readcount == TIFF_SPP || tv->count > 1) - { - *va_arg(ap, void **) = tv->value; - ret_val = 1; - } - else - { - char *val = (char *)tv->value; - assert(tv->count == 1); - switch (fip->field_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - *va_arg(ap, uint8_t *) = *(uint8_t *)val; - ret_val = 1; - break; - case TIFF_SBYTE: - *va_arg(ap, int8_t *) = *(int8_t *)val; - ret_val = 1; - break; - case TIFF_SHORT: - *va_arg(ap, uint16_t *) = *(uint16_t *)val; - ret_val = 1; - break; - case TIFF_SSHORT: - *va_arg(ap, int16_t *) = *(int16_t *)val; - ret_val = 1; - break; - case TIFF_LONG: - case TIFF_IFD: - *va_arg(ap, uint32_t *) = *(uint32_t *)val; - ret_val = 1; - break; - case TIFF_SLONG: - *va_arg(ap, int32_t *) = *(int32_t *)val; - ret_val = 1; - break; - case TIFF_LONG8: - case TIFF_IFD8: - *va_arg(ap, uint64_t *) = *(uint64_t *)val; - ret_val = 1; - break; - case TIFF_SLONG8: - *va_arg(ap, int64_t *) = *(int64_t *)val; - ret_val = 1; - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - { - /*-- Rational2Double: For Rationals evaluate - * "set_get_field_type" to determine internal - * storage size and return value size. */ - int tv_size = TIFFFieldSetGetSize(fip); - if (tv_size == 8) - { - *va_arg(ap, double *) = *(double *)val; - ret_val = 1; - } - else - { - /*-- default should be tv_size == 4 */ - *va_arg(ap, float *) = *(float *)val; - ret_val = 1; - /*-- ToDo: After Testing, this should be - * removed and tv_size==4 should be set as - * default. */ - if (tv_size != 4) - { - TIFFErrorExtR(tif, "_TIFFVGetField", - "Rational2Double: " - ".set_get_field_type " - "in not 4 but %d", - tv_size); - } - } - } - break; - case TIFF_FLOAT: - *va_arg(ap, float *) = *(float *)val; - ret_val = 1; - break; - case TIFF_DOUBLE: - *va_arg(ap, double *) = *(double *)val; - ret_val = 1; - break; - default: - ret_val = 0; - break; - } - } - } - break; - } - } - } - return (ret_val); -} - -/* - * Return the value of a field in the - * internal directory structure. - */ -int TIFFGetField(TIFF *tif, uint32_t tag, ...) -{ - int status; - va_list ap; - - va_start(ap, tag); - status = TIFFVGetField(tif, tag, ap); - va_end(ap); - return (status); -} - -/* - * Like TIFFGetField, but taking a varargs - * parameter list. This routine is useful - * for building higher-level interfaces on - * top of the library. - */ -int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit)) - ? (*tif->tif_tagmethods.vgetfield)(tif, tag, ap) - : 0); -} - -#define CleanupField(member) \ - { \ - if (td->member) \ - { \ - _TIFFfreeExt(tif, td->member); \ - td->member = 0; \ - } \ - } - -/* - * Release storage associated with a directory. - */ -void TIFFFreeDirectory(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - int i; - - (*tif->tif_cleanup)(tif); - _TIFFmemset(td->td_fieldsset, 0, sizeof(td->td_fieldsset)); - CleanupField(td_sminsamplevalue); - CleanupField(td_smaxsamplevalue); - CleanupField(td_colormap[0]); - CleanupField(td_colormap[1]); - CleanupField(td_colormap[2]); - CleanupField(td_sampleinfo); - CleanupField(td_subifd); - CleanupField(td_inknames); - CleanupField(td_refblackwhite); - CleanupField(td_transferfunction[0]); - CleanupField(td_transferfunction[1]); - CleanupField(td_transferfunction[2]); - CleanupField(td_stripoffset_p); - CleanupField(td_stripbytecount_p); - td->td_stripoffsetbyteallocsize = 0; - TIFFClrFieldBit(tif, FIELD_YCBCRSUBSAMPLING); - TIFFClrFieldBit(tif, FIELD_YCBCRPOSITIONING); - - /* Cleanup custom tag values */ - for (i = 0; i < td->td_customValueCount; i++) - { - if (td->td_customValues[i].value) - _TIFFfreeExt(tif, td->td_customValues[i].value); - } - - td->td_customValueCount = 0; - CleanupField(td_customValues); - - _TIFFmemset(&(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); - _TIFFmemset(&(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); - - /* Reset some internal parameters for IFD data size checking. */ - tif->tif_dir.td_dirdatasize_read = 0; - tif->tif_dir.td_dirdatasize_write = 0; - if (tif->tif_dir.td_dirdatasize_offsets != NULL) - { - _TIFFfreeExt(tif, tif->tif_dir.td_dirdatasize_offsets); - tif->tif_dir.td_dirdatasize_offsets = NULL; - tif->tif_dir.td_dirdatasize_Noffsets = 0; - } - tif->tif_dir.td_iswrittentofile = FALSE; -} -#undef CleanupField - -/* - * Client Tag extension support (from Niles Ritter). - */ -static TIFFExtendProc _TIFFextender = (TIFFExtendProc)NULL; - -TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc extender) -{ - TIFFExtendProc prev = _TIFFextender; - _TIFFextender = extender; - return (prev); -} - -/* - * Setup for a new directory. Should we automatically call - * TIFFWriteDirectory() if the current one is dirty? - * - * The newly created directory will not exist on the file till - * TIFFWriteDirectory(), TIFFFlush() or TIFFClose() is called. - */ -int TIFFCreateDirectory(TIFF *tif) -{ - /* Free previously allocated memory and setup default values. */ - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - tif->tif_diroff = 0; - tif->tif_nextdiroff = 0; - tif->tif_curoff = 0; - tif->tif_row = (uint32_t)-1; - tif->tif_curstrip = (uint32_t)-1; - tif->tif_dir.td_iswrittentofile = FALSE; - - return 0; -} - -int TIFFCreateCustomDirectory(TIFF *tif, const TIFFFieldArray *infoarray) -{ - /* Free previously allocated memory and setup default values. */ - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - - /* - * Reset the field definitions to match the application provided list. - * Hopefully TIFFDefaultDirectory() won't have done anything irreversible - * based on it's assumption this is an image directory. - */ - _TIFFSetupFields(tif, infoarray); - - tif->tif_diroff = 0; - tif->tif_nextdiroff = 0; - tif->tif_curoff = 0; - tif->tif_row = (uint32_t)-1; - tif->tif_curstrip = (uint32_t)-1; - /* invalidate directory index */ - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - /* invalidate IFD loop lists */ - _TIFFCleanupIFDOffsetAndNumberMaps(tif); - /* To be able to return from SubIFD or custom-IFD to main-IFD */ - tif->tif_setdirectory_force_absolute = TRUE; - - return 0; -} - -int TIFFCreateEXIFDirectory(TIFF *tif) -{ - const TIFFFieldArray *exifFieldArray; - exifFieldArray = _TIFFGetExifFields(); - return TIFFCreateCustomDirectory(tif, exifFieldArray); -} - -/* - * Creates the EXIF GPS custom directory - */ -int TIFFCreateGPSDirectory(TIFF *tif) -{ - const TIFFFieldArray *gpsFieldArray; - gpsFieldArray = _TIFFGetGpsFields(); - return TIFFCreateCustomDirectory(tif, gpsFieldArray); -} - -/* - * Setup a default directory structure. - */ -int TIFFDefaultDirectory(TIFF *tif) -{ - register TIFFDirectory *td = &tif->tif_dir; - const TIFFFieldArray *tiffFieldArray; - - tiffFieldArray = _TIFFGetFields(); - _TIFFSetupFields(tif, tiffFieldArray); - - _TIFFmemset(td, 0, sizeof(*td)); - td->td_fillorder = FILLORDER_MSB2LSB; - td->td_bitspersample = 1; - td->td_threshholding = THRESHHOLD_BILEVEL; - td->td_orientation = ORIENTATION_TOPLEFT; - td->td_samplesperpixel = 1; - td->td_rowsperstrip = (uint32_t)-1; - td->td_tilewidth = 0; - td->td_tilelength = 0; - td->td_tiledepth = 1; -#ifdef STRIPBYTECOUNTSORTED_UNUSED - td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */ -#endif - td->td_resolutionunit = RESUNIT_INCH; - td->td_sampleformat = SAMPLEFORMAT_UINT; - td->td_imagedepth = 1; - td->td_ycbcrsubsampling[0] = 2; - td->td_ycbcrsubsampling[1] = 2; - td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED; - tif->tif_postdecode = _TIFFNoPostDecode; - tif->tif_foundfield = NULL; - tif->tif_tagmethods.vsetfield = _TIFFVSetField; - tif->tif_tagmethods.vgetfield = _TIFFVGetField; - tif->tif_tagmethods.printdir = NULL; - /* additional default values */ - td->td_planarconfig = PLANARCONFIG_CONTIG; - td->td_compression = COMPRESSION_NONE; - td->td_subfiletype = 0; - td->td_minsamplevalue = 0; - /* td_bitspersample=1 is always set in TIFFDefaultDirectory(). - * Therefore, td_maxsamplevalue has to be re-calculated in - * TIFFGetFieldDefaulted(). */ - td->td_maxsamplevalue = 1; /* Default for td_bitspersample=1 */ - td->td_extrasamples = 0; - td->td_sampleinfo = NULL; - - /* - * Give client code a chance to install their own - * tag extensions & methods, prior to compression overloads, - * but do some prior cleanup first. - * (http://trac.osgeo.org/gdal/ticket/5054) - */ - if (tif->tif_nfieldscompat > 0) - { - uint32_t i; - - for (i = 0; i < tif->tif_nfieldscompat; i++) - { - if (tif->tif_fieldscompat[i].allocated_size) - _TIFFfreeExt(tif, tif->tif_fieldscompat[i].fields); - } - _TIFFfreeExt(tif, tif->tif_fieldscompat); - tif->tif_nfieldscompat = 0; - tif->tif_fieldscompat = NULL; - } - if (_TIFFextender) - (*_TIFFextender)(tif); - (void)TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - /* - * NB: The directory is marked dirty as a result of setting - * up the default compression scheme. However, this really - * isn't correct -- we want TIFF_DIRTYDIRECT to be set only - * if the user does something. We could just do the setup - * by hand, but it seems better to use the normal mechanism - * (i.e. TIFFSetField). - */ - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - - /* - * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19 - * we clear the ISTILED flag when setting up a new directory. - * Should we also be clearing stuff like INSUBIFD? - */ - tif->tif_flags &= ~TIFF_ISTILED; - - return (1); -} - -static int TIFFAdvanceDirectory(TIFF *tif, uint64_t *nextdiroff, uint64_t *off, - tdir_t *nextdirnum) -{ - static const char module[] = "TIFFAdvanceDirectory"; - - /* Add this directory to the directory list, if not already in. */ - if (!_TIFFCheckDirNumberAndOffset(tif, *nextdirnum, *nextdiroff)) - { - TIFFErrorExtR(tif, module, - "Starting directory %u at offset 0x%" PRIx64 " (%" PRIu64 - ") might cause an IFD loop", - *nextdirnum, *nextdiroff, *nextdiroff); - *nextdiroff = 0; - *nextdirnum = 0; - return (0); - } - - if (isMapped(tif)) - { - uint64_t poff = *nextdiroff; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - tmsize_t poffa, poffb, poffc, poffd; - uint16_t dircount; - uint32_t nextdir32; - poffa = (tmsize_t)poff; - poffb = poffa + sizeof(uint16_t); - if (((uint64_t)poffa != poff) || (poffb < poffa) || - (poffb < (tmsize_t)sizeof(uint16_t)) || (poffb > tif->tif_size)) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - *nextdiroff = 0; - return (0); - } - _TIFFmemcpy(&dircount, tif->tif_base + poffa, sizeof(uint16_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - poffc = poffb + dircount * 12; - poffd = poffc + sizeof(uint32_t); - if ((poffc < poffb) || (poffc < dircount * 12) || (poffd < poffc) || - (poffd < (tmsize_t)sizeof(uint32_t)) || (poffd > tif->tif_size)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (off != NULL) - *off = (uint64_t)poffc; - _TIFFmemcpy(&nextdir32, tif->tif_base + poffc, sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir32); - *nextdiroff = nextdir32; - } - else - { - tmsize_t poffa, poffb, poffc, poffd; - uint64_t dircount64; - uint16_t dircount16; - if (poff > (uint64_t)TIFF_TMSIZE_T_MAX - sizeof(uint64_t)) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - return (0); - } - poffa = (tmsize_t)poff; - poffb = poffa + sizeof(uint64_t); - if (poffb > tif->tif_size) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - return (0); - } - _TIFFmemcpy(&dircount64, tif->tif_base + poffa, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 0xFFFF) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed"); - return (0); - } - dircount16 = (uint16_t)dircount64; - if (poffb > TIFF_TMSIZE_T_MAX - (tmsize_t)(dircount16 * 20) - - (tmsize_t)sizeof(uint64_t)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - poffc = poffb + dircount16 * 20; - poffd = poffc + sizeof(uint64_t); - if (poffd > tif->tif_size) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (off != NULL) - *off = (uint64_t)poffc; - _TIFFmemcpy(nextdiroff, tif->tif_base + poffc, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - else - { - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint16_t dircount; - uint32_t nextdir32; - if (!SeekOK(tif, *nextdiroff) || - !ReadOK(tif, &dircount, sizeof(uint16_t))) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - if (off != NULL) - *off = TIFFSeekFile(tif, dircount * 12, SEEK_CUR); - else - (void)TIFFSeekFile(tif, dircount * 12, SEEK_CUR); - if (!ReadOK(tif, &nextdir32, sizeof(uint32_t))) - { - TIFFErrorExtR(tif, module, "%s: Error fetching directory link", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir32); - *nextdiroff = nextdir32; - } - else - { - uint64_t dircount64; - uint16_t dircount16; - if (!SeekOK(tif, *nextdiroff) || - !ReadOK(tif, &dircount64, sizeof(uint64_t))) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 0xFFFF) - { - TIFFErrorExtR(tif, module, - "%s:%d: %s: Error fetching directory count", - __FILE__, __LINE__, tif->tif_name); - return (0); - } - dircount16 = (uint16_t)dircount64; - if (off != NULL) - *off = TIFFSeekFile(tif, dircount16 * 20, SEEK_CUR); - else - (void)TIFFSeekFile(tif, dircount16 * 20, SEEK_CUR); - if (!ReadOK(tif, nextdiroff, sizeof(uint64_t))) - { - TIFFErrorExtR(tif, module, "%s: Error fetching directory link", - tif->tif_name); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - if (*nextdiroff != 0) - { - (*nextdirnum)++; - /* Check next directory for IFD looping and if so, set it as last - * directory. */ - if (!_TIFFCheckDirNumberAndOffset(tif, *nextdirnum, *nextdiroff)) - { - TIFFWarningExtR( - tif, module, - "the next directory %u at offset 0x%" PRIx64 " (%" PRIu64 - ") might be an IFD loop. Treating directory %d as " - "last directory", - *nextdirnum, *nextdiroff, *nextdiroff, (int)(*nextdirnum) - 1); - *nextdiroff = 0; - (*nextdirnum)--; - } - } - return (1); -} - -/* - * Count the number of directories in a file. - */ -tdir_t TIFFNumberOfDirectories(TIFF *tif) -{ - uint64_t nextdiroff; - tdir_t nextdirnum; - tdir_t n; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - nextdiroff = tif->tif_header.classic.tiff_diroff; - else - nextdiroff = tif->tif_header.big.tiff_diroff; - nextdirnum = 0; - n = 0; - while (nextdiroff != 0 && - TIFFAdvanceDirectory(tif, &nextdiroff, NULL, &nextdirnum)) - { - ++n; - } - /* Update number of main-IFDs in file. */ - tif->tif_curdircount = n; - return (n); -} - -/* - * Set the n-th directory as the current directory. - * NB: Directories are numbered starting at 0. - */ -int TIFFSetDirectory(TIFF *tif, tdir_t dirn) -{ - uint64_t nextdiroff; - tdir_t nextdirnum = 0; - tdir_t n; - - if (tif->tif_setdirectory_force_absolute) - { - /* tif_setdirectory_force_absolute=1 will force parsing the main IFD - * chain from the beginning, thus IFD directory list needs to be cleared - * from possible SubIFD offsets. - */ - _TIFFCleanupIFDOffsetAndNumberMaps(tif); /* invalidate IFD loop lists */ - } - - /* Even faster path, if offset is available within IFD loop hash list. */ - if (!tif->tif_setdirectory_force_absolute && - _TIFFGetOffsetFromDirNumber(tif, dirn, &nextdiroff)) - { - /* Set parameters for following TIFFReadDirectory() below. */ - tif->tif_nextdiroff = nextdiroff; - tif->tif_curdir = dirn; - /* Reset to relative stepping */ - tif->tif_setdirectory_force_absolute = FALSE; - } - else - { - - /* Fast path when we just advance relative to the current directory: - * start at the current dir offset and continue to seek from there. - * Check special cases when relative is not allowed: - * - jump back from SubIFD or custom directory - * - right after TIFFWriteDirectory() jump back to that directory - * using TIFFSetDirectory() */ - const int relative = (dirn >= tif->tif_curdir) && - (tif->tif_diroff != 0) && - !tif->tif_setdirectory_force_absolute; - - if (relative) - { - nextdiroff = tif->tif_diroff; - dirn -= tif->tif_curdir; - nextdirnum = tif->tif_curdir; - } - else if (!(tif->tif_flags & TIFF_BIGTIFF)) - nextdiroff = tif->tif_header.classic.tiff_diroff; - else - nextdiroff = tif->tif_header.big.tiff_diroff; - - /* Reset to relative stepping */ - tif->tif_setdirectory_force_absolute = FALSE; - - for (n = dirn; n > 0 && nextdiroff != 0; n--) - if (!TIFFAdvanceDirectory(tif, &nextdiroff, NULL, &nextdirnum)) - return (0); - /* If the n-th directory could not be reached (does not exist), - * return here without touching anything further. */ - if (nextdiroff == 0 || n > 0) - return (0); - - tif->tif_nextdiroff = nextdiroff; - - /* Set curdir to the actual directory index. */ - if (relative) - tif->tif_curdir += dirn - n; - else - tif->tif_curdir = dirn - n; - } - - /* The -1 decrement is because TIFFReadDirectory will increment - * tif_curdir after successfully reading the directory. */ - if (tif->tif_curdir == 0) - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - else - tif->tif_curdir--; - - tdir_t curdir = tif->tif_curdir; - - int retval = TIFFReadDirectory(tif); - - if (!retval && tif->tif_curdir == curdir) - { - /* If tif_curdir has not be incremented, TIFFFetchDirectory() in - * TIFFReadDirectory() has failed and tif_curdir shall be set - * specifically. */ - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - } - return (retval); -} - -/* - * Set the current directory to be the directory - * located at the specified file offset. This interface - * is used mainly to access directories linked with - * the SubIFD tag (e.g. thumbnail images). - */ -int TIFFSetSubDirectory(TIFF *tif, uint64_t diroff) -{ - /* Match nextdiroff and curdir for consistent IFD-loop checking. - * Only with TIFFSetSubDirectory() the IFD list can be corrupted with - * invalid offsets within the main IFD tree. In the case of several subIFDs - * of a main image, there are two possibilities that are not even mutually - * exclusive. a.) The subIFD tag contains an array with all offsets of the - * subIFDs. b.) The SubIFDs are concatenated with their NextIFD parameters. - * (refer to - * https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf.) - */ - int retval; - uint32_t curdir = 0; - int8_t probablySubIFD = 0; - if (diroff == 0) - { - /* Special case to set tif_diroff=0, which is done in - * TIFFReadDirectory() below to indicate that the currently read IFD is - * treated as a new, fresh IFD. */ - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - tif->tif_dir.td_iswrittentofile = FALSE; - } - else - { - if (!_TIFFGetDirNumberFromOffset(tif, diroff, &curdir)) - { - /* Non-existing offsets might point to a SubIFD or invalid IFD.*/ - probablySubIFD = 1; - } - /* -1 because TIFFReadDirectory() will increment tif_curdir. */ - if (curdir >= 1) - tif->tif_curdir = curdir - 1; - else - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - } - curdir = tif->tif_curdir; - - tif->tif_nextdiroff = diroff; - retval = TIFFReadDirectory(tif); - - /* tif_curdir is incremented in TIFFReadDirectory(), but if it has not been - * incremented, TIFFFetchDirectory() has failed there and tif_curdir shall - * be set specifically. */ - if (!retval && diroff != 0 && tif->tif_curdir == curdir) - { - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - } - - if (probablySubIFD) - { - if (retval) - { - /* Reset IFD list to start new one for SubIFD chain and also start - * SubIFD chain with tif_curdir=0 for IFD loop checking. */ - /* invalidate IFD loop lists */ - _TIFFCleanupIFDOffsetAndNumberMaps(tif); - tif->tif_curdir = 0; /* first directory of new chain */ - /* add this offset to new IFD list */ - retval = _TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir, diroff); - } - /* To be able to return from SubIFD or custom-IFD to main-IFD */ - tif->tif_setdirectory_force_absolute = TRUE; - } - - return (retval); -} - -/* - * Return file offset of the current directory. - */ -uint64_t TIFFCurrentDirOffset(TIFF *tif) { return (tif->tif_diroff); } - -/* - * Return an indication of whether or not we are - * at the last directory in the file. - */ -int TIFFLastDirectory(TIFF *tif) { return (tif->tif_nextdiroff == 0); } - -/* - * Unlink the specified directory from the directory chain. - * Note: First directory starts with number dirn=1. - * This is different to TIFFSetDirectory() where the first directory starts with - * zero. - */ -int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn) -{ - static const char module[] = "TIFFUnlinkDirectory"; - uint64_t nextdir; - tdir_t nextdirnum; - uint64_t off; - tdir_t n; - - if (tif->tif_mode == O_RDONLY) - { - TIFFErrorExtR(tif, module, - "Can not unlink directory in read-only file"); - return (0); - } - if (dirn == 0) - { - TIFFErrorExtR(tif, module, - "For TIFFUnlinkDirectory() first directory starts with " - "number 1 and not 0"); - return (0); - } - /* - * Go to the directory before the one we want - * to unlink and nab the offset of the link - * field we'll need to patch. - */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - nextdir = tif->tif_header.classic.tiff_diroff; - off = 4; - } - else - { - nextdir = tif->tif_header.big.tiff_diroff; - off = 8; - } - nextdirnum = 0; /* First directory is dirn=0 */ - - for (n = dirn - 1; n > 0; n--) - { - if (nextdir == 0) - { - TIFFErrorExtR(tif, module, "Directory %u does not exist", dirn); - return (0); - } - if (!TIFFAdvanceDirectory(tif, &nextdir, &off, &nextdirnum)) - return (0); - } - /* - * Advance to the directory to be unlinked and fetch - * the offset of the directory that follows. - */ - if (!TIFFAdvanceDirectory(tif, &nextdir, NULL, &nextdirnum)) - return (0); - /* - * Go back and patch the link field of the preceding - * directory to point to the offset of the directory - * that follows. - */ - (void)TIFFSeekFile(tif, off, SEEK_SET); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t nextdir32; - nextdir32 = (uint32_t)nextdir; - assert((uint64_t)nextdir32 == nextdir); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdir32); - if (!WriteOK(tif, &nextdir32, sizeof(uint32_t))) - { - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - } - else - { - /* Need local swap because nextdir has to be used unswapped below. */ - uint64_t nextdir64 = nextdir; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextdir64); - if (!WriteOK(tif, &nextdir64, sizeof(uint64_t))) - { - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - } - - /* For dirn=1 (first directory) also update the libtiff internal - * base offset variables. */ - if (dirn == 1) - { - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_header.classic.tiff_diroff = (uint32_t)nextdir; - else - tif->tif_header.big.tiff_diroff = nextdir; - } - - /* - * Leave directory state setup safely. We don't have - * facilities for doing inserting and removing directories, - * so it's safest to just invalidate everything. This - * means that the caller can only append to the directory - * chain. - */ - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) - { - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawcc = 0; - tif->tif_rawcp = NULL; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - } - tif->tif_flags &= ~(TIFF_BEENWRITING | TIFF_BUFFERSETUP | TIFF_POSTENCODE | - TIFF_BUF4WRITE); - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - tif->tif_diroff = 0; /* force link on next write */ - tif->tif_nextdiroff = 0; /* next write must be at end */ - tif->tif_lastdiroff = 0; /* will be updated on next link */ - tif->tif_curoff = 0; - tif->tif_row = (uint32_t)-1; - tif->tif_curstrip = (uint32_t)-1; - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; - if (tif->tif_curdircount > 0) - tif->tif_curdircount--; - else - tif->tif_curdircount = TIFF_NON_EXISTENT_DIR_NUMBER; - _TIFFCleanupIFDOffsetAndNumberMaps(tif); /* invalidate IFD loop lists */ - return (1); -} diff --git a/third_party/libtiff/libtiff/tif_dir.h b/third_party/libtiff/libtiff/tif_dir.h deleted file mode 100644 index 4d58708..0000000 --- a/third_party/libtiff/libtiff/tif_dir.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFDIR_ -#define _TIFFDIR_ - -#include "tiff.h" -#include "tiffio.h" - -/* - * ``Library-private'' Directory-related Definitions. - */ - -typedef struct -{ - const TIFFField *info; - int count; - void *value; -} TIFFTagValue; - -/* - * TIFF Image File Directories are comprised of a table of field - * descriptors of the form shown below. The table is sorted in - * ascending order by tag. The values associated with each entry are - * disjoint and may appear anywhere in the file (so long as they are - * placed on a word boundary). - * - * If the value is 4 bytes or less, in ClassicTIFF, or 8 bytes or less in - * BigTIFF, then it is placed in the offset field to save space. If so, - * it is left-justified in the offset field. - */ -typedef struct -{ - uint16_t tdir_tag; /* see below */ - uint16_t tdir_type; /* data type; see below */ - uint64_t tdir_count; /* number of items; length in spec */ - union - { - uint16_t toff_short; - uint32_t toff_long; - uint64_t toff_long8; - } tdir_offset; /* either offset or the data itself if fits */ - uint8_t tdir_ignore; /* flag status to ignore tag when parsing tags in - tif_dirread.c */ -} TIFFDirEntry; - -typedef struct -{ - uint64_t offset; - uint64_t length; -} TIFFEntryOffsetAndLength; /* auxiliary for evaluating size of IFD data */ - -/* - * Internal format of a TIFF directory entry. - */ -typedef struct -{ -#define FIELDSET_ITEMS 4 - /* bit vector of fields that are set */ - uint32_t td_fieldsset[FIELDSET_ITEMS]; - - uint32_t td_imagewidth, td_imagelength, td_imagedepth; - uint32_t td_tilewidth, td_tilelength, td_tiledepth; - uint32_t td_subfiletype; - uint16_t td_bitspersample; - uint16_t td_sampleformat; - uint16_t td_compression; - uint16_t td_photometric; - uint16_t td_threshholding; - uint16_t td_fillorder; - uint16_t td_orientation; - uint16_t td_samplesperpixel; - uint32_t td_rowsperstrip; - uint16_t td_minsamplevalue, td_maxsamplevalue; - double *td_sminsamplevalue; - double *td_smaxsamplevalue; - float td_xresolution, td_yresolution; - uint16_t td_resolutionunit; - uint16_t td_planarconfig; - float td_xposition, td_yposition; - uint16_t td_pagenumber[2]; - uint16_t *td_colormap[3]; - uint16_t td_halftonehints[2]; - uint16_t td_extrasamples; - uint16_t *td_sampleinfo; - /* even though the name is misleading, td_stripsperimage is the number - * of striles (=strips or tiles) per plane, and td_nstrips the total - * number of striles */ - uint32_t td_stripsperimage; - uint32_t td_nstrips; /* size of offset & bytecount arrays */ - uint64_t - *td_stripoffset_p; /* should be accessed with TIFFGetStrileOffset */ - uint64_t *td_stripbytecount_p; /* should be accessed with - TIFFGetStrileByteCount */ - uint32_t - td_stripoffsetbyteallocsize; /* number of elements currently allocated - for td_stripoffset/td_stripbytecount. - Only used if TIFF_LAZYSTRILELOAD is set - */ -#ifdef STRIPBYTECOUNTSORTED_UNUSED - int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */ -#endif - /* Be aware that the parameters of td_stripoffset_entry and - * td_stripbytecount_entry are swapped but tdir_offset is not - * and has to be swapped when used. */ - TIFFDirEntry td_stripoffset_entry; /* for deferred loading */ - TIFFDirEntry td_stripbytecount_entry; /* for deferred loading */ - uint16_t td_nsubifd; - uint64_t *td_subifd; - /* YCbCr parameters */ - uint16_t td_ycbcrsubsampling[2]; - uint16_t td_ycbcrpositioning; - /* Colorimetry parameters */ - uint16_t *td_transferfunction[3]; - float *td_refblackwhite; - /* CMYK parameters */ - int td_inknameslen; - char *td_inknames; - uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; - - unsigned char - td_deferstrilearraywriting; /* see TIFFDeferStrileArrayWriting() */ - - unsigned char - td_iswrittentofile; /* indicates if current IFD is present on file */ - - /* LibTIFF writes all data that does not fit into the IFD entries directly - * after the IFD tag entry part. When reading, only the IFD data directly - * and continuously behind the IFD tags is taken into account for the IFD - * data size.*/ - uint64_t td_dirdatasize_write; /* auxiliary for evaluating size of IFD data - to be written */ - uint64_t td_dirdatasize_read; /* auxiliary for evaluating size of IFD data - read from file */ - uint32_t td_dirdatasize_Noffsets; /* auxiliary counter for - tif_dir.td_dirdatasize_offsets array */ - TIFFEntryOffsetAndLength - *td_dirdatasize_offsets; /* auxiliary array for all offsets of IFD tag - entries with data outside the IFD tag - entries. */ -} TIFFDirectory; - -/* - * Field flags used to indicate fields that have been set in a directory, and - * to reference fields when manipulating a directory. - */ - -/* - * FIELD_IGNORE is used to signify tags that are to be processed but otherwise - * ignored. This permits antiquated tags to be quietly read and discarded. - * Note that a bit *is* allocated for ignored tags; this is understood by the - * directory reading logic which uses this fact to avoid special-case handling - */ -#define FIELD_IGNORE 0 - -/* multi-item fields */ -#define FIELD_IMAGEDIMENSIONS 1 -#define FIELD_TILEDIMENSIONS 2 -#define FIELD_RESOLUTION 3 -#define FIELD_POSITION 4 - -/* single-item fields */ -#define FIELD_SUBFILETYPE 5 -#define FIELD_BITSPERSAMPLE 6 -#define FIELD_COMPRESSION 7 -#define FIELD_PHOTOMETRIC 8 -#define FIELD_THRESHHOLDING 9 -#define FIELD_FILLORDER 10 -#define FIELD_ORIENTATION 15 -#define FIELD_SAMPLESPERPIXEL 16 -#define FIELD_ROWSPERSTRIP 17 -#define FIELD_MINSAMPLEVALUE 18 -#define FIELD_MAXSAMPLEVALUE 19 -#define FIELD_PLANARCONFIG 20 -#define FIELD_RESOLUTIONUNIT 22 -#define FIELD_PAGENUMBER 23 -#define FIELD_STRIPBYTECOUNTS 24 -#define FIELD_STRIPOFFSETS 25 -#define FIELD_COLORMAP 26 -#define FIELD_EXTRASAMPLES 31 -#define FIELD_SAMPLEFORMAT 32 -#define FIELD_SMINSAMPLEVALUE 33 -#define FIELD_SMAXSAMPLEVALUE 34 -#define FIELD_IMAGEDEPTH 35 -#define FIELD_TILEDEPTH 36 -#define FIELD_HALFTONEHINTS 37 -#define FIELD_YCBCRSUBSAMPLING 39 -#define FIELD_YCBCRPOSITIONING 40 -#define FIELD_REFBLACKWHITE 41 -#define FIELD_TRANSFERFUNCTION 44 -#define FIELD_INKNAMES 46 -#define FIELD_SUBIFD 49 -#define FIELD_NUMBEROFINKS 50 -/* FIELD_CUSTOM (see tiffio.h) 65 */ -/* end of support for well-known tags; codec-private tags follow */ -#define FIELD_CODEC 66 /* base of codec-private tags */ - -/* - * Pseudo-tags don't normally need field bits since they are not written to an - * output file (by definition). The library also has express logic to always - * query a codec for a pseudo-tag so allocating a field bit for one is a - * waste. If codec wants to promote the notion of a pseudo-tag being ``set'' - * or ``unset'' then it can do using internal state flags without polluting - * the field bit space defined for real tags. - */ -#define FIELD_PSEUDO 0 - -#define FIELD_LAST (32 * FIELDSET_ITEMS - 1) - -#define BITn(n) (((uint32_t)1L) << ((n)&0x1f)) -#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n) / 32]) -#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field)) -#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field)) -#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field)) - -#define FieldSet(fields, f) (fields[(f) / 32] & BITn(f)) -#define ResetFieldBit(fields, f) (fields[(f) / 32] &= ~BITn(f)) - -typedef enum -{ - TIFF_SETGET_UNDEFINED = 0, - TIFF_SETGET_ASCII = 1, - TIFF_SETGET_UINT8 = 2, - TIFF_SETGET_SINT8 = 3, - TIFF_SETGET_UINT16 = 4, - TIFF_SETGET_SINT16 = 5, - TIFF_SETGET_UINT32 = 6, - TIFF_SETGET_SINT32 = 7, - TIFF_SETGET_UINT64 = 8, - TIFF_SETGET_SINT64 = 9, - TIFF_SETGET_FLOAT = 10, - TIFF_SETGET_DOUBLE = 11, - TIFF_SETGET_IFD8 = 12, - TIFF_SETGET_INT = 13, - TIFF_SETGET_UINT16_PAIR = 14, - TIFF_SETGET_C0_ASCII = 15, - TIFF_SETGET_C0_UINT8 = 16, - TIFF_SETGET_C0_SINT8 = 17, - TIFF_SETGET_C0_UINT16 = 18, - TIFF_SETGET_C0_SINT16 = 19, - TIFF_SETGET_C0_UINT32 = 20, - TIFF_SETGET_C0_SINT32 = 21, - TIFF_SETGET_C0_UINT64 = 22, - TIFF_SETGET_C0_SINT64 = 23, - TIFF_SETGET_C0_FLOAT = 24, - TIFF_SETGET_C0_DOUBLE = 25, - TIFF_SETGET_C0_IFD8 = 26, - TIFF_SETGET_C16_ASCII = 27, - TIFF_SETGET_C16_UINT8 = 28, - TIFF_SETGET_C16_SINT8 = 29, - TIFF_SETGET_C16_UINT16 = 30, - TIFF_SETGET_C16_SINT16 = 31, - TIFF_SETGET_C16_UINT32 = 32, - TIFF_SETGET_C16_SINT32 = 33, - TIFF_SETGET_C16_UINT64 = 34, - TIFF_SETGET_C16_SINT64 = 35, - TIFF_SETGET_C16_FLOAT = 36, - TIFF_SETGET_C16_DOUBLE = 37, - TIFF_SETGET_C16_IFD8 = 38, - TIFF_SETGET_C32_ASCII = 39, - TIFF_SETGET_C32_UINT8 = 40, - TIFF_SETGET_C32_SINT8 = 41, - TIFF_SETGET_C32_UINT16 = 42, - TIFF_SETGET_C32_SINT16 = 43, - TIFF_SETGET_C32_UINT32 = 44, - TIFF_SETGET_C32_SINT32 = 45, - TIFF_SETGET_C32_UINT64 = 46, - TIFF_SETGET_C32_SINT64 = 47, - TIFF_SETGET_C32_FLOAT = 48, - TIFF_SETGET_C32_DOUBLE = 49, - TIFF_SETGET_C32_IFD8 = 50, - TIFF_SETGET_OTHER = 51 -} TIFFSetGetFieldType; - -#if defined(__cplusplus) -extern "C" -{ -#endif - - extern const TIFFFieldArray *_TIFFGetFields(void); - extern const TIFFFieldArray *_TIFFGetExifFields(void); - extern const TIFFFieldArray *_TIFFGetGpsFields(void); - extern void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *infoarray); - extern void _TIFFPrintFieldInfo(TIFF *, FILE *); - - extern int _TIFFFillStriles(TIFF *); - - typedef enum - { - tfiatImage, - tfiatExif, - tfiatGps, /* EXIF-GPS fields array type */ - tfiatOther - } TIFFFieldArrayType; - - struct _TIFFFieldArray - { - TIFFFieldArrayType type; /* array type, will be used to determine if IFD - is image and such */ - uint32_t allocated_size; /* 0 if array is constant, other if modified by - future definition extension support */ - uint32_t count; /* number of elements in fields array */ - TIFFField *fields; /* actual field info */ - }; - - struct _TIFFField - { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */ - short field_writecount; /* write count/TIFF_VARIABLE */ - TIFFDataType field_type; /* type of associated data */ - uint32_t field_anonymous; /* if true, this is a unknown / - anonymous tag */ - TIFFSetGetFieldType set_get_field_type; /* type to be passed to - TIFFSetField, TIFFGetField */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - TIFFFieldArray *field_subfields; /* if field points to child ifds, child - ifd field definition array */ - }; - - extern int _TIFFMergeFields(TIFF *, const TIFFField[], uint32_t); - extern const TIFFField *_TIFFFindOrRegisterField(TIFF *, uint32_t, - TIFFDataType); - extern TIFFField *_TIFFCreateAnonField(TIFF *, uint32_t, TIFFDataType); - extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag); - extern int _TIFFCheckDirNumberAndOffset(TIFF *tif, tdir_t dirn, - uint64_t diroff); - extern int _TIFFGetDirNumberFromOffset(TIFF *tif, uint64_t diroff, - tdir_t *dirn); - extern int _TIFFGetOffsetFromDirNumber(TIFF *tif, tdir_t dirn, - uint64_t *diroff); - extern int _TIFFRemoveEntryFromDirectoryListByOffset(TIFF *tif, - uint64_t diroff); - -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFDIR_ */ - diff --git a/third_party/libtiff/libtiff/tif_dirinfo.c b/third_party/libtiff/libtiff/tif_dirinfo.c deleted file mode 100644 index c038497..0000000 --- a/third_party/libtiff/libtiff/tif_dirinfo.c +++ /dev/null @@ -1,1364 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Core Directory Tag Support. - */ -#include "tiffiop.h" -#include - -/* - * NOTE: THIS ARRAY IS ASSUMED TO BE SORTED BY TAG. - * - * NOTE: The second field (field_readcount) and third field (field_writecount) - * sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3) - * and TIFF_SPP (-2). The macros should be used but would throw off - * the formatting of the code, so please interpret the -1, -2 and -3 - * values accordingly. - */ - -/* const object should be initialized */ -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4132) -#endif -static const TIFFFieldArray tiffFieldArray; -static const TIFFFieldArray exifFieldArray; -static const TIFFFieldArray gpsFieldArray; -#ifdef _MSC_VER -#pragma warning(pop) -#endif -/*--: Rational2Double: -- - * The Rational2Double upgraded libtiff functionality allows the definition and - * achievement of true double-precision accuracy for TIFF tags of RATIONAL type - * and field_bit=FIELD_CUSTOM using the set_get_field_type = TIFF_SETGET_DOUBLE. - * Unfortunately, that changes the old implemented interface for TIFFGetField(). - * In order to keep the old TIFFGetField() interface behavior those tags have to - * be redefined with set_get_field_type = TIFF_SETGET_FLOAT! - * - * Rational custom arrays are already defined as _Cxx_FLOAT, thus can stay. - * - */ - -/* clang-format off */ /* for better readability of tag comments */ -static const TIFFField tiffFields[] = { - {TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL}, - {TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "OldSubfileType", NULL}, - {TIFFTAG_IMAGEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDIMENSIONS, 0, 0, "ImageWidth", NULL}, - {TIFFTAG_IMAGELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDIMENSIONS, 1, 0, "ImageLength", NULL}, - {TIFFTAG_BITSPERSAMPLE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_BITSPERSAMPLE, 0, 0, "BitsPerSample", NULL}, - {TIFFTAG_COMPRESSION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_COMPRESSION, 0, 0, "Compression", NULL}, - {TIFFTAG_PHOTOMETRIC, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_PHOTOMETRIC, 0, 0, "PhotometricInterpretation", NULL}, - {TIFFTAG_THRESHHOLDING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_THRESHHOLDING, 1, 0, "Threshholding", NULL}, - {TIFFTAG_CELLWIDTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CellWidth", NULL}, - {TIFFTAG_CELLLENGTH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CellLength", NULL}, - {TIFFTAG_FILLORDER, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_FILLORDER, 0, 0, "FillOrder", NULL}, - {TIFFTAG_DOCUMENTNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DocumentName", NULL}, - {TIFFTAG_IMAGEDESCRIPTION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImageDescription", NULL}, - {TIFFTAG_MAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Make", NULL}, - {TIFFTAG_MODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Model", NULL}, - {TIFFTAG_STRIPOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "StripOffsets", NULL}, - {TIFFTAG_ORIENTATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_ORIENTATION, 0, 0, "Orientation", NULL}, - {TIFFTAG_SAMPLESPERPIXEL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLESPERPIXEL, 0, 0, "SamplesPerPixel", NULL}, - {TIFFTAG_ROWSPERSTRIP, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_ROWSPERSTRIP, 0, 0, "RowsPerStrip", NULL}, - {TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL}, - {TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL}, - {TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL}, - {TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_RESOLUTION, 1, 0, "XResolution", NULL}, - {TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_RESOLUTION, 1, 0, "YResolution", NULL}, - {TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL}, - {TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "PageName", NULL}, - {TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_POSITION, 1, 0, "XPosition", NULL}, - {TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_POSITION, 1, 0, "YPosition", NULL}, - {TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL}, - {TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL}, - {TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL}, - {TIFFTAG_GRAYRESPONSECURVE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseCurve", NULL}, - {TIFFTAG_RESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_RESOLUTIONUNIT, 1, 0, "ResolutionUnit", NULL}, - {TIFFTAG_PAGENUMBER, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_PAGENUMBER, 1, 0, "PageNumber", NULL}, - {TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "ColorResponseUnit", NULL}, - {TIFFTAG_TRANSFERFUNCTION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, FIELD_TRANSFERFUNCTION, 1, 0, "TransferFunction", NULL}, - {TIFFTAG_SOFTWARE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Software", NULL}, - {TIFFTAG_DATETIME, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTime", NULL}, - {TIFFTAG_ARTIST, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Artist", NULL}, - {TIFFTAG_HOSTCOMPUTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "HostComputer", NULL}, - {TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "WhitePoint", NULL}, - {TIFFTAG_PRIMARYCHROMATICITIES, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "PrimaryChromaticities", NULL}, - {TIFFTAG_COLORMAP, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_OTHER, FIELD_COLORMAP, 1, 0, "ColorMap", NULL}, - {TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_HALFTONEHINTS, 1, 0, "HalftoneHints", NULL}, - {TIFFTAG_TILEWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDIMENSIONS, 0, 0, "TileWidth", NULL}, - {TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL}, - {TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL}, - {TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL}, - {TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray *)&tiffFieldArray}, - {TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 0, 0, "InkSet", NULL}, - {TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, FIELD_INKNAMES, 1, 1, "InkNames", NULL}, - {TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL}, - {TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_CUSTOM, 0, 0, "DotRange", NULL}, - {TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL}, - {TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL}, - {TIFFTAG_SAMPLEFORMAT, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLEFORMAT, 0, 0, "SampleFormat", NULL}, - {TIFFTAG_SMINSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, FIELD_SMINSAMPLEVALUE, 1, 0, "SMinSampleValue", NULL}, - {TIFFTAG_SMAXSAMPLEVALUE, -2, -1, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, FIELD_SMAXSAMPLEVALUE, 1, 0, "SMaxSampleValue", NULL}, - {TIFFTAG_CLIPPATH, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 0, 1, "ClipPath", NULL}, - {TIFFTAG_XCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 0, 0, "XClipPathUnits", NULL}, - {TIFFTAG_YCLIPPATHUNITS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 0, 0, "YClipPathUnits", NULL}, - {TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 0, 0, "YCbCrCoefficients", NULL}, - {TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, FIELD_YCBCRSUBSAMPLING, 0, 0, "YCbCrSubsampling", NULL}, - {TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_YCBCRPOSITIONING, 0, 0, "YCbCrPositioning", NULL}, - {TIFFTAG_REFERENCEBLACKWHITE, 6, 6, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_REFBLACKWHITE, 1, 0, "ReferenceBlackWhite", NULL}, - {TIFFTAG_XMLPACKET, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "XMLPacket", NULL}, - /* begin SGI tags */ - {TIFFTAG_MATTEING, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_EXTRASAMPLES, 0, 0, "Matteing", NULL}, - {TIFFTAG_DATATYPE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_SAMPLEFORMAT, 0, 0, "DataType", NULL}, - {TIFFTAG_IMAGEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_IMAGEDEPTH, 0, 0, "ImageDepth", NULL}, - {TIFFTAG_TILEDEPTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_TILEDEPTH, 0, 0, "TileDepth", NULL}, - /* end SGI tags */ - /* begin Pixar tags */ - {TIFFTAG_PIXAR_IMAGEFULLWIDTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ImageFullWidth", NULL}, - {TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ImageFullLength", NULL}, - {TIFFTAG_PIXAR_TEXTUREFORMAT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TextureFormat", NULL}, - {TIFFTAG_PIXAR_WRAPMODES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TextureWrapModes", NULL}, - {TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL}, - {TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL}, - {TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL}, - {TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Copyright", NULL}, - /* end Pixar tags */ - {TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "RichTIFFIPTC", NULL}, - {TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "Photoshop", NULL}, - /*--: EXIFIFD and GPSIFD specified as TIFF_LONG by Aware-Systems and not TIFF_IFD8 as in original LibTiff. However, for IFD-like tags, - * libtiff uses the data type TIFF_IFD8 in tiffFields[]-tag definition combined with a special handling procedure in order to write either - * a 32-bit value and the TIFF_IFD type-id into ClassicTIFF files or a 64-bit value and the TIFF_IFD8 type-id into BigTIFF files. */ - {TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "EXIFIFDOffset", (TIFFFieldArray *)&exifFieldArray}, - {TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "ICC Profile", NULL}, - {TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "GPSIFDOffset", (TIFFFieldArray *)&gpsFieldArray}, - {TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL}, - {TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL}, - {TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL}, - {TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxDcs", NULL}, - {TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 0, 0, "StoNits", NULL}, - {TIFFTAG_IMAGESOURCEDATA, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "Adobe Photoshop Document Data Block", NULL}, - {TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL}, - /* begin DNG tags */ - {TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "DNGVersion", NULL}, - {TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "DNGBackwardVersion", NULL}, - {TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "UniqueCameraModel", NULL}, - {TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "LocalizedCameraModel", NULL}, - {TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CFAPlaneColor", NULL}, - {TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CFALayout", NULL}, - {TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "LinearizationTable", NULL}, - {TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "BlackLevelRepeatDim", NULL}, - {TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevel", NULL}, - {TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaH", NULL}, - {TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "BlackLevelDeltaV", NULL}, - {TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "WhiteLevel", NULL}, - {TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultScale", NULL}, - {TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BestQualityScale", NULL}, - {TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultCropOrigin", NULL}, - {TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultCropSize", NULL}, - {TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix1", NULL}, - {TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix2", NULL}, - {TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration1", NULL}, - {TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration2", NULL}, - {TIFFTAG_REDUCTIONMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix1", NULL}, - {TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix2", NULL}, - {TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AnalogBalance", NULL}, - {TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AsShotNeutral", NULL}, - {TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "AsShotWhiteXY", NULL}, - {TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineExposure", NULL}, - {TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineNoise", NULL}, - {TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineSharpness", NULL}, - {TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "BayerGreenSplit", NULL}, - {TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "LinearResponseLimit", NULL}, - {TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL}, - {TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "LensInfo", NULL}, - {TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ChromaBlurRadius", NULL}, - {TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "AntiAliasStrength", NULL}, - {TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ShadowScale", NULL}, - {TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "DNGPrivateData", NULL}, - {TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "MakerNoteSafety", NULL}, - {TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant1", NULL}, - {TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant2", NULL}, - {TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "RawDataUniqueID", NULL}, - {TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OriginalRawFileName", NULL}, - {TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OriginalRawFileData", NULL}, - {TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ActiveArea", NULL}, - {TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "MaskedAreas", NULL}, - {TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AsShotICCProfile", NULL}, - {TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "AsShotPreProfileMatrix", NULL}, - {TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CurrentICCProfile", NULL}, - {TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CurrentPreProfileMatrix", NULL}, - {TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL}, -#if 0 - /* begin DNG 1.2.0.0 tags */ - {TIFFTAG_COLORIMETRICREFERENCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ColorimetricReference", NULL}, - {TIFFTAG_CAMERACALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CameraCalibrationSignature", NULL}, - {TIFFTAG_PROFILECALIBRATIONSIGNATURE, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileCalibrationSignature", NULL}, - {TIFFTAG_EXTRACAMERAPROFILES, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, FIELD_CUSTOM, 1, 1, "ExtraCameraProfiles", NULL}, - {TIFFTAG_ASSHOTPROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AsShotProfileName", NULL}, - {TIFFTAG_NOISEREDUCTIONAPPLIED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "NoiseReductionApplied", NULL}, - {TIFFTAG_PROFILENAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileName", NULL}, - {TIFFTAG_PROFILEHUESATMAPDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapDims", NULL}, - {TIFFTAG_PROFILEHUESATMAPDATA1, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData1", NULL}, - {TIFFTAG_PROFILEHUESATMAPDATA2, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData2", NULL}, - {TIFFTAG_PROFILETONECURVE, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileToneCurve", NULL}, - {TIFFTAG_PROFILEEMBEDPOLICY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileEmbedPolicy", NULL}, - {TIFFTAG_PROFILECOPYRIGHT, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProfileCopyright", NULL}, - {TIFFTAG_FORWARDMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix1", NULL}, - {TIFFTAG_FORWARDMATRIX2, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix2", NULL}, - {TIFFTAG_PREVIEWAPPLICATIONNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewApplicationName", NULL}, - {TIFFTAG_PREVIEWAPPLICATIONVERSION, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewApplicationVersion", NULL}, - {TIFFTAG_PREVIEWSETTINGSNAME, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "PreviewSettingsName", NULL}, - {TIFFTAG_PREVIEWSETTINGSDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "PreviewSettingsDigest", NULL}, - {TIFFTAG_PREVIEWCOLORSPACE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PreviewColorSpace", NULL}, - {TIFFTAG_PREVIEWDATETIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "PreviewDateTime", NULL}, - {TIFFTAG_RAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "RawImageDigest", NULL}, - {TIFFTAG_ORIGINALRAWFILEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "OriginalRawFileDigest", NULL}, - {TIFFTAG_SUBTILEBLOCKSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "SubTileBlockSize", NULL}, - {TIFFTAG_ROWINTERLEAVEFACTOR, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "RowInterleaveFactor", NULL}, - {TIFFTAG_PROFILELOOKTABLEDIMS, 3, 3, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ProfileLookTableDims", NULL}, - {TIFFTAG_PROFILELOOKTABLEDATA, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileLookTableData", NULL}, - /* begin DNG 1.3.0.0 tags */ - {TIFFTAG_OPCODELIST1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList1", NULL}, - {TIFFTAG_OPCODELIST2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList2", NULL}, - {TIFFTAG_OPCODELIST3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "OpcodeList3", NULL}, - {TIFFTAG_NOISEPROFILE, -1, -1, TIFF_DOUBLE, 0, TIFF_SETGET_C16_DOUBLE, FIELD_CUSTOM, 1, 1, "NoiseProfile", NULL}, - /* begin DNG 1.4.0.0 tags */ - {TIFFTAG_DEFAULTUSERCROP, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "DefaultUserCrop", NULL}, - {TIFFTAG_DEFAULTBLACKRENDER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "DefaultBlackRender", NULL}, - {TIFFTAG_BASELINEEXPOSUREOFFSET, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BaselineExposureOffset", NULL}, - {TIFFTAG_PROFILELOOKTABLEENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileLookTableEncoding", NULL}, - {TIFFTAG_PROFILEHUESATMAPENCODING, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileHueSatMapEncoding", NULL}, - {TIFFTAG_ORIGINALDEFAULTFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "OriginalDefaultFinalSize", NULL}, - {TIFFTAG_ORIGINALBESTQUALITYFINALSIZE, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "OriginalBestQualityFinalSize", NULL}, - {TIFFTAG_ORIGINALDEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "OriginalDefaultCropSize", NULL}, /* could also be rational */ - {TIFFTAG_NEWRAWIMAGEDIGEST, 16, 16, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "NewRawImageDigest", NULL}, - {TIFFTAG_RAWTOPREVIEWGAIN, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "RawToPreviewGain", NULL}, - /* begin DNG 1.5.0.0 tags */ - {TIFFTAG_DEPTHFORMAT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthFormat", NULL}, - {TIFFTAG_DEPTHNEAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DepthNear", NULL}, - {TIFFTAG_DEPTHFAR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DepthFar", NULL}, - {TIFFTAG_DEPTHUNITS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthUnits", NULL}, - {TIFFTAG_DEPTHMEASURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "DepthMeasureType", NULL}, - {TIFFTAG_ENHANCEPARAMS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EnhanceParams", NULL}, - /* begin DNG 1.6.0.0 tags */ - {TIFFTAG_PROFILEGAINTABLEMAP, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "ProfileGainTableMap", NULL}, - {TIFFTAG_SEMANTICNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SemanticName", NULL}, - {TIFFTAG_SEMANTICINSTANCEID, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SemanticInstanceID", NULL}, - {TIFFTAG_MASKSUBAREA, 4, 4, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "MaskSubArea", NULL}, - {TIFFTAG_RGBTABLES, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "RGBTables", NULL}, - {TIFFTAG_CALIBRATIONILLUMINANT3, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CalibrationIlluminant3", NULL}, - {TIFFTAG_COLORMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ColorMatrix3", NULL}, - {TIFFTAG_CAMERACALIBRATION3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "CameraCalibration3", NULL}, - {TIFFTAG_REDUCTIONMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ReductionMatrix3", NULL}, - {TIFFTAG_PROFILEHUESATMAPDATA3, -1, -1, TIFF_FLOAT, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ProfileHueSatMapData3", NULL}, - {TIFFTAG_FORWARDMATRIX3, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "ForwardMatrix3", NULL}, - {TIFFTAG_ILLUMINANTDATA1, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData1", NULL}, - {TIFFTAG_ILLUMINANTDATA2, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData2", NULL}, - {TIFFTAG_ILLUMINANTDATA3, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "IlluminantData3", NULL}, - /* end DNG tags */ -#endif - /* begin TIFF/EP tags */ - {TIFFTAG_EP_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "EP CFARepeatPatternDim", NULL}, - {TIFFTAG_EP_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "EP CFAPattern", NULL}, -#if 0 - /* TIFFTAG_EP_BATTERYLEVEL can be RATIONAL or ASCII. - * LibTiff defines it as ASCII and converts RATIONAL to an ASCII string. */ - {TIFFTAG_EP_BATTERYLEVEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP BatteryLevel", NULL}, - {TIFFTAG_EP_INTERLACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP Interlace", NULL}, - /* TIFFTAG_EP_IPTC_NAA and TIFFTAG_RICHTIFFIPTC share the same tag number (33723) - * LibTIFF type is UNDEFINED or BYTE, but often times incorrectly specified as LONG, because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII. */ - {TIFFTAG_EP_TIMEZONEOFFSET, -1, -1, TIFF_SSHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "EP TimeZoneOffset", NULL}, - {TIFFTAG_EP_SELFTIMERMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP SelfTimerMode", NULL}, - {TIFFTAG_EP_FLASHENERGY, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FlashEnergy", NULL}, - {TIFFTAG_EP_SPATIALFREQUENCYRESPONSE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP SpatialFrequencyResponse", NULL}, - {TIFFTAG_EP_NOISE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP Noise", NULL}, - {TIFFTAG_EP_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP FocalPlaneXResolution", NULL}, - {TIFFTAG_EP_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP FocalPlaneYResolution", NULL}, - {TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP FocalPlaneResolutionUnit", NULL}, - {TIFFTAG_EP_IMAGENUMBER, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "EP ImageNumber", NULL}, /* or SHORT */ - {TIFFTAG_EP_SECURITYCLASSIFICATION, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP SecurityClassification", NULL}, - {TIFFTAG_EP_IMAGEHISTORY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP ImageHistory", NULL}, - {TIFFTAG_EP_EXPOSUREINDEX, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureIndex", NULL}, - {TIFFTAG_EP_STANDARDID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "EP StandardId", NULL}, - {TIFFTAG_EP_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP SensingMethod", NULL}, - /* TIFF/EP tags equivalent to EXIF tags, sometimes defined differently. */ - {TIFFTAG_EP_EXPOSURETIME, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureTime", NULL}, /*N=1 or 2 */ - {TIFFTAG_EP_FNUMBER, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FNumber", NULL}, - {TIFFTAG_EP_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP ExposureProgram", NULL}, - {TIFFTAG_EP_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP SpectralSensitivity", NULL}, - {TIFFTAG_EP_ISOSPEEDRATINGS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP ISOSpeedRatings", NULL}, - {TIFFTAG_EP_OECF, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, FIELD_CUSTOM, 1, 1, "EP OptoelectricConversionFactor", NULL}, - {TIFFTAG_EP_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "EP DateTimeOriginal", NULL}, - {TIFFTAG_EP_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP CompressedBitsPerPixel", NULL}, - {TIFFTAG_EP_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP ShutterSpeedValue", NULL}, - {TIFFTAG_EP_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP ApertureValue", NULL}, - {TIFFTAG_EP_BRIGHTNESSVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP BrightnessValue", NULL}, - {TIFFTAG_EP_EXPOSUREBIASVALUE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP ExposureBiasValue", NULL}, /*N=1 or 2 */ - {TIFFTAG_EP_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "EP MaxApertureValue", NULL}, - {TIFFTAG_EP_SUBJECTDISTANCE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP SubjectDistance", NULL}, - {TIFFTAG_EP_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP MeteringMode", NULL}, - {TIFFTAG_EP_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP LightSource", NULL}, - {TIFFTAG_EP_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "EP Flash", NULL}, - {TIFFTAG_EP_FOCALLENGTH, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "EP FocalLength", NULL}, - {TIFFTAG_EP_SUBJECTLOCATION, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "EP SubjectLocation", NULL}, - /* end TIFF/EP tags */ -#endif - /* begin TIFF/FX tags */ - {TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Indexed", NULL}, - {TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, FIELD_CUSTOM, 1, 0, "GlobalParametersIFD", NULL}, - {TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ProfileType", NULL}, - {TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "FaxProfile", NULL}, - {TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "CodingMethods", NULL}, - {TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "VersionYear", NULL}, - {TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "ModeNumber", NULL}, - {TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, FIELD_CUSTOM, 1, 1, "Decode", NULL}, - {TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "ImageBaseColor", NULL}, - {TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "T82Options", NULL}, - {TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, FIELD_CUSTOM, 1, 1, "StripRowCounts", NULL}, - {TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, FIELD_CUSTOM, 1, 0, "ImageLayer", NULL}, - /* end TIFF/FX tags */ - /* begin pseudo tags */ -}; - -/* - * EXIF tags (Version 2.31, July 2016 plus version 2.32 May 2019) - */ -static const TIFFField exifFields[] = { - {EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL}, - {EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FNumber", NULL}, - {EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL}, - {EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL}, - /* After EXIF 2.2.1 ISOSpeedRatings is named PhotographicSensitivity. In addition, while "Count=Any", only 1 count should be used. */ - {EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL}, - {EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL}, - {EXIFTAG_SENSITIVITYTYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SensitivityType", NULL}, - {EXIFTAG_STANDARDOUTPUTSENSITIVITY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "StandardOutputSensitivity", NULL}, - {EXIFTAG_RECOMMENDEDEXPOSUREINDEX, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "RecommendedExposureIndex", NULL}, - {EXIFTAG_ISOSPEED, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeed", NULL}, - {EXIFTAG_ISOSPEEDLATITUDEYYY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudeyyy", NULL}, - {EXIFTAG_ISOSPEEDLATITUDEZZZ, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudezzz", NULL}, - {EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL}, - {EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL}, - {EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL}, - {EXIFTAG_OFFSETTIME, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTime", NULL}, - {EXIFTAG_OFFSETTIMEORIGINAL, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTimeOriginal", NULL}, - {EXIFTAG_OFFSETTIMEDIGITIZED, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "OffsetTimeDigitized", NULL}, - {EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL}, - {EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL}, - {EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL}, - {EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL}, - {EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL}, - {EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL}, - {EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL}, - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! - * However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values, - * which are not treated within LibTiff!! */ - {EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL}, - {EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL}, - {EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "LightSource", NULL}, - {EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Flash", NULL}, - {EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalLength", NULL}, - {EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL}, - {EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "MakerNote", NULL}, - {EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "UserComment", NULL}, - {EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL}, - {EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL}, - {EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL}, - {EXIFTAG_TEMPERATURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Temperature", NULL}, - {EXIFTAG_HUMIDITY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Humidity", NULL}, - {EXIFTAG_PRESSURE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Pressure", NULL}, - {EXIFTAG_WATERDEPTH, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "WaterDepth", NULL}, - {EXIFTAG_ACCELERATION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Acceleration", NULL}, - {EXIFTAG_CAMERAELEVATIONANGLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "CameraElevationAngle", NULL}, - {EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL}, - {EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL}, - {EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL}, - {EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL}, - {EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL}, - {EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL}, - {EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL}, - {EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL}, - {EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL}, - {EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL}, - {EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL}, - {EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL}, - {EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL}, - {EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "FileSource", NULL}, - {EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "SceneType", NULL}, - {EXIFTAG_CFAPATTERN, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "CFAPattern", NULL}, - {EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL}, - {EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL}, - {EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL}, - {EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL}, - {EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL}, - {EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL}, - {EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "GainControl", NULL}, - {EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Contrast", NULL}, - {EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Saturation", NULL}, - {EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Sharpness", NULL}, - {EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL}, - {EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL}, - {EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL}, - {EXIFTAG_CAMERAOWNERNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "CameraOwnerName", NULL}, - {EXIFTAG_BODYSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "BodySerialNumber", NULL}, - {EXIFTAG_LENSSPECIFICATION, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, FIELD_CUSTOM, 1, 0, "LensSpecification", NULL}, - {EXIFTAG_LENSMAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensMake", NULL}, - {EXIFTAG_LENSMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensModel", NULL}, - {EXIFTAG_LENSSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LensSerialNumber", NULL}, - {EXIFTAG_GAMMA, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, FIELD_CUSTOM, 1, 0, "Gamma", NULL}, - {EXIFTAG_COMPOSITEIMAGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "CompositeImage", NULL}, - {EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, FIELD_CUSTOM, 1, 0, "SourceImageNumberOfCompositeImage", NULL}, - {EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, - "SourceExposureTimesOfCompositeImage", NULL}}; -/* - * EXIF-GPS tags (Version 2.31, July 2016; nothing changed for version 2.32 May - * 2019) - */ - -static const TIFFField gpsFields[] = { - /* For the GPS tag definitions in gpsFields[] the standard definition for Rationals is TIFF_SETGET_DOUBLE and TIFF_SETGET_C0_FLOAT. - *-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values can now be written and also read in double precision! - * In order to achieve double precision for GPS tags: Standard definitions for GPSTAG is kept to TIFF_SETGET_DOUBLE - * and TIFF_SETGET_C0_FLOAT is changed to TIFF_SETGET_C0_DOUBLE. - */ - {GPSTAG_VERSIONID, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, FIELD_CUSTOM, 1, 0, "VersionID", NULL}, - {GPSTAG_LATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LatitudeRef", NULL}, - {GPSTAG_LATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "Latitude", NULL}, - {GPSTAG_LONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "LongitudeRef", NULL}, - {GPSTAG_LONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "Longitude", NULL}, - {GPSTAG_ALTITUDEREF, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, FIELD_CUSTOM, 1, 0, "AltitudeRef", NULL}, - {GPSTAG_ALTITUDE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Altitude", NULL}, - {GPSTAG_TIMESTAMP, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "TimeStamp", NULL}, - {GPSTAG_SATELLITES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Satellites", NULL}, - {GPSTAG_STATUS, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "Status", NULL}, - {GPSTAG_MEASUREMODE, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "MeasureMode", NULL}, - {GPSTAG_DOP, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DOP", NULL}, - {GPSTAG_SPEEDREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "SpeedRef", NULL}, - {GPSTAG_SPEED, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Speed", NULL}, - {GPSTAG_TRACKREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "TrackRef", NULL}, - {GPSTAG_TRACK, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "Track", NULL}, - {GPSTAG_IMGDIRECTIONREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "ImgDirectionRef", NULL}, - {GPSTAG_IMGDIRECTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "ImgDirection", NULL}, - {GPSTAG_MAPDATUM, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "MapDatum", NULL}, - {GPSTAG_DESTLATITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestLatitudeRef", NULL}, - {GPSTAG_DESTLATITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "DestLatitude", NULL}, - {GPSTAG_DESTLONGITUDEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestLongitudeRef", NULL}, - {GPSTAG_DESTLONGITUDE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, FIELD_CUSTOM, 1, 0, "DestLongitude", NULL}, - {GPSTAG_DESTBEARINGREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestBearingRef", NULL}, - {GPSTAG_DESTBEARING, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DestBearing", NULL}, - {GPSTAG_DESTDISTANCEREF, 2, 2, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DestDistanceRef", NULL}, - {GPSTAG_DESTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "DestDistance", NULL}, - {GPSTAG_PROCESSINGMETHOD, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "ProcessingMethod", NULL}, - {GPSTAG_AREAINFORMATION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, FIELD_CUSTOM, 1, 1, "AreaInformation", NULL}, - {GPSTAG_DATESTAMP, 11, 11, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, 1, 0, "DateStamp", NULL}, - {GPSTAG_DIFFERENTIAL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, FIELD_CUSTOM, 1, 0, "Differential", NULL}, - {GPSTAG_GPSHPOSITIONINGERROR, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, FIELD_CUSTOM, 1, 0, "HorizontalPositioningError", NULL}}; -/* clang-format on */ /* was off for better readability of tag comments */ - -static const TIFFFieldArray tiffFieldArray = { - tfiatImage, 0, TIFFArrayCount(tiffFields), (TIFFField *)tiffFields}; -static const TIFFFieldArray exifFieldArray = { - tfiatExif, 0, TIFFArrayCount(exifFields), (TIFFField *)exifFields}; -static const TIFFFieldArray gpsFieldArray = { - tfiatGps, 0, TIFFArrayCount(gpsFields), (TIFFField *)gpsFields}; - -/* - * We have our own local lfind() equivalent to avoid subtle differences - * in types passed to lfind() on different systems. - */ - -static void *td_lfind(const void *key, const void *base, size_t *nmemb, - size_t size, int (*compar)(const void *, const void *)) -{ - char *element, *end; - - end = (char *)base + *nmemb * size; - for (element = (char *)base; element < end; element += size) - if (!compar(key, element)) /* key found */ - return element; - - return NULL; -} - -const TIFFFieldArray *_TIFFGetFields(void) { return (&tiffFieldArray); } - -const TIFFFieldArray *_TIFFGetExifFields(void) { return (&exifFieldArray); } - -const TIFFFieldArray *_TIFFGetGpsFields(void) { return (&gpsFieldArray); } - -void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *fieldarray) -{ - if (tif->tif_fields && tif->tif_nfields > 0) - { - uint32_t i; - - for (i = 0; i < tif->tif_nfields; i++) - { - TIFFField *fld = tif->tif_fields[i]; - if (fld->field_name != NULL) - { - if (fld->field_bit == FIELD_CUSTOM && TIFFFieldIsAnonymous(fld)) - { - _TIFFfreeExt(tif, fld->field_name); - /* caution: tif_fields[i] must not be the beginning of a - * fields-array. Otherwise the following tags are also freed - * with the first free(). - */ - _TIFFfreeExt(tif, fld); - } - } - } - - _TIFFfreeExt(tif, tif->tif_fields); - tif->tif_fields = NULL; - tif->tif_nfields = 0; - } - if (!_TIFFMergeFields(tif, fieldarray->fields, fieldarray->count)) - { - TIFFErrorExtR(tif, "_TIFFSetupFields", "Setting up field info failed"); - } -} - -static int tagCompare(const void *a, const void *b) -{ - const TIFFField *ta = *(const TIFFField **)a; - const TIFFField *tb = *(const TIFFField **)b; - /* NB: be careful of return values for 16-bit platforms */ - if (ta->field_tag != tb->field_tag) - return (int)ta->field_tag - (int)tb->field_tag; - else - return (ta->field_type == TIFF_ANY) - ? 0 - : ((int)tb->field_type - (int)ta->field_type); -} - -static int tagNameCompare(const void *a, const void *b) -{ - const TIFFField *ta = *(const TIFFField **)a; - const TIFFField *tb = *(const TIFFField **)b; - int ret = strcmp(ta->field_name, tb->field_name); - - if (ret) - return ret; - else - return (ta->field_type == TIFF_ANY) - ? 0 - : ((int)tb->field_type - (int)ta->field_type); -} - -int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n) -{ - static const char module[] = "_TIFFMergeFields"; - static const char reason[] = "for fields array"; - /* TIFFField** tp; */ - uint32_t i; - - tif->tif_foundfield = NULL; - - if (tif->tif_fields && tif->tif_nfields > 0) - { - tif->tif_fields = (TIFFField **)_TIFFCheckRealloc( - tif, tif->tif_fields, (tif->tif_nfields + n), sizeof(TIFFField *), - reason); - } - else - { - tif->tif_fields = - (TIFFField **)_TIFFCheckMalloc(tif, n, sizeof(TIFFField *), reason); - } - if (!tif->tif_fields) - { - TIFFErrorExtR(tif, module, "Failed to allocate fields array"); - return 0; - } - - /* tp = tif->tif_fields + tif->tif_nfields; */ - for (i = 0; i < n; i++) - { - const TIFFField *fip = TIFFFindField(tif, info[i].field_tag, TIFF_ANY); - - /* only add definitions that aren't already present */ - if (!fip) - { - tif->tif_fields[tif->tif_nfields] = (TIFFField *)(info + i); - tif->tif_nfields++; - } - } - - /* Sort the field info by tag number */ - qsort(tif->tif_fields, tif->tif_nfields, sizeof(TIFFField *), tagCompare); - - return n; -} - -void _TIFFPrintFieldInfo(TIFF *tif, FILE *fd) -{ - uint32_t i; - - fprintf(fd, "%s: \n", tif->tif_name); - for (i = 0; i < tif->tif_nfields; i++) - { - const TIFFField *fip = tif->tif_fields[i]; - fprintf(fd, "field[%2d] %5lu, %2d, %2d, %d, %2d, %5s, %5s, %s\n", - (int)i, (unsigned long)fip->field_tag, fip->field_readcount, - fip->field_writecount, fip->field_type, fip->field_bit, - fip->field_oktochange ? "TRUE" : "FALSE", - fip->field_passcount ? "TRUE" : "FALSE", fip->field_name); - } -} - -/* - * Return size of TIFFDataType within TIFF-file in bytes - */ -int TIFFDataWidth(TIFFDataType type) -{ - switch (type) - { - case 0: /* nothing */ - case TIFF_BYTE: - case TIFF_ASCII: - case TIFF_SBYTE: - case TIFF_UNDEFINED: - return 1; - case TIFF_SHORT: - case TIFF_SSHORT: - return 2; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - case TIFF_IFD: - return 4; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_DOUBLE: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - return 8; - default: - return 0; /* will return 0 for unknown types */ - } -} - -/* - * Return internal storage size of TIFFSetGetFieldType in bytes. - * TIFFSetField() and TIFFGetField() have to provide the parameter accordingly. - * Replaces internal functions _TIFFDataSize() and _TIFFSetGetFieldSize() - * with now extern available function TIFFFieldSetGetSize(). - */ -int TIFFFieldSetGetSize(const TIFFField *fip) -{ - /* - * TIFFSetField() and TIFFGetField() must provide the parameter accordingly - * to the definition of "set_get_field_type" of the tag definition in - * dir_info.c. This function returns the data size for that purpose. - * - * Furthermore, this data size is also used for the internal storage, - * even for TIFF_RATIONAL values for FIELD_CUSTOM, which are stored - * internally as 4-byte float, but some of them should be stored internally - * as 8-byte double, depending on the "set_get_field_type" _FLOAT_ or - * _DOUBLE_. - */ - if (fip == NULL) - return 0; - - switch (fip->set_get_field_type) - { - case TIFF_SETGET_UNDEFINED: - case TIFF_SETGET_ASCII: - case TIFF_SETGET_C0_ASCII: - case TIFF_SETGET_C16_ASCII: - case TIFF_SETGET_C32_ASCII: - case TIFF_SETGET_OTHER: - return 1; - case TIFF_SETGET_UINT8: - case TIFF_SETGET_SINT8: - case TIFF_SETGET_C0_UINT8: - case TIFF_SETGET_C0_SINT8: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - return 1; - case TIFF_SETGET_UINT16: - case TIFF_SETGET_SINT16: - case TIFF_SETGET_C0_UINT16: - case TIFF_SETGET_C0_SINT16: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - return 2; - case TIFF_SETGET_INT: - case TIFF_SETGET_UINT32: - case TIFF_SETGET_SINT32: - case TIFF_SETGET_FLOAT: - case TIFF_SETGET_UINT16_PAIR: - case TIFF_SETGET_C0_UINT32: - case TIFF_SETGET_C0_SINT32: - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - case TIFF_SETGET_C32_FLOAT: - return 4; - case TIFF_SETGET_UINT64: - case TIFF_SETGET_SINT64: - case TIFF_SETGET_DOUBLE: - case TIFF_SETGET_IFD8: - case TIFF_SETGET_C0_UINT64: - case TIFF_SETGET_C0_SINT64: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C0_IFD8: - case TIFF_SETGET_C16_UINT64: - case TIFF_SETGET_C16_SINT64: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C16_IFD8: - case TIFF_SETGET_C32_UINT64: - case TIFF_SETGET_C32_SINT64: - case TIFF_SETGET_C32_DOUBLE: - case TIFF_SETGET_C32_IFD8: - return 8; - default: - return 0; - } -} /*-- TIFFFieldSetGetSize() --- */ - -/* - * Return size of count parameter of TIFFSetField() and TIFFGetField() - * and also if it is required: 0=none, 2=uint16_t, 4=uint32_t - */ -int TIFFFieldSetGetCountSize(const TIFFField *fip) -{ - if (fip == NULL) - return 0; - - switch (fip->set_get_field_type) - { - case TIFF_SETGET_C16_ASCII: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_UINT64: - case TIFF_SETGET_C16_SINT64: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C16_IFD8: - return 2; - case TIFF_SETGET_C32_ASCII: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_UINT64: - case TIFF_SETGET_C32_SINT64: - case TIFF_SETGET_C32_DOUBLE: - case TIFF_SETGET_C32_IFD8: - return 4; - default: - return 0; - } -} /*-- TIFFFieldSetGetCountSize() --- */ - -const TIFFField *TIFFFindField(TIFF *tif, uint32_t tag, TIFFDataType dt) -{ - TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, NULL, NULL}; - TIFFField *pkey = &key; - const TIFFField **ret; - if (tif->tif_foundfield && tif->tif_foundfield->field_tag == tag && - (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type)) - return tif->tif_foundfield; - - /* If we are invoked with no field information, then just return. */ - if (!tif->tif_fields) - return NULL; - - /* NB: use sorted search (e.g. binary search) */ - - key.field_tag = tag; - key.field_type = dt; - - ret = (const TIFFField **)bsearch(&pkey, tif->tif_fields, tif->tif_nfields, - sizeof(TIFFField *), tagCompare); - return tif->tif_foundfield = (ret ? *ret : NULL); -} - -static const TIFFField *_TIFFFindFieldByName(TIFF *tif, const char *field_name, - TIFFDataType dt) -{ - TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, NULL, NULL}; - TIFFField *pkey = &key; - const TIFFField **ret; - if (tif->tif_foundfield && - streq(tif->tif_foundfield->field_name, field_name) && - (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type)) - return (tif->tif_foundfield); - - /* If we are invoked with no field information, then just return. */ - if (!tif->tif_fields) - return NULL; - - /* NB: use linear search since list is sorted by key#, not name */ - - key.field_name = (char *)field_name; - key.field_type = dt; - - ret = - (const TIFFField **)td_lfind(&pkey, tif->tif_fields, &tif->tif_nfields, - sizeof(TIFFField *), tagNameCompare); - - return tif->tif_foundfield = (ret ? *ret : NULL); -} - -const TIFFField *TIFFFieldWithTag(TIFF *tif, uint32_t tag) -{ - const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); - if (!fip) - { - TIFFWarningExtR(tif, "TIFFFieldWithTag", "Warning, unknown tag 0x%x", - (unsigned int)tag); - } - return (fip); -} - -const TIFFField *TIFFFieldWithName(TIFF *tif, const char *field_name) -{ - const TIFFField *fip = _TIFFFindFieldByName(tif, field_name, TIFF_ANY); - if (!fip) - { - TIFFWarningExtR(tif, "TIFFFieldWithName", "Warning, unknown tag %s", - field_name); - } - return (fip); -} - -uint32_t TIFFFieldTag(const TIFFField *fip) { return fip->field_tag; } - -const char *TIFFFieldName(const TIFFField *fip) { return fip->field_name; } - -TIFFDataType TIFFFieldDataType(const TIFFField *fip) { return fip->field_type; } - -int TIFFFieldPassCount(const TIFFField *fip) { return fip->field_passcount; } - -int TIFFFieldReadCount(const TIFFField *fip) { return fip->field_readcount; } - -int TIFFFieldWriteCount(const TIFFField *fip) { return fip->field_writecount; } - -int TIFFFieldIsAnonymous(const TIFFField *fip) { return fip->field_anonymous; } - -const TIFFField *_TIFFFindOrRegisterField(TIFF *tif, uint32_t tag, - TIFFDataType dt) - -{ - const TIFFField *fld; - - fld = TIFFFindField(tif, tag, dt); - if (fld == NULL) - { - fld = _TIFFCreateAnonField(tif, tag, dt); - if (fld == NULL || !_TIFFMergeFields(tif, fld, 1)) - return NULL; - } - - return fld; -} - -TIFFField *_TIFFCreateAnonField(TIFF *tif, uint32_t tag, - TIFFDataType field_type) -{ - TIFFField *fld; - (void)tif; - - fld = (TIFFField *)_TIFFmallocExt(tif, sizeof(TIFFField)); - if (fld == NULL) - return NULL; - _TIFFmemset(fld, 0, sizeof(TIFFField)); - - fld->field_tag = tag; - fld->field_readcount = TIFF_VARIABLE2; - fld->field_writecount = TIFF_VARIABLE2; - fld->field_type = field_type; - fld->field_anonymous = - 1; /* indicate that this is an anonymous / unknown tag */ - switch (field_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - fld->set_get_field_type = TIFF_SETGET_C32_UINT8; - break; - case TIFF_ASCII: - fld->set_get_field_type = TIFF_SETGET_C32_ASCII; - break; - case TIFF_SHORT: - fld->set_get_field_type = TIFF_SETGET_C32_UINT16; - break; - case TIFF_LONG: - fld->set_get_field_type = TIFF_SETGET_C32_UINT32; - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - fld->set_get_field_type = TIFF_SETGET_C32_FLOAT; - break; - case TIFF_SBYTE: - fld->set_get_field_type = TIFF_SETGET_C32_SINT8; - break; - case TIFF_SSHORT: - fld->set_get_field_type = TIFF_SETGET_C32_SINT16; - break; - case TIFF_SLONG: - fld->set_get_field_type = TIFF_SETGET_C32_SINT32; - break; - case TIFF_DOUBLE: - fld->set_get_field_type = TIFF_SETGET_C32_DOUBLE; - break; - case TIFF_IFD: - case TIFF_IFD8: - fld->set_get_field_type = TIFF_SETGET_C32_IFD8; - break; - case TIFF_LONG8: - fld->set_get_field_type = TIFF_SETGET_C32_UINT64; - break; - case TIFF_SLONG8: - fld->set_get_field_type = TIFF_SETGET_C32_SINT64; - break; - default: - fld->set_get_field_type = TIFF_SETGET_UNDEFINED; - break; - } - fld->field_bit = FIELD_CUSTOM; - fld->field_oktochange = TRUE; - fld->field_passcount = TRUE; - fld->field_name = (char *)_TIFFmallocExt(tif, 32); - if (fld->field_name == NULL) - { - _TIFFfreeExt(tif, fld); - return NULL; - } - fld->field_subfields = NULL; - - /* - * note that this name is a special sign to TIFFClose() and - * _TIFFSetupFields() to free the field - * Update: - * This special sign is replaced by fld->field_anonymous flag. - */ - (void)snprintf(fld->field_name, 32, "Tag %d", (int)tag); - - return fld; -} - -/**************************************************************************** - * O B S O L E T E D I N T E R F A C E S - * - * Don't use this stuff in your applications, it may be removed in the future - * libtiff versions. - ****************************************************************************/ - -static TIFFSetGetFieldType _TIFFSetGetType(TIFFDataType type, short count, - unsigned char passcount) -{ - if (type == TIFF_ASCII && count == TIFF_VARIABLE && passcount == 0) - return TIFF_SETGET_ASCII; - - else if (count == 1 && passcount == 0) - { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_UINT16; - case TIFF_LONG: - return TIFF_SETGET_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count >= 1 && passcount == 0) - { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C0_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C0_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C0_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C0_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C0_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C0_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C0_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C0_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C0_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C0_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C0_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C0_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count == TIFF_VARIABLE && passcount == 1) - { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C16_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C16_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C16_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C16_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C16_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C16_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C16_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C16_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C16_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C16_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C16_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C16_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - else if (count == TIFF_VARIABLE2 && passcount == 1) - { - switch (type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: - return TIFF_SETGET_C32_UINT8; - case TIFF_ASCII: - return TIFF_SETGET_C32_ASCII; - case TIFF_SHORT: - return TIFF_SETGET_C32_UINT16; - case TIFF_LONG: - return TIFF_SETGET_C32_UINT32; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - return TIFF_SETGET_C32_FLOAT; - case TIFF_SBYTE: - return TIFF_SETGET_C32_SINT8; - case TIFF_SSHORT: - return TIFF_SETGET_C32_SINT16; - case TIFF_SLONG: - return TIFF_SETGET_C32_SINT32; - case TIFF_DOUBLE: - return TIFF_SETGET_C32_DOUBLE; - case TIFF_IFD: - case TIFF_IFD8: - return TIFF_SETGET_C32_IFD8; - case TIFF_LONG8: - return TIFF_SETGET_C32_UINT64; - case TIFF_SLONG8: - return TIFF_SETGET_C32_SINT64; - default: - return TIFF_SETGET_UNDEFINED; - } - } - - return TIFF_SETGET_UNDEFINED; -} - -int TIFFMergeFieldInfo(TIFF *tif, const TIFFFieldInfo info[], uint32_t n) -{ - static const char module[] = "TIFFMergeFieldInfo"; - static const char reason[] = "for fields array"; - TIFFField *tp; - size_t nfields; - uint32_t i; - - if (tif->tif_nfieldscompat > 0) - { - tif->tif_fieldscompat = (TIFFFieldArray *)_TIFFCheckRealloc( - tif, tif->tif_fieldscompat, tif->tif_nfieldscompat + 1, - sizeof(TIFFFieldArray), reason); - } - else - { - tif->tif_fieldscompat = (TIFFFieldArray *)_TIFFCheckMalloc( - tif, 1, sizeof(TIFFFieldArray), reason); - } - if (!tif->tif_fieldscompat) - { - TIFFErrorExtR(tif, module, "Failed to allocate fields array"); - return -1; - } - nfields = tif->tif_nfieldscompat++; - - tif->tif_fieldscompat[nfields].type = tfiatOther; - tif->tif_fieldscompat[nfields].allocated_size = n; - tif->tif_fieldscompat[nfields].count = n; - tif->tif_fieldscompat[nfields].fields = - (TIFFField *)_TIFFCheckMalloc(tif, n, sizeof(TIFFField), reason); - if (!tif->tif_fieldscompat[nfields].fields) - { - TIFFErrorExtR(tif, module, "Failed to allocate fields array"); - return -1; - } - - tp = tif->tif_fieldscompat[nfields].fields; - for (i = 0; i < n; i++) - { - tp->field_tag = info[i].field_tag; - if (info[i].field_readcount < TIFF_VARIABLE2 || - info[i].field_writecount < TIFF_VARIABLE2) - { - /* The fields (field_readcount) and (field_writecount) may use the - * values TIFF_VARIABLE (-1), TIFF_SPP (-2), TIFF_VARIABLE2 (-3). */ - TIFFErrorExtR( - tif, module, - "The value of field_readcount %d and field_writecount %d " - "must be greater than or equal to -3.", - info[i].field_readcount, info[i].field_writecount); - return -1; - } - if ((info[i].field_readcount == 0 || info[i].field_writecount == 0) && - info[i].field_bit != FIELD_IGNORE) - { - /* The fields (field_readcount) and (field_writecount) may only - be zero for pseudo_tags or ignored tags. */ - TIFFErrorExtR( - tif, module, - "The value of field_readcount %d and field_writecount %d " - "may only be zero for field_bit = 0 (i.e. ignored tags).", - info[i].field_readcount, info[i].field_writecount); - return -1; - } - tp->field_readcount = info[i].field_readcount; - tp->field_writecount = info[i].field_writecount; - tp->field_type = info[i].field_type; - tp->field_anonymous = 0; - tp->set_get_field_type = - _TIFFSetGetType(info[i].field_type, info[i].field_writecount, - info[i].field_passcount); - tp->field_bit = info[i].field_bit; - tp->field_oktochange = info[i].field_oktochange; - tp->field_passcount = info[i].field_passcount; - /* Define an empty static string to be passed as field_name where a NULL - * pointer is passed in. Otherwise, this will lead to buffer overflow - * furtheron. */ - if (info[i].field_name == NULL) - { - static const char *string_static_empty = ""; - tp->field_name = (char *)string_static_empty; - } - else - { - tp->field_name = info[i].field_name; - } - tp->field_subfields = NULL; - tp++; - } - - if (!_TIFFMergeFields(tif, tif->tif_fieldscompat[nfields].fields, n)) - { - TIFFErrorExtR(tif, module, "Setting up field info failed"); - return -1; - } - - return 0; -} - -int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) -{ - /* Filter out non-codec specific tags */ - switch (tag) - { - /* Shared tags */ - case TIFFTAG_PREDICTOR: - /* JPEG tags */ - case TIFFTAG_JPEGTABLES: - /* OJPEG tags */ - case TIFFTAG_JPEGIFOFFSET: - case TIFFTAG_JPEGIFBYTECOUNT: - case TIFFTAG_JPEGQTABLES: - case TIFFTAG_JPEGDCTABLES: - case TIFFTAG_JPEGACTABLES: - case TIFFTAG_JPEGPROC: - case TIFFTAG_JPEGRESTARTINTERVAL: - /* CCITT* */ - case TIFFTAG_BADFAXLINES: - case TIFFTAG_CLEANFAXDATA: - case TIFFTAG_CONSECUTIVEBADFAXLINES: - case TIFFTAG_GROUP3OPTIONS: - case TIFFTAG_GROUP4OPTIONS: - /* LERC */ - case TIFFTAG_LERC_PARAMETERS: - break; - default: - return 1; - } - if (!TIFFIsCODECConfigured(tif->tif_dir.td_compression)) - { - return 0; - } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) - { - case COMPRESSION_LZW: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_PACKBITS: - /* No codec-specific tags */ - break; - case COMPRESSION_THUNDERSCAN: - /* No codec-specific tags */ - break; - case COMPRESSION_NEXT: - /* No codec-specific tags */ - break; - case COMPRESSION_JPEG: - if (tag == TIFFTAG_JPEGTABLES) - return 1; - break; - case COMPRESSION_OJPEG: - switch (tag) - { - case TIFFTAG_JPEGIFOFFSET: - case TIFFTAG_JPEGIFBYTECOUNT: - case TIFFTAG_JPEGQTABLES: - case TIFFTAG_JPEGDCTABLES: - case TIFFTAG_JPEGACTABLES: - case TIFFTAG_JPEGPROC: - case TIFFTAG_JPEGRESTARTINTERVAL: - return 1; - } - break; - case COMPRESSION_CCITTRLE: - case COMPRESSION_CCITTRLEW: - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - switch (tag) - { - case TIFFTAG_BADFAXLINES: - case TIFFTAG_CLEANFAXDATA: - case TIFFTAG_CONSECUTIVEBADFAXLINES: - return 1; - case TIFFTAG_GROUP3OPTIONS: - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3) - return 1; - break; - case TIFFTAG_GROUP4OPTIONS: - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) - return 1; - break; - } - break; - case COMPRESSION_JBIG: - /* No codec-specific tags */ - break; - case COMPRESSION_DEFLATE: - case COMPRESSION_ADOBE_DEFLATE: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_PIXARLOG: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_SGILOG: - case COMPRESSION_SGILOG24: - /* No codec-specific tags */ - break; - case COMPRESSION_LZMA: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_ZSTD: - if (tag == TIFFTAG_PREDICTOR) - return 1; - break; - case COMPRESSION_LERC: - if (tag == TIFFTAG_LERC_PARAMETERS) - return 1; - break; - } - return 0; -} diff --git a/third_party/libtiff/libtiff/tif_dirread.c b/third_party/libtiff/libtiff/tif_dirread.c deleted file mode 100644 index 7f0aeb1..0000000 --- a/third_party/libtiff/libtiff/tif_dirread.c +++ /dev/null @@ -1,8447 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Read Support Routines. - */ - -/* Suggested pending improvements: - * - add a field 'field_info' to the TIFFDirEntry structure, and set that with - * the pointer to the appropriate TIFFField structure early on in - * TIFFReadDirectory, so as to eliminate current possibly repetitive lookup. - */ - -#include "tiffconf.h" -#include "tiffiop.h" -#include -#include -#include -#include - -#define FAILED_FII ((uint32_t)-1) - -#ifdef HAVE_IEEEFP -#define TIFFCvtIEEEFloatToNative(tif, n, fp) -#define TIFFCvtIEEEDoubleToNative(tif, n, dp) -#else -/* If your machine does not support IEEE floating point then you will need to - * add support to tif_machdep.c to convert between the native format and - * IEEE format. */ -extern void TIFFCvtIEEEFloatToNative(TIFF *, uint32_t, float *); -extern void TIFFCvtIEEEDoubleToNative(TIFF *, uint32_t, double *); -#endif - -enum TIFFReadDirEntryErr -{ - TIFFReadDirEntryErrOk = 0, - TIFFReadDirEntryErrCount = 1, - TIFFReadDirEntryErrType = 2, - TIFFReadDirEntryErrIo = 3, - TIFFReadDirEntryErrRange = 4, - TIFFReadDirEntryErrPsdif = 5, - TIFFReadDirEntryErrSizesan = 6, - TIFFReadDirEntryErrAlloc = 7, -}; - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryByte(TIFF *tif, TIFFDirEntry *direntry, uint8_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySbyte(TIFF *tif, TIFFDirEntry *direntry, int8_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryShort(TIFF *tif, TIFFDirEntry *direntry, uint16_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySshort(TIFF *tif, TIFFDirEntry *direntry, int16_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong(TIFF *tif, TIFFDirEntry *direntry, uint32_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong(TIFF *tif, TIFFDirEntry *direntry, int32_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong8(TIFF *tif, TIFFDirEntry *direntry, uint64_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong8(TIFF *tif, TIFFDirEntry *direntry, int64_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryFloat(TIFF *tif, TIFFDirEntry *direntry, float *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryDouble(TIFF *tif, TIFFDirEntry *direntry, double *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryIfd8(TIFF *tif, TIFFDirEntry *direntry, uint64_t *value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryArray(TIFF *tif, TIFFDirEntry *direntry, uint32_t *count, - uint32_t desttypesize, void **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryByteArray(TIFF *tif, TIFFDirEntry *direntry, uint8_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySbyteArray(TIFF *tif, TIFFDirEntry *direntry, int8_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryShortArray(TIFF *tif, TIFFDirEntry *direntry, uint16_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySshortArray(TIFF *tif, TIFFDirEntry *direntry, int16_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLongArray(TIFF *tif, TIFFDirEntry *direntry, uint32_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlongArray(TIFF *tif, TIFFDirEntry *direntry, int32_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong8Array(TIFF *tif, TIFFDirEntry *direntry, uint64_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong8Array(TIFF *tif, TIFFDirEntry *direntry, int64_t **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryFloatArray(TIFF *tif, TIFFDirEntry *direntry, float **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryDoubleArray(TIFF *tif, TIFFDirEntry *direntry, double **value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryIfd8Array(TIFF *tif, TIFFDirEntry *direntry, uint64_t **value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryPersampleShort(TIFF *tif, TIFFDirEntry *direntry, - uint16_t *value); - -static void TIFFReadDirEntryCheckedByte(TIFF *tif, TIFFDirEntry *direntry, - uint8_t *value); -static void TIFFReadDirEntryCheckedSbyte(TIFF *tif, TIFFDirEntry *direntry, - int8_t *value); -static void TIFFReadDirEntryCheckedShort(TIFF *tif, TIFFDirEntry *direntry, - uint16_t *value); -static void TIFFReadDirEntryCheckedSshort(TIFF *tif, TIFFDirEntry *direntry, - int16_t *value); -static void TIFFReadDirEntryCheckedLong(TIFF *tif, TIFFDirEntry *direntry, - uint32_t *value); -static void TIFFReadDirEntryCheckedSlong(TIFF *tif, TIFFDirEntry *direntry, - int32_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedLong8(TIFF *tif, TIFFDirEntry *direntry, - uint64_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedSlong8(TIFF *tif, TIFFDirEntry *direntry, - int64_t *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedRational(TIFF *tif, TIFFDirEntry *direntry, - double *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedSrational(TIFF *tif, TIFFDirEntry *direntry, - double *value); -static void TIFFReadDirEntryCheckedFloat(TIFF *tif, TIFFDirEntry *direntry, - float *value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedDouble(TIFF *tif, TIFFDirEntry *direntry, double *value); -#if 0 -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedRationalDirect(TIFF *tif, TIFFDirEntry *direntry, - TIFFRational_t *value); -#endif -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSbyte(int8_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteShort(uint16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSshort(int16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteLong(uint32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSlong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteByte(uint8_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteShort(uint16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSshort(int16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteLong(uint32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSlong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSbyte(int8_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSshort(int16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortLong(uint32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSlong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortShort(uint16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortLong(uint32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortSlong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSbyte(int8_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSshort(int16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSlong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong(uint32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong8(uint64_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongSlong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sbyte(int8_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sshort(int16_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong(int32_t value); -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong8(int64_t value); - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlong8Long8(uint64_t value); - -static enum TIFFReadDirEntryErr TIFFReadDirEntryData(TIFF *tif, uint64_t offset, - tmsize_t size, void *dest); -static void TIFFReadDirEntryOutputErr(TIFF *tif, enum TIFFReadDirEntryErr err, - const char *module, const char *tagname, - int recover); - -static void TIFFReadDirectoryCheckOrder(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount); -static TIFFDirEntry *TIFFReadDirectoryFindEntry(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount, - uint16_t tagid); -static void TIFFReadDirectoryFindFieldInfo(TIFF *tif, uint16_t tagid, - uint32_t *fii); - -static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount); -static void MissingRequired(TIFF *, const char *); -static int CheckDirCount(TIFF *, TIFFDirEntry *, uint32_t); -static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, - TIFFDirEntry **pdir, uint64_t *nextdiroff); -static int TIFFFetchNormalTag(TIFF *, TIFFDirEntry *, int recover); -static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32_t nstrips, - uint64_t **lpp); -static int TIFFFetchSubjectDistance(TIFF *, TIFFDirEntry *); -static void ChopUpSingleUncompressedStrip(TIFF *); -static void TryChopUpUncompressedBigTiff(TIFF *); -static uint64_t TIFFReadUInt64(const uint8_t *value); -static int _TIFFGetMaxColorChannels(uint16_t photometric); - -static int _TIFFFillStrilesInternal(TIFF *tif, int loadStripByteCount); - -typedef union _UInt64Aligned_t -{ - double d; - uint64_t l; - uint32_t i[2]; - uint16_t s[4]; - uint8_t c[8]; -} UInt64Aligned_t; - -/* - Unaligned safe copy of a uint64_t value from an octet array. -*/ -static uint64_t TIFFReadUInt64(const uint8_t *value) -{ - UInt64Aligned_t result; - - result.c[0] = value[0]; - result.c[1] = value[1]; - result.c[2] = value[2]; - result.c[3] = value[3]; - result.c[4] = value[4]; - result.c[5] = value[5]; - result.c[6] = value[6]; - result.c[7] = value[7]; - - return result.l; -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryByte(TIFF *tif, TIFFDirEntry *direntry, uint8_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: /* Support to read TIFF_UNDEFINED with - field_readcount==1 */ - TIFFReadDirEntryCheckedByte(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeByteSbyte(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeByteShort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeByteSshort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeByteLong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeByteSlong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeByteLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeByteSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint8_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySbyte(TIFF *tif, TIFFDirEntry *direntry, int8_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_UNDEFINED: /* Support to read TIFF_UNDEFINED with - field_readcount==1 */ - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSbyteByte(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - TIFFReadDirEntryCheckedSbyte(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSbyteShort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSbyteSshort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSbyteLong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSbyteSlong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSbyteLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSbyteSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int8_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntrySbyte() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryShort(TIFF *tif, TIFFDirEntry *direntry, uint16_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeShortSbyte(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - TIFFReadDirEntryCheckedShort(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeShortSshort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeShortLong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeShortSlong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeShortLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeShortSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntryShort() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySshort(TIFF *tif, TIFFDirEntry *direntry, int16_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSshortShort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - TIFFReadDirEntryCheckedSshort(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSshortLong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSshortSlong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSshortLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSshortSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int16_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntrySshort() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong(TIFF *tif, TIFFDirEntry *direntry, uint32_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLongSbyte(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLongSshort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - TIFFReadDirEntryCheckedLong(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLongSlong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeLongLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeLongSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint32_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntryLong() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong(TIFF *tif, TIFFDirEntry *direntry, int32_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeSlongLong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - TIFFReadDirEntryCheckedSlong(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSlongLong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSlongSlong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int32_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntrySlong() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong8(TIFF *tif, TIFFDirEntry *direntry, uint64_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLong8Sbyte(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLong8Sshort(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - err = TIFFReadDirEntryCheckRangeLong8Slong(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - err = TIFFReadDirEntryCheckedLong8(tif, direntry, value); - return (err); - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeLong8Slong8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntryLong8() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong8(TIFF *tif, TIFFDirEntry *direntry, int64_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - err = TIFFReadDirEntryCheckRangeSlong8Long8(m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (int64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, value); - return (err); - default: - return (TIFFReadDirEntryErrType); - } -} /*-- TIFFReadDirEntrySlong8() --*/ - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryFloat(TIFF *tif, TIFFDirEntry *direntry, float *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_RATIONAL: - { - double m; - err = TIFFReadDirEntryCheckedRational(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SRATIONAL: - { - double m; - err = TIFFReadDirEntryCheckedSrational(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_FLOAT: - TIFFReadDirEntryCheckedFloat(tif, direntry, value); - return (TIFFReadDirEntryErrOk); - case TIFF_DOUBLE: - { - double m; - err = TIFFReadDirEntryCheckedDouble(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - if ((m > FLT_MAX) || (m < -FLT_MAX)) - return (TIFFReadDirEntryErrRange); - *value = (float)m; - return (TIFFReadDirEntryErrOk); - } - default: - return (TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryDouble(TIFF *tif, TIFFDirEntry *direntry, double *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t m; - TIFFReadDirEntryCheckedByte(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - { - int8_t m; - TIFFReadDirEntryCheckedSbyte(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SHORT: - { - uint16_t m; - TIFFReadDirEntryCheckedShort(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - { - int16_t m; - TIFFReadDirEntryCheckedSshort(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - { - int32_t m; - TIFFReadDirEntryCheckedSlong(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - { - uint64_t m; - err = TIFFReadDirEntryCheckedLong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - { - int64_t m; - err = TIFFReadDirEntryCheckedSlong8(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk) - return (err); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_RATIONAL: - err = TIFFReadDirEntryCheckedRational(tif, direntry, value); - return (err); - case TIFF_SRATIONAL: - err = TIFFReadDirEntryCheckedSrational(tif, direntry, value); - return (err); - case TIFF_FLOAT: - { - float m; - TIFFReadDirEntryCheckedFloat(tif, direntry, &m); - *value = (double)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_DOUBLE: - err = TIFFReadDirEntryCheckedDouble(tif, direntry, value); - return (err); - default: - return (TIFFReadDirEntryErrType); - } -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryIfd8(TIFF *tif, TIFFDirEntry *direntry, uint64_t *value) -{ - enum TIFFReadDirEntryErr err; - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - switch (direntry->tdir_type) - { - case TIFF_LONG: - case TIFF_IFD: - { - uint32_t m; - TIFFReadDirEntryCheckedLong(tif, direntry, &m); - *value = (uint64_t)m; - return (TIFFReadDirEntryErrOk); - } - case TIFF_LONG8: - case TIFF_IFD8: - err = TIFFReadDirEntryCheckedLong8(tif, direntry, value); - return (err); - default: - return (TIFFReadDirEntryErrType); - } -} - -#define INITIAL_THRESHOLD (1024 * 1024) -#define THRESHOLD_MULTIPLIER 10 -#define MAX_THRESHOLD \ - (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * \ - INITIAL_THRESHOLD) - -static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc(TIFF *tif, - uint64_t offset, - tmsize_t size, - void **pdest) -{ -#if SIZEOF_SIZE_T == 8 - tmsize_t threshold = INITIAL_THRESHOLD; -#endif - tmsize_t already_read = 0; - - assert(!isMapped(tif)); - - if (!SeekOK(tif, offset)) - return (TIFFReadDirEntryErrIo); - - /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ - /* so as to avoid allocating too much memory in case the file is too */ - /* short. We could ask for the file size, but this might be */ - /* expensive with some I/O layers (think of reading a gzipped file) */ - /* Restrict to 64 bit processes, so as to avoid reallocs() */ - /* on 32 bit processes where virtual memory is scarce. */ - while (already_read < size) - { - void *new_dest; - tmsize_t bytes_read; - tmsize_t to_read = size - already_read; -#if SIZEOF_SIZE_T == 8 - if (to_read >= threshold && threshold < MAX_THRESHOLD) - { - to_read = threshold; - threshold *= THRESHOLD_MULTIPLIER; - } -#endif - - new_dest = - (uint8_t *)_TIFFreallocExt(tif, *pdest, already_read + to_read); - if (new_dest == NULL) - { - TIFFErrorExtR(tif, tif->tif_name, - "Failed to allocate memory for %s " - "(%" TIFF_SSIZE_FORMAT - " elements of %" TIFF_SSIZE_FORMAT " bytes each)", - "TIFFReadDirEntryArray", (tmsize_t)1, - already_read + to_read); - return TIFFReadDirEntryErrAlloc; - } - *pdest = new_dest; - - bytes_read = TIFFReadFile(tif, (char *)*pdest + already_read, to_read); - already_read += bytes_read; - if (bytes_read != to_read) - { - return TIFFReadDirEntryErrIo; - } - } - return TIFFReadDirEntryErrOk; -} - -/* Caution: if raising that value, make sure int32 / uint32 overflows can't - * occur elsewhere */ -#define MAX_SIZE_TAG_DATA 2147483647U - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, - uint32_t *count, uint32_t desttypesize, - void **value, uint64_t maxcount) -{ - int typesize; - uint32_t datasize; - void *data; - uint64_t target_count64; - int original_datasize_clamped; - typesize = TIFFDataWidth(direntry->tdir_type); - - target_count64 = - (direntry->tdir_count > maxcount) ? maxcount : direntry->tdir_count; - - if ((target_count64 == 0) || (typesize == 0)) - { - *value = 0; - return (TIFFReadDirEntryErrOk); - } - (void)desttypesize; - - /* We just want to know if the original tag size is more than 4 bytes - * (classic TIFF) or 8 bytes (BigTIFF) - */ - original_datasize_clamped = - ((direntry->tdir_count > 10) ? 10 : (int)direntry->tdir_count) * - typesize; - - /* - * As a sanity check, make sure we have no more than a 2GB tag array - * in either the current data type or the dest data type. This also - * avoids problems with overflow of tmsize_t on 32bit systems. - */ - if ((uint64_t)(MAX_SIZE_TAG_DATA / typesize) < target_count64) - return (TIFFReadDirEntryErrSizesan); - if ((uint64_t)(MAX_SIZE_TAG_DATA / desttypesize) < target_count64) - return (TIFFReadDirEntryErrSizesan); - - *count = (uint32_t)target_count64; - datasize = (*count) * typesize; - assert((tmsize_t)datasize > 0); - - if (datasize > 100 * 1024 * 1024) - { - /* Before allocating a huge amount of memory for corrupted files, check - * if size of requested memory is not greater than file size. - */ - const uint64_t filesize = TIFFGetFileSize(tif); - if (datasize > filesize) - { - TIFFWarningExtR(tif, "ReadDirEntryArray", - "Requested memory size for tag %d (0x%x) %" PRIu32 - " is greater than filesize %" PRIu64 - ". Memory not allocated, tag not read", - direntry->tdir_tag, direntry->tdir_tag, datasize, - filesize); - return (TIFFReadDirEntryErrAlloc); - } - } - - if (isMapped(tif) && datasize > (uint64_t)tif->tif_size) - return TIFFReadDirEntryErrIo; - - if (!isMapped(tif) && (((tif->tif_flags & TIFF_BIGTIFF) && datasize > 8) || - (!(tif->tif_flags & TIFF_BIGTIFF) && datasize > 4))) - { - data = NULL; - } - else - { - data = _TIFFCheckMalloc(tif, *count, typesize, "ReadDirEntryArray"); - if (data == 0) - return (TIFFReadDirEntryErrAlloc); - } - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - /* Only the condition on original_datasize_clamped. The second - * one is implied, but Coverity Scan cannot see it. */ - if (original_datasize_clamped <= 4 && datasize <= 4) - _TIFFmemcpy(data, &direntry->tdir_offset, datasize); - else - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - if (isMapped(tif)) - err = TIFFReadDirEntryData(tif, (uint64_t)offset, - (tmsize_t)datasize, data); - else - err = TIFFReadDirEntryDataAndRealloc(tif, (uint64_t)offset, - (tmsize_t)datasize, &data); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - } - } - else - { - /* See above comment for the Classic TIFF case */ - if (original_datasize_clamped <= 8 && datasize <= 8) - _TIFFmemcpy(data, &direntry->tdir_offset, datasize); - else - { - enum TIFFReadDirEntryErr err; - uint64_t offset = direntry->tdir_offset.toff_long8; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&offset); - if (isMapped(tif)) - err = TIFFReadDirEntryData(tif, (uint64_t)offset, - (tmsize_t)datasize, data); - else - err = TIFFReadDirEntryDataAndRealloc(tif, (uint64_t)offset, - (tmsize_t)datasize, &data); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - } - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryArray(TIFF *tif, TIFFDirEntry *direntry, uint32_t *count, - uint32_t desttypesize, void **value) -{ - return TIFFReadDirEntryArrayWithLimit(tif, direntry, count, desttypesize, - value, ~((uint64_t)0)); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryByteArray(TIFF *tif, TIFFDirEntry *direntry, uint8_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - uint8_t *data; - switch (direntry->tdir_type) - { - case TIFF_ASCII: - case TIFF_UNDEFINED: - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 1, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_ASCII: - case TIFF_UNDEFINED: - case TIFF_BYTE: - *value = (uint8_t *)origdata; - return (TIFFReadDirEntryErrOk); - case TIFF_SBYTE: - { - int8_t *m; - uint32_t n; - m = (int8_t *)origdata; - for (n = 0; n < count; n++) - { - err = TIFFReadDirEntryCheckRangeByteSbyte(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (uint8_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - } - data = (uint8_t *)_TIFFmallocExt(tif, count); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - { - uint16_t *ma; - uint8_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - err = TIFFReadDirEntryCheckRangeByteShort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - uint8_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - err = TIFFReadDirEntryCheckRangeByteSshort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - uint8_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - err = TIFFReadDirEntryCheckRangeByteLong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - uint8_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - err = TIFFReadDirEntryCheckRangeByteSlong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - uint8_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeByteLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - uint8_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeByteSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint8_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySbyteArray(TIFF *tif, TIFFDirEntry *direntry, int8_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - int8_t *data; - switch (direntry->tdir_type) - { - case TIFF_UNDEFINED: - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 1, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_UNDEFINED: - case TIFF_BYTE: - { - uint8_t *m; - uint32_t n; - m = (uint8_t *)origdata; - for (n = 0; n < count; n++) - { - err = TIFFReadDirEntryCheckRangeSbyteByte(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (int8_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SBYTE: - *value = (int8_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - data = (int8_t *)_TIFFmallocExt(tif, count); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - { - uint16_t *ma; - int8_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - err = TIFFReadDirEntryCheckRangeSbyteShort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - int8_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - err = TIFFReadDirEntryCheckRangeSbyteSshort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - int8_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - err = TIFFReadDirEntryCheckRangeSbyteLong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - int8_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - err = TIFFReadDirEntryCheckRangeSbyteSlong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - int8_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeSbyteLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - int8_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeSbyteSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int8_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryShortArray(TIFF *tif, TIFFDirEntry *direntry, uint16_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - uint16_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 2, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - *value = (uint16_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort(*value, count); - return (TIFFReadDirEntryErrOk); - case TIFF_SSHORT: - { - int16_t *m; - uint32_t n; - m = (int16_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)m); - err = TIFFReadDirEntryCheckRangeShortSshort(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (uint16_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - } - data = (uint16_t *)_TIFFmallocExt(tif, count * 2); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - uint16_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (uint16_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - uint16_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - err = TIFFReadDirEntryCheckRangeShortSbyte(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint16_t)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - uint16_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - err = TIFFReadDirEntryCheckRangeShortLong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint16_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - uint16_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - err = TIFFReadDirEntryCheckRangeShortSlong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint16_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - uint16_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeShortLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint16_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - uint16_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeShortSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint16_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySshortArray(TIFF *tif, TIFFDirEntry *direntry, int16_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - int16_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 2, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_SHORT: - { - uint16_t *m; - uint32_t n; - m = (uint16_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(m); - err = TIFFReadDirEntryCheckRangeSshortShort(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (int16_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SSHORT: - *value = (int16_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort((uint16_t *)(*value), count); - return (TIFFReadDirEntryErrOk); - } - data = (int16_t *)_TIFFmallocExt(tif, count * 2); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - int16_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int16_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - int16_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int16_t)(*ma++); - } - break; - case TIFF_LONG: - { - uint32_t *ma; - int16_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - err = TIFFReadDirEntryCheckRangeSshortLong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int16_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - int16_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - err = TIFFReadDirEntryCheckRangeSshortSlong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int16_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - int16_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeSshortLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int16_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - int16_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeSshortSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int16_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLongArray(TIFF *tif, TIFFDirEntry *direntry, uint32_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - uint32_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 4, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - *value = (uint32_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(*value, count); - return (TIFFReadDirEntryErrOk); - case TIFF_SLONG: - { - int32_t *m; - uint32_t n; - m = (int32_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)m); - err = TIFFReadDirEntryCheckRangeLongSlong(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (uint32_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - } - data = (uint32_t *)_TIFFmallocExt(tif, count * 4); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - uint32_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (uint32_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - uint32_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - err = TIFFReadDirEntryCheckRangeLongSbyte(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint32_t)(*ma++); - } - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - uint32_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (uint32_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - uint32_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - err = TIFFReadDirEntryCheckRangeLongSshort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint32_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - uint32_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeLongLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint32_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - uint32_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeLongSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint32_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlongArray(TIFF *tif, TIFFDirEntry *direntry, int32_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - int32_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 4, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - { - uint32_t *m; - uint32_t n; - m = (uint32_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)m); - err = TIFFReadDirEntryCheckRangeSlongLong(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (int32_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG: - *value = (int32_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)(*value), count); - return (TIFFReadDirEntryErrOk); - } - data = (int32_t *)_TIFFmallocExt(tif, count * 4); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - int32_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int32_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - int32_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int32_t)(*ma++); - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - int32_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (int32_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - int32_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - *mb++ = (int32_t)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - int32_t *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - err = TIFFReadDirEntryCheckRangeSlongLong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int32_t)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - int32_t *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - err = TIFFReadDirEntryCheckRangeSlongSlong8(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (int32_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong8ArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, - uint64_t **value, uint64_t maxcount) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - uint64_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArrayWithLimit(tif, direntry, &count, 8, &origdata, - maxcount); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - *value = (uint64_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8(*value, count); - return (TIFFReadDirEntryErrOk); - case TIFF_SLONG8: - { - int64_t *m; - uint32_t n; - m = (int64_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)m); - err = TIFFReadDirEntryCheckRangeLong8Slong8(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (uint64_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - } - data = (uint64_t *)_TIFFmallocExt(tif, count * 8); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - uint64_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (uint64_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - uint64_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - err = TIFFReadDirEntryCheckRangeLong8Sbyte(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint64_t)(*ma++); - } - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - uint64_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (uint64_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - uint64_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - err = TIFFReadDirEntryCheckRangeLong8Sshort(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint64_t)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - uint64_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - *mb++ = (uint64_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - uint64_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - err = TIFFReadDirEntryCheckRangeLong8Slong(*ma); - if (err != TIFFReadDirEntryErrOk) - break; - *mb++ = (uint64_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, data); - return (err); - } - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryLong8Array(TIFF *tif, TIFFDirEntry *direntry, uint64_t **value) -{ - return TIFFReadDirEntryLong8ArrayWithLimit(tif, direntry, value, - ~((uint64_t)0)); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntrySlong8Array(TIFF *tif, TIFFDirEntry *direntry, int64_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - int64_t *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 8, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - { - uint64_t *m; - uint32_t n; - m = (uint64_t *)origdata; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(m); - err = TIFFReadDirEntryCheckRangeSlong8Long8(*m); - if (err != TIFFReadDirEntryErrOk) - { - _TIFFfreeExt(tif, origdata); - return (err); - } - m++; - } - *value = (int64_t *)origdata; - return (TIFFReadDirEntryErrOk); - } - case TIFF_SLONG8: - *value = (int64_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64_t *)(*value), count); - return (TIFFReadDirEntryErrOk); - } - data = (int64_t *)_TIFFmallocExt(tif, count * 8); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - int64_t *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int64_t)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - int64_t *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (int64_t)(*ma++); - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - int64_t *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (int64_t)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - int64_t *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - *mb++ = (int64_t)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - int64_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - *mb++ = (int64_t)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - int64_t *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - *mb++ = (int64_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryFloatArray(TIFF *tif, TIFFDirEntry *direntry, float **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - float *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - case TIFF_DOUBLE: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 4, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_FLOAT: - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)origdata, count); - TIFFCvtIEEEFloatToNative(tif, count, (float *)origdata); - *value = (float *)origdata; - return (TIFFReadDirEntryErrOk); - } - data = (float *)_TIFFmallocExt(tif, count * sizeof(float)); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - float *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (float)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - float *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (float)(*ma++); - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - float *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - float *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - float *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - float *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - float *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - float *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - *mb++ = (float)(*ma++); - } - } - break; - case TIFF_RATIONAL: - { - uint32_t *ma; - uint32_t maa; - uint32_t mab; - float *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - maa = *ma++; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - mab = *ma++; - if (mab == 0) - *mb++ = 0.0; - else - *mb++ = (float)maa / (float)mab; - } - } - break; - case TIFF_SRATIONAL: - { - uint32_t *ma; - int32_t maa; - uint32_t mab; - float *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - maa = *(int32_t *)ma; - ma++; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - mab = *ma++; - if (mab == 0) - *mb++ = 0.0; - else - *mb++ = (float)maa / (float)mab; - } - } - break; - case TIFF_DOUBLE: - { - double *ma; - float *mb; - uint32_t n; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64_t *)origdata, count); - TIFFCvtIEEEDoubleToNative(tif, count, (double *)origdata); - ma = (double *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - double val = *ma++; - if (val > FLT_MAX) - val = FLT_MAX; - else if (val < -FLT_MAX) - val = -FLT_MAX; - *mb++ = (float)val; - } - } - break; - } - _TIFFfreeExt(tif, origdata); - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryDoubleArray(TIFF *tif, TIFFDirEntry *direntry, double **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - double *data; - switch (direntry->tdir_type) - { - case TIFF_BYTE: - case TIFF_SBYTE: - case TIFF_SHORT: - case TIFF_SSHORT: - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - case TIFF_DOUBLE: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 8, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_DOUBLE: - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64_t *)origdata, count); - TIFFCvtIEEEDoubleToNative(tif, count, (double *)origdata); - *value = (double *)origdata; - return (TIFFReadDirEntryErrOk); - } - data = (double *)_TIFFmallocExt(tif, count * sizeof(double)); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_BYTE: - { - uint8_t *ma; - double *mb; - uint32_t n; - ma = (uint8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (double)(*ma++); - } - break; - case TIFF_SBYTE: - { - int8_t *ma; - double *mb; - uint32_t n; - ma = (int8_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (double)(*ma++); - } - break; - case TIFF_SHORT: - { - uint16_t *ma; - double *mb; - uint32_t n; - ma = (uint16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_SSHORT: - { - int16_t *ma; - double *mb; - uint32_t n; - ma = (int16_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_LONG: - { - uint32_t *ma; - double *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_SLONG: - { - int32_t *ma; - double *mb; - uint32_t n; - ma = (int32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_LONG8: - { - uint64_t *ma; - double *mb; - uint32_t n; - ma = (uint64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_SLONG8: - { - int64_t *ma; - double *mb; - uint32_t n; - ma = (int64_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - *mb++ = (double)(*ma++); - } - } - break; - case TIFF_RATIONAL: - { - uint32_t *ma; - uint32_t maa; - uint32_t mab; - double *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - maa = *ma++; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - mab = *ma++; - if (mab == 0) - *mb++ = 0.0; - else - *mb++ = (double)maa / (double)mab; - } - } - break; - case TIFF_SRATIONAL: - { - uint32_t *ma; - int32_t maa; - uint32_t mab; - double *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - maa = *(int32_t *)ma; - ma++; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - mab = *ma++; - if (mab == 0) - *mb++ = 0.0; - else - *mb++ = (double)maa / (double)mab; - } - } - break; - case TIFF_FLOAT: - { - float *ma; - double *mb; - uint32_t n; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)origdata, count); - TIFFCvtIEEEFloatToNative(tif, count, (float *)origdata); - ma = (float *)origdata; - mb = data; - for (n = 0; n < count; n++) - *mb++ = (double)(*ma++); - } - break; - } - _TIFFfreeExt(tif, origdata); - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryIfd8Array(TIFF *tif, TIFFDirEntry *direntry, uint64_t **value) -{ - enum TIFFReadDirEntryErr err; - uint32_t count; - void *origdata; - uint64_t *data; - switch (direntry->tdir_type) - { - case TIFF_LONG: - case TIFF_LONG8: - case TIFF_IFD: - case TIFF_IFD8: - break; - default: - return (TIFFReadDirEntryErrType); - } - err = TIFFReadDirEntryArray(tif, direntry, &count, 8, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - *value = 0; - return (err); - } - switch (direntry->tdir_type) - { - case TIFF_LONG8: - case TIFF_IFD8: - *value = (uint64_t *)origdata; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8(*value, count); - return (TIFFReadDirEntryErrOk); - } - data = (uint64_t *)_TIFFmallocExt(tif, count * 8); - if (data == 0) - { - _TIFFfreeExt(tif, origdata); - return (TIFFReadDirEntryErrAlloc); - } - switch (direntry->tdir_type) - { - case TIFF_LONG: - case TIFF_IFD: - { - uint32_t *ma; - uint64_t *mb; - uint32_t n; - ma = (uint32_t *)origdata; - mb = data; - for (n = 0; n < count; n++) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(ma); - *mb++ = (uint64_t)(*ma++); - } - } - break; - } - _TIFFfreeExt(tif, origdata); - *value = data; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryPersampleShort(TIFF *tif, TIFFDirEntry *direntry, - uint16_t *value) -{ - enum TIFFReadDirEntryErr err; - uint16_t *m; - uint16_t *na; - uint16_t nb; - if (direntry->tdir_count < (uint64_t)tif->tif_dir.td_samplesperpixel) - return (TIFFReadDirEntryErrCount); - err = TIFFReadDirEntryShortArray(tif, direntry, &m); - if (err != TIFFReadDirEntryErrOk || m == NULL) - return (err); - na = m; - nb = tif->tif_dir.td_samplesperpixel; - *value = *na++; - nb--; - while (nb > 0) - { - if (*na++ != *value) - { - err = TIFFReadDirEntryErrPsdif; - break; - } - nb--; - } - _TIFFfreeExt(tif, m); - return (err); -} - -static void TIFFReadDirEntryCheckedByte(TIFF *tif, TIFFDirEntry *direntry, - uint8_t *value) -{ - (void)tif; - *value = *(uint8_t *)(&direntry->tdir_offset); -} - -static void TIFFReadDirEntryCheckedSbyte(TIFF *tif, TIFFDirEntry *direntry, - int8_t *value) -{ - (void)tif; - *value = *(int8_t *)(&direntry->tdir_offset); -} - -static void TIFFReadDirEntryCheckedShort(TIFF *tif, TIFFDirEntry *direntry, - uint16_t *value) -{ - *value = direntry->tdir_offset.toff_short; - /* *value=*(uint16_t*)(&direntry->tdir_offset); */ - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(value); -} - -static void TIFFReadDirEntryCheckedSshort(TIFF *tif, TIFFDirEntry *direntry, - int16_t *value) -{ - *value = *(int16_t *)(&direntry->tdir_offset); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)value); -} - -static void TIFFReadDirEntryCheckedLong(TIFF *tif, TIFFDirEntry *direntry, - uint32_t *value) -{ - *value = *(uint32_t *)(&direntry->tdir_offset); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(value); -} - -static void TIFFReadDirEntryCheckedSlong(TIFF *tif, TIFFDirEntry *direntry, - int32_t *value) -{ - *value = *(int32_t *)(&direntry->tdir_offset); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)value); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedLong8(TIFF *tif, TIFFDirEntry *direntry, uint64_t *value) -{ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, value); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - *value = direntry->tdir_offset.toff_long8; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(value); - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedSlong8(TIFF *tif, TIFFDirEntry *direntry, int64_t *value) -{ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, value); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - *value = *(int64_t *)(&direntry->tdir_offset); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)value); - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedRational(TIFF *tif, TIFFDirEntry *direntry, - double *value) -{ - UInt64Aligned_t m; - - assert(sizeof(double) == 8); - assert(sizeof(uint64_t) == 8); - assert(sizeof(uint32_t) == 4); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, m.i); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - m.l = direntry->tdir_offset.toff_long8; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m.i, 2); - /* Not completely sure what we should do when m.i[1]==0, but some */ - /* sanitizers do not like division by 0.0: */ - /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ - if (m.i[0] == 0 || m.i[1] == 0) - *value = 0.0; - else - *value = (double)m.i[0] / (double)m.i[1]; - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedSrational(TIFF *tif, TIFFDirEntry *direntry, - double *value) -{ - UInt64Aligned_t m; - assert(sizeof(double) == 8); - assert(sizeof(uint64_t) == 8); - assert(sizeof(int32_t) == 4); - assert(sizeof(uint32_t) == 4); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, m.i); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - m.l = direntry->tdir_offset.toff_long8; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m.i, 2); - /* Not completely sure what we should do when m.i[1]==0, but some */ - /* sanitizers do not like division by 0.0: */ - /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ - if ((int32_t)m.i[0] == 0 || m.i[1] == 0) - *value = 0.0; - else - *value = (double)((int32_t)m.i[0]) / (double)m.i[1]; - return (TIFFReadDirEntryErrOk); -} - -#if 0 -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedRationalDirect(TIFF *tif, TIFFDirEntry *direntry, - TIFFRational_t *value) -{ /*--: SetGetRATIONAL_directly:_CustomTag: Read rational (and signed rationals) - directly --*/ - UInt64Aligned_t m; - - assert(sizeof(double) == 8); - assert(sizeof(uint64_t) == 8); - assert(sizeof(uint32_t) == 4); - - if (direntry->tdir_count != 1) - return (TIFFReadDirEntryErrCount); - - if (direntry->tdir_type != TIFF_RATIONAL && - direntry->tdir_type != TIFF_SRATIONAL) - return (TIFFReadDirEntryErrType); - - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, m.i); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - { - m.l = direntry->tdir_offset.toff_long8; - } - - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m.i, 2); - - value->uNum = m.i[0]; - value->uDenom = m.i[1]; - return (TIFFReadDirEntryErrOk); -} /*-- TIFFReadDirEntryCheckedRationalDirect() --*/ -#endif - -static void TIFFReadDirEntryCheckedFloat(TIFF *tif, TIFFDirEntry *direntry, - float *value) -{ - union - { - float f; - uint32_t i; - } float_union; - assert(sizeof(float) == 4); - assert(sizeof(uint32_t) == 4); - assert(sizeof(float_union) == 4); - float_union.i = *(uint32_t *)(&direntry->tdir_offset); - *value = float_union.f; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)value); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckedDouble(TIFF *tif, TIFFDirEntry *direntry, double *value) -{ - assert(sizeof(double) == 8); - assert(sizeof(uint64_t) == 8); - assert(sizeof(UInt64Aligned_t) == 8); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - enum TIFFReadDirEntryErr err; - uint32_t offset = direntry->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, value); - if (err != TIFFReadDirEntryErrOk) - return (err); - } - else - { - UInt64Aligned_t uint64_union; - uint64_union.l = direntry->tdir_offset.toff_long8; - *value = uint64_union.d; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)value); - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSbyte(int8_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteShort(uint16_t value) -{ - if (value > 0xFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSshort(int16_t value) -{ - if ((value < 0) || (value > 0xFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteLong(uint32_t value) -{ - if (value > 0xFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSlong(int32_t value) -{ - if ((value < 0) || (value > 0xFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteLong8(uint64_t value) -{ - if (value > 0xFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeByteSlong8(int64_t value) -{ - if ((value < 0) || (value > 0xFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteByte(uint8_t value) -{ - if (value > 0x7F) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteShort(uint16_t value) -{ - if (value > 0x7F) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSshort(int16_t value) -{ - if ((value < -0x80) || (value > 0x7F)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteLong(uint32_t value) -{ - if (value > 0x7F) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSlong(int32_t value) -{ - if ((value < -0x80) || (value > 0x7F)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteLong8(uint64_t value) -{ - if (value > 0x7F) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSbyteSlong8(int64_t value) -{ - if ((value < -0x80) || (value > 0x7F)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSbyte(int8_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSshort(int16_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortLong(uint32_t value) -{ - if (value > 0xFFFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSlong(int32_t value) -{ - if ((value < 0) || (value > 0xFFFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortLong8(uint64_t value) -{ - if (value > 0xFFFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeShortSlong8(int64_t value) -{ - if ((value < 0) || (value > 0xFFFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortShort(uint16_t value) -{ - if (value > 0x7FFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortLong(uint32_t value) -{ - if (value > 0x7FFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortSlong(int32_t value) -{ - if ((value < -0x8000) || (value > 0x7FFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortLong8(uint64_t value) -{ - if (value > 0x7FFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSshortSlong8(int64_t value) -{ - if ((value < -0x8000) || (value > 0x7FFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSbyte(int8_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSshort(int16_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSlong(int32_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongLong8(uint64_t value) -{ - if (value > UINT32_MAX) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLongSlong8(int64_t value) -{ - if ((value < 0) || (value > (int64_t)UINT32_MAX)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong(uint32_t value) -{ - if (value > 0x7FFFFFFFUL) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -/* Check that the 8-byte unsigned value can fit in a 4-byte unsigned range */ -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongLong8(uint64_t value) -{ - if (value > 0x7FFFFFFF) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -/* Check that the 8-byte signed value can fit in a 4-byte signed range */ -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlongSlong8(int64_t value) -{ - if ((value < 0 - ((int64_t)0x7FFFFFFF + 1)) || (value > 0x7FFFFFFF)) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sbyte(int8_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Sshort(int16_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong(int32_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeLong8Slong8(int64_t value) -{ - if (value < 0) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr -TIFFReadDirEntryCheckRangeSlong8Long8(uint64_t value) -{ - if (value > INT64_MAX) - return (TIFFReadDirEntryErrRange); - else - return (TIFFReadDirEntryErrOk); -} - -static enum TIFFReadDirEntryErr TIFFReadDirEntryData(TIFF *tif, uint64_t offset, - tmsize_t size, void *dest) -{ - assert(size > 0); - if (!isMapped(tif)) - { - if (!SeekOK(tif, offset)) - return (TIFFReadDirEntryErrIo); - if (!ReadOK(tif, dest, size)) - return (TIFFReadDirEntryErrIo); - } - else - { - size_t ma, mb; - ma = (size_t)offset; - if ((uint64_t)ma != offset || ma > (~(size_t)0) - (size_t)size) - { - return TIFFReadDirEntryErrIo; - } - mb = ma + size; - if (mb > (uint64_t)tif->tif_size) - return (TIFFReadDirEntryErrIo); - _TIFFmemcpy(dest, tif->tif_base + ma, size); - } - return (TIFFReadDirEntryErrOk); -} - -static void TIFFReadDirEntryOutputErr(TIFF *tif, enum TIFFReadDirEntryErr err, - const char *module, const char *tagname, - int recover) -{ - if (!recover) - { - switch (err) - { - case TIFFReadDirEntryErrCount: - TIFFErrorExtR(tif, module, "Incorrect count for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrType: - TIFFErrorExtR(tif, module, "Incompatible type for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrIo: - TIFFErrorExtR(tif, module, "IO error during reading of \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrRange: - TIFFErrorExtR(tif, module, "Incorrect value for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrPsdif: - TIFFErrorExtR( - tif, module, - "Cannot handle different values per sample for \"%s\"", - tagname); - break; - case TIFFReadDirEntryErrSizesan: - TIFFErrorExtR(tif, module, - "Sanity check on size of \"%s\" value failed", - tagname); - break; - case TIFFReadDirEntryErrAlloc: - TIFFErrorExtR(tif, module, "Out of memory reading of \"%s\"", - tagname); - break; - default: - assert(0); /* we should never get here */ - break; - } - } - else - { - switch (err) - { - case TIFFReadDirEntryErrCount: - TIFFWarningExtR(tif, module, - "Incorrect count for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrType: - TIFFWarningExtR(tif, module, - "Incompatible type for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrIo: - TIFFWarningExtR( - tif, module, - "IO error during reading of \"%s\"; tag ignored", tagname); - break; - case TIFFReadDirEntryErrRange: - TIFFWarningExtR(tif, module, - "Incorrect value for \"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrPsdif: - TIFFWarningExtR(tif, module, - "Cannot handle different values per sample for " - "\"%s\"; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrSizesan: - TIFFWarningExtR( - tif, module, - "Sanity check on size of \"%s\" value failed; tag ignored", - tagname); - break; - case TIFFReadDirEntryErrAlloc: - TIFFWarningExtR(tif, module, - "Out of memory reading of \"%s\"; tag ignored", - tagname); - break; - default: - assert(0); /* we should never get here */ - break; - } - } -} - -/* - * Return the maximum number of color channels specified for a given photometric - * type. 0 is returned if photometric type isn't supported or no default value - * is defined by the specification. - */ -static int _TIFFGetMaxColorChannels(uint16_t photometric) -{ - switch (photometric) - { - case PHOTOMETRIC_PALETTE: - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - return 1; - case PHOTOMETRIC_YCBCR: - case PHOTOMETRIC_RGB: - case PHOTOMETRIC_CIELAB: - case PHOTOMETRIC_LOGLUV: - case PHOTOMETRIC_ITULAB: - case PHOTOMETRIC_ICCLAB: - return 3; - case PHOTOMETRIC_SEPARATED: - case PHOTOMETRIC_MASK: - return 4; - case PHOTOMETRIC_LOGL: - case PHOTOMETRIC_CFA: - default: - return 0; - } -} - -static int ByteCountLooksBad(TIFF *tif) -{ - /* - * Assume we have wrong StripByteCount value (in case - * of single strip) in following cases: - * - it is equal to zero along with StripOffset; - * - it is larger than file itself (in case of uncompressed - * image); - * - it is smaller than the size of the bytes per row - * multiplied on the number of rows. The last case should - * not be checked in the case of writing new image, - * because we may do not know the exact strip size - * until the whole image will be written and directory - * dumped out. - */ - uint64_t bytecount = TIFFGetStrileByteCount(tif, 0); - uint64_t offset = TIFFGetStrileOffset(tif, 0); - uint64_t filesize; - - if (offset == 0) - return 0; - if (bytecount == 0) - return 1; - if (tif->tif_dir.td_compression != COMPRESSION_NONE) - return 0; - filesize = TIFFGetFileSize(tif); - if (offset <= filesize && bytecount > filesize - offset) - return 1; - if (tif->tif_mode == O_RDONLY) - { - uint64_t scanlinesize = TIFFScanlineSize64(tif); - if (tif->tif_dir.td_imagelength > 0 && - scanlinesize > UINT64_MAX / tif->tif_dir.td_imagelength) - { - return 1; - } - if (bytecount < scanlinesize * tif->tif_dir.td_imagelength) - return 1; - } - return 0; -} - -/* - * To evaluate the IFD data size when reading, save the offset and data size of - * all data that does not fit into the IFD entries themselves. - */ -static bool EvaluateIFDdatasizeReading(TIFF *tif, TIFFDirEntry *dp) -{ - const uint64_t data_width = TIFFDataWidth(dp->tdir_type); - if (data_width != 0 && dp->tdir_count > UINT64_MAX / data_width) - { - TIFFErrorExtR(tif, "EvaluateIFDdatasizeReading", - "Too large IFD data size"); - return false; - } - const uint64_t datalength = dp->tdir_count * data_width; - if (datalength > ((tif->tif_flags & TIFF_BIGTIFF) ? 0x8U : 0x4U)) - { - if (tif->tif_dir.td_dirdatasize_read > UINT64_MAX - datalength) - { - TIFFErrorExtR(tif, "EvaluateIFDdatasizeReading", - "Too large IFD data size"); - return false; - } - tif->tif_dir.td_dirdatasize_read += datalength; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - /* The offset of TIFFDirEntry are not swapped when read in. That has - * to be done when used. */ - uint32_t offset = dp->tdir_offset.toff_long; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - tif->tif_dir - .td_dirdatasize_offsets[tif->tif_dir.td_dirdatasize_Noffsets] - .offset = (uint64_t)offset; - } - else - { - tif->tif_dir - .td_dirdatasize_offsets[tif->tif_dir.td_dirdatasize_Noffsets] - .offset = dp->tdir_offset.toff_long8; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8( - &tif->tif_dir - .td_dirdatasize_offsets[tif->tif_dir - .td_dirdatasize_Noffsets] - .offset); - } - tif->tif_dir - .td_dirdatasize_offsets[tif->tif_dir.td_dirdatasize_Noffsets] - .length = datalength; - tif->tif_dir.td_dirdatasize_Noffsets++; - } - return true; -} - -/* - * Compare function for qsort() sorting TIFFEntryOffsetAndLength array entries. - */ -static int cmpTIFFEntryOffsetAndLength(const void *a, const void *b) -{ - const TIFFEntryOffsetAndLength *ta = (const TIFFEntryOffsetAndLength *)a; - const TIFFEntryOffsetAndLength *tb = (const TIFFEntryOffsetAndLength *)b; - /* Compare offsets */ - if (ta->offset > tb->offset) - return 1; - else if (ta->offset < tb->offset) - return -1; - else - return 0; -} - -/* - * Determine the IFD data size after reading an IFD from the file that can be - * overwritten and saving it in tif_dir.td_dirdatasize_read. This data size - * includes the IFD entries themselves as well as the data that does not fit - * directly into the IFD entries but is located directly after the IFD entries - * in the file. - */ -static void CalcFinalIFDdatasizeReading(TIFF *tif, uint16_t dircount) -{ - /* IFD data size is only needed if file-writing is enabled. - * This also avoids the seek() to EOF to determine the file size, which - * causes the stdin-streaming-friendly mode of libtiff for GDAL to fail. */ - if (tif->tif_mode == O_RDONLY) - return; - - /* Sort TIFFEntryOffsetAndLength array in ascending order. */ - qsort(tif->tif_dir.td_dirdatasize_offsets, - tif->tif_dir.td_dirdatasize_Noffsets, - sizeof(TIFFEntryOffsetAndLength), cmpTIFFEntryOffsetAndLength); - - /* Get offset of end of IFD entry space. */ - uint64_t IFDendoffset; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - IFDendoffset = tif->tif_diroff + 2 + dircount * 12 + 4; - else - IFDendoffset = tif->tif_diroff + 8 + dircount * 20 + 8; - - /* Check which offsets are right behind IFD entries. However, LibTIFF - * increments the writing address for every external data to an even offset. - * Thus gaps of 1 byte can occur. */ - uint64_t size = 0; - uint64_t offset; - uint32_t i; - for (i = 0; i < tif->tif_dir.td_dirdatasize_Noffsets; i++) - { - offset = tif->tif_dir.td_dirdatasize_offsets[i].offset; - if (offset == IFDendoffset) - { - size += tif->tif_dir.td_dirdatasize_offsets[i].length; - IFDendoffset += tif->tif_dir.td_dirdatasize_offsets[i].length; - } - else if (offset == IFDendoffset + 1) - { - /* Add gap byte after previous IFD data set. */ - size += tif->tif_dir.td_dirdatasize_offsets[i].length + 1; - IFDendoffset += tif->tif_dir.td_dirdatasize_offsets[i].length; - } - else - { - /* Further data is no more continuously after IFD */ - break; - } - } - /* Check for gap byte of some easy cases. This should cover 90% of cases. - * Otherwise, IFD will be re-written even it might be safely overwritten. */ - if (tif->tif_nextdiroff != 0) - { - if (tif->tif_nextdiroff == IFDendoffset + 1) - size++; - } - else - { - /* Check for IFD data ends at EOF. Then IFD can always be safely - * overwritten. */ - offset = TIFFSeekFile(tif, 0, SEEK_END); - if (offset == IFDendoffset) - { - tif->tif_dir.td_dirdatasize_read = UINT64_MAX; - return; - } - } - - /* Finally, add the size of the IFD tag entries themselves. */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_dir.td_dirdatasize_read = 2 + dircount * 12 + 4 + size; - else - tif->tif_dir.td_dirdatasize_read = 8 + dircount * 20 + 8 + size; -} /*-- CalcFinalIFDdatasizeReading() --*/ - -/* - * Read the next TIFF directory from a file and convert it to the internal - * format. We read directories sequentially. - */ -int TIFFReadDirectory(TIFF *tif) -{ - static const char module[] = "TIFFReadDirectory"; - TIFFDirEntry *dir; - uint16_t dircount; - TIFFDirEntry *dp; - uint16_t di; - const TIFFField *fip; - uint32_t fii = FAILED_FII; - toff_t nextdiroff; - int bitspersample_read = FALSE; - int color_channels; - - if (tif->tif_nextdiroff == 0) - { - /* In this special case, tif_diroff needs also to be set to 0. - * This is behind the last IFD, thus no checking or reading necessary. - */ - tif->tif_diroff = tif->tif_nextdiroff; - return 0; - } - - nextdiroff = tif->tif_nextdiroff; - /* tif_curdir++ and tif_nextdiroff should only be updated after SUCCESSFUL - * reading of the directory. Otherwise, invalid IFD offsets could corrupt - * the IFD list. */ - if (!_TIFFCheckDirNumberAndOffset(tif, - tif->tif_curdir == - TIFF_NON_EXISTENT_DIR_NUMBER - ? 0 - : tif->tif_curdir + 1, - nextdiroff)) - { - return 0; /* bad offset (IFD looping or more than TIFF_MAX_DIR_COUNT - IFDs) */ - } - dircount = TIFFFetchDirectory(tif, nextdiroff, &dir, &tif->tif_nextdiroff); - if (!dircount) - { - TIFFErrorExtR(tif, module, - "Failed to read directory at offset %" PRIu64, - nextdiroff); - return 0; - } - /* Set global values after a valid directory has been fetched. - * tif_diroff is already set to nextdiroff in TIFFFetchDirectory() in the - * beginning. */ - if (tif->tif_curdir == TIFF_NON_EXISTENT_DIR_NUMBER) - tif->tif_curdir = 0; - else - tif->tif_curdir++; - - TIFFReadDirectoryCheckOrder(tif, dir, dircount); - - /* - * Mark duplicates of any tag to be ignored (bugzilla 1994) - * to avoid certain pathological problems. - */ - { - TIFFDirEntry *ma; - uint16_t mb; - for (ma = dir, mb = 0; mb < dircount; ma++, mb++) - { - TIFFDirEntry *na; - uint16_t nb; - for (na = ma + 1, nb = mb + 1; nb < dircount; na++, nb++) - { - if (ma->tdir_tag == na->tdir_tag) - { - na->tdir_ignore = TRUE; - } - } - } - } - - tif->tif_flags &= ~TIFF_BEENWRITING; /* reset before new dir */ - tif->tif_flags &= ~TIFF_BUF4WRITE; /* reset before new dir */ - tif->tif_flags &= ~TIFF_CHOPPEDUPARRAYS; - - /* free any old stuff and reinit */ - TIFFFreeDirectory(tif); - TIFFDefaultDirectory(tif); - - /* After setup a fresh directory indicate that now active IFD is also - * present on file, even if its entries could not be read successfully - * below. */ - tif->tif_dir.td_iswrittentofile = TRUE; - - /* Allocate arrays for offset values outside IFD entry for IFD data size - * checking. Note: Counter are reset within TIFFFreeDirectory(). */ - tif->tif_dir.td_dirdatasize_offsets = - (TIFFEntryOffsetAndLength *)_TIFFmallocExt( - tif, dircount * sizeof(TIFFEntryOffsetAndLength)); - if (tif->tif_dir.td_dirdatasize_offsets == NULL) - { - TIFFErrorExtR( - tif, module, - "Failed to allocate memory for counting IFD data size at reading"); - goto bad; - } - /* - * Electronic Arts writes gray-scale TIFF files - * without a PlanarConfiguration directory entry. - * Thus we setup a default value here, even though - * the TIFF spec says there is no default value. - * After PlanarConfiguration is preset in TIFFDefaultDirectory() - * the following setting is not needed, but does not harm either. - */ - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - /* - * Setup default value and then make a pass over - * the fields to check type and tag information, - * and to extract info required to size data - * structures. A second pass is made afterwards - * to read in everything not taken in the first pass. - * But we must process the Compression tag first - * in order to merge in codec-private tag definitions (otherwise - * we may get complaints about unknown tags). However, the - * Compression tag may be dependent on the SamplesPerPixel - * tag value because older TIFF specs permitted Compression - * to be written as a SamplesPerPixel-count tag entry. - * Thus if we don't first figure out the correct SamplesPerPixel - * tag value then we may end up ignoring the Compression tag - * value because it has an incorrect count value (if the - * true value of SamplesPerPixel is not 1). - */ - dp = - TIFFReadDirectoryFindEntry(tif, dir, dircount, TIFFTAG_SAMPLESPERPIXEL); - if (dp) - { - if (!TIFFFetchNormalTag(tif, dp, 0)) - goto bad; - dp->tdir_ignore = TRUE; - } - dp = TIFFReadDirectoryFindEntry(tif, dir, dircount, TIFFTAG_COMPRESSION); - if (dp) - { - /* - * The 5.0 spec says the Compression tag has one value, while - * earlier specs say it has one value per sample. Because of - * this, we accept the tag if one value is supplied with either - * count. - */ - uint16_t value; - enum TIFFReadDirEntryErr err; - err = TIFFReadDirEntryShort(tif, dp, &value); - if (err == TIFFReadDirEntryErrCount) - err = TIFFReadDirEntryPersampleShort(tif, dp, &value); - if (err != TIFFReadDirEntryErrOk) - { - TIFFReadDirEntryOutputErr(tif, err, module, "Compression", 0); - goto bad; - } - if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, value)) - goto bad; - dp->tdir_ignore = TRUE; - } - else - { - if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE)) - goto bad; - } - /* - * First real pass over the directory. - */ - for (di = 0, dp = dir; di < dircount; di++, dp++) - { - if (!dp->tdir_ignore) - { - TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii); - if (fii == FAILED_FII) - { - if (tif->tif_warn_about_unknown_tags) - { - TIFFWarningExtR(tif, module, - "Unknown field with tag %" PRIu16 - " (0x%" PRIx16 ") encountered", - dp->tdir_tag, dp->tdir_tag); - } - /* the following knowingly leaks the - anonymous field structure */ - const TIFFField *fld = _TIFFCreateAnonField( - tif, dp->tdir_tag, (TIFFDataType)dp->tdir_type); - if (fld == NULL || !_TIFFMergeFields(tif, fld, 1)) - { - TIFFWarningExtR( - tif, module, - "Registering anonymous field with tag %" PRIu16 - " (0x%" PRIx16 ") failed", - dp->tdir_tag, dp->tdir_tag); - dp->tdir_ignore = TRUE; - } - else - { - TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii); - assert(fii != FAILED_FII); - } - } - } - if (!dp->tdir_ignore) - { - fip = tif->tif_fields[fii]; - if (fip->field_bit == FIELD_IGNORE) - dp->tdir_ignore = TRUE; - else - { - switch (dp->tdir_tag) - { - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEOFFSETS: - case TIFFTAG_TILEBYTECOUNTS: - TIFFSetFieldBit(tif, fip->field_bit); - break; - case TIFFTAG_IMAGEWIDTH: - case TIFFTAG_IMAGELENGTH: - case TIFFTAG_IMAGEDEPTH: - case TIFFTAG_TILELENGTH: - case TIFFTAG_TILEWIDTH: - case TIFFTAG_TILEDEPTH: - case TIFFTAG_PLANARCONFIG: - case TIFFTAG_ROWSPERSTRIP: - case TIFFTAG_EXTRASAMPLES: - if (!TIFFFetchNormalTag(tif, dp, 0)) - goto bad; - dp->tdir_ignore = TRUE; - break; - default: - if (!_TIFFCheckFieldIsValidForCodec(tif, dp->tdir_tag)) - dp->tdir_ignore = TRUE; - break; - } - } - } - } - /* - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) planarconfig tag says it's separate, - * c) strip offsets/bytecounts tag are both present and - * d) both contain exactly one value, then we consistently find - * that the buggy implementation of the buggy compression scheme - * matches contig planarconfig best. So we 'fix-up' the tag here - */ - if ((tif->tif_dir.td_compression == COMPRESSION_OJPEG) && - (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE)) - { - if (!_TIFFFillStriles(tif)) - goto bad; - dp = TIFFReadDirectoryFindEntry(tif, dir, dircount, - TIFFTAG_STRIPOFFSETS); - if ((dp != 0) && (dp->tdir_count == 1)) - { - dp = TIFFReadDirectoryFindEntry(tif, dir, dircount, - TIFFTAG_STRIPBYTECOUNTS); - if ((dp != 0) && (dp->tdir_count == 1)) - { - tif->tif_dir.td_planarconfig = PLANARCONFIG_CONTIG; - TIFFWarningExtR(tif, module, - "Planarconfig tag value assumed incorrect, " - "assuming data is contig instead of chunky"); - } - } - } - /* - * Allocate directory structure and setup defaults. - */ - if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) - { - MissingRequired(tif, "ImageLength"); - goto bad; - } - - /* - * Second pass: extract other information. - */ - for (di = 0, dp = dir; di < dircount; di++, dp++) - { - if (!dp->tdir_ignore) - { - switch (dp->tdir_tag) - { - case TIFFTAG_MINSAMPLEVALUE: - case TIFFTAG_MAXSAMPLEVALUE: - case TIFFTAG_BITSPERSAMPLE: - case TIFFTAG_DATATYPE: - case TIFFTAG_SAMPLEFORMAT: - /* - * The MinSampleValue, MaxSampleValue, BitsPerSample - * DataType and SampleFormat tags are supposed to be - * written as one value/sample, but some vendors - * incorrectly write one value only -- so we accept - * that as well (yuck). Other vendors write correct - * value for NumberOfSamples, but incorrect one for - * BitsPerSample and friends, and we will read this - * too. - */ - { - uint16_t value; - enum TIFFReadDirEntryErr err; - err = TIFFReadDirEntryShort(tif, dp, &value); - if (!EvaluateIFDdatasizeReading(tif, dp)) - goto bad; - if (err == TIFFReadDirEntryErrCount) - err = - TIFFReadDirEntryPersampleShort(tif, dp, &value); - if (err != TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFReadDirEntryOutputErr( - tif, err, module, - fip ? fip->field_name : "unknown tagname", 0); - goto bad; - } - if (!TIFFSetField(tif, dp->tdir_tag, value)) - goto bad; - if (dp->tdir_tag == TIFFTAG_BITSPERSAMPLE) - bitspersample_read = TRUE; - } - break; - case TIFFTAG_SMINSAMPLEVALUE: - case TIFFTAG_SMAXSAMPLEVALUE: - { - - double *data = NULL; - enum TIFFReadDirEntryErr err; - uint32_t saved_flags; - int m; - if (dp->tdir_count != - (uint64_t)tif->tif_dir.td_samplesperpixel) - err = TIFFReadDirEntryErrCount; - else - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (!EvaluateIFDdatasizeReading(tif, dp)) - goto bad; - if (err != TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFReadDirEntryOutputErr( - tif, err, module, - fip ? fip->field_name : "unknown tagname", 0); - goto bad; - } - saved_flags = tif->tif_flags; - tif->tif_flags |= TIFF_PERSAMPLE; - m = TIFFSetField(tif, dp->tdir_tag, data); - tif->tif_flags = saved_flags; - _TIFFfreeExt(tif, data); - if (!m) - goto bad; - } - break; - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_TILEOFFSETS: - { - switch (dp->tdir_type) - { - case TIFF_SHORT: - case TIFF_LONG: - case TIFF_LONG8: - break; - default: - /* Warn except if directory typically created with - * TIFFDeferStrileArrayWriting() */ - if (!(tif->tif_mode == O_RDWR && - dp->tdir_count == 0 && dp->tdir_type == 0 && - dp->tdir_offset.toff_long8 == 0)) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFWarningExtR( - tif, module, "Invalid data type for tag %s", - fip ? fip->field_name : "unknown tagname"); - } - break; - } - _TIFFmemcpy(&(tif->tif_dir.td_stripoffset_entry), dp, - sizeof(TIFFDirEntry)); - if (!EvaluateIFDdatasizeReading(tif, dp)) - goto bad; - } - break; - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEBYTECOUNTS: - { - switch (dp->tdir_type) - { - case TIFF_SHORT: - case TIFF_LONG: - case TIFF_LONG8: - break; - default: - /* Warn except if directory typically created with - * TIFFDeferStrileArrayWriting() */ - if (!(tif->tif_mode == O_RDWR && - dp->tdir_count == 0 && dp->tdir_type == 0 && - dp->tdir_offset.toff_long8 == 0)) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFWarningExtR( - tif, module, "Invalid data type for tag %s", - fip ? fip->field_name : "unknown tagname"); - } - break; - } - _TIFFmemcpy(&(tif->tif_dir.td_stripbytecount_entry), dp, - sizeof(TIFFDirEntry)); - if (!EvaluateIFDdatasizeReading(tif, dp)) - goto bad; - } - break; - case TIFFTAG_COLORMAP: - case TIFFTAG_TRANSFERFUNCTION: - { - enum TIFFReadDirEntryErr err; - uint32_t countpersample; - uint32_t countrequired; - uint32_t incrementpersample; - uint16_t *value = NULL; - /* It would be dangerous to instantiate those tag values */ - /* since if td_bitspersample has not yet been read (due to - */ - /* unordered tags), it could be read afterwards with a */ - /* values greater than the default one (1), which may cause - */ - /* crashes in user code */ - if (!bitspersample_read) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFWarningExtR( - tif, module, - "Ignoring %s since BitsPerSample tag not found", - fip ? fip->field_name : "unknown tagname"); - continue; - } - /* ColorMap or TransferFunction for high bit */ - /* depths do not make much sense and could be */ - /* used as a denial of service vector */ - if (tif->tif_dir.td_bitspersample > 24) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFWarningExtR( - tif, module, - "Ignoring %s because BitsPerSample=%" PRIu16 ">24", - fip ? fip->field_name : "unknown tagname", - tif->tif_dir.td_bitspersample); - continue; - } - countpersample = (1U << tif->tif_dir.td_bitspersample); - if ((dp->tdir_tag == TIFFTAG_TRANSFERFUNCTION) && - (dp->tdir_count == (uint64_t)countpersample)) - { - countrequired = countpersample; - incrementpersample = 0; - } - else - { - countrequired = 3 * countpersample; - incrementpersample = countpersample; - } - if (dp->tdir_count != (uint64_t)countrequired) - err = TIFFReadDirEntryErrCount; - else - err = TIFFReadDirEntryShortArray(tif, dp, &value); - if (!EvaluateIFDdatasizeReading(tif, dp)) - goto bad; - if (err != TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFReadDirEntryOutputErr( - tif, err, module, - fip ? fip->field_name : "unknown tagname", 1); - } - else - { - TIFFSetField(tif, dp->tdir_tag, value, - value + incrementpersample, - value + 2 * incrementpersample); - _TIFFfreeExt(tif, value); - } - } - break; - /* BEGIN REV 4.0 COMPATIBILITY */ - case TIFFTAG_OSUBFILETYPE: - { - uint16_t valueo; - uint32_t value; - if (TIFFReadDirEntryShort(tif, dp, &valueo) == - TIFFReadDirEntryErrOk) - { - switch (valueo) - { - case OFILETYPE_REDUCEDIMAGE: - value = FILETYPE_REDUCEDIMAGE; - break; - case OFILETYPE_PAGE: - value = FILETYPE_PAGE; - break; - default: - value = 0; - break; - } - if (value != 0) - TIFFSetField(tif, TIFFTAG_SUBFILETYPE, value); - } - } - break; - /* END REV 4.0 COMPATIBILITY */ -#if 0 - case TIFFTAG_EP_BATTERYLEVEL: - /* TIFFTAG_EP_BATTERYLEVEL can be RATIONAL or ASCII. - * LibTiff defines it as ASCII and converts RATIONAL to an - * ASCII string. */ - switch (dp->tdir_type) - { - case TIFF_RATIONAL: - { - /* Read rational and convert to ASCII*/ - enum TIFFReadDirEntryErr err; - TIFFRational_t rValue; - err = TIFFReadDirEntryCheckedRationalDirect( - tif, dp, &rValue); - if (err != TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFReadDirEntryOutputErr( - tif, err, module, - fip ? fip->field_name : "unknown tagname", - 1); - } - else - { - char szAux[32]; - snprintf(szAux, sizeof(szAux) - 1, "%d/%d", - rValue.uNum, rValue.uDenom); - TIFFSetField(tif, dp->tdir_tag, szAux); - } - } - break; - case TIFF_ASCII: - (void)TIFFFetchNormalTag(tif, dp, TRUE); - break; - default: - fip = TIFFFieldWithTag(tif, dp->tdir_tag); - TIFFWarningExtR(tif, module, - "Invalid data type for tag %s. " - "ASCII or RATIONAL expected", - fip ? fip->field_name - : "unknown tagname"); - break; - } - break; -#endif - default: - (void)TIFFFetchNormalTag(tif, dp, TRUE); - break; - } /* -- switch (dp->tdir_tag) -- */ - } /* -- if (!dp->tdir_ignore) */ - } /* -- for-loop -- */ - - /* Evaluate final IFD data size. */ - CalcFinalIFDdatasizeReading(tif, dircount); - - /* - * OJPEG hack: - * - If a) compression is OJPEG, and b) photometric tag is missing, - * then we consistently find that photometric should be YCbCr - * - If a) compression is OJPEG, and b) photometric tag says it's RGB, - * then we consistently find that the buggy implementation of the - * buggy compression scheme matches photometric YCbCr instead. - * - If a) compression is OJPEG, and b) bitspersample tag is missing, - * then we consistently find bitspersample should be 8. - * - If a) compression is OJPEG, b) samplesperpixel tag is missing, - * and c) photometric is RGB or YCbCr, then we consistently find - * samplesperpixel should be 3 - * - If a) compression is OJPEG, b) samplesperpixel tag is missing, - * and c) photometric is MINISWHITE or MINISBLACK, then we consistently - * find samplesperpixel should be 3 - */ - if (tif->tif_dir.td_compression == COMPRESSION_OJPEG) - { - if (!TIFFFieldSet(tif, FIELD_PHOTOMETRIC)) - { - TIFFWarningExtR( - tif, module, - "Photometric tag is missing, assuming data is YCbCr"); - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR)) - goto bad; - } - else if (tif->tif_dir.td_photometric == PHOTOMETRIC_RGB) - { - tif->tif_dir.td_photometric = PHOTOMETRIC_YCBCR; - TIFFWarningExtR(tif, module, - "Photometric tag value assumed incorrect, " - "assuming data is YCbCr instead of RGB"); - } - if (!TIFFFieldSet(tif, FIELD_BITSPERSAMPLE)) - { - TIFFWarningExtR( - tif, module, - "BitsPerSample tag is missing, assuming 8 bits per sample"); - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) - goto bad; - } - if (!TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) - { - if (tif->tif_dir.td_photometric == PHOTOMETRIC_RGB) - { - TIFFWarningExtR(tif, module, - "SamplesPerPixel tag is missing, " - "assuming correct SamplesPerPixel value is 3"); - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) - goto bad; - } - if (tif->tif_dir.td_photometric == PHOTOMETRIC_YCBCR) - { - TIFFWarningExtR(tif, module, - "SamplesPerPixel tag is missing, " - "applying correct SamplesPerPixel value of 3"); - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) - goto bad; - } - else if ((tif->tif_dir.td_photometric == PHOTOMETRIC_MINISWHITE) || - (tif->tif_dir.td_photometric == PHOTOMETRIC_MINISBLACK)) - { - /* - * SamplesPerPixel tag is missing, but is not required - * by spec. Assume correct SamplesPerPixel value of 1. - */ - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1)) - goto bad; - } - } - } - - /* - * Setup appropriate structures (by strip or by tile) - * We do that only after the above OJPEG hack which alters SamplesPerPixel - * and thus influences the number of strips in the separate planarconfig. - */ - if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) - { - tif->tif_dir.td_nstrips = TIFFNumberOfStrips(tif); - tif->tif_dir.td_tilewidth = tif->tif_dir.td_imagewidth; - tif->tif_dir.td_tilelength = tif->tif_dir.td_rowsperstrip; - tif->tif_dir.td_tiledepth = tif->tif_dir.td_imagedepth; - tif->tif_flags &= ~TIFF_ISTILED; - } - else - { - tif->tif_dir.td_nstrips = TIFFNumberOfTiles(tif); - tif->tif_flags |= TIFF_ISTILED; - } - if (!tif->tif_dir.td_nstrips) - { - TIFFErrorExtR(tif, module, "Cannot handle zero number of %s", - isTiled(tif) ? "tiles" : "strips"); - goto bad; - } - tif->tif_dir.td_stripsperimage = tif->tif_dir.td_nstrips; - if (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE) - tif->tif_dir.td_stripsperimage /= tif->tif_dir.td_samplesperpixel; - if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) - { -#ifdef OJPEG_SUPPORT - if ((tif->tif_dir.td_compression == COMPRESSION_OJPEG) && - (isTiled(tif) == 0) && (tif->tif_dir.td_nstrips == 1)) - { - /* - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) it's not a tiled TIFF, - * and c) the number of strips is 1, - * then we tolerate the absence of stripoffsets tag, - * because, presumably, all required data is in the - * JpegInterchangeFormat stream. - */ - TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); - } - else -#endif - { - MissingRequired(tif, isTiled(tif) ? "TileOffsets" : "StripOffsets"); - goto bad; - } - } - - if (tif->tif_mode == O_RDWR && - tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && - tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0) - { - /* Directory typically created with TIFFDeferStrileArrayWriting() */ - TIFFSetupStrips(tif); - } - else if (!(tif->tif_flags & TIFF_DEFERSTRILELOAD)) - { - if (tif->tif_dir.td_stripoffset_entry.tdir_tag != 0) - { - if (!TIFFFetchStripThing(tif, &(tif->tif_dir.td_stripoffset_entry), - tif->tif_dir.td_nstrips, - &tif->tif_dir.td_stripoffset_p)) - { - goto bad; - } - } - if (tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0) - { - if (!TIFFFetchStripThing( - tif, &(tif->tif_dir.td_stripbytecount_entry), - tif->tif_dir.td_nstrips, &tif->tif_dir.td_stripbytecount_p)) - { - goto bad; - } - } - } - - /* - * Make sure all non-color channels are extrasamples. - * If it's not the case, define them as such. - */ - color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric); - if (color_channels && - tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > - color_channels) - { - uint16_t old_extrasamples; - uint16_t *new_sampleinfo; - - TIFFWarningExtR( - tif, module, - "Sum of Photometric type-related " - "color channels and ExtraSamples doesn't match SamplesPerPixel. " - "Defining non-color channels as ExtraSamples."); - - old_extrasamples = tif->tif_dir.td_extrasamples; - tif->tif_dir.td_extrasamples = - (uint16_t)(tif->tif_dir.td_samplesperpixel - color_channels); - - // sampleinfo should contain information relative to these new extra - // samples - new_sampleinfo = (uint16_t *)_TIFFcallocExt( - tif, tif->tif_dir.td_extrasamples, sizeof(uint16_t)); - if (!new_sampleinfo) - { - TIFFErrorExtR(tif, module, - "Failed to allocate memory for " - "temporary new sampleinfo array " - "(%" PRIu16 " 16 bit elements)", - tif->tif_dir.td_extrasamples); - goto bad; - } - - if (old_extrasamples > 0) - memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, - old_extrasamples * sizeof(uint16_t)); - _TIFFsetShortArrayExt(tif, &tif->tif_dir.td_sampleinfo, new_sampleinfo, - tif->tif_dir.td_extrasamples); - _TIFFfreeExt(tif, new_sampleinfo); - } - - /* - * Verify Palette image has a Colormap. - */ - if (tif->tif_dir.td_photometric == PHOTOMETRIC_PALETTE && - !TIFFFieldSet(tif, FIELD_COLORMAP)) - { - if (tif->tif_dir.td_bitspersample >= 8 && - tif->tif_dir.td_samplesperpixel == 3) - tif->tif_dir.td_photometric = PHOTOMETRIC_RGB; - else if (tif->tif_dir.td_bitspersample >= 8) - tif->tif_dir.td_photometric = PHOTOMETRIC_MINISBLACK; - else - { - MissingRequired(tif, "Colormap"); - goto bad; - } - } - /* - * OJPEG hack: - * We do no further messing with strip/tile offsets/bytecounts in OJPEG - * TIFFs - */ - if (tif->tif_dir.td_compression != COMPRESSION_OJPEG) - { - /* - * Attempt to deal with a missing StripByteCounts tag. - */ - if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) - { - /* - * Some manufacturers violate the spec by not giving - * the size of the strips. In this case, assume there - * is one uncompressed strip of data. - */ - if ((tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && - tif->tif_dir.td_nstrips > 1) || - (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE && - tif->tif_dir.td_nstrips != - (uint32_t)tif->tif_dir.td_samplesperpixel)) - { - MissingRequired(tif, "StripByteCounts"); - goto bad; - } - TIFFWarningExtR( - tif, module, - "TIFF directory is missing required " - "\"StripByteCounts\" field, calculating from imagelength"); - if (EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; - } - else if (tif->tif_dir.td_nstrips == 1 && - !(tif->tif_flags & TIFF_ISTILED) && ByteCountLooksBad(tif)) - { - /* - * XXX: Plexus (and others) sometimes give a value of - * zero for a tag when they don't know what the - * correct value is! Try and handle the simple case - * of estimating the size of a one strip image. - */ - TIFFWarningExtR(tif, module, - "Bogus \"StripByteCounts\" field, ignoring and " - "calculating from imagelength"); - if (EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; - } - else if (!(tif->tif_flags & TIFF_DEFERSTRILELOAD) && - tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && - tif->tif_dir.td_nstrips > 2 && - tif->tif_dir.td_compression == COMPRESSION_NONE && - TIFFGetStrileByteCount(tif, 0) != - TIFFGetStrileByteCount(tif, 1) && - TIFFGetStrileByteCount(tif, 0) != 0 && - TIFFGetStrileByteCount(tif, 1) != 0) - { - /* - * XXX: Some vendors fill StripByteCount array with - * absolutely wrong values (it can be equal to - * StripOffset array, for example). Catch this case - * here. - * - * We avoid this check if deferring strile loading - * as it would always force us to load the strip/tile - * information. - */ - TIFFWarningExtR(tif, module, - "Wrong \"StripByteCounts\" field, ignoring and " - "calculating from imagelength"); - if (EstimateStripByteCounts(tif, dir, dircount) < 0) - goto bad; - } - } - if (dir) - { - _TIFFfreeExt(tif, dir); - dir = NULL; - } - if (!TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE)) - { - if (tif->tif_dir.td_bitspersample >= 16) - tif->tif_dir.td_maxsamplevalue = 0xFFFF; - else - tif->tif_dir.td_maxsamplevalue = - (uint16_t)((1L << tif->tif_dir.td_bitspersample) - 1); - } - -#ifdef STRIPBYTECOUNTSORTED_UNUSED - /* - * XXX: We can optimize checking for the strip bounds using the sorted - * bytecounts array. See also comments for TIFFAppendToStrip() - * function in tif_write.c. - */ - if (!(tif->tif_flags & TIFF_DEFERSTRILELOAD) && tif->tif_dir.td_nstrips > 1) - { - uint32_t strip; - - tif->tif_dir.td_stripbytecountsorted = 1; - for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) - { - if (TIFFGetStrileOffset(tif, strip - 1) > - TIFFGetStrileOffset(tif, strip)) - { - tif->tif_dir.td_stripbytecountsorted = 0; - break; - } - } - } -#endif - - /* - * An opportunity for compression mode dependent tag fixup - */ - (*tif->tif_fixuptags)(tif); - - /* - * Some manufacturers make life difficult by writing - * large amounts of uncompressed data as a single strip. - * This is contrary to the recommendations of the spec. - * The following makes an attempt at breaking such images - * into strips closer to the recommended 8k bytes. A - * side effect, however, is that the RowsPerStrip tag - * value may be changed. - */ - if ((tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG) && - (tif->tif_dir.td_nstrips == 1) && - (tif->tif_dir.td_compression == COMPRESSION_NONE) && - ((tif->tif_flags & (TIFF_STRIPCHOP | TIFF_ISTILED)) == TIFF_STRIPCHOP)) - { - ChopUpSingleUncompressedStrip(tif); - } - - /* There are also uncompressed striped files with strips larger than */ - /* 2 GB, which make them unfriendly with a lot of code. If possible, */ - /* try to expose smaller "virtual" strips. */ - if (tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && - tif->tif_dir.td_compression == COMPRESSION_NONE && - (tif->tif_flags & (TIFF_STRIPCHOP | TIFF_ISTILED)) == TIFF_STRIPCHOP && - TIFFStripSize64(tif) > 0x7FFFFFFFUL) - { - TryChopUpUncompressedBigTiff(tif); - } - - /* - * Clear the dirty directory flag. - */ - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - - /* - * Reinitialize i/o since we are starting on a new directory. - */ - tif->tif_row = (uint32_t)-1; - tif->tif_curstrip = (uint32_t)-1; - tif->tif_col = (uint32_t)-1; - tif->tif_curtile = (uint32_t)-1; - tif->tif_tilesize = (tmsize_t)-1; - - tif->tif_scanlinesize = TIFFScanlineSize(tif); - if (!tif->tif_scanlinesize) - { - TIFFErrorExtR(tif, module, "Cannot handle zero scanline size"); - return (0); - } - - if (isTiled(tif)) - { - tif->tif_tilesize = TIFFTileSize(tif); - if (!tif->tif_tilesize) - { - TIFFErrorExtR(tif, module, "Cannot handle zero tile size"); - return (0); - } - } - else - { - if (!TIFFStripSize(tif)) - { - TIFFErrorExtR(tif, module, "Cannot handle zero strip size"); - return (0); - } - } - return (1); -bad: - if (dir) - _TIFFfreeExt(tif, dir); - return (0); -} /*-- TIFFReadDirectory() --*/ - -static void TIFFReadDirectoryCheckOrder(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount) -{ - static const char module[] = "TIFFReadDirectoryCheckOrder"; - uint32_t m; - uint16_t n; - TIFFDirEntry *o; - m = 0; - for (n = 0, o = dir; n < dircount; n++, o++) - { - if (o->tdir_tag < m) - { - TIFFWarningExtR(tif, module, - "Invalid TIFF directory; tags are not sorted in " - "ascending order"); - break; - } - m = o->tdir_tag + 1; - } -} - -static TIFFDirEntry *TIFFReadDirectoryFindEntry(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount, - uint16_t tagid) -{ - TIFFDirEntry *m; - uint16_t n; - (void)tif; - for (m = dir, n = 0; n < dircount; m++, n++) - { - if (m->tdir_tag == tagid) - return (m); - } - return (0); -} - -static void TIFFReadDirectoryFindFieldInfo(TIFF *tif, uint16_t tagid, - uint32_t *fii) -{ - int32_t ma, mb, mc; - ma = -1; - mc = (int32_t)tif->tif_nfields; - while (1) - { - if (ma + 1 == mc) - { - *fii = FAILED_FII; - return; - } - mb = (ma + mc) / 2; - if (tif->tif_fields[mb]->field_tag == (uint32_t)tagid) - break; - if (tif->tif_fields[mb]->field_tag < (uint32_t)tagid) - ma = mb; - else - mc = mb; - } - while (1) - { - if (mb == 0) - break; - if (tif->tif_fields[mb - 1]->field_tag != (uint32_t)tagid) - break; - mb--; - } - *fii = mb; -} - -/* - * Read custom directory from the arbitrary offset. - * The code is very similar to TIFFReadDirectory(). - */ -int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, - const TIFFFieldArray *infoarray) -{ - static const char module[] = "TIFFReadCustomDirectory"; - TIFFDirEntry *dir; - uint16_t dircount; - TIFFDirEntry *dp; - uint16_t di; - const TIFFField *fip; - uint32_t fii; - - assert(infoarray != NULL); - dircount = TIFFFetchDirectory(tif, diroff, &dir, NULL); - if (!dircount) - { - TIFFErrorExtR(tif, module, - "Failed to read custom directory at offset %" PRIu64, - diroff); - return 0; - } - TIFFReadDirectoryCheckOrder(tif, dir, dircount); - - /* - * Mark duplicates of any tag to be ignored (bugzilla 1994) - * to avoid certain pathological problems. - */ - { - TIFFDirEntry *ma; - uint16_t mb; - for (ma = dir, mb = 0; mb < dircount; ma++, mb++) - { - TIFFDirEntry *na; - uint16_t nb; - for (na = ma + 1, nb = mb + 1; nb < dircount; na++, nb++) - { - if (ma->tdir_tag == na->tdir_tag) - { - na->tdir_ignore = TRUE; - } - } - } - } - - /* Free any old stuff and reinit. */ - TIFFFreeDirectory(tif); - /* Even if custom directories do not need the default settings of a standard - * IFD, the pointer to the TIFFSetField() and TIFFGetField() (i.e. - * tif->tif_tagmethods.vsetfield and tif->tif_tagmethods.vgetfield) need to - * be initialized, which is done in TIFFDefaultDirectory(). - * After that, the field array for the custom tags needs to be setup again. - */ - TIFFDefaultDirectory(tif); - _TIFFSetupFields(tif, infoarray); - - /* Allocate arrays for offset values outside IFD entry for IFD data size - * checking. Note: Counter are reset within TIFFFreeDirectory(). */ - tif->tif_dir.td_dirdatasize_offsets = - (TIFFEntryOffsetAndLength *)_TIFFmallocExt( - tif, dircount * sizeof(TIFFEntryOffsetAndLength)); - if (tif->tif_dir.td_dirdatasize_offsets == NULL) - { - TIFFErrorExtR( - tif, module, - "Failed to allocate memory for counting IFD data size at reading"); - if (dir) - _TIFFfreeExt(tif, dir); - return 0; - } - - for (di = 0, dp = dir; di < dircount; di++, dp++) - { - TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii); - if (fii == FAILED_FII) - { - if (tif->tif_warn_about_unknown_tags) - { - TIFFWarningExtR(tif, module, - "Unknown field with tag %" PRIu16 " (0x%" PRIx16 - ") encountered", - dp->tdir_tag, dp->tdir_tag); - } - const TIFFField *fld = _TIFFCreateAnonField( - tif, dp->tdir_tag, (TIFFDataType)dp->tdir_type); - if (fld == NULL || !_TIFFMergeFields(tif, fld, 1)) - { - if (tif->tif_warn_about_unknown_tags) - { - TIFFWarningExtR( - tif, module, - "Registering anonymous field with tag %" PRIu16 - " (0x%" PRIx16 ") failed", - dp->tdir_tag, dp->tdir_tag); - } - dp->tdir_ignore = TRUE; - } - else - { - TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii); - assert(fii != FAILED_FII); - } - } - if (!dp->tdir_ignore) - { - fip = tif->tif_fields[fii]; - if (fip->field_bit == FIELD_IGNORE) - dp->tdir_ignore = TRUE; - else - { - /* check data type */ - while ((fip->field_type != TIFF_ANY) && - (fip->field_type != dp->tdir_type)) - { - fii++; - if ((fii == tif->tif_nfields) || - (tif->tif_fields[fii]->field_tag != - (uint32_t)dp->tdir_tag)) - { - fii = 0xFFFF; - break; - } - fip = tif->tif_fields[fii]; - } - if (fii == 0xFFFF) - { - TIFFWarningExtR(tif, module, - "Wrong data type %" PRIu16 - " for \"%s\"; tag ignored", - dp->tdir_type, fip->field_name); - dp->tdir_ignore = TRUE; - } - else - { - /* check count if known in advance */ - if ((fip->field_readcount != TIFF_VARIABLE) && - (fip->field_readcount != TIFF_VARIABLE2)) - { - uint32_t expected; - if (fip->field_readcount == TIFF_SPP) - expected = - (uint32_t)tif->tif_dir.td_samplesperpixel; - else - expected = (uint32_t)fip->field_readcount; - if (!CheckDirCount(tif, dp, expected)) - dp->tdir_ignore = TRUE; - } - } - } - if (!dp->tdir_ignore) - { - switch (dp->tdir_tag) - { - case EXIFTAG_SUBJECTDISTANCE: - if (!TIFFFieldIsAnonymous(fip)) - { - /* should only be called on a Exif directory */ - /* when exifFields[] is active */ - (void)TIFFFetchSubjectDistance(tif, dp); - } - else - { - (void)TIFFFetchNormalTag(tif, dp, TRUE); - } - break; - default: - (void)TIFFFetchNormalTag(tif, dp, TRUE); - break; - } - } /*-- if (!dp->tdir_ignore) */ - } - } - /* Evaluate final IFD data size. */ - CalcFinalIFDdatasizeReading(tif, dircount); - - /* To be able to return from SubIFD or custom-IFD to main-IFD */ - tif->tif_setdirectory_force_absolute = TRUE; - if (dir) - _TIFFfreeExt(tif, dir); - return 1; -} - -/* - * EXIF is important special case of custom IFD, so we have a special - * function to read it. - */ -int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff) -{ - return TIFFReadCustomDirectory(tif, diroff, _TIFFGetExifFields()); -} - -/* - *--: EXIF-GPS custom directory reading as another special case of custom IFD. - */ -int TIFFReadGPSDirectory(TIFF *tif, toff_t diroff) -{ - return TIFFReadCustomDirectory(tif, diroff, _TIFFGetGpsFields()); -} - -static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, - uint16_t dircount) -{ - static const char module[] = "EstimateStripByteCounts"; - - TIFFDirEntry *dp; - TIFFDirectory *td = &tif->tif_dir; - uint32_t strip; - - /* Do not try to load stripbytecount as we will compute it */ - if (!_TIFFFillStrilesInternal(tif, 0)) - return -1; - - const uint64_t allocsize = (uint64_t)td->td_nstrips * sizeof(uint64_t); - uint64_t filesize = 0; - if (allocsize > 100 * 1024 * 1024) - { - /* Before allocating a huge amount of memory for corrupted files, check - * if size of requested memory is not greater than file size. */ - filesize = TIFFGetFileSize(tif); - if (allocsize > filesize) - { - TIFFWarningExtR( - tif, module, - "Requested memory size for StripByteCounts of %" PRIu64 - " is greater than filesize %" PRIu64 ". Memory not allocated", - allocsize, filesize); - return -1; - } - } - - if (td->td_stripbytecount_p) - _TIFFfreeExt(tif, td->td_stripbytecount_p); - td->td_stripbytecount_p = (uint64_t *)_TIFFCheckMalloc( - tif, td->td_nstrips, sizeof(uint64_t), "for \"StripByteCounts\" array"); - if (td->td_stripbytecount_p == NULL) - return -1; - - if (td->td_compression != COMPRESSION_NONE) - { - uint64_t space; - uint16_t n; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - space = sizeof(TIFFHeaderClassic) + 2 + dircount * 12 + 4; - else - space = sizeof(TIFFHeaderBig) + 8 + dircount * 20 + 8; - /* calculate amount of space used by indirect values */ - for (dp = dir, n = dircount; n > 0; n--, dp++) - { - uint32_t typewidth; - uint64_t datasize; - typewidth = TIFFDataWidth((TIFFDataType)dp->tdir_type); - if (typewidth == 0) - { - TIFFErrorExtR( - tif, module, - "Cannot determine size of unknown tag type %" PRIu16, - dp->tdir_type); - return -1; - } - if (dp->tdir_count > UINT64_MAX / typewidth) - return -1; - datasize = (uint64_t)typewidth * dp->tdir_count; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (datasize <= 4) - datasize = 0; - } - else - { - if (datasize <= 8) - datasize = 0; - } - if (space > UINT64_MAX - datasize) - return -1; - space += datasize; - } - if (filesize == 0) - filesize = TIFFGetFileSize(tif); - if (filesize < space) - /* we should perhaps return in error ? */ - space = filesize; - else - space = filesize - space; - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - space /= td->td_samplesperpixel; - for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount_p[strip] = space; - /* - * This gross hack handles the case were the offset to - * the last strip is past the place where we think the strip - * should begin. Since a strip of data must be contiguous, - * it's safe to assume that we've overestimated the amount - * of data in the strip and trim this number back accordingly. - */ - strip--; - if (td->td_stripoffset_p[strip] > - UINT64_MAX - td->td_stripbytecount_p[strip]) - return -1; - if (td->td_stripoffset_p[strip] + td->td_stripbytecount_p[strip] > - filesize) - { - if (td->td_stripoffset_p[strip] >= filesize) - { - /* Not sure what we should in that case... */ - td->td_stripbytecount_p[strip] = 0; - } - else - { - td->td_stripbytecount_p[strip] = - filesize - td->td_stripoffset_p[strip]; - } - } - } - else if (isTiled(tif)) - { - uint64_t bytespertile = TIFFTileSize64(tif); - - for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount_p[strip] = bytespertile; - } - else - { - uint64_t rowbytes = TIFFScanlineSize64(tif); - uint32_t rowsperstrip = td->td_imagelength / td->td_stripsperimage; - for (strip = 0; strip < td->td_nstrips; strip++) - { - if (rowbytes > 0 && rowsperstrip > UINT64_MAX / rowbytes) - return -1; - td->td_stripbytecount_p[strip] = rowbytes * rowsperstrip; - } - } - TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); - if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) - td->td_rowsperstrip = td->td_imagelength; - return 1; -} - -static void MissingRequired(TIFF *tif, const char *tagname) -{ - static const char module[] = "MissingRequired"; - - TIFFErrorExtR(tif, module, - "TIFF directory is missing required \"%s\" field", tagname); -} - -static unsigned long hashFuncOffsetToNumber(const void *elt) -{ - const TIFFOffsetAndDirNumber *offsetAndDirNumber = - (const TIFFOffsetAndDirNumber *)elt; - const uint32_t hash = (uint32_t)(offsetAndDirNumber->offset >> 32) ^ - ((uint32_t)offsetAndDirNumber->offset & 0xFFFFFFFFU); - return hash; -} - -static bool equalFuncOffsetToNumber(const void *elt1, const void *elt2) -{ - const TIFFOffsetAndDirNumber *offsetAndDirNumber1 = - (const TIFFOffsetAndDirNumber *)elt1; - const TIFFOffsetAndDirNumber *offsetAndDirNumber2 = - (const TIFFOffsetAndDirNumber *)elt2; - return offsetAndDirNumber1->offset == offsetAndDirNumber2->offset; -} - -static unsigned long hashFuncNumberToOffset(const void *elt) -{ - const TIFFOffsetAndDirNumber *offsetAndDirNumber = - (const TIFFOffsetAndDirNumber *)elt; - return offsetAndDirNumber->dirNumber; -} - -static bool equalFuncNumberToOffset(const void *elt1, const void *elt2) -{ - const TIFFOffsetAndDirNumber *offsetAndDirNumber1 = - (const TIFFOffsetAndDirNumber *)elt1; - const TIFFOffsetAndDirNumber *offsetAndDirNumber2 = - (const TIFFOffsetAndDirNumber *)elt2; - return offsetAndDirNumber1->dirNumber == offsetAndDirNumber2->dirNumber; -} - -/* - * Check the directory number and offset against the list of already seen - * directory numbers and offsets. This is a trick to prevent IFD looping. - * The one can create TIFF file with looped directory pointers. We will - * maintain a list of already seen directories and check every IFD offset - * and its IFD number against that list. However, the offset of an IFD number - * can change - e.g. when writing updates to file. - * Returns 1 if all is ok; 0 if last directory or IFD loop is encountered, - * or an error has occurred. - */ -int _TIFFCheckDirNumberAndOffset(TIFF *tif, tdir_t dirn, uint64_t diroff) -{ - if (diroff == 0) /* no more directories */ - return 0; - - if (tif->tif_map_dir_offset_to_number == NULL) - { - tif->tif_map_dir_offset_to_number = TIFFHashSetNew( - hashFuncOffsetToNumber, equalFuncOffsetToNumber, free); - if (tif->tif_map_dir_offset_to_number == NULL) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "Not enough memory"); - return 1; - } - } - - if (tif->tif_map_dir_number_to_offset == NULL) - { - /* No free callback for this map, as it shares the same items as - * tif->tif_map_dir_offset_to_number. */ - tif->tif_map_dir_number_to_offset = TIFFHashSetNew( - hashFuncNumberToOffset, equalFuncNumberToOffset, NULL); - if (tif->tif_map_dir_number_to_offset == NULL) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "Not enough memory"); - return 1; - } - } - - /* Check if offset is already in the list: - * - yes: check, if offset is at the same IFD number - if not, it is an IFD - * loop - * - no: add to list or update offset at that IFD number - */ - TIFFOffsetAndDirNumber entry; - entry.offset = diroff; - entry.dirNumber = dirn; - - TIFFOffsetAndDirNumber *foundEntry = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_offset_to_number, &entry); - if (foundEntry) - { - if (foundEntry->dirNumber == dirn) - { - return 1; - } - else - { - TIFFWarningExtR(tif, "_TIFFCheckDirNumberAndOffset", - "TIFF directory %d has IFD looping to directory %u " - "at offset 0x%" PRIx64 " (%" PRIu64 ")", - (int)dirn - 1, foundEntry->dirNumber, diroff, - diroff); - return 0; - } - } - - /* Check if offset of an IFD has been changed and update offset of that IFD - * number. */ - foundEntry = (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_number_to_offset, &entry); - if (foundEntry) - { - if (foundEntry->offset != diroff) - { - TIFFOffsetAndDirNumber entryOld; - entryOld.offset = foundEntry->offset; - entryOld.dirNumber = dirn; - /* We must remove first from tif_map_dir_number_to_offset as the */ - /* entry is owned (and thus freed) by */ - /* tif_map_dir_offset_to_number */ - TIFFOffsetAndDirNumber *foundEntryOld = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_number_to_offset, &entryOld); - if (foundEntryOld) - { - TIFFHashSetRemove(tif->tif_map_dir_number_to_offset, - foundEntryOld); - } - foundEntryOld = (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_offset_to_number, &entryOld); - if (foundEntryOld) - { - TIFFHashSetRemove(tif->tif_map_dir_offset_to_number, - foundEntryOld); - } - - TIFFOffsetAndDirNumber *entryPtr = (TIFFOffsetAndDirNumber *)malloc( - sizeof(TIFFOffsetAndDirNumber)); - if (entryPtr == NULL) - { - return 0; - } - - /* Add IFD offset and dirn to IFD directory list */ - *entryPtr = entry; - - if (!TIFFHashSetInsert(tif->tif_map_dir_offset_to_number, entryPtr)) - { - TIFFErrorExtR( - tif, "_TIFFCheckDirNumberAndOffset", - "Insertion in tif_map_dir_offset_to_number failed"); - return 0; - } - if (!TIFFHashSetInsert(tif->tif_map_dir_number_to_offset, entryPtr)) - { - TIFFErrorExtR( - tif, "_TIFFCheckDirNumberAndOffset", - "Insertion in tif_map_dir_number_to_offset failed"); - return 0; - } - } - return 1; - } - - /* Arbitrary (hopefully big enough) limit */ - if (TIFFHashSetSize(tif->tif_map_dir_offset_to_number) >= - TIFF_MAX_DIR_COUNT) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "Cannot handle more than %u TIFF directories", - TIFF_MAX_DIR_COUNT); - return 0; - } - - TIFFOffsetAndDirNumber *entryPtr = - (TIFFOffsetAndDirNumber *)malloc(sizeof(TIFFOffsetAndDirNumber)); - if (entryPtr == NULL) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "malloc(sizeof(TIFFOffsetAndDirNumber)) failed"); - return 0; - } - - /* Add IFD offset and dirn to IFD directory list */ - *entryPtr = entry; - - if (!TIFFHashSetInsert(tif->tif_map_dir_offset_to_number, entryPtr)) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "Insertion in tif_map_dir_offset_to_number failed"); - return 0; - } - if (!TIFFHashSetInsert(tif->tif_map_dir_number_to_offset, entryPtr)) - { - TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset", - "Insertion in tif_map_dir_number_to_offset failed"); - return 0; - } - - return 1; -} /* --- _TIFFCheckDirNumberAndOffset() ---*/ - -/* - * Retrieve the matching IFD directory number of a given IFD offset - * from the list of directories already seen. - * Returns 1 if the offset was in the list and the directory number - * can be returned. - * Otherwise returns 0 or if an error occurred. - */ -int _TIFFGetDirNumberFromOffset(TIFF *tif, uint64_t diroff, tdir_t *dirn) -{ - if (diroff == 0) /* no more directories */ - return 0; - - /* Check if offset is already in the list and return matching directory - * number. Otherwise update IFD list using TIFFNumberOfDirectories() and - * search again in IFD list. - */ - if (tif->tif_map_dir_offset_to_number == NULL) - return 0; - TIFFOffsetAndDirNumber entry; - entry.offset = diroff; - entry.dirNumber = 0; /* not used */ - - TIFFOffsetAndDirNumber *foundEntry = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_offset_to_number, &entry); - if (foundEntry) - { - *dirn = foundEntry->dirNumber; - return 1; - } - - /* This updates the directory list for all main-IFDs in the file. */ - TIFFNumberOfDirectories(tif); - - foundEntry = (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_offset_to_number, &entry); - if (foundEntry) - { - *dirn = foundEntry->dirNumber; - return 1; - } - - return 0; -} /*--- _TIFFGetDirNumberFromOffset() ---*/ - -/* - * Retrieve the matching IFD directory offset of a given IFD number - * from the list of directories already seen. - * Returns 1 if the offset was in the list of already seen IFDs and the - * directory offset can be returned. The directory list is not updated. - * Otherwise returns 0 or if an error occurred. - */ -int _TIFFGetOffsetFromDirNumber(TIFF *tif, tdir_t dirn, uint64_t *diroff) -{ - - if (tif->tif_map_dir_number_to_offset == NULL) - return 0; - TIFFOffsetAndDirNumber entry; - entry.offset = 0; /* not used */ - entry.dirNumber = dirn; - - TIFFOffsetAndDirNumber *foundEntry = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_number_to_offset, &entry); - if (foundEntry) - { - *diroff = foundEntry->offset; - return 1; - } - - return 0; -} /*--- _TIFFGetOffsetFromDirNumber() ---*/ - -/* - * Remove an entry from the directory list of already seen directories - * by directory offset. - * If an entry is to be removed from the list, it is also okay if the entry - * is not in the list or the list does not exist. - */ -int _TIFFRemoveEntryFromDirectoryListByOffset(TIFF *tif, uint64_t diroff) -{ - if (tif->tif_map_dir_offset_to_number == NULL) - return 1; - - TIFFOffsetAndDirNumber entryOld; - entryOld.offset = diroff; - entryOld.dirNumber = 0; - /* We must remove first from tif_map_dir_number_to_offset as the - * entry is owned (and thus freed) by tif_map_dir_offset_to_number. - * However, we need firstly to find the directory number from offset. */ - - TIFFOffsetAndDirNumber *foundEntryOldOff = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_offset_to_number, &entryOld); - if (foundEntryOldOff) - { - entryOld.dirNumber = foundEntryOldOff->dirNumber; - if (tif->tif_map_dir_number_to_offset != NULL) - { - TIFFOffsetAndDirNumber *foundEntryOldDir = - (TIFFOffsetAndDirNumber *)TIFFHashSetLookup( - tif->tif_map_dir_number_to_offset, &entryOld); - if (foundEntryOldDir) - { - TIFFHashSetRemove(tif->tif_map_dir_number_to_offset, - foundEntryOldDir); - TIFFHashSetRemove(tif->tif_map_dir_offset_to_number, - foundEntryOldOff); - return 1; - } - } - else - { - TIFFErrorExtR(tif, "_TIFFRemoveEntryFromDirectoryListByOffset", - "Unexpectedly tif_map_dir_number_to_offset is " - "missing but tif_map_dir_offset_to_number exists."); - return 0; - } - } - return 1; -} /*--- _TIFFRemoveEntryFromDirectoryListByOffset() ---*/ - -/* - * Check the count field of a directory entry against a known value. The - * caller is expected to skip/ignore the tag if there is a mismatch. - */ -static int CheckDirCount(TIFF *tif, TIFFDirEntry *dir, uint32_t count) -{ - if ((uint64_t)count > dir->tdir_count) - { - const TIFFField *fip = TIFFFieldWithTag(tif, dir->tdir_tag); - TIFFWarningExtR(tif, tif->tif_name, - "incorrect count for field \"%s\" (%" PRIu64 - ", expecting %" PRIu32 "); tag ignored", - fip ? fip->field_name : "unknown tagname", - dir->tdir_count, count); - return (0); - } - else if ((uint64_t)count < dir->tdir_count) - { - const TIFFField *fip = TIFFFieldWithTag(tif, dir->tdir_tag); - TIFFWarningExtR(tif, tif->tif_name, - "incorrect count for field \"%s\" (%" PRIu64 - ", expecting %" PRIu32 "); tag trimmed", - fip ? fip->field_name : "unknown tagname", - dir->tdir_count, count); - dir->tdir_count = count; - return (1); - } - return (1); -} - -/* - * Read IFD structure from the specified offset. If the pointer to - * nextdiroff variable has been specified, read it too. Function returns a - * number of fields in the directory or 0 if failed. - */ -static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, - TIFFDirEntry **pdir, uint64_t *nextdiroff) -{ - static const char module[] = "TIFFFetchDirectory"; - - void *origdir; - uint16_t dircount16; - uint32_t dirsize; - TIFFDirEntry *dir; - uint8_t *ma; - TIFFDirEntry *mb; - uint16_t n; - - assert(pdir); - - tif->tif_diroff = diroff; - if (nextdiroff) - *nextdiroff = 0; - if (!isMapped(tif)) - { - if (!SeekOK(tif, tif->tif_diroff)) - { - TIFFErrorExtR(tif, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (!ReadOK(tif, &dircount16, sizeof(uint16_t))) - { - TIFFErrorExtR(tif, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount16); - if (dircount16 > 4096) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed, this is " - "probably not a valid IFD offset"); - return 0; - } - dirsize = 12; - } - else - { - uint64_t dircount64; - if (!ReadOK(tif, &dircount64, sizeof(uint64_t))) - { - TIFFErrorExtR(tif, module, - "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 4096) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed, this is " - "probably not a valid IFD offset"); - return 0; - } - dircount16 = (uint16_t)dircount64; - dirsize = 20; - } - origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, - "to read TIFF directory"); - if (origdir == NULL) - return 0; - if (!ReadOK(tif, origdir, (tmsize_t)(dircount16 * dirsize))) - { - TIFFErrorExtR(tif, module, "%.100s: Can not read TIFF directory", - tif->tif_name); - _TIFFfreeExt(tif, origdir); - return 0; - } - /* - * Read offset to next directory for sequential scans if - * needed. - */ - if (nextdiroff) - { - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t nextdiroff32; - if (!ReadOK(tif, &nextdiroff32, sizeof(uint32_t))) - nextdiroff32 = 0; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdiroff32); - *nextdiroff = nextdiroff32; - } - else - { - if (!ReadOK(tif, nextdiroff, sizeof(uint64_t))) - *nextdiroff = 0; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - } - else - { - tmsize_t m; - tmsize_t off; - if (tif->tif_diroff > (uint64_t)INT64_MAX) - { - TIFFErrorExtR(tif, module, "Can not read TIFF directory count"); - return (0); - } - off = (tmsize_t)tif->tif_diroff; - - /* - * Check for integer overflow when validating the dir_off, - * otherwise a very high offset may cause an OOB read and - * crash the client. Make two comparisons instead of - * - * off + sizeof(uint16_t) > tif->tif_size - * - * to avoid overflow. - */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - m = off + sizeof(uint16_t); - if ((m < off) || (m < (tmsize_t)sizeof(uint16_t)) || - (m > tif->tif_size)) - { - TIFFErrorExtR(tif, module, "Can not read TIFF directory count"); - return 0; - } - else - { - _TIFFmemcpy(&dircount16, tif->tif_base + off, sizeof(uint16_t)); - } - off += sizeof(uint16_t); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount16); - if (dircount16 > 4096) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed, this is " - "probably not a valid IFD offset"); - return 0; - } - dirsize = 12; - } - else - { - uint64_t dircount64; - m = off + sizeof(uint64_t); - if ((m < off) || (m < (tmsize_t)sizeof(uint64_t)) || - (m > tif->tif_size)) - { - TIFFErrorExtR(tif, module, "Can not read TIFF directory count"); - return 0; - } - else - { - _TIFFmemcpy(&dircount64, tif->tif_base + off, sizeof(uint64_t)); - } - off += sizeof(uint64_t); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 4096) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed, this is " - "probably not a valid IFD offset"); - return 0; - } - dircount16 = (uint16_t)dircount64; - dirsize = 20; - } - if (dircount16 == 0) - { - TIFFErrorExtR(tif, module, - "Sanity check on directory count failed, zero tag " - "directories not supported"); - return 0; - } - /* Before allocating a huge amount of memory for corrupted files, check - * if size of requested memory is not greater than file size. */ - uint64_t filesize = TIFFGetFileSize(tif); - uint64_t allocsize = (uint64_t)dircount16 * dirsize; - if (allocsize > filesize) - { - TIFFWarningExtR( - tif, module, - "Requested memory size for TIFF directory of %" PRIu64 - " is greater than filesize %" PRIu64 - ". Memory not allocated, TIFF directory not read", - allocsize, filesize); - return 0; - } - origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, - "to read TIFF directory"); - if (origdir == NULL) - return 0; - m = off + dircount16 * dirsize; - if ((m < off) || (m < (tmsize_t)(dircount16 * dirsize)) || - (m > tif->tif_size)) - { - TIFFErrorExtR(tif, module, "Can not read TIFF directory"); - _TIFFfreeExt(tif, origdir); - return 0; - } - else - { - _TIFFmemcpy(origdir, tif->tif_base + off, dircount16 * dirsize); - } - if (nextdiroff) - { - off += dircount16 * dirsize; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t nextdiroff32; - m = off + sizeof(uint32_t); - if ((m < off) || (m < (tmsize_t)sizeof(uint32_t)) || - (m > tif->tif_size)) - nextdiroff32 = 0; - else - _TIFFmemcpy(&nextdiroff32, tif->tif_base + off, - sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextdiroff32); - *nextdiroff = nextdiroff32; - } - else - { - m = off + sizeof(uint64_t); - if ((m < off) || (m < (tmsize_t)sizeof(uint64_t)) || - (m > tif->tif_size)) - *nextdiroff = 0; - else - _TIFFmemcpy(nextdiroff, tif->tif_base + off, - sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(nextdiroff); - } - } - } - /* No check against filesize needed here because "dir" should have same size - * than "origdir" checked above. */ - dir = (TIFFDirEntry *)_TIFFCheckMalloc( - tif, dircount16, sizeof(TIFFDirEntry), "to read TIFF directory"); - if (dir == 0) - { - _TIFFfreeExt(tif, origdir); - return 0; - } - ma = (uint8_t *)origdir; - mb = dir; - for (n = 0; n < dircount16; n++) - { - mb->tdir_ignore = FALSE; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - mb->tdir_tag = *(uint16_t *)ma; - ma += sizeof(uint16_t); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)ma); - mb->tdir_type = *(uint16_t *)ma; - ma += sizeof(uint16_t); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)ma); - mb->tdir_count = (uint64_t)(*(uint32_t *)ma); - ma += sizeof(uint32_t); - mb->tdir_offset.toff_long8 = 0; - *(uint32_t *)(&mb->tdir_offset) = *(uint32_t *)ma; - ma += sizeof(uint32_t); - } - else - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)ma); - mb->tdir_count = TIFFReadUInt64(ma); - ma += sizeof(uint64_t); - mb->tdir_offset.toff_long8 = TIFFReadUInt64(ma); - ma += sizeof(uint64_t); - } - mb++; - } - _TIFFfreeExt(tif, origdir); - *pdir = dir; - return dircount16; -} - -/* - * Fetch a tag that is not handled by special case code. - */ -static int TIFFFetchNormalTag(TIFF *tif, TIFFDirEntry *dp, int recover) -{ - static const char module[] = "TIFFFetchNormalTag"; - enum TIFFReadDirEntryErr err; - uint32_t fii; - const TIFFField *fip = NULL; - TIFFReadDirectoryFindFieldInfo(tif, dp->tdir_tag, &fii); - if (fii == FAILED_FII) - { - TIFFErrorExtR(tif, "TIFFFetchNormalTag", - "No definition found for tag %" PRIu16, dp->tdir_tag); - return 0; - } - fip = tif->tif_fields[fii]; - assert(fip != NULL); /* should not happen */ - assert(fip->set_get_field_type != - TIFF_SETGET_OTHER); /* if so, we shouldn't arrive here but deal with - this in specialized code */ - assert(fip->set_get_field_type != - TIFF_SETGET_INT); /* if so, we shouldn't arrive here as this is only - the case for pseudo-tags */ - err = TIFFReadDirEntryErrOk; - switch (fip->set_get_field_type) - { - case TIFF_SETGET_UNDEFINED: - TIFFErrorExtR( - tif, "TIFFFetchNormalTag", - "Defined set_get_field_type of custom tag %u (%s) is " - "TIFF_SETGET_UNDEFINED and thus tag is not read from file", - fip->field_tag, fip->field_name); - break; - case TIFF_SETGET_ASCII: - { - uint8_t *data; - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryByteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - size_t mb = 0; - int n; - if (data != NULL) - { - if (dp->tdir_count > 0 && data[dp->tdir_count - 1] == 0) - { - /* optimization: if data is known to be 0 terminated, we - * can use strlen() */ - mb = strlen((const char *)data); - } - else - { - /* general case. equivalent to non-portable */ - /* mb = strnlen((const char*)data, - * (uint32_t)dp->tdir_count); */ - uint8_t *ma = data; - while (mb < (uint32_t)dp->tdir_count) - { - if (*ma == 0) - break; - ma++; - mb++; - } - } - } - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != NULL) - _TIFFfreeExt(tif, data); - return (0); - } - if (mb + 1 < (uint32_t)dp->tdir_count) - TIFFWarningExtR( - tif, module, - "ASCII value for tag \"%s\" contains null byte in " - "value; value incorrectly truncated during reading due " - "to implementation limitations", - fip->field_name); - else if (mb + 1 > (uint32_t)dp->tdir_count) - { - TIFFWarningExtR(tif, module, - "ASCII value for tag \"%s\" does not end " - "in null byte. Forcing it to be null", - fip->field_name); - /* TIFFReadDirEntryArrayWithLimit() ensures this can't be - * larger than MAX_SIZE_TAG_DATA */ - assert((uint32_t)dp->tdir_count + 1 == dp->tdir_count + 1); - uint8_t *o = - _TIFFmallocExt(tif, (uint32_t)dp->tdir_count + 1); - if (o == NULL) - { - if (data != NULL) - _TIFFfreeExt(tif, data); - return (0); - } - if (dp->tdir_count > 0) - { - _TIFFmemcpy(o, data, (uint32_t)dp->tdir_count); - } - o[(uint32_t)dp->tdir_count] = 0; - if (data != 0) - _TIFFfreeExt(tif, data); - data = o; - } - n = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!n) - return (0); - } - } - break; - case TIFF_SETGET_UINT8: - { - uint8_t data = 0; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryByte(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_SINT8: - { - int8_t data = 0; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntrySbyte(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_UINT16: - { - uint16_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryShort(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_SINT16: - { - int16_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntrySshort(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_UINT32: - { - uint32_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryLong(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_SINT32: - { - int32_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntrySlong(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_UINT64: - { - uint64_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryLong8(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - return 0; - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_SINT64: - { - int64_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntrySlong8(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - return 0; - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_FLOAT: - { - float data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryFloat(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - return 0; - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_DOUBLE: - { - double data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryDouble(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - return 0; - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_IFD8: - { - uint64_t data; - assert(fip->field_readcount == 1); - assert(fip->field_passcount == 0); - err = TIFFReadDirEntryIfd8(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - return 0; - if (!TIFFSetField(tif, dp->tdir_tag, data)) - return (0); - } - } - break; - case TIFF_SETGET_UINT16_PAIR: - { - uint16_t *data; - assert(fip->field_readcount == 2); - assert(fip->field_passcount == 0); - if (dp->tdir_count != 2) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected 2, " - "got %" PRIu64, - fip->field_name, dp->tdir_count); - return (0); - } - err = TIFFReadDirEntryShortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - int m; - assert(data); /* avoid CLang static Analyzer false positive */ - m = TIFFSetField(tif, dp->tdir_tag, data[0], data[1]); - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C0_UINT8: - { - uint8_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryByteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_SINT8: - { - int8_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntrySbyteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_UINT16: - { - uint16_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryShortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_SINT16: - { - int16_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntrySshortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_UINT32: - { - uint32_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryLongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_SINT32: - { - int32_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntrySlongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_UINT64: - { - uint64_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryLong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_SINT64: - { - int64_t *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntrySlong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C0_FLOAT: - { - float *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryFloatArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - /*--: Rational2Double: Extend for Double Arrays and Rational-Arrays read - * into Double-Arrays. */ - case TIFF_SETGET_C0_DOUBLE: - { - double *data; - assert(fip->field_readcount >= 1); - assert(fip->field_passcount == 0); - if (dp->tdir_count != (uint64_t)fip->field_readcount) - { - TIFFWarningExtR(tif, module, - "incorrect count for field \"%s\", expected " - "%d, got %" PRIu64, - fip->field_name, (int)fip->field_readcount, - dp->tdir_count); - return (0); - } - else - { - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_ASCII: - { - uint8_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryByteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - if (data != 0 && dp->tdir_count > 0 && - data[dp->tdir_count - 1] != '\0') - { - TIFFWarningExtR(tif, module, - "ASCII value for ASCII array tag " - "\"%s\" does not end in null " - "byte. Forcing it to be null", - fip->field_name); - /* Enlarge buffer and add terminating null. */ - uint8_t *o = - _TIFFmallocExt(tif, (uint32_t)dp->tdir_count + 1); - if (o == NULL) - { - if (data != NULL) - _TIFFfreeExt(tif, data); - return (0); - } - if (dp->tdir_count > 0) - { - _TIFFmemcpy(o, data, (uint32_t)dp->tdir_count); - } - o[(uint32_t)dp->tdir_count] = 0; - dp->tdir_count++; /* Increment for added null. */ - if (data != 0) - _TIFFfreeExt(tif, data); - data = o; - } - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_UINT8: - { - uint8_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryByteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_SINT8: - { - int8_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntrySbyteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_UINT16: - { - uint16_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryShortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_SINT16: - { - int16_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntrySshortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_UINT32: - { - uint32_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryLongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_SINT32: - { - int32_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntrySlongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_UINT64: - { - uint64_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryLong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_SINT64: - { - int64_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntrySlong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_FLOAT: - { - float *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryFloatArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_DOUBLE: - { - double *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C16_IFD8: - { - uint64_t *data; - assert(fip->field_readcount == TIFF_VARIABLE); - assert(fip->field_passcount == 1); - if (dp->tdir_count > 0xFFFF) - err = TIFFReadDirEntryErrCount; - else - { - err = TIFFReadDirEntryIfd8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, - (uint16_t)(dp->tdir_count), data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - } - break; - case TIFF_SETGET_C32_ASCII: - { - uint8_t *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryByteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - if (data != 0 && dp->tdir_count > 0 && - data[dp->tdir_count - 1] != '\0') - { - TIFFWarningExtR( - tif, module, - "ASCII value for ASCII array tag \"%s\" does not end " - "in null byte. Forcing it to be null", - fip->field_name); - /* Enlarge buffer and add terminating null. */ - uint8_t *o = - _TIFFmallocExt(tif, (uint32_t)dp->tdir_count + 1); - if (o == NULL) - { - if (data != NULL) - _TIFFfreeExt(tif, data); - return (0); - } - if (dp->tdir_count > 0) - { - _TIFFmemcpy(o, data, (uint32_t)dp->tdir_count); - } - o[(uint32_t)dp->tdir_count] = 0; - dp->tdir_count++; /* Increment for added null. */ - if (data != 0) - _TIFFfreeExt(tif, data); - data = o; - } - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_UINT8: - { - uint8_t *data; - uint32_t count = 0; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - if (fip->field_tag == TIFFTAG_RICHTIFFIPTC && - dp->tdir_type == TIFF_LONG) - { - /* Adobe's software (wrongly) writes RichTIFFIPTC tag with - * data type LONG instead of UNDEFINED. Work around this - * frequently found issue */ - void *origdata; - err = TIFFReadDirEntryArray(tif, dp, &count, 4, &origdata); - if ((err != TIFFReadDirEntryErrOk) || (origdata == 0)) - { - data = NULL; - } - else - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)origdata, count); - data = (uint8_t *)origdata; - count = (uint32_t)(count * 4); - } - } - else - { - err = TIFFReadDirEntryByteArray(tif, dp, &data); - count = (uint32_t)(dp->tdir_count); - } - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, count, data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_SINT8: - { - int8_t *data = NULL; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntrySbyteArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_UINT16: - { - uint16_t *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryShortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_SINT16: - { - int16_t *data = NULL; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntrySshortArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_UINT32: - { - uint32_t *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryLongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_SINT32: - { - int32_t *data = NULL; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntrySlongArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_UINT64: - { - uint64_t *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryLong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_SINT64: - { - int64_t *data = NULL; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntrySlong8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_FLOAT: - { - float *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryFloatArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_DOUBLE: - { - double *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - case TIFF_SETGET_C32_IFD8: - { - uint64_t *data; - assert(fip->field_readcount == TIFF_VARIABLE2); - assert(fip->field_passcount == 1); - err = TIFFReadDirEntryIfd8Array(tif, dp, &data); - if (err == TIFFReadDirEntryErrOk) - { - if (!EvaluateIFDdatasizeReading(tif, dp)) - { - if (data != 0) - _TIFFfreeExt(tif, data); - return 0; - } - int m; - m = TIFFSetField(tif, dp->tdir_tag, (uint32_t)(dp->tdir_count), - data); - if (data != 0) - _TIFFfreeExt(tif, data); - if (!m) - return (0); - } - } - break; - default: - assert(0); /* we should never get here */ - break; - } - if (err != TIFFReadDirEntryErrOk) - { - TIFFReadDirEntryOutputErr(tif, err, module, fip->field_name, recover); - return (0); - } - return (1); -} - -/* - * Fetch a set of offsets or lengths. - * While this routine says "strips", in fact it's also used for tiles. - */ -static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32_t nstrips, - uint64_t **lpp) -{ - static const char module[] = "TIFFFetchStripThing"; - enum TIFFReadDirEntryErr err; - uint64_t *data; - err = TIFFReadDirEntryLong8ArrayWithLimit(tif, dir, &data, nstrips); - if (err != TIFFReadDirEntryErrOk) - { - const TIFFField *fip = TIFFFieldWithTag(tif, dir->tdir_tag); - TIFFReadDirEntryOutputErr(tif, err, module, - fip ? fip->field_name : "unknown tagname", 0); - return (0); - } - if (dir->tdir_count < (uint64_t)nstrips) - { - uint64_t *resizeddata; - const TIFFField *fip = TIFFFieldWithTag(tif, dir->tdir_tag); - const char *pszMax = getenv("LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT"); - uint32_t max_nstrips = 1000000; - if (pszMax) - max_nstrips = (uint32_t)atoi(pszMax); - TIFFReadDirEntryOutputErr(tif, TIFFReadDirEntryErrCount, module, - fip ? fip->field_name : "unknown tagname", - (nstrips <= max_nstrips)); - - if (nstrips > max_nstrips) - { - _TIFFfreeExt(tif, data); - return (0); - } - - const uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t); - if (allocsize > 100 * 1024 * 1024) - { - /* Before allocating a huge amount of memory for corrupted files, - * check if size of requested memory is not greater than file size. - */ - const uint64_t filesize = TIFFGetFileSize(tif); - if (allocsize > filesize) - { - TIFFWarningExtR( - tif, module, - "Requested memory size for StripArray of %" PRIu64 - " is greater than filesize %" PRIu64 - ". Memory not allocated", - allocsize, filesize); - _TIFFfreeExt(tif, data); - return (0); - } - } - resizeddata = (uint64_t *)_TIFFCheckMalloc( - tif, nstrips, sizeof(uint64_t), "for strip array"); - if (resizeddata == 0) - { - _TIFFfreeExt(tif, data); - return (0); - } - if (dir->tdir_count) - _TIFFmemcpy(resizeddata, data, - (uint32_t)dir->tdir_count * sizeof(uint64_t)); - _TIFFmemset(resizeddata + (uint32_t)dir->tdir_count, 0, - (nstrips - (uint32_t)dir->tdir_count) * sizeof(uint64_t)); - _TIFFfreeExt(tif, data); - data = resizeddata; - } - *lpp = data; - return (1); -} - -/* - * Fetch and set the SubjectDistance EXIF tag. - */ -static int TIFFFetchSubjectDistance(TIFF *tif, TIFFDirEntry *dir) -{ - static const char module[] = "TIFFFetchSubjectDistance"; - enum TIFFReadDirEntryErr err; - UInt64Aligned_t m; - m.l = 0; - assert(sizeof(double) == 8); - assert(sizeof(uint64_t) == 8); - assert(sizeof(uint32_t) == 4); - if (dir->tdir_count != 1) - err = TIFFReadDirEntryErrCount; - else if (dir->tdir_type != TIFF_RATIONAL) - err = TIFFReadDirEntryErrType; - else - { - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t offset; - offset = *(uint32_t *)(&dir->tdir_offset); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&offset); - err = TIFFReadDirEntryData(tif, offset, 8, m.i); - } - else - { - m.l = dir->tdir_offset.toff_long8; - err = TIFFReadDirEntryErrOk; - } - } - if (err == TIFFReadDirEntryErrOk) - { - double n; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m.i, 2); - if (m.i[0] == 0) - n = 0.0; - else if (m.i[0] == 0xFFFFFFFF || m.i[1] == 0) - /* - * XXX: Numerator 0xFFFFFFFF means that we have infinite - * distance. Indicate that with a negative floating point - * SubjectDistance value. - */ - n = -1.0; - else - n = (double)m.i[0] / (double)m.i[1]; - return (TIFFSetField(tif, dir->tdir_tag, n)); - } - else - { - TIFFReadDirEntryOutputErr(tif, err, module, "SubjectDistance", TRUE); - return (0); - } -} - -static void allocChoppedUpStripArrays(TIFF *tif, uint32_t nstrips, - uint64_t stripbytes, - uint32_t rowsperstrip) -{ - TIFFDirectory *td = &tif->tif_dir; - uint64_t bytecount; - uint64_t offset; - uint64_t last_offset; - uint64_t last_bytecount; - uint32_t i; - uint64_t *newcounts; - uint64_t *newoffsets; - - offset = TIFFGetStrileOffset(tif, 0); - last_offset = TIFFGetStrileOffset(tif, td->td_nstrips - 1); - last_bytecount = TIFFGetStrileByteCount(tif, td->td_nstrips - 1); - if (last_offset > UINT64_MAX - last_bytecount || - last_offset + last_bytecount < offset) - { - return; - } - bytecount = last_offset + last_bytecount - offset; - - /* Before allocating a huge amount of memory for corrupted files, check if - * size of StripByteCount and StripOffset tags is not greater than - * file size. - */ - const uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t) * 2; - if (allocsize > 100 * 1024 * 1024) - { - const uint64_t filesize = TIFFGetFileSize(tif); - if (allocsize > filesize) - { - TIFFWarningExtR(tif, "allocChoppedUpStripArrays", - "Requested memory size for StripByteCount and " - "StripOffsets %" PRIu64 - " is greater than filesize %" PRIu64 - ". Memory not allocated", - allocsize, filesize); - return; - } - } - - newcounts = - (uint64_t *)_TIFFCheckMalloc(tif, nstrips, sizeof(uint64_t), - "for chopped \"StripByteCounts\" array"); - newoffsets = (uint64_t *)_TIFFCheckMalloc( - tif, nstrips, sizeof(uint64_t), "for chopped \"StripOffsets\" array"); - if (newcounts == NULL || newoffsets == NULL) - { - /* - * Unable to allocate new strip information, give up and use - * the original one strip information. - */ - if (newcounts != NULL) - _TIFFfreeExt(tif, newcounts); - if (newoffsets != NULL) - _TIFFfreeExt(tif, newoffsets); - return; - } - - /* - * Fill the strip information arrays with new bytecounts and offsets - * that reflect the broken-up format. - */ - for (i = 0; i < nstrips; i++) - { - if (stripbytes > bytecount) - stripbytes = bytecount; - newcounts[i] = stripbytes; - newoffsets[i] = stripbytes ? offset : 0; - offset += stripbytes; - bytecount -= stripbytes; - } - - /* - * Replace old single strip info with multi-strip info. - */ - td->td_stripsperimage = td->td_nstrips = nstrips; - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - _TIFFfreeExt(tif, td->td_stripbytecount_p); - _TIFFfreeExt(tif, td->td_stripoffset_p); - td->td_stripbytecount_p = newcounts; - td->td_stripoffset_p = newoffsets; -#ifdef STRIPBYTECOUNTSORTED_UNUSED - td->td_stripbytecountsorted = 1; -#endif - tif->tif_flags |= TIFF_CHOPPEDUPARRAYS; -} - -/* - * Replace a single strip (tile) of uncompressed data by multiple strips - * (tiles), each approximately STRIP_SIZE_DEFAULT bytes. This is useful for - * dealing with large images or for dealing with machines with a limited - * amount memory. - */ -static void ChopUpSingleUncompressedStrip(TIFF *tif) -{ - register TIFFDirectory *td = &tif->tif_dir; - uint64_t bytecount; - uint64_t offset; - uint32_t rowblock; - uint64_t rowblockbytes; - uint64_t stripbytes; - uint32_t nstrips; - uint32_t rowsperstrip; - - bytecount = TIFFGetStrileByteCount(tif, 0); - /* On a newly created file, just re-opened to be filled, we */ - /* don't want strip chop to trigger as it is going to cause issues */ - /* later ( StripOffsets and StripByteCounts improperly filled) . */ - if (bytecount == 0 && tif->tif_mode != O_RDONLY) - return; - offset = TIFFGetStrileByteCount(tif, 0); - assert(td->td_planarconfig == PLANARCONFIG_CONTIG); - if ((td->td_photometric == PHOTOMETRIC_YCBCR) && (!isUpSampled(tif))) - rowblock = td->td_ycbcrsubsampling[1]; - else - rowblock = 1; - rowblockbytes = TIFFVTileSize64(tif, rowblock); - /* - * Make the rows hold at least one scanline, but fill specified amount - * of data if possible. - */ - if (rowblockbytes > STRIP_SIZE_DEFAULT) - { - stripbytes = rowblockbytes; - rowsperstrip = rowblock; - } - else if (rowblockbytes > 0) - { - uint32_t rowblocksperstrip; - rowblocksperstrip = (uint32_t)(STRIP_SIZE_DEFAULT / rowblockbytes); - rowsperstrip = rowblocksperstrip * rowblock; - stripbytes = rowblocksperstrip * rowblockbytes; - } - else - return; - - /* - * never increase the number of rows per strip - */ - if (rowsperstrip >= td->td_rowsperstrip || rowsperstrip == 0) - return; - nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); - if (nstrips == 0) - return; - - /* If we are going to allocate a lot of memory, make sure that the */ - /* file is as big as needed */ - if (tif->tif_mode == O_RDONLY && nstrips > 1000000 && - (offset >= TIFFGetFileSize(tif) || - stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1))) - { - return; - } - - allocChoppedUpStripArrays(tif, nstrips, stripbytes, rowsperstrip); -} - -/* - * Replace a file with contiguous strips > 2 GB of uncompressed data by - * multiple smaller strips. This is useful for - * dealing with large images or for dealing with machines with a limited - * amount memory. - */ -static void TryChopUpUncompressedBigTiff(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32_t rowblock; - uint64_t rowblockbytes; - uint32_t i; - uint64_t stripsize; - uint32_t rowblocksperstrip; - uint32_t rowsperstrip; - uint64_t stripbytes; - uint32_t nstrips; - - stripsize = TIFFStripSize64(tif); - - assert(tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG); - assert(tif->tif_dir.td_compression == COMPRESSION_NONE); - assert((tif->tif_flags & (TIFF_STRIPCHOP | TIFF_ISTILED)) == - TIFF_STRIPCHOP); - assert(stripsize > 0x7FFFFFFFUL); - - /* On a newly created file, just re-opened to be filled, we */ - /* don't want strip chop to trigger as it is going to cause issues */ - /* later ( StripOffsets and StripByteCounts improperly filled) . */ - if (TIFFGetStrileByteCount(tif, 0) == 0 && tif->tif_mode != O_RDONLY) - return; - - if ((td->td_photometric == PHOTOMETRIC_YCBCR) && (!isUpSampled(tif))) - rowblock = td->td_ycbcrsubsampling[1]; - else - rowblock = 1; - rowblockbytes = TIFFVStripSize64(tif, rowblock); - if (rowblockbytes == 0 || rowblockbytes > 0x7FFFFFFFUL) - { - /* In case of file with gigantic width */ - return; - } - - /* Check that the strips are contiguous and of the expected size */ - for (i = 0; i < td->td_nstrips; i++) - { - if (i == td->td_nstrips - 1) - { - if (TIFFGetStrileByteCount(tif, i) < - TIFFVStripSize64(tif, - td->td_imagelength - i * td->td_rowsperstrip)) - { - return; - } - } - else - { - if (TIFFGetStrileByteCount(tif, i) != stripsize) - { - return; - } - if (i > 0 && TIFFGetStrileOffset(tif, i) != - TIFFGetStrileOffset(tif, i - 1) + - TIFFGetStrileByteCount(tif, i - 1)) - { - return; - } - } - } - - /* Aim for 512 MB strips (that will still be manageable by 32 bit builds */ - rowblocksperstrip = (uint32_t)(512 * 1024 * 1024 / rowblockbytes); - if (rowblocksperstrip == 0) - rowblocksperstrip = 1; - rowsperstrip = rowblocksperstrip * rowblock; - stripbytes = rowblocksperstrip * rowblockbytes; - assert(stripbytes <= 0x7FFFFFFFUL); - - if (rowsperstrip == 0) - return; - nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); - if (nstrips == 0) - return; - - /* If we are going to allocate a lot of memory, make sure that the */ - /* file is as big as needed */ - if (tif->tif_mode == O_RDONLY && nstrips > 1000000) - { - uint64_t last_offset = TIFFGetStrileOffset(tif, td->td_nstrips - 1); - uint64_t filesize = TIFFGetFileSize(tif); - uint64_t last_bytecount = - TIFFGetStrileByteCount(tif, td->td_nstrips - 1); - if (last_offset > filesize || last_bytecount > filesize - last_offset) - { - return; - } - } - - allocChoppedUpStripArrays(tif, nstrips, stripbytes, rowsperstrip); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static uint64_t _TIFFUnsanitizedAddUInt64AndInt(uint64_t a, int b) -{ - return a + b; -} - -/* Read the value of [Strip|Tile]Offset or [Strip|Tile]ByteCount around - * strip/tile of number strile. Also fetch the neighbouring values using a - * 4096 byte page size. - */ -static int _TIFFPartialReadStripArray(TIFF *tif, TIFFDirEntry *dirent, - int strile, uint64_t *panVals) -{ - static const char module[] = "_TIFFPartialReadStripArray"; -#define IO_CACHE_PAGE_SIZE 4096 - - size_t sizeofval; - const int bSwab = (tif->tif_flags & TIFF_SWAB) != 0; - int sizeofvalint; - uint64_t nBaseOffset; - uint64_t nOffset; - uint64_t nOffsetStartPage; - uint64_t nOffsetEndPage; - tmsize_t nToRead; - tmsize_t nRead; - uint64_t nLastStripOffset; - int iStartBefore; - int i; - const uint32_t arraySize = tif->tif_dir.td_stripoffsetbyteallocsize; - unsigned char buffer[2 * IO_CACHE_PAGE_SIZE]; - - assert(dirent->tdir_count > 4); - - if (dirent->tdir_type == TIFF_SHORT) - { - sizeofval = sizeof(uint16_t); - } - else if (dirent->tdir_type == TIFF_LONG) - { - sizeofval = sizeof(uint32_t); - } - else if (dirent->tdir_type == TIFF_LONG8) - { - sizeofval = sizeof(uint64_t); - } - else if (dirent->tdir_type == TIFF_SLONG8) - { - /* Non conformant but used by some images as in */ - /* https://github.com/OSGeo/gdal/issues/2165 */ - sizeofval = sizeof(int64_t); - } - else - { - TIFFErrorExtR(tif, module, - "Invalid type for [Strip|Tile][Offset/ByteCount] tag"); - panVals[strile] = 0; - return 0; - } - sizeofvalint = (int)(sizeofval); - - if (tif->tif_flags & TIFF_BIGTIFF) - { - uint64_t offset = dirent->tdir_offset.toff_long8; - if (bSwab) - TIFFSwabLong8(&offset); - nBaseOffset = offset; - } - else - { - uint32_t offset = dirent->tdir_offset.toff_long; - if (bSwab) - TIFFSwabLong(&offset); - nBaseOffset = offset; - } - /* To avoid later unsigned integer overflows */ - if (nBaseOffset > (uint64_t)INT64_MAX) - { - TIFFErrorExtR(tif, module, "Cannot read offset/size for strile %d", - strile); - panVals[strile] = 0; - return 0; - } - nOffset = nBaseOffset + sizeofval * strile; - nOffsetStartPage = (nOffset / IO_CACHE_PAGE_SIZE) * IO_CACHE_PAGE_SIZE; - nOffsetEndPage = nOffsetStartPage + IO_CACHE_PAGE_SIZE; - - if (nOffset + sizeofval > nOffsetEndPage) - nOffsetEndPage += IO_CACHE_PAGE_SIZE; -#undef IO_CACHE_PAGE_SIZE - - nLastStripOffset = nBaseOffset + arraySize * sizeofval; - if (nLastStripOffset < nOffsetEndPage) - nOffsetEndPage = nLastStripOffset; - if (nOffsetStartPage >= nOffsetEndPage) - { - TIFFErrorExtR(tif, module, "Cannot read offset/size for strile %d", - strile); - panVals[strile] = 0; - return 0; - } - if (!SeekOK(tif, nOffsetStartPage)) - { - panVals[strile] = 0; - return 0; - } - - nToRead = (tmsize_t)(nOffsetEndPage - nOffsetStartPage); - nRead = TIFFReadFile(tif, buffer, nToRead); - if (nRead < nToRead) - { - TIFFErrorExtR(tif, module, - "Cannot read offset/size for strile around ~%d", strile); - return 0; - } - iStartBefore = -(int)((nOffset - nOffsetStartPage) / sizeofval); - if (strile + iStartBefore < 0) - iStartBefore = -strile; - for (i = iStartBefore; - (uint32_t)(strile + i) < arraySize && - _TIFFUnsanitizedAddUInt64AndInt(nOffset, (i + 1) * sizeofvalint) <= - nOffsetEndPage; - ++i) - { - if (dirent->tdir_type == TIFF_SHORT) - { - uint16_t val; - memcpy(&val, - buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, - sizeof(val)); - if (bSwab) - TIFFSwabShort(&val); - panVals[strile + i] = val; - } - else if (dirent->tdir_type == TIFF_LONG) - { - uint32_t val; - memcpy(&val, - buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, - sizeof(val)); - if (bSwab) - TIFFSwabLong(&val); - panVals[strile + i] = val; - } - else if (dirent->tdir_type == TIFF_LONG8) - { - uint64_t val; - memcpy(&val, - buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, - sizeof(val)); - if (bSwab) - TIFFSwabLong8(&val); - panVals[strile + i] = val; - } - else /* if( dirent->tdir_type == TIFF_SLONG8 ) */ - { - /* Non conformant data type */ - int64_t val; - memcpy(&val, - buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, - sizeof(val)); - if (bSwab) - TIFFSwabLong8((uint64_t *)&val); - panVals[strile + i] = (uint64_t)val; - } - } - return 1; -} - -static int _TIFFFetchStrileValue(TIFF *tif, uint32_t strile, - TIFFDirEntry *dirent, uint64_t **parray) -{ - static const char module[] = "_TIFFFetchStrileValue"; - TIFFDirectory *td = &tif->tif_dir; - if (strile >= dirent->tdir_count) - { - return 0; - } - if (strile >= td->td_stripoffsetbyteallocsize) - { - uint32_t nStripArrayAllocBefore = td->td_stripoffsetbyteallocsize; - uint32_t nStripArrayAllocNew; - uint64_t nArraySize64; - size_t nArraySize; - uint64_t *offsetArray; - uint64_t *bytecountArray; - - if (strile > 1000000) - { - uint64_t filesize = TIFFGetFileSize(tif); - /* Avoid excessive memory allocation attempt */ - /* For such a big blockid we need at least a TIFF_LONG per strile */ - /* for the offset array. */ - if (strile > filesize / sizeof(uint32_t)) - { - TIFFErrorExtR(tif, module, "File too short"); - return 0; - } - } - - if (td->td_stripoffsetbyteallocsize == 0 && - td->td_nstrips < 1024 * 1024) - { - nStripArrayAllocNew = td->td_nstrips; - } - else - { -#define TIFF_MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define TIFF_MIN(a, b) (((a) < (b)) ? (a) : (b)) - nStripArrayAllocNew = TIFF_MAX(strile + 1, 1024U * 512U); - if (nStripArrayAllocNew < 0xFFFFFFFFU / 2) - nStripArrayAllocNew *= 2; - nStripArrayAllocNew = TIFF_MIN(nStripArrayAllocNew, td->td_nstrips); - } - assert(strile < nStripArrayAllocNew); - nArraySize64 = (uint64_t)sizeof(uint64_t) * nStripArrayAllocNew; - nArraySize = (size_t)(nArraySize64); -#if SIZEOF_SIZE_T == 4 - if (nArraySize != nArraySize64) - { - TIFFErrorExtR(tif, module, - "Cannot allocate strip offset and bytecount arrays"); - return 0; - } -#endif - offsetArray = (uint64_t *)(_TIFFreallocExt(tif, td->td_stripoffset_p, - nArraySize)); - bytecountArray = (uint64_t *)(_TIFFreallocExt( - tif, td->td_stripbytecount_p, nArraySize)); - if (offsetArray) - td->td_stripoffset_p = offsetArray; - if (bytecountArray) - td->td_stripbytecount_p = bytecountArray; - if (offsetArray && bytecountArray) - { - td->td_stripoffsetbyteallocsize = nStripArrayAllocNew; - /* Initialize new entries to ~0 / -1 */ - /* coverity[overrun-buffer-arg] */ - memset(td->td_stripoffset_p + nStripArrayAllocBefore, 0xFF, - (td->td_stripoffsetbyteallocsize - nStripArrayAllocBefore) * - sizeof(uint64_t)); - /* coverity[overrun-buffer-arg] */ - memset(td->td_stripbytecount_p + nStripArrayAllocBefore, 0xFF, - (td->td_stripoffsetbyteallocsize - nStripArrayAllocBefore) * - sizeof(uint64_t)); - } - else - { - TIFFErrorExtR(tif, module, - "Cannot allocate strip offset and bytecount arrays"); - _TIFFfreeExt(tif, td->td_stripoffset_p); - td->td_stripoffset_p = NULL; - _TIFFfreeExt(tif, td->td_stripbytecount_p); - td->td_stripbytecount_p = NULL; - td->td_stripoffsetbyteallocsize = 0; - } - } - if (*parray == NULL || strile >= td->td_stripoffsetbyteallocsize) - return 0; - - if (~((*parray)[strile]) == 0) - { - if (!_TIFFPartialReadStripArray(tif, dirent, strile, *parray)) - { - (*parray)[strile] = 0; - return 0; - } - } - - return 1; -} - -static uint64_t _TIFFGetStrileOffsetOrByteCountValue(TIFF *tif, uint32_t strile, - TIFFDirEntry *dirent, - uint64_t **parray, - int *pbErr) -{ - TIFFDirectory *td = &tif->tif_dir; - if (pbErr) - *pbErr = 0; - if ((tif->tif_flags & TIFF_DEFERSTRILELOAD) && - !(tif->tif_flags & TIFF_CHOPPEDUPARRAYS)) - { - if (!(tif->tif_flags & TIFF_LAZYSTRILELOAD) || - /* If the values may fit in the toff_long/toff_long8 member */ - /* then use _TIFFFillStriles to simplify _TIFFFetchStrileValue */ - dirent->tdir_count <= 4) - { - if (!_TIFFFillStriles(tif)) - { - if (pbErr) - *pbErr = 1; - /* Do not return, as we want this function to always */ - /* return the same value if called several times with */ - /* the same arguments */ - } - } - else - { - if (!_TIFFFetchStrileValue(tif, strile, dirent, parray)) - { - if (pbErr) - *pbErr = 1; - return 0; - } - } - } - if (*parray == NULL || strile >= td->td_nstrips) - { - if (pbErr) - *pbErr = 1; - return 0; - } - return (*parray)[strile]; -} - -/* Return the value of the TileOffsets/StripOffsets array for the specified - * tile/strile */ -uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile) -{ - return TIFFGetStrileOffsetWithErr(tif, strile, NULL); -} - -/* Return the value of the TileOffsets/StripOffsets array for the specified - * tile/strile */ -uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, int *pbErr) -{ - TIFFDirectory *td = &tif->tif_dir; - return _TIFFGetStrileOffsetOrByteCountValue(tif, strile, - &(td->td_stripoffset_entry), - &(td->td_stripoffset_p), pbErr); -} - -/* Return the value of the TileByteCounts/StripByteCounts array for the - * specified tile/strile */ -uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile) -{ - return TIFFGetStrileByteCountWithErr(tif, strile, NULL); -} - -/* Return the value of the TileByteCounts/StripByteCounts array for the - * specified tile/strile */ -uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, int *pbErr) -{ - TIFFDirectory *td = &tif->tif_dir; - return _TIFFGetStrileOffsetOrByteCountValue( - tif, strile, &(td->td_stripbytecount_entry), &(td->td_stripbytecount_p), - pbErr); -} - -int _TIFFFillStriles(TIFF *tif) { return _TIFFFillStrilesInternal(tif, 1); } - -static int _TIFFFillStrilesInternal(TIFF *tif, int loadStripByteCount) -{ - register TIFFDirectory *td = &tif->tif_dir; - int return_value = 1; - - /* Do not do anything if TIFF_DEFERSTRILELOAD is not set */ - if (!(tif->tif_flags & TIFF_DEFERSTRILELOAD) || - (tif->tif_flags & TIFF_CHOPPEDUPARRAYS) != 0) - return 1; - - if (tif->tif_flags & TIFF_LAZYSTRILELOAD) - { - /* In case of lazy loading, reload completely the arrays */ - _TIFFfreeExt(tif, td->td_stripoffset_p); - _TIFFfreeExt(tif, td->td_stripbytecount_p); - td->td_stripoffset_p = NULL; - td->td_stripbytecount_p = NULL; - td->td_stripoffsetbyteallocsize = 0; - tif->tif_flags &= ~TIFF_LAZYSTRILELOAD; - } - - /* If stripoffset array is already loaded, exit with success */ - if (td->td_stripoffset_p != NULL) - return 1; - - /* If tdir_count was canceled, then we already got there, but in error */ - if (td->td_stripoffset_entry.tdir_count == 0) - return 0; - - if (!TIFFFetchStripThing(tif, &(td->td_stripoffset_entry), td->td_nstrips, - &td->td_stripoffset_p)) - { - return_value = 0; - } - - if (loadStripByteCount && - !TIFFFetchStripThing(tif, &(td->td_stripbytecount_entry), - td->td_nstrips, &td->td_stripbytecount_p)) - { - return_value = 0; - } - - _TIFFmemset(&(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); - _TIFFmemset(&(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); - -#ifdef STRIPBYTECOUNTSORTED_UNUSED - if (tif->tif_dir.td_nstrips > 1 && return_value == 1) - { - uint32_t strip; - - tif->tif_dir.td_stripbytecountsorted = 1; - for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) - { - if (tif->tif_dir.td_stripoffset_p[strip - 1] > - tif->tif_dir.td_stripoffset_p[strip]) - { - tif->tif_dir.td_stripbytecountsorted = 0; - break; - } - } - } -#endif - - return return_value; -} diff --git a/third_party/libtiff/libtiff/tif_dirwrite.c b/third_party/libtiff/libtiff/tif_dirwrite.c deleted file mode 100644 index bc5ada0..0000000 --- a/third_party/libtiff/libtiff/tif_dirwrite.c +++ /dev/null @@ -1,3824 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Write Support Routines. - */ -#include "tiffiop.h" -#include /*--: for Rational2Double */ -#include /*--: for Rational2Double */ - -#ifdef HAVE_IEEEFP -#define TIFFCvtNativeToIEEEFloat(tif, n, fp) -#define TIFFCvtNativeToIEEEDouble(tif, n, dp) -#else -/* If your machine does not support IEEE floating point then you will need to - * add support to tif_machdep.c to convert between the native format and - * IEEE format. */ -extern void TIFFCvtNativeToIEEEFloat(TIFF *tif, uint32_t n, float *fp); -extern void TIFFCvtNativeToIEEEDouble(TIFF *tif, uint32_t n, double *dp); -#endif - -static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone, - uint64_t *pdiroff); - -static int TIFFWriteDirectoryTagSampleformatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - double *value); - -static int TIFFWriteDirectoryTagAscii(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, char *value); -static int TIFFWriteDirectoryTagUndefinedArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint8_t *value); -static int TIFFWriteDirectoryTagByteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint8_t *value); -static int TIFFWriteDirectoryTagSbyteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int8_t *value); -static int TIFFWriteDirectoryTagShort(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value); -static int TIFFWriteDirectoryTagShortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint16_t *value); -static int TIFFWriteDirectoryTagShortPerSample(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value); -static int TIFFWriteDirectoryTagSshortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int16_t *value); -static int TIFFWriteDirectoryTagLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value); -static int TIFFWriteDirectoryTagLongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint32_t *value); -static int TIFFWriteDirectoryTagSlongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int32_t *value); -static int TIFFWriteDirectoryTagLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value); -static int TIFFWriteDirectoryTagSlong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int64_t *value); -static int TIFFWriteDirectoryTagRational(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - double value); -static int TIFFWriteDirectoryTagRationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value); -static int TIFFWriteDirectoryTagSrationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value); -static int TIFFWriteDirectoryTagFloatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value); -static int TIFFWriteDirectoryTagDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, double *value); -static int TIFFWriteDirectoryTagIfdArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint32_t *value); -static int TIFFWriteDirectoryTagShortLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value); -static int TIFFWriteDirectoryTagLongLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value); -static int TIFFWriteDirectoryTagIfdIfd8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value); -static int TIFFWriteDirectoryTagColormap(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir); -static int TIFFWriteDirectoryTagTransferfunction(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir); -static int TIFFWriteDirectoryTagSubifd(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir); - -static int TIFFWriteDirectoryTagCheckedAscii(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, char *value); -static int TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - uint8_t *value); -static int TIFFWriteDirectoryTagCheckedByteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint8_t *value); -static int TIFFWriteDirectoryTagCheckedSbyteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int8_t *value); -static int TIFFWriteDirectoryTagCheckedShort(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value); -static int TIFFWriteDirectoryTagCheckedShortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint16_t *value); -static int TIFFWriteDirectoryTagCheckedSshortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int16_t *value); -static int TIFFWriteDirectoryTagCheckedLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value); -static int TIFFWriteDirectoryTagCheckedLongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint32_t *value); -static int TIFFWriteDirectoryTagCheckedSlongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int32_t *value); -static int TIFFWriteDirectoryTagCheckedLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint64_t *value); -static int TIFFWriteDirectoryTagCheckedSlong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int64_t *value); -static int TIFFWriteDirectoryTagCheckedRational(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - double value); -static int TIFFWriteDirectoryTagCheckedRationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - float *value); -static int TIFFWriteDirectoryTagCheckedSrationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - float *value); - -/*--: Rational2Double: New functions to support true double-precision for custom - * rational tag types. */ -static int TIFFWriteDirectoryTagRationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - double *value); -static int TIFFWriteDirectoryTagSrationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - double *value); -static int -TIFFWriteDirectoryTagCheckedRationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, double *value); -static int TIFFWriteDirectoryTagCheckedSrationalDoubleArray( - TIFF *tif, uint32_t *ndir, TIFFDirEntry *dir, uint16_t tag, uint32_t count, - double *value); -static void DoubleToRational(double value, uint32_t *num, uint32_t *denom); -static void DoubleToSrational(double value, int32_t *num, int32_t *denom); - -static int TIFFWriteDirectoryTagCheckedFloatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - float *value); -static int TIFFWriteDirectoryTagCheckedDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - double *value); -static int TIFFWriteDirectoryTagCheckedIfdArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, - uint32_t *value); -static int TIFFWriteDirectoryTagCheckedIfd8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint64_t *value); - -static int TIFFWriteDirectoryTagData(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t datatype, uint32_t count, - uint32_t datalength, void *data); - -static int TIFFLinkDirectory(TIFF *); - -/* - * Write the contents of the current directory - * to the specified file. This routine doesn't - * handle overwriting a directory with auxiliary - * storage that's been changed. - */ -int TIFFWriteDirectory(TIFF *tif) -{ - return TIFFWriteDirectorySec(tif, TRUE, TRUE, NULL); -} - -/* - * This is an advanced writing function that must be used in a particular - * sequence, and generally together with TIFFForceStrileArrayWriting(), - * to make its intended effect. Its aim is to modify the location - * where the [Strip/Tile][Offsets/ByteCounts] arrays are located in the file. - * More precisely, when TIFFWriteCheck() will be called, the tag entries for - * those arrays will be written with type = count = offset = 0 as a temporary - * value. - * - * Its effect is only valid for the current directory, and before - * TIFFWriteDirectory() is first called, and will be reset when - * changing directory. - * - * The typical sequence of calls is: - * TIFFOpen() - * [ TIFFCreateDirectory(tif) ] - * Set fields with calls to TIFFSetField(tif, ...) - * TIFFDeferStrileArrayWriting(tif) - * TIFFWriteCheck(tif, ...) - * TIFFWriteDirectory(tif) - * ... potentially create other directories and come back to the above directory - * TIFFForceStrileArrayWriting(tif): emit the arrays at the end of file - * - * Returns 1 in case of success, 0 otherwise. - */ -int TIFFDeferStrileArrayWriting(TIFF *tif) -{ - static const char module[] = "TIFFDeferStrileArrayWriting"; - if (tif->tif_mode == O_RDONLY) - { - TIFFErrorExtR(tif, tif->tif_name, "File opened in read-only mode"); - return 0; - } - if (tif->tif_diroff != 0) - { - TIFFErrorExtR(tif, module, "Directory has already been written"); - return 0; - } - - tif->tif_dir.td_deferstrilearraywriting = TRUE; - return 1; -} - -/* - * Similar to TIFFWriteDirectory(), writes the directory out - * but leaves all data structures in memory so that it can be - * written again. This will make a partially written TIFF file - * readable before it is successfully completed/closed. - */ -int TIFFCheckpointDirectory(TIFF *tif) -{ - int rc; - /* Setup the strips arrays, if they haven't already been. */ - if (tif->tif_dir.td_stripoffset_p == NULL) - (void)TIFFSetupStrips(tif); - rc = TIFFWriteDirectorySec(tif, TRUE, FALSE, NULL); - (void)TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END)); - return rc; -} - -int TIFFWriteCustomDirectory(TIFF *tif, uint64_t *pdiroff) -{ - return TIFFWriteDirectorySec(tif, FALSE, FALSE, pdiroff); -} - -/* - * Similar to TIFFWriteDirectorySec(), but if the directory has already - * been written once, it is relocated to the end of the file, in case it - * has changed in size. Note that this will result in the loss of the - * previously used directory space. - */ - -static int TIFFRewriteDirectorySec(TIFF *tif, int isimage, int imagedone, - uint64_t *pdiroff) -{ - static const char module[] = "TIFFRewriteDirectory"; - - /* We don't need to do anything special if it hasn't been written. */ - if (tif->tif_diroff == 0) - return TIFFWriteDirectory(tif); - - /* - * Find and zero the pointer to this directory, so that TIFFLinkDirectory - * will cause it to be added after this directories current pre-link. - */ - uint64_t torewritediroff = tif->tif_diroff; - - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (tif->tif_header.classic.tiff_diroff == tif->tif_diroff) - { - tif->tif_header.classic.tiff_diroff = 0; - tif->tif_diroff = 0; - - TIFFSeekFile(tif, 4, SEEK_SET); - if (!WriteOK(tif, &(tif->tif_header.classic.tiff_diroff), 4)) - { - TIFFErrorExtR(tif, tif->tif_name, "Error updating TIFF header"); - return (0); - } - } - else if (tif->tif_diroff > 0xFFFFFFFFU) - { - TIFFErrorExtR(tif, module, - "tif->tif_diroff exceeds 32 bit range allowed for " - "Classic TIFF"); - return (0); - } - else - { - uint32_t nextdir; - nextdir = tif->tif_header.classic.tiff_diroff; - while (1) - { - uint16_t dircount; - uint32_t nextnextdir; - - if (!SeekOK(tif, nextdir) || !ReadOK(tif, &dircount, 2)) - { - TIFFErrorExtR(tif, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - (void)TIFFSeekFile(tif, nextdir + 2 + dircount * 12, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 4)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextnextdir); - if (nextnextdir == tif->tif_diroff) - { - uint32_t m; - m = 0; - (void)TIFFSeekFile(tif, nextdir + 2 + dircount * 12, - SEEK_SET); - if (!WriteOK(tif, &m, 4)) - { - TIFFErrorExtR(tif, module, - "Error writing directory link"); - return (0); - } - tif->tif_diroff = 0; - /* Force a full-traversal to reach the zeroed pointer */ - tif->tif_lastdiroff = 0; - break; - } - nextdir = nextnextdir; - } - } - /* Remove skipped offset from IFD loop directory list. */ - _TIFFRemoveEntryFromDirectoryListByOffset(tif, torewritediroff); - } - else - { - if (tif->tif_header.big.tiff_diroff == tif->tif_diroff) - { - tif->tif_header.big.tiff_diroff = 0; - tif->tif_diroff = 0; - - TIFFSeekFile(tif, 8, SEEK_SET); - if (!WriteOK(tif, &(tif->tif_header.big.tiff_diroff), 8)) - { - TIFFErrorExtR(tif, tif->tif_name, "Error updating TIFF header"); - return (0); - } - } - else - { - uint64_t nextdir; - nextdir = tif->tif_header.big.tiff_diroff; - while (1) - { - uint64_t dircount64; - uint16_t dircount; - uint64_t nextnextdir; - - if (!SeekOK(tif, nextdir) || !ReadOK(tif, &dircount64, 8)) - { - TIFFErrorExtR(tif, module, - "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 0xFFFF) - { - TIFFErrorExtR(tif, module, - "Sanity check on tag count failed, likely " - "corrupt TIFF"); - return (0); - } - dircount = (uint16_t)dircount64; - (void)TIFFSeekFile(tif, nextdir + 8 + dircount * 20, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 8)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextnextdir); - if (nextnextdir == tif->tif_diroff) - { - uint64_t m; - m = 0; - (void)TIFFSeekFile(tif, nextdir + 8 + dircount * 20, - SEEK_SET); - if (!WriteOK(tif, &m, 8)) - { - TIFFErrorExtR(tif, module, - "Error writing directory link"); - return (0); - } - tif->tif_diroff = 0; - /* Force a full-traversal to reach the zeroed pointer */ - tif->tif_lastdiroff = 0; - break; - } - nextdir = nextnextdir; - } - } - /* Remove skipped offset from IFD loop directory list. */ - _TIFFRemoveEntryFromDirectoryListByOffset(tif, torewritediroff); - } - - /* - * Now use TIFFWriteDirectorySec() normally. - */ - return TIFFWriteDirectorySec(tif, isimage, imagedone, pdiroff); -} /*-- TIFFRewriteDirectorySec() --*/ - -/* - * Similar to TIFFWriteDirectory(), but if the directory has already - * been written once, it is relocated to the end of the file, in case it - * has changed in size. Note that this will result in the loss of the - * previously used directory space. - */ -int TIFFRewriteDirectory(TIFF *tif) -{ - return TIFFRewriteDirectorySec(tif, TRUE, TRUE, NULL); -} - -static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone, - uint64_t *pdiroff) -{ - static const char module[] = "TIFFWriteDirectorySec"; - uint32_t ndir; - TIFFDirEntry *dir; - uint32_t dirsize; - void *dirmem; - uint32_t m; - if (tif->tif_mode == O_RDONLY) - return (1); - - _TIFFFillStriles(tif); - - /* - * Clear write state so that subsequent images with - * different characteristics get the right buffers - * setup for them. - */ - if (imagedone) - { - if (tif->tif_flags & TIFF_POSTENCODE) - { - tif->tif_flags &= ~TIFF_POSTENCODE; - if (!(*tif->tif_postencode)(tif)) - { - TIFFErrorExtR(tif, module, - "Error post-encoding before directory write"); - return (0); - } - } - (*tif->tif_close)(tif); /* shutdown encoder */ - /* - * Flush any data that might have been written - * by the compression close+cleanup routines. But - * be careful not to write stuff if we didn't add data - * in the previous steps as the "rawcc" data may well be - * a previously read tile/strip in mixed read/write mode. - */ - if (tif->tif_rawcc > 0 && (tif->tif_flags & TIFF_BEENWRITING) != 0) - { - if (!TIFFFlushData1(tif)) - { - TIFFErrorExtR(tif, module, - "Error flushing data before directory write"); - return (0); - } - } - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) - { - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawcp = NULL; - tif->tif_rawcc = 0; - tif->tif_rawdatasize = 0; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - } - tif->tif_flags &= ~(TIFF_BEENWRITING | TIFF_BUFFERSETUP); - } - - if (TIFFFieldSet(tif, FIELD_COMPRESSION) && - (tif->tif_dir.td_compression == COMPRESSION_DEFLATE)) - { - TIFFWarningExtR(tif, module, - "Creating TIFF with legacy Deflate codec identifier, " - "COMPRESSION_ADOBE_DEFLATE is more widely supported"); - } - dir = NULL; - dirmem = NULL; - dirsize = 0; - while (1) - { - /* The first loop only determines "ndir" and uses TIFFLinkDirectory() to - * set the offset at which the IFD is to be written to the file. - * The second loop writes IFD entries to the file. */ - ndir = 0; - if (dir == NULL) - tif->tif_dir.td_dirdatasize_write = 0; - if (isimage) - { - /*-- Step 1: Process named tags for an image with FIELD bits - * associated. --*/ - if (TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) - { - if (!TIFFWriteDirectoryTagShortLong(tif, &ndir, dir, - TIFFTAG_IMAGEWIDTH, - tif->tif_dir.td_imagewidth)) - goto bad; - if (!TIFFWriteDirectoryTagShortLong( - tif, &ndir, dir, TIFFTAG_IMAGELENGTH, - tif->tif_dir.td_imagelength)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) - { - if (!TIFFWriteDirectoryTagShortLong(tif, &ndir, dir, - TIFFTAG_TILEWIDTH, - tif->tif_dir.td_tilewidth)) - goto bad; - if (!TIFFWriteDirectoryTagShortLong(tif, &ndir, dir, - TIFFTAG_TILELENGTH, - tif->tif_dir.td_tilelength)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_RESOLUTION)) - { - if (!TIFFWriteDirectoryTagRational(tif, &ndir, dir, - TIFFTAG_XRESOLUTION, - tif->tif_dir.td_xresolution)) - goto bad; - if (!TIFFWriteDirectoryTagRational(tif, &ndir, dir, - TIFFTAG_YRESOLUTION, - tif->tif_dir.td_yresolution)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_POSITION)) - { - if (!TIFFWriteDirectoryTagRational(tif, &ndir, dir, - TIFFTAG_XPOSITION, - tif->tif_dir.td_xposition)) - goto bad; - if (!TIFFWriteDirectoryTagRational(tif, &ndir, dir, - TIFFTAG_YPOSITION, - tif->tif_dir.td_yposition)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_SUBFILETYPE)) - { - if (!TIFFWriteDirectoryTagLong(tif, &ndir, dir, - TIFFTAG_SUBFILETYPE, - tif->tif_dir.td_subfiletype)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_BITSPERSAMPLE)) - { - if (!TIFFWriteDirectoryTagShortPerSample( - tif, &ndir, dir, TIFFTAG_BITSPERSAMPLE, - tif->tif_dir.td_bitspersample)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_COMPRESSION)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_COMPRESSION, - tif->tif_dir.td_compression)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_PHOTOMETRIC)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_PHOTOMETRIC, - tif->tif_dir.td_photometric)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_THRESHHOLDING)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_THRESHHOLDING, - tif->tif_dir.td_threshholding)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_FILLORDER)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_FILLORDER, - tif->tif_dir.td_fillorder)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_ORIENTATION)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_ORIENTATION, - tif->tif_dir.td_orientation)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) - { - if (!TIFFWriteDirectoryTagShort( - tif, &ndir, dir, TIFFTAG_SAMPLESPERPIXEL, - tif->tif_dir.td_samplesperpixel)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) - { - if (!TIFFWriteDirectoryTagShortLong( - tif, &ndir, dir, TIFFTAG_ROWSPERSTRIP, - tif->tif_dir.td_rowsperstrip)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_MINSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagShortPerSample( - tif, &ndir, dir, TIFFTAG_MINSAMPLEVALUE, - tif->tif_dir.td_minsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagShortPerSample( - tif, &ndir, dir, TIFFTAG_MAXSAMPLEVALUE, - tif->tif_dir.td_maxsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_PLANARCONFIG)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_PLANARCONFIG, - tif->tif_dir.td_planarconfig)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_RESOLUTIONUNIT)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_RESOLUTIONUNIT, - tif->tif_dir.td_resolutionunit)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_PAGENUMBER)) - { - if (!TIFFWriteDirectoryTagShortArray( - tif, &ndir, dir, TIFFTAG_PAGENUMBER, 2, - &tif->tif_dir.td_pagenumber[0])) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) - { - if (!isTiled(tif)) - { - if (!TIFFWriteDirectoryTagLongLong8Array( - tif, &ndir, dir, TIFFTAG_STRIPBYTECOUNTS, - tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripbytecount_p)) - goto bad; - } - else - { - if (!TIFFWriteDirectoryTagLongLong8Array( - tif, &ndir, dir, TIFFTAG_TILEBYTECOUNTS, - tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripbytecount_p)) - goto bad; - } - } - if (TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) - { - if (!isTiled(tif)) - { - /* td_stripoffset_p might be NULL in an odd OJPEG case. See - * tif_dirread.c around line 3634. - * XXX: OJPEG hack. - * If a) compression is OJPEG, b) it's not a tiled TIFF, - * and c) the number of strips is 1, - * then we tolerate the absence of stripoffsets tag, - * because, presumably, all required data is in the - * JpegInterchangeFormat stream. - * We can get here when using tiffset on such a file. - * See http://bugzilla.maptools.org/show_bug.cgi?id=2500 - */ - if (tif->tif_dir.td_stripoffset_p != NULL && - !TIFFWriteDirectoryTagLongLong8Array( - tif, &ndir, dir, TIFFTAG_STRIPOFFSETS, - tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripoffset_p)) - goto bad; - } - else - { - if (!TIFFWriteDirectoryTagLongLong8Array( - tif, &ndir, dir, TIFFTAG_TILEOFFSETS, - tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripoffset_p)) - goto bad; - } - } - if (TIFFFieldSet(tif, FIELD_COLORMAP)) - { - if (!TIFFWriteDirectoryTagColormap(tif, &ndir, dir)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_EXTRASAMPLES)) - { - if (tif->tif_dir.td_extrasamples) - { - uint16_t na; - uint16_t *nb; - TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &na, &nb); - if (!TIFFWriteDirectoryTagShortArray( - tif, &ndir, dir, TIFFTAG_EXTRASAMPLES, na, nb)) - goto bad; - } - } - if (TIFFFieldSet(tif, FIELD_SAMPLEFORMAT)) - { - if (!TIFFWriteDirectoryTagShortPerSample( - tif, &ndir, dir, TIFFTAG_SAMPLEFORMAT, - tif->tif_dir.td_sampleformat)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_SMINSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagSampleformatArray( - tif, &ndir, dir, TIFFTAG_SMINSAMPLEVALUE, - tif->tif_dir.td_samplesperpixel, - tif->tif_dir.td_sminsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_SMAXSAMPLEVALUE)) - { - if (!TIFFWriteDirectoryTagSampleformatArray( - tif, &ndir, dir, TIFFTAG_SMAXSAMPLEVALUE, - tif->tif_dir.td_samplesperpixel, - tif->tif_dir.td_smaxsamplevalue)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_IMAGEDEPTH)) - { - if (!TIFFWriteDirectoryTagLong(tif, &ndir, dir, - TIFFTAG_IMAGEDEPTH, - tif->tif_dir.td_imagedepth)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_TILEDEPTH)) - { - if (!TIFFWriteDirectoryTagLong(tif, &ndir, dir, - TIFFTAG_TILEDEPTH, - tif->tif_dir.td_tiledepth)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_HALFTONEHINTS)) - { - if (!TIFFWriteDirectoryTagShortArray( - tif, &ndir, dir, TIFFTAG_HALFTONEHINTS, 2, - &tif->tif_dir.td_halftonehints[0])) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_YCBCRSUBSAMPLING)) - { - if (!TIFFWriteDirectoryTagShortArray( - tif, &ndir, dir, TIFFTAG_YCBCRSUBSAMPLING, 2, - &tif->tif_dir.td_ycbcrsubsampling[0])) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_YCBCRPOSITIONING)) - { - if (!TIFFWriteDirectoryTagShort( - tif, &ndir, dir, TIFFTAG_YCBCRPOSITIONING, - tif->tif_dir.td_ycbcrpositioning)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_REFBLACKWHITE)) - { - if (!TIFFWriteDirectoryTagRationalArray( - tif, &ndir, dir, TIFFTAG_REFERENCEBLACKWHITE, 6, - tif->tif_dir.td_refblackwhite)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_TRANSFERFUNCTION)) - { - if (!TIFFWriteDirectoryTagTransferfunction(tif, &ndir, dir)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_INKNAMES)) - { - if (!TIFFWriteDirectoryTagAscii( - tif, &ndir, dir, TIFFTAG_INKNAMES, - tif->tif_dir.td_inknameslen, tif->tif_dir.td_inknames)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) - { - if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, - TIFFTAG_NUMBEROFINKS, - tif->tif_dir.td_numberofinks)) - goto bad; - } - if (TIFFFieldSet(tif, FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif, &ndir, dir)) - goto bad; - } - /*-- Step 2: Process named tags for an image with FIELD bits - added by a codec. - Attention: There is only code for some field_types, - which are actually used by current codecs. --*/ - { - uint32_t n; - for (n = 0; n < tif->tif_nfields; n++) - { - const TIFFField *o; - o = tif->tif_fields[n]; - if ((o->field_bit >= FIELD_CODEC) && - (TIFFFieldSet(tif, o->field_bit))) - { - switch (o->set_get_field_type) - { - case TIFF_SETGET_ASCII: - { - uint32_t pa; - char *pb; - assert(o->field_type == TIFF_ASCII); - assert(o->field_readcount == TIFF_VARIABLE); - assert(o->field_passcount == 0); - TIFFGetField(tif, o->field_tag, &pb); - pa = (uint32_t)(strlen(pb) + 1); - if (!TIFFWriteDirectoryTagAscii( - tif, &ndir, dir, (uint16_t)o->field_tag, - pa, pb)) - goto bad; - } - break; - case TIFF_SETGET_UINT16: - { - uint16_t p; - assert(o->field_type == TIFF_SHORT); - assert(o->field_readcount == 1); - assert(o->field_passcount == 0); - TIFFGetField(tif, o->field_tag, &p); - if (!TIFFWriteDirectoryTagShort( - tif, &ndir, dir, (uint16_t)o->field_tag, - p)) - goto bad; - } - break; - case TIFF_SETGET_UINT32: - { - uint32_t p; - assert(o->field_type == TIFF_LONG); - assert(o->field_readcount == 1); - assert(o->field_passcount == 0); - TIFFGetField(tif, o->field_tag, &p); - if (!TIFFWriteDirectoryTagLong( - tif, &ndir, dir, (uint16_t)o->field_tag, - p)) - goto bad; - } - break; - case TIFF_SETGET_C32_UINT8: - { - uint32_t pa; - void *pb; - assert(o->field_type == TIFF_UNDEFINED); - assert(o->field_readcount == TIFF_VARIABLE2); - assert(o->field_passcount == 1); - TIFFGetField(tif, o->field_tag, &pa, &pb); - if (!TIFFWriteDirectoryTagUndefinedArray( - tif, &ndir, dir, (uint16_t)o->field_tag, - pa, pb)) - goto bad; - } - break; - default: - TIFFErrorExtR( - tif, module, - "Cannot write tag %" PRIu32 " (%s)", - TIFFFieldTag(o), - o->field_name ? o->field_name : "unknown"); - goto bad; - } - } - } - } - } - /*-- Step 3: Process custom tags without FIELD bit for an image - * or for custom IFDs (e.g. EXIF) with !isimage. --*/ - for (m = 0; m < (uint32_t)(tif->tif_dir.td_customValueCount); m++) - { - uint16_t tag = - (uint16_t)tif->tif_dir.td_customValues[m].info->field_tag; - uint32_t count = tif->tif_dir.td_customValues[m].count; - switch (tif->tif_dir.td_customValues[m].info->field_type) - { - case TIFF_ASCII: - if (!TIFFWriteDirectoryTagAscii( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_UNDEFINED: - if (!TIFFWriteDirectoryTagUndefinedArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_BYTE: - if (!TIFFWriteDirectoryTagByteArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SBYTE: - if (!TIFFWriteDirectoryTagSbyteArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SHORT: - if (!TIFFWriteDirectoryTagShortArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SSHORT: - if (!TIFFWriteDirectoryTagSshortArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_LONG: - if (!TIFFWriteDirectoryTagLongArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SLONG: - if (!TIFFWriteDirectoryTagSlongArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_LONG8: - if (!TIFFWriteDirectoryTagLong8Array( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_SLONG8: - if (!TIFFWriteDirectoryTagSlong8Array( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_RATIONAL: - { - /*-- Rational2Double: For Rationals evaluate - * "set_get_field_type" to determine internal storage size. - */ - int tv_size; - tv_size = TIFFFieldSetGetSize( - tif->tif_dir.td_customValues[m].info); - if (tv_size == 8) - { - if (!TIFFWriteDirectoryTagRationalDoubleArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - } - else - { - /*-- default should be tv_size == 4 */ - if (!TIFFWriteDirectoryTagRationalArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - /*-- ToDo: After Testing, this should be removed and - * tv_size==4 should be set as default. */ - if (tv_size != 4) - { - TIFFErrorExtR( - tif, "TIFFLib: _TIFFWriteDirectorySec()", - "Rational2Double: .set_get_field_type is " - "not 4 but %d", - tv_size); - } - } - } - break; - case TIFF_SRATIONAL: - { - /*-- Rational2Double: For Rationals evaluate - * "set_get_field_type" to determine internal storage size. - */ - int tv_size; - tv_size = TIFFFieldSetGetSize( - tif->tif_dir.td_customValues[m].info); - if (tv_size == 8) - { - if (!TIFFWriteDirectoryTagSrationalDoubleArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - } - else - { - /*-- default should be tv_size == 4 */ - if (!TIFFWriteDirectoryTagSrationalArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - /*-- ToDo: After Testing, this should be removed and - * tv_size==4 should be set as default. */ - if (tv_size != 4) - { - TIFFErrorExtR( - tif, "TIFFLib: _TIFFWriteDirectorySec()", - "Rational2Double: .set_get_field_type is " - "not 4 but %d", - tv_size); - } - } - } - break; - case TIFF_FLOAT: - if (!TIFFWriteDirectoryTagFloatArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_DOUBLE: - if (!TIFFWriteDirectoryTagDoubleArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_IFD: - if (!TIFFWriteDirectoryTagIfdArray( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - case TIFF_IFD8: - if (!TIFFWriteDirectoryTagIfdIfd8Array( - tif, &ndir, dir, tag, count, - tif->tif_dir.td_customValues[m].value)) - goto bad; - break; - default: - assert(0); /* we should never get here */ - break; - } - } - /* "break" if IFD has been written above in second pass.*/ - if (dir != NULL) - break; - - /* Evaluate IFD data size: Finally, add the size of the IFD tag entries - * themselves. */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_dir.td_dirdatasize_write += 2 + ndir * 12 + 4; - else - tif->tif_dir.td_dirdatasize_write += 8 + ndir * 20 + 8; - - /* Setup a new directory within first pass. */ - dir = _TIFFmallocExt(tif, ndir * sizeof(TIFFDirEntry)); - if (dir == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - goto bad; - } - if (isimage) - { - /* Check, weather the IFD to be written is new or an already written - * IFD can be overwritten or needs to be re-written to a different - * location in the file because the IFD is extended with additional - * tags or the IFD data size is increased. - * - tif_diroff == 0, if a new directory has to be linked. - * - tif_diroff != 0, IFD has been re-read from file and will be - * overwritten or re-written. - */ - if (tif->tif_diroff == 0) - { - if (!TIFFLinkDirectory(tif)) - goto bad; - } - else if (tif->tif_dir.td_dirdatasize_write > - tif->tif_dir.td_dirdatasize_read) - { - if (dir != NULL) - { - _TIFFfreeExt(tif, dir); - dir = NULL; - } - if (!TIFFRewriteDirectorySec(tif, isimage, imagedone, pdiroff)) - goto bad; - return (1); - } - } - else - { - /* For !isimage, which means custom-IFD like EXIFIFD or - * checkpointing an IFD, determine whether to overwrite or append at - * the end of the file. - */ - if (!((tif->tif_dir.td_dirdatasize_read > 0) && - (tif->tif_dir.td_dirdatasize_write <= - tif->tif_dir.td_dirdatasize_read))) - { - /* Append at end of file and increment to an even offset. */ - tif->tif_diroff = - (TIFFSeekFile(tif, 0, SEEK_END) + 1) & (~((toff_t)1)); - } - } - /* Return IFD offset */ - if (pdiroff != NULL) - *pdiroff = tif->tif_diroff; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - dirsize = 2 + ndir * 12 + 4; - else - dirsize = 8 + ndir * 20 + 8; - /* Append IFD data stright after the IFD tag entries. - * Data that does not fit into an IFD tag entry is written to the file - * in the second pass of the while loop. That offset is stored in "dir". - */ - tif->tif_dataoff = tif->tif_diroff + dirsize; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_dataoff = (uint32_t)tif->tif_dataoff; - if ((tif->tif_dataoff < tif->tif_diroff) || - (tif->tif_dataoff < (uint64_t)dirsize)) - { - TIFFErrorExtR(tif, module, "Maximum TIFF file size exceeded"); - goto bad; - } - if (tif->tif_dataoff & 1) - tif->tif_dataoff++; - } /* while() */ - if (isimage) - { - /* For SubIFDs remember offset of SubIFD tag within main IFD. - * However, might be already done in TIFFWriteDirectoryTagSubifd() if - * there are more than one SubIFD. */ - if (TIFFFieldSet(tif, FIELD_SUBIFD) && (tif->tif_subifdoff == 0)) - { - uint32_t na; - TIFFDirEntry *nb; - for (na = 0, nb = dir;; na++, nb++) - { - if (na == ndir) - { - TIFFErrorExtR(tif, module, "Cannot find SubIFD tag"); - goto bad; - } - if (nb->tdir_tag == TIFFTAG_SUBIFD) - break; - } - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_subifdoff = tif->tif_diroff + 2 + na * 12 + 8; - else - tif->tif_subifdoff = tif->tif_diroff + 8 + na * 20 + 12; - } - } - /* Copy/swab IFD entries from "dir" into "dirmem", - * which is then written to file. */ - dirmem = _TIFFmallocExt(tif, dirsize); - if (dirmem == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - goto bad; - } - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint8_t *n; - uint32_t nTmp; - TIFFDirEntry *o; - n = dirmem; - *(uint16_t *)n = (uint16_t)ndir; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)n); - n += 2; - o = dir; - for (m = 0; m < ndir; m++) - { - *(uint16_t *)n = o->tdir_tag; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)n); - n += 2; - *(uint16_t *)n = o->tdir_type; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)n); - n += 2; - nTmp = (uint32_t)o->tdir_count; - _TIFFmemcpy(n, &nTmp, 4); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)n); - n += 4; - /* This is correct. The data has been */ - /* swabbed previously in TIFFWriteDirectoryTagData */ - _TIFFmemcpy(n, &o->tdir_offset, 4); - n += 4; - o++; - } - nTmp = (uint32_t)tif->tif_nextdiroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nTmp); - _TIFFmemcpy(n, &nTmp, 4); - } - else - { - uint8_t *n; - TIFFDirEntry *o; - n = dirmem; - *(uint64_t *)n = ndir; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)n); - n += 8; - o = dir; - for (m = 0; m < ndir; m++) - { - *(uint16_t *)n = o->tdir_tag; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)n); - n += 2; - *(uint16_t *)n = o->tdir_type; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)n); - n += 2; - _TIFFmemcpy(n, &o->tdir_count, 8); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)n); - n += 8; - _TIFFmemcpy(n, &o->tdir_offset, 8); - n += 8; - o++; - } - _TIFFmemcpy(n, &tif->tif_nextdiroff, 8); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)n); - } - _TIFFfreeExt(tif, dir); - dir = NULL; - if (!SeekOK(tif, tif->tif_diroff)) - { - TIFFErrorExtR(tif, module, - "IO error writing directory at seek to offset"); - goto bad; - } - if (!WriteOK(tif, dirmem, (tmsize_t)dirsize)) - { - TIFFErrorExtR(tif, module, "IO error writing directory"); - goto bad; - } - _TIFFfreeExt(tif, dirmem); - - /* Increment tif_curdir if IFD wasn't already written to file and no error - * occurred during IFD writing above. */ - if (isimage && !tif->tif_dir.td_iswrittentofile) - { - if (!((tif->tif_flags & TIFF_INSUBIFD) && - !(TIFFFieldSet(tif, FIELD_SUBIFD)))) - { - /*-- Normal main-IFD case --*/ - if (tif->tif_curdircount != TIFF_NON_EXISTENT_DIR_NUMBER) - { - tif->tif_curdir = tif->tif_curdircount; - } - else - { - /*ToDo SU: NEW_IFD_CURDIR_INCREMENTING: Delete this - * unexpected case after some testing time. */ - /* Attention: tif->tif_curdircount is already set within - * TIFFNumberOfDirectories() */ - tif->tif_curdircount = TIFFNumberOfDirectories(tif); - tif->tif_curdir = tif->tif_curdircount; - TIFFErrorExtR( - tif, module, - "tif_curdircount is TIFF_NON_EXISTENT_DIR_NUMBER, " - "not expected !! Line %d", - __LINE__); - goto bad; - } - } - else - { - /*-- SubIFD case -- */ - /* tif_curdir is always set to 0 for all SubIFDs. */ - tif->tif_curdir = 0; - } - } - /* Increment tif_curdircount only if main-IFD of an image was not already - * present on file. */ - /* Check in combination with (... && !(TIFFFieldSet(tif, FIELD_SUBIFD))) - * is necessary here because TIFF_INSUBIFD was already set above for the - * next SubIFD when this main-IFD (with FIELD_SUBIFD) is currently being - * written. */ - if (isimage && !tif->tif_dir.td_iswrittentofile && - !((tif->tif_flags & TIFF_INSUBIFD) && - !(TIFFFieldSet(tif, FIELD_SUBIFD)))) - tif->tif_curdircount++; - - tif->tif_dir.td_iswrittentofile = TRUE; - - /* Reset SubIFD writing stage after last SubIFD has been written. */ - if (imagedone && (tif->tif_flags & TIFF_INSUBIFD) && tif->tif_nsubifd == 0) - tif->tif_flags &= ~TIFF_INSUBIFD; - - /* Add or update this directory to the IFD list. */ - if (!_TIFFCheckDirNumberAndOffset(tif, tif->tif_curdir, tif->tif_diroff)) - { - TIFFErrorExtR(tif, module, - "Starting directory %u at offset 0x%" PRIx64 " (%" PRIu64 - ") might cause an IFD loop", - tif->tif_curdir, tif->tif_diroff, tif->tif_diroff); - } - - if (imagedone) - { - TIFFFreeDirectory(tif); - tif->tif_flags &= ~TIFF_DIRTYDIRECT; - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - /* Reset directory-related state for subsequent directories. */ - TIFFCreateDirectory(tif); - } - else - { - /* IFD is only checkpointed to file (or a custom IFD like EXIF is - * written), thus set IFD data size written to file. */ - tif->tif_dir.td_dirdatasize_read = tif->tif_dir.td_dirdatasize_write; - } - return (1); -bad: - if (dir != NULL) - _TIFFfreeExt(tif, dir); - if (dirmem != NULL) - _TIFFfreeExt(tif, dirmem); - return (0); -} - -static int8_t TIFFClampDoubleToInt8(double val) -{ - if (val > 127) - return 127; - if (val < -128 || val != val) - return -128; - return (int8_t)val; -} - -static int16_t TIFFClampDoubleToInt16(double val) -{ - if (val > 32767) - return 32767; - if (val < -32768 || val != val) - return -32768; - return (int16_t)val; -} - -static int32_t TIFFClampDoubleToInt32(double val) -{ - if (val > 0x7FFFFFFF) - return 0x7FFFFFFF; - if (val < -0x7FFFFFFF - 1 || val != val) - return -0x7FFFFFFF - 1; - return (int32_t)val; -} - -static uint8_t TIFFClampDoubleToUInt8(double val) -{ - if (val < 0) - return 0; - if (val > 255 || val != val) - return 255; - return (uint8_t)val; -} - -static uint16_t TIFFClampDoubleToUInt16(double val) -{ - if (val < 0) - return 0; - if (val > 65535 || val != val) - return 65535; - return (uint16_t)val; -} - -static uint32_t TIFFClampDoubleToUInt32(double val) -{ - if (val < 0) - return 0; - if (val > 0xFFFFFFFFU || val != val) - return 0xFFFFFFFFU; - return (uint32_t)val; -} - -static int TIFFWriteDirectoryTagSampleformatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - double *value) -{ - static const char module[] = "TIFFWriteDirectoryTagSampleformatArray"; - void *conv; - uint32_t i; - int ok; - conv = _TIFFmallocExt(tif, count * sizeof(double)); - if (conv == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - switch (tif->tif_dir.td_sampleformat) - { - case SAMPLEFORMAT_IEEEFP: - if (tif->tif_dir.td_bitspersample <= 32) - { - for (i = 0; i < count; ++i) - ((float *)conv)[i] = _TIFFClampDoubleToFloat(value[i]); - ok = TIFFWriteDirectoryTagFloatArray(tif, ndir, dir, tag, count, - (float *)conv); - } - else - { - ok = TIFFWriteDirectoryTagDoubleArray(tif, ndir, dir, tag, - count, value); - } - break; - case SAMPLEFORMAT_INT: - if (tif->tif_dir.td_bitspersample <= 8) - { - for (i = 0; i < count; ++i) - ((int8_t *)conv)[i] = TIFFClampDoubleToInt8(value[i]); - ok = TIFFWriteDirectoryTagSbyteArray(tif, ndir, dir, tag, count, - (int8_t *)conv); - } - else if (tif->tif_dir.td_bitspersample <= 16) - { - for (i = 0; i < count; ++i) - ((int16_t *)conv)[i] = TIFFClampDoubleToInt16(value[i]); - ok = TIFFWriteDirectoryTagSshortArray(tif, ndir, dir, tag, - count, (int16_t *)conv); - } - else - { - for (i = 0; i < count; ++i) - ((int32_t *)conv)[i] = TIFFClampDoubleToInt32(value[i]); - ok = TIFFWriteDirectoryTagSlongArray(tif, ndir, dir, tag, count, - (int32_t *)conv); - } - break; - case SAMPLEFORMAT_UINT: - if (tif->tif_dir.td_bitspersample <= 8) - { - for (i = 0; i < count; ++i) - ((uint8_t *)conv)[i] = TIFFClampDoubleToUInt8(value[i]); - ok = TIFFWriteDirectoryTagByteArray(tif, ndir, dir, tag, count, - (uint8_t *)conv); - } - else if (tif->tif_dir.td_bitspersample <= 16) - { - for (i = 0; i < count; ++i) - ((uint16_t *)conv)[i] = TIFFClampDoubleToUInt16(value[i]); - ok = TIFFWriteDirectoryTagShortArray(tif, ndir, dir, tag, count, - (uint16_t *)conv); - } - else - { - for (i = 0; i < count; ++i) - ((uint32_t *)conv)[i] = TIFFClampDoubleToUInt32(value[i]); - ok = TIFFWriteDirectoryTagLongArray(tif, ndir, dir, tag, count, - (uint32_t *)conv); - } - break; - default: - ok = 0; - } - - _TIFFfreeExt(tif, conv); - return (ok); -} - -static int TIFFWriteDirectoryTagAscii(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, char *value) -{ - return ( - TIFFWriteDirectoryTagCheckedAscii(tif, ndir, dir, tag, count, value)); -} - -static int TIFFWriteDirectoryTagUndefinedArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint8_t *value) -{ - return (TIFFWriteDirectoryTagCheckedUndefinedArray(tif, ndir, dir, tag, - count, value)); -} - -static int TIFFWriteDirectoryTagByteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint8_t *value) -{ - return (TIFFWriteDirectoryTagCheckedByteArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagSbyteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int8_t *value) -{ - return (TIFFWriteDirectoryTagCheckedSbyteArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagShort(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value) -{ - return (TIFFWriteDirectoryTagCheckedShort(tif, ndir, dir, tag, value)); -} - -static int TIFFWriteDirectoryTagShortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint16_t *value) -{ - return (TIFFWriteDirectoryTagCheckedShortArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagShortPerSample(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value) -{ - static const char module[] = "TIFFWriteDirectoryTagShortPerSample"; - uint16_t *m; - uint16_t *na; - uint16_t nb; - int o; - if (dir == NULL) - { - /* only evaluate IFD data size and inc. ndir */ - return (TIFFWriteDirectoryTagCheckedShortArray( - tif, ndir, dir, tag, tif->tif_dir.td_samplesperpixel, NULL)); - } - m = _TIFFmallocExt(tif, tif->tif_dir.td_samplesperpixel * sizeof(uint16_t)); - if (m == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - for (na = m, nb = 0; nb < tif->tif_dir.td_samplesperpixel; na++, nb++) - *na = value; - o = TIFFWriteDirectoryTagCheckedShortArray( - tif, ndir, dir, tag, tif->tif_dir.td_samplesperpixel, m); - _TIFFfreeExt(tif, m); - return (o); -} - -static int TIFFWriteDirectoryTagSshortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int16_t *value) -{ - return (TIFFWriteDirectoryTagCheckedSshortArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value) -{ - return (TIFFWriteDirectoryTagCheckedLong(tif, ndir, dir, tag, value)); -} - -static int TIFFWriteDirectoryTagLongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint32_t *value) -{ - return (TIFFWriteDirectoryTagCheckedLongArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagSlongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int32_t *value) -{ - return (TIFFWriteDirectoryTagCheckedSlongArray(tif, ndir, dir, tag, count, - value)); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagLong8Array() */ -/* */ -/* Write either Long8 or Long array depending on file type. */ -/************************************************************************/ -static int TIFFWriteDirectoryTagLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value) -{ - static const char module[] = "TIFFWriteDirectoryTagLong8Array"; - uint64_t *ma; - uint32_t mb; - uint32_t *p; - uint32_t *q; - int o; - - /* is this just a counting pass? */ - if (dir == NULL) - { - /* only evaluate IFD data size and inc. ndir */ - return (TIFFWriteDirectoryTagCheckedLong8Array(tif, ndir, dir, tag, - count, value)); - } - - /* We always write Long8 for BigTIFF, no checking needed. */ - if (tif->tif_flags & TIFF_BIGTIFF) - return (TIFFWriteDirectoryTagCheckedLong8Array(tif, ndir, dir, tag, - count, value)); - - /* - ** For classic tiff we want to verify everything is in range for long - ** and convert to long format. - */ - p = _TIFFmallocExt(tif, count * sizeof(uint32_t)); - if (p == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - for (q = p, ma = value, mb = 0; mb < count; ma++, mb++, q++) - { - if (*ma > 0xFFFFFFFF) - { - TIFFErrorExtR(tif, module, - "Attempt to write unsigned long value %" PRIu64 - " larger than 0xFFFFFFFF for tag %d in Classic TIFF " - "file. TIFF file writing aborted", - *ma, tag); - _TIFFfreeExt(tif, p); - return (0); - } - *q = (uint32_t)(*ma); - } - - o = TIFFWriteDirectoryTagCheckedLongArray(tif, ndir, dir, tag, count, p); - _TIFFfreeExt(tif, p); - - return (o); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagSlong8Array() */ -/* */ -/* Write either SLong8 or SLong array depending on file type. */ -/************************************************************************/ -static int TIFFWriteDirectoryTagSlong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, int64_t *value) -{ - static const char module[] = "TIFFWriteDirectoryTagSlong8Array"; - int64_t *ma; - uint32_t mb; - int32_t *p; - int32_t *q; - int o; - - /* is this just a counting pass? */ - if (dir == NULL) - { - /* only evaluate IFD data size and inc. ndir */ - return (TIFFWriteDirectoryTagCheckedSlong8Array(tif, ndir, dir, tag, - count, value)); - } - /* We always write SLong8 for BigTIFF, no checking needed. */ - if (tif->tif_flags & TIFF_BIGTIFF) - return (TIFFWriteDirectoryTagCheckedSlong8Array(tif, ndir, dir, tag, - count, value)); - - /* - ** For classic tiff we want to verify everything is in range for signed-long - ** and convert to signed-long format. - */ - p = _TIFFmallocExt(tif, count * sizeof(uint32_t)); - if (p == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - for (q = p, ma = value, mb = 0; mb < count; ma++, mb++, q++) - { - if (*ma > (2147483647)) - { - TIFFErrorExtR(tif, module, - "Attempt to write signed long value %" PRIi64 - " larger than 0x7FFFFFFF (2147483647) for tag %d in " - "Classic TIFF file. TIFF writing to file aborted", - *ma, tag); - _TIFFfreeExt(tif, p); - return (0); - } - else if (*ma < (-2147483647 - 1)) - { - TIFFErrorExtR(tif, module, - "Attempt to write signed long value %" PRIi64 - " smaller than 0x80000000 (-2147483648) for tag %d " - "in Classic TIFF file. TIFF writing to file aborted", - *ma, tag); - _TIFFfreeExt(tif, p); - return (0); - } - *q = (int32_t)(*ma); - } - - o = TIFFWriteDirectoryTagCheckedSlongArray(tif, ndir, dir, tag, count, p); - _TIFFfreeExt(tif, p); - - return (o); -} - -static int TIFFWriteDirectoryTagRational(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - double value) -{ - return (TIFFWriteDirectoryTagCheckedRational(tif, ndir, dir, tag, value)); -} - -static int TIFFWriteDirectoryTagRationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value) -{ - return (TIFFWriteDirectoryTagCheckedRationalArray(tif, ndir, dir, tag, - count, value)); -} - -static int TIFFWriteDirectoryTagSrationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value) -{ - return (TIFFWriteDirectoryTagCheckedSrationalArray(tif, ndir, dir, tag, - count, value)); -} - -/*-- Rational2Double: additional write functions */ -static int TIFFWriteDirectoryTagRationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - double *value) -{ - return (TIFFWriteDirectoryTagCheckedRationalDoubleArray(tif, ndir, dir, tag, - count, value)); -} - -static int TIFFWriteDirectoryTagSrationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - double *value) -{ - return (TIFFWriteDirectoryTagCheckedSrationalDoubleArray( - tif, ndir, dir, tag, count, value)); -} - -static int TIFFWriteDirectoryTagFloatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, float *value) -{ - return (TIFFWriteDirectoryTagCheckedFloatArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, double *value) -{ - return (TIFFWriteDirectoryTagCheckedDoubleArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagIfdArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint32_t *value) -{ - return (TIFFWriteDirectoryTagCheckedIfdArray(tif, ndir, dir, tag, count, - value)); -} - -static int TIFFWriteDirectoryTagShortLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value) -{ - if (value <= 0xFFFF) - return (TIFFWriteDirectoryTagCheckedShort(tif, ndir, dir, tag, - (uint16_t)value)); - else - return (TIFFWriteDirectoryTagCheckedLong(tif, ndir, dir, tag, value)); -} - -static int _WriteAsType(TIFF *tif, uint64_t strile_size, - uint64_t uncompressed_threshold) -{ - const uint16_t compression = tif->tif_dir.td_compression; - if (compression == COMPRESSION_NONE) - { - return strile_size > uncompressed_threshold; - } - else if (compression == COMPRESSION_JPEG || - compression == COMPRESSION_LZW || - compression == COMPRESSION_ADOBE_DEFLATE || - compression == COMPRESSION_DEFLATE || - compression == COMPRESSION_LZMA || - compression == COMPRESSION_LERC || - compression == COMPRESSION_ZSTD || - compression == COMPRESSION_WEBP || compression == COMPRESSION_JXL) - { - /* For a few select compression types, we assume that in the worst */ - /* case the compressed size will be 10 times the uncompressed size. */ - /* This is overly pessismistic ! */ - return strile_size >= uncompressed_threshold / 10; - } - return 1; -} - -static int WriteAsLong8(TIFF *tif, uint64_t strile_size) -{ - return _WriteAsType(tif, strile_size, 0xFFFFFFFFU); -} - -static int WriteAsLong4(TIFF *tif, uint64_t strile_size) -{ - return _WriteAsType(tif, strile_size, 0xFFFFU); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagLongLong8Array() */ -/* */ -/* Write out LONG8 array and write a SHORT/LONG/LONG8 depending */ -/* on strile size and Classic/BigTIFF mode. */ -/************************************************************************/ - -static int TIFFWriteDirectoryTagLongLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value) -{ - static const char module[] = "TIFFWriteDirectoryTagLongLong8Array"; - int o; - int write_aslong4; - - if (tif->tif_dir.td_deferstrilearraywriting) - { - if (dir == NULL) - { - /* This is just a counting pass to count IFD entries. - * For deferstrilearraywriting no extra bytes will be written - * into IFD space. */ - (*ndir)++; - return 1; - } - return TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_NOTYPE, 0, 0, - NULL); - } - - if (tif->tif_flags & TIFF_BIGTIFF) - { - int write_aslong8 = 1; - /* In the case of ByteCounts array, we may be able to write them on LONG - * if the strip/tilesize is not too big. Also do that for count > 1 in - * the case someone would want to create a single-strip file with a - * growing height, in which case using LONG8 will be safer. */ - if (count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS) - { - write_aslong8 = WriteAsLong8(tif, TIFFStripSize64(tif)); - } - else if (count > 1 && tag == TIFFTAG_TILEBYTECOUNTS) - { - write_aslong8 = WriteAsLong8(tif, TIFFTileSize64(tif)); - } - if (write_aslong8) - { - return TIFFWriteDirectoryTagCheckedLong8Array(tif, ndir, dir, tag, - count, value); - } - } - - write_aslong4 = 1; - if (count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS) - { - write_aslong4 = WriteAsLong4(tif, TIFFStripSize64(tif)); - } - else if (count > 1 && tag == TIFFTAG_TILEBYTECOUNTS) - { - write_aslong4 = WriteAsLong4(tif, TIFFTileSize64(tif)); - } - if (write_aslong4) - { - /* - ** For classic tiff we want to verify everything is in range for LONG - ** and convert to long format. - */ - - uint32_t *p = _TIFFmallocExt(tif, count * sizeof(uint32_t)); - uint32_t *q; - uint64_t *ma; - uint32_t mb; - - if (p == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - for (q = p, ma = value, mb = 0; mb < count; ma++, mb++, q++) - { - if (*ma > 0xFFFFFFFF) - { - TIFFErrorExtR(tif, module, - "Attempt to write value larger than 0xFFFFFFFF " - "in LONG array."); - _TIFFfreeExt(tif, p); - return (0); - } - *q = (uint32_t)(*ma); - } - - o = TIFFWriteDirectoryTagCheckedLongArray(tif, ndir, dir, tag, count, - p); - _TIFFfreeExt(tif, p); - } - else - { - uint16_t *p = _TIFFmallocExt(tif, count * sizeof(uint16_t)); - uint16_t *q; - uint64_t *ma; - uint32_t mb; - - if (p == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - for (q = p, ma = value, mb = 0; mb < count; ma++, mb++, q++) - { - if (*ma > 0xFFFF) - { - /* Should not happen normally given the check we did before */ - TIFFErrorExtR(tif, module, - "Attempt to write value larger than 0xFFFF in " - "SHORT array."); - _TIFFfreeExt(tif, p); - return (0); - } - *q = (uint16_t)(*ma); - } - - o = TIFFWriteDirectoryTagCheckedShortArray(tif, ndir, dir, tag, count, - p); - _TIFFfreeExt(tif, p); - } - - return (o); -} - -/************************************************************************/ -/* TIFFWriteDirectoryTagIfdIfd8Array() */ -/* */ -/* Write either IFD8 or IFD array depending on file type. */ -/************************************************************************/ - -static int TIFFWriteDirectoryTagIfdIfd8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint64_t *value) -{ - static const char module[] = "TIFFWriteDirectoryTagIfdIfd8Array"; - uint64_t *ma; - uint32_t mb; - uint32_t *p; - uint32_t *q; - int o; - - /* We always write IFD8 for BigTIFF, no checking needed. */ - if (tif->tif_flags & TIFF_BIGTIFF) - return TIFFWriteDirectoryTagCheckedIfd8Array(tif, ndir, dir, tag, count, - value); - - /* - ** For classic tiff we want to verify everything is in range for IFD - ** and convert to long format. - */ - - p = _TIFFmallocExt(tif, count * sizeof(uint32_t)); - if (p == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - - for (q = p, ma = value, mb = 0; mb < count; ma++, mb++, q++) - { - if (*ma > 0xFFFFFFFF) - { - TIFFErrorExtR(tif, module, - "Attempt to write value larger than 0xFFFFFFFF in " - "Classic TIFF file."); - _TIFFfreeExt(tif, p); - return (0); - } - *q = (uint32_t)(*ma); - } - - o = TIFFWriteDirectoryTagCheckedIfdArray(tif, ndir, dir, tag, count, p); - _TIFFfreeExt(tif, p); - - return (o); -} - -/* - * Auxiliary function to determine the IFD data size to be written to the file. - * The IFD data size is finally the size of the IFD tag entries plus the IFD - * data that is written directly after the IFD tag entries. - */ -static void EvaluateIFDdatasizeWrite(TIFF *tif, uint32_t count, - uint32_t typesize, uint32_t *ndir) -{ - uint64_t datalength = (uint64_t)count * typesize; - if (datalength > ((tif->tif_flags & TIFF_BIGTIFF) ? 0x8U : 0x4U)) - { - /* LibTIFF increments write address to an even offset, thus datalength - * written is also incremented. */ - if (datalength & 1) - datalength++; - tif->tif_dir.td_dirdatasize_write += datalength; - } - (*ndir)++; -} - -static int TIFFWriteDirectoryTagColormap(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir) -{ - static const char module[] = "TIFFWriteDirectoryTagColormap"; - uint32_t m; - uint16_t *n; - int o; - m = (1 << tif->tif_dir.td_bitspersample); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, 3 * m, sizeof(uint16_t), ndir); - return 1; - } - - n = _TIFFmallocExt(tif, 3 * m * sizeof(uint16_t)); - if (n == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - _TIFFmemcpy(&n[0], tif->tif_dir.td_colormap[0], m * sizeof(uint16_t)); - _TIFFmemcpy(&n[m], tif->tif_dir.td_colormap[1], m * sizeof(uint16_t)); - _TIFFmemcpy(&n[2 * m], tif->tif_dir.td_colormap[2], m * sizeof(uint16_t)); - o = TIFFWriteDirectoryTagCheckedShortArray(tif, ndir, dir, TIFFTAG_COLORMAP, - 3 * m, n); - _TIFFfreeExt(tif, n); - return (o); -} - -static int TIFFWriteDirectoryTagTransferfunction(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir) -{ - static const char module[] = "TIFFWriteDirectoryTagTransferfunction"; - uint32_t m; - uint16_t n; - uint16_t *o; - int p; - /* TIFFTAG_TRANSFERFUNCTION expects (1 or 3) pointer to arrays with - * (1 << BitsPerSample) * uint16_t values. - */ - m = (1 << tif->tif_dir.td_bitspersample); - /* clang-format off */ - n = (tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples) > 1 ? 3 : 1; - /* clang-format on */ - - /* Check for proper number of transferfunctions */ - for (int i = 0; i < n; i++) - { - if (tif->tif_dir.td_transferfunction[i] == NULL) - { - TIFFWarningExtR(tif, module, - "Too few TransferFunctions provided. Tag " - "not written to file"); - return (1); /* Not an error; only tag is not written. */ - } - } - /* - * Check if the table can be written as a single column, - * or if it must be written as 3 columns. Note that we - * write a 3-column tag if there are 2 samples/pixel and - * a single column of data won't suffice--hmm. - */ - if (n == 3) - { - if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0], - tif->tif_dir.td_transferfunction[2], - m * sizeof(uint16_t)) && - !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0], - tif->tif_dir.td_transferfunction[1], - m * sizeof(uint16_t))) - n = 1; - } - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, n * m, 2, ndir); - return 1; - } - - o = _TIFFmallocExt(tif, n * m * sizeof(uint16_t)); - if (o == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - _TIFFmemcpy(&o[0], tif->tif_dir.td_transferfunction[0], - m * sizeof(uint16_t)); - if (n > 1) - _TIFFmemcpy(&o[m], tif->tif_dir.td_transferfunction[1], - m * sizeof(uint16_t)); - if (n > 2) - _TIFFmemcpy(&o[2 * m], tif->tif_dir.td_transferfunction[2], - m * sizeof(uint16_t)); - p = TIFFWriteDirectoryTagCheckedShortArray( - tif, ndir, dir, TIFFTAG_TRANSFERFUNCTION, n * m, o); - _TIFFfreeExt(tif, o); - return (p); -} - -static int TIFFWriteDirectoryTagSubifd(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir) -{ - static const char module[] = "TIFFWriteDirectoryTagSubifd"; - uint64_t m; - int n; - if (tif->tif_dir.td_nsubifd == 0) - return (1); - m = tif->tif_dataoff; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t *o; - uint64_t *pa; - uint32_t *pb; - uint16_t p; - o = _TIFFmallocExt(tif, tif->tif_dir.td_nsubifd * sizeof(uint32_t)); - if (o == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - pa = tif->tif_dir.td_subifd; - pb = o; - for (p = 0; p < tif->tif_dir.td_nsubifd; p++) - { - assert(pa != 0); - - /* Could happen if an classicTIFF has a SubIFD of type LONG8 (which - * is illegal) */ - if (*pa > 0xFFFFFFFFUL) - { - TIFFErrorExtR(tif, module, "Illegal value for SubIFD tag"); - _TIFFfreeExt(tif, o); - return (0); - } - *pb++ = (uint32_t)(*pa++); - } - n = TIFFWriteDirectoryTagCheckedIfdArray(tif, ndir, dir, TIFFTAG_SUBIFD, - tif->tif_dir.td_nsubifd, o); - _TIFFfreeExt(tif, o); - } - else - n = TIFFWriteDirectoryTagCheckedIfd8Array( - tif, ndir, dir, TIFFTAG_SUBIFD, tif->tif_dir.td_nsubifd, - tif->tif_dir.td_subifd); - - if (dir == NULL) - /* Just have evaluated IFD data size and incremented ndir - * above in sub-functions. */ - return (n); - - if (!n) - return (0); - /* - * Total hack: if this directory includes a SubIFD - * tag then force the next directories to be - * written as ``sub directories'' of this one. This - * is used to write things like thumbnails and - * image masks that one wants to keep out of the - * normal directory linkage access mechanism. - */ - tif->tif_flags |= TIFF_INSUBIFD; - tif->tif_nsubifd = tif->tif_dir.td_nsubifd; - if (tif->tif_dir.td_nsubifd == 1) - tif->tif_subifdoff = 0; - else - tif->tif_subifdoff = m; - return (1); -} - -static int TIFFWriteDirectoryTagCheckedAscii(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, char *value) -{ - assert(sizeof(char) == 1); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 1, ndir); - return 1; - } - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_ASCII, count, - count, value)); -} - -static int TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - uint8_t *value) -{ - assert(sizeof(uint8_t) == 1); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 1, ndir); - return 1; - } - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_UNDEFINED, - count, count, value)); -} - -static int TIFFWriteDirectoryTagCheckedByteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint8_t *value) -{ - assert(sizeof(uint8_t) == 1); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 1, ndir); - return 1; - } - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_BYTE, count, - count, value)); -} - -static int TIFFWriteDirectoryTagCheckedSbyteArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int8_t *value) -{ - assert(sizeof(int8_t) == 1); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 1, ndir); - return 1; - } - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SBYTE, count, - count, value)); -} - -static int TIFFWriteDirectoryTagCheckedShort(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t value) -{ - uint16_t m; - assert(sizeof(uint16_t) == 2); - if (dir == NULL) - { - /* No additional data to IFD data size just increment ndir. */ - (*ndir)++; - return 1; - } - m = value; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&m); - return ( - TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SHORT, 1, 2, &m)); -} - -static int TIFFWriteDirectoryTagCheckedShortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint16_t *value) -{ - assert(count < 0x80000000); - assert(sizeof(uint16_t) == 2); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 2, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SHORT, count, - count * 2, value)); -} - -static int TIFFWriteDirectoryTagCheckedSshortArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int16_t *value) -{ - assert(count < 0x80000000); - assert(sizeof(int16_t) == 2); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 2, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort((uint16_t *)value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SSHORT, count, - count * 2, value)); -} - -static int TIFFWriteDirectoryTagCheckedLong(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t value) -{ - uint32_t m; - assert(sizeof(uint32_t) == 4); - if (dir == NULL) - { - /* No additional data to IFD data size just increment ndir. */ - (*ndir)++; - return 1; - } - m = value; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&m); - return ( - TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_LONG, 1, 4, &m)); -} - -static int TIFFWriteDirectoryTagCheckedLongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint32_t *value) -{ - assert(count < 0x40000000); - assert(sizeof(uint32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 4, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_LONG, count, - count * 4, value)); -} - -static int TIFFWriteDirectoryTagCheckedSlongArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int32_t *value) -{ - assert(count < 0x40000000); - assert(sizeof(int32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 4, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SLONG, count, - count * 4, value)); -} - -static int TIFFWriteDirectoryTagCheckedLong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint64_t *value) -{ - assert(count < 0x20000000); - assert(sizeof(uint64_t) == 8); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - TIFFErrorExtR(tif, "TIFFWriteDirectoryTagCheckedLong8Array", - "LONG8 not allowed for ClassicTIFF"); - return (0); - } - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 8, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_LONG8, count, - count * 8, value)); -} - -static int TIFFWriteDirectoryTagCheckedSlong8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - int64_t *value) -{ - assert(count < 0x20000000); - assert(sizeof(int64_t) == 8); - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - TIFFErrorExtR(tif, "TIFFWriteDirectoryTagCheckedSlong8Array", - "SLONG8 not allowed for ClassicTIFF"); - return (0); - } - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 8, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8((uint64_t *)value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SLONG8, count, - count * 8, value)); -} - -static int TIFFWriteDirectoryTagCheckedRational(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - double value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedRational"; - uint32_t m[2]; - assert(sizeof(uint32_t) == 4); - if (value < 0) - { - TIFFErrorExtR(tif, module, "Negative value is illegal"); - return 0; - } - else if (value != value) - { - TIFFErrorExtR(tif, module, "Not-a-number value is illegal"); - return 0; - } - - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - tif->tif_dir.td_dirdatasize_write += - (tif->tif_flags & TIFF_BIGTIFF) ? 0 : 0x8U; - (*ndir)++; - return 1; - } - - DoubleToRational(value, &m[0], &m[1]); - - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabLong(&m[0]); - TIFFSwabLong(&m[1]); - } - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_RATIONAL, 1, 8, - &m[0])); -} - -static int TIFFWriteDirectoryTagCheckedRationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - float *value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedRationalArray"; - uint32_t *m; - float *na; - uint32_t *nb; - uint32_t nc; - int o; - assert(sizeof(uint32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count * 2, sizeof(uint32_t), ndir); - return 1; - } - m = _TIFFmallocExt(tif, count * 2 * sizeof(uint32_t)); - if (m == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - for (na = value, nb = m, nc = 0; nc < count; na++, nb += 2, nc++) - { - DoubleToRational(*na, &nb[0], &nb[1]); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m, count * 2); - o = TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_RATIONAL, count, - count * 8, &m[0]); - _TIFFfreeExt(tif, m); - return (o); -} - -static int TIFFWriteDirectoryTagCheckedSrationalArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, - uint32_t count, - float *value) -{ - static const char module[] = "TIFFWriteDirectoryTagCheckedSrationalArray"; - int32_t *m; - float *na; - int32_t *nb; - uint32_t nc; - int o; - assert(sizeof(int32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count * 2, sizeof(int32_t), ndir); - return 1; - } - m = _TIFFmallocExt(tif, count * 2 * sizeof(int32_t)); - if (m == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - for (na = value, nb = m, nc = 0; nc < count; na++, nb += 2, nc++) - { - DoubleToSrational(*na, &nb[0], &nb[1]); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)m, count * 2); - o = TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SRATIONAL, count, - count * 8, &m[0]); - _TIFFfreeExt(tif, m); - return (o); -} - -/*-- Rational2Double: additional write functions for double arrays */ -static int -TIFFWriteDirectoryTagCheckedRationalDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, double *value) -{ - static const char module[] = - "TIFFWriteDirectoryTagCheckedRationalDoubleArray"; - uint32_t *m; - double *na; - uint32_t *nb; - uint32_t nc; - int o; - assert(sizeof(uint32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count * 2, sizeof(uint32_t), ndir); - return 1; - } - m = _TIFFmallocExt(tif, count * 2 * sizeof(uint32_t)); - if (m == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - for (na = value, nb = m, nc = 0; nc < count; na++, nb += 2, nc++) - { - DoubleToRational(*na, &nb[0], &nb[1]); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(m, count * 2); - o = TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_RATIONAL, count, - count * 8, &m[0]); - _TIFFfreeExt(tif, m); - return (o); -} /*-- TIFFWriteDirectoryTagCheckedRationalDoubleArray() ------- */ - -static int TIFFWriteDirectoryTagCheckedSrationalDoubleArray( - TIFF *tif, uint32_t *ndir, TIFFDirEntry *dir, uint16_t tag, uint32_t count, - double *value) -{ - static const char module[] = - "TIFFWriteDirectoryTagCheckedSrationalDoubleArray"; - int32_t *m; - double *na; - int32_t *nb; - uint32_t nc; - int o; - assert(sizeof(int32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count * 2, sizeof(int32_t), ndir); - return 1; - } - m = _TIFFmallocExt(tif, count * 2 * sizeof(int32_t)); - if (m == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - for (na = value, nb = m, nc = 0; nc < count; na++, nb += 2, nc++) - { - DoubleToSrational(*na, &nb[0], &nb[1]); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong((uint32_t *)m, count * 2); - o = TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_SRATIONAL, count, - count * 8, &m[0]); - _TIFFfreeExt(tif, m); - return (o); -} /*--- TIFFWriteDirectoryTagCheckedSrationalDoubleArray() -------- */ - -/** ----- Rational2Double: Double To Rational Conversion ----------------------------------------------------------- -* There is a mathematical theorem to convert real numbers into a rational -(integer fraction) number. -* This is called "continuous fraction" which uses the Euclidean algorithm to -find the greatest common divisor (GCD). -* (ref. e.g. https://de.wikipedia.org/wiki/Kettenbruch or -https://en.wikipedia.org/wiki/Continued_fraction -* https://en.wikipedia.org/wiki/Euclidean_algorithm) -* The following functions implement the -* - ToRationalEuclideanGCD() auxiliary function which mainly -implements euclidean GCD -* - DoubleToRational() conversion function for un-signed -rationals -* - DoubleToSrational() conversion function for signed rationals -------------------------------------------------------------------------------------------------------------------*/ - -/**---- ToRationalEuclideanGCD() ----------------------------------------- -* Calculates the rational fractional of a double input value -* using the Euclidean algorithm to find the greatest common divisor (GCD) -------------------------------------------------------------------------*/ -static void ToRationalEuclideanGCD(double value, int blnUseSignedRange, - int blnUseSmallRange, uint64_t *ullNum, - uint64_t *ullDenom) -{ - /* Internally, the integer variables can be bigger than the external ones, - * as long as the result will fit into the external variable size. - */ - uint64_t numSum[3] = {0, 1, 0}, denomSum[3] = {1, 0, 0}; - uint64_t aux, bigNum, bigDenom; - uint64_t returnLimit; - int i; - uint64_t nMax; - double fMax; - unsigned long maxDenom; - /*-- nMax and fMax defines the initial accuracy of the starting fractional, - * or better, the highest used integer numbers used within the starting - * fractional (bigNum/bigDenom). There are two approaches, which can - * accidentally lead to different accuracies just depending on the value. - * Therefore, blnUseSmallRange steers this behavior. - * For long long nMax = ((9223372036854775807-1)/2); for long nMax = - * ((2147483647-1)/2); - */ - if (blnUseSmallRange) - { - nMax = (uint64_t)((2147483647 - 1) / 2); /* for ULONG range */ - } - else - { - nMax = ((9223372036854775807 - 1) / 2); /* for ULLONG range */ - } - fMax = (double)nMax; - - /*-- For the Euclidean GCD define the denominator range, so that it stays - * within size of unsigned long variables. maxDenom should be LONG_MAX for - * negative values and ULONG_MAX for positive ones. Also the final returned - * value of ullNum and ullDenom is limited according to signed- or - * unsigned-range. - */ - if (blnUseSignedRange) - { - maxDenom = 2147483647UL; /*LONG_MAX = 0x7FFFFFFFUL*/ - returnLimit = maxDenom; - } - else - { - maxDenom = 0xFFFFFFFFUL; /*ULONG_MAX = 0xFFFFFFFFUL*/ - returnLimit = maxDenom; - } - - /*-- First generate a rational fraction (bigNum/bigDenom) which represents - *the value as a rational number with the highest accuracy. Therefore, - *uint64_t (uint64_t) is needed. This rational fraction is then reduced - *using the Euclidean algorithm to find the greatest common divisor (GCD). - * bigNum = big numinator of value without fraction (or cut residual - *fraction) bigDenom = big denominator of value - *-- Break-criteria so that uint64_t cast to "bigNum" introduces no error - *and bigDenom has no overflow, and stop with enlargement of fraction when - *the double-value of it reaches an integer number without fractional part. - */ - bigDenom = 1; - while ((value != floor(value)) && (value < fMax) && (bigDenom < nMax)) - { - bigDenom <<= 1; - value *= 2; - } - bigNum = (uint64_t)value; - - /*-- Start Euclidean algorithm to find the greatest common divisor (GCD) -- - */ -#define MAX_ITERATIONS 64 - for (i = 0; i < MAX_ITERATIONS; i++) - { - uint64_t val; - /* if bigDenom is not zero, calculate integer part of fraction. */ - if (bigDenom == 0) - { - break; - } - val = bigNum / bigDenom; - - /* Set bigDenom to reminder of bigNum/bigDenom and bigNum to previous - * denominator bigDenom. */ - aux = bigNum; - bigNum = bigDenom; - bigDenom = aux % bigDenom; - - /* calculate next denominator and check for its given maximum */ - aux = val; - if (denomSum[1] * val + denomSum[0] >= maxDenom) - { - aux = (maxDenom - denomSum[0]) / denomSum[1]; - if (aux * 2 >= val || denomSum[1] >= maxDenom) - i = (MAX_ITERATIONS + - 1); /* exit but execute rest of for-loop */ - else - break; - } - /* calculate next numerator to numSum2 and save previous one to numSum0; - * numSum1 just copy of numSum2. */ - numSum[2] = aux * numSum[1] + numSum[0]; - numSum[0] = numSum[1]; - numSum[1] = numSum[2]; - /* calculate next denominator to denomSum2 and save previous one to - * denomSum0; denomSum1 just copy of denomSum2. */ - denomSum[2] = aux * denomSum[1] + denomSum[0]; - denomSum[0] = denomSum[1]; - denomSum[1] = denomSum[2]; - } - - /*-- Check and adapt for final variable size and return values; reduces - * internal accuracy; denominator is kept in ULONG-range with maxDenom -- */ - while (numSum[1] > returnLimit || denomSum[1] > returnLimit) - { - numSum[1] = numSum[1] / 2; - denomSum[1] = denomSum[1] / 2; - } - - /* return values */ - *ullNum = numSum[1]; - *ullDenom = denomSum[1]; - -} /*-- ToRationalEuclideanGCD() -------------- */ - -/**---- DoubleToRational() ----------------------------------------------- -* Calculates the rational fractional of a double input value -* for UN-SIGNED rationals, -* using the Euclidean algorithm to find the greatest common divisor (GCD) -------------------------------------------------------------------------*/ -static void DoubleToRational(double value, uint32_t *num, uint32_t *denom) -{ - /*---- UN-SIGNED RATIONAL ---- */ - double dblDiff, dblDiff2; - uint64_t ullNum, ullDenom, ullNum2, ullDenom2; - - /*-- Check for negative values. If so it is an error. */ - /* Test written that way to catch NaN */ - if (!(value >= 0)) - { - *num = *denom = 0; - TIFFErrorExt(0, "TIFFLib: DoubleToRational()", - " Negative Value for Unsigned Rational given."); - return; - } - - /*-- Check for too big numbers (> ULONG_MAX) -- */ - if (value > 0xFFFFFFFFUL) - { - *num = 0xFFFFFFFFU; - *denom = 0; - return; - } - /*-- Check for easy integer numbers -- */ - if (value == (uint32_t)(value)) - { - *num = (uint32_t)value; - *denom = 1; - return; - } - /*-- Check for too small numbers for "unsigned long" type rationals -- */ - if (value < 1.0 / (double)0xFFFFFFFFUL) - { - *num = 0; - *denom = 0xFFFFFFFFU; - return; - } - - /*-- There are two approaches using the Euclidean algorithm, - * which can accidentally lead to different accuracies just depending on - * the value. Try both and define which one was better. - */ - ToRationalEuclideanGCD(value, FALSE, FALSE, &ullNum, &ullDenom); - ToRationalEuclideanGCD(value, FALSE, TRUE, &ullNum2, &ullDenom2); - /*-- Double-Check, that returned values fit into ULONG :*/ - if (ullNum > 0xFFFFFFFFUL || ullDenom > 0xFFFFFFFFUL || - ullNum2 > 0xFFFFFFFFUL || ullDenom2 > 0xFFFFFFFFUL) - { - TIFFErrorExt(0, "TIFFLib: DoubleToRational()", - " Num or Denom exceeds ULONG: val=%14.6f, num=%12" PRIu64 - ", denom=%12" PRIu64 " | num2=%12" PRIu64 - ", denom2=%12" PRIu64 "", - value, ullNum, ullDenom, ullNum2, ullDenom2); - assert(0); - } - - /* Check, which one has higher accuracy and take that. */ - dblDiff = fabs(value - ((double)ullNum / (double)ullDenom)); - dblDiff2 = fabs(value - ((double)ullNum2 / (double)ullDenom2)); - if (dblDiff < dblDiff2) - { - *num = (uint32_t)ullNum; - *denom = (uint32_t)ullDenom; - } - else - { - *num = (uint32_t)ullNum2; - *denom = (uint32_t)ullDenom2; - } -} /*-- DoubleToRational() -------------- */ - -/**---- DoubleToSrational() ----------------------------------------------- -* Calculates the rational fractional of a double input value -* for SIGNED rationals, -* using the Euclidean algorithm to find the greatest common divisor (GCD) -------------------------------------------------------------------------*/ -static void DoubleToSrational(double value, int32_t *num, int32_t *denom) -{ - /*---- SIGNED RATIONAL ----*/ - int neg = 1; - double dblDiff, dblDiff2; - uint64_t ullNum, ullDenom, ullNum2, ullDenom2; - - /*-- Check for negative values and use then the positive one for internal - * calculations, but take the sign into account before returning. */ - if (value < 0) - { - neg = -1; - value = -value; - } - - /*-- Check for too big numbers (> LONG_MAX) -- */ - if (value > 0x7FFFFFFFL) - { - *num = 0x7FFFFFFFL; - *denom = 0; - return; - } - /*-- Check for easy numbers -- */ - if (value == (int32_t)(value)) - { - *num = (int32_t)(neg * value); - *denom = 1; - return; - } - /*-- Check for too small numbers for "long" type rationals -- */ - if (value < 1.0 / (double)0x7FFFFFFFL) - { - *num = 0; - *denom = 0x7FFFFFFFL; - return; - } - - /*-- There are two approaches using the Euclidean algorithm, - * which can accidentally lead to different accuracies just depending on - * the value. Try both and define which one was better. Furthermore, set - * behavior of ToRationalEuclideanGCD() to the range of signed-long. - */ - ToRationalEuclideanGCD(value, TRUE, FALSE, &ullNum, &ullDenom); - ToRationalEuclideanGCD(value, TRUE, TRUE, &ullNum2, &ullDenom2); - /*-- Double-Check, that returned values fit into LONG :*/ - if (ullNum > 0x7FFFFFFFL || ullDenom > 0x7FFFFFFFL || - ullNum2 > 0x7FFFFFFFL || ullDenom2 > 0x7FFFFFFFL) - { - TIFFErrorExt(0, "TIFFLib: DoubleToSrational()", - " Num or Denom exceeds LONG: val=%14.6f, num=%12" PRIu64 - ", denom=%12" PRIu64 " | num2=%12" PRIu64 - ", denom2=%12" PRIu64 "", - neg * value, ullNum, ullDenom, ullNum2, ullDenom2); - assert(0); - } - - /* Check, which one has higher accuracy and take that. */ - dblDiff = fabs(value - ((double)ullNum / (double)ullDenom)); - dblDiff2 = fabs(value - ((double)ullNum2 / (double)ullDenom2)); - if (dblDiff < dblDiff2) - { - *num = (int32_t)(neg * (long)ullNum); - *denom = (int32_t)ullDenom; - } - else - { - *num = (int32_t)(neg * (long)ullNum2); - *denom = (int32_t)ullDenom2; - } -} /*-- DoubleToSrational() --------------*/ - -static int TIFFWriteDirectoryTagCheckedFloatArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - float *value) -{ - assert(count < 0x40000000); - assert(sizeof(float) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 4, ndir); - return 1; - } - TIFFCvtNativeToIEEEFloat(tif, count, value); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfFloat(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_FLOAT, count, - count * 4, value)); -} - -static int TIFFWriteDirectoryTagCheckedDoubleArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - double *value) -{ - assert(count < 0x20000000); - assert(sizeof(double) == 8); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 8, ndir); - return 1; - } - TIFFCvtNativeToIEEEDouble(tif, count, value); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfDouble(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_DOUBLE, count, - count * 8, value)); -} - -static int TIFFWriteDirectoryTagCheckedIfdArray(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint32_t count, uint32_t *value) -{ - assert(count < 0x40000000); - assert(sizeof(uint32_t) == 4); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 4, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_IFD, count, - count * 4, value)); -} - -static int TIFFWriteDirectoryTagCheckedIfd8Array(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, - uint16_t tag, uint32_t count, - uint64_t *value) -{ - assert(count < 0x20000000); - assert(sizeof(uint64_t) == 8); - assert(tif->tif_flags & TIFF_BIGTIFF); - if (dir == NULL) /* Just evaluate IFD data size and increment ndir. */ - { - EvaluateIFDdatasizeWrite(tif, count, 8, ndir); - return 1; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfLong8(value, count); - return (TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_IFD8, count, - count * 8, value)); -} - -static int TIFFWriteDirectoryTagData(TIFF *tif, uint32_t *ndir, - TIFFDirEntry *dir, uint16_t tag, - uint16_t datatype, uint32_t count, - uint32_t datalength, void *data) -{ - static const char module[] = "TIFFWriteDirectoryTagData"; - uint32_t m; - m = 0; - while (m < (*ndir)) - { - assert(dir[m].tdir_tag != tag); - if (dir[m].tdir_tag > tag) - break; - m++; - } - if (m < (*ndir)) - { - uint32_t n; - for (n = *ndir; n > m; n--) - dir[n] = dir[n - 1]; - } - dir[m].tdir_tag = tag; - dir[m].tdir_type = datatype; - dir[m].tdir_count = count; - dir[m].tdir_offset.toff_long8 = 0; - if (datalength <= ((tif->tif_flags & TIFF_BIGTIFF) ? 0x8U : 0x4U)) - { - if (data && datalength) - { - _TIFFmemcpy(&dir[m].tdir_offset, data, datalength); - } - } - else - { - uint64_t na, nb; - na = tif->tif_dataoff; - nb = na + datalength; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - nb = (uint32_t)nb; - if ((nb < na) || (nb < datalength)) - { - TIFFErrorExtR(tif, module, "Maximum TIFF file size exceeded"); - return (0); - } - if (!SeekOK(tif, na)) - { - TIFFErrorExtR(tif, module, "IO error writing tag data"); - return (0); - } - if (datalength >= 0x80000000UL) - { - TIFFErrorExtR(tif, module, - "libtiff does not allow writing more than 2147483647 " - "bytes in a tag"); - return (0); - } - if (!WriteOK(tif, data, (tmsize_t)datalength)) - { - TIFFErrorExtR(tif, module, "IO error writing tag data"); - return (0); - } - tif->tif_dataoff = nb; - if (tif->tif_dataoff & 1) - tif->tif_dataoff++; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t o; - o = (uint32_t)na; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&o); - _TIFFmemcpy(&dir[m].tdir_offset, &o, 4); - } - else - { - dir[m].tdir_offset.toff_long8 = na; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dir[m].tdir_offset.toff_long8); - } - } - (*ndir)++; - return (1); -} - -/* - * Link the current directory into the directory chain for the file. - */ -static int TIFFLinkDirectory(TIFF *tif) -{ - static const char module[] = "TIFFLinkDirectory"; - - tif->tif_diroff = (TIFFSeekFile(tif, 0, SEEK_END) + 1) & (~((toff_t)1)); - - /* - * Handle SubIFDs - */ - if (tif->tif_flags & TIFF_INSUBIFD) - { - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t m; - m = (uint32_t)tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&m); - (void)TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET); - if (!WriteOK(tif, &m, 4)) - { - TIFFErrorExtR(tif, module, - "Error writing SubIFD directory link"); - return (0); - } - - /* - * Advance to the next SubIFD or, if this is - * the last one configured, reverting back to the - * normal directory linkage is done in TIFFWriteDirectorySec() - * by tif->tif_flags &= ~TIFF_INSUBIFD;. - */ - if (--tif->tif_nsubifd) - tif->tif_subifdoff += 4; - return (1); - } - else - { - uint64_t m; - m = tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&m); - (void)TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET); - if (!WriteOK(tif, &m, 8)) - { - TIFFErrorExtR(tif, module, - "Error writing SubIFD directory link"); - return (0); - } - - /* - * Advance to the next SubIFD or, if this is - * the last one configured, reverting back to the - * normal directory linkage is done in TIFFWriteDirectorySec() - * by tif->tif_flags &= ~TIFF_INSUBIFD;. - */ - if (--tif->tif_nsubifd) - tif->tif_subifdoff += 8; - return (1); - } - } - - /* - * Handle main-IFDs - */ - tdir_t ndir = 1; /* count current number of main-IFDs */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t m; - uint32_t nextdir; - m = (uint32_t)(tif->tif_diroff); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&m); - if (tif->tif_header.classic.tiff_diroff == 0) - { - /* - * First directory, overwrite offset in header. - */ - tif->tif_header.classic.tiff_diroff = (uint32_t)tif->tif_diroff; - tif->tif_lastdiroff = tif->tif_diroff; - (void)TIFFSeekFile(tif, 4, SEEK_SET); - if (!WriteOK(tif, &m, 4)) - { - TIFFErrorExtR(tif, tif->tif_name, "Error writing TIFF header"); - return (0); - } - if (!tif->tif_dir.td_iswrittentofile) - tif->tif_curdircount = 0; - return (1); - } - /* - * Not the first directory, search to the last and append. - */ - tdir_t dirn = 0; - if (tif->tif_lastdiroff != 0 && - _TIFFGetDirNumberFromOffset(tif, tif->tif_lastdiroff, &dirn)) - { - /* Start searching from the lastely written IFD. Thus get its IFD - * number. */ - nextdir = (uint32_t)tif->tif_lastdiroff; - ndir = dirn + 1; - } - else - { - nextdir = tif->tif_header.classic.tiff_diroff; - ndir = 1; /* start searching from the first IFD */ - } - - while (1) - { - uint16_t dircount; - uint32_t nextnextdir; - - if (!SeekOK(tif, nextdir) || !ReadOK(tif, &dircount, 2)) - { - TIFFErrorExtR(tif, module, "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - (void)TIFFSeekFile(tif, nextdir + 2 + dircount * 12, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 4)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&nextnextdir); - if (nextnextdir == 0) - { - (void)TIFFSeekFile(tif, nextdir + 2 + dircount * 12, SEEK_SET); - if (!WriteOK(tif, &m, 4)) - { - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - tif->tif_lastdiroff = tif->tif_diroff; - break; - } - nextdir = nextnextdir; - ndir++; - } - } - else - { - /*- BigTIFF -*/ - uint64_t m; - uint64_t nextdir; - m = tif->tif_diroff; - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&m); - if (tif->tif_header.big.tiff_diroff == 0) - { - /* - * First directory, overwrite offset in header. - */ - tif->tif_header.big.tiff_diroff = tif->tif_diroff; - tif->tif_lastdiroff = tif->tif_diroff; - (void)TIFFSeekFile(tif, 8, SEEK_SET); - if (!WriteOK(tif, &m, 8)) - { - TIFFErrorExtR(tif, tif->tif_name, "Error writing TIFF header"); - return (0); - } - if (!tif->tif_dir.td_iswrittentofile) - tif->tif_curdircount = 0; - return (1); - } - /* - * Not the first directory, search to the last and append. - */ - tdir_t dirn = 0; - if (tif->tif_lastdiroff != 0 && - _TIFFGetDirNumberFromOffset(tif, tif->tif_lastdiroff, &dirn)) - { - /* Start searching from the lastely written IFD. Thus get its IFD - * number. */ - nextdir = tif->tif_lastdiroff; - ndir = dirn + 1; - } - else - { - nextdir = tif->tif_header.big.tiff_diroff; - ndir = 1; /* start searching from the first IFD */ - } - while (1) - { - uint64_t dircount64; - uint16_t dircount; - uint64_t nextnextdir; - - if (!SeekOK(tif, nextdir) || !ReadOK(tif, &dircount64, 8)) - { - TIFFErrorExtR(tif, module, "Error fetching directory count"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - if (dircount64 > 0xFFFF) - { - TIFFErrorExtR(tif, module, - "Sanity check on tag count failed, " - "likely corrupt TIFF"); - return (0); - } - dircount = (uint16_t)dircount64; - (void)TIFFSeekFile(tif, nextdir + 8 + dircount * 20, SEEK_SET); - if (!ReadOK(tif, &nextnextdir, 8)) - { - TIFFErrorExtR(tif, module, "Error fetching directory link"); - return (0); - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&nextnextdir); - if (nextnextdir == 0) - { - (void)TIFFSeekFile(tif, nextdir + 8 + dircount * 20, SEEK_SET); - if (!WriteOK(tif, &m, 8)) - { - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - tif->tif_lastdiroff = tif->tif_diroff; - break; - } - nextdir = nextnextdir; - ndir++; - } - } - /* Offset of next IFD is written to file. - * Update number of main-IFDs in file. - * However, tif_curdircount shall count only newly written main-IFDs with - * entries and not only number of linked offsets! Thus, tif_curdircount is - * incremented at the end of TIFFWriteDirectorySec(). - * TIFF_NON_EXISTENT_DIR_NUMBER means 'dont know number of IFDs' - * 0 means 'empty file opened for writing, but no IFD written yet' */ - if (!tif->tif_dir.td_iswrittentofile && !(tif->tif_flags & TIFF_INSUBIFD)) - { - tif->tif_curdircount = ndir; - } - return (1); -} - -/************************************************************************/ -/* TIFFRewriteField() */ -/* */ -/* Rewrite a field in the directory on disk without regard to */ -/* updating the TIFF directory structure in memory. Currently */ -/* only supported for field that already exist in the on-disk */ -/* directory. Mainly used for updating stripoffset / */ -/* stripbytecount values after the directory is already on */ -/* disk. */ -/* */ -/* Returns zero on failure, and one on success. */ -/************************************************************************/ - -int _TIFFRewriteField(TIFF *tif, uint16_t tag, TIFFDataType in_datatype, - tmsize_t count, void *data) -{ - static const char module[] = "TIFFResetField"; - /* const TIFFField* fip = NULL; */ - uint16_t dircount; - tmsize_t dirsize; - uint8_t direntry_raw[20]; - uint16_t entry_tag = 0; - uint16_t entry_type = 0; - uint64_t entry_count = 0; - uint64_t entry_offset = 0; - int value_in_entry = 0; - uint64_t read_offset; - uint8_t *buf_to_write = NULL; - TIFFDataType datatype; - - /* -------------------------------------------------------------------- */ - /* Find field definition. */ - /* -------------------------------------------------------------------- */ - /*fip =*/TIFFFindField(tif, tag, TIFF_ANY); - - /* -------------------------------------------------------------------- */ - /* Do some checking this is a straight forward case. */ - /* -------------------------------------------------------------------- */ - if (isMapped(tif)) - { - TIFFErrorExtR(tif, module, - "Memory mapped files not currently supported for " - "this operation."); - return 0; - } - - if (tif->tif_diroff == 0) - { - TIFFErrorExtR( - tif, module, - "Attempt to reset field on directory not already on disk."); - return 0; - } - - /* -------------------------------------------------------------------- */ - /* Read the directory entry count. */ - /* -------------------------------------------------------------------- */ - if (!SeekOK(tif, tif->tif_diroff)) - { - TIFFErrorExtR(tif, module, "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - - read_offset = tif->tif_diroff; - - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (!ReadOK(tif, &dircount, sizeof(uint16_t))) - { - TIFFErrorExtR(tif, module, "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&dircount); - dirsize = 12; - read_offset += 2; - } - else - { - uint64_t dircount64; - if (!ReadOK(tif, &dircount64, sizeof(uint64_t))) - { - TIFFErrorExtR(tif, module, "%s: Can not read TIFF directory count", - tif->tif_name); - return 0; - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&dircount64); - dircount = (uint16_t)dircount64; - dirsize = 20; - read_offset += 8; - } - - /* -------------------------------------------------------------------- */ - /* Read through directory to find target tag. */ - /* -------------------------------------------------------------------- */ - while (dircount > 0) - { - if (!ReadOK(tif, direntry_raw, dirsize)) - { - TIFFErrorExtR(tif, module, "%s: Can not read TIFF directory entry.", - tif->tif_name); - return 0; - } - - memcpy(&entry_tag, direntry_raw + 0, sizeof(uint16_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&entry_tag); - - if (entry_tag == tag) - break; - - read_offset += dirsize; - } - - if (entry_tag != tag) - { - TIFFErrorExtR(tif, module, "%s: Could not find tag %" PRIu16 ".", - tif->tif_name, tag); - return 0; - } - - /* -------------------------------------------------------------------- */ - /* Extract the type, count and offset for this entry. */ - /* -------------------------------------------------------------------- */ - memcpy(&entry_type, direntry_raw + 2, sizeof(uint16_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&entry_type); - - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t value; - - memcpy(&value, direntry_raw + 4, sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&value); - entry_count = value; - - memcpy(&value, direntry_raw + 8, sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&value); - entry_offset = value; - } - else - { - memcpy(&entry_count, direntry_raw + 4, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&entry_count); - - memcpy(&entry_offset, direntry_raw + 12, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8(&entry_offset); - } - - /* -------------------------------------------------------------------- */ - /* When a dummy tag was written due to TIFFDeferStrileArrayWriting() */ - /* -------------------------------------------------------------------- */ - if (entry_offset == 0 && entry_count == 0 && entry_type == 0) - { - if (tag == TIFFTAG_TILEOFFSETS || tag == TIFFTAG_STRIPOFFSETS) - { - entry_type = - (tif->tif_flags & TIFF_BIGTIFF) ? TIFF_LONG8 : TIFF_LONG; - } - else - { - int write_aslong8 = 1; - if (count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS) - { - write_aslong8 = WriteAsLong8(tif, TIFFStripSize64(tif)); - } - else if (count > 1 && tag == TIFFTAG_TILEBYTECOUNTS) - { - write_aslong8 = WriteAsLong8(tif, TIFFTileSize64(tif)); - } - if (write_aslong8) - { - entry_type = TIFF_LONG8; - } - else - { - int write_aslong4 = 1; - if (count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS) - { - write_aslong4 = WriteAsLong4(tif, TIFFStripSize64(tif)); - } - else if (count > 1 && tag == TIFFTAG_TILEBYTECOUNTS) - { - write_aslong4 = WriteAsLong4(tif, TIFFTileSize64(tif)); - } - if (write_aslong4) - { - entry_type = TIFF_LONG; - } - else - { - entry_type = TIFF_SHORT; - } - } - } - } - - /* -------------------------------------------------------------------- */ - /* What data type do we want to write this as? */ - /* -------------------------------------------------------------------- */ - if (TIFFDataWidth(in_datatype) == 8 && !(tif->tif_flags & TIFF_BIGTIFF)) - { - if (in_datatype == TIFF_LONG8) - datatype = entry_type == TIFF_SHORT ? TIFF_SHORT : TIFF_LONG; - else if (in_datatype == TIFF_SLONG8) - datatype = TIFF_SLONG; - else if (in_datatype == TIFF_IFD8) - datatype = TIFF_IFD; - else - datatype = in_datatype; - } - else - { - if (in_datatype == TIFF_LONG8 && - (entry_type == TIFF_SHORT || entry_type == TIFF_LONG || - entry_type == TIFF_LONG8)) - datatype = entry_type; - else if (in_datatype == TIFF_SLONG8 && - (entry_type == TIFF_SLONG || entry_type == TIFF_SLONG8)) - datatype = entry_type; - else if (in_datatype == TIFF_IFD8 && - (entry_type == TIFF_IFD || entry_type == TIFF_IFD8)) - datatype = entry_type; - else - datatype = in_datatype; - } - - /* -------------------------------------------------------------------- */ - /* Prepare buffer of actual data to write. This includes */ - /* swabbing as needed. */ - /* -------------------------------------------------------------------- */ - buf_to_write = (uint8_t *)_TIFFCheckMalloc( - tif, count, TIFFDataWidth(datatype), "for field buffer."); - if (!buf_to_write) - return 0; - - if (datatype == in_datatype) - memcpy(buf_to_write, data, count * TIFFDataWidth(datatype)); - else if (datatype == TIFF_SLONG && in_datatype == TIFF_SLONG8) - { - tmsize_t i; - - for (i = 0; i < count; i++) - { - ((int32_t *)buf_to_write)[i] = (int32_t)((int64_t *)data)[i]; - if ((int64_t)((int32_t *)buf_to_write)[i] != ((int64_t *)data)[i]) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, - "Value exceeds 32bit range of output type."); - return 0; - } - } - } - else if ((datatype == TIFF_LONG && in_datatype == TIFF_LONG8) || - (datatype == TIFF_IFD && in_datatype == TIFF_IFD8)) - { - tmsize_t i; - - for (i = 0; i < count; i++) - { - ((uint32_t *)buf_to_write)[i] = (uint32_t)((uint64_t *)data)[i]; - if ((uint64_t)((uint32_t *)buf_to_write)[i] != - ((uint64_t *)data)[i]) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, - "Value exceeds 32bit range of output type."); - return 0; - } - } - } - else if (datatype == TIFF_SHORT && in_datatype == TIFF_LONG8) - { - tmsize_t i; - - for (i = 0; i < count; i++) - { - ((uint16_t *)buf_to_write)[i] = (uint16_t)((uint64_t *)data)[i]; - if ((uint64_t)((uint16_t *)buf_to_write)[i] != - ((uint64_t *)data)[i]) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, - "Value exceeds 16bit range of output type."); - return 0; - } - } - } - else - { - TIFFErrorExtR(tif, module, "Unhandled type conversion."); - return 0; - } - - if (TIFFDataWidth(datatype) > 1 && (tif->tif_flags & TIFF_SWAB)) - { - if (TIFFDataWidth(datatype) == 2) - TIFFSwabArrayOfShort((uint16_t *)buf_to_write, count); - else if (TIFFDataWidth(datatype) == 4) - TIFFSwabArrayOfLong((uint32_t *)buf_to_write, count); - else if (TIFFDataWidth(datatype) == 8) - TIFFSwabArrayOfLong8((uint64_t *)buf_to_write, count); - } - - /* -------------------------------------------------------------------- */ - /* Is this a value that fits into the directory entry? */ - /* -------------------------------------------------------------------- */ - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - if (TIFFDataWidth(datatype) * count <= 4) - { - entry_offset = read_offset + 8; - value_in_entry = 1; - } - } - else - { - if (TIFFDataWidth(datatype) * count <= 8) - { - entry_offset = read_offset + 12; - value_in_entry = 1; - } - } - - if ((tag == TIFFTAG_TILEOFFSETS || tag == TIFFTAG_STRIPOFFSETS) && - tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0) - { - tif->tif_dir.td_stripoffset_entry.tdir_type = datatype; - tif->tif_dir.td_stripoffset_entry.tdir_count = count; - } - else if ((tag == TIFFTAG_TILEBYTECOUNTS || - tag == TIFFTAG_STRIPBYTECOUNTS) && - tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0) - { - tif->tif_dir.td_stripbytecount_entry.tdir_type = datatype; - tif->tif_dir.td_stripbytecount_entry.tdir_count = count; - } - - /* -------------------------------------------------------------------- */ - /* If the tag type, and count match, then we just write it out */ - /* over the old values without altering the directory entry at */ - /* all. */ - /* -------------------------------------------------------------------- */ - if (entry_count == (uint64_t)count && entry_type == (uint16_t)datatype) - { - if (!SeekOK(tif, entry_offset)) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, - "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - if (!WriteOK(tif, buf_to_write, count * TIFFDataWidth(datatype))) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - - _TIFFfreeExt(tif, buf_to_write); - return 1; - } - - /* -------------------------------------------------------------------- */ - /* Otherwise, we write the new tag data at the end of the file. */ - /* -------------------------------------------------------------------- */ - if (!value_in_entry) - { - entry_offset = TIFFSeekFile(tif, 0, SEEK_END); - - if (!WriteOK(tif, buf_to_write, count * TIFFDataWidth(datatype))) - { - _TIFFfreeExt(tif, buf_to_write); - TIFFErrorExtR(tif, module, "Error writing directory link"); - return (0); - } - } - else - { - if (count * TIFFDataWidth(datatype) == 4) - { - uint32_t value; - memcpy(&value, buf_to_write, count * TIFFDataWidth(datatype)); - entry_offset = value; - } - else - { - memcpy(&entry_offset, buf_to_write, - count * TIFFDataWidth(datatype)); - } - } - - _TIFFfreeExt(tif, buf_to_write); - buf_to_write = 0; - - /* -------------------------------------------------------------------- */ - /* Adjust the directory entry. */ - /* -------------------------------------------------------------------- */ - entry_type = datatype; - entry_count = (uint64_t)count; - memcpy(direntry_raw + 2, &entry_type, sizeof(uint16_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort((uint16_t *)(direntry_raw + 2)); - - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - uint32_t value; - - value = (uint32_t)entry_count; - memcpy(direntry_raw + 4, &value, sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)(direntry_raw + 4)); - - value = (uint32_t)entry_offset; - memcpy(direntry_raw + 8, &value, sizeof(uint32_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong((uint32_t *)(direntry_raw + 8)); - } - else - { - memcpy(direntry_raw + 4, &entry_count, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)(direntry_raw + 4)); - - memcpy(direntry_raw + 12, &entry_offset, sizeof(uint64_t)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong8((uint64_t *)(direntry_raw + 12)); - } - - /* -------------------------------------------------------------------- */ - /* Write the directory entry out to disk. */ - /* -------------------------------------------------------------------- */ - if (!SeekOK(tif, read_offset)) - { - TIFFErrorExtR(tif, module, "%s: Seek error accessing TIFF directory", - tif->tif_name); - return 0; - } - - if (!WriteOK(tif, direntry_raw, dirsize)) - { - TIFFErrorExtR(tif, module, "%s: Can not write TIFF directory entry.", - tif->tif_name); - return 0; - } - - return 1; -} diff --git a/third_party/libtiff/libtiff/tif_dumpmode.c b/third_party/libtiff/libtiff/tif_dumpmode.c deleted file mode 100644 index 267d5d2..0000000 --- a/third_party/libtiff/libtiff/tif_dumpmode.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * "Null" Compression Algorithm Support. - */ -#include "tiffiop.h" - -static int DumpFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -/* - * Encode a hunk of pixels. - */ -static int DumpModeEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, uint16_t s) -{ - (void)s; - while (cc > 0) - { - tmsize_t n; - - n = cc; - if (tif->tif_rawcc + n > tif->tif_rawdatasize) - n = tif->tif_rawdatasize - tif->tif_rawcc; - - assert(n > 0); - - /* - * Avoid copy if client has setup raw - * data buffer to avoid extra copy. - */ - if (tif->tif_rawcp != pp) - _TIFFmemcpy(tif->tif_rawcp, pp, n); - tif->tif_rawcp += n; - tif->tif_rawcc += n; - pp += n; - cc -= n; - if (tif->tif_rawcc >= tif->tif_rawdatasize && !TIFFFlushData1(tif)) - return (0); - } - return (1); -} - -/* - * Decode a hunk of pixels. - */ -static int DumpModeDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - static const char module[] = "DumpModeDecode"; - (void)s; - if (tif->tif_rawcc < cc) - { - TIFFErrorExtR(tif, module, - "Not enough data for scanline %" PRIu32 - ", expected a request for at most %" TIFF_SSIZE_FORMAT - " bytes, got a request for %" TIFF_SSIZE_FORMAT " bytes", - tif->tif_row, tif->tif_rawcc, cc); - return (0); - } - /* - * Avoid copy if client has setup raw - * data buffer to avoid extra copy. - */ - if (tif->tif_rawcp != buf) - _TIFFmemcpy(buf, tif->tif_rawcp, cc); - tif->tif_rawcp += cc; - tif->tif_rawcc -= cc; - return (1); -} - -/* - * Seek forwards nrows in the current strip. - */ -static int DumpModeSeek(TIFF *tif, uint32_t nrows) -{ - tif->tif_rawcp += nrows * tif->tif_scanlinesize; - tif->tif_rawcc -= nrows * tif->tif_scanlinesize; - return (1); -} - -/* - * Initialize dump mode. - */ -int TIFFInitDumpMode(TIFF *tif, int scheme) -{ - (void)scheme; - tif->tif_fixuptags = DumpFixupTags; - tif->tif_decoderow = DumpModeDecode; - tif->tif_decodestrip = DumpModeDecode; - tif->tif_decodetile = DumpModeDecode; - tif->tif_encoderow = DumpModeEncode; - tif->tif_encodestrip = DumpModeEncode; - tif->tif_encodetile = DumpModeEncode; - tif->tif_seek = DumpModeSeek; - return (1); -} diff --git a/third_party/libtiff/libtiff/tif_error.c b/third_party/libtiff/libtiff/tif_error.c deleted file mode 100644 index ac0b9c3..0000000 --- a/third_party/libtiff/libtiff/tif_error.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -TIFFErrorHandlerExt _TIFFerrorHandlerExt = NULL; - -TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler) -{ - TIFFErrorHandler prev = _TIFFerrorHandler; - _TIFFerrorHandler = handler; - return (prev); -} - -TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt handler) -{ - TIFFErrorHandlerExt prev = _TIFFerrorHandlerExt; - _TIFFerrorHandlerExt = handler; - return (prev); -} - -void TIFFError(const char *module, const char *fmt, ...) -{ - va_list ap; - if (_TIFFerrorHandler) - { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) - { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(0, module, fmt, ap); - va_end(ap); - } -} - -void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt, ...) -{ - va_list ap; - if (_TIFFerrorHandler) - { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) - { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(fd, module, fmt, ap); - va_end(ap); - } -} - -void _TIFFErrorEarly(TIFFOpenOptions *opts, thandle_t clientdata, - const char *module, const char *fmt, ...) -{ - va_list ap; - if (opts && opts->errorhandler) - { - va_start(ap, fmt); - int stop = opts->errorhandler(NULL, opts->errorhandler_user_data, - module, fmt, ap); - va_end(ap); - if (stop) - return; - } - if (_TIFFerrorHandler) - { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) - { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(clientdata, module, fmt, ap); - va_end(ap); - } -} - -void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt, ...) -{ - va_list ap; - if (tif && tif->tif_errorhandler) - { - va_start(ap, fmt); - int stop = (*tif->tif_errorhandler)( - tif, tif->tif_errorhandler_user_data, module, fmt, ap); - va_end(ap); - if (stop) - return; - } - if (_TIFFerrorHandler) - { - va_start(ap, fmt); - (*_TIFFerrorHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFerrorHandlerExt) - { - va_start(ap, fmt); - (*_TIFFerrorHandlerExt)(tif ? tif->tif_clientdata : NULL, module, fmt, - ap); - va_end(ap); - } -} diff --git a/third_party/libtiff/libtiff/tif_extension.c b/third_party/libtiff/libtiff/tif_extension.c deleted file mode 100644 index 1a09e98..0000000 --- a/third_party/libtiff/libtiff/tif_extension.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Various routines support external extension of the tag set, and other - * application extension capabilities. - */ - -#include "tiffiop.h" - -int TIFFGetTagListCount(TIFF *tif) - -{ - TIFFDirectory *td = &tif->tif_dir; - - return td->td_customValueCount; -} - -uint32_t TIFFGetTagListEntry(TIFF *tif, int tag_index) - -{ - TIFFDirectory *td = &tif->tif_dir; - - if (tag_index < 0 || tag_index >= td->td_customValueCount) - return (uint32_t)(-1); - else - return td->td_customValues[tag_index].info->field_tag; -} - -/* -** This provides read/write access to the TIFFTagMethods within the TIFF -** structure to application code without giving access to the private -** TIFF structure. -*/ -TIFFTagMethods *TIFFAccessTagMethods(TIFF *tif) - -{ - return &(tif->tif_tagmethods); -} - -void *TIFFGetClientInfo(TIFF *tif, const char *name) - -{ - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - while (psLink != NULL && strcmp(psLink->name, name) != 0) - psLink = psLink->next; - - if (psLink != NULL) - return psLink->data; - else - return NULL; -} - -void TIFFSetClientInfo(TIFF *tif, void *data, const char *name) - -{ - TIFFClientInfoLink *psLink = tif->tif_clientinfo; - - /* - ** Do we have an existing link with this name? If so, just - ** set it. - */ - while (psLink != NULL && strcmp(psLink->name, name) != 0) - psLink = psLink->next; - - if (psLink != NULL) - { - psLink->data = data; - return; - } - - /* - ** Create a new link. - */ - - psLink = - (TIFFClientInfoLink *)_TIFFmallocExt(tif, sizeof(TIFFClientInfoLink)); - assert(psLink != NULL); - psLink->next = tif->tif_clientinfo; - psLink->name = (char *)_TIFFmallocExt(tif, (tmsize_t)(strlen(name) + 1)); - assert(psLink->name != NULL); - strcpy(psLink->name, name); - psLink->data = data; - - tif->tif_clientinfo = psLink; -} diff --git a/third_party/libtiff/libtiff/tif_fax3.c b/third_party/libtiff/libtiff/tif_fax3.c deleted file mode 100644 index 34e1c78..0000000 --- a/third_party/libtiff/libtiff/tif_fax3.c +++ /dev/null @@ -1,1844 +0,0 @@ -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef CCITT_SUPPORT -/* - * TIFF Library. - * - * CCITT Group 3 (T.4) and Group 4 (T.6) Compression Support. - * - * This file contains support for decoding and encoding TIFF - * compression algorithms 2, 3, 4, and 32771. - * - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "tif_fax3.h" -#define G3CODES -#include "t4.h" -#include - -#ifndef EOF_REACHED_COUNT_THRESHOLD -/* Arbitrary threshold to avoid corrupted single-strip files with extremely - * large imageheight to cause apparently endless looping, such as in - * https://gitlab.com/libtiff/libtiff/-/issues/583 - */ -#define EOF_REACHED_COUNT_THRESHOLD 8192 -#endif - -/* - * Compression+decompression state blocks are - * derived from this ``base state'' block. - */ -typedef struct -{ - int rw_mode; /* O_RDONLY for decode, else encode */ - int mode; /* operating mode */ - tmsize_t rowbytes; /* bytes in a decoded scanline */ - uint32_t rowpixels; /* pixels in a scanline */ - - uint16_t cleanfaxdata; /* CleanFaxData tag */ - uint32_t badfaxrun; /* BadFaxRun tag */ - uint32_t badfaxlines; /* BadFaxLines tag */ - uint32_t groupoptions; /* Group 3/4 options tag */ - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ -} Fax3BaseState; -#define Fax3State(tif) ((Fax3BaseState *)(tif)->tif_data) - -typedef enum -{ - G3_1D, - G3_2D -} Ttag; -typedef struct -{ - Fax3BaseState b; - - /* Decoder state info */ - const unsigned char *bitmap; /* bit reversal table */ - uint32_t data; /* current i/o byte/word */ - int bit; /* current i/o bit in byte */ - int EOLcnt; /* count of EOL codes recognized */ - int eofReachedCount; /* number of times decode has been called with - EOF already reached */ - int eolReachedCount; /* number of times decode has been called with - EOL already reached */ - int unexpectedReachedCount; /* number of times decode has been called with - "unexpedted" already reached */ - TIFFFaxFillFunc fill; /* fill routine */ - uint32_t *runs; /* b&w runs for current/previous row */ - uint32_t nruns; /* size of the refruns / curruns arrays */ - uint32_t *refruns; /* runs for reference line */ - uint32_t *curruns; /* runs for current line */ - - /* Encoder state info */ - Ttag tag; /* encoding state */ - unsigned char *refline; /* reference line for 2d decoding */ - int k; /* #rows left that can be 2d encoded */ - int maxk; /* max #rows that can be 2d encoded */ - - int line; -} Fax3CodecState; -#define DecoderState(tif) ((Fax3CodecState *)Fax3State(tif)) -#define EncoderState(tif) ((Fax3CodecState *)Fax3State(tif)) - -#define is2DEncoding(sp) (sp->b.groupoptions & GROUP3OPT_2DENCODING) -#define isAligned(p, t) ((((size_t)(p)) & (sizeof(t) - 1)) == 0) - -/* - * Group 3 and Group 4 Decoding. - */ - -/* - * These macros glue the TIFF library state to - * the state expected by Frank's decoder. - */ -#define DECLARE_STATE(tif, sp, mod) \ - static const char module[] = mod; \ - Fax3CodecState *sp = DecoderState(tif); \ - int a0; /* reference element */ \ - int lastx = sp->b.rowpixels; /* last element in row */ \ - uint32_t BitAcc; /* bit accumulator */ \ - int BitsAvail; /* # valid bits in BitAcc */ \ - int RunLength; /* length of current run */ \ - unsigned char *cp; /* next byte of input data */ \ - unsigned char *ep; /* end of input data */ \ - uint32_t *pa; /* place to stuff next run */ \ - uint32_t *thisrun; /* current row's run array */ \ - int EOLcnt; /* # EOL codes recognized */ \ - const unsigned char *bitmap = sp->bitmap; /* input data bit reverser */ \ - const TIFFFaxTabEnt *TabEnt - -#define DECLARE_STATE_2D(tif, sp, mod) \ - DECLARE_STATE(tif, sp, mod); \ - int b1; /* next change on prev line */ \ - uint32_t \ - *pb /* next run in reference line */ /* \ - * Load any state that may be \ - * changed during decoding. \ - */ -#define CACHE_STATE(tif, sp) \ - do \ - { \ - BitAcc = sp->data; \ - BitsAvail = sp->bit; \ - EOLcnt = sp->EOLcnt; \ - cp = (unsigned char *)tif->tif_rawcp; \ - ep = cp + tif->tif_rawcc; \ - } while (0) -/* - * Save state possibly changed during decoding. - */ -#define UNCACHE_STATE(tif, sp) \ - do \ - { \ - sp->bit = BitsAvail; \ - sp->data = BitAcc; \ - sp->EOLcnt = EOLcnt; \ - tif->tif_rawcc -= (tmsize_t)((uint8_t *)cp - tif->tif_rawcp); \ - tif->tif_rawcp = (uint8_t *)cp; \ - } while (0) - -/* - * Setup state for decoding a strip. - */ -static int Fax3PreDecode(TIFF *tif, uint16_t s) -{ - Fax3CodecState *sp = DecoderState(tif); - - (void)s; - assert(sp != NULL); - sp->bit = 0; /* force initial read */ - sp->data = 0; - sp->EOLcnt = 0; /* force initial scan for EOL */ - sp->eofReachedCount = 0; - sp->eolReachedCount = 0; - sp->unexpectedReachedCount = 0; - /* - * Decoder assumes lsb-to-msb bit order. Note that we select - * this here rather than in Fax3SetupState so that viewers can - * hold the image open, fiddle with the FillOrder tag value, - * and then re-decode the image. Otherwise they'd need to close - * and open the image to get the state reset. - */ - sp->bitmap = - TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB); - sp->curruns = sp->runs; - if (sp->refruns) - { /* init reference line to white */ - sp->refruns = sp->runs + sp->nruns; - sp->refruns[0] = (uint32_t)sp->b.rowpixels; - sp->refruns[1] = 0; - } - sp->line = 0; - return (1); -} - -/* - * Routine for handling various errors/conditions. - * Note how they are "glued into the decoder" by - * overriding the definitions used by the decoder. - */ - -static void Fax3Unexpected(const char *module, TIFF *tif, uint32_t line, - uint32_t a0) -{ - TIFFErrorExtR(tif, module, - "Bad code word at line %" PRIu32 " of %s %" PRIu32 - " (x %" PRIu32 ")", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), a0); -} -#define unexpected(table, a0) \ - do \ - { \ - Fax3Unexpected(module, tif, sp->line, a0); \ - ++sp->unexpectedReachedCount; \ - } while (0) - -static void Fax3Extension(const char *module, TIFF *tif, uint32_t line, - uint32_t a0) -{ - TIFFErrorExtR(tif, module, - "Uncompressed data (not supported) at line %" PRIu32 - " of %s %" PRIu32 " (x %" PRIu32 ")", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), a0); -} -#define extension(a0) Fax3Extension(module, tif, sp->line, a0) - -static void Fax3BadLength(const char *module, TIFF *tif, uint32_t line, - uint32_t a0, uint32_t lastx) -{ - TIFFWarningExtR(tif, module, - "%s at line %" PRIu32 " of %s %" PRIu32 " (got %" PRIu32 - ", expected %" PRIu32 ")", - a0 < lastx ? "Premature EOL" : "Line length mismatch", line, - isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), a0, - lastx); -} -#define badlength(a0, lastx) \ - do \ - { \ - Fax3BadLength(module, tif, sp->line, a0, lastx); \ - ++sp->eolReachedCount; \ - } while (0) - -static void Fax3PrematureEOF(const char *module, TIFF *tif, uint32_t line, - uint32_t a0) -{ - TIFFWarningExtR(tif, module, - "Premature EOF at line %" PRIu32 " of %s %" PRIu32 - " (x %" PRIu32 ")", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), a0); -} -#define prematureEOF(a0) \ - do \ - { \ - Fax3PrematureEOF(module, tif, sp->line, a0); \ - ++sp->eofReachedCount; \ - } while (0) - -static void Fax3TryG3WithoutEOL(const char *module, TIFF *tif, uint32_t line, - uint32_t a0) -{ - TIFFWarningExtR( - tif, module, - "Try to decode (read) fax Group 3 data without EOL at line %" PRIu32 - " of %s %" PRIu32 " (x %" PRIu32 "). Please check result", - line, isTiled(tif) ? "tile" : "strip", - (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip), a0); -} -#define tryG3WithoutEOL(a0) \ - do \ - { \ - Fax3TryG3WithoutEOL(module, tif, sp->line, a0); \ - } while (0) - -#define Nop - -static int CheckReachedCounters(TIFF *tif, const char *module, - Fax3CodecState *sp) -{ - if (sp->eofReachedCount >= EOF_REACHED_COUNT_THRESHOLD) - { - TIFFErrorExtR(tif, module, - "End of file (EOF) has already been reached %d times " - "within that %s.", - sp->eofReachedCount, isTiled(tif) ? "tile" : "strip"); - return (-1); - } - if (sp->eolReachedCount >= EOF_REACHED_COUNT_THRESHOLD) - { - TIFFErrorExtR(tif, module, - "Bad line length (EOL) has already been reached %d times " - "within that %s", - sp->eolReachedCount, isTiled(tif) ? "tile" : "strip"); - return (-1); - } - if (sp->unexpectedReachedCount >= EOF_REACHED_COUNT_THRESHOLD) - { - TIFFErrorExtR(tif, module, - "Bad code word (unexpected) has already been reached %d " - "times within that %s", - sp->unexpectedReachedCount, - isTiled(tif) ? "tile" : "strip"); - return (-1); - } - return (0); -} - -/** - * Decode the requested amount of G3 1D-encoded data. - * @param buf destination buffer - * @param occ available bytes in destination buffer - * @param s number of planes (ignored) - * @returns 1 for success, -1 in case of error - */ -static int Fax3Decode1D(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - DECLARE_STATE(tif, sp, "Fax3Decode1D"); - (void)s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (-1); - } - if (CheckReachedCounters(tif, module, sp)) - return (-1); -RETRY_WITHOUT_EOL_1D: - CACHE_STATE(tif, sp); - thisrun = sp->curruns; - while (occ > 0) - { - a0 = 0; - RunLength = 0; - pa = thisrun; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08" PRIX32 ", BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %" PRIu32 "\n", tif->tif_row); - fflush(stdout); -#endif - SYNC_EOL(EOF1D, RETRY_WITHOUT_EOL_1D); - EXPAND1D(EOF1Da); - (*sp->fill)(buf, thisrun, pa, lastx); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOF1D: /* premature EOF */ - CLEANUP_RUNS(); - EOF1Da: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} - -#define SWAP(t, a, b) \ - { \ - t x; \ - x = (a); \ - (a) = (b); \ - (b) = x; \ - } -/* - * Decode the requested amount of G3 2D-encoded data. - */ -static int Fax3Decode2D(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - DECLARE_STATE_2D(tif, sp, "Fax3Decode2D"); - int is1D; /* current line is 1d/2d-encoded */ - (void)s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (-1); - } - if (CheckReachedCounters(tif, module, sp)) - return (-1); -RETRY_WITHOUT_EOL_2D: - CACHE_STATE(tif, sp); - while (occ > 0) - { - a0 = 0; - RunLength = 0; - pa = thisrun = sp->curruns; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08" PRIX32 ", BitsAvail = %d EOLcnt = %d", BitAcc, - BitsAvail, EOLcnt); -#endif - SYNC_EOL(EOF2D, RETRY_WITHOUT_EOL_2D); - NeedBits8(1, EOF2D); - is1D = GetBits(1); /* 1D/2D-encoding tag bit */ - ClrBits(1); -#ifdef FAX3_DEBUG - printf(" %s\n-------------------- %" PRIu32 "\n", is1D ? "1D" : "2D", - tif->tif_row); - fflush(stdout); -#endif - pb = sp->refruns; - b1 = *pb++; - if (is1D) - EXPAND1D(EOF2Da); - else - EXPAND2D(EOF2Da); - (*sp->fill)(buf, thisrun, pa, lastx); - if (pa < thisrun + sp->nruns) - { - SETVALUE(0); /* imaginary change for reference */ - } - SWAP(uint32_t *, sp->curruns, sp->refruns); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOF2D: /* premature EOF */ - CLEANUP_RUNS(); - EOF2Da: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} -#undef SWAP - -#define FILL(n, cp) \ - for (int32_t ifill = 0; ifill < (n); ++ifill) \ - { \ - (cp)[ifill] = 0xff; \ - } \ - (cp) += (n); - -#define ZERO(n, cp) \ - for (int32_t izero = 0; izero < (n); ++izero) \ - { \ - (cp)[izero] = 0; \ - } \ - (cp) += (n); - -/* - * Bit-fill a row according to the white/black - * runs generated during G3/G4 decoding. - */ -void _TIFFFax3fillruns(unsigned char *buf, uint32_t *runs, uint32_t *erun, - uint32_t lastx) -{ - static const unsigned char _fillmasks[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0, - 0xf8, 0xfc, 0xfe, 0xff}; - unsigned char *cp; - uint32_t x, bx, run; - int32_t n, nw; - int64_t *lp; - - if ((erun - runs) & 1) - *erun++ = 0; - x = 0; - for (; runs < erun; runs += 2) - { - run = runs[0]; - if (x + run > lastx || run > lastx) - run = runs[0] = (uint32_t)(lastx - x); - if (run) - { - cp = buf + (x >> 3); - bx = x & 7; - if (run > 8 - bx) - { - if (bx) - { /* align to byte boundary */ - *cp++ &= 0xff << (8 - bx); - run -= 8 - bx; - } - if ((n = run >> 3) != 0) - { /* multiple bytes to fill */ - if ((n / sizeof(int64_t)) > 1) - { - /* - * Align to int64_tword boundary and fill. - */ - for (; n && !isAligned(cp, int64_t); n--) - *cp++ = 0x00; - lp = (int64_t *)cp; - nw = (int32_t)(n / sizeof(int64_t)); - n -= nw * sizeof(int64_t); - do - { - *lp++ = 0L; - } while (--nw); - cp = (unsigned char *)lp; - } - ZERO(n, cp); - run &= 7; - } - if (run) - cp[0] &= 0xff >> run; - } - else - cp[0] &= ~(_fillmasks[run] >> bx); - x += runs[0]; - } - run = runs[1]; - if (x + run > lastx || run > lastx) - run = runs[1] = lastx - x; - if (run) - { - cp = buf + (x >> 3); - bx = x & 7; - if (run > 8 - bx) - { - if (bx) - { /* align to byte boundary */ - *cp++ |= 0xff >> bx; - run -= 8 - bx; - } - if ((n = run >> 3) != 0) - { /* multiple bytes to fill */ - if ((n / sizeof(int64_t)) > 1) - { - /* - * Align to int64_t boundary and fill. - */ - for (; n && !isAligned(cp, int64_t); n--) - *cp++ = 0xff; - lp = (int64_t *)cp; - nw = (int32_t)(n / sizeof(int64_t)); - n -= nw * sizeof(int64_t); - do - { - *lp++ = -1L; - } while (--nw); - cp = (unsigned char *)lp; - } - FILL(n, cp); - run &= 7; - } - /* Explicit 0xff masking to make icc -check=conversions happy */ - if (run) - cp[0] = (unsigned char)((cp[0] | (0xff00 >> run)) & 0xff); - } - else - cp[0] |= _fillmasks[run] >> bx; - x += runs[1]; - } - } - assert(x == lastx); -} -#undef ZERO -#undef FILL - -static int Fax3FixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -/* - * Setup G3/G4-related compression/decompression state - * before data is processed. This routine is called once - * per image -- it sets up different state based on whether - * or not decoding or encoding is being done and whether - * 1D- or 2D-encoded data is involved. - */ -static int Fax3SetupState(TIFF *tif) -{ - static const char module[] = "Fax3SetupState"; - TIFFDirectory *td = &tif->tif_dir; - Fax3BaseState *sp = Fax3State(tif); - int needsRefLine; - Fax3CodecState *dsp = (Fax3CodecState *)Fax3State(tif); - tmsize_t rowbytes; - uint32_t rowpixels; - - if (td->td_bitspersample != 1) - { - TIFFErrorExtR(tif, module, - "Bits/sample must be 1 for Group 3/4 encoding/decoding"); - return (0); - } - if (td->td_samplesperpixel != 1 && - td->td_planarconfig != PLANARCONFIG_SEPARATE) - { - TIFFErrorExtR( - tif, module, - "Samples/pixel shall be 1 for Group 3/4 encoding/decoding, " - "or PlanarConfiguration must be set to Separate."); - return 0; - } - /* - * Calculate the scanline/tile widths. - */ - if (isTiled(tif)) - { - rowbytes = TIFFTileRowSize(tif); - rowpixels = td->td_tilewidth; - } - else - { - rowbytes = TIFFScanlineSize(tif); - rowpixels = td->td_imagewidth; - } - if ((int64_t)rowbytes < ((int64_t)rowpixels + 7) / 8) - { - TIFFErrorExtR(tif, module, - "Inconsistent number of bytes per row : rowbytes=%" PRId64 - " rowpixels=%" PRIu32, - (int64_t)rowbytes, rowpixels); - return (0); - } - sp->rowbytes = rowbytes; - sp->rowpixels = rowpixels; - /* - * Allocate any additional space required for decoding/encoding. - */ - needsRefLine = ((sp->groupoptions & GROUP3OPT_2DENCODING) || - td->td_compression == COMPRESSION_CCITTFAX4); - - /* - Assure that allocation computations do not overflow. - - TIFFroundup and TIFFSafeMultiply return zero on integer overflow - */ - if (dsp->runs != NULL) - { - _TIFFfreeExt(tif, dsp->runs); - dsp->runs = (uint32_t *)NULL; - } - dsp->nruns = TIFFroundup_32(rowpixels + 1, 32); - if (needsRefLine) - { - dsp->nruns = TIFFSafeMultiply(uint32_t, dsp->nruns, 2); - } - if ((dsp->nruns == 0) || (TIFFSafeMultiply(uint32_t, dsp->nruns, 2) == 0)) - { - TIFFErrorExtR(tif, tif->tif_name, - "Row pixels integer overflow (rowpixels %" PRIu32 ")", - rowpixels); - return (0); - } - dsp->runs = (uint32_t *)_TIFFCheckMalloc( - tif, TIFFSafeMultiply(uint32_t, dsp->nruns, 2), sizeof(uint32_t), - "for Group 3/4 run arrays"); - if (dsp->runs == NULL) - return (0); - memset(dsp->runs, 0, - TIFFSafeMultiply(uint32_t, dsp->nruns, 2) * sizeof(uint32_t)); - dsp->curruns = dsp->runs; - if (needsRefLine) - dsp->refruns = dsp->runs + dsp->nruns; - else - dsp->refruns = NULL; - if (td->td_compression == COMPRESSION_CCITTFAX3 && is2DEncoding(dsp)) - { /* NB: default is 1D routine */ - tif->tif_decoderow = Fax3Decode2D; - tif->tif_decodestrip = Fax3Decode2D; - tif->tif_decodetile = Fax3Decode2D; - } - - if (needsRefLine) - { /* 2d encoding */ - Fax3CodecState *esp = EncoderState(tif); - /* - * 2d encoding requires a scanline - * buffer for the ``reference line''; the - * scanline against which delta encoding - * is referenced. The reference line must - * be initialized to be ``white'' (done elsewhere). - */ - if (esp->refline != NULL) - { - _TIFFfreeExt(tif, esp->refline); - } - esp->refline = (unsigned char *)_TIFFmallocExt(tif, rowbytes); - if (esp->refline == NULL) - { - TIFFErrorExtR(tif, module, "No space for Group 3/4 reference line"); - return (0); - } - } - else /* 1d encoding */ - EncoderState(tif)->refline = NULL; - - return (1); -} - -/* - * CCITT Group 3 FAX Encoding. - */ - -#define Fax3FlushBits(tif, sp) \ - { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - { \ - if (!TIFFFlushData1(tif)) \ - return 0; \ - } \ - *(tif)->tif_rawcp++ = (uint8_t)(sp)->data; \ - (tif)->tif_rawcc++; \ - (sp)->data = 0, (sp)->bit = 8; \ - } -#define _FlushBits(tif) \ - { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - { \ - if (!TIFFFlushData1(tif)) \ - return 0; \ - } \ - *(tif)->tif_rawcp++ = (uint8_t)data; \ - (tif)->tif_rawcc++; \ - data = 0, bit = 8; \ - } -static const int _msbmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, - 0x1f, 0x3f, 0x7f, 0xff}; -#define _PutBits(tif, bits, length) \ - { \ - while (length > bit) \ - { \ - data |= bits >> (length - bit); \ - length -= bit; \ - _FlushBits(tif); \ - } \ - assert(length < 9); \ - data |= (bits & _msbmask[length]) << (bit - length); \ - bit -= length; \ - if (bit == 0) \ - _FlushBits(tif); \ - } - -/* - * Write a variable-length bit-value to - * the output stream. Values are - * assumed to be at most 16 bits. - */ -static int Fax3PutBits(TIFF *tif, unsigned int bits, unsigned int length) -{ - Fax3CodecState *sp = EncoderState(tif); - unsigned int bit = sp->bit; - int data = sp->data; - - _PutBits(tif, bits, length); - - sp->data = data; - sp->bit = bit; - return 1; -} - -/* - * Write a code to the output stream. - */ -#define putcode(tif, te) Fax3PutBits(tif, (te)->code, (te)->length) - -#ifdef FAX3_DEBUG -#define DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B") -#define DEBUG_PRINT(what, len) \ - { \ - int t; \ - printf("%08" PRIX32 "/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), \ - len); \ - for (t = length - 1; t >= 0; t--) \ - putchar(code & (1 << t) ? '1' : '0'); \ - putchar('\n'); \ - } -#endif - -/* - * Write the sequence of codes that describes - * the specified span of zero's or one's. The - * appropriate table that holds the make-up and - * terminating codes is supplied. - */ -static int putspan(TIFF *tif, int32_t span, const tableentry *tab) -{ - Fax3CodecState *sp = EncoderState(tif); - unsigned int bit = sp->bit; - int data = sp->data; - unsigned int code, length; - - while (span >= 2624) - { - const tableentry *te = &tab[63 + (2560 >> 6)]; - code = te->code; - length = te->length; -#ifdef FAX3_DEBUG - DEBUG_PRINT("MakeUp", te->runlen); -#endif - _PutBits(tif, code, length); - span -= te->runlen; - } - if (span >= 64) - { - const tableentry *te = &tab[63 + (span >> 6)]; - assert(te->runlen == 64 * (span >> 6)); - code = te->code; - length = te->length; -#ifdef FAX3_DEBUG - DEBUG_PRINT("MakeUp", te->runlen); -#endif - _PutBits(tif, code, length); - span -= te->runlen; - } - code = tab[span].code; - length = tab[span].length; -#ifdef FAX3_DEBUG - DEBUG_PRINT(" Term", tab[span].runlen); -#endif - _PutBits(tif, code, length); - - sp->data = data; - sp->bit = bit; - - return 1; -} - -/* - * Write an EOL code to the output stream. The zero-fill - * logic for byte-aligning encoded scanlines is handled - * here. We also handle writing the tag bit for the next - * scanline when doing 2d encoding. - */ -static int Fax3PutEOL(TIFF *tif) -{ - Fax3CodecState *sp = EncoderState(tif); - unsigned int bit = sp->bit; - int data = sp->data; - unsigned int code, length, tparm; - - if (sp->b.groupoptions & GROUP3OPT_FILLBITS) - { - /* - * Force bit alignment so EOL will terminate on - * a byte boundary. That is, force the bit alignment - * to 16-12 = 4 before putting out the EOL code. - */ - int align = 8 - 4; - if (align != sp->bit) - { - if (align > sp->bit) - align = sp->bit + (8 - align); - else - align = sp->bit - align; - tparm = align; - _PutBits(tif, 0, tparm); - } - } - code = EOL; - length = 12; - if (is2DEncoding(sp)) - { - code = (code << 1) | (sp->tag == G3_1D); - length++; - } - _PutBits(tif, code, length); - - sp->data = data; - sp->bit = bit; - - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int Fax3PreEncode(TIFF *tif, uint16_t s) -{ - Fax3CodecState *sp = EncoderState(tif); - - (void)s; - assert(sp != NULL); - sp->bit = 8; - sp->data = 0; - sp->tag = G3_1D; - /* - * This is necessary for Group 4; otherwise it isn't - * needed because the first scanline of each strip ends - * up being copied into the refline. - */ - if (sp->refline) - _TIFFmemset(sp->refline, 0x00, sp->b.rowbytes); - if (is2DEncoding(sp)) - { - float res = tif->tif_dir.td_yresolution; - /* - * The CCITT spec says that when doing 2d encoding, you - * should only do it on K consecutive scanlines, where K - * depends on the resolution of the image being encoded - * (2 for <= 200 lpi, 4 for > 200 lpi). Since the directory - * code initializes td_yresolution to 0, this code will - * select a K of 2 unless the YResolution tag is set - * appropriately. (Note also that we fudge a little here - * and use 150 lpi to avoid problems with units conversion.) - */ - if (tif->tif_dir.td_resolutionunit == RESUNIT_CENTIMETER) - res *= 2.54f; /* convert to inches */ - sp->maxk = (res > 150 ? 4 : 2); - sp->k = sp->maxk - 1; - } - else - sp->k = sp->maxk = 0; - sp->line = 0; - return (1); -} - -static const unsigned char zeroruns[256] = { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xe0 - 0xef */ - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */ -}; - -/* - * Find a span of ones or zeros using the supplied - * table. The ``base'' of the bit string is supplied - * along with the start+end bit indices. - */ -static inline int32_t find0span(unsigned char *bp, int32_t bs, int32_t be) -{ - int32_t bits = be - bs; - int32_t n, span; - - bp += bs >> 3; - /* - * Check partial byte on lhs. - */ - if (bits > 0 && (n = (bs & 7)) != 0) - { - span = zeroruns[(*bp << n) & 0xff]; - if (span > 8 - n) /* table value too generous */ - span = 8 - n; - if (span > bits) /* constrain span to bit range */ - span = bits; - if (n + span < 8) /* doesn't extend to edge of byte */ - return (span); - bits -= span; - bp++; - } - else - span = 0; - if (bits >= (int32_t)(2 * 8 * sizeof(int64_t))) - { - int64_t *lp; - /* - * Align to int64_t boundary and check int64_t words. - */ - while (!isAligned(bp, int64_t)) - { - if (*bp != 0x00) - return (span + zeroruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - lp = (int64_t *)bp; - while ((bits >= (int32_t)(8 * sizeof(int64_t))) && (0 == *lp)) - { - span += 8 * sizeof(int64_t); - bits -= 8 * sizeof(int64_t); - lp++; - } - bp = (unsigned char *)lp; - } - /* - * Scan full bytes for all 0's. - */ - while (bits >= 8) - { - if (*bp != 0x00) /* end of run */ - return (span + zeroruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - /* - * Check partial byte on rhs. - */ - if (bits > 0) - { - n = zeroruns[*bp]; - span += (n > bits ? bits : n); - } - return (span); -} - -static inline int32_t find1span(unsigned char *bp, int32_t bs, int32_t be) -{ - int32_t bits = be - bs; - int32_t n, span; - - bp += bs >> 3; - /* - * Check partial byte on lhs. - */ - if (bits > 0 && (n = (bs & 7)) != 0) - { - span = oneruns[(*bp << n) & 0xff]; - if (span > 8 - n) /* table value too generous */ - span = 8 - n; - if (span > bits) /* constrain span to bit range */ - span = bits; - if (n + span < 8) /* doesn't extend to edge of byte */ - return (span); - bits -= span; - bp++; - } - else - span = 0; - if (bits >= (int32_t)(2 * 8 * sizeof(int64_t))) - { - int64_t *lp; - /* - * Align to int64_t boundary and check int64_t words. - */ - while (!isAligned(bp, int64_t)) - { - if (*bp != 0xff) - return (span + oneruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - lp = (int64_t *)bp; - while ((bits >= (int32_t)(8 * sizeof(int64_t))) && - (~((uint64_t)0) == (uint64_t)*lp)) - { - span += 8 * sizeof(int64_t); - bits -= 8 * sizeof(int64_t); - lp++; - } - bp = (unsigned char *)lp; - } - /* - * Scan full bytes for all 1's. - */ - while (bits >= 8) - { - if (*bp != 0xff) /* end of run */ - return (span + oneruns[*bp]); - span += 8; - bits -= 8; - bp++; - } - /* - * Check partial byte on rhs. - */ - if (bits > 0) - { - n = oneruns[*bp]; - span += (n > bits ? bits : n); - } - return (span); -} - -/* - * Return the offset of the next bit in the range - * [bs..be] that is different from the specified - * color. The end, be, is returned if no such bit - * exists. - */ -#define finddiff(_cp, _bs, _be, _color) \ - (_bs + (_color ? find1span(_cp, _bs, _be) : find0span(_cp, _bs, _be))) -/* - * Like finddiff, but also check the starting bit - * against the end in case start > end. - */ -#define finddiff2(_cp, _bs, _be, _color) \ - (_bs < _be ? finddiff(_cp, _bs, _be, _color) : _be) - -/* - * 1d-encode a row of pixels. The encoding is - * a sequence of all-white or all-black spans - * of pixels encoded with Huffman codes. - */ -static int Fax3Encode1DRow(TIFF *tif, unsigned char *bp, uint32_t bits) -{ - Fax3CodecState *sp = EncoderState(tif); - int32_t span; - uint32_t bs = 0; - - for (;;) - { - span = find0span(bp, bs, bits); /* white span */ - if (!putspan(tif, span, TIFFFaxWhiteCodes)) - return 0; - bs += span; - if (bs >= bits) - break; - span = find1span(bp, bs, bits); /* black span */ - if (!putspan(tif, span, TIFFFaxBlackCodes)) - return 0; - bs += span; - if (bs >= bits) - break; - } - if (sp->b.mode & (FAXMODE_BYTEALIGN | FAXMODE_WORDALIGN)) - { - if (sp->bit != 8) /* byte-align */ - Fax3FlushBits(tif, sp); - if ((sp->b.mode & FAXMODE_WORDALIGN) && - !isAligned(tif->tif_rawcp, uint16_t)) - Fax3FlushBits(tif, sp); - } - return (1); -} - -static const tableentry horizcode = {3, 0x1, 0}; /* 001 */ -static const tableentry passcode = {4, 0x1, 0}; /* 0001 */ -static const tableentry vcodes[7] = { - {7, 0x03, 0}, /* 0000 011 */ - {6, 0x03, 0}, /* 0000 11 */ - {3, 0x03, 0}, /* 011 */ - {1, 0x1, 0}, /* 1 */ - {3, 0x2, 0}, /* 010 */ - {6, 0x02, 0}, /* 0000 10 */ - {7, 0x02, 0} /* 0000 010 */ -}; - -/* - * 2d-encode a row of pixels. Consult the CCITT - * documentation for the algorithm. - */ -static int Fax3Encode2DRow(TIFF *tif, unsigned char *bp, unsigned char *rp, - uint32_t bits) -{ -#define PIXEL(buf, ix) ((((buf)[(ix) >> 3]) >> (7 - ((ix)&7))) & 1) - uint32_t a0 = 0; - uint32_t a1 = (PIXEL(bp, 0) != 0 ? 0 : finddiff(bp, 0, bits, 0)); - uint32_t b1 = (PIXEL(rp, 0) != 0 ? 0 : finddiff(rp, 0, bits, 0)); - uint32_t a2, b2; - - for (;;) - { - b2 = finddiff2(rp, b1, bits, PIXEL(rp, b1)); - if (b2 >= a1) - { - /* Naive computation triggers - * -fsanitize=undefined,unsigned-integer-overflow */ - /* although it is correct unless the difference between both is < 31 - * bit */ - /* int32_t d = b1 - a1; */ - int32_t d = (b1 >= a1 && b1 - a1 <= 3U) ? (int32_t)(b1 - a1) - : (b1 < a1 && a1 - b1 <= 3U) ? -(int32_t)(a1 - b1) - : 0x7FFFFFFF; - if (!(-3 <= d && d <= 3)) - { /* horizontal mode */ - a2 = finddiff2(bp, a1, bits, PIXEL(bp, a1)); - if (!putcode(tif, &horizcode)) - return 0; - if (a0 + a1 == 0 || PIXEL(bp, a0) == 0) - { - if (!putspan(tif, a1 - a0, TIFFFaxWhiteCodes)) - return 0; - if (!putspan(tif, a2 - a1, TIFFFaxBlackCodes)) - return 0; - } - else - { - if (!putspan(tif, a1 - a0, TIFFFaxBlackCodes)) - return 0; - if (!putspan(tif, a2 - a1, TIFFFaxWhiteCodes)) - return 0; - } - a0 = a2; - } - else - { /* vertical mode */ - if (!putcode(tif, &vcodes[d + 3])) - return 0; - a0 = a1; - } - } - else - { /* pass mode */ - if (!putcode(tif, &passcode)) - return 0; - a0 = b2; - } - if (a0 >= bits) - break; - a1 = finddiff(bp, a0, bits, PIXEL(bp, a0)); - b1 = finddiff(rp, a0, bits, !PIXEL(bp, a0)); - b1 = finddiff(rp, b1, bits, PIXEL(bp, a0)); - } - return (1); -#undef PIXEL -} - -/* - * Encode a buffer of pixels. - */ -static int Fax3Encode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "Fax3Encode"; - Fax3CodecState *sp = EncoderState(tif); - (void)s; - if (cc % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be written"); - return (0); - } - while (cc > 0) - { - if ((sp->b.mode & FAXMODE_NOEOL) == 0) - { - if (!Fax3PutEOL(tif)) - return 0; - } - if (is2DEncoding(sp)) - { - if (sp->tag == G3_1D) - { - if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels)) - return (0); - sp->tag = G3_2D; - } - else - { - if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels)) - return (0); - sp->k--; - } - if (sp->k == 0) - { - sp->tag = G3_1D; - sp->k = sp->maxk - 1; - } - else - _TIFFmemcpy(sp->refline, bp, sp->b.rowbytes); - } - else - { - if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels)) - return (0); - } - bp += sp->b.rowbytes; - cc -= sp->b.rowbytes; - } - return (1); -} - -static int Fax3PostEncode(TIFF *tif) -{ - Fax3CodecState *sp = EncoderState(tif); - - if (sp->bit != 8) - Fax3FlushBits(tif, sp); - return (1); -} - -static int _Fax3Close(TIFF *tif) -{ - if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0 && tif->tif_rawcp) - { - Fax3CodecState *sp = EncoderState(tif); - unsigned int code = EOL; - unsigned int length = 12; - int i; - - if (is2DEncoding(sp)) - { - code = (code << 1) | (sp->tag == G3_1D); - length++; - } - for (i = 0; i < 6; i++) - Fax3PutBits(tif, code, length); - Fax3FlushBits(tif, sp); - } - return 1; -} - -static void Fax3Close(TIFF *tif) { _Fax3Close(tif); } - -static void Fax3Cleanup(TIFF *tif) -{ - Fax3CodecState *sp = DecoderState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->b.vgetparent; - tif->tif_tagmethods.vsetfield = sp->b.vsetparent; - tif->tif_tagmethods.printdir = sp->b.printdir; - - if (sp->runs) - _TIFFfreeExt(tif, sp->runs); - if (sp->refline) - _TIFFfreeExt(tif, sp->refline); - - _TIFFfreeExt(tif, tif->tif_data); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -#define FIELD_BADFAXLINES (FIELD_CODEC + 0) -#define FIELD_CLEANFAXDATA (FIELD_CODEC + 1) -#define FIELD_BADFAXRUN (FIELD_CODEC + 2) - -#define FIELD_OPTIONS (FIELD_CODEC + 7) - -static const TIFFField faxFields[] = { - {TIFFTAG_FAXMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, FALSE, - FALSE, "FaxMode", NULL}, - {TIFFTAG_FAXFILLFUNC, 0, 0, TIFF_ANY, 0, TIFF_SETGET_OTHER, FIELD_PSEUDO, - FALSE, FALSE, "FaxFillFunc", NULL}, - {TIFFTAG_BADFAXLINES, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, - FIELD_BADFAXLINES, TRUE, FALSE, "BadFaxLines", NULL}, - {TIFFTAG_CLEANFAXDATA, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, - FIELD_CLEANFAXDATA, TRUE, FALSE, "CleanFaxData", NULL}, - {TIFFTAG_CONSECUTIVEBADFAXLINES, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, - FIELD_BADFAXRUN, TRUE, FALSE, "ConsecutiveBadFaxLines", NULL}}; -static const TIFFField fax3Fields[] = { - {TIFFTAG_GROUP3OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, - FIELD_OPTIONS, FALSE, FALSE, "Group3Options", NULL}, -}; -static const TIFFField fax4Fields[] = { - {TIFFTAG_GROUP4OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, - FIELD_OPTIONS, FALSE, FALSE, "Group4Options", NULL}, -}; - -static int Fax3VSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - Fax3BaseState *sp = Fax3State(tif); - const TIFFField *fip; - - assert(sp != 0); - assert(sp->vsetparent != 0); - - switch (tag) - { - case TIFFTAG_FAXMODE: - sp->mode = (int)va_arg(ap, int); - return 1; /* NB: pseudo tag */ - case TIFFTAG_FAXFILLFUNC: - DecoderState(tif)->fill = va_arg(ap, TIFFFaxFillFunc); - return 1; /* NB: pseudo tag */ - case TIFFTAG_GROUP3OPTIONS: - /* XXX: avoid reading options if compression mismatches. */ - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3) - sp->groupoptions = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_GROUP4OPTIONS: - /* XXX: avoid reading options if compression mismatches. */ - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) - sp->groupoptions = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_BADFAXLINES: - sp->badfaxlines = (uint32_t)va_arg(ap, uint32_t); - break; - case TIFFTAG_CLEANFAXDATA: - sp->cleanfaxdata = (uint16_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_CONSECUTIVEBADFAXLINES: - sp->badfaxrun = (uint32_t)va_arg(ap, uint32_t); - break; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - - if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) - TIFFSetFieldBit(tif, fip->field_bit); - else - return 0; - - tif->tif_flags |= TIFF_DIRTYDIRECT; - return 1; -} - -static int Fax3VGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - Fax3BaseState *sp = Fax3State(tif); - - assert(sp != 0); - - switch (tag) - { - case TIFFTAG_FAXMODE: - *va_arg(ap, int *) = sp->mode; - break; - case TIFFTAG_FAXFILLFUNC: - *va_arg(ap, TIFFFaxFillFunc *) = DecoderState(tif)->fill; - break; - case TIFFTAG_GROUP3OPTIONS: - case TIFFTAG_GROUP4OPTIONS: - *va_arg(ap, uint32_t *) = sp->groupoptions; - break; - case TIFFTAG_BADFAXLINES: - *va_arg(ap, uint32_t *) = sp->badfaxlines; - break; - case TIFFTAG_CLEANFAXDATA: - *va_arg(ap, uint16_t *) = sp->cleanfaxdata; - break; - case TIFFTAG_CONSECUTIVEBADFAXLINES: - *va_arg(ap, uint32_t *) = sp->badfaxrun; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static void Fax3PrintDir(TIFF *tif, FILE *fd, long flags) -{ - Fax3BaseState *sp = Fax3State(tif); - - assert(sp != 0); - - (void)flags; - if (TIFFFieldSet(tif, FIELD_OPTIONS)) - { - const char *sep = " "; - if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) - { - fprintf(fd, " Group 4 Options:"); - if (sp->groupoptions & GROUP4OPT_UNCOMPRESSED) - fprintf(fd, "%suncompressed data", sep); - } - else - { - - fprintf(fd, " Group 3 Options:"); - if (sp->groupoptions & GROUP3OPT_2DENCODING) - { - fprintf(fd, "%s2-d encoding", sep); - sep = "+"; - } - if (sp->groupoptions & GROUP3OPT_FILLBITS) - { - fprintf(fd, "%sEOL padding", sep); - sep = "+"; - } - if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED) - fprintf(fd, "%suncompressed data", sep); - } - fprintf(fd, " (%" PRIu32 " = 0x%" PRIx32 ")\n", sp->groupoptions, - sp->groupoptions); - } - if (TIFFFieldSet(tif, FIELD_CLEANFAXDATA)) - { - fprintf(fd, " Fax Data:"); - switch (sp->cleanfaxdata) - { - case CLEANFAXDATA_CLEAN: - fprintf(fd, " clean"); - break; - case CLEANFAXDATA_REGENERATED: - fprintf(fd, " receiver regenerated"); - break; - case CLEANFAXDATA_UNCLEAN: - fprintf(fd, " uncorrected errors"); - break; - } - fprintf(fd, " (%" PRIu16 " = 0x%" PRIx16 ")\n", sp->cleanfaxdata, - sp->cleanfaxdata); - } - if (TIFFFieldSet(tif, FIELD_BADFAXLINES)) - fprintf(fd, " Bad Fax Lines: %" PRIu32 "\n", sp->badfaxlines); - if (TIFFFieldSet(tif, FIELD_BADFAXRUN)) - fprintf(fd, " Consecutive Bad Fax Lines: %" PRIu32 "\n", - sp->badfaxrun); - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -static int InitCCITTFax3(TIFF *tif) -{ - static const char module[] = "InitCCITTFax3"; - Fax3BaseState *sp; - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, faxFields, TIFFArrayCount(faxFields))) - { - TIFFErrorExtR(tif, "InitCCITTFax3", - "Merging common CCITT Fax codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(Fax3CodecState)); - - if (tif->tif_data == NULL) - { - TIFFErrorExtR(tif, module, "No space for state block"); - return (0); - } - _TIFFmemset(tif->tif_data, 0, sizeof(Fax3CodecState)); - - sp = Fax3State(tif); - sp->rw_mode = tif->tif_mode; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = Fax3VGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = Fax3VSetField; /* hook for codec tags */ - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = Fax3PrintDir; /* hook for codec tags */ - sp->groupoptions = 0; - - if (sp->rw_mode == O_RDONLY) /* FIXME: improve for in place update */ - tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */ - DecoderState(tif)->runs = NULL; - TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns); - EncoderState(tif)->refline = NULL; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = Fax3FixupTags; - tif->tif_setupdecode = Fax3SetupState; - tif->tif_predecode = Fax3PreDecode; - tif->tif_decoderow = Fax3Decode1D; - tif->tif_decodestrip = Fax3Decode1D; - tif->tif_decodetile = Fax3Decode1D; - tif->tif_setupencode = Fax3SetupState; - tif->tif_preencode = Fax3PreEncode; - tif->tif_postencode = Fax3PostEncode; - tif->tif_encoderow = Fax3Encode; - tif->tif_encodestrip = Fax3Encode; - tif->tif_encodetile = Fax3Encode; - tif->tif_close = Fax3Close; - tif->tif_cleanup = Fax3Cleanup; - - return (1); -} - -int TIFFInitCCITTFax3(TIFF *tif, int scheme) -{ - (void)scheme; - if (InitCCITTFax3(tif)) - { - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, fax3Fields, TIFFArrayCount(fax3Fields))) - { - TIFFErrorExtR(tif, "TIFFInitCCITTFax3", - "Merging CCITT Fax 3 codec-specific tags failed"); - return 0; - } - - /* - * The default format is Class/F-style w/o RTC. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF); - } - else - return 01; -} - -/* - * CCITT Group 4 (T.6) Facsimile-compatible - * Compression Scheme Support. - */ - -#define SWAP(t, a, b) \ - { \ - t x; \ - x = (a); \ - (a) = (b); \ - (b) = x; \ - } -/* - * Decode the requested amount of G4-encoded data. - */ -static int Fax4Decode(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - DECLARE_STATE_2D(tif, sp, "Fax4Decode"); - (void)s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (-1); - } - if (CheckReachedCounters(tif, module, sp)) - return (-1); - CACHE_STATE(tif, sp); - int start = sp->line; - while (occ > 0) - { - a0 = 0; - RunLength = 0; - pa = thisrun = sp->curruns; - pb = sp->refruns; - b1 = *pb++; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08" PRIX32 ", BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %d\n", tif->tif_row); - fflush(stdout); -#endif - EXPAND2D(EOFG4); - if (EOLcnt) - goto EOFG4; - if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */ - { - TIFFErrorExtR(tif, module, - "Buffer overrun detected : %" TIFF_SSIZE_FORMAT - " bytes available, %d bits needed", - occ, lastx); - return -1; - } - (*sp->fill)(buf, thisrun, pa, lastx); - SETVALUE(0); /* imaginary change for reference */ - SWAP(uint32_t *, sp->curruns, sp->refruns); - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOFG4: - NeedBits16(13, BADG4); - BADG4: -#ifdef FAX3_DEBUG - if (GetBits(13) != 0x1001) - fputs("Bad EOFB\n", stderr); -#endif - ClrBits(13); - if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */ - { - TIFFErrorExtR(tif, module, - "Buffer overrun detected : %" TIFF_SSIZE_FORMAT - " bytes available, %d bits needed", - occ, lastx); - return -1; - } - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (sp->line != start - ? 1 - : -1); /* don't error on badly-terminated strips */ - } - UNCACHE_STATE(tif, sp); - return (1); -} -#undef SWAP - -/* - * Encode the requested amount of data. - */ -static int Fax4Encode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "Fax4Encode"; - Fax3CodecState *sp = EncoderState(tif); - (void)s; - if (cc % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be written"); - return (0); - } - while (cc > 0) - { - if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels)) - return (0); - _TIFFmemcpy(sp->refline, bp, sp->b.rowbytes); - bp += sp->b.rowbytes; - cc -= sp->b.rowbytes; - } - return (1); -} - -static int Fax4PostEncode(TIFF *tif) -{ - Fax3CodecState *sp = EncoderState(tif); - - /* terminate strip w/ EOFB */ - Fax3PutBits(tif, EOL, 12); - Fax3PutBits(tif, EOL, 12); - if (sp->bit != 8) - Fax3FlushBits(tif, sp); - return (1); -} - -int TIFFInitCCITTFax4(TIFF *tif, int scheme) -{ - (void)scheme; - if (InitCCITTFax3(tif)) - { /* reuse G3 support */ - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, fax4Fields, TIFFArrayCount(fax4Fields))) - { - TIFFErrorExtR(tif, "TIFFInitCCITTFax4", - "Merging CCITT Fax 4 codec-specific tags failed"); - return 0; - } - - tif->tif_decoderow = Fax4Decode; - tif->tif_decodestrip = Fax4Decode; - tif->tif_decodetile = Fax4Decode; - tif->tif_encoderow = Fax4Encode; - tif->tif_encodestrip = Fax4Encode; - tif->tif_encodetile = Fax4Encode; - tif->tif_postencode = Fax4PostEncode; - /* - * Suppress RTC at the end of each strip. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_NORTC); - } - else - return (0); -} - -/* - * CCITT Group 3 1-D Modified Huffman RLE Compression Support. - * (Compression algorithms 2 and 32771) - */ - -/* - * Decode the requested amount of RLE-encoded data. - */ -static int Fax3DecodeRLE(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - DECLARE_STATE(tif, sp, "Fax3DecodeRLE"); - int mode = sp->b.mode; - (void)s; - if (occ % sp->b.rowbytes) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (-1); - } - if (CheckReachedCounters(tif, module, sp)) - return (-1); - CACHE_STATE(tif, sp); - thisrun = sp->curruns; - while (occ > 0) - { - a0 = 0; - RunLength = 0; - pa = thisrun; -#ifdef FAX3_DEBUG - printf("\nBitAcc=%08" PRIX32 ", BitsAvail = %d\n", BitAcc, BitsAvail); - printf("-------------------- %" PRIu32 "\n", tif->tif_row); - fflush(stdout); -#endif - EXPAND1D(EOFRLE); - (*sp->fill)(buf, thisrun, pa, lastx); - /* - * Cleanup at the end of the row. - */ - if (mode & FAXMODE_BYTEALIGN) - { - int n = BitsAvail - (BitsAvail & ~7); - ClrBits(n); - } - else if (mode & FAXMODE_WORDALIGN) - { - int n = BitsAvail - (BitsAvail & ~15); - ClrBits(n); - if (BitsAvail == 0 && !isAligned(cp, uint16_t)) - cp++; - } - buf += sp->b.rowbytes; - occ -= sp->b.rowbytes; - sp->line++; - continue; - EOFRLE: /* premature EOF */ - (*sp->fill)(buf, thisrun, pa, lastx); - UNCACHE_STATE(tif, sp); - return (-1); - } - UNCACHE_STATE(tif, sp); - return (1); -} - -int TIFFInitCCITTRLE(TIFF *tif, int scheme) -{ - (void)scheme; - if (InitCCITTFax3(tif)) - { /* reuse G3 support */ - tif->tif_decoderow = Fax3DecodeRLE; - tif->tif_decodestrip = Fax3DecodeRLE; - tif->tif_decodetile = Fax3DecodeRLE; - /* - * Suppress RTC+EOLs when encoding and byte-align data. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, - FAXMODE_NORTC | FAXMODE_NOEOL | FAXMODE_BYTEALIGN); - } - else - return (0); -} - -int TIFFInitCCITTRLEW(TIFF *tif, int scheme) -{ - (void)scheme; - if (InitCCITTFax3(tif)) - { /* reuse G3 support */ - tif->tif_decoderow = Fax3DecodeRLE; - tif->tif_decodestrip = Fax3DecodeRLE; - tif->tif_decodetile = Fax3DecodeRLE; - /* - * Suppress RTC+EOLs when encoding and word-align data. - */ - return TIFFSetField(tif, TIFFTAG_FAXMODE, - FAXMODE_NORTC | FAXMODE_NOEOL | FAXMODE_WORDALIGN); - } - else - return (0); -} -#endif /* CCITT_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_fax3.h b/third_party/libtiff/libtiff/tif_fax3.h deleted file mode 100644 index 80fd731..0000000 --- a/third_party/libtiff/libtiff/tif_fax3.h +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _FAX3_ -#define _FAX3_ -/* - * TIFF Library. - * - * CCITT Group 3 (T.4) and Group 4 (T.6) Decompression Support. - * - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "tiff.h" - -/* - * To override the default routine used to image decoded - * spans one can use the pseudo tag TIFFTAG_FAXFILLFUNC. - * The routine must have the type signature given below; - * for example: - * - * fillruns(unsigned char* buf, uint32_t* runs, uint32_t* erun, uint32_t lastx) - * - * where buf is place to set the bits, runs is the array of b&w run - * lengths (white then black), erun is the last run in the array, and - * lastx is the width of the row in pixels. Fill routines can assume - * the run array has room for at least lastx runs and can overwrite - * data in the run array as needed (e.g. to append zero runs to bring - * the count up to a nice multiple). - */ -typedef void (*TIFFFaxFillFunc)(unsigned char *, uint32_t *, uint32_t *, - uint32_t); - -/* - * The default run filler; made external for other decoders. - */ -#if defined(__cplusplus) -extern "C" -{ -#endif - extern void _TIFFFax3fillruns(unsigned char *, uint32_t *, uint32_t *, - uint32_t); -#if defined(__cplusplus) -} -#endif - -/* finite state machine codes */ -#define S_Null 0 -#define S_Pass 1 -#define S_Horiz 2 -#define S_V0 3 -#define S_VR 4 -#define S_VL 5 -#define S_Ext 6 -#define S_TermW 7 -#define S_TermB 8 -#define S_MakeUpW 9 -#define S_MakeUpB 10 -#define S_MakeUp 11 -#define S_EOL 12 - -/* WARNING: do not change the layout of this structure as the HylaFAX software - */ -/* really depends on it. See http://bugzilla.maptools.org/show_bug.cgi?id=2636 - */ -typedef struct -{ /* state table entry */ - unsigned char State; /* see above */ - unsigned char Width; /* width of code in bits */ - uint32_t Param; /* unsigned 32-bit run length in bits (holds on 16 bit - actually, but cannot be changed. See above warning) */ -} TIFFFaxTabEnt; - -extern const TIFFFaxTabEnt TIFFFaxMainTable[]; -extern const TIFFFaxTabEnt TIFFFaxWhiteTable[]; -extern const TIFFFaxTabEnt TIFFFaxBlackTable[]; - -/* - * The following macros define the majority of the G3/G4 decoder - * algorithm using the state tables defined elsewhere. To build - * a decoder you need some setup code and some glue code. Note - * that you may also need/want to change the way the NeedBits* - * macros get input data if, for example, you know the data to be - * decoded is properly aligned and oriented (doing so before running - * the decoder can be a big performance win). - * - * Consult the decoder in the TIFF library for an idea of what you - * need to define and setup to make use of these definitions. - * - * NB: to enable a debugging version of these macros define FAX3_DEBUG - * before including this file. Trace output goes to stdout. - */ - -#ifndef EndOfData -#define EndOfData() (cp >= ep) -#endif -/* - * Need <=8 or <=16 bits of input data. Unlike viewfax we - * cannot use/assume a word-aligned, properly bit swizzled - * input data set because data may come from an arbitrarily - * aligned, read-only source such as a memory-mapped file. - * Note also that the viewfax decoder does not check for - * running off the end of the input data buffer. This is - * possible for G3-encoded data because it prescans the input - * data to count EOL markers, but can cause problems for G4 - * data. In any event, we don't prescan and must watch for - * running out of data since we can't permit the library to - * scan past the end of the input data buffer. - * - * Finally, note that we must handle remaindered data at the end - * of a strip specially. The coder asks for a fixed number of - * bits when scanning for the next code. This may be more bits - * than are actually present in the data stream. If we appear - * to run out of data but still have some number of valid bits - * remaining then we makeup the requested amount with zeros and - * return successfully. If the returned data is incorrect then - * we should be called again and get a premature EOF error; - * otherwise we should get the right answer. - */ -#ifndef NeedBits8 -#define NeedBits8(n, eoflab) \ - do \ - { \ - if (BitsAvail < (n)) \ - { \ - if (EndOfData()) \ - { \ - if (BitsAvail == 0) /* no valid bits */ \ - goto eoflab; \ - BitsAvail = (n); /* pad with zeros */ \ - } \ - else \ - { \ - BitAcc |= ((uint32_t)bitmap[*cp++]) << BitsAvail; \ - BitsAvail += 8; \ - } \ - } \ - } while (0) -#endif -#ifndef NeedBits16 -#define NeedBits16(n, eoflab) \ - do \ - { \ - if (BitsAvail < (n)) \ - { \ - if (EndOfData()) \ - { \ - if (BitsAvail == 0) /* no valid bits */ \ - goto eoflab; \ - BitsAvail = (n); /* pad with zeros */ \ - } \ - else \ - { \ - BitAcc |= ((uint32_t)bitmap[*cp++]) << BitsAvail; \ - if ((BitsAvail += 8) < (n)) \ - { \ - if (EndOfData()) \ - { \ - /* NB: we know BitsAvail is non-zero here */ \ - BitsAvail = (n); /* pad with zeros */ \ - } \ - else \ - { \ - BitAcc |= ((uint32_t)bitmap[*cp++]) << BitsAvail; \ - BitsAvail += 8; \ - } \ - } \ - } \ - } \ - } while (0) -#endif -#define GetBits(n) (BitAcc & ((1 << (n)) - 1)) -#define ClrBits(n) \ - do \ - { \ - BitsAvail -= (n); \ - BitAcc >>= (n); \ - } while (0) - -#ifdef FAX3_DEBUG -static const char *StateNames[] = { - "Null ", "Pass ", "Horiz ", "V0 ", "VR ", "VL ", "Ext ", - "TermW ", "TermB ", "MakeUpW", "MakeUpB", "MakeUp ", "EOL ", -}; -#define DEBUG_SHOW putchar(BitAcc & (1 << t) ? '1' : '0') -#define LOOKUP8(wid, tab, eoflab) \ - do \ - { \ - int t; \ - NeedBits8(wid, eoflab); \ - TabEnt = tab + GetBits(wid); \ - printf("%08lX/%d: %s%5d\t", (long)BitAcc, BitsAvail, \ - StateNames[TabEnt->State], TabEnt->Param); \ - for (t = 0; t < TabEnt->Width; t++) \ - DEBUG_SHOW; \ - putchar('\n'); \ - fflush(stdout); \ - ClrBits(TabEnt->Width); \ - } while (0) -#define LOOKUP16(wid, tab, eoflab) \ - do \ - { \ - int t; \ - NeedBits16(wid, eoflab); \ - TabEnt = tab + GetBits(wid); \ - printf("%08lX/%d: %s%5d\t", (long)BitAcc, BitsAvail, \ - StateNames[TabEnt->State], TabEnt->Param); \ - for (t = 0; t < TabEnt->Width; t++) \ - DEBUG_SHOW; \ - putchar('\n'); \ - fflush(stdout); \ - ClrBits(TabEnt->Width); \ - } while (0) - -#define SETVALUE(x) \ - do \ - { \ - *pa++ = RunLength + (x); \ - printf("SETVALUE: %d\t%d\n", RunLength + (x), a0); \ - a0 += x; \ - RunLength = 0; \ - } while (0) -#else -#define LOOKUP8(wid, tab, eoflab) \ - do \ - { \ - NeedBits8(wid, eoflab); \ - TabEnt = tab + GetBits(wid); \ - ClrBits(TabEnt->Width); \ - } while (0) -#define LOOKUP16(wid, tab, eoflab) \ - do \ - { \ - NeedBits16(wid, eoflab); \ - TabEnt = tab + GetBits(wid); \ - ClrBits(TabEnt->Width); \ - } while (0) - -/* - * Append a run to the run length array for the - * current row and reset decoding state. - */ -#define SETVALUE(x) \ - do \ - { \ - if (pa >= thisrun + sp->nruns) \ - { \ - TIFFErrorExtR(tif, module, "Buffer overflow at line %u of %s %u", \ - sp->line, isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile \ - : tif->tif_curstrip); \ - return (-1); \ - } \ - *pa++ = RunLength + (x); \ - a0 += (x); \ - RunLength = 0; \ - } while (0) -#endif - -/* - * Synchronize input decoding at the start of each - * row by scanning for an EOL (if appropriate) and - * skipping any trash data that might be present - * after a decoding error. Note that the decoding - * done elsewhere that recognizes an EOL only consumes - * 11 consecutive zero bits. This means that if EOLcnt - * is non-zero then we still need to scan for the final flag - * bit that is part of the EOL code. - */ -#define SYNC_EOL(eoflab, retrywithouteol) \ - do \ - { \ - if (!(sp->b.mode & FAXMODE_NOEOL)) /* skip EOL, if not present */ \ - { \ - if (EOLcnt == 0) \ - { \ - for (;;) \ - { \ - NeedBits16(11, eoflab); \ - if (GetBits(11) == 0) \ - break; /* EOL found */ \ - ClrBits(1); \ - } \ - } \ - /* Now move after EOL or detect missing EOL. */ \ - for (;;) \ - { \ - NeedBits8(8, noEOLFound); \ - if (GetBits(8)) \ - break; \ - ClrBits(8); \ - } \ - while (GetBits(1) == 0) \ - ClrBits(1); \ - ClrBits(1); /* EOL bit */ \ - EOLcnt = 0; /* reset EOL counter/flag */ \ - break; /* existing EOL skipped, leave macro */ \ - noEOLFound: \ - sp->b.mode |= FAXMODE_NOEOL; \ - tryG3WithoutEOL(a0); \ - goto retrywithouteol; \ - } \ - } while (0) - -/* - * Cleanup the array of runs after decoding a row. - * We adjust final runs to insure the user buffer is not - * overwritten and/or undecoded area is white filled. - */ -#define CLEANUP_RUNS() \ - do \ - { \ - if (RunLength) \ - SETVALUE(0); \ - if (a0 != lastx) \ - { \ - badlength(a0, lastx); \ - while (a0 > lastx && pa > thisrun) \ - a0 -= *--pa; \ - if (a0 < lastx) \ - { \ - if (a0 < 0) \ - a0 = 0; \ - if ((pa - thisrun) & 1) \ - SETVALUE(0); \ - SETVALUE(lastx - a0); \ - } \ - else if (a0 > lastx) \ - { \ - SETVALUE(lastx); \ - SETVALUE(0); \ - } \ - } \ - } while (0) - -/* - * Decode a line of 1D-encoded data. - * - * The line expanders are written as macros so that they can be reused - * but still have direct access to the local variables of the "calling" - * function. - * - * Note that unlike the original version we have to explicitly test for - * a0 >= lastx after each black/white run is decoded. This is because - * the original code depended on the input data being zero-padded to - * insure the decoder recognized an EOL before running out of data. - */ -#define EXPAND1D(eoflab) \ - do \ - { \ - for (;;) \ - { \ - for (;;) \ - { \ - LOOKUP16(12, TIFFFaxWhiteTable, eof1d); \ - switch (TabEnt->State) \ - { \ - case S_EOL: \ - EOLcnt = 1; \ - goto done1d; \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite1d; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - unexpected("WhiteTable", a0); \ - goto done1d; \ - } \ - } \ - doneWhite1d: \ - if (a0 >= lastx) \ - goto done1d; \ - for (;;) \ - { \ - LOOKUP16(13, TIFFFaxBlackTable, eof1d); \ - switch (TabEnt->State) \ - { \ - case S_EOL: \ - EOLcnt = 1; \ - goto done1d; \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack1d; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - unexpected("BlackTable", a0); \ - goto done1d; \ - } \ - } \ - doneBlack1d: \ - if (a0 >= lastx) \ - goto done1d; \ - if (*(pa - 1) == 0 && *(pa - 2) == 0) \ - pa -= 2; \ - } \ - eof1d: \ - prematureEOF(a0); \ - CLEANUP_RUNS(); \ - goto eoflab; \ - done1d: \ - CLEANUP_RUNS(); \ - } while (0) - -/* - * Update the value of b1 using the array - * of runs for the reference line. - */ -#define CHECK_b1 \ - do \ - { \ - if (pa != thisrun) \ - while (b1 <= a0 && b1 < lastx) \ - { \ - if (pb + 1 >= sp->refruns + sp->nruns) \ - { \ - TIFFErrorExtR( \ - tif, module, "Buffer overflow at line %u of %s %u", \ - sp->line, isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ - return (-1); \ - } \ - b1 += pb[0] + pb[1]; \ - pb += 2; \ - } \ - } while (0) - -/* - * Expand a row of 2D-encoded data. - */ -#define EXPAND2D(eoflab) \ - do \ - { \ - while (a0 < lastx) \ - { \ - if (pa >= thisrun + sp->nruns) \ - { \ - TIFFErrorExtR( \ - tif, module, "Buffer overflow at line %u of %s %u", \ - sp->line, isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ - return (-1); \ - } \ - LOOKUP8(7, TIFFFaxMainTable, eof2d); \ - switch (TabEnt->State) \ - { \ - case S_Pass: \ - CHECK_b1; \ - if (pb + 1 >= sp->refruns + sp->nruns) \ - { \ - TIFFErrorExtR(tif, module, \ - "Buffer overflow at line %u of %s %u", \ - sp->line, \ - isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile \ - : tif->tif_curstrip); \ - return (-1); \ - } \ - b1 += *pb++; \ - RunLength += b1 - a0; \ - a0 = b1; \ - b1 += *pb++; \ - break; \ - case S_Horiz: \ - if ((pa - thisrun) & 1) \ - { \ - for (;;) \ - { /* black first */ \ - LOOKUP16(13, TIFFFaxBlackTable, eof2d); \ - switch (TabEnt->State) \ - { \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite2da; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badBlack2d; \ - } \ - } \ - doneWhite2da:; \ - for (;;) \ - { /* then white */ \ - LOOKUP16(12, TIFFFaxWhiteTable, eof2d); \ - switch (TabEnt->State) \ - { \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack2da; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badWhite2d; \ - } \ - } \ - doneBlack2da:; \ - } \ - else \ - { \ - for (;;) \ - { /* white first */ \ - LOOKUP16(12, TIFFFaxWhiteTable, eof2d); \ - switch (TabEnt->State) \ - { \ - case S_TermW: \ - SETVALUE(TabEnt->Param); \ - goto doneWhite2db; \ - case S_MakeUpW: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badWhite2d; \ - } \ - } \ - doneWhite2db:; \ - for (;;) \ - { /* then black */ \ - LOOKUP16(13, TIFFFaxBlackTable, eof2d); \ - switch (TabEnt->State) \ - { \ - case S_TermB: \ - SETVALUE(TabEnt->Param); \ - goto doneBlack2db; \ - case S_MakeUpB: \ - case S_MakeUp: \ - a0 += TabEnt->Param; \ - RunLength += TabEnt->Param; \ - break; \ - default: \ - goto badBlack2d; \ - } \ - } \ - doneBlack2db:; \ - } \ - CHECK_b1; \ - break; \ - case S_V0: \ - CHECK_b1; \ - SETVALUE(b1 - a0); \ - if (pb >= sp->refruns + sp->nruns) \ - { \ - TIFFErrorExtR(tif, module, \ - "Buffer overflow at line %u of %s %u", \ - sp->line, \ - isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile \ - : tif->tif_curstrip); \ - return (-1); \ - } \ - b1 += *pb++; \ - break; \ - case S_VR: \ - CHECK_b1; \ - SETVALUE(b1 - a0 + TabEnt->Param); \ - if (pb >= sp->refruns + sp->nruns) \ - { \ - TIFFErrorExtR(tif, module, \ - "Buffer overflow at line %u of %s %u", \ - sp->line, \ - isTiled(tif) ? "tile" : "strip", \ - isTiled(tif) ? tif->tif_curtile \ - : tif->tif_curstrip); \ - return (-1); \ - } \ - b1 += *pb++; \ - break; \ - case S_VL: \ - CHECK_b1; \ - if (b1 < (int)(a0 + TabEnt->Param)) \ - { \ - unexpected("VL", a0); \ - goto eol2d; \ - } \ - SETVALUE(b1 - a0 - TabEnt->Param); \ - b1 -= *--pb; \ - break; \ - case S_Ext: \ - *pa++ = lastx - a0; \ - extension(a0); \ - goto eol2d; \ - case S_EOL: \ - *pa++ = lastx - a0; \ - NeedBits8(4, eof2d); \ - if (GetBits(4)) \ - unexpected("EOL", a0); \ - ClrBits(4); \ - EOLcnt = 1; \ - goto eol2d; \ - default: \ - badMain2d: \ - unexpected("MainTable", a0); \ - goto eol2d; \ - badBlack2d: \ - unexpected("BlackTable", a0); \ - goto eol2d; \ - badWhite2d: \ - unexpected("WhiteTable", a0); \ - goto eol2d; \ - eof2d: \ - prematureEOF(a0); \ - CLEANUP_RUNS(); \ - goto eoflab; \ - } \ - } \ - if (RunLength) \ - { \ - if (RunLength + a0 < lastx) \ - { \ - /* expect a final V0 */ \ - NeedBits8(1, eof2d); \ - if (!GetBits(1)) \ - goto badMain2d; \ - ClrBits(1); \ - } \ - SETVALUE(0); \ - } \ - eol2d: \ - CLEANUP_RUNS(); \ - } while (0) -#endif /* _FAX3_ */ - diff --git a/third_party/libtiff/libtiff/tif_fax3sm.c b/third_party/libtiff/libtiff/tif_fax3sm.c deleted file mode 100644 index ba2fc53..0000000 --- a/third_party/libtiff/libtiff/tif_fax3sm.c +++ /dev/null @@ -1,1261 +0,0 @@ -/* WARNING, this file was automatically generated by the - mkg3states program */ -#include -#include "tiff.h" -#include "tif_fax3.h" - const TIFFFaxTabEnt TIFFFaxMainTable[128] = { -{12,7,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{5,6,2},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{5,7,3},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{4,6,2},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{6,7,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{5,6,2},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0}, -{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0},{4,7,3},{3,1,0},{5,3,1},{3,1,0}, -{2,3,0},{3,1,0},{4,3,1},{3,1,0},{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0}, -{4,3,1},{3,1,0},{4,6,2},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0}, -{1,4,0},{3,1,0},{5,3,1},{3,1,0},{2,3,0},{3,1,0},{4,3,1},{3,1,0} -}; - const TIFFFaxTabEnt TIFFFaxWhiteTable[4096] = { -{12,11,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1792},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1856},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2112},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2368},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,12,1984},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1920},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2240},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2496},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{12,11,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1792},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,11,1856},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2176},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1600},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6}, -{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3}, -{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15}, -{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5},{7,8,43},{7,6,17}, -{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128}, -{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5}, -{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,768},{7,4,6}, -{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2432},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6},{7,7,19},{7,5,8}, -{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5}, -{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17},{9,9,1408},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14}, -{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16}, -{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128}, -{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9}, -{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4}, -{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,960},{7,4,6}, -{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15}, -{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{11,12,2048},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6}, -{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7}, -{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6},{7,8,32},{7,5,8}, -{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16}, -{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128}, -{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1536},{7,4,5}, -{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3}, -{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,11,1920},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4}, -{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,896},{7,4,6}, -{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3}, -{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15}, -{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5},{7,8,44},{7,6,17}, -{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128}, -{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5}, -{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6}, -{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7}, -{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8}, -{7,8,55},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5}, -{7,8,53},{7,5,9},{9,8,448},{7,4,6},{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1472},{7,4,5},{7,8,43},{7,6,17},{9,9,1216},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14}, -{7,8,61},{7,4,4},{7,4,2},{7,4,7},{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16}, -{9,9,960},{7,4,6},{7,8,31},{7,5,8},{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,9,704},{7,4,6},{7,8,37},{9,5,128}, -{7,7,25},{7,6,15},{9,8,320},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5}, -{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{11,12,2304},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,7,20},{9,5,128},{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3}, -{7,7,27},{7,4,5},{7,8,40},{7,6,16},{9,9,832},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9}, -{9,8,512},{7,4,6},{7,8,36},{9,5,128},{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{9,9,1600},{7,4,5},{7,8,44},{7,6,17},{9,9,1344},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5}, -{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4}, -{7,4,2},{7,4,7},{7,8,48},{7,4,3},{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1088},{7,4,6}, -{7,8,32},{7,5,8},{7,8,58},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3}, -{7,5,11},{7,4,5},{7,7,26},{7,5,9},{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15}, -{9,8,384},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17}, -{9,7,256},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{0,0,0},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128}, -{7,7,24},{7,6,14},{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5}, -{7,8,39},{7,6,16},{9,8,576},{7,4,6},{7,7,19},{7,5,8},{7,8,55},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,45},{7,4,3},{7,5,11},{7,4,5},{7,8,53},{7,5,9},{9,8,448},{7,4,6}, -{7,8,35},{9,5,128},{7,8,51},{7,6,15},{7,8,63},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3}, -{9,9,1536},{7,4,5},{7,8,43},{7,6,17},{9,9,1280},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,8,29},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9}, -{9,6,1664},{7,4,6},{7,8,33},{9,5,128},{7,8,49},{7,6,14},{7,8,61},{7,4,4},{7,4,2},{7,4,7}, -{7,8,47},{7,4,3},{7,8,59},{7,4,5},{7,8,41},{7,6,16},{9,9,1024},{7,4,6},{7,8,31},{7,5,8}, -{7,8,57},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5}, -{7,7,26},{7,5,9},{9,9,768},{7,4,6},{7,8,37},{9,5,128},{7,7,25},{7,6,15},{9,8,320},{7,4,4}, -{7,4,2},{7,4,7},{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6}, -{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7},{11,12,2560},{7,4,3}, -{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6},{7,7,20},{9,5,128},{7,7,24},{7,6,14}, -{7,7,28},{7,4,4},{7,4,2},{7,4,7},{7,7,23},{7,4,3},{7,7,27},{7,4,5},{7,8,40},{7,6,16}, -{9,9,896},{7,4,6},{7,7,19},{7,5,8},{7,8,56},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7}, -{7,8,46},{7,4,3},{7,5,11},{7,4,5},{7,8,54},{7,5,9},{9,8,512},{7,4,6},{7,8,36},{9,5,128}, -{7,8,52},{7,6,15},{7,8,0},{7,4,4},{7,4,2},{7,4,7},{7,6,13},{7,4,3},{9,9,1728},{7,4,5}, -{7,8,44},{7,6,17},{9,9,1408},{7,4,6},{7,6,1},{7,5,8},{9,6,192},{9,5,64},{7,5,10},{7,4,4}, -{7,4,2},{7,4,7},{7,8,30},{7,4,3},{7,5,11},{7,4,5},{7,6,12},{7,5,9},{9,6,1664},{7,4,6}, -{7,8,34},{9,5,128},{7,8,50},{7,6,14},{7,8,62},{7,4,4},{7,4,2},{7,4,7},{7,8,48},{7,4,3}, -{7,8,60},{7,4,5},{7,8,42},{7,6,16},{9,9,1152},{7,4,6},{7,8,32},{7,5,8},{7,8,58},{9,5,64}, -{7,5,10},{7,4,4},{7,4,2},{7,4,7},{7,7,22},{7,4,3},{7,5,11},{7,4,5},{7,7,26},{7,5,9}, -{9,8,640},{7,4,6},{7,8,38},{9,5,128},{7,7,25},{7,6,15},{9,8,384},{7,4,4},{7,4,2},{7,4,7}, -{7,6,13},{7,4,3},{7,7,18},{7,4,5},{7,7,21},{7,6,17},{9,7,256},{7,4,6},{7,6,1},{7,5,8}, -{9,6,192},{9,5,64},{7,5,10},{7,4,4},{7,4,2},{7,4,7} -}; - const TIFFFaxTabEnt TIFFFaxBlackTable[8192] = { -{12,11,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,23},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,25},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,128},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,56},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,30},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,57},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,21},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,54},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,52},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,48},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2112},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,44},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,36},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,384},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,28},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,60},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,40},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2368},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,1984},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,50},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,34},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1664},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,26},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1408},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,32},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,61},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,42},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,1024},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,768},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,62},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2240},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,46},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,38},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,512},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,19},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2496},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,25},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,12,192},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1280},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,31},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,58},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,21},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,896},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,640},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,49},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2176},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,45},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,37},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,12,448},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,29},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1536},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,41},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2432},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2048},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,51},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,35},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,320},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,27},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,59},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,33},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,256},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,43},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1152},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,55},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,63},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,2304},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,47},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,39},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,53},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2560},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,25},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,128},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,56},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,30},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,11,1856},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,57},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,21},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,54},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,52},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,48},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2112},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,44},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,36},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,384},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,28},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,60},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,40},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,12,2368},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,1984},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,50},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,34},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,1728},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,26},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,1472},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,32},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,61},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,42},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1088},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,832},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,62},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2240},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,46},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,38},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,576},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2496},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{12,11,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,18},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1792},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,23},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,20},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,25},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,192},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1344},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,31},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,11,1856},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,58},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,21},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{10,13,960},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,13,704},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,49},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2176},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,45},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,37},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,448},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,29},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1600},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,41},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{11,12,2432},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,18},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,17},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2048},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,51},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,35},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{10,12,320},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,27},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,59},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,33},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{11,11,1920},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,12,256},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,43},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,13,1216},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{0,0,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,8,13},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,9,15},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,55},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,63},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2304},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,12,47},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,12,39},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,12,53},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,12},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{0,0,0},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,8,13},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,11,19},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,11,24},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,11,22},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{11,12,2560},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,7,10},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,10,16},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2},{8,10,0},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2}, -{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{10,10,64},{8,2,3}, -{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,9},{8,2,3},{8,3,1},{8,2,2}, -{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,11},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3}, -{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2}, -{8,8,14},{8,2,3},{8,3,1},{8,2,2},{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,6,8},{8,2,3}, -{8,3,1},{8,2,2},{8,4,5},{8,2,3},{8,3,4},{8,2,2},{8,7,12},{8,2,3},{8,3,1},{8,2,2}, -{8,4,6},{8,2,3},{8,3,4},{8,2,2},{8,5,7},{8,2,3},{8,3,1},{8,2,2},{8,4,5},{8,2,3}, -{8,3,4},{8,2,2} -}; -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/third_party/libtiff/libtiff/tif_flush.c b/third_party/libtiff/libtiff/tif_flush.c deleted file mode 100644 index ff9c1e2..0000000 --- a/third_party/libtiff/libtiff/tif_flush.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -int TIFFFlush(TIFF *tif) -{ - if (tif->tif_mode == O_RDONLY) - return 1; - - if (!TIFFFlushData(tif)) - return (0); - - /* In update (r+) mode we try to detect the case where - only the strip/tile map has been altered, and we try to - rewrite only that portion of the directory without - making any other changes */ - - if ((tif->tif_flags & TIFF_DIRTYSTRIP) && - !(tif->tif_flags & TIFF_DIRTYDIRECT) && tif->tif_mode == O_RDWR) - { - if (TIFFForceStrileArrayWriting(tif)) - return 1; - } - - if ((tif->tif_flags & (TIFF_DIRTYDIRECT | TIFF_DIRTYSTRIP)) && - !TIFFRewriteDirectory(tif)) - return (0); - - return (1); -} - -/* - * This is an advanced writing function that must be used in a particular - * sequence, and together with TIFFDeferStrileArrayWriting(), - * to make its intended effect. Its aim is to force the writing of - * the [Strip/Tile][Offsets/ByteCounts] arrays at the end of the file, when - * they have not yet been rewritten. - * - * The typical sequence of calls is: - * TIFFOpen() - * [ TIFFCreateDirectory(tif) ] - * Set fields with calls to TIFFSetField(tif, ...) - * TIFFDeferStrileArrayWriting(tif) - * TIFFWriteCheck(tif, ...) - * TIFFWriteDirectory(tif) - * ... potentially create other directories and come back to the above directory - * TIFFForceStrileArrayWriting(tif) - * - * Returns 1 in case of success, 0 otherwise. - */ -int TIFFForceStrileArrayWriting(TIFF *tif) -{ - static const char module[] = "TIFFForceStrileArrayWriting"; - const int isTiled = TIFFIsTiled(tif); - - if (tif->tif_mode == O_RDONLY) - { - TIFFErrorExtR(tif, tif->tif_name, "File opened in read-only mode"); - return 0; - } - if (tif->tif_diroff == 0) - { - TIFFErrorExtR(tif, module, "Directory has not yet been written"); - return 0; - } - if ((tif->tif_flags & TIFF_DIRTYDIRECT) != 0) - { - TIFFErrorExtR(tif, module, - "Directory has changes other than the strile arrays. " - "TIFFRewriteDirectory() should be called instead"); - return 0; - } - - if (!(tif->tif_flags & TIFF_DIRTYSTRIP)) - { - if (!(tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && - tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0)) - { - TIFFErrorExtR(tif, module, - "Function not called together with " - "TIFFDeferStrileArrayWriting()"); - return 0; - } - - if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) - return 0; - } - - if (_TIFFRewriteField(tif, - isTiled ? TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS, - TIFF_LONG8, tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripoffset_p) && - _TIFFRewriteField( - tif, isTiled ? TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS, - TIFF_LONG8, tif->tif_dir.td_nstrips, - tif->tif_dir.td_stripbytecount_p)) - { - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - tif->tif_flags &= ~TIFF_BEENWRITING; - return 1; - } - - return 0; -} - -/* - * Flush buffered data to the file. - * - * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING - * is not set, so that TIFFFlush() will proceed to write out the directory. - * The documentation says returning 1 is an error indicator, but not having - * been writing isn't exactly a an error. Hopefully this doesn't cause - * problems for other people. - */ -int TIFFFlushData(TIFF *tif) -{ - if ((tif->tif_flags & TIFF_BEENWRITING) == 0) - return (1); - if (tif->tif_flags & TIFF_POSTENCODE) - { - tif->tif_flags &= ~TIFF_POSTENCODE; - if (!(*tif->tif_postencode)(tif)) - return (0); - } - return (TIFFFlushData1(tif)); -} diff --git a/third_party/libtiff/libtiff/tif_getimage.c b/third_party/libtiff/libtiff/tif_getimage.c deleted file mode 100644 index 9d4259e..0000000 --- a/third_party/libtiff/libtiff/tif_getimage.c +++ /dev/null @@ -1,3535 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Read and return a packed RGBA image. - */ -#include "tiffiop.h" -#include -#include - -static int gtTileContig(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); -static int gtTileSeparate(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); -static int gtStripContig(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); -static int gtStripSeparate(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); -static int PickContigCase(TIFFRGBAImage *); -static int PickSeparateCase(TIFFRGBAImage *); - -static int BuildMapUaToAa(TIFFRGBAImage *img); -static int BuildMapBitdepth16To8(TIFFRGBAImage *img); - -static const char photoTag[] = "PhotometricInterpretation"; - -/* - * Helper constants used in Orientation tag handling - */ -#define FLIP_VERTICALLY 0x01 -#define FLIP_HORIZONTALLY 0x02 - -#define EMSG_BUF_SIZE 1024 - -/* - * Color conversion constants. We will define display types here. - */ - -static const TIFFDisplay display_sRGB = { - {/* XYZ -> luminance matrix */ - {3.2410F, -1.5374F, -0.4986F}, - {-0.9692F, 1.8760F, 0.0416F}, - {0.0556F, -0.2040F, 1.0570F}}, - 100.0F, - 100.0F, - 100.0F, /* Light o/p for reference white */ - 255, - 255, - 255, /* Pixel values for ref. white */ - 1.0F, - 1.0F, - 1.0F, /* Residual light o/p for black pixel */ - 2.4F, - 2.4F, - 2.4F, /* Gamma values for the three guns */ -}; - -/* - * Check the image to see if TIFFReadRGBAImage can deal with it. - * 1/0 is returned according to whether or not the image can - * be handled. If 0 is returned, emsg contains the reason - * why it is being rejected. - */ -int TIFFRGBAImageOK(TIFF *tif, char emsg[EMSG_BUF_SIZE]) -{ - TIFFDirectory *td = &tif->tif_dir; - uint16_t photometric; - int colorchannels; - - if (!tif->tif_decodestatus) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, requested compression method is not configured"); - return (0); - } - switch (td->td_bitspersample) - { - case 1: - case 2: - case 4: - case 8: - case 16: - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle images with %" PRIu16 - "-bit samples", - td->td_bitspersample); - return (0); - } - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle images with IEEE floating-point samples"); - return (0); - } - colorchannels = td->td_samplesperpixel - td->td_extrasamples; - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) - { - switch (colorchannels) - { - case 1: - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - photometric = PHOTOMETRIC_RGB; - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, "Missing needed %s tag", - photoTag); - return (0); - } - } - switch (photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - if (td->td_planarconfig == PLANARCONFIG_CONTIG && - td->td_samplesperpixel != 1 && td->td_bitspersample < 8) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle contiguous data with %s=%" PRIu16 - ", " - "and %s=%" PRIu16 " and Bits/Sample=%" PRIu16 "", - photoTag, photometric, "Samples/pixel", - td->td_samplesperpixel, td->td_bitspersample); - return (0); - } - /* - * We should likely validate that any extra samples are either - * to be ignored, or are alpha, and if alpha we should try to use - * them. But for now we won't bother with this. - */ - break; - case PHOTOMETRIC_YCBCR: - /* - * TODO: if at all meaningful and useful, make more complete - * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningful - * error to return - */ - break; - case PHOTOMETRIC_RGB: - if (colorchannels < 3) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle RGB image with %s=%d", - "Color channels", colorchannels); - return (0); - } - break; - case PHOTOMETRIC_SEPARATED: - { - uint16_t inkset; - TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset); - if (inkset != INKSET_CMYK) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle separated image with %s=%d", - "InkSet", inkset); - return 0; - } - if (td->td_samplesperpixel < 4) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle separated image with %s=%" PRIu16, - "Samples/pixel", td->td_samplesperpixel); - return 0; - } - break; - } - case PHOTOMETRIC_LOGL: - if (td->td_compression != COMPRESSION_SGILOG) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, LogL data must have %s=%d", "Compression", - COMPRESSION_SGILOG); - return (0); - } - break; - case PHOTOMETRIC_LOGLUV: - if (td->td_compression != COMPRESSION_SGILOG && - td->td_compression != COMPRESSION_SGILOG24) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, LogLuv data must have %s=%d or %d", - "Compression", COMPRESSION_SGILOG, - COMPRESSION_SGILOG24); - return (0); - } - if (td->td_planarconfig != PLANARCONFIG_CONTIG) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle LogLuv images with %s=%" PRIu16, - "Planarconfiguration", td->td_planarconfig); - return (0); - } - if (td->td_samplesperpixel != 3 || colorchannels != 3) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle image with %s=%" PRIu16 - ", %s=%d", - "Samples/pixel", td->td_samplesperpixel, - "colorchannels", colorchannels); - return 0; - } - break; - case PHOTOMETRIC_CIELAB: - if (td->td_samplesperpixel != 3 || colorchannels != 3 || - (td->td_bitspersample != 8 && td->td_bitspersample != 16)) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle image with %s=%" PRIu16 - ", %s=%d and %s=%" PRIu16, - "Samples/pixel", td->td_samplesperpixel, - "colorchannels", colorchannels, "Bits/sample", - td->td_bitspersample); - return 0; - } - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle image with %s=%" PRIu16, photoTag, - photometric); - return (0); - } - return (1); -} - -void TIFFRGBAImageEnd(TIFFRGBAImage *img) -{ - if (img->Map) - { - _TIFFfreeExt(img->tif, img->Map); - img->Map = NULL; - } - if (img->BWmap) - { - _TIFFfreeExt(img->tif, img->BWmap); - img->BWmap = NULL; - } - if (img->PALmap) - { - _TIFFfreeExt(img->tif, img->PALmap); - img->PALmap = NULL; - } - if (img->ycbcr) - { - _TIFFfreeExt(img->tif, img->ycbcr); - img->ycbcr = NULL; - } - if (img->cielab) - { - _TIFFfreeExt(img->tif, img->cielab); - img->cielab = NULL; - } - if (img->UaToAa) - { - _TIFFfreeExt(img->tif, img->UaToAa); - img->UaToAa = NULL; - } - if (img->Bitdepth16To8) - { - _TIFFfreeExt(img->tif, img->Bitdepth16To8); - img->Bitdepth16To8 = NULL; - } - - if (img->redcmap) - { - _TIFFfreeExt(img->tif, img->redcmap); - _TIFFfreeExt(img->tif, img->greencmap); - _TIFFfreeExt(img->tif, img->bluecmap); - img->redcmap = img->greencmap = img->bluecmap = NULL; - } -} - -static int isCCITTCompression(TIFF *tif) -{ - uint16_t compress; - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress); - return (compress == COMPRESSION_CCITTFAX3 || - compress == COMPRESSION_CCITTFAX4 || - compress == COMPRESSION_CCITTRLE || - compress == COMPRESSION_CCITTRLEW); -} - -int TIFFRGBAImageBegin(TIFFRGBAImage *img, TIFF *tif, int stop, - char emsg[EMSG_BUF_SIZE]) -{ - uint16_t *sampleinfo; - uint16_t extrasamples; - uint16_t planarconfig; - uint16_t compress; - int colorchannels; - uint16_t *red_orig, *green_orig, *blue_orig; - int n_color; - - if (!TIFFRGBAImageOK(tif, emsg)) - return 0; - - /* Initialize to normal values */ - img->row_offset = 0; - img->col_offset = 0; - img->redcmap = NULL; - img->greencmap = NULL; - img->bluecmap = NULL; - img->Map = NULL; - img->BWmap = NULL; - img->PALmap = NULL; - img->ycbcr = NULL; - img->cielab = NULL; - img->UaToAa = NULL; - img->Bitdepth16To8 = NULL; - img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */ - - img->tif = tif; - img->stoponerr = stop; - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample); - switch (img->bitspersample) - { - case 1: - case 2: - case 4: - case 8: - case 16: - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle images with %" PRIu16 - "-bit samples", - img->bitspersample); - goto fail_return; - } - img->alpha = 0; - TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel); - TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, - &sampleinfo); - if (extrasamples >= 1) - { - switch (sampleinfo[0]) - { - case EXTRASAMPLE_UNSPECIFIED: /* Workaround for some images without - */ - if (img->samplesperpixel > - 3) /* correct info about alpha channel */ - img->alpha = EXTRASAMPLE_ASSOCALPHA; - break; - case EXTRASAMPLE_ASSOCALPHA: /* data is pre-multiplied */ - case EXTRASAMPLE_UNASSALPHA: /* data is not pre-multiplied */ - img->alpha = sampleinfo[0]; - break; - } - } - -#ifdef DEFAULT_EXTRASAMPLE_AS_ALPHA - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) - img->photometric = PHOTOMETRIC_MINISWHITE; - - if (extrasamples == 0 && img->samplesperpixel == 4 && - img->photometric == PHOTOMETRIC_RGB) - { - img->alpha = EXTRASAMPLE_ASSOCALPHA; - extrasamples = 1; - } -#endif - - colorchannels = img->samplesperpixel - extrasamples; - TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress); - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig); - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) - { - switch (colorchannels) - { - case 1: - if (isCCITTCompression(tif)) - img->photometric = PHOTOMETRIC_MINISWHITE; - else - img->photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - img->photometric = PHOTOMETRIC_RGB; - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, "Missing needed %s tag", - photoTag); - goto fail_return; - } - } - switch (img->photometric) - { - case PHOTOMETRIC_PALETTE: - if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &red_orig, &green_orig, - &blue_orig)) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Missing required \"Colormap\" tag"); - goto fail_return; - } - - /* copy the colormaps so we can modify them */ - n_color = (1U << img->bitspersample); - img->redcmap = - (uint16_t *)_TIFFmallocExt(tif, sizeof(uint16_t) * n_color); - img->greencmap = - (uint16_t *)_TIFFmallocExt(tif, sizeof(uint16_t) * n_color); - img->bluecmap = - (uint16_t *)_TIFFmallocExt(tif, sizeof(uint16_t) * n_color); - if (!img->redcmap || !img->greencmap || !img->bluecmap) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Out of memory for colormap copy"); - goto fail_return; - } - - _TIFFmemcpy(img->redcmap, red_orig, n_color * 2); - _TIFFmemcpy(img->greencmap, green_orig, n_color * 2); - _TIFFmemcpy(img->bluecmap, blue_orig, n_color * 2); - - /* fall through... */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (planarconfig == PLANARCONFIG_CONTIG && - img->samplesperpixel != 1 && img->bitspersample < 8) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle contiguous data with %s=%" PRIu16 - ", " - "and %s=%" PRIu16 " and Bits/Sample=%" PRIu16, - photoTag, img->photometric, "Samples/pixel", - img->samplesperpixel, img->bitspersample); - goto fail_return; - } - break; - case PHOTOMETRIC_YCBCR: - /* It would probably be nice to have a reality check here. */ - if (planarconfig == PLANARCONFIG_CONTIG) - /* can rely on libjpeg to convert to RGB */ - /* XXX should restore current state on exit */ - switch (compress) - { - case COMPRESSION_JPEG: - /* - * TODO: when complete tests verify complete - * desubsampling and YCbCr handling, remove use of - * TIFFTAG_JPEGCOLORMODE in favor of tif_getimage.c - * native handling - */ - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, - JPEGCOLORMODE_RGB); - img->photometric = PHOTOMETRIC_RGB; - break; - default: - /* do nothing */; - break; - } - /* - * TODO: if at all meaningful and useful, make more complete - * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningful - * error to return - */ - break; - case PHOTOMETRIC_RGB: - if (colorchannels < 3) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle RGB image with %s=%d", - "Color channels", colorchannels); - goto fail_return; - } - break; - case PHOTOMETRIC_SEPARATED: - { - uint16_t inkset; - TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset); - if (inkset != INKSET_CMYK) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle separated image with %s=%" PRIu16, - "InkSet", inkset); - goto fail_return; - } - if (img->samplesperpixel < 4) - { - snprintf( - emsg, EMSG_BUF_SIZE, - "Sorry, can not handle separated image with %s=%" PRIu16, - "Samples/pixel", img->samplesperpixel); - goto fail_return; - } - } - break; - case PHOTOMETRIC_LOGL: - if (compress != COMPRESSION_SGILOG) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, LogL data must have %s=%d", "Compression", - COMPRESSION_SGILOG); - goto fail_return; - } - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT); - img->photometric = PHOTOMETRIC_MINISBLACK; /* little white lie */ - img->bitspersample = 8; - break; - case PHOTOMETRIC_LOGLUV: - if (compress != COMPRESSION_SGILOG && - compress != COMPRESSION_SGILOG24) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, LogLuv data must have %s=%d or %d", - "Compression", COMPRESSION_SGILOG, - COMPRESSION_SGILOG24); - goto fail_return; - } - if (planarconfig != PLANARCONFIG_CONTIG) - { - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle LogLuv images with %s=%" PRIu16, - "Planarconfiguration", planarconfig); - return (0); - } - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT); - img->photometric = PHOTOMETRIC_RGB; /* little white lie */ - img->bitspersample = 8; - break; - case PHOTOMETRIC_CIELAB: - break; - default: - snprintf(emsg, EMSG_BUF_SIZE, - "Sorry, can not handle image with %s=%" PRIu16, photoTag, - img->photometric); - goto fail_return; - } - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height); - TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation); - img->isContig = - !(planarconfig == PLANARCONFIG_SEPARATE && img->samplesperpixel > 1); - if (img->isContig) - { - if (!PickContigCase(img)) - { - snprintf(emsg, EMSG_BUF_SIZE, "Sorry, can not handle image"); - goto fail_return; - } - } - else - { - if (!PickSeparateCase(img)) - { - snprintf(emsg, EMSG_BUF_SIZE, "Sorry, can not handle image"); - goto fail_return; - } - } - return 1; - -fail_return: - TIFFRGBAImageEnd(img); - return 0; -} - -int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - if (img->get == NULL) - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "No \"get\" routine setup"); - return (0); - } - if (img->put.any == NULL) - { - TIFFErrorExtR( - img->tif, TIFFFileName(img->tif), - "No \"put\" routine setupl; probably can not handle image format"); - return (0); - } - /* Verify raster height against image height. - * Width is checked in img->get() function individually. */ - if (0 <= img->row_offset && (uint32_t)img->row_offset < img->height) - { - uint32_t hx = img->height - img->row_offset; - if (h > hx) - { - /* Adapt parameters to read only available lines and put image - * at the bottom of the raster. */ - raster += (size_t)(h - hx) * w; - h = hx; - } - } - else - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "Error in TIFFRGBAImageGet: row offset %d exceeds " - "image height %d", - img->row_offset, img->height); - return 0; - } - return (*img->get)(img, raster, w, h); -} - -/* - * Read the specified image into an ABGR-format rastertaking in account - * specified orientation. - */ -int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight, - uint32_t *raster, int orientation, int stop) -{ - char emsg[EMSG_BUF_SIZE] = ""; - TIFFRGBAImage img; - int ok; - - if (TIFFRGBAImageBegin(&img, tif, stop, emsg)) - { - img.req_orientation = (uint16_t)orientation; - ok = TIFFRGBAImageGet(&img, raster, rwidth, rheight); - TIFFRGBAImageEnd(&img); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", emsg); - ok = 0; - } - return (ok); -} - -/* - * Read the specified image into an ABGR-format raster. Use bottom left - * origin for raster by default. - */ -int TIFFReadRGBAImage(TIFF *tif, uint32_t rwidth, uint32_t rheight, - uint32_t *raster, int stop) -{ - return TIFFReadRGBAImageOriented(tif, rwidth, rheight, raster, - ORIENTATION_BOTLEFT, stop); -} - -static int setorientation(TIFFRGBAImage *img) -{ - switch (img->orientation) - { - case ORIENTATION_TOPLEFT: - case ORIENTATION_LEFTTOP: - if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_HORIZONTALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_VERTICALLY; - else - return 0; - case ORIENTATION_TOPRIGHT: - case ORIENTATION_RIGHTTOP: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_HORIZONTALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else - return 0; - case ORIENTATION_BOTRIGHT: - case ORIENTATION_RIGHTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - return FLIP_HORIZONTALLY; - else - return 0; - case ORIENTATION_BOTLEFT: - case ORIENTATION_LEFTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - return FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - return FLIP_HORIZONTALLY | FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - return FLIP_HORIZONTALLY; - else - return 0; - default: /* NOTREACHED */ - return 0; - } -} - -/* - * Get an tile-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int gtTileContig(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - tileContigRoutine put = img->put.contig; - uint32_t col, row, y, rowstoread; - tmsize_t pos; - uint32_t tw, th; - unsigned char *buf = NULL; - int32_t fromskew, toskew; - uint32_t nrow; - int ret = 1, flip; - uint32_t this_tw, tocol; - int32_t this_toskew, leftmost_toskew; - int32_t leftmost_fromskew; - uint32_t leftmost_tw; - tmsize_t bufsize; - - /* If the raster is smaller than the image, - * or if there is a col_offset, adapt the samples to be copied per row. */ - uint32_t wmin; - - if (0 <= img->col_offset && (uint32_t)img->col_offset < img->width) - { - wmin = TIFFmin(w, img->width - img->col_offset); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Error in gtTileContig: column offset %d exceeds " - "image width %d", - img->col_offset, img->width); - return 0; - } - bufsize = TIFFTileSize(tif); - if (bufsize == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); - } - - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) - { - if (((int64_t)tw + w) > INT_MAX) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", - "unsupported tile size (too wide)"); - return (0); - } - y = h - 1; - toskew = -(int32_t)(tw + w); - } - else - { - if (tw > ((int64_t)INT_MAX + w)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", - "unsupported tile size (too wide)"); - return (0); - } - y = 0; - toskew = -(int32_t)(tw - w); - } - - if (tw == 0 || th == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "tile width or height is zero"); - return (0); - } - - /* - * Leftmost tile is clipped on left side if col_offset > 0. - */ - leftmost_fromskew = img->col_offset % tw; - leftmost_tw = tw - leftmost_fromskew; - int64_t skew_i64 = (int64_t)toskew + leftmost_fromskew; - if (skew_i64 > INT_MAX || skew_i64 < INT_MIN) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s %" PRId64, "Invalid skew", - skew_i64); - return (0); - } - leftmost_toskew = (int32_t)skew_i64; - for (row = 0; ret != 0 && row < h; row += nrow) - { - rowstoread = th - (row + img->row_offset) % th; - nrow = (row + rowstoread > h ? h - row : rowstoread); - fromskew = leftmost_fromskew; - this_tw = leftmost_tw; - this_toskew = leftmost_toskew; - tocol = 0; - col = img->col_offset; - /* wmin: only write imagewidth if raster is bigger. */ - while (tocol < wmin) - { - if (_TIFFReadTileAndAllocBuffer(tif, (void **)&buf, bufsize, col, - row + img->row_offset, 0, - 0) == (tmsize_t)(-1) && - (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - pos = ((row + img->row_offset) % th) * TIFFTileRowSize(tif) + - ((tmsize_t)fromskew * img->samplesperpixel); - if (tocol + this_tw > wmin) - { - /* - * Rightmost tile is clipped on right side. - */ - fromskew = tw - (wmin - tocol); - this_tw = tw - fromskew; - this_toskew = toskew + fromskew; - } - tmsize_t roffset = (tmsize_t)y * w + tocol; - (*put)(img, raster + roffset, tocol, y, this_tw, nrow, fromskew, - this_toskew, buf + pos); - tocol += this_tw; - col += this_tw; - /* - * After the leftmost tile, tiles are no longer clipped on left - * side. - */ - fromskew = 0; - this_tw = tw; - this_toskew = toskew; - } - - y += ((flip & FLIP_VERTICALLY) ? -(int32_t)nrow : (int32_t)nrow); - } - _TIFFfreeExt(img->tif, buf); - - if (flip & FLIP_HORIZONTALLY) - { - uint32_t line; - - for (line = 0; line < h; line++) - { - uint32_t *left = raster + (line * w); - /* Use wmin to only flip horizontally data in place and not complete - * raster-row. */ - uint32_t *right = left + wmin - 1; - - while (left < right) - { - uint32_t temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - return (ret); -} - -/* - * Get an tile-organized image that has - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int gtTileSeparate(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - tileSeparateRoutine put = img->put.separate; - uint32_t col, row, y, rowstoread; - tmsize_t pos; - uint32_t tw, th; - unsigned char *buf = NULL; - unsigned char *p0 = NULL; - unsigned char *p1 = NULL; - unsigned char *p2 = NULL; - unsigned char *pa = NULL; - tmsize_t tilesize; - tmsize_t bufsize; - int32_t fromskew, toskew; - int alpha = img->alpha; - uint32_t nrow; - int ret = 1, flip; - uint16_t colorchannels; - uint32_t this_tw, tocol; - int32_t this_toskew, leftmost_toskew; - int32_t leftmost_fromskew; - uint32_t leftmost_tw; - - /* If the raster is smaller than the image, - * or if there is a col_offset, adapt the samples to be copied per row. */ - uint32_t wmin; - if (0 <= img->col_offset && (uint32_t)img->col_offset < img->width) - { - wmin = TIFFmin(w, img->width - img->col_offset); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Error in gtTileSeparate: column offset %d exceeds " - "image width %d", - img->col_offset, img->width); - return 0; - } - - tilesize = TIFFTileSize(tif); - bufsize = - _TIFFMultiplySSize(tif, alpha ? 4 : 3, tilesize, "gtTileSeparate"); - if (bufsize == 0) - { - return (0); - } - - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) - { - if (((int64_t)tw + w) > INT_MAX) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", - "unsupported tile size (too wide)"); - return (0); - } - y = h - 1; - toskew = -(int32_t)(tw + w); - } - else - { - if (tw > ((int64_t)INT_MAX + w)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", - "unsupported tile size (too wide)"); - return (0); - } - y = 0; - toskew = -(int32_t)(tw - w); - } - - switch (img->photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - colorchannels = 1; - break; - - default: - colorchannels = 3; - break; - } - - if (tw == 0 || th == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "tile width or height is zero"); - return (0); - } - - /* - * Leftmost tile is clipped on left side if col_offset > 0. - */ - leftmost_fromskew = img->col_offset % tw; - leftmost_tw = tw - leftmost_fromskew; - int64_t skew_i64 = (int64_t)toskew + leftmost_fromskew; - if (skew_i64 > INT_MAX || skew_i64 < INT_MIN) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s %" PRId64, "Invalid skew", - skew_i64); - return (0); - } - leftmost_toskew = (int32_t)skew_i64; - for (row = 0; ret != 0 && row < h; row += nrow) - { - rowstoread = th - (row + img->row_offset) % th; - nrow = (row + rowstoread > h ? h - row : rowstoread); - fromskew = leftmost_fromskew; - this_tw = leftmost_tw; - this_toskew = leftmost_toskew; - tocol = 0; - col = img->col_offset; - /* wmin: only write imagewidth if raster is bigger. */ - while (tocol < wmin) - { - if (buf == NULL) - { - if (_TIFFReadTileAndAllocBuffer(tif, (void **)&buf, bufsize, - col, row + img->row_offset, 0, - 0) == (tmsize_t)(-1) && - (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - p0 = buf; - if (colorchannels == 1) - { - p2 = p1 = p0; - pa = (alpha ? (p0 + 3 * tilesize) : NULL); - } - else - { - p1 = p0 + tilesize; - p2 = p1 + tilesize; - pa = (alpha ? (p2 + tilesize) : NULL); - } - } - else if (TIFFReadTile(tif, p0, col, row + img->row_offset, 0, 0) == - (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 && - TIFFReadTile(tif, p1, col, row + img->row_offset, 0, 1) == - (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 && - TIFFReadTile(tif, p2, col, row + img->row_offset, 0, 2) == - (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (alpha && - TIFFReadTile(tif, pa, col, row + img->row_offset, 0, - colorchannels) == (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - - /* For SEPARATE the pos-offset is per sample and should not be - * multiplied by img->samplesperpixel. */ - pos = ((row + img->row_offset) % th) * TIFFTileRowSize(tif) + - (tmsize_t)fromskew; - if (tocol + this_tw > wmin) - { - /* - * Rightmost tile is clipped on right side. - */ - fromskew = tw - (wmin - tocol); - this_tw = tw - fromskew; - this_toskew = toskew + fromskew; - } - tmsize_t roffset = (tmsize_t)y * w + tocol; - (*put)(img, raster + roffset, tocol, y, this_tw, nrow, fromskew, - this_toskew, p0 + pos, p1 + pos, p2 + pos, - (alpha ? (pa + pos) : NULL)); - tocol += this_tw; - col += this_tw; - /* - * After the leftmost tile, tiles are no longer clipped on left - * side. - */ - fromskew = 0; - this_tw = tw; - this_toskew = toskew; - } - - y += ((flip & FLIP_VERTICALLY) ? -(int32_t)nrow : (int32_t)nrow); - } - - if (flip & FLIP_HORIZONTALLY) - { - uint32_t line; - - for (line = 0; line < h; line++) - { - uint32_t *left = raster + (line * w); - /* Use wmin to only flip horizontally data in place and not complete - * raster-row. */ - uint32_t *right = left + wmin - 1; - - while (left < right) - { - uint32_t temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfreeExt(img->tif, buf); - return (ret); -} - -/* - * Get a strip-organized image that has - * PlanarConfiguration contiguous if SamplesPerPixel > 1 - * or - * SamplesPerPixel == 1 - */ -static int gtStripContig(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - tileContigRoutine put = img->put.contig; - uint32_t row, y, nrow, nrowsub, rowstoread; - tmsize_t pos; - unsigned char *buf = NULL; - uint32_t rowsperstrip; - uint16_t subsamplinghor, subsamplingver; - uint32_t imagewidth = img->width; - tmsize_t scanline; - /* fromskew, toskew are the increments within the input image or the raster - * from the end of a line to the start of the next line to read or write. */ - int32_t fromskew, toskew; - int ret = 1, flip; - tmsize_t maxstripsize; - - /* If the raster is smaller than the image, - * or if there is a col_offset, adapt the samples to be copied per row. */ - uint32_t wmin; - if (0 <= img->col_offset && (uint32_t)img->col_offset < imagewidth) - { - wmin = TIFFmin(w, imagewidth - img->col_offset); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Error in gtStripContig: column offset %d exceeds " - "image width %d", - img->col_offset, imagewidth); - return 0; - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, - &subsamplingver); - if (subsamplingver == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Invalid vertical YCbCr subsampling"); - return (0); - } - - maxstripsize = TIFFStripSize(tif); - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) - { - if (w > INT_MAX / 2) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "Width overflow"); - return (0); - } - y = h - 1; - /* Skew back to the raster row before the currently written row - * -> one raster width plus copied image pixels. */ - toskew = -(int32_t)(w + wmin); - } - else - { - y = 0; - /* Skew forward to the end of the raster width of the row currently - * copied. */ - toskew = w - wmin; - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - if (rowsperstrip == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "rowsperstrip is zero"); - return (0); - } - - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += nrow) - { - uint32_t temp; - rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; - nrow = (row + rowstoread > h ? h - row : rowstoread); - nrowsub = nrow; - if ((nrowsub % subsamplingver) != 0) - nrowsub += subsamplingver - nrowsub % subsamplingver; - temp = (row + img->row_offset) % rowsperstrip + nrowsub; - if (scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Integer overflow in gtStripContig"); - return 0; - } - if (_TIFFReadEncodedStripAndAllocBuffer( - tif, TIFFComputeStrip(tif, row + img->row_offset, 0), - (void **)(&buf), maxstripsize, - temp * scanline) == (tmsize_t)(-1) && - (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - - pos = ((row + img->row_offset) % rowsperstrip) * scanline + - ((tmsize_t)img->col_offset * img->samplesperpixel); - tmsize_t roffset = (tmsize_t)y * w; - (*put)(img, raster + roffset, 0, y, wmin, nrow, fromskew, toskew, - buf + pos); - y += ((flip & FLIP_VERTICALLY) ? -(int32_t)nrow : (int32_t)nrow); - } - - if (flip & FLIP_HORIZONTALLY) - { - /* Flips the complete raster matrix horizontally. If raster width is - * larger than image width, data are moved horizontally to the right - * side. - * Use wmin to only flip data in place. */ - uint32_t line; - - for (line = 0; line < h; line++) - { - uint32_t *left = raster + (line * w); - /* Use wmin to only flip horizontally data in place and not complete - * raster-row. */ - uint32_t *right = left + wmin - 1; - - while (left < right) - { - uint32_t temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfreeExt(img->tif, buf); - return (ret); -} - -/* - * Get a strip-organized image with - * SamplesPerPixel > 1 - * PlanarConfiguration separated - * We assume that all such images are RGB. - */ -static int gtStripSeparate(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, - uint32_t h) -{ - TIFF *tif = img->tif; - tileSeparateRoutine put = img->put.separate; - unsigned char *buf = NULL; - unsigned char *p0 = NULL, *p1 = NULL, *p2 = NULL, *pa = NULL; - uint32_t row, y, nrow, rowstoread; - tmsize_t pos; - tmsize_t scanline; - uint32_t rowsperstrip, offset_row; - uint32_t imagewidth = img->width; - tmsize_t stripsize; - tmsize_t bufsize; - int32_t fromskew, toskew; - int alpha = img->alpha; - int ret = 1, flip; - uint16_t colorchannels; - - /* If the raster is smaller than the image, - * or if there is a col_offset, adapt the samples to be copied per row. */ - uint32_t wmin; - if (0 <= img->col_offset && (uint32_t)img->col_offset < imagewidth) - { - wmin = TIFFmin(w, imagewidth - img->col_offset); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Error in gtStripSeparate: column offset %d exceeds " - "image width %d", - img->col_offset, imagewidth); - return 0; - } - - stripsize = TIFFStripSize(tif); - bufsize = - _TIFFMultiplySSize(tif, alpha ? 4 : 3, stripsize, "gtStripSeparate"); - if (bufsize == 0) - { - return (0); - } - - flip = setorientation(img); - if (flip & FLIP_VERTICALLY) - { - if (w > INT_MAX / 2) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "Width overflow"); - return (0); - } - y = h - 1; - /* Skew back to the raster row before the currently written row - * -> one raster width plus one image width. */ - toskew = -(int32_t)(w + wmin); - } - else - { - y = 0; - /* Skew forward to the end of the raster width of the row currently - * written. */ - toskew = w - wmin; - } - - switch (img->photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_PALETTE: - colorchannels = 1; - break; - - default: - colorchannels = 3; - break; - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - if (rowsperstrip == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "rowsperstrip is zero"); - return (0); - } - - scanline = TIFFScanlineSize(tif); - fromskew = (w < imagewidth ? imagewidth - w : 0); - for (row = 0; row < h; row += nrow) - { - uint32_t temp; - rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; - nrow = (row + rowstoread > h ? h - row : rowstoread); - offset_row = row + img->row_offset; - temp = (row + img->row_offset) % rowsperstrip + nrow; - if (scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Integer overflow in gtStripSeparate"); - return 0; - } - if (buf == NULL) - { - if (_TIFFReadEncodedStripAndAllocBuffer( - tif, TIFFComputeStrip(tif, offset_row, 0), (void **)&buf, - bufsize, temp * scanline) == (tmsize_t)(-1) && - (buf == NULL || img->stoponerr)) - { - ret = 0; - break; - } - p0 = buf; - if (colorchannels == 1) - { - p2 = p1 = p0; - pa = (alpha ? (p0 + 3 * stripsize) : NULL); - } - else - { - p1 = p0 + stripsize; - p2 = p1 + stripsize; - pa = (alpha ? (p2 + stripsize) : NULL); - } - } - else if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), - p0, temp * scanline) == (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 && - TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1), p1, - temp * scanline) == (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (colorchannels > 1 && - TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2), p2, - temp * scanline) == (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - if (alpha) - { - if (TIFFReadEncodedStrip( - tif, TIFFComputeStrip(tif, offset_row, colorchannels), pa, - temp * scanline) == (tmsize_t)(-1) && - img->stoponerr) - { - ret = 0; - break; - } - } - - /* For SEPARATE the pos-offset is per sample and should not be - * multiplied by img->samplesperpixel. */ - pos = ((row + img->row_offset) % rowsperstrip) * scanline + - (tmsize_t)img->col_offset; - tmsize_t roffset = (tmsize_t)y * w; - (*put)(img, raster + roffset, 0, y, wmin, nrow, fromskew, toskew, - p0 + pos, p1 + pos, p2 + pos, (alpha ? (pa + pos) : NULL)); - y += ((flip & FLIP_VERTICALLY) ? -(int32_t)nrow : (int32_t)nrow); - } - - if (flip & FLIP_HORIZONTALLY) - { - uint32_t line; - - for (line = 0; line < h; line++) - { - uint32_t *left = raster + (line * w); - /* Use wmin to only flip horizontally data in place and not complete - * raster-row. */ - uint32_t *right = left + wmin - 1; - - while (left < right) - { - uint32_t temp = *left; - *left = *right; - *right = temp; - left++; - right--; - } - } - } - - _TIFFfreeExt(img->tif, buf); - return (ret); -} - -/* - * The following routines move decoded data returned - * from the TIFF library into rasters filled with packed - * ABGR pixels (i.e. suitable for passing to lrecwrite.) - * - * The routines have been created according to the most - * important cases and optimized. PickContigCase and - * PickSeparateCase analyze the parameters and select - * the appropriate "get" and "put" routine to use. - */ -#define REPEAT8(op) \ - REPEAT4(op); \ - REPEAT4(op) -#define REPEAT4(op) \ - REPEAT2(op); \ - REPEAT2(op) -#define REPEAT2(op) \ - op; \ - op -#define CASE8(x, op) \ - switch (x) \ - { \ - case 7: \ - op; /*-fallthrough*/ \ - case 6: \ - op; /*-fallthrough*/ \ - case 5: \ - op; /*-fallthrough*/ \ - case 4: \ - op; /*-fallthrough*/ \ - case 3: \ - op; /*-fallthrough*/ \ - case 2: \ - op; /*-fallthrough*/ \ - case 1: \ - op; \ - } -#define CASE4(x, op) \ - switch (x) \ - { \ - case 3: \ - op; /*-fallthrough*/ \ - case 2: \ - op; /*-fallthrough*/ \ - case 1: \ - op; \ - } -#define NOP - -#define UNROLL8(w, op1, op2) \ - { \ - uint32_t _x; \ - for (_x = w; _x >= 8; _x -= 8) \ - { \ - op1; \ - REPEAT8(op2); \ - } \ - if (_x > 0) \ - { \ - op1; \ - CASE8(_x, op2); \ - } \ - } -#define UNROLL4(w, op1, op2) \ - { \ - uint32_t _x; \ - for (_x = w; _x >= 4; _x -= 4) \ - { \ - op1; \ - REPEAT4(op2); \ - } \ - if (_x > 0) \ - { \ - op1; \ - CASE4(_x, op2); \ - } \ - } -#define UNROLL2(w, op1, op2) \ - { \ - uint32_t _x; \ - for (_x = w; _x >= 2; _x -= 2) \ - { \ - op1; \ - REPEAT2(op2); \ - } \ - if (_x) \ - { \ - op1; \ - op2; \ - } \ - } - -#define SKEW(r, g, b, skew) \ - { \ - r += skew; \ - g += skew; \ - b += skew; \ - } -#define SKEW4(r, g, b, a, skew) \ - { \ - r += skew; \ - g += skew; \ - b += skew; \ - a += skew; \ - } - -#define A1 (((uint32_t)0xffL) << 24) -#define PACK(r, g, b) \ - ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16) | A1) -#define PACK4(r, g, b, a) \ - ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16) | \ - ((uint32_t)(a) << 24)) -#define W2B(v) (((v) >> 8) & 0xff) -/* TODO: PACKW should have be made redundant in favor of Bitdepth16To8 LUT */ -#define PACKW(r, g, b) \ - ((uint32_t)W2B(r) | ((uint32_t)W2B(g) << 8) | ((uint32_t)W2B(b) << 16) | A1) -#define PACKW4(r, g, b, a) \ - ((uint32_t)W2B(r) | ((uint32_t)W2B(g) << 8) | ((uint32_t)W2B(b) << 16) | \ - ((uint32_t)W2B(a) << 24)) - -#define DECLAREContigPutFunc(name) \ - static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \ - uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \ - unsigned char *pp) - -/* - * 8-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put8bitcmaptile) -{ - uint32_t **PALmap = img->PALmap; - int samplesperpixel = img->samplesperpixel; - - (void)y; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - *cp++ = PALmap[*pp][0]; - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 4-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put4bitcmaptile) -{ - uint32_t **PALmap = img->PALmap; - - (void)x; - (void)y; - fromskew /= 2; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 2-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put2bitcmaptile) -{ - uint32_t **PALmap = img->PALmap; - - (void)x; - (void)y; - fromskew /= 4; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL4(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 1-bit palette => colormap/RGB - */ -DECLAREContigPutFunc(put1bitcmaptile) -{ - uint32_t **PALmap = img->PALmap; - - (void)x; - (void)y; - fromskew /= 8; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL8(w, bw = PALmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(putgreytile) -{ - int samplesperpixel = img->samplesperpixel; - uint32_t **BWmap = img->BWmap; - - (void)y; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - *cp++ = BWmap[*pp][0]; - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit greyscale with associated alpha => colormap/RGBA - */ -DECLAREContigPutFunc(putagreytile) -{ - int samplesperpixel = img->samplesperpixel; - uint32_t **BWmap = img->BWmap; - - (void)y; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - *cp++ = BWmap[*pp][0] & ((uint32_t) * (pp + 1) << 24 | ~A1); - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 16-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put16bitbwtile) -{ - int samplesperpixel = img->samplesperpixel; - uint32_t **BWmap = img->BWmap; - - (void)y; - for (; h > 0; --h) - { - uint16_t *wp = (uint16_t *)pp; - - for (x = w; x > 0; --x) - { - /* use high order byte of 16bit value */ - - *cp++ = BWmap[*wp >> 8][0]; - pp += 2 * samplesperpixel; - wp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 1-bit bilevel => colormap/RGB - */ -DECLAREContigPutFunc(put1bitbwtile) -{ - uint32_t **BWmap = img->BWmap; - - (void)x; - (void)y; - fromskew /= 8; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 2-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put2bitbwtile) -{ - uint32_t **BWmap = img->BWmap; - - (void)x; - (void)y; - fromskew /= 4; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 4-bit greyscale => colormap/RGB - */ -DECLAREContigPutFunc(put4bitbwtile) -{ - uint32_t **BWmap = img->BWmap; - - (void)x; - (void)y; - fromskew /= 2; - for (; h > 0; --h) - { - uint32_t *bw; - UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples, no Map => RGB - */ -DECLAREContigPutFunc(putRGBcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - - (void)x; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - UNROLL8(w, NOP, *cp++ = PACK(pp[0], pp[1], pp[2]); - pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples => RGBA w/ associated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBAAcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - - (void)x; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - UNROLL8(w, NOP, *cp++ = PACK4(pp[0], pp[1], pp[2], pp[3]); - pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed samples => RGBA w/ unassociated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBUAcontig8bittile) -{ - int samplesperpixel = img->samplesperpixel; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - uint32_t r, g, b, a; - uint8_t *m; - for (x = w; x > 0; --x) - { - a = pp[3]; - m = img->UaToAa + ((size_t)a << 8); - r = m[pp[0]]; - g = m[pp[1]]; - b = m[pp[2]]; - *cp++ = PACK4(r, g, b, a); - pp += samplesperpixel; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 16-bit packed samples => RGB - */ -DECLAREContigPutFunc(putRGBcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16_t *wp = (uint16_t *)pp; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - *cp++ = PACK(img->Bitdepth16To8[wp[0]], img->Bitdepth16To8[wp[1]], - img->Bitdepth16To8[wp[2]]); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 16-bit packed samples => RGBA w/ associated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBAAcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16_t *wp = (uint16_t *)pp; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - *cp++ = PACK4(img->Bitdepth16To8[wp[0]], img->Bitdepth16To8[wp[1]], - img->Bitdepth16To8[wp[2]], img->Bitdepth16To8[wp[3]]); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 16-bit packed samples => RGBA w/ unassociated alpha - * (known to have Map == NULL) - */ -DECLAREContigPutFunc(putRGBUAcontig16bittile) -{ - int samplesperpixel = img->samplesperpixel; - uint16_t *wp = (uint16_t *)pp; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - uint32_t r, g, b, a; - uint8_t *m; - for (x = w; x > 0; --x) - { - a = img->Bitdepth16To8[wp[3]]; - m = img->UaToAa + ((size_t)a << 8); - r = m[img->Bitdepth16To8[wp[0]]]; - g = m[img->Bitdepth16To8[wp[1]]]; - b = m[img->Bitdepth16To8[wp[2]]]; - *cp++ = PACK4(r, g, b, a); - wp += samplesperpixel; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * 8-bit packed CMYK samples w/o Map => RGB - * - * NB: The conversion of CMYK->RGB is *very* crude. - */ -DECLAREContigPutFunc(putRGBcontig8bitCMYKtile) -{ - int samplesperpixel = img->samplesperpixel; - uint16_t r, g, b, k; - - (void)x; - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - UNROLL8(w, NOP, k = 255 - pp[3]; r = (k * (255 - pp[0])) / 255; - g = (k * (255 - pp[1])) / 255; b = (k * (255 - pp[2])) / 255; - *cp++ = PACK(r, g, b); pp += samplesperpixel); - cp += toskew; - pp += fromskew; - } -} - -/* - * 8-bit packed CMYK samples w/Map => RGB - * - * NB: The conversion of CMYK->RGB is *very* crude. - */ -DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile) -{ - int samplesperpixel = img->samplesperpixel; - TIFFRGBValue *Map = img->Map; - uint16_t r, g, b, k; - - (void)y; - fromskew *= samplesperpixel; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - k = 255 - pp[3]; - r = (k * (255 - pp[0])) / 255; - g = (k * (255 - pp[1])) / 255; - b = (k * (255 - pp[2])) / 255; - *cp++ = PACK(Map[r], Map[g], Map[b]); - pp += samplesperpixel; - } - pp += fromskew; - cp += toskew; - } -} - -#define DECLARESepPutFunc(name) \ - static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \ - uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \ - unsigned char *r, unsigned char *g, unsigned char *b, \ - unsigned char *a) - -/* - * 8-bit unpacked samples => RGB - */ -DECLARESepPutFunc(putRGBseparate8bittile) -{ - (void)img; - (void)x; - (void)y; - (void)a; - for (; h > 0; --h) - { - UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++)); - SKEW(r, g, b, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked samples => RGBA w/ associated alpha - */ -DECLARESepPutFunc(putRGBAAseparate8bittile) -{ - (void)img; - (void)x; - (void)y; - for (; h > 0; --h) - { - UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++)); - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked CMYK samples => RGBA - */ -DECLARESepPutFunc(putCMYKseparate8bittile) -{ - (void)img; - (void)y; - for (; h > 0; --h) - { - uint32_t rv, gv, bv, kv; - for (x = w; x > 0; --x) - { - kv = 255 - *a++; - rv = (kv * (255 - *r++)) / 255; - gv = (kv * (255 - *g++)) / 255; - bv = (kv * (255 - *b++)) / 255; - *cp++ = PACK4(rv, gv, bv, 255); - } - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 8-bit unpacked samples => RGBA w/ unassociated alpha - */ -DECLARESepPutFunc(putRGBUAseparate8bittile) -{ - (void)img; - (void)y; - for (; h > 0; --h) - { - uint32_t rv, gv, bv, av; - uint8_t *m; - for (x = w; x > 0; --x) - { - av = *a++; - m = img->UaToAa + ((size_t)av << 8); - rv = m[*r++]; - gv = m[*g++]; - bv = m[*b++]; - *cp++ = PACK4(rv, gv, bv, av); - } - SKEW4(r, g, b, a, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGB - */ -DECLARESepPutFunc(putRGBseparate16bittile) -{ - uint16_t *wr = (uint16_t *)r; - uint16_t *wg = (uint16_t *)g; - uint16_t *wb = (uint16_t *)b; - (void)img; - (void)y; - (void)a; - for (; h > 0; --h) - { - for (x = 0; x < w; x++) - *cp++ = PACK(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], - img->Bitdepth16To8[*wb++]); - SKEW(wr, wg, wb, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGBA w/ associated alpha - */ -DECLARESepPutFunc(putRGBAAseparate16bittile) -{ - uint16_t *wr = (uint16_t *)r; - uint16_t *wg = (uint16_t *)g; - uint16_t *wb = (uint16_t *)b; - uint16_t *wa = (uint16_t *)a; - (void)img; - (void)y; - for (; h > 0; --h) - { - for (x = 0; x < w; x++) - *cp++ = PACK4(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], - img->Bitdepth16To8[*wb++], img->Bitdepth16To8[*wa++]); - SKEW4(wr, wg, wb, wa, fromskew); - cp += toskew; - } -} - -/* - * 16-bit unpacked samples => RGBA w/ unassociated alpha - */ -DECLARESepPutFunc(putRGBUAseparate16bittile) -{ - uint16_t *wr = (uint16_t *)r; - uint16_t *wg = (uint16_t *)g; - uint16_t *wb = (uint16_t *)b; - uint16_t *wa = (uint16_t *)a; - (void)img; - (void)y; - for (; h > 0; --h) - { - uint32_t r2, g2, b2, a2; - uint8_t *m; - for (x = w; x > 0; --x) - { - a2 = img->Bitdepth16To8[*wa++]; - m = img->UaToAa + ((size_t)a2 << 8); - r2 = m[img->Bitdepth16To8[*wr++]]; - g2 = m[img->Bitdepth16To8[*wg++]]; - b2 = m[img->Bitdepth16To8[*wb++]]; - *cp++ = PACK4(r2, g2, b2, a2); - } - SKEW4(wr, wg, wb, wa, fromskew); - cp += toskew; - } -} - -/* - * 8-bit packed CIE L*a*b 1976 samples => RGB - */ -DECLAREContigPutFunc(putcontig8bitCIELab8) -{ - float X, Y, Z; - uint32_t r, g, b; - (void)y; - fromskew *= 3; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - TIFFCIELabToXYZ(img->cielab, (unsigned char)pp[0], - (signed char)pp[1], (signed char)pp[2], &X, &Y, &Z); - TIFFXYZToRGB(img->cielab, X, Y, Z, &r, &g, &b); - *cp++ = PACK(r, g, b); - pp += 3; - } - cp += toskew; - pp += fromskew; - } -} - -/* - * 16-bit packed CIE L*a*b 1976 samples => RGB - */ -DECLAREContigPutFunc(putcontig8bitCIELab16) -{ - float X, Y, Z; - uint32_t r, g, b; - uint16_t *wp = (uint16_t *)pp; - (void)y; - fromskew *= 3; - for (; h > 0; --h) - { - for (x = w; x > 0; --x) - { - TIFFCIELab16ToXYZ(img->cielab, (uint16_t)wp[0], (int16_t)wp[1], - (int16_t)wp[2], &X, &Y, &Z); - TIFFXYZToRGB(img->cielab, X, Y, Z, &r, &g, &b); - *cp++ = PACK(r, g, b); - wp += 3; - } - cp += toskew; - wp += fromskew; - } -} - -/* - * YCbCr -> RGB conversion and packing routines. - */ - -#define YCbCrtoRGB(dst, Y) \ - { \ - uint32_t r, g, b; \ - TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b); \ - dst = PACK(r, g, b); \ - } - -/* - * 8-bit packed YCbCr samples w/ 4,4 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr44tile) -{ - uint32_t *cp1 = cp + w + toskew; - uint32_t *cp2 = cp1 + w + toskew; - uint32_t *cp3 = cp2 + w + toskew; - int32_t incr = 3 * w + 4 * toskew; - - (void)y; - /* adjust fromskew */ - fromskew = (fromskew / 4) * (4 * 2 + 2); - if ((h & 3) == 0 && (w & 3) == 0) - { - for (; h >= 4; h -= 4) - { - x = w >> 2; - do - { - int32_t Cb = pp[16]; - int32_t Cr = pp[17]; - - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - YCbCrtoRGB(cp[2], pp[2]); - YCbCrtoRGB(cp[3], pp[3]); - YCbCrtoRGB(cp1[0], pp[4]); - YCbCrtoRGB(cp1[1], pp[5]); - YCbCrtoRGB(cp1[2], pp[6]); - YCbCrtoRGB(cp1[3], pp[7]); - YCbCrtoRGB(cp2[0], pp[8]); - YCbCrtoRGB(cp2[1], pp[9]); - YCbCrtoRGB(cp2[2], pp[10]); - YCbCrtoRGB(cp2[3], pp[11]); - YCbCrtoRGB(cp3[0], pp[12]); - YCbCrtoRGB(cp3[1], pp[13]); - YCbCrtoRGB(cp3[2], pp[14]); - YCbCrtoRGB(cp3[3], pp[15]); - - cp += 4; - cp1 += 4; - cp2 += 4; - cp3 += 4; - pp += 18; - } while (--x); - cp += incr; - cp1 += incr; - cp2 += incr; - cp3 += incr; - pp += fromskew; - } - } - else - { - while (h > 0) - { - for (x = w; x > 0;) - { - int32_t Cb = pp[16]; - int32_t Cr = pp[17]; - switch (x) - { - default: - switch (h) - { - default: - YCbCrtoRGB(cp3[3], pp[15]); /* FALLTHROUGH */ - case 3: - YCbCrtoRGB(cp2[3], pp[11]); /* FALLTHROUGH */ - case 2: - YCbCrtoRGB(cp1[3], pp[7]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[3], pp[3]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 3: - switch (h) - { - default: - YCbCrtoRGB(cp3[2], pp[14]); /* FALLTHROUGH */ - case 3: - YCbCrtoRGB(cp2[2], pp[10]); /* FALLTHROUGH */ - case 2: - YCbCrtoRGB(cp1[2], pp[6]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[2], pp[2]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 2: - switch (h) - { - default: - YCbCrtoRGB(cp3[1], pp[13]); /* FALLTHROUGH */ - case 3: - YCbCrtoRGB(cp2[1], pp[9]); /* FALLTHROUGH */ - case 2: - YCbCrtoRGB(cp1[1], pp[5]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[1], pp[1]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 1: - switch (h) - { - default: - YCbCrtoRGB(cp3[0], pp[12]); /* FALLTHROUGH */ - case 3: - YCbCrtoRGB(cp2[0], pp[8]); /* FALLTHROUGH */ - case 2: - YCbCrtoRGB(cp1[0], pp[4]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[0], pp[0]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - } - if (x < 4) - { - cp += x; - cp1 += x; - cp2 += x; - cp3 += x; - x = 0; - } - else - { - cp += 4; - cp1 += 4; - cp2 += 4; - cp3 += 4; - x -= 4; - } - pp += 18; - } - if (h <= 4) - break; - h -= 4; - cp += incr; - cp1 += incr; - cp2 += incr; - cp3 += incr; - pp += fromskew; - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 4,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr42tile) -{ - uint32_t *cp1 = cp + w + toskew; - int32_t incr = 2 * toskew + w; - - (void)y; - fromskew = (fromskew / 4) * (4 * 2 + 2); - if ((w & 3) == 0 && (h & 1) == 0) - { - for (; h >= 2; h -= 2) - { - x = w >> 2; - do - { - int32_t Cb = pp[8]; - int32_t Cr = pp[9]; - - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - YCbCrtoRGB(cp[2], pp[2]); - YCbCrtoRGB(cp[3], pp[3]); - YCbCrtoRGB(cp1[0], pp[4]); - YCbCrtoRGB(cp1[1], pp[5]); - YCbCrtoRGB(cp1[2], pp[6]); - YCbCrtoRGB(cp1[3], pp[7]); - - cp += 4; - cp1 += 4; - pp += 10; - } while (--x); - cp += incr; - cp1 += incr; - pp += fromskew; - } - } - else - { - while (h > 0) - { - for (x = w; x > 0;) - { - int32_t Cb = pp[8]; - int32_t Cr = pp[9]; - switch (x) - { - default: - switch (h) - { - default: - YCbCrtoRGB(cp1[3], pp[7]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[3], pp[3]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 3: - switch (h) - { - default: - YCbCrtoRGB(cp1[2], pp[6]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[2], pp[2]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 2: - switch (h) - { - default: - YCbCrtoRGB(cp1[1], pp[5]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[1], pp[1]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - case 1: - switch (h) - { - default: - YCbCrtoRGB(cp1[0], pp[4]); /* FALLTHROUGH */ - case 1: - YCbCrtoRGB(cp[0], pp[0]); /* FALLTHROUGH */ - } /* FALLTHROUGH */ - } - if (x < 4) - { - cp += x; - cp1 += x; - x = 0; - } - else - { - cp += 4; - cp1 += 4; - x -= 4; - } - pp += 10; - } - if (h <= 2) - break; - h -= 2; - cp += incr; - cp1 += incr; - pp += fromskew; - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 4,1 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr41tile) -{ - (void)y; - fromskew = (fromskew / 4) * (4 * 1 + 2); - do - { - x = w >> 2; - while (x > 0) - { - int32_t Cb = pp[4]; - int32_t Cr = pp[5]; - - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - YCbCrtoRGB(cp[2], pp[2]); - YCbCrtoRGB(cp[3], pp[3]); - - cp += 4; - pp += 6; - x--; - } - - if ((w & 3) != 0) - { - int32_t Cb = pp[4]; - int32_t Cr = pp[5]; - - switch ((w & 3)) - { - case 3: - YCbCrtoRGB(cp[2], pp[2]); /*-fallthrough*/ - case 2: - YCbCrtoRGB(cp[1], pp[1]); /*-fallthrough*/ - case 1: - YCbCrtoRGB(cp[0], pp[0]); /*-fallthrough*/ - case 0: - break; - } - - cp += (w & 3); - pp += 6; - } - - cp += toskew; - pp += fromskew; - } while (--h); -} - -/* - * 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr22tile) -{ - uint32_t *cp2; - int32_t incr = 2 * toskew + w; - (void)y; - fromskew = (fromskew / 2) * (2 * 2 + 2); - cp2 = cp + w + toskew; - while (h >= 2) - { - x = w; - while (x >= 2) - { - uint32_t Cb = pp[4]; - uint32_t Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - YCbCrtoRGB(cp2[0], pp[2]); - YCbCrtoRGB(cp2[1], pp[3]); - cp += 2; - cp2 += 2; - pp += 6; - x -= 2; - } - if (x == 1) - { - uint32_t Cb = pp[4]; - uint32_t Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp2[0], pp[2]); - cp++; - cp2++; - pp += 6; - } - cp += incr; - cp2 += incr; - pp += fromskew; - h -= 2; - } - if (h == 1) - { - x = w; - while (x >= 2) - { - uint32_t Cb = pp[4]; - uint32_t Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - cp += 2; - cp2 += 2; - pp += 6; - x -= 2; - } - if (x == 1) - { - uint32_t Cb = pp[4]; - uint32_t Cr = pp[5]; - YCbCrtoRGB(cp[0], pp[0]); - } - } -} - -/* - * 8-bit packed YCbCr samples w/ 2,1 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr21tile) -{ - (void)y; - fromskew = (fromskew / 2) * (2 * 1 + 2); - do - { - x = w >> 1; - while (x > 0) - { - int32_t Cb = pp[2]; - int32_t Cr = pp[3]; - - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp[1], pp[1]); - - cp += 2; - pp += 4; - x--; - } - - if ((w & 1) != 0) - { - int32_t Cb = pp[2]; - int32_t Cr = pp[3]; - - YCbCrtoRGB(cp[0], pp[0]); - - cp += 1; - pp += 4; - } - - cp += toskew; - pp += fromskew; - } while (--h); -} - -/* - * 8-bit packed YCbCr samples w/ 1,2 subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr12tile) -{ - uint32_t *cp2; - int32_t incr = 2 * toskew + w; - (void)y; - fromskew = (fromskew / 1) * (1 * 2 + 2); - cp2 = cp + w + toskew; - while (h >= 2) - { - x = w; - do - { - uint32_t Cb = pp[2]; - uint32_t Cr = pp[3]; - YCbCrtoRGB(cp[0], pp[0]); - YCbCrtoRGB(cp2[0], pp[1]); - cp++; - cp2++; - pp += 4; - } while (--x); - cp += incr; - cp2 += incr; - pp += fromskew; - h -= 2; - } - if (h == 1) - { - x = w; - do - { - uint32_t Cb = pp[2]; - uint32_t Cr = pp[3]; - YCbCrtoRGB(cp[0], pp[0]); - cp++; - pp += 4; - } while (--x); - } -} - -/* - * 8-bit packed YCbCr samples w/ no subsampling => RGB - */ -DECLAREContigPutFunc(putcontig8bitYCbCr11tile) -{ - (void)y; - fromskew = (fromskew / 1) * (1 * 1 + 2); - do - { - x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */ - do - { - int32_t Cb = pp[1]; - int32_t Cr = pp[2]; - - YCbCrtoRGB(*cp++, pp[0]); - - pp += 3; - } while (--x); - cp += toskew; - pp += fromskew; - } while (--h); -} - -/* - * 8-bit packed YCbCr samples w/ no subsampling => RGB - */ -DECLARESepPutFunc(putseparate8bitYCbCr11tile) -{ - (void)y; - (void)a; - /* TODO: naming of input vars is still off, change obfuscating declaration - * inside define, or resolve obfuscation */ - for (; h > 0; --h) - { - x = w; - do - { - uint32_t dr, dg, db; - TIFFYCbCrtoRGB(img->ycbcr, *r++, *g++, *b++, &dr, &dg, &db); - *cp++ = PACK(dr, dg, db); - } while (--x); - SKEW(r, g, b, fromskew); - cp += toskew; - } -} -#undef YCbCrtoRGB - -static int isInRefBlackWhiteRange(float f) -{ - return f > (float)(-0x7FFFFFFF + 128) && f < (float)0x7FFFFFFF; -} - -static int initYCbCrConversion(TIFFRGBAImage *img) -{ - static const char module[] = "initYCbCrConversion"; - - float *luma, *refBlackWhite; - - if (img->ycbcr == NULL) - { - img->ycbcr = (TIFFYCbCrToRGB *)_TIFFmallocExt( - img->tif, TIFFroundup_32(sizeof(TIFFYCbCrToRGB), sizeof(long)) + - 4 * 256 * sizeof(TIFFRGBValue) + - 2 * 256 * sizeof(int) + 3 * 256 * sizeof(int32_t)); - if (img->ycbcr == NULL) - { - TIFFErrorExtR(img->tif, module, - "No space for YCbCr->RGB conversion state"); - return (0); - } - } - - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); - TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE, - &refBlackWhite); - - /* Do some validation to avoid later issues. Detect NaN for now */ - /* and also if lumaGreen is zero since we divide by it later */ - if (luma[0] != luma[0] || luma[1] != luma[1] || luma[1] == 0.0 || - luma[2] != luma[2]) - { - TIFFErrorExtR(img->tif, module, - "Invalid values for YCbCrCoefficients tag"); - return (0); - } - - if (!isInRefBlackWhiteRange(refBlackWhite[0]) || - !isInRefBlackWhiteRange(refBlackWhite[1]) || - !isInRefBlackWhiteRange(refBlackWhite[2]) || - !isInRefBlackWhiteRange(refBlackWhite[3]) || - !isInRefBlackWhiteRange(refBlackWhite[4]) || - !isInRefBlackWhiteRange(refBlackWhite[5])) - { - TIFFErrorExtR(img->tif, module, - "Invalid values for ReferenceBlackWhite tag"); - return (0); - } - - if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0) - return (0); - return (1); -} - -static tileContigRoutine initCIELabConversion(TIFFRGBAImage *img) -{ - static const char module[] = "initCIELabConversion"; - - float *whitePoint; - float refWhite[3]; - - TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); - if (whitePoint[1] == 0.0f) - { - TIFFErrorExtR(img->tif, module, "Invalid value for WhitePoint tag."); - return NULL; - } - - if (!img->cielab) - { - img->cielab = (TIFFCIELabToRGB *)_TIFFmallocExt( - img->tif, sizeof(TIFFCIELabToRGB)); - if (!img->cielab) - { - TIFFErrorExtR(img->tif, module, - "No space for CIE L*a*b*->RGB conversion state."); - return NULL; - } - } - - refWhite[1] = 100.0F; - refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; - refWhite[2] = - (1.0F - whitePoint[0] - whitePoint[1]) / whitePoint[1] * refWhite[1]; - if (TIFFCIELabToRGBInit(img->cielab, &display_sRGB, refWhite) < 0) - { - TIFFErrorExtR(img->tif, module, - "Failed to initialize CIE L*a*b*->RGB conversion state."); - _TIFFfreeExt(img->tif, img->cielab); - return NULL; - } - - if (img->bitspersample == 8) - return putcontig8bitCIELab8; - else if (img->bitspersample == 16) - return putcontig8bitCIELab16; - return NULL; -} - -/* - * Greyscale images with less than 8 bits/sample are handled - * with a table to avoid lots of shifts and masks. The table - * is setup so that put*bwtile (below) can retrieve 8/bitspersample - * pixel values simply by indexing into the table with one - * number. - */ -static int makebwmap(TIFFRGBAImage *img) -{ - TIFFRGBValue *Map = img->Map; - int bitspersample = img->bitspersample; - int nsamples = 8 / bitspersample; - int i; - uint32_t *p; - - if (nsamples == 0) - nsamples = 1; - - img->BWmap = (uint32_t **)_TIFFmallocExt( - img->tif, - 256 * sizeof(uint32_t *) + (256 * nsamples * sizeof(uint32_t))); - if (img->BWmap == NULL) - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "No space for B&W mapping table"); - return (0); - } - p = (uint32_t *)(img->BWmap + 256); - for (i = 0; i < 256; i++) - { - TIFFRGBValue c; - img->BWmap[i] = p; - switch (bitspersample) - { -#define GREY(x) \ - c = Map[x]; \ - *p++ = PACK(c, c, c); - case 1: - GREY(i >> 7); - GREY((i >> 6) & 1); - GREY((i >> 5) & 1); - GREY((i >> 4) & 1); - GREY((i >> 3) & 1); - GREY((i >> 2) & 1); - GREY((i >> 1) & 1); - GREY(i & 1); - break; - case 2: - GREY(i >> 6); - GREY((i >> 4) & 3); - GREY((i >> 2) & 3); - GREY(i & 3); - break; - case 4: - GREY(i >> 4); - GREY(i & 0xf); - break; - case 8: - case 16: - GREY(i); - break; - } -#undef GREY - } - return (1); -} - -/* - * Construct a mapping table to convert from the range - * of the data samples to [0,255] --for display. This - * process also handles inverting B&W images when needed. - */ -static int setupMap(TIFFRGBAImage *img) -{ - int32_t x, range; - - range = (int32_t)((1L << img->bitspersample) - 1); - - /* treat 16 bit the same as eight bit */ - if (img->bitspersample == 16) - range = (int32_t)255; - - img->Map = (TIFFRGBValue *)_TIFFmallocExt( - img->tif, (range + 1) * sizeof(TIFFRGBValue)); - if (img->Map == NULL) - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "No space for photometric conversion table"); - return (0); - } - if (img->photometric == PHOTOMETRIC_MINISWHITE) - { - for (x = 0; x <= range; x++) - img->Map[x] = (TIFFRGBValue)(((range - x) * 255) / range); - } - else - { - for (x = 0; x <= range; x++) - img->Map[x] = (TIFFRGBValue)((x * 255) / range); - } - if (img->bitspersample <= 16 && - (img->photometric == PHOTOMETRIC_MINISBLACK || - img->photometric == PHOTOMETRIC_MINISWHITE)) - { - /* - * Use photometric mapping table to construct - * unpacking tables for samples <= 8 bits. - */ - if (!makebwmap(img)) - return (0); - /* no longer need Map, free it */ - _TIFFfreeExt(img->tif, img->Map); - img->Map = NULL; - } - return (1); -} - -static int checkcmap(TIFFRGBAImage *img) -{ - uint16_t *r = img->redcmap; - uint16_t *g = img->greencmap; - uint16_t *b = img->bluecmap; - long n = 1L << img->bitspersample; - - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - return (8); -} - -static void cvtcmap(TIFFRGBAImage *img) -{ - uint16_t *r = img->redcmap; - uint16_t *g = img->greencmap; - uint16_t *b = img->bluecmap; - long i; - - for (i = (1L << img->bitspersample) - 1; i >= 0; i--) - { -#define CVT(x) ((uint16_t)((x) >> 8)) - r[i] = CVT(r[i]); - g[i] = CVT(g[i]); - b[i] = CVT(b[i]); -#undef CVT - } -} - -/* - * Palette images with <= 8 bits/sample are handled - * with a table to avoid lots of shifts and masks. The table - * is setup so that put*cmaptile (below) can retrieve 8/bitspersample - * pixel values simply by indexing into the table with one - * number. - */ -static int makecmap(TIFFRGBAImage *img) -{ - int bitspersample = img->bitspersample; - int nsamples = 8 / bitspersample; - uint16_t *r = img->redcmap; - uint16_t *g = img->greencmap; - uint16_t *b = img->bluecmap; - uint32_t *p; - int i; - - img->PALmap = (uint32_t **)_TIFFmallocExt( - img->tif, - 256 * sizeof(uint32_t *) + (256 * nsamples * sizeof(uint32_t))); - if (img->PALmap == NULL) - { - TIFFErrorExtR(img->tif, TIFFFileName(img->tif), - "No space for Palette mapping table"); - return (0); - } - p = (uint32_t *)(img->PALmap + 256); - for (i = 0; i < 256; i++) - { - TIFFRGBValue c; - img->PALmap[i] = p; -#define CMAP(x) \ - c = (TIFFRGBValue)x; \ - *p++ = PACK(r[c] & 0xff, g[c] & 0xff, b[c] & 0xff); - switch (bitspersample) - { - case 1: - CMAP(i >> 7); - CMAP((i >> 6) & 1); - CMAP((i >> 5) & 1); - CMAP((i >> 4) & 1); - CMAP((i >> 3) & 1); - CMAP((i >> 2) & 1); - CMAP((i >> 1) & 1); - CMAP(i & 1); - break; - case 2: - CMAP(i >> 6); - CMAP((i >> 4) & 3); - CMAP((i >> 2) & 3); - CMAP(i & 3); - break; - case 4: - CMAP(i >> 4); - CMAP(i & 0xf); - break; - case 8: - CMAP(i); - break; - } -#undef CMAP - } - return (1); -} - -/* - * Construct any mapping table used - * by the associated put routine. - */ -static int buildMap(TIFFRGBAImage *img) -{ - switch (img->photometric) - { - case PHOTOMETRIC_RGB: - case PHOTOMETRIC_YCBCR: - case PHOTOMETRIC_SEPARATED: - if (img->bitspersample == 8) - break; - /* fall through... */ - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_MINISWHITE: - if (!setupMap(img)) - return (0); - break; - case PHOTOMETRIC_PALETTE: - /* - * Convert 16-bit colormap to 8-bit (unless it looks - * like an old-style 8-bit colormap). - */ - if (checkcmap(img) == 16) - cvtcmap(img); - else - TIFFWarningExtR(img->tif, TIFFFileName(img->tif), - "Assuming 8-bit colormap"); - /* - * Use mapping table and colormap to construct - * unpacking tables for samples < 8 bits. - */ - if (img->bitspersample <= 8 && !makecmap(img)) - return (0); - break; - } - return (1); -} - -/* - * Select the appropriate conversion routine for packed data. - */ -static int PickContigCase(TIFFRGBAImage *img) -{ - img->get = TIFFIsTiled(img->tif) ? gtTileContig : gtStripContig; - img->put.contig = NULL; - switch (img->photometric) - { - case PHOTOMETRIC_RGB: - switch (img->bitspersample) - { - case 8: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA && - img->samplesperpixel >= 4) - img->put.contig = putRGBAAcontig8bittile; - else if (img->alpha == EXTRASAMPLE_UNASSALPHA && - img->samplesperpixel >= 4) - { - if (BuildMapUaToAa(img)) - img->put.contig = putRGBUAcontig8bittile; - } - else if (img->samplesperpixel >= 3) - img->put.contig = putRGBcontig8bittile; - break; - case 16: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA && - img->samplesperpixel >= 4) - { - if (BuildMapBitdepth16To8(img)) - img->put.contig = putRGBAAcontig16bittile; - } - else if (img->alpha == EXTRASAMPLE_UNASSALPHA && - img->samplesperpixel >= 4) - { - if (BuildMapBitdepth16To8(img) && BuildMapUaToAa(img)) - img->put.contig = putRGBUAcontig16bittile; - } - else if (img->samplesperpixel >= 3) - { - if (BuildMapBitdepth16To8(img)) - img->put.contig = putRGBcontig16bittile; - } - break; - } - break; - case PHOTOMETRIC_SEPARATED: - if (img->samplesperpixel >= 4 && buildMap(img)) - { - if (img->bitspersample == 8) - { - if (!img->Map) - img->put.contig = putRGBcontig8bitCMYKtile; - else - img->put.contig = putRGBcontig8bitCMYKMaptile; - } - } - break; - case PHOTOMETRIC_PALETTE: - if (buildMap(img)) - { - switch (img->bitspersample) - { - case 8: - img->put.contig = put8bitcmaptile; - break; - case 4: - img->put.contig = put4bitcmaptile; - break; - case 2: - img->put.contig = put2bitcmaptile; - break; - case 1: - img->put.contig = put1bitcmaptile; - break; - } - } - break; - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (buildMap(img)) - { - switch (img->bitspersample) - { - case 16: - img->put.contig = put16bitbwtile; - break; - case 8: - if (img->alpha && img->samplesperpixel == 2) - img->put.contig = putagreytile; - else - img->put.contig = putgreytile; - break; - case 4: - img->put.contig = put4bitbwtile; - break; - case 2: - img->put.contig = put2bitbwtile; - break; - case 1: - img->put.contig = put1bitbwtile; - break; - } - } - break; - case PHOTOMETRIC_YCBCR: - if ((img->bitspersample == 8) && (img->samplesperpixel == 3)) - { - if (initYCbCrConversion(img) != 0) - { - /* - * The 6.0 spec says that subsampling must be - * one of 1, 2, or 4, and that vertical subsampling - * must always be <= horizontal subsampling; so - * there are only a few possibilities and we just - * enumerate the cases. - * Joris: added support for the [1,2] case, nonetheless, to - * accommodate some OJPEG files - */ - uint16_t SubsamplingHor; - uint16_t SubsamplingVer; - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, - &SubsamplingHor, &SubsamplingVer); - switch ((SubsamplingHor << 4) | SubsamplingVer) - { - case 0x44: - img->put.contig = putcontig8bitYCbCr44tile; - break; - case 0x42: - img->put.contig = putcontig8bitYCbCr42tile; - break; - case 0x41: - img->put.contig = putcontig8bitYCbCr41tile; - break; - case 0x22: - img->put.contig = putcontig8bitYCbCr22tile; - break; - case 0x21: - img->put.contig = putcontig8bitYCbCr21tile; - break; - case 0x12: - img->put.contig = putcontig8bitYCbCr12tile; - break; - case 0x11: - img->put.contig = putcontig8bitYCbCr11tile; - break; - } - } - } - break; - case PHOTOMETRIC_CIELAB: - if (img->samplesperpixel == 3 && buildMap(img)) - { - if (img->bitspersample == 8 || img->bitspersample == 16) - img->put.contig = initCIELabConversion(img); - break; - } - } - return ((img->get != NULL) && (img->put.contig != NULL)); -} - -/* - * Select the appropriate conversion routine for unpacked data. - * - * NB: we assume that unpacked single channel data is directed - * to the "packed routines. - */ -static int PickSeparateCase(TIFFRGBAImage *img) -{ - img->get = TIFFIsTiled(img->tif) ? gtTileSeparate : gtStripSeparate; - img->put.separate = NULL; - switch (img->photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - /* greyscale images processed pretty much as RGB by gtTileSeparate - */ - case PHOTOMETRIC_RGB: - switch (img->bitspersample) - { - case 8: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) - img->put.separate = putRGBAAseparate8bittile; - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) - { - if (BuildMapUaToAa(img)) - img->put.separate = putRGBUAseparate8bittile; - } - else - img->put.separate = putRGBseparate8bittile; - break; - case 16: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) - { - if (BuildMapBitdepth16To8(img)) - img->put.separate = putRGBAAseparate16bittile; - } - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) - { - if (BuildMapBitdepth16To8(img) && BuildMapUaToAa(img)) - img->put.separate = putRGBUAseparate16bittile; - } - else - { - if (BuildMapBitdepth16To8(img)) - img->put.separate = putRGBseparate16bittile; - } - break; - } - break; - case PHOTOMETRIC_SEPARATED: - if (img->bitspersample == 8 && img->samplesperpixel == 4) - { - /* Not alpha, but seems like the only way to get 4th band */ - img->alpha = 1; - img->put.separate = putCMYKseparate8bittile; - } - break; - case PHOTOMETRIC_YCBCR: - if ((img->bitspersample == 8) && (img->samplesperpixel == 3)) - { - if (initYCbCrConversion(img) != 0) - { - uint16_t hs, vs; - TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, - &hs, &vs); - switch ((hs << 4) | vs) - { - case 0x11: - img->put.separate = putseparate8bitYCbCr11tile; - break; - /* TODO: add other cases here */ - } - } - } - break; - } - return ((img->get != NULL) && (img->put.separate != NULL)); -} - -static int BuildMapUaToAa(TIFFRGBAImage *img) -{ - static const char module[] = "BuildMapUaToAa"; - uint8_t *m; - uint16_t na, nv; - assert(img->UaToAa == NULL); - img->UaToAa = _TIFFmallocExt(img->tif, 65536); - if (img->UaToAa == NULL) - { - TIFFErrorExtR(img->tif, module, "Out of memory"); - return (0); - } - m = img->UaToAa; - for (na = 0; na < 256; na++) - { - for (nv = 0; nv < 256; nv++) - *m++ = (uint8_t)((nv * na + 127) / 255); - } - return (1); -} - -static int BuildMapBitdepth16To8(TIFFRGBAImage *img) -{ - static const char module[] = "BuildMapBitdepth16To8"; - uint8_t *m; - uint32_t n; - assert(img->Bitdepth16To8 == NULL); - img->Bitdepth16To8 = _TIFFmallocExt(img->tif, 65536); - if (img->Bitdepth16To8 == NULL) - { - TIFFErrorExtR(img->tif, module, "Out of memory"); - return (0); - } - m = img->Bitdepth16To8; - for (n = 0; n < 65536; n++) - *m++ = (uint8_t)((n + 128) / 257); - return (1); -} - -/* - * Read a whole strip off data from the file, and convert to RGBA form. - * If this is the last strip, then it will only contain the portion of - * the strip that is actually within the image space. The result is - * organized in bottom to top form. - */ - -int TIFFReadRGBAStrip(TIFF *tif, uint32_t row, uint32_t *raster) - -{ - return TIFFReadRGBAStripExt(tif, row, raster, 0); -} - -int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, - int stop_on_error) - -{ - char emsg[EMSG_BUF_SIZE] = ""; - TIFFRGBAImage img; - int ok; - uint32_t rowsperstrip, rows_to_read; - - if (TIFFIsTiled(tif)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Can't use TIFFReadRGBAStrip() with tiled file."); - return (0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - - if (rowsperstrip == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "rowsperstrip is zero"); - return (0); - } - - if ((row % rowsperstrip) != 0) - { - TIFFErrorExtR( - tif, TIFFFileName(tif), - "Row passed to TIFFReadRGBAStrip() must be first in a strip."); - return (0); - } - - if (TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) - { - if (row >= img.height) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Invalid row passed to TIFFReadRGBAStrip()."); - TIFFRGBAImageEnd(&img); - return (0); - } - - img.row_offset = row; - img.col_offset = 0; - - if (row + rowsperstrip > img.height) - rows_to_read = img.height - row; - else - rows_to_read = rowsperstrip; - - ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read); - - TIFFRGBAImageEnd(&img); - } - else - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", emsg); - ok = 0; - } - - return (ok); -} - -/* - * Read a whole tile off data from the file, and convert to RGBA form. - * The returned RGBA data is organized from bottom to top of tile, - * and may include zeroed areas if the tile extends off the image. - */ - -int TIFFReadRGBATile(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster) - -{ - return TIFFReadRGBATileExt(tif, col, row, raster, 0); -} - -int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, - int stop_on_error) -{ - char emsg[EMSG_BUF_SIZE] = ""; - TIFFRGBAImage img; - int ok; - uint32_t tile_xsize, tile_ysize; - uint32_t read_xsize, read_ysize; - uint32_t i_row; - - /* - * Verify that our request is legal - on a tile file, and on a - * tile boundary. - */ - - if (!TIFFIsTiled(tif)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Can't use TIFFReadRGBATile() with striped file."); - return (0); - } - - TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize); - TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize); - if (tile_xsize == 0 || tile_ysize == 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "tile_xsize or tile_ysize is zero"); - return (0); - } - - if ((col % tile_xsize) != 0 || (row % tile_ysize) != 0) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Row/col passed to TIFFReadRGBATile() must be top" - "left corner of a tile."); - return (0); - } - - /* - * Setup the RGBA reader. - */ - - if (!TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "%s", emsg); - return (0); - } - - if (col >= img.width || row >= img.height) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Invalid row/col passed to TIFFReadRGBATile()."); - TIFFRGBAImageEnd(&img); - return (0); - } - - /* - * The TIFFRGBAImageGet() function doesn't allow us to get off the - * edge of the image, even to fill an otherwise valid tile. So we - * figure out how much we can read, and fix up the tile buffer to - * a full tile configuration afterwards. - */ - - if (row + tile_ysize > img.height) - read_ysize = img.height - row; - else - read_ysize = tile_ysize; - - if (col + tile_xsize > img.width) - read_xsize = img.width - col; - else - read_xsize = tile_xsize; - - /* - * Read the chunk of imagery. - */ - - img.row_offset = row; - img.col_offset = col; - - ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize); - - TIFFRGBAImageEnd(&img); - - /* - * If our read was incomplete we will need to fix up the tile by - * shifting the data around as if a full tile of data is being returned. - * - * This is all the more complicated because the image is organized in - * bottom to top format. - */ - - if (read_xsize == tile_xsize && read_ysize == tile_ysize) - return (ok); - - for (i_row = 0; i_row < read_ysize; i_row++) - { - memmove(raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t)); - _TIFFmemset(raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize + - read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize)); - } - - for (i_row = read_ysize; i_row < tile_ysize; i_row++) - { - _TIFFmemset(raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, 0, - sizeof(uint32_t) * tile_xsize); - } - - return (ok); -} diff --git a/third_party/libtiff/libtiff/tif_hash_set.c b/third_party/libtiff/libtiff/tif_hash_set.c deleted file mode 100644 index 81dea3f..0000000 --- a/third_party/libtiff/libtiff/tif_hash_set.c +++ /dev/null @@ -1,603 +0,0 @@ -/********************************************************************** - * - * Name: tif_hash_set.c - * Purpose: Hash set functions. - * Author: Even Rouault, - * - ********************************************************************** - * Copyright (c) 2008-2009, Even Rouault - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************/ - -#include "tif_config.h" - -#include "tif_hash_set.h" - -#include -#include -#include -#include -#include - -/** List element structure. */ -typedef struct _TIFFList TIFFList; - -/** List element structure. */ -struct _TIFFList -{ - /*! Pointer to the data object. Should be allocated and freed by the - * caller. - * */ - void *pData; - /*! Pointer to the next element in list. NULL, if current element is the - * last one. - */ - struct _TIFFList *psNext; -}; - -struct _TIFFHashSet -{ - TIFFHashSetHashFunc fnHashFunc; - TIFFHashSetEqualFunc fnEqualFunc; - TIFFHashSetFreeEltFunc fnFreeEltFunc; - TIFFList **tabList; - int nSize; - int nIndiceAllocatedSize; - int nAllocatedSize; - TIFFList *psRecyclingList; - int nRecyclingListSize; - bool bRehash; -#ifdef HASH_DEBUG - int nCollisions; -#endif -}; - -static const int anPrimes[] = { - 53, 97, 193, 389, 769, 1543, 3079, - 6151, 12289, 24593, 49157, 98317, 196613, 393241, - 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, - 100663319, 201326611, 402653189, 805306457, 1610612741}; - -/************************************************************************/ -/* TIFFHashSetHashPointer() */ -/************************************************************************/ - -/** - * Hash function for an arbitrary pointer - * - * @param elt the arbitrary pointer to hash - * - * @return the hash value of the pointer - */ - -static unsigned long TIFFHashSetHashPointer(const void *elt) -{ - return (unsigned long)(uintptr_t)((void *)(elt)); -} - -/************************************************************************/ -/* TIFFHashSetEqualPointer() */ -/************************************************************************/ - -/** - * Equality function for arbitrary pointers - * - * @param elt1 the first arbitrary pointer to compare - * @param elt2 the second arbitrary pointer to compare - * - * @return true if the pointers are equal - */ - -static bool TIFFHashSetEqualPointer(const void *elt1, const void *elt2) -{ - return elt1 == elt2; -} - -/************************************************************************/ -/* TIFFHashSetNew() */ -/************************************************************************/ - -/** - * Creates a new hash set - * - * The hash function must return a hash value for the elements to insert. - * If fnHashFunc is NULL, TIFFHashSetHashPointer will be used. - * - * The equal function must return if two elements are equal. - * If fnEqualFunc is NULL, TIFFHashSetEqualPointer will be used. - * - * The free function is used to free elements inserted in the hash set, - * when the hash set is destroyed, when elements are removed or replaced. - * If fnFreeEltFunc is NULL, elements inserted into the hash set will not be - * freed. - * - * @param fnHashFunc hash function. May be NULL. - * @param fnEqualFunc equal function. May be NULL. - * @param fnFreeEltFunc element free function. May be NULL. - * - * @return a new hash set - */ - -TIFFHashSet *TIFFHashSetNew(TIFFHashSetHashFunc fnHashFunc, - TIFFHashSetEqualFunc fnEqualFunc, - TIFFHashSetFreeEltFunc fnFreeEltFunc) -{ - TIFFHashSet *set = (TIFFHashSet *)malloc(sizeof(TIFFHashSet)); - if (set == NULL) - return NULL; - set->fnHashFunc = fnHashFunc ? fnHashFunc : TIFFHashSetHashPointer; - set->fnEqualFunc = fnEqualFunc ? fnEqualFunc : TIFFHashSetEqualPointer; - set->fnFreeEltFunc = fnFreeEltFunc; - set->nSize = 0; - set->tabList = (TIFFList **)(calloc(53, sizeof(TIFFList *))); - if (set->tabList == NULL) - { - free(set); - return NULL; - } - set->nIndiceAllocatedSize = 0; - set->nAllocatedSize = 53; - set->psRecyclingList = NULL; - set->nRecyclingListSize = 0; - set->bRehash = false; -#ifdef HASH_DEBUG - set->nCollisions = 0; -#endif - return set; -} - -/************************************************************************/ -/* TIFFHashSetSize() */ -/************************************************************************/ - -/** - * Returns the number of elements inserted in the hash set - * - * Note: this is not the internal size of the hash set - * - * @param set the hash set - * - * @return the number of elements in the hash set - */ - -int TIFFHashSetSize(const TIFFHashSet *set) -{ - assert(set != NULL); - return set->nSize; -} - -/************************************************************************/ -/* TIFFHashSetGetNewListElt() */ -/************************************************************************/ - -static TIFFList *TIFFHashSetGetNewListElt(TIFFHashSet *set) -{ - if (set->psRecyclingList) - { - TIFFList *psRet = set->psRecyclingList; - psRet->pData = NULL; - set->nRecyclingListSize--; - set->psRecyclingList = psRet->psNext; - return psRet; - } - - return (TIFFList *)malloc(sizeof(TIFFList)); -} - -/************************************************************************/ -/* TIFFHashSetReturnListElt() */ -/************************************************************************/ - -static void TIFFHashSetReturnListElt(TIFFHashSet *set, TIFFList *psList) -{ - if (set->nRecyclingListSize < 128) - { - psList->psNext = set->psRecyclingList; - set->psRecyclingList = psList; - set->nRecyclingListSize++; - } - else - { - free(psList); - } -} - -/************************************************************************/ -/* TIFFHashSetClearInternal() */ -/************************************************************************/ - -static void TIFFHashSetClearInternal(TIFFHashSet *set, bool bFinalize) -{ - assert(set != NULL); - for (int i = 0; i < set->nAllocatedSize; i++) - { - TIFFList *cur = set->tabList[i]; - while (cur) - { - if (set->fnFreeEltFunc) - set->fnFreeEltFunc(cur->pData); - TIFFList *psNext = cur->psNext; - if (bFinalize) - free(cur); - else - TIFFHashSetReturnListElt(set, cur); - cur = psNext; - } - set->tabList[i] = NULL; - } - set->bRehash = false; -} - -/************************************************************************/ -/* TIFFListDestroy() */ -/************************************************************************/ - -/** - * Destroy a list. Caller responsible for freeing data objects contained in - * list elements. - * - * @param psList pointer to list head. - * - */ - -static void TIFFListDestroy(TIFFList *psList) -{ - TIFFList *psCurrent = psList; - - while (psCurrent) - { - TIFFList *const psNext = psCurrent->psNext; - free(psCurrent); - psCurrent = psNext; - } -} - -/************************************************************************/ -/* TIFFHashSetDestroy() */ -/************************************************************************/ - -/** - * Destroys an allocated hash set. - * - * This function also frees the elements if a free function was - * provided at the creation of the hash set. - * - * @param set the hash set - */ - -void TIFFHashSetDestroy(TIFFHashSet *set) -{ - if (set) - { - TIFFHashSetClearInternal(set, true); - free(set->tabList); - TIFFListDestroy(set->psRecyclingList); - free(set); - } -} - -#ifdef notused -/************************************************************************/ -/* TIFFHashSetClear() */ -/************************************************************************/ - -/** - * Clear all elements from a hash set. - * - * This function also frees the elements if a free function was - * provided at the creation of the hash set. - * - * @param set the hash set - */ - -void TIFFHashSetClear(TIFFHashSet *set) -{ - TIFFHashSetClearInternal(set, false); - set->nIndiceAllocatedSize = 0; - set->nAllocatedSize = 53; -#ifdef HASH_DEBUG - set->nCollisions = 0; -#endif - set->nSize = 0; -} - -/************************************************************************/ -/* TIFFHashSetForeach() */ -/************************************************************************/ - -/** - * Walk through the hash set and runs the provided function on all the - * elements - * - * This function is provided the user_data argument of TIFFHashSetForeach. - * It must return true to go on the walk through the hash set, or FALSE to - * make it stop. - * - * Note : the structure of the hash set must *NOT* be modified during the - * walk. - * - * @param set the hash set. - * @param fnIterFunc the function called on each element. - * @param user_data the user data provided to the function. - */ - -void TIFFHashSetForeach(TIFFHashSet *set, TIFFHashSetIterEltFunc fnIterFunc, - void *user_data) -{ - assert(set != NULL); - if (!fnIterFunc) - return; - - for (int i = 0; i < set->nAllocatedSize; i++) - { - TIFFList *cur = set->tabList[i]; - while (cur) - { - if (!fnIterFunc(cur->pData, user_data)) - return; - - cur = cur->psNext; - } - } -} -#endif - -/************************************************************************/ -/* TIFFHashSetRehash() */ -/************************************************************************/ - -static bool TIFFHashSetRehash(TIFFHashSet *set) -{ - int nNewAllocatedSize = anPrimes[set->nIndiceAllocatedSize]; - TIFFList **newTabList = - (TIFFList **)(calloc(nNewAllocatedSize, sizeof(TIFFList *))); - if (newTabList == NULL) - return false; -#ifdef HASH_DEBUG - TIFFDebug("TIFFHASH", - "hashSet=%p, nSize=%d, nCollisions=%d, " - "fCollisionRate=%.02f", - set, set->nSize, set->nCollisions, - set->nCollisions * 100.0 / set->nSize); - set->nCollisions = 0; -#endif - for (int i = 0; i < set->nAllocatedSize; i++) - { - TIFFList *cur = set->tabList[i]; - while (cur) - { - const unsigned long nNewHashVal = - set->fnHashFunc(cur->pData) % nNewAllocatedSize; -#ifdef HASH_DEBUG - if (newTabList[nNewHashVal]) - set->nCollisions++; -#endif - TIFFList *psNext = cur->psNext; - cur->psNext = newTabList[nNewHashVal]; - newTabList[nNewHashVal] = cur; - cur = psNext; - } - } - free(set->tabList); - set->tabList = newTabList; - set->nAllocatedSize = nNewAllocatedSize; - set->bRehash = false; - return true; -} - -/************************************************************************/ -/* TIFFHashSetFindPtr() */ -/************************************************************************/ - -static void **TIFFHashSetFindPtr(TIFFHashSet *set, const void *elt) -{ - const unsigned long nHashVal = set->fnHashFunc(elt) % set->nAllocatedSize; - TIFFList *cur = set->tabList[nHashVal]; - while (cur) - { - if (set->fnEqualFunc(cur->pData, elt)) - return &cur->pData; - cur = cur->psNext; - } - return NULL; -} - -/************************************************************************/ -/* TIFFHashSetInsert() */ -/************************************************************************/ - -/** - * Inserts an element into a hash set. - * - * If the element was already inserted in the hash set, the previous - * element is replaced by the new element. If a free function was provided, - * it is used to free the previously inserted element - * - * @param set the hash set - * @param elt the new element to insert in the hash set - * - * @return true if success. If false is returned, elt has not been inserted, - * but TIFFHashSetInsert() will have run the free function if provided. - */ - -bool TIFFHashSetInsert(TIFFHashSet *set, void *elt) -{ - assert(set != NULL); - void **pElt = TIFFHashSetFindPtr(set, elt); - if (pElt) - { - if (set->fnFreeEltFunc) - set->fnFreeEltFunc(*pElt); - - *pElt = elt; - return true; - } - - if (set->nSize >= 2 * set->nAllocatedSize / 3 || - (set->bRehash && set->nIndiceAllocatedSize > 0 && - set->nSize <= set->nAllocatedSize / 2)) - { - set->nIndiceAllocatedSize++; - if (!TIFFHashSetRehash(set)) - { - set->nIndiceAllocatedSize--; - if (set->fnFreeEltFunc) - set->fnFreeEltFunc(elt); - return false; - } - } - - const unsigned long nHashVal = set->fnHashFunc(elt) % set->nAllocatedSize; -#ifdef HASH_DEBUG - if (set->tabList[nHashVal]) - set->nCollisions++; -#endif - - TIFFList *new_elt = TIFFHashSetGetNewListElt(set); - if (new_elt == NULL) - { - if (set->fnFreeEltFunc) - set->fnFreeEltFunc(elt); - return false; - } - new_elt->pData = elt; - new_elt->psNext = set->tabList[nHashVal]; - set->tabList[nHashVal] = new_elt; - set->nSize++; - - return true; -} - -/************************************************************************/ -/* TIFFHashSetLookup() */ -/************************************************************************/ - -/** - * Returns the element found in the hash set corresponding to the element to - * look up The element must not be modified. - * - * @param set the hash set - * @param elt the element to look up in the hash set - * - * @return the element found in the hash set or NULL - */ - -void *TIFFHashSetLookup(TIFFHashSet *set, const void *elt) -{ - assert(set != NULL); - void **pElt = TIFFHashSetFindPtr(set, elt); - if (pElt) - return *pElt; - - return NULL; -} - -/************************************************************************/ -/* TIFFHashSetRemoveInternal() */ -/************************************************************************/ - -static bool TIFFHashSetRemoveInternal(TIFFHashSet *set, const void *elt, - bool bDeferRehash) -{ - assert(set != NULL); - if (set->nIndiceAllocatedSize > 0 && set->nSize <= set->nAllocatedSize / 2) - { - set->nIndiceAllocatedSize--; - if (bDeferRehash) - set->bRehash = true; - else - { - if (!TIFFHashSetRehash(set)) - { - set->nIndiceAllocatedSize++; - return false; - } - } - } - - int nHashVal = (int)(set->fnHashFunc(elt) % set->nAllocatedSize); - TIFFList *cur = set->tabList[nHashVal]; - TIFFList *prev = NULL; - while (cur) - { - if (set->fnEqualFunc(cur->pData, elt)) - { - if (prev) - prev->psNext = cur->psNext; - else - set->tabList[nHashVal] = cur->psNext; - - if (set->fnFreeEltFunc) - set->fnFreeEltFunc(cur->pData); - - TIFFHashSetReturnListElt(set, cur); -#ifdef HASH_DEBUG - if (set->tabList[nHashVal]) - set->nCollisions--; -#endif - set->nSize--; - return true; - } - prev = cur; - cur = cur->psNext; - } - return false; -} - -/************************************************************************/ -/* TIFFHashSetRemove() */ -/************************************************************************/ - -/** - * Removes an element from a hash set - * - * @param set the hash set - * @param elt the new element to remove from the hash set - * - * @return true if the element was in the hash set - */ - -bool TIFFHashSetRemove(TIFFHashSet *set, const void *elt) -{ - return TIFFHashSetRemoveInternal(set, elt, false); -} - -#ifdef notused -/************************************************************************/ -/* TIFFHashSetRemoveDeferRehash() */ -/************************************************************************/ - -/** - * Removes an element from a hash set. - * - * This will defer potential rehashing of the set to later calls to - * TIFFHashSetInsert() or TIFFHashSetRemove(). - * - * @param set the hash set - * @param elt the new element to remove from the hash set - * - * @return true if the element was in the hash set - */ - -bool TIFFHashSetRemoveDeferRehash(TIFFHashSet *set, const void *elt) -{ - return TIFFHashSetRemoveInternal(set, elt, true); -} -#endif diff --git a/third_party/libtiff/libtiff/tif_hash_set.h b/third_party/libtiff/libtiff/tif_hash_set.h deleted file mode 100644 index 6a21917..0000000 --- a/third_party/libtiff/libtiff/tif_hash_set.h +++ /dev/null @@ -1,101 +0,0 @@ -/********************************************************************** - * $Id$ - * - * Name: tif_hash_set.h - * Project: TIFF - Common Portability Library - * Purpose: Hash set functions. - * Author: Even Rouault, - * - ********************************************************************** - * Copyright (c) 2008-2009, Even Rouault - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************/ - -#ifndef TIFF_HASH_SET_H_INCLUDED -#define TIFF_HASH_SET_H_INCLUDED - -#include - -/** - * \file tif_hash_set.h - * - * Hash set implementation. - * - * An hash set is a data structure that holds elements that are unique - * according to a comparison function. Operations on the hash set, such as - * insertion, removal or lookup, are supposed to be fast if an efficient - * "hash" function is provided. - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Types */ - - /** Opaque type for a hash set */ - typedef struct _TIFFHashSet TIFFHashSet; - - /** TIFFHashSetHashFunc */ - typedef unsigned long (*TIFFHashSetHashFunc)(const void *elt); - - /** TIFFHashSetEqualFunc */ - typedef bool (*TIFFHashSetEqualFunc)(const void *elt1, const void *elt2); - - /** TIFFHashSetFreeEltFunc */ - typedef void (*TIFFHashSetFreeEltFunc)(void *elt); - - /* Functions */ - - TIFFHashSet *TIFFHashSetNew(TIFFHashSetHashFunc fnHashFunc, - TIFFHashSetEqualFunc fnEqualFunc, - TIFFHashSetFreeEltFunc fnFreeEltFunc); - - void TIFFHashSetDestroy(TIFFHashSet *set); - - int TIFFHashSetSize(const TIFFHashSet *set); - -#ifdef notused - void TIFFHashSetClear(TIFFHashSet *set); - - /** TIFFHashSetIterEltFunc */ - typedef int (*TIFFHashSetIterEltFunc)(void *elt, void *user_data); - - void TIFFHashSetForeach(TIFFHashSet *set, TIFFHashSetIterEltFunc fnIterFunc, - void *user_data); -#endif - - bool TIFFHashSetInsert(TIFFHashSet *set, void *elt); - - void *TIFFHashSetLookup(TIFFHashSet *set, const void *elt); - - bool TIFFHashSetRemove(TIFFHashSet *set, const void *elt); - -#ifdef notused - bool TIFFHashSetRemoveDeferRehash(TIFFHashSet *set, const void *elt); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* TIFF_HASH_SET_H_INCLUDED */ - diff --git a/third_party/libtiff/libtiff/tif_jbig.c b/third_party/libtiff/libtiff/tif_jbig.c deleted file mode 100644 index bb0de9e..0000000 --- a/third_party/libtiff/libtiff/tif_jbig.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * JBIG Compression Algorithm Support. - * Contributed by Lee Howard - * - */ - -#include "tiffiop.h" - -#ifdef JBIG_SUPPORT -#include "jbig.h" - -static int JBIGSetupDecode(TIFF *tif) -{ - if (TIFFNumberOfStrips(tif) != 1) - { - TIFFErrorExtR(tif, "JBIG", - "Multistrip images not supported in decoder"); - return 0; - } - - return 1; -} - -static int JBIGDecode(TIFF *tif, uint8_t *buffer, tmsize_t size, uint16_t s) -{ - struct jbg_dec_state decoder; - int decodeStatus = 0; - unsigned char *pImage = NULL; - unsigned long decodedSize; - (void)s; - - if (isFillOrder(tif, tif->tif_dir.td_fillorder)) - { - TIFFReverseBits(tif->tif_rawcp, tif->tif_rawcc); - } - - jbg_dec_init(&decoder); - -#if defined(HAVE_JBG_NEWLEN) - jbg_newlen(tif->tif_rawcp, (size_t)tif->tif_rawcc); - /* - * I do not check the return status of jbg_newlen because even if this - * function fails it does not necessarily mean that decoding the image - * will fail. It is generally only needed for received fax images - * that do not contain the actual length of the image in the BIE - * header. I do not log when an error occurs because that will cause - * problems when converting JBIG encoded TIFF's to - * PostScript. As long as the actual image length is contained in the - * BIE header jbg_dec_in should succeed. - */ -#endif /* HAVE_JBG_NEWLEN */ - - decodeStatus = jbg_dec_in(&decoder, (unsigned char *)tif->tif_rawcp, - (size_t)tif->tif_rawcc, NULL); - if (JBG_EOK != decodeStatus) - { - /* - * XXX: JBG_EN constant was defined in pre-2.0 releases of the - * JBIG-KIT. Since the 2.0 the error reporting functions were - * changed. We will handle both cases here. - */ - TIFFErrorExtR(tif, "JBIG", "Error (%d) decoding: %s", decodeStatus, -#if defined(JBG_EN) - jbg_strerror(decodeStatus, JBG_EN) -#else - jbg_strerror(decodeStatus) -#endif - ); - memset(buffer, 0, (size_t)size); - jbg_dec_free(&decoder); - return 0; - } - - decodedSize = jbg_dec_getsize(&decoder); - if ((tmsize_t)decodedSize < size) - { - memset(buffer + decodedSize, 0, (size_t)(size - decodedSize)); - TIFFWarningExtR(tif, "JBIG", - "Only decoded %lu bytes, whereas %" TIFF_SSIZE_FORMAT - " requested", - decodedSize, size); - } - else if ((tmsize_t)decodedSize > size) - { - TIFFErrorExtR(tif, "JBIG", - "Decoded %lu bytes, whereas %" TIFF_SSIZE_FORMAT - " were requested", - decodedSize, size); - jbg_dec_free(&decoder); - return 0; - } - pImage = jbg_dec_getimage(&decoder, 0); - _TIFFmemcpy(buffer, pImage, decodedSize); - jbg_dec_free(&decoder); - - tif->tif_rawcp += tif->tif_rawcc; - tif->tif_rawcc = 0; - - return 1; -} - -static int JBIGSetupEncode(TIFF *tif) -{ - if (TIFFNumberOfStrips(tif) != 1) - { - TIFFErrorExtR(tif, "JBIG", - "Multistrip images not supported in encoder"); - return 0; - } - - return 1; -} - -static int JBIGCopyEncodedData(TIFF *tif, unsigned char *pp, size_t cc, - uint16_t s) -{ - (void)s; - while (cc > 0) - { - tmsize_t n = (tmsize_t)cc; - - if (tif->tif_rawcc + n > tif->tif_rawdatasize) - { - n = tif->tif_rawdatasize - tif->tif_rawcc; - } - - assert(n > 0); - _TIFFmemcpy(tif->tif_rawcp, pp, n); - tif->tif_rawcp += n; - tif->tif_rawcc += n; - pp += n; - cc -= (size_t)n; - if (tif->tif_rawcc >= tif->tif_rawdatasize && !TIFFFlushData1(tif)) - { - return (-1); - } - } - - return (1); -} - -static void JBIGOutputBie(unsigned char *buffer, size_t len, void *userData) -{ - TIFF *tif = (TIFF *)userData; - - if (isFillOrder(tif, tif->tif_dir.td_fillorder)) - { - TIFFReverseBits(buffer, (tmsize_t)len); - } - - JBIGCopyEncodedData(tif, buffer, len, 0); -} - -static int JBIGEncode(TIFF *tif, uint8_t *buffer, tmsize_t size, uint16_t s) -{ - TIFFDirectory *dir = &tif->tif_dir; - struct jbg_enc_state encoder; - - (void)size, (void)s; - - jbg_enc_init(&encoder, dir->td_imagewidth, dir->td_imagelength, 1, &buffer, - JBIGOutputBie, tif); - /* - * jbg_enc_out does the "real" encoding. As data is encoded, - * JBIGOutputBie is called, which writes the data to the directory. - */ - jbg_enc_out(&encoder); - jbg_enc_free(&encoder); - - return 1; -} - -int TIFFInitJBIG(TIFF *tif, int scheme) -{ - (void)scheme; - assert(scheme == COMPRESSION_JBIG); - - /* - * These flags are set so the JBIG Codec can control when to reverse - * bits and when not to and to allow the jbig decoder and bit reverser - * to write to memory when necessary. - */ - tif->tif_flags |= TIFF_NOBITREV; - tif->tif_flags &= ~TIFF_MAPPED; - /* We may have read from a previous IFD and thus set TIFF_BUFFERMMAP and - * cleared TIFF_MYBUFFER. It is necessary to restore them to their initial - * value to be consistent with the state of a non-memory mapped file. - */ - if (tif->tif_flags & TIFF_BUFFERMMAP) - { - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - tif->tif_flags &= ~TIFF_BUFFERMMAP; - tif->tif_flags |= TIFF_MYBUFFER; - } - - /* Setup the function pointers for encode, decode, and cleanup. */ - tif->tif_setupdecode = JBIGSetupDecode; - tif->tif_decodestrip = JBIGDecode; - - tif->tif_setupencode = JBIGSetupEncode; - tif->tif_encodestrip = JBIGEncode; - - return 1; -} - -#endif /* JBIG_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_jpeg.c b/third_party/libtiff/libtiff/tif_jpeg.c deleted file mode 100644 index aba5f99..0000000 --- a/third_party/libtiff/libtiff/tif_jpeg.c +++ /dev/null @@ -1,2916 +0,0 @@ -/* - * Copyright (c) 1994-1997 Sam Leffler - * Copyright (c) 1994-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN - -#include "tiffiop.h" -#include - -#ifdef JPEG_SUPPORT - -/* - * TIFF Library - * - * JPEG Compression support per TIFF Technical Note #2 - * (*not* per the original TIFF 6.0 spec). - * - * This file is simply an interface to the libjpeg library written by - * the Independent JPEG Group. You need release 5 or later of the IJG - * code, which you can find on the Internet at ftp.uu.net:/graphics/jpeg/. - * - * Contributed by Tom Lane . - */ -#include - -/* Settings that are independent of libjpeg ABI. Used when reinitializing the */ -/* JPEGState from libjpegs 8 bit to libjpeg 12 bits, which have potentially */ -/* different ABI */ -typedef struct -{ - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ - TIFFStripMethod defsparent; /* super-class method */ - TIFFTileMethod deftparent; /* super-class method */ - - /* pseudo-tag fields */ - void *jpegtables; /* JPEGTables tag value, or NULL */ - uint32_t jpegtables_length; /* number of bytes in same */ - int jpegquality; /* Compression quality level */ - int jpegcolormode; /* Auto RGB<=>YCbCr convert? */ - int jpegtablesmode; /* What to put in JPEGTables */ - - int ycbcrsampling_fetched; - int max_allowed_scan_number; - int has_warned_about_progressive_mode; -} JPEGOtherSettings; - -int TIFFFillStrip(TIFF *tif, uint32_t strip); -int TIFFFillTile(TIFF *tif, uint32_t tile); -int TIFFReInitJPEG_12(TIFF *tif, const JPEGOtherSettings *otherSettings, - int scheme, int is_encode); -int TIFFJPEGIsFullStripRequired_12(TIFF *tif); - -#include "jerror.h" -#include "jpeglib.h" - -/* Do optional compile-time version check */ -#if defined(EXPECTED_JPEG_LIB_VERSION) && !defined(LIBJPEG_12_PATH) -#if EXPECTED_JPEG_LIB_VERSION != JPEG_LIB_VERSION -#error EXPECTED_JPEG_LIB_VERSION != JPEG_LIB_VERSION -#endif -#endif - -/* - * Do we want to do special processing suitable for when JSAMPLE is a - * 16bit value? - */ - -/* HAVE_JPEGTURBO_DUAL_MODE_8_12 is defined for libjpeg-turbo >= 3.0 which - * adds a dual-mode 8/12 bit API in the same library. - * (note: libjpeg-turbo 2.2 was actually released as 3.0) - */ - -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) -#define JPEG_DUAL_MODE_8_12 -/* Start by undefining BITS_IN_JSAMPLE which is always set to 8 in libjpeg-turbo - * >= 3.0 Cf - * https://github.com/libjpeg-turbo/libjpeg-turbo/commit/8b9bc4b9635a2a047fb23ebe70c9acd728d3f99b - */ -#undef BITS_IN_JSAMPLE -/* libjpeg-turbo >= 3.0 adds J12xxxx datatypes for the 12-bit mode. */ -#if defined(FROM_TIF_JPEG_12) -#define BITS_IN_JSAMPLE 12 -#define TIFF_JSAMPLE J12SAMPLE -#define TIFF_JSAMPARRAY J12SAMPARRAY -#define TIFF_JSAMPIMAGE J12SAMPIMAGE -#define TIFF_JSAMPROW J12SAMPROW -#else -#define BITS_IN_JSAMPLE 8 -#define TIFF_JSAMPLE JSAMPLE -#define TIFF_JSAMPARRAY JSAMPARRAY -#define TIFF_JSAMPIMAGE JSAMPIMAGE -#define TIFF_JSAMPROW JSAMPROW -#endif -#else -#define TIFF_JSAMPLE JSAMPLE -#define TIFF_JSAMPARRAY JSAMPARRAY -#define TIFF_JSAMPIMAGE JSAMPIMAGE -#define TIFF_JSAMPROW JSAMPROW -#endif - -#if defined(JPEG_LIB_MK1) -#define JPEG_LIB_MK1_OR_12BIT 1 -#elif BITS_IN_JSAMPLE == 12 -#define JPEG_LIB_MK1_OR_12BIT 1 -#endif - -/* - * We are using width_in_blocks which is supposed to be private to - * libjpeg. Unfortunately, the libjpeg delivered with Cygwin has - * renamed this member to width_in_data_units. Since the header has - * also renamed a define, use that unique define name in order to - * detect the problem header and adjust to suit. - */ -#if defined(D_MAX_DATA_UNITS_IN_MCU) -#define width_in_blocks width_in_data_units -#endif - -/* - * On some machines it may be worthwhile to use _setjmp or sigsetjmp - * in place of plain setjmp. These macros will make it easier. - */ -#define SETJMP(jbuf) setjmp(jbuf) -#define LONGJMP(jbuf, code) longjmp(jbuf, code) -#define JMP_BUF jmp_buf - -#ifndef TIFF_jpeg_destination_mgr_defined -#define TIFF_jpeg_destination_mgr_defined -typedef struct jpeg_destination_mgr jpeg_destination_mgr; -#endif - -#ifndef TIFF_jpeg_source_mgr_defined -#define TIFF_jpeg_source_mgr_defined -typedef struct jpeg_source_mgr jpeg_source_mgr; -#endif - -#ifndef TIFF_jpeg_error_mgr_defined -#define TIFF_jpeg_error_mgr_defined -typedef struct jpeg_error_mgr jpeg_error_mgr; -#endif - -/* - * State block for each open TIFF file using - * libjpeg to do JPEG compression/decompression. - * - * libjpeg's visible state is either a jpeg_compress_struct - * or jpeg_decompress_struct depending on which way we - * are going. comm can be used to refer to the fields - * which are common to both. - * - * NB: cinfo is required to be the first member of JPEGState, - * so we can safely cast JPEGState* -> jpeg_xxx_struct* - * and vice versa! - */ -typedef struct -{ - union - { - struct jpeg_compress_struct c; - struct jpeg_decompress_struct d; - struct jpeg_common_struct comm; - } cinfo; /* NB: must be first */ - int cinfo_initialized; - - jpeg_error_mgr err; /* libjpeg error manager */ - JMP_BUF exit_jmpbuf; /* for catching libjpeg failures */ - - struct jpeg_progress_mgr progress; - /* - * The following two members could be a union, but - * they're small enough that it's not worth the effort. - */ - jpeg_destination_mgr dest; /* data dest for compression */ - jpeg_source_mgr src; /* data source for decompression */ - /* private state */ - TIFF *tif; /* back link needed by some code */ - uint16_t photometric; /* copy of PhotometricInterpretation */ - uint16_t h_sampling; /* luminance sampling factors */ - uint16_t v_sampling; - tmsize_t bytesperline; /* decompressed bytes per scanline */ - /* pointers to intermediate buffers when processing downsampled data */ - TIFF_JSAMPARRAY ds_buffer[MAX_COMPONENTS]; - int scancount; /* number of "scanlines" accumulated */ - int samplesperclump; - - JPEGOtherSettings otherSettings; - - int encode_raw_error; -} JPEGState; - -#define JState(tif) ((JPEGState *)(tif)->tif_data) - -static int JPEGDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int JPEGDecodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int JPEGEncode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int JPEGEncodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int JPEGInitializeLibJPEG(TIFF *tif, int decode); -static int DecodeRowError(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); - -#define FIELD_JPEGTABLES (FIELD_CODEC + 0) - -static const TIFFField jpegFields[] = { - {TIFFTAG_JPEGTABLES, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, - FIELD_JPEGTABLES, FALSE, TRUE, "JPEGTables", NULL}, - {TIFFTAG_JPEGQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - TRUE, FALSE, "", NULL}, - {TIFFTAG_JPEGCOLORMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - FALSE, FALSE, "", NULL}, - {TIFFTAG_JPEGTABLESMODE, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - FALSE, FALSE, "", NULL}}; - -/* - * libjpeg interface layer. - * - * We use setjmp/longjmp to return control to libtiff - * when a fatal error is encountered within the JPEG - * library. We also direct libjpeg error and warning - * messages through the appropriate libtiff handlers. - */ - -/* - * Error handling routines (these replace corresponding - * IJG routines from jerror.c). These are used for both - * compression and decompression. - */ -static void TIFFjpeg_error_exit(j_common_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; /* NB: cinfo assumed first */ - char buffer[JMSG_LENGTH_MAX]; - - (*cinfo->err->format_message)(cinfo, buffer); - TIFFErrorExtR(sp->tif, "JPEGLib", "%s", - buffer); /* display the error message */ - jpeg_abort(cinfo); /* clean up libjpeg state */ - LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */ -} - -/* - * This routine is invoked only for warning messages, - * since error_exit does its own thing and trace_level - * is never set > 0. - */ -static void TIFFjpeg_output_message(j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - - (*cinfo->err->format_message)(cinfo, buffer); - TIFFWarningExtR(((JPEGState *)cinfo)->tif, "JPEGLib", "%s", buffer); -} - -/* Avoid the risk of denial-of-service on crafted JPEGs with an insane */ -/* number of scans. */ -/* See - * http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - */ -static void TIFFjpeg_progress_monitor(j_common_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; /* NB: cinfo assumed first */ - if (cinfo->is_decompressor) - { - const int scan_no = ((j_decompress_ptr)cinfo)->input_scan_number; - if (scan_no >= sp->otherSettings.max_allowed_scan_number) - { - TIFFErrorExtR( - ((JPEGState *)cinfo)->tif, "TIFFjpeg_progress_monitor", - "Scan number %d exceeds maximum scans (%d). This limit " - "can be raised through the " - "LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER " - "environment variable.", - scan_no, sp->otherSettings.max_allowed_scan_number); - - jpeg_abort(cinfo); /* clean up libjpeg state */ - LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */ - } - } -} - -/* - * Interface routines. This layer of routines exists - * primarily to limit side-effects from using setjmp. - * Also, normal/error returns are converted into return - * values per libtiff practice. - */ -#define CALLJPEG(sp, fail, op) (SETJMP((sp)->exit_jmpbuf) ? (fail) : (op)) -#define CALLVJPEG(sp, op) CALLJPEG(sp, 0, ((op), 1)) - -static int TIFFjpeg_create_compress(JPEGState *sp) -{ - /* initialize JPEG error handling */ - sp->cinfo.c.err = jpeg_std_error(&sp->err); - sp->err.error_exit = TIFFjpeg_error_exit; - sp->err.output_message = TIFFjpeg_output_message; - - /* set client_data to avoid UMR warning from tools like Purify */ - sp->cinfo.c.client_data = NULL; - - return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c)); -} - -static int TIFFjpeg_create_decompress(JPEGState *sp) -{ - /* initialize JPEG error handling */ - sp->cinfo.d.err = jpeg_std_error(&sp->err); - sp->err.error_exit = TIFFjpeg_error_exit; - sp->err.output_message = TIFFjpeg_output_message; - - /* set client_data to avoid UMR warning from tools like Purify */ - sp->cinfo.d.client_data = NULL; - - return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d)); -} - -static int TIFFjpeg_set_defaults(JPEGState *sp) -{ - return CALLVJPEG(sp, jpeg_set_defaults(&sp->cinfo.c)); -} - -static int TIFFjpeg_set_colorspace(JPEGState *sp, J_COLOR_SPACE colorspace) -{ - return CALLVJPEG(sp, jpeg_set_colorspace(&sp->cinfo.c, colorspace)); -} - -static int TIFFjpeg_set_quality(JPEGState *sp, int quality, - boolean force_baseline) -{ - return CALLVJPEG(sp, - jpeg_set_quality(&sp->cinfo.c, quality, force_baseline)); -} - -static int TIFFjpeg_suppress_tables(JPEGState *sp, boolean suppress) -{ - return CALLVJPEG(sp, jpeg_suppress_tables(&sp->cinfo.c, suppress)); -} - -static int TIFFjpeg_start_compress(JPEGState *sp, boolean write_all_tables) -{ - return CALLVJPEG(sp, jpeg_start_compress(&sp->cinfo.c, write_all_tables)); -} - -static int TIFFjpeg_write_scanlines(JPEGState *sp, TIFF_JSAMPARRAY scanlines, - int num_lines) -{ -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) && BITS_IN_JSAMPLE == 12 - return CALLJPEG(sp, -1, - (int)jpeg12_write_scanlines(&sp->cinfo.c, scanlines, - (JDIMENSION)num_lines)); -#else - return CALLJPEG(sp, -1, - (int)jpeg_write_scanlines(&sp->cinfo.c, scanlines, - (JDIMENSION)num_lines)); -#endif -} - -static int TIFFjpeg_write_raw_data(JPEGState *sp, TIFF_JSAMPIMAGE data, - int num_lines) -{ -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) && BITS_IN_JSAMPLE == 12 - return CALLJPEG( - sp, -1, - (int)jpeg12_write_raw_data(&sp->cinfo.c, data, (JDIMENSION)num_lines)); -#else - return CALLJPEG( - sp, -1, - (int)jpeg_write_raw_data(&sp->cinfo.c, data, (JDIMENSION)num_lines)); -#endif -} - -static int TIFFjpeg_finish_compress(JPEGState *sp) -{ - return CALLVJPEG(sp, jpeg_finish_compress(&sp->cinfo.c)); -} - -static int TIFFjpeg_write_tables(JPEGState *sp) -{ - return CALLVJPEG(sp, jpeg_write_tables(&sp->cinfo.c)); -} - -static int TIFFjpeg_read_header(JPEGState *sp, boolean require_image) -{ - return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image)); -} - -static int TIFFjpeg_has_multiple_scans(JPEGState *sp) -{ - return CALLJPEG(sp, 0, jpeg_has_multiple_scans(&sp->cinfo.d)); -} - -static int TIFFjpeg_start_decompress(JPEGState *sp) -{ - const char *sz_max_allowed_scan_number; - /* progress monitor */ - sp->cinfo.d.progress = &sp->progress; - sp->progress.progress_monitor = TIFFjpeg_progress_monitor; - sp->otherSettings.max_allowed_scan_number = 100; - sz_max_allowed_scan_number = getenv("LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER"); - if (sz_max_allowed_scan_number) - sp->otherSettings.max_allowed_scan_number = - atoi(sz_max_allowed_scan_number); - - return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d)); -} - -static int TIFFjpeg_read_scanlines(JPEGState *sp, TIFF_JSAMPARRAY scanlines, - int max_lines) -{ -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) && BITS_IN_JSAMPLE == 12 - return CALLJPEG(sp, -1, - (int)jpeg12_read_scanlines(&sp->cinfo.d, scanlines, - (JDIMENSION)max_lines)); -#else - return CALLJPEG(sp, -1, - (int)jpeg_read_scanlines(&sp->cinfo.d, scanlines, - (JDIMENSION)max_lines)); -#endif -} - -static int TIFFjpeg_read_raw_data(JPEGState *sp, TIFF_JSAMPIMAGE data, - int max_lines) -{ -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) && BITS_IN_JSAMPLE == 12 - return CALLJPEG( - sp, -1, - (int)jpeg12_read_raw_data(&sp->cinfo.d, data, (JDIMENSION)max_lines)); -#else - return CALLJPEG( - sp, -1, - (int)jpeg_read_raw_data(&sp->cinfo.d, data, (JDIMENSION)max_lines)); -#endif -} - -static int TIFFjpeg_finish_decompress(JPEGState *sp) -{ - return CALLJPEG(sp, -1, (int)jpeg_finish_decompress(&sp->cinfo.d)); -} - -static int TIFFjpeg_abort(JPEGState *sp) -{ - return CALLVJPEG(sp, jpeg_abort(&sp->cinfo.comm)); -} - -static int TIFFjpeg_destroy(JPEGState *sp) -{ - return CALLVJPEG(sp, jpeg_destroy(&sp->cinfo.comm)); -} - -static JSAMPARRAY TIFFjpeg_alloc_sarray(JPEGState *sp, int pool_id, - JDIMENSION samplesperrow, - JDIMENSION numrows) -{ - return CALLJPEG(sp, (JSAMPARRAY)NULL, - (*sp->cinfo.comm.mem->alloc_sarray)( - &sp->cinfo.comm, pool_id, samplesperrow, numrows)); -} - -/* - * JPEG library destination data manager. - * These routines direct compressed data from libjpeg into the - * libtiff output buffer. - */ - -static void std_init_destination(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - TIFF *tif = sp->tif; - - sp->dest.next_output_byte = (JOCTET *)tif->tif_rawdata; - sp->dest.free_in_buffer = (size_t)tif->tif_rawdatasize; -} - -static boolean std_empty_output_buffer(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - TIFF *tif = sp->tif; - - /* the entire buffer has been filled */ - tif->tif_rawcc = tif->tif_rawdatasize; - -#ifdef IPPJ_HUFF - /* - * The Intel IPP performance library does not necessarily fill up - * the whole output buffer on each pass, so only dump out the parts - * that have been filled. - * http://trac.osgeo.org/gdal/wiki/JpegIPP - */ - if (sp->dest.free_in_buffer >= 0) - { - tif->tif_rawcc = tif->tif_rawdatasize - sp->dest.free_in_buffer; - } -#endif - - if (!TIFFFlushData1(tif)) - return FALSE; - sp->dest.next_output_byte = (JOCTET *)tif->tif_rawdata; - sp->dest.free_in_buffer = (size_t)tif->tif_rawdatasize; - - return (TRUE); -} - -static void std_term_destination(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - TIFF *tif = sp->tif; - - tif->tif_rawcp = (uint8_t *)sp->dest.next_output_byte; - tif->tif_rawcc = tif->tif_rawdatasize - (tmsize_t)sp->dest.free_in_buffer; - /* NB: libtiff does the final buffer flush */ -} - -static void TIFFjpeg_data_dest(JPEGState *sp, TIFF *tif) -{ - (void)tif; - sp->cinfo.c.dest = &sp->dest; - sp->dest.init_destination = std_init_destination; - sp->dest.empty_output_buffer = std_empty_output_buffer; - sp->dest.term_destination = std_term_destination; -} - -/* - * Alternate destination manager for outputting to JPEGTables field. - */ - -static void tables_init_destination(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - - /* while building, otherSettings.jpegtables_length is allocated buffer size - */ - sp->dest.next_output_byte = (JOCTET *)sp->otherSettings.jpegtables; - sp->dest.free_in_buffer = (size_t)sp->otherSettings.jpegtables_length; -} - -static boolean tables_empty_output_buffer(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - void *newbuf; - - /* the entire buffer has been filled; enlarge it by 1000 bytes */ - newbuf = - _TIFFreallocExt(sp->tif, (void *)sp->otherSettings.jpegtables, - (tmsize_t)(sp->otherSettings.jpegtables_length + 1000)); - if (newbuf == NULL) - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 100); - sp->dest.next_output_byte = - (JOCTET *)newbuf + sp->otherSettings.jpegtables_length; - sp->dest.free_in_buffer = (size_t)1000; - sp->otherSettings.jpegtables = newbuf; - sp->otherSettings.jpegtables_length += 1000; - return (TRUE); -} - -static void tables_term_destination(j_compress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - - /* set tables length to number of bytes actually emitted */ - sp->otherSettings.jpegtables_length -= (uint32_t)sp->dest.free_in_buffer; -} - -static int TIFFjpeg_tables_dest(JPEGState *sp, TIFF *tif) -{ - (void)tif; - /* - * Allocate a working buffer for building tables. - * Initial size is 1000 bytes, which is usually adequate. - */ - if (sp->otherSettings.jpegtables) - _TIFFfreeExt(tif, sp->otherSettings.jpegtables); - sp->otherSettings.jpegtables_length = 1000; - sp->otherSettings.jpegtables = (void *)_TIFFmallocExt( - tif, (tmsize_t)sp->otherSettings.jpegtables_length); - if (sp->otherSettings.jpegtables == NULL) - { - sp->otherSettings.jpegtables_length = 0; - TIFFErrorExtR(sp->tif, "TIFFjpeg_tables_dest", - "No space for JPEGTables"); - return (0); - } - sp->cinfo.c.dest = &sp->dest; - sp->dest.init_destination = tables_init_destination; - sp->dest.empty_output_buffer = tables_empty_output_buffer; - sp->dest.term_destination = tables_term_destination; - return (1); -} - -/* - * JPEG library source data manager. - * These routines supply compressed data to libjpeg. - */ - -static void std_init_source(j_decompress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - TIFF *tif = sp->tif; - - sp->src.next_input_byte = (const JOCTET *)tif->tif_rawdata; - sp->src.bytes_in_buffer = (size_t)tif->tif_rawcc; -} - -static boolean std_fill_input_buffer(j_decompress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - static const JOCTET dummy_EOI[2] = {0xFF, JPEG_EOI}; - -#ifdef IPPJ_HUFF - /* - * The Intel IPP performance library does not necessarily read the whole - * input buffer in one pass, so it is possible to get here with data - * yet to read. - * - * We just return without doing anything, until the entire buffer has - * been read. - * http://trac.osgeo.org/gdal/wiki/JpegIPP - */ - if (sp->src.bytes_in_buffer > 0) - { - return (TRUE); - } -#endif - - /* - * Normally the whole strip/tile is read and so we don't need to do - * a fill. In the case of CHUNKY_STRIP_READ_SUPPORT we might not have - * all the data, but the rawdata is refreshed between scanlines and - * we push this into the io machinery in JPEGDecode(). - * http://trac.osgeo.org/gdal/ticket/3894 - */ - - WARNMS(cinfo, JWRN_JPEG_EOF); - /* insert a fake EOI marker */ - sp->src.next_input_byte = dummy_EOI; - sp->src.bytes_in_buffer = 2; - return (TRUE); -} - -static void std_skip_input_data(j_decompress_ptr cinfo, long num_bytes) -{ - JPEGState *sp = (JPEGState *)cinfo; - - if (num_bytes > 0) - { - if ((size_t)num_bytes > sp->src.bytes_in_buffer) - { - /* oops, buffer overrun */ - (void)std_fill_input_buffer(cinfo); - } - else - { - sp->src.next_input_byte += (size_t)num_bytes; - sp->src.bytes_in_buffer -= (size_t)num_bytes; - } - } -} - -static void std_term_source(j_decompress_ptr cinfo) -{ - /* No work necessary here */ - (void)cinfo; -} - -static void TIFFjpeg_data_src(JPEGState *sp) -{ - sp->cinfo.d.src = &sp->src; - sp->src.init_source = std_init_source; - sp->src.fill_input_buffer = std_fill_input_buffer; - sp->src.skip_input_data = std_skip_input_data; - sp->src.resync_to_restart = jpeg_resync_to_restart; - sp->src.term_source = std_term_source; - sp->src.bytes_in_buffer = 0; /* for safety */ - sp->src.next_input_byte = NULL; -} - -/* - * Alternate source manager for reading from JPEGTables. - * We can share all the code except for the init routine. - */ - -static void tables_init_source(j_decompress_ptr cinfo) -{ - JPEGState *sp = (JPEGState *)cinfo; - - sp->src.next_input_byte = (const JOCTET *)sp->otherSettings.jpegtables; - sp->src.bytes_in_buffer = (size_t)sp->otherSettings.jpegtables_length; -} - -static void TIFFjpeg_tables_src(JPEGState *sp) -{ - TIFFjpeg_data_src(sp); - sp->src.init_source = tables_init_source; -} - -/* - * Allocate downsampled-data buffers needed for downsampled I/O. - * We use values computed in jpeg_start_compress or jpeg_start_decompress. - * We use libjpeg's allocator so that buffers will be released automatically - * when done with strip/tile. - * This is also a handy place to compute samplesperclump, bytesperline. - */ -static int alloc_downsampled_buffers(TIFF *tif, jpeg_component_info *comp_info, - int num_components) -{ - JPEGState *sp = JState(tif); - int ci; - jpeg_component_info *compptr; - TIFF_JSAMPARRAY buf; - int samples_per_clump = 0; - - for (ci = 0, compptr = comp_info; ci < num_components; ci++, compptr++) - { - samples_per_clump += compptr->h_samp_factor * compptr->v_samp_factor; - buf = (TIFF_JSAMPARRAY)TIFFjpeg_alloc_sarray( - sp, JPOOL_IMAGE, compptr->width_in_blocks * DCTSIZE, - (JDIMENSION)(compptr->v_samp_factor * DCTSIZE)); - if (buf == NULL) - return (0); - sp->ds_buffer[ci] = buf; - } - sp->samplesperclump = samples_per_clump; - return (1); -} - -/* - * JPEG Decoding. - */ - -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - -#define JPEG_MARKER_SOF0 0xC0 -#define JPEG_MARKER_SOF1 0xC1 -#define JPEG_MARKER_SOF2 0xC2 -#define JPEG_MARKER_SOF9 0xC9 -#define JPEG_MARKER_SOF10 0xCA -#define JPEG_MARKER_DHT 0xC4 -#define JPEG_MARKER_SOI 0xD8 -#define JPEG_MARKER_SOS 0xDA -#define JPEG_MARKER_DQT 0xDB -#define JPEG_MARKER_DRI 0xDD -#define JPEG_MARKER_APP0 0xE0 -#define JPEG_MARKER_COM 0xFE -struct JPEGFixupTagsSubsamplingData -{ - TIFF *tif; - void *buffer; - uint32_t buffersize; - uint8_t *buffercurrentbyte; - uint32_t bufferbytesleft; - uint64_t fileoffset; - uint64_t filebytesleft; - uint8_t filepositioned; -}; -static void JPEGFixupTagsSubsampling(TIFF *tif); -static int -JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData *data); -static int -JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData *data, - uint8_t *result); -static int -JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData *data, - uint16_t *result); -static void -JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData *data, - uint16_t skiplength); - -#endif - -static int JPEGFixupTags(TIFF *tif) -{ -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - JPEGState *sp = JState(tif); - if ((tif->tif_dir.td_photometric == PHOTOMETRIC_YCBCR) && - (tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG) && - (tif->tif_dir.td_samplesperpixel == 3) && - !sp->otherSettings.ycbcrsampling_fetched) - JPEGFixupTagsSubsampling(tif); -#endif - - return (1); -} - -#ifdef CHECK_JPEG_YCBCR_SUBSAMPLING - -static void JPEGFixupTagsSubsampling(TIFF *tif) -{ - /* - * Some JPEG-in-TIFF produces do not emit the YCBCRSUBSAMPLING values in - * the TIFF tags, but still use non-default (2,2) values within the jpeg - * data stream itself. In order for TIFF applications to work properly - * - for instance to get the strip buffer size right - it is imperative - * that the subsampling be available before we start reading the image - * data normally. This function will attempt to analyze the first strip in - * order to get the sampling values from the jpeg data stream. - * - * Note that JPEGPreDeocode() will produce a fairly loud warning when the - * discovered sampling does not match the default sampling (2,2) or whatever - * was actually in the tiff tags. - * - * See the bug in bugzilla for details: - * - * http://bugzilla.remotesensing.org/show_bug.cgi?id=168 - * - * Frank Warmerdam, July 2002 - * Joris Van Damme, May 2007 - */ - static const char module[] = "JPEGFixupTagsSubsampling"; - struct JPEGFixupTagsSubsamplingData m; - uint64_t fileoffset = TIFFGetStrileOffset(tif, 0); - - if (fileoffset == 0) - { - /* Do not even try to check if the first strip/tile does not - yet exist, as occurs when GDAL has created a new NULL file - for instance. */ - return; - } - - m.tif = tif; - m.buffersize = 2048; - m.buffer = _TIFFmallocExt(tif, m.buffersize); - if (m.buffer == NULL) - { - TIFFWarningExtR(tif, module, - "Unable to allocate memory for auto-correcting of " - "subsampling values; auto-correcting skipped"); - return; - } - m.buffercurrentbyte = NULL; - m.bufferbytesleft = 0; - m.fileoffset = fileoffset; - m.filepositioned = 0; - m.filebytesleft = TIFFGetStrileByteCount(tif, 0); - if (!JPEGFixupTagsSubsamplingSec(&m)) - TIFFWarningExtR( - tif, module, - "Unable to auto-correct subsampling values, likely corrupt JPEG " - "compressed data in first strip/tile; auto-correcting skipped"); - _TIFFfreeExt(tif, m.buffer); -} - -static int -JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData *data) -{ - static const char module[] = "JPEGFixupTagsSubsamplingSec"; - uint8_t m; - while (1) - { - while (1) - { - if (!JPEGFixupTagsSubsamplingReadByte(data, &m)) - return (0); - if (m == 255) - break; - } - while (1) - { - if (!JPEGFixupTagsSubsamplingReadByte(data, &m)) - return (0); - if (m != 255) - break; - } - switch (m) - { - case JPEG_MARKER_SOI: - /* this type of marker has no data and should be skipped */ - break; - case JPEG_MARKER_COM: - case JPEG_MARKER_APP0: - case JPEG_MARKER_APP0 + 1: - case JPEG_MARKER_APP0 + 2: - case JPEG_MARKER_APP0 + 3: - case JPEG_MARKER_APP0 + 4: - case JPEG_MARKER_APP0 + 5: - case JPEG_MARKER_APP0 + 6: - case JPEG_MARKER_APP0 + 7: - case JPEG_MARKER_APP0 + 8: - case JPEG_MARKER_APP0 + 9: - case JPEG_MARKER_APP0 + 10: - case JPEG_MARKER_APP0 + 11: - case JPEG_MARKER_APP0 + 12: - case JPEG_MARKER_APP0 + 13: - case JPEG_MARKER_APP0 + 14: - case JPEG_MARKER_APP0 + 15: - case JPEG_MARKER_DQT: - case JPEG_MARKER_SOS: - case JPEG_MARKER_DHT: - case JPEG_MARKER_DRI: - /* this type of marker has data, but it has no use to us and - * should be skipped */ - { - uint16_t n; - if (!JPEGFixupTagsSubsamplingReadWord(data, &n)) - return (0); - if (n < 2) - return (0); - n -= 2; - if (n > 0) - JPEGFixupTagsSubsamplingSkip(data, n); - } - break; - case JPEG_MARKER_SOF0: /* Baseline sequential Huffman */ - case JPEG_MARKER_SOF1: /* Extended sequential Huffman */ - case JPEG_MARKER_SOF2: /* Progressive Huffman: normally not allowed - by TechNote, but that doesn't hurt - supporting it */ - case JPEG_MARKER_SOF9: /* Extended sequential arithmetic */ - case JPEG_MARKER_SOF10: /* Progressive arithmetic: normally not - allowed by TechNote, but that doesn't - hurt supporting it */ - /* this marker contains the subsampling factors we're scanning - * for */ - { - uint16_t n; - uint16_t o; - uint8_t p; - uint8_t ph, pv; - if (!JPEGFixupTagsSubsamplingReadWord(data, &n)) - return (0); - if (n != 8 + data->tif->tif_dir.td_samplesperpixel * 3) - return (0); - JPEGFixupTagsSubsamplingSkip(data, 7); - if (!JPEGFixupTagsSubsamplingReadByte(data, &p)) - return (0); - ph = (p >> 4); - pv = (p & 15); - JPEGFixupTagsSubsamplingSkip(data, 1); - for (o = 1; o < data->tif->tif_dir.td_samplesperpixel; o++) - { - JPEGFixupTagsSubsamplingSkip(data, 1); - if (!JPEGFixupTagsSubsamplingReadByte(data, &p)) - return (0); - if (p != 0x11) - { - TIFFWarningExtR(data->tif, module, - "Subsampling values inside JPEG " - "compressed data " - "have no TIFF equivalent, " - "auto-correction of TIFF " - "subsampling values failed"); - return (1); - } - JPEGFixupTagsSubsamplingSkip(data, 1); - } - if (((ph != 1) && (ph != 2) && (ph != 4)) || - ((pv != 1) && (pv != 2) && (pv != 4))) - { - TIFFWarningExtR(data->tif, module, - "Subsampling values inside JPEG " - "compressed data have no TIFF " - "equivalent, auto-correction of TIFF " - "subsampling values failed"); - return (1); - } - if ((ph != data->tif->tif_dir.td_ycbcrsubsampling[0]) || - (pv != data->tif->tif_dir.td_ycbcrsubsampling[1])) - { - TIFFWarningExtR( - data->tif, module, - "Auto-corrected former TIFF subsampling values " - "[%" PRIu16 ",%" PRIu16 - "] to match subsampling values inside JPEG " - "compressed data [%" PRIu8 ",%" PRIu8 "]", - data->tif->tif_dir.td_ycbcrsubsampling[0], - data->tif->tif_dir.td_ycbcrsubsampling[1], ph, pv); - data->tif->tif_dir.td_ycbcrsubsampling[0] = ph; - data->tif->tif_dir.td_ycbcrsubsampling[1] = pv; - } - } - return (1); - default: - return (0); - } - } -} - -static int -JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData *data, - uint8_t *result) -{ - if (data->bufferbytesleft == 0) - { - uint32_t m; - if (data->filebytesleft == 0) - return (0); - if (!data->filepositioned) - { - if (TIFFSeekFile(data->tif, data->fileoffset, SEEK_SET) == - (toff_t)-1) - { - return 0; - } - data->filepositioned = 1; - } - m = data->buffersize; - if ((uint64_t)m > data->filebytesleft) - m = (uint32_t)data->filebytesleft; - assert(m < 0x80000000UL); - if (TIFFReadFile(data->tif, data->buffer, (tmsize_t)m) != (tmsize_t)m) - return (0); - data->buffercurrentbyte = data->buffer; - data->bufferbytesleft = m; - data->fileoffset += m; - data->filebytesleft -= m; - } - *result = *data->buffercurrentbyte; - data->buffercurrentbyte++; - data->bufferbytesleft--; - return (1); -} - -static int -JPEGFixupTagsSubsamplingReadWord(struct JPEGFixupTagsSubsamplingData *data, - uint16_t *result) -{ - uint8_t ma; - uint8_t mb; - if (!JPEGFixupTagsSubsamplingReadByte(data, &ma)) - return (0); - if (!JPEGFixupTagsSubsamplingReadByte(data, &mb)) - return (0); - *result = (ma << 8) | mb; - return (1); -} - -static void -JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData *data, - uint16_t skiplength) -{ - if ((uint32_t)skiplength <= data->bufferbytesleft) - { - data->buffercurrentbyte += skiplength; - data->bufferbytesleft -= skiplength; - } - else - { - uint16_t m; - m = (uint16_t)(skiplength - data->bufferbytesleft); - if (m <= data->filebytesleft) - { - data->bufferbytesleft = 0; - data->fileoffset += m; - data->filebytesleft -= m; - data->filepositioned = 0; - } - else - { - data->bufferbytesleft = 0; - data->filebytesleft = 0; - } - } -} - -#endif - -static int JPEGSetupDecode(TIFF *tif) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) - if (tif->tif_dir.td_bitspersample == 12) - { - /* We pass a pointer to a copy of otherSettings, since */ - /* TIFFReInitJPEG_12() will clear sp */ - JPEGOtherSettings savedOtherSettings = sp->otherSettings; - return TIFFReInitJPEG_12(tif, &savedOtherSettings, COMPRESSION_JPEG, 0); - } -#endif - - JPEGInitializeLibJPEG(tif, TRUE); - - assert(sp != NULL); - assert(sp->cinfo.comm.is_decompressor); - - /* Read JPEGTables if it is present */ - if (TIFFFieldSet(tif, FIELD_JPEGTABLES)) - { - TIFFjpeg_tables_src(sp); - if (TIFFjpeg_read_header(sp, FALSE) != JPEG_HEADER_TABLES_ONLY) - { - TIFFErrorExtR(tif, "JPEGSetupDecode", "Bogus JPEGTables field"); - return (0); - } - } - - /* Grab parameters that are same for all strips/tiles */ - sp->photometric = td->td_photometric; - switch (sp->photometric) - { - case PHOTOMETRIC_YCBCR: - sp->h_sampling = td->td_ycbcrsubsampling[0]; - sp->v_sampling = td->td_ycbcrsubsampling[1]; - break; - default: - /* TIFF 6.0 forbids subsampling of all other color spaces */ - sp->h_sampling = 1; - sp->v_sampling = 1; - break; - } - - /* Set up for reading normal data */ - TIFFjpeg_data_src(sp); - tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */ - return (1); -} - -/* Returns 1 if the full strip should be read, even when doing scanline per */ -/* scanline decoding. This happens when the JPEG stream uses multiple scans. */ -/* Currently only called in CHUNKY_STRIP_READ_SUPPORT mode through */ -/* scanline interface. */ -/* Only reads tif->tif_dir.td_bitspersample, tif->tif_rawdata and */ -/* tif->tif_rawcc members. */ -/* Can be called independently of the usual setup/predecode/decode states */ -int TIFFJPEGIsFullStripRequired(TIFF *tif) -{ - int ret; - JPEGState state; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) - if (tif->tif_dir.td_bitspersample == 12) - return TIFFJPEGIsFullStripRequired_12(tif); -#endif - - memset(&state, 0, sizeof(JPEGState)); - state.tif = tif; - - TIFFjpeg_create_decompress(&state); - - TIFFjpeg_data_src(&state); - - if (TIFFjpeg_read_header(&state, TRUE) != JPEG_HEADER_OK) - { - TIFFjpeg_destroy(&state); - return (0); - } - ret = TIFFjpeg_has_multiple_scans(&state); - - TIFFjpeg_destroy(&state); - - return ret; -} - -/* - * Set up for decoding a strip or tile. - */ -/*ARGSUSED*/ static int JPEGPreDecode(TIFF *tif, uint16_t s) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGPreDecode"; - uint32_t segment_width, segment_height; - int downsampled_output; - int ci; - - assert(sp != NULL); - - if (sp->cinfo.comm.is_decompressor == 0) - { - tif->tif_setupdecode(tif); - } - - assert(sp->cinfo.comm.is_decompressor); - /* - * Reset decoder state from any previous strip/tile, - * in case application didn't read the whole strip. - */ - if (!TIFFjpeg_abort(sp)) - return (0); - /* - * Read the header for this strip/tile. - */ - - if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK) - return (0); - - tif->tif_rawcp = (uint8_t *)sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* - * Check image parameters and set decompression parameters. - */ - if (isTiled(tif)) - { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - sp->bytesperline = TIFFTileRowSize(tif); - } - else - { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - sp->bytesperline = TIFFScanlineSize(tif); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) - { - /* - * For PC 2, scale down the expected strip/tile size - * to match a downsampled component - */ - if (sp->h_sampling == 0 || sp->v_sampling == 0) - { - TIFFErrorExtR(tif, module, - "JPEG horizontal or vertical sampling is zero"); - return (0); - } - segment_width = TIFFhowmany_32(segment_width, sp->h_sampling); - segment_height = TIFFhowmany_32(segment_height, sp->v_sampling); - } - if (sp->cinfo.d.image_width < segment_width || - sp->cinfo.d.image_height < segment_height) - { - TIFFWarningExtR(tif, module, - "Improper JPEG strip/tile size, " - "expected %" PRIu32 "x%" PRIu32 ", got %ux%u", - segment_width, segment_height, sp->cinfo.d.image_width, - sp->cinfo.d.image_height); - } - if (sp->cinfo.d.image_width == segment_width && - sp->cinfo.d.image_height > segment_height && - tif->tif_row + segment_height == td->td_imagelength && !isTiled(tif)) - { - /* Some files have a last strip, that should be truncated, */ - /* but their JPEG codestream has still the maximum strip */ - /* height. Warn about this as this is non compliant, but */ - /* we can safely recover from that. */ - TIFFWarningExtR(tif, module, - "JPEG strip size exceeds expected dimensions," - " expected %" PRIu32 "x%" PRIu32 ", got %ux%u", - segment_width, segment_height, sp->cinfo.d.image_width, - sp->cinfo.d.image_height); - } - else if (sp->cinfo.d.image_width > segment_width || - sp->cinfo.d.image_height > segment_height) - { - /* - * This case could be dangerous, if the strip or tile size has - * been reported as less than the amount of data jpeg will - * return, some potential security issues arise. Catch this - * case and error out. - */ - TIFFErrorExtR(tif, module, - "JPEG strip/tile size exceeds expected dimensions," - " expected %" PRIu32 "x%" PRIu32 ", got %ux%u", - segment_width, segment_height, sp->cinfo.d.image_width, - sp->cinfo.d.image_height); - return (0); - } - if (sp->cinfo.d.num_components != - (td->td_planarconfig == PLANARCONFIG_CONTIG ? td->td_samplesperpixel - : 1)) - { - TIFFErrorExtR(tif, module, "Improper JPEG component count"); - return (0); - } -#ifdef JPEG_LIB_MK1 - if (12 != td->td_bitspersample && 8 != td->td_bitspersample) - { - TIFFErrorExtR(tif, module, "Improper JPEG data precision"); - return (0); - } - sp->cinfo.d.data_precision = td->td_bitspersample; - sp->cinfo.d.bits_in_jsample = td->td_bitspersample; -#else - if (sp->cinfo.d.data_precision != td->td_bitspersample) - { - TIFFErrorExtR(tif, module, "Improper JPEG data precision"); - return (0); - } -#endif - - if (sp->cinfo.d.progressive_mode && - !sp->otherSettings.has_warned_about_progressive_mode) - { - TIFFWarningExtR(tif, module, - "The JPEG strip/tile is encoded with progressive mode, " - "which is normally not legal for JPEG-in-TIFF.\n" - "libtiff should be able to decode it, but it might " - "cause compatibility issues with other readers"); - sp->otherSettings.has_warned_about_progressive_mode = TRUE; - } - - /* In some cases, libjpeg needs to allocate a lot of memory */ - /* http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf - */ - if (TIFFjpeg_has_multiple_scans(sp)) - { - /* In this case libjpeg will need to allocate memory or backing */ - /* store for all coefficients */ - /* See call to jinit_d_coef_controller() from master_selection() */ - /* in libjpeg */ - - /* 1 MB for regular libjpeg usage */ - toff_t nRequiredMemory = 1024 * 1024; - - for (ci = 0; ci < sp->cinfo.d.num_components; ci++) - { - const jpeg_component_info *compptr = &(sp->cinfo.d.comp_info[ci]); - if (compptr->h_samp_factor > 0 && compptr->v_samp_factor > 0) - { - nRequiredMemory += - (toff_t)(((compptr->width_in_blocks + - compptr->h_samp_factor - 1) / - compptr->h_samp_factor)) * - ((compptr->height_in_blocks + compptr->v_samp_factor - 1) / - compptr->v_samp_factor) * - sizeof(JBLOCK); - } - } - - if (sp->cinfo.d.mem->max_memory_to_use > 0 && - nRequiredMemory > (toff_t)(sp->cinfo.d.mem->max_memory_to_use) && - getenv("LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC") == NULL) - { - TIFFErrorExtR( - tif, module, - "Reading this image would require libjpeg to allocate " - "at least %" PRIu64 " bytes. " - "This is disabled since above the %ld threshold. " - "You may override this restriction by defining the " - "LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, " - "or setting the JPEGMEM environment variable to a value " - "greater " - "or equal to '%" PRIu64 "M'", - nRequiredMemory, sp->cinfo.d.mem->max_memory_to_use, - (nRequiredMemory + 1000000u - 1u) / 1000000u); - return 0; - } - } - - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - /* Component 0 should have expected sampling factors */ - if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling || - sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) - { - TIFFErrorExtR(tif, module, - "Improper JPEG sampling factors %d,%d\n" - "Apparently should be %" PRIu16 ",%" PRIu16 ".", - sp->cinfo.d.comp_info[0].h_samp_factor, - sp->cinfo.d.comp_info[0].v_samp_factor, - sp->h_sampling, sp->v_sampling); - return (0); - } - /* Rest should have sampling factors 1,1 */ - for (ci = 1; ci < sp->cinfo.d.num_components; ci++) - { - if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 || - sp->cinfo.d.comp_info[ci].v_samp_factor != 1) - { - TIFFErrorExtR(tif, module, "Improper JPEG sampling factors"); - return (0); - } - } - } - else - { - /* PC 2's single component should have sampling factors 1,1 */ - if (sp->cinfo.d.comp_info[0].h_samp_factor != 1 || - sp->cinfo.d.comp_info[0].v_samp_factor != 1) - { - TIFFErrorExtR(tif, module, "Improper JPEG sampling factors"); - return (0); - } - } - downsampled_output = FALSE; - if (td->td_planarconfig == PLANARCONFIG_CONTIG && - sp->photometric == PHOTOMETRIC_YCBCR && - sp->otherSettings.jpegcolormode == JPEGCOLORMODE_RGB) - { - /* Convert YCbCr to RGB */ - sp->cinfo.d.jpeg_color_space = JCS_YCbCr; - sp->cinfo.d.out_color_space = JCS_RGB; - } - else - { - /* Suppress colorspace handling */ - sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN; - sp->cinfo.d.out_color_space = JCS_UNKNOWN; - if (td->td_planarconfig == PLANARCONFIG_CONTIG && - (sp->h_sampling != 1 || sp->v_sampling != 1)) - downsampled_output = TRUE; - /* XXX what about up-sampling? */ - } - if (downsampled_output) - { - /* Need to use raw-data interface to libjpeg */ - sp->cinfo.d.raw_data_out = TRUE; -#if JPEG_LIB_VERSION >= 70 - sp->cinfo.d.do_fancy_upsampling = FALSE; -#endif /* JPEG_LIB_VERSION >= 70 */ - tif->tif_decoderow = DecodeRowError; - tif->tif_decodestrip = JPEGDecodeRaw; - tif->tif_decodetile = JPEGDecodeRaw; - } - else - { - /* Use normal interface to libjpeg */ - sp->cinfo.d.raw_data_out = FALSE; - tif->tif_decoderow = JPEGDecode; - tif->tif_decodestrip = JPEGDecode; - tif->tif_decodetile = JPEGDecode; - } - /* Start JPEG decompressor */ - if (!TIFFjpeg_start_decompress(sp)) - return (0); - /* Allocate downsampled-data buffers if needed */ - if (downsampled_output) - { - if (!alloc_downsampled_buffers(tif, sp->cinfo.d.comp_info, - sp->cinfo.d.num_components)) - return (0); - sp->scancount = DCTSIZE; /* mark buffer empty */ - } - return (1); -} - -/* - * Decode a chunk of pixels. - * "Standard" case: returned data is not downsampled. - */ -#if !JPEG_LIB_MK1_OR_12BIT -static int JPEGDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - (void)s; - - /* - ** Update available information, buffer may have been refilled - ** between decode requests - */ - sp->src.next_input_byte = (const JOCTET *)tif->tif_rawcp; - sp->src.bytes_in_buffer = (size_t)tif->tif_rawcc; - - if (sp->bytesperline == 0) - { - memset(buf, 0, (size_t)cc); - return 0; - } - - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExtR(tif, tif->tif_name, "fractional scanline not read"); - - if (nrows > (tmsize_t)sp->cinfo.d.image_height) - nrows = sp->cinfo.d.image_height; - - /* data is expected to be read in multiples of a scanline */ - if (nrows) - { - do - { - /* - * In the libjpeg6b-9a 8bit case. We read directly into - * the TIFF buffer. - */ - JSAMPROW bufptr = (JSAMPROW)buf; - - if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1) - { - memset(buf, 0, (size_t)cc); - return (0); - } - - ++tif->tif_row; - buf += sp->bytesperline; - cc -= sp->bytesperline; - } while (--nrows > 0); - } - - /* Update information on consumed data */ - tif->tif_rawcp = (uint8_t *)sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* Close down the decompressor if we've finished the strip or tile. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height || - TIFFjpeg_finish_decompress(sp); -} -#endif /* !JPEG_LIB_MK1_OR_12BIT */ - -#if JPEG_LIB_MK1_OR_12BIT -/*ARGSUSED*/ static int JPEGDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, - uint16_t s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - (void)s; - - /* - ** Update available information, buffer may have been refilled - ** between decode requests - */ - sp->src.next_input_byte = (const JOCTET *)tif->tif_rawcp; - sp->src.bytes_in_buffer = (size_t)tif->tif_rawcc; - - if (sp->bytesperline == 0) - { - memset(buf, 0, (size_t)cc); - return 0; - } - - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExtR(tif, tif->tif_name, "fractional scanline not read"); - - if (nrows > (tmsize_t)sp->cinfo.d.image_height) - nrows = sp->cinfo.d.image_height; - - /* data is expected to be read in multiples of a scanline */ - if (nrows) - { - TIFF_JSAMPROW line_work_buf = NULL; - - /* - * For 6B, only use temporary buffer for 12 bit imagery. - * For Mk1 always use it. - */ - if (sp->cinfo.d.data_precision == 12) - { - line_work_buf = (TIFF_JSAMPROW)_TIFFmallocExt( - tif, sizeof(short) * sp->cinfo.d.output_width * - sp->cinfo.d.num_components); - } - - do - { - if (line_work_buf != NULL) - { - /* - * In the MK1 case, we always read into a 16bit - * buffer, and then pack down to 12bit or 8bit. - * In 6B case we only read into 16 bit buffer - * for 12bit data, which we need to repack. - */ - if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1) - { - memset(buf, 0, (size_t)cc); - return (0); - } - - if (sp->cinfo.d.data_precision == 12) - { - int value_pairs = (sp->cinfo.d.output_width * - sp->cinfo.d.num_components) / - 2; - int iPair; - - for (iPair = 0; iPair < value_pairs; iPair++) - { - unsigned char *out_ptr = - ((unsigned char *)buf) + iPair * 3; - TIFF_JSAMPLE *in_ptr = line_work_buf + iPair * 2; - - out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); - out_ptr[1] = - (unsigned char)(((in_ptr[0] & 0xf) << 4) | - ((in_ptr[1] & 0xf00) >> 8)); - out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); - } - } - else if (sp->cinfo.d.data_precision == 8) - { - int value_count = - (sp->cinfo.d.output_width * sp->cinfo.d.num_components); - int iValue; - - for (iValue = 0; iValue < value_count; iValue++) - { - ((unsigned char *)buf)[iValue] = - line_work_buf[iValue] & 0xff; - } - } - } - - ++tif->tif_row; - buf += sp->bytesperline; - cc -= sp->bytesperline; - } while (--nrows > 0); - - if (line_work_buf != NULL) - _TIFFfreeExt(tif, line_work_buf); - } - - /* Update information on consumed data */ - tif->tif_rawcp = (uint8_t *)sp->src.next_input_byte; - tif->tif_rawcc = sp->src.bytes_in_buffer; - - /* Close down the decompressor if we've finished the strip or tile. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height || - TIFFjpeg_finish_decompress(sp); -} -#endif /* JPEG_LIB_MK1_OR_12BIT */ - -/*ARGSUSED*/ static int DecodeRowError(TIFF *tif, uint8_t *buf, tmsize_t cc, - uint16_t s) - -{ - (void)buf; - (void)cc; - (void)s; - - TIFFErrorExtR( - tif, "TIFFReadScanline", - "scanline oriented access is not supported for downsampled JPEG " - "compressed images, consider enabling TIFFTAG_JPEGCOLORMODE as " - "JPEGCOLORMODE_RGB."); - return 0; -} - -/* - * Decode a chunk of pixels. - * Returned data is downsampled per sampling factors. - */ -/*ARGSUSED*/ static int JPEGDecodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc, - uint16_t s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - TIFFDirectory *td = &tif->tif_dir; - (void)s; - - nrows = sp->cinfo.d.image_height; - /* For last strip, limit number of rows to its truncated height */ - /* even if the codestream height is larger (which is not compliant, */ - /* but that we tolerate) */ - if ((uint32_t)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif)) - nrows = td->td_imagelength - tif->tif_row; - -#if defined(JPEG_LIB_MK1_OR_12BIT) - unsigned short *tmpbuf = NULL; -#endif - - /* data is expected to be read in multiples of a scanline */ - if (nrows != 0) - { - - /* Cb,Cr both have sampling factors 1, so this is correct */ - JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width; - int samples_per_clump = sp->samplesperclump; - -#if defined(JPEG_LIB_MK1_OR_12BIT) - tmpbuf = _TIFFmallocExt(tif, sizeof(unsigned short) * - sp->cinfo.d.output_width * - sp->cinfo.d.num_components); - if (tmpbuf == NULL) - { - TIFFErrorExtR(tif, "JPEGDecodeRaw", "Out of memory"); - return 0; - } -#endif - - do - { - jpeg_component_info *compptr; - int ci, clumpoffset; - - if (cc < sp->bytesperline) - { - TIFFErrorExtR( - tif, "JPEGDecodeRaw", - "application buffer not large enough for all data."); - goto error; - } - - /* Reload downsampled-data buffer if needed */ - if (sp->scancount >= DCTSIZE) - { - int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n) != n) - goto error; - sp->scancount = 0; - } - /* - * Fastest way to unseparate data is to make one pass - * over the scanline for each row of each component. - */ - clumpoffset = 0; /* first sample in clump */ - for (ci = 0, compptr = sp->cinfo.d.comp_info; - ci < sp->cinfo.d.num_components; ci++, compptr++) - { - int hsamp = compptr->h_samp_factor; - int vsamp = compptr->v_samp_factor; - int ypos; - - for (ypos = 0; ypos < vsamp; ypos++) - { - TIFF_JSAMPLE *inptr = - sp->ds_buffer[ci][sp->scancount * vsamp + ypos]; - JDIMENSION nclump; -#if defined(JPEG_LIB_MK1_OR_12BIT) - TIFF_JSAMPLE *outptr = (TIFF_JSAMPLE *)tmpbuf + clumpoffset; -#else - TIFF_JSAMPLE *outptr = (TIFF_JSAMPLE *)buf + clumpoffset; - if (cc < (tmsize_t)(clumpoffset + - (tmsize_t)samples_per_clump * - (clumps_per_line - 1) + - hsamp)) - { - TIFFErrorExtR( - tif, "JPEGDecodeRaw", - "application buffer not large enough for all data, " - "possible subsampling issue"); - goto error; - } -#endif - - if (hsamp == 1) - { - /* fast path for at least Cb and Cr */ - for (nclump = clumps_per_line; nclump-- > 0;) - { - outptr[0] = *inptr++; - outptr += samples_per_clump; - } - } - else - { - int xpos; - - /* general case */ - for (nclump = clumps_per_line; nclump-- > 0;) - { - for (xpos = 0; xpos < hsamp; xpos++) - outptr[xpos] = *inptr++; - outptr += samples_per_clump; - } - } - clumpoffset += hsamp; - } - } - -#if defined(JPEG_LIB_MK1_OR_12BIT) - { - if (sp->cinfo.d.data_precision == 8) - { - int i = 0; - int len = - sp->cinfo.d.output_width * sp->cinfo.d.num_components; - for (i = 0; i < len; i++) - { - ((unsigned char *)buf)[i] = tmpbuf[i] & 0xff; - } - } - else - { /* 12-bit */ - int value_pairs = (sp->cinfo.d.output_width * - sp->cinfo.d.num_components) / - 2; - int iPair; - for (iPair = 0; iPair < value_pairs; iPair++) - { - unsigned char *out_ptr = - ((unsigned char *)buf) + iPair * 3; - TIFF_JSAMPLE *in_ptr = - (TIFF_JSAMPLE *)(tmpbuf + iPair * 2); - out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); - out_ptr[1] = - (unsigned char)(((in_ptr[0] & 0xf) << 4) | - ((in_ptr[1] & 0xf00) >> 8)); - out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); - } - } - } -#endif - - sp->scancount++; - tif->tif_row += sp->v_sampling; - - buf += sp->bytesperline; - cc -= sp->bytesperline; - - nrows -= sp->v_sampling; - } while (nrows > 0); - -#if defined(JPEG_LIB_MK1_OR_12BIT) - _TIFFfreeExt(tif, tmpbuf); -#endif - } - - /* Close down the decompressor if done. */ - return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height || - TIFFjpeg_finish_decompress(sp); - -error: -#if defined(JPEG_LIB_MK1_OR_12BIT) - _TIFFfreeExt(tif, tmpbuf); -#endif - return 0; -} - -/* - * JPEG Encoding. - */ - -static void unsuppress_quant_table(JPEGState *sp, int tblno) -{ - JQUANT_TBL *qtbl; - - if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) - qtbl->sent_table = FALSE; -} - -static void suppress_quant_table(JPEGState *sp, int tblno) -{ - JQUANT_TBL *qtbl; - - if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) - qtbl->sent_table = TRUE; -} - -static void unsuppress_huff_table(JPEGState *sp, int tblno) -{ - JHUFF_TBL *htbl; - - if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = FALSE; - if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = FALSE; -} - -static void suppress_huff_table(JPEGState *sp, int tblno) -{ - JHUFF_TBL *htbl; - - if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = TRUE; - if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL) - htbl->sent_table = TRUE; -} - -static int prepare_JPEGTables(TIFF *tif) -{ - JPEGState *sp = JState(tif); - - /* Initialize quant tables for current quality setting */ - if (!TIFFjpeg_set_quality(sp, sp->otherSettings.jpegquality, FALSE)) - return (0); - /* Mark only the tables we want for output */ - /* NB: chrominance tables are currently used only with YCbCr */ - if (!TIFFjpeg_suppress_tables(sp, TRUE)) - return (0); - if (sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_QUANT) - { - unsuppress_quant_table(sp, 0); - if (sp->photometric == PHOTOMETRIC_YCBCR) - unsuppress_quant_table(sp, 1); - } - if (sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_HUFF) - { - unsuppress_huff_table(sp, 0); - if (sp->photometric == PHOTOMETRIC_YCBCR) - unsuppress_huff_table(sp, 1); - } - /* Direct libjpeg output into otherSettings.jpegtables */ - if (!TIFFjpeg_tables_dest(sp, tif)) - return (0); - /* Emit tables-only datastream */ - if (!TIFFjpeg_write_tables(sp)) - return (0); - - return (1); -} - -#if defined(JPEG_LIB_VERSION_MAJOR) && \ - (JPEG_LIB_VERSION_MAJOR > 9 || \ - (JPEG_LIB_VERSION_MAJOR == 9 && JPEG_LIB_VERSION_MINOR >= 4)) -/* This is a modified version of std_huff_tables() from jcparam.c - * in libjpeg-9d because it no longer initializes default Huffman - * tables in jpeg_set_defaults(). */ -static void TIFF_std_huff_tables(j_compress_ptr cinfo) -{ - - if (cinfo->dc_huff_tbl_ptrs[0] == NULL) - { - (void)jpeg_std_huff_table((j_common_ptr)cinfo, TRUE, 0); - } - if (cinfo->ac_huff_tbl_ptrs[0] == NULL) - { - (void)jpeg_std_huff_table((j_common_ptr)cinfo, FALSE, 0); - } - if (cinfo->dc_huff_tbl_ptrs[1] == NULL) - { - (void)jpeg_std_huff_table((j_common_ptr)cinfo, TRUE, 1); - } - if (cinfo->ac_huff_tbl_ptrs[1] == NULL) - { - (void)jpeg_std_huff_table((j_common_ptr)cinfo, FALSE, 1); - } -} -#endif - -static int JPEGSetupEncode(TIFF *tif) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGSetupEncode"; - -#if defined(JPEG_DUAL_MODE_8_12) && !defined(FROM_TIF_JPEG_12) - if (tif->tif_dir.td_bitspersample == 12) - { - /* We pass a pointer to a copy of otherSettings, since */ - /* TIFFReInitJPEG_12() will clear sp */ - JPEGOtherSettings savedOtherSettings = sp->otherSettings; - return TIFFReInitJPEG_12(tif, &savedOtherSettings, COMPRESSION_JPEG, 1); - } -#endif - - JPEGInitializeLibJPEG(tif, FALSE); - - assert(sp != NULL); - assert(!sp->cinfo.comm.is_decompressor); - - sp->photometric = td->td_photometric; - - /* - * Initialize all JPEG parameters to default values. - * Note that jpeg_set_defaults needs legal values for - * in_color_space and input_components. - */ - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - sp->cinfo.c.input_components = td->td_samplesperpixel; - if (sp->photometric == PHOTOMETRIC_YCBCR) - { - if (sp->otherSettings.jpegcolormode == JPEGCOLORMODE_RGB) - { - sp->cinfo.c.in_color_space = JCS_RGB; - } - else - { - sp->cinfo.c.in_color_space = JCS_YCbCr; - } - } - else - { - if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || - td->td_photometric == PHOTOMETRIC_MINISBLACK) && - td->td_samplesperpixel == 1) - sp->cinfo.c.in_color_space = JCS_GRAYSCALE; - else if (td->td_photometric == PHOTOMETRIC_RGB && - td->td_samplesperpixel == 3) - sp->cinfo.c.in_color_space = JCS_RGB; - else if (td->td_photometric == PHOTOMETRIC_SEPARATED && - td->td_samplesperpixel == 4) - sp->cinfo.c.in_color_space = JCS_CMYK; - else - sp->cinfo.c.in_color_space = JCS_UNKNOWN; - } - } - else - { - sp->cinfo.c.input_components = 1; - sp->cinfo.c.in_color_space = JCS_UNKNOWN; - } - if (!TIFFjpeg_set_defaults(sp)) - return (0); - - /* mozjpeg by default enables progressive JPEG, which is illegal in - * JPEG-in-TIFF */ - /* So explicitly disable it. */ - if (sp->cinfo.c.num_scans != 0 && - (sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_HUFF) != 0) - { - /* it has been found that mozjpeg could create corrupt strips/tiles */ - /* in non optimize_coding mode. */ - TIFFWarningExtR( - tif, module, - "mozjpeg library likely detected. Disable emission of " - "Huffman tables in JpegTables tag, and use optimize_coding " - "to avoid potential issues"); - sp->otherSettings.jpegtablesmode &= ~JPEGTABLESMODE_HUFF; - } - sp->cinfo.c.num_scans = 0; - sp->cinfo.c.scan_info = NULL; - - /* Set per-file parameters */ - switch (sp->photometric) - { - case PHOTOMETRIC_YCBCR: - sp->h_sampling = td->td_ycbcrsubsampling[0]; - sp->v_sampling = td->td_ycbcrsubsampling[1]; - if (sp->h_sampling == 0 || sp->v_sampling == 0) - { - TIFFErrorExtR(tif, module, - "Invalig horizontal/vertical sampling value"); - return (0); - } - if (td->td_bitspersample > 16) - { - TIFFErrorExtR(tif, module, - "BitsPerSample %" PRIu16 " not allowed for JPEG", - td->td_bitspersample); - return (0); - } - - /* - * A ReferenceBlackWhite field *must* be present since the - * default value is inappropriate for YCbCr. Fill in the - * proper value if application didn't set it. - */ - { - float *ref; - if (!TIFFGetField(tif, TIFFTAG_REFERENCEBLACKWHITE, &ref)) - { - float refbw[6]; - long top = 1L << td->td_bitspersample; - refbw[0] = 0; - refbw[1] = (float)(top - 1L); - refbw[2] = (float)(top >> 1); - refbw[3] = refbw[1]; - refbw[4] = refbw[2]; - refbw[5] = refbw[1]; - TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refbw); - } - } - break; - case PHOTOMETRIC_PALETTE: /* disallowed by Tech Note */ - case PHOTOMETRIC_MASK: - TIFFErrorExtR(tif, module, - "PhotometricInterpretation %" PRIu16 - " not allowed for JPEG", - sp->photometric); - return (0); - default: - /* TIFF 6.0 forbids subsampling of all other color spaces */ - sp->h_sampling = 1; - sp->v_sampling = 1; - break; - } - - /* Verify miscellaneous parameters */ - - /* - * This would need work if libtiff ever supports different - * depths for different components, or if libjpeg ever supports - * run-time selection of depth. Neither is imminent. - */ -#ifdef JPEG_LIB_MK1 - /* BITS_IN_JSAMPLE now permits 8 and 12 --- dgilbert */ - if (td->td_bitspersample != 8 && td->td_bitspersample != 12) -#else - if (td->td_bitspersample != BITS_IN_JSAMPLE) -#endif - { - TIFFErrorExtR(tif, module, - "BitsPerSample %" PRIu16 " not allowed for JPEG", - td->td_bitspersample); - return (0); - } - sp->cinfo.c.data_precision = td->td_bitspersample; -#ifdef JPEG_LIB_MK1 - sp->cinfo.c.bits_in_jsample = td->td_bitspersample; -#endif - if (isTiled(tif)) - { - if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) - { - TIFFErrorExtR(tif, module, - "JPEG tile height must be multiple of %" PRIu32, - (uint32_t)(sp->v_sampling * DCTSIZE)); - return (0); - } - if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) - { - TIFFErrorExtR(tif, module, - "JPEG tile width must be multiple of %" PRIu32, - (uint32_t)(sp->h_sampling * DCTSIZE)); - return (0); - } - } - else - { - if (td->td_rowsperstrip < td->td_imagelength && - (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) - { - TIFFErrorExtR(tif, module, - "RowsPerStrip must be multiple of %" PRIu32 - " for JPEG", - (uint32_t)(sp->v_sampling * DCTSIZE)); - return (0); - } - } - - /* Create a JPEGTables field if appropriate */ - if (sp->otherSettings.jpegtablesmode & - (JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF)) - { - if (sp->otherSettings.jpegtables == NULL || - memcmp(sp->otherSettings.jpegtables, "\0\0\0\0\0\0\0\0\0", 8) == 0) - { -#if defined(JPEG_LIB_VERSION_MAJOR) && \ - (JPEG_LIB_VERSION_MAJOR > 9 || \ - (JPEG_LIB_VERSION_MAJOR == 9 && JPEG_LIB_VERSION_MINOR >= 4)) - if ((sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_HUFF) != 0 && - (sp->cinfo.c.dc_huff_tbl_ptrs[0] == NULL || - sp->cinfo.c.dc_huff_tbl_ptrs[1] == NULL || - sp->cinfo.c.ac_huff_tbl_ptrs[0] == NULL || - sp->cinfo.c.ac_huff_tbl_ptrs[1] == NULL)) - { - /* libjpeg-9d no longer initializes default Huffman tables in */ - /* jpeg_set_defaults() */ - TIFF_std_huff_tables(&sp->cinfo.c); - } -#endif - - if (!prepare_JPEGTables(tif)) - return (0); - /* Mark the field present */ - /* Can't use TIFFSetField since BEENWRITING is already set! */ - tif->tif_flags |= TIFF_DIRTYDIRECT; - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); - } - } - else - { - /* We do not support application-supplied JPEGTables, */ - /* so mark the field not present */ - TIFFClrFieldBit(tif, FIELD_JPEGTABLES); - } - - /* Direct libjpeg output to libtiff's output buffer */ - TIFFjpeg_data_dest(sp, tif); - - return (1); -} - -/* - * Set encoding state at the start of a strip or tile. - */ -static int JPEGPreEncode(TIFF *tif, uint16_t s) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "JPEGPreEncode"; - uint32_t segment_width, segment_height; - int downsampled_input; - - assert(sp != NULL); - - if (sp->cinfo.comm.is_decompressor == 1) - { - tif->tif_setupencode(tif); - } - - assert(!sp->cinfo.comm.is_decompressor); - /* - * Set encoding parameters for this strip/tile. - */ - if (isTiled(tif)) - { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - sp->bytesperline = TIFFTileRowSize(tif); - } - else - { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - sp->bytesperline = TIFFScanlineSize(tif); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) - { - /* for PC 2, scale down the strip/tile size - * to match a downsampled component - */ - if (sp->h_sampling == 0 || sp->v_sampling == 0) - { - TIFFErrorExtR(tif, module, - "JPEG horizontal or vertical sampling is zero"); - return (0); - } - segment_width = TIFFhowmany_32(segment_width, sp->h_sampling); - segment_height = TIFFhowmany_32(segment_height, sp->v_sampling); - } - if (segment_width > (uint32_t)JPEG_MAX_DIMENSION || - segment_height > (uint32_t)JPEG_MAX_DIMENSION) - { - TIFFErrorExtR(tif, module, - "Strip/tile too large for JPEG. Maximum dimension is %d", - (int)JPEG_MAX_DIMENSION); - return (0); - } - sp->cinfo.c.image_width = segment_width; - sp->cinfo.c.image_height = segment_height; - downsampled_input = FALSE; - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - sp->cinfo.c.input_components = td->td_samplesperpixel; - if (sp->photometric == PHOTOMETRIC_YCBCR) - { - if (sp->otherSettings.jpegcolormode != JPEGCOLORMODE_RGB) - { - if (sp->h_sampling != 1 || sp->v_sampling != 1) - downsampled_input = TRUE; - } - if (!TIFFjpeg_set_colorspace(sp, JCS_YCbCr)) - return (0); - /* - * Set Y sampling factors; - * we assume jpeg_set_colorspace() set the rest to 1 - */ - sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling; - sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling; - } - else - { - if (!TIFFjpeg_set_colorspace(sp, sp->cinfo.c.in_color_space)) - return (0); - /* jpeg_set_colorspace set all sampling factors to 1 */ - } - } - else - { - if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN)) - return (0); - sp->cinfo.c.comp_info[0].component_id = s; - /* jpeg_set_colorspace() set sampling factors to 1 */ - if (sp->photometric == PHOTOMETRIC_YCBCR && s > 0) - { - sp->cinfo.c.comp_info[0].quant_tbl_no = 1; - sp->cinfo.c.comp_info[0].dc_tbl_no = 1; - sp->cinfo.c.comp_info[0].ac_tbl_no = 1; - } - } - /* ensure libjpeg won't write any extraneous markers */ - sp->cinfo.c.write_JFIF_header = FALSE; - sp->cinfo.c.write_Adobe_marker = FALSE; - /* set up table handling correctly */ - /* calling TIFFjpeg_set_quality() causes quantization tables to be flagged - */ - /* as being to be emitted, which we don't want in the JPEGTABLESMODE_QUANT - */ - /* mode, so we must manually suppress them. However TIFFjpeg_set_quality() - */ - /* should really be called when dealing with files with directories with */ - /* mixed qualities. see http://trac.osgeo.org/gdal/ticket/3539 */ - if (!TIFFjpeg_set_quality(sp, sp->otherSettings.jpegquality, FALSE)) - return (0); - if (sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_QUANT) - { - suppress_quant_table(sp, 0); - suppress_quant_table(sp, 1); - } - else - { - unsuppress_quant_table(sp, 0); - unsuppress_quant_table(sp, 1); - } - if (sp->otherSettings.jpegtablesmode & JPEGTABLESMODE_HUFF) - { - /* Explicit suppression is only needed if we did not go through the */ - /* prepare_JPEGTables() code path, which may be the case if updating */ - /* an existing file */ - suppress_huff_table(sp, 0); - suppress_huff_table(sp, 1); - sp->cinfo.c.optimize_coding = FALSE; - } - else - sp->cinfo.c.optimize_coding = TRUE; - if (downsampled_input) - { - /* Need to use raw-data interface to libjpeg */ - sp->cinfo.c.raw_data_in = TRUE; - tif->tif_encoderow = JPEGEncodeRaw; - tif->tif_encodestrip = JPEGEncodeRaw; - tif->tif_encodetile = JPEGEncodeRaw; - } - else - { - /* Use normal interface to libjpeg */ - sp->cinfo.c.raw_data_in = FALSE; - tif->tif_encoderow = JPEGEncode; - tif->tif_encodestrip = JPEGEncode; - tif->tif_encodetile = JPEGEncode; - } - /* Start JPEG compressor */ - if (!TIFFjpeg_start_compress(sp, FALSE)) - return (0); - /* Allocate downsampled-data buffers if needed */ - if (downsampled_input) - { - if (!alloc_downsampled_buffers(tif, sp->cinfo.c.comp_info, - sp->cinfo.c.num_components)) - return (0); - } - sp->scancount = 0; - sp->encode_raw_error = FALSE; - - return (1); -} - -/* - * Encode a chunk of pixels. - * "Standard" case: incoming data is not downsampled. - */ -static int JPEGEncode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - JPEGState *sp = JState(tif); - tmsize_t nrows; - TIFF_JSAMPROW bufptr[1]; - short *line16 = NULL; - int line16_count = 0; - - (void)s; - assert(sp != NULL); - /* data is expected to be supplied in multiples of a scanline */ - nrows = cc / sp->bytesperline; - if (cc % sp->bytesperline) - TIFFWarningExtR(tif, tif->tif_name, "fractional scanline discarded"); - - /* The last strip will be limited to image size */ - if (!isTiled(tif) && tif->tif_row + nrows > tif->tif_dir.td_imagelength) - nrows = tif->tif_dir.td_imagelength - tif->tif_row; - - if (sp->cinfo.c.data_precision == 12) - { - line16_count = (int)((sp->bytesperline * 2) / 3); - line16 = (short *)_TIFFmallocExt(tif, sizeof(short) * line16_count); - if (!line16) - { - TIFFErrorExtR(tif, "JPEGEncode", "Failed to allocate memory"); - - return 0; - } - } - - while (nrows-- > 0) - { - - if (sp->cinfo.c.data_precision == 12) - { - - int value_pairs = line16_count / 2; - int iPair; - - bufptr[0] = (TIFF_JSAMPROW)line16; - - for (iPair = 0; iPair < value_pairs; iPair++) - { - unsigned char *in_ptr = ((unsigned char *)buf) + iPair * 3; - TIFF_JSAMPLE *out_ptr = (TIFF_JSAMPLE *)(line16 + iPair * 2); - - out_ptr[0] = (in_ptr[0] << 4) | ((in_ptr[1] & 0xf0) >> 4); - out_ptr[1] = ((in_ptr[1] & 0x0f) << 8) | in_ptr[2]; - } - } - else - { - bufptr[0] = (TIFF_JSAMPROW)buf; - } - if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1) - return (0); - if (nrows > 0) - tif->tif_row++; - buf += sp->bytesperline; - } - - if (sp->cinfo.c.data_precision == 12) - { - _TIFFfreeExt(tif, line16); - } - - return (1); -} - -/* - * Encode a chunk of pixels. - * Incoming data is expected to be downsampled per sampling factors. - */ -static int JPEGEncodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - JPEGState *sp = JState(tif); - TIFF_JSAMPLE *inptr; - TIFF_JSAMPLE *outptr; - tmsize_t nrows; - JDIMENSION clumps_per_line, nclump; - int clumpoffset, ci, xpos, ypos; - jpeg_component_info *compptr; - int samples_per_clump = sp->samplesperclump; - tmsize_t bytesperclumpline; - - (void)s; - assert(sp != NULL); - - if (sp->encode_raw_error) - { - TIFFErrorExtR(tif, tif->tif_name, "JPEGEncodeRaw() already failed"); - return 0; - } - - /* data is expected to be supplied in multiples of a clumpline */ - /* a clumpline is equivalent to v_sampling desubsampled scanlines */ - /* TODO: the following calculation of bytesperclumpline, should substitute - * calculation of sp->bytesperline, except that it is per v_sampling lines - */ - bytesperclumpline = - ((((tmsize_t)sp->cinfo.c.image_width + sp->h_sampling - 1) / - sp->h_sampling) * - ((tmsize_t)sp->h_sampling * sp->v_sampling + 2) * - sp->cinfo.c.data_precision + - 7) / - 8; - - nrows = (cc / bytesperclumpline) * sp->v_sampling; - if (cc % bytesperclumpline) - TIFFWarningExtR(tif, tif->tif_name, "fractional scanline discarded"); - - /* Cb,Cr both have sampling factors 1, so this is correct */ - clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width; - - while (nrows > 0) - { - /* - * Fastest way to separate the data is to make one pass - * over the scanline for each row of each component. - */ - clumpoffset = 0; /* first sample in clump */ - for (ci = 0, compptr = sp->cinfo.c.comp_info; - ci < sp->cinfo.c.num_components; ci++, compptr++) - { - int hsamp = compptr->h_samp_factor; - int vsamp = compptr->v_samp_factor; - int padding = (int)(compptr->width_in_blocks * DCTSIZE - - clumps_per_line * hsamp); - for (ypos = 0; ypos < vsamp; ypos++) - { - inptr = ((TIFF_JSAMPLE *)buf) + clumpoffset; - outptr = sp->ds_buffer[ci][sp->scancount * vsamp + ypos]; - if (hsamp == 1) - { - /* fast path for at least Cb and Cr */ - for (nclump = clumps_per_line; nclump-- > 0;) - { - *outptr++ = inptr[0]; - inptr += samples_per_clump; - } - } - else - { - /* general case */ - for (nclump = clumps_per_line; nclump-- > 0;) - { - for (xpos = 0; xpos < hsamp; xpos++) - *outptr++ = inptr[xpos]; - inptr += samples_per_clump; - } - } - /* pad each scanline as needed */ - for (xpos = 0; xpos < padding; xpos++) - { - *outptr = outptr[-1]; - outptr++; - } - clumpoffset += hsamp; - } - } - sp->scancount++; - if (sp->scancount >= DCTSIZE) - { - int n = sp->cinfo.c.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n) - { - sp->encode_raw_error = TRUE; - return (0); - } - sp->scancount = 0; - } - tif->tif_row += sp->v_sampling; - buf += bytesperclumpline; - nrows -= sp->v_sampling; - } - return (1); -} - -/* - * Finish up at the end of a strip or tile. - */ -static int JPEGPostEncode(TIFF *tif) -{ - JPEGState *sp = JState(tif); - - if (sp->scancount > 0) - { - /* - * Need to emit a partial bufferload of downsampled data. - * Pad the data vertically. - */ - int ci, ypos, n; - jpeg_component_info *compptr; - - for (ci = 0, compptr = sp->cinfo.c.comp_info; - ci < sp->cinfo.c.num_components; ci++, compptr++) - { - int vsamp = compptr->v_samp_factor; - tmsize_t row_width = - compptr->width_in_blocks * DCTSIZE * sizeof(JSAMPLE); - for (ypos = sp->scancount * vsamp; ypos < DCTSIZE * vsamp; ypos++) - { - _TIFFmemcpy((void *)sp->ds_buffer[ci][ypos], - (void *)sp->ds_buffer[ci][ypos - 1], row_width); - } - } - n = sp->cinfo.c.max_v_samp_factor * DCTSIZE; - if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n) - return (0); - } - - return (TIFFjpeg_finish_compress(JState(tif))); -} - -static void JPEGCleanup(TIFF *tif) -{ - JPEGState *sp = JState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->otherSettings.vgetparent; - tif->tif_tagmethods.vsetfield = sp->otherSettings.vsetparent; - tif->tif_tagmethods.printdir = sp->otherSettings.printdir; - if (sp->cinfo_initialized) - TIFFjpeg_destroy(sp); /* release libjpeg resources */ - if (sp->otherSettings.jpegtables) /* tag value */ - _TIFFfreeExt(tif, sp->otherSettings.jpegtables); - _TIFFfreeExt(tif, tif->tif_data); /* release local state */ - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static void JPEGResetUpsampled(TIFF *tif) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - - /* - * Mark whether returned data is up-sampled or not so TIFFStripSize - * and TIFFTileSize return values that reflect the true amount of - * data. - */ - tif->tif_flags &= ~TIFF_UPSAMPLED; - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - if (td->td_photometric == PHOTOMETRIC_YCBCR && - sp->otherSettings.jpegcolormode == JPEGCOLORMODE_RGB) - { - tif->tif_flags |= TIFF_UPSAMPLED; - } - else - { -#ifdef notdef - if (td->td_ycbcrsubsampling[0] != 1 || - td->td_ycbcrsubsampling[1] != 1) - ; /* XXX what about up-sampling? */ -#endif - } - } - - /* - * Must recalculate cached tile size in case sampling state changed. - * Should we really be doing this now if image size isn't set? - */ - if (tif->tif_tilesize > 0) - tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1); - if (tif->tif_scanlinesize > 0) - tif->tif_scanlinesize = TIFFScanlineSize(tif); -} - -static int JPEGVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - JPEGState *sp = JState(tif); - const TIFFField *fip; - uint32_t v32; - - assert(sp != NULL); - - switch (tag) - { - case TIFFTAG_JPEGTABLES: - v32 = (uint32_t)va_arg(ap, uint32_t); - if (v32 == 0) - { - /* XXX */ - return (0); - } - _TIFFsetByteArrayExt(tif, &sp->otherSettings.jpegtables, - va_arg(ap, void *), v32); - sp->otherSettings.jpegtables_length = v32; - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); - break; - case TIFFTAG_JPEGQUALITY: - sp->otherSettings.jpegquality = (int)va_arg(ap, int); - return (1); /* pseudo tag */ - case TIFFTAG_JPEGCOLORMODE: - sp->otherSettings.jpegcolormode = (int)va_arg(ap, int); - JPEGResetUpsampled(tif); - return (1); /* pseudo tag */ - case TIFFTAG_PHOTOMETRIC: - { - int ret_value = (*sp->otherSettings.vsetparent)(tif, tag, ap); - JPEGResetUpsampled(tif); - return ret_value; - } - case TIFFTAG_JPEGTABLESMODE: - sp->otherSettings.jpegtablesmode = (int)va_arg(ap, int); - return (1); /* pseudo tag */ - case TIFFTAG_YCBCRSUBSAMPLING: - /* mark the fact that we have a real ycbcrsubsampling! */ - sp->otherSettings.ycbcrsampling_fetched = 1; - /* should we be recomputing upsampling info here? */ - return (*sp->otherSettings.vsetparent)(tif, tag, ap); - default: - return (*sp->otherSettings.vsetparent)(tif, tag, ap); - } - - if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) - { - TIFFSetFieldBit(tif, fip->field_bit); - } - else - { - return (0); - } - - tif->tif_flags |= TIFF_DIRTYDIRECT; - return (1); -} - -static int JPEGVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - JPEGState *sp = JState(tif); - - assert(sp != NULL); - - switch (tag) - { - case TIFFTAG_JPEGTABLES: - *va_arg(ap, uint32_t *) = sp->otherSettings.jpegtables_length; - *va_arg(ap, const void **) = sp->otherSettings.jpegtables; - break; - case TIFFTAG_JPEGQUALITY: - *va_arg(ap, int *) = sp->otherSettings.jpegquality; - break; - case TIFFTAG_JPEGCOLORMODE: - *va_arg(ap, int *) = sp->otherSettings.jpegcolormode; - break; - case TIFFTAG_JPEGTABLESMODE: - *va_arg(ap, int *) = sp->otherSettings.jpegtablesmode; - break; - default: - return (*sp->otherSettings.vgetparent)(tif, tag, ap); - } - return (1); -} - -static void JPEGPrintDir(TIFF *tif, FILE *fd, long flags) -{ - JPEGState *sp = JState(tif); - - assert(sp != NULL); - (void)flags; - - if (sp != NULL) - { - if (TIFFFieldSet(tif, FIELD_JPEGTABLES)) - fprintf(fd, " JPEG Tables: (%" PRIu32 " bytes)\n", - sp->otherSettings.jpegtables_length); - if (sp->otherSettings.printdir) - (*sp->otherSettings.printdir)(tif, fd, flags); - } -} - -static uint32_t JPEGDefaultStripSize(TIFF *tif, uint32_t s) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - - s = (*sp->otherSettings.defsparent)(tif, s); - if (s < td->td_imagelength) - s = TIFFroundup_32(s, td->td_ycbcrsubsampling[1] * DCTSIZE); - return (s); -} - -static void JPEGDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th) -{ - JPEGState *sp = JState(tif); - TIFFDirectory *td = &tif->tif_dir; - - (*sp->otherSettings.deftparent)(tif, tw, th); - *tw = TIFFroundup_32(*tw, td->td_ycbcrsubsampling[0] * DCTSIZE); - *th = TIFFroundup_32(*th, td->td_ycbcrsubsampling[1] * DCTSIZE); -} - -/* - * The JPEG library initialized used to be done in TIFFInitJPEG(), but - * now that we allow a TIFF file to be opened in update mode it is necessary - * to have some way of deciding whether compression or decompression is - * desired other than looking at tif->tif_mode. We accomplish this by - * examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry. - * If so, we assume decompression is desired. - * - * This is tricky, because TIFFInitJPEG() is called while the directory is - * being read, and generally speaking the BYTECOUNTS tag won't have been read - * at that point. So we try to defer jpeg library initialization till we - * do have that tag ... basically any access that might require the compressor - * or decompressor that occurs after the reading of the directory. - * - * In an ideal world compressors or decompressors would be setup - * at the point where a single tile or strip was accessed (for read or write) - * so that stuff like update of missing tiles, or replacement of tiles could - * be done. However, we aren't trying to crack that nut just yet ... - * - * NFW, Feb 3rd, 2003. - */ - -static int JPEGInitializeLibJPEG(TIFF *tif, int decompress) -{ - JPEGState *sp = JState(tif); - - if (sp->cinfo_initialized) - { - if (!decompress && sp->cinfo.comm.is_decompressor) - TIFFjpeg_destroy(sp); - else if (decompress && !sp->cinfo.comm.is_decompressor) - TIFFjpeg_destroy(sp); - else - return 1; - - sp->cinfo_initialized = 0; - } - - /* - * Initialize libjpeg. - */ - if (decompress) - { - if (!TIFFjpeg_create_decompress(sp)) - return (0); - } - else - { - if (!TIFFjpeg_create_compress(sp)) - return (0); -#ifndef TIFF_JPEG_MAX_MEMORY_TO_USE -#define TIFF_JPEG_MAX_MEMORY_TO_USE (10 * 1024 * 1024) -#endif - /* libjpeg turbo 1.5.2 honours max_memory_to_use, but has no backing */ - /* store implementation, so better not set max_memory_to_use ourselves. - */ - /* See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 */ - if (sp->cinfo.c.mem->max_memory_to_use > 0) - { - /* This is to address bug related in ticket GDAL #1795. */ - if (getenv("JPEGMEM") == NULL) - { - /* Increase the max memory usable. This helps when creating - * files */ - /* with "big" tile, without using libjpeg temporary files. */ - /* For example a 512x512 tile with 3 bands */ - /* requires 1.5 MB which is above libjpeg 1MB default */ - if (sp->cinfo.c.mem->max_memory_to_use < - TIFF_JPEG_MAX_MEMORY_TO_USE) - sp->cinfo.c.mem->max_memory_to_use = - TIFF_JPEG_MAX_MEMORY_TO_USE; - } - } - } - - sp->cinfo_initialized = TRUE; - - return 1; -} - -/* Common to tif_jpeg.c and tif_jpeg_12.c */ -static void TIFFInitJPEGCommon(TIFF *tif) -{ - JPEGState *sp; - - sp = JState(tif); - sp->tif = tif; /* back link */ - - /* Default values for codec-specific fields */ - sp->otherSettings.jpegtables = NULL; - sp->otherSettings.jpegtables_length = 0; - sp->otherSettings.jpegquality = 75; /* Default IJG quality */ - sp->otherSettings.jpegcolormode = JPEGCOLORMODE_RAW; - sp->otherSettings.jpegtablesmode = - JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF; - sp->otherSettings.ycbcrsampling_fetched = 0; - - tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */ - tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */ - tif->tif_tagmethods.printdir = JPEGPrintDir; /* hook for codec tags */ - - /* - * Install codec methods. - */ - tif->tif_fixuptags = JPEGFixupTags; - tif->tif_setupdecode = JPEGSetupDecode; - tif->tif_predecode = JPEGPreDecode; - tif->tif_decoderow = JPEGDecode; - tif->tif_decodestrip = JPEGDecode; - tif->tif_decodetile = JPEGDecode; - tif->tif_setupencode = JPEGSetupEncode; - tif->tif_preencode = JPEGPreEncode; - tif->tif_postencode = JPEGPostEncode; - tif->tif_encoderow = JPEGEncode; - tif->tif_encodestrip = JPEGEncode; - tif->tif_encodetile = JPEGEncode; - tif->tif_cleanup = JPEGCleanup; - - tif->tif_defstripsize = JPEGDefaultStripSize; - tif->tif_deftilesize = JPEGDefaultTileSize; - tif->tif_flags |= TIFF_NOBITREV; /* no bit reversal, please */ - sp->cinfo_initialized = FALSE; -} - -int TIFFInitJPEG(TIFF *tif, int scheme) -{ - JPEGState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_JPEG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, jpegFields, TIFFArrayCount(jpegFields))) - { - TIFFErrorExtR(tif, "TIFFInitJPEG", - "Merging JPEG codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(JPEGState)); - - if (tif->tif_data == NULL) - { - TIFFErrorExtR(tif, "TIFFInitJPEG", "No space for JPEG state block"); - return 0; - } - _TIFFmemset(tif->tif_data, 0, sizeof(JPEGState)); - - sp = JState(tif); - /* - * Override parent get/set field methods. - */ - sp->otherSettings.vgetparent = tif->tif_tagmethods.vgetfield; - sp->otherSettings.vsetparent = tif->tif_tagmethods.vsetfield; - sp->otherSettings.printdir = tif->tif_tagmethods.printdir; - - sp->otherSettings.defsparent = tif->tif_defstripsize; - sp->otherSettings.deftparent = tif->tif_deftilesize; - - TIFFInitJPEGCommon(tif); - - /* - ** Create a JPEGTables field if no directory has yet been created. - ** We do this just to ensure that sufficient space is reserved for - ** the JPEGTables field. It will be properly created the right - ** size later. - */ - if (tif->tif_diroff == 0) - { -#define SIZE_OF_JPEGTABLES 2000 - /* - The following line assumes incorrectly that all JPEG-in-TIFF files will - have a JPEGTABLES tag generated and causes null-filled JPEGTABLES tags - to be written when the JPEG data is placed with TIFFWriteRawStrip. The - field bit should be set, anyway, later when actual JPEGTABLES header is - generated, so removing it here hopefully is harmless. - TIFFSetFieldBit(tif, FIELD_JPEGTABLES); - */ - sp->otherSettings.jpegtables_length = SIZE_OF_JPEGTABLES; - sp->otherSettings.jpegtables = - (void *)_TIFFmallocExt(tif, sp->otherSettings.jpegtables_length); - if (sp->otherSettings.jpegtables) - { - _TIFFmemset(sp->otherSettings.jpegtables, 0, SIZE_OF_JPEGTABLES); - } - else - { - TIFFErrorExtR(tif, "TIFFInitJPEG", - "Failed to allocate memory for JPEG tables"); - return 0; - } -#undef SIZE_OF_JPEGTABLES - } - return 1; -} -#endif /* JPEG_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_jpeg_12.c b/third_party/libtiff/libtiff/tif_jpeg_12.c deleted file mode 100644 index 406e1cf..0000000 --- a/third_party/libtiff/libtiff/tif_jpeg_12.c +++ /dev/null @@ -1,63 +0,0 @@ - -#include "tiffiop.h" - -#if defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) -#define JPEG_DUAL_MODE_8_12 -#endif - -#if defined(JPEG_DUAL_MODE_8_12) - -#define FROM_TIF_JPEG_12 - -#ifdef TIFFInitJPEG -#undef TIFFInitJPEG -#endif -#define TIFFInitJPEG TIFFInitJPEG_12 - -#ifdef TIFFJPEGIsFullStripRequired -#undef TIFFJPEGIsFullStripRequired -#endif -#define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12 - -int TIFFInitJPEG_12(TIFF *tif, int scheme); - -#if !defined(HAVE_JPEGTURBO_DUAL_MODE_8_12) -#include LIBJPEG_12_PATH -#endif - -#include "tif_jpeg.c" - -int TIFFReInitJPEG_12(TIFF *tif, const JPEGOtherSettings *otherSettings, - int scheme, int is_encode) -{ - JPEGState *sp; - uint8_t *new_tif_data; - - (void)scheme; - assert(scheme == COMPRESSION_JPEG); - - new_tif_data = - (uint8_t *)_TIFFreallocExt(tif, tif->tif_data, sizeof(JPEGState)); - - if (new_tif_data == NULL) - { - TIFFErrorExtR(tif, "TIFFReInitJPEG_12", - "No space for JPEG state block"); - return 0; - } - - tif->tif_data = new_tif_data; - _TIFFmemset(tif->tif_data, 0, sizeof(JPEGState)); - - TIFFInitJPEGCommon(tif); - - sp = JState(tif); - sp->otherSettings = *otherSettings; - - if (is_encode) - return JPEGSetupEncode(tif); - else - return JPEGSetupDecode(tif); -} - -#endif /* defined(JPEG_DUAL_MODE_8_12) */ diff --git a/third_party/libtiff/libtiff/tif_lerc.c b/third_party/libtiff/libtiff/tif_lerc.c deleted file mode 100644 index 76d1a7b..0000000 --- a/third_party/libtiff/libtiff/tif_lerc.c +++ /dev/null @@ -1,1545 +0,0 @@ -/* - * Copyright (c) 2018, Even Rouault - * Author: - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LERC_SUPPORT -/* - * TIFF Library. - * - * LERC Compression Support - * - */ - -#include "Lerc_c_api.h" -#include "zlib.h" -#ifdef ZSTD_SUPPORT -#include "zstd.h" -#endif - -#if LIBDEFLATE_SUPPORT -#include "libdeflate.h" -#endif -#define LIBDEFLATE_MAX_COMPRESSION_LEVEL 12 - -#include - -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 - -#ifndef LERC_AT_LEAST_VERSION -#define LERC_AT_LEAST_VERSION(maj, min, patch) 0 -#endif - -/* - * State block for each open TIFF file using LERC compression/decompression. - */ -typedef struct -{ - double maxzerror; /* max z error */ - int lerc_version; - int additional_compression; - int zstd_compress_level; /* zstd */ - int zipquality; /* deflate */ - int state; /* state flags */ - - uint32_t segment_width; - uint32_t segment_height; - - unsigned int uncompressed_size; - unsigned int uncompressed_alloc; - uint8_t *uncompressed_buffer; - unsigned int uncompressed_offset; - - uint8_t *uncompressed_buffer_multiband; - unsigned int uncompressed_buffer_multiband_alloc; - - unsigned int mask_size; - uint8_t *mask_buffer; - - unsigned int compressed_size; - void *compressed_buffer; - -#if LIBDEFLATE_SUPPORT - struct libdeflate_decompressor *libdeflate_dec; - struct libdeflate_compressor *libdeflate_enc; -#endif - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} LERCState; - -#define GetLERCState(tif) ((LERCState *)(tif)->tif_data) -#define LERCDecoderState(tif) GetLERCState(tif) -#define LERCEncoderState(tif) GetLERCState(tif) - -static int LERCDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -static int LERCFixupTags(TIFF *tif) -{ - (void)tif; - return 1; -} - -static int LERCSetupDecode(TIFF *tif) -{ - LERCState *sp = LERCDecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) - { - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - return 1; -} - -static int GetLercDataType(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - static const char module[] = "GetLercDataType"; - - if (td->td_sampleformat == SAMPLEFORMAT_INT && td->td_bitspersample == 8) - { - return 0; - } - - if (td->td_sampleformat == SAMPLEFORMAT_UINT && td->td_bitspersample == 8) - { - return 1; - } - - if (td->td_sampleformat == SAMPLEFORMAT_INT && td->td_bitspersample == 16) - { - return 2; - } - - if (td->td_sampleformat == SAMPLEFORMAT_UINT && td->td_bitspersample == 16) - { - return 3; - } - - if (td->td_sampleformat == SAMPLEFORMAT_INT && td->td_bitspersample == 32) - { - return 4; - } - - if (td->td_sampleformat == SAMPLEFORMAT_UINT && td->td_bitspersample == 32) - { - return 5; - } - - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_bitspersample == 32) - { - return 6; - } - - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_bitspersample == 64) - { - return 7; - } - - TIFFErrorExtR( - tif, module, - "Unsupported combination of SampleFormat and td_bitspersample"); - return -1; -} - -static int SetupBuffers(TIFF *tif, LERCState *sp, const char *module) -{ - TIFFDirectory *td = &tif->tif_dir; - uint64_t new_size_64; - uint64_t new_alloc_64; - unsigned int new_size; - unsigned int new_alloc; - - sp->uncompressed_offset = 0; - - if (isTiled(tif)) - { - sp->segment_width = td->td_tilewidth; - sp->segment_height = td->td_tilelength; - } - else - { - sp->segment_width = td->td_imagewidth; - sp->segment_height = td->td_imagelength - tif->tif_row; - if (sp->segment_height > td->td_rowsperstrip) - sp->segment_height = td->td_rowsperstrip; - } - - new_size_64 = (uint64_t)sp->segment_width * sp->segment_height * - (td->td_bitspersample / 8); - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - new_size_64 *= td->td_samplesperpixel; - } - - new_size = (unsigned int)new_size_64; - sp->uncompressed_size = new_size; - - /* add some margin as we are going to use it also to store deflate/zstd - * compressed data. We also need extra margin when writing very small - * rasters with one mask per band. */ - new_alloc_64 = 256 + new_size_64 + new_size_64 / 3; -#ifdef ZSTD_SUPPORT - { - size_t zstd_max = ZSTD_compressBound((size_t)new_size_64); - if (new_alloc_64 < zstd_max) - { - new_alloc_64 = zstd_max; - } - } -#endif - new_alloc = (unsigned int)new_alloc_64; - if (new_alloc != new_alloc_64) - { - TIFFErrorExtR(tif, module, "Too large uncompressed strip/tile"); - _TIFFfreeExt(tif, sp->uncompressed_buffer); - sp->uncompressed_buffer = NULL; - sp->uncompressed_alloc = 0; - return 0; - } - - if (sp->uncompressed_alloc < new_alloc) - { - _TIFFfreeExt(tif, sp->uncompressed_buffer); - sp->uncompressed_buffer = (uint8_t *)_TIFFmallocExt(tif, new_alloc); - if (!sp->uncompressed_buffer) - { - TIFFErrorExtR(tif, module, "Cannot allocate buffer"); - _TIFFfreeExt(tif, sp->uncompressed_buffer); - sp->uncompressed_buffer = NULL; - sp->uncompressed_alloc = 0; - return 0; - } - sp->uncompressed_alloc = new_alloc; - } - - if ((td->td_planarconfig == PLANARCONFIG_CONTIG && - td->td_extrasamples > 0 && - td->td_sampleinfo[td->td_extrasamples - 1] == EXTRASAMPLE_UNASSALPHA && - GetLercDataType(tif) == 1) || - (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - (td->td_bitspersample == 32 || td->td_bitspersample == 64))) - { - unsigned int mask_size = sp->segment_width * sp->segment_height; -#if LERC_AT_LEAST_VERSION(3, 0, 0) - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_planarconfig == PLANARCONFIG_CONTIG) - { - /* We may need one mask per band */ - mask_size *= td->td_samplesperpixel; - } -#endif - if (sp->mask_size < mask_size) - { - void *mask_buffer = - _TIFFreallocExt(tif, sp->mask_buffer, mask_size); - if (mask_buffer == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate buffer"); - sp->mask_size = 0; - _TIFFfreeExt(tif, sp->uncompressed_buffer); - sp->uncompressed_buffer = NULL; - sp->uncompressed_alloc = 0; - return 0; - } - sp->mask_buffer = (uint8_t *)mask_buffer; - sp->mask_size = mask_size; - } - } - - return 1; -} - -/* - * Setup state for decoding a strip. - */ -static int LERCPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "LERCPreDecode"; - lerc_status lerc_ret; - TIFFDirectory *td = &tif->tif_dir; - LERCState *sp = LERCDecoderState(tif); - int lerc_data_type; - unsigned int infoArray[9]; - unsigned nomask_bands = td->td_samplesperpixel; - int ndims; - int use_mask = 0; - uint8_t *lerc_data = tif->tif_rawcp; - unsigned int lerc_data_size = (unsigned int)tif->tif_rawcc; - - (void)s; - assert(sp != NULL); - if (sp->state != LSTATE_INIT_DECODE) - tif->tif_setupdecode(tif); - - lerc_data_type = GetLercDataType(tif); - if (lerc_data_type < 0) - return 0; - - if (!SetupBuffers(tif, sp, module)) - return 0; - - if (sp->additional_compression != LERC_ADD_COMPRESSION_NONE) - { - if (sp->compressed_size < sp->uncompressed_alloc) - { - _TIFFfreeExt(tif, sp->compressed_buffer); - sp->compressed_buffer = _TIFFmallocExt(tif, sp->uncompressed_alloc); - if (!sp->compressed_buffer) - { - sp->compressed_size = 0; - return 0; - } - sp->compressed_size = sp->uncompressed_alloc; - } - } - - if (sp->additional_compression == LERC_ADD_COMPRESSION_DEFLATE) - { -#if LIBDEFLATE_SUPPORT - enum libdeflate_result res; - size_t lerc_data_sizet = 0; - if (sp->libdeflate_dec == NULL) - { - sp->libdeflate_dec = libdeflate_alloc_decompressor(); - if (sp->libdeflate_dec == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate decompressor"); - return 0; - } - } - - res = libdeflate_zlib_decompress( - sp->libdeflate_dec, tif->tif_rawcp, (size_t)tif->tif_rawcc, - sp->compressed_buffer, sp->compressed_size, &lerc_data_sizet); - if (res != LIBDEFLATE_SUCCESS) - { - TIFFErrorExtR(tif, module, "Decoding error at scanline %lu", - (unsigned long)tif->tif_row); - return 0; - } - assert(lerc_data_sizet == (unsigned int)lerc_data_sizet); - lerc_data = (uint8_t *)sp->compressed_buffer; - lerc_data_size = (unsigned int)lerc_data_sizet; -#else - z_stream strm; - int zlib_ret; - - memset(&strm, 0, sizeof(strm)); - strm.zalloc = NULL; - strm.zfree = NULL; - strm.opaque = NULL; - zlib_ret = inflateInit(&strm); - if (zlib_ret != Z_OK) - { - TIFFErrorExtR(tif, module, "inflateInit() failed"); - inflateEnd(&strm); - return 0; - } - - strm.avail_in = (uInt)tif->tif_rawcc; - strm.next_in = tif->tif_rawcp; - strm.avail_out = sp->compressed_size; - strm.next_out = (Bytef *)sp->compressed_buffer; - zlib_ret = inflate(&strm, Z_FINISH); - if (zlib_ret != Z_STREAM_END && zlib_ret != Z_OK) - { - TIFFErrorExtR(tif, module, "inflate() failed"); - inflateEnd(&strm); - return 0; - } - lerc_data = (uint8_t *)sp->compressed_buffer; - lerc_data_size = sp->compressed_size - strm.avail_out; - inflateEnd(&strm); -#endif - } - else if (sp->additional_compression == LERC_ADD_COMPRESSION_ZSTD) - { -#ifdef ZSTD_SUPPORT - size_t zstd_ret; - - zstd_ret = ZSTD_decompress(sp->compressed_buffer, sp->compressed_size, - tif->tif_rawcp, tif->tif_rawcc); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_decompress(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - lerc_data = (uint8_t *)sp->compressed_buffer; - lerc_data_size = (unsigned int)zstd_ret; -#else - TIFFErrorExtR(tif, module, "ZSTD support missing"); - return 0; -#endif - } - else if (sp->additional_compression != LERC_ADD_COMPRESSION_NONE) - { - TIFFErrorExtR(tif, module, "Unhandled additional compression"); - return 0; - } - - lerc_ret = - lerc_getBlobInfo(lerc_data, lerc_data_size, infoArray, NULL, 9, 0); - if (lerc_ret != 0) - { - TIFFErrorExtR(tif, module, "lerc_getBlobInfo() failed"); - return 0; - } - - /* If the configuration is compatible of a LERC mask, and that the */ - /* LERC info has dim == samplesperpixel - 1, then there is a LERC */ - /* mask. */ - if (td->td_planarconfig == PLANARCONFIG_CONTIG && td->td_extrasamples > 0 && - td->td_sampleinfo[td->td_extrasamples - 1] == EXTRASAMPLE_UNASSALPHA && - GetLercDataType(tif) == 1 && - infoArray[2] == td->td_samplesperpixel - 1U) - { - use_mask = 1; - nomask_bands--; - } - else if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP) - { - use_mask = 1; - } - - ndims = td->td_planarconfig == PLANARCONFIG_CONTIG ? nomask_bands : 1; - - /* Info returned in infoArray is { version, dataType, nDim/nDepth, nCols, - nRows, nBands, nValidPixels, blobSize, - and starting with liblerc 3.0 nRequestedMasks } */ - if (infoArray[0] != (unsigned)sp->lerc_version) - { - TIFFWarningExtR(tif, module, - "Unexpected version number: %d. Expected: %d", - infoArray[0], sp->lerc_version); - } - if (infoArray[1] != (unsigned)lerc_data_type) - { - TIFFErrorExtR(tif, module, "Unexpected dataType: %d. Expected: %d", - infoArray[1], lerc_data_type); - return 0; - } - - const unsigned nFoundDims = infoArray[2]; -#if LERC_AT_LEAST_VERSION(3, 0, 0) - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_planarconfig == PLANARCONFIG_CONTIG && - td->td_samplesperpixel > 1) - { - if (nFoundDims != 1 && nFoundDims != (unsigned)ndims) - { - TIFFErrorExtR(tif, module, "Unexpected nDim: %d. Expected: 1 or %d", - nFoundDims, ndims); - return 0; - } - } - else -#endif - if (nFoundDims != (unsigned)ndims) - { - TIFFErrorExtR(tif, module, "Unexpected nDim: %d. Expected: %d", - nFoundDims, ndims); - return 0; - } - - if (infoArray[3] != sp->segment_width) - { - TIFFErrorExtR(tif, module, "Unexpected nCols: %d. Expected: %du", - infoArray[3], sp->segment_width); - return 0; - } - if (infoArray[4] != sp->segment_height) - { - TIFFErrorExtR(tif, module, "Unexpected nRows: %d. Expected: %u", - infoArray[4], sp->segment_height); - return 0; - } - - const unsigned nFoundBands = infoArray[5]; - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_planarconfig == PLANARCONFIG_CONTIG && - td->td_samplesperpixel > 1 && nFoundDims == 1) - { -#if !LERC_AT_LEAST_VERSION(3, 0, 0) - if (nFoundBands == td->td_samplesperpixel) - { - TIFFErrorExtR( - tif, module, - "Unexpected nBands: %d. This file may have been generated with " - "a liblerc version >= 3.0, with one mask per band, and is not " - "supported by this older version of liblerc", - nFoundBands); - return 0; - } -#endif - if (nFoundBands != td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, "Unexpected nBands: %d. Expected: %d", - nFoundBands, td->td_samplesperpixel); - return 0; - } - } - else if (nFoundBands != 1) - { - TIFFErrorExtR(tif, module, "Unexpected nBands: %d. Expected: %d", - nFoundBands, 1); - return 0; - } - - if (infoArray[7] != lerc_data_size) - { - TIFFErrorExtR(tif, module, "Unexpected blobSize: %d. Expected: %u", - infoArray[7], lerc_data_size); - return 0; - } - - int nRequestedMasks = use_mask ? 1 : 0; -#if LERC_AT_LEAST_VERSION(3, 0, 0) - const int nFoundMasks = infoArray[8]; - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - td->td_planarconfig == PLANARCONFIG_CONTIG && - td->td_samplesperpixel > 1 && nFoundDims == 1) - { - if (nFoundMasks != 0 && nFoundMasks != td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, - "Unexpected nFoundMasks: %d. Expected: 0 or %d", - nFoundMasks, td->td_samplesperpixel); - return 0; - } - nRequestedMasks = nFoundMasks; - } - else - { - if (nFoundMasks != 0 && nFoundMasks != 1) - { - TIFFErrorExtR(tif, module, - "Unexpected nFoundMasks: %d. Expected: 0 or 1", - nFoundMasks); - return 0; - } - } - if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && nFoundMasks == 0) - { - nRequestedMasks = 0; - use_mask = 0; - } -#endif - - const unsigned nb_pixels = sp->segment_width * sp->segment_height; - -#if LERC_AT_LEAST_VERSION(3, 0, 0) - if (nRequestedMasks > 1) - { - unsigned int num_bytes_needed = - nb_pixels * td->td_samplesperpixel * (td->td_bitspersample / 8); - if (sp->uncompressed_buffer_multiband_alloc < num_bytes_needed) - { - _TIFFfreeExt(tif, sp->uncompressed_buffer_multiband); - sp->uncompressed_buffer_multiband = - (uint8_t *)_TIFFmallocExt(tif, num_bytes_needed); - if (!sp->uncompressed_buffer_multiband) - { - sp->uncompressed_buffer_multiband_alloc = 0; - return 0; - } - sp->uncompressed_buffer_multiband_alloc = num_bytes_needed; - } - lerc_ret = lerc_decode(lerc_data, lerc_data_size, nRequestedMasks, - sp->mask_buffer, nFoundDims, sp->segment_width, - sp->segment_height, nFoundBands, lerc_data_type, - sp->uncompressed_buffer_multiband); - } - else -#endif - { - lerc_ret = - lerc_decode(lerc_data, lerc_data_size, -#if LERC_AT_LEAST_VERSION(3, 0, 0) - nRequestedMasks, -#endif - use_mask ? sp->mask_buffer : NULL, nFoundDims, - sp->segment_width, sp->segment_height, nFoundBands, - lerc_data_type, sp->uncompressed_buffer); - } - if (lerc_ret != 0) - { - TIFFErrorExtR(tif, module, "lerc_decode() failed"); - return 0; - } - - /* Interleave alpha mask with other samples. */ - if (use_mask && GetLercDataType(tif) == 1) - { - unsigned src_stride = - (td->td_samplesperpixel - 1) * (td->td_bitspersample / 8); - unsigned dst_stride = - td->td_samplesperpixel * (td->td_bitspersample / 8); - unsigned i = sp->segment_width * sp->segment_height; - /* Operate from end to begin to be able to move in place */ - while (i > 0 && i > nomask_bands) - { - i--; - sp->uncompressed_buffer[i * dst_stride + td->td_samplesperpixel - - 1] = 255 * sp->mask_buffer[i]; - memcpy(sp->uncompressed_buffer + i * dst_stride, - sp->uncompressed_buffer + i * src_stride, src_stride); - } - /* First pixels must use memmove due to overlapping areas */ - while (i > 0) - { - i--; - sp->uncompressed_buffer[i * dst_stride + td->td_samplesperpixel - - 1] = 255 * sp->mask_buffer[i]; - memmove(sp->uncompressed_buffer + i * dst_stride, - sp->uncompressed_buffer + i * src_stride, src_stride); - } - } - else if (use_mask && td->td_sampleformat == SAMPLEFORMAT_IEEEFP) - { - unsigned i; -#if WORDS_BIGENDIAN - const unsigned char nan_bytes[] = {0x7f, 0xc0, 0, 0}; -#else - const unsigned char nan_bytes[] = {0, 0, 0xc0, 0x7f}; -#endif - float nan_float32; - memcpy(&nan_float32, nan_bytes, 4); - - if (td->td_planarconfig == PLANARCONFIG_SEPARATE || - td->td_samplesperpixel == 1) - { - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - if (sp->mask_buffer[i] == 0) - ((float *)sp->uncompressed_buffer)[i] = nan_float32; - } - } - else - { - const double nan_float64 = nan_float32; - for (i = 0; i < nb_pixels; i++) - { - if (sp->mask_buffer[i] == 0) - ((double *)sp->uncompressed_buffer)[i] = nan_float64; - } - } - } - else if (nRequestedMasks == 1) - { - assert(nFoundDims == td->td_samplesperpixel); - assert(nFoundBands == 1); - - unsigned k = 0; - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; j++) - { - if (sp->mask_buffer[i] == 0) - ((float *)sp->uncompressed_buffer)[k] = nan_float32; - ++k; - } - } - } - else - { - const double nan_float64 = nan_float32; - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; j++) - { - if (sp->mask_buffer[i] == 0) - ((double *)sp->uncompressed_buffer)[k] = - nan_float64; - ++k; - } - } - } - } -#if LERC_AT_LEAST_VERSION(3, 0, 0) - else - { - assert(nRequestedMasks == td->td_samplesperpixel); - assert(nFoundDims == 1); - assert(nFoundBands == td->td_samplesperpixel); - - unsigned k = 0; - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; j++) - { - if (sp->mask_buffer[i + j * nb_pixels] == 0) - ((float *)sp->uncompressed_buffer)[k] = nan_float32; - else - ((float *)sp->uncompressed_buffer)[k] = - ((float *)sp->uncompressed_buffer_multiband) - [i + j * nb_pixels]; - ++k; - } - } - } - else - { - const double nan_float64 = nan_float32; - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; j++) - { - if (sp->mask_buffer[i + j * nb_pixels] == 0) - ((double *)sp->uncompressed_buffer)[k] = - nan_float64; - else - ((double *)sp->uncompressed_buffer)[k] = - ((double *)sp->uncompressed_buffer_multiband) - [i + j * nb_pixels]; - ++k; - } - } - } - } -#endif - } - - return 1; -} - -/* - * Decode a strip, tile or scanline. - */ -static int LERCDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "LERCDecode"; - LERCState *sp = LERCDecoderState(tif); - - (void)s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - if (sp->uncompressed_buffer == NULL) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "Uncompressed buffer not allocated"); - return 0; - } - - if ((uint64_t)sp->uncompressed_offset + (uint64_t)occ > - sp->uncompressed_size) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "Too many bytes read"); - return 0; - } - - memcpy(op, sp->uncompressed_buffer + sp->uncompressed_offset, occ); - sp->uncompressed_offset += (unsigned)occ; - - return 1; -} - -#ifndef LERC_READ_ONLY - -static int LERCSetupEncode(TIFF *tif) -{ - LERCState *sp = LERCEncoderState(tif); - - assert(sp != NULL); - if (sp->state & LSTATE_INIT_DECODE) - { - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int LERCPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "LERCPreEncode"; - LERCState *sp = LERCEncoderState(tif); - int lerc_data_type; - - (void)s; - assert(sp != NULL); - if (sp->state != LSTATE_INIT_ENCODE) - tif->tif_setupencode(tif); - - lerc_data_type = GetLercDataType(tif); - if (lerc_data_type < 0) - return 0; - - if (!SetupBuffers(tif, sp, module)) - return 0; - - return 1; -} - -/* - * Encode a chunk of pixels. - */ -static int LERCEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "LERCEncode"; - LERCState *sp = LERCEncoderState(tif); - - (void)s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - if ((uint64_t)sp->uncompressed_offset + (uint64_t)cc > - sp->uncompressed_size) - { - TIFFErrorExtR(tif, module, "Too many bytes written"); - return 0; - } - - memcpy(sp->uncompressed_buffer + sp->uncompressed_offset, bp, cc); - sp->uncompressed_offset += (unsigned)cc; - - return 1; -} - -/* - * Finish off an encoded strip by flushing it. - */ -static int LERCPostEncode(TIFF *tif) -{ - lerc_status lerc_ret; - static const char module[] = "LERCPostEncode"; - LERCState *sp = LERCEncoderState(tif); - unsigned int numBytesWritten = 0; - TIFFDirectory *td = &tif->tif_dir; - int use_mask = 0; - unsigned dst_nbands = td->td_samplesperpixel; - - if (sp->uncompressed_offset != sp->uncompressed_size) - { - TIFFErrorExtR(tif, module, "Unexpected number of bytes in the buffer"); - return 0; - } - - int mask_count = 1; - const unsigned nb_pixels = sp->segment_width * sp->segment_height; - - /* Extract alpha mask (if containing only 0 and 255 values, */ - /* and compact array of regular bands */ - if (td->td_planarconfig == PLANARCONFIG_CONTIG && td->td_extrasamples > 0 && - td->td_sampleinfo[td->td_extrasamples - 1] == EXTRASAMPLE_UNASSALPHA && - GetLercDataType(tif) == 1) - { - const unsigned dst_stride = - (td->td_samplesperpixel - 1) * (td->td_bitspersample / 8); - const unsigned src_stride = - td->td_samplesperpixel * (td->td_bitspersample / 8); - unsigned i = 0; - - use_mask = 1; - for (i = 0; i < nb_pixels; i++) - { - int v = sp->uncompressed_buffer[i * src_stride + - td->td_samplesperpixel - 1]; - if (v != 0 && v != 255) - { - use_mask = 0; - break; - } - } - - if (use_mask) - { - dst_nbands--; - /* First pixels must use memmove due to overlapping areas */ - for (i = 0; i < dst_nbands && i < nb_pixels; i++) - { - memmove(sp->uncompressed_buffer + i * dst_stride, - sp->uncompressed_buffer + i * src_stride, dst_stride); - sp->mask_buffer[i] = - sp->uncompressed_buffer[i * src_stride + - td->td_samplesperpixel - 1]; - } - for (; i < nb_pixels; i++) - { - memcpy(sp->uncompressed_buffer + i * dst_stride, - sp->uncompressed_buffer + i * src_stride, dst_stride); - sp->mask_buffer[i] = - sp->uncompressed_buffer[i * src_stride + - td->td_samplesperpixel - 1]; - } - } - } - else if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP && - (td->td_bitspersample == 32 || td->td_bitspersample == 64)) - { - /* Check for NaN values */ - unsigned i; - if (td->td_bitspersample == 32) - { - if (td->td_planarconfig == PLANARCONFIG_CONTIG && dst_nbands > 1) - { - unsigned k = 0; - for (i = 0; i < nb_pixels; i++) - { - int count_nan = 0; - for (int j = 0; j < td->td_samplesperpixel; ++j) - { - const float val = ((float *)sp->uncompressed_buffer)[k]; - ++k; - if (val != val) - { - ++count_nan; - } - } - if (count_nan > 0) - { - use_mask = 1; - if (count_nan < td->td_samplesperpixel) - { - mask_count = td->td_samplesperpixel; - break; - } - } - } - } - else - { - for (i = 0; i < nb_pixels; i++) - { - const float val = ((float *)sp->uncompressed_buffer)[i]; - if (val != val) - { - use_mask = 1; - break; - } - } - } - } - else - { - if (td->td_planarconfig == PLANARCONFIG_CONTIG && dst_nbands > 1) - { - unsigned k = 0; - for (i = 0; i < nb_pixels; i++) - { - int count_nan = 0; - for (int j = 0; j < td->td_samplesperpixel; ++j) - { - const double val = - ((double *)sp->uncompressed_buffer)[k]; - ++k; - if (val != val) - { - ++count_nan; - } - } - if (count_nan > 0) - { - use_mask = 1; - if (count_nan < td->td_samplesperpixel) - { - mask_count = td->td_samplesperpixel; - break; - } - } - } - } - else - { - for (i = 0; i < nb_pixels; i++) - { - const double val = ((double *)sp->uncompressed_buffer)[i]; - if (val != val) - { - use_mask = 1; - break; - } - } - } - } - - if (use_mask) - { - if (mask_count > 1) - { -#if LERC_AT_LEAST_VERSION(3, 0, 0) - unsigned int num_bytes_needed = - nb_pixels * dst_nbands * (td->td_bitspersample / 8); - if (sp->uncompressed_buffer_multiband_alloc < num_bytes_needed) - { - _TIFFfreeExt(tif, sp->uncompressed_buffer_multiband); - sp->uncompressed_buffer_multiband = - (uint8_t *)_TIFFmallocExt(tif, num_bytes_needed); - if (!sp->uncompressed_buffer_multiband) - { - sp->uncompressed_buffer_multiband_alloc = 0; - return 0; - } - sp->uncompressed_buffer_multiband_alloc = num_bytes_needed; - } - - unsigned k = 0; - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; ++j) - { - const float val = - ((float *)sp->uncompressed_buffer)[k]; - ((float *)sp->uncompressed_buffer_multiband) - [i + j * nb_pixels] = val; - ++k; - sp->mask_buffer[i + j * nb_pixels] = - (val == val) ? 255 : 0; - } - } - } - else - { - for (i = 0; i < nb_pixels; i++) - { - for (int j = 0; j < td->td_samplesperpixel; ++j) - { - const double val = - ((double *)sp->uncompressed_buffer)[k]; - ((double *)sp->uncompressed_buffer_multiband) - [i + j * nb_pixels] = val; - ++k; - sp->mask_buffer[i + j * nb_pixels] = - (val == val) ? 255 : 0; - } - } - } -#else - TIFFErrorExtR(tif, module, - "lerc_encode() would need to create one mask per " - "sample, but this requires liblerc >= 3.0"); - return 0; -#endif - } - else if (td->td_planarconfig == PLANARCONFIG_CONTIG && - dst_nbands > 1) - { - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - const float val = - ((float *)sp->uncompressed_buffer)[i * dst_nbands]; - sp->mask_buffer[i] = (val == val) ? 255 : 0; - } - } - else - { - for (i = 0; i < nb_pixels; i++) - { - const double val = - ((double *)sp->uncompressed_buffer)[i * dst_nbands]; - sp->mask_buffer[i] = (val == val) ? 255 : 0; - } - } - } - else - { - if (td->td_bitspersample == 32) - { - for (i = 0; i < nb_pixels; i++) - { - const float val = ((float *)sp->uncompressed_buffer)[i]; - sp->mask_buffer[i] = (val == val) ? 255 : 0; - } - } - else - { - for (i = 0; i < nb_pixels; i++) - { - const double val = - ((double *)sp->uncompressed_buffer)[i]; - sp->mask_buffer[i] = (val == val) ? 255 : 0; - } - } - } - } - } - - unsigned int estimated_compressed_size = sp->uncompressed_alloc; -#if LERC_AT_LEAST_VERSION(3, 0, 0) - if (mask_count > 1) - { - estimated_compressed_size += nb_pixels * mask_count / 8; - } -#endif - - if (sp->compressed_size < estimated_compressed_size) - { - _TIFFfreeExt(tif, sp->compressed_buffer); - sp->compressed_buffer = _TIFFmallocExt(tif, estimated_compressed_size); - if (!sp->compressed_buffer) - { - sp->compressed_size = 0; - return 0; - } - sp->compressed_size = estimated_compressed_size; - } - -#if LERC_AT_LEAST_VERSION(3, 0, 0) - if (mask_count > 1) - { - lerc_ret = lerc_encodeForVersion( - sp->uncompressed_buffer_multiband, sp->lerc_version, - GetLercDataType(tif), 1, sp->segment_width, sp->segment_height, - dst_nbands, dst_nbands, sp->mask_buffer, sp->maxzerror, - (unsigned char *)sp->compressed_buffer, sp->compressed_size, - &numBytesWritten); - } - else -#endif - { - lerc_ret = lerc_encodeForVersion( - sp->uncompressed_buffer, sp->lerc_version, GetLercDataType(tif), - td->td_planarconfig == PLANARCONFIG_CONTIG ? dst_nbands : 1, - sp->segment_width, sp->segment_height, 1, -#if LERC_AT_LEAST_VERSION(3, 0, 0) - use_mask ? 1 : 0, -#endif - use_mask ? sp->mask_buffer : NULL, sp->maxzerror, - (unsigned char *)sp->compressed_buffer, sp->compressed_size, - &numBytesWritten); - } - if (lerc_ret != 0) - { - TIFFErrorExtR(tif, module, "lerc_encode() failed"); - return 0; - } - assert(numBytesWritten < estimated_compressed_size); - - if (sp->additional_compression == LERC_ADD_COMPRESSION_DEFLATE) - { -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_enc == NULL) - { - /* To get results as good as zlib, we ask for an extra */ - /* level of compression */ - sp->libdeflate_enc = libdeflate_alloc_compressor( - sp->zipquality == Z_DEFAULT_COMPRESSION ? 7 - : sp->zipquality >= 6 && sp->zipquality <= 9 - ? sp->zipquality + 1 - : sp->zipquality); - if (sp->libdeflate_enc == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate compressor"); - return 0; - } - } - - /* Should not happen normally */ - if (libdeflate_zlib_compress_bound( - sp->libdeflate_enc, numBytesWritten) > sp->uncompressed_alloc) - { - TIFFErrorExtR(tif, module, - "Output buffer for libdeflate too small"); - return 0; - } - - tif->tif_rawcc = libdeflate_zlib_compress( - sp->libdeflate_enc, sp->compressed_buffer, numBytesWritten, - sp->uncompressed_buffer, sp->uncompressed_alloc); - - if (tif->tif_rawcc == 0) - { - TIFFErrorExtR(tif, module, "Encoder error at scanline %lu", - (unsigned long)tif->tif_row); - return 0; - } -#else - z_stream strm; - int zlib_ret; - int cappedQuality = sp->zipquality; - if (cappedQuality > Z_BEST_COMPRESSION) - cappedQuality = Z_BEST_COMPRESSION; - - memset(&strm, 0, sizeof(strm)); - strm.zalloc = NULL; - strm.zfree = NULL; - strm.opaque = NULL; - zlib_ret = deflateInit(&strm, cappedQuality); - if (zlib_ret != Z_OK) - { - TIFFErrorExtR(tif, module, "deflateInit() failed"); - return 0; - } - - strm.avail_in = numBytesWritten; - strm.next_in = sp->compressed_buffer; - strm.avail_out = sp->uncompressed_alloc; - strm.next_out = sp->uncompressed_buffer; - zlib_ret = deflate(&strm, Z_FINISH); - if (zlib_ret == Z_STREAM_END) - { - tif->tif_rawcc = sp->uncompressed_alloc - strm.avail_out; - } - deflateEnd(&strm); - if (zlib_ret != Z_STREAM_END) - { - TIFFErrorExtR(tif, module, "deflate() failed"); - return 0; - } -#endif - { - int ret; - uint8_t *tif_rawdata_backup = tif->tif_rawdata; - tif->tif_rawdata = sp->uncompressed_buffer; - ret = TIFFFlushData1(tif); - tif->tif_rawdata = tif_rawdata_backup; - if (!ret) - { - return 0; - } - } - } - else if (sp->additional_compression == LERC_ADD_COMPRESSION_ZSTD) - { -#ifdef ZSTD_SUPPORT - size_t zstd_ret = ZSTD_compress( - sp->uncompressed_buffer, sp->uncompressed_alloc, - sp->compressed_buffer, numBytesWritten, sp->zstd_compress_level); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_compress(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - { - int ret; - uint8_t *tif_rawdata_backup = tif->tif_rawdata; - tif->tif_rawdata = sp->uncompressed_buffer; - tif->tif_rawcc = zstd_ret; - ret = TIFFFlushData1(tif); - tif->tif_rawdata = tif_rawdata_backup; - if (!ret) - { - return 0; - } - } -#else - TIFFErrorExtR(tif, module, "ZSTD support missing"); - return 0; -#endif - } - else if (sp->additional_compression != LERC_ADD_COMPRESSION_NONE) - { - TIFFErrorExtR(tif, module, "Unhandled additional compression"); - return 0; - } - else - { - int ret; - uint8_t *tif_rawdata_backup = tif->tif_rawdata; - tif->tif_rawdata = (uint8_t *)sp->compressed_buffer; - tif->tif_rawcc = numBytesWritten; - ret = TIFFFlushData1(tif); - tif->tif_rawdata = tif_rawdata_backup; - if (!ret) - return 0; - } - - return 1; -} - -#endif /* LERC_READ_ONLY */ - -static void LERCCleanup(TIFF *tif) -{ - LERCState *sp = GetLERCState(tif); - - assert(sp != NULL); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - _TIFFfreeExt(tif, sp->uncompressed_buffer); - _TIFFfreeExt(tif, sp->uncompressed_buffer_multiband); - _TIFFfreeExt(tif, sp->compressed_buffer); - _TIFFfreeExt(tif, sp->mask_buffer); - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_dec) - libdeflate_free_decompressor(sp->libdeflate_dec); - if (sp->libdeflate_enc) - libdeflate_free_compressor(sp->libdeflate_enc); -#endif - - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static const TIFFField LERCFields[] = { - {TIFFTAG_LERC_PARAMETERS, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_LONG, 0, - TIFF_SETGET_C32_UINT32, FIELD_CUSTOM, FALSE, TRUE, - (char *)"LercParameters", NULL}, - {TIFFTAG_LERC_MAXZERROR, 0, 0, TIFF_ANY, 0, TIFF_SETGET_DOUBLE, - FIELD_PSEUDO, TRUE, FALSE, (char *)"LercMaximumError", NULL}, - {TIFFTAG_LERC_VERSION, 0, 0, TIFF_ANY, 0, TIFF_SETGET_UINT32, FIELD_PSEUDO, - FALSE, FALSE, (char *)"LercVersion", NULL}, - {TIFFTAG_LERC_ADD_COMPRESSION, 0, 0, TIFF_ANY, 0, TIFF_SETGET_UINT32, - FIELD_PSEUDO, FALSE, FALSE, (char *)"LercAdditionalCompression", NULL}, - {TIFFTAG_ZSTD_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, (char *)"ZSTD zstd_compress_level", NULL}, - {TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, (char *)"", NULL}, -}; - -static int LERCVSetFieldBase(TIFF *tif, uint32_t tag, ...) -{ - LERCState *sp = GetLERCState(tif); - int ret; - va_list ap; - va_start(ap, tag); - ret = (*sp->vsetparent)(tif, tag, ap); - va_end(ap); - return ret; -} - -static int LERCVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "LERCVSetField"; - LERCState *sp = GetLERCState(tif); - - switch (tag) - { - case TIFFTAG_LERC_PARAMETERS: - { - uint32_t count = va_arg(ap, int); - int *params = va_arg(ap, int *); - if (count < 2) - { - TIFFErrorExtR(tif, module, - "Invalid count for LercParameters: %u", count); - return 0; - } - sp->lerc_version = params[0]; - sp->additional_compression = params[1]; - return LERCVSetFieldBase(tif, TIFFTAG_LERC_PARAMETERS, count, - params); - } - case TIFFTAG_LERC_MAXZERROR: - sp->maxzerror = va_arg(ap, double); - return 1; - case TIFFTAG_LERC_VERSION: - { - int params[2] = {0, 0}; - int version = va_arg(ap, int); - if (version != LERC_VERSION_2_4) - { - TIFFErrorExtR(tif, module, "Invalid value for LercVersion: %d", - version); - return 0; - } - sp->lerc_version = version; - params[0] = sp->lerc_version; - params[1] = sp->additional_compression; - return LERCVSetFieldBase(tif, TIFFTAG_LERC_PARAMETERS, 2, params); - } - case TIFFTAG_LERC_ADD_COMPRESSION: - { - int params[2] = {0, 0}; - int additional_compression = va_arg(ap, int); -#ifndef ZSTD_SUPPORT - if (additional_compression == LERC_ADD_COMPRESSION_ZSTD) - { - TIFFErrorExtR(tif, module, - "LERC_ZSTD requested, but ZSTD not available"); - return 0; - } -#endif - if (additional_compression != LERC_ADD_COMPRESSION_NONE && - additional_compression != LERC_ADD_COMPRESSION_DEFLATE && - additional_compression != LERC_ADD_COMPRESSION_ZSTD) - { - TIFFErrorExtR(tif, module, - "Invalid value for LercAdditionalCompression: %d", - additional_compression); - return 0; - } - sp->additional_compression = additional_compression; - params[0] = sp->lerc_version; - params[1] = sp->additional_compression; - return LERCVSetFieldBase(tif, TIFFTAG_LERC_PARAMETERS, 2, params); - } -#ifdef ZSTD_SUPPORT - case TIFFTAG_ZSTD_LEVEL: - { - sp->zstd_compress_level = (int)va_arg(ap, int); - if (sp->zstd_compress_level <= 0 || - sp->zstd_compress_level > ZSTD_maxCLevel()) - { - TIFFWarningExtR(tif, module, - "ZSTD_LEVEL should be between 1 and %d", - ZSTD_maxCLevel()); - } - return 1; - } -#endif - case TIFFTAG_ZIPQUALITY: - { - sp->zipquality = (int)va_arg(ap, int); - if (sp->zipquality < Z_DEFAULT_COMPRESSION || - sp->zipquality > LIBDEFLATE_MAX_COMPRESSION_LEVEL) - { - TIFFErrorExtR( - tif, module, - "Invalid ZipQuality value. Should be in [-1,%d] range", - LIBDEFLATE_MAX_COMPRESSION_LEVEL); - return 0; - } - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_enc) - { - libdeflate_free_compressor(sp->libdeflate_enc); - sp->libdeflate_enc = NULL; - } -#endif - - return (1); - } - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int LERCVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - LERCState *sp = GetLERCState(tif); - - switch (tag) - { - case TIFFTAG_LERC_MAXZERROR: - *va_arg(ap, double *) = sp->maxzerror; - break; - case TIFFTAG_LERC_VERSION: - *va_arg(ap, int *) = sp->lerc_version; - break; - case TIFFTAG_LERC_ADD_COMPRESSION: - *va_arg(ap, int *) = sp->additional_compression; - break; - case TIFFTAG_ZSTD_LEVEL: - *va_arg(ap, int *) = sp->zstd_compress_level; - break; - case TIFFTAG_ZIPQUALITY: - *va_arg(ap, int *) = sp->zipquality; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -int TIFFInitLERC(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitLERC"; - LERCState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_LERC); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, LERCFields, TIFFArrayCount(LERCFields))) - { - TIFFErrorExtR(tif, module, "Merging LERC codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFcallocExt(tif, 1, sizeof(LERCState)); - if (tif->tif_data == NULL) - goto bad; - sp = GetLERCState(tif); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = LERCVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = LERCVSetField; /* hook for codec tags */ - - /* - * Install codec methods. - */ - tif->tif_fixuptags = LERCFixupTags; - tif->tif_setupdecode = LERCSetupDecode; - tif->tif_predecode = LERCPreDecode; - tif->tif_decoderow = LERCDecode; - tif->tif_decodestrip = LERCDecode; - tif->tif_decodetile = LERCDecode; -#ifndef LERC_READ_ONLY - tif->tif_setupencode = LERCSetupEncode; - tif->tif_preencode = LERCPreEncode; - tif->tif_postencode = LERCPostEncode; - tif->tif_encoderow = LERCEncode; - tif->tif_encodestrip = LERCEncode; - tif->tif_encodetile = LERCEncode; -#endif - tif->tif_cleanup = LERCCleanup; - - /* Default values for codec-specific fields */ - TIFFSetField(tif, TIFFTAG_LERC_VERSION, LERC_VERSION_2_4); - TIFFSetField(tif, TIFFTAG_LERC_ADD_COMPRESSION, LERC_ADD_COMPRESSION_NONE); - sp->maxzerror = 0.0; - sp->zstd_compress_level = 9; /* default comp. level */ - sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; - - return 1; -bad: - TIFFErrorExtR(tif, module, "No space for LERC state block"); - return 0; -} -#endif /* LERC_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_luv.c b/third_party/libtiff/libtiff/tif_luv.c deleted file mode 100644 index ecc3225..0000000 --- a/third_party/libtiff/libtiff/tif_luv.c +++ /dev/null @@ -1,1855 +0,0 @@ -/* - * Copyright (c) 1997 Greg Ward Larson - * Copyright (c) 1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler, Greg Larson and Silicon Graphics may not be used in any - * advertising or publicity relating to the software without the specific, - * prior written permission of Sam Leffler, Greg Larson and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE - * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LOGLUV_SUPPORT - -/* - * TIFF Library. - * LogLuv compression support for high dynamic range images. - * - * Contributed by Greg Larson. - * - * LogLuv image support uses the TIFF library to store 16 or 10-bit - * log luminance values with 8 bits each of u and v or a 14-bit index. - * - * The codec can take as input and produce as output 32-bit IEEE float values - * as well as 16-bit integer values. A 16-bit luminance is interpreted - * as a sign bit followed by a 15-bit integer that is converted - * to and from a linear magnitude using the transformation: - * - * L = 2^( (Le+.5)/256 - 64 ) # real from 15-bit - * - * Le = floor( 256*(log2(L) + 64) ) # 15-bit from real - * - * The actual conversion to world luminance units in candelas per sq. meter - * requires an additional multiplier, which is stored in the TIFFTAG_STONITS. - * This value is usually set such that a reasonable exposure comes from - * clamping decoded luminances above 1 to 1 in the displayed image. - * - * The 16-bit values for u and v may be converted to real values by dividing - * each by 32768. (This allows for negative values, which aren't useful as - * far as we know, but are left in case of future improvements in human - * color vision.) - * - * Conversion from (u,v), which is actually the CIE (u',v') system for - * you color scientists, is accomplished by the following transformation: - * - * u = 4*x / (-2*x + 12*y + 3) - * v = 9*y / (-2*x + 12*y + 3) - * - * x = 9*u / (6*u - 16*v + 12) - * y = 4*v / (6*u - 16*v + 12) - * - * This process is greatly simplified by passing 32-bit IEEE floats - * for each of three CIE XYZ coordinates. The codec then takes care - * of conversion to and from LogLuv, though the application is still - * responsible for interpreting the TIFFTAG_STONITS calibration factor. - * - * By definition, a CIE XYZ vector of [1 1 1] corresponds to a neutral white - * point of (x,y)=(1/3,1/3). However, most color systems assume some other - * white point, such as D65, and an absolute color conversion to XYZ then - * to another color space with a different white point may introduce an - * unwanted color cast to the image. It is often desirable, therefore, to - * perform a white point conversion that maps the input white to [1 1 1] - * in XYZ, then record the original white point using the TIFFTAG_WHITEPOINT - * tag value. A decoder that demands absolute color calibration may use - * this white point tag to get back the original colors, but usually it - * will be ignored and the new white point will be used instead that - * matches the output color space. - * - * Pixel information is compressed into one of two basic encodings, depending - * on the setting of the compression tag, which is one of COMPRESSION_SGILOG - * or COMPRESSION_SGILOG24. For COMPRESSION_SGILOG, greyscale data is - * stored as: - * - * 1 15 - * |-+---------------| - * - * COMPRESSION_SGILOG color data is stored as: - * - * 1 15 8 8 - * |-+---------------|--------+--------| - * S Le ue ve - * - * For the 24-bit COMPRESSION_SGILOG24 color format, the data is stored as: - * - * 10 14 - * |----------|--------------| - * Le' Ce - * - * There is no sign bit in the 24-bit case, and the (u,v) chromaticity is - * encoded as an index for optimal color resolution. The 10 log bits are - * defined by the following conversions: - * - * L = 2^((Le'+.5)/64 - 12) # real from 10-bit - * - * Le' = floor( 64*(log2(L) + 12) ) # 10-bit from real - * - * The 10 bits of the smaller format may be converted into the 15 bits of - * the larger format by multiplying by 4 and adding 13314. Obviously, - * a smaller range of magnitudes is covered (about 5 orders of magnitude - * instead of 38), and the lack of a sign bit means that negative luminances - * are not allowed. (Well, they aren't allowed in the real world, either, - * but they are useful for certain types of image processing.) - * - * The desired user format is controlled by the setting the internal - * pseudo tag TIFFTAG_SGILOGDATAFMT to one of: - * SGILOGDATAFMT_FLOAT = IEEE 32-bit float XYZ values - * SGILOGDATAFMT_16BIT = 16-bit integer encodings of logL, u and v - * Raw data i/o is also possible using: - * SGILOGDATAFMT_RAW = 32-bit unsigned integer with encoded pixel - * In addition, the following decoding is provided for ease of display: - * SGILOGDATAFMT_8BIT = 8-bit default RGB gamma-corrected values - * - * For grayscale images, we provide the following data formats: - * SGILOGDATAFMT_FLOAT = IEEE 32-bit float Y values - * SGILOGDATAFMT_16BIT = 16-bit integer w/ encoded luminance - * SGILOGDATAFMT_8BIT = 8-bit gray monitor values - * - * Note that the COMPRESSION_SGILOG applies a simple run-length encoding - * scheme by separating the logL, u and v bytes for each row and applying - * a PackBits type of compression. Since the 24-bit encoding is not - * adaptive, the 32-bit color format takes less space in many cases. - * - * Further control is provided over the conversion from higher-resolution - * formats to final encoded values through the pseudo tag - * TIFFTAG_SGILOGENCODE: - * SGILOGENCODE_NODITHER = do not dither encoded values - * SGILOGENCODE_RANDITHER = apply random dithering during encoding - * - * The default value of this tag is SGILOGENCODE_NODITHER for - * COMPRESSION_SGILOG to maximize run-length encoding and - * SGILOGENCODE_RANDITHER for COMPRESSION_SGILOG24 to turn - * quantization errors into noise. - */ - -#include -#include -#include -#include -#include - -/* - * State block for each open TIFF - * file using LogLuv compression/decompression. - */ -typedef struct logLuvState LogLuvState; - -struct logLuvState -{ - int encoder_state; /* 1 if encoder correctly initialized */ - int user_datafmt; /* user data format */ - int encode_meth; /* encoding method */ - int pixel_size; /* bytes per pixel */ - - uint8_t *tbuf; /* translation buffer */ - tmsize_t tbuflen; /* buffer length */ - void (*tfunc)(LogLuvState *, uint8_t *, tmsize_t); - - TIFFVSetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -}; - -#define DecoderState(tif) ((LogLuvState *)(tif)->tif_data) -#define EncoderState(tif) ((LogLuvState *)(tif)->tif_data) - -#define SGILOGDATAFMT_UNKNOWN -1 - -#define MINRUN 4 /* minimum run length */ - -/* - * Decode a string of 16-bit gray pixels. - */ -static int LogL16Decode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "LogL16Decode"; - LogLuvState *sp = DecoderState(tif); - int shft; - tmsize_t i; - tmsize_t npixels; - unsigned char *bp; - int16_t *tp; - int16_t b; - tmsize_t cc; - int rc; - - (void)s; - assert(s == 0); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_16BIT) - tp = (int16_t *)op; - else - { - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - tp = (int16_t *)sp->tbuf; - } - _TIFFmemset((void *)tp, 0, npixels * sizeof(tp[0])); - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - /* get each byte string */ - for (shft = 8; shft >= 0; shft -= 8) - { - for (i = 0; i < npixels && cc > 0;) - { - if (*bp >= 128) - { /* run */ - if (cc < 2) - break; - rc = *bp++ + (2 - 128); - b = (int16_t)(*bp++ << shft); - cc -= 2; - while (rc-- && i < npixels) - tp[i++] |= b; - } - else - { /* non-run */ - rc = *bp++; /* nul is noop */ - while (--cc && rc-- && i < npixels) - tp[i++] |= (int16_t)*bp++ << shft; - } - } - if (i != npixels) - { - TIFFErrorExtR(tif, module, - "Not enough data at row %" PRIu32 - " (short %" TIFF_SSIZE_FORMAT " pixels)", - tif->tif_row, npixels - i); - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - return (0); - } - } - (*sp->tfunc)(sp, op, npixels); - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - return (1); -} - -/* - * Decode a string of 24-bit pixels. - */ -static int LogLuvDecode24(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "LogLuvDecode24"; - LogLuvState *sp = DecoderState(tif); - tmsize_t cc; - tmsize_t i; - tmsize_t npixels; - unsigned char *bp; - uint32_t *tp; - - (void)s; - assert(s == 0); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32_t *)op; - else - { - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - tp = (uint32_t *)sp->tbuf; - } - /* copy to array of uint32_t */ - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - for (i = 0; i < npixels && cc >= 3; i++) - { - tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2]; - bp += 3; - cc -= 3; - } - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - if (i != npixels) - { - TIFFErrorExtR(tif, module, - "Not enough data at row %" PRIu32 - " (short %" TIFF_SSIZE_FORMAT " pixels)", - tif->tif_row, npixels - i); - return (0); - } - (*sp->tfunc)(sp, op, npixels); - return (1); -} - -/* - * Decode a string of 32-bit pixels. - */ -static int LogLuvDecode32(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "LogLuvDecode32"; - LogLuvState *sp; - int shft; - tmsize_t i; - tmsize_t npixels; - unsigned char *bp; - uint32_t *tp; - uint32_t b; - tmsize_t cc; - int rc; - - (void)s; - assert(s == 0); - sp = DecoderState(tif); - assert(sp != NULL); - - npixels = occ / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32_t *)op; - else - { - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - tp = (uint32_t *)sp->tbuf; - } - _TIFFmemset((void *)tp, 0, npixels * sizeof(tp[0])); - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - /* get each byte string */ - for (shft = 24; shft >= 0; shft -= 8) - { - for (i = 0; i < npixels && cc > 0;) - { - if (*bp >= 128) - { /* run */ - if (cc < 2) - break; - rc = *bp++ + (2 - 128); - b = (uint32_t)*bp++ << shft; - cc -= 2; - while (rc-- && i < npixels) - tp[i++] |= b; - } - else - { /* non-run */ - rc = *bp++; /* nul is noop */ - while (--cc && rc-- && i < npixels) - tp[i++] |= (uint32_t)*bp++ << shft; - } - } - if (i != npixels) - { - TIFFErrorExtR(tif, module, - "Not enough data at row %" PRIu32 - " (short %" TIFF_SSIZE_FORMAT " pixels)", - tif->tif_row, npixels - i); - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - return (0); - } - } - (*sp->tfunc)(sp, op, npixels); - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - return (1); -} - -/* - * Decode a strip of pixels. We break it into rows to - * maintain synchrony with the encode algorithm, which - * is row by row. - */ -static int LogLuvDecodeStrip(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - tmsize_t rowlen = TIFFScanlineSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc % rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) - { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Decode a tile of pixels. We break it into rows to - * maintain synchrony with the encode algorithm, which - * is row by row. - */ -static int LogLuvDecodeTile(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - tmsize_t rowlen = TIFFTileRowSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc % rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) - { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode a row of 16-bit pixels. - */ -static int LogL16Encode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "LogL16Encode"; - LogLuvState *sp = EncoderState(tif); - int shft; - tmsize_t i; - tmsize_t j; - tmsize_t npixels; - uint8_t *op; - int16_t *tp; - int16_t b; - tmsize_t occ; - int rc = 0, mask; - tmsize_t beg; - - (void)s; - assert(s == 0); - assert(sp != NULL); - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_16BIT) - tp = (int16_t *)bp; - else - { - tp = (int16_t *)sp->tbuf; - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* compress each byte string */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 8; shft >= 0; shft -= 8) - { - for (i = 0; i < npixels; i += rc) - { - if (occ < 4) - { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - mask = 0xff << shft; /* find next run */ - for (beg = i; beg < npixels; beg += rc) - { - b = (int16_t)(tp[beg] & mask); - rc = 1; - while (rc < 127 + 2 && beg + rc < npixels && - (tp[beg + rc] & mask) == b) - rc++; - if (rc >= MINRUN) - break; /* long enough */ - } - if (beg - i > 1 && beg - i < MINRUN) - { - b = (int16_t)(tp[i] & mask); /*check short run */ - j = i + 1; - while ((tp[j++] & mask) == b) - if (j == beg) - { - *op++ = (uint8_t)(128 - 2 + j - i); - *op++ = (uint8_t)(b >> shft); - occ -= 2; - i = beg; - break; - } - } - while (i < beg) - { /* write out non-run */ - if ((j = beg - i) > 127) - j = 127; - if (occ < j + 3) - { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8_t)j; - occ--; - while (j--) - { - *op++ = (uint8_t)(tp[i++] >> shft & 0xff); - occ--; - } - } - if (rc >= MINRUN) - { /* write out run */ - *op++ = (uint8_t)(128 - 2 + rc); - *op++ = (uint8_t)(tp[beg] >> shft & 0xff); - occ -= 2; - } - else - rc = 0; - } - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a row of 24-bit pixels. - */ -static int LogLuvEncode24(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "LogLuvEncode24"; - LogLuvState *sp = EncoderState(tif); - tmsize_t i; - tmsize_t npixels; - tmsize_t occ; - uint8_t *op; - uint32_t *tp; - - (void)s; - assert(s == 0); - assert(sp != NULL); - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32_t *)bp; - else - { - tp = (uint32_t *)sp->tbuf; - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* write out encoded pixels */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (i = npixels; i--;) - { - if (occ < 3) - { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8_t)(*tp >> 16); - *op++ = (uint8_t)(*tp >> 8 & 0xff); - *op++ = (uint8_t)(*tp++ & 0xff); - occ -= 3; - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a row of 32-bit pixels. - */ -static int LogLuvEncode32(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "LogLuvEncode32"; - LogLuvState *sp = EncoderState(tif); - int shft; - tmsize_t i; - tmsize_t j; - tmsize_t npixels; - uint8_t *op; - uint32_t *tp; - uint32_t b; - tmsize_t occ; - int rc = 0; - tmsize_t beg; - - (void)s; - assert(s == 0); - assert(sp != NULL); - - npixels = cc / sp->pixel_size; - - if (sp->user_datafmt == SGILOGDATAFMT_RAW) - tp = (uint32_t *)bp; - else - { - tp = (uint32_t *)sp->tbuf; - if (sp->tbuflen < npixels) - { - TIFFErrorExtR(tif, module, "Translation buffer too short"); - return (0); - } - (*sp->tfunc)(sp, bp, npixels); - } - /* compress each byte string */ - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 24; shft >= 0; shft -= 8) - { - const uint32_t mask = 0xffU << shft; /* find next run */ - for (i = 0; i < npixels; i += rc) - { - if (occ < 4) - { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - for (beg = i; beg < npixels; beg += rc) - { - b = tp[beg] & mask; - rc = 1; - while (rc < 127 + 2 && beg + rc < npixels && - (tp[beg + rc] & mask) == b) - rc++; - if (rc >= MINRUN) - break; /* long enough */ - } - if (beg - i > 1 && beg - i < MINRUN) - { - b = tp[i] & mask; /* check short run */ - j = i + 1; - while ((tp[j++] & mask) == b) - if (j == beg) - { - *op++ = (uint8_t)(128 - 2 + j - i); - *op++ = (uint8_t)(b >> shft); - occ -= 2; - i = beg; - break; - } - } - while (i < beg) - { /* write out non-run */ - if ((j = beg - i) > 127) - j = 127; - if (occ < j + 3) - { - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - occ = tif->tif_rawdatasize - tif->tif_rawcc; - } - *op++ = (uint8_t)j; - occ--; - while (j--) - { - *op++ = (uint8_t)(tp[i++] >> shft & 0xff); - occ--; - } - } - if (rc >= MINRUN) - { /* write out run */ - *op++ = (uint8_t)(128 - 2 + rc); - *op++ = (uint8_t)(tp[beg] >> shft & 0xff); - occ -= 2; - } - else - rc = 0; - } - } - tif->tif_rawcp = op; - tif->tif_rawcc = tif->tif_rawdatasize - occ; - - return (1); -} - -/* - * Encode a strip of pixels. We break it into rows to - * avoid encoding runs across row boundaries. - */ -static int LogLuvEncodeStrip(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - tmsize_t rowlen = TIFFScanlineSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc % rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) - { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode a tile of pixels. We break it into rows to - * avoid encoding runs across row boundaries. - */ -static int LogLuvEncodeTile(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - tmsize_t rowlen = TIFFTileRowSize(tif); - - if (rowlen == 0) - return 0; - - assert(cc % rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) - { - bp += rowlen; - cc -= rowlen; - } - return (cc == 0); -} - -/* - * Encode/Decode functions for converting to and from user formats. - */ - -#include "uvcode.h" - -#ifndef UVSCALE -#define U_NEU 0.210526316 -#define V_NEU 0.473684211 -#define UVSCALE 410. -#endif - -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#undef log2 /* Conflict with C'99 function */ -#define log2(x) ((1. / M_LN2) * log(x)) -#undef exp2 /* Conflict with C'99 function */ -#define exp2(x) exp(M_LN2 *(x)) - -#define TIFF_RAND_MAX 32767 - -// From POSIX.1-2001 as an example of an implementation of rand() -static uint32_t _TIFFRand() -{ - static uint32_t nCounter = 0; - if (!nCounter) - nCounter = (uint32_t)(time(NULL) & UINT32_MAX); - ++nCounter; - uint32_t nCounterLocal = - (uint32_t)(((uint64_t)(nCounter)*1103515245U + 12345U) & UINT32_MAX); - nCounter = nCounterLocal; - return (nCounterLocal / 65536U) % (TIFF_RAND_MAX + 1); -}; - -static int tiff_itrunc(double x, int m) -{ - if (m == SGILOGENCODE_NODITHER) - return (int)x; - return (int)(x + _TIFFRand() * (1. / TIFF_RAND_MAX) - .5); -} - -#if !LOGLUV_PUBLIC -static -#endif - double - LogL16toY(int p16) /* compute luminance from 16-bit LogL */ -{ - int Le = p16 & 0x7fff; - double Y; - - if (!Le) - return (0.); - Y = exp(M_LN2 / 256. * (Le + .5) - M_LN2 * 64.); - return (!(p16 & 0x8000) ? Y : -Y); -} - -#if !LOGLUV_PUBLIC -static -#endif - int - LogL16fromY(double Y, int em) /* get 16-bit LogL from Y */ -{ - if (Y >= 1.8371976e19) - return (0x7fff); - if (Y <= -1.8371976e19) - return (0xffff); - if (Y > 5.4136769e-20) - return tiff_itrunc(256. * (log2(Y) + 64.), em); - if (Y < -5.4136769e-20) - return (~0x7fff | tiff_itrunc(256. * (log2(-Y) + 64.), em)); - return (0); -} - -static void L16toY(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - int16_t *l16 = (int16_t *)sp->tbuf; - float *yp = (float *)op; - - while (n-- > 0) - *yp++ = (float)LogL16toY(*l16++); -} - -static void L16toGry(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - int16_t *l16 = (int16_t *)sp->tbuf; - uint8_t *gp = (uint8_t *)op; - - while (n-- > 0) - { - double Y = LogL16toY(*l16++); - *gp++ = (uint8_t)((Y <= 0.) ? 0 - : (Y >= 1.) ? 255 - : (int)(256. * sqrt(Y))); - } -} - -static void L16fromY(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - int16_t *l16 = (int16_t *)sp->tbuf; - float *yp = (float *)op; - - while (n-- > 0) - *l16++ = (int16_t)(LogL16fromY(*yp++, sp->encode_meth)); -} - -#if !LOGLUV_PUBLIC -static -#endif - void - XYZtoRGB24(float *xyz, uint8_t *rgb) -{ - double r, g, b; - /* assume CCIR-709 primaries */ - r = 2.690 * xyz[0] + -1.276 * xyz[1] + -0.414 * xyz[2]; - g = -1.022 * xyz[0] + 1.978 * xyz[1] + 0.044 * xyz[2]; - b = 0.061 * xyz[0] + -0.224 * xyz[1] + 1.163 * xyz[2]; - /* assume 2.0 gamma for speed */ - /* could use integer sqrt approx., but this is probably faster */ - rgb[0] = (uint8_t)((r <= 0.) ? 0 : (r >= 1.) ? 255 : (int)(256. * sqrt(r))); - rgb[1] = (uint8_t)((g <= 0.) ? 0 : (g >= 1.) ? 255 : (int)(256. * sqrt(g))); - rgb[2] = (uint8_t)((b <= 0.) ? 0 : (b >= 1.) ? 255 : (int)(256. * sqrt(b))); -} - -#if !LOGLUV_PUBLIC -static -#endif - double - LogL10toY(int p10) /* compute luminance from 10-bit LogL */ -{ - if (p10 == 0) - return (0.); - return (exp(M_LN2 / 64. * (p10 + .5) - M_LN2 * 12.)); -} - -#if !LOGLUV_PUBLIC -static -#endif - int - LogL10fromY(double Y, int em) /* get 10-bit LogL from Y */ -{ - if (Y >= 15.742) - return (0x3ff); - else if (Y <= .00024283) - return (0); - else - return tiff_itrunc(64. * (log2(Y) + 12.), em); -} - -#define NANGLES 100 -#define uv2ang(u, v) \ - ((NANGLES * .499999999 / M_PI) * atan2((v)-V_NEU, (u)-U_NEU) + .5 * NANGLES) - -static int oog_encode(double u, double v) /* encode out-of-gamut chroma */ -{ - static int oog_table[NANGLES]; - static int initialized = 0; - register int i; - - if (!initialized) - { /* set up perimeter table */ - double eps[NANGLES], ua, va, ang, epsa; - int ui, vi, ustep; - for (i = NANGLES; i--;) - eps[i] = 2.; - for (vi = UV_NVS; vi--;) - { - va = UV_VSTART + (vi + .5) * UV_SQSIZ; - ustep = uv_row[vi].nus - 1; - if (vi == UV_NVS - 1 || vi == 0 || ustep <= 0) - ustep = 1; - for (ui = uv_row[vi].nus - 1; ui >= 0; ui -= ustep) - { - ua = uv_row[vi].ustart + (ui + .5) * UV_SQSIZ; - ang = uv2ang(ua, va); - i = (int)ang; - epsa = fabs(ang - (i + .5)); - if (epsa < eps[i]) - { - oog_table[i] = uv_row[vi].ncum + ui; - eps[i] = epsa; - } - } - } - for (i = NANGLES; i--;) /* fill any holes */ - if (eps[i] > 1.5) - { - int i1, i2; - for (i1 = 1; i1 < NANGLES / 2; i1++) - if (eps[(i + i1) % NANGLES] < 1.5) - break; - for (i2 = 1; i2 < NANGLES / 2; i2++) - if (eps[(i + NANGLES - i2) % NANGLES] < 1.5) - break; - if (i1 < i2) - oog_table[i] = oog_table[(i + i1) % NANGLES]; - else - oog_table[i] = oog_table[(i + NANGLES - i2) % NANGLES]; - } - initialized = 1; - } - i = (int)uv2ang(u, v); /* look up hue angle */ - return (oog_table[i]); -} - -#undef uv2ang -#undef NANGLES - -#if !LOGLUV_PUBLIC -static -#endif - int - uv_encode(double u, double v, int em) /* encode (u',v') coordinates */ -{ - unsigned int vi; - int ui; - - /* check for NaN */ - if (u != u || v != v) - { - u = U_NEU; - v = V_NEU; - } - - if (v < UV_VSTART) - return oog_encode(u, v); - vi = tiff_itrunc((v - UV_VSTART) * (1. / UV_SQSIZ), em); - if (vi >= UV_NVS) - return oog_encode(u, v); - if (u < uv_row[vi].ustart) - return oog_encode(u, v); - ui = tiff_itrunc((u - uv_row[vi].ustart) * (1. / UV_SQSIZ), em); - if (ui >= uv_row[vi].nus) - return oog_encode(u, v); - - return (uv_row[vi].ncum + ui); -} - -#if !LOGLUV_PUBLIC -static -#endif - int - uv_decode(double *up, double *vp, int c) /* decode (u',v') index */ -{ - unsigned int upper, lower; - int ui; - unsigned int vi; - - if (c < 0 || c >= UV_NDIVS) - return (-1); - lower = 0; /* binary search */ - upper = UV_NVS; - while (upper - lower > 1) - { - vi = (lower + upper) >> 1; - ui = c - uv_row[vi].ncum; - if (ui > 0) - lower = vi; - else if (ui < 0) - upper = vi; - else - { - lower = vi; - break; - } - } - vi = lower; - ui = c - uv_row[vi].ncum; - *up = uv_row[vi].ustart + (ui + .5) * UV_SQSIZ; - *vp = UV_VSTART + (vi + .5) * UV_SQSIZ; - return (0); -} - -#if !LOGLUV_PUBLIC -static -#endif - void - LogLuv24toXYZ(uint32_t p, float *XYZ) -{ - int Ce; - double L, u, v, s, x, y; - /* decode luminance */ - L = LogL10toY(p >> 14 & 0x3ff); - if (L <= 0.) - { - XYZ[0] = XYZ[1] = XYZ[2] = 0.; - return; - } - /* decode color */ - Ce = p & 0x3fff; - if (uv_decode(&u, &v, Ce) < 0) - { - u = U_NEU; - v = V_NEU; - } - s = 1. / (6. * u - 16. * v + 12.); - x = 9. * u * s; - y = 4. * v * s; - /* convert to XYZ */ - XYZ[0] = (float)(x / y * L); - XYZ[1] = (float)L; - XYZ[2] = (float)((1. - x - y) / y * L); -} - -#if !LOGLUV_PUBLIC -static -#endif - uint32_t - LogLuv24fromXYZ(float *XYZ, int em) -{ - int Le, Ce; - double u, v, s; - /* encode luminance */ - Le = LogL10fromY(XYZ[1], em); - /* encode color */ - s = XYZ[0] + 15. * XYZ[1] + 3. * XYZ[2]; - if (!Le || s <= 0.) - { - u = U_NEU; - v = V_NEU; - } - else - { - u = 4. * XYZ[0] / s; - v = 9. * XYZ[1] / s; - } - Ce = uv_encode(u, v, em); - if (Ce < 0) /* never happens */ - Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER); - /* combine encodings */ - return (Le << 14 | Ce); -} - -static void Luv24toXYZ(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - float *xyz = (float *)op; - - while (n-- > 0) - { - LogLuv24toXYZ(*luv, xyz); - xyz += 3; - luv++; - } -} - -static void Luv24toLuv48(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - int16_t *luv3 = (int16_t *)op; - - while (n-- > 0) - { - double u, v; - - *luv3++ = (int16_t)((*luv >> 12 & 0xffd) + 13314); - if (uv_decode(&u, &v, *luv & 0x3fff) < 0) - { - u = U_NEU; - v = V_NEU; - } - *luv3++ = (int16_t)(u * (1L << 15)); - *luv3++ = (int16_t)(v * (1L << 15)); - luv++; - } -} - -static void Luv24toRGB(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - uint8_t *rgb = (uint8_t *)op; - - while (n-- > 0) - { - float xyz[3]; - - LogLuv24toXYZ(*luv++, xyz); - XYZtoRGB24(xyz, rgb); - rgb += 3; - } -} - -static void Luv24fromXYZ(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - float *xyz = (float *)op; - - while (n-- > 0) - { - *luv++ = LogLuv24fromXYZ(xyz, sp->encode_meth); - xyz += 3; - } -} - -static void Luv24fromLuv48(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - int16_t *luv3 = (int16_t *)op; - - while (n-- > 0) - { - int Le, Ce; - - if (luv3[0] <= 0) - Le = 0; - else if (luv3[0] >= (1 << 12) + 3314) - Le = (1 << 10) - 1; - else if (sp->encode_meth == SGILOGENCODE_NODITHER) - Le = (luv3[0] - 3314) >> 2; - else - Le = tiff_itrunc(.25 * (luv3[0] - 3314.), sp->encode_meth); - - Ce = uv_encode((luv3[1] + .5) / (1 << 15), (luv3[2] + .5) / (1 << 15), - sp->encode_meth); - if (Ce < 0) /* never happens */ - Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER); - *luv++ = (uint32_t)Le << 14 | Ce; - luv3 += 3; - } -} - -#if !LOGLUV_PUBLIC -static -#endif - void - LogLuv32toXYZ(uint32_t p, float *XYZ) -{ - double L, u, v, s, x, y; - /* decode luminance */ - L = LogL16toY((int)p >> 16); - if (L <= 0.) - { - XYZ[0] = XYZ[1] = XYZ[2] = 0.; - return; - } - /* decode color */ - u = 1. / UVSCALE * ((p >> 8 & 0xff) + .5); - v = 1. / UVSCALE * ((p & 0xff) + .5); - s = 1. / (6. * u - 16. * v + 12.); - x = 9. * u * s; - y = 4. * v * s; - /* convert to XYZ */ - XYZ[0] = (float)(x / y * L); - XYZ[1] = (float)L; - XYZ[2] = (float)((1. - x - y) / y * L); -} - -#if !LOGLUV_PUBLIC -static -#endif - uint32_t - LogLuv32fromXYZ(float *XYZ, int em) -{ - unsigned int Le, ue, ve; - double u, v, s; - /* encode luminance */ - Le = (unsigned int)LogL16fromY(XYZ[1], em); - /* encode color */ - s = XYZ[0] + 15. * XYZ[1] + 3. * XYZ[2]; - if (!Le || s <= 0.) - { - u = U_NEU; - v = V_NEU; - } - else - { - u = 4. * XYZ[0] / s; - v = 9. * XYZ[1] / s; - } - if (u <= 0.) - ue = 0; - else - ue = tiff_itrunc(UVSCALE * u, em); - if (ue > 255) - ue = 255; - if (v <= 0.) - ve = 0; - else - ve = tiff_itrunc(UVSCALE * v, em); - if (ve > 255) - ve = 255; - /* combine encodings */ - return (Le << 16 | ue << 8 | ve); -} - -static void Luv32toXYZ(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - float *xyz = (float *)op; - - while (n-- > 0) - { - LogLuv32toXYZ(*luv++, xyz); - xyz += 3; - } -} - -static void Luv32toLuv48(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - int16_t *luv3 = (int16_t *)op; - - while (n-- > 0) - { - double u, v; - - *luv3++ = (int16_t)(*luv >> 16); - u = 1. / UVSCALE * ((*luv >> 8 & 0xff) + .5); - v = 1. / UVSCALE * ((*luv & 0xff) + .5); - *luv3++ = (int16_t)(u * (1L << 15)); - *luv3++ = (int16_t)(v * (1L << 15)); - luv++; - } -} - -static void Luv32toRGB(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - uint8_t *rgb = (uint8_t *)op; - - while (n-- > 0) - { - float xyz[3]; - - LogLuv32toXYZ(*luv++, xyz); - XYZtoRGB24(xyz, rgb); - rgb += 3; - } -} - -static void Luv32fromXYZ(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - float *xyz = (float *)op; - - while (n-- > 0) - { - *luv++ = LogLuv32fromXYZ(xyz, sp->encode_meth); - xyz += 3; - } -} - -static void Luv32fromLuv48(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - uint32_t *luv = (uint32_t *)sp->tbuf; - int16_t *luv3 = (int16_t *)op; - - if (sp->encode_meth == SGILOGENCODE_NODITHER) - { - while (n-- > 0) - { - *luv++ = (uint32_t)luv3[0] << 16 | - (luv3[1] * (uint32_t)(UVSCALE + .5) >> 7 & 0xff00) | - (luv3[2] * (uint32_t)(UVSCALE + .5) >> 15 & 0xff); - luv3 += 3; - } - return; - } - while (n-- > 0) - { - *luv++ = - (uint32_t)luv3[0] << 16 | - (tiff_itrunc(luv3[1] * (UVSCALE / (1 << 15)), sp->encode_meth) - << 8 & - 0xff00) | - (tiff_itrunc(luv3[2] * (UVSCALE / (1 << 15)), sp->encode_meth) & - 0xff); - luv3 += 3; - } -} - -static void _logLuvNop(LogLuvState *sp, uint8_t *op, tmsize_t n) -{ - (void)sp; - (void)op; - (void)n; -} - -static int LogL16GuessDataFmt(TIFFDirectory *td) -{ -#define PACK(s, b, f) (((b) << 6) | ((s) << 3) | (f)) - switch ( - PACK(td->td_samplesperpixel, td->td_bitspersample, td->td_sampleformat)) - { - case PACK(1, 32, SAMPLEFORMAT_IEEEFP): - return (SGILOGDATAFMT_FLOAT); - case PACK(1, 16, SAMPLEFORMAT_VOID): - case PACK(1, 16, SAMPLEFORMAT_INT): - case PACK(1, 16, SAMPLEFORMAT_UINT): - return (SGILOGDATAFMT_16BIT); - case PACK(1, 8, SAMPLEFORMAT_VOID): - case PACK(1, 8, SAMPLEFORMAT_UINT): - return (SGILOGDATAFMT_8BIT); - } -#undef PACK - return (SGILOGDATAFMT_UNKNOWN); -} - -static tmsize_t multiply_ms(tmsize_t m1, tmsize_t m2) -{ - return _TIFFMultiplySSize(NULL, m1, m2, NULL); -} - -static int LogL16InitState(TIFF *tif) -{ - static const char module[] = "LogL16InitState"; - TIFFDirectory *td = &tif->tif_dir; - LogLuvState *sp = DecoderState(tif); - - assert(sp != NULL); - assert(td->td_photometric == PHOTOMETRIC_LOGL); - - if (td->td_samplesperpixel != 1) - { - TIFFErrorExtR(tif, module, - "Sorry, can not handle LogL image with %s=%" PRIu16, - "Samples/pixel", td->td_samplesperpixel); - return 0; - } - - /* for some reason, we can't do this in TIFFInitLogL16 */ - if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN) - sp->user_datafmt = LogL16GuessDataFmt(td); - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->pixel_size = sizeof(float); - break; - case SGILOGDATAFMT_16BIT: - sp->pixel_size = sizeof(int16_t); - break; - case SGILOGDATAFMT_8BIT: - sp->pixel_size = sizeof(uint8_t); - break; - default: - TIFFErrorExtR(tif, module, - "No support for converting user data format to LogL"); - return (0); - } - if (isTiled(tif)) - sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else if (td->td_rowsperstrip < td->td_imagelength) - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); - else - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); - if (multiply_ms(sp->tbuflen, sizeof(int16_t)) == 0 || - (sp->tbuf = (uint8_t *)_TIFFmallocExt( - tif, sp->tbuflen * sizeof(int16_t))) == NULL) - { - TIFFErrorExtR(tif, module, "No space for SGILog translation buffer"); - return (0); - } - return (1); -} - -static int LogLuvGuessDataFmt(TIFFDirectory *td) -{ - int guess; - - /* - * If the user didn't tell us their datafmt, - * take our best guess from the bitspersample. - */ -#define PACK(a, b) (((a) << 3) | (b)) - switch (PACK(td->td_bitspersample, td->td_sampleformat)) - { - case PACK(32, SAMPLEFORMAT_IEEEFP): - guess = SGILOGDATAFMT_FLOAT; - break; - case PACK(32, SAMPLEFORMAT_VOID): - case PACK(32, SAMPLEFORMAT_UINT): - case PACK(32, SAMPLEFORMAT_INT): - guess = SGILOGDATAFMT_RAW; - break; - case PACK(16, SAMPLEFORMAT_VOID): - case PACK(16, SAMPLEFORMAT_INT): - case PACK(16, SAMPLEFORMAT_UINT): - guess = SGILOGDATAFMT_16BIT; - break; - case PACK(8, SAMPLEFORMAT_VOID): - case PACK(8, SAMPLEFORMAT_UINT): - guess = SGILOGDATAFMT_8BIT; - break; - default: - guess = SGILOGDATAFMT_UNKNOWN; - break; -#undef PACK - } - /* - * Double-check samples per pixel. - */ - switch (td->td_samplesperpixel) - { - case 1: - if (guess != SGILOGDATAFMT_RAW) - guess = SGILOGDATAFMT_UNKNOWN; - break; - case 3: - if (guess == SGILOGDATAFMT_RAW) - guess = SGILOGDATAFMT_UNKNOWN; - break; - default: - guess = SGILOGDATAFMT_UNKNOWN; - break; - } - return (guess); -} - -static int LogLuvInitState(TIFF *tif) -{ - static const char module[] = "LogLuvInitState"; - TIFFDirectory *td = &tif->tif_dir; - LogLuvState *sp = DecoderState(tif); - - assert(sp != NULL); - assert(td->td_photometric == PHOTOMETRIC_LOGLUV); - - /* for some reason, we can't do this in TIFFInitLogLuv */ - if (td->td_planarconfig != PLANARCONFIG_CONTIG) - { - TIFFErrorExtR(tif, module, - "SGILog compression cannot handle non-contiguous data"); - return (0); - } - if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN) - sp->user_datafmt = LogLuvGuessDataFmt(td); - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->pixel_size = 3 * sizeof(float); - break; - case SGILOGDATAFMT_16BIT: - sp->pixel_size = 3 * sizeof(int16_t); - break; - case SGILOGDATAFMT_RAW: - sp->pixel_size = sizeof(uint32_t); - break; - case SGILOGDATAFMT_8BIT: - sp->pixel_size = 3 * sizeof(uint8_t); - break; - default: - TIFFErrorExtR( - tif, module, - "No support for converting user data format to LogLuv"); - return (0); - } - if (isTiled(tif)) - sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else if (td->td_rowsperstrip < td->td_imagelength) - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); - else - sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); - if (multiply_ms(sp->tbuflen, sizeof(uint32_t)) == 0 || - (sp->tbuf = (uint8_t *)_TIFFmallocExt( - tif, sp->tbuflen * sizeof(uint32_t))) == NULL) - { - TIFFErrorExtR(tif, module, "No space for SGILog translation buffer"); - return (0); - } - return (1); -} - -static int LogLuvFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -static int LogLuvSetupDecode(TIFF *tif) -{ - static const char module[] = "LogLuvSetupDecode"; - LogLuvState *sp = DecoderState(tif); - TIFFDirectory *td = &tif->tif_dir; - - tif->tif_postdecode = _TIFFNoPostDecode; - switch (td->td_photometric) - { - case PHOTOMETRIC_LOGLUV: - if (!LogLuvInitState(tif)) - break; - if (td->td_compression == COMPRESSION_SGILOG24) - { - tif->tif_decoderow = LogLuvDecode24; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv24toXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv24toLuv48; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = Luv24toRGB; - break; - } - } - else - { - tif->tif_decoderow = LogLuvDecode32; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv32toXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv32toLuv48; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = Luv32toRGB; - break; - } - } - return (1); - case PHOTOMETRIC_LOGL: - if (!LogL16InitState(tif)) - break; - tif->tif_decoderow = LogL16Decode; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = L16toY; - break; - case SGILOGDATAFMT_8BIT: - sp->tfunc = L16toGry; - break; - } - return (1); - default: - TIFFErrorExtR(tif, module, - "Inappropriate photometric interpretation %" PRIu16 - " for SGILog compression; %s", - td->td_photometric, "must be either LogLUV or LogL"); - break; - } - return (0); -} - -static int LogLuvSetupEncode(TIFF *tif) -{ - static const char module[] = "LogLuvSetupEncode"; - LogLuvState *sp = EncoderState(tif); - TIFFDirectory *td = &tif->tif_dir; - - switch (td->td_photometric) - { - case PHOTOMETRIC_LOGLUV: - if (!LogLuvInitState(tif)) - return (0); - if (td->td_compression == COMPRESSION_SGILOG24) - { - tif->tif_encoderow = LogLuvEncode24; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv24fromXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv24fromLuv48; - break; - case SGILOGDATAFMT_RAW: - break; - default: - goto notsupported; - } - } - else - { - tif->tif_encoderow = LogLuvEncode32; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = Luv32fromXYZ; - break; - case SGILOGDATAFMT_16BIT: - sp->tfunc = Luv32fromLuv48; - break; - case SGILOGDATAFMT_RAW: - break; - default: - goto notsupported; - } - } - break; - case PHOTOMETRIC_LOGL: - if (!LogL16InitState(tif)) - return (0); - tif->tif_encoderow = LogL16Encode; - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - sp->tfunc = L16fromY; - break; - case SGILOGDATAFMT_16BIT: - break; - default: - goto notsupported; - } - break; - default: - TIFFErrorExtR(tif, module, - "Inappropriate photometric interpretation %" PRIu16 - " for SGILog compression; %s", - td->td_photometric, "must be either LogLUV or LogL"); - return (0); - } - sp->encoder_state = 1; - return (1); -notsupported: - TIFFErrorExtR(tif, module, - "SGILog compression supported only for %s, or raw data", - td->td_photometric == PHOTOMETRIC_LOGL ? "Y, L" : "XYZ, Luv"); - return (0); -} - -static void LogLuvClose(TIFF *tif) -{ - LogLuvState *sp = (LogLuvState *)tif->tif_data; - TIFFDirectory *td = &tif->tif_dir; - - assert(sp != 0); - /* - * For consistency, we always want to write out the same - * bitspersample and sampleformat for our TIFF file, - * regardless of the data format being used by the application. - * Since this routine is called after tags have been set but - * before they have been recorded in the file, we reset them here. - * Note: this is really a nasty approach. See PixarLogClose - */ - if (sp->encoder_state) - { - /* See PixarLogClose. Might avoid issues with tags whose size depends - * on those below, but not completely sure this is enough. */ - td->td_samplesperpixel = - (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; - td->td_bitspersample = 16; - td->td_sampleformat = SAMPLEFORMAT_INT; - } -} - -static void LogLuvCleanup(TIFF *tif) -{ - LogLuvState *sp = (LogLuvState *)tif->tif_data; - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->tbuf) - _TIFFfreeExt(tif, sp->tbuf); - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int LogLuvVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "LogLuvVSetField"; - LogLuvState *sp = DecoderState(tif); - int bps, fmt; - - switch (tag) - { - case TIFFTAG_SGILOGDATAFMT: - sp->user_datafmt = (int)va_arg(ap, int); - /* - * Tweak the TIFF header so that the rest of libtiff knows what - * size of data will be passed between app and library, and - * assume that the app knows what it is doing and is not - * confused by these header manipulations... - */ - switch (sp->user_datafmt) - { - case SGILOGDATAFMT_FLOAT: - bps = 32; - fmt = SAMPLEFORMAT_IEEEFP; - break; - case SGILOGDATAFMT_16BIT: - bps = 16; - fmt = SAMPLEFORMAT_INT; - break; - case SGILOGDATAFMT_RAW: - bps = 32; - fmt = SAMPLEFORMAT_UINT; - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - break; - case SGILOGDATAFMT_8BIT: - bps = 8; - fmt = SAMPLEFORMAT_UINT; - break; - default: - TIFFErrorExtR( - tif, tif->tif_name, - "Unknown data format %d for LogLuv compression", - sp->user_datafmt); - return (0); - } - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, fmt); - /* - * Must recalculate sizes should bits/sample change. - */ - tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)-1; - tif->tif_scanlinesize = TIFFScanlineSize(tif); - return (1); - case TIFFTAG_SGILOGENCODE: - sp->encode_meth = (int)va_arg(ap, int); - if (sp->encode_meth != SGILOGENCODE_NODITHER && - sp->encode_meth != SGILOGENCODE_RANDITHER) - { - TIFFErrorExtR(tif, module, - "Unknown encoding %d for LogLuv compression", - sp->encode_meth); - return (0); - } - return (1); - default: - return (*sp->vsetparent)(tif, tag, ap); - } -} - -static int LogLuvVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - LogLuvState *sp = (LogLuvState *)tif->tif_data; - - switch (tag) - { - case TIFFTAG_SGILOGDATAFMT: - *va_arg(ap, int *) = sp->user_datafmt; - return (1); - default: - return (*sp->vgetparent)(tif, tag, ap); - } -} - -static const TIFFField LogLuvFields[] = { - {TIFFTAG_SGILOGDATAFMT, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - TRUE, FALSE, "SGILogDataFmt", NULL}, - {TIFFTAG_SGILOGENCODE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - TRUE, FALSE, "SGILogEncode", NULL}}; - -int TIFFInitSGILog(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitSGILog"; - LogLuvState *sp; - - assert(scheme == COMPRESSION_SGILOG24 || scheme == COMPRESSION_SGILOG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, LogLuvFields, TIFFArrayCount(LogLuvFields))) - { - TIFFErrorExtR(tif, module, "Merging SGILog codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(LogLuvState)); - if (tif->tif_data == NULL) - goto bad; - sp = (LogLuvState *)tif->tif_data; - _TIFFmemset((void *)sp, 0, sizeof(*sp)); - sp->user_datafmt = SGILOGDATAFMT_UNKNOWN; - sp->encode_meth = (scheme == COMPRESSION_SGILOG24) ? SGILOGENCODE_RANDITHER - : SGILOGENCODE_NODITHER; - sp->tfunc = _logLuvNop; - - /* - * Install codec methods. - * NB: tif_decoderow & tif_encoderow are filled - * in at setup time. - */ - tif->tif_fixuptags = LogLuvFixupTags; - tif->tif_setupdecode = LogLuvSetupDecode; - tif->tif_decodestrip = LogLuvDecodeStrip; - tif->tif_decodetile = LogLuvDecodeTile; - tif->tif_setupencode = LogLuvSetupEncode; - tif->tif_encodestrip = LogLuvEncodeStrip; - tif->tif_encodetile = LogLuvEncodeTile; - tif->tif_close = LogLuvClose; - tif->tif_cleanup = LogLuvCleanup; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = LogLuvVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = LogLuvVSetField; /* hook for codec tags */ - - return (1); -bad: - TIFFErrorExtR(tif, module, "%s: No space for LogLuv state block", - tif->tif_name); - return (0); -} -#endif /* LOGLUV_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_lzma.c b/third_party/libtiff/libtiff/tif_lzma.c deleted file mode 100644 index 9834ae2..0000000 --- a/third_party/libtiff/libtiff/tif_lzma.c +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Copyright (c) 2010, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LZMA_SUPPORT -/* - * TIFF Library. - * - * LZMA2 Compression Support - * - * You need an LZMA2 SDK to link with. See http://tukaani.org/xz/ for details. - * - * The codec is derived from ZLIB codec (tif_zip.c). - */ - -#include "lzma.h" -#include "tif_predict.h" - -#include - -/* - * State block for each open TIFF file using LZMA2 compression/decompression. - */ -typedef struct -{ - TIFFPredictorState predict; - int read_error; /* whether a read error has occurred, and which should cause - further reads in the same strip/tile to be aborted */ - lzma_stream stream; - lzma_filter filters[LZMA_FILTERS_MAX + 1]; - lzma_options_delta opt_delta; /* delta filter options */ - lzma_options_lzma opt_lzma; /* LZMA2 filter options */ - int preset; /* compression level */ - lzma_check check; /* type of the integrity check */ - int state; /* state flags */ -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} LZMAState; - -#define GetLZMAState(tif) ((LZMAState *)(tif)->tif_data) -#define LZMADecoderState(tif) GetLZMAState(tif) -#define LZMAEncoderState(tif) GetLZMAState(tif) - -static int LZMAEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int LZMADecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -static const char *LZMAStrerror(lzma_ret ret) -{ - switch (ret) - { - case LZMA_OK: - return "operation completed successfully"; - case LZMA_STREAM_END: - return "end of stream was reached"; - case LZMA_NO_CHECK: - return "input stream has no integrity check"; - case LZMA_UNSUPPORTED_CHECK: - return "cannot calculate the integrity check"; - case LZMA_GET_CHECK: - return "integrity check type is now available"; - case LZMA_MEM_ERROR: - return "cannot allocate memory"; - case LZMA_MEMLIMIT_ERROR: - return "memory usage limit was reached"; - case LZMA_FORMAT_ERROR: - return "file format not recognized"; - case LZMA_OPTIONS_ERROR: - return "invalid or unsupported options"; - case LZMA_DATA_ERROR: - return "data is corrupt"; - case LZMA_BUF_ERROR: - return "no progress is possible (stream is truncated or corrupt)"; - case LZMA_PROG_ERROR: - return "programming error"; - default: - return "unidentified liblzma error"; - } -} - -static int LZMAFixupTags(TIFF *tif) -{ - (void)tif; - return 1; -} - -static int LZMASetupDecode(TIFF *tif) -{ - LZMAState *sp = LZMADecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) - { - lzma_end(&sp->stream); - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - return 1; -} - -/* - * Setup state for decoding a strip. - */ -static int LZMAPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "LZMAPreDecode"; - LZMAState *sp = LZMADecoderState(tif); - lzma_ret ret; - - (void)s; - assert(sp != NULL); - - if ((sp->state & LSTATE_INIT_DECODE) == 0) - tif->tif_setupdecode(tif); - - sp->stream.next_in = tif->tif_rawdata; - sp->stream.avail_in = (size_t)tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) - { - TIFFErrorExtR(tif, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - - /* - * Disable memory limit when decoding. UINT64_MAX is a flag to disable - * the limit, we are passing (uint64_t)-1 which should be the same. - */ - ret = lzma_stream_decoder(&sp->stream, (uint64_t)-1, 0); - if (ret != LZMA_OK) - { - TIFFErrorExtR(tif, module, "Error initializing the stream decoder, %s", - LZMAStrerror(ret)); - return 0; - } - - sp->read_error = 0; - - return 1; -} - -static int LZMADecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "LZMADecode"; - LZMAState *sp = LZMADecoderState(tif); - - (void)s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - if (sp->read_error) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "LZMADecode: Scanline %" PRIu32 " cannot be read due to " - "previous error", - tif->tif_row); - return 0; - } - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (size_t)tif->tif_rawcc; - - sp->stream.next_out = op; - sp->stream.avail_out = (size_t)occ; - if ((tmsize_t)sp->stream.avail_out != occ) - { - // read_error not set here as this is a usage issue that can be - // recovered in a following call. - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - - do - { - /* - * Save the current stream state to properly recover from the - * decoding errors later. - */ - const uint8_t *next_in = sp->stream.next_in; - size_t avail_in = sp->stream.avail_in; - - lzma_ret ret = lzma_code(&sp->stream, LZMA_RUN); - if (ret == LZMA_STREAM_END) - break; - if (ret == LZMA_MEMLIMIT_ERROR) - { - lzma_ret r = - lzma_stream_decoder(&sp->stream, lzma_memusage(&sp->stream), 0); - if (r != LZMA_OK) - { - sp->read_error = 1; - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "Error initializing the stream decoder, %s", - LZMAStrerror(r)); - break; - } - sp->stream.next_in = next_in; - sp->stream.avail_in = avail_in; - continue; - } - if (ret != LZMA_OK) - { - TIFFErrorExtR(tif, module, - "Decoding error at scanline %" PRIu32 ", %s", - tif->tif_row, LZMAStrerror(ret)); - break; - } - } while (sp->stream.avail_out > 0); - if (sp->stream.avail_out != 0) - { - sp->read_error = 1; - memset(sp->stream.next_out, 0, sp->stream.avail_out); - TIFFErrorExtR(tif, module, - "Not enough data at scanline %" PRIu32 - " (short %" TIFF_SIZE_FORMAT " bytes)", - tif->tif_row, sp->stream.avail_out); - return 0; - } - - tif->tif_rawcp = (uint8_t *)sp->stream.next_in; /* cast away const */ - tif->tif_rawcc = sp->stream.avail_in; - - return 1; -} - -static int LZMASetupEncode(TIFF *tif) -{ - LZMAState *sp = LZMAEncoderState(tif); - - assert(sp != NULL); - if (sp->state & LSTATE_INIT_DECODE) - { - lzma_end(&sp->stream); - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int LZMAPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "LZMAPreEncode"; - LZMAState *sp = LZMAEncoderState(tif); - lzma_ret ret; - - (void)s; - assert(sp != NULL); - if (sp->state != LSTATE_INIT_ENCODE) - tif->tif_setupencode(tif); - - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (size_t)tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - TIFFErrorExtR(tif, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - ret = lzma_stream_encoder(&sp->stream, sp->filters, sp->check); - if (ret != LZMA_OK) - { - TIFFErrorExtR(tif, module, "Error in lzma_stream_encoder(): %s", - LZMAStrerror(ret)); - return 0; - } - return 1; -} - -/* - * Encode a chunk of pixels. - */ -static int LZMAEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "LZMAEncode"; - LZMAState *sp = LZMAEncoderState(tif); - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - (void)s; - sp->stream.next_in = bp; - sp->stream.avail_in = (size_t)cc; - if ((tmsize_t)sp->stream.avail_in != cc) - { - TIFFErrorExtR(tif, module, - "Liblzma cannot deal with buffers this size"); - return 0; - } - do - { - lzma_ret ret = lzma_code(&sp->stream, LZMA_RUN); - if (ret != LZMA_OK) - { - TIFFErrorExtR(tif, module, - "Encoding error at scanline %" PRIu32 ", %s", - tif->tif_row, LZMAStrerror(ret)); - return 0; - } - if (sp->stream.avail_out == 0) - { - tif->tif_rawcc = tif->tif_rawdatasize; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - (size_t) - tif->tif_rawdatasize; /* this is a safe typecast, as check - is made already in LZMAPreEncode */ - } - } while (sp->stream.avail_in > 0); - return 1; -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int LZMAPostEncode(TIFF *tif) -{ - static const char module[] = "LZMAPostEncode"; - LZMAState *sp = LZMAEncoderState(tif); - lzma_ret ret; - - sp->stream.avail_in = 0; - do - { - ret = lzma_code(&sp->stream, LZMA_FINISH); - switch (ret) - { - case LZMA_STREAM_END: - case LZMA_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - tif->tif_rawcc = - tif->tif_rawdatasize - sp->stream.avail_out; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - (size_t) - tif->tif_rawdatasize; /* this is a safe typecast, as - check is made already in - ZIPPreEncode */ - } - break; - default: - TIFFErrorExtR(tif, module, "Liblzma error: %s", - LZMAStrerror(ret)); - return 0; - } - } while (ret != LZMA_STREAM_END); - return 1; -} - -static void LZMACleanup(TIFF *tif) -{ - LZMAState *sp = GetLZMAState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state) - { - lzma_end(&sp->stream); - sp->state = 0; - } - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int LZMAVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "LZMAVSetField"; - LZMAState *sp = GetLZMAState(tif); - - switch (tag) - { - case TIFFTAG_LZMAPRESET: - sp->preset = (int)va_arg(ap, int); - lzma_lzma_preset(&sp->opt_lzma, sp->preset); - if (sp->state & LSTATE_INIT_ENCODE) - { - lzma_ret ret = - lzma_stream_encoder(&sp->stream, sp->filters, sp->check); - if (ret != LZMA_OK) - { - TIFFErrorExtR(tif, module, "Liblzma error: %s", - LZMAStrerror(ret)); - } - } - return 1; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int LZMAVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - LZMAState *sp = GetLZMAState(tif); - - switch (tag) - { - case TIFFTAG_LZMAPRESET: - *va_arg(ap, int *) = sp->preset; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static const TIFFField lzmaFields[] = { - {TIFFTAG_LZMAPRESET, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, "LZMA2 Compression Preset", NULL}, -}; - -int TIFFInitLZMA(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitLZMA"; - LZMAState *sp; - lzma_stream tmp_stream = LZMA_STREAM_INIT; - - (void)scheme; - assert(scheme == COMPRESSION_LZMA); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, lzmaFields, TIFFArrayCount(lzmaFields))) - { - TIFFErrorExtR(tif, module, "Merging LZMA2 codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(LZMAState)); - if (tif->tif_data == NULL) - goto bad; - sp = GetLZMAState(tif); - memcpy(&sp->stream, &tmp_stream, sizeof(lzma_stream)); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = LZMAVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = LZMAVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->preset = LZMA_PRESET_DEFAULT; /* default comp. level */ - sp->check = LZMA_CHECK_NONE; - sp->state = 0; - - /* Data filters. So far we are using delta and LZMA2 filters only. */ - sp->opt_delta.type = LZMA_DELTA_TYPE_BYTE; - /* - * The sample size in bytes seems to be reasonable distance for delta - * filter. - */ - sp->opt_delta.dist = (tif->tif_dir.td_bitspersample % 8) - ? 1 - : tif->tif_dir.td_bitspersample / 8; - sp->filters[0].id = LZMA_FILTER_DELTA; - sp->filters[0].options = &sp->opt_delta; - - lzma_lzma_preset(&sp->opt_lzma, sp->preset); - sp->filters[1].id = LZMA_FILTER_LZMA2; - sp->filters[1].options = &sp->opt_lzma; - - sp->filters[2].id = LZMA_VLI_UNKNOWN; - sp->filters[2].options = NULL; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = LZMAFixupTags; - tif->tif_setupdecode = LZMASetupDecode; - tif->tif_predecode = LZMAPreDecode; - tif->tif_decoderow = LZMADecode; - tif->tif_decodestrip = LZMADecode; - tif->tif_decodetile = LZMADecode; - tif->tif_setupencode = LZMASetupEncode; - tif->tif_preencode = LZMAPreEncode; - tif->tif_postencode = LZMAPostEncode; - tif->tif_encoderow = LZMAEncode; - tif->tif_encodestrip = LZMAEncode; - tif->tif_encodetile = LZMAEncode; - tif->tif_cleanup = LZMACleanup; - /* - * Setup predictor setup. - */ - (void)TIFFPredictorInit(tif); - return 1; -bad: - TIFFErrorExtR(tif, module, "No space for LZMA2 state block"); - return 0; -} -#endif /* LZMA_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_lzw.c b/third_party/libtiff/libtiff/tif_lzw.c deleted file mode 100644 index 4bf845b..0000000 --- a/third_party/libtiff/libtiff/tif_lzw.c +++ /dev/null @@ -1,1464 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * Copyright (c) 2022 Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef LZW_SUPPORT -/* - * TIFF Library. - * Rev 5.0 Lempel-Ziv & Welch Compression Support - * - * This code is derived from the compress program whose code is - * derived from software contributed to Berkeley by James A. Woods, - * derived from original work by Spencer Thomas and Joseph Orost. - * - * The original Berkeley copyright notice appears below in its entirety. - */ -#include "tif_predict.h" - -#include -#include -#include - -/* Select the plausible largest natural integer type for the architecture */ -#define SIZEOF_WORDTYPE SIZEOF_SIZE_T -typedef size_t WordType; - -/* - * NB: The 5.0 spec describes a different algorithm than Aldus - * implements. Specifically, Aldus does code length transitions - * one code earlier than should be done (for real LZW). - * Earlier versions of this library implemented the correct - * LZW algorithm, but emitted codes in a bit order opposite - * to the TIFF spec. Thus, to maintain compatibility w/ Aldus - * we interpret MSB-LSB ordered codes to be images written w/ - * old versions of this library, but otherwise adhere to the - * Aldus "off by one" algorithm. - * - * Future revisions to the TIFF spec are expected to "clarify this issue". - */ -#define LZW_COMPAT /* include backwards compatibility code */ - -#define MAXCODE(n) ((1L << (n)) - 1) -/* - * The TIFF spec specifies that encoded bit - * strings range from 9 to 12 bits. - */ -#define BITS_MIN 9 /* start with 9 bits */ -#define BITS_MAX 12 /* max of 12 bit strings */ -/* predefined codes */ -#define CODE_CLEAR 256 /* code to clear string table */ -#define CODE_EOI 257 /* end-of-information code */ -#define CODE_FIRST 258 /* first free code entry */ -#define CODE_MAX MAXCODE(BITS_MAX) -#define HSIZE 9001L /* 91% occupancy */ -#define HSHIFT (13 - 8) -#ifdef LZW_COMPAT -/* NB: +1024 is for compatibility with old files */ -#define CSIZE (MAXCODE(BITS_MAX) + 1024L) -#else -#define CSIZE (MAXCODE(BITS_MAX) + 1L) -#endif - -/* - * State block for each open TIFF file using LZW - * compression/decompression. Note that the predictor - * state block must be first in this data structure. - */ -typedef struct -{ - TIFFPredictorState predict; /* predictor super class */ - - unsigned short nbits; /* # of bits/code */ - unsigned short maxcode; /* maximum code for lzw_nbits */ - unsigned short free_ent; /* next free entry in hash table */ - WordType nextdata; /* next bits of i/o */ - long nextbits; /* # of valid bits in lzw_nextdata */ - - int rw_mode; /* preserve rw_mode from init */ -} LZWBaseState; - -#define lzw_nbits base.nbits -#define lzw_maxcode base.maxcode -#define lzw_free_ent base.free_ent -#define lzw_nextdata base.nextdata -#define lzw_nextbits base.nextbits - -/* - * Encoding-specific state. - */ -typedef uint16_t hcode_t; /* codes fit in 16 bits */ -typedef struct -{ - long hash; - hcode_t code; -} hash_t; - -/* - * Decoding-specific state. - */ -typedef struct code_ent -{ - struct code_ent *next; - unsigned short length; /* string len, including this token */ - /* firstchar should be placed immediately before value in this structure */ - unsigned char firstchar; /* first token of string */ - unsigned char value; /* data value */ - bool repeated; -} code_t; - -typedef int (*decodeFunc)(TIFF *, uint8_t *, tmsize_t, uint16_t); - -typedef struct -{ - LZWBaseState base; - - /* Decoding specific data */ - long dec_nbitsmask; /* lzw_nbits 1 bits, right adjusted */ - tmsize_t dec_restart; /* restart count */ - uint64_t dec_bitsleft; /* available bits in raw data */ - tmsize_t old_tif_rawcc; /* value of tif_rawcc at the end of the previous - TIFLZWDecode() call */ - decodeFunc dec_decode; /* regular or backwards compatible */ - code_t *dec_codep; /* current recognized code */ - code_t *dec_oldcodep; /* previously recognized code */ - code_t *dec_free_entp; /* next free entry */ - code_t *dec_maxcodep; /* max available entry */ - code_t *dec_codetab; /* kept separate for small machines */ - int read_error; /* whether a read error has occurred, and which should cause - further reads in the same strip/tile to be aborted */ - - /* Encoding specific data */ - int enc_oldcode; /* last code encountered */ - tmsize_t enc_checkpoint; /* point at which to clear table */ -#define CHECK_GAP 10000 /* enc_ratio check interval */ - tmsize_t enc_ratio; /* current compression ratio */ - tmsize_t enc_incount; /* (input) data bytes encoded */ - tmsize_t enc_outcount; /* encoded (output) bytes */ - uint8_t *enc_rawlimit; /* bound on tif_rawdata buffer */ - hash_t *enc_hashtab; /* kept separate for small machines */ -} LZWCodecState; - -#define LZWState(tif) ((LZWBaseState *)(tif)->tif_data) -#define LZWDecoderState(tif) ((LZWCodecState *)LZWState(tif)) -#define LZWEncoderState(tif) ((LZWCodecState *)LZWState(tif)) - -static int LZWDecode(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s); -#ifdef LZW_COMPAT -static int LZWDecodeCompat(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s); -#endif - -/* - * LZW Decoder. - */ - -static int LZWFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -static int LZWSetupDecode(TIFF *tif) -{ - static const char module[] = "LZWSetupDecode"; - LZWCodecState *sp = LZWDecoderState(tif); - int code; - - if (sp == NULL) - { - /* - * Allocate state block so tag methods have storage to record - * values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(LZWCodecState)); - if (tif->tif_data == NULL) - { - TIFFErrorExtR(tif, module, "No space for LZW state block"); - return (0); - } - - sp = LZWDecoderState(tif); - sp->dec_codetab = NULL; - sp->dec_decode = NULL; - - /* - * Setup predictor setup. - */ - (void)TIFFPredictorInit(tif); - } - - if (sp->dec_codetab == NULL) - { - sp->dec_codetab = (code_t *)_TIFFmallocExt(tif, CSIZE * sizeof(code_t)); - if (sp->dec_codetab == NULL) - { - TIFFErrorExtR(tif, module, "No space for LZW code table"); - return (0); - } - /* - * Pre-load the table. - */ - code = 255; - do - { - sp->dec_codetab[code].firstchar = (unsigned char)code; - sp->dec_codetab[code].value = (unsigned char)code; - sp->dec_codetab[code].repeated = true; - sp->dec_codetab[code].length = 1; - sp->dec_codetab[code].next = NULL; - } while (code--); - /* - * Zero-out the unused entries */ - /* Silence false positive */ - /* coverity[overrun-buffer-arg] */ - memset(&sp->dec_codetab[CODE_CLEAR], 0, - (CODE_FIRST - CODE_CLEAR) * sizeof(code_t)); - } - return (1); -} - -/* - * Setup state for decoding a strip. - */ -static int LZWPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "LZWPreDecode"; - LZWCodecState *sp = LZWDecoderState(tif); - - (void)s; - assert(sp != NULL); - if (sp->dec_codetab == NULL) - { - tif->tif_setupdecode(tif); - if (sp->dec_codetab == NULL) - return (0); - } - - /* - * Check for old bit-reversed codes. - */ - if (tif->tif_rawcc >= 2 && tif->tif_rawdata[0] == 0 && - (tif->tif_rawdata[1] & 0x1)) - { -#ifdef LZW_COMPAT - if (!sp->dec_decode) - { - TIFFWarningExtR(tif, module, "Old-style LZW codes, convert file"); - /* - * Override default decoding methods with - * ones that deal with the old coding. - * Otherwise the predictor versions set - * above will call the compatibility routines - * through the dec_decode method. - */ - tif->tif_decoderow = LZWDecodeCompat; - tif->tif_decodestrip = LZWDecodeCompat; - tif->tif_decodetile = LZWDecodeCompat; - /* - * If doing horizontal differencing, must - * re-setup the predictor logic since we - * switched the basic decoder methods... - */ - (*tif->tif_setupdecode)(tif); - sp->dec_decode = LZWDecodeCompat; - } - sp->lzw_maxcode = MAXCODE(BITS_MIN); -#else /* !LZW_COMPAT */ - if (!sp->dec_decode) - { - TIFFErrorExtR(tif, module, "Old-style LZW codes not supported"); - sp->dec_decode = LZWDecode; - } - return (0); -#endif /* !LZW_COMPAT */ - } - else - { - sp->lzw_maxcode = MAXCODE(BITS_MIN) - 1; - sp->dec_decode = LZWDecode; - } - sp->lzw_nbits = BITS_MIN; - sp->lzw_nextbits = 0; - sp->lzw_nextdata = 0; - - sp->dec_restart = 0; - sp->dec_nbitsmask = MAXCODE(BITS_MIN); - sp->dec_bitsleft = 0; - sp->old_tif_rawcc = 0; - sp->dec_free_entp = sp->dec_codetab - 1; // + CODE_FIRST; - /* - * Zero entries that are not yet filled in. We do - * this to guard against bogus input data that causes - * us to index into undefined entries. If you can - * come up with a way to safely bounds-check input codes - * while decoding then you can remove this operation. - */ - sp->dec_oldcodep = &sp->dec_codetab[0]; - sp->dec_maxcodep = &sp->dec_codetab[sp->dec_nbitsmask - 1]; - sp->read_error = 0; - return (1); -} - -/* - * Decode a "hunk of data". - */ - -/* Get the next 32 or 64-bit from the input data */ -#ifdef WORDS_BIGENDIAN -#define GetNextData(nextdata, bp) memcpy(&nextdata, bp, sizeof(nextdata)) -#elif SIZEOF_WORDTYPE == 8 -#if defined(_M_X64) -#define GetNextData(nextdata, bp) nextdata = _byteswap_uint64(*(uint64_t *)(bp)) -#elif defined(__GNUC__) -#define GetNextData(nextdata, bp) \ - memcpy(&nextdata, bp, sizeof(nextdata)); \ - nextdata = __builtin_bswap64(nextdata) -#else -#define GetNextData(nextdata, bp) \ - nextdata = (((uint64_t)bp[0]) << 56) | (((uint64_t)bp[1]) << 48) | \ - (((uint64_t)bp[2]) << 40) | (((uint64_t)bp[3]) << 32) | \ - (((uint64_t)bp[4]) << 24) | (((uint64_t)bp[5]) << 16) | \ - (((uint64_t)bp[6]) << 8) | (((uint64_t)bp[7])) -#endif -#elif SIZEOF_WORDTYPE == 4 -#if defined(_M_X86) -#define GetNextData(nextdata, bp) \ - nextdata = _byteswap_ulong(*(unsigned long *)(bp)) -#elif defined(__GNUC__) -#define GetNextData(nextdata, bp) \ - memcpy(&nextdata, bp, sizeof(nextdata)); \ - nextdata = __builtin_bswap32(nextdata) -#else -#define GetNextData(nextdata, bp) \ - nextdata = (((uint32_t)bp[0]) << 24) | (((uint32_t)bp[1]) << 16) | \ - (((uint32_t)bp[2]) << 8) | (((uint32_t)bp[3])) -#endif -#else -#error "Unhandled SIZEOF_WORDTYPE" -#endif - -#define GetNextCodeLZW() \ - do \ - { \ - nextbits -= nbits; \ - if (nextbits < 0) \ - { \ - if (dec_bitsleft >= 8 * SIZEOF_WORDTYPE) \ - { \ - unsigned codetmp = (unsigned)(nextdata << (-nextbits)); \ - GetNextData(nextdata, bp); \ - bp += SIZEOF_WORDTYPE; \ - nextbits += 8 * SIZEOF_WORDTYPE; \ - dec_bitsleft -= 8 * SIZEOF_WORDTYPE; \ - code = (WordType)((codetmp | (nextdata >> nextbits)) & \ - nbitsmask); \ - break; \ - } \ - else \ - { \ - if (dec_bitsleft < 8) \ - { \ - goto no_eoi; \ - } \ - nextdata = (nextdata << 8) | *(bp)++; \ - nextbits += 8; \ - dec_bitsleft -= 8; \ - if (nextbits < 0) \ - { \ - if (dec_bitsleft < 8) \ - { \ - goto no_eoi; \ - } \ - nextdata = (nextdata << 8) | *(bp)++; \ - nextbits += 8; \ - dec_bitsleft -= 8; \ - } \ - } \ - } \ - code = (WordType)((nextdata >> nextbits) & nbitsmask); \ - } while (0) - -static int LZWDecode(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s) -{ - static const char module[] = "LZWDecode"; - LZWCodecState *sp = LZWDecoderState(tif); - uint8_t *op = (uint8_t *)op0; - tmsize_t occ = occ0; - uint8_t *bp; - long nbits, nextbits, nbitsmask; - WordType nextdata; - code_t *free_entp, *maxcodep, *oldcodep; - - (void)s; - assert(sp != NULL); - assert(sp->dec_codetab != NULL); - - if (sp->read_error) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "LZWDecode: Scanline %" PRIu32 " cannot be read due to " - "previous error", - tif->tif_row); - return 0; - } - - /* - * Restart interrupted output operation. - */ - if (sp->dec_restart) - { - tmsize_t residue; - - code_t *codep = sp->dec_codep; - residue = codep->length - sp->dec_restart; - if (residue > occ) - { - /* - * Residue from previous decode is sufficient - * to satisfy decode request. Skip to the - * start of the decoded string, place decoded - * values in the output buffer, and return. - */ - sp->dec_restart += occ; - do - { - codep = codep->next; - } while (--residue > occ && codep); - if (codep) - { - uint8_t *tp = op + occ; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--occ && codep); - } - return (1); - } - /* - * Residue satisfies only part of the decode request. - */ - op += residue; - occ -= residue; - uint8_t *tp = op; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--residue && codep); - sp->dec_restart = 0; - } - - bp = (uint8_t *)tif->tif_rawcp; - sp->dec_bitsleft += (((uint64_t)tif->tif_rawcc - sp->old_tif_rawcc) << 3); - uint64_t dec_bitsleft = sp->dec_bitsleft; - nbits = sp->lzw_nbits; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - nbitsmask = sp->dec_nbitsmask; - oldcodep = sp->dec_oldcodep; - free_entp = sp->dec_free_entp; - maxcodep = sp->dec_maxcodep; - code_t *const dec_codetab = sp->dec_codetab; - code_t *codep; - - if (occ == 0) - { - goto after_loop; - } - -begin: -{ - WordType code; - GetNextCodeLZW(); - codep = dec_codetab + code; - if (code >= CODE_FIRST) - goto code_above_or_equal_to_258; - if (code < 256) - goto code_below_256; - if (code == CODE_EOI) - goto after_loop; - goto code_clear; - -code_below_256: -{ - if (codep > free_entp) - goto error_code; - free_entp->next = oldcodep; - free_entp->firstchar = oldcodep->firstchar; - free_entp->length = oldcodep->length + 1; - free_entp->value = (uint8_t)code; - free_entp->repeated = - (bool)(oldcodep->repeated & (oldcodep->value == code)); - if (++free_entp > maxcodep) - { - if (++nbits > BITS_MAX) /* should not happen for a conformant encoder */ - nbits = BITS_MAX; - nbitsmask = MAXCODE(nbits); - maxcodep = dec_codetab + nbitsmask - 1; - if (free_entp >= &dec_codetab[CSIZE]) - { - /* At that point, the next valid states are either EOI or a */ - /* CODE_CLEAR. If a regular code is read, at the next */ - /* attempt at registering a new entry, we will error out */ - /* due to setting free_entp before any valid code */ - free_entp = dec_codetab - 1; - } - } - oldcodep = codep; - *op++ = (uint8_t)code; - occ--; - if (occ == 0) - goto after_loop; - goto begin; -} - -code_above_or_equal_to_258: -{ - /* - * Add the new entry to the code table. - */ - - if (codep >= free_entp) - { - if (codep != free_entp) - goto error_code; - free_entp->value = oldcodep->firstchar; - } - else - { - free_entp->value = codep->firstchar; - } - free_entp->repeated = - (bool)(oldcodep->repeated & (oldcodep->value == free_entp->value)); - free_entp->next = oldcodep; - - free_entp->firstchar = oldcodep->firstchar; - free_entp->length = oldcodep->length + 1; - if (++free_entp > maxcodep) - { - if (++nbits > BITS_MAX) /* should not happen for a conformant encoder */ - nbits = BITS_MAX; - nbitsmask = MAXCODE(nbits); - maxcodep = dec_codetab + nbitsmask - 1; - if (free_entp >= &dec_codetab[CSIZE]) - { - /* At that point, the next valid states are either EOI or a */ - /* CODE_CLEAR. If a regular code is read, at the next */ - /* attempt at registering a new entry, we will error out */ - /* due to setting free_entp before any valid code */ - free_entp = dec_codetab - 1; - } - } - oldcodep = codep; - - /* - * Code maps to a string, copy string - * value to output (written in reverse). - */ - /* tiny bit faster on x86_64 to store in unsigned short than int */ - unsigned short len = codep->length; - - if (len < 3) /* equivalent to len == 2 given all other conditions */ - { - if (occ <= 2) - { - if (occ == 2) - { - memcpy(op, &(codep->firstchar), 2); - op += 2; - occ -= 2; - goto after_loop; - } - goto too_short_buffer; - } - - memcpy(op, &(codep->firstchar), 2); - op += 2; - occ -= 2; - goto begin; /* we can save the comparison occ > 0 */ - } - - if (len == 3) - { - if (occ <= 3) - { - if (occ == 3) - { - op[0] = codep->firstchar; - op[1] = codep->next->value; - op[2] = codep->value; - op += 3; - occ -= 3; - goto after_loop; - } - goto too_short_buffer; - } - - op[0] = codep->firstchar; - op[1] = codep->next->value; - op[2] = codep->value; - op += 3; - occ -= 3; - goto begin; /* we can save the comparison occ > 0 */ - } - - if (len > occ) - { - goto too_short_buffer; - } - - if (codep->repeated) - { - memset(op, codep->value, len); - op += len; - occ -= len; - if (occ == 0) - goto after_loop; - goto begin; - } - - uint8_t *tp = op + len; - - assert(len >= 4); - - *--tp = codep->value; - codep = codep->next; - *--tp = codep->value; - codep = codep->next; - *--tp = codep->value; - codep = codep->next; - *--tp = codep->value; - if (tp > op) - { - do - { - codep = codep->next; - *--tp = codep->value; - } while (tp > op); - } - - assert(occ >= len); - op += len; - occ -= len; - if (occ == 0) - goto after_loop; - goto begin; -} - -code_clear: -{ - free_entp = dec_codetab + CODE_FIRST; - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = dec_codetab + nbitsmask - 1; - do - { - GetNextCodeLZW(); - } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ - if (code == CODE_EOI) - goto after_loop; - if (code > CODE_EOI) - { - goto error_code; - } - *op++ = (uint8_t)code; - occ--; - oldcodep = dec_codetab + code; - if (occ == 0) - goto after_loop; - goto begin; -} -} - -too_short_buffer: -{ - /* - * String is too long for decode buffer, - * locate portion that will fit, copy to - * the decode buffer, and setup restart - * logic for the next decoding call. - */ - sp->dec_codep = codep; - do - { - codep = codep->next; - } while (codep->length > occ); - - sp->dec_restart = occ; - uint8_t *tp = op + occ; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--occ); -} - -after_loop: - tif->tif_rawcc -= (tmsize_t)((uint8_t *)bp - tif->tif_rawcp); - tif->tif_rawcp = (uint8_t *)bp; - sp->old_tif_rawcc = tif->tif_rawcc; - sp->dec_bitsleft = dec_bitsleft; - sp->lzw_nbits = (unsigned short)nbits; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->dec_nbitsmask = nbitsmask; - sp->dec_oldcodep = oldcodep; - sp->dec_free_entp = free_entp; - sp->dec_maxcodep = maxcodep; - - if (occ > 0) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, - "Not enough data at scanline %" PRIu32 " (short %" PRIu64 - " bytes)", - tif->tif_row, (uint64_t)occ); - return (0); - } - return (1); - -no_eoi: - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, - "LZWDecode: Strip %" PRIu32 " not terminated with EOI code", - tif->tif_curstrip); - return 0; -error_code: - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, tif->tif_name, "Using code not yet in table"); - return 0; -} - -#ifdef LZW_COMPAT - -/* - * This check shouldn't be necessary because each - * strip is suppose to be terminated with CODE_EOI. - */ -#define NextCode(_tif, _sp, _bp, _code, _get, dec_bitsleft) \ - { \ - if (dec_bitsleft < (uint64_t)nbits) \ - { \ - TIFFWarningExtR(_tif, module, \ - "LZWDecode: Strip %" PRIu32 \ - " not terminated with EOI code", \ - _tif->tif_curstrip); \ - _code = CODE_EOI; \ - } \ - else \ - { \ - _get(_sp, _bp, _code); \ - dec_bitsleft -= nbits; \ - } \ - } - -/* - * Decode a "hunk of data" for old images. - */ -#define GetNextCodeCompat(sp, bp, code) \ - { \ - nextdata |= (unsigned long)*(bp)++ << nextbits; \ - nextbits += 8; \ - if (nextbits < nbits) \ - { \ - nextdata |= (unsigned long)*(bp)++ << nextbits; \ - nextbits += 8; \ - } \ - code = (hcode_t)(nextdata & nbitsmask); \ - nextdata >>= nbits; \ - nextbits -= nbits; \ - } - -static int LZWDecodeCompat(TIFF *tif, uint8_t *op0, tmsize_t occ0, uint16_t s) -{ - static const char module[] = "LZWDecodeCompat"; - LZWCodecState *sp = LZWDecoderState(tif); - uint8_t *op = (uint8_t *)op0; - tmsize_t occ = occ0; - uint8_t *tp; - uint8_t *bp; - int code, nbits; - int len; - long nextbits, nbitsmask; - WordType nextdata; - code_t *codep, *free_entp, *maxcodep, *oldcodep; - - (void)s; - assert(sp != NULL); - - /* - * Restart interrupted output operation. - */ - if (sp->dec_restart) - { - tmsize_t residue; - - codep = sp->dec_codep; - residue = codep->length - sp->dec_restart; - if (residue > occ) - { - /* - * Residue from previous decode is sufficient - * to satisfy decode request. Skip to the - * start of the decoded string, place decoded - * values in the output buffer, and return. - */ - sp->dec_restart += occ; - do - { - codep = codep->next; - } while (--residue > occ); - tp = op + occ; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--occ); - return (1); - } - /* - * Residue satisfies only part of the decode request. - */ - op += residue; - occ -= residue; - tp = op; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--residue); - sp->dec_restart = 0; - } - - bp = (uint8_t *)tif->tif_rawcp; - - sp->dec_bitsleft += (((uint64_t)tif->tif_rawcc - sp->old_tif_rawcc) << 3); - uint64_t dec_bitsleft = sp->dec_bitsleft; - - nbits = sp->lzw_nbits; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - nbitsmask = sp->dec_nbitsmask; - oldcodep = sp->dec_oldcodep; - free_entp = sp->dec_free_entp; - maxcodep = sp->dec_maxcodep; - - while (occ > 0) - { - NextCode(tif, sp, bp, code, GetNextCodeCompat, dec_bitsleft); - if (code == CODE_EOI) - break; - if (code == CODE_CLEAR) - { - do - { - free_entp = sp->dec_codetab + CODE_FIRST; - _TIFFmemset(free_entp, 0, - (CSIZE - CODE_FIRST) * sizeof(code_t)); - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = sp->dec_codetab + nbitsmask; - NextCode(tif, sp, bp, code, GetNextCodeCompat, dec_bitsleft); - } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ - if (code == CODE_EOI) - break; - if (code > CODE_CLEAR) - { - TIFFErrorExtR( - tif, tif->tif_name, - "LZWDecode: Corrupted LZW table at scanline %" PRIu32, - tif->tif_row); - return (0); - } - *op++ = (uint8_t)code; - occ--; - oldcodep = sp->dec_codetab + code; - continue; - } - codep = sp->dec_codetab + code; - - /* - * Add the new entry to the code table. - */ - if (free_entp < &sp->dec_codetab[0] || - free_entp >= &sp->dec_codetab[CSIZE]) - { - TIFFErrorExtR(tif, module, - "Corrupted LZW table at scanline %" PRIu32, - tif->tif_row); - return (0); - } - - free_entp->next = oldcodep; - if (free_entp->next < &sp->dec_codetab[0] || - free_entp->next >= &sp->dec_codetab[CSIZE]) - { - TIFFErrorExtR(tif, module, - "Corrupted LZW table at scanline %" PRIu32, - tif->tif_row); - return (0); - } - free_entp->firstchar = free_entp->next->firstchar; - free_entp->length = free_entp->next->length + 1; - free_entp->value = - (codep < free_entp) ? codep->firstchar : free_entp->firstchar; - if (++free_entp > maxcodep) - { - if (++nbits > BITS_MAX) /* should not happen */ - nbits = BITS_MAX; - nbitsmask = MAXCODE(nbits); - maxcodep = sp->dec_codetab + nbitsmask; - } - oldcodep = codep; - if (code >= 256) - { - /* - * Code maps to a string, copy string - * value to output (written in reverse). - */ - if (codep->length == 0) - { - TIFFErrorExtR( - tif, module, - "Wrong length of decoded " - "string: data probably corrupted at scanline %" PRIu32, - tif->tif_row); - return (0); - } - if (codep->length > occ) - { - /* - * String is too long for decode buffer, - * locate portion that will fit, copy to - * the decode buffer, and setup restart - * logic for the next decoding call. - */ - sp->dec_codep = codep; - do - { - codep = codep->next; - } while (codep->length > occ); - sp->dec_restart = occ; - tp = op + occ; - do - { - *--tp = codep->value; - codep = codep->next; - } while (--occ); - break; - } - len = codep->length; - tp = op + len; - do - { - *--tp = codep->value; - codep = codep->next; - } while (codep && tp > op); - assert(occ >= len); - op += len; - occ -= len; - } - else - { - *op++ = (uint8_t)code; - occ--; - } - } - - tif->tif_rawcc -= (tmsize_t)((uint8_t *)bp - tif->tif_rawcp); - tif->tif_rawcp = (uint8_t *)bp; - - sp->old_tif_rawcc = tif->tif_rawcc; - sp->dec_bitsleft = dec_bitsleft; - - sp->lzw_nbits = (unsigned short)nbits; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->dec_nbitsmask = nbitsmask; - sp->dec_oldcodep = oldcodep; - sp->dec_free_entp = free_entp; - sp->dec_maxcodep = maxcodep; - - if (occ > 0) - { - TIFFErrorExtR(tif, module, - "Not enough data at scanline %" PRIu32 " (short %" PRIu64 - " bytes)", - tif->tif_row, (uint64_t)occ); - return (0); - } - return (1); -} -#endif /* LZW_COMPAT */ - -#ifndef LZW_READ_ONLY - -static void cl_hash(LZWCodecState *); - -/* - * LZW Encoding. - */ - -static int LZWSetupEncode(TIFF *tif) -{ - static const char module[] = "LZWSetupEncode"; - LZWCodecState *sp = LZWEncoderState(tif); - - assert(sp != NULL); - sp->enc_hashtab = (hash_t *)_TIFFmallocExt(tif, HSIZE * sizeof(hash_t)); - if (sp->enc_hashtab == NULL) - { - TIFFErrorExtR(tif, module, "No space for LZW hash table"); - return (0); - } - return (1); -} - -/* - * Reset encoding state at the start of a strip. - */ -static int LZWPreEncode(TIFF *tif, uint16_t s) -{ - LZWCodecState *sp = LZWEncoderState(tif); - - (void)s; - assert(sp != NULL); - - if (sp->enc_hashtab == NULL) - { - tif->tif_setupencode(tif); - } - - sp->lzw_nbits = BITS_MIN; - sp->lzw_maxcode = MAXCODE(BITS_MIN); - sp->lzw_free_ent = CODE_FIRST; - sp->lzw_nextbits = 0; - sp->lzw_nextdata = 0; - sp->enc_checkpoint = CHECK_GAP; - sp->enc_ratio = 0; - sp->enc_incount = 0; - sp->enc_outcount = 0; - /* - * The 4 here insures there is space for 2 max-sized - * codes in LZWEncode and LZWPostDecode. - */ - sp->enc_rawlimit = tif->tif_rawdata + tif->tif_rawdatasize - 1 - 4; - cl_hash(sp); /* clear hash table */ - sp->enc_oldcode = (hcode_t)-1; /* generates CODE_CLEAR in LZWEncode */ - return (1); -} - -#define CALCRATIO(sp, rat) \ - { \ - if (incount > 0x007fffff) \ - { /* NB: shift will overflow */ \ - rat = outcount >> 8; \ - rat = (rat == 0 ? 0x7fffffff : incount / rat); \ - } \ - else \ - rat = (incount << 8) / outcount; \ - } - -/* Explicit 0xff masking to make icc -check=conversions happy */ -#define PutNextCode(op, c) \ - { \ - nextdata = (nextdata << nbits) | c; \ - nextbits += nbits; \ - *op++ = (unsigned char)((nextdata >> (nextbits - 8)) & 0xff); \ - nextbits -= 8; \ - if (nextbits >= 8) \ - { \ - *op++ = (unsigned char)((nextdata >> (nextbits - 8)) & 0xff); \ - nextbits -= 8; \ - } \ - outcount += nbits; \ - } - -/* - * Encode a chunk of pixels. - * - * Uses an open addressing double hashing (no chaining) on the - * prefix code/next character combination. We do a variant of - * Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's - * relatively-prime secondary probe. Here, the modular division - * first probe is gives way to a faster exclusive-or manipulation. - * Also do block compression with an adaptive reset, whereby the - * code table is cleared when the compression ratio decreases, - * but after the table fills. The variable-length output codes - * are re-sized at this point, and a CODE_CLEAR is generated - * for the decoder. - */ -static int LZWEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - register LZWCodecState *sp = LZWEncoderState(tif); - register long fcode; - register hash_t *hp; - register int h, c; - hcode_t ent; - long disp; - tmsize_t incount, outcount, checkpoint; - WordType nextdata; - long nextbits; - int free_ent, maxcode, nbits; - uint8_t *op; - uint8_t *limit; - - (void)s; - if (sp == NULL) - return (0); - - assert(sp->enc_hashtab != NULL); - - /* - * Load local state. - */ - incount = sp->enc_incount; - outcount = sp->enc_outcount; - checkpoint = sp->enc_checkpoint; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - free_ent = sp->lzw_free_ent; - maxcode = sp->lzw_maxcode; - nbits = sp->lzw_nbits; - op = tif->tif_rawcp; - limit = sp->enc_rawlimit; - ent = (hcode_t)sp->enc_oldcode; - - if (ent == (hcode_t)-1 && cc > 0) - { - /* - * NB: This is safe because it can only happen - * at the start of a strip where we know there - * is space in the data buffer. - */ - PutNextCode(op, CODE_CLEAR); - ent = *bp++; - cc--; - incount++; - } - while (cc > 0) - { - c = *bp++; - cc--; - incount++; - fcode = ((long)c << BITS_MAX) + ent; - h = (c << HSHIFT) ^ ent; /* xor hashing */ -#ifdef _WINDOWS - /* - * Check hash index for an overflow. - */ - if (h >= HSIZE) - h -= HSIZE; -#endif - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) - { - ent = hp->code; - continue; - } - if (hp->hash >= 0) - { - /* - * Primary hash failed, check secondary hash. - */ - disp = HSIZE - h; - if (h == 0) - disp = 1; - do - { - /* - * Avoid pointer arithmetic because of - * wraparound problems with segments. - */ - if ((h -= disp) < 0) - h += HSIZE; - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) - { - ent = hp->code; - goto hit; - } - } while (hp->hash >= 0); - } - /* - * New entry, emit code and add to table. - */ - /* - * Verify there is space in the buffer for the code - * and any potential Clear code that might be emitted - * below. The value of limit is setup so that there - * are at least 4 bytes free--room for 2 codes. - */ - if (op > limit) - { - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - if (!TIFFFlushData1(tif)) - return 0; - op = tif->tif_rawdata; - } - PutNextCode(op, ent); - ent = (hcode_t)c; - hp->code = (hcode_t)(free_ent++); - hp->hash = fcode; - if (free_ent == CODE_MAX - 1) - { - /* table is full, emit clear code and reset */ - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } - else - { - /* - * If the next entry is going to be too big for - * the code size, then increase it, if possible. - */ - if (free_ent > maxcode) - { - nbits++; - assert(nbits <= BITS_MAX); - maxcode = (int)MAXCODE(nbits); - } - else if (incount >= checkpoint) - { - tmsize_t rat; - /* - * Check compression ratio and, if things seem - * to be slipping, clear the hash table and - * reset state. The compression ratio is a - * 24+8-bit fractional number. - */ - checkpoint = incount + CHECK_GAP; - CALCRATIO(sp, rat); - if (rat <= sp->enc_ratio) - { - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } - else - sp->enc_ratio = rat; - } - } - hit:; - } - - /* - * Restore global state. - */ - sp->enc_incount = incount; - sp->enc_outcount = outcount; - sp->enc_checkpoint = checkpoint; - sp->enc_oldcode = ent; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->lzw_free_ent = (unsigned short)free_ent; - sp->lzw_maxcode = (unsigned short)maxcode; - sp->lzw_nbits = (unsigned short)nbits; - tif->tif_rawcp = op; - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int LZWPostEncode(TIFF *tif) -{ - register LZWCodecState *sp = LZWEncoderState(tif); - uint8_t *op = tif->tif_rawcp; - long nextbits = sp->lzw_nextbits; - WordType nextdata = sp->lzw_nextdata; - tmsize_t outcount = sp->enc_outcount; - int nbits = sp->lzw_nbits; - - if (op > sp->enc_rawlimit) - { - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - if (!TIFFFlushData1(tif)) - return 0; - op = tif->tif_rawdata; - } - if (sp->enc_oldcode != (hcode_t)-1) - { - int free_ent = sp->lzw_free_ent; - - PutNextCode(op, sp->enc_oldcode); - sp->enc_oldcode = (hcode_t)-1; - free_ent++; - - if (free_ent == CODE_MAX - 1) - { - /* table is full, emit clear code and reset */ - outcount = 0; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - } - else - { - /* - * If the next entry is going to be too big for - * the code size, then increase it, if possible. - */ - if (free_ent > sp->lzw_maxcode) - { - nbits++; - assert(nbits <= BITS_MAX); - } - } - } - PutNextCode(op, CODE_EOI); - /* Explicit 0xff masking to make icc -check=conversions happy */ - if (nextbits > 0) - *op++ = (unsigned char)((nextdata << (8 - nextbits)) & 0xff); - tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - (void)outcount; - return (1); -} - -/* - * Reset encoding hash table. - */ -static void cl_hash(LZWCodecState *sp) -{ - register hash_t *hp = &sp->enc_hashtab[HSIZE - 1]; - register long i = HSIZE - 8; - - do - { - i -= 8; - hp[-7].hash = -1; - hp[-6].hash = -1; - hp[-5].hash = -1; - hp[-4].hash = -1; - hp[-3].hash = -1; - hp[-2].hash = -1; - hp[-1].hash = -1; - hp[0].hash = -1; - hp -= 8; - } while (i >= 0); - for (i += 8; i > 0; i--, hp--) - hp->hash = -1; -} - -#endif - -static void LZWCleanup(TIFF *tif) -{ - (void)TIFFPredictorCleanup(tif); - - assert(tif->tif_data != NULL); - - if (LZWDecoderState(tif)->dec_codetab) - _TIFFfreeExt(tif, LZWDecoderState(tif)->dec_codetab); - - if (LZWEncoderState(tif)->enc_hashtab) - _TIFFfreeExt(tif, LZWEncoderState(tif)->enc_hashtab); - - _TIFFfreeExt(tif, tif->tif_data); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -int TIFFInitLZW(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitLZW"; - (void)scheme; - assert(scheme == COMPRESSION_LZW); - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(LZWCodecState)); - if (tif->tif_data == NULL) - goto bad; - LZWDecoderState(tif)->dec_codetab = NULL; - LZWDecoderState(tif)->dec_decode = NULL; - LZWEncoderState(tif)->enc_hashtab = NULL; - LZWState(tif)->rw_mode = tif->tif_mode; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = LZWFixupTags; - tif->tif_setupdecode = LZWSetupDecode; - tif->tif_predecode = LZWPreDecode; - tif->tif_decoderow = LZWDecode; - tif->tif_decodestrip = LZWDecode; - tif->tif_decodetile = LZWDecode; -#ifndef LZW_READ_ONLY - tif->tif_setupencode = LZWSetupEncode; - tif->tif_preencode = LZWPreEncode; - tif->tif_postencode = LZWPostEncode; - tif->tif_encoderow = LZWEncode; - tif->tif_encodestrip = LZWEncode; - tif->tif_encodetile = LZWEncode; -#endif - tif->tif_cleanup = LZWCleanup; - /* - * Setup predictor setup. - */ - (void)TIFFPredictorInit(tif); - return (1); -bad: - TIFFErrorExtR(tif, module, "No space for LZW state block"); - return (0); -} - -/* - * Copyright (c) 1985, 1986 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * James A. Woods, derived from original work by Spencer Thomas - * and Joseph Orost. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -#endif /* LZW_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_next.c b/third_party/libtiff/libtiff/tif_next.c deleted file mode 100644 index f000574..0000000 --- a/third_party/libtiff/libtiff/tif_next.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef NEXT_SUPPORT -/* - * TIFF Library. - * - * NeXT 2-bit Grey Scale Compression Algorithm Support - */ - -#define SETPIXEL(op, v) \ - { \ - switch (npixels++ & 3) \ - { \ - case 0: \ - op[0] = (unsigned char)((v) << 6); \ - break; \ - case 1: \ - op[0] |= (v) << 4; \ - break; \ - case 2: \ - op[0] |= (v) << 2; \ - break; \ - case 3: \ - *op++ |= (v); \ - op_offset++; \ - break; \ - } \ - } - -#define LITERALROW 0x00 -#define LITERALSPAN 0x40 -#define WHITE ((1 << 2) - 1) - -static int NeXTDecode(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - static const char module[] = "NeXTDecode"; - unsigned char *bp, *op; - tmsize_t cc; - uint8_t *row; - tmsize_t scanline, n; - - (void)s; - /* - * Each scanline is assumed to start off as all - * white (we assume a PhotometricInterpretation - * of ``min-is-black''). - */ - for (op = (unsigned char *)buf, cc = occ; cc-- > 0;) - *op++ = 0xff; - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - scanline = tif->tif_scanlinesize; - if (occ % scanline) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (0); - } - for (row = buf; cc > 0 && occ > 0; occ -= scanline, row += scanline) - { - n = *bp++; - cc--; - switch (n) - { - case LITERALROW: - /* - * The entire scanline is given as literal values. - */ - if (cc < scanline) - goto bad; - _TIFFmemcpy(row, bp, scanline); - bp += scanline; - cc -= scanline; - break; - case LITERALSPAN: - { - tmsize_t off; - /* - * The scanline has a literal span that begins at some - * offset. - */ - if (cc < 4) - goto bad; - off = (bp[0] * 256) + bp[1]; - n = (bp[2] * 256) + bp[3]; - if (cc < 4 + n || off + n > scanline) - goto bad; - _TIFFmemcpy(row + off, bp + 4, n); - bp += 4 + n; - cc -= 4 + n; - break; - } - default: - { - uint32_t npixels = 0, grey; - tmsize_t op_offset = 0; - uint32_t imagewidth = tif->tif_dir.td_imagewidth; - if (isTiled(tif)) - imagewidth = tif->tif_dir.td_tilewidth; - - /* - * The scanline is composed of a sequence of constant - * color ``runs''. We shift into ``run mode'' and - * interpret bytes as codes of the form - * until we've filled the scanline. - */ - op = row; - for (;;) - { - grey = (uint32_t)((n >> 6) & 0x3); - n &= 0x3f; - /* - * Ensure the run does not exceed the scanline - * bounds, potentially resulting in a security - * issue. - */ - while (n-- > 0 && npixels < imagewidth && - op_offset < scanline) - SETPIXEL(op, grey); - if (npixels >= imagewidth) - break; - if (op_offset >= scanline) - { - TIFFErrorExtR(tif, module, - "Invalid data for scanline %" PRIu32, - tif->tif_row); - return (0); - } - if (cc == 0) - goto bad; - n = *bp++; - cc--; - } - break; - } - } - } - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - return (1); -bad: - TIFFErrorExtR(tif, module, "Not enough data for scanline %" PRIu32, - tif->tif_row); - return (0); -} - -static int NeXTPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "NeXTPreDecode"; - TIFFDirectory *td = &tif->tif_dir; - (void)s; - - if (td->td_bitspersample != 2) - { - TIFFErrorExtR(tif, module, "Unsupported BitsPerSample = %" PRIu16, - td->td_bitspersample); - return (0); - } - return (1); -} - -int TIFFInitNeXT(TIFF *tif, int scheme) -{ - (void)scheme; - tif->tif_predecode = NeXTPreDecode; - tif->tif_decoderow = NeXTDecode; - tif->tif_decodestrip = NeXTDecode; - tif->tif_decodetile = NeXTDecode; - return (1); -} -#endif /* NEXT_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_ojpeg.c b/third_party/libtiff/libtiff/tif_ojpeg.c deleted file mode 100644 index 5ef7a6a..0000000 --- a/third_party/libtiff/libtiff/tif_ojpeg.c +++ /dev/null @@ -1,2810 +0,0 @@ -/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0 - specification is now totally obsolete and deprecated for new applications and - images. This file was was created solely in order to read unconverted images - still present on some users' computer systems. It will never be extended - to write such files. Writing new-style JPEG compressed TIFFs is implemented - in tif_jpeg.c. - - The code is carefully crafted to robustly read all gathered JPEG-in-TIFF - testfiles, and anticipate as much as possible all other... But still, it may - fail on some. If you encounter problems, please report them on the TIFF - mailing list and/or to Joris Van Damme . - - Please read the file called "TIFF Technical Note #2" if you need to be - convinced this compression scheme is bad and breaks TIFF. That document - is linked to from the LibTiff site - and from AWare Systems' TIFF section - . It is also absorbed - in Adobe's specification supplements, marked "draft" up to this day, but - supported by the TIFF community. - - This file interfaces with Release 6B of the JPEG Library written by the - Independent JPEG Group. Previous versions of this file required a hack inside - the LibJpeg library. This version no longer requires that. Remember to - remove the hack if you update from the old version. - - Copyright (c) Joris Van Damme - Copyright (c) AWare Systems - - The licence agreement for this file is the same as the rest of the LibTiff - library. - - IN NO EVENT SHALL JORIS VAN DAMME OR AWARE SYSTEMS BE LIABLE FOR - ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. - - Joris Van Damme and/or AWare Systems may be available for custom - development. If you like what you see, and need anything similar or related, - contact . -*/ - -/* What is what, and what is not? - - This decoder starts with an input stream, that is essentially the - JpegInterchangeFormat stream, if any, followed by the strile data, if any. - This stream is read in OJPEGReadByte and related functions. - - It analyzes the start of this stream, until it encounters non-marker data, - i.e. compressed image data. Some of the header markers it sees have no actual - content, like the SOI marker, and APP/COM markers that really shouldn't even - be there. Some other markers do have content, and the valuable bits and - pieces of information in these markers are saved, checking all to verify that - the stream is more or less within expected bounds. This happens inside the - OJPEGReadHeaderInfoSecStreamXxx functions. - - Some OJPEG imagery contains no valid JPEG header markers. This situation is - picked up on if we've seen no SOF marker when we're at the start of the - compressed image data. In this case, the tables are read from JpegXxxTables - tags, and the other bits and pieces of information is initialized to its most - basic value. This is implemented in the OJPEGReadHeaderInfoSecTablesXxx - functions. - - When this is complete, a good and valid JPEG header can be assembled, and - this is passed through to LibJpeg. When that's done, the remainder of the - input stream, i.e. the compressed image data, can be passed through - unchanged. This is done in OJPEGWriteStream functions. - - LibTiff rightly expects to know the subsampling values before decompression. - Just like in new-style JPEG-in-TIFF, though, or even more so, actually, the - YCbCrsubsampling tag is notoriously unreliable. To correct these tag values - with the ones inside the JPEG stream, the first part of the input stream is - pre-scanned in OJPEGSubsamplingCorrect, making no note of any other data, - reporting no warnings or errors, up to the point where either these values - are read, or it's clear they aren't there. This means that some of the data - is read twice, but we feel speed in correcting these values is important - enough to warrant this sacrifice. Although there is currently no define or - other configuration mechanism to disable this behavior, the actual header - scanning is build to robustly respond with error report if it should - encounter an uncorrected mismatch of subsampling values. See - OJPEGReadHeaderInfoSecStreamSof. - - The restart interval and restart markers are the most tricky part... The - restart interval can be specified in a tag. It can also be set inside the - input JPEG stream. It can be used inside the input JPEG stream. If reading - from strile data, we've consistently discovered the need to insert restart - markers in between the different striles, as is also probably the most likely - interpretation of the original TIFF 6.0 specification. With all this setting - of interval, and actual use of markers that is not predictable at the time of - valid JPEG header assembly, the restart thing may turn out the Achilles heel - of this implementation. Fortunately, most OJPEG writer vendors succeed in - reading back what they write, which may be the reason why we've been able to - discover ways that seem to work. - - Some special provision is made for planarconfig separate OJPEG files. These - seem to consistently contain header info, a SOS marker, a plane, SOS marker, - plane, SOS, and plane. This may or may not be a valid JPEG configuration, we - don't know and don't care. We want LibTiff to be able to access the planes - individually, without huge buffering inside LibJpeg, anyway. So we compose - headers to feed to LibJpeg, in this case, that allow us to pass a single - plane such that LibJpeg sees a valid single-channel JPEG stream. Locating - subsequent SOS markers, and thus subsequent planes, is done inside - OJPEGReadSecondarySos. - - The benefit of the scheme is... that it works, basically. We know of no other - that does. It works without checking software tag, or otherwise going about - things in an OJPEG flavor specific manner. Instead, it is a single scheme, - that covers the cases with and without JpegInterchangeFormat, with and - without striles, with part of the header in JpegInterchangeFormat and - remainder in first strile, etc. It is forgiving and robust, may likely work - with OJPEG flavors we've not seen yet, and makes most out of the data. - - Another nice side-effect is that a complete JPEG single valid stream is build - if planarconfig is not separate (vast majority). We may one day use that to - build converters to JPEG, and/or to new-style JPEG compression inside TIFF. - - A disadvantage is the lack of random access to the individual striles. This - is the reason for much of the complicated restart-and-position stuff inside - OJPEGPreDecode. Applications would do well accessing all striles in order, as - this will result in a single sequential scan of the input stream, and no - restarting of LibJpeg decoding session. -*/ - -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN - -#include "tiffiop.h" -#ifdef OJPEG_SUPPORT - -/* Configuration defines here are: - * JPEG_ENCAP_EXTERNAL: The normal way to call libjpeg, uses longjump. In some - * environments, like eg LibTiffDelphi, this is not possible. For this reason, - * the actual calls to libjpeg, with longjump stuff, are encapsulated in - * dedicated functions. When JPEG_ENCAP_EXTERNAL is defined, these encapsulating - * functions are declared external to this unit, and can be defined elsewhere to - * use stuff other then longjump. The default mode, without JPEG_ENCAP_EXTERNAL, - * implements the call encapsulators here, internally, with normal longjump. - * SETJMP, LONGJMP, JMP_BUF: On some machines/environments a longjump equivalent - * is conveniently available, but still it may be worthwhile to use _setjmp or - * sigsetjmp in place of plain setjmp. These macros will make it easier. It is - * useless to fiddle with these if you define JPEG_ENCAP_EXTERNAL. OJPEG_BUFFER: - * Define the size of the desired buffer here. Should be small enough so as to - * guarantee instant processing, optimal streaming and optimal use of processor - * cache, but also big enough so as to not result in significant call overhead. - * It should be at least a few bytes to accommodate some structures (this is - * verified in asserts), but it would not be sensible to make it this small - * anyway, and it should be at most 64K since it is indexed with uint16_t. We - * recommend 2K. EGYPTIANWALK: You could also define EGYPTIANWALK here, but it - * is not used anywhere and has absolutely no effect. That is why most people - * insist the EGYPTIANWALK is a bit silly. - */ - -/* define LIBJPEG_ENCAP_EXTERNAL */ -#define SETJMP(jbuf) setjmp(jbuf) -#define LONGJMP(jbuf, code) longjmp(jbuf, code) -#define JMP_BUF jmp_buf -#define OJPEG_BUFFER 2048 -/* define EGYPTIANWALK */ - -#define JPEG_MARKER_SOF0 0xC0 -#define JPEG_MARKER_SOF1 0xC1 -#define JPEG_MARKER_SOF3 0xC3 -#define JPEG_MARKER_DHT 0xC4 -#define JPEG_MARKER_RST0 0XD0 -#define JPEG_MARKER_SOI 0xD8 -#define JPEG_MARKER_EOI 0xD9 -#define JPEG_MARKER_SOS 0xDA -#define JPEG_MARKER_DQT 0xDB -#define JPEG_MARKER_DRI 0xDD -#define JPEG_MARKER_APP0 0xE0 -#define JPEG_MARKER_COM 0xFE - -#define FIELD_OJPEG_JPEGINTERCHANGEFORMAT (FIELD_CODEC + 0) -#define FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH (FIELD_CODEC + 1) -#define FIELD_OJPEG_JPEGQTABLES (FIELD_CODEC + 2) -#define FIELD_OJPEG_JPEGDCTABLES (FIELD_CODEC + 3) -#define FIELD_OJPEG_JPEGACTABLES (FIELD_CODEC + 4) -#define FIELD_OJPEG_JPEGPROC (FIELD_CODEC + 5) -#define FIELD_OJPEG_JPEGRESTARTINTERVAL (FIELD_CODEC + 6) - -static const TIFFField ojpegFields[] = { - {TIFFTAG_JPEGIFOFFSET, 1, 1, TIFF_LONG8, 0, TIFF_SETGET_UINT64, - FIELD_OJPEG_JPEGINTERCHANGEFORMAT, TRUE, FALSE, "JpegInterchangeFormat", - NULL}, - {TIFFTAG_JPEGIFBYTECOUNT, 1, 1, TIFF_LONG8, 0, TIFF_SETGET_UINT64, - FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH, TRUE, FALSE, - "JpegInterchangeFormatLength", NULL}, - {TIFFTAG_JPEGQTABLES, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_LONG8, 0, - TIFF_SETGET_C32_UINT64, FIELD_OJPEG_JPEGQTABLES, FALSE, TRUE, - "JpegQTables", NULL}, - {TIFFTAG_JPEGDCTABLES, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_LONG8, 0, - TIFF_SETGET_C32_UINT64, FIELD_OJPEG_JPEGDCTABLES, FALSE, TRUE, - "JpegDcTables", NULL}, - {TIFFTAG_JPEGACTABLES, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_LONG8, 0, - TIFF_SETGET_C32_UINT64, FIELD_OJPEG_JPEGACTABLES, FALSE, TRUE, - "JpegAcTables", NULL}, - {TIFFTAG_JPEGPROC, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, - FIELD_OJPEG_JPEGPROC, FALSE, FALSE, "JpegProc", NULL}, - {TIFFTAG_JPEGRESTARTINTERVAL, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, - FIELD_OJPEG_JPEGRESTARTINTERVAL, FALSE, FALSE, "JpegRestartInterval", - NULL}, -}; - -#ifndef LIBJPEG_ENCAP_EXTERNAL -#include -#endif - -#include "jerror.h" -#include "jpeglib.h" - -#ifndef TIFF_jpeg_source_mgr_defined -#define TIFF_jpeg_source_mgr_defined -typedef struct jpeg_source_mgr jpeg_source_mgr; -#endif - -#ifndef TIFF_jpeg_error_mgr_defined -#define TIFF_jpeg_error_mgr_defined -typedef struct jpeg_error_mgr jpeg_error_mgr; -#endif - -typedef struct jpeg_common_struct jpeg_common_struct; -typedef struct jpeg_decompress_struct jpeg_decompress_struct; - -typedef enum -{ - osibsNotSetYet, - osibsJpegInterchangeFormat, - osibsStrile, - osibsEof -} OJPEGStateInBufferSource; - -typedef enum -{ - ososSoi, - ososQTable0, - ososQTable1, - ososQTable2, - ososQTable3, - ososDcTable0, - ososDcTable1, - ososDcTable2, - ososDcTable3, - ososAcTable0, - ososAcTable1, - ososAcTable2, - ososAcTable3, - ososDri, - ososSof, - ososSos, - ososCompressed, - ososRst, - ososEoi -} OJPEGStateOutState; - -typedef struct -{ - TIFF *tif; - int decoder_ok; - int error_in_raw_data_decoding; -#ifndef LIBJPEG_ENCAP_EXTERNAL - JMP_BUF exit_jmpbuf; -#endif - TIFFVGetMethod vgetparent; - TIFFVSetMethod vsetparent; - TIFFPrintMethod printdir; - uint64_t file_size; - uint32_t image_width; - uint32_t image_length; - uint32_t strile_width; - uint32_t strile_length; - uint32_t strile_length_total; - uint8_t samples_per_pixel; - uint8_t plane_sample_offset; - uint8_t samples_per_pixel_per_plane; - uint64_t jpeg_interchange_format; - uint64_t jpeg_interchange_format_length; - uint8_t jpeg_proc; - uint8_t subsamplingcorrect; - uint8_t subsamplingcorrect_done; - uint8_t subsampling_tag; - uint8_t subsampling_hor; - uint8_t subsampling_ver; - uint8_t subsampling_force_desubsampling_inside_decompression; - uint8_t qtable_offset_count; - uint8_t dctable_offset_count; - uint8_t actable_offset_count; - uint64_t qtable_offset[3]; - uint64_t dctable_offset[3]; - uint64_t actable_offset[3]; - uint8_t *qtable[4]; - uint8_t *dctable[4]; - uint8_t *actable[4]; - uint16_t restart_interval; - uint8_t restart_index; - uint8_t sof_log; - uint8_t sof_marker_id; - uint32_t sof_x; - uint32_t sof_y; - uint8_t sof_c[3]; - uint8_t sof_hv[3]; - uint8_t sof_tq[3]; - uint8_t sos_cs[3]; - uint8_t sos_tda[3]; - struct - { - uint8_t log; - OJPEGStateInBufferSource in_buffer_source; - uint32_t in_buffer_next_strile; - uint64_t in_buffer_file_pos; - uint64_t in_buffer_file_togo; - } sos_end[3]; - uint8_t readheader_done; - uint8_t writeheader_done; - uint16_t write_cursample; - uint32_t write_curstrile; - uint8_t libjpeg_session_active; - uint8_t libjpeg_jpeg_query_style; - jpeg_error_mgr libjpeg_jpeg_error_mgr; - jpeg_decompress_struct libjpeg_jpeg_decompress_struct; - jpeg_source_mgr libjpeg_jpeg_source_mgr; - uint8_t subsampling_convert_log; - uint32_t subsampling_convert_ylinelen; - uint32_t subsampling_convert_ylines; - uint32_t subsampling_convert_clinelen; - uint32_t subsampling_convert_clines; - uint32_t subsampling_convert_ybuflen; - uint32_t subsampling_convert_cbuflen; - uint32_t subsampling_convert_ycbcrbuflen; - uint8_t *subsampling_convert_ycbcrbuf; - uint8_t *subsampling_convert_ybuf; - uint8_t *subsampling_convert_cbbuf; - uint8_t *subsampling_convert_crbuf; - uint32_t subsampling_convert_ycbcrimagelen; - uint8_t **subsampling_convert_ycbcrimage; - uint32_t subsampling_convert_clinelenout; - uint32_t subsampling_convert_state; - uint32_t bytes_per_line; /* if the codec outputs subsampled data, a 'line' - in bytes_per_line */ - uint32_t lines_per_strile; /* and lines_per_strile means subsampling_ver - desubsampled rows */ - OJPEGStateInBufferSource in_buffer_source; - uint32_t in_buffer_next_strile; - uint32_t in_buffer_strile_count; - uint64_t in_buffer_file_pos; - uint8_t in_buffer_file_pos_log; - uint64_t in_buffer_file_togo; - uint16_t in_buffer_togo; - uint8_t *in_buffer_cur; - uint8_t in_buffer[OJPEG_BUFFER]; - OJPEGStateOutState out_state; - uint8_t out_buffer[OJPEG_BUFFER]; - uint8_t *skip_buffer; -} OJPEGState; - -static int OJPEGVGetField(TIFF *tif, uint32_t tag, va_list ap); -static int OJPEGVSetField(TIFF *tif, uint32_t tag, va_list ap); -static void OJPEGPrintDir(TIFF *tif, FILE *fd, long flags); - -static int OJPEGFixupTags(TIFF *tif); -static int OJPEGSetupDecode(TIFF *tif); -static int OJPEGPreDecode(TIFF *tif, uint16_t s); -static int OJPEGPreDecodeSkipRaw(TIFF *tif); -static int OJPEGPreDecodeSkipScanlines(TIFF *tif); -static int OJPEGDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int OJPEGDecodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc); -static int OJPEGDecodeScanlines(TIFF *tif, uint8_t *buf, tmsize_t cc); -static void OJPEGPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc); -static int OJPEGSetupEncode(TIFF *tif); -static int OJPEGPreEncode(TIFF *tif, uint16_t s); -static int OJPEGEncode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s); -static int OJPEGPostEncode(TIFF *tif); -static void OJPEGCleanup(TIFF *tif); - -static void OJPEGSubsamplingCorrect(TIFF *tif); -static int OJPEGReadHeaderInfo(TIFF *tif); -static int OJPEGReadSecondarySos(TIFF *tif, uint16_t s); -static int OJPEGWriteHeaderInfo(TIFF *tif); -static void OJPEGLibjpegSessionAbort(TIFF *tif); - -static int OJPEGReadHeaderInfoSec(TIFF *tif); -static int OJPEGReadHeaderInfoSecStreamDri(TIFF *tif); -static int OJPEGReadHeaderInfoSecStreamDqt(TIFF *tif); -static int OJPEGReadHeaderInfoSecStreamDht(TIFF *tif); -static int OJPEGReadHeaderInfoSecStreamSof(TIFF *tif, uint8_t marker_id); -static int OJPEGReadHeaderInfoSecStreamSos(TIFF *tif); -static int OJPEGReadHeaderInfoSecTablesQTable(TIFF *tif); -static int OJPEGReadHeaderInfoSecTablesDcTable(TIFF *tif); -static int OJPEGReadHeaderInfoSecTablesAcTable(TIFF *tif); - -static int OJPEGReadBufferFill(OJPEGState *sp); -static int OJPEGReadByte(OJPEGState *sp, uint8_t *byte); -static int OJPEGReadBytePeek(OJPEGState *sp, uint8_t *byte); -static void OJPEGReadByteAdvance(OJPEGState *sp); -static int OJPEGReadWord(OJPEGState *sp, uint16_t *word); -static int OJPEGReadBlock(OJPEGState *sp, uint16_t len, void *mem); -static void OJPEGReadSkip(OJPEGState *sp, uint16_t len); - -static int OJPEGWriteStream(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamSoi(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamQTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len); -static void OJPEGWriteStreamDcTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len); -static void OJPEGWriteStreamAcTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len); -static void OJPEGWriteStreamDri(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamSof(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamSos(TIFF *tif, void **mem, uint32_t *len); -static int OJPEGWriteStreamCompressed(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamRst(TIFF *tif, void **mem, uint32_t *len); -static void OJPEGWriteStreamEoi(TIFF *tif, void **mem, uint32_t *len); - -#ifdef LIBJPEG_ENCAP_EXTERNAL -extern int jpeg_create_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo); -extern int jpeg_read_header_encap(OJPEGState *sp, jpeg_decompress_struct *cinfo, - uint8_t require_image); -extern int jpeg_start_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo); -extern int jpeg_read_scanlines_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, - void *scanlines, uint32_t max_lines); -extern int jpeg_read_raw_data_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, void *data, - uint32_t max_lines); -extern void jpeg_encap_unwind(TIFF *tif); -#else -static int jpeg_create_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *j); -static int jpeg_read_header_encap(OJPEGState *sp, jpeg_decompress_struct *cinfo, - uint8_t require_image); -static int jpeg_start_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo); -static int jpeg_read_scanlines_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, - void *scanlines, uint32_t max_lines); -static int jpeg_read_raw_data_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, void *data, - uint32_t max_lines); -static void jpeg_encap_unwind(TIFF *tif); -#endif - -static void OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct *cinfo); -static void OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct *cinfo); -static void OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct *cinfo); -static boolean -OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct *cinfo); -static void -OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct *cinfo, - long num_bytes); -static boolean -OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct *cinfo, - int desired); -static void OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct *cinfo); - -int TIFFInitOJPEG(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitOJPEG"; - OJPEGState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_OJPEG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, ojpegFields, TIFFArrayCount(ojpegFields))) - { - TIFFErrorExtR(tif, module, - "Merging Old JPEG codec-specific tags failed"); - return 0; - } - - /* state block */ - sp = _TIFFmallocExt(tif, sizeof(OJPEGState)); - if (sp == NULL) - { - TIFFErrorExtR(tif, module, "No space for OJPEG state block"); - return (0); - } - _TIFFmemset(sp, 0, sizeof(OJPEGState)); - sp->tif = tif; - sp->jpeg_proc = 1; - sp->subsampling_hor = 2; - sp->subsampling_ver = 2; - TIFFSetField(tif, TIFFTAG_YCBCRSUBSAMPLING, 2, 2); - /* tif codec methods */ - tif->tif_fixuptags = OJPEGFixupTags; - tif->tif_setupdecode = OJPEGSetupDecode; - tif->tif_predecode = OJPEGPreDecode; - tif->tif_postdecode = OJPEGPostDecode; - tif->tif_decoderow = OJPEGDecode; - tif->tif_decodestrip = OJPEGDecode; - tif->tif_decodetile = OJPEGDecode; - tif->tif_setupencode = OJPEGSetupEncode; - tif->tif_preencode = OJPEGPreEncode; - tif->tif_postencode = OJPEGPostEncode; - tif->tif_encoderow = OJPEGEncode; - tif->tif_encodestrip = OJPEGEncode; - tif->tif_encodetile = OJPEGEncode; - tif->tif_cleanup = OJPEGCleanup; - tif->tif_data = (uint8_t *)sp; - /* tif tag methods */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = OJPEGVGetField; - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = OJPEGVSetField; - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = OJPEGPrintDir; - /* Some OJPEG files don't have strip or tile offsets or bytecounts tags. - Some others do, but have totally meaningless or corrupt values - in these tags. In these cases, the JpegInterchangeFormat stream is - reliable. In any case, this decoder reads the compressed data itself, - from the most reliable locations, and we need to notify encapsulating - LibTiff not to read raw strips or tiles for us. */ - tif->tif_flags |= TIFF_NOREADRAW; - return (1); -} - -static int OJPEGVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - switch (tag) - { - case TIFFTAG_JPEGIFOFFSET: - *va_arg(ap, uint64_t *) = (uint64_t)sp->jpeg_interchange_format; - break; - case TIFFTAG_JPEGIFBYTECOUNT: - *va_arg(ap, uint64_t *) = - (uint64_t)sp->jpeg_interchange_format_length; - break; - case TIFFTAG_YCBCRSUBSAMPLING: - if (sp->subsamplingcorrect_done == 0) - OJPEGSubsamplingCorrect(tif); - *va_arg(ap, uint16_t *) = (uint16_t)sp->subsampling_hor; - *va_arg(ap, uint16_t *) = (uint16_t)sp->subsampling_ver; - break; - case TIFFTAG_JPEGQTABLES: - *va_arg(ap, uint32_t *) = (uint32_t)sp->qtable_offset_count; - *va_arg(ap, const void **) = (const void *)sp->qtable_offset; - break; - case TIFFTAG_JPEGDCTABLES: - *va_arg(ap, uint32_t *) = (uint32_t)sp->dctable_offset_count; - *va_arg(ap, const void **) = (const void *)sp->dctable_offset; - break; - case TIFFTAG_JPEGACTABLES: - *va_arg(ap, uint32_t *) = (uint32_t)sp->actable_offset_count; - *va_arg(ap, const void **) = (const void *)sp->actable_offset; - break; - case TIFFTAG_JPEGPROC: - *va_arg(ap, uint16_t *) = (uint16_t)sp->jpeg_proc; - break; - case TIFFTAG_JPEGRESTARTINTERVAL: - *va_arg(ap, uint16_t *) = sp->restart_interval; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static int OJPEGVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "OJPEGVSetField"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint32_t ma; - uint64_t *mb; - uint32_t n; - const TIFFField *fip; - - switch (tag) - { - case TIFFTAG_JPEGIFOFFSET: - sp->jpeg_interchange_format = (uint64_t)va_arg(ap, uint64_t); - break; - case TIFFTAG_JPEGIFBYTECOUNT: - sp->jpeg_interchange_format_length = (uint64_t)va_arg(ap, uint64_t); - break; - case TIFFTAG_YCBCRSUBSAMPLING: - sp->subsampling_tag = 1; - sp->subsampling_hor = (uint8_t)va_arg(ap, uint16_vap); - sp->subsampling_ver = (uint8_t)va_arg(ap, uint16_vap); - tif->tif_dir.td_ycbcrsubsampling[0] = sp->subsampling_hor; - tif->tif_dir.td_ycbcrsubsampling[1] = sp->subsampling_ver; - break; - case TIFFTAG_JPEGQTABLES: - ma = (uint32_t)va_arg(ap, uint32_t); - if (ma != 0) - { - if (ma > 3) - { - TIFFErrorExtR(tif, module, - "JpegQTables tag has incorrect count"); - return (0); - } - sp->qtable_offset_count = (uint8_t)ma; - mb = (uint64_t *)va_arg(ap, uint64_t *); - for (n = 0; n < ma; n++) - sp->qtable_offset[n] = mb[n]; - } - break; - case TIFFTAG_JPEGDCTABLES: - ma = (uint32_t)va_arg(ap, uint32_t); - if (ma != 0) - { - if (ma > 3) - { - TIFFErrorExtR(tif, module, - "JpegDcTables tag has incorrect count"); - return (0); - } - sp->dctable_offset_count = (uint8_t)ma; - mb = (uint64_t *)va_arg(ap, uint64_t *); - for (n = 0; n < ma; n++) - sp->dctable_offset[n] = mb[n]; - } - break; - case TIFFTAG_JPEGACTABLES: - ma = (uint32_t)va_arg(ap, uint32_t); - if (ma != 0) - { - if (ma > 3) - { - TIFFErrorExtR(tif, module, - "JpegAcTables tag has incorrect count"); - return (0); - } - sp->actable_offset_count = (uint8_t)ma; - mb = (uint64_t *)va_arg(ap, uint64_t *); - for (n = 0; n < ma; n++) - sp->actable_offset[n] = mb[n]; - } - break; - case TIFFTAG_JPEGPROC: - sp->jpeg_proc = (uint8_t)va_arg(ap, uint16_vap); - break; - case TIFFTAG_JPEGRESTARTINTERVAL: - sp->restart_interval = (uint16_t)va_arg(ap, uint16_vap); - break; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - fip = TIFFFieldWithTag(tif, tag); - if (fip == NULL) /* shouldn't happen */ - return (0); - TIFFSetFieldBit(tif, fip->field_bit); - tif->tif_flags |= TIFF_DIRTYDIRECT; - return (1); -} - -static void OJPEGPrintDir(TIFF *tif, FILE *fd, long flags) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - (void)flags; - assert(sp != NULL); - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGINTERCHANGEFORMAT)) - fprintf(fd, " JpegInterchangeFormat: %" PRIu64 "\n", - (uint64_t)sp->jpeg_interchange_format); - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGINTERCHANGEFORMATLENGTH)) - fprintf(fd, " JpegInterchangeFormatLength: %" PRIu64 "\n", - (uint64_t)sp->jpeg_interchange_format_length); - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGQTABLES)) - { - fprintf(fd, " JpegQTables:"); - for (m = 0; m < sp->qtable_offset_count; m++) - fprintf(fd, " %" PRIu64, (uint64_t)sp->qtable_offset[m]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGDCTABLES)) - { - fprintf(fd, " JpegDcTables:"); - for (m = 0; m < sp->dctable_offset_count; m++) - fprintf(fd, " %" PRIu64, (uint64_t)sp->dctable_offset[m]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGACTABLES)) - { - fprintf(fd, " JpegAcTables:"); - for (m = 0; m < sp->actable_offset_count; m++) - fprintf(fd, " %" PRIu64, (uint64_t)sp->actable_offset[m]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGPROC)) - fprintf(fd, " JpegProc: %" PRIu8 "\n", sp->jpeg_proc); - if (TIFFFieldSet(tif, FIELD_OJPEG_JPEGRESTARTINTERVAL)) - fprintf(fd, " JpegRestartInterval: %" PRIu16 "\n", - sp->restart_interval); - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -static int OJPEGFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -static int OJPEGSetupDecode(TIFF *tif) -{ - static const char module[] = "OJPEGSetupDecode"; - TIFFWarningExtR(tif, module, - "Deprecated and troublesome old-style JPEG compression " - "mode, please convert to new-style JPEG compression and " - "notify vendor of writing software"); - return (1); -} - -static int OJPEGPreDecode(TIFF *tif, uint16_t s) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint32_t m; - if (sp->subsamplingcorrect_done == 0) - OJPEGSubsamplingCorrect(tif); - if (sp->readheader_done == 0) - { - if (OJPEGReadHeaderInfo(tif) == 0) - return (0); - } - if (sp->sos_end[s].log == 0) - { - if (OJPEGReadSecondarySos(tif, s) == 0) - return (0); - } - if (isTiled(tif)) - m = tif->tif_curtile; - else - m = tif->tif_curstrip; - if ((sp->writeheader_done != 0) && - ((sp->write_cursample != s) || (sp->write_curstrile > m))) - { - if (sp->libjpeg_session_active != 0) - OJPEGLibjpegSessionAbort(tif); - sp->writeheader_done = 0; - } - if (sp->writeheader_done == 0) - { - sp->plane_sample_offset = (uint8_t)s; - sp->write_cursample = s; - sp->write_curstrile = s * tif->tif_dir.td_stripsperimage; - if ((sp->in_buffer_file_pos_log == 0) || - (sp->in_buffer_file_pos - sp->in_buffer_togo != - sp->sos_end[s].in_buffer_file_pos)) - { - sp->in_buffer_source = sp->sos_end[s].in_buffer_source; - sp->in_buffer_next_strile = sp->sos_end[s].in_buffer_next_strile; - sp->in_buffer_file_pos = sp->sos_end[s].in_buffer_file_pos; - sp->in_buffer_file_pos_log = 0; - sp->in_buffer_file_togo = sp->sos_end[s].in_buffer_file_togo; - sp->in_buffer_togo = 0; - sp->in_buffer_cur = 0; - } - if (OJPEGWriteHeaderInfo(tif) == 0) - return (0); - } - - sp->subsampling_convert_state = 0; - - while (sp->write_curstrile < m) - { - if (sp->libjpeg_jpeg_query_style == 0) - { - if (OJPEGPreDecodeSkipRaw(tif) == 0) - return (0); - } - else - { - if (OJPEGPreDecodeSkipScanlines(tif) == 0) - return (0); - } - sp->write_curstrile++; - } - sp->decoder_ok = 1; - return (1); -} - -static int OJPEGPreDecodeSkipRaw(TIFF *tif) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint32_t m; - m = sp->lines_per_strile; - if (sp->subsampling_convert_state != 0) - { - if (sp->subsampling_convert_clines - sp->subsampling_convert_state >= m) - { - sp->subsampling_convert_state += m; - if (sp->subsampling_convert_state == sp->subsampling_convert_clines) - sp->subsampling_convert_state = 0; - return (1); - } - m -= sp->subsampling_convert_clines - sp->subsampling_convert_state; - sp->subsampling_convert_state = 0; - sp->error_in_raw_data_decoding = 0; - } - while (m >= sp->subsampling_convert_clines) - { - if (jpeg_read_raw_data_encap(sp, &(sp->libjpeg_jpeg_decompress_struct), - sp->subsampling_convert_ycbcrimage, - sp->subsampling_ver * 8) == 0) - return (0); - m -= sp->subsampling_convert_clines; - } - if (m > 0) - { - if (jpeg_read_raw_data_encap(sp, &(sp->libjpeg_jpeg_decompress_struct), - sp->subsampling_convert_ycbcrimage, - sp->subsampling_ver * 8) == 0) - return (0); - sp->subsampling_convert_state = m; - } - return (1); -} - -static int OJPEGPreDecodeSkipScanlines(TIFF *tif) -{ - static const char module[] = "OJPEGPreDecodeSkipScanlines"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint32_t m; - if (sp->skip_buffer == NULL) - { - sp->skip_buffer = _TIFFmallocExt(tif, sp->bytes_per_line); - if (sp->skip_buffer == NULL) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - } - for (m = 0; m < sp->lines_per_strile; m++) - { - if (jpeg_read_scanlines_encap(sp, &(sp->libjpeg_jpeg_decompress_struct), - &sp->skip_buffer, 1) == 0) - return (0); - } - return (1); -} - -static int OJPEGDecode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - static const char module[] = "OJPEGDecode"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - (void)s; - if (!sp->decoder_ok) - { - memset(buf, 0, (size_t)cc); - TIFFErrorExtR(tif, module, - "Cannot decode: decoder not correctly initialized"); - return 0; - } - if (sp->libjpeg_session_active == 0) - { - memset(buf, 0, (size_t)cc); - /* This should normally not happen, except that it does when */ - /* using TIFFReadScanline() which calls OJPEGPostDecode() for */ - /* each scanline, which assumes that a whole strile was read */ - /* and may thus incorrectly consider it has read the whole image, - * causing */ - /* OJPEGLibjpegSessionAbort() to be called prematurely. */ - /* Triggered by https://gitlab.com/libtiff/libtiff/-/issues/337 */ - TIFFErrorExtR(tif, module, - "Cannot decode: libjpeg_session_active == 0"); - return 0; - } - if (sp->error_in_raw_data_decoding) - { - memset(buf, 0, (size_t)cc); - return 0; - } - if (sp->libjpeg_jpeg_query_style == 0) - { - if (OJPEGDecodeRaw(tif, buf, cc) == 0) - { - memset(buf, 0, (size_t)cc); - return (0); - } - } - else - { - if (OJPEGDecodeScanlines(tif, buf, cc) == 0) - { - memset(buf, 0, (size_t)cc); - return (0); - } - } - return (1); -} - -static int OJPEGDecodeRaw(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - static const char module[] = "OJPEGDecodeRaw"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t *m; - tmsize_t n; - uint8_t *oy; - uint8_t *ocb; - uint8_t *ocr; - uint8_t *p; - uint32_t q; - uint8_t *r; - uint8_t sx, sy; - if (cc % sp->bytes_per_line != 0) - { - TIFFErrorExtR(tif, module, "Fractional scanline not read"); - return (0); - } - assert(cc > 0); - m = buf; - n = cc; - do - { - if (sp->subsampling_convert_state == 0) - { - if (jpeg_read_raw_data_encap(sp, - &(sp->libjpeg_jpeg_decompress_struct), - sp->subsampling_convert_ycbcrimage, - sp->subsampling_ver * 8) == 0) - { - sp->error_in_raw_data_decoding = 1; - return (0); - } - } - oy = sp->subsampling_convert_ybuf + - sp->subsampling_convert_state * sp->subsampling_ver * - sp->subsampling_convert_ylinelen; - ocb = sp->subsampling_convert_cbbuf + - sp->subsampling_convert_state * sp->subsampling_convert_clinelen; - ocr = sp->subsampling_convert_crbuf + - sp->subsampling_convert_state * sp->subsampling_convert_clinelen; - p = m; - for (q = 0; q < sp->subsampling_convert_clinelenout; q++) - { - r = oy; - for (sy = 0; sy < sp->subsampling_ver; sy++) - { - for (sx = 0; sx < sp->subsampling_hor; sx++) - *p++ = *r++; - r += sp->subsampling_convert_ylinelen - sp->subsampling_hor; - } - oy += sp->subsampling_hor; - *p++ = *ocb++; - *p++ = *ocr++; - } - sp->subsampling_convert_state++; - if (sp->subsampling_convert_state == sp->subsampling_convert_clines) - sp->subsampling_convert_state = 0; - m += sp->bytes_per_line; - n -= sp->bytes_per_line; - } while (n > 0); - return (1); -} - -static int OJPEGDecodeScanlines(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - static const char module[] = "OJPEGDecodeScanlines"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t *m; - tmsize_t n; - if (cc % sp->bytes_per_line != 0) - { - TIFFErrorExtR(tif, module, "Fractional scanline not read"); - return (0); - } - assert(cc > 0); - m = buf; - n = cc; - do - { - if (jpeg_read_scanlines_encap(sp, &(sp->libjpeg_jpeg_decompress_struct), - &m, 1) == 0) - return (0); - m += sp->bytes_per_line; - n -= sp->bytes_per_line; - } while (n > 0); - return (1); -} - -static void OJPEGPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - (void)buf; - (void)cc; - /* This function somehow incorrectly assumes that a whole strile was read, - */ - /* which is not true when TIFFReadScanline() is called, */ - /* and may thus incorrectly consider it has read the whole image, causing */ - /* OJPEGLibjpegSessionAbort() to be called prematurely. */ - /* So this logic should be fixed to take into account cc, or disable */ - /* the scan line reading interface. */ - /* Triggered by https://gitlab.com/libtiff/libtiff/-/issues/337 */ - sp->write_curstrile++; - if (sp->write_curstrile % tif->tif_dir.td_stripsperimage == 0) - { - assert(sp->libjpeg_session_active != 0); - OJPEGLibjpegSessionAbort(tif); - sp->writeheader_done = 0; - } -} - -static int OJPEGSetupEncode(TIFF *tif) -{ - static const char module[] = "OJPEGSetupEncode"; - TIFFErrorExtR( - tif, module, - "OJPEG encoding not supported; use new-style JPEG compression instead"); - return (0); -} - -static int OJPEGPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "OJPEGPreEncode"; - (void)s; - TIFFErrorExtR( - tif, module, - "OJPEG encoding not supported; use new-style JPEG compression instead"); - return (0); -} - -static int OJPEGEncode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - static const char module[] = "OJPEGEncode"; - (void)buf; - (void)cc; - (void)s; - TIFFErrorExtR( - tif, module, - "OJPEG encoding not supported; use new-style JPEG compression instead"); - return (0); -} - -static int OJPEGPostEncode(TIFF *tif) -{ - static const char module[] = "OJPEGPostEncode"; - TIFFErrorExtR( - tif, module, - "OJPEG encoding not supported; use new-style JPEG compression instead"); - return (0); -} - -static void OJPEGCleanup(TIFF *tif) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - if (sp != 0) - { - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - tif->tif_tagmethods.printdir = sp->printdir; - if (sp->qtable[0] != 0) - _TIFFfreeExt(tif, sp->qtable[0]); - if (sp->qtable[1] != 0) - _TIFFfreeExt(tif, sp->qtable[1]); - if (sp->qtable[2] != 0) - _TIFFfreeExt(tif, sp->qtable[2]); - if (sp->qtable[3] != 0) - _TIFFfreeExt(tif, sp->qtable[3]); - if (sp->dctable[0] != 0) - _TIFFfreeExt(tif, sp->dctable[0]); - if (sp->dctable[1] != 0) - _TIFFfreeExt(tif, sp->dctable[1]); - if (sp->dctable[2] != 0) - _TIFFfreeExt(tif, sp->dctable[2]); - if (sp->dctable[3] != 0) - _TIFFfreeExt(tif, sp->dctable[3]); - if (sp->actable[0] != 0) - _TIFFfreeExt(tif, sp->actable[0]); - if (sp->actable[1] != 0) - _TIFFfreeExt(tif, sp->actable[1]); - if (sp->actable[2] != 0) - _TIFFfreeExt(tif, sp->actable[2]); - if (sp->actable[3] != 0) - _TIFFfreeExt(tif, sp->actable[3]); - if (sp->libjpeg_session_active != 0) - OJPEGLibjpegSessionAbort(tif); - if (sp->subsampling_convert_ycbcrbuf != 0) - _TIFFfreeExt(tif, sp->subsampling_convert_ycbcrbuf); - if (sp->subsampling_convert_ycbcrimage != 0) - _TIFFfreeExt(tif, sp->subsampling_convert_ycbcrimage); - if (sp->skip_buffer != 0) - _TIFFfreeExt(tif, sp->skip_buffer); - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - _TIFFSetDefaultCompressionState(tif); - } -} - -static void OJPEGSubsamplingCorrect(TIFF *tif) -{ - static const char module[] = "OJPEGSubsamplingCorrect"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t mh; - uint8_t mv; - - assert(sp->subsamplingcorrect_done == 0); - if ((tif->tif_dir.td_samplesperpixel != 3) || - ((tif->tif_dir.td_photometric != PHOTOMETRIC_YCBCR) && - (tif->tif_dir.td_photometric != PHOTOMETRIC_ITULAB))) - { - if (sp->subsampling_tag != 0) - TIFFWarningExtR(tif, module, - "Subsampling tag not appropriate for this " - "Photometric and/or SamplesPerPixel"); - sp->subsampling_hor = 1; - sp->subsampling_ver = 1; - sp->subsampling_force_desubsampling_inside_decompression = 0; - } - else - { - sp->subsamplingcorrect_done = 1; - mh = sp->subsampling_hor; - mv = sp->subsampling_ver; - sp->subsamplingcorrect = 1; - OJPEGReadHeaderInfoSec(tif); - if (sp->subsampling_force_desubsampling_inside_decompression != 0) - { - sp->subsampling_hor = 1; - sp->subsampling_ver = 1; - } - sp->subsamplingcorrect = 0; - if (((sp->subsampling_hor != mh) || (sp->subsampling_ver != mv)) && - (sp->subsampling_force_desubsampling_inside_decompression == 0)) - { - if (sp->subsampling_tag == 0) - TIFFWarningExtR( - tif, module, - "Subsampling tag is not set, yet subsampling inside JPEG " - "data [%" PRIu8 ",%" PRIu8 - "] does not match default values [2,2]; assuming " - "subsampling inside JPEG data is correct", - sp->subsampling_hor, sp->subsampling_ver); - else - TIFFWarningExtR( - tif, module, - "Subsampling inside JPEG data [%" PRIu8 ",%" PRIu8 - "] does not match subsampling tag values [%" PRIu8 - ",%" PRIu8 - "]; assuming subsampling inside JPEG data is correct", - sp->subsampling_hor, sp->subsampling_ver, mh, mv); - } - if (sp->subsampling_force_desubsampling_inside_decompression != 0) - { - if (sp->subsampling_tag == 0) - TIFFWarningExtR( - tif, module, - "Subsampling tag is not set, yet subsampling inside JPEG " - "data does not match default values [2,2] (nor any other " - "values allowed in TIFF); assuming subsampling inside JPEG " - "data is correct and desubsampling inside JPEG " - "decompression"); - else - TIFFWarningExtR( - tif, module, - "Subsampling inside JPEG data does not match subsampling " - "tag values [%" PRIu8 ",%" PRIu8 - "] (nor any other values allowed in TIFF); assuming " - "subsampling inside JPEG data is correct and desubsampling " - "inside JPEG decompression", - mh, mv); - } - if (sp->subsampling_force_desubsampling_inside_decompression == 0) - { - if (sp->subsampling_hor < sp->subsampling_ver) - TIFFWarningExtR(tif, module, - "Subsampling values [%" PRIu8 ",%" PRIu8 - "] are not allowed in TIFF", - sp->subsampling_hor, sp->subsampling_ver); - } - } - sp->subsamplingcorrect_done = 1; -} - -static int OJPEGReadHeaderInfo(TIFF *tif) -{ - static const char module[] = "OJPEGReadHeaderInfo"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(sp->readheader_done == 0); - sp->image_width = tif->tif_dir.td_imagewidth; - sp->image_length = tif->tif_dir.td_imagelength; - if (isTiled(tif)) - { - sp->strile_width = tif->tif_dir.td_tilewidth; - sp->strile_length = tif->tif_dir.td_tilelength; - sp->strile_length_total = - ((sp->image_length + sp->strile_length - 1) / sp->strile_length) * - sp->strile_length; - } - else - { - sp->strile_width = sp->image_width; - sp->strile_length = tif->tif_dir.td_rowsperstrip; - if (sp->strile_length == (uint32_t)-1) - sp->strile_length = sp->image_length; - sp->strile_length_total = sp->image_length; - } - if (tif->tif_dir.td_samplesperpixel == 1) - { - sp->samples_per_pixel = 1; - sp->plane_sample_offset = 0; - sp->samples_per_pixel_per_plane = sp->samples_per_pixel; - sp->subsampling_hor = 1; - sp->subsampling_ver = 1; - } - else - { - if (tif->tif_dir.td_samplesperpixel != 3) - { - TIFFErrorExtR(tif, module, - "SamplesPerPixel %" PRIu8 - " not supported for this compression scheme", - sp->samples_per_pixel); - return (0); - } - sp->samples_per_pixel = 3; - sp->plane_sample_offset = 0; - if (tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG) - sp->samples_per_pixel_per_plane = 3; - else - sp->samples_per_pixel_per_plane = 1; - } - if (sp->strile_length < sp->image_length) - { - if (((sp->subsampling_hor != 1) && (sp->subsampling_hor != 2) && - (sp->subsampling_hor != 4)) || - ((sp->subsampling_ver != 1) && (sp->subsampling_ver != 2) && - (sp->subsampling_ver != 4))) - { - TIFFErrorExtR(tif, module, "Invalid subsampling values"); - return (0); - } - if (sp->strile_length % (sp->subsampling_ver * 8) != 0) - { - TIFFErrorExtR(tif, module, - "Incompatible vertical subsampling and image " - "strip/tile length"); - return (0); - } - sp->restart_interval = - (uint16_t)(((sp->strile_width + sp->subsampling_hor * 8 - 1) / - (sp->subsampling_hor * 8)) * - (sp->strile_length / (sp->subsampling_ver * 8))); - } - if (OJPEGReadHeaderInfoSec(tif) == 0) - return (0); - sp->sos_end[0].log = 1; - sp->sos_end[0].in_buffer_source = sp->in_buffer_source; - sp->sos_end[0].in_buffer_next_strile = sp->in_buffer_next_strile; - sp->sos_end[0].in_buffer_file_pos = - sp->in_buffer_file_pos - sp->in_buffer_togo; - sp->sos_end[0].in_buffer_file_togo = - sp->in_buffer_file_togo + sp->in_buffer_togo; - sp->readheader_done = 1; - return (1); -} - -static int OJPEGReadSecondarySos(TIFF *tif, uint16_t s) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - assert(s > 0); - assert(s < 3); - assert(sp->sos_end[0].log != 0); - assert(sp->sos_end[s].log == 0); - sp->plane_sample_offset = (uint8_t)(s - 1); - while (sp->sos_end[sp->plane_sample_offset].log == 0) - sp->plane_sample_offset--; - sp->in_buffer_source = - sp->sos_end[sp->plane_sample_offset].in_buffer_source; - sp->in_buffer_next_strile = - sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile; - sp->in_buffer_file_pos = - sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos; - sp->in_buffer_file_pos_log = 0; - sp->in_buffer_file_togo = - sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo; - sp->in_buffer_togo = 0; - sp->in_buffer_cur = 0; - while (sp->plane_sample_offset < s) - { - do - { - if (OJPEGReadByte(sp, &m) == 0) - return (0); - if (m == 255) - { - do - { - if (OJPEGReadByte(sp, &m) == 0) - return (0); - if (m != 255) - break; - } while (1); - if (m == JPEG_MARKER_SOS) - break; - } - } while (1); - sp->plane_sample_offset++; - if (OJPEGReadHeaderInfoSecStreamSos(tif) == 0) - return (0); - sp->sos_end[sp->plane_sample_offset].log = 1; - sp->sos_end[sp->plane_sample_offset].in_buffer_source = - sp->in_buffer_source; - sp->sos_end[sp->plane_sample_offset].in_buffer_next_strile = - sp->in_buffer_next_strile; - sp->sos_end[sp->plane_sample_offset].in_buffer_file_pos = - sp->in_buffer_file_pos - sp->in_buffer_togo; - sp->sos_end[sp->plane_sample_offset].in_buffer_file_togo = - sp->in_buffer_file_togo + sp->in_buffer_togo; - } - return (1); -} - -static int OJPEGWriteHeaderInfo(TIFF *tif) -{ - static const char module[] = "OJPEGWriteHeaderInfo"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t **m; - uint32_t n; - /* if a previous attempt failed, don't try again */ - if (sp->libjpeg_session_active != 0) - return 0; - sp->out_state = ososSoi; - sp->restart_index = 0; - jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr)); - sp->libjpeg_jpeg_error_mgr.output_message = - OJPEGLibjpegJpegErrorMgrOutputMessage; - sp->libjpeg_jpeg_error_mgr.error_exit = OJPEGLibjpegJpegErrorMgrErrorExit; - sp->libjpeg_jpeg_decompress_struct.err = &(sp->libjpeg_jpeg_error_mgr); - sp->libjpeg_jpeg_decompress_struct.client_data = (void *)tif; - if (jpeg_create_decompress_encap( - sp, &(sp->libjpeg_jpeg_decompress_struct)) == 0) - return (0); - sp->libjpeg_session_active = 1; - sp->libjpeg_jpeg_source_mgr.bytes_in_buffer = 0; - sp->libjpeg_jpeg_source_mgr.init_source = - OJPEGLibjpegJpegSourceMgrInitSource; - sp->libjpeg_jpeg_source_mgr.fill_input_buffer = - OJPEGLibjpegJpegSourceMgrFillInputBuffer; - sp->libjpeg_jpeg_source_mgr.skip_input_data = - OJPEGLibjpegJpegSourceMgrSkipInputData; - sp->libjpeg_jpeg_source_mgr.resync_to_restart = - OJPEGLibjpegJpegSourceMgrResyncToRestart; - sp->libjpeg_jpeg_source_mgr.term_source = - OJPEGLibjpegJpegSourceMgrTermSource; - sp->libjpeg_jpeg_decompress_struct.src = &(sp->libjpeg_jpeg_source_mgr); - if (jpeg_read_header_encap(sp, &(sp->libjpeg_jpeg_decompress_struct), 1) == - 0) - return (0); - if ((sp->subsampling_force_desubsampling_inside_decompression == 0) && - (sp->samples_per_pixel_per_plane > 1)) - { - sp->libjpeg_jpeg_decompress_struct.raw_data_out = 1; -#if JPEG_LIB_VERSION >= 70 - sp->libjpeg_jpeg_decompress_struct.do_fancy_upsampling = FALSE; -#endif - sp->libjpeg_jpeg_query_style = 0; - if (sp->subsampling_convert_log == 0) - { - assert(sp->subsampling_convert_ycbcrbuf == 0); - assert(sp->subsampling_convert_ycbcrimage == 0); - /* Check for division by zero. */ - if (sp->subsampling_hor == 0 || sp->subsampling_ver == 0) - return (0); - sp->subsampling_convert_ylinelen = - ((sp->strile_width + sp->subsampling_hor * 8 - 1) / - (sp->subsampling_hor * 8) * sp->subsampling_hor * 8); - sp->subsampling_convert_ylines = sp->subsampling_ver * 8; - sp->subsampling_convert_clinelen = - sp->subsampling_convert_ylinelen / sp->subsampling_hor; - sp->subsampling_convert_clines = 8; - sp->subsampling_convert_ybuflen = sp->subsampling_convert_ylinelen * - sp->subsampling_convert_ylines; - sp->subsampling_convert_cbuflen = sp->subsampling_convert_clinelen * - sp->subsampling_convert_clines; - sp->subsampling_convert_ycbcrbuflen = - sp->subsampling_convert_ybuflen + - 2 * sp->subsampling_convert_cbuflen; - /* The calloc is not normally necessary, except in some edge/broken - * cases */ - /* for example for a tiled image of height 1 with a tile height of 1 - * and subsampling_hor=subsampling_ver=2 */ - /* In that case, libjpeg will only fill the 8 first lines of the 16 - * lines */ - /* See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16844 - */ - /* Even if this case is allowed (?), its handling is broken because - * OJPEGPreDecode() should also likely */ - /* reset subsampling_convert_state to 0 when changing tile. */ - sp->subsampling_convert_ycbcrbuf = - _TIFFcallocExt(tif, 1, sp->subsampling_convert_ycbcrbuflen); - if (sp->subsampling_convert_ycbcrbuf == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - sp->subsampling_convert_ybuf = sp->subsampling_convert_ycbcrbuf; - sp->subsampling_convert_cbbuf = - sp->subsampling_convert_ybuf + sp->subsampling_convert_ybuflen; - sp->subsampling_convert_crbuf = - sp->subsampling_convert_cbbuf + sp->subsampling_convert_cbuflen; - sp->subsampling_convert_ycbcrimagelen = - 3 + sp->subsampling_convert_ylines + - 2 * sp->subsampling_convert_clines; - sp->subsampling_convert_ycbcrimage = _TIFFmallocExt( - tif, sp->subsampling_convert_ycbcrimagelen * sizeof(uint8_t *)); - if (sp->subsampling_convert_ycbcrimage == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - m = sp->subsampling_convert_ycbcrimage; - *m++ = (uint8_t *)(sp->subsampling_convert_ycbcrimage + 3); - *m++ = (uint8_t *)(sp->subsampling_convert_ycbcrimage + 3 + - sp->subsampling_convert_ylines); - *m++ = (uint8_t *)(sp->subsampling_convert_ycbcrimage + 3 + - sp->subsampling_convert_ylines + - sp->subsampling_convert_clines); - for (n = 0; n < sp->subsampling_convert_ylines; n++) - *m++ = sp->subsampling_convert_ybuf + - n * sp->subsampling_convert_ylinelen; - for (n = 0; n < sp->subsampling_convert_clines; n++) - *m++ = sp->subsampling_convert_cbbuf + - n * sp->subsampling_convert_clinelen; - for (n = 0; n < sp->subsampling_convert_clines; n++) - *m++ = sp->subsampling_convert_crbuf + - n * sp->subsampling_convert_clinelen; - sp->subsampling_convert_clinelenout = - sp->strile_width / sp->subsampling_hor + - ((sp->strile_width % sp->subsampling_hor) != 0 ? 1 : 0); - sp->subsampling_convert_state = 0; - sp->error_in_raw_data_decoding = 0; - sp->bytes_per_line = - sp->subsampling_convert_clinelenout * - (sp->subsampling_ver * sp->subsampling_hor + 2); - sp->lines_per_strile = - sp->strile_length / sp->subsampling_ver + - ((sp->strile_length % sp->subsampling_ver) != 0 ? 1 : 0); - sp->subsampling_convert_log = 1; - } - } - else - { - sp->libjpeg_jpeg_decompress_struct.jpeg_color_space = JCS_UNKNOWN; - sp->libjpeg_jpeg_decompress_struct.out_color_space = JCS_UNKNOWN; - sp->libjpeg_jpeg_query_style = 1; - sp->bytes_per_line = sp->samples_per_pixel_per_plane * sp->strile_width; - sp->lines_per_strile = sp->strile_length; - } - if (jpeg_start_decompress_encap(sp, - &(sp->libjpeg_jpeg_decompress_struct)) == 0) - return (0); - if (sp->libjpeg_jpeg_decompress_struct.image_width != sp->strile_width) - { - TIFFErrorExtR(tif, module, - "jpeg_start_decompress() returned image_width = %u, " - "expected %" PRIu32, - sp->libjpeg_jpeg_decompress_struct.image_width, - sp->strile_width); - return 0; - } - if (sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor != - sp->subsampling_hor || - sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor != - sp->subsampling_ver) - { - TIFFErrorExtR(tif, module, - "jpeg_start_decompress() returned max_h_samp_factor = %d " - "and max_v_samp_factor = %d, expected %" PRIu8 - " and %" PRIu8, - sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor, - sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor, - sp->subsampling_hor, sp->subsampling_ver); - return 0; - } - - sp->writeheader_done = 1; - return (1); -} - -static void OJPEGLibjpegSessionAbort(TIFF *tif) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(sp->libjpeg_session_active != 0); - jpeg_destroy((jpeg_common_struct *)(&(sp->libjpeg_jpeg_decompress_struct))); - sp->libjpeg_session_active = 0; -} - -static int OJPEGReadHeaderInfoSec(TIFF *tif) -{ - static const char module[] = "OJPEGReadHeaderInfoSec"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - uint16_t n; - uint8_t o; - if (sp->file_size == 0) - sp->file_size = TIFFGetFileSize(tif); - if (sp->jpeg_interchange_format != 0) - { - if (sp->jpeg_interchange_format >= sp->file_size) - { - sp->jpeg_interchange_format = 0; - sp->jpeg_interchange_format_length = 0; - } - else - { - if ((sp->jpeg_interchange_format_length == 0) || - (sp->jpeg_interchange_format > - UINT64_MAX - sp->jpeg_interchange_format_length) || - (sp->jpeg_interchange_format + - sp->jpeg_interchange_format_length > - sp->file_size)) - sp->jpeg_interchange_format_length = - sp->file_size - sp->jpeg_interchange_format; - } - } - sp->in_buffer_source = osibsNotSetYet; - sp->in_buffer_next_strile = 0; - sp->in_buffer_strile_count = tif->tif_dir.td_nstrips; - sp->in_buffer_file_togo = 0; - sp->in_buffer_togo = 0; - do - { - if (OJPEGReadBytePeek(sp, &m) == 0) - return (0); - if (m != 255) - break; - OJPEGReadByteAdvance(sp); - do - { - if (OJPEGReadByte(sp, &m) == 0) - return (0); - } while (m == 255); - switch (m) - { - case JPEG_MARKER_SOI: - /* this type of marker has no data, and should be skipped */ - break; - case JPEG_MARKER_COM: - case JPEG_MARKER_APP0: - case JPEG_MARKER_APP0 + 1: - case JPEG_MARKER_APP0 + 2: - case JPEG_MARKER_APP0 + 3: - case JPEG_MARKER_APP0 + 4: - case JPEG_MARKER_APP0 + 5: - case JPEG_MARKER_APP0 + 6: - case JPEG_MARKER_APP0 + 7: - case JPEG_MARKER_APP0 + 8: - case JPEG_MARKER_APP0 + 9: - case JPEG_MARKER_APP0 + 10: - case JPEG_MARKER_APP0 + 11: - case JPEG_MARKER_APP0 + 12: - case JPEG_MARKER_APP0 + 13: - case JPEG_MARKER_APP0 + 14: - case JPEG_MARKER_APP0 + 15: - /* this type of marker has data, but it has no use to us (and no - * place here) and should be skipped */ - if (OJPEGReadWord(sp, &n) == 0) - return (0); - if (n < 2) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt JPEG data"); - return (0); - } - if (n > 2) - OJPEGReadSkip(sp, n - 2); - break; - case JPEG_MARKER_DRI: - if (OJPEGReadHeaderInfoSecStreamDri(tif) == 0) - return (0); - break; - case JPEG_MARKER_DQT: - if (OJPEGReadHeaderInfoSecStreamDqt(tif) == 0) - return (0); - break; - case JPEG_MARKER_DHT: - if (OJPEGReadHeaderInfoSecStreamDht(tif) == 0) - return (0); - break; - case JPEG_MARKER_SOF0: - case JPEG_MARKER_SOF1: - case JPEG_MARKER_SOF3: - if (OJPEGReadHeaderInfoSecStreamSof(tif, m) == 0) - return (0); - if (sp->subsamplingcorrect != 0) - return (1); - break; - case JPEG_MARKER_SOS: - if (sp->subsamplingcorrect != 0) - return (1); - assert(sp->plane_sample_offset == 0); - if (OJPEGReadHeaderInfoSecStreamSos(tif) == 0) - return (0); - break; - default: - TIFFErrorExtR(tif, module, - "Unknown marker type %" PRIu8 " in JPEG data", m); - return (0); - } - } while (m != JPEG_MARKER_SOS); - if (sp->subsamplingcorrect) - return (1); - if (sp->sof_log == 0) - { - if (OJPEGReadHeaderInfoSecTablesQTable(tif) == 0) - return (0); - sp->sof_marker_id = JPEG_MARKER_SOF0; - for (o = 0; o < sp->samples_per_pixel; o++) - sp->sof_c[o] = o; - sp->sof_hv[0] = ((sp->subsampling_hor << 4) | sp->subsampling_ver); - for (o = 1; o < sp->samples_per_pixel; o++) - sp->sof_hv[o] = 17; - sp->sof_x = sp->strile_width; - sp->sof_y = sp->strile_length_total; - sp->sof_log = 1; - if (OJPEGReadHeaderInfoSecTablesDcTable(tif) == 0) - return (0); - if (OJPEGReadHeaderInfoSecTablesAcTable(tif) == 0) - return (0); - for (o = 1; o < sp->samples_per_pixel; o++) - sp->sos_cs[o] = o; - } - return (1); -} - -static int OJPEGReadHeaderInfoSecStreamDri(TIFF *tif) -{ - /* This could easily cause trouble in some cases... but no such cases have - occurred so far */ - static const char module[] = "OJPEGReadHeaderInfoSecStreamDri"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint16_t m; - if (OJPEGReadWord(sp, &m) == 0) - return (0); - if (m != 4) - { - TIFFErrorExtR(tif, module, "Corrupt DRI marker in JPEG data"); - return (0); - } - if (OJPEGReadWord(sp, &m) == 0) - return (0); - sp->restart_interval = m; - return (1); -} - -static int OJPEGReadHeaderInfoSecStreamDqt(TIFF *tif) -{ - /* this is a table marker, and it is to be saved as a whole for exact - * pushing on the jpeg stream later on */ - static const char module[] = "OJPEGReadHeaderInfoSecStreamDqt"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint16_t m; - uint32_t na; - uint8_t *nb; - uint8_t o; - if (OJPEGReadWord(sp, &m) == 0) - return (0); - if (m <= 2) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt DQT marker in JPEG data"); - return (0); - } - if (sp->subsamplingcorrect != 0) - OJPEGReadSkip(sp, m - 2); - else - { - m -= 2; - do - { - if (m < 65) - { - TIFFErrorExtR(tif, module, "Corrupt DQT marker in JPEG data"); - return (0); - } - na = sizeof(uint32_t) + 69; - nb = _TIFFmallocExt(tif, na); - if (nb == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - *(uint32_t *)nb = na; - nb[sizeof(uint32_t)] = 255; - nb[sizeof(uint32_t) + 1] = JPEG_MARKER_DQT; - nb[sizeof(uint32_t) + 2] = 0; - nb[sizeof(uint32_t) + 3] = 67; - if (OJPEGReadBlock(sp, 65, &nb[sizeof(uint32_t) + 4]) == 0) - { - _TIFFfreeExt(tif, nb); - return (0); - } - o = nb[sizeof(uint32_t) + 4] & 15; - if (3 < o) - { - TIFFErrorExtR(tif, module, "Corrupt DQT marker in JPEG data"); - _TIFFfreeExt(tif, nb); - return (0); - } - if (sp->qtable[o] != 0) - _TIFFfreeExt(tif, sp->qtable[o]); - sp->qtable[o] = nb; - m -= 65; - } while (m > 0); - } - return (1); -} - -static int OJPEGReadHeaderInfoSecStreamDht(TIFF *tif) -{ - /* this is a table marker, and it is to be saved as a whole for exact - * pushing on the jpeg stream later on */ - /* TODO: the following assumes there is only one table in this marker... but - * i'm not quite sure that assumption is guaranteed correct */ - static const char module[] = "OJPEGReadHeaderInfoSecStreamDht"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint16_t m; - uint32_t na; - uint8_t *nb; - uint8_t o; - if (OJPEGReadWord(sp, &m) == 0) - return (0); - if (m <= 2) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt DHT marker in JPEG data"); - return (0); - } - if (sp->subsamplingcorrect != 0) - { - OJPEGReadSkip(sp, m - 2); - } - else - { - na = sizeof(uint32_t) + 2 + m; - nb = _TIFFmallocExt(tif, na); - if (nb == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - *(uint32_t *)nb = na; - nb[sizeof(uint32_t)] = 255; - nb[sizeof(uint32_t) + 1] = JPEG_MARKER_DHT; - nb[sizeof(uint32_t) + 2] = (m >> 8); - nb[sizeof(uint32_t) + 3] = (m & 255); - if (OJPEGReadBlock(sp, m - 2, &nb[sizeof(uint32_t) + 4]) == 0) - { - _TIFFfreeExt(tif, nb); - return (0); - } - o = nb[sizeof(uint32_t) + 4]; - if ((o & 240) == 0) - { - if (3 < o) - { - TIFFErrorExtR(tif, module, "Corrupt DHT marker in JPEG data"); - _TIFFfreeExt(tif, nb); - return (0); - } - if (sp->dctable[o] != 0) - _TIFFfreeExt(tif, sp->dctable[o]); - sp->dctable[o] = nb; - } - else - { - if ((o & 240) != 16) - { - TIFFErrorExtR(tif, module, "Corrupt DHT marker in JPEG data"); - _TIFFfreeExt(tif, nb); - return (0); - } - o &= 15; - if (3 < o) - { - TIFFErrorExtR(tif, module, "Corrupt DHT marker in JPEG data"); - _TIFFfreeExt(tif, nb); - return (0); - } - if (sp->actable[o] != 0) - _TIFFfreeExt(tif, sp->actable[o]); - sp->actable[o] = nb; - } - } - return (1); -} - -static int OJPEGReadHeaderInfoSecStreamSof(TIFF *tif, uint8_t marker_id) -{ - /* this marker needs to be checked, and part of its data needs to be saved - * for regeneration later on */ - static const char module[] = "OJPEGReadHeaderInfoSecStreamSof"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint16_t m; - uint16_t n; - uint8_t o; - uint16_t p; - uint16_t q; - if (sp->sof_log != 0) - { - TIFFErrorExtR(tif, module, "Corrupt JPEG data"); - return (0); - } - if (sp->subsamplingcorrect == 0) - sp->sof_marker_id = marker_id; - /* Lf: data length */ - if (OJPEGReadWord(sp, &m) == 0) - return (0); - if (m < 11) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt SOF marker in JPEG data"); - return (0); - } - m -= 8; - if (m % 3 != 0) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt SOF marker in JPEG data"); - return (0); - } - n = m / 3; - if (sp->subsamplingcorrect == 0) - { - if (n != sp->samples_per_pixel) - { - TIFFErrorExtR( - tif, module, - "JPEG compressed data indicates unexpected number of samples"); - return (0); - } - } - /* P: Sample precision */ - if (OJPEGReadByte(sp, &o) == 0) - return (0); - if (o != 8) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, - "JPEG compressed data indicates unexpected number of " - "bits per sample"); - return (0); - } - /* Y: Number of lines, X: Number of samples per line */ - if (sp->subsamplingcorrect) - OJPEGReadSkip(sp, 4); - else - { - /* Y: Number of lines */ - if (OJPEGReadWord(sp, &p) == 0) - return (0); - if (((uint32_t)p < sp->image_length) && - ((uint32_t)p < sp->strile_length_total)) - { - TIFFErrorExtR(tif, module, - "JPEG compressed data indicates unexpected height"); - return (0); - } - sp->sof_y = p; - /* X: Number of samples per line */ - if (OJPEGReadWord(sp, &p) == 0) - return (0); - if (((uint32_t)p < sp->image_width) && ((uint32_t)p < sp->strile_width)) - { - TIFFErrorExtR(tif, module, - "JPEG compressed data indicates unexpected width"); - return (0); - } - if ((uint32_t)p > sp->strile_width) - { - TIFFErrorExtR(tif, module, - "JPEG compressed data image width exceeds expected " - "image width"); - return (0); - } - sp->sof_x = p; - } - /* Nf: Number of image components in frame */ - if (OJPEGReadByte(sp, &o) == 0) - return (0); - if (o != n) - { - if (sp->subsamplingcorrect == 0) - TIFFErrorExtR(tif, module, "Corrupt SOF marker in JPEG data"); - return (0); - } - /* per component stuff */ - /* TODO: double-check that flow implies that n cannot be as big as to make - * us overflow sof_c, sof_hv and sof_tq arrays */ - for (q = 0; q < n; q++) - { - /* C: Component identifier */ - if (OJPEGReadByte(sp, &o) == 0) - return (0); - if (sp->subsamplingcorrect == 0) - sp->sof_c[q] = o; - /* H: Horizontal sampling factor, and V: Vertical sampling factor */ - if (OJPEGReadByte(sp, &o) == 0) - return (0); - if (sp->subsamplingcorrect != 0) - { - if (q == 0) - { - sp->subsampling_hor = (o >> 4); - sp->subsampling_ver = (o & 15); - if (((sp->subsampling_hor != 1) && (sp->subsampling_hor != 2) && - (sp->subsampling_hor != 4)) || - ((sp->subsampling_ver != 1) && (sp->subsampling_ver != 2) && - (sp->subsampling_ver != 4))) - sp->subsampling_force_desubsampling_inside_decompression = - 1; - } - else - { - if (o != 17) - sp->subsampling_force_desubsampling_inside_decompression = - 1; - } - } - else - { - sp->sof_hv[q] = o; - if (sp->subsampling_force_desubsampling_inside_decompression == 0) - { - if (q == 0) - { - if (o != ((sp->subsampling_hor << 4) | sp->subsampling_ver)) - { - TIFFErrorExtR(tif, module, - "JPEG compressed data indicates " - "unexpected subsampling values"); - return (0); - } - } - else - { - if (o != 17) - { - TIFFErrorExtR(tif, module, - "JPEG compressed data indicates " - "unexpected subsampling values"); - return (0); - } - } - } - } - /* Tq: Quantization table destination selector */ - if (OJPEGReadByte(sp, &o) == 0) - return (0); - if (sp->subsamplingcorrect == 0) - sp->sof_tq[q] = o; - } - if (sp->subsamplingcorrect == 0) - sp->sof_log = 1; - return (1); -} - -static int OJPEGReadHeaderInfoSecStreamSos(TIFF *tif) -{ - /* this marker needs to be checked, and part of its data needs to be saved - * for regeneration later on */ - static const char module[] = "OJPEGReadHeaderInfoSecStreamSos"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint16_t m; - uint8_t n; - uint8_t o; - assert(sp->subsamplingcorrect == 0); - if (sp->sof_log == 0) - { - TIFFErrorExtR(tif, module, "Corrupt SOS marker in JPEG data"); - return (0); - } - /* Ls */ - if (OJPEGReadWord(sp, &m) == 0) - return (0); - if (m != 6 + sp->samples_per_pixel_per_plane * 2) - { - TIFFErrorExtR(tif, module, "Corrupt SOS marker in JPEG data"); - return (0); - } - /* Ns */ - if (OJPEGReadByte(sp, &n) == 0) - return (0); - if (n != sp->samples_per_pixel_per_plane) - { - TIFFErrorExtR(tif, module, "Corrupt SOS marker in JPEG data"); - return (0); - } - /* Cs, Td, and Ta */ - for (o = 0; o < sp->samples_per_pixel_per_plane; o++) - { - /* Cs */ - if (OJPEGReadByte(sp, &n) == 0) - return (0); - sp->sos_cs[sp->plane_sample_offset + o] = n; - /* Td and Ta */ - if (OJPEGReadByte(sp, &n) == 0) - return (0); - sp->sos_tda[sp->plane_sample_offset + o] = n; - } - /* skip Ss, Se, Ah, en Al -> no check, as per Tom Lane recommendation, as - * per LibJpeg source */ - OJPEGReadSkip(sp, 3); - return (1); -} - -static int OJPEGReadHeaderInfoSecTablesQTable(TIFF *tif) -{ - static const char module[] = "OJPEGReadHeaderInfoSecTablesQTable"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - uint8_t n; - uint32_t oa; - uint8_t *ob; - uint32_t p; - if (sp->qtable_offset[0] == 0) - { - TIFFErrorExtR(tif, module, "Missing JPEG tables"); - return (0); - } - sp->in_buffer_file_pos_log = 0; - for (m = 0; m < sp->samples_per_pixel; m++) - { - if ((sp->qtable_offset[m] != 0) && - ((m == 0) || (sp->qtable_offset[m] != sp->qtable_offset[m - 1]))) - { - for (n = 0; n < m - 1; n++) - { - if (sp->qtable_offset[m] == sp->qtable_offset[n]) - { - TIFFErrorExtR(tif, module, "Corrupt JpegQTables tag value"); - return (0); - } - } - oa = sizeof(uint32_t) + 69; - ob = _TIFFmallocExt(tif, oa); - if (ob == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - *(uint32_t *)ob = oa; - ob[sizeof(uint32_t)] = 255; - ob[sizeof(uint32_t) + 1] = JPEG_MARKER_DQT; - ob[sizeof(uint32_t) + 2] = 0; - ob[sizeof(uint32_t) + 3] = 67; - ob[sizeof(uint32_t) + 4] = m; - TIFFSeekFile(tif, sp->qtable_offset[m], SEEK_SET); - p = (uint32_t)TIFFReadFile(tif, &ob[sizeof(uint32_t) + 5], 64); - if (p != 64) - { - _TIFFfreeExt(tif, ob); - return (0); - } - if (sp->qtable[m] != 0) - _TIFFfreeExt(tif, sp->qtable[m]); - sp->qtable[m] = ob; - sp->sof_tq[m] = m; - } - else - sp->sof_tq[m] = sp->sof_tq[m - 1]; - } - return (1); -} - -static int OJPEGReadHeaderInfoSecTablesDcTable(TIFF *tif) -{ - static const char module[] = "OJPEGReadHeaderInfoSecTablesDcTable"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - uint8_t n; - uint8_t o[16]; - uint32_t p; - uint32_t q; - uint32_t ra; - uint8_t *rb; - if (sp->dctable_offset[0] == 0) - { - TIFFErrorExtR(tif, module, "Missing JPEG tables"); - return (0); - } - sp->in_buffer_file_pos_log = 0; - for (m = 0; m < sp->samples_per_pixel; m++) - { - if ((sp->dctable_offset[m] != 0) && - ((m == 0) || (sp->dctable_offset[m] != sp->dctable_offset[m - 1]))) - { - for (n = 0; n < m - 1; n++) - { - if (sp->dctable_offset[m] == sp->dctable_offset[n]) - { - TIFFErrorExtR(tif, module, - "Corrupt JpegDcTables tag value"); - return (0); - } - } - TIFFSeekFile(tif, sp->dctable_offset[m], SEEK_SET); - p = (uint32_t)TIFFReadFile(tif, o, 16); - if (p != 16) - return (0); - q = 0; - for (n = 0; n < 16; n++) - q += o[n]; - ra = sizeof(uint32_t) + 21 + q; - rb = _TIFFmallocExt(tif, ra); - if (rb == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - *(uint32_t *)rb = ra; - rb[sizeof(uint32_t)] = 255; - rb[sizeof(uint32_t) + 1] = JPEG_MARKER_DHT; - rb[sizeof(uint32_t) + 2] = (uint8_t)((19 + q) >> 8); - rb[sizeof(uint32_t) + 3] = ((19 + q) & 255); - rb[sizeof(uint32_t) + 4] = m; - for (n = 0; n < 16; n++) - rb[sizeof(uint32_t) + 5 + n] = o[n]; - p = (uint32_t)TIFFReadFile(tif, &(rb[sizeof(uint32_t) + 21]), q); - if (p != q) - { - _TIFFfreeExt(tif, rb); - return (0); - } - if (sp->dctable[m] != 0) - _TIFFfreeExt(tif, sp->dctable[m]); - sp->dctable[m] = rb; - sp->sos_tda[m] = (m << 4); - } - else - sp->sos_tda[m] = sp->sos_tda[m - 1]; - } - return (1); -} - -static int OJPEGReadHeaderInfoSecTablesAcTable(TIFF *tif) -{ - static const char module[] = "OJPEGReadHeaderInfoSecTablesAcTable"; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - uint8_t n; - uint8_t o[16]; - uint32_t p; - uint32_t q; - uint32_t ra; - uint8_t *rb; - if (sp->actable_offset[0] == 0) - { - TIFFErrorExtR(tif, module, "Missing JPEG tables"); - return (0); - } - sp->in_buffer_file_pos_log = 0; - for (m = 0; m < sp->samples_per_pixel; m++) - { - if ((sp->actable_offset[m] != 0) && - ((m == 0) || (sp->actable_offset[m] != sp->actable_offset[m - 1]))) - { - for (n = 0; n < m - 1; n++) - { - if (sp->actable_offset[m] == sp->actable_offset[n]) - { - TIFFErrorExtR(tif, module, - "Corrupt JpegAcTables tag value"); - return (0); - } - } - TIFFSeekFile(tif, sp->actable_offset[m], SEEK_SET); - p = (uint32_t)TIFFReadFile(tif, o, 16); - if (p != 16) - return (0); - q = 0; - for (n = 0; n < 16; n++) - q += o[n]; - ra = sizeof(uint32_t) + 21 + q; - rb = _TIFFmallocExt(tif, ra); - if (rb == 0) - { - TIFFErrorExtR(tif, module, "Out of memory"); - return (0); - } - *(uint32_t *)rb = ra; - rb[sizeof(uint32_t)] = 255; - rb[sizeof(uint32_t) + 1] = JPEG_MARKER_DHT; - rb[sizeof(uint32_t) + 2] = (uint8_t)((19 + q) >> 8); - rb[sizeof(uint32_t) + 3] = ((19 + q) & 255); - rb[sizeof(uint32_t) + 4] = (16 | m); - for (n = 0; n < 16; n++) - rb[sizeof(uint32_t) + 5 + n] = o[n]; - p = (uint32_t)TIFFReadFile(tif, &(rb[sizeof(uint32_t) + 21]), q); - if (p != q) - { - _TIFFfreeExt(tif, rb); - return (0); - } - if (sp->actable[m] != 0) - _TIFFfreeExt(tif, sp->actable[m]); - sp->actable[m] = rb; - sp->sos_tda[m] = (sp->sos_tda[m] | m); - } - else - sp->sos_tda[m] = (sp->sos_tda[m] | (sp->sos_tda[m - 1] & 15)); - } - return (1); -} - -static int OJPEGReadBufferFill(OJPEGState *sp) -{ - uint16_t m; - tmsize_t n; - /* TODO: double-check: when subsamplingcorrect is set, no call to - * TIFFErrorExt or TIFFWarningExt should be made in any other case, seek or - * read errors should be passed through */ - do - { - if (sp->in_buffer_file_togo != 0) - { - if (sp->in_buffer_file_pos_log == 0) - { - TIFFSeekFile(sp->tif, sp->in_buffer_file_pos, SEEK_SET); - sp->in_buffer_file_pos_log = 1; - } - m = OJPEG_BUFFER; - if ((uint64_t)m > sp->in_buffer_file_togo) - m = (uint16_t)sp->in_buffer_file_togo; - n = TIFFReadFile(sp->tif, sp->in_buffer, (tmsize_t)m); - if (n == 0) - return (0); - assert(n > 0); - assert(n <= OJPEG_BUFFER); - assert(n < 65536); - assert((uint64_t)n <= sp->in_buffer_file_togo); - m = (uint16_t)n; - sp->in_buffer_togo = m; - sp->in_buffer_cur = sp->in_buffer; - sp->in_buffer_file_togo -= m; - sp->in_buffer_file_pos += m; - break; - } - sp->in_buffer_file_pos_log = 0; - switch (sp->in_buffer_source) - { - case osibsNotSetYet: - if (sp->jpeg_interchange_format != 0) - { - sp->in_buffer_file_pos = sp->jpeg_interchange_format; - sp->in_buffer_file_togo = - sp->jpeg_interchange_format_length; - } - sp->in_buffer_source = osibsJpegInterchangeFormat; - break; - case osibsJpegInterchangeFormat: - sp->in_buffer_source = osibsStrile; - break; - case osibsStrile: - if (sp->in_buffer_next_strile == sp->in_buffer_strile_count) - sp->in_buffer_source = osibsEof; - else - { - int err = 0; - sp->in_buffer_file_pos = TIFFGetStrileOffsetWithErr( - sp->tif, sp->in_buffer_next_strile, &err); - if (err) - return 0; - if (sp->in_buffer_file_pos != 0) - { - uint64_t bytecount = TIFFGetStrileByteCountWithErr( - sp->tif, sp->in_buffer_next_strile, &err); - if (err) - return 0; - if (sp->in_buffer_file_pos >= sp->file_size) - sp->in_buffer_file_pos = 0; - else if (bytecount == 0) - sp->in_buffer_file_togo = - sp->file_size - sp->in_buffer_file_pos; - else - { - sp->in_buffer_file_togo = bytecount; - if (sp->in_buffer_file_togo == 0) - sp->in_buffer_file_pos = 0; - else if (sp->in_buffer_file_pos > - UINT64_MAX - sp->in_buffer_file_togo || - sp->in_buffer_file_pos + - sp->in_buffer_file_togo > - sp->file_size) - sp->in_buffer_file_togo = - sp->file_size - sp->in_buffer_file_pos; - } - } - sp->in_buffer_next_strile++; - } - break; - default: - return (0); - } - } while (1); - return (1); -} - -static int OJPEGReadByte(OJPEGState *sp, uint8_t *byte) -{ - if (sp->in_buffer_togo == 0) - { - if (OJPEGReadBufferFill(sp) == 0) - return (0); - assert(sp->in_buffer_togo > 0); - } - *byte = *(sp->in_buffer_cur); - sp->in_buffer_cur++; - sp->in_buffer_togo--; - return (1); -} - -static int OJPEGReadBytePeek(OJPEGState *sp, uint8_t *byte) -{ - if (sp->in_buffer_togo == 0) - { - if (OJPEGReadBufferFill(sp) == 0) - return (0); - assert(sp->in_buffer_togo > 0); - } - *byte = *(sp->in_buffer_cur); - return (1); -} - -static void OJPEGReadByteAdvance(OJPEGState *sp) -{ - assert(sp->in_buffer_togo > 0); - sp->in_buffer_cur++; - sp->in_buffer_togo--; -} - -static int OJPEGReadWord(OJPEGState *sp, uint16_t *word) -{ - uint8_t m; - if (OJPEGReadByte(sp, &m) == 0) - return (0); - *word = (m << 8); - if (OJPEGReadByte(sp, &m) == 0) - return (0); - *word |= m; - return (1); -} - -static int OJPEGReadBlock(OJPEGState *sp, uint16_t len, void *mem) -{ - uint16_t mlen; - uint8_t *mmem; - uint16_t n; - assert(len > 0); - mlen = len; - mmem = mem; - do - { - if (sp->in_buffer_togo == 0) - { - if (OJPEGReadBufferFill(sp) == 0) - return (0); - assert(sp->in_buffer_togo > 0); - } - n = mlen; - if (n > sp->in_buffer_togo) - n = sp->in_buffer_togo; - _TIFFmemcpy(mmem, sp->in_buffer_cur, n); - sp->in_buffer_cur += n; - sp->in_buffer_togo -= n; - mlen -= n; - mmem += n; - } while (mlen > 0); - return (1); -} - -static void OJPEGReadSkip(OJPEGState *sp, uint16_t len) -{ - uint16_t m; - uint16_t n; - m = len; - n = m; - if (n > sp->in_buffer_togo) - n = sp->in_buffer_togo; - sp->in_buffer_cur += n; - sp->in_buffer_togo -= n; - m -= n; - if (m > 0) - { - assert(sp->in_buffer_togo == 0); - n = m; - if ((uint64_t)n > sp->in_buffer_file_togo) - n = (uint16_t)sp->in_buffer_file_togo; - sp->in_buffer_file_pos += n; - sp->in_buffer_file_togo -= n; - sp->in_buffer_file_pos_log = 0; - /* we don't skip past jpeginterchangeformat/strile block... - * if that is asked from us, we're dealing with totally bazurk - * data anyway, and we've not seen this happening on any - * testfile, so we might as well likely cause some other - * meaningless error to be passed at some later time - */ - } -} - -static int OJPEGWriteStream(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - *len = 0; - do - { - assert(sp->out_state <= ososEoi); - switch (sp->out_state) - { - case ososSoi: - OJPEGWriteStreamSoi(tif, mem, len); - break; - case ososQTable0: - OJPEGWriteStreamQTable(tif, 0, mem, len); - break; - case ososQTable1: - OJPEGWriteStreamQTable(tif, 1, mem, len); - break; - case ososQTable2: - OJPEGWriteStreamQTable(tif, 2, mem, len); - break; - case ososQTable3: - OJPEGWriteStreamQTable(tif, 3, mem, len); - break; - case ososDcTable0: - OJPEGWriteStreamDcTable(tif, 0, mem, len); - break; - case ososDcTable1: - OJPEGWriteStreamDcTable(tif, 1, mem, len); - break; - case ososDcTable2: - OJPEGWriteStreamDcTable(tif, 2, mem, len); - break; - case ososDcTable3: - OJPEGWriteStreamDcTable(tif, 3, mem, len); - break; - case ososAcTable0: - OJPEGWriteStreamAcTable(tif, 0, mem, len); - break; - case ososAcTable1: - OJPEGWriteStreamAcTable(tif, 1, mem, len); - break; - case ososAcTable2: - OJPEGWriteStreamAcTable(tif, 2, mem, len); - break; - case ososAcTable3: - OJPEGWriteStreamAcTable(tif, 3, mem, len); - break; - case ososDri: - OJPEGWriteStreamDri(tif, mem, len); - break; - case ososSof: - OJPEGWriteStreamSof(tif, mem, len); - break; - case ososSos: - OJPEGWriteStreamSos(tif, mem, len); - break; - case ososCompressed: - if (OJPEGWriteStreamCompressed(tif, mem, len) == 0) - return (0); - break; - case ososRst: - OJPEGWriteStreamRst(tif, mem, len); - break; - case ososEoi: - OJPEGWriteStreamEoi(tif, mem, len); - break; - } - } while (*len == 0); - return (1); -} - -static void OJPEGWriteStreamSoi(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(OJPEG_BUFFER >= 2); - sp->out_buffer[0] = 255; - sp->out_buffer[1] = JPEG_MARKER_SOI; - *len = 2; - *mem = (void *)sp->out_buffer; - sp->out_state++; -} - -static void OJPEGWriteStreamQTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - if (sp->qtable[table_index] != 0) - { - *mem = (void *)(sp->qtable[table_index] + sizeof(uint32_t)); - *len = *((uint32_t *)sp->qtable[table_index]) - sizeof(uint32_t); - } - sp->out_state++; -} - -static void OJPEGWriteStreamDcTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - if (sp->dctable[table_index] != 0) - { - *mem = (void *)(sp->dctable[table_index] + sizeof(uint32_t)); - *len = *((uint32_t *)sp->dctable[table_index]) - sizeof(uint32_t); - } - sp->out_state++; -} - -static void OJPEGWriteStreamAcTable(TIFF *tif, uint8_t table_index, void **mem, - uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - if (sp->actable[table_index] != 0) - { - *mem = (void *)(sp->actable[table_index] + sizeof(uint32_t)); - *len = *((uint32_t *)sp->actable[table_index]) - sizeof(uint32_t); - } - sp->out_state++; -} - -static void OJPEGWriteStreamDri(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(OJPEG_BUFFER >= 6); - if (sp->restart_interval != 0) - { - sp->out_buffer[0] = 255; - sp->out_buffer[1] = JPEG_MARKER_DRI; - sp->out_buffer[2] = 0; - sp->out_buffer[3] = 4; - sp->out_buffer[4] = (sp->restart_interval >> 8); - sp->out_buffer[5] = (sp->restart_interval & 255); - *len = 6; - *mem = (void *)sp->out_buffer; - } - sp->out_state++; -} - -static void OJPEGWriteStreamSof(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - assert(OJPEG_BUFFER >= 2 + 8 + sp->samples_per_pixel_per_plane * 3); - assert(255 >= 8 + sp->samples_per_pixel_per_plane * 3); - sp->out_buffer[0] = 255; - sp->out_buffer[1] = sp->sof_marker_id; - /* Lf */ - sp->out_buffer[2] = 0; - sp->out_buffer[3] = 8 + sp->samples_per_pixel_per_plane * 3; - /* P */ - sp->out_buffer[4] = 8; - /* Y */ - sp->out_buffer[5] = (uint8_t)(sp->sof_y >> 8); - sp->out_buffer[6] = (sp->sof_y & 255); - /* X */ - sp->out_buffer[7] = (uint8_t)(sp->sof_x >> 8); - sp->out_buffer[8] = (sp->sof_x & 255); - /* Nf */ - sp->out_buffer[9] = sp->samples_per_pixel_per_plane; - for (m = 0; m < sp->samples_per_pixel_per_plane; m++) - { - /* C */ - sp->out_buffer[10 + m * 3] = sp->sof_c[sp->plane_sample_offset + m]; - /* H and V */ - sp->out_buffer[10 + m * 3 + 1] = - sp->sof_hv[sp->plane_sample_offset + m]; - /* Tq */ - sp->out_buffer[10 + m * 3 + 2] = - sp->sof_tq[sp->plane_sample_offset + m]; - } - *len = 10 + sp->samples_per_pixel_per_plane * 3; - *mem = (void *)sp->out_buffer; - sp->out_state++; -} - -static void OJPEGWriteStreamSos(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - uint8_t m; - assert(OJPEG_BUFFER >= 2 + 6 + sp->samples_per_pixel_per_plane * 2); - assert(255 >= 6 + sp->samples_per_pixel_per_plane * 2); - sp->out_buffer[0] = 255; - sp->out_buffer[1] = JPEG_MARKER_SOS; - /* Ls */ - sp->out_buffer[2] = 0; - sp->out_buffer[3] = 6 + sp->samples_per_pixel_per_plane * 2; - /* Ns */ - sp->out_buffer[4] = sp->samples_per_pixel_per_plane; - for (m = 0; m < sp->samples_per_pixel_per_plane; m++) - { - /* Cs */ - sp->out_buffer[5 + m * 2] = sp->sos_cs[sp->plane_sample_offset + m]; - /* Td and Ta */ - sp->out_buffer[5 + m * 2 + 1] = - sp->sos_tda[sp->plane_sample_offset + m]; - } - /* Ss */ - sp->out_buffer[5 + sp->samples_per_pixel_per_plane * 2] = 0; - /* Se */ - sp->out_buffer[5 + sp->samples_per_pixel_per_plane * 2 + 1] = 63; - /* Ah and Al */ - sp->out_buffer[5 + sp->samples_per_pixel_per_plane * 2 + 2] = 0; - *len = 8 + sp->samples_per_pixel_per_plane * 2; - *mem = (void *)sp->out_buffer; - sp->out_state++; -} - -static int OJPEGWriteStreamCompressed(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - if (sp->in_buffer_togo == 0) - { - if (OJPEGReadBufferFill(sp) == 0) - return (0); - assert(sp->in_buffer_togo > 0); - } - *len = sp->in_buffer_togo; - *mem = (void *)sp->in_buffer_cur; - sp->in_buffer_togo = 0; - if (sp->in_buffer_file_togo == 0) - { - switch (sp->in_buffer_source) - { - case osibsStrile: - if (sp->in_buffer_next_strile < sp->in_buffer_strile_count) - sp->out_state = ososRst; - else - sp->out_state = ososEoi; - break; - case osibsEof: - sp->out_state = ososEoi; - break; - default: - break; - } - } - return (1); -} - -static void OJPEGWriteStreamRst(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(OJPEG_BUFFER >= 2); - sp->out_buffer[0] = 255; - sp->out_buffer[1] = JPEG_MARKER_RST0 + sp->restart_index; - sp->restart_index++; - if (sp->restart_index == 8) - sp->restart_index = 0; - *len = 2; - *mem = (void *)sp->out_buffer; - sp->out_state = ososCompressed; -} - -static void OJPEGWriteStreamEoi(TIFF *tif, void **mem, uint32_t *len) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - assert(OJPEG_BUFFER >= 2); - sp->out_buffer[0] = 255; - sp->out_buffer[1] = JPEG_MARKER_EOI; - *len = 2; - *mem = (void *)sp->out_buffer; -} - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int jpeg_create_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo) -{ - if (SETJMP(sp->exit_jmpbuf)) - return 0; - else - { - jpeg_create_decompress(cinfo); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int jpeg_read_header_encap(OJPEGState *sp, jpeg_decompress_struct *cinfo, - uint8_t require_image) -{ - if (SETJMP(sp->exit_jmpbuf)) - return 0; - else - { - jpeg_read_header(cinfo, require_image); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int jpeg_start_decompress_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo) -{ - if (SETJMP(sp->exit_jmpbuf)) - return 0; - else - { - jpeg_start_decompress(cinfo); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int jpeg_read_scanlines_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, - void *scanlines, uint32_t max_lines) -{ - if (SETJMP(sp->exit_jmpbuf)) - return 0; - else - { - jpeg_read_scanlines(cinfo, scanlines, max_lines); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static int jpeg_read_raw_data_encap(OJPEGState *sp, - jpeg_decompress_struct *cinfo, void *data, - uint32_t max_lines) -{ - if (SETJMP(sp->exit_jmpbuf)) - return 0; - else - { - jpeg_read_raw_data(cinfo, data, max_lines); - return 1; - } -} -#endif - -#ifndef LIBJPEG_ENCAP_EXTERNAL -static void jpeg_encap_unwind(TIFF *tif) -{ - OJPEGState *sp = (OJPEGState *)tif->tif_data; - LONGJMP(sp->exit_jmpbuf, 1); -} -#endif - -static void OJPEGLibjpegJpegErrorMgrOutputMessage(jpeg_common_struct *cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message)(cinfo, buffer); - TIFFWarningExtR(((TIFF *)(cinfo->client_data)), "LibJpeg", "%s", buffer); -} - -static void OJPEGLibjpegJpegErrorMgrErrorExit(jpeg_common_struct *cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - (*cinfo->err->format_message)(cinfo, buffer); - TIFFErrorExtR(((TIFF *)(cinfo->client_data)), "LibJpeg", "%s", buffer); - jpeg_encap_unwind((TIFF *)(cinfo->client_data)); -} - -static void OJPEGLibjpegJpegSourceMgrInitSource(jpeg_decompress_struct *cinfo) -{ - (void)cinfo; -} - -static boolean -OJPEGLibjpegJpegSourceMgrFillInputBuffer(jpeg_decompress_struct *cinfo) -{ - TIFF *tif = (TIFF *)cinfo->client_data; - OJPEGState *sp = (OJPEGState *)tif->tif_data; - void *mem = 0; - uint32_t len = 0U; - if (OJPEGWriteStream(tif, &mem, &len) == 0) - { - TIFFErrorExtR(tif, "LibJpeg", "Premature end of JPEG data"); - jpeg_encap_unwind(tif); - } - sp->libjpeg_jpeg_source_mgr.bytes_in_buffer = len; - sp->libjpeg_jpeg_source_mgr.next_input_byte = mem; - return (1); -} - -static void -OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct *cinfo, - long num_bytes) -{ - TIFF *tif = (TIFF *)cinfo->client_data; - (void)num_bytes; - TIFFErrorExtR(tif, "LibJpeg", "Unexpected error"); - jpeg_encap_unwind(tif); -} - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4702) /* unreachable code */ -#endif -static boolean -OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct *cinfo, - int desired) -{ - TIFF *tif = (TIFF *)cinfo->client_data; - (void)desired; - TIFFErrorExtR(tif, "LibJpeg", "Unexpected error"); - jpeg_encap_unwind(tif); - return (0); -} -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -static void OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct *cinfo) -{ - (void)cinfo; -} - -#endif diff --git a/third_party/libtiff/libtiff/tif_open.c b/third_party/libtiff/libtiff/tif_open.c deleted file mode 100644 index 565d13c..0000000 --- a/third_party/libtiff/libtiff/tif_open.c +++ /dev/null @@ -1,945 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ - -#ifdef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#undef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#endif - -#include "tiffiop.h" -#include -#include - -/* - * Dummy functions to fill the omitted client procedures. - */ -int _tiffDummyMapProc(thandle_t fd, void **pbase, toff_t *psize) -{ - (void)fd; - (void)pbase; - (void)psize; - return (0); -} - -void _tiffDummyUnmapProc(thandle_t fd, void *base, toff_t size) -{ - (void)fd; - (void)base; - (void)size; -} - -int _TIFFgetMode(TIFFOpenOptions *opts, thandle_t clientdata, const char *mode, - const char *module) -{ - int m = -1; - - switch (mode[0]) - { - case 'r': - m = O_RDONLY; - if (mode[1] == '+') - m = O_RDWR; - break; - case 'w': - case 'a': - m = O_RDWR | O_CREAT; - if (mode[0] == 'w') - m |= O_TRUNC; - break; - default: - _TIFFErrorEarly(opts, clientdata, module, "\"%s\": Bad mode", mode); - break; - } - return (m); -} - -TIFFOpenOptions *TIFFOpenOptionsAlloc() -{ - TIFFOpenOptions *opts = - (TIFFOpenOptions *)_TIFFcalloc(1, sizeof(TIFFOpenOptions)); - return opts; -} - -void TIFFOpenOptionsFree(TIFFOpenOptions *opts) { _TIFFfree(opts); } - -/** Define a limit in bytes for a single memory allocation done by libtiff. - * If max_single_mem_alloc is set to 0, which is the default, no other limit - * that the underlying _TIFFmalloc() or - * TIFFOpenOptionsSetMaxCumulatedMemAlloc() will be applied. - */ -void TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts, - tmsize_t max_single_mem_alloc) -{ - opts->max_single_mem_alloc = max_single_mem_alloc; -} - -/** Define a limit in bytes for the cumulated memory allocations done by libtiff - * on a given TIFF handle. - * If max_cumulated_mem_alloc is set to 0, which is the default, no other limit - * that the underlying _TIFFmalloc() or - * TIFFOpenOptionsSetMaxSingleMemAlloc() will be applied. - */ -void TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions *opts, - tmsize_t max_cumulated_mem_alloc) -{ - opts->max_cumulated_mem_alloc = max_cumulated_mem_alloc; -} - -/** Whether a warning should be emitted when encountering a unknown tag. - * Default is FALSE since libtiff 4.7.1 - */ -void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, - int warn_about_unknown_tags) -{ - opts->warn_about_unknown_tags = warn_about_unknown_tags; -} - -void TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts, - TIFFErrorHandlerExtR handler, - void *errorhandler_user_data) -{ - opts->errorhandler = handler; - opts->errorhandler_user_data = errorhandler_user_data; -} - -void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions *opts, - TIFFErrorHandlerExtR handler, - void *warnhandler_user_data) -{ - opts->warnhandler = handler; - opts->warnhandler_user_data = warnhandler_user_data; -} - -static void _TIFFEmitErrorAboveMaxSingleMemAlloc(TIFF *tif, - const char *pszFunction, - tmsize_t s) -{ - TIFFErrorExtR(tif, pszFunction, - "Memory allocation of %" PRIu64 - " bytes is beyond the %" PRIu64 - " byte limit defined in open options", - (uint64_t)s, (uint64_t)tif->tif_max_single_mem_alloc); -} - -static void _TIFFEmitErrorAboveMaxCumulatedMemAlloc(TIFF *tif, - const char *pszFunction, - tmsize_t s) -{ - TIFFErrorExtR(tif, pszFunction, - "Cumulated memory allocation of %" PRIu64 " + %" PRIu64 - " bytes is beyond the %" PRIu64 - " cumulated byte limit defined in open options", - (uint64_t)tif->tif_cur_cumulated_mem_alloc, (uint64_t)s, - (uint64_t)tif->tif_max_cumulated_mem_alloc); -} - -/* When allocating memory, we write at the beginning of the buffer it size. - * This allows us to keep track of the total memory allocated when we - * malloc/calloc/realloc and free. In theory we need just SIZEOF_SIZE_T bytes - * for that, but on x86_64, allocations of more than 16 bytes are aligned on - * 16 bytes. Hence using 2 * SIZEOF_SIZE_T. - * It is critical that _TIFFmallocExt/_TIFFcallocExt/_TIFFreallocExt are - * paired with _TIFFfreeExt. - * CMakeLists.txt defines TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS, which in - * turn disables the definition of the non Ext version in tiffio.h - */ -#define LEADING_AREA_TO_STORE_ALLOC_SIZE (2 * SIZEOF_SIZE_T) - -/** malloc() version that takes into account memory-specific open options */ -void *_TIFFmallocExt(TIFF *tif, tmsize_t s) -{ - if (tif != NULL && tif->tif_max_single_mem_alloc > 0 && - s > tif->tif_max_single_mem_alloc) - { - _TIFFEmitErrorAboveMaxSingleMemAlloc(tif, "_TIFFmallocExt", s); - return NULL; - } - if (tif != NULL && tif->tif_max_cumulated_mem_alloc > 0) - { - if (s > tif->tif_max_cumulated_mem_alloc - - tif->tif_cur_cumulated_mem_alloc || - s > TIFF_TMSIZE_T_MAX - LEADING_AREA_TO_STORE_ALLOC_SIZE) - { - _TIFFEmitErrorAboveMaxCumulatedMemAlloc(tif, "_TIFFmallocExt", s); - return NULL; - } - void *ptr = _TIFFmalloc(LEADING_AREA_TO_STORE_ALLOC_SIZE + s); - if (!ptr) - return NULL; - tif->tif_cur_cumulated_mem_alloc += s; - memcpy(ptr, &s, sizeof(s)); - return (char *)ptr + LEADING_AREA_TO_STORE_ALLOC_SIZE; - } - return _TIFFmalloc(s); -} - -/** calloc() version that takes into account memory-specific open options */ -void *_TIFFcallocExt(TIFF *tif, tmsize_t nmemb, tmsize_t siz) -{ - if (nmemb <= 0 || siz <= 0 || nmemb > TIFF_TMSIZE_T_MAX / siz) - return NULL; - if (tif != NULL && tif->tif_max_single_mem_alloc > 0) - { - if (nmemb * siz > tif->tif_max_single_mem_alloc) - { - _TIFFEmitErrorAboveMaxSingleMemAlloc(tif, "_TIFFcallocExt", - nmemb * siz); - return NULL; - } - } - if (tif != NULL && tif->tif_max_cumulated_mem_alloc > 0) - { - const tmsize_t s = nmemb * siz; - if (s > tif->tif_max_cumulated_mem_alloc - - tif->tif_cur_cumulated_mem_alloc || - s > TIFF_TMSIZE_T_MAX - LEADING_AREA_TO_STORE_ALLOC_SIZE) - { - _TIFFEmitErrorAboveMaxCumulatedMemAlloc(tif, "_TIFFcallocExt", s); - return NULL; - } - void *ptr = _TIFFcalloc(LEADING_AREA_TO_STORE_ALLOC_SIZE + s, 1); - if (!ptr) - return NULL; - tif->tif_cur_cumulated_mem_alloc += s; - memcpy(ptr, &s, sizeof(s)); - return (char *)ptr + LEADING_AREA_TO_STORE_ALLOC_SIZE; - } - return _TIFFcalloc(nmemb, siz); -} - -/** realloc() version that takes into account memory-specific open options */ -void *_TIFFreallocExt(TIFF *tif, void *p, tmsize_t s) -{ - if (tif != NULL && tif->tif_max_single_mem_alloc > 0 && - s > tif->tif_max_single_mem_alloc) - { - _TIFFEmitErrorAboveMaxSingleMemAlloc(tif, "_TIFFreallocExt", s); - return NULL; - } - if (tif != NULL && tif->tif_max_cumulated_mem_alloc > 0) - { - void *oldPtr = p; - tmsize_t oldSize = 0; - if (p) - { - oldPtr = (char *)p - LEADING_AREA_TO_STORE_ALLOC_SIZE; - memcpy(&oldSize, oldPtr, sizeof(oldSize)); - assert(oldSize <= tif->tif_cur_cumulated_mem_alloc); - } - if (s > oldSize && - (s > tif->tif_max_cumulated_mem_alloc - - (tif->tif_cur_cumulated_mem_alloc - oldSize) || - s > TIFF_TMSIZE_T_MAX - LEADING_AREA_TO_STORE_ALLOC_SIZE)) - { - _TIFFEmitErrorAboveMaxCumulatedMemAlloc(tif, "_TIFFreallocExt", - s - oldSize); - return NULL; - } - void *newPtr = - _TIFFrealloc(oldPtr, LEADING_AREA_TO_STORE_ALLOC_SIZE + s); - if (newPtr == NULL) - return NULL; - tif->tif_cur_cumulated_mem_alloc -= oldSize; - tif->tif_cur_cumulated_mem_alloc += s; - memcpy(newPtr, &s, sizeof(s)); - return (char *)newPtr + LEADING_AREA_TO_STORE_ALLOC_SIZE; - } - return _TIFFrealloc(p, s); -} - -/** free() version that takes into account memory-specific open options */ -void _TIFFfreeExt(TIFF *tif, void *p) -{ - if (p != NULL && tif != NULL && tif->tif_max_cumulated_mem_alloc > 0) - { - void *oldPtr = (char *)p - LEADING_AREA_TO_STORE_ALLOC_SIZE; - tmsize_t oldSize; - memcpy(&oldSize, oldPtr, sizeof(oldSize)); - assert(oldSize <= tif->tif_cur_cumulated_mem_alloc); - tif->tif_cur_cumulated_mem_alloc -= oldSize; - p = oldPtr; - } - _TIFFfree(p); -} - -TIFF *TIFFClientOpen(const char *name, const char *mode, thandle_t clientdata, - TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, - TIFFSeekProc seekproc, TIFFCloseProc closeproc, - TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, - TIFFUnmapFileProc unmapproc) -{ - return TIFFClientOpenExt(name, mode, clientdata, readproc, writeproc, - seekproc, closeproc, sizeproc, mapproc, unmapproc, - NULL); -} - -TIFF *TIFFClientOpenExt(const char *name, const char *mode, - thandle_t clientdata, TIFFReadWriteProc readproc, - TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, - TIFFCloseProc closeproc, TIFFSizeProc sizeproc, - TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, - TIFFOpenOptions *opts) -{ - static const char module[] = "TIFFClientOpenExt"; - TIFF *tif; - int m; - const char *cp; - - /* The following are configuration checks. They should be redundant, but - * should not compile to any actual code in an optimised release build - * anyway. If any of them fail, (makefile-based or other) configuration is - * not correct */ - assert(sizeof(uint8_t) == 1); - assert(sizeof(int8_t) == 1); - assert(sizeof(uint16_t) == 2); - assert(sizeof(int16_t) == 2); - assert(sizeof(uint32_t) == 4); - assert(sizeof(int32_t) == 4); - assert(sizeof(uint64_t) == 8); - assert(sizeof(int64_t) == 8); - { - union - { - uint8_t a8[2]; - uint16_t a16; - } n; - n.a8[0] = 1; - n.a8[1] = 0; - (void)n; -#ifdef WORDS_BIGENDIAN - assert(n.a16 == 256); -#else - assert(n.a16 == 1); -#endif - } - - m = _TIFFgetMode(opts, clientdata, mode, module); - if (m == -1) - goto bad2; - tmsize_t size_to_alloc = (tmsize_t)(sizeof(TIFF) + strlen(name) + 1); - if (opts && opts->max_single_mem_alloc > 0 && - size_to_alloc > opts->max_single_mem_alloc) - { - _TIFFErrorEarly(opts, clientdata, module, - "%s: Memory allocation of %" PRIu64 - " bytes is beyond the %" PRIu64 - " byte limit defined in open options", - name, (uint64_t)size_to_alloc, - (uint64_t)opts->max_single_mem_alloc); - goto bad2; - } - if (opts && opts->max_cumulated_mem_alloc > 0 && - size_to_alloc > opts->max_cumulated_mem_alloc) - { - _TIFFErrorEarly(opts, clientdata, module, - "%s: Memory allocation of %" PRIu64 - " bytes is beyond the %" PRIu64 - " cumulated byte limit defined in open options", - name, (uint64_t)size_to_alloc, - (uint64_t)opts->max_cumulated_mem_alloc); - goto bad2; - } - tif = (TIFF *)_TIFFmallocExt(NULL, size_to_alloc); - if (tif == NULL) - { - _TIFFErrorEarly(opts, clientdata, module, - "%s: Out of memory (TIFF structure)", name); - goto bad2; - } - _TIFFmemset(tif, 0, sizeof(*tif)); - tif->tif_name = (char *)tif + sizeof(TIFF); - strcpy(tif->tif_name, name); - tif->tif_mode = m & ~(O_CREAT | O_TRUNC); - tif->tif_curdir = TIFF_NON_EXISTENT_DIR_NUMBER; /* non-existent directory */ - tif->tif_curdircount = TIFF_NON_EXISTENT_DIR_NUMBER; - tif->tif_curoff = 0; - tif->tif_curstrip = (uint32_t)-1; /* invalid strip */ - tif->tif_row = (uint32_t)-1; /* read/write pre-increment */ - tif->tif_clientdata = clientdata; - tif->tif_readproc = readproc; - tif->tif_writeproc = writeproc; - tif->tif_seekproc = seekproc; - tif->tif_closeproc = closeproc; - tif->tif_sizeproc = sizeproc; - tif->tif_mapproc = mapproc ? mapproc : _tiffDummyMapProc; - tif->tif_unmapproc = unmapproc ? unmapproc : _tiffDummyUnmapProc; - if (opts) - { - tif->tif_errorhandler = opts->errorhandler; - tif->tif_errorhandler_user_data = opts->errorhandler_user_data; - tif->tif_warnhandler = opts->warnhandler; - tif->tif_warnhandler_user_data = opts->warnhandler_user_data; - tif->tif_max_single_mem_alloc = opts->max_single_mem_alloc; - tif->tif_max_cumulated_mem_alloc = opts->max_cumulated_mem_alloc; - tif->tif_warn_about_unknown_tags = opts->warn_about_unknown_tags; - } - - if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) - { - TIFFErrorExtR(tif, module, - "One of the client procedures is NULL pointer."); - _TIFFfreeExt(NULL, tif); - goto bad2; - } - - _TIFFSetDefaultCompressionState(tif); /* setup default state */ - /* - * Default is to return data MSB2LSB and enable the - * use of memory-mapped files and strip chopping when - * a file is opened read-only. - */ - tif->tif_flags = FILLORDER_MSB2LSB; - if (m == O_RDONLY) - tif->tif_flags |= TIFF_MAPPED; - -#ifdef STRIPCHOP_DEFAULT - if (m == O_RDONLY || m == O_RDWR) - tif->tif_flags |= STRIPCHOP_DEFAULT; -#endif - - /* - * Process library-specific flags in the open mode string. - * The following flags may be used to control intrinsic library - * behavior that may or may not be desirable (usually for - * compatibility with some application that claims to support - * TIFF but only supports some brain dead idea of what the - * vendor thinks TIFF is): - * - * 'l' use little-endian byte order for creating a file - * 'b' use big-endian byte order for creating a file - * 'L' read/write information using LSB2MSB bit order - * 'B' read/write information using MSB2LSB bit order - * 'H' read/write information using host bit order - * 'M' enable use of memory-mapped files when supported - * 'm' disable use of memory-mapped files - * 'C' enable strip chopping support when reading - * 'c' disable strip chopping support - * 'h' read TIFF header only, do not load the first IFD - * '4' ClassicTIFF for creating a file (default) - * '8' BigTIFF for creating a file - * 'D' enable use of deferred strip/tile offset/bytecount array loading. - * 'O' on-demand loading of values instead of whole array loading (implies - * D) - * - * The use of the 'l' and 'b' flags is strongly discouraged. - * These flags are provided solely because numerous vendors, - * typically on the PC, do not correctly support TIFF; they - * only support the Intel little-endian byte order. This - * support is not configured by default because it supports - * the violation of the TIFF spec that says that readers *MUST* - * support both byte orders. It is strongly recommended that - * you not use this feature except to deal with busted apps - * that write invalid TIFF. And even in those cases you should - * bang on the vendors to fix their software. - * - * The 'L', 'B', and 'H' flags are intended for applications - * that can optimize operations on data by using a particular - * bit order. By default the library returns data in MSB2LSB - * bit order for compatibility with older versions of this - * library. Returning data in the bit order of the native CPU - * makes the most sense but also requires applications to check - * the value of the FillOrder tag; something they probably do - * not do right now. - * - * The 'M' and 'm' flags are provided because some virtual memory - * systems exhibit poor behavior when large images are mapped. - * These options permit clients to control the use of memory-mapped - * files on a per-file basis. - * - * The 'C' and 'c' flags are provided because the library support - * for chopping up large strips into multiple smaller strips is not - * application-transparent and as such can cause problems. The 'c' - * option permits applications that only want to look at the tags, - * for example, to get the unadulterated TIFF tag information. - */ - for (cp = mode; *cp; cp++) - switch (*cp) - { - case 'b': -#ifndef WORDS_BIGENDIAN - if (m & O_CREAT) - tif->tif_flags |= TIFF_SWAB; -#endif - break; - case 'l': -#ifdef WORDS_BIGENDIAN - if ((m & O_CREAT)) - tif->tif_flags |= TIFF_SWAB; -#endif - break; - case 'B': - tif->tif_flags = - (tif->tif_flags & ~TIFF_FILLORDER) | FILLORDER_MSB2LSB; - break; - case 'L': - tif->tif_flags = - (tif->tif_flags & ~TIFF_FILLORDER) | FILLORDER_LSB2MSB; - break; - case 'H': - TIFFWarningExtR(tif, name, - "H(ost) mode is deprecated. Since " - "libtiff 4.5.1, it is an alias of 'B' / " - "FILLORDER_MSB2LSB."); - tif->tif_flags = - (tif->tif_flags & ~TIFF_FILLORDER) | FILLORDER_MSB2LSB; - break; - case 'M': - if (m == O_RDONLY) - tif->tif_flags |= TIFF_MAPPED; - break; - case 'm': - if (m == O_RDONLY) - tif->tif_flags &= ~TIFF_MAPPED; - break; - case 'C': - if (m == O_RDONLY) - tif->tif_flags |= TIFF_STRIPCHOP; - break; - case 'c': - if (m == O_RDONLY) - tif->tif_flags &= ~TIFF_STRIPCHOP; - break; - case 'h': - tif->tif_flags |= TIFF_HEADERONLY; - break; - case '8': - if (m & O_CREAT) - tif->tif_flags |= TIFF_BIGTIFF; - break; - case 'D': - tif->tif_flags |= TIFF_DEFERSTRILELOAD; - break; - case 'O': - if (m == O_RDONLY) - tif->tif_flags |= - (TIFF_LAZYSTRILELOAD | TIFF_DEFERSTRILELOAD); - break; - } - -#ifdef DEFER_STRILE_LOAD - /* Compatibility with old DEFER_STRILE_LOAD compilation flag */ - /* Probably unneeded, since to the best of my knowledge (E. Rouault) */ - /* GDAL was the only user of this, and will now use the new 'D' flag */ - tif->tif_flags |= TIFF_DEFERSTRILELOAD; -#endif - - /* - * Read in TIFF header. - */ - if ((m & O_TRUNC) || - !ReadOK(tif, &tif->tif_header, sizeof(TIFFHeaderClassic))) - { - if (tif->tif_mode == O_RDONLY) - { - TIFFErrorExtR(tif, name, "Cannot read TIFF header"); - goto bad; - } - /* - * Setup header and write. - */ -#ifdef WORDS_BIGENDIAN - tif->tif_header.common.tiff_magic = - (tif->tif_flags & TIFF_SWAB) ? TIFF_LITTLEENDIAN : TIFF_BIGENDIAN; -#else - tif->tif_header.common.tiff_magic = - (tif->tif_flags & TIFF_SWAB) ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN; -#endif - TIFFHeaderUnion tif_header_swapped; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - { - tif->tif_header.common.tiff_version = TIFF_VERSION_CLASSIC; - tif->tif_header.classic.tiff_diroff = 0; - tif->tif_header_size = sizeof(TIFFHeaderClassic); - /* Swapped copy for writing */ - _TIFFmemcpy(&tif_header_swapped, &tif->tif_header, - sizeof(TIFFHeaderUnion)); - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&tif_header_swapped.common.tiff_version); - } - else - { - tif->tif_header.common.tiff_version = TIFF_VERSION_BIG; - tif->tif_header.big.tiff_offsetsize = 8; - tif->tif_header.big.tiff_unused = 0; - tif->tif_header.big.tiff_diroff = 0; - tif->tif_header_size = sizeof(TIFFHeaderBig); - /* Swapped copy for writing */ - _TIFFmemcpy(&tif_header_swapped, &tif->tif_header, - sizeof(TIFFHeaderUnion)); - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabShort(&tif_header_swapped.common.tiff_version); - TIFFSwabShort(&tif_header_swapped.big.tiff_offsetsize); - } - } - /* - * The doc for "fopen" for some STD_C_LIBs says that if you - * open a file for modify ("+"), then you must fseek (or - * fflush?) between any freads and fwrites. This is not - * necessary on most systems, but has been shown to be needed - * on Solaris. - */ - TIFFSeekFile(tif, 0, SEEK_SET); - if (!WriteOK(tif, &tif_header_swapped, - (tmsize_t)(tif->tif_header_size))) - { - TIFFErrorExtR(tif, name, "Error writing TIFF header"); - goto bad; - } - /* - * Setup default directory. - */ - if (!TIFFDefaultDirectory(tif)) - goto bad; - tif->tif_diroff = 0; - tif->tif_lastdiroff = 0; - tif->tif_setdirectory_force_absolute = FALSE; - /* tif_curdircount = 0 means 'empty file opened for writing, but no IFD - * written yet' */ - tif->tif_curdircount = 0; - return (tif); - } - - /* - * Setup the byte order handling according to the opened file for reading. - */ - if (tif->tif_header.common.tiff_magic != TIFF_BIGENDIAN && - tif->tif_header.common.tiff_magic != TIFF_LITTLEENDIAN -#if MDI_SUPPORT - && -#if HOST_BIGENDIAN - tif->tif_header.common.tiff_magic != MDI_BIGENDIAN -#else - tif->tif_header.common.tiff_magic != MDI_LITTLEENDIAN -#endif - ) - { - TIFFErrorExtR(tif, name, - "Not a TIFF or MDI file, bad magic number %" PRIu16 - " (0x%" PRIx16 ")", -#else - ) - { - TIFFErrorExtR(tif, name, - "Not a TIFF file, bad magic number %" PRIu16 - " (0x%" PRIx16 ")", -#endif - tif->tif_header.common.tiff_magic, - tif->tif_header.common.tiff_magic); - goto bad; - } - if (tif->tif_header.common.tiff_magic == TIFF_BIGENDIAN) - { -#ifndef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; -#endif - } - else - { -#ifdef WORDS_BIGENDIAN - tif->tif_flags |= TIFF_SWAB; -#endif - } - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabShort(&tif->tif_header.common.tiff_version); - if ((tif->tif_header.common.tiff_version != TIFF_VERSION_CLASSIC) && - (tif->tif_header.common.tiff_version != TIFF_VERSION_BIG)) - { - TIFFErrorExtR(tif, name, - "Not a TIFF file, bad version number %" PRIu16 - " (0x%" PRIx16 ")", - tif->tif_header.common.tiff_version, - tif->tif_header.common.tiff_version); - goto bad; - } - if (tif->tif_header.common.tiff_version == TIFF_VERSION_CLASSIC) - { - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabLong(&tif->tif_header.classic.tiff_diroff); - tif->tif_header_size = sizeof(TIFFHeaderClassic); - } - else - { - if (!ReadOK(tif, - ((uint8_t *)(&tif->tif_header) + sizeof(TIFFHeaderClassic)), - (sizeof(TIFFHeaderBig) - sizeof(TIFFHeaderClassic)))) - { - TIFFErrorExtR(tif, name, "Cannot read TIFF header"); - goto bad; - } - if (tif->tif_flags & TIFF_SWAB) - { - TIFFSwabShort(&tif->tif_header.big.tiff_offsetsize); - TIFFSwabLong8(&tif->tif_header.big.tiff_diroff); - } - if (tif->tif_header.big.tiff_offsetsize != 8) - { - TIFFErrorExtR(tif, name, - "Not a TIFF file, bad BigTIFF offsetsize %" PRIu16 - " (0x%" PRIx16 ")", - tif->tif_header.big.tiff_offsetsize, - tif->tif_header.big.tiff_offsetsize); - goto bad; - } - if (tif->tif_header.big.tiff_unused != 0) - { - TIFFErrorExtR(tif, name, - "Not a TIFF file, bad BigTIFF unused %" PRIu16 - " (0x%" PRIx16 ")", - tif->tif_header.big.tiff_unused, - tif->tif_header.big.tiff_unused); - goto bad; - } - tif->tif_header_size = sizeof(TIFFHeaderBig); - tif->tif_flags |= TIFF_BIGTIFF; - } - tif->tif_flags |= TIFF_MYBUFFER; - tif->tif_rawcp = tif->tif_rawdata = 0; - tif->tif_rawdatasize = 0; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - - switch (mode[0]) - { - case 'r': - if (!(tif->tif_flags & TIFF_BIGTIFF)) - tif->tif_nextdiroff = tif->tif_header.classic.tiff_diroff; - else - tif->tif_nextdiroff = tif->tif_header.big.tiff_diroff; - /* - * Try to use a memory-mapped file if the client - * has not explicitly suppressed usage with the - * 'm' flag in the open mode (see above). - */ - if (tif->tif_flags & TIFF_MAPPED) - { - toff_t n; - if (TIFFMapFileContents(tif, (void **)(&tif->tif_base), &n)) - { - tif->tif_size = (tmsize_t)n; - assert((toff_t)tif->tif_size == n); - } - else - tif->tif_flags &= ~TIFF_MAPPED; - } - /* - * Sometimes we do not want to read the first directory (for - * example, it may be broken) and want to proceed to other - * directories. I this case we use the TIFF_HEADERONLY flag to open - * file and return immediately after reading TIFF header. - * However, the pointer to TIFFSetField() and TIFFGetField() - * (i.e. tif->tif_tagmethods.vsetfield and - * tif->tif_tagmethods.vgetfield) need to be initialized, which is - * done in TIFFDefaultDirectory(). - */ - if (tif->tif_flags & TIFF_HEADERONLY) - { - if (!TIFFDefaultDirectory(tif)) - goto bad; - return (tif); - } - - /* - * Setup initial directory. - */ - if (TIFFReadDirectory(tif)) - { - return (tif); - } - break; - case 'a': - /* - * New directories are automatically append - * to the end of the directory chain when they - * are written out (see TIFFWriteDirectory). - */ - if (!TIFFDefaultDirectory(tif)) - goto bad; - return (tif); - } -bad: - tif->tif_mode = O_RDONLY; /* XXX avoid flush */ - TIFFCleanup(tif); -bad2: - return ((TIFF *)0); -} - -/* - * Query functions to access private data. - */ - -/* - * Return open file's name. - */ -const char *TIFFFileName(TIFF *tif) { return (tif->tif_name); } - -/* - * Set the file name. - */ -const char *TIFFSetFileName(TIFF *tif, const char *name) -{ - const char *old_name = tif->tif_name; - tif->tif_name = (char *)name; - return (old_name); -} - -/* - * Return open file's I/O descriptor. - */ -int TIFFFileno(TIFF *tif) { return (tif->tif_fd); } - -/* - * Set open file's I/O descriptor, and return previous value. - */ -int TIFFSetFileno(TIFF *tif, int fd) -{ - int old_fd = tif->tif_fd; - tif->tif_fd = fd; - return old_fd; -} - -/* - * Return open file's clientdata. - */ -thandle_t TIFFClientdata(TIFF *tif) { return (tif->tif_clientdata); } - -/* - * Set open file's clientdata, and return previous value. - */ -thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue) -{ - thandle_t m = tif->tif_clientdata; - tif->tif_clientdata = newvalue; - return m; -} - -/* - * Return read/write mode. - */ -int TIFFGetMode(TIFF *tif) { return (tif->tif_mode); } - -/* - * Return read/write mode. - */ -int TIFFSetMode(TIFF *tif, int mode) -{ - int old_mode = tif->tif_mode; - tif->tif_mode = mode; - return (old_mode); -} - -/* - * Return nonzero if file is organized in - * tiles; zero if organized as strips. - */ -int TIFFIsTiled(TIFF *tif) { return (isTiled(tif)); } - -/* - * Return current row being read/written. - */ -uint32_t TIFFCurrentRow(TIFF *tif) { return (tif->tif_row); } - -/* - * Return index of the current directory. - */ -tdir_t TIFFCurrentDirectory(TIFF *tif) { return (tif->tif_curdir); } - -/* - * Return current strip. - */ -uint32_t TIFFCurrentStrip(TIFF *tif) { return (tif->tif_curstrip); } - -/* - * Return current tile. - */ -uint32_t TIFFCurrentTile(TIFF *tif) { return (tif->tif_curtile); } - -/* - * Return nonzero if the file has byte-swapped data. - */ -int TIFFIsByteSwapped(TIFF *tif) { return ((tif->tif_flags & TIFF_SWAB) != 0); } - -/* - * Return nonzero if the data is returned up-sampled. - */ -int TIFFIsUpSampled(TIFF *tif) { return (isUpSampled(tif)); } - -/* - * Return nonzero if the data is returned in MSB-to-LSB bit order. - */ -int TIFFIsMSB2LSB(TIFF *tif) { return (isFillOrder(tif, FILLORDER_MSB2LSB)); } - -/* - * Return nonzero if given file was written in big-endian order. - */ -int TIFFIsBigEndian(TIFF *tif) -{ - return (tif->tif_header.common.tiff_magic == TIFF_BIGENDIAN); -} - -/* - * Return nonzero if given file is BigTIFF style. - */ -int TIFFIsBigTIFF(TIFF *tif) { return ((tif->tif_flags & TIFF_BIGTIFF) != 0); } - -/* - * Return pointer to file read method. - */ -TIFFReadWriteProc TIFFGetReadProc(TIFF *tif) { return (tif->tif_readproc); } - -/* - * Return pointer to file write method. - */ -TIFFReadWriteProc TIFFGetWriteProc(TIFF *tif) { return (tif->tif_writeproc); } - -/* - * Return pointer to file seek method. - */ -TIFFSeekProc TIFFGetSeekProc(TIFF *tif) { return (tif->tif_seekproc); } - -/* - * Return pointer to file close method. - */ -TIFFCloseProc TIFFGetCloseProc(TIFF *tif) { return (tif->tif_closeproc); } - -/* - * Return pointer to file size requesting method. - */ -TIFFSizeProc TIFFGetSizeProc(TIFF *tif) { return (tif->tif_sizeproc); } - -/* - * Return pointer to memory mapping method. - */ -TIFFMapFileProc TIFFGetMapFileProc(TIFF *tif) { return (tif->tif_mapproc); } - -/* - * Return pointer to memory unmapping method. - */ -TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *tif) -{ - return (tif->tif_unmapproc); -} diff --git a/third_party/libtiff/libtiff/tif_packbits.c b/third_party/libtiff/libtiff/tif_packbits.c deleted file mode 100644 index d7db9b6..0000000 --- a/third_party/libtiff/libtiff/tif_packbits.c +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef PACKBITS_SUPPORT -/* - * TIFF Library. - * - * PackBits Compression Algorithm Support - */ -#include - -#ifndef PACKBITS_READ_ONLY - -static int PackBitsPreEncode(TIFF *tif, uint16_t s) -{ - (void)s; - - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(tmsize_t)); - if (tif->tif_data == NULL) - return (0); - /* - * Calculate the scanline/tile-width size in bytes. - */ - if (isTiled(tif)) - *(tmsize_t *)tif->tif_data = TIFFTileRowSize(tif); - else - *(tmsize_t *)tif->tif_data = TIFFScanlineSize(tif); - return (1); -} - -static int PackBitsPostEncode(TIFF *tif) -{ - if (tif->tif_data) - _TIFFfreeExt(tif, tif->tif_data); - return (1); -} - -/* - * Encode a run of pixels. - */ -static int PackBitsEncode(TIFF *tif, uint8_t *buf, tmsize_t cc, uint16_t s) -{ - unsigned char *bp = (unsigned char *)buf; - uint8_t *op; - uint8_t *ep; - uint8_t *lastliteral; - long n, slop; - int b; - enum - { - BASE, - LITERAL, - RUN, - LITERAL_RUN - } state; - - (void)s; - op = tif->tif_rawcp; - ep = tif->tif_rawdata + tif->tif_rawdatasize; - state = BASE; - lastliteral = NULL; - while (cc > 0) - { - /* - * Find the longest string of identical bytes. - */ - b = *bp++; - cc--; - n = 1; - for (; cc > 0 && b == *bp; cc--, bp++) - n++; - again: - if (op + 2 >= ep) - { /* insure space for new data */ - /* - * Be careful about writing the last - * literal. Must write up to that point - * and then copy the remainder to the - * front of the buffer. - */ - if (state == LITERAL || state == LITERAL_RUN) - { - slop = (long)(op - lastliteral); - tif->tif_rawcc += (tmsize_t)(lastliteral - tif->tif_rawcp); - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - while (slop-- > 0) - *op++ = *lastliteral++; - lastliteral = tif->tif_rawcp; - } - else - { - tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); - if (!TIFFFlushData1(tif)) - return (0); - op = tif->tif_rawcp; - } - } - switch (state) - { - case BASE: /* initial state, set run/literal */ - if (n > 1) - { - state = RUN; - if (n > 128) - { - *op++ = (uint8_t)-127; - *op++ = (uint8_t)b; - n -= 128; - goto again; - } - *op++ = (uint8_t)(-(n - 1)); - *op++ = (uint8_t)b; - } - else - { - lastliteral = op; - *op++ = 0; - *op++ = (uint8_t)b; - state = LITERAL; - } - break; - case LITERAL: /* last object was literal string */ - if (n > 1) - { - state = LITERAL_RUN; - if (n > 128) - { - *op++ = (uint8_t)-127; - *op++ = (uint8_t)b; - n -= 128; - goto again; - } - *op++ = (uint8_t)(-(n - 1)); /* encode run */ - *op++ = (uint8_t)b; - } - else - { /* extend literal */ - if (++(*lastliteral) == 127) - state = BASE; - *op++ = (uint8_t)b; - } - break; - case RUN: /* last object was run */ - if (n > 1) - { - if (n > 128) - { - *op++ = (uint8_t)-127; - *op++ = (uint8_t)b; - n -= 128; - goto again; - } - *op++ = (uint8_t)(-(n - 1)); - *op++ = (uint8_t)b; - } - else - { - lastliteral = op; - *op++ = 0; - *op++ = (uint8_t)b; - state = LITERAL; - } - break; - case LITERAL_RUN: /* literal followed by a run */ - /* - * Check to see if previous run should - * be converted to a literal, in which - * case we convert literal-run-literal - * to a single literal. - */ - if (n == 1 && op[-2] == (uint8_t)-1 && *lastliteral < 126) - { - state = (((*lastliteral) += 2) == 127 ? BASE : LITERAL); - op[-2] = op[-1]; /* replicate */ - } - else - state = RUN; - goto again; - } - } - tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); - tif->tif_rawcp = op; - return (1); -} - -/* - * Encode a rectangular chunk of pixels. We break it up - * into row-sized pieces to insure that encoded runs do - * not span rows. Otherwise, there can be problems with - * the decoder if data is read, for example, by scanlines - * when it was encoded by strips. - */ -static int PackBitsEncodeChunk(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - tmsize_t rowsize = *(tmsize_t *)tif->tif_data; - - while (cc > 0) - { - tmsize_t chunk = rowsize; - - if (cc < chunk) - chunk = cc; - - if (PackBitsEncode(tif, bp, chunk, s) < 0) - return (-1); - bp += chunk; - cc -= chunk; - } - return (1); -} - -#endif - -static int PackBitsDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "PackBitsDecode"; - int8_t *bp; - tmsize_t cc; - long n; - int b; - - (void)s; - bp = (int8_t *)tif->tif_rawcp; - cc = tif->tif_rawcc; - while (cc > 0 && occ > 0) - { - n = (long)*bp++; - cc--; - if (n < 0) - { /* replicate next byte -n+1 times */ - if (n == -128) /* nop */ - continue; - n = -n + 1; - if (occ < (tmsize_t)n) - { - TIFFWarningExtR(tif, module, - "Discarding %" TIFF_SSIZE_FORMAT - " bytes to avoid buffer overrun", - (tmsize_t)n - occ); - n = (long)occ; - } - if (cc == 0) - { - TIFFWarningExtR( - tif, module, - "Terminating PackBitsDecode due to lack of data."); - break; - } - occ -= n; - b = *bp++; - cc--; - while (n-- > 0) - *op++ = (uint8_t)b; - } - else - { /* copy next n+1 bytes literally */ - if (occ < (tmsize_t)(n + 1)) - { - TIFFWarningExtR(tif, module, - "Discarding %" TIFF_SSIZE_FORMAT - " bytes to avoid buffer overrun", - (tmsize_t)n - occ + 1); - n = (long)occ - 1; - } - if (cc < (tmsize_t)(n + 1)) - { - TIFFWarningExtR( - tif, module, - "Terminating PackBitsDecode due to lack of data."); - break; - } - _TIFFmemcpy(op, bp, ++n); - op += n; - occ -= n; - bp += n; - cc -= n; - } - } - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - if (occ > 0) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "Not enough data for scanline %" PRIu32, - tif->tif_row); - return (0); - } - return (1); -} - -int TIFFInitPackBits(TIFF *tif, int scheme) -{ - (void)scheme; - tif->tif_decoderow = PackBitsDecode; - tif->tif_decodestrip = PackBitsDecode; - tif->tif_decodetile = PackBitsDecode; -#ifndef PACKBITS_READ_ONLY - tif->tif_preencode = PackBitsPreEncode; - tif->tif_postencode = PackBitsPostEncode; - tif->tif_encoderow = PackBitsEncode; - tif->tif_encodestrip = PackBitsEncodeChunk; - tif->tif_encodetile = PackBitsEncodeChunk; -#endif - return (1); -} -#endif /* PACKBITS_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_pixarlog.c b/third_party/libtiff/libtiff/tif_pixarlog.c deleted file mode 100644 index 3090548..0000000 --- a/third_party/libtiff/libtiff/tif_pixarlog.c +++ /dev/null @@ -1,1677 +0,0 @@ -/* - * Copyright (c) 1996-1997 Sam Leffler - * Copyright (c) 1996 Pixar - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Pixar, Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef PIXARLOG_SUPPORT - -/* - * TIFF Library. - * PixarLog Compression Support - * - * Contributed by Dan McCoy. - * - * PixarLog film support uses the TIFF library to store companded - * 11 bit values into a tiff file, which are compressed using the - * zip compressor. - * - * The codec can take as input and produce as output 32-bit IEEE float values - * as well as 16-bit or 8-bit unsigned integer values. - * - * On writing any of the above are converted into the internal - * 11-bit log format. In the case of 8 and 16 bit values, the - * input is assumed to be unsigned linear color values that represent - * the range 0-1. In the case of IEEE values, the 0-1 range is assumed to - * be the normal linear color range, in addition over 1 values are - * accepted up to a value of about 25.0 to encode "hot" highlights and such. - * The encoding is lossless for 8-bit values, slightly lossy for the - * other bit depths. The actual color precision should be better - * than the human eye can perceive with extra room to allow for - * error introduced by further image computation. As with any quantized - * color format, it is possible to perform image calculations which - * expose the quantization error. This format should certainly be less - * susceptible to such errors than standard 8-bit encodings, but more - * susceptible than straight 16-bit or 32-bit encodings. - * - * On reading the internal format is converted to the desired output format. - * The program can request which format it desires by setting the internal - * pseudo tag TIFFTAG_PIXARLOGDATAFMT to one of these possible values: - * PIXARLOGDATAFMT_FLOAT = provide IEEE float values. - * PIXARLOGDATAFMT_16BIT = provide unsigned 16-bit integer values - * PIXARLOGDATAFMT_8BIT = provide unsigned 8-bit integer values - * - * alternately PIXARLOGDATAFMT_8BITABGR provides unsigned 8-bit integer - * values with the difference that if there are exactly three or four channels - * (rgb or rgba) it swaps the channel order (bgr or abgr). - * - * PIXARLOGDATAFMT_11BITLOG provides the internal encoding directly - * packed in 16-bit values. However no tools are supplied for interpreting - * these values. - * - * "hot" (over 1.0) areas written in floating point get clamped to - * 1.0 in the integer data types. - * - * When the file is closed after writing, the bit depth and sample format - * are set always to appear as if 8-bit data has been written into it. - * That way a naive program unaware of the particulars of the encoding - * gets the format it is most likely able to handle. - * - * The codec does it's own horizontal differencing step on the coded - * values so the libraries predictor stuff should be turned off. - * The codec also handle byte swapping the encoded values as necessary - * since the library does not have the information necessary - * to know the bit depth of the raw unencoded buffer. - * - * NOTE: This decoder does not appear to update tif_rawcp, and tif_rawcc. - * This can cause problems with the implementation of CHUNKY_STRIP_READ_SUPPORT - * as noted in http://trac.osgeo.org/gdal/ticket/3894. FrankW - Jan'11 - */ - -#include "tif_predict.h" -#include "zlib.h" - -#include -#include -#include - -/* Tables for converting to/from 11 bit coded values */ - -#define TSIZE 2048 /* decode table size (11-bit tokens) */ -#define TSIZEP1 2049 /* Plus one for slop */ -#define ONE 1250 /* token value of 1.0 exactly */ -#define RATIO 1.004 /* nominal ratio for log part */ - -#define CODE_MASK 0x7ff /* 11 bits. */ - -static float Fltsize; -static float LogK1, LogK2; - -#define REPEAT(n, op) \ - { \ - int i; \ - i = n; \ - do \ - { \ - i--; \ - op; \ - } while (i > 0); \ - } - -static void horizontalAccumulateF(uint16_t *wp, int n, int stride, float *op, - float *ToLinearF) -{ - register unsigned int cr, cg, cb, ca, mask; - register float t0, t1, t2, t3; - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - t0 = ToLinearF[cr = (wp[0] & mask)]; - t1 = ToLinearF[cg = (wp[1] & mask)]; - t2 = ToLinearF[cb = (wp[2] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - n -= 3; - while (n > 0) - { - wp += 3; - op += 3; - n -= 3; - t0 = ToLinearF[(cr += wp[0]) & mask]; - t1 = ToLinearF[(cg += wp[1]) & mask]; - t2 = ToLinearF[(cb += wp[2]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - } - } - else if (stride == 4) - { - t0 = ToLinearF[cr = (wp[0] & mask)]; - t1 = ToLinearF[cg = (wp[1] & mask)]; - t2 = ToLinearF[cb = (wp[2] & mask)]; - t3 = ToLinearF[ca = (wp[3] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 4; - while (n > 0) - { - wp += 4; - op += 4; - n -= 4; - t0 = ToLinearF[(cr += wp[0]) & mask]; - t1 = ToLinearF[(cg += wp[1]) & mask]; - t2 = ToLinearF[(cb += wp[2]) & mask]; - t3 = ToLinearF[(ca += wp[3]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } - else - { - REPEAT(stride, *op = ToLinearF[*wp & mask]; wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; *op = ToLinearF[*wp & mask]; - wp++; op++) - n -= stride; - } - } - } -} - -static void horizontalAccumulate12(uint16_t *wp, int n, int stride, int16_t *op, - float *ToLinearF) -{ - register unsigned int cr, cg, cb, ca, mask; - register float t0, t1, t2, t3; - -#define SCALE12 2048.0F -#define CLAMP12(t) (((t) < 3071) ? (uint16_t)(t) : 3071) - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12; - t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12; - t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - n -= 3; - while (n > 0) - { - wp += 3; - op += 3; - n -= 3; - t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12; - t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12; - t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - } - } - else if (stride == 4) - { - t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12; - t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12; - t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12; - t3 = ToLinearF[ca = (wp[3] & mask)] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - op[3] = CLAMP12(t3); - n -= 4; - while (n > 0) - { - wp += 4; - op += 4; - n -= 4; - t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12; - t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12; - t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12; - t3 = ToLinearF[(ca += wp[3]) & mask] * SCALE12; - op[0] = CLAMP12(t0); - op[1] = CLAMP12(t1); - op[2] = CLAMP12(t2); - op[3] = CLAMP12(t3); - } - } - else - { - REPEAT(stride, t0 = ToLinearF[*wp & mask] * SCALE12; - *op = CLAMP12(t0); wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; - t0 = ToLinearF[wp[stride] & mask] * SCALE12; - *op = CLAMP12(t0); wp++; op++) - n -= stride; - } - } - } -} - -static void horizontalAccumulate16(uint16_t *wp, int n, int stride, - uint16_t *op, uint16_t *ToLinear16) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - op[0] = ToLinear16[cr = (wp[0] & mask)]; - op[1] = ToLinear16[cg = (wp[1] & mask)]; - op[2] = ToLinear16[cb = (wp[2] & mask)]; - n -= 3; - while (n > 0) - { - wp += 3; - op += 3; - n -= 3; - op[0] = ToLinear16[(cr += wp[0]) & mask]; - op[1] = ToLinear16[(cg += wp[1]) & mask]; - op[2] = ToLinear16[(cb += wp[2]) & mask]; - } - } - else if (stride == 4) - { - op[0] = ToLinear16[cr = (wp[0] & mask)]; - op[1] = ToLinear16[cg = (wp[1] & mask)]; - op[2] = ToLinear16[cb = (wp[2] & mask)]; - op[3] = ToLinear16[ca = (wp[3] & mask)]; - n -= 4; - while (n > 0) - { - wp += 4; - op += 4; - n -= 4; - op[0] = ToLinear16[(cr += wp[0]) & mask]; - op[1] = ToLinear16[(cg += wp[1]) & mask]; - op[2] = ToLinear16[(cb += wp[2]) & mask]; - op[3] = ToLinear16[(ca += wp[3]) & mask]; - } - } - else - { - REPEAT(stride, *op = ToLinear16[*wp & mask]; wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; *op = ToLinear16[*wp & mask]; - wp++; op++) - n -= stride; - } - } - } -} - -/* - * Returns the log encoded 11-bit values with the horizontal - * differencing undone. - */ -static void horizontalAccumulate11(uint16_t *wp, int n, int stride, - uint16_t *op) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - op[0] = wp[0]; - op[1] = wp[1]; - op[2] = wp[2]; - cr = wp[0]; - cg = wp[1]; - cb = wp[2]; - n -= 3; - while (n > 0) - { - wp += 3; - op += 3; - n -= 3; - op[0] = (uint16_t)((cr += wp[0]) & mask); - op[1] = (uint16_t)((cg += wp[1]) & mask); - op[2] = (uint16_t)((cb += wp[2]) & mask); - } - } - else if (stride == 4) - { - op[0] = wp[0]; - op[1] = wp[1]; - op[2] = wp[2]; - op[3] = wp[3]; - cr = wp[0]; - cg = wp[1]; - cb = wp[2]; - ca = wp[3]; - n -= 4; - while (n > 0) - { - wp += 4; - op += 4; - n -= 4; - op[0] = (uint16_t)((cr += wp[0]) & mask); - op[1] = (uint16_t)((cg += wp[1]) & mask); - op[2] = (uint16_t)((cb += wp[2]) & mask); - op[3] = (uint16_t)((ca += wp[3]) & mask); - } - } - else - { - REPEAT(stride, *op = *wp & mask; wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; *op = *wp & mask; wp++; op++) - n -= stride; - } - } - } -} - -static void horizontalAccumulate8(uint16_t *wp, int n, int stride, - unsigned char *op, unsigned char *ToLinear8) -{ - register unsigned int cr, cg, cb, ca, mask; - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - op[0] = ToLinear8[cr = (wp[0] & mask)]; - op[1] = ToLinear8[cg = (wp[1] & mask)]; - op[2] = ToLinear8[cb = (wp[2] & mask)]; - n -= 3; - while (n > 0) - { - n -= 3; - wp += 3; - op += 3; - op[0] = ToLinear8[(cr += wp[0]) & mask]; - op[1] = ToLinear8[(cg += wp[1]) & mask]; - op[2] = ToLinear8[(cb += wp[2]) & mask]; - } - } - else if (stride == 4) - { - op[0] = ToLinear8[cr = (wp[0] & mask)]; - op[1] = ToLinear8[cg = (wp[1] & mask)]; - op[2] = ToLinear8[cb = (wp[2] & mask)]; - op[3] = ToLinear8[ca = (wp[3] & mask)]; - n -= 4; - while (n > 0) - { - n -= 4; - wp += 4; - op += 4; - op[0] = ToLinear8[(cr += wp[0]) & mask]; - op[1] = ToLinear8[(cg += wp[1]) & mask]; - op[2] = ToLinear8[(cb += wp[2]) & mask]; - op[3] = ToLinear8[(ca += wp[3]) & mask]; - } - } - else - { - REPEAT(stride, *op = ToLinear8[*wp & mask]; wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; *op = ToLinear8[*wp & mask]; - wp++; op++) - n -= stride; - } - } - } -} - -static void horizontalAccumulate8abgr(uint16_t *wp, int n, int stride, - unsigned char *op, - unsigned char *ToLinear8) -{ - register unsigned int cr, cg, cb, ca, mask; - register unsigned char t0, t1, t2, t3; - - if (n >= stride) - { - mask = CODE_MASK; - if (stride == 3) - { - op[0] = 0; - t1 = ToLinear8[cb = (wp[2] & mask)]; - t2 = ToLinear8[cg = (wp[1] & mask)]; - t3 = ToLinear8[cr = (wp[0] & mask)]; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 3; - while (n > 0) - { - n -= 3; - wp += 3; - op += 4; - op[0] = 0; - t1 = ToLinear8[(cb += wp[2]) & mask]; - t2 = ToLinear8[(cg += wp[1]) & mask]; - t3 = ToLinear8[(cr += wp[0]) & mask]; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } - else if (stride == 4) - { - t0 = ToLinear8[ca = (wp[3] & mask)]; - t1 = ToLinear8[cb = (wp[2] & mask)]; - t2 = ToLinear8[cg = (wp[1] & mask)]; - t3 = ToLinear8[cr = (wp[0] & mask)]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - n -= 4; - while (n > 0) - { - n -= 4; - wp += 4; - op += 4; - t0 = ToLinear8[(ca += wp[3]) & mask]; - t1 = ToLinear8[(cb += wp[2]) & mask]; - t2 = ToLinear8[(cg += wp[1]) & mask]; - t3 = ToLinear8[(cr += wp[0]) & mask]; - op[0] = t0; - op[1] = t1; - op[2] = t2; - op[3] = t3; - } - } - else - { - REPEAT(stride, *op = ToLinear8[*wp & mask]; wp++; op++) - n -= stride; - while (n > 0) - { - REPEAT(stride, wp[stride] += *wp; *op = ToLinear8[*wp & mask]; - wp++; op++) - n -= stride; - } - } - } -} - -/* - * State block for each open TIFF - * file using PixarLog compression/decompression. - */ -typedef struct -{ - TIFFPredictorState predict; - z_stream stream; - tmsize_t tbuf_size; /* only set/used on reading for now */ - uint16_t *tbuf; - uint16_t stride; - int state; - int user_datafmt; - int quality; -#define PLSTATE_INIT 1 - - TIFFVSetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - - float *ToLinearF; - uint16_t *ToLinear16; - unsigned char *ToLinear8; - uint16_t *FromLT2; - uint16_t *From14; /* Really for 16-bit data, but we shift down 2 */ - uint16_t *From8; - -} PixarLogState; - -static int PixarLogMakeTables(TIFF *tif, PixarLogState *sp) -{ - - /* - * We make several tables here to convert between various external - * representations (float, 16-bit, and 8-bit) and the internal - * 11-bit companded representation. The 11-bit representation has two - * distinct regions. A linear bottom end up through .018316 in steps - * of about .000073, and a region of constant ratio up to about 25. - * These floating point numbers are stored in the main table ToLinearF. - * All other tables are derived from this one. The tables (and the - * ratios) are continuous at the internal seam. - */ - - int nlin, lt2size; - int i, j; - double b, c, linstep, v; - float *ToLinearF; - uint16_t *ToLinear16; - unsigned char *ToLinear8; - uint16_t *FromLT2; - uint16_t *From14; /* Really for 16-bit data, but we shift down 2 */ - uint16_t *From8; - - c = log(RATIO); - nlin = (int)(1. / c); /* nlin must be an integer */ - c = 1. / nlin; - b = exp(-c * ONE); /* multiplicative scale factor [b*exp(c*ONE) = 1] */ - linstep = b * c * exp(1.); - - LogK1 = (float)(1. / c); /* if (v >= 2) token = k1*log(v*k2) */ - LogK2 = (float)(1. / b); - lt2size = (int)(2. / linstep) + 1; - FromLT2 = (uint16_t *)_TIFFmallocExt(tif, lt2size * sizeof(uint16_t)); - From14 = (uint16_t *)_TIFFmallocExt(tif, 16384 * sizeof(uint16_t)); - From8 = (uint16_t *)_TIFFmallocExt(tif, 256 * sizeof(uint16_t)); - ToLinearF = (float *)_TIFFmallocExt(tif, TSIZEP1 * sizeof(float)); - ToLinear16 = (uint16_t *)_TIFFmallocExt(tif, TSIZEP1 * sizeof(uint16_t)); - ToLinear8 = - (unsigned char *)_TIFFmallocExt(tif, TSIZEP1 * sizeof(unsigned char)); - if (FromLT2 == NULL || From14 == NULL || From8 == NULL || - ToLinearF == NULL || ToLinear16 == NULL || ToLinear8 == NULL) - { - if (FromLT2) - _TIFFfreeExt(tif, FromLT2); - if (From14) - _TIFFfreeExt(tif, From14); - if (From8) - _TIFFfreeExt(tif, From8); - if (ToLinearF) - _TIFFfreeExt(tif, ToLinearF); - if (ToLinear16) - _TIFFfreeExt(tif, ToLinear16); - if (ToLinear8) - _TIFFfreeExt(tif, ToLinear8); - sp->FromLT2 = NULL; - sp->From14 = NULL; - sp->From8 = NULL; - sp->ToLinearF = NULL; - sp->ToLinear16 = NULL; - sp->ToLinear8 = NULL; - return 0; - } - - j = 0; - - for (i = 0; i < nlin; i++) - { - v = i * linstep; - ToLinearF[j++] = (float)v; - } - - for (i = nlin; i < TSIZE; i++) - ToLinearF[j++] = (float)(b * exp(c * i)); - - ToLinearF[2048] = ToLinearF[2047]; - - for (i = 0; i < TSIZEP1; i++) - { - v = ToLinearF[i] * 65535.0 + 0.5; - ToLinear16[i] = (v > 65535.0) ? 65535 : (uint16_t)v; - v = ToLinearF[i] * 255.0 + 0.5; - ToLinear8[i] = (v > 255.0) ? 255 : (unsigned char)v; - } - - j = 0; - for (i = 0; i < lt2size; i++) - { - if ((i * linstep) * (i * linstep) > ToLinearF[j] * ToLinearF[j + 1]) - j++; - FromLT2[i] = (uint16_t)j; - } - - /* - * Since we lose info anyway on 16-bit data, we set up a 14-bit - * table and shift 16-bit values down two bits on input. - * saves a little table space. - */ - j = 0; - for (i = 0; i < 16384; i++) - { - while ((i / 16383.) * (i / 16383.) > ToLinearF[j] * ToLinearF[j + 1]) - j++; - From14[i] = (uint16_t)j; - } - - j = 0; - for (i = 0; i < 256; i++) - { - while ((i / 255.) * (i / 255.) > ToLinearF[j] * ToLinearF[j + 1]) - j++; - From8[i] = (uint16_t)j; - } - - Fltsize = (float)(lt2size / 2); - - sp->ToLinearF = ToLinearF; - sp->ToLinear16 = ToLinear16; - sp->ToLinear8 = ToLinear8; - sp->FromLT2 = FromLT2; - sp->From14 = From14; - sp->From8 = From8; - - return 1; -} - -#define PixarLogDecoderState(tif) ((PixarLogState *)(tif)->tif_data) -#define PixarLogEncoderState(tif) ((PixarLogState *)(tif)->tif_data) - -static int PixarLogEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int PixarLogDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -#define PIXARLOGDATAFMT_UNKNOWN -1 - -static int PixarLogGuessDataFmt(TIFFDirectory *td) -{ - int guess = PIXARLOGDATAFMT_UNKNOWN; - int format = td->td_sampleformat; - - /* If the user didn't tell us his datafmt, - * take our best guess from the bitspersample. - */ - switch (td->td_bitspersample) - { - case 32: - if (format == SAMPLEFORMAT_IEEEFP) - guess = PIXARLOGDATAFMT_FLOAT; - break; - case 16: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_16BIT; - break; - case 12: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_INT) - guess = PIXARLOGDATAFMT_12BITPICIO; - break; - case 11: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_11BITLOG; - break; - case 8: - if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT) - guess = PIXARLOGDATAFMT_8BIT; - break; - } - - return guess; -} - -static tmsize_t multiply_ms(tmsize_t m1, tmsize_t m2) -{ - return _TIFFMultiplySSize(NULL, m1, m2, NULL); -} - -static tmsize_t add_ms(tmsize_t m1, tmsize_t m2) -{ - assert(m1 >= 0 && m2 >= 0); - /* if either input is zero, assume overflow already occurred */ - if (m1 == 0 || m2 == 0) - return 0; - else if (m1 > TIFF_TMSIZE_T_MAX - m2) - return 0; - - return m1 + m2; -} - -static int PixarLogFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -static int PixarLogSetupDecode(TIFF *tif) -{ - static const char module[] = "PixarLogSetupDecode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState *sp = PixarLogDecoderState(tif); - tmsize_t tbuf_size; - uint32_t strip_height; - - assert(sp != NULL); - - /* This function can possibly be called several times by */ - /* PredictorSetupDecode() if this function succeeds but */ - /* PredictorSetup() fails */ - if ((sp->state & PLSTATE_INIT) != 0) - return 1; - - strip_height = td->td_rowsperstrip; - if (strip_height > td->td_imagelength) - strip_height = td->td_imagelength; - - /* Make sure no byte swapping happens on the data - * after decompression. */ - tif->tif_postdecode = _TIFFNoPostDecode; - - /* for some reason, we can't do this in TIFFInitPixarLog */ - - sp->stride = - (td->td_planarconfig == PLANARCONFIG_CONTIG ? td->td_samplesperpixel - : 1); - tbuf_size = multiply_ms( - multiply_ms(multiply_ms(sp->stride, td->td_imagewidth), strip_height), - sizeof(uint16_t)); - /* add one more stride in case input ends mid-stride */ - tbuf_size = add_ms(tbuf_size, sizeof(uint16_t) * sp->stride); - if (tbuf_size == 0) - return (0); /* TODO: this is an error return without error report - through TIFFErrorExt */ - sp->tbuf = (uint16_t *)_TIFFmallocExt(tif, tbuf_size); - if (sp->tbuf == NULL) - return (0); - sp->tbuf_size = tbuf_size; - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - sp->user_datafmt = PixarLogGuessDataFmt(td); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - { - _TIFFfreeExt(tif, sp->tbuf); - sp->tbuf = NULL; - sp->tbuf_size = 0; - TIFFErrorExtR(tif, module, - "PixarLog compression can't handle bits depth/data " - "format combination (depth: %" PRIu16 ")", - td->td_bitspersample); - return (0); - } - - if (inflateInit(&sp->stream) != Z_OK) - { - _TIFFfreeExt(tif, sp->tbuf); - sp->tbuf = NULL; - sp->tbuf_size = 0; - TIFFErrorExtR(tif, module, "%s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - else - { - sp->state |= PLSTATE_INIT; - return (1); - } -} - -/* - * Setup state for decoding a strip. - */ -static int PixarLogPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "PixarLogPreDecode"; - PixarLogState *sp = PixarLogDecoderState(tif); - - (void)s; - assert(sp != NULL); - sp->stream.next_in = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_in) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt)tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) - { - TIFFErrorExtR(tif, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (inflateReset(&sp->stream) == Z_OK); -} - -static int PixarLogDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "PixarLogDecode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState *sp = PixarLogDecoderState(tif); - tmsize_t i; - tmsize_t nsamples; - int llen; - uint16_t *up; - - switch (sp->user_datafmt) - { - case PIXARLOGDATAFMT_FLOAT: - nsamples = occ / sizeof(float); /* XXX float == 32 bits */ - break; - case PIXARLOGDATAFMT_16BIT: - case PIXARLOGDATAFMT_12BITPICIO: - case PIXARLOGDATAFMT_11BITLOG: - nsamples = occ / sizeof(uint16_t); /* XXX uint16_t == 16 bits */ - break; - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - nsamples = occ; - break; - default: - TIFFErrorExtR(tif, module, - "%" PRIu16 " bit input not supported in PixarLog", - td->td_bitspersample); - memset(op, 0, (size_t)occ); - return 0; - } - - llen = sp->stride * td->td_imagewidth; - - (void)s; - assert(sp != NULL); - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (uInt)tif->tif_rawcc; - - sp->stream.next_out = (unsigned char *)sp->tbuf; - assert(sizeof(sp->stream.avail_out) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt)(nsamples * sizeof(uint16_t)); - if (sp->stream.avail_out != nsamples * sizeof(uint16_t)) - { - TIFFErrorExtR(tif, module, "ZLib cannot deal with buffers this size"); - memset(op, 0, (size_t)occ); - return (0); - } - /* Check that we will not fill more than what was allocated */ - if ((tmsize_t)sp->stream.avail_out > sp->tbuf_size) - { - TIFFErrorExtR(tif, module, "sp->stream.avail_out > sp->tbuf_size"); - memset(op, 0, (size_t)occ); - return (0); - } - do - { - int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); - if (state == Z_STREAM_END) - { - break; /* XXX */ - } - if (state == Z_DATA_ERROR) - { - TIFFErrorExtR( - tif, module, "Decoding error at scanline %" PRIu32 ", %s", - tif->tif_row, sp->stream.msg ? sp->stream.msg : "(null)"); - memset(op, 0, (size_t)occ); - return (0); - } - if (state != Z_OK) - { - TIFFErrorExtR(tif, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - memset(op, 0, (size_t)occ); - return (0); - } - } while (sp->stream.avail_out > 0); - - /* hopefully, we got all the bytes we needed */ - if (sp->stream.avail_out != 0) - { - TIFFErrorExtR(tif, module, - "Not enough data at scanline %" PRIu32 - " (short %u bytes)", - tif->tif_row, sp->stream.avail_out); - memset(op, 0, (size_t)occ); - return (0); - } - - tif->tif_rawcp = sp->stream.next_in; - tif->tif_rawcc = sp->stream.avail_in; - - up = sp->tbuf; - /* Swap bytes in the data if from a different endian machine. */ - if (tif->tif_flags & TIFF_SWAB) - TIFFSwabArrayOfShort(up, nsamples); - - /* - * if llen is not an exact multiple of nsamples, the decode operation - * may overflow the output buffer, so truncate it enough to prevent - * that but still salvage as much data as possible. - */ - if (nsamples % llen) - { - TIFFWarningExtR(tif, module, - "stride %d is not a multiple of sample count, " - "%" TIFF_SSIZE_FORMAT ", data truncated.", - llen, nsamples); - nsamples -= nsamples % llen; - } - - for (i = 0; i < nsamples; i += llen, up += llen) - { - switch (sp->user_datafmt) - { - case PIXARLOGDATAFMT_FLOAT: - horizontalAccumulateF(up, llen, sp->stride, (float *)op, - sp->ToLinearF); - op += llen * sizeof(float); - break; - case PIXARLOGDATAFMT_16BIT: - horizontalAccumulate16(up, llen, sp->stride, (uint16_t *)op, - sp->ToLinear16); - op += llen * sizeof(uint16_t); - break; - case PIXARLOGDATAFMT_12BITPICIO: - horizontalAccumulate12(up, llen, sp->stride, (int16_t *)op, - sp->ToLinearF); - op += llen * sizeof(int16_t); - break; - case PIXARLOGDATAFMT_11BITLOG: - horizontalAccumulate11(up, llen, sp->stride, (uint16_t *)op); - op += llen * sizeof(uint16_t); - break; - case PIXARLOGDATAFMT_8BIT: - horizontalAccumulate8(up, llen, sp->stride, (unsigned char *)op, - sp->ToLinear8); - op += llen * sizeof(unsigned char); - break; - case PIXARLOGDATAFMT_8BITABGR: - horizontalAccumulate8abgr(up, llen, sp->stride, - (unsigned char *)op, sp->ToLinear8); - op += llen * sizeof(unsigned char); - break; - default: - TIFFErrorExtR(tif, module, "Unsupported bits/sample: %" PRIu16, - td->td_bitspersample); - memset(op, 0, (size_t)occ); - return (0); - } - } - - return (1); -} - -static int PixarLogSetupEncode(TIFF *tif) -{ - static const char module[] = "PixarLogSetupEncode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState *sp = PixarLogEncoderState(tif); - tmsize_t tbuf_size; - - assert(sp != NULL); - - /* for some reason, we can't do this in TIFFInitPixarLog */ - - sp->stride = - (td->td_planarconfig == PLANARCONFIG_CONTIG ? td->td_samplesperpixel - : 1); - tbuf_size = - multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth), - td->td_rowsperstrip), - sizeof(uint16_t)); - if (tbuf_size == 0) - return (0); /* TODO: this is an error return without error report - through TIFFErrorExt */ - sp->tbuf = (uint16_t *)_TIFFmallocExt(tif, tbuf_size); - if (sp->tbuf == NULL) - return (0); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - sp->user_datafmt = PixarLogGuessDataFmt(td); - if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) - { - TIFFErrorExtR(tif, module, - "PixarLog compression can't handle %" PRIu16 - " bit linear encodings", - td->td_bitspersample); - return (0); - } - - if (deflateInit(&sp->stream, sp->quality) != Z_OK) - { - TIFFErrorExtR(tif, module, "%s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - else - { - sp->state |= PLSTATE_INIT; - return (1); - } -} - -/* - * Reset encoding state at the start of a strip. - */ -static int PixarLogPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "PixarLogPreEncode"; - PixarLogState *sp = PixarLogEncoderState(tif); - - (void)s; - assert(sp != NULL); - sp->stream.next_out = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_out) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uInt)tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - TIFFErrorExtR(tif, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (deflateReset(&sp->stream) == Z_OK); -} - -static void horizontalDifferenceF(float *ip, int n, int stride, uint16_t *wp, - uint16_t *FromLT2) -{ - int32_t r1, g1, b1, a1, r2, g2, b2, a2, mask; - float fltsize = Fltsize; - -#define CLAMP(v) \ - ((v < (float)0.) ? 0 \ - : (v < (float)2.) ? FromLT2[(int)(v * fltsize)] \ - : (v > (float)24.2) ? 2047 \ - : LogK1 * log(v * LogK2) + 0.5) - - mask = CODE_MASK; - if (n >= stride) - { - if (stride == 3) - { - r2 = wp[0] = (uint16_t)CLAMP(ip[0]); - g2 = wp[1] = (uint16_t)CLAMP(ip[1]); - b2 = wp[2] = (uint16_t)CLAMP(ip[2]); - n -= 3; - while (n > 0) - { - n -= 3; - wp += 3; - ip += 3; - r1 = (int32_t)CLAMP(ip[0]); - wp[0] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = (int32_t)CLAMP(ip[1]); - wp[1] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = (int32_t)CLAMP(ip[2]); - wp[2] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - } - } - else if (stride == 4) - { - r2 = wp[0] = (uint16_t)CLAMP(ip[0]); - g2 = wp[1] = (uint16_t)CLAMP(ip[1]); - b2 = wp[2] = (uint16_t)CLAMP(ip[2]); - a2 = wp[3] = (uint16_t)CLAMP(ip[3]); - n -= 4; - while (n > 0) - { - n -= 4; - wp += 4; - ip += 4; - r1 = (int32_t)CLAMP(ip[0]); - wp[0] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = (int32_t)CLAMP(ip[1]); - wp[1] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = (int32_t)CLAMP(ip[2]); - wp[2] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - a1 = (int32_t)CLAMP(ip[3]); - wp[3] = (uint16_t)((a1 - a2) & mask); - a2 = a1; - } - } - else - { - REPEAT(stride, wp[0] = (uint16_t)CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) - { - REPEAT(stride, - wp[0] = (uint16_t)(((int32_t)CLAMP(ip[0]) - - (int32_t)CLAMP(ip[-stride])) & - mask); - wp++; ip++) - n -= stride; - } - } - } -} - -static void horizontalDifference16(unsigned short *ip, int n, int stride, - unsigned short *wp, uint16_t *From14) -{ - register int r1, g1, b1, a1, r2, g2, b2, a2, mask; - -/* assumption is unsigned pixel values */ -#undef CLAMP -#define CLAMP(v) From14[(v) >> 2] - - mask = CODE_MASK; - if (n >= stride) - { - if (stride == 3) - { - r2 = wp[0] = CLAMP(ip[0]); - g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - n -= 3; - while (n > 0) - { - n -= 3; - wp += 3; - ip += 3; - r1 = CLAMP(ip[0]); - wp[0] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = CLAMP(ip[1]); - wp[1] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = CLAMP(ip[2]); - wp[2] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - } - } - else if (stride == 4) - { - r2 = wp[0] = CLAMP(ip[0]); - g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - a2 = wp[3] = CLAMP(ip[3]); - n -= 4; - while (n > 0) - { - n -= 4; - wp += 4; - ip += 4; - r1 = CLAMP(ip[0]); - wp[0] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = CLAMP(ip[1]); - wp[1] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = CLAMP(ip[2]); - wp[2] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - a1 = CLAMP(ip[3]); - wp[3] = (uint16_t)((a1 - a2) & mask); - a2 = a1; - } - } - else - { - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) - { - REPEAT(stride, - wp[0] = (uint16_t)((CLAMP(ip[0]) - CLAMP(ip[-stride])) & - mask); - wp++; ip++) - n -= stride; - } - } - } -} - -static void horizontalDifference8(unsigned char *ip, int n, int stride, - unsigned short *wp, uint16_t *From8) -{ - register int r1, g1, b1, a1, r2, g2, b2, a2, mask; - -#undef CLAMP -#define CLAMP(v) (From8[(v)]) - - mask = CODE_MASK; - if (n >= stride) - { - if (stride == 3) - { - r2 = wp[0] = CLAMP(ip[0]); - g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - n -= 3; - while (n > 0) - { - n -= 3; - r1 = CLAMP(ip[3]); - wp[3] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = CLAMP(ip[4]); - wp[4] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = CLAMP(ip[5]); - wp[5] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - wp += 3; - ip += 3; - } - } - else if (stride == 4) - { - r2 = wp[0] = CLAMP(ip[0]); - g2 = wp[1] = CLAMP(ip[1]); - b2 = wp[2] = CLAMP(ip[2]); - a2 = wp[3] = CLAMP(ip[3]); - n -= 4; - while (n > 0) - { - n -= 4; - r1 = CLAMP(ip[4]); - wp[4] = (uint16_t)((r1 - r2) & mask); - r2 = r1; - g1 = CLAMP(ip[5]); - wp[5] = (uint16_t)((g1 - g2) & mask); - g2 = g1; - b1 = CLAMP(ip[6]); - wp[6] = (uint16_t)((b1 - b2) & mask); - b2 = b1; - a1 = CLAMP(ip[7]); - wp[7] = (uint16_t)((a1 - a2) & mask); - a2 = a1; - wp += 4; - ip += 4; - } - } - else - { - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) - n -= stride; - while (n > 0) - { - REPEAT(stride, - wp[0] = (uint16_t)((CLAMP(ip[0]) - CLAMP(ip[-stride])) & - mask); - wp++; ip++) - n -= stride; - } - } - } -} - -/* - * Encode a chunk of pixels. - */ -static int PixarLogEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "PixarLogEncode"; - TIFFDirectory *td = &tif->tif_dir; - PixarLogState *sp = PixarLogEncoderState(tif); - tmsize_t i; - tmsize_t n; - int llen; - unsigned short *up; - - (void)s; - - switch (sp->user_datafmt) - { - case PIXARLOGDATAFMT_FLOAT: - n = cc / sizeof(float); /* XXX float == 32 bits */ - break; - case PIXARLOGDATAFMT_16BIT: - case PIXARLOGDATAFMT_12BITPICIO: - case PIXARLOGDATAFMT_11BITLOG: - n = cc / sizeof(uint16_t); /* XXX uint16_t == 16 bits */ - break; - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - n = cc; - break; - default: - TIFFErrorExtR(tif, module, - "%" PRIu16 " bit input not supported in PixarLog", - td->td_bitspersample); - return 0; - } - - llen = sp->stride * td->td_imagewidth; - /* Check against the number of elements (of size uint16_t) of sp->tbuf */ - if (n > ((tmsize_t)td->td_rowsperstrip * llen)) - { - TIFFErrorExtR(tif, module, "Too many input bytes provided"); - return 0; - } - - for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) - { - switch (sp->user_datafmt) - { - case PIXARLOGDATAFMT_FLOAT: - horizontalDifferenceF((float *)bp, llen, sp->stride, up, - sp->FromLT2); - bp += llen * sizeof(float); - break; - case PIXARLOGDATAFMT_16BIT: - horizontalDifference16((uint16_t *)bp, llen, sp->stride, up, - sp->From14); - bp += llen * sizeof(uint16_t); - break; - case PIXARLOGDATAFMT_8BIT: - horizontalDifference8((unsigned char *)bp, llen, sp->stride, up, - sp->From8); - bp += llen * sizeof(unsigned char); - break; - default: - TIFFErrorExtR(tif, module, - "%" PRIu16 " bit input not supported in PixarLog", - td->td_bitspersample); - return 0; - } - } - - sp->stream.next_in = (unsigned char *)sp->tbuf; - assert(sizeof(sp->stream.avail_in) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = (uInt)(n * sizeof(uint16_t)); - if ((sp->stream.avail_in / sizeof(uint16_t)) != (uInt)n) - { - TIFFErrorExtR(tif, module, "ZLib cannot deal with buffers this size"); - return (0); - } - - do - { - if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) - { - TIFFErrorExtR(tif, module, "Encoder error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - if (sp->stream.avail_out == 0) - { - tif->tif_rawcc = tif->tif_rawdatasize; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - (uInt)tif - ->tif_rawdatasize; /* this is a safe typecast, as check is - made already in PixarLogPreEncode */ - } - } while (sp->stream.avail_in > 0); - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ - -static int PixarLogPostEncode(TIFF *tif) -{ - static const char module[] = "PixarLogPostEncode"; - PixarLogState *sp = PixarLogEncoderState(tif); - int state; - - sp->stream.avail_in = 0; - - do - { - state = deflate(&sp->stream, Z_FINISH); - switch (state) - { - case Z_STREAM_END: - case Z_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - tif->tif_rawcc = - tif->tif_rawdatasize - sp->stream.avail_out; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - (uInt)tif->tif_rawdatasize; /* this is a safe typecast, - as check is made already - in PixarLogPreEncode */ - } - break; - default: - TIFFErrorExtR(tif, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - } while (state != Z_STREAM_END); - return (1); -} - -static void PixarLogClose(TIFF *tif) -{ - PixarLogState *sp = (PixarLogState *)tif->tif_data; - TIFFDirectory *td = &tif->tif_dir; - - assert(sp != 0); - /* In a really sneaky (and really incorrect, and untruthful, and - * troublesome, and error-prone) maneuver that completely goes against - * the spirit of TIFF, and breaks TIFF, on close, we covertly - * modify both bitspersample and sampleformat in the directory to - * indicate 8-bit linear. This way, the decode "just works" even for - * readers that don't know about PixarLog, or how to set - * the PIXARLOGDATFMT pseudo-tag. - */ - - if (sp->state & PLSTATE_INIT) - { - /* We test the state to avoid an issue such as in - * http://bugzilla.maptools.org/show_bug.cgi?id=2604 - * What appends in that case is that the bitspersample is 1 and - * a TransferFunction is set. The size of the TransferFunction - * depends on 1<td_bitspersample = 8; - td->td_sampleformat = SAMPLEFORMAT_UINT; - } -} - -static void PixarLogCleanup(TIFF *tif) -{ - PixarLogState *sp = (PixarLogState *)tif->tif_data; - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->FromLT2) - _TIFFfreeExt(tif, sp->FromLT2); - if (sp->From14) - _TIFFfreeExt(tif, sp->From14); - if (sp->From8) - _TIFFfreeExt(tif, sp->From8); - if (sp->ToLinearF) - _TIFFfreeExt(tif, sp->ToLinearF); - if (sp->ToLinear16) - _TIFFfreeExt(tif, sp->ToLinear16); - if (sp->ToLinear8) - _TIFFfreeExt(tif, sp->ToLinear8); - if (sp->state & PLSTATE_INIT) - { - if (tif->tif_mode == O_RDONLY) - inflateEnd(&sp->stream); - else - deflateEnd(&sp->stream); - } - if (sp->tbuf) - _TIFFfreeExt(tif, sp->tbuf); - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int PixarLogVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "PixarLogVSetField"; - PixarLogState *sp = (PixarLogState *)tif->tif_data; - int result; - - switch (tag) - { - case TIFFTAG_PIXARLOGQUALITY: - sp->quality = (int)va_arg(ap, int); - if (tif->tif_mode != O_RDONLY && (sp->state & PLSTATE_INIT)) - { - if (deflateParams(&sp->stream, sp->quality, - Z_DEFAULT_STRATEGY) != Z_OK) - { - TIFFErrorExtR(tif, module, "ZLib error: %s", - sp->stream.msg ? sp->stream.msg : "(null)"); - return (0); - } - } - return (1); - case TIFFTAG_PIXARLOGDATAFMT: - sp->user_datafmt = (int)va_arg(ap, int); - /* Tweak the TIFF header so that the rest of libtiff knows what - * size of data will be passed between app and library, and - * assume that the app knows what it is doing and is not - * confused by these header manipulations... - */ - switch (sp->user_datafmt) - { - case PIXARLOGDATAFMT_8BIT: - case PIXARLOGDATAFMT_8BITABGR: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_11BITLOG: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_12BITPICIO: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT); - break; - case PIXARLOGDATAFMT_16BIT: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case PIXARLOGDATAFMT_FLOAT: - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 32); - TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, - SAMPLEFORMAT_IEEEFP); - break; - } - /* - * Must recalculate sizes should bits/sample change. - */ - tif->tif_tilesize = - isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1); - tif->tif_scanlinesize = TIFFScanlineSize(tif); - result = 1; /* NB: pseudo tag */ - break; - default: - result = (*sp->vsetparent)(tif, tag, ap); - } - return (result); -} - -static int PixarLogVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - PixarLogState *sp = (PixarLogState *)tif->tif_data; - - switch (tag) - { - case TIFFTAG_PIXARLOGQUALITY: - *va_arg(ap, int *) = sp->quality; - break; - case TIFFTAG_PIXARLOGDATAFMT: - *va_arg(ap, int *) = sp->user_datafmt; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static const TIFFField pixarlogFields[] = { - {TIFFTAG_PIXARLOGDATAFMT, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - FALSE, FALSE, "", NULL}, - {TIFFTAG_PIXARLOGQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - FALSE, FALSE, "", NULL}}; - -int TIFFInitPixarLog(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitPixarLog"; - - PixarLogState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_PIXARLOG); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, pixarlogFields, TIFFArrayCount(pixarlogFields))) - { - TIFFErrorExtR(tif, module, - "Merging PixarLog codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(PixarLogState)); - if (tif->tif_data == NULL) - goto bad; - sp = (PixarLogState *)tif->tif_data; - _TIFFmemset(sp, 0, sizeof(*sp)); - sp->stream.data_type = Z_BINARY; - sp->user_datafmt = PIXARLOGDATAFMT_UNKNOWN; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = PixarLogFixupTags; - tif->tif_setupdecode = PixarLogSetupDecode; - tif->tif_predecode = PixarLogPreDecode; - tif->tif_decoderow = PixarLogDecode; - tif->tif_decodestrip = PixarLogDecode; - tif->tif_decodetile = PixarLogDecode; - tif->tif_setupencode = PixarLogSetupEncode; - tif->tif_preencode = PixarLogPreEncode; - tif->tif_postencode = PixarLogPostEncode; - tif->tif_encoderow = PixarLogEncode; - tif->tif_encodestrip = PixarLogEncode; - tif->tif_encodetile = PixarLogEncode; - tif->tif_close = PixarLogClose; - tif->tif_cleanup = PixarLogCleanup; - - /* Override SetField so we can handle our private pseudo-tag */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = PixarLogVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = PixarLogVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; - - /* we don't wish to use the predictor, - * the default is none, which predictor value 1 - */ - (void)TIFFPredictorInit(tif); - - /* - * build the companding tables - */ - PixarLogMakeTables(tif, sp); - - return (1); -bad: - TIFFErrorExtR(tif, module, "No space for PixarLog state block"); - return (0); -} -#endif /* PIXARLOG_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_predict.c b/third_party/libtiff/libtiff/tif_predict.c deleted file mode 100644 index 7a6fc4a..0000000 --- a/third_party/libtiff/libtiff/tif_predict.c +++ /dev/null @@ -1,1161 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Predictor Tag Support (used by multiple codecs). - */ -#include "tif_predict.h" -#include "tiffiop.h" - -#if defined(__x86_64__) || defined(_M_X64) -#include -#endif - -#define PredictorState(tif) ((TIFFPredictorState *)(tif)->tif_data) - -static int horAcc8(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horDiff8(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int horDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int swabHorDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int fpAcc(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int fpDiff(TIFF *tif, uint8_t *cp0, tmsize_t cc); -static int PredictorDecodeRow(TIFF *tif, uint8_t *op0, tmsize_t occ0, - uint16_t s); -static int PredictorDecodeTile(TIFF *tif, uint8_t *op0, tmsize_t occ0, - uint16_t s); -static int PredictorEncodeRow(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int PredictorEncodeTile(TIFF *tif, uint8_t *bp0, tmsize_t cc0, - uint16_t s); - -static int PredictorSetup(TIFF *tif) -{ - static const char module[] = "PredictorSetup"; - - TIFFPredictorState *sp = PredictorState(tif); - TIFFDirectory *td = &tif->tif_dir; - - switch (sp->predictor) /* no differencing */ - { - case PREDICTOR_NONE: - return 1; - case PREDICTOR_HORIZONTAL: - if (td->td_bitspersample != 8 && td->td_bitspersample != 16 && - td->td_bitspersample != 32 && td->td_bitspersample != 64) - { - TIFFErrorExtR(tif, module, - "Horizontal differencing \"Predictor\" not " - "supported with %" PRIu16 "-bit samples", - td->td_bitspersample); - return 0; - } - break; - case PREDICTOR_FLOATINGPOINT: - if (td->td_sampleformat != SAMPLEFORMAT_IEEEFP) - { - TIFFErrorExtR( - tif, module, - "Floating point \"Predictor\" not supported with %" PRIu16 - " data format", - td->td_sampleformat); - return 0; - } - if (td->td_bitspersample != 16 && td->td_bitspersample != 24 && - td->td_bitspersample != 32 && td->td_bitspersample != 64) - { /* Should 64 be allowed? */ - TIFFErrorExtR( - tif, module, - "Floating point \"Predictor\" not supported with %" PRIu16 - "-bit samples", - td->td_bitspersample); - return 0; - } - break; - default: - TIFFErrorExtR(tif, module, "\"Predictor\" value %d not supported", - sp->predictor); - return 0; - } - sp->stride = - (td->td_planarconfig == PLANARCONFIG_CONTIG ? td->td_samplesperpixel - : 1); - /* - * Calculate the scanline/tile-width size in bytes. - */ - if (isTiled(tif)) - sp->rowsize = TIFFTileRowSize(tif); - else - sp->rowsize = TIFFScanlineSize(tif); - if (sp->rowsize == 0) - return 0; - - return 1; -} - -static int PredictorSetupDecode(TIFF *tif) -{ - TIFFPredictorState *sp = PredictorState(tif); - TIFFDirectory *td = &tif->tif_dir; - - /* Note: when PredictorSetup() fails, the effets of setupdecode() */ - /* will not be "canceled" so setupdecode() might be robust to */ - /* be called several times. */ - if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif)) - return 0; - - if (sp->predictor == 2) - { - switch (td->td_bitspersample) - { - case 8: - sp->decodepfunc = horAcc8; - break; - case 16: - sp->decodepfunc = horAcc16; - break; - case 32: - sp->decodepfunc = horAcc32; - break; - case 64: - sp->decodepfunc = horAcc64; - break; - } - /* - * Override default decoding method with one that does the - * predictor stuff. - */ - if (tif->tif_decoderow != PredictorDecodeRow) - { - sp->decoderow = tif->tif_decoderow; - tif->tif_decoderow = PredictorDecodeRow; - sp->decodestrip = tif->tif_decodestrip; - tif->tif_decodestrip = PredictorDecodeTile; - sp->decodetile = tif->tif_decodetile; - tif->tif_decodetile = PredictorDecodeTile; - } - - /* - * If the data is horizontally differenced 16-bit data that - * requires byte-swapping, then it must be byte swapped before - * the accumulation step. We do this with a special-purpose - * routine and override the normal post decoding logic that - * the library setup when the directory was read. - */ - if (tif->tif_flags & TIFF_SWAB) - { - if (sp->decodepfunc == horAcc16) - { - sp->decodepfunc = swabHorAcc16; - tif->tif_postdecode = _TIFFNoPostDecode; - } - else if (sp->decodepfunc == horAcc32) - { - sp->decodepfunc = swabHorAcc32; - tif->tif_postdecode = _TIFFNoPostDecode; - } - else if (sp->decodepfunc == horAcc64) - { - sp->decodepfunc = swabHorAcc64; - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - } - - else if (sp->predictor == 3) - { - sp->decodepfunc = fpAcc; - /* - * Override default decoding method with one that does the - * predictor stuff. - */ - if (tif->tif_decoderow != PredictorDecodeRow) - { - sp->decoderow = tif->tif_decoderow; - tif->tif_decoderow = PredictorDecodeRow; - sp->decodestrip = tif->tif_decodestrip; - tif->tif_decodestrip = PredictorDecodeTile; - sp->decodetile = tif->tif_decodetile; - tif->tif_decodetile = PredictorDecodeTile; - } - /* - * The data should not be swapped outside of the floating - * point predictor, the accumulation routine should return - * bytes in the native order. - */ - if (tif->tif_flags & TIFF_SWAB) - { - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - - return 1; -} - -static int PredictorSetupEncode(TIFF *tif) -{ - TIFFPredictorState *sp = PredictorState(tif); - TIFFDirectory *td = &tif->tif_dir; - - if (!(*sp->setupencode)(tif) || !PredictorSetup(tif)) - return 0; - - if (sp->predictor == 2) - { - switch (td->td_bitspersample) - { - case 8: - sp->encodepfunc = horDiff8; - break; - case 16: - sp->encodepfunc = horDiff16; - break; - case 32: - sp->encodepfunc = horDiff32; - break; - case 64: - sp->encodepfunc = horDiff64; - break; - } - /* - * Override default encoding method with one that does the - * predictor stuff. - */ - if (tif->tif_encoderow != PredictorEncodeRow) - { - sp->encoderow = tif->tif_encoderow; - tif->tif_encoderow = PredictorEncodeRow; - sp->encodestrip = tif->tif_encodestrip; - tif->tif_encodestrip = PredictorEncodeTile; - sp->encodetile = tif->tif_encodetile; - tif->tif_encodetile = PredictorEncodeTile; - } - - /* - * If the data is horizontally differenced 16-bit data that - * requires byte-swapping, then it must be byte swapped after - * the differentiation step. We do this with a special-purpose - * routine and override the normal post decoding logic that - * the library setup when the directory was read. - */ - if (tif->tif_flags & TIFF_SWAB) - { - if (sp->encodepfunc == horDiff16) - { - sp->encodepfunc = swabHorDiff16; - tif->tif_postdecode = _TIFFNoPostDecode; - } - else if (sp->encodepfunc == horDiff32) - { - sp->encodepfunc = swabHorDiff32; - tif->tif_postdecode = _TIFFNoPostDecode; - } - else if (sp->encodepfunc == horDiff64) - { - sp->encodepfunc = swabHorDiff64; - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - } - - else if (sp->predictor == 3) - { - sp->encodepfunc = fpDiff; - /* - * Override default encoding method with one that does the - * predictor stuff. - */ - if (tif->tif_encoderow != PredictorEncodeRow) - { - sp->encoderow = tif->tif_encoderow; - tif->tif_encoderow = PredictorEncodeRow; - sp->encodestrip = tif->tif_encodestrip; - tif->tif_encodestrip = PredictorEncodeTile; - sp->encodetile = tif->tif_encodetile; - tif->tif_encodetile = PredictorEncodeTile; - } - /* - * The data should not be swapped outside of the floating - * point predictor, the differentiation routine should return - * bytes in the native order. - */ - if (tif->tif_flags & TIFF_SWAB) - { - tif->tif_postdecode = _TIFFNoPostDecode; - } - } - - return 1; -} - -#define REPEAT4(n, op) \ - switch (n) \ - { \ - default: \ - { \ - tmsize_t i; \ - for (i = n - 4; i > 0; i--) \ - { \ - op; \ - } \ - } /*-fallthrough*/ \ - case 4: \ - op; /*-fallthrough*/ \ - case 3: \ - op; /*-fallthrough*/ \ - case 2: \ - op; /*-fallthrough*/ \ - case 1: \ - op; /*-fallthrough*/ \ - case 0:; \ - } - -/* Remarks related to C standard compliance in all below functions : */ -/* - to avoid any undefined behavior, we only operate on unsigned types */ -/* since the behavior of "overflows" is defined (wrap over) */ -/* - when storing into the byte stream, we explicitly mask with 0xff so */ -/* as to make icc -check=conversions happy (not necessary by the standard) */ - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horAcc8(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - - uint8_t *cp = cp0; - if ((cc % stride) != 0) - { - TIFFErrorExtR(tif, "horAcc8", "%s", "(cc%stride)!=0"); - return 0; - } - - if (cc > stride) - { - /* - * Pipeline the most common cases. - */ - if (stride == 1) - { - uint32_t acc = cp[0]; - tmsize_t i = stride; - for (; i < cc - 3; i += 4) - { - cp[i + 0] = (uint8_t)((acc += cp[i + 0]) & 0xff); - cp[i + 1] = (uint8_t)((acc += cp[i + 1]) & 0xff); - cp[i + 2] = (uint8_t)((acc += cp[i + 2]) & 0xff); - cp[i + 3] = (uint8_t)((acc += cp[i + 3]) & 0xff); - } - for (; i < cc; i++) - { - cp[i + 0] = (uint8_t)((acc += cp[i + 0]) & 0xff); - } - } - else if (stride == 3) - { - uint32_t cr = cp[0]; - uint32_t cg = cp[1]; - uint32_t cb = cp[2]; - tmsize_t i = stride; - for (; i < cc; i += stride) - { - cp[i + 0] = (uint8_t)((cr += cp[i + 0]) & 0xff); - cp[i + 1] = (uint8_t)((cg += cp[i + 1]) & 0xff); - cp[i + 2] = (uint8_t)((cb += cp[i + 2]) & 0xff); - } - } - else if (stride == 4) - { - uint32_t cr = cp[0]; - uint32_t cg = cp[1]; - uint32_t cb = cp[2]; - uint32_t ca = cp[3]; - tmsize_t i = stride; - for (; i < cc; i += stride) - { - cp[i + 0] = (uint8_t)((cr += cp[i + 0]) & 0xff); - cp[i + 1] = (uint8_t)((cg += cp[i + 1]) & 0xff); - cp[i + 2] = (uint8_t)((cb += cp[i + 2]) & 0xff); - cp[i + 3] = (uint8_t)((ca += cp[i + 3]) & 0xff); - } - } - else - { - cc -= stride; - do - { - REPEAT4(stride, - cp[stride] = (uint8_t)((cp[stride] + *cp) & 0xff); - cp++) - cc -= stride; - } while (cc > 0); - } - } - return 1; -} - -static int swabHorAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint16_t *wp = (uint16_t *)cp0; - tmsize_t wc = cc / 2; - - TIFFSwabArrayOfShort(wp, wc); - return horAcc16(tif, cp0, cc); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horAcc16(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint16_t *wp = (uint16_t *)cp0; - tmsize_t wc = cc / 2; - - if ((cc % (2 * stride)) != 0) - { - TIFFErrorExtR(tif, "horAcc16", "%s", "cc%(2*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - do - { - REPEAT4(stride, wp[stride] = (uint16_t)(((unsigned int)wp[stride] + - (unsigned int)wp[0]) & - 0xffff); - wp++) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int swabHorAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint32_t *wp = (uint32_t *)cp0; - tmsize_t wc = cc / 4; - - TIFFSwabArrayOfLong(wp, wc); - return horAcc32(tif, cp0, cc); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horAcc32(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32_t *wp = (uint32_t *)cp0; - tmsize_t wc = cc / 4; - - if ((cc % (4 * stride)) != 0) - { - TIFFErrorExtR(tif, "horAcc32", "%s", "cc%(4*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - do - { - REPEAT4(stride, wp[stride] += wp[0]; wp++) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int swabHorAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint64_t *wp = (uint64_t *)cp0; - tmsize_t wc = cc / 8; - - TIFFSwabArrayOfLong8(wp, wc); - return horAcc64(tif, cp0, cc); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horAcc64(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint64_t *wp = (uint64_t *)cp0; - tmsize_t wc = cc / 8; - - if ((cc % (8 * stride)) != 0) - { - TIFFErrorExtR(tif, "horAcc64", "%s", "cc%(8*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - do - { - REPEAT4(stride, wp[stride] += wp[0]; wp++) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -/* - * Floating point predictor accumulation routine. - */ -static int fpAcc(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32_t bps = tif->tif_dir.td_bitspersample / 8; - tmsize_t wc = cc / bps; - tmsize_t count = cc; - uint8_t *cp = cp0; - uint8_t *tmp; - - if (cc % (bps * stride) != 0) - { - TIFFErrorExtR(tif, "fpAcc", "%s", "cc%(bps*stride))!=0"); - return 0; - } - - tmp = (uint8_t *)_TIFFmallocExt(tif, cc); - if (!tmp) - return 0; - - if (stride == 1) - { - /* Optimization of general case */ -#define OP \ - do \ - { \ - cp[1] = (uint8_t)((cp[1] + cp[0]) & 0xff); \ - ++cp; \ - } while (0) - for (; count > 8; count -= 8) - { - OP; - OP; - OP; - OP; - OP; - OP; - OP; - OP; - } - for (; count > 1; count -= 1) - { - OP; - } -#undef OP - } - else - { - while (count > stride) - { - REPEAT4(stride, cp[stride] = (uint8_t)((cp[stride] + cp[0]) & 0xff); - cp++) - count -= stride; - } - } - - _TIFFmemcpy(tmp, cp0, cc); - cp = (uint8_t *)cp0; - count = 0; - -#if defined(__x86_64__) || defined(_M_X64) - if (bps == 4) - { - /* Optimization of general case */ - for (; count + 15 < wc; count += 16) - { - /* Interlace 4*16 byte values */ - - __m128i xmm0 = - _mm_loadu_si128((const __m128i *)(tmp + count + 3 * wc)); - __m128i xmm1 = - _mm_loadu_si128((const __m128i *)(tmp + count + 2 * wc)); - __m128i xmm2 = - _mm_loadu_si128((const __m128i *)(tmp + count + 1 * wc)); - __m128i xmm3 = - _mm_loadu_si128((const __m128i *)(tmp + count + 0 * wc)); - /* (xmm0_0, xmm1_0, xmm0_1, xmm1_1, xmm0_2, xmm1_2, ...) */ - __m128i tmp0 = _mm_unpacklo_epi8(xmm0, xmm1); - /* (xmm0_8, xmm1_8, xmm0_9, xmm1_9, xmm0_10, xmm1_10, ...) */ - __m128i tmp1 = _mm_unpackhi_epi8(xmm0, xmm1); - /* (xmm2_0, xmm3_0, xmm2_1, xmm3_1, xmm2_2, xmm3_2, ...) */ - __m128i tmp2 = _mm_unpacklo_epi8(xmm2, xmm3); - /* (xmm2_8, xmm3_8, xmm2_9, xmm3_9, xmm2_10, xmm3_10, ...) */ - __m128i tmp3 = _mm_unpackhi_epi8(xmm2, xmm3); - /* (xmm0_0, xmm1_0, xmm2_0, xmm3_0, xmm0_1, xmm1_1, xmm2_1, xmm3_1, - * ...) */ - __m128i tmp2_0 = _mm_unpacklo_epi16(tmp0, tmp2); - __m128i tmp2_1 = _mm_unpackhi_epi16(tmp0, tmp2); - __m128i tmp2_2 = _mm_unpacklo_epi16(tmp1, tmp3); - __m128i tmp2_3 = _mm_unpackhi_epi16(tmp1, tmp3); - _mm_storeu_si128((__m128i *)(cp + 4 * count + 0 * 16), tmp2_0); - _mm_storeu_si128((__m128i *)(cp + 4 * count + 1 * 16), tmp2_1); - _mm_storeu_si128((__m128i *)(cp + 4 * count + 2 * 16), tmp2_2); - _mm_storeu_si128((__m128i *)(cp + 4 * count + 3 * 16), tmp2_3); - } - } -#endif - - for (; count < wc; count++) - { - uint32_t byte; - for (byte = 0; byte < bps; byte++) - { -#if WORDS_BIGENDIAN - cp[bps * count + byte] = tmp[byte * wc + count]; -#else - cp[bps * count + byte] = tmp[(bps - byte - 1) * wc + count]; -#endif - } - } - _TIFFfreeExt(tif, tmp); - return 1; -} - -/* - * Decode a scanline and apply the predictor routine. - */ -static int PredictorDecodeRow(TIFF *tif, uint8_t *op0, tmsize_t occ0, - uint16_t s) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->decoderow != NULL); - assert(sp->decodepfunc != NULL); - - if ((*sp->decoderow)(tif, op0, occ0, s)) - { - return (*sp->decodepfunc)(tif, op0, occ0); - } - else - return 0; -} - -/* - * Decode a tile/strip and apply the predictor routine. - * Note that horizontal differencing must be done on a - * row-by-row basis. The width of a "row" has already - * been calculated at pre-decode time according to the - * strip/tile dimensions. - */ -static int PredictorDecodeTile(TIFF *tif, uint8_t *op0, tmsize_t occ0, - uint16_t s) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->decodetile != NULL); - - if ((*sp->decodetile)(tif, op0, occ0, s)) - { - tmsize_t rowsize = sp->rowsize; - assert(rowsize > 0); - if ((occ0 % rowsize) != 0) - { - TIFFErrorExtR(tif, "PredictorDecodeTile", "%s", - "occ0%rowsize != 0"); - return 0; - } - assert(sp->decodepfunc != NULL); - while (occ0 > 0) - { - if (!(*sp->decodepfunc)(tif, op0, rowsize)) - return 0; - occ0 -= rowsize; - op0 += rowsize; - } - return 1; - } - else - return 0; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horDiff8(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - TIFFPredictorState *sp = PredictorState(tif); - tmsize_t stride = sp->stride; - unsigned char *cp = (unsigned char *)cp0; - - if ((cc % stride) != 0) - { - TIFFErrorExtR(tif, "horDiff8", "%s", "(cc%stride)!=0"); - return 0; - } - - if (cc > stride) - { - cc -= stride; - /* - * Pipeline the most common cases. - */ - if (stride == 3) - { - unsigned int r1, g1, b1; - unsigned int r2 = cp[0]; - unsigned int g2 = cp[1]; - unsigned int b2 = cp[2]; - do - { - r1 = cp[3]; - cp[3] = (unsigned char)((r1 - r2) & 0xff); - r2 = r1; - g1 = cp[4]; - cp[4] = (unsigned char)((g1 - g2) & 0xff); - g2 = g1; - b1 = cp[5]; - cp[5] = (unsigned char)((b1 - b2) & 0xff); - b2 = b1; - cp += 3; - } while ((cc -= 3) > 0); - } - else if (stride == 4) - { - unsigned int r1, g1, b1, a1; - unsigned int r2 = cp[0]; - unsigned int g2 = cp[1]; - unsigned int b2 = cp[2]; - unsigned int a2 = cp[3]; - do - { - r1 = cp[4]; - cp[4] = (unsigned char)((r1 - r2) & 0xff); - r2 = r1; - g1 = cp[5]; - cp[5] = (unsigned char)((g1 - g2) & 0xff); - g2 = g1; - b1 = cp[6]; - cp[6] = (unsigned char)((b1 - b2) & 0xff); - b2 = b1; - a1 = cp[7]; - cp[7] = (unsigned char)((a1 - a2) & 0xff); - a2 = a1; - cp += 4; - } while ((cc -= 4) > 0); - } - else - { - cp += cc - 1; - do - { - REPEAT4(stride, - cp[stride] = - (unsigned char)((cp[stride] - cp[0]) & 0xff); - cp--) - } while ((cc -= stride) > 0); - } - } - return 1; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - TIFFPredictorState *sp = PredictorState(tif); - tmsize_t stride = sp->stride; - uint16_t *wp = (uint16_t *)cp0; - tmsize_t wc = cc / 2; - - if ((cc % (2 * stride)) != 0) - { - TIFFErrorExtR(tif, "horDiff8", "%s", "(cc%(2*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - wp += wc - 1; - do - { - REPEAT4(stride, wp[stride] = (uint16_t)(((unsigned int)wp[stride] - - (unsigned int)wp[0]) & - 0xffff); - wp--) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int swabHorDiff16(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint16_t *wp = (uint16_t *)cp0; - tmsize_t wc = cc / 2; - - if (!horDiff16(tif, cp0, cc)) - return 0; - - TIFFSwabArrayOfShort(wp, wc); - return 1; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - TIFFPredictorState *sp = PredictorState(tif); - tmsize_t stride = sp->stride; - uint32_t *wp = (uint32_t *)cp0; - tmsize_t wc = cc / 4; - - if ((cc % (4 * stride)) != 0) - { - TIFFErrorExtR(tif, "horDiff32", "%s", "(cc%(4*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - wp += wc - 1; - do - { - REPEAT4(stride, wp[stride] -= wp[0]; wp--) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int swabHorDiff32(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint32_t *wp = (uint32_t *)cp0; - tmsize_t wc = cc / 4; - - if (!horDiff32(tif, cp0, cc)) - return 0; - - TIFFSwabArrayOfLong(wp, wc); - return 1; -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int horDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - TIFFPredictorState *sp = PredictorState(tif); - tmsize_t stride = sp->stride; - uint64_t *wp = (uint64_t *)cp0; - tmsize_t wc = cc / 8; - - if ((cc % (8 * stride)) != 0) - { - TIFFErrorExtR(tif, "horDiff64", "%s", "(cc%(8*stride))!=0"); - return 0; - } - - if (wc > stride) - { - wc -= stride; - wp += wc - 1; - do - { - REPEAT4(stride, wp[stride] -= wp[0]; wp--) - wc -= stride; - } while (wc > 0); - } - return 1; -} - -static int swabHorDiff64(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - uint64_t *wp = (uint64_t *)cp0; - tmsize_t wc = cc / 8; - - if (!horDiff64(tif, cp0, cc)) - return 0; - - TIFFSwabArrayOfLong8(wp, wc); - return 1; -} - -/* - * Floating point predictor differencing routine. - */ -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static int fpDiff(TIFF *tif, uint8_t *cp0, tmsize_t cc) -{ - tmsize_t stride = PredictorState(tif)->stride; - uint32_t bps = tif->tif_dir.td_bitspersample / 8; - tmsize_t wc = cc / bps; - tmsize_t count; - uint8_t *cp = (uint8_t *)cp0; - uint8_t *tmp; - - if ((cc % (bps * stride)) != 0) - { - TIFFErrorExtR(tif, "fpDiff", "%s", "(cc%(bps*stride))!=0"); - return 0; - } - - tmp = (uint8_t *)_TIFFmallocExt(tif, cc); - if (!tmp) - return 0; - - _TIFFmemcpy(tmp, cp0, cc); - for (count = 0; count < wc; count++) - { - uint32_t byte; - for (byte = 0; byte < bps; byte++) - { -#if WORDS_BIGENDIAN - cp[byte * wc + count] = tmp[bps * count + byte]; -#else - cp[(bps - byte - 1) * wc + count] = tmp[bps * count + byte]; -#endif - } - } - _TIFFfreeExt(tif, tmp); - - cp = (uint8_t *)cp0; - cp += cc - stride - 1; - for (count = cc; count > stride; count -= stride) - REPEAT4(stride, - cp[stride] = (unsigned char)((cp[stride] - cp[0]) & 0xff); - cp--) - return 1; -} - -static int PredictorEncodeRow(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "PredictorEncodeRow"; - TIFFPredictorState *sp = PredictorState(tif); - uint8_t *working_copy; - int result_code; - - assert(sp != NULL); - assert(sp->encodepfunc != NULL); - assert(sp->encoderow != NULL); - - /* - * Do predictor manipulation in a working buffer to avoid altering - * the callers buffer, like for PredictorEncodeTile(). - * https://gitlab.com/libtiff/libtiff/-/issues/5 - */ - working_copy = (uint8_t *)_TIFFmallocExt(tif, cc); - if (working_copy == NULL) - { - TIFFErrorExtR(tif, module, - "Out of memory allocating %" PRId64 " byte temp buffer.", - (int64_t)cc); - return 0; - } - memcpy(working_copy, bp, cc); - - if (!(*sp->encodepfunc)(tif, working_copy, cc)) - { - _TIFFfreeExt(tif, working_copy); - return 0; - } - result_code = (*sp->encoderow)(tif, working_copy, cc, s); - _TIFFfreeExt(tif, working_copy); - return result_code; -} - -static int PredictorEncodeTile(TIFF *tif, uint8_t *bp0, tmsize_t cc0, - uint16_t s) -{ - static const char module[] = "PredictorEncodeTile"; - TIFFPredictorState *sp = PredictorState(tif); - uint8_t *working_copy; - tmsize_t cc = cc0, rowsize; - unsigned char *bp; - int result_code; - - assert(sp != NULL); - assert(sp->encodepfunc != NULL); - assert(sp->encodetile != NULL); - - /* - * Do predictor manipulation in a working buffer to avoid altering - * the callers buffer. http://trac.osgeo.org/gdal/ticket/1965 - */ - working_copy = (uint8_t *)_TIFFmallocExt(tif, cc0); - if (working_copy == NULL) - { - TIFFErrorExtR(tif, module, - "Out of memory allocating %" PRId64 " byte temp buffer.", - (int64_t)cc0); - return 0; - } - memcpy(working_copy, bp0, cc0); - bp = working_copy; - - rowsize = sp->rowsize; - assert(rowsize > 0); - if ((cc0 % rowsize) != 0) - { - TIFFErrorExtR(tif, "PredictorEncodeTile", "%s", "(cc0%rowsize)!=0"); - _TIFFfreeExt(tif, working_copy); - return 0; - } - while (cc > 0) - { - (*sp->encodepfunc)(tif, bp, rowsize); - cc -= rowsize; - bp += rowsize; - } - result_code = (*sp->encodetile)(tif, working_copy, cc0, s); - - _TIFFfreeExt(tif, working_copy); - - return result_code; -} - -#define FIELD_PREDICTOR (FIELD_CODEC + 0) /* XXX */ - -static const TIFFField predictFields[] = { - {TIFFTAG_PREDICTOR, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, - FIELD_PREDICTOR, FALSE, FALSE, "Predictor", NULL}, -}; - -static int PredictorVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->vsetparent != NULL); - - switch (tag) - { - case TIFFTAG_PREDICTOR: - sp->predictor = (uint16_t)va_arg(ap, uint16_vap); - TIFFSetFieldBit(tif, FIELD_PREDICTOR); - break; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - tif->tif_flags |= TIFF_DIRTYDIRECT; - return 1; -} - -static int PredictorVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != NULL); - assert(sp->vgetparent != NULL); - - switch (tag) - { - case TIFFTAG_PREDICTOR: - *va_arg(ap, uint16_t *) = (uint16_t)sp->predictor; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static void PredictorPrintDir(TIFF *tif, FILE *fd, long flags) -{ - TIFFPredictorState *sp = PredictorState(tif); - - (void)flags; - if (TIFFFieldSet(tif, FIELD_PREDICTOR)) - { - fprintf(fd, " Predictor: "); - switch (sp->predictor) - { - case 1: - fprintf(fd, "none "); - break; - case 2: - fprintf(fd, "horizontal differencing "); - break; - case 3: - fprintf(fd, "floating point predictor "); - break; - } - fprintf(fd, "%d (0x%x)\n", sp->predictor, sp->predictor); - } - if (sp->printdir) - (*sp->printdir)(tif, fd, flags); -} - -int TIFFPredictorInit(TIFF *tif) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != 0); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, predictFields, TIFFArrayCount(predictFields))) - { - TIFFErrorExtR(tif, "TIFFPredictorInit", - "Merging Predictor codec-specific tags failed"); - return 0; - } - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = - PredictorVGetField; /* hook for predictor tag */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = - PredictorVSetField; /* hook for predictor tag */ - sp->printdir = tif->tif_tagmethods.printdir; - tif->tif_tagmethods.printdir = - PredictorPrintDir; /* hook for predictor tag */ - - sp->setupdecode = tif->tif_setupdecode; - tif->tif_setupdecode = PredictorSetupDecode; - sp->setupencode = tif->tif_setupencode; - tif->tif_setupencode = PredictorSetupEncode; - - sp->predictor = 1; /* default value */ - sp->encodepfunc = NULL; /* no predictor routine */ - sp->decodepfunc = NULL; /* no predictor routine */ - return 1; -} - -int TIFFPredictorCleanup(TIFF *tif) -{ - TIFFPredictorState *sp = PredictorState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - tif->tif_tagmethods.printdir = sp->printdir; - tif->tif_setupdecode = sp->setupdecode; - tif->tif_setupencode = sp->setupencode; - - return 1; -} diff --git a/third_party/libtiff/libtiff/tif_predict.h b/third_party/libtiff/libtiff/tif_predict.h deleted file mode 100644 index e206392..0000000 --- a/third_party/libtiff/libtiff/tif_predict.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1995-1997 Sam Leffler - * Copyright (c) 1995-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFPREDICT_ -#define _TIFFPREDICT_ - -#include "tiffio.h" -#include "tiffiop.h" - -/* - * ``Library-private'' Support for the Predictor Tag - */ - -typedef int (*TIFFEncodeDecodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size); - -/* - * Codecs that want to support the Predictor tag must place - * this structure first in their private state block so that - * the predictor code can cast tif_data to find its state. - */ -typedef struct -{ - int predictor; /* predictor tag value */ - tmsize_t stride; /* sample stride over data */ - tmsize_t rowsize; /* tile/strip row size */ - - TIFFCodeMethod encoderow; /* parent codec encode/decode row */ - TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */ - TIFFCodeMethod encodetile; /* parent codec encode/decode tile */ - TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */ - - TIFFCodeMethod decoderow; /* parent codec encode/decode row */ - TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */ - TIFFCodeMethod decodetile; /* parent codec encode/decode tile */ - TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */ - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ - TIFFPrintMethod printdir; /* super-class method */ - TIFFBoolMethod setupdecode; /* super-class method */ - TIFFBoolMethod setupencode; /* super-class method */ -} TIFFPredictorState; - -#if defined(__cplusplus) -extern "C" -{ -#endif - extern int TIFFPredictorInit(TIFF *); - extern int TIFFPredictorCleanup(TIFF *); -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFPREDICT_ */ - diff --git a/third_party/libtiff/libtiff/tif_print.c b/third_party/libtiff/libtiff/tif_print.c deleted file mode 100644 index addc03a..0000000 --- a/third_party/libtiff/libtiff/tif_print.c +++ /dev/null @@ -1,756 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Directory Printing Support - */ -#include "tiffiop.h" -#include - -#include - -static void _TIFFprintAsciiBounded(FILE *fd, const char *cp, size_t max_chars); - -static const char *const photoNames[] = { - "min-is-white", /* PHOTOMETRIC_MINISWHITE */ - "min-is-black", /* PHOTOMETRIC_MINISBLACK */ - "RGB color", /* PHOTOMETRIC_RGB */ - "palette color (RGB from colormap)", /* PHOTOMETRIC_PALETTE */ - "transparency mask", /* PHOTOMETRIC_MASK */ - "separated", /* PHOTOMETRIC_SEPARATED */ - "YCbCr", /* PHOTOMETRIC_YCBCR */ - "7 (0x7)", - "CIE L*a*b*", /* PHOTOMETRIC_CIELAB */ - "ICC L*a*b*", /* PHOTOMETRIC_ICCLAB */ - "ITU L*a*b*" /* PHOTOMETRIC_ITULAB */ -}; -#define NPHOTONAMES (sizeof(photoNames) / sizeof(photoNames[0])) - -static const char *const orientNames[] = { - "0 (0x0)", - "row 0 top, col 0 lhs", /* ORIENTATION_TOPLEFT */ - "row 0 top, col 0 rhs", /* ORIENTATION_TOPRIGHT */ - "row 0 bottom, col 0 rhs", /* ORIENTATION_BOTRIGHT */ - "row 0 bottom, col 0 lhs", /* ORIENTATION_BOTLEFT */ - "row 0 lhs, col 0 top", /* ORIENTATION_LEFTTOP */ - "row 0 rhs, col 0 top", /* ORIENTATION_RIGHTTOP */ - "row 0 rhs, col 0 bottom", /* ORIENTATION_RIGHTBOT */ - "row 0 lhs, col 0 bottom", /* ORIENTATION_LEFTBOT */ -}; -#define NORIENTNAMES (sizeof(orientNames) / sizeof(orientNames[0])) - -static const struct tagname -{ - uint16_t tag; - const char *name; -} tagnames[] = { - {TIFFTAG_GDAL_METADATA, "GDAL Metadata"}, - {TIFFTAG_GDAL_NODATA, "GDAL NoDataValue"}, -}; -#define NTAGS (sizeof(tagnames) / sizeof(tagnames[0])) - -static void _TIFFPrintField(FILE *fd, const TIFFField *fip, - uint32_t value_count, void *raw_data) -{ - uint32_t j; - - /* Print a user-friendly name for tags of relatively common use, but */ - /* which aren't registered by libtiff itself. */ - const char *field_name = fip->field_name; - if (TIFFFieldIsAnonymous(fip)) - { - for (size_t i = 0; i < NTAGS; ++i) - { - if (fip->field_tag == tagnames[i].tag) - { - field_name = tagnames[i].name; - break; - } - } - } - fprintf(fd, " %s: ", field_name); - - for (j = 0; j < value_count; j++) - { - if (fip->field_type == TIFF_BYTE) - fprintf(fd, "%" PRIu8, ((uint8_t *)raw_data)[j]); - else if (fip->field_type == TIFF_UNDEFINED) - fprintf(fd, "0x%" PRIx8, ((uint8_t *)raw_data)[j]); - else if (fip->field_type == TIFF_SBYTE) - fprintf(fd, "%" PRId8, ((int8_t *)raw_data)[j]); - else if (fip->field_type == TIFF_SHORT) - fprintf(fd, "%" PRIu16, ((uint16_t *)raw_data)[j]); - else if (fip->field_type == TIFF_SSHORT) - fprintf(fd, "%" PRId16, ((int16_t *)raw_data)[j]); - else if (fip->field_type == TIFF_LONG) - fprintf(fd, "%" PRIu32, ((uint32_t *)raw_data)[j]); - else if (fip->field_type == TIFF_SLONG) - fprintf(fd, "%" PRId32, ((int32_t *)raw_data)[j]); - else if (fip->field_type == TIFF_IFD) - fprintf(fd, "0x%" PRIx32, ((uint32_t *)raw_data)[j]); - else if (fip->field_type == TIFF_RATIONAL || - fip->field_type == TIFF_SRATIONAL) - { - int tv_size = TIFFFieldSetGetSize(fip); - if (tv_size == 8) - fprintf(fd, "%lf", ((double *)raw_data)[j]); - else - fprintf(fd, "%f", ((float *)raw_data)[j]); - } - else if (fip->field_type == TIFF_FLOAT) - fprintf(fd, "%f", ((float *)raw_data)[j]); - else if (fip->field_type == TIFF_LONG8) - fprintf(fd, "%" PRIu64, ((uint64_t *)raw_data)[j]); - else if (fip->field_type == TIFF_SLONG8) - fprintf(fd, "%" PRId64, ((int64_t *)raw_data)[j]); - else if (fip->field_type == TIFF_IFD8) - fprintf(fd, "0x%" PRIx64, ((uint64_t *)raw_data)[j]); - else if (fip->field_type == TIFF_DOUBLE) - fprintf(fd, "%lf", ((double *)raw_data)[j]); - else if (fip->field_type == TIFF_ASCII) - { - fprintf(fd, "%s", (char *)raw_data); - break; - } - else - { - fprintf(fd, ""); - break; - } - - if (j < value_count - 1) - fprintf(fd, ","); - } - - fprintf(fd, "\n"); -} - -static int _TIFFPrettyPrintField(TIFF *tif, const TIFFField *fip, FILE *fd, - uint32_t tag, uint32_t value_count, - void *raw_data) -{ - (void)tif; - - /* do not try to pretty print auto-defined fields */ - if (TIFFFieldIsAnonymous(fip)) - { - return 0; - } - - switch (tag) - { - case TIFFTAG_INKSET: - if (value_count == 2 && fip->field_type == TIFF_SHORT) - { - fprintf(fd, " Ink Set: "); - switch (*((uint16_t *)raw_data)) - { - case INKSET_CMYK: - fprintf(fd, "CMYK\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - *((uint16_t *)raw_data), - *((uint16_t *)raw_data)); - break; - } - return 1; - } - return 0; - - case TIFFTAG_DOTRANGE: - if (value_count == 2 && fip->field_type == TIFF_SHORT) - { - fprintf(fd, " Dot Range: %" PRIu16 "-%" PRIu16 "\n", - ((uint16_t *)raw_data)[0], ((uint16_t *)raw_data)[1]); - return 1; - } - return 0; - - case TIFFTAG_WHITEPOINT: - if (value_count == 2 && fip->field_type == TIFF_RATIONAL) - { - fprintf(fd, " White Point: %g-%g\n", ((float *)raw_data)[0], - ((float *)raw_data)[1]); - return 1; - } - return 0; - - case TIFFTAG_XMLPACKET: - { - uint32_t i; - - fprintf(fd, " XMLPacket (XMP Metadata):\n"); - for (i = 0; i < value_count; i++) - fputc(((char *)raw_data)[i], fd); - fprintf(fd, "\n"); - return 1; - } - case TIFFTAG_RICHTIFFIPTC: - fprintf(fd, " RichTIFFIPTC Data: , %" PRIu32 " bytes\n", - value_count); - return 1; - - case TIFFTAG_PHOTOSHOP: - fprintf(fd, " Photoshop Data: , %" PRIu32 " bytes\n", - value_count); - return 1; - - case TIFFTAG_ICCPROFILE: - fprintf(fd, " ICC Profile: , %" PRIu32 " bytes\n", - value_count); - return 1; - - case TIFFTAG_STONITS: - if (value_count == 1 && fip->field_type == TIFF_DOUBLE) - { - fprintf(fd, " Sample to Nits conversion factor: %.4e\n", - *((double *)raw_data)); - return 1; - } - return 0; - } - - return 0; -} - -/* - * Print the contents of the current directory - * to the specified stdio file stream. - */ -void TIFFPrintDirectory(TIFF *tif, FILE *fd, long flags) -{ - TIFFDirectory *td = &tif->tif_dir; - char *sep; - long l, n; - - fprintf(fd, "TIFF Directory at offset 0x%" PRIx64 " (%" PRIu64 ")\n", - tif->tif_diroff, tif->tif_diroff); - if (TIFFFieldSet(tif, FIELD_SUBFILETYPE)) - { - fprintf(fd, " Subfile Type:"); - sep = " "; - if (td->td_subfiletype & FILETYPE_REDUCEDIMAGE) - { - fprintf(fd, "%sreduced-resolution image", sep); - sep = "/"; - } - if (td->td_subfiletype & FILETYPE_PAGE) - { - fprintf(fd, "%smulti-page document", sep); - sep = "/"; - } - if (td->td_subfiletype & FILETYPE_MASK) - fprintf(fd, "%stransparency mask", sep); - fprintf(fd, " (%" PRIu32 " = 0x%" PRIx32 ")\n", td->td_subfiletype, - td->td_subfiletype); - } - if (TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) - { - fprintf(fd, " Image Width: %" PRIu32 " Image Length: %" PRIu32, - td->td_imagewidth, td->td_imagelength); - if (TIFFFieldSet(tif, FIELD_IMAGEDEPTH)) - fprintf(fd, " Image Depth: %" PRIu32, td->td_imagedepth); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) - { - fprintf(fd, " Tile Width: %" PRIu32 " Tile Length: %" PRIu32, - td->td_tilewidth, td->td_tilelength); - if (TIFFFieldSet(tif, FIELD_TILEDEPTH)) - fprintf(fd, " Tile Depth: %" PRIu32, td->td_tiledepth); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_RESOLUTION)) - { - fprintf(fd, " Resolution: %g, %g", td->td_xresolution, - td->td_yresolution); - if (TIFFFieldSet(tif, FIELD_RESOLUTIONUNIT)) - { - switch (td->td_resolutionunit) - { - case RESUNIT_NONE: - fprintf(fd, " (unitless)"); - break; - case RESUNIT_INCH: - fprintf(fd, " pixels/inch"); - break; - case RESUNIT_CENTIMETER: - fprintf(fd, " pixels/cm"); - break; - default: - fprintf(fd, " (unit %" PRIu16 " = 0x%" PRIx16 ")", - td->td_resolutionunit, td->td_resolutionunit); - break; - } - } - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_POSITION)) - fprintf(fd, " Position: %g, %g\n", td->td_xposition, td->td_yposition); - if (TIFFFieldSet(tif, FIELD_BITSPERSAMPLE)) - fprintf(fd, " Bits/Sample: %" PRIu16 "\n", td->td_bitspersample); - if (TIFFFieldSet(tif, FIELD_SAMPLEFORMAT)) - { - fprintf(fd, " Sample Format: "); - switch (td->td_sampleformat) - { - case SAMPLEFORMAT_VOID: - fprintf(fd, "void\n"); - break; - case SAMPLEFORMAT_INT: - fprintf(fd, "signed integer\n"); - break; - case SAMPLEFORMAT_UINT: - fprintf(fd, "unsigned integer\n"); - break; - case SAMPLEFORMAT_IEEEFP: - fprintf(fd, "IEEE floating point\n"); - break; - case SAMPLEFORMAT_COMPLEXINT: - fprintf(fd, "complex signed integer\n"); - break; - case SAMPLEFORMAT_COMPLEXIEEEFP: - fprintf(fd, "complex IEEE floating point\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - td->td_sampleformat, td->td_sampleformat); - break; - } - } - if (TIFFFieldSet(tif, FIELD_COMPRESSION)) - { - const TIFFCodec *c = TIFFFindCODEC(td->td_compression); - fprintf(fd, " Compression Scheme: "); - if (c) - fprintf(fd, "%s\n", c->name); - else - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", td->td_compression, - td->td_compression); - } - if (TIFFFieldSet(tif, FIELD_PHOTOMETRIC)) - { - fprintf(fd, " Photometric Interpretation: "); - if (td->td_photometric < NPHOTONAMES) - fprintf(fd, "%s\n", photoNames[td->td_photometric]); - else - { - switch (td->td_photometric) - { - case PHOTOMETRIC_LOGL: - fprintf(fd, "CIE Log2(L)\n"); - break; - case PHOTOMETRIC_LOGLUV: - fprintf(fd, "CIE Log2(L) (u',v')\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - td->td_photometric, td->td_photometric); - break; - } - } - } - if (TIFFFieldSet(tif, FIELD_EXTRASAMPLES) && td->td_extrasamples) - { - uint16_t i; - fprintf(fd, " Extra Samples: %" PRIu16 "<", td->td_extrasamples); - sep = ""; - for (i = 0; i < td->td_extrasamples; i++) - { - switch (td->td_sampleinfo[i]) - { - case EXTRASAMPLE_UNSPECIFIED: - fprintf(fd, "%sunspecified", sep); - break; - case EXTRASAMPLE_ASSOCALPHA: - fprintf(fd, "%sassoc-alpha", sep); - break; - case EXTRASAMPLE_UNASSALPHA: - fprintf(fd, "%sunassoc-alpha", sep); - break; - default: - fprintf(fd, "%s%" PRIu16 " (0x%" PRIx16 ")", sep, - td->td_sampleinfo[i], td->td_sampleinfo[i]); - break; - } - sep = ", "; - } - fprintf(fd, ">\n"); - } - if (TIFFFieldSet(tif, FIELD_INKNAMES)) - { - char *cp; - uint16_t i; - fprintf(fd, " Ink Names: "); - i = td->td_samplesperpixel; - sep = ""; - for (cp = td->td_inknames; - i > 0 && cp < td->td_inknames + td->td_inknameslen; - cp = strchr(cp, '\0') + 1, i--) - { - size_t max_chars = td->td_inknameslen - (cp - td->td_inknames); - fputs(sep, fd); - _TIFFprintAsciiBounded(fd, cp, max_chars); - sep = ", "; - } - fputs("\n", fd); - } - if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) - { - fprintf(fd, " NumberOfInks: %d\n", td->td_numberofinks); - } - if (TIFFFieldSet(tif, FIELD_THRESHHOLDING)) - { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) - { - case THRESHHOLD_BILEVEL: - fprintf(fd, "bilevel art scan\n"); - break; - case THRESHHOLD_HALFTONE: - fprintf(fd, "halftone or dithered scan\n"); - break; - case THRESHHOLD_ERRORDIFFUSE: - fprintf(fd, "error diffused\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - td->td_threshholding, td->td_threshholding); - break; - } - } - if (TIFFFieldSet(tif, FIELD_FILLORDER)) - { - fprintf(fd, " FillOrder: "); - switch (td->td_fillorder) - { - case FILLORDER_MSB2LSB: - fprintf(fd, "msb-to-lsb\n"); - break; - case FILLORDER_LSB2MSB: - fprintf(fd, "lsb-to-msb\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", td->td_fillorder, - td->td_fillorder); - break; - } - } - if (TIFFFieldSet(tif, FIELD_YCBCRSUBSAMPLING)) - { - fprintf(fd, " YCbCr Subsampling: %" PRIu16 ", %" PRIu16 "\n", - td->td_ycbcrsubsampling[0], td->td_ycbcrsubsampling[1]); - } - if (TIFFFieldSet(tif, FIELD_YCBCRPOSITIONING)) - { - fprintf(fd, " YCbCr Positioning: "); - switch (td->td_ycbcrpositioning) - { - case YCBCRPOSITION_CENTERED: - fprintf(fd, "centered\n"); - break; - case YCBCRPOSITION_COSITED: - fprintf(fd, "cosited\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - td->td_ycbcrpositioning, td->td_ycbcrpositioning); - break; - } - } - if (TIFFFieldSet(tif, FIELD_HALFTONEHINTS)) - fprintf(fd, " Halftone Hints: light %" PRIu16 " dark %" PRIu16 "\n", - td->td_halftonehints[0], td->td_halftonehints[1]); - if (TIFFFieldSet(tif, FIELD_ORIENTATION)) - { - fprintf(fd, " Orientation: "); - if (td->td_orientation < NORIENTNAMES) - fprintf(fd, "%s\n", orientNames[td->td_orientation]); - else - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", td->td_orientation, - td->td_orientation); - } - if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) - fprintf(fd, " Samples/Pixel: %" PRIx16 "\n", td->td_samplesperpixel); - if (TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) - { - fprintf(fd, " Rows/Strip: "); - if (td->td_rowsperstrip == (uint32_t)-1) - fprintf(fd, "(infinite)\n"); - else - fprintf(fd, "%" PRIu32 "\n", td->td_rowsperstrip); - } - if (TIFFFieldSet(tif, FIELD_MINSAMPLEVALUE)) - fprintf(fd, " Min Sample Value: %" PRIu16 "\n", td->td_minsamplevalue); - if (TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE)) - fprintf(fd, " Max Sample Value: %" PRIu16 "\n", td->td_maxsamplevalue); - if (TIFFFieldSet(tif, FIELD_SMINSAMPLEVALUE)) - { - int i; - int count = - (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; - fprintf(fd, " SMin Sample Value:"); - for (i = 0; i < count; ++i) - fprintf(fd, " %g", td->td_sminsamplevalue[i]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_SMAXSAMPLEVALUE)) - { - int i; - int count = - (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; - fprintf(fd, " SMax Sample Value:"); - for (i = 0; i < count; ++i) - fprintf(fd, " %g", td->td_smaxsamplevalue[i]); - fprintf(fd, "\n"); - } - if (TIFFFieldSet(tif, FIELD_PLANARCONFIG)) - { - fprintf(fd, " Planar Configuration: "); - switch (td->td_planarconfig) - { - case PLANARCONFIG_CONTIG: - fprintf(fd, "single image plane\n"); - break; - case PLANARCONFIG_SEPARATE: - fprintf(fd, "separate image planes\n"); - break; - default: - fprintf(fd, "%" PRIu16 " (0x%" PRIx16 ")\n", - td->td_planarconfig, td->td_planarconfig); - break; - } - } - if (TIFFFieldSet(tif, FIELD_PAGENUMBER)) - fprintf(fd, " Page Number: %" PRIu16 "-%" PRIu16 "\n", - td->td_pagenumber[0], td->td_pagenumber[1]); - if (TIFFFieldSet(tif, FIELD_COLORMAP)) - { - fprintf(fd, " Color Map: "); - if (flags & TIFFPRINT_COLORMAP) - { - fprintf(fd, "\n"); - n = 1L << td->td_bitspersample; - for (l = 0; l < n; l++) - fprintf(fd, " %5ld: %5" PRIu16 " %5" PRIu16 " %5" PRIu16 "\n", - l, td->td_colormap[0][l], td->td_colormap[1][l], - td->td_colormap[2][l]); - } - else - fprintf(fd, "(present)\n"); - } - if (TIFFFieldSet(tif, FIELD_REFBLACKWHITE)) - { - int i; - fprintf(fd, " Reference Black/White:\n"); - for (i = 0; i < 3; i++) - fprintf(fd, " %2d: %5g %5g\n", i, - td->td_refblackwhite[2 * i + 0], - td->td_refblackwhite[2 * i + 1]); - } - if (TIFFFieldSet(tif, FIELD_TRANSFERFUNCTION)) - { - fprintf(fd, " Transfer Function: "); - if (flags & TIFFPRINT_CURVES) - { - fprintf(fd, "\n"); - n = 1L << td->td_bitspersample; - for (l = 0; l < n; l++) - { - uint16_t i; - fprintf(fd, " %2ld: %5" PRIu16, l, - td->td_transferfunction[0][l]); - for (i = 1; - i < td->td_samplesperpixel - td->td_extrasamples && i < 3; - i++) - fprintf(fd, " %5" PRIu16, td->td_transferfunction[i][l]); - fputc('\n', fd); - } - } - else - fprintf(fd, "(present)\n"); - } - if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) - { - uint16_t i; - fprintf(fd, " SubIFD Offsets:"); - for (i = 0; i < td->td_nsubifd; i++) - fprintf(fd, " %5" PRIu64, td->td_subifd[i]); - fputc('\n', fd); - } - - /* - ** Custom tag support. - */ - { - int i; - short count; - - count = (short)TIFFGetTagListCount(tif); - for (i = 0; i < count; i++) - { - uint32_t tag = TIFFGetTagListEntry(tif, i); - const TIFFField *fip; - uint32_t value_count; - int mem_alloc = 0; - void *raw_data = NULL; - uint16_t dotrange[2]; /* must be kept in that scope and not moved in - the below TIFFTAG_DOTRANGE specific case */ - - fip = TIFFFieldWithTag(tif, tag); - if (fip == NULL) - continue; - - if (fip->field_passcount) - { - if (fip->field_readcount == TIFF_VARIABLE2) - { - if (TIFFGetField(tif, tag, &value_count, &raw_data) != 1) - continue; - } - else if (fip->field_readcount == TIFF_VARIABLE) - { - uint16_t small_value_count; - if (TIFFGetField(tif, tag, &small_value_count, &raw_data) != - 1) - continue; - value_count = small_value_count; - } - else - { - assert(fip->field_readcount == TIFF_VARIABLE || - fip->field_readcount == TIFF_VARIABLE2); - continue; - } - } - else - { - if (fip->field_readcount == TIFF_VARIABLE || - fip->field_readcount == TIFF_VARIABLE2) - value_count = 1; - else if (fip->field_readcount == TIFF_SPP) - value_count = td->td_samplesperpixel; - else - value_count = fip->field_readcount; - if (fip->field_tag == TIFFTAG_DOTRANGE && - strcmp(fip->field_name, "DotRange") == 0) - { - /* TODO: This is an evil exception and should not have been - handled this way ... likely best if we move it into - the directory structure with an explicit field in - libtiff 4.1 and assign it a FIELD_ value */ - raw_data = dotrange; - TIFFGetField(tif, tag, dotrange + 0, dotrange + 1); - } - else if (fip->field_type == TIFF_ASCII || - fip->field_readcount == TIFF_VARIABLE || - fip->field_readcount == TIFF_VARIABLE2 || - fip->field_readcount == TIFF_SPP || value_count > 1) - { - if (TIFFGetField(tif, tag, &raw_data) != 1) - continue; - } - else - { - /*--: Rational2Double: For Rationals evaluate - * "set_get_field_type" to determine internal storage size. - */ - int tv_size = TIFFFieldSetGetSize(fip); - raw_data = _TIFFmallocExt(tif, tv_size * value_count); - mem_alloc = 1; - if (TIFFGetField(tif, tag, raw_data) != 1) - { - _TIFFfreeExt(tif, raw_data); - continue; - } - } - } - - /* - * Catch the tags which needs to be specially handled - * and pretty print them. If tag not handled in - * _TIFFPrettyPrintField() fall down and print it as - * any other tag. - */ - if (raw_data != NULL && - !_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, - raw_data)) - _TIFFPrintField(fd, fip, value_count, raw_data); - - if (mem_alloc) - _TIFFfreeExt(tif, raw_data); - } - } - - if (tif->tif_tagmethods.printdir) - (*tif->tif_tagmethods.printdir)(tif, fd, flags); - - if ((flags & TIFFPRINT_STRIPS) && TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) - { - uint32_t s; - - fprintf(fd, " %" PRIu32 " %s:\n", td->td_nstrips, - isTiled(tif) ? "Tiles" : "Strips"); - for (s = 0; s < td->td_nstrips; s++) - fprintf(fd, " %3" PRIu32 ": [%8" PRIu64 ", %8" PRIu64 "]\n", s, - TIFFGetStrileOffset(tif, s), - TIFFGetStrileByteCount(tif, s)); - } -} - -void _TIFFprintAscii(FILE *fd, const char *cp) -{ - _TIFFprintAsciiBounded(fd, cp, strlen(cp)); -} - -static void _TIFFprintAsciiBounded(FILE *fd, const char *cp, size_t max_chars) -{ - for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) - { - const char *tp; - - if (isprint((int)*cp)) - { - fputc(*cp, fd); - continue; - } - for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++) - if (*tp++ == *cp) - break; - if (*tp) - fprintf(fd, "\\%c", *tp); - else - fprintf(fd, "\\%03o", *cp & 0xff); - } -} - -void _TIFFprintAsciiTag(FILE *fd, const char *name, const char *value) -{ - fprintf(fd, " %s: \"", name); - _TIFFprintAscii(fd, value); - fprintf(fd, "\"\n"); -} diff --git a/third_party/libtiff/libtiff/tif_read.c b/third_party/libtiff/libtiff/tif_read.c deleted file mode 100644 index a2bb304..0000000 --- a/third_party/libtiff/libtiff/tif_read.c +++ /dev/null @@ -1,1681 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * Scanline-oriented Read Support - */ -#include "tiffiop.h" -#include - -int TIFFFillStrip(TIFF *tif, uint32_t strip); -int TIFFFillTile(TIFF *tif, uint32_t tile); -static int TIFFStartStrip(TIFF *tif, uint32_t strip); -static int TIFFStartTile(TIFF *tif, uint32_t tile); -static int TIFFCheckRead(TIFF *, int); -static tmsize_t TIFFReadRawStrip1(TIFF *tif, uint32_t strip, void *buf, - tmsize_t size, const char *module); -static tmsize_t TIFFReadRawTile1(TIFF *tif, uint32_t tile, void *buf, - tmsize_t size, const char *module); - -#define NOSTRIP ((uint32_t)(-1)) /* undefined state */ -#define NOTILE ((uint32_t)(-1)) /* undefined state */ - -#define INITIAL_THRESHOLD (1024 * 1024) -#define THRESHOLD_MULTIPLIER 10 -#define MAX_THRESHOLD \ - (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * \ - INITIAL_THRESHOLD) - -#define TIFF_INT64_MAX ((((int64_t)0x7FFFFFFF) << 32) | 0xFFFFFFFF) - -/* Read 'size' bytes in tif_rawdata buffer starting at offset 'rawdata_offset' - * Returns 1 in case of success, 0 otherwise. */ -static int TIFFReadAndRealloc(TIFF *tif, tmsize_t size, tmsize_t rawdata_offset, - int is_strip, uint32_t strip_or_tile, - const char *module) -{ -#if SIZEOF_SIZE_T == 8 - tmsize_t threshold = INITIAL_THRESHOLD; -#endif - tmsize_t already_read = 0; - -#if SIZEOF_SIZE_T != 8 - /* On 32 bit processes, if the request is large enough, check against */ - /* file size */ - if (size > 1000 * 1000 * 1000) - { - uint64_t filesize = TIFFGetFileSize(tif); - if ((uint64_t)size >= filesize) - { - TIFFErrorExtR(tif, module, - "Chunk size requested is larger than file size."); - return 0; - } - } -#endif - - /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ - /* so as to avoid allocating too much memory in case the file is too */ - /* short. We could ask for the file size, but this might be */ - /* expensive with some I/O layers (think of reading a gzipped file) */ - /* Restrict to 64 bit processes, so as to avoid reallocs() */ - /* on 32 bit processes where virtual memory is scarce. */ - while (already_read < size) - { - tmsize_t bytes_read; - tmsize_t to_read = size - already_read; -#if SIZEOF_SIZE_T == 8 - if (to_read >= threshold && threshold < MAX_THRESHOLD && - already_read + to_read + rawdata_offset > tif->tif_rawdatasize) - { - to_read = threshold; - threshold *= THRESHOLD_MULTIPLIER; - } -#endif - if (already_read + to_read + rawdata_offset > tif->tif_rawdatasize) - { - uint8_t *new_rawdata; - assert((tif->tif_flags & TIFF_MYBUFFER) != 0); - tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64( - (uint64_t)already_read + to_read + rawdata_offset, 1024); - if (tif->tif_rawdatasize == 0) - { - TIFFErrorExtR(tif, module, "Invalid buffer size"); - return 0; - } - new_rawdata = (uint8_t *)_TIFFreallocExt(tif, tif->tif_rawdata, - tif->tif_rawdatasize); - if (new_rawdata == 0) - { - TIFFErrorExtR(tif, module, - "No space for data buffer at scanline %" PRIu32, - tif->tif_row); - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = 0; - tif->tif_rawdatasize = 0; - return 0; - } - tif->tif_rawdata = new_rawdata; - } - if (tif->tif_rawdata == NULL) - { - /* should not happen in practice but helps CoverityScan */ - return 0; - } - - bytes_read = TIFFReadFile( - tif, tif->tif_rawdata + rawdata_offset + already_read, to_read); - already_read += bytes_read; - if (bytes_read != to_read) - { - memset(tif->tif_rawdata + rawdata_offset + already_read, 0, - tif->tif_rawdatasize - rawdata_offset - already_read); - if (is_strip) - { - TIFFErrorExtR(tif, module, - "Read error at scanline %" PRIu32 - "; got %" TIFF_SSIZE_FORMAT " bytes, " - "expected %" TIFF_SSIZE_FORMAT, - tif->tif_row, already_read, size); - } - else - { - TIFFErrorExtR(tif, module, - "Read error at row %" PRIu32 ", col %" PRIu32 - ", tile %" PRIu32 "; " - "got %" TIFF_SSIZE_FORMAT - " bytes, expected %" TIFF_SSIZE_FORMAT "", - tif->tif_row, tif->tif_col, strip_or_tile, - already_read, size); - } - return 0; - } - } - return 1; -} - -static int TIFFFillStripPartial(TIFF *tif, int strip, tmsize_t read_ahead, - int restart) -{ - static const char module[] = "TIFFFillStripPartial"; - register TIFFDirectory *td = &tif->tif_dir; - tmsize_t unused_data; - uint64_t read_offset; - tmsize_t to_read; - tmsize_t read_ahead_mod; - /* tmsize_t bytecountm; */ - - /* - * Expand raw data buffer, if needed, to hold data - * strip coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - - /* bytecountm=(tmsize_t) TIFFGetStrileByteCount(tif, strip); */ - - /* Not completely sure where the * 2 comes from, but probably for */ - /* an exponentional growth strategy of tif_rawdatasize */ - if (read_ahead < TIFF_TMSIZE_T_MAX / 2) - read_ahead_mod = read_ahead * 2; - else - read_ahead_mod = read_ahead; - if (read_ahead_mod > tif->tif_rawdatasize) - { - assert(restart); - - tif->tif_curstrip = NOSTRIP; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) - { - TIFFErrorExtR(tif, module, - "Data buffer too small to hold part of strip %d", - strip); - return (0); - } - } - - if (restart) - { - tif->tif_rawdataloaded = 0; - tif->tif_rawdataoff = 0; - } - - /* - ** If we are reading more data, move any unused data to the - ** start of the buffer. - */ - if (tif->tif_rawdataloaded > 0) - unused_data = - tif->tif_rawdataloaded - (tif->tif_rawcp - tif->tif_rawdata); - else - unused_data = 0; - - if (unused_data > 0) - { - assert((tif->tif_flags & TIFF_BUFFERMMAP) == 0); - memmove(tif->tif_rawdata, tif->tif_rawcp, unused_data); - } - - /* - ** Seek to the point in the file where more data should be read. - */ - read_offset = TIFFGetStrileOffset(tif, strip) + tif->tif_rawdataoff + - tif->tif_rawdataloaded; - - if (!SeekOK(tif, read_offset)) - { - TIFFErrorExtR(tif, module, - "Seek error at scanline %" PRIu32 ", strip %d", - tif->tif_row, strip); - return 0; - } - - /* - ** How much do we want to read? - */ - if (read_ahead_mod > tif->tif_rawdatasize) - to_read = read_ahead_mod - unused_data; - else - to_read = tif->tif_rawdatasize - unused_data; - if ((uint64_t)to_read > TIFFGetStrileByteCount(tif, strip) - - tif->tif_rawdataoff - tif->tif_rawdataloaded) - { - to_read = (tmsize_t)TIFFGetStrileByteCount(tif, strip) - - tif->tif_rawdataoff - tif->tif_rawdataloaded; - } - - assert((tif->tif_flags & TIFF_BUFFERMMAP) == 0); - if (!TIFFReadAndRealloc(tif, to_read, unused_data, 1, /* is_strip */ - 0, /* strip_or_tile */ - module)) - { - return 0; - } - - tif->tif_rawdataoff = - tif->tif_rawdataoff + tif->tif_rawdataloaded - unused_data; - tif->tif_rawdataloaded = unused_data + to_read; - - tif->tif_rawcc = tif->tif_rawdataloaded; - tif->tif_rawcp = tif->tif_rawdata; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - { - assert((tif->tif_flags & TIFF_BUFFERMMAP) == 0); - TIFFReverseBits(tif->tif_rawdata + unused_data, to_read); - } - - /* - ** When starting a strip from the beginning we need to - ** restart the decoder. - */ - if (restart) - { - -#ifdef JPEG_SUPPORT - /* A bit messy since breaks the codec abstraction. Ultimately */ - /* there should be a function pointer for that, but it seems */ - /* only JPEG is affected. */ - /* For JPEG, if there are multiple scans (can generally be known */ - /* with the read_ahead used), we need to read the whole strip */ - if (tif->tif_dir.td_compression == COMPRESSION_JPEG && - (uint64_t)tif->tif_rawcc < TIFFGetStrileByteCount(tif, strip)) - { - if (TIFFJPEGIsFullStripRequired(tif)) - { - return TIFFFillStrip(tif, strip); - } - } -#endif - - return TIFFStartStrip(tif, strip); - } - else - { - return 1; - } -} - -/* - * Seek to a random row+sample in a file. - * - * Only used by TIFFReadScanline, and is only used on - * strip organized files. We do some tricky stuff to try - * and avoid reading the whole compressed raw data for big - * strips. - */ -static int TIFFSeek(TIFF *tif, uint32_t row, uint16_t sample) -{ - register TIFFDirectory *td = &tif->tif_dir; - uint32_t strip; - int whole_strip; - tmsize_t read_ahead = 0; - - /* - ** Establish what strip we are working from. - */ - if (row >= td->td_imagelength) - { /* out of range */ - TIFFErrorExtR(tif, tif->tif_name, - "%" PRIu32 ": Row out of range, max %" PRIu32 "", row, - td->td_imagelength); - return (0); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - if (sample >= td->td_samplesperpixel) - { - TIFFErrorExtR(tif, tif->tif_name, - "%" PRIu16 ": Sample out of range, max %" PRIu16 "", - sample, td->td_samplesperpixel); - return (0); - } - strip = (uint32_t)sample * td->td_stripsperimage + - row / td->td_rowsperstrip; - } - else - strip = row / td->td_rowsperstrip; - - /* - * Do we want to treat this strip as one whole chunk or - * read it a few lines at a time? - */ -#if defined(CHUNKY_STRIP_READ_SUPPORT) - whole_strip = TIFFGetStrileByteCount(tif, strip) < 10 || isMapped(tif); - if (td->td_compression == COMPRESSION_LERC || - td->td_compression == COMPRESSION_JBIG) - { - /* Ideally plugins should have a way to declare they don't support - * chunk strip */ - whole_strip = 1; - } - - if (!whole_strip) - { - /* 16 is for YCbCr mode where we may need to read 16 */ - /* lines at a time to get a decompressed line, and 5000 */ - /* is some constant value, for example for JPEG tables */ - - /* coverity[dead_error_line:SUPPRESS] */ - if (tif->tif_scanlinesize < TIFF_TMSIZE_T_MAX / 16 && - tif->tif_scanlinesize * 16 < TIFF_TMSIZE_T_MAX - 5000) - { - read_ahead = tif->tif_scanlinesize * 16 + 5000; - } - else - { - read_ahead = tif->tif_scanlinesize; - } - } -#else - whole_strip = 1; -#endif - - /* - * If we haven't loaded this strip, do so now, possibly - * only reading the first part. - */ - if (strip != tif->tif_curstrip) - { /* different strip, refill */ - - if (whole_strip) - { - if (!TIFFFillStrip(tif, strip)) - return (0); - } -#if defined(CHUNKY_STRIP_READ_SUPPORT) - else - { - if (!TIFFFillStripPartial(tif, strip, read_ahead, 1)) - return 0; - } -#endif - } - -#if defined(CHUNKY_STRIP_READ_SUPPORT) - /* - ** If we already have some data loaded, do we need to read some more? - */ - else if (!whole_strip) - { - /* coverity[dead_error_line:SUPPRESS] */ - if (((tif->tif_rawdata + tif->tif_rawdataloaded) - tif->tif_rawcp) < - read_ahead && - (uint64_t)tif->tif_rawdataoff + tif->tif_rawdataloaded < - TIFFGetStrileByteCount(tif, strip)) - { - if (!TIFFFillStripPartial(tif, strip, read_ahead, 0)) - return 0; - } - } -#endif - - if (row < tif->tif_row) - { - /* - * Moving backwards within the same strip: backup - * to the start and then decode forward (below). - * - * NB: If you're planning on lots of random access within a - * strip, it's better to just read and decode the entire - * strip, and then access the decoded data in a random fashion. - */ - - if (tif->tif_rawdataoff != 0) - { - if (!TIFFFillStripPartial(tif, strip, read_ahead, 1)) - return 0; - } - else - { - if (!TIFFStartStrip(tif, strip)) - return (0); - } - } - - if (row != tif->tif_row) - { - /* - * Seek forward to the desired row. - */ - - /* TODO: Will this really work with partial buffers? */ - - if (!(*tif->tif_seek)(tif, row - tif->tif_row)) - return (0); - tif->tif_row = row; - } - - return (1); -} - -int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample) -{ - int e; - - if (!TIFFCheckRead(tif, 0)) - return (-1); - if ((e = TIFFSeek(tif, row, sample)) != 0) - { - /* - * Decompress desired row into user buffer. - */ - e = (*tif->tif_decoderow)(tif, (uint8_t *)buf, tif->tif_scanlinesize, - sample); - - /* we are now poised at the beginning of the next row */ - tif->tif_row = row + 1; - - if (e) - (*tif->tif_postdecode)(tif, (uint8_t *)buf, tif->tif_scanlinesize); - } - else - { - /* See TIFFReadEncodedStrip comment regarding TIFFTAG_FAXFILLFUNC. */ - if (buf) - memset(buf, 0, (size_t)tif->tif_scanlinesize); - } - return (e > 0 ? 1 : -1); -} - -/* - * Calculate the strip size according to the number of - * rows in the strip (check for truncated last strip on any - * of the separations). - */ -static tmsize_t TIFFReadEncodedStripGetStripSize(TIFF *tif, uint32_t strip, - uint16_t *pplane) -{ - static const char module[] = "TIFFReadEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint32_t rowsperstrip; - uint32_t stripsperplane; - uint32_t stripinplane; - uint32_t rows; - tmsize_t stripsize; - if (!TIFFCheckRead(tif, 0)) - return ((tmsize_t)(-1)); - if (strip >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, - "%" PRIu32 ": Strip out of range, max %" PRIu32, strip, - td->td_nstrips); - return ((tmsize_t)(-1)); - } - - rowsperstrip = td->td_rowsperstrip; - if (rowsperstrip > td->td_imagelength) - rowsperstrip = td->td_imagelength; - if (rowsperstrip == 0) - { - TIFFErrorExtR(tif, module, "rowsperstrip is zero"); - return ((tmsize_t)(-1)); - } - stripsperplane = - TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); - stripinplane = (strip % stripsperplane); - if (pplane) - *pplane = (uint16_t)(strip / stripsperplane); - rows = td->td_imagelength - stripinplane * rowsperstrip; - if (rows > rowsperstrip) - rows = rowsperstrip; - stripsize = TIFFVStripSize(tif, rows); - if (stripsize == 0) - return ((tmsize_t)(-1)); - return stripsize; -} - -/* - * Read a strip of data and decompress the specified - * amount into the user-supplied buffer. - */ -tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, - tmsize_t size) -{ - static const char module[] = "TIFFReadEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t stripsize; - uint16_t plane; - - stripsize = TIFFReadEncodedStripGetStripSize(tif, strip, &plane); - if (stripsize == ((tmsize_t)(-1))) - return ((tmsize_t)(-1)); - - /* shortcut to avoid an extra memcpy() */ - if (td->td_compression == COMPRESSION_NONE && size != (tmsize_t)(-1) && - size >= stripsize && !isMapped(tif) && - ((tif->tif_flags & TIFF_NOREADRAW) == 0)) - { - if (TIFFReadRawStrip1(tif, strip, buf, stripsize, module) != stripsize) - return ((tmsize_t)(-1)); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(buf, stripsize); - - (*tif->tif_postdecode)(tif, buf, stripsize); - return (stripsize); - } - - if ((size != (tmsize_t)(-1)) && (size < stripsize)) - stripsize = size; - if (!TIFFFillStrip(tif, strip)) - { - /* The output buf may be NULL, in particular if TIFFTAG_FAXFILLFUNC - is being used. Thus, memset must be conditional on buf not NULL. */ - if (buf) - memset(buf, 0, (size_t)stripsize); - return ((tmsize_t)(-1)); - } - if ((*tif->tif_decodestrip)(tif, buf, stripsize, plane) <= 0) - return ((tmsize_t)(-1)); - (*tif->tif_postdecode)(tif, buf, stripsize); - return (stripsize); -} - -/* Variant of TIFFReadEncodedStrip() that does - * * if *buf == NULL, *buf = _TIFFmallocExt(tif, bufsizetoalloc) only after - * TIFFFillStrip() has succeeded. This avoid excessive memory allocation in case - * of truncated file. - * * calls regular TIFFReadEncodedStrip() if *buf != NULL - */ -tmsize_t _TIFFReadEncodedStripAndAllocBuffer(TIFF *tif, uint32_t strip, - void **buf, - tmsize_t bufsizetoalloc, - tmsize_t size_to_read) -{ - tmsize_t this_stripsize; - uint16_t plane; - - if (*buf != NULL) - { - return TIFFReadEncodedStrip(tif, strip, *buf, size_to_read); - } - - this_stripsize = TIFFReadEncodedStripGetStripSize(tif, strip, &plane); - if (this_stripsize == ((tmsize_t)(-1))) - return ((tmsize_t)(-1)); - - if ((size_to_read != (tmsize_t)(-1)) && (size_to_read < this_stripsize)) - this_stripsize = size_to_read; - if (!TIFFFillStrip(tif, strip)) - return ((tmsize_t)(-1)); - - *buf = _TIFFmallocExt(tif, bufsizetoalloc); - if (*buf == NULL) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for strip buffer"); - return ((tmsize_t)(-1)); - } - _TIFFmemset(*buf, 0, bufsizetoalloc); - - if ((*tif->tif_decodestrip)(tif, *buf, this_stripsize, plane) <= 0) - return ((tmsize_t)(-1)); - (*tif->tif_postdecode)(tif, *buf, this_stripsize); - return (this_stripsize); -} - -static tmsize_t TIFFReadRawStrip1(TIFF *tif, uint32_t strip, void *buf, - tmsize_t size, const char *module) -{ - assert((tif->tif_flags & TIFF_NOREADRAW) == 0); - if (!isMapped(tif)) - { - tmsize_t cc; - - if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip))) - { - TIFFErrorExtR(tif, module, - "Seek error at scanline %" PRIu32 ", strip %" PRIu32, - tif->tif_row, strip); - return ((tmsize_t)(-1)); - } - cc = TIFFReadFile(tif, buf, size); - if (cc != size) - { - TIFFErrorExtR(tif, module, - "Read error at scanline %" PRIu32 - "; got %" TIFF_SSIZE_FORMAT - " bytes, expected %" TIFF_SSIZE_FORMAT, - tif->tif_row, cc, size); - return ((tmsize_t)(-1)); - } - } - else - { - tmsize_t ma = 0; - tmsize_t n; - if ((TIFFGetStrileOffset(tif, strip) > (uint64_t)TIFF_TMSIZE_T_MAX) || - ((ma = (tmsize_t)TIFFGetStrileOffset(tif, strip)) > tif->tif_size)) - { - n = 0; - } - else if (ma > TIFF_TMSIZE_T_MAX - size) - { - n = 0; - } - else - { - tmsize_t mb = ma + size; - if (mb > tif->tif_size) - n = tif->tif_size - ma; - else - n = size; - } - if (n != size) - { - TIFFErrorExtR(tif, module, - "Read error at scanline %" PRIu32 ", strip %" PRIu32 - "; got %" TIFF_SSIZE_FORMAT - " bytes, expected %" TIFF_SSIZE_FORMAT, - tif->tif_row, strip, n, size); - return ((tmsize_t)(-1)); - } - _TIFFmemcpy(buf, tif->tif_base + ma, size); - } - return (size); -} - -static tmsize_t TIFFReadRawStripOrTile2(TIFF *tif, uint32_t strip_or_tile, - int is_strip, tmsize_t size, - const char *module) -{ - assert(!isMapped(tif)); - assert((tif->tif_flags & TIFF_NOREADRAW) == 0); - - if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip_or_tile))) - { - if (is_strip) - { - TIFFErrorExtR(tif, module, - "Seek error at scanline %" PRIu32 ", strip %" PRIu32, - tif->tif_row, strip_or_tile); - } - else - { - TIFFErrorExtR(tif, module, - "Seek error at row %" PRIu32 ", col %" PRIu32 - ", tile %" PRIu32, - tif->tif_row, tif->tif_col, strip_or_tile); - } - return ((tmsize_t)(-1)); - } - - if (!TIFFReadAndRealloc(tif, size, 0, is_strip, strip_or_tile, module)) - { - return ((tmsize_t)(-1)); - } - - return (size); -} - -/* - * Read a strip of data from the file. - */ -tmsize_t TIFFReadRawStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size) -{ - static const char module[] = "TIFFReadRawStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t bytecount64; - tmsize_t bytecountm; - - if (!TIFFCheckRead(tif, 0)) - return ((tmsize_t)(-1)); - if (strip >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, - "%" PRIu32 ": Strip out of range, max %" PRIu32, strip, - td->td_nstrips); - return ((tmsize_t)(-1)); - } - if (tif->tif_flags & TIFF_NOREADRAW) - { - TIFFErrorExtR(tif, module, - "Compression scheme does not support access to raw " - "uncompressed data"); - return ((tmsize_t)(-1)); - } - bytecount64 = TIFFGetStrileByteCount(tif, strip); - if (size != (tmsize_t)(-1) && (uint64_t)size <= bytecount64) - bytecountm = size; - else - bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module); - if (bytecountm == 0) - { - return ((tmsize_t)(-1)); - } - return (TIFFReadRawStrip1(tif, strip, buf, bytecountm, module)); -} - -TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -static uint64_t NoSanitizeSubUInt64(uint64_t a, uint64_t b) { return a - b; } - -/* - * Read the specified strip and setup for decoding. The data buffer is - * expanded, as necessary, to hold the strip's data. - */ -int TIFFFillStrip(TIFF *tif, uint32_t strip) -{ - static const char module[] = "TIFFFillStrip"; - TIFFDirectory *td = &tif->tif_dir; - - if ((tif->tif_flags & TIFF_NOREADRAW) == 0) - { - uint64_t bytecount = TIFFGetStrileByteCount(tif, strip); - if (bytecount == 0 || bytecount > (uint64_t)TIFF_INT64_MAX) - { - TIFFErrorExtR(tif, module, - "Invalid strip byte count %" PRIu64 - ", strip %" PRIu32, - bytecount, strip); - return (0); - } - - /* To avoid excessive memory allocations: */ - /* Byte count should normally not be larger than a number of */ - /* times the uncompressed size plus some margin */ - if (bytecount > 1024 * 1024) - { - /* 10 and 4096 are just values that could be adjusted. */ - /* Hopefully they are safe enough for all codecs */ - tmsize_t stripsize = TIFFStripSize(tif); - if (stripsize != 0 && (bytecount - 4096) / 10 > (uint64_t)stripsize) - { - uint64_t newbytecount = (uint64_t)stripsize * 10 + 4096; - TIFFErrorExtR(tif, module, - "Too large strip byte count %" PRIu64 - ", strip %" PRIu32 ". Limiting to %" PRIu64, - bytecount, strip, newbytecount); - bytecount = newbytecount; - } - } - - if (isMapped(tif)) - { - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * TIFFGetStrileOffset(tif, strip)+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64_t)tif->tif_size || - TIFFGetStrileOffset(tif, strip) > - (uint64_t)tif->tif_size - bytecount) - { - /* - * This error message might seem strange, but - * it's what would happen if a read were done - * instead. - */ - TIFFErrorExtR( - tif, module, - - "Read error on strip %" PRIu32 "; " - "got %" PRIu64 " bytes, expected %" PRIu64, - strip, - NoSanitizeSubUInt64(tif->tif_size, - TIFFGetStrileOffset(tif, strip)), - bytecount); - tif->tif_curstrip = NOSTRIP; - return (0); - } - } - - if (isMapped(tif) && (isFillOrder(tif, td->td_fillorder) || - (tif->tif_flags & TIFF_NOBITREV))) - { - /* - * The image is mapped into memory and we either don't - * need to flip bits or the compression routine is - * going to handle this operation itself. In this - * case, avoid copying the raw data and instead just - * reference the data from the memory mapped file - * image. This assumes that the decompression - * routines do not modify the contents of the raw data - * buffer (if they try to, the application will get a - * fault since the file is mapped read-only). - */ - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) - { - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - tif->tif_flags &= ~TIFF_MYBUFFER; - tif->tif_rawdatasize = (tmsize_t)bytecount; - tif->tif_rawdata = - tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, strip); - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = (tmsize_t)bytecount; - - /* - * When we have tif_rawdata reference directly into the memory - * mapped file we need to be pretty careful about how we use the - * rawdata. It is not a general purpose working buffer as it - * normally otherwise is. So we keep track of this fact to avoid - * using it improperly. - */ - tif->tif_flags |= TIFF_BUFFERMMAP; - } - else - { - /* - * Expand raw data buffer, if needed, to hold data - * strip coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - tmsize_t bytecountm; - bytecountm = (tmsize_t)bytecount; - if ((uint64_t)bytecountm != bytecount) - { - TIFFErrorExtR(tif, module, "Integer overflow"); - return (0); - } - if (bytecountm > tif->tif_rawdatasize) - { - tif->tif_curstrip = NOSTRIP; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) - { - TIFFErrorExtR( - tif, module, - "Data buffer too small to hold strip %" PRIu32, strip); - return (0); - } - } - if (tif->tif_flags & TIFF_BUFFERMMAP) - { - tif->tif_curstrip = NOSTRIP; - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - tif->tif_flags &= ~TIFF_BUFFERMMAP; - } - - if (isMapped(tif)) - { - if (bytecountm > tif->tif_rawdatasize && - !TIFFReadBufferSetup(tif, 0, bytecountm)) - { - return (0); - } - if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata, bytecountm, - module) != bytecountm) - { - return (0); - } - } - else - { - if (TIFFReadRawStripOrTile2(tif, strip, 1, bytecountm, - module) != bytecountm) - { - return (0); - } - } - - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = bytecountm; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, bytecountm); - } - } - return (TIFFStartStrip(tif, strip)); -} - -/* - * Tile-oriented Read Support - * Contributed by Nancy Cam (Silicon Graphics). - */ - -/* - * Read and decompress a tile of data. The - * tile is selected by the (x,y,z,s) coordinates. - */ -tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, - uint16_t s) -{ - if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - return (TIFFReadEncodedTile(tif, TIFFComputeTile(tif, x, y, z, s), buf, - (tmsize_t)(-1))); -} - -/* - * Read a tile of data and decompress the specified - * amount into the user-supplied buffer. - */ -tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -{ - static const char module[] = "TIFFReadEncodedTile"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t tilesize = tif->tif_tilesize; - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, - "%" PRIu32 ": Tile out of range, max %" PRIu32, tile, - td->td_nstrips); - return ((tmsize_t)(-1)); - } - - /* shortcut to avoid an extra memcpy() */ - if (td->td_compression == COMPRESSION_NONE && size != (tmsize_t)(-1) && - size >= tilesize && !isMapped(tif) && - ((tif->tif_flags & TIFF_NOREADRAW) == 0)) - { - if (TIFFReadRawTile1(tif, tile, buf, tilesize, module) != tilesize) - return ((tmsize_t)(-1)); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(buf, tilesize); - - (*tif->tif_postdecode)(tif, buf, tilesize); - return (tilesize); - } - - if (size == (tmsize_t)(-1)) - size = tilesize; - else if (size > tilesize) - size = tilesize; - if (!TIFFFillTile(tif, tile)) - { - /* See TIFFReadEncodedStrip comment regarding TIFFTAG_FAXFILLFUNC. */ - if (buf) - memset(buf, 0, (size_t)size); - return ((tmsize_t)(-1)); - } - else if ((*tif->tif_decodetile)(tif, (uint8_t *)buf, size, - (uint16_t)(tile / td->td_stripsperimage))) - { - (*tif->tif_postdecode)(tif, (uint8_t *)buf, size); - return (size); - } - else - return ((tmsize_t)(-1)); -} - -/* Variant of TIFFReadTile() that does - * * if *buf == NULL, *buf = _TIFFmallocExt(tif, bufsizetoalloc) only after - * TIFFFillTile() has succeeded. This avoid excessive memory allocation in case - * of truncated file. - * * calls regular TIFFReadEncodedTile() if *buf != NULL - */ -tmsize_t _TIFFReadTileAndAllocBuffer(TIFF *tif, void **buf, - tmsize_t bufsizetoalloc, uint32_t x, - uint32_t y, uint32_t z, uint16_t s) -{ - if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - return (_TIFFReadEncodedTileAndAllocBuffer( - tif, TIFFComputeTile(tif, x, y, z, s), buf, bufsizetoalloc, - (tmsize_t)(-1))); -} - -/* Variant of TIFFReadEncodedTile() that does - * * if *buf == NULL, *buf = _TIFFmallocExt(tif, bufsizetoalloc) only after - * TIFFFillTile() has succeeded. This avoid excessive memory allocation in case - * of truncated file. - * * calls regular TIFFReadEncodedTile() if *buf != NULL - */ -tmsize_t _TIFFReadEncodedTileAndAllocBuffer(TIFF *tif, uint32_t tile, - void **buf, tmsize_t bufsizetoalloc, - tmsize_t size_to_read) -{ - static const char module[] = "_TIFFReadEncodedTileAndAllocBuffer"; - TIFFDirectory *td = &tif->tif_dir; - tmsize_t tilesize = tif->tif_tilesize; - - if (*buf != NULL) - { - return TIFFReadEncodedTile(tif, tile, *buf, size_to_read); - } - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, - "%" PRIu32 ": Tile out of range, max %" PRIu32, tile, - td->td_nstrips); - return ((tmsize_t)(-1)); - } - - if (!TIFFFillTile(tif, tile)) - return ((tmsize_t)(-1)); - - /* Sanity checks to avoid excessive memory allocation */ - /* Cf https://gitlab.com/libtiff/libtiff/-/issues/479 */ - if (td->td_compression == COMPRESSION_NONE) - { - if (tif->tif_rawdatasize != tilesize) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Invalid tile byte count for tile %u. " - "Expected %" PRIu64 ", got %" PRIu64, - tile, (uint64_t)tilesize, - (uint64_t)tif->tif_rawdatasize); - return ((tmsize_t)(-1)); - } - } - else - { - /* Max compression ratio experimentally determined. Might be fragile... - * Only apply this heuristics to situations where the memory allocation - * would be big, to avoid breaking nominal use cases. - */ - const int maxCompressionRatio = - td->td_compression == COMPRESSION_ZSTD ? 33000 - : td->td_compression == COMPRESSION_JXL - ? - /* Evaluated on a 8000x8000 tile */ - 25000 * (td->td_planarconfig == PLANARCONFIG_CONTIG - ? td->td_samplesperpixel - : 1) - : td->td_compression == COMPRESSION_LZMA ? 7000 : 1000; - if (bufsizetoalloc > 100 * 1000 * 1000 && - tif->tif_rawdatasize < tilesize / maxCompressionRatio) - { - TIFFErrorExtR(tif, TIFFFileName(tif), - "Likely invalid tile byte count for tile %u. " - "Uncompressed tile size is %" PRIu64 ", " - "compressed one is %" PRIu64, - tile, (uint64_t)tilesize, - (uint64_t)tif->tif_rawdatasize); - return ((tmsize_t)(-1)); - } - } - - *buf = _TIFFmallocExt(tif, bufsizetoalloc); - if (*buf == NULL) - { - TIFFErrorExtR(tif, TIFFFileName(tif), "No space for tile buffer"); - return ((tmsize_t)(-1)); - } - _TIFFmemset(*buf, 0, bufsizetoalloc); - - if (size_to_read == (tmsize_t)(-1)) - size_to_read = tilesize; - else if (size_to_read > tilesize) - size_to_read = tilesize; - if ((*tif->tif_decodetile)(tif, (uint8_t *)*buf, size_to_read, - (uint16_t)(tile / td->td_stripsperimage))) - { - (*tif->tif_postdecode)(tif, (uint8_t *)*buf, size_to_read); - return (size_to_read); - } - else - return ((tmsize_t)(-1)); -} - -static tmsize_t TIFFReadRawTile1(TIFF *tif, uint32_t tile, void *buf, - tmsize_t size, const char *module) -{ - assert((tif->tif_flags & TIFF_NOREADRAW) == 0); - if (!isMapped(tif)) - { - tmsize_t cc; - - if (!SeekOK(tif, TIFFGetStrileOffset(tif, tile))) - { - TIFFErrorExtR(tif, module, - "Seek error at row %" PRIu32 ", col %" PRIu32 - ", tile %" PRIu32, - tif->tif_row, tif->tif_col, tile); - return ((tmsize_t)(-1)); - } - cc = TIFFReadFile(tif, buf, size); - if (cc != size) - { - TIFFErrorExtR(tif, module, - "Read error at row %" PRIu32 ", col %" PRIu32 - "; got %" TIFF_SSIZE_FORMAT - " bytes, expected %" TIFF_SSIZE_FORMAT, - tif->tif_row, tif->tif_col, cc, size); - return ((tmsize_t)(-1)); - } - } - else - { - tmsize_t ma, mb; - tmsize_t n; - ma = (tmsize_t)TIFFGetStrileOffset(tif, tile); - mb = ma + size; - if ((TIFFGetStrileOffset(tif, tile) > (uint64_t)TIFF_TMSIZE_T_MAX) || - (ma > tif->tif_size)) - n = 0; - else if ((mb < ma) || (mb < size) || (mb > tif->tif_size)) - n = tif->tif_size - ma; - else - n = size; - if (n != size) - { - TIFFErrorExtR(tif, module, - "Read error at row %" PRIu32 ", col %" PRIu32 - ", tile %" PRIu32 "; got %" TIFF_SSIZE_FORMAT - " bytes, expected %" TIFF_SSIZE_FORMAT, - tif->tif_row, tif->tif_col, tile, n, size); - return ((tmsize_t)(-1)); - } - _TIFFmemcpy(buf, tif->tif_base + ma, size); - } - return (size); -} - -/* - * Read a tile of data from the file. - */ -tmsize_t TIFFReadRawTile(TIFF *tif, uint32_t tile, void *buf, tmsize_t size) -{ - static const char module[] = "TIFFReadRawTile"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t bytecount64; - tmsize_t bytecountm; - - if (!TIFFCheckRead(tif, 1)) - return ((tmsize_t)(-1)); - if (tile >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, - "%" PRIu32 ": Tile out of range, max %" PRIu32, tile, - td->td_nstrips); - return ((tmsize_t)(-1)); - } - if (tif->tif_flags & TIFF_NOREADRAW) - { - TIFFErrorExtR(tif, module, - "Compression scheme does not support access to raw " - "uncompressed data"); - return ((tmsize_t)(-1)); - } - bytecount64 = TIFFGetStrileByteCount(tif, tile); - if (size != (tmsize_t)(-1) && (uint64_t)size <= bytecount64) - bytecountm = size; - else - bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module); - if (bytecountm == 0) - { - return ((tmsize_t)(-1)); - } - return (TIFFReadRawTile1(tif, tile, buf, bytecountm, module)); -} - -/* - * Read the specified tile and setup for decoding. The data buffer is - * expanded, as necessary, to hold the tile's data. - */ -int TIFFFillTile(TIFF *tif, uint32_t tile) -{ - static const char module[] = "TIFFFillTile"; - TIFFDirectory *td = &tif->tif_dir; - - if ((tif->tif_flags & TIFF_NOREADRAW) == 0) - { - uint64_t bytecount = TIFFGetStrileByteCount(tif, tile); - if (bytecount == 0 || bytecount > (uint64_t)TIFF_INT64_MAX) - { - TIFFErrorExtR(tif, module, - "%" PRIu64 ": Invalid tile byte count, tile %" PRIu32, - bytecount, tile); - return (0); - } - - /* To avoid excessive memory allocations: */ - /* Byte count should normally not be larger than a number of */ - /* times the uncompressed size plus some margin */ - if (bytecount > 1024 * 1024) - { - /* 10 and 4096 are just values that could be adjusted. */ - /* Hopefully they are safe enough for all codecs */ - tmsize_t stripsize = TIFFTileSize(tif); - if (stripsize != 0 && (bytecount - 4096) / 10 > (uint64_t)stripsize) - { - uint64_t newbytecount = (uint64_t)stripsize * 10 + 4096; - TIFFErrorExtR(tif, module, - "Too large tile byte count %" PRIu64 - ", tile %" PRIu32 ". Limiting to %" PRIu64, - bytecount, tile, newbytecount); - bytecount = newbytecount; - } - } - - if (isMapped(tif)) - { - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * TIFFGetStrileOffset(tif, tile)+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64_t)tif->tif_size || - TIFFGetStrileOffset(tif, tile) > - (uint64_t)tif->tif_size - bytecount) - { - tif->tif_curtile = NOTILE; - return (0); - } - } - - if (isMapped(tif) && (isFillOrder(tif, td->td_fillorder) || - (tif->tif_flags & TIFF_NOBITREV))) - { - /* - * The image is mapped into memory and we either don't - * need to flip bits or the compression routine is - * going to handle this operation itself. In this - * case, avoid copying the raw data and instead just - * reference the data from the memory mapped file - * image. This assumes that the decompression - * routines do not modify the contents of the raw data - * buffer (if they try to, the application will get a - * fault since the file is mapped read-only). - */ - if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) - { - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - tif->tif_flags &= ~TIFF_MYBUFFER; - - tif->tif_rawdatasize = (tmsize_t)bytecount; - tif->tif_rawdata = - tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, tile); - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = (tmsize_t)bytecount; - tif->tif_flags |= TIFF_BUFFERMMAP; - } - else - { - /* - * Expand raw data buffer, if needed, to hold data - * tile coming from file (perhaps should set upper - * bound on the size of a buffer we'll use?). - */ - tmsize_t bytecountm; - bytecountm = (tmsize_t)bytecount; - if ((uint64_t)bytecountm != bytecount) - { - TIFFErrorExtR(tif, module, "Integer overflow"); - return (0); - } - if (bytecountm > tif->tif_rawdatasize) - { - tif->tif_curtile = NOTILE; - if ((tif->tif_flags & TIFF_MYBUFFER) == 0) - { - TIFFErrorExtR(tif, module, - "Data buffer too small to hold tile %" PRIu32, - tile); - return (0); - } - } - if (tif->tif_flags & TIFF_BUFFERMMAP) - { - tif->tif_curtile = NOTILE; - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - tif->tif_flags &= ~TIFF_BUFFERMMAP; - } - - if (isMapped(tif)) - { - if (bytecountm > tif->tif_rawdatasize && - !TIFFReadBufferSetup(tif, 0, bytecountm)) - { - return (0); - } - if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata, bytecountm, - module) != bytecountm) - { - return (0); - } - } - else - { - if (TIFFReadRawStripOrTile2(tif, tile, 0, bytecountm, module) != - bytecountm) - { - return (0); - } - } - - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = bytecountm; - - if (tif->tif_rawdata != NULL && - !isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdataloaded); - } - } - return (TIFFStartTile(tif, tile)); -} - -/* - * Setup the raw data buffer in preparation for - * reading a strip of raw data. If the buffer - * is specified as zero, then a buffer of appropriate - * size is allocated by the library. Otherwise, - * the client must guarantee that the buffer is - * large enough to hold any individual strip of - * raw data. - */ -int TIFFReadBufferSetup(TIFF *tif, void *bp, tmsize_t size) -{ - static const char module[] = "TIFFReadBufferSetup"; - - assert((tif->tif_flags & TIFF_NOREADRAW) == 0); - tif->tif_flags &= ~TIFF_BUFFERMMAP; - - if (tif->tif_rawdata) - { - if (tif->tif_flags & TIFF_MYBUFFER) - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_rawdata = NULL; - tif->tif_rawdatasize = 0; - } - if (bp) - { - tif->tif_rawdatasize = size; - tif->tif_rawdata = (uint8_t *)bp; - tif->tif_flags &= ~TIFF_MYBUFFER; - } - else - { - tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64((uint64_t)size, 1024); - if (tif->tif_rawdatasize == 0) - { - TIFFErrorExtR(tif, module, "Invalid buffer size"); - return (0); - } - /* Initialize to zero to avoid uninitialized buffers in case of */ - /* short reads (http://bugzilla.maptools.org/show_bug.cgi?id=2651) */ - tif->tif_rawdata = - (uint8_t *)_TIFFcallocExt(tif, 1, tif->tif_rawdatasize); - tif->tif_flags |= TIFF_MYBUFFER; - } - if (tif->tif_rawdata == NULL) - { - TIFFErrorExtR(tif, module, - "No space for data buffer at scanline %" PRIu32, - tif->tif_row); - tif->tif_rawdatasize = 0; - return (0); - } - return (1); -} - -/* - * Set state to appear as if a - * strip has just been read in. - */ -static int TIFFStartStrip(TIFF *tif, uint32_t strip) -{ - TIFFDirectory *td = &tif->tif_dir; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) - { - if (!(*tif->tif_setupdecode)(tif)) - return (0); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_curstrip = strip; - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - tif->tif_flags &= ~TIFF_BUF4WRITE; - - if (tif->tif_flags & TIFF_NOREADRAW) - { - tif->tif_rawcp = NULL; - tif->tif_rawcc = 0; - } - else - { - tif->tif_rawcp = tif->tif_rawdata; - if (tif->tif_rawdataloaded > 0) - tif->tif_rawcc = tif->tif_rawdataloaded; - else - tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, strip); - } - if ((*tif->tif_predecode)(tif, (uint16_t)(strip / td->td_stripsperimage)) == - 0) - { - /* Needed for example for scanline access, if tif_predecode */ - /* fails, and we try to read the same strip again. Without invalidating - */ - /* tif_curstrip, we'd call tif_decoderow() on a possibly invalid */ - /* codec state. */ - tif->tif_curstrip = NOSTRIP; - return 0; - } - return 1; -} - -/* - * Set state to appear as if a - * tile has just been read in. - */ -static int TIFFStartTile(TIFF *tif, uint32_t tile) -{ - static const char module[] = "TIFFStartTile"; - TIFFDirectory *td = &tif->tif_dir; - uint32_t howmany32; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) - { - if (!(*tif->tif_setupdecode)(tif)) - return (0); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_curtile = tile; - if (td->td_tilewidth == 0) - { - TIFFErrorExtR(tif, module, "Zero tilewidth"); - return 0; - } - howmany32 = TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); - if (howmany32 == 0) - { - TIFFErrorExtR(tif, module, "Zero tiles"); - return 0; - } - tif->tif_row = (tile % howmany32) * td->td_tilelength; - howmany32 = TIFFhowmany_32(td->td_imagelength, td->td_tilelength); - if (howmany32 == 0) - { - TIFFErrorExtR(tif, module, "Zero tiles"); - return 0; - } - tif->tif_col = (tile % howmany32) * td->td_tilewidth; - tif->tif_flags &= ~TIFF_BUF4WRITE; - if (tif->tif_flags & TIFF_NOREADRAW) - { - tif->tif_rawcp = NULL; - tif->tif_rawcc = 0; - } - else - { - tif->tif_rawcp = tif->tif_rawdata; - if (tif->tif_rawdataloaded > 0) - tif->tif_rawcc = tif->tif_rawdataloaded; - else - tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, tile); - } - return ( - (*tif->tif_predecode)(tif, (uint16_t)(tile / td->td_stripsperimage))); -} - -static int TIFFCheckRead(TIFF *tif, int tiles) -{ - if (tif->tif_mode == O_WRONLY) - { - TIFFErrorExtR(tif, tif->tif_name, "File not open for reading"); - return (0); - } - if (tiles ^ isTiled(tif)) - { - TIFFErrorExtR(tif, tif->tif_name, - tiles ? "Can not read tiles from a striped image" - : "Can not read scanlines from a tiled image"); - return (0); - } - return (1); -} - -/* Use the provided input buffer (inbuf, insize) and decompress it into - * (outbuf, outsize). - * This function replaces the use of - * TIFFReadEncodedStrip()/TIFFReadEncodedTile() when the user can provide the - * buffer for the input data, for example when he wants to avoid libtiff to read - * the strile offset/count values from the [Strip|Tile][Offsets/ByteCounts] - * array. inbuf content must be writable (if bit reversal is needed) Returns 1 - * in case of success, 0 otherwise. - */ -int TIFFReadFromUserBuffer(TIFF *tif, uint32_t strile, void *inbuf, - tmsize_t insize, void *outbuf, tmsize_t outsize) -{ - static const char module[] = "TIFFReadFromUserBuffer"; - TIFFDirectory *td = &tif->tif_dir; - int ret = 1; - uint32_t old_tif_flags = tif->tif_flags; - tmsize_t old_rawdatasize = tif->tif_rawdatasize; - void *old_rawdata = tif->tif_rawdata; - - if (tif->tif_mode == O_WRONLY) - { - TIFFErrorExtR(tif, tif->tif_name, "File not open for reading"); - return 0; - } - if (tif->tif_flags & TIFF_NOREADRAW) - { - TIFFErrorExtR(tif, module, - "Compression scheme does not support access to raw " - "uncompressed data"); - return 0; - } - - tif->tif_flags &= ~TIFF_MYBUFFER; - tif->tif_flags |= TIFF_BUFFERMMAP; - tif->tif_rawdatasize = insize; - tif->tif_rawdata = inbuf; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = insize; - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - { - TIFFReverseBits(inbuf, insize); - } - - if (TIFFIsTiled(tif)) - { - if (!TIFFStartTile(tif, strile)) - { - ret = 0; - /* See related TIFFReadEncodedStrip comment. */ - if (outbuf) - memset(outbuf, 0, (size_t)outsize); - } - else if (!(*tif->tif_decodetile)( - tif, (uint8_t *)outbuf, outsize, - (uint16_t)(strile / td->td_stripsperimage))) - { - ret = 0; - } - } - else - { - uint32_t rowsperstrip = td->td_rowsperstrip; - uint32_t stripsperplane; - if (rowsperstrip > td->td_imagelength) - rowsperstrip = td->td_imagelength; - if (rowsperstrip == 0) - { - TIFFErrorExtR(tif, module, "rowsperstrip is zero"); - ret = 0; - } - else - { - stripsperplane = - TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); - if (!TIFFStartStrip(tif, strile)) - { - ret = 0; - /* See related TIFFReadEncodedStrip comment. */ - if (outbuf) - memset(outbuf, 0, (size_t)outsize); - } - else if (!(*tif->tif_decodestrip)( - tif, (uint8_t *)outbuf, outsize, - (uint16_t)(strile / stripsperplane))) - { - ret = 0; - } - } - } - if (ret) - { - (*tif->tif_postdecode)(tif, (uint8_t *)outbuf, outsize); - } - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - { - TIFFReverseBits(inbuf, insize); - } - - tif->tif_flags = (old_tif_flags & (TIFF_MYBUFFER | TIFF_BUFFERMMAP)) | - (tif->tif_flags & ~(TIFF_MYBUFFER | TIFF_BUFFERMMAP)); - tif->tif_rawdatasize = old_rawdatasize; - tif->tif_rawdata = old_rawdata; - tif->tif_rawdataoff = 0; - tif->tif_rawdataloaded = 0; - - return ret; -} - -void _TIFFNoPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - (void)tif; - (void)buf; - (void)cc; -} - -void _TIFFSwab16BitData(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - (void)tif; - assert((cc & 1) == 0); - TIFFSwabArrayOfShort((uint16_t *)buf, cc / 2); -} - -void _TIFFSwab24BitData(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - (void)tif; - assert((cc % 3) == 0); - TIFFSwabArrayOfTriples((uint8_t *)buf, cc / 3); -} - -void _TIFFSwab32BitData(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - (void)tif; - assert((cc & 3) == 0); - TIFFSwabArrayOfLong((uint32_t *)buf, cc / 4); -} - -void _TIFFSwab64BitData(TIFF *tif, uint8_t *buf, tmsize_t cc) -{ - (void)tif; - assert((cc & 7) == 0); - TIFFSwabArrayOfDouble((double *)buf, cc / 8); -} diff --git a/third_party/libtiff/libtiff/tif_stream.cxx b/third_party/libtiff/libtiff/tif_stream.cxx deleted file mode 100644 index 13ad0e2..0000000 --- a/third_party/libtiff/libtiff/tif_stream.cxx +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (c) 1988-1996 Sam Leffler - * Copyright (c) 1991-1996 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library UNIX-specific Routines. - */ -#include "tiffiop.h" -#include - -using namespace std; - -/* - ISO C++ uses a 'std::streamsize' type to define counts. This makes - it similar to, (but perhaps not the same as) size_t. - - The std::ios::pos_type is used to represent stream positions as used - by tellg(), tellp(), seekg(), and seekp(). This makes it similar to - (but perhaps not the same as) 'off_t'. The std::ios::streampos type - is used for character streams, but is documented to not be an - integral type anymore, so it should *not* be assigned to an integral - type. - - The std::ios::off_type is used to specify relative offsets needed by - the variants of seekg() and seekp() which accept a relative offset - argument. - - Useful prototype knowledge: - - Obtain read position - ios::pos_type basic_istream::tellg() - - Set read position - basic_istream& basic_istream::seekg(ios::pos_type) - basic_istream& basic_istream::seekg(ios::off_type, ios_base::seekdir) - - Read data - basic_istream& istream::read(char *str, streamsize count) - - Number of characters read in last unformatted read - streamsize istream::gcount(); - - Obtain write position - ios::pos_type basic_ostream::tellp() - - Set write position - basic_ostream& basic_ostream::seekp(ios::pos_type) - basic_ostream& basic_ostream::seekp(ios::off_type, ios_base::seekdir) - - Write data - basic_ostream& ostream::write(const char *str, streamsize count) -*/ - -struct tiffis_data; -struct tiffos_data; - -extern "C" -{ - - static tmsize_t _tiffosReadProc(thandle_t, void *, tmsize_t); - static tmsize_t _tiffisReadProc(thandle_t fd, void *buf, tmsize_t size); - static tmsize_t _tiffosWriteProc(thandle_t fd, void *buf, tmsize_t size); - static tmsize_t _tiffisWriteProc(thandle_t, void *, tmsize_t); - static uint64_t _tiffosSeekProc(thandle_t fd, uint64_t off, int whence); - static uint64_t _tiffisSeekProc(thandle_t fd, uint64_t off, int whence); - static uint64_t _tiffosSizeProc(thandle_t fd); - static uint64_t _tiffisSizeProc(thandle_t fd); - static int _tiffosCloseProc(thandle_t fd); - static int _tiffisCloseProc(thandle_t fd); - static int _tiffDummyMapProcCxx(thandle_t, void **base, toff_t *size); - static void _tiffDummyUnmapProcCxx(thandle_t, void *base, toff_t size); - static TIFF *_tiffStreamOpen(const char *name, const char *mode, void *fd); - - struct tiffis_data - { - istream *stream; - ios::pos_type start_pos; - }; - - struct tiffos_data - { - ostream *stream; - ios::pos_type start_pos; - }; - - static tmsize_t _tiffosReadProc(thandle_t, void *, tmsize_t) { return 0; } - - static tmsize_t _tiffisReadProc(thandle_t fd, void *buf, tmsize_t size) - { - tiffis_data *data = reinterpret_cast(fd); - - // Verify that type does not overflow. - streamsize request_size = size; - if (static_cast(request_size) != size) - return static_cast(-1); - - data->stream->read((char *)buf, request_size); - - return static_cast(data->stream->gcount()); - } - - static tmsize_t _tiffosWriteProc(thandle_t fd, void *buf, tmsize_t size) - { - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - ios::pos_type pos = os->tellp(); - - // Verify that type does not overflow. - streamsize request_size = size; - if (static_cast(request_size) != size) - return static_cast(-1); - - os->write(reinterpret_cast(buf), request_size); - - return static_cast(os->tellp() - pos); - } - - static tmsize_t _tiffisWriteProc(thandle_t, void *, tmsize_t) { return 0; } - - static uint64_t _tiffosSeekProc(thandle_t fd, uint64_t off, int whence) - { - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - - // if the stream has already failed, don't do anything - if (os->fail()) - return static_cast(-1); - - switch (whence) - { - case SEEK_SET: - { - // Compute 64-bit offset - uint64_t new_offset = - static_cast(data->start_pos) + off; - - // Verify that value does not overflow - ios::off_type offset = static_cast(new_offset); - if (static_cast(offset) != new_offset) - return static_cast(-1); - - os->seekp(offset, ios::beg); - break; - } - case SEEK_CUR: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - os->seekp(offset, ios::cur); - break; - } - case SEEK_END: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - os->seekp(offset, ios::end); - break; - } - } - - // Attempt to workaround problems with seeking past the end of the - // stream. ofstream doesn't have a problem with this but - // ostrstream/ostringstream does. In that situation, add intermediate - // '\0' characters. - if (os->fail()) - { - ios::iostate old_state; - ios::pos_type origin; - - old_state = os->rdstate(); - // reset the fail bit or else tellp() won't work below - os->clear(os->rdstate() & ~ios::failbit); - switch (whence) - { - case SEEK_SET: - default: - origin = data->start_pos; - break; - case SEEK_CUR: - origin = os->tellp(); - break; - case SEEK_END: - os->seekp(0, ios::end); - origin = os->tellp(); - break; - } - // restore original stream state - os->clear(old_state); - - // only do something if desired seek position is valid - if ((static_cast(origin) + off) > - static_cast(data->start_pos)) - { - uint64_t num_fill; - - // clear the fail bit - os->clear(os->rdstate() & ~ios::failbit); - - // extend the stream to the expected size - os->seekp(0, ios::end); - num_fill = (static_cast(origin)) + off - os->tellp(); - for (uint64_t i = 0; i < num_fill; i++) - os->put('\0'); - - // retry the seek - os->seekp(static_cast( - static_cast(origin) + off), - ios::beg); - } - } - - return static_cast(os->tellp()); - } - - static uint64_t _tiffisSeekProc(thandle_t fd, uint64_t off, int whence) - { - tiffis_data *data = reinterpret_cast(fd); - - switch (whence) - { - case SEEK_SET: - { - // Compute 64-bit offset - uint64_t new_offset = - static_cast(data->start_pos) + off; - - // Verify that value does not overflow - ios::off_type offset = static_cast(new_offset); - if (static_cast(offset) != new_offset) - return static_cast(-1); - - data->stream->seekg(offset, ios::beg); - break; - } - case SEEK_CUR: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - data->stream->seekg(offset, ios::cur); - break; - } - case SEEK_END: - { - // Verify that value does not overflow - ios::off_type offset = static_cast(off); - if (static_cast(offset) != off) - return static_cast(-1); - - data->stream->seekg(offset, ios::end); - break; - } - } - - return (uint64_t)(data->stream->tellg() - data->start_pos); - } - - static uint64_t _tiffosSizeProc(thandle_t fd) - { - tiffos_data *data = reinterpret_cast(fd); - ostream *os = data->stream; - ios::pos_type pos = os->tellp(); - ios::pos_type len; - - os->seekp(0, ios::end); - len = os->tellp(); - os->seekp(pos); - - return (uint64_t)len; - } - - static uint64_t _tiffisSizeProc(thandle_t fd) - { - tiffis_data *data = reinterpret_cast(fd); - ios::pos_type pos = data->stream->tellg(); - ios::pos_type len; - - data->stream->seekg(0, ios::end); - len = data->stream->tellg(); - data->stream->seekg(pos); - - return (uint64_t)len; - } - - static int _tiffosCloseProc(thandle_t fd) - { - // Our stream was not allocated by us, so it shouldn't be closed by us. - delete reinterpret_cast(fd); - return 0; - } - - static int _tiffisCloseProc(thandle_t fd) - { - // Our stream was not allocated by us, so it shouldn't be closed by us. - delete reinterpret_cast(fd); - return 0; - } - - static int _tiffDummyMapProcCxx(thandle_t, void **base, toff_t *size) - { - (void)base; - (void)size; - return (0); - } - - static void _tiffDummyUnmapProcCxx(thandle_t, void *base, toff_t size) - { - (void)base; - (void)size; - } - - /* - * Open a TIFF file descriptor for read/writing. - */ - static TIFF *_tiffStreamOpen(const char *name, const char *mode, void *fd) - { - TIFF *tif; - - if (strchr(mode, 'w')) - { - tiffos_data *data = new tiffos_data; - data->stream = reinterpret_cast(fd); - data->start_pos = data->stream->tellp(); - - // Open for writing. - tif = TIFFClientOpen( - name, mode, reinterpret_cast(data), _tiffosReadProc, - _tiffosWriteProc, _tiffosSeekProc, _tiffosCloseProc, - _tiffosSizeProc, _tiffDummyMapProcCxx, _tiffDummyUnmapProcCxx); - if (!tif) - { - delete data; - } - } - else - { - tiffis_data *data = new tiffis_data; - data->stream = reinterpret_cast(fd); - data->start_pos = data->stream->tellg(); - // Open for reading. - tif = TIFFClientOpen( - name, mode, reinterpret_cast(data), _tiffisReadProc, - _tiffisWriteProc, _tiffisSeekProc, _tiffisCloseProc, - _tiffisSizeProc, _tiffDummyMapProcCxx, _tiffDummyUnmapProcCxx); - if (!tif) - { - delete data; - } - } - - return (tif); - } - -} /* extern "C" */ - -TIFF *TIFFStreamOpen(const char *name, ostream *os) -{ - // If os is either a ostrstream or ostringstream, and has no data - // written to it yet, then tellp() will return -1 which will break us. - // We workaround this by writing out a dummy character and - // then seek back to the beginning. - if (!os->fail() && static_cast(os->tellp()) < 0) - { - *os << '\0'; - os->seekp(0); - } - - // NB: We don't support mapped files with streams so add 'm' - return _tiffStreamOpen(name, "wm", os); -} - -TIFF *TIFFStreamOpen(const char *name, istream *is) -{ - // NB: We don't support mapped files with streams so add 'm' - return _tiffStreamOpen(name, "rm", is); -} diff --git a/third_party/libtiff/libtiff/tif_strip.c b/third_party/libtiff/libtiff/tif_strip.c deleted file mode 100644 index c9ba393..0000000 --- a/third_party/libtiff/libtiff/tif_strip.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Strip-organized Image Support Routines. - */ -#include "tiffiop.h" - -/* - * Compute which strip a (row,sample) value is in. - */ -uint32_t TIFFComputeStrip(TIFF *tif, uint32_t row, uint16_t sample) -{ - static const char module[] = "TIFFComputeStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint32_t strip; - - if (td->td_rowsperstrip == 0) - { - TIFFErrorExtR(tif, module, - "Cannot compute strip: RowsPerStrip is zero"); - return 0; - } - strip = row / td->td_rowsperstrip; - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - if (sample >= td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, "%lu: Sample out of range, max %lu", - (unsigned long)sample, - (unsigned long)td->td_samplesperpixel); - return (0); - } - strip += (uint32_t)sample * td->td_stripsperimage; - } - return (strip); -} - -/* - * Compute how many strips are in an image. - */ -uint32_t TIFFNumberOfStrips(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32_t nstrips; - - if (td->td_rowsperstrip == 0) - { - TIFFWarningExtR(tif, "TIFFNumberOfStrips", "RowsPerStrip is zero"); - return 0; - } - nstrips = (td->td_rowsperstrip == (uint32_t)-1 - ? 1 - : TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip)); - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - nstrips = - _TIFFMultiply32(tif, nstrips, (uint32_t)td->td_samplesperpixel, - "TIFFNumberOfStrips"); - return (nstrips); -} - -/* - * Compute the # bytes in a variable height, row-aligned strip. - */ -uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows) -{ - static const char module[] = "TIFFVStripSize64"; - TIFFDirectory *td = &tif->tif_dir; - if (nrows == (uint32_t)(-1)) - nrows = td->td_imagelength; - if ((td->td_planarconfig == PLANARCONFIG_CONTIG) && - (td->td_photometric == PHOTOMETRIC_YCBCR) && (!isUpSampled(tif))) - { - /* - * Packed YCbCr data contain one Cb+Cr for every - * HorizontalSampling*VerticalSampling Y values. - * Must also roundup width and height when calculating - * since images that are not a multiple of the - * horizontal/vertical subsampling area include - * YCbCr data for the extended image. - */ - uint16_t ycbcrsubsampling[2]; - uint16_t samplingblock_samples; - uint32_t samplingblocks_hor; - uint32_t samplingblocks_ver; - uint64_t samplingrow_samples; - uint64_t samplingrow_size; - if (td->td_samplesperpixel != 3) - { - TIFFErrorExtR(tif, module, "Invalid td_samplesperpixel value"); - return 0; - } - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, ycbcrsubsampling + 1); - if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && - ycbcrsubsampling[0] != 4) || - (ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && - ycbcrsubsampling[1] != 4) || - (ycbcrsubsampling[0] == 0 || ycbcrsubsampling[1] == 0)) - { - TIFFErrorExtR(tif, module, "Invalid YCbCr subsampling (%dx%d)", - ycbcrsubsampling[0], ycbcrsubsampling[1]); - return 0; - } - samplingblock_samples = ycbcrsubsampling[0] * ycbcrsubsampling[1] + 2; - samplingblocks_hor = - TIFFhowmany_32(td->td_imagewidth, ycbcrsubsampling[0]); - samplingblocks_ver = TIFFhowmany_32(nrows, ycbcrsubsampling[1]); - samplingrow_samples = _TIFFMultiply64(tif, samplingblocks_hor, - samplingblock_samples, module); - samplingrow_size = TIFFhowmany8_64(_TIFFMultiply64( - tif, samplingrow_samples, td->td_bitspersample, module)); - return ( - _TIFFMultiply64(tif, samplingrow_size, samplingblocks_ver, module)); - } - else - return (_TIFFMultiply64(tif, nrows, TIFFScanlineSize64(tif), module)); -} -tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows) -{ - static const char module[] = "TIFFVStripSize"; - uint64_t m; - m = TIFFVStripSize64(tif, nrows); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Compute the # bytes in a raw strip. - */ -uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip) -{ - static const char module[] = "TIFFRawStripSize64"; - uint64_t bytecount = TIFFGetStrileByteCount(tif, strip); - - if (bytecount == 0) - { - TIFFErrorExtR(tif, module, - "%" PRIu64 ": Invalid strip byte count, strip %lu", - (uint64_t)bytecount, (unsigned long)strip); - bytecount = (uint64_t)-1; - } - - return bytecount; -} -tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip) -{ - static const char module[] = "TIFFRawStripSize"; - uint64_t m; - tmsize_t n; - m = TIFFRawStripSize64(tif, strip); - if (m == (uint64_t)(-1)) - n = (tmsize_t)(-1); - else - { - n = (tmsize_t)m; - if ((uint64_t)n != m) - { - TIFFErrorExtR(tif, module, "Integer overflow"); - n = 0; - } - } - return (n); -} - -/* - * Compute the # bytes in a (row-aligned) strip. - * - * Note that if RowsPerStrip is larger than the - * recorded ImageLength, then the strip size is - * truncated to reflect the actual space required - * to hold the strip. - */ -uint64_t TIFFStripSize64(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32_t rps = td->td_rowsperstrip; - if (rps > td->td_imagelength) - rps = td->td_imagelength; - return (TIFFVStripSize64(tif, rps)); -} -tmsize_t TIFFStripSize(TIFF *tif) -{ - static const char module[] = "TIFFStripSize"; - uint64_t m; - m = TIFFStripSize64(tif); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Compute a default strip size based on the image - * characteristics and a requested value. If the - * request is <1 then we choose a strip size according - * to certain heuristics. - */ -uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t request) -{ - return (*tif->tif_defstripsize)(tif, request); -} - -uint32_t _TIFFDefaultStripSize(TIFF *tif, uint32_t s) -{ - if ((int32_t)s < 1) - { - /* - * If RowsPerStrip is unspecified, try to break the - * image up into strips that are approximately - * STRIP_SIZE_DEFAULT bytes long. - */ - uint64_t scanlinesize; - uint64_t rows; - scanlinesize = TIFFScanlineSize64(tif); - if (scanlinesize == 0) - scanlinesize = 1; - rows = (uint64_t)STRIP_SIZE_DEFAULT / scanlinesize; - if (rows == 0) - rows = 1; - else if (rows > 0xFFFFFFFF) - rows = 0xFFFFFFFF; - s = (uint32_t)rows; - } - return (s); -} - -/* - * Return the number of bytes to read/write in a call to - * one of the scanline-oriented i/o routines. Note that - * this number may be 1/samples-per-pixel if data is - * stored as separate planes. - * The ScanlineSize in case of YCbCrSubsampling is defined as the - * strip size divided by the strip height, i.e. the size of a pack of vertical - * subsampling lines divided by vertical subsampling. It should thus make - * sense when multiplied by a multiple of vertical subsampling. - */ -uint64_t TIFFScanlineSize64(TIFF *tif) -{ - static const char module[] = "TIFFScanlineSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t scanline_size; - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - if ((td->td_photometric == PHOTOMETRIC_YCBCR) && - (td->td_samplesperpixel == 3) && (!isUpSampled(tif))) - { - uint16_t ycbcrsubsampling[2]; - uint16_t samplingblock_samples; - uint32_t samplingblocks_hor; - uint64_t samplingrow_samples; - uint64_t samplingrow_size; - if (td->td_samplesperpixel != 3) - { - TIFFErrorExtR(tif, module, "Invalid td_samplesperpixel value"); - return 0; - } - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, ycbcrsubsampling + 1); - if (((ycbcrsubsampling[0] != 1) && (ycbcrsubsampling[0] != 2) && - (ycbcrsubsampling[0] != 4)) || - ((ycbcrsubsampling[1] != 1) && (ycbcrsubsampling[1] != 2) && - (ycbcrsubsampling[1] != 4)) || - ((ycbcrsubsampling[0] == 0) || (ycbcrsubsampling[1] == 0))) - { - TIFFErrorExtR(tif, module, "Invalid YCbCr subsampling"); - return 0; - } - samplingblock_samples = - ycbcrsubsampling[0] * ycbcrsubsampling[1] + 2; - samplingblocks_hor = - TIFFhowmany_32(td->td_imagewidth, ycbcrsubsampling[0]); - samplingrow_samples = _TIFFMultiply64( - tif, samplingblocks_hor, samplingblock_samples, module); - samplingrow_size = - TIFFhowmany_64(_TIFFMultiply64(tif, samplingrow_samples, - td->td_bitspersample, module), - 8); - scanline_size = (samplingrow_size / ycbcrsubsampling[1]); - } - else - { - uint64_t scanline_samples; - uint32_t scanline_width = td->td_imagewidth; - -#if 0 - // Tries to fix https://gitlab.com/libtiff/libtiff/-/merge_requests/564 - // but causes regression when decoding legit files with tiffcp -c none - // Cf https://gitlab.com/libtiff/libtiff/-/merge_requests/644 - if (td->td_photometric == PHOTOMETRIC_YCBCR) - { - uint16_t subsampling_hor; - uint16_t ignored; - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, - &subsampling_hor, &ignored); - if (subsampling_hor > 1) // roundup width for YCbCr - scanline_width = - TIFFroundup_32(scanline_width, subsampling_hor); - } -#endif - - scanline_samples = _TIFFMultiply64(tif, scanline_width, - td->td_samplesperpixel, module); - scanline_size = - TIFFhowmany_64(_TIFFMultiply64(tif, scanline_samples, - td->td_bitspersample, module), - 8); - } - } - else - { - scanline_size = - TIFFhowmany_64(_TIFFMultiply64(tif, td->td_imagewidth, - td->td_bitspersample, module), - 8); - } - if (scanline_size == 0) - { - TIFFErrorExtR(tif, module, "Computed scanline size is zero"); - return 0; - } - return (scanline_size); -} -tmsize_t TIFFScanlineSize(TIFF *tif) -{ - static const char module[] = "TIFFScanlineSize"; - uint64_t m; - m = TIFFScanlineSize64(tif); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Return the number of bytes required to store a complete - * decoded and packed raster scanline (as opposed to the - * I/O size returned by TIFFScanlineSize which may be less - * if data is store as separate planes). - */ -uint64_t TIFFRasterScanlineSize64(TIFF *tif) -{ - static const char module[] = "TIFFRasterScanlineSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t scanline; - - scanline = - _TIFFMultiply64(tif, td->td_bitspersample, td->td_imagewidth, module); - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - scanline = - _TIFFMultiply64(tif, scanline, td->td_samplesperpixel, module); - return (TIFFhowmany8_64(scanline)); - } - else - return (_TIFFMultiply64(tif, TIFFhowmany8_64(scanline), - td->td_samplesperpixel, module)); -} -tmsize_t TIFFRasterScanlineSize(TIFF *tif) -{ - static const char module[] = "TIFFRasterScanlineSize"; - uint64_t m; - m = TIFFRasterScanlineSize64(tif); - return _TIFFCastUInt64ToSSize(tif, m, module); -} diff --git a/third_party/libtiff/libtiff/tif_swab.c b/third_party/libtiff/libtiff/tif_swab.c deleted file mode 100644 index 827b025..0000000 --- a/third_party/libtiff/libtiff/tif_swab.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library Bit & Byte Swapping Support. - * - * XXX We assume short = 16-bits and long = 32-bits XXX - */ -#include "tiffiop.h" - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabShort) -void TIFFSwabShort(uint16_t *wp) -{ - register unsigned char *cp = (unsigned char *)wp; - unsigned char t; - assert(sizeof(uint16_t) == 2); - t = cp[1]; - cp[1] = cp[0]; - cp[0] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong) -void TIFFSwabLong(uint32_t *lp) -{ - register unsigned char *cp = (unsigned char *)lp; - unsigned char t; - assert(sizeof(uint32_t) == 4); - t = cp[3]; - cp[3] = cp[0]; - cp[0] = t; - t = cp[2]; - cp[2] = cp[1]; - cp[1] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong8) -void TIFFSwabLong8(uint64_t *lp) -{ - register unsigned char *cp = (unsigned char *)lp; - unsigned char t; - assert(sizeof(uint64_t) == 8); - t = cp[7]; - cp[7] = cp[0]; - cp[0] = t; - t = cp[6]; - cp[6] = cp[1]; - cp[1] = t; - t = cp[5]; - cp[5] = cp[2]; - cp[2] = t; - t = cp[4]; - cp[4] = cp[3]; - cp[3] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfShort) -void TIFFSwabArrayOfShort(register uint16_t *wp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(uint16_t) == 2); - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)wp; - t = cp[1]; - cp[1] = cp[0]; - cp[0] = t; - wp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfTriples) -void TIFFSwabArrayOfTriples(register uint8_t *tp, tmsize_t n) -{ - unsigned char *cp; - unsigned char t; - - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)tp; - t = cp[2]; - cp[2] = cp[0]; - cp[0] = t; - tp += 3; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong) -void TIFFSwabArrayOfLong(register uint32_t *lp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(uint32_t) == 4); - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)lp; - t = cp[3]; - cp[3] = cp[0]; - cp[0] = t; - t = cp[2]; - cp[2] = cp[1]; - cp[1] = t; - lp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong8) -void TIFFSwabArrayOfLong8(register uint64_t *lp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(uint64_t) == 8); - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)lp; - t = cp[7]; - cp[7] = cp[0]; - cp[0] = t; - t = cp[6]; - cp[6] = cp[1]; - cp[1] = t; - t = cp[5]; - cp[5] = cp[2]; - cp[2] = t; - t = cp[4]; - cp[4] = cp[3]; - cp[3] = t; - lp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabFloat) -void TIFFSwabFloat(float *fp) -{ - register unsigned char *cp = (unsigned char *)fp; - unsigned char t; - assert(sizeof(float) == 4); - t = cp[3]; - cp[3] = cp[0]; - cp[0] = t; - t = cp[2]; - cp[2] = cp[1]; - cp[1] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfFloat) -void TIFFSwabArrayOfFloat(register float *fp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(float) == 4); - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)fp; - t = cp[3]; - cp[3] = cp[0]; - cp[0] = t; - t = cp[2]; - cp[2] = cp[1]; - cp[1] = t; - fp++; - } -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabDouble) -void TIFFSwabDouble(double *dp) -{ - register unsigned char *cp = (unsigned char *)dp; - unsigned char t; - assert(sizeof(double) == 8); - t = cp[7]; - cp[7] = cp[0]; - cp[0] = t; - t = cp[6]; - cp[6] = cp[1]; - cp[1] = t; - t = cp[5]; - cp[5] = cp[2]; - cp[2] = t; - t = cp[4]; - cp[4] = cp[3]; - cp[3] = t; -} -#endif - -#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfDouble) -void TIFFSwabArrayOfDouble(double *dp, tmsize_t n) -{ - register unsigned char *cp; - register unsigned char t; - assert(sizeof(double) == 8); - /* XXX unroll loop some */ - while (n-- > 0) - { - cp = (unsigned char *)dp; - t = cp[7]; - cp[7] = cp[0]; - cp[0] = t; - t = cp[6]; - cp[6] = cp[1]; - cp[1] = t; - t = cp[5]; - cp[5] = cp[2]; - cp[2] = t; - t = cp[4]; - cp[4] = cp[3]; - cp[3] = t; - dp++; - } -} -#endif - -/* - * Bit reversal tables. TIFFBitRevTable[] gives - * the bit reversed value of . Used in various - * places in the library when the FillOrder requires - * bit reversal of byte values (e.g. CCITT Fax 3 - * encoding/decoding). TIFFNoBitRevTable is provided - * for algorithms that want an equivalent table that - * do not reverse bit values. - */ -static const unsigned char TIFFBitRevTable[256] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, - 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, - 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, - 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, - 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, - 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, - 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, - 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, - 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, - 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, - 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, - 0x3f, 0xbf, 0x7f, 0xff}; -static const unsigned char TIFFNoBitRevTable[256] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, - 0x3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0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, - 0xfc, 0xfd, 0xfe, 0xff, -}; - -const unsigned char *TIFFGetBitRevTable(int reversed) -{ - return (reversed ? TIFFBitRevTable : TIFFNoBitRevTable); -} - -void TIFFReverseBits(uint8_t *cp, tmsize_t n) -{ - for (; n > 8; n -= 8) - { - cp[0] = TIFFBitRevTable[cp[0]]; - cp[1] = TIFFBitRevTable[cp[1]]; - cp[2] = TIFFBitRevTable[cp[2]]; - cp[3] = TIFFBitRevTable[cp[3]]; - cp[4] = TIFFBitRevTable[cp[4]]; - cp[5] = TIFFBitRevTable[cp[5]]; - cp[6] = TIFFBitRevTable[cp[6]]; - cp[7] = TIFFBitRevTable[cp[7]]; - cp += 8; - } - while (n-- > 0) - { - *cp = TIFFBitRevTable[*cp]; - cp++; - } -} diff --git a/third_party/libtiff/libtiff/tif_thunder.c b/third_party/libtiff/libtiff/tif_thunder.c deleted file mode 100644 index bac0607..0000000 --- a/third_party/libtiff/libtiff/tif_thunder.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#include -#ifdef THUNDER_SUPPORT -/* - * TIFF Library. - * - * ThunderScan 4-bit Compression Algorithm Support - */ - -/* - * ThunderScan uses an encoding scheme designed for - * 4-bit pixel values. Data is encoded in bytes, with - * each byte split into a 2-bit code word and a 6-bit - * data value. The encoding gives raw data, runs of - * pixels, or pixel values encoded as a delta from the - * previous pixel value. For the latter, either 2-bit - * or 3-bit delta values are used, with the deltas packed - * into a single byte. - */ -#define THUNDER_DATA 0x3f /* mask for 6-bit data */ -#define THUNDER_CODE 0xc0 /* mask for 2-bit code word */ -/* code values */ -#define THUNDER_RUN 0x00 /* run of pixels w/ encoded count */ -#define THUNDER_2BITDELTAS 0x40 /* 3 pixels w/ encoded 2-bit deltas */ -#define DELTA2_SKIP 2 /* skip code for 2-bit deltas */ -#define THUNDER_3BITDELTAS 0x80 /* 2 pixels w/ encoded 3-bit deltas */ -#define DELTA3_SKIP 4 /* skip code for 3-bit deltas */ -#define THUNDER_RAW 0xc0 /* raw data encoded */ - -static const int twobitdeltas[4] = {0, 1, 0, -1}; -static const int threebitdeltas[8] = {0, 1, 2, 3, 0, -3, -2, -1}; - -#define SETPIXEL(op, v) \ - { \ - lastpixel = (v)&0xf; \ - if (npixels < maxpixels) \ - { \ - if (npixels++ & 1) \ - *op++ |= lastpixel; \ - else \ - op[0] = (uint8_t)(lastpixel << 4); \ - } \ - } - -static int ThunderSetupDecode(TIFF *tif) -{ - static const char module[] = "ThunderSetupDecode"; - - if (tif->tif_dir.td_bitspersample != 4) - { - TIFFErrorExtR(tif, module, - "Wrong bitspersample value (%d), Thunder decoder only " - "supports 4bits per sample.", - (int)tif->tif_dir.td_bitspersample); - return 0; - } - - return (1); -} - -static int ThunderDecode(TIFF *tif, uint8_t *op0, tmsize_t maxpixels) -{ - static const char module[] = "ThunderDecode"; - register unsigned char *bp; - register tmsize_t cc; - unsigned int lastpixel; - tmsize_t npixels; - uint8_t *op = op0; - - bp = (unsigned char *)tif->tif_rawcp; - cc = tif->tif_rawcc; - lastpixel = 0; - npixels = 0; - while (cc > 0 && npixels < maxpixels) - { - int n, delta; - - n = *bp++; - cc--; - switch (n & THUNDER_CODE) - { - case THUNDER_RUN: /* pixel run */ - /* - * Replicate the last pixel n times, - * where n is the lower-order 6 bits. - */ - if (n == 0) - break; - if (npixels & 1) - { - op[0] |= lastpixel; - lastpixel = *op++; - npixels++; - n--; - } - else - lastpixel |= lastpixel << 4; - npixels += n; - if (npixels > maxpixels) - break; - for (; n > 0; n -= 2) - *op++ = (uint8_t)lastpixel; - if (n == -1) - *--op &= 0xf0; - lastpixel &= 0xf; - break; - case THUNDER_2BITDELTAS: /* 2-bit deltas */ - if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP) - SETPIXEL(op, - (unsigned)((int)lastpixel + twobitdeltas[delta])); - if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP) - SETPIXEL(op, - (unsigned)((int)lastpixel + twobitdeltas[delta])); - if ((delta = (n & 3)) != DELTA2_SKIP) - SETPIXEL(op, - (unsigned)((int)lastpixel + twobitdeltas[delta])); - break; - case THUNDER_3BITDELTAS: /* 3-bit deltas */ - if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP) - SETPIXEL( - op, (unsigned)((int)lastpixel + threebitdeltas[delta])); - if ((delta = (n & 7)) != DELTA3_SKIP) - SETPIXEL( - op, (unsigned)((int)lastpixel + threebitdeltas[delta])); - break; - case THUNDER_RAW: /* raw data */ - SETPIXEL(op, n); - break; - } - } - tif->tif_rawcp = (uint8_t *)bp; - tif->tif_rawcc = cc; - if (npixels != maxpixels) - { - uint8_t *op_end = op0 + (maxpixels + 1) / 2; - memset(op, 0, (size_t)(op_end - op)); - TIFFErrorExtR(tif, module, - "%s data at scanline %lu (%" PRIu64 " != %" PRIu64 ")", - npixels < maxpixels ? "Not enough" : "Too much", - (unsigned long)tif->tif_row, (uint64_t)npixels, - (uint64_t)maxpixels); - return (0); - } - - return (1); -} - -static int ThunderDecodeRow(TIFF *tif, uint8_t *buf, tmsize_t occ, uint16_t s) -{ - static const char module[] = "ThunderDecodeRow"; - uint8_t *row = buf; - - (void)s; - if (occ % tif->tif_scanlinesize) - { - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return (0); - } - while (occ > 0) - { - if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth)) - return (0); - occ -= tif->tif_scanlinesize; - row += tif->tif_scanlinesize; - } - return (1); -} - -int TIFFInitThunderScan(TIFF *tif, int scheme) -{ - (void)scheme; - - tif->tif_setupdecode = ThunderSetupDecode; - tif->tif_decoderow = ThunderDecodeRow; - tif->tif_decodestrip = ThunderDecodeRow; - return (1); -} -#endif /* THUNDER_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_tile.c b/third_party/libtiff/libtiff/tif_tile.c deleted file mode 100644 index f07032f..0000000 --- a/third_party/libtiff/libtiff/tif_tile.c +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Tiled Image Support Routines. - */ -#include "tiffiop.h" - -/* - * Compute which tile an (x,y,z,s) value is in. - */ -uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, - uint16_t s) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32_t dx = td->td_tilewidth; - uint32_t dy = td->td_tilelength; - uint32_t dz = td->td_tiledepth; - uint32_t tile = 1; - - if (td->td_imagedepth == 1) - z = 0; - if (dx == (uint32_t)-1) - dx = td->td_imagewidth; - if (dy == (uint32_t)-1) - dy = td->td_imagelength; - if (dz == (uint32_t)-1) - dz = td->td_imagedepth; - if (dx != 0 && dy != 0 && dz != 0) - { - uint32_t xpt = TIFFhowmany_32(td->td_imagewidth, dx); - uint32_t ypt = TIFFhowmany_32(td->td_imagelength, dy); - uint32_t zpt = TIFFhowmany_32(td->td_imagedepth, dz); - - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - tile = (xpt * ypt * zpt) * s + (xpt * ypt) * (z / dz) + - xpt * (y / dy) + x / dx; - else - tile = (xpt * ypt) * (z / dz) + xpt * (y / dy) + x / dx; - } - return (tile); -} - -/* - * Check an (x,y,z,s) coordinate - * against the image bounds. - */ -int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t s) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (x >= td->td_imagewidth) - { - TIFFErrorExtR(tif, tif->tif_name, "%lu: Col out of range, max %lu", - (unsigned long)x, (unsigned long)(td->td_imagewidth - 1)); - return (0); - } - if (y >= td->td_imagelength) - { - TIFFErrorExtR(tif, tif->tif_name, "%lu: Row out of range, max %lu", - (unsigned long)y, - (unsigned long)(td->td_imagelength - 1)); - return (0); - } - if (z >= td->td_imagedepth) - { - TIFFErrorExtR(tif, tif->tif_name, "%lu: Depth out of range, max %lu", - (unsigned long)z, (unsigned long)(td->td_imagedepth - 1)); - return (0); - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE && - s >= td->td_samplesperpixel) - { - TIFFErrorExtR(tif, tif->tif_name, "%lu: Sample out of range, max %lu", - (unsigned long)s, - (unsigned long)(td->td_samplesperpixel - 1)); - return (0); - } - return (1); -} - -/* - * Compute how many tiles are in an image. - */ -uint32_t TIFFNumberOfTiles(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - uint32_t dx = td->td_tilewidth; - uint32_t dy = td->td_tilelength; - uint32_t dz = td->td_tiledepth; - uint32_t ntiles; - - if (dx == (uint32_t)-1) - dx = td->td_imagewidth; - if (dy == (uint32_t)-1) - dy = td->td_imagelength; - if (dz == (uint32_t)-1) - dz = td->td_imagedepth; - ntiles = - (dx == 0 || dy == 0 || dz == 0) - ? 0 - : _TIFFMultiply32( - tif, - _TIFFMultiply32(tif, TIFFhowmany_32(td->td_imagewidth, dx), - TIFFhowmany_32(td->td_imagelength, dy), - "TIFFNumberOfTiles"), - TIFFhowmany_32(td->td_imagedepth, dz), "TIFFNumberOfTiles"); - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - ntiles = _TIFFMultiply32(tif, ntiles, td->td_samplesperpixel, - "TIFFNumberOfTiles"); - return (ntiles); -} - -/* - * Compute the # bytes in each row of a tile. - */ -uint64_t TIFFTileRowSize64(TIFF *tif) -{ - static const char module[] = "TIFFTileRowSize64"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t rowsize; - uint64_t tilerowsize; - - if (td->td_tilelength == 0) - { - TIFFErrorExtR(tif, module, "Tile length is zero"); - return 0; - } - if (td->td_tilewidth == 0) - { - TIFFErrorExtR(tif, module, "Tile width is zero"); - return (0); - } - rowsize = _TIFFMultiply64(tif, td->td_bitspersample, td->td_tilewidth, - "TIFFTileRowSize"); - if (td->td_planarconfig == PLANARCONFIG_CONTIG) - { - if (td->td_samplesperpixel == 0) - { - TIFFErrorExtR(tif, module, "Samples per pixel is zero"); - return 0; - } - rowsize = _TIFFMultiply64(tif, rowsize, td->td_samplesperpixel, - "TIFFTileRowSize"); - } - tilerowsize = TIFFhowmany8_64(rowsize); - if (tilerowsize == 0) - { - TIFFErrorExtR(tif, module, "Computed tile row size is zero"); - return 0; - } - return (tilerowsize); -} -tmsize_t TIFFTileRowSize(TIFF *tif) -{ - static const char module[] = "TIFFTileRowSize"; - uint64_t m; - m = TIFFTileRowSize64(tif); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Compute the # bytes in a variable length, row-aligned tile. - */ -uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows) -{ - static const char module[] = "TIFFVTileSize64"; - TIFFDirectory *td = &tif->tif_dir; - if (td->td_tilelength == 0 || td->td_tilewidth == 0 || - td->td_tiledepth == 0) - return (0); - if ((td->td_planarconfig == PLANARCONFIG_CONTIG) && - (td->td_photometric == PHOTOMETRIC_YCBCR) && - (td->td_samplesperpixel == 3) && (!isUpSampled(tif))) - { - /* - * Packed YCbCr data contain one Cb+Cr for every - * HorizontalSampling*VerticalSampling Y values. - * Must also roundup width and height when calculating - * since images that are not a multiple of the - * horizontal/vertical subsampling area include - * YCbCr data for the extended image. - */ - uint16_t ycbcrsubsampling[2]; - uint16_t samplingblock_samples; - uint32_t samplingblocks_hor; - uint32_t samplingblocks_ver; - uint64_t samplingrow_samples; - uint64_t samplingrow_size; - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, ycbcrsubsampling + 1); - if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && - ycbcrsubsampling[0] != 4) || - (ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && - ycbcrsubsampling[1] != 4)) - { - TIFFErrorExtR(tif, module, "Invalid YCbCr subsampling (%dx%d)", - ycbcrsubsampling[0], ycbcrsubsampling[1]); - return 0; - } - samplingblock_samples = ycbcrsubsampling[0] * ycbcrsubsampling[1] + 2; - samplingblocks_hor = - TIFFhowmany_32(td->td_tilewidth, ycbcrsubsampling[0]); - samplingblocks_ver = TIFFhowmany_32(nrows, ycbcrsubsampling[1]); - samplingrow_samples = _TIFFMultiply64(tif, samplingblocks_hor, - samplingblock_samples, module); - samplingrow_size = TIFFhowmany8_64(_TIFFMultiply64( - tif, samplingrow_samples, td->td_bitspersample, module)); - return ( - _TIFFMultiply64(tif, samplingrow_size, samplingblocks_ver, module)); - } - else - return (_TIFFMultiply64(tif, nrows, TIFFTileRowSize64(tif), module)); -} -tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows) -{ - static const char module[] = "TIFFVTileSize"; - uint64_t m; - m = TIFFVTileSize64(tif, nrows); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Compute the # bytes in a row-aligned tile. - */ -uint64_t TIFFTileSize64(TIFF *tif) -{ - return (TIFFVTileSize64(tif, tif->tif_dir.td_tilelength)); -} -tmsize_t TIFFTileSize(TIFF *tif) -{ - static const char module[] = "TIFFTileSize"; - uint64_t m; - m = TIFFTileSize64(tif); - return _TIFFCastUInt64ToSSize(tif, m, module); -} - -/* - * Compute a default tile size based on the image - * characteristics and a requested value. If a - * request is <1 then we choose a size according - * to certain heuristics. - */ -void TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th) -{ - (*tif->tif_deftilesize)(tif, tw, th); -} - -void _TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th) -{ - (void)tif; - if (*(int32_t *)tw < 1) - *tw = 256; - if (*(int32_t *)th < 1) - *th = 256; - /* roundup to a multiple of 16 per the spec */ - if (*tw & 0xf) - *tw = TIFFroundup_32(*tw, 16); - if (*th & 0xf) - *th = TIFFroundup_32(*th, 16); -} diff --git a/third_party/libtiff/libtiff/tif_unix.c b/third_party/libtiff/libtiff/tif_unix.c deleted file mode 100644 index 9e6fc75..0000000 --- a/third_party/libtiff/libtiff/tif_unix.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library UNIX-specific Routines. These are should also work with the - * Windows Common RunTime Library. - */ - -#ifdef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#undef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#endif - -#include "tif_config.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#include - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "tiffiop.h" - -#define TIFF_IO_MAX 2147483647U - -typedef union fd_as_handle_union -{ - int fd; - thandle_t h; -} fd_as_handle_union_t; - -static tmsize_t _tiffReadProc(thandle_t fd, void *buf, tmsize_t size) -{ - fd_as_handle_union_t fdh; - const size_t bytes_total = (size_t)size; - size_t bytes_read; - tmsize_t count = -1; - if ((tmsize_t)bytes_total != size) - { - errno = EINVAL; - return (tmsize_t)-1; - } - fdh.h = fd; - for (bytes_read = 0; bytes_read < bytes_total; bytes_read += count) - { - char *buf_offset = (char *)buf + bytes_read; - size_t io_size = bytes_total - bytes_read; - if (io_size > TIFF_IO_MAX) - io_size = TIFF_IO_MAX; - /* Below is an obvious false positive of Coverity Scan */ - /* coverity[overflow_sink] */ - count = read(fdh.fd, buf_offset, (TIFFIOSize_t)io_size); - if (count <= 0) - break; - } - if (count < 0) - return (tmsize_t)-1; - /* Silence Coverity Scan warning about unsigned to signed underflow. */ - /* coverity[return_overflow:SUPPRESS] */ - return (tmsize_t)bytes_read; -} - -static tmsize_t _tiffWriteProc(thandle_t fd, void *buf, tmsize_t size) -{ - fd_as_handle_union_t fdh; - const size_t bytes_total = (size_t)size; - size_t bytes_written; - tmsize_t count = -1; - if ((tmsize_t)bytes_total != size) - { - errno = EINVAL; - return (tmsize_t)-1; - } - fdh.h = fd; - for (bytes_written = 0; bytes_written < bytes_total; bytes_written += count) - { - const char *buf_offset = (char *)buf + bytes_written; - size_t io_size = bytes_total - bytes_written; - if (io_size > TIFF_IO_MAX) - io_size = TIFF_IO_MAX; - /* Below is an obvious false positive of Coverity Scan */ - /* coverity[overflow_sink] */ - count = write(fdh.fd, buf_offset, (TIFFIOSize_t)io_size); - if (count <= 0) - break; - } - if (count < 0) - return (tmsize_t)-1; - /* Silence Coverity Scan warning about unsigned to signed underflow. */ - /* coverity[return_overflow:SUPPRESS] */ - return (tmsize_t)bytes_written; - /* return ((tmsize_t) write(fdh.fd, buf, bytes_total)); */ -} - -static uint64_t _tiffSeekProc(thandle_t fd, uint64_t off, int whence) -{ - fd_as_handle_union_t fdh; - _TIFF_off_t off_io = (_TIFF_off_t)off; - if ((uint64_t)off_io != off) - { - errno = EINVAL; - return (uint64_t)-1; /* this is really gross */ - } - fdh.h = fd; - return ((uint64_t)_TIFF_lseek_f(fdh.fd, off_io, whence)); -} - -static int _tiffCloseProc(thandle_t fd) -{ - fd_as_handle_union_t fdh; - fdh.h = fd; - return (close(fdh.fd)); -} - -static uint64_t _tiffSizeProc(thandle_t fd) -{ - _TIFF_stat_s sb; - fd_as_handle_union_t fdh; - fdh.h = fd; - if (_TIFF_fstat_f(fdh.fd, &sb) < 0) - return (0); - else - return ((uint64_t)sb.st_size); -} - -#ifdef HAVE_MMAP -#include - -static int _tiffMapProc(thandle_t fd, void **pbase, toff_t *psize) -{ - uint64_t size64 = _tiffSizeProc(fd); - tmsize_t sizem = (tmsize_t)size64; - if (size64 && (uint64_t)sizem == size64) - { - fd_as_handle_union_t fdh; - fdh.h = fd; - *pbase = - (void *)mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, fdh.fd, 0); - if (*pbase != (void *)-1) - { - *psize = (tmsize_t)sizem; - return (1); - } - } - return (0); -} - -static void _tiffUnmapProc(thandle_t fd, void *base, toff_t size) -{ - (void)fd; - (void)munmap(base, (off_t)size); -} -#else /* !HAVE_MMAP */ -static int _tiffMapProc(thandle_t fd, void **pbase, toff_t *psize) -{ - (void)fd; - (void)pbase; - (void)psize; - return (0); -} - -static void _tiffUnmapProc(thandle_t fd, void *base, toff_t size) -{ - (void)fd; - (void)base; - (void)size; -} -#endif /* !HAVE_MMAP */ - -/* - * Open a TIFF file descriptor for read/writing. - */ -TIFF *TIFFFdOpen(int fd, const char *name, const char *mode) -{ - return TIFFFdOpenExt(fd, name, mode, NULL); -} - -TIFF *TIFFFdOpenExt(int fd, const char *name, const char *mode, - TIFFOpenOptions *opts) -{ - TIFF *tif; - - fd_as_handle_union_t fdh; - fdh.fd = fd; - tif = TIFFClientOpenExt(name, mode, fdh.h, _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, - _tiffMapProc, _tiffUnmapProc, opts); - if (tif) - tif->tif_fd = fd; - return (tif); -} - -/* - * Open a TIFF file for read/writing. - */ -TIFF *TIFFOpen(const char *name, const char *mode) -{ - return TIFFOpenExt(name, mode, NULL); -} - -TIFF *TIFFOpenExt(const char *name, const char *mode, TIFFOpenOptions *opts) -{ - static const char module[] = "TIFFOpen"; - int m, fd; - TIFF *tif; - - m = _TIFFgetMode(opts, NULL, mode, module); - if (m == -1) - return ((TIFF *)0); - -/* for cygwin and mingw */ -#ifdef O_BINARY - m |= O_BINARY; -#endif - - fd = open(name, m, 0666); - if (fd < 0) - { - if (errno > 0 && strerror(errno) != NULL) - { - _TIFFErrorEarly(opts, NULL, module, "%s: %s", name, - strerror(errno)); - } - else - { - _TIFFErrorEarly(opts, NULL, module, "%s: Cannot open", name); - } - return ((TIFF *)0); - } - - tif = TIFFFdOpenExt((int)fd, name, mode, opts); - if (!tif) - close(fd); - return tif; -} - -#ifdef _WIN32 -#include -/* - * Open a TIFF file with a Unicode filename, for read/writing. - */ -TIFF *TIFFOpenW(const wchar_t *name, const char *mode) -{ - return TIFFOpenWExt(name, mode, NULL); -} -TIFF *TIFFOpenWExt(const wchar_t *name, const char *mode, TIFFOpenOptions *opts) -{ - static const char module[] = "TIFFOpenW"; - int m, fd; - int mbsize; - char *mbname; - TIFF *tif; - - m = _TIFFgetMode(opts, NULL, mode, module); - if (m == -1) - return ((TIFF *)0); - -/* for cygwin and mingw */ -#ifdef O_BINARY - m |= O_BINARY; -#endif - - fd = _wopen(name, m, 0666); - if (fd < 0) - { - _TIFFErrorEarly(opts, NULL, module, "%ls: Cannot open", name); - return ((TIFF *)0); - } - - mbname = NULL; - mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL); - if (mbsize > 0) - { - mbname = _TIFFmalloc(mbsize); - if (!mbname) - { - _TIFFErrorEarly( - opts, NULL, module, - "Can't allocate space for filename conversion buffer"); - return ((TIFF *)0); - } - - WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize, NULL, NULL); - } - - tif = TIFFFdOpenExt((int)fd, (mbname != NULL) ? mbname : "", mode, - opts); - - _TIFFfree(mbname); - - if (!tif) - close(fd); - return tif; -} -#endif - -void *_TIFFmalloc(tmsize_t s) -{ - if (s == 0) - return ((void *)NULL); - - return (malloc((size_t)s)); -} - -void *_TIFFcalloc(tmsize_t nmemb, tmsize_t siz) -{ - if (nmemb == 0 || siz == 0) - return ((void *)NULL); - - return calloc((size_t)nmemb, (size_t)siz); -} - -void _TIFFfree(void *p) { free(p); } - -void *_TIFFrealloc(void *p, tmsize_t s) { return (realloc(p, (size_t)s)); } - -void _TIFFmemset(void *p, int v, tmsize_t c) { memset(p, v, (size_t)c); } - -void _TIFFmemcpy(void *d, const void *s, tmsize_t c) -{ - memcpy(d, s, (size_t)c); -} - -int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c) -{ - return (memcmp(p1, p2, (size_t)c)); -} - -static void unixWarningHandler(const char *module, const char *fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - fprintf(stderr, "Warning, "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFwarningHandler = unixWarningHandler; - -static void unixErrorHandler(const char *module, const char *fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFerrorHandler = unixErrorHandler; diff --git a/third_party/libtiff/libtiff/tif_version.c b/third_party/libtiff/libtiff/tif_version.c deleted file mode 100644 index 0b6c9bc..0000000 --- a/third_party/libtiff/libtiff/tif_version.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 1992-1997 Sam Leffler - * Copyright (c) 1992-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ -#include "tiffiop.h" - -static const char TIFFVersion[] = TIFFLIB_VERSION_STR; - -const char *TIFFGetVersion(void) { return (TIFFVersion); } diff --git a/third_party/libtiff/libtiff/tif_warning.c b/third_party/libtiff/libtiff/tif_warning.c deleted file mode 100644 index 5468de5..0000000 --- a/third_party/libtiff/libtiff/tif_warning.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -TIFFErrorHandlerExt _TIFFwarningHandlerExt = NULL; - -TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler handler) -{ - TIFFErrorHandler prev = _TIFFwarningHandler; - _TIFFwarningHandler = handler; - return (prev); -} - -TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt handler) -{ - TIFFErrorHandlerExt prev = _TIFFwarningHandlerExt; - _TIFFwarningHandlerExt = handler; - return (prev); -} - -void TIFFWarning(const char *module, const char *fmt, ...) -{ - va_list ap; - if (_TIFFwarningHandler) - { - va_start(ap, fmt); - (*_TIFFwarningHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFwarningHandlerExt) - { - va_start(ap, fmt); - (*_TIFFwarningHandlerExt)(0, module, fmt, ap); - va_end(ap); - } -} - -void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt, ...) -{ - va_list ap; - if (_TIFFwarningHandler) - { - va_start(ap, fmt); - (*_TIFFwarningHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFwarningHandlerExt) - { - va_start(ap, fmt); - (*_TIFFwarningHandlerExt)(fd, module, fmt, ap); - va_end(ap); - } -} - -void TIFFWarningExtR(TIFF *tif, const char *module, const char *fmt, ...) -{ - va_list ap; - if (tif && tif->tif_warnhandler) - { - va_start(ap, fmt); - int stop = (*tif->tif_warnhandler)(tif, tif->tif_warnhandler_user_data, - module, fmt, ap); - va_end(ap); - if (stop) - return; - } - if (_TIFFwarningHandler) - { - va_start(ap, fmt); - (*_TIFFwarningHandler)(module, fmt, ap); - va_end(ap); - } - if (_TIFFwarningHandlerExt) - { - va_start(ap, fmt); - (*_TIFFwarningHandlerExt)(tif ? tif->tif_clientdata : 0, module, fmt, - ap); - va_end(ap); - } -} diff --git a/third_party/libtiff/libtiff/tif_webp.c b/third_party/libtiff/libtiff/tif_webp.c deleted file mode 100644 index c06ce16..0000000 --- a/third_party/libtiff/libtiff/tif_webp.c +++ /dev/null @@ -1,917 +0,0 @@ -/* - * Copyright (c) 2018, Mapbox - * Author: - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef WEBP_SUPPORT -/* - * TIFF Library. - * - * WEBP Compression Support - * - */ - -#include "webp/decode.h" -#include "webp/encode.h" - -#include -#include - -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 -/* - * State block for each open TIFF - * file using WEBP compression/decompression. - */ -typedef struct -{ - uint16_t nSamples; /* number of samples per pixel */ - - int read_error; /* whether a read error has occurred, and which should cause - further reads in the same strip/tile to be aborted */ - int lossless; /* lossy/lossless compression */ - int lossless_exact; /* lossless exact mode. If TRUE, R,G,B values in areas - with alpha = 0 will be preserved */ - int quality_level; /* compression level */ - WebPPicture sPicture; /* WebP Picture */ - WebPConfig sEncoderConfig; /* WebP encoder config */ - uint8_t *pBuffer; /* buffer to hold raw data on encoding */ - unsigned int buffer_offset; /* current offset into the buffer */ - unsigned int buffer_size; - - WebPIDecoder *psDecoder; /* WebPIDecoder */ - WebPDecBuffer sDecBuffer; /* Decoder buffer */ - int last_y; /* Last row decoded */ - - int state; /* state flags */ - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} WebPState; - -#define LState(tif) ((WebPState *)(tif)->tif_data) -#define DecoderState(tif) LState(tif) -#define EncoderState(tif) LState(tif) - -static int TWebPEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int TWebPDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -static int TWebPDatasetWriter(const uint8_t *data, size_t data_size, - const WebPPicture *const picture) -{ - static const char module[] = "TWebPDatasetWriter"; - TIFF *tif = (TIFF *)(picture->custom_ptr); - - if ((tif->tif_rawcc + (tmsize_t)data_size) > tif->tif_rawdatasize) - { - TIFFErrorExtR( - tif, module, "Buffer too small by %" TIFF_SIZE_FORMAT " bytes.", - (size_t)(tif->tif_rawcc + data_size - tif->tif_rawdatasize)); - return 0; - } - else - { - _TIFFmemcpy(tif->tif_rawcp, data, data_size); - tif->tif_rawcc += data_size; - tif->tif_rawcp += data_size; - return 1; - } -} - -/* - * Encode a chunk of pixels. - */ -static int TWebPEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "TWebPEncode"; - WebPState *sp = EncoderState(tif); - (void)s; - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - if ((uint64_t)sp->buffer_offset + (uint64_t)cc > sp->buffer_size) - { - TIFFErrorExtR(tif, module, "Too many bytes to be written"); - return 0; - } - - memcpy(sp->pBuffer + sp->buffer_offset, bp, cc); - sp->buffer_offset += (unsigned)cc; - - return 1; -} - -static int TWebPDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "WebPDecode"; - VP8StatusCode status = VP8_STATUS_OK; - WebPState *sp = DecoderState(tif); - uint32_t segment_width, segment_height; - bool decode_whole_strile = false; - - (void)s; - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - if (sp->read_error) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "ZIPDecode: Scanline %" PRIu32 " cannot be read due to " - "previous error", - tif->tif_row); - return 0; - } - - if (sp->psDecoder == NULL) - { - TIFFDirectory *td = &tif->tif_dir; - uint32_t buffer_size; - - if (isTiled(tif)) - { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - } - else - { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - } - - int webp_width, webp_height; - if (!WebPGetInfo(tif->tif_rawcp, - (uint64_t)tif->tif_rawcc > UINT32_MAX - ? UINT32_MAX - : (uint32_t)tif->tif_rawcc, - &webp_width, &webp_height)) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, "WebPGetInfo() failed"); - return 0; - } - if ((uint32_t)webp_width != segment_width || - (uint32_t)webp_height != segment_height) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR( - tif, module, "WebP blob dimension is %dx%d. Expected %ux%u", - webp_width, webp_height, segment_width, segment_height); - return 0; - } - -#if WEBP_DECODER_ABI_VERSION >= 0x0002 - WebPDecoderConfig config; - if (!WebPInitDecoderConfig(&config)) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, "WebPInitDecoderConfig() failed"); - return 0; - } - - const bool bWebPGetFeaturesOK = - WebPGetFeatures(tif->tif_rawcp, - (uint64_t)tif->tif_rawcc > UINT32_MAX - ? UINT32_MAX - : (uint32_t)tif->tif_rawcc, - &config.input) == VP8_STATUS_OK; - - WebPFreeDecBuffer(&config.output); - - if (!bWebPGetFeaturesOK) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, "WebPInitDecoderConfig() failed"); - return 0; - } - - const int webp_bands = config.input.has_alpha ? 4 : 3; - if (webp_bands != sp->nSamples && - /* We accept the situation where the WebP blob has only 3 bands, - * whereas the raster is 4 bands. This can happen when the alpha - * channel is fully opaque, and WebP decoding works fine in that - * situation. - */ - !(webp_bands == 3 && sp->nSamples == 4)) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, - "WebP blob band count is %d. Expected %d", webp_bands, - sp->nSamples); - return 0; - } -#endif - - buffer_size = segment_width * segment_height * sp->nSamples; - if (occ == (tmsize_t)buffer_size) - { - /* If decoding the whole strip/tile, we can directly use the */ - /* output buffer */ - decode_whole_strile = true; - } - else if (sp->pBuffer == NULL || buffer_size > sp->buffer_size) - { - if (sp->pBuffer != NULL) - { - _TIFFfreeExt(tif, sp->pBuffer); - sp->pBuffer = NULL; - } - - sp->pBuffer = _TIFFmallocExt(tif, buffer_size); - if (!sp->pBuffer) - { - TIFFErrorExtR(tif, module, "Cannot allocate buffer"); - memset(op, 0, (size_t)occ); - sp->read_error = 1; - return 0; - } - sp->buffer_size = buffer_size; - } - - sp->last_y = 0; - - WebPInitDecBuffer(&sp->sDecBuffer); - - sp->sDecBuffer.is_external_memory = 1; - sp->sDecBuffer.width = segment_width; - sp->sDecBuffer.height = segment_height; - sp->sDecBuffer.u.RGBA.rgba = decode_whole_strile ? op : sp->pBuffer; - sp->sDecBuffer.u.RGBA.stride = segment_width * sp->nSamples; - sp->sDecBuffer.u.RGBA.size = buffer_size; - - if (sp->nSamples > 3) - { - sp->sDecBuffer.colorspace = MODE_RGBA; - } - else - { - sp->sDecBuffer.colorspace = MODE_RGB; - } - - sp->psDecoder = WebPINewDecoder(&sp->sDecBuffer); - - if (sp->psDecoder == NULL) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, "Unable to allocate WebP decoder."); - return 0; - } - } - - if (occ % sp->sDecBuffer.u.RGBA.stride) - { - // read_error not set here as this is a usage issue that can be - // recovered in a following call. - memset(op, 0, (size_t)occ); - /* Do not set read_error as could potentially be recovered */ - TIFFErrorExtR(tif, module, "Fractional scanlines cannot be read"); - return 0; - } - - status = WebPIAppend(sp->psDecoder, tif->tif_rawcp, tif->tif_rawcc); - - if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) - { - if (status == VP8_STATUS_INVALID_PARAM) - { - TIFFErrorExtR(tif, module, "Invalid parameter used."); - } - else if (status == VP8_STATUS_OUT_OF_MEMORY) - { - TIFFErrorExtR(tif, module, "Out of memory."); - } - else - { - TIFFErrorExtR(tif, module, "Unrecognized error."); - } - memset(op, 0, (size_t)occ); - sp->read_error = 1; - return 0; - } - else - { - int current_y, stride; - uint8_t *buf; - - /* Returns the RGB/A image decoded so far */ - buf = WebPIDecGetRGB(sp->psDecoder, ¤t_y, NULL, NULL, &stride); - - if ((buf != NULL) && - (occ <= (tmsize_t)stride * (current_y - sp->last_y))) - { - const int numberOfExpectedLines = - (int)(occ / sp->sDecBuffer.u.RGBA.stride); - if (decode_whole_strile) - { - if (current_y != numberOfExpectedLines) - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, - "Unable to decode WebP data: less lines than " - "expected."); - return 0; - } - } - else - { - memcpy(op, buf + (sp->last_y * stride), occ); - } - - tif->tif_rawcp += tif->tif_rawcc; - tif->tif_rawcc = 0; - sp->last_y += numberOfExpectedLines; - - if (decode_whole_strile) - { - /* We can now free the decoder as we're completely done */ - if (sp->psDecoder != NULL) - { - WebPIDelete(sp->psDecoder); - WebPFreeDecBuffer(&sp->sDecBuffer); - sp->psDecoder = NULL; - } - } - return 1; - } - else - { - memset(op, 0, (size_t)occ); - sp->read_error = 1; - TIFFErrorExtR(tif, module, "Unable to decode WebP data."); - return 0; - } - } -} - -static int TWebPFixupTags(TIFF *tif) -{ - (void)tif; - if (tif->tif_dir.td_planarconfig != PLANARCONFIG_CONTIG) - { - static const char module[] = "TWebPFixupTags"; - TIFFErrorExtR(tif, module, - "TIFF WEBP requires data to be stored contiguously in " - "RGB e.g. RGBRGBRGB " -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - "or RGBARGBARGBA" -#endif - ); - return 0; - } - return 1; -} - -static int TWebPSetupDecode(TIFF *tif) -{ - static const char module[] = "WebPSetupDecode"; - uint16_t nBitsPerSample = tif->tif_dir.td_bitspersample; - uint16_t sampleFormat = tif->tif_dir.td_sampleformat; - - WebPState *sp = DecoderState(tif); - assert(sp != NULL); - - sp->nSamples = tif->tif_dir.td_samplesperpixel; - - /* check band count */ - if (sp->nSamples != 3 -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - && sp->nSamples != 4 -#endif - ) - { - TIFFErrorExtR(tif, module, - "WEBP driver doesn't support %d bands. Must be 3 (RGB) " -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - "or 4 (RGBA) " -#endif - "bands.", - sp->nSamples); - return 0; - } - - /* check bits per sample and data type */ - if ((nBitsPerSample != 8) && (sampleFormat != 1)) - { - TIFFErrorExtR(tif, module, "WEBP driver requires 8 bit unsigned data"); - return 0; - } - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) - { - WebPPictureFree(&sp->sPicture); - if (sp->pBuffer != NULL) - { - _TIFFfreeExt(tif, sp->pBuffer); - sp->pBuffer = NULL; - } - sp->buffer_offset = 0; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - - return 1; -} - -/* - * Setup state for decoding a strip. - */ -static int TWebPPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "TWebPPreDecode"; - uint32_t segment_width, segment_height; - WebPState *sp = DecoderState(tif); - TIFFDirectory *td = &tif->tif_dir; - (void)s; - assert(sp != NULL); - - if (isTiled(tif)) - { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - } - else - { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - } - - if (segment_width > 16383 || segment_height > 16383) - { - TIFFErrorExtR(tif, module, - "WEBP maximum image dimensions are 16383 x 16383."); - return 0; - } - - if ((sp->state & LSTATE_INIT_DECODE) == 0) - tif->tif_setupdecode(tif); - - if (sp->psDecoder != NULL) - { - WebPIDelete(sp->psDecoder); - WebPFreeDecBuffer(&sp->sDecBuffer); - sp->psDecoder = NULL; - } - - sp->read_error = 0; - - return 1; -} - -static int TWebPSetupEncode(TIFF *tif) -{ - static const char module[] = "WebPSetupEncode"; - uint16_t nBitsPerSample = tif->tif_dir.td_bitspersample; - uint16_t sampleFormat = tif->tif_dir.td_sampleformat; - - WebPState *sp = EncoderState(tif); - assert(sp != NULL); - - sp->nSamples = tif->tif_dir.td_samplesperpixel; - - /* check band count */ - if (sp->nSamples != 3 -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - && sp->nSamples != 4 -#endif - ) - { - TIFFErrorExtR(tif, module, - "WEBP driver doesn't support %d bands. Must be 3 (RGB) " -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - "or 4 (RGBA) " -#endif - "bands.", - sp->nSamples); - return 0; - } - - /* check bits per sample and data type */ - if ((nBitsPerSample != 8) || (sampleFormat != SAMPLEFORMAT_UINT)) - { - TIFFErrorExtR(tif, module, "WEBP driver requires 8 bit unsigned data"); - return 0; - } - - if (sp->state & LSTATE_INIT_DECODE) - { - WebPIDelete(sp->psDecoder); - WebPFreeDecBuffer(&sp->sDecBuffer); - sp->psDecoder = NULL; - sp->last_y = 0; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - - if (!WebPPictureInit(&sp->sPicture)) - { - TIFFErrorExtR(tif, module, "Error initializing WebP picture."); - return 0; - } - - if (!WebPConfigInitInternal(&sp->sEncoderConfig, WEBP_PRESET_DEFAULT, - (float)sp->quality_level, - WEBP_ENCODER_ABI_VERSION)) - { - TIFFErrorExtR(tif, module, - "Error creating WebP encoder configuration."); - return 0; - } - -// WebPConfigInitInternal above sets lossless to false -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - sp->sEncoderConfig.lossless = sp->lossless; - if (sp->lossless) - { - sp->sPicture.use_argb = 1; -#if WEBP_ENCODER_ABI_VERSION >= 0x0209 - sp->sEncoderConfig.exact = sp->lossless_exact; -#endif - } -#endif - - if (!WebPValidateConfig(&sp->sEncoderConfig)) - { - TIFFErrorExtR(tif, module, "Error with WebP encoder configuration."); - return 0; - } - - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int TWebPPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "TWebPPreEncode"; - uint32_t segment_width, segment_height; - WebPState *sp = EncoderState(tif); - TIFFDirectory *td = &tif->tif_dir; - - (void)s; - - assert(sp != NULL); - if (sp->state != LSTATE_INIT_ENCODE) - tif->tif_setupencode(tif); - - /* - * Set encoding parameters for this strip/tile. - */ - if (isTiled(tif)) - { - segment_width = td->td_tilewidth; - segment_height = td->td_tilelength; - } - else - { - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; - if (segment_height > td->td_rowsperstrip) - segment_height = td->td_rowsperstrip; - } - - if (segment_width > 16383 || segment_height > 16383) - { - TIFFErrorExtR(tif, module, - "WEBP maximum image dimensions are 16383 x 16383."); - return 0; - } - - /* set up buffer for raw data */ - /* given above check and that nSamples <= 4, buffer_size is <= 1 GB */ - sp->buffer_size = segment_width * segment_height * sp->nSamples; - - if (sp->pBuffer != NULL) - { - _TIFFfreeExt(tif, sp->pBuffer); - sp->pBuffer = NULL; - } - - sp->pBuffer = _TIFFmallocExt(tif, sp->buffer_size); - if (!sp->pBuffer) - { - TIFFErrorExtR(tif, module, "Cannot allocate buffer"); - return 0; - } - sp->buffer_offset = 0; - - sp->sPicture.width = segment_width; - sp->sPicture.height = segment_height; - sp->sPicture.writer = TWebPDatasetWriter; - sp->sPicture.custom_ptr = tif; - - return 1; -} - -/* - * Finish off an encoded strip by flushing it. - */ -static int TWebPPostEncode(TIFF *tif) -{ - static const char module[] = "WebPPostEncode"; - int64_t stride; - WebPState *sp = EncoderState(tif); - assert(sp != NULL); - - assert(sp->state == LSTATE_INIT_ENCODE); - - stride = (int64_t)sp->sPicture.width * sp->nSamples; - -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - if (sp->nSamples == 4) - { - if (!WebPPictureImportRGBA(&sp->sPicture, sp->pBuffer, (int)stride)) - { - TIFFErrorExtR(tif, module, "WebPPictureImportRGBA() failed"); - return 0; - } - } - else -#endif - if (!WebPPictureImportRGB(&sp->sPicture, sp->pBuffer, (int)stride)) - { - TIFFErrorExtR(tif, module, "WebPPictureImportRGB() failed"); - return 0; - } - - if (!WebPEncode(&sp->sEncoderConfig, &sp->sPicture)) - { - -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - const char *pszErrorMsg = NULL; - switch (sp->sPicture.error_code) - { - case VP8_ENC_ERROR_OUT_OF_MEMORY: - pszErrorMsg = "Out of memory"; - break; - case VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY: - pszErrorMsg = "Out of memory while flushing bits"; - break; - case VP8_ENC_ERROR_NULL_PARAMETER: - pszErrorMsg = "A pointer parameter is NULL"; - break; - case VP8_ENC_ERROR_INVALID_CONFIGURATION: - pszErrorMsg = "Configuration is invalid"; - break; - case VP8_ENC_ERROR_BAD_DIMENSION: - pszErrorMsg = "Picture has invalid width/height"; - break; - case VP8_ENC_ERROR_PARTITION0_OVERFLOW: - pszErrorMsg = "Partition is bigger than 512k. Try using less " - "SEGMENTS, or increase PARTITION_LIMIT value"; - break; - case VP8_ENC_ERROR_PARTITION_OVERFLOW: - pszErrorMsg = "Partition is bigger than 16M"; - break; - case VP8_ENC_ERROR_BAD_WRITE: - pszErrorMsg = "Error while fludshing bytes"; - break; - case VP8_ENC_ERROR_FILE_TOO_BIG: - pszErrorMsg = "File is bigger than 4G"; - break; - case VP8_ENC_ERROR_USER_ABORT: - pszErrorMsg = "User interrupted"; - break; - default: - TIFFErrorExtR(tif, module, - "WebPEncode returned an unknown error code: %d", - sp->sPicture.error_code); - pszErrorMsg = "Unknown WebP error type."; - break; - } - TIFFErrorExtR(tif, module, "WebPEncode() failed : %s", pszErrorMsg); -#else - TIFFErrorExtR(tif, module, "Error in WebPEncode()"); -#endif - return 0; - } - - sp->sPicture.custom_ptr = NULL; - - if (!TIFFFlushData1(tif)) - { - TIFFErrorExtR(tif, module, "Error flushing TIFF WebP encoder."); - return 0; - } - - return 1; -} - -static void TWebPCleanup(TIFF *tif) -{ - WebPState *sp = LState(tif); - - assert(sp != 0); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state & LSTATE_INIT_ENCODE) - { - WebPPictureFree(&sp->sPicture); - } - - if (sp->psDecoder != NULL) - { - WebPIDelete(sp->psDecoder); - WebPFreeDecBuffer(&sp->sDecBuffer); - sp->psDecoder = NULL; - sp->last_y = 0; - } - - if (sp->pBuffer != NULL) - { - _TIFFfreeExt(tif, sp->pBuffer); - sp->pBuffer = NULL; - } - - _TIFFfreeExt(tif, tif->tif_data); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int TWebPVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "WebPVSetField"; - WebPState *sp = LState(tif); - - switch (tag) - { - case TIFFTAG_WEBP_LEVEL: - sp->quality_level = (int)va_arg(ap, int); - if (sp->quality_level <= 0 || sp->quality_level > 100.0f) - { - TIFFWarningExtR(tif, module, - "WEBP_LEVEL should be between 1 and 100"); - } - return 1; - case TIFFTAG_WEBP_LOSSLESS: -#if WEBP_ENCODER_ABI_VERSION >= 0x0100 - sp->lossless = va_arg(ap, int); - if (sp->lossless) - { - sp->quality_level = 100; - } - return 1; -#else - TIFFErrorExtR( - tif, module, - "Need to upgrade WEBP driver, this version doesn't support " - "lossless compression."); - return 0; -#endif - case TIFFTAG_WEBP_LOSSLESS_EXACT: -#if WEBP_ENCODER_ABI_VERSION >= 0x0209 - sp->lossless_exact = va_arg(ap, int); - return 1; -#else - TIFFErrorExtR( - tif, module, - "Need to upgrade WEBP driver, this version doesn't support " - "lossless compression."); - return 0; -#endif - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int TWebPVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - WebPState *sp = LState(tif); - - switch (tag) - { - case TIFFTAG_WEBP_LEVEL: - *va_arg(ap, int *) = sp->quality_level; - break; - case TIFFTAG_WEBP_LOSSLESS: - *va_arg(ap, int *) = sp->lossless; - break; - case TIFFTAG_WEBP_LOSSLESS_EXACT: - *va_arg(ap, int *) = sp->lossless_exact; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static const TIFFField TWebPFields[] = { - {TIFFTAG_WEBP_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, "WEBP quality", NULL}, - {TIFFTAG_WEBP_LOSSLESS, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - TRUE, FALSE, "WEBP lossless/lossy", NULL}, - {TIFFTAG_WEBP_LOSSLESS_EXACT, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, - FIELD_PSEUDO, TRUE, FALSE, "WEBP exact lossless", NULL}, -}; - -int TIFFInitWebP(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitWebP"; - WebPState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_WEBP); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, TWebPFields, TIFFArrayCount(TWebPFields))) - { - TIFFErrorExtR(tif, module, "Merging WebP codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(WebPState)); - if (tif->tif_data == NULL) - goto bad; - sp = LState(tif); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = TWebPVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = TWebPVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->quality_level = 75; /* default comp. level */ - sp->lossless = 0; /* default to false */ - sp->lossless_exact = 1; /* exact lossless mode (if lossless enabled) */ - sp->state = 0; - sp->nSamples = 0; - sp->psDecoder = NULL; - sp->last_y = 0; - - sp->buffer_offset = 0; - sp->pBuffer = NULL; - - /* - * Install codec methods. - * Notes: - * encoderow is not supported - */ - tif->tif_fixuptags = TWebPFixupTags; - tif->tif_setupdecode = TWebPSetupDecode; - tif->tif_predecode = TWebPPreDecode; - tif->tif_decoderow = TWebPDecode; - tif->tif_decodestrip = TWebPDecode; - tif->tif_decodetile = TWebPDecode; - tif->tif_setupencode = TWebPSetupEncode; - tif->tif_preencode = TWebPPreEncode; - tif->tif_postencode = TWebPPostEncode; - tif->tif_encoderow = TWebPEncode; - tif->tif_encodestrip = TWebPEncode; - tif->tif_encodetile = TWebPEncode; - tif->tif_cleanup = TWebPCleanup; - - return 1; -bad: - TIFFErrorExtR(tif, module, "No space for WebP state block"); - return 0; -} - -#endif /* WEBP_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_win32.c b/third_party/libtiff/libtiff/tif_win32.c deleted file mode 100644 index 525cebe..0000000 --- a/third_party/libtiff/libtiff/tif_win32.c +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library Win32-specific Routines. Adapted from tif_unix.c 4/5/95 by - * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA - */ - -#ifdef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#undef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS -#endif - -#include "tiffiop.h" -#include - -#include - -/* - CreateFileA/CreateFileW return type 'HANDLE' while TIFFFdOpen() takes 'int', - which is formally incompatible and can even seemingly be of different size: - HANDLE is 64 bit under Win64, while int is still 32 bits there. - - However, only the lower 32 bits of a HANDLE are significant under Win64 as, - for interoperability reasons, they must have the same values in 32- and - 64-bit programs running on the same system, see - - https://docs.microsoft.com/en-us/windows/win32/winprog64/interprocess-communication - - Because of this, it is safe to define the following trivial functions for - casting between ints and HANDLEs, which are only really needed to avoid - compiler warnings (and, perhaps, to make the code slightly more clear). - Note that using the intermediate cast to "intptr_t" is crucial for warning - avoidance, as this integer type has the same size as HANDLE in all builds. -*/ - -static inline thandle_t thandle_from_int(int ifd) -{ - return (thandle_t)(intptr_t)ifd; -} - -static inline int thandle_to_int(thandle_t fd) { return (int)(intptr_t)fd; } - -static tmsize_t _tiffReadProc(thandle_t fd, void *buf, tmsize_t size) -{ - /* tmsize_t is 64bit on 64bit systems, but the WinAPI ReadFile takes - * 32bit sizes, so we loop through the data in suitable 32bit sized - * chunks */ - uint8_t *ma; - uint64_t mb; - DWORD n; - DWORD o; - tmsize_t p; - ma = (uint8_t *)buf; - mb = size; - p = 0; - while (mb > 0) - { - n = 0x80000000UL; - if ((uint64_t)n > mb) - n = (DWORD)mb; - if (!ReadFile(fd, (LPVOID)ma, n, &o, NULL)) - return (0); - ma += o; - mb -= o; - p += o; - if (o != n) - break; - } - return (p); -} - -static tmsize_t _tiffWriteProc(thandle_t fd, void *buf, tmsize_t size) -{ - /* tmsize_t is 64bit on 64bit systems, but the WinAPI WriteFile takes - * 32bit sizes, so we loop through the data in suitable 32bit sized - * chunks */ - uint8_t *ma; - uint64_t mb; - DWORD n; - DWORD o; - tmsize_t p; - ma = (uint8_t *)buf; - mb = size; - p = 0; - while (mb > 0) - { - n = 0x80000000UL; - if ((uint64_t)n > mb) - n = (DWORD)mb; - if (!WriteFile(fd, (LPVOID)ma, n, &o, NULL)) - return (0); - ma += o; - mb -= o; - p += o; - if (o != n) - break; - } - return (p); -} - -static uint64_t _tiffSeekProc(thandle_t fd, uint64_t off, int whence) -{ - LARGE_INTEGER offli; - DWORD dwMoveMethod; - offli.QuadPart = off; - switch (whence) - { - case SEEK_SET: - dwMoveMethod = FILE_BEGIN; - break; - case SEEK_CUR: - dwMoveMethod = FILE_CURRENT; - break; - case SEEK_END: - dwMoveMethod = FILE_END; - break; - default: - dwMoveMethod = FILE_BEGIN; - break; - } - offli.LowPart = - SetFilePointer(fd, offli.LowPart, &offli.HighPart, dwMoveMethod); - if ((offli.LowPart == INVALID_SET_FILE_POINTER) && - (GetLastError() != NO_ERROR)) - offli.QuadPart = 0; - return (offli.QuadPart); -} - -static int _tiffCloseProc(thandle_t fd) { return (CloseHandle(fd) ? 0 : -1); } - -static uint64_t _tiffSizeProc(thandle_t fd) -{ - LARGE_INTEGER m; - if (GetFileSizeEx(fd, &m)) - return (m.QuadPart); - else - return (0); -} - -/* - * From "Hermann Josef Hill" : - * - * Windows uses both a handle and a pointer for file mapping, - * but according to the SDK documentation and Richter's book - * "Advanced Windows Programming" it is safe to free the handle - * after obtaining the file mapping pointer - * - * This removes a nasty OS dependency and cures a problem - * with Visual C++ 5.0 - */ -static int _tiffMapProc(thandle_t fd, void **pbase, toff_t *psize) -{ - uint64_t size; - tmsize_t sizem; - HANDLE hMapFile; - - size = _tiffSizeProc(fd); - sizem = (tmsize_t)size; - if (!size || (uint64_t)sizem != size) - return (0); - - /* By passing in 0 for the maximum file size, it specifies that we - create a file mapping object for the full file size. */ - hMapFile = CreateFileMapping(fd, NULL, PAGE_READONLY, 0, 0, NULL); - if (hMapFile == NULL) - return (0); - *pbase = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0); - CloseHandle(hMapFile); - if (*pbase == NULL) - return (0); - *psize = size; - return (1); -} - -static void _tiffUnmapProc(thandle_t fd, void *base, toff_t size) -{ - (void)fd; - (void)size; - UnmapViewOfFile(base); -} - -/* - * Open a TIFF file descriptor for read/writing. - * Note that TIFFFdOpen and TIFFOpen recognise the character 'u' in the mode - * string, which forces the file to be opened unmapped. - */ -TIFF *TIFFFdOpen(int ifd, const char *name, const char *mode) -{ - return TIFFFdOpenExt(ifd, name, mode, NULL); -} - -TIFF *TIFFFdOpenExt(int ifd, const char *name, const char *mode, - TIFFOpenOptions *opts) -{ - TIFF *tif; - int fSuppressMap; - int m; - - fSuppressMap = 0; - for (m = 0; mode[m] != 0; m++) - { - if (mode[m] == 'u') - { - fSuppressMap = 1; - break; - } - } - - tif = TIFFClientOpenExt( - name, mode, thandle_from_int(ifd), _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, - fSuppressMap ? _tiffDummyMapProc : _tiffMapProc, - fSuppressMap ? _tiffDummyUnmapProc : _tiffUnmapProc, opts); - if (tif) - tif->tif_fd = ifd; - return (tif); -} - -#ifndef _WIN32_WCE - -/* - * Open a TIFF file for read/writing. - */ -TIFF *TIFFOpen(const char *name, const char *mode) -{ - return TIFFOpenExt(name, mode, NULL); -} - -TIFF *TIFFOpenExt(const char *name, const char *mode, TIFFOpenOptions *opts) -{ - static const char module[] = "TIFFOpen"; - thandle_t fd; - int m; - DWORD dwMode; - TIFF *tif; - - m = _TIFFgetMode(opts, NULL, mode, module); - - switch (m) - { - case O_RDONLY: - dwMode = OPEN_EXISTING; - break; - case O_RDWR: - dwMode = OPEN_EXISTING; - break; - case O_RDWR | O_CREAT: - dwMode = OPEN_ALWAYS; - break; - case O_RDWR | O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - case O_RDWR | O_CREAT | O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - default: - return ((TIFF *)0); - } - - fd = (thandle_t)CreateFileA( - name, (m == O_RDONLY) ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE), - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode, - (m == O_RDONLY) ? FILE_ATTRIBUTE_READONLY : FILE_ATTRIBUTE_NORMAL, - NULL); - if (fd == INVALID_HANDLE_VALUE) - { - _TIFFErrorEarly(opts, NULL, module, "%s: Cannot open", name); - return ((TIFF *)0); - } - - tif = TIFFFdOpenExt(thandle_to_int(fd), name, mode, opts); - if (!tif) - CloseHandle(fd); - return tif; -} - -/* - * Open a TIFF file with a Unicode filename, for read/writing. - */ -TIFF *TIFFOpenW(const wchar_t *name, const char *mode) -{ - return TIFFOpenWExt(name, mode, NULL); -} - -TIFF *TIFFOpenWExt(const wchar_t *name, const char *mode, TIFFOpenOptions *opts) -{ - static const char module[] = "TIFFOpenW"; - thandle_t fd; - int m; - DWORD dwMode; - int mbsize; - char *mbname; - TIFF *tif; - - m = _TIFFgetMode(opts, NULL, mode, module); - - switch (m) - { - case O_RDONLY: - dwMode = OPEN_EXISTING; - break; - case O_RDWR: - dwMode = OPEN_EXISTING; - break; - case O_RDWR | O_CREAT: - dwMode = OPEN_ALWAYS; - break; - case O_RDWR | O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - case O_RDWR | O_CREAT | O_TRUNC: - dwMode = CREATE_ALWAYS; - break; - default: - return ((TIFF *)0); - } - - fd = (thandle_t)CreateFileW( - name, (m == O_RDONLY) ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE), - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, dwMode, - (m == O_RDONLY) ? FILE_ATTRIBUTE_READONLY : FILE_ATTRIBUTE_NORMAL, - NULL); - if (fd == INVALID_HANDLE_VALUE) - { - _TIFFErrorEarly(opts, NULL, module, "%S: Cannot open", name); - return ((TIFF *)0); - } - - mbname = NULL; - mbsize = WideCharToMultiByte(CP_ACP, 0, name, -1, NULL, 0, NULL, NULL); - if (mbsize > 0) - { - mbname = (char *)_TIFFmalloc(mbsize); - if (!mbname) - { - _TIFFErrorEarly( - opts, NULL, module, - "Can't allocate space for filename conversion buffer"); - return ((TIFF *)0); - } - - WideCharToMultiByte(CP_ACP, 0, name, -1, mbname, mbsize, NULL, NULL); - } - - tif = TIFFFdOpenExt(thandle_to_int(fd), - (mbname != NULL) ? mbname : "", mode, opts); - if (!tif) - CloseHandle(fd); - - _TIFFfree(mbname); - - return tif; -} - -#endif /* ndef _WIN32_WCE */ - -void *_TIFFmalloc(tmsize_t s) -{ - if (s == 0) - return ((void *)NULL); - - return (malloc((size_t)s)); -} - -void *_TIFFcalloc(tmsize_t nmemb, tmsize_t siz) -{ - if (nmemb == 0 || siz == 0) - return ((void *)NULL); - - return calloc((size_t)nmemb, (size_t)siz); -} - -void _TIFFfree(void *p) { free(p); } - -void *_TIFFrealloc(void *p, tmsize_t s) { return (realloc(p, (size_t)s)); } - -void _TIFFmemset(void *p, int v, tmsize_t c) { memset(p, v, (size_t)c); } - -void _TIFFmemcpy(void *d, const void *s, tmsize_t c) -{ - memcpy(d, s, (size_t)c); -} - -int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c) -{ - return (memcmp(p1, p2, (size_t)c)); -} - -#ifndef _WIN32_WCE - -static void Win32WarningHandler(const char *module, const char *fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - fprintf(stderr, "Warning, "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler; - -static void Win32ErrorHandler(const char *module, const char *fmt, va_list ap) -{ - if (module != NULL) - fprintf(stderr, "%s: ", module); - vfprintf(stderr, fmt, ap); - fprintf(stderr, ".\n"); -} -TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler; - -#endif /* ndef _WIN32_WCE */ diff --git a/third_party/libtiff/libtiff/tif_win32_versioninfo.rc b/third_party/libtiff/libtiff/tif_win32_versioninfo.rc deleted file mode 100644 index 1918854..0000000 --- a/third_party/libtiff/libtiff/tif_win32_versioninfo.rc +++ /dev/null @@ -1,50 +0,0 @@ - -/* clang-format off */ - -#define APSTUDIO_HIDDEN_SYMBOLS -#include -#undef APSTUDIO_HIDDEN_SYMBOLS -#include - -#include "tiffvers.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - PRODUCTVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "libtiff project" - VALUE "FileDescription", "TIFF Library" - VALUE "FileVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "InternalName", "tiff.dll" - VALUE "LegalCopyright", "See LICENCE.md" - VALUE "OriginalFilename", "tiff.dll" - VALUE "ProductName", "LibTIFF" - VALUE "ProductVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "WebPage", "https://libtiff.gitlab.io/libtiff/\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - - diff --git a/third_party/libtiff/libtiff/tif_write.c b/third_party/libtiff/libtiff/tif_write.c deleted file mode 100644 index 3263853..0000000 --- a/third_party/libtiff/libtiff/tif_write.c +++ /dev/null @@ -1,965 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - * - * Scanline-oriented Write Support - */ -#include "tiffiop.h" -#include - -#define STRIPINCR 20 /* expansion factor on strip array */ - -#define WRITECHECKSTRIPS(tif, module) \ - (((tif)->tif_flags & TIFF_BEENWRITING) || TIFFWriteCheck((tif), 0, module)) -#define WRITECHECKTILES(tif, module) \ - (((tif)->tif_flags & TIFF_BEENWRITING) || TIFFWriteCheck((tif), 1, module)) -#define BUFFERCHECK(tif) \ - ((((tif)->tif_flags & TIFF_BUFFERSETUP) && tif->tif_rawdata) || \ - TIFFWriteBufferSetup((tif), NULL, (tmsize_t)-1)) - -static int TIFFGrowStrips(TIFF *tif, uint32_t delta, const char *module); -static int TIFFAppendToStrip(TIFF *tif, uint32_t strip, uint8_t *data, - tmsize_t cc); - -int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, uint16_t sample) -{ - static const char module[] = "TIFFWriteScanline"; - register TIFFDirectory *td; - int status, imagegrew = 0; - uint32_t strip; - - if (!WRITECHECKSTRIPS(tif, module)) - return (-1); - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized more intelligently (using - * directory information). - */ - if (!BUFFERCHECK(tif)) - return (-1); - tif->tif_flags |= TIFF_BUF4WRITE; /* not strictly sure this is right*/ - - td = &tif->tif_dir; - /* - * Extend image length if needed - * (but only for PlanarConfig=1). - */ - if (row >= td->td_imagelength) - { /* extend image */ - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - TIFFErrorExtR( - tif, module, - "Can not change \"ImageLength\" when using separate planes"); - return (-1); - } - td->td_imagelength = row + 1; - imagegrew = 1; - } - /* - * Calculate strip and check for crossings. - */ - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - if (sample >= td->td_samplesperpixel) - { - TIFFErrorExtR(tif, module, "%lu: Sample out of range, max %lu", - (unsigned long)sample, - (unsigned long)td->td_samplesperpixel); - return (-1); - } - strip = sample * td->td_stripsperimage + row / td->td_rowsperstrip; - } - else - strip = row / td->td_rowsperstrip; - /* - * Check strip array to make sure there's space. We don't support - * dynamically growing files that have data organized in separate - * bitplanes because it's too painful. In that case we require that - * the imagelength be set properly before the first write (so that the - * strips array will be fully allocated above). - */ - if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module)) - return (-1); - if (strip != tif->tif_curstrip) - { - /* - * Changing strips -- flush any data present. - */ - if (!TIFFFlushData(tif)) - return (-1); - tif->tif_curstrip = strip; - /* - * Watch out for a growing image. The value of strips/image - * will initially be 1 (since it can't be deduced until the - * imagelength is known). - */ - if (strip >= td->td_stripsperimage && imagegrew) - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); - if (td->td_stripsperimage == 0) - { - TIFFErrorExtR(tif, module, "Zero strips per image"); - return (-1); - } - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) - { - if (!(*tif->tif_setupencode)(tif)) - return (-1); - tif->tif_flags |= TIFF_CODERSETUP; - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - /* this informs TIFFAppendToStrip() we have changed strip */ - tif->tif_curoff = 0; - - if (!(*tif->tif_preencode)(tif, sample)) - return (-1); - tif->tif_flags |= TIFF_POSTENCODE; - } - /* - * Ensure the write is either sequential or at the - * beginning of a strip (or that we can randomly - * access the data -- i.e. no encoding). - */ - if (row != tif->tif_row) - { - if (row < tif->tif_row) - { - /* - * Moving backwards within the same strip: - * backup to the start and then decode - * forward (below). - */ - tif->tif_row = - (strip % td->td_stripsperimage) * td->td_rowsperstrip; - tif->tif_rawcp = tif->tif_rawdata; - } - /* - * Seek forward to the desired row. - */ - if (!(*tif->tif_seek)(tif, row - tif->tif_row)) - return (-1); - tif->tif_row = row; - } - - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode(tif, (uint8_t *)buf, tif->tif_scanlinesize); - - status = (*tif->tif_encoderow)(tif, (uint8_t *)buf, tif->tif_scanlinesize, - sample); - - /* we are now poised at the beginning of the next row */ - tif->tif_row = row + 1; - return (status); -} - -/* Make sure that at the first attempt of rewriting a tile/strip, we will have - */ -/* more bytes available in the output buffer than the previous byte count, */ -/* so that TIFFAppendToStrip() will detect the overflow when it is called the - * first */ -/* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ -static int _TIFFReserveLargeEnoughWriteBuffer(TIFF *tif, uint32_t strip_or_tile) -{ - TIFFDirectory *td = &tif->tif_dir; - if (td->td_stripbytecount_p[strip_or_tile] > 0) - { - /* The +1 is to ensure at least one extra bytes */ - /* The +4 is because the LZW encoder flushes 4 bytes before the limit */ - uint64_t safe_buffer_size = - (uint64_t)(td->td_stripbytecount_p[strip_or_tile] + 1 + 4); - if (tif->tif_rawdatasize <= (tmsize_t)safe_buffer_size) - { - if (!(TIFFWriteBufferSetup( - tif, NULL, - (tmsize_t)TIFFroundup_64(safe_buffer_size, 1024)))) - return 0; - } - } - return 1; -} - -/* - * Encode the supplied data and write it to the - * specified strip. - * - * NB: Image length must be setup before writing. - */ -tmsize_t TIFFWriteEncodedStrip(TIFF *tif, uint32_t strip, void *data, - tmsize_t cc) -{ - static const char module[] = "TIFFWriteEncodedStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint16_t sample; - - if (!WRITECHECKSTRIPS(tif, module)) - return ((tmsize_t)-1); - /* - * Check strip array to make sure there's space. - * We don't support dynamically growing files that - * have data organized in separate bitplanes because - * it's too painful. In that case we require that - * the imagelength be set properly before the first - * write (so that the strips array will be fully - * allocated above). - */ - if (strip >= td->td_nstrips) - { - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - TIFFErrorExtR( - tif, module, - "Can not grow image by strips when using separate planes"); - return ((tmsize_t)-1); - } - if (!TIFFGrowStrips(tif, 1, module)) - return ((tmsize_t)-1); - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); - } - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized according to the directory - * info. - */ - if (!BUFFERCHECK(tif)) - return ((tmsize_t)-1); - - tif->tif_flags |= TIFF_BUF4WRITE; - - tif->tif_curstrip = strip; - - /* this informs TIFFAppendToStrip() we have changed or reset strip */ - tif->tif_curoff = 0; - - if (!_TIFFReserveLargeEnoughWriteBuffer(tif, strip)) - { - return ((tmsize_t)(-1)); - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - if (td->td_stripsperimage == 0) - { - TIFFErrorExtR(tif, module, "Zero strips per image"); - return ((tmsize_t)-1); - } - - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) - { - if (!(*tif->tif_setupencode)(tif)) - return ((tmsize_t)-1); - tif->tif_flags |= TIFF_CODERSETUP; - } - - tif->tif_flags &= ~TIFF_POSTENCODE; - - /* shortcut to avoid an extra memcpy() */ - if (td->td_compression == COMPRESSION_NONE) - { - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode(tif, (uint8_t *)data, cc); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8_t *)data, cc); - - if (cc > 0 && !TIFFAppendToStrip(tif, strip, (uint8_t *)data, cc)) - return ((tmsize_t)-1); - return (cc); - } - - sample = (uint16_t)(strip / td->td_stripsperimage); - if (!(*tif->tif_preencode)(tif, sample)) - return ((tmsize_t)-1); - - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode(tif, (uint8_t *)data, cc); - - if (!(*tif->tif_encodestrip)(tif, (uint8_t *)data, cc, sample)) - return ((tmsize_t)-1); - if (!(*tif->tif_postencode)(tif)) - return ((tmsize_t)-1); - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits(tif->tif_rawdata, tif->tif_rawcc); - if (tif->tif_rawcc > 0 && - !TIFFAppendToStrip(tif, strip, tif->tif_rawdata, tif->tif_rawcc)) - return ((tmsize_t)-1); - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (cc); -} - -/* - * Write the supplied data to the specified strip. - * - * NB: Image length must be setup before writing. - */ -tmsize_t TIFFWriteRawStrip(TIFF *tif, uint32_t strip, void *data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteRawStrip"; - TIFFDirectory *td = &tif->tif_dir; - - if (!WRITECHECKSTRIPS(tif, module)) - return ((tmsize_t)-1); - /* - * Check strip array to make sure there's space. - * We don't support dynamically growing files that - * have data organized in separate bitplanes because - * it's too painful. In that case we require that - * the imagelength be set properly before the first - * write (so that the strips array will be fully - * allocated above). - */ - if (strip >= td->td_nstrips) - { - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - { - TIFFErrorExtR( - tif, module, - "Can not grow image by strips when using separate planes"); - return ((tmsize_t)-1); - } - /* - * Watch out for a growing image. The value of - * strips/image will initially be 1 (since it - * can't be deduced until the imagelength is known). - */ - if (strip >= td->td_stripsperimage) - td->td_stripsperimage = - TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip); - if (!TIFFGrowStrips(tif, 1, module)) - return ((tmsize_t)-1); - } - - if (tif->tif_curstrip != strip) - { - tif->tif_curstrip = strip; - - /* this informs TIFFAppendToStrip() we have changed or reset strip */ - tif->tif_curoff = 0; - } - - if (td->td_stripsperimage == 0) - { - TIFFErrorExtR(tif, module, "Zero strips per image"); - return ((tmsize_t)-1); - } - tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; - return (TIFFAppendToStrip(tif, strip, (uint8_t *)data, cc) ? cc - : (tmsize_t)-1); -} - -/* - * Write and compress a tile of data. The - * tile is selected by the (x,y,z,s) coordinates. - */ -tmsize_t TIFFWriteTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, - uint16_t s) -{ - if (!TIFFCheckTile(tif, x, y, z, s)) - return ((tmsize_t)(-1)); - /* - * NB: A tile size of -1 is used instead of tif_tilesize knowing - * that TIFFWriteEncodedTile will clamp this to the tile size. - * This is done because the tile size may not be defined until - * after the output buffer is setup in TIFFWriteBufferSetup. - */ - return (TIFFWriteEncodedTile(tif, TIFFComputeTile(tif, x, y, z, s), buf, - (tmsize_t)(-1))); -} - -/* - * Encode the supplied data and write it to the - * specified tile. There must be space for the - * data. The function clamps individual writes - * to a tile to the tile size, but does not (and - * can not) check that multiple writes to the same - * tile do not write more than tile size data. - * - * NB: Image length must be setup before writing; this - * interface does not support automatically growing - * the image on each write (as TIFFWriteScanline does). - */ -tmsize_t TIFFWriteEncodedTile(TIFF *tif, uint32_t tile, void *data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteEncodedTile"; - TIFFDirectory *td; - uint16_t sample; - uint32_t howmany32; - - if (!WRITECHECKTILES(tif, module)) - return ((tmsize_t)(-1)); - td = &tif->tif_dir; - if (tile >= td->td_nstrips) - { - TIFFErrorExtR(tif, module, "Tile %lu out of range, max %lu", - (unsigned long)tile, (unsigned long)td->td_nstrips); - return ((tmsize_t)(-1)); - } - /* - * Handle delayed allocation of data buffer. This - * permits it to be sized more intelligently (using - * directory information). - */ - if (!BUFFERCHECK(tif)) - return ((tmsize_t)(-1)); - - tif->tif_flags |= TIFF_BUF4WRITE; - - tif->tif_curtile = tile; - - /* this informs TIFFAppendToStrip() we have changed or reset tile */ - tif->tif_curoff = 0; - - if (!_TIFFReserveLargeEnoughWriteBuffer(tif, tile)) - { - return ((tmsize_t)(-1)); - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - - /* - * Compute tiles per row & per column to compute - * current row and column - */ - howmany32 = TIFFhowmany_32(td->td_imagelength, td->td_tilelength); - if (howmany32 == 0) - { - TIFFErrorExtR(tif, module, "Zero tiles"); - return ((tmsize_t)(-1)); - } - tif->tif_row = (tile % howmany32) * td->td_tilelength; - howmany32 = TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); - if (howmany32 == 0) - { - TIFFErrorExtR(tif, module, "Zero tiles"); - return ((tmsize_t)(-1)); - } - tif->tif_col = (tile % howmany32) * td->td_tilewidth; - - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) - { - if (!(*tif->tif_setupencode)(tif)) - return ((tmsize_t)(-1)); - tif->tif_flags |= TIFF_CODERSETUP; - } - tif->tif_flags &= ~TIFF_POSTENCODE; - - /* - * Clamp write amount to the tile size. This is mostly - * done so that callers can pass in some large number - * (e.g. -1) and have the tile size used instead. - */ - if (cc < 1 || cc > tif->tif_tilesize) - cc = tif->tif_tilesize; - - /* shortcut to avoid an extra memcpy() */ - if (td->td_compression == COMPRESSION_NONE) - { - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode(tif, (uint8_t *)data, cc); - - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8_t *)data, cc); - - if (cc > 0 && !TIFFAppendToStrip(tif, tile, (uint8_t *)data, cc)) - return ((tmsize_t)-1); - return (cc); - } - - sample = (uint16_t)(tile / td->td_stripsperimage); - if (!(*tif->tif_preencode)(tif, sample)) - return ((tmsize_t)(-1)); - /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode(tif, (uint8_t *)data, cc); - - if (!(*tif->tif_encodetile)(tif, (uint8_t *)data, cc, sample)) - return ((tmsize_t)-1); - if (!(*tif->tif_postencode)(tif)) - return ((tmsize_t)(-1)); - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8_t *)tif->tif_rawdata, tif->tif_rawcc); - if (tif->tif_rawcc > 0 && - !TIFFAppendToStrip(tif, tile, tif->tif_rawdata, tif->tif_rawcc)) - return ((tmsize_t)(-1)); - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (cc); -} - -/* - * Write the supplied data to the specified strip. - * There must be space for the data; we don't check - * if strips overlap! - * - * NB: Image length must be setup before writing; this - * interface does not support automatically growing - * the image on each write (as TIFFWriteScanline does). - */ -tmsize_t TIFFWriteRawTile(TIFF *tif, uint32_t tile, void *data, tmsize_t cc) -{ - static const char module[] = "TIFFWriteRawTile"; - - if (!WRITECHECKTILES(tif, module)) - return ((tmsize_t)(-1)); - if (tile >= tif->tif_dir.td_nstrips) - { - TIFFErrorExtR(tif, module, "Tile %lu out of range, max %lu", - (unsigned long)tile, - (unsigned long)tif->tif_dir.td_nstrips); - return ((tmsize_t)(-1)); - } - return (TIFFAppendToStrip(tif, tile, (uint8_t *)data, cc) ? cc - : (tmsize_t)(-1)); -} - -#define isUnspecified(tif, f) \ - (TIFFFieldSet(tif, f) && (tif)->tif_dir.td_imagelength == 0) - -int TIFFSetupStrips(TIFF *tif) -{ - TIFFDirectory *td = &tif->tif_dir; - - if (isTiled(tif)) - td->td_stripsperimage = isUnspecified(tif, FIELD_TILEDIMENSIONS) - ? td->td_samplesperpixel - : TIFFNumberOfTiles(tif); - else - td->td_stripsperimage = isUnspecified(tif, FIELD_ROWSPERSTRIP) - ? td->td_samplesperpixel - : TIFFNumberOfStrips(tif); - td->td_nstrips = td->td_stripsperimage; - /* TIFFWriteDirectoryTagData has a limitation to 0x80000000U bytes */ - if (td->td_nstrips >= - 0x80000000U / ((tif->tif_flags & TIFF_BIGTIFF) ? 0x8U : 0x4U)) - { - TIFFErrorExtR(tif, "TIFFSetupStrips", - "Too large Strip/Tile Offsets/ByteCounts arrays"); - return 0; - } - if (td->td_planarconfig == PLANARCONFIG_SEPARATE) - td->td_stripsperimage /= td->td_samplesperpixel; - - if (td->td_stripoffset_p != NULL) - _TIFFfreeExt(tif, td->td_stripoffset_p); - td->td_stripoffset_p = (uint64_t *)_TIFFCheckMalloc( - tif, td->td_nstrips, sizeof(uint64_t), "for \"StripOffsets\" array"); - if (td->td_stripbytecount_p != NULL) - _TIFFfreeExt(tif, td->td_stripbytecount_p); - td->td_stripbytecount_p = (uint64_t *)_TIFFCheckMalloc( - tif, td->td_nstrips, sizeof(uint64_t), "for \"StripByteCounts\" array"); - if (td->td_stripoffset_p == NULL || td->td_stripbytecount_p == NULL) - return (0); - /* - * Place data at the end-of-file - * (by setting offsets to zero). - */ - _TIFFmemset(td->td_stripoffset_p, 0, td->td_nstrips * sizeof(uint64_t)); - _TIFFmemset(td->td_stripbytecount_p, 0, td->td_nstrips * sizeof(uint64_t)); - TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); - TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); - return (1); -} -#undef isUnspecified - -/* - * Verify file is writable and that the directory - * information is setup properly. In doing the latter - * we also "freeze" the state of the directory so - * that important information is not changed. - */ -int TIFFWriteCheck(TIFF *tif, int tiles, const char *module) -{ - if (tif->tif_mode == O_RDONLY) - { - TIFFErrorExtR(tif, module, "File not open for writing"); - return (0); - } - if (tiles ^ isTiled(tif)) - { - TIFFErrorExtR(tif, module, - tiles ? "Can not write tiles to a striped image" - : "Can not write scanlines to a tiled image"); - return (0); - } - - _TIFFFillStriles(tif); - - /* - * On the first write verify all the required information - * has been setup and initialize any data structures that - * had to wait until directory information was set. - * Note that a lot of our work is assumed to remain valid - * because we disallow any of the important parameters - * from changing after we start writing (i.e. once - * TIFF_BEENWRITING is set, TIFFSetField will only allow - * the image's length to be changed). - */ - if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) - { - TIFFErrorExtR(tif, module, - "Must set \"ImageWidth\" before writing data"); - return (0); - } - if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) - { - tif->tif_dir.td_nstrips = 0; - TIFFErrorExtR(tif, module, "No space for %s arrays", - isTiled(tif) ? "tile" : "strip"); - return (0); - } - if (isTiled(tif)) - { - tif->tif_tilesize = TIFFTileSize(tif); - if (tif->tif_tilesize == 0) - return (0); - } - else - tif->tif_tilesize = (tmsize_t)(-1); - tif->tif_scanlinesize = TIFFScanlineSize(tif); - if (tif->tif_scanlinesize == 0) - return (0); - tif->tif_flags |= TIFF_BEENWRITING; - - if (tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && - tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && - tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && - tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0 && - !(tif->tif_flags & TIFF_DIRTYDIRECT)) - { - TIFFForceStrileArrayWriting(tif); - } - - return (1); -} - -/* - * Setup the raw data buffer used for encoding. - */ -int TIFFWriteBufferSetup(TIFF *tif, void *bp, tmsize_t size) -{ - static const char module[] = "TIFFWriteBufferSetup"; - - if (tif->tif_rawdata) - { - if (tif->tif_flags & TIFF_MYBUFFER) - { - _TIFFfreeExt(tif, tif->tif_rawdata); - tif->tif_flags &= ~TIFF_MYBUFFER; - } - tif->tif_rawdata = NULL; - } - if (size == (tmsize_t)(-1)) - { - size = (isTiled(tif) ? tif->tif_tilesize : TIFFStripSize(tif)); - - /* Adds 10% margin for cases where compression would expand a bit */ - if (size < TIFF_TMSIZE_T_MAX - size / 10) - size += size / 10; - /* - * Make raw data buffer at least 8K - */ - if (size < 8 * 1024) - size = 8 * 1024; - bp = NULL; /* NB: force malloc */ - } - if (bp == NULL) - { - bp = _TIFFmallocExt(tif, size); - if (bp == NULL) - { - TIFFErrorExtR(tif, module, "No space for output buffer"); - return (0); - } - tif->tif_flags |= TIFF_MYBUFFER; - } - else - tif->tif_flags &= ~TIFF_MYBUFFER; - tif->tif_rawdata = (uint8_t *)bp; - tif->tif_rawdatasize = size; - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - tif->tif_flags |= TIFF_BUFFERSETUP; - return (1); -} - -/* - * Grow the strip data structures by delta strips. - */ -static int TIFFGrowStrips(TIFF *tif, uint32_t delta, const char *module) -{ - TIFFDirectory *td = &tif->tif_dir; - uint64_t *new_stripoffset; - uint64_t *new_stripbytecount; - - assert(td->td_planarconfig == PLANARCONFIG_CONTIG); - new_stripoffset = (uint64_t *)_TIFFreallocExt( - tif, td->td_stripoffset_p, (td->td_nstrips + delta) * sizeof(uint64_t)); - new_stripbytecount = (uint64_t *)_TIFFreallocExt( - tif, td->td_stripbytecount_p, - (td->td_nstrips + delta) * sizeof(uint64_t)); - if (new_stripoffset == NULL || new_stripbytecount == NULL) - { - if (new_stripoffset) - _TIFFfreeExt(tif, new_stripoffset); - if (new_stripbytecount) - _TIFFfreeExt(tif, new_stripbytecount); - td->td_nstrips = 0; - TIFFErrorExtR(tif, module, "No space to expand strip arrays"); - return (0); - } - td->td_stripoffset_p = new_stripoffset; - td->td_stripbytecount_p = new_stripbytecount; - _TIFFmemset(td->td_stripoffset_p + td->td_nstrips, 0, - delta * sizeof(uint64_t)); - _TIFFmemset(td->td_stripbytecount_p + td->td_nstrips, 0, - delta * sizeof(uint64_t)); - td->td_nstrips += delta; - tif->tif_flags |= TIFF_DIRTYDIRECT; - - return (1); -} - -/* - * Append the data to the specified strip. - */ -static int TIFFAppendToStrip(TIFF *tif, uint32_t strip, uint8_t *data, - tmsize_t cc) -{ - static const char module[] = "TIFFAppendToStrip"; - TIFFDirectory *td = &tif->tif_dir; - uint64_t m; - int64_t old_byte_count = -1; - - if (tif->tif_curoff == 0) - tif->tif_lastvalidoff = 0; - - if (td->td_stripoffset_p[strip] == 0 || tif->tif_curoff == 0) - { - assert(td->td_nstrips > 0); - - if (td->td_stripbytecount_p[strip] != 0 && - td->td_stripoffset_p[strip] != 0 && - td->td_stripbytecount_p[strip] >= (uint64_t)cc) - { - /* - * There is already tile data on disk, and the new tile - * data we have will fit in the same space. The only - * aspect of this that is risky is that there could be - * more data to append to this strip before we are done - * depending on how we are getting called. - */ - if (!SeekOK(tif, td->td_stripoffset_p[strip])) - { - TIFFErrorExtR(tif, module, "Seek error at scanline %lu", - (unsigned long)tif->tif_row); - return (0); - } - - tif->tif_lastvalidoff = - td->td_stripoffset_p[strip] + td->td_stripbytecount_p[strip]; - } - else - { - /* - * Seek to end of file, and set that as our location to - * write this strip. - */ - td->td_stripoffset_p[strip] = TIFFSeekFile(tif, 0, SEEK_END); - tif->tif_flags |= TIFF_DIRTYSTRIP; - } - - tif->tif_curoff = td->td_stripoffset_p[strip]; - - /* - * We are starting a fresh strip/tile, so set the size to zero. - */ - old_byte_count = td->td_stripbytecount_p[strip]; - td->td_stripbytecount_p[strip] = 0; - } - - m = tif->tif_curoff + cc; - if (!(tif->tif_flags & TIFF_BIGTIFF)) - m = (uint32_t)m; - if ((m < tif->tif_curoff) || (m < (uint64_t)cc)) - { - TIFFErrorExtR(tif, module, "Maximum TIFF file size exceeded"); - return (0); - } - - if (tif->tif_lastvalidoff != 0 && m > tif->tif_lastvalidoff && - td->td_stripbytecount_p[strip] > 0) - { - /* Ouch: we have detected that we are rewriting in place a strip/tile */ - /* with several calls to TIFFAppendToStrip(). The first call was with */ - /* a size smaller than the previous size of the strip/tile, so we */ - /* opted to rewrite in place, but a following call causes us to go */ - /* outsize of the strip/tile area, so we have to finally go for a */ - /* append-at-end-of-file strategy, and start by moving what we already - */ - /* wrote. */ - tmsize_t tempSize; - void *temp; - uint64_t offsetRead; - uint64_t offsetWrite; - uint64_t toCopy = td->td_stripbytecount_p[strip]; - - if (toCopy < 1024 * 1024) - tempSize = (tmsize_t)toCopy; - else - tempSize = 1024 * 1024; - - offsetRead = td->td_stripoffset_p[strip]; - offsetWrite = TIFFSeekFile(tif, 0, SEEK_END); - - m = offsetWrite + toCopy + cc; - if (!(tif->tif_flags & TIFF_BIGTIFF) && m != (uint32_t)m) - { - TIFFErrorExtR(tif, module, "Maximum TIFF file size exceeded"); - return (0); - } - - temp = _TIFFmallocExt(tif, tempSize); - if (temp == NULL) - { - TIFFErrorExtR(tif, module, "No space for output buffer"); - return (0); - } - - tif->tif_flags |= TIFF_DIRTYSTRIP; - - td->td_stripoffset_p[strip] = offsetWrite; - td->td_stripbytecount_p[strip] = 0; - - /* Move data written by previous calls to us at end of file */ - while (toCopy > 0) - { - if (!SeekOK(tif, offsetRead)) - { - TIFFErrorExtR(tif, module, "Seek error"); - _TIFFfreeExt(tif, temp); - return (0); - } - if (!ReadOK(tif, temp, tempSize)) - { - TIFFErrorExtR(tif, module, "Cannot read"); - _TIFFfreeExt(tif, temp); - return (0); - } - if (!SeekOK(tif, offsetWrite)) - { - TIFFErrorExtR(tif, module, "Seek error"); - _TIFFfreeExt(tif, temp); - return (0); - } - if (!WriteOK(tif, temp, tempSize)) - { - TIFFErrorExtR(tif, module, "Cannot write"); - _TIFFfreeExt(tif, temp); - return (0); - } - offsetRead += tempSize; - offsetWrite += tempSize; - td->td_stripbytecount_p[strip] += tempSize; - toCopy -= tempSize; - } - _TIFFfreeExt(tif, temp); - - /* Append the data of this call */ - offsetWrite += cc; - m = offsetWrite; - } - - if (!WriteOK(tif, data, cc)) - { - TIFFErrorExtR(tif, module, "Write error at scanline %lu", - (unsigned long)tif->tif_row); - return (0); - } - tif->tif_curoff = m; - td->td_stripbytecount_p[strip] += cc; - - if ((int64_t)td->td_stripbytecount_p[strip] != old_byte_count) - tif->tif_flags |= TIFF_DIRTYSTRIP; - - return (1); -} - -/* - * Internal version of TIFFFlushData that can be - * called by ``encodestrip routines'' w/o concern - * for infinite recursion. - */ -int TIFFFlushData1(TIFF *tif) -{ - if (tif->tif_rawcc > 0 && tif->tif_flags & TIFF_BUF4WRITE) - { - if (!isFillOrder(tif, tif->tif_dir.td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8_t *)tif->tif_rawdata, tif->tif_rawcc); - if (!TIFFAppendToStrip( - tif, isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip, - tif->tif_rawdata, tif->tif_rawcc)) - { - /* We update those variables even in case of error since there's */ - /* code that doesn't really check the return code of this */ - /* function */ - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (0); - } - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - } - return (1); -} - -/* - * Set the current write offset. This should only be - * used to set the offset to a known previous location - * (very carefully), or to 0 so that the next write gets - * appended to the end of the file. - */ -void TIFFSetWriteOffset(TIFF *tif, toff_t off) -{ - tif->tif_curoff = off; - tif->tif_lastvalidoff = 0; -} diff --git a/third_party/libtiff/libtiff/tif_zip.c b/third_party/libtiff/libtiff/tif_zip.c deleted file mode 100644 index 8abf88a..0000000 --- a/third_party/libtiff/libtiff/tif_zip.c +++ /dev/null @@ -1,776 +0,0 @@ -/* - * Copyright (c) 1995-1997 Sam Leffler - * Copyright (c) 1995-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef ZIP_SUPPORT -/* - * TIFF Library. - * - * ZIP (aka Deflate) Compression Support - * - * This file is an interface to the zlib library written by - * Jean-loup Gailly and Mark Adler. You must use version 1.0 or later - * of the library. - * - * Optionally, libdeflate (https://github.com/ebiggers/libdeflate) may be used - * to do the compression and decompression, but only for whole strips and tiles. - * For scanline access, zlib will be sued as a fallback. - */ -#include "tif_predict.h" -#include "zlib.h" - -#if LIBDEFLATE_SUPPORT -#include "libdeflate.h" -#endif -#define LIBDEFLATE_MAX_COMPRESSION_LEVEL 12 - -#include - -/* - * Sigh, ZLIB_VERSION is defined as a string so there's no - * way to do a proper check here. Instead we guess based - * on the presence of #defines that were added between the - * 0.95 and 1.0 distributions. - */ -#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED) -#error "Antiquated ZLIB software; you must use version 1.0 or later" -#endif - -#define SAFE_MSG(sp) ((sp)->stream.msg == NULL ? "" : (sp)->stream.msg) - -/* - * State block for each open TIFF - * file using ZIP compression/decompression. - */ -typedef struct -{ - TIFFPredictorState predict; - z_stream stream; - int read_error; /* whether a read error has occurred, and which should cause - further reads in the same strip/tile to be aborted */ - int zipquality; /* compression level */ - int state; /* state flags */ - int subcodec; /* DEFLATE_SUBCODEC_ZLIB or DEFLATE_SUBCODEC_LIBDEFLATE */ -#if LIBDEFLATE_SUPPORT - int libdeflate_state; /* -1 = until first time ZIPEncode() / ZIPDecode() is - called, 0 = use zlib, 1 = use libdeflate */ - struct libdeflate_decompressor *libdeflate_dec; - struct libdeflate_compressor *libdeflate_enc; -#endif -#define ZSTATE_INIT_DECODE 0x01 -#define ZSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} ZIPState; - -#define GetZIPState(tif) ((ZIPState *)(tif)->tif_data) -#define ZIPDecoderState(tif) GetZIPState(tif) -#define ZIPEncoderState(tif) GetZIPState(tif) - -static int ZIPEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int ZIPDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -static int ZIPFixupTags(TIFF *tif) -{ - (void)tif; - return (1); -} - -static int ZIPSetupDecode(TIFF *tif) -{ - static const char module[] = "ZIPSetupDecode"; - ZIPState *sp = ZIPDecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & ZSTATE_INIT_ENCODE) - { - deflateEnd(&sp->stream); - sp->state = 0; - } - - /* This function can possibly be called several times by */ - /* PredictorSetupDecode() if this function succeeds but */ - /* PredictorSetup() fails */ - if ((sp->state & ZSTATE_INIT_DECODE) == 0 && - inflateInit(&sp->stream) != Z_OK) - { - TIFFErrorExtR(tif, module, "%s", SAFE_MSG(sp)); - return (0); - } - else - { - sp->state |= ZSTATE_INIT_DECODE; - return (1); - } -} - -static inline uint64_t TIFF_MIN_UINT64(uint64_t a, uint64_t b) -{ - return a < b ? a : b; -} - -static inline uInt TIFF_CLAMP_UINT64_TO_INT32_MAX(uint64_t v) -{ - return (uInt)TIFF_MIN_UINT64(v, INT32_MAX); -} - -/* - * Setup state for decoding a strip. - */ -static int ZIPPreDecode(TIFF *tif, uint16_t s) -{ - ZIPState *sp = ZIPDecoderState(tif); - - (void)s; - assert(sp != NULL); - - if ((sp->state & ZSTATE_INIT_DECODE) == 0) - tif->tif_setupdecode(tif); - -#if LIBDEFLATE_SUPPORT - sp->libdeflate_state = -1; -#endif - sp->stream.next_in = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_in) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_in = TIFF_CLAMP_UINT64_TO_INT32_MAX(tif->tif_rawcc); - if (inflateReset(&sp->stream) == Z_OK) - { - sp->read_error = 0; - return 1; - } - return 0; -} - -static int ZIPDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "ZIPDecode"; - ZIPState *sp = ZIPDecoderState(tif); - - (void)s; - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_DECODE); - - if (sp->read_error) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, - "ZIPDecode: Scanline %" PRIu32 " cannot be read due to " - "previous error", - tif->tif_row); - return 0; - } - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_state == 1) - return 0; - - /* If we have libdeflate support and we are asked to read a whole */ - /* strip/tile, then go for using it */ - do - { - TIFFDirectory *td = &tif->tif_dir; - - if (sp->libdeflate_state == 0) - break; - if (sp->subcodec == DEFLATE_SUBCODEC_ZLIB) - break; - - /* Check if we are in the situation where we can use libdeflate */ - if (isTiled(tif)) - { - if (TIFFTileSize64(tif) != (uint64_t)occ) - break; - } - else - { - uint32_t strip_height = td->td_imagelength - tif->tif_row; - if (strip_height > td->td_rowsperstrip) - strip_height = td->td_rowsperstrip; - if (TIFFVStripSize64(tif, strip_height) != (uint64_t)occ) - break; - } - - /* Check for overflow */ - if ((size_t)tif->tif_rawcc != (uint64_t)tif->tif_rawcc) - break; - if ((size_t)occ != (uint64_t)occ) - break; - - /* Go for decompression using libdeflate */ - { - enum libdeflate_result res; - if (sp->libdeflate_dec == NULL) - { - sp->libdeflate_dec = libdeflate_alloc_decompressor(); - if (sp->libdeflate_dec == NULL) - { - break; - } - } - - sp->libdeflate_state = 1; - - res = libdeflate_zlib_decompress(sp->libdeflate_dec, tif->tif_rawcp, - (size_t)tif->tif_rawcc, op, - (size_t)occ, NULL); - - tif->tif_rawcp += tif->tif_rawcc; - tif->tif_rawcc = 0; - - /* We accept LIBDEFLATE_INSUFFICIENT_SPACE has a return */ - /* There are odd files in the wild where the last strip, when */ - /* it is smaller in height than td_rowsperstrip, actually contains - */ - /* data for td_rowsperstrip lines. Just ignore that silently. */ - if (res != LIBDEFLATE_SUCCESS && - res != LIBDEFLATE_INSUFFICIENT_SPACE) - { - memset(op, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "Decoding error at scanline %lu", - (unsigned long)tif->tif_row); - sp->read_error = 1; - return 0; - } - - return 1; - } - } while (0); - sp->libdeflate_state = 0; -#endif /* LIBDEFLATE_SUPPORT */ - - sp->stream.next_in = tif->tif_rawcp; - - sp->stream.next_out = op; - assert(sizeof(sp->stream.avail_out) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - do - { - int state; - uInt avail_in_before = TIFF_CLAMP_UINT64_TO_INT32_MAX(tif->tif_rawcc); - uInt avail_out_before = TIFF_CLAMP_UINT64_TO_INT32_MAX(occ); - sp->stream.avail_in = avail_in_before; - sp->stream.avail_out = avail_out_before; - state = inflate(&sp->stream, Z_PARTIAL_FLUSH); - tif->tif_rawcc -= (avail_in_before - sp->stream.avail_in); - occ -= (avail_out_before - sp->stream.avail_out); - if (state == Z_STREAM_END) - break; - if (state == Z_DATA_ERROR) - { - memset(sp->stream.next_out, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "Decoding error at scanline %lu, %s", - (unsigned long)tif->tif_row, SAFE_MSG(sp)); - sp->read_error = 1; - return (0); - } - if (state != Z_OK) - { - memset(sp->stream.next_out, 0, (size_t)occ); - TIFFErrorExtR(tif, module, "ZLib error: %s", SAFE_MSG(sp)); - sp->read_error = 1; - return (0); - } - } while (occ > 0); - if (occ != 0) - { - TIFFErrorExtR(tif, module, - "Not enough data at scanline %lu (short %" PRIu64 - " bytes)", - (unsigned long)tif->tif_row, (uint64_t)occ); - memset(sp->stream.next_out, 0, (size_t)occ); - sp->read_error = 1; - return (0); - } - - tif->tif_rawcp = sp->stream.next_in; - - return (1); -} - -static int ZIPSetupEncode(TIFF *tif) -{ - static const char module[] = "ZIPSetupEncode"; - ZIPState *sp = ZIPEncoderState(tif); - int cappedQuality; - - assert(sp != NULL); - if (sp->state & ZSTATE_INIT_DECODE) - { - inflateEnd(&sp->stream); - sp->state = 0; - } - - cappedQuality = sp->zipquality; - if (cappedQuality > Z_BEST_COMPRESSION) - cappedQuality = Z_BEST_COMPRESSION; - - if (deflateInit(&sp->stream, cappedQuality) != Z_OK) - { - TIFFErrorExtR(tif, module, "%s", SAFE_MSG(sp)); - return (0); - } - else - { - sp->state |= ZSTATE_INIT_ENCODE; - return (1); - } -} - -/* - * Reset encoding state at the start of a strip. - */ -static int ZIPPreEncode(TIFF *tif, uint16_t s) -{ - ZIPState *sp = ZIPEncoderState(tif); - - (void)s; - assert(sp != NULL); - if (sp->state != ZSTATE_INIT_ENCODE) - tif->tif_setupencode(tif); - -#if LIBDEFLATE_SUPPORT - sp->libdeflate_state = -1; -#endif - sp->stream.next_out = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_out) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - sp->stream.avail_out = (uint64_t)tif->tif_rawdatasize <= 0xFFFFFFFFU - ? (uInt)tif->tif_rawdatasize - : 0xFFFFFFFFU; - return (deflateReset(&sp->stream) == Z_OK); -} - -/* - * Encode a chunk of pixels. - */ -static int ZIPEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "ZIPEncode"; - ZIPState *sp = ZIPEncoderState(tif); - - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_ENCODE); - - (void)s; - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_state == 1) - return 0; - - /* If we have libdeflate support and we are asked to write a whole */ - /* strip/tile, then go for using it */ - do - { - TIFFDirectory *td = &tif->tif_dir; - - if (sp->libdeflate_state == 0) - break; - if (sp->subcodec == DEFLATE_SUBCODEC_ZLIB) - break; - - /* Libdeflate does not support the 0-compression level */ - if (sp->zipquality == Z_NO_COMPRESSION) - break; - - /* Check if we are in the situation where we can use libdeflate */ - if (isTiled(tif)) - { - if (TIFFTileSize64(tif) != (uint64_t)cc) - break; - } - else - { - uint32_t strip_height = td->td_imagelength - tif->tif_row; - if (strip_height > td->td_rowsperstrip) - strip_height = td->td_rowsperstrip; - if (TIFFVStripSize64(tif, strip_height) != (uint64_t)cc) - break; - } - - /* Check for overflow */ - if ((size_t)tif->tif_rawdatasize != (uint64_t)tif->tif_rawdatasize) - break; - if ((size_t)cc != (uint64_t)cc) - break; - - /* Go for compression using libdeflate */ - { - size_t nCompressedBytes; - if (sp->libdeflate_enc == NULL) - { - /* To get results as good as zlib, we asked for an extra */ - /* level of compression */ - sp->libdeflate_enc = libdeflate_alloc_compressor( - sp->zipquality == Z_DEFAULT_COMPRESSION ? 7 - : sp->zipquality >= 6 && sp->zipquality <= 9 - ? sp->zipquality + 1 - : sp->zipquality); - if (sp->libdeflate_enc == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate compressor"); - break; - } - } - - /* Make sure the output buffer is large enough for the worse case. - */ - /* In TIFFWriteBufferSetup(), when libtiff allocates the buffer */ - /* we've taken a 10% margin over the uncompressed size, which should - */ - /* be large enough even for the the worse case scenario. */ - if (libdeflate_zlib_compress_bound(sp->libdeflate_enc, (size_t)cc) > - (size_t)tif->tif_rawdatasize) - { - break; - } - - sp->libdeflate_state = 1; - nCompressedBytes = libdeflate_zlib_compress( - sp->libdeflate_enc, bp, (size_t)cc, tif->tif_rawdata, - (size_t)tif->tif_rawdatasize); - - if (nCompressedBytes == 0) - { - TIFFErrorExtR(tif, module, "Encoder error at scanline %lu", - (unsigned long)tif->tif_row); - return 0; - } - - tif->tif_rawcc = nCompressedBytes; - - if (!TIFFFlushData1(tif)) - return 0; - - return 1; - } - } while (0); - sp->libdeflate_state = 0; -#endif /* LIBDEFLATE_SUPPORT */ - - sp->stream.next_in = bp; - assert(sizeof(sp->stream.avail_in) == 4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - appropriately even before we simplify it */ - do - { - uInt avail_in_before = TIFF_CLAMP_UINT64_TO_INT32_MAX(cc); - sp->stream.avail_in = avail_in_before; - if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) - { - TIFFErrorExtR(tif, module, "Encoder error: %s", SAFE_MSG(sp)); - return (0); - } - if (sp->stream.avail_out == 0) - { - tif->tif_rawcc = tif->tif_rawdatasize; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - TIFF_CLAMP_UINT64_TO_INT32_MAX(tif->tif_rawdatasize); - } - cc -= (avail_in_before - sp->stream.avail_in); - } while (cc > 0); - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int ZIPPostEncode(TIFF *tif) -{ - static const char module[] = "ZIPPostEncode"; - ZIPState *sp = ZIPEncoderState(tif); - int state; - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_state == 1) - return 1; -#endif - - sp->stream.avail_in = 0; - do - { - state = deflate(&sp->stream, Z_FINISH); - switch (state) - { - case Z_STREAM_END: - case Z_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - tif->tif_rawcc = - tif->tif_rawdatasize - sp->stream.avail_out; - if (!TIFFFlushData1(tif)) - return 0; - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = - (uint64_t)tif->tif_rawdatasize <= 0xFFFFFFFFU - ? (uInt)tif->tif_rawdatasize - : 0xFFFFFFFFU; - } - break; - default: - TIFFErrorExtR(tif, module, "ZLib error: %s", SAFE_MSG(sp)); - return (0); - } - } while (state != Z_STREAM_END); - return (1); -} - -static void ZIPCleanup(TIFF *tif) -{ - ZIPState *sp = GetZIPState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state & ZSTATE_INIT_ENCODE) - { - deflateEnd(&sp->stream); - sp->state = 0; - } - else if (sp->state & ZSTATE_INIT_DECODE) - { - inflateEnd(&sp->stream); - sp->state = 0; - } - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_dec) - libdeflate_free_decompressor(sp->libdeflate_dec); - if (sp->libdeflate_enc) - libdeflate_free_compressor(sp->libdeflate_enc); -#endif - - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int ZIPVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "ZIPVSetField"; - ZIPState *sp = GetZIPState(tif); - - switch (tag) - { - case TIFFTAG_ZIPQUALITY: - sp->zipquality = (int)va_arg(ap, int); - if (sp->zipquality < Z_DEFAULT_COMPRESSION || - sp->zipquality > LIBDEFLATE_MAX_COMPRESSION_LEVEL) - { - TIFFErrorExtR( - tif, module, - "Invalid ZipQuality value. Should be in [-1,%d] range", - LIBDEFLATE_MAX_COMPRESSION_LEVEL); - return 0; - } - - if (sp->state & ZSTATE_INIT_ENCODE) - { - int cappedQuality = sp->zipquality; - if (cappedQuality > Z_BEST_COMPRESSION) - cappedQuality = Z_BEST_COMPRESSION; - if (deflateParams(&sp->stream, cappedQuality, - Z_DEFAULT_STRATEGY) != Z_OK) - { - TIFFErrorExtR(tif, module, "ZLib error: %s", SAFE_MSG(sp)); - return (0); - } - } - -#if LIBDEFLATE_SUPPORT - if (sp->libdeflate_enc) - { - libdeflate_free_compressor(sp->libdeflate_enc); - sp->libdeflate_enc = NULL; - } -#endif - - return (1); - - case TIFFTAG_DEFLATE_SUBCODEC: - sp->subcodec = (int)va_arg(ap, int); - if (sp->subcodec != DEFLATE_SUBCODEC_ZLIB && - sp->subcodec != DEFLATE_SUBCODEC_LIBDEFLATE) - { - TIFFErrorExtR(tif, module, "Invalid DeflateCodec value."); - return 0; - } -#if !LIBDEFLATE_SUPPORT - if (sp->subcodec == DEFLATE_SUBCODEC_LIBDEFLATE) - { - TIFFErrorExtR(tif, module, - "DeflateCodec = DEFLATE_SUBCODEC_LIBDEFLATE " - "unsupported in this build"); - return 0; - } -#endif - return 1; - - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int ZIPVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - ZIPState *sp = GetZIPState(tif); - - switch (tag) - { - case TIFFTAG_ZIPQUALITY: - *va_arg(ap, int *) = sp->zipquality; - break; - - case TIFFTAG_DEFLATE_SUBCODEC: - *va_arg(ap, int *) = sp->subcodec; - break; - - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static const TIFFField zipFields[] = { - {TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, "", NULL}, - {TIFFTAG_DEFLATE_SUBCODEC, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, - TRUE, FALSE, "", NULL}, -}; - -static void *TIFF_zalloc(void *opaque, unsigned int items, unsigned int size) -{ - static const char module[] = "TIFF_zalloc"; - TIFF *tif = opaque; - - if (items > ~(size_t)0 / size) - { - TIFFErrorExtR(tif, module, "Overflow"); - return NULL; - } - - return _TIFFmallocExt(tif, items * size); -} - -static void TIFF_zfree(void *opaque, void *ptr) -{ - _TIFFfreeExt((TIFF *)opaque, ptr); -} - -int TIFFInitZIP(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitZIP"; - ZIPState *sp; - - assert((scheme == COMPRESSION_DEFLATE) || - (scheme == COMPRESSION_ADOBE_DEFLATE)); -#ifdef NDEBUG - (void)scheme; -#endif - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, zipFields, TIFFArrayCount(zipFields))) - { - TIFFErrorExtR(tif, module, - "Merging Deflate codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFcallocExt(tif, sizeof(ZIPState), 1); - if (tif->tif_data == NULL) - goto bad; - sp = GetZIPState(tif); - sp->stream.zalloc = TIFF_zalloc; - sp->stream.zfree = TIFF_zfree; - sp->stream.opaque = tif; - sp->stream.data_type = Z_BINARY; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; -#if LIBDEFLATE_SUPPORT - sp->subcodec = DEFLATE_SUBCODEC_LIBDEFLATE; -#else - sp->subcodec = DEFLATE_SUBCODEC_ZLIB; -#endif - - /* - * Install codec methods. - */ - tif->tif_fixuptags = ZIPFixupTags; - tif->tif_setupdecode = ZIPSetupDecode; - tif->tif_predecode = ZIPPreDecode; - tif->tif_decoderow = ZIPDecode; - tif->tif_decodestrip = ZIPDecode; - tif->tif_decodetile = ZIPDecode; - tif->tif_setupencode = ZIPSetupEncode; - tif->tif_preencode = ZIPPreEncode; - tif->tif_postencode = ZIPPostEncode; - tif->tif_encoderow = ZIPEncode; - tif->tif_encodestrip = ZIPEncode; - tif->tif_encodetile = ZIPEncode; - tif->tif_cleanup = ZIPCleanup; - /* - * Setup predictor setup. - */ - (void)TIFFPredictorInit(tif); - return (1); -bad: - TIFFErrorExtR(tif, module, "No space for ZIP state block"); - return (0); -} -#endif /* ZIP_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tif_zstd.c b/third_party/libtiff/libtiff/tif_zstd.c deleted file mode 100644 index c828dbf..0000000 --- a/third_party/libtiff/libtiff/tif_zstd.c +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright (c) 2017, Planet Labs - * Author: - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef ZSTD_SUPPORT -/* - * TIFF Library. - * - * ZSTD Compression Support - * - */ - -#include "tif_predict.h" -#include "zstd.h" - -#include - -/* - * State block for each open TIFF file using ZSTD compression/decompression. - */ -typedef struct -{ - TIFFPredictorState predict; - ZSTD_DStream *dstream; - ZSTD_CStream *cstream; - int compression_level; /* compression level */ - ZSTD_outBuffer out_buffer; - int state; /* state flags */ -#define LSTATE_INIT_DECODE 0x01 -#define LSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} ZSTDState; - -#define GetZSTDState(tif) ((ZSTDState *)(tif)->tif_data) -#define ZSTDDecoderState(tif) GetZSTDState(tif) -#define ZSTDEncoderState(tif) GetZSTDState(tif) - -static int ZSTDEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s); -static int ZSTDDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s); - -static int ZSTDFixupTags(TIFF *tif) -{ - (void)tif; - return 1; -} - -static int ZSTDSetupDecode(TIFF *tif) -{ - ZSTDState *sp = ZSTDDecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & LSTATE_INIT_ENCODE) - { - ZSTD_freeCStream(sp->cstream); - sp->cstream = NULL; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_DECODE; - return 1; -} - -/* - * Setup state for decoding a strip. - */ -static int ZSTDPreDecode(TIFF *tif, uint16_t s) -{ - static const char module[] = "ZSTDPreDecode"; - ZSTDState *sp = ZSTDDecoderState(tif); - size_t zstd_ret; - - (void)s; - assert(sp != NULL); - - if ((sp->state & LSTATE_INIT_DECODE) == 0) - tif->tif_setupdecode(tif); - - if (sp->dstream == NULL) - { - sp->dstream = ZSTD_createDStream(); - if (sp->dstream == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate decompression stream"); - return 0; - } - } - - zstd_ret = ZSTD_initDStream(sp->dstream); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_initDStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - return 1; -} - -static int ZSTDDecode(TIFF *tif, uint8_t *op, tmsize_t occ, uint16_t s) -{ - static const char module[] = "ZSTDDecode"; - ZSTDState *sp = ZSTDDecoderState(tif); - ZSTD_inBuffer in_buffer; - ZSTD_outBuffer out_buffer; - size_t zstd_ret; - - (void)s; - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_DECODE); - - in_buffer.src = tif->tif_rawcp; - in_buffer.size = (size_t)tif->tif_rawcc; - in_buffer.pos = 0; - - out_buffer.dst = op; - out_buffer.size = (size_t)occ; - out_buffer.pos = 0; - - do - { - zstd_ret = ZSTD_decompressStream(sp->dstream, &out_buffer, &in_buffer); - if (ZSTD_isError(zstd_ret)) - { - memset(op + out_buffer.pos, 0, out_buffer.size - out_buffer.pos); - TIFFErrorExtR(tif, module, "Error in ZSTD_decompressStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - } while (zstd_ret != 0 && in_buffer.pos < in_buffer.size && - out_buffer.pos < out_buffer.size); - - if (out_buffer.pos < (size_t)occ) - { - memset(op + out_buffer.pos, 0, out_buffer.size - out_buffer.pos); - TIFFErrorExtR(tif, module, - "Not enough data at scanline %lu (short %lu bytes)", - (unsigned long)tif->tif_row, - (unsigned long)((size_t)occ - out_buffer.pos)); - return 0; - } - - tif->tif_rawcp += in_buffer.pos; - tif->tif_rawcc -= in_buffer.pos; - - return 1; -} - -static int ZSTDSetupEncode(TIFF *tif) -{ - ZSTDState *sp = ZSTDEncoderState(tif); - - assert(sp != NULL); - if (sp->state & LSTATE_INIT_DECODE) - { - ZSTD_freeDStream(sp->dstream); - sp->dstream = NULL; - sp->state = 0; - } - - sp->state |= LSTATE_INIT_ENCODE; - return 1; -} - -/* - * Reset encoding state at the start of a strip. - */ -static int ZSTDPreEncode(TIFF *tif, uint16_t s) -{ - static const char module[] = "ZSTDPreEncode"; - ZSTDState *sp = ZSTDEncoderState(tif); - size_t zstd_ret; - - (void)s; - assert(sp != NULL); - if (sp->state != LSTATE_INIT_ENCODE) - tif->tif_setupencode(tif); - - if (sp->cstream == NULL) - { - sp->cstream = ZSTD_createCStream(); - if (sp->cstream == NULL) - { - TIFFErrorExtR(tif, module, "Cannot allocate compression stream"); - return 0; - } - } - - zstd_ret = ZSTD_initCStream(sp->cstream, sp->compression_level); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_initCStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - - sp->out_buffer.dst = tif->tif_rawdata; - sp->out_buffer.size = (size_t)tif->tif_rawdatasize; - sp->out_buffer.pos = 0; - - return 1; -} - -/* - * Encode a chunk of pixels. - */ -static int ZSTDEncode(TIFF *tif, uint8_t *bp, tmsize_t cc, uint16_t s) -{ - static const char module[] = "ZSTDEncode"; - ZSTDState *sp = ZSTDEncoderState(tif); - ZSTD_inBuffer in_buffer; - size_t zstd_ret; - - assert(sp != NULL); - assert(sp->state == LSTATE_INIT_ENCODE); - - (void)s; - - in_buffer.src = bp; - in_buffer.size = (size_t)cc; - in_buffer.pos = 0; - - do - { - zstd_ret = - ZSTD_compressStream(sp->cstream, &sp->out_buffer, &in_buffer); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_compressStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - if (sp->out_buffer.pos == sp->out_buffer.size) - { - tif->tif_rawcc = tif->tif_rawdatasize; - if (!TIFFFlushData1(tif)) - return 0; - sp->out_buffer.dst = tif->tif_rawcp; - sp->out_buffer.pos = 0; - } - } while (in_buffer.pos < in_buffer.size); - - return 1; -} - -/* - * Finish off an encoded strip by flushing it. - */ -static int ZSTDPostEncode(TIFF *tif) -{ - static const char module[] = "ZSTDPostEncode"; - ZSTDState *sp = ZSTDEncoderState(tif); - size_t zstd_ret; - - do - { - zstd_ret = ZSTD_endStream(sp->cstream, &sp->out_buffer); - if (ZSTD_isError(zstd_ret)) - { - TIFFErrorExtR(tif, module, "Error in ZSTD_endStream(): %s", - ZSTD_getErrorName(zstd_ret)); - return 0; - } - if (sp->out_buffer.pos > 0) - { - tif->tif_rawcc = sp->out_buffer.pos; - if (!TIFFFlushData1(tif)) - return 0; - sp->out_buffer.dst = tif->tif_rawcp; - sp->out_buffer.pos = 0; - } - } while (zstd_ret != 0); - return 1; -} - -static void ZSTDCleanup(TIFF *tif) -{ - ZSTDState *sp = GetZSTDState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->dstream) - { - ZSTD_freeDStream(sp->dstream); - sp->dstream = NULL; - } - if (sp->cstream) - { - ZSTD_freeCStream(sp->cstream); - sp->cstream = NULL; - } - _TIFFfreeExt(tif, sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int ZSTDVSetField(TIFF *tif, uint32_t tag, va_list ap) -{ - static const char module[] = "ZSTDVSetField"; - ZSTDState *sp = GetZSTDState(tif); - - switch (tag) - { - case TIFFTAG_ZSTD_LEVEL: - sp->compression_level = (int)va_arg(ap, int); - if (sp->compression_level <= 0 || - sp->compression_level > ZSTD_maxCLevel()) - { - TIFFWarningExtR(tif, module, - "ZSTD_LEVEL should be between 1 and %d", - ZSTD_maxCLevel()); - } - return 1; - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int ZSTDVGetField(TIFF *tif, uint32_t tag, va_list ap) -{ - ZSTDState *sp = GetZSTDState(tif); - - switch (tag) - { - case TIFFTAG_ZSTD_LEVEL: - *va_arg(ap, int *) = sp->compression_level; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return 1; -} - -static const TIFFField ZSTDFields[] = { - {TIFFTAG_ZSTD_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, FIELD_PSEUDO, TRUE, - FALSE, "ZSTD compression_level", NULL}, -}; - -int TIFFInitZSTD(TIFF *tif, int scheme) -{ - static const char module[] = "TIFFInitZSTD"; - ZSTDState *sp; - - (void)scheme; - assert(scheme == COMPRESSION_ZSTD); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, ZSTDFields, TIFFArrayCount(ZSTDFields))) - { - TIFFErrorExtR(tif, module, "Merging ZSTD codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8_t *)_TIFFmallocExt(tif, sizeof(ZSTDState)); - if (tif->tif_data == NULL) - goto bad; - sp = GetZSTDState(tif); - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = ZSTDVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = ZSTDVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->compression_level = 9; /* default comp. level */ - sp->state = 0; - sp->dstream = 0; - sp->cstream = 0; - sp->out_buffer.dst = NULL; - sp->out_buffer.size = 0; - sp->out_buffer.pos = 0; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = ZSTDFixupTags; - tif->tif_setupdecode = ZSTDSetupDecode; - tif->tif_predecode = ZSTDPreDecode; - tif->tif_decoderow = ZSTDDecode; - tif->tif_decodestrip = ZSTDDecode; - tif->tif_decodetile = ZSTDDecode; - tif->tif_setupencode = ZSTDSetupEncode; - tif->tif_preencode = ZSTDPreEncode; - tif->tif_postencode = ZSTDPostEncode; - tif->tif_encoderow = ZSTDEncode; - tif->tif_encodestrip = ZSTDEncode; - tif->tif_encodetile = ZSTDEncode; - tif->tif_cleanup = ZSTDCleanup; - /* - * Setup predictor setup. - */ - (void)TIFFPredictorInit(tif); - return 1; -bad: - TIFFErrorExtR(tif, module, "No space for ZSTD state block"); - return 0; -} -#endif /* ZSTD_SUPPORT */ diff --git a/third_party/libtiff/libtiff/tiff.h b/third_party/libtiff/libtiff/tiff.h deleted file mode 100644 index 075e467..0000000 --- a/third_party/libtiff/libtiff/tiff.h +++ /dev/null @@ -1,901 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFF_ -#define _TIFF_ - -#include "tiffconf.h" - -/* - * Tag Image File Format (TIFF) - * - * Based on Rev 6.0 from: - * Developer's Desk - * Aldus Corporation - * 411 First Ave. South - * Suite 200 - * Seattle, WA 98104 - * 206-622-5500 - * - * (http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf) - * - * For BigTIFF design notes see the following links - * http://www.remotesensing.org/libtiff/bigtiffdesign.html - * http://www.awaresystems.be/imaging/tiff/bigtiff.html - */ - -#define TIFF_VERSION_CLASSIC 42 -#define TIFF_VERSION_BIG 43 - -#define TIFF_BIGENDIAN 0x4d4d -#define TIFF_LITTLEENDIAN 0x4949 -#define MDI_LITTLEENDIAN 0x5045 -#define MDI_BIGENDIAN 0x4550 - -/* - * Intrinsic data types required by the file format: - * - * 8-bit quantities int8_t/uint_8_t - * 16-bit quantities int16_t/uint_16_t - * 32-bit quantities int32_t/uint_32_t - * 64-bit quantities int64_t/uint_64_t - * strings unsigned char* - */ -#ifdef __GNUC__ -#define TIFF_GCC_DEPRECATED __attribute__((deprecated)) -#else -#define TIFF_GCC_DEPRECATED -#endif -#ifdef _MSC_VER -#define TIFF_MSC_DEPRECATED \ - __declspec(deprecated("libtiff type deprecated; please use corresponding " \ - "C99 stdint.h type")) -#else -#define TIFF_MSC_DEPRECATED -#endif - -#ifndef TIFF_DISABLE_DEPRECATED -typedef TIFF_MSC_DEPRECATED int8_t int8 TIFF_GCC_DEPRECATED; -typedef TIFF_MSC_DEPRECATED uint8_t uint8 TIFF_GCC_DEPRECATED; - -typedef TIFF_MSC_DEPRECATED int16_t int16 TIFF_GCC_DEPRECATED; -typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED; - -typedef TIFF_MSC_DEPRECATED int32_t int32 TIFF_GCC_DEPRECATED; -typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED; - -typedef TIFF_MSC_DEPRECATED int64_t int64 TIFF_GCC_DEPRECATED; -typedef TIFF_MSC_DEPRECATED uint64_t uint64 TIFF_GCC_DEPRECATED; -#endif /* TIFF_DISABLE_DEPRECATED */ - -/* - * Some types as promoted in a variable argument list - * We use uint16_vap rather then directly using int, because this way - * we document the type we actually want to pass through, conceptually, - * rather then confusing the issue by merely stating the type it gets - * promoted to - */ - -typedef int uint16_vap; - -/* - * TIFF header. - */ -typedef struct -{ - uint16_t tiff_magic; /* magic number (defines byte order) */ - uint16_t tiff_version; /* TIFF version number */ -} TIFFHeaderCommon; -typedef struct -{ - uint16_t tiff_magic; /* magic number (defines byte order) */ - uint16_t tiff_version; /* TIFF version number */ - uint32_t tiff_diroff; /* byte offset to first directory */ -} TIFFHeaderClassic; -typedef struct -{ - uint16_t tiff_magic; /* magic number (defines byte order) */ - uint16_t tiff_version; /* TIFF version number */ - uint16_t tiff_offsetsize; /* size of offsets, should be 8 */ - uint16_t tiff_unused; /* unused word, should be 0 */ - uint64_t tiff_diroff; /* byte offset to first directory */ -} TIFFHeaderBig; - -/* - * NB: In the comments below, - * - items marked with a + are obsoleted by revision 5.0, - * - items marked with a ! are introduced in revision 6.0. - * - items marked with a % are introduced post revision 6.0. - * - items marked with a $ are obsoleted by revision 6.0. - * - items marked with a & are introduced by Adobe DNG specification. - */ - -/* - * Tag data type information. - * - * Note: RATIONALs are the ratio of two 32-bit integer values. - *--: - * Note2: TIFF_IFD8 data type is used in tiffFields[]-tag definition in order to - distinguish the write-handling of those tags between ClassicTIFF and BigTiff: - For ClassicTIFF libtiff writes a 32-bit value and the TIFF_IFD - type-id into the file For BigTIFF libtiff writes a 64-bit value and the - TIFF_IFD8 type-id into the file - */ -typedef enum -{ - TIFF_NOTYPE = 0, /* placeholder */ - TIFF_BYTE = 1, /* 8-bit unsigned integer */ - TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */ - TIFF_SHORT = 3, /* 16-bit unsigned integer */ - TIFF_LONG = 4, /* 32-bit unsigned integer */ - TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */ - TIFF_SBYTE = 6, /* !8-bit signed integer */ - TIFF_UNDEFINED = 7, /* !8-bit untyped data */ - TIFF_SSHORT = 8, /* !16-bit signed integer */ - TIFF_SLONG = 9, /* !32-bit signed integer */ - TIFF_SRATIONAL = 10, /* !64-bit signed fraction */ - TIFF_FLOAT = 11, /* !32-bit IEEE floating point */ - TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */ - TIFF_IFD = 13, /* %32-bit unsigned integer (offset) */ - TIFF_LONG8 = 16, /* BigTIFF 64-bit unsigned integer */ - TIFF_SLONG8 = 17, /* BigTIFF 64-bit signed integer */ - TIFF_IFD8 = 18 /* BigTIFF 64-bit unsigned integer (offset) */ -} TIFFDataType; - -/* - * TIFF Tag Definitions. - */ -/* clang-format off */ /* for better readability of tag comments */ -#define TIFFTAG_SUBFILETYPE 254 /* subfile data descriptor */ -#define FILETYPE_REDUCEDIMAGE 0x1 /* reduced resolution version */ -#define FILETYPE_PAGE 0x2 /* one page of many */ -#define FILETYPE_MASK 0x4 /* transparency mask */ -#define TIFFTAG_OSUBFILETYPE 255 /* +kind of data in subfile */ -#define OFILETYPE_IMAGE 1 /* full resolution image data */ -#define OFILETYPE_REDUCEDIMAGE 2 /* reduced size image data */ -#define OFILETYPE_PAGE 3 /* one page of many */ -#define TIFFTAG_IMAGEWIDTH 256 /* image width in pixels */ -#define TIFFTAG_IMAGELENGTH 257 /* image height in pixels */ -#define TIFFTAG_BITSPERSAMPLE 258 /* bits per channel (sample) */ -#define TIFFTAG_COMPRESSION 259 /* data compression technique */ -#define COMPRESSION_NONE 1 /* dump mode */ -#define COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */ -#define COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */ -#define COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */ -#define COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */ -#define COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */ -#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */ -#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */ -#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */ -#define COMPRESSION_T85 9 /* !TIFF/FX T.85 JBIG compression */ -#define COMPRESSION_T43 10 /* !TIFF/FX T.43 colour by layered JBIG compression */ -#define COMPRESSION_NEXT 32766 /* NeXT 2-bit RLE */ -#define COMPRESSION_CCITTRLEW 32771 /* #1 w/ word alignment */ -#define COMPRESSION_PACKBITS 32773 /* Macintosh RLE */ -#define COMPRESSION_THUNDERSCAN 32809 /* ThunderScan RLE */ -/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT */ -#define COMPRESSION_DCS 32947 /* Kodak DCS encoding */ -#define COMPRESSION_JBIG 34661 /* ISO JBIG */ -#define COMPRESSION_SGILOG 34676 /* SGI Log Luminance RLE */ -#define COMPRESSION_SGILOG24 34677 /* SGI Log 24-bit packed */ -#define COMPRESSION_JP2000 34712 /* Leadtools JPEG2000 */ -#define COMPRESSION_LERC 34887 /* ESRI Lerc codec: https://github.com/Esri/lerc */ -/* compression codes 34887-34889 are reserved for ESRI */ -#define COMPRESSION_LZMA 34925 /* LZMA2 */ -#define COMPRESSION_ZSTD 50000 /* ZSTD: WARNING not registered in Adobe-maintained registry */ -#define COMPRESSION_WEBP 50001 /* WEBP: WARNING not registered in Adobe-maintained registry */ -#define COMPRESSION_JXL 50002 /* JPEGXL: WARNING not registered in Adobe-maintained registry */ -#define COMPRESSION_JXL_DNG_1_7 52546 /* JPEGXL from DNG 1.7 specification */ -#define TIFFTAG_PHOTOMETRIC 262 /* photometric interpretation */ -#define PHOTOMETRIC_MINISWHITE 0 /* min value is white */ -#define PHOTOMETRIC_MINISBLACK 1 /* min value is black */ -#define PHOTOMETRIC_RGB 2 /* RGB color model */ -#define PHOTOMETRIC_PALETTE 3 /* color map indexed */ -#define PHOTOMETRIC_MASK 4 /* $holdout mask */ -#define PHOTOMETRIC_SEPARATED 5 /* !color separations */ -#define PHOTOMETRIC_YCBCR 6 /* !CCIR 601 */ -#define PHOTOMETRIC_CIELAB 8 /* !1976 CIE L*a*b* */ -#define PHOTOMETRIC_ICCLAB 9 /* ICC L*a*b* [Adobe TIFF Technote 4] */ -#define PHOTOMETRIC_ITULAB 10 /* ITU L*a*b* */ -#define PHOTOMETRIC_CFA 32803 /* color filter array */ -#define PHOTOMETRIC_LOGL 32844 /* CIE Log2(L) */ -#define PHOTOMETRIC_LOGLUV 32845 /* CIE Log2(L) (u',v') */ -#define TIFFTAG_THRESHHOLDING 263 /* +thresholding used on data */ -#define THRESHHOLD_BILEVEL 1 /* b&w art scan */ -#define THRESHHOLD_HALFTONE 2 /* or dithered scan */ -#define THRESHHOLD_ERRORDIFFUSE 3 /* usually floyd-steinberg */ -#define TIFFTAG_CELLWIDTH 264 /* +dithering matrix width */ -#define TIFFTAG_CELLLENGTH 265 /* +dithering matrix height */ -#define TIFFTAG_FILLORDER 266 /* data order within a byte */ -#define FILLORDER_MSB2LSB 1 /* most significant -> least */ -#define FILLORDER_LSB2MSB 2 /* least significant -> most */ -#define TIFFTAG_DOCUMENTNAME 269 /* name of doc. image is from */ -#define TIFFTAG_IMAGEDESCRIPTION 270 /* info about image */ -#define TIFFTAG_MAKE 271 /* scanner manufacturer name */ -#define TIFFTAG_MODEL 272 /* scanner model name/number */ -#define TIFFTAG_STRIPOFFSETS 273 /* offsets to data strips */ -#define TIFFTAG_ORIENTATION 274 /* +image orientation */ -#define ORIENTATION_TOPLEFT 1 /* row 0 top, col 0 lhs */ -#define ORIENTATION_TOPRIGHT 2 /* row 0 top, col 0 rhs */ -#define ORIENTATION_BOTRIGHT 3 /* row 0 bottom, col 0 rhs */ -#define ORIENTATION_BOTLEFT 4 /* row 0 bottom, col 0 lhs */ -#define ORIENTATION_LEFTTOP 5 /* row 0 lhs, col 0 top */ -#define ORIENTATION_RIGHTTOP 6 /* row 0 rhs, col 0 top */ -#define ORIENTATION_RIGHTBOT 7 /* row 0 rhs, col 0 bottom */ -#define ORIENTATION_LEFTBOT 8 /* row 0 lhs, col 0 bottom */ -#define TIFFTAG_SAMPLESPERPIXEL 277 /* samples per pixel */ -#define TIFFTAG_ROWSPERSTRIP 278 /* rows per strip of data */ -#define TIFFTAG_STRIPBYTECOUNTS 279 /* bytes counts for strips */ -#define TIFFTAG_MINSAMPLEVALUE 280 /* +minimum sample value */ -#define TIFFTAG_MAXSAMPLEVALUE 281 /* +maximum sample value */ -#define TIFFTAG_XRESOLUTION 282 /* pixels/resolution in x */ -#define TIFFTAG_YRESOLUTION 283 /* pixels/resolution in y */ -#define TIFFTAG_PLANARCONFIG 284 /* storage organization */ -#define PLANARCONFIG_CONTIG 1 /* single image plane */ -#define PLANARCONFIG_SEPARATE 2 /* separate planes of data */ -#define TIFFTAG_PAGENAME 285 /* page name image is from */ -#define TIFFTAG_XPOSITION 286 /* x page offset of image lhs */ -#define TIFFTAG_YPOSITION 287 /* y page offset of image lhs */ -#define TIFFTAG_FREEOFFSETS 288 /* +byte offset to free block */ -#define TIFFTAG_FREEBYTECOUNTS 289 /* +sizes of free blocks */ -#define TIFFTAG_GRAYRESPONSEUNIT 290 /* $gray scale curve accuracy */ -#define GRAYRESPONSEUNIT_10S 1 /* tenths of a unit */ -#define GRAYRESPONSEUNIT_100S 2 /* hundredths of a unit */ -#define GRAYRESPONSEUNIT_1000S 3 /* thousandths of a unit */ -#define GRAYRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ -#define GRAYRESPONSEUNIT_100000S 5 /* hundred-thousandths */ -#define TIFFTAG_GRAYRESPONSECURVE 291 /* $gray scale response curve */ -#define TIFFTAG_GROUP3OPTIONS 292 /* 32 flag bits */ -#define TIFFTAG_T4OPTIONS 292 /* TIFF 6.0 proper name alias */ -#define GROUP3OPT_2DENCODING 0x1 /* 2-dimensional coding */ -#define GROUP3OPT_UNCOMPRESSED 0x2 /* data not compressed */ -#define GROUP3OPT_FILLBITS 0x4 /* fill to byte boundary */ -#define TIFFTAG_GROUP4OPTIONS 293 /* 32 flag bits */ -#define TIFFTAG_T6OPTIONS 293 /* TIFF 6.0 proper name */ -#define GROUP4OPT_UNCOMPRESSED 0x2 /* data not compressed */ -#define TIFFTAG_RESOLUTIONUNIT 296 /* units of resolutions */ -#define RESUNIT_NONE 1 /* no meaningful units */ -#define RESUNIT_INCH 2 /* english */ -#define RESUNIT_CENTIMETER 3 /* metric */ -#define TIFFTAG_PAGENUMBER 297 /* page numbers of multi-page */ -#define TIFFTAG_COLORRESPONSEUNIT 300 /* $color curve accuracy */ -#define COLORRESPONSEUNIT_10S 1 /* tenths of a unit */ -#define COLORRESPONSEUNIT_100S 2 /* hundredths of a unit */ -#define COLORRESPONSEUNIT_1000S 3 /* thousandths of a unit */ -#define COLORRESPONSEUNIT_10000S 4 /* ten-thousandths of a unit */ -#define COLORRESPONSEUNIT_100000S 5 /* hundred-thousandths */ -#define TIFFTAG_TRANSFERFUNCTION 301 /* !colorimetry info */ -#define TIFFTAG_SOFTWARE 305 /* name & release */ -#define TIFFTAG_DATETIME 306 /* creation date and time */ -#define TIFFTAG_ARTIST 315 /* creator of image */ -#define TIFFTAG_HOSTCOMPUTER 316 /* machine where created */ -#define TIFFTAG_PREDICTOR 317 /* prediction scheme w/ LZW */ -#define PREDICTOR_NONE 1 /* no prediction scheme used */ -#define PREDICTOR_HORIZONTAL 2 /* horizontal differencing */ -#define PREDICTOR_FLOATINGPOINT 3 /* floating point predictor */ -#define TIFFTAG_WHITEPOINT 318 /* image white point */ -#define TIFFTAG_PRIMARYCHROMATICITIES 319 /* !primary chromaticities */ -#define TIFFTAG_COLORMAP 320 /* RGB map for palette image */ -#define TIFFTAG_HALFTONEHINTS 321 /* !highlight+shadow info */ -#define TIFFTAG_TILEWIDTH 322 /* !tile width in pixels */ -#define TIFFTAG_TILELENGTH 323 /* !tile height in pixels */ -#define TIFFTAG_TILEOFFSETS 324 /* !offsets to data tiles */ -#define TIFFTAG_TILEBYTECOUNTS 325 /* !byte counts for tiles */ -#define TIFFTAG_BADFAXLINES 326 /* lines w/ wrong pixel count */ -#define TIFFTAG_CLEANFAXDATA 327 /* regenerated line info */ -#define CLEANFAXDATA_CLEAN 0 /* no errors detected */ -#define CLEANFAXDATA_REGENERATED 1 /* receiver regenerated lines */ -#define CLEANFAXDATA_UNCLEAN 2 /* uncorrected errors exist */ -#define TIFFTAG_CONSECUTIVEBADFAXLINES 328 /* max consecutive bad lines */ -#define TIFFTAG_SUBIFD 330 /* subimage descriptors */ -#define TIFFTAG_INKSET 332 /* !inks in separated image */ -#define INKSET_CMYK 1 /* !cyan-magenta-yellow-black color */ -#define INKSET_MULTIINK 2 /* !multi-ink or hi-fi color */ -#define TIFFTAG_INKNAMES 333 /* !ascii names of inks */ -#define TIFFTAG_NUMBEROFINKS 334 /* !number of inks */ -#define TIFFTAG_DOTRANGE 336 /* !0% and 100% dot codes */ -#define TIFFTAG_TARGETPRINTER 337 /* !separation target */ -#define TIFFTAG_EXTRASAMPLES 338 /* !info about extra samples */ -#define EXTRASAMPLE_UNSPECIFIED 0 /* !unspecified data */ -#define EXTRASAMPLE_ASSOCALPHA 1 /* !associated alpha data */ -#define EXTRASAMPLE_UNASSALPHA 2 /* !unassociated alpha data */ -#define TIFFTAG_SAMPLEFORMAT 339 /* !data sample format */ -#define SAMPLEFORMAT_UINT 1 /* !unsigned integer data */ -#define SAMPLEFORMAT_INT 2 /* !signed integer data */ -#define SAMPLEFORMAT_IEEEFP 3 /* !IEEE floating point data */ -#define SAMPLEFORMAT_VOID 4 /* !untyped data */ -#define SAMPLEFORMAT_COMPLEXINT 5 /* !complex signed int */ -#define SAMPLEFORMAT_COMPLEXIEEEFP 6 /* !complex ieee floating */ -#define TIFFTAG_SMINSAMPLEVALUE 340 /* !variable MinSampleValue */ -#define TIFFTAG_SMAXSAMPLEVALUE 341 /* !variable MaxSampleValue */ -#define TIFFTAG_CLIPPATH 343 /* %ClipPath [Adobe TIFF technote 2] */ -#define TIFFTAG_XCLIPPATHUNITS 344 /* %XClipPathUnits [Adobe TIFF technote 2] */ -#define TIFFTAG_YCLIPPATHUNITS 345 /* %YClipPathUnits [Adobe TIFF technote 2] */ -#define TIFFTAG_INDEXED 346 /* %Indexed [Adobe TIFF Technote 3] */ -#define TIFFTAG_JPEGTABLES 347 /* %JPEG table stream */ -#define TIFFTAG_OPIPROXY 351 /* %OPI Proxy [Adobe TIFF technote] */ -/* Tags 400-435 are from the TIFF/FX spec */ -#define TIFFTAG_GLOBALPARAMETERSIFD 400 /* ! */ -#define TIFFTAG_PROFILETYPE 401 /* ! */ -#define PROFILETYPE_UNSPECIFIED 0 /* ! */ -#define PROFILETYPE_G3_FAX 1 /* ! */ -#define TIFFTAG_FAXPROFILE 402 /* ! */ -#define FAXPROFILE_S 1 /* !TIFF/FX FAX profile S */ -#define FAXPROFILE_F 2 /* !TIFF/FX FAX profile F */ -#define FAXPROFILE_J 3 /* !TIFF/FX FAX profile J */ -#define FAXPROFILE_C 4 /* !TIFF/FX FAX profile C */ -#define FAXPROFILE_L 5 /* !TIFF/FX FAX profile L */ -#define FAXPROFILE_M 6 /* !TIFF/FX FAX profile LM */ -#define TIFFTAG_CODINGMETHODS 403 /* !TIFF/FX coding methods */ -#define CODINGMETHODS_T4_1D (1 << 1) /* !T.4 1D */ -#define CODINGMETHODS_T4_2D (1 << 2) /* !T.4 2D */ -#define CODINGMETHODS_T6 (1 << 3) /* !T.6 */ -#define CODINGMETHODS_T85 (1 << 4) /* !T.85 JBIG */ -#define CODINGMETHODS_T42 (1 << 5) /* !T.42 JPEG */ -#define CODINGMETHODS_T43 (1 << 6) /* !T.43 colour by layered JBIG */ -#define TIFFTAG_VERSIONYEAR 404 /* !TIFF/FX version year */ -#define TIFFTAG_MODENUMBER 405 /* !TIFF/FX mode number */ -#define TIFFTAG_DECODE 433 /* !TIFF/FX decode */ -#define TIFFTAG_IMAGEBASECOLOR 434 /* !TIFF/FX image base colour */ -#define TIFFTAG_T82OPTIONS 435 /* !TIFF/FX T.82 options */ -/* - * Tags 512-521 are obsoleted by Technical Note #2 which specifies a - * revised JPEG-in-TIFF scheme. - */ -#define TIFFTAG_JPEGPROC 512 /* !JPEG processing algorithm */ -#define JPEGPROC_BASELINE 1 /* !baseline sequential */ -#define JPEGPROC_LOSSLESS 14 /* !Huffman coded lossless */ -#define TIFFTAG_JPEGIFOFFSET 513 /* !pointer to SOI marker */ -#define TIFFTAG_JPEGIFBYTECOUNT 514 /* !JFIF stream length */ -#define TIFFTAG_JPEGRESTARTINTERVAL 515 /* !restart interval length */ -#define TIFFTAG_JPEGLOSSLESSPREDICTORS 517 /* !lossless proc predictor */ -#define TIFFTAG_JPEGPOINTTRANSFORM 518 /* !lossless point transform */ -#define TIFFTAG_JPEGQTABLES 519 /* !Q matrix offsets */ -#define TIFFTAG_JPEGDCTABLES 520 /* !DCT table offsets */ -#define TIFFTAG_JPEGACTABLES 521 /* !AC coefficient offsets */ -#define TIFFTAG_YCBCRCOEFFICIENTS 529 /* !RGB -> YCbCr transform */ -#define TIFFTAG_YCBCRSUBSAMPLING 530 /* !YCbCr subsampling factors */ -#define TIFFTAG_YCBCRPOSITIONING 531 /* !subsample positioning */ -#define YCBCRPOSITION_CENTERED 1 /* !as in PostScript Level 2 */ -#define YCBCRPOSITION_COSITED 2 /* !as in CCIR 601-1 */ -#define TIFFTAG_REFERENCEBLACKWHITE 532 /* !colorimetry info */ -#define TIFFTAG_STRIPROWCOUNTS 559 /* !TIFF/FX strip row counts */ -#define TIFFTAG_XMLPACKET 700 /* %XML packet [Adobe XMP Specification, January 2004 */ -#define TIFFTAG_OPIIMAGEID 32781 /* %OPI ImageID [Adobe TIFF technote] */ -/* For eiStream Annotation Specification, Version 1.00.06 see - * http://web.archive.org/web/20050309141348/http://www.kofile.com/support%20pro/faqs/annospec.htm */ -#define TIFFTAG_TIFFANNOTATIONDATA 32932 -/* tags 32952-32956 are private tags registered to Island Graphics */ -#define TIFFTAG_REFPTS 32953 /* image reference points */ -#define TIFFTAG_REGIONTACKPOINT 32954 /* region-xform tack point */ -#define TIFFTAG_REGIONWARPCORNERS 32955 /* warp quadrilateral */ -#define TIFFTAG_REGIONAFFINE 32956 /* affine transformation mat */ -/* tags 32995-32999 are private tags registered to SGI */ -#define TIFFTAG_MATTEING 32995 /* $use ExtraSamples */ -#define TIFFTAG_DATATYPE 32996 /* $use SampleFormat */ -#define TIFFTAG_IMAGEDEPTH 32997 /* z depth of image */ -#define TIFFTAG_TILEDEPTH 32998 /* z depth/data tile */ -/* tags 33300-33309 are private tags registered to Pixar */ -/* - * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH - * are set when an image has been cropped out of a larger image. - * They reflect the size of the original uncropped image. - * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used - * to determine the position of the smaller image in the larger one. - */ -#define TIFFTAG_PIXAR_IMAGEFULLWIDTH 33300 /* full image size in x */ -#define TIFFTAG_PIXAR_IMAGEFULLLENGTH 33301 /* full image size in y */ -/* Tags 33302-33306 are used to identify special image modes and data - * used by Pixar's texture formats. - */ -#define TIFFTAG_PIXAR_TEXTUREFORMAT 33302 /* texture map format */ -#define TIFFTAG_PIXAR_WRAPMODES 33303 /* s & t wrap modes */ -#define TIFFTAG_PIXAR_FOVCOT 33304 /* cotan(fov) for env. maps */ -#define TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 33305 -#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306 -/* tag 33405 is a private tag registered to Eastman Kodak */ -#define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */ -#define TIFFTAG_CFAREPEATPATTERNDIM 33421 /* (alias for TIFFTAG_EP_CFAREPEATPATTERNDIM)*/ -#define TIFFTAG_CFAPATTERN 33422 /* (alias for TIFFTAG_EP_CFAPATTERN) */ -#define TIFFTAG_BATTERYLEVEL 33423 /* (alias for TIFFTAG_EP_BATTERYLEVEL) */ -/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */ -#define TIFFTAG_COPYRIGHT 33432 /* copyright string */ -/* Tags 33445-33452 are used for Molecular Dynamics GEL fileformat, - * see http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf - * (2023: the above web site is unavailable but tags are explained briefly at - * https://www.awaresystems.be/imaging/tiff/tifftags/docs/gel.html - */ -#define TIFFTAG_MD_FILETAG 33445 /* Specifies the pixel data format encoding in the GEL file format. */ -#define TIFFTAG_MD_SCALEPIXEL 33446 /* scale factor */ -#define TIFFTAG_MD_COLORTABLE 33447 /* conversion from 16bit to 8bit */ -#define TIFFTAG_MD_LABNAME 33448 /* name of the lab that scanned this file. */ -#define TIFFTAG_MD_SAMPLEINFO 33449 /* information about the scanned GEL sample */ -#define TIFFTAG_MD_PREPDATE 33450 /* information about the date the sample was prepared YY/MM/DD */ -#define TIFFTAG_MD_PREPTIME 33451 /* information about the time the sample was prepared HH:MM*/ -#define TIFFTAG_MD_FILEUNITS 33452 /* Units for data in this file, as used in the GEL file format. */ -/* IPTC TAG from RichTIFF specifications */ -#define TIFFTAG_RICHTIFFIPTC 33723 -#define TIFFTAG_INGR_PACKET_DATA_TAG 33918 /* Intergraph Application specific storage. */ -#define TIFFTAG_INGR_FLAG_REGISTERS 33919 /* Intergraph Application specific flags. */ -#define TIFFTAG_IRASB_TRANSORMATION_MATRIX 33920 /* Originally part of Intergraph's GeoTIFF tags, but likely understood by IrasB only. */ -#define TIFFTAG_MODELTIEPOINTTAG 33922 /* GeoTIFF */ -/* 34016-34029 are reserved for ANSI IT8 TIFF/IT */ -#define TIFFTAG_STONITS 37439 /* Sample value to Nits */ -/* tag 34929 is a private tag registered to FedEx */ -#define TIFFTAG_FEDEX_EDR 34929 /* unknown use */ -#define TIFFTAG_IMAGESOURCEDATA 37724 /* http://justsolve.archiveteam.org/wiki/PSD, http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ */ -#define TIFFTAG_INTEROPERABILITYIFD 40965 /* Pointer to EXIF Interoperability private directory */ -#define TIFFTAG_GDAL_METADATA 42112 /* Used by the GDAL library */ -#define TIFFTAG_GDAL_NODATA 42113 /* Used by the GDAL library */ -#define TIFFTAG_OCE_SCANJOB_DESCRIPTION 50215 /* Used in the Oce scanning process */ -#define TIFFTAG_OCE_APPLICATION_SELECTOR 50216 /* Used in the Oce scanning process. */ -#define TIFFTAG_OCE_IDENTIFICATION_NUMBER 50217 -#define TIFFTAG_OCE_IMAGELOGIC_CHARACTERISTICS 50218 -/* tags 50674 to 50677 are reserved for ESRI */ -#define TIFFTAG_LERC_PARAMETERS 50674 /* Stores LERC version and additional compression method */ - -/* Adobe Digital Negative (DNG) format tags */ -#define TIFFTAG_DNGVERSION 50706 /* &DNG version number */ -#define TIFFTAG_DNGBACKWARDVERSION 50707 /* &DNG compatibility version */ -#define TIFFTAG_UNIQUECAMERAMODEL 50708 /* &name for the camera model */ -#define TIFFTAG_LOCALIZEDCAMERAMODEL 50709 /* &localized camera model name (UTF-8) */ -#define TIFFTAG_CFAPLANECOLOR 50710 /* &CFAPattern->LinearRaw space mapping */ -#define TIFFTAG_CFALAYOUT 50711 /* &spatial layout of the CFA */ -#define TIFFTAG_LINEARIZATIONTABLE 50712 /* &lookup table description */ -#define TIFFTAG_BLACKLEVELREPEATDIM 50713 /* &repeat pattern size for the BlackLevel tag */ -#define TIFFTAG_BLACKLEVEL 50714 /* &zero light encoding level */ -#define TIFFTAG_BLACKLEVELDELTAH 50715 /* &zero light encoding level differences (columns) */ -#define TIFFTAG_BLACKLEVELDELTAV 50716 /* &zero light encoding level differences (rows) */ -#define TIFFTAG_WHITELEVEL 50717 /* &fully saturated encoding level */ -#define TIFFTAG_DEFAULTSCALE 50718 /* &default scale factors */ -#define TIFFTAG_DEFAULTCROPORIGIN 50719 /* &origin of the final image area */ -#define TIFFTAG_DEFAULTCROPSIZE 50720 /* &size of the final image area */ -#define TIFFTAG_COLORMATRIX1 50721 /* &XYZ->reference color space transformation matrix 1 */ -#define TIFFTAG_COLORMATRIX2 50722 /* &XYZ->reference color space transformation matrix 2 */ -#define TIFFTAG_CAMERACALIBRATION1 50723 /* &calibration matrix 1 */ -#define TIFFTAG_CAMERACALIBRATION2 50724 /* &calibration matrix 2 */ -#define TIFFTAG_REDUCTIONMATRIX1 50725 /* &dimensionality reduction matrix 1 */ -#define TIFFTAG_REDUCTIONMATRIX2 50726 /* &dimensionality reduction matrix 2 */ -#define TIFFTAG_ANALOGBALANCE 50727 /* &gain applied the stored raw values*/ -#define TIFFTAG_ASSHOTNEUTRAL 50728 /* &selected white balance in linear reference space */ -#define TIFFTAG_ASSHOTWHITEXY 50729 /* &selected white balance in x-y chromaticity coordinates */ -#define TIFFTAG_BASELINEEXPOSURE 50730 /* &how much to move the zero point */ -#define TIFFTAG_BASELINENOISE 50731 /* &relative noise level */ -#define TIFFTAG_BASELINESHARPNESS 50732 /* &relative amount of sharpening */ -/* TIFFTAG_BAYERGREENSPLIT: &how closely the values of the green pixels in the blue/green rows - * track the values of the green pixels in the red/green rows */ -#define TIFFTAG_BAYERGREENSPLIT 50733 -#define TIFFTAG_LINEARRESPONSELIMIT 50734 /* &non-linear encoding range */ -#define TIFFTAG_CAMERASERIALNUMBER 50735 /* &camera's serial number */ -#define TIFFTAG_LENSINFO 50736 /* info about the lens */ -#define TIFFTAG_CHROMABLURRADIUS 50737 /* &chroma blur radius */ -#define TIFFTAG_ANTIALIASSTRENGTH 50738 /* &relative strength of the camera's anti-alias filter */ -#define TIFFTAG_SHADOWSCALE 50739 /* &used by Adobe Camera Raw */ -#define TIFFTAG_DNGPRIVATEDATA 50740 /* &manufacturer's private data */ -#define TIFFTAG_MAKERNOTESAFETY 50741 /* &whether the EXIF MakerNote tag is safe to preserve along with the rest of the EXIF data */ -#define TIFFTAG_CALIBRATIONILLUMINANT1 50778 /* &illuminant 1 */ -#define TIFFTAG_CALIBRATIONILLUMINANT2 50779 /* &illuminant 2 */ -#define TIFFTAG_BESTQUALITYSCALE 50780 /* &best quality multiplier */ -#define TIFFTAG_RAWDATAUNIQUEID 50781 /* &unique identifier for the raw image data */ -#define TIFFTAG_ORIGINALRAWFILENAME 50827 /* &file name of the original raw file (UTF-8) */ -#define TIFFTAG_ORIGINALRAWFILEDATA 50828 /* &contents of the original raw file */ -#define TIFFTAG_ACTIVEAREA 50829 /* &active (non-masked) pixels of the sensor */ -#define TIFFTAG_MASKEDAREAS 50830 /* &list of coordinates of fully masked pixels */ -#define TIFFTAG_ASSHOTICCPROFILE 50831 /* &these two tags used to */ -#define TIFFTAG_ASSHOTPREPROFILEMATRIX 50832 /* map cameras's color space into ICC profile space */ -#define TIFFTAG_CURRENTICCPROFILE 50833 /* & */ -#define TIFFTAG_CURRENTPREPROFILEMATRIX 50834 /* & */ - -/* DNG 1.2.0.0 */ -#define TIFFTAG_COLORIMETRICREFERENCE 50879 /* &colorimetric reference */ -#define TIFFTAG_CAMERACALIBRATIONSIGNATURE 50931 /* &camera calibration signature (UTF-8) */ -#define TIFFTAG_PROFILECALIBRATIONSIGNATURE 50932 /* &profile calibration signature (UTF-8) */ -/* TIFFTAG_EXTRACAMERAPROFILES 50933 &extra camera profiles : is already defined for GeoTIFF DGIWG */ -#define TIFFTAG_ASSHOTPROFILENAME 50934 /* &as shot profile name (UTF-8) */ -#define TIFFTAG_NOISEREDUCTIONAPPLIED 50935 /* &amount of applied noise reduction */ -#define TIFFTAG_PROFILENAME 50936 /* &camera profile name (UTF-8) */ -#define TIFFTAG_PROFILEHUESATMAPDIMS 50937 /* &dimensions of HSV mapping */ -#define TIFFTAG_PROFILEHUESATMAPDATA1 50938 /* &first HSV mapping table */ -#define TIFFTAG_PROFILEHUESATMAPDATA2 50939 /* &second HSV mapping table */ -#define TIFFTAG_PROFILETONECURVE 50940 /* &default tone curve */ -#define TIFFTAG_PROFILEEMBEDPOLICY 50941 /* &profile embedding policy */ -#define TIFFTAG_PROFILECOPYRIGHT 50942 /* &profile copyright information (UTF-8) */ -#define TIFFTAG_FORWARDMATRIX1 50964 /* &matrix for mapping white balanced camera colors to XYZ D50 */ -#define TIFFTAG_FORWARDMATRIX2 50965 /* &matrix for mapping white balanced camera colors to XYZ D50 */ -#define TIFFTAG_PREVIEWAPPLICATIONNAME 50966 /* &name of application that created preview (UTF-8) */ -#define TIFFTAG_PREVIEWAPPLICATIONVERSION 50967 /* &version of application that created preview (UTF-8) */ -#define TIFFTAG_PREVIEWSETTINGSNAME 50968 /* &name of conversion settings (UTF-8) */ -#define TIFFTAG_PREVIEWSETTINGSDIGEST 50969 /* &unique id of conversion settings */ -#define TIFFTAG_PREVIEWCOLORSPACE 50970 /* &preview color space */ -#define TIFFTAG_PREVIEWDATETIME 50971 /* &date/time preview was rendered */ -#define TIFFTAG_RAWIMAGEDIGEST 50972 /* &md5 of raw image data */ -#define TIFFTAG_ORIGINALRAWFILEDIGEST 50973 /* &md5 of the data stored in the OriginalRawFileData tag */ -#define TIFFTAG_SUBTILEBLOCKSIZE 50974 /* &subtile block size */ -#define TIFFTAG_ROWINTERLEAVEFACTOR 50975 /* &number of interleaved fields */ -#define TIFFTAG_PROFILELOOKTABLEDIMS 50981 /* &num of input samples in each dim of default "look" table */ -#define TIFFTAG_PROFILELOOKTABLEDATA 50982 /* &default "look" table for use as starting point */ - -/* DNG 1.3.0.0 */ -#define TIFFTAG_OPCODELIST1 51008 /* &opcodes that should be applied to raw image after reading */ -#define TIFFTAG_OPCODELIST2 51009 /* &opcodes that should be applied after mapping to linear reference */ -#define TIFFTAG_OPCODELIST3 51022 /* &opcodes that should be applied after demosaicing */ -#define TIFFTAG_NOISEPROFILE 51041 /* &noise profile */ - -/* DNG 1.4.0.0 */ -#define TIFFTAG_DEFAULTUSERCROP 51125 /* &default user crop rectangle in relative coords */ -#define TIFFTAG_DEFAULTBLACKRENDER 51110 /* &black rendering hint */ -#define TIFFTAG_BASELINEEXPOSUREOFFSET 51109 /* &baseline exposure offset */ -#define TIFFTAG_PROFILELOOKTABLEENCODING 51108 /* &3D LookTable indexing conversion */ -#define TIFFTAG_PROFILEHUESATMAPENCODING 51107 /* &3D HueSatMap indexing conversion */ -#define TIFFTAG_ORIGINALDEFAULTFINALSIZE 51089 /* &default final size of larger original file for this proxy */ -#define TIFFTAG_ORIGINALBESTQUALITYFINALSIZE 51090 /* &best quality final size of larger original file for this proxy */ -#define TIFFTAG_ORIGINALDEFAULTCROPSIZE 51091 /* &the default crop size of larger original file for this proxy */ -#define TIFFTAG_NEWRAWIMAGEDIGEST 51111 /* &modified MD5 digest of the raw image data */ -#define TIFFTAG_RAWTOPREVIEWGAIN 51112 /* &The gain between the main raw FD and the preview IFD containing this tag */ - -/* DNG 1.5.0.0 */ -#define TIFFTAG_DEPTHFORMAT 51177 /* &encoding of the depth data in the file */ -#define TIFFTAG_DEPTHNEAR 51178 /* &distance from the camera represented by value 0 in the depth map */ -#define TIFFTAG_DEPTHFAR 51179 /* &distance from the camera represented by the maximum value in the depth map */ -#define TIFFTAG_DEPTHUNITS 51180 /* &measurement units for DepthNear and DepthFar */ -#define TIFFTAG_DEPTHMEASURETYPE 51181 /* &measurement geometry for the depth map */ -#define TIFFTAG_ENHANCEPARAMS 51182 /* &a string that documents how the enhanced image data was processed. */ - -/* DNG 1.6.0.0 */ -#define TIFFTAG_PROFILEGAINTABLEMAP 52525 /* &spatially varying gain tables that can be applied as starting point */ -#define TIFFTAG_SEMANTICNAME 52526 /* &a string that identifies the semantic mask */ -#define TIFFTAG_SEMANTICINSTANCEID 52528 /* &a string that identifies a specific instance in a semantic mask */ -#define TIFFTAG_MASKSUBAREA 52536 /* &the crop rectangle of this IFD's mask, relative to the main image */ -#define TIFFTAG_RGBTABLES 52543 /* &color transforms to apply to masked image regions */ -#define TIFFTAG_CALIBRATIONILLUMINANT3 52529 /* &the illuminant used for the third set of color calibration tags */ -#define TIFFTAG_COLORMATRIX3 52531 /* &matrix to convert XYZ values to reference camera native color space under CalibrationIlluminant3 */ -#define TIFFTAG_CAMERACALIBRATION3 52530 /* &matrix to transform reference camera native space values to individual camera native space values under CalibrationIlluminant3 */ -#define TIFFTAG_REDUCTIONMATRIX3 52538 /* &dimensionality reduction matrix for use in color conversion to XYZ under CalibrationIlluminant3 */ -#define TIFFTAG_PROFILEHUESATMAPDATA3 52537 /* &the data for the third HSV table */ -#define TIFFTAG_FORWARDMATRIX3 52532 /* &matrix to map white balanced camera colors to XYZ D50 */ -#define TIFFTAG_ILLUMINANTDATA1 52533 /* &data for the first calibration illuminant */ -#define TIFFTAG_ILLUMINANTDATA2 52534 /* &data for the second calibration illuminant */ -#define TIFFTAG_ILLUMINANTDATA3 53535 /* &data for the third calibration illuminant */ - -/* TIFF/EP */ -#define TIFFTAG_EP_CFAREPEATPATTERNDIM 33421 /* dimensions of CFA pattern */ -#define TIFFTAG_EP_CFAPATTERN 33422 /* color filter array pattern */ -#define TIFFTAG_EP_BATTERYLEVEL 33423 /* battery level (rational or ASCII) */ -#define TIFFTAG_EP_INTERLACE 34857 /* Number of multi-field images */ -/* TIFFTAG_EP_IPTC_NAA and TIFFTAG_RICHTIFFIPTC share the same tag number (33723) - * LibTIFF type is UNDEFINED or BYTE, but often times incorrectly specified as LONG, - * because TIFF/EP (ISO/DIS 12234-2) specifies type LONG or ASCII. */ -#define TIFFTAG_EP_IPTC_NAA 33723 /* Alias IPTC/NAA Newspaper Association RichTIFF */ -#define TIFFTAG_EP_TIMEZONEOFFSET 34858 /* Time zone offset relative to UTC */ -#define TIFFTAG_EP_SELFTIMERMODE 34859 /* Number of seconds capture was delayed from button press */ -#define TIFFTAG_EP_FLASHENERGY 37387 /* Flash energy, or range if there is uncertainty */ -#define TIFFTAG_EP_SPATIALFREQUENCYRESPONSE 37388 /* Spatial frequency response */ -#define TIFFTAG_EP_NOISE 37389 /* Camera noise measurement values */ -#define TIFFTAG_EP_FOCALPLANEXRESOLUTION 37390 /* Focal plane X resolution */ -#define TIFFTAG_EP_FOCALPLANEYRESOLUTION 37391 /* Focal plane Y resolution */ -#define TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT 37392 /* Focal plane resolution unit */ -#define TIFFTAG_EP_IMAGENUMBER 37393 /* Number of image when several of burst shot stored in same TIFF/EP */ -#define TIFFTAG_EP_SECURITYCLASSIFICATION 37394 /* Security classification */ -#define TIFFTAG_EP_IMAGEHISTORY 37395 /* Record of what has been done to the image */ -#define TIFFTAG_EP_EXPOSUREINDEX 37397 /* Exposure index */ -#define TIFFTAG_EP_STANDARDID 37398 /* TIFF/EP standard version, n.n.n.n */ -#define TIFFTAG_EP_SENSINGMETHOD 37399 /* Type of image sensor */ -/* - * TIFF/EP tags equivalent to EXIF tags - * Note that TIFF-EP and EXIF use nearly the same metadata tag set, but TIFF-EP stores the tags in IFD 0, - * while EXIF store the tags in a separate IFD. Either location is allowed by DNG, but the EXIF location is preferred. - */ -#define TIFFTAG_EP_EXPOSURETIME 33434 /* Exposure time */ -#define TIFFTAG_EP_FNUMBER 33437 /* F number */ -#define TIFFTAG_EP_EXPOSUREPROGRAM 34850 /* Exposure program */ -#define TIFFTAG_EP_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */ -#define TIFFTAG_EP_ISOSPEEDRATINGS 34855 /* ISO speed rating */ -#define TIFFTAG_EP_OECF 34856 /* Optoelectric conversion factor */ -#define TIFFTAG_EP_DATETIMEORIGINAL 36867 /* Date and time of original data generation */ -#define TIFFTAG_EP_COMPRESSEDBITSPERPIXEL 37122 /* Image compression mode */ -#define TIFFTAG_EP_SHUTTERSPEEDVALUE 37377 /* Shutter speed */ -#define TIFFTAG_EP_APERTUREVALUE 37378 /* Aperture */ -#define TIFFTAG_EP_BRIGHTNESSVALUE 37379 /* Brightness */ -#define TIFFTAG_EP_EXPOSUREBIASVALUE 37380 /* Exposure bias */ -#define TIFFTAG_EP_MAXAPERTUREVALUE 37381 /* Maximum lens aperture */ -#define TIFFTAG_EP_SUBJECTDISTANCE 37382 /* Subject distance */ -#define TIFFTAG_EP_METERINGMODE 37383 /* Metering mode */ -#define TIFFTAG_EP_LIGHTSOURCE 37384 /* Light source */ -#define TIFFTAG_EP_FLASH 37385 /* Flash */ -#define TIFFTAG_EP_FOCALLENGTH 37386 /* Lens focal length */ -#define TIFFTAG_EP_SUBJECTLOCATION 37396 /* Subject location (area) */ - -#define TIFFTAG_RPCCOEFFICIENT 50844 /* Define by GDAL for geospatial georeferencing through RPC: http://geotiff.maptools.org/rpc_prop.html */ -#define TIFFTAG_ALIAS_LAYER_METADATA 50784 /* Alias Sketchbook Pro layer usage description. */ - -/* GeoTIFF DGIWG */ -#define TIFFTAG_TIFF_RSID 50908 /* https://www.awaresystems.be/imaging/tiff/tifftags/tiff_rsid.html */ -#define TIFFTAG_GEO_METADATA 50909 /* https://www.awaresystems.be/imaging/tiff/tifftags/geo_metadata.html */ -#define TIFFTAG_EXTRACAMERAPROFILES 50933 /* http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf */ - -/* tag 65535 is an undefined tag used by Eastman Kodak */ -#define TIFFTAG_DCSHUESHIFTVALUES 65535 /* hue shift correction data */ - -/* - * The following are ``pseudo tags'' that can be used to control - * codec-specific functionality. These tags are not written to file. - * Note that these values start at 0xffff+1 so that they'll never - * collide with Aldus-assigned tags. - * - * If you want your private pseudo tags ``registered'' (i.e. added to - * this file), please post a bug report via the tracking system at - * http://www.remotesensing.org/libtiff/bugs.html with the appropriate - * C definitions to add. - */ -#define TIFFTAG_FAXMODE 65536 /* Group 3/4 format control */ -#define FAXMODE_CLASSIC 0x0000 /* default, include RTC */ -#define FAXMODE_NORTC 0x0001 /* no RTC at end of data */ -#define FAXMODE_NOEOL 0x0002 /* no EOL code at end of row */ -#define FAXMODE_BYTEALIGN 0x0004 /* byte align row */ -#define FAXMODE_WORDALIGN 0x0008 /* word align row */ -#define FAXMODE_CLASSF FAXMODE_NORTC /* TIFF Class F */ -#define TIFFTAG_JPEGQUALITY 65537 /* Compression quality level */ -/* Note: quality level is on the IJG 0-100 scale. Default value is 75 */ -#define TIFFTAG_JPEGCOLORMODE 65538 /* Auto RGB<=>YCbCr convert? */ -#define JPEGCOLORMODE_RAW 0x0000 /* no conversion (default) */ -#define JPEGCOLORMODE_RGB 0x0001 /* do auto conversion */ -#define TIFFTAG_JPEGTABLESMODE 65539 /* What to put in JPEGTables */ -#define JPEGTABLESMODE_QUANT 0x0001 /* include quantization tbls */ -#define JPEGTABLESMODE_HUFF 0x0002 /* include Huffman tbls */ -/* Note: default is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF */ -#define TIFFTAG_FAXFILLFUNC 65540 /* G3/G4 fill function */ -#define TIFFTAG_PIXARLOGDATAFMT 65549 /* PixarLogCodec I/O data sz */ -#define PIXARLOGDATAFMT_8BIT 0 /* regular u_char samples */ -#define PIXARLOGDATAFMT_8BITABGR 1 /* ABGR-order u_chars */ -#define PIXARLOGDATAFMT_11BITLOG 2 /* 11-bit log-encoded (raw) */ -#define PIXARLOGDATAFMT_12BITPICIO 3 /* as per PICIO (1.0==2048) */ -#define PIXARLOGDATAFMT_16BIT 4 /* signed short samples */ -#define PIXARLOGDATAFMT_FLOAT 5 /* IEEE float samples */ -/* 65550-65556 are allocated to Oceana Matrix */ -#define TIFFTAG_DCSIMAGERTYPE 65550 /* imager model & filter */ -#define DCSIMAGERMODEL_M3 0 /* M3 chip (1280 x 1024) */ -#define DCSIMAGERMODEL_M5 1 /* M5 chip (1536 x 1024) */ -#define DCSIMAGERMODEL_M6 2 /* M6 chip (3072 x 2048) */ -#define DCSIMAGERFILTER_IR 0 /* infrared filter */ -#define DCSIMAGERFILTER_MONO 1 /* monochrome filter */ -#define DCSIMAGERFILTER_CFA 2 /* color filter array */ -#define DCSIMAGERFILTER_OTHER 3 /* other filter */ -#define TIFFTAG_DCSINTERPMODE 65551 /* interpolation mode */ -#define DCSINTERPMODE_NORMAL 0x0 /* whole image, default */ -#define DCSINTERPMODE_PREVIEW 0x1 /* preview of image (384x256) */ -#define TIFFTAG_DCSBALANCEARRAY 65552 /* color balance values */ -#define TIFFTAG_DCSCORRECTMATRIX 65553 /* color correction values */ -#define TIFFTAG_DCSGAMMA 65554 /* gamma value */ -#define TIFFTAG_DCSTOESHOULDERPTS 65555 /* toe & shoulder points */ -#define TIFFTAG_DCSCALIBRATIONFD 65556 /* calibration file desc */ -/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */ -#define TIFFTAG_ZIPQUALITY 65557 /* compression quality level */ -#define TIFFTAG_PIXARLOGQUALITY 65558 /* PixarLog uses same scale */ -/* 65559 is allocated to Oceana Matrix */ -#define TIFFTAG_DCSCLIPRECTANGLE 65559 /* area of image to acquire */ -#define TIFFTAG_SGILOGDATAFMT 65560 /* SGILog user data format */ -#define SGILOGDATAFMT_FLOAT 0 /* IEEE float samples */ -#define SGILOGDATAFMT_16BIT 1 /* 16-bit samples */ -#define SGILOGDATAFMT_RAW 2 /* uninterpreted data */ -#define SGILOGDATAFMT_8BIT 3 /* 8-bit RGB monitor values */ -#define TIFFTAG_SGILOGENCODE 65561 /* SGILog data encoding control*/ -#define SGILOGENCODE_NODITHER 0 /* do not dither encoded values*/ -#define SGILOGENCODE_RANDITHER 1 /* randomly dither encd values */ -#define TIFFTAG_LZMAPRESET 65562 /* LZMA2 preset (compression level) */ -#define TIFFTAG_PERSAMPLE 65563 /* interface for per sample tags */ -#define PERSAMPLE_MERGED 0 /* present as a single value */ -#define PERSAMPLE_MULTI 1 /* present as multiple values */ -#define TIFFTAG_ZSTD_LEVEL 65564 /* ZSTD compression level */ -#define TIFFTAG_LERC_VERSION 65565 /* LERC version */ -#define LERC_VERSION_2_4 4 -#define TIFFTAG_LERC_ADD_COMPRESSION 65566 /* LERC additional compression */ -#define LERC_ADD_COMPRESSION_NONE 0 -#define LERC_ADD_COMPRESSION_DEFLATE 1 -#define LERC_ADD_COMPRESSION_ZSTD 2 -#define TIFFTAG_LERC_MAXZERROR 65567 /* LERC maximum error */ -#define TIFFTAG_WEBP_LEVEL 65568 /* WebP compression level */ -#define TIFFTAG_WEBP_LOSSLESS 65569 /* WebP lossless/lossy */ -#define TIFFTAG_WEBP_LOSSLESS_EXACT 65571 /* WebP lossless exact mode. Set-only mode. Default is 1. Can be set to 0 to increase compression rate, but R,G,B in areas where alpha = 0 will not be preserved */ -#define TIFFTAG_DEFLATE_SUBCODEC 65570 /* ZIP codec: to get/set the sub-codec to use. Will default to libdeflate when available */ -#define DEFLATE_SUBCODEC_ZLIB 0 -#define DEFLATE_SUBCODEC_LIBDEFLATE 1 - -/* - * EXIF tags - */ -#define EXIFTAG_EXPOSURETIME 33434 /* Exposure time */ -#define EXIFTAG_FNUMBER 33437 /* F number */ -#define EXIFTAG_EXPOSUREPROGRAM 34850 /* Exposure program */ -#define EXIFTAG_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */ -/* After EXIF 2.2.1 ISOSpeedRatings is named PhotographicSensitivity. - In addition, while "Count=Any", only 1 count should be used. */ -#define EXIFTAG_ISOSPEEDRATINGS 34855 /* ISO speed rating */ -#define EXIFTAG_PHOTOGRAPHICSENSITIVITY 34855 /* Photographic Sensitivity (new name for tag 34855) */ -#define EXIFTAG_OECF 34856 /* Optoelectric conversion factor */ -#define EXIFTAG_EXIFVERSION 36864 /* Exif version */ -#define EXIFTAG_DATETIMEORIGINAL 36867 /* Date and time of original data generation */ -#define EXIFTAG_DATETIMEDIGITIZED 36868 /* Date and time of digital data generation */ -#define EXIFTAG_COMPONENTSCONFIGURATION 37121 /* Meaning of each component */ -#define EXIFTAG_COMPRESSEDBITSPERPIXEL 37122 /* Image compression mode */ -#define EXIFTAG_SHUTTERSPEEDVALUE 37377 /* Shutter speed */ -#define EXIFTAG_APERTUREVALUE 37378 /* Aperture */ -#define EXIFTAG_BRIGHTNESSVALUE 37379 /* Brightness */ -#define EXIFTAG_EXPOSUREBIASVALUE 37380 /* Exposure bias */ -#define EXIFTAG_MAXAPERTUREVALUE 37381 /* Maximum lens aperture */ -#define EXIFTAG_SUBJECTDISTANCE 37382 /* Subject distance */ -#define EXIFTAG_METERINGMODE 37383 /* Metering mode */ -#define EXIFTAG_LIGHTSOURCE 37384 /* Light source */ -#define EXIFTAG_FLASH 37385 /* Flash */ -#define EXIFTAG_FOCALLENGTH 37386 /* Lens focal length */ -#define EXIFTAG_SUBJECTAREA 37396 /* Subject area */ -#define EXIFTAG_MAKERNOTE 37500 /* Manufacturer notes */ -#define EXIFTAG_USERCOMMENT 37510 /* User comments */ -#define EXIFTAG_SUBSECTIME 37520 /* DateTime subseconds */ -#define EXIFTAG_SUBSECTIMEORIGINAL 37521 /* DateTimeOriginal subseconds */ -#define EXIFTAG_SUBSECTIMEDIGITIZED 37522 /* DateTimeDigitized subseconds */ -#define EXIFTAG_FLASHPIXVERSION 40960 /* Supported Flashpix version */ -#define EXIFTAG_COLORSPACE 40961 /* Color space information */ -#define EXIFTAG_PIXELXDIMENSION 40962 /* Valid image width */ -#define EXIFTAG_PIXELYDIMENSION 40963 /* Valid image height */ -#define EXIFTAG_RELATEDSOUNDFILE 40964 /* Related audio file */ -#define EXIFTAG_FLASHENERGY 41483 /* Flash energy */ -#define EXIFTAG_SPATIALFREQUENCYRESPONSE 41484 /* Spatial frequency response */ -#define EXIFTAG_FOCALPLANEXRESOLUTION 41486 /* Focal plane X resolution */ -#define EXIFTAG_FOCALPLANEYRESOLUTION 41487 /* Focal plane Y resolution */ -#define EXIFTAG_FOCALPLANERESOLUTIONUNIT 41488 /* Focal plane resolution unit */ -#define EXIFTAG_SUBJECTLOCATION 41492 /* Subject location */ -#define EXIFTAG_EXPOSUREINDEX 41493 /* Exposure index */ -#define EXIFTAG_SENSINGMETHOD 41495 /* Sensing method */ -#define EXIFTAG_FILESOURCE 41728 /* File source */ -#define EXIFTAG_SCENETYPE 41729 /* Scene type */ -#define EXIFTAG_CFAPATTERN 41730 /* CFA pattern */ -#define EXIFTAG_CUSTOMRENDERED 41985 /* Custom image processing */ -#define EXIFTAG_EXPOSUREMODE 41986 /* Exposure mode */ -#define EXIFTAG_WHITEBALANCE 41987 /* White balance */ -#define EXIFTAG_DIGITALZOOMRATIO 41988 /* Digital zoom ratio */ -#define EXIFTAG_FOCALLENGTHIN35MMFILM 41989 /* Focal length in 35 mm film */ -#define EXIFTAG_SCENECAPTURETYPE 41990 /* Scene capture type */ -#define EXIFTAG_GAINCONTROL 41991 /* Gain control */ -#define EXIFTAG_CONTRAST 41992 /* Contrast */ -#define EXIFTAG_SATURATION 41993 /* Saturation */ -#define EXIFTAG_SHARPNESS 41994 /* Sharpness */ -#define EXIFTAG_DEVICESETTINGDESCRIPTION 41995 /* Device settings description */ -#define EXIFTAG_SUBJECTDISTANCERANGE 41996 /* Subject distance range */ -#define EXIFTAG_IMAGEUNIQUEID 42016 /* Unique image ID */ - -/*--: New for EXIF-Version 2.32, May 2019 ... */ -#define EXIFTAG_SENSITIVITYTYPE 34864 /* The SensitivityType tag indicates which one of the parameters of ISO12232 is the PhotographicSensitivity tag. */ -#define EXIFTAG_STANDARDOUTPUTSENSITIVITY 34865 /* This tag indicates the standard output sensitivity value of a camera or input device defined in ISO 12232. */ -#define EXIFTAG_RECOMMENDEDEXPOSUREINDEX 34866 /* recommended exposure index */ -#define EXIFTAG_ISOSPEED 34867 /* ISO speed value */ -#define EXIFTAG_ISOSPEEDLATITUDEYYY 34868 /* ISO speed latitude yyy */ -#define EXIFTAG_ISOSPEEDLATITUDEZZZ 34869 /* ISO speed latitude zzz */ -#define EXIFTAG_OFFSETTIME 36880 /* offset from UTC of the time of DateTime tag. */ -#define EXIFTAG_OFFSETTIMEORIGINAL 36881 /* offset from UTC of the time of DateTimeOriginal tag. */ -#define EXIFTAG_OFFSETTIMEDIGITIZED 36882 /* offset from UTC of the time of DateTimeDigitized tag. */ -#define EXIFTAG_TEMPERATURE 37888 /* Temperature as the ambient situation at the shot in dergee Celsius */ -#define EXIFTAG_HUMIDITY 37889 /* Humidity as the ambient situation at the shot in percent */ -#define EXIFTAG_PRESSURE 37890 /* Pressure as the ambient situation at the shot hecto-Pascal (hPa) */ -#define EXIFTAG_WATERDEPTH 37891 /* WaterDepth as the ambient situation at the shot in meter (m) */ -#define EXIFTAG_ACCELERATION 37892 /* Acceleration (a scalar regardless of direction) as the ambientsituation at the shot in units of mGal (10-5 m/s^2) */ -/* EXIFTAG_CAMERAELEVATIONANGLE: Elevation/depression. angle of the orientation of the camera(imaging optical axis) - * as the ambient situation at the shot in degree from -180deg to +180deg. */ -#define EXIFTAG_CAMERAELEVATIONANGLE 37893 -#define EXIFTAG_CAMERAOWNERNAME 42032 /* owner of a camera */ -#define EXIFTAG_BODYSERIALNUMBER 42033 /* serial number of the body of the camera */ -/* EXIFTAG_LENSSPECIFICATION: minimum focal length (in mm), maximum focal length (in mm),minimum F number in the minimum focal length, - * and minimum F number in the maximum focal length, */ -#define EXIFTAG_LENSSPECIFICATION 42034 -#define EXIFTAG_LENSMAKE 42035 /* the lens manufacturer */ -#define EXIFTAG_LENSMODEL 42036 /* the lens model name and model number */ -#define EXIFTAG_LENSSERIALNUMBER 42037 /* the serial number of the interchangeable lens */ -#define EXIFTAG_GAMMA 42240 /* value of coefficient gamma */ -#define EXIFTAG_COMPOSITEIMAGE 42080 /* composite image */ -#define EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE 42081 /* source image number of composite image */ -#define EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE 42082 /* source exposure times of composite image */ - -/* - * EXIF-GPS tags (Version 2.31, July 2016) - */ -#define GPSTAG_VERSIONID 0 /* Indicates the version of GPSInfoIFD. */ -#define GPSTAG_LATITUDEREF 1 /* Indicates whether the latitude is north or south latitude. */ -#define GPSTAG_LATITUDE 2 /* Indicates the latitude. */ -#define GPSTAG_LONGITUDEREF 3 /* Indicates whether the longitude is east or west longitude. */ -#define GPSTAG_LONGITUDE 4 /* Indicates the longitude. */ -#define GPSTAG_ALTITUDEREF 5 /* Indicates the altitude used as the reference altitude. */ -#define GPSTAG_ALTITUDE 6 /* Indicates the altitude based on the reference in GPSAltitudeRef. */ -#define GPSTAG_TIMESTAMP 7 /*Indicates the time as UTC (Coordinated Universal Time). */ -#define GPSTAG_SATELLITES 8 /*Indicates the GPS satellites used for measurements. */ -#define GPSTAG_STATUS 9 /* Indicates the status of the GPS receiver when the image is recorded. */ -#define GPSTAG_MEASUREMODE 10 /* Indicates the GPS measurement mode. */ -#define GPSTAG_DOP 11 /* Indicates the GPS DOP (data degree of precision). */ -#define GPSTAG_SPEEDREF 12 /* Indicates the unit used to express the GPS receiver speed of movement. */ -#define GPSTAG_SPEED 13 /* Indicates the speed of GPS receiver movement. */ -#define GPSTAG_TRACKREF 14 /* Indicates the reference for giving the direction of GPS receiver movement. */ -#define GPSTAG_TRACK 15 /* Indicates the direction of GPS receiver movement. */ -#define GPSTAG_IMGDIRECTIONREF 16 /* Indicates the reference for giving the direction of the image when it is captured. */ -#define GPSTAG_IMGDIRECTION 17 /* Indicates the direction of the image when it was captured. */ -#define GPSTAG_MAPDATUM 18 /* Indicates the geodetic survey data used by the GPS receiver. (e.g. WGS-84) */ -#define GPSTAG_DESTLATITUDEREF 19 /* Indicates whether the latitude of the destination point is north or south latitude. */ -#define GPSTAG_DESTLATITUDE 20 /* Indicates the latitude of the destination point. */ -#define GPSTAG_DESTLONGITUDEREF 21 /* Indicates whether the longitude of the destination point is east or west longitude. */ -#define GPSTAG_DESTLONGITUDE 22 /* Indicates the longitude of the destination point. */ -#define GPSTAG_DESTBEARINGREF 23 /* Indicates the reference used for giving the bearing to the destination point. */ -#define GPSTAG_DESTBEARING 24 /* Indicates the bearing to the destination point. */ -#define GPSTAG_DESTDISTANCEREF 25 /* Indicates the unit used to express the distance to the destination point. */ -#define GPSTAG_DESTDISTANCE 26 /* Indicates the distance to the destination point. */ -#define GPSTAG_PROCESSINGMETHOD 27 /* A character string recording the name of the method used for location finding. */ -#define GPSTAG_AREAINFORMATION 28 /* A character string recording the name of the GPS area. */ -#define GPSTAG_DATESTAMP 29 /* A character string recording date and time information relative to UTC (Coordinated Universal Time). */ -#define GPSTAG_DIFFERENTIAL 30 /* Indicates whether differential correction is applied to the GPS receiver. */ -#define GPSTAG_GPSHPOSITIONINGERROR 31 /* Indicates horizontal positioning errors in meters. */ - -#endif /* _TIFF_ */ - diff --git a/third_party/libtiff/libtiff/tiffconf.h.cmake.in b/third_party/libtiff/libtiff/tiffconf.h.cmake.in deleted file mode 100644 index a5789bb..0000000 --- a/third_party/libtiff/libtiff/tiffconf.h.cmake.in +++ /dev/null @@ -1,144 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -/* clang-format off */ -/* clang-format disabled because CMake scripts are very sensitive to the - * formatting of this file. configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted. - */ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - - -#include -#include -#include - - -/* Signed 16-bit type */ -#define TIFF_INT16_T @TIFF_INT16_T@ - -/* Signed 32-bit type */ -#define TIFF_INT32_T @TIFF_INT32_T@ - -/* Signed 64-bit type */ -#define TIFF_INT64_T @TIFF_INT64_T@ - -/* Signed 8-bit type */ -#define TIFF_INT8_T @TIFF_INT8_T@ - -/* Unsigned 16-bit type */ -#define TIFF_UINT16_T @TIFF_UINT16_T@ - -/* Unsigned 32-bit type */ -#define TIFF_UINT32_T @TIFF_UINT32_T@ - -/* Unsigned 64-bit type */ -#define TIFF_UINT64_T @TIFF_UINT64_T@ - -/* Unsigned 8-bit type */ -#define TIFF_UINT8_T @TIFF_UINT8_T@ - -/* Signed size type */ -#define TIFF_SSIZE_T @TIFF_SSIZE_T@ - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format supported by the - machine */ -#cmakedefine HAVE_IEEEFP 1 - -/* The concept of HOST_FILLORDER is broken. Since libtiff 4.5.1 - * this macro will always be hardcoded to FILLORDER_LSB2MSB on all - * architectures, to reflect past long behavior of doing so on x86 architecture. - * Note however that the default FillOrder used by libtiff is FILLORDER_MSB2LSB, - * as mandated per the TIFF specification. - * The influence of HOST_FILLORDER is only when passing the 'H' mode in - * TIFFOpen(). - * You should NOT rely on this macro to decide the CPU endianness! - * This macro will be removed in libtiff 4.6 - */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#define HOST_BIGENDIAN @HOST_BIG_ENDIAN@ - -/* Support CCITT Group 3 & 4 algorithms */ -#cmakedefine CCITT_SUPPORT 1 - -/* Support JPEG compression (requires IJG JPEG library) */ -#cmakedefine JPEG_SUPPORT 1 - -/* Support JBIG compression (requires JBIG-KIT library) */ -#cmakedefine JBIG_SUPPORT - -/* Support LERC compression */ -#cmakedefine LERC_SUPPORT 1 - -/* Support LogLuv high dynamic range encoding */ -#cmakedefine LOGLUV_SUPPORT 1 - -/* Support LZW algorithm */ -#cmakedefine LZW_SUPPORT 1 - -/* Support NeXT 2-bit RLE algorithm */ -#cmakedefine NEXT_SUPPORT 1 - -/* Support Old JPEG compression (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -#cmakedefine OJPEG_SUPPORT 1 - -/* Support Macintosh PackBits algorithm */ -#cmakedefine PACKBITS_SUPPORT 1 - -/* Support Pixar log-format algorithm (requires Zlib) */ -#cmakedefine PIXARLOG_SUPPORT 1 - -/* Support ThunderScan 4-bit RLE algorithm */ -#cmakedefine THUNDER_SUPPORT 1 - -/* Support Deflate compression */ -#cmakedefine ZIP_SUPPORT 1 - -/* Support libdeflate enhanced compression */ -#cmakedefine LIBDEFLATE_SUPPORT 1 - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to multiple strips of ~8Kb to reduce memory usage) */ -#cmakedefine STRIPCHOP_DEFAULT TIFF_STRIPCHOP - -/* Enable SubIFD tag (330) support */ -#cmakedefine SUBIFD_SUPPORT 1 - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA 1 - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1 - -/* Support MS MDI magic number files as TIFF */ -#cmakedefine MDI_SUPPORT 1 - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/tiffconf.h.in b/third_party/libtiff/libtiff/tiffconf.h.in deleted file mode 100644 index dc471f6..0000000 --- a/third_party/libtiff/libtiff/tiffconf.h.in +++ /dev/null @@ -1,144 +0,0 @@ -/* - Configuration defines for installed libtiff. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. -*/ - -/* clang-format off */ -/* clang-format disabled because CMake scripts are very sensitive to the - * formatting of this file. configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted. - */ - -#ifndef _TIFFCONF_ -#define _TIFFCONF_ - - -#include -#include -#include - - -/* Signed 16-bit type */ -#undef TIFF_INT16_T - -/* Signed 32-bit type */ -#undef TIFF_INT32_T - -/* Signed 64-bit type */ -#undef TIFF_INT64_T - -/* Signed 8-bit type */ -#undef TIFF_INT8_T - -/* Unsigned 16-bit type */ -#undef TIFF_UINT16_T - -/* Unsigned 32-bit type */ -#undef TIFF_UINT32_T - -/* Unsigned 64-bit type */ -#undef TIFF_UINT64_T - -/* Unsigned 8-bit type */ -#undef TIFF_UINT8_T - -/* Signed size type */ -#undef TIFF_SSIZE_T - -/* Compatibility stuff. */ - -/* Define as 0 or 1 according to the floating point format supported by the - machine */ -#undef HAVE_IEEEFP - -/* The concept of HOST_FILLORDER is broken. Since libtiff 4.5.1 - * this macro will always be hardcoded to FILLORDER_LSB2MSB on all - * architectures, to reflect past long behavior of doing so on x86 architecture. - * Note however that the default FillOrder used by libtiff is FILLORDER_MSB2LSB, - * as mandated per the TIFF specification. - * The influence of HOST_FILLORDER is only when passing the 'H' mode in - * TIFFOpen(). - * You should NOT rely on this macro to decide the CPU endianness! - * This macro will be removed in libtiff 4.6 - */ -#define HOST_FILLORDER FILLORDER_LSB2MSB - -/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -#undef HOST_BIGENDIAN - -/* Support CCITT Group 3 & 4 algorithms */ -#undef CCITT_SUPPORT - -/* Support JPEG compression (requires IJG JPEG library) */ -#undef JPEG_SUPPORT - -/* Support JBIG compression (requires JBIG-KIT library) */ -#undef JBIG_SUPPORT - -/* Support LERC compression */ -#undef LERC_SUPPORT - -/* Support LogLuv high dynamic range encoding */ -#undef LOGLUV_SUPPORT - -/* Support LZW algorithm */ -#undef LZW_SUPPORT - -/* Support NeXT 2-bit RLE algorithm */ -#undef NEXT_SUPPORT - -/* Support Old JPEG compression (read contrib/ojpeg/README first! Compilation - fails with unpatched IJG JPEG library) */ -#undef OJPEG_SUPPORT - -/* Support Macintosh PackBits algorithm */ -#undef PACKBITS_SUPPORT - -/* Support Pixar log-format algorithm (requires Zlib) */ -#undef PIXARLOG_SUPPORT - -/* Support ThunderScan 4-bit RLE algorithm */ -#undef THUNDER_SUPPORT - -/* Support Deflate compression */ -#undef ZIP_SUPPORT - -/* Support libdeflate enhanced compression */ -#undef LIBDEFLATE_SUPPORT - -/* Support strip chopping (whether or not to convert single-strip uncompressed - images to multiple strips of ~8Kb to reduce memory usage) */ -#undef STRIPCHOP_DEFAULT - -/* Enable SubIFD tag (330) support */ -#undef SUBIFD_SUPPORT - -/* Treat extra sample as alpha (default enabled). The RGBA interface will - treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many - packages produce RGBA files but don't mark the alpha properly. */ -#undef DEFAULT_EXTRASAMPLE_AS_ALPHA - -/* Pick up YCbCr subsampling info from the JPEG data stream to support files - lacking the tag (default enabled). */ -#undef CHECK_JPEG_YCBCR_SUBSAMPLING - -/* Support MS MDI magic number files as TIFF */ -#undef MDI_SUPPORT - -/* - * Feature support definitions. - * XXX: These macros are obsoleted. Don't use them in your apps! - * Macros stays here for backward compatibility and should be always defined. - */ -#define COLORIMETRY_SUPPORT -#define YCBCR_SUPPORT -#define CMYK_SUPPORT -#define ICC_SUPPORT -#define PHOTOSHOP_SUPPORT -#define IPTC_SUPPORT - -#endif /* _TIFFCONF_ */ - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/tiffio.h b/third_party/libtiff/libtiff/tiffio.h deleted file mode 100644 index c8ac8c0..0000000 --- a/third_party/libtiff/libtiff/tiffio.h +++ /dev/null @@ -1,672 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIO_ -#define _TIFFIO_ - -/* - * TIFF I/O Library Definitions. - */ -#include "tiff.h" -#include "tiffvers.h" - -/* - * TIFF is defined as an incomplete type to hide the - * library's internal data structures from clients. - */ -typedef struct tiff TIFF; - -/* - * The following typedefs define the intrinsic size of - * data types used in the *exported* interfaces. These - * definitions depend on the proper definition of types - * in tiff.h. Note also that the varargs interface used - * to pass tag types and values uses the types defined in - * tiff.h directly. - * - * NB: ttag_t -> deprecated and replaced by uint32_t - * is unsigned int and not unsigned short because - * ANSI C requires that the type before the ellipsis be a - * promoted type (i.e. one of int, unsigned int, pointer, - * or double) and because we defined pseudo-tags that are - * outside the range of legal Aldus-assigned tags. - * NB: tsize_t -> deprecated and replaced by tmsize_t - * is signed and not unsigned because some functions - * return -1. - * NB: toff_t is not off_t for many reasons; TIFFs max out at - * 32-bit file offsets, and BigTIFF maxes out at 64-bit - * offsets being the most important, and to ensure use of - * a consistently unsigned type across architectures. - * Prior to libtiff 4.0, this was an unsigned 32 bit type. - */ -/* - * this is the machine addressing size type, only it's signed, so make it - * int32_t on 32bit machines, int64_t on 64bit machines - */ -typedef TIFF_SSIZE_T tmsize_t; -#define TIFF_TMSIZE_T_MAX (tmsize_t)(SIZE_MAX >> 1) - -typedef uint64_t toff_t; /* file offset */ -typedef uint32_t tdir_t; /* directory index */ - -/* the following are deprecated and should be replaced by their defining - counterparts */ -typedef uint32_t ttag_t; /* directory tag */ -typedef uint16_t tsample_t; /* sample number */ -typedef uint32_t tstrile_t; /* strip or tile number */ -typedef tstrile_t tstrip_t; /* strip number */ -typedef tstrile_t ttile_t; /* tile number */ -typedef tmsize_t tsize_t; /* i/o size in bytes */ -typedef void *tdata_t; /* image data ref */ - -/* - * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c - * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c). - * - * By default tif_unix.c is assumed. - */ - -#if defined(_WIN32) -#if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && \ - !defined(USE_WIN32_FILEIO) -#define AVOID_WIN32_FILEIO -#endif -#endif - -#if defined(USE_WIN32_FILEIO) -#define VC_EXTRALEAN -#include -#ifdef _WIN32 -DECLARE_HANDLE(thandle_t); /* Win32 file handle */ -#else -typedef HFILE thandle_t; /* client data handle */ -#endif /* _WIN32 */ -#else -typedef void *thandle_t; /* client data handle */ -#endif /* USE_WIN32_FILEIO */ - -/* - * Flags to pass to TIFFPrintDirectory to control - * printing of data structures that are potentially - * very large. Bit-or these flags to enable printing - * multiple items. - */ -#define TIFFPRINT_NONE 0x0 /* no extra info */ -#define TIFFPRINT_STRIPS 0x1 /* strips/tiles info */ -#define TIFFPRINT_CURVES 0x2 /* color/gray response curves */ -#define TIFFPRINT_COLORMAP 0x4 /* colormap */ -#define TIFFPRINT_JPEGQTABLES 0x100 /* JPEG Q matrices */ -#define TIFFPRINT_JPEGACTABLES 0x200 /* JPEG AC tables */ -#define TIFFPRINT_JPEGDCTABLES 0x200 /* JPEG DC tables */ - -/* - * Colour conversion stuff - */ - -/* reference white */ -#define D65_X0 (95.0470F) -#define D65_Y0 (100.0F) -#define D65_Z0 (108.8827F) - -#define D50_X0 (96.4250F) -#define D50_Y0 (100.0F) -#define D50_Z0 (82.4680F) - -/* Structure for holding information about a display device. */ - -typedef unsigned char TIFFRGBValue; /* 8-bit samples */ - -typedef struct -{ - float d_mat[3][3]; /* XYZ -> luminance matrix */ - float d_YCR; /* Light o/p for reference white */ - float d_YCG; - float d_YCB; - uint32_t d_Vrwr; /* Pixel values for ref. white */ - uint32_t d_Vrwg; - uint32_t d_Vrwb; - float d_Y0R; /* Residual light for black pixel */ - float d_Y0G; - float d_Y0B; - float d_gammaR; /* Gamma values for the three guns */ - float d_gammaG; - float d_gammaB; -} TIFFDisplay; - -/* YCbCr->RGB support for TIFFYCbCrToRGBInit() and TIFFYCbCrToRGB() - * Attention: - * Functions TIFFYCbCrToRGBInit() and TIFFYCbCrToRGB() require a user provided - * large memory buffer, where several tables can be setup. - * The pointers to these tables are stored in the structure TIFFYCbCrToRGB, - * which is located at the beginning of the buffer. Thus, this memory has to be - * allocated as follows: - * TIFFYCbCrToRGB *ycbcr = (TIFFYCbCrToRGB *)_TIFFmalloc( - * TIFFroundup_32(sizeof(TIFFYCbCrToRGB), sizeof(long)) + - * 4 * 256 * sizeof(TIFFRGBValue) + 2 * 256 * sizeof(int) + - * 3 * 256 * sizeof(int32_t)); - */ -typedef struct -{ /* YCbCr->RGB support */ - TIFFRGBValue *clamptab; /* range clamping table */ - int *Cr_r_tab; - int *Cb_b_tab; - int32_t *Cr_g_tab; - int32_t *Cb_g_tab; - int32_t *Y_tab; -} TIFFYCbCrToRGB; - -typedef struct -{ /* CIE Lab 1976->RGB support */ - int range; /* Size of conversion table */ -#define CIELABTORGB_TABLE_RANGE 1500 - float rstep, gstep, bstep; - float X0, Y0, Z0; /* Reference white point */ - TIFFDisplay display; - float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */ - float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */ - float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */ -} TIFFCIELabToRGB; - -/* - * RGBA-style image support. - */ -typedef struct _TIFFRGBAImage TIFFRGBAImage; -/* - * The image reading and conversion routines invoke - * ``put routines'' to copy/image/whatever tiles of - * raw image data. A default set of routines are - * provided to convert/copy raw image data to 8-bit - * packed ABGR format rasters. Applications can supply - * alternate routines that unpack the data into a - * different format or, for example, unpack the data - * and draw the unpacked raster on the display. - */ -typedef void (*tileContigRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, - uint32_t, uint32_t, uint32_t, int32_t, - int32_t, unsigned char *); -typedef void (*tileSeparateRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, - uint32_t, uint32_t, uint32_t, int32_t, - int32_t, unsigned char *, unsigned char *, - unsigned char *, unsigned char *); -/* - * RGBA-reader state. - */ -struct _TIFFRGBAImage -{ - TIFF *tif; /* image handle */ - int stoponerr; /* stop on read error */ - int isContig; /* data is packed/separate */ - int alpha; /* type of alpha data present */ - uint32_t width; /* image width */ - uint32_t height; /* image height */ - uint16_t bitspersample; /* image bits/sample */ - uint16_t samplesperpixel; /* image samples/pixel */ - uint16_t orientation; /* image orientation */ - uint16_t req_orientation; /* requested orientation */ - uint16_t photometric; /* image photometric interp */ - uint16_t *redcmap; /* colormap palette */ - uint16_t *greencmap; - uint16_t *bluecmap; - /* get image data routine */ - int (*get)(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t); - /* put decoded strip/tile */ - union - { - void (*any)(TIFFRGBAImage *); - tileContigRoutine contig; - tileSeparateRoutine separate; - } put; - TIFFRGBValue *Map; /* sample mapping array */ - uint32_t **BWmap; /* black&white map */ - uint32_t **PALmap; /* palette image map */ - TIFFYCbCrToRGB *ycbcr; /* YCbCr conversion state */ - TIFFCIELabToRGB *cielab; /* CIE L*a*b conversion state */ - - uint8_t *UaToAa; /* Unassociated alpha to associated alpha conversion LUT */ - uint8_t *Bitdepth16To8; /* LUT for conversion from 16bit to 8bit values */ - - int row_offset; - int col_offset; -}; - -/* - * Macros for extracting components from the - * packed ABGR form returned by TIFFReadRGBAImage. - */ -#define TIFFGetR(abgr) ((abgr)&0xff) -#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff) -#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff) -#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff) - -/* - * A CODEC is a software package that implements decoding, - * encoding, or decoding+encoding of a compression algorithm. - * The library provides a collection of builtin codecs. - * More codecs may be registered through calls to the library - * and/or the builtin implementations may be overridden. - */ -typedef int (*TIFFInitMethod)(TIFF *, int); -typedef struct -{ - char *name; - uint16_t scheme; - TIFFInitMethod init; -} TIFFCodec; - -typedef struct -{ - uint32_t uNum; - uint32_t uDenom; -} TIFFRational_t; - -#include -#include - -/* share internal LogLuv conversion routines? */ -#ifndef LOGLUV_PUBLIC -#define LOGLUV_PUBLIC 1 -#endif - -#if defined(__GNUC__) || defined(__clang__) || defined(__attribute__) -#define TIFF_ATTRIBUTE(x) __attribute__(x) -#else -#define TIFF_ATTRIBUTE(x) /*nothing*/ -#endif - -#if defined(c_plusplus) || defined(__cplusplus) -extern "C" -{ -#endif - typedef void (*TIFFErrorHandler)(const char *, const char *, va_list); - typedef void (*TIFFErrorHandlerExt)(thandle_t, const char *, const char *, - va_list); - typedef int (*TIFFErrorHandlerExtR)(TIFF *, void *user_data, const char *, - const char *, va_list); - typedef tmsize_t (*TIFFReadWriteProc)(thandle_t, void *, tmsize_t); - typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int); - typedef int (*TIFFCloseProc)(thandle_t); - typedef toff_t (*TIFFSizeProc)(thandle_t); - typedef int (*TIFFMapFileProc)(thandle_t, void **base, toff_t *size); - typedef void (*TIFFUnmapFileProc)(thandle_t, void *base, toff_t size); - typedef void (*TIFFExtendProc)(TIFF *); - - extern const char *TIFFGetVersion(void); - - extern const TIFFCodec *TIFFFindCODEC(uint16_t); - extern TIFFCodec *TIFFRegisterCODEC(uint16_t, const char *, TIFFInitMethod); - extern void TIFFUnRegisterCODEC(TIFFCodec *); - extern int TIFFIsCODECConfigured(uint16_t); - extern TIFFCodec *TIFFGetConfiguredCODECs(void); - - /* - * Auxiliary functions. - */ -#ifndef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS - extern void *_TIFFmalloc(tmsize_t s); - extern void *_TIFFcalloc(tmsize_t nmemb, tmsize_t siz); - extern void *_TIFFrealloc(void *p, tmsize_t s); - extern void _TIFFfree(void *p); -#endif - extern void _TIFFmemset(void *p, int v, tmsize_t c); - extern void _TIFFmemcpy(void *d, const void *s, tmsize_t c); - extern int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c); - - /* - ** Stuff, related to tag handling and creating custom tags. - */ - extern int TIFFGetTagListCount(TIFF *); - extern uint32_t TIFFGetTagListEntry(TIFF *, int tag_index); - -#define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */ -#define TIFF_VARIABLE -1 /* marker for variable length tags */ -#define TIFF_SPP -2 /* marker for SamplesPerPixel tags */ -#define TIFF_VARIABLE2 -3 /* marker for uint32_t var-length tags */ - -#define FIELD_CUSTOM 65 - - typedef struct _TIFFField TIFFField; - typedef struct _TIFFFieldArray TIFFFieldArray; - - extern const TIFFField *TIFFFindField(TIFF *, uint32_t, TIFFDataType); - extern const TIFFField *TIFFFieldWithTag(TIFF *, uint32_t); - extern const TIFFField *TIFFFieldWithName(TIFF *, const char *); - - extern uint32_t TIFFFieldTag(const TIFFField *); - extern const char *TIFFFieldName(const TIFFField *); - extern TIFFDataType TIFFFieldDataType(const TIFFField *); - extern int TIFFFieldPassCount(const TIFFField *); - extern int TIFFFieldReadCount(const TIFFField *); - extern int TIFFFieldWriteCount(const TIFFField *); - extern int - TIFFFieldSetGetSize(const TIFFField *); /* returns internal storage size of - TIFFSetGetFieldType in bytes. */ - extern int TIFFFieldSetGetCountSize( - const TIFFField *); /* returns size of count parameter 0=none, - 2=uint16_t, 4=uint32_t */ - extern int TIFFFieldIsAnonymous(const TIFFField *); - - typedef int (*TIFFVSetMethod)(TIFF *, uint32_t, va_list); - typedef int (*TIFFVGetMethod)(TIFF *, uint32_t, va_list); - typedef void (*TIFFPrintMethod)(TIFF *, FILE *, long); - - typedef struct - { - TIFFVSetMethod vsetfield; /* tag set routine */ - TIFFVGetMethod vgetfield; /* tag get routine */ - TIFFPrintMethod printdir; /* directory print routine */ - } TIFFTagMethods; - - extern TIFFTagMethods *TIFFAccessTagMethods(TIFF *); - extern void *TIFFGetClientInfo(TIFF *, const char *); - extern void TIFFSetClientInfo(TIFF *, void *, const char *); - - extern void TIFFCleanup(TIFF *tif); - extern void TIFFClose(TIFF *tif); - extern int TIFFFlush(TIFF *tif); - extern int TIFFFlushData(TIFF *tif); - extern int TIFFGetField(TIFF *tif, uint32_t tag, ...); - extern int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap); - extern int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag, ...); - extern int TIFFVGetFieldDefaulted(TIFF *tif, uint32_t tag, va_list ap); - extern int TIFFReadDirectory(TIFF *tif); - extern int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, - const TIFFFieldArray *infoarray); - extern int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff); - extern int TIFFReadGPSDirectory(TIFF *tif, toff_t diroff); - extern uint64_t TIFFScanlineSize64(TIFF *tif); - extern tmsize_t TIFFScanlineSize(TIFF *tif); - extern uint64_t TIFFRasterScanlineSize64(TIFF *tif); - extern tmsize_t TIFFRasterScanlineSize(TIFF *tif); - extern uint64_t TIFFStripSize64(TIFF *tif); - extern tmsize_t TIFFStripSize(TIFF *tif); - extern uint64_t TIFFRawStripSize64(TIFF *tif, uint32_t strip); - extern tmsize_t TIFFRawStripSize(TIFF *tif, uint32_t strip); - extern uint64_t TIFFVStripSize64(TIFF *tif, uint32_t nrows); - extern tmsize_t TIFFVStripSize(TIFF *tif, uint32_t nrows); - extern uint64_t TIFFTileRowSize64(TIFF *tif); - extern tmsize_t TIFFTileRowSize(TIFF *tif); - extern uint64_t TIFFTileSize64(TIFF *tif); - extern tmsize_t TIFFTileSize(TIFF *tif); - extern uint64_t TIFFVTileSize64(TIFF *tif, uint32_t nrows); - extern tmsize_t TIFFVTileSize(TIFF *tif, uint32_t nrows); - extern uint32_t TIFFDefaultStripSize(TIFF *tif, uint32_t request); - extern void TIFFDefaultTileSize(TIFF *, uint32_t *, uint32_t *); - extern int TIFFFileno(TIFF *); - extern int TIFFSetFileno(TIFF *, int); - extern thandle_t TIFFClientdata(TIFF *); - extern thandle_t TIFFSetClientdata(TIFF *, thandle_t); - extern int TIFFGetMode(TIFF *); - extern int TIFFSetMode(TIFF *, int); - extern int TIFFIsTiled(TIFF *); - extern int TIFFIsByteSwapped(TIFF *); - extern int TIFFIsUpSampled(TIFF *); - extern int TIFFIsMSB2LSB(TIFF *); - extern int TIFFIsBigEndian(TIFF *); - extern int TIFFIsBigTIFF(TIFF *); - extern TIFFReadWriteProc TIFFGetReadProc(TIFF *); - extern TIFFReadWriteProc TIFFGetWriteProc(TIFF *); - extern TIFFSeekProc TIFFGetSeekProc(TIFF *); - extern TIFFCloseProc TIFFGetCloseProc(TIFF *); - extern TIFFSizeProc TIFFGetSizeProc(TIFF *); - extern TIFFMapFileProc TIFFGetMapFileProc(TIFF *); - extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *); - extern uint32_t TIFFCurrentRow(TIFF *); - extern tdir_t TIFFCurrentDirectory(TIFF *); - extern tdir_t TIFFNumberOfDirectories(TIFF *); - extern uint64_t TIFFCurrentDirOffset(TIFF *); - extern uint32_t TIFFCurrentStrip(TIFF *); - extern uint32_t TIFFCurrentTile(TIFF *tif); - extern int TIFFReadBufferSetup(TIFF *tif, void *bp, tmsize_t size); - extern int TIFFWriteBufferSetup(TIFF *tif, void *bp, tmsize_t size); - extern int TIFFSetupStrips(TIFF *); - extern int TIFFWriteCheck(TIFF *, int, const char *); - extern void TIFFFreeDirectory(TIFF *); - extern int TIFFCreateDirectory(TIFF *); - extern int TIFFCreateCustomDirectory(TIFF *, const TIFFFieldArray *); - extern int TIFFCreateEXIFDirectory(TIFF *); - extern int TIFFCreateGPSDirectory(TIFF *); - extern int TIFFLastDirectory(TIFF *); - extern int TIFFSetDirectory(TIFF *, tdir_t); - extern int TIFFSetSubDirectory(TIFF *, uint64_t); - extern int TIFFUnlinkDirectory(TIFF *, tdir_t); - extern int TIFFSetField(TIFF *, uint32_t, ...); - extern int TIFFVSetField(TIFF *, uint32_t, va_list); - extern int TIFFUnsetField(TIFF *, uint32_t); - extern int TIFFWriteDirectory(TIFF *); - extern int TIFFWriteCustomDirectory(TIFF *, uint64_t *); - extern int TIFFCheckpointDirectory(TIFF *); - extern int TIFFRewriteDirectory(TIFF *); - extern int TIFFDeferStrileArrayWriting(TIFF *); - extern int TIFFForceStrileArrayWriting(TIFF *); - -#if defined(c_plusplus) || defined(__cplusplus) - extern void TIFFPrintDirectory(TIFF *, FILE *, long = 0); - extern int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, - uint16_t sample = 0); - extern int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, - uint16_t sample = 0); - extern int TIFFReadRGBAImage(TIFF *, uint32_t, uint32_t, uint32_t *, - int = 0); - extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *, - int = ORIENTATION_BOTLEFT, int = 0); -#else -extern void TIFFPrintDirectory(TIFF *, FILE *, long); -extern int TIFFReadScanline(TIFF *tif, void *buf, uint32_t row, - uint16_t sample); -extern int TIFFWriteScanline(TIFF *tif, void *buf, uint32_t row, - uint16_t sample); -extern int TIFFReadRGBAImage(TIFF *, uint32_t, uint32_t, uint32_t *, int); -extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *, - int, int); -#endif - - extern int TIFFReadRGBAStrip(TIFF *, uint32_t, uint32_t *); - extern int TIFFReadRGBATile(TIFF *, uint32_t, uint32_t, uint32_t *); - extern int TIFFReadRGBAStripExt(TIFF *, uint32_t, uint32_t *, - int stop_on_error); - extern int TIFFReadRGBATileExt(TIFF *, uint32_t, uint32_t, uint32_t *, - int stop_on_error); - extern int TIFFRGBAImageOK(TIFF *, char[1024]); - extern int TIFFRGBAImageBegin(TIFFRGBAImage *, TIFF *, int, char[1024]); - extern int TIFFRGBAImageGet(TIFFRGBAImage *, uint32_t *, uint32_t, - uint32_t); - extern void TIFFRGBAImageEnd(TIFFRGBAImage *); - - extern const char *TIFFFileName(TIFF *); - extern const char *TIFFSetFileName(TIFF *, const char *); - extern void TIFFError(const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 2, 3))); - extern void TIFFErrorExt(thandle_t, const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); - extern void TIFFWarning(const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 2, 3))); - extern void TIFFWarningExt(thandle_t, const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); - extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler); - extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt); - extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler); - extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt); - - extern void TIFFWarningExtR(TIFF *, const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); - extern void TIFFErrorExtR(TIFF *, const char *, const char *, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 3, 4))); - - typedef struct TIFFOpenOptions TIFFOpenOptions; - extern TIFFOpenOptions *TIFFOpenOptionsAlloc(void); - extern void TIFFOpenOptionsFree(TIFFOpenOptions *); - extern void - TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts, - tmsize_t max_single_mem_alloc); - extern void - TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions *opts, - tmsize_t max_cumulated_mem_alloc); - extern void - TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, - int warn_about_unknown_tags); - extern void - TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts, - TIFFErrorHandlerExtR handler, - void *errorhandler_user_data); - extern void - TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions *opts, - TIFFErrorHandlerExtR handler, - void *warnhandler_user_data); - - extern TIFF *TIFFOpen(const char *, const char *); - extern TIFF *TIFFOpenExt(const char *, const char *, TIFFOpenOptions *opts); -#ifdef _WIN32 - extern TIFF *TIFFOpenW(const wchar_t *, const char *); - extern TIFF *TIFFOpenWExt(const wchar_t *, const char *, - TIFFOpenOptions *opts); -#endif /* _WIN32 */ - extern TIFF *TIFFFdOpen(int, const char *, const char *); - extern TIFF *TIFFFdOpenExt(int, const char *, const char *, - TIFFOpenOptions *opts); - extern TIFF *TIFFClientOpen(const char *, const char *, thandle_t, - TIFFReadWriteProc, TIFFReadWriteProc, - TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, - TIFFMapFileProc, TIFFUnmapFileProc); - extern TIFF *TIFFClientOpenExt(const char *, const char *, thandle_t, - TIFFReadWriteProc, TIFFReadWriteProc, - TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, - TIFFMapFileProc, TIFFUnmapFileProc, - TIFFOpenOptions *opts); - extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc); - extern uint32_t TIFFComputeTile(TIFF *tif, uint32_t x, uint32_t y, - uint32_t z, uint16_t s); - extern int TIFFCheckTile(TIFF *tif, uint32_t x, uint32_t y, uint32_t z, - uint16_t s); - extern uint32_t TIFFNumberOfTiles(TIFF *); - extern tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, - uint32_t z, uint16_t s); - extern tmsize_t TIFFWriteTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, - uint32_t z, uint16_t s); - extern uint32_t TIFFComputeStrip(TIFF *, uint32_t, uint16_t); - extern uint32_t TIFFNumberOfStrips(TIFF *); - extern tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, - tmsize_t size); - extern tmsize_t TIFFReadRawStrip(TIFF *tif, uint32_t strip, void *buf, - tmsize_t size); - extern tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32_t tile, void *buf, - tmsize_t size); - extern tmsize_t TIFFReadRawTile(TIFF *tif, uint32_t tile, void *buf, - tmsize_t size); - extern int TIFFReadFromUserBuffer(TIFF *tif, uint32_t strile, void *inbuf, - tmsize_t insize, void *outbuf, - tmsize_t outsize); - extern tmsize_t TIFFWriteEncodedStrip(TIFF *tif, uint32_t strip, void *data, - tmsize_t cc); - extern tmsize_t TIFFWriteRawStrip(TIFF *tif, uint32_t strip, void *data, - tmsize_t cc); - extern tmsize_t TIFFWriteEncodedTile(TIFF *tif, uint32_t tile, void *data, - tmsize_t cc); - extern tmsize_t TIFFWriteRawTile(TIFF *tif, uint32_t tile, void *data, - tmsize_t cc); - extern int TIFFDataWidth( - TIFFDataType); /* table of tag datatype widths within TIFF file. */ - extern void TIFFSetWriteOffset(TIFF *tif, toff_t off); - extern void TIFFSwabShort(uint16_t *); - extern void TIFFSwabLong(uint32_t *); - extern void TIFFSwabLong8(uint64_t *); - extern void TIFFSwabFloat(float *); - extern void TIFFSwabDouble(double *); - extern void TIFFSwabArrayOfShort(uint16_t *wp, tmsize_t n); - extern void TIFFSwabArrayOfTriples(uint8_t *tp, tmsize_t n); - extern void TIFFSwabArrayOfLong(uint32_t *lp, tmsize_t n); - extern void TIFFSwabArrayOfLong8(uint64_t *lp, tmsize_t n); - extern void TIFFSwabArrayOfFloat(float *fp, tmsize_t n); - extern void TIFFSwabArrayOfDouble(double *dp, tmsize_t n); - extern void TIFFReverseBits(uint8_t *cp, tmsize_t n); - extern const unsigned char *TIFFGetBitRevTable(int); - - extern uint64_t TIFFGetStrileOffset(TIFF *tif, uint32_t strile); - extern uint64_t TIFFGetStrileByteCount(TIFF *tif, uint32_t strile); - extern uint64_t TIFFGetStrileOffsetWithErr(TIFF *tif, uint32_t strile, - int *pbErr); - extern uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile, - int *pbErr); - -#if LOGLUV_PUBLIC -#define U_NEU 0.210526316 -#define V_NEU 0.473684211 -#define UVSCALE 410. - extern double LogL16toY(int); - extern double LogL10toY(int); - extern void XYZtoRGB24(float *, uint8_t *); - extern int uv_decode(double *, double *, int); - extern void LogLuv24toXYZ(uint32_t, float *); - extern void LogLuv32toXYZ(uint32_t, float *); -#if defined(c_plusplus) || defined(__cplusplus) - extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER); - extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER); - extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER); - extern uint32_t LogLuv24fromXYZ(float *, int = SGILOGENCODE_NODITHER); - extern uint32_t LogLuv32fromXYZ(float *, int = SGILOGENCODE_NODITHER); -#else - extern int LogL16fromY(double, int); - extern int LogL10fromY(double, int); - extern int uv_encode(double, double, int); - extern uint32_t LogLuv24fromXYZ(float *, int); - extern uint32_t LogLuv32fromXYZ(float *, int); -#endif -#endif /* LOGLUV_PUBLIC */ - - extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB *, const TIFFDisplay *, - float *); - extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32_t, int32_t, int32_t, - float *, float *, float *); - extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float, uint32_t *, - uint32_t *, uint32_t *); - - extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *, float *, float *); - extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32_t, int32_t, int32_t, - uint32_t *, uint32_t *, uint32_t *); - - /**************************************************************************** - * O B S O L E T E D I N T E R F A C E S - * - * Don't use this stuff in your applications, it may be removed in the - *future libtiff versions. - ****************************************************************************/ - typedef struct - { - uint32_t field_tag; /* field's tag */ - short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */ - short field_writecount; /* write count/TIFF_VARIABLE */ - TIFFDataType field_type; /* type of associated data */ - unsigned short field_bit; /* bit in fieldsset bit vector */ - unsigned char field_oktochange; /* if true, can change while writing */ - unsigned char field_passcount; /* if true, pass dir count on set */ - char *field_name; /* ASCII name */ - } TIFFFieldInfo; - - extern int TIFFMergeFieldInfo(TIFF *, const TIFFFieldInfo[], uint32_t); - -#if defined(c_plusplus) || defined(__cplusplus) -} -#endif - -#endif /* _TIFFIO_ */ - diff --git a/third_party/libtiff/libtiff/tiffio.hxx b/third_party/libtiff/libtiff/tiffio.hxx deleted file mode 100644 index 6182449..0000000 --- a/third_party/libtiff/libtiff/tiffio.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIO_HXX_ -#define _TIFFIO_HXX_ - -/* - * TIFF I/O library definitions which provide C++ streams API. - */ - -#include "tiff.h" -#include "tiffio.h" -#include - -extern TIFF *TIFFStreamOpen(const char *, std::ostream *); -extern TIFF *TIFFStreamOpen(const char *, std::istream *); - -#endif /* _TIFFIO_HXX_ */ diff --git a/third_party/libtiff/libtiff/tiffiop.h b/third_party/libtiff/libtiff/tiffiop.h deleted file mode 100644 index 7ea42ee..0000000 --- a/third_party/libtiff/libtiff/tiffiop.h +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFIOP_ -#define _TIFFIOP_ -/* - * ``Library-private'' definitions. - */ - -#include "tif_config.h" - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#include - -#ifdef HAVE_ASSERT_H -#include -#else -#define assert(x) -#endif - -#include "tif_hash_set.h" -#include "tiffio.h" - -#include "tif_dir.h" - -#include - -#ifndef STRIP_SIZE_DEFAULT -#define STRIP_SIZE_DEFAULT 8192 -#endif - -#ifndef TIFF_MAX_DIR_COUNT -#define TIFF_MAX_DIR_COUNT 1048576 -#endif - -#define TIFF_NON_EXISTENT_DIR_NUMBER UINT_MAX - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -typedef struct client_info -{ - struct client_info *next; - void *data; - char *name; -} TIFFClientInfoLink; - -/* - * Typedefs for ``method pointers'' used internally. - * these are deprecated and provided only for backwards compatibility. - */ -typedef unsigned char tidataval_t; /* internal image data value type */ -typedef tidataval_t *tidata_t; /* reference to internal image data */ - -typedef void (*TIFFVoidMethod)(TIFF *); -typedef int (*TIFFBoolMethod)(TIFF *); -typedef int (*TIFFPreMethod)(TIFF *, uint16_t); -typedef int (*TIFFCodeMethod)(TIFF *tif, uint8_t *buf, tmsize_t size, - uint16_t sample); -typedef int (*TIFFSeekMethod)(TIFF *, uint32_t); -typedef void (*TIFFPostMethod)(TIFF *tif, uint8_t *buf, tmsize_t size); -typedef uint32_t (*TIFFStripMethod)(TIFF *, uint32_t); -typedef void (*TIFFTileMethod)(TIFF *, uint32_t *, uint32_t *); - -struct TIFFOffsetAndDirNumber -{ - uint64_t offset; - tdir_t dirNumber; -}; -typedef struct TIFFOffsetAndDirNumber TIFFOffsetAndDirNumber; - -typedef union -{ - TIFFHeaderCommon common; - TIFFHeaderClassic classic; - TIFFHeaderBig big; -} TIFFHeaderUnion; - -struct tiff -{ - char *tif_name; /* name of open file */ - int tif_fd; /* open file descriptor */ - int tif_mode; /* open mode (O_*) */ - uint32_t tif_flags; -#define TIFF_FILLORDER 0x00003U /* natural bit fill order for machine */ -#define TIFF_DIRTYHEADER 0x00004U /* header must be written on close */ -#define TIFF_DIRTYDIRECT 0x00008U /* current directory must be written */ -#define TIFF_BUFFERSETUP 0x00010U /* data buffers setup */ -#define TIFF_CODERSETUP 0x00020U /* encoder/decoder setup done */ -#define TIFF_BEENWRITING 0x00040U /* written 1+ scanlines to file */ -#define TIFF_SWAB 0x00080U /* byte swap file information */ -#define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */ -#define TIFF_MYBUFFER 0x00200U /* my raw data buffer; free on close */ -#define TIFF_ISTILED 0x00400U /* file is tile, not strip- based */ -#define TIFF_MAPPED 0x00800U /* file is mapped into memory */ -#define TIFF_POSTENCODE 0x01000U /* need call to postencode routine */ -#define TIFF_INSUBIFD 0x02000U /* currently writing a subifd */ -#define TIFF_UPSAMPLED 0x04000U /* library is doing data up-sampling */ -#define TIFF_STRIPCHOP 0x08000U /* enable strip chopping support */ -#define TIFF_HEADERONLY \ - 0x10000U /* read header only, do not process the first directory */ -#define TIFF_NOREADRAW \ - 0x20000U /* skip reading of raw uncompressed image data */ -#define TIFF_INCUSTOMIFD 0x40000U /* currently writing a custom IFD */ -#define TIFF_BIGTIFF 0x80000U /* read/write bigtiff */ -#define TIFF_BUF4WRITE 0x100000U /* rawcc bytes are for writing */ -#define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/ -#define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */ -#define TIFF_BUFFERMMAP \ - 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */ -#define TIFF_DEFERSTRILELOAD \ - 0x1000000U /* defer strip/tile offset/bytecount array loading. */ -#define TIFF_LAZYSTRILELOAD \ - 0x2000000U /* lazy/ondemand loading of strip/tile offset/bytecount values. \ - Only used if TIFF_DEFERSTRILELOAD is set and in read-only \ - mode */ -#define TIFF_CHOPPEDUPARRAYS \ - 0x4000000U /* set when allocChoppedUpStripArrays() has modified strip \ - array */ - uint64_t tif_diroff; /* file offset of current directory */ - uint64_t tif_nextdiroff; /* file offset of following directory */ - uint64_t tif_lastdiroff; /* file offset of last directory written so far */ - TIFFHashSet *tif_map_dir_offset_to_number; - TIFFHashSet *tif_map_dir_number_to_offset; - int tif_setdirectory_force_absolute; /* switch between relative and absolute - stepping in TIFFSetDirectory() */ - TIFFDirectory tif_dir; /* internal rep of current directory */ - TIFFDirectory - tif_customdir; /* custom IFDs are separated from the main ones */ - TIFFHeaderUnion tif_header; /* file's header block Classic/BigTIFF union */ - uint16_t tif_header_size; /* file's header block and its length */ - uint32_t tif_row; /* current scanline */ - - /* There are IFDs in the file and an "active" IFD in memory, - * from which fields are "set" and "get". - * tif_curdir is set to: - * a) TIFF_NON_EXISTENT_DIR_NUMBER if there is no IFD in the file - * or the state is unknown, - * or the last read (i.e. TIFFFetchDirectory()) failed, - * or a custom directory was written. - * b) IFD index of last IFD written in the file. In this case the - * active IFD is a new (empty) one and tif_diroff is zero. - * If writing fails, tif_curdir is not changed. - * c) IFD index of IFD read from file into memory (=active IFD), - * even if IFD is corrupt and TIFFReadDirectory() returns 0. - * Then tif_diroff contains the offset of the IFD in the file. - * d) IFD index 0, whenever a custom directory or an unchained SubIFD - * was read. */ - tdir_t tif_curdir; /* current directory (index) */ - /* tif_curdircount: number of directories (main-IFDs) in file: - * - TIFF_NON_EXISTENT_DIR_NUMBER means 'dont know number of IFDs'. - * - 0 means 'empty file opened for writing, but no IFD written yet' */ - tdir_t tif_curdircount; - uint32_t tif_curstrip; /* current strip for read/write */ - uint64_t tif_curoff; /* current offset for read/write */ - uint64_t tif_lastvalidoff; /* last valid offset allowed for rewrite in - place. Used only by TIFFAppendToStrip() */ - uint64_t tif_dataoff; /* current offset for writing dir (IFD) */ - /* SubIFD support */ - uint16_t tif_nsubifd; /* remaining subifds to write */ - uint64_t tif_subifdoff; /* offset for patching SubIFD link */ - /* tiling support */ - uint32_t tif_col; /* current column (offset by row too) */ - uint32_t tif_curtile; /* current tile for read/write */ - tmsize_t tif_tilesize; /* # of bytes in a tile */ - /* compression scheme hooks */ - int tif_decodestatus; - TIFFBoolMethod tif_fixuptags; /* called in TIFFReadDirectory */ - TIFFBoolMethod tif_setupdecode; /* called once before predecode */ - TIFFPreMethod tif_predecode; /* pre- row/strip/tile decoding */ - TIFFBoolMethod tif_setupencode; /* called once before preencode */ - int tif_encodestatus; - TIFFPreMethod tif_preencode; /* pre- row/strip/tile encoding */ - TIFFBoolMethod tif_postencode; /* post- row/strip/tile encoding */ - TIFFCodeMethod tif_decoderow; /* scanline decoding routine */ - TIFFCodeMethod tif_encoderow; /* scanline encoding routine */ - TIFFCodeMethod tif_decodestrip; /* strip decoding routine */ - TIFFCodeMethod tif_encodestrip; /* strip encoding routine */ - TIFFCodeMethod tif_decodetile; /* tile decoding routine */ - TIFFCodeMethod tif_encodetile; /* tile encoding routine */ - TIFFVoidMethod tif_close; /* cleanup-on-close routine */ - TIFFSeekMethod tif_seek; /* position within a strip routine */ - TIFFVoidMethod tif_cleanup; /* cleanup state routine */ - TIFFStripMethod tif_defstripsize; /* calculate/constrain strip size */ - TIFFTileMethod tif_deftilesize; /* calculate/constrain tile size */ - uint8_t *tif_data; /* compression scheme private data */ - /* input/output buffering */ - tmsize_t tif_scanlinesize; /* # of bytes in a scanline */ - tmsize_t tif_scanlineskew; /* scanline skew for reading strips */ - uint8_t *tif_rawdata; /* raw data buffer */ - tmsize_t tif_rawdatasize; /* # of bytes in raw data buffer */ - tmsize_t tif_rawdataoff; /* rawdata offset within strip */ - tmsize_t tif_rawdataloaded; /* amount of data in rawdata */ - uint8_t *tif_rawcp; /* current spot in raw buffer */ - tmsize_t tif_rawcc; /* bytes unread from raw buffer */ - /* memory-mapped file support */ - uint8_t *tif_base; /* base of mapped file */ - tmsize_t tif_size; /* size of mapped file region (bytes, thus tmsize_t) */ - TIFFMapFileProc tif_mapproc; /* map file method */ - TIFFUnmapFileProc tif_unmapproc; /* unmap file method */ - /* input/output callback methods */ - thandle_t tif_clientdata; /* callback parameter */ - TIFFReadWriteProc tif_readproc; /* read method */ - TIFFReadWriteProc tif_writeproc; /* write method */ - TIFFSeekProc tif_seekproc; /* lseek method */ - TIFFCloseProc tif_closeproc; /* close method */ - TIFFSizeProc tif_sizeproc; /* filesize method */ - /* post-decoding support */ - TIFFPostMethod tif_postdecode; /* post decoding routine */ - /* tag support */ - TIFFField **tif_fields; /* sorted table of registered tags */ - size_t tif_nfields; /* # entries in registered tag table */ - const TIFFField *tif_foundfield; /* cached pointer to already found tag */ - TIFFTagMethods tif_tagmethods; /* tag get/set/print routines */ - TIFFClientInfoLink *tif_clientinfo; /* extra client information. */ - /* Backward compatibility stuff. We need these two fields for - * setting up an old tag extension scheme. */ - TIFFFieldArray *tif_fieldscompat; - size_t tif_nfieldscompat; - /* Error handler support */ - TIFFErrorHandlerExtR tif_errorhandler; - void *tif_errorhandler_user_data; - TIFFErrorHandlerExtR tif_warnhandler; - void *tif_warnhandler_user_data; - tmsize_t tif_max_single_mem_alloc; /* in bytes. 0 for unlimited */ - tmsize_t tif_max_cumulated_mem_alloc; /* in bytes. 0 for unlimited */ - tmsize_t tif_cur_cumulated_mem_alloc; /* in bytes */ - int tif_warn_about_unknown_tags; -}; - -struct TIFFOpenOptions -{ - TIFFErrorHandlerExtR errorhandler; /* may be NULL */ - void *errorhandler_user_data; /* may be NULL */ - TIFFErrorHandlerExtR warnhandler; /* may be NULL */ - void *warnhandler_user_data; /* may be NULL */ - tmsize_t max_single_mem_alloc; /* in bytes. 0 for unlimited */ - tmsize_t max_cumulated_mem_alloc; /* in bytes. 0 for unlimited */ - int warn_about_unknown_tags; -}; - -#define isPseudoTag(t) (t > 0xffff) /* is tag value normal or pseudo */ - -#define isTiled(tif) (((tif)->tif_flags & TIFF_ISTILED) != 0) -#define isMapped(tif) (((tif)->tif_flags & TIFF_MAPPED) != 0) -#define isFillOrder(tif, o) (((tif)->tif_flags & (o)) != 0) -#define isUpSampled(tif) (((tif)->tif_flags & TIFF_UPSAMPLED) != 0) -#define TIFFReadFile(tif, buf, size) \ - ((*(tif)->tif_readproc)((tif)->tif_clientdata, (buf), (size))) -#define TIFFWriteFile(tif, buf, size) \ - ((*(tif)->tif_writeproc)((tif)->tif_clientdata, (buf), (size))) -#define TIFFSeekFile(tif, off, whence) \ - ((*(tif)->tif_seekproc)((tif)->tif_clientdata, (off), (whence))) -#define TIFFCloseFile(tif) ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) -#define TIFFGetFileSize(tif) ((*(tif)->tif_sizeproc)((tif)->tif_clientdata)) -#define TIFFMapFileContents(tif, paddr, psize) \ - ((*(tif)->tif_mapproc)((tif)->tif_clientdata, (paddr), (psize))) -#define TIFFUnmapFileContents(tif, addr, size) \ - ((*(tif)->tif_unmapproc)((tif)->tif_clientdata, (addr), (size))) - -/* - * Default Read/Seek/Write definitions. - */ -#ifndef ReadOK -#define ReadOK(tif, buf, size) (TIFFReadFile((tif), (buf), (size)) == (size)) -#endif -#ifndef SeekOK -#define SeekOK(tif, off) _TIFFSeekOK(tif, off) -#endif -#ifndef WriteOK -#define WriteOK(tif, buf, size) (TIFFWriteFile((tif), (buf), (size)) == (size)) -#endif - -/* NB: the uint32_t casts are to silence certain ANSI-C compilers */ -#define TIFFhowmany_32(x, y) \ - (((uint32_t)x < (0xffffffff - (uint32_t)(y - 1))) \ - ? ((((uint32_t)(x)) + (((uint32_t)(y)) - 1)) / ((uint32_t)(y))) \ - : 0U) -/* Variant of TIFFhowmany_32() that doesn't return 0 if x close to MAXUINT. */ -/* Caution: TIFFhowmany_32_maxuint_compat(x,y)*y might overflow */ -#define TIFFhowmany_32_maxuint_compat(x, y) \ - (((uint32_t)(x) / (uint32_t)(y)) + \ - ((((uint32_t)(x) % (uint32_t)(y)) != 0) ? 1 : 0)) -#define TIFFhowmany8_32(x) \ - (((x)&0x07) ? ((uint32_t)(x) >> 3) + 1 : (uint32_t)(x) >> 3) -#define TIFFroundup_32(x, y) (TIFFhowmany_32(x, y) * (y)) -#define TIFFhowmany_64(x, y) \ - ((((uint64_t)(x)) + (((uint64_t)(y)) - 1)) / ((uint64_t)(y))) -#define TIFFhowmany8_64(x) \ - (((x)&0x07) ? ((uint64_t)(x) >> 3) + 1 : (uint64_t)(x) >> 3) -#define TIFFroundup_64(x, y) (TIFFhowmany_64(x, y) * (y)) - -/* Safe multiply which returns zero if there is an *unsigned* integer overflow. - * This macro is not safe for *signed* integer types */ -#define TIFFSafeMultiply(t, v, m) \ - ((((t)(m) != (t)0) && (((t)(((v) * (m)) / (m))) == (t)(v))) \ - ? (t)((v) * (m)) \ - : (t)0) - -#define TIFFmax(A, B) ((A) > (B) ? (A) : (B)) -#define TIFFmin(A, B) ((A) < (B) ? (A) : (B)) - -#define TIFFArrayCount(a) (sizeof(a) / sizeof((a)[0])) - -/* - Support for large files. - - Windows read/write APIs support only 'unsigned int' rather than 'size_t'. - Windows off_t is only 32-bit, even in 64-bit builds. -*/ -#if defined(HAVE_FSEEKO) -/* - Use fseeko() and ftello() if they are available since they use - 'off_t' rather than 'long'. It is wrong to use fseeko() and - ftello() only on systems with special LFS support since some systems - (e.g. FreeBSD) support a 64-bit off_t by default. - - For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these - interfaces. The MinGW compiler must support the requested version. MinGW - does not distribute the CRT (it is supplied by Microsoft) so the correct CRT - must be available on the target computer in order for the program to run. -*/ -#if defined(HAVE_FSEEKO) -#define fseek(stream, offset, whence) fseeko(stream, offset, whence) -#define ftell(stream, offset, whence) ftello(stream, offset, whence) -#endif -#endif -#if defined(_WIN32) && \ - !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800) -typedef unsigned int TIFFIOSize_t; -#define _TIFF_lseek_f(fildes, offset, whence) \ - _lseeki64(fildes, /* __int64 */ offset, whence) -/* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */ -#define _TIFF_fseek_f(stream, offset, whence) \ - _fseeki64(stream, /* __int64 */ offset, whence) -#define _TIFF_fstat_f(fildes, stat_buff) \ - _fstati64(fildes, /* struct _stati64 */ stat_buff) -/* #define _TIFF_ftell_f(stream) /\* __int64 *\/ _ftelli64(stream) */ -/* #define _TIFF_stat_f(path,stat_buff) _stati64(path,/\* struct _stati64 *\/ - * stat_buff) */ -#define _TIFF_stat_s struct _stati64 -#define _TIFF_off_t __int64 -#else -typedef size_t TIFFIOSize_t; -#define _TIFF_lseek_f(fildes, offset, whence) lseek(fildes, offset, whence) -/* #define _TIFF_tell_f(fildes) (_TIFF_lseek_f(fildes,0,SEEK_CUR)) */ -#define _TIFF_fseek_f(stream, offset, whence) fseek(stream, offset, whence) -#define _TIFF_fstat_f(fildes, stat_buff) fstat(fildes, stat_buff) -/* #define _TIFF_ftell_f(stream) ftell(stream) */ -/* #define _TIFF_stat_f(path,stat_buff) stat(path,stat_buff) */ -#define _TIFF_stat_s struct stat -#define _TIFF_off_t off_t -#endif - -#if defined(__has_attribute) && defined(__clang__) -#if __has_attribute(no_sanitize) -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW \ - __attribute__((no_sanitize("unsigned-integer-overflow"))) -#else -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -#endif -#else -#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW -#endif - -#if defined(__cplusplus) -extern "C" -{ -#endif - extern int _tiffDummyMapProc(thandle_t fd, void **pbase, toff_t *psize); - extern void _tiffDummyUnmapProc(thandle_t fd, void *base, toff_t size); - extern int _TIFFgetMode(TIFFOpenOptions *opts, thandle_t clientdata, - const char *mode, const char *module); - extern int _TIFFNoRowEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, - uint16_t s); - extern int _TIFFNoStripEncode(TIFF *tif, uint8_t *pp, tmsize_t cc, - uint16_t s); - extern int _TIFFNoTileEncode(TIFF *, uint8_t *pp, tmsize_t cc, uint16_t s); - extern int _TIFFNoRowDecode(TIFF *tif, uint8_t *pp, tmsize_t cc, - uint16_t s); - extern int _TIFFNoStripDecode(TIFF *tif, uint8_t *pp, tmsize_t cc, - uint16_t s); - extern int _TIFFNoTileDecode(TIFF *, uint8_t *pp, tmsize_t cc, uint16_t s); - extern void _TIFFNoPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc); - extern int _TIFFNoPreCode(TIFF *tif, uint16_t s); - extern int _TIFFNoSeek(TIFF *tif, uint32_t off); - extern void _TIFFSwab16BitData(TIFF *tif, uint8_t *buf, tmsize_t cc); - extern void _TIFFSwab24BitData(TIFF *tif, uint8_t *buf, tmsize_t cc); - extern void _TIFFSwab32BitData(TIFF *tif, uint8_t *buf, tmsize_t cc); - extern void _TIFFSwab64BitData(TIFF *tif, uint8_t *buf, tmsize_t cc); - extern int TIFFFlushData1(TIFF *tif); - extern int TIFFDefaultDirectory(TIFF *tif); - extern void _TIFFSetDefaultCompressionState(TIFF *tif); - extern int _TIFFRewriteField(TIFF *, uint16_t, TIFFDataType, tmsize_t, - void *); - extern int TIFFSetCompressionScheme(TIFF *tif, int scheme); - extern int TIFFSetDefaultCompressionState(TIFF *tif); - extern uint32_t _TIFFDefaultStripSize(TIFF *tif, uint32_t s); - extern void _TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th); - - extern void _TIFFsetByteArray(void **, const void *, uint32_t); - extern void _TIFFsetByteArrayExt(TIFF *, void **, const void *, uint32_t); - extern void _TIFFsetShortArray(uint16_t **, const uint16_t *, uint32_t); - extern void _TIFFsetShortArrayExt(TIFF *, uint16_t **, const uint16_t *, - uint32_t); - extern void _TIFFsetLongArray(uint32_t **, const uint32_t *, uint32_t); - extern void _TIFFsetLongArrayExt(TIFF *, uint32_t **, const uint32_t *, - uint32_t); - extern void _TIFFsetFloatArray(float **, const float *, uint32_t); - extern void _TIFFsetFloatArrayExt(TIFF *, float **, const float *, - uint32_t); - extern void _TIFFsetDoubleArray(double **, const double *, uint32_t); - extern void _TIFFsetDoubleArrayExt(TIFF *, double **, const double *, - uint32_t); - - extern void _TIFFprintAscii(FILE *, const char *); - extern void _TIFFprintAsciiTag(FILE *, const char *, const char *); - - extern TIFFErrorHandler _TIFFwarningHandler; - extern TIFFErrorHandler _TIFFerrorHandler; - extern TIFFErrorHandlerExt _TIFFwarningHandlerExt; - extern TIFFErrorHandlerExt _TIFFerrorHandlerExt; - void _TIFFErrorEarly(TIFFOpenOptions *opts, thandle_t clientdata, - const char *module, const char *fmt, ...) - TIFF_ATTRIBUTE((__format__(__printf__, 4, 5))); - - extern uint32_t _TIFFMultiply32(TIFF *, uint32_t, uint32_t, const char *); - extern uint64_t _TIFFMultiply64(TIFF *, uint64_t, uint64_t, const char *); - extern tmsize_t _TIFFMultiplySSize(TIFF *, tmsize_t, tmsize_t, - const char *); - extern tmsize_t _TIFFCastUInt64ToSSize(TIFF *, uint64_t, const char *); - extern void *_TIFFCheckMalloc(TIFF *, tmsize_t, tmsize_t, const char *); - extern void *_TIFFCheckRealloc(TIFF *, void *, tmsize_t, tmsize_t, - const char *); - - extern float _TIFFClampDoubleToFloat(double); - extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern void _TIFFCleanupIFDOffsetAndNumberMaps(TIFF *tif); - - extern tmsize_t _TIFFReadEncodedStripAndAllocBuffer(TIFF *tif, - uint32_t strip, - void **buf, - tmsize_t bufsizetoalloc, - tmsize_t size_to_read); - extern tmsize_t _TIFFReadEncodedTileAndAllocBuffer(TIFF *tif, uint32_t tile, - void **buf, - tmsize_t bufsizetoalloc, - tmsize_t size_to_read); - extern tmsize_t _TIFFReadTileAndAllocBuffer(TIFF *tif, void **buf, - tmsize_t bufsizetoalloc, - uint32_t x, uint32_t y, - uint32_t z, uint16_t s); - extern int _TIFFSeekOK(TIFF *tif, toff_t off); - - extern int TIFFInitDumpMode(TIFF *, int); -#ifdef PACKBITS_SUPPORT - extern int TIFFInitPackBits(TIFF *, int); -#endif -#ifdef CCITT_SUPPORT - extern int TIFFInitCCITTRLE(TIFF *, int), TIFFInitCCITTRLEW(TIFF *, int); - extern int TIFFInitCCITTFax3(TIFF *, int), TIFFInitCCITTFax4(TIFF *, int); -#endif -#ifdef THUNDER_SUPPORT - extern int TIFFInitThunderScan(TIFF *, int); -#endif -#ifdef NEXT_SUPPORT - extern int TIFFInitNeXT(TIFF *, int); -#endif -#ifdef LZW_SUPPORT - extern int TIFFInitLZW(TIFF *, int); -#endif -#ifdef OJPEG_SUPPORT - extern int TIFFInitOJPEG(TIFF *, int); -#endif -#ifdef JPEG_SUPPORT - extern int TIFFInitJPEG(TIFF *, int); - extern int TIFFJPEGIsFullStripRequired(TIFF *); -#endif -#ifdef JBIG_SUPPORT - extern int TIFFInitJBIG(TIFF *, int); -#endif -#ifdef ZIP_SUPPORT - extern int TIFFInitZIP(TIFF *, int); -#endif -#ifdef PIXARLOG_SUPPORT - extern int TIFFInitPixarLog(TIFF *, int); -#endif -#ifdef LOGLUV_SUPPORT - extern int TIFFInitSGILog(TIFF *, int); -#endif -#ifdef LERC_SUPPORT - extern int TIFFInitLERC(TIFF *tif, int); -#endif -#ifdef LZMA_SUPPORT - extern int TIFFInitLZMA(TIFF *, int); -#endif -#ifdef ZSTD_SUPPORT - extern int TIFFInitZSTD(TIFF *, int); -#endif -#ifdef WEBP_SUPPORT - extern int TIFFInitWebP(TIFF *, int); -#endif - extern const TIFFCodec _TIFFBuiltinCODECS[]; - extern void TIFFCIELab16ToXYZ(TIFFCIELabToRGB *, uint32_t l, int32_t a, - int32_t b, float *, float *, float *); - - extern void *_TIFFmallocExt(TIFF *tif, tmsize_t s); - extern void *_TIFFcallocExt(TIFF *tif, tmsize_t nmemb, tmsize_t siz); - extern void *_TIFFreallocExt(TIFF *tif, void *p, tmsize_t s); - extern void _TIFFfreeExt(TIFF *tif, void *p); - -#if defined(__cplusplus) -} -#endif -#endif /* _TIFFIOP_ */ - diff --git a/third_party/libtiff/libtiff/tiffvers.h b/third_party/libtiff/libtiff/tiffvers.h deleted file mode 100644 index 72bc672..0000000 --- a/third_party/libtiff/libtiff/tiffvers.h +++ /dev/null @@ -1,37 +0,0 @@ -/* tiffvers.h version information is updated according to version information - * in configure.ac */ - -/* clang-format off */ - -/* clang-format disabled because FindTIFF.cmake is very sensitive to the - * formatting of below line being a single line. - * Furthermore, configure_file variables of type "VAR" are - * modified by clang-format and won't be substituted by CMake. - */ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.7.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." -/* - * This define can be used in code that requires - * compilation-related definitions specific to a - * version or versions of the library. Runtime - * version checking should be done based on the - * string returned by TIFFGetVersion. - */ -#define TIFFLIB_VERSION 20250911 - -/* The following defines have been added in 4.5.0 */ -#define TIFFLIB_MAJOR_VERSION 4 -#define TIFFLIB_MINOR_VERSION 7 -#define TIFFLIB_MICRO_VERSION 1 -#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "4.7.1" - -/* Macro added in 4.5.0. Returns TRUE if the current libtiff version is - * greater or equal to major.minor.micro - */ -#define TIFFLIB_AT_LEAST(major, minor, micro) \ - (TIFFLIB_MAJOR_VERSION > (major) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION > (minor)) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION == (minor) && \ - TIFFLIB_MICRO_VERSION >= (micro))) - -/* clang-format on */ - diff --git a/third_party/libtiff/libtiff/tiffvers.h.cmake.in b/third_party/libtiff/libtiff/tiffvers.h.cmake.in deleted file mode 100644 index 2898499..0000000 --- a/third_party/libtiff/libtiff/tiffvers.h.cmake.in +++ /dev/null @@ -1,36 +0,0 @@ -/* tiffvers.h version information is updated according to version information - * in configure.ac */ - -/* clang-format off */ - -/* clang-format disabled because FindTIFF.cmake is very sensitive to the - * formatting of below line being a single line. - * Furthermore, configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted by CMake. - */ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version @LIBTIFF_VERSION@\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." -/* - * This define can be used in code that requires - * compilation-related definitions specific to a - * version or versions of the library. Runtime - * version checking should be done based on the - * string returned by TIFFGetVersion. - */ -#define TIFFLIB_VERSION @LIBTIFF_RELEASE_DATE@ - -/* The following defines have been added in 4.5.0 */ -#define TIFFLIB_MAJOR_VERSION @LIBTIFF_MAJOR_VERSION@ -#define TIFFLIB_MINOR_VERSION @LIBTIFF_MINOR_VERSION@ -#define TIFFLIB_MICRO_VERSION @LIBTIFF_MICRO_VERSION@ -#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "@LIBTIFF_VERSION@" - -/* Macro added in 4.5.0. Returns TRUE if the current libtiff version is - * greater or equal to major.minor.micro - */ -#define TIFFLIB_AT_LEAST(major, minor, micro) \ - (TIFFLIB_MAJOR_VERSION > (major) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION > (minor)) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION == (minor) && \ - TIFFLIB_MICRO_VERSION >= (micro))) - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/tiffvers.h.in b/third_party/libtiff/libtiff/tiffvers.h.in deleted file mode 100644 index 2898499..0000000 --- a/third_party/libtiff/libtiff/tiffvers.h.in +++ /dev/null @@ -1,36 +0,0 @@ -/* tiffvers.h version information is updated according to version information - * in configure.ac */ - -/* clang-format off */ - -/* clang-format disabled because FindTIFF.cmake is very sensitive to the - * formatting of below line being a single line. - * Furthermore, configure_file variables of type "@VAR@" are - * modified by clang-format and won't be substituted by CMake. - */ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version @LIBTIFF_VERSION@\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." -/* - * This define can be used in code that requires - * compilation-related definitions specific to a - * version or versions of the library. Runtime - * version checking should be done based on the - * string returned by TIFFGetVersion. - */ -#define TIFFLIB_VERSION @LIBTIFF_RELEASE_DATE@ - -/* The following defines have been added in 4.5.0 */ -#define TIFFLIB_MAJOR_VERSION @LIBTIFF_MAJOR_VERSION@ -#define TIFFLIB_MINOR_VERSION @LIBTIFF_MINOR_VERSION@ -#define TIFFLIB_MICRO_VERSION @LIBTIFF_MICRO_VERSION@ -#define TIFFLIB_VERSION_STR_MAJ_MIN_MIC "@LIBTIFF_VERSION@" - -/* Macro added in 4.5.0. Returns TRUE if the current libtiff version is - * greater or equal to major.minor.micro - */ -#define TIFFLIB_AT_LEAST(major, minor, micro) \ - (TIFFLIB_MAJOR_VERSION > (major) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION > (minor)) || \ - (TIFFLIB_MAJOR_VERSION == (major) && TIFFLIB_MINOR_VERSION == (minor) && \ - TIFFLIB_MICRO_VERSION >= (micro))) - -/* clang-format on */ diff --git a/third_party/libtiff/libtiff/uvcode.h b/third_party/libtiff/libtiff/uvcode.h deleted file mode 100644 index 3f9f9a2..0000000 --- a/third_party/libtiff/libtiff/uvcode.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Version 1.0 generated April 7, 1997 by Greg Ward Larson, SGI */ -#define UV_SQSIZ (float)0.003500 -#define UV_NDIVS 16289 -#define UV_VSTART (float)0.016940 -#define UV_NVS 163 -static const struct -{ - float ustart; - short nus, ncum; -} uv_row[UV_NVS] = { - {(float)0.247663, 4, 0}, {(float)0.243779, 6, 4}, - {(float)0.241684, 7, 10}, {(float)0.237874, 9, 17}, - {(float)0.235906, 10, 26}, {(float)0.232153, 12, 36}, - {(float)0.228352, 14, 48}, {(float)0.226259, 15, 62}, - {(float)0.222371, 17, 77}, {(float)0.220410, 18, 94}, - {(float)0.214710, 21, 112}, {(float)0.212714, 22, 133}, - {(float)0.210721, 23, 155}, {(float)0.204976, 26, 178}, - {(float)0.202986, 27, 204}, {(float)0.199245, 29, 231}, - {(float)0.195525, 31, 260}, {(float)0.193560, 32, 291}, - {(float)0.189878, 34, 323}, {(float)0.186216, 36, 357}, - {(float)0.186216, 36, 393}, {(float)0.182592, 38, 429}, - {(float)0.179003, 40, 467}, {(float)0.175466, 42, 507}, - {(float)0.172001, 44, 549}, {(float)0.172001, 44, 593}, - {(float)0.168612, 46, 637}, {(float)0.168612, 46, 683}, - {(float)0.163575, 49, 729}, {(float)0.158642, 52, 778}, - {(float)0.158642, 52, 830}, {(float)0.158642, 52, 882}, - {(float)0.153815, 55, 934}, {(float)0.153815, 55, 989}, - {(float)0.149097, 58, 1044}, {(float)0.149097, 58, 1102}, - {(float)0.142746, 62, 1160}, {(float)0.142746, 62, 1222}, - {(float)0.142746, 62, 1284}, {(float)0.138270, 65, 1346}, - {(float)0.138270, 65, 1411}, {(float)0.138270, 65, 1476}, - {(float)0.132166, 69, 1541}, {(float)0.132166, 69, 1610}, - {(float)0.126204, 73, 1679}, {(float)0.126204, 73, 1752}, - {(float)0.126204, 73, 1825}, {(float)0.120381, 77, 1898}, - {(float)0.120381, 77, 1975}, {(float)0.120381, 77, 2052}, - {(float)0.120381, 77, 2129}, {(float)0.112962, 82, 2206}, - {(float)0.112962, 82, 2288}, {(float)0.112962, 82, 2370}, - {(float)0.107450, 86, 2452}, {(float)0.107450, 86, 2538}, - {(float)0.107450, 86, 2624}, {(float)0.107450, 86, 2710}, - {(float)0.100343, 91, 2796}, {(float)0.100343, 91, 2887}, - {(float)0.100343, 91, 2978}, {(float)0.095126, 95, 3069}, - {(float)0.095126, 95, 3164}, {(float)0.095126, 95, 3259}, - {(float)0.095126, 95, 3354}, {(float)0.088276, 100, 3449}, - {(float)0.088276, 100, 3549}, {(float)0.088276, 100, 3649}, - {(float)0.088276, 100, 3749}, {(float)0.081523, 105, 3849}, - {(float)0.081523, 105, 3954}, {(float)0.081523, 105, 4059}, - {(float)0.081523, 105, 4164}, {(float)0.074861, 110, 4269}, - {(float)0.074861, 110, 4379}, {(float)0.074861, 110, 4489}, - {(float)0.074861, 110, 4599}, {(float)0.068290, 115, 4709}, - {(float)0.068290, 115, 4824}, {(float)0.068290, 115, 4939}, - {(float)0.068290, 115, 5054}, {(float)0.063573, 119, 5169}, - {(float)0.063573, 119, 5288}, {(float)0.063573, 119, 5407}, - {(float)0.063573, 119, 5526}, {(float)0.057219, 124, 5645}, - {(float)0.057219, 124, 5769}, {(float)0.057219, 124, 5893}, - {(float)0.057219, 124, 6017}, {(float)0.050985, 129, 6141}, - {(float)0.050985, 129, 6270}, {(float)0.050985, 129, 6399}, - {(float)0.050985, 129, 6528}, {(float)0.050985, 129, 6657}, - {(float)0.044859, 134, 6786}, {(float)0.044859, 134, 6920}, - {(float)0.044859, 134, 7054}, {(float)0.044859, 134, 7188}, - {(float)0.040571, 138, 7322}, {(float)0.040571, 138, 7460}, - {(float)0.040571, 138, 7598}, {(float)0.040571, 138, 7736}, - {(float)0.036339, 142, 7874}, {(float)0.036339, 142, 8016}, - {(float)0.036339, 142, 8158}, {(float)0.036339, 142, 8300}, - {(float)0.032139, 146, 8442}, {(float)0.032139, 146, 8588}, - {(float)0.032139, 146, 8734}, {(float)0.032139, 146, 8880}, - {(float)0.027947, 150, 9026}, {(float)0.027947, 150, 9176}, - {(float)0.027947, 150, 9326}, {(float)0.023739, 154, 9476}, - {(float)0.023739, 154, 9630}, {(float)0.023739, 154, 9784}, - {(float)0.023739, 154, 9938}, {(float)0.019504, 158, 10092}, - {(float)0.019504, 158, 10250}, {(float)0.019504, 158, 10408}, - {(float)0.016976, 161, 10566}, {(float)0.016976, 161, 10727}, - {(float)0.016976, 161, 10888}, {(float)0.016976, 161, 11049}, - {(float)0.012639, 165, 11210}, {(float)0.012639, 165, 11375}, - {(float)0.012639, 165, 11540}, {(float)0.009991, 168, 11705}, - {(float)0.009991, 168, 11873}, {(float)0.009991, 168, 12041}, - {(float)0.009016, 170, 12209}, {(float)0.009016, 170, 12379}, - {(float)0.009016, 170, 12549}, {(float)0.006217, 173, 12719}, - {(float)0.006217, 173, 12892}, {(float)0.005097, 175, 13065}, - {(float)0.005097, 175, 13240}, {(float)0.005097, 175, 13415}, - {(float)0.003909, 177, 13590}, {(float)0.003909, 177, 13767}, - {(float)0.002340, 177, 13944}, {(float)0.002389, 170, 14121}, - {(float)0.001068, 164, 14291}, {(float)0.001653, 157, 14455}, - {(float)0.000717, 150, 14612}, {(float)0.001614, 143, 14762}, - {(float)0.000270, 136, 14905}, {(float)0.000484, 129, 15041}, - {(float)0.001103, 123, 15170}, {(float)0.001242, 115, 15293}, - {(float)0.001188, 109, 15408}, {(float)0.001011, 103, 15517}, - {(float)0.000709, 97, 15620}, {(float)0.000301, 89, 15717}, - {(float)0.002416, 82, 15806}, {(float)0.003251, 76, 15888}, - {(float)0.003246, 69, 15964}, {(float)0.004141, 62, 16033}, - {(float)0.005963, 55, 16095}, {(float)0.008839, 47, 16150}, - {(float)0.010490, 40, 16197}, {(float)0.016994, 31, 16237}, - {(float)0.023659, 21, 16268}, -}; - diff --git a/third_party/libtiff/m4/acinclude.m4 b/third_party/libtiff/m4/acinclude.m4 deleted file mode 100644 index b54feb7..0000000 --- a/third_party/libtiff/m4/acinclude.m4 +++ /dev/null @@ -1,851 +0,0 @@ -dnl --------------------------------------------------------------------------- -dnl Message output -dnl --------------------------------------------------------------------------- -AC_DEFUN([LOC_MSG],[echo "$1"]) - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/vl_prog_cc_warnings.html -dnl --------------------------------------------------------------------------- - -dnl @synopsis VL_PROG_CC_WARNINGS([ANSI]) -dnl -dnl Enables a reasonable set of warnings for the C compiler. -dnl Optionally, if the first argument is nonempty, turns on flags which -dnl enforce and/or enable proper ANSI C if such are known with the -dnl compiler used. -dnl -dnl Currently this macro knows about GCC, Solaris C compiler, Digital -dnl Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C -dnl compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos -dnl 10.0.0.8) C compiler. -dnl -dnl @category C -dnl @author Ville Laurikari -dnl @version 2002-04-04 -dnl @license AllPermissive - -AC_DEFUN([VL_PROG_CC_WARNINGS], [ - ansi=$1 - if test -z "$ansi"; then - msg="for C compiler warning flags" - else - msg="for C compiler warning and ANSI conformance flags" - fi - AC_CACHE_CHECK($msg, vl_cv_prog_cc_warnings, [ - if test -n "$CC"; then - cat > conftest.c <&1 | grep -i "WorkShop" > /dev/null 2>&1 && - $CC -c -v -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-v" - else - vl_cv_prog_cc_warnings="-v -Xc" - fi - - dnl Digital Unix C compiler - elif $CC -V 2>&1 | grep -i "Digital UNIX Compiler" > /dev/null 2>&1 && - $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos" - else - vl_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1" - fi - - dnl C for AIX Compiler - elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 && - $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" - else - vl_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi" - fi - - dnl IRIX C compiler - elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 && - $CC -c -fullwarn -ansi -ansiE conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-fullwarn" - else - vl_cv_prog_cc_warnings="-fullwarn -ansi -ansiE" - fi - - dnl HP-UX C compiler - elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 && - $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="+w1" - else - vl_cv_prog_cc_warnings="+w1 -Aa" - fi - - dnl The NEC SX-5 (Super-UX 10) C compiler - elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 && - $CC -c -pvctl[,]fullmsg -Xc conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-pvctl[,]fullmsg" - else - vl_cv_prog_cc_warnings="-pvctl[,]fullmsg -Xc" - fi - - dnl The Cray C compiler (Unicos) - elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 && - $CC -c -h msglevel 2 conftest.c > /dev/null 2>&1 && - test -f conftest.o; then - if test -z "$ansi"; then - vl_cv_prog_cc_warnings="-h msglevel 2" - else - vl_cv_prog_cc_warnings="-h msglevel 2 -h conform" - fi - - fi - rm -f conftest.* - fi - if test -n "$vl_cv_prog_cc_warnings"; then - CFLAGS="$CFLAGS $vl_cv_prog_cc_warnings" - else - vl_cv_prog_cc_warnings="unknown" - fi - ]) -])dnl - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://autoconf-archive.cryp.to/ax_lang_compiler_ms.html -dnl --------------------------------------------------------------------------- - -dnl @synopsis AX_LANG_COMPILER_MS -dnl -dnl Check whether the compiler for the current language is Microsoft. -dnl -dnl This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU -dnl Autoconf implementation. -dnl -dnl @category InstalledPackages -dnl @author Braden McDaniel -dnl @version 2004-11-15 -dnl @license AllPermissive - -AC_DEFUN([AX_LANG_COMPILER_MS], -[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler], - [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms], -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER - choke me -#endif -]])], - [ax_compiler_ms=yes], - [ax_compiler_ms=no]) -ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms -])]) - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/ax_check_gl.html -dnl --------------------------------------------------------------------------- - -dnl SYNOPSIS -dnl -dnl AX_CHECK_GL -dnl -dnl DESCRIPTION -dnl -dnl Check for an OpenGL implementation. If GL is found, the required -dnl compiler and linker flags are included in the output variables -dnl "GL_CFLAGS" and "GL_LIBS", respectively. If no usable GL implementation -dnl is found, "no_gl" is set to "yes". -dnl -dnl If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the -dnl header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These -dnl preprocessor definitions may not be mutually exclusive. -dnl -dnl LICENSE -dnl -dnl Copyright (c) 2009 Braden McDaniel -dnl -dnl This program is free software; you can redistribute it and/or modify it -dnl under the terms of the GNU General Public License as published by the -dnl Free Software Foundation; either version 2 of the License, or (at your -dnl option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program. If not, see . -dnl -dnl As a special exception, the respective Autoconf Macro's copyright owner -dnl gives unlimited permission to copy, distribute and modify the configure -dnl scripts that are the output of Autoconf when processing the Macro. You -dnl need not follow the terms of the GNU General Public License when using -dnl or distributing such scripts, even though portions of the text of the -dnl Macro appear in them. The GNU General Public License (GPL) does govern -dnl all other use of the material that constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the Autoconf -dnl Macro released by the Autoconf Archive. When you make and distribute a -dnl modified version of the Autoconf Macro, you may extend this special -dnl exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_CHECK_GL], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PATH_X])dnl -AC_REQUIRE([AX_PTHREAD])dnl - -AC_LANG_PUSH([C]) -AX_LANG_COMPILER_MS -AS_IF([test X$ax_compiler_ms = Xno], - [GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm"]) - -dnl -dnl Use x_includes and x_libraries if they have been set (presumably by -dnl AC_PATH_X). -dnl -AS_IF([test "X$no_x" != "Xyes"], - [AS_IF([test -n "$x_includes"], - [GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"])] - AS_IF([test -n "$x_libraries"], - [GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"])) - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h]) -CPPFLAGS="${ax_save_CPPFLAGS}" - -AC_CHECK_HEADERS([windows.h]) - -m4_define([AX_CHECK_GL_PROGRAM], - [AC_LANG_PROGRAM([[ -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GL_H -# include -# elif defined(HAVE_OPENGL_GL_H) -# include -# else -# error no gl.h -# endif]], - [[glBegin(0)]])]) - -AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl], -[ax_cv_check_gl_libgl="no" -case $host_cpu in - x86_64) ax_check_gl_libdir=lib64 ;; - *) ax_check_gl_libdir=lib ;; -esac -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" -LIBS="" -ax_check_libs="-lopengl32 -lGL" -for ax_lib in ${ax_check_libs}; do - AS_IF([test X$ax_compiler_ms = Xyes], - [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], - [ax_try_lib="${ax_lib}"]) - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" -AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], - [ax_cv_check_gl_libgl="${ax_try_lib}"; break], - [ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" -AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], - [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break], - [ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" -AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], - [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break])])]) -done - -AS_IF([test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes], -[LIBS='-framework OpenGL' -AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], - [ax_cv_check_gl_libgl="$LIBS"])]) - -LIBS=${ax_save_LIBS} -CPPFLAGS=${ax_save_CPPFLAGS}]) - -AS_IF([test "X$ax_cv_check_gl_libgl" = Xno], - [no_gl=yes; GL_CFLAGS=""; GL_LIBS=""], - [GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"]) -AC_LANG_POP([C]) - -AC_SUBST([GL_CFLAGS]) -AC_SUBST([GL_LIBS]) -])dnl - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/ax_check_glu.html -dnl --------------------------------------------------------------------------- - -dnl SYNOPSIS -dnl -dnl AX_CHECK_GLU -dnl -dnl DESCRIPTION -dnl -dnl Check for GLU. If GLU is found, the required preprocessor and linker -dnl flags are included in the output variables "GLU_CFLAGS" and "GLU_LIBS", -dnl respectively. If no GLU implementation is found, "no_glu" is set to -dnl "yes". -dnl -dnl If the header "GL/glu.h" is found, "HAVE_GL_GLU_H" is defined. If the -dnl header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. These -dnl preprocessor definitions may not be mutually exclusive. -dnl -dnl Some implementations (in particular, some versions of Mac OS X) are -dnl known to treat the GLU tesselator callback function type as "GLvoid -dnl (*)(...)" rather than the standard "GLvoid (*)()". If the former -dnl condition is detected, this macro defines "HAVE_VARARGS_GLU_TESSCB". -dnl -dnl LICENSE -dnl -dnl Copyright (c) 2009 Braden McDaniel -dnl -dnl This program is free software; you can redistribute it and/or modify it -dnl under the terms of the GNU General Public License as published by the -dnl Free Software Foundation; either version 2 of the License, or (at your -dnl option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program. If not, see . -dnl -dnl As a special exception, the respective Autoconf Macro's copyright owner -dnl gives unlimited permission to copy, distribute and modify the configure -dnl scripts that are the output of Autoconf when processing the Macro. You -dnl need not follow the terms of the GNU General Public License when using -dnl or distributing such scripts, even though portions of the text of the -dnl Macro appear in them. The GNU General Public License (GPL) does govern -dnl all other use of the material that constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the Autoconf -dnl Macro released by the Autoconf Archive. When you make and distribute a -dnl modified version of the Autoconf Macro, you may extend this special -dnl exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_CHECK_GLU], -[AC_REQUIRE([AX_CHECK_GL])dnl -AC_REQUIRE([AC_PROG_CXX])dnl -GLU_CFLAGS="${GL_CFLAGS}" - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h]) -CPPFLAGS="${ax_save_CPPFLAGS}" - -m4_define([AX_CHECK_GLU_PROGRAM], - [AC_LANG_PROGRAM([[ -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLU_H -# include -# elif defined(HAVE_OPENGL_GLU_H) -# include -# else -# error no glu.h -# endif]], - [[gluBeginCurve(0)]])]) - -AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu], -[ax_cv_check_glu_libglu="no" -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" - -dnl -dnl First, check for the possibility that everything we need is already in -dnl GL_LIBS. -dnl -LIBS="${GL_LIBS} ${ax_save_LIBS}" -dnl -dnl libGLU typically links with libstdc++ on POSIX platforms. -dnl However, setting the language to C++ means that test program -dnl source is named "conftest.cc"; and Microsoft cl doesn't know what -dnl to do with such a file. -dnl -AC_LANG_PUSH([C++]) -AS_IF([test X$ax_compiler_ms = Xyes], - [AC_LANG_PUSH([C])]) -AC_LINK_IFELSE( -[AX_CHECK_GLU_PROGRAM], -[ax_cv_check_glu_libglu=yes], -[LIBS="" -ax_check_libs="-lglu32 -lGLU" -for ax_lib in ${ax_check_libs}; do - AS_IF([test X$ax_compiler_ms = Xyes], - [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], - [ax_try_lib="${ax_lib}"]) - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" - AC_LINK_IFELSE([AX_CHECK_GLU_PROGRAM], - [ax_cv_check_glu_libglu="${ax_try_lib}"; break]) -done -]) -AS_IF([test X$ax_compiler_ms = Xyes], - [AC_LANG_POP([C])]) -AC_LANG_POP([C++]) - -LIBS=${ax_save_LIBS} -CPPFLAGS=${ax_save_CPPFLAGS}]) -AS_IF([test "X$ax_cv_check_glu_libglu" = Xno], - [no_glu=yes; GLU_CFLAGS=""; GLU_LIBS=""], - [AS_IF([test "X$ax_cv_check_glu_libglu" = Xyes], - [GLU_LIBS="$GL_LIBS"], - [GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"])]) -AC_SUBST([GLU_CFLAGS]) -AC_SUBST([GLU_LIBS]) - -dnl -dnl Some versions of Mac OS X include a broken interpretation of the GLU -dnl tesselation callback function signature. -dnl -AS_IF([test "X$ax_cv_check_glu_libglu" != Xno], -[AC_CACHE_CHECK([for varargs GLU tesselator callback function type], - [ax_cv_varargs_glu_tesscb], -[ax_cv_varargs_glu_tesscb=no -ax_save_CFLAGS="$CFLAGS" -CFLAGS="$GL_CFLAGS $CFLAGS" -AC_COMPILE_IFELSE( -[AC_LANG_PROGRAM([[ -# ifdef HAVE_GL_GLU_H -# include -# else -# include -# endif]], - [[GLvoid (*func)(...); gluTessCallback(0, 0, func)]])], -[ax_cv_varargs_glu_tesscb=yes]) -CFLAGS="$ax_save_CFLAGS"]) -AS_IF([test X$ax_cv_varargs_glu_tesscb = Xyes], - [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], - [Use nonstandard varargs form for the GLU tesselator callback])])]) -]) - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/ax_check_glut.html -dnl --------------------------------------------------------------------------- - -dnl -dnl SYNOPSIS -dnl -dnl AX_CHECK_GLUT -dnl -dnl DESCRIPTION -dnl -dnl Check for GLUT. If GLUT is found, the required compiler and linker flags -dnl are included in the output variables "GLUT_CFLAGS" and "GLUT_LIBS", -dnl respectively. If GLUT is not found, "no_glut" is set to "yes". -dnl -dnl If the header "GL/glut.h" is found, "HAVE_GL_GLUT_H" is defined. If the -dnl header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. These -dnl preprocessor definitions may not be mutually exclusive. -dnl -dnl LICENSE -dnl -dnl Copyright (c) 2009 Braden McDaniel -dnl -dnl This program is free software; you can redistribute it and/or modify it -dnl under the terms of the GNU General Public License as published by the -dnl Free Software Foundation; either version 2 of the License, or (at your -dnl option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program. If not, see . -dnl -dnl As a special exception, the respective Autoconf Macro's copyright owner -dnl gives unlimited permission to copy, distribute and modify the configure -dnl scripts that are the output of Autoconf when processing the Macro. You -dnl need not follow the terms of the GNU General Public License when using -dnl or distributing such scripts, even though portions of the text of the -dnl Macro appear in them. The GNU General Public License (GPL) does govern -dnl all other use of the material that constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the Autoconf -dnl Macro released by the Autoconf Archive. When you make and distribute a -dnl modified version of the Autoconf Macro, you may extend this special -dnl exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_CHECK_GLUT], -[AC_REQUIRE([AX_CHECK_GLU])dnl -AC_REQUIRE([AC_PATH_XTRA])dnl - -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" -AC_CHECK_HEADERS([GL/glut.h GLUT/glut.h]) -CPPFLAGS="${ax_save_CPPFLAGS}" - -GLUT_CFLAGS=${GLU_CFLAGS} -GLUT_LIBS=${GLU_LIBS} - -m4_define([AX_CHECK_GLUT_PROGRAM], - [AC_LANG_PROGRAM([[ -# if HAVE_WINDOWS_H && defined(_WIN32) -# include -# endif -# ifdef HAVE_GL_GLUT_H -# include -# elif defined(HAVE_GLUT_GLUT_H) -# include -# else -# error no glut.h -# endif]], - [[glutMainLoop()]])]) - -dnl -dnl If X is present, assume GLUT depends on it. -dnl -AS_IF([test X$no_x != Xyes], - [GLUT_LIBS="${X_PRE_LIBS} -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"]) - -AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut], -[ax_cv_check_glut_libglut="no" -AC_LANG_PUSH(C) -ax_save_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" -ax_save_LIBS="${LIBS}" -LIBS="" -ax_check_libs="-lglut32 -lglut" -for ax_lib in ${ax_check_libs}; do - AS_IF([test X$ax_compiler_ms = Xyes], - [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], - [ax_try_lib="${ax_lib}"]) - LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" - AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], - [ax_cv_check_glut_libglut="${ax_try_lib}"; break]) -done - -AS_IF([test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes], -[LIBS='-framework GLUT' -AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], - [ax_cv_check_glut_libglut="$LIBS"])]) - -CPPFLAGS="${ax_save_CPPFLAGS}" -LIBS="${ax_save_LIBS}" -AC_LANG_POP(C)]) - -AS_IF([test "X$ax_cv_check_glut_libglut" = Xno], - [no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS=""], - [GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}"]) - -AC_SUBST([GLUT_CFLAGS]) -AC_SUBST([GLUT_LIBS]) -])dnl - -dnl --------------------------------------------------------------------------- -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/autoconf-archive/ax_pthread.html -dnl --------------------------------------------------------------------------- - -dnl SYNOPSIS -dnl -dnl AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl DESCRIPTION -dnl -dnl This macro figures out how to build C programs using POSIX threads. It -dnl sets the PTHREAD_LIBS output variable to the threads library and linker -dnl flags, and the PTHREAD_CFLAGS output variable to any special C compiler -dnl flags that are needed. (The user can also force certain compiler -dnl flags/libs to be tested by setting these environment variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). (This -dnl is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these flags, -dnl but also link it with them as well. e.g. you should link with -dnl $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -dnl -dnl If you are only building threads programs, you may wish to use these -dnl variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -dnl has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -dnl (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads library -dnl is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -dnl is not found. If ACTION-IF-FOUND is not specified, the default action -dnl will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, or if -dnl you have any other suggestions or comments. This macro was based on work -dnl by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -dnl from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -dnl Alejandro Forero Cuervo to the autoconf macro repository. We are also -dnl grateful for the helpful feedback of numerous users. -dnl -dnl LICENSE -dnl -dnl Copyright (c) 2008 Steven G. Johnson -dnl -dnl This program is free software: you can redistribute it and/or modify it -dnl under the terms of the GNU General Public License as published by the -dnl Free Software Foundation, either version 3 of the License, or (at your -dnl option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -dnl Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program. If not, see . -dnl -dnl As a special exception, the respective Autoconf Macro's copyright owner -dnl gives unlimited permission to copy, distribute and modify the configure -dnl scripts that are the output of Autoconf when processing the Macro. You -dnl need not follow the terms of the GNU General Public License when using -dnl or distributing such scripts, even though portions of the text of the -dnl Macro appear in them. The GNU General Public License (GPL) does govern -dnl all other use of the material that constitutes the Autoconf Macro. -dnl -dnl This special exception to the GPL applies to versions of the Autoconf -dnl Macro released by the Autoconf Archive. When you make and distribute a -dnl modified version of the Autoconf Macro, you may extend this special -dnl exception to the GPL to apply to your modified version as well. - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -ax_pthread_ok=no - -dnl We used to check for pthread.h first, but this fails if pthread.h -dnl requires special compiler flags (e.g. on True64 or Sequent). -dnl It gets checked for in the link test anyway. - -dnl First of all, check if the user has set any of the PTHREAD_LIBS, -dnl etcetera environment variables, and if threads linking works using -dnl them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) - AC_MSG_RESULT($ax_pthread_ok) - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -dnl We must check for the threads library under a number of different -dnl names; the ordering is very important because some systems -dnl (e.g. DEC) have both -lpthread and -lpthreads, where one of the -dnl libraries is broken (non-POSIX). - -dnl Create a list of thread flags to try. Items starting with a "-" are -dnl C compiler flags, and other items are library names, except for "none" -dnl which indicates that we try without any flags at all, and "pthread-config" -dnl which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -dnl The ordering *is* (sometimes) important. Some notes on the -dnl individual items follow: - -dnl pthreads: AIX (must check this before -lpthread) -dnl none: in case threads are in libc; should be tried before -Kthread and -dnl other compiler flags to prevent continual compiler warnings -dnl -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -dnl -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -dnl lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -dnl -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -dnl -pthreads: Solaris/gcc -dnl -mthreads: Mingw32/gcc, Lynx/gcc -dnl -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -dnl doesn't hurt to check since this sometimes defines pthreads too; -dnl also defines -D_REENTRANT) -dnl ... -mt is also the pthreads flag for HP/aCC -dnl pthread: Linux, etcetera -dnl --thread-safe: KAI C++ -dnl pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - dnl On Solaris (at least, for some versions), libc contains stubbed - dnl (non-functional) versions of the pthreads routines, so link-based - dnl tests will erroneously succeed. (We need to link with -pthreads/-mt/ - dnl -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - dnl a function called by this macro, so we could check for that, but - dnl who knows whether they'll stub that too in a future libc.) So, - dnl we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - *-darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - dnl Check for various functions. We must include pthread.h, - dnl since some functions may be macros. (On the Sequent, we - dnl need a special flag -Kthread to make this header compile.) - dnl We check for pthread_join because it is in -lpthread on IRIX - dnl while pthread_create is in libc. We check for pthread_attr_init - dnl due to DEC craziness with -lpthreads. We check for - dnl pthread_cleanup_push because it is one of the few pthread - dnl functions on Solaris that doesn't have a non-functional libc stub. - dnl We try pthread_create on general principles. - AC_TRY_LINK([#include - static void routine(void* a) {a=0;} - static void* start_routine(void* a) {return a;}], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th,0,start_routine,0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0); ], - [ax_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($ax_pthread_ok) - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -dnl Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - dnl Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - dnl More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -dnl Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl AX_PTHREAD diff --git a/third_party/libtiff/m4/libtool.m4 b/third_party/libtiff/m4/libtool.m4 deleted file mode 100644 index a6d21ae..0000000 --- a/third_party/libtiff/m4/libtool.m4 +++ /dev/null @@ -1,8394 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cr} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/third_party/libtiff/m4/ltoptions.m4 b/third_party/libtiff/m4/ltoptions.m4 deleted file mode 100644 index 94b0829..0000000 --- a/third_party/libtiff/m4/ltoptions.m4 +++ /dev/null @@ -1,437 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [pic_mode=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/third_party/libtiff/m4/ltsugar.m4 b/third_party/libtiff/m4/ltsugar.m4 deleted file mode 100644 index 48bc934..0000000 --- a/third_party/libtiff/m4/ltsugar.m4 +++ /dev/null @@ -1,124 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/third_party/libtiff/m4/ltversion.m4 b/third_party/libtiff/m4/ltversion.m4 deleted file mode 100644 index fa04b52..0000000 --- a/third_party/libtiff/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/third_party/libtiff/m4/lt~obsolete.m4 b/third_party/libtiff/m4/lt~obsolete.m4 deleted file mode 100644 index c6b26f8..0000000 --- a/third_party/libtiff/m4/lt~obsolete.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/third_party/libtiff/placeholder.h b/third_party/libtiff/placeholder.h deleted file mode 100644 index d994486..0000000 --- a/third_party/libtiff/placeholder.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This file is intentionally empty. - * - * Before CMake 3.11, add_executable() and add_library() need - * at least one source file. - */ - diff --git a/third_party/libtiff/port/CMakeLists.txt b/third_party/libtiff/port/CMakeLists.txt deleted file mode 100644 index d03fc3f..0000000 --- a/third_party/libtiff/port/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Generate headers -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libport_config.h.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/libport_config.h - @ONLY) - -set(port_HEADERS libport.h) - -# Only build if any needed features are missing -if(NOT HAVE_GETOPT) - add_library(tiff_port STATIC ../placeholder.h) - - # Add getopt if missing - if(NOT HAVE_GETOPT) - target_sources(tiff_port PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/getopt.c) - endif() - - target_include_directories(tiff_port PUBLIC - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}) -else() - # Dummy interface library - add_library(tiff_port INTERFACE) - target_include_directories(tiff_port INTERFACE - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}) -endif() diff --git a/third_party/libtiff/port/Makefile.am b/third_party/libtiff/port/Makefile.am deleted file mode 100644 index 088a2f7..0000000 --- a/third_party/libtiff/port/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = \ - CMakeLists.txt \ - libport.h \ - libport_config.h.cmake.in - -noinst_LTLIBRARIES = libport.la -libport_la_SOURCES = dummy.c libport.h -libport_la_LIBADD = @LTLIBOBJS@ - diff --git a/third_party/libtiff/port/Makefile.in b/third_party/libtiff/port/Makefile.in deleted file mode 100644 index 85e9413..0000000 --- a/third_party/libtiff/port/Makefile.in +++ /dev/null @@ -1,683 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = port -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libport_la_DEPENDENCIES = @LTLIBOBJS@ -am_libport_la_OBJECTS = dummy.lo -libport_la_OBJECTS = $(am_libport_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = $(DEPDIR)/getopt.Plo ./$(DEPDIR)/dummy.Plo -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libport_la_SOURCES) -DIST_SOURCES = $(libport_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)libport_config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libport_config.h.in \ - $(top_srcdir)/config/depcomp getopt.c -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - CMakeLists.txt \ - libport.h \ - libport_config.h.cmake.in - -noinst_LTLIBRARIES = libport.la -libport_la_SOURCES = dummy.c libport.h -libport_la_LIBADD = @LTLIBOBJS@ -all: libport_config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu port/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu port/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -libport_config.h: stamp-h4 - @test -f $@ || rm -f stamp-h4 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h4 - -stamp-h4: $(srcdir)/libport_config.h.in $(top_builddir)/config.status - @rm -f stamp-h4 - cd $(top_builddir) && $(SHELL) ./config.status port/libport_config.h - -distclean-hdr: - -rm -f libport_config.h stamp-h4 - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libport.la: $(libport_la_OBJECTS) $(libport_la_DEPENDENCIES) $(EXTRA_libport_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libport_la_OBJECTS) $(libport_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) libport_config.h -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -f $(DEPDIR)/getopt.Plo - -rm -f ./$(DEPDIR)/dummy.Plo - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(DEPDIR)/getopt.Plo - -rm -f ./$(DEPDIR)/dummy.Plo - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: all install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-noinstLTLIBRARIES \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/port/dummy.c b/third_party/libtiff/port/dummy.c deleted file mode 100644 index afc55bf..0000000 --- a/third_party/libtiff/port/dummy.c +++ /dev/null @@ -1,5 +0,0 @@ -/* - * Dummy function, just to be ensure that the library always will be created. - */ - -void libport_dummy_function() { return; } diff --git a/third_party/libtiff/port/getopt.c b/third_party/libtiff/port/getopt.c deleted file mode 100644 index b30b622..0000000 --- a/third_party/libtiff/port/getopt.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 1987, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if 0 -static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; -__RCSID("$NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $"); -#endif - -#include "libport.h" -#include -#include - -int opterr = 1, /* if error message should be printed */ - optind = 1, /* index into parent argv vector */ - optopt, /* character checked for validity */ - optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define BADARG (int)':' -#define EMSG "" - -/* - * getopt -- - * Parse argc/argv argument vector. - */ -int getopt(int argc, char *const argv[], const char *optstring) -{ - static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ - - if (optreset || *place == 0) - { /* update scanning pointer */ - optreset = 0; - place = argv[optind]; - if (optind >= argc || *place++ != '-') - { - /* Argument is absent or is not an option */ - place = EMSG; - return (-1); - } - optopt = *place++; - if (optopt == '-' && *place == 0) - { - /* "--" => end of options */ - ++optind; - place = EMSG; - return (-1); - } - if (optopt == 0) - { - /* Solitary '-', treat as a '-' option - if the program (eg su) is looking for it. */ - place = EMSG; - if (strchr(optstring, '-') == NULL) - return -1; - optopt = '-'; - } - } - else - optopt = *place++; - - /* See if option letter is one the caller wanted... */ - if (optopt == ':' || (oli = strchr(optstring, optopt)) == NULL) - { - if (*place == 0) - ++optind; - if (opterr && *optstring != ':') - (void)fprintf(stderr, "unknown option -- %c\n", optopt); - return (BADCH); - } - - /* Does this option need an argument? */ - if (oli[1] != ':') - { - /* don't need argument */ - optarg = NULL; - if (*place == 0) - ++optind; - } - else - { - /* Option-argument is either the rest of this argument or the - entire next argument. */ - if (*place) - optarg = place; - else if (argc > ++optind) - optarg = argv[optind]; - else - { - /* option-argument absent */ - place = EMSG; - if (*optstring == ':') - return (BADARG); - if (opterr) - (void)fprintf(stderr, "option requires an argument -- %c\n", - optopt); - return (BADCH); - } - place = EMSG; - ++optind; - } - return (optopt); /* return option letter */ -} diff --git a/third_party/libtiff/port/libport.h b/third_party/libtiff/port/libport.h deleted file mode 100644 index 9520814..0000000 --- a/third_party/libtiff/port/libport.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2009 Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _LIBPORT_ -#define _LIBPORT_ - -#include - -#if HAVE_GETOPT -#if HAVE_UNISTD_H -#include -#endif -#else - -int getopt(int argc, char *const argv[], const char *optstring); -extern char *optarg; -extern int opterr; -extern int optind; -extern int optopt; - -#endif - -#endif /* ndef _LIBPORT_ */ - diff --git a/third_party/libtiff/port/libport_config.h.cmake.in b/third_party/libtiff/port/libport_config.h.cmake.in deleted file mode 100644 index 7446f87..0000000 --- a/third_party/libtiff/port/libport_config.h.cmake.in +++ /dev/null @@ -1,13 +0,0 @@ -/* libtiff/libport_config.h.cmake.in. Not generated, but originated from autoheader. */ -/* This file must be kept up-to-date with needed substitutions from port/libport_config.h.in. */ - -#ifndef _LIBPORT_CONFIG_H_ -#define _LIBPORT_CONFIG_H_ - -/* Define to 1 if you have the `getopt' function. */ -#cmakedefine HAVE_GETOPT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -#endif /* _LIBPORT_CONFIG_H_ */ diff --git a/third_party/libtiff/port/libport_config.h.in b/third_party/libtiff/port/libport_config.h.in deleted file mode 100644 index b904f61..0000000 --- a/third_party/libtiff/port/libport_config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* libtiff/libport_config.h.in. Not generated, but originated from autoheader. */ - -#ifndef _LIBPORT_CONFIG_H_ -#define _LIBPORT_CONFIG_H_ - -/* Define to 1 if you have the `getopt' function. */ -#undef HAVE_GETOPT - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -#endif /* _LIBPORT_CONFIG_H_ */ diff --git a/third_party/libtiff/test/CMakeLists.txt b/third_party/libtiff/test/CMakeLists.txt deleted file mode 100644 index 527df89..0000000 --- a/third_party/libtiff/test/CMakeLists.txt +++ /dev/null @@ -1,547 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Images for tiff2bw (8-bit RGB only) -set(RGBIMAGES - images/palette-1c-8b.tiff - images/rgb-3c-8b.tiff - images/quad-lzw-compat.tiff -) - -# This list should contain all of the TIFF files in the 'images' -# subdirectory which are intended to be used as input images for -# tests. All of these files should use the extension ".tiff". -set(TIFFIMAGES - images/custom_dir_EXIF_GPS.tiff - images/logluv-3c-16b.tiff - images/minisblack-1c-16b.tiff - images/minisblack-1c-8b.tiff - images/minisblack-2c-8b-alpha.tiff - images/miniswhite-1c-1b.tiff - images/palette-1c-1b.tiff - images/palette-1c-4b.tiff - images/palette-1c-8b.tiff - images/rgb-3c-16b.tiff - images/rgb-3c-8b.tiff - images/quad-lzw-compat.tiff - images/lzw-single-strip.tiff - images/testfax4.tiff - images/testfax3_bug_513.tiff - images/32bpp-None.tiff -) -# TIFF images using old-jpeg. Unused unless JPEG support is enabled. -set(TIFFIMAGES_OJPEG) - -if(JPEG_SUPPORT) - list(APPEND TIFFIMAGES images/quad-tile.jpg.tiff) -endif() - -if (OJPEG_SUPPORT) - list(APPEND TIFFIMAGES_OJPEG - images/ojpeg_zackthecat_subsamp22_single_strip.tiff - images/ojpeg_chewey_subsamp21_multi_strip.tiff - images/ojpeg_single_strip_no_rowsperstrip.tiff - ) -endif() - -set(BMPIMAGES - images/palette-1c-8b.bmp - images/rgb-3c-8b.bmp) - -set(GIFIMAGES - images/palette-1c-8b.gif) - -set(PNMIMAGES - images/minisblack-1c-8b.pgm - images/miniswhite-1c-1b.pbm - images/rgb-3c-16b.ppm - images/rgb-3c-8b.ppm) - -# All uncompressed image files -set(UNCOMPRESSEDIMAGES - images/minisblack-1c-16b.tiff - images/minisblack-1c-8b.tiff - images/miniswhite-1c-1b.tiff - images/palette-1c-1b.tiff - images/palette-1c-4b.tiff - images/palette-1c-8b.tiff - images/rgb-3c-8b.tiff) - -# This list should include all of the files in the 'images' -# subdirectory which are intended to be distributed. This may include -# files which are not currently used by the tests. -set(IMAGES_EXTRA_DIST - images/README.txt - images/miniswhite-1c-1b.g3 - images/32bpp-None-jpeg.tiff - ${BMPIMAGES} - ${GIFIMAGES} - ${PNMIMAGES} - ${TIFFIMAGES}) - -set(noinst_HEADERS tifftest.h) - -set(simple_tests) - -# Test programs -add_executable(test_signed_tags ../placeholder.h) -target_sources(test_signed_tags PRIVATE test_signed_tags.c) -set_target_properties(test_signed_tags PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_signed_tags PRIVATE tiff tiff_port) -list(APPEND simple_tests test_signed_tags) - -add_executable(ascii_tag ../placeholder.h) -target_sources(ascii_tag PRIVATE ascii_tag.c) -set_target_properties(ascii_tag PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(ascii_tag PRIVATE tiff tiff_port) -list(APPEND simple_tests ascii_tag) - -add_executable(long_tag ../placeholder.h) -target_sources(long_tag PRIVATE long_tag.c check_tag.c) -set_target_properties(long_tag PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(long_tag PRIVATE tiff tiff_port) -list(APPEND simple_tests long_tag) - -add_executable(short_tag ../placeholder.h) -target_sources(short_tag PRIVATE short_tag.c check_tag.c) -set_target_properties(short_tag PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(short_tag PRIVATE tiff tiff_port) -list(APPEND simple_tests short_tag) - -add_executable(strip_rw ../placeholder.h) -target_sources(strip_rw PRIVATE strip_rw.c strip.c test_arrays.c test_arrays.h) -set_target_properties(strip_rw PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(strip_rw PRIVATE tiff tiff_port) -list(APPEND simple_tests strip_rw) - -add_executable(rewrite ../placeholder.h) -target_sources(rewrite PRIVATE rewrite_tag.c) -set_target_properties(rewrite PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(rewrite PRIVATE tiff tiff_port) -list(APPEND simple_tests rewrite) - -if(JPEG_SUPPORT) - add_executable(raw_decode ../placeholder.h) - target_sources(raw_decode PRIVATE raw_decode.c) - set_target_properties(raw_decode PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(raw_decode PRIVATE tiff tiff_port JPEG::JPEG) - list(APPEND simple_tests raw_decode) -endif() - -add_executable(custom_dir ../placeholder.h) -target_sources(custom_dir PRIVATE custom_dir.c) -set_target_properties(custom_dir PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(custom_dir PRIVATE tiff tiff_port) -list(APPEND simple_tests custom_dir) - -# Uses private functions from static library -if(NOT BUILD_SHARED_LIBS) - add_executable(rational_precision2double ../placeholder.h) - target_sources(rational_precision2double PRIVATE rational_precision2double.c) - set_target_properties(rational_precision2double PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(rational_precision2double PRIVATE tiff tiff_port) - list(APPEND simple_tests rational_precision2double) - - add_executable(test_write_read_tags ../placeholder.h) - target_sources(test_write_read_tags PRIVATE test_write_read_tags.c) - set_target_properties(test_write_read_tags PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(test_write_read_tags PRIVATE tiff) - list(APPEND simple_tests test_write_read_tags) - - add_executable(test_transferfunction_write_read ../placeholder.h) - target_sources(test_transferfunction_write_read PRIVATE test_transferfunction_write_read.c) - set_target_properties(test_transferfunction_write_read PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(test_transferfunction_write_read PRIVATE tiff) - list(APPEND simple_tests test_transferfunction_write_read) -endif() - -add_executable(custom_dir_EXIF_231 ../placeholder.h) -target_sources(custom_dir_EXIF_231 PRIVATE custom_dir_EXIF_231.c) -set_target_properties(custom_dir_EXIF_231 PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(custom_dir_EXIF_231 PRIVATE tiff tiff_port) -list(APPEND simple_tests custom_dir_EXIF_231) - -add_executable(defer_strile_loading ../placeholder.h) -target_sources(defer_strile_loading PRIVATE defer_strile_loading.c) -set_target_properties(defer_strile_loading PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(defer_strile_loading PRIVATE tiff tiff_port) -list(APPEND simple_tests defer_strile_loading) - -add_executable(defer_strile_writing ../placeholder.h) -target_sources(defer_strile_writing PRIVATE defer_strile_writing.c) -set_target_properties(defer_strile_writing PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(defer_strile_writing PRIVATE tiff tiff_port) -list(APPEND simple_tests defer_strile_writing) - -add_executable(test_directory ../placeholder.h) -target_sources(test_directory PRIVATE test_directory.c) -set_target_properties(test_directory PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_directory PRIVATE tiff tiff_port) -list(APPEND simple_tests test_directory) - -add_executable(test_IFD_enlargement ../placeholder.h) -target_sources(test_IFD_enlargement PRIVATE test_IFD_enlargement.c) -set_target_properties(test_IFD_enlargement PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_IFD_enlargement PRIVATE tiff tiff_port) -list(APPEND simple_tests test_IFD_enlargement) - -add_executable(testtypes ../placeholder.h) -target_sources(testtypes PRIVATE testtypes.c) -set_target_properties(testtypes PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(testtypes PRIVATE tiff tiff_port) -list(APPEND simple_tests testtypes) - -add_executable(test_open_options ../placeholder.h) -target_sources(test_open_options PRIVATE test_open_options.c) -set_target_properties(test_open_options PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_open_options PRIVATE tiff tiff_port) -list(APPEND simple_tests test_open_options) - -add_executable(test_append_to_strip ../placeholder.h) -target_sources(test_append_to_strip PRIVATE test_append_to_strip.c) -set_target_properties(test_append_to_strip PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_append_to_strip PRIVATE tiff tiff_port) -list(APPEND simple_tests test_append_to_strip) - -add_executable(test_ifd_loop_detection ../placeholder.h) -target_sources(test_ifd_loop_detection PRIVATE test_ifd_loop_detection.c) -set_target_properties(test_ifd_loop_detection PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_ifd_loop_detection PRIVATE tiff tiff_port) -target_compile_definitions(test_ifd_loop_detection PRIVATE SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\") -list(APPEND simple_tests test_ifd_loop_detection) - -add_executable(test_RGBAImage ../placeholder.h) -target_sources(test_RGBAImage PRIVATE test_RGBAImage.c) -set_target_properties(test_RGBAImage PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(test_RGBAImage PRIVATE tiff tiff_port) -target_compile_definitions(test_RGBAImage PRIVATE SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\") -list(APPEND simple_tests test_RGBAImage) - -if(WEBP_SUPPORT AND EMSCRIPTEN) - # Emscripten is pretty finnicky about linker flags. - # It needs --shared-memory if and only if atomics or bulk-memory is used. - foreach(target - ascii_tag - long_tag - short_tag - strip_rw - rewrite - custom_dir - defer_strile_loading - defer_strile_writing - ) - target_link_options(${target} PUBLIC "-Wl,--shared-memory") - endforeach() - if(JPEG_SUPPORT) - target_link_options(raw_decode PUBLIC "-Wl,--shared-memory") - endif() -endif() - -set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output") -file(MAKE_DIRECTORY "${TEST_OUTPUT}") - -set(tiff_test_extra_args "-DLIBTIFF=$") - -if(tiff-tools) - list(APPEND tiff_test_extra_args "-DTIFFCP=$") - list(APPEND tiff_test_extra_args "-DTIFFINFO=$") - list(APPEND tiff_test_extra_args "-DTIFFSPLIT=$") -endif() - -if(WIN32) - list(APPEND tiff_test_extra_args "-DWIN32=${WIN32}") -endif() -if(CYGWIN) - list(APPEND tiff_test_extra_args "-DCYGWIN=${CYGWIN}") -endif() - -function(tiff_test_convert name command1 command2 command3 infile outfile validate) - add_test(NAME "${name}" - COMMAND "${CMAKE_COMMAND}" - "-DCONVERT_COMMAND1=${command1}" - "-DCONVERT_COMMAND2=${command2}" - "-DCONVERT_COMMAND3=${command3}" - "-DINFILE=${infile}" - "-DOUTFILE=${outfile}" - "-DVALIDATE=${validate}" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") -endfunction() - -function(tiff_test_stdout name suffix command infile outfile) - if (suffix) - set(name "${name}-${suffix}") - endif() - add_test(NAME "${name}" - COMMAND "${CMAKE_COMMAND}" - "-DSTDOUT_COMMAND=${command}" - "-DINFILE=${infile}" - "-DOUTFILE=${outfile}" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") -endfunction() - -function(tiff_test_stdout_noargs name command) - add_test(NAME "${name}" - COMMAND "${CMAKE_COMMAND}" - "-DSTDOUT_COMMAND=$" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - set_tests_properties("${name}" PROPERTIES ENVIRONMENT - "srcdir=${CMAKE_CURRENT_SOURCE_DIR}") -endfunction() - -function(tiff_test_reader name command infile) - add_test(NAME "${name}" - COMMAND "${CMAKE_COMMAND}" - "-DREADER_COMMAND=${command}" - "-DINFILE=${infile}" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") -endfunction() - -function(add_convert_test_multi_out_in commandname1 commandname2 commandname3 - categoryname commandargs1 commandargs2 commandargs3 - image validate) - string(REPLACE " " "^" escaped_commandargs1 "${commandargs1}") - string(REPLACE " " "^" escaped_commandargs2 "${commandargs2}") - string(REPLACE " " "^" escaped_commandargs3 "${commandargs3}") - get_filename_component(name "${image}" NAME) - get_filename_component(base "${image}" NAME_WE) - set(testname "${commandname1}-${categoryname}-${base}") - if(commandname1) - set(command1 - "$^${escaped_commandargs1}") - else() - set(command1) - endif() - if(commandname2) - set(command2 - "$^${escaped_commandargs2}") - else() - set(command2) - endif() - if(commandname3) - set(command3 - "$^${escaped_commandargs3}") - else() - set(command3) - endif() - set(infile "${TEST_OUTPUT}/${image}") - set(outfile "${TEST_OUTPUT}/${commandname1}-${categoryname}-${base}.tiff") - tiff_test_convert("${testname}" "${command1}" "${command2}" "${command3}" - "${infile}" "${outfile}" "${validate}") -endfunction() - -function(add_convert_test_multi commandname1 commandname2 commandname3 - categoryname commandargs1 commandargs2 commandargs3 - image validate) - string(REPLACE " " "^" escaped_commandargs1 "${commandargs1}") - string(REPLACE " " "^" escaped_commandargs2 "${commandargs2}") - string(REPLACE " " "^" escaped_commandargs3 "${commandargs3}") - get_filename_component(name "${image}" NAME) - get_filename_component(base "${image}" NAME_WE) - set(testname "${commandname1}-${categoryname}-${base}") - if(commandname1) - set(command1 - "$^${escaped_commandargs1}") - else() - set(command1) - endif() - if(commandname2) - set(command2 - "$^${escaped_commandargs2}") - else() - set(command2) - endif() - if(commandname3) - set(command3 - "$^${escaped_commandargs3}") - else() - set(command3) - endif() - set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") - set(outfile "${TEST_OUTPUT}/${commandname1}-${categoryname}-${base}.tiff") - tiff_test_convert("${testname}" "${command1}" "${command2}" "${command3}" - "${infile}" "${outfile}" "${validate}") -endfunction() - -function(add_convert_test commandname - categoryname commandargs - image validate) - add_convert_test_multi("${commandname}" "" "" - "${categoryname}" "${commandargs}" "" "" - "${image}" "${validate}") -endfunction() - -function(add_convert_tests_multi commandname1 commandname2 commandname3 - categoryname - commandargs1 commandargs2 commandargs3 - images validate) - foreach(file ${${images}}) - add_convert_test_multi("${commandname1}" "${commandname2}" - "${commandname3}" "${categoryname}" - "${commandargs1}" "${commandargs2}" - "${commandargs3}" "${file}" "${validate}") - endforeach() -endfunction() - -function(add_convert_tests commandname categoryname commandargs images validate) - foreach(file ${${images}}) - add_convert_test("${commandname}" "${categoryname}" - "${commandargs}" "${file}" "${validate}") - endforeach() -endfunction() - -function(add_stdout_test commandname suffix commandargs image) - string(REPLACE " " "^" escaped_commandargs "${commandargs}") - get_filename_component(name "${image}" NAME) - get_filename_component(base "${image}" NAME_WE) - set(testname "${commandname}-${base}") - set(command "$^${escaped_commandargs}") - set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") - set(outfile "${TEST_OUTPUT}/${commandname}-${name}") - string(REGEX REPLACE "\\.tiff\$" "" name "${name}") - tiff_test_stdout("${testname}" "${suffix}" "${command}" "${infile}" "${outfile}") -endfunction() - -function(add_reader_test commandname commandargs image) - string(REPLACE " " "^" escaped_commandargs "${commandargs}") - get_filename_component(name "${image}" NAME) - get_filename_component(base "${image}" NAME_WE) - set(testname "${commandname}-${base}") - set(command "$^${escaped_commandargs}") - set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") - tiff_test_reader("${testname}" "${command}" "${infile}") -endfunction() - -# Plain executables with no arguments -foreach(target IN LISTS simple_tests) - tiff_test_stdout_noargs("${target}" "${target}") -endforeach() - -if(tiff-tools) - # PPM - add_convert_test(ppm2tiff miniswhite "" "images/miniswhite-1c-1b.pbm" TRUE) - add_convert_test(ppm2tiff minisblack "" "images/minisblack-1c-8b.pgm" TRUE) - add_convert_test(ppm2tiff rgb "" "images/rgb-3c-16b.ppm" TRUE) - add_convert_test(ppm2tiff rgb "" "images/rgb-3c-8b.ppm" TRUE) - - # tiffcp - # Reading / writing TIFF images with different encoding schemes. - add_convert_tests(tiffcp TIFFIMG "" TIFFIMAGES TRUE) - - # Convert some images to another coding scheme. - add_convert_test(tiffcp g3 "-c g3" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp g31d "-c g3:1d" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp g31dfill "-c g3:1d:fill" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp g32d "-c g3:2d" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp g32dfill "-c g3:2d:fill" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp g4 "-c g4" "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test_multi(tiffcp tiffcp "" logluv "-c none" "-c sgilog" "" - "images/logluv-3c-16b.tiff" FALSE) - add_convert_test_multi(tiffcp thumbnail "" thumbnail "-c g3:1d" "" "" - "images/miniswhite-1c-1b.tiff" FALSE) - add_convert_test(tiffcp none "-c none" "images/quad-lzw-compat.tiff" FALSE) - add_convert_test(tiffcp noner1 "-c none -r 1" "images/lzw-single-strip.tiff" FALSE) - add_convert_test(tiffcp float64_lzw_2_le "-c lzw:2" "images/test_float64_predictor2_le_lzw.tif" FALSE) - add_convert_test(tiffcp float64_lzw_2_be "-c lzw:2" "images/test_float64_predictor2_be_lzw.tif" FALSE) - - # Test for Group 3 fax 1d without EOL - add_convert_test(tiffcp testfax3_bug54_1dnoEOL "-c none" "images/testfax3_bug54_1dnoEOL.tif" TRUE) - - - if(WEBP_SUPPORT) - add_convert_test(tiffcp webp_lossless_rgba_alpha_fully_opaque "-c none" "images/webp_lossless_rgba_alpha_fully_opaque.tif" FALSE) - endif() - - add_convert_test(tiff2rgba 32BPP "-B 255 -n" "images/32bpp-None.tiff" TRUE) - if(JPEG_SUPPORT) - add_convert_test(tiffcp 32BPP-JPEG "-c jpeg" "images/32bpp-None-jpeg.tiff" TRUE) - endif() - - if(JBIG_SUPPORT) - add_convert_test(tiffcp jbig "-c jbig" "images/lzw-single-strip.tiff" TRUE) - endif() - - # Old-JPEG tests - #--- tiffcp does not support subsampled images, as the OldJPEG ones are --- - # ToDo: a test for OldJPEG is missing. - #add_convert_tests(test_tiffcp OldJPEG "" TIFFIMAGES_OJPEG TRUE) - - # tiffdump - add_reader_test(tiffdump "" "images/miniswhite-1c-1b.tiff") - - # tiffinfo - add_reader_test(tiffinfo "-c -D -d -j -s" "images/custom_dir_EXIF_GPS.tiff") - add_reader_test(tiffinfo "-c -D -d -j -s" "images/minisblack-1c-16b.tiff") - add_reader_test(tiffinfo " " "images/tiff_with_subifd_chain.tif") - - # tiffcp split/join - foreach(image ${UNCOMPRESSEDIMAGES}) - list(APPEND ESCAPED_UNCOMPRESSED "${CMAKE_CURRENT_SOURCE_DIR}/${image}") - endforeach() - string(REPLACE ";" "^" ESCAPED_UNCOMPRESSED "${ESCAPED_UNCOMPRESSED}") - add_test(NAME "tiffcp-split" - COMMAND "${CMAKE_COMMAND}" - "-DTESTFILES=${ESCAPED_UNCOMPRESSED}" - "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-conjoined.tiff" - "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-split-" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake") - add_test(NAME "tiffcp-split-join" - COMMAND "${CMAKE_COMMAND}" - "-DTESTFILES=${ESCAPED_UNCOMPRESSED}" - "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-join-conjoined.tiff" - "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-join-split-" - "-DRECONJOINED=${TEST_OUTPUT}/tiffcp-split-join-reconjoined.tiff" - ${tiff_test_extra_args} - -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake") - - # PDF - add_stdout_test(tiff2pdf "" "" "images/miniswhite-1c-1b.tiff" TRUE) - - # PS - add_stdout_test(tiff2ps "ps-1" "-a -p -1" "images/miniswhite-1c-1b.tiff" TRUE) - add_stdout_test(tiff2ps "ps-2" "-a -p -2" "images/miniswhite-1c-1b.tiff" TRUE) - add_stdout_test(tiff2ps "ps-3" "-a -p -3" "images/miniswhite-1c-1b.tiff" TRUE) - add_stdout_test(tiff2ps "eps-1" "-e -1" "images/miniswhite-1c-1b.tiff" TRUE) - - # BW - add_convert_tests(tiff2bw default "" RGBIMAGES TRUE) - - # RGBA - add_convert_tests(tiff2rgba default "" TIFFIMAGES TRUE) - # RGBA (old-jpeg) - add_convert_tests(tiff2rgba default "" TIFFIMAGES_OJPEG TRUE) - # Test rotations - add_convert_tests(tiffcrop R90 "-R90" TIFFIMAGES TRUE) - # Test flip (mirror) - add_convert_tests(tiffcrop doubleflip "-F both" TIFFIMAGES TRUE) - # Test extracting a section 60 pixels wide and 60 pixels high - add_convert_tests(tiffcrop extract "-U px -E top -X 60 -Y 60" TIFFIMAGES TRUE) - # Test extracting the first and fourth quarters from the left side. - add_convert_tests(tiffcrop extractz14 "-E left -Z1:4,2:4" TIFFIMAGES TRUE) -endif() diff --git a/third_party/libtiff/test/Makefile.am b/third_party/libtiff/test/Makefile.am deleted file mode 100644 index 909a79b..0000000 --- a/third_party/libtiff/test/Makefile.am +++ /dev/null @@ -1,451 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -AUTOMAKE_OPTIONS = 1.11 color-tests parallel-tests foreign - -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -# Environment parameters to be used during tests -TESTS_ENVIRONMENT = \ - MAKE="$(MAKE)" \ - MAKEFLAGS="$(MAKEFLAGS)" \ - MEMCHECK="$(MEMCHECK)" - -EXTRA_DIST = \ - $(REFFILES) \ - $(TESTSCRIPTS) \ - $(IMAGES_EXTRA_DIST) \ - CMakeLists.txt \ - common.sh \ - TiffSplitTest.cmake \ - TiffTestCommon.cmake \ - TiffTest.cmake - -# All of the tests to execute via 'make check' -if TIFF_TESTS -TESTS = $(check_PROGRAMS) $(TESTSCRIPTS_TO_RUN) -endif - -# Tests which are expected to fail -XFAIL_TESTS = - -# Extra files which should be cleaned by 'make clean' -CLEANFILES = test_packbits.tif o-* - -JPEG_DEPENDENT_TESTSCRIPTS=\ - tiff2rgba-quad-tile.jpg.sh \ - tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ - tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ - tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh \ - tiff2rgba-32bpp-None-jpeg.sh \ - tiffcp-32bpp-None-jpeg.sh \ - tiffcrop-32bpp-None-jpeg.sh - -if HAVE_JPEG -if TIFF_TOOLS -JPEG_DEPENDENT_CHECK_PROG=raw_decode -JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN=$(JPEG_DEPENDENT_TESTSCRIPTS) -endif -else -JPEG_DEPENDENT_CHECK_PROG= -JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN= -endif - -JBIG_DEPENDENT_TESTSCRIPTS=\ - tiffcp-lzw-single-strip-jbig.sh - -if HAVE_JBIG -if TIFF_TOOLS -JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN=$(JBIG_DEPENDENT_TESTSCRIPTS) -endif -else -JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN= -endif - -if BUILD_STATIC -STATIC_CHECK_PROGS=rational_precision2double test_write_read_tags test_transferfunction_write_read -endif - -# Executable programs which need to be built in order to support tests -if TIFF_TESTS -check_PROGRAMS = \ - ascii_tag long_tag short_tag strip_rw rewrite custom_dir custom_dir_EXIF_231 \ - defer_strile_loading defer_strile_writing test_directory test_IFD_enlargement test_open_options \ - test_append_to_strip test_ifd_loop_detection test_RGBAImage testtypes test_signed_tags $(JPEG_DEPENDENT_CHECK_PROG) $(STATIC_CHECK_PROGS) -endif - -# Test scripts to execute -BASE_TESTSCRIPTS = \ - ppm2tiff_pbm.sh \ - ppm2tiff_pgm.sh \ - ppm2tiff_ppm.sh \ - fax2tiff.sh \ - tiffcp-g3.sh \ - tiffcp-g3-1d.sh \ - tiffcp-g3-1d-fill.sh \ - tiffcp-g3-2d.sh \ - tiffcp-g3-2d-fill.sh \ - tiffcp-g4.sh \ - tiffcp-logluv.sh \ - tiffcp-thumbnail.sh \ - tiffcp-lzw-compat.sh \ - tiffcp-lzw-scanline-decode.sh \ - tiffdump.sh \ - tiffinfo.sh \ - tiffcp-split.sh \ - tiffcp-split-join.sh \ - tiff2ps-PS1.sh \ - tiff2ps-PS2.sh \ - tiff2ps-PS3.sh \ - tiff2ps-EPS1.sh \ - tiff2pdf.sh \ - tiffcrop-doubleflip-logluv-3c-16b.sh \ - tiffcrop-doubleflip-minisblack-1c-16b.sh \ - tiffcrop-doubleflip-minisblack-1c-8b.sh \ - tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \ - tiffcrop-doubleflip-miniswhite-1c-1b.sh \ - tiffcrop-doubleflip-palette-1c-1b.sh \ - tiffcrop-doubleflip-palette-1c-4b.sh \ - tiffcrop-doubleflip-palette-1c-8b.sh \ - tiffcrop-doubleflip-rgb-3c-16b.sh \ - tiffcrop-doubleflip-rgb-3c-8b.sh \ - tiffcrop-extract-logluv-3c-16b.sh \ - tiffcrop-extract-minisblack-1c-16b.sh \ - tiffcrop-extract-minisblack-1c-8b.sh \ - tiffcrop-extract-minisblack-2c-8b-alpha.sh \ - tiffcrop-extract-miniswhite-1c-1b.sh \ - tiffcrop-extract-palette-1c-1b.sh \ - tiffcrop-extract-palette-1c-4b.sh \ - tiffcrop-extract-palette-1c-8b.sh \ - tiffcrop-extract-rgb-3c-16b.sh \ - tiffcrop-extract-rgb-3c-8b.sh \ - tiffcrop-extractz14-logluv-3c-16b.sh \ - tiffcrop-extractz14-minisblack-1c-16b.sh \ - tiffcrop-extractz14-minisblack-1c-8b.sh \ - tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \ - tiffcrop-extractz14-miniswhite-1c-1b.sh \ - tiffcrop-extractz14-palette-1c-1b.sh \ - tiffcrop-extractz14-palette-1c-4b.sh \ - tiffcrop-extractz14-palette-1c-8b.sh \ - tiffcrop-extractz14-rgb-3c-16b.sh \ - tiffcrop-extractz14-rgb-3c-8b.sh \ - tiffcrop-R90-logluv-3c-16b.sh \ - tiffcrop-R90-minisblack-1c-16b.sh \ - tiffcrop-R90-minisblack-1c-8b.sh \ - tiffcrop-R90-minisblack-2c-8b-alpha.sh \ - tiffcrop-R90-miniswhite-1c-1b.sh \ - tiffcrop-R90-palette-1c-1b.sh \ - tiffcrop-R90-palette-1c-4b.sh \ - tiffcrop-R90-palette-1c-8b.sh \ - tiffcrop-R90-rgb-3c-16b.sh \ - tiffcrop-R90-rgb-3c-8b.sh \ - tiff2bw-palette-1c-8b.sh \ - tiff2bw-quad-lzw-compat.sh \ - tiff2bw-rgb-3c-8b.sh \ - tiff2rgba-logluv-3c-16b.sh \ - tiff2rgba-minisblack-1c-16b.sh \ - tiff2rgba-minisblack-1c-8b.sh \ - tiff2rgba-minisblack-2c-8b-alpha.sh \ - tiff2rgba-miniswhite-1c-1b.sh \ - tiff2rgba-palette-1c-1b.sh \ - tiff2rgba-palette-1c-4b.sh \ - tiff2rgba-palette-1c-8b.sh \ - tiff2rgba-rgb-3c-16b.sh \ - tiff2rgba-rgb-3c-8b.sh \ - testfax4.sh \ - testfax3_bug_513.sh \ - testfax3_bug54_1dnoEOL.sh \ - testdeflatelaststripextradata.sh - -TESTSCRIPTS =$(BASE_TESTSCRIPTS) \ - $(JPEG_DEPENDENT_TESTSCRIPTS) \ - $(JBIG_DEPENDENT_TESTSCRIPTS) - -if TIFF_TOOLS -TESTSCRIPTS_TO_RUN=$(BASE_TESTSCRIPTS) \ - $(JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN) \ - $(JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN) -else -TESTSCRIPTS_TO_RUN= -endif - -# This list should contain the references files -# from the 'refs' subdirectory -REFFILES = \ - refs/o-tiff2ps-EPS1.ps \ - refs/o-tiff2ps-PS1.ps \ - refs/o-tiff2ps-PS2.ps \ - refs/o-tiff2ps-PS3.ps \ - refs/o-testfax4.tiff \ - refs/o-testfax3_bug_513.tiff \ - refs/o-testfax3_bug54_1dnoEOL.tiff \ - refs/o-deflate-last-strip-extra-data.tiff - -# This list should contain all of the TIFF files in the 'images' -# subdirectory which are intended to be used as input images for -# tests. All of these files should use the extension ".tiff". -TIFFIMAGES = \ - images/logluv-3c-16b.tiff \ - images/minisblack-1c-16b.tiff \ - images/minisblack-1c-8b.tiff \ - images/minisblack-2c-8b-alpha.tiff \ - images/miniswhite-1c-1b.tiff \ - images/palette-1c-1b.tiff \ - images/palette-1c-4b.tiff \ - images/palette-1c-8b.tiff \ - images/rgb-3c-16b.tiff \ - images/rgb-3c-8b.tiff \ - images/quad-tile.jpg.tiff \ - images/quad-lzw-compat.tiff \ - images/lzw-single-strip.tiff \ - images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ - images/ojpeg_chewey_subsamp21_multi_strip.tiff \ - images/ojpeg_single_strip_no_rowsperstrip.tiff \ - images/testfax4.tiff \ - images/deflate-last-strip-extra-data.tiff \ - images/custom_dir_EXIF_GPS.tiff \ - images/testfax3_bug_513.tiff \ - images/32bpp-None.tiff - -PNMIMAGES = \ - images/minisblack-1c-8b.pgm \ - images/miniswhite-1c-1b.pbm \ - images/rgb-3c-16b.ppm \ - images/rgb-3c-8b.ppm - -# This list should include all of the files in the 'images' -# subdirectory which are intended to be distributed. This may include -# files which are not currently used by the tests. -IMAGES_EXTRA_DIST = \ - images/README.txt \ - images/miniswhite-1c-1b.g3 \ - images/test_float64_predictor2_le_lzw.tif \ - images/test_float64_predictor2_be_lzw.tif \ - images/tiff_with_subifd_chain.tif \ - images/test_ifd_loop_to_self.tif \ - images/test_ifd_loop_to_first.tif \ - images/test_two_ifds.tif \ - images/test_ifd_loop_subifd.tif \ - images/webp_lossless_rgba_alpha_fully_opaque.tif \ - images/32bpp-None-jpeg.tiff \ - images/testfax3_bug54_1dnoEOL.tif \ - $(PNMIMAGES) \ - $(TIFFIMAGES) - -noinst_HEADERS = tifftest.h - -test_signed_tags_SOURCES = test_signed_tags.c -test_signed_tags_LDADD = $(LIBTIFF) -ascii_tag_SOURCES = ascii_tag.c -ascii_tag_LDADD = $(LIBTIFF) -long_tag_SOURCES = long_tag.c check_tag.c -long_tag_LDADD = $(LIBTIFF) -short_tag_SOURCES = short_tag.c check_tag.c -short_tag_LDADD = $(LIBTIFF) -strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h -strip_rw_LDADD = $(LIBTIFF) -rewrite_SOURCES = rewrite_tag.c -rewrite_LDADD = $(LIBTIFF) -raw_decode_SOURCES = raw_decode.c -raw_decode_LDADD = $(LIBTIFF) -custom_dir_SOURCES = custom_dir.c -custom_dir_LDADD = $(LIBTIFF) - -if BUILD_STATIC -rational_precision2double_SOURCES = rational_precision2double.c -rational_precision2double_LDADD = $(LIBTIFF) -rational_precision2double_LDFLAGS = -static - -test_write_read_tags_SOURCES = test_write_read_tags.c -test_write_read_tags_LDADD = $(LIBTIFF) -test_write_read_tags_LDFLAGS = -static - -test_transferfunction_write_read_SOURCES = test_transferfunction_write_read.c -test_transferfunction_write_read_LDADD = $(LIBTIFF) -test_transferfunction_write_read_LDFLAGS = -static -endif - -custom_dir_EXIF_231_SOURCES = custom_dir_EXIF_231.c -custom_dir_EXIF_231_LDADD = $(LIBTIFF) -defer_strile_loading_SOURCES = defer_strile_loading.c -defer_strile_loading_LDADD = $(LIBTIFF) -defer_strile_writing_SOURCES = defer_strile_writing.c -defer_strile_writing_LDADD = $(LIBTIFF) -test_directory_SOURCES = test_directory.c -test_directory_LDADD = $(LIBTIFF) -test_IFD_enlargement_SOURCES = test_IFD_enlargement.c -test_IFD_enlargement_LDADD = $(LIBTIFF) -test_open_options_SOURCES = test_open_options.c -test_open_options_LDADD = $(LIBTIFF) -test_append_to_strip_SOURCES = test_append_to_strip.c -test_append_to_strip_LDADD = $(LIBTIFF) -test_ifd_loop_detection_CFLAGS = -DSOURCE_DIR=\"@srcdir@\" -test_ifd_loop_detection_SOURCES = test_ifd_loop_detection.c -test_ifd_loop_detection_LDADD = $(LIBTIFF) -test_RGBAImage_SOURCES = test_RGBAImage.c -test_RGBAImage_LDADD = $(LIBTIFF) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff - -# memcheck: valgrind's memory access checker. -# -# The suppressions which come with valgrind are sometimes insufficient -# to handle certain system library aspects which may be reported and -# which are unrelated to libtiff. When first starting with a new -# system (or after a major system update), it is good to execute the -# test suite (known to already be passing!) like 'make memcheck -# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind -# suppression entries in the test log. Make sure that none of the -# suppressions are due to libtiff itself. Tell valgrind about the -# suppressions by creating a .valgrindrc file with content like: -# --memcheck:suppressions=mysupp.supp -memcheck: - $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ - --error-exitcode=2 --track-origins=yes --num-callers=12 \ - --quiet $(VALGRIND_EXTRA_OPTS)' check - -# ptrcheck: valgrind's experimental pointer checking tool. -ptrcheck: - $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check - -# tiff2bw is pretty lame so currently only the generated scripts -# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and -# tiff2bw-rgb-3c-8b.sh pass tests. -generate-tiff2bw-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiff2bw-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -generate-tiff2rgba-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiff2rgba-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test rotations -generate-tiffcrop-R90-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test flip (mirror) -generate-tiffcrop-doubleflip-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test extracting a section 100 pixels wide and 100 pixels high -generate-tiffcrop-extract-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test extracting the first and fourth quarters from the left side. -generate-tiffcrop-extractz14-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -generate-tiffcrop-tests: \ - generate-tiffcrop-R90-tests \ - generate-tiffcrop-doubleflip-tests \ - generate-tiffcrop-extract-tests \ - generate-tiffcrop-extractz14-tests - -generate-tests: \ - generate-tiff2bw-tests \ - generate-tiff2rgba-tests \ - generate-tiffcrop-tests diff --git a/third_party/libtiff/test/Makefile.in b/third_party/libtiff/test/Makefile.in deleted file mode 100644 index 203fdda..0000000 --- a/third_party/libtiff/test/Makefile.in +++ /dev/null @@ -1,2490 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@TIFF_TESTS_TRUE@TESTS = $(check_PROGRAMS) $(am__EXEEXT_5) -XFAIL_TESTS = -@TIFF_TESTS_TRUE@check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \ -@TIFF_TESTS_TRUE@ short_tag$(EXEEXT) strip_rw$(EXEEXT) \ -@TIFF_TESTS_TRUE@ rewrite$(EXEEXT) custom_dir$(EXEEXT) \ -@TIFF_TESTS_TRUE@ custom_dir_EXIF_231$(EXEEXT) \ -@TIFF_TESTS_TRUE@ defer_strile_loading$(EXEEXT) \ -@TIFF_TESTS_TRUE@ defer_strile_writing$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_directory$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_IFD_enlargement$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_open_options$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_append_to_strip$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_ifd_loop_detection$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_RGBAImage$(EXEEXT) testtypes$(EXEEXT) \ -@TIFF_TESTS_TRUE@ test_signed_tags$(EXEEXT) $(am__EXEEXT_1) \ -@TIFF_TESTS_TRUE@ $(am__EXEEXT_2) -subdir = test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ - $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@HAVE_JPEG_TRUE@@TIFF_TOOLS_TRUE@am__EXEEXT_1 = raw_decode$(EXEEXT) -@BUILD_STATIC_TRUE@am__EXEEXT_2 = rational_precision2double$(EXEEXT) \ -@BUILD_STATIC_TRUE@ test_write_read_tags$(EXEEXT) \ -@BUILD_STATIC_TRUE@ test_transferfunction_write_read$(EXEEXT) -am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT) -ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS) -ascii_tag_DEPENDENCIES = $(LIBTIFF) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -am_custom_dir_OBJECTS = custom_dir.$(OBJEXT) -custom_dir_OBJECTS = $(am_custom_dir_OBJECTS) -custom_dir_DEPENDENCIES = $(LIBTIFF) -am_custom_dir_EXIF_231_OBJECTS = custom_dir_EXIF_231.$(OBJEXT) -custom_dir_EXIF_231_OBJECTS = $(am_custom_dir_EXIF_231_OBJECTS) -custom_dir_EXIF_231_DEPENDENCIES = $(LIBTIFF) -am_defer_strile_loading_OBJECTS = defer_strile_loading.$(OBJEXT) -defer_strile_loading_OBJECTS = $(am_defer_strile_loading_OBJECTS) -defer_strile_loading_DEPENDENCIES = $(LIBTIFF) -am_defer_strile_writing_OBJECTS = defer_strile_writing.$(OBJEXT) -defer_strile_writing_OBJECTS = $(am_defer_strile_writing_OBJECTS) -defer_strile_writing_DEPENDENCIES = $(LIBTIFF) -am_long_tag_OBJECTS = long_tag.$(OBJEXT) check_tag.$(OBJEXT) -long_tag_OBJECTS = $(am_long_tag_OBJECTS) -long_tag_DEPENDENCIES = $(LIBTIFF) -am__rational_precision2double_SOURCES_DIST = \ - rational_precision2double.c -@BUILD_STATIC_TRUE@am_rational_precision2double_OBJECTS = \ -@BUILD_STATIC_TRUE@ rational_precision2double.$(OBJEXT) -rational_precision2double_OBJECTS = \ - $(am_rational_precision2double_OBJECTS) -@BUILD_STATIC_TRUE@rational_precision2double_DEPENDENCIES = \ -@BUILD_STATIC_TRUE@ $(LIBTIFF) -rational_precision2double_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(rational_precision2double_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_raw_decode_OBJECTS = raw_decode.$(OBJEXT) -raw_decode_OBJECTS = $(am_raw_decode_OBJECTS) -raw_decode_DEPENDENCIES = $(LIBTIFF) -am_rewrite_OBJECTS = rewrite_tag.$(OBJEXT) -rewrite_OBJECTS = $(am_rewrite_OBJECTS) -rewrite_DEPENDENCIES = $(LIBTIFF) -am_short_tag_OBJECTS = short_tag.$(OBJEXT) check_tag.$(OBJEXT) -short_tag_OBJECTS = $(am_short_tag_OBJECTS) -short_tag_DEPENDENCIES = $(LIBTIFF) -am_strip_rw_OBJECTS = strip_rw.$(OBJEXT) strip.$(OBJEXT) \ - test_arrays.$(OBJEXT) -strip_rw_OBJECTS = $(am_strip_rw_OBJECTS) -strip_rw_DEPENDENCIES = $(LIBTIFF) -am_test_IFD_enlargement_OBJECTS = test_IFD_enlargement.$(OBJEXT) -test_IFD_enlargement_OBJECTS = $(am_test_IFD_enlargement_OBJECTS) -test_IFD_enlargement_DEPENDENCIES = $(LIBTIFF) -am_test_RGBAImage_OBJECTS = test_RGBAImage.$(OBJEXT) -test_RGBAImage_OBJECTS = $(am_test_RGBAImage_OBJECTS) -test_RGBAImage_DEPENDENCIES = $(LIBTIFF) -am_test_append_to_strip_OBJECTS = test_append_to_strip.$(OBJEXT) -test_append_to_strip_OBJECTS = $(am_test_append_to_strip_OBJECTS) -test_append_to_strip_DEPENDENCIES = $(LIBTIFF) -am_test_directory_OBJECTS = test_directory.$(OBJEXT) -test_directory_OBJECTS = $(am_test_directory_OBJECTS) -test_directory_DEPENDENCIES = $(LIBTIFF) -am_test_ifd_loop_detection_OBJECTS = \ - test_ifd_loop_detection-test_ifd_loop_detection.$(OBJEXT) -test_ifd_loop_detection_OBJECTS = \ - $(am_test_ifd_loop_detection_OBJECTS) -test_ifd_loop_detection_DEPENDENCIES = $(LIBTIFF) -test_ifd_loop_detection_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(test_ifd_loop_detection_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_test_open_options_OBJECTS = test_open_options.$(OBJEXT) -test_open_options_OBJECTS = $(am_test_open_options_OBJECTS) -test_open_options_DEPENDENCIES = $(LIBTIFF) -am_test_signed_tags_OBJECTS = test_signed_tags.$(OBJEXT) -test_signed_tags_OBJECTS = $(am_test_signed_tags_OBJECTS) -test_signed_tags_DEPENDENCIES = $(LIBTIFF) -am__test_transferfunction_write_read_SOURCES_DIST = \ - test_transferfunction_write_read.c -@BUILD_STATIC_TRUE@am_test_transferfunction_write_read_OBJECTS = \ -@BUILD_STATIC_TRUE@ test_transferfunction_write_read.$(OBJEXT) -test_transferfunction_write_read_OBJECTS = \ - $(am_test_transferfunction_write_read_OBJECTS) -@BUILD_STATIC_TRUE@test_transferfunction_write_read_DEPENDENCIES = \ -@BUILD_STATIC_TRUE@ $(LIBTIFF) -test_transferfunction_write_read_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) \ - $(test_transferfunction_write_read_LDFLAGS) $(LDFLAGS) -o $@ -am__test_write_read_tags_SOURCES_DIST = test_write_read_tags.c -@BUILD_STATIC_TRUE@am_test_write_read_tags_OBJECTS = \ -@BUILD_STATIC_TRUE@ test_write_read_tags.$(OBJEXT) -test_write_read_tags_OBJECTS = $(am_test_write_read_tags_OBJECTS) -@BUILD_STATIC_TRUE@test_write_read_tags_DEPENDENCIES = $(LIBTIFF) -test_write_read_tags_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(test_write_read_tags_LDFLAGS) \ - $(LDFLAGS) -o $@ -testtypes_SOURCES = testtypes.c -testtypes_OBJECTS = testtypes.$(OBJEXT) -testtypes_LDADD = $(LDADD) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/ascii_tag.Po \ - ./$(DEPDIR)/check_tag.Po ./$(DEPDIR)/custom_dir.Po \ - ./$(DEPDIR)/custom_dir_EXIF_231.Po \ - ./$(DEPDIR)/defer_strile_loading.Po \ - ./$(DEPDIR)/defer_strile_writing.Po ./$(DEPDIR)/long_tag.Po \ - ./$(DEPDIR)/rational_precision2double.Po \ - ./$(DEPDIR)/raw_decode.Po ./$(DEPDIR)/rewrite_tag.Po \ - ./$(DEPDIR)/short_tag.Po ./$(DEPDIR)/strip.Po \ - ./$(DEPDIR)/strip_rw.Po ./$(DEPDIR)/test_IFD_enlargement.Po \ - ./$(DEPDIR)/test_RGBAImage.Po \ - ./$(DEPDIR)/test_append_to_strip.Po ./$(DEPDIR)/test_arrays.Po \ - ./$(DEPDIR)/test_directory.Po \ - ./$(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po \ - ./$(DEPDIR)/test_open_options.Po \ - ./$(DEPDIR)/test_signed_tags.Po \ - ./$(DEPDIR)/test_transferfunction_write_read.Po \ - ./$(DEPDIR)/test_write_read_tags.Po ./$(DEPDIR)/testtypes.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \ - $(custom_dir_EXIF_231_SOURCES) $(defer_strile_loading_SOURCES) \ - $(defer_strile_writing_SOURCES) $(long_tag_SOURCES) \ - $(rational_precision2double_SOURCES) $(raw_decode_SOURCES) \ - $(rewrite_SOURCES) $(short_tag_SOURCES) $(strip_rw_SOURCES) \ - $(test_IFD_enlargement_SOURCES) $(test_RGBAImage_SOURCES) \ - $(test_append_to_strip_SOURCES) $(test_directory_SOURCES) \ - $(test_ifd_loop_detection_SOURCES) \ - $(test_open_options_SOURCES) $(test_signed_tags_SOURCES) \ - $(test_transferfunction_write_read_SOURCES) \ - $(test_write_read_tags_SOURCES) testtypes.c -DIST_SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \ - $(custom_dir_EXIF_231_SOURCES) $(defer_strile_loading_SOURCES) \ - $(defer_strile_writing_SOURCES) $(long_tag_SOURCES) \ - $(am__rational_precision2double_SOURCES_DIST) \ - $(raw_decode_SOURCES) $(rewrite_SOURCES) $(short_tag_SOURCES) \ - $(strip_rw_SOURCES) $(test_IFD_enlargement_SOURCES) \ - $(test_RGBAImage_SOURCES) $(test_append_to_strip_SOURCES) \ - $(test_directory_SOURCES) $(test_ifd_loop_detection_SOURCES) \ - $(test_open_options_SOURCES) $(test_signed_tags_SOURCES) \ - $(am__test_transferfunction_write_read_SOURCES_DIST) \ - $(am__test_write_read_tags_SOURCES_DIST) testtypes.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -HEADERS = $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - mgn=''; \ - brg=''; \ - std=''; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -@HAVE_JPEG_TRUE@@TIFF_TOOLS_TRUE@am__EXEEXT_3 = $(JPEG_DEPENDENT_TESTSCRIPTS) -@HAVE_JBIG_TRUE@@TIFF_TOOLS_TRUE@am__EXEEXT_4 = $(JBIG_DEPENDENT_TESTSCRIPTS) -@TIFF_TOOLS_TRUE@am__EXEEXT_5 = $(BASE_TESTSCRIPTS) $(am__EXEEXT_3) \ -@TIFF_TOOLS_TRUE@ $(am__EXEEXT_4) -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.11 color-tests parallel-tests foreign -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -# Environment parameters to be used during tests -TESTS_ENVIRONMENT = \ - MAKE="$(MAKE)" \ - MAKEFLAGS="$(MAKEFLAGS)" \ - MEMCHECK="$(MEMCHECK)" - -EXTRA_DIST = \ - $(REFFILES) \ - $(TESTSCRIPTS) \ - $(IMAGES_EXTRA_DIST) \ - CMakeLists.txt \ - common.sh \ - TiffSplitTest.cmake \ - TiffTestCommon.cmake \ - TiffTest.cmake - - -# Extra files which should be cleaned by 'make clean' -CLEANFILES = test_packbits.tif o-* -JPEG_DEPENDENT_TESTSCRIPTS = \ - tiff2rgba-quad-tile.jpg.sh \ - tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ - tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ - tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh \ - tiff2rgba-32bpp-None-jpeg.sh \ - tiffcp-32bpp-None-jpeg.sh \ - tiffcrop-32bpp-None-jpeg.sh - -@HAVE_JPEG_FALSE@JPEG_DEPENDENT_CHECK_PROG = -@HAVE_JPEG_TRUE@@TIFF_TOOLS_TRUE@JPEG_DEPENDENT_CHECK_PROG = raw_decode -@HAVE_JPEG_FALSE@JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN = -@HAVE_JPEG_TRUE@@TIFF_TOOLS_TRUE@JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN = $(JPEG_DEPENDENT_TESTSCRIPTS) -JBIG_DEPENDENT_TESTSCRIPTS = \ - tiffcp-lzw-single-strip-jbig.sh - -@HAVE_JBIG_FALSE@JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN = -@HAVE_JBIG_TRUE@@TIFF_TOOLS_TRUE@JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN = $(JBIG_DEPENDENT_TESTSCRIPTS) -@BUILD_STATIC_TRUE@STATIC_CHECK_PROGS = rational_precision2double test_write_read_tags test_transferfunction_write_read - -# Test scripts to execute -BASE_TESTSCRIPTS = \ - ppm2tiff_pbm.sh \ - ppm2tiff_pgm.sh \ - ppm2tiff_ppm.sh \ - fax2tiff.sh \ - tiffcp-g3.sh \ - tiffcp-g3-1d.sh \ - tiffcp-g3-1d-fill.sh \ - tiffcp-g3-2d.sh \ - tiffcp-g3-2d-fill.sh \ - tiffcp-g4.sh \ - tiffcp-logluv.sh \ - tiffcp-thumbnail.sh \ - tiffcp-lzw-compat.sh \ - tiffcp-lzw-scanline-decode.sh \ - tiffdump.sh \ - tiffinfo.sh \ - tiffcp-split.sh \ - tiffcp-split-join.sh \ - tiff2ps-PS1.sh \ - tiff2ps-PS2.sh \ - tiff2ps-PS3.sh \ - tiff2ps-EPS1.sh \ - tiff2pdf.sh \ - tiffcrop-doubleflip-logluv-3c-16b.sh \ - tiffcrop-doubleflip-minisblack-1c-16b.sh \ - tiffcrop-doubleflip-minisblack-1c-8b.sh \ - tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \ - tiffcrop-doubleflip-miniswhite-1c-1b.sh \ - tiffcrop-doubleflip-palette-1c-1b.sh \ - tiffcrop-doubleflip-palette-1c-4b.sh \ - tiffcrop-doubleflip-palette-1c-8b.sh \ - tiffcrop-doubleflip-rgb-3c-16b.sh \ - tiffcrop-doubleflip-rgb-3c-8b.sh \ - tiffcrop-extract-logluv-3c-16b.sh \ - tiffcrop-extract-minisblack-1c-16b.sh \ - tiffcrop-extract-minisblack-1c-8b.sh \ - tiffcrop-extract-minisblack-2c-8b-alpha.sh \ - tiffcrop-extract-miniswhite-1c-1b.sh \ - tiffcrop-extract-palette-1c-1b.sh \ - tiffcrop-extract-palette-1c-4b.sh \ - tiffcrop-extract-palette-1c-8b.sh \ - tiffcrop-extract-rgb-3c-16b.sh \ - tiffcrop-extract-rgb-3c-8b.sh \ - tiffcrop-extractz14-logluv-3c-16b.sh \ - tiffcrop-extractz14-minisblack-1c-16b.sh \ - tiffcrop-extractz14-minisblack-1c-8b.sh \ - tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \ - tiffcrop-extractz14-miniswhite-1c-1b.sh \ - tiffcrop-extractz14-palette-1c-1b.sh \ - tiffcrop-extractz14-palette-1c-4b.sh \ - tiffcrop-extractz14-palette-1c-8b.sh \ - tiffcrop-extractz14-rgb-3c-16b.sh \ - tiffcrop-extractz14-rgb-3c-8b.sh \ - tiffcrop-R90-logluv-3c-16b.sh \ - tiffcrop-R90-minisblack-1c-16b.sh \ - tiffcrop-R90-minisblack-1c-8b.sh \ - tiffcrop-R90-minisblack-2c-8b-alpha.sh \ - tiffcrop-R90-miniswhite-1c-1b.sh \ - tiffcrop-R90-palette-1c-1b.sh \ - tiffcrop-R90-palette-1c-4b.sh \ - tiffcrop-R90-palette-1c-8b.sh \ - tiffcrop-R90-rgb-3c-16b.sh \ - tiffcrop-R90-rgb-3c-8b.sh \ - tiff2bw-palette-1c-8b.sh \ - tiff2bw-quad-lzw-compat.sh \ - tiff2bw-rgb-3c-8b.sh \ - tiff2rgba-logluv-3c-16b.sh \ - tiff2rgba-minisblack-1c-16b.sh \ - tiff2rgba-minisblack-1c-8b.sh \ - tiff2rgba-minisblack-2c-8b-alpha.sh \ - tiff2rgba-miniswhite-1c-1b.sh \ - tiff2rgba-palette-1c-1b.sh \ - tiff2rgba-palette-1c-4b.sh \ - tiff2rgba-palette-1c-8b.sh \ - tiff2rgba-rgb-3c-16b.sh \ - tiff2rgba-rgb-3c-8b.sh \ - testfax4.sh \ - testfax3_bug_513.sh \ - testfax3_bug54_1dnoEOL.sh \ - testdeflatelaststripextradata.sh - -TESTSCRIPTS = $(BASE_TESTSCRIPTS) \ - $(JPEG_DEPENDENT_TESTSCRIPTS) \ - $(JBIG_DEPENDENT_TESTSCRIPTS) - -@TIFF_TOOLS_FALSE@TESTSCRIPTS_TO_RUN = -@TIFF_TOOLS_TRUE@TESTSCRIPTS_TO_RUN = $(BASE_TESTSCRIPTS) \ -@TIFF_TOOLS_TRUE@ $(JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN) \ -@TIFF_TOOLS_TRUE@ $(JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN) - - -# This list should contain the references files -# from the 'refs' subdirectory -REFFILES = \ - refs/o-tiff2ps-EPS1.ps \ - refs/o-tiff2ps-PS1.ps \ - refs/o-tiff2ps-PS2.ps \ - refs/o-tiff2ps-PS3.ps \ - refs/o-testfax4.tiff \ - refs/o-testfax3_bug_513.tiff \ - refs/o-testfax3_bug54_1dnoEOL.tiff \ - refs/o-deflate-last-strip-extra-data.tiff - - -# This list should contain all of the TIFF files in the 'images' -# subdirectory which are intended to be used as input images for -# tests. All of these files should use the extension ".tiff". -TIFFIMAGES = \ - images/logluv-3c-16b.tiff \ - images/minisblack-1c-16b.tiff \ - images/minisblack-1c-8b.tiff \ - images/minisblack-2c-8b-alpha.tiff \ - images/miniswhite-1c-1b.tiff \ - images/palette-1c-1b.tiff \ - images/palette-1c-4b.tiff \ - images/palette-1c-8b.tiff \ - images/rgb-3c-16b.tiff \ - images/rgb-3c-8b.tiff \ - images/quad-tile.jpg.tiff \ - images/quad-lzw-compat.tiff \ - images/lzw-single-strip.tiff \ - images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ - images/ojpeg_chewey_subsamp21_multi_strip.tiff \ - images/ojpeg_single_strip_no_rowsperstrip.tiff \ - images/testfax4.tiff \ - images/deflate-last-strip-extra-data.tiff \ - images/custom_dir_EXIF_GPS.tiff \ - images/testfax3_bug_513.tiff \ - images/32bpp-None.tiff - -PNMIMAGES = \ - images/minisblack-1c-8b.pgm \ - images/miniswhite-1c-1b.pbm \ - images/rgb-3c-16b.ppm \ - images/rgb-3c-8b.ppm - - -# This list should include all of the files in the 'images' -# subdirectory which are intended to be distributed. This may include -# files which are not currently used by the tests. -IMAGES_EXTRA_DIST = \ - images/README.txt \ - images/miniswhite-1c-1b.g3 \ - images/test_float64_predictor2_le_lzw.tif \ - images/test_float64_predictor2_be_lzw.tif \ - images/tiff_with_subifd_chain.tif \ - images/test_ifd_loop_to_self.tif \ - images/test_ifd_loop_to_first.tif \ - images/test_two_ifds.tif \ - images/test_ifd_loop_subifd.tif \ - images/webp_lossless_rgba_alpha_fully_opaque.tif \ - images/32bpp-None-jpeg.tiff \ - images/testfax3_bug54_1dnoEOL.tif \ - $(PNMIMAGES) \ - $(TIFFIMAGES) - -noinst_HEADERS = tifftest.h -test_signed_tags_SOURCES = test_signed_tags.c -test_signed_tags_LDADD = $(LIBTIFF) -ascii_tag_SOURCES = ascii_tag.c -ascii_tag_LDADD = $(LIBTIFF) -long_tag_SOURCES = long_tag.c check_tag.c -long_tag_LDADD = $(LIBTIFF) -short_tag_SOURCES = short_tag.c check_tag.c -short_tag_LDADD = $(LIBTIFF) -strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h -strip_rw_LDADD = $(LIBTIFF) -rewrite_SOURCES = rewrite_tag.c -rewrite_LDADD = $(LIBTIFF) -raw_decode_SOURCES = raw_decode.c -raw_decode_LDADD = $(LIBTIFF) -custom_dir_SOURCES = custom_dir.c -custom_dir_LDADD = $(LIBTIFF) -@BUILD_STATIC_TRUE@rational_precision2double_SOURCES = rational_precision2double.c -@BUILD_STATIC_TRUE@rational_precision2double_LDADD = $(LIBTIFF) -@BUILD_STATIC_TRUE@rational_precision2double_LDFLAGS = -static -@BUILD_STATIC_TRUE@test_write_read_tags_SOURCES = test_write_read_tags.c -@BUILD_STATIC_TRUE@test_write_read_tags_LDADD = $(LIBTIFF) -@BUILD_STATIC_TRUE@test_write_read_tags_LDFLAGS = -static -@BUILD_STATIC_TRUE@test_transferfunction_write_read_SOURCES = test_transferfunction_write_read.c -@BUILD_STATIC_TRUE@test_transferfunction_write_read_LDADD = $(LIBTIFF) -@BUILD_STATIC_TRUE@test_transferfunction_write_read_LDFLAGS = -static -custom_dir_EXIF_231_SOURCES = custom_dir_EXIF_231.c -custom_dir_EXIF_231_LDADD = $(LIBTIFF) -defer_strile_loading_SOURCES = defer_strile_loading.c -defer_strile_loading_LDADD = $(LIBTIFF) -defer_strile_writing_SOURCES = defer_strile_writing.c -defer_strile_writing_LDADD = $(LIBTIFF) -test_directory_SOURCES = test_directory.c -test_directory_LDADD = $(LIBTIFF) -test_IFD_enlargement_SOURCES = test_IFD_enlargement.c -test_IFD_enlargement_LDADD = $(LIBTIFF) -test_open_options_SOURCES = test_open_options.c -test_open_options_LDADD = $(LIBTIFF) -test_append_to_strip_SOURCES = test_append_to_strip.c -test_append_to_strip_LDADD = $(LIBTIFF) -test_ifd_loop_detection_CFLAGS = -DSOURCE_DIR=\"@srcdir@\" -test_ifd_loop_detection_SOURCES = test_ifd_loop_detection.c -test_ifd_loop_detection_LDADD = $(LIBTIFF) -test_RGBAImage_SOURCES = test_RGBAImage.c -test_RGBAImage_LDADD = $(LIBTIFF) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -ascii_tag$(EXEEXT): $(ascii_tag_OBJECTS) $(ascii_tag_DEPENDENCIES) $(EXTRA_ascii_tag_DEPENDENCIES) - @rm -f ascii_tag$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ascii_tag_OBJECTS) $(ascii_tag_LDADD) $(LIBS) - -custom_dir$(EXEEXT): $(custom_dir_OBJECTS) $(custom_dir_DEPENDENCIES) $(EXTRA_custom_dir_DEPENDENCIES) - @rm -f custom_dir$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(custom_dir_OBJECTS) $(custom_dir_LDADD) $(LIBS) - -custom_dir_EXIF_231$(EXEEXT): $(custom_dir_EXIF_231_OBJECTS) $(custom_dir_EXIF_231_DEPENDENCIES) $(EXTRA_custom_dir_EXIF_231_DEPENDENCIES) - @rm -f custom_dir_EXIF_231$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(custom_dir_EXIF_231_OBJECTS) $(custom_dir_EXIF_231_LDADD) $(LIBS) - -defer_strile_loading$(EXEEXT): $(defer_strile_loading_OBJECTS) $(defer_strile_loading_DEPENDENCIES) $(EXTRA_defer_strile_loading_DEPENDENCIES) - @rm -f defer_strile_loading$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(defer_strile_loading_OBJECTS) $(defer_strile_loading_LDADD) $(LIBS) - -defer_strile_writing$(EXEEXT): $(defer_strile_writing_OBJECTS) $(defer_strile_writing_DEPENDENCIES) $(EXTRA_defer_strile_writing_DEPENDENCIES) - @rm -f defer_strile_writing$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(defer_strile_writing_OBJECTS) $(defer_strile_writing_LDADD) $(LIBS) - -long_tag$(EXEEXT): $(long_tag_OBJECTS) $(long_tag_DEPENDENCIES) $(EXTRA_long_tag_DEPENDENCIES) - @rm -f long_tag$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(long_tag_OBJECTS) $(long_tag_LDADD) $(LIBS) - -rational_precision2double$(EXEEXT): $(rational_precision2double_OBJECTS) $(rational_precision2double_DEPENDENCIES) $(EXTRA_rational_precision2double_DEPENDENCIES) - @rm -f rational_precision2double$(EXEEXT) - $(AM_V_CCLD)$(rational_precision2double_LINK) $(rational_precision2double_OBJECTS) $(rational_precision2double_LDADD) $(LIBS) - -raw_decode$(EXEEXT): $(raw_decode_OBJECTS) $(raw_decode_DEPENDENCIES) $(EXTRA_raw_decode_DEPENDENCIES) - @rm -f raw_decode$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(raw_decode_OBJECTS) $(raw_decode_LDADD) $(LIBS) - -rewrite$(EXEEXT): $(rewrite_OBJECTS) $(rewrite_DEPENDENCIES) $(EXTRA_rewrite_DEPENDENCIES) - @rm -f rewrite$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(rewrite_OBJECTS) $(rewrite_LDADD) $(LIBS) - -short_tag$(EXEEXT): $(short_tag_OBJECTS) $(short_tag_DEPENDENCIES) $(EXTRA_short_tag_DEPENDENCIES) - @rm -f short_tag$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(short_tag_OBJECTS) $(short_tag_LDADD) $(LIBS) - -strip_rw$(EXEEXT): $(strip_rw_OBJECTS) $(strip_rw_DEPENDENCIES) $(EXTRA_strip_rw_DEPENDENCIES) - @rm -f strip_rw$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(strip_rw_OBJECTS) $(strip_rw_LDADD) $(LIBS) - -test_IFD_enlargement$(EXEEXT): $(test_IFD_enlargement_OBJECTS) $(test_IFD_enlargement_DEPENDENCIES) $(EXTRA_test_IFD_enlargement_DEPENDENCIES) - @rm -f test_IFD_enlargement$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_IFD_enlargement_OBJECTS) $(test_IFD_enlargement_LDADD) $(LIBS) - -test_RGBAImage$(EXEEXT): $(test_RGBAImage_OBJECTS) $(test_RGBAImage_DEPENDENCIES) $(EXTRA_test_RGBAImage_DEPENDENCIES) - @rm -f test_RGBAImage$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_RGBAImage_OBJECTS) $(test_RGBAImage_LDADD) $(LIBS) - -test_append_to_strip$(EXEEXT): $(test_append_to_strip_OBJECTS) $(test_append_to_strip_DEPENDENCIES) $(EXTRA_test_append_to_strip_DEPENDENCIES) - @rm -f test_append_to_strip$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_append_to_strip_OBJECTS) $(test_append_to_strip_LDADD) $(LIBS) - -test_directory$(EXEEXT): $(test_directory_OBJECTS) $(test_directory_DEPENDENCIES) $(EXTRA_test_directory_DEPENDENCIES) - @rm -f test_directory$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_directory_OBJECTS) $(test_directory_LDADD) $(LIBS) - -test_ifd_loop_detection$(EXEEXT): $(test_ifd_loop_detection_OBJECTS) $(test_ifd_loop_detection_DEPENDENCIES) $(EXTRA_test_ifd_loop_detection_DEPENDENCIES) - @rm -f test_ifd_loop_detection$(EXEEXT) - $(AM_V_CCLD)$(test_ifd_loop_detection_LINK) $(test_ifd_loop_detection_OBJECTS) $(test_ifd_loop_detection_LDADD) $(LIBS) - -test_open_options$(EXEEXT): $(test_open_options_OBJECTS) $(test_open_options_DEPENDENCIES) $(EXTRA_test_open_options_DEPENDENCIES) - @rm -f test_open_options$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_open_options_OBJECTS) $(test_open_options_LDADD) $(LIBS) - -test_signed_tags$(EXEEXT): $(test_signed_tags_OBJECTS) $(test_signed_tags_DEPENDENCIES) $(EXTRA_test_signed_tags_DEPENDENCIES) - @rm -f test_signed_tags$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_signed_tags_OBJECTS) $(test_signed_tags_LDADD) $(LIBS) - -test_transferfunction_write_read$(EXEEXT): $(test_transferfunction_write_read_OBJECTS) $(test_transferfunction_write_read_DEPENDENCIES) $(EXTRA_test_transferfunction_write_read_DEPENDENCIES) - @rm -f test_transferfunction_write_read$(EXEEXT) - $(AM_V_CCLD)$(test_transferfunction_write_read_LINK) $(test_transferfunction_write_read_OBJECTS) $(test_transferfunction_write_read_LDADD) $(LIBS) - -test_write_read_tags$(EXEEXT): $(test_write_read_tags_OBJECTS) $(test_write_read_tags_DEPENDENCIES) $(EXTRA_test_write_read_tags_DEPENDENCIES) - @rm -f test_write_read_tags$(EXEEXT) - $(AM_V_CCLD)$(test_write_read_tags_LINK) $(test_write_read_tags_OBJECTS) $(test_write_read_tags_LDADD) $(LIBS) - -testtypes$(EXEEXT): $(testtypes_OBJECTS) $(testtypes_DEPENDENCIES) $(EXTRA_testtypes_DEPENDENCIES) - @rm -f testtypes$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(testtypes_OBJECTS) $(testtypes_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir_EXIF_231.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defer_strile_loading.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defer_strile_writing.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rational_precision2double.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_decode.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_tag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip_rw.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_IFD_enlargement.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_RGBAImage.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_append_to_strip.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_arrays.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_directory.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_open_options.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_signed_tags.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_transferfunction_write_read.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_write_read_tags.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtypes.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -test_ifd_loop_detection-test_ifd_loop_detection.o: test_ifd_loop_detection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ifd_loop_detection_CFLAGS) $(CFLAGS) -MT test_ifd_loop_detection-test_ifd_loop_detection.o -MD -MP -MF $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Tpo -c -o test_ifd_loop_detection-test_ifd_loop_detection.o `test -f 'test_ifd_loop_detection.c' || echo '$(srcdir)/'`test_ifd_loop_detection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Tpo $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test_ifd_loop_detection.c' object='test_ifd_loop_detection-test_ifd_loop_detection.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ifd_loop_detection_CFLAGS) $(CFLAGS) -c -o test_ifd_loop_detection-test_ifd_loop_detection.o `test -f 'test_ifd_loop_detection.c' || echo '$(srcdir)/'`test_ifd_loop_detection.c - -test_ifd_loop_detection-test_ifd_loop_detection.obj: test_ifd_loop_detection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ifd_loop_detection_CFLAGS) $(CFLAGS) -MT test_ifd_loop_detection-test_ifd_loop_detection.obj -MD -MP -MF $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Tpo -c -o test_ifd_loop_detection-test_ifd_loop_detection.obj `if test -f 'test_ifd_loop_detection.c'; then $(CYGPATH_W) 'test_ifd_loop_detection.c'; else $(CYGPATH_W) '$(srcdir)/test_ifd_loop_detection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Tpo $(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test_ifd_loop_detection.c' object='test_ifd_loop_detection-test_ifd_loop_detection.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ifd_loop_detection_CFLAGS) $(CFLAGS) -c -o test_ifd_loop_detection-test_ifd_loop_detection.obj `if test -f 'test_ifd_loop_detection.c'; then $(CYGPATH_W) 'test_ifd_loop_detection.c'; else $(CYGPATH_W) '$(srcdir)/test_ifd_loop_detection.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: $(check_PROGRAMS) - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -ascii_tag.log: ascii_tag$(EXEEXT) - @p='ascii_tag$(EXEEXT)'; \ - b='ascii_tag'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -long_tag.log: long_tag$(EXEEXT) - @p='long_tag$(EXEEXT)'; \ - b='long_tag'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -short_tag.log: short_tag$(EXEEXT) - @p='short_tag$(EXEEXT)'; \ - b='short_tag'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -strip_rw.log: strip_rw$(EXEEXT) - @p='strip_rw$(EXEEXT)'; \ - b='strip_rw'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -rewrite.log: rewrite$(EXEEXT) - @p='rewrite$(EXEEXT)'; \ - b='rewrite'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -custom_dir.log: custom_dir$(EXEEXT) - @p='custom_dir$(EXEEXT)'; \ - b='custom_dir'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -custom_dir_EXIF_231.log: custom_dir_EXIF_231$(EXEEXT) - @p='custom_dir_EXIF_231$(EXEEXT)'; \ - b='custom_dir_EXIF_231'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -defer_strile_loading.log: defer_strile_loading$(EXEEXT) - @p='defer_strile_loading$(EXEEXT)'; \ - b='defer_strile_loading'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -defer_strile_writing.log: defer_strile_writing$(EXEEXT) - @p='defer_strile_writing$(EXEEXT)'; \ - b='defer_strile_writing'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_directory.log: test_directory$(EXEEXT) - @p='test_directory$(EXEEXT)'; \ - b='test_directory'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_IFD_enlargement.log: test_IFD_enlargement$(EXEEXT) - @p='test_IFD_enlargement$(EXEEXT)'; \ - b='test_IFD_enlargement'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_open_options.log: test_open_options$(EXEEXT) - @p='test_open_options$(EXEEXT)'; \ - b='test_open_options'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_append_to_strip.log: test_append_to_strip$(EXEEXT) - @p='test_append_to_strip$(EXEEXT)'; \ - b='test_append_to_strip'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_ifd_loop_detection.log: test_ifd_loop_detection$(EXEEXT) - @p='test_ifd_loop_detection$(EXEEXT)'; \ - b='test_ifd_loop_detection'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_RGBAImage.log: test_RGBAImage$(EXEEXT) - @p='test_RGBAImage$(EXEEXT)'; \ - b='test_RGBAImage'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -testtypes.log: testtypes$(EXEEXT) - @p='testtypes$(EXEEXT)'; \ - b='testtypes'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_signed_tags.log: test_signed_tags$(EXEEXT) - @p='test_signed_tags$(EXEEXT)'; \ - b='test_signed_tags'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -raw_decode.log: raw_decode$(EXEEXT) - @p='raw_decode$(EXEEXT)'; \ - b='raw_decode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -rational_precision2double.log: rational_precision2double$(EXEEXT) - @p='rational_precision2double$(EXEEXT)'; \ - b='rational_precision2double'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_write_read_tags.log: test_write_read_tags$(EXEEXT) - @p='test_write_read_tags$(EXEEXT)'; \ - b='test_write_read_tags'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test_transferfunction_write_read.log: test_transferfunction_write_read$(EXEEXT) - @p='test_transferfunction_write_read$(EXEEXT)'; \ - b='test_transferfunction_write_read'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ppm2tiff_pbm.sh.log: ppm2tiff_pbm.sh - @p='ppm2tiff_pbm.sh'; \ - b='ppm2tiff_pbm.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ppm2tiff_pgm.sh.log: ppm2tiff_pgm.sh - @p='ppm2tiff_pgm.sh'; \ - b='ppm2tiff_pgm.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -ppm2tiff_ppm.sh.log: ppm2tiff_ppm.sh - @p='ppm2tiff_ppm.sh'; \ - b='ppm2tiff_ppm.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -fax2tiff.sh.log: fax2tiff.sh - @p='fax2tiff.sh'; \ - b='fax2tiff.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g3.sh.log: tiffcp-g3.sh - @p='tiffcp-g3.sh'; \ - b='tiffcp-g3.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g3-1d.sh.log: tiffcp-g3-1d.sh - @p='tiffcp-g3-1d.sh'; \ - b='tiffcp-g3-1d.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g3-1d-fill.sh.log: tiffcp-g3-1d-fill.sh - @p='tiffcp-g3-1d-fill.sh'; \ - b='tiffcp-g3-1d-fill.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g3-2d.sh.log: tiffcp-g3-2d.sh - @p='tiffcp-g3-2d.sh'; \ - b='tiffcp-g3-2d.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g3-2d-fill.sh.log: tiffcp-g3-2d-fill.sh - @p='tiffcp-g3-2d-fill.sh'; \ - b='tiffcp-g3-2d-fill.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-g4.sh.log: tiffcp-g4.sh - @p='tiffcp-g4.sh'; \ - b='tiffcp-g4.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-logluv.sh.log: tiffcp-logluv.sh - @p='tiffcp-logluv.sh'; \ - b='tiffcp-logluv.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-thumbnail.sh.log: tiffcp-thumbnail.sh - @p='tiffcp-thumbnail.sh'; \ - b='tiffcp-thumbnail.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-lzw-compat.sh.log: tiffcp-lzw-compat.sh - @p='tiffcp-lzw-compat.sh'; \ - b='tiffcp-lzw-compat.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-lzw-scanline-decode.sh.log: tiffcp-lzw-scanline-decode.sh - @p='tiffcp-lzw-scanline-decode.sh'; \ - b='tiffcp-lzw-scanline-decode.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffdump.sh.log: tiffdump.sh - @p='tiffdump.sh'; \ - b='tiffdump.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffinfo.sh.log: tiffinfo.sh - @p='tiffinfo.sh'; \ - b='tiffinfo.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-split.sh.log: tiffcp-split.sh - @p='tiffcp-split.sh'; \ - b='tiffcp-split.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-split-join.sh.log: tiffcp-split-join.sh - @p='tiffcp-split-join.sh'; \ - b='tiffcp-split-join.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2ps-PS1.sh.log: tiff2ps-PS1.sh - @p='tiff2ps-PS1.sh'; \ - b='tiff2ps-PS1.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2ps-PS2.sh.log: tiff2ps-PS2.sh - @p='tiff2ps-PS2.sh'; \ - b='tiff2ps-PS2.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2ps-PS3.sh.log: tiff2ps-PS3.sh - @p='tiff2ps-PS3.sh'; \ - b='tiff2ps-PS3.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2ps-EPS1.sh.log: tiff2ps-EPS1.sh - @p='tiff2ps-EPS1.sh'; \ - b='tiff2ps-EPS1.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2pdf.sh.log: tiff2pdf.sh - @p='tiff2pdf.sh'; \ - b='tiff2pdf.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-logluv-3c-16b.sh.log: tiffcrop-doubleflip-logluv-3c-16b.sh - @p='tiffcrop-doubleflip-logluv-3c-16b.sh'; \ - b='tiffcrop-doubleflip-logluv-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-minisblack-1c-16b.sh.log: tiffcrop-doubleflip-minisblack-1c-16b.sh - @p='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \ - b='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-minisblack-1c-8b.sh.log: tiffcrop-doubleflip-minisblack-1c-8b.sh - @p='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \ - b='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh.log: tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh - @p='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \ - b='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-miniswhite-1c-1b.sh.log: tiffcrop-doubleflip-miniswhite-1c-1b.sh - @p='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \ - b='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-palette-1c-1b.sh.log: tiffcrop-doubleflip-palette-1c-1b.sh - @p='tiffcrop-doubleflip-palette-1c-1b.sh'; \ - b='tiffcrop-doubleflip-palette-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-palette-1c-4b.sh.log: tiffcrop-doubleflip-palette-1c-4b.sh - @p='tiffcrop-doubleflip-palette-1c-4b.sh'; \ - b='tiffcrop-doubleflip-palette-1c-4b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-palette-1c-8b.sh.log: tiffcrop-doubleflip-palette-1c-8b.sh - @p='tiffcrop-doubleflip-palette-1c-8b.sh'; \ - b='tiffcrop-doubleflip-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-rgb-3c-16b.sh.log: tiffcrop-doubleflip-rgb-3c-16b.sh - @p='tiffcrop-doubleflip-rgb-3c-16b.sh'; \ - b='tiffcrop-doubleflip-rgb-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-doubleflip-rgb-3c-8b.sh.log: tiffcrop-doubleflip-rgb-3c-8b.sh - @p='tiffcrop-doubleflip-rgb-3c-8b.sh'; \ - b='tiffcrop-doubleflip-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-logluv-3c-16b.sh.log: tiffcrop-extract-logluv-3c-16b.sh - @p='tiffcrop-extract-logluv-3c-16b.sh'; \ - b='tiffcrop-extract-logluv-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-minisblack-1c-16b.sh.log: tiffcrop-extract-minisblack-1c-16b.sh - @p='tiffcrop-extract-minisblack-1c-16b.sh'; \ - b='tiffcrop-extract-minisblack-1c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-minisblack-1c-8b.sh.log: tiffcrop-extract-minisblack-1c-8b.sh - @p='tiffcrop-extract-minisblack-1c-8b.sh'; \ - b='tiffcrop-extract-minisblack-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-minisblack-2c-8b-alpha.sh.log: tiffcrop-extract-minisblack-2c-8b-alpha.sh - @p='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \ - b='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-miniswhite-1c-1b.sh.log: tiffcrop-extract-miniswhite-1c-1b.sh - @p='tiffcrop-extract-miniswhite-1c-1b.sh'; \ - b='tiffcrop-extract-miniswhite-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-palette-1c-1b.sh.log: tiffcrop-extract-palette-1c-1b.sh - @p='tiffcrop-extract-palette-1c-1b.sh'; \ - b='tiffcrop-extract-palette-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-palette-1c-4b.sh.log: tiffcrop-extract-palette-1c-4b.sh - @p='tiffcrop-extract-palette-1c-4b.sh'; \ - b='tiffcrop-extract-palette-1c-4b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-palette-1c-8b.sh.log: tiffcrop-extract-palette-1c-8b.sh - @p='tiffcrop-extract-palette-1c-8b.sh'; \ - b='tiffcrop-extract-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-rgb-3c-16b.sh.log: tiffcrop-extract-rgb-3c-16b.sh - @p='tiffcrop-extract-rgb-3c-16b.sh'; \ - b='tiffcrop-extract-rgb-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extract-rgb-3c-8b.sh.log: tiffcrop-extract-rgb-3c-8b.sh - @p='tiffcrop-extract-rgb-3c-8b.sh'; \ - b='tiffcrop-extract-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-logluv-3c-16b.sh.log: tiffcrop-extractz14-logluv-3c-16b.sh - @p='tiffcrop-extractz14-logluv-3c-16b.sh'; \ - b='tiffcrop-extractz14-logluv-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-minisblack-1c-16b.sh.log: tiffcrop-extractz14-minisblack-1c-16b.sh - @p='tiffcrop-extractz14-minisblack-1c-16b.sh'; \ - b='tiffcrop-extractz14-minisblack-1c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-minisblack-1c-8b.sh.log: tiffcrop-extractz14-minisblack-1c-8b.sh - @p='tiffcrop-extractz14-minisblack-1c-8b.sh'; \ - b='tiffcrop-extractz14-minisblack-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-minisblack-2c-8b-alpha.sh.log: tiffcrop-extractz14-minisblack-2c-8b-alpha.sh - @p='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \ - b='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-miniswhite-1c-1b.sh.log: tiffcrop-extractz14-miniswhite-1c-1b.sh - @p='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \ - b='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-palette-1c-1b.sh.log: tiffcrop-extractz14-palette-1c-1b.sh - @p='tiffcrop-extractz14-palette-1c-1b.sh'; \ - b='tiffcrop-extractz14-palette-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-palette-1c-4b.sh.log: tiffcrop-extractz14-palette-1c-4b.sh - @p='tiffcrop-extractz14-palette-1c-4b.sh'; \ - b='tiffcrop-extractz14-palette-1c-4b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-palette-1c-8b.sh.log: tiffcrop-extractz14-palette-1c-8b.sh - @p='tiffcrop-extractz14-palette-1c-8b.sh'; \ - b='tiffcrop-extractz14-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-rgb-3c-16b.sh.log: tiffcrop-extractz14-rgb-3c-16b.sh - @p='tiffcrop-extractz14-rgb-3c-16b.sh'; \ - b='tiffcrop-extractz14-rgb-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-extractz14-rgb-3c-8b.sh.log: tiffcrop-extractz14-rgb-3c-8b.sh - @p='tiffcrop-extractz14-rgb-3c-8b.sh'; \ - b='tiffcrop-extractz14-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-logluv-3c-16b.sh.log: tiffcrop-R90-logluv-3c-16b.sh - @p='tiffcrop-R90-logluv-3c-16b.sh'; \ - b='tiffcrop-R90-logluv-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-minisblack-1c-16b.sh.log: tiffcrop-R90-minisblack-1c-16b.sh - @p='tiffcrop-R90-minisblack-1c-16b.sh'; \ - b='tiffcrop-R90-minisblack-1c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-minisblack-1c-8b.sh.log: tiffcrop-R90-minisblack-1c-8b.sh - @p='tiffcrop-R90-minisblack-1c-8b.sh'; \ - b='tiffcrop-R90-minisblack-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-minisblack-2c-8b-alpha.sh.log: tiffcrop-R90-minisblack-2c-8b-alpha.sh - @p='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \ - b='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-miniswhite-1c-1b.sh.log: tiffcrop-R90-miniswhite-1c-1b.sh - @p='tiffcrop-R90-miniswhite-1c-1b.sh'; \ - b='tiffcrop-R90-miniswhite-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-palette-1c-1b.sh.log: tiffcrop-R90-palette-1c-1b.sh - @p='tiffcrop-R90-palette-1c-1b.sh'; \ - b='tiffcrop-R90-palette-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-palette-1c-4b.sh.log: tiffcrop-R90-palette-1c-4b.sh - @p='tiffcrop-R90-palette-1c-4b.sh'; \ - b='tiffcrop-R90-palette-1c-4b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-palette-1c-8b.sh.log: tiffcrop-R90-palette-1c-8b.sh - @p='tiffcrop-R90-palette-1c-8b.sh'; \ - b='tiffcrop-R90-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-rgb-3c-16b.sh.log: tiffcrop-R90-rgb-3c-16b.sh - @p='tiffcrop-R90-rgb-3c-16b.sh'; \ - b='tiffcrop-R90-rgb-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-R90-rgb-3c-8b.sh.log: tiffcrop-R90-rgb-3c-8b.sh - @p='tiffcrop-R90-rgb-3c-8b.sh'; \ - b='tiffcrop-R90-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2bw-palette-1c-8b.sh.log: tiff2bw-palette-1c-8b.sh - @p='tiff2bw-palette-1c-8b.sh'; \ - b='tiff2bw-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2bw-quad-lzw-compat.sh.log: tiff2bw-quad-lzw-compat.sh - @p='tiff2bw-quad-lzw-compat.sh'; \ - b='tiff2bw-quad-lzw-compat.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2bw-rgb-3c-8b.sh.log: tiff2bw-rgb-3c-8b.sh - @p='tiff2bw-rgb-3c-8b.sh'; \ - b='tiff2bw-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-logluv-3c-16b.sh.log: tiff2rgba-logluv-3c-16b.sh - @p='tiff2rgba-logluv-3c-16b.sh'; \ - b='tiff2rgba-logluv-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-minisblack-1c-16b.sh.log: tiff2rgba-minisblack-1c-16b.sh - @p='tiff2rgba-minisblack-1c-16b.sh'; \ - b='tiff2rgba-minisblack-1c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-minisblack-1c-8b.sh.log: tiff2rgba-minisblack-1c-8b.sh - @p='tiff2rgba-minisblack-1c-8b.sh'; \ - b='tiff2rgba-minisblack-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-minisblack-2c-8b-alpha.sh.log: tiff2rgba-minisblack-2c-8b-alpha.sh - @p='tiff2rgba-minisblack-2c-8b-alpha.sh'; \ - b='tiff2rgba-minisblack-2c-8b-alpha.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-miniswhite-1c-1b.sh.log: tiff2rgba-miniswhite-1c-1b.sh - @p='tiff2rgba-miniswhite-1c-1b.sh'; \ - b='tiff2rgba-miniswhite-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-palette-1c-1b.sh.log: tiff2rgba-palette-1c-1b.sh - @p='tiff2rgba-palette-1c-1b.sh'; \ - b='tiff2rgba-palette-1c-1b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-palette-1c-4b.sh.log: tiff2rgba-palette-1c-4b.sh - @p='tiff2rgba-palette-1c-4b.sh'; \ - b='tiff2rgba-palette-1c-4b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-palette-1c-8b.sh.log: tiff2rgba-palette-1c-8b.sh - @p='tiff2rgba-palette-1c-8b.sh'; \ - b='tiff2rgba-palette-1c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-rgb-3c-16b.sh.log: tiff2rgba-rgb-3c-16b.sh - @p='tiff2rgba-rgb-3c-16b.sh'; \ - b='tiff2rgba-rgb-3c-16b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-rgb-3c-8b.sh.log: tiff2rgba-rgb-3c-8b.sh - @p='tiff2rgba-rgb-3c-8b.sh'; \ - b='tiff2rgba-rgb-3c-8b.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -testfax4.sh.log: testfax4.sh - @p='testfax4.sh'; \ - b='testfax4.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -testfax3_bug_513.sh.log: testfax3_bug_513.sh - @p='testfax3_bug_513.sh'; \ - b='testfax3_bug_513.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -testfax3_bug54_1dnoEOL.sh.log: testfax3_bug54_1dnoEOL.sh - @p='testfax3_bug54_1dnoEOL.sh'; \ - b='testfax3_bug54_1dnoEOL.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -testdeflatelaststripextradata.sh.log: testdeflatelaststripextradata.sh - @p='testdeflatelaststripextradata.sh'; \ - b='testdeflatelaststripextradata.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh - @p='tiff2rgba-quad-tile.jpg.sh'; \ - b='tiff2rgba-quad-tile.jpg.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh.log: tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh - @p='tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh'; \ - b='tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh.log: tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh - @p='tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh'; \ - b='tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh.log: tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh - @p='tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh'; \ - b='tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiff2rgba-32bpp-None-jpeg.sh.log: tiff2rgba-32bpp-None-jpeg.sh - @p='tiff2rgba-32bpp-None-jpeg.sh'; \ - b='tiff2rgba-32bpp-None-jpeg.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-32bpp-None-jpeg.sh.log: tiffcp-32bpp-None-jpeg.sh - @p='tiffcp-32bpp-None-jpeg.sh'; \ - b='tiffcp-32bpp-None-jpeg.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcrop-32bpp-None-jpeg.sh.log: tiffcrop-32bpp-None-jpeg.sh - @p='tiffcrop-32bpp-None-jpeg.sh'; \ - b='tiffcrop-32bpp-None-jpeg.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -tiffcp-lzw-single-strip-jbig.sh.log: tiffcp-lzw-single-strip-jbig.sh - @p='tiffcp-lzw-single-strip-jbig.sh'; \ - b='tiffcp-lzw-single-strip-jbig.sh'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(HEADERS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/ascii_tag.Po - -rm -f ./$(DEPDIR)/check_tag.Po - -rm -f ./$(DEPDIR)/custom_dir.Po - -rm -f ./$(DEPDIR)/custom_dir_EXIF_231.Po - -rm -f ./$(DEPDIR)/defer_strile_loading.Po - -rm -f ./$(DEPDIR)/defer_strile_writing.Po - -rm -f ./$(DEPDIR)/long_tag.Po - -rm -f ./$(DEPDIR)/rational_precision2double.Po - -rm -f ./$(DEPDIR)/raw_decode.Po - -rm -f ./$(DEPDIR)/rewrite_tag.Po - -rm -f ./$(DEPDIR)/short_tag.Po - -rm -f ./$(DEPDIR)/strip.Po - -rm -f ./$(DEPDIR)/strip_rw.Po - -rm -f ./$(DEPDIR)/test_IFD_enlargement.Po - -rm -f ./$(DEPDIR)/test_RGBAImage.Po - -rm -f ./$(DEPDIR)/test_append_to_strip.Po - -rm -f ./$(DEPDIR)/test_arrays.Po - -rm -f ./$(DEPDIR)/test_directory.Po - -rm -f ./$(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po - -rm -f ./$(DEPDIR)/test_open_options.Po - -rm -f ./$(DEPDIR)/test_signed_tags.Po - -rm -f ./$(DEPDIR)/test_transferfunction_write_read.Po - -rm -f ./$(DEPDIR)/test_write_read_tags.Po - -rm -f ./$(DEPDIR)/testtypes.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/ascii_tag.Po - -rm -f ./$(DEPDIR)/check_tag.Po - -rm -f ./$(DEPDIR)/custom_dir.Po - -rm -f ./$(DEPDIR)/custom_dir_EXIF_231.Po - -rm -f ./$(DEPDIR)/defer_strile_loading.Po - -rm -f ./$(DEPDIR)/defer_strile_writing.Po - -rm -f ./$(DEPDIR)/long_tag.Po - -rm -f ./$(DEPDIR)/rational_precision2double.Po - -rm -f ./$(DEPDIR)/raw_decode.Po - -rm -f ./$(DEPDIR)/rewrite_tag.Po - -rm -f ./$(DEPDIR)/short_tag.Po - -rm -f ./$(DEPDIR)/strip.Po - -rm -f ./$(DEPDIR)/strip_rw.Po - -rm -f ./$(DEPDIR)/test_IFD_enlargement.Po - -rm -f ./$(DEPDIR)/test_RGBAImage.Po - -rm -f ./$(DEPDIR)/test_append_to_strip.Po - -rm -f ./$(DEPDIR)/test_arrays.Po - -rm -f ./$(DEPDIR)/test_directory.Po - -rm -f ./$(DEPDIR)/test_ifd_loop_detection-test_ifd_loop_detection.Po - -rm -f ./$(DEPDIR)/test_open_options.Po - -rm -f ./$(DEPDIR)/test_signed_tags.Po - -rm -f ./$(DEPDIR)/test_transferfunction_write_read.Po - -rm -f ./$(DEPDIR)/test_write_read_tags.Po - -rm -f ./$(DEPDIR)/testtypes.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# memcheck: valgrind's memory access checker. -# -# The suppressions which come with valgrind are sometimes insufficient -# to handle certain system library aspects which may be reported and -# which are unrelated to libtiff. When first starting with a new -# system (or after a major system update), it is good to execute the -# test suite (known to already be passing!) like 'make memcheck -# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind -# suppression entries in the test log. Make sure that none of the -# suppressions are due to libtiff itself. Tell valgrind about the -# suppressions by creating a .valgrindrc file with content like: -# --memcheck:suppressions=mysupp.supp -memcheck: - $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ - --error-exitcode=2 --track-origins=yes --num-callers=12 \ - --quiet $(VALGRIND_EXTRA_OPTS)' check - -# ptrcheck: valgrind's experimental pointer checking tool. -ptrcheck: - $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check - -# tiff2bw is pretty lame so currently only the generated scripts -# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and -# tiff2bw-rgb-3c-8b.sh pass tests. -generate-tiff2bw-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiff2bw-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -generate-tiff2rgba-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiff2rgba-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test rotations -generate-tiffcrop-R90-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test flip (mirror) -generate-tiffcrop-doubleflip-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test extracting a section 100 pixels wide and 100 pixels high -generate-tiffcrop-extract-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -# Test extracting the first and fourth quarters from the left side. -generate-tiffcrop-extractz14-tests: - for file in $(TIFFIMAGES) ; \ - do \ - base=`basename $$file .tiff` ; \ - testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \ - ( \ - echo "#!/bin/sh" ; \ - echo "# Generated file, master is Makefile.am" ; \ - echo ". \$${srcdir:-.}/common.sh" ; \ - echo "infile=\"\$$srcdir/$$file\"" ; \ - echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \ - echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \ - echo "f_tiffinfo_validate \$$outfile" ; \ - ) > $$testscript ; \ - chmod +x $$testscript ; \ - done - -generate-tiffcrop-tests: \ - generate-tiffcrop-R90-tests \ - generate-tiffcrop-doubleflip-tests \ - generate-tiffcrop-extract-tests \ - generate-tiffcrop-extractz14-tests - -generate-tests: \ - generate-tiff2bw-tests \ - generate-tiff2rgba-tests \ - generate-tiffcrop-tests - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/test/TiffSplitTest.cmake b/third_party/libtiff/test/TiffSplitTest.cmake deleted file mode 100644 index cf31f44..0000000 --- a/third_party/libtiff/test/TiffSplitTest.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# CMake tests for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake) - -string(REPLACE "^" ";" TESTFILES "${TESTFILES}") - -test_convert_multi("${TIFFCP}" "${TESTFILES}" "${CONJOINED}") -test_convert("${TIFFSPLIT}" "${CONJOINED}" "${SPLITFILE}") -if (RECONJOINED) - file(GLOB SPLITFILES "${SPLITFILE}*") - test_convert_multi("${TIFFCP}" "${SPLITFILES}" "${RECONJOINED}") -endif() diff --git a/third_party/libtiff/test/TiffTest.cmake b/third_party/libtiff/test/TiffTest.cmake deleted file mode 100644 index 924eef2..0000000 --- a/third_party/libtiff/test/TiffTest.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# CMake tests for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake) - -string(REPLACE "^" ";" CONVERT_COMMAND1 "${CONVERT_COMMAND1}") -string(REPLACE "^" ";" CONVERT_COMMAND2 "${CONVERT_COMMAND2}") -string(REPLACE "^" ";" CONVERT_COMMAND3 "${CONVERT_COMMAND3}") -string(REPLACE "^" ";" STDOUT_COMMAND "${STDOUT_COMMAND}") -string(REPLACE "^" ";" READER_COMMAND "${READER_COMMAND}") - -if(NOT CONVERT_COMMAND1 AND NOT STDOUT_COMMAND AND NOT READER_COMMAND) - message(FATAL_ERROR "No test command specified") -endif() - -if(CONVERT_COMMAND1) - test_convert("${CONVERT_COMMAND1}" "${INFILE}" "${OUTFILE}") - if(VALIDATE) - tiffinfo_validate("${OUTFILE}") - endif() -endif() - -get_filename_component(dir "${OUTFILE}" DIRECTORY) -get_filename_component(base "${OUTFILE}" NAME_WE) -get_filename_component(ext "${OUTFILE}" EXT) - -if(CONVERT_COMMAND2) - test_convert("${CONVERT_COMMAND2}" "${OUTFILE}" "${dir}/${base}-2${ext}") - if(VALIDATE) - tiffinfo_validate("${base}-2${ext}") - endif() -endif() - -if(CONVERT_COMMAND3) - test_convert("${CONVERT_COMMAND3}" "${dir}/${base}-2${ext}" "${dir}/${base}-3${ext}") - if(VALIDATE) - tiffinfo_validate("${base}-3${ext}") - endif() -endif() - -if(STDOUT_COMMAND) - if(INFILE) - test_stdout("${STDOUT_COMMAND}" "${INFILE}" "${OUTFILE}") - else() - test_stdout_noargs("${STDOUT_COMMAND}") - endif() -endif() - -if(READER_COMMAND) - test_reader("${READER_COMMAND}" "${INFILE}") -endif() diff --git a/third_party/libtiff/test/TiffTestCommon.cmake b/third_party/libtiff/test/TiffTestCommon.cmake deleted file mode 100644 index 6d3b046..0000000 --- a/third_party/libtiff/test/TiffTestCommon.cmake +++ /dev/null @@ -1,122 +0,0 @@ -# CMake tests for libtiff (common functionality) -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# -# Test a simple convert-like command. -# -# test_convert command infile outfile -macro(test_convert command infile outfile) - file(TO_NATIVE_PATH "${infile}" native_infile) - file(TO_NATIVE_PATH "${outfile}" native_outfile) - file(REMOVE "${outfile}") - message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}") - execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" "${native_outfile}" - RESULT_VARIABLE TEST_STATUS) - if(TEST_STATUS) - message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"") - endif() -endmacro() - -# -# Test a simple convert-like command. -# -# test_convert command infile outfile -macro(test_convert_multi command infile outfile) - foreach(file ${infile}) - file(TO_NATIVE_PATH "${file}" native_file) - list(APPEND native_infile "${native_file}") - endforeach() - file(TO_NATIVE_PATH "${outfile}" native_outfile) - file(REMOVE "${outfile}") - message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}") - execute_process(COMMAND ${MEMCHECK} ${command} ${native_infile} "${native_outfile}" - RESULT_VARIABLE TEST_STATUS) - if(TEST_STATUS) - message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"") - endif() -endmacro() - -# -# Test a simple command which sends output to stdout -# -# test_stdout command infile outfile -macro(test_stdout command infile outfile) - file(TO_NATIVE_PATH "${infile}" native_infile) - file(TO_NATIVE_PATH "${outfile}" native_outfile) - file(REMOVE "${outfile}") - message(STATUS "Running ${MEMCHECK} ${command} ${native_infile} > ${native_outfile}") - execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" - OUTPUT_FILE "${outfile}" - RESULT_VARIABLE TEST_STATUS) - if(TEST_STATUS) - message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}") - endif() -endmacro() - -# -# Test a simple command which sends output to stdout -# -# test_stdout command infile outfile -macro(test_stdout_noargs command) - message(STATUS "Running ${MEMCHECK} ${command}") - execute_process(COMMAND ${MEMCHECK} ${command} - RESULT_VARIABLE TEST_STATUS) - if(TEST_STATUS) - message(FATAL_ERROR "Returned failed status ${TEST_STATUS}!") - endif() -endmacro() - -# -# Execute a simple command (e.g. tiffinfo) with one input file -# -# test_exec command infile -macro(test_reader command infile) - file(TO_NATIVE_PATH "${infile}" native_infile) - message(STATUS "Running ${MEMCHECK} ${command} ${native_infile}") - execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" - RESULT_VARIABLE TEST_STATUS) - if(TEST_STATUS) - message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}") - endif() -endmacro() - -# -# Execute tiffinfo on a specified file to validate it -# -# tiffinfo_validate infile -macro(tiffinfo_validate file) - test_reader("${TIFFINFO};-D" "${file}") -endmacro() - -# Add the directory containing libtiff to the PATH (Windows only) -if(WIN32) - get_filename_component(LIBTIFF_DIR "${LIBTIFF}" DIRECTORY) - file(TO_NATIVE_PATH "${LIBTIFF_DIR}" LIBTIFF_DIR) - set(ENV{PATH} "${LIBTIFF_DIR};$ENV{PATH}") -endif() -if(CYGWIN) - get_filename_component(LIBTIFF_DIR "${LIBTIFF}" DIRECTORY) - file(TO_NATIVE_PATH "${LIBTIFF_DIR}" LIBTIFF_DIR) - set(ENV{PATH} "${LIBTIFF_DIR}:$ENV{PATH}") -endif() diff --git a/third_party/libtiff/test/ascii_tag.c b/third_party/libtiff/test/ascii_tag.c deleted file mode 100644 index df29045..0000000 --- a/third_party/libtiff/test/ascii_tag.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test ASCII tags read/write functions. - */ - -#include "tif_config.h" - -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -static const char filename[] = "ascii_test.tiff"; - -static const struct -{ - ttag_t tag; - const char *value; -} ascii_tags[] = {{TIFFTAG_DOCUMENTNAME, "Test TIFF image"}, - {TIFFTAG_IMAGEDESCRIPTION, "Temporary test image"}, - {TIFFTAG_MAKE, "This is not scanned image"}, - {TIFFTAG_MODEL, "No scanner"}, - {TIFFTAG_PAGENAME, "Test page"}, - {TIFFTAG_SOFTWARE, "Libtiff library"}, - {TIFFTAG_DATETIME, "2004:09:10 16:09:00"}, - {TIFFTAG_ARTIST, "Andrey V. Kiselev"}, - {TIFFTAG_HOSTCOMPUTER, "Debian GNU/Linux (Sarge)"}, - {TIFFTAG_TARGETPRINTER, "No printer"}, - {TIFFTAG_COPYRIGHT, "Copyright (c) 2004, Andrey Kiselev"}, - {TIFFTAG_FAXSUBADDRESS, "Fax subaddress"}, - /* DGN tags */ - {TIFFTAG_UNIQUECAMERAMODEL, "No camera"}, - {TIFFTAG_CAMERASERIALNUMBER, "1234567890"}}; -#define NTAGS (sizeof(ascii_tags) / sizeof(ascii_tags[0])) - -static const char ink_names[] = "Red\0Green\0Blue"; -const int ink_names_size = 15; - -int main() -{ - TIFF *tif; - size_t i; - unsigned char buf[] = {0, 127, 255}; - char *value; - - /* Test whether we can write tags. */ - tif = TIFFOpen(filename, "w"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, sizeof(buf))) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - for (i = 0; i < NTAGS; i++) - { - if (!TIFFSetField(tif, ascii_tags[i].tag, ascii_tags[i].value)) - { - fprintf(stderr, "Can't set tag %" PRIu32 ".\n", ascii_tags[i].tag); - goto failure; - } - } - - /* InkNames tag has special form, so we handle it separately. */ - if (!TIFFSetField(tif, TIFFTAG_NUMBEROFINKS, 3)) - { - fprintf(stderr, "Can't set tag %d (NUMBEROFINKS).\n", - TIFFTAG_NUMBEROFINKS); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_INKNAMES, ink_names_size, ink_names)) - { - fprintf(stderr, "Can't set tag %d (INKNAMES).\n", TIFFTAG_INKNAMES); - goto failure; - } - - /* Write dummy pixel data. */ - if (TIFFWriteScanline(tif, buf, 0, 0) == -1) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - TIFFClose(tif); - - /* Ok, now test whether we can read written values. */ - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s.\n", filename); - return 1; - } - - for (i = 0; i < NTAGS; i++) - { - if (!TIFFGetField(tif, ascii_tags[i].tag, &value) || - strcmp(value, ascii_tags[i].value)) - { - fprintf(stderr, "Can't get tag %" PRIu32 ".\n", ascii_tags[i].tag); - goto failure; - } - } - - if (!TIFFGetField(tif, TIFFTAG_INKNAMES, &value) || - memcmp(value, ink_names, ink_names_size)) - { - fprintf(stderr, "Can't get tag %d (INKNAMES).\n", TIFFTAG_INKNAMES); - goto failure; - } - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - return 0; - -failure: - /* - * Something goes wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - return 1; -} diff --git a/third_party/libtiff/test/check_tag.c b/third_party/libtiff/test/check_tag.c deleted file mode 100644 index 66dcbb9..0000000 --- a/third_party/libtiff/test/check_tag.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Helper testing routines. - */ - -#include "tiffio.h" - -int CheckShortField(TIFF *tif, const ttag_t field, const uint16_t value) -{ - uint16_t tmp = 123; - - if (!TIFFGetField(tif, field, &tmp)) - { - fprintf(stderr, "Problem fetching tag %" PRIu32 ".\n", field); - return -1; - } - if (tmp != value) - { - fprintf(stderr, "Wrong SHORT value fetched for tag %" PRIu32 ".\n", - field); - return -1; - } - - return 0; -} - -int CheckShortPairedField(TIFF *tif, const ttag_t field, const uint16_t *values) -{ - uint16_t tmp[2] = {123, 456}; - - if (!TIFFGetField(tif, field, tmp, tmp + 1)) - { - fprintf(stderr, "Problem fetching tag %" PRIu32 ".\n", field); - return -1; - } - if (tmp[0] != values[0] || tmp[1] != values[1]) - { - fprintf(stderr, "Wrong SHORT PAIR fetched for tag %" PRIu32 ".\n", - field); - return -1; - } - - return 0; -} - -int CheckLongField(TIFF *tif, const ttag_t field, const uint32_t value) -{ - uint32_t tmp = 123; - - if (!TIFFGetField(tif, field, &tmp)) - { - fprintf(stderr, "Problem fetching tag %" PRIu32 ".\n", field); - return -1; - } - if (tmp != value) - { - fprintf(stderr, "Wrong LONG value fetched for tag %" PRIu32 ".\n", - field); - return -1; - } - - return 0; -} diff --git a/third_party/libtiff/test/common.sh b/third_party/libtiff/test/common.sh deleted file mode 100644 index 3d8e653..0000000 --- a/third_party/libtiff/test/common.sh +++ /dev/null @@ -1,126 +0,0 @@ -# Common code fragment for tests -# -srcdir=${srcdir:-.} -BUILDDIR=`pwd` -SRCDIR=`dirname $0` -SRCDIR=`cd $SRCDIR && pwd` -TOPSRCDIR=`cd $srcdir/.. && pwd` -TOOLS=`cd ../tools && pwd` -IMAGES="${SRCDIR}/images" -REFS="${SRCDIR}/refs" - -# Aliases for built tools -FAX2PS=${TOOLS}/fax2ps -FAX2TIFF=${TOOLS}/fax2tiff -PAL2RGB=${TOOLS}/pal2rgb -PPM2TIFF=${TOOLS}/ppm2tiff -RAW2TIFF=${TOOLS}/raw2tiff -RGB2YCBCR=${TOOLS}/rgb2ycbcr -THUMBNAIL=${TOOLS}/thumbnail -TIFF2BW=${TOOLS}/tiff2bw -TIFF2PDF=${TOOLS}/tiff2pdf -TIFF2PS=${TOOLS}/tiff2ps -TIFF2RGBA=${TOOLS}/tiff2rgba -TIFFCMP=${TOOLS}/tiffcmp -TIFFCP=${TOOLS}/tiffcp -TIFFCROP=${TOOLS}/tiffcrop -TIFFDITHER=${TOOLS}/tiffdither -TIFFDUMP=${TOOLS}/tiffdump -TIFFINFO=${TOOLS}/tiffinfo -TIFFMEDIAN=${TOOLS}/tiffmedian -TIFFSET=${TOOLS}/tiffset -TIFFSPLIT=${TOOLS}/tiffsplit - -# Aliases for input test files -IMG_MINISBLACK_1C_16B=${IMAGES}/minisblack-1c-16b.tiff -IMG_MINISBLACK_1C_8B=${IMAGES}/minisblack-1c-8b.tiff -IMG_MINISWHITE_1C_1B=${IMAGES}/miniswhite-1c-1b.tiff -IMG_PALETTE_1C_1B=${IMAGES}/palette-1c-1b.tiff -IMG_PALETTE_1C_4B=${IMAGES}/palette-1c-4b.tiff -IMG_PALETTE_1C_8B=${IMAGES}/palette-1c-8b.tiff -IMG_RGB_3C_16B=${IMAGES}/rgb-3c-16b.tiff -IMG_RGB_3C_8B=${IMAGES}/rgb-3c-8b.tiff -IMG_MINISBLACK_2C_8B_ALPHA=${IMAGES}/minisblack-2c-8b-alpha.tiff -IMG_QUAD_LZW_COMPAT=${IMAGES}/quad-lzw-compat.tiff -IMG_LZW_SINGLE_STROP=${IMAGES}/lzw-single-strip.tiff - -IMG_MINISWHITE_1C_1B_PBM=${IMAGES}/miniswhite-1c-1b.pbm -IMG_MINISBLACK_1C_8B_PGM=${IMAGES}/minisblack-1c-8b.pgm -IMG_RGB_3C_16B_PPM=${IMAGES}/rgb-3c-16b.ppm -IMG_RGB_3C_8B_PPM=${IMAGES}/rgb-3c-8b.ppm -IMG_TIFF_WITH_SUBIFD_CHAIN=${IMAGES}/tiff_with_subifd_chain.tif - -# All uncompressed image files -IMG_UNCOMPRESSED="${IMG_MINISBLACK_1C_16B} ${IMG_MINISBLACK_1C_8B} ${IMG_MINISWHITE_1C_1B} ${IMG_PALETTE_1C_1B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_8B} ${IMG_RGB_3C_8B} ${IMG_RGB_3C_16B}" - -# -# Test a simple convert-like command. -# -# f_test_convert command infile outfile -f_test_convert () -{ - command=$1 - infile=$2 - outfile=$3 - rm -f $outfile - echo "$MEMCHECK $command $infile $outfile" - eval $MEMCHECK $command $infile $outfile - status=$? - if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status - fi -} - -# -# Test a simple command which sends output to stdout -# -# f_test_stdout command infile outfile -f_test_stdout () -{ - command=$1 - infile=$2 - outfile=$3 - rm -f $outfile - echo "$MEMCHECK $command $infile > $outfile" - eval $MEMCHECK $command $infile > $outfile - status=$? - if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status - fi -} - -# -# Execute a simple command (e.g. tiffinfo) with one input file -# -# f_test_exec command infile -f_test_reader () -{ - command=$1 - infile=$2 - echo "$MEMCHECK $command $infile" - eval $MEMCHECK $command $infile - status=$? - if [ $status != 0 ] ; then - echo "Returned failed status $status!" - exit $status - fi -} - -# -# Execute tiffinfo on a specified file to validate it -# -# f_tiffinfo_validate infile -f_tiffinfo_validate () -{ - f_test_reader "$TIFFINFO -D" $1 -} - -if test "$VERBOSE" = TRUE -then - set -x -fi - diff --git a/third_party/libtiff/test/custom_dir.c b/third_party/libtiff/test/custom_dir.c deleted file mode 100644 index 6eb2180..0000000 --- a/third_party/libtiff/test/custom_dir.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (c) 2012, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to handling of custom directories like EXIF. - */ - -#include "tif_config.h" -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tif_dir.h" -#include "tiffio.h" -#include "tifftest.h" - -static const char filename[] = "custom_dir.tif"; - -#define SPP 3 /* Samples per pixel */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -static TIFFField customFields[] = { - {TIFFTAG_IMAGEWIDTH, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, - 1, 0, "Custom1", NULL}, - {TIFFTAG_DOTRANGE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, FIELD_CUSTOM, - 1, 0, "Custom2", NULL}, -}; - -static TIFFFieldArray customFieldArray = {tfiatOther, 0, 2, customFields}; - -int main() -{ - TIFF *tif; - unsigned char buf[SPP] = {0, 127, 255}; - uint64_t dir_offset = 0, dir_offset2 = 0; - uint64_t read_dir_offset = 0, read_dir_offset2 = 0; - uint64_t *dir_offset2_ptr = NULL; - char *ascii_value; - uint16_t count16 = 0; - - /* We write the main directory as a simple image. */ - tif = TIFFOpen(filename, "w+"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - /* Write dummy pixel data. */ - if (TIFFWriteScanline(tif, buf, 0, 0) == -1) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "TIFFWriteDirectory() failed.\n"); - goto failure; - } - - /* - * Now create an EXIF directory. - */ - if (TIFFCreateEXIFDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - goto failure; - } - - if (!TIFFSetField(tif, EXIFTAG_SPECTRALSENSITIVITY, - "EXIF Spectral Sensitivity")) - { - fprintf(stderr, "Can't write SPECTRALSENSITIVITY\n"); - goto failure; - } - - if (!TIFFWriteCustomDirectory(tif, &dir_offset)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - goto failure; - } - - /* - * Now create a custom directory with tags that conflict with mainline - * TIFF tags. - */ - - TIFFFreeDirectory(tif); - if (TIFFCreateCustomDirectory(tif, &customFieldArray) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - goto failure; - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, "*Custom1")) - { /* not really IMAGEWIDTH */ - fprintf(stderr, "Can't write pseudo-IMAGEWIDTH.\n"); - goto failure; - } - - if (!TIFFSetField(tif, TIFFTAG_DOTRANGE, "*Custom2")) - { /* not really DOTWIDTH */ - fprintf(stderr, "Can't write pseudo-DOTWIDTH.\n"); - goto failure; - } - - if (!TIFFWriteCustomDirectory(tif, &dir_offset2)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - goto failure; - } - - /* - * Go back to the first directory, and add the EXIFIFD pointer. - */ - TIFFSetDirectory(tif, 0); - TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset); - TIFFSetField(tif, TIFFTAG_SUBIFD, 1, &dir_offset2); - - TIFFClose(tif); - - /* Ok, now test whether we can read written values in the EXIF directory. */ - tif = TIFFOpen(filename, "r"); - - TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset); - if (read_dir_offset != dir_offset) - { - fprintf(stderr, "Did not get expected EXIFIFD.\n"); - goto failure; - } - - TIFFGetField(tif, TIFFTAG_SUBIFD, &count16, &dir_offset2_ptr); - read_dir_offset2 = dir_offset2_ptr[0]; - if (read_dir_offset2 != dir_offset2 || count16 != 1) - { - fprintf(stderr, "Did not get expected SUBIFD.\n"); - goto failure; - } - - if (!TIFFReadEXIFDirectory(tif, read_dir_offset)) - { - fprintf(stderr, "TIFFReadEXIFDirectory() failed.\n"); - goto failure; - } - - if (!TIFFGetField(tif, EXIFTAG_SPECTRALSENSITIVITY, &ascii_value)) - { - fprintf(stderr, "reading SPECTRALSENSITIVITY failed.\n"); - goto failure; - } - - if (strcmp(ascii_value, "EXIF Spectral Sensitivity") != 0) - { - fprintf(stderr, "got wrong SPECTRALSENSITIVITY value.\n"); - goto failure; - } - - /* Try reading the Custom directory */ - - if (!TIFFReadCustomDirectory(tif, read_dir_offset2, &customFieldArray)) - { - fprintf(stderr, "TIFFReadCustomDirectory() failed.\n"); - goto failure; - } - - if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ascii_value)) - { - fprintf(stderr, "reading pseudo-IMAGEWIDTH failed.\n"); - goto failure; - } - - if (strcmp(ascii_value, "*Custom1") != 0) - { - fprintf(stderr, "got wrong pseudo-IMAGEWIDTH value.\n"); - goto failure; - } - - if (!TIFFGetField(tif, TIFFTAG_DOTRANGE, &ascii_value)) - { - fprintf(stderr, "reading pseudo-DOTRANGE failed.\n"); - goto failure; - } - - if (strcmp(ascii_value, "*Custom2") != 0) - { - fprintf(stderr, "got wrong pseudo-DOTRANGE value.\n"); - goto failure; - } - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - return 0; - -failure: - /* - * Something goes wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - return 1; -} diff --git a/third_party/libtiff/test/custom_dir_EXIF_231.c b/third_party/libtiff/test/custom_dir_EXIF_231.c deleted file mode 100644 index 437663a..0000000 --- a/third_party/libtiff/test/custom_dir_EXIF_231.c +++ /dev/null @@ -1,1971 +0,0 @@ -/* - * Copyright (c) 2012, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * -- Module copied from custom_dir.c -- - *=========== Purpose - *=================================================================================== - * Extended and amended version for testing of EXIF 2.32, GPS and handling of - *custom fields. EXIF 2.32 and GPS are defined in amended files tif_dirinfo.c, - *tif_dirread.c, tiff.h, tiffio.h, tif_dir.h, tif_dir.c - * - *-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values are - *defined as double precision and need to be written and also read in double - *precision! In order to maintain this code for both cases, it is checked above - *if the TiffLibrary is compiled with the new interface with Rational2Double or - *still uses the old definitions, by setting blnIsRational2Double above. - * - */ - -/*------------ - * This version writes the GPS and EXIF tags correctly, without additional - main-IFD and parameters! - * In contrary, custom_dir.c does write additional main-IFD and parameters to - file. - -------------*/ - -#define FOR_AUTO_TESTING -#ifdef FOR_AUTO_TESTING -/* Only for automake and CMake infrastructure the test should: - a.) delete any written testfiles when test passed (otherwise autotest - will fail) b.) goto failure, if any failure is detected, which is not - necessary when test is initiated manually for debugging -*/ -#define GOTOFAILURE goto failure; -#define GOTOFAILURE_GPS goto failure; -#define GOTOFAILURE_ALL_EXIF goto failure; -#else -#define GOTOFAILURE -#define GOTOFAILURE_GPS -#define GOTOFAILURE_ALL_EXIF -#endif - -#ifdef _MSC_VER -#pragma warning(disable : 4101) -#endif - -#include "tif_config.h" //necessary for linux compiler - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -int write_test_tiff(TIFF *tif, const char *filenameRead); - -static const char filename[] = "custom_dir_EXIF_231.tif"; -static const char filenameBigTiff[] = "custom_dir_EXIF_231_Big.tif"; - -#define SPP 3 /* Samples per pixel */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -int main() -{ - TIFF *tif; - int ret, ret1, ret2; - - fprintf(stderr, "==== Test automatically if all EXIF and GPS tags are " - "written/read correctly. ====\n"); - /* --- Test with Classic-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filename); - if (ret != 0 && errno != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filename); - } - - /* We write the main directory as a simple image. */ - tif = TIFFOpen(filename, "w+"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); - ret1 = write_test_tiff(tif, filename); - - if (ret1 > 0) - return (ret1); - - /*--- Test with BIG-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filenameBigTiff); - if (ret != 0 && errno != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); - } - - tif = TIFFOpen(filenameBigTiff, "w8"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); - return 1; - } - fprintf(stderr, "\n\n-------- Test with BigTIFF started ----------\n"); - ret2 = write_test_tiff(tif, filenameBigTiff); - - if (ret2 > 0) - return (ret2 + 10); - else - return (ret2); - -} /* main() */ - -int write_test_tiff(TIFF *tif, const char *filenameRead) -{ - unsigned char buf[SPP] = {0, 127, 255}; - uint64_t dir_offset = 0; - uint64_t dir_offset_GPS = 0, dir_offset_EXIF = 0; - uint64_t read_dir_offset = 0; - /*-- Additional variables --*/ - int retCode, retCode2; - unsigned char exifVersion[4] = { - '0', '2', '3', - '1'}; /* EXIF 2.31 version is 4 characters of a string! */ - unsigned char gpsVersion[4] = {2, 2, 0, 1}; /* GPS Version is 4 numbers! */ - unsigned char *pGpsVersion; - float auxFloat = 0.0f; - double auxDouble = 0.0; - char auxChar = 0; - uint32_t auxUint32 = 0; - short auxShort = 0; - int32_t auxInt32 = 0; - void *pVoid; - int blnIsRational2Double; - - int i, j; - int32_t nTags; - - const TIFFFieldArray *tFieldArray; - uint32_t tTag; - TIFFDataType tType; - short tWriteCount; - TIFFSetGetFieldType tSetFieldType; - char *tFieldName; - const TIFFField *fip; - - char blnFillGPSManually = 1; - -#define STRSIZE 1000 -#define N_SIZE 120 -#define VARIABLE_ARRAY_SIZE 6 - - /* -- Test data for writing -- */ - char auxCharArrayW[N_SIZE]; - short auxShortArrayW[N_SIZE]; - int32_t auxInt32ArrayW[N_SIZE]; - float auxFloatArrayW[N_SIZE]; - double auxDoubleArrayW[N_SIZE]; - char auxTextArrayW[N_SIZE][STRSIZE]; - double auxDoubleArrayGPS1[3] = {1.0 / 7.0, 61.23456789012345, 62.0}; - double auxDoubleArrayGPS2[3] = {1.0 / 19.0, 88.34434, - 15.12345678901234567890}; - double auxDoubleArrayGPSTime[3] = {22.0, 17.0, 15.3456789}; - double auxDoubleGPSAltitude = 3456.0; - double auxDoubleGPSDirection = 63.7; - float auxFloatArrayN1[3] = {1.0f / 7.0f, 61.23456789012345f, 62.3f}; - float auxFloatArrayN2[3] = {-1.0f / 7.0f, -61.23456789012345f, -62.3f}; - float auxFloatArrayResolutions[4] = {5.456789f, 6.666666f, 0.0033f, - 5.0f / 213.0f}; - - /* -- Variables for reading -- */ - uint16_t count16 = 0; - union - { - int32_t Int32; - short Short1; - short Short2[2]; - char Char[4]; - } unionInt32; - union - { - double dbl; - float flt1; - float flt2; - } auxDblUnion; - void *pVoidArray; - char *pAscii; - char auxCharArray[2 * STRSIZE]; - short auxShortArray[2 * N_SIZE]; - int32_t auxInt32Array[2 * N_SIZE]; - float auxFloatArray[2 * N_SIZE]; - double auxDoubleArray[2 * N_SIZE]; - double dblDiff, dblDiffLimit; -#define RATIONAL_EPS \ - (1.0 / 30000.0) /* reduced difference of rational values, approx 3.3e-5 */ - - /*-- Fill test data arrays for writing ----------- */ - for (i = 0; i < N_SIZE; i++) - { - sprintf(auxTextArrayW[i], - "N%d-String-%d_tttttttttttttttttttttttttttttx", i, i); - } - for (i = 0; i < N_SIZE; i++) - { - auxCharArrayW[i] = (char)(i + 1); - } - for (i = 0; i < N_SIZE; i++) - { - auxShortArrayW[i] = (short)(i + 1) * 7; - } - for (i = 0; i < N_SIZE; i++) - { - auxInt32ArrayW[i] = (i + 1) * 133; - } - for (i = 0; i < N_SIZE; i++) - { - auxFloatArrayW[i] = (float)((i + 1) * 133) / 3.3f; - } - for (i = 0; i < N_SIZE; i++) - { - auxDoubleArrayW[i] = (double)((i + 1) * 3689) / 4.5697; - } - - /*-- Setup standard tags of a simple tiff file --*/ - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - if (!TIFFSetField(tif, TIFFTAG_XRESOLUTION, auxFloatArrayResolutions[0])) - { - fprintf(stderr, "Can't set TIFFTAG_XRESOLUTION tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_YRESOLUTION, auxFloatArrayResolutions[1])) - { - fprintf(stderr, "Can't set TIFFTAG_YRESOLUTION tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_XPOSITION, auxFloatArrayResolutions[2])) - { - fprintf(stderr, "Can't set TIFFTAG_XPOSITION tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_YPOSITION, auxFloatArrayResolutions[3])) - { - fprintf(stderr, "Can't set TIFFTAG_YPOSITION tag.\n"); - goto failure; - } - -#define ADDITIONAL_TAGS -#ifdef ADDITIONAL_TAGS - /*-- Additional tags to check Rational standard tags, which are also defined - * as FIELD_CUSTOM */ - - /*- TIFFTAG_INKSET is a SHORT parameter (TIFF_SHORT, TIFF_SETGET_UINT16) - * with field_bit=FIELD_CUSTOM !! -*/ - if (!TIFFSetField(tif, TIFFTAG_INKSET, 34)) - { - fprintf(stderr, "Can't set TIFFTAG_INKSET tag.\n"); - goto failure; - } - - /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter ( TIFF_FLOAT, - * TIFF_SETGET_FLOAT) with field_bit=FIELD_CUSTOM !! -*/ - /* - can be written with Double but has to be read with float parameter */ -#define PIXAR_FOVCOT_VAL 5.123456789123456789 - auxFloat = (float)PIXAR_FOVCOT_VAL; - auxDouble = (double)PIXAR_FOVCOT_VAL; - if (!TIFFSetField(tif, TIFFTAG_PIXAR_FOVCOT, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_PIXAR_FOVCOT tag.\n"); - goto failure; - } - /*- TIFFTAG_STONITS is a DOUBLE parameter (TIFF_DOUBLE, TIFF_SETGET_DOUBLE) - * with field_bit=FIELD_CUSTOM! Only TIFFTAG_STONITS is a TIFF_DOUBLE, which - * has to be read as DOUBLE!! - */ -#define STONITS_VAL 6.123456789123456789 - auxDouble = STONITS_VAL; - auxFloat = (float)auxDouble; - if (!TIFFSetField(tif, TIFFTAG_STONITS, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_STONITS tag.\n"); - goto failure; - } - - /*- TIFFTAG_YCBCRPOSITIONING is a SHORT parameter */ - auxInt32 = auxShort = 5; - if (!TIFFSetField(tif, TIFFTAG_YCBCRPOSITIONING, auxInt32)) - { - fprintf(stderr, "Can't set TIFFTAG_YCBCRPOSITIONING tag.\n"); - goto failure; - } - - /* - TIFFTAG_BESTQUALITYSCALE is a Rational parameter, FIELD_CUSTOM and - * TIFF_SETGET_DOUBLE */ - /* With Rational2Double upgrade tag is redefined to TIFF_SETGET_FLOAT, but - * can be still written with double. */ -#define BESTQUALITYSCALE_VAL 15.3 - auxDouble = BESTQUALITYSCALE_VAL; - if (!TIFFSetField(tif, TIFFTAG_BESTQUALITYSCALE, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_BESTQUALITYSCALE tag.\n"); - goto failure; - } - - /* - TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT */ - if (!TIFFSetField(tif, TIFFTAG_BASELINENOISE, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_BASELINENOISE tag.\n"); - goto failure; - } - - /*--- For static or variable ARRAYs the case is different ---*/ - /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter - * TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable - * length of array. */ - if (!TIFFSetField(tif, TIFFTAG_DECODE, 3, auxFloatArrayN2)) - { - fprintf(stderr, "Can't set TIFFTAG_DECODE tag.\n"); - goto failure; - } - - /*- Variable Array: TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT */ - if (!TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 3, auxFloatArrayN1)) - { - fprintf(stderr, "Can't set TIFFTAG_BLACKLEVEL tag.\n"); - goto failure; - } - - /*- Fixed Array: TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, - * TIFF_SETGET_C0_FLOAT */ - if (!TIFFSetField(tif, TIFFTAG_DEFAULTCROPSIZE, &auxFloatArrayW[0])) - { - fprintf(stderr, "Can't set TIFFTAG_DEFAULTCROPSIZE tag.\n"); - goto failure; - } -#endif /* -- ADDITIONAL_TAGS -- */ - - /*================== Rational2Double Interface Check =====================*/ - /*-- Check, if the TiffLibrary is compiled with the new interface with - Rational2Double or still uses the old definitions. For that, - TIFF_RATIONAL tags with FIELD_CUSTOM are changed from TIFF_SETGET_DOUBLE - to TIFF_SETGET_FLOAT for the new interface in order to prevent the old - reading behavior. Tags to check: TIFFTAG_BESTQUALITYSCALE, - TIFFTAG_BASELINENOISE, TIFFTAG_BASELINESHARPNESS - */ - fip = TIFFFindField(tif, TIFFTAG_BESTQUALITYSCALE, TIFF_ANY); - tSetFieldType = fip->set_get_field_type; - if (tSetFieldType == TIFF_SETGET_DOUBLE) - { - blnIsRational2Double = FALSE; - } - else - { - blnIsRational2Double = TRUE; - fprintf(stderr, "-- Rational2Double from TIFF tag detected --\n"); - } - - /*================== Write GPS and EXIF tags =====================*/ - - /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve - * space for final dir_offset value, */ - /* which is properly written at the end. */ - dir_offset = 0; /* Zero, in case no Custom-IFD is written */ - -#define WRITE_GPS_TAGS -#ifdef WRITE_GPS_TAGS - if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset)) - { - fprintf(stderr, "Can't write TIFFTAG_GPSIFD\n"); - } -#endif - - /*------- And also do the same for the EXIF IFD tag here, because we have to - * save the main directory next ------*/ - /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve - * space for final dir_offset value, which is properly written at the end. - */ -#define WRITE_EXIF_TAGS -#ifdef WRITE_EXIF_TAGS - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset)) - { - fprintf(stderr, "Can't write TIFFTAG_EXIFIFD\n"); - } -#endif - -#ifndef WRITEPIXELLAST - /*-- Write dummy pixel data. --*/ - if (TIFFWriteScanline(tif, buf, 0, 0) < 0) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } -#endif - -#ifdef WRITE_GPS_TAGS -#define READ_GPS_TAGS - /*================== Write GPS tags =====================*/ - - /*-- Save current tiff-directory to file before directory is changed. - * Otherwise it will be lost! */ - /* The tif-structure is overwritten/ freshly initialized by any - * "CreateDirectory" */ - /*retCode = TIFFCheckpointDirectory(tif);*/ /* does not cleanup - Tiff-Structure */ - retCode = TIFFWriteDirectory(tif); /* cleanup Tiff-structure */ - - /*-- Now create a GPS directory. */ - if (TIFFCreateGPSDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateGPSDirectory() failed.\n"); - goto failure; - } - - if (!TIFFSetField(tif, GPSTAG_VERSIONID, gpsVersion)) - { - fprintf(stderr, "Can't write GPSTAG_VERSIONID\n"); - goto failure; - } - - if (blnFillGPSManually) - { - /*================= Write manually valid data to the GPS fields - * ==============*/ - if (!TIFFSetField(tif, GPSTAG_LATITUDEREF, "N\0")) - { - fprintf(stderr, "Can't write GPSTAG_LATITUDEREF\n"); - goto failure; - } - /*-- Unfortunately, Rational values are defined as SETGET_DOUBLE but are - * internally always stored as float. Single Rational values do not - * matter for writing, because TIFFSetField() uses va_arg() which - * performs "variables promotion" from type float to type double! - * However, for reading of Rational values ONLY float-variables are - * allowed - in contrary to the SETGET_DOUBLE specification at - * tiffFields[] in tif_dirinfo.c. - */ - /*-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG - * values are defined as double precision and need to be written and - * also read in double precision! In order to maintain this code for - * both cases, it is checked above if the TiffLibrary is compiled with - * the new interface with Rational2Double or still uses the old - * definitions, by setting blnIsRational2Double above. - */ - if (blnIsRational2Double) - { - fprintf(stderr, - "-- GPS tags are written using Rational2Double --\n"); - } - else - { - fprintf(stderr, "-- GPS tags are written using standard --\n"); - } - if (!blnIsRational2Double) - { - for (j = 0; j < 3; j++) - auxFloatArray[j] = (float)auxDoubleArrayGPS1[j]; - if (!TIFFSetField(tif, GPSTAG_LATITUDE, auxFloatArray)) - { - fprintf(stderr, "Can't write GPSTAG_LATITUDE\n"); - goto failure; - } - } - else - { - /* Rational2Double interface for GPSTAG */ - if (!TIFFSetField(tif, GPSTAG_LATITUDE, auxDoubleArrayGPS1)) - { - fprintf(stderr, "Can't write GPSTAG_LATITUDE\n"); - goto failure; - } - } - if (!TIFFSetField(tif, GPSTAG_LONGITUDEREF, "W\0")) - { - fprintf(stderr, "Can't write GPSTAG_LONGITUDEREF\n"); - goto failure; - } - if (!blnIsRational2Double) - { - for (j = 0; j < 3; j++) - auxFloatArray[j] = (float)auxDoubleArrayGPS2[j]; - if (!TIFFSetField(tif, GPSTAG_LONGITUDE, auxFloatArray)) - { - fprintf(stderr, "Can't write GPSTAG_LONGITUDE\n"); - goto failure; - } - } - else - { - /* Rational2Double interface for GPSTAG */ - if (!TIFFSetField(tif, GPSTAG_LONGITUDE, auxDoubleArrayGPS2)) - { - fprintf(stderr, "Can't write GPSTAG_LONGITUDE\n"); - goto failure; - } - } - /*-- AltitudeRef: default is above sea level!! */ - if (!TIFFSetField(tif, GPSTAG_ALTITUDEREF, 0)) - { - fprintf(stderr, "Can't write GPSTAG_ALTITUDEREF\n"); - goto failure; - } - if (!TIFFSetField(tif, GPSTAG_ALTITUDE, auxDoubleGPSAltitude)) - { - fprintf(stderr, "Can't write GPSTAG_ALTITUDE\n"); - goto failure; - } - /*-- TimeStamp is only hh:mm:ss. See also DateTime string */ - if (!TIFFSetField(tif, GPSTAG_TIMESTAMP, auxDoubleArrayGPSTime)) - { - fprintf(stderr, "Can't write GPSTAG_TIMESTAMP\n"); - goto failure; - } - if (!TIFFSetField(tif, GPSTAG_DATESTAMP, "2012:11:04")) - { - fprintf(stderr, "Can't write GPSTAG_DATESTAMP\n"); - goto failure; - } - - if (!TIFFSetField(tif, GPSTAG_IMGDIRECTIONREF, "T\0")) - { - fprintf(stderr, "Can't write GPSTAG_IMGDIRECTIONREF\n"); - goto failure; - } - if (!TIFFSetField(tif, GPSTAG_IMGDIRECTION, auxDoubleGPSDirection)) - { - fprintf(stderr, "Can't write GPSTAG_IMGDIRECTION\n"); - goto failure; - } - - /*-- Type TIFF_UNDEFINED */ - if (!TIFFSetField(tif, GPSTAG_PROCESSINGMETHOD, 3, &auxCharArrayW[10])) - { - fprintf(stderr, "Can't write GPSTAG_PROCESSINGMETHOD\n"); - goto failure; - } - if (!TIFFSetField(tif, GPSTAG_AREAINFORMATION, 4, &auxCharArrayW[20])) - { - fprintf(stderr, "Can't write GPSTAG_AREAINFORMATION\n"); - goto failure; - } - - /*-- PSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, - * TIFF_SETGET_UINT16 */ - if (!TIFFSetField(tif, GPSTAG_DIFFERENTIAL, auxShortArrayW[5])) - { - fprintf(stderr, "Can't write GPSTAG_DIFFERENTIAL\n"); - goto failure; - } - - /* GPSTAG_GPSHPOSITIONINGERROR , 1, 1, TIFF_RATIONAL , 0, - * TIFF_SETGET_DOUBLE but here written in float-precision */ -#define GPSHPOSITIONINGERROR_VAL 0.369 - auxFloat = (float)GPSHPOSITIONINGERROR_VAL; - if (!TIFFSetField(tif, GPSTAG_GPSHPOSITIONINGERROR, auxFloat)) - { - fprintf(stderr, "Can't write GPSTAG_GPSHPOSITIONINGERROR\n"); - goto failure; - } - } - else - { - /*================= Write arbitrary data to the GPS fields - * ==============*/ - - /*-- Get array, where GPS tag fields are defined --*/ - tFieldArray = _TIFFGetGpsFields(); - nTags = tFieldArray->count; - - /*-- TODO: fill in the for / switch part of EXIF writing, when finished - * and tested!! */ - - } /*-- if (blnFillGPSManually) --*/ - - /*-- GPS - write custom directory GPS into file...---*/ - /* (Get back the offset of GPS directory) */ - if (!TIFFWriteCustomDirectory(tif, &dir_offset_GPS)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with GPS failed.\n"); - goto failure; - } - - /*--- CheckpointDirectory at this place generates a second Main-IFD!!! */ - /* retCode = TIFFCheckpointDirectory(tif); */ - - /*-- Set / reload previously saved main directory from file ---*/ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "TIFFSetDirectory() within GPS failed.\n"); - goto failure; - } - - /*-- Write GPS tag reference / offset into GPSIFD tag in main directory --*/ - if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset_GPS)) - { - fprintf(stderr, "Can't write TIFFTAG_GPSIFD\n"); - goto failure; - } - - /*=============== END writing GPS tags ==========================*/ -#endif /*-- WRITE_GPS_TAGS --*/ - - /*================== Write EXIF 2.31 tags =====================*/ - - /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve - * space for final dir_offset value, */ - /* which is properly written at the end.*/ - /*- We did this already above together with the GPS IFD-tag. Otherwise we - * would do this here !! --------*/ - /* if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset )) { - fprintf (stderr, "Can't write TIFFTAG_EXIFIFD\n" ); - } - */ - -#ifdef WRITE_EXIF_TAGS -#define READ_EXIF_TAGS - /*-- Save current tiff-directory to file before directory is changed. - * Otherwise it will be lost! The tif-structure is overwritten/ freshly - * initialized by any "CreateDirectory" - */ - - /*----- What is needed here ??? ---- - * In custom_dir.c only TIFFFreeDirectory( tif ); is used to set - *fields of another Sub-Directory TIFFFreeDirectory(tif); *-- Release - *storage associated with a directory, especially custom-fields. - *-- Using only TIFFFreeDirectory() here leads to an error!! - *-- Using here TIFFCheckpointDirectory() leads to an additional Main-IFD ?? - */ - /*retCode = TIFFCheckpointDirectory(tif);*/ /* does not cleanup - Tiff-Structure */ - retCode = TIFFWriteDirectory(tif); /* cleanup Tiff-structure */ - - /*-- Now create an EXIF directory. */ - if (TIFFCreateEXIFDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - goto failure; - } - -#define WRITE_ALL_EXIF_TAGS -#ifdef WRITE_ALL_EXIF_TAGS -#define READ_ALL_EXIF_TAGS - /*================= EXIF: Write arbitrary data to the EXIF fields - * ==============*/ - /*-- Get array, where EXIF tag fields are defined - * EXIF tags are written automatically with the defined precision - * according to its tSetFieldType using the code below --*/ - tFieldArray = _TIFFGetExifFields(); - nTags = tFieldArray->count; - - for (i = 0; i < nTags; i++) - { - bool deferredSetField = false; - tTag = tFieldArray->fields[i].field_tag; - tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ - tWriteCount = tFieldArray->fields[i].field_writecount; - tSetFieldType = tFieldArray->fields[i] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - tFieldName = tFieldArray->fields[i].field_name; - pVoid = NULL; - - /*-- dependent on set_get_field_type write value --*/ - switch (tSetFieldType) - { - case TIFF_SETGET_ASCII: - /* Either the stringlength is defined as a fixed length in - * .field_writecount or a NULL-terminated string is used. */ - /* Shorter strings than in auxTextArraxW need a - * NULL-termination. Therefore copy the string. */ - if (tWriteCount > 0) - auxInt32 = tWriteCount - 1; - else - auxInt32 = (int32_t)strlen(auxTextArrayW[i]) - 1; - strncpy(auxCharArray, auxTextArrayW[i], auxInt32); - auxCharArray[auxInt32] = 0; - if (!TIFFSetField(tif, tTag, auxCharArray)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - break; - case TIFF_SETGET_UINT8: - case TIFF_SETGET_UINT16: - case TIFF_SETGET_UINT32: - case TIFF_SETGET_IFD8: - case TIFF_SETGET_INT: - /*-- All those can be written with char, short or long - * parameter. Only value range should be in line. */ - if (!TIFFSetField(tif, tTag, auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - break; - case TIFF_SETGET_SINT8: - case TIFF_SETGET_SINT16: - case TIFF_SETGET_SINT32: - /*-- All those can be written with char, short or long - * parameter. Only value range should be in line. */ - if (!TIFFSetField(tif, tTag, -1.0 * auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - break; - case TIFF_SETGET_FLOAT: - case TIFF_SETGET_DOUBLE: - if (tWriteCount == 1) - { - /*-- All single values can be written with float or double - * parameter. Only value range should be in line. */ - if (!TIFFSetField(tif, tTag, auxDoubleArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - else - { - fprintf(stderr, - "WriteCount for .set_get_field_type %d should be " - "1! %s\n", - tSetFieldType, tFieldArray->fields[i].field_name); - } - break; - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_DOUBLE: - /* _Cxx_ just defines the size of the count parameter for the - * array as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array or a - * variable array */ - if (tWriteCount == 1) - { - fprintf( - stderr, - "WriteCount for .set_get_field_type %d should be -1 or " - "greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[i].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* For arrays, distinguishing between float or double is - * essential, even for writing */ - if (tSetFieldType == TIFF_SETGET_C0_FLOAT || - tSetFieldType == TIFF_SETGET_C16_FLOAT || - tSetFieldType == TIFF_SETGET_C32_FLOAT) - pVoid = &auxFloatArrayW[i]; - else - pVoid = &auxDoubleArrayW[i]; - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFSetField(tif, tTag, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - else - { - /* special treatment of variable array */ - /* for test, use always arraysize of VARIABLE_ARRAY_SIZE - */ - if (!TIFFSetField(tif, tTag, VARIABLE_ARRAY_SIZE, - pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - } - break; - case TIFF_SETGET_C0_UINT8: - case TIFF_SETGET_C0_SINT8: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - /* For arrays, distinguishing between float or double is - * essential, even for writing */ - pVoid = &auxCharArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT16: - case TIFF_SETGET_C0_SINT16: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - pVoid = &auxShortArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT32: - case TIFF_SETGET_C0_SINT32: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - pVoid = &auxInt32ArrayW[i]; - deferredSetField = true; - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within writing switch for " - "%s.\n", - tSetFieldType, tFieldName); - }; /*-- switch() --*/ - - if (deferredSetField) - { - /* _Cxx_ just defines the size of the count parameter for the array - * as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array or a variable - * array */ - if (tWriteCount == 1) - { - fprintf(stderr, - "WriteCount for .set_get_field_type %d should be -1 or " - "greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[i].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFSetField(tif, tTag, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - else - { - /* special treatment of variable array */ - /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ - if (!TIFFSetField(tif, tTag, VARIABLE_ARRAY_SIZE, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - } - } - } /*-- for() --*/ - /*================= EXIF: END Writing arbitrary data to the EXIF fields END - * END END ==============*/ -#endif /*-- WRITE_ALL_EXIF_TAGS --*/ - - /*--- Set valid EXIF version, which is a 4 byte string --*/ - if (!TIFFSetField(tif, EXIFTAG_EXIFVERSION, exifVersion)) - { - fprintf(stderr, "Can't write EXIFTAG_EXIFVERSION\n"); - goto failure; - } - - /*-- EXIF - write custom directory EXIF into file...---*/ - /* (Get back the offset of EXIF directory) */ - if (!TIFFWriteCustomDirectory(tif, &dir_offset_EXIF)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - goto failure; - } - - /*-- Go back to the first (main) directory, and set correct value of the - * EXIFIFD pointer. */ - /* (directory is reloaded from file!) */ - TIFFSetDirectory(tif, 0); - TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset_EXIF); -#endif /*-- WRITE_EXIF_TAGS --*/ - -#ifdef WRITEPIXELLAST - /*-- Write dummy pixel data. --*/ - if (TIFFWriteScanline(tif, buf, 0, 0) < 0) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } -#endif - /*-- Write directory to file --*/ - /* Always WriteDirectory before using/creating another directory. */ - /* Not necessary before TIFFClose(), however, TIFFClose() uses - * TIFFReWriteDirectory(), which forces directory to be written at another - * location. */ - retCode = TIFFWriteDirectory(tif); - - /*-- Write File to disk and close file --*/ - /* TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be - * written at another location. */ - /* Therefore, better use TIFFWriteDirectory() before. */ - TIFFClose(tif); - - fprintf(stderr, "-------- Continue Test ---------- reading ...\n"); - - /*========================= READING ============= READING - * ========================================*/ - /* Ok, now test whether we can read written values correctly. */ - tif = TIFFOpen(filenameRead, "r"); - - /*-- Read some parameters out of the main directory --*/ - - /*-- IMAGEWIDTH and -LENGTH are defined as TIFF_SETGET_UINT32 */ - retCode = TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &auxUint32); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_IMAGEWIDTH"); - } - if (auxUint32 != width) - { - fprintf(stderr, - "Read value of IMAGEWIDTH %" PRIu32 - " differs from set value %" PRIu16 "\n", - auxUint32, width); - } - retCode = TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &auxUint32); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_IMAGELENGTH"); - } - if (auxUint32 != length) - { - fprintf(stderr, - "Read value of TIFFTAG_IMAGELENGTH %" PRIu32 - " differs from set value %" PRIu16 "\n", - auxUint32, length); - } - -#ifdef ADDITIONAL_TAGS - /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter of type FIELD_CUSTOM !! */ - retCode = TIFFGetField(tif, TIFFTAG_PIXAR_FOVCOT, &auxFloat); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_PIXAR_FOVCOT"); - } - if (auxFloat != (float)PIXAR_FOVCOT_VAL) - { - fprintf( - stderr, - "Read value of TIFFTAG_PIXAR_FOVCOT %f differs from set value %f\n", - auxFloat, PIXAR_FOVCOT_VAL); - } - - /* - TIFFTAG_BESTQUALITYSCALE is a Rational parameter, FIELD_CUSTOM and - * TIFF_SETGET_FLOAT */ - retCode = TIFFGetField(tif, TIFFTAG_BESTQUALITYSCALE, &auxFloat); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_BESTQUALITYSCALE"); - } - if (auxFloat != (float)BESTQUALITYSCALE_VAL) - { - fprintf(stderr, - "Read value of TIFFTAG_BESTQUALITYSCALE %f differs from set " - "value %f\n", - auxFloat, BESTQUALITYSCALE_VAL); - } - - /* - TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT */ - retCode = TIFFGetField(tif, TIFFTAG_BASELINENOISE, &auxDblUnion.dbl); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_BASELINENOISE"); - } - if (auxDblUnion.flt1 != (float)BESTQUALITYSCALE_VAL) - { - fprintf(stderr, - "Read float value of TIFFTAG_BASELINENOISE %f differs from set " - "value %f\n", - auxDblUnion.flt1, BESTQUALITYSCALE_VAL); - } - - /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter - * TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable - * length of array. */ - retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_DECODE"); - } - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxFloatArray, pVoidArray, (count16 * sizeof(auxFloatArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxFloatArrayN2[i]; - dblDiff = auxFloatArray[i] - auxFloatArrayN2[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_DECODE Array %f differs from set " - "value %f\n", - i, auxFloatArray[i], auxFloatArrayN2[i]); - } - } - - retCode = TIFFGetField(tif, TIFFTAG_BLACKLEVEL, &count16, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_BLACKLEVEL"); - } - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxFloatArray, pVoidArray, (count16 * sizeof(auxFloatArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxFloatArrayN1[i]; - dblDiff = auxFloatArray[i] - auxFloatArrayN1[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_BLACKLEVEL Array %f differs from " - "set value %f\n", - i, auxFloatArray[i], auxFloatArrayN1[i]); - } - } - - /*- Fixed Array: TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, - * TIFF_SETGET_C0_FLOAT */ - retCode = TIFFGetField(tif, TIFFTAG_DEFAULTCROPSIZE, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_DEFAULTCROPSIZE"); - } - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxFloatArray, pVoidArray, (2 * sizeof(auxFloatArray[0]))); - for (i = 0; i < 2; i++) - { - dblDiffLimit = RATIONAL_EPS * auxFloatArrayW[i]; - dblDiff = auxFloatArray[i] - auxFloatArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_DEFAULTCROPSIZE Array %f differs " - "from set value %f\n", - i, auxFloatArray[i], auxFloatArrayW[i]); - } - } - -#endif /*-- ADDITIONAL_TAGS --*/ - -#ifdef READ_GPS_TAGS - /*================== Reading GPS tags =====================*/ - /*-- First get offset to GPS-directory and set it active (this will destroy - * previously main directory fields in memory!) */ - retCode = TIFFGetField(tif, TIFFTAG_GPSIFD, &read_dir_offset); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_GPSIFD"); - } - retCode = TIFFReadGPSDirectory(tif, read_dir_offset); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFReadGPSDirectory()"); - } - - /*-- Now read some parameters from GPS-directory --*/ - - /*-- Fixed Array: GPS-Version is a fixed array (of 4 characters) */ - retCode = TIFFGetField(tif, GPSTAG_VERSIONID, &pGpsVersion); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_VERSIONID"); - } - else - { - memcpy(auxCharArray, pGpsVersion, sizeof(gpsVersion)); - for (i = 0; i < 4; i++) - { - if (auxCharArray[i] != pGpsVersion[i]) - { - fprintf(stderr, - "Read value %d of GPSTAG_VERSIONID %d differs from set " - "value %d\n", - i, auxCharArray[i], pGpsVersion[i]); - } - } - } - /*-- LATITUDEREF is a fixed String of one character plus ending zero. */ - retCode = TIFFGetField(tif, GPSTAG_LATITUDEREF, &pAscii); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_LATITUDEREF"); - } - retCode2 = strncmp("N", pAscii, 1); - if (retCode2 != 0) - { - fprintf(stderr, - "Read value %d of GPSTAG_LATITUDEREF %s differs from set value " - "%s\n", - i, "N", pAscii); - } - - /*-- Fixed Array: Latitude is an array of 3 Rational-values. TIFFGetField() - * returns a pointer to a temporary float-/double-array. */ - /*-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values - * are defined as double precision and need to be written and also read in - * double precision! In order to maintain this code for both cases, it is - * checked above if the TiffLibrary is compiled with the new interface with - * Rational2Double or still uses the old definitions, by setting - * blnIsRational2Double above. - */ - if (blnIsRational2Double) - { - fprintf(stderr, "-- GPS tags are read using Rational2Double --\n"); - } - else - { - fprintf(stderr, "-- GPS tags are read using standard --\n"); - } - retCode = TIFFGetField(tif, GPSTAG_LATITUDE, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_LATITUDE"); - } - if (!blnIsRational2Double) - { - /* Reset arrays for debugging purpose first */ - memset(auxFloatArray, 0, sizeof(auxFloatArray)); - memcpy(auxFloatArray, pVoidArray, 3 * sizeof(float)); - /* for comparison copy to doubleArray */ - for (i = 0; i < 3; i++) - auxDoubleArray[i] = (double)auxFloatArray[i]; - } - else - { - /* Rational2Double interface for GPSTAG reads double array */ - memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); - memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); - } - for (i = 0; i < 3; i++) - { - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayGPS1[i]; - dblDiff = auxDoubleArray[i] - auxDoubleArrayGPS1[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of GPSTAG_LATITUDE %f differs from set " - "value %f\n", - i, auxDoubleArray[i], auxDoubleArrayGPS1[i]); - } - } - - /*-- LONGITUDEREF is a fixed String of one character plus ending zero. */ - retCode = TIFFGetField(tif, GPSTAG_LONGITUDEREF, &pAscii); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_LONGITUDEREF"); - } - retCode2 = strncmp("W", pAscii, 1); - if (retCode2 != 0) - { - fprintf(stderr, - "Read value %d of GPSTAG_LONGITUDEREF %s differs from set " - "value %s\n", - i, "W", pAscii); - } - - retCode = TIFFGetField(tif, GPSTAG_LONGITUDE, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_LONGITUDE"); - } - if (!blnIsRational2Double) - { - /* Reset arrays for debugging purpose first */ - memset(auxFloatArray, 0, sizeof(auxFloatArray)); - memcpy(auxFloatArray, pVoidArray, 3 * sizeof(float)); - /* for comparison copy to doubleArray */ - for (i = 0; i < 3; i++) - auxDoubleArray[i] = (double)auxFloatArray[i]; - } - else - { - /* Rational2Double interface for GPSTAG reads double array */ - memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); - memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); - } - for (i = 0; i < 3; i++) - { - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayGPS2[i]; - dblDiff = auxDoubleArray[i] - auxDoubleArrayGPS2[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of GPSTAG_LONGITUDE %f differs from set " - "value %f\n", - i, auxDoubleArray[i], auxDoubleArrayGPS2[i]); - } - } - - /* TIFF_RATIONAL, TIFF_SETGET_DOUBLE */ - if (!TIFFGetField(tif, GPSTAG_ALTITUDE, &auxDblUnion.dbl)) - { - fprintf(stderr, "Can't read GPSTAG_ALTITUDE\n"); - GOTOFAILURE_GPS - } - if (blnIsRational2Double) - { - /* New interface allows also double precision for TIFF_RATIONAL */ - auxDouble = auxDblUnion.dbl; - } - else - { - /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE - * always as FLOAT */ - auxDouble = (double)auxDblUnion.flt1; - } - /* compare read values with written ones */ - dblDiffLimit = RATIONAL_EPS * auxDoubleGPSAltitude; - dblDiff = auxDouble - auxDoubleGPSAltitude; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value of GPSTAG_ALTITUDE %f differs from set value %f\n", - auxDouble, auxDoubleGPSAltitude); - GOTOFAILURE_GPS - } - - /*-- TimeStamp is only hh:mm:ss. See also DateTime string 3, TIFF_RATIONAL, - * TIFF_SETGET_C0_DOUBLE */ - retCode = TIFFGetField(tif, GPSTAG_TIMESTAMP, &pVoidArray); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_TIMESTAMP"); - } - if (!blnIsRational2Double) - { - /* Reset arrays for debugging purpose first */ - memset(auxFloatArray, 0, sizeof(auxFloatArray)); - memcpy(auxFloatArray, pVoidArray, 3 * sizeof(float)); - /* for comparison copy to doubleArray */ - for (i = 0; i < 3; i++) - auxDoubleArray[i] = (double)auxFloatArray[i]; - } - else - { - /* Rational2Double interface for GPSTAG reads double array */ - memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); - memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); - } - for (i = 0; i < 3; i++) - { - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayGPSTime[i]; - dblDiff = auxDoubleArray[i] - auxDoubleArrayGPSTime[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of GPSTAG_TIMESTAMP %f differs from set " - "value %f\n", - i, auxDoubleArray[i], auxDoubleArrayGPS2[i]); - GOTOFAILURE_GPS - } - } - - /* GPSTAG_IMGDIRECTION --- TIFF_RATIONAL, TIFF_SETGET_DOUBLE */ - if (!TIFFGetField(tif, GPSTAG_IMGDIRECTION, &auxDblUnion.dbl)) - { - fprintf(stderr, "Can't read GPSTAG_IMGDIRECTION\n"); - GOTOFAILURE_GPS - } - if (blnIsRational2Double) - { - /* New interface allows also double precision for TIFF_RATIONAL */ - auxDouble = auxDblUnion.dbl; - } - else - { - /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE - * always as FLOAT */ - auxDouble = (double)auxDblUnion.flt1; - } - /* compare read values with written ones */ - dblDiffLimit = RATIONAL_EPS * auxDoubleGPSDirection; - dblDiff = auxDouble - auxDoubleGPSDirection; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf( - stderr, - "Read value of GPSTAG_IMGDIRECTION %f differs from set value %f\n", - auxDouble, auxDoubleGPSDirection); - GOTOFAILURE_GPS - } - - /*-- GPSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, - * TIFF_SETGET_UINT16 - */ - retCode = TIFFGetField(tif, GPSTAG_DIFFERENTIAL, &auxShort); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "GPSTAG_DIFFERENTIAL"); - } - if (auxShort != auxShortArrayW[5]) - { - fprintf( - stderr, - "Read value of GPSTAG_DIFFERENTIAL %d differs from set value %d\n", - auxShort, auxShortArrayW[5]); - GOTOFAILURE_GPS - } - - /*-- GPSHPOSITIONINGERROR - new tag for EXIF 2.31 --*/ - if (!TIFFGetField(tif, GPSTAG_GPSHPOSITIONINGERROR, &auxDblUnion.dbl)) - { - fprintf(stderr, "Can't read GPSTAG_GPSHPOSITIONINGERROR\n"); - GOTOFAILURE_GPS - } - if (blnIsRational2Double) - { - /* New interface allows also double precision for TIFF_RATIONAL */ - auxDouble = auxDblUnion.dbl; - } - else - { - /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE - * always as FLOAT */ - auxDouble = (double)auxDblUnion.flt1; - } - /* compare read values with written ones */ - auxFloat = (float)GPSHPOSITIONINGERROR_VAL; - dblDiffLimit = RATIONAL_EPS * auxFloat; - dblDiff = auxDouble - auxFloat; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value of GPSTAG_GPSHPOSITIONINGERROR %f differs from set " - "value %f\n", - auxDouble, auxFloat); - GOTOFAILURE_GPS - } - - /*=============== END reading GPS tags ==========================*/ -#endif /*-- READ_GPS_TAGS --*/ - - /*================== Reading EXIF 2.31 tags =====================*/ - - /*--- Firstly, get EXIF directory offset from main directory. */ - - /*-- Go back to the first (main) directory, and get value of the EXIFIFD - * directory- offset. */ - /* (directory is reloaded from file!) */ - TIFFSetDirectory(tif, 0); - retCode = TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset); - -#ifdef READ_EXIF_TAGS - /*-- Now read EXIF directory from file into memory --*/ - retCode = TIFFReadEXIFDirectory(tif, read_dir_offset); - - /*-- Now get some parameters from EXIF-directory (already read into memory) - * --*/ - retCode = TIFFGetField(tif, EXIFTAG_EXIFVERSION, &pAscii); - -#ifdef READ_ALL_EXIF_TAGS - /*-- Get array, where EXIF tag fields are defined --*/ - tFieldArray = _TIFFGetExifFields(); - nTags = tFieldArray->count; - /*-- Check, if the TiffLibrary is compiled with the new interface with - * Rational2Double or still uses the old definitions. */ - /* tif points to EXIF tags, so TIFFFindField() can only access the EXIF tag - * fields */ - fip = TIFFFindField(tif, EXIFTAG_EXPOSURETIME, TIFF_ANY); - tSetFieldType = fip->set_get_field_type; - if (tSetFieldType == TIFF_SETGET_DOUBLE) - { - blnIsRational2Double = FALSE; - fprintf(stderr, "-- EXIF tags read with standard --\n"); - } - else - { - blnIsRational2Double = TRUE; - fprintf(stderr, - "-- Rational2Double for reading EXIF tags detected --\n"); - } - - for (i = 0; i < nTags; i++) - { - bool deferredSetField = false; - tTag = tFieldArray->fields[i].field_tag; - tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ - tWriteCount = tFieldArray->fields[i].field_writecount; - tSetFieldType = tFieldArray->fields[i] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - tFieldName = tFieldArray->fields[i].field_name; - - /*-- dependent on set_get_field_type read value --*/ - switch (tSetFieldType) - { - case TIFF_SETGET_ASCII: - /* Either the stringlength is defined as a fixed length in - * .field_writecount or a NULL-terminated string is used. */ - if (!TIFFGetField(tif, tTag, &pAscii)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* Save string from temporary buffer and compare with written - * string. */ - strncpy(auxCharArray, pAscii, sizeof(auxCharArray) - 1u); - auxCharArray[sizeof(auxCharArray) - 1u] = '\0'; - if (tWriteCount > 0) - auxInt32 = tWriteCount - 1; - else - auxInt32 = (int32_t)strlen(auxCharArray); - retCode2 = strncmp(auxCharArray, auxTextArrayW[i], auxInt32); - if (retCode2 != 0) - { - fprintf( - stderr, - "%d:Read value of %s %s differs from set value %s\n", i, - tFieldName, auxCharArray, auxTextArrayW[i]); - GOTOFAILURE_ALL_EXIF - } - break; - /*-- For reading, the parameter size is to be observed !! */ - case TIFF_SETGET_UINT8: - case TIFF_SETGET_SINT8: - if (!TIFFGetField(tif, tTag, &auxChar)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* compare read values with written ones */ - auxInt32 = auxChar; - if (auxInt32 != (char)auxInt32ArrayW[i]) - { - fprintf( - stderr, - "%d:Read value of %s %d differs from set value %d\n", i, - tFieldName, auxInt32, auxInt32ArrayW[i]); - } - break; - case TIFF_SETGET_UINT16: - case TIFF_SETGET_SINT16: - if (!TIFFGetField(tif, tTag, &auxShort)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* compare read values with written ones */ - auxInt32 = auxShort; - if (auxInt32 != (short)auxInt32ArrayW[i]) - { - fprintf( - stderr, - "%d:Read value of %s %d differs from set value %d\n", i, - tFieldName, auxInt32, auxInt32ArrayW[i]); - } - break; - case TIFF_SETGET_UINT32: - case TIFF_SETGET_SINT32: - case TIFF_SETGET_IFD8: - case TIFF_SETGET_INT: - if (!TIFFGetField(tif, tTag, &auxUint32)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* compare read values with written ones */ - auxInt32 = auxUint32; - if (auxInt32 != auxInt32ArrayW[i]) - { - fprintf( - stderr, - "%d:Read value of %s %d differs from set value %d\n", i, - tFieldName, auxInt32, auxInt32ArrayW[i]); - } - break; - case TIFF_SETGET_FLOAT: - if (!TIFFGetField(tif, tTag, &auxFloat)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - dblDiff = auxFloat - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of - * "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to - * indicate infinite distance! However, there are two other - * EXIF tags where numerator indicates a special value and - * six other cases where the denominator indicates special - * values, which are not treated within LibTiff!! - */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxFloat == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from set value " - "%f\n", - i, tFieldName, auxFloat, auxDoubleArrayW[i]); - GOTOFAILURE_ALL_EXIF - } - } - break; - case TIFF_SETGET_DOUBLE: - /*-- Unfortunately, TIFF_SETGET_DOUBLE is used for TIFF_RATIONAL - * but those have to be read with FLOAT !!! */ - /* Only TIFFTAG_STONITS is a TIFF_DOUBLE, which has to be read - * as DOUBLE!! */ - /*-- ATTENTION: ---- - * Only after update with Rational2Double feature, also - TIFF_RATIONAL can be read in double precision!!! - * Therefore, use a union to avoid overflow in TIFFGetField() - return value - * and depending on version check for the right interface - here: - * - old interface: correct value should be here a float - * - new interface: correct value should be here a double - * Interface version (old/new) is determined above. - -------------------*/ - if (!TIFFGetField(tif, tTag, &auxDblUnion.dbl)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - { - if (blnIsRational2Double) - { - /* New interface allows also double precision for - * TIFF_RATIONAL */ - auxDouble = auxDblUnion.dbl; - } - else - { - /* Old interface reads TIFF_RATIONAL defined as - * TIFF_SETGET_DOUBLE always as FLOAT */ - auxDouble = (double)auxDblUnion.flt1; - } - } - else - { - auxDouble = auxDblUnion.dbl; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - dblDiff = auxDouble - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of - * "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to - * indicate infinite distance! */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxDouble == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from set value " - "%f\n", - i, tFieldName, auxDouble, auxDoubleArrayW[i]); - GOTOFAILURE_ALL_EXIF - } - } - break; - - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_DOUBLE: - /* _Cxx_ just defines the size of the count parameter for the - * array as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array or a - * variable array */ - if (tWriteCount == 1) - { - fprintf( - stderr, - "Reading: WriteCount for .set_get_field_type %d should " - "be -1 or greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[i].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* For arrays, distinguishing between float or double is - * essential. */ - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFGetField(tif, tTag, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* set tWriteCount to number of read samples for next - * steps */ - auxInt32 = tWriteCount; - } - else - { - /* Special treatment of variable array. */ - /* Dependent on Cxx, the count parameter is char, short - * or long. Therefore use unionInt32! */ - if (!TIFFGetField(tif, tTag, &unionInt32, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* set tWriteCount to number of read samples for next - * steps */ - auxInt32 = unionInt32.Short1; - } - /* Save values from temporary array */ - if (tSetFieldType == TIFF_SETGET_C0_FLOAT || - tSetFieldType == TIFF_SETGET_C16_FLOAT || - tSetFieldType == TIFF_SETGET_C32_FLOAT) - { - memcpy(&auxFloatArray, pVoidArray, - (auxInt32 * sizeof(auxFloatArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = auxFloatArray[j] - auxFloatArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*if (auxFloatArray[j] != - * (float)auxFloatArrayW[i+j]) { */ - fprintf(stderr, - "Read value %d of %s #%d %f differs " - "from set value %f\n", - i, tFieldName, j, auxFloatArray[j], - auxFloatArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - } - else - { - memcpy(&auxDoubleArray, pVoidArray, - (auxInt32 * sizeof(auxDoubleArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = - auxDoubleArray[j] - auxDoubleArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*if (auxDoubleArray[j] != auxDoubleArrayW[i+j]) - * { */ - fprintf(stderr, - "Read value %d of %s #%d %f differs " - "from set value %f\n", - i, tFieldName, j, auxDoubleArray[j], - auxDoubleArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - } - } - break; - case TIFF_SETGET_C0_UINT8: - case TIFF_SETGET_C0_SINT8: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - /* For arrays, distinguishing between float or double is - * essential, even for writing */ - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT16: - case TIFF_SETGET_C0_SINT16: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT32: - case TIFF_SETGET_C0_SINT32: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - deferredSetField = true; - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within writing switch for " - "%s.\n", - tSetFieldType, tFieldName); - GOTOFAILURE - }; /*-- switch() --*/ - - if (deferredSetField) - { - /* _Cxx_ just defines the size of the count parameter for the array - * as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array or a variable - * array */ - if (tWriteCount == 1) - { - fprintf(stderr, - "WriteCount for .set_get_field_type %d should be -1 or " - "greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[i].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFGetField(tif, tTag, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* set tWriteCount to number of read samples for next steps - */ - auxInt32 = tWriteCount; - } - else - { - /* special treatment of variable array */ - /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ - if (!TIFFGetField(tif, tTag, &unionInt32, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE_ALL_EXIF - break; - } - /* set tWriteCount to number of read samples for next steps - */ - auxInt32 = unionInt32.Short1; - } - /* Save values from temporary array */ - if (tSetFieldType == TIFF_SETGET_C0_UINT8 || - tSetFieldType == TIFF_SETGET_C0_SINT8 || - tSetFieldType == TIFF_SETGET_C16_UINT8 || - tSetFieldType == TIFF_SETGET_C16_SINT8 || - tSetFieldType == TIFF_SETGET_C32_UINT8 || - tSetFieldType == TIFF_SETGET_C32_SINT8) - { - memcpy(&auxCharArray, pVoidArray, - (auxInt32 * sizeof(auxCharArray[0]))); - /* Compare and check values */ - for (j = 0; j < auxInt32; j++) - { - if (tTag == EXIFTAG_EXIFVERSION) - { - /*-- Use exifVersion[] instead of auxCharArrayW[] - * for differently set EXIFVERSION tag */ - if (auxCharArray[j] != exifVersion[j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d differs " - "from set value %d\n", - i, tFieldName, j, auxCharArray[j], - auxCharArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - else - { - if (auxCharArray[j] != auxCharArrayW[i + j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d differs " - "from set value %d\n", - i, tFieldName, j, auxCharArray[j], - auxCharArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_UINT16 || - tSetFieldType == TIFF_SETGET_C0_SINT16 || - tSetFieldType == TIFF_SETGET_C16_UINT16 || - tSetFieldType == TIFF_SETGET_C16_SINT16 || - tSetFieldType == TIFF_SETGET_C32_UINT16 || - tSetFieldType == TIFF_SETGET_C32_SINT16) - { - memcpy(&auxShortArray, pVoidArray, - (auxInt32 * sizeof(auxShortArray[0]))); - /* Compare and check values */ - for (j = 0; j < auxInt32; j++) - { - if (auxShortArray[j] != auxShortArrayW[i + j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d differs from " - "set value %d\n", - i, tFieldName, j, auxShortArray[j], - auxShortArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_UINT32 || - tSetFieldType == TIFF_SETGET_C0_SINT32 || - tSetFieldType == TIFF_SETGET_C16_UINT32 || - tSetFieldType == TIFF_SETGET_C16_SINT32 || - tSetFieldType == TIFF_SETGET_C32_UINT32 || - tSetFieldType == TIFF_SETGET_C32_SINT32) - { - memcpy(&auxInt32Array, pVoidArray, - (auxInt32 * sizeof(auxInt32Array[0]))); - /* Compare and check values */ - for (j = 0; j < auxInt32; j++) - { - if (auxInt32Array[j] != auxInt32ArrayW[i + j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d differs from " - "set value %d\n", - i, tFieldName, j, auxInt32Array[j], - auxInt32ArrayW[i + j]); - GOTOFAILURE_ALL_EXIF - } - } - } - else - { - fprintf(stderr, - "SetFieldType %d not defined within switch case " - "reading for UINT for %s.\n", - tSetFieldType, tFieldName); - GOTOFAILURE - } - } - } - } /*-- for() --*/ - /*================= EXIF: END Reading arbitrary data to the EXIF fields END - * END END ==============*/ -#endif /*-- READ_ALL_EXIF_TAGS --*/ -#endif /*-- READ_EXIF_TAGS --*/ - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ -#ifdef FOR_AUTO_TESTING - unlink(filenameRead); -#endif - fprintf(stderr, "-------- Test finished OK ----------\n"); - return 0; - -failure: - /* - * Something goes wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - fprintf(stderr, "-------- Test finished with FAILURE --------\n"); - return 1; -} diff --git a/third_party/libtiff/test/defer_strile_loading.c b/third_party/libtiff/test/defer_strile_loading.c deleted file mode 100644 index b63c0a8..0000000 --- a/third_party/libtiff/test/defer_strile_loading.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright (c) 2019, Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test 'D' and 'O' open flags - */ - -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tifftest.h" - -int test(int classictif, int height, int tiled) -{ - const char *filename = "defer_strile_loading.tif"; - TIFF *tif; - int i; - uint64_t ret = 0; - FILE *f; - - (void)ret; - - tif = TIFFOpen(filename, - classictif ? "wDO" - : "w8DO"); /* O should be ignored in write mode */ - if (!tif) - { - fprintf(stderr, "cannot create %s\n", filename); - return 1; - } - ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - assert(ret); - if (tiled) - { - int j; - ret = TIFFSetField(tif, TIFFTAG_TILEWIDTH, 16); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_TILELENGTH, 16); - assert(ret); - for (j = 0; j < (height + 15) / 16; j++) - { - unsigned char tilebuffer[256]; - memset(tilebuffer, (unsigned char)j, 256); - ret = TIFFWriteEncodedTile(tif, j, tilebuffer, 256); - assert(ret == 256); - } - } - else - { - ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - assert(ret); - for (i = 0; i < height; i++) - { - unsigned char c = (unsigned char)i; - ret = TIFFWriteEncodedStrip(tif, i, &c, 1); - assert(ret == 1); - - if (i == 1 && height > 100000) - i = height - 2; - } - } - TIFFClose(tif); - - f = fopen(filename, "rb"); - if (!f) - return 1; - - for (i = 0; i < 2; i++) - { - tif = TIFFOpen(filename, i == 0 ? "rD" : "rO"); - if (!tif) - { - fprintf(stderr, "cannot open %s\n", filename); - fclose(f); - return 1; - } - if (tiled) - { - int j; - for (j = 0; j < (height + 15) / 16; j++) - { - int retry; - unsigned char expected_c = (unsigned char)j; - - for (retry = 0; retry < 2; retry++) - { - unsigned char tilebuffer[256]; - memset(tilebuffer, 0, 256); - ret = TIFFReadEncodedTile(tif, j, tilebuffer, 256); - assert(ret == 256); - if (tilebuffer[0] != expected_c || - tilebuffer[255] != expected_c) - { - fprintf(stderr, "unexpected value at tile %d: %d %d\n", - j, tilebuffer[0], tilebuffer[255]); - TIFFClose(tif); - fclose(f); - return 1; - } - } - - { - int err = 0; - uint64_t offset, size; - unsigned char inputbuffer[256]; - unsigned char tilebuffer[256]; - - offset = TIFFGetStrileOffsetWithErr(tif, j, &err); - assert(offset != 0); - assert(err == 0); - - size = TIFFGetStrileByteCountWithErr(tif, j, &err); - (void)size; - assert(size == 256); - assert(err == 0); - - if (offset > INT32_MAX) - { - fprintf(stderr, - "Offset %" PRId64 " exceeds fseek limit.\n", - offset); - TIFFClose(tif); - fclose(f); - return 1; - } - fseek(f, (long)offset, SEEK_SET); - { - size_t nread = fread(inputbuffer, 256, 1, f); - (void)nread; - } - - memset(tilebuffer, 0, 256); - ret = TIFFReadFromUserBuffer(tif, j, inputbuffer, 256, - tilebuffer, 256); - assert(ret == 1); - if (tilebuffer[0] != expected_c || - tilebuffer[255] != expected_c) - { - fprintf(stderr, "unexpected value at tile %d: %d %d\n", - j, tilebuffer[0], tilebuffer[255]); - TIFFClose(tif); - fclose(f); - return 1; - } - } - } - } - else - { - int j; - for (j = 0; j < height; j++) - { - int retry; - unsigned char expected_c = (unsigned char)j; - for (retry = 0; retry < 2; retry++) - { - unsigned char c = 0; - ret = TIFFReadEncodedStrip(tif, j, &c, 1); - assert(ret == 1); - if (c != expected_c) - { - fprintf(stderr, "unexpected value at line %d: %d\n", j, - c); - TIFFClose(tif); - fclose(f); - return 1; - } - } - - { - int err = 0; - uint64_t offset, size; - unsigned char inputbuffer[1]; - unsigned char tilebuffer[1]; - - offset = TIFFGetStrileOffsetWithErr(tif, j, &err); - assert(offset != 0); - assert(err == 0); - - size = TIFFGetStrileByteCountWithErr(tif, j, &err); - (void)size; - assert(size == 1); - assert(err == 0); - - if (offset > INT32_MAX) - { - fprintf(stderr, - "Offset %" PRId64 " exceeds fseek limit.\n", - offset); - TIFFClose(tif); - fclose(f); - return 1; - } - fseek(f, (long)offset, SEEK_SET); - { - size_t nread = fread(inputbuffer, 1, 1, f); - (void)nread; - } - memset(tilebuffer, 0, 1); - ret = TIFFReadFromUserBuffer(tif, j, inputbuffer, 1, - tilebuffer, 1); - assert(ret == 1); - if (tilebuffer[0] != expected_c) - { - fprintf(stderr, "unexpected value at line %d: %d\n", j, - tilebuffer[0]); - TIFFClose(tif); - fclose(f); - return 1; - } - } - - if (j == 1 && height > 100000) - j = height - 2; - } - - if (height > 100000) - { - /* Missing strip */ - int err = 0; - ret = TIFFGetStrileOffsetWithErr(tif, 2, &err); - assert(ret == 0); - assert(err == 0); - - ret = TIFFGetStrileByteCountWithErr(tif, 2, &err); - assert(ret == 0); - assert(err == 0); - } - } - - { - int err = 0; - ret = TIFFGetStrileOffsetWithErr(tif, 0xFFFFFFFFU, &err); - assert(ret == 0); - assert(err == 1); - - ret = TIFFGetStrileByteCountWithErr(tif, 0xFFFFFFFFU, &err); - assert(ret == 0); - assert(err == 1); - } - - { - toff_t *offsets = NULL; - toff_t *bytecounts = NULL; - ret = TIFFGetField( - tif, tiled ? TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS, - &offsets); - assert(ret); - assert(offsets); - ret = TIFFGetField( - tif, tiled ? TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS, - &bytecounts); - assert(ret); - assert(bytecounts); - if (tiled) - { - assert(bytecounts[0] == 256); - } - else - { - assert(bytecounts[0] == 1); - if (height > 1 && height <= 100000) - { - assert(offsets[1] == offsets[0] + 1); - assert(offsets[height - 1] == offsets[0] + height - 1); - } - assert(bytecounts[height - 1] == 1); - } - } - - TIFFClose(tif); - } - fclose(f); - - unlink(filename); - return 0; -} - -int main() -{ - int is_classic; - for (is_classic = 1; is_classic >= 0; is_classic--) - { - int tiled; - for (tiled = 0; tiled <= 1; tiled++) - { - if (test(is_classic, 1, tiled)) - return 1; - if (test(is_classic, 8192, tiled)) - return 1; - } - if (test(is_classic, 2000000, 0)) - return 1; - } - return 0; -} diff --git a/third_party/libtiff/test/defer_strile_writing.c b/third_party/libtiff/test/defer_strile_writing.c deleted file mode 100644 index 465e656..0000000 --- a/third_party/libtiff/test/defer_strile_writing.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2019, Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test TIFFDeferStrileArrayWriting and TIFFForceStrileArrayWriting - */ - -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -int test(const char *mode, int tiled, int height) -{ - const char *filename = "defer_strile_writing.tif"; - TIFF *tif; - int i; - tmsize_t ret = 0; - (void)ret; - - tif = TIFFOpen(filename, mode); - if (!tif) - { - fprintf(stderr, "cannot create %s\n", filename); - return 1; - } - ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - assert(ret); - - if (tiled) - { - ret = TIFFSetField(tif, TIFFTAG_TILEWIDTH, 16); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_TILELENGTH, 16); - assert(ret); - } - else - { - ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - assert(ret); - } - - ret = TIFFDeferStrileArrayWriting(tif); - assert(ret); - - ret = TIFFWriteCheck(tif, tiled, "test"); - assert(ret); - - ret = TIFFWriteDirectory(tif); - assert(ret); - - /* Create other directory */ - TIFFFreeDirectory(tif); - TIFFCreateDirectory(tif); - - ret = TIFFSetField(tif, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - assert(ret); - - ret = TIFFDeferStrileArrayWriting(tif); - assert(ret); - - ret = TIFFWriteCheck(tif, 0, "test"); - assert(ret); - - ret = TIFFWriteDirectory(tif); - assert(ret); - - /* Force writing of strile arrays */ - ret = TIFFSetDirectory(tif, 0); - assert(ret); - - ret = TIFFForceStrileArrayWriting(tif); - assert(ret); - - ret = TIFFSetDirectory(tif, 1); - assert(ret); - - ret = TIFFForceStrileArrayWriting(tif); - assert(ret); - - /* Now write data on first directory */ - ret = TIFFSetDirectory(tif, 0); - assert(ret); - - if (tiled) - { - int j; - for (j = 0; j < (height + 15) / 16; j++) - { - unsigned char tilebuffer[256]; - memset(tilebuffer, (unsigned char)j, 256); - ret = TIFFWriteEncodedTile(tif, j, tilebuffer, 256); - assert(ret == 256); - } - } - else - { - for (i = 0; i < height; i++) - { - unsigned char c = (unsigned char)i; - ret = TIFFWriteEncodedStrip(tif, i, &c, 1); - assert(ret == 1); - - if (i == 1 && height > 100000) - i = height - 2; - } - } - - TIFFClose(tif); - - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "cannot open %s\n", filename); - return 1; - } - if (tiled) - { - int j; - for (j = 0; j < (height + 15) / 16; j++) - { - int retry; - for (retry = 0; retry < 2; retry++) - { - unsigned char tilebuffer[256]; - unsigned char expected_c = (unsigned char)j; - memset(tilebuffer, 0, 256); - ret = TIFFReadEncodedTile(tif, j, tilebuffer, 256); - assert(ret == 256); - if (tilebuffer[0] != expected_c || - tilebuffer[255] != expected_c) - { - fprintf(stderr, "unexpected value at tile %d: %d %d\n", j, - tilebuffer[0], tilebuffer[255]); - TIFFClose(tif); - return 1; - } - } - } - } - else - { - int j; - for (j = 0; j < height; j++) - { - int retry; - for (retry = 0; retry < 2; retry++) - { - unsigned char c = 0; - unsigned char expected_c = (unsigned char)j; - ret = TIFFReadEncodedStrip(tif, j, &c, 1); - assert(ret == 1); - if (c != expected_c) - { - fprintf(stderr, "unexpected value at line %d: %d\n", j, c); - TIFFClose(tif); - return 1; - } - } - } - } - - TIFFClose(tif); - - unlink(filename); - return 0; -} - -int main() -{ - int tiled; - for (tiled = 0; tiled <= 1; tiled++) - { - if (test("w", tiled, 1)) - return 1; - if (test("w", tiled, 10)) - return 1; - if (test("w8", tiled, 1)) - return 1; - if (test("wD", tiled, 1)) - return 1; - } - return 0; -} diff --git a/third_party/libtiff/test/fax2tiff.sh b/third_party/libtiff/test/fax2tiff.sh deleted file mode 100644 index 8806a64..0000000 --- a/third_party/libtiff/test/fax2tiff.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for fax2tiff -# -. ${srcdir:-.}/common.sh -infile="${IMAGES}/miniswhite-1c-1b.g3" -outfile="o-fax2tiff.tiff" -rm -f $outfile -echo "$MEMCHECK ${FAX2TIFF} -M -o $outfile $infile" -eval $MEMCHECK ${FAX2TIFF} -M -o $outfile $infile -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/images/32bpp-None-jpeg.tiff b/third_party/libtiff/test/images/32bpp-None-jpeg.tiff deleted file mode 100644 index 1fdb3cf0db1916702752bf232f9b5e3021f052ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4704 zcma)A3s6+o8NP_@UJ%$_9@;js+1S*YxU5lA6(O1mEbj;!YgN!9$|F_5g~X7?Bus0Q z>5T2Pc1WkwNTrQUG9#MK_(-Y|S*<}7ji3(1SEQ)uBA|c^7yr}m+{Zq6S(w>-?!9O3 zJ>UO-|M&gpCMQ29+%XD5IXlFNsGoYNkNSK0cmShba=91{%A-CSXlD}9Bb*OlW*_y? zeY!_?=@zxpHEN*?bdKuiI31w_R870-Z}b8Ej<(S+X*1<{ zUlkd+G=dM}O!`=ZZca$R+)&+%23?{_za(7DnHX5|#Dw>r3fcKX!vRZJ{e1J~jJeLd z#r<#O_LXGc%(h)fwC=IzIoVx_aR7$)TenWzY)lZkLqorgjlIKeyI5%R)#eo^Rzx@> zj9tc*x)c{VySDYYroTe@$yB$stk5apZ<-*ajvZF zOW>p4-p2#0Q-M_j*iNb#k}eL+DyJ(vP_!BKtA_&%;lR{%O$sbUx>R7{r(>Q5u#Wr; zq^ozc3aol#P6u=Lx{;kqO|4H#I=XG!w^OE^Wi=8rHMTTPy*jnZQFZ3xnH@DdDvnhE zT2-(kGV<<<6(^#inxmu7|6jm35BJMFRDk_jf* zQhk!Z1fbewa7>=u_Rc#;^Yf1ZSZiyW^tg=i0&~c~_M*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o}(!6|F}>=sKj&;Gg2{5OJ4L!vdv~O|8%{*q_Aj{`337->+?ZzMa5Ct&5N2D9X-dqG-snZZGB$ehV}MgbE0Rea|$;U=Hf|-_MGB^!rT&zIeAmARhUt_ Xv3SPpS!;`nqh2oBwBA};m?!)Xj;xXX diff --git a/third_party/libtiff/test/images/32bpp-None.tiff b/third_party/libtiff/test/images/32bpp-None.tiff deleted file mode 100644 index 77f080fc0840497fe52be77bdc9afebf7d61dfb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13222 zcmeI2dvF!i9mjw7#@sw0BsY;q3l0eoR0#5_N)4hV1R7c;p;N1pXo9WaR4s^(iq#Q( zx0PC*R-K9{2r^o2OSQqNRxRR86{n)ujx(ZDTKxmGs09HZ*?zvedv5mL+~@`3qfUOC zPxkD4_w4ule&_t|HZ+W~wG*t@A~g^*izUnw#b(7tW<@GTHoIcX@|lX5ikT8t;5G#F zygUx&@M2D*`62n~+p{ilX%lhac+MYOo8zqylt2;=g+VX`Dxn%i!B{v3YGEogKogt> zXTp3~2#eurSO&MjN_YU)!&C4)Y=!MbG28R4@`8>z{foTs99rm6_Ue)a-sIARcT7pX zcWl3ecRb}8teag?=(PIL>%9Oolp;1{>j2Xa#BT0_aYI zJhE+slm`36V|yCVT?^VuX|N0pqP=5E5@;~rn}PY@Iv{)lm;ujO|@0N2H!%1@`Jkhk;g z#jS$t^;$PIARRtr_E5W7JI-ShIXnLRi~w zwq}jl3on>G{dDU1&O%RW(8c1JoL(9{4Wb&njOA!7Ud6IvvD09hAFRj6or$*6{Gf}) z(jY!j8r1f=PJ>}AZm+4p4>}DtdGCiBR4m>yeT*kR*sDQm{u4|(TxYg!li8+SX1i9K z@fR_t!&B@On}R;unLMU6JL3$qZQIPQypk^1ZGjdC4~gv36B=~=LHR-T2c<#9Vrj4y zw-Dn>&^8YTk31P zD~2WS?v2INd=BQ~@)c%RwBl0`)3!>ps??$7#FKSQPcR)$M4r$4?xI7*<;}#o(KTk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(d!!2S->nM{4g-+;6w9jYxzhv$KGcq050jsuxu zyxP{MZF)|J?n!m0dR1Sx2-J5~J5Pf8;d*AZ%_@)vN5eSC)*n2L^=*);LA@hsa1}fN zip5XC^RN}RXUh);IqHHm4eFbPF0q*Y;Ceqtoh?5&jr`zfZ_&`QTMi&M!>wgC)yKc! zZ}1u@zN+5t0qNoK5XC*!m!5Y6JOlrMB~T8(1;y9RumkEK4|I-A@G3k9Vw#B%B$VG!{gZrbwR`$=- z;4;=pgDc@d=%T?wzTKK#QP9zu9}LIE;qS%H4`$Wi2#rZJE_P#*a9pf!7BnvI%u%at zeUVIY^L|jIXf4OQf(+`fKF4QiaADl{gCNzQSvK4aC;70aK`N5)i zY;Pkmc1|ic6Xd9a{GjU(W`46!oXX8~YEZw`HF_WD+byR-#w3fYl6R1U?8h~~Xr}gk zFPxrnW746o7{{vxMg}x2f3LwJvc7rmV50WYQX7Fb7@fH zBxz7%qEFIbHTyUXx>zg?Hh^MrRD%myUJPo-(f(l8F-c+E-t+T=sqY8TVCuIzzU7x6 zbl$iGIuf*1X_b{@^=mz8{=%)JHcRUeW$(`N5=hP>HHe-(q=wc_j<6 zu&kyWr>v^}$wZocxL(I3!m?gPNi6O+`$sjPGE6;m!@UlENFC>YrY3zmPEf_m-!rTQ5 R#+>}4^M7#Eh3A}Y{{wcka?bz& diff --git a/third_party/libtiff/test/images/README.txt b/third_party/libtiff/test/images/README.txt deleted file mode 100644 index 4a7ad82..0000000 --- a/third_party/libtiff/test/images/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -The test files in this directory mostly have dimension 157x151. -The naming convention is - - photometric-channels-bits.tiff - -minisblack-1c-16b.tiff -minisblack-1c-8b.tiff -miniswhite-1c-1b.tiff -palette-1c-1b.tiff -palette-1c-4b.tiff -palette-1c-8b.tiff -rgb-3c-16b.tiff -rgb-3c-8b.tiff - -logluv-3c-16b.tiff: logluv compression/photometric interp -minisblack-2c-8b-alpha.tiff: grey+alpha - -BMP files (anchient BMPv2 since v3 does not work): - - palette-1c-8b.bmp - rgb-3c-8b.bmp - -GIF files (anchient GIF '87 since modern GIF does not work): - palette-1c-8b.gif - -PNM files: - minisblack-1c-8b.pgm - miniswhite-1c-1b.pbm - rgb-3c-8b.ppm - -G3 Fax files : - miniswhite-1c-1b.g3 - -deflate-last-strip-extra-data.tiff is -https://github.com/OSGeo/gdal/blob/master/autotest/alg/data/utmsmall_near.tiff diff --git a/third_party/libtiff/test/images/custom_dir_EXIF_GPS.tiff b/third_party/libtiff/test/images/custom_dir_EXIF_GPS.tiff deleted file mode 100644 index e34e6dc4d7fe6e48e6980aa079f8b173ab606265..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2504 zcmai#ZERCj7{{M`d;79>FRk6W$>vt}B4g{cx3}G0#@resgAuI2HZ+8nv1o)C4eDZu zqRs`eCSpi&@9DfM&>f9&iooVos>Y zU&|h$FVdXS-;XuxnFqlQMgB(CQ_!23*MnEHry1)U*Ss>f`=JMQmA?~u-IPzRzwwWJ za{CJvl7B#=ZE3~x@DF6mrM?Ti=#*2gvl|=+i<%CDJHZI_22LB9PY40Wb4NRI_R#2P zLdLsyR|wg^EEpBhg+7ByqNrr8^f z6FrT4cp+wfo5z{-we-rA+QAbpq9e@n;O4Z-a37X#P3tn#lhBtyN1%&1wWr;Z7r;^W z=TW+uR!@67N{=zW3AUJHcm(6j?}HP}ePZDm)v;*IG95EIRf{~)4uiQG><5buwc`|E zj)HGu?g48VwN9|QCZuOnjY*+ry|P;?!FpEdYrqcH?*kjmV_+wHwt-#DJHYO&>W{k; zk23RKa2ay|d*@~UPWY>#i}EJHyRxcpd%=5{5oji>6SkHPf-}q~!CB@@U^<}kZ@{NS zJD~D!1?$Wau!B8uu)%sC*va}`V9KffbVj;v({ieo3wVU|oZ7pswOEJwN3fC8NxZ+S zG1oV%?z;h8KC5aO2UoJb4P3>%1MHtw>l^jx16Vxhk84kAHSF05Pc3`)H{fF4E%&Gn zs4*V_>tNYK__aB;=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Mmz9DAV^U=Vk4)Fhw5}-!?;kg>EOm)Q4@li< z{V?9W@(lrfLLBy1n$()QOIuNQM>RLlqVWoT);}$Z_zyp1FQU%wH7T%q%eg6H4_&{# zJnOxQfC^a~?~KyQg?&_T!0o3cfL%ilF*XnCEj^-h8p#nu&LP|VtPp2O673$}U{zh@ zNQU1}m%PZ7^pX_a!|pN003P27B1UMx?>-gp8UTc0{!YrF3`2pt~h zB^Q4LqfieBp^)X7HD_1bP163Q^EDG{)2S~g8bYYq**j`57b5kY6ESqPMwk&4tgAO`V zxHc>e;|Q6Y;o6b#3DcLZesz=Egq5VHBNNr3Y~1UV+?)S|3rgaYW9#ESqJT#Fx$XfP z2{w$p)J+>*)}d)@y9|zr83k4bD@xVlWrrp&1_m}L+qZ#%L6DIJ std9ezMieRz(jx|CuVP|g5JyrY0~H6^6%1s9)Gh#G5D)-ECI%1$0G=lX`2YX_ diff --git a/third_party/libtiff/test/images/lzw-single-strip.tiff b/third_party/libtiff/test/images/lzw-single-strip.tiff deleted file mode 100644 index 0ac27c6d82d2f45551fb1e1f1e547ba3210556f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76264 zcmYhCV|XOM(x@kyWGC2UV%xUOjcwa@cB6@H+nYsfI~&^@+qUn1-#z!ar~mZZ)m7c~ ztNZDyY8e?i02}}SKmoi1U;t46=zkm3|7ABK008Pg%=Q@ofQAD8ug?GI0sq6W|M=5? z_{!0h-Kep@t@cd*jg85U{?z(~$+>Ajp#~!*J zmQ4m#OZJ|+<3f`TO{(82zL z8e`rkIi2HxKZrWQh&QNm>PI}NvKvS`l*AxKDm^2gO4*Ynkx4y*7JWi3t6E+`-!@ZH z!#J9BlFTSK`+0!1aTaEneH>j*lwCp1evP{(*?fz4BKembuj1_3onTRN|C8_(1_DS} zS)CDycPd2?Q*z8*0at1Ut%6W`CZ#-DW@c`j6Mq(CO;Blo<4ja#E@4elbske5Uu|B) zLH}bu)z3nw(<9bKZxPJspud=UQfIKZ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4Ypb(gs+0n(i| zb~n(B$#tg z*@3Rhc(F!X?^*x1_2PoU?h!NKL)>ZEdd-~4wYGmF{bnp{%%J6i@0xYD(~ct?=IerhLtMIDe_QIQ&f)_` zBMMC6ACZqy!-xYo28KtpxF>qRuvK0WUI||R!hb~j$2(W=_mu9IUKJvp+>G7n-I}6C zu<$aGe5aT@loKoj=Ff@$+RaS+QF!UBH7!eV}fg~exR8s%| diff --git a/third_party/libtiff/test/images/minisblack-1c-8b.pgm b/third_party/libtiff/test/images/minisblack-1c-8b.pgm deleted file mode 100644 index 0faca40f04121eb769510d9221033341fefee8fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23722 zcmX85hg;icvNpV%Y}~-u;2!r9+i}BSdhfl107;-Op@QhWHv#HhsP_s;^xkpr-A=Nb z_ndRR@ArRv^Yc;cY%cHam0_MK_uO-jio%bCghyTp2@g3E8XkTGMZ;6cR2q#+rci4r zWHN24@W#4^jX~z-BbXHU6AZK`ZsIQ~0 z-?O>@Slo-NtILbim5nTRJ=jC9p)*)4MlFj)XE2xyDv3zybUt~t zuIp&!3Ht3@kDtDJ`{Bd8*RNl_e6~F^A+}6yKJO{WDXyqMm6w;6R#u`gL_*WT1< z)T6`Jwf*O>-hKG;$DiNcy?(NwlsFb1@AedFHWI7Qm6d2LrV0;+;qW9fk%%R6pM8J#?$by3AAWlO>e=I$ z22z7y;r;VhpWZq(5Tc%?>5kjs%u%`C)C$xdP&;GqEr)GI6~Xj zo|}?Zio>EYRaICVW35JYwyW&>pLRF;-7mHm<`>u2me*_}e1+cP znwpz~f9uNH+B&@J_L`IaFtb%87?K@ zmzk55o}QDNomW&?T3T46bGPOem7*%)8Nuw*y!_I#ax?~AiKzzHRpAiNLBxS+WDDS)-$sU54gH$9FghlF3;4o&o{ray0*T#y}3EB zEjpReCzp;()H=OhrBW%>I?md{($dQ668r?~8*3}AX<3;pIfsCu(Qx?*i79E>nWUOr zmaeO)q_nIOU4h1;E5K)!6{t!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uEn^?RiObrB=SdgMPgv8fElG%DmaWSL7iYUO z_6ScZ#S#l^ZcZ|{z>2~^&8ES@&bDSB@4}JK;7Mq;di{zXp9l{T6mV=om0GV` zBA!)BwP8hX&?;40!`cQEg*P@fH`dm_uC5q#I-N?TS5xh{ z{eIZacktaPbpA9Nt&Z>r;kspLA`t7TTG7Ks_)nu-UpH)QeBJzW=jYzukKLWUpMYTO ze&60)*BcCm^{?ONxn69pFd~-k#|;HqN(^B$;8vj;0_Y_eIthu;>4;CttE_+8mKPmH zgh4EX_Rz+ZKu3lrM5`MA1_)OSHB+)~+-e>8(7rj=8+3o5sS8^STj|g;*aV@j|Hm$v z9av(eYIS{OZDW0Ndw+j-Q@=Qk6lxv}c32Ez#m*K^rVY(#OfcKikzwzJ999TqBLr)4 z#md0zhZv%i5GE2!VpH;K8`_3Hb*A$mSqB(ev;@2{vE)TmSOgSgqhk;uP<%+0-+le& zr@C}(X{NZTudb6Yj@apkyPtsX5s|9YXjaxWOKK=^eqS}LZf>nBr-t734GiPNJUmi} zdjtf8nHdxrV;@I{d#dBkodJ|UB#oCPVPgX#0vq5mLV5~gqqLl|`nHeCm5J900Rkkt zkex&WBt-I}9e6&7JHox->?URAm%r;?RnG!jpP2`G=pq2!SU@6LaibFF1|(Gxllm16 z;#i|w(pmMEwG2T!(($m`_3=S2FMVQ1%+0vTsGBFl33Pg73up!egt?pT0>@^tF zy0oH)Bg60%ap=N0HQ_wS>MkjDTH*t-`4$&u=TV^zq02drlo)cSUzD&|O9)ef=BC#h zR*0_%DeT(KjpgStm}5y3(iK^0IKzN8BlccG8afnpUE`~hFMEfF|40cGqEC*sW?v{A bdIWqGv?y^B6I5)_J)iWheH+)U=$HNn62M+o diff --git a/third_party/libtiff/test/images/minisblack-1c-8b.tiff b/third_party/libtiff/test/images/minisblack-1c-8b.tiff deleted file mode 100644 index ea0f9ac312a6459b25f4deaece5b8bb843422093..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24001 zc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ij-)m zE)EABVV*Rq4F=ZAifm<#5ru&8drf!kcMFutK|_U#2$5w)Tc_h}-9iT2m3qGm&vR-LF~D=(Ku+!JyY`pcd6UAqJKcNCF{2LV#WcEz}ATwFcwTvQe+o>GV2{ zMyJ6`I^B3%3=_@(c3X!-D8~Rxz~u&uB4eWjXMB&lIMD5Ek$2u}ZnkIVF0v~RU{OSD z(pX8n1iL#BU$~BufXOZ~1wy7I%g|kMuJy%>uJ)V$ekDWi&?lkO84QaCd?PeOw18s@ zsx=1vJaMg7X^e{oqfVvP8JAbVD7?D5wz|CXVQJB**Xz}4?V|pYle?F{{~2Bg4{jp9 zEG{tv-7N%b8RE@YahN{=;6CQdmq@V^f^RBOD#cw$$i>B+6h;VogGD=Ws;)emdGZhYI^{Q6~M z^BW)-Up}v|tr(0(8^>Jo8`of2e z0J0H;wb){1=<5d=qLd&e5=#;@iW-{R2j6zd1)!`03@u)QzA>@neq2-x7-ZuUU?E_9 z$W&Z>^!S^m;?4YIS?iO=Et zAXd!nC56~W(10*Gi6G<6>*2xPx}+lq0VRl(Cd<+=u>lc*3{V+CJ%zGSR(@4e`)k$W z=%bV%5gc96P9gykCb{1MJRis%pKkr%6OaWV;Q;7D^IRLsbfP}STMUvk^`iw@6KCATF&>%ELEV>X*Lnsfly7MZ%j`%`MzPZ_{8ANCU$a0RrB?jH;dle+s z5yX^eb2Au>i^L;L3bS@?b>UtD>R8egxiU8kYZ%aG#N12CLWZKTdt_EbJu`>~`rRJL0{^K6Xk8^Ll*Y3afl$$XBanF(M zbKvaGXUK5_SyyPwSRCY#{Di;% z`uiVqT~L}?oSP>vi_BE!$qP819$uXDg{2C_Q)P;5PK>7yC%3%3*zee}%F0TQ|G(Lz Js8o53^dHkAhY$b& diff --git a/third_party/libtiff/test/images/minisblack-2c-8b-alpha.tiff b/third_party/libtiff/test/images/minisblack-2c-8b-alpha.tiff deleted file mode 100644 index 5fe8f5835b119e7e41e1ac85867fba20169317bd..0000000000000000000000000000000000000000 GIT binary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Tnm4l+;QjTXVy+aK+cg=(fwwKk^c&myXcgm0cM48>nY*sG(%5^beR#`HAgxA7qzm z@4%?%9_=H$59^!$5Y$%>T}jo-pM3)Av-^6fy5blA2KDjnE2vucn{PmU;4CM7+Uwc; zCtAh~Y+~OqtatZQaK$$wi>Ru-`FT*U9HZL}+c5MBsON94rSB~Y{~gp*yS-Gkr{0>& z6qU=+dvFcN6zREa&reAeAyZWK-uD?O$P`sqKJ*o+52t)oZTS6Mrbq+xvRfY~ReV!w zC6cY)_Y7PSGDTJW;TJ)@c(|Ubrm@#RJ+rTxs@B+>#8Z!NrHznXlK&SBbMBE1q_wbJ zB~nH36jdwlIRgqjMb+gGd;#jzi5{xfK71C`yC!Xc?501EM1iHq0>9{Y@D!1Aeg{uc zb;0l8DXPHlq;5~{^ioL;&z^s5BUx*6en0!`HB?>j`{(yxM%4wspT2ViRTupJfxDcl z^}i#2ht>Dd4|M{)qw&8d&}oRj?*xi~xp)FiKz#88szUsIC(vI4bMXZFIK&rEpsz#x a|C~U7ehI@&dl_a7j-|73g#DpUp#K3&1Vz9A diff --git a/third_party/libtiff/test/images/miniswhite-1c-1b.g3 b/third_party/libtiff/test/images/miniswhite-1c-1b.g3 deleted file mode 100644 index 9f00ce16829f3ce51593b3b6c742b2b552363719..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9687 zcmXwo#%6p9+}j(dtv%%ppsrRZ>P;&wxEsB0a=mCjHE2I65uHJxnyM90_C(-c{auN z1@_Vw@oboF3Y1Wu@~p&;1YV>Z@r;wz1@cI(JY!@Evr^i$!&yhQ{tZrrA+UqC7N)jQ zzf4lbVXc!6S(TL0qBYZ@bXF>3R2!yxE2E5&674Y z9uG5>*+ZqK0pbMhHj49`D9<)c8H3txR%Eu&5w)7~hCi0F7GIM%?|w-!97wPRvyp=Q zH^`jcAStgpm*}*|Un_06x#)gCr=ROw^m1>gfp)D6MfAd-_=~BHKlC>kH~hP4%*UQA zicb2cnotq#y2AI1_TT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@0ni$w@rE z_&zB@6%NGQKJim3xpwH5g*lgZkZQvq1dZXf_C|qJ3sq(@W)^-42dov5>nX?*Kd@3~m&K;$s zQ55)CTQxeWywPsv4B=)kXE$b^&Ls``0+h(?mAEqz++SyphMCiZmzTo5iJEh3i92KS zQM0Bd#hvLHr{>~%;?53lq2^L!iaVQZrRK6~XqL3poMB3FQd2V}a^skAC9IgnNo%$q zlvG*gB-V!e@8-hqkVe@=TpzwxwY7hr63IK%?7+Qy5#9qiOQgy~jJI_!QNlf7%%K1O G@BaZA+Ye6w diff --git a/third_party/libtiff/test/images/miniswhite-1c-1b.pbm b/third_party/libtiff/test/images/miniswhite-1c-1b.pbm deleted file mode 100644 index 6cff9292bdbb67a5311e1823bead6ef123c82017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3031 zcmYk83v3kE6^763*xtnj#vl}2OqmTO#X^mYqXyg-G9whfwOoPZiqw_!qf)3QiWj9Y5YKm#&uq&O8`920vNgo}%@cZ0p&$2?BYon1n& ztd;kh|3CNKbI-lA6+g%?eRi?G^x4vU+r0meaiB33piGPofpQv7Y*H>q0JzjvVny|S zC|2R(+Kv8V054hq3pqyxu?$9?zE}=`aO*A$pa4u(A(VUZB_BZ1$N)eE%%-@TLG|{d z&jY9{2568EFh`~6nAjyHG0{iQ!9!61RL(?8!jXQAfWbme)%*Yn-NH^&*}j9n!`O2x ziN#9L!SFCn%hYy#6xH~-lW2M79 z_fukGN(1#rfKk+<7(US!V$3QAt#B14!rgWitq+;kDuAw89O-VGj&19&tHjI#fE+KS z5pim3H--|#lw>(*lSNeURUGK=yX0t)Cq>Gk$tOikm0^PnOGBAif##U%bswC6--mc(1KPiCVATm=s)>Ok3K{Q zG_-Ua%v07kjKm_p#JHb9Z%o3N_hz&s-V5t7rDm8;c{%Y*!5a7lx@`5M$3szbj3 zKMN-T{663w>eRPkI~|^1eT|*nP_I8!A&+|X&R%soh`ZL`(;yh7Id*CwT=f?EV5-rmN4T_}rbZ>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T%owegPIe)Hg z-^iaAJlCS<#uZ0|!e=*@z1H*cgOhKJtMHaB4Fv-;@^ZEoY?=Gonk(x6@MLZb5exH& zYT29Juh3*%l!(s`3U+1F@rvF>hcREqzRcC~9 zHT95)B|qnH>yMW6<=qZ~!H&&@TwPytgkLGPqk_p`BGUc+24BA0p$M3NWQxnU9k>1- zhZd`8eAs9dfKCY`AOpU@{LV#}B^;WjUY~FSDs)>)G zEJF=t+cg_UYOCu{EPA#%rIddz$3)bknXKo=z`dG9?mv>3ZAuRII%;7&$HX$B*_?U- z9}>C7{B;(OQ1k}FLLm>>_Bb@MjWJ()4_6PSNxRM(0Xw{Kki5Z&R~l)VKWmHL#FW2t zCm5IFdl|Qp3 O=KQ~SPW3YtMf5+U>KHfx diff --git a/third_party/libtiff/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff b/third_party/libtiff/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff deleted file mode 100644 index 8b04d473dc590b36aad5be1b93e16a8c00170345..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39752 zcmce-XIN89^f$Ug0tpDAYoZAT5;`i~geFBoLhmA?hbB!#LNB5TO~4S6Py~z-q=TR+ z2w0AwKmh3=BDQFvG*MB|W54nI&-*^_hx_5)`{B;>Oy)PU*IqL#d(X_8wbmw+bpRLu z07&2$00BTE^lt)z|HXNt2GD`Km3Q+*8lJyx^4f_=ZWaIgT((G!(~xlJO0BRBCPcvy$AvZAThv9RNnqm z5&NGp|LGSb_CK=xBWf4>4<8g^@P9NS5&$Y{|I@#>H~_%@!+|0!`5%rJVFeNWzpO;C;>Ke>m0VJyyFyZ;wcF~g#V;JG?3rFfBSlWPX3cg;{VfUKSU9z-nstoeSi2-?f-}0|GMW- z*)8JbC%T{WMFH5~^C@}T=z6l>p9`Xd^-fIuga3>JCVE5vyrX)5-p2oFe*-H{GqT@2-c@3emtV<-A-gdK1cJWapI-wJkKgmZ ze*v%qHm(j9V!xjNc7Tke)D|h2%o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1-==>qE-kODuB~tE?(HAo4v&scPVtNh@O+8EM1+L+N$-a@2$+VDTMR*~ z>rQk-+$xk#3D38USVE7U2Tzw*Qu%jSLd}9c!{0Xh!}}lF|FHg-^#8*7e^CDaoiV_U pU)daQ0f5s00IpU1SzW;OoquXVuYYQQ8b9kc@g)Rb@bdrE{{d;e1k3;c diff --git a/third_party/libtiff/test/images/palette-1c-1b.tiff b/third_party/libtiff/test/images/palette-1c-1b.tiff deleted file mode 100644 index 25a1a3244377b66bfe11de1d4e181cb5dc582a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3312 zcmZ9O4RBP|701u}$nGWqcN2o4p|CHJ2pdNtwS@wO_ma{=92u4h5g*HS0y9-JwoIrLcd4=9FpvinbCbNh({tZ$D(#*9 zxchtmbMCqKo^$WcpARJf*?$w|(Lc#XYBv$jBt!XVE@4X#nX|))u5UlFo}CHoHrTx5 zhZEh13?#(QT*1KP8I~gy2L}=D31hhf6Y;jeA_Mc@?nCU!Ekta`ugLE~X0RgY8$!@b z6?MFWc-dg+LSUEWhd}W`G;oN#ATwMUBnxtjAdD(^c~ifD7|2ndy%6@d{GJ?0WKhC(JJt3oXym6+>)p5aj3`5{PG1EMH>M$F0XuE!)g z0McbBg62BTd_zqAN_XnTd}~r*5(J5{pw8BwHf#-omH>wYT0*q^ci7XXF}YpI{-aqg zFZw;Pq)%tYpAbTzhd^0c5#dbgX8M&*2q>juE6oqMt<=k=eeIHNyex>K_NqZlrZpI3 z6h>HRZay3d5HtN9OuwB36W)ZvqT)G%j{R1+gEjP7AsL(0pMCdeU(!Nblc?;mv8*ce1X8VF4|RFNAkwjb_AS}O}ID7VEI z1JInIbFj zt>xMR{GH-QOxWm-)F^KiQHg}{w^~6;7fz0P0t2rrv?|Adr^gr^m{mLb1~z6F%?n~n z)Q32<8d>;c{R!;32g*uur#8~SeunnAdgD4KcO4z0V>Co#?5RY12D{RSH`PWh>}F^g zl&GXrojbi~2VWi)<}Z4TAy=C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>H4b dH*Kn&QCeD8S2y{8#gl6`tSaSxc}1n({{h@2^>F|I diff --git a/third_party/libtiff/test/images/palette-1c-4b.tiff b/third_party/libtiff/test/images/palette-1c-4b.tiff deleted file mode 100644 index 38ba3253f08d390e9f3af28008afc23825e1cae0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12322 zcmZ8{4Nx2DnPv-*=QgRjTeZlD8&|4=T9K(Rn;C-;RH(W$F|FDwseJN)y10_rHG*{` zvZ>r41_XqyOg0xGU8PcUn=KjL5;9|?IMb5j**SSSogeN%lWwvEF@X|=z0I&@BRAXMXr$~h%xcSdJ zk;vTKcqB68$*8JYP~T2obDkGPC8NF;U%0lgoJ>X%Q}Knw%)RQJMW=R;;b|pxb43nC zL$O#azPZWX+tm;GfAe9^cYH&hoR6ddpsG7N`DEDHBYKp4{>{nd`MF4JIi6fth%O`+ z?^W{a2HHU>qrL|uw&JV%3{Kboab~lss>jNaJSlk;pkdwrMcD50dop?DwS|>y*RaBOR1w4%1#zy%@xYIAH zD#2-YG)=p+JT;k!#3HfD#k^BH(2~)GYd7DI8c1>cSze~E&?_Z}^!@67rl_j7&jeCU zc00Fiv!XYjQ}Y8$0K;05WqEFLZW892-MC9Iq2x+577B&%G){nVpjFlD9RYPecT!h( z)HJk3x>I*H-s1a3G3QO?UNg|NcP1z2fJm!jbp=<)V$mqz*fTt=#A9n9r(PEV9yM1{ zH!3^%fTAdQ!c(ueh@$8fQ-MoOc6a5;EvX{{v`E`WO$=Z)#l;)TvDlwgOItIx=K_I^ z&59S$X-`UF;^u}<1CH=s8wEXG*EH*-B8lk^z)cwB06}2D#3E^9ajg^?7A{}TZ&a#9 zU03rd11?v)1UNqcJp(|4lC?YXtmIe3^t5dKToVo+7a|l|D7GChnvmkxKP6{T81 zgj7@y!R-`PvHjDc=o7sjFEa(${g*Z=;K{+*=9VYqfCV(;m*D2{pbU-7N*PECEAOZ< z1sTHY<`BG%nwZKwf&1zroYGrVQv4U1aEx0hL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Dwp;!7{2 z-dSBOT`!jsU&^#^d@B1}Tc7;0yX8IW$HuF3_t)P`{LuE<(U-fP{SW`{&+nCP{N=y> x+pquV@BiW#roT4d>^krM%8QxLJKGmtc=(xfgTF2P&hH-$pI-gZZR@N4{|7D}>+%2q diff --git a/third_party/libtiff/test/images/palette-1c-8b.tiff b/third_party/libtiff/test/images/palette-1c-8b.tiff deleted file mode 100644 index b87685a1d5aefef4ff21a56502a661972b9162ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25548 zcmY(r2|&$h`#zp2m3im1D$!y@`yMs4NV}F(Da#;B3))VZcEr%8O`>Q~&goR=RJ3bX zl#;P;;Wd7tQZbgXFEQW$b${}{-|zqaoO3$m(B-<<=YH$tqCzS~!KhT)@eIXe%L?A#f@r@nt+cw}ts z?b|WDe0=-v!?zI)4fj8Kdx!gCc1G=pi`*3$85y=~$F72_wU}mxl>nGET|f|cPJ=`6P}b9!bwR<;v|KqhVSgYH#|HxJ`QB# zp6GsT#q1j#|~XXTYGm$ zcaPG>rp~6O&QpOqKpOq`cZ3s(@pLf~7Z(;=Ht=S6xWBxlqXO$%eQy$-@m?A z#;xiZzO#n|M2U%MX=$mcc&4Rh#2vae{O0Y`w{OSaz5DcT{2llki8d;(8Xp^d+*;b& z&gZulNBR4QMaJY87M7lZbOPV`^8*9t&z-B^9i?YzX0go9i{IGTN$48=<931MT|0Lc z9oh-)#t}I12ZW$;M?vkt>)|T1lKTGF(Cf#KAKpW?-DSMia|0)Lq^5=^fw`n40!R4v z?@vuT^!nq+ch8JFzn-Jv}>TPm$olK>dy_;c2O0EfvrJ3-qP!Pu-7i@G^m>A9hZv<{XgwR3K zv%|v=z4S1Ox;|h57pj_;2}rpQapNly#UP6T=H#z!9a)z=?4)z&cLaZ7ue z1fHYgtyQf9qoc#^rz;$}T*l&n@7x*U?%eryzPhBkv#Yy{hi56jl<&#)@bDp*tn=CzwwZ|7_b2#qQ!iPDaZib53G417DH0%OZ_L0U$}-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iff/test/images/rgb-3c-16b.tiff deleted file mode 100644 index f1a0279a194860390e0d372705d8a366cb06048d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142670 zcmWh!Q*<0$7p;x2ZrTQ81rtr!*tTu7X>2sMZEIprFt%c=scrl3e;>}neLCx|v)A5d zpL30k_aXNkKw(=C%jnB~7|zu0Hr(y)S2?buJ3g7P2|&eMn=zug+>lK$VOs8u z?H7`n{6RY_Vx^qA&9iAKS-edEeoyv-jp6hQ39{|cnS)ZrwyD$2G9A_qGl!)ymONaE zc!)*$;89aYJ7}Lk-pR=HnXh#v`2~cr`qt{$Dd!m5BunfU=zSA@JO5mUHlZU#;FxYf zN9`4o?y>derMM-NU_XtsljYi!!sG*J6HcgsbQ+Fqtex|XtJ%yg$G~afRfoKA^-edSS zY_{go0_vmdLa0{tI;96GO4Vw)8l0-Xqi^kT zKqU#GLkr*v{GEcOv(2Mnxl5;;1%n4>(+cPO{%{|q>-m4-HfA33|2c~-_#UV<=UI%u zqcg8nE*pGgPP4rG_D{ZR>5o7wF23+XpcH2{TgS(RMM?4Z{=qm9R_fM9q5JGQ+fm?- zN)Fycka>iiK8~tAY&|&spTkMVE!=jxb%+#Rq6(h%Y`UoGZ{f`3l^Xx@tXgvYg{snu z+$PgHQmt3RU_(RoXyemHcr~~2a*KcMxu)Qb#JZo2xn0-(-PU$;nyxnGbjmlnH_P?x zZxm>GI}+P8+i{H$(>m5A!6@jY^bAn7L#Fh@Y-T;KU=-C{f`=nW&ad(u8WS@8OWf;& z3ZvS$y7rIUYY%BJ9SCXjFOMy@uXI;evd*iJLTQ?r)gP7>wA5|8g<+b9_b)2Mm|UE4 zl*gNcup81>OwJY3(DyYJn@@Qhcl3%_1 zy{2nVTYh~*phh>a$ue3$*QqfvDk96SQ8^lztJ`=tc0Bt+gHdFA*87s#(1ctIr&wo~ zyvK@?X3ZtG>Z7(Y6{-5p4sI1^4Er6HqY9PHtgXB#28V4Fyr=HCdcN`g8h7(nyT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-YLy5o=hNTM)` zJesUdrK@Y$vVLFbM%8|6VozoK(r*3MWa{Zy^ku8>G!gR!<1~$TnImB4Xv7&3VIC$K z!pI#Gd6`YGVPK1syk9-OOMED2j76Ia>Hbq;-lNnc@7m*|u&4rAAyxyxnkb2&#` z_JIfM%+FO3=cdYZ(^UG%hj`MetRgrC;_Zx7e&(Z5}6kKp8~nINUnV#hu~D34k4;U zTPnHe5uf*oHJ#wE3UzOV=O2Zdry_N;NG%X4N`>;fr;-ezH2+kRBa~#E2y-^K(iWGq z7B@;(_G(v->sL>j*UlcTiMv;&J?qlGb!pF*;`zR+|4=hHUom@;Ge_uTL zv3mSt_2kFO$>rkF<;>9q!2R|3a^~dw)akdW=KbY%^>m_gfs{HzVfuMn;nbIQEL?Z zDwDjypun8NWeRzLNLr&%HbGIdX?w2pJuZODKHzf1k?ztsH$@6t-5#VEjgWntR{S{I z-s#@_wz&I!bK{qVb>$fF7Lf=98i7C{5uf3L{P+DwxJUiGM5kdV94 z{}~M5_&<;-KOcvm!5ZRz_|HWDi(h<~;dYPVb(dLN^5DV0A4fPteJ5Z5fynzE23kPc zXQT{)I9Nv@e)~TVi2pMP5(JU||G(`ABl&l#AC}w`#NR0{xmV`GVY<51Rq~6RzpJr^Z)x~W);5}>JsoS!ms}eTcP0Y diff --git a/third_party/libtiff/test/images/test_float64_predictor2_be_lzw.tif b/third_party/libtiff/test/images/test_float64_predictor2_be_lzw.tif deleted file mode 100644 index 7cbbae148974575b57d7055789ee62c01f585fcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmebEWzb?^VBlcjVPs%n2C^6#M1TY%5}OIib^wYqL)olAHXD=;)W|5vzyj9Gz%Y+d z6iHkR$_AM!4pYN)ictnhjV+YT1XL3YWrJJ-1Pub*J`5~kJS@#l4hA0He}6c%9CRo+ z(G$YJ*tP%u$BZYD|9*A2IBfLLsdMI>csy|v#~LN2|Mjj7mmFBKv>fz&83ZkBHYw|M zoL4QXFpxc{U&Eog+5PvkPSyop%hs>hAUEUR@}ti~HL@RV;+o~B9-`O6h=C zs+G3!^nI_*Jav~z{pt3~p782SRkA3fTmFYhjGc^GTjC1>vzL@5`pNxa#$J(WR#`6zJUXk>g zVx4<*zL(~#JNv%HpSkgV>HDY?(&7u&9&NN_@40jFaNEnDe=7CXcR!o-?2&1XzYxFA zm*l+x^Ha>;a?NEd7s$$g_iFZrb5+llS!x)4`Devpz_Lt!P1A>S)&jzJnznK3$aU;G z`AUavPv^=f|D8H_>{-3BFKRQ_g0+|4Gj2Uo9kW)G>(pXyHD4EBu?-mp4F+5KG~cah z%|KzI2u5w4;Z&p~Pw0`xE-^V7Mno;c*6eY~MbR+X` zWsga#jJb~o%3L*Z7D%pCbzOd{gh~6u%YRizgsc9nTJ@%-sHuZl`yh*dFw=eUg{Py8 zbv!#(NZJNuuKB65W6Nr#t`nM7cRCt_FMj9SuxU}Y*Wyl-OH)s6oRw{+vF1v{d2It5 zUF{1(#fz@0eSB*3YGwPX>%zNUWPY2=;J3Eh-o>ywm1)7&P1&xt*&HXGmn?r{)xG^g z=}g1TD{I;{{J5S3FvPr_A~fsVm8UGTcLdD*A9(Y!(PWN=%QveUT)yV=yuc}eWy_Zv zeI-i_ubjMdrZzf3$ diff --git a/third_party/libtiff/test/images/test_float64_predictor2_le_lzw.tif b/third_party/libtiff/test/images/test_float64_predictor2_le_lzw.tif deleted file mode 100644 index 3dd57a5491ea51187543f801ecdff16b1c36b98c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmebD)MDUZU|`^3U|?isU<9&6fS3`9%>-pT0L7W1Y*rwf4ax@T5oBZm>zxN=iz11O zLD?WP#i43$GBGg7AgQs1vVp=3!B93ckPQM23&x4t4eqa~Nc- zbeY-?&;O{gr;N>^)?FcoLC4BbsmU|>;!hqcQNDUFpm$87%!TzF9}0S!Y!la?do;1A zBD#T}Pry#ihl{25vk^mZYVk{1xpu?OW2uFgShdu++6~kVtwi*;a?C!&A=(kU$vvq3 z@}uG?>37pp`)@BOl$f(>yTA(9_W=qb(QFNdehVe6>F&C8 zW(r$v3^%)YLB8@8&wKyN177<4x*f$Y=ks+%tnN;pP6lDIich^V7ufc7-(<*nTCY*p zwp#7^gO`)@bXUJ=(mEadWMA(T-F60jQoc$mDK#P=4yH($jy1Omc=o z5bLUoCyS$Gi;cx{w&qK_lefq8Gr0`?>VuqEmtT>@|8K2 z&Aq030<-ii0dsd2W%HHdQ+6zTIPs27f?UZ`UY<*@dF=V`80d1A=>{bU1O#bGpKEt$ zXESZs6fA0>kgEAKsqryS=fNraw3=T^Efl%(xis~$$-eI|&bEp=KiWP`YT=o%W6RgR K`l;;F&;S4%t}{9S diff --git a/third_party/libtiff/test/images/test_ifd_loop_subifd.tif b/third_party/libtiff/test/images/test_ifd_loop_subifd.tif deleted file mode 100644 index 7294085e400a7f5ae3c1b9c14bc9cd2ab1f9464f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1654 zcmebD)MDUa0D}7e4BQM1jLZy-Kn@rqv6+BuW}x^qAZA7qXM?htfZ~FTEMR>cK(;7U z9Hd7KNxe8!4MpfPN+9Rt}&Va^1QD8lEt>BEt1K$!_%n z#uOp9ZlS=fAwcs%@egyW5j+jl0o_VCU%ey3eF;D{(bZ=husYdT$ckh9|Rz-GlRPh0L@KM%>V!Z diff --git a/third_party/libtiff/test/images/test_ifd_loop_to_first.tif b/third_party/libtiff/test/images/test_ifd_loop_to_first.tif deleted file mode 100644 index 015c8d90d0d631c23792e8fc2c9e98af45f7809e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 312 zcmebD)MDUbU|`5*;9+23WM*IlvcVXM%>-q00OgpG#MzM8f{ZL+eIPYLNaCVMY%wIZ bI8;5zE*T{8U?lb;pd7W_wSbE50)-a zy*pIV{4_?UCHo9bs^zTTBO^d}qr8R;r=nCrFVJ3GRv{1Ug6Ixmt|muF2uFepEIQ9n zt5`Kzh{2TqKS4xWbSPI%8!1&0Jq@LmgpSBMx6mCD1fYy;8Vl_g;_@s7Cg|CmHpby1 z1-ZDLMnpF(VheM0;N`TH1f=zM0!Kq9@c8*XL&FojC$Cbu*R^G9ZAIO9Efc+)rui`O y!%UBS=3RWX#kb5KwzzaRyZC;-zVw#nVV8f}#m`$@{x6&UlSZ#Q&BrdTzvK_+G|CPD diff --git a/third_party/libtiff/test/images/test_two_ifds.tif b/third_party/libtiff/test/images/test_two_ifds.tif deleted file mode 100644 index 4334649ea787c9b71f36eb918f715af88b296e2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 312 zcmebD)MDUbU|`5*;9+23WM*IlvcVXM%>-q00OgpG#MzM8f{ZL+eIPYLNaCVMY%wIZ cI8;5zE*T{8U?lb;pd7W_wSbE50vg2t0F?*@UjP6A diff --git a/third_party/libtiff/test/images/testfax3_bug54_1dnoEOL.tif b/third_party/libtiff/test/images/testfax3_bug54_1dnoEOL.tif deleted file mode 100644 index 3b8df113cb2a0e53adc600a2195befbdaf6fc513..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39616 zcmeFZdsI``w=XUP2tr7rq6A1tqSjg;m;gnRU;wuYwv^(dEh<_92+^W~ghw@{Kp-0x zA=b78NtB2JTD3fUAfhD%3DppSpaoPOMjB(^`W~Wl4YAdu}GFJ2#RN(vAy>(;pK_7aqa#F?yh;B!I~&ld(hbv(KFje=9li0 zr66TnE+5`f8W4!6-mLs=zI1n3iWZrIkIo4KLr_H3-yU@F#Ltdm5x0?lZ%NEqRK(@( za;)CiP@8pcQ_R_H8tL*+ur|T#C+Bm5$}^5FTM@~3KU@_o@RE53s0=T5tMS1NO}iK| zL^MF+N^!*ptJm!=kEx}F+K+|`X`VByKUIxeoOmuMs=|efbQg=tHwr35CehG4n~RFM zT{$t&=Q3vPCYzG_OPRzU)!XICdovy{4Wo*Ym-go#{6fEx8*->x#4 z;z#pP6N;3^c;Xyf@L7}%29vmf>SGf5f2BoKlc5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Pb1++R!jEnL2vB4kF999I?pBVez!y_hJPzy1+wn1?@wVFDVv}? zfQ`PfL!my0HhuN(cVyjl*x?1N+YV(9EdRC7zkhc?+jF6zZ)T%VwzeqLQ&_fyW7%R* zs6VVxC=o1|+n`VxP=1AFAsnY2N&_7Kf4W?QI`g2wX`()d@*R{vp>)DI$KX+@dPfw> zZyuZ@lz&1gBBD@VlHk0_C{!2)g(`+J0L8-{eutuhQnCz%B6^@u^B5?UTNnz3S%X5& z+6dPgDnLh}P=$#o)Usq0N|uH~WoDyL)6l_fxhPaNoQR(Qg)%|8d>Dm_Jp$KNh(g_m zQYb>9!t+t6|A10|6opDX2FEBsq4ZFsVifALLKF%oL7|jTa*9wWMllNYJCyH_qfl`t dP$=@(a802UeS<=+Jqg$S6kJOvDJ3Y>e*)5aBR>ED diff --git a/third_party/libtiff/test/images/testfax3_bug_513.tiff b/third_party/libtiff/test/images/testfax3_bug_513.tiff deleted file mode 100644 index 41544849bc750acdd966109aeb7f2bafacd54431..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmebD)M7AT00Q96(f^sdz6lp~ZDqBa3L};;8LyF6^ScYV$ z(_)zvx<(CIrigo!Oj1qFH0SxhpULO@`TSn5|66m;``Nem_Pn3xSh{rjAe}*j28|v> z4bmDk7%&a^4H`UvpBxJ4Z+sd9(gtg)^Wc1%zi}b z!S#OQxPJZL`FG|F8e}+FTisSC)M@k^R{%cscYfT@X@INy3pp(YYYdtIaT?H;CE#NK zX9I2n_)NgLxYGbL;f>M%yq9kE58AwBvwsx(&&^TWL&CQ$V6!c_X6EMbXFkZ%+`@c; z`P>B-R%}45tQK%B2U*OYKWCPuxw!?~e$%F%Ug3c|*pA_5GuifAwy>i@f`WH!XGd+` zzBwv-bHJd<`BB>EZRXj}jOWtr-@n))ni+3l&apdT7;yg__PkyToW*waV^JGJn zc6mip{emx5{y(!Bn+65aK3lGOHs}q@<$e6%Yb=+PfcQ$C8S^znCOg^tCr%axX!;HJ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fO)Kbf=>3y(d& zW{C8TIL4W_&s6UfH}<;rt~YZEz{zw9s=ZUE5q0jL0SN=u*KG|~^Se7JdY9mV>BWzC MGV+x>w0iCMe|3=)6aWAK diff --git a/third_party/libtiff/test/images/tiff_with_subifd_chain.tif b/third_party/libtiff/test/images/tiff_with_subifd_chain.tif deleted file mode 100644 index 7acbba1802e69abb27537cd1422b679d1b3935d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19484 zcmeHNZA?>F7=B6-Q307#P$ybv!3|-4Ord;Kv7&rT9RjwMsoStrWTK8SObp8!LsDb> ziZN)6i^de@52v^ohKLJU7Q+u`j3LCBY}pSa`?2kZSY%X2CdpSF7mEm zf_Cgd@@v5uEy9!J>e#KzfXsJ+zlqz+fm17h+8kg>F7S-F<6yr$pgteSDd2Jx0{4jv zPGHYUpl}s1xd?bbbgl-PU4Uy1kX#J>LR?-899RdGmH;WGz%cP`84xH3Hogbk<$PZy z;wJ)GDuL=17-BRLTkXRbZvlV5wm0A|(zblFXsY3$N;h0}rtNtf1!KWTvL*gnkb4oQ zeLl8eQhZlX9WzDS0*4x#+tWf#YP_P(YVT@KNtMm9yww1TY@^I{MaD8JrAUenw;4{P zBH5%V@(BCriVTtKiX0@@6*-+NuPf3X&ceBwK*KD+F`KLO1~5omoCEAj16Ixj66OI9 ziAy%1Wj;{+CKbN`_?5U~2U^oPw+vwBLSTfr{ubx)Hc*iX%v}WhPV{DRrLzI|JAi#L ztBUAf0vucVYSpMJL9OR(RmSRNXhlAw$dv*VUic+F<%M5zM>PDBrG$r6k5Z@NPsv9s zGHV*!iGkOF_UV9c2CyuJol}`{1=6vQ1S3T|Kz-=Z{zg7J+P*2k;RL{&2xKGye-S@S z1x_Rb+g}?yQnd>I5iRqn=QhAz(a0_3gl<-ZidOOO$wxXOoLyfuTHtwvtG5q9{Z0>#3a_hq`?{0TNdizg1uh%rXZ`O7HytilT9#28X&>#Ezw(s@a zeDvg>FZ(~*=Pk@gO$`26`>D6jpPP1kz}K{;u+x)$`i}pzEqx>Vo#*e>H`h2bPH*^n zu;KHXTmJ91U45{-MN7%oUB)jkth#+W+05#RbF#qT>SQI(teq#;qI4 zjpRl=ZTwd@=BgW*>fTeLF|MacZX`F+Ip2uVL}{Y5@n6|U-ALU?-ALV-=}Dn@ns}Oc zns}Ocno-n#0L5+rF*8&=@Gt`d8|4lHz3G0IM~zQFFwdM%rz+3)5+7vGbB<;AtgUIF*DCr$dXZ%{x9L=N#Myl$5#G1?M@eyRbs|5;Vcgs{oDna zuhtkh9(I_NcR#84SLyq_ZE7;6AKuO{PZv1bpt1dC-nQU&i&b_-&Rz>#13hgP2WH7E zzw)%+b+6a+Yq@u?T~_N~pWFRxT~zqLU4Cmm&Seenx{#v1%Xr@LkBikZ&9(2@Zk-#b z(r$D1`rOLHi)|*g@;o=*uJKo}l<$4dyY=_)SM1vJp0D)o`R8vepC4xX-_OGU0GmRv A!vFvP diff --git a/third_party/libtiff/test/long_tag.c b/third_party/libtiff/test/long_tag.c deleted file mode 100644 index df3202f..0000000 --- a/third_party/libtiff/test/long_tag.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test LONG tags read/write functions. - */ - -#include "tif_config.h" - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -extern int CheckLongField(TIFF *, ttag_t, uint32_t); - -const char *filename = "long_test.tiff"; - -static struct Tags -{ - ttag_t tag; - short count; - uint32_t value; -} long_tags[] = {{TIFFTAG_SUBFILETYPE, 1, - FILETYPE_REDUCEDIMAGE | FILETYPE_PAGE | FILETYPE_MASK}}; -#define NTAGS (sizeof(long_tags) / sizeof(long_tags[0])) - -const uint32_t width = 1; -const uint32_t length = 1; -const uint32_t rows_per_strip = 1; - -int main(int argc, char **argv) -{ - TIFF *tif; - unsigned int i; - unsigned char buf[3] = {0, 127, 255}; - (void)argc; - (void)argv; - - /* Test whether we can write tags. */ - tif = TIFFOpen(filename, "w"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - for (i = 0; i < NTAGS; i++) - { - if (!TIFFSetField(tif, long_tags[i].tag, long_tags[i].value)) - { - fprintf(stderr, "Can't set tag %d.\n", (int)long_tags[i].tag); - goto failure; - } - } - - /* Write dummy pixel data. */ - if (TIFFWriteScanline(tif, buf, 0, 0) == -1) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - TIFFClose(tif); - - /* Ok, now test whether we can read written values. */ - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s.\n", filename); - return 1; - } - - if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0) - goto failure; - - if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0) - goto failure; - - if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0) - goto failure; - - for (i = 0; i < NTAGS; i++) - { - if (CheckLongField(tif, long_tags[i].tag, long_tags[i].value) < 0) - goto failure; - } - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - return 0; - -failure: - /* Something goes wrong; close file and return unsuccessful status. */ - TIFFClose(tif); - unlink(filename); - return 1; -} diff --git a/third_party/libtiff/test/ppm2tiff_pbm.sh b/third_party/libtiff/test/ppm2tiff_pbm.sh deleted file mode 100644 index fb6c3cf..0000000 --- a/third_party/libtiff/test/ppm2tiff_pbm.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. ${srcdir:-.}/common.sh -infile="$IMG_MINISWHITE_1C_1B_PBM" -outfile="o-ppm2tiff_pbm.tiff" -f_test_convert "$PPM2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/ppm2tiff_pgm.sh b/third_party/libtiff/test/ppm2tiff_pgm.sh deleted file mode 100644 index 6035234..0000000 --- a/third_party/libtiff/test/ppm2tiff_pgm.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. ${srcdir:-.}/common.sh -infile="$IMG_MINISBLACK_1C_8B_PGM" -outfile="o-ppm2tiff_pgm.tiff" -f_test_convert "$PPM2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/ppm2tiff_ppm.sh b/third_party/libtiff/test/ppm2tiff_ppm.sh deleted file mode 100644 index 576ab3e..0000000 --- a/third_party/libtiff/test/ppm2tiff_ppm.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -. ${srcdir:-.}/common.sh -infile="$IMG_RGB_3C_8B_PPM" -outfile="o-ppm2tiff_8b_ppm.tiff" -f_test_convert "$PPM2TIFF" $infile $outfile -f_tiffinfo_validate $outfile -infile="$IMG_RGB_3C_16B_PPM" -outfile="o-ppm2tiff_16b_ppm.tiff" -f_test_convert "$PPM2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/rational_precision2double.c b/third_party/libtiff/test/rational_precision2double.c deleted file mode 100644 index eb9079f..0000000 --- a/third_party/libtiff/test/rational_precision2double.c +++ /dev/null @@ -1,1338 +0,0 @@ - -/* - * Copyright (c) 2012, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * -- Module copied from custom_dir.c -- - *=========== Purpose - *=================================================================================== - * Extended and amended version for testing the TIFFSetField() / and - *TIFFGetField()- interface for custom fields of type RATIONAL when the TIFFLib - *internal precision is updated from FLOAT to DOUBLE! The external interface of - *already defined tags should be kept. This is verified for some of those tags - *with this test. - * - */ - -#define FOR_AUTO_TESTING -#ifdef FOR_AUTO_TESTING -/* Only for automake and CMake infrastructure the test should: - a.) delete any written testfiles when test passed (otherwise autotest will - fail) b.) goto failure, if any failure is detected, which is not necessary - when test is initiated manually for debugging -*/ -#define GOTOFAILURE goto failure; -#else -#define GOTOFAILURE -#endif - -#ifdef _MSC_VER -#pragma warning(disable : 4101) -#endif - -#include "tif_config.h" -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tif_dir.h" -#include "tiffio.h" -#include "tiffiop.h" -#include "tifftest.h" - -int write_test_tiff(TIFF *tif, const char *filenameRead, int blnAllCustomTags); - -#define SPP 3 /* Samples per pixel */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -/*-- Additional custom TIFF tags for testing of Rational2Double precision --*/ -#define TIFFTAG_RATIONAL_DOUBLE 60000 -#define TIFFTAG_SRATIONAL_DOUBLE 60001 -#define TIFFTAG_RATIONAL_C0_DOUBLE 60002 -#define TIFFTAG_SRATIONAL_C16_DOUBLE 60003 - -/*--- TIFFField Definition --- - field_tag: the tag number. For instance 277 for the SamplesPerPixel tag. - Builtin tags will generally have a #define in tiff.h for each known tag. - field_readcount: The number of values which should be read. The special - value TIFF_VARIABLE (-1) indicates that a variable number of values may be - read. The special value TIFFTAG_SPP (-2) indicates that there should be one - value for each sample as defined by TIFFTAG_SAMPLESPERPIXEL. The special - value TIFF_VARIABLE2 (-3) is presumably similar to TIFF_VARIABLE though I am - not sure what the distinction in behaviour is. This field is TIFF_VARIABLE - for variable length ascii fields. field_writecount: The number of values - which should be written. Generally the same as field_readcount. A few - built-in exceptions exist, but I haven't analysed why they differ. - field_type: Type of the field. One of TIFF_BYTE, TIFF_ASCII, TIFF_SHORT, - TIFF_LONG, TIFF_RATIONAL, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SSHORT, - TIFF_SLONG, TIFF_SRATIONAL, TIFF_FLOAT, TIFF_DOUBLE or TIFF_IFD. Note that - some fields can support more than one type (for instance short and long). - These fields should have multiple TIFFFieldInfos. reserved: - set_get_field_type: TIFF_SETGET_DOUBLE get_field_type: - not used - - field_bit: Built-in tags stored in special fields in the TIFF structure have - assigned field numbers to distinguish them (ie. FIELD_SAMPLESPERPIXEL). New - tags should generally just use FIELD_CUSTOM indicating they are stored in the - generic tag list. field_oktochange: TRUE if it is OK to change this tag value - while an image is being written. FALSE for stuff that must be set once and - then left unchanged (like ImageWidth, or PhotometricInterpretation for - instance). field_passcount: If TRUE, then the count value must be passed in - TIFFSetField(), and TIFFGetField(), otherwise the count is not required. This - should generally be TRUE for non-ascii variable count tags unless the count - is implicit (such as with the colormap). field_name: A name for the tag. - Normally mixed case (studly caps) like "StripByteCounts" and relatively - short. -*/ - -static const TIFFField tifFieldInfo[] = { - {TIFFTAG_RATIONAL_DOUBLE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, - FIELD_CUSTOM, 0, 0, "Rational2Double_U_Double", NULL}, - {TIFFTAG_SRATIONAL_DOUBLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, - FIELD_CUSTOM, 0, 0, "Rational2Double_S_Double", NULL}, - {TIFFTAG_RATIONAL_C0_DOUBLE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, - FIELD_CUSTOM, 0, 0, "Rational2Double_C0", NULL}, - {TIFFTAG_SRATIONAL_C16_DOUBLE, -1, -1, TIFF_SRATIONAL, 0, - TIFF_SETGET_C16_DOUBLE, FIELD_CUSTOM, 0, 1, "Rational2Double_S_C16", NULL}, -}; - -#define N(a) (sizeof(a) / sizeof(a[0])) - -/*--- Add additional Rational-Double Tags to TIFF - ref: html\addingtags.html but with new function _TIFFMergeFields(). ----*/ - -/* In libtiff 3.6.0 a new mechanism was introduced allowing libtiff to read - unrecognised tags automatically. When an unknown tags is encountered, it is - automatically internally defined with a default name and a type derived from - the tag value in the file. Applications only need to predefine application - specific tags if they need to be able to set them in a file, or if particular - calling conventions are desired for TIFFSetField() and TIFFGetField(). When - tags are autodefined like this the field_readcount and field_writecount - values are always TIFF_VARIABLE. The field_passcount is always TRUE, and the - field_bit is FIELD_CUSTOM. The field name will be "Tag %d" where the %d is - the tag number. -*/ - -/*The tags need to be defined for each TIFF file opened - and when reading they - should be defined before the tags of the file are read, yet a valid TIFF * is - needed to merge the tags against. In order to get them registered at the - appropriate part of the setup process, it is necessary to register our merge - function as an extender callback with libtiff. This is done with - TIFFSetTagExtender(). We also keep track of the previous tag extender (if any) - so that we can call it from our extender allowing a chain of customizations to - take effect. -*/ -static TIFFExtendProc _ParentExtender = NULL; -static void _XTIFFDefaultDirectory(TIFF *tif); - -static void _XTIFFInitialize(void) -{ - static int first_time = 1; - - if (!first_time) - return; /* Been there. Done that. */ - first_time = 0; - - /* Grab the inherited method and install */ - _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); -} - -/* The extender callback is looks like this. -It merges in our new fields and then calls the next extender if there is one in -effect. -*/ -static void _XTIFFDefaultDirectory(TIFF *tif) -{ - uint32_t n, nadded; - - /* Install the extended Tag field info */ - n = N(tifFieldInfo); - //_TIFFMergeFields(tif, const TIFFField info[], uint32_t n); - nadded = _TIFFMergeFields(tif, tifFieldInfo, n); - (void)nadded; - - /* Since an XTIFF client module may have overridden - * the default directory method, we call it now to - * allow it to set up the rest of its own methods. - */ - - if (_ParentExtender) - (*_ParentExtender)(tif); -} - -int main() -{ - static const char filenameClassicTiff[] = "rationalPrecision2Double.tif"; - static const char filenameBigTiff[] = "rationalPrecision2Double_Big.tif"; - - TIFF *tif; - int ret; - int errorNo; - - /*-- Initialize TIFF-Extender to add additional TIFF-Tags --*/ - _XTIFFInitialize(); - - fprintf(stderr, "==== Test if Set()/Get() interface for some custom " - "rational tags behave as before change. ====\n"); - /* --- Test with Classic-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filenameClassicTiff); - errorNo = errno; - if (ret != 0 && errorNo != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", - filenameClassicTiff); - } - - /* We write the main directory as a simple image. */ - tif = TIFFOpen(filenameClassicTiff, "w+"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", - filenameClassicTiff); - return 1; - } - fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); - ret = write_test_tiff(tif, filenameClassicTiff, FALSE); - if (ret > 0) - return (ret); - - /*--- Test with BIG-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filenameBigTiff); - if (ret != 0 && errorNo != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); - } - - tif = TIFFOpen(filenameBigTiff, "w8"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); - return 1; - } - fprintf(stderr, "\n-------- Test with BigTIFF started ----------\n"); - ret = write_test_tiff(tif, filenameBigTiff, FALSE); - if (ret > 0) - return (ret); - - fprintf(stderr, "\n\n==== Test automatically, if all custom rational tags " - "are written/read correctly. ====\n"); - /* --- Test with Classic-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filenameClassicTiff); - errorNo = errno; - if (ret != 0 && errorNo != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", - filenameClassicTiff); - } - - /* We write the main directory as a simple image. */ - tif = TIFFOpen(filenameClassicTiff, "w+"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", - filenameClassicTiff); - return 1; - } - fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); - ret = write_test_tiff(tif, filenameClassicTiff, TRUE); - if (ret > 0) - return (ret); - - /*--- Test with BIG-TIFF ---*/ - /* delete file, if exists */ - ret = unlink(filenameBigTiff); - if (ret != 0 && errno != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); - } - - tif = TIFFOpen(filenameBigTiff, "w8"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); - return 1; - } - fprintf(stderr, "\n-------- Test with BigTIFF started ----------\n"); - ret = write_test_tiff(tif, filenameBigTiff, TRUE); - return (ret); -} /* main() */ - -int write_test_tiff(TIFF *tif, const char *filenameRead, int blnAllCustomTags) -{ - unsigned char buf[SPP] = {0, 127, 255}; - /*-- Additional variables --*/ - int retCode; - float auxFloat = 0.0f; - double auxDouble = 0.0; - uint16_t auxUint16 = 0; - uint32_t auxUint32 = 0; - int32_t auxInt32 = 0; - void *pVoid; - int blnIsRational2Double; - - int i, j; - int32_t nTags; - - const TIFFFieldArray *tFieldArray; - uint32_t tTag; - TIFFDataType tType; - short tWriteCount; - TIFFSetGetFieldType tSetFieldType; - unsigned short tFieldBit; - const TIFFField *fip; - char *tFieldName; - -#define STRSIZE 1000 -#define N_SIZE 400 -#define VARIABLE_ARRAY_SIZE 6 - - /* -- Test data for writing -- */ - float auxFloatArrayW[N_SIZE]; - double auxDoubleArrayW[N_SIZE]; - char auxTextArrayW[N_SIZE][STRSIZE]; - float auxFloatArrayN1[3] = {1.0f / 7.0f, 61.23456789012345f, 62.3f}; - float auxFloatArrayResolutions[4] = {5.456789f, 6.666666f, 0.0033f, - 5.0f / 213.0f}; - - /* -- Variables for reading -- */ - uint16_t count16 = 0; - union - { - int32_t Int32; - short Short1; - short Short2[2]; - char Char[4]; - } auxInt32Union; - union - { - double dbl; - float flt1; - float flt2; - } auxDblUnion; - - void *pVoidArray; - float *pFloatArray; - float auxFloatArray[2 * N_SIZE]; - double auxDoubleArray[2 * N_SIZE]; - double dblDiff, dblDiffLimit; - float fltDiff; -#define RATIONAL_EPS \ - (1.0 / 30000.0) /* reduced difference of rational values, approx 3.3e-5 */ - - /*-- Fill test data arrays for writing ----------- */ - for (i = 0; i < N_SIZE; i++) - { - sprintf(auxTextArrayW[i], - "N%d-String-%d_tttttttttttttttttttttttttttttx", i, i); - } - for (i = 0; i < N_SIZE; i++) - { - auxFloatArrayW[i] = (float)((i + 1) * 133) / 3.3f; - } - for (i = 0; i < N_SIZE; i++) - { - auxDoubleArrayW[i] = (double)((i + 1) * 3689) / 4.5697; - } - - /*-- Setup standard tags of a simple tiff file --*/ - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - /*--- Standard tags with TIFF_RATIONAL and TIFF_SETGET_DOUBLE to - TIFF_SETGET_FLOAT change. --- - * They can be written either using float or double but have to be read - using float. - -------------------------------------------------------------------------------------------- - */ - if (!TIFFSetField(tif, TIFFTAG_XRESOLUTION, auxFloatArrayResolutions[0])) - { - fprintf(stderr, "Can't set TIFFTAG_XRESOLUTION tag.\n"); - goto failure; - } - /* Test here the double input possibility */ - if (!TIFFSetField(tif, TIFFTAG_YRESOLUTION, - (double)auxFloatArrayResolutions[1])) - { - fprintf(stderr, "Can't set TIFFTAG_YRESOLUTION tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_XPOSITION, auxFloatArrayResolutions[2])) - { - fprintf(stderr, "Can't set TIFFTAG_XPOSITION tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_YPOSITION, auxFloatArrayResolutions[3])) - { - fprintf(stderr, "Can't set TIFFTAG_YPOSITION tag.\n"); - goto failure; - } - - /*--- Some additional FIELD_CUSTOM tags to check standard interface ---*/ - - /*- TIFFTAG_INKSET is a SHORT parameter (TIFF_SHORT, TIFF_SETGET_UINT16) - * with field_bit=FIELD_CUSTOM !! -*/ - if (!TIFFSetField(tif, TIFFTAG_INKSET, 34)) - { - fprintf(stderr, "Can't set TIFFTAG_INKSET tag.\n"); - goto failure; - } - - /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter ( TIFF_FLOAT, - * TIFF_SETGET_FLOAT) with field_bit=FIELD_CUSTOM !! -*/ - /* - can be written with Double but has to be read with float parameter */ -#define PIXAR_FOVCOT_VAL 5.123456789123456789 - auxFloat = (float)PIXAR_FOVCOT_VAL; - /* if (!TIFFSetField(tif, TIFFTAG_PIXAR_FOVCOT, auxFloat )) { - fprintf (stderr, "Can't set TIFFTAG_PIXAR_FOVCOT tag.\n"); - goto failure; - } - */ - auxDouble = (double)PIXAR_FOVCOT_VAL; - if (!TIFFSetField(tif, TIFFTAG_PIXAR_FOVCOT, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_PIXAR_FOVCOT tag.\n"); - goto failure; - } - /*- TIFFTAG_STONITS is a DOUBLE parameter (TIFF_DOUBLE, TIFF_SETGET_DOUBLE) - *with field_bit=FIELD_CUSTOM! - *-- Unfortunately, TIFF_SETGET_DOUBLE is used for TIFF_RATIONAL but those - *have to be read with FLOAT !!! Only TIFFTAG_STONITS is a TIFF_DOUBLE, - *which has to be read as DOUBLE!! - */ -#define STONITS_VAL 6.123456789123456789 - auxDouble = STONITS_VAL; - auxFloat = (float)auxDouble; - if (!TIFFSetField(tif, TIFFTAG_STONITS, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_STONITS tag.\n"); - goto failure; - } - - /*-- Additional tags to check Rational standard tags, which are also defined - * with field_bit=FIELD_CUSTOM */ - /* - The following standard tags have field_type = TIFF_RATIONAL with - field_bit=FIELD_CUSTOM: TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, - TIFF_SETGET_DOUBLE and with Signed Rational: TIFFTAG_BASELINEEXPOSURE, 1, - 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE Due to the fact that - TIFFSetField() and TIFFGetField() interface is using va_args, variable - promotion is applied, which means: If the actual argument is of type - float, it is promoted to type double when function is to be made. - - Any signed or unsigned char, short, enumerated type, or bit field - is converted to either a signed or an unsigned int using integral - promotion. - - Any argument of class type is passed by value as a data structure; - the copy is created by binary copying instead of by invoking the class’s - copy constructor (if one exists). So, if your argument types are of float - type, you should expect the argument retrieved to be of type double and - it is char or short, you should expect it to be signed or unsigned int. - Otherwise, the code will give you wrong results. - */ - - if (!blnAllCustomTags) - { -/*--- TEST: First tag is written with FLOAT and second tag is written with - * DOUBLE parameter ---*/ -/*- TIFFTAG_SHADOWSCALE is a Rational parameter (TIFF_RATIONAL, - * TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ -#define SHADOWSCALE_VAL 15.123456789123456789 - auxFloat = (float)SHADOWSCALE_VAL; - if (!TIFFSetField(tif, TIFFTAG_SHADOWSCALE, auxFloat)) - { - fprintf(stderr, "Can't set TIFFTAG_SHADOWSCALE tag.\n"); - goto failure; - } - -/*- TIFFTAG_BESTQUALITYSCALE is a Rational parameter (TIFF_RATIONAL, - * TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ -#define BESTQUALITYSCALE_VAL 17.123456789123456789 - auxDouble = BESTQUALITYSCALE_VAL; - if (!TIFFSetField(tif, TIFFTAG_BESTQUALITYSCALE, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_BESTQUALITYSCALE tag.\n"); - goto failure; - } - -/*- TIFFTAG_BASELINEEXPOSURE is a Rational parameter (TIFF_SRATIONAL, - * TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ -#define BASELINEEXPOSURE_VAL (-3.14159265358979323846) - /* - fprintf(stderr, "(-3.14159265358979323846) as float= %.18f, - double=%.18f\n", (float)BASELINEEXPOSURE_VAL, - (double)BASELINEEXPOSURE_VAL, BASELINEEXPOSURE_VAL); fprintf(stderr, - "(-3.141592742098056) as float= %.18f, double=%.18f\n", - (float)(-3.141592742098056), (double)(-3.141592742098056)); - */ - auxDouble = BASELINEEXPOSURE_VAL; - if (!TIFFSetField(tif, TIFFTAG_BASELINEEXPOSURE, auxDouble)) - { - fprintf(stderr, "Can't set TIFFTAG_BASELINEEXPOSURE tag.\n"); - goto failure; - } - - /*--- For static or variable ARRAYs the case is different ---*/ - - /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter - * TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable - * length of array. */ - if (!TIFFSetField(tif, TIFFTAG_DECODE, 3, auxFloatArrayN1)) - { /* for TIFF_SETGET_C16_DOUBLE */ - fprintf(stderr, "Can't set TIFFTAG_DECODE tag.\n"); - goto failure; - } - - /*- Variable Array: TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT */ - if (!TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 3, auxFloatArrayN1)) - { /* for TIFF_SETGET_C16_FLOAT */ - fprintf(stderr, "Can't set TIFFTAG_BLACKLEVEL tag.\n"); - goto failure; - } - - /*-- Check, if the TiffLibrary is compiled with the new interface with - * Rational2Double or still uses the old definitions. */ - /* tags to check: TIFFTAG_BESTQUALITYSCALE, TIFFTAG_BASELINENOISE, - * TIFFTAG_BASELINESHARPNESS, */ - fip = TIFFFindField(tif, TIFFTAG_BESTQUALITYSCALE, TIFF_ANY); - tSetFieldType = fip->set_get_field_type; - if (tSetFieldType == TIFF_SETGET_DOUBLE) - blnIsRational2Double = FALSE; - else - blnIsRational2Double = TRUE; - - /*--- Write now additional Rational2Double test tags ---*/ - /*--- However, this additional tags are only written as Double - correctly, if blnIsRational2Double is defined! - ------------------------------------------------------*/ - if (blnIsRational2Double) - { - if (!TIFFSetField(tif, TIFFTAG_RATIONAL_DOUBLE, - auxDoubleArrayW[100])) - { - fprintf(stderr, "Can't set TIFFTAG_RATIONAL_DOUBLE tag.\n"); - goto failure; - } - /* test for plain integers */ - if (!TIFFSetField(tif, TIFFTAG_SRATIONAL_DOUBLE, (-1.0))) - { - fprintf(stderr, "Can't set TIFFTAG_SRATIONAL_DOUBLE tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_RATIONAL_C0_DOUBLE, - &auxDoubleArrayW[110])) - { - fprintf(stderr, "Can't set TIFFTAG_RATIONAL_C0_DOUBLE tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SRATIONAL_C16_DOUBLE, 2, - &auxDoubleArrayW[120])) - { - fprintf(stderr, - "Can't set TIFFTAG_SRATIONAL_C16_DOUBLE tag.\n"); - goto failure; - } - } - } - else - { /* blnAllCustomTags */ - /*==== Automatically check all custom rational tags == WRITING ===*/ - /*-- Get array, where TIFF tag fields are defined --*/ - tFieldArray = _TIFFGetFields(); - nTags = tFieldArray->count; - - for (i = 0; i < nTags; i++) - { - tTag = tFieldArray->fields[i].field_tag; - tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ - tWriteCount = tFieldArray->fields[i].field_writecount; - tSetFieldType = - tFieldArray->fields[i] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - tFieldBit = tFieldArray->fields[i].field_bit; - tFieldName = tFieldArray->fields[i].field_name; - pVoid = NULL; - - if ((tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) && - tFieldBit == FIELD_CUSTOM) - { - /*-- dependent on set_get_field_type write value --*/ - switch (tSetFieldType) - { - case TIFF_SETGET_FLOAT: - case TIFF_SETGET_DOUBLE: - if (tWriteCount == 1) - { - /*-- All single values can be written with float or - * double parameter. Only value range should be in - * line. */ - if (!TIFFSetField(tif, tTag, auxDoubleArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - else - { - fprintf( - stderr, - "WriteCount for .set_get_field_type %d should " - "be 1! %s\n", - tSetFieldType, - tFieldArray->fields[i].field_name); - } - break; - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_DOUBLE: - /* _Cxx_ just defines the size of the count parameter - * for the array as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array - * or a variable array */ - if (tWriteCount == 1) - { - fprintf( - stderr, - "WriteCount for .set_get_field_type %d should " - "be -1 or greater than 1! %s\n", - tSetFieldType, - tFieldArray->fields[i].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* For arrays, distinguishing between float or - * double is essential, even for writing */ - if (tSetFieldType == TIFF_SETGET_C0_FLOAT || - tSetFieldType == TIFF_SETGET_C16_FLOAT || - tSetFieldType == TIFF_SETGET_C32_FLOAT) - pVoid = &auxFloatArrayW[i]; - else - pVoid = &auxDoubleArrayW[i]; - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFSetField(tif, tTag, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - else - { - /* special treatment of variable array */ - /* for test, use always arraysize of - * VARIABLE_ARRAY_SIZE */ - if (!TIFFSetField(tif, tTag, - VARIABLE_ARRAY_SIZE, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[i].field_name); - goto failure; - } - } - } - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within writing " - "switch for %s.\n", - tSetFieldType, tFieldName); - }; /*-- switch() --*/ - } /* if () */ - } /*-- for() --*/ - } /* blnAllCustomTags */ /*==== END END - Automatically check all custom - rational tags == WRITING END ===*/ - - /*-- Write dummy pixel data. --*/ - if (TIFFWriteScanline(tif, buf, 0, 0) < 0) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - /*-- Write directory to file --*/ - /* Always WriteDirectory before using/creating another directory. */ - /* Not necessary before TIFFClose(), however, TIFFClose() uses - * TIFFReWriteDirectory(), which forces directory to be written at another - * location. */ - retCode = TIFFWriteDirectory(tif); - - /*-- Write File to disk and close file --*/ - /* TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be - * written at another location. */ - /* Therefore, better use TIFFWriteDirectory() before. */ - TIFFClose(tif); - - fprintf(stderr, "-------- Continue Test ---------- reading ...\n"); - - /*========================= READING ============= READING - * ========================================*/ - /* Ok, now test whether we can read written values in the EXIF directory. */ - tif = TIFFOpen(filenameRead, "r"); - - /*-- Read some parameters out of the main directory --*/ - - /*-- IMAGEWIDTH and -LENGTH are defined as TIFF_SETGET_UINT32 */ - retCode = TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &auxUint32); - if (auxUint32 != width) - { - fprintf(stderr, - "Read value of IMAGEWIDTH %d differs from set value %d\n", - auxUint32, width); - GOTOFAILURE - } - retCode = TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &auxUint32); - if (auxUint32 != width) - { - fprintf( - stderr, - "Read value of TIFFTAG_IMAGELENGTH %d differs from set value %d\n", - auxUint32, length); - GOTOFAILURE - } - - /*--- Standard tags with TIFF_RATIONAL and TIFF_SETGET_DOUBLE to - TIFF_SETGET_FLOAT change. --- - * They can be written either using float or double but have to be read - using float. - -------------------------------------------------------------------------------------------- - */ - dblDiffLimit = RATIONAL_EPS; - retCode = TIFFGetField(tif, TIFFTAG_XRESOLUTION, &auxFloat); - dblDiff = auxFloat - auxFloatArrayResolutions[0]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf( - stderr, - "Read value of TIFFTAG_XRESOLUTION %f differs from set value %f\n", - auxFloat, auxFloatArrayResolutions[0]); - GOTOFAILURE - } - retCode = TIFFGetField(tif, TIFFTAG_YRESOLUTION, &auxFloat); - dblDiff = auxFloat - auxFloatArrayResolutions[1]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf( - stderr, - "Read value of TIFFTAG_YRESOLUTION %f differs from set value %f\n", - auxFloat, auxFloatArrayResolutions[1]); - GOTOFAILURE - } - retCode = TIFFGetField(tif, TIFFTAG_XPOSITION, &auxFloat); - dblDiff = auxFloat - auxFloatArrayResolutions[2]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf( - stderr, - "Read value of TIFFTAG_XPOSITION %f differs from set value %f\n", - auxFloat, auxFloatArrayResolutions[2]); - GOTOFAILURE - } - retCode = TIFFGetField(tif, TIFFTAG_YPOSITION, &auxFloat); - dblDiff = auxFloat - auxFloatArrayResolutions[3]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf( - stderr, - "Read value of TIFFTAG_YPOSITION %f differs from set value %f\n", - auxFloat, auxFloatArrayResolutions[3]); - GOTOFAILURE - } - - /*- TIFFTAG_INKSET is a SHORT parameter (TIFF_SHORT, TIFF_SETGET_UINT16) - * with field_bit=FIELD_CUSTOM !! -*/ - retCode = TIFFGetField(tif, TIFFTAG_INKSET, &auxUint16); - if (auxUint16 != 34) - { - fprintf( - stderr, - "Read value of TIFFTAG_PIXAR_FOVCOT %d differs from set value %d\n", - auxUint16, TIFFTAG_INKSET); - GOTOFAILURE - } - - /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter ( TIFF_FLOAT, - * TIFF_SETGET_FLOAT) with field_bit=FIELD_CUSTOM !! -*/ - /* - was written with Double but has to be read with Float */ - retCode = TIFFGetField(tif, TIFFTAG_PIXAR_FOVCOT, &auxFloat); - if (auxFloat != (float)PIXAR_FOVCOT_VAL) - { - fprintf( - stderr, - "Read value of TIFFTAG_PIXAR_FOVCOT %f differs from set value %f\n", - auxFloat, PIXAR_FOVCOT_VAL); - GOTOFAILURE - } - - /*- TIFFTAG_STONITS is a DOUBLE parameter (TIFF_DOUBLE, TIFF_SETGET_DOUBLE) - * with field_bit=FIELD_CUSTOM!! -*/ - retCode = TIFFGetField(tif, TIFFTAG_STONITS, &auxDouble); - if (auxDouble != (double)STONITS_VAL) - { - fprintf(stderr, - "Read value of TIFFTAG_STONITS %f differs from set value %f\n", - auxDouble, STONITS_VAL); - GOTOFAILURE - } - - /*-- Check, if the TiffLibrary is compiled with the new interface with - * Rational2Double or still uses the old definitions. */ - /* tags to check: TIFFTAG_BESTQUALITYSCALE, TIFFTAG_BASELINENOISE, - * TIFFTAG_BASELINESHARPNESS, */ - fip = TIFFFindField(tif, TIFFTAG_BESTQUALITYSCALE, TIFF_ANY); - tSetFieldType = fip->set_get_field_type; - if (tSetFieldType == TIFF_SETGET_DOUBLE) - blnIsRational2Double = FALSE; - else - blnIsRational2Double = TRUE; - - if (!blnAllCustomTags) - { - - /*- TIFFTAG_BESTQUALITYSCALE is a Rational parameter (TIFF_RATIONAL, - TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! and written with - double parameter -*/ - /*- Read into a union to test the correct precision (float or double) - * returned. Float-parameter should be correct, but double-parameter - * should give a wrong value - */ - auxDblUnion.dbl = 0; - retCode = TIFFGetField(tif, TIFFTAG_BESTQUALITYSCALE, &auxDblUnion.dbl); - dblDiffLimit = RATIONAL_EPS * (double)BESTQUALITYSCALE_VAL; - dblDiff = auxDblUnion.dbl - (double)BESTQUALITYSCALE_VAL; - fltDiff = auxDblUnion.flt1 - (float)BESTQUALITYSCALE_VAL; - if (!((fabs(dblDiff) > fabs(dblDiffLimit)) && - !(fabs(fltDiff) > fabs(dblDiffLimit)))) - { - fprintf(stderr, - "Float-Read value of TIFFTAG_BESTQUALITYSCALE %.12f " - "differs from set value %.12f too much,\n", - auxDblUnion.flt1, BESTQUALITYSCALE_VAL); - fprintf(stderr, - "whereas Double-Read value of TIFFTAG_BESTQUALITYSCALE " - "%.12f is nearly equal to set value %.12f\n", - auxDblUnion.dbl, BESTQUALITYSCALE_VAL); - GOTOFAILURE - } - - /*--- Now the same for a Signed Rational ---*/ - /*- TIFFTAG_BASELINEEXPOSURE is a Rational parameter (TIFF_SRATIONAL, - TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! - and written with - double parameter - */ - /*- Read into a union to test the correct precision (float or double) - * returned. Float-parameter should be correct, but double-parameter - * should give a wrong value - */ - auxDblUnion.dbl = 0; - retCode = TIFFGetField(tif, TIFFTAG_BASELINEEXPOSURE, &auxDblUnion.dbl); - dblDiffLimit = RATIONAL_EPS * (double)BASELINEEXPOSURE_VAL; - dblDiff = auxDblUnion.dbl - (double)BASELINEEXPOSURE_VAL; - fltDiff = auxDblUnion.flt1 - (float)BASELINEEXPOSURE_VAL; - if (!((fabs(dblDiff) > fabs(dblDiffLimit)) && - !(fabs(fltDiff) > fabs(dblDiffLimit)))) - { - fprintf(stderr, - "Float-Read value of TIFFTAG_BASELINEEXPOSURE %.12f " - "differs from set value %.12f too much,\n", - auxDblUnion.flt1, BASELINEEXPOSURE_VAL); - fprintf(stderr, - "whereas Double-Read value of TIFFTAG_BESTQUALITYSCALE " - "%.12f is nearly equal to set value %.12f\n", - auxDblUnion.dbl, BASELINEEXPOSURE_VAL); - GOTOFAILURE - } - - /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter - * TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable - * length of array. */ - retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pVoidArray); - retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pFloatArray); - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxFloatArray, pVoidArray, - (count16 * sizeof(auxFloatArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxFloatArrayN1[i]; - dblDiff = auxFloatArray[i] - auxFloatArrayN1[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_DECODE Array %f differs from " - "set value %f\n", - i, auxFloatArray[i], auxFloatArrayN1[i]); - GOTOFAILURE - } - } - - retCode = TIFFGetField(tif, TIFFTAG_BLACKLEVEL, &count16, &pVoidArray); - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxFloatArray, pVoidArray, - (count16 * sizeof(auxFloatArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxFloatArrayN1[i]; - dblDiff = auxFloatArray[i] - auxFloatArrayN1[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_BLACKLEVEL Array %f differs " - "from set value %f\n", - i, auxFloatArray[i], auxFloatArrayN1[i]); - GOTOFAILURE - } - } - - /*--- Read now additional Rational2Double test tags --- - This should be now with nearly double precision - However, this additional tags are only read as Double, - if blnIsRational2Double is defined! - ------------------------------------------------------*/ - if (blnIsRational2Double) - { - auxDblUnion.dbl = 0; - retCode = - TIFFGetField(tif, TIFFTAG_RATIONAL_DOUBLE, &auxDblUnion.dbl); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_RATIONAL_DOUBLE"); - GOTOFAILURE - } - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[100]; - dblDiff = auxDblUnion.dbl - auxDoubleArrayW[100]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value of TIFFTAG_RATIONAL_DOUBLE %f differs from " - "set value %f\n", - auxDblUnion.dbl, auxDoubleArrayW[100]); - GOTOFAILURE - } - - auxDblUnion.dbl = 0; - retCode = - TIFFGetField(tif, TIFFTAG_SRATIONAL_DOUBLE, &auxDblUnion.dbl); - if (!retCode) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_SRATIONAL_DOUBLE"); - GOTOFAILURE - } - auxDouble = -1.0; - dblDiffLimit = RATIONAL_EPS * auxDouble; - dblDiff = auxDblUnion.dbl - auxDouble; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value of TIFFTAG_SRATIONAL_DOUBLE %f differs " - "from set value %f\n", - auxDblUnion.dbl, auxDouble); - GOTOFAILURE - } - - /*- Fixed Array: TIFFTAG_RATIONAL_C0_DOUBLE, 3, 3, TIFF_RATIONAL, 0, - * TIFF_SETGET_C0_DOUBLE */ - count16 = 3; /* set fixed array length for checking */ - retCode = - TIFFGetField(tif, TIFFTAG_RATIONAL_C0_DOUBLE, &pVoidArray); - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxDoubleArray, pVoidArray, - (count16 * sizeof(auxDoubleArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[110 + i]; - dblDiff = auxDoubleArray[i] - auxDoubleArrayW[110 + i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_RATIONAL_C0_DOUBLE Array " - "%f differs from set value %f\n", - i, auxDoubleArray[i], auxDoubleArrayW[110 + i]); - GOTOFAILURE - } - } - - /*- Variable Array: TIFFTAG_SRATIONAL_C16_DOUBLE, -1, -1, - * TIFF_SRATIONAL, 0, TIFF_SETGET_C16_DOUBLE */ - retCode = TIFFGetField(tif, TIFFTAG_SRATIONAL_C16_DOUBLE, &count16, - &pVoidArray); - /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, - * contents needs to be saved. */ - memcpy(&auxDoubleArray, pVoidArray, - (count16 * sizeof(auxDoubleArray[0]))); - for (i = 0; i < count16; i++) - { - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[120 + i]; - dblDiff = auxDoubleArray[i] - auxDoubleArrayW[120 + i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of TIFFTAG_SRATIONAL_C16_DOUBLE " - "Array %f differs from set value %f\n", - i, auxDoubleArray[i], auxDoubleArrayW[120 + i]); - GOTOFAILURE - } - } - } - } - else - { /* blnAllCustomTags */ - /*==== Automatically check all custom rational tags == READING ===*/ - - /*-- Get array, where standard TIFF tag fields are defined --*/ - tFieldArray = _TIFFGetFields(); - nTags = tFieldArray->count; - - for (i = 0; i < nTags; i++) - { - tTag = tFieldArray->fields[i].field_tag; - tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ - tWriteCount = tFieldArray->fields[i].field_writecount; - tSetFieldType = - tFieldArray->fields[i] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - tFieldBit = tFieldArray->fields[i].field_bit; - tFieldName = tFieldArray->fields[i].field_name; - pVoid = NULL; - auxDblUnion.dbl = 0; - - if ((tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) && - tFieldBit == FIELD_CUSTOM) - { - /*-- dependent on set_get_field_type read value --*/ - switch (tSetFieldType) - { - case TIFF_SETGET_FLOAT: - if (!TIFFGetField(tif, tTag, &auxFloat)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - dblDiff = auxFloat - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value - * of "-1.0" if numerator equals 4294967295 - * (0xFFFFFFFF) to indicate infinite distance! - * However, there are two other EXIF tags where - * numerator indicates a special value and six other - * cases where the denominator indicates special - * values, which are not treated within LibTiff!! - */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && - auxFloat == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from " - "set value %f\n", - i, tFieldName, auxFloat, - auxDoubleArrayW[i]); - GOTOFAILURE - } - } - break; - case TIFF_SETGET_DOUBLE: - /*-- Unfortunately, TIFF_SETGET_DOUBLE is used for - * TIFF_RATIONAL but those have to be read with FLOAT - * !!! */ - /* Only after update with Rational2Double feature, - * also TIFF_RATIONAL can be read in double precision!!! - */ - /* Therefore, use a union to avoid overflow in - * TIFFGetField() return value and depending on version - * check for the right interface here: - * - old interface: correct value should be here a - * float - * - new interface: correct value should be here a - * double Interface version (old/new) is determined - * above. - */ - if (!TIFFGetField(tif, tTag, &auxDblUnion.dbl)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE - break; - } - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - { - if (blnIsRational2Double) - { - /* New interface allows also double precision - * for TIFF_RATIONAL */ - auxDouble = auxDblUnion.dbl; - } - else - { - /* Old interface reads TIFF_RATIONAL defined as - * TIFF_SETGET_DOUBLE always as FLOAT */ - auxDouble = (double)auxDblUnion.flt1; - } - } - else - { - auxDouble = auxDblUnion.dbl; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - dblDiff = auxDouble - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value - * of "-1.0" if numerator equals 4294967295 - * (0xFFFFFFFF) to indicate infinite distance! */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && - auxDouble == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from " - "set value %f\n", - i, tFieldName, auxDouble, - auxDoubleArrayW[i]); - GOTOFAILURE - } - } - break; - - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_DOUBLE: - /* _Cxx_ just defines the size of the count parameter - * for the array as C0=char, C16=short or C32=long */ - /*-- Check, if it is a single parameter, a fixed array - * or a variable array */ - if (tWriteCount == 1) - { - fprintf( - stderr, - "Reading: WriteCount for .set_get_field_type " - "%d should be -1 or greater than 1! %s\n", - tSetFieldType, - tFieldArray->fields[i].field_name); - GOTOFAILURE - } - else - { - /*-- Either fix or variable array --*/ - /* For arrays, distinguishing between float or - * double is essential. */ - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFGetField(tif, tTag, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE - break; - } - /* set tWriteCount to number of read samples for - * next steps */ - auxInt32 = tWriteCount; - } - else - { - /* Special treatment of variable array. */ - /* Dependent on Cxx, the count parameter is - * char, short or long. Therefore use unionLong! - */ - if (!TIFFGetField(tif, tTag, &auxInt32Union, - &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[i].field_name); - GOTOFAILURE - break; - } - /* set tWriteCount to number of read samples for - * next steps */ - auxInt32 = auxInt32Union.Short1; - } - /* Save values from temporary array */ - if (tSetFieldType == TIFF_SETGET_C0_FLOAT || - tSetFieldType == TIFF_SETGET_C16_FLOAT || - tSetFieldType == TIFF_SETGET_C32_FLOAT) - { - memcpy(&auxFloatArray, pVoidArray, - (auxInt32 * sizeof(auxFloatArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || - tType == TIFF_SRATIONAL) - dblDiffLimit = - RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = auxFloatArray[j] - - auxFloatArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*if (auxFloatArray[j] != - * (float)auxFloatArrayW[i+j]) { */ - fprintf(stderr, - "Read value %d of %s #%d %f " - "differs from set value %f\n", - i, tFieldName, j, - auxFloatArray[j], - auxFloatArrayW[i + j]); - GOTOFAILURE - } - } - } - else - { - memcpy(&auxDoubleArray, pVoidArray, - (auxInt32 * sizeof(auxDoubleArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || - tType == TIFF_SRATIONAL) - dblDiffLimit = - RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = auxDoubleArray[j] - - auxDoubleArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*if (auxDoubleArray[j] != - * auxDoubleArrayW[i+j]) { */ - fprintf(stderr, - "Read value %d of %s #%d %f " - "differs from set value %f\n", - i, tFieldName, j, - auxDoubleArray[j], - auxDoubleArrayW[i + j]); - GOTOFAILURE - } - } - } - } - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within reading " - "switch for %s.\n", - tSetFieldType, tFieldName); - }; /*-- switch() --*/ - } /* if () */ - } /*-- for() --*/ - - } /* blnAllCustomTags */ /*==== END END - Automatically check all custom - rational tags == READING END ===*/ - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ -#ifdef FOR_AUTO_TESTING - unlink(filenameRead); -#endif - fprintf(stderr, "-------- Test finished OK ----------\n"); - return 0; - -failure: - /* - * Something goes wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - fprintf(stderr, "-------- Test finished with FAILURE --------\n"); - return 1; -} diff --git a/third_party/libtiff/test/raw_decode.c b/third_party/libtiff/test/raw_decode.c deleted file mode 100644 index 05952be..0000000 --- a/third_party/libtiff/test/raw_decode.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (c) 2012, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * The objective of this test suite is to test the JPEGRawDecode() - * interface via TIFReadEncodedTile(). This function with YCbCr subsampling - * is a frequent source of bugs. - */ - -#include "tif_config.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#include "jpeglib.h" /* Needed for JPEG_LIB_VERSION */ - -static unsigned char cluster_0[] = {0, 0, 2, 0, 138, 139}; -static unsigned char cluster_64[] = {0, 0, 9, 6, 134, 119}; -static unsigned char cluster_128[] = {44, 40, 63, 59, 230, 95}; - -static int check_cluster(int cluster, unsigned char *buffer, - unsigned char *expected_cluster) -{ - unsigned char *target = buffer + cluster * 6; - - if (memcmp(target, expected_cluster, 6) == 0) - { - return 0; - } - - fprintf(stderr, "Cluster %d did not match expected results.\n", cluster); - fprintf(stderr, - "Expect: %3d %3d %3d %3d\n" - " %3d %3d\n", - expected_cluster[0], expected_cluster[1], expected_cluster[4], - expected_cluster[5], expected_cluster[2], expected_cluster[3]); - fprintf(stderr, - " Got: %3d %3d %3d %3d\n" - " %3d %3d\n", - target[0], target[1], target[4], target[5], target[2], target[3]); - return 1; -} - -static int check_rgb_pixel(int pixel, int min_red, int max_red, int min_green, - int max_green, int min_blue, int max_blue, - unsigned char *buffer) -{ - unsigned char *rgb = buffer + 3 * pixel; - - if (rgb[0] >= min_red && rgb[0] <= max_red && rgb[1] >= min_green && - rgb[1] <= max_green && rgb[2] >= min_blue && rgb[2] <= max_blue) - { - return 0; - } - - fprintf(stderr, "Pixel %d did not match expected results.\n", pixel); - fprintf(stderr, - "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d " - "(expected %d..%d)\n", - rgb[0], min_red, max_red, rgb[1], min_green, max_green, rgb[2], - min_blue, max_blue); - return 1; -} - -static int check_rgba_pixel(int pixel, int min_red, int max_red, int min_green, - int max_green, int min_blue, int max_blue, - int min_alpha, int max_alpha, uint32_t *buffer) -{ - /* RGBA images are upside down - adjust for normal ordering */ - int adjusted_pixel = pixel % 128 + (127 - (pixel / 128)) * 128; - uint32_t rgba = buffer[adjusted_pixel]; - - if (TIFFGetR(rgba) >= (uint32_t)min_red && - TIFFGetR(rgba) <= (uint32_t)max_red && - TIFFGetG(rgba) >= (uint32_t)min_green && - TIFFGetG(rgba) <= (uint32_t)max_green && - TIFFGetB(rgba) >= (uint32_t)min_blue && - TIFFGetB(rgba) <= (uint32_t)max_blue && - TIFFGetA(rgba) >= (uint32_t)min_alpha && - TIFFGetA(rgba) <= (uint32_t)max_alpha) - { - return 0; - } - - fprintf(stderr, "Pixel %d did not match expected results.\n", pixel); - fprintf(stderr, - "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d " - "(expected %d..%d), A=%d (expected %d..%d)\n", - TIFFGetR(rgba), min_red, max_red, TIFFGetG(rgba), min_green, - max_green, TIFFGetB(rgba), min_blue, max_blue, TIFFGetA(rgba), - min_alpha, max_alpha); - return 1; -} - -int main(int argc, char **argv) -{ - TIFF *tif; - static const char *srcfilerel = "images/quad-tile.jpg.tiff"; - char *srcdir = NULL; - char srcfile[1024]; - unsigned short h, v; - int status; - unsigned char *buffer; - uint32_t *rgba_buffer; - tsize_t sz, szout; - unsigned int pixel_status = 0; - - (void)argc; - (void)argv; - - if ((srcdir = getenv("srcdir")) == NULL) - { - srcdir = "."; - } - if ((strlen(srcdir) + 1 + strlen(srcfilerel)) >= sizeof(srcfile)) - { - fprintf(stderr, "srcdir too long %s\n", srcdir); - exit(1); - } - strcpy(srcfile, srcdir); - strcat(srcfile, "/"); - strcat(srcfile, srcfilerel); - - tif = TIFFOpen(srcfile, "r"); - if (tif == NULL) - { - fprintf(stderr, "Could not open %s\n", srcfile); - exit(1); - } - - status = TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING, &h, &v); - if (status == 0 || h != 2 || v != 2) - { - fprintf(stderr, "Could not retrieve subsampling tag.\n"); - exit(1); - } - - /* - * What is the appropriate size of a YCbCr encoded tile? - */ - sz = TIFFTileSize(tif); - if (sz != 24576) - { - fprintf(stderr, "tiles are %d bytes\n", (int)sz); - exit(1); - } - - buffer = (unsigned char *)malloc(sz); - - /* - * Read a tile in decompressed form, but still YCbCr subsampled. - */ - szout = TIFFReadEncodedTile(tif, 9, buffer, sz); - if (szout != sz) - { - fprintf(stderr, - "Did not get expected result code from " - "TIFFReadEncodedTile()(%d instead of %d)\n", - (int)szout, (int)sz); - return 1; - } - - if (check_cluster(0, buffer, cluster_0) || - check_cluster(64, buffer, cluster_64) || - check_cluster(128, buffer, cluster_128)) - { - exit(1); - } - free(buffer); - - /* - * Read a tile using the built-in conversion to RGB format provided by the - * JPEG library. - */ - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - - sz = TIFFTileSize(tif); - if (sz != 128 * 128 * 3) - { - fprintf(stderr, "tiles are %d bytes\n", (int)sz); - exit(1); - } - - buffer = (unsigned char *)malloc(sz); - - szout = TIFFReadEncodedTile(tif, 9, buffer, sz); - if (szout != sz) - { - fprintf(stderr, - "Did not get expected result code from " - "TIFFReadEncodedTile()(%d instead of %d)\n", - (int)szout, (int)sz); - return 1; - } - - /* - * JPEG decoding is inherently inexact, so we can't test for exact - * pixel values. (Well, if we knew exactly which libjpeg version - * we were using, and with what settings, we could expect specific - * values ... but it's not worth the trouble to keep track of.) - * Hence, use ranges of expected values. The ranges may need to be - * widened over time as more versions of libjpeg appear. - */ - pixel_status |= check_rgb_pixel(0, 15, 18, 0, 0, 18, 41, buffer); - pixel_status |= check_rgb_pixel(64, 0, 0, 0, 0, 0, 2, buffer); - pixel_status |= check_rgb_pixel(512, 5, 6, 34, 36, 182, 196, buffer); - - free(buffer); - - TIFFClose(tif); - - /* - * Reopen and test reading using the RGBA interface. - */ - tif = TIFFOpen(srcfile, "r"); - - sz = 128 * 128 * sizeof(uint32_t); - rgba_buffer = (uint32_t *)malloc(sz); - - if (!TIFFReadRGBATile(tif, 1 * 128, 2 * 128, rgba_buffer)) - { - fprintf(stderr, "TIFFReadRGBATile() returned failure code.\n"); - return 1; - } - - /* - * Currently TIFFReadRGBATile() just uses JPEGCOLORMODE_RGB so this - * trivially matches the last results. Eventually we should actually - * accomplish it from the YCbCr subsampled buffer ourselves in which - * case the results may be subtly different but similar. - */ - pixel_status |= - check_rgba_pixel(0, 15, 18, 0, 0, 18, 41, 255, 255, rgba_buffer); - pixel_status |= - check_rgba_pixel(64, 0, 0, 0, 0, 0, 2, 255, 255, rgba_buffer); - pixel_status |= - check_rgba_pixel(512, 5, 6, 34, 36, 182, 196, 255, 255, rgba_buffer); - - free(rgba_buffer); - TIFFClose(tif); - - if (pixel_status) - { - exit(1); - } - - exit(0); -} diff --git a/third_party/libtiff/test/refs/o-deflate-last-strip-extra-data.tiff b/third_party/libtiff/test/refs/o-deflate-last-strip-extra-data.tiff deleted file mode 100644 index 5d56fe54686914a9a92d6e0483d76247f1cdb233..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12560 zcmZ8n1zeNc`=4UNl~6#WBzL7oC><&(DblUfXoLZyQ4uKx0f`YqK|s1e7%(NI#wckR z=|&G2;i&zG*ZaHr=X1W>VS9I;_dL%z-zUy{|2`kU4FmxArmrP)JUnxk<_sxZ$vTeT z2yWp==f@DK#97`Ebb6ON>D>T#e>wH1XuhF-y+N_TG5e(NI(ZJ!!ww1Pe(|@(-LEp< zi{1wHYuwtK^NSf(KBOt%zg8Ttvnd45CEaYUQ^RPytnGD@tRu?u*GXfuW45@EWjWzyI1a3*?FqDUj0Vir&G;!Syfcw6f{3;Z7@W98q<` z?2D{gr`VuV+PxL-)`o;eRj{8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)Ko6N!C|k?i zQG6)N&W?MLy-Zay=96_=XKx?qea)12!|tS>yNvg@)xaU!Wh->SB6I)zF~z%k)6qjt z|4!^5k?ffS5Ue8$?ApcK`>z@dh|o?~yXefYcZTXJI#{7V&%4q(8D_yyYOG{K`<@hXw8yy+u zUAVg%^3YugAGd1pp15N80wM{Ad>4OF;k4-cYgdtmu1h(bQ8G zi4zc2*9Eq3B+Zpt0)C>d$fNHuvl8jKe`9!)49GtT(|9vCj3wkX6kO{s-pGUBI8DE> z{k0*76ekwG6;QIho1I)dF4ktd$g*XRYXo23$=W6@H@!vUHFtK_I;#{1R}PQo>$^#Z zb<=31BMy{c{aO7l0N@k_;1mD=*e1W6`mKNZSN{U}JBr`>=YI81enWfe4B!U&{f#gH zK=<3{^uP5Pe)Va{*D?OOo`!rq%Wv1n{npp}txx_5K$k2il?)>?q{s*-!-Nc1GAhW> zA;W+S7#T`r$dM6AhB+CQWYm%2P6n8a8Ztb{@FZiJjF)8ikugF>6d568%#rbijCe9m zk#REr6M2Nw0D$@#03h@%0C4F%0ANG@qVFOA@SG9==%)ezcrOD0NNTdKXaRsbbO1o- z6##&To_sw603dq}04QW4>xdZu=wKnwgN^(@J6R?N06@bu Q8vFpjgaCPtLIA-30Tt?o+W-In diff --git a/third_party/libtiff/test/refs/o-testfax3_bug54_1dnoEOL.tiff b/third_party/libtiff/test/refs/o-testfax3_bug54_1dnoEOL.tiff deleted file mode 100644 index 0006c9c22fc4fb61378497f6f91405396a375332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 501708 zcmeFa4Ui?-Ro{8D-^}D_Bsv?dK4u+7Wg81K4DxDr10o7ksw}X)D`Y!p#xt{+4OYDo z>j%ZJs-^L*6Vlo_dl8MvtCub?yl+V z1Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm9 z1Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm91Azm9 z1Azm91Az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QWZ%VDI9i3tdr)e($k$lHM%%o_~bifsWe^CGcK!Cph z5cq$bNQ%dQnePVv-oN~h9r#}+!ZY!|{LfIb|JYE2{@*Xgyo+bpf5!6u%m4Vyhv)zKjvpliBESa`0pJ90FN|k8Jm1U! z0n&KBkLSC1{^z)lZ~meG->SPG?UA!Ho5ynpM=wt{4?9mg K4{tkL;Qs(H8E*~% diff --git a/third_party/libtiff/test/refs/o-tiff2ps-EPS1.ps b/third_party/libtiff/test/refs/o-tiff2ps-EPS1.ps deleted file mode 100644 index 9d9da8a28fa50ac25e21d0229d2fae394894dbbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6599 zcmaKx%Z}VO7KZnFikbjkIzv*VNO_klFhGC=NOr+2D2Z|ku)B@!b`oGP?>^suC{?$e zU}(5XB_5s2f38%&`o~W{zy4~wU)t;OOLzJ1r=P#q#qjFYHxI2o-9Nm!JYDxae0b#6 zFW0Ac?ak%=_3rxk$8XoC_S&zn{qm(K&L^(-ci+}0sDAm_E?<3kxLm@;PjANYjdPda z{0!l@_v^>^?d}P}`sVV@yH@Y=*ViX@etfvTz23dKxQkTy`u^kHcD;N1_5GiA>*7=9 zzh~=*diVBYecOI$zqfa9F1qy-KOecYAK%?=-`u~K5Gk&$zVr66{@wX!XnUKeX_&O4v?y|~0@sx=fhHrw3y=BAmuMi)yOHZHfUJF(QY#*JUv=4t0fU95UY z{P!S{4{&U7!2k%+R@^1J3pGNY&L;|lBSO84 z#m#XZ_thISGivoqJy~xs16z>yVm`Og>@^jy1Ou&XZU@nh-7o~m>Z;>p;x4N zVH4eKVG6_$#v>jUWl|47=L@UGfM>c}*vg6q)Eh0d5jFF0AZCY*%oFZgB4riqU=zU@rLfypUm^4;ks$&YF0_3w` zqf=N9zDjZ}h2rFPzZdC!yt#XMDb4Y6`1LPPm$DHCedW;ew zdI?MG4%>!Y7KGRzQ>%$AmZw<33JKuReLC45MxuTIP&#hSTQLx6LsAQd%gsrp$Q)l? zs6h+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gwoa{Q?2n(>;9QG~*Ey?7HsVcB1 z8v98o9;B!Dp(bWKayioRYKxmGZK-3^w4u#&+GWI2K`86U(Z6|bT{^?24!wu7J0mU# zm8kiTWRM8~j?I+Dkilf$*QqFOaiokky3F7ux_Hi(c%G9_9O}I9G0zmMR;qnGOXtbZ zJLVrZ*R?EdIBFV>EmdYK7>12wa1ZNB)Gl#a$OY>`O!i$vgGLRR#>jy*rV=7Ks?nRp zxu9WFdbi-Ihz$&}HO8`+P<7C;)frmUQQ8>UIa(B`II##Don%;7Q%v$Iz4HWqJGGh+ zqT!o{Bxz^ZCIZn-TbPDr+;WU@#yhz|m)# zXLyfMhfC9td7??~bGL3XWv^~s^9+Q{TimgA#*LX`>Tu%Ys4^}bFlH6Ald#hpq3oL$ zoF6LZII?CLI1P3R`+6yvbA22c%XzbahM$|$E%3~Kq~a*1NN5nyNCGP<6!Nm=8uPdqcE>$JG(9D|=Z zI0O66phOuqN-^Xe(z8?8XMmOkKH_82(v-9@i8G^}rkV^sCynf&2-Fa+df@~^C9e2( z=TX)Am`B@b=WykLD0oZ}b`ml|w;7wGXnUQ>j_CS2>FnsylmMI7=_s8i*%iY^VxLq_ zt1!rXK{pUUUo1+ydWIU)3&K{HJ|m?Q8bO}g2>E}c+j01?mmAMiTz$q*MghCkyU!#; zc+HJ3o@gQXf~Q>FyJjQh-3C6Yyngv&J!2_C6^G0*_yrxw(3bX_pLJ!6;@{?mlSbd? zCI_HSZlge-sa{Y**xYQRCNG=Fc2e{OMZ2_@Q&8%#gi*$noj(#vHgAO#D*!Oskn!hq z1K#C0hE7JvV=x@}JIC${@}o0H{L!J{%G*PRsWla{yg&ikN+6{ E2N6I@s{jB1 diff --git a/third_party/libtiff/test/refs/o-tiff2ps-PS2.ps b/third_party/libtiff/test/refs/o-tiff2ps-PS2.ps deleted file mode 100644 index e7fe4339a59d78ab296d02af2c44d3043b6c249b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4912 zcmZ`-c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fNQo-ew+AuSMGePuUpxC;RN;i0IsQUf#gSlr=I97=T~uh1+Fsb7~;g&&#ktqA|%>`3j2fe z(capu=j^hN2p30MG6Y=lTjVf#8{fz4b`MVa`IC%1!quqNTKjvmd|eKd766EJWSAq# zm)3G8J6&k$nH$%O3r4r@PrqA{RN%VZe2|K`fZu^btQy{&;|11ATnrhw>Kj1W0}1$` z^z-a;{2T{{>OyG1@2o#o2ly~X+~=31`L-xINgvsVXC+0F(;RPb3w#_Y(8>) zN46BYYt0?=4tCz63*6`1Zc7cnwcY(_!Z3OVCtzW4-iW-Am23FLB_6yyjAB5nh+aOJ zw@eJy7TovvS;Xf8&%7GnEuY0Ij9vgxm?YEECZ_tu}SoM0Aw(e#; z^fE!U157AlBJh%f-~4+28^~p$TL{4RJ_0zShE31h8Og92=BDxOr4=x7y3j3=Lna6p zsXOdPV#2fO4(3cw*fWDx9Aw@dqPJWeN6WPfPUle4gHlq%hM6rDUx+Zh?6Kgx%uq06 z=aIL@sqm30VK1v+VG!&iaA}#=K{=qkfV7FB=f+YD&NP~P|9VMA3hJHwhZ_IU8qo_YyfWL72}6cRw*m zcXI4yJVZ*SZRY^cjLu2ghp$P5WS*9pRSlo>w0n2?LeX2Ii<7HX<2JOJ!M6~FeC+PC z^hkQ7Qzm5oNSU;SQ(aw@wDhI?uYw2OI(UA)_Q9$NuZG|cUU=nY9pP_y>-((-yj~)2 JN9u!y=idMoaxMS> diff --git a/third_party/libtiff/test/refs/o-tiff2ps-PS3.ps b/third_party/libtiff/test/refs/o-tiff2ps-PS3.ps deleted file mode 100644 index 6ec22b9b947993b0547e8dc2ce5fdcbbfbfa0d52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4912 zcmZ`-cblq8^8VjXL4%3`^Pr46=7>3`F(LwrpfudQclNpa*|!>J&e{Ei^E^kT-m14k zS6BDoL&Hg=d^S&VBo&Q&e7>qBA8pghQnq%vBp(<=Q_a@pEOplm4gW*cY&nvUB8gL! zX#7}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q# zm)3G8J6&k$nH$%O3r4r@PrqA{RN%VZe2|K`fZu^btQy{&;|11ATnrhw>Kj1W0}1$` z^z-a;{2T{{>OyG1@2o#o2ly~X+~=31`L-xINgvsVXC+0F(;RPb3w#_Y(8>) zN46BYYt0?=4tCz63*6`1Zc7cnwcY(_!Z3OVCtzW4-iW-Am23FLB_6yyjAB5nh+aOJ zw@eJy7TovvS;Xf8&%7GnEuY0Ij9vgxm?YEECZ_tu}SoM0Aw(e#; z^fE!U157AlBJh%f-~4+28^~p$TL{4RJ_0zShE31h8Og92=BDxOr4=x7y3j3=Lna6p zsXOdPV#2fO4(3cw*fWDx9Aw@dqPJWeN6WPfPUle4gHlq%hM6rDUx+Zh?6Kgx%uq06 z=aIL@sqm30VK1v+VG!&iaA}#=K{=qkfV7FB=f+YD&NP~P|9VMA3hJHwhZ_IU8qo_YyfWL72}6cRw*m zcXI4yJVZ*SZRY^cjLu2ghp$P5WS*9pRSlo>w0n2?LeX2Ii<7HX<2JOJ!M6~FeC+PC z^hkQ7Qzm5oNSU;SQ(aw@wDhI?uYw2OI(UA)_Q9$NuZG|cUU=nY9pP_y>-((-yj~)2 JN9u!y=id^CaxVY? diff --git a/third_party/libtiff/test/rewrite_tag.c b/third_party/libtiff/test/rewrite_tag.c deleted file mode 100644 index 357cc03..0000000 --- a/third_party/libtiff/test/rewrite_tag.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright (c) 2007, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test _TIFFRewriteField(). - */ - -#include "tif_config.h" - -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -const uint32_t rows_per_strip = 1; - -int test_packbits() - -{ - TIFF *tif; - int i; - unsigned char buf[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - - uint32_t width = 10; - int length = 20; - const char *filename = "test_packbits.tif"; - - /* Test whether we can write tags. */ - tif = TIFFOpen(filename, "w"); - - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS)) - { - fprintf(stderr, "Can't set Compression tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - - for (i = 0; i < length; i++) - { - if (!TIFFWriteEncodedStrip(tif, i, buf, 10)) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - } - - TIFFClose(tif); - - /* Test whether we can write tags. */ - - tif = TIFFOpen(filename, "r+"); - - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - buf[3] = 17; - buf[6] = 12; - - if (!TIFFWriteEncodedStrip(tif, 6, buf, 10)) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - TIFFClose(tif); - - unlink(filename); - - return 0; - -failure: - /* Something goes wrong; close file and return unsuccessful status. */ - TIFFClose(tif); - /* unlink(filename); */ - - return 1; -} - -/************************************************************************/ -/* rewrite_test() */ -/************************************************************************/ -int rewrite_test(const char *filename, uint32_t width, int length, int bigtiff, - uint64_t base_value) - -{ - TIFF *tif; - int i; - unsigned char *buf; - uint64_t *rowoffset, *rowbytes; - uint64_t *upd_rowoffset = NULL; - uint64_t *upd_bytecount = NULL; - - buf = calloc(1, width); - assert(buf); - - /* Test whether we can write tags. */ - if (bigtiff) - tif = TIFFOpen(filename, "w8"); - else - tif = TIFFOpen(filename, "w4"); - - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - free(buf); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS)) - { - fprintf(stderr, "Can't set Compression tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - - for (i = 0; i < length; i++) - { - if (TIFFWriteScanline(tif, buf, i, 0) == -1) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - } - - TIFFClose(tif); - - /* Ok, now test whether we can read written values. */ - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s.\n", filename); - free(buf); - return 1; - } - - if (!TIFFGetField(tif, TIFFTAG_STRIPOFFSETS, &rowoffset)) - { - fprintf(stderr, "Can't fetch STRIPOFFSETS.\n"); - goto failure; - } - - if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &rowbytes)) - { - fprintf(stderr, "Can't fetch STRIPBYTECOUNTS.\n"); - goto failure; - } - - upd_rowoffset = (uint64_t *)_TIFFmalloc(sizeof(uint64_t) * length); - for (i = 0; i < length; i++) - upd_rowoffset[i] = base_value + i * width; - - if (!_TIFFRewriteField(tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8, length, - upd_rowoffset)) - { - fprintf(stderr, "Can't rewrite STRIPOFFSETS.\n"); - goto failure; - } - - _TIFFfree(upd_rowoffset); - upd_rowoffset = NULL; - - upd_bytecount = (uint64_t *)_TIFFmalloc(sizeof(uint64_t) * length); - for (i = 0; i < length; i++) - upd_bytecount[i] = 100 + (uint64_t)i * width; - - if (!_TIFFRewriteField(tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8, length, - upd_bytecount)) - { - fprintf(stderr, "Can't rewrite STRIPBYTECOUNTS.\n"); - goto failure; - } - - _TIFFfree(upd_bytecount); - upd_bytecount = NULL; - - TIFFClose(tif); - - /* Reopen file and read back to verify contents */ - - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s.\n", filename); - free(buf); - return 1; - } - - if (!TIFFGetField(tif, TIFFTAG_STRIPOFFSETS, &rowoffset)) - { - fprintf(stderr, "Can't fetch STRIPOFFSETS.\n"); - goto failure; - } - - for (i = 0; i < length; i++) - { - uint64_t expect = base_value + i * width; - - if (rowoffset[i] != expect) - { - fprintf(stderr, - "%s:STRIPOFFSETS[%d]: Got %X:%08X instead of %X:%08X.\n", - filename, i, (int)(rowoffset[i] >> 32), - (int)(rowoffset[i] & 0xFFFFFFFF), (int)(expect >> 32), - (int)(expect & 0xFFFFFFFF)); - goto failure; - } - } - - if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &rowbytes)) - { - fprintf(stderr, "Can't fetch STRIPBYTECOUNTS.\n"); - goto failure; - } - - for (i = 0; i < length; i++) - { - uint64_t expect = 100 + (uint64_t)i * width; - - if (rowbytes[i] != expect) - { - fprintf(stderr, - "%s:STRIPBYTECOUNTS[%d]: Got %X:%08X instead of %X:%08X.\n", - filename, i, (int)(rowbytes[i] >> 32), - (int)(rowbytes[i] & 0xFFFFFFFF), (int)(expect >> 32), - (int)(expect & 0xFFFFFFFF)); - goto failure; - } - } - - TIFFClose(tif); - free(buf); - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - return 0; - -failure: - /* Something goes wrong; close file and return unsuccessful status. */ - TIFFClose(tif); - free(buf); - if (upd_rowoffset != NULL) - { - _TIFFfree(upd_rowoffset); - } - if (upd_bytecount != NULL) - { - _TIFFfree(upd_bytecount); - } - /* unlink(filename); */ - - return 1; -} - -/************************************************************************/ -/* main() */ -/************************************************************************/ -int main(void) -{ - int failure = 0; - - failure |= test_packbits(); - - /* test fairly normal use */ - failure |= rewrite_test("rewrite1.tif", 10, 10, 0, 100); - failure |= rewrite_test("rewrite2.tif", 10, 10, 1, 100); - - /* test case of fitting all in directory entry */ - failure |= rewrite_test("rewrite3.tif", 10, 1, 0, 100); - failure |= rewrite_test("rewrite4.tif", 10, 1, 1, 100); - - /* test with very large values that don't fit in 4bytes (bigtiff only) */ - failure |= rewrite_test("rewrite5.tif", 10, 1000, 1, 0x6000000000ULL); - failure |= rewrite_test("rewrite6.tif", 10, 1, 1, 0x6000000000ULL); - - /* StripByteCounts on LONG */ - failure |= rewrite_test("rewrite7.tif", 65536, 1, 0, 100); - failure |= rewrite_test("rewrite8.tif", 65536, 2, 0, 100); - - return failure; -} diff --git a/third_party/libtiff/test/short_tag.c b/third_party/libtiff/test/short_tag.c deleted file mode 100644 index 36abba5..0000000 --- a/third_party/libtiff/test/short_tag.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test SHORT tags read/write functions. - */ - -#include "tif_config.h" - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tifftest.h" - -static const char filename[] = "short_test.tiff"; - -#define SPP 3 /* Samples per pixel */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -static const struct -{ - const ttag_t tag; - const uint16_t value; -} short_single_tags[] = {{TIFFTAG_COMPRESSION, COMPRESSION_NONE}, - {TIFFTAG_FILLORDER, FILLORDER_MSB2LSB}, - {TIFFTAG_ORIENTATION, ORIENTATION_BOTRIGHT}, - {TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH}, - {TIFFTAG_MINSAMPLEVALUE, 23}, - {TIFFTAG_MAXSAMPLEVALUE, 241}, - {TIFFTAG_INKSET, INKSET_MULTIINK}, - {TIFFTAG_NUMBEROFINKS, SPP}, - {TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT}}; -#define NSINGLETAGS (sizeof(short_single_tags) / sizeof(short_single_tags[0])) - -static const struct -{ - const ttag_t tag; - const uint16_t values[2]; -} short_paired_tags[] = {{TIFFTAG_PAGENUMBER, {1, 1}}, - {TIFFTAG_HALFTONEHINTS, {0, 255}}, - {TIFFTAG_DOTRANGE, {8, 16}}, - {TIFFTAG_YCBCRSUBSAMPLING, {2, 1}}}; -#define NPAIREDTAGS (sizeof(short_paired_tags) / sizeof(short_paired_tags[0])) - -int main() -{ - TIFF *tif; - size_t i; - unsigned char buf[SPP] = {0, 127, 255}; - - /* Test whether we can write tags. */ - tif = TIFFOpen(filename, "w"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - for (i = 0; i < NSINGLETAGS; i++) - { - if (!TIFFSetField(tif, short_single_tags[i].tag, - short_single_tags[i].value)) - { - fprintf(stderr, "Can't set tag %" PRIu32 ".\n", - short_single_tags[i].tag); - goto failure; - } - } - - for (i = 0; i < NPAIREDTAGS; i++) - { - if (!TIFFSetField(tif, short_paired_tags[i].tag, - short_paired_tags[i].values[0], - short_paired_tags[i].values[1])) - { - fprintf(stderr, "Can't set tag %" PRIu32 ".\n", - short_paired_tags[i].tag); - goto failure; - } - } - - /* Write dummy pixel data. */ - if (TIFFWriteScanline(tif, buf, 0, 0) == -1) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - TIFFClose(tif); - - /* Ok, now test whether we can read written values. */ - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s.\n", filename); - return 1; - } - - if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0) - goto failure; - - if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0) - goto failure; - - if (CheckShortField(tif, TIFFTAG_BITSPERSAMPLE, bps) < 0) - goto failure; - - if (CheckShortField(tif, TIFFTAG_PHOTOMETRIC, photometric) < 0) - goto failure; - - if (CheckShortField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP) < 0) - goto failure; - - if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0) - goto failure; - - if (CheckShortField(tif, TIFFTAG_PLANARCONFIG, planarconfig) < 0) - goto failure; - - for (i = 0; i < NSINGLETAGS; i++) - { - if (CheckShortField(tif, short_single_tags[i].tag, - short_single_tags[i].value) < 0) - goto failure; - } - - for (i = 0; i < NPAIREDTAGS; i++) - { - if (CheckShortPairedField(tif, short_paired_tags[i].tag, - short_paired_tags[i].values) < 0) - goto failure; - } - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - return 0; - -failure: - /* - * Something goes wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - return 1; -} diff --git a/third_party/libtiff/test/strip.c b/third_party/libtiff/test/strip.c deleted file mode 100644 index fcc31b3..0000000 --- a/third_party/libtiff/test/strip.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Functions to test strip interface of libtiff. - */ - -#include -#include - -#include "tiffio.h" - -int write_strips(TIFF *tif, const tdata_t array, const tsize_t size) -{ - tstrip_t strip, nstrips; - tsize_t stripsize, offset; - - stripsize = TIFFStripSize(tif); - if (!stripsize) - { - fprintf(stderr, "Wrong size of strip.\n"); - return -1; - } - - nstrips = TIFFNumberOfStrips(tif); - for (offset = 0, strip = 0; offset < size && strip < nstrips; - offset += stripsize, strip++) - { - /* - * Properly write last strip. - */ - tsize_t bufsize = size - offset; - if (bufsize > stripsize) - bufsize = stripsize; - - if (TIFFWriteEncodedStrip(tif, strip, (char *)array + offset, - bufsize) != bufsize) - { - fprintf(stderr, "Can't write strip %" PRIu32 ".\n", strip); - return -1; - } - } - - return 0; -} - -int read_strips(TIFF *tif, const tdata_t array, const tsize_t size) -{ - tstrip_t strip, nstrips; - tsize_t stripsize, offset; - tdata_t buf = NULL; - - stripsize = TIFFStripSize(tif); - if (!stripsize) - { - fprintf(stderr, "Wrong size of strip.\n"); - return -1; - } - - buf = _TIFFmalloc(stripsize); - if (!buf) - { - fprintf(stderr, "Can't allocate space for strip buffer.\n"); - return -1; - } - - nstrips = TIFFNumberOfStrips(tif); - for (offset = 0, strip = 0; offset < size && strip < nstrips; - offset += stripsize, strip++) - { - /* - * Properly read last strip. - */ - tsize_t bufsize = size - offset; - if (bufsize > stripsize) - bufsize = stripsize; - - if (TIFFReadEncodedStrip(tif, strip, buf, -1) != bufsize) - { - fprintf(stderr, "Can't read strip %" PRIu32 ".\n", strip); - return -1; - } - if (memcmp(buf, (char *)array + offset, bufsize) != 0) - { - fprintf(stderr, "Wrong data read for strip %" PRIu32 ".\n", strip); - _TIFFfree(buf); - return -1; - } - } - - _TIFFfree(buf); - - return 0; -} - -int create_image_striped(const char *name, uint32_t width, uint32_t length, - uint32_t rowsperstrip, uint16_t compression, - uint16_t spp, uint16_t bps, uint16_t photometric, - uint16_t sampleformat, uint16_t planarconfig, - const tdata_t array, const tsize_t size) -{ - TIFF *tif; - - /* Test whether we can write tags. */ - tif = TIFFOpen(name, "w"); - if (!tif) - goto openfailure; - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip)) - { - fprintf(stderr, "Can't set RowsPerStrip tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - if (write_strips(tif, array, size) < 0) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } - - TIFFClose(tif); - return 0; - -failure: - TIFFClose(tif); -openfailure: - fprintf(stderr, - "Can't create test TIFF file %s:\n" - " ImageWidth=%" PRIu32 ", ImageLength=%" PRIu32 - ", RowsPerStrip=%" PRIu32 ", Compression=%" PRIu16 ",\n" - " BitsPerSample=%" PRIu16 ", SamplesPerPixel=%" PRIu16 - ", SampleFormat=%" PRIu16 ",\n" - " PlanarConfiguration=%" PRIu16 - ", PhotometricInterpretation=%" PRIu16 ".\n", - name, width, length, rowsperstrip, compression, bps, spp, - sampleformat, planarconfig, photometric); - return -1; -} - -int read_image_striped(const char *name, uint32_t width, uint32_t length, - uint32_t rowsperstrip, uint16_t compression, - uint16_t spp, uint16_t bps, uint16_t photometric, - uint16_t sampleformat, uint16_t planarconfig, - const tdata_t array, const tsize_t size) -{ - TIFF *tif; - uint16_t value_u16; - uint32_t value_u32; - - /* Test whether we can read written values. */ - tif = TIFFOpen(name, "r"); - if (!tif) - goto openfailure; - - if (TIFFIsTiled(tif)) - { - fprintf(stderr, "Can't read image %s, it is tiled.\n", name); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &value_u32) || - value_u32 != width) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_IMAGEWIDTH); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &value_u32) || - value_u32 != length) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_IMAGELENGTH); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &value_u16) || - value_u16 != bps) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_BITSPERSAMPLE); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &value_u16) || - value_u16 != photometric) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_PHOTOMETRIC); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &value_u16) || - value_u16 != spp) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_SAMPLESPERPIXEL); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &value_u32) || - value_u32 != rowsperstrip) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_ROWSPERSTRIP); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &value_u16) || - value_u16 != planarconfig) - { - fprintf(stderr, "Can't get tag %d.\n", TIFFTAG_PLANARCONFIG); - goto failure; - } - - if (read_strips(tif, array, size) < 0) - { - fprintf(stderr, "Can't read image data.\n"); - goto failure; - } - - TIFFClose(tif); - return 0; - -failure: - TIFFClose(tif); -openfailure: - fprintf(stderr, - "Can't read test TIFF file %s:\n" - " ImageWidth=%" PRIu32 ", ImageLength=%" PRIu32 - ", RowsPerStrip=%" PRIu32 ", Compression=%" PRIu16 ",\n" - " BitsPerSample=%" PRIu16 ", SamplesPerPixel=%" PRIu16 - ", SampleFormat=%" PRIu16 ",\n" - " PlanarConfiguration=%" PRIu16 - ", PhotometricInterpretation=%" PRIu16 ".\n", - name, width, length, rowsperstrip, compression, bps, spp, - sampleformat, planarconfig, photometric); - return -1; -} diff --git a/third_party/libtiff/test/strip_rw.c b/third_party/libtiff/test/strip_rw.c deleted file mode 100644 index 493d36d..0000000 --- a/third_party/libtiff/test/strip_rw.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Test libtiff input/output routines. - */ - -#include "tif_config.h" - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "test_arrays.h" -#include "tiffio.h" - -extern int create_image_striped(const char *, uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, uint16_t, uint16_t, - uint16_t, uint16_t, const tdata_t, - const tsize_t); -extern int read_image_striped(const char *, uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, - uint16_t, const tdata_t, const tsize_t); - -const char *filename = "strip_test.tiff"; - -int main(int argc, char **argv) -{ - uint32_t rowsperstrip; - uint16_t compression; - uint16_t spp, bps, photometric, sampleformat, planarconfig; - (void)argc; - (void)argv; - - /* - * Test two special cases: image consisting from single line and image - * consisting from single column. - */ - rowsperstrip = 1; - compression = COMPRESSION_NONE; - spp = 1; - bps = 8; - photometric = PHOTOMETRIC_MINISBLACK; - sampleformat = SAMPLEFORMAT_UINT; - planarconfig = PLANARCONFIG_CONTIG; - - if (create_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip, - compression, spp, bps, photometric, sampleformat, - planarconfig, (const tdata_t)byte_array1, - byte_array1_size) < 0) - { - fprintf(stderr, "Can't create TIFF file %s.\n", filename); - goto failure; - } - if (read_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip, - compression, spp, bps, photometric, sampleformat, - planarconfig, (const tdata_t)byte_array1, - byte_array1_size) < 0) - { - fprintf(stderr, "Can't read TIFF file %s.\n", filename); - goto failure; - } - unlink(filename); - - if (create_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip, - compression, spp, bps, photometric, sampleformat, - planarconfig, (const tdata_t)byte_array1, - byte_array1_size) < 0) - { - fprintf(stderr, "Can't create TIFF file %s.\n", filename); - goto failure; - } - if (read_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip, - compression, spp, bps, photometric, sampleformat, - planarconfig, (const tdata_t)byte_array1, - byte_array1_size) < 0) - { - fprintf(stderr, "Can't read TIFF file %s.\n", filename); - goto failure; - } - unlink(filename); - - /* - * Test one-channel image with different parameters. - */ - rowsperstrip = 1; - spp = 1; - bps = 8; - photometric = PHOTOMETRIC_MINISBLACK; - sampleformat = SAMPLEFORMAT_UINT; - planarconfig = PLANARCONFIG_CONTIG; - - if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip, compression, - spp, bps, photometric, sampleformat, planarconfig, - (const tdata_t)byte_array1, byte_array1_size) < 0) - { - fprintf(stderr, "Can't create TIFF file %s.\n", filename); - goto failure; - } - if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip, compression, - spp, bps, photometric, sampleformat, planarconfig, - (const tdata_t)byte_array1, byte_array1_size) < 0) - { - fprintf(stderr, "Can't read TIFF file %s.\n", filename); - goto failure; - } - unlink(filename); - - rowsperstrip = YSIZE; - if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip, compression, - spp, bps, photometric, sampleformat, planarconfig, - (const tdata_t)byte_array1, byte_array1_size) < 0) - { - fprintf(stderr, "Can't create TIFF file %s.\n", filename); - goto failure; - } - if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip, compression, - spp, bps, photometric, sampleformat, planarconfig, - (const tdata_t)byte_array1, byte_array1_size) < 0) - { - fprintf(stderr, "Can't read TIFF file %s.\n", filename); - goto failure; - } - unlink(filename); - - return 0; - -failure: - unlink(filename); - return 1; -} diff --git a/third_party/libtiff/test/test_IFD_enlargement.c b/third_party/libtiff/test/test_IFD_enlargement.c deleted file mode 100644 index 8f590d5..0000000 --- a/third_party/libtiff/test/test_IFD_enlargement.c +++ /dev/null @@ -1,1820 +0,0 @@ -/* - * TIFF Library - * - * The purpose of this test file is to test the correctness of - * TIFFWriteDirectory() when an already written IFD is extended with additional - * tags or the IFD data size is increased. The IFD must then be re-written to a - * different location in the file. On the other hand, the IFD should be - * overwritten if its size has not grown. - */ - -#include "tif_config.h" - -#include -#include -#include -#include -#include - -#include "tiffio.h" - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#ifndef TIFFmin -#define TIFFmax(A, B) ((A) > (B) ? (A) : (B)) -#define TIFFmin(A, B) ((A) < (B) ? (A) : (B)) -#endif - -/* Global settings -not save to change- */ -#define SPP 3 /* samples per pixel */ -#define BPS 8 /* bits per sample */ - -char *modeStrings[] = {"wl", "wb", "w8l", "w8b"}; - -/* Writes some pixel data as scanline or tiles to file. - */ -int write_image_data(TIFF *tif, uint16_t width, uint16_t length, bool tiled, - unsigned int pixval, unsigned char *plastlinedata, - unsigned int lastlinebytesmax) -{ - size_t bufLen; - unsigned char *pbufLine = NULL; - unsigned int bpsmod = (1 << BPS); - int tlwidth; - int tllength; - tmsize_t tlsize; - - assert(SPP == 3); - - if (tiled) - { - int ret = TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tlwidth); - ret += TIFFGetField(tif, TIFFTAG_TILELENGTH, &tllength); - if (ret < 2) - { - fprintf(stderr, - "Can't get TIFFTAG_TILEWIDTH/_LENGTH tags. Testline %d\n", - __LINE__); - return 1; - } - /* For tiled mode get size of a tile in bytes */ - tlsize = TIFFTileSize(tif); - bufLen = (size_t)tlsize; - } - else - { - /* For strip mode get size of a row in bytes */ - bufLen = (((size_t)width * SPP * BPS) + 7) / 8; - } - - pbufLine = _TIFFmalloc(bufLen); - if (pbufLine == NULL) - return 1; - - /* Fill image buffer. */ - pbufLine[0] = (unsigned char)((pixval * 100) % bpsmod); - pbufLine[1] = 127 % bpsmod; - pbufLine[2] = 255 % bpsmod; - for (size_t x = SPP; x < bufLen; x += SPP) - { - pbufLine[x] = 10 % bpsmod; - pbufLine[x + 1] = (unsigned char)((x * 40) % bpsmod); - pbufLine[x + 2] = (unsigned char)((x * 70) % bpsmod); - } - - /* Write dummy pixel data. */ - if (tiled) - { - uint32_t numtiles = TIFFNumberOfTiles(tif); - for (uint32_t i = 0; i < numtiles; i++) - { - if (TIFFWriteEncodedTile(tif, i, pbufLine, 0) == -1) - { - fprintf(stderr, "Can't write image data tile. Testline %d\n", - __LINE__); - return 1; - } - if ((plastlinedata != NULL) && (i == (numtiles - 1))) - { - memcpy(plastlinedata, pbufLine, - TIFFmin(bufLen, (size_t)lastlinebytesmax)); - } - /* Change something for next row. */ - pbufLine[0] = (pbufLine[0] + 35) % bpsmod; - } - } - else - { - for (int i = 0; i < length; i++) - { - if (TIFFWriteScanline(tif, pbufLine, i, 0) == -1) - { - fprintf(stderr, - "Can't write image data scanline. Testline %d\n", - __LINE__); - return 1; - } - if ((plastlinedata != NULL) && (i == (length - 1))) - { - memcpy(plastlinedata, pbufLine, - TIFFmin(bufLen, (size_t)lastlinebytesmax)); - } - /* Change something for next row. */ - pbufLine[0] = (pbufLine[0] + 30) % bpsmod; - } - } - _TIFFfree(pbufLine); - return 0; -} /*-- write_image_data() --*/ - -/* Fills the active IFD with some default values and writes - * an image with given number of lines as strips (scanlines) or tiles to file. - */ -int write_data_to_current_directory(TIFF *tif, uint16_t width, uint16_t length, - bool tiled, int ifd_page_num, - bool write_data, - unsigned char *plastlinedata, - unsigned int lastlinebytesmax) -{ - const uint16_t photometric = PHOTOMETRIC_RGB; - const uint16_t rows_per_strip = 1; - const uint16_t planarconfig = PLANARCONFIG_CONTIG; - - char auxString[128]; - - if (!tif) - { - fprintf(stderr, "Invalid TIFF handle.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, BPS)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - return 1; - } - - if (tiled) - { - /* Tilesizes must be multiple of 16. */ - int ret = TIFFSetField(tif, TIFFTAG_TILEWIDTH, 16); - ret += TIFFSetField(tif, TIFFTAG_TILELENGTH, 16); - if (ret < 2) - { - fprintf(stderr, "Can't set TIFFTAG_TILEWIDTH/_LENGTH tags.\n"); - return 1; - } - } - else - { - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - return 1; - } - } - - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - return 1; - } - /* Write IFD identification number to ASCII string of PageName tag. */ - sprintf(auxString, "%d th. IFD", ifd_page_num); - if (!TIFFSetField(tif, TIFFTAG_PAGENAME, auxString)) - { - fprintf(stderr, "Can't set TIFFTAG_PAGENAME tag.\n"); - return 1; - } - - /* Write dummy pixel data. */ - if (write_data) - { - if (write_image_data(tif, width, length, tiled, ifd_page_num, - plastlinedata, lastlinebytesmax)) - { - fprintf(stderr, "Can't write image data. Testline %d\n", __LINE__); - return 1; - } - } - return 0; -} /*-- write_data_to_current_directory() --*/ - -/* Adds an EXIF IFD with some default values to the active IFD. - */ -int write_EXIF_data_to_current_directory(TIFF *tif, int i, - uint64_t *dir_offset_EXIF) -{ - char auxString[128]; - - if (!tif) - { - fprintf(stderr, "Invalid TIFF handle.\n"); - return 1; - } - - /*-- Now create an EXIF directory. */ - if (TIFFCreateEXIFDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - return 1; - } - - if (!TIFFSetField(tif, EXIFTAG_EXIFVERSION, "0231")) - { - fprintf(stderr, "Can't write EXIFTAG_EXIFVERSION\n"); - return 1; - } - - /* Write IFD identification number to ASCII string of SUBSECTIMEORIGINAL - * tag. */ - sprintf(auxString, "EXIF-%d-EXIF", i); - if (!TIFFSetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, auxString)) - { - fprintf(stderr, "Can't set EXIFTAG_SUBSECTIMEORIGINAL tag.\n"); - return 1; - } - - if (!TIFFWriteCustomDirectory(tif, dir_offset_EXIF)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - return 1; - } - - return 0; -} /*-- write_EXIF_data_to_current_directory() --*/ - -/* Compare 'requested_dir_number' with number written in PageName tag - * into the IFD to identify that IFD. */ -int is_requested_directory(TIFF *tif, int requested_dir_number, - const char *filename) -{ - char *ptr = NULL; - char *auxStr = NULL; - - if (!TIFFGetField(tif, TIFFTAG_PAGENAME, &ptr)) - { - fprintf(stderr, "Can't get TIFFTAG_PAGENAME tag. Testline %d\n", - __LINE__); - return 0; - } - - /* Check for reading errors */ - if (ptr != NULL) - auxStr = strchr(ptr, ' '); - - if (ptr == NULL || auxStr == NULL || strncmp(auxStr, " th.", 4)) - { - ptr = ptr == NULL ? "(null)" : ptr; - fprintf(stderr, - "Error reading IFD directory number from PageName tag: %s. " - "Testline %d\n", - ptr, __LINE__); - return 0; - } - - /* Retrieve IFD identification number from ASCII string */ - const int nthIFD = atoi(ptr); - if (nthIFD == requested_dir_number) - { - return 1; - } - fprintf( - stderr, - "Expected directory %d from %s was not loaded but: %s. Testline %d\n", - requested_dir_number, filename, ptr, __LINE__); - - return 0; -} - -/* Checks that IFDs on file can be overwritten if they have not grown and - * were re-written to an other location if IFD size has been grown. - */ -int test_IFD_enlargement(const char *filename, unsigned int openMode, - bool is_strile_array_writing, int numIFDs, - uint16_t width, uint16_t length, bool tiled) -{ - -#define NUMIFDsMAX 4 - uint64_t auxUint64; - TIFFErrorHandler errHandler = NULL; - uint64_t offsetBase[NUMIFDsMAX] = {0}; - uint64_t offsetNew[NUMIFDsMAX]; - unsigned char bufLine[NUMIFDsMAX + 1][1024]; - - assert(numIFDs <= NUMIFDsMAX); - assert(openMode < (sizeof(modeStrings) / sizeof(modeStrings[0]))); - - /*-- Create a file and write numIFDs IFDs directly to it --*/ - TIFF *tif = TIFFOpen(filename, modeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s. Testline %d\n", filename, __LINE__); - return 1; - } - - for (int i = 0; i < numIFDs; i++) - { - /* Writing baseline images (IFDs) to file. */ - if (write_data_to_current_directory(tif, width, length, tiled, i, - !is_strile_array_writing, - &bufLine[i][0], sizeof(bufLine[i]))) - { - fprintf( - stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* xmldata need to be 9 bytes (17 bytes for BigTIFF, respectively) thus - * not to fit into the entry itself and have space to cover two - * strip-/tile-offsets when XMLPACKET tag contents is reduced. */ - char xmldata[20]; - if (TIFFIsBigTIFF(tif)) - strcpy(xmldata, "XML-ABCDEABCDEFGH"); - else - strcpy(xmldata, "XML-ABCDE"); - uint32_t xmlpacketLength = (uint32_t)strlen(xmldata); - - if (!TIFFSetField(tif, TIFFTAG_XMLPACKET, xmlpacketLength, xmldata)) - { - fprintf(stderr, "Can't set TIFFTAG_XMLPACKET tag. Testline %d\n", - __LINE__); - goto failure; - } - if (is_strile_array_writing) - { - /* Set flag for deferred strile-array writing. */ - if (!TIFFDeferStrileArrayWriting(tif)) - { - fprintf( - stderr, - "TIFFDeferStrileArrayWriting failed for %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Set flag, that image writing has started and freeze relevant IFD - * tags. */ - if (!TIFFWriteCheck(tif, tiled, NULL)) - { - fprintf(stderr, "TIFFWriteCheck failed for %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - /* Write IFD tags to file (and setup new empty IFD). */ - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } /*-- for (numIFDs) --*/ - - /* Retrieve IFD offset values to read IFDs before image data has been - * written when is_strile_array_writing is true. */ - for (int i = numIFDs - 1; i >= 0; i--) - { - TIFFSetDirectory(tif, i); - offsetBase[i] = TIFFCurrentDirOffset(tif); - } - /* For TIFFDeferStrileArrayWriting write now image data to file.*/ - if (is_strile_array_writing) - { - for (int i = 0; i < numIFDs; i++) - { - /* Reset to written IFD to write strile arrays with dummy content to - * file and update StripOffset tag within IFD on file. - * First TIFFForceStrileArrayWriting() prepares internal flags and - * memory for next writing after switching back to the already - * written IFD. */ - TIFFSetDirectory(tif, i); - if (!TIFFForceStrileArrayWriting(tif)) - { - fprintf( - stderr, - "TIFFForceStrileArrayWriting failed for %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Then write image pixels. */ - if (write_image_data(tif, width, length, tiled, 5 * i, - &bufLine[i][0], sizeof(bufLine[i]))) - { - fprintf(stderr, "Can't write image data. Testline %d\n", - __LINE__); - return 1; - } - /* Last image data need to be flushed to file. */ - if (!TIFFFlushData(tif)) - { - fprintf(stderr, "TIFFFlushData failed for %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Fill (overwrite) strile array with final offsets after image data - * has been written. Would also be called by TIFFClose(). */ - if (!TIFFForceStrileArrayWriting(tif)) - { - fprintf( - stderr, - "TIFFForceStrileArrayWriting failed for %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - } - /* Retrieve IFD offset values for later checking. Should not be changed. */ - for (int i = numIFDs - 1; i >= 0; i--) - { - TIFFSetDirectory(tif, i); - auxUint64 = TIFFCurrentDirOffset(tif); - if (offsetBase[i] != auxUint64) - { - fprintf(stderr, "Unexpected change of offset IFD %d. Testline %d\n", - i, __LINE__); - goto failure; - } - } - - /* Test over-writing with less bytes. - * This leaves some bytes of the larger previous IFD at EOF or before the - * next IFD. */ - TIFFSetDirectory(tif, 0); - char xmldata0[] = "XMLb"; - uint32_t xmlpacketLength = (uint32_t)strlen(xmldata0); - - if (!TIFFSetField(tif, TIFFTAG_XMLPACKET, xmlpacketLength, xmldata0)) - { - fprintf(stderr, "Can't set TIFFTAG_XMLPACKET tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't overwrite directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - - /* Re-read IFD and check its offset, which should not have been changed at - * this point, except for strile_array_writing because then the stripoffsets - * are now written within IFD space. However, for only one IFD (numIFDs=1) - * the strile array data is written straight behind the IFD and thus can be - * overwritten. - * Furthermore, strile_array size of <= 9 (<=17 for BigTIFF) can also be - * written within the IFD space, because 9 (17 for BigTIFF) byte are gained - * by downsizing the XMLPACKET. */ - TIFFSetDirectory(tif, 0); - auxUint64 = TIFFCurrentDirOffset(tif); - if (!is_strile_array_writing && offsetBase[0] != auxUint64) - { - fprintf(stderr, - "Failure: Directory 0 offset has changed from 0x%" PRIx64 - " (%" PRIu64 ") to 0x %" PRIx64 " (%" PRIu64 - "). Testline %d\n ", - offsetBase[0], offsetBase[0], auxUint64, auxUint64, __LINE__); - goto failure; - } - else if (is_strile_array_writing && !tiled) - { - if (numIFDs > 1 && TIFFNumberOfStrips(tif) > 2) - { - if (offsetBase[0] == auxUint64) - { - fprintf(stderr, - "Failure with strile array writing: Directory 0 offset " - "has now " - "NOT changed from 0x%" PRIx64 " (%" PRIu64 - "). Testline %d\n ", - offsetBase[0], offsetBase[0], __LINE__); - goto failure; - } - } - else if (offsetBase[0] != auxUint64) - { - fprintf(stderr, - "Failure with strile array writing: Directory 0 offset has " - "changed from 0x%" PRIx64 " (%" PRIu64 ") to 0x %" PRIx64 - " (%" PRIu64 "). Testline %d\n ", - offsetBase[0], offsetBase[0], auxUint64, auxUint64, - __LINE__); - goto failure; - } - } - else if (is_strile_array_writing && tiled) - { - if (numIFDs > 1 && TIFFNumberOfTiles(tif) > 2) - { - if (offsetBase[0] == auxUint64) - { - fprintf(stderr, - "Failure with tiled strile array writing: Directory 0 " - "offset has now NOT changed from 0x%" PRIx64 - " (%" PRIu64 "). Testline %d\n ", - offsetBase[0], offsetBase[0], __LINE__); - goto failure; - } - } - else if (offsetBase[0] != auxUint64) - { - fprintf(stderr, - "Failure with tiled strile array writing: Directory 0 " - "offset has " - "changed from 0x%" PRIx64 " (%" PRIu64 ") to 0x %" PRIx64 - " (%" PRIu64 "). Testline %d\n ", - offsetBase[0], offsetBase[0], auxUint64, auxUint64, - __LINE__); - goto failure; - } - } - - /*-- Enlarge IFD 0 with enlarged tag data and write it again. --*/ - char xmldata1[] = "XML data package"; - xmlpacketLength = (uint32_t)strlen(xmldata1); - - if (!TIFFSetField(tif, TIFFTAG_XMLPACKET, xmlpacketLength, xmldata1)) - { - fprintf(stderr, "Can't set TIFFTAG_XMLPACKET tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't re-write directory 0 to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - - /* Check IFD 0 offset, which should have been changed. - * (Because of unused bytes before EOF generated by downsizing of XMLPACKET - * before enlarging IFD will be re-written even for numIFDs==1) */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory 0 of %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - offsetNew[0] = TIFFCurrentDirOffset(tif); - if (offsetBase[0] == offsetNew[0]) - { - fprintf( - stderr, - "Failure: Directory 0 offset has now NOT changed from 0x%" PRIx64 - " (%" PRIu64 ").Testline %d\n ", - offsetNew[0], offsetNew[0], __LINE__); - goto failure; - } - - if (numIFDs > 1) - { - /*-- Read next directory IFD=1 and re-write that. --*/ - if (!TIFFReadDirectory(tif)) - { - fprintf(stderr, "Can't read directory from %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Enlarge IFD 1 by adding new tag. */ - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, - "WGS 84 / UTM zone 1N|WGS 84|")) - { - fprintf(stderr, - "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't re-write directory 1 to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - TIFFSetDirectory(tif, 1); - offsetNew[1] = TIFFCurrentDirOffset(tif); - if (auxUint64 == offsetNew[1]) - { - fprintf(stderr, - "Failure: Directory 1 offset has now NOT changed from " - "0x%" PRIx64 " (%" PRIu64 ").Testline %d\n ", - offsetNew[1], offsetNew[1], __LINE__); - goto failure; - } - } - - /* Use TIFFSetSubDirectory() for old IFD 0 and just overwrite it. - * Just overwriting invalid directory works. For strile array writing it - * shall fail, because now the striles are tried to be written within the - * IFD space. However, for only one IFD (numIFDs=1) the strile array data is - * written straight behind the IFD and thus can be overwritten. - * The same is true for tiled images, however if the number of tiles - * is one (TIFFNumberOfTiles==1), the tile offset fits into the tag entry - * and thus can also be overwritten. - */ - if (!TIFFSetSubDirectory(tif, offsetBase[0])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetBase[0], offsetBase[0], filename, __LINE__); - goto failure; - } - if (!tiled) - { - if (!is_strile_array_writing || numIFDs <= 1) - { - if (!TIFFWriteDirectory( - tif)) /* just overwriting invalid directory works!!*/ - { - fprintf(stderr, - "Can't overwrite directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - else - { - /* Because XMLPACKET is 9 byte reduced, small strilearrays can be - * overwritten. */ - if (TIFFNumberOfStrips(tif) > 2) - /* Suppress error message from 'TIFFRewriteDirectory()' like - * 'Error fetching directory link' or 'Sanity check...'. */ - errHandler = TIFFSetErrorHandler(NULL); - if (TIFFWriteDirectory(tif) && TIFFNumberOfStrips(tif) > 2) - { - fprintf(stderr, - "Was expected to fail but succeeded. %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - if (TIFFNumberOfStrips(tif) > 2) - TIFFSetErrorHandler(errHandler); - } - } - else - { - if (!is_strile_array_writing || numIFDs <= 1 || - TIFFNumberOfTiles(tif) <= 1) - { - if (!TIFFWriteDirectory( - tif)) /* just overwriting invalid directory works!!*/ - { - fprintf(stderr, - "Can't overwrite directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - else - { - /* Because XMLPACKET is 9 byte reduced, small strilearrays can be - * overwritten. */ - if (TIFFNumberOfTiles(tif) > 2) - /* Suppress error message from 'TIFFRewriteDirectory()' like - * 'Error fetching directory link' or 'Sanity check...'. */ - errHandler = TIFFSetErrorHandler(NULL); - if (TIFFWriteDirectory(tif) && TIFFNumberOfTiles(tif) > 2) - { - fprintf(stderr, - "Was expected to fail but succeeded. %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - if (TIFFNumberOfTiles(tif) > 2) - TIFFSetErrorHandler(errHandler); - } - } - - /* Re-read the already re-written and thus invalidated IFD 0 with - * TIFFSetSubDirectory() and try to re-write it. - * Re-writing an invalid IFD should fail. */ - if (!TIFFSetSubDirectory(tif, offsetBase[0])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetBase[0], offsetBase[0], filename, __LINE__); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_XMLPACKET, (uint32_t)strlen(xmldata1), - xmldata1)) - { - fprintf(stderr, "Can't set TIFFTAG_XMLPACKET tag. Testline %d\n", - __LINE__); - goto failure; - } - /* Suppress error message from 'TIFFRewriteDirectory()' like - * 'Error fetching directory link' or 'Sanity check...'. */ - errHandler = TIFFSetErrorHandler(NULL); - if (TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Was expected to fail but succeeded. %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - TIFFSetErrorHandler(errHandler); - - /*-- Now with a valid IFD: Re-read IFD with TIFFSetSubDirectory() and - * re-write it. If it is at the end of the file, it will be overwritten. - * This is the case for numIFD==1. */ - if (!TIFFSetSubDirectory(tif, offsetNew[0])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetNew[0], offsetNew[0], filename, __LINE__); - goto failure; - } - char xmldata2[] = "XML data package even longer"; - if (!TIFFSetField(tif, TIFFTAG_XMLPACKET, (uint32_t)strlen(xmldata2), - xmldata2)) - { - fprintf(stderr, "Can't set TIFFTAG_XMLPACKET tag.. Testline %d\n", - __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't re-write directory 0 to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - TIFFSetDirectory(tif, 0); - offsetNew[0] = TIFFCurrentDirOffset(tif); - if (numIFDs > 1 && auxUint64 == offsetNew[0]) - { - fprintf(stderr, - "Failure: Directory %d offset has NOT changed from 0x%" PRIx64 - " (%" PRIu64 ").Testline %d\n ", - 0, offsetNew[0], offsetNew[0], __LINE__); - goto failure; - } - - /*-- Make a little check. --*/ - /* Reopen prepared testfile */ - TIFFClose(tif); - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't open %s\n", filename); - goto failure; - } - for (int i = 0; i < numIFDs; i++) - { - - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", i, - filename, __LINE__); - goto failure; - } - if (i < 2) - { - auxUint64 = TIFFCurrentDirOffset(tif); - if (auxUint64 != offsetNew[i]) - { - fprintf( - stderr, - "Failure: Directory 0 offset has changed from 0x%" PRIx64 - " (%" PRIu64 ") to 0x %" PRIx64 " (%" PRIu64 - ").Testline %d\n ", - offsetNew[i], offsetNew[i], auxUint64, auxUint64, __LINE__); - goto failure; - } - } - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - /* Check last image line or last tile. */ - tmsize_t bytesRead; - if (tiled) - { - uint32_t numtiles = TIFFNumberOfTiles(tif); - uint64_t tileSize = TIFFTileSize64(tif); - if (tileSize > sizeof(bufLine[NUMIFDsMAX])) - { - fprintf( - stderr, - "Failure: Read buffer for tile too small.Testline %d\n ", - __LINE__); - goto failure; - } - bytesRead = TIFFReadEncodedTile( - tif, numtiles - 1, &bufLine[NUMIFDsMAX][0], sizeof(bufLine[0])); - } - else - { - uint64_t scanlineSize = TIFFScanlineSize64(tif); - if (scanlineSize > sizeof(bufLine[NUMIFDsMAX])) - { - fprintf(stderr, - "Failure: Read buffer for scanline too small.Testline " - "%d\n ", - __LINE__); - goto failure; - } - bytesRead = - TIFFReadScanline(tif, &bufLine[NUMIFDsMAX][0], length - 1, 0); - } - if (bytesRead > 0) - { - for (int k = 0; k < bytesRead; k++) - { - if (bufLine[NUMIFDsMAX][k] != bufLine[i][k]) - { - fprintf( - stderr, - "Failure: Read IFD %d last line pixel %d value %d is " - "different to written value %d .Testline %d\n ", - i, k, bufLine[i][k], bufLine[NUMIFDsMAX][k], __LINE__); - goto failure; - } - } - } - else - { - fprintf(stderr, - "Failure: Reading IFD %d last line %d .Testline %d\n ", i, - length - 1, __LINE__); - goto failure; - } - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_IFD_enlargement --*/ - -/* Width and length for the next test functions can be adapted here. */ -#define WIDTH 1 -#define LENGTH 2 - -/* Checks that Custom-IFDs like EXIF-IFD in file can be overwritten if they have - * not grown and were re-written to an other location if IFD size has been - * grown. - */ -int test_EXIF_enlargement(const char *filename, bool is_big_tiff) -{ - char auxString[128]; - uint64_t offsetEXIFBase[2]; - uint64_t offsetEXIFNew[2]; - - /*-- Create a file and write two EXIF-IFDs directly to it --*/ - TIFF *tif = TIFFOpen(filename, is_big_tiff ? "w8" : "w"); - if (!tif) - { - fprintf(stderr, "Can't create %s. Testline %d\n", filename, __LINE__); - return 1; - } - - /* Write baseline test image. */ - for (int i = 0; i < 2; i++) - { - /* Writing baseline images (IFDs) and EXIF-IFDs to file. */ - if (write_data_to_current_directory(tif, WIDTH, LENGTH, FALSE, i, true, - NULL, 0)) - { - fprintf( - stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Set EXIFIFD tag with dummy value to reserve space in IFD. */ - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, (uint64_t)0)) - { - fprintf(stderr, "Can't set TIFFTAG_EXIFIFD tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - - if (write_EXIF_data_to_current_directory(tif, i, &offsetEXIFBase[i])) - { - fprintf(stderr, - "Can't write EXIF data to current directory in %s. " - "Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Go back to current main-IFD and update EXIF-IFD offset. */ - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", i, - filename, __LINE__); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, offsetEXIFBase[i])) - { - fprintf(stderr, "Can't set TIFFTAG_EXIFIFD tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - - /* Test over-writing the EXIF directory without change or with less bytes. - */ - int retCode; - char *pAscii0; - char *pAscii1; - if (!TIFFReadEXIFDirectory(tif, offsetEXIFBase[0])) - { - fprintf(stderr, - "Can't read EXIF directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetEXIFBase[0], offsetEXIFBase[0], filename, __LINE__); - goto failure; - } - - retCode = TIFFGetField(tif, EXIFTAG_EXIFVERSION, &pAscii0); - retCode += TIFFGetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, &pAscii1); - if (retCode != 2) - { - fprintf(stderr, "Can't read EXIF tags. Testline %d\n", __LINE__); - return 1; - } - - /* Use shorter string thus EXIF-IFD should be overwritten. */ - sprintf(auxString, "EXIF-%d-XX", 0); - if (!TIFFSetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, auxString)) - { - fprintf(stderr, - "Can't set EXIFTAG_SUBSECTIMEORIGINAL tag. Testline %d\n", - __LINE__); - return 1; - } - if (!TIFFWriteCustomDirectory(tif, &offsetEXIFNew[0])) - { - fprintf(stderr, - "TIFFWriteCustomDirectory() with EXIF failed. Testline %d\n", - __LINE__); - return 1; - } - /* Check for overwriting. */ - if (offsetEXIFBase[0] != offsetEXIFNew[0]) - { - fprintf(stderr, - "Failure: EXIF IFD 0 offset has changed from 0x%" PRIx64 - " (%" PRIu64 ") to 0x %" PRIx64 " (%" PRIu64 ").Testline %d\n ", - offsetEXIFBase[0], offsetEXIFBase[0], offsetEXIFNew[0], - offsetEXIFNew[0], __LINE__); - goto failure; - } - else - { - /*EXIF has been overwritten. Check that. */ - if (!TIFFReadEXIFDirectory(tif, offsetEXIFNew[0])) - { - fprintf(stderr, - "Can't read EXIF directory at offset 0x%" PRIx64 - " (%" PRIu64 ") within %s. Testline %d\n", - offsetEXIFBase[0], offsetEXIFBase[0], filename, __LINE__); - goto failure; - } - if (!TIFFGetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, &pAscii1)) - { - fprintf(stderr, - "Can't read tag EXIFTAG_SUBSECTIMEORIGINAL of %s. Testline " - "%d\n", - filename, __LINE__); - goto failure; - } - if (strcmp(pAscii1, auxString)) - { - fprintf(stderr, - "Read contents of EXIFTAG_SUBSECTIMEORIGINAL %s is not as " - "expected %s of %s. Testline " - "%d\n", - pAscii1, auxString, filename, __LINE__); - goto failure; - } - } - - /* Enlarging and re-writing EXIF IFD 1. Since EXIF IFD 1 is at EOF, - * even an enlargement should overwrite it. */ - if (!TIFFReadEXIFDirectory(tif, offsetEXIFBase[1])) - { - fprintf(stderr, - "Can't read EXIF directory 1 at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetEXIFBase[1], offsetEXIFBase[1], filename, __LINE__); - goto failure; - } - - retCode = TIFFGetField(tif, EXIFTAG_EXIFVERSION, &pAscii0); - retCode += TIFFGetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, &pAscii1); - if (retCode != 2) - { - fprintf(stderr, "Can't read EXIF tags. Testline %d\n", __LINE__); - return 1; - } - - /* Enlarge EXIF IFD 1 with additional tag to provoke re-writing. */ - if (!TIFFSetField(tif, EXIFTAG_FLASH, 44)) - { - fprintf(stderr, "Can't set EXIFTAG_FLASH tag. Testline %d\n", __LINE__); - goto failure; - } - if (!TIFFWriteCustomDirectory(tif, &offsetEXIFNew[1])) - { - fprintf(stderr, - "TIFFWriteCustomDirectory() with EXIF failed. Testline %d\n", - __LINE__); - goto failure; - } - /* Check: EXIF IFD 1 should be overwritten because should be at EOF. */ - if (offsetEXIFBase[1] != offsetEXIFNew[1]) - { - fprintf(stderr, - "Failure: EXIF IFD 1 offset has changed from 0x%" PRIx64 - " (%" PRIu64 ") to 0x %" PRIx64 " (%" PRIu64 ").Testline %d\n ", - offsetEXIFBase[1], offsetEXIFBase[1], offsetEXIFNew[1], - offsetEXIFNew[1], __LINE__); - goto failure; - } - - /* Now enlarge and re-write EXIF IFD 0. */ - if (!TIFFReadEXIFDirectory(tif, offsetEXIFBase[0])) - { - fprintf(stderr, - "Can't read EXIF directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s. Testline %d\n", - offsetEXIFBase[0], offsetEXIFBase[0], filename, __LINE__); - goto failure; - } - /* Enlarge EXIF IFD 0 with additional tag to provoke re-writing. */ - if (!TIFFSetField(tif, EXIFTAG_SPECTRALSENSITIVITY, - "EXIF-0-enlargement-EXIF")) - { - fprintf(stderr, - "Can't set EXIFTAG_SPECTRALSENSITIVITY tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteCustomDirectory(tif, &offsetEXIFNew[0])) - { - fprintf(stderr, - "TIFFWriteCustomDirectory() with EXIF failed. Testline %d\n", - __LINE__); - goto failure; - } - - /* Check: EXIF-IFD 0 shall now be re-written. */ - if (offsetEXIFBase[0] == offsetEXIFNew[0]) - { - fprintf(stderr, - "Failure: EXIF IFD 0 offset has NOT changed from 0x%" PRIx64 - " (%" PRIu64 "). Testline %d\n ", - offsetEXIFBase[0], offsetEXIFBase[0], __LINE__); - goto failure; - } - else - { - /* EXIF-IFD has been re-written, thus offset in main-IFD needs - * update. */ - if (!TIFFSetDirectory(tif, 1)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", 1, - filename, __LINE__); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, offsetEXIFNew[0])) - { - fprintf(stderr, "Can't set TIFFTAG_EXIFIFD tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - } - - /*-- Make a little check. --*/ - if (!TIFFSetDirectory(tif, 1)) - { - fprintf(stderr, "Can't set directory 1 of %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 1, filename)) - { - goto failure; - } - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory 0 of %s. Line %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 0, filename)) - { - goto failure; - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_EXIF_enlargement --*/ - -/* Checks that SubIFDs on file can be overwritten if they have not grown. - * But SubIFDs cannot be re-written to another location in the file, - * because TIFFWriteDirectory() cannot determine from which main-IFD the SubIFD - * offset was taken for TIFFSetSubDirectory(). This shall result in an error - * return of TIFFWriteDirectory(). - */ -int test_SubIFD_enlargement(const char *filename, bool is_big_tiff) -{ - - /* Define the number of sub-IFDs you are going to write */ -#define NUMBER_OF_DIRS 2 -#define NUMBER_OF_SUBIFDs 3 - uint16_t number_of_sub_IFDs = NUMBER_OF_SUBIFDs; - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = { - 0UL}; /* array for SubIFD tag */ - - int i; - int blnWriteSubIFD = 0; - int iIFD = 0, iSubIFD = 0; - TIFFErrorHandler errHandler = NULL; - - uint64_t offsetBase[NUMBER_OF_DIRS]; - - /*-- Create a file and write NUMBER_OF_DIRS IFDs with - * NUMBER_OF_SUBIFDs SubIFDs to this file. --*/ - TIFF *tif = TIFFOpen(filename, is_big_tiff ? "w8" : "w"); - if (!tif) - { - fprintf(stderr, "Can't create %s. Testline %d\n", filename, __LINE__); - return 1; - } - - for (i = 0; i < NUMBER_OF_DIRS + NUMBER_OF_SUBIFDs; i++) - { - if (write_data_to_current_directory( - tif, WIDTH, LENGTH, FALSE, - blnWriteSubIFD ? 200 + iSubIFD++ : iIFD++, true, NULL, 0)) - { - fprintf( - stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - if (blnWriteSubIFD) - { - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE)) - goto failure; - } - - /* For the first multi-page image, trigger TIFFWriteDirectory() to - * switch for the next number_of_sub_IFDs calls to add those as SubIFDs - * e.g. for thumbnails */ - if (0 == i) - { - blnWriteSubIFD = 1; - /* Now here is the trick: the next n directories written - * will be sub-IFDs of the main-IFD (where n is number_of_sub_IFDs - * specified when you set the TIFFTAG_SUBIFD field. - * The SubIFD offset array sub_IFDs_offsets is filled automatically - * with the proper offset values by the following number_of_sub_IFDs - * TIFFWriteDirectory() calls and are updated in the related - * main-IFD with the last call. - */ - if (!TIFFSetField(tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - if (iSubIFD >= number_of_sub_IFDs) - blnWriteSubIFD = 0; - } - TIFFClose(tif); - - /* Reopen prepared testfile */ - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - goto failure; - } - - tdir_t numberOfMainIFDs = TIFFNumberOfDirectories(tif); - if (numberOfMainIFDs != - (tdir_t)(NUMBER_OF_DIRS + NUMBER_OF_SUBIFDs) - number_of_sub_IFDs) - { - fprintf(stderr, - "Unexpected number of directories in %s. Expected %i, " - "found %i.\n", - filename, NUMBER_OF_DIRS - number_of_sub_IFDs, - numberOfMainIFDs); - goto failure; - } - - /* Retrieve IFD offset values for later checking. */ - TIFFSetDirectory(tif, 1); - offsetBase[1] = TIFFCurrentDirOffset(tif); - TIFFSetDirectory(tif, 0); - offsetBase[0] = TIFFCurrentDirOffset(tif); - - /* The first directory is now read. */ - /* Check if there are SubIFD subfiles */ - void *ptr; - if (TIFFGetField(tif, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - } - /* Read first SubIFD directory */ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[0])) - goto failure; - if (!is_requested_directory(tif, 200 + 0, filename)) - { - goto failure; - } - /* Just overwrite SubIFD with smaller text. */ - if (!TIFFSetField(tif, TIFFTAG_PAGENAME, "99 th. X")) - { - fprintf(stderr, "Can't set TIFFTAG_PAGENAME tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - - /* Enlarging and re-writing SubIFD 1 shall fail. - * TIFFWriteDirectory() cannot determine from which main-IFD the SubIFD - * offset was taken for TIFFSetSubDirectory(). - * Therefore, SubIFD can be overwritten but cannot be re-written to another - * location in the file. - */ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[1])) - goto failure; - if (!TIFFSetField(tif, TIFFTAG_PAGENAME, - "Long Pagename to trigger re-writing")) - { - fprintf(stderr, "Can't set TIFFTAG_PAGENAME tag. Testline %d\n", - __LINE__); - goto failure; - } - /* Suppress error message from 'TIFFRewriteDirectory()' like - * 'Error fetching directory link' or 'Sanity check...'. */ - errHandler = TIFFSetErrorHandler(NULL); - if (TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Was expected to fail but succeeded. %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - TIFFSetErrorHandler(errHandler); - - /*-- Make a little check. --*/ - if (!TIFFSetDirectory(tif, 1)) - { - fprintf(stderr, "Can't set directory 1 of %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 1, filename)) - { - goto failure; - } - if (offsetBase[1] != TIFFCurrentDirOffset(tif)) - { - fprintf(stderr, "IFD 1 offset has moved. %s. Line %d\n", filename, - __LINE__); - goto failure; - } - - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory 0 of %s. Line %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 0, filename)) - { - goto failure; - } - if (offsetBase[0] != TIFFCurrentDirOffset(tif)) - { - fprintf(stderr, "IFD 0 offset has moved. %s. Line %d\n", filename, - __LINE__); - goto failure; - } - - /* Check SubIFDs */ - for (i = 0; i < NUMBER_OF_SUBIFDs; i++) - { - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[i])) - goto failure; - int k = (i == 0 ? 99 : 200 + i); - if (!is_requested_directory(tif, k, filename)) - { - fprintf(stderr, "Can't read SubIFD %d of %s correctly. Line %d\n", - k, filename, __LINE__); - goto failure; - } - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_SubIFD_enlargement --*/ - -/* Checks that sequences that use TIFFCheckpointDirectory() to store the current - * IFD in a file overwrite it if it has not grown, and write it to another - * location if the IFD size has grown. - */ -int test_CheckpointDirectory(const char *filename, bool is_big_tiff) -{ - - uint64_t auxUint64; - uint64_t offsetBase[2]; - uint64_t offsetNew[2]; - char auxString[128]; - - /*-- Create a file and write two IFDs directly to it --*/ - TIFF *tif = TIFFOpen(filename, is_big_tiff ? "w8" : "w"); - if (!tif) - { - fprintf(stderr, "Can't create %s. Testline %d\n", filename, __LINE__); - return 1; - } - - for (int i = 0; i < 2; i++) - { - /* Writing baseline images (IFDs) to file. */ - if (write_data_to_current_directory(tif, WIDTH, LENGTH, FALSE, i, true, - NULL, 0)) - { - fprintf( - stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* CheckpointDirectory testing */ - if (!TIFFCheckpointDirectory(tif)) - { - fprintf(stderr, - "Can't checkpoint directory %d of %s. Testline %d\n", i, - filename, __LINE__); - goto failure; - } - offsetBase[i] = offsetNew[i] = TIFFCurrentDirOffset(tif); - if (i == 1) - { - /* Provoke checkpointed IFD to be re-written by TIFFWriteDirectory() - * below. */ - sprintf(auxString, "%d th. IMG", i); - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, auxString)) - { - fprintf(stderr, - "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Check IFD offsets: - * First IFD shall be overwritten (same offset) and second IFD shall be - * re-written (different offset). */ - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", i, - filename, __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - if ((i == 0) && (auxUint64 != offsetBase[i])) - { - fprintf(stderr, - "Checkpointed offset 0x%" PRIx64 - " is different to finally written offset 0x%" PRIx64 - " Testline %d\n", - auxUint64, offsetBase[i], __LINE__); - goto failure; - } - else if ((i == 1) && (auxUint64 == offsetBase[i])) - { - fprintf(stderr, - "Checkpointed offset 0x%" PRIx64 - " is not different to finally written offset 0x%" PRIx64 - " Testline %d\n", - auxUint64, offsetBase[i], __LINE__); - goto failure; - } - /* Update offsetNew for later use. */ - offsetNew[i] = TIFFCurrentDirOffset(tif); - /* Because of TIFFSetDirectory() prepare now new empty IFD for next - * loop. */ - TIFFCreateDirectory(tif); - } - TIFFClose(tif); - - /* Reopen prepared testfile */ - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - goto failure; - } - - /* First IFD is read. Change something and checkpoint it several times. */ - /* Change IFD identification number string of PageName tag. */ - sprintf(auxString, "%d th. IFD", 9); - if (!TIFFSetField(tif, TIFFTAG_PAGENAME, auxString)) - { - fprintf(stderr, "Can't set TIFFTAG_PAGENAME tag.\n"); - return 1; - } - if (!TIFFCheckpointDirectory(tif)) - { - fprintf(stderr, "Can't checkpoint directory %d of %s. Testline %d\n", 0, - filename, __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - if (auxUint64 != offsetBase[0]) - { - fprintf(stderr, - "Checkpointed offset 0x%" PRIx64 - " is different to finally written offset 0x%" PRIx64 - " Testline %d\n", - auxUint64, offsetBase[0], __LINE__); - goto failure; - } - /* Provoke checkpointed IFD to be re-written due to additional tag in IFD 0. - */ - sprintf(auxString, "%d th. IMG YYY", 9); - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, auxString)) - { - fprintf(stderr, "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFCheckpointDirectory(tif)) - { - fprintf(stderr, "Can't checkpoint directory %d of %s. Testline %d\n", 0, - filename, __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - if (auxUint64 == offsetBase[0]) - { - fprintf(stderr, - "Checkpointed offset 0x%" PRIx64 - " is NOT different to finally written offset 0x%" PRIx64 - " Testline %d\n", - auxUint64, offsetBase[0], __LINE__); - goto failure; - } - offsetNew[0] = TIFFCurrentDirOffset(tif); - - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - - /* Close and reopen prepared testfile */ - TIFFClose(tif); - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - goto failure; - } - - /*-- Make a little check. --*/ - if (!TIFFSetDirectory(tif, 1)) - { - fprintf(stderr, "Can't set directory 1 of %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 1, filename)) - { - goto failure; - } - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory 0 of %s. Line %d\n", filename, - __LINE__); - goto failure; - } - if (!is_requested_directory(tif, 9, filename)) - { - goto failure; - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_CheckpointDirectory --*/ - -/* LibTIFF increments IFD write-pointer always to even addresses, thus leaving 1 - * byte gaps in the data space for data outside IFD entries. This routine - * checks correct handling for that. - */ -int test_OddDataSizes(const char *filename, unsigned int openMode) -{ - - uint64_t auxUint64; - uint64_t offsetBase; - - assert(openMode < (sizeof(modeStrings) / sizeof(modeStrings[0]))); - - /*-- Create a file and write IFDs directly to it --*/ - TIFF *tif = TIFFOpen(filename, modeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s. Testline %d\n", filename, __LINE__); - return 1; - } - - /* Write 15 byte field (14 byte + zero). - * Set it before other tags, otherwise it will be directly at EOF, - * because custom tag data are written in the sequence they are set. - * At EOF no gap will be inserted!*/ - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "123456789ABCDE")) - { - fprintf(stderr, "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - /* Writing baseline images (IFDs) to file. */ - if (write_data_to_current_directory(tif, WIDTH, LENGTH, FALSE, 0, TRUE, - NULL, 0)) - { - fprintf(stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - /* Now write some data so that IFD 0 ends not at EOF. */ - if (write_data_to_current_directory(tif, WIDTH, LENGTH, FALSE, 1, TRUE, - NULL, 0)) - { - fprintf(stderr, - "Can't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - - /* Now start odd / even data size testing with IFD 0 ...*/ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", 0, - filename, __LINE__); - goto failure; - } - offsetBase = TIFFCurrentDirOffset(tif); - - /* Write now 16 byte field (15 byte + zero), which shall be overwritten, - * because 1 byte "gap" could be used. */ - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "123456789ABCDEF")) - { - fprintf(stderr, "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - /* Check IFD offset: IFD shall be overwritten (same offset). */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", 0, - filename, __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - - if (auxUint64 != offsetBase) - { - fprintf(stderr, - "Odd to even data size: Offset 0x%" PRIx64 - " is different to first written offset 0x%" PRIx64 - " Testline %d\n", - auxUint64, offsetBase, __LINE__); - goto failure; - } - - /* Write now 17 byte field (16 byte + zero), which shall be re-written. */ - if (!TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, "123456789ABCDEFX")) - { - fprintf(stderr, "Can't set TIFFTAG_IMAGEDESCRIPTION tag. Testline %d\n", - __LINE__); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s. Testline %d\n", filename, - __LINE__); - goto failure; - } - /* Check IFD offset: IFD shall be re-written (different offset). */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "Can't set directory %d of %s. Testline %d\n", 0, - filename, __LINE__); - goto failure; - } - auxUint64 = TIFFCurrentDirOffset(tif); - - if (auxUint64 == offsetBase) - { - fprintf(stderr, - "Odd to even data size: Offset 0x%" PRIx64 " has NOT changed." - " Testline %d\n", - auxUint64, __LINE__); - goto failure; - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_OddDataSizes --*/ - -int main() -{ - - int retval = 0; - int retvalLast = 0; - int ntest = 0; - char filename[128] = {0}; - - /* clang-format off */ - fprintf(stderr,"==== Testing IFD enlargement (overwriting or re-writing of IFD). ====\n"); - for (int tiled = 0; tiled <= 1; tiled++) - { - for (int strileWriting = 0; strileWriting <= 1; strileWriting++) - { - for (unsigned int openMode = 0; openMode < 4; openMode++) - { - sprintf(filename, "test_ifd_enlargement_%02d_%s_%s%s.tif", ntest, - modeStrings[openMode], (tiled ? "TL" : "ST"), - (strileWriting ? "_strileW" : "")); - /* clang-format off */ - retval += test_IFD_enlargement(filename, openMode, strileWriting, 1, 1, 2, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 1, 6, 12, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 2, 1, 2, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 2, 6, 12, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 3, 1, 2, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 3, 6, 12, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 3, 40, 22, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 1, 20, 10, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 2, 20, 10, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - retval += test_IFD_enlargement(filename, openMode, strileWriting, 3, 20, 10, tiled); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED (openMode %s; strileWriting=%d; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], strileWriting, tiled); retvalLast = retval; } - /* clang-format on */ - } - } - } - /* clang-format off */ - - /* test EXIF IFD, SubIFD and IFD checkpointing */ - retval += test_EXIF_enlargement("test_ifd_EXIF_enlargement.tif", FALSE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - retval += test_EXIF_enlargement("test_ifd_EXIF_enlargementBig.tif", TRUE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - - retval += test_SubIFD_enlargement("test_SubIFD_enlargement.tif", FALSE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - retval += test_SubIFD_enlargement("test_SubIFD_enlargementBig.tif", TRUE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - - retval += test_CheckpointDirectory("test_CheckpointDirectory.tif", FALSE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - retval += test_CheckpointDirectory("test_CheckpointDirectoryBig.tif", TRUE); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - - retval += test_OddDataSizes("test_OddDataSizes.tif", 0); ntest++; - if (retval != retvalLast) { fprintf(stderr, " >>>> Test %d FAILED. <<<<\n\n", ntest); retvalLast = retval; } - - if (!retval) - { - fprintf(stderr, "==== Testing IFD enlargement finished OK. ====\n"); - } - else - { - fprintf(stderr, "==== Testing IFD enlargement finished with ERROR. ====\n"); - } - - return retval; -} diff --git a/third_party/libtiff/test/test_RGBAImage.c b/third_party/libtiff/test/test_RGBAImage.c deleted file mode 100644 index a216b9c..0000000 --- a/third_party/libtiff/test/test_RGBAImage.c +++ /dev/null @@ -1,1216 +0,0 @@ -/* - * TIFF Library - * - * Copyright (c) 2025, Su Laus @Su_Laus - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * the author may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of the author. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* =========== Purpose =============================================== - * - * Test file for the TFFRGBAImage functions. - * - * Test points are: - * - Tests are performed using RGB test-images. - * - Pixel orientation within "raster" of TIFFRGBAImageGet() and - * TIFFRGBAImage(). - * - Image data are always located at lower, left-hand part of the raster - * matrix. - * - Test for buffer overflows. - * - * Tests for following improvements: - * - Raster width can now be larger than image width. - * - Only image data are copied to raster buffer if tiles are padded. - * - Avoid buffer overflow if col_offset > 0. - * - If row_offset > 0 do not try to read after last row - avoiding warnings. - * - Feature "col_offset" and "row_offset" now works as expected. - * - */ - -#include "tif_config.h" - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -// #define DEBUG_TESTING -#ifdef DEBUG_TESTING -#define GOTOFAILURE \ - { \ - } -#else -/* Only for automake and CMake infrastructure the test should: - a.) delete any written testfiles when test passed - (otherwise autotest will fail) - b.) goto failure, if any failure is detected, which is not - necessary when test is initiated manually for debugging. -*/ -#define GOTOFAILURE goto failure; -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -/* Further tweak variables for this test module. */ -bool blnSpecialTest = FALSE; - -/* Global parameter for writing to a logfile and/or to screen. */ -FILE *stdXOut = NULL; -bool blnStdOutToLogFile = FALSE; -bool blnQuiet = FALSE; - -#ifdef DEBUG_TESTING -const char *logFilename = "test_RGBAImage_log.txt"; -#else -const char *logFilename = NULL; -#endif -bool blnMultipleLogFiles = FALSE; -char *arrLogFilenames[] = { - "test_RGBAImage_log_1.txt", "test_RGBAImage_log_2.txt", - "test_RGBAImage_log_3.txt", "test_RGBAImage_log_4.txt"}; -FILE *fpLog = NULL; -bool blnPrintRasterToScreen = FALSE; - -/* Global values for write_data_to_current_directory() - * which are set only on purpose to different values. */ -uint16_t photometric = PHOTOMETRIC_RGB; -uint16_t planarconfig = PLANARCONFIG_CONTIG; -uint32_t rows_per_strip = 1; - -#ifndef TIFFmin -#define TIFFmax(A, B) ((A) > (B) ? (A) : (B)) -#define TIFFmin(A, B) ((A) < (B) ? (A) : (B)) -#endif - -/* Global settings -not save to change- */ -#define SPP 3 /* samples per pixel */ -#define BPS 8 /* bits per sample */ - -const char *modeStrings[] = {"wl", "wb", "w8l", "w8b"}; -const char *orientationStrings[] = { - "none", "TOPLEFT", /*1 row 0 top, col 0 lhs */ - "TOPRIGHT", /*2 row 0 top, col 0 rhs */ - "BOTRIGHT", /*3 row 0 bottom, col 0 rhs */ - "BOTLEFT", /*4 row 0 bottom, col 0 lhs */ - "LEFTTOP ", /*5 row 0 lhs, col 0 top */ - "RIGHTTOP", /*6 row 0 rhs, col 0 top */ - "RIGHTBOT", /*7 row 0 rhs, col 0 bottom */ - "LEFTBOT" /*8 row 0 lhs, col 0 bottom */ -}; - -/* Defines to have error checking but also clean and readable source code. */ - -#define TIFFSetField_M(tif, tag, value, filename, line) \ - if (!TIFFSetField(tif, tag, value)) \ - { \ - fprintf(stdXOut, "Can't set tag %d (%s) for %s at line %d\n", tag, \ - filename, TIFFFieldName(TIFFFieldWithTag(tif, tag)), line); \ - goto failure; \ - } - -#define TIFFGetField_M(tif, tag, value, filename, line) \ - if (!TIFFGetField(tif, tag, value)) \ - { \ - fprintf(stdXOut, "Can't get tag %d (%s) for %s at line %d\n", tag, \ - filename, TIFFFieldName(TIFFFieldWithTag(tif, tag)), line); \ - goto failure; \ - } - -#define TIFFOpen_M(tif, filename, modeString, line) \ - tif = TIFFOpen(filename, modeString); \ - if (!tif) \ - { \ - fprintf(stdXOut, "Can't create %s. Testline %d\n", filename, \ - __LINE__); \ - return 1; \ - } - -#define TIFFWriteDirectory_M(tif, filename, line) \ - if (!TIFFWriteDirectory(tif)) \ - { \ - fprintf(stdXOut, "Can't write directory to %s at line %d\n", filename, \ - line); \ - goto failure; \ - } - -#define TIFFCheckpointDirectory_M(tif, dirnum, filename, line) \ - if (!TIFFCheckpointDirectory(tif)) \ - { \ - fprintf(stdXOut, "Can't checkpoint directory %d of %s at line %d\n", \ - dirnum, filename, line); \ - goto failure; \ - } - -#define TIFFSetDirectory_M(tif, dirnum, filename, line) \ - if (!TIFFSetDirectory(tif, dirnum)) \ - { \ - fprintf(stdXOut, "Can't set directory %d of %s at line %d\n", dirnum, \ - filename, line); \ - goto failure; \ - } - -#define TIFFWriteScanline_M(tif, buf, row, sample, filename, line) \ - if (TIFFWriteScanline(tif, buf, row, sample) == -1) \ - { \ - fprintf( \ - stdXOut, \ - "Can't write image data scanline %d sample %d of %s at line %d\n", \ - row, sample, filename, line); \ - goto failure; \ - } - -/* Writes some pixel data as scanline or tiles to file. - */ -int write_image_data(TIFF *tif, uint32_t width, uint32_t length, bool tiled, - unsigned int pixval, unsigned char *plastlinedata, - unsigned int lastlinebytesmax) -{ - size_t bufLen; - unsigned char *pbufLine = NULL; - unsigned int bpsmod = (1 << BPS); - uint32_t tlwidth; - uint32_t tllength; - tmsize_t tlsize; - - uint16_t planarconfig, samples_per_pixel; - uint32_t rows_per_strip = 0; - - (void)pixval; - - const char *filename = TIFFFileName(tif); - - TIFFGetField_M(tif, TIFFTAG_PLANARCONFIG, &planarconfig, filename, - __LINE__); - TIFFGetField_M(tif, TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel, filename, - __LINE__); - - if (tiled) - { - TIFFGetField_M(tif, TIFFTAG_TILEWIDTH, &tlwidth, filename, __LINE__); - TIFFGetField_M(tif, TIFFTAG_TILELENGTH, &tllength, filename, __LINE__); - /* For tiled mode get size of a tile in bytes */ - tlsize = TIFFTileSize(tif); - bufLen = (size_t)tlsize; - } - else - { - TIFFGetField_M(tif, TIFFTAG_ROWSPERSTRIP, &rows_per_strip, filename, - __LINE__); - /* For strip mode get size of a row in bytes */ - bufLen = (((size_t)width * SPP * BPS) + 7) / 8; - } - - pbufLine = _TIFFmalloc(bufLen); - if (pbufLine == NULL) - return 1; - - /* Write dummy pixel data. */ - if (tiled) - { - /* With SEPARATE, the complete image of each color is written one after - * the other. */ - uint32_t numtiles = TIFFNumberOfTiles(tif); - uint32_t this_spp = - (planarconfig < PLANARCONFIG_SEPARATE ? 0 : (SPP - 1)); - uint32_t last_width = width % tlwidth; - uint32_t tiles_per_row = width / tlwidth + (last_width > 0 ? 1 : 0); - uint32_t last_length = length % tllength; - uint32_t tiles_per_col = length / tllength + (last_length > 0 ? 1 : 0); - /* Correct values for following processing at special case. */ - if (last_width == 0) - last_width = tlwidth; - if (last_length == 0) - last_length = tllength; - - uint32_t i, j, k, s, row, this_tlwidth, this_tllength; - uint32_t coltile, rowtile; - for (s = 0; s <= this_spp; s++) - { - for (coltile = 0; coltile < tiles_per_col; coltile++) - { - if (coltile < (tiles_per_col - 1)) - this_tllength = tllength; - else - this_tllength = last_length; - for (rowtile = 0; rowtile < tiles_per_row; rowtile++) - { - if (rowtile < (tiles_per_row - 1)) - this_tlwidth = tlwidth; - else - this_tlwidth = last_width; - j = 0; - for (row = 0; row < this_tllength; row++) - { - /* Fill tile buffer. */ - for (k = 0; (k < this_tlwidth); k++) - { - if (planarconfig < PLANARCONFIG_SEPARATE || s == 0) - pbufLine[j++] = - (unsigned char)((row + coltile * tllength) % - bpsmod); /* row */ - if (planarconfig < PLANARCONFIG_SEPARATE || s == 1) - pbufLine[j++] = - (unsigned char)((k + rowtile * tlwidth) % - bpsmod); /* column */ - if (planarconfig < PLANARCONFIG_SEPARATE || s == 2) - pbufLine[j++] = (unsigned char)((254) % bpsmod); - } - /* Fill rest of row in last tile with zeros. */ - for (; (k < tlwidth); k++) - { - if (planarconfig < PLANARCONFIG_SEPARATE || s == 0) - pbufLine[j++] = 0; /* row */ - if (planarconfig < PLANARCONFIG_SEPARATE || s == 1) - pbufLine[j++] = 0; /* column */ - if (planarconfig < PLANARCONFIG_SEPARATE || s == 2) - pbufLine[j++] = - (unsigned char)((0xcc) % bpsmod); - } - } /* row */ - /* Calculate tile-number for TIFFWriteEncodedTile(). */ - i = s * tiles_per_row * tiles_per_col + - coltile * tiles_per_row + rowtile; - if (TIFFWriteEncodedTile(tif, i, pbufLine, 0) == -1) - { - fprintf(stdXOut, - "Can't write image data tile. Testline %d\n", - __LINE__); - return 1; - } - if ((plastlinedata != NULL) && (i == (numtiles - 1))) - { - memcpy(plastlinedata, pbufLine, - TIFFmin(bufLen, (size_t)lastlinebytesmax)); - } - } /* rowtile */ - } /* coltile */ - } /* s sample in pixel */ - } - else - { - /*== STRIP ==*/ - uint32_t i; - /* Fill image buffer. */ - uint32_t k, j; - uint16_t s; - if (planarconfig == PLANARCONFIG_CONTIG) - { - for (i = 0; i < length; i++) - { - for (k = 0, j = 0; k < width && j <= (bufLen - SPP); - k++, j += SPP) - { - pbufLine[j] = (unsigned char)((i) % bpsmod); /* row */ - pbufLine[j + 1] = - (unsigned char)((k) % bpsmod); /* column */ - pbufLine[j + 2] = (unsigned char)((254) % bpsmod); - } - TIFFWriteScanline_M(tif, pbufLine, i, 0, filename, __LINE__); - } - } - else - { - /* SEPARATE - RRRR GGGGG BBBBB, each all lines per strip */ - for (i = 0; i < length; i += rows_per_strip) - { - for (s = 0; s < samples_per_pixel; s++) - { - for (j = 0; j < rows_per_strip; j++) - { - for (k = 0; k < width; k++) - { - if (s == 0) - pbufLine[k] = - (unsigned char)((i + j) % bpsmod); /* row */ - else if (s == 1) - pbufLine[k] = - (unsigned char)((k) % bpsmod); /* column */ - else if (s == 2) - pbufLine[k] = (unsigned char)((254) % bpsmod); - } - TIFFWriteScanline_M(tif, pbufLine, (i + j), s, filename, - __LINE__); - } - } - } - } - if ((plastlinedata != NULL) && (i == (length - 1))) - { - memcpy(plastlinedata, pbufLine, - TIFFmin(bufLen, (size_t)lastlinebytesmax)); - } - } /* -- strip --*/ - _TIFFfree(pbufLine); - return 0; -failure: - return 1; -} /*-- write_image_data() --*/ - -/* Fills the active IFD with some default values and writes - * an image with given number of lines as strips (scanlines) or tiles to - * file. - */ -int write_data_to_current_directory(TIFF *tif, uint32_t width, uint32_t length, - bool tiled, uint16_t orientation, - bool write_data, - unsigned char *plastlinedata, - unsigned int lastlinebytesmax) -{ - if (!tif) - { - fprintf(stdXOut, "Invalid TIFF handle. Line %d\n", __LINE__); - return 1; - } - const char *filename = TIFFFileName(tif); - TIFFSetField_M(tif, TIFFTAG_IMAGEWIDTH, width, filename, __LINE__); - TIFFSetField_M(tif, TIFFTAG_IMAGELENGTH, length, filename, __LINE__); - TIFFSetField_M(tif, TIFFTAG_BITSPERSAMPLE, BPS, filename, __LINE__); - TIFFSetField_M(tif, TIFFTAG_SAMPLESPERPIXEL, SPP, filename, __LINE__); - - if (tiled) - { - /* Tilesizes must be multiple of 16. */ - TIFFSetField_M(tif, TIFFTAG_TILEWIDTH, 16, filename, __LINE__); - TIFFSetField_M(tif, TIFFTAG_TILELENGTH, 16, filename, __LINE__); - } - else - { - TIFFSetField_M(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip, filename, - __LINE__); - } - - TIFFSetField_M(tif, TIFFTAG_PLANARCONFIG, planarconfig, filename, __LINE__); - TIFFSetField_M(tif, TIFFTAG_PHOTOMETRIC, photometric, filename, __LINE__); - /* Write Orientation tag. */ - TIFFSetField_M(tif, TIFFTAG_ORIENTATION, orientation, filename, __LINE__); - - /* Write dummy pixel data. */ - if (write_data) - { - if (write_image_data(tif, width, length, tiled, 99, plastlinedata, - lastlinebytesmax)) - { - fprintf(stdXOut, "Can't write image data. Testline %d\n", __LINE__); - return 1; - } - } - return 0; - -failure: - return 1; -} /*-- write_data_to_current_directory() --*/ - -/* Some defines for TIFFRGBAImage raster data handling. */ -#define A1 (((uint32_t)0xffL) << 24) -#define PACK(r, g, b) \ - ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16) | A1) - -#define RASTER_MEMSETVAL 0xba - -/* Check some contents of the raster buffer. Ensure they are correctly filled. - */ -int checkRasterContents(char *txt, TIFFRGBAImage *img, uint32_t *raster, - uint32_t rw, uint32_t rh, uint16_t orientation) -{ - /* For this test, the image pixel samples are set for R= row, G= column, B= - * 0xfe and the last raster component is 0xff. The raster is preset with - * 0xbe. In general, according to documentation: - * - If the raster height is greater than that of the image, then the image - * data are placed in the lower part of the raster. - * - If the raster width is greater than that of the image, then the image - * data are placed in the left part of the raster. - */ - typedef union - { - uint8_t u8[4]; - uint32_t u32; - } RasterPixel; - typedef struct - { - uint32_t x; - uint32_t y; - } Coordinate; - - (void)txt; - - /* Exit for special test case */ - if (rh == 0 || rw == 0) - return 0; - - /* When image is cropped, or raster is larger than image, determine crop - * lengths for image within raster. */ - uint32_t rwmin = TIFFmin(rw, img->width - img->col_offset); - uint32_t rhmin = TIFFmin(rh, img->height - img->row_offset); - /* When there is a col_offset or row_offset, the image pixels of the corners - * are differently. */ - uint32_t xcol_start = img->col_offset; - uint32_t xrow_start = img->row_offset; - - /* Pixel values of image corner pixels according to image dimensions written - * in write_image_data(). Pixel values are set to (rowIdx, colIdx, 0xfe). - * The first pixel stored in the file is P0 with I0=(0,0,0xfe); - * the last pixel of the first data row is P1 with I1=(0,imgWidth-1,0xfe); - * the first pixel of the last row is P2 with I2=(imgLength-1,0,0xfe) and - * the last pixel of the last row is P3 with - * I3=(imgLength-1,imgWidth-1,0xfe). P/I are arranged in Z-order: P0---P1 - * P2---P3 - * I01 is value of row-0 and col-1 or in image coordinates x=1, y=0. - */ - RasterPixel I[8]; - /* Without offsets: */ - // I[0].u32 = PACK(0, 0, 0xfe); - // I[1].u32 = PACK(0, rwmin - 1, 0xfe); - // I[2].u32 = PACK(rhmin - 1, 0, 0xfe); - // I[3].u32 = PACK(rhmin - 1, rwmin - 1, 0xfe); - /* With offsets: */ - I[0].u32 = PACK(xrow_start, xcol_start, 0xfe); - I[1].u32 = PACK(xrow_start, xcol_start + rwmin - 1, 0xfe); - I[2].u32 = PACK(xrow_start + rhmin - 1, xcol_start, 0xfe); - I[3].u32 = PACK(xrow_start + rhmin - 1, xcol_start + rwmin - 1, 0xfe); - /* The value of the next pixels in the row (or behind) to the pixels P0 th - * P3 is: P0, P4 --- P1, P5 P2, P6 --- P3, P7 - */ - I[4].u32 = PACK(I[0].u8[0], I[0].u8[1] + 1, 0xfe); - I[5].u32 = PACK(RASTER_MEMSETVAL, RASTER_MEMSETVAL, RASTER_MEMSETVAL); - I[6].u32 = PACK(I[2].u8[2], I[2].u8[1] + 1, 0xfe); - I[7].u32 = PACK(RASTER_MEMSETVAL, RASTER_MEMSETVAL, RASTER_MEMSETVAL); - - /* Depending on orientation (and requested orientation) the input data are - * fliped horizontally and / or vertically. Without rotation, this leads to - * four possible orientations (locations of the first pixel from the image - * file). See tif_getimage.c setorientation(). If the raster matrix is - * larger than the image, the image data is stored in the lower-left part of - * the raster matrix. - * - * "firstPixelAt" gives the orientation of the data from file, stored in the - * raster matrix; i.e. the location of the first pixel from the file. - */ - - int firstPixelAt = - ORIENTATION_TOPLEFT; /* if data from file is not flipped */ - switch (orientation) - { - case ORIENTATION_TOPLEFT: - case ORIENTATION_LEFTTOP: - if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - firstPixelAt = ORIENTATION_TOPRIGHT; // FLIP_HORIZONTALLY - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - firstPixelAt = ORIENTATION_BOTRIGHT; // FLIP_HORIZONTALLY | - // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - firstPixelAt = ORIENTATION_BOTLEFT; // FLIP_VERTICALLY; - break; - case ORIENTATION_TOPRIGHT: - case ORIENTATION_RIGHTTOP: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - firstPixelAt = ORIENTATION_TOPRIGHT; // FLIP_HORIZONTALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - firstPixelAt = ORIENTATION_BOTLEFT; // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - firstPixelAt = ORIENTATION_BOTRIGHT; // FLIP_HORIZONTALLY | - // FLIP_VERTICALLY; - break; - case ORIENTATION_BOTRIGHT: - case ORIENTATION_RIGHTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - firstPixelAt = ORIENTATION_BOTRIGHT; // FLIP_HORIZONTALLY | - // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - firstPixelAt = ORIENTATION_BOTLEFT; // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTLEFT || - img->req_orientation == ORIENTATION_LEFTBOT) - firstPixelAt = ORIENTATION_TOPRIGHT; // FLIP_HORIZONTALLY; - break; - case ORIENTATION_BOTLEFT: - case ORIENTATION_LEFTBOT: - if (img->req_orientation == ORIENTATION_TOPLEFT || - img->req_orientation == ORIENTATION_LEFTTOP) - firstPixelAt = ORIENTATION_BOTLEFT; // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_TOPRIGHT || - img->req_orientation == ORIENTATION_RIGHTTOP) - firstPixelAt = ORIENTATION_BOTRIGHT; // FLIP_HORIZONTALLY | - // FLIP_VERTICALLY; - else if (img->req_orientation == ORIENTATION_BOTRIGHT || - img->req_orientation == ORIENTATION_RIGHTBOT) - firstPixelAt = ORIENTATION_TOPRIGHT; // FLIP_HORIZONTALLY; - break; - default: /* NOTREACHED */ - break; - } - - /* Determine position in raster-matrix (0..rw-1 / 0..rh-1) - * If the raster matrix is larger than the image, the image data is stored - * in the lower-left part of the raster matrix. - * P0 to P3 are image corner in Z-order sequence within raster matrix: - * P0---P1 - * P2---P3 - */ - Coordinate P[8]; - switch (firstPixelAt) - { - case ORIENTATION_TOPLEFT: - P[0].x = 0; - P[0].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[1].x = rwmin - 1; - P[1].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[2].x = 0; - P[2].y = rh - 1; - P[3].x = rwmin - 1; - P[3].y = rh - 1; - break; - case ORIENTATION_TOPRIGHT: - P[0].x = rwmin - 1; - P[0].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[1].x = 0; - P[1].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[2].x = rwmin - 1; - P[2].y = rh - 1; - P[3].x = 0; - P[3].y = rh - 1; - break; - case ORIENTATION_BOTRIGHT: - P[0].x = rwmin - 1; - P[0].y = rh - 1; - P[1].x = 0; - P[1].y = rh - 1; - P[2].x = rwmin - 1; - P[2].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[3].x = 0; - P[3].y = TIFFmax(0, (tmsize_t)rh - rhmin); - break; - case ORIENTATION_BOTLEFT: - P[0].x = 0; - P[0].y = rh - 1; - P[1].x = rwmin - 1; - P[1].y = rh - 1; - P[2].x = 0; - P[2].y = TIFFmax(0, (tmsize_t)rh - rhmin); - P[3].x = rwmin - 1; - P[3].y = TIFFmax(0, (tmsize_t)rh - rhmin); - break; - default: /* NOTREACHED */ - fprintf(stdXOut, "Error in SWITCH statement at line %d", __LINE__); - goto failure; - break; - } - - /* Determine offset of P[i] into the raster of uint32_t: */ - uint32_t roff[8]; -#define NUMP 4 - for (int i = 0; i < NUMP; i++) - { - roff[i] = P[i].y * rw + P[i].x; - } - - /* Check value of corner pixels at expected location in raster. */ - RasterPixel a; - for (int i = 0; i < NUMP; i++) - { - a.u32 = raster[roff[i]]; - if (a.u32 != I[i].u32) - { - fprintf(stdXOut, - "\nPixel value of P%d = (%d, %d, %d)/(%02x, %02x, %02x) in " - "raster at offset %d does not match expected value " - "(%d, " - "%d, %d)/(%02x, %02x, %02x)", - i, a.u8[0], a.u8[1], a.u8[2], a.u8[0], a.u8[1], a.u8[2], - roff[i], I[i].u8[0], I[i].u8[1], I[i].u8[2], I[i].u8[0], - I[i].u8[1], I[i].u8[2]); - goto failure; - } - } - return 0; - -failure: - return 1; -} /*-- checkRasterContents() --*/ - -/* Prints the raster buffer 2D matrix as hex to display and/or to file. */ -void printRaster(char *txt, TIFFRGBAImage *img, uint32_t *raster, uint32_t rw, - uint32_t rh, uint16_t orientation, bool tiled) -{ - uint32_t h, w; - FILE *fp = NULL; - union - { - uint8_t u8[4]; - uint32_t u32; - } u; - char straux[2048]; - - /* If fpLog is already open, don't open and close that file. */ - if (fpLog != NULL) - fp = fpLog; - else if (logFilename != NULL) - fp = fopen(logFilename, "a"); - - if (img->col_offset != 0 || img->row_offset != 0) - { - sprintf(straux, - "\n--- (%3d /%3d) Orientation = %d (%s) %s, %s readWidth = %d, " - "readLength = %d, col_off = %d, row_off = %d, " - "req_orientation=%d (%s) using %s---\n", - img->width, img->height, orientation, - orientationStrings[orientation], - (planarconfig == 1 ? "CONTIG" : "SEPARATE"), - (tiled ? "TILED" : "STRIP"), rw, rh, img->col_offset, - img->row_offset, img->req_orientation, - orientationStrings[img->req_orientation], txt); - } - else - { - sprintf(straux, - "\n--- (%3d /%3d) Orientation = %d (%s) %s, %s readWidth = %d, " - "readLength = %d, req_orientation=%d (%s) using " - "%s---\n", - img->width, img->height, orientation, - orientationStrings[orientation], - (planarconfig == 1 ? "CONTIG" : "SEPARATE"), - (tiled ? "TILED" : "STRIP"), rw, rh, img->req_orientation, - orientationStrings[img->req_orientation], txt); - } - if (fp != NULL) - fprintf(fp, "%s", straux); - if (blnPrintRasterToScreen) - fprintf(stdout, "%s", straux); - for (h = 0; h < rh; h++) - { - for (w = 0; w < rw; w++) - { - u.u32 = raster[h * rw + w]; - sprintf(straux, "%02x %02x %02x %02x ", u.u8[0], u.u8[1], u.u8[2], - u.u8[3]); - if (fp != NULL) - fprintf(fp, "%s", straux); - if (blnPrintRasterToScreen) - fprintf(stdout, "%s", straux); - } - sprintf(straux, "\n"); - if (fp != NULL) - fprintf(fp, "%s", straux); - if (blnPrintRasterToScreen) - fprintf(stdout, "%s", straux); - } - sprintf(straux, "--------------\n"); - if (fp != NULL) - { - fprintf(fp, "%s", straux); - if (fpLog == NULL) - fclose(fp); - } - if (blnPrintRasterToScreen) - fprintf(stdout, "%s", straux); - return; -} /*-- printRaster() --*/ - -/* Calls TIFFRGBAImageGet() and TIFFReadRGBAImage() with given raster sizes and - * reads the data from file into that raster. The raster content of both - * functions is printed and checked. - */ -int testRGBAImageReadFunctions(TIFF *tif, uint32_t imgWidth, uint32_t imgLength, - uint32_t rWidth, uint32_t rHeight, - uint16_t orientation, uint16_t req_orientation, - int cLine) -{ - int ret; - uint32_t *raster1 = NULL; - uint32_t *raster2 = NULL; - char emsg[1024] = ""; - TIFFRGBAImage img; - int ok; - - /* Just for debugging output in printRaster() */ - bool tiledlocal = TIFFIsTiled(tif); - - tmsize_t rasterSize = sizeof(uint32_t) * rWidth * rHeight; - if (rasterSize == 0) - { - rasterSize = sizeof(uint32_t) * imgWidth * imgLength; - } - raster1 = (uint32_t *)_TIFFmalloc(rasterSize); - raster2 = (uint32_t *)_TIFFmalloc(rasterSize); - if (raster1 == NULL || raster2 == NULL) - { - fprintf(stdXOut, - "Can't allocate 'raster'-buffer. Testline %d called from %d\n", - __LINE__, cLine); - goto failure; - } - memset(raster1, RASTER_MEMSETVAL, rasterSize); - memset(raster2, RASTER_MEMSETVAL, rasterSize); - - if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) - { - img.req_orientation = req_orientation; - ok = TIFFRGBAImageGet(&img, raster1, rWidth, rHeight); - printRaster("TIFFRGBAImageGet()", &img, raster1, rWidth, rHeight, - orientation, tiledlocal); - TIFFRGBAImageEnd(&img); - if (ok != 1) - { - fprintf(stdXOut, - "TIFFRGBAImageGet() returned failure. Testline %d called " - "from %d\n", - __LINE__, cLine); - goto failure; - } - if ((ret = checkRasterContents("TIFFRGBAImageGet()", &img, raster1, - rWidth, rHeight, orientation))) - goto failure; - } - - _TIFFfree(raster1); - _TIFFfree(raster2); - return 0; - -failure: - if (raster1) - _TIFFfree(raster1); - if (raster2) - _TIFFfree(raster2); - return 1; -} /*-- testRGBAImageReadFunctions() --*/ - -/* Calls TIFFRGBAImageGet() with col_offset and row_offset and with a given - * raster and reads the data from file into that raster. The raster content is - * printed and checked. - */ -int testRGBAImageReadWithOffsets(TIFF *tif, uint32_t imgWidth, - uint32_t imgLength, int w_offset, int l_offset, - uint32_t rWidth, uint32_t rHeight, - uint16_t orientation, uint16_t req_orientation, - int cLine) -{ - int ret; - uint32_t *raster1 = NULL; - char emsg[1024] = ""; - TIFFRGBAImage img; - int ok; - - /* Just for debugging output in printRaster() */ - bool tiledlocal = TIFFIsTiled(tif); - - tmsize_t rasterSize = sizeof(uint32_t) * rWidth * rHeight; - if (rasterSize == 0) - { - rasterSize = sizeof(uint32_t) * imgWidth * imgLength; - } - raster1 = (uint32_t *)_TIFFmalloc(rasterSize); - if (raster1 == NULL) - { - fprintf(stdXOut, - "Can't allocate 'raster'-buffer. Testline %d called from %d\n", - __LINE__, cLine); - goto failure; - } - memset(raster1, RASTER_MEMSETVAL, rasterSize); - - if (TIFFRGBAImageBegin(&img, tif, 0, emsg)) - { - img.req_orientation = req_orientation; - img.col_offset = w_offset; - img.row_offset = l_offset; - ok = TIFFRGBAImageGet(&img, raster1, rWidth, rHeight); - printRaster("TIFFRGBAImageGet()", &img, raster1, rWidth, rHeight, - orientation, tiledlocal); - TIFFRGBAImageEnd(&img); - if (ok != 1) - { - if (!blnQuiet) - fprintf(stdXOut, - "TIFFRGBAImageGet() returned failure in test with " - "offsets. Testline %d called from %d\n", - __LINE__, cLine); - goto failure; - } - if ((ret = checkRasterContents("TIFFRGBAImageGet()", &img, raster1, - rWidth, rHeight, orientation))) - goto failure; - } - _TIFFfree(raster1); - return 0; - -failure: - if (raster1) - _TIFFfree(raster1); - return 1; -} /*-- testRGBAImageReadWithOffsets() --*/ - -/* Tests TIFFReadRGBAImage functions with different raster sizes, col_offset, - * row_offset and required orientations in the raster. - */ -int test_ReadRGBAImage(const char *filename, unsigned int openMode, - uint16_t orientation, uint32_t width, uint32_t length, - bool tiled, unsigned int req_orientation) -{ - - int ret; - TIFFErrorHandler errHandler = NULL; - - assert(openMode < (sizeof(modeStrings) / sizeof(modeStrings[0]))); - assert(orientation < - (sizeof(orientationStrings) / sizeof(orientationStrings[0]))); - blnQuiet = FALSE; - -#ifdef DEBUG_TESTING - fprintf(stdXOut, - "\n==== test_ReadRGBAImage() - sequence --- Orientation = %d (%s) " - "%s, %s ====\n", - orientation, orientationStrings[orientation], - (planarconfig == 1 ? "CONTIG" : "SEPARATE"), - (tiled ? "TILED" : "STRIP")); -#else - fprintf(stdXOut, "."); -#endif - /*-- Create a file and write numIFDs IFDs directly to it --*/ - TIFF *tif = TIFFOpen(filename, modeStrings[openMode]); - if (!tif) - { - fprintf(stdXOut, "\nCan't create %s. Testline %d\n", filename, - __LINE__); - return 1; - } - - /* Writing baseline images (IFDs) to file. */ - if (write_data_to_current_directory(tif, width, length, tiled, orientation, - true, NULL, 0)) - { - fprintf(stdXOut, - "\nCan't write data to current directory in %s. Testline %d\n", - filename, __LINE__); - goto failure; - } - /* Write IFD tags to file (and setup new empty IFD). */ - TIFFWriteDirectory_M(tif, filename, __LINE__); - TIFFClose(tif); - TIFFOpen_M(tif, filename, "r", __LINE__); - - if (blnSpecialTest) - goto testcase; - - /*=== Test basic function TIFFRGBAImageGet() ===*/ - /* Full image */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width, length, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - - /* More lines - result will be different for NewCode - */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width, length + 2, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - - /* Less lines */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width, length - 1, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - - /* Less columns */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width - 3, length, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - - /* Less lines and less columns */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width - 5, - length - 1, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /* More columns. */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width + 2, length, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - - /* More rows and columns. */ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width + 2, - length + 2, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- Test an invalid raster size --*/ - if ((ret = testRGBAImageReadFunctions(tif, width, length, width, 0, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadFunctions(tif, width, length, 0, length, - orientation, req_orientation, - __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadFunctions(tif, width, length, 0, 0, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*=== Testing reading with OFFSETs in the image file; raster can then also - * be smaller ===*/ - /*-- row_offset --*/ -testcase: - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, 0, length - 1, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, 0, length - 4, - width, 4, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, 0, length - 4, - width, 2, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- col_offset --*/ - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, width - 2, 0, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, width - 2, 0, 2, - length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if ((ret = testRGBAImageReadWithOffsets(tif, width, length, width - 3, 0, 2, - length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- row_offset and col_offset --*/ - if ((ret = testRGBAImageReadWithOffsets( - tif, width, length, width - 4, length - 2, width, length, - orientation, req_orientation, __LINE__))) - GOTOFAILURE - - /* Here are some tests which are expected to fail. Suppress warning messages - * for them. */ - blnQuiet = TRUE; - errHandler = TIFFSetErrorHandler(NULL); - - /*-- row_offset --*/ - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, 0, length, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, 0, length + 5, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, 0, -10, width, - length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- col_offset --*/ - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, width, 0, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, width + 5, 0, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, -15, 0, width, - length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- row_offset and col_offset --*/ - if (!(ret = testRGBAImageReadWithOffsets(tif, width, length, -20, -30, - width, length, orientation, - req_orientation, __LINE__))) - GOTOFAILURE - - /*-- Leaving function --*/ - if (errHandler != NULL) - TIFFSetErrorHandler(errHandler); - TIFFClose(tif); -#ifndef DEBUG_TESTING - unlink(filename); -#endif - return 0; - -failure: - if (errHandler != NULL) - TIFFSetErrorHandler(errHandler); - if (tif) - TIFFClose(tif); - return 1; -} /*-- test_ReadRGBAImage() --*/ - -/* Dependent on the given output- and logging- flags, the logFile is opende or a - * new one is re-opened, and the stdXOut output is redirected from stderr to - * file. - */ -void checkOpenLogFile(int blnReOpen) -{ - /* First open logfile, if it does not exist, otherwise leave it as is except - * blnReOpen is set. */ - if (blnReOpen && fpLog != NULL) - { - fclose(fpLog); - fpLog = NULL; - } - - if (fpLog == NULL && logFilename != NULL) - { - fpLog = fopen(logFilename, "a"); - if (fpLog == NULL) - { - fprintf(stderr, "\nError: Could not open logfile %s.\n", - logFilename); - } - } - - /* Switch stdXOut to logFile, if ...*/ - if (blnStdOutToLogFile) - { - if (fpLog != NULL) - { - stdXOut = fpLog; - } - } - if (stdXOut == NULL) - { - fprintf(stderr, "\nError: stdXOut is NULL - exiting.\n"); - exit(10); - } - return; -} - -/* ============ MAIN =============== */ -int main() -{ - int retval = 0; - int retvalLast = 0; - int ntest = 0; - char filename[128] = {0}; - - if (logFilename != NULL) - { - unlink(logFilename); - if (blnMultipleLogFiles) - { - for (unsigned int i = 0; - i < (sizeof(arrLogFilenames) / sizeof(arrLogFilenames[0])); - i++) - { - unlink(arrLogFilenames[i]); - } - } - } - - /* Set default output to stderr. */ - stdXOut = stderr; - - /* If fprintf shall be redirected from stderr to logFile. */ - checkOpenLogFile(FALSE); - - /* Individual single testcase. */ - if (blnSpecialTest) - { - retval += - test_ReadRGBAImage("test_RGBAImage_xxx.tif", 0, 1, 8, 4, FALSE, 1); - return 0; - } - - fprintf(stdXOut, "==== Testing RGBAImage... ====\n"); - if (stdXOut != stderr) - fprintf(stderr, "==== Testing RGBAImage... ====\n"); - - unsigned int openMode = 0; - for (int tiled = 0; tiled <= 1; tiled++) - { - fprintf(stdXOut, - "\n---------------------------------------------" - "\n==== Testing %s with openMode = %s ====" - "\n---------------------------------------------\n", - (tiled ? "TILED" : "STRIP"), modeStrings[openMode]); - for (planarconfig = PLANARCONFIG_CONTIG; - planarconfig <= PLANARCONFIG_SEPARATE; planarconfig++) - { - if (blnMultipleLogFiles) - { - unsigned int n = tiled * 2 + (planarconfig - 1); - assert(n < - (sizeof(arrLogFilenames) / sizeof(arrLogFilenames[0]))); - logFilename = arrLogFilenames[n]; - checkOpenLogFile(TRUE); - } - for (unsigned int orientation = 1; orientation < 9; orientation++) - { - for (unsigned int req_orientation = 1; req_orientation < 9; - req_orientation++) - { - sprintf(filename, "test_RGBAImage_%02d_%s_%s_%s_%s-%s.tif", - ntest, modeStrings[openMode], (tiled ? "TL" : "ST"), - (planarconfig == 1 ? "CONTIG" : "SEPARATE"), - orientationStrings[orientation], - orientationStrings[req_orientation]); - /* clang-format off */ - retval += test_ReadRGBAImage(filename, openMode, orientation,8, 4, tiled, req_orientation); ntest++; - if (retval != retvalLast) { fprintf(stdXOut, " >>>> Test %d FAILED (openMode %s; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], tiled); retvalLast = retval; } - retval += test_ReadRGBAImage(filename, openMode, orientation,16, 16, tiled, req_orientation); ntest++; - if (retval != retvalLast) { fprintf(stdXOut, " >>>> Test %d FAILED (openMode %s; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], tiled); retvalLast = retval; } - retval += test_ReadRGBAImage(filename, openMode, orientation,31, 18, tiled, req_orientation); ntest++; - if (retval != retvalLast) { fprintf(stdXOut, " >>>> Test %d FAILED (openMode %s; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], tiled); retvalLast = retval; } - retval += test_ReadRGBAImage(filename, openMode, orientation,32, 32, tiled, req_orientation); ntest++; - if (retval != retvalLast) { fprintf(stdXOut, " >>>> Test %d FAILED (openMode %s; tiled=%d). <<<<\n\n", ntest, modeStrings[openMode], tiled); retvalLast = retval; } - /* clang-format on */ - } - } - } - } - - if (!retval) - { - fprintf(stdXOut, "\n==== Testing RGBAImage finished OK. ====\n"); - if (stdXOut != stderr) - fprintf(stderr, "\n==== Testing RGBAImage finished OK. ====\n"); - } - else - { - fprintf(stdXOut, - "\n==== Testing RGBAImage finished with ERROR. ====\n"); - if (stdXOut != stderr) - fprintf(stderr, - "\n==== Testing RGBAImage finished with ERROR. ====\n"); - } - - return retval; -} /*-- main() -- */ diff --git a/third_party/libtiff/test/test_append_to_strip.c b/third_party/libtiff/test/test_append_to_strip.c deleted file mode 100644 index ff790d8..0000000 --- a/third_party/libtiff/test/test_append_to_strip.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2022, Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Test TIFFAppendToStrip() through TIFFWriteRawStrip() - * Scenario of https://gitlab.com/libtiff/libtiff/-/issues/489 - */ - -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -int main() -{ - tmsize_t ret; - TIFF *tif = TIFFOpen("test_append_to_strip.tif", "w"); - if (tif == NULL) - { - fprintf(stderr, "Cannot create test_append_to_strip.tif"); - return 1; - } - ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 9); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 5); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - assert(ret); - ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - assert(ret); - int row; - for (row = 0; row < 9; ++row) - { - char c = (char)row; - int strip = (row < 5) ? 0 : 1; - ret = TIFFWriteRawStrip(tif, strip, &c, 1); - assert(ret == 1); - } - (void)ret; - TIFFClose(tif); - tif = TIFFOpen("test_append_to_strip.tif", "r"); - if (tif == NULL) - { - fprintf(stderr, "Cannot create test_append_to_strip.tif"); - return 1; - } - toff_t *panByteCounts = NULL; - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &panByteCounts); - assert(panByteCounts); - int exitCode = 0; - if (panByteCounts[0] != 5) - { - exitCode = 1; - fprintf(stderr, "panByteCounts[0] = %d. Expected 5.\n", - (int)panByteCounts[0]); - } - if (panByteCounts[1] != 4) - { - exitCode = 1; - fprintf(stderr, "panByteCounts[1] = %d. Expected 4.\n", - (int)panByteCounts[1]); - } - for (row = 0; row < 9; ++row) - { - char c; - TIFFReadScanline(tif, &c, row, 0); - if (c != row) - { - fprintf( - stderr, - "TIFFReadScanline() for scanline %d returned %d. %d expected\n", - row, c, row); - exitCode = 1; - } - } - TIFFClose(tif); - unlink("test_append_to_strip.tif"); - return exitCode; -} diff --git a/third_party/libtiff/test/test_arrays.c b/third_party/libtiff/test/test_arrays.c deleted file mode 100644 index bbddcba..0000000 --- a/third_party/libtiff/test/test_arrays.c +++ /dev/null @@ -1,734 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Numerical arrays used to test libtiff's read/write functions. - */ - -#include - -#include "test_arrays.h" - -const unsigned char byte_array1[XSIZE * YSIZE] = { - 86, 84, 86, 90, 89, 85, 90, 78, 77, 79, 75, 77, 79, 86, 87, - 83, 82, 87, 89, 88, 86, 87, 88, 87, 81, 84, 85, 85, 84, 86, - 88, 91, 96, 95, 97, 95, 89, 85, 82, 81, 88, 89, 85, 89, 83, - 74, 79, 76, 77, 80, 87, 87, 84, 84, 88, 90, 89, 87, 85, 87, - 88, 83, 80, 82, 84, 85, 87, 90, 95, 96, 95, 95, 92, 90, 85, - 81, 79, 84, 90, 87, 88, 88, 73, 79, 75, 76, 79, 88, 88, 87, - 85, 90, 92, 89, 88, 88, 87, 86, 84, 82, 82, 83, 87, 89, 93, - 94, 93, 93, 92, 92, 96, 85, 82, 76, 80, 88, 89, 88, 89, 73, - 80, 75, 75, 77, 89, 92, 93, 91, 89, 94, 92, 90, 89, 88, 84, - 84, 82, 82, 85, 88, 91, 94, 93, 93, 89, 90, 96, 96, 87, 83, - 75, 77, 83, 89, 90, 90, 74, 78, 76, 76, 76, 84, 94, 100, 89, - 92, 94, 92, 90, 89, 90, 85, 84, 83, 83, 87, 91, 92, 88, 92, - 91, 88, 90, 97, 95, 89, 83, 74, 77, 82, 84, 90, 92, 78, 72, - 76, 75, 75, 81, 95, 101, 95, 92, 95, 93, 90, 89, 90, 87, 86, - 84, 86, 88, 90, 90, 87, 90, 89, 90, 89, 98, 98, 92, 84, 75, - 76, 81, 81, 86, 91, 81, 72, 74, 74, 75, 81, 104, 108, 93, 92, - 95, 94, 88, 87, 89, 87, 85, 85, 88, 89, 93, 91, 88, 88, 91, - 88, 91, 106, 108, 93, 89, 78, 75, 77, 80, 85, 86, 85, 73, 72, - 73, 74, 79, 102, 101, 88, 92, 93, 91, 87, 87, 86, 87, 85, 86, - 88, 89, 94, 94, 90, 88, 85, 86, 98, 109, 113, 92, 93, 83, 76, - 74, 79, 84, 85, 81, 75, 72, 73, 74, 79, 105, 86, 86, 92, 96, - 98, 104, 86, 85, 85, 85, 88, 90, 90, 93, 92, 88, 87, 86, 89, - 97, 110, 109, 92, 93, 89, 78, 79, 78, 89, 84, 75, 76, 73, 72, - 73, 78, 105, 83, 82, 88, 83, 107, 95, 84, 85, 84, 86, 87, 90, - 91, 92, 90, 88, 87, 89, 90, 91, 99, 107, 96, 94, 91, 82, 84, - 86, 91, 87, 75, 74, 73, 73, 73, 77, 101, 86, 83, 89, 92, 99, - 98, 86, 86, 87, 83, 84, 89, 89, 92, 92, 92, 96, 96, 87, 91, - 90, 98, 96, 97, 94, 87, 88, 89, 92, 90, 79, 72, 73, 73, 74, - 77, 100, 92, 84, 86, 98, 100, 92, 87, 88, 88, 84, 83, 87, 89, - 91, 94, 94, 96, 93, 87, 87, 84, 109, 93, 92, 95, 92, 94, 93, - 92, 91, 82, 72, 73, 74, 74, 76, 95, 89, 85, 84, 102, 89, 85, - 88, 94, 86, 82, 83, 82, 91, 94, 97, 90, 92, 85, 90, 85, 79, - 125, 89, 96, 94, 90, 94, 95, 91, 91, 85, 76, 72, 73, 74, 75, - 88, 100, 83, 84, 84, 83, 85, 88, 90, 85, 84, 83, 84, 88, 92, - 93, 90, 89, 84, 90, 94, 79, 139, 93, 97, 97, 93, 92, 95, 91, - 90, 87, 81, 74, 73, 73, 74, 85, 97, 95, 95, 89, 86, 86, 92, - 87, 85, 84, 90, 86, 85, 91, 87, 87, 86, 93, 124, 140, 106, 143, - 101, 95, 97, 97, 96, 95, 84, 88, 87, 82, 78, 73, 73, 74, 82, - 92, 104, 95, 88, 89, 87, 89, 86, 85, 86, 87, 87, 81, 81, 83, - 91, 106, 131, 153, 151, 123, 133, 99, 101, 102, 99, 96, 90, 83, 82, - 85, 84, 79, 76, 74, 74, 78, 81, 89, 96, 90, 93, 88, 88, 86, - 88, 89, 95, 89, 82, 81, 85, 104, 118, 141, 160, 129, 137, 147, 103, - 104, 98, 99, 90, 88, 81, 76, 81, 83, 79, 77, 75, 75, 75, 76, - 80, 90, 94, 87, 86, 87, 92, 85, 85, 85, 87, 87, 89, 91, 112, - 115, 145, 154, 145, 141, 147, 106, 103, 100, 99, 92, 82, 78, 75, 78, - 81, 79, 77, 77, 78, 78, 76, 77, 81, 89, 87, 84, 84, 90, 86, - 85, 84, 80, 85, 97, 104, 119, 119, 149, 147, 144, 146, 152, 107, 105, - 103, 100, 93, 83, 78, 74, 74, 79, 78, 77, 76, 78, 80, 79, 76, - 78, 83, 84, 81, 81, 84, 83, 82, 78, 78, 85, 86, 97, 105, 114, - 145, 146, 148, 147, 150, 107, 105, 103, 97, 92, 84, 72, 72, 75, 77, - 76, 75, 76, 79, 80, 80, 77, 76, 82, 81, 80, 81, 80, 80, 80, - 77, 74, 74, 73, 77, 91, 110, 132, 141, 152, 152, 145, 107, 105, 103, - 96, 92, 86, 73, 71, 73, 75, 75, 76, 76, 78, 80, 80, 80, 98, - 80, 80, 82, 82, 80, 78, 76, 73, 71, 72, 71, 74, 80, 108, 119, - 136, 158, 142, 137, 107, 104, 101, 97, 85, 87, 75, 70, 70, 74, 74, - 75, 77, 78, 80, 82, 110, 117, 110, 78, 81, 83, 81, 78, 76, 73, - 71, 69, 68, 71, 74, 95, 120, 138, 148, 143, 139}; - -const size_t byte_array1_size = sizeof(byte_array1); - -const unsigned char byte_array2[YSIZE * XSIZE] = { - 77, 73, 76, 80, 79, 75, 82, 65, 62, 64, 59, 59, 61, 72, 70, - 67, 65, 70, 71, 70, 68, 66, 65, 67, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 65, 63, 63, 62, 75, 71, 71, 79, 81, 75, 81, 73, - 59, 65, 60, 60, 64, 73, 73, 68, 66, 70, 72, 71, 68, 66, 66, - 67, 66, 66, 66, 67, 67, 67, 66, 67, 66, 64, 63, 63, 63, 76, - 71, 66, 73, 81, 78, 80, 79, 59, 66, 60, 59, 62, 74, 74, 71, - 67, 70, 73, 71, 68, 66, 65, 65, 66, 66, 67, 67, 67, 67, 67, - 67, 66, 64, 64, 64, 64, 76, 72, 64, 68, 79, 81, 80, 80, 59, - 68, 60, 59, 60, 75, 75, 73, 67, 68, 73, 72, 68, 66, 65, 63, - 67, 67, 67, 67, 68, 67, 67, 66, 65, 64, 65, 65, 65, 79, 72, - 63, 66, 73, 80, 83, 82, 60, 65, 61, 61, 60, 66, 75, 75, 65, - 70, 73, 72, 68, 66, 65, 64, 68, 67, 68, 68, 68, 67, 67, 66, - 65, 65, 65, 66, 65, 81, 73, 62, 65, 72, 74, 82, 85, 66, 59, - 62, 60, 60, 63, 75, 76, 68, 69, 72, 72, 68, 66, 66, 65, 67, - 68, 68, 68, 68, 68, 66, 66, 64, 66, 65, 66, 66, 84, 74, 64, - 64, 70, 71, 78, 84, 70, 58, 60, 59, 59, 63, 75, 80, 73, 67, - 72, 72, 68, 66, 66, 65, 66, 68, 68, 68, 68, 68, 66, 65, 65, - 65, 66, 67, 68, 87, 81, 66, 63, 65, 68, 76, 76, 75, 59, 58, - 59, 59, 60, 71, 92, 65, 64, 74, 72, 69, 67, 65, 65, 65, 68, - 69, 68, 69, 67, 65, 65, 65, 65, 67, 68, 69, 86, 86, 73, 64, - 62, 67, 75, 76, 70, 61, 58, 58, 59, 60, 81, 68, 59, 63, 74, - 90, 99, 67, 65, 65, 64, 67, 68, 68, 68, 67, 65, 65, 66, 65, - 66, 68, 68, 85, 85, 80, 66, 67, 67, 81, 74, 62, 63, 59, 58, - 58, 60, 93, 61, 59, 59, 68, 115, 76, 67, 66, 64, 64, 66, 68, - 68, 68, 66, 65, 65, 66, 65, 64, 65, 69, 90, 87, 83, 71, 74, - 77, 83, 79, 63, 60, 59, 59, 58, 58, 90, 61, 59, 59, 67, 80, - 71, 68, 66, 64, 63, 63, 68, 68, 68, 66, 65, 66, 67, 65, 64, - 62, 87, 91, 92, 86, 76, 78, 81, 85, 82, 67, 59, 59, 59, 59, - 60, 88, 72, 59, 60, 74, 80, 70, 67, 66, 64, 62, 60, 65, 68, - 67, 66, 65, 67, 66, 64, 62, 59, 111, 84, 84, 87, 85, 87, 85, - 84, 84, 72, 59, 59, 59, 59, 59, 73, 71, 62, 59, 100, 70, 70, - 67, 66, 64, 60, 58, 58, 67, 68, 66, 65, 66, 64, 63, 59, 56, - 131, 80, 90, 87, 83, 88, 89, 84, 83, 76, 64, 59, 59, 59, 58, - 59, 97, 64, 62, 71, 68, 70, 73, 66, 63, 61, 58, 58, 62, 67, - 66, 64, 65, 63, 63, 61, 57, 149, 86, 91, 92, 87, 85, 88, 83, - 81, 78, 69, 61, 59, 59, 59, 59, 61, 83, 72, 67, 67, 69, 69, - 66, 64, 61, 72, 56, 57, 64, 64, 64, 64, 65, 115, 150, 93, 151, - 97, 89, 91, 92, 89, 88, 74, 80, 78, 71, 65, 59, 58, 59, 58, - 59, 71, 72, 67, 70, 70, 69, 67, 64, 63, 66, 56, 54, 57, 59, - 64, 87, 139, 162, 160, 128, 141, 94, 96, 97, 94, 89, 82, 71, 70, - 76, 73, 67, 61, 59, 59, 58, 59, 61, 71, 67, 75, 70, 68, 70, - 65, 63, 63, 59, 56, 54, 55, 90, 121, 149, 168, 138, 144, 157, 99, - 100, 93, 93, 82, 80, 70, 62, 70, 72, 67, 63, 60, 60, 58, 58, - 60, 68, 70, 70, 69, 68, 79, 68, 64, 62, 60, 59, 57, 57, 88, - 120, 151, 162, 154, 149, 155, 103, 99, 95, 94, 84, 73, 67, 62, 65, - 69, 67, 64, 63, 64, 63, 59, 60, 65, 71, 69, 69, 67, 78, 65, - 63, 61, 59, 61, 60, 68, 100, 128, 155, 155, 152, 155, 164, 104, 102, - 99, 95, 86, 74, 67, 61, 61, 66, 65, 63, 63, 64, 65, 63, 60, - 63, 70, 69, 67, 67, 67, 65, 62, 60, 58, 57, 62, 58, 71, 117, - 150, 154, 157, 155, 163, 104, 101, 99, 91, 84, 74, 59, 59, 62, 64, - 63, 61, 62, 64, 64, 64, 61, 60, 69, 68, 67, 69, 67, 65, 62, - 59, 58, 57, 57, 56, 59, 104, 137, 147, 159, 161, 158, 104, 101, 99, - 90, 85, 77, 60, 57, 60, 62, 62, 62, 63, 64, 65, 65, 66, 100, - 67, 67, 69, 69, 67, 65, 63, 60, 58, 56, 54, 55, 56, 77, 122, - 142, 166, 157, 150, 104, 101, 97, 92, 77, 79, 64, 57, 57, 62, 62, - 62, 64, 65, 66, 65, 115, 138, 129, 64, 68, 70, 68, 66, 64, 60, - 58, 56, 53, 53, 56, 62, 115, 143, 157, 156, 159}; - -const size_t byte_array2_size = sizeof(byte_array2); - -const unsigned char byte_array3[YSIZE * XSIZE] = { - 211, 221, 216, 201, 205, 216, 195, 236, 244, 237, 250, 250, 248, 218, 223, - 232, 236, 224, 221, 221, 227, 231, 232, 227, 229, 227, 227, 225, 227, 225, - 226, 226, 226, 228, 234, 234, 234, 216, 226, 228, 205, 200, 214, 198, 215, - 250, 233, 247, 250, 242, 219, 220, 229, 235, 225, 217, 220, 227, 232, 230, - 228, 229, 228, 227, 224, 225, 223, 226, 225, 226, 230, 233, 233, 234, 213, - 227, 237, 220, 200, 204, 202, 201, 248, 231, 246, 250, 245, 214, 215, 223, - 232, 225, 218, 218, 225, 230, 232, 231, 229, 227, 225, 224, 223, 226, 224, - 225, 228, 229, 230, 232, 231, 215, 223, 242, 233, 206, 200, 201, 197, 250, - 227, 250, 249, 248, 211, 212, 216, 233, 229, 216, 218, 225, 230, 232, 237, - 226, 224, 224, 223, 225, 225, 224, 225, 228, 229, 231, 229, 231, 208, 220, - 247, 238, 221, 202, 194, 194, 245, 237, 247, 247, 249, 234, 210, 212, 237, - 222, 219, 217, 226, 229, 232, 235, 222, 222, 223, 223, 223, 224, 224, 227, - 226, 229, 229, 228, 231, 200, 221, 247, 239, 224, 217, 196, 189, 229, 248, - 245, 248, 250, 241, 210, 210, 230, 225, 218, 218, 224, 230, 230, 229, 224, - 222, 222, 222, 222, 223, 225, 226, 231, 226, 228, 229, 230, 191, 216, 246, - 245, 226, 228, 207, 191, 221, 251, 248, 249, 251, 245, 214, 214, 233, 229, - 217, 217, 224, 229, 230, 229, 225, 220, 223, 221, 222, 224, 224, 227, 230, - 227, 226, 229, 230, 187, 199, 238, 248, 242, 231, 213, 211, 209, 246, 248, - 251, 251, 250, 226, 215, 236, 237, 217, 215, 222, 226, 229, 229, 227, 222, - 222, 223, 222, 225, 227, 228, 226, 227, 228, 228, 230, 188, 189, 221, 243, - 247, 237, 215, 209, 223, 241, 248, 248, 250, 248, 228, 234, 251, 239, 219, - 210, 205, 224, 229, 228, 230, 221, 223, 223, 222, 226, 229, 228, 224, 227, - 229, 230, 232, 190, 190, 201, 235, 236, 238, 198, 214, 243, 238, 248, 248, - 250, 249, 215, 244, 250, 250, 240, 168, 220, 224, 228, 230, 231, 226, 221, - 224, 223, 226, 230, 227, 226, 226, 230, 233, 234, 179, 185, 195, 224, 215, - 210, 195, 204, 239, 245, 250, 250, 252, 254, 216, 243, 249, 249, 233, 210, - 215, 223, 227, 230, 234, 234, 224, 223, 223, 227, 230, 226, 226, 228, 231, - 235, 212, 178, 174, 190, 211, 207, 199, 189, 194, 230, 250, 250, 250, 253, - 253, 222, 225, 250, 248, 218, 216, 217, 225, 226, 232, 239, 242, 229, 223, - 224, 229, 230, 225, 228, 230, 236, 241, 183, 194, 194, 185, 190, 185, 190, - 191, 191, 219, 250, 251, 250, 253, 254, 241, 225, 246, 249, 198, 217, 220, - 224, 225, 234, 241, 242, 246, 224, 223, 227, 229, 227, 228, 234, 237, 245, - 149, 203, 178, 182, 193, 185, 179, 191, 194, 211, 236, 252, 252, 254, 254, - 253, 192, 240, 244, 235, 224, 220, 229, 224, 236, 239, 243, 244, 236, 224, - 229, 230, 229, 231, 230, 233, 244, 128, 188, 177, 171, 184, 191, 182, 196, - 197, 208, 224, 247, 253, 255, 252, 250, 248, 226, 216, 228, 230, 220, 220, - 227, 234, 237, 231, 247, 244, 231, 231, 229, 228, 229, 182, 128, 196, 118, - 160, 182, 174, 172, 179, 183, 216, 203, 206, 220, 236, 253, 254, 253, 253, - 249, 225, 219, 232, 230, 220, 224, 227, 233, 237, 234, 244, 250, 245, 240, - 224, 212, 174, 123, 124, 176, 127, 171, 163, 161, 167, 177, 198, 221, 228, - 212, 215, 233, 245, 252, 255, 253, 252, 251, 223, 231, 216, 222, 227, 231, - 231, 234, 227, 238, 245, 249, 244, 210, 177, 124, 129, 134, 124, 113, 156, - 155, 172, 168, 197, 201, 224, 247, 224, 219, 233, 242, 249, 250, 252, 254, - 252, 230, 230, 224, 224, 225, 225, 227, 232, 232, 235, 239, 239, 241, 213, - 178, 131, 128, 128, 120, 114, 149, 157, 165, 168, 191, 218, 231, 246, 237, - 226, 234, 241, 243, 239, 244, 252, 249, 237, 225, 226, 224, 227, 220, 229, - 235, 235, 239, 238, 236, 230, 204, 177, 125, 131, 127, 117, 111, 146, 151, - 158, 166, 187, 215, 230, 246, 246, 231, 238, 243, 246, 243, 241, 244, 253, - 245, 226, 226, 229, 229, 229, 231, 236, 238, 241, 240, 241, 235, 224, 188, - 134, 123, 127, 116, 116, 144, 151, 158, 173, 190, 214, 251, 250, 243, 236, - 242, 249, 246, 241, 241, 244, 251, 251, 228, 230, 230, 226, 232, 231, 236, - 241, 243, 244, 243, 243, 235, 200, 150, 128, 122, 119, 117, 144, 151, 156, - 176, 190, 207, 246, 253, 244, 239, 244, 246, 244, 242, 240, 243, 249, 198, - 239, 234, 226, 226, 228, 234, 238, 241, 244, 245, 247, 250, 244, 219, 182, - 138, 118, 118, 116, 143, 150, 162, 173, 208, 205, 238, 253, 251, 241, 244, - 244, 242, 243, 238, 246, 193, 146, 173, 246, 231, 223, 230, 232, 236, 240, - 245, 247, 252, 252, 245, 233, 195, 138, 114, 118, 108}; - -const size_t byte_array3_size = sizeof(byte_array3); - -#ifdef _MSC_VER -/* suppress warning about shortening of "double" to "const float" */ -#pragma warning(disable : 4305) -#endif - -const float array_float1[YSIZE * XSIZE] = { - 234.866, 229.404, 234.866, 245.790, 243.059, 232.135, 245.790, 213.018, - 210.287, 215.749, 204.825, 210.287, 215.749, 234.866, 237.597, 226.673, - 223.942, 237.597, 243.059, 240.328, 234.866, 237.597, 240.328, 237.597, - 221.211, 229.404, 232.135, 232.135, 229.404, 234.866, 240.328, 248.521, - 262.176, 259.445, 264.907, 259.445, 243.059, 232.135, 223.942, 221.211, - 240.328, 243.059, 232.135, 243.059, 226.673, 202.094, 215.749, 207.556, - 210.287, 218.480, 237.597, 237.597, 229.404, 229.404, 240.328, 245.790, - 243.059, 237.597, 232.135, 237.597, 240.328, 226.673, 218.480, 223.942, - 229.404, 232.135, 237.597, 245.790, 259.445, 262.176, 259.445, 259.445, - 251.252, 245.790, 232.135, 221.211, 215.749, 229.404, 245.790, 237.597, - 240.328, 240.328, 199.363, 215.749, 204.825, 207.556, 215.749, 240.328, - 240.328, 237.597, 232.135, 245.790, 251.252, 243.059, 240.328, 240.328, - 237.597, 234.866, 229.404, 223.942, 223.942, 226.673, 237.597, 243.059, - 253.983, 256.714, 253.983, 253.983, 251.252, 251.252, 262.176, 232.135, - 223.942, 207.556, 218.480, 240.328, 243.059, 240.328, 243.059, 199.363, - 218.480, 204.825, 204.825, 210.287, 243.059, 251.252, 253.983, 248.521, - 243.059, 256.714, 251.252, 245.790, 243.059, 240.328, 229.404, 229.404, - 223.942, 223.942, 232.135, 240.328, 248.521, 256.714, 253.983, 253.983, - 243.059, 245.790, 262.176, 262.176, 237.597, 226.673, 204.825, 210.287, - 226.673, 243.059, 245.790, 245.790, 202.094, 213.018, 207.556, 207.556, - 207.556, 229.404, 256.714, 273.100, 243.059, 251.252, 256.714, 251.252, - 245.790, 243.059, 245.790, 232.135, 229.404, 226.673, 226.673, 237.597, - 248.521, 251.252, 240.328, 251.252, 248.521, 240.328, 245.790, 264.907, - 259.445, 243.059, 226.673, 202.094, 210.287, 223.942, 229.404, 245.790, - 251.252, 213.018, 196.632, 207.556, 204.825, 204.825, 221.211, 259.445, - 275.831, 259.445, 251.252, 259.445, 253.983, 245.790, 243.059, 245.790, - 237.597, 234.866, 229.404, 234.866, 240.328, 245.790, 245.790, 237.597, - 245.790, 243.059, 245.790, 243.059, 267.638, 267.638, 251.252, 229.404, - 204.825, 207.556, 221.211, 221.211, 234.866, 248.521, 221.211, 196.632, - 202.094, 202.094, 204.825, 221.211, 284.024, 294.948, 253.983, 251.252, - 259.445, 256.714, 240.328, 237.597, 243.059, 237.597, 232.135, 232.135, - 240.328, 243.059, 253.983, 248.521, 240.328, 240.328, 248.521, 240.328, - 248.521, 289.486, 294.948, 253.983, 243.059, 213.018, 204.825, 210.287, - 218.480, 232.135, 234.866, 232.135, 199.363, 196.632, 199.363, 202.094, - 215.749, 278.562, 275.831, 240.328, 251.252, 253.983, 248.521, 237.597, - 237.597, 234.866, 237.597, 232.135, 234.866, 240.328, 243.059, 256.714, - 256.714, 245.790, 240.328, 232.135, 234.866, 267.638, 297.679, 308.603, - 251.252, 253.983, 226.673, 207.556, 202.094, 215.749, 229.404, 232.135, - 221.211, 204.825, 196.632, 199.363, 202.094, 215.749, 286.755, 234.866, - 234.866, 251.252, 262.176, 267.638, 284.024, 234.866, 232.135, 232.135, - 232.135, 240.328, 245.790, 245.790, 253.983, 251.252, 240.328, 237.597, - 234.866, 243.059, 264.907, 300.410, 297.679, 251.252, 253.983, 243.059, - 213.018, 215.749, 213.018, 243.059, 229.404, 204.825, 207.556, 199.363, - 196.632, 199.363, 213.018, 286.755, 226.673, 223.942, 240.328, 226.673, - 292.217, 259.445, 229.404, 232.135, 229.404, 234.866, 237.597, 245.790, - 248.521, 251.252, 245.790, 240.328, 237.597, 243.059, 245.790, 248.521, - 270.369, 292.217, 262.176, 256.714, 248.521, 223.942, 229.404, 234.866, - 248.521, 237.597, 204.825, 202.094, 199.363, 199.363, 199.363, 210.287, - 275.831, 234.866, 226.673, 243.059, 251.252, 270.369, 267.638, 234.866, - 234.866, 237.597, 226.673, 229.404, 243.059, 243.059, 251.252, 251.252, - 251.252, 262.176, 262.176, 237.597, 248.521, 245.790, 267.638, 262.176, - 264.907, 256.714, 237.597, 240.328, 243.059, 251.252, 245.790, 215.749, - 196.632, 199.363, 199.363, 202.094, 210.287, 273.100, 251.252, 229.404, - 234.866, 267.638, 273.100, 251.252, 237.597, 240.328, 240.328, 229.404, - 226.673, 237.597, 243.059, 248.521, 256.714, 256.714, 262.176, 253.983, - 237.597, 237.597, 229.404, 297.679, 253.983, 251.252, 259.445, 251.252, - 256.714, 253.983, 251.252, 248.521, 223.942, 196.632, 199.363, 202.094, - 202.094, 207.556, 259.445, 243.059, 232.135, 229.404, 278.562, 243.059, - 232.135, 240.328, 256.714, 234.866, 223.942, 226.673, 223.942, 248.521, - 256.714, 264.907, 245.790, 251.252, 232.135, 245.790, 232.135, 215.749, - 341.375, 243.059, 262.176, 256.714, 245.790, 256.714, 259.445, 248.521, - 248.521, 232.135, 207.556, 196.632, 199.363, 202.094, 204.825, 240.328, - 273.100, 226.673, 229.404, 229.404, 226.673, 232.135, 240.328, 245.790, - 232.135, 229.404, 226.673, 229.404, 240.328, 251.252, 253.983, 245.790, - 243.059, 229.404, 245.790, 256.714, 215.749, 379.609, 253.983, 264.907, - 264.907, 253.983, 251.252, 259.445, 248.521, 245.790, 237.597, 221.211, - 202.094, 199.363, 199.363, 202.094, 232.135, 264.907, 259.445, 259.445, - 243.059, 234.866, 234.866, 251.252, 237.597, 232.135, 229.404, 245.790, - 234.866, 232.135, 248.521, 237.597, 237.597, 234.866, 253.983, 338.644, - 382.340, 289.486, 390.533, 275.831, 259.445, 264.907, 264.907, 262.176, - 259.445, 229.404, 240.328, 237.597, 223.942, 213.018, 199.363, 199.363, - 202.094, 223.942, 251.252, 284.024, 259.445, 240.328, 243.059, 237.597, - 243.059, 234.866, 232.135, 234.866, 237.597, 237.597, 221.211, 221.211, - 226.673, 248.521, 289.486, 357.761, 417.843, 412.381, 335.913, 363.223, - 270.369, 275.831, 278.562, 270.369, 262.176, 245.790, 226.673, 223.942, - 232.135, 229.404, 215.749, 207.556, 202.094, 202.094, 213.018, 221.211, - 243.059, 262.176, 245.790, 253.983, 240.328, 240.328, 234.866, 240.328, - 243.059, 259.445, 243.059, 223.942, 221.211, 232.135, 284.024, 322.258, - 385.071, 436.960, 352.299, 374.147, 401.457, 281.293, 284.024, 267.638, - 270.369, 245.790, 240.328, 221.211, 207.556, 221.211, 226.673, 215.749, - 210.287, 204.825, 204.825, 204.825, 207.556, 218.480, 245.790, 256.714, - 237.597, 234.866, 237.597, 251.252, 232.135, 232.135, 232.135, 237.597, - 237.597, 243.059, 248.521, 305.872, 314.065, 395.995, 420.574, 395.995, - 385.071, 401.457, 289.486, 281.293, 273.100, 270.369, 251.252, 223.942, - 213.018, 204.825, 213.018, 221.211, 215.749, 210.287, 210.287, 213.018, - 213.018, 207.556, 210.287, 221.211, 243.059, 237.597, 229.404, 229.404, - 245.790, 234.866, 232.135, 229.404, 218.480, 232.135, 264.907, 284.024, - 324.989, 324.989, 406.919, 401.457, 393.264, 398.726, 415.112, 292.217, - 286.755, 281.293, 273.100, 253.983, 226.673, 213.018, 202.094, 202.094, - 215.749, 213.018, 210.287, 207.556, 213.018, 218.480, 215.749, 207.556, - 213.018, 226.673, 229.404, 221.211, 221.211, 229.404, 226.673, 223.942, - 213.018, 213.018, 232.135, 234.866, 264.907, 286.755, 311.334, 395.995, - 398.726, 404.188, 401.457, 409.650, 292.217, 286.755, 281.293, 264.907, - 251.252, 229.404, 196.632, 196.632, 204.825, 210.287, 207.556, 204.825, - 207.556, 215.749, 218.480, 218.480, 210.287, 207.556, 223.942, 221.211, - 218.480, 221.211, 218.480, 218.480, 218.480, 210.287, 202.094, 202.094, - 199.363, 210.287, 248.521, 300.410, 360.492, 385.071, 415.112, 415.112, - 395.995, 292.217, 286.755, 281.293, 262.176, 251.252, 234.866, 199.363, - 193.901, 199.363, 204.825, 204.825, 207.556, 207.556, 213.018, 218.480, - 218.480, 218.480, 267.638, 218.480, 218.480, 223.942, 223.942, 218.480, - 213.018, 207.556, 199.363, 193.901, 196.632, 193.901, 202.094, 218.480, - 294.948, 324.989, 371.416, 431.498, 387.802, 374.147, 292.217, 284.024, - 275.831, 264.907, 232.135, 237.597, 204.825, 191.170, 191.170, 202.094, - 202.094, 204.825, 210.287, 213.018, 218.480, 223.942, 300.410, 319.527, - 300.410, 213.018, 221.211, 226.673, 221.211, 213.018, 207.556, 199.363, - 193.901, 188.439, 185.708, 193.901, 202.094, 259.445, 327.720, 376.878, - 404.188, 390.533, 379.609}; - -const size_t array_float1_size = sizeof(array_float1); - -const float array_float2[YSIZE * XSIZE] = { - 210.287, 199.363, 207.556, 218.480, 215.749, 204.825, 223.942, 177.515, - 169.322, 174.784, 161.129, 161.129, 166.591, 196.632, 191.170, 182.977, - 177.515, 191.170, 193.901, 191.170, 185.708, 180.246, 177.515, 182.977, - 180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246, - 180.246, 177.515, 172.053, 172.053, 169.322, 204.825, 193.901, 193.901, - 215.749, 221.211, 204.825, 221.211, 199.363, 161.129, 177.515, 163.860, - 163.860, 174.784, 199.363, 199.363, 185.708, 180.246, 191.170, 196.632, - 193.901, 185.708, 180.246, 180.246, 182.977, 180.246, 180.246, 180.246, - 182.977, 182.977, 182.977, 180.246, 182.977, 180.246, 174.784, 172.053, - 172.053, 172.053, 207.556, 193.901, 180.246, 199.363, 221.211, 213.018, - 218.480, 215.749, 161.129, 180.246, 163.860, 161.129, 169.322, 202.094, - 202.094, 193.901, 182.977, 191.170, 199.363, 193.901, 185.708, 180.246, - 177.515, 177.515, 180.246, 180.246, 182.977, 182.977, 182.977, 182.977, - 182.977, 182.977, 180.246, 174.784, 174.784, 174.784, 174.784, 207.556, - 196.632, 174.784, 185.708, 215.749, 221.211, 218.480, 218.480, 161.129, - 185.708, 163.860, 161.129, 163.860, 204.825, 204.825, 199.363, 182.977, - 185.708, 199.363, 196.632, 185.708, 180.246, 177.515, 172.053, 182.977, - 182.977, 182.977, 182.977, 185.708, 182.977, 182.977, 180.246, 177.515, - 174.784, 177.515, 177.515, 177.515, 215.749, 196.632, 172.053, 180.246, - 199.363, 218.480, 226.673, 223.942, 163.860, 177.515, 166.591, 166.591, - 163.860, 180.246, 204.825, 204.825, 177.515, 191.170, 199.363, 196.632, - 185.708, 180.246, 177.515, 174.784, 185.708, 182.977, 185.708, 185.708, - 185.708, 182.977, 182.977, 180.246, 177.515, 177.515, 177.515, 180.246, - 177.515, 221.211, 199.363, 169.322, 177.515, 196.632, 202.094, 223.942, - 232.135, 180.246, 161.129, 169.322, 163.860, 163.860, 172.053, 204.825, - 207.556, 185.708, 188.439, 196.632, 196.632, 185.708, 180.246, 180.246, - 177.515, 182.977, 185.708, 185.708, 185.708, 185.708, 185.708, 180.246, - 180.246, 174.784, 180.246, 177.515, 180.246, 180.246, 229.404, 202.094, - 174.784, 174.784, 191.170, 193.901, 213.018, 229.404, 191.170, 158.398, - 163.860, 161.129, 161.129, 172.053, 204.825, 218.480, 199.363, 182.977, - 196.632, 196.632, 185.708, 180.246, 180.246, 177.515, 180.246, 185.708, - 185.708, 185.708, 185.708, 185.708, 180.246, 177.515, 177.515, 177.515, - 180.246, 182.977, 185.708, 237.597, 221.211, 180.246, 172.053, 177.515, - 185.708, 207.556, 207.556, 204.825, 161.129, 158.398, 161.129, 161.129, - 163.860, 193.901, 251.252, 177.515, 174.784, 202.094, 196.632, 188.439, - 182.977, 177.515, 177.515, 177.515, 185.708, 188.439, 185.708, 188.439, - 182.977, 177.515, 177.515, 177.515, 177.515, 182.977, 185.708, 188.439, - 234.866, 234.866, 199.363, 174.784, 169.322, 182.977, 204.825, 207.556, - 191.170, 166.591, 158.398, 158.398, 161.129, 163.860, 221.211, 185.708, - 161.129, 172.053, 202.094, 245.790, 270.369, 182.977, 177.515, 177.515, - 174.784, 182.977, 185.708, 185.708, 185.708, 182.977, 177.515, 177.515, - 180.246, 177.515, 180.246, 185.708, 185.708, 232.135, 232.135, 218.480, - 180.246, 182.977, 182.977, 221.211, 202.094, 169.322, 172.053, 161.129, - 158.398, 158.398, 163.860, 253.983, 166.591, 161.129, 161.129, 185.708, - 314.065, 207.556, 182.977, 180.246, 174.784, 174.784, 180.246, 185.708, - 185.708, 185.708, 180.246, 177.515, 177.515, 180.246, 177.515, 174.784, - 177.515, 188.439, 245.790, 237.597, 226.673, 193.901, 202.094, 210.287, - 226.673, 215.749, 172.053, 163.860, 161.129, 161.129, 158.398, 158.398, - 245.790, 166.591, 161.129, 161.129, 182.977, 218.480, 193.901, 185.708, - 180.246, 174.784, 172.053, 172.053, 185.708, 185.708, 185.708, 180.246, - 177.515, 180.246, 182.977, 177.515, 174.784, 169.322, 237.597, 248.521, - 251.252, 234.866, 207.556, 213.018, 221.211, 232.135, 223.942, 182.977, - 161.129, 161.129, 161.129, 161.129, 163.860, 240.328, 196.632, 161.129, - 163.860, 202.094, 218.480, 191.170, 182.977, 180.246, 174.784, 169.322, - 163.860, 177.515, 185.708, 182.977, 180.246, 177.515, 182.977, 180.246, - 174.784, 169.322, 161.129, 303.141, 229.404, 229.404, 237.597, 232.135, - 237.597, 232.135, 229.404, 229.404, 196.632, 161.129, 161.129, 161.129, - 161.129, 161.129, 199.363, 193.901, 169.322, 161.129, 273.100, 191.170, - 191.170, 182.977, 180.246, 174.784, 163.860, 158.398, 158.398, 182.977, - 185.708, 180.246, 177.515, 180.246, 174.784, 172.053, 161.129, 152.936, - 357.761, 218.480, 245.790, 237.597, 226.673, 240.328, 243.059, 229.404, - 226.673, 207.556, 174.784, 161.129, 161.129, 161.129, 158.398, 161.129, - 264.907, 174.784, 169.322, 193.901, 185.708, 191.170, 199.363, 180.246, - 172.053, 166.591, 158.398, 158.398, 169.322, 182.977, 180.246, 174.784, - 177.515, 172.053, 172.053, 166.591, 155.667, 406.919, 234.866, 248.521, - 251.252, 237.597, 232.135, 240.328, 226.673, 221.211, 213.018, 188.439, - 166.591, 161.129, 161.129, 161.129, 161.129, 166.591, 226.673, 196.632, - 182.977, 182.977, 188.439, 188.439, 180.246, 174.784, 166.591, 196.632, - 152.936, 155.667, 174.784, 174.784, 174.784, 174.784, 177.515, 314.065, - 409.650, 253.983, 412.381, 264.907, 243.059, 248.521, 251.252, 243.059, - 240.328, 202.094, 218.480, 213.018, 193.901, 177.515, 161.129, 158.398, - 161.129, 158.398, 161.129, 193.901, 196.632, 182.977, 191.170, 191.170, - 188.439, 182.977, 174.784, 172.053, 180.246, 152.936, 147.474, 155.667, - 161.129, 174.784, 237.597, 379.609, 442.422, 436.960, 349.568, 385.071, - 256.714, 262.176, 264.907, 256.714, 243.059, 223.942, 193.901, 191.170, - 207.556, 199.363, 182.977, 166.591, 161.129, 161.129, 158.398, 161.129, - 166.591, 193.901, 182.977, 204.825, 191.170, 185.708, 191.170, 177.515, - 172.053, 172.053, 161.129, 152.936, 147.474, 150.205, 245.790, 330.451, - 406.919, 458.808, 376.878, 393.264, 428.767, 270.369, 273.100, 253.983, - 253.983, 223.942, 218.480, 191.170, 169.322, 191.170, 196.632, 182.977, - 172.053, 163.860, 163.860, 158.398, 158.398, 163.860, 185.708, 191.170, - 191.170, 188.439, 185.708, 215.749, 185.708, 174.784, 169.322, 163.860, - 161.129, 155.667, 155.667, 240.328, 327.720, 412.381, 442.422, 420.574, - 406.919, 423.305, 281.293, 270.369, 259.445, 256.714, 229.404, 199.363, - 182.977, 169.322, 177.515, 188.439, 182.977, 174.784, 172.053, 174.784, - 172.053, 161.129, 163.860, 177.515, 193.901, 188.439, 188.439, 182.977, - 213.018, 177.515, 172.053, 166.591, 161.129, 166.591, 163.860, 185.708, - 273.100, 349.568, 423.305, 423.305, 415.112, 423.305, 447.884, 284.024, - 278.562, 270.369, 259.445, 234.866, 202.094, 182.977, 166.591, 166.591, - 180.246, 177.515, 172.053, 172.053, 174.784, 177.515, 172.053, 163.860, - 172.053, 191.170, 188.439, 182.977, 182.977, 182.977, 177.515, 169.322, - 163.860, 158.398, 155.667, 169.322, 158.398, 193.901, 319.527, 409.650, - 420.574, 428.767, 423.305, 445.153, 284.024, 275.831, 270.369, 248.521, - 229.404, 202.094, 161.129, 161.129, 169.322, 174.784, 172.053, 166.591, - 169.322, 174.784, 174.784, 174.784, 166.591, 163.860, 188.439, 185.708, - 182.977, 188.439, 182.977, 177.515, 169.322, 161.129, 158.398, 155.667, - 155.667, 152.936, 161.129, 284.024, 374.147, 401.457, 434.229, 439.691, - 431.498, 284.024, 275.831, 270.369, 245.790, 232.135, 210.287, 163.860, - 155.667, 163.860, 169.322, 169.322, 169.322, 172.053, 174.784, 177.515, - 177.515, 180.246, 273.100, 182.977, 182.977, 188.439, 188.439, 182.977, - 177.515, 172.053, 163.860, 158.398, 152.936, 147.474, 150.205, 152.936, - 210.287, 333.182, 387.802, 453.346, 428.767, 409.650, 284.024, 275.831, - 264.907, 251.252, 210.287, 215.749, 174.784, 155.667, 155.667, 169.322, - 169.322, 169.322, 174.784, 177.515, 180.246, 177.515, 314.065, 376.878, - 352.299, 174.784, 185.708, 191.170, 185.708, 180.246, 174.784, 163.860, - 158.398, 152.936, 144.743, 144.743, 152.936, 169.322, 314.065, 390.533, - 428.767, 426.036, 434.229}; - -const size_t array_float2_size = sizeof(array_float2); - -const double array_double1[YSIZE * XSIZE] = { - 148.914762, 145.451628, 148.914762, 155.841030, 154.109463, 147.183195, - 155.841030, 135.062226, 133.330659, 136.793793, 129.867525, 133.330659, - 136.793793, 148.914762, 150.646329, 143.720061, 141.988494, 150.646329, - 154.109463, 152.377896, 148.914762, 150.646329, 152.377896, 150.646329, - 140.256927, 145.451628, 147.183195, 147.183195, 145.451628, 148.914762, - 152.377896, 157.572597, 166.230432, 164.498865, 167.961999, 164.498865, - 154.109463, 147.183195, 141.988494, 140.256927, 152.377896, 154.109463, - 147.183195, 154.109463, 143.720061, 128.135958, 136.793793, 131.599092, - 133.330659, 138.525360, 150.646329, 150.646329, 145.451628, 145.451628, - 152.377896, 155.841030, 154.109463, 150.646329, 147.183195, 150.646329, - 152.377896, 143.720061, 138.525360, 141.988494, 145.451628, 147.183195, - 150.646329, 155.841030, 164.498865, 166.230432, 164.498865, 164.498865, - 159.304164, 155.841030, 147.183195, 140.256927, 136.793793, 145.451628, - 155.841030, 150.646329, 152.377896, 152.377896, 126.404391, 136.793793, - 129.867525, 131.599092, 136.793793, 152.377896, 152.377896, 150.646329, - 147.183195, 155.841030, 159.304164, 154.109463, 152.377896, 152.377896, - 150.646329, 148.914762, 145.451628, 141.988494, 141.988494, 143.720061, - 150.646329, 154.109463, 161.035731, 162.767298, 161.035731, 161.035731, - 159.304164, 159.304164, 166.230432, 147.183195, 141.988494, 131.599092, - 138.525360, 152.377896, 154.109463, 152.377896, 154.109463, 126.404391, - 138.525360, 129.867525, 129.867525, 133.330659, 154.109463, 159.304164, - 161.035731, 157.572597, 154.109463, 162.767298, 159.304164, 155.841030, - 154.109463, 152.377896, 145.451628, 145.451628, 141.988494, 141.988494, - 147.183195, 152.377896, 157.572597, 162.767298, 161.035731, 161.035731, - 154.109463, 155.841030, 166.230432, 166.230432, 150.646329, 143.720061, - 129.867525, 133.330659, 143.720061, 154.109463, 155.841030, 155.841030, - 128.135958, 135.062226, 131.599092, 131.599092, 131.599092, 145.451628, - 162.767298, 173.156700, 154.109463, 159.304164, 162.767298, 159.304164, - 155.841030, 154.109463, 155.841030, 147.183195, 145.451628, 143.720061, - 143.720061, 150.646329, 157.572597, 159.304164, 152.377896, 159.304164, - 157.572597, 152.377896, 155.841030, 167.961999, 164.498865, 154.109463, - 143.720061, 128.135958, 133.330659, 141.988494, 145.451628, 155.841030, - 159.304164, 135.062226, 124.672824, 131.599092, 129.867525, 129.867525, - 140.256927, 164.498865, 174.888267, 164.498865, 159.304164, 164.498865, - 161.035731, 155.841030, 154.109463, 155.841030, 150.646329, 148.914762, - 145.451628, 148.914762, 152.377896, 155.841030, 155.841030, 150.646329, - 155.841030, 154.109463, 155.841030, 154.109463, 169.693566, 169.693566, - 159.304164, 145.451628, 129.867525, 131.599092, 140.256927, 140.256927, - 148.914762, 157.572597, 140.256927, 124.672824, 128.135958, 128.135958, - 129.867525, 140.256927, 180.082968, 187.009236, 161.035731, 159.304164, - 164.498865, 162.767298, 152.377896, 150.646329, 154.109463, 150.646329, - 147.183195, 147.183195, 152.377896, 154.109463, 161.035731, 157.572597, - 152.377896, 152.377896, 157.572597, 152.377896, 157.572597, 183.546102, - 187.009236, 161.035731, 154.109463, 135.062226, 129.867525, 133.330659, - 138.525360, 147.183195, 148.914762, 147.183195, 126.404391, 124.672824, - 126.404391, 128.135958, 136.793793, 176.619834, 174.888267, 152.377896, - 159.304164, 161.035731, 157.572597, 150.646329, 150.646329, 148.914762, - 150.646329, 147.183195, 148.914762, 152.377896, 154.109463, 162.767298, - 162.767298, 155.841030, 152.377896, 147.183195, 148.914762, 169.693566, - 188.740803, 195.667071, 159.304164, 161.035731, 143.720061, 131.599092, - 128.135958, 136.793793, 145.451628, 147.183195, 140.256927, 129.867525, - 124.672824, 126.404391, 128.135958, 136.793793, 181.814535, 148.914762, - 148.914762, 159.304164, 166.230432, 169.693566, 180.082968, 148.914762, - 147.183195, 147.183195, 147.183195, 152.377896, 155.841030, 155.841030, - 161.035731, 159.304164, 152.377896, 150.646329, 148.914762, 154.109463, - 167.961999, 190.472370, 188.740803, 159.304164, 161.035731, 154.109463, - 135.062226, 136.793793, 135.062226, 154.109463, 145.451628, 129.867525, - 131.599092, 126.404391, 124.672824, 126.404391, 135.062226, 181.814535, - 143.720061, 141.988494, 152.377896, 143.720061, 185.277669, 164.498865, - 145.451628, 147.183195, 145.451628, 148.914762, 150.646329, 155.841030, - 157.572597, 159.304164, 155.841030, 152.377896, 150.646329, 154.109463, - 155.841030, 157.572597, 171.425133, 185.277669, 166.230432, 162.767298, - 157.572597, 141.988494, 145.451628, 148.914762, 157.572597, 150.646329, - 129.867525, 128.135958, 126.404391, 126.404391, 126.404391, 133.330659, - 174.888267, 148.914762, 143.720061, 154.109463, 159.304164, 171.425133, - 169.693566, 148.914762, 148.914762, 150.646329, 143.720061, 145.451628, - 154.109463, 154.109463, 159.304164, 159.304164, 159.304164, 166.230432, - 166.230432, 150.646329, 157.572597, 155.841030, 169.693566, 166.230432, - 167.961999, 162.767298, 150.646329, 152.377896, 154.109463, 159.304164, - 155.841030, 136.793793, 124.672824, 126.404391, 126.404391, 128.135958, - 133.330659, 173.156700, 159.304164, 145.451628, 148.914762, 169.693566, - 173.156700, 159.304164, 150.646329, 152.377896, 152.377896, 145.451628, - 143.720061, 150.646329, 154.109463, 157.572597, 162.767298, 162.767298, - 166.230432, 161.035731, 150.646329, 150.646329, 145.451628, 188.740803, - 161.035731, 159.304164, 164.498865, 159.304164, 162.767298, 161.035731, - 159.304164, 157.572597, 141.988494, 124.672824, 126.404391, 128.135958, - 128.135958, 131.599092, 164.498865, 154.109463, 147.183195, 145.451628, - 176.619834, 154.109463, 147.183195, 152.377896, 162.767298, 148.914762, - 141.988494, 143.720061, 141.988494, 157.572597, 162.767298, 167.961999, - 155.841030, 159.304164, 147.183195, 155.841030, 147.183195, 136.793793, - 216.445875, 154.109463, 166.230432, 162.767298, 155.841030, 162.767298, - 164.498865, 157.572597, 157.572597, 147.183195, 131.599092, 124.672824, - 126.404391, 128.135958, 129.867525, 152.377896, 173.156700, 143.720061, - 145.451628, 145.451628, 143.720061, 147.183195, 152.377896, 155.841030, - 147.183195, 145.451628, 143.720061, 145.451628, 152.377896, 159.304164, - 161.035731, 155.841030, 154.109463, 145.451628, 155.841030, 162.767298, - 136.793793, 240.687813, 161.035731, 167.961999, 167.961999, 161.035731, - 159.304164, 164.498865, 157.572597, 155.841030, 150.646329, 140.256927, - 128.135958, 126.404391, 126.404391, 128.135958, 147.183195, 167.961999, - 164.498865, 164.498865, 154.109463, 148.914762, 148.914762, 159.304164, - 150.646329, 147.183195, 145.451628, 155.841030, 148.914762, 147.183195, - 157.572597, 150.646329, 150.646329, 148.914762, 161.035731, 214.714308, - 242.419380, 183.546102, 247.614081, 174.888267, 164.498865, 167.961999, - 167.961999, 166.230432, 164.498865, 145.451628, 152.377896, 150.646329, - 141.988494, 135.062226, 126.404391, 126.404391, 128.135958, 141.988494, - 159.304164, 180.082968, 164.498865, 152.377896, 154.109463, 150.646329, - 154.109463, 148.914762, 147.183195, 148.914762, 150.646329, 150.646329, - 140.256927, 140.256927, 143.720061, 157.572597, 183.546102, 226.835277, - 264.929751, 261.466617, 212.982741, 230.298411, 171.425133, 174.888267, - 176.619834, 171.425133, 166.230432, 155.841030, 143.720061, 141.988494, - 147.183195, 145.451628, 136.793793, 131.599092, 128.135958, 128.135958, - 135.062226, 140.256927, 154.109463, 166.230432, 155.841030, 161.035731, - 152.377896, 152.377896, 148.914762, 152.377896, 154.109463, 164.498865, - 154.109463, 141.988494, 140.256927, 147.183195, 180.082968, 204.324906, - 244.150947, 277.050720, 223.372143, 237.224679, 254.540349, 178.351401, - 180.082968, 169.693566, 171.425133, 155.841030, 152.377896, 140.256927, - 131.599092, 140.256927, 143.720061, 136.793793, 133.330659, 129.867525, - 129.867525, 129.867525, 131.599092, 138.525360, 155.841030, 162.767298, - 150.646329, 148.914762, 150.646329, 159.304164, 147.183195, 147.183195, - 147.183195, 150.646329, 150.646329, 154.109463, 157.572597, 193.935504, - 199.130205, 251.077215, 266.661318, 251.077215, 244.150947, 254.540349, - 183.546102, 178.351401, 173.156700, 171.425133, 159.304164, 141.988494, - 135.062226, 129.867525, 135.062226, 140.256927, 136.793793, 133.330659, - 133.330659, 135.062226, 135.062226, 131.599092, 133.330659, 140.256927, - 154.109463, 150.646329, 145.451628, 145.451628, 155.841030, 148.914762, - 147.183195, 145.451628, 138.525360, 147.183195, 167.961999, 180.082968, - 206.056473, 206.056473, 258.003483, 254.540349, 249.345648, 252.808782, - 263.198184, 185.277669, 181.814535, 178.351401, 173.156700, 161.035731, - 143.720061, 135.062226, 128.135958, 128.135958, 136.793793, 135.062226, - 133.330659, 131.599092, 135.062226, 138.525360, 136.793793, 131.599092, - 135.062226, 143.720061, 145.451628, 140.256927, 140.256927, 145.451628, - 143.720061, 141.988494, 135.062226, 135.062226, 147.183195, 148.914762, - 167.961999, 181.814535, 197.398638, 251.077215, 252.808782, 256.271916, - 254.540349, 259.735050, 185.277669, 181.814535, 178.351401, 167.961999, - 159.304164, 145.451628, 124.672824, 124.672824, 129.867525, 133.330659, - 131.599092, 129.867525, 131.599092, 136.793793, 138.525360, 138.525360, - 133.330659, 131.599092, 141.988494, 140.256927, 138.525360, 140.256927, - 138.525360, 138.525360, 138.525360, 133.330659, 128.135958, 128.135958, - 126.404391, 133.330659, 157.572597, 190.472370, 228.566844, 244.150947, - 263.198184, 263.198184, 251.077215, 185.277669, 181.814535, 178.351401, - 166.230432, 159.304164, 148.914762, 126.404391, 122.941257, 126.404391, - 129.867525, 129.867525, 131.599092, 131.599092, 135.062226, 138.525360, - 138.525360, 138.525360, 169.693566, 138.525360, 138.525360, 141.988494, - 141.988494, 138.525360, 135.062226, 131.599092, 126.404391, 122.941257, - 124.672824, 122.941257, 128.135958, 138.525360, 187.009236, 206.056473, - 235.493112, 273.587586, 245.882514, 237.224679, 185.277669, 180.082968, - 174.888267, 167.961999, 147.183195, 150.646329, 129.867525, 121.209690, - 121.209690, 128.135958, 128.135958, 129.867525, 133.330659, 135.062226, - 138.525360, 141.988494, 190.472370, 202.593339, 190.472370, 135.062226, - 140.256927, 143.720061, 140.256927, 135.062226, 131.599092, 126.404391, - 122.941257, 119.478123, 117.746556, 122.941257, 128.135958, 164.498865, - 207.788040, 238.956246, 256.271916, 247.614081, 240.687813}; - -const size_t array_double1_size = sizeof(array_double1); - -const double array_double2[YSIZE * XSIZE] = { - 133.330659, 126.404391, 131.599092, 138.525360, 136.793793, 129.867525, - 141.988494, 112.551855, 107.357154, 110.820288, 102.162453, 102.162453, - 105.625587, 124.672824, 121.209690, 116.014989, 112.551855, 121.209690, - 122.941257, 121.209690, 117.746556, 114.283422, 112.551855, 116.014989, - 114.283422, 114.283422, 114.283422, 114.283422, 114.283422, 114.283422, - 114.283422, 114.283422, 114.283422, 112.551855, 109.088721, 109.088721, - 107.357154, 129.867525, 122.941257, 122.941257, 136.793793, 140.256927, - 129.867525, 140.256927, 126.404391, 102.162453, 112.551855, 103.894020, - 103.894020, 110.820288, 126.404391, 126.404391, 117.746556, 114.283422, - 121.209690, 124.672824, 122.941257, 117.746556, 114.283422, 114.283422, - 116.014989, 114.283422, 114.283422, 114.283422, 116.014989, 116.014989, - 116.014989, 114.283422, 116.014989, 114.283422, 110.820288, 109.088721, - 109.088721, 109.088721, 131.599092, 122.941257, 114.283422, 126.404391, - 140.256927, 135.062226, 138.525360, 136.793793, 102.162453, 114.283422, - 103.894020, 102.162453, 107.357154, 128.135958, 128.135958, 122.941257, - 116.014989, 121.209690, 126.404391, 122.941257, 117.746556, 114.283422, - 112.551855, 112.551855, 114.283422, 114.283422, 116.014989, 116.014989, - 116.014989, 116.014989, 116.014989, 116.014989, 114.283422, 110.820288, - 110.820288, 110.820288, 110.820288, 131.599092, 124.672824, 110.820288, - 117.746556, 136.793793, 140.256927, 138.525360, 138.525360, 102.162453, - 117.746556, 103.894020, 102.162453, 103.894020, 129.867525, 129.867525, - 126.404391, 116.014989, 117.746556, 126.404391, 124.672824, 117.746556, - 114.283422, 112.551855, 109.088721, 116.014989, 116.014989, 116.014989, - 116.014989, 117.746556, 116.014989, 116.014989, 114.283422, 112.551855, - 110.820288, 112.551855, 112.551855, 112.551855, 136.793793, 124.672824, - 109.088721, 114.283422, 126.404391, 138.525360, 143.720061, 141.988494, - 103.894020, 112.551855, 105.625587, 105.625587, 103.894020, 114.283422, - 129.867525, 129.867525, 112.551855, 121.209690, 126.404391, 124.672824, - 117.746556, 114.283422, 112.551855, 110.820288, 117.746556, 116.014989, - 117.746556, 117.746556, 117.746556, 116.014989, 116.014989, 114.283422, - 112.551855, 112.551855, 112.551855, 114.283422, 112.551855, 140.256927, - 126.404391, 107.357154, 112.551855, 124.672824, 128.135958, 141.988494, - 147.183195, 114.283422, 102.162453, 107.357154, 103.894020, 103.894020, - 109.088721, 129.867525, 131.599092, 117.746556, 119.478123, 124.672824, - 124.672824, 117.746556, 114.283422, 114.283422, 112.551855, 116.014989, - 117.746556, 117.746556, 117.746556, 117.746556, 117.746556, 114.283422, - 114.283422, 110.820288, 114.283422, 112.551855, 114.283422, 114.283422, - 145.451628, 128.135958, 110.820288, 110.820288, 121.209690, 122.941257, - 135.062226, 145.451628, 121.209690, 100.430886, 103.894020, 102.162453, - 102.162453, 109.088721, 129.867525, 138.525360, 126.404391, 116.014989, - 124.672824, 124.672824, 117.746556, 114.283422, 114.283422, 112.551855, - 114.283422, 117.746556, 117.746556, 117.746556, 117.746556, 117.746556, - 114.283422, 112.551855, 112.551855, 112.551855, 114.283422, 116.014989, - 117.746556, 150.646329, 140.256927, 114.283422, 109.088721, 112.551855, - 117.746556, 131.599092, 131.599092, 129.867525, 102.162453, 100.430886, - 102.162453, 102.162453, 103.894020, 122.941257, 159.304164, 112.551855, - 110.820288, 128.135958, 124.672824, 119.478123, 116.014989, 112.551855, - 112.551855, 112.551855, 117.746556, 119.478123, 117.746556, 119.478123, - 116.014989, 112.551855, 112.551855, 112.551855, 112.551855, 116.014989, - 117.746556, 119.478123, 148.914762, 148.914762, 126.404391, 110.820288, - 107.357154, 116.014989, 129.867525, 131.599092, 121.209690, 105.625587, - 100.430886, 100.430886, 102.162453, 103.894020, 140.256927, 117.746556, - 102.162453, 109.088721, 128.135958, 155.841030, 171.425133, 116.014989, - 112.551855, 112.551855, 110.820288, 116.014989, 117.746556, 117.746556, - 117.746556, 116.014989, 112.551855, 112.551855, 114.283422, 112.551855, - 114.283422, 117.746556, 117.746556, 147.183195, 147.183195, 138.525360, - 114.283422, 116.014989, 116.014989, 140.256927, 128.135958, 107.357154, - 109.088721, 102.162453, 100.430886, 100.430886, 103.894020, 161.035731, - 105.625587, 102.162453, 102.162453, 117.746556, 199.130205, 131.599092, - 116.014989, 114.283422, 110.820288, 110.820288, 114.283422, 117.746556, - 117.746556, 117.746556, 114.283422, 112.551855, 112.551855, 114.283422, - 112.551855, 110.820288, 112.551855, 119.478123, 155.841030, 150.646329, - 143.720061, 122.941257, 128.135958, 133.330659, 143.720061, 136.793793, - 109.088721, 103.894020, 102.162453, 102.162453, 100.430886, 100.430886, - 155.841030, 105.625587, 102.162453, 102.162453, 116.014989, 138.525360, - 122.941257, 117.746556, 114.283422, 110.820288, 109.088721, 109.088721, - 117.746556, 117.746556, 117.746556, 114.283422, 112.551855, 114.283422, - 116.014989, 112.551855, 110.820288, 107.357154, 150.646329, 157.572597, - 159.304164, 148.914762, 131.599092, 135.062226, 140.256927, 147.183195, - 141.988494, 116.014989, 102.162453, 102.162453, 102.162453, 102.162453, - 103.894020, 152.377896, 124.672824, 102.162453, 103.894020, 128.135958, - 138.525360, 121.209690, 116.014989, 114.283422, 110.820288, 107.357154, - 103.894020, 112.551855, 117.746556, 116.014989, 114.283422, 112.551855, - 116.014989, 114.283422, 110.820288, 107.357154, 102.162453, 192.203937, - 145.451628, 145.451628, 150.646329, 147.183195, 150.646329, 147.183195, - 145.451628, 145.451628, 124.672824, 102.162453, 102.162453, 102.162453, - 102.162453, 102.162453, 126.404391, 122.941257, 107.357154, 102.162453, - 173.156700, 121.209690, 121.209690, 116.014989, 114.283422, 110.820288, - 103.894020, 100.430886, 100.430886, 116.014989, 117.746556, 114.283422, - 112.551855, 114.283422, 110.820288, 109.088721, 102.162453, 96.967752, - 226.835277, 138.525360, 155.841030, 150.646329, 143.720061, 152.377896, - 154.109463, 145.451628, 143.720061, 131.599092, 110.820288, 102.162453, - 102.162453, 102.162453, 100.430886, 102.162453, 167.961999, 110.820288, - 107.357154, 122.941257, 117.746556, 121.209690, 126.404391, 114.283422, - 109.088721, 105.625587, 100.430886, 100.430886, 107.357154, 116.014989, - 114.283422, 110.820288, 112.551855, 109.088721, 109.088721, 105.625587, - 98.699319, 258.003483, 148.914762, 157.572597, 159.304164, 150.646329, - 147.183195, 152.377896, 143.720061, 140.256927, 135.062226, 119.478123, - 105.625587, 102.162453, 102.162453, 102.162453, 102.162453, 105.625587, - 143.720061, 124.672824, 116.014989, 116.014989, 119.478123, 119.478123, - 114.283422, 110.820288, 105.625587, 124.672824, 96.967752, 98.699319, - 110.820288, 110.820288, 110.820288, 110.820288, 112.551855, 199.130205, - 259.735050, 161.035731, 261.466617, 167.961999, 154.109463, 157.572597, - 159.304164, 154.109463, 152.377896, 128.135958, 138.525360, 135.062226, - 122.941257, 112.551855, 102.162453, 100.430886, 102.162453, 100.430886, - 102.162453, 122.941257, 124.672824, 116.014989, 121.209690, 121.209690, - 119.478123, 116.014989, 110.820288, 109.088721, 114.283422, 96.967752, - 93.504618, 98.699319, 102.162453, 110.820288, 150.646329, 240.687813, - 280.513854, 277.050720, 221.640576, 244.150947, 162.767298, 166.230432, - 167.961999, 162.767298, 154.109463, 141.988494, 122.941257, 121.209690, - 131.599092, 126.404391, 116.014989, 105.625587, 102.162453, 102.162453, - 100.430886, 102.162453, 105.625587, 122.941257, 116.014989, 129.867525, - 121.209690, 117.746556, 121.209690, 112.551855, 109.088721, 109.088721, - 102.162453, 96.967752, 93.504618, 95.236185, 155.841030, 209.519607, - 258.003483, 290.903256, 238.956246, 249.345648, 271.856019, 171.425133, - 173.156700, 161.035731, 161.035731, 141.988494, 138.525360, 121.209690, - 107.357154, 121.209690, 124.672824, 116.014989, 109.088721, 103.894020, - 103.894020, 100.430886, 100.430886, 103.894020, 117.746556, 121.209690, - 121.209690, 119.478123, 117.746556, 136.793793, 117.746556, 110.820288, - 107.357154, 103.894020, 102.162453, 98.699319, 98.699319, 152.377896, - 207.788040, 261.466617, 280.513854, 266.661318, 258.003483, 268.392885, - 178.351401, 171.425133, 164.498865, 162.767298, 145.451628, 126.404391, - 116.014989, 107.357154, 112.551855, 119.478123, 116.014989, 110.820288, - 109.088721, 110.820288, 109.088721, 102.162453, 103.894020, 112.551855, - 122.941257, 119.478123, 119.478123, 116.014989, 135.062226, 112.551855, - 109.088721, 105.625587, 102.162453, 105.625587, 103.894020, 117.746556, - 173.156700, 221.640576, 268.392885, 268.392885, 263.198184, 268.392885, - 283.976988, 180.082968, 176.619834, 171.425133, 164.498865, 148.914762, - 128.135958, 116.014989, 105.625587, 105.625587, 114.283422, 112.551855, - 109.088721, 109.088721, 110.820288, 112.551855, 109.088721, 103.894020, - 109.088721, 121.209690, 119.478123, 116.014989, 116.014989, 116.014989, - 112.551855, 107.357154, 103.894020, 100.430886, 98.699319, 107.357154, - 100.430886, 122.941257, 202.593339, 259.735050, 266.661318, 271.856019, - 268.392885, 282.245421, 180.082968, 174.888267, 171.425133, 157.572597, - 145.451628, 128.135958, 102.162453, 102.162453, 107.357154, 110.820288, - 109.088721, 105.625587, 107.357154, 110.820288, 110.820288, 110.820288, - 105.625587, 103.894020, 119.478123, 117.746556, 116.014989, 119.478123, - 116.014989, 112.551855, 107.357154, 102.162453, 100.430886, 98.699319, - 98.699319, 96.967752, 102.162453, 180.082968, 237.224679, 254.540349, - 275.319153, 278.782287, 273.587586, 180.082968, 174.888267, 171.425133, - 155.841030, 147.183195, 133.330659, 103.894020, 98.699319, 103.894020, - 107.357154, 107.357154, 107.357154, 109.088721, 110.820288, 112.551855, - 112.551855, 114.283422, 173.156700, 116.014989, 116.014989, 119.478123, - 119.478123, 116.014989, 112.551855, 109.088721, 103.894020, 100.430886, - 96.967752, 93.504618, 95.236185, 96.967752, 133.330659, 211.251174, - 245.882514, 287.440122, 271.856019, 259.735050, 180.082968, 174.888267, - 167.961999, 159.304164, 133.330659, 136.793793, 110.820288, 98.699319, - 98.699319, 107.357154, 107.357154, 107.357154, 110.820288, 112.551855, - 114.283422, 112.551855, 199.130205, 238.956246, 223.372143, 110.820288, - 117.746556, 121.209690, 117.746556, 114.283422, 110.820288, 103.894020, - 100.430886, 96.967752, 91.773051, 91.773051, 96.967752, 107.357154, - 199.130205, 247.614081, 271.856019, 270.124452, 275.319153}; - -const size_t array_double2_size = sizeof(array_double2); diff --git a/third_party/libtiff/test/test_arrays.h b/third_party/libtiff/test/test_arrays.h deleted file mode 100644 index 424753d..0000000 --- a/third_party/libtiff/test/test_arrays.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Few declarations for the test numerical arrays. - */ - -#ifndef _TEST_ARRAYS_ -#define _TEST_ARRAYS_ - -#include - -#define XSIZE 37 -#define YSIZE 23 - -extern const unsigned char byte_array1[]; -extern const size_t byte_array1_size; - -extern const unsigned char byte_array2[]; -extern const size_t byte_array2_size; - -extern const unsigned char byte_array3[]; -extern const size_t byte_array3_size; - -extern const float array_float1[]; -extern const size_t array_float1_size; - -extern const float array_float2[]; -extern const size_t array_float2_size; - -extern const double array_double1[]; -extern const size_t array_double1_size; - -extern const double array_double2[]; -extern const size_t array_double2_size; - -#endif /* _TEST_ARRAYS_ */ - diff --git a/third_party/libtiff/test/test_directory.c b/third_party/libtiff/test/test_directory.c deleted file mode 100644 index 8cc3769..0000000 --- a/third_party/libtiff/test/test_directory.c +++ /dev/null @@ -1,2380 +0,0 @@ -/* - * TIFF Library - * - * The purpose of this test suite is to test the correctness of - * TIFFWriteDirectory() when appending multiple directories to an open file. - * - * Currently, there is an optimization where the TIFF data structure stores the - * offset of the last written directory in order to avoid having to traverse the - * entire directory list each time a new one is added. The offset is not stored - * in the file itself, only in the in-memory data structure. This means we still - * go through the entire list the first time a directory is appended to a - * newly-opened file, and the shortcut is taken for subsequent directory writes. - * - * In order to test the correctness of the optimization, the - * `test_lastdir_offset` function writes 10 directories to two different files. - * For the first file we use the optimization, by simply calling - * TIFFWriteDirectory() repeatedly on an open TIFF handle. For the second file, - * we avoid the optimization by closing the file after each call to - * TIFFWriteDirectory(), which means the next directory write will traverse the - * entire list. - * - * Finally, the two files are compared to check that the number of directories - * written is the same, and that their offsets match. The test is then repeated - * using BigTIFF files. - * - * Furthermore, arbitrary directory loading using TIFFSetDirectory() is checked, - * especially after the update with "relative" movement possibility. Also - * TIFFUnlinkDirectory() is tested. - * - * Furthermore, tests are performed with big-endian, little-endian and BigTIFF - * images. - * - * Furthermore the correctness of tif_curdir = TIFFCurrentDirectory() when - * moving though a multi-IFD file and creating new IFDs, overwriting or - * re-writing IFDs as well for reading and writing SubIFDs is tested. - * - */ - -#include "tif_config.h" - -#include -#include -#include -#include - -#include "tiffio.h" - -#ifdef HAVE_UNISTD_H -#include -#endif - -/* Global settings for the test image. It is not save to change. */ -#define SPP 3 /* Samples per pixel */ -#define N_DIRECTORIES 10 /* Number of directories to write */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -char *openModeStrings[] = {"wl", "wb", "w8l", "w8b"}; -char *openModeText[] = {"non-BigTIFF and LE", "non-BigTIFF and BE", - "BigTIFF and LE", "BigTIFF and BE"}; - -/* Some functions and macros to get more readable test code. */ -int CheckCurDirNum(TIFF *tif, tdir_t expected_dirnum, int line) -{ - - tdir_t curdir = TIFFCurrentDirectory(tif); - if (curdir != expected_dirnum) - { - fprintf(stderr, - "Error: curdir %d is different to expected one %d at line %d\n", - curdir, expected_dirnum, line); - return 1; - } - return 0; -} - -#define TIFFWriteDirectory_M(tif, filename, line) \ - if (!TIFFWriteDirectory(tif)) \ - { \ - fprintf(stderr, "Can't write directory to %s at line %d\n", filename, \ - line); \ - goto failure; \ - } - -#define TIFFCheckpointDirectory_M(tif, dirnum, filename, line) \ - if (!TIFFCheckpointDirectory(tif)) \ - { \ - fprintf(stderr, "Can't checkpoint directory %d of %s at line %d\n", \ - dirnum, filename, line); \ - goto failure; \ - } - -#define TIFFSetDirectory_M(tif, dirnum, filename, line) \ - if (!TIFFSetDirectory(tif, dirnum)) \ - { \ - fprintf(stderr, "Can't set directory %d of %s at line %d\n", dirnum, \ - filename, line); \ - goto failure; \ - } - -#define CHECKCURDIRNUM_M(tif, x, line) \ - if (CheckCurDirNum(tif, x, line)) \ - { \ - goto failure; \ - } - -/* Writes basic tags to current directory (IFD) as well one pixel to the file. - * For is_corrupted = TRUE a corrupted IFD (missing image width tag) is - * generated. */ -int write_data_to_current_directory(TIFF *tif, int i, bool is_corrupted) -{ - unsigned char buf[SPP] = {0, 127, 255}; - char auxString[128]; - - if (!tif) - { - fprintf(stderr, "Invalid TIFF handle.\n"); - return 1; - } - if (!is_corrupted) - { - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - return 1; - } - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - return 1; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - return 1; - } - /* Write IFD identification number to ASCII string of PageName tag. */ - sprintf(auxString, "%d th. IFD", i); - if (!TIFFSetField(tif, TIFFTAG_PAGENAME, auxString)) - { - fprintf(stderr, "Can't set TIFFTAG_PAGENAME tag.\n"); - return 1; - } - - /* Write dummy pixel data. */ - if (TIFFWriteScanline(tif, buf, 0, 0) == -1 && !is_corrupted) - { - fprintf(stderr, "Can't write image data.\n"); - return 1; - } - - return 0; -} - -/* Fills a new IFD and appends it to a file by opening a file and closing it - * again after writing. */ -int write_directory_to_closed_file(const char *filename, unsigned int openMode, - int i) -{ - TIFF *tif; - /* Replace 'w' for write by 'a' for append. */ - char strAux[8] = {0}; - strncpy(strAux, openModeStrings[openMode], sizeof(strAux) - 1); - strAux[0] = 'a'; - tif = TIFFOpen(filename, strAux); - if (!tif) - { - fprintf(stderr, "Can't create/open %s\n", filename); - return 1; - } - - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, "Can't write data to directory %d of %s.\n", i, - filename); - TIFFClose(tif); - return 1; - } - - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "TIFFWriteDirectory() failed for directory %d of %s.\n", - i, filename); - TIFFClose(tif); - return 1; - } - - TIFFClose(tif); - return 0; -} - -/* Opens a file and counts its directories. */ -int count_directories(const char *filename, int *count) -{ - TIFF *tif; - *count = 0; - - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't read %s\n", filename); - return 1; - } - - do - { - CHECKCURDIRNUM_M(tif, (tdir_t)(*count), __LINE__); - (*count)++; - } while (TIFFReadDirectory(tif)); -failure: - TIFFClose(tif); - return 0; -} - -/* Compare 'requested_dir_number' with number written in PageName tag - * into the IFD to identify that IFD. */ -int is_requested_directory(TIFF *tif, int requested_dir_number, - const char *filename) -{ - char *ptr = NULL; - char *auxStr = NULL; - - if (!TIFFGetField(tif, TIFFTAG_PAGENAME, &ptr)) - { - fprintf(stderr, "Can't get TIFFTAG_PAGENAME tag.\n"); - return 0; - } - - /* Check for reading errors */ - if (ptr != NULL) - auxStr = strchr(ptr, ' '); - - if (ptr == NULL || auxStr == NULL || strncmp(auxStr, " th.", 4)) - { - ptr = ptr == NULL ? "(null)" : ptr; - fprintf(stderr, - "Error reading IFD directory number from PageName tag: %s\n", - ptr); - return 0; - } - - /* Retrieve IFD identification number from ASCII string */ - const int nthIFD = atoi(ptr); - if (nthIFD == requested_dir_number) - { - return 1; - } - fprintf(stderr, "Expected directory %d from %s was not loaded but: %s\n", - requested_dir_number, filename, ptr); - - return 0; -} - -enum DirWalkMode -{ - DirWalkMode_ReadDirectory, - DirWalkMode_SetDirectory, - DirWalkMode_SetDirectory_Reverse, -}; -/* Gets a list of the directory offsets in a file. Assumes the file has at least - * N_DIRECTORIES directories. - * There are three methods to test walking through the IFD chain. - * This tests the optimization of faster SetDirectory(). */ -int get_dir_offsets(const char *filename, uint64_t *offsets, - enum DirWalkMode dirWalkMode) -{ - TIFF *tif; - int i; - - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't read %s\n", filename); - return 1; - } - - for (i = 0; i < N_DIRECTORIES; i++) - { - tdir_t dirn = (dirWalkMode == DirWalkMode_SetDirectory_Reverse) - ? (N_DIRECTORIES - i - 1) - : i; - - if (dirWalkMode != DirWalkMode_ReadDirectory && - !TIFFSetDirectory(tif, dirn) && dirn < (N_DIRECTORIES - 1)) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - TIFFClose(tif); - return 3; - } - - offsets[dirn] = TIFFCurrentDirOffset(tif); - - /* Check, if dirn is requested directory */ - if (!is_requested_directory(tif, dirn, filename)) - { - TIFFClose(tif); - return 4; - } - - if (dirWalkMode == DirWalkMode_ReadDirectory && - !TIFFReadDirectory(tif) && i < (N_DIRECTORIES - 1)) - { - fprintf(stderr, "Can't read %d.th directory from %s\n", i, - filename); - TIFFClose(tif); - return 2; - } - } - - TIFFClose(tif); - return 0; -} - -/* Checks that TIFFSetDirectory() work well after update for relative seeking - * to following directories. - * - * There are several issues especially when SubIFDs and custom directories are - * involved. There are no real directory number for those and TIFFSetDirectory() - * cannot be used. However, TIFFSetDirectory() is needed to switch back to the - * main-IFD chain. Furthermore, IFD-loop handling needs to be supported in any - * cases. - * Also the case where directly after TIFFWriteDirectory() that directory - * is re-read using TIFFSetDirectory() is tested. - */ -int test_arbitrary_directrory_loading(unsigned int openMode) -{ - char filename[128] = {0}; - TIFF *tif; - uint64_t offsets_base[N_DIRECTORIES]; - int expected_original_dirnumber; - tdir_t expected_curdir = (tdir_t)(-1); - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_arbitrary_directrory_loading_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write N_DIRECTORIES (10) directories to it. */ - tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - TIFFSetDirectory(tif, 0); - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - for (int i = 0; i < N_DIRECTORIES; i++) - { - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", filename); - goto failure; - } - expected_curdir++; - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - if (i >= 2 && i <= 4) - { - if (i == 3) - { - /* Invalidate directory - TIFFSetSubDirectory() will fail. - * The next TIFFSetDirectory(i) will revoke this action.*/ - if (TIFFSetSubDirectory(tif, 0)) - { - fprintf(stderr, - "Unexpected return at invalidate directory %d " - "within %s.\n", - i, filename); - goto failure; - } - } - /* Test jump back to just written directory. */ - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, - "Can't set directory %d within %s " - "right after TIFFWriteDirectory().\n", - i, filename); - goto failure; - } - if (i == 4) - { - /* Invalidate directory - TIFFSetSubDirectory() will fail. - * This time, tif_curdir keeps set to -1 and counts now again - * from 0, despite the directory number in the file is equal - * "i". */ - if (TIFFSetSubDirectory(tif, 0)) - { - fprintf(stderr, - "Unexpected return at invalidate directory %d " - "within %s.\n", - i, filename); - goto failure; - } - } - /*Check if correct directory is loaded */ - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - /* Reset to next directory to go on with writing. */ - TIFFCreateDirectory(tif); - } - } - TIFFClose(tif); - - /* Reopen prepared testfile */ - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - - /* Get directory offsets */ - if (get_dir_offsets(filename, offsets_base, DirWalkMode_ReadDirectory)) - { - fprintf(stderr, "Error reading directory offsets from %s.\n", filename); - goto failure; - } - - /* Set last directory and then one after, which should fail. */ - if (!TIFFSetDirectory(tif, N_DIRECTORIES - 1)) - { - fprintf(stderr, "Can't set last directory %d within %s\n", - N_DIRECTORIES - 1, filename); - goto failure; - } - if (TIFFSetDirectory(tif, N_DIRECTORIES + 1)) - { - fprintf(stderr, - "End of IFD chain not detected. Set non existing directory %d " - "within %s\n", - N_DIRECTORIES + 1, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, N_DIRECTORIES - 1, __LINE__); - - /* Test very fast TIFFSetDirectory() using IFD loop directory list. - * First populate IFD loop directory list and then go through directories in - * reverse order. Within between read after end of IFDs using - * TIFFReadDirectory() where IFD loop directory list should be kept. */ - for (int i = 0; i < N_DIRECTORIES; i++) - { - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, i, __LINE__); - } - TIFFReadDirectory(tif); - CHECKCURDIRNUM_M(tif, N_DIRECTORIES - 1, __LINE__); - for (int i = N_DIRECTORIES - 1; i >= 0; i--) - { - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - goto failure; - } - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - CHECKCURDIRNUM_M(tif, i, __LINE__); - } - - /* Test not existing directory number */ - if (TIFFSetDirectory(tif, N_DIRECTORIES)) - { - fprintf(stderr, - "No expected fail for accessing not existent directory number " - "%d in file %s\n", - N_DIRECTORIES, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - - /* Close and Reopen prepared testfile */ - TIFFClose(tif); - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - - /* Step through directories just using TIFFSetSubDirectory() */ - for (int i = N_DIRECTORIES - 1; i >= 0; i--) - { - if (!TIFFSetSubDirectory(tif, offsets_base[i])) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - goto failure; - } - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - CHECKCURDIRNUM_M(tif, i, __LINE__); - } - - /* More specialized test cases for relative seeking within TIFFSetDirectory. - * However, with using IFD loop directory list, most of this test cases will - * never be reached! */ - if (!TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, "Can't set directory %d within %s\n", 2, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 2, __LINE__); - uint64_t off2 = TIFFCurrentDirOffset(tif); - /* Note that dirnum = 2 is deleted here since TIFFUnlinkDirectory() - * starts with 1 instead of 0. */ - if (!TIFFUnlinkDirectory(tif, 3)) - { - fprintf(stderr, "Can't unlink directory %d within %s\n", 3, filename); - goto failure; - } - /* Move to the unlinked IFD. This sets tif_curdir=0 because unlinked IFD - * offset is not in the IFD loop list. This indicates a SubIFD chain. */ - if (!TIFFSetSubDirectory(tif, off2)) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s\n", - off2, off2, filename); - goto failure; - } - /*Check if correct directory is loaded */ - CHECKCURDIRNUM_M(tif, 0, __LINE__); - expected_original_dirnumber = 2; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - /* This should move back to the main-IFD chain and load the third - * directory which has IFD number 4, due to the deleted third IFD. */ - if (!TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, "Can't set new directory %d within %s\n", 3, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 3, __LINE__); - expected_original_dirnumber = 4; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - /* Test backwards jump. */ - if (!TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, "Can't set new directory %d within %s\n", 2, filename); - goto failure; - } - expected_original_dirnumber = 3; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* Second UnlinkDirectory -> two IFDs are missing in the main-IFD chain - * then, original dirnum 2 and 3 */ - if (!TIFFUnlinkDirectory(tif, 3)) - { - fprintf(stderr, "Can't unlink directory %d within %s\n", 3, filename); - goto failure; - } - if (!TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, - "Can't set new directory %d after second " - "TIFFUnlinkDirectory(3) within %s\n", - 2, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 2, __LINE__); - /* which should now be the previous dir-3. */ - expected_original_dirnumber = 4; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* Check, if third original directory, which is unlinked, could be loaded - * and the following, still chained one. This is like for a SubIFD. - * tif_curdir will be set to 0 because deleted IFD is not in main sequence - * and then incremented to 1 when reading the still chained next IFD using - * TIFFReadDirectory(). */ - if (!TIFFSetSubDirectory(tif, offsets_base[2])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s\n", - offsets_base[2], offsets_base[2], filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - if (!TIFFReadDirectory(tif)) - { - fprintf(stderr, - "Can't read directory after directory at offset 0x%" PRIx64 - " (%" PRIu64 ") within %s\n", - offsets_base[2], offsets_base[2], filename); - goto failure; - } - /* Check if correct directory is loaded, which was unlinked the second - * time. - */ - CHECKCURDIRNUM_M(tif, 1, __LINE__); - expected_original_dirnumber = 3; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* Load unlinked directory like a SubIFD and then go back to the - * main-IFD chain using TIFFSetDirectory(). Also check two loads of the - * same directory. */ - if (!TIFFSetSubDirectory(tif, offsets_base[2])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s\n", - offsets_base[2], offsets_base[2], filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - if (!TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, "Can't set new directory %d within %s\n", 3, filename); - goto failure; - } - if (!TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, "Can't set new directory %d a second time within %s\n", - 3, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 3, __LINE__); - /*Check if correct directory is loaded. Because two original IFDs are - * unlinked / missing, the original dirnumber is now 5. */ - expected_original_dirnumber = 5; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* Another sequence for testing. */ - if (!TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, "Can't set new directory %d a second time within %s\n", - 2, filename); - goto failure; - } - if (!TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, "Can't set new directory %d a second time within %s\n", - 3, filename); - goto failure; - } - if (!TIFFSetSubDirectory(tif, offsets_base[2])) - { - fprintf(stderr, - "Can't set sub-directory at offset 0x%" PRIx64 " (%" PRIu64 - ") within %s\n", - offsets_base[2], offsets_base[2], filename); - goto failure; - } - expected_original_dirnumber = 2; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - if (!TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, "Can't set new directory %d a second time within %s\n", - 3, filename); - goto failure; - } - /*Check if correct directory is loaded. Because two original IFDs are - * unlinked / missing, the original dirnumber is now 5. */ - expected_original_dirnumber = 5; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* Third UnlinkDirectory -> three IFDs are missing in the main-IFD chain - * then, original dirnum 0, 2 and 3 - * Furthermore, this test checks that TIFFUnlinkDirectory() can unlink - * the first directory dirnum = 0 and a following TIFFSetDirectory(0) - * does not load the unlinked directory. */ - CHECKCURDIRNUM_M(tif, 3, __LINE__); - if (!TIFFUnlinkDirectory(tif, 1)) - { - fprintf(stderr, "Can't unlink directory %d within %s\n", 0, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - /* Now three directories are missing (0,2,3) and thus directory 0 is - * original directory 1 and directory 2 is original directory 5. */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, - "Can't set new directory %d after third " - "TIFFUnlinkDirectory(1) within %s\n", - 0, filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - expected_original_dirnumber = 1; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - if (!TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, - "Can't set new directory %d after third " - "TIFFUnlinkDirectory(1) within %s\n", - 2, filename); - goto failure; - } - expected_original_dirnumber = 5; - if (!is_requested_directory(tif, expected_original_dirnumber, filename)) - { - goto failure; - } - - /* TIFFUnlinkDirectory(0) is not allowed, because dirnum starts for - * this function with 1 instead of 0. - * An error return is expected here. */ - CHECKCURDIRNUM_M(tif, 2, __LINE__); - fprintf(stderr, "----- Expect error messages about 'TIFFUnlinkDirectory() " - "first directory starts with number 1 and not 0.' -----\n"); - if (TIFFUnlinkDirectory(tif, 0)) - { - fprintf(stderr, "TIFFUnlinkDirectory(0) did not return an error.\n"); - goto failure; - } - CHECKCURDIRNUM_M(tif, 2, __LINE__); - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_arbitrary_directrory_loading() --*/ - -/* Tests SubIFD writing and reading - * - * - */ -int test_SubIFD_directrory_handling(unsigned int openMode) -{ - char filename[128] = {0}; - -/* Define the number of sub-IFDs you are going to write */ -#define NUMBER_OF_SUBIFDs 4 - uint16_t number_of_sub_IFDs = NUMBER_OF_SUBIFDs; - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = { - 0UL}; /* array for SubIFD tag */ - int blnWriteSubIFD = 0; - int i; - int iIFD = 0, iSubIFD = 0; - TIFF *tif; - int expected_original_dirnumber; - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_SubIFD_directrory_handling_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write N_DIRECTORIES (10) directories to it */ - tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - for (i = 0; i < N_DIRECTORIES; i++) - { - if (write_data_to_current_directory( - tif, blnWriteSubIFD ? 200 + iSubIFD++ : iIFD++, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - if (blnWriteSubIFD) - { - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE)) - goto failure; - } - - expected_original_dirnumber = blnWriteSubIFD ? 0 : iIFD - 1; - - /* For the second multi-page image, trigger TIFFWriteDirectory() to - * switch for the next number_of_sub_IFDs calls to add those as SubIFDs - * e.g. for thumbnails */ - if (1 == i) - { - blnWriteSubIFD = 1; - /* Now here is the trick: the next n directories written - * will be sub-IFDs of the main-IFD (where n is number_of_sub_IFDs - * specified when you set the TIFFTAG_SUBIFD field. - * The contents of sub_IFDs_offsets is initially copied to the - * internal SubIFD offset array and written to the main-IFD. Those - * SubIFD offsets in the main-IFD are then patched by the following - * number_of_sub_IFDs TIFFWriteDirectory() calls which write the - * sub-IFDs to file. - */ - if (!TIFFSetField(tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - goto failure; - } - - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", filename); - goto failure; - } - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_original_dirnumber, __LINE__); - - if (iSubIFD >= number_of_sub_IFDs) - blnWriteSubIFD = 0; - } - TIFFClose(tif); - - /* Reopen prepared testfile */ - tif = TIFFOpen(filename, "r+"); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - goto failure; - } - - tdir_t numberOfMainIFDs = TIFFNumberOfDirectories(tif); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - if (numberOfMainIFDs != (tdir_t)N_DIRECTORIES - number_of_sub_IFDs) - { - fprintf(stderr, - "Unexpected number of directories in %s. Expected %i, " - "found %i.\n", - filename, N_DIRECTORIES - number_of_sub_IFDs, numberOfMainIFDs); - goto failure; - } - - tdir_t currentDirNumber = TIFFCurrentDirectory(tif); - - /* The first directory is already read through TIFFOpen() */ - int blnRead = 0; - expected_original_dirnumber = 1; - do - { - /* Check if there are SubIFD subfiles */ - void *ptr; - if (TIFFGetField(tif, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - - for (i = 0; i < number_of_sub_IFDs; i++) - { - /* Read first SubIFD directory */ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[i])) - goto failure; - if (!is_requested_directory(tif, 200 + i, filename)) - { - goto failure; - } - /* For SubIFDs, curdir is always set to 0 for the first SubIFD - * read. - * When SubIFDs are not concatenated, curdir is 0 for all - * SubIFDs read. - * When the SubIFDs are concatenated the following - * ones after the first read one get incremented curdir numbers. - * The curdir sequence gets updated when a previous one before - * the firstly read one is read. I.e. curdir behaves in the - * SubIFD chain like in the main IFD chain to support IFD loop - * checking. - */ - /* Check if there is a SubIFD chain behind the first one from - * the array, as specified by Adobe */ - int n = 0; - /* subdirnum starts with 1 because first SubIFD is already - * read with TIFFSetSubDirectory() */ - CHECKCURDIRNUM_M(tif, 0, __LINE__); - tdir_t subdirnum = 1; - /* analyse SubIFD chain */ - while (TIFFReadDirectory(tif)) - { - if (!is_requested_directory(tif, 201 + i + n++, filename)) - goto failure; - /* Fails in 4.6.0 when SubIFD chaining is enabled. */ - CHECKCURDIRNUM_M(tif, subdirnum, __LINE__); - subdirnum++; - } - } - /*-- Go through SubIFDs in reverse order --*/ - /* Activate main-IFD to reset SubIFD loop list from above. */ - TIFFSetDirectory(tif, 0); - for (i = number_of_sub_IFDs - 1; i >= 0; i--) - { - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[i])) - goto failure; - if (!is_requested_directory(tif, 200 + i, filename)) - { - goto failure; - } - int n = 0; - tdir_t subdirnum = 1; - CHECKCURDIRNUM_M(tif, 0, __LINE__); - /* analyse SubIFD chain */ - while (TIFFReadDirectory(tif)) - { - if (!is_requested_directory(tif, 201 + i + n++, filename)) - goto failure; - /* Fails in 4.6.0 when SubIFD chaining is enabled. */ - CHECKCURDIRNUM_M(tif, subdirnum, __LINE__); - subdirnum++; - } - } - /* Go back to main-IFD chain and re-read that main-IFD directory */ - if (!TIFFSetDirectory(tif, currentDirNumber)) - goto failure; - } - /* Read next main-IFD directory (subfile) */ - blnRead = TIFFReadDirectory(tif); - currentDirNumber = TIFFCurrentDirectory(tif); - if (blnRead) - CHECKCURDIRNUM_M(tif, expected_original_dirnumber, __LINE__); - if (blnRead && !is_requested_directory( - tif, expected_original_dirnumber++, filename)) - goto failure; - } while (blnRead); - - /*--- Now test arbitrary directory loading with SubIFDs ---*/ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[1])) - goto failure; - if (!is_requested_directory(tif, 201, filename)) - { - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - - /*-- Test TIFFCheckpointDirectory() with SubIFDs -- - * However, SubIFDs cannot be re-written to another location because - * TIFFRewriteDirectory() does not support SubIFDs. Overwriting works. */ - tdir_t expected_curdir = TIFFNumberOfDirectories(tif); - TIFFCreateDirectory(tif); - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at line %d\n", - filename, __LINE__); - goto failure; - } - /* prepare to write next directory as SubIFD */ - number_of_sub_IFDs = 1; - if (!TIFFSetField(tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - goto failure; - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - /* write SubIFD */ - if (write_data_to_current_directory(tif, 700, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE)) - goto failure; - - /* Checkpoint SubIFD test */ - TIFFCheckpointDirectory_M(tif, expected_curdir, filename, __LINE__); - /* The next four CHECKKURDIRNUM_M fail in 4.6.0 */ - CHECKCURDIRNUM_M(tif, 0, __LINE__); - /* Overwriting works but re-writing will not. */ - TIFFWriteDirectory_M(tif, filename, __LINE__); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - /* Write another main-IFD */ - expected_curdir++; - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - TIFFCheckpointDirectory_M(tif, expected_curdir, filename, __LINE__); - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - TIFFWriteDirectory_M(tif, filename, __LINE__); - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*--- test_SubIFD_directrory_handling() ---*/ - -/* Test failure in TIFFSetSubDirectory() (see issue #618 and MR !543) - * - * If int TIFFSetSubDirectory(TIFF *tif, uint64_t diroff) fails due to - * TIFFReadDirectory() error, subsequent calls to TIFFSetDirectory() cannot - * recover a consistent state. This is reproducible in master, 4.6, 4.5.1. - * This issue surfaced around the time when relative seeking - * support / IFD hash map optimiazions were introduced. This can be reproduced - * by opening an invalid SubIFD directory (e.g. w/o required ImageLength tag). - * The issue was fixed by MR !543. - */ -int test_SetSubDirectory_failure(unsigned int openMode) -{ - char filename[128] = {0}; - -/* Define the number of sub-IFDs you are going to write */ -#define NUMBER_OF_SUBIFDs2 1 - uint16_t number_of_sub_IFDs = NUMBER_OF_SUBIFDs2; - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs2] = { - 0UL}; /* array for SubIFD tag */ - TIFF *tif; - tdir_t expected_curdir = 0; - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_SetSubDirectory_failure_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write one directory with one corrupted sub-directory to - * it */ - tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - - if (write_data_to_current_directory(tif, 300, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - /* prepare to write next directory as SubIFD */ - if (!TIFFSetField(tif, TIFFTAG_SUBIFD, number_of_sub_IFDs, - sub_IFDs_offsets)) - goto failure; - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - /* write corrupted SubIFD */ - fprintf(stderr, "----- Expect some error messages about 'scanline size is " - "zero' -----\n"); - if (write_data_to_current_directory(tif, 310, true)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - /* SUBFILETYPE tag is not mandatory for SubIFD writing, but a - * good idea to indicate thumbnails */ - if (!TIFFSetField(tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE)) - goto failure; - - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", filename); - goto failure; - } - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - TIFFClose(tif); - - /* Reopen prepared testfile */ - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open %s\n", filename); - goto failure; - } - /* The first directory is already read through TIFFOpen() */ - if (!is_requested_directory(tif, 300, filename)) - { - goto failure; - } - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - - /* Check if there are SubIFD subfiles */ - void *ptr; - if (TIFFGetField(tif, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - - /* Read first SubIFD directory */ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[0])) - { - /* Attempt to set back to the main directory. - * Would fail if absolute seeking is not forced independent of - * TIFFReadDirectory success. */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, - "Failed to reset from not valid SubIFD back to " - "main directory. %s\n", - filename); - goto failure; - } - if (!is_requested_directory(tif, 300, filename)) - { - goto failure; - } - } - else - { - if (!is_requested_directory(tif, 310, filename)) - { - goto failure; - } - } - /* Go back to main-IFD chain and re-read that main-IFD directory */ - if (!TIFFSetDirectory(tif, 0)) - goto failure; - CHECKCURDIRNUM_M(tif, 0, __LINE__); - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*--- test_SetSubDirectory_failure() ---*/ - -/* Checks that rewriting a directory does not break the directory linked - * list. - * - * This could happen because TIFFRewriteDirectory() relies on the traversal of - * the directory linked list in order to move the rewritten directory to the - * end of the file. This means the `lastdir_offset` optimization should be - * skipped, otherwise the linked list will be broken at the point where it - * connected to the rewritten directory, resulting in the loss of the - * directories that come after it. - * Rewriting the first directory requires an additional test, because it is - * treated differently from the directories that have a predecessor in the list. - */ -int test_rewrite_lastdir_offset(unsigned int openMode) -{ - char filename[128] = {0}; - int i, count; - TIFF *tif; - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_directory_rewrite_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write N_DIRECTORIES (10) directories to it. */ - tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - for (i = 0; i < N_DIRECTORIES; i++) - { - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", filename); - goto failure; - } - } - - /* Without closing the file, go to the fifth directory - * and check, if dirn is requested directory. */ - TIFFSetDirectory(tif, 4); - if (!is_requested_directory(tif, 4, filename)) - { - TIFFClose(tif); - return 4; - } - - /* Rewrite the fifth directory by calling TIFFRewriteDirectory - * and check, if the offset of IFD loaded by TIFFSetDirectory() is - * different. Then, the IFD loop directory list is correctly maintained for - * speed up of TIFFSetDirectory() with directly getting the offset that - * list. - */ - uint64_t off1 = TIFFCurrentDirOffset(tif); - if (write_data_to_current_directory(tif, 4, false)) - { - fprintf(stderr, "Can't write data to fifth directory in %s\n", - filename); - goto failure; - } - if (!TIFFRewriteDirectory(tif)) - { - fprintf(stderr, "Can't rewrite fifth directory to %s\n", filename); - goto failure; - } - i = 4; - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - goto failure; - } - uint64_t off2 = TIFFCurrentDirOffset(tif); - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - if (off1 == off2) - { - fprintf(stderr, - "Rewritten directory %d was not correctly accessed by " - "TIFFSetDirectory() in file %s\n", - i, filename); - goto failure; - } - - /* Now, perform the test for the first directory */ - TIFFSetDirectory(tif, 0); - if (!is_requested_directory(tif, 0, filename)) - { - TIFFClose(tif); - return 5; - } - off1 = TIFFCurrentDirOffset(tif); - if (write_data_to_current_directory(tif, 0, false)) - { - fprintf(stderr, "Can't write data to first directory in %s\n", - filename); - goto failure; - } - if (!TIFFRewriteDirectory(tif)) - { - fprintf(stderr, "Can't rewrite first directory to %s\n", filename); - goto failure; - } - i = 0; - if (!TIFFSetDirectory(tif, i)) - { - fprintf(stderr, "Can't set %d.th directory from %s\n", i, filename); - goto failure; - } - off2 = TIFFCurrentDirOffset(tif); - if (!is_requested_directory(tif, i, filename)) - { - goto failure; - } - if (off1 == off2) - { - fprintf(stderr, - "Rewritten directory %d was not correctly accessed by " - "TIFFSetDirectory() in file %s\n", - i, filename); - goto failure; - } - - TIFFClose(tif); - tif = NULL; - - /* Check that the file has the expected number of directories*/ - if (count_directories(filename, &count)) - { - fprintf(stderr, "Error counting directories in file %s.\n", filename); - goto failure; - } - if (count != N_DIRECTORIES) - { - fprintf(stderr, - "Unexpected number of directories in %s. Expected %i, " - "found %i.\n", - filename, N_DIRECTORIES, count); - goto failure; - } - /* hint: file was closed by count_directories() */ - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_rewrite_lastdir_offset() --*/ - -/* Compares multi-directory files written with and without the lastdir - * optimization */ -int test_lastdir_offset(unsigned int openMode) -{ - char filename_optimized[128] = {0}; - char filename_non_optimized[128] = {0}; - int i, count_optimized, count_non_optimized; - uint64_t offsets_base[N_DIRECTORIES]; - uint64_t offsets_comparison[N_DIRECTORIES]; - TIFF *tif; - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename_optimized, "test_directory_optimized_%s.tif", - openModeStrings[openMode]); - sprintf(filename_non_optimized, "test_directory_non_optimized_%s.tif", - openModeStrings[openMode]); - unlink(filename_optimized); - unlink(filename_non_optimized); - - /* First file: open it and add multiple directories. This uses the - * lastdir optimization. */ - tif = TIFFOpen(filename_optimized, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename_optimized); - return 1; - } - for (i = 0; i < N_DIRECTORIES; i++) - { - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, "Can't write data to current directory in %s\n", - filename_optimized); - goto failure; - } - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write directory to %s\n", - filename_optimized); - goto failure; - } - } - TIFFClose(tif); - tif = NULL; - - /* Second file: close it after adding each directory. This avoids the - * lastdir optimization. */ - for (i = 0; i < N_DIRECTORIES; i++) - { - if (write_directory_to_closed_file(filename_non_optimized, openMode, i)) - { - fprintf(stderr, "Can't write directory to %s\n", - filename_non_optimized); - goto failure; - } - } - - /* Check that both files have the expected number of directories */ - if (count_directories(filename_optimized, &count_optimized)) - { - fprintf(stderr, "Error counting directories in file %s.\n", - filename_optimized); - goto failure; - } - if (count_optimized != N_DIRECTORIES) - { - fprintf(stderr, - "Unexpected number of directories in %s. Expected %i, " - "found %i.\n", - filename_optimized, N_DIRECTORIES, count_optimized); - goto failure; - } - if (count_directories(filename_non_optimized, &count_non_optimized)) - { - fprintf(stderr, "Error counting directories in file %s.\n", - filename_non_optimized); - goto failure; - } - if (count_non_optimized != N_DIRECTORIES) - { - fprintf(stderr, - "Unexpected number of directories in %s. Expected %i, " - "found %i.\n", - filename_non_optimized, N_DIRECTORIES, count_non_optimized); - goto failure; - } - - /* Check that both files have the same directory offsets */ - /* In parallel of comparing offsets between optimized base file and - * non-optimized file, test also three methods of walking through the - * IFD chain within get_dir_offsets(). This tests the optimization of - * faster SetDirectory(). */ - if (get_dir_offsets(filename_optimized, offsets_base, - DirWalkMode_ReadDirectory)) - { - fprintf(stderr, "Error reading directory offsets from %s.\n", - filename_optimized); - goto failure; - } - for (int file_i = 0; file_i < 2; ++file_i) - { - const char *filename = - (file_i == 0) ? filename_optimized : filename_non_optimized; - - for (enum DirWalkMode mode = DirWalkMode_ReadDirectory; - mode <= DirWalkMode_SetDirectory_Reverse; ++mode) - { - if (get_dir_offsets(filename, offsets_comparison, mode)) - { - fprintf(stderr, - "Error reading directory offsets from %s in mode %d.\n", - filename, mode); - goto failure; - } - for (i = 0; i < N_DIRECTORIES; i++) - { - if (offsets_base[i] != offsets_comparison[i]) - { - fprintf(stderr, - "Unexpected directory offset for directory %i, " - "expected " - "offset %" PRIu64 " but got %" PRIu64 ".\n", - i, offsets_base[i], offsets_comparison[i]); - goto failure; - } - } - } - } - /* hint: files are always closed by count_directories() and - * get_dir_offsets() */ - unlink(filename_optimized); - unlink(filename_non_optimized); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_lastdir_offset() --*/ - -/* Adds an EXIF IFD with some default values to the active IFD. - */ -int write_EXIF_data_to_current_directory(TIFF *tif, int i, - uint64_t *dir_offset_EXIF) -{ - char auxString[128]; - - if (!tif) - { - fprintf(stderr, "Invalid TIFF handle.\n"); - return 1; - } - - /*-- Now create an EXIF directory. */ - if (TIFFCreateEXIFDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - return 1; - } - - if (!TIFFSetField(tif, EXIFTAG_EXIFVERSION, "0231")) - { - fprintf(stderr, "Can't write EXIFTAG_EXIFVERSION\n"); - return 1; - } - - /* Write IFD identification number to ASCII string of SUBSECTIMEORIGINAL - * tag. */ - sprintf(auxString, "EXIF-%d-EXIF", i); - if (!TIFFSetField(tif, EXIFTAG_SUBSECTIMEORIGINAL, auxString)) - { - fprintf(stderr, "Can't set EXIFTAG_SUBSECTIMEORIGINAL tag.\n"); - return 1; - } - - if (!TIFFWriteCustomDirectory(tif, dir_offset_EXIF)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - return 1; - } - - return 0; -} /*-- write_EXIF_data_to_current_directory() --*/ - -/* Test correct incrementing of tif_curdir TIFFCurrentDirectory() - * - * Up to 4.6.0 there are cases where tif_curdir is set inconsistently or - * incorrectly, depending on the previous history. This function shows some of - * these cases and tests them after the improvements. - */ -int test_current_dirnum_incrementing(int testcase, unsigned int openMode) -{ -#define N_DIRECTORIES_2 2 - char filename[128] = {0}; - tdir_t lastdir; - tdir_t expected_curdir = (tdir_t)(-1); - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_current_dirnum_incrementing_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write N_DIRECTORIES_2 directories to it. */ - TIFF *tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - - /*-- Standard case for writing sequential IFDs. --*/ - for (int i = 0; i < N_DIRECTORIES_2; i++) - { - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - expected_curdir++; - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - } - - /*-- Standard case for sequential reading up to the end. --*/ - expected_curdir = 0; - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - while (TIFFReadDirectory(tif)) - { - expected_curdir++; - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - } - /* Last read for next_offset 0 shall not increment tif_curdir. */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - - /* Now, go back to IFD 0 and overwrite it in the first loop and rewrite it - * in the second loop (due to "i" having two digits then). - * tif_curdir should stay to that IFD-number. */ - expected_curdir = 0; - for (unsigned int i = 9; i < 11; i++) - { - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - } - - /* Now, go back to IFD 1 and overwrite it in the first loop and rewrite it - * in the second loop (due to "i" having two digits then). - * tif_curdir should stay to that IFD-number. */ - expected_curdir = 1; - for (unsigned int i = 8; i < 13; i += 4) - { - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - } - - /* Set IFD 0 and append new IFDs. */ - if (testcase == 0) - { - expected_curdir = TIFFNumberOfDirectories(tif); - } - else if (testcase == 1) - { - TIFFClose(tif); - tif = TIFFOpen(filename, openModeStrings[openMode]); - expected_curdir = 0; - } - else if (testcase == 2) - { - expected_curdir = TIFFNumberOfDirectories(tif); - TIFFClose(tif); - /* Replace 'w' for write by 'a' for append. */ - char strAux[8] = {0}; - strncpy(strAux, openModeStrings[openMode], sizeof(strAux) - 1); - strAux[0] = 'a'; - tif = TIFFOpen(filename, strAux); - } - for (unsigned int setdir = 0; setdir < 3; setdir += 2) - { - for (unsigned int i = 0; i < 2; i++) - { - if (testcase == 0) - { - TIFFSetDirectory_M(tif, setdir, filename, __LINE__); - TIFFCreateDirectory(tif); - } - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf( - stderr, - "Can't write data to current directory in %s at line %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0, except for testcase TIFFOpen("w") */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - expected_curdir++; - } - } - - /*-- Several CheckpointDirectory() testing --*/ - /* Set state such as if the last directory would have been just written. - * - read last IFD from file and then - * - create and activate a newly initialized IFD, not written yet. */ - if (testcase == 0) - { - lastdir = TIFFNumberOfDirectories(tif) - 1; - expected_curdir = lastdir + 1; - TIFFSetDirectory(tif, lastdir); - TIFFCreateDirectory(tif); - } - else if (testcase == 1) - { - TIFFClose(tif); - tif = TIFFOpen(filename, openModeStrings[openMode]); - expected_curdir = 0; - } - /* Fill the new IFD and checkpoint several times before writing. */ - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf(stderr, "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - for (unsigned int i = 0; i < 2; i++) - { - TIFFCheckpointDirectory_M(tif, expected_curdir, filename, __LINE__); - /* Fails in 4.6.0 only in second loop */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - if (i == 1) - { - /* In last loop force IFD to be rewritten. */ - TIFFSetField(tif, TIFFTAG_PAGENAME, "6.th IFD rewritten"); - } - TIFFCheckpointDirectory_M(tif, expected_curdir, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - /* Prepare checkpointing of same IFD in next loop after reading it from - * file. */ - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - } - - /*-- RewriteDirectory() testing --*/ - /* RewriteDirectory() forces to write the IFD to another location - * and set-up a new, empty IFD. */ - /* Set state such as if the last directory would have been just written. - * - read last IFD from file and then - * - create and activate a newly initialized IFD, not written yet. */ - if (testcase == 0 || testcase == 2) - { - lastdir = TIFFNumberOfDirectories(tif) - 1; - } - else - { - lastdir = expected_curdir; - } - TIFFSetDirectory(tif, lastdir); - TIFFCreateDirectory(tif); - expected_curdir = lastdir + 1; - /* Write a new IFD using TIFFRewriteDirectory, read it and rewrite it again. - * First with curdir set to the last IFD and then set to the first one. */ - for (unsigned int i = 0; i < 2; i++) - { - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - if (!TIFFRewriteDirectory(tif)) - { - fprintf(stderr, "Can't rewrite directory to %s at line %d\n", - filename, __LINE__); - goto failure; - } - /* Fails in 4.6.0 only in second loop */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - /* Read IFD and write it to another location. */ - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - if (!TIFFRewriteDirectory(tif)) - { - fprintf(stderr, "Can't rewrite directory to %s at line %d\n", - filename, __LINE__); - goto failure; - } - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - expected_curdir++; - /* Second loop starts with IFD 0 read from file. */ - TIFFSetDirectory_M(tif, 0, filename, __LINE__); - TIFFCreateDirectory(tif); - } - - /*-- CustomDirectory testing --*/ - /* Set state such as if the last directory would have been just written. - * - Read last IFD from file and then - * - create and activate a newly initialized IFD, not written yet and - * attach an EXIF IFD to it with forcing a re-write of the IFD by - * adding the EXIF-IFD tag. - * - Do that two times: - * - first set last IFD and append a new one, - * - second set first IFD and append a new one. */ - if (testcase == 0 || testcase == 1) - { - lastdir = TIFFNumberOfDirectories(tif) - 1; - } - else - { - lastdir = expected_curdir - 1; - } - TIFFSetDirectory(tif, lastdir); - TIFFCreateDirectory(tif); - expected_curdir = lastdir + 1; - uint64_t offsetEXIFBase[2]; - for (unsigned int i = 0; i < 2; i++) - { - if (write_data_to_current_directory(tif, expected_curdir, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 only in second loop */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - if (write_EXIF_data_to_current_directory(tif, i, &offsetEXIFBase[i])) - { - fprintf(stderr, - "Can't write EXIF data to current directory in %s. " - "Testline %d\n", - filename, __LINE__); - goto failure; - } - /* CustomDirectory invalidates directory number. */ - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - /* Go back to current main-IFD and update EXIF-IFD offset. */ - TIFFSetDirectory_M(tif, expected_curdir, filename, __LINE__); - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, offsetEXIFBase[i])) - { - fprintf(stderr, "Can't set TIFFTAG_EXIFIFD tag. Testline %d\n", - __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - expected_curdir++; - - /* Second loop starts with IFD 0 read from file. */ - TIFFSetDirectory_M(tif, 0, filename, __LINE__); - TIFFCreateDirectory(tif); - } - - /*-- Read EXIF Custom-Directory --*/ - for (unsigned int i = 0; i < 2; i++) - { - if (!TIFFReadEXIFDirectory(tif, offsetEXIFBase[i])) - { - fprintf(stderr, - "TIFFReadEXIFDirectory(%" PRIu64 ") failed for %s " - "at %d\n", - offsetEXIFBase[i], filename, __LINE__); - goto failure; - } - CHECKCURDIRNUM_M(tif, 0, __LINE__); - } - - /*-- Test for fail of ReadDirectory() and fail of SetDirectory() --*/ - /*-- Writing IFD0, IFD1 as valid IFD and IFD2 as corrupted. --*/ - uint64_t offsetBase[4]; - TIFFClose(tif); - tif = TIFFOpen(filename, openModeStrings[openMode]); - expected_curdir = 0; - fprintf(stderr, "----- Expect some error messages about 'scanline size is " - "zero' -----\n"); - for (int i = 0; i < 3; i++) - { - if (write_data_to_current_directory(tif, i, (i == 2 ? true : false))) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - /* Expect offsetBase{0,0,0} here, because TIFFWriteDirectory() returns - * a new and empty IFD after writing. */ - offsetBase[i] = TIFFCurrentDirOffset(tif); - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - expected_curdir++; - } - TIFFSetDirectory_M(tif, 0, filename, __LINE__); - offsetBase[0] = TIFFCurrentDirOffset(tif); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - TIFFSetDirectory_M(tif, 1, filename, __LINE__); - offsetBase[1] = TIFFCurrentDirOffset(tif); - CHECKCURDIRNUM_M(tif, 1, __LINE__); - /* TIFFReadDirectory() shall fail but curdir shall be incremented, - * because parts of corrupt IFD2 are read in. */ - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, - "TIFFReadDirectory() for IFD2 was expected to fail but " - "succeeded for %s " - "at %d\n", - filename, __LINE__); - goto failure; - } - offsetBase[2] = TIFFCurrentDirOffset(tif); - CHECKCURDIRNUM_M(tif, 2, __LINE__); - TIFFSetDirectory_M(tif, 0, filename, __LINE__); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - /* TIFFSetDirectory() shall fail on IFD2 but curdir shall be incremented, - * because parts of corrupt IFD2 are read in. */ - if (TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, - "TIFFSetDirectory(2) was expected to fail but succeeded for %s " - "at %d\n", - filename, __LINE__); - goto failure; - } - CHECKCURDIRNUM_M(tif, 2, __LINE__); - /* Also TIFFSetSubDirectory() shall fail for IFD2 and curdir shall be - * set correctly to 2. Therefore, set it back to IFD0 first. */ - TIFFSetDirectory_M(tif, 0, filename, __LINE__); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - if (TIFFSetSubDirectory(tif, offsetBase[2])) - { - fprintf(stderr, - "TIFFSetSubDirectory(%" PRIu64 - ") was expected to fail but succeeded for %s " - "at %d\n", - offsetBase[2], filename, __LINE__); - goto failure; - } - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, 2, __LINE__); - - /* However, TIFFSetSubDirectory() on a non valid IFD "offset" shall fail, - * and tif_curdir shall be set to "unknown" (-1). */ - fprintf(stderr, "----- Expect error messages about 'Sanity check AND " - "Failed to read directory' -----\n"); - if (TIFFSetSubDirectory(tif, 10)) - { - fprintf(stderr, - "TIFFSetSubDirectory(%" PRIu64 - ") was expected to fail but succeeded for %s " - "at %d\n", - offsetBase[1], filename, __LINE__); - goto failure; - } - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - /* Set IFD0 for next test */ - TIFFSetSubDirectory(tif, offsetBase[0]); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - - /* TIFFSetSubDirectory(0) shall invalidate the active IFD read from file by - * setting tif_nextdiroff and tif_diroff=0 */ - TIFFSetSubDirectory(tif, 0); - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - - /*-- Patch offset of IFD2 to not existing IFD3 without entries. - * Thus TIFFFetchDirectory() will fail. --*/ -#define TIFFReadFile_M(tif, buf, size) \ - ((*TIFFGetReadProc(tif))(TIFFClientdata(tif), (buf), (size))); -#define TIFFWriteFile_M(tif, buf, size) \ - ((*TIFFGetWriteProc(tif))(TIFFClientdata(tif), (buf), (size))); -#define TIFFSeekFile_M(tif, off, whence) \ - ((*TIFFGetSeekProc(tif))(TIFFClientdata(tif), (off), (whence))); - - /* --------------------------------------------------------------------- - * Test IFD index incrementing in case the functions return with certain - * errors. To provoke that errors, the file is patched by writing bytes - * directly into the file. Therefore, code below does only handle - * Classic-TIFF and little-endian files. - * The code works also on big endian machines, which have to swap some - * directly read/written values. - * --------------------------------------------------------------------- */ - if (!(TIFFIsBigEndian(tif) || TIFFIsBigTIFF(tif))) - { - /* Patch nextIFDOffset of IFD2, which is 0, with offset to itself. - * This generates an IFD3 without any elements at the end of file. - * Reading IFD3 should provoke reading error. */ - uint64_t ss = TIFFSeekFile_M(tif, offsetBase[2], 0); - uint16_t cnt = 0; - uint64_t rr = TIFFReadFile_M(tif, &cnt, 2); - if (TIFFIsByteSwapped(tif)) - TIFFSwabShort(&cnt); - ss = TIFFSeekFile_M(tif, offsetBase[2] + cnt * 12 + 2, 0); - uint32_t wt = (uint32_t)ss; - if (TIFFIsByteSwapped(tif)) - TIFFSwabLong(&wt); - rr = TIFFWriteFile_M(tif, &wt, 4); - (void)rr; - - /* Now there are offsets to four IFDs in the file, where the last one is - * not existing and has a non-valid dircount and entries behind EOF. - * (dircount is 458 (as offset) */ - fprintf(stderr, "----- Expect error messages about 'Error fetching " - "directory link.' -----\n"); - /* TIFFNumberOfDirectories() returns 3 and omits the invalid fourth IFD. - */ - lastdir = TIFFNumberOfDirectories(tif); - TIFFSetDirectory(tif, 0); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - - /* TIFFSetDirectory(3) fails with error messages: - * TIFFFetchDirectory: test_current_dirnum_incrementing_wl.tif: - * Can not read TIFF directory. - * TIFFReadDirectory: Failed to read directory at offset 458. */ - fprintf(stderr, "----- Expect error messages about 'Cannot read TIFF " - "directory.' -----\n"); - if (TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, - "TIFFSetDirectory(3) for IFD3 was expected to fail but " - "succeeded for %s " - "at %d\n", - filename, __LINE__); - goto failure; - } - - /* Fails in 4.6.0 */ - /* Reading invalid IFD 3 leads to an error and was not read in. - * Therefore, curdir shall be 65535 (non-existing directory) */ - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - offsetBase[3] = TIFFCurrentDirOffset(tif); - - /* Point IFD3 to a location within the file, where it has now for - * little-endian TIFF files a non-valid dircount=0, which leads also to - * an error and the IFD is not read in. */ - ss = TIFFSeekFile_M(tif, offsetBase[2] + cnt * 12 + 2, 0); - wt = (uint32_t)(offsetBase[1] + 8); - // wt = (uint32_t)(ss + 400); - if (TIFFIsByteSwapped(tif)) - TIFFSwabLong(&wt); - rr = TIFFWriteFile_M(tif, &wt, 4); - - fprintf(stderr, "----- Expect error messages about 'Error fetching " - "directory link.' -----\n"); - /* TIFFNumberOfDirectories() returns now 4, because for an IFD linked - * list dircount=0 is not treated as an error and there is an offset - * (=1) to a next IFD. Then, at the fifth IFD a link error occurs. */ - lastdir = TIFFNumberOfDirectories(tif); - TIFFSetDirectory(tif, 0); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - - /* TIFFSetDirectory(3) fails with error messages: - * test_current_dirnum_incrementing_wl.tif: Failed to allocate - * memory for to read TIFF directory (0 elements of 12 bytes each). - * TIFFReadDirectory: Failed to read directory at offset 178. - * The IFD 3 is not read in and curdir is set to 65535 (non-existing - * directory). - */ - fprintf(stderr, - "----- Expect error messages about 'Failed to allocate " - "memory for to read TIFF directory.' AND 'Failed to read " - "directory ..' -----\n"); - if (TIFFSetDirectory(tif, 3)) - { - fprintf(stderr, - "TIFFSetDirectory(3) for IFD3 was expected to fail but " - "succeeded for %s " - "at %d\n", - filename, __LINE__); - goto failure; - } - - /* Fails in 4.6.0 */ - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - if (tif) - { - TIFFClose(tif); - } - return 1; -} /*-- test_current_dirnum_incrementing() --*/ - -/* Test correct setting of tif_curdircount. - * - */ -int test_curdircount_setting(unsigned int openMode) -{ -#define N_DIRECTORIES_2 2 - char filename[128] = {0}; - tdir_t expected_curdir = (tdir_t)(-1); - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_dircount_%s.tif", openModeStrings[openMode]); - unlink(filename); - - /* Create a file and write N_DIRECTORIES_2 directories to it. */ - TIFF *tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - - /*-- Standard case for writing sequential IFDs. --*/ - for (int i = 0; i < N_DIRECTORIES_2; i++) - { - if (write_data_to_current_directory(tif, i, false)) - { - fprintf(stderr, - "Can't write data to current directory in %s at %d\n", - filename, __LINE__); - goto failure; - } - TIFFWriteDirectory_M(tif, filename, __LINE__); - expected_curdir++; - CHECKCURDIRNUM_M(tif, expected_curdir, __LINE__); - } - TIFFClose(tif); - - /* Simulate case for trap in TIFFLinkDirectory() where tif_lastdiroff is set - * but tif_curdircount is not. - * https://gitlab.com/libtiff/libtiff/-/merge_requests/634#note_1990250515 - */ - tif = TIFFOpen(filename, "r+"); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - TIFFRewriteDirectory(tif); - CHECKCURDIRNUM_M(tif, 0, __LINE__); - TIFFCreateDirectory(tif); - TIFFWriteDirectory(tif); - CHECKCURDIRNUM_M(tif, 2, __LINE__); - tdir_t numdir = TIFFNumberOfDirectories(tif); - TIFFClose(tif); - - /* Testcase iswrittentofile=0 for SetSubDirectory(0). */ - tif = TIFFOpen(filename, "r+"); - TIFFSetSubDirectory(tif, 0); - /* After TIFFSetSubDirectory(tif, 0) the read IFD is re-written as a - * new IFD and tif_curdir and tif_curdircount shall be updated. - * The latter was not the case before resetting iswrittentofile=0 at - * SetSubDirectory(0). Even an IFD-Loop was then wrongly assumed at the next - * TIFFNumberOfDirectories() call. */ - TIFFWriteDirectory(tif); - CHECKCURDIRNUM_M(tif, numdir, __LINE__); - - /* Unlink all directories. */ - numdir = TIFFNumberOfDirectories(tif); - for (int i = numdir; 0 < i; i--) - { - TIFFUnlinkDirectory(tif, i); - CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - TIFFClose(tif); - return 1; -} /*-- test_curdircount_setting() --*/ - -/* Test writing and reading of a custom directory only (solitary) without having - * touched a normal directory. - * Reproduces issue https://gitlab.com/libtiff/libtiff/-/issues/643. - * Error analysis of issue 643: - * Opening a file as read with "h" option does not initialize a default - * directory and thus, the pointer tif->tif_tagmethods.vsetfield and - * tif->tif_tagmethods.vgetfield are not initialized. This is done in - * TIFFDefaultDirectory(). In standard read functions, that default directory - * is set up but not for reading custom directories. Any call to - * TIFFSetField() or TIFFGetField() within TIFFReadCustomDirectory() will then - * fail or cause a SegFault. - */ -int test_solitary_custom_directory(unsigned int openMode) -{ - char filename[128] = {0}; - - if (openMode >= (sizeof(openModeStrings) / sizeof(openModeStrings[0]))) - { - fprintf(stderr, "Index %d for openMode parameter out of range.\n", - openMode); - return 1; - } - - /* Get individual filenames and delete existent ones. */ - sprintf(filename, "test_solitary_custom_directory_%s.tif", - openModeStrings[openMode]); - unlink(filename); - - /* Create a dummy file without IFD. */ - TIFF *tif = TIFFOpen(filename, openModeStrings[openMode]); - if (!tif) - { - fprintf(stderr, "Can't create %s\n", filename); - return 1; - } - /* A TIFFSetFiled() here would work. */ - TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, "DocName"); - TIFFClose(tif); - - /* Open file without reading a directory using option "h". - * Option "h" suppresses to load the directory. Thus reading functions are - * hot set. Read TIFF header only, do not load the first image directory. - * That could be useful in case of the broken first directory. We can open - * the file and proceed to the other directories. - */ - tif = TIFFOpen(filename, "r+h"); - if (!tif) - { - fprintf(stderr, "Can't open %s\n", filename); - return 1; - } - /* A TIFFSetField() here would fail or cause a SegFault, because of the "h" - * option before fix of issue 643. */ - TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, "DocName"); - - /* Write a custom directory. */ - uint64_t offsetEXIFBase; - if (write_EXIF_data_to_current_directory(tif, 0, &offsetEXIFBase)) - { - fprintf(stderr, - "Can't write solitary EXIF data into %s. " - "Testline %d\n", - filename, __LINE__); - goto failure; - } - TIFFClose(tif); - - /* Open and read custom directory without touching another IFD. */ - tif = TIFFOpen(filename, "rh"); - if (!tif) - { - fprintf(stderr, "Can't open %s\n", filename); - return 1; - } - /* This custom directory reading will cause a SegFault due to the "h" - * option before fix of issue 643. */ - if (!TIFFReadEXIFDirectory(tif, offsetEXIFBase)) - { - fprintf(stderr, - "Can't read solitary EXIF data from %s. " - "Testline %d\n", - filename, __LINE__); - goto failure; - } - - TIFFClose(tif); - unlink(filename); - return 0; - -failure: - TIFFClose(tif); - return 1; -} /*-- test_solitary_custom_directory() --*/ - -int main() -{ - - unsigned int openModeMax = - (sizeof(openModeStrings) / sizeof(openModeStrings[0])); - for (unsigned int openMode = 0; openMode < openModeMax; openMode++) - { - fprintf(stderr, "\n--- Test for %s open option. ---\n", - openModeText[openMode]); - if (test_curdircount_setting(openMode)) - { - fprintf(stderr, "Failed during %s test_curdircount_setting test.\n", - openModeText[openMode]); - return 1; - } - - if (test_lastdir_offset(openMode)) - { - fprintf(stderr, "Failed during %s WriteDirectory test.\n", - openModeText[openMode]); - return 1; - } - - if (test_rewrite_lastdir_offset(openMode)) - { - fprintf(stderr, "Failed during %s RewriteDirectory test.\n", - openModeText[openMode]); - return 1; - } - - /* Test arbitrary directory loading */ - if (test_arbitrary_directrory_loading(openMode)) - { - fprintf(stderr, - "Failed during %s ArbitraryDirectoryLoading test.\n", - openModeText[openMode]); - return 1; - } - - /* Test SubIFD writing and reading */ - if (test_SubIFD_directrory_handling(openMode)) - { - fprintf(stderr, - "Failed during %s SubIFD_directrory_handling test.\n", - openModeText[openMode]); - return 1; - } - /* Test for failure in TIFFSetSubDirectory() */ - if (test_SetSubDirectory_failure(openMode)) - { - fprintf(stderr, "Failed during %s SetSubDirectory_failure test.\n", - openModeText[openMode]); - return 1; - } - } - - /* Test for correct "current directory number" incrementing.*/ - for (unsigned int openMode = 0; openMode < openModeMax; openMode++) - { - for (int i = 0; i <= 2; i++) - { - fprintf(stderr, - "\n--- Test for test_current_dirnum_incrementing %s " - "testcase %d. " - "---\n", - openModeText[openMode], i); - if (test_current_dirnum_incrementing(i, openMode)) - { - fprintf(stderr, - "Failed during Current Directory Number Incrementing " - "test #%d in %s.\n", - i, openModeText[openMode]); - return 1; - } - } - } - - /* Test for reading / writing custom directory (e.g. EXIF) without having - * touched a normal directory. */ - for (unsigned int openMode = 0; openMode < openModeMax; openMode++) - { - fprintf(stderr, - "\n--- Test for test_solitary_custom_directory %s ---\n", - openModeText[openMode]); - if (test_solitary_custom_directory(openMode)) - { - fprintf(stderr, - "Failed during test_solitary_custom_directory in %s.\n", - openModeText[openMode]); - return 1; - } - } - - return 0; -} diff --git a/third_party/libtiff/test/test_ifd_loop_detection.c b/third_party/libtiff/test/test_ifd_loop_detection.c deleted file mode 100644 index 866da39..0000000 --- a/third_party/libtiff/test/test_ifd_loop_detection.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright (c) 2022, Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Test IFD loop detection - */ - -#include "tif_config.h" - -#include -#include -#include -#include - -#include "tiffio.h" - -/* Compare 'requested_dir_number' with number written in PageName tag - * into the IFD to identify that IFD. */ -int is_requested_directory(TIFF *tif, int requested_dir_number, - const char *filename) -{ - char *ptr = NULL; - char *auxStr = NULL; - - if (!TIFFGetField(tif, TIFFTAG_PAGENAME, &ptr)) - { - fprintf(stderr, "Can't get TIFFTAG_PAGENAME tag.\n"); - return 0; - } - - /* Check for reading errors */ - if (ptr != NULL) - auxStr = strchr(ptr, ' '); - - if (ptr == NULL || auxStr == NULL || strncmp(auxStr, " th.", 4)) - { - ptr = ptr == NULL ? "(null)" : ptr; - fprintf(stderr, - "Error reading IFD directory number from PageName tag: %s\n", - ptr); - return 0; - } - - /* Retrieve IFD identification number from ASCII string */ - const int nthIFD = atoi(ptr); - if (nthIFD == requested_dir_number) - { - return 1; - } - fprintf(stderr, "Expected directory %d from %s was not loaded but: %s\n", - requested_dir_number, filename, ptr); - - return 0; -} - -/* Test loop detection within chained SubIFDs. - * test_ifd_loop_subifd.tif contains seven main-IFDs (0 to 6) and within IFD 1 - * there are three SubIFDs (0 to 2). Main IFD 4 loops back to main IFD 2. - * SubIFD 2 loops back to SubIFD 1. - * Within each IFD the tag PageName is filled with a string, indicating the - * IFD. The main IFDs are numbered 0 to 6 and the SubIFDs 200 to 202. */ -int test_subifd_loop(void) -{ - const char *filename = SOURCE_DIR "/images/test_ifd_loop_subifd.tif"; - TIFF *tif; - int i, n; - int ret = 0; -#define NUMBER_OF_SUBIFDs 3 - toff_t sub_IFDs_offsets[NUMBER_OF_SUBIFDs] = { - 0UL}; /* array for SubIFD tag */ - void *ptr; - uint16_t number_of_sub_IFDs = 0; - - tif = TIFFOpen(filename, "r"); - if (!tif) - { - fprintf(stderr, "Can't open %s\n", filename); - return 1; - } - - /* Try to read six further main directories. Fifth read shall fail. */ - for (i = 0; i < 6; i++) - { - if (!TIFFReadDirectory(tif)) - break; - } - if (i != 4) - { - fprintf(stderr, "(30) Expected fifth TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (!is_requested_directory(tif, 4, filename)) - { - fprintf(stderr, "(31) Expected fifth main IFD to be loaded\n"); - ret = 1; - } - - /* Switch to IFD 1 and get SubIFDs. - * Then read through SubIFDs and detect SubIFD loop. - * Finally go back to main-IFD and check if right IFD is loaded. - */ - if (!TIFFSetDirectory(tif, 1)) - ret = 1; - - /* Check if there are SubIFD subfiles */ - if (TIFFGetField(tif, TIFFTAG_SUBIFD, &number_of_sub_IFDs, &ptr) && - (number_of_sub_IFDs == 3)) - { - /* Copy SubIFD array from pointer */ - memcpy(sub_IFDs_offsets, ptr, - number_of_sub_IFDs * sizeof(sub_IFDs_offsets[0])); - - for (i = 0; i < number_of_sub_IFDs; i++) - { - /* Read SubIFD directory directly via offset. - * SubIFDs PageName string contains numbers 200 to 202. */ - if (!TIFFSetSubDirectory(tif, sub_IFDs_offsets[i])) - ret = 1; - if (!is_requested_directory(tif, 200 + i, filename)) - { - fprintf(stderr, "(32) Expected SubIFD %d to be loaded.\n", i); - ret = 1; - } - /* Now test SubIFD loop detection. - * The (i+n).th read in the SubIFD chain shall fail. */ - for (n = 0; n < number_of_sub_IFDs; n++) - { - if (!TIFFReadDirectory(tif)) - break; - } - if ((i + n) != 2) - { - fprintf( - stderr, - "(33) Expected third SubIFD-TIFFReadDirectory() to fail\n"); - ret = 1; - } - } - /* Go back to main-IFD chain and re-read that main-IFD directory */ - if (!TIFFSetDirectory(tif, 3)) - ret = 1; - if (!is_requested_directory(tif, 3, filename)) - { - fprintf(stderr, "(34) Expected fourth main IFD to be loaded\n"); - ret = 1; - } - } - else - { - fprintf(stderr, "(35) No or wrong expected SubIFDs within main IFD\n"); - ret = 1; - } - - TIFFClose(tif); - return ret; -} /*-- test_subifd_loop() --*/ - -int main() -{ - int ret = 0; - { - TIFF *tif = - TIFFOpen(SOURCE_DIR "/images/test_ifd_loop_to_self.tif", "r"); - assert(tif); - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(1) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - TIFFClose(tif); - } - { - TIFF *tif = - TIFFOpen(SOURCE_DIR "/images/test_ifd_loop_to_self.tif", "r"); - assert(tif); - int n = TIFFNumberOfDirectories(tif); - if (n != 1) - { - fprintf( - stderr, - "(2) Expected TIFFNumberOfDirectories() to return 1. Got %d\n", - n); - ret = 1; - } - TIFFClose(tif); - } - { - TIFF *tif = - TIFFOpen(SOURCE_DIR "/images/test_ifd_loop_to_first.tif", "r"); - assert(tif); - if (TIFFReadDirectory(tif) != 1) - { - fprintf(stderr, "(3) Expected TIFFReadDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(4) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 1) != 1) - { - fprintf(stderr, "(5) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(6) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 0) != 1) - { - fprintf(stderr, "(7) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif) != 1) - { - fprintf(stderr, "(8) Expected TIFFReadDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(9) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - TIFFClose(tif); - } - { - TIFF *tif = - TIFFOpen(SOURCE_DIR "/images/test_ifd_loop_to_first.tif", "r"); - assert(tif); - int n = TIFFNumberOfDirectories(tif); - if (n != 2) - { - fprintf( - stderr, - "(10) Expected TIFFNumberOfDirectories() to return 2. Got %d\n", - n); - ret = 1; - } - TIFFClose(tif); - } - { - TIFF *tif = TIFFOpen(SOURCE_DIR "/images/test_two_ifds.tif", "r"); - assert(tif); - if (TIFFReadDirectory(tif) != 1) - { - fprintf(stderr, "(11) Expected TIFFReadDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(12) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 1) != 1) - { - fprintf(stderr, "(13) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(14) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 0) != 1) - { - fprintf(stderr, "(15) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif) != 1) - { - fprintf(stderr, "(16) Expected TIFFReadDirectory() to succeed\n"); - ret = 1; - } - if (TIFFReadDirectory(tif)) - { - fprintf(stderr, "(17) Expected TIFFReadDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 0) != 1) - { - fprintf(stderr, "(18) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 1) != 1) - { - fprintf(stderr, "(19) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 2)) - { - fprintf(stderr, "(20) Expected TIFFSetDirectory() to fail\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 1) != 1) - { - fprintf(stderr, "(21) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - if (TIFFSetDirectory(tif, 0) != 1) - { - fprintf(stderr, "(22) Expected TIFFSetDirectory() to succeed\n"); - ret = 1; - } - TIFFClose(tif); - } - { - TIFF *tif = TIFFOpen(SOURCE_DIR "/images/test_two_ifds.tif", "r"); - assert(tif); - int n = TIFFNumberOfDirectories(tif); - if (n != 2) - { - fprintf( - stderr, - "(23) Expected TIFFNumberOfDirectories() to return 2. Got %d\n", - n); - ret = 1; - } - TIFFClose(tif); - } - ret += test_subifd_loop(); - return ret; -} diff --git a/third_party/libtiff/test/test_open_options.c b/third_party/libtiff/test/test_open_options.c deleted file mode 100644 index 570f394..0000000 --- a/third_party/libtiff/test/test_open_options.c +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright (c) 2022, Even Rouault - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Test open options - */ - -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" // for struct TIFF - -#define ERROR_STRING_SIZE 1024 - -/* Test TIFFLIB_AT_LEAST() macro */ -#if !TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, \ - TIFFLIB_MICRO_VERSION) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if !TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, 0) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if !TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION, 0, 0) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if !TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION - 1, 0, 0) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION + 1, 0, 0) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION + 1, 0) -#error "TIFFLIB_AT_LEAST broken" -#endif -#if TIFFLIB_AT_LEAST(TIFFLIB_MAJOR_VERSION, TIFFLIB_MINOR_VERSION, \ - TIFFLIB_MICRO_VERSION + 1) -#error "TIFFLIB_AT_LEAST broken" -#endif - -typedef struct MyErrorHandlerUserDataStruct -{ - char *buffer; - size_t buffer_size; - TIFF *tif_got_from_callback; - char module[64]; -} MyErrorHandlerUserDataStruct; - -static int myErrorHandler(TIFF *tiff, void *user_data, const char *module, - const char *fmt, va_list ap) -{ - MyErrorHandlerUserDataStruct *errorhandler_user_data = - (MyErrorHandlerUserDataStruct *)user_data; - vsnprintf(errorhandler_user_data->buffer, - errorhandler_user_data->buffer_size, fmt, ap); - errorhandler_user_data->tif_got_from_callback = tiff; - snprintf(errorhandler_user_data->module, - sizeof(errorhandler_user_data->module), "%s", module); - return 1; -} - -static int test_error_handler() -{ - int ret = 0; - char error_buffer[ERROR_STRING_SIZE] = {0}; - char warn_buffer[ERROR_STRING_SIZE] = {0}; - MyErrorHandlerUserDataStruct errorhandler_user_data = { - .buffer = error_buffer, .buffer_size = ERROR_STRING_SIZE}; - MyErrorHandlerUserDataStruct warnhandler_user_data = { - .buffer = warn_buffer, .buffer_size = ERROR_STRING_SIZE}; - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - assert(opts); - TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, - &errorhandler_user_data); - TIFFOpenOptionsSetWarningHandlerExtR(opts, myErrorHandler, - &warnhandler_user_data); - TIFF *tif = TIFFOpenExt("test_error_handler.tif", "w", opts); - TIFFOpenOptionsFree(opts); - - if (tif == NULL) - { - fprintf(stderr, "Cannot create test_error_handler.tif"); - exit(1); - } - - // Simulate an error emitted by libtiff - TIFFErrorExtR(tif, "my_error_module", "%s", "some error message"); - if (strcmp(error_buffer, "some error message") != 0) - { - fprintf(stderr, "Did not get expected error message\n"); - ret = 1; - } - if (strcmp(errorhandler_user_data.module, "my_error_module") != 0) - { - fprintf(stderr, "Did not get expected error module\n"); - ret = 1; - } - if (errorhandler_user_data.tif_got_from_callback != tif) - { - fprintf(stderr, - "errorhandler_user_data.tif_got_from_callback != tif\n"); - ret = 1; - } - - // Simulate a warning emitted by libtiff - TIFFWarningExtR(tif, "my_warning_module", "%s", "some warning message"); - if (strcmp(warn_buffer, "some warning message") != 0) - { - fprintf(stderr, "Did not get expected warning message\n"); - ret = 1; - } - if (strcmp(warnhandler_user_data.module, "my_warning_module") != 0) - { - fprintf(stderr, "Did not get expected warning module\n"); - ret = 1; - } - if (warnhandler_user_data.tif_got_from_callback != tif) - { - fprintf(stderr, "warnhandler_user_data.tif_got_from_callback != tif\n"); - ret = 1; - } - - TIFFClose(tif); - unlink("test_error_handler.tif"); - return ret; -} - -static int test_TIFFOpenOptionsSetMaxSingleMemAlloc( - tmsize_t limit, int expected_to_fail_in_open, - int expected_to_fail_in_write_directory, bool is_big_tiff) -{ - int ret = 0; - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - assert(opts); - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); - TIFF *tif = - TIFFOpenExt("test_error_handler.tif", is_big_tiff ? "w8" : "w", opts); - TIFFOpenOptionsFree(opts); - if (expected_to_fail_in_open) - { - if (tif != NULL) - { - fprintf( - stderr, - "Expected TIFFOpenExt() to fail due to memory limitation\n"); - ret = 1; - TIFFClose(tif); - } - } - else - { - if (tif == NULL) - { - fprintf(stderr, "Expected TIFFOpenExt() to succeed\n"); - ret = 1; - } - else - { -#define VALUE_SAMPLESPERPIXEL 10000 - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, VALUE_SAMPLESPERPIXEL); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - if (TIFFWriteDirectory(tif) == 0) - { - if (!expected_to_fail_in_write_directory) - { - fprintf(stderr, - "Expected TIFFWriteDirectory() to succeed\n"); - ret = 1; - } - } - else - { - if (expected_to_fail_in_write_directory) - { - fprintf(stderr, "Expected TIFFWriteDirectory() to fail\n"); - ret = 1; - } - } - TIFFClose(tif); - } - } - unlink("test_error_handler.tif"); - return ret; -} - -static int test_TIFFOpenOptionsSetMaxCumulatedMemAlloc( - tmsize_t limit, int expected_to_fail_in_open, - int expected_to_fail_in_write_directory) -{ - int ret = 0; - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - assert(opts); - TIFFOpenOptionsSetMaxCumulatedMemAlloc(opts, limit); - TIFF *tif = TIFFOpenExt("test_error_handler.tif", "w", opts); - TIFFOpenOptionsFree(opts); - if (expected_to_fail_in_open) - { - if (tif != NULL) - { - fprintf( - stderr, - "Expected TIFFOpenExt() to fail due to memory limitation\n"); - ret = 1; - TIFFClose(tif); - } - } - else - { - if (tif == NULL) - { - fprintf(stderr, "Expected TIFFOpenExt() to succeed\n"); - ret = 1; - } - else - { -#define VALUE_SAMPLESPERPIXEL 10000 - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, VALUE_SAMPLESPERPIXEL); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - if (TIFFWriteDirectory(tif) == 0) - { - if (!expected_to_fail_in_write_directory) - { - fprintf(stderr, - "Expected TIFFWriteDirectory() to succeed\n"); - ret = 1; - } - } - else - { - if (expected_to_fail_in_write_directory) - { - fprintf(stderr, "Expected TIFFWriteDirectory() to fail\n"); - ret = 1; - } - } - TIFFClose(tif); - } - } - unlink("test_error_handler.tif"); - return ret; -} - -int test_header_byte_order(TIFF *tif, char *openModeString) -{ - - if (tif->tif_header.common.tiff_magic != TIFF_BIGENDIAN && - tif->tif_header.common.tiff_magic != TIFF_LITTLEENDIAN) - { - fprintf(stderr, - "Bad magic number %" PRIu16 " (0x%4.4" PRIx16 ") for '%s'\n", - tif->tif_header.common.tiff_magic, - tif->tif_header.common.tiff_magic, openModeString); - return 1; - } - if ((tif->tif_header.common.tiff_version != TIFF_VERSION_CLASSIC) && - (tif->tif_header.common.tiff_version != TIFF_VERSION_BIG)) - { - fprintf(stderr, - "Bad version number %" PRIu16 " (0x%4.4" PRIx16 - ") for '%s'. Should be 0x%4.4" PRIx16 ".\n", - tif->tif_header.common.tiff_version, - tif->tif_header.common.tiff_version, openModeString, - TIFF_VERSION_CLASSIC); - return 1; - } - if (TIFFIsBigTIFF(tif)) - { - if (tif->tif_header.big.tiff_offsetsize != 8) - { - fprintf(stderr, - "Bad BigTIFF offset-size %" PRIu16 " (0x%4.4" PRIx16 - ") for '%s'. Should be 8.\n", - tif->tif_header.big.tiff_offsetsize, - tif->tif_header.big.tiff_offsetsize, openModeString); - return 1; - } - } - - return 0; -} - -int open_file_and_write(const char *filename, char *openModeString, - int blnWriteIFD, int blnClose, TIFF **tifOut) -{ - TIFF *tif = TIFFOpen(filename, openModeString); - if (tifOut != NULL) - *tifOut = tif; - if (!tif) - { - fprintf(stderr, "Can't create or open %s\n", filename); - return 0x0100; - } - int ret = test_header_byte_order(tif, openModeString); - if (blnWriteIFD) - { - unsigned char buf[3] = {253, 127, 255}; - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFWriteScanline(tif, buf, 0, 0); - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "TIFFWriteDirectory() failed for %s.\n", filename); - TIFFClose(tif); - if (tifOut != NULL) - *tifOut = NULL; - return 0x1000; - } - if (test_header_byte_order(tif, openModeString)) - ret += 0x0010; - } - if (blnClose) - { - TIFFClose(tif); - if (tifOut != NULL) - *tifOut = NULL; - } - return ret; -} - -/* Checks that parameters of internal 'tif_header' structure are all swapped to - * host byte-order. - * - * Till LibTIFF 4.6.0 the parameters 'tiff_magic', 'tiff_version' and - * 'tiff_offsetsize' are swapped or not, depending how the file was opened: They - * were not swapped when opening with "w" or opening an not existent file with - * "a". They were swapped when opening an existent file with "r" or "a". This - * behaviour shall be harmonized so that the internal parameters are always in - * host byte-order. - */ -int test_TIFFheader_swapping(void) -{ - - /* Provoke swapping and non-swapping on any host. */ - char *openModeStrings[2][8] = {{"wb", "ab", "w8b", "a8b", "r"}, - {"wl", "al", "w8l", "a8l", "r"}}; - const char *filename = "test_TIFFheader_swapping.tif"; - TIFF *tif; - int ret = 0; - - unlink(filename); - - for (unsigned int i = 0; i < 2; i++) - { - for (unsigned int k = 0; k < 4; k += 2) - { - /* Classic TIFF an BigTIFF */ - /* Before fix, 'wb' and 'wb8' failed on little-endian hosts, - * and 'wl' and 'wl8' failed on big-endian hosts. */ - unsigned int kk = k; /* Existing read-only */ - if (open_file_and_write(filename, openModeStrings[i][kk], FALSE, - TRUE, &tif)) - { - fprintf(stderr, - "TIFF header byte-order in opening mode '%s' failed.\n", - openModeStrings[i][kk]); - ret++; - } - kk++; /* Existing in append */ - if (open_file_and_write(filename, openModeStrings[i][kk], TRUE, - TRUE, &tif)) - { - fprintf(stderr, - "TIFF header byte-order in opening mode '%s' failed.\n", - openModeStrings[i][kk]); - ret++; - } - - kk = 4; /* Existing read-only */ - if (open_file_and_write(filename, openModeStrings[i][kk], FALSE, - TRUE, &tif)) - { - fprintf(stderr, - "TIFF header byte-order in opening mode '%s' failed.\n", - openModeStrings[i][kk]); - ret++; - } - unlink(filename); - } - - for (unsigned int k = 1; k < 4; k += 2) - { - /* Classic and BigTIFF: - * Open and write two IFD with non-existing file in append - * mode. Test also TIFFUnlinkDirectory(1) for known bug. */ - /* Before fix, 'wb' and 'wb8' failed on little-endian hosts, - * and 'wl' and 'wl8' failed on big-endian hosts. */ - if (open_file_and_write(filename, openModeStrings[i][k], TRUE, TRUE, - &tif)) - { - fprintf(stderr, - "TIFF header byte-order in opening mode '%s' failed.\n", - openModeStrings[i][k]); - ret++; - } - /* Write second IFD for unlinking of first IFD and keep file open. - */ - if (open_file_and_write(filename, openModeStrings[i][k], TRUE, - FALSE, &tif)) - { - fprintf(stderr, - "TIFF header byte-order in opening mode '%s' failed.\n", - openModeStrings[i][k]); - ret++; - } - if (!TIFFUnlinkDirectory(tif, 1)) - { - fprintf(stderr, - "TIFFUnlinkDirectory(1) in opening mode '%s' failed.\n", - openModeStrings[i][k]); - ret++; - } - if (test_header_byte_order(tif, openModeStrings[i][k])) - { - fprintf( - stderr, - "TIFF header byte-order after TIFFUnlinkDirectory(1) in " - "opening mode '%s' failed.\n", - openModeStrings[i][k]); - ret++; - } - /* Before fix, TIFFSetDirectory() failed when BigTIFF and swapping - * is needed, because TIFFUnlinkDirectory() stores tiff_diroff in - * wrong byte-order then. */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, - "TIFFSetDirectory(0) after TIFFUnlinkDirectory(1) in " - "opening mode '%s' failed.\n", - openModeStrings[i][k]); - ret++; - } - TIFFClose(tif); - unlink(filename); - } - } - - unlink(filename); - return ret; -} - -int main() -{ - int ret = 0; - fprintf(stderr, "=== test_open_options .... ===\n"); - fprintf(stderr, "---- test_TIFFheader_swapping ---- \n"); - if (ret += test_TIFFheader_swapping()) - { - fprintf(stderr, - "--- Failed during test_TIFFheader_swapping test with %d " - "fails. ---\n", - ret); - } - - ret += test_error_handler(); - fprintf(stderr, "\n---- test_TIFFOpenOptionsSetMaxSingleMemAlloc " - "with non-BigTIFF ---- \n"); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc(1, TRUE, -1, FALSE); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc( - sizeof(TIFF) + strlen("test_error_handler.tif") + 1, FALSE, TRUE, - FALSE); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc( - VALUE_SAMPLESPERPIXEL * sizeof(short), FALSE, FALSE, FALSE); - - fprintf(stderr, "\n---- test_TIFFOpenOptionsSetMaxSingleMemAlloc " - "with BigTIFF ---- \n"); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc(1, TRUE, -1, TRUE); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc( - sizeof(TIFF) + strlen("test_error_handler.tif") + 1, FALSE, TRUE, TRUE); - ret += test_TIFFOpenOptionsSetMaxSingleMemAlloc( - VALUE_SAMPLESPERPIXEL * sizeof(short), FALSE, FALSE, TRUE); - - fprintf(stderr, - "\n---- test_TIFFOpenOptionsSetMaxCumulatedMemAlloc ---- \n"); - ret += test_TIFFOpenOptionsSetMaxCumulatedMemAlloc(1, TRUE, -1); - ret += test_TIFFOpenOptionsSetMaxCumulatedMemAlloc( - sizeof(TIFF) + strlen("test_error_handler.tif") + 1, FALSE, TRUE); - ret += test_TIFFOpenOptionsSetMaxCumulatedMemAlloc( - sizeof(TIFF) + strlen("test_error_handler.tif") + 1 + 30000, FALSE, - FALSE); - if (ret > 0) - fprintf(stderr, "\n=== test_open_options failed with %d fails ===\n", - ret); - else - fprintf(stderr, "\n=== test_open_options finished OK ===\n"); - - return ret; -} diff --git a/third_party/libtiff/test/test_signed_tags.c b/third_party/libtiff/test/test_signed_tags.c deleted file mode 100644 index 0eb8865..0000000 --- a/third_party/libtiff/test/test_signed_tags.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - * Copyright (c) 2022, Su Laus @Su_Laus - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * the author may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of the author. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* =========== Purpose =============================================== - * Tests the following points: - * - Handling of signed tags - * - Definition of additional, user-defined tags - * - Specification of field name strings or with field_name = NULL - * - Prevent reading anonymous tags by specifying them as FIELD_IGNORE - * (see https://gitlab.com/libtiff/libtiff/-/issues/532) - * - Immediate clearing of the memory for the definition of the additional tags - * (allocate memory for TIFFFieldInfo structure and free that memory - * immediately after calling TIFFMergeFieldInfo(). - */ - -#include /* necessary for linux compiler (memset) */ -#include -#include /* necessary for linux compiler */ - -#include "tif_config.h" /* necessary for linux compiler to get HAVE_UNISTD_H */ -#ifdef HAVE_UNISTD_H -#include /* for unlink() on linux */ -#endif - -#include - -#define FAULT_RETURN 1 -#define OK_RETURN 0 -#define GOTOFAILURE goto failure; - -#define N(a) (sizeof(a) / sizeof(a[0])) - -#define FIELD_IGNORE 0 /* same as FIELD_PSEUDO */ - -enum -{ - SINT8 = 65100, - SINT16, - SINT32, - SINT64, - C0_SINT8, - C0_SINT16, - C0_SINT32, - C0_SINT64, - C16_SINT8, - C16_SINT16, - C16_SINT32, - C16_SINT64, - C32_SINT8, - C32_SINT16, - C32_SINT32, - C32_SINT64, - C32_SINT64NULL, -}; - -static const TIFFFieldInfo tiff_field_info[] = { - {SINT8, 1, 1, TIFF_SBYTE, FIELD_CUSTOM, 0, 0, "SINT8"}, - {SINT16, 1, 1, TIFF_SSHORT, FIELD_CUSTOM, 0, 0, "SINT16"}, - {SINT32, 1, 1, TIFF_SLONG, FIELD_CUSTOM, 0, 0, "SINT32"}, - {SINT64, 1, 1, TIFF_SLONG8, FIELD_CUSTOM, 0, 0, "SINT64"}, - {C0_SINT8, 6, 6, TIFF_SBYTE, FIELD_CUSTOM, 0, 0, "C0_SINT8"}, - {C0_SINT16, 6, 6, TIFF_SSHORT, FIELD_CUSTOM, 0, 0, "C0_SINT16"}, - {C0_SINT32, 6, 6, TIFF_SLONG, FIELD_CUSTOM, 0, 0, "C0_SINT32"}, - {C0_SINT64, 6, 6, TIFF_SLONG8, FIELD_CUSTOM, 0, 0, "C0_SINT64"}, - {C16_SINT8, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_SBYTE, FIELD_CUSTOM, 0, 1, - "C16_SINT8"}, - {C16_SINT16, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_SSHORT, FIELD_CUSTOM, 0, 1, - "C16_SINT16"}, - {C16_SINT32, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_SLONG, FIELD_CUSTOM, 0, 1, - "C16_SINT32"}, - {C16_SINT64, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_SLONG8, FIELD_CUSTOM, 0, 1, - "C16_SINT64"}, - {C32_SINT8, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_SBYTE, FIELD_CUSTOM, 0, 1, - "C32_SINT8"}, - {C32_SINT16, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_SSHORT, FIELD_CUSTOM, 0, - 1, "C32_SINT16"}, - {C32_SINT32, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_SLONG, FIELD_CUSTOM, 0, 1, - "C32_SINT32"}, - {C32_SINT64, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_SLONG8, FIELD_CUSTOM, 0, - 1, "C32_SINT64"}, - /* Test field_name=NULL in static const array, which is now possible because - * handled within TIFFMergeFieldInfo(). */ - {C32_SINT64NULL, TIFF_VARIABLE2, TIFF_VARIABLE2, TIFF_SLONG8, FIELD_CUSTOM, - 0, 1, NULL}, -}; - -/* Global parameter for the field array to be passed to extender, which can be - * changed during runtime. */ -static TIFFFieldInfo *p_tiff_field_info = (TIFFFieldInfo *)tiff_field_info; -static uint32_t N_tiff_field_info = - sizeof(tiff_field_info) / sizeof(tiff_field_info[0]); - -static TIFFExtendProc parent = NULL; - -static void extender(TIFF *tif) -{ - if (p_tiff_field_info != NULL) - { - TIFFMergeFieldInfo(tif, p_tiff_field_info, N_tiff_field_info); - if (parent) - { - (*parent)(tif); - } - } - else - { - TIFFErrorExtR(tif, "field_info_extender", - "Pointer to tiff_field_info array is NULL."); - } -} - -/*-- Global test fields --*/ -int8_t s8[] = {-8, -9, -10, -11, INT8_MAX, INT8_MIN}; -int16_t s16[] = {-16, -17, -18, -19, INT16_MAX, INT16_MIN}; -int32_t s32[] = {-32, -33, -34, -35, INT32_MAX, INT32_MIN}; -int64_t s64[] = {-64, -65, -66, -67, INT64_MAX, INT64_MIN}; - -const uint32_t idxSingle = 0; - -static int writeTestTiff(const char *szFileName, int isBigTiff) -{ - int ret; - TIFF *tif; - int retcode = FAULT_RETURN; - - unlink(szFileName); - if (isBigTiff) - { - fprintf(stdout, "\n-- Writing signed values to BigTIFF...\n"); - tif = TIFFOpen(szFileName, "w8"); - } - else - { - fprintf(stdout, "\n-- Writing signed values to ClassicTIFF...\n"); - tif = TIFFOpen(szFileName, "w"); - } - if (!tif) - { - fprintf(stdout, "Can't create test TIFF file %s.\n", szFileName); - return (FAULT_RETURN); - } - - ret = TIFFSetField(tif, SINT8, s8[idxSingle]); - if (ret != 1) - { - fprintf(stdout, "Error writing SINT8: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, SINT16, s16[idxSingle]); - if (ret != 1) - { - fprintf(stdout, "Error writing SINT16: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, SINT32, s32[idxSingle]); - if (ret != 1) - { - fprintf(stdout, "Error writing SINT32: ret=%d\n", ret); - GOTOFAILURE; - } - - TIFFSetField(tif, C0_SINT8, &s8); - TIFFSetField(tif, C0_SINT16, &s16); - TIFFSetField(tif, C0_SINT32, &s32); - - TIFFSetField(tif, C16_SINT8, 6, &s8); - TIFFSetField(tif, C16_SINT16, 6, &s16); - TIFFSetField(tif, C16_SINT32, 6, &s32); - - TIFFSetField(tif, C16_SINT8, 6, &s8); - TIFFSetField(tif, C16_SINT16, 6, &s16); - TIFFSetField(tif, C16_SINT32, 6, &s32); - - TIFFSetField(tif, C32_SINT8, 6, &s8); - TIFFSetField(tif, C32_SINT16, 6, &s16); - TIFFSetField(tif, C32_SINT32, 6, &s32); - - if (isBigTiff) - { - ret = TIFFSetField(tif, SINT64, s64[0]); - if (ret != 1) - { - fprintf(stdout, "Error writing SINT64: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, C0_SINT64, &s64); - if (ret != 1) - { - fprintf(stdout, "Error writing C0_SINT64: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, C16_SINT64, N(s64), &s64); - if (ret != 1) - { - fprintf(stdout, "Error writing C16_SINT64: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, C32_SINT64, N(s64), &s64); - if (ret != 1) - { - fprintf(stdout, "Error writing C32_SINT64: ret=%d\n", ret); - GOTOFAILURE; - } - ret = TIFFSetField(tif, C32_SINT64NULL, N(s64), &s64); - if (ret != 1) - { - fprintf(stdout, "Error writing C32_SINT64NULL: ret=%d\n", ret); - GOTOFAILURE; - } - } - - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); - ret = (int)TIFFWriteEncodedStrip(tif, 0, "\0", 1); - if (ret != 1) - { - fprintf(stdout, "Error TIFFWriteEncodedStrip: ret=%d\n", ret); - GOTOFAILURE; - } - - retcode = OK_RETURN; -failure: - TIFFClose(tif); - return (retcode); -} - -static int readTestTiff(const char *szFileName, int isBigTiff) -{ - int ret; - int i; - int8_t s8l, *s8p; - int16_t s16l, *s16p; - int32_t s32l, *s32p; - int64_t s64l, *s64p; - uint16_t count; - uint32_t count32; - int retcode = FAULT_RETURN; - - fprintf(stdout, "-- Reading signed values ...\n"); - TIFF *tif = TIFFOpen(szFileName, "r"); - if (!tif) - { - fprintf(stdout, "Can't open test TIFF file %s.\n", szFileName); - return (FAULT_RETURN); - } - - ret = TIFFGetField(tif, SINT8, &s8l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT8: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s8l != s8[idxSingle]) - { - fprintf(stdout, - "Read value of SINT8 %d differs from set value %d\n", s8l, - s8[idxSingle]); - GOTOFAILURE - } - } - ret = TIFFGetField(tif, SINT16, &s16l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT16: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s16l != s16[idxSingle]) - { - fprintf(stdout, - "Read value of SINT16 %d differs from set value %d\n", - s16l, s16[idxSingle]); - GOTOFAILURE - } - } - ret = TIFFGetField(tif, SINT32, &s32l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT32: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s32l != s32[idxSingle]) - { - fprintf(stdout, - "Read value of SINT32 %d differs from set value %d\n", - s32l, s32[idxSingle]); - GOTOFAILURE - } - } - - ret = TIFFGetField(tif, C0_SINT8, &s8p); - if (ret != 1) - { - fprintf(stdout, "Error reading C0_SINT8: ret=%d\n", ret); - GOTOFAILURE - } - count = N(s8); - for (i = 0; i < count; i++) - { - if (s8p[i] != s8[i]) - { - fprintf(stdout, - "Read value %d of C0_SINT8-Array %d differs from set value " - "%d\n", - i, s8p[i], s8[i]); - GOTOFAILURE - } - } - - ret = TIFFGetField(tif, C0_SINT16, &s16p); - if (ret != 1) - { - fprintf(stdout, "Error reading C0_SINT16: ret=%d\n", ret); - GOTOFAILURE - } - count = N(s16); - for (i = 0; i < count; i++) - { - if (s16p[i] != s16[i]) - { - fprintf(stdout, - "Read value %d of C0_SINT16-Array %d differs from set " - "value %d\n", - i, s16p[i], s16[i]); - GOTOFAILURE - } - } - - ret = TIFFGetField(tif, C0_SINT32, &s32p); - if (ret != 1) - { - fprintf(stdout, "Error reading C0_SINT32: ret=%d\n", ret); - GOTOFAILURE - } - count = N(s32); - for (i = 0; i < count; i++) - { - if (s32p[i] != s32[i]) - { - fprintf(stdout, - "Read value %d of C0_SINT32-Array %d differs from set " - "value %d\n", - i, s32p[i], s32[i]); - GOTOFAILURE - } - } - - s8p = NULL; - ret = TIFFGetField(tif, C16_SINT8, &count, &s8p); - if (ret != 1 || s8p == NULL) - { - fprintf(stdout, - "Error reading C16_SINT8: ret=%d; count=%d; pointer=%p\n", ret, - count, s8p); - GOTOFAILURE - } - else - { - for (i = 0; i < count; i++) - { - if (s8p[i] != s8[i]) - { - fprintf( - stdout, - "Read value %d of s8-Array %d differs from set value %d\n", - i, s8p[i], s8[i]); - GOTOFAILURE - } - } - } - - s16p = NULL; - ret = TIFFGetField(tif, C16_SINT16, &count, &s16p); - if (ret != 1 || s16p == NULL) - { - fprintf(stdout, - "Error reading C16_SINT16: ret=%d; count=%d; pointer=%p\n", ret, - count, s16p); - GOTOFAILURE - } - else - { - for (i = 0; i < count; i++) - { - if (s16p[i] != s16[i]) - { - fprintf(stdout, - "Read value %d of C16_SINT16-Array %d differs from set " - "value %d\n", - i, s16p[i], s16[i]); - GOTOFAILURE - } - } - } - - s32p = NULL; - ret = TIFFGetField(tif, C16_SINT32, &count, &s32p); - if (ret != 1 || s32p == NULL) - { - fprintf(stdout, - "Error reading C16_SINT32: ret=%d; count=%d; pointer=%p\n", ret, - count, s32p); - GOTOFAILURE - } - else - { - for (i = 0; i < count; i++) - { - if (s32p[i] != s32[i]) - { - fprintf(stdout, - "Read value %d of C16_SINT32-Array %d differs from set " - "value %d\n", - i, s32p[i], s32[i]); - GOTOFAILURE - } - } - } - - if (isBigTiff) - { - ret = TIFFGetField(tif, SINT64, &s64l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT64: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s64l != s64[idxSingle]) - { - fprintf(stdout, - "Read value of SINT64 %" PRIi64 - " differs from set value %" PRIi64 "\n", - s64l, s64[idxSingle]); - GOTOFAILURE - } - } - - s64p = NULL; - ret = TIFFGetField(tif, C0_SINT64, &s64p); - count = N(s64); - if (ret != 1) - { - fprintf(stdout, "Error reading C0_SINT64: ret=%d\n", ret); - GOTOFAILURE - } - else - { - for (i = 0; i < count; i++) - { - if (s64p[i] != s64[i]) - { - fprintf(stdout, - "Read value %d of C0_SINT64-Array %" PRIi64 - " differs from set value %" PRIi64 "\n", - i, s64p[i], s64[i]); - GOTOFAILURE - } - } - } - - s64p = NULL; - ret = TIFFGetField(tif, C16_SINT64, &count, &s64p); - if (ret != 1 || s64p == NULL) - { - fprintf(stdout, - "Error reading C16_SINT64: ret=%d; count=%d; pointer=%p\n", - ret, count, s64p); - GOTOFAILURE - } - else - { - for (i = 0; i < count; i++) - { - if (s64p[i] != s64[i]) - { - fprintf(stdout, - "Read value %d of C16_SINT64-Array %" PRIi64 - " differs from set value %" PRIi64 "\n", - i, s64p[i], s64[i]); - GOTOFAILURE - } - } - } - - s64p = NULL; - ret = TIFFGetField(tif, C32_SINT64, &count32, &s64p); - if (ret != 1 || s64p == NULL) - { - fprintf(stdout, - "Error reading C32_SINT64: ret=%d; count=%d; pointer=%p\n", - ret, count, s64p); - GOTOFAILURE - } - else - { - for (i = 0; i < (int)count32; i++) - { - if (s64p[i] != s64[i]) - { - fprintf(stdout, - "Read value %d of C32_SINT64-Array %" PRIi64 - " differs from set value %" PRIi64 "\n", - i, s64p[i], s64[i]); - GOTOFAILURE - } - } - } - } /*-- if(isBigTiff) --*/ - - retcode = OK_RETURN; -failure: - - fprintf(stdout, "-- End of test. Closing TIFF file. --\n"); - TIFFClose(tif); - return (retcode); -} -/*-- readTestTiff() --*/ - -static int readTestTiff_ignore_some_tags(const char *szFileName) -{ - int ret; - int8_t s8l; - int16_t s16l; - int32_t s32l; - int retcode = FAULT_RETURN; - - /* There is a use case, where LibTIFF shall be prevented from reading - * unknown tags that are present in the file as anonymous tags. This can be - * achieved by defining these tags with ".field_bit = FIELD_IGNORE". */ - - /* Copy const array to be manipulated and freed just after TIFFMergeFields() - * within the "extender()" called by TIFFOpen(). */ - TIFFFieldInfo *tiff_field_info2; - tiff_field_info2 = (TIFFFieldInfo *)malloc(sizeof(tiff_field_info)); - if (tiff_field_info2 == (TIFFFieldInfo *)NULL) - { - fprintf(stdout, - "Can't allocate memoy for tiff_field_info2 structure.\n"); - return (FAULT_RETURN); - } - memcpy(tiff_field_info2, tiff_field_info, sizeof(tiff_field_info)); - /* Switch field array for extender callback. */ - p_tiff_field_info = tiff_field_info2; - - /*-- Adapt tiff_field_info array for ignoring unknown tags to LibTIFF, which - * have been written to file before. --*/ - /* a.) Just set field_bit to FIELD_IGNORE = 0 */ - tiff_field_info2[2].field_bit = FIELD_IGNORE; - /* b.) Usecase with all field array infos zero but the tag value. */ - ttag_t tag = tiff_field_info2[4].field_tag; - memset(&tiff_field_info2[4], 0, sizeof(tiff_field_info2[4])); - tiff_field_info2[4].field_tag = tag; - - fprintf(stdout, "\n-- Reading file with unknown tags to be ignored ...\n"); - TIFF *tif = TIFFOpen(szFileName, "r"); - - /* tiff_field_info2 should not be needed anymore, as long as the still - * active extender() is not called again. Therefore, the extender callback - * should be disabled by resetting it to the saved one. */ - free(tiff_field_info2); - tiff_field_info2 = NULL; - TIFFSetTagExtender(parent); - - if (!tif) - { - fprintf(stdout, "Can't open test TIFF file %s.\n", szFileName); - return (FAULT_RETURN); - } - - /* Read the first two known tags for testing */ - ret = TIFFGetField(tif, SINT8, &s8l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT8: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s8l != s8[idxSingle]) - { - fprintf(stdout, - "Read value of SINT8 %d differs from set value %d\n", s8l, - s8[idxSingle]); - GOTOFAILURE - } - } - ret = TIFFGetField(tif, SINT16, &s16l); - if (ret != 1) - { - fprintf(stdout, "Error reading SINT16: ret=%d\n", ret); - GOTOFAILURE - } - else - { - if (s16l != s16[idxSingle]) - { - fprintf(stdout, - "Read value of SINT16 %d differs from set value %d\n", - s16l, s16[idxSingle]); - GOTOFAILURE - } - } - - /* The two ignored tags shall not be present. */ - ret = TIFFGetField(tif, tiff_field_info[2].field_tag, &s32l); - if (ret != 0) - { - fprintf(stdout, - "Error: Tag %d, set to be ignored, has been read from file.\n", - tiff_field_info[2].field_tag); - GOTOFAILURE - } - - ret = TIFFGetField(tif, tiff_field_info[4].field_tag, &s32l); - if (ret != 0) - { - fprintf(stdout, - "Error: Tag %d, set to be ignored, has been read from file.\n", - tiff_field_info[4].field_tag); - GOTOFAILURE - } - - retcode = OK_RETURN; -failure: - - fprintf(stdout, - "-- End of test for ignored unknown tags. Closing TIFF file. --\n"); - TIFFClose(tif); - return (retcode); -} -/*-- readTestTiff_ignore_some_tags() --*/ - -int main(void) -{ - /*-- Signed tags test --*/ - parent = TIFFSetTagExtender(&extender); - if (writeTestTiff("temp.tif", 0) != OK_RETURN) - return (-1); - if (readTestTiff("temp.tif", 0) != OK_RETURN) - return (-1); - - if (writeTestTiff("tempBig.tif", 1) != OK_RETURN) - return (-1); - if (readTestTiff("tempBig.tif", 1) != OK_RETURN) - return (-1); - unlink("tempBig.tif"); - fprintf(stdout, "---------- Signed tag test finished OK -----------\n"); - - /*-- Adapt tiff_field_info array for ignoring unknown tags to LibTIFF, which - * have been written to file. --*/ - if (readTestTiff_ignore_some_tags("temp.tif") != OK_RETURN) - return (-1); - unlink("temp.tif"); - fprintf(stdout, - "---------- Ignoring unknown tag test finished OK -----------\n"); - - return 0; -} diff --git a/third_party/libtiff/test/test_transferfunction_write_read.c b/third_party/libtiff/test/test_transferfunction_write_read.c deleted file mode 100644 index ec0952c..0000000 --- a/third_party/libtiff/test/test_transferfunction_write_read.c +++ /dev/null @@ -1,398 +0,0 @@ -/* - * TIFF Library - * - * The purpose of this test suite is to test the correctness of - * writing and reading transfer functions with TIFFTAG_TRANSFERFUNCTION. - * - * Depending on the SamplesPerPixel (and ExtraSamples) values, - * exactly one (1) or exactly three (3) transfer functions shall be written - * to file and are expected for reading from file. - * An exception is if all three transfer functions are equal. - * Then only one transfer function is written to file and - * at reading that transfer function is returned in three - * pointers to TIFFGetField(). - * If only one array is returned, as for images with SamplesPerPixel=1, - * the other two are set to NULL. - * - * Each transfer function length is (1 << BitsPerSample) times uint16_t values. - * - */ -/* clang-format off */ - -#include "tif_config.h" - -#include -#include -#include - -#include "tiffio.h" - -#ifdef HAVE_UNISTD_H -#include /* for unlink() on linux */ -#endif - -/* Define basic TIFF file settings */ -uint16_t spp = 3; -const uint16_t width = 4; -const uint16_t length = 6; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 100; /* up to 2**32-1 */ -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -/* Data and pointer to three transfer functions. */ -uint16_t *pTransferFunctionData; -uint32_t nSamplesPerTransferFunction; -/* Pointers into pTransferFunctionData for writing */ -const uint16_t *ptf0; -const uint16_t *ptf1; -const uint16_t *ptf2; -/* Pointers for reading */ -const uint16_t *ptfR0; -const uint16_t *ptfR1; -const uint16_t *ptfR2; - -#define GOTOFAILURE(x) \ - { \ - retval = x; \ - goto failure; \ - } - -/*-- setup_transferfunctions() -- - * Initializes the transfer function array pTransferFunctionData - * with three transfer functions. - * Pointer ptf0, ptf1, ptf2 are initialized to the first array element of - * each transfer function. - */ -int setup_transfer_functions(void) -{ - if (pTransferFunctionData) - _TIFFfree(pTransferFunctionData); - - /* Setup array with some more values to shift start of the three arrays. */ - nSamplesPerTransferFunction = ((uint32_t)1 << bps); - pTransferFunctionData = _TIFFmalloc(3 * (tmsize_t)nSamplesPerTransferFunction * sizeof(uint16_t)); - if (!pTransferFunctionData) - return 1; - - for (uint32_t i = 0; i < 3 * nSamplesPerTransferFunction; i++) - pTransferFunctionData[i] = (uint16_t)(i + 1); - - ptf0 = &pTransferFunctionData[0]; - ptf1 = &pTransferFunctionData[nSamplesPerTransferFunction]; - ptf2 = &pTransferFunctionData[2 * nSamplesPerTransferFunction]; - - return 0; -} /*-- setup_transferfunctions() --*/ - -/*--read_check_transferfunctions -- - * The file is opened and the transfer functions are read. - * Then the read transfer functions are compared against the arrays provided - * with ptfx0, ptfx1, ptfx2. - * Depending on blnClose, the opened file is closed. - * TIFF **ptif returns the TIFF pointer. - * The function returns a bit-field with one bit set for each successfully read transfer function. - */ -int read_check_transferfunctions(TIFF **ptif, const char *filename, int blnClose, const uint16_t *ptfx0, - const uint16_t *ptfx1, const uint16_t *ptfx2) -{ - /* Test reading of transfer functions */ - int retval = 0; - TIFF *tif = TIFFOpen(filename, "r"); - *ptif = tif; - if (!tif) - { - fprintf(stderr, "read_check_transferfunctions(): Can't open %s for reading.\n", filename); - GOTOFAILURE(-1); - } - - if (!TIFFGetField(tif, TIFFTAG_TRANSFERFUNCTION, &ptfR0, &ptfR1, &ptfR2)) - { - fprintf(stderr, "read_check_transferfunctions(): TIFFGetField for TIFFTAG_TRANSFERFUNCTION failed.\n"); - GOTOFAILURE(-1); - } - else - { - if (ptfR0 != NULL && !_TIFFmemcmp(ptfx0, ptfR0, nSamplesPerTransferFunction * sizeof(uint16_t))) - retval += 1; - if (ptfR1 != NULL && !_TIFFmemcmp(ptfx1, ptfR1, nSamplesPerTransferFunction * sizeof(uint16_t))) - retval += 2; - if (ptfR2 != NULL && !_TIFFmemcmp(ptfx2, ptfR2, nSamplesPerTransferFunction * sizeof(uint16_t))) - retval += 4; - } - -failure: - if (blnClose) - { - TIFFClose(tif); - tif = NULL; - } - *ptif = tif; - - return retval; -} /*-- read_check_transferfunctions() --*/ - -/*-- write_basic_IFD_data() -- - * Opens a file for writing and initializes a basic TIFF image with the - * globally specified parameters. - * - * wrtTransferFunction: 0 = don't write TIFFTAG_TRANSFERFUNCTION tag - * 1 = write TIFFTAG_TRANSFERFUNCTION tag before and - * 2 = after ExtraSamples tag. - * blnExtraSamples=true writes ExtraSamples tag. - * Only if blnCloseFile is true, the file is closed. - * TIFF **ptif returns the pointer to the opened TIFF file. - */ -int write_basic_IFD_data(TIFF **ptif, const char *filename, int wrtTransferFunction, int nExtraSamples, - int blnCloseFile) -{ - unsigned char buf[3] = {0, 127, 255}; - int retval = 0; - uint8_t *bufLine = NULL; - TIFF *tif = TIFFOpen(filename, "w"); - *ptif = tif; - if (!tif) - { - fprintf(stderr, "write_basic_IFD_data(): Can't create %s\n", filename); - GOTOFAILURE(1); - } - - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set ImageWidth tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set ImageLength tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set BitsPerSample tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set SamplesPerPixel tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set SamplesPerPixel tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set PlanarConfiguration tag.\n"); - GOTOFAILURE(1); - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "write_basic_IFD_data(): Can't set PhotometricInterpretation tag.\n"); - GOTOFAILURE(1); - } - - /* Set transfer function before ExtraSamples*/ - if (wrtTransferFunction == 1) - { - - if (!TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, ptf1, ptf2)) - { - fprintf(stderr, "write_basic_IFD_data(): TIFFSetField for TIFFTAG_TRANSFERFUNCTION failed.\n"); - GOTOFAILURE(1); - } - } - - /* Set ExtraSamples thus SamplesPerPixel for transfer functions is reduced by one. */ - uint16_t extraSamples[4] = {EXTRASAMPLE_UNSPECIFIED, EXTRASAMPLE_UNSPECIFIED, EXTRASAMPLE_UNSPECIFIED, - EXTRASAMPLE_UNSPECIFIED}; - if (nExtraSamples > 0 && nExtraSamples < 4) - { - if (!TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, nExtraSamples, extraSamples)) - { - fprintf(stderr, "write_basic_IFD_data(): Warning: Could not set TIFFTAG_EXTRASAMPLES tag.\n"); - } - } - - /* Set transfer function after ExtraSamples*/ - if (wrtTransferFunction == 2) - { - - if (!TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, ptf1, ptf2)) - { - fprintf(stderr, "write_basic_IFD_data(): TIFFSetField for TIFFTAG_TRANSFERFUNCTION failed.\n"); - GOTOFAILURE(1); - } - } - - /* Setup buffer for image line */ - size_t bufLen = (size_t)width * spp * (bps + 7) / 8; - bufLine = _TIFFmalloc(bufLen); - if (!bufLine) - { - fprintf(stderr, "write_basic_IFD_data(): Can't allocate bufLine buffer.\n"); - GOTOFAILURE(1); - } - if (bufLen > sizeof(buf)) - _TIFFmemcpy(bufLine, buf, sizeof(buf)); - - /* Write dummy pixel data. */ - for (int i = 0; i < length; i++) - { - if (TIFFWriteScanline(tif, bufLine, i, 0) == -1) - { - fprintf(stderr, "write_basic_IFD_data(): Can't write image data.\n"); - GOTOFAILURE(1); - } - size_t idx = (size_t)i * spp < bufLen ? (size_t)i * spp : bufLen - 2; - bufLine[idx] = (uint8_t)(i * 80); - } - -failure: - if (bufLine) - _TIFFfree(bufLine); - if (blnCloseFile) - { - TIFFClose(tif); - tif = NULL; - } - *ptif = tif; - - return retval; -} /*-- write_basic_IFD_data() --*/ - -/*==== main() ====*/ -int main() -{ - - const char *filename = "test_transferfunction_write_read.tif"; - - if (setup_transfer_functions()) - return 1; - - int ret; - TIFF *tif = NULL; - - fprintf(stderr, - "--- Testing TIFF_TRANSFERFUNCTION tag writing and reading. ---\n Expect 6 warning messages ...\n"); - - /* Test with RGB data */ - spp = 3; - if (write_basic_IFD_data(&tif, filename, 2, 0, true)) - return 1; - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != 7) - { - fprintf(stderr, "TRANSFERFUNCTION for RGB (SPP=3) could not be read correctly.\n"); - return 1; - } - - /* Test with Grayscale data */ - spp = 1; - if (write_basic_IFD_data(&tif, filename, 2, 0, true)) - return 1; - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != 1) - { - fprintf(stderr, "TRANSFERFUNCTION SPP=1 could not be read correctly.\n"); - return 1; - } - - /* Test with RGB and ExtraSample, thus only 2 SamplesPerPixel left. - * ExtraSample is written before transfer function. - * --> For v4.5.1: This gives an Error when reading the transfer functions! - */ - spp = 3; - if (write_basic_IFD_data(&tif, filename, 2, 1, true)) - return 1; - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != 7) - { - fprintf(stderr, "One ExtraSample plus TRANSFERFUNCTION SPP=3 could not be read correctly.\n"); - return 1; - } - /* Now write two ExtraSamples, thus only one transfer function is written to file and read. */ - if (write_basic_IFD_data(&tif, filename, 2, 2, true)) - return 1; - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != 1) - { - fprintf(stderr, "Two ExtraSamples plus TRANSFERFUNCTION SPP=3 could not be read correctly.\n"); - return 1; - } - - /* Test with tree times the same transfer functions. - * Thus, only one should be written to file and when read copied three times. - */ - spp = 3; - if (write_basic_IFD_data(&tif, filename, 0, 0, false)) - return 1; - ret = TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, ptf0, ptf0); - TIFFClose(tif); - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf0, ptf0); - if (ret != 7) - { - fprintf(stderr, "TRANSFERFUNCTIONs with same content could not be read correctly.\n"); - return 1; - } - - /*---- Test the setting of the transfer functions with different wrong calls of TIFFSetField(). ----*/ - /* (ptf0, NULL, NULL) For v4.5.1: writes ptf0 to file and reads it back. - * Now, this should work for spp=1 but not for spp=3 - */ - spp = 1; - if (write_basic_IFD_data(&tif, filename, 0, 0, false)) - return 1; - ret = TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, NULL, NULL); - TIFFClose(tif); - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != 1) - { - fprintf(stderr, "Unexpected at %d.\n", __LINE__); - return 1; - } - spp = 3; - /* (ptf0, NULL, NULL) For v4.5.1: writes ptf0 to file and reads it back.*/ - if (write_basic_IFD_data(&tif, filename, 0, 0, false)) - return 1; - ret = TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, NULL, NULL); - TIFFClose(tif); - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != -1) - { - fprintf(stderr, "Unexpected at %d.\n", __LINE__); - return 1; - } - - /* (ptf0, NULL, ptf2): For v4.5.1: Overflow error, when second ptf1 is copied in - * TIFFWriteDirectoryTagTransferfunction().*/ - if (write_basic_IFD_data(&tif, filename, 0, 0, false)) - return 1; - ret = TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, NULL, ptf2); - TIFFClose(tif); - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != -1) - { - fprintf(stderr, "Unexpected at %d.\n", __LINE__); - return 1; - } - - /* (ptf0, ptf1, NULL) For v4.5.1: writes ptf0 and ptf1 to file but does not read it back, because only 2 but 3 - * required.*/ - if (write_basic_IFD_data(&tif, filename, 0, 0, false)) - return 1; - ret = TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, ptf0, ptf1, NULL); - TIFFClose(tif); - ret = read_check_transferfunctions(&tif, filename, true, ptf0, ptf1, ptf2); - if (ret != -1) - { - fprintf(stderr, "Unexpected at %d.\n", __LINE__); - return 1; - } - - /* All tests passed; delete file and exit with success status. */ - unlink(filename); - fprintf(stderr, "-------- Test finished OK ----------\n"); - return 0; -} diff --git a/third_party/libtiff/test/test_write_read_tags.c b/third_party/libtiff/test/test_write_read_tags.c deleted file mode 100644 index e97ca59..0000000 --- a/third_party/libtiff/test/test_write_read_tags.c +++ /dev/null @@ -1,1861 +0,0 @@ -/* - * Copyright (c) 2023, LibTIFF Contributors - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - *=========== Purpose ======================================================== - * TIFF Library Testing: - * - Write- and read- test of most tags defined within tif_dirinfo.c - * - Write- and read- test of custom directories for EXIF and GPS. - * - * Attention: - * This test program uses private functions from static LibTIFF library. - * Therefore, it does not work when compiled for shared library. - */ - -#define FOR_AUTO_TESTING -#ifdef FOR_AUTO_TESTING -/* Only for automake and CMake infrastructure the test should: - a.) delete any written testfiles when test passed (otherwise autotest - will fail) - b.) goto failure, if any failure is detected, which is not - necessary when test is initiated manually for debugging -*/ -#define GOTOFAILURE goto failure; -#else -#define GOTOFAILURE -#endif - -#ifdef _MSC_VER -#pragma warning(disable : 4101) -#endif - -#include "tif_config.h" //necessary for linux compiler - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -static const char filename[] = "test_write_read_tags.tif"; -static const char filenameBigTiff[] = "test_write_read_tags_Big.tif"; - -/* Settings for basic TIFF image to be written */ -#define SPP 3 /* Samples per pixel */ -const uint16_t width = 1; -const uint16_t length = 1; -const uint16_t bps = 8; -const uint16_t photometric = PHOTOMETRIC_RGB; -const uint16_t rows_per_strip = 1; -const uint16_t planarconfig = PLANARCONFIG_CONTIG; - -/* -- Test data for writing -- */ -#define STRSIZE 1000 -#define N_SIZE 400 -#define VARIABLE_ARRAY_SIZE 6 - -char auxCharArrayW[N_SIZE]; -short auxShortArrayW[N_SIZE]; -int32_t auxInt32ArrayW[N_SIZE]; -float auxFloatArrayW[N_SIZE]; -double auxDoubleArrayW[N_SIZE]; -char auxTextArrayW[N_SIZE][STRSIZE]; - -/*-- Additional variables --*/ -char exifVersion[4] = { - '0', '2', '3', '1'}; /* EXIF 2.31 version is 4 characters of a string! */ -char gpsVersion[4] = {2, 2, 0, 1}; /* GPS Version is 4 numbers! */ - -/* Inkname string is separated but not closed at the very end with a NULL. - * Otherwise NumberOfInks would be counted to four by countInkNamesString() - * at TIFFSetField() for the inkname string. - */ -#define NINKS 3 -char inkNamesW[] = {"Ink1\0Ink2\0Ink3"}; - -#define NUM_ELEMENTS(x) (sizeof(x) / sizeof(x[0])) - -/* -- List of tags, which must not be written with arbitrary values because they - * are written explicitly by the test program (like the basic TIFF tags), - * are automatically written by LibTIFF (e.g.TIFFTAG_NUMBEROFINKS), - * have some special characteristics, or write procedure is not supported - * yet. - * - For TileOffsets and TileBytecounts the same variable is used as for - * StripOffsets and StripBytecounts, respectively. - */ -uint32_t listTagsNotToWrite[] = {TIFFTAG_OSUBFILETYPE, - TIFFTAG_STRIPOFFSETS, - TIFFTAG_COMPRESSION, - TIFFTAG_STRIPBYTECOUNTS, - TIFFTAG_IMAGEWIDTH, - TIFFTAG_IMAGELENGTH, - TIFFTAG_BITSPERSAMPLE, - TIFFTAG_SAMPLESPERPIXEL, - TIFFTAG_ROWSPERSTRIP, - TIFFTAG_PLANARCONFIG, - TIFFTAG_PHOTOMETRIC, - TIFFTAG_FREEOFFSETS, - TIFFTAG_FREEBYTECOUNTS, - TIFFTAG_GRAYRESPONSEUNIT, - TIFFTAG_GRAYRESPONSECURVE, - TIFFTAG_TRANSFERFUNCTION, - TIFFTAG_COLORMAP, - TIFFTAG_COLORRESPONSEUNIT, - TIFFTAG_TILEWIDTH, - TIFFTAG_TILELENGTH, - TIFFTAG_TILEOFFSETS, - TIFFTAG_TILEBYTECOUNTS, - TIFFTAG_SUBIFD, - TIFFTAG_NUMBEROFINKS, - TIFFTAG_GPSIFD, - TIFFTAG_EXIFIFD, - TIFFTAG_DATATYPE, - TIFFTAG_MATTEING}; - -/* Some tag definitions do not follow the rules for - * readcount/writecount/set_get_field_type/passcount-flag. - * Most of them are handled by LibTIFF in special cases anyway, so the tag - * definition is irrelevant. - */ -uint32_t listTagsNotFollowPasscountRules[] = { - TIFFTAG_STRIPOFFSETS, TIFFTAG_STRIPBYTECOUNTS, - TIFFTAG_MINSAMPLEVALUE, TIFFTAG_MAXSAMPLEVALUE, - TIFFTAG_FREEOFFSETS, TIFFTAG_FREEBYTECOUNTS, - TIFFTAG_GRAYRESPONSECURVE, TIFFTAG_TRANSFERFUNCTION, - TIFFTAG_COLORMAP, TIFFTAG_SAMPLEFORMAT, - TIFFTAG_SMINSAMPLEVALUE, TIFFTAG_SMAXSAMPLEVALUE, - TIFFTAG_DATATYPE, TIFFTAG_TILEOFFSETS, - TIFFTAG_TILEBYTECOUNTS, TIFFTAG_PERSAMPLE}; - -/* Function definition */ -int check_tag_definitions(void); -int write_test_tiff(TIFF *tif, const char *filenameRead); -int write_all_tags(TIFF *tif, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotToWrite, uint32_t nTagsInList, - uint32_t *iCnt); -int tagIsInList(uint32_t tTag, uint32_t *list, uint32_t nTagsInList); -int testPasscountFlag(const char *szMsg, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotFollowPasscountRules, - uint32_t nTagsInList); -int read_all_tags(TIFF *tif, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotToWrite, uint32_t nTagsNotToWrite, - uint32_t *iCnt); - -/* ==== main() ======================================================== - * Main program checks for correct tags definition. - * Then, writing/reading is tested for ClassicTIFF and BigTIFF. - * Testprograms shall return 0 for success. - */ -int main() -{ - int ret, ret1, ret2; - - fprintf(stderr, "==== Test automatically if all tags are " - "written/read correctly. ====\n"); - /* --- Test with Classic-TIFF ---*/ - /* Delete file, if exists and open it freshly. */ - ret = unlink(filename); - if (ret != 0 && errno != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filename); - } - TIFF *tif = TIFFOpen(filename, "w+"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filename); - return 1; - } - - /* Firstly, check for correct definition of tags. */ - fprintf(stderr, "-------- Check tag definition -------------------\n"); - ret1 = check_tag_definitions(); - - if (ret1 > 0) - return (ret1); - - /* Write a simple image with all tags and check if correctly written - * by reading all tags. */ - fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); - ret1 = write_test_tiff(tif, filename); - - if (ret1 > 0) - return (ret1); - - /*--- Test with BIG-TIFF ---*/ - ret = unlink(filenameBigTiff); - if (ret != 0 && errno != ENOENT) - { - fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); - } - tif = TIFFOpen(filenameBigTiff, "w8"); - if (!tif) - { - fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); - return 1; - } - fprintf(stderr, "\n\n-------- Test with BigTIFF started ----------\n"); - ret2 = write_test_tiff(tif, filenameBigTiff); - - if (ret2 > 0) - return (ret2 + 10); - else - return (ret2); -} /* main() */ - -/* ==== check_tag_definitions() ======================================= - * Check for correct definition of tags within tags FieldArray wrt passcount - * flag and set_get_field_type. - */ -int check_tag_definitions(void) -{ - const TIFFFieldArray *tFieldArray; - int ret = 0; - - tFieldArray = _TIFFGetFields(); - ret = testPasscountFlag("---- TIFF tags:", tFieldArray, - listTagsNotFollowPasscountRules, - NUM_ELEMENTS(listTagsNotFollowPasscountRules)); - - tFieldArray = _TIFFGetGpsFields(); - ret += testPasscountFlag("---- GPS tags:", tFieldArray, NULL, 0); - - tFieldArray = _TIFFGetExifFields(); - ret += testPasscountFlag("---- EXIF tags:", tFieldArray, NULL, 0); - - return ret; -} /*-- check_tag_definitions() --*/ - -/* ==== write_test_tiff() ============================================= - * Performs write and read test of all tags defined within LibTiff - * to the opened file passed through "tif". - * All TIFF, GPS and EXIF tags are written with arbitrary values. - * Finally, the file is closed, re-opened and all tags are read - * and compared to their written value. - */ - -int write_test_tiff(TIFF *tif, const char *filenameRead) -{ - unsigned char buf[SPP] = {0, 127, 255}; - uint16_t auxUint16 = 0; - uint32_t auxUint32 = 0; - int i; - - /*-- Fill test data arrays for writing and later comparison when written - * tags are checked. */ - for (i = 0; i < N_SIZE; i++) - { - sprintf(auxTextArrayW[i], - "N%d-String-%d_tttttttttttttttttttttttttttttx", i, i); - } - for (i = 0; i < N_SIZE; i++) - { - auxCharArrayW[i] = (char)(i + 1); - } - for (i = 0; i < N_SIZE; i++) - { - auxShortArrayW[i] = (short)(i + 1) * 7; - } - for (i = 0; i < N_SIZE; i++) - { - auxInt32ArrayW[i] = (i + 1) * 133; - } - for (i = 0; i < N_SIZE; i++) - { - auxFloatArrayW[i] = (float)((i + 1) * 133) / 3.3f; - } - for (i = 0; i < N_SIZE; i++) - { - auxDoubleArrayW[i] = (double)((i + 1) * 3689) / 4.5697; - } - - /*-- Setup standard tags of a simple tiff file --*/ - fprintf(stderr, "----Write TIFF tags ...\n"); - if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) - { - fprintf(stderr, "Can't set ImageWidth tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) - { - fprintf(stderr, "Can't set ImageLength tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) - { - fprintf(stderr, "Can't set BitsPerSample tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) - { - fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) - { - fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); - goto failure; - } - if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) - { - fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); - goto failure; - } - - /*============ Write GPS and EXIF Dummy tags =====================*/ - /*-- Set dummy EXIF/GPS tag in original tif-structure in order to reserve - * space for final dir_offset value, - * which is properly written at the end. - */ - uint64_t dir_offset = 0; /* Zero, in case no Custom-IFD is written */ - - if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset)) - { - fprintf(stderr, "Can't write TIFFTAG_GPSIFD\n"); - } - - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset)) - { - fprintf(stderr, "Can't write TIFFTAG_EXIFIFD\n"); - } - - /*============ Write mostly all other TIFF tags ==================*/ - /* Get array, where tag fields are defined. */ - const TIFFFieldArray *tFieldArray = _TIFFGetFields(); - - /*-- write_all_tags() writes all tags automatically with the defined - * precision according to its set_get_field_type definition. --*/ - uint32_t iDataCnt = 0; - if (write_all_tags(tif, tFieldArray, listTagsNotToWrite, - NUM_ELEMENTS(listTagsNotToWrite), &iDataCnt)) - { - fprintf(stderr, "Error during TIFF tag writing.\n"); - goto failure; - } - -#ifndef WRITEPIXELLAST - /*-- Write dummy pixel data. --*/ - if (TIFFWriteScanline(tif, buf, 0, 0) < 0) - { - fprintf(stderr, "Can't write image data.\n"); - goto failure; - } -#endif - - /*================== Save TIFF Directory =====================*/ - /*-- Save current TIFF-directory to file before directory is changed. - * Otherwise it will be lost! - * The tif-structure is overwritten/ freshly initialized by any - * "CreateDirectory". - *----- What is needed here ??? ---- - * In custom_dir.c only TIFFFreeDirectory( tif ); is used to set - * fields of another Sub-Directory. It releases storage associated - * with a directory, especially custom-fields. - *-- Using only TIFFFreeDirectory() here leads to an error!! - *-- Using here TIFFCheckpointDirectory() leads to an additional Main-IFD - * because it does not cleanup the tif-structure. - *-- TIFFWriteDirectory() does cleanup the tif-structure and tries to - * write the IFD to the same location. - */ - /*retCode = TIFFCheckpointDirectory(tif);*/ - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, - "Can't write TIFF directory after TIFF tags and image data.\n"); - goto failure; - } - - /*======================= GPS Directory =============================*/ - /*====== Create GPS Directory and write all GPS fields ==============*/ - /* - Create the GPS directory. - * - Get GPS field array, where tag fields are defined. - * - Then write all tags automatically according to their set_get_field_type - * definition. - */ - fprintf(stderr, "----Write GPS tags ...\n"); - if (TIFFCreateGPSDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateGPSDirectory() failed.\n"); - goto failure; - } - - tFieldArray = _TIFFGetGpsFields(); - if (write_all_tags(tif, tFieldArray, NULL, 0, &iDataCnt)) - { - fprintf(stderr, "Error during GPS tag writing.\n"); - goto failure; - } - - /*-- Re-write a valid GPS version ID --*/ - if (!TIFFSetField(tif, GPSTAG_VERSIONID, gpsVersion)) - { - fprintf(stderr, "Can't write GPSTAG_VERSIONID\n"); - goto failure; - } - - /*-- GPS - write custom directory GPS into file and - * get back the offset of GPS directory. - */ - uint64_t dir_offset_GPS = 0; - if (!TIFFWriteCustomDirectory(tif, &dir_offset_GPS)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with GPS failed.\n"); - goto failure; - } - - /*-- Go back to the first (main) directory, and set correct value of the - * GPS IFD pointer. (main directory is reloaded from file!) - */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "TIFFSetDirectory(0) after writing GPS failed.\n"); - goto failure; - } - /*-- Write GPS tag reference / offset into GPSIFD tag in main directory --*/ - if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset_GPS)) - { - fprintf(stderr, "Can't write TIFFTAG_GPSIFD.\n"); - goto failure; - } - - /*-- Save current TIFF-directory to file before directory is changed. - * Otherwise it will be lost! The tif-structure is overwritten/ freshly - * initialized by any "CreateDirectory". - * TIFFWriteDirectory() does cleanup tif-structure. - */ - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write TIFF directory after GPS tags.\n"); - goto failure; - } - - /*======================= EXIF Directory ============================*/ - /*====== Create EXIF Directory and write all EXIF fields ============*/ - /* - Create the EXIF directory. - * - Get EXIF field array, where tag fields are defined. - * - Then write all tags automatically according to their set_get_field_type - * definition. - */ - fprintf(stderr, "----Write EXIF tags ...\n"); - if (TIFFCreateEXIFDirectory(tif) != 0) - { - fprintf(stderr, "TIFFCreateEXIFDirectory() failed.\n"); - goto failure; - } - - tFieldArray = _TIFFGetExifFields(); - if (write_all_tags(tif, tFieldArray, listTagsNotToWrite, - NUM_ELEMENTS(listTagsNotToWrite), &iDataCnt)) - { - fprintf(stderr, "Error during GPS tag writing.\n"); - goto failure; - } - - /*--- Set valid EXIF version, which is a 4 byte string --*/ - if (!TIFFSetField(tif, EXIFTAG_EXIFVERSION, exifVersion)) - { - fprintf(stderr, "Can't write EXIFTAG_EXIFVERSION\n"); - goto failure; - } - - /*-- EXIF - write custom directory EXIF into file and - * get back the offset of EXIF directory. - */ - uint64_t dir_offset_EXIF = 0; - if (!TIFFWriteCustomDirectory(tif, &dir_offset_EXIF)) - { - fprintf(stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); - goto failure; - } - - /*-- Go back to the first (main) directory, and set correct value of the - * EXIF IFD pointer. (main directory is reloaded from file!) - */ - if (!TIFFSetDirectory(tif, 0)) - { - fprintf(stderr, "TIFFSetDirectory(0) after writing EXIF failed.\n"); - goto failure; - } - /*-- Write EXIF tag reference / offset into EXIFIFD tag in main directory - * --*/ - if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset_EXIF)) - { - fprintf(stderr, "Can't write TIFFTAG_EXIFIFD.\n"); - goto failure; - } - -#ifdef WRITEPIXELLAST - /*-- Write dummy pixel data at the end of all directories. --*/ - if (TIFFWriteScanline(tif, buf, 0, 0) < 0) - { - fprintf(stderr, "Can't write image data after all directories.\n"); - goto failure; - } -#endif - - /*================= Close TIFF file ====================*/ - /* Always TIFFWriteDirectory() before using/creating another directory. - * Not necessary before TIFFClose(), however, TIFFClose() uses - * TIFFReWriteDirectory(), which forces directory to be written at another - * location. - * Therefore, better use TIFFWriteDirectory() just before TIFFCllose(). - */ - if (!TIFFWriteDirectory(tif)) - { - fprintf(stderr, "Can't write TIFF directory after EXIF tags.\n"); - goto failure; - } - TIFFClose(tif); - - fprintf(stderr, "-------- Continue Test ---------- reading ...\n"); - - /*=========== READING ============= READING ==========================*/ - /* Ok, now test whether we can read written values correctly. */ - tif = TIFFOpen(filenameRead, "r"); - if (!tif) - { - fprintf(stderr, "Can't open test TIFF file %s for reading.\n", - filenameRead); - goto failure; - } - - /*-- Read some special parameters out of the main directory --*/ - if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &auxUint32)) - { - fprintf(stderr, "Can't read %s.\n", "TIFFTAG_IMAGEWIDTH"); - goto failure; - } - if (auxUint32 != width) - { - fprintf(stderr, - "Read value of IMAGEWIDTH %" PRIu32 - " differs from set value %" PRIu16 ".\n", - auxUint32, width); - goto failure; - } - if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &auxUint32)) - { - fprintf(stderr, "Can't read %s.\n", "TIFFTAG_IMAGELENGTH"); - goto failure; - } - if (auxUint32 != width) - { - fprintf(stderr, - "Read value of TIFFTAG_IMAGELENGTH %" PRIu32 - " differs from set value %" PRIu16 ".\n", - auxUint32, length); - goto failure; - } - - /* TIFFTAG_NUMBEROFINKS is a special tag, which is automatically set when - * InkNames string is written. */ - if (!TIFFGetField(tif, TIFFTAG_NUMBEROFINKS, &auxUint16)) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_NUMBEROFINKS"); - goto failure; - } - else - { - if (auxUint16 != NINKS) - { - fprintf(stderr, - "Read value of TIFFTAG_NUMBEROFINKS %" PRIu32 - " differs from set value %" PRIu16 ".\n", - auxUint16, NINKS); - goto failure; - } - } - - /*================== Reading all TIFF tags =======================*/ - fprintf(stderr, "----Read TIFF tags ...\n"); - tFieldArray = _TIFFGetFields(); - iDataCnt = 0; - if (read_all_tags(tif, tFieldArray, listTagsNotToWrite, - NUM_ELEMENTS(listTagsNotToWrite), &iDataCnt)) - { - fprintf(stderr, "Error during TIFF tag reading.\n"); - goto failure; - } - - /*================== Reading GPS tags ============================*/ - /*-- First get offset to GPS-directory and set it active with - * TIFFReadGPSDirectory(). - * (this will destroy previously main directory fields in memory!) - */ - uint64_t read_dir_offset = 0; - fprintf(stderr, "----Read GPS tags ...\n"); - if (!TIFFGetField(tif, TIFFTAG_GPSIFD, &read_dir_offset)) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_GPSIFD"); - goto failure; - } - if (!TIFFReadGPSDirectory(tif, read_dir_offset)) - { - fprintf(stderr, "Can't read %s\n", "TIFFReadGPSDirectory()"); - goto failure; - } - - /*-- Now read and compare tags from GPS-directory --*/ - tFieldArray = _TIFFGetGpsFields(); - if (read_all_tags(tif, tFieldArray, NULL, 0, &iDataCnt)) - { - fprintf(stderr, "Error during GPS tag reading.\n"); - goto failure; - } - - /*================== Reading EXIF tags ===========================*/ - /*-- Go back to the first (main) directory using TIFFSetDirectory(), - * and then get value of the EXIFIFD directory offset. - * Then read EXIF directory tags from file into tif-structure. - * Finally, read and compare tags to the written values. - */ - TIFFSetDirectory(tif, 0); - fprintf(stderr, "----Read EXIF tags ...\n"); - if (!TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset)) - { - fprintf(stderr, "Can't read %s\n", "TIFFTAG_EXIFIFD"); - goto failure; - } - - if (!TIFFReadEXIFDirectory(tif, read_dir_offset)) - { - fprintf(stderr, "Can't read %s\n", "TIFFReadEXIFDirectory()"); - goto failure; - } - - tFieldArray = _TIFFGetExifFields(); - if (read_all_tags(tif, tFieldArray, NULL, 0, &iDataCnt)) - { - fprintf(stderr, "Error during EXIF tag reading.\n"); - goto failure; - } - - TIFFClose(tif); - - /* All tests passed; delete file and exit with success status. */ -#ifdef FOR_AUTO_TESTING - unlink(filenameRead); -#endif - fprintf(stderr, "-------- Test finished OK ----------\n"); - return 0; - -failure: - /* - * Something went wrong; close file and return unsuccessful status. - * Do not remove the file for further manual investigation. - */ - TIFFClose(tif); - fprintf(stderr, "-------- Test finished with FAILURE --------\n"); - return 1; -} /*-- write_test_tiff() --*/ - -/* ==== testPasscountFlag() =========================================== - * Checks the tag FieldArray settings for the passcount flag. - * Some tags, which are handled directly, do not follow the rules. - * - */ -int testPasscountFlag(const char *szMsg, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotFollowPasscountRules, - uint32_t nTagsInList) -{ - uint32_t t; - int retFails = 0; - - uint32_t nTags = tFieldArray->count; - /*-- Test ReadCount equals WriteCount. --*/ - int nFails = 0; - fprintf(stderr, "%-16s Check if writecount equals readcount ... ", szMsg); - for (t = 0; t < nTags; t++) - { - if (tagIsInList(tFieldArray->fields[t].field_tag, - plistTagsNotFollowPasscountRules, nTagsInList)) - continue; - - if (tFieldArray->fields[t].field_writecount != - tFieldArray->fields[t].field_readcount) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount %d for tag \t%-25s not equal ReadCount %d.\n", - tFieldArray->fields[t].field_writecount, - tFieldArray->fields[t].field_name, - tFieldArray->fields[t].field_readcount); - nFails++; - } - } /* for - readcount == writecount */ - if (nFails == 0) - fprintf(stderr, "--> OK\n"); - retFails += nFails; - - /*-- Test correct setting of passcount flag. --*/ - nFails = 0; - fprintf(stderr, - "%-16s Check if passcount flag is set according to " - "writecount value ... ", - szMsg); - for (t = 0; t < nTags; t++) - { - if (tagIsInList(tFieldArray->fields[t].field_tag, - plistTagsNotFollowPasscountRules, nTagsInList)) - continue; - - if (tFieldArray->fields[t].field_writecount < 0) - { - if (tFieldArray->fields[t].field_type != TIFF_ASCII && - tFieldArray->fields[t].field_passcount == 0) - { - if (tFieldArray->fields[t].field_readcount != TIFF_SPP) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "Passcount flag for variable rd/wrtcount tag " - "\t%-25s not " - "correctly set. Should be " - "TRUE.\n", - tFieldArray->fields[t].field_name); - } - else - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf( - stderr, - "Passcount flag for TIFF_SPP readcount tag \t%-25s not " - "correctly set. Should be " - "TRUE.\n", - tFieldArray->fields[t].field_name); - } - nFails++; - } - else if (tFieldArray->fields[t].field_type == TIFF_ASCII && - tFieldArray->fields[t].set_get_field_type == - TIFF_SETGET_ASCII && - tFieldArray->fields[t].field_writecount != - TIFF_VARIABLE2 && - tFieldArray->fields[t].field_passcount != 0) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf( - stderr, - "Passcount flag for ASCII tag \t%-25s not correctly set. " - "Should be " - "FALSE.\n", - tFieldArray->fields[t].field_name); - nFails++; - } - else if (tFieldArray->fields[t].field_type == TIFF_ASCII && - tFieldArray->fields[t].field_writecount == - TIFF_VARIABLE2 && - tFieldArray->fields[t].field_passcount == 0) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "Passcount flag for ASCII 'TIFF_VARIABLE2' tag \t%-25s " - "not correctly set. " - "Should be TRUE.\n", - tFieldArray->fields[t].field_name); - nFails++; - } - } - else - { - /* field_writecount >= 0 */ - if (tFieldArray->fields[t].field_passcount != 0) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "Passcount flag for tag \t%-25s not correctly set. " - "Should be " - "FALSE.\n", - tFieldArray->fields[t].field_name); - nFails++; - } - if (tFieldArray->fields[t].field_writecount == 0) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount for tag \t%-25s shall be not zero.\n", - tFieldArray->fields[t].field_name); - nFails++; - } - } - } /* for() - passcount flag */ - if (nFails == 0) - fprintf(stderr, "--> OK\n"); - retFails += nFails; - - /*-- Test correct read-/writecount and TIFF_SETGET type. --*/ - nFails = 0; - fprintf(stderr, "%-16s Check if writecount fits to set_get_field_type ... ", - szMsg); - for (t = 0; t < nTags; t++) - { - if (tagIsInList(tFieldArray->fields[t].field_tag, - plistTagsNotFollowPasscountRules, nTagsInList)) - continue; - - /* TIFF_SETGET_UNDEFINED tags FIELD_IGNORE tags are not written to file. - * Thus definition is obsolete. */ - // if (tFieldArray->fields[t].set_get_field_type >= - // TIFF_SETGET_UNDEFINED && - // tFieldArray->fields[t].field_bit == FIELD_IGNORE) - // continue; - - if (tFieldArray->fields[t].field_writecount == TIFF_VARIABLE2 && - !(tFieldArray->fields[t].set_get_field_type >= - TIFF_SETGET_C32_ASCII && - tFieldArray->fields[t].set_get_field_type <= - TIFF_SETGET_C32_IFD8)) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount %d for tag \t%-25s does not fit to " - "'set_get_field_type' %d. " - "Should be TIFF_VARIABLE2=-3\n", - tFieldArray->fields[t].field_writecount, - tFieldArray->fields[t].field_name, - tFieldArray->fields[t].set_get_field_type); - nFails++; - } - else if (tFieldArray->fields[t].field_writecount == TIFF_VARIABLE && - tFieldArray->fields[t].field_type != TIFF_ASCII && - !(tFieldArray->fields[t].set_get_field_type >= - TIFF_SETGET_C16_ASCII && - tFieldArray->fields[t].set_get_field_type <= - TIFF_SETGET_C16_IFD8)) - { - if (tFieldArray->fields[t].field_readcount == TIFF_SPP) - { - /* Special case for tags defined with one value per sample, - * thus readcount == SamplesPerPixel. - */ - } - else - { - - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount %d for tag \t%-25s does not fit to " - "'set_get_field_type' %d. " - "Should be TIFF_VARIABLE=-1\n", - tFieldArray->fields[t].field_writecount, - tFieldArray->fields[t].field_name, - tFieldArray->fields[t].set_get_field_type); - nFails++; - } - } - else if (tFieldArray->fields[t].field_writecount > 1 && - !((tFieldArray->fields[t].set_get_field_type >= - TIFF_SETGET_C0_ASCII && - tFieldArray->fields[t].set_get_field_type <= - TIFF_SETGET_C0_IFD8) || - tFieldArray->fields[t].set_get_field_type == - TIFF_SETGET_ASCII)) - { - if (!(tFieldArray->fields[t].set_get_field_type == - TIFF_SETGET_UINT16_PAIR && - tFieldArray->fields[t].field_writecount == 2)) - { - - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount %d for tag \t%-25s does not fit to " - "'set_get_field_type' %d. " - "Should be >1. \n", - tFieldArray->fields[t].field_writecount, - tFieldArray->fields[t].field_name, - tFieldArray->fields[t].set_get_field_type); - nFails++; - } - } - else if (tFieldArray->fields[t].field_writecount == 1 && - !(tFieldArray->fields[t].set_get_field_type >= - TIFF_SETGET_UNDEFINED && - tFieldArray->fields[t].set_get_field_type <= - TIFF_SETGET_INT)) - { - if (nFails == 0) - fprintf(stderr, "\n"); - fprintf(stderr, - "WriteCount %d for tag \t%-25s does not fit to " - "'set_get_field_type' %d. " - "Should be 1. \n", - tFieldArray->fields[t].field_writecount, - tFieldArray->fields[t].field_name, - tFieldArray->fields[t].set_get_field_type); - nFails++; - } - } /* for - read-/writecount and TIFF_SETGET type */ - if (nFails == 0) - fprintf(stderr, "--> OK\n"); - retFails += nFails; - - fprintf(stderr, "\n"); - return retFails; -} /*-- testPassountFlag() --*/ - -/* ==== write_all_tags() ============================================== - * Writes all tags within tFieldArray according to their set_get_field_type - * definition except tags listed in listTagsNotToWrite. - * iCnt is an index into predefined arrays for the values to write. - */ -int write_all_tags(TIFF *tif, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotToWrite, uint32_t nTagsInList, - uint32_t *iCnt) -{ - - char auxCharArray[2 * STRSIZE]; - - uint32_t i = *iCnt; - uint32_t nTags = tFieldArray->count; - for (uint32_t t = 0; t < nTags; i++, t++) - { - bool deferredSetField = false; - /* Always reset variableArrayCount to default value here. */ - uint32_t variableArrayCount = VARIABLE_ARRAY_SIZE; - - uint32_t tTag = tFieldArray->fields[t].field_tag; - if (tagIsInList(tTag, plistTagsNotToWrite, nTagsInList)) - continue; - - TIFFDataType tType = - tFieldArray->fields[t].field_type; /* e.g. TIFF_RATIONAL */ - (void)tType; - short tWriteCount = tFieldArray->fields[t].field_writecount; - TIFFSetGetFieldType tSetFieldType = - tFieldArray->fields[t] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - char *tFieldName = tFieldArray->fields[t].field_name; - void *pVoid = NULL; - - /*-- dependent on set_get_field_type write value --*/ - uint32_t auxUint32 = 0; - switch (tSetFieldType) - { - case TIFF_SETGET_ASCII: - /* Either the stringlength is defined as a fixed length in - * .field_writecount or a NULL-terminated string is used. - * Shorter strings than in auxTextArraxW need a - * NULL-termination. Therefore copy the string. */ - if (tWriteCount > 0) - auxUint32 = tWriteCount - 1; - else - auxUint32 = (uint32_t)strlen(auxTextArrayW[i]) - 1; - auxUint32 = (size_t)auxUint32 >= sizeof(auxCharArray) - ? (uint32_t)(sizeof(auxCharArray) - 1) - : auxUint32; - strncpy(auxCharArray, auxTextArrayW[i], auxUint32); - auxCharArray[auxUint32] = 0; - if (!TIFFSetField(tif, tTag, auxCharArray)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - break; - case TIFF_SETGET_C16_ASCII: - if (tTag == TIFFTAG_INKNAMES) - { - if (!TIFFSetField(tif, tTag, sizeof(inkNamesW), inkNamesW)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - break; - case TIFF_SETGET_UINT8: - case TIFF_SETGET_UINT16: - case TIFF_SETGET_UINT32: - case TIFF_SETGET_INT: - case TIFF_SETGET_UNDEFINED: - /*-- All those can be written with char, short or long - * parameter. Only value range should be in line. */ - if ((tSetFieldType == TIFF_SETGET_UINT8) && - (auxInt32ArrayW[i] > 255)) - auxInt32ArrayW[i] = 255; - else if ((tSetFieldType == TIFF_SETGET_UINT16) && - (auxInt32ArrayW[i] > 65535)) - auxInt32ArrayW[i] = 65535; - if (tTag == TIFFTAG_FILLORDER) - auxInt32ArrayW[i] = 1; - if (tTag == TIFFTAG_ORIENTATION) - auxInt32ArrayW[i] = 7; - if (tTag == TIFFTAG_RESOLUTIONUNIT) - auxInt32ArrayW[i] = 3; - if (tTag == TIFFTAG_SAMPLEFORMAT) - auxInt32ArrayW[i] = SAMPLEFORMAT_UINT; - if (!TIFFSetField(tif, tTag, auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - break; - case TIFF_SETGET_UINT16_PAIR: - if (auxInt32ArrayW[i] > 65535) - auxInt32ArrayW[i] = 65535; - if (!TIFFSetField(tif, tTag, 7, auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - break; - case TIFF_SETGET_UINT64: - case TIFF_SETGET_IFD8: - /* IFD8 is uint64_t but we write here only values for uint32 - * size, even for BigTIFF. - * -- Attention: -- - * "Variable promotion" for va_arg parameters are promoted to - * "int", which is different in x64 and x86 compilations. - * Thus cast to expected uint64_t. - */ - if (!TIFFSetField(tif, tTag, (uint64_t)auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - break; - case TIFF_SETGET_SINT8: - case TIFF_SETGET_SINT16: - case TIFF_SETGET_SINT32: - /*-- All those can be written with char, short or long - * parameter. Only value range should be in line. */ - if (!TIFFSetField(tif, tTag, -1.0 * auxInt32ArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - break; - case TIFF_SETGET_FLOAT: - case TIFF_SETGET_DOUBLE: - if (tWriteCount == 1) - { - /*-- All single values can be written with float or - * double parameter. Only value range should be in line. - */ - if (!TIFFSetField(tif, tTag, auxDoubleArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - else if (tFieldArray->fields[t].field_readcount == TIFF_SPP) - { - /*-- Some tags are written per SamplesPerPixel. For - * those, readcount is TIFF_SPP. */ - if (tTag == TIFFTAG_SMINSAMPLEVALUE || - tTag == TIFFTAG_SMAXSAMPLEVALUE) - { - auxDoubleArrayW[i] = 250; - } - if (!TIFFSetField(tif, tTag, auxDoubleArrayW[i])) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - else - { - fprintf(stderr, - "WriteCount for .set_get_field_type %d should be " - "1! %s\n", - tSetFieldType, tFieldArray->fields[t].field_name); - } - break; - /* _Cxx_ just defines the presence and size of the count - * parameter for the array: - * - C0=no count parameter (fixed array where, - * positive readcount/writecount gives array count) - * - C16=short (uint16_t) count parameter size - * - C32=long (uint32_t) count parameter size - * Check, if it is a single parameter, a fixed array or a - * variable array. - */ - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C32_FLOAT: - /* For arrays, distinguishing between float or double is - * essential, even for writing. */ - pVoid = &auxFloatArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_DOUBLE: - /* For arrays, distinguishing between float or double is - * essential, even for writing. */ - pVoid = &auxDoubleArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT8: - case TIFF_SETGET_C0_SINT8: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - pVoid = &auxCharArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT16: - case TIFF_SETGET_C0_SINT16: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - if (tTag == TIFFTAG_EXTRASAMPLES) - { - variableArrayCount = 1; - auxShortArrayW[i] = 2; - } - pVoid = &auxShortArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C0_UINT32: - case TIFF_SETGET_C0_SINT32: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - pVoid = &auxInt32ArrayW[i]; - deferredSetField = true; - break; - case TIFF_SETGET_C16_IFD8: - if (tTag == TIFFTAG_EXTRACAMERAPROFILES) - { - uint64_t a = 18; - if (!TIFFSetField(tif, tTag, 1, &a)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - else - { - pVoid = &auxInt32ArrayW[i]; - deferredSetField = true; - } - break; - case TIFF_SETGET_OTHER: - /* Transferfunction and Colormap to be inserted here. */ - fprintf(stderr, - "Writing of TIFF_SETGET_OTHER for tag %s not supported " - "yet.\n", - tFieldArray->fields[t].field_name); - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within writing switch for " - "%s.\n", - tSetFieldType, tFieldName); - }; /*-- switch(tSetFieldType) --*/ - - if (deferredSetField) - { - /* deferredSetField is used to write fixed arrays and - * variable arrays. - * pVoid pointer is set above to the corresponding array and - * some other parameters like variableArrayCount are set for the - * field, which is written now. - */ - if (tWriteCount == 1) - { - fprintf(stderr, - "WriteCount for .set_get_field_type %d should be -1 or " - "greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[t].field_name); - } - else - { - /*-- Either fix or variable array --*/ - /* Now decide between fixed or variable array */ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFSetField(tif, tTag, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - else - { - /*-- Special treatment of variable array -- - * For test, use always arraysize of - * VARIABLE_ARRAY_SIZE, apart a few exceptions, - * for which variableArrayCount is set differently above. - */ - if (!TIFFSetField(tif, tTag, variableArrayCount, pVoid)) - { - fprintf(stderr, "Can't write %s\n", - tFieldArray->fields[t].field_name); - goto failure; - } - } - } - } - } /*-- for() --*/ - - *iCnt = i; - return 0; -failure: - fprintf(stderr, "\n"); - *iCnt = i; - return 1; -} /*--- write_all_tags() ---*/ - -/* ==== tagIsInList() ================================================= - * Returns TRUE if tag is in the list, otherwise FALSE. - * When the pointer to the list is NULL also FALSE is returned. - */ -int tagIsInList(uint32_t tTag, uint32_t *list, uint32_t nTagsInList) -{ - if (list == NULL) - return 0; - - for (uint32_t i = 0; i < nTagsInList; i++) - { - if (tTag == list[i]) - return 1; - } - return 0; -} /*--- tagIsInList() ---*/ - -/* ==== read_all_tags() =============================================== - * Reads all tags within tFieldArray according to their set_get_field_type - * definition except tags listed in listTagsNotToWrite. - * iCnt is an index into predefined arrays for the values written. - * The read values are compared to the written ones. - */ -int read_all_tags(TIFF *tif, const TIFFFieldArray *tFieldArray, - uint32_t *plistTagsNotToWrite, uint32_t nTagsNotToWrite, - uint32_t *iCnt) -{ - - /* -- Variables for reading within the switch() -- */ - int32_t j; - float auxFloat = 0.0f; - double auxDouble = 0.0; - char auxChar = 0; - uint32_t auxUint32 = 0; - uint64_t auxUint64 = 0; - short auxShort = 0; - int32_t auxInt32 = 0; - union - { - int32_t Int32; - short Short1; - short Short2[2]; - char Char[4]; - } unionInt32; - void *pVoidArray; - char *pAscii; - double dblDiff, dblDiffLimit; - - char auxCharArray[2 * STRSIZE]; - short auxShortArray[2 * N_SIZE]; - int32_t auxInt32Array[2 * N_SIZE]; - float auxFloatArray[2 * N_SIZE]; - double auxDoubleArray[2 * N_SIZE]; -#define RATIONAL_EPS \ - (1.0 / 30000.0) /* reduced difference of rational values, approx 3.3e-5 */ - - uint32_t i = *iCnt; - uint32_t nTags = tFieldArray->count; - for (uint32_t t = 0; t < nTags; t++, i++) - { - uint32_t tTag = tFieldArray->fields[t].field_tag; - TIFFDataType tType = - tFieldArray->fields[t].field_type; /* e.g. TIFF_RATIONAL */ - short tWriteCount = tFieldArray->fields[t].field_writecount; - TIFFSetGetFieldType tSetFieldType = - tFieldArray->fields[t] - .set_get_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ - char *tFieldName = tFieldArray->fields[t].field_name; - if (tagIsInList(tTag, plistTagsNotToWrite, nTagsNotToWrite)) - continue; - - /*-- dependent on set_get_field_type read value --*/ - switch (tSetFieldType) - { - case TIFF_SETGET_ASCII: - /* Either the stringlength is defined as a fixed length in - * .field_writecount or a NULL-terminated string is used. */ - if (!TIFFGetField(tif, tTag, &pAscii)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* Save string from temporary buffer and compare with - * written string. */ - strncpy(auxCharArray, pAscii, sizeof(auxCharArray) - 1u); - auxCharArray[sizeof(auxCharArray) - 1u] = '\0'; - if (tWriteCount > 0) - auxInt32 = tWriteCount - 1; - else - auxInt32 = (int32_t)strlen(auxCharArray); - int retCode2 = - strncmp(auxCharArray, auxTextArrayW[i], auxInt32); - if (retCode2 != 0) - { - fprintf(stderr, - "%d:Read value of %s %s differs from set value " - "%s\n", - i, tFieldName, auxCharArray, auxTextArrayW[i]); - GOTOFAILURE - } - break; - case TIFF_SETGET_C16_ASCII: - if (tTag == TIFFTAG_INKNAMES) - { - if (!TIFFGetField(tif, tTag, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - if (_TIFFmemcmp(inkNamesW, pVoidArray, sizeof(inkNamesW)) != - 0) - { - fprintf(stderr, - "InkNames read (%s) are different from " - "InkNamesW " - "written %s.\n", - (char *)pVoidArray, inkNamesW); - GOTOFAILURE - } - } - break; - /*-- For reading, the parameter size is to be observed !! */ - case TIFF_SETGET_UINT8: - case TIFF_SETGET_SINT8: - if (!TIFFGetField(tif, tTag, &auxChar)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - auxInt32 = auxChar; - if (auxInt32 != (char)auxInt32ArrayW[i]) - { - fprintf(stderr, - "%d:Read value of %s %d differs from set " - "value %d\n", - i, tFieldName, auxInt32, auxInt32ArrayW[i]); - } - break; - case TIFF_SETGET_UINT16: - case TIFF_SETGET_SINT16: - if (!TIFFGetField(tif, tTag, &auxShort)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - auxInt32 = auxShort; - if (auxInt32 != (short)auxInt32ArrayW[i]) - { - fprintf(stderr, - "%d:Read value of %s %d differs from set " - "value %d\n", - i, tFieldName, auxInt32, auxInt32ArrayW[i]); - GOTOFAILURE - } - break; - case TIFF_SETGET_UINT16_PAIR: - if (!TIFFGetField(tif, tTag, &auxShortArray[0], - &auxShortArray[1])) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - if (auxShortArray[0] != 7 || - auxShortArray[1] != auxInt32ArrayW[i]) - { - fprintf(stderr, - "%d:Read value of %s %d/%d UINT16_PAIR differs " - "from set " - "values %d/%d\n", - i, tFieldName, auxShortArray[0], auxShortArray[1], - 7, auxInt32ArrayW[i]); - GOTOFAILURE - } - break; - case TIFF_SETGET_UINT32: - case TIFF_SETGET_SINT32: - case TIFF_SETGET_INT: - if (!TIFFGetField(tif, tTag, &auxUint32)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - auxInt32 = auxUint32; - if (auxInt32 != auxInt32ArrayW[i]) - { - uint32_t auxU; - if (tTag == TIFFTAG_TILEDEPTH && - TIFFGetField(tif, TIFFTAG_IMAGEDEPTH, &auxU)) - { - /* At directory re-reading from file, - tif->tif_dir.td_tiledepth = - tif->tif_dir.td_imagedepth is set. */ - if (auxUint32 != auxU) - { - fprintf(stderr, - "%d:Read value of %s %d differs " - "from set " - "value %d\n", - i, tFieldName, auxUint32, auxU); - GOTOFAILURE - } - } - else - { - fprintf(stderr, - "%d:Read value of %s %d differs from set " - "value %d\n", - i, tFieldName, auxInt32, auxInt32ArrayW[i]); - GOTOFAILURE - } - } - break; - case TIFF_SETGET_IFD8: - if (!TIFFGetField(tif, tTag, &auxUint64)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones, we wrote only - * unit32 values! */ - if (auxUint64 != (uint64_t)auxInt32ArrayW[i]) - { - fprintf(stderr, - "%d:Read value of %s %" PRIu64 " differs from set" - "value %d\n", - i, tFieldName, auxUint64, auxInt32ArrayW[i]); - GOTOFAILURE - } - break; - - case TIFF_SETGET_C16_IFD8: - if (!TIFFGetField(tif, tTag, &unionInt32, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - if (tTag == TIFFTAG_EXTRACAMERAPROFILES) - { - auxUint64 = *(uint64_t *)pVoidArray; - if (unionInt32.Short1 != 1 && auxUint64 != 18) - { - fprintf(stderr, - "%d:Read value of %s %" PRIu64 - " differs from set" - "value %d\n", - i, tFieldName, auxUint64, 18); - GOTOFAILURE - } - } - else - { - /* ToDo: Such tags are not written yet. - */ - fprintf(stderr, "TIFF_SETGET_C16_IFD8 arrays not supported " - "in this testprogram.\n"); - GOTOFAILURE - } - break; - case TIFF_SETGET_FLOAT: - if (!TIFFGetField(tif, tTag, &auxFloat)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-3; - dblDiff = auxFloat - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of - * "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to - * indicate infinite distance! However, there are two - * other EXIF tags where numerator indicates a special - * value and six other cases where the denominator - * indicates special values, which are not treated - * within LibTiff!! - */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxFloat == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from set value " - "%f\n", - i, tFieldName, auxFloat, auxDoubleArrayW[i]); - GOTOFAILURE - } - } - break; - case TIFF_SETGET_DOUBLE: - if (!TIFFGetField(tif, tTag, &auxDouble)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - dblDiff = auxDouble - auxDoubleArrayW[i]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of - * "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to - * indicate infinite distance! - */ - if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxDouble == -1.0)) - { - fprintf(stderr, - "%d:Read value of %s %f differs from set value " - "%f\n", - i, tFieldName, auxDouble, auxDoubleArrayW[i]); - GOTOFAILURE - } - } - break; - case TIFF_SETGET_C0_FLOAT: - case TIFF_SETGET_C0_DOUBLE: - case TIFF_SETGET_C16_FLOAT: - case TIFF_SETGET_C16_DOUBLE: - case TIFF_SETGET_C32_FLOAT: - case TIFF_SETGET_C32_DOUBLE: - case TIFF_SETGET_C0_UINT8: - case TIFF_SETGET_C0_SINT8: - case TIFF_SETGET_C16_UINT8: - case TIFF_SETGET_C16_SINT8: - case TIFF_SETGET_C32_UINT8: - case TIFF_SETGET_C32_SINT8: - case TIFF_SETGET_C0_UINT16: - case TIFF_SETGET_C0_SINT16: - case TIFF_SETGET_C16_UINT16: - case TIFF_SETGET_C16_SINT16: - case TIFF_SETGET_C32_UINT16: - case TIFF_SETGET_C32_SINT16: - case TIFF_SETGET_C0_UINT32: - case TIFF_SETGET_C0_SINT32: - case TIFF_SETGET_C16_UINT32: - case TIFF_SETGET_C16_SINT32: - case TIFF_SETGET_C32_UINT32: - case TIFF_SETGET_C32_SINT32: - { - /* _Cxx_ just defines the presence and size of the count - * parameter for the array: - * - C0=no count parameter (fixed array where, - * positive readcount/writecount gives array count) - * - C16=short (uint16_t) count parameter size - * - C32=long (uint32_t) count parameter size - * Check, if it is a single parameter, a fixed array or a - * variable array. - */ - if (tWriteCount == 1) - { - fprintf( - stderr, - "WriteCount for .set_get_field_type %d should be -1, " - "-2, -3 or " - "greater than 1! %s\n", - tSetFieldType, tFieldArray->fields[t].field_name); - GOTOFAILURE - } - else - { - /*-- Either fix or variable array --*/ - if (tWriteCount > 1) - { - /* fixed array with needed arraysize defined in - * .field_writecount */ - if (!TIFFGetField(tif, tTag, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* set tWriteCount to number of read samples for - * next steps - */ - auxInt32 = tWriteCount; - } - else - { - /*-- Special treatment of variable array. -- - * Dependent on _Cxx_, the count parameter is - * short or long. Therefore use unionInt32! - */ - if (!TIFFGetField(tif, tTag, &unionInt32, &pVoidArray)) - { - fprintf(stderr, "Can't read %s\n", - tFieldArray->fields[t].field_name); - GOTOFAILURE - break; - } - /* set tWriteCount to number of read samples for - * next steps - */ - if (tSetFieldType == TIFF_SETGET_C32_UINT8 || - tSetFieldType == TIFF_SETGET_C32_SINT8 || - tSetFieldType == TIFF_SETGET_C32_UINT16 || - tSetFieldType == TIFF_SETGET_C32_SINT16 || - tSetFieldType == TIFF_SETGET_C32_UINT32 || - tSetFieldType == TIFF_SETGET_C32_SINT32 || - tSetFieldType == TIFF_SETGET_C32_FLOAT || - tSetFieldType == TIFF_SETGET_C32_DOUBLE) - { - auxInt32 = unionInt32.Int32; - } - else - { - auxInt32 = unionInt32.Short1; - } - } - /* Save values from temporary array and compare to - * written values. */ - if (tSetFieldType == TIFF_SETGET_C0_FLOAT || - tSetFieldType == TIFF_SETGET_C16_FLOAT || - tSetFieldType == TIFF_SETGET_C32_FLOAT) - { - memcpy(&auxFloatArray, pVoidArray, - (auxInt32 * sizeof(auxFloatArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = auxFloatArray[j] - auxFloatArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of %s #%d %f differs " - "from set value %f\n", - i, tFieldName, j, auxFloatArray[j], - auxFloatArrayW[i + j]); - GOTOFAILURE - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_DOUBLE || - tSetFieldType == TIFF_SETGET_C16_DOUBLE || - tSetFieldType == TIFF_SETGET_C32_DOUBLE) - { - memcpy(&auxDoubleArray, pVoidArray, - (auxInt32 * sizeof(auxDoubleArray[0]))); - /* compare read values with written ones */ - if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) - dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; - else - dblDiffLimit = 1e-6; - for (j = 0; j < auxInt32; j++) - { - dblDiff = - auxDoubleArray[j] - auxDoubleArrayW[i + j]; - if (fabs(dblDiff) > fabs(dblDiffLimit)) - { - fprintf(stderr, - "Read value %d of %s #%d %f differs " - "from set value %f\n", - i, tFieldName, j, auxDoubleArray[j], - auxDoubleArrayW[i + j]); - GOTOFAILURE - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_UINT8 || - tSetFieldType == TIFF_SETGET_C0_SINT8 || - tSetFieldType == TIFF_SETGET_C16_UINT8 || - tSetFieldType == TIFF_SETGET_C16_SINT8 || - tSetFieldType == TIFF_SETGET_C32_UINT8 || - tSetFieldType == TIFF_SETGET_C32_SINT8) - { - memcpy(&auxCharArray, pVoidArray, - (auxInt32 * sizeof(auxCharArray[0]))); - /* Compare and check values */ - char *auxCharCompare; - if (tTag == EXIFTAG_EXIFVERSION) - { - auxCharCompare = exifVersion; - } - else if (tTag == GPSTAG_VERSIONID) - { - auxCharCompare = gpsVersion; - } - else - { - auxCharCompare = &auxCharArrayW[i]; - } - - for (j = 0; j < auxInt32; j++) - { - if (auxCharArray[j] != auxCharCompare[j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d differs " - "from set value %d\n", - i, tFieldName, j, auxCharArray[j], - auxCharArrayW[i + j]); - GOTOFAILURE - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_UINT16 || - tSetFieldType == TIFF_SETGET_C0_SINT16 || - tSetFieldType == TIFF_SETGET_C16_UINT16 || - tSetFieldType == TIFF_SETGET_C16_SINT16 || - tSetFieldType == TIFF_SETGET_C32_UINT16 || - tSetFieldType == TIFF_SETGET_C32_SINT16) - { - memcpy(&auxShortArray, pVoidArray, - (auxInt32 * sizeof(auxShortArray[0]))); - /* Compare and check values */ - for (j = 0; j < auxInt32; j++) - { - if (auxShortArray[j] != auxShortArrayW[i + j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d " - "differs from " - "set value %d\n", - i, tFieldName, j, auxShortArray[j], - auxShortArrayW[i + j]); - GOTOFAILURE - } - } - } - else if (tSetFieldType == TIFF_SETGET_C0_UINT32 || - tSetFieldType == TIFF_SETGET_C0_SINT32 || - tSetFieldType == TIFF_SETGET_C16_UINT32 || - tSetFieldType == TIFF_SETGET_C16_SINT32 || - tSetFieldType == TIFF_SETGET_C32_UINT32 || - tSetFieldType == TIFF_SETGET_C32_SINT32) - { - memcpy(&auxInt32Array, pVoidArray, - (auxInt32 * sizeof(auxInt32Array[0]))); - /* Compare and check values */ - for (j = 0; j < auxInt32; j++) - { - if (auxInt32Array[j] != auxInt32ArrayW[i + j]) - { - fprintf(stderr, - "Read value %d of %s #%d %d " - "differs from " - "set value %d\n", - i, tFieldName, j, auxInt32Array[j], - auxInt32ArrayW[i + j]); - GOTOFAILURE - } - } - } - else - { - fprintf(stderr, - "SetFieldType %d not defined within array" - "reading clause for %s.\n", - tSetFieldType, tFieldName); - GOTOFAILURE - } - } - } /* case for all arrays */ - break; - case TIFF_SETGET_OTHER: - /* ToDo: Transferfunction and Colormap to be inserted here. */ - break; - case TIFF_SETGET_UNDEFINED: - /* Such tags are not written to file. */ - break; - default: - fprintf(stderr, - "SetFieldType %d not defined within reading switch for " - "%s.\n", - tSetFieldType, tFieldName); - GOTOFAILURE - }; /*-- switch(tSetFieldType) --*/ - } /*-- for(t to nTags) --*/ - - *iCnt = i; - return 0; -failure: - fprintf(stderr, "\n"); - *iCnt = i; - return 1; -} /*--- read_all_tags() ---*/ diff --git a/third_party/libtiff/test/testdeflatelaststripextradata.sh b/third_party/libtiff/test/testdeflatelaststripextradata.sh deleted file mode 100644 index 115eb22..0000000 --- a/third_party/libtiff/test/testdeflatelaststripextradata.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# check decoding of a deflate compressed file whose last strip which should -# contain data for only 4 lines has more in it. -. ${srcdir:-.}/common.sh -infile="${IMAGES}/deflate-last-strip-extra-data.tiff" -outfile="o-deflate-last-strip-extra-data.tiff" -rm -f $outfile -echo "$MEMCHECK ${TIFFCP} -c zip $infile $outfile" -eval "$MEMCHECK ${TIFFCP} -c zip $infile $outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "\"${outfile}\" differs from reference file." - exit $status -fi - -outfile="o-deflate-last-strip-extra-data-tiled.tiff" -rm -f $outfile -echo "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $infile $outfile" -eval "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $infile $outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/o-deflate-last-strip-extra-data.tiff" -eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/o-deflate-last-strip-extra-data.tiff" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "\"${outfile}\" differs from reference file." - exit $status -fi diff --git a/third_party/libtiff/test/testfax3_bug54_1dnoEOL.sh b/third_party/libtiff/test/testfax3_bug54_1dnoEOL.sh deleted file mode 100644 index b92580f..0000000 --- a/third_party/libtiff/test/testfax3_bug54_1dnoEOL.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# check decoding of a CCITT Group 3 encoded TIFF without EOL -# hitting https://gitlab.com/libtiff/libtiff/-/issues/54 -. ${srcdir:-.}/common.sh -infile="${IMAGES}/testfax3_bug54_1dnoEOL.tif" -outfile="o-testfax3_bug54_1dnoEOL.tiff" -rm -f $outfile -echo "$MEMCHECK ${TIFFCP} -c none $infile $outfile" -eval "$MEMCHECK ${TIFFCP} -c none $infile $outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "\"${outfile}\" differs from reference file." - exit $status -fi diff --git a/third_party/libtiff/test/testfax3_bug_513.sh b/third_party/libtiff/test/testfax3_bug_513.sh deleted file mode 100644 index 751db96..0000000 --- a/third_party/libtiff/test/testfax3_bug_513.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# check decoding of a CCITT Group 3 encoded TIFF -# hitting https://gitlab.com/libtiff/libtiff/-/issues/513 -. ${srcdir:-.}/common.sh -infile="${IMAGES}/testfax3_bug_513.tiff" -outfile="o-testfax3_bug_513.tiff" -rm -f $outfile -echo "$MEMCHECK ${TIFFCP} -c none $infile $outfile" -eval "$MEMCHECK ${TIFFCP} -c none $infile $outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "\"${outfile}\" differs from reference file." - exit $status -fi diff --git a/third_party/libtiff/test/testfax4.sh b/third_party/libtiff/test/testfax4.sh deleted file mode 100644 index 6f465e8..0000000 --- a/third_party/libtiff/test/testfax4.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# check decoding of a CCITT Group 4 encoded TIFF -# with 0 length runs -. ${srcdir:-.}/common.sh -infile="${IMAGES}/testfax4.tiff" -outfile="o-testfax4.tiff" -rm -f $outfile -echo "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" -eval "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "Output (if any) is in \"${outfile}\"." - exit $status -fi -echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" -status=$? -if [ $status != 0 ] ; then - echo "Returned failed status $status!" - echo "\"${outfile}\" differs from reference file." - exit $status -fi diff --git a/third_party/libtiff/test/testtypes.c b/third_party/libtiff/test/testtypes.c deleted file mode 100644 index fefc1ff..0000000 --- a/third_party/libtiff/test/testtypes.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2019, Thomas Bernard - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library - * - * Module to test ASCII tags read/write functions. - */ - -#include "tif_config.h" - -#include - -#include "tiffio.h" - -#define CHECK_TYPE(t, s) \ - if (sizeof(t) != s) \ - { \ - fprintf(stderr, "sizeof(" #t ")=%d, it should be %d\n", \ - (int)sizeof(t), (int)s); \ - return 1; \ - } - -int main() -{ - CHECK_TYPE(int8_t, 1) - CHECK_TYPE(int16_t, 2) - CHECK_TYPE(int32_t, 4) - CHECK_TYPE(int64_t, 8) - CHECK_TYPE(uint8_t, 1) - CHECK_TYPE(uint16_t, 2) - CHECK_TYPE(uint32_t, 4) - CHECK_TYPE(uint64_t, 8) - CHECK_TYPE(tmsize_t, sizeof(size_t)) - return 0; -} diff --git a/third_party/libtiff/test/tiff2bw-palette-1c-8b.sh b/third_party/libtiff/test/tiff2bw-palette-1c-8b.sh deleted file mode 100644 index 45fe63b..0000000 --- a/third_party/libtiff/test/tiff2bw-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiff2bw-palette-1c-8b.tiff" -f_test_convert "$TIFF2BW" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2bw-quad-lzw-compat.sh b/third_party/libtiff/test/tiff2bw-quad-lzw-compat.sh deleted file mode 100644 index bf5d5c9..0000000 --- a/third_party/libtiff/test/tiff2bw-quad-lzw-compat.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/quad-lzw-compat.tiff" -outfile="o-tiff2bw-quad-lzw-compat.tiff" -f_test_convert "$TIFF2BW" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2bw-rgb-3c-8b.sh b/third_party/libtiff/test/tiff2bw-rgb-3c-8b.sh deleted file mode 100644 index 8379f5a..0000000 --- a/third_party/libtiff/test/tiff2bw-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiff2bw-rgb-3c-8b.tiff" -f_test_convert "$TIFF2BW" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2pdf.sh b/third_party/libtiff/test/tiff2pdf.sh deleted file mode 100644 index 7669989..0000000 --- a/third_party/libtiff/test/tiff2pdf.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiff2pdf -# -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PDF}" "${IMG_MINISWHITE_1C_1B}" "o-tiff2pdf.pdf" \ No newline at end of file diff --git a/third_party/libtiff/test/tiff2ps-EPS1.sh b/third_party/libtiff/test/tiff2ps-EPS1.sh deleted file mode 100644 index e4e48a3..0000000 --- a/third_party/libtiff/test/tiff2ps-EPS1.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 1 encapsulated output -# -PSFILE=o-tiff2ps-EPS1.ps -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -e -1" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" -cat "${REFS}/${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.ref.tmp" -cat "${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.tmp" -diff -b -u "${PSFILE}.ref.tmp" "${PSFILE}.tmp" || exit 1 -rm -f "${PSFILE}.ref.tmp" "${PSFILE}.tmp" diff --git a/third_party/libtiff/test/tiff2ps-PS1.sh b/third_party/libtiff/test/tiff2ps-PS1.sh deleted file mode 100644 index e26963e..0000000 --- a/third_party/libtiff/test/tiff2ps-PS1.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 1 output -# -PSFILE="o-tiff2ps-PS1.ps" -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -1" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" -cat "${REFS}/${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.ref.tmp" -cat "${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.tmp" -diff -b -u "${PSFILE}.ref.tmp" "${PSFILE}.tmp" || exit 1 -rm -f "${PSFILE}.ref.tmp" "${PSFILE}.tmp" diff --git a/third_party/libtiff/test/tiff2ps-PS2.sh b/third_party/libtiff/test/tiff2ps-PS2.sh deleted file mode 100644 index 0f4d1eb..0000000 --- a/third_party/libtiff/test/tiff2ps-PS2.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 2 output -# -PSFILE=o-tiff2ps-PS2.ps -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -2" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" -cat "${REFS}/${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.ref.tmp" -cat "${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.tmp" -diff -b -u "${PSFILE}.ref.tmp" "${PSFILE}.tmp" || exit 1 -rm -f "${PSFILE}.ref.tmp" "${PSFILE}.tmp" diff --git a/third_party/libtiff/test/tiff2ps-PS3.sh b/third_party/libtiff/test/tiff2ps-PS3.sh deleted file mode 100644 index 8bedea4..0000000 --- a/third_party/libtiff/test/tiff2ps-PS3.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 3 output -# -PSFILE=o-tiff2ps-PS3.ps -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -3" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" -cat "${REFS}/${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.ref.tmp" -cat "${PSFILE}" | grep -v '%%CreationDate:' | grep -v '%%Title:' > "${PSFILE}.tmp" -diff -b -u "${PSFILE}.ref.tmp" "${PSFILE}.tmp" || exit 1 -rm -f "${PSFILE}.ref.tmp" "${PSFILE}.tmp" diff --git a/third_party/libtiff/test/tiff2rgba-32bpp-None-jpeg.sh b/third_party/libtiff/test/tiff2rgba-32bpp-None-jpeg.sh deleted file mode 100644 index d435ccb..0000000 --- a/third_party/libtiff/test/tiff2rgba-32bpp-None-jpeg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/32bpp-None.tiff" -outfile="o-tiff2rgba-32bpp-None-jpeg.tiff" -f_test_convert "${TIFF2RGBA} -B 255 -n" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-logluv-3c-16b.sh b/third_party/libtiff/test/tiff2rgba-logluv-3c-16b.sh deleted file mode 100644 index bc9b311..0000000 --- a/third_party/libtiff/test/tiff2rgba-logluv-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/logluv-3c-16b.tiff" -outfile="o-tiff2rgba-logluv-3c-16b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-minisblack-1c-16b.sh b/third_party/libtiff/test/tiff2rgba-minisblack-1c-16b.sh deleted file mode 100644 index 5be7e65..0000000 --- a/third_party/libtiff/test/tiff2rgba-minisblack-1c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-16b.tiff" -outfile="o-tiff2rgba-minisblack-1c-16b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-minisblack-1c-8b.sh b/third_party/libtiff/test/tiff2rgba-minisblack-1c-8b.sh deleted file mode 100644 index ce0507b..0000000 --- a/third_party/libtiff/test/tiff2rgba-minisblack-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-8b.tiff" -outfile="o-tiff2rgba-minisblack-1c-8b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh b/third_party/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh deleted file mode 100644 index 2cbe81d..0000000 --- a/third_party/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-2c-8b-alpha.tiff" -outfile="o-tiff2rgba-minisblack-2c-8b-alpha.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh b/third_party/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh deleted file mode 100644 index 3601502..0000000 --- a/third_party/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/miniswhite-1c-1b.tiff" -outfile="o-tiff2rgba-miniswhite-1c-1b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh b/third_party/libtiff/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh deleted file mode 100644 index d1225c9..0000000 --- a/third_party/libtiff/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/ojpeg_chewey_subsamp21_multi_strip.tiff" -outfile="o-tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh b/third_party/libtiff/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh deleted file mode 100644 index d69c99d..0000000 --- a/third_party/libtiff/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/ojpeg_single_strip_no_rowsperstrip.tiff" -outfile="o-tiff2rgba-ojpeg_single_strip_no_rowsperstrip.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh b/third_party/libtiff/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh deleted file mode 100644 index ca23a12..0000000 --- a/third_party/libtiff/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/ojpeg_zackthecat_subsamp22_single_strip.tiff" -outfile="o-tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-palette-1c-1b.sh b/third_party/libtiff/test/tiff2rgba-palette-1c-1b.sh deleted file mode 100644 index 091d798..0000000 --- a/third_party/libtiff/test/tiff2rgba-palette-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-1b.tiff" -outfile="o-tiff2rgba-palette-1c-1b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-palette-1c-4b.sh b/third_party/libtiff/test/tiff2rgba-palette-1c-4b.sh deleted file mode 100644 index ee3898e..0000000 --- a/third_party/libtiff/test/tiff2rgba-palette-1c-4b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-4b.tiff" -outfile="o-tiff2rgba-palette-1c-4b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-palette-1c-8b.sh b/third_party/libtiff/test/tiff2rgba-palette-1c-8b.sh deleted file mode 100644 index b1db606..0000000 --- a/third_party/libtiff/test/tiff2rgba-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiff2rgba-palette-1c-8b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-quad-tile.jpg.sh b/third_party/libtiff/test/tiff2rgba-quad-tile.jpg.sh deleted file mode 100644 index e921b97..0000000 --- a/third_party/libtiff/test/tiff2rgba-quad-tile.jpg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/quad-tile.jpg.tiff" -outfile="o-tiff2rgba-quad-tile.jpg.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-rgb-3c-16b.sh b/third_party/libtiff/test/tiff2rgba-rgb-3c-16b.sh deleted file mode 100644 index 954eb4f..0000000 --- a/third_party/libtiff/test/tiff2rgba-rgb-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-16b.tiff" -outfile="o-tiff2rgba-rgb-3c-16b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiff2rgba-rgb-3c-8b.sh b/third_party/libtiff/test/tiff2rgba-rgb-3c-8b.sh deleted file mode 100644 index 24f5cb0..0000000 --- a/third_party/libtiff/test/tiff2rgba-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiff2rgba-rgb-3c-8b.tiff" -f_test_convert "$TIFF2RGBA" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcp-32bpp-None-jpeg.sh b/third_party/libtiff/test/tiffcp-32bpp-None-jpeg.sh deleted file mode 100644 index 6c70b9d..0000000 --- a/third_party/libtiff/test/tiffcp-32bpp-None-jpeg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/32bpp-None-jpeg.tiff" -outfile="o-tiffcp-32bpp-None-jpeg-YCbCr.tiff" -f_test_convert "${TIFFCP} -c jpeg" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcp-g3-1d-fill.sh b/third_party/libtiff/test/tiffcp-g3-1d-fill.sh deleted file mode 100644 index ee12498..0000000 --- a/third_party/libtiff/test/tiffcp-g3-1d-fill.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression, 1 dimensional -# encoding, and zero-filled boundaries. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:1d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d-fill.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-g3-1d.sh b/third_party/libtiff/test/tiffcp-g3-1d.sh deleted file mode 100644 index c11ef97..0000000 --- a/third_party/libtiff/test/tiffcp-g3-1d.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression and 1 dimensional encoding. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:1d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-g3-2d-fill.sh b/third_party/libtiff/test/tiffcp-g3-2d-fill.sh deleted file mode 100644 index c25825d..0000000 --- a/third_party/libtiff/test/tiffcp-g3-2d-fill.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression, 2 dimensional -# encoding, and zero-filled boundaries. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:2d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d-fill.tiff" diff --git a/third_party/libtiff/test/tiffcp-g3-2d.sh b/third_party/libtiff/test/tiffcp-g3-2d.sh deleted file mode 100644 index 5a59dd2..0000000 --- a/third_party/libtiff/test/tiffcp-g3-2d.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression and 2 dimensional encoding. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:2d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-g3.sh b/third_party/libtiff/test/tiffcp-g3.sh deleted file mode 100644 index d7a0107..0000000 --- a/third_party/libtiff/test/tiffcp-g3.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-g4.sh b/third_party/libtiff/test/tiffcp-g4.sh deleted file mode 100644 index fb8967a..0000000 --- a/third_party/libtiff/test/tiffcp-g4.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G4 compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g4" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g4.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-logluv.sh b/third_party/libtiff/test/tiffcp-logluv.sh deleted file mode 100644 index 3f62f57..0000000 --- a/third_party/libtiff/test/tiffcp-logluv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with logluv compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none" "${srcdir}/images/logluv-3c-16b.tiff" "o-tiffcp-logluv-raw.tiff" -f_test_convert "${TIFFCP} -c sgilog" "o-tiffcp-logluv-raw.tiff" "o-tiffcp-logluv-sgilog.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-lzw-compat.sh b/third_party/libtiff/test/tiffcp-lzw-compat.sh deleted file mode 100644 index bfc8d84..0000000 --- a/third_party/libtiff/test/tiffcp-lzw-compat.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with LZW Old-LZW decompression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none" "${IMG_QUAD_LZW_COMPAT}" "o-tiffcp-lzw-compat.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-lzw-scanline-decode.sh b/third_party/libtiff/test/tiffcp-lzw-scanline-decode.sh deleted file mode 100644 index 11654d1..0000000 --- a/third_party/libtiff/test/tiffcp-lzw-scanline-decode.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with LZW decompression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none -r 1" "${IMG_LZW_SINGLE_STROP}" "o-tiffcp-lzw-scanline-decode.tiff" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-lzw-single-strip-jbig.sh b/third_party/libtiff/test/tiffcp-lzw-single-strip-jbig.sh deleted file mode 100644 index 8b59229..0000000 --- a/third_party/libtiff/test/tiffcp-lzw-single-strip-jbig.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/lzw-single-strip.tiff" -outfile="o-tiffcp-lzw-single-strip-jbig.tiff" -f_test_convert "${TIFFCP} -c jbig" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcp-split-join.sh b/third_party/libtiff/test/tiffcp-split-join.sh deleted file mode 100644 index d1e407c..0000000 --- a/third_party/libtiff/test/tiffcp-split-join.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp + tiffsplit + tiffcp -# -# First we use tiffcp to join our test files into a multi-frame TIFF -# then we use tiffsplit to split them out again, and then we use -# tiffcp to recombine again. - -. ${srcdir:-.}/common.sh -conjoined=o-tiffcp-split-join-conjoined.tif -reconjoined=o-tiffcp-split-join-reconjoined.tif -splitfile=o-tiffcp-split-join-split- - -f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}" -f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}" -f_test_convert "${TIFFCP}" "${splitfile}*" "${reconjoined}" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-split.sh b/third_party/libtiff/test/tiffcp-split.sh deleted file mode 100644 index a2f98e3..0000000 --- a/third_party/libtiff/test/tiffcp-split.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp + tiffsplit -# -# First we use tiffcp to join our test files into a multi-frame TIFF -# and then we use tiffsplit to split them out again. -# -. ${srcdir:-.}/common.sh -conjoined=o-tiffcp-split-conjoined.tif -splitfile=o-tiffcp-split-split- - -f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}" -f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcp-thumbnail.sh b/third_party/libtiff/test/tiffcp-thumbnail.sh deleted file mode 100644 index 789cd80..0000000 --- a/third_party/libtiff/test/tiffcp-thumbnail.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for thumbnail -# -. ${srcdir:-.}/common.sh - -outfile1=o-tiffcp-thumbnail-in.tif -outfile2=o-tiffcp-thumbnail-out.tif -f_test_convert "${TIFFCP} -c g3:1d" "${IMG_MINISWHITE_1C_1B}" "${outfile1}" -f_test_convert "${THUMBNAIL}" "${outfile1}" "${outfile2}" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffcrop-32bpp-None-jpeg.sh b/third_party/libtiff/test/tiffcrop-32bpp-None-jpeg.sh deleted file mode 100644 index 4a47f6e..0000000 --- a/third_party/libtiff/test/tiffcrop-32bpp-None-jpeg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/32bpp-None-jpeg.tiff" -outfile="o-tiffcrop-32bpp-None-jpeg-YCbCr.tiff" -f_test_convert "${TIFFCROP} -c jpeg" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh b/third_party/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh deleted file mode 100644 index 9ed219e..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/logluv-3c-16b.tiff" -outfile="o-tiffcrop-R90-logluv-3c-16b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh b/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh deleted file mode 100644 index faee731..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-16b.tiff" -outfile="o-tiffcrop-R90-minisblack-1c-16b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh b/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh deleted file mode 100644 index 7acd5e7..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-8b.tiff" -outfile="o-tiffcrop-R90-minisblack-1c-8b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh b/third_party/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh deleted file mode 100644 index 2ef9039..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-2c-8b-alpha.tiff" -outfile="o-tiffcrop-R90-minisblack-2c-8b-alpha.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh b/third_party/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh deleted file mode 100644 index cae85f2..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/miniswhite-1c-1b.tiff" -outfile="o-tiffcrop-R90-miniswhite-1c-1b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-palette-1c-1b.sh b/third_party/libtiff/test/tiffcrop-R90-palette-1c-1b.sh deleted file mode 100644 index ca68b88..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-palette-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-1b.tiff" -outfile="o-tiffcrop-R90-palette-1c-1b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-palette-1c-4b.sh b/third_party/libtiff/test/tiffcrop-R90-palette-1c-4b.sh deleted file mode 100644 index 3cd96eb..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-palette-1c-4b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-4b.tiff" -outfile="o-tiffcrop-R90-palette-1c-4b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-palette-1c-8b.sh b/third_party/libtiff/test/tiffcrop-R90-palette-1c-8b.sh deleted file mode 100644 index daccfd3..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiffcrop-R90-palette-1c-8b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh b/third_party/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh deleted file mode 100644 index b1dddc3..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-16b.tiff" -outfile="o-tiffcrop-R90-rgb-3c-16b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh b/third_party/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh deleted file mode 100644 index 0a502c8..0000000 --- a/third_party/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiffcrop-R90-rgb-3c-8b.tiff" -f_test_convert "$TIFFCROP -R90" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh deleted file mode 100644 index c1b19b9..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/logluv-3c-16b.tiff" -outfile="o-tiffcrop-doubleflip-logluv-3c-16b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh deleted file mode 100644 index 1e2c4c9..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-16b.tiff" -outfile="o-tiffcrop-doubleflip-minisblack-1c-16b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh deleted file mode 100644 index 77798d9..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-8b.tiff" -outfile="o-tiffcrop-doubleflip-minisblack-1c-8b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh b/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh deleted file mode 100644 index b5b9db6..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-2c-8b-alpha.tiff" -outfile="o-tiffcrop-doubleflip-minisblack-2c-8b-alpha.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh deleted file mode 100644 index 07aab91..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/miniswhite-1c-1b.tiff" -outfile="o-tiffcrop-doubleflip-miniswhite-1c-1b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh deleted file mode 100644 index 581f7eb..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-1b.tiff" -outfile="o-tiffcrop-doubleflip-palette-1c-1b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh deleted file mode 100644 index d09b2aa..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-4b.tiff" -outfile="o-tiffcrop-doubleflip-palette-1c-4b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh deleted file mode 100644 index 53a08ae..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiffcrop-doubleflip-palette-1c-8b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh deleted file mode 100644 index 7165ad5..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-16b.tiff" -outfile="o-tiffcrop-doubleflip-rgb-3c-16b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh b/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh deleted file mode 100644 index 6bfa067..0000000 --- a/third_party/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiffcrop-doubleflip-rgb-3c-8b.tiff" -f_test_convert "$TIFFCROP -F both" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh b/third_party/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh deleted file mode 100644 index 821694b..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/logluv-3c-16b.tiff" -outfile="o-tiffcrop-extract-logluv-3c-16b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh b/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh deleted file mode 100644 index 603fc1c..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-16b.tiff" -outfile="o-tiffcrop-extract-minisblack-1c-16b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh b/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh deleted file mode 100644 index 6e473c5..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-8b.tiff" -outfile="o-tiffcrop-extract-minisblack-1c-8b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh b/third_party/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh deleted file mode 100644 index 976e888..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-2c-8b-alpha.tiff" -outfile="o-tiffcrop-extract-minisblack-2c-8b-alpha.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh b/third_party/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh deleted file mode 100644 index ca2b63c..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/miniswhite-1c-1b.tiff" -outfile="o-tiffcrop-extract-miniswhite-1c-1b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-palette-1c-1b.sh b/third_party/libtiff/test/tiffcrop-extract-palette-1c-1b.sh deleted file mode 100644 index e4aca8e..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-palette-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-1b.tiff" -outfile="o-tiffcrop-extract-palette-1c-1b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-palette-1c-4b.sh b/third_party/libtiff/test/tiffcrop-extract-palette-1c-4b.sh deleted file mode 100644 index 18884e4..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-palette-1c-4b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-4b.tiff" -outfile="o-tiffcrop-extract-palette-1c-4b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-palette-1c-8b.sh b/third_party/libtiff/test/tiffcrop-extract-palette-1c-8b.sh deleted file mode 100644 index cd418e0..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiffcrop-extract-palette-1c-8b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh b/third_party/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh deleted file mode 100644 index a3899d3..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-16b.tiff" -outfile="o-tiffcrop-extract-rgb-3c-16b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh b/third_party/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh deleted file mode 100644 index c03b037..0000000 --- a/third_party/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiffcrop-extract-rgb-3c-8b.tiff" -f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh b/third_party/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh deleted file mode 100644 index a617ad9..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/logluv-3c-16b.tiff" -outfile="o-tiffcrop-extractz14-logluv-3c-16b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh b/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh deleted file mode 100644 index 320fd5a..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-16b.tiff" -outfile="o-tiffcrop-extractz14-minisblack-1c-16b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh b/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh deleted file mode 100644 index 8df8578..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-1c-8b.tiff" -outfile="o-tiffcrop-extractz14-minisblack-1c-8b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh b/third_party/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh deleted file mode 100644 index 3e8ee15..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/minisblack-2c-8b-alpha.tiff" -outfile="o-tiffcrop-extractz14-minisblack-2c-8b-alpha.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh b/third_party/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh deleted file mode 100644 index 2cbffaa..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/miniswhite-1c-1b.tiff" -outfile="o-tiffcrop-extractz14-miniswhite-1c-1b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh b/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh deleted file mode 100644 index e0b305f..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-1b.tiff" -outfile="o-tiffcrop-extractz14-palette-1c-1b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh b/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh deleted file mode 100644 index 980b2bb..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-4b.tiff" -outfile="o-tiffcrop-extractz14-palette-1c-4b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh b/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh deleted file mode 100644 index af2e04c..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/palette-1c-8b.tiff" -outfile="o-tiffcrop-extractz14-palette-1c-8b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh b/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh deleted file mode 100644 index 9bc76e3..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-16b.tiff" -outfile="o-tiffcrop-extractz14-rgb-3c-16b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh b/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh deleted file mode 100644 index 21f76b8..0000000 --- a/third_party/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$srcdir/images/rgb-3c-8b.tiff" -outfile="o-tiffcrop-extractz14-rgb-3c-8b.tiff" -f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/third_party/libtiff/test/tiffdump.sh b/third_party/libtiff/test/tiffdump.sh deleted file mode 100644 index 3cd7c10..0000000 --- a/third_party/libtiff/test/tiffdump.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffdump -# -. ${srcdir:-.}/common.sh -f_test_reader "${TIFFDUMP}" "${IMG_MINISWHITE_1C_1B}" \ No newline at end of file diff --git a/third_party/libtiff/test/tiffinfo.sh b/third_party/libtiff/test/tiffinfo.sh deleted file mode 100644 index 9764bd5..0000000 --- a/third_party/libtiff/test/tiffinfo.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffinfo. -# -. ${srcdir:-.}/common.sh -f_test_reader "${TIFFINFO} -c -D -d -j -s " "${IMG_MINISBLACK_1C_16B}" -f_test_reader "${TIFFINFO} " "${IMG_TIFF_WITH_SUBIFD_CHAIN}" diff --git a/third_party/libtiff/test/tifftest.h b/third_party/libtiff/test/tifftest.h deleted file mode 100644 index 4a3e987..0000000 --- a/third_party/libtiff/test/tifftest.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2008, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifndef _TIFFTEST_ -#define _TIFFTEST_ - -/* - * TIFF Library - * - * Header file for helper testing routines. - */ - -#include "tiffio.h" - -int CheckShortField(TIFF *, const ttag_t, const uint16_t); -int CheckShortPairedField(TIFF *, const ttag_t, const uint16_t *); -int CheckLongField(TIFF *, const ttag_t, const uint32_t); - -#endif /* _TIFFTEST_ */ - diff --git a/third_party/libtiff/tools/CMakeLists.txt b/third_party/libtiff/tools/CMakeLists.txt deleted file mode 100644 index 55f9afb..0000000 --- a/third_party/libtiff/tools/CMakeLists.txt +++ /dev/null @@ -1,204 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Windows specific resource preparation -if (WIN32) - message(STATUS "Include resource version information for TOOLS") - set(MSVC_RESOURCE_FILE tif_tools_versioninfo.rc) - source_group("Resource Files" FILES tif_tools_versioninfo.rc) -endif () - - -add_executable(fax2ps ../placeholder.h) -target_sources(fax2ps PRIVATE fax2ps.c ${MSVC_RESOURCE_FILE}) -set_target_properties(fax2ps PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(fax2ps PRIVATE tiff tiff_port) - -add_executable(fax2tiff ../placeholder.h) -target_sources(fax2tiff PRIVATE fax2tiff.c ${MSVC_RESOURCE_FILE}) -set_target_properties(fax2tiff PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(fax2tiff PRIVATE tiff tiff_port) - -add_executable(pal2rgb ../placeholder.h) -target_sources(pal2rgb PRIVATE pal2rgb.c ${MSVC_RESOURCE_FILE}) -set_target_properties(pal2rgb PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(pal2rgb PRIVATE tiff tiff_port) - -add_executable(ppm2tiff ../placeholder.h) -target_sources(ppm2tiff PRIVATE ppm2tiff.c ${MSVC_RESOURCE_FILE}) -set_target_properties(ppm2tiff PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(ppm2tiff PRIVATE tiff tiff_port) - -add_executable(raw2tiff ../placeholder.h) -target_sources(raw2tiff PRIVATE raw2tiff.c ${MSVC_RESOURCE_FILE}) -set_target_properties(raw2tiff PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(raw2tiff PRIVATE tiff tiff_port CMath::CMath) - -add_executable(rgb2ycbcr ../placeholder.h) -target_sources(rgb2ycbcr PRIVATE rgb2ycbcr.c ${MSVC_RESOURCE_FILE}) -set_target_properties(rgb2ycbcr PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(rgb2ycbcr PRIVATE tiff tiff_port) - -add_executable(thumbnail ../placeholder.h) -target_sources(thumbnail PRIVATE thumbnail.c ${MSVC_RESOURCE_FILE}) -set_target_properties(thumbnail PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(thumbnail PRIVATE tiff tiff_port CMath::CMath) - -add_executable(tiff2bw ../placeholder.h) -target_sources(tiff2bw PRIVATE tiff2bw.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiff2bw PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff2bw PRIVATE tiff tiff_port) - -add_executable(tiff2pdf ../placeholder.h) -target_sources(tiff2pdf PRIVATE tiff2pdf.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiff2pdf PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff2pdf PRIVATE tiff tiff_port) - -add_executable(tiff2ps ../placeholder.h) -target_sources(tiff2ps PRIVATE tiff2ps.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiff2ps PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff2ps PRIVATE tiff tiff_port CMath::CMath) - -add_executable(tiff2rgba ../placeholder.h) -target_sources(tiff2rgba PRIVATE tiff2rgba.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiff2rgba PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiff2rgba PRIVATE tiff tiff_port) - -add_executable(tiffcmp ../placeholder.h) -target_sources(tiffcmp PRIVATE tiffcmp.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffcmp PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffcmp PRIVATE tiff tiff_port) - -add_executable(tiffcp ../placeholder.h) -target_sources(tiffcp PRIVATE tiffcp.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffcp PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffcp PRIVATE tiff tiff_port) - -add_executable(tiffcrop ../placeholder.h) -target_sources(tiffcrop PRIVATE tiffcrop.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffcrop PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffcrop PRIVATE tiff tiff_port CMath::CMath) - -add_executable(tiffdither ../placeholder.h) -target_sources(tiffdither PRIVATE tiffdither.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffdither PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffdither PRIVATE tiff tiff_port) - -add_executable(tiffdump ../placeholder.h) -target_sources(tiffdump PRIVATE tiffdump.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffdump PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffdump PRIVATE tiff tiff_port) - -add_executable(tiffinfo ../placeholder.h) -target_sources(tiffinfo PRIVATE tiffinfo.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffinfo PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffinfo PRIVATE tiff tiff_port) - -add_executable(tiffmedian ../placeholder.h) -target_sources(tiffmedian PRIVATE tiffmedian.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffmedian PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffmedian PRIVATE tiff tiff_port) - -add_executable(tiffset ../placeholder.h) -target_sources(tiffset PRIVATE tiffset.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffset PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffset PRIVATE tiff tiff_port) - -add_executable(tiffsplit ../placeholder.h) -target_sources(tiffsplit PRIVATE tiffsplit.c ${MSVC_RESOURCE_FILE}) -set_target_properties(tiffsplit PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(tiffsplit PRIVATE tiff tiff_port) - -if(NOT CMAKE_CROSSCOMPILING) - add_executable(tiff_mkg3states ../placeholder.h) - target_sources(tiff_mkg3states PRIVATE mkg3states.c ../libtiff/tif_fax3.h) - set_target_properties(tiff_mkg3states PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(tiff_mkg3states tiff tiff_port) - - add_custom_target(tiff_faxtable - DEPENDS tiff_mkg3states - COMMAND ${CMAKE_COMMAND} -E rm "tif_fax3sm.c" - COMMAND tiff_mkg3states -b -c const "tif_fax3sm.c" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") -endif() - -# rgb2ycbcr and thumbnail are intended to *NOT* be installed. They are for -# testing purposes only. -install(TARGETS fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - tiff2bw - tiff2pdf - tiff2ps - tiff2rgba - tiffcmp - tiffcp - tiffcrop - tiffdither - tiffdump - tiffinfo - tiffmedian - tiffset - tiffsplit - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") - -if(OPENGL_SUPPORT) - add_executable(tiffgt ../placeholder.h) - target_sources(tiffgt PRIVATE tiffgt.c) - set_target_properties(tiffgt PROPERTIES LINKER_LANGUAGE CXX) - target_link_libraries(tiffgt PRIVATE tiff tiff_port) - target_link_libraries(tiffgt PRIVATE OpenGL::GL GLUT::GLUT) - - install(TARGETS tiffgt - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -endif() - -if(WEBP_SUPPORT AND EMSCRIPTEN) - # Emscripten is pretty finnicky about linker flags. - # It needs --shared-memory if and only if atomics or bulk-memory is used. - foreach(target fax2ps - fax2tiff - pal2rgb - ppm2tiff - raw2tiff - rgb2ycbcr - thumbnail - tiff2bw - tiff2pdf - tiff2ps - tiff2rgba - tiffcmp - tiffcp - tiffcrop - tiffdither - tiffdump - tiffinfo - tiffmedian - tiffset - tiffsplit) - target_link_options(${target} PUBLIC "-Wl,--shared-memory") - endforeach() -endif() diff --git a/third_party/libtiff/tools/Makefile.am b/third_party/libtiff/tools/Makefile.am deleted file mode 100644 index 562aa99..0000000 --- a/third_party/libtiff/tools/Makefile.am +++ /dev/null @@ -1,157 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -LIBPORT = $(top_builddir)/port/libport.la -LIBTIFF = $(top_builddir)/libtiff/libtiff.la - -EXTRA_DIST = \ - CMakeLists.txt \ - tif_tools_versioninfo.rc - -if TIFF_TOOLS -bin_PROGRAMS = \ - fax2ps \ - fax2tiff \ - pal2rgb \ - ppm2tiff \ - raw2tiff \ - tiff2bw \ - tiff2pdf \ - tiff2ps \ - tiff2rgba \ - tiffcmp \ - tiffcp \ - tiffcrop \ - tiffdither \ - tiffdump \ - tiffinfo \ - tiffmedian \ - tiffset \ - tiffsplit -if HAVE_OPENGL -bin_PROGRAMS += tiffgt -endif -endif - -EXTRA_PROGRAMS = rgb2ycbcr thumbnail - -# Executable programs which need to be built in order to support tests -if TIFF_TESTS -check_PROGRAMS = \ - rgb2ycbcr \ - thumbnail -endif - -if HAVE_RPATH -AM_LDFLAGS = $(LIBDIR) -endif - -fax2ps_SOURCES = fax2ps.c -fax2ps_LDADD = $(LIBTIFF) $(LIBPORT) - -fax2tiff_SOURCES = fax2tiff.c -fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - -pal2rgb_SOURCES = pal2rgb.c -pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT) - -ppm2tiff_SOURCES = ppm2tiff.c -ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - -raw2tiff_SOURCES = raw2tiff.c -raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - -rgb2ycbcr_SOURCES = rgb2ycbcr.c -rgb2ycbcr_LDADD = $(LIBTIFF) $(LIBPORT) - -thumbnail_SOURCES = thumbnail.c -thumbnail_LDADD = $(LIBTIFF) $(LIBPORT) - -tiff2bw_SOURCES = tiff2bw.c -tiff2bw_LDADD = $(LIBTIFF) $(LIBPORT) - -tiff2pdf_SOURCES = tiff2pdf.c -tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) - -tiff2ps_SOURCES = tiff2ps.c -tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) - -tiff2rgba_SOURCES = tiff2rgba.c -tiff2rgba_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffcmp_SOURCES = tiffcmp.c -tiffcmp_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffcp_SOURCES = tiffcp.c -tiffcp_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffcrop_SOURCES = tiffcrop.c -tiffcrop_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffdither_SOURCES = tiffdither.c -tiffdither_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffdump_SOURCES = tiffdump.c -tiffdump_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffinfo_SOURCES = tiffinfo.c -tiffinfo_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffmedian_SOURCES = tiffmedian.c -tiffmedian_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffset_SOURCES = tiffset.c -tiffset_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffsplit_SOURCES = tiffsplit.c -tiffsplit_LDADD = $(LIBTIFF) $(LIBPORT) - -tiffgt_SOURCES = tiffgt.c -tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS) -tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port - -echo: - (echo $(CFLAGS)) - (echo $(tiffgt_CFLAGS)) - (echo $(GL_CFLAGS)) - (echo $(GLU_CFLAGS)) - (echo $(GLUT_CFLAGS)) - - -# -# The finite state machine tables used by the G3/G4 decoders -# are generated by the mkg3states program. On systems without -# make these rules have to be manually carried out. -# -noinst_PROGRAMS = mkg3states -mkg3states_SOURCES = mkg3states.c ../libtiff/tif_fax3.h -mkg3states_LDADD = $(LIBPORT) - -faxtable: mkg3states - (rm -f ../libtiff/tif_fax3sm.c && ./mkg3states -b -c const ../libtiff/tif_fax3sm.c) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port diff --git a/third_party/libtiff/tools/Makefile.in b/third_party/libtiff/tools/Makefile.in deleted file mode 100644 index 3902222..0000000 --- a/third_party/libtiff/tools/Makefile.in +++ /dev/null @@ -1,1054 +0,0 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2018 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@TIFF_TOOLS_TRUE@bin_PROGRAMS = fax2ps$(EXEEXT) fax2tiff$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ pal2rgb$(EXEEXT) ppm2tiff$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ raw2tiff$(EXEEXT) tiff2bw$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiff2pdf$(EXEEXT) tiff2ps$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiff2rgba$(EXEEXT) tiffcmp$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiffcp$(EXEEXT) tiffcrop$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiffdither$(EXEEXT) tiffdump$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiffinfo$(EXEEXT) tiffmedian$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ tiffset$(EXEEXT) tiffsplit$(EXEEXT) \ -@TIFF_TOOLS_TRUE@ $(am__EXEEXT_1) -@HAVE_OPENGL_TRUE@@TIFF_TOOLS_TRUE@am__append_1 = tiffgt -EXTRA_PROGRAMS = rgb2ycbcr$(EXEEXT) thumbnail$(EXEEXT) -@TIFF_TESTS_TRUE@check_PROGRAMS = rgb2ycbcr$(EXEEXT) \ -@TIFF_TESTS_TRUE@ thumbnail$(EXEEXT) -noinst_PROGRAMS = mkg3states$(EXEEXT) -subdir = tools -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config/config.h \ - $(top_builddir)/libtiff/tif_config.h \ - $(top_builddir)/libtiff/tiffconf.h \ - $(top_builddir)/port/libport_config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@HAVE_OPENGL_TRUE@@TIFF_TOOLS_TRUE@am__EXEEXT_1 = tiffgt$(EXEEXT) -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am_fax2ps_OBJECTS = fax2ps.$(OBJEXT) -fax2ps_OBJECTS = $(am_fax2ps_OBJECTS) -fax2ps_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -am_fax2tiff_OBJECTS = fax2tiff.$(OBJEXT) -fax2tiff_OBJECTS = $(am_fax2tiff_OBJECTS) -fax2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_mkg3states_OBJECTS = mkg3states.$(OBJEXT) -mkg3states_OBJECTS = $(am_mkg3states_OBJECTS) -mkg3states_DEPENDENCIES = $(LIBPORT) -am_pal2rgb_OBJECTS = pal2rgb.$(OBJEXT) -pal2rgb_OBJECTS = $(am_pal2rgb_OBJECTS) -pal2rgb_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_ppm2tiff_OBJECTS = ppm2tiff.$(OBJEXT) -ppm2tiff_OBJECTS = $(am_ppm2tiff_OBJECTS) -ppm2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_raw2tiff_OBJECTS = raw2tiff.$(OBJEXT) -raw2tiff_OBJECTS = $(am_raw2tiff_OBJECTS) -raw2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_rgb2ycbcr_OBJECTS = rgb2ycbcr.$(OBJEXT) -rgb2ycbcr_OBJECTS = $(am_rgb2ycbcr_OBJECTS) -rgb2ycbcr_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_thumbnail_OBJECTS = thumbnail.$(OBJEXT) -thumbnail_OBJECTS = $(am_thumbnail_OBJECTS) -thumbnail_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiff2bw_OBJECTS = tiff2bw.$(OBJEXT) -tiff2bw_OBJECTS = $(am_tiff2bw_OBJECTS) -tiff2bw_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiff2pdf_OBJECTS = tiff2pdf.$(OBJEXT) -tiff2pdf_OBJECTS = $(am_tiff2pdf_OBJECTS) -tiff2pdf_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiff2ps_OBJECTS = tiff2ps.$(OBJEXT) -tiff2ps_OBJECTS = $(am_tiff2ps_OBJECTS) -tiff2ps_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiff2rgba_OBJECTS = tiff2rgba.$(OBJEXT) -tiff2rgba_OBJECTS = $(am_tiff2rgba_OBJECTS) -tiff2rgba_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffcmp_OBJECTS = tiffcmp.$(OBJEXT) -tiffcmp_OBJECTS = $(am_tiffcmp_OBJECTS) -tiffcmp_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffcp_OBJECTS = tiffcp.$(OBJEXT) -tiffcp_OBJECTS = $(am_tiffcp_OBJECTS) -tiffcp_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffcrop_OBJECTS = tiffcrop.$(OBJEXT) -tiffcrop_OBJECTS = $(am_tiffcrop_OBJECTS) -tiffcrop_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffdither_OBJECTS = tiffdither.$(OBJEXT) -tiffdither_OBJECTS = $(am_tiffdither_OBJECTS) -tiffdither_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffdump_OBJECTS = tiffdump.$(OBJEXT) -tiffdump_OBJECTS = $(am_tiffdump_OBJECTS) -tiffdump_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffgt_OBJECTS = tiffgt-tiffgt.$(OBJEXT) -tiffgt_OBJECTS = $(am_tiffgt_OBJECTS) -am__DEPENDENCIES_1 = -tiffgt_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -tiffgt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(tiffgt_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_tiffinfo_OBJECTS = tiffinfo.$(OBJEXT) -tiffinfo_OBJECTS = $(am_tiffinfo_OBJECTS) -tiffinfo_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffmedian_OBJECTS = tiffmedian.$(OBJEXT) -tiffmedian_OBJECTS = $(am_tiffmedian_OBJECTS) -tiffmedian_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffset_OBJECTS = tiffset.$(OBJEXT) -tiffset_OBJECTS = $(am_tiffset_OBJECTS) -tiffset_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_tiffsplit_OBJECTS = tiffsplit.$(OBJEXT) -tiffsplit_OBJECTS = $(am_tiffsplit_OBJECTS) -tiffsplit_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/libtiff -I$(top_builddir)/port -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/fax2ps.Po ./$(DEPDIR)/fax2tiff.Po \ - ./$(DEPDIR)/mkg3states.Po ./$(DEPDIR)/pal2rgb.Po \ - ./$(DEPDIR)/ppm2tiff.Po ./$(DEPDIR)/raw2tiff.Po \ - ./$(DEPDIR)/rgb2ycbcr.Po ./$(DEPDIR)/thumbnail.Po \ - ./$(DEPDIR)/tiff2bw.Po ./$(DEPDIR)/tiff2pdf.Po \ - ./$(DEPDIR)/tiff2ps.Po ./$(DEPDIR)/tiff2rgba.Po \ - ./$(DEPDIR)/tiffcmp.Po ./$(DEPDIR)/tiffcp.Po \ - ./$(DEPDIR)/tiffcrop.Po ./$(DEPDIR)/tiffdither.Po \ - ./$(DEPDIR)/tiffdump.Po ./$(DEPDIR)/tiffgt-tiffgt.Po \ - ./$(DEPDIR)/tiffinfo.Po ./$(DEPDIR)/tiffmedian.Po \ - ./$(DEPDIR)/tiffset.Po ./$(DEPDIR)/tiffsplit.Po -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) $(mkg3states_SOURCES) \ - $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) $(raw2tiff_SOURCES) \ - $(rgb2ycbcr_SOURCES) $(thumbnail_SOURCES) $(tiff2bw_SOURCES) \ - $(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) $(tiff2rgba_SOURCES) \ - $(tiffcmp_SOURCES) $(tiffcp_SOURCES) $(tiffcrop_SOURCES) \ - $(tiffdither_SOURCES) $(tiffdump_SOURCES) $(tiffgt_SOURCES) \ - $(tiffinfo_SOURCES) $(tiffmedian_SOURCES) $(tiffset_SOURCES) \ - $(tiffsplit_SOURCES) -DIST_SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) \ - $(mkg3states_SOURCES) $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) \ - $(raw2tiff_SOURCES) $(rgb2ycbcr_SOURCES) $(thumbnail_SOURCES) \ - $(tiff2bw_SOURCES) $(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) \ - $(tiff2rgba_SOURCES) $(tiffcmp_SOURCES) $(tiffcp_SOURCES) \ - $(tiffcrop_SOURCES) $(tiffdither_SOURCES) $(tiffdump_SOURCES) \ - $(tiffgt_SOURCES) $(tiffinfo_SOURCES) $(tiffmedian_SOURCES) \ - $(tiffset_SOURCES) $(tiffsplit_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMAKE = @CMAKE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLUT_LIBS = @GLUT_LIBS@ -GLU_CFLAGS = @GLU_CFLAGS@ -GLU_LIBS = @GLU_LIBS@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBDIR = @LIBDIR@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@ -LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@ -LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@ -LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@ -LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@ -LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@ -LIBTIFF_VERSION = @LIBTIFF_VERSION@ -LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PYTHON_BIN = @PYTHON_BIN@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SPHINX_BUILD = @SPHINX_BUILD@ -STRIP = @STRIP@ -TIFF_MAN1_GEN = @TIFF_MAN1_GEN@ -TIFF_MAN1_PREBUILT = @TIFF_MAN1_PREBUILT@ -TIFF_MAN3_GEN = @TIFF_MAN3_GEN@ -TIFF_MAN3_PREBUILT = @TIFF_MAN3_PREBUILT@ -VERSION = @VERSION@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -tiff_libs_private = @tiff_libs_private@ -tiff_requires_private = @tiff_requires_private@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -LIBPORT = $(top_builddir)/port/libport.la -LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = \ - CMakeLists.txt \ - tif_tools_versioninfo.rc - -@HAVE_RPATH_TRUE@AM_LDFLAGS = $(LIBDIR) -fax2ps_SOURCES = fax2ps.c -fax2ps_LDADD = $(LIBTIFF) $(LIBPORT) -fax2tiff_SOURCES = fax2tiff.c -fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -pal2rgb_SOURCES = pal2rgb.c -pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT) -ppm2tiff_SOURCES = ppm2tiff.c -ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -raw2tiff_SOURCES = raw2tiff.c -raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -rgb2ycbcr_SOURCES = rgb2ycbcr.c -rgb2ycbcr_LDADD = $(LIBTIFF) $(LIBPORT) -thumbnail_SOURCES = thumbnail.c -thumbnail_LDADD = $(LIBTIFF) $(LIBPORT) -tiff2bw_SOURCES = tiff2bw.c -tiff2bw_LDADD = $(LIBTIFF) $(LIBPORT) -tiff2pdf_SOURCES = tiff2pdf.c -tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) -tiff2ps_SOURCES = tiff2ps.c -tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) -tiff2rgba_SOURCES = tiff2rgba.c -tiff2rgba_LDADD = $(LIBTIFF) $(LIBPORT) -tiffcmp_SOURCES = tiffcmp.c -tiffcmp_LDADD = $(LIBTIFF) $(LIBPORT) -tiffcp_SOURCES = tiffcp.c -tiffcp_LDADD = $(LIBTIFF) $(LIBPORT) -tiffcrop_SOURCES = tiffcrop.c -tiffcrop_LDADD = $(LIBTIFF) $(LIBPORT) -tiffdither_SOURCES = tiffdither.c -tiffdither_LDADD = $(LIBTIFF) $(LIBPORT) -tiffdump_SOURCES = tiffdump.c -tiffdump_LDADD = $(LIBTIFF) $(LIBPORT) -tiffinfo_SOURCES = tiffinfo.c -tiffinfo_LDADD = $(LIBTIFF) $(LIBPORT) -tiffmedian_SOURCES = tiffmedian.c -tiffmedian_LDADD = $(LIBTIFF) $(LIBPORT) -tiffset_SOURCES = tiffset.c -tiffset_LDADD = $(LIBTIFF) $(LIBPORT) -tiffsplit_SOURCES = tiffsplit.c -tiffsplit_LDADD = $(LIBTIFF) $(LIBPORT) -tiffgt_SOURCES = tiffgt.c -tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS) -tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port -mkg3states_SOURCES = mkg3states.c ../libtiff/tif_fax3.h -mkg3states_LDADD = $(LIBPORT) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tools/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -fax2ps$(EXEEXT): $(fax2ps_OBJECTS) $(fax2ps_DEPENDENCIES) $(EXTRA_fax2ps_DEPENDENCIES) - @rm -f fax2ps$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fax2ps_OBJECTS) $(fax2ps_LDADD) $(LIBS) - -fax2tiff$(EXEEXT): $(fax2tiff_OBJECTS) $(fax2tiff_DEPENDENCIES) $(EXTRA_fax2tiff_DEPENDENCIES) - @rm -f fax2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fax2tiff_OBJECTS) $(fax2tiff_LDADD) $(LIBS) - -mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES) $(EXTRA_mkg3states_DEPENDENCIES) - @rm -f mkg3states$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS) - -pal2rgb$(EXEEXT): $(pal2rgb_OBJECTS) $(pal2rgb_DEPENDENCIES) $(EXTRA_pal2rgb_DEPENDENCIES) - @rm -f pal2rgb$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(pal2rgb_OBJECTS) $(pal2rgb_LDADD) $(LIBS) - -ppm2tiff$(EXEEXT): $(ppm2tiff_OBJECTS) $(ppm2tiff_DEPENDENCIES) $(EXTRA_ppm2tiff_DEPENDENCIES) - @rm -f ppm2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ppm2tiff_OBJECTS) $(ppm2tiff_LDADD) $(LIBS) - -raw2tiff$(EXEEXT): $(raw2tiff_OBJECTS) $(raw2tiff_DEPENDENCIES) $(EXTRA_raw2tiff_DEPENDENCIES) - @rm -f raw2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(raw2tiff_OBJECTS) $(raw2tiff_LDADD) $(LIBS) - -rgb2ycbcr$(EXEEXT): $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_DEPENDENCIES) $(EXTRA_rgb2ycbcr_DEPENDENCIES) - @rm -f rgb2ycbcr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_LDADD) $(LIBS) - -thumbnail$(EXEEXT): $(thumbnail_OBJECTS) $(thumbnail_DEPENDENCIES) $(EXTRA_thumbnail_DEPENDENCIES) - @rm -f thumbnail$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(thumbnail_OBJECTS) $(thumbnail_LDADD) $(LIBS) - -tiff2bw$(EXEEXT): $(tiff2bw_OBJECTS) $(tiff2bw_DEPENDENCIES) $(EXTRA_tiff2bw_DEPENDENCIES) - @rm -f tiff2bw$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff2bw_OBJECTS) $(tiff2bw_LDADD) $(LIBS) - -tiff2pdf$(EXEEXT): $(tiff2pdf_OBJECTS) $(tiff2pdf_DEPENDENCIES) $(EXTRA_tiff2pdf_DEPENDENCIES) - @rm -f tiff2pdf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff2pdf_OBJECTS) $(tiff2pdf_LDADD) $(LIBS) - -tiff2ps$(EXEEXT): $(tiff2ps_OBJECTS) $(tiff2ps_DEPENDENCIES) $(EXTRA_tiff2ps_DEPENDENCIES) - @rm -f tiff2ps$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff2ps_OBJECTS) $(tiff2ps_LDADD) $(LIBS) - -tiff2rgba$(EXEEXT): $(tiff2rgba_OBJECTS) $(tiff2rgba_DEPENDENCIES) $(EXTRA_tiff2rgba_DEPENDENCIES) - @rm -f tiff2rgba$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiff2rgba_OBJECTS) $(tiff2rgba_LDADD) $(LIBS) - -tiffcmp$(EXEEXT): $(tiffcmp_OBJECTS) $(tiffcmp_DEPENDENCIES) $(EXTRA_tiffcmp_DEPENDENCIES) - @rm -f tiffcmp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffcmp_OBJECTS) $(tiffcmp_LDADD) $(LIBS) - -tiffcp$(EXEEXT): $(tiffcp_OBJECTS) $(tiffcp_DEPENDENCIES) $(EXTRA_tiffcp_DEPENDENCIES) - @rm -f tiffcp$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffcp_OBJECTS) $(tiffcp_LDADD) $(LIBS) - -tiffcrop$(EXEEXT): $(tiffcrop_OBJECTS) $(tiffcrop_DEPENDENCIES) $(EXTRA_tiffcrop_DEPENDENCIES) - @rm -f tiffcrop$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffcrop_OBJECTS) $(tiffcrop_LDADD) $(LIBS) - -tiffdither$(EXEEXT): $(tiffdither_OBJECTS) $(tiffdither_DEPENDENCIES) $(EXTRA_tiffdither_DEPENDENCIES) - @rm -f tiffdither$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffdither_OBJECTS) $(tiffdither_LDADD) $(LIBS) - -tiffdump$(EXEEXT): $(tiffdump_OBJECTS) $(tiffdump_DEPENDENCIES) $(EXTRA_tiffdump_DEPENDENCIES) - @rm -f tiffdump$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffdump_OBJECTS) $(tiffdump_LDADD) $(LIBS) - -tiffgt$(EXEEXT): $(tiffgt_OBJECTS) $(tiffgt_DEPENDENCIES) $(EXTRA_tiffgt_DEPENDENCIES) - @rm -f tiffgt$(EXEEXT) - $(AM_V_CCLD)$(tiffgt_LINK) $(tiffgt_OBJECTS) $(tiffgt_LDADD) $(LIBS) - -tiffinfo$(EXEEXT): $(tiffinfo_OBJECTS) $(tiffinfo_DEPENDENCIES) $(EXTRA_tiffinfo_DEPENDENCIES) - @rm -f tiffinfo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffinfo_OBJECTS) $(tiffinfo_LDADD) $(LIBS) - -tiffmedian$(EXEEXT): $(tiffmedian_OBJECTS) $(tiffmedian_DEPENDENCIES) $(EXTRA_tiffmedian_DEPENDENCIES) - @rm -f tiffmedian$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffmedian_OBJECTS) $(tiffmedian_LDADD) $(LIBS) - -tiffset$(EXEEXT): $(tiffset_OBJECTS) $(tiffset_DEPENDENCIES) $(EXTRA_tiffset_DEPENDENCIES) - @rm -f tiffset$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffset_OBJECTS) $(tiffset_LDADD) $(LIBS) - -tiffsplit$(EXEEXT): $(tiffsplit_OBJECTS) $(tiffsplit_DEPENDENCIES) $(EXTRA_tiffsplit_DEPENDENCIES) - @rm -f tiffsplit$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(tiffsplit_OBJECTS) $(tiffsplit_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2ps.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2tiff.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkg3states.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pal2rgb.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm2tiff.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw2tiff.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2ycbcr.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbnail.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2bw.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2pdf.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2ps.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2rgba.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcmp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcrop.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdither.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdump.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffgt-tiffgt.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffinfo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffmedian.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffset.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffsplit.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -tiffgt-tiffgt.o: tiffgt.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tiffgt_CFLAGS) $(CFLAGS) -MT tiffgt-tiffgt.o -MD -MP -MF $(DEPDIR)/tiffgt-tiffgt.Tpo -c -o tiffgt-tiffgt.o `test -f 'tiffgt.c' || echo '$(srcdir)/'`tiffgt.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tiffgt-tiffgt.Tpo $(DEPDIR)/tiffgt-tiffgt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tiffgt.c' object='tiffgt-tiffgt.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tiffgt_CFLAGS) $(CFLAGS) -c -o tiffgt-tiffgt.o `test -f 'tiffgt.c' || echo '$(srcdir)/'`tiffgt.c - -tiffgt-tiffgt.obj: tiffgt.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tiffgt_CFLAGS) $(CFLAGS) -MT tiffgt-tiffgt.obj -MD -MP -MF $(DEPDIR)/tiffgt-tiffgt.Tpo -c -o tiffgt-tiffgt.obj `if test -f 'tiffgt.c'; then $(CYGPATH_W) 'tiffgt.c'; else $(CYGPATH_W) '$(srcdir)/tiffgt.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tiffgt-tiffgt.Tpo $(DEPDIR)/tiffgt-tiffgt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tiffgt.c' object='tiffgt-tiffgt.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tiffgt_CFLAGS) $(CFLAGS) -c -o tiffgt-tiffgt.obj `if test -f 'tiffgt.c'; then $(CYGPATH_W) 'tiffgt.c'; else $(CYGPATH_W) '$(srcdir)/tiffgt.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f ./$(DEPDIR)/fax2ps.Po - -rm -f ./$(DEPDIR)/fax2tiff.Po - -rm -f ./$(DEPDIR)/mkg3states.Po - -rm -f ./$(DEPDIR)/pal2rgb.Po - -rm -f ./$(DEPDIR)/ppm2tiff.Po - -rm -f ./$(DEPDIR)/raw2tiff.Po - -rm -f ./$(DEPDIR)/rgb2ycbcr.Po - -rm -f ./$(DEPDIR)/thumbnail.Po - -rm -f ./$(DEPDIR)/tiff2bw.Po - -rm -f ./$(DEPDIR)/tiff2pdf.Po - -rm -f ./$(DEPDIR)/tiff2ps.Po - -rm -f ./$(DEPDIR)/tiff2rgba.Po - -rm -f ./$(DEPDIR)/tiffcmp.Po - -rm -f ./$(DEPDIR)/tiffcp.Po - -rm -f ./$(DEPDIR)/tiffcrop.Po - -rm -f ./$(DEPDIR)/tiffdither.Po - -rm -f ./$(DEPDIR)/tiffdump.Po - -rm -f ./$(DEPDIR)/tiffgt-tiffgt.Po - -rm -f ./$(DEPDIR)/tiffinfo.Po - -rm -f ./$(DEPDIR)/tiffmedian.Po - -rm -f ./$(DEPDIR)/tiffset.Po - -rm -f ./$(DEPDIR)/tiffsplit.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/fax2ps.Po - -rm -f ./$(DEPDIR)/fax2tiff.Po - -rm -f ./$(DEPDIR)/mkg3states.Po - -rm -f ./$(DEPDIR)/pal2rgb.Po - -rm -f ./$(DEPDIR)/ppm2tiff.Po - -rm -f ./$(DEPDIR)/raw2tiff.Po - -rm -f ./$(DEPDIR)/rgb2ycbcr.Po - -rm -f ./$(DEPDIR)/thumbnail.Po - -rm -f ./$(DEPDIR)/tiff2bw.Po - -rm -f ./$(DEPDIR)/tiff2pdf.Po - -rm -f ./$(DEPDIR)/tiff2ps.Po - -rm -f ./$(DEPDIR)/tiff2rgba.Po - -rm -f ./$(DEPDIR)/tiffcmp.Po - -rm -f ./$(DEPDIR)/tiffcp.Po - -rm -f ./$(DEPDIR)/tiffcrop.Po - -rm -f ./$(DEPDIR)/tiffdither.Po - -rm -f ./$(DEPDIR)/tiffdump.Po - -rm -f ./$(DEPDIR)/tiffgt-tiffgt.Po - -rm -f ./$(DEPDIR)/tiffinfo.Po - -rm -f ./$(DEPDIR)/tiffmedian.Po - -rm -f ./$(DEPDIR)/tiffset.Po - -rm -f ./$(DEPDIR)/tiffsplit.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS - -.PRECIOUS: Makefile - - -echo: - (echo $(CFLAGS)) - (echo $(tiffgt_CFLAGS)) - (echo $(GL_CFLAGS)) - (echo $(GLU_CFLAGS)) - (echo $(GLUT_CFLAGS)) - -faxtable: mkg3states - (rm -f ../libtiff/tif_fax3sm.c && ./mkg3states -b -c const ../libtiff/tif_fax3sm.c) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libtiff/tools/fax2ps.c b/third_party/libtiff/tools/fax2ps.c deleted file mode 100644 index 8c6da99..0000000 --- a/third_party/libtiff/tools/fax2ps.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -float defxres = 204.; /* default x resolution (pixels/inch) */ -float defyres = 98.; /* default y resolution (lines/inch) */ -const float half = 0.5; -const float points = 72.0; -float pageWidth = 0; /* image page width (inches) */ -float pageHeight = 0; /* image page length (inches) */ -int scaleToPage = 0; /* if true, scale raster to page dimensions */ -int totalPages = 0; /* total # pages printed */ -int row; /* current output row */ -int maxline = 512; /* max output line of PostScript */ - -/* - * Turn a bit-mapped scanline into the appropriate sequence - * of PostScript characters to be rendered. - * - * Original version written by Bret D. Whissel, - * Florida State University Meteorology Department - * March 13-15, 1995. - */ -static void printruns(unsigned char *buf, uint32_t *runs, uint32_t *erun, - uint32_t lastx) -{ - static struct - { - char white, black; - unsigned short width; - } WBarr[] = {{'d', 'n', 512}, {'e', 'o', 256}, {'f', 'p', 128}, - {'g', 'q', 64}, {'h', 'r', 32}, {'i', 's', 16}, - {'j', 't', 8}, {'k', 'u', 4}, {'l', 'v', 2}, - {'m', 'w', 1}}; - static char *svalue = - " !\"#$&'*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abc"; - int colormode = 1; /* 0 for white, 1 for black */ - uint32_t runlength = 0; - int n = maxline; - uint32_t x = 0; - int l; - - (void)buf; - printf("%d m(", row++); - while (runs < erun) - { - if (runlength <= 0) - { - colormode ^= 1; - runlength = *runs++; - if (x + runlength > lastx) - runlength = runs[-1] = lastx - x; - x += runlength; - if (!colormode && runs == erun) - break; /* don't bother printing the final white run */ - } - /* - * If a runlength is greater than 6 pixels, then spit out - * black or white characters until the runlength drops to - * 6 or less. Once a runlength is <= 6, then combine black - * and white runlengths until a 6-pixel pattern is obtained. - * Then write out the special character. Six-pixel patterns - * were selected since 64 patterns is the largest power of - * two less than the 92 "easily printable" PostScript - * characters (i.e., no escape codes or octal chars). - */ - l = 0; - while (runlength > 6) - { /* Run is greater than six... */ - if (runlength >= WBarr[l].width) - { - if (n == 0) - { - putchar('\n'); - n = maxline; - } - putchar(colormode ? WBarr[l].black : WBarr[l].white), n--; - runlength -= WBarr[l].width; - } - else - l++; - } - while (runlength > 0 && runlength <= 6) - { - uint32_t bitsleft = 6; - int t = 0; - while (bitsleft) - { - if (runlength <= bitsleft) - { - if (colormode) - t |= ((1 << runlength) - 1) << (bitsleft - runlength); - bitsleft -= runlength; - runlength = 0; - if (bitsleft) - { - if (runs >= erun) - break; - colormode ^= 1; - runlength = *runs++; - if (x + runlength > lastx) - runlength = runs[-1] = lastx - x; - x += runlength; - } - } - else - { /* runlength exceeds bits left */ - if (colormode) - t |= ((1 << bitsleft) - 1); - runlength -= bitsleft; - bitsleft = 0; - } - } - if (n == 0) - { - putchar('\n'); - n = maxline; - } - putchar(svalue[t]), n--; - } - } - printf(")s\n"); -} - -/* - * Create a special PostScript font for printing FAX documents. By taking - * advantage of the font-cacheing mechanism, a substantial speed-up in - * rendering time is realized. - */ -static void emitFont(FILE *fd) -{ - static const char *fontPrologue[] = { - "/newfont 10 dict def newfont begin /FontType 3 def /FontMatrix [1", - "0 0 1 0 0] def /FontBBox [0 0 512 1] def /Encoding 256 array def", - "0 1 31{Encoding exch /255 put}for 120 1 255{Encoding exch /255", - "put}for Encoding 37 /255 put Encoding 40 /255 put Encoding 41 /255", - "put Encoding 92 /255 put /count 0 def /ls{Encoding exch count 3", - "string cvs cvn put /count count 1 add def}def 32 1 36{ls}for", - "38 1 39{ls}for 42 1 91{ls}for 93 1 99{ls}for /count 100", - "def 100 1 119{ls}for /CharDict 5 dict def CharDict begin /white", - "{dup 255 eq{pop}{1 dict begin 100 sub neg 512 exch bitshift", - "/cw exch def cw 0 0 0 cw 1 setcachedevice end}ifelse}def /black", - "{dup 255 eq{pop}{1 dict begin 110 sub neg 512 exch bitshift", - "/cw exch def cw 0 0 0 cw 1 setcachedevice 0 0 moveto cw 0 rlineto", - "0 1 rlineto cw neg 0 rlineto closepath fill end}ifelse}def /numbuild", - "{dup 255 eq{pop}{6 0 0 0 6 1 setcachedevice 0 1 5{0 moveto", - "dup 32 and 32 eq{1 0 rlineto 0 1 rlineto -1 0 rlineto closepath", - "fill newpath}if 1 bitshift}for pop}ifelse}def /.notdef {}", - "def /255 {}def end /BuildChar{exch begin dup 110 ge{Encoding", - "exch get 3 string cvs cvi CharDict /black get}{dup 100 ge {Encoding", - "exch get 3 string cvs cvi CharDict /white get}{Encoding exch get", - "3 string cvs cvi CharDict /numbuild get}ifelse}ifelse exec end", - "}def end /Bitfont newfont definefont 1 scalefont setfont", - NULL}; - int i; - for (i = 0; fontPrologue[i] != NULL; i++) - fprintf(fd, "%s\n", fontPrologue[i]); -} - -void printTIF(TIFF *tif, uint16_t pageNumber) -{ - uint32_t w, h; - uint16_t unit, compression; - float xres, yres, scale = 1.0; - tstrip_t s, ns; - time_t creation_time; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - if (!TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression) || - compression < COMPRESSION_CCITTRLE || - compression > COMPRESSION_CCITT_T6) - return; - if (!TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres) || !xres) - { - TIFFWarning(TIFFFileName(tif), "No x-resolution, assuming %g dpi", - defxres); - xres = defxres; - } - if (!TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres) || !yres) - { - TIFFWarning(TIFFFileName(tif), "No y-resolution, assuming %g lpi", - defyres); - yres = defyres; /* XXX */ - } - if (TIFFGetField(tif, TIFFTAG_RESOLUTIONUNIT, &unit) && - unit == RESUNIT_CENTIMETER) - { - xres *= 2.54F; - yres *= 2.54F; - } - if (pageWidth == 0) - pageWidth = w / xres; - if (pageHeight == 0) - pageHeight = h / yres; - - printf("%%!PS-Adobe-3.0\n"); - printf("%%%%Creator: fax2ps\n"); -#ifdef notdef - printf("%%%%Title: %s\n", file); -#endif - creation_time = time(0); - printf("%%%%CreationDate: %s", ctime(&creation_time)); - printf("%%%%Origin: 0 0\n"); - printf("%%%%BoundingBox: 0 0 %u %u\n", (int)(pageWidth * points), - (int)(pageHeight * points)); /* XXX */ - printf("%%%%Pages: (atend)\n"); - printf("%%%%EndComments\n"); - printf("%%%%BeginProlog\n"); - emitFont(stdout); - printf("/d{bind def}def\n"); /* bind and def proc */ - printf("/m{0 exch moveto}d\n"); - printf("/s{show}d\n"); - printf("/p{showpage}d \n"); /* end page */ - printf("%%%%EndProlog\n"); - printf("%%%%Page: \"%u\" %u\n", pageNumber, pageNumber); - printf("/$pageTop save def gsave\n"); - if (scaleToPage) - scale = pageHeight / (h / yres) < pageWidth / (w / xres) - ? pageHeight / (h / yres) - : pageWidth / (w / xres); - printf("%g %g translate\n", points * (pageWidth - scale * w / xres) * half, - points * - (scale * h / yres + (pageHeight - scale * h / yres) * half)); - printf("%g %g scale\n", points / xres * scale, -points / yres * scale); - printf("0 setgray\n"); - TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, printruns); - ns = TIFFNumberOfStrips(tif); - row = 0; - for (s = 0; s < ns; s++) - (void)TIFFReadEncodedStrip(tif, s, (tdata_t)NULL, (tsize_t)-1); - printf("p\n"); - printf("grestore $pageTop restore\n"); - totalPages++; -} - -#define GetPageNumber(tif) TIFFGetField(tif, TIFFTAG_PAGENUMBER, &pn, &ptotal) - -int findPage(TIFF *tif, uint16_t pageNumber) -{ - uint16_t pn = (uint16_t)-1; - uint16_t ptotal = (uint16_t)-1; - if (GetPageNumber(tif)) - { - while (pn != (pageNumber - 1) && TIFFReadDirectory(tif) && - GetPageNumber(tif)) - ; - return (pn == (pageNumber - 1)); - } - else - return (TIFFSetDirectory(tif, (tdir_t)(pageNumber - 1))); -} - -void fax2ps(TIFF *tif, uint16_t npages, uint16_t *pages, char *filename) -{ - if (npages > 0) - { - uint16_t pn, ptotal; - int i; - - if (!GetPageNumber(tif)) - fprintf(stderr, "%s: No page numbers, counting directories.\n", - filename); - for (i = 0; i < npages; i++) - { - if (findPage(tif, pages[i])) - printTIF(tif, pages[i]); - else - fprintf(stderr, "%s: No page number %d\n", filename, pages[i]); - } - } - else - { - uint16_t pageNumber = 0; - do - printTIF(tif, pageNumber++); - while (TIFFReadDirectory(tif)); - } -} - -#undef GetPageNumber - -static int pcompar(const void *va, const void *vb) -{ - const uint16_t *pa = (const uint16_t *)va; - const uint16_t *pb = (const uint16_t *)vb; - return ((int32_t)*pa - (int32_t)*pb); -} - -static void usage(int code); - -int main(int argc, char **argv) -{ -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - uint16_t *pages = NULL, npages = 0, pageNumber; - int c, dowarnings = 0; /* if 1, enable library warnings */ - TIFF *tif; - - while ((c = getopt(argc, argv, "l:p:x:y:W:H:wSh")) != -1) - switch (c) - { - case 'H': /* page height */ - pageHeight = (float)atof(optarg); - break; - case 'S': /* scale to page */ - scaleToPage = 1; - break; - case 'W': /* page width */ - pageWidth = (float)atof(optarg); - break; - case 'p': /* print specific page */ - pageNumber = (uint16_t)atoi(optarg); - if (pages) - pages = (uint16_t *)realloc(pages, (npages + 1) * - sizeof(uint16_t)); - else - pages = (uint16_t *)malloc(sizeof(uint16_t)); - if (pages == NULL) - { - fprintf(stderr, "Out of memory\n"); - exit(EXIT_FAILURE); - } - pages[npages++] = pageNumber; - break; - case 'w': - dowarnings = 1; - break; - case 'x': - defxres = (float)atof(optarg); - break; - case 'y': - defyres = (float)atof(optarg); - break; - case 'l': - maxline = atoi(optarg); - break; - case 'h': - free(pages); - usage(EXIT_SUCCESS); - break; - case '?': - free(pages); - usage(EXIT_FAILURE); - } - if (npages > 0) - qsort(pages, npages, sizeof(uint16_t), pcompar); - if (!dowarnings) - TIFFSetWarningHandler(0); - if (optind < argc) - { - do - { - tif = TIFFOpen(argv[optind], "r"); - if (tif) - { - fax2ps(tif, npages, pages, argv[optind]); - TIFFClose(tif); - } - else - fprintf(stderr, "%s: Can not open, or not a TIFF file.\n", - argv[optind]); - } while (++optind < argc); - } - else - { - int n; - FILE *fd; - char buf[16 * 1024]; - - /* Silence Coverity Scan warning about insecure temporary file name. */ - /* coverity[secure_temp:SUPPRESS] */ - fd = tmpfile(); - if (fd == NULL) - { - fprintf(stderr, "Could not obtain temporary file.\n"); - free(pages); - exit(EXIT_FAILURE); - } -#if defined(HAVE_SETMODE) && defined(O_BINARY) - setmode(fileno(stdin), O_BINARY); -#endif - while ((n = read(fileno(stdin), buf, sizeof(buf))) > 0) - { - if (write(fileno(fd), buf, n) != n) - { - fclose(fd); - fprintf(stderr, "Could not copy stdin to temporary file.\n"); - free(pages); - exit(EXIT_FAILURE); - } - } - _TIFF_lseek_f(fileno(fd), 0, SEEK_SET); -#if defined(_WIN32) && defined(USE_WIN32_FILEIO) - /* Avoid compiler warnings by using successive casts. */ - tif = TIFFFdOpen((int)(intptr_t)(HANDLE)_get_osfhandle(fileno(fd)), - "temp", "r"); -#else - tif = TIFFFdOpen(fileno(fd), "temp", "r"); -#endif - if (tif) - { - fax2ps(tif, npages, pages, ""); - TIFFClose(tif); - } - else - fprintf(stderr, "Can not open, or not a TIFF file.\n"); - fclose(fd); - } - printf("%%%%Trailer\n"); - printf("%%%%Pages: %u\n", totalPages); - printf("%%%%EOF\n"); - - free(pages); - return (EXIT_SUCCESS); -} - -static const char usage_info[] = - "Convert a TIFF facsimile to compressed PostScript\n\n" - "usage: fax2ps [options] [input.tif ...]\n" - "where options are:\n" - " -w suppress warning messages\n" - " -l chars set maximum output line length for generated PostScript\n" - " -p page# select page to print (can use multiple times)\n" - " -x xres set default horizontal resolution of input data (dpi)\n" - " -y yres set default vertical resolution of input data (lpi)\n" - " -S scale output to page size\n" - " -W width set output page width (inches), default is 8.5\n" - " -H height set output page height (inches), default is 11\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/fax2tiff.c b/third_party/libtiff/tools/fax2tiff.c deleted file mode 100644 index 365bb35..0000000 --- a/third_party/libtiff/tools/fax2tiff.c +++ /dev/null @@ -1,525 +0,0 @@ -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * Convert a CCITT Group 3 or 4 FAX file to TIFF Group 3 or 4 format. - */ -#include "libport.h" -#include "tif_config.h" - -#include -#include /* should have atof & getopt */ - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define TIFFhowmany8(x) \ - (((x)&0x07) ? ((uint32_t)(x) >> 3) + 1 : (uint32_t)(x) >> 3) - -TIFF *faxTIFF; -char *rowbuf; -char *refbuf; - -uint32_t xsize = 1728; -int verbose; -int stretch; -uint16_t badfaxrun; -uint32_t badfaxlines; -int compression_in; - -int copyFaxFile(TIFF *tifin, TIFF *tifout); -static void usage(int code); - -/* - Struct to carry client data. Note that it does not appear that the client - data is actually used in this program. -*/ -typedef union _FAX_Client_Data -{ - thandle_t fh; /* Operating system file handle */ - int fd; /* Integer file descriptor */ -} FAX_Client_Data; - -int main(int argc, char *argv[]) -{ - FILE *in; - TIFF *out = NULL; - FAX_Client_Data client_data; - TIFFErrorHandler whandler = NULL; - compression_in = COMPRESSION_CCITTFAX3; - int compression_out = COMPRESSION_CCITTFAX3; - int fillorder_in = FILLORDER_LSB2MSB; - int fillorder_out = FILLORDER_LSB2MSB; - uint32_t group3options_in = 0; /* 1d-encoded */ - uint32_t group3options_out = 0; /* 1d-encoded */ - uint32_t group4options_in = 0; /* compressed */ - uint32_t group4options_out = 0; /* compressed */ - uint32_t defrowsperstrip = (uint32_t)0; - uint32_t rowsperstrip; - int photometric_in = PHOTOMETRIC_MINISWHITE; - int photometric_out = PHOTOMETRIC_MINISWHITE; - int mode = FAXMODE_CLASSF; - int rows; - int c; - int pn, npages; - float resY = 196.0; - -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "R:X:o:r:1234ABLMPUW5678abcflmprsuvwzh")) != - -1) - switch (c) - { - /* input-related options */ - case '3': /* input is g3-encoded */ - compression_in = COMPRESSION_CCITTFAX3; - break; - case '4': /* input is g4-encoded */ - compression_in = COMPRESSION_CCITTFAX4; - break; - case 'U': /* input is uncompressed (g3 and g4) */ - group3options_in |= GROUP3OPT_UNCOMPRESSED; - group4options_in |= GROUP4OPT_UNCOMPRESSED; - break; - case '1': /* input is 1d-encoded (g3 only) */ - group3options_in &= ~GROUP3OPT_2DENCODING; - break; - case '2': /* input is 2d-encoded (g3 only) */ - group3options_in |= GROUP3OPT_2DENCODING; - break; - case 'P': /* input has not-aligned EOL (g3 only) */ - group3options_in &= ~GROUP3OPT_FILLBITS; - break; - case 'A': /* input has aligned EOL (g3 only) */ - group3options_in |= GROUP3OPT_FILLBITS; - break; - case 'W': /* input has 0 mean white */ - photometric_in = PHOTOMETRIC_MINISWHITE; - break; - case 'B': /* input has 0 mean black */ - photometric_in = PHOTOMETRIC_MINISBLACK; - break; - case 'L': /* input has lsb-to-msb fillorder */ - fillorder_in = FILLORDER_LSB2MSB; - break; - case 'M': /* input has msb-to-lsb fillorder */ - fillorder_in = FILLORDER_MSB2LSB; - break; - case 'R': /* input resolution */ - resY = (float)atof(optarg); - break; - case 'X': /* input width */ - xsize = (uint32_t)atoi(optarg); - if (xsize < 1 || xsize > 10000) - { - fprintf(stderr, - "%s: The input width %s is not reasonable\n", - argv[0], optarg); - return EXIT_FAILURE; - } - break; - - /* output-related options */ - case '7': /* generate g3-encoded output */ - compression_out = COMPRESSION_CCITTFAX3; - break; - case '8': /* generate g4-encoded output */ - compression_out = COMPRESSION_CCITTFAX4; - break; - case 'u': /* generate uncompressed output (g3 and g4) */ - group3options_out |= GROUP3OPT_UNCOMPRESSED; - group4options_out |= GROUP4OPT_UNCOMPRESSED; - break; - case '5': /* generate 1d-encoded output (g3 only) */ - group3options_out &= ~GROUP3OPT_2DENCODING; - break; - case '6': /* generate 2d-encoded output (g3 only) */ - group3options_out |= GROUP3OPT_2DENCODING; - break; - case 'c': /* generate "classic" g3 format */ - mode = FAXMODE_CLASSIC; - break; - case 'f': /* generate Class F format */ - mode = FAXMODE_CLASSF; - break; - case 'm': /* output's fillorder is msb-to-lsb */ - fillorder_out = FILLORDER_MSB2LSB; - break; - case 'l': /* output's fillorder is lsb-to-msb */ - fillorder_out = FILLORDER_LSB2MSB; - break; - case 'o': - out = TIFFOpen(optarg, "w"); - if (out == NULL) - { - fprintf(stderr, "%s: Can not create or open %s\n", argv[0], - optarg); - return EXIT_FAILURE; - } - break; - case 'a': /* generate EOL-aligned output (g3 only) */ - group3options_out |= GROUP3OPT_FILLBITS; - break; - case 'p': /* generate not EOL-aligned output (g3 only) */ - group3options_out &= ~GROUP3OPT_FILLBITS; - break; - case 'r': /* rows/strip */ - defrowsperstrip = atol(optarg); - break; - case 's': /* stretch image by dup'ng scanlines */ - stretch = 1; - break; - case 'w': /* undocumented -- for testing */ - photometric_out = PHOTOMETRIC_MINISWHITE; - break; - case 'b': /* undocumented -- for testing */ - photometric_out = PHOTOMETRIC_MINISBLACK; - break; - case 'z': /* undocumented -- for testing */ - compression_out = COMPRESSION_LZW; - break; - case 'v': /* -v for info */ - verbose++; - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - } - npages = argc - optind; - if (npages < 1) - usage(EXIT_FAILURE); - - rowbuf = _TIFFmalloc(TIFFhowmany8(xsize)); - refbuf = _TIFFmalloc(TIFFhowmany8(xsize)); - if (rowbuf == NULL || refbuf == NULL) - { - TIFFClose(out); - if (rowbuf) - _TIFFfree(rowbuf); - if (refbuf) - _TIFFfree(refbuf); - fprintf(stderr, "%s: Not enough memory\n", argv[0]); - return (EXIT_FAILURE); - } - - if (out == NULL) - { - out = TIFFOpen("fax.tif", "w"); - if (out == NULL) - { - fprintf(stderr, "%s: Can not create fax.tif\n", argv[0]); - TIFFClose(out); - if (rowbuf) - _TIFFfree(rowbuf); - if (refbuf) - _TIFFfree(refbuf); - return (EXIT_FAILURE); - } - } - - faxTIFF = TIFFClientOpen( - "(FakeInput)", "w", - /* TIFFClientOpen() fails if we don't set existing value here */ - TIFFClientdata(out), TIFFGetReadProc(out), TIFFGetWriteProc(out), - TIFFGetSeekProc(out), TIFFGetCloseProc(out), TIFFGetSizeProc(out), - TIFFGetMapFileProc(out), TIFFGetUnmapFileProc(out)); - if (faxTIFF == NULL) - { - fprintf(stderr, "%s: Can not create fake input file\n", argv[0]); - TIFFClose(out); - if (rowbuf) - _TIFFfree(rowbuf); - if (refbuf) - _TIFFfree(refbuf); - return (EXIT_FAILURE); - } - TIFFSetMode(faxTIFF, O_RDONLY); - TIFFSetField(faxTIFF, TIFFTAG_IMAGEWIDTH, xsize); - TIFFSetField(faxTIFF, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(faxTIFF, TIFFTAG_BITSPERSAMPLE, 1); - TIFFSetField(faxTIFF, TIFFTAG_FILLORDER, fillorder_in); - TIFFSetField(faxTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(faxTIFF, TIFFTAG_PHOTOMETRIC, photometric_in); - TIFFSetField(faxTIFF, TIFFTAG_YRESOLUTION, resY); - TIFFSetField(faxTIFF, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - - /* NB: this must be done after directory info is setup */ - TIFFSetField(faxTIFF, TIFFTAG_COMPRESSION, compression_in); - if (compression_in == COMPRESSION_CCITTFAX3) - TIFFSetField(faxTIFF, TIFFTAG_GROUP3OPTIONS, group3options_in); - else if (compression_in == COMPRESSION_CCITTFAX4) - TIFFSetField(faxTIFF, TIFFTAG_GROUP4OPTIONS, group4options_in); - for (pn = 0; optind < argc; pn++, optind++) - { - in = fopen(argv[optind], "rb"); - if (in == NULL) - { - fprintf(stderr, "%s: %s: Can not open\n", argv[0], argv[optind]); - continue; - } -#if defined(_WIN32) && defined(USE_WIN32_FILEIO) - client_data.fh = (thandle_t)_get_osfhandle(fileno(in)); -#else - client_data.fd = fileno(in); -#endif - TIFFSetClientdata(faxTIFF, client_data.fh); - TIFFSetFileName(faxTIFF, (const char *)argv[optind]); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression_out); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric_out); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1); - switch (compression_out) - { - /* g3 */ - case COMPRESSION_CCITTFAX3: - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, group3options_out); - TIFFSetField(out, TIFFTAG_FAXMODE, mode); - rowsperstrip = - (defrowsperstrip) ? defrowsperstrip : (uint32_t)-1L; - break; - - /* g4 */ - case COMPRESSION_CCITTFAX4: - TIFFSetField(out, TIFFTAG_GROUP4OPTIONS, group4options_out); - TIFFSetField(out, TIFFTAG_FAXMODE, mode); - rowsperstrip = - (defrowsperstrip) ? defrowsperstrip : (uint32_t)-1L; - break; - - default: - rowsperstrip = (defrowsperstrip) ? defrowsperstrip - : TIFFDefaultStripSize(out, 0); - } - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder_out); - TIFFSetField(out, TIFFTAG_SOFTWARE, "fax2tiff"); - TIFFSetField(out, TIFFTAG_XRESOLUTION, 204.0); - if (!stretch) - { - TIFFGetField(faxTIFF, TIFFTAG_YRESOLUTION, &resY); - TIFFSetField(out, TIFFTAG_YRESOLUTION, resY); - } - else - TIFFSetField(out, TIFFTAG_YRESOLUTION, 196.); - TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - TIFFSetField(out, TIFFTAG_PAGENUMBER, pn, npages); - - if (!verbose) - whandler = TIFFSetWarningHandler(NULL); - rows = copyFaxFile(faxTIFF, out); - fclose(in); - if (!verbose) - (void)TIFFSetWarningHandler(whandler); - - TIFFSetField(out, TIFFTAG_IMAGELENGTH, rows); - - if (verbose) - { - fprintf(stderr, "%s:\n", argv[optind]); - fprintf(stderr, "%d rows in input\n", rows); - fprintf(stderr, "%" PRIu32 " total bad rows\n", badfaxlines); - fprintf(stderr, "%" PRIu16 " max consecutive bad rows\n", - badfaxrun); - } - if (compression_out == COMPRESSION_CCITTFAX3 && mode == FAXMODE_CLASSF) - { - TIFFSetField(out, TIFFTAG_BADFAXLINES, badfaxlines); - TIFFSetField(out, TIFFTAG_CLEANFAXDATA, - badfaxlines ? CLEANFAXDATA_REGENERATED - : CLEANFAXDATA_CLEAN); - TIFFSetField(out, TIFFTAG_CONSECUTIVEBADFAXLINES, badfaxrun); - } - TIFFWriteDirectory(out); - } - TIFFClose(out); - _TIFFfree(rowbuf); - _TIFFfree(refbuf); - return (EXIT_SUCCESS); -} - -int copyFaxFile(TIFF *tifin, TIFF *tifout) -{ - uint32_t row; - uint32_t linesize = TIFFhowmany8(xsize); - uint16_t badrun; - int ok; - - tifin->tif_rawdatasize = (tmsize_t)TIFFGetFileSize(tifin); - if (tifin->tif_rawdatasize == 0) - { - TIFFError(tifin->tif_name, "Empty input file"); - return (0); - } - tifin->tif_rawdata = _TIFFmalloc(tifin->tif_rawdatasize); - if (tifin->tif_rawdata == NULL) - { - TIFFError(tifin->tif_name, "Not enough memory"); - return (0); - } - if (!ReadOK(tifin, tifin->tif_rawdata, tifin->tif_rawdatasize)) - { - TIFFError(tifin->tif_name, "Read error at scanline 0"); - _TIFFfree(tifin->tif_rawdata); - return (0); - } - tifin->tif_rawcp = tifin->tif_rawdata; - tifin->tif_rawcc = tifin->tif_rawdatasize; - - (*tifin->tif_setupdecode)(tifin); - (*tifin->tif_predecode)(tifin, (tsample_t)0); - tifin->tif_row = 0; - badfaxlines = 0; - badfaxrun = 0; - - _TIFFmemset(refbuf, 0, linesize); - row = 0; - badrun = 0; /* current run of bad lines */ - while (tifin->tif_rawcc > 0) - { - ok = (*tifin->tif_decoderow)(tifin, (tdata_t)rowbuf, linesize, 0); - if (ok < 1) - { - if (compression_in == COMPRESSION_CCITTFAX4) - { - /* This is probably EOFB, but if it's corrupt data, then we - * can't continue, anyway. */ - break; - } - badfaxlines++; - badrun++; - /* regenerate line from previous good line */ - _TIFFmemcpy(rowbuf, refbuf, linesize); - } - else - { - if (badrun > badfaxrun) - badfaxrun = badrun; - badrun = 0; - _TIFFmemcpy(refbuf, rowbuf, linesize); - } - tifin->tif_row++; - - if (TIFFWriteScanline(tifout, rowbuf, row, 0) < 0) - { - fprintf(stderr, "%s: Write error at row %" PRIu32 ".\n", - tifout->tif_name, row); - break; - } - row++; - if (stretch) - { - if (TIFFWriteScanline(tifout, rowbuf, row, 0) < 0) - { - fprintf(stderr, "%s: Write error at row %" PRIu32 ".\n", - tifout->tif_name, row); - break; - } - row++; - } - } - if (badrun > badfaxrun) - badfaxrun = badrun; - _TIFFfree(tifin->tif_rawdata); - return (row); -} - -static const char usage_info[] = - "Create a TIFF Class F fax file from raw fax data\n\n" - "usage: fax2tiff [options] input.raw...\n" - "where options are:\n" - " -3 input data is G3-encoded [default]\n" - " -4 input data is G4-encoded\n" - " -U input data is uncompressed (G3 or G4)\n" - " -1 input data is 1D-encoded (G3 only) [default]\n" - " -2 input data is 2D-encoded (G3 only)\n" - " -P input is not EOL-aligned (G3 only) [default]\n" - " -A input is EOL-aligned (G3 only)\n" - " -M input data has MSB2LSB bit order\n" - " -L input data has LSB2MSB bit order [default]\n" - " -B input data has min 0 means black\n" - " -b input data has min 0 means black (same as -B)\n" - " -W input data has min 0 means white [default]\n" - " -w input data has min 0 means white (same as -W)\n" - " -R # input data has # resolution (lines/inch) [default is " - "196]\n" - " -X # input data has # width [default is " - "1728]\n" - "\n" - " -o out.tif write output to out.tif\n" -#ifdef CCITT_SUPPORT - " -7 generate G3-encoded output [default]\n" - " -8 generate G4-encoded output\n" - " -u generate uncompressed output (G3 or G4)\n" - " -5 generate 1D-encoded output (G3 only)\n" - " -6 generate 2D-encoded output (G3 only) [default]\n" - " -p generate not EOL-aligned output (G3 only)\n" - " -a generate EOL-aligned output (G3 only) [default]\n" -#endif - " -c generate \"classic\" TIFF format\n" - " -f generate TIFF Class F (TIFF/F) format [default]\n" - " -m output fill order is MSB2LSB\n" - " -l output fill order is LSB2MSB [default]\n" - " -r # make each strip have no more than # rows\n" - " -s stretch image by duplicating scanlines\n" - " -v print information about conversion work\n" -#ifdef LZW_SUPPORT - " -z generate LZW compressed output\n" -#endif - ; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/mkg3states.c b/third_party/libtiff/tools/mkg3states.c deleted file mode 100644 index 3f60a28..0000000 --- a/third_party/libtiff/tools/mkg3states.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* Initialize fax decoder tables - * Decoder support is derived, with permission, from the code - * in Frank Cringle's viewfax program; - * Copyright (C) 1990, 1995 Frank D. Cringle. - */ -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tif_fax3.h" - -#define streq(a, b) (strcmp(a, b) == 0) - -/* NB: can't use names in tif_fax3.h 'cuz they are declared const */ -TIFFFaxTabEnt MainTable[128]; -TIFFFaxTabEnt WhiteTable[4096]; -TIFFFaxTabEnt BlackTable[8192]; - -struct proto -{ - uint16_t code; /* right justified, lsb-first, zero filled */ - uint16_t val; /* (pixel count)<<4 + code width */ -}; - -static struct proto Pass[] = {{0x0008, 4}, {0, 0}}; - -static struct proto Horiz[] = {{0x0004, 3}, {0, 0}}; - -static struct proto V0[] = {{0x0001, 1}, {0, 0}}; - -static struct proto VR[] = {{0x0006, (1 << 4) + 3}, - {0x0030, (2 << 4) + 6}, - {0x0060, (3 << 4) + 7}, - {0, 0}}; - -static struct proto VL[] = {{0x0002, (1 << 4) + 3}, - {0x0010, (2 << 4) + 6}, - {0x0020, (3 << 4) + 7}, - {0, 0}}; - -static struct proto Ext[] = {{0x0040, 7}, {0, 0}}; - -static struct proto EOLV[] = {{0x0000, 7}, {0, 0}}; - -static struct proto MakeUpW[] = { - {0x001b, 1029}, {0x0009, 2053}, {0x003a, 3078}, {0x0076, 4103}, - {0x006c, 5128}, {0x00ec, 6152}, {0x0026, 7176}, {0x00a6, 8200}, - {0x0016, 9224}, {0x00e6, 10248}, {0x0066, 11273}, {0x0166, 12297}, - {0x0096, 13321}, {0x0196, 14345}, {0x0056, 15369}, {0x0156, 16393}, - {0x00d6, 17417}, {0x01d6, 18441}, {0x0036, 19465}, {0x0136, 20489}, - {0x00b6, 21513}, {0x01b6, 22537}, {0x0032, 23561}, {0x0132, 24585}, - {0x00b2, 25609}, {0x0006, 26630}, {0x01b2, 27657}, {0, 0}}; - -static struct proto MakeUpB[] = { - {0x03c0, 1034}, {0x0130, 2060}, {0x0930, 3084}, {0x0da0, 4108}, - {0x0cc0, 5132}, {0x02c0, 6156}, {0x0ac0, 7180}, {0x06c0, 8205}, - {0x16c0, 9229}, {0x0a40, 10253}, {0x1a40, 11277}, {0x0640, 12301}, - {0x1640, 13325}, {0x09c0, 14349}, {0x19c0, 15373}, {0x05c0, 16397}, - {0x15c0, 17421}, {0x0dc0, 18445}, {0x1dc0, 19469}, {0x0940, 20493}, - {0x1940, 21517}, {0x0540, 22541}, {0x1540, 23565}, {0x0b40, 24589}, - {0x1b40, 25613}, {0x04c0, 26637}, {0x14c0, 27661}, {0, 0}}; - -static struct proto MakeUp[] = { - {0x0080, 28683}, {0x0180, 29707}, {0x0580, 30731}, {0x0480, 31756}, - {0x0c80, 32780}, {0x0280, 33804}, {0x0a80, 34828}, {0x0680, 35852}, - {0x0e80, 36876}, {0x0380, 37900}, {0x0b80, 38924}, {0x0780, 39948}, - {0x0f80, 40972}, {0, 0}}; - -static struct proto TermW[] = { - {0x00ac, 8}, {0x0038, 22}, {0x000e, 36}, {0x0001, 52}, {0x000d, 68}, - {0x0003, 84}, {0x0007, 100}, {0x000f, 116}, {0x0019, 133}, {0x0005, 149}, - {0x001c, 165}, {0x0002, 181}, {0x0004, 198}, {0x0030, 214}, {0x000b, 230}, - {0x002b, 246}, {0x0015, 262}, {0x0035, 278}, {0x0072, 295}, {0x0018, 311}, - {0x0008, 327}, {0x0074, 343}, {0x0060, 359}, {0x0010, 375}, {0x000a, 391}, - {0x006a, 407}, {0x0064, 423}, {0x0012, 439}, {0x000c, 455}, {0x0040, 472}, - {0x00c0, 488}, {0x0058, 504}, {0x00d8, 520}, {0x0048, 536}, {0x00c8, 552}, - {0x0028, 568}, {0x00a8, 584}, {0x0068, 600}, {0x00e8, 616}, {0x0014, 632}, - {0x0094, 648}, {0x0054, 664}, {0x00d4, 680}, {0x0034, 696}, {0x00b4, 712}, - {0x0020, 728}, {0x00a0, 744}, {0x0050, 760}, {0x00d0, 776}, {0x004a, 792}, - {0x00ca, 808}, {0x002a, 824}, {0x00aa, 840}, {0x0024, 856}, {0x00a4, 872}, - {0x001a, 888}, {0x009a, 904}, {0x005a, 920}, {0x00da, 936}, {0x0052, 952}, - {0x00d2, 968}, {0x004c, 984}, {0x00cc, 1000}, {0x002c, 1016}, {0, 0}}; - -static struct proto TermB[] = { - {0x03b0, 10}, {0x0002, 19}, {0x0003, 34}, {0x0001, 50}, {0x0006, 67}, - {0x000c, 84}, {0x0004, 100}, {0x0018, 117}, {0x0028, 134}, {0x0008, 150}, - {0x0010, 167}, {0x0050, 183}, {0x0070, 199}, {0x0020, 216}, {0x00e0, 232}, - {0x0030, 249}, {0x03a0, 266}, {0x0060, 282}, {0x0040, 298}, {0x0730, 315}, - {0x00b0, 331}, {0x01b0, 347}, {0x0760, 363}, {0x00a0, 379}, {0x0740, 395}, - {0x00c0, 411}, {0x0530, 428}, {0x0d30, 444}, {0x0330, 460}, {0x0b30, 476}, - {0x0160, 492}, {0x0960, 508}, {0x0560, 524}, {0x0d60, 540}, {0x04b0, 556}, - {0x0cb0, 572}, {0x02b0, 588}, {0x0ab0, 604}, {0x06b0, 620}, {0x0eb0, 636}, - {0x0360, 652}, {0x0b60, 668}, {0x05b0, 684}, {0x0db0, 700}, {0x02a0, 716}, - {0x0aa0, 732}, {0x06a0, 748}, {0x0ea0, 764}, {0x0260, 780}, {0x0a60, 796}, - {0x04a0, 812}, {0x0ca0, 828}, {0x0240, 844}, {0x0ec0, 860}, {0x01c0, 876}, - {0x0e40, 892}, {0x0140, 908}, {0x01a0, 924}, {0x09a0, 940}, {0x0d40, 956}, - {0x0340, 972}, {0x05a0, 988}, {0x0660, 1004}, {0x0e60, 1020}, {0, 0}}; - -static struct proto EOLH[] = {{0x0000, 11}, {0, 0}}; - -static void FillTable(TIFFFaxTabEnt *T, int Size, struct proto *P, int State) -{ - int limit = 1 << Size; - - while (P->val) - { - int width = P->val & 15; - int param = P->val >> 4; - int incr = 1 << width; - int code; - for (code = P->code; code < limit; code += incr) - { - TIFFFaxTabEnt *E = T + code; - E->State = State; - E->Width = width; - E->Param = param; - } - P++; - } -} - -static char *storage_class = ""; -static char *const_class = ""; -static int packoutput = 1; -static char *prebrace = ""; -static char *postbrace = ""; - -void WriteTable(FILE *fd, const TIFFFaxTabEnt *T, int Size, const char *name) -{ - int i; - char *sep; - - fprintf(fd, "%s %s TIFFFaxTabEnt %s[%d] = {", storage_class, const_class, - name, Size); - if (packoutput) - { - sep = "\n"; - for (i = 0; i < Size; i++) - { - fprintf(fd, "%s%s%d,%d,%d%s", sep, prebrace, T->State, T->Width, - (int)T->Param, postbrace); - if (((i + 1) % 10) == 0) - sep = ",\n"; - else - sep = ","; - T++; - } - } - else - { - sep = "\n "; - for (i = 0; i < Size; i++) - { - fprintf(fd, "%s%s%3d,%3d,%4d%s", sep, prebrace, T->State, T->Width, - (int)T->Param, postbrace); - if (((i + 1) % 6) == 0) - sep = ",\n "; - else - sep = ","; - T++; - } - } - fprintf(fd, "\n};\n"); -} - -/* initialize the huffman code tables */ -int main(int argc, char *argv[]) -{ - FILE *fd; - char *outputfile; - int c; - -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "c:s:bp")) != -1) - switch (c) - { - case 'c': - const_class = optarg; - break; - case 's': - storage_class = optarg; - break; - case 'p': - packoutput = 0; - break; - case 'b': - prebrace = "{"; - postbrace = "}"; - break; - case '?': - fprintf(stderr, - "usage: %s [-c const] [-s storage] [-p] [-b] file\n", - argv[0]); - return (-1); - } - outputfile = optind < argc ? argv[optind] : "g3states.h"; - fd = fopen(outputfile, "w"); - if (fd == NULL) - { - fprintf(stderr, "%s: %s: Cannot create output file.\n", argv[0], - outputfile); - return (-2); - } - FillTable(MainTable, 7, Pass, S_Pass); - FillTable(MainTable, 7, Horiz, S_Horiz); - FillTable(MainTable, 7, V0, S_V0); - FillTable(MainTable, 7, VR, S_VR); - FillTable(MainTable, 7, VL, S_VL); - FillTable(MainTable, 7, Ext, S_Ext); - FillTable(MainTable, 7, EOLV, S_EOL); - FillTable(WhiteTable, 12, MakeUpW, S_MakeUpW); - FillTable(WhiteTable, 12, MakeUp, S_MakeUp); - FillTable(WhiteTable, 12, TermW, S_TermW); - FillTable(WhiteTable, 12, EOLH, S_EOL); - FillTable(BlackTable, 13, MakeUpB, S_MakeUpB); - FillTable(BlackTable, 13, MakeUp, S_MakeUp); - FillTable(BlackTable, 13, TermB, S_TermB); - FillTable(BlackTable, 13, EOLH, S_EOL); - - fprintf(fd, "/* WARNING, this file was automatically generated by the\n"); - fprintf(fd, " mkg3states program */\n"); - fprintf(fd, "#include \n"); - fprintf(fd, "#include \"tiff.h\"\n"); - fprintf(fd, "#include \"tif_fax3.h\"\n"); - WriteTable(fd, MainTable, 128, "TIFFFaxMainTable"); - WriteTable(fd, WhiteTable, 4096, "TIFFFaxWhiteTable"); - WriteTable(fd, BlackTable, 8192, "TIFFFaxBlackTable"); - fprintf(fd, "/*\n" - " * Local Variables:\n" - " * mode: c\n" - " * c-basic-offset: 8\n" - " * fill-column: 78\n" - " * End:\n" - " */\n"); - fclose(fd); - return (0); -} diff --git a/third_party/libtiff/tools/pal2rgb.c b/third_party/libtiff/tools/pal2rgb.c deleted file mode 100644 index 6b111a0..0000000 --- a/third_party/libtiff/tools/pal2rgb.c +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -static void usage(int code); -static void cpTags(TIFF *in, TIFF *out); - -static int checkcmap(int n, uint16_t *r, uint16_t *g, uint16_t *b) -{ - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - fprintf(stderr, "Warning, assuming 8-bit colormap.\n"); - return (8); -} - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) - -static uint16_t compression = (uint16_t)-1; -static uint16_t predictor = 0; -static int quality = 75; /* JPEG quality */ -static int jpegcolormode = JPEGCOLORMODE_RGB; -static int processCompressOptions(char *); - -int main(int argc, char *argv[]) -{ - uint16_t bitspersample, shortv; - uint32_t imagewidth, imagelength; - uint16_t config = PLANARCONFIG_CONTIG; - uint32_t rowsperstrip = (uint32_t)-1; - uint16_t photometric = PHOTOMETRIC_RGB; - uint16_t *rmap, *gmap, *bmap; - uint32_t row; - int cmap = -1; - TIFF *in, *out; - int c; - -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "C:c:p:r:h")) != -1) - switch (c) - { - case 'C': /* force colormap interpretation */ - cmap = atoi(optarg); - break; - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'p': /* planar configuration */ - if (streq(optarg, "separate")) - config = PLANARCONFIG_SEPARATE; - else if (streq(optarg, "contig")) - config = PLANARCONFIG_CONTIG; - else - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - } - if (argc - optind != 2) - usage(EXIT_FAILURE); - in = TIFFOpen(argv[optind], "r"); - if (in == NULL) - return (EXIT_FAILURE); - if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &shortv) || - shortv != PHOTOMETRIC_PALETTE) - { - fprintf(stderr, "%s: Expecting a palette image.\n", argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) - { - fprintf(stderr, "%s: No colormap (not a valid palette image).\n", - argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - bitspersample = 0; - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); - if (bitspersample != 8) - { - fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n", - argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - out = TIFFOpen(argv[optind + 1], "w"); - if (out == NULL) - { - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - cpTags(in, out); - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); - if (compression != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - else - TIFFGetField(in, TIFFTAG_COMPRESSION, &compression); - switch (compression) - { - case COMPRESSION_JPEG: - if (jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - else - photometric = PHOTOMETRIC_RGB; - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip)); - (void)TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv); - if (cmap == -1) - cmap = checkcmap(1 << bitspersample, rmap, gmap, bmap); - if (cmap == 16) - { - /* - * Convert 16-bit colormap to 8-bit. - */ - int i; - - for (i = (1 << bitspersample) - 1; i >= 0; i--) - { -#define CVT(x) (((x)*255) / ((1L << 16) - 1)) - rmap[i] = CVT(rmap[i]); - gmap[i] = CVT(gmap[i]); - bmap[i] = CVT(bmap[i]); - } - } - { - unsigned char *ibuf, *obuf; - register unsigned char *pp; - register uint32_t x; - tmsize_t tss_in = TIFFScanlineSize(in); - tmsize_t tss_out = TIFFScanlineSize(out); - if (tss_out / tss_in < 3) - { - /* - * BUG 2750: The following code does not know about chroma - * subsampling of JPEG data. It assumes that the output buffer is 3x - * the length of the input buffer due to exploding the palette into - * RGB tuples. If this assumption is incorrect, it could lead to a - * buffer overflow. Go ahead and fail now to prevent that. - */ - fprintf(stderr, "Could not determine correct image size for " - "output. Exiting.\n"); - return EXIT_FAILURE; - } - ibuf = (unsigned char *)_TIFFmalloc(tss_in); - obuf = (unsigned char *)_TIFFmalloc(tss_out); - switch (config) - { - case PLANARCONFIG_CONTIG: - for (row = 0; row < imagelength; row++) - { - if (!TIFFReadScanline(in, ibuf, row, 0)) - goto done; - pp = obuf; - for (x = 0; x < imagewidth; x++) - { - *pp++ = (unsigned char)rmap[ibuf[x]]; - *pp++ = (unsigned char)gmap[ibuf[x]]; - *pp++ = (unsigned char)bmap[ibuf[x]]; - } - if (!TIFFWriteScanline(out, obuf, row, 0)) - goto done; - } - break; - case PLANARCONFIG_SEPARATE: - for (row = 0; row < imagelength; row++) - { - if (!TIFFReadScanline(in, ibuf, row, 0)) - goto done; - for (pp = obuf, x = 0; x < imagewidth; x++) - *pp++ = (unsigned char)rmap[ibuf[x]]; - if (!TIFFWriteScanline(out, obuf, row, 0)) - goto done; - for (pp = obuf, x = 0; x < imagewidth; x++) - *pp++ = (unsigned char)gmap[ibuf[x]]; - if (!TIFFWriteScanline(out, obuf, row, 0)) - goto done; - for (pp = obuf, x = 0; x < imagewidth; x++) - *pp++ = (unsigned char)bmap[ibuf[x]]; - if (!TIFFWriteScanline(out, obuf, row, 0)) - goto done; - } - break; - } - _TIFFfree(ibuf); - _TIFFfree(obuf); - } -done: - (void)TIFFClose(in); - (void)TIFFClose(out); - return (EXIT_SUCCESS); -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "jpeg", 4)) - { - char *cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (cp[1] == 'r') - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(EXIT_FAILURE); - - cp = strchr(cp + 1, ':'); - } - } - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField2(tag, v1, v2) \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) -#define CopyField4(tag, v1, v2, v3, v4) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) \ - TIFFSetField(out, tag, v1, v2, v3, v4) - -static void cpTag(TIFF *in, TIFF *out, uint16_t tag, uint16_t count, - TIFFDataType type) -{ - switch (type) - { - case TIFF_SHORT: - if (count == 1) - { - uint16_t shortv; - CopyField(tag, shortv); - } - else if (count == 2) - { - uint16_t shortv1, shortv2; - CopyField2(tag, shortv1, shortv2); - } - else if (count == 4) - { - uint16_t *tr, *tg, *tb, *ta; - CopyField4(tag, tr, tg, tb, ta); - } - else if (count == (uint16_t)-1) - { - uint16_t shortv1; - uint16_t *shortav; - CopyField2(tag, shortv1, shortav); - } - break; - case TIFF_LONG: - { - uint32_t longv; - CopyField(tag, longv); - } - break; - case TIFF_RATIONAL: - if (count == 1) - { - float floatv; - CopyField(tag, floatv); - } - else if (count == (uint16_t)-1) - { - float *floatav; - CopyField(tag, floatav); - } - break; - case TIFF_ASCII: - { - char *stringv; - CopyField(tag, stringv); - } - break; - case TIFF_DOUBLE: - if (count == 1) - { - double doublev; - CopyField(tag, doublev); - } - else if (count == (uint16_t)-1) - { - double *doubleav; - CopyField(tag, doubleav); - } - break; - default: - TIFFError(TIFFFileName(in), - "Data type %d is not supported, tag %d skipped.", tag, - type); - } -} - -#undef CopyField4 -#undef CopyField3 -#undef CopyField2 -#undef CopyField - -static const struct cpTag -{ - uint16_t tag; - uint16_t count; - TIFFDataType type; -} tags[] = { - {TIFFTAG_IMAGEWIDTH, 1, TIFF_LONG}, - {TIFFTAG_IMAGELENGTH, 1, TIFF_LONG}, - {TIFFTAG_BITSPERSAMPLE, 1, TIFF_SHORT}, - {TIFFTAG_COMPRESSION, 1, TIFF_SHORT}, - {TIFFTAG_FILLORDER, 1, TIFF_SHORT}, - {TIFFTAG_ROWSPERSTRIP, 1, TIFF_LONG}, - {TIFFTAG_GROUP3OPTIONS, 1, TIFF_LONG}, - {TIFFTAG_SUBFILETYPE, 1, TIFF_LONG}, - {TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT}, - {TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII}, - {TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII}, - {TIFFTAG_MAKE, 1, TIFF_ASCII}, - {TIFFTAG_MODEL, 1, TIFF_ASCII}, - {TIFFTAG_ORIENTATION, 1, TIFF_SHORT}, - {TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_PAGENAME, 1, TIFF_ASCII}, - {TIFFTAG_XPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_YPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG}, - {TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT}, - {TIFFTAG_PAGENUMBER, 2, TIFF_SHORT}, - {TIFFTAG_SOFTWARE, 1, TIFF_ASCII}, - {TIFFTAG_DATETIME, 1, TIFF_ASCII}, - {TIFFTAG_ARTIST, 1, TIFF_ASCII}, - {TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII}, - {TIFFTAG_WHITEPOINT, 2, TIFF_RATIONAL}, - {TIFFTAG_PRIMARYCHROMATICITIES, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT}, - {TIFFTAG_BADFAXLINES, 1, TIFF_LONG}, - {TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT}, - {TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG}, - {TIFFTAG_INKSET, 1, TIFF_SHORT}, - /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much - more - complicated - logic. See - tiffcp */ - {TIFFTAG_DOTRANGE, 2, TIFF_SHORT}, - {TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII}, - {TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT}, - {TIFFTAG_YCBCRCOEFFICIENTS, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_YCBCRSUBSAMPLING, 2, TIFF_SHORT}, - {TIFFTAG_YCBCRPOSITIONING, 1, TIFF_SHORT}, - {TIFFTAG_REFERENCEBLACKWHITE, (uint16_t)-1, TIFF_RATIONAL}, -}; -#define NTAGS (sizeof(tags) / sizeof(tags[0])) - -static void cpTags(TIFF *in, TIFF *out) -{ - const struct cpTag *p; - for (p = tags; p < &tags[NTAGS]; p++) - { - if (p->tag == TIFFTAG_GROUP3OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX3) - continue; - } - if (p->tag == TIFFTAG_GROUP4OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX4) - continue; - } - cpTag(in, out, p->tag, p->count, p->type); - } -} -#undef NTAGS - -static const char usage_info[] = - "Convert a palette color TIFF image to a full color image\n\n" - "usage: pal2rgb [options] input.tif output.tif\n" - "where options are:\n" - " -p contig pack samples contiguously (e.g. RGBRGB...)\n" - " -p separate store samples separately (e.g. RRR...GGG...BBB...)\n" - " -r # make each strip have no more than # rows\n" - " -C 8 assume 8-bit colormap values (instead of 16-bit)\n" - " -C 16 assume 16-bit colormap values\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:\n" */ - " # set predictor value\n" - " For example, -c lzw:2 to get LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:\n" */ - " # set predictor value\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || defined(PACKBITS_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - ; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/ppm2tiff.c b/third_party/libtiff/tools/ppm2tiff.c deleted file mode 100644 index de8257b..0000000 --- a/third_party/libtiff/tools/ppm2tiff.c +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -static uint16_t compression = COMPRESSION_PACKBITS; -static uint16_t predictor = 0; -static int quality = 75; /* JPEG quality */ -static int jpegcolormode = JPEGCOLORMODE_RGB; -static uint32_t g3opts; - -static void usage(int code); -static int processCompressOptions(char *); - -static void pack_none(unsigned char *buf, unsigned int smpls, uint16_t bps) -{ - (void)buf; - (void)smpls; - (void)bps; - return; -} - -static void pack_swab(unsigned char *buf, unsigned int smpls, uint16_t bps) -{ - unsigned int s; - unsigned char h; - unsigned char l; - (void)bps; - - for (s = 0; smpls > s; s++) - { - - h = buf[s * 2 + 0]; - l = buf[s * 2 + 1]; - - buf[s * 2 + 0] = l; - buf[s * 2 + 1] = h; - } - return; -} - -static void pack_bytes(unsigned char *buf, unsigned int smpls, uint16_t bps) -{ - unsigned int s; - unsigned int in; - unsigned int out; - int bits; - uint16_t t; - - in = 0; - out = 0; - bits = 0; - t = 0; - - for (s = 0; smpls > s; s++) - { - - t <<= bps; - t |= (uint16_t)buf[in++]; - - bits += bps; - - if (8 <= bits) - { - bits -= 8; - buf[out++] = (t >> bits) & 0xFF; - } - } - if (0 != bits) - buf[out] = (t << (8 - bits)) & 0xFF; -} - -static void pack_words(unsigned char *buf, unsigned int smpls, uint16_t bps) -{ - unsigned int s; - unsigned int in; - unsigned int out; - int bits; - uint32_t t; - - in = 0; - out = 0; - bits = 0; - t = 0; - - for (s = 0; smpls > s; s++) - { - - t <<= bps; - t |= (uint32_t)buf[in++] << 8; - t |= (uint32_t)buf[in++] << 0; - - bits += bps; - - if (16 <= bits) - { - - bits -= 16; - buf[out++] = (t >> (bits + 8)); - buf[out++] = (t >> (bits + 0)); - } - } - if (0 != bits) - { - t <<= 16 - bits; - - buf[out++] = (t >> (0 + 8)); - buf[out++] = (t >> (0 + 0)); - } -} - -static void BadPPM(char *file) -{ - fprintf(stderr, "%s: Not a PPM file.\n", file); - exit(EXIT_FAILURE); -} - -static tmsize_t multiply_ms(tmsize_t m1, tmsize_t m2) -{ - if (m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1) - return 0; - return m1 * m2; -} - -int main(int argc, char *argv[]) -{ - uint16_t photometric = 0; - uint32_t rowsperstrip = (uint32_t)-1; - double resolution = -1; - unsigned char *buf = NULL; - tmsize_t linebytes = 0; - int pbm; - uint16_t spp = 1; - uint16_t bpp = 8; - void (*pack_func)(unsigned char *buf, unsigned int smpls, uint16_t bps); - TIFF *out; - FILE *in; - unsigned int w, h, prec, row; - char *infile; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - tmsize_t scanline_size; - - if (argc < 2) - { - fprintf(stderr, "%s: Too few arguments\n", argv[0]); - usage(EXIT_FAILURE); - } - while ((c = getopt(argc, argv, "c:r:R:h")) != -1) - switch (c) - { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'R': /* resolution */ - resolution = atof(optarg); - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - } - - if (optind + 2 < argc) - { - fprintf(stderr, "%s: Too many arguments\n", argv[0]); - usage(EXIT_FAILURE); - } - - /* - * If only one file is specified, read input from - * stdin; otherwise usage is: ppm2tiff input output. - */ - if (argc - optind > 1) - { - infile = argv[optind++]; - in = fopen(infile, "rb"); - if (in == NULL) - { - fprintf(stderr, "%s: Can not open.\n", infile); - return (EXIT_FAILURE); - } - } - else - { - infile = ""; - in = stdin; -#if defined(HAVE_SETMODE) && defined(O_BINARY) - setmode(fileno(stdin), O_BINARY); -#endif - } - - if (fgetc(in) != 'P') - BadPPM(infile); - switch (fgetc(in)) - { - case '4': /* it's a PBM file */ - pbm = !0; - spp = 1; - photometric = PHOTOMETRIC_MINISWHITE; - break; - case '5': /* it's a PGM file */ - pbm = 0; - spp = 1; - photometric = PHOTOMETRIC_MINISBLACK; - break; - case '6': /* it's a PPM file */ - pbm = 0; - spp = 3; - photometric = PHOTOMETRIC_RGB; - if (compression == COMPRESSION_JPEG && - jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - break; - default: - BadPPM(infile); - } - - /* Parse header */ - while (1) - { - if (feof(in)) - BadPPM(infile); - c = fgetc(in); - /* Skip whitespaces (blanks, TABs, CRs, LFs) */ - if (strchr(" \t\r\n", c)) - continue; - - /* Check for comment line */ - if (c == '#') - { - do - { - c = fgetc(in); - } while (!(strchr("\r\n", c) || feof(in))); - continue; - } - - ungetc(c, in); - break; - } - if (pbm) - { - if (fscanf(in, " %u %u", &w, &h) != 2) - BadPPM(infile); - if (fgetc(in) != '\n') - BadPPM(infile); - bpp = 1; - pack_func = pack_none; - } - else - { - if (fscanf(in, " %u %u %u", &w, &h, &prec) != 3) - BadPPM(infile); - if (fgetc(in) != '\n' || 0 == prec || 65535 < prec) - BadPPM(infile); - - if (0 != (prec & (prec + 1))) - { - fprintf(stderr, "%s: unsupported maxval %u.\n", infile, prec); - exit(EXIT_FAILURE); - } - bpp = 0; - if ((prec + 1) & 0xAAAAAAAA) - bpp |= 1; - if ((prec + 1) & 0xCCCCCCCC) - bpp |= 2; - if ((prec + 1) & 0xF0F0F0F0) - bpp |= 4; - if ((prec + 1) & 0xFF00FF00) - bpp |= 8; - if ((prec + 1) & 0xFFFF0000) - bpp |= 16; - - switch (bpp) - { - case 8: - pack_func = pack_none; - break; - case 16: - { - const unsigned short i = 0x0100; - - if (0 == *(unsigned char *)&i) - pack_func = pack_swab; - else - pack_func = pack_none; - } - break; - default: - if (8 >= bpp) - pack_func = pack_bytes; - else - pack_func = pack_words; - break; - } - } - out = TIFFOpen(argv[optind], "w"); - if (out == NULL) - return (EXIT_FAILURE); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32_t)w); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32_t)h); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bpp); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - switch (compression) - { - case COMPRESSION_JPEG: - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - case COMPRESSION_CCITTFAX3: - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); - break; - } - if (pbm) - { - /* if round-up overflows, result will be zero, OK */ - linebytes = (multiply_ms(spp, w) + (8 - 1)) / 8; - } - else if (bpp <= 8) - { - linebytes = multiply_ms(spp, w); - } - else - { - linebytes = multiply_ms(2 * spp, w); - } - if (rowsperstrip == (uint32_t)-1) - { - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h); - } - else - { - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - } - if (linebytes == 0) - { - fprintf(stderr, "%s: scanline size overflow\n", infile); - (void)TIFFClose(out); - exit(EXIT_FAILURE); - } - scanline_size = TIFFScanlineSize(out); - if (scanline_size == 0) - { - /* overflow - TIFFScanlineSize already printed a message */ - (void)TIFFClose(out); - exit(EXIT_FAILURE); - } - if (scanline_size < linebytes) - buf = (unsigned char *)_TIFFmalloc(linebytes); - else - buf = (unsigned char *)_TIFFmalloc(scanline_size); - if (buf == NULL) - { - fprintf(stderr, "%s: Not enough memory\n", infile); - (void)TIFFClose(out); - exit(EXIT_FAILURE); - } - if (resolution > 0) - { - TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution); - TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution); - TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - } - for (row = 0; row < h; row++) - { - if (fread(buf, linebytes, 1, in) != 1) - { - fprintf(stderr, "%s: scanline %u: Read error.\n", infile, row); - break; - } - pack_func(buf, w * spp, bpp); - if (TIFFWriteScanline(out, buf, row, 0) < 0) - break; - } - if (in != stdin) - fclose(in); - (void)TIFFClose(out); - if (buf) - _TIFFfree(buf); - return (EXIT_SUCCESS); -} - -static void processG3Options(char *cp) -{ - g3opts = 0; - if ((cp = strchr(cp, ':'))) - { - do - { - cp++; - if (strneq(cp, "1d", 2)) - g3opts &= ~GROUP3OPT_2DENCODING; - else if (strneq(cp, "2d", 2)) - g3opts |= GROUP3OPT_2DENCODING; - else if (strneq(cp, "fill", 4)) - g3opts |= GROUP3OPT_FILLBITS; - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "jpeg", 4)) - { - char *cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (cp[1] == 'r') - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(EXIT_FAILURE); - - cp = strchr(cp + 1, ':'); - } - } - else if (strneq(opt, "g3", 2)) - { - processG3Options(opt); - compression = COMPRESSION_CCITTFAX3; - } - else if (streq(opt, "g4")) - { - compression = COMPRESSION_CCITTFAX4; - } - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -static const char usage_info[] = - "Create a TIFF file from PPM, PGM and PBM image files\n\n" - "usage: ppm2tiff [options] input.ppm output.tif\n" - "where options are:\n" - " -r # make each strip have no more than # rows\n" - " -R # set x&y resolution (dpi)\n" - "\n" -#ifdef JPEG_SUPPORT - " -c jpeg[:opts] compress output with JPEG encoding\n" - /* "JPEG options:\n" */ - " # set compression quality level (0-100, default 75)\n" - " r output color image as RGB rather than YCbCr\n" -#endif -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:\n" */ - " # set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:\n" */ - " # set predictor value\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding (the default)\n" -#endif -#ifdef CCITT_SUPPORT - " -c g3[:opts] compress output with CCITT Group 3 encoding\n" - " -c g4 compress output with CCITT Group 4 encoding\n" -#endif -#if defined(JPEG_SUPPORT) || defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || \ - defined(PACKBITS_SUPPORT) || defined(CCITT_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - ; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/raw2tiff.c b/third_party/libtiff/tools/raw2tiff.c deleted file mode 100644 index ecdb27b..0000000 --- a/third_party/libtiff/tools/raw2tiff.c +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Project: libtiff tools - * Purpose: Convert raw byte sequences in TIFF images - * Author: Andrey Kiselev, dron@ak4719.spb.edu - * - ****************************************************************************** - * Copyright (c) 2002, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#if HAVE_FCNTL_H -#include -#endif - -#if HAVE_SYS_TYPES_H -#include -#endif - -#if HAVE_IO_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -typedef enum -{ - PIXEL, - BAND -} InterleavingType; - -static uint16_t compression = (uint16_t)-1; -static int jpegcolormode = JPEGCOLORMODE_RGB; -static int quality = 75; /* JPEG quality */ -static uint16_t predictor = 0; - -static void swapBytesInScanline(void *, uint32_t, TIFFDataType); -static int guessSize(int, TIFFDataType, _TIFF_off_t, uint32_t, int, uint32_t *, - uint32_t *); -static double correlation(void *, void *, uint32_t, TIFFDataType); -static void usage(int); -static int processCompressOptions(char *); - -int main(int argc, char *argv[]) -{ - uint32_t width = 0, length = 0, linebytes, bufsize; - uint32_t nbands = 1; /* number of bands in input image*/ - _TIFF_off_t hdr_size = 0; /* size of the header to skip */ - TIFFDataType dtype = TIFF_BYTE; - int16_t depth = 1; /* bytes per pixel in input image */ - int swab = 0; /* byte swapping flag */ - InterleavingType interleaving = 0; /* interleaving type flag */ - uint32_t rowsperstrip = (uint32_t)-1; - uint16_t photometric = PHOTOMETRIC_MINISBLACK; - uint16_t config = PLANARCONFIG_CONTIG; - uint16_t fillorder = FILLORDER_LSB2MSB; - int fd; - char *outfilename = NULL; - TIFF *out; - uint32_t temp_limit_check = 0; /* temp for integer overflow checking*/ - - uint32_t row, col, band; - int c; - unsigned char *buf = NULL, *buf1 = NULL; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "c:r:H:w:l:b:d:LMp:si:o:h")) != -1) - { - switch (c) - { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'H': /* size of input image file header */ - hdr_size = atoi(optarg); - break; - case 'w': /* input image width */ - width = atoi(optarg); - break; - case 'l': /* input image length */ - length = atoi(optarg); - break; - case 'b': /* number of bands in input image */ - nbands = atoi(optarg); - break; - case 'd': /* type of samples in input image */ - if (strncmp(optarg, "byte", 4) == 0) - dtype = TIFF_BYTE; - else if (strncmp(optarg, "short", 5) == 0) - dtype = TIFF_SHORT; - else if (strncmp(optarg, "long", 4) == 0) - dtype = TIFF_LONG; - else if (strncmp(optarg, "sbyte", 5) == 0) - dtype = TIFF_SBYTE; - else if (strncmp(optarg, "sshort", 6) == 0) - dtype = TIFF_SSHORT; - else if (strncmp(optarg, "slong", 5) == 0) - dtype = TIFF_SLONG; - else if (strncmp(optarg, "float", 5) == 0) - dtype = TIFF_FLOAT; - else if (strncmp(optarg, "double", 6) == 0) - dtype = TIFF_DOUBLE; - else - dtype = TIFF_BYTE; - depth = TIFFDataWidth(dtype); - break; - case 'L': /* input has lsb-to-msb fillorder */ - fillorder = FILLORDER_LSB2MSB; - break; - case 'M': /* input has msb-to-lsb fillorder */ - fillorder = FILLORDER_MSB2LSB; - break; - case 'p': /* photometric interpretation */ - if (strncmp(optarg, "miniswhite", 10) == 0) - photometric = PHOTOMETRIC_MINISWHITE; - else if (strncmp(optarg, "minisblack", 10) == 0) - photometric = PHOTOMETRIC_MINISBLACK; - else if (strncmp(optarg, "rgb", 3) == 0) - photometric = PHOTOMETRIC_RGB; - else if (strncmp(optarg, "cmyk", 4) == 0) - photometric = PHOTOMETRIC_SEPARATED; - else if (strncmp(optarg, "ycbcr", 5) == 0) - photometric = PHOTOMETRIC_YCBCR; - else if (strncmp(optarg, "cielab", 6) == 0) - photometric = PHOTOMETRIC_CIELAB; - else if (strncmp(optarg, "icclab", 6) == 0) - photometric = PHOTOMETRIC_ICCLAB; - else if (strncmp(optarg, "itulab", 6) == 0) - photometric = PHOTOMETRIC_ITULAB; - else - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 's': /* do we need to swap bytes? */ - swab = 1; - break; - case 'i': /* type of interleaving */ - if (strncmp(optarg, "pixel", 4) == 0) - interleaving = PIXEL; - else if (strncmp(optarg, "band", 6) == 0) - interleaving = BAND; - else - interleaving = 0; - break; - case 'o': - outfilename = optarg; - break; - case 'h': - usage(EXIT_SUCCESS); - default: - break; - } - } - - if (argc - optind < 2) - usage(EXIT_FAILURE); - - fd = open(argv[optind], O_RDONLY | O_BINARY, 0); - if (fd < 0) - { - fprintf(stderr, "%s: %s: Cannot open input file.\n", argv[0], - argv[optind]); - return (EXIT_FAILURE); - } - - if (nbands == 0) - { - fprintf(stderr, "The number of bands is illegal.\n"); - close(fd); - return (-1); - } - - if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0) - { - close(fd); - return EXIT_FAILURE; - } - - /* check for integer overflow in */ - /* hdr_size + (*width) * (*length) * nbands * depth */ - - if ((width == 0) || (length == 0)) - { - fprintf(stderr, "Too large nbands value specified.\n"); - close(fd); - return (EXIT_FAILURE); - } - - temp_limit_check = nbands * depth; - - if (!temp_limit_check || length > (UINT_MAX / temp_limit_check)) - { - fprintf(stderr, "Too large length size specified.\n"); - close(fd); - return (EXIT_FAILURE); - } - temp_limit_check = temp_limit_check * length; - - if (!temp_limit_check || width > (UINT_MAX / temp_limit_check)) - { - fprintf(stderr, "Too large width size specified.\n"); - close(fd); - return (EXIT_FAILURE); - } - temp_limit_check = temp_limit_check * width; - - if (!temp_limit_check || hdr_size > (UINT_MAX - temp_limit_check)) - { - fprintf(stderr, "Too large header size specified.\n"); - close(fd); - return (EXIT_FAILURE); - } - - if (outfilename == NULL) - outfilename = argv[optind + 1]; - out = TIFFOpen(outfilename, "w"); - if (out == NULL) - { - fprintf(stderr, "%s: %s: Cannot open file for output.\n", argv[0], - outfilename); - close(fd); - return (EXIT_FAILURE); - } - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, length); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, nbands); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, depth * 8); - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - switch (dtype) - { - case TIFF_BYTE: - case TIFF_SHORT: - case TIFF_LONG: - TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); - break; - case TIFF_SBYTE: - case TIFF_SSHORT: - case TIFF_SLONG: - TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT); - break; - case TIFF_FLOAT: - case TIFF_DOUBLE: - TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP); - break; - default: - TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_VOID); - break; - } - if (compression == (uint16_t)-1) - compression = COMPRESSION_PACKBITS; - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - switch (compression) - { - case COMPRESSION_JPEG: - if (photometric == PHOTOMETRIC_RGB && - jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - switch (interleaving) - { - case BAND: /* band interleaved data */ - linebytes = width * depth; - buf = (unsigned char *)_TIFFmalloc(linebytes); - break; - case PIXEL: /* pixel interleaved data */ - default: - linebytes = width * nbands * depth; - break; - } - bufsize = width * nbands * depth; - buf1 = (unsigned char *)_TIFFmalloc(bufsize); - - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - if (rowsperstrip > length) - { - rowsperstrip = length; - } - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - _TIFF_lseek_f(fd, hdr_size, SEEK_SET); /* Skip the file header */ - for (row = 0; row < length; row++) - { - switch (interleaving) - { - case BAND: /* band interleaved data */ - for (band = 0; band < nbands; band++) - { - if (_TIFF_lseek_f( - fd, hdr_size + (length * band + row) * linebytes, - SEEK_SET) == (_TIFF_off_t)-1) - { - fprintf(stderr, - "%s: %s: scanline %" PRIu32 ": seek error.\n", - argv[0], argv[optind], row); - break; - } - if (read(fd, buf, linebytes) < 0) - { - fprintf(stderr, - "%s: %s: scanline %" PRIu32 ": Read error.\n", - argv[0], argv[optind], row); - break; - } - if (swab) /* Swap bytes if needed */ - swapBytesInScanline(buf, width, dtype); - for (col = 0; col < width; col++) - memcpy(buf1 + (col * nbands + band) * depth, - buf + col * depth, depth); - } - break; - case PIXEL: /* pixel interleaved data */ - default: - if (read(fd, buf1, bufsize) < 0) - { - fprintf(stderr, - "%s: %s: scanline %" PRIu32 ": Read error.\n", - argv[0], argv[optind], row); - break; - } - if (swab) /* Swap bytes if needed */ - swapBytesInScanline(buf1, width, dtype); - break; - } - - if (TIFFWriteScanline(out, buf1, row, 0) < 0) - { - fprintf(stderr, "%s: %s: scanline %" PRIu32 ": Write error.\n", - argv[0], outfilename, row); - break; - } - } - if (buf) - _TIFFfree(buf); - if (buf1) - _TIFFfree(buf1); - TIFFClose(out); - close(fd); - return (EXIT_SUCCESS); -} - -static void swapBytesInScanline(void *buf, uint32_t width, TIFFDataType dtype) -{ - switch (dtype) - { - case TIFF_SHORT: - case TIFF_SSHORT: - TIFFSwabArrayOfShort((uint16_t *)buf, (unsigned long)width); - break; - case TIFF_LONG: - case TIFF_SLONG: - TIFFSwabArrayOfLong((uint32_t *)buf, (unsigned long)width); - break; - /* case TIFF_FLOAT: */ /* FIXME */ - case TIFF_DOUBLE: - TIFFSwabArrayOfDouble((double *)buf, (unsigned long)width); - break; - default: - break; - } -} - -static int guessSize(int fd, TIFFDataType dtype, _TIFF_off_t hdr_size, - uint32_t nbands, int swab, uint32_t *width, - uint32_t *length) -{ - const float longt = 40.0; /* maximum possible height/width ratio */ - char *buf1, *buf2; - _TIFF_stat_s filestat; - uint32_t w, h, scanlinesize, imagesize; - uint32_t depth = TIFFDataWidth(dtype); - double cor_coef = 0, tmp; - - if (_TIFF_fstat_f(fd, &filestat) == -1) - { - fprintf(stderr, "Failed to obtain file size.\n"); - return -1; - } - - if (filestat.st_size < hdr_size) - { - fprintf(stderr, "Too large header size specified.\n"); - return -1; - } - - if (((filestat.st_size - hdr_size) / nbands / depth) > UINT32_MAX) - { - fprintf(stderr, "Too large image size calculated.\n"); - return -1; - } - else - imagesize = (uint32_t)((filestat.st_size - hdr_size) / nbands / depth); - - if (*width != 0 && *length == 0) - { - fprintf(stderr, "Image height is not specified.\n"); - - *length = imagesize / *width; - - fprintf(stderr, "Height is guessed as %" PRIu32 ".\n", *length); - - return 1; - } - else if (*width == 0 && *length != 0) - { - fprintf(stderr, "Image width is not specified.\n"); - - *width = imagesize / *length; - - fprintf(stderr, "Width is guessed as %" PRIu32 ".\n", *width); - - return 1; - } - else if (*width == 0 && *length == 0) - { - unsigned int fail = 0; - fprintf(stderr, "Image width and height are not specified.\n"); - w = (uint32_t)sqrt(imagesize / longt); - if (w == 0) - { - fprintf(stderr, "Too small image size.\n"); - return -1; - } - - for (; w < sqrt(imagesize * longt); w++) - { - if (imagesize % w == 0) - { - scanlinesize = w * depth; - h = imagesize / w; - if (h < 2) - continue; - /* reads 2 lines at the middle of the image and calculate their - * correlation. it works for h >= 2. (in this case it will - * compare line 0 and line 1 */ - buf1 = _TIFFmalloc(scanlinesize); - buf2 = _TIFFmalloc(scanlinesize); - do - { - if (_TIFF_lseek_f( - fd, hdr_size + (int)((h - 1) / 2) * scanlinesize, - SEEK_SET) == (_TIFF_off_t)-1) - { - fprintf(stderr, "seek error.\n"); - fail = 1; - break; - } - /* read line (h-1)/2 */ - if (read(fd, buf1, scanlinesize) != (long)scanlinesize) - { - fprintf(stderr, "read error.\n"); - fail = 1; - break; - } - /* read line ((h-1)/2)+1 */ - if (read(fd, buf2, scanlinesize) != (long)scanlinesize) - { - fprintf(stderr, "read error.\n"); - fail = 1; - break; - } - if (swab) - { - swapBytesInScanline(buf1, w, dtype); - swapBytesInScanline(buf2, w, dtype); - } - if (0 == memcmp(buf1, buf2, scanlinesize)) - { - *width = w, *length = h; - } - else - { - tmp = fabs(correlation(buf1, buf2, w, dtype)); - if (tmp > cor_coef) - { - cor_coef = tmp; - *width = w, *length = h; - } - } - } while (0); - - _TIFFfree(buf1); - _TIFFfree(buf2); - } - } - - if (fail) - { - return -1; - } - - fprintf(stderr, - "Width is guessed as %" PRIu32 ", height is guessed as %" PRIu32 - ".\n", - *width, *length); - - return 1; - } - else - { - if (filestat.st_size < - (_TIFF_off_t)(hdr_size + (*width) * (*length) * nbands * depth)) - { - fprintf(stderr, "Input file too small.\n"); - return -1; - } - } - - return 1; -} - -/* Calculate correlation coefficient between two numeric vectors */ -static double correlation(void *buf1, void *buf2, uint32_t n_elem, - TIFFDataType dtype) -{ - double X, Y, M1 = 0.0, M2 = 0.0, D1 = 0.0, D2 = 0.0, K = 0.0; - uint32_t i; - - switch (dtype) - { - case TIFF_BYTE: - default: - for (i = 0; i < n_elem; i++) - { - X = ((unsigned char *)buf1)[i]; - Y = ((unsigned char *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_SBYTE: - for (i = 0; i < n_elem; i++) - { - X = ((signed char *)buf1)[i]; - Y = ((signed char *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_SHORT: - for (i = 0; i < n_elem; i++) - { - X = ((uint16_t *)buf1)[i]; - Y = ((uint16_t *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_SSHORT: - for (i = 0; i < n_elem; i++) - { - X = ((int16_t *)buf1)[i]; - Y = ((int16_t *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_LONG: - for (i = 0; i < n_elem; i++) - { - X = ((uint32_t *)buf1)[i]; - Y = ((uint32_t *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_SLONG: - for (i = 0; i < n_elem; i++) - { - X = ((int32_t *)buf1)[i]; - Y = ((int32_t *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_FLOAT: - for (i = 0; i < n_elem; i++) - { - X = ((float *)buf1)[i]; - Y = ((float *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - case TIFF_DOUBLE: - for (i = 0; i < n_elem; i++) - { - X = ((double *)buf1)[i]; - Y = ((double *)buf2)[i]; - M1 += X, M2 += Y; - D1 += X * X, D2 += Y * Y; - K += X * Y; - } - break; - } - - M1 /= n_elem; - M2 /= n_elem; - D1 -= M1 * M1 * n_elem; - D2 -= M2 * M2 * n_elem; - if (D1 * D2 == 0.0) - return 0.0; /* avoid divide by zero */ - K = (K - M1 * M2 * n_elem) / sqrt(D1 * D2); - - return K; -} - -static int processCompressOptions(char *opt) -{ - if (strcmp(opt, "none") == 0) - compression = COMPRESSION_NONE; - else if (strcmp(opt, "packbits") == 0) - compression = COMPRESSION_PACKBITS; - else if (strncmp(opt, "jpeg", 4) == 0) - { - char *cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (cp[1] == 'r') - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(EXIT_FAILURE); - - cp = strchr(cp + 1, ':'); - } - } - else if (strncmp(opt, "lzw", 3) == 0) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strncmp(opt, "zip", 3) == 0) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -static const char usage_info[] = - "Create a TIFF file from raw data\n\n" - "usage: raw2tiff [options] input.raw output.tif\n" - "where options are:\n" - " -L input data has LSB2MSB bit order (default)\n" - " -M input data has MSB2LSB bit order\n" - " -r # make each strip have no more than # rows\n" - " -H # size of input image file header in bytes (0 by " - "default)\n" - " -w # width of input image in pixels\n" - " -l # length of input image in lines\n" - " -b # number of bands in input image (1 by default)\n" - "\n" - " -d data_type type of samples in input image\n" - "where data_type may be:\n" - " byte 8-bit unsigned integer (default)\n" - " short 16-bit unsigned integer\n" - " long 32-bit unsigned integer\n" - " sbyte 8-bit signed integer\n" - " sshort 16-bit signed integer\n" - " slong 32-bit signed integer\n" - " float 32-bit IEEE floating point\n" - " double 64-bit IEEE floating point\n" - "\n" - " -p photo photometric interpretation (color space) of the input image\n" - "where photo may be:\n" - " miniswhite white color represented with 0 value\n" - " minisblack black color represented with 0 value (default)\n" - " rgb image has RGB color model\n" - " cmyk image has CMYK (separated) color model\n" - " ycbcr image has YCbCr color model\n" - " cielab image has CIE L*a*b color model\n" - " icclab image has ICC L*a*b color model\n" - " itulab image has ITU L*a*b color model\n" - "\n" - " -s swap bytes fetched from input file\n" - "\n" - " -i config type of samples interleaving in input image\n" - "where config may be:\n" - " pixel pixel interleaved data (default)\n" - " band band interleaved data\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:\n" */ - " # set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:\n" */ - " # set predictor value\n" -#endif -#ifdef JPEG_SUPPORT - " -c jpeg[:opts] compress output with JPEG encoding\n" - /* " JPEG options:\n" */ - " # set compression quality level (0-100, default 75)\n" - " r output color image as RGB rather than YCbCr\n" - " For example, -c jpeg:r:50 for JPEG-encoded RGB data with 50% comp. " - "quality\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || defined(JPEG_SUPPORT) || \ - defined(PACKBITS_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - "\n" - " -o out.tif write output to out.tif\n" - " -h this help message\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/rgb2ycbcr.c b/third_party/libtiff/tools/rgb2ycbcr.c deleted file mode 100644 index 0b82459..0000000 --- a/third_party/libtiff/tools/rgb2ycbcr.c +++ /dev/null @@ -1,417 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) - -#ifndef howmany -#define howmany(x, y) (((x) + ((y)-1)) / (y)) -#endif -#define roundup(x, y) (howmany(x, y) * ((uint32_t)(y))) - -#define LumaRed ycbcrCoeffs[0] -#define LumaGreen ycbcrCoeffs[1] -#define LumaBlue ycbcrCoeffs[2] - -uint16_t compression = COMPRESSION_PACKBITS; -uint32_t rowsperstrip = (uint32_t)-1; - -uint16_t horizSubSampling = 2; /* YCbCr horizontal subsampling */ -uint16_t vertSubSampling = 2; /* YCbCr vertical subsampling */ -float ycbcrCoeffs[3] = {.299F, .587F, .114F}; -/* default coding range is CCIR Rec 601-1 with no headroom/footroom */ -float refBlackWhite[6] = {0.F, 255.F, 128.F, 255.F, 128.F, 255.F}; - -static int tiffcvt(TIFF *in, TIFF *out); -static void usage(int code); -static void setupLumaTables(void); - -int main(int argc, char *argv[]) -{ - TIFF *in, *out; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "c:h:r:v:z")) != -1) - switch (c) - { - case 'c': - if (streq(optarg, "none")) - compression = COMPRESSION_NONE; - else if (streq(optarg, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (streq(optarg, "lzw")) - compression = COMPRESSION_LZW; - else if (streq(optarg, "jpeg")) - compression = COMPRESSION_JPEG; - else if (streq(optarg, "zip")) - compression = COMPRESSION_ADOBE_DEFLATE; - else - usage(EXIT_FAILURE); - break; - case 'h': - horizSubSampling = atoi(optarg); - if (horizSubSampling != 1 && horizSubSampling != 2 && - horizSubSampling != 4) - usage(EXIT_FAILURE); - break; - case 'v': - vertSubSampling = atoi(optarg); - if (vertSubSampling != 1 && vertSubSampling != 2 && - vertSubSampling != 4) - usage(EXIT_FAILURE); - break; - case 'r': - rowsperstrip = atoi(optarg); - break; - case 'z': /* CCIR Rec 601-1 w/ headroom/footroom */ - refBlackWhite[0] = 16.; - refBlackWhite[1] = 235.; - refBlackWhite[2] = 128.; - refBlackWhite[3] = 240.; - refBlackWhite[4] = 128.; - refBlackWhite[5] = 240.; - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - } - if (argc - optind < 2) - usage(EXIT_FAILURE); - out = TIFFOpen(argv[argc - 1], "w"); - if (out == NULL) - return (EXIT_FAILURE); - setupLumaTables(); - for (; optind < argc - 1; optind++) - { - in = TIFFOpen(argv[optind], "r"); - if (in != NULL) - { - do - { - if (!tiffcvt(in, out) || !TIFFWriteDirectory(out)) - { - (void)TIFFClose(out); - (void)TIFFClose(in); - return (1); - } - } while (TIFFReadDirectory(in)); - (void)TIFFClose(in); - } - } - (void)TIFFClose(out); - return (EXIT_SUCCESS); -} - -float *lumaRed; -float *lumaGreen; -float *lumaBlue; -float D1, D2; -int Yzero; - -static float *setupLuma(float c) -{ - float *v = (float *)_TIFFmalloc(256 * sizeof(float)); - int i; - for (i = 0; i < 256; i++) - v[i] = c * i; - return (v); -} - -static unsigned V2Code(float f, float RB, float RW, int CR) -{ - unsigned int c = (unsigned int)((((f) * (RW - RB) / CR) + RB) + .5); - return (c > 255 ? 255 : c); -} - -static void setupLumaTables(void) -{ - lumaRed = setupLuma(LumaRed); - lumaGreen = setupLuma(LumaGreen); - lumaBlue = setupLuma(LumaBlue); - D1 = 1.F / (2.F - 2.F * LumaBlue); - D2 = 1.F / (2.F - 2.F * LumaRed); - Yzero = V2Code(0, refBlackWhite[0], refBlackWhite[1], 255); -} - -static void cvtClump(unsigned char *op, uint32_t *raster, uint32_t ch, - uint32_t cw, uint32_t w) -{ - float Y, Cb = 0, Cr = 0; - uint32_t j, k; - /* - * Convert ch-by-cw block of RGB - * to YCbCr and sample accordingly. - */ - for (k = 0; k < ch; k++) - { - for (j = 0; j < cw; j++) - { - uint32_t RGB = (raster - k * w)[j]; - Y = lumaRed[TIFFGetR(RGB)] + lumaGreen[TIFFGetG(RGB)] + - lumaBlue[TIFFGetB(RGB)]; - /* accumulate chrominance */ - Cb += (TIFFGetB(RGB) - Y) * D1; - Cr += (TIFFGetR(RGB) - Y) * D2; - /* emit luminence */ - *op++ = V2Code(Y, refBlackWhite[0], refBlackWhite[1], 255); - } - for (; j < horizSubSampling; j++) - *op++ = Yzero; - } - for (; k < vertSubSampling; k++) - { - for (j = 0; j < horizSubSampling; j++) - *op++ = Yzero; - } - /* emit sampled chrominance values */ - *op++ = V2Code(Cb / (ch * cw), refBlackWhite[2], refBlackWhite[3], 127); - *op++ = V2Code(Cr / (ch * cw), refBlackWhite[4], refBlackWhite[5], 127); -} -#undef LumaRed -#undef LumaGreen -#undef LumaBlue -#undef V2Code - -/* - * Convert a strip of RGB data to YCbCr and - * sample to generate the output data. - */ -static void cvtStrip(unsigned char *op, uint32_t *raster, uint32_t nrows, - uint32_t width) -{ - uint32_t x; - int clumpSize = vertSubSampling * horizSubSampling + 2; - uint32_t *tp; - - for (; nrows >= vertSubSampling; nrows -= vertSubSampling) - { - tp = raster; - for (x = width; x >= horizSubSampling; x -= horizSubSampling) - { - cvtClump(op, tp, vertSubSampling, horizSubSampling, width); - op += clumpSize; - tp += horizSubSampling; - } - if (x > 0) - { - cvtClump(op, tp, vertSubSampling, x, width); - op += clumpSize; - } - raster -= vertSubSampling * width; - } - if (nrows > 0) - { - tp = raster; - for (x = width; x >= horizSubSampling; x -= horizSubSampling) - { - cvtClump(op, tp, nrows, horizSubSampling, width); - op += clumpSize; - tp += horizSubSampling; - } - if (x > 0) - cvtClump(op, tp, nrows, x, width); - } -} - -static int cvtRaster(TIFF *tif, uint32_t *raster, uint32_t width, - uint32_t height) -{ - uint32_t y; - tstrip_t strip = 0; - tsize_t cc, acc; - unsigned char *buf; - uint32_t rwidth = roundup(width, horizSubSampling); - uint32_t rheight = roundup(height, vertSubSampling); - uint32_t nrows = (rowsperstrip > rheight ? rheight : rowsperstrip); - uint32_t rnrows = roundup(nrows, vertSubSampling); - - cc = (tsize_t)rnrows * rwidth + - 2 * ((rnrows * rwidth) / (horizSubSampling * vertSubSampling)); - buf = (unsigned char *)_TIFFmalloc(cc); - // FIXME unchecked malloc - for (y = height; (int32_t)y > 0; y -= nrows) - { - uint32_t nr = (y > nrows ? nrows : y); - cvtStrip(buf, raster + (y - 1) * width, nr, width); - nr = roundup(nr, vertSubSampling); - acc = (tsize_t)nr * rwidth + - 2 * ((nr * rwidth) / (horizSubSampling * vertSubSampling)); - if (!TIFFWriteEncodedStrip(tif, strip++, buf, acc)) - { - _TIFFfree(buf); - return (0); - } - } - _TIFFfree(buf); - return (1); -} - -static int tiffcvt(TIFF *in, TIFF *out) -{ - uint32_t width, height; /* image width & height */ - uint32_t *raster; /* retrieve RGBA image */ - uint16_t shortv; - float floatv; - char *stringv; - uint32_t longv; - int result; - size_t pixel_count; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - pixel_count = width * height; - - /* XXX: Check the integer overflow. */ - if (!width || !height || SIZE_MAX / width < height) - { - TIFFError(TIFFFileName(in), - "Malformed input file; " - "can't allocate buffer for raster of %" PRIu32 "x%" PRIu32 - " size", - width, height); - return 0; - } - - raster = (uint32_t *)_TIFFCheckMalloc(in, pixel_count, sizeof(uint32_t), - "raster buffer"); - if (raster == 0) - { - TIFFError(TIFFFileName(in), - "Failed to allocate buffer (%" TIFF_SIZE_FORMAT - " elements of %" TIFF_SIZE_FORMAT " each)", - pixel_count, sizeof(uint32_t)); - return (0); - } - - if (!TIFFReadRGBAImage(in, width, height, raster, 0)) - { - _TIFFfree(raster); - return (0); - } - - CopyField(TIFFTAG_SUBFILETYPE, longv); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); - if (compression == COMPRESSION_JPEG) - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW); - CopyField(TIFFTAG_FILLORDER, shortv); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3); - CopyField(TIFFTAG_XRESOLUTION, floatv); - CopyField(TIFFTAG_YRESOLUTION, floatv); - CopyField(TIFFTAG_RESOLUTIONUNIT, shortv); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - { - char buf[2048]; - char *cp = strrchr(TIFFFileName(in), '/'); - snprintf(buf, sizeof(buf), "YCbCr conversion of %s", - cp ? cp + 1 : TIFFFileName(in)); - TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf); - } - TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); - CopyField(TIFFTAG_DOCUMENTNAME, stringv); - - TIFFSetField(out, TIFFTAG_REFERENCEBLACKWHITE, refBlackWhite); - TIFFSetField(out, TIFFTAG_YCBCRSUBSAMPLING, horizSubSampling, - vertSubSampling); - TIFFSetField(out, TIFFTAG_YCBCRPOSITIONING, YCBCRPOSITION_CENTERED); - TIFFSetField(out, TIFFTAG_YCBCRCOEFFICIENTS, ycbcrCoeffs); - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - result = cvtRaster(out, raster, width, height); - _TIFFfree(raster); - return result; -} - -const char *usage_info[] = { - /* Help information format modified for the sake of consistency with the - other tiff tools */ - /* "usage: rgb2ycbcr [-c comp] [-r rows] [-h N] [-v N] input... - output\n", */ - /* "where comp is one of the following compression algorithms:\n", */ - "Convert RGB color, greyscale, or bi-level TIFF images to YCbCr images\n\n" - "usage: rgb2ycbcr [options] input output", - "where options are:", -#ifdef JPEG_SUPPORT - " -c jpeg JPEG encoding", -#endif -#ifdef ZIP_SUPPORT - " -c zip Zip/Deflate encoding", -#endif -#ifdef LZW_SUPPORT - " -c lzw Lempel-Ziv & Welch encoding", -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits PackBits encoding (default)", -#endif -#if defined(JPEG_SUPPORT) || defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || \ - defined(PACKBITS_SUPPORT) - " -c none no compression", -#endif - "", - /* "and the other options are:\n", */ - " -r rows/strip", " -h horizontal sampling factor (1,2,4)", - " -v vertical sampling factor (1,2,4)", NULL}; - -static void usage(int code) -{ - int i; - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - for (i = 0; usage_info[i] != NULL; i++) - fprintf(out, "%s\n", usage_info[i]); - exit(code); -} diff --git a/third_party/libtiff/tools/thumbnail.c b/third_party/libtiff/tools/thumbnail.c deleted file mode 100644 index 7e21f52..0000000 --- a/third_party/libtiff/tools/thumbnail.c +++ /dev/null @@ -1,769 +0,0 @@ -/* - * Copyright (c) 1994-1997 Sam Leffler - * Copyright (c) 1994-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) - -#ifndef TIFFhowmany8 -#define TIFFhowmany8(x) \ - (((x)&0x07) ? ((uint32_t)(x) >> 3) + 1 : (uint32_t)(x) >> 3) -#endif - -typedef enum -{ - EXP50, - EXP60, - EXP70, - EXP80, - EXP90, - EXP, - LINEAR -} Contrast; - -static uint32_t tnw = 216; /* thumbnail width */ -static uint32_t tnh = 274; /* thumbnail height */ -static Contrast contrast = LINEAR; /* current contrast */ -static uint8_t *thumbnail; - -static int cpIFD(TIFF *, TIFF *); -static int generateThumbnail(TIFF *, TIFF *); -static void initScale(); -static void usage(int code); - -#if !HAVE_DECL_OPTARG -extern char *optarg; -extern int optind; -#endif - -int main(int argc, char *argv[]) -{ - TIFF *in; - TIFF *out; - int c; - - while ((c = getopt(argc, argv, "w:h:c:")) != -1) - { - switch (c) - { - case 'w': - tnw = strtoul(optarg, NULL, 0); - break; - case 'h': - tnh = strtoul(optarg, NULL, 0); - break; - case 'c': - contrast = streq(optarg, "exp50") ? EXP50 - : streq(optarg, "exp60") ? EXP60 - : streq(optarg, "exp70") ? EXP70 - : streq(optarg, "exp80") ? EXP80 - : streq(optarg, "exp90") ? EXP90 - : streq(optarg, "exp") ? EXP - : streq(optarg, "linear") ? LINEAR - : EXP; - break; - default: - usage(EXIT_FAILURE); - } - } - if (argc - optind != 2) - usage(EXIT_FAILURE); - - out = TIFFOpen(argv[optind + 1], "w"); - if (out == NULL) - return 2; - in = TIFFOpen(argv[optind], "r"); - if (in == NULL) - return 2; - - thumbnail = (uint8_t *)_TIFFmalloc(tnw * tnh); - if (!thumbnail) - { - TIFFError(TIFFFileName(in), - "Can't allocate space for thumbnail buffer."); - return EXIT_FAILURE; - } - - if (in != NULL) - { - initScale(); - do - { - if (!generateThumbnail(in, out)) - goto bad; - if (!cpIFD(in, out) || !TIFFWriteDirectory(out)) - goto bad; - } while (TIFFReadDirectory(in)); - (void)TIFFClose(in); - } - (void)TIFFClose(out); - return EXIT_SUCCESS; -bad: - (void)TIFFClose(out); - return EXIT_FAILURE; -} - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField2(tag, v1, v2) \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) -#define CopyField4(tag, v1, v2, v3, v4) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) \ - TIFFSetField(out, tag, v1, v2, v3, v4) - -static void cpTag(TIFF *in, TIFF *out, uint16_t tag, uint16_t count, - TIFFDataType type) -{ - switch (type) - { - case TIFF_SHORT: - if (count == 1) - { - uint16_t shortv; - CopyField(tag, shortv); - } - else if (count == 2) - { - uint16_t shortv1, shortv2; - CopyField2(tag, shortv1, shortv2); - } - else if (count == 4) - { - uint16_t *tr, *tg, *tb, *ta; - CopyField4(tag, tr, tg, tb, ta); - } - else if (count == (uint16_t)-1) - { - uint16_t shortv1; - uint16_t *shortav; - CopyField2(tag, shortv1, shortav); - } - break; - case TIFF_LONG: - { - uint32_t longv; - CopyField(tag, longv); - } - break; - case TIFF_LONG8: - { - uint64_t longv8; - CopyField(tag, longv8); - } - break; - case TIFF_SLONG8: - { - int64_t longv8; - CopyField(tag, longv8); - } - break; - case TIFF_RATIONAL: - if (count == 1) - { - float floatv; - CopyField(tag, floatv); - } - else if (count == (uint16_t)-1) - { - float *floatav; - CopyField(tag, floatav); - } - break; - case TIFF_ASCII: - { - char *stringv; - CopyField(tag, stringv); - } - break; - case TIFF_DOUBLE: - if (count == 1) - { - double doublev; - CopyField(tag, doublev); - } - else if (count == (uint16_t)-1) - { - double *doubleav; - CopyField(tag, doubleav); - } - break; - case TIFF_IFD8: - { - toff_t ifd8; - CopyField(tag, ifd8); - } - break; - default: - TIFFError(TIFFFileName(in), - "Data type %d is not supported, tag %d skipped.", tag, - type); - } -} - -#undef CopyField4 -#undef CopyField3 -#undef CopyField2 -#undef CopyField - -static const struct cpTag -{ - uint16_t tag; - uint16_t count; - TIFFDataType type; -} tags[] = { - {TIFFTAG_IMAGEWIDTH, 1, TIFF_LONG}, - {TIFFTAG_IMAGELENGTH, 1, TIFF_LONG}, - {TIFFTAG_BITSPERSAMPLE, 1, TIFF_SHORT}, - {TIFFTAG_COMPRESSION, 1, TIFF_SHORT}, - {TIFFTAG_FILLORDER, 1, TIFF_SHORT}, - {TIFFTAG_SAMPLESPERPIXEL, 1, TIFF_SHORT}, - {TIFFTAG_ROWSPERSTRIP, 1, TIFF_LONG}, - {TIFFTAG_PLANARCONFIG, 1, TIFF_SHORT}, - {TIFFTAG_GROUP3OPTIONS, 1, TIFF_LONG}, - {TIFFTAG_SUBFILETYPE, 1, TIFF_LONG}, - {TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT}, - {TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT}, - {TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII}, - {TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII}, - {TIFFTAG_MAKE, 1, TIFF_ASCII}, - {TIFFTAG_MODEL, 1, TIFF_ASCII}, - {TIFFTAG_ORIENTATION, 1, TIFF_SHORT}, - {TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_PAGENAME, 1, TIFF_ASCII}, - {TIFFTAG_XPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_YPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG}, - {TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT}, - {TIFFTAG_PAGENUMBER, 2, TIFF_SHORT}, - {TIFFTAG_SOFTWARE, 1, TIFF_ASCII}, - {TIFFTAG_DATETIME, 1, TIFF_ASCII}, - {TIFFTAG_ARTIST, 1, TIFF_ASCII}, - {TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII}, - {TIFFTAG_WHITEPOINT, 2, TIFF_RATIONAL}, - {TIFFTAG_PRIMARYCHROMATICITIES, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT}, - {TIFFTAG_BADFAXLINES, 1, TIFF_LONG}, - {TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT}, - {TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG}, - {TIFFTAG_INKSET, 1, TIFF_SHORT}, - /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much - more - complicated - logic. See - tiffcp */ - {TIFFTAG_DOTRANGE, 2, TIFF_SHORT}, - {TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII}, - {TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT}, - {TIFFTAG_YCBCRCOEFFICIENTS, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_YCBCRSUBSAMPLING, 2, TIFF_SHORT}, - {TIFFTAG_YCBCRPOSITIONING, 1, TIFF_SHORT}, - {TIFFTAG_REFERENCEBLACKWHITE, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_EXTRASAMPLES, (uint16_t)-1, TIFF_SHORT}, -}; -#define NTAGS (sizeof(tags) / sizeof(tags[0])) - -static void cpTags(TIFF *in, TIFF *out) -{ - const struct cpTag *p; - for (p = tags; p < &tags[NTAGS]; p++) - { - /* Horrible: but TIFFGetField() expects 2 arguments to be passed */ - /* if we request a tag that is defined in a codec, but that codec */ - /* isn't used */ - if (p->tag == TIFFTAG_GROUP3OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX3) - continue; - } - if (p->tag == TIFFTAG_GROUP4OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX4) - continue; - } - cpTag(in, out, p->tag, p->count, p->type); - } -} -#undef NTAGS - -static int cpStrips(TIFF *in, TIFF *out) -{ - tsize_t bufsize = TIFFStripSize(in); - unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize); - - if (buf) - { - tstrip_t s, ns = TIFFNumberOfStrips(in); - uint64_t *bytecounts; - - TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts); - for (s = 0; s < ns; s++) - { - if (bytecounts[s] > (uint64_t)bufsize) - { - buf = - (unsigned char *)_TIFFrealloc(buf, (tmsize_t)bytecounts[s]); - if (!buf) - goto bad; - bufsize = (tmsize_t)bytecounts[s]; - } - if (TIFFReadRawStrip(in, s, buf, (tmsize_t)bytecounts[s]) < 0 || - TIFFWriteRawStrip(out, s, buf, (tmsize_t)bytecounts[s]) < 0) - { - _TIFFfree(buf); - return 0; - } - } - _TIFFfree(buf); - return 1; - } - -bad: - TIFFError(TIFFFileName(in), "Can't allocate space for strip buffer."); - return 0; -} - -static int cpTiles(TIFF *in, TIFF *out) -{ - tsize_t bufsize = TIFFTileSize(in); - unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize); - - if (buf) - { - ttile_t t, nt = TIFFNumberOfTiles(in); - uint64_t *bytecounts; - - TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts); - for (t = 0; t < nt; t++) - { - if (bytecounts[t] > (uint64_t)bufsize) - { - buf = - (unsigned char *)_TIFFrealloc(buf, (tmsize_t)bytecounts[t]); - if (!buf) - goto bad; - bufsize = (tmsize_t)bytecounts[t]; - } - if (TIFFReadRawTile(in, t, buf, (tmsize_t)bytecounts[t]) < 0 || - TIFFWriteRawTile(out, t, buf, (tmsize_t)bytecounts[t]) < 0) - { - _TIFFfree(buf); - return 0; - } - } - _TIFFfree(buf); - return 1; - } - -bad: - TIFFError(TIFFFileName(in), "Can't allocate space for tile buffer."); - return (0); -} - -static int cpIFD(TIFF *in, TIFF *out) -{ - cpTags(in, out); - if (TIFFIsTiled(in)) - { - if (!cpTiles(in, out)) - return (0); - } - else - { - if (!cpStrips(in, out)) - return (0); - } - return (1); -} - -static uint16_t photometric; /* current photometric of raster */ -static uint16_t filterWidth; /* filter width in pixels */ -static uint32_t stepSrcWidth; /* src image stepping width */ -static uint32_t stepDstWidth; /* dest stepping width */ -static uint8_t *src0; /* horizontal bit stepping (start) */ -static uint8_t *src1; /* horizontal bit stepping (middle) */ -static uint8_t *src2; /* horizontal bit stepping (end) */ -static uint32_t *rowoff; /* row offset for stepping */ -static uint8_t cmap[256]; /* colormap indexes */ -static uint8_t bits[256]; /* count of bits set */ - -static void setupBitsTables() -{ - int i; - for (i = 0; i < 256; i++) - { - int n = 0; - if (i & 0x01) - n++; - if (i & 0x02) - n++; - if (i & 0x04) - n++; - if (i & 0x08) - n++; - if (i & 0x10) - n++; - if (i & 0x20) - n++; - if (i & 0x40) - n++; - if (i & 0x80) - n++; - bits[i] = n; - } -} - -static int clamp(float v, int low, int high) -{ - return (v < low ? low : v > high ? high : (int)v); -} - -#ifndef M_E -#define M_E 2.7182818284590452354 -#endif - -static void expFill(float pct[], uint32_t p, uint32_t n) -{ - uint32_t i; - uint32_t c = (p * n) / 100; - for (i = 1; i < c; i++) - pct[i] = (float)(1 - exp(i / ((double)(n - 1))) / M_E); - for (; i < n; i++) - pct[i] = 0.; -} - -static void setupCmap() -{ - float pct[256]; /* known to be large enough */ - uint32_t i; - pct[0] = 1; /* force white */ - switch (contrast) - { - case EXP50: - expFill(pct, 50, 256); - break; - case EXP60: - expFill(pct, 60, 256); - break; - case EXP70: - expFill(pct, 70, 256); - break; - case EXP80: - expFill(pct, 80, 256); - break; - case EXP90: - expFill(pct, 90, 256); - break; - case EXP: - expFill(pct, 100, 256); - break; - case LINEAR: - for (i = 1; i < 256; i++) - pct[i] = 1 - ((float)i) / (256 - 1); - break; - } - switch (photometric) - { - case PHOTOMETRIC_MINISWHITE: - for (i = 0; i < 256; i++) - cmap[i] = clamp(255 * pct[(256 - 1) - i], 0, 255); - break; - case PHOTOMETRIC_MINISBLACK: - for (i = 0; i < 256; i++) - cmap[i] = clamp(255 * pct[i], 0, 255); - break; - } -} - -static void initScale() -{ - src0 = (uint8_t *)_TIFFmalloc(sizeof(uint8_t) * tnw); - src1 = (uint8_t *)_TIFFmalloc(sizeof(uint8_t) * tnw); - src2 = (uint8_t *)_TIFFmalloc(sizeof(uint8_t) * tnw); - rowoff = (uint32_t *)_TIFFmalloc(sizeof(uint32_t) * tnw); - filterWidth = 0; - stepDstWidth = stepSrcWidth = 0; - setupBitsTables(); -} - -/* - * Calculate the horizontal accumulation parameters - * according to the widths of the src and dst images. - */ -static void setupStepTables(uint32_t sw) -{ - if (stepSrcWidth != sw || stepDstWidth != tnw) - { - int step = sw; - int limit = tnw; - int err = 0; - uint32_t sx = 0; - uint32_t x; - int fw; - uint8_t b; - for (x = 0; x < tnw; x++) - { - uint32_t sx0 = sx; - err += step; - while (err >= limit) - { - err -= limit; - sx++; - } - rowoff[x] = sx0 >> 3; - fw = sx - sx0; /* width */ - b = (fw < 8) ? (uint8_t)(0xff << (8 - fw)) : (uint8_t)0xff; - src0[x] = b >> (sx0 & 7); - fw -= 8 - (sx0 & 7); - if (fw < 0) - fw = 0; - src1[x] = fw >> 3; - fw -= (fw >> 3) << 3; - src2[x] = 0xff << (8 - fw); - } - stepSrcWidth = sw; - stepDstWidth = tnw; - } -} - -static void setrow(uint8_t *row, uint32_t nrows, const uint8_t *rows[]) -{ - uint32_t x; - uint32_t area = nrows * filterWidth; - for (x = 0; x < tnw; x++) - { - uint32_t mask0 = src0[x]; - uint32_t fw = src1[x]; - uint32_t mask1 = src1[x]; - uint32_t off = rowoff[x]; - uint32_t acc = 0; - uint32_t y, i; - for (y = 0; y < nrows; y++) - { - const uint8_t *src = rows[y] + off; - acc += bits[*src++ & mask0]; - switch (fw) - { - default: - for (i = fw; i > 8; i--) - acc += bits[*src++]; - /* fall through... */ - case 8: - acc += bits[*src++]; /* fall through */ - case 7: - acc += bits[*src++]; /* fall through */ - case 6: - acc += bits[*src++]; /* fall through */ - case 5: - acc += bits[*src++]; /* fall through */ - case 4: - acc += bits[*src++]; /* fall through */ - case 3: - acc += bits[*src++]; /* fall through */ - case 2: - acc += bits[*src++]; /* fall through */ - case 1: - acc += bits[*src++]; /* fall through */ - case 0: - break; - } - acc += bits[*src & mask1]; - } - if (255 * acc / area < 256) - { - *row++ = cmap[(255 * acc) / area]; - } - else - { - fprintf(stderr, "acc=%d, area=%d\n", acc, area); - *row++ = cmap[0]; - } - } -} - -/* - * Install the specified image. The - * image is resized to fit the display page using - * a box filter. The resultant pixels are mapped - * with a user-selectable contrast curve. - */ -static void setImage1(const uint8_t *br, uint32_t rw, uint32_t rh) -{ - int step = rh; - int limit = tnh; - int err = 0; - int bpr = TIFFhowmany8(rw); - int sy = 0; - uint8_t *row = thumbnail; - uint32_t dy; - for (dy = 0; dy < tnh; dy++) - { - const uint8_t *rows[256]; - uint32_t nrows = 1; - fprintf(stderr, "bpr=%d, sy=%d, bpr*sy=%d\n", bpr, sy, bpr * sy); - rows[0] = br + bpr * sy; - err += step; - while (err >= limit) - { - err -= limit; - sy++; - if (err >= limit) - { - /* We should perhaps error loudly, but I can't make sense of - * that */ - /* code... */ - if (nrows == 256) - break; - rows[nrows++] = br + bpr * sy; - } - } - setrow(row, nrows, rows); - row += tnw; - } -} - -static void setImage(const uint8_t *br, uint32_t rw, uint32_t rh) -{ - filterWidth = (uint16_t)ceil((double)rw / (double)tnw); - setupStepTables(rw); - setImage1(br, rw, rh); -} - -static int generateThumbnail(TIFF *in, TIFF *out) -{ - unsigned char *raster; - unsigned char *rp; - uint32_t sw, sh, rps; - uint16_t bps, spp; - tsize_t rowsize, rastersize; - tstrip_t s, ns = TIFFNumberOfStrips(in); - toff_t diroff[1]; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &sw); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &sh); - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); - TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - if (spp != 1 || bps != 1) - return 0; - rowsize = TIFFScanlineSize(in); - rastersize = sh * rowsize; - fprintf(stderr, "rastersize=%u\n", (unsigned int)rastersize); - /* +3 : add a few guard bytes since setrow() can read a bit */ - /* outside buffer */ - raster = (unsigned char *)_TIFFmalloc(rastersize + 3); - if (!raster) - { - TIFFError(TIFFFileName(in), "Can't allocate space for raster buffer."); - return 0; - } - raster[rastersize] = 0; - raster[rastersize + 1] = 0; - raster[rastersize + 2] = 0; - rp = raster; - for (s = 0; s < ns; s++) - { - (void)TIFFReadEncodedStrip(in, s, rp, -1); - rp += rps * rowsize; - } - TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric); - setupCmap(); - setImage(raster, sw, sh); - _TIFFfree(raster); - - TIFFSetField(out, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32_t)tnw); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32_t)tnh); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, (uint16_t)8); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, (uint16_t)1); - TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - cpTag(in, out, TIFFTAG_SOFTWARE, (uint16_t)-1, TIFF_ASCII); - cpTag(in, out, TIFFTAG_IMAGEDESCRIPTION, (uint16_t)-1, TIFF_ASCII); - cpTag(in, out, TIFFTAG_DATETIME, (uint16_t)-1, TIFF_ASCII); - cpTag(in, out, TIFFTAG_HOSTCOMPUTER, (uint16_t)-1, TIFF_ASCII); - diroff[0] = 0UL; - TIFFSetField(out, TIFFTAG_SUBIFD, 1, diroff); - return (TIFFWriteEncodedStrip(out, 0, thumbnail, tnw * tnh) != -1 && - TIFFWriteDirectory(out) != -1); -} - -const char *usage_info[] = { - "Create a TIFF file with thumbnail images\n\n" - "usage: thumbnail [options] input.tif output.tif", - "where options are:", - " -h # specify thumbnail image height (default is 274)", - " -w # specify thumbnail image width (default is 216)", - "", - " -c linear use linear contrast curve", - " -c exp50 use 50% exponential contrast curve", - " -c exp60 use 60% exponential contrast curve", - " -c exp70 use 70% exponential contrast curve", - " -c exp80 use 80% exponential contrast curve", - " -c exp90 use 90% exponential contrast curve", - " -c exp use pure exponential contrast curve", - NULL}; - -static void usage(int code) -{ - int i; - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - for (i = 0; usage_info[i] != NULL; i++) - fprintf(out, "%s\n", usage_info[i]); - exit(code); -} diff --git a/third_party/libtiff/tools/tif_tools_versioninfo.rc b/third_party/libtiff/tools/tif_tools_versioninfo.rc deleted file mode 100644 index 02f114a..0000000 --- a/third_party/libtiff/tools/tif_tools_versioninfo.rc +++ /dev/null @@ -1,50 +0,0 @@ - -/* clang-format off */ - -#define APSTUDIO_HIDDEN_SYMBOLS -#include -#undef APSTUDIO_HIDDEN_SYMBOLS -#include - -#include "tiffvers.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - PRODUCTVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "libtiff project" - VALUE "FileDescription", "TIFF Tools" - VALUE "FileVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "InternalName", "" - VALUE "LegalCopyright", "See LICENCE.md" - VALUE "OriginalFilename", "" - VALUE "ProductName", "LibTIFF" - VALUE "ProductVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "WebPage", "https://libtiff.gitlab.io/libtiff/\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - - diff --git a/third_party/libtiff/tools/tiff2bw.c b/third_party/libtiff/tools/tiff2bw.c deleted file mode 100644 index 51f50ca..0000000 --- a/third_party/libtiff/tools/tiff2bw.c +++ /dev/null @@ -1,584 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -/* x% weighting -> fraction of full color */ -#define PCT(x) (((x)*256 + 50) / 100) -int RED = PCT(30); /* 30% */ -int GREEN = PCT(59); /* 59% */ -int BLUE = PCT(11); /* 11% */ - -static void usage(int code); -static int processCompressOptions(char *); - -static void compresscontig(unsigned char *out, unsigned char *rgb, uint32_t n) -{ - register int v, red = RED, green = GREEN, blue = BLUE; - - while (n-- > 0) - { - v = red * (*rgb++); - v += green * (*rgb++); - v += blue * (*rgb++); - *out++ = v >> 8; - } -} - -static void compresssep(unsigned char *out, unsigned char *r, unsigned char *g, - unsigned char *b, uint32_t n) -{ - register uint32_t red = RED, green = GREEN, blue = BLUE; - - while (n-- > 0) - *out++ = - (unsigned char)((red * (*r++) + green * (*g++) + blue * (*b++)) >> - 8); -} - -static int checkcmap(TIFF *tif, int n, uint16_t *r, uint16_t *g, uint16_t *b) -{ - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - TIFFWarning(TIFFFileName(tif), "Assuming 8-bit colormap"); - return (8); -} - -static void compresspalette(unsigned char *out, unsigned char *data, uint32_t n, - uint16_t *rmap, uint16_t *gmap, uint16_t *bmap) -{ - register int v, red = RED, green = GREEN, blue = BLUE; - - while (n-- > 0) - { - unsigned int ix = *data++; - v = red * rmap[ix]; - v += green * gmap[ix]; - v += blue * bmap[ix]; - *out++ = v >> 8; - } -} - -static uint16_t compression = (uint16_t)-1; -static uint16_t predictor = 0; -static int jpegcolormode = JPEGCOLORMODE_RGB; -static int quality = 75; /* JPEG quality */ - -static void cpTags(TIFF *in, TIFF *out); - -int main(int argc, char *argv[]) -{ - uint32_t rowsperstrip = (uint32_t)-1; - TIFF *in, *out; - uint32_t w, h; - uint16_t samplesperpixel; - uint16_t bitspersample; - uint16_t config; - uint16_t photometric; - uint16_t *red; - uint16_t *green; - uint16_t *blue; - tsize_t rowsize; - register uint32_t row; - register tsample_t s; - unsigned char *inbuf, *outbuf; - char thing[1024]; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - in = (TIFF *)NULL; - out = (TIFF *)NULL; - inbuf = (unsigned char *)NULL; - outbuf = (unsigned char *)NULL; - - while ((c = getopt(argc, argv, "c:r:R:G:B:h")) != -1) - switch (c) - { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'R': - RED = PCT(atoi(optarg)); - break; - case 'G': - GREEN = PCT(atoi(optarg)); - break; - case 'B': - BLUE = PCT(atoi(optarg)); - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - if (argc - optind < 2) - usage(EXIT_FAILURE); - in = TIFFOpen(argv[optind], "r"); - if (in == NULL) - return (EXIT_FAILURE); - photometric = 0; - TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric); - if (photometric != PHOTOMETRIC_RGB && photometric != PHOTOMETRIC_PALETTE) - { - fprintf( - stderr, - "%s: Bad photometric; can only handle RGB and Palette images.\n", - argv[optind]); - goto tiff2bw_error; - } - TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - if (samplesperpixel != 1 && samplesperpixel != 3) - { - fprintf(stderr, "%s: Bad samples/pixel %u.\n", argv[optind], - samplesperpixel); - goto tiff2bw_error; - } - if (photometric == PHOTOMETRIC_RGB && samplesperpixel != 3) - { - fprintf(stderr, "%s: Bad samples/pixel %u for PHOTOMETRIC_RGB.\n", - argv[optind], samplesperpixel); - goto tiff2bw_error; - } - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); - if (bitspersample != 8) - { - fprintf(stderr, " %s: Sorry, only handle 8-bit samples.\n", - argv[optind]); - goto tiff2bw_error; - } - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); - - out = TIFFOpen(argv[optind + 1], "w"); - if (out == NULL) - { - goto tiff2bw_error; - } - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, w); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, h); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - cpTags(in, out); - if (compression != (uint16_t)-1) - { - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - switch (compression) - { - case COMPRESSION_JPEG: - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - } - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]); - TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); - TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw"); - outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); - if (!outbuf) - { - fprintf(stderr, "Out of memory\n"); - goto tiff2bw_error; - } - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - -#define pack(a, b) ((a) << 8 | (b)) - switch (pack(photometric, config)) - { - case pack(PHOTOMETRIC_PALETTE, PLANARCONFIG_CONTIG): - case pack(PHOTOMETRIC_PALETTE, PLANARCONFIG_SEPARATE): - TIFFGetField(in, TIFFTAG_COLORMAP, &red, &green, &blue); - /* - * Convert 16-bit colormap to 8-bit (unless it looks - * like an old-style 8-bit colormap). - */ - if (checkcmap(in, 1 << bitspersample, red, green, blue) == 16) - { - int i; -#define CVT(x) (((x)*255L) / ((1L << 16) - 1)) - for (i = (1 << bitspersample) - 1; i >= 0; i--) - { - red[i] = CVT(red[i]); - green[i] = CVT(green[i]); - blue[i] = CVT(blue[i]); - } -#undef CVT - } - inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - if (!inbuf) - { - fprintf(stderr, "Out of memory\n"); - goto tiff2bw_error; - } - for (row = 0; row < h; row++) - { - if (TIFFReadScanline(in, inbuf, row, 0) < 0) - break; - compresspalette(outbuf, inbuf, w, red, green, blue); - if (TIFFWriteScanline(out, outbuf, row, 0) < 0) - break; - } - break; - case pack(PHOTOMETRIC_RGB, PLANARCONFIG_CONTIG): - inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - if (!inbuf) - { - fprintf(stderr, "Out of memory\n"); - goto tiff2bw_error; - } - for (row = 0; row < h; row++) - { - if (TIFFReadScanline(in, inbuf, row, 0) < 0) - break; - compresscontig(outbuf, inbuf, w); - if (TIFFWriteScanline(out, outbuf, row, 0) < 0) - break; - } - break; - case pack(PHOTOMETRIC_RGB, PLANARCONFIG_SEPARATE): - { - tmsize_t inbufsize; - rowsize = TIFFScanlineSize(in); - inbufsize = TIFFSafeMultiply(tmsize_t, 3, rowsize); - inbuf = (unsigned char *)_TIFFmalloc(inbufsize); - if (!inbuf) - { - fprintf(stderr, "Out of memory\n"); - goto tiff2bw_error; - } - for (row = 0; row < h; row++) - { - for (s = 0; s < 3; s++) - if (TIFFReadScanline(in, inbuf + s * rowsize, row, s) < 0) - goto tiff2bw_error; - compresssep(outbuf, inbuf, inbuf + rowsize, inbuf + 2 * rowsize, - w); - if (TIFFWriteScanline(out, outbuf, row, 0) < 0) - break; - } - break; - } - } -#undef pack - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - TIFFClose(in); - TIFFClose(out); - return (EXIT_SUCCESS); - -tiff2bw_error: - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - if (out) - TIFFClose(out); - if (in) - TIFFClose(in); - return (EXIT_FAILURE); -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "jpeg", 4)) - { - char *cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (cp[1] == 'r') - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(EXIT_FAILURE); - - cp = strchr(cp + 1, ':'); - } - } - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField2(tag, v1, v2) \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) -#define CopyField4(tag, v1, v2, v3, v4) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) \ - TIFFSetField(out, tag, v1, v2, v3, v4) - -static void cpTag(TIFF *in, TIFF *out, uint16_t tag, uint16_t count, - TIFFDataType type) -{ - switch (type) - { - case TIFF_SHORT: - if (count == 1) - { - uint16_t shortv; - CopyField(tag, shortv); - } - else if (count == 2) - { - uint16_t shortv1, shortv2; - CopyField2(tag, shortv1, shortv2); - } - else if (count == 4) - { - uint16_t *tr, *tg, *tb, *ta; - CopyField4(tag, tr, tg, tb, ta); - } - else if (count == (uint16_t)-1) - { - uint16_t shortv1; - uint16_t *shortav; - CopyField2(tag, shortv1, shortav); - } - break; - case TIFF_LONG: - { - uint32_t longv; - CopyField(tag, longv); - } - break; - case TIFF_RATIONAL: - if (count == 1) - { - float floatv; - CopyField(tag, floatv); - } - else if (count == (uint16_t)-1) - { - float *floatav; - CopyField(tag, floatav); - } - break; - case TIFF_ASCII: - { - char *stringv; - CopyField(tag, stringv); - } - break; - case TIFF_DOUBLE: - if (count == 1) - { - double doublev; - CopyField(tag, doublev); - } - else if (count == (uint16_t)-1) - { - double *doubleav; - CopyField(tag, doubleav); - } - break; - default: - TIFFError(TIFFFileName(in), - "Data type %d is not supported, tag %d skipped.", tag, - type); - } -} - -#undef CopyField4 -#undef CopyField3 -#undef CopyField2 -#undef CopyField - -static const struct cpTag -{ - uint16_t tag; - uint16_t count; - TIFFDataType type; -} tags[] = { - {TIFFTAG_SUBFILETYPE, 1, TIFF_LONG}, - {TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT}, - {TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII}, - {TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII}, - {TIFFTAG_MAKE, 1, TIFF_ASCII}, - {TIFFTAG_MODEL, 1, TIFF_ASCII}, - {TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_PAGENAME, 1, TIFF_ASCII}, - {TIFFTAG_XPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_YPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT}, - {TIFFTAG_SOFTWARE, 1, TIFF_ASCII}, - {TIFFTAG_DATETIME, 1, TIFF_ASCII}, - {TIFFTAG_ARTIST, 1, TIFF_ASCII}, - {TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII}, - {TIFFTAG_WHITEPOINT, 2, TIFF_RATIONAL}, - {TIFFTAG_PRIMARYCHROMATICITIES, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT}, - {TIFFTAG_INKSET, 1, TIFF_SHORT}, - {TIFFTAG_DOTRANGE, 2, TIFF_SHORT}, - {TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII}, - {TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT}, - {TIFFTAG_YCBCRCOEFFICIENTS, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_YCBCRSUBSAMPLING, 2, TIFF_SHORT}, - {TIFFTAG_YCBCRPOSITIONING, 1, TIFF_SHORT}, - {TIFFTAG_REFERENCEBLACKWHITE, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_EXTRASAMPLES, (uint16_t)-1, TIFF_SHORT}, - {TIFFTAG_SMINSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_SMAXSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_STONITS, 1, TIFF_DOUBLE}, -}; -#define NTAGS (sizeof(tags) / sizeof(tags[0])) - -static void cpTags(TIFF *in, TIFF *out) -{ - const struct cpTag *p; - for (p = tags; p < &tags[NTAGS]; p++) - { - if (p->tag == TIFFTAG_GROUP3OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX3) - continue; - } - if (p->tag == TIFFTAG_GROUP4OPTIONS) - { - uint16_t compression; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || - compression != COMPRESSION_CCITTFAX4) - continue; - } - cpTag(in, out, p->tag, p->count, p->type); - } -} -#undef NTAGS - -static const char usage_info[] = - "Convert a color TIFF image to greyscale\n\n" - "usage: tiff2bw [options] input.tif output.tif\n" - "where options are:\n" - " -R % use #% from red channel\n" - " -G % use #% from green channel\n" - " -B % use #% from blue channel\n" - "\n" - " -r # make each strip have no more than # rows\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:\n" */ - " # set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:\n" */ - " # set predictor value\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#ifdef CCITT_SUPPORT - " -c g3[:opts] compress output with CCITT Group 3 encoding\n" - " -c g4 compress output with CCITT Group 4 encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || \ - defined(PACKBITS_SUPPORT) || defined(CCITT_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - "\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/tiff2pdf.c b/third_party/libtiff/tools/tiff2pdf.c deleted file mode 100644 index e6cb346..0000000 --- a/third_party/libtiff/tools/tiff2pdf.c +++ /dev/null @@ -1,6549 +0,0 @@ -/* - * - * tiff2pdf - converts a TIFF image to a PDF document - * - * Copyright (c) 2003 Ross Finlayson - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the name of - * Ross Finlayson may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Ross Finlayson. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include -#include - -#if HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "libport.h" -#include "tif_config.h" -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define TIFF2PDF_MODULE "tiff2pdf" - -#define PS_UNIT_SIZE 72.0F - -#define TIFF_DIR_MAX 65534 - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* This type is of PDF color spaces. */ -typedef enum -{ - T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */ - T2P_CS_GRAY = 0x02, /* Single channel */ - T2P_CS_RGB = 0x04, /* Three channel tristimulus RGB */ - T2P_CS_CMYK = 0x08, /* Four channel CMYK print inkset */ - T2P_CS_LAB = 0x10, /* Three channel L*a*b* color space */ - T2P_CS_PALETTE = 0x1000, /* One of the above with a color map */ - T2P_CS_CALGRAY = 0x20, /* Calibrated single channel */ - T2P_CS_CALRGB = 0x40, /* Calibrated three channel tristimulus RGB */ - T2P_CS_ICCBASED = 0x80 /* ICC profile color specification */ -} t2p_cs_t; - -/* This type is of PDF compression types. */ -typedef enum -{ - T2P_COMPRESS_NONE = 0x00 -#ifdef CCITT_SUPPORT - , - T2P_COMPRESS_G4 = 0x01 -#endif -#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) - , - T2P_COMPRESS_JPEG = 0x02 -#endif -#ifdef ZIP_SUPPORT - , - T2P_COMPRESS_ZIP = 0x04 -#endif -} t2p_compress_t; - -/* This type is whether TIFF image data can be used in PDF without transcoding. - */ -typedef enum -{ - T2P_TRANSCODE_RAW = 0x01, /* The raw data from the input can be used without - recompressing */ - T2P_TRANSCODE_ENCODE = - 0x02 /* The data from the input is perhaps unencoded and reencoded */ -} t2p_transcode_t; - -/* This type is of information about the data samples of the input image. */ -typedef enum -{ - T2P_SAMPLE_NOTHING = - 0x0000, /* The unencoded samples are normal for the output colorspace */ - T2P_SAMPLE_ABGR_TO_RGB = - 0x0001, /* The unencoded samples are the result of ReadRGBAImage */ - T2P_SAMPLE_RGBA_TO_RGB = - 0x0002, /* The unencoded samples are contiguous RGBA */ - T2P_SAMPLE_RGBAA_TO_RGB = - 0x0004, /* The unencoded samples are RGBA with premultiplied alpha */ - T2P_SAMPLE_YCBCR_TO_RGB = 0x0008, - T2P_SAMPLE_YCBCR_TO_LAB = 0x0010, - T2P_SAMPLE_REALIZE_PALETTE = - 0x0020, /* The unencoded samples are indexes into the color map */ - T2P_SAMPLE_SIGNED_TO_UNSIGNED = - 0x0040, /* The unencoded samples are signed instead of unsigned */ - T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED = - 0x0040, /* The L*a*b* samples have a* and b* signed */ - T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG = - 0x0100 /* The unencoded samples are separate instead of contiguous */ -} t2p_sample_t; - -/* This type is of error status of the T2P struct. */ -typedef enum -{ - T2P_ERR_OK = - 0, /* This is the value of t2p->t2p_error when there is no error */ - T2P_ERR_ERROR = - 1 /* This is the value of t2p->t2p_error when there was an error */ -} t2p_err_t; - -/* This struct defines a logical page of a TIFF. */ -typedef struct -{ - tdir_t page_directory; - uint32_t page_number; - ttile_t page_tilecount; - uint32_t page_extra; -} T2P_PAGE; - -/* This struct defines a PDF rectangle's coordinates. */ -typedef struct -{ - float x1; - float y1; - float x2; - float y2; - float mat[9]; -} T2P_BOX; - -/* This struct defines a tile of a PDF. */ -typedef struct -{ - T2P_BOX tile_box; -} T2P_TILE; - -/* This struct defines information about the tiles on a PDF page. */ -typedef struct -{ - ttile_t tiles_tilecount; - uint32_t tiles_tilewidth; - uint32_t tiles_tilelength; - uint32_t tiles_tilecountx; - uint32_t tiles_tilecounty; - uint32_t tiles_edgetilewidth; - uint32_t tiles_edgetilelength; - T2P_TILE *tiles_tiles; -} T2P_TILES; - -/* This struct is the context of a function to generate PDF from a TIFF. */ -typedef struct -{ - t2p_err_t t2p_error; - T2P_PAGE *tiff_pages; - T2P_TILES *tiff_tiles; - tdir_t tiff_pagecount; - uint16_t tiff_compression; - uint16_t tiff_photometric; - uint16_t tiff_fillorder; - uint16_t tiff_bitspersample; - uint16_t tiff_samplesperpixel; - uint16_t tiff_planar; - uint32_t tiff_width; - uint32_t tiff_length; - float tiff_xres; - float tiff_yres; - uint16_t tiff_orientation; - toff_t tiff_dataoffset; - tsize_t tiff_datasize; - tsize_t tiff_maxdatasize; - uint16_t tiff_resunit; - uint16_t pdf_centimeters; - uint16_t pdf_overrideres; - uint16_t pdf_overridepagesize; - float pdf_defaultxres; - float pdf_defaultyres; - float pdf_xres; - float pdf_yres; - float pdf_defaultpagewidth; - float pdf_defaultpagelength; - float pdf_pagewidth; - float pdf_pagelength; - float pdf_imagewidth; - float pdf_imagelength; - int pdf_image_fillpage; /* 0 (default: no scaling, 1:scale imagesize to - pagesize */ - T2P_BOX pdf_mediabox; - T2P_BOX pdf_imagebox; - uint16_t pdf_majorversion; - uint16_t pdf_minorversion; - uint32_t pdf_catalog; - uint32_t pdf_pages; - uint32_t pdf_info; - uint32_t pdf_palettecs; - uint16_t pdf_fitwindow; - uint32_t pdf_startxref; -#define TIFF2PDF_FILEID_SIZE 33 - char pdf_fileid[TIFF2PDF_FILEID_SIZE]; -#define TIFF2PDF_DATETIME_SIZE 17 - char pdf_datetime[TIFF2PDF_DATETIME_SIZE]; -#define TIFF2PDF_CREATOR_SIZE 512 - char pdf_creator[TIFF2PDF_CREATOR_SIZE]; - int pdf_creator_set; -#define TIFF2PDF_AUTHOR_SIZE 512 - char pdf_author[TIFF2PDF_AUTHOR_SIZE]; - int pdf_author_set; -#define TIFF2PDF_TITLE_SIZE 512 - char pdf_title[TIFF2PDF_TITLE_SIZE]; - int pdf_title_set; -#define TIFF2PDF_SUBJECT_SIZE 512 - char pdf_subject[TIFF2PDF_SUBJECT_SIZE]; - int pdf_subject_set; -#define TIFF2PDF_KEYWORDS_SIZE 512 - char pdf_keywords[TIFF2PDF_KEYWORDS_SIZE]; - int pdf_keywords_set; - t2p_cs_t pdf_colorspace; - uint16_t pdf_colorspace_invert; - uint16_t pdf_switchdecode; - uint16_t pdf_palettesize; - unsigned char *pdf_palette; - int pdf_labrange[4]; - t2p_compress_t pdf_defaultcompression; - uint16_t pdf_defaultcompressionquality; - t2p_compress_t pdf_compression; - uint16_t - pdf_compressionquality; /* for deflate : 100 * zipquality + predictor */ - uint16_t pdf_nopassthrough; - t2p_transcode_t pdf_transcode; - t2p_sample_t pdf_sample; - uint32_t *pdf_xrefoffsets; - uint32_t pdf_xrefcount; - tdir_t pdf_page; -#ifdef OJPEG_SUPPORT - tdata_t pdf_ojpegdata; - uint32_t pdf_ojpegdatalength; - uint32_t pdf_ojpegiflength; -#endif - float tiff_whitechromaticities[2]; - float tiff_primarychromaticities[6]; - float tiff_referenceblackwhite[2]; - uint16_t *tiff_transferfunction[3]; - int pdf_image_interpolate; /* 0 (default) : do not interpolate, - 1 : interpolate */ - uint16_t tiff_transferfunctioncount; - uint32_t pdf_icccs; - uint32_t tiff_iccprofilelength; - tdata_t tiff_iccprofile; - - /* fields for custom read/write procedures */ - FILE *outputfile; - int outputdisable; - tsize_t outputwritten; -} T2P; - -/* This is a helper function. */ -static uint32_t _TIFFCastSSizeToUInt32(tmsize_t val, const char *module) -{ - if (val < 0) - { - TIFFError(module, "Unsigned integer underflow (negative)"); - return 0; - } - /* sizeof(tmsize_t) is determined by SIZEOF_SIZE_T */ -#ifdef SIZEOF_SIZE_T -#if SIZEOF_SIZE_T > 4 - if (val > UINT32_MAX) - { - TIFFError(module, "Integer overflow"); - return 0; - } -#endif -#else -#pragma message( \ - "---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----") - SIZEOF_SIZE_T -#endif - return (uint32_t)val; -} - -/* These functions are called by main. */ - -static void usage_info(int); -int tiff2pdf_match_paper_size(float *, float *, char *); - -/* These functions are used to generate a PDF from a TIFF. */ - -#ifdef __cplusplus -extern "C" -{ -#endif - - T2P *t2p_init(void); - void t2p_validate(T2P *); - tsize_t t2p_write_pdf(T2P *, TIFF *, TIFF *); - void t2p_free(T2P *); - -#ifdef __cplusplus -} -#endif - -void t2p_read_tiff_init(T2P *, TIFF *); -int t2p_cmp_t2p_page(const void *, const void *); -void t2p_read_tiff_data(T2P *, TIFF *); -void t2p_read_tiff_size(T2P *, TIFF *); -void t2p_read_tiff_size_tile(T2P *, TIFF *, ttile_t); -int t2p_tile_is_right_edge(T2P_TILES, ttile_t); -int t2p_tile_is_bottom_edge(T2P_TILES, ttile_t); -int t2p_tile_is_edge(T2P_TILES, ttile_t); -int t2p_tile_is_corner_edge(T2P_TILES, ttile_t); -tsize_t t2p_readwrite_pdf_image(T2P *, TIFF *, TIFF *); -tsize_t t2p_readwrite_pdf_image_tile(T2P *, TIFF *, TIFF *, ttile_t); -#ifdef OJPEG_SUPPORT -int t2p_process_ojpeg_tables(T2P *, TIFF *); -#endif -#ifdef JPEG_SUPPORT -int t2p_process_jpeg_strip(unsigned char *, tsize_t *, unsigned char *, tsize_t, - tsize_t *, tstrip_t, uint32_t); -#endif -void t2p_tile_collapse_left(tdata_t, tsize_t, uint32_t, uint32_t, uint32_t); -void t2p_write_advance_directory(T2P *, TIFF *); -tsize_t t2p_sample_planar_separate_to_contig(T2P *, unsigned char *, - unsigned char *, tsize_t); -tsize_t t2p_sample_realize_palette(T2P *, unsigned char *); -tsize_t t2p_sample_abgr_to_rgb(tdata_t, uint32_t); -tsize_t t2p_sample_rgba_to_rgb(tdata_t, uint32_t); -tsize_t t2p_sample_rgbaa_to_rgb(tdata_t, uint32_t); -tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t, uint32_t); -tsize_t t2p_write_pdf_header(T2P *, TIFF *); -tsize_t t2p_write_pdf_obj_start(uint32_t, TIFF *); -tsize_t t2p_write_pdf_obj_end(TIFF *); -tsize_t t2p_write_pdf_name(const unsigned char *, TIFF *); -tsize_t t2p_write_pdf_string(const char *, TIFF *); -tsize_t t2p_write_pdf_stream(tdata_t, tsize_t, TIFF *); -tsize_t t2p_write_pdf_stream_start(TIFF *); -tsize_t t2p_write_pdf_stream_end(TIFF *); -tsize_t t2p_write_pdf_stream_dict(tsize_t, uint32_t, TIFF *); -tsize_t t2p_write_pdf_stream_dict_start(TIFF *); -tsize_t t2p_write_pdf_stream_dict_end(TIFF *); -tsize_t t2p_write_pdf_stream_length(tsize_t, TIFF *); -tsize_t t2p_write_pdf_catalog(T2P *, TIFF *); -tsize_t t2p_write_pdf_info(T2P *, TIFF *, TIFF *); -void t2p_pdf_currenttime(T2P *); -void t2p_pdf_tifftime(T2P *, TIFF *); -tsize_t t2p_write_pdf_pages(T2P *, TIFF *); -tsize_t t2p_write_pdf_page(uint32_t, T2P *, TIFF *); -void t2p_compose_pdf_page(T2P *); -void t2p_compose_pdf_page_orient(T2P_BOX *, uint16_t); -void t2p_compose_pdf_page_orient_flip(T2P_BOX *, uint16_t); -tsize_t t2p_write_pdf_page_content(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t, T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_cs(T2P *, TIFF *); -tsize_t t2p_write_pdf_transfer(T2P *, TIFF *); -tsize_t t2p_write_pdf_transfer_dict(T2P *, TIFF *, uint16_t); -tsize_t t2p_write_pdf_transfer_stream(T2P *, TIFF *, uint16_t); -tsize_t t2p_write_pdf_xobject_calcs(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_icccs(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_icccs_dict(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_icccs_stream(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_cs_stream(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_decode(T2P *, TIFF *); -tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t, T2P *, TIFF *); -tsize_t t2p_write_pdf_xreftable(T2P *, TIFF *); -tsize_t t2p_write_pdf_trailer(T2P *, TIFF *); - -#define check_snprintf_ret(t2p, rv, buf) \ - do \ - { \ - if ((rv) < 0) \ - rv = 0; \ - else if ((rv) >= (int)sizeof(buf)) \ - (rv) = sizeof(buf) - 1; \ - else \ - break; \ - if ((t2p) != NULL) \ - (t2p)->t2p_error = T2P_ERR_ERROR; \ - } while (0) - -/* Avoid Coverity issues: Don't add negative error return values to counter of - * written bytes. */ -#define add_t2pWriteFile_check(tiff, data, size, modulename, addwrittento) \ - do \ - { \ - tmsize_t retwritevalue = t2pWriteFile(tiff, data, size); \ - if (retwritevalue < 0) \ - { \ - TIFFError(TIFF2PDF_MODULE, "%s", modulename); \ - t2p->t2p_error = T2P_ERR_ERROR; \ - } \ - else \ - { \ - addwrittento += retwritevalue; \ - } \ - } while (0) - -/* A second macro(with suffix "_2") is necessary because in some subroutines - * the parameter "t2p" is not available. */ -#define add_t2pWriteFile_check_2(tiff, data, size, modulename, addwrittento) \ - do \ - { \ - tmsize_t retwritevalue = t2pWriteFile(tiff, data, size); \ - if (retwritevalue < 0) \ - { \ - TIFFError(TIFF2PDF_MODULE, "%s", modulename); \ - } \ - else \ - { \ - addwrittento += retwritevalue; \ - } \ - } while (0) - -static void t2p_disable(TIFF *tif) -{ - T2P *t2p = (T2P *)TIFFClientdata(tif); - t2p->outputdisable = 1; -} - -static void t2p_enable(TIFF *tif) -{ - T2P *t2p = (T2P *)TIFFClientdata(tif); - t2p->outputdisable = 0; -} - -/* - * Procs for TIFFClientOpen - */ - -#ifdef OJPEG_SUPPORT -static tmsize_t t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size) -{ - thandle_t client = TIFFClientdata(tif); - TIFFReadWriteProc proc = TIFFGetReadProc(tif); - if (proc) - return proc(client, data, size); - return -1; -} -#endif /* OJPEG_SUPPORT */ - -static tmsize_t t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size) -{ - thandle_t client = TIFFClientdata(tif); - TIFFReadWriteProc proc = TIFFGetWriteProc(tif); - if (proc) - return proc(client, data, size); - return -1; -} - -static uint64_t t2pSeekFile(TIFF *tif, toff_t offset, int whence) -{ - thandle_t client = TIFFClientdata(tif); - TIFFSeekProc proc = TIFFGetSeekProc(tif); - if (proc) - return proc(client, offset, whence); - return -1; -} - -static tmsize_t t2p_readproc(thandle_t handle, tdata_t data, tmsize_t size) -{ - (void)handle, (void)data, (void)size; - return -1; -} - -static tmsize_t t2p_writeproc(thandle_t handle, tdata_t data, tmsize_t size) -{ - T2P *t2p = (T2P *)handle; - if (t2p->outputdisable <= 0 && t2p->outputfile) - { - tsize_t written = fwrite(data, 1, size, t2p->outputfile); - t2p->outputwritten += written; - return written; - } - return size; -} - -static uint64_t t2p_seekproc(thandle_t handle, uint64_t offset, int whence) -{ - T2P *t2p = (T2P *)handle; - if (t2p->outputdisable <= 0 && t2p->outputfile != stdout && t2p->outputfile) - return _TIFF_fseek_f(t2p->outputfile, (_TIFF_off_t)offset, whence); - return offset; -} - -static int t2p_closeproc(thandle_t handle) -{ - T2P *t2p = (T2P *)handle; - return fclose(t2p->outputfile); -} - -static uint64_t t2p_sizeproc(thandle_t handle) -{ - (void)handle; - return -1; -} - -static int t2p_mapproc(thandle_t handle, void **data, toff_t *offset) -{ - (void)handle, (void)data, (void)offset; - return -1; -} - -static void t2p_unmapproc(thandle_t handle, void *data, toff_t offset) -{ - (void)handle, (void)data, (void)offset; -} - -#if defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT) -static uint64_t checkAdd64(uint64_t summand1, uint64_t summand2, T2P *t2p) -{ - uint64_t bytes = summand1 + summand2; - - if (bytes < summand1) - { - TIFFError(TIFF2PDF_MODULE, "Integer overflow"); - t2p->t2p_error = T2P_ERR_ERROR; - bytes = 0; - } - - return bytes; -} -#endif /* defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT) */ - -static uint64_t checkMultiply64(uint64_t first, uint64_t second, T2P *t2p) -{ - uint64_t bytes = first * second; - - if (second && bytes / second != first) - { - TIFFError(TIFF2PDF_MODULE, "Integer overflow"); - t2p->t2p_error = T2P_ERR_ERROR; - bytes = 0; - } - - return bytes; -} - -/* - - This is the main function. - - The program converts one TIFF file to one PDF file, including multiple page - TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF - files that contain data of TIFF photometric interpretations of bilevel, - grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by - libtiff and PDF. - - If you have multiple TIFF files to convert into one PDF file then use tiffcp - or other program to concatenate the files into a multiple page TIFF file. - If the input TIFF file is of huge dimensions (greater than 10000 pixels height - or width) convert the input image to a tiled TIFF if it is not already. - - The standard output is standard output. Set the output file name with the - "-o output.pdf" option. - - All black and white files are compressed into a single strip CCITT G4 Fax - compressed PDF, unless tiled, where tiled black and white images are - compressed into tiled CCITT G4 Fax compressed PDF, libtiff CCITT support - is assumed. - - Color and grayscale data can be compressed using either JPEG compression, - ITU-T T.81, or Zip/Deflate LZ77 compression, per PNG 1.2 and RFC 1951. Set - the compression type using the -j or -z options. JPEG compression support - requires that libtiff be configured with JPEG support, and Zip/Deflate - compression support requires that libtiff is configured with Zip support, - in tiffconf.h. Use only one or the other of -j and -z. The -q option - sets the image compression quality, that is 1-100 with libjpeg JPEG - compression and one of 1, 10, 11, 12, 13, 14, or 15 for PNG group compression - predictor methods, add 100, 200, ..., 900 to set zlib compression quality 1-9. - PNG Group differencing predictor methods are not currently implemented. - - If the input TIFF contains single strip CCITT G4 Fax compressed information, - then that is written to the PDF file without transcoding, unless the options - of no compression and no passthrough are set, -d and -n. - - If the input TIFF contains JPEG or single strip Zip/Deflate compressed - information, and they are configured, then that is written to the PDF file - without transcoding, unless the options of no compression and no passthrough - are set. - - The default page size upon which the TIFF image is placed is determined by - the resolution and extent of the image data. Default values for the TIFF - image resolution can be set using the -x and -y options. The page size can - be set using the -p option for paper size, or -w and -l for paper width and - length, then each page of the TIFF image is centered on its page. The - distance unit for default resolution and page width and length can be set - by the -u option, the default unit is inch. - - Various items of the output document information can be set with the -e, -c, - -a, -t, -s, and -k tags. Setting the argument of the option to "" for these - tags causes the relevant document information field to be not written. Some - of the document information values otherwise get their information from the - input TIFF image, the software, author, document name, and image description. - - The output PDF file conforms to the PDF 1.1 specification or PDF 1.2 if using - Zip/Deflate compression. - - The Portable Document Format (PDF) specification is copyrighted by Adobe - Systems, Incorporated. Todos derechos reservados. - - Here is a listing of the usage example and the options to the tiff2pdf - program that is part of the libtiff distribution. Options followed by - a colon have a required argument. - - usage: tiff2pdf [options] input.tif - - options: - -o: output to file name - -#ifdef JPEG_SUPPORT - -j: compress with JPEG (requires libjpeg configured with libtiff) -#endif -#ifdef ZIP_SUPPORT -printf (-z: compress with Zip/Deflate (requires zlib configured with libtiff)); -#endif - -q: compression quality - -n: no compressed data passthrough - -d: do not compress (decompress) - except monochrome to CCITT Group 4 - -i: invert colors - -u: set distance unit, 'i' for inch, 'm' for centimeter - -x: set x resolution default - -y: set y resolution default - -w: width in units - -l: length in units - -r: 'd' for resolution default, 'o' for resolution override - -p: paper size, eg "letter", "legal", "a4" - -F: make the tiff fill the PDF page - -f: set pdf "fit window" user preference - -b: set PDF "Interpolate" user preference - -e: date, overrides image or current date/time default, YYYYMMDDHHMMSS - -c: creator, overrides image software default - -a: author, overrides image artist default - -t: title, overrides image document name default - -s: subject, overrides image image description default - -k: keywords - - -h: usage - - examples: - - tiff2pdf -o output.pdf input.tiff - - The above example would generate the file output.pdf from input.tiff. - - tiff2pdf input.tiff - - The above example would generate PDF output from input.tiff and write it - to standard output. - - tiff2pdf -j -p letter -o output.pdf input.tiff - - The above example would generate the file output.pdf from input.tiff, - putting the image pages on a letter sized page, compressing the output - with JPEG. - - Please report bugs through: - - http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff - - See also libtiff.3t, tiffcp. - */ - -int main(int argc, char **argv) -{ -#if !HAVE_DECL_OPTARG - extern char *optarg; - extern int optind; -#endif - const char *outfilename = NULL; - T2P *t2p = NULL; - TIFF *input = NULL, *output = NULL; - int c, ret = EXIT_SUCCESS; - - t2p = t2p_init(); - - if (t2p == NULL) - { - TIFFError(TIFF2PDF_MODULE, "Can't initialize context"); - goto fail; - } - - while (argv && - (c = getopt(argc, argv, - "m:o:q:u:x:y:w:l:r:p:e:c:a:t:s:k:jzndifbhF")) != -1) - { - switch (c) - { - case 'm': - t2p->tiff_maxdatasize = (tsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case 'o': - outfilename = optarg; - break; -#ifdef JPEG_SUPPORT - case 'j': - t2p->pdf_defaultcompression = T2P_COMPRESS_JPEG; - break; -#endif -#ifndef JPEG_SUPPORT - case 'j': - TIFFWarning(TIFF2PDF_MODULE, - "JPEG support in libtiff required for JPEG " - "compression, ignoring option"); - break; -#endif -#ifdef ZIP_SUPPORT - case 'z': - t2p->pdf_defaultcompression = T2P_COMPRESS_ZIP; - break; -#endif -#ifndef ZIP_SUPPORT - case 'z': - TIFFWarning(TIFF2PDF_MODULE, - "Zip support in libtiff required for Zip " - "compression, ignoring option"); - break; -#endif - case 'q': - t2p->pdf_defaultcompressionquality = atoi(optarg); - break; - case 'n': - t2p->pdf_nopassthrough = 1; - break; - case 'd': - t2p->pdf_defaultcompression = T2P_COMPRESS_NONE; - break; - case 'u': - if (optarg[0] == 'm') - { - t2p->pdf_centimeters = 1; - } - break; - case 'x': - t2p->pdf_defaultxres = - (float)atof(optarg) / (t2p->pdf_centimeters ? 2.54F : 1.0F); - break; - case 'y': - t2p->pdf_defaultyres = - (float)atof(optarg) / (t2p->pdf_centimeters ? 2.54F : 1.0F); - break; - case 'w': - t2p->pdf_overridepagesize = 1; - t2p->pdf_defaultpagewidth = - ((float)atof(optarg) * PS_UNIT_SIZE) / - (t2p->pdf_centimeters ? 2.54F : 1.0F); - break; - case 'l': - t2p->pdf_overridepagesize = 1; - t2p->pdf_defaultpagelength = - ((float)atof(optarg) * PS_UNIT_SIZE) / - (t2p->pdf_centimeters ? 2.54F : 1.0F); - break; - case 'r': - if (optarg[0] == 'o') - { - t2p->pdf_overrideres = 1; - } - break; - case 'p': - if (tiff2pdf_match_paper_size(&(t2p->pdf_defaultpagewidth), - &(t2p->pdf_defaultpagelength), - optarg)) - { - t2p->pdf_overridepagesize = 1; - } - else - { - TIFFWarning(TIFF2PDF_MODULE, - "Unknown paper size %s, ignoring option", - optarg); - } - break; - case 'i': - t2p->pdf_colorspace_invert = 1; - break; - case 'F': - t2p->pdf_image_fillpage = 1; - break; - case 'f': - t2p->pdf_fitwindow = 1; - break; - case 'e': - if (strlen(optarg) == 0) - { - t2p->pdf_datetime[0] = '\0'; - } - else - { - t2p->pdf_datetime[0] = 'D'; - t2p->pdf_datetime[1] = ':'; - strncpy(t2p->pdf_datetime + 2, optarg, - sizeof(t2p->pdf_datetime) - 3); - t2p->pdf_datetime[sizeof(t2p->pdf_datetime) - 1] = '\0'; - } - break; - case 'c': - strncpy(t2p->pdf_creator, optarg, sizeof(t2p->pdf_creator) - 1); - t2p->pdf_creator[sizeof(t2p->pdf_creator) - 1] = '\0'; - t2p->pdf_creator_set = 1; - break; - case 'a': - strncpy(t2p->pdf_author, optarg, sizeof(t2p->pdf_author) - 1); - t2p->pdf_author[sizeof(t2p->pdf_author) - 1] = '\0'; - t2p->pdf_author_set = 1; - break; - case 't': - strncpy(t2p->pdf_title, optarg, sizeof(t2p->pdf_title) - 1); - t2p->pdf_title[sizeof(t2p->pdf_title) - 1] = '\0'; - t2p->pdf_title_set = 1; - break; - case 's': - strncpy(t2p->pdf_subject, optarg, sizeof(t2p->pdf_subject) - 1); - t2p->pdf_subject[sizeof(t2p->pdf_subject) - 1] = '\0'; - t2p->pdf_subject_set = 1; - break; - case 'k': - strncpy(t2p->pdf_keywords, optarg, - sizeof(t2p->pdf_keywords) - 1); - t2p->pdf_keywords[sizeof(t2p->pdf_keywords) - 1] = '\0'; - t2p->pdf_keywords_set = 1; - break; - case 'b': - t2p->pdf_image_interpolate = 1; - break; - case 'h': - usage_info(EXIT_SUCCESS); - goto success; - case '?': - usage_info(EXIT_FAILURE); - goto fail; - } - } - - /* - * Input - */ - if (argc > optind) - { - input = TIFFOpen(argv[optind++], "r"); - if (input == NULL) - { - TIFFError(TIFF2PDF_MODULE, "Can't open input file %s for reading", - argv[optind - 1]); - goto fail; - } - } - else - { - TIFFError(TIFF2PDF_MODULE, "No input file specified"); - usage_info(EXIT_FAILURE); - goto fail; - } - - if (argc > optind) - { - TIFFError(TIFF2PDF_MODULE, "No support for multiple input files"); - usage_info(EXIT_FAILURE); - goto fail; - } - - /* - * Output - */ - t2p->outputdisable = 1; - if (outfilename) - { - t2p->outputfile = fopen(outfilename, "wb"); - if (t2p->outputfile == NULL) - { - TIFFError(TIFF2PDF_MODULE, "Can't open output file %s for writing", - outfilename); - goto fail; - } - } - else - { - outfilename = "-"; - t2p->outputfile = stdout; - } - - output = TIFFClientOpen(outfilename, "w", (thandle_t)t2p, t2p_readproc, - t2p_writeproc, t2p_seekproc, t2p_closeproc, - t2p_sizeproc, t2p_mapproc, t2p_unmapproc); - t2p->outputdisable = 0; - if (output == NULL) - { - TIFFError(TIFF2PDF_MODULE, "Can't initialize output descriptor"); - goto fail; - } - - /* - * Validate - */ - t2p_validate(t2p); - t2pSeekFile(output, (toff_t)0, SEEK_SET); - - /* - * Write - */ - t2p_write_pdf(t2p, input, output); - if (t2p->t2p_error != 0) - { - TIFFError(TIFF2PDF_MODULE, - "An error occurred creating output PDF file"); - goto fail; - } - - goto success; -fail: - ret = EXIT_FAILURE; -success: - if (input != NULL) - TIFFClose(input); - if (output != NULL) - TIFFClose(output); - if (t2p != NULL) - t2p_free(t2p); - return ret; -} - -static void usage_info(int code) -{ - static const char lines[] = - "Convert a TIFF image to a PDF document\n\n" - "usage: tiff2pdf [options] input.tiff\n" - "where options are:\n" - " -o: output to file name\n" -#ifdef JPEG_SUPPORT - " -j: compress with JPEG\n" -#endif -#ifdef ZIP_SUPPORT - " -z: compress with Zip/Deflate\n" -#endif -#if defined(JPEG_SUPPORT) || defined(ZIP_SUPPORT) - " -q: compression quality\n" - " -n: no compressed data passthrough\n" - " -d: do not compress (decompress) - except monochrome to CCITT Group " - "4\n" -#endif - " -i: invert colors\n" - " -u: set distance unit, 'i' for inch, 'm' for centimeter\n" - " -x: set x resolution default in dots per unit\n" - " -y: set y resolution default in dots per unit\n" - " -w: width in units\n" - " -l: length in units\n" - " -r: 'd' for resolution default, 'o' for resolution override\n" - " -p: paper size, eg \"letter\", \"legal\", \"A4\"\n" - " -F: make the tiff fill the PDF page\n" - " -f: set PDF \"Fit Window\" user preference\n" - " -e: date, overrides image or current date/time default, " - "YYYYMMDDHHMMSS\n" - " -c: sets document creator, overrides image software default\n" - " -a: sets document author, overrides image artist default\n" - " -t: sets document title, overrides image document name default\n" - " -s: sets document subject, overrides image image description " - "default\n" - " -k: sets document keywords\n" - " -b: set PDF \"Interpolate\" user preference\n" - " -m: set memory allocation limit (in MiB). set to 0 to disable limit\n" - " -h: usage\n"; - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", lines); - - return; -} - -int tiff2pdf_match_paper_size(float *width, float *length, char *papersize) -{ - - size_t i, len; - const char *sizes[] = { - "LETTER", "A4", "LEGAL", "EXECUTIVE", "LETTER", "LEGAL", - "LEDGER", "TABLOID", "A", "B", "C", "D", - "E", "F", "G", "H", "J", "K", - "A10", "A9", "A8", "A7", "A6", "A5", - "A4", "A3", "A2", "A1", "A0", "2A0", - "4A0", "2A", "4A", "B10", "B9", "B8", - "B7", "B6", "B5", "B4", "B3", "B2", - "B1", "B0", "JISB10", "JISB9", "JISB8", "JISB7", - "JISB6", "JISB5", "JISB4", "JISB3", "JISB2", "JISB1", - "JISB0", "C10", "C9", "C8", "C7", "C6", - "C5", "C4", "C3", "C2", "C1", "C0", - "RA2", "RA1", "RA0", "SRA4", "SRA3", "SRA2", - "SRA1", "SRA0", "A3EXTRA", "A4EXTRA", "STATEMENT", "FOLIO", - "QUARTO", NULL}; - const int widths[] = { - 612, 595, 612, 522, 612, 612, 792, 792, 612, 792, 1224, 1584, - 2448, 2016, 792, 2016, 2448, 2880, 74, 105, 147, 210, 298, 420, - 595, 842, 1191, 1684, 2384, 3370, 4768, 3370, 4768, 88, 125, 176, - 249, 354, 499, 709, 1001, 1417, 2004, 2835, 91, 128, 181, 258, - 363, 516, 729, 1032, 1460, 2064, 2920, 79, 113, 162, 230, 323, - 459, 649, 918, 1298, 1298, 2599, 1219, 1729, 2438, 638, 907, 1276, - 1814, 2551, 914, 667, 396, 612, 609, 0}; - const int lengths[] = { - 792, 842, 1008, 756, 792, 1008, 1224, 1224, 792, 1224, - 1584, 2448, 3168, 2880, 6480, 10296, 12672, 10296, 105, 147, - 210, 298, 420, 595, 842, 1191, 1684, 2384, 3370, 4768, - 6741, 4768, 6741, 125, 176, 249, 354, 499, 709, 1001, - 1417, 2004, 2835, 4008, 128, 181, 258, 363, 516, 729, - 1032, 1460, 2064, 2920, 4127, 113, 162, 230, 323, 459, - 649, 918, 1298, 1837, 1837, 3677, 1729, 2438, 3458, 907, - 1276, 1814, 2551, 3628, 1262, 914, 612, 936, 780, 0}; - - len = strlen(papersize); - for (i = 0; i < len; i++) - { - papersize[i] = toupper((int)papersize[i]); - } - for (i = 0; sizes[i] != NULL; i++) - { - if (strcmp((const char *)papersize, sizes[i]) == 0) - { - *width = (float)widths[i]; - *length = (float)lengths[i]; - return (1); - } - } - - return (0); -} - -/* - * This function allocates and initializes a T2P context struct pointer. - */ - -T2P *t2p_init() -{ - T2P *t2p = (T2P *)_TIFFmalloc(sizeof(T2P)); - if (t2p == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SIZE_FORMAT - " bytes of memory for t2p_init", - sizeof(T2P)); - return ((T2P *)NULL); - } - _TIFFmemset(t2p, 0x00, sizeof(T2P)); - t2p->pdf_majorversion = 1; - t2p->pdf_minorversion = 1; - t2p->pdf_defaultxres = 300.0; - t2p->pdf_defaultyres = 300.0; - t2p->pdf_defaultpagewidth = 612.0; - t2p->pdf_defaultpagelength = 792.0; - t2p->pdf_xrefcount = 3; /* Catalog, Info, Pages */ - t2p->tiff_maxdatasize = DEFAULT_MAX_MALLOC; - - return (t2p); -} - -/* - * This function frees a T2P context struct pointer and any allocated data - * fields of it. - */ - -void t2p_free(T2P *t2p) -{ - unsigned int i = 0; - - if (t2p != NULL) - { - if (t2p->pdf_xrefoffsets != NULL) - { - _TIFFfree((tdata_t)t2p->pdf_xrefoffsets); - } - if (t2p->tiff_pages != NULL) - { - _TIFFfree((tdata_t)t2p->tiff_pages); - } - for (i = 0; i < t2p->tiff_pagecount; i++) - { - if (t2p->tiff_tiles[i].tiles_tiles != NULL) - { - _TIFFfree((tdata_t)t2p->tiff_tiles[i].tiles_tiles); - } - } - if (t2p->tiff_tiles != NULL) - { - _TIFFfree((tdata_t)t2p->tiff_tiles); - } - if (t2p->pdf_palette != NULL) - { - _TIFFfree((tdata_t)t2p->pdf_palette); - } -#ifdef OJPEG_SUPPORT - if (t2p->pdf_ojpegdata != NULL) - { - _TIFFfree((tdata_t)t2p->pdf_ojpegdata); - } -#endif - _TIFFfree((tdata_t)t2p); - } - - return; -} - -/* - This function validates the values of a T2P context struct pointer - before calling t2p_write_pdf with it. -*/ - -void t2p_validate(T2P *t2p) -{ - (void)t2p; - -#ifdef JPEG_SUPPORT - if (t2p->pdf_defaultcompression == T2P_COMPRESS_JPEG) - { - if (t2p->pdf_defaultcompressionquality > 100 || - t2p->pdf_defaultcompressionquality < 1) - { - t2p->pdf_defaultcompressionquality = 0; - } - } -#endif -#ifdef ZIP_SUPPORT - if (t2p->pdf_defaultcompression == T2P_COMPRESS_ZIP) - { - uint16_t m = t2p->pdf_defaultcompressionquality % 100; - if (t2p->pdf_defaultcompressionquality / 100 > 9 || (m > 1 && m < 10) || - m > 15) - { - t2p->pdf_defaultcompressionquality = 0; - } - if (t2p->pdf_defaultcompressionquality % 100 != 0) - { - t2p->pdf_defaultcompressionquality /= 100; - t2p->pdf_defaultcompressionquality *= 100; - TIFFError(TIFF2PDF_MODULE, - "PNG Group predictor differencing not implemented, " - "assuming compression quality %" PRIu16, - t2p->pdf_defaultcompressionquality); - } - t2p->pdf_defaultcompressionquality %= 100; - if (t2p->pdf_minorversion < 2) - { - t2p->pdf_minorversion = 2; - } - } -#endif - - return; -} - -/* - This function scans the input TIFF file for pages. It attempts - to determine which IFD's of the TIFF file contain image document - pages. For each, it gathers some information that has to do - with the output of the PDF document as a whole. -*/ - -void t2p_read_tiff_init(T2P *t2p, TIFF *input) -{ - - tdir_t directorycount = 0; - tdir_t i = 0; - uint16_t pagen = 0; - uint16_t paged = 0; - uint16_t xuint16 = 0; - uint16_t tiff_transferfunctioncount = 0; - uint16_t *tiff_transferfunction[3]; - - directorycount = TIFFNumberOfDirectories(input); - if (directorycount > TIFF_DIR_MAX) - { - TIFFError(TIFF2PDF_MODULE, "TIFF contains too many directories, %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->tiff_pages = (T2P_PAGE *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, directorycount, sizeof(T2P_PAGE))); - if (t2p->tiff_pages == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SIZE_FORMAT - " bytes of memory for tiff_pages array, %s", - sizeof(T2P_PAGE) * directorycount, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - _TIFFmemset(t2p->tiff_pages, 0x00, directorycount * sizeof(T2P_PAGE)); - t2p->tiff_tiles = (T2P_TILES *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, directorycount, sizeof(T2P_TILES))); - if (t2p->tiff_tiles == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SIZE_FORMAT - " bytes of memory for tiff_tiles array, %s", - sizeof(T2P_TILES) * directorycount, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - _TIFFmemset(t2p->tiff_tiles, 0x00, directorycount * sizeof(T2P_TILES)); - for (i = 0; i < directorycount; i++) - { - uint32_t subfiletype = 0; - - if (!TIFFSetDirectory(input, i)) - { - TIFFError(TIFF2PDF_MODULE, - "Can't set directory %" PRIu16 " of input file %s", i, - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (TIFFGetField(input, TIFFTAG_PAGENUMBER, &pagen, &paged)) - { - if ((pagen > paged) && (paged != 0)) - { - t2p->tiff_pages[t2p->tiff_pagecount].page_number = paged; - } - else - { - t2p->tiff_pages[t2p->tiff_pagecount].page_number = pagen; - } - goto ispage2; - } - if (TIFFGetField(input, TIFFTAG_SUBFILETYPE, &subfiletype)) - { - if (((subfiletype & FILETYPE_PAGE) != 0) || (subfiletype == 0)) - { - goto ispage; - } - else - { - goto isnotpage; - } - } - if (TIFFGetField(input, TIFFTAG_OSUBFILETYPE, &subfiletype)) - { - if ((subfiletype == OFILETYPE_IMAGE) || - (subfiletype == OFILETYPE_PAGE) || (subfiletype == 0)) - { - goto ispage; - } - else - { - goto isnotpage; - } - } - ispage: - t2p->tiff_pages[t2p->tiff_pagecount].page_number = t2p->tiff_pagecount; - ispage2: - t2p->tiff_pages[t2p->tiff_pagecount].page_directory = i; - if (TIFFIsTiled(input)) - { - t2p->tiff_pages[t2p->tiff_pagecount].page_tilecount = - TIFFNumberOfTiles(input); - } - t2p->tiff_pagecount++; - isnotpage: - (void)0; - } - - qsort((void *)t2p->tiff_pages, t2p->tiff_pagecount, sizeof(T2P_PAGE), - t2p_cmp_t2p_page); - - for (i = 0; i < t2p->tiff_pagecount; i++) - { - t2p->pdf_xrefcount += 5; - TIFFSetDirectory(input, t2p->tiff_pages[i].page_directory); - if ((TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &xuint16) && - (xuint16 == PHOTOMETRIC_PALETTE)) || - TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)) - { - t2p->tiff_pages[i].page_extra++; - t2p->pdf_xrefcount++; - } -#ifdef ZIP_SUPPORT - if (TIFFGetField(input, TIFFTAG_COMPRESSION, &xuint16)) - { - if ((xuint16 == COMPRESSION_DEFLATE || - xuint16 == COMPRESSION_ADOBE_DEFLATE) && - ((t2p->tiff_pages[i].page_tilecount != 0) || - TIFFNumberOfStrips(input) == 1) && - (t2p->pdf_nopassthrough == 0)) - { - if (t2p->pdf_minorversion < 2) - { - t2p->pdf_minorversion = 2; - } - } - } -#endif - if (TIFFGetField( - input, TIFFTAG_TRANSFERFUNCTION, &(tiff_transferfunction[0]), - &(tiff_transferfunction[1]), &(tiff_transferfunction[2]))) - { - - if ((tiff_transferfunction[1] != (uint16_t *)NULL) && - (tiff_transferfunction[2] != (uint16_t *)NULL)) - { - tiff_transferfunctioncount = 3; - } - else - { - tiff_transferfunctioncount = 1; - } - } - else - { - tiff_transferfunctioncount = 0; - } - - if (i > 0) - { - if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount) - { - TIFFError(TIFF2PDF_MODULE, - "Different transfer function on page %" PRIu16, i); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } - - t2p->tiff_transferfunctioncount = tiff_transferfunctioncount; - t2p->tiff_transferfunction[0] = tiff_transferfunction[0]; - t2p->tiff_transferfunction[1] = tiff_transferfunction[1]; - t2p->tiff_transferfunction[2] = tiff_transferfunction[2]; - if (tiff_transferfunctioncount == 3) - { - t2p->tiff_pages[i].page_extra += 4; - t2p->pdf_xrefcount += 4; - if (t2p->pdf_minorversion < 2) - t2p->pdf_minorversion = 2; - } - else if (tiff_transferfunctioncount == 1) - { - t2p->tiff_pages[i].page_extra += 2; - t2p->pdf_xrefcount += 2; - if (t2p->pdf_minorversion < 2) - t2p->pdf_minorversion = 2; - } - - if (TIFFGetField(input, TIFFTAG_ICCPROFILE, - &(t2p->tiff_iccprofilelength), - &(t2p->tiff_iccprofile)) != 0) - { - t2p->tiff_pages[i].page_extra++; - t2p->pdf_xrefcount++; - if (t2p->pdf_minorversion < 3) - { - t2p->pdf_minorversion = 3; - } - } - t2p->tiff_tiles[i].tiles_tilecount = t2p->tiff_pages[i].page_tilecount; - if ((TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0) && - (xuint16 == PLANARCONFIG_SEPARATE)) - { - if (!TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16)) - { - TIFFError(TIFF2PDF_MODULE, "Missing SamplesPerPixel, %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if ((t2p->tiff_tiles[i].tiles_tilecount % xuint16) != 0) - { - TIFFError(TIFF2PDF_MODULE, "Invalid tile count, %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->tiff_tiles[i].tiles_tilecount /= xuint16; - } - if (t2p->tiff_tiles[i].tiles_tilecount > 0) - { - t2p->pdf_xrefcount += (t2p->tiff_tiles[i].tiles_tilecount - 1) * 2; - TIFFGetField(input, TIFFTAG_TILEWIDTH, - &(t2p->tiff_tiles[i].tiles_tilewidth)); - if (t2p->tiff_tiles[i].tiles_tilewidth < 1) - { - TIFFError(TIFF2PDF_MODULE, "Invalid tile width (%d), %s", - t2p->tiff_tiles[i].tiles_tilewidth, - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - TIFFGetField(input, TIFFTAG_TILELENGTH, - &(t2p->tiff_tiles[i].tiles_tilelength)); - if (t2p->tiff_tiles[i].tiles_tilelength < 1) - { - TIFFError(TIFF2PDF_MODULE, "Invalid tile length (%d), %s", - t2p->tiff_tiles[i].tiles_tilelength, - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->tiff_tiles[i].tiles_tiles = (T2P_TILE *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, t2p->tiff_tiles[i].tiles_tilecount, - sizeof(T2P_TILE))); - if (t2p->tiff_tiles[i].tiles_tiles == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SIZE_FORMAT - " bytes of memory for t2p_read_tiff_init, %s", - sizeof(T2P_TILE) * t2p->tiff_tiles[i].tiles_tilecount, - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } - } - - return; -} - -/* - * This function is used by qsort to sort a T2P_PAGE* array of page structures - * by page number. If the page numbers are the same, we fall back to comparing - * directory numbers to preserve the order of the input file. - */ - -int t2p_cmp_t2p_page(const void *e1, const void *e2) -{ - - int d; - d = (int32_t)(((T2P_PAGE *)e1)->page_number) - - (int32_t)(((T2P_PAGE *)e2)->page_number); - if (d == 0) - { - d = (int32_t)(((T2P_PAGE *)e1)->page_directory) - - (int32_t)(((T2P_PAGE *)e2)->page_directory); - } - return d; -} - -/* - This function sets the input directory to the directory of a given - page and determines information about the image. It checks - the image characteristics to determine if it is possible to convert - the image data into a page of PDF output, setting values of the T2P - struct for this page. It determines what color space is used in - the output PDF to represent the image. - - It determines if the image can be converted as raw data without - requiring transcoding of the image data. -*/ - -void t2p_read_tiff_data(T2P *t2p, TIFF *input) -{ - - int i = 0; - uint16_t *r = NULL; - uint16_t *g = NULL; - uint16_t *b = NULL; - uint16_t *a = NULL; - uint16_t xuint16; - uint16_t *xuint16p; - float *xfloatp; - int palette_16bit = 0; - int palette_shift = 8; - - t2p->pdf_transcode = T2P_TRANSCODE_ENCODE; - t2p->pdf_sample = T2P_SAMPLE_NOTHING; - t2p->pdf_switchdecode = t2p->pdf_colorspace_invert; - - TIFFSetDirectory(input, t2p->tiff_pages[t2p->pdf_page].page_directory); - - TIFFGetField(input, TIFFTAG_IMAGEWIDTH, &(t2p->tiff_width)); - if (t2p->tiff_width == 0) - { - TIFFError(TIFF2PDF_MODULE, "No support for %s with zero width", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - TIFFGetField(input, TIFFTAG_IMAGELENGTH, &(t2p->tiff_length)); - if (t2p->tiff_length == 0) - { - TIFFError(TIFF2PDF_MODULE, "No support for %s with zero length", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - if (TIFFGetField(input, TIFFTAG_COMPRESSION, &(t2p->tiff_compression)) == 0) - { - TIFFError(TIFF2PDF_MODULE, "No support for %s with no compression tag", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (TIFFIsCODECConfigured(t2p->tiff_compression) == 0) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with compression type %" PRIu16 - ": not configured", - TIFFFileName(input), t2p->tiff_compression); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - TIFFGetFieldDefaulted(input, TIFFTAG_BITSPERSAMPLE, - &(t2p->tiff_bitspersample)); - switch (t2p->tiff_bitspersample) - { - case 1: - case 2: - case 4: - case 8: - break; - case 0: - TIFFWarning(TIFF2PDF_MODULE, - "Image %s has 0 bits per sample, assuming 1", - TIFFFileName(input)); - t2p->tiff_bitspersample = 1; - break; - default: - TIFFError(TIFF2PDF_MODULE, - "No support for %s with %" PRIu16 " bits per sample", - TIFFFileName(input), t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - TIFFGetFieldDefaulted(input, TIFFTAG_SAMPLESPERPIXEL, - &(t2p->tiff_samplesperpixel)); - if (t2p->tiff_samplesperpixel > 4) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with %" PRIu16 " samples per pixel", - TIFFFileName(input), t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (t2p->tiff_samplesperpixel == 0) - { - TIFFWarning(TIFF2PDF_MODULE, - "Image %s has 0 samples per pixel, assuming 1", - TIFFFileName(input)); - t2p->tiff_samplesperpixel = 1; - } - - if (TIFFGetField(input, TIFFTAG_SAMPLEFORMAT, &xuint16) != 0) - { - switch (xuint16) - { - case 0: - case 1: - case 4: - break; - default: - TIFFError(TIFF2PDF_MODULE, - "No support for %s with sample format %" PRIu16, - TIFFFileName(input), xuint16); - t2p->t2p_error = T2P_ERR_ERROR; - return; - break; - } - } - - TIFFGetFieldDefaulted(input, TIFFTAG_FILLORDER, &(t2p->tiff_fillorder)); - - if (TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &(t2p->tiff_photometric)) == 0) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with no photometric interpretation tag", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - switch (t2p->tiff_photometric) - { - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - if (t2p->tiff_bitspersample == 1) - { - t2p->pdf_colorspace = T2P_CS_BILEVEL; - if (t2p->tiff_photometric == PHOTOMETRIC_MINISWHITE) - { - t2p->pdf_switchdecode ^= 1; - } - } - else - { - t2p->pdf_colorspace = T2P_CS_GRAY; - if (t2p->tiff_photometric == PHOTOMETRIC_MINISWHITE) - { - t2p->pdf_switchdecode ^= 1; - } - } - break; - case PHOTOMETRIC_RGB: - t2p->pdf_colorspace = T2P_CS_RGB; - if (t2p->tiff_samplesperpixel == 3) - { - break; - } - if (TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)) - { - if (xuint16 == 1) - goto photometric_palette; - } - if (t2p->tiff_samplesperpixel > 3) - { - if (t2p->tiff_samplesperpixel == 4) - { - t2p->pdf_colorspace = T2P_CS_RGB; - if (TIFFGetField(input, TIFFTAG_EXTRASAMPLES, &xuint16, - &xuint16p) && - xuint16 == 1) - { - if (xuint16p[0] == EXTRASAMPLE_ASSOCALPHA) - { - if (t2p->tiff_bitspersample != 8) - { - TIFFError( - TIFF2PDF_MODULE, - "No support for BitsPerSample=%" PRIu16 - " for RGBA", - t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_sample = T2P_SAMPLE_RGBAA_TO_RGB; - break; - } - if (xuint16p[0] == EXTRASAMPLE_UNASSALPHA) - { - if (t2p->tiff_bitspersample != 8) - { - TIFFError( - TIFF2PDF_MODULE, - "No support for BitsPerSample=%" PRIu16 - " for RGBA", - t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_sample = T2P_SAMPLE_RGBA_TO_RGB; - break; - } - TIFFWarning(TIFF2PDF_MODULE, - "RGB image %s has 4 samples per pixel, " - "assuming RGBA", - TIFFFileName(input)); - break; - } - t2p->pdf_colorspace = T2P_CS_CMYK; - t2p->pdf_switchdecode ^= 1; - TIFFWarning(TIFF2PDF_MODULE, - "RGB image %s has 4 samples per pixel, " - "assuming inverse CMYK", - TIFFFileName(input)); - break; - } - else - { - TIFFError(TIFF2PDF_MODULE, - "No support for RGB image %s with %" PRIu16 - " samples per pixel", - TIFFFileName(input), t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - break; - } - } - else - { - TIFFError(TIFF2PDF_MODULE, - "No support for RGB image %s with %" PRIu16 - " samples per pixel", - TIFFFileName(input), t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - break; - } - case PHOTOMETRIC_PALETTE: - photometric_palette: - if (t2p->tiff_samplesperpixel != 1) - { - TIFFError(TIFF2PDF_MODULE, - "No support for palettized image %s with not one " - "sample per pixel", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_colorspace = T2P_CS_RGB | T2P_CS_PALETTE; - t2p->pdf_palettesize = 0x0001 << t2p->tiff_bitspersample; - if (!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b)) - { - TIFFError(TIFF2PDF_MODULE, - "Palettized image %s has no color map", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (r == NULL || g == NULL || b == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Error getting 3 components from color map"); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (t2p->pdf_palette != NULL) - { - _TIFFfree(t2p->pdf_palette); - t2p->pdf_palette = NULL; - } - t2p->pdf_palette = (unsigned char *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, t2p->pdf_palettesize, 3)); - if (t2p->pdf_palette == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" PRIu16 - " bytes of memory for t2p_read_tiff_image, %s", - t2p->pdf_palettesize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - /* Some older tiffs may have colors in the palette - * ranging from 0 to 255 rather than 0 to 65535. */ - for (i = 0; i < t2p->pdf_palettesize; i++) - { - if ((r[i] > 255) || (g[i] > 255) || (b[i] > 255)) - { - palette_16bit = 1; - break; - } - } - if (palette_16bit == 0) - { - TIFFWarning(TIFFFileName(input), "Assuming 8-bit colormap"); - palette_shift = 0; - } - for (i = 0; i < t2p->pdf_palettesize; i++) - { - t2p->pdf_palette[(i * 3)] = - (unsigned char)(r[i] >> palette_shift); - t2p->pdf_palette[(i * 3) + 1] = - (unsigned char)(g[i] >> palette_shift); - t2p->pdf_palette[(i * 3) + 2] = - (unsigned char)(b[i] >> palette_shift); - } - t2p->pdf_palettesize *= 3; - break; - case PHOTOMETRIC_SEPARATED: - if (TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)) - { - if (xuint16 == 1) - { - goto photometric_palette_cmyk; - } - } - if (TIFFGetField(input, TIFFTAG_INKSET, &xuint16)) - { - if (xuint16 != INKSET_CMYK) - { - TIFFError( - TIFF2PDF_MODULE, - "No support for %s because its inkset is not CMYK", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } - if (t2p->tiff_samplesperpixel == 4) - { - t2p->pdf_colorspace = T2P_CS_CMYK; - } - else - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s because it has %" PRIu16 - " samples per pixel", - TIFFFileName(input), t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - break; - photometric_palette_cmyk: - if (t2p->tiff_samplesperpixel != 1) - { - TIFFError(TIFF2PDF_MODULE, - "No support for palettized CMYK image %s with not " - "one sample per pixel", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_colorspace = T2P_CS_CMYK | T2P_CS_PALETTE; - t2p->pdf_palettesize = 0x0001 << t2p->tiff_bitspersample; - if (!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b, &a)) - { - TIFFError(TIFF2PDF_MODULE, - "Palettized image %s has no color map", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (r == NULL || g == NULL || b == NULL || a == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Error getting 4 components from color map"); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (t2p->pdf_palette != NULL) - { - _TIFFfree(t2p->pdf_palette); - t2p->pdf_palette = NULL; - } - t2p->pdf_palette = (unsigned char *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, t2p->pdf_palettesize, 4)); - if (t2p->pdf_palette == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" PRIu16 - " bytes of memory for t2p_read_tiff_image, %s", - t2p->pdf_palettesize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - for (i = 0; i < t2p->pdf_palettesize; i++) - { - t2p->pdf_palette[(i * 4)] = (unsigned char)(r[i] >> 8); - t2p->pdf_palette[(i * 4) + 1] = (unsigned char)(g[i] >> 8); - t2p->pdf_palette[(i * 4) + 2] = (unsigned char)(b[i] >> 8); - t2p->pdf_palette[(i * 4) + 3] = (unsigned char)(a[i] >> 8); - } - t2p->pdf_palettesize *= 4; - break; - case PHOTOMETRIC_YCBCR: - t2p->pdf_colorspace = T2P_CS_RGB; - if (t2p->tiff_samplesperpixel == 1) - { - t2p->pdf_colorspace = T2P_CS_GRAY; - t2p->tiff_photometric = PHOTOMETRIC_MINISBLACK; - break; - } - t2p->pdf_sample = T2P_SAMPLE_YCBCR_TO_RGB; -#ifdef JPEG_SUPPORT - if (t2p->pdf_defaultcompression == T2P_COMPRESS_JPEG) - { - t2p->pdf_sample = T2P_SAMPLE_NOTHING; - } -#endif - break; - case PHOTOMETRIC_CIELAB: - if (t2p->tiff_samplesperpixel != 3) - { - TIFFError(TIFF2PDF_MODULE, - "Unsupported samplesperpixel = %" PRIu16 - " for CIELAB", - t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (t2p->tiff_bitspersample != 8) - { - TIFFError(TIFF2PDF_MODULE, - "Invalid bitspersample = %" PRIu16 " for CIELAB", - t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_labrange[0] = -127; - t2p->pdf_labrange[1] = 127; - t2p->pdf_labrange[2] = -127; - t2p->pdf_labrange[3] = 127; - t2p->pdf_sample = T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED; - t2p->pdf_colorspace = T2P_CS_LAB; - break; - case PHOTOMETRIC_ICCLAB: - t2p->pdf_labrange[0] = 0; - t2p->pdf_labrange[1] = 255; - t2p->pdf_labrange[2] = 0; - t2p->pdf_labrange[3] = 255; - t2p->pdf_colorspace = T2P_CS_LAB; - break; - case PHOTOMETRIC_ITULAB: - if (t2p->tiff_samplesperpixel != 3) - { - TIFFError(TIFF2PDF_MODULE, - "Unsupported samplesperpixel = %" PRIu16 - " for ITULAB", - t2p->tiff_samplesperpixel); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - if (t2p->tiff_bitspersample != 8) - { - TIFFError(TIFF2PDF_MODULE, - "Invalid bitspersample = %" PRIu16 " for ITULAB", - t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->pdf_labrange[0] = -85; - t2p->pdf_labrange[1] = 85; - t2p->pdf_labrange[2] = -75; - t2p->pdf_labrange[3] = 124; - t2p->pdf_sample = T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED; - t2p->pdf_colorspace = T2P_CS_LAB; - break; - case PHOTOMETRIC_LOGL: - case PHOTOMETRIC_LOGLUV: - TIFFError( - TIFF2PDF_MODULE, - "No support for %s with photometric interpretation LogL/LogLuv", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - default: - TIFFError( - TIFF2PDF_MODULE, - "No support for %s with photometric interpretation %" PRIu16, - TIFFFileName(input), t2p->tiff_photometric); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - - if (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &(t2p->tiff_planar))) - { - switch (t2p->tiff_planar) - { - case 0: - TIFFWarning(TIFF2PDF_MODULE, - "Image %s has planar configuration 0, assuming 1", - TIFFFileName(input)); - t2p->tiff_planar = PLANARCONFIG_CONTIG; - case PLANARCONFIG_CONTIG: - break; - case PLANARCONFIG_SEPARATE: - t2p->pdf_sample = T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG; - if (t2p->tiff_bitspersample != 8) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with separated planar " - "configuration and %" PRIu16 " bits per sample", - TIFFFileName(input), t2p->tiff_bitspersample); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - break; - default: - TIFFError( - TIFF2PDF_MODULE, - "No support for %s with planar configuration %" PRIu16, - TIFFFileName(input), t2p->tiff_planar); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } - - TIFFGetFieldDefaulted(input, TIFFTAG_ORIENTATION, &(t2p->tiff_orientation)); - if (t2p->tiff_orientation > 8) - { - TIFFWarning(TIFF2PDF_MODULE, - "Image %s has orientation %" PRIu16 ", assuming 0", - TIFFFileName(input), t2p->tiff_orientation); - t2p->tiff_orientation = 0; - } - - if (TIFFGetField(input, TIFFTAG_XRESOLUTION, &(t2p->tiff_xres)) == 0) - { - t2p->tiff_xres = 0.0; - } - if (TIFFGetField(input, TIFFTAG_YRESOLUTION, &(t2p->tiff_yres)) == 0) - { - t2p->tiff_yres = 0.0; - } - TIFFGetFieldDefaulted(input, TIFFTAG_RESOLUTIONUNIT, &(t2p->tiff_resunit)); - if (t2p->tiff_resunit == RESUNIT_CENTIMETER) - { - t2p->tiff_xres *= 2.54F; - t2p->tiff_yres *= 2.54F; - } - else if (t2p->tiff_resunit != RESUNIT_INCH && t2p->pdf_centimeters != 0) - { - t2p->tiff_xres *= 2.54F; - t2p->tiff_yres *= 2.54F; - } - - t2p_compose_pdf_page(t2p); - if (t2p->t2p_error == T2P_ERR_ERROR) - return; - - t2p->pdf_transcode = T2P_TRANSCODE_ENCODE; - /* It seems that T2P_TRANSCODE_RAW mode doesn't support separate->contig */ - /* conversion. At least t2p_read_tiff_size and t2p_read_tiff_size_tile */ - /* do not take into account the number of samples, and thus */ - /* that can cause heap buffer overflows such as in */ - /* http://bugzilla.maptools.org/show_bug.cgi?id=2715 */ - if (t2p->pdf_nopassthrough == 0 && - t2p->tiff_planar != PLANARCONFIG_SEPARATE) - { -#ifdef CCITT_SUPPORT - if (t2p->tiff_compression == COMPRESSION_CCITTFAX4) - { - if (TIFFIsTiled(input) || (TIFFNumberOfStrips(input) == 1)) - { - t2p->pdf_transcode = T2P_TRANSCODE_RAW; - t2p->pdf_compression = T2P_COMPRESS_G4; - } - } -#endif -#ifdef ZIP_SUPPORT - if (t2p->tiff_compression == COMPRESSION_ADOBE_DEFLATE || - t2p->tiff_compression == COMPRESSION_DEFLATE) - { - if (TIFFIsTiled(input) || (TIFFNumberOfStrips(input) == 1)) - { - uint16_t predictor; - t2p->pdf_transcode = T2P_TRANSCODE_RAW; - t2p->pdf_compression = T2P_COMPRESS_ZIP; - if (TIFFGetField(input, TIFFTAG_PREDICTOR, &predictor)) - { - t2p->pdf_compressionquality = predictor; - } - else - { - t2p->pdf_compressionquality = PREDICTOR_NONE; - } - /* TIFFTAG_ZIPQUALITY is always Z_DEFAULT_COMPRESSION on reading - */ - } - } -#endif -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - t2p->pdf_transcode = T2P_TRANSCODE_RAW; - t2p->pdf_compression = T2P_COMPRESS_JPEG; - t2p_process_ojpeg_tables(t2p, input); - } -#endif -#ifdef JPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - t2p->pdf_transcode = T2P_TRANSCODE_RAW; - t2p->pdf_compression = T2P_COMPRESS_JPEG; - } -#endif - (void)0; - } - - if (t2p->pdf_transcode != T2P_TRANSCODE_RAW) - { - t2p->pdf_compression = t2p->pdf_defaultcompression; - } - -#ifdef JPEG_SUPPORT - if (t2p->pdf_defaultcompression == T2P_COMPRESS_JPEG) - { - if (t2p->pdf_colorspace & T2P_CS_PALETTE) - { - t2p->pdf_sample |= T2P_SAMPLE_REALIZE_PALETTE; - t2p->pdf_colorspace ^= T2P_CS_PALETTE; - t2p->tiff_pages[t2p->pdf_page].page_extra--; - } - } - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - if (t2p->tiff_planar == PLANARCONFIG_SEPARATE) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with JPEG compression and separated " - "planar configuration", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } -#endif -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - if (t2p->tiff_planar == PLANARCONFIG_SEPARATE) - { - TIFFError(TIFF2PDF_MODULE, - "No support for %s with OJPEG compression and separated " - "planar configuration", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } -#endif - - if (t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE) - { - if (t2p->pdf_colorspace & T2P_CS_CMYK) - { - t2p->tiff_samplesperpixel = 4; - t2p->tiff_photometric = PHOTOMETRIC_SEPARATED; - } - else - { - t2p->tiff_samplesperpixel = 3; - t2p->tiff_photometric = PHOTOMETRIC_RGB; - } - } - - if (TIFFGetField( - input, TIFFTAG_TRANSFERFUNCTION, &(t2p->tiff_transferfunction[0]), - &(t2p->tiff_transferfunction[1]), &(t2p->tiff_transferfunction[2]))) - { - if ((t2p->tiff_transferfunction[1] != (uint16_t *)NULL) && - (t2p->tiff_transferfunction[2] != (uint16_t *)NULL)) - { - t2p->tiff_transferfunctioncount = 3; - } - else - { - t2p->tiff_transferfunctioncount = 1; - } - } - else - { - t2p->tiff_transferfunctioncount = 0; - } - if (TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp) != 0) - { - t2p->tiff_whitechromaticities[0] = xfloatp[0]; - t2p->tiff_whitechromaticities[1] = xfloatp[1]; - if (t2p->pdf_colorspace & T2P_CS_GRAY) - { - t2p->pdf_colorspace |= T2P_CS_CALGRAY; - } - if (t2p->pdf_colorspace & T2P_CS_RGB) - { - t2p->pdf_colorspace |= T2P_CS_CALRGB; - } - } - if (TIFFGetField(input, TIFFTAG_PRIMARYCHROMATICITIES, &xfloatp) != 0) - { - t2p->tiff_primarychromaticities[0] = xfloatp[0]; - t2p->tiff_primarychromaticities[1] = xfloatp[1]; - t2p->tiff_primarychromaticities[2] = xfloatp[2]; - t2p->tiff_primarychromaticities[3] = xfloatp[3]; - t2p->tiff_primarychromaticities[4] = xfloatp[4]; - t2p->tiff_primarychromaticities[5] = xfloatp[5]; - if (t2p->pdf_colorspace & T2P_CS_RGB) - { - t2p->pdf_colorspace |= T2P_CS_CALRGB; - } - } - if (t2p->pdf_colorspace & T2P_CS_LAB) - { - if (TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp) != 0) - { - t2p->tiff_whitechromaticities[0] = xfloatp[0]; - t2p->tiff_whitechromaticities[1] = xfloatp[1]; - } - else - { - t2p->tiff_whitechromaticities[0] = 0.3457F; /* 0.3127F; */ - t2p->tiff_whitechromaticities[1] = 0.3585F; /* 0.3290F; */ - } - } - if (TIFFGetField(input, TIFFTAG_ICCPROFILE, &(t2p->tiff_iccprofilelength), - &(t2p->tiff_iccprofile)) != 0) - { - t2p->pdf_colorspace |= T2P_CS_ICCBASED; - } - else - { - t2p->tiff_iccprofilelength = 0; - t2p->tiff_iccprofile = NULL; - } - -#ifdef CCITT_SUPPORT - if (t2p->tiff_bitspersample == 1 && t2p->tiff_samplesperpixel == 1) - { - t2p->pdf_compression = T2P_COMPRESS_G4; - } -#endif - - return; -} - -/** - * checks for overflow - */ -static void t2p_set_tiff_datasize(T2P *t2p, uint64_t k) -{ - if (k != (uint64_t)(tmsize_t)k || (tmsize_t)k < 0) - { - TIFFError(TIFF2PDF_MODULE, "Integer overflow"); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p->tiff_datasize = (tmsize_t)k; -} - -/** - This function returns the necessary size of a data buffer to contain the - raw or uncompressed image data from the input TIFF for a page. -*/ -void t2p_read_tiff_size(T2P *t2p, TIFF *input) -{ - - uint64_t *sbc = NULL; -#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) - unsigned char *jpt = NULL; - tstrip_t i = 0; - tstrip_t stripcount = 0; -#endif - uint64_t k = 0; - - if (t2p->pdf_transcode == T2P_TRANSCODE_RAW) - { -#if defined(CCITT_SUPPORT) || defined(ZIP_SUPPORT) -#if defined(CCITT_SUPPORT) && defined(ZIP_SUPPORT) - if (t2p->pdf_compression == T2P_COMPRESS_G4 || - t2p->pdf_compression == T2P_COMPRESS_ZIP) -#elif defined(CCITT_SUPPORT) - if (t2p->pdf_compression == T2P_COMPRESS_G4) -#else - if (t2p->pdf_compression == T2P_COMPRESS_ZIP) -#endif - { - if (!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)) - { - TIFFError( - TIFF2PDF_MODULE, - "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p_set_tiff_datasize(t2p, sbc[0]); - return; - } -#endif -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - if (!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)) - { - TIFFError( - TIFF2PDF_MODULE, - "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - stripcount = TIFFNumberOfStrips(input); - for (i = 0; i < stripcount; i++) - { - k = checkAdd64(k, sbc[i], t2p); - } - if (TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, - &(t2p->tiff_dataoffset))) - { - if (t2p->tiff_dataoffset != 0) - { - if (TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, - &(t2p->tiff_datasize)) != 0) - { - if ((uint64_t)t2p->tiff_datasize < k) - { - TIFFWarning(TIFF2PDF_MODULE, - "Input file %s has short JPEG " - "interchange file byte count", - TIFFFileName(input)); - t2p->pdf_ojpegiflength = _TIFFCastSSizeToUInt32( - t2p->tiff_datasize, "t2p_read_tiff_size"); - k = checkAdd64(k, t2p->tiff_datasize, t2p); - k = checkAdd64(k, 6, t2p); - k = checkAdd64(k, stripcount, t2p); - k = checkAdd64(k, stripcount, t2p); - t2p_set_tiff_datasize(t2p, k); - return; - } - return; - } - else - { - TIFFError(TIFF2PDF_MODULE, - "Input file %s missing field: " - "TIFFTAG_JPEGIFBYTECOUNT", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - } - } - k = checkAdd64(k, stripcount, t2p); - k = checkAdd64(k, stripcount, t2p); - k = checkAdd64(k, 2048, t2p); - t2p_set_tiff_datasize(t2p, k); - return; - } -#endif -#ifdef JPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - uint32_t count = 0; - if (TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) - { - if (count > 4) - { - k += count; - k -= 2; /* don't use EOI of header */ - } - } - else - { - k = 2; /* SOI for first strip */ - } - stripcount = TIFFNumberOfStrips(input); - if (!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)) - { - TIFFError( - TIFF2PDF_MODULE, - "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - for (i = 0; i < stripcount; i++) - { - k = checkAdd64(k, sbc[i], t2p); - /* Keep next two comments just for information: */ - /* k -= 2; don't use EOI of strip */ - /* k += 2; add space for restart marker */ - } - k = checkAdd64(k, 2, t2p); /* use EOI of last strip */ - t2p_set_tiff_datasize(t2p, k); - return; - } -#endif - (void)0; - } -#ifdef JPEG_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_JPEG && - t2p->tiff_photometric == PHOTOMETRIC_YCBCR) - { - k = checkMultiply64(TIFFNumberOfStrips(input), TIFFStripSize(input), - t2p); - } - else -#endif - { - k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p); - if (t2p->tiff_planar == PLANARCONFIG_SEPARATE) - { - k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p); - } - } - if (k == 0) - { - /* Assume we had overflow inside TIFFScanlineSize */ - t2p->t2p_error = T2P_ERR_ERROR; - } - - t2p_set_tiff_datasize(t2p, k); - - return; -} - -/* - This function returns the necessary size of a data buffer to contain the - raw or uncompressed image data from the input TIFF for a tile of a page. -*/ - -void t2p_read_tiff_size_tile(T2P *t2p, TIFF *input, ttile_t tile) -{ - - uint64_t *tbc = NULL; - uint16_t edge = 0; -#ifdef JPEG_SUPPORT - unsigned char *jpt; -#endif - uint64_t k; - - edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile); - edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile); - - if (t2p->pdf_transcode == T2P_TRANSCODE_RAW) - { - if (edge -#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) - && !(t2p->pdf_compression == T2P_COMPRESS_JPEG) -#endif - ) - { - t2p->tiff_datasize = TIFFTileSize(input); - if (t2p->tiff_datasize == 0) - { - /* Assume we had overflow inside TIFFTileSize */ - t2p->t2p_error = T2P_ERR_ERROR; - } - return; - } - else - { - TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc); - if (!tbc) - { - t2p->t2p_error = T2P_ERR_ERROR; - t2p_set_tiff_datasize(t2p, 0); - return; - } - k = tbc[tile]; -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - k = checkAdd64(k, 2048, t2p); - } -#endif -#ifdef JPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - uint32_t count = 0; - if (TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) - { - if (count > 4) - { - k = checkAdd64(k, count, t2p); - /* Coverity Scan false positive because here k>4 */ - /* coverity[overflow_const:FALSE] */ - k -= 2; /* don't use EOI of header or SOI of tile */ - } - } - } -#endif - t2p_set_tiff_datasize(t2p, k); - return; - } - } - k = TIFFTileSize(input); - if (t2p->tiff_planar == PLANARCONFIG_SEPARATE) - { - k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p); - } - if (k == 0) - { - /* Assume we had overflow inside TIFFTileSize */ - t2p->t2p_error = T2P_ERR_ERROR; - } - - t2p_set_tiff_datasize(t2p, k); - - return; -} - -/* - * This functions returns a non-zero value when the tile is on the right edge - * and does not have full imaged tile width. - */ - -int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile) -{ - - if (((tile + 1) % tiles.tiles_tilecountx == 0) && - (tiles.tiles_edgetilewidth != 0)) - { - return (1); - } - else - { - return (0); - } -} - -/* - * This functions returns a non-zero value when the tile is on the bottom edge - * and does not have full imaged tile length. - */ - -int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile) -{ - - if (((tile + 1) > (tiles.tiles_tilecount - tiles.tiles_tilecountx)) && - (tiles.tiles_edgetilelength != 0)) - { - return (1); - } - else - { - return (0); - } -} - -/* - * This function returns a non-zero value when the tile is a right edge tile - * or a bottom edge tile. - */ - -int t2p_tile_is_edge(T2P_TILES tiles, ttile_t tile) -{ - - return (t2p_tile_is_right_edge(tiles, tile) | - t2p_tile_is_bottom_edge(tiles, tile)); -} - -/* - This function returns a non-zero value when the tile is a right edge - tile and a bottom edge tile. -*/ - -int t2p_tile_is_corner_edge(T2P_TILES tiles, ttile_t tile) -{ - - return (t2p_tile_is_right_edge(tiles, tile) & - t2p_tile_is_bottom_edge(tiles, tile)); -} - -#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) -static const unsigned char jpeg_eof_marker[] = {0xff, 0xd9}; -#endif - -/* - This function reads the raster image data from the input TIFF for an - image and writes the data to the output PDF XObject image dictionary stream. - It returns the amount written or zero on error. -*/ - -tsize_t t2p_readwrite_pdf_image(T2P *t2p, TIFF *input, TIFF *output) -{ - - tsize_t written = 0; - unsigned char *buffer = NULL; - unsigned char *samplebuffer = NULL; - tsize_t bufferoffset = 0; - tsize_t samplebufferoffset = 0; - tsize_t read = 0; - tstrip_t i = 0; - tstrip_t j = 0; - tstrip_t stripcount = 0; - tsize_t stripsize = 0; - tsize_t sepstripcount = 0; - tsize_t sepstripsize = 0; -#ifdef OJPEG_SUPPORT - toff_t inputoffset = 0; - uint16_t h_samp = 1; - uint16_t v_samp = 1; - uint16_t ri = 1; - uint32_t rows = 0; -#endif /* ifdef OJPEG_SUPPORT */ -#ifdef JPEG_SUPPORT - unsigned char *jpt; - float *xfloatp; - uint64_t *sbc; - unsigned char *stripbuffer; - tsize_t striplength = 0; - uint64_t max_striplength = 0; -#endif /* ifdef JPEG_SUPPORT */ - const char mod[] = "t2p_readwrite_pdf_image()"; - tsize_t tsdummy = 0; - - /* Fail if prior error (in particular, can't trust tiff_datasize) */ - if (t2p->t2p_error != T2P_ERR_OK) - return (0); - - if (t2p->pdf_transcode == T2P_TRANSCODE_RAW) - { -#ifdef CCITT_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_G4) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for " - "t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFReadRawStrip(input, 0, (tdata_t)buffer, - t2p->tiff_datasize) < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawStrip() failed"); - _TIFFfree(buffer); - return (0); - } - if (t2p->tiff_fillorder == FILLORDER_LSB2MSB) - { - /* - * make sure is lsb-to-msb - * bit-endianness fill order - */ - TIFFReverseBits(buffer, t2p->tiff_datasize); - } - add_t2pWriteFile_check(output, (tdata_t)buffer, t2p->tiff_datasize, - mod, tsdummy); - _TIFFfree(buffer); - return (t2p->tiff_datasize); - } -#endif /* ifdef CCITT_SUPPORT */ -#ifdef ZIP_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_ZIP) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFReadRawStrip(input, 0, (tdata_t)buffer, - t2p->tiff_datasize) < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawStrip() failed"); - _TIFFfree(buffer); - return (0); - } - if (t2p->tiff_fillorder == FILLORDER_LSB2MSB) - { - TIFFReverseBits(buffer, t2p->tiff_datasize); - } - add_t2pWriteFile_check(output, (tdata_t)buffer, t2p->tiff_datasize, - mod, tsdummy); - _TIFFfree(buffer); - return (t2p->tiff_datasize); - } -#endif /* ifdef ZIP_SUPPORT */ -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - - if (t2p->tiff_dataoffset != 0) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError( - TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (t2p->pdf_ojpegiflength == 0) - { - inputoffset = t2pSeekFile(input, 0, SEEK_CUR); - t2pSeekFile(input, t2p->tiff_dataoffset, SEEK_SET); - t2pReadFile(input, (tdata_t)buffer, t2p->tiff_datasize); - t2pSeekFile(input, inputoffset, SEEK_SET); - add_t2pWriteFile_check(output, (tdata_t)buffer, - t2p->tiff_datasize, mod, tsdummy); - _TIFFfree(buffer); - return (t2p->tiff_datasize); - } - else - { - inputoffset = t2pSeekFile(input, 0, SEEK_CUR); - t2pSeekFile(input, t2p->tiff_dataoffset, SEEK_SET); - bufferoffset = t2pReadFile(input, (tdata_t)buffer, - t2p->pdf_ojpegiflength); - t2p->pdf_ojpegiflength = 0; - t2pSeekFile(input, inputoffset, SEEK_SET); - TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, - &v_samp); - /* The only valid values for h_samp and v_samp are 1, 2 - * or 4. Cf tif_jpeg.c line 960. However just a simple check - * to avoid division by zero below. */ - if (h_samp == 0 || h_samp > 4 || v_samp == 0 || v_samp > 4) - { - TIFFError( - TIFF2PDF_MODULE, - "YCBRSUBSAMPLING value outside allowed range (1, " - "2, 4). h_samp= %" PRIu16 " v_samp= %" PRIu16, - h_samp, v_samp); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - buffer[bufferoffset++] = 0xff; - buffer[bufferoffset++] = 0xdd; - buffer[bufferoffset++] = 0x00; - buffer[bufferoffset++] = 0x04; - h_samp *= 8; - v_samp *= 8; - ri = (t2p->tiff_width + h_samp - 1) / h_samp; - TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows); - ri *= (rows + v_samp - 1) / v_samp; - buffer[bufferoffset++] = (ri >> 8) & 0xff; - buffer[bufferoffset++] = ri & 0xff; - stripcount = TIFFNumberOfStrips(input); - for (i = 0; i < stripcount; i++) - { - tsize_t retTIFFReadRawStrip; - if (i != 0) - { - buffer[bufferoffset++] = 0xff; - buffer[bufferoffset++] = (0xd0 | ((i - 1) % 8)); - } - retTIFFReadRawStrip = TIFFReadRawStrip( - input, i, - (tdata_t) & - (((unsigned char *)buffer)[bufferoffset]), - -1); - if (retTIFFReadRawStrip < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawStrip()"); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += retTIFFReadRawStrip; - } - add_t2pWriteFile_check(output, (tdata_t)buffer, - bufferoffset, mod, tsdummy); - _TIFFfree(buffer); - return (bufferoffset); - } - } - else - { - if (!t2p->pdf_ojpegdata) - { - TIFFError(TIFF2PDF_MODULE, - "No support for OJPEG image %s with bad tables", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError( - TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, - t2p->pdf_ojpegdatalength); - bufferoffset = t2p->pdf_ojpegdatalength; - stripcount = TIFFNumberOfStrips(input); - for (i = 0; i < stripcount; i++) - { - tsize_t retTIFFReadRawStrip; - if (i != 0) - { - buffer[bufferoffset++] = 0xff; - buffer[bufferoffset++] = (0xd0 | ((i - 1) % 8)); - } - retTIFFReadRawStrip = TIFFReadRawStrip( - input, i, - (tdata_t) & (((unsigned char *)buffer)[bufferoffset]), - -1); - if (retTIFFReadRawStrip < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawStrip()"); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += retTIFFReadRawStrip; - } - add_t2pWriteFile_check(output, (tdata_t)buffer, bufferoffset, - mod, tsdummy); - if (!((buffer[bufferoffset - 1] == 0xd9) && - (buffer[bufferoffset - 2] == 0xff))) - { - add_t2pWriteFile_check(output, (tdata_t)jpeg_eof_marker, - sizeof(jpeg_eof_marker), mod, - tsdummy); - } - _TIFFfree(buffer); - return (bufferoffset); -#if 0 - /* - This hunk of code removed code is clearly - mis-placed and we are not sure where it - should be (if anywhere) - */ - TIFFError(TIFF2PDF_MODULE, - "No support for OJPEG image %s with no JPEG File Interchange offset", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return(0); -#endif - } - } -#endif /* ifdef OJPEG_SUPPORT */ -#ifdef JPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - uint32_t count = 0; - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) - { - if (count > 4) - { - _TIFFmemcpy(buffer, jpt, count); - bufferoffset += count - 2; - } - } - stripcount = TIFFNumberOfStrips(input); - TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); - for (i = 0; i < stripcount; i++) - { - if (sbc[i] > max_striplength) - max_striplength = sbc[i]; - } - stripbuffer = (unsigned char *)_TIFFmalloc(max_striplength); - if (stripbuffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" PRId64 - " bytes of memory for t2p_readwrite_pdf_image, %s", - max_striplength, TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(stripbuffer, 0, max_striplength); - for (i = 0; i < stripcount; i++) - { - striplength = - TIFFReadRawStrip(input, i, (tdata_t)stripbuffer, -1); - if (striplength < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawStrip() failed"); - _TIFFfree(samplebuffer); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (!t2p_process_jpeg_strip(stripbuffer, &striplength, buffer, - t2p->tiff_datasize, &bufferoffset, - i, t2p->tiff_length)) - { - TIFFError(TIFF2PDF_MODULE, - "Can't process JPEG data in input file %s", - TIFFFileName(input)); - _TIFFfree(samplebuffer); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - } - add_t2pWriteFile_check(output, (tdata_t)buffer, bufferoffset, mod, - tsdummy); - add_t2pWriteFile_check(output, (tdata_t)jpeg_eof_marker, - sizeof(jpeg_eof_marker), mod, tsdummy); - _TIFFfree(stripbuffer); - _TIFFfree(buffer); - return (bufferoffset); - } -#endif /* ifdef JPEG_SUPPORT */ - (void)0; - } - - if (t2p->pdf_sample == T2P_SAMPLE_NOTHING) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - stripsize = TIFFStripSize(input); - stripcount = TIFFNumberOfStrips(input); - for (i = 0; i < stripcount; i++) - { - read = TIFFReadEncodedStrip( - input, i, (tdata_t)&buffer[bufferoffset], - TIFFmin(stripsize, t2p->tiff_datasize - bufferoffset)); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding strip %" PRIu32 " of %s", i, - TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += read; - } - } - else - { - if (t2p->pdf_sample & T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG) - { - - sepstripsize = TIFFStripSize(input); - sepstripcount = TIFFNumberOfStrips(input); - - stripsize = sepstripsize * t2p->tiff_samplesperpixel; - stripcount = _TIFFCastSSizeToUInt32(sepstripcount / - t2p->tiff_samplesperpixel, - "t2p_readwrite_pdf_image"); - - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - samplebuffer = (unsigned char *)_TIFFmalloc(stripsize); - if (samplebuffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(buffer); - return (0); - } - for (i = 0; i < stripcount; i++) - { - samplebufferoffset = 0; - for (j = 0; j < t2p->tiff_samplesperpixel; j++) - { - read = TIFFReadEncodedStrip( - input, i + j * stripcount, - (tdata_t) & (samplebuffer[samplebufferoffset]), - TIFFmin(sepstripsize, stripsize - samplebufferoffset)); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding strip %" PRIu32 " of %s", - i + j * stripcount, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(samplebuffer); - _TIFFfree(buffer); - return (0); - } - samplebufferoffset += read; - } - t2p_sample_planar_separate_to_contig( - t2p, &(buffer[bufferoffset]), samplebuffer, - samplebufferoffset); - bufferoffset += samplebufferoffset; - } - _TIFFfree(samplebuffer); - goto dataready; - } - - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - stripsize = TIFFStripSize(input); - stripcount = TIFFNumberOfStrips(input); - for (i = 0; i < stripcount; i++) - { - read = TIFFReadEncodedStrip( - input, i, (tdata_t)&buffer[bufferoffset], - TIFFmin(stripsize, t2p->tiff_datasize - bufferoffset)); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding strip %" PRIu32 " of %s", i, - TIFFFileName(input)); - _TIFFfree(samplebuffer); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += read; - } - - if (t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE) - { - // FIXME: overflow? - samplebuffer = (unsigned char *)_TIFFrealloc( - (tdata_t)buffer, - t2p->tiff_datasize * t2p->tiff_samplesperpixel); - if (samplebuffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(buffer); - return (0); - } - else - { - buffer = samplebuffer; - t2p->tiff_datasize *= t2p->tiff_samplesperpixel; - } - t2p_sample_realize_palette(t2p, buffer); - } - - if (t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB) - { - t2p->tiff_datasize = t2p_sample_rgba_to_rgb( - (tdata_t)buffer, t2p->tiff_width * t2p->tiff_length); - } - - if (t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB) - { - t2p->tiff_datasize = t2p_sample_rgbaa_to_rgb( - (tdata_t)buffer, t2p->tiff_width * t2p->tiff_length); - } - - if (t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB) - { - samplebuffer = (unsigned char *)_TIFFrealloc( - (tdata_t)buffer, t2p->tiff_width * t2p->tiff_length * 4); - if (samplebuffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(buffer); - return (0); - } - else - { - buffer = samplebuffer; - } - if (!TIFFReadRGBAImageOriented(input, t2p->tiff_width, - t2p->tiff_length, (uint32_t *)buffer, - ORIENTATION_TOPLEFT, 0)) - { - TIFFError(TIFF2PDF_MODULE, - "Can't use TIFFReadRGBAImageOriented to extract RGB " - "image from %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - t2p->tiff_datasize = t2p_sample_abgr_to_rgb( - (tdata_t)buffer, t2p->tiff_width * t2p->tiff_length); - } - - if (t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED) - { - t2p->tiff_datasize = t2p_sample_lab_signed_to_unsigned( - (tdata_t)buffer, t2p->tiff_width * t2p->tiff_length); - } - } - -dataready: - - t2p_disable(output); - TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric); - TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample); - TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel); - TIFFSetField(output, TIFFTAG_IMAGEWIDTH, t2p->tiff_width); - TIFFSetField(output, TIFFTAG_IMAGELENGTH, t2p->tiff_length); - TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, t2p->tiff_length); - TIFFSetField(output, TIFFTAG_PLANARCONFIG, t2p->tiff_planar); - TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); - - switch (t2p->pdf_compression) - { - case T2P_COMPRESS_NONE: - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - break; -#ifdef CCITT_SUPPORT - case T2P_COMPRESS_G4: - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); - break; -#endif /* ifdef CCITT_SUPPORT */ -#ifdef JPEG_SUPPORT - case T2P_COMPRESS_JPEG: - if (t2p->tiff_photometric == PHOTOMETRIC_YCBCR) - { - uint16_t hor = 0, ver = 0; - if (TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &hor, &ver) != - 0) - { - if (hor != 0 && ver != 0) - { - TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, hor, - ver); - } - } - if (TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, - &xfloatp) != 0) - { - TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp); - } - } - if (TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG) == - 0) - { - TIFFError( - TIFF2PDF_MODULE, - "Unable to use JPEG compression for input %s and output %s", - TIFFFileName(input), TIFFFileName(output)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, 0); - - if (t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)) - { - TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); - if (t2p->tiff_photometric != PHOTOMETRIC_YCBCR) - { - TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, - JPEGCOLORMODE_RGB); - } - else - { - TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, - JPEGCOLORMODE_RAW); - } - } - if (t2p->pdf_colorspace & T2P_CS_GRAY) - { - (void)0; - } - if (t2p->pdf_colorspace & T2P_CS_CMYK) - { - (void)0; - } - if (t2p->pdf_defaultcompressionquality != 0) - { - TIFFSetField(output, TIFFTAG_JPEGQUALITY, - t2p->pdf_defaultcompressionquality); - } - - break; -#endif /* ifdef JPEG_SUPPORT */ -#ifdef ZIP_SUPPORT - case T2P_COMPRESS_ZIP: - TIFFSetField(output, TIFFTAG_COMPRESSION, - COMPRESSION_ADOBE_DEFLATE); - if (t2p->pdf_defaultcompressionquality % 100 != 0) - { - TIFFSetField(output, TIFFTAG_PREDICTOR, - t2p->pdf_defaultcompressionquality % 100); - } - if (t2p->pdf_defaultcompressionquality / 100 != 0) - { - TIFFSetField(output, TIFFTAG_ZIPQUALITY, - (t2p->pdf_defaultcompressionquality / 100)); - } - break; -#endif /* ifdef ZIP_SUPPORT */ - default: - break; - } - - t2p_enable(output); - t2p->outputwritten = 0; -#ifdef JPEG_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_JPEG && - t2p->tiff_photometric == PHOTOMETRIC_YCBCR) - { - bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer, - stripsize * stripcount); - } - else -#endif /* ifdef JPEG_SUPPORT */ - { - bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer, - t2p->tiff_datasize); - } - if (buffer != NULL) - { - _TIFFfree(buffer); - buffer = NULL; - } - - if (bufferoffset == (tsize_t)-1) - { - TIFFError(TIFF2PDF_MODULE, - "Error writing encoded strip to output PDF %s", - TIFFFileName(output)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - - written = t2p->outputwritten; - return (written); -} - -/* - * This function reads the raster image data from the input TIFF for an image - * tile and writes the data to the output PDF XObject image dictionary stream - * for the tile. It returns the amount written or zero on error. - */ - -tsize_t t2p_readwrite_pdf_image_tile(T2P *t2p, TIFF *input, TIFF *output, - ttile_t tile) -{ - - uint16_t edge = 0; - tsize_t written = 0; - unsigned char *buffer = NULL; - tsize_t bufferoffset = 0; - unsigned char *samplebuffer = NULL; - tsize_t samplebufferoffset = 0; - tsize_t read = 0; - uint16_t i = 0; - ttile_t tilecount = 0; - /* tsize_t tilesize=0; */ - ttile_t septilecount = 0; - tsize_t septilesize = 0; -#ifdef JPEG_SUPPORT - unsigned char *jpt; - float *xfloatp; - tmsize_t xint = 0; -#endif - const char mod[] = "t2p_readwrite_pdf_image_tile()"; - tsize_t tsdummy = 0; - - /* Fail if prior error (in particular, can't trust tiff_datasize) */ - if (t2p->t2p_error != T2P_ERR_OK) - return (0); - - edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile); - edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile); - - if ((t2p->pdf_transcode == T2P_TRANSCODE_RAW) && - ((edge == 0) -#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) - || (t2p->pdf_compression == T2P_COMPRESS_JPEG) -#endif - )) - { -#ifdef CCITT_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_G4) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFReadRawTile(input, tile, (tdata_t)buffer, - t2p->tiff_datasize) < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawTile() failed"); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (t2p->tiff_fillorder == FILLORDER_LSB2MSB) - { - TIFFReverseBits(buffer, t2p->tiff_datasize); - } - add_t2pWriteFile_check(output, (tdata_t)buffer, t2p->tiff_datasize, - mod, tsdummy); - _TIFFfree(buffer); - return (t2p->tiff_datasize); - } -#endif -#ifdef ZIP_SUPPORT - if (t2p->pdf_compression == T2P_COMPRESS_ZIP) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFReadRawTile(input, tile, (tdata_t)buffer, - t2p->tiff_datasize) < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawTile() failed"); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (t2p->tiff_fillorder == FILLORDER_LSB2MSB) - { - TIFFReverseBits(buffer, t2p->tiff_datasize); - } - add_t2pWriteFile_check(output, (tdata_t)buffer, t2p->tiff_datasize, - mod, tsdummy); - _TIFFfree(buffer); - return (t2p->tiff_datasize); - } -#endif -#ifdef OJPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_OJPEG) - { - tsize_t retTIFFReadRawTile; - if (!t2p->pdf_ojpegdata) - { - TIFFError(TIFF2PDF_MODULE, - "No support for OJPEG image %s with " - "bad tables", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength); - if (edge != 0) - { - if (t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], - tile)) - { - buffer[7] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength >> - 8) & - 0xff; - buffer[8] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength) & - 0xff; - } - if (t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], - tile)) - { - buffer[9] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth >> - 8) & - 0xff; - buffer[10] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth) & - 0xff; - } - } - bufferoffset = t2p->pdf_ojpegdatalength; - retTIFFReadRawTile = TIFFReadRawTile( - input, tile, - (tdata_t) & (((unsigned char *)buffer)[bufferoffset]), -1); - if (retTIFFReadRawTile < 0) - { - TIFFError(TIFF2PDF_MODULE, "TIFFReadRawTile() failed"); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += retTIFFReadRawTile; - add_t2pWriteFile_check(output, (tdata_t)buffer, bufferoffset, mod, - tsdummy); - add_t2pWriteFile_check(output, (tdata_t)jpeg_eof_marker, - sizeof(jpeg_eof_marker), mod, tsdummy); - _TIFFfree(buffer); - return (bufferoffset); - } -#endif -#ifdef JPEG_SUPPORT - if (t2p->tiff_compression == COMPRESSION_JPEG) - { - unsigned char table_end[2]; - uint32_t count = 0; - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - if (TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) - { - if (count > 4) - { - tsize_t retTIFFReadRawTile; - /* Ignore EOI marker of JpegTables */ - _TIFFmemcpy(buffer, jpt, count - 2); - bufferoffset += count - 2; - /* Store last 2 bytes of the JpegTables */ - table_end[0] = buffer[bufferoffset - 2]; - table_end[1] = buffer[bufferoffset - 1]; - xint = bufferoffset; - bufferoffset -= 2; - retTIFFReadRawTile = TIFFReadRawTile( - input, tile, - (tdata_t) & (((unsigned char *)buffer)[bufferoffset]), - -1); - if (retTIFFReadRawTile < 0) - { - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - bufferoffset += retTIFFReadRawTile; - /* Overwrite SOI marker of image scan with previously */ - /* saved end of JpegTables */ - buffer[xint - 2] = table_end[0]; - buffer[xint - 1] = table_end[1]; - } - } - add_t2pWriteFile_check(output, (tdata_t)buffer, bufferoffset, mod, - tsdummy); - _TIFFfree(buffer); - return (bufferoffset); - } -#endif - (void)0; - } - - if (t2p->pdf_sample == T2P_SAMPLE_NOTHING) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory for " - "t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - - read = TIFFReadEncodedTile(input, tile, (tdata_t)&buffer[bufferoffset], - t2p->tiff_datasize); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding tile %" PRIu32 " of %s", tile, - TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - } - else - { - - if (t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG) - { - septilesize = TIFFTileSize(input); - septilecount = TIFFNumberOfTiles(input); - /* tilesize=septilesize*t2p->tiff_samplesperpixel; */ - tilecount = septilecount / t2p->tiff_samplesperpixel; - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - samplebuffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (samplebuffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(samplebuffer, 0, t2p->tiff_datasize); - samplebufferoffset = 0; - for (i = 0; i < t2p->tiff_samplesperpixel; i++) - { - read = TIFFReadEncodedTile( - input, tile + i * tilecount, - (tdata_t) & (samplebuffer[samplebufferoffset]), - septilesize); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding tile %" PRIu32 " of %s", - tile + i * tilecount, TIFFFileName(input)); - _TIFFfree(samplebuffer); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - samplebufferoffset += read; - } - t2p_sample_planar_separate_to_contig( - t2p, &(buffer[bufferoffset]), samplebuffer, samplebufferoffset); - bufferoffset += samplebufferoffset; - _TIFFfree(samplebuffer); - } - - if (buffer == NULL) - { - buffer = (unsigned char *)_TIFFmalloc(t2p->tiff_datasize); - if (buffer == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SSIZE_FORMAT - " bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - memset(buffer, 0, t2p->tiff_datasize); - read = - TIFFReadEncodedTile(input, tile, (tdata_t)&buffer[bufferoffset], - t2p->tiff_datasize); - if (read == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error on decoding tile %" PRIu32 " of %s", tile, - TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - } - - if (t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB) - { - t2p->tiff_datasize = t2p_sample_rgba_to_rgb( - (tdata_t)buffer, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth * - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - - if (t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB) - { - t2p->tiff_datasize = t2p_sample_rgbaa_to_rgb( - (tdata_t)buffer, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth * - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - - if (t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB) - { - TIFFError(TIFF2PDF_MODULE, - "No support for YCbCr to RGB in tile for %s", - TIFFFileName(input)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - - if (t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED) - { - t2p->tiff_datasize = t2p_sample_lab_signed_to_unsigned( - (tdata_t)buffer, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth * - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - } - - if (t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) != 0) - { - if ((uint64_t)t2p->tiff_datasize < - (uint64_t)TIFFTileRowSize(input) * - (uint64_t)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength) - { - /* we don't know how to handle PLANARCONFIG_CONTIG, - * PHOTOMETRIC_YCBCR with 3 samples per pixel */ - TIFFWarning(TIFF2PDF_MODULE, - "Don't know how to collapse tile to the left"); - } - else - { - t2p_tile_collapse_left( - buffer, TIFFTileRowSize(input), - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - } - - t2p_disable(output); - TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric); - TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample); - TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel); - if (t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0) - { - TIFFSetField(output, TIFFTAG_IMAGEWIDTH, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); - } - else - { - TIFFSetField(output, TIFFTAG_IMAGEWIDTH, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); - } - if (t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0) - { - TIFFSetField(output, TIFFTAG_IMAGELENGTH, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - else - { - TIFFSetField(output, TIFFTAG_IMAGELENGTH, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); - TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); - } - TIFFSetField(output, TIFFTAG_PLANARCONFIG, t2p->tiff_planar); - TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); - - switch (t2p->pdf_compression) - { - case T2P_COMPRESS_NONE: - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); - break; -#ifdef CCITT_SUPPORT - case T2P_COMPRESS_G4: - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); - break; -#endif -#ifdef JPEG_SUPPORT - case T2P_COMPRESS_JPEG: - if (t2p->tiff_photometric == PHOTOMETRIC_YCBCR) - { - uint16_t hor = 0, ver = 0; - if (TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &hor, &ver) != - 0) - { - if (hor != 0 && ver != 0) - { - TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, hor, - ver); - } - } - if (TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, - &xfloatp) != 0) - { - TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp); - } - } - TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG); - TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, - 0); /* JPEGTABLESMODE_NONE */ - if (t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)) - { - TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); - if (t2p->tiff_photometric != PHOTOMETRIC_YCBCR) - { - TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, - JPEGCOLORMODE_RGB); - } - else - { - TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, - JPEGCOLORMODE_RAW); - } - } - if (t2p->pdf_colorspace & T2P_CS_GRAY) - { - (void)0; - } - if (t2p->pdf_colorspace & T2P_CS_CMYK) - { - (void)0; - } - if (t2p->pdf_defaultcompressionquality != 0) - { - TIFFSetField(output, TIFFTAG_JPEGQUALITY, - t2p->pdf_defaultcompressionquality); - } - break; -#endif -#ifdef ZIP_SUPPORT - case T2P_COMPRESS_ZIP: - TIFFSetField(output, TIFFTAG_COMPRESSION, - COMPRESSION_ADOBE_DEFLATE); - if (t2p->pdf_defaultcompressionquality % 100 != 0) - { - TIFFSetField(output, TIFFTAG_PREDICTOR, - t2p->pdf_defaultcompressionquality % 100); - } - if (t2p->pdf_defaultcompressionquality / 100 != 0) - { - TIFFSetField(output, TIFFTAG_ZIPQUALITY, - (t2p->pdf_defaultcompressionquality / 100)); - } - break; -#endif - default: - break; - } - - if (TIFFStripSize(output) > t2p->tiff_datasize) - { - TIFFError(TIFF2PDF_MODULE, - "Size mismatch input %" PRId64 ", output %" PRId64, - (int64_t)t2p->tiff_datasize, (int64_t)TIFFStripSize(output)); - _TIFFfree(buffer); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - t2p_enable(output); - t2p->outputwritten = 0; - bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer, - TIFFStripSize(output)); - if (buffer != NULL) - { - _TIFFfree(buffer); - buffer = NULL; - } - if (bufferoffset == -1) - { - TIFFError(TIFF2PDF_MODULE, - "Error writing encoded tile to output PDF %s", - TIFFFileName(output)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - - written = t2p->outputwritten; - - return (written); -} - -#ifdef OJPEG_SUPPORT -int t2p_process_ojpeg_tables(T2P *t2p, TIFF *input) -{ - uint16_t proc = 0; - void *q; - uint32_t q_length = 0; - void *dc; - uint32_t dc_length = 0; - void *ac; - uint32_t ac_length = 0; - uint16_t *lp; - uint16_t *pt; - uint16_t h_samp = 1; - uint16_t v_samp = 1; - unsigned char *ojpegdata; - uint16_t table_count; - uint32_t offset_table; - uint32_t offset_ms_l; - uint32_t code_count; - uint32_t i = 0; - uint32_t dest = 0; - uint16_t ri = 0; - uint32_t rows = 0; - - if (!TIFFGetField(input, TIFFTAG_JPEGPROC, &proc)) - { - TIFFError(TIFF2PDF_MODULE, "Missing JPEGProc field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (proc != JPEGPROC_BASELINE && proc != JPEGPROC_LOSSLESS) - { - TIFFError(TIFF2PDF_MODULE, "Bad JPEGProc field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (!TIFFGetField(input, TIFFTAG_JPEGQTABLES, &q_length, &q)) - { - TIFFError(TIFF2PDF_MODULE, - "Missing JPEGQTables field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (q_length < (64U * t2p->tiff_samplesperpixel)) - { - TIFFError(TIFF2PDF_MODULE, "Bad JPEGQTables field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (!TIFFGetField(input, TIFFTAG_JPEGDCTABLES, &dc_length, &dc)) - { - TIFFError(TIFF2PDF_MODULE, - "Missing JPEGDCTables field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (proc == JPEGPROC_BASELINE) - { - if (!TIFFGetField(input, TIFFTAG_JPEGACTABLES, &ac_length, &ac)) - { - TIFFError(TIFF2PDF_MODULE, - "Missing JPEGACTables field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - } - else - { - if (!TIFFGetField(input, TIFFTAG_JPEGLOSSLESSPREDICTORS, &lp)) - { - TIFFError(TIFF2PDF_MODULE, - "Missing JPEGLosslessPredictors field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - if (!TIFFGetField(input, TIFFTAG_JPEGPOINTTRANSFORM, &pt)) - { - TIFFError(TIFF2PDF_MODULE, - "Missing JPEGPointTransform field in OJPEG image %s", - TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - } - if (!TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp)) - { - h_samp = 1; - v_samp = 1; - } - if (t2p->pdf_ojpegdata != NULL) - { - _TIFFfree(t2p->pdf_ojpegdata); - t2p->pdf_ojpegdata = NULL; - } - t2p->pdf_ojpegdata = _TIFFmalloc(2048); - if (t2p->pdf_ojpegdata == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %u bytes of memory for " - "t2p_process_ojpeg_tables, %s", - 2048u, TIFFFileName(input)); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - _TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048); - t2p->pdf_ojpegdatalength = 0; - table_count = t2p->tiff_samplesperpixel; - if (proc == JPEGPROC_BASELINE) - { - if (table_count > 2) - table_count = 2; - } - ojpegdata = (unsigned char *)t2p->pdf_ojpegdata; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xd8; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - if (proc == JPEGPROC_BASELINE) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xc0; - } - else - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xc3; - } - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x00; - ojpegdata[t2p->pdf_ojpegdatalength++] = (8 + 3 * t2p->tiff_samplesperpixel); - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_bitspersample & 0xff); - if (TIFFIsTiled(input)) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength >> 8) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth >> 8) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = - (t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth) & 0xff; - } - else - { - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_length >> 8) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_length) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_width >> 8) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_width) & 0xff; - } - ojpegdata[t2p->pdf_ojpegdatalength++] = (t2p->tiff_samplesperpixel & 0xff); - for (i = 0; i < t2p->tiff_samplesperpixel; i++) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = i; - if (i == 0) - { - ojpegdata[t2p->pdf_ojpegdatalength] |= h_samp << 4 & 0xf0; - ; - ojpegdata[t2p->pdf_ojpegdatalength++] |= v_samp & 0x0f; - } - else - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x11; - } - ojpegdata[t2p->pdf_ojpegdatalength++] = i; - } - for (dest = 0; dest < t2p->tiff_samplesperpixel; dest++) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xdb; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x00; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x43; - ojpegdata[t2p->pdf_ojpegdatalength++] = dest; - _TIFFmemcpy(&(ojpegdata[t2p->pdf_ojpegdatalength++]), - &(((unsigned char *)q)[64 * dest]), 64); - t2p->pdf_ojpegdatalength += 64; - } - offset_table = 0; - for (dest = 0; dest < table_count; dest++) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xc4; - offset_ms_l = t2p->pdf_ojpegdatalength; - t2p->pdf_ojpegdatalength += 2; - ojpegdata[t2p->pdf_ojpegdatalength++] = dest & 0x0f; - _TIFFmemcpy(&(ojpegdata[t2p->pdf_ojpegdatalength]), - &(((unsigned char *)dc)[offset_table]), 16); - code_count = 0; - offset_table += 16; - for (i = 0; i < 16; i++) - { - code_count += ojpegdata[t2p->pdf_ojpegdatalength++]; - } - ojpegdata[offset_ms_l] = ((19 + code_count) >> 8) & 0xff; - ojpegdata[offset_ms_l + 1] = (19 + code_count) & 0xff; - _TIFFmemcpy(&(ojpegdata[t2p->pdf_ojpegdatalength]), - &(((unsigned char *)dc)[offset_table]), code_count); - offset_table += code_count; - t2p->pdf_ojpegdatalength += code_count; - } - if (proc == JPEGPROC_BASELINE) - { - offset_table = 0; - for (dest = 0; dest < table_count; dest++) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xc4; - offset_ms_l = t2p->pdf_ojpegdatalength; - t2p->pdf_ojpegdatalength += 2; - ojpegdata[t2p->pdf_ojpegdatalength] |= 0x10; - ojpegdata[t2p->pdf_ojpegdatalength++] |= dest & 0x0f; - _TIFFmemcpy(&(ojpegdata[t2p->pdf_ojpegdatalength]), - &(((unsigned char *)ac)[offset_table]), 16); - code_count = 0; - offset_table += 16; - for (i = 0; i < 16; i++) - { - code_count += ojpegdata[t2p->pdf_ojpegdatalength++]; - } - ojpegdata[offset_ms_l] = ((19 + code_count) >> 8) & 0xff; - ojpegdata[offset_ms_l + 1] = (19 + code_count) & 0xff; - _TIFFmemcpy(&(ojpegdata[t2p->pdf_ojpegdatalength]), - &(((unsigned char *)ac)[offset_table]), code_count); - offset_table += code_count; - t2p->pdf_ojpegdatalength += code_count; - } - } - if (TIFFNumberOfStrips(input) > 1) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xdd; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x00; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x04; - h_samp *= 8; - v_samp *= 8; - ri = (t2p->tiff_width + h_samp - 1) / h_samp; - TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows); - ri *= (rows + v_samp - 1) / v_samp; - ojpegdata[t2p->pdf_ojpegdatalength++] = (ri >> 8) & 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = ri & 0xff; - } - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xff; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0xda; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x00; - ojpegdata[t2p->pdf_ojpegdatalength++] = (6 + 2 * t2p->tiff_samplesperpixel); - ojpegdata[t2p->pdf_ojpegdatalength++] = t2p->tiff_samplesperpixel & 0xff; - for (i = 0; i < t2p->tiff_samplesperpixel; i++) - { - ojpegdata[t2p->pdf_ojpegdatalength++] = i & 0xff; - if (proc == JPEGPROC_BASELINE) - { - ojpegdata[t2p->pdf_ojpegdatalength] |= - (((i > (table_count - 1U)) ? (table_count - 1U) : i) << 4U) & - 0xf0; - ojpegdata[t2p->pdf_ojpegdatalength++] |= - ((i > (table_count - 1U)) ? (table_count - 1U) : i) & 0x0f; - } - else - { - ojpegdata[t2p->pdf_ojpegdatalength++] = (i << 4) & 0xf0; - } - } - if (proc == JPEGPROC_BASELINE) - { - t2p->pdf_ojpegdatalength++; - ojpegdata[t2p->pdf_ojpegdatalength++] = 0x3f; - t2p->pdf_ojpegdatalength++; - } - else - { - ojpegdata[t2p->pdf_ojpegdatalength++] = (lp[0] & 0xff); - t2p->pdf_ojpegdatalength++; - ojpegdata[t2p->pdf_ojpegdatalength++] = (pt[0] & 0x0f); - } - - return (1); -} -#endif - -#ifdef JPEG_SUPPORT -int t2p_process_jpeg_strip(unsigned char *strip, tsize_t *striplength, - unsigned char *buffer, tsize_t buffersize, - tsize_t *bufferoffset, tstrip_t no, uint32_t height) -{ - - tsize_t i = 0; - - while (i < *striplength) - { - tsize_t datalen; - uint16_t v_samp; - uint16_t h_samp; - int j; - int ncomp; - - /* marker header: one or more FFs */ - if (strip[i] != 0xff) - return (0); - i++; - while (i < *striplength && strip[i] == 0xff) - i++; - if (i >= *striplength) - return (0); - /* SOI is the only pre-SOS marker without a length word */ - if (strip[i] == 0xd8) - datalen = 0; - else - { - if ((*striplength - i) <= 2) - return (0); - datalen = (strip[i + 1] << 8) | strip[i + 2]; - if (datalen < 2 || datalen >= (*striplength - i)) - return (0); - } - switch (strip[i]) - { - case 0xd8: /* SOI - start of image */ - if (*bufferoffset + 2 > buffersize) - return (0); - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i - 1]), 2); - *bufferoffset += 2; - break; - case 0xc0: /* SOF0 */ - case 0xc1: /* SOF1 */ - case 0xc3: /* SOF3 */ - case 0xc9: /* SOF9 */ - case 0xca: /* SOF10 */ - if (no == 0) - { - if (*bufferoffset + datalen + 2 + 6 > buffersize) - return (0); - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i - 1]), - datalen + 2); - if (*bufferoffset + 9 >= buffersize) - return (0); - ncomp = buffer[*bufferoffset + 9]; - if (ncomp < 1 || ncomp > 4) - return (0); - v_samp = 1; - h_samp = 1; - if (*bufferoffset + 11 + 3 * (ncomp - 1) >= buffersize) - return (0); - for (j = 0; j < ncomp; j++) - { - uint16_t samp = buffer[*bufferoffset + 11 + (3 * j)]; - if ((samp >> 4) > h_samp) - h_samp = (samp >> 4); - if ((samp & 0x0f) > v_samp) - v_samp = (samp & 0x0f); - } - v_samp *= 8; - h_samp *= 8; - buffer[*bufferoffset + 5] = - (unsigned char)((height >> 8) & 0xff); - buffer[*bufferoffset + 6] = (unsigned char)(height & 0xff); - *bufferoffset += datalen + 2; - } - break; - case 0xc4: /* DHT */ - case 0xdb: /* DQT */ - if (*bufferoffset + datalen + 2 > buffersize) - return (0); - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i - 1]), - datalen + 2); - *bufferoffset += datalen + 2; - break; - case 0xda: /* SOS */ - if (no == 0) - { - if (*bufferoffset + datalen + 2 > buffersize) - return (0); - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i - 1]), - datalen + 2); - *bufferoffset += datalen + 2; - } - else - { - if (*bufferoffset + 2 > buffersize) - return (0); - buffer[(*bufferoffset)++] = 0xff; - buffer[(*bufferoffset)++] = - (unsigned char)(0xd0 | ((no - 1) % 8)); - } - i += datalen + 1; - /* copy remainder of strip */ - if (*bufferoffset + *striplength - i > buffersize) - return (0); - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), - *striplength - i); - *bufferoffset += *striplength - i; - return (1); - default: - /* ignore any other marker */ - break; - } - i += datalen + 1; - } - - /* failed to find SOS marker */ - return (0); -} -#endif - -/* - This functions converts a tilewidth x tilelength buffer of samples into - an edgetilewidth x tilelength buffer of samples. -*/ -void t2p_tile_collapse_left(tdata_t buffer, tsize_t scanwidth, - uint32_t tilewidth, uint32_t edgetilewidth, - uint32_t tilelength) -{ - - uint32_t i; - tsize_t edgescanwidth = 0; - - edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1)) / tilewidth; - for (i = 0; i < tilelength; i++) - { - /* We use memmove() since there can be overlaps in src and dst buffers - * for the first items */ - memmove(&(((char *)buffer)[edgescanwidth * i]), - &(((char *)buffer)[scanwidth * i]), edgescanwidth); - } - - return; -} - -/* - * This function calls TIFFWriteDirectory on the output after blanking its - * output by replacing the read, write, and seek procedures with empty - * implementations, then it replaces the original implementations. - */ - -void t2p_write_advance_directory(T2P *t2p, TIFF *output) -{ - t2p_disable(output); - if (!TIFFWriteDirectory(output)) - { - TIFFError(TIFF2PDF_MODULE, - "Error writing virtual directory to output PDF %s", - TIFFFileName(output)); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - t2p_enable(output); - return; -} - -tsize_t t2p_sample_planar_separate_to_contig(T2P *t2p, unsigned char *buffer, - unsigned char *samplebuffer, - tsize_t samplebuffersize) -{ - - tsize_t stride = 0; - tsize_t i = 0; - tsize_t j = 0; - - stride = samplebuffersize / t2p->tiff_samplesperpixel; - for (i = 0; i < stride; i++) - { - for (j = 0; j < t2p->tiff_samplesperpixel; j++) - { - buffer[i * t2p->tiff_samplesperpixel + j] = - samplebuffer[i + j * stride]; - } - } - - return (samplebuffersize); -} - -tsize_t t2p_sample_realize_palette(T2P *t2p, unsigned char *buffer) -{ - - uint32_t sample_count = 0; - uint16_t component_count = 0; - uint32_t palette_offset = 0; - uint32_t sample_offset = 0; - uint32_t i = 0; - uint32_t j = 0; - size_t data_size; - sample_count = t2p->tiff_width * t2p->tiff_length; - component_count = t2p->tiff_samplesperpixel; - data_size = TIFFSafeMultiply(size_t, sample_count, component_count); - if ((data_size == 0U) || (t2p->tiff_datasize < 0) || - (data_size > (size_t)t2p->tiff_datasize)) - { - TIFFError(TIFF2PDF_MODULE, - "Error: sample_count * component_count > t2p->tiff_datasize"); - t2p->t2p_error = T2P_ERR_ERROR; - return 1; - } - - for (i = sample_count; i > 0; i--) - { - palette_offset = buffer[i - 1] * component_count; - sample_offset = (i - 1) * component_count; - if (palette_offset + component_count > t2p->pdf_palettesize) - { - TIFFError(TIFF2PDF_MODULE, - "Error: palette_offset + component_count > " - "t2p->pdf_palettesize"); - return 1; - } - for (j = 0; j < component_count; j++) - { - buffer[sample_offset + j] = t2p->pdf_palette[palette_offset + j]; - } - } - - return (0); -} - -/* - This functions converts in place a buffer of ABGR interleaved data - into RGB interleaved data, discarding A. -*/ - -tsize_t t2p_sample_abgr_to_rgb(tdata_t data, uint32_t samplecount) -{ - uint32_t i = 0; - uint32_t sample = 0; - - for (i = 0; i < samplecount; i++) - { - sample = ((uint32_t *)data)[i]; - ((char *)data)[i * 3] = (char)(sample & 0xff); - ((char *)data)[i * 3 + 1] = (char)((sample >> 8) & 0xff); - ((char *)data)[i * 3 + 2] = (char)((sample >> 16) & 0xff); - } - - return (i * 3); -} - -/* - * This functions converts in place a buffer of RGBA interleaved data - * into RGB interleaved data, discarding A. - */ - -tsize_t t2p_sample_rgbaa_to_rgb(tdata_t data, uint32_t samplecount) -{ - uint32_t i; - - /* For the 3 first samples, there is overlap between source and - * destination, so use memmove(). - * See http://bugzilla.maptools.org/show_bug.cgi?id=2577 - */ - for (i = 0; i < 3 && i < samplecount; i++) - memmove((uint8_t *)data + i * 3, (uint8_t *)data + i * 4, 3); - for (; i < samplecount; i++) - memcpy((uint8_t *)data + i * 3, (uint8_t *)data + i * 4, 3); - - return (i * 3); -} - -/* - * This functions converts in place a buffer of RGBA interleaved data - * into RGB interleaved data, adding 255-A to each component sample. - */ - -tsize_t t2p_sample_rgba_to_rgb(tdata_t data, uint32_t samplecount) -{ - uint32_t i = 0; - uint32_t sample = 0; - uint8_t alpha = 0; - - for (i = 0; i < samplecount; i++) - { - sample = ((uint32_t *)data)[i]; - alpha = (uint8_t)((255 - ((sample >> 24) & 0xff))); - ((uint8_t *)data)[i * 3 + 2] = (uint8_t)((sample >> 16) & 0xff) + alpha; - ((uint8_t *)data)[i * 3 + 1] = (uint8_t)((sample >> 8) & 0xff) + alpha; - ((uint8_t *)data)[i * 3] = (uint8_t)(sample & 0xff) + alpha; - } - - return (i * 3); -} - -/* - This function converts the a and b samples of Lab data from signed - to unsigned. -*/ - -tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t buffer, uint32_t samplecount) -{ - - uint32_t i = 0; - - for (i = 0; i < samplecount; i++) - { - if ((((unsigned char *)buffer)[(i * 3) + 1] & 0x80) != 0) - { - ((unsigned char *)buffer)[(i * 3) + 1] = - (unsigned char)(0x80 + ((char *)buffer)[(i * 3) + 1]); - } - else - { - ((unsigned char *)buffer)[(i * 3) + 1] |= 0x80; - } - if ((((unsigned char *)buffer)[(i * 3) + 2] & 0x80) != 0) - { - ((unsigned char *)buffer)[(i * 3) + 2] = - (unsigned char)(0x80 + ((char *)buffer)[(i * 3) + 2]); - } - else - { - ((unsigned char *)buffer)[(i * 3) + 2] |= 0x80; - } - } - - return (samplecount * 3); -} - -/* - This function writes the PDF header to output. -*/ - -tsize_t t2p_write_pdf_header(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[16]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_header()"; - - buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%" PRIu16 ".%" PRIu16 " ", - (uint16_t)(t2p->pdf_majorversion & 0xff), - (uint16_t)(t2p->pdf_minorversion & 0xff)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n%\342\343\317\323\n", 7, mod, - written); - - return (written); -} - -/* - This function writes the beginning of a PDF object to output. -*/ - -tsize_t t2p_write_pdf_obj_start(uint32_t number, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_obj_start()"; - - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, number); - check_snprintf_ret((T2P *)NULL, buflen, buffer); - add_t2pWriteFile_check_2(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check_2(output, (tdata_t) " 0 obj\n", 7, mod, written); - - return (written); -} - -/* - This function writes the end of a PDF object to output. -*/ - -tsize_t t2p_write_pdf_obj_end(TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t) "endobj\n", 7, - "t2p_write_pdf_obj_end()", written); - - return (written); -} - -/* - This function writes a PDF name object to output. -*/ - -tsize_t t2p_write_pdf_name(const unsigned char *name, TIFF *output) -{ - - tsize_t written = 0; - uint32_t i = 0; - char buffer[64]; - uint16_t nextchar = 0; - size_t namelen = 0; - const char mod[] = "t2p_write_pdf_name()"; - - namelen = strlen((char *)name); - if (namelen > 126) - { - namelen = 126; - } - add_t2pWriteFile_check_2(output, (tdata_t) "/", 1, mod, written); - for (i = 0; i < namelen; i++) - { - if (((unsigned char)name[i]) < 0x21) - { - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, written); - nextchar = 1; - } - if (((unsigned char)name[i]) > 0x7E) - { - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, written); - nextchar = 1; - } - if (nextchar == 0) - { - switch (name[i]) - { - case 0x23: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x25: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x28: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x29: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x2F: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x3C: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x3E: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x5B: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x5D: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x7B: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - case 0x7D: - snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); - buffer[sizeof(buffer) - 1] = '\0'; - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 3, mod, - written); - break; - default: - add_t2pWriteFile_check_2(output, (tdata_t)&name[i], 1, mod, - written); - } - } - nextchar = 0; - } - add_t2pWriteFile_check_2(output, (tdata_t) " ", 1, mod, written); - - return (written); -} - -/* - * This function writes a PDF string object to output. - */ - -tsize_t t2p_write_pdf_string(const char *pdfstr, TIFF *output) -{ - tsize_t written = 0; - uint32_t i = 0; - char buffer[64]; - size_t len = 0; - const char mod[] = "t2p_write_pdf_string()"; - - len = strlen(pdfstr); - add_t2pWriteFile_check_2(output, (tdata_t) "(", 1, mod, written); - for (i = 0; i < len; i++) - { - if ((pdfstr[i] & 0x80) || (pdfstr[i] == 127) || (pdfstr[i] < 32)) - { - snprintf(buffer, sizeof(buffer), "\\%.3o", - ((unsigned char)pdfstr[i])); - add_t2pWriteFile_check_2(output, (tdata_t)buffer, 4, mod, written); - } - else - { - switch (pdfstr[i]) - { - /* These cases are not reached. They are handled above. - case 0x08: - written += t2pWriteFile(output, (tdata_t) "\\b", 2); - break; - case 0x09: - written += t2pWriteFile(output, (tdata_t) "\\t", 2); - break; - case 0x0A: - written += t2pWriteFile(output, (tdata_t) "\\n", 2); - break; - case 0x0C: - written += t2pWriteFile(output, (tdata_t) "\\f", 2); - break; - case 0x0D: - written += t2pWriteFile(output, (tdata_t) "\\r", 2); - break; - */ - case 0x28: - add_t2pWriteFile_check_2(output, (tdata_t) "\\(", 2, mod, - written); - break; - case 0x29: - add_t2pWriteFile_check_2(output, (tdata_t) "\\)", 2, mod, - written); - break; - case 0x5C: - add_t2pWriteFile_check_2(output, (tdata_t) "\\\\", 2, mod, - written); - break; - default: - add_t2pWriteFile_check_2(output, (tdata_t)&pdfstr[i], 1, - mod, written); - } - } - } - add_t2pWriteFile_check_2(output, (tdata_t) ") ", 1, mod, written); - - return (written); -} - -/* - This function writes a buffer of data to output. -*/ - -tsize_t t2p_write_pdf_stream(tdata_t buffer, tsize_t len, TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t)buffer, len, - "t2p_write_pdf_stream", written); - - return (written); -} - -/* - This functions writes the beginning of a PDF stream to output. -*/ - -tsize_t t2p_write_pdf_stream_start(TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t) "stream\n", 7, - "t2p_write_pdf_stream_start", written); - - return (written); -} - -/* - This function writes the end of a PDF stream to output. -*/ - -tsize_t t2p_write_pdf_stream_end(TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t) "\nendstream\n", 11, - "t2p_write_pdf_stream_end", written); - - return (written); -} - -/* - This function writes a stream dictionary for a PDF stream to output. -*/ - -tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32_t number, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_stream_dict()"; - - add_t2pWriteFile_check_2(output, (tdata_t) "/Length ", 8, mod, written); - if (len != 0) - { - written += t2p_write_pdf_stream_length(len, output); - } - else - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, number); - check_snprintf_ret((T2P *)NULL, buflen, buffer); - add_t2pWriteFile_check_2(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check_2(output, (tdata_t) " 0 R \n", 6, mod, written); - } - - return (written); -} - -/* - This functions writes the beginning of a PDF stream dictionary to - output. -*/ - -tsize_t t2p_write_pdf_stream_dict_start(TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t) "<< \n", 4, - "t2p_write_pdf_stream_dict_start", written); - - return (written); -} - -/* - This function writes the end of a PDF stream dictionary to output. -*/ - -tsize_t t2p_write_pdf_stream_dict_end(TIFF *output) -{ - - tsize_t written = 0; - - add_t2pWriteFile_check_2(output, (tdata_t) " >>\n", 4, - "t2p_write_pdf_stream_dict_end", written); - - return (written); -} - -/* - This function writes a number to output. -*/ - -tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_stream_length()"; - - buflen = snprintf(buffer, sizeof(buffer), "%" TIFF_SSIZE_FORMAT, len); - check_snprintf_ret((T2P *)NULL, buflen, buffer); - add_t2pWriteFile_check_2(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check_2(output, (tdata_t) "\n", 1, mod, written); - - return (written); -} - -/* - * This function writes the PDF Catalog structure to output. - */ - -tsize_t t2p_write_pdf_catalog(T2P *t2p, TIFF *output) -{ - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_catalog()"; - - add_t2pWriteFile_check(output, (tdata_t) "<< \n/Type /Catalog \n/Pages ", - 27, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_pages); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, - TIFFmin((size_t)buflen, sizeof(buffer) - 1), mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R \n", 6, mod, written); - if (t2p->pdf_fitwindow) - { - add_t2pWriteFile_check( - output, (tdata_t) "/ViewerPreferences <>\n", 39, - mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) ">>\n", 3, mod, written); - - return (written); -} - -/* - This function writes the PDF Info structure to output. -*/ - -tsize_t t2p_write_pdf_info(T2P *t2p, TIFF *input, TIFF *output) -{ - tsize_t written = 0; - const char *info; - char buffer[512]; - const char mod[] = "t2p_write_pdf_info()"; - - if (t2p->pdf_datetime[0] == '\0') - t2p_pdf_tifftime(t2p, input); - if (strlen(t2p->pdf_datetime) > 0) - { - add_t2pWriteFile_check(output, (tdata_t) "<< \n/CreationDate ", 18, mod, - written); - written += t2p_write_pdf_string(t2p->pdf_datetime, output); - add_t2pWriteFile_check(output, (tdata_t) "\n/ModDate ", 10, mod, - written); - written += t2p_write_pdf_string(t2p->pdf_datetime, output); - } - add_t2pWriteFile_check(output, (tdata_t) "\n/Producer ", 11, mod, written); - snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", - TIFFLIB_VERSION); - written += t2p_write_pdf_string(buffer, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - if (!t2p->pdf_creator_set) - { - if (TIFFGetField(input, TIFFTAG_SOFTWARE, &info) != 0 && info) - { - strncpy(t2p->pdf_creator, info, sizeof(t2p->pdf_creator) - 1); - t2p->pdf_creator[sizeof(t2p->pdf_creator) - 1] = '\0'; - } - } - if (t2p->pdf_creator[0] != '\0') - { - add_t2pWriteFile_check(output, (tdata_t) "/Creator ", 9, mod, written); - written += t2p_write_pdf_string(t2p->pdf_creator, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - if (!t2p->pdf_author_set) - { - if ((TIFFGetField(input, TIFFTAG_ARTIST, &info) != 0 || - TIFFGetField(input, TIFFTAG_COPYRIGHT, &info) != 0) && - info) - { - strncpy(t2p->pdf_author, info, sizeof(t2p->pdf_author) - 1); - t2p->pdf_author[sizeof(t2p->pdf_author) - 1] = '\0'; - } - } - if (t2p->pdf_author[0] != '\0') - { - add_t2pWriteFile_check(output, (tdata_t) "/Author ", 8, mod, written); - written += t2p_write_pdf_string(t2p->pdf_author, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - if (!t2p->pdf_title_set) - { - if (TIFFGetField(input, TIFFTAG_DOCUMENTNAME, &info) != 0 && info) - { - strncpy(t2p->pdf_title, info, sizeof(t2p->pdf_title) - 1); - t2p->pdf_title[sizeof(t2p->pdf_title) - 1] = '\0'; - } - } - if (t2p->pdf_title[0] != '\0') - { - add_t2pWriteFile_check(output, (tdata_t) "/Title ", 7, mod, written); - written += t2p_write_pdf_string(t2p->pdf_title, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - if (!t2p->pdf_subject_set) - { - if (TIFFGetField(input, TIFFTAG_IMAGEDESCRIPTION, &info) != 0 && info) - { - strncpy(t2p->pdf_subject, info, sizeof(t2p->pdf_subject) - 1); - t2p->pdf_subject[sizeof(t2p->pdf_subject) - 1] = '\0'; - } - } - if (t2p->pdf_subject[0] != '\0') - { - add_t2pWriteFile_check(output, (tdata_t) "/Subject ", 9, mod, written); - written += t2p_write_pdf_string(t2p->pdf_subject, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - if (t2p->pdf_keywords[0] != '\0') - { - add_t2pWriteFile_check(output, (tdata_t) "/Keywords ", 10, mod, - written); - written += t2p_write_pdf_string(t2p->pdf_keywords, output); - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) ">> \n", 4, mod, written); - - return (written); -} - -/* - * This function fills a string of a T2P struct with the current time as a PDF - * date string, it is called by t2p_pdf_tifftime. - */ - -void t2p_pdf_currenttime(T2P *t2p) -{ - struct tm *currenttime; - time_t timenow; - - if (time(&timenow) == (time_t)-1) - { - TIFFError(TIFF2PDF_MODULE, "Can't get the current time: %s", - strerror(errno)); - timenow = (time_t)0; - } - - currenttime = localtime(&timenow); - snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime), - "D:%.4u%.2u%.2u%.2u%.2u%.2u", - TIFFmin((unsigned)currenttime->tm_year + 1900U, 9999U), - TIFFmin((unsigned)currenttime->tm_mon + 1U, 12U), /* 0-11 + 1 */ - TIFFmin((unsigned)currenttime->tm_mday, 31U), /* 1-31 */ - TIFFmin((unsigned)currenttime->tm_hour, 23U), /* 0-23 */ - TIFFmin((unsigned)currenttime->tm_min, 59U), /* 0-59 */ - TIFFmin((unsigned)(currenttime->tm_sec), 60U)); /* 0-60 */ - - return; -} - -/* - * This function fills a string of a T2P struct with the date and time of a - * TIFF file if it exists or the current time as a PDF date string. - */ - -void t2p_pdf_tifftime(T2P *t2p, TIFF *input) -{ - char *datetime; - - if (TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 && - (strlen(datetime) >= 19)) - { - t2p->pdf_datetime[0] = 'D'; - t2p->pdf_datetime[1] = ':'; - t2p->pdf_datetime[2] = datetime[0]; - t2p->pdf_datetime[3] = datetime[1]; - t2p->pdf_datetime[4] = datetime[2]; - t2p->pdf_datetime[5] = datetime[3]; - t2p->pdf_datetime[6] = datetime[5]; - t2p->pdf_datetime[7] = datetime[6]; - t2p->pdf_datetime[8] = datetime[8]; - t2p->pdf_datetime[9] = datetime[9]; - t2p->pdf_datetime[10] = datetime[11]; - t2p->pdf_datetime[11] = datetime[12]; - t2p->pdf_datetime[12] = datetime[14]; - t2p->pdf_datetime[13] = datetime[15]; - t2p->pdf_datetime[14] = datetime[17]; - t2p->pdf_datetime[15] = datetime[18]; - t2p->pdf_datetime[16] = '\0'; - } - else - { - t2p_pdf_currenttime(t2p); - } - - return; -} - -/* - * This function writes a PDF Pages Tree structure to output. - */ -tsize_t t2p_write_pdf_pages(T2P *t2p, TIFF *output) -{ - tsize_t written = 0; - tdir_t i = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_pages()"; - - int page = 0; - add_t2pWriteFile_check(output, (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26, - mod, written); - page = t2p->pdf_pages + 1; - for (i = 0; i < t2p->tiff_pagecount; i++) - { - buflen = snprintf(buffer, sizeof(buffer), "%d", page); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - if (((i + 1) % 8) == 0) - { - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - page += 3; - page += t2p->tiff_pages[i].page_extra; - if (t2p->tiff_pages[i].page_tilecount > 0) - { - page += (2 * t2p->tiff_pages[i].page_tilecount); - } - else - { - page += 2; - } - } - add_t2pWriteFile_check(output, (tdata_t) "] \n/Count ", 10, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, t2p->tiff_pagecount); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " \n>> \n", 6, mod, written); - - return (written); -} - -/* - This function writes a PDF Page structure to output. -*/ -tsize_t t2p_write_pdf_page(uint32_t object, T2P *t2p, TIFF *output) -{ - - unsigned int i = 0; - tsize_t written = 0; - char buffer[256]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_page()"; - - add_t2pWriteFile_check(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24, - mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_pages); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R \n", 6, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/MediaBox [", 11, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%.4f", t2p->pdf_mediabox.x1); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%.4f", t2p->pdf_mediabox.y1); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%.4f", t2p->pdf_mediabox.x2); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%.4f", t2p->pdf_mediabox.y2); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "] \n", 3, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Contents ", 10, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, object + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R \n", 6, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Resources << \n", 15, mod, - written); - if (t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount != 0) - { - add_t2pWriteFile_check(output, (tdata_t) "/XObject <<\n", 12, mod, - written); - for (i = 0; i < t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++) - { - add_t2pWriteFile_check(output, (tdata_t) "/Im", 3, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, - (uint16_t)(t2p->pdf_page + 1u)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "_", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%u", i + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - object + 3u + (2u * i) + - t2p->tiff_pages[t2p->pdf_page].page_extra); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - if (i % 4 == 3) - { - add_t2pWriteFile_check(output, (tdata_t) "\n", 1, mod, written); - } - } - add_t2pWriteFile_check(output, (tdata_t) ">>\n", 3, mod, written); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "/XObject <<\n", 12, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "/Im", 3, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, - (uint16_t)(t2p->pdf_page + 1u)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - object + 3u + (2u * i) + - t2p->tiff_pages[t2p->pdf_page].page_extra); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - add_t2pWriteFile_check(output, (tdata_t) ">>\n", 3, mod, written); - } - if (t2p->tiff_transferfunctioncount != 0) - { - add_t2pWriteFile_check(output, (tdata_t) "/ExtGState <<", 13, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "/GS1 ", 5, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, object + 3u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - add_t2pWriteFile_check(output, (tdata_t) ">> \n", 4, mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) "/ProcSet [ ", 11, mod, written); - if (t2p->pdf_colorspace & T2P_CS_BILEVEL || - t2p->pdf_colorspace & T2P_CS_GRAY) - { - add_t2pWriteFile_check(output, (tdata_t) "/ImageB ", 8, mod, written); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "/ImageC ", 8, mod, written); - if (t2p->pdf_colorspace & T2P_CS_PALETTE) - { - add_t2pWriteFile_check(output, (tdata_t) "/ImageI ", 8, mod, - written); - } - } - add_t2pWriteFile_check(output, (tdata_t) "]\n>>\n>>\n", 8, mod, written); - - return (written); -} - -/* - This function composes the page size and image and tile locations on a - page. -*/ - -void t2p_compose_pdf_page(T2P *t2p) -{ - - uint32_t i = 0; - uint32_t i2 = 0; - T2P_TILE *tiles = NULL; - T2P_BOX *boxp = NULL; - uint32_t tilecountx = 0; - uint32_t tilecounty = 0; - uint32_t tilewidth = 0; - uint32_t tilelength = 0; - int istiled = 0; - float f = 0; - float width_ratio = 0; - float length_ratio = 0; - - t2p->pdf_xres = t2p->tiff_xres; - t2p->pdf_yres = t2p->tiff_yres; - if (t2p->pdf_overrideres) - { - t2p->pdf_xres = t2p->pdf_defaultxres; - t2p->pdf_yres = t2p->pdf_defaultyres; - } - if (t2p->pdf_xres == 0.0) - t2p->pdf_xres = t2p->pdf_defaultxres; - if (t2p->pdf_yres == 0.0) - t2p->pdf_yres = t2p->pdf_defaultyres; - if (t2p->pdf_image_fillpage) - { - width_ratio = t2p->pdf_defaultpagewidth / t2p->tiff_width; - length_ratio = t2p->pdf_defaultpagelength / t2p->tiff_length; - if (width_ratio < length_ratio) - { - t2p->pdf_imagewidth = t2p->pdf_defaultpagewidth; - t2p->pdf_imagelength = t2p->tiff_length * width_ratio; - } - else - { - t2p->pdf_imagewidth = t2p->tiff_width * length_ratio; - t2p->pdf_imagelength = t2p->pdf_defaultpagelength; - } - } - else if (t2p->tiff_resunit != RESUNIT_CENTIMETER /* RESUNIT_NONE and */ - && t2p->tiff_resunit != RESUNIT_INCH) - { /* other cases */ - t2p->pdf_imagewidth = ((float)(t2p->tiff_width)) / t2p->pdf_xres; - t2p->pdf_imagelength = ((float)(t2p->tiff_length)) / t2p->pdf_yres; - } - else - { - t2p->pdf_imagewidth = - ((float)(t2p->tiff_width)) * PS_UNIT_SIZE / t2p->pdf_xres; - t2p->pdf_imagelength = - ((float)(t2p->tiff_length)) * PS_UNIT_SIZE / t2p->pdf_yres; - } - if (t2p->pdf_overridepagesize != 0) - { - t2p->pdf_pagewidth = t2p->pdf_defaultpagewidth; - t2p->pdf_pagelength = t2p->pdf_defaultpagelength; - } - else - { - t2p->pdf_pagewidth = t2p->pdf_imagewidth; - t2p->pdf_pagelength = t2p->pdf_imagelength; - } - t2p->pdf_mediabox.x1 = 0.0; - t2p->pdf_mediabox.y1 = 0.0; - t2p->pdf_mediabox.x2 = t2p->pdf_pagewidth; - t2p->pdf_mediabox.y2 = t2p->pdf_pagelength; - t2p->pdf_imagebox.x1 = 0.0; - t2p->pdf_imagebox.y1 = 0.0; - t2p->pdf_imagebox.x2 = t2p->pdf_imagewidth; - t2p->pdf_imagebox.y2 = t2p->pdf_imagelength; - if (t2p->pdf_overridepagesize != 0) - { - t2p->pdf_imagebox.x1 += - ((t2p->pdf_pagewidth - t2p->pdf_imagewidth) / 2.0F); - t2p->pdf_imagebox.y1 += - ((t2p->pdf_pagelength - t2p->pdf_imagelength) / 2.0F); - t2p->pdf_imagebox.x2 += - ((t2p->pdf_pagewidth - t2p->pdf_imagewidth) / 2.0F); - t2p->pdf_imagebox.y2 += - ((t2p->pdf_pagelength - t2p->pdf_imagelength) / 2.0F); - } - if (t2p->tiff_orientation > 4) - { - f = t2p->pdf_mediabox.x2; - t2p->pdf_mediabox.x2 = t2p->pdf_mediabox.y2; - t2p->pdf_mediabox.y2 = f; - } - istiled = ((t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount == 0) ? 0 : 1; - if (istiled == 0) - { - t2p_compose_pdf_page_orient(&(t2p->pdf_imagebox), - t2p->tiff_orientation); - return; - } - else - { - tilewidth = (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilewidth; - tilelength = (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilelength; - if (tilewidth > INT_MAX || tilelength > INT_MAX || - t2p->tiff_width > INT_MAX - tilewidth || - t2p->tiff_length > INT_MAX - tilelength) - { - TIFFError(TIFF2PDF_MODULE, "Integer overflow"); - t2p->t2p_error = T2P_ERR_ERROR; - return; - } - tilecountx = (t2p->tiff_width + tilewidth - 1) / tilewidth; - (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecountx = tilecountx; - tilecounty = (t2p->tiff_length + tilelength - 1) / tilelength; - (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecounty = tilecounty; - (t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilewidth = - t2p->tiff_width % tilewidth; - (t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilelength = - t2p->tiff_length % tilelength; - tiles = (t2p->tiff_tiles[t2p->pdf_page]).tiles_tiles; - for (i2 = 0; i2 < tilecounty - 1; i2++) - { - for (i = 0; i < tilecountx - 1; i++) - { - boxp = &(tiles[i2 * tilecountx + i].tile_box); - boxp->x1 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * i * tilewidth) / - (float)t2p->tiff_width); - boxp->x2 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * (i + 1) * tilewidth) / - (float)t2p->tiff_width); - boxp->y1 = - t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * (i2 + 1) * tilelength) / - (float)t2p->tiff_length); - boxp->y2 = t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * i2 * tilelength) / - (float)t2p->tiff_length); - } - boxp = &(tiles[i2 * tilecountx + i].tile_box); - boxp->x1 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * i * tilewidth) / - (float)t2p->tiff_width); - boxp->x2 = t2p->pdf_imagebox.x2; - boxp->y1 = t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * (i2 + 1) * tilelength) / - (float)t2p->tiff_length); - boxp->y2 = t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * i2 * tilelength) / - (float)t2p->tiff_length); - } - for (i = 0; i < tilecountx - 1; i++) - { - boxp = &(tiles[i2 * tilecountx + i].tile_box); - boxp->x1 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * i * tilewidth) / - (float)t2p->tiff_width); - boxp->x2 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * (i + 1) * tilewidth) / - (float)t2p->tiff_width); - boxp->y1 = t2p->pdf_imagebox.y1; - boxp->y2 = t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * i2 * tilelength) / - (float)t2p->tiff_length); - } - boxp = &(tiles[i2 * tilecountx + i].tile_box); - boxp->x1 = t2p->pdf_imagebox.x1 + - ((float)(t2p->pdf_imagewidth * i * tilewidth) / - (float)t2p->tiff_width); - boxp->x2 = t2p->pdf_imagebox.x2; - boxp->y1 = t2p->pdf_imagebox.y1; - boxp->y2 = t2p->pdf_imagebox.y2 - - ((float)(t2p->pdf_imagelength * i2 * tilelength) / - (float)t2p->tiff_length); - } - if (t2p->tiff_orientation == 0 || t2p->tiff_orientation == 1) - { - for (i = 0; i < (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount; i++) - { - t2p_compose_pdf_page_orient(&(tiles[i].tile_box), 0); - } - return; - } - for (i = 0; i < (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount; i++) - { - boxp = &(tiles[i].tile_box); - boxp->x1 -= t2p->pdf_imagebox.x1; - boxp->x2 -= t2p->pdf_imagebox.x1; - boxp->y1 -= t2p->pdf_imagebox.y1; - boxp->y2 -= t2p->pdf_imagebox.y1; - if (t2p->tiff_orientation == 2 || t2p->tiff_orientation == 3) - { - boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1; - boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2; - } - if (t2p->tiff_orientation == 3 || t2p->tiff_orientation == 4) - { - boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1; - boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2; - } - if (t2p->tiff_orientation == 8 || t2p->tiff_orientation == 5) - { - boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1; - boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2; - } - if (t2p->tiff_orientation == 5 || t2p->tiff_orientation == 6) - { - boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1; - boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2; - } - if (t2p->tiff_orientation > 4) - { - f = boxp->x1; - boxp->x1 = boxp->y1; - boxp->y1 = f; - f = boxp->x2; - boxp->x2 = boxp->y2; - boxp->y2 = f; - t2p_compose_pdf_page_orient_flip(boxp, t2p->tiff_orientation); - } - else - { - t2p_compose_pdf_page_orient(boxp, t2p->tiff_orientation); - } - } - - return; -} - -void t2p_compose_pdf_page_orient(T2P_BOX *boxp, uint16_t orientation) -{ - - float m1[9]; - float f = 0.0; - - if (boxp->x1 > boxp->x2) - { - f = boxp->x1; - boxp->x1 = boxp->x2; - boxp->x2 = f; - } - if (boxp->y1 > boxp->y2) - { - f = boxp->y1; - boxp->y1 = boxp->y2; - boxp->y2 = f; - } - boxp->mat[0] = m1[0] = boxp->x2 - boxp->x1; - boxp->mat[1] = m1[1] = 0.0; - boxp->mat[2] = m1[2] = 0.0; - boxp->mat[3] = m1[3] = 0.0; - boxp->mat[4] = m1[4] = boxp->y2 - boxp->y1; - boxp->mat[5] = m1[5] = 0.0; - boxp->mat[6] = m1[6] = boxp->x1; - boxp->mat[7] = m1[7] = boxp->y1; - boxp->mat[8] = m1[8] = 1.0; - switch (orientation) - { - case 0: - case 1: - break; - case 2: - boxp->mat[0] = 0.0F - m1[0]; - boxp->mat[6] += m1[0]; - break; - case 3: - boxp->mat[0] = 0.0F - m1[0]; - boxp->mat[4] = 0.0F - m1[4]; - boxp->mat[6] += m1[0]; - boxp->mat[7] += m1[4]; - break; - case 4: - boxp->mat[4] = 0.0F - m1[4]; - boxp->mat[7] += m1[4]; - break; - case 5: - boxp->mat[0] = 0.0F; - boxp->mat[1] = 0.0F - m1[0]; - boxp->mat[3] = 0.0F - m1[4]; - boxp->mat[4] = 0.0F; - boxp->mat[6] += m1[4]; - boxp->mat[7] += m1[0]; - break; - case 6: - boxp->mat[0] = 0.0F; - boxp->mat[1] = 0.0F - m1[0]; - boxp->mat[3] = m1[4]; - boxp->mat[4] = 0.0F; - boxp->mat[7] += m1[0]; - break; - case 7: - boxp->mat[0] = 0.0F; - boxp->mat[1] = m1[0]; - boxp->mat[3] = m1[4]; - boxp->mat[4] = 0.0F; - break; - case 8: - boxp->mat[0] = 0.0F; - boxp->mat[1] = m1[0]; - boxp->mat[3] = 0.0F - m1[4]; - boxp->mat[4] = 0.0F; - boxp->mat[6] += m1[4]; - break; - } - - return; -} - -void t2p_compose_pdf_page_orient_flip(T2P_BOX *boxp, uint16_t orientation) -{ - - float m1[9]; - float f = 0.0; - - if (boxp->x1 > boxp->x2) - { - f = boxp->x1; - boxp->x1 = boxp->x2; - boxp->x2 = f; - } - if (boxp->y1 > boxp->y2) - { - f = boxp->y1; - boxp->y1 = boxp->y2; - boxp->y2 = f; - } - boxp->mat[0] = m1[0] = boxp->x2 - boxp->x1; - boxp->mat[1] = m1[1] = 0.0F; - boxp->mat[2] = m1[2] = 0.0F; - boxp->mat[3] = m1[3] = 0.0F; - boxp->mat[4] = m1[4] = boxp->y2 - boxp->y1; - boxp->mat[5] = m1[5] = 0.0F; - boxp->mat[6] = m1[6] = boxp->x1; - boxp->mat[7] = m1[7] = boxp->y1; - boxp->mat[8] = m1[8] = 1.0F; - switch (orientation) - { - case 5: - boxp->mat[0] = 0.0F; - boxp->mat[1] = 0.0F - m1[4]; - boxp->mat[3] = 0.0F - m1[0]; - boxp->mat[4] = 0.0F; - boxp->mat[6] += m1[0]; - boxp->mat[7] += m1[4]; - break; - case 6: - boxp->mat[0] = 0.0F; - boxp->mat[1] = 0.0F - m1[4]; - boxp->mat[3] = m1[0]; - boxp->mat[4] = 0.0F; - boxp->mat[7] += m1[4]; - break; - case 7: - boxp->mat[0] = 0.0F; - boxp->mat[1] = m1[4]; - boxp->mat[3] = m1[0]; - boxp->mat[4] = 0.0F; - break; - case 8: - boxp->mat[0] = 0.0F; - boxp->mat[1] = m1[4]; - boxp->mat[3] = 0.0F - m1[0]; - boxp->mat[4] = 0.0F; - boxp->mat[6] += m1[0]; - break; - } - - return; -} - -/* - This function writes a PDF Contents stream to output. -*/ - -tsize_t t2p_write_pdf_page_content_stream(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - ttile_t i = 0; - char buffer[512]; - int buflen = 0; - T2P_BOX box; - - if (t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount > 0) - { - for (i = 0; i < t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++) - { - box = t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box; - buflen = snprintf( - buffer, sizeof(buffer), - "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%" PRIu16 "_%" PRIu32 - " Do Q\n", - t2p->tiff_transferfunctioncount ? "/GS1 gs " : "", box.mat[0], - box.mat[1], box.mat[3], box.mat[4], box.mat[6], box.mat[7], - (uint16_t)(t2p->pdf_page + 1u), i + 1u); - check_snprintf_ret(t2p, buflen, buffer); - written += t2p_write_pdf_stream(buffer, buflen, output); - } - } - else - { - box = t2p->pdf_imagebox; - buflen = snprintf( - buffer, sizeof(buffer), - "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%" PRIu16 " Do Q\n", - t2p->tiff_transferfunctioncount ? "/GS1 gs " : "", box.mat[0], - box.mat[1], box.mat[3], box.mat[4], box.mat[6], box.mat[7], - (uint16_t)(t2p->pdf_page + 1u)); - check_snprintf_ret(t2p, buflen, buffer); - written += t2p_write_pdf_stream(buffer, buflen, output); - } - - return (written); -} - -/* - This function writes a PDF Image XObject stream dictionary to output. -*/ - -tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_xobject_stream_dict()"; - - written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount + 1, output); - add_t2pWriteFile_check( - output, (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im", 42, - mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, - (uint16_t)(t2p->pdf_page + 1u)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - if (tile != 0) - { - add_t2pWriteFile_check(output, (tdata_t) "_", 1, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, tile); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) "\n/Width ", 8, mod, written); - if (tile == 0) - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->tiff_width); - } - else - { - if (t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile - 1) != - 0) - { - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); - } - else - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); - } - } - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n/Height ", 9, mod, written); - if (tile == 0) - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->tiff_length); - } - else - { - if (t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile - 1) != - 0) - { - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); - } - else - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - } - } - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n/BitsPerComponent ", 19, mod, - written); - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu16, t2p->tiff_bitspersample); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n/ColorSpace ", 13, mod, - written); - written += t2p_write_pdf_xobject_cs(t2p, output); - if (t2p->pdf_image_interpolate) - add_t2pWriteFile_check(output, (tdata_t) "\n/Interpolate true", 18, mod, - written); - if ((t2p->pdf_switchdecode != 0) -#ifdef CCITT_SUPPORT - && !(t2p->pdf_colorspace & T2P_CS_BILEVEL && - t2p->pdf_compression == T2P_COMPRESS_G4) -#endif - ) - { - written += t2p_write_pdf_xobject_decode(t2p, output); - } - written += t2p_write_pdf_xobject_stream_filter(tile, t2p, output); - - return (written); -} - -/* used to normalize the White Point */ -#define normalizePoint(x, y, z) \ - do \ - { \ - if (y != 0.0F) \ - { \ - x /= y; \ - z /= y; \ - y = 1.0F; \ - } \ - } while (0) - -/* - * This function writes a PDF Image XObject Colorspace name to output. - */ - -tsize_t t2p_write_pdf_xobject_cs(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[128]; - int buflen = 0; - - float X_W = 1.0; - float Y_W = 1.0; - float Z_W = 1.0; - const char mod[] = "t2p_write_pdf_xobject_cs()"; - - if ((t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0) - { - written += t2p_write_pdf_xobject_icccs(t2p, output); - return (written); - } - if ((t2p->pdf_colorspace & T2P_CS_PALETTE) != 0) - { - add_t2pWriteFile_check(output, (tdata_t) "[ /Indexed ", 11, mod, - written); - t2p->pdf_colorspace ^= T2P_CS_PALETTE; - written += t2p_write_pdf_xobject_cs(t2p, output); - t2p->pdf_colorspace |= T2P_CS_PALETTE; - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - (uint32_t)(0x1u << t2p->tiff_bitspersample) - 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " ", 1, mod, written); - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_palettecs); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ]\n", 7, mod, written); - return (written); - } - if (t2p->pdf_colorspace & T2P_CS_BILEVEL) - { - add_t2pWriteFile_check(output, (tdata_t) "/DeviceGray \n", 13, mod, - written); - } - if (t2p->pdf_colorspace & T2P_CS_GRAY) - { - if (t2p->pdf_colorspace & T2P_CS_CALGRAY) - { - written += t2p_write_pdf_xobject_calcs(t2p, output); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "/DeviceGray \n", 13, mod, - written); - } - } - if (t2p->pdf_colorspace & T2P_CS_RGB) - { - if (t2p->pdf_colorspace & T2P_CS_CALRGB) - { - written += t2p_write_pdf_xobject_calcs(t2p, output); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "/DeviceRGB \n", 12, mod, - written); - } - } - if (t2p->pdf_colorspace & T2P_CS_CMYK) - { - add_t2pWriteFile_check(output, (tdata_t) "/DeviceCMYK \n", 13, mod, - written); - } - if (t2p->pdf_colorspace & T2P_CS_LAB) - { - add_t2pWriteFile_check(output, (tdata_t) "[/Lab << \n", 10, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "/WhitePoint ", 12, mod, - written); - X_W = t2p->tiff_whitechromaticities[0]; - Y_W = t2p->tiff_whitechromaticities[1]; - Z_W = 1.0F - (X_W + Y_W); - normalizePoint(X_W, Y_W, Z_W); - buflen = snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, - Y_W, Z_W); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Range ", 7, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n", - t2p->pdf_labrange[0], t2p->pdf_labrange[1], - t2p->pdf_labrange[2], t2p->pdf_labrange[3]); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) ">>] \n", 5, mod, written); - } - - return (written); -} - -tsize_t t2p_write_pdf_transfer(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_transfer()"; - - add_t2pWriteFile_check(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25, - mod, written); - if (t2p->tiff_transferfunctioncount == 1) - { - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->pdf_xrefcount + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "[ ", 2, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->pdf_xrefcount + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->pdf_xrefcount + 2u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->pdf_xrefcount + 3u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R ", 5, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Identity ] ", 12, mod, - written); - } - - add_t2pWriteFile_check(output, (tdata_t) " >> \n", 5, mod, written); - - return (written); -} - -tsize_t t2p_write_pdf_transfer_dict(T2P *t2p, TIFF *output, uint16_t i) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - (void)i; /* XXX */ - const char mod[] = "t2p_write_pdf_transfer_dict()"; - - add_t2pWriteFile_check(output, (tdata_t) "/FunctionType 0 \n", 17, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "/Domain [0.0 1.0] \n", 19, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "/Range [0.0 1.0] \n", 18, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "/Size [%" PRIu16 "] \n", - (uint16_t)(1u << t2p->tiff_bitspersample)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/BitsPerSample 16 \n", 19, mod, - written); - written += t2p_write_pdf_stream_dict( - ((tsize_t)1) << (t2p->tiff_bitspersample + 1), 0, output); - - return (written); -} - -tsize_t t2p_write_pdf_transfer_stream(T2P *t2p, TIFF *output, uint16_t i) -{ - - tsize_t written = 0; - - written += t2p_write_pdf_stream( - t2p->tiff_transferfunction[i], - (((tsize_t)1) << (t2p->tiff_bitspersample + 1)), output); - - return (written); -} - -/* - This function writes a PDF Image XObject Colorspace array to output. -*/ - -tsize_t t2p_write_pdf_xobject_calcs(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[256]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_xobject_calcs()"; - - float X_W = 0.0; - float Y_W = 0.0; - float Z_W = 0.0; - float X_R = 0.0; - float Y_R = 0.0; - float Z_R = 0.0; - float X_G = 0.0; - float Y_G = 0.0; - float Z_G = 0.0; - float X_B = 0.0; - float Y_B = 0.0; - float Z_B = 0.0; - float x_w = 0.0; - float y_w = 0.0; - float z_w = 0.0; - float x_r = 0.0; - float y_r = 0.0; - float x_g = 0.0; - float y_g = 0.0; - float x_b = 0.0; - float y_b = 0.0; - float R = 1.0; - float G = 1.0; - float B = 1.0; - - add_t2pWriteFile_check(output, (tdata_t) "[", 1, mod, written); - if (t2p->pdf_colorspace & T2P_CS_CALGRAY) - { - add_t2pWriteFile_check(output, (tdata_t) "/CalGray ", 9, mod, written); - X_W = t2p->tiff_whitechromaticities[0]; - Y_W = t2p->tiff_whitechromaticities[1]; - Z_W = 1.0F - (X_W + Y_W); - normalizePoint(X_W, Y_W, Z_W); - } - if (t2p->pdf_colorspace & T2P_CS_CALRGB) - { - add_t2pWriteFile_check(output, (tdata_t) "/CalRGB ", 8, mod, written); - x_w = t2p->tiff_whitechromaticities[0]; - y_w = t2p->tiff_whitechromaticities[1]; - x_r = t2p->tiff_primarychromaticities[0]; - y_r = t2p->tiff_primarychromaticities[1]; - x_g = t2p->tiff_primarychromaticities[2]; - y_g = t2p->tiff_primarychromaticities[3]; - x_b = t2p->tiff_primarychromaticities[4]; - y_b = t2p->tiff_primarychromaticities[5]; - z_w = y_w * ((x_g - x_b) * y_r - (x_r - x_b) * y_g + (x_r - x_g) * y_b); - Y_R = (y_r / R) * - ((x_g - x_b) * y_w - (x_w - x_b) * y_g + (x_w - x_g) * y_b) / z_w; - X_R = Y_R * x_r / y_r; - Z_R = Y_R * (((1 - x_r) / y_r) - 1); - Y_G = ((0.0F - (y_g)) / G) * - ((x_r - x_b) * y_w - (x_w - x_b) * y_r + (x_w - x_r) * y_b) / z_w; - X_G = Y_G * x_g / y_g; - Z_G = Y_G * (((1 - x_g) / y_g) - 1); - Y_B = (y_b / B) * - ((x_r - x_g) * y_w - (x_w - x_g) * y_r + (x_w - x_r) * y_g) / z_w; - X_B = Y_B * x_b / y_b; - Z_B = Y_B * (((1 - x_b) / y_b) - 1); - X_W = (X_R * R) + (X_G * G) + (X_B * B); - Y_W = (Y_R * R) + (Y_G * G) + (Y_B * B); - Z_W = (Z_R * R) + (Z_G * G) + (Z_B * B); - normalizePoint(X_W, Y_W, Z_W); - } - add_t2pWriteFile_check(output, (tdata_t) "<< \n", 4, mod, written); - if (t2p->pdf_colorspace & T2P_CS_CALGRAY) - { - add_t2pWriteFile_check(output, (tdata_t) "/WhitePoint ", 12, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, - Y_W, Z_W); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Gamma 2.2 \n", 12, mod, - written); - } - if (t2p->pdf_colorspace & T2P_CS_CALRGB) - { - add_t2pWriteFile_check(output, (tdata_t) "/WhitePoint ", 12, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, - Y_W, Z_W); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Matrix ", 8, mod, written); - buflen = snprintf(buffer, sizeof(buffer), - "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", - X_R, Y_R, Z_R, X_G, Y_G, Z_G, X_B, Y_B, Z_B); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Gamma [2.2 2.2 2.2] \n", 22, - mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) ">>] \n", 5, mod, written); - - return (written); -} - -/* - This function writes a PDF Image XObject Colorspace array to output. -*/ - -tsize_t t2p_write_pdf_xobject_icccs(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_xobject_icccs()"; - - add_t2pWriteFile_check(output, (tdata_t) "[/ICCBased ", 11, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_icccs); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R] \n", 7, mod, written); - - return (written); -} - -tsize_t t2p_write_pdf_xobject_icccs_dict(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_xobject_icccs_dict()"; - - add_t2pWriteFile_check(output, (tdata_t) "/N ", 3, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16 " \n", - t2p->tiff_samplesperpixel); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/Alternate ", 11, mod, written); - t2p->pdf_colorspace ^= T2P_CS_ICCBASED; - written += t2p_write_pdf_xobject_cs(t2p, output); - t2p->pdf_colorspace |= T2P_CS_ICCBASED; - written += t2p_write_pdf_stream_dict(t2p->tiff_iccprofilelength, 0, output); - - return (written); -} - -tsize_t t2p_write_pdf_xobject_icccs_stream(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - - written += - t2p_write_pdf_stream((tdata_t)t2p->tiff_iccprofile, - (tsize_t)t2p->tiff_iccprofilelength, output); - - return (written); -} - -/* - This function writes a palette stream for an indexed color space to - output. -*/ - -tsize_t t2p_write_pdf_xobject_palettecs_stream(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - - written += t2p_write_pdf_stream((tdata_t)t2p->pdf_palette, - (tsize_t)t2p->pdf_palettesize, output); - - return (written); -} - -/* - This function writes a PDF Image XObject Decode array to output. -*/ - -tsize_t t2p_write_pdf_xobject_decode(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - int i = 0; - const char mod[] = "t2p_write_pdf_xobject_decode()"; - - add_t2pWriteFile_check(output, (tdata_t) "/Decode [ ", 10, mod, written); - for (i = 0; i < t2p->tiff_samplesperpixel; i++) - { - add_t2pWriteFile_check(output, (tdata_t) "1 0 ", 4, mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) "]\n", 2, mod, written); - - return (written); -} - -/* - This function writes a PDF Image XObject stream filter name and - parameters to output. -*/ - -tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P *t2p, - TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - const char mod[] = "t2p_write_pdf_xobject_stream_filter()"; - - if (t2p->pdf_compression == T2P_COMPRESS_NONE) - { - return (written); - } - add_t2pWriteFile_check(output, (tdata_t) "/Filter ", 8, mod, written); - switch (t2p->pdf_compression) - { -#ifdef CCITT_SUPPORT - case T2P_COMPRESS_G4: - add_t2pWriteFile_check(output, (tdata_t) "/CCITTFaxDecode ", 16, - mod, written); - add_t2pWriteFile_check(output, (tdata_t) "/DecodeParms ", 13, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) "<< /K -1 ", 9, mod, - written); - if (tile == 0) - { - add_t2pWriteFile_check(output, (tdata_t) "/Columns ", 9, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_width); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " /Rows ", 7, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_length); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - } - else - { - if (t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], - tile - 1) == 0) - { - add_t2pWriteFile_check(output, (tdata_t) "/Columns ", 9, - mod, written); - buflen = snprintf( - buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) "/Columns ", 9, - mod, written); - buflen = snprintf( - buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - } - if (t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], - tile - 1) == 0) - { - add_t2pWriteFile_check(output, (tdata_t) " /Rows ", 7, mod, - written); - buflen = snprintf( - buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - } - else - { - add_t2pWriteFile_check(output, (tdata_t) " /Rows ", 7, mod, - written); - buflen = snprintf( - buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - } - } - if (t2p->pdf_switchdecode == 0) - { - add_t2pWriteFile_check(output, (tdata_t) " /BlackIs1 true ", 16, - mod, written); - } - add_t2pWriteFile_check(output, (tdata_t) ">>\n", 3, mod, written); - break; -#endif -#ifdef JPEG_SUPPORT - case T2P_COMPRESS_JPEG: - add_t2pWriteFile_check(output, (tdata_t) "/DCTDecode ", 11, mod, - written); - - if (t2p->tiff_photometric != PHOTOMETRIC_YCBCR) - { - add_t2pWriteFile_check(output, (tdata_t) "/DecodeParms ", 13, - mod, written); - add_t2pWriteFile_check(output, - (tdata_t) "<< /ColorTransform 1 >>\n", - 24, mod, written); - } - break; -#endif -#ifdef ZIP_SUPPORT - case T2P_COMPRESS_ZIP: - add_t2pWriteFile_check(output, (tdata_t) "/FlateDecode ", 13, mod, - written); - if (t2p->pdf_compressionquality % 100) - { - add_t2pWriteFile_check(output, (tdata_t) "/DecodeParms ", 13, - mod, written); - add_t2pWriteFile_check(output, (tdata_t) "<< /Predictor ", 14, - mod, written); - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu16, - (uint16_t)(t2p->pdf_compressionquality % 100u)); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " /Columns ", 10, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, - t2p->tiff_width); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " /Colors ", 9, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, - t2p->tiff_samplesperpixel); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) " /BitsPerComponent ", - 19, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu16, - t2p->tiff_bitspersample); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, - written); - add_t2pWriteFile_check(output, (tdata_t) ">>\n", 3, mod, - written); - } - break; -#endif - default: - break; - } - - return (written); -} - -/* - This function writes a PDF xref table to output. -*/ - -tsize_t t2p_write_pdf_xreftable(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[64]; - int buflen = 0; - uint32_t i = 0; - const char mod[] = "t2p_write_pdf_xreftable()"; - - add_t2pWriteFile_check(output, (tdata_t) "xref\n0 ", 7, mod, written); - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_xrefcount + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " \n0000000000 65535 f \n", 22, - mod, written); - for (i = 0; i < t2p->pdf_xrefcount; i++) - { - snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n", - (unsigned long)t2p->pdf_xrefoffsets[i]); - add_t2pWriteFile_check(output, (tdata_t)buffer, 20, mod, written); - } - - return (written); -} - -/* - * This function writes a PDF trailer to output. - */ - -tsize_t t2p_write_pdf_trailer(T2P *t2p, TIFF *output) -{ - - tsize_t written = 0; - char buffer[32]; - int buflen = 0; - size_t i = 0; - const char mod[] = "t2p_write_pdf_trailer()"; - - /* Silence CoverityScan warning about bad crypto function */ - /* coverity[dont_call] */ - for (i = 0; i < sizeof(t2p->pdf_fileid) - 8; i += 8) - snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand()); - - add_t2pWriteFile_check(output, (tdata_t) "trailer\n<<\n/Size ", 17, mod, - written); - buflen = - snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_xrefcount + 1u); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n/Root ", 7, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_catalog); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R \n/Info ", 12, mod, written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_info); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) " 0 R \n/ID[<", 11, mod, written); - add_t2pWriteFile_check(output, (tdata_t)t2p->pdf_fileid, - sizeof(t2p->pdf_fileid) - 1, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "><", 2, mod, written); - add_t2pWriteFile_check(output, (tdata_t)t2p->pdf_fileid, - sizeof(t2p->pdf_fileid) - 1, mod, written); - add_t2pWriteFile_check(output, (tdata_t) ">]\n>>\nstartxref\n", 16, mod, - written); - buflen = snprintf(buffer, sizeof(buffer), "%" PRIu32, t2p->pdf_startxref); - check_snprintf_ret(t2p, buflen, buffer); - add_t2pWriteFile_check(output, (tdata_t)buffer, buflen, mod, written); - add_t2pWriteFile_check(output, (tdata_t) "\n%%EOF\n", 7, mod, written); - - return (written); -} - -/* - - This function writes a PDF to a file given a pointer to a TIFF. - - The idea with using a TIFF* as output for a PDF file is that the file - can be created with TIFFClientOpen for memory-mapped use within the TIFF - library, and TIFFWriteEncodedStrip can be used to write compressed data to - the output. The output is not actually a TIFF file, it is a PDF file. - - This function uses only t2pWriteFile and TIFFWriteEncodedStrip to write to - the output TIFF file. When libtiff would otherwise be writing data to the - output file, the write procedure of the TIFF structure is replaced with an - empty implementation. - - The first argument to the function is an initialized and validated T2P - context struct pointer. - - The second argument to the function is the TIFF* that is the input that has - been opened for reading and no other functions have been called upon it. - - The third argument to the function is the TIFF* that is the output that has - been opened for writing. It has to be opened so that it hasn't written any - data to the output. If the output is seekable then it's OK to seek to the - beginning of the file. The function only writes to the output PDF and does - not seek. See the example usage in the main() function. - - TIFF* output = TIFFOpen("output.pdf", "w"); - assert(output != NULL); - - if(output->tif_seekproc != NULL){ - t2pSeekFile(output, (toff_t) 0, SEEK_SET); - } - - This function returns the file size of the output PDF file. On error it - returns zero and the t2p->t2p_error variable is set to T2P_ERR_ERROR. - - After this function completes, call t2p_free on t2p, TIFFClose on input, - and TIFFClose on output. -*/ - -tsize_t t2p_write_pdf(T2P *t2p, TIFF *input, TIFF *output) -{ - - tsize_t written = 0; - ttile_t i2 = 0; - tsize_t streamlen = 0; - uint16_t i = 0; - - t2p_read_tiff_init(t2p, input); - if (t2p->t2p_error != T2P_ERR_OK) - { - return (0); - } - t2p->pdf_xrefoffsets = (uint32_t *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, t2p->pdf_xrefcount, sizeof(uint32_t))); - if (t2p->pdf_xrefoffsets == NULL) - { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %" TIFF_SIZE_FORMAT - " bytes of memory for t2p_write_pdf", - sizeof(uint32_t) * t2p->pdf_xrefcount); - t2p->t2p_error = T2P_ERR_ERROR; - return (written); - } - t2p->pdf_xrefcount = 0; - t2p->pdf_catalog = 1; - t2p->pdf_info = 2; - t2p->pdf_pages = 3; - written += t2p_write_pdf_header(t2p, output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - t2p->pdf_catalog = t2p->pdf_xrefcount; - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_catalog(t2p, output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - t2p->pdf_info = t2p->pdf_xrefcount; - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_info(t2p, input, output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - t2p->pdf_pages = t2p->pdf_xrefcount; - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_pages(t2p, output); - written += t2p_write_pdf_obj_end(output); - for (t2p->pdf_page = 0; t2p->pdf_page < t2p->tiff_pagecount; - t2p->pdf_page++) - { - t2p_read_tiff_data(t2p, input); - if (t2p->t2p_error != T2P_ERR_OK) - { - return (0); - } - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_page(t2p->pdf_xrefcount, t2p, output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount + 1, output); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - streamlen = written; - written += t2p_write_pdf_page_content_stream(t2p, output); - streamlen = written - streamlen; - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_length(streamlen, output); - written += t2p_write_pdf_obj_end(output); - if (t2p->tiff_transferfunctioncount != 0) - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_transfer(t2p, output); - written += t2p_write_pdf_obj_end(output); - for (i = 0; i < t2p->tiff_transferfunctioncount; i++) - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += t2p_write_pdf_transfer_dict(t2p, output, i); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - /* streamlen=written; */ /* value not used */ - written += t2p_write_pdf_transfer_stream(t2p, output, i); - /* streamlen=written-streamlen; */ /* value not used */ - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - } - } - if ((t2p->pdf_colorspace & T2P_CS_PALETTE) != 0) - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - t2p->pdf_palettecs = t2p->pdf_xrefcount; - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += - t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - /* streamlen=written; */ /* value not used */ - written += t2p_write_pdf_xobject_palettecs_stream(t2p, output); - /* streamlen=written-streamlen; */ /* value not used */ - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - } - if ((t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0) - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - t2p->pdf_icccs = t2p->pdf_xrefcount; - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += t2p_write_pdf_xobject_icccs_dict(t2p, output); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - /* streamlen=written; */ /* value not used */ - written += t2p_write_pdf_xobject_icccs_stream(t2p, output); - /* streamlen=written-streamlen; */ /* value not used */ - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - } - if (t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount != 0) - { - for (i2 = 0; i2 < t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; - i2++) - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += - t2p_write_pdf_xobject_stream_dict(i2 + 1, t2p, output); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - streamlen = written; - t2p_read_tiff_size_tile(t2p, input, i2); - if (t2p->tiff_maxdatasize && - (t2p->tiff_datasize > t2p->tiff_maxdatasize)) - { - TIFFError(TIFF2PDF_MODULE, - "Allocation of %" PRIu64 - " bytes is forbidden. Limit is %" PRIu64 - ". Use -m option to change limit", - (uint64_t)t2p->tiff_datasize, - (uint64_t)t2p->tiff_maxdatasize); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2); - t2p_write_advance_directory(t2p, output); - if (t2p->t2p_error != T2P_ERR_OK) - { - return (0); - } - streamlen = written - streamlen; - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_length(streamlen, output); - written += t2p_write_pdf_obj_end(output); - } - } - else - { - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_dict_start(output); - written += t2p_write_pdf_xobject_stream_dict(0, t2p, output); - written += t2p_write_pdf_stream_dict_end(output); - written += t2p_write_pdf_stream_start(output); - streamlen = written; - t2p_read_tiff_size(t2p, input); - if (t2p->tiff_maxdatasize && - (t2p->tiff_datasize > t2p->tiff_maxdatasize)) - { - TIFFError(TIFF2PDF_MODULE, - "Allocation of %" PRIu64 - " bytes is forbidden. Limit is %" PRIu64 - ". Use -m option to change limit", - (uint64_t)t2p->tiff_datasize, - (uint64_t)t2p->tiff_maxdatasize); - t2p->t2p_error = T2P_ERR_ERROR; - return (0); - } - written += t2p_readwrite_pdf_image(t2p, input, output); - t2p_write_advance_directory(t2p, output); - if (t2p->t2p_error != T2P_ERR_OK) - { - return (0); - } - streamlen = written - streamlen; - written += t2p_write_pdf_stream_end(output); - written += t2p_write_pdf_obj_end(output); - t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++] = - _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); - written += t2p_write_pdf_stream_length(streamlen, output); - written += t2p_write_pdf_obj_end(output); - } - } - t2p->pdf_startxref = _TIFFCastSSizeToUInt32(written, "t2p_write_pdf"); - written += t2p_write_pdf_xreftable(t2p, output); - written += t2p_write_pdf_trailer(t2p, output); - t2p_disable(output); - - return (written); -} diff --git a/third_party/libtiff/tools/tiff2ps.c b/third_party/libtiff/tools/tiff2ps.c deleted file mode 100644 index 9e163ab..0000000 --- a/third_party/libtiff/tools/tiff2ps.c +++ /dev/null @@ -1,3486 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include /* for atof */ -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -/* - * Revision history - * 2013-Jan-21 - * Richard Nolde: Fix bug in auto rotate option code. Once a - * rotation angle was set by the auto rotate check, it was - * retained for all pages that followed instead of being - * retested for each page. - * - * 2010-Sep-17 - * Richard Nolde: Reinstate code from Feb 2009 that never got - * accepted into CVS with major modifications to handle -H and -W - * options. Replaced original PlaceImage function with several - * new functions that make support for multiple output pages - * from a single image easier to understand. Added additional - * warning messages for incompatible command line options. - * Add new command line options to specify PageOrientation - * Document Structuring Comment for landscape or portrait - * and code to determine the values from output width and height - * if not specified on the command line. - * Add new command line option to specify document creator - * as an alterntive to the string "tiff2ps" following model - * of patch submitted by Thomas Jarosch for specifying a - * document title which is also supported now. - * - * 2009-Feb-11 - * Richard Nolde: Added support for rotations of 90, 180, 270 - * and auto using -r <90|180|270|auto>. Auto picks the best - * fit for the image on the specified paper size (eg portrait - * or landscape) if -h or -w is specified. Rotation is in - * degrees counterclockwise since that is how Postscript does - * it. The auto opption rotates the image 90 degrees ccw to - * produce landscape if that is a better fit than portrait. - * - * Cleaned up code in TIFF2PS and broke into smaller functions - * to simplify rotations. - * - * Identified incompatible options and returned errors, eg - * -i for imagemask operator is only available for Level2 or - * Level3 Postscript in the current implementation since there - * is a difference in the way the operands are called for Level1 - * and there is no function to provide the Level1 version. - * -H was not handled properly if -h and/or -w were specified. - * It should only clip the masked images if the scaled image - * exceeds the maxPageHeight specified with -H. - * - * New design allows for all of the following combinations: - * Conversion of TIFF to Postscript with optional rotations - * of 90, 180, 270, or auto degrees counterclockwise - * Conversion of TIFF to Postscript with entire image scaled - * to maximum of values specified with -h or -w while - * maintaining aspect ratio. Same rotations apply. - * Conversion of TIFF to Postscript with clipping of output - * viewport to height specified with -H, producing multiple - * pages at this height and original width as needed. - * Same rotations apply. - * Conversion of TIFF to Postscript with image scaled to - * maximum specified by -h and -w and the resulting scaled - * image is presented in an output viewport clipped by -H height. - * The same rotations apply. - * - * Added maxPageWidth option using -W flag. MaxPageHeight and - * MaxPageWidth are mutually exclusive since the aspect ratio - * cannot be maintained if you set both. - * Rewrote PlaceImage to allow maxPageHeight and maxPageWidth - * options to work with values smaller or larger than the - * physical paper size and still preserve the aspect ratio. - * This is accomplished by creating multiple pages across - * as well as down if need be. - * - * 2001-Mar-21 - * I (Bruce A. Mallett) added this revision history comment ;) - * - * Fixed PS_Lvl2page() code which outputs non-ASCII85 raw - * data. Moved test for when to output a line break to - * *after* the output of a character. This just serves - * to fix an eye-nuisance where the first line of raw - * data was one character shorter than subsequent lines. - * - * Added an experimental ASCII85 encoder which can be used - * only when there is a single buffer of bytes to be encoded. - * This version is much faster at encoding a straight-line - * buffer of data because it can avoid a lot of the loop - * overhead of the byte-by-byte version. To use this version - * you need to define EXP_ASCII85ENCODER (experimental ...). - * - * Added bug fix given by Michael Schmidt to PS_Lvl2page() - * in which an end-of-data marker ('>') was not being output - * when producing non-ASCII85 encoded PostScript Level 2 - * data. - * - * Fixed PS_Lvl2colorspace() so that it no longer assumes that - * a TIFF having more than 2 planes is a CMYK. This routine - * no longer looks at the samples per pixel but instead looks - * at the "photometric" value. This change allows support of - * CMYK TIFFs. - * - * Modified the PostScript L2 imaging loop so as to test if - * the input stream is still open before attempting to do a - * flushfile on it. This was done because some RIPs close - * the stream after doing the image operation. - * - * Got rid of the realloc() being done inside a loop in the - * PSRawDataBW() routine. The code now walks through the - * byte-size array outside the loop to determine the largest - * size memory block that will be needed. - * - * Added "-m" switch to ask tiff2ps to, where possible, use the - * "imagemask" operator instead of the "image" operator. - * - * Added the "-i #" switch to allow interpolation to be disabled. - * - * Unrolled a loop or two to improve performance. - */ - -/* - * Define EXP_ASCII85ENCODER if you want to use an experimental - * version of the ASCII85 encoding routine. The advantage of - * using this routine is that tiff2ps will convert to ASCII85 - * encoding at between 3 and 4 times the speed as compared to - * using the old (non-experimental) encoder. The disadvantage - * is that you will be using a new (and unproven) encoding - * routine. So user beware, you have been warned! - */ - -#define EXP_ASCII85ENCODER - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -int ascii85_g = FALSE; /* use ASCII85 encoding */ -int interpolate = TRUE; /* interpolate level2 image */ -int level2 = FALSE; /* generate PostScript level 2 */ -int level3 = FALSE; /* generate PostScript level 3 */ -int printAll = FALSE; /* print all images in file */ -int generateEPSF = TRUE; /* generate Encapsulated PostScript */ -int PSduplex = FALSE; /* enable duplex printing */ -int PStumble = FALSE; /* enable top edge binding */ -int PSavoiddeadzone = TRUE; /* enable avoiding printer deadzone */ -double maxPageHeight = - 0; /* maximum height to select from image and print per page */ -double maxPageWidth = - 0; /* maximum width to select from image and print per page */ -double splitOverlap = 0; /* amount for split pages to overlag */ -int rotation_g = 0; /* optional value for rotation angle */ -int auto_rotate_g = 0; /* rotate image for best fit on the page */ -char *filename = NULL; /* input filename */ -char *title = NULL; /* optional document title string */ -char *creator = NULL; /* optional document creator string */ -char pageOrientation[12]; /* set optional PageOrientation DSC to Landscape or - Portrait */ -int useImagemask = FALSE; /* Use imagemask instead of image operator */ -uint16_t res_unit = 0; /* Resolution units: 2 - inches, 3 - cm */ - -/* - * ASCII85 Encoding Support. - */ -unsigned char ascii85buf[10]; -int ascii85count; -int ascii85breaklen; - -int TIFF2PS(FILE *, TIFF *, double, double, double, double, int); -void PSpage(FILE *, TIFF *, uint32_t, uint32_t); -void PSColorContigPreamble(FILE *, uint32_t, uint32_t, int); -void PSColorSeparatePreamble(FILE *, uint32_t, uint32_t, int); -void PSDataColorContig(FILE *, TIFF *, uint32_t, uint32_t, int); -void PSDataColorSeparate(FILE *, TIFF *, uint32_t, uint32_t, int); -void PSDataPalette(FILE *, TIFF *, uint32_t, uint32_t); -void PSDataBW(FILE *, TIFF *, uint32_t, uint32_t); -void PSRawDataBW(FILE *, TIFF *, uint32_t, uint32_t); -void Ascii85Init(void); -void Ascii85Put(unsigned char code, FILE *fd); -void Ascii85Flush(FILE *fd); -void PSHead(FILE *, double, double, double, double); -void PSTail(FILE *, int); -int psStart(FILE *, int, int, int *, double *, double, double, double, double, - double, double, double, double, double, double); -int psPageSize(FILE *, int, double, double, double, double, double, double); -int psRotateImage(FILE *, int, double, double, double, double); -int psMaskImage(FILE *, TIFF *, int, int, int *, double, double, double, double, - double, double, double, double, double); -int psScaleImage(FILE *, double, int, int, double, double, double, double, - double, double); -int get_viewport(double, double, double, double, double *, double *, int); -int exportMaskedImage(FILE *, double, double, double, double, int, int, double, - double, double, int, int); - -#if defined(EXP_ASCII85ENCODER) -tsize_t Ascii85EncodeBlock(uint8_t *ascii85_p, unsigned f_eod, - const uint8_t *raw_p, tsize_t raw_l); -#endif - -static void usage(int); - -/** - * This custom malloc function enforce a maximum allocation size - */ -static void *limitMalloc(tmsize_t s) -{ - /* tmsize_t is signed and _TIFFmalloc() converts s to size_t. Therefore - * check for negative s. */ - if (maxMalloc && ((s > maxMalloc) || (s < 0))) - { - fprintf(stderr, - "MemoryLimitError: allocation of %" TIFF_SSIZE_FORMAT - " bytes is forbidden. Limit is %" TIFF_SSIZE_FORMAT ".\n", - s, maxMalloc); - fprintf(stderr, " use -M option to change limit.\n"); - return NULL; - } - return _TIFFmalloc(s); -} - -int main(int argc, char *argv[]) -{ - int dirnum = -1, c, np = 0; - int centered = 0; - double bottommargin = 0; - double leftmargin = 0; - double pageWidth = 0; - double pageHeight = 0; - uint32_t diroff = 0; -#if !HAVE_DECL_OPTARG - extern char *optarg; - extern int optind; -#endif - FILE *output = stdout; - - pageOrientation[0] = '\0'; - - while ((c = getopt(argc, argv, - "b:d:h:H:W:L:M:i:w:l:o:O:P:C:r:t:acemxyzps1238DT")) != - -1) - switch (c) - { - case 'M': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case 'b': - bottommargin = atof(optarg); - break; - case 'c': - centered = 1; - break; - case 'C': - creator = optarg; - break; - case 'd': /* without -a, this only processes one image at this IFD - */ - dirnum = atoi(optarg); - break; - case 'D': - PSduplex = TRUE; - break; - case 'i': - interpolate = atoi(optarg) ? TRUE : FALSE; - break; - case 'T': - PStumble = TRUE; - break; - case 'e': - PSavoiddeadzone = FALSE; - generateEPSF = TRUE; - break; - case 'h': - pageHeight = atof(optarg); - break; - case 'H': - maxPageHeight = atof(optarg); - break; - case 'W': - maxPageWidth = atof(optarg); - break; - case 'L': - splitOverlap = atof(optarg); - break; - case 'm': - useImagemask = TRUE; - break; - case 'o': - switch (optarg[0]) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - diroff = (uint32_t)strtoul(optarg, NULL, 0); - break; - default: - TIFFError("-o", "Offset must be a numeric value."); - exit(EXIT_FAILURE); - } - break; - case 'O': /* XXX too bad -o is already taken */ - output = fopen(optarg, "w"); - if (output == NULL) - { - fprintf(stderr, "%s: %s: Cannot open output file.\n", - argv[0], optarg); - exit(EXIT_FAILURE); - } - break; - case 'P': - switch (optarg[0]) - { - case 'l': - case 'L': - strcpy(pageOrientation, "Landscape"); - break; - case 'p': - case 'P': - strcpy(pageOrientation, "Portrait"); - break; - default: - TIFFError( - "-P", - "Page orientation must be Landscape or Portrait"); - exit(EXIT_FAILURE); - } - break; - case 'l': - leftmargin = atof(optarg); - break; - case 'a': /* removed fall through to generate warning below, R Nolde - 09-01-2010 */ - printAll = TRUE; - break; - case 'p': - generateEPSF = FALSE; - break; - case 'r': - if (strcmp(optarg, "auto") == 0) - { - rotation_g = 0; - auto_rotate_g = TRUE; - } - else - { - rotation_g = atoi(optarg); - auto_rotate_g = FALSE; - } - switch (rotation_g) - { - case 0: - case 90: - case 180: - case 270: - break; - default: - fprintf(stderr, "Rotation angle must be 90, 180, 270 " - "(degrees ccw) or auto\n"); - exit(EXIT_FAILURE); - } - break; - case 's': - printAll = FALSE; - break; - case 't': - title = optarg; - break; - case 'w': - pageWidth = atof(optarg); - break; - case 'z': - PSavoiddeadzone = FALSE; - break; - case '1': - level2 = FALSE; - level3 = FALSE; - ascii85_g = FALSE; - break; - case '2': - level2 = TRUE; - ascii85_g = TRUE; /* default to yes */ - break; - case '3': - level3 = TRUE; - ascii85_g = TRUE; /* default to yes */ - break; - case '8': - ascii85_g = FALSE; - break; - case 'x': - res_unit = RESUNIT_CENTIMETER; - break; - case 'y': - res_unit = RESUNIT_INCH; - break; - case '?': - usage(EXIT_FAILURE); - } - - if (useImagemask == TRUE) - { - if ((level2 == FALSE) && (level3 == FALSE)) - { - TIFFError( - "-m ", - " imagemask operator requires Postscript Level2 or Level3"); - exit(EXIT_FAILURE); - } - } - - if (pageWidth && (maxPageWidth > pageWidth)) - { - TIFFError("-W", "Max viewport width cannot exceed page width"); - exit(EXIT_FAILURE); - } - - /* auto rotate requires a specified page width and height */ - if (auto_rotate_g == TRUE) - { - /* - if ((pageWidth == 0) || (pageHeight == 0)) - TIFFWarning ("-r auto", " requires page height and width specified with - -h and -w"); - */ - if ((maxPageWidth > 0) || (maxPageHeight > 0)) - { - TIFFError("-r auto", " is incompatible with maximum page " - "width/height specified by -H or -W"); - exit(EXIT_FAILURE); - } - } - if ((maxPageWidth > 0) && (maxPageHeight > 0)) - { - TIFFError("-H and -W", - " Use only one of -H or -W to define a viewport"); - exit(EXIT_FAILURE); - } - - if ((generateEPSF == TRUE) && (printAll == TRUE)) - { - TIFFError(" -e and -a", "Warning: Cannot generate Encapsulated " - "Postscript for multiple images"); - generateEPSF = FALSE; - } - - if ((generateEPSF == TRUE) && (PSduplex == TRUE)) - { - TIFFError( - " -e and -D", - "Warning: Encapsulated Postscript does not support Duplex option"); - PSduplex = FALSE; - } - - if ((generateEPSF == TRUE) && (PStumble == TRUE)) - { - TIFFError(" -e and -T", "Warning: Encapsulated Postscript does not " - "support Top Edge Binding option"); - PStumble = FALSE; - } - - if ((generateEPSF == TRUE) && (PSavoiddeadzone == TRUE)) - PSavoiddeadzone = FALSE; - - for (; argc - optind > 0; optind++) - { - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return EXIT_FAILURE; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - TIFF *tif = TIFFOpenExt(filename = argv[optind], "r", opts); - TIFFOpenOptionsFree(opts); - if (tif != NULL) - { - if (dirnum != -1 && !TIFFSetDirectory(tif, (tdir_t)dirnum)) - { - TIFFClose(tif); - return (EXIT_FAILURE); - } - else if (diroff != 0 && !TIFFSetSubDirectory(tif, diroff)) - { - TIFFClose(tif); - return (EXIT_FAILURE); - } - np = TIFF2PS(output, tif, pageWidth, pageHeight, leftmargin, - bottommargin, centered); - if (np < 0) - { - TIFFError("Error", "Unable to process %s", filename); - } - TIFFClose(tif); - } - } - if (np) - PSTail(output, np); - else - usage(EXIT_FAILURE); - if (output != stdout) - fclose(output); - return (EXIT_SUCCESS); -} - -static uint16_t samplesperpixel; -static uint16_t bitspersample; -static uint16_t planarconfiguration; -static uint16_t photometric; -static uint16_t compression; -static uint16_t extrasamples; -static int alpha; - -static int checkImage(TIFF *tif) -{ - switch (photometric) - { - case PHOTOMETRIC_YCBCR: - if ((compression == COMPRESSION_JPEG || - compression == COMPRESSION_OJPEG) && - planarconfiguration == PLANARCONFIG_CONTIG) - { - /* can rely on libjpeg to convert to RGB */ - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - photometric = PHOTOMETRIC_RGB; - } - else - { - if (level2 || level3) - break; - TIFFError(filename, "Can not handle image with %s", - "PhotometricInterpretation=YCbCr"); - return (0); - } - /* fall through... */ - case PHOTOMETRIC_RGB: - if (alpha && bitspersample != 8) - { - TIFFError(filename, - "Can not handle %" PRIu16 - "-bit/sample RGB image with alpha", - bitspersample); - return (0); - } - /* fall through... */ - case PHOTOMETRIC_SEPARATED: - case PHOTOMETRIC_PALETTE: - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_MINISWHITE: - break; - case PHOTOMETRIC_LOGL: - case PHOTOMETRIC_LOGLUV: - if (compression != COMPRESSION_SGILOG && - compression != COMPRESSION_SGILOG24) - { - TIFFError( - filename, - "Can not handle %s data with compression other than SGILog", - (photometric == PHOTOMETRIC_LOGL) ? "LogL" : "LogLuv"); - return (0); - } - /* rely on library to convert to RGB/greyscale */ - TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT); - photometric = (photometric == PHOTOMETRIC_LOGL) - ? PHOTOMETRIC_MINISBLACK - : PHOTOMETRIC_RGB; - bitspersample = 8; - break; - case PHOTOMETRIC_CIELAB: - /* fall through... */ - default: - TIFFError( - filename, - "Can not handle image with PhotometricInterpretation=%" PRIu16, - photometric); - return (0); - } - switch (bitspersample) - { - case 1: - case 2: - case 4: - case 8: - case 16: - break; - default: - TIFFError(filename, "Can not handle %" PRIu16 "-bit/sample image", - bitspersample); - return (0); - } - if (planarconfiguration == PLANARCONFIG_SEPARATE && extrasamples > 0) - TIFFWarning(filename, "Ignoring extra samples"); - return (1); -} - -#define PS_UNIT_SIZE 72.0F -#define PSUNITS(npix, res) ((npix) * (PS_UNIT_SIZE / (res))) - -static const char RGBcolorimage[] = "\ -/bwproc {\n\ - rgbproc\n\ - dup length 3 idiv string 0 3 0\n\ - 5 -1 roll {\n\ - add 2 1 roll 1 sub dup 0 eq {\n\ - pop 3 idiv\n\ - 3 -1 roll\n\ - dup 4 -1 roll\n\ - dup 3 1 roll\n\ - 5 -1 roll put\n\ - 1 add 3 0\n\ - } { 2 1 roll } ifelse\n\ - } forall\n\ - pop pop pop\n\ -} def\n\ -/colorimage where {pop} {\n\ - /colorimage {pop pop /rgbproc exch def {bwproc} image} bind def\n\ -} ifelse\n\ -"; - -/* - * Adobe Photoshop requires a comment line of the form: - * - * %ImageData:

- * <1 for binary|2 for hex> "data start" - * - * It is claimed to be part of some future revision of the EPS spec. - */ -static void PhotoshopBanner(FILE *fd, uint32_t w, uint32_t h, tmsize_t bs, - int nc, const char *startline) -{ - fprintf(fd, - "%%ImageData: %" PRIu32 " %" PRIu32 " %" PRIu16 - " %d 0 %" TIFF_SSIZE_FORMAT " 2 \"", - w, h, bitspersample, nc, bs); - fprintf(fd, startline, nc); - fprintf(fd, "\"\n"); -} - -/* Convert pixel width and height pw, ph, to points pprw, pprh - * using image resolution and resolution units from TIFF tags. - * pw : image width in pixels - * ph : image height in pixels - * pprw : image width in PS units (72 dpi) - * pprh : image height in PS units (72 dpi) - */ -static void setupPageState(TIFF *tif, uint32_t *pw, uint32_t *ph, double *pprw, - double *pprh) -{ - float xres = 0.0F, yres = 0.0F; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, pw); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, ph); - if (res_unit == 0) /* Not specified as command line option */ - if (!TIFFGetFieldDefaulted(tif, TIFFTAG_RESOLUTIONUNIT, &res_unit)) - res_unit = RESUNIT_INCH; - /* - * Calculate printable area. - */ - if (!TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres) || - fabs(xres) < 0.0000001) - xres = PS_UNIT_SIZE; - if (!TIFFGetField(tif, TIFFTAG_YRESOLUTION, &yres) || - fabs(yres) < 0.0000001) - yres = PS_UNIT_SIZE; - switch (res_unit) - { - case RESUNIT_CENTIMETER: - xres *= 2.54F, yres *= 2.54F; - break; - case RESUNIT_INCH: - break; - case RESUNIT_NONE: /* Subsequent code assumes we have converted to - inches! */ - res_unit = RESUNIT_INCH; - break; - default: /* Last ditch guess for unspecified RESUNIT case - * check that the resolution is not inches before scaling it. - * Moved to end of function with additional check, RJN, - * 08-31-2010 if (xres != PS_UNIT_SIZE || yres != PS_UNIT_SIZE) - * xres *= PS_UNIT_SIZE, yres *= PS_UNIT_SIZE; - */ - break; - } - /* This is a hack to deal with images that have no meaningful Resolution - * Size but may have x and/or y resolutions of 1 pixel per undefined unit. - */ - if ((xres > 1.0) && (xres != PS_UNIT_SIZE)) - *pprw = PSUNITS(*pw, xres); - else - *pprw = PSUNITS(*pw, PS_UNIT_SIZE); - if ((yres > 1.0) && (yres != PS_UNIT_SIZE)) - *pprh = PSUNITS(*ph, yres); - else - *pprh = PSUNITS(*ph, PS_UNIT_SIZE); -} - -static int isCCITTCompression(TIFF *tif) -{ - uint16_t compress; - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress); - return (compress == COMPRESSION_CCITTFAX3 || - compress == COMPRESSION_CCITTFAX4 || - compress == COMPRESSION_CCITTRLE || - compress == COMPRESSION_CCITTRLEW); -} - -static tsize_t tf_bytesperrow; -static tsize_t ps_bytesperrow; -static uint32_t tf_rowsperstrip; -static uint32_t tf_numberstrips; -static char *hex = "0123456789abcdef"; - -/* - * Pagewidth and pageheight are the output size in points, - * may refer to values specified with -h and -w, or to - * values read from the image if neither -h nor -w are used. - * Imagewidth and imageheight are image size in points. - * Ximages and Yimages are number of pages across and down. - * Only one of maxPageHeight or maxPageWidth can be used. - * These are global variables unfortunately. - */ -int get_subimage_count(double pagewidth, double pageheight, double imagewidth, - double imageheight, int *ximages, int *yimages, - int rotation, double scale) -{ - int pages = 1; - double splitheight = 0; /* Requested Max Height in points */ - double splitwidth = 0; /* Requested Max Width in points */ - double overlap = 0; /* Repeated edge width in points */ - - splitheight = maxPageHeight * PS_UNIT_SIZE; - splitwidth = maxPageWidth * PS_UNIT_SIZE; - overlap = splitOverlap * PS_UNIT_SIZE; - pagewidth *= PS_UNIT_SIZE; - pageheight *= PS_UNIT_SIZE; - - if ((imagewidth < 1.0) || (imageheight < 1.0)) - { - TIFFError("get_subimage_count", "Invalid image width or height"); - return (0); - } - - switch (rotation) - { - case 0: - case 180: - if (splitheight > 0) /* -H maxPageHeight */ - { - if (imageheight > - splitheight) /* More than one vertical image segment */ - { - if (pagewidth) - *ximages = (int)ceil((scale * imagewidth) / - (pagewidth - overlap)); - else - *ximages = 1; - *yimages = (int)ceil( - (scale * imageheight) / - (splitheight - overlap)); /* Max vert pages needed */ - } - else - { - if (pagewidth) - *ximages = (int)ceil( - (scale * imagewidth) / - (pagewidth - overlap)); /* Max horz pages needed */ - else - *ximages = 1; - *yimages = 1; /* Max vert pages needed */ - } - } - else - { - if (splitwidth > 0) /* -W maxPageWidth */ - { - if (imagewidth > splitwidth) - { - *ximages = (int)ceil( - (scale * imagewidth) / - (splitwidth - overlap)); /* Max horz pages needed */ - if (pageheight) - *yimages = (int)ceil( - (scale * imageheight) / - (pageheight - - overlap)); /* Max vert pages needed */ - else - *yimages = 1; - } - else - { - *ximages = 1; /* Max vert pages needed */ - if (pageheight) - *yimages = (int)ceil( - (scale * imageheight) / - (pageheight - - overlap)); /* Max vert pages needed */ - else - *yimages = 1; - } - } - else - { - *ximages = 1; - *yimages = 1; - } - } - break; - case 90: - case 270: - if (splitheight > 0) /* -H maxPageHeight */ - { - if (imagewidth > - splitheight) /* More than one vertical image segment */ - { - *yimages = (int)ceil( - (scale * imagewidth) / - (splitheight - overlap)); /* Max vert pages needed */ - if (pagewidth) - *ximages = (int)ceil( - (scale * imageheight) / - (pagewidth - overlap)); /* Max horz pages needed */ - else - *ximages = 1; - } - else - { - *yimages = 1; /* Max vert pages needed */ - if (pagewidth) - *ximages = (int)ceil( - (scale * imageheight) / - (pagewidth - overlap)); /* Max horz pages needed */ - else - *ximages = 1; - } - } - else - { - if (splitwidth > 0) /* -W maxPageWidth */ - { - if (imageheight > splitwidth) - { - if (pageheight) - *yimages = (int)ceil( - (scale * imagewidth) / - (pageheight - - overlap)); /* Max vert pages needed */ - else - *yimages = 1; - *ximages = (int)ceil( - (scale * imageheight) / - (splitwidth - overlap)); /* Max horz pages needed */ - } - else - { - if (pageheight) - *yimages = (int)ceil( - (scale * imagewidth) / - (pageheight - - overlap)); /* Max horz pages needed */ - else - *yimages = 1; - *ximages = 1; /* Max vert pages needed */ - } - } - else - { - *ximages = 1; - *yimages = 1; - } - } - break; - default: - *ximages = 1; - *yimages = 1; - } - pages = (*ximages) * (*yimages); - return (pages); -} - -/* New version of PlaceImage that handles only the translation and rotation - * for a single output page. - */ -int exportMaskedImage(FILE *fp, double pagewidth, double pageheight, - double imagewidth, double imageheight, int row, - int column, double left_offset, double bott_offset, - double scale, int center, int rotation) -{ - double xtran = 0.0; - double ytran = 0.0; - - double xscale = 1.0; - double yscale = 1.0; - - double splitheight = 0; /* Requested Max Height in points */ - double splitwidth = 0; /* Requested Max Width in points */ - double overlap = 0; /* Repeated edge width in points */ - double subimage_height = 0.0; - - splitheight = maxPageHeight * PS_UNIT_SIZE; - splitwidth = maxPageWidth * PS_UNIT_SIZE; - overlap = splitOverlap * PS_UNIT_SIZE; - xscale = scale * imagewidth; - yscale = scale * imageheight; - - if ((xscale < 0.0) || (yscale < 0.0)) - { - TIFFError("exportMaskedImage", "Invalid parameters."); - return (-1); - } - - /* If images are cropped to a vewport with -H or -W, the output pages are - * shifted to the top of each output page rather than the Postscript default - * lower edge. - */ - switch (rotation) - { - case 0: - case 180: - if (splitheight > 0) /* -H maxPageHeight */ - { - if (splitheight < - imageheight) /* More than one vertical image segments */ - { - /* Intra2net: Keep correct apspect ratio */ - xscale = (imagewidth + overlap) * - (pageheight / splitheight) * scale; - - xtran = -1.0 * column * (pagewidth - overlap); - subimage_height = - imageheight - ((splitheight - overlap) * row); - ytran = pageheight - - subimage_height * (pageheight / splitheight); - } - else /* Only one page in vertical direction */ - { - xtran = -1.0 * column * (pagewidth - overlap); - ytran = splitheight - imageheight; - } - } - else - { - if (splitwidth > 0) /* maxPageWidth */ - { - if (splitwidth < imagewidth) - { - xtran = -1.0 * column * splitwidth; - ytran = -1.0 * row * (pageheight - overlap); - } - else /* Only one page in horizontal direction */ - { - ytran = -1.0 * row * (pageheight - overlap); - xtran = 0; - } - } - else /* Simple case, no splitting */ - { - ytran = pageheight - imageheight; - xtran = 0; - } - } - - if (imagewidth <= pagewidth) - { - /* Intra2net: Crop page at the bottom instead of the top (-> - output starts at the top). Only do this in non-page-split - mode */ - if (imageheight <= splitheight) - { - ytran = pageheight - - imageheight; /* Note: Will be negative for images - longer than page size */ - } - } - bott_offset += ytran / (center ? 2 : 1); - left_offset += xtran / (center ? 2 : 1); - break; - case 90: - case 270: - if (splitheight > 0) /* -H maxPageHeight */ - { - if (splitheight < - imagewidth) /* More than one vertical image segments */ - { - xtran = -1.0 * column * (pageheight - overlap); - /* Commented code places image at bottom of page instead of - top. ytran = -1.0 * row * splitheight; - */ - if (row == 0) - ytran = -1.0 * (imagewidth - splitheight); - else - ytran = -1.0 * (imagewidth - - (splitheight - overlap) * (row + 1)); - } - else /* Only one page in vertical direction */ - { - xtran = -1.0 * column * (pageheight - overlap); - ytran = splitheight - imagewidth; - } - } - else - { - if (splitwidth > 0) /* maxPageWidth */ - { - if (splitwidth < imageheight) - { - xtran = -1.0 * column * splitwidth; - ytran = -1.0 * row * (pagewidth - overlap); - } - else /* Only one page in horizontal direction */ - { - ytran = -1.0 * row * (pagewidth - overlap); - xtran = 0; - } - } - else /* Simple case, no splitting */ - { - ytran = pageheight - imageheight; - xtran = 0; /* pagewidth - imagewidth; */ - } - } - bott_offset += ytran / (center ? 2 : 1); - left_offset += xtran / (center ? 2 : 1); - break; - default: - xtran = 0; - ytran = 0; - } - - switch (rotation) - { - case 0: - fprintf(fp, "%f %f translate\n", left_offset, bott_offset); - fprintf(fp, "%f %f scale\n", xscale, yscale); - break; - case 180: - fprintf(fp, "%f %f translate\n", left_offset, bott_offset); - fprintf(fp, "%f %f scale\n1 1 translate 180 rotate\n", xscale, - yscale); - break; - case 90: - fprintf(fp, "%f %f translate\n", left_offset, bott_offset); - fprintf(fp, "%f %f scale\n1 0 translate 90 rotate\n", yscale, - xscale); - break; - case 270: - fprintf(fp, "%f %f translate\n", left_offset, bott_offset); - fprintf(fp, "%f %f scale\n0 1 translate 270 rotate\n", yscale, - xscale); - break; - default: - TIFFError("exportMaskedImage", - "Unsupported rotation angle %d. No rotation", rotation); - fprintf(fp, "%f %f scale\n", xscale, yscale); - break; - } - - return (0); -} - -/* Rotate an image without scaling or clipping */ -int psRotateImage(FILE *fd, int rotation, double pswidth, double psheight, - double left_offset, double bottom_offset) -{ - if ((left_offset != 0.0) || (bottom_offset != 0)) - fprintf(fd, "%f %f translate\n", left_offset, bottom_offset); - - /* Exchange width and height for 90/270 rotations */ - switch (rotation) - { - case 0: - fprintf(fd, "%f %f scale\n", pswidth, psheight); - break; - case 90: - fprintf(fd, "%f %f scale\n1 0 translate 90 rotate\n", psheight, - pswidth); - break; - case 180: - fprintf(fd, "%f %f scale\n1 1 translate 180 rotate\n", pswidth, - psheight); - break; - case 270: - fprintf(fd, "%f %f scale\n0 1 translate 270 rotate\n", psheight, - pswidth); - break; - default: - TIFFError("psRotateImage", "Unsupported rotation %d.", rotation); - fprintf(fd, "%f %f scale\n", pswidth, psheight); - return (1); - } - return (0); -} - -/* Scale and rotate an image to a single output page. */ -int psScaleImage(FILE *fd, double scale, int rotation, int center, - double reqwidth, double reqheight, double pswidth, - double psheight, double left_offset, double bottom_offset) -{ - double hcenter = 0.0, vcenter = 0.0; - - /* Adjust offsets for centering */ - if (center) - { - switch (rotation) - { - case 90: - vcenter = (reqheight - pswidth * scale) / 2; - hcenter = (reqwidth - psheight * scale) / 2; - fprintf(fd, "%f %f translate\n", hcenter, vcenter); - fprintf(fd, "%f %f scale\n1 0 translate 90 rotate\n", - psheight * scale, pswidth * scale); - break; - case 180: - hcenter = (reqwidth - pswidth * scale) / 2; - vcenter = (reqheight - psheight * scale) / 2; - fprintf(fd, "%f %f translate\n", hcenter, vcenter); - fprintf(fd, "%f %f scale\n1 1 translate 180 rotate\n", - pswidth * scale, psheight * scale); - break; - case 270: - vcenter = (reqheight - pswidth * scale) / 2; - hcenter = (reqwidth - psheight * scale) / 2; - fprintf(fd, "%f %f translate\n", hcenter, vcenter); - fprintf(fd, "%f %f scale\n0 1 translate 270 rotate\n", - psheight * scale, pswidth * scale); - break; - case 0: - default: - hcenter = (reqwidth - pswidth * scale) / 2; - vcenter = (reqheight - psheight * scale) / 2; - fprintf(fd, "%f %f translate\n", hcenter, vcenter); - fprintf(fd, "%f %f scale\n", pswidth * scale, psheight * scale); - break; - } - } - else /* Not centered */ - { - switch (rotation) - { - case 0: - fprintf(fd, "%f %f translate\n", - left_offset ? left_offset : 0.0, - bottom_offset ? bottom_offset - : reqheight - (psheight * scale)); - fprintf(fd, "%f %f scale\n", pswidth * scale, psheight * scale); - break; - case 90: - fprintf(fd, "%f %f translate\n", - left_offset ? left_offset : 0.0, - bottom_offset ? bottom_offset - : reqheight - (pswidth * scale)); - fprintf(fd, "%f %f scale\n1 0 translate 90 rotate\n", - psheight * scale, pswidth * scale); - break; - case 180: - fprintf(fd, "%f %f translate\n", - left_offset ? left_offset : 0.0, - bottom_offset ? bottom_offset - : reqheight - (psheight * scale)); - fprintf(fd, "%f %f scale\n1 1 translate 180 rotate\n", - pswidth * scale, psheight * scale); - break; - case 270: - fprintf(fd, "%f %f translate\n", - left_offset ? left_offset : 0.0, - bottom_offset ? bottom_offset - : reqheight - (pswidth * scale)); - fprintf(fd, "%f %f scale\n0 1 translate 270 rotate\n", - psheight * scale, pswidth * scale); - break; - default: - TIFFError("psScaleImage", "Unsupported rotation %d", rotation); - fprintf(fd, "%f %f scale\n", pswidth * scale, psheight * scale); - return (1); - } - } - - return (0); -} - -/* This controls the visible portion of the page which is displayed. - * N.B. Setting maxPageHeight no longer sets pageheight if not set explicitly - */ -int psPageSize(FILE *fd, int rotation, double pgwidth, double pgheight, - double reqwidth, double reqheight, double pswidth, - double psheight) -{ - double xscale = 1.0, yscale = 1.0, scale = 1.0; - double splitheight; - double splitwidth; - double new_width; - double new_height; - - splitheight = maxPageHeight * PS_UNIT_SIZE; - splitwidth = maxPageWidth * PS_UNIT_SIZE; - - switch (rotation) - { - case 0: - case 180: - if ((splitheight > 0) || (splitwidth > 0)) - { - if (pgwidth != 0 || pgheight != 0) - { - xscale = reqwidth / (splitwidth ? splitwidth : pswidth); - yscale = reqheight / (splitheight ? splitheight : psheight); - scale = (xscale < yscale) ? xscale : yscale; - } - new_width = splitwidth ? splitwidth : scale * pswidth; - new_height = splitheight ? splitheight : scale * psheight; - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (new_width > new_height) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 "\n", - (int32_t)new_width, (int32_t)new_height); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict end " - "setpagedevice\n", - new_width, new_height); - } - else /* No viewport defined with -H or -W */ - { - if ((pgwidth == 0) && (pgheight == 0)) /* Image not scaled */ - { - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", - pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (pswidth > psheight) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 - "\n", - (int32_t)pswidth, (int32_t)psheight); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict " - "end setpagedevice\n", - pswidth, psheight); - } - else /* Image scaled */ - { - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", - pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (reqwidth > reqheight) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 - "\n", - (int32_t)reqwidth, (int32_t)reqheight); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict " - "end setpagedevice\n", - reqwidth, reqheight); - } - } - break; - case 90: - case 270: - if ((splitheight > 0) || (splitwidth > 0)) - { - if (pgwidth != 0 || pgheight != 0) - { - xscale = reqwidth / (splitwidth ? splitwidth : pswidth); - yscale = reqheight / (splitheight ? splitheight : psheight); - scale = (xscale < yscale) ? xscale : yscale; - } - new_width = splitwidth ? splitwidth : scale * psheight; - new_height = splitheight ? splitheight : scale * pswidth; - - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (new_width > new_height) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 "\n", - (int32_t)new_width, (int32_t)new_height); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict end " - "setpagedevice\n", - new_width, new_height); - } - else - { - if ((pgwidth == 0) && (pgheight == 0)) /* Image not scaled */ - { - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", - pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (psheight > pswidth) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 - "\n", - (int32_t)psheight, (int32_t)pswidth); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict " - "end setpagedevice\n", - psheight, pswidth); - } - else /* Image scaled */ - { - if (strlen(pageOrientation)) - fprintf(fd, "%%%%PageOrientation: %s\n", - pageOrientation); - else - fprintf(fd, "%%%%PageOrientation: %s\n", - (reqwidth > reqheight) ? "Landscape" - : "Portrait"); - fprintf(fd, - "%%%%PageBoundingBox: 0 0 %" PRId32 " %" PRId32 - "\n", - (int32_t)reqwidth, (int32_t)reqheight); - fprintf(fd, - "1 dict begin /PageSize [ %f %f ] def currentdict " - "end setpagedevice\n", - reqwidth, reqheight); - } - } - break; - default: - TIFFError("psPageSize", "Invalid rotation %d", rotation); - return (1); - } - fputs("<<\n /Policies <<\n /PageSize 3\n >>\n>> setpagedevice\n", fd); - - return (0); -} /* end psPageSize */ - -/* Mask an image as a series of pages, each only showing a section defined - * by the maxPageHeight or maxPageWidth options. - */ -int psMaskImage(FILE *fd, TIFF *tif, int rotation, int center, int *npages, - double pixwidth, double pixheight, double left_margin, - double bottom_margin, double pgwidth, double pgheight, - double pswidth, double psheight, double scale) -{ - int i, j; - int ximages = 1, yimages = 1; - int pages = *npages; - double view_width = 0; - double view_height = 0; - - if (get_viewport(pgwidth, pgheight, pswidth, psheight, &view_width, - &view_height, rotation)) - { - TIFFError("get_viewport", "Unable to set image viewport"); - return (-1); - } - - if (get_subimage_count(pgwidth, pgheight, pswidth, psheight, &ximages, - &yimages, rotation, scale) < 1) - { - TIFFError("get_subimage_count", - "Invalid image count: %d columns, %d rows", ximages, yimages); - return (-1); - } - - for (i = 0; i < yimages; i++) - { - for (j = 0; j < ximages; j++) - { - pages++; - *npages = pages; - fprintf(fd, "%%%%Page: %d %d\n", pages, pages); - - /* Write out the PageSize info for non EPS files */ - if (!generateEPSF && (level2 || level3)) - { - if (psPageSize(fd, rotation, pgwidth, pgheight, view_width, - view_height, pswidth, psheight)) - return (-1); - } - fprintf(fd, "gsave\n"); - fprintf(fd, "100 dict begin\n"); - if (exportMaskedImage(fd, view_width, view_height, pswidth, - psheight, i, j, left_margin, bottom_margin, - scale, center, rotation)) - { - TIFFError("exportMaskedImage", "Invalid image parameters."); - return (-1); - } - PSpage(fd, tif, (uint32_t)pixwidth, (uint32_t)pixheight); - fprintf(fd, "end\n"); - fprintf(fd, "grestore\n"); - fprintf(fd, "showpage\n"); - } - } - - return (pages); -} - -/* Compute scale factor and write out file header */ -int psStart(FILE *fd, int npages, int auto_rotate, int *rotation, double *scale, - double ox, double oy, double pgwidth, double pgheight, - double reqwidth, double reqheight, double pswidth, double psheight, - double left_offset, double bottom_offset) -{ - double maxsource = 0.0; /* Used for auto rotations */ - double maxtarget = 0.0; - double xscale = 1.0, yscale = 1.0; - double splitheight; - double splitwidth; - double view_width = 0.0, view_height = 0.0; - double page_width = 0.0, page_height = 0.0; - - /* Splitheight and splitwidth are in inches */ - splitheight = maxPageHeight * PS_UNIT_SIZE; - splitwidth = maxPageWidth * PS_UNIT_SIZE; - - page_width = pgwidth * PS_UNIT_SIZE; - page_height = pgheight * PS_UNIT_SIZE; - - /* If user has specified a page width and height and requested the - * image to be auto-rotated to fit on that media, we match the - * longest dimension of the image to the longest dimension of the - * target media but we have to ignore auto rotate if user specified - * maxPageHeight since this makes life way too complicated. */ - if (auto_rotate) - { - if ((splitheight != 0) || (splitwidth != 0)) - { - TIFFError("psStart", - "Auto-rotate is incompatible with page splitting "); - return (1); - } - - /* Find longest edges in image and output media */ - maxsource = (pswidth >= psheight) ? pswidth : psheight; - maxtarget = (reqwidth >= reqheight) ? reqwidth : reqheight; - - if (((maxsource == pswidth) && (maxtarget != reqwidth)) || - ((maxsource == psheight) && (maxtarget != reqheight))) - { /* optimal orientation does not match input orientation */ - *rotation = 90; - xscale = (reqwidth - left_offset) / psheight; - yscale = (reqheight - bottom_offset) / pswidth; - } - else /* optimal orientation matches input orientation */ - { - xscale = (reqwidth - left_offset) / pswidth; - yscale = (reqheight - bottom_offset) / psheight; - } - *scale = (xscale < yscale) ? xscale : yscale; - - /* Do not scale image beyond original size */ - if (*scale > 1.0) - *scale = 1.0; - - /* Set the size of the displayed image to requested page size - * and optimal orientation. - */ - if (!npages) - PSHead(fd, reqwidth, reqheight, ox, oy); - - return (0); - } - - /* N.B. If pgwidth or pgheight are set from maxPageHeight/Width, - * we have a problem with the tests below under splitheight. - */ - - switch (*rotation) /* Auto rotate has NOT been specified */ - { - case 0: - case 180: - if ((splitheight != 0) || (splitwidth != 0)) - { /* Viewport clipped to maxPageHeight or maxPageWidth */ - if ((page_width != 0) || (page_height != 0)) /* Image scaled */ - { - xscale = (reqwidth - left_offset) / - (page_width ? page_width : pswidth); - yscale = (reqheight - bottom_offset) / - (page_height ? page_height : psheight); - *scale = (xscale < yscale) ? xscale : yscale; - /* - if (*scale > 1.0) - *scale = 1.0; - */ - } - else /* Image clipped but not scaled */ - *scale = 1.0; - - view_width = splitwidth ? splitwidth : *scale * pswidth; - view_height = splitheight ? splitheight : *scale * psheight; - } - else /* Viewport not clipped to maxPageHeight or maxPageWidth */ - { - if ((page_width != 0) || (page_height != 0)) - { /* Image scaled */ - xscale = (reqwidth - left_offset) / pswidth; - yscale = (reqheight - bottom_offset) / psheight; - - view_width = reqwidth; - view_height = reqheight; - } - else - { /* Image not scaled */ - xscale = (pswidth - left_offset) / pswidth; - yscale = (psheight - bottom_offset) / psheight; - - view_width = pswidth; - view_height = psheight; - } - } - break; - case 90: - case 270: - if ((splitheight != 0) || (splitwidth != 0)) - { /* Viewport clipped to maxPageHeight or maxPageWidth */ - if ((page_width != 0) || (page_height != 0)) /* Image scaled */ - { - xscale = (reqwidth - left_offset) / psheight; - yscale = (reqheight - bottom_offset) / pswidth; - *scale = (xscale < yscale) ? xscale : yscale; - /* - if (*scale > 1.0) - *scale = 1.0; - */ - } - else /* Image clipped but not scaled */ - *scale = 1.0; - view_width = splitwidth ? splitwidth : *scale * psheight; - view_height = splitheight ? splitheight : *scale * pswidth; - } - else /* Viewport not clipped to maxPageHeight or maxPageWidth */ - { - if ((page_width != 0) || (page_height != 0)) /* Image scaled */ - { - xscale = (reqwidth - left_offset) / psheight; - yscale = (reqheight - bottom_offset) / pswidth; - - view_width = reqwidth; - view_height = reqheight; - } - else - { - xscale = (pswidth - left_offset) / psheight; - yscale = (psheight - bottom_offset) / pswidth; - - view_width = psheight; - view_height = pswidth; - } - } - break; - default: - TIFFError("psPageSize", "Invalid rotation %d", *rotation); - return (1); - } - - if (!npages) - PSHead(fd, (page_width ? page_width : view_width), - (page_height ? page_height : view_height), ox, oy); - - *scale = (xscale < yscale) ? xscale : yscale; - if (*scale > 1.0) - *scale = 1.0; - - return (0); -} - -int get_viewport(double pgwidth, double pgheight, double pswidth, - double psheight, double *view_width, double *view_height, - int rotation) -{ - /* Only one of maxPageHeight or maxPageWidth can be specified */ - if (maxPageHeight != - 0) /* Clip the viewport to maxPageHeight on each page */ - { - if (pgheight != 0 && pgheight < maxPageHeight) - *view_height = pgheight * PS_UNIT_SIZE; - else - *view_height = maxPageHeight * PS_UNIT_SIZE; - /* - * if (res_unit == RESUNIT_CENTIMETER) - * *view_height /= 2.54F; - */ - } - else - { - if (pgheight != 0) /* User has set PageHeight with -h flag */ - { - *view_height = - pgheight * - PS_UNIT_SIZE; /* Postscript size for Page Height in inches */ - /* if (res_unit == RESUNIT_CENTIMETER) - * *view_height /= 2.54F; - */ - } - else /* If no width or height are specified, use the original size from - image */ - switch (rotation) - { - default: - case 0: - case 180: - *view_height = psheight; - break; - case 90: - case 270: - *view_height = pswidth; - break; - } - } - - if (maxPageWidth != 0) /* Clip the viewport to maxPageWidth on each page */ - { - if (pgwidth != 0 && pgwidth < maxPageWidth) - *view_width = pgwidth * PS_UNIT_SIZE; - else - *view_width = maxPageWidth * PS_UNIT_SIZE; - /* if (res_unit == RESUNIT_CENTIMETER) - * *view_width /= 2.54F; - */ - } - else - { - if (pgwidth != 0) /* User has set PageWidth with -w flag */ - { - *view_width = - pgwidth * - PS_UNIT_SIZE; /* Postscript size for Page Width in inches */ - /* if (res_unit == RESUNIT_CENTIMETER) - * *view_width /= 2.54F; - */ - } - else /* If no width or height are specified, use the original size from - image */ - switch (rotation) - { - default: - case 0: - case 180: - *view_width = pswidth; - break; - case 90: - case 270: - *view_width = - psheight; /* (*view_height / psheight) * psheight; */ - break; - } - } - - return (0); -} - -/* pgwidth and pgheight specify page width and height in inches from -h and -w - * flags lm and bm are the LeftMargin and BottomMargin in inches center causes - * the image to be centered on the page if the paper size is larger than the - * image size returns the sequence number of the page processed or -1 on error - */ - -int TIFF2PS(FILE *fd, TIFF *tif, double pgwidth, double pgheight, double lm, - double bm, int center) -{ - uint32_t pixwidth = 0, pixheight = 0; /* Image width and height in pixels */ - double ox = 0.0, oy = 0.0; /* Offset from current Postscript origin */ - double pswidth, - psheight; /* Original raw image width and height in points */ - double view_width, view_height; /* Viewport width and height in points */ - double scale = 1.0; - double left_offset = lm * PS_UNIT_SIZE; - double bottom_offset = bm * PS_UNIT_SIZE; - uint32_t subfiletype; - uint16_t *sampleinfo; - static int npages = 0; - - if (!TIFFGetField(tif, TIFFTAG_XPOSITION, &ox)) - ox = 0; - if (!TIFFGetField(tif, TIFFTAG_YPOSITION, &oy)) - oy = 0; - - /* Consolidated all the tag information into one code segment, Richard Nolde - */ - do - { - tf_numberstrips = TIFFNumberOfStrips(tif); - TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &tf_rowsperstrip); - TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); - TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfiguration); - TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression); - TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, - &sampleinfo); - alpha = (extrasamples == 1 && sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA); - if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) - { - switch (samplesperpixel - extrasamples) - { - case 1: - if (isCCITTCompression(tif)) - photometric = PHOTOMETRIC_MINISWHITE; - else - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 3: - photometric = PHOTOMETRIC_RGB; - break; - case 4: - photometric = PHOTOMETRIC_SEPARATED; - break; - } - } - - /* Read image tags for width and height in pixels pixwidth, pixheight, - * and convert to points pswidth, psheight - */ - setupPageState(tif, &pixwidth, &pixheight, &pswidth, &psheight); - view_width = pswidth; - view_height = psheight; - - if (get_viewport(pgwidth, pgheight, pswidth, psheight, &view_width, - &view_height, rotation_g)) - { - TIFFError("get_viewport", "Unable to set image viewport"); - return (1); - } - - /* Write the Postscript file header with Bounding Box and Page Size - * definitions */ - if (psStart(fd, npages, auto_rotate_g, &rotation_g, &scale, ox, oy, - pgwidth, pgheight, view_width, view_height, pswidth, - psheight, left_offset, bottom_offset)) - return (-1); - - if (checkImage(tif)) /* Aborts if unsupported image parameters */ - { - tf_bytesperrow = TIFFScanlineSize(tif); - - /* Set viewport clipping and scaling options */ - if ((maxPageHeight) || (maxPageWidth) || (pgwidth != 0) || - (pgheight != 0)) - { - if ((maxPageHeight) || - (maxPageWidth)) /* used -H or -W option */ - { - if (psMaskImage(fd, tif, rotation_g, center, &npages, - pixwidth, pixheight, left_offset, - bottom_offset, pgwidth, pgheight, pswidth, - psheight, scale) < 0) - return (-1); - } - else /* N.B. Setting maxPageHeight no longer sets pgheight */ - { - if (pgwidth != 0 || pgheight != 0) - { - /* User did not specify a maximum page height or width - * using -H or -W flag but did use -h or -w flag to - * scale to a specific size page. - */ - npages++; - fprintf(fd, "%%%%Page: %d %d\n", npages, npages); - - if (!generateEPSF && (level2 || level3)) - { - /* Write out the PageSize info for non EPS files */ - if (psPageSize(fd, rotation_g, pgwidth, pgheight, - view_width, view_height, pswidth, - psheight)) - return (-1); - } - fprintf(fd, "gsave\n"); - fprintf(fd, "100 dict begin\n"); - if (psScaleImage(fd, scale, rotation_g, center, - view_width, view_height, pswidth, - psheight, left_offset, bottom_offset)) - return (-1); - - PSpage(fd, tif, pixwidth, pixheight); - fprintf(fd, "end\n"); - fprintf(fd, "grestore\n"); - fprintf(fd, "showpage\n"); - } - } - } - else /* Simple rotation: user did not use -H, -W, -h or -w */ - { - npages++; - fprintf(fd, "%%%%Page: %d %d\n", npages, npages); - - if (!generateEPSF && (level2 || level3)) - { - /* Write out the PageSize info for non EPS files */ - if (psPageSize(fd, rotation_g, pgwidth, pgheight, - view_width, view_height, pswidth, psheight)) - return (-1); - } - fprintf(fd, "gsave\n"); - fprintf(fd, "100 dict begin\n"); - if (psRotateImage(fd, rotation_g, pswidth, psheight, - left_offset, bottom_offset)) - return (-1); - - PSpage(fd, tif, pixwidth, pixheight); - fprintf(fd, "end\n"); - fprintf(fd, "grestore\n"); - fprintf(fd, "showpage\n"); - } - } - if (generateEPSF) - break; - if (auto_rotate_g) - rotation_g = 0; - TIFFGetFieldDefaulted(tif, TIFFTAG_SUBFILETYPE, &subfiletype); - } while (((subfiletype & FILETYPE_PAGE) || printAll) && - TIFFReadDirectory(tif)); - - return (npages); -} - -static const char DuplexPreamble[] = "\ -%%BeginFeature: *Duplex True\n\ -systemdict begin\n\ - /languagelevel where { pop languagelevel } { 1 } ifelse\n\ - 2 ge { 1 dict dup /Duplex true put setpagedevice }\n\ - { statusdict /setduplex known { statusdict begin setduplex true end } if\n\ - } ifelse\n\ -end\n\ -%%EndFeature\n\ -"; - -static const char TumblePreamble[] = "\ -%%BeginFeature: *Tumble True\n\ -systemdict begin\n\ - /languagelevel where { pop languagelevel } { 1 } ifelse\n\ - 2 ge { 1 dict dup /Tumble true put setpagedevice }\n\ - { statusdict /settumble known { statusdict begin true settumble end } if\n\ - } ifelse\n\ -end\n\ -%%EndFeature\n\ -"; - -static const char AvoidDeadZonePreamble[] = "\ -gsave newpath clippath pathbbox grestore\n\ - 4 2 roll 2 copy translate\n\ - exch 3 1 roll sub 3 1 roll sub exch\n\ - currentpagedevice /PageSize get aload pop\n\ - exch 3 1 roll div 3 1 roll div abs exch abs\n\ - 2 copy gt { exch } if pop\n\ - dup 1 lt { dup scale } { pop } ifelse\n\ -"; - -void PSHead(FILE *fd, double pagewidth, double pageheight, double xoff, - double yoff) -{ - time_t t; - - t = time(0); - fprintf(fd, "%%!PS-Adobe-3.0%s\n", generateEPSF ? " EPSF-3.0" : ""); - fprintf(fd, "%%%%Creator: %s\n", creator ? creator : "tiff2ps"); - fprintf(fd, "%%%%Title: %s\n", title ? title : filename); - fprintf(fd, "%%%%CreationDate: %s", ctime(&t)); - fprintf(fd, "%%%%DocumentData: Clean7Bit\n"); - /* NB: should use PageBoundingBox for each page instead of BoundingBox * - * PageBoundingBox DSC added in PSPageSize function, R Nolde 09-01-2010 - */ - fprintf(fd, "%%%%Origin: %" PRId32 " %" PRId32 "\n", (int32_t)xoff, - (int32_t)yoff); - fprintf(fd, "%%%%BoundingBox: 0 0 %" PRId32 " %" PRId32 "\n", - (int32_t)ceil(pagewidth), (int32_t)ceil(pageheight)); - - fprintf(fd, "%%%%LanguageLevel: %d\n", (level3 ? 3 : (level2 ? 2 : 1))); - if (generateEPSF == TRUE) - fprintf(fd, "%%%%Pages: 1 1\n"); - else - fprintf(fd, "%%%%Pages: (atend)\n"); - fprintf(fd, "%%%%EndComments\n"); - if (generateEPSF == FALSE) - { - fprintf(fd, "%%%%BeginSetup\n"); - if (PSduplex) - fprintf(fd, "%s", DuplexPreamble); - if (PStumble) - fprintf(fd, "%s", TumblePreamble); - if (PSavoiddeadzone && (level2 || level3)) - fprintf(fd, "%s", AvoidDeadZonePreamble); - fprintf(fd, "%%%%EndSetup\n"); - } -} - -void PSTail(FILE *fd, int npages) -{ - fprintf(fd, "%%%%Trailer\n"); - if (generateEPSF == FALSE) - fprintf(fd, "%%%%Pages: %d\n", npages); - fprintf(fd, "%%%%EOF\n"); -} - -static int checkcmap(TIFF *tif, int n, uint16_t *r, uint16_t *g, uint16_t *b) -{ - (void)tif; - while (n-- > 0) - if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) - return (16); - TIFFWarning(filename, "Assuming 8-bit colormap"); - return (8); -} - -static void PS_Lvl2colorspace(FILE *fd, TIFF *tif) -{ - uint16_t *rmap, *gmap, *bmap; - int i, num_colors; - const char *colorspace_p; - - switch (photometric) - { - case PHOTOMETRIC_SEPARATED: - colorspace_p = "CMYK"; - break; - - case PHOTOMETRIC_RGB: - colorspace_p = "RGB"; - break; - - default: - colorspace_p = "Gray"; - } - - /* - * Set up PostScript Level 2 colorspace according to - * section 4.8 in the PostScript reference manual. - */ - fputs("% PostScript Level 2 only.\n", fd); - if (photometric != PHOTOMETRIC_PALETTE) - { - if (photometric == PHOTOMETRIC_YCBCR) - { - /* MORE CODE HERE */ - } - fprintf(fd, "/Device%s setcolorspace\n", colorspace_p); - return; - } - - /* - * Set up an indexed/palette colorspace - */ - num_colors = (1 << bitspersample); - if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) - { - TIFFError(filename, "Palette image w/o \"Colormap\" tag"); - return; - } - if (checkcmap(tif, num_colors, rmap, gmap, bmap) == 16) - { - /* - * Convert colormap to 8-bits values. - */ -#define CVT(x) (((x)*255) / ((1L << 16) - 1)) - for (i = 0; i < num_colors; i++) - { - rmap[i] = CVT(rmap[i]); - gmap[i] = CVT(gmap[i]); - bmap[i] = CVT(bmap[i]); - } -#undef CVT - } - fprintf(fd, "[ /Indexed /DeviceRGB %d", num_colors - 1); - if (ascii85_g) - { - Ascii85Init(); - fputs("\n<~", fd); - ascii85breaklen -= 2; - } - else - fputs(" <", fd); - for (i = 0; i < num_colors; i++) - { - if (ascii85_g) - { - Ascii85Put((unsigned char)rmap[i], fd); - Ascii85Put((unsigned char)gmap[i], fd); - Ascii85Put((unsigned char)bmap[i], fd); - } - else - { - fputs((i % 8) ? " " : "\n ", fd); - fprintf(fd, "%02" PRIx16 "%02" PRIx16 "%02" PRIx16 "", rmap[i], - gmap[i], bmap[i]); - } - } - if (ascii85_g) - Ascii85Flush(fd); - else - fputs(">\n", fd); - fputs("] setcolorspace\n", fd); -} - -static int PS_Lvl2ImageDict(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - int use_rawdata; - uint32_t tile_width, tile_height; - uint16_t predictor, minsamplevalue, maxsamplevalue; - uint32_t repeat_count; - char im_h[64], im_x[64], im_y[64]; - const char *imageOp = "image"; - - if (useImagemask && (bitspersample == 1)) - imageOp = "imagemask"; - - (void)strcpy(im_x, "0"); - (void)snprintf(im_y, sizeof(im_y), "%" PRIu32, h); - (void)snprintf(im_h, sizeof(im_h), "%" PRIu32, h); - tile_width = w; - tile_height = h; - if (TIFFIsTiled(tif)) - { - repeat_count = TIFFNumberOfTiles(tif); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tile_width); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &tile_height); - if (tile_width > w || tile_height > h || (w % tile_width) != 0 || - (h % tile_height != 0)) - { - /* - * The tiles does not fit image width and height. - * Set up a clip rectangle for the image unit square. - */ - fputs("0 0 1 1 rectclip\n", fd); - } - if (tile_width < w) - { - fputs("/im_x 0 def\n", fd); - (void)strcpy(im_x, "im_x neg"); - } - if (tile_height < h) - { - fputs("/im_y 0 def\n", fd); - (void)snprintf(im_y, sizeof(im_y), "%" PRIu32 " im_y sub", h); - } - } - else - { - repeat_count = tf_numberstrips; - tile_height = tf_rowsperstrip; - if (tile_height > h) - tile_height = h; - if (repeat_count > 1) - { - fputs("/im_y 0 def\n", fd); - fprintf(fd, "/im_h %" PRIu32 " def\n", tile_height); - (void)strcpy(im_h, "im_h"); - (void)snprintf(im_y, sizeof(im_y), "%" PRIu32 " im_y sub", h); - } - } - - /* - * Output start of exec block - */ - fputs("{ % exec\n", fd); - - if (repeat_count > 1) - fprintf(fd, "%" PRIu32 " { %% repeat\n", repeat_count); - - /* - * Output filter options and image dictionary. - */ - if (ascii85_g) - fputs(" /im_stream currentfile /ASCII85Decode filter def\n", fd); - fputs(" <<\n", fd); - fputs(" /ImageType 1\n", fd); - fprintf(fd, " /Width %" PRIu32 "\n", tile_width); - /* - * Workaround for some software that may crash when last strip - * of image contains fewer number of scanlines than specified - * by the `/Height' variable. So for stripped images with multiple - * strips we will set `/Height' as `im_h', because one is - * recalculated for each strip - including the (smaller) final strip. - * For tiled images and images with only one strip `/Height' will - * contain number of scanlines in tile (or image height in case of - * one-stripped image). - */ - if (TIFFIsTiled(tif) || tf_numberstrips == 1) - fprintf(fd, " /Height %" PRIu32 "\n", tile_height); - else - fprintf(fd, " /Height im_h\n"); - - if (planarconfiguration == PLANARCONFIG_SEPARATE && samplesperpixel > 1) - fputs(" /MultipleDataSources true\n", fd); - fprintf(fd, " /ImageMatrix [ %" PRIu32 " 0 0 %" PRId32 " %s %s ]\n", w, - -(int32_t)h, im_x, im_y); - fprintf(fd, " /BitsPerComponent %" PRIu16 "\n", bitspersample); - fprintf(fd, " /Interpolate %s\n", interpolate ? "true" : "false"); - - switch (samplesperpixel - extrasamples) - { - case 1: - switch (photometric) - { - case PHOTOMETRIC_MINISBLACK: - fputs(" /Decode [0 1]\n", fd); - break; - case PHOTOMETRIC_MINISWHITE: - switch (compression) - { - case COMPRESSION_CCITTRLE: - case COMPRESSION_CCITTRLEW: - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - /* - * Manage inverting with /Blackis1 flag - * since there might be uncompressed parts - */ - fputs(" /Decode [0 1]\n", fd); - break; - default: - /* - * ERROR... - */ - fputs(" /Decode [1 0]\n", fd); - break; - } - break; - case PHOTOMETRIC_PALETTE: - TIFFGetFieldDefaulted(tif, TIFFTAG_MINSAMPLEVALUE, - &minsamplevalue); - TIFFGetFieldDefaulted(tif, TIFFTAG_MAXSAMPLEVALUE, - &maxsamplevalue); - fprintf(fd, " /Decode [%" PRIu16 " %" PRIu16 "]\n", - minsamplevalue, maxsamplevalue); - break; - default: - /* - * ERROR ? - */ - fputs(" /Decode [0 1]\n", fd); - break; - } - break; - case 3: - switch (photometric) - { - case PHOTOMETRIC_RGB: - fputs(" /Decode [0 1 0 1 0 1]\n", fd); - break; - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - default: - /* - * ERROR?? - */ - fputs(" /Decode [0 1 0 1 0 1]\n", fd); - break; - } - break; - case 4: - /* - * ERROR?? - */ - fputs(" /Decode [0 1 0 1 0 1 0 1]\n", fd); - break; - } - fputs(" /DataSource", fd); - if (planarconfiguration == PLANARCONFIG_SEPARATE && samplesperpixel > 1) - fputs(" [", fd); - if (ascii85_g) - fputs(" im_stream", fd); - else - fputs(" currentfile /ASCIIHexDecode filter", fd); - - use_rawdata = TRUE; - switch (compression) - { - case COMPRESSION_NONE: /* 1: uncompressed */ - break; - case COMPRESSION_CCITTRLE: /* 2: CCITT modified Huffman RLE */ - case COMPRESSION_CCITTRLEW: /* 32771: #1 w/ word alignment */ - case COMPRESSION_CCITTFAX3: /* 3: CCITT Group 3 fax encoding */ - case COMPRESSION_CCITTFAX4: /* 4: CCITT Group 4 fax encoding */ - fputs("\n\t<<\n", fd); - if (compression == COMPRESSION_CCITTFAX3) - { - uint32_t g3_options; - - fputs("\t /EndOfLine true\n", fd); - fputs("\t /EndOfBlock false\n", fd); - if (!TIFFGetField(tif, TIFFTAG_GROUP3OPTIONS, &g3_options)) - g3_options = 0; - if (g3_options & GROUP3OPT_2DENCODING) - fprintf(fd, "\t /K %s\n", im_h); - if (g3_options & GROUP3OPT_UNCOMPRESSED) - fputs("\t /Uncompressed true\n", fd); - if (g3_options & GROUP3OPT_FILLBITS) - fputs("\t /EncodedByteAlign true\n", fd); - } - if (compression == COMPRESSION_CCITTFAX4) - { - uint32_t g4_options; - - fputs("\t /K -1\n", fd); - TIFFGetFieldDefaulted(tif, TIFFTAG_GROUP4OPTIONS, &g4_options); - if (g4_options & GROUP4OPT_UNCOMPRESSED) - fputs("\t /Uncompressed true\n", fd); - } - if (!(tile_width == w && w == 1728U)) - fprintf(fd, "\t /Columns %" PRIu32 "\n", tile_width); - fprintf(fd, "\t /Rows %s\n", im_h); - if (compression == COMPRESSION_CCITTRLE || - compression == COMPRESSION_CCITTRLEW) - { - fputs("\t /EncodedByteAlign true\n", fd); - fputs("\t /EndOfBlock false\n", fd); - } - if (photometric == PHOTOMETRIC_MINISBLACK) - fputs("\t /BlackIs1 true\n", fd); - fprintf(fd, "\t>> /CCITTFaxDecode filter"); - break; - case COMPRESSION_LZW: /* 5: Lempel-Ziv & Welch */ - TIFFGetFieldDefaulted(tif, TIFFTAG_PREDICTOR, &predictor); - if (predictor == 2) - { - fputs("\n\t<<\n", fd); - fprintf(fd, "\t /Predictor %" PRIu16 "\n", predictor); - fprintf(fd, "\t /Columns %" PRIu32 "\n", tile_width); - fprintf(fd, "\t /Colors %" PRIu16 "\n", samplesperpixel); - fprintf(fd, "\t /BitsPerComponent %" PRIu16 "\n", - bitspersample); - fputs("\t>>", fd); - } - fputs(" /LZWDecode filter", fd); - break; - case COMPRESSION_DEFLATE: /* 5: ZIP */ - case COMPRESSION_ADOBE_DEFLATE: - if (level3) - { - TIFFGetFieldDefaulted(tif, TIFFTAG_PREDICTOR, &predictor); - if (predictor > 1) - { - fprintf(fd, "\t %% PostScript Level 3 only."); - fputs("\n\t<<\n", fd); - fprintf(fd, "\t /Predictor %" PRIu16 "\n", predictor); - fprintf(fd, "\t /Columns %" PRIu32 "\n", tile_width); - fprintf(fd, "\t /Colors %" PRIu16 "\n", samplesperpixel); - fprintf(fd, "\t /BitsPerComponent %" PRIu16 "\n", - bitspersample); - fputs("\t>>", fd); - } - fputs(" /FlateDecode filter", fd); - } - else - { - use_rawdata = FALSE; - } - break; - case COMPRESSION_PACKBITS: /* 32773: Macintosh RLE */ - fputs(" /RunLengthDecode filter", fd); - use_rawdata = TRUE; - break; - case COMPRESSION_OJPEG: /* 6: !6.0 JPEG */ - case COMPRESSION_JPEG: /* 7: %JPEG DCT compression */ -#ifdef notdef - /* - * Code not tested yet - */ - fputs(" /DCTDecode filter", fd); - use_rawdata = TRUE; -#else - use_rawdata = FALSE; -#endif - break; - case COMPRESSION_NEXT: /* 32766: NeXT 2-bit RLE */ - case COMPRESSION_THUNDERSCAN: /* 32809: ThunderScan RLE */ - case COMPRESSION_PIXARFILM: /* 32908: Pixar companded 10bit LZW */ - case COMPRESSION_JBIG: /* 34661: ISO JBIG */ - use_rawdata = FALSE; - break; - case COMPRESSION_SGILOG: /* 34676: SGI LogL or LogLuv */ - case COMPRESSION_SGILOG24: /* 34677: SGI 24-bit LogLuv */ - use_rawdata = FALSE; - break; - default: - /* - * ERROR... - */ - use_rawdata = FALSE; - break; - } - if (planarconfiguration == PLANARCONFIG_SEPARATE && samplesperpixel > 1) - { - uint16_t i; - - /* - * NOTE: This code does not work yet... - */ - for (i = 1; i < samplesperpixel; i++) - fputs(" dup", fd); - fputs(" ]", fd); - } - - fprintf(fd, "\n >> %s\n", imageOp); - if (ascii85_g) - fputs(" im_stream status { im_stream flushfile } if\n", fd); - if (repeat_count > 1) - { - if (tile_width < w) - { - fprintf(fd, " /im_x im_x %" PRIu32 " add def\n", tile_width); - if (tile_height < h) - { - fprintf(fd, " im_x %" PRIu32 " ge {\n", w); - fputs(" /im_x 0 def\n", fd); - fprintf(fd, " /im_y im_y %" PRIu32 " add def\n", tile_height); - fputs(" } if\n", fd); - } - } - if (tile_height < h) - { - if (tile_width >= w) - { - fprintf(fd, " /im_y im_y %" PRIu32 " add def\n", tile_height); - if (!TIFFIsTiled(tif)) - { - fprintf(fd, " /im_h %" PRIu32 " im_y sub", h); - fprintf(fd, " dup %" PRIu32 " gt { pop", tile_height); - fprintf(fd, " %" PRIu32 " } if def\n", tile_height); - } - } - } - fputs("} repeat\n", fd); - } - /* - * End of exec function - */ - fputs("}\n", fd); - - return (use_rawdata); -} - -/* Flip the byte order of buffers with 16 bit samples */ -static void PS_FlipBytes(unsigned char *buf, tsize_t count) -{ - int i; - unsigned char temp; - - if (count <= 0 || bitspersample <= 8) - { - return; - } - - count--; - - for (i = 0; i < count; i += 2) - { - temp = buf[i]; - buf[i] = buf[i + 1]; - buf[i + 1] = temp; - } -} - -#define MAXLINE 36 - -int PS_Lvl2page(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - uint16_t fillorder; - int use_rawdata, tiled_image, breaklen = MAXLINE; - uint32_t chunk_no, num_chunks; - uint64_t *bc; - unsigned char *buf_data, *cp; - tsize_t chunk_size, byte_count; - -#if defined(EXP_ASCII85ENCODER) - tsize_t ascii85_l; /* Length, in bytes, of ascii85_p[] data */ - uint8_t *ascii85_p = 0; /* Holds ASCII85 encoded data */ -#endif - - PS_Lvl2colorspace(fd, tif); - use_rawdata = PS_Lvl2ImageDict(fd, tif, w, h); - -/* See http://bugzilla.remotesensing.org/show_bug.cgi?id=80 */ -#ifdef ENABLE_BROKEN_BEGINENDDATA - fputs("%%BeginData:\n", fd); -#endif - fputs("exec\n", fd); - - tiled_image = TIFFIsTiled(tif); - if (tiled_image) - { - num_chunks = TIFFNumberOfTiles(tif); - if (!TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &bc)) - { - TIFFError(filename, - "Can't read bytecounts of tiles at PS_Lvl2page()"); - return (FALSE); - } - } - else - { - num_chunks = TIFFNumberOfStrips(tif); - if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc)) - { - TIFFError(filename, - "Can't read bytecounts of strips at PS_Lvl2page()"); - return (FALSE); - } - } - - if (use_rawdata) - { - chunk_size = (tsize_t)bc[0]; - for (chunk_no = 1; chunk_no < num_chunks; chunk_no++) - if ((tsize_t)bc[chunk_no] > chunk_size) - chunk_size = (tsize_t)bc[chunk_no]; - } - else - { - if (tiled_image) - chunk_size = TIFFTileSize(tif); - else - chunk_size = TIFFStripSize(tif); - } - buf_data = (unsigned char *)limitMalloc(chunk_size); - if (!buf_data) - { - TIFFError(filename, "Can't alloc %" TIFF_SSIZE_FORMAT " bytes for %s.", - chunk_size, tiled_image ? "tiles" : "strips"); - return (FALSE); - } - -#if defined(EXP_ASCII85ENCODER) - if (ascii85_g) - { - /* - * Allocate a buffer to hold the ASCII85 encoded data. Note - * that it is allocated with sufficient room to hold the - * encoded data (5*chunk_size/4) plus the EOD marker (+8) - * and formatting line breaks. The line breaks are more - * than taken care of by using 6*chunk_size/4 rather than - * 5*chunk_size/4. - */ - - ascii85_p = limitMalloc((chunk_size + (chunk_size / 2)) + 8); - - if (!ascii85_p) - { - _TIFFfree(buf_data); - - TIFFError(filename, "Cannot allocate ASCII85 encoding buffer."); - return (FALSE); - } - } -#endif - - TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder); - for (chunk_no = 0; chunk_no < num_chunks; chunk_no++) - { - if (ascii85_g) - Ascii85Init(); - else - breaklen = MAXLINE; - if (use_rawdata) - { - if (tiled_image) - byte_count = - TIFFReadRawTile(tif, chunk_no, buf_data, chunk_size); - else - byte_count = - TIFFReadRawStrip(tif, chunk_no, buf_data, chunk_size); - if (fillorder == FILLORDER_LSB2MSB) - TIFFReverseBits(buf_data, byte_count); - } - else - { - if (tiled_image) - byte_count = - TIFFReadEncodedTile(tif, chunk_no, buf_data, chunk_size); - else - byte_count = - TIFFReadEncodedStrip(tif, chunk_no, buf_data, chunk_size); - } - if (byte_count < 0) - { - TIFFError(filename, "Can't read %s %" PRIu32 ".", - tiled_image ? "tile" : "strip", chunk_no); - if (ascii85_g) - Ascii85Put('\0', fd); - } - /* - * for 16 bits, the two bytes must be most significant - * byte first - */ - if (bitspersample == 16 && !TIFFIsBigEndian(tif)) - { - PS_FlipBytes(buf_data, byte_count); - } - /* - * For images with alpha, matte against a white background; - * i.e. Cback * (1 - Aimage) where Cback = 1. We will fill the - * lower part of the buffer with the modified values. - * - * XXX: needs better solution - */ - if (alpha) - { - int adjust, i, j = 0; - int ncomps = samplesperpixel - extrasamples; - for (i = 0; (i + ncomps) < byte_count; i += samplesperpixel) - { - adjust = 255 - buf_data[i + ncomps]; - switch (ncomps) - { - case 1: - buf_data[j++] = buf_data[i] + adjust; - break; - case 2: - buf_data[j++] = buf_data[i] + adjust; - buf_data[j++] = buf_data[i + 1] + adjust; - break; - case 3: - buf_data[j++] = buf_data[i] + adjust; - buf_data[j++] = buf_data[i + 1] + adjust; - buf_data[j++] = buf_data[i + 2] + adjust; - break; - } - } - byte_count -= j; - } - - if (ascii85_g) - { -#if defined(EXP_ASCII85ENCODER) - ascii85_l = Ascii85EncodeBlock(ascii85_p, 1, buf_data, byte_count); - - if (ascii85_l > 0) - fwrite(ascii85_p, ascii85_l, 1, fd); -#else - for (cp = buf_data; byte_count > 0; byte_count--) - Ascii85Put(*cp++, fd); -#endif - } - else - { - for (cp = buf_data; byte_count > 0; byte_count--) - { - putc(hex[((*cp) >> 4) & 0xf], fd); - putc(hex[(*cp) & 0xf], fd); - cp++; - - if (--breaklen <= 0) - { - putc('\n', fd); - breaklen = MAXLINE; - } - } - } - - if (!ascii85_g) - { - if (level2 || level3) - putc('>', fd); - putc('\n', fd); - } -#if !defined(EXP_ASCII85ENCODER) - else - Ascii85Flush(fd); -#endif - } - -#if defined(EXP_ASCII85ENCODER) - if (ascii85_p) - _TIFFfree(ascii85_p); -#endif - - _TIFFfree(buf_data); -#ifdef ENABLE_BROKEN_BEGINENDDATA - fputs("%%EndData\n", fd); -#endif - return (TRUE); -} - -void PSpage(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - char *imageOp = "image"; - - if (useImagemask && (bitspersample == 1)) - imageOp = "imagemask"; - - if ((level2 || level3) && PS_Lvl2page(fd, tif, w, h)) - return; - ps_bytesperrow = tf_bytesperrow - (extrasamples * bitspersample / 8) * w; - switch (photometric) - { - case PHOTOMETRIC_RGB: - if (planarconfiguration == PLANARCONFIG_CONTIG) - { - fprintf(fd, "%s", RGBcolorimage); - PSColorContigPreamble(fd, w, h, 3); - PSDataColorContig(fd, tif, w, h, 3); - } - else - { - PSColorSeparatePreamble(fd, w, h, 3); - PSDataColorSeparate(fd, tif, w, h, 3); - } - break; - case PHOTOMETRIC_SEPARATED: - /* XXX should emit CMYKcolorimage */ - if (planarconfiguration == PLANARCONFIG_CONTIG) - { - PSColorContigPreamble(fd, w, h, 4); - PSDataColorContig(fd, tif, w, h, 4); - } - else - { - PSColorSeparatePreamble(fd, w, h, 4); - PSDataColorSeparate(fd, tif, w, h, 4); - } - break; - case PHOTOMETRIC_PALETTE: - fprintf(fd, "%s", RGBcolorimage); - PhotoshopBanner(fd, w, h, 1, 3, "false 3 colorimage"); - fprintf(fd, "/scanLine %" TIFF_SSIZE_FORMAT " string def\n", - ps_bytesperrow * 3); - fprintf(fd, "%" PRIu32 " %" PRIu32 " 8\n", w, h); - fprintf(fd, "[%" PRIu32 " 0 0 -%" PRIu32 " 0 %" PRIu32 "]\n", w, h, - h); - fprintf(fd, "{currentfile scanLine readhexstring pop} bind\n"); - fprintf(fd, "false 3 colorimage\n"); - PSDataPalette(fd, tif, w, h); - break; - case PHOTOMETRIC_MINISBLACK: - case PHOTOMETRIC_MINISWHITE: - PhotoshopBanner(fd, w, h, 1, 1, imageOp); - fprintf(fd, "/scanLine %" TIFF_SSIZE_FORMAT " string def\n", - ps_bytesperrow); - fprintf(fd, "%" PRIu32 " %" PRIu32 " %" PRIu16 "\n", w, h, - bitspersample); - fprintf(fd, "[%" PRIu32 " 0 0 -%" PRIu32 " 0 %" PRIu32 "]\n", w, h, - h); - fprintf(fd, "{currentfile scanLine readhexstring pop} bind\n"); - fprintf(fd, "%s\n", imageOp); - PSDataBW(fd, tif, w, h); - break; - } - putc('\n', fd); -} - -void PSColorContigPreamble(FILE *fd, uint32_t w, uint32_t h, int nc) -{ - ps_bytesperrow = nc * (tf_bytesperrow / samplesperpixel); - PhotoshopBanner(fd, w, h, 1, nc, "false %d colorimage"); - fprintf(fd, "/line %" TIFF_SSIZE_FORMAT " string def\n", ps_bytesperrow); - fprintf(fd, "%" PRIu32 " %" PRIu32 " %" PRIu16 "\n", w, h, bitspersample); - fprintf(fd, "[%" PRIu32 " 0 0 -%" PRIu32 " 0 %" PRIu32 "]\n", w, h, h); - fprintf(fd, "{currentfile line readhexstring pop} bind\n"); - fprintf(fd, "false %d colorimage\n", nc); -} - -void PSColorSeparatePreamble(FILE *fd, uint32_t w, uint32_t h, int nc) -{ - int i; - PhotoshopBanner(fd, w, h, ps_bytesperrow, nc, "true %d colorimage"); - for (i = 0; i < nc; i++) - fprintf(fd, "/line%d %" TIFF_SSIZE_FORMAT " string def\n", i, - ps_bytesperrow); - fprintf(fd, "%" PRIu32 " %" PRIu32 " %" PRIu16 "\n", w, h, bitspersample); - fprintf(fd, "[%" PRIu32 " 0 0 -%" PRIu32 " 0 %" PRIu32 "] \n", w, h, h); - for (i = 0; i < nc; i++) - fprintf(fd, "{currentfile line%d readhexstring pop}bind\n", i); - fprintf(fd, "true %d colorimage\n", nc); -} - -#define DOBREAK(len, howmany, fd) \ - if (((len) -= (howmany)) <= 0) \ - { \ - putc('\n', fd); \ - (len) = MAXLINE - (howmany); \ - } - -static inline void puthex(unsigned int c, FILE *fd) -{ - putc(hex[((c) >> 4) & 0xf], fd); - putc(hex[(c)&0xf], fd); -} - -void PSDataColorContig(FILE *fd, TIFF *tif, uint32_t w, uint32_t h, int nc) -{ - uint32_t row; - int breaklen = MAXLINE, es = samplesperpixel - nc; - tsize_t cc; - unsigned char *tf_buf; - unsigned char *cp, c; - - (void)w; - if (es < 0) - { - TIFFError(filename, - "Inconsistent value of es: %d (samplesperpixel=%" PRIu16 - ", nc=%d)", - es, samplesperpixel, nc); - return; - } - tf_buf = (unsigned char *)limitMalloc(tf_bytesperrow); - if (tf_buf == NULL) - { - TIFFError(filename, "No space for scanline buffer"); - return; - } - for (row = 0; row < h; row++) - { - if (TIFFReadScanline(tif, tf_buf, row, 0) < 0) - break; - cp = tf_buf; - /* - * for 16 bits, the two bytes must be most significant - * byte first - */ - if (bitspersample == 16 && !HOST_BIGENDIAN) - { - PS_FlipBytes(cp, tf_bytesperrow); - } - if (alpha) - { - int adjust; - /* - * the code inside this loop reads nc bytes + 1 extra byte (for - * adjust) - */ - for (cc = 0; (cc + nc) < tf_bytesperrow; cc += samplesperpixel) - { - DOBREAK(breaklen, nc, fd); - /* - * For images with alpha, matte against - * a white background; i.e. - * Cback * (1 - Aimage) - * where Cback = 1. - */ - adjust = 255 - cp[nc]; - for (int i = 0; i < nc; ++i) - { - c = *cp++ + adjust; - puthex(c, fd); - } - cp += es; - } - } - else - { - /* - * the code inside this loop reads nc bytes per iteration - */ - for (cc = 0; (cc + nc) <= tf_bytesperrow; cc += samplesperpixel) - { - DOBREAK(breaklen, nc, fd); - for (int i = 0; i < nc; ++i) - { - c = *cp++; - puthex(c, fd); - } - cp += es; - } - } - } - _TIFFfree((char *)tf_buf); -} - -void PSDataColorSeparate(FILE *fd, TIFF *tif, uint32_t w, uint32_t h, int nc) -{ - uint32_t row; - int breaklen = MAXLINE; - tsize_t cc; - tsample_t s, maxs; - unsigned char *tf_buf; - unsigned char *cp, c; - - (void)w; - tf_buf = (unsigned char *)limitMalloc(tf_bytesperrow); - if (tf_buf == NULL) - { - TIFFError(filename, "No space for scanline buffer"); - return; - } - maxs = (samplesperpixel > nc ? nc : samplesperpixel); - for (row = 0; row < h; row++) - { - for (s = 0; s < maxs; s++) - { - if (TIFFReadScanline(tif, tf_buf, row, s) < 0) - goto end_loop; - for (cp = tf_buf, cc = 0; cc < tf_bytesperrow; cc++) - { - DOBREAK(breaklen, 1, fd); - c = *cp++; - puthex(c, fd); - } - } - } -end_loop: - _TIFFfree((char *)tf_buf); -} - -#define PUTRGBHEX(c, fd) \ - puthex(rmap[c], fd); \ - puthex(gmap[c], fd); \ - puthex(bmap[c], fd) - -void PSDataPalette(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - uint16_t *rmap, *gmap, *bmap; - uint32_t row; - int breaklen = MAXLINE, nc; - tsize_t cc; - unsigned char *tf_buf; - unsigned char *cp, c; - - (void)w; - if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) - { - TIFFError(filename, "Palette image w/o \"Colormap\" tag"); - return; - } - switch (bitspersample) - { - case 8: - case 4: - case 2: - case 1: - break; - default: - TIFFError(filename, "Depth %" PRIu16 " not supported", - bitspersample); - return; - } - nc = 3 * (8 / bitspersample); - tf_buf = (unsigned char *)limitMalloc(tf_bytesperrow); - if (tf_buf == NULL) - { - TIFFError(filename, "No space for scanline buffer"); - return; - } - if (checkcmap(tif, 1 << bitspersample, rmap, gmap, bmap) == 16) - { - int i; -#define CVT(x) ((unsigned short)(((x)*255) / ((1U << 16) - 1))) - for (i = (1 << bitspersample) - 1; i >= 0; i--) - { - rmap[i] = CVT(rmap[i]); - gmap[i] = CVT(gmap[i]); - bmap[i] = CVT(bmap[i]); - } -#undef CVT - } - for (row = 0; row < h; row++) - { - if (TIFFReadScanline(tif, tf_buf, row, 0) < 0) - goto end_loop; - for (cp = tf_buf, cc = 0; cc < tf_bytesperrow; cc++) - { - DOBREAK(breaklen, nc, fd); - switch (bitspersample) - { - case 8: - c = *cp++; - PUTRGBHEX(c, fd); - break; - case 4: - c = *cp++; - PUTRGBHEX(c & 0xf, fd); - c >>= 4; - PUTRGBHEX(c, fd); - break; - case 2: - c = *cp++; - PUTRGBHEX(c & 0x3, fd); - c >>= 2; - PUTRGBHEX(c & 0x3, fd); - c >>= 2; - PUTRGBHEX(c & 0x3, fd); - c >>= 2; - PUTRGBHEX(c, fd); - break; - case 1: - c = *cp++; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c & 0x1, fd); - c >>= 1; - PUTRGBHEX(c, fd); - break; - } - } - } -end_loop: - _TIFFfree((char *)tf_buf); -} - -void PSDataBW(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - int breaklen = MAXLINE; - unsigned char *tf_buf; - unsigned char *cp; - tsize_t stripsize = TIFFStripSize(tif); - tstrip_t s; - -#if defined(EXP_ASCII85ENCODER) - tsize_t ascii85_l; /* Length, in bytes, of ascii85_p[] data */ - uint8_t *ascii85_p = 0; /* Holds ASCII85 encoded data */ -#endif - - (void)w; - (void)h; - tf_buf = (unsigned char *)limitMalloc(stripsize); - if (tf_buf == NULL) - { - TIFFError(filename, "No space for scanline buffer"); - return; - } - - // FIXME - memset(tf_buf, 0, stripsize); - -#if defined(EXP_ASCII85ENCODER) - if (ascii85_g) - { - /* - * Allocate a buffer to hold the ASCII85 encoded data. Note - * that it is allocated with sufficient room to hold the - * encoded data (5*stripsize/4) plus the EOD marker (+8) - * and formatting line breaks. The line breaks are more - * than taken care of by using 6*stripsize/4 rather than - * 5*stripsize/4. - */ - - ascii85_p = limitMalloc((stripsize + (stripsize / 2)) + 8); - - if (!ascii85_p) - { - _TIFFfree(tf_buf); - - TIFFError(filename, "Cannot allocate ASCII85 encoding buffer."); - return; - } - } -#endif - - if (ascii85_g) - Ascii85Init(); - - for (s = 0; s < TIFFNumberOfStrips(tif); s++) - { - tmsize_t cc = TIFFReadEncodedStrip(tif, s, tf_buf, stripsize); - if (cc < 0) - { - TIFFError(filename, "Can't read strip"); - break; - } - cp = tf_buf; - if (photometric == PHOTOMETRIC_MINISWHITE) - { - for (cp += cc; --cp >= tf_buf;) - *cp = ~*cp; - cp++; - } - /* - * for 16 bits, the two bytes must be most significant - * byte first - */ - if (bitspersample == 16 && !HOST_BIGENDIAN) - { - PS_FlipBytes(cp, cc); - } - if (ascii85_g) - { -#if defined(EXP_ASCII85ENCODER) - if (alpha) - { - int adjust, i; - for (i = 0; i < (cc - 1); i += 2) - { - adjust = 255 - cp[i + 1]; - cp[i / 2] = cp[i] + adjust; - } - cc /= 2; - } - - ascii85_l = Ascii85EncodeBlock(ascii85_p, 1, cp, cc); - - if (ascii85_l > 0) - fwrite(ascii85_p, ascii85_l, 1, fd); -#else - while (cc-- > 0) - Ascii85Put(*cp++, fd); -#endif /* EXP_ASCII85_ENCODER */ - } - else - { - unsigned char c; - - if (alpha) - { - int adjust; - while (cc-- > 1) - { - DOBREAK(breaklen, 1, fd); - /* - * For images with alpha, matte against - * a white background; i.e. - * Cback * (1 - Aimage) - * where Cback = 1. - */ - adjust = 255 - cp[1]; - c = *cp++ + adjust; - puthex(c, fd); - cp++, cc--; - } - } - else - { - while (cc-- > 0) - { - c = *cp++; - DOBREAK(breaklen, 1, fd); - puthex(c, fd); - } - } - } - } - - if (!ascii85_g) - { - if (level2 || level3) - fputs(">\n", fd); - } -#if !defined(EXP_ASCII85ENCODER) - else - Ascii85Flush(fd); -#else - if (ascii85_p) - _TIFFfree(ascii85_p); -#endif - - _TIFFfree(tf_buf); -} - -void PSRawDataBW(FILE *fd, TIFF *tif, uint32_t w, uint32_t h) -{ - uint64_t *bc; - uint32_t bufsize; - int breaklen = MAXLINE; - tmsize_t cc; - uint16_t fillorder; - unsigned char *tf_buf; - unsigned char *cp, c; - tstrip_t s; - -#if defined(EXP_ASCII85ENCODER) - tsize_t ascii85_l; /* Length, in bytes, of ascii85_p[] data */ - uint8_t *ascii85_p = 0; /* Holds ASCII85 encoded data */ -#endif - - (void)w; - (void)h; - TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder); - if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc)) - { - TIFFError(filename, "Can't read bytecounts of strips at PSRawDataBW()"); - return; - } - - /* - * Find largest strip: - */ - - bufsize = (uint32_t)bc[0]; - - for (s = 0; ++s < tf_numberstrips;) - { - if (bc[s] > bufsize) - bufsize = (uint32_t)bc[s]; - } - - tf_buf = (unsigned char *)limitMalloc(bufsize); - if (tf_buf == NULL) - { - TIFFError(filename, "No space for strip buffer"); - return; - } - -#if defined(EXP_ASCII85ENCODER) - if (ascii85_g) - { - /* - * Allocate a buffer to hold the ASCII85 encoded data. Note - * that it is allocated with sufficient room to hold the - * encoded data (5*bufsize/4) plus the EOD marker (+8) - * and formatting line breaks. The line breaks are more - * than taken care of by using 6*bufsize/4 rather than - * 5*bufsize/4. - */ - - ascii85_p = limitMalloc((bufsize + (bufsize / 2)) + 8); - - if (!ascii85_p) - { - _TIFFfree(tf_buf); - - TIFFError(filename, "Cannot allocate ASCII85 encoding buffer."); - return; - } - } -#endif - - for (s = 0; s < tf_numberstrips; s++) - { - cc = TIFFReadRawStrip(tif, s, tf_buf, (tmsize_t)bc[s]); - if (cc < 0) - { - TIFFError(filename, "Can't read strip"); - break; - } - if (fillorder == FILLORDER_LSB2MSB) - TIFFReverseBits(tf_buf, cc); - if (!ascii85_g) - { - for (cp = tf_buf; cc > 0; cc--) - { - DOBREAK(breaklen, 1, fd); - c = *cp++; - puthex(c, fd); - } - fputs(">\n", fd); - breaklen = MAXLINE; - } - else - { - Ascii85Init(); -#if defined(EXP_ASCII85ENCODER) - ascii85_l = Ascii85EncodeBlock(ascii85_p, 1, tf_buf, cc); - - if (ascii85_l > 0) - fwrite(ascii85_p, ascii85_l, 1, fd); -#else - for (cp = tf_buf; cc > 0; cc--) - Ascii85Put(*cp++, fd); - Ascii85Flush(fd); -#endif /* EXP_ASCII85ENCODER */ - } - } - _TIFFfree((char *)tf_buf); - -#if defined(EXP_ASCII85ENCODER) - if (ascii85_p) - _TIFFfree(ascii85_p); -#endif -} - -void Ascii85Init(void) -{ - ascii85breaklen = 2 * MAXLINE; - ascii85count = 0; -} - -static char *Ascii85Encode(unsigned char *raw) -{ - static char encoded[6]; - uint32_t word; - - word = (((raw[0] << 8) + raw[1]) << 16) + (raw[2] << 8) + raw[3]; - if (word != 0L) - { - uint32_t q; - uint16_t w1; - - q = word / (85L * 85 * 85 * 85); /* actually only a byte */ - encoded[0] = (char)(q + '!'); - - word -= q * (85L * 85 * 85 * 85); - q = word / (85L * 85 * 85); - encoded[1] = (char)(q + '!'); - - word -= q * (85L * 85 * 85); - q = word / (85 * 85); - encoded[2] = (char)(q + '!'); - - w1 = (uint16_t)(word - q * (85L * 85)); - encoded[3] = (char)((w1 / 85) + '!'); - encoded[4] = (char)((w1 % 85) + '!'); - encoded[5] = '\0'; - } - else - encoded[0] = 'z', encoded[1] = '\0'; - return (encoded); -} - -void Ascii85Put(unsigned char code, FILE *fd) -{ - ascii85buf[ascii85count++] = code; - if (ascii85count >= 4) - { - unsigned char *p; - int n; - - for (n = ascii85count, p = ascii85buf; n >= 4; n -= 4, p += 4) - { - char *cp; - for (cp = Ascii85Encode(p); *cp; cp++) - { - putc(*cp, fd); - if (--ascii85breaklen == 0) - { - putc('\n', fd); - ascii85breaklen = 2 * MAXLINE; - } - } - } - _TIFFmemcpy(ascii85buf, p, n); - ascii85count = n; - } -} - -void Ascii85Flush(FILE *fd) -{ - if (ascii85count > 0) - { - char *res; - _TIFFmemset(&ascii85buf[ascii85count], 0, 3); - res = Ascii85Encode(ascii85buf); - fwrite(res[0] == 'z' ? "!!!!" : res, ascii85count + 1, 1, fd); - } - fputs("~>\n", fd); -} -#if defined(EXP_ASCII85ENCODER) - -#define A85BREAKCNTR ascii85breaklen -#define A85BREAKLEN (2 * MAXLINE) - -/***************************************************************************** - * - * Name: Ascii85EncodeBlock( ascii85_p, f_eod, raw_p, raw_l ) - * - * Description: This routine will encode the raw data in the buffer described - * by raw_p and raw_l into ASCII85 format and store the encoding - * in the buffer given by ascii85_p. - * - * Parameters: ascii85_p - A buffer supplied by the caller which will - * contain the encoded ASCII85 data. - * f_eod - Flag: Nz means to end the encoded buffer with - * an End-Of-Data marker. - * raw_p - Pointer to the buffer of data to be encoded - * raw_l - Number of bytes in raw_p[] to be encoded - * - * Returns: (int) < 0 Error, see errno - * >= 0 Number of bytes written to ascii85_p[]. - * - * Notes: An external variable given by A85BREAKCNTR is used to - * determine when to insert newline characters into the - * encoded data. As each byte is placed into ascii85_p this - * external is decremented. If the variable is decrement to - * or past zero then a newline is inserted into ascii85_p - * and the A85BREAKCNTR is then reset to A85BREAKLEN. - * Note: for efficiency reasons the A85BREAKCNTR variable - * is not actually checked on *every* character - * placed into ascii85_p but often only for every - * 5 characters. - * - * THE CALLER IS RESPONSIBLE FOR ENSURING THAT ASCII85_P[] IS - * SUFFICIENTLY LARGE TO THE ENCODED DATA! - * You will need at least 5 * (raw_l/4) bytes plus space for - * newline characters and space for an EOD marker (if - * requested). A safe calculation is to use 6*(raw_l/4) + 8 - * to size ascii85_p. - * - *****************************************************************************/ - -tsize_t Ascii85EncodeBlock(uint8_t *ascii85_p, unsigned f_eod, - const uint8_t *raw_p, tsize_t raw_l) - -{ - char ascii85[5]; /* Encoded 5 tuple */ - tsize_t ascii85_l; /* Number of bytes written to ascii85_p[] */ - int rc; /* Return code */ - uint32_t val32; /* Unencoded 4 tuple */ - - ascii85_l = 0; /* Nothing written yet */ - - if (raw_p) - { - --raw_p; /* Prepare for pre-increment fetches */ - - for (; raw_l > 3; raw_l -= 4) - { - val32 = (uint32_t) * (++raw_p) << 24; - val32 += (uint32_t) * (++raw_p) << 16; - val32 += (uint32_t) * (++raw_p) << 8; - val32 += (uint32_t) * (++raw_p); - - if (val32 == 0) /* Special case */ - { - ascii85_p[ascii85_l] = 'z'; - rc = 1; - } - - else - { - ascii85[4] = (char)((val32 % 85) + 33); - val32 /= 85; - - ascii85[3] = (char)((val32 % 85) + 33); - val32 /= 85; - - ascii85[2] = (char)((val32 % 85) + 33); - val32 /= 85; - - ascii85[1] = (char)((val32 % 85) + 33); - ascii85[0] = (char)((val32 / 85) + 33); - - _TIFFmemcpy(&ascii85_p[ascii85_l], ascii85, sizeof(ascii85)); - rc = sizeof(ascii85); - } - - ascii85_l += rc; - - if ((A85BREAKCNTR -= rc) <= 0) - { - ascii85_p[ascii85_l] = '\n'; - ++ascii85_l; - A85BREAKCNTR = A85BREAKLEN; - } - } - - /* - * Output any straggler bytes: - */ - - if (raw_l > 0) - { - tsize_t len; /* Output this many bytes */ - - len = raw_l + 1; - val32 = (uint32_t) * ++raw_p << 24; /* Prime the pump */ - - if (--raw_l > 0) - val32 += *(++raw_p) << 16; - if (--raw_l > 0) - val32 += *(++raw_p) << 8; - - val32 /= 85; - - ascii85[3] = (char)((val32 % 85) + 33); - val32 /= 85; - - ascii85[2] = (char)((val32 % 85) + 33); - val32 /= 85; - - ascii85[1] = (char)((val32 % 85) + 33); - ascii85[0] = (char)((val32 / 85) + 33); - - _TIFFmemcpy(&ascii85_p[ascii85_l], ascii85, len); - ascii85_l += len; - } - } - - /* - * If requested add an ASCII85 End Of Data marker: - */ - - if (f_eod) - { - ascii85_p[ascii85_l++] = '~'; - ascii85_p[ascii85_l++] = '>'; - ascii85_p[ascii85_l++] = '\n'; - } - - return (ascii85_l); - -} /* Ascii85EncodeBlock() */ - -#endif /* EXP_ASCII85ENCODER */ - -static const char usage_info[] = - "Convert a TIFF image to PostScript\n\n" - "usage: tiff2ps [options] input.tif ...\n" - "where options are:\n" - " -1 generate PostScript Level 1 (default)\n" - " -2 generate PostScript Level 2\n" - " -3 generate PostScript Level 3\n" - " -8 disable use of ASCII85 encoding with PostScript Level 2/3\n" - " -a convert all directories in file (default is first), Not " - "EPS\n" - " -b # set the bottom margin to # inches\n" - " -c center image (-b and -l still add to this)\n" - " -C name set postscript document creator name\n" - " -d # set initial directory to # counting from zero\n" - " -D enable duplex printing (two pages per sheet of paper)\n" - " -e generate Encapsulated PostScript (EPS) (implies -z)\n" - " -h # set printed page height to # inches (no default)\n" - " -w # set printed page width to # inches (no default)\n" - " -H # split image if height is more than # inches\n" - " -W # split image if width is more than # inches\n" - " -L # overLap split images by # inches\n" - " -i # enable/disable (Nz/0) pixel interpolation (default: " - "enable)\n" - " -l # set the left margin to # inches\n" - " -m use \"imagemask\" operator instead of \"image\"\n" - " -M size set the memory allocation limit in MiB. 0 to disable " - "limit\n" - " -o # convert directory at file offset # bytes\n" - " -O file write PostScript to file instead of standard output\n" - " -p generate regular (non-encapsulated) PostScript\n" - " -P L or P set optional PageOrientation DSC comment to Landscape or " - "Portrait\n" - " -r # or auto rotate by 90, 180, 270 degrees or auto\n" - " -s generate PostScript for a single image\n" - " -t name set postscript document title. Otherwise the filename is " - "used\n" - " -T print pages for top edge binding\n" - " -x override resolution units as centimeters\n" - " -y override resolution units as inches\n" - " -z enable printing in the deadzone (only for PostScript Level " - "2/3)\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/tiff2rgba.c b/third_party/libtiff/tools/tiff2rgba.c deleted file mode 100644 index d368958..0000000 --- a/third_party/libtiff/tools/tiff2rgba.c +++ /dev/null @@ -1,645 +0,0 @@ -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) - -#ifndef howmany -#define howmany(x, y) (((x) + ((y)-1)) / (y)) -#endif -#define roundup(x, y) (howmany(x, y) * ((uint32_t)(y))) - -static uint16_t compression = COMPRESSION_PACKBITS; -static uint32_t rowsperstrip = (uint32_t)-1; -static int process_by_block = 0; /* default is whole image at once */ -static int no_alpha = 0; -static int background = 0; -static int bigtiff_output = 0; -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -static int tiffcvt(TIFF *in, TIFF *out); -static void usage(int code); - -int main(int argc, char *argv[]) -{ - TIFF *in, *out; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "c:r:t:B:bn8hM:")) != -1) - switch (c) - { - case 'M': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case 'b': - process_by_block = 1; - break; - - case 'c': - if (streq(optarg, "none")) - compression = COMPRESSION_NONE; - else if (streq(optarg, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (streq(optarg, "lzw")) - compression = COMPRESSION_LZW; - else if (streq(optarg, "jpeg")) - compression = COMPRESSION_JPEG; - else if (streq(optarg, "zip")) - compression = COMPRESSION_ADOBE_DEFLATE; - else - usage(EXIT_FAILURE); - break; - - case 'r': - rowsperstrip = atoi(optarg); - break; - - case 't': - rowsperstrip = atoi(optarg); - break; - - case 'B': - background = atoi(optarg) & 0xFF; - break; - - case 'n': - no_alpha = 1; - break; - - case '8': - bigtiff_output = 1; - break; - - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - - if (argc - optind < 2) - usage(EXIT_FAILURE); - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return EXIT_FAILURE; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - out = TIFFOpenExt(argv[argc - 1], bigtiff_output ? "w8" : "w", opts); - if (out == NULL) - { - TIFFOpenOptionsFree(opts); - return (EXIT_FAILURE); - } - - for (; optind < argc - 1; optind++) - { - in = TIFFOpenExt(argv[optind], "r", opts); - if (in != NULL) - { - do - { - if (!tiffcvt(in, out) || !TIFFWriteDirectory(out)) - { - (void)TIFFClose(out); - (void)TIFFClose(in); - TIFFOpenOptionsFree(opts); - return (1); - } - } while (TIFFReadDirectory(in)); - (void)TIFFClose(in); - } - } - TIFFOpenOptionsFree(opts); - (void)TIFFClose(out); - return (EXIT_SUCCESS); -} - -static int cvt_by_tile(TIFF *in, TIFF *out) - -{ - uint32_t *raster; /* retrieve RGBA image */ - uint32_t width, height; /* image width & height */ - uint32_t tile_width, tile_height; - uint32_t row, col; - uint32_t *wrk_line; - int ok = 1; - uint32_t rastersize, wrk_linesize; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - - if (!TIFFGetField(in, TIFFTAG_TILEWIDTH, &tile_width) || - !TIFFGetField(in, TIFFTAG_TILELENGTH, &tile_height)) - { - TIFFError(TIFFFileName(in), "Source image not tiled"); - return (0); - } - - TIFFSetField(out, TIFFTAG_TILEWIDTH, tile_width); - TIFFSetField(out, TIFFTAG_TILELENGTH, tile_height); - - /* - * Allocate tile buffer - */ - rastersize = tile_width * tile_height * sizeof(uint32_t); - if (tile_width != (rastersize / tile_height) / sizeof(uint32_t)) - { - TIFFError(TIFFFileName(in), - "Integer overflow when calculating raster buffer"); - exit(EXIT_FAILURE); - } - raster = (uint32_t *)_TIFFmalloc(rastersize); - if (raster == 0) - { - TIFFError(TIFFFileName(in), "No space for raster buffer"); - return (0); - } - - /* - * Allocate a scanline buffer for swapping during the vertical - * mirroring pass. - */ - wrk_linesize = tile_width * sizeof(uint32_t); - if (tile_width != wrk_linesize / sizeof(uint32_t)) - { - TIFFError(TIFFFileName(in), - "Integer overflow when calculating wrk_line buffer"); - exit(EXIT_FAILURE); - } - wrk_line = (uint32_t *)_TIFFmalloc(wrk_linesize); - if (!wrk_line) - { - TIFFError(TIFFFileName(in), "No space for raster scanline buffer"); - ok = 0; - } - - /* - * Loop over the tiles. - */ - for (row = 0; ok && row < height; row += tile_height) - { - for (col = 0; ok && col < width; col += tile_width) - { - uint32_t i_row; - - /* Read the tile into an RGBA array */ - if (!TIFFReadRGBATile(in, col, row, raster)) - { - ok = 0; - break; - } - - /* - * XXX: raster array has 4-byte unsigned integer type, that is why - * we should rearrange it here. - */ -#if HOST_BIGENDIAN - TIFFSwabArrayOfLong(raster, tile_width * tile_height); -#endif - - /* - * For some reason the TIFFReadRGBATile() function chooses the - * lower left corner as the origin. Vertically mirror scanlines. - */ - for (i_row = 0; i_row < tile_height / 2; i_row++) - { - uint32_t *top_line, *bottom_line; - - top_line = raster + tile_width * i_row; - bottom_line = raster + tile_width * (tile_height - i_row - 1); - - _TIFFmemcpy(wrk_line, top_line, 4 * tile_width); - _TIFFmemcpy(top_line, bottom_line, 4 * tile_width); - _TIFFmemcpy(bottom_line, wrk_line, 4 * tile_width); - } - - /* - * Write out the result in a tile. - */ - - if (TIFFWriteEncodedTile(out, TIFFComputeTile(out, col, row, 0, 0), - raster, - 4 * tile_width * tile_height) == -1) - { - ok = 0; - break; - } - } - } - - _TIFFfree(raster); - _TIFFfree(wrk_line); - - return ok; -} - -static int cvt_by_strip(TIFF *in, TIFF *out) - -{ - uint32_t *raster; /* retrieve RGBA image */ - uint32_t width, height; /* image width & height */ - uint32_t row; - uint32_t *wrk_line; - int ok = 1; - uint32_t rastersize, wrk_linesize; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - - if (!TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip)) - { - TIFFError(TIFFFileName(in), "Source image not in strips"); - return (0); - } - - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - /* - * Allocate strip buffer - */ - rastersize = width * rowsperstrip * sizeof(uint32_t); - if (width != (rastersize / rowsperstrip) / sizeof(uint32_t)) - { - TIFFError(TIFFFileName(in), - "Integer overflow when calculating raster buffer"); - exit(EXIT_FAILURE); - } - raster = (uint32_t *)_TIFFmalloc(rastersize); - if (raster == 0) - { - TIFFError(TIFFFileName(in), "No space for raster buffer"); - return (0); - } - - /* - * Allocate a scanline buffer for swapping during the vertical - * mirroring pass. - */ - wrk_linesize = width * sizeof(uint32_t); - if (width != wrk_linesize / sizeof(uint32_t)) - { - TIFFError(TIFFFileName(in), - "Integer overflow when calculating wrk_line buffer"); - exit(EXIT_FAILURE); - } - wrk_line = (uint32_t *)_TIFFmalloc(wrk_linesize); - if (!wrk_line) - { - TIFFError(TIFFFileName(in), "No space for raster scanline buffer"); - ok = 0; - } - - /* - * Loop over the strips. - */ - for (row = 0; ok && row < height; row += rowsperstrip) - { - int rows_to_write, i_row; - - /* Read the strip into an RGBA array */ - if (!TIFFReadRGBAStrip(in, row, raster)) - { - ok = 0; - break; - } - - /* - * XXX: raster array has 4-byte unsigned integer type, that is why - * we should rearrange it here. - */ -#if HOST_BIGENDIAN - TIFFSwabArrayOfLong(raster, width * rowsperstrip); -#endif - - /* - * Figure out the number of scanlines actually in this strip. - */ - if (row + rowsperstrip > height) - rows_to_write = height - row; - else - rows_to_write = rowsperstrip; - - /* - * For some reason the TIFFReadRGBAStrip() function chooses the - * lower left corner as the origin. Vertically mirror scanlines. - */ - - for (i_row = 0; i_row < rows_to_write / 2; i_row++) - { - uint32_t *top_line, *bottom_line; - - top_line = raster + width * i_row; - bottom_line = raster + width * (rows_to_write - i_row - 1); - - _TIFFmemcpy(wrk_line, top_line, 4 * width); - _TIFFmemcpy(top_line, bottom_line, 4 * width); - _TIFFmemcpy(bottom_line, wrk_line, 4 * width); - } - - /* - * Write out the result in a strip - */ - - if (TIFFWriteEncodedStrip(out, row / rowsperstrip, raster, - 4 * rows_to_write * width) == -1) - { - ok = 0; - break; - } - } - - _TIFFfree(raster); - _TIFFfree(wrk_line); - - return ok; -} - -/* - * cvt_whole_image() - * - * read the whole image into one big RGBA buffer and then write out - * strips from that. This is using the traditional TIFFReadRGBAImage() - * API that we trust. - */ - -static int cvt_whole_image(TIFF *in, TIFF *out) - -{ - uint32_t *raster; /* retrieve RGBA image */ - uint32_t width, height; /* image width & height */ - uint32_t row; - size_t pixel_count; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - pixel_count = (size_t)width * height; - - /* XXX: Check the integer overflow. */ - if (!width || !height || SIZE_MAX / width < height) - { - TIFFError( - TIFFFileName(in), - "Malformed input file; can't allocate buffer for raster of %" PRIu32 - "x%" PRIu32 " size", - width, height); - return 0; - } - if (maxMalloc != 0 && - (tmsize_t)pixel_count * (tmsize_t)sizeof(uint32_t) > maxMalloc) - { - TIFFError(TIFFFileName(in), - "Raster size %" TIFF_SIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT "), try -b option.", - pixel_count * sizeof(uint32_t), maxMalloc); - return 0; - } - - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - - raster = (uint32_t *)_TIFFCheckMalloc(in, pixel_count, sizeof(uint32_t), - "raster buffer"); - if (raster == 0) - { - TIFFError(TIFFFileName(in), - "Failed to allocate buffer (%" TIFF_SIZE_FORMAT - " elements of %" TIFF_SIZE_FORMAT " each)", - pixel_count, sizeof(uint32_t)); - return (0); - } - - /* Read the image in one chunk into an RGBA array */ - if (!TIFFReadRGBAImageOriented(in, width, height, raster, - ORIENTATION_TOPLEFT, 0)) - { - _TIFFfree(raster); - return (0); - } - - /* - * XXX: raster array has 4-byte unsigned integer type, that is why - * we should rearrange it here. - */ -#if HOST_BIGENDIAN - TIFFSwabArrayOfLong(raster, width * height); -#endif - - /* - * Do we want to strip away alpha components? - */ - if (no_alpha) - { - size_t count = pixel_count; - unsigned char *src, *dst; - - src = dst = (unsigned char *)raster; - while (count > 0) - { - /* do alpha compositing */ - const int src_alpha = src[3]; - const int background_contribution = background * (0xFF - src_alpha); - *(dst++) = (*(src)*src_alpha + background_contribution) / 0xFF; - src++; - *(dst++) = (*(src)*src_alpha + background_contribution) / 0xFF; - src++; - *(dst++) = (*(src)*src_alpha + background_contribution) / 0xFF; - src++; - src++; - count--; - } - } - - /* - * Write out the result in strips - */ - for (row = 0; row < height; row += rowsperstrip) - { - unsigned char *raster_strip; - int rows_to_write; - int bytes_per_pixel; - - if (no_alpha) - { - raster_strip = ((unsigned char *)raster) + 3 * row * width; - bytes_per_pixel = 3; - } - else - { - raster_strip = (unsigned char *)(raster + row * width); - bytes_per_pixel = 4; - } - - if (row + rowsperstrip > height) - rows_to_write = height - row; - else - rows_to_write = rowsperstrip; - - if (TIFFWriteEncodedStrip(out, row / rowsperstrip, raster_strip, - (tmsize_t)bytes_per_pixel * rows_to_write * - width) == -1) - { - _TIFFfree(raster); - return 0; - } - } - - _TIFFfree(raster); - - return 1; -} - -static int tiffcvt(TIFF *in, TIFF *out) -{ - uint32_t width, height; /* image width & height */ - uint16_t shortv; - float floatv; - char *stringv; - uint32_t longv; - uint16_t v[1]; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); - - CopyField(TIFFTAG_SUBFILETYPE, longv); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - - CopyField(TIFFTAG_FILLORDER, shortv); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - - if (no_alpha) - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3); - else - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 4); - - if (!no_alpha) - { - v[0] = EXTRASAMPLE_ASSOCALPHA; - TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v); - } - - CopyField(TIFFTAG_XRESOLUTION, floatv); - CopyField(TIFFTAG_YRESOLUTION, floatv); - CopyField(TIFFTAG_RESOLUTIONUNIT, shortv); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); - CopyField(TIFFTAG_DOCUMENTNAME, stringv); - - if (maxMalloc != 0 && TIFFStripSize(in) > maxMalloc) - { - TIFFError(TIFFFileName(in), - "Strip Size %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")", - TIFFStripSize(in), maxMalloc); - return 0; - } - if (process_by_block && TIFFIsTiled(in)) - return (cvt_by_tile(in, out)); - else if (process_by_block) - return (cvt_by_strip(in, out)); - else - return (cvt_whole_image(in, out)); -} - -static const char usage_info[] = - /* Help information format modified for the sake of consistency with the - other tiff tools */ - /* "usage: tiff2rgba [-c comp] [-r rows] [-b] [-n] [-8] [-M size] - input... output" */ - /* "where comp is one of the following compression algorithms:" */ - "Convert a TIFF image to RGBA color space\n\n" - "usage: tiff2rgba [options] input output\n" - "where options are:\n" -#ifdef JPEG_SUPPORT - " -c jpeg JPEG encoding\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip Zip/Deflate encoding\n" -#endif -#ifdef LZW_SUPPORT - " -c lzw Lempel-Ziv & Welch encoding\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits PackBits encoding\n" -#endif -#if defined(JPEG_SUPPORT) || defined(ZIP_SUPPORT) || defined(LZW_SUPPORT) || \ - defined(PACKBITS_SUPPORT) - " -c none no compression\n" -#endif - "\n" - /* "and the other options are:\n" */ - " -r rows/strip\n" - " -t rows/strip (same as -r)\n" - " -b (progress by block rather than as a whole image)\n" - " -n don't emit alpha component.\n" - " -B use this value as the background when doing alpha compositing\n" - " -8 write BigTIFF file instead of ClassicTIFF\n" - " -M set the memory allocation limit in MiB. 0 to disable limit\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/tiffcmp.c b/third_party/libtiff/tools/tiffcmp.c deleted file mode 100644 index 88d9470..0000000 --- a/third_party/libtiff/tools/tiffcmp.c +++ /dev/null @@ -1,713 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -static int stopondiff = 1; -static int stoponfirsttag = 1; -static uint16_t bitspersample = 1; -static uint16_t samplesperpixel = 1; -static uint16_t sampleformat = SAMPLEFORMAT_UINT; -static uint32_t imagewidth; -static uint32_t imagelength; - -static void usage(int code); -static int tiffcmp(TIFF *, TIFF *); -static int cmptags(TIFF *, TIFF *); -static int ContigCompare(int, uint32_t, unsigned char *, unsigned char *, - tsize_t); -static int SeparateCompare(int, int, uint32_t, unsigned char *, - unsigned char *); -static void PrintIntDiff(uint32_t, int, uint32_t, uint32_t, uint32_t); -static void PrintFloatDiff(uint32_t, int, uint32_t, double, double); - -static void leof(const char *, uint32_t, int); - -/* - * exit with status : - * 0 No differences were found. - * 1 Differences were found. - * >1 An error occurred. - */ -int main(int argc, char *argv[]) -{ - TIFF *tif1, *tif2; - int c, dirnum; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "ltz:h")) != -1) - switch (c) - { - case 'l': - stopondiff = 0; - break; - case 'z': - stopondiff = atoi(optarg); - break; - case 't': - stoponfirsttag = 0; - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case '?': - usage(2); - /*NOTREACHED*/ - break; - } - if (argc - optind < 2) - usage(2); - tif1 = TIFFOpen(argv[optind], "r"); - if (tif1 == NULL) - return (2); - tif2 = TIFFOpen(argv[optind + 1], "r"); - if (tif2 == NULL) - { - TIFFClose(tif1); - return (2); - } - dirnum = 0; - while (tiffcmp(tif1, tif2)) - { - if (!TIFFReadDirectory(tif1)) - { - if (!TIFFReadDirectory(tif2)) - break; - printf("No more directories for %s\n", TIFFFileName(tif1)); - return (1); - } - else if (!TIFFReadDirectory(tif2)) - { - printf("No more directories for %s\n", TIFFFileName(tif2)); - return (1); - } - printf("Directory %d:\n", ++dirnum); - } - - TIFFClose(tif1); - TIFFClose(tif2); - return (0); -} - -static const char usage_info[] = - "Compare the tags and data in two TIFF files\n\n" - "usage: tiffcmp [options] file1 file2\n" - "where options are:\n" - " -l list each byte of image data that differs between the " - "files\n" - " -z # list specified number of bytes that differs between " - "the files\n" - " -t ignore any differences in directory tags\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} - -#define checkEOF(tif, row, sample) \ - { \ - leof(TIFFFileName(tif), row, sample); \ - goto bad; \ - } - -static int CheckShortTag(TIFF *, TIFF *, int, char *); -static int CheckShort2Tag(TIFF *, TIFF *, int, char *); -static int CheckShortArrayTag(TIFF *, TIFF *, int, char *); -static int CheckLongTag(TIFF *, TIFF *, int, char *); -static int CheckFloatTag(TIFF *, TIFF *, int, char *); -static int CheckStringTag(TIFF *, TIFF *, int, char *); - -static int tiffcmp(TIFF *tif1, TIFF *tif2) -{ - uint16_t config1, config2; - tsize_t size1; - uint32_t row; - tsample_t s; - unsigned char *buf1, *buf2; - - if (!CheckShortTag(tif1, tif2, TIFFTAG_BITSPERSAMPLE, "BitsPerSample")) - return (0); - if (!CheckShortTag(tif1, tif2, TIFFTAG_SAMPLESPERPIXEL, "SamplesPerPixel")) - return (0); - if (!CheckLongTag(tif1, tif2, TIFFTAG_IMAGEWIDTH, "ImageWidth")) - return (0); - if (!cmptags(tif1, tif2)) - return (1); - (void)TIFFGetField(tif1, TIFFTAG_BITSPERSAMPLE, &bitspersample); - (void)TIFFGetField(tif1, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - (void)TIFFGetField(tif1, TIFFTAG_SAMPLEFORMAT, &sampleformat); - (void)TIFFGetField(tif1, TIFFTAG_IMAGEWIDTH, &imagewidth); - (void)TIFFGetField(tif1, TIFFTAG_IMAGELENGTH, &imagelength); - (void)TIFFGetField(tif1, TIFFTAG_PLANARCONFIG, &config1); - (void)TIFFGetField(tif2, TIFFTAG_PLANARCONFIG, &config2); - buf1 = (unsigned char *)_TIFFmalloc(size1 = TIFFScanlineSize(tif1)); - buf2 = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif2)); - if (buf1 == NULL || buf2 == NULL) - { - fprintf(stderr, "No space for scanline buffers\n"); - exit(2); - } - if (config1 != config2 && bitspersample != 8 && samplesperpixel > 1) - { - fprintf(stderr, "Can't handle different planar configuration w/ " - "different bits/sample\n"); - goto bad; - } -#define pack(a, b) ((a) << 8) | (b) - switch (pack(config1, config2)) - { - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG): - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(tif2, buf2, row, 0) < 0) - checkEOF(tif2, row, -1) for (s = 0; s < samplesperpixel; - s++) - { - if (TIFFReadScanline(tif1, buf1, row, s) < 0) - checkEOF(tif1, row, s) if (SeparateCompare( - 1, s, row, buf2, - buf1) < 0) goto bad1; - } - } - break; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE): - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(tif1, buf1, row, 0) < 0) - checkEOF(tif1, row, -1) for (s = 0; s < samplesperpixel; - s++) - { - if (TIFFReadScanline(tif2, buf2, row, s) < 0) - checkEOF(tif2, row, s) if (SeparateCompare( - 0, s, row, buf1, - buf2) < 0) goto bad1; - } - } - break; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE): - for (s = 0; s < samplesperpixel; s++) - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(tif1, buf1, row, s) < 0) - checkEOF(tif1, row, s) if (TIFFReadScanline(tif2, buf2, - row, s) < 0) - checkEOF(tif2, row, - s) if (ContigCompare(s, row, buf1, buf2, - size1) < 0) goto bad1; - } - break; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG): - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(tif1, buf1, row, 0) < 0) - checkEOF(tif1, row, - -1) if (TIFFReadScanline(tif2, buf2, row, 0) < 0) - checkEOF(tif2, row, - -1) if (ContigCompare(-1, row, buf1, buf2, - size1) < 0) goto bad1; - } - break; - } - if (buf1) - _TIFFfree(buf1); - if (buf2) - _TIFFfree(buf2); - return (1); -bad: - if (stopondiff) - exit(1); -bad1: - if (buf1) - _TIFFfree(buf1); - if (buf2) - _TIFFfree(buf2); - return (0); -} - -#define CmpShortField(tag, name) \ - if (!CheckShortTag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) -#define CmpShortField2(tag, name) \ - if (!CheckShort2Tag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) -#define CmpLongField(tag, name) \ - if (!CheckLongTag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) -#define CmpFloatField(tag, name) \ - if (!CheckFloatTag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) -#define CmpStringField(tag, name) \ - if (!CheckStringTag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) -#define CmpShortArrayField(tag, name) \ - if (!CheckShortArrayTag(tif1, tif2, tag, name) && stoponfirsttag) \ - return (0) - -static int cmptags(TIFF *tif1, TIFF *tif2) -{ - uint16_t compression1, compression2; - CmpLongField(TIFFTAG_SUBFILETYPE, "SubFileType"); - CmpLongField(TIFFTAG_IMAGEWIDTH, "ImageWidth"); - CmpLongField(TIFFTAG_IMAGELENGTH, "ImageLength"); - CmpShortField(TIFFTAG_BITSPERSAMPLE, "BitsPerSample"); - CmpShortField(TIFFTAG_COMPRESSION, "Compression"); - CmpShortField(TIFFTAG_PREDICTOR, "Predictor"); - CmpShortField(TIFFTAG_PHOTOMETRIC, "PhotometricInterpretation"); - CmpShortField(TIFFTAG_THRESHHOLDING, "Thresholding"); - CmpShortField(TIFFTAG_FILLORDER, "FillOrder"); - CmpShortField(TIFFTAG_ORIENTATION, "Orientation"); - CmpShortField(TIFFTAG_SAMPLESPERPIXEL, "SamplesPerPixel"); - CmpShortField(TIFFTAG_MINSAMPLEVALUE, "MinSampleValue"); - CmpShortField(TIFFTAG_MAXSAMPLEVALUE, "MaxSampleValue"); - CmpShortField(TIFFTAG_SAMPLEFORMAT, "SampleFormat"); - CmpFloatField(TIFFTAG_XRESOLUTION, "XResolution"); - CmpFloatField(TIFFTAG_YRESOLUTION, "YResolution"); - if (TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && - compression1 == COMPRESSION_CCITTFAX3 && - TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && - compression2 == COMPRESSION_CCITTFAX3) - { - CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options"); - } - if (TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && - compression1 == COMPRESSION_CCITTFAX4 && - TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && - compression2 == COMPRESSION_CCITTFAX4) - { - CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options"); - } - CmpShortField(TIFFTAG_RESOLUTIONUNIT, "ResolutionUnit"); - CmpShortField(TIFFTAG_PLANARCONFIG, "PlanarConfiguration"); - CmpLongField(TIFFTAG_ROWSPERSTRIP, "RowsPerStrip"); - CmpFloatField(TIFFTAG_XPOSITION, "XPosition"); - CmpFloatField(TIFFTAG_YPOSITION, "YPosition"); - CmpShortField(TIFFTAG_GRAYRESPONSEUNIT, "GrayResponseUnit"); - CmpShortField(TIFFTAG_COLORRESPONSEUNIT, "ColorResponseUnit"); -#ifdef notdef - { - uint16_t *graycurve; - CmpField(TIFFTAG_GRAYRESPONSECURVE, graycurve); - } - { - uint16_t *red, *green, *blue; - CmpField3(TIFFTAG_COLORRESPONSECURVE, red, green, blue); - } - { - uint16_t *red, *green, *blue; - CmpField3(TIFFTAG_COLORMAP, red, green, blue); - } -#endif - CmpShortField2(TIFFTAG_PAGENUMBER, "PageNumber"); - CmpStringField(TIFFTAG_ARTIST, "Artist"); - CmpStringField(TIFFTAG_IMAGEDESCRIPTION, "ImageDescription"); - CmpStringField(TIFFTAG_MAKE, "Make"); - CmpStringField(TIFFTAG_MODEL, "Model"); - CmpStringField(TIFFTAG_SOFTWARE, "Software"); - CmpStringField(TIFFTAG_DATETIME, "DateTime"); - CmpStringField(TIFFTAG_HOSTCOMPUTER, "HostComputer"); - CmpStringField(TIFFTAG_PAGENAME, "PageName"); - CmpStringField(TIFFTAG_DOCUMENTNAME, "DocumentName"); - CmpShortField(TIFFTAG_MATTEING, "Matteing"); - CmpShortArrayField(TIFFTAG_EXTRASAMPLES, "ExtraSamples"); - return (1); -} - -static int ContigCompare(int sample, uint32_t row, unsigned char *p1, - unsigned char *p2, tsize_t size) -{ - uint32_t pix; - int samples_to_test; - - if (memcmp(p1, p2, size) == 0) - return 0; - - samples_to_test = (sample == -1) ? samplesperpixel : 1; - - switch (bitspersample) - { - case 1: - case 2: - case 4: - case 8: - { - unsigned char *pix1 = p1, *pix2 = p2; - unsigned bits = 0; - - for (pix = 0; pix < imagewidth; pix++) - { - int s; - - for (s = 0; s < samples_to_test; s++) - { - if (*pix1 != *pix2) - { - if (sample == -1) - PrintIntDiff(row, s, pix, *pix1, *pix2); - else - PrintIntDiff(row, sample, pix, *pix1, *pix2); - } - - bits += bitspersample; - pix1 += (bits / 8); - pix2 += (bits / 8); - bits &= 7; - } - } - break; - } - case 16: - { - uint16_t *pix1 = (uint16_t *)p1, *pix2 = (uint16_t *)p2; - - for (pix = 0; pix < imagewidth; pix++) - { - int s; - - for (s = 0; s < samples_to_test; s++) - { - if (*pix1 != *pix2) - PrintIntDiff(row, sample, pix, *pix1, *pix2); - - pix1++; - pix2++; - } - } - break; - } - case 32: - if (sampleformat == SAMPLEFORMAT_UINT || - sampleformat == SAMPLEFORMAT_INT) - { - uint32_t *pix1 = (uint32_t *)p1, *pix2 = (uint32_t *)p2; - - for (pix = 0; pix < imagewidth; pix++) - { - int s; - - for (s = 0; s < samples_to_test; s++) - { - if (*pix1 != *pix2) - { - PrintIntDiff(row, sample, pix, *pix1, *pix2); - } - - pix1++; - pix2++; - } - } - } - else if (sampleformat == SAMPLEFORMAT_IEEEFP) - { - float *pix1 = (float *)p1, *pix2 = (float *)p2; - - for (pix = 0; pix < imagewidth; pix++) - { - int s; - - for (s = 0; s < samples_to_test; s++) - { - if (fabs(*pix1 - *pix2) < 0.000000000001) - { - PrintFloatDiff(row, sample, pix, *pix1, *pix2); - } - - pix1++; - pix2++; - } - } - } - else - { - fprintf(stderr, "Sample format %" PRIu16 " is not supported.\n", - sampleformat); - return -1; - } - break; - default: - fprintf(stderr, "Bit depth %" PRIu16 " is not supported.\n", - bitspersample); - return -1; - } - - return 0; -} - -static void PrintIntDiff(uint32_t row, int sample, uint32_t pix, uint32_t w1, - uint32_t w2) -{ - if (sample < 0) - sample = 0; - switch (bitspersample) - { - case 1: - case 2: - case 4: - { - int32_t mask1, mask2, s; - - /* mask1 should have the n lowest bits set, where n == bitspersample - */ - mask1 = ((int32_t)1 << bitspersample) - 1; - s = (8 - bitspersample); - mask2 = mask1 << s; - for (; mask2 && pix < imagewidth; - mask2 >>= bitspersample, s -= bitspersample, pix++) - { - if ((w1 & mask2) ^ (w2 & mask2)) - { - printf("Scanline %" PRIu32 ", pixel %" PRIu32 - ", sample %d: %01" PRIx32 " %01" PRIx32 "\n", - row, pix, sample, (w1 >> s) & mask1, - (w2 >> s) & mask1); - if (--stopondiff == 0) - exit(1); - } - } - break; - } - case 8: - printf("Scanline %" PRIu32 ", pixel %" PRIu32 - ", sample %d: %02" PRIx32 " %02" PRIx32 "\n", - row, pix, sample, w1, w2); - if (--stopondiff == 0) - exit(1); - break; - case 16: - printf("Scanline %" PRIu32 ", pixel %" PRIu32 - ", sample %d: %04" PRIx32 " %04" PRIx32 "\n", - row, pix, sample, w1, w2); - if (--stopondiff == 0) - exit(1); - break; - case 32: - printf("Scanline %" PRIu32 ", pixel %" PRIu32 - ", sample %d: %08" PRIx32 " %08" PRIx32 "\n", - row, pix, sample, w1, w2); - if (--stopondiff == 0) - exit(1); - break; - default: - break; - } -} - -static void PrintFloatDiff(uint32_t row, int sample, uint32_t pix, double w1, - double w2) -{ - if (sample < 0) - sample = 0; - switch (bitspersample) - { - case 32: - printf("Scanline %" PRIu32 ", pixel %" PRIu32 - ", sample %d: %g %g\n", - row, pix, sample, w1, w2); - if (--stopondiff == 0) - exit(1); - break; - default: - break; - } -} - -static int SeparateCompare(int reversed, int sample, uint32_t row, - unsigned char *cp1, unsigned char *p2) -{ - uint32_t npixels = imagewidth; - int pixel; - - cp1 += sample; - for (pixel = 0; npixels-- > 0; pixel++, cp1 += samplesperpixel, p2++) - { - if (*cp1 != *p2) - { - printf("Scanline %" PRIu32 ", pixel %" PRIu32 ", sample %d: ", row, - pixel, sample); - if (reversed) - printf("%02x %02x\n", *p2, *cp1); - else - printf("%02x %02x\n", *cp1, *p2); - if (--stopondiff == 0) - exit(1); - } - } - - return 0; -} - -static int checkTag(TIFF *tif1, TIFF *tif2, int tag, char *name, void *p1, - void *p2) -{ - - if (TIFFGetField(tif1, tag, p1)) - { - if (!TIFFGetField(tif2, tag, p2)) - { - printf("%s tag appears only in %s\n", name, TIFFFileName(tif1)); - return (0); - } - return (1); - } - else if (TIFFGetField(tif2, tag, p2)) - { - printf("%s tag appears only in %s\n", name, TIFFFileName(tif2)); - return (0); - } - return (-1); -} - -#define CHECK(cmp, fmt) \ - { \ - switch (checkTag(tif1, tif2, tag, name, &v1, &v2)) \ - { \ - case 1: \ - if (cmp) \ - case -1: \ - return (1); \ - printf(fmt, name, v1, v2); \ - } \ - return (0); \ - } - -static int CheckShortTag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - uint16_t v1, v2; - CHECK(v1 == v2, "%s: %" PRIu16 " %" PRIu16 "\n"); -} - -static int CheckShort2Tag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - uint16_t v11, v12, v21, v22; - - if (TIFFGetField(tif1, tag, &v11, &v12)) - { - if (!TIFFGetField(tif2, tag, &v21, &v22)) - { - printf("%s tag appears only in %s\n", name, TIFFFileName(tif1)); - return (0); - } - if (v11 == v21 && v12 == v22) - return (1); - printf("%s: <%" PRIu16 ",%" PRIu16 "> <%" PRIu16 ",%" PRIu16 ">\n", - name, v11, v12, v21, v22); - } - else if (TIFFGetField(tif2, tag, &v21, &v22)) - printf("%s tag appears only in %s\n", name, TIFFFileName(tif2)); - else - return (1); - return (0); -} - -static int CheckShortArrayTag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - uint16_t n1, *a1; - uint16_t n2, *a2; - - if (TIFFGetField(tif1, tag, &n1, &a1)) - { - if (!TIFFGetField(tif2, tag, &n2, &a2)) - { - printf("%s tag appears only in %s\n", name, TIFFFileName(tif1)); - return (0); - } - if (n1 == n2) - { - char *sep; - uint16_t i; - - if (memcmp(a1, a2, n1 * sizeof(uint16_t)) == 0) - return (1); - printf("%s: value mismatch, <%" PRIu16 ":", name, n1); - sep = ""; - for (i = 0; i < n1; i++) - printf("%s%" PRIu16, sep, a1[i]), sep = ","; - printf("> and <%" PRIu16 ": ", n2); - sep = ""; - for (i = 0; i < n2; i++) - printf("%s%" PRIu16, sep, a2[i]), sep = ","; - printf(">\n"); - } - else - printf("%s: %" PRIu16 " items in %s, %" PRIu16 " items in %s", name, - n1, TIFFFileName(tif1), n2, TIFFFileName(tif2)); - } - else if (TIFFGetField(tif2, tag, &n2, &a2)) - printf("%s tag appears only in %s\n", name, TIFFFileName(tif2)); - else - return (1); - return (0); -} - -static int CheckLongTag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - uint32_t v1, v2; - CHECK(v1 == v2, "%s: %" PRIu32 " %" PRIu32 "\n"); -} - -static int CheckFloatTag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - float v1, v2; - CHECK(v1 == v2, "%s: %g %g\n"); -} - -static int CheckStringTag(TIFF *tif1, TIFF *tif2, int tag, char *name) -{ - char *v1, *v2; - CHECK(strcmp(v1, v2) == 0, "%s: \"%s\" \"%s\"\n"); -} - -static void leof(const char *name, uint32_t row, int s) -{ - - printf("%s: EOF at scanline %" PRIu32, name, row); - if (s >= 0) - printf(", sample %d", s); - printf("\n"); -} diff --git a/third_party/libtiff/tools/tiffcp.c b/third_party/libtiff/tools/tiffcp.c deleted file mode 100644 index bb6fd14..0000000 --- a/third_party/libtiff/tools/tiffcp.c +++ /dev/null @@ -1,2366 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Revised: 2/18/01 BAR -- added syntax for extracting single images from - * multi-image TIFF files. - * - * New syntax is: sourceFileName,image# - * - * image# ranges from 0.. where n is the # of images in the file. - * There may be no white space between the comma and the filename or - * image number. - * - * Example: tiffcp source.tif,1 destination.tif - * - * Copies the 2nd image in source.tif to the destination. - * - ***** - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#include - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -#define TRUE 1 -#define FALSE 0 - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -static int outtiled = -1; -static uint32_t tilewidth; -static uint32_t tilelength; - -static uint16_t config; -static uint16_t compression; -static double max_z_error = 0.0; -static uint16_t predictor; -static int preset; -static uint16_t fillorder; -static uint16_t orientation; -static uint32_t rowsperstrip; -static uint32_t g3opts; -static int ignore = FALSE; /* if true, ignore read errors */ -static uint32_t defg3opts = (uint32_t)-1; -static int quality = 75; /* JPEG quality */ -static int jpeg_photometric = PHOTOMETRIC_YCBCR; -static uint16_t defcompression = (uint16_t)-1; -static uint16_t defpredictor = (uint16_t)-1; -static int defpreset = -1; -static int subcodec = -1; - -static int tiffcp(TIFF *, TIFF *); -static int processCompressOptions(char *); -static void usage(int code); - -static char comma = ','; /* (default) comma separator character */ -static TIFF *bias = NULL; -static int pageNum = 0; -static int pageInSeq = 0; - -/** - * This custom malloc function enforce a maximum allocation size - */ -static void *limitMalloc(tmsize_t s) -{ - if (maxMalloc && (s > maxMalloc)) - { - fprintf(stderr, - "MemoryLimitError: allocation of %" TIFF_SSIZE_FORMAT - " bytes is forbidden. Limit is %" TIFF_SSIZE_FORMAT ".\n", - s, maxMalloc); - fprintf(stderr, " use -m option to change limit.\n"); - return NULL; - } - return _TIFFmalloc(s); -} - -static int nextSrcImage(TIFF *tif, char **imageSpec) -/* - seek to the next image specified in *imageSpec - returns 1 if success, 0 if no more images to process - *imageSpec=NULL if subsequent images should be processed in sequence -*/ -{ - if (**imageSpec == comma) - { /* if not @comma, we've done all images */ - char *start = *imageSpec + 1; - tdir_t nextImage = (tdir_t)strtol(start, imageSpec, 0); - if (start == *imageSpec) - nextImage = TIFFCurrentDirectory(tif); - if (**imageSpec) - { - if (**imageSpec == comma) - { - /* a trailing comma denotes remaining images in sequence */ - if ((*imageSpec)[1] == '\0') - *imageSpec = NULL; - } - else - { - fprintf(stderr, - "Expected a %c separated image # list after %s\n", - comma, TIFFFileName(tif)); - exit(EXIT_FAILURE); /* syntax error */ - } - } - if (TIFFSetDirectory(tif, nextImage)) - return 1; - fprintf(stderr, "%s%c%" PRIu32 " not found!\n", TIFFFileName(tif), - comma, nextImage); - } - return 0; -} - -static TIFF *openSrcImage(char **imageSpec) -/* - imageSpec points to a pointer to a filename followed by optional ,image#'s - Open the TIFF file and assign *imageSpec to either NULL if there are - no images specified, or a pointer to the next image number text -*/ -{ - /* disable strip shopping when using jbig compression */ - const char *mode = (defcompression == COMPRESSION_JBIG) ? "rc" : "r"; - TIFF *tif; - char *fn = *imageSpec; - *imageSpec = strchr(fn, comma); - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return NULL; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - if (*imageSpec) - { /* there is at least one image number specifier */ - **imageSpec = '\0'; - tif = TIFFOpenExt(fn, mode, opts); - /* but, ignore any single trailing comma */ - if (!(*imageSpec)[1]) - { - *imageSpec = NULL; - TIFFOpenOptionsFree(opts); - return tif; - } - if (tif) - { - **imageSpec = comma; /* replace the comma */ - if (!nextSrcImage(tif, imageSpec)) - { - TIFFClose(tif); - tif = NULL; - } - } - } - else - tif = TIFFOpenExt(fn, mode, opts); - TIFFOpenOptionsFree(opts); - return tif; -} - -int main(int argc, char *argv[]) -{ - uint16_t defconfig = (uint16_t)-1; - uint16_t deffillorder = 0; - uint32_t deftilewidth = (uint32_t)-1; - uint32_t deftilelength = (uint32_t)-1; - uint32_t defrowsperstrip = (uint32_t)0; - uint64_t diroff = 0; - TIFF *in; - TIFF *out; - char mode[10]; - char *mp = mode; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - *mp++ = 'w'; - *mp = '\0'; - while ((c = getopt(argc, argv, "m:,:b:c:f:l:o:p:r:w:aistBLMC8xh")) != -1) - switch (c) - { - case 'm': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case ',': - if (optarg[0] != '=') - usage(EXIT_FAILURE); - comma = optarg[1]; - break; - case 'b': /* this file is bias image subtracted from others */ - if (bias) - { - fputs("Only 1 bias image may be specified\n", stderr); - exit(EXIT_FAILURE); - } - { - uint16_t samples = (uint16_t)-1; - char **biasFn = &optarg; - bias = openSrcImage(biasFn); - if (!bias) - exit(EXIT_FAILURE); - if (TIFFIsTiled(bias)) - { - fputs("Bias image must be organized in strips\n", - stderr); - exit(EXIT_FAILURE); - } - TIFFGetField(bias, TIFFTAG_SAMPLESPERPIXEL, &samples); - if (samples != 1) - { - fputs("Bias image must be monochrome\n", stderr); - exit(EXIT_FAILURE); - } - } - break; - case 'a': /* append to output */ - mode[0] = 'a'; - break; - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'f': /* fill order */ - if (streq(optarg, "lsb2msb")) - deffillorder = FILLORDER_LSB2MSB; - else if (streq(optarg, "msb2lsb")) - deffillorder = FILLORDER_MSB2LSB; - else - usage(EXIT_FAILURE); - break; - case 'i': /* ignore errors */ - ignore = TRUE; - break; - case 'l': /* tile length */ - outtiled = TRUE; - deftilelength = atoi(optarg); - break; - case 'o': /* initial directory offset */ - diroff = strtoul(optarg, NULL, 0); - break; - case 'p': /* planar configuration */ - if (streq(optarg, "separate")) - defconfig = PLANARCONFIG_SEPARATE; - else if (streq(optarg, "contig")) - defconfig = PLANARCONFIG_CONTIG; - else - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - defrowsperstrip = atol(optarg); - break; - case 's': /* generate stripped output */ - outtiled = FALSE; - break; - case 't': /* generate tiled output */ - outtiled = TRUE; - break; - case 'w': /* tile width */ - outtiled = TRUE; - deftilewidth = atoi(optarg); - break; - case 'B': - if (strlen(mode) < (sizeof(mode) - 1)) - { - *mp++ = 'b'; - *mp = '\0'; - } - break; - case 'L': - if (strlen(mode) < (sizeof(mode) - 1)) - { - *mp++ = 'l'; - *mp = '\0'; - } - break; - case 'M': - if (strlen(mode) < (sizeof(mode) - 1)) - { - *mp++ = 'm'; - *mp = '\0'; - } - break; - case 'C': - if (strlen(mode) < (sizeof(mode) - 1)) - { - *mp++ = 'c'; - *mp = '\0'; - } - break; - case '8': - if (strlen(mode) < (sizeof(mode) - 1)) - { - *mp++ = '8'; - *mp = '\0'; - } - break; - case 'x': - pageInSeq = 1; - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - if (argc - optind < 2) - usage(EXIT_FAILURE); - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return EXIT_FAILURE; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - out = TIFFOpenExt(argv[argc - 1], mode, opts); - TIFFOpenOptionsFree(opts); - if (out == NULL) - return (EXIT_FAILURE); - if ((argc - optind) == 2) - pageNum = -1; - for (; optind < argc - 1; optind++) - { - char *imageCursor = argv[optind]; - in = openSrcImage(&imageCursor); - if (in == NULL) - { - (void)TIFFClose(out); - return (EXIT_FAILURE); - } - if (diroff != 0 && !TIFFSetSubDirectory(in, diroff)) - { - TIFFError(TIFFFileName(in), - "Error, setting subdirectory at %" PRIu64, diroff); - (void)TIFFClose(in); - (void)TIFFClose(out); - return (EXIT_FAILURE); - } - for (;;) - { - config = defconfig; - compression = defcompression; - predictor = defpredictor; - preset = defpreset; - fillorder = deffillorder; - rowsperstrip = defrowsperstrip; - tilewidth = deftilewidth; - tilelength = deftilelength; - g3opts = defg3opts; - if (!tiffcp(in, out) || !TIFFWriteDirectory(out)) - { - (void)TIFFClose(in); - (void)TIFFClose(out); - return (EXIT_FAILURE); - } - if (imageCursor) - { /* seek next image directory */ - if (!nextSrcImage(in, &imageCursor)) - break; - } - else if (!TIFFReadDirectory(in)) - break; - } - (void)TIFFClose(in); - } - - (void)TIFFClose(out); - return (EXIT_SUCCESS); -} - -static void processZIPOptions(char *cp) -{ - if ((cp = strchr(cp, ':'))) - { - do - { - cp++; - if (isdigit((int)*cp)) - defpredictor = atoi(cp); - else if (*cp == 'p') - defpreset = atoi(++cp); - else if (*cp == 's') - subcodec = atoi(++cp); - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static void processLERCOptions(char *cp) -{ - if ((cp = strchr(cp, ':'))) - { - do - { - cp++; - if (isdigit((int)*cp)) - max_z_error = atof(cp); - else if (*cp == 's') - subcodec = atoi(++cp); - else if (*cp == 'p') - defpreset = atoi(++cp); - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static void processG3Options(char *cp) -{ - if ((cp = strchr(cp, ':'))) - { - if (defg3opts == (uint32_t)-1) - defg3opts = 0; - do - { - cp++; - if (strneq(cp, "1d", 2)) - defg3opts &= ~GROUP3OPT_2DENCODING; - else if (strneq(cp, "2d", 2)) - defg3opts |= GROUP3OPT_2DENCODING; - else if (strneq(cp, "fill", 4)) - defg3opts |= GROUP3OPT_FILLBITS; - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - { - defcompression = COMPRESSION_NONE; - } - else if (streq(opt, "packbits")) - { - defcompression = COMPRESSION_PACKBITS; - } - else if (strneq(opt, "jpeg", 4)) - { - char *cp = strchr(opt, ':'); - - defcompression = COMPRESSION_JPEG; - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (cp[1] == 'r') - jpeg_photometric = PHOTOMETRIC_RGB; - else - usage(EXIT_FAILURE); - - cp = strchr(cp + 1, ':'); - } - } - else if (strneq(opt, "g3", 2)) - { - processG3Options(opt); - defcompression = COMPRESSION_CCITTFAX3; - } - else if (streq(opt, "g4")) - { - defcompression = COMPRESSION_CCITTFAX4; - } - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - defpredictor = atoi(cp + 1); - defcompression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - processZIPOptions(opt); - defcompression = COMPRESSION_ADOBE_DEFLATE; - } - else if (strneq(opt, "lerc", 4)) - { - processLERCOptions(opt); - defcompression = COMPRESSION_LERC; - } - else if (strneq(opt, "lzma", 4)) - { - processZIPOptions(opt); - defcompression = COMPRESSION_LZMA; - } - else if (strneq(opt, "zstd", 4)) - { - processZIPOptions(opt); - defcompression = COMPRESSION_ZSTD; - } - else if (strneq(opt, "webp", 4)) - { - processZIPOptions(opt); - defcompression = COMPRESSION_WEBP; - } - else if (strneq(opt, "jbig", 4)) - { - defcompression = COMPRESSION_JBIG; - } - else if (strneq(opt, "sgilog", 6)) - { - defcompression = COMPRESSION_SGILOG; - } - else - return (0); - return (1); -} - -static const char usage_info[] = - "Copy, convert, or combine TIFF files\n\n" - "usage: tiffcp [options] input... output\n" - "where options are:\n" - " -a append to output instead of overwriting\n" - " -o offset set initial directory offset\n" - " -p contig pack samples contiguously (e.g. RGBRGB...)\n" - " -p separate store samples separately (e.g. RRR...GGG...BBB...)\n" - " -s write output in strips\n" - " -t write output in tiles\n" - " -x force the merged tiff pages in sequence\n" - " -8 write BigTIFF instead of default ClassicTIFF\n" - " -B write big-endian instead of native byte order\n" - " -L write little-endian instead of native byte order\n" - " -M disable use of memory-mapped files\n" - " -C disable strip chopping\n" - " -i ignore read errors\n" - " -b file[,#] bias (dark) monochrome image to be subtracted from all " - "others\n" - " -,=% use % rather than , to separate image #'s (per Note " - "below)\n" - " -m size set maximum memory allocation size (MiB). 0 to disable " - "limit.\n" - "\n" - " -r # make each strip have no more than # rows\n" - " -w # set output tile width (pixels)\n" - " -l # set output tile length (pixels)\n" - "\n" - " -f lsb2msb force lsb-to-msb FillOrder for output\n" - " -f msb2lsb force msb-to-lsb FillOrder for output\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:" */ - " # set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:", */ - " # set predictor value\n" - " p# set compression level (preset)\n" - " For example, -c zip:3:p9 for maximum compression level and floating\n" - " point predictor.\n" -#endif -#if defined(ZIP_SUPPORT) && defined(LIBDEFLATE_SUPPORT) - " s# set subcodec: 0=zlib, 1=libdeflate (default 1)\n" -/* " (only for Deflate/ZIP)", */ -#endif -#ifdef LERC_SUPPORT - " -c lerc[:opts] compress output with LERC encoding\n" - /* " LERC options:", */ - " # set max_z_error value\n" - " p# set compression level (preset)\n" -#ifdef ZSTD_SUPPORT - " s# set subcodec: 0=none, 1=deflate, 2=zstd (default 0)\n" - " For example, -c lerc:0.5:s2:p22 for max_z_error 0.5,\n" - " zstd additional compression with maximum compression level.\n" -#else - " s# set subcodec: 0=none, 1=deflate (default 0)\n" - " For example, -c lerc:0.5:s1:p12 for max_z_error 0.5,\n" - " deflate additional compression with maximum compression level.\n" -#endif -#endif -#ifdef LZMA_SUPPORT - " -c lzma[:opts] compress output with LZMA2 encoding\n" - /* " LZMA options:", */ - " # set predictor value\n" - " p# set compression level (preset)\n" -#endif -#ifdef ZSTD_SUPPORT - " -c zstd[:opts] compress output with ZSTD encoding\n" - /* " ZSTD options:", */ - " # set predictor value\n" - " p# set compression level (preset)\n" -#endif -#ifdef WEBP_SUPPORT - " -c webp[:opts] compress output with WEBP encoding\n" - /* " WEBP options:", */ - " # set predictor value\n" - " p# set compression level (preset)\n" -#endif -#ifdef JPEG_SUPPORT - " -c jpeg[:opts] compress output with JPEG encoding\n" - /* " JPEG options:", */ - " # set compression quality level (0-100, default 75)\n" - " r output color image as RGB rather than YCbCr\n" - " For example, -c jpeg:r:50 for JPEG-encoded RGB with 50% comp. " - "quality\n" -#endif -#ifdef JBIG_SUPPORT - " -c jbig compress output with ISO JBIG encoding\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#ifdef CCITT_SUPPORT - " -c g3[:opts] compress output with CCITT Group 3 encoding\n" - /* " CCITT Group 3 options:", */ - " 1d use default CCITT Group 3 1D-encoding\n" - " 2d use optional CCITT Group 3 2D-encoding\n" - " fill byte-align EOL codes\n" - " For example, -c g3:2d:fill for G3-2D-encoded data with byte-aligned " - "EOLs\n" - " -c g4 compress output with CCITT Group 4 encoding\n" -#endif -#ifdef LOGLUV_SUPPORT - " -c sgilog compress output with SGILOG encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || defined(LZMA_SUPPORT) || \ - defined(ZSTD_SUPPORT) || defined(WEBP_SUPPORT) || defined(JPEG_SUPPORT) || \ - defined(JBIG_SUPPORT) || defined(PACKBITS_SUPPORT) || \ - defined(CCITT_SUPPORT) || defined(LOGLUV_SUPPORT) || defined(LERC_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - "\n" - "Note that input filenames may be of the form filename,x,y,z\n" - "where x, y, and z specify image numbers in the filename to copy.\n" - "example: tiffcp -b esp.tif,1 esp.tif,0 test.tif\n" - " subtract 2nd image in esp.tif from 1st yielding result test.tif\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} - -#define CopyField(tag, v) \ - do \ - { \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v); \ - } while (0) -#define CopyField2(tag, v1, v2) \ - do \ - { \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2); \ - } while (0) -#define CopyField3(tag, v1, v2, v3) \ - do \ - { \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3); \ - } while (0) -#define CopyField4(tag, v1, v2, v3, v4) \ - do \ - { \ - if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) \ - TIFFSetField(out, tag, v1, v2, v3, v4); \ - } while (0) - -static void cpTag(TIFF *in, TIFF *out, uint16_t tag, uint16_t count, - TIFFDataType type) -{ - switch (type) - { - case TIFF_SHORT: - if (count == 1) - { - uint16_t shortv; - CopyField(tag, shortv); - } - else if (count == 2) - { - uint16_t shortv1, shortv2; - CopyField2(tag, shortv1, shortv2); - } - else if (count == 4) - { - uint16_t *tr, *tg, *tb, *ta; - CopyField4(tag, tr, tg, tb, ta); - } - else if (count == (uint16_t)-1) - { - uint16_t shortv1; - uint16_t *shortav; - CopyField2(tag, shortv1, shortav); - } - break; - case TIFF_LONG: - { - uint32_t longv; - CopyField(tag, longv); - } - break; - case TIFF_RATIONAL: - if (count == 1) - { - float floatv; - CopyField(tag, floatv); - } - else if (count == (uint16_t)-1) - { - float *floatav; - CopyField(tag, floatav); - } - break; - case TIFF_ASCII: - { - char *stringv; - CopyField(tag, stringv); - } - break; - case TIFF_DOUBLE: - if (count == 1) - { - double doublev; - CopyField(tag, doublev); - } - else if (count == (uint16_t)-1) - { - double *doubleav; - CopyField(tag, doubleav); - } - break; - default: - TIFFError(TIFFFileName(in), - "Data type %" PRIu16 " is not supported, tag %d skipped.", - tag, type); - } -} - -static const struct cpTag -{ - uint16_t tag; - uint16_t count; - TIFFDataType type; -} tags[] = { - {TIFFTAG_SUBFILETYPE, 1, TIFF_LONG}, - {TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT}, - {TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII}, - {TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII}, - {TIFFTAG_MAKE, 1, TIFF_ASCII}, - {TIFFTAG_MODEL, 1, TIFF_ASCII}, - {TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_PAGENAME, 1, TIFF_ASCII}, - {TIFFTAG_XPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_YPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT}, - {TIFFTAG_SOFTWARE, 1, TIFF_ASCII}, - {TIFFTAG_DATETIME, 1, TIFF_ASCII}, - {TIFFTAG_ARTIST, 1, TIFF_ASCII}, - {TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII}, - {TIFFTAG_WHITEPOINT, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_PRIMARYCHROMATICITIES, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT}, - {TIFFTAG_INKSET, 1, TIFF_SHORT}, - {TIFFTAG_DOTRANGE, 2, TIFF_SHORT}, - {TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII}, - {TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT}, - {TIFFTAG_EXTRASAMPLES, (uint16_t)-1, TIFF_SHORT}, - {TIFFTAG_SMINSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_SMAXSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_STONITS, 1, TIFF_DOUBLE}, -}; -#define NTAGS (sizeof(tags) / sizeof(tags[0])) - -#define CopyTag(tag, count, type) cpTag(in, out, tag, count, type) - -typedef int (*copyFunc)(TIFF *in, TIFF *out, uint32_t l, uint32_t w, - uint16_t samplesperpixel); -static copyFunc pickCopyFunc(TIFF *, TIFF *, uint16_t, uint16_t); - -/* PODD */ - -static int tiffcp(TIFF *in, TIFF *out) -{ - uint16_t bitspersample = 1, samplesperpixel = 1; - uint16_t input_compression, input_photometric = PHOTOMETRIC_MINISBLACK; - copyFunc cf; - uint32_t width, length; - const struct cpTag *p; - - CopyField(TIFFTAG_IMAGEWIDTH, width); - CopyField(TIFFTAG_IMAGELENGTH, length); - CopyField(TIFFTAG_BITSPERSAMPLE, bitspersample); - CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - if (compression != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - else - CopyField(TIFFTAG_COMPRESSION, compression); - if (!TIFFIsCODECConfigured(compression)) - return FALSE; - TIFFGetFieldDefaulted(in, TIFFTAG_COMPRESSION, &input_compression); - if (!TIFFIsCODECConfigured(input_compression)) - return FALSE; - TIFFGetFieldDefaulted(in, TIFFTAG_PHOTOMETRIC, &input_photometric); - if (input_compression == COMPRESSION_JPEG) - { - /* Force conversion to RGB */ - TIFFSetField(in, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - } - else if (input_photometric == PHOTOMETRIC_YCBCR) - { - /* Otherwise, can't handle subsampled input */ - uint16_t subsamplinghor, subsamplingver; - - TIFFGetFieldDefaulted(in, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, - &subsamplingver); - if (subsamplinghor != 1 || subsamplingver != 1) - { - fprintf(stderr, - "tiffcp: %s: Can't copy/convert subsampled image.\n", - TIFFFileName(in)); - return FALSE; - } - } - if (compression == COMPRESSION_JPEG) - { - if (input_photometric == PHOTOMETRIC_RGB || - input_photometric == PHOTOMETRIC_YCBCR) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, jpeg_photometric); - if (jpeg_photometric == PHOTOMETRIC_YCBCR) - { - uint16_t subsamplinghor = 2, subsamplingver = 2; - if (input_compression == COMPRESSION_JPEG && - input_photometric == PHOTOMETRIC_YCBCR) - { - TIFFGetFieldDefaulted(in, TIFFTAG_YCBCRSUBSAMPLING, - &subsamplinghor, &subsamplingver); - - float *refBW = NULL; - if (TIFFGetField(in, TIFFTAG_REFERENCEBLACKWHITE, &refBW)) - { - TIFFSetField(out, TIFFTAG_REFERENCEBLACKWHITE, refBW); - } - } - TIFFSetField(out, TIFFTAG_YCBCRSUBSAMPLING, subsamplinghor, - subsamplingver); - } - } - else - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, input_photometric); - } - else if (compression == COMPRESSION_SGILOG || - compression == COMPRESSION_SGILOG24) - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, - samplesperpixel == 1 ? PHOTOMETRIC_LOGL - : PHOTOMETRIC_LOGLUV); - else - { - if (input_photometric == PHOTOMETRIC_YCBCR) - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - else - CopyTag(TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT); - } - if (fillorder != 0) - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - else - CopyTag(TIFFTAG_FILLORDER, 1, TIFF_SHORT); - /* - * Will copy `Orientation' tag from input image - */ - TIFFGetFieldDefaulted(in, TIFFTAG_ORIENTATION, &orientation); - TIFFSetField(out, TIFFTAG_ORIENTATION, orientation); - /* - * Choose tiles/strip for the output image according to - * the command line arguments (-tiles, -strips) and the - * structure of the input image. - */ - if (outtiled == -1) - outtiled = TIFFIsTiled(in); - if (outtiled) - { - /* - * Setup output file's tile width&height. If either - * is not specified, use either the value from the - * input image or, if nothing is defined, use the - * library default. - */ - if (tilewidth == (uint32_t)-1) - TIFFGetField(in, TIFFTAG_TILEWIDTH, &tilewidth); - if (tilelength == (uint32_t)-1) - TIFFGetField(in, TIFFTAG_TILELENGTH, &tilelength); - TIFFDefaultTileSize(out, &tilewidth, &tilelength); - TIFFSetField(out, TIFFTAG_TILEWIDTH, tilewidth); - TIFFSetField(out, TIFFTAG_TILELENGTH, tilelength); - } - else - { - /* - * RowsPerStrip is left unspecified: use either the - * value from the input image or, if nothing is defined, - * use the library default. - */ - if (rowsperstrip == (uint32_t)0) - { - if (!TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip)) - { - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - } - if (rowsperstrip > length && rowsperstrip != (uint32_t)-1) - rowsperstrip = length; - } - else if (rowsperstrip == (uint32_t)-1) - rowsperstrip = length; - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - } - if (config != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - else - CopyField(TIFFTAG_PLANARCONFIG, config); - if (samplesperpixel <= 4) - CopyTag(TIFFTAG_TRANSFERFUNCTION, 4, TIFF_SHORT); - CopyTag(TIFFTAG_COLORMAP, 4, TIFF_SHORT); - /* SMinSampleValue & SMaxSampleValue */ - switch (compression) - { - case COMPRESSION_JPEG: - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - /* For 3 sample images, the input data provided to libtiff is - * always RGB, not YCbCr subsampled. */ - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - break; - case COMPRESSION_JBIG: - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); - CopyTag(TIFFTAG_FAXDCS, 1, TIFF_ASCII); - break; - case COMPRESSION_LERC: - if (max_z_error > 0) - { - if (TIFFSetField(out, TIFFTAG_LERC_MAXZERROR, max_z_error) != 1) - { - return FALSE; - } - } - if (subcodec != -1) - { - if (TIFFSetField(out, TIFFTAG_LERC_ADD_COMPRESSION, subcodec) != - 1) - { - return FALSE; - } - } - if (preset != -1) - { - switch (subcodec) - { - case LERC_ADD_COMPRESSION_DEFLATE: - if (TIFFSetField(out, TIFFTAG_ZIPQUALITY, preset) != 1) - { - return FALSE; - } - break; - case LERC_ADD_COMPRESSION_ZSTD: - if (TIFFSetField(out, TIFFTAG_ZSTD_LEVEL, preset) != 1) - { - return FALSE; - } - break; - } - } - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - case COMPRESSION_LZMA: - case COMPRESSION_ZSTD: - if (predictor != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - else if (input_compression == COMPRESSION_LZW || - input_compression == COMPRESSION_ADOBE_DEFLATE || - input_compression == COMPRESSION_DEFLATE || - input_compression == COMPRESSION_LZMA || - input_compression == COMPRESSION_ZSTD) - { - CopyField(TIFFTAG_PREDICTOR, predictor); - } - if (compression == COMPRESSION_ADOBE_DEFLATE || - compression == COMPRESSION_DEFLATE) - { - if (subcodec != -1) - { - if (TIFFSetField(out, TIFFTAG_DEFLATE_SUBCODEC, subcodec) != - 1) - { - return FALSE; - } - } - } - if (preset != -1) - { - switch (compression) - { - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - TIFFSetField(out, TIFFTAG_ZIPQUALITY, preset); - break; - case COMPRESSION_LZMA: - TIFFSetField(out, TIFFTAG_LZMAPRESET, preset); - break; - case COMPRESSION_ZSTD: - TIFFSetField(out, TIFFTAG_ZSTD_LEVEL, preset); - break; - } - } - break; - case COMPRESSION_WEBP: - if (preset != -1) - { - if (preset == 100) - { - TIFFSetField(out, TIFFTAG_WEBP_LOSSLESS, TRUE); - } - else - { - TIFFSetField(out, TIFFTAG_WEBP_LEVEL, preset); - } - } - break; - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - if (compression == COMPRESSION_CCITTFAX3) - { - if (g3opts != (uint32_t)-1) - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); - else if (input_compression == COMPRESSION_CCITTFAX3) - CopyField(TIFFTAG_GROUP3OPTIONS, g3opts); - } - else if (input_compression == COMPRESSION_CCITTFAX4) - CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG); - if (input_compression == COMPRESSION_CCITTFAX3 || - input_compression == COMPRESSION_CCITTFAX4) - { - CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); - CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); - } - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); - break; - } - { - uint32_t len32; - void **data; - if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &len32, &data)) - TIFFSetField(out, TIFFTAG_ICCPROFILE, len32, data); - } - { - uint16_t ninks; - const char *inknames; - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) - { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) - { - size_t inknameslen = strlen(inknames) + 1; - const char *cp = inknames; - while (ninks > 1) - { - cp = strchr(cp, '\0'); - cp++; - inknameslen += (strlen(cp) + 1); - ninks--; - } - if (inknameslen <= INT_MAX) - TIFFSetField(out, TIFFTAG_INKNAMES, (int)inknameslen, - inknames); - else - TIFFError(TIFFFileName(in), - "Error, length of inknames= %" PRIu64 - " exceeds size of int ", - (uint64_t)inknameslen); - } - } - } - { - unsigned short pg0, pg1; - - if (pageInSeq == 1) - { - if (pageNum < 0) /* only one input file */ - { - if (TIFFGetField(in, TIFFTAG_PAGENUMBER, &pg0, &pg1)) - TIFFSetField(out, TIFFTAG_PAGENUMBER, pg0, pg1); - } - else - TIFFSetField(out, TIFFTAG_PAGENUMBER, pageNum++, 0); - } - else - { - if (TIFFGetField(in, TIFFTAG_PAGENUMBER, &pg0, &pg1)) - { - if (pageNum < 0) /* only one input file */ - TIFFSetField(out, TIFFTAG_PAGENUMBER, pg0, pg1); - else - TIFFSetField(out, TIFFTAG_PAGENUMBER, pageNum++, 0); - } - } - } - - for (p = tags; p < &tags[NTAGS]; p++) - { - CopyTag(p->tag, p->count, p->type); - } - - cf = pickCopyFunc(in, out, bitspersample, samplesperpixel); - return (cf ? (*cf)(in, out, length, width, samplesperpixel) : FALSE); -} - -/* - * Copy Functions. - */ -#define DECLAREcpFunc(x) \ - static int x(TIFF *in, TIFF *out, uint32_t imagelength, \ - uint32_t imagewidth, tsample_t spp) - -#define DECLAREreadFunc(x) \ - static int x(TIFF *in, uint8_t *buf, uint32_t imagelength, \ - uint32_t imagewidth, tsample_t spp) -typedef int (*readFunc)(TIFF *, uint8_t *, uint32_t, uint32_t, tsample_t); - -#define DECLAREwriteFunc(x) \ - static int x(TIFF *out, uint8_t *buf, uint32_t imagelength, \ - uint32_t imagewidth, tsample_t spp) -typedef int (*writeFunc)(TIFF *, uint8_t *, uint32_t, uint32_t, tsample_t); - -/* - * Contig -> contig by scanline for rows/strip change. - */ -DECLAREcpFunc(cpContig2ContigByRow) -{ - tsize_t scanlinesize = TIFFScanlineSize(in); - tdata_t buf; - uint32_t row; - - buf = limitMalloc(scanlinesize); - if (!buf) - return 0; - _TIFFmemset(buf, 0, scanlinesize); - (void)imagewidth; - (void)spp; - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(in, buf, row, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), "Error, can't read scanline %" PRIu32, - row); - goto bad; - } - if (TIFFWriteScanline(out, buf, row, 0) < 0) - { - TIFFError(TIFFFileName(out), "Error, can't write scanline %" PRIu32, - row); - goto bad; - } - } - _TIFFfree(buf); - return 1; -bad: - _TIFFfree(buf); - return 0; -} - -typedef void biasFn(void *image, void *bias, uint32_t pixels); - -#define subtract(bits) \ - static void subtract##bits(void *i, void *b, uint32_t pixels) \ - { \ - uint##bits##_t *image = i; \ - uint##bits##_t *biasx = b; \ - while (pixels--) \ - { \ - *image = *image > *biasx ? *image - *biasx : 0; \ - image++, biasx++; \ - } \ - } - -subtract(8) subtract(16) subtract(32) - - static biasFn *lineSubtractFn(unsigned bits) -{ - switch (bits) - { - case 8: - return subtract8; - case 16: - return subtract16; - case 32: - return subtract32; - } - return NULL; -} - -/* - * Contig -> contig by scanline while subtracting a bias image. - */ -DECLAREcpFunc(cpBiasedContig2Contig) -{ - if (spp == 1) - { - tsize_t biasSize = TIFFScanlineSize(bias); - tsize_t bufSize = TIFFScanlineSize(in); - tdata_t buf, biasBuf; - uint32_t biasWidth = 0, biasLength = 0; - TIFFGetField(bias, TIFFTAG_IMAGEWIDTH, &biasWidth); - TIFFGetField(bias, TIFFTAG_IMAGELENGTH, &biasLength); - if (biasSize == bufSize && imagelength == biasLength && - imagewidth == biasWidth) - { - uint16_t sampleBits = 0; - biasFn *subtractLine; - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &sampleBits); - subtractLine = lineSubtractFn(sampleBits); - if (subtractLine) - { - uint32_t row; - buf = limitMalloc(bufSize); - biasBuf = limitMalloc(bufSize); - if (!buf || !biasBuf) - goto bad; - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(in, buf, row, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read scanline %" PRIu32, row); - goto bad; - } - if (TIFFReadScanline(bias, biasBuf, row, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read biased scanline %" PRIu32, - row); - goto bad; - } - subtractLine(buf, biasBuf, imagewidth); - if (TIFFWriteScanline(out, buf, row, 0) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write scanline %" PRIu32, row); - goto bad; - } - } - - _TIFFfree(buf); - _TIFFfree(biasBuf); - TIFFSetDirectory(bias, TIFFCurrentDirectory(bias)); /* rewind */ - return 1; - bad: - if (buf) - _TIFFfree(buf); - if (biasBuf) - _TIFFfree(biasBuf); - return 0; - } - else - { - TIFFError(TIFFFileName(in), - "No support for biasing %" PRIu16 " bit pixels\n", - sampleBits); - return 0; - } - } - TIFFError(TIFFFileName(in), - "Bias image %s,%" PRIu32 - "\nis not the same size as %s,%" PRIu32 "\n", - TIFFFileName(bias), TIFFCurrentDirectory(bias), - TIFFFileName(in), TIFFCurrentDirectory(in)); - return 0; - } - else - { - TIFFError(TIFFFileName(in), - "Can't bias %s,%" PRIu32 " as it has >1 Sample/Pixel\n", - TIFFFileName(in), TIFFCurrentDirectory(in)); - return 0; - } -} - -/* - * Strip -> strip for change in encoding. - */ -DECLAREcpFunc(cpDecodedStrips) -{ - tsize_t stripsize = TIFFStripSize(in); - tdata_t buf = limitMalloc(stripsize); - - (void)imagewidth; - (void)spp; - if (buf) - { - tstrip_t s, ns = TIFFNumberOfStrips(in); - uint32_t row = 0; - _TIFFmemset(buf, 0, stripsize); - for (s = 0; s < ns && row < imagelength; s++) - { - tsize_t cc = (row + rowsperstrip > imagelength) - ? TIFFVStripSize(in, imagelength - row) - : stripsize; - if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), "Error, can't read strip %" PRIu32, - s); - goto bad; - } - if (TIFFWriteEncodedStrip(out, s, buf, cc) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write strip %" PRIu32, s); - goto bad; - } - row += rowsperstrip; - } - _TIFFfree(buf); - return 1; - } - else - { - TIFFError( - TIFFFileName(in), - "Error, can't allocate memory buffer of size %" TIFF_SSIZE_FORMAT - " to read strips", - stripsize); - return 0; - } - -bad: - _TIFFfree(buf); - return 0; -} - -/* - * Separate -> separate by row for rows/strip change. - */ -DECLAREcpFunc(cpSeparate2SeparateByRow) -{ - tsize_t scanlinesize = TIFFScanlineSize(in); - tdata_t buf; - uint32_t row; - tsample_t s; - - (void)imagewidth; - buf = limitMalloc(scanlinesize); - if (!buf) - return 0; - _TIFFmemset(buf, 0, scanlinesize); - for (s = 0; s < spp; s++) - { - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(in, buf, row, s) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read scanline %" PRIu32, row); - goto bad; - } - if (TIFFWriteScanline(out, buf, row, s) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write scanline %" PRIu32, row); - goto bad; - } - } - } - _TIFFfree(buf); - return 1; -bad: - _TIFFfree(buf); - return 0; -} - -/* - * Contig -> separate by row. - */ -DECLAREcpFunc(cpContig2SeparateByRow) -{ - tsize_t scanlinesizein = TIFFScanlineSize(in); - tsize_t scanlinesizeout = TIFFScanlineSize(out); - tdata_t inbuf; - tdata_t outbuf; - register uint8_t *inp, *outp; - register uint32_t n; - uint32_t row; - tsample_t s; - uint16_t bps = 0; - - (void)TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); - if (bps != 8) - { - TIFFError(TIFFFileName(in), - "Error, can only handle BitsPerSample=8 in %s", - "cpContig2SeparateByRow"); - return 0; - } - - inbuf = limitMalloc(scanlinesizein); - outbuf = limitMalloc(scanlinesizeout); - if (!inbuf || !outbuf) - goto bad; - _TIFFmemset(inbuf, 0, scanlinesizein); - _TIFFmemset(outbuf, 0, scanlinesizeout); - /* unpack channels */ - for (s = 0; s < spp; s++) - { - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(in, inbuf, row, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read scanline %" PRIu32, row); - goto bad; - } - inp = ((uint8_t *)inbuf) + s; - outp = (uint8_t *)outbuf; - for (n = imagewidth; n-- > 0;) - { - *outp++ = *inp; - inp += spp; - } - if (TIFFWriteScanline(out, outbuf, row, s) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write scanline %" PRIu32, row); - goto bad; - } - } - } - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - return 1; -bad: - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - return 0; -} - -/* - * Separate -> contig by row. - */ -DECLAREcpFunc(cpSeparate2ContigByRow) -{ - tsize_t scanlinesizein = TIFFScanlineSize(in); - tsize_t scanlinesizeout = TIFFScanlineSize(out); - tdata_t inbuf; - tdata_t outbuf; - register uint8_t *inp, *outp; - register uint32_t n; - uint32_t row; - tsample_t s; - uint16_t bps = 0; - - (void)TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); - if (bps != 8) - { - TIFFError(TIFFFileName(in), - "Error, can only handle BitsPerSample=8 in %s", - "cpSeparate2ContigByRow"); - return 0; - } - - inbuf = limitMalloc(scanlinesizein); - outbuf = limitMalloc(scanlinesizeout); - if (!inbuf || !outbuf) - goto bad; - _TIFFmemset(inbuf, 0, scanlinesizein); - _TIFFmemset(outbuf, 0, scanlinesizeout); - for (row = 0; row < imagelength; row++) - { - /* merge channels */ - for (s = 0; s < spp; s++) - { - if (TIFFReadScanline(in, inbuf, row, s) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read scanline %" PRIu32, row); - goto bad; - } - inp = (uint8_t *)inbuf; - outp = ((uint8_t *)outbuf) + s; - for (n = imagewidth; n-- > 0;) - { - *outp = *inp++; - outp += spp; - } - } - if (TIFFWriteScanline(out, outbuf, row, 0) < 0) - { - TIFFError(TIFFFileName(out), "Error, can't write scanline %" PRIu32, - row); - goto bad; - } - } - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - return 1; -bad: - if (inbuf) - _TIFFfree(inbuf); - if (outbuf) - _TIFFfree(outbuf); - return 0; -} - -static void cpStripToTile(uint8_t *out, uint8_t *in, uint32_t rows, - uint32_t cols, int64_t outskew, int64_t inskew) -{ - while (rows-- > 0) - { - uint32_t j = cols; - while (j-- > 0) - *out++ = *in++; - out += outskew; - in += inskew; - } -} - -static void cpContigBufToSeparateBuf(uint8_t *out, uint8_t *in, uint32_t rows, - uint32_t cols, int outskew, int inskew, - tsample_t spp, int bytes_per_sample) -{ - while (rows-- > 0) - { - uint32_t j = cols; - while (j-- > 0) - { - int n = bytes_per_sample; - - while (n--) - { - *out++ = *in++; - } - in += (spp - 1) * bytes_per_sample; - } - out += outskew; - in += inskew; - } -} - -static void cpSeparateBufToContigBuf(uint8_t *out, uint8_t *in, uint32_t rows, - uint32_t cols, int outskew, int inskew, - tsample_t spp, int bytes_per_sample) -{ - while (rows-- > 0) - { - uint32_t j = cols; - while (j-- > 0) - { - int n = bytes_per_sample; - - while (n--) - { - *out++ = *in++; - } - out += (spp - 1) * bytes_per_sample; - } - out += outskew; - in += inskew; - } -} - -static int cpImage(TIFF *in, TIFF *out, readFunc fin, writeFunc fout, - uint32_t imagelength, uint32_t imagewidth, tsample_t spp) -{ - int status = 0; - tdata_t buf = NULL; - tsize_t scanlinesize = TIFFRasterScanlineSize(in); - /* - * XXX: Check for integer overflow. - */ - if (scanlinesize && imagelength && - ((TIFF_TMSIZE_T_MAX / (tmsize_t)imagelength) > scanlinesize)) - { - tsize_t bytes = scanlinesize * (tsize_t)imagelength; - buf = limitMalloc(bytes); - if (buf) - { - if ((*fin)(in, (uint8_t *)buf, imagelength, imagewidth, spp)) - { - status = - (*fout)(out, (uint8_t *)buf, imagelength, imagewidth, spp); - } - _TIFFfree(buf); - } - else - { - TIFFError(TIFFFileName(in), - "Error, can't allocate space for image buffer"); - } - } - else - { - TIFFError(TIFFFileName(in), - "Error, no space for image buffer - integer overflow"); - } - - return status; -} - -DECLAREreadFunc(readContigStripsIntoBuffer) -{ - tsize_t scanlinesize = TIFFScanlineSize(in); - uint8_t *bufp = buf; - uint32_t row; - - (void)imagewidth; - (void)spp; - for (row = 0; row < imagelength; row++) - { - if (TIFFReadScanline(in, (tdata_t)bufp, row, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), "Error, can't read scanline %" PRIu32, - row); - return 0; - } - bufp += scanlinesize; - } - - return 1; -} - -DECLAREreadFunc(readSeparateStripsIntoBuffer) -{ - int status = 1; - tsize_t scanlinesize = TIFFScanlineSize(in); - tdata_t scanline; - if (!scanlinesize) - return 0; - - scanline = limitMalloc(scanlinesize); - if (!scanline) - return 0; - _TIFFmemset(scanline, 0, scanlinesize); - (void)imagewidth; - if (scanline) - { - uint8_t *bufp = (uint8_t *)buf; - uint32_t row; - tsample_t s; - for (row = 0; row < imagelength; row++) - { - /* merge channels */ - for (s = 0; s < spp; s++) - { - uint8_t *bp = bufp + s; - tsize_t n = scanlinesize; - uint8_t *sbuf = scanline; - - if (TIFFReadScanline(in, scanline, row, s) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read scanline %" PRIu32, row); - status = 0; - goto done; - } - while (n-- > 0) - *bp = *sbuf++, bp += spp; - } - bufp += scanlinesize * spp; - } - } - -done: - _TIFFfree(scanline); - return status; -} - -/* This is a helper function. */ -static uint32_t _TIFFCastSSizeToUInt32(tmsize_t val, const char *module) -{ - if (val < 0) - { - TIFFError(module, "Unsigned integer underflow (negative)"); - return 0; - } - /* sizeof(tmsize_t) is determined by SIZEOF_SIZE_T */ -#ifdef SIZEOF_SIZE_T -#if SIZEOF_SIZE_T > 4 - if (val > UINT32_MAX) - { - TIFFError(module, "Integer overflow"); - return 0; - } -#endif -#else -#pragma message( \ - "---- Error: SIZEOF_SIZE_T not defined. Generate a compile error. ----") - SIZEOF_SIZE_T -#endif - return (uint32_t)val; -} - -DECLAREreadFunc(readContigTilesIntoBuffer) -{ - int status = 1; - tsize_t tilesize = TIFFTileSize(in); - tdata_t tilebuf; - uint32_t imagew = _TIFFCastSSizeToUInt32(TIFFScanlineSize(in), - "readContigTilesIntoBuffer"); - uint32_t tilew = _TIFFCastSSizeToUInt32(TIFFTileRowSize(in), - "readContigTilesIntoBuffer"); - int64_t iskew = (int64_t)imagew - (int64_t)tilew; - uint8_t *bufp = (uint8_t *)buf; - uint32_t tw, tl; - uint32_t row; - - (void)spp; - tilebuf = limitMalloc(tilesize); - if (tilebuf == 0) - return 0; - _TIFFmemset(tilebuf, 0, tilesize); - (void)TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw); - (void)TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); - - for (row = 0; row < imagelength; row += tl) - { - uint32_t nrow = (row + tl > imagelength) ? imagelength - row : tl; - uint32_t colb = 0; - uint32_t col; - - for (col = 0; col < imagewidth && colb < imagew; col += tw) - { - if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read tile at %" PRIu32 " %" PRIu32, col, - row); - status = 0; - goto done; - } - if (colb > iskew) - { - uint32_t width = imagew - colb; - uint32_t oskew = tilew - width; - cpStripToTile(bufp + colb, tilebuf, nrow, width, oskew + iskew, - oskew); - } - else - cpStripToTile(bufp + colb, tilebuf, nrow, tilew, iskew, 0); - colb += tilew; - } - bufp += imagew * nrow; - } -done: - _TIFFfree(tilebuf); - return status; -} - -DECLAREreadFunc(readSeparateTilesIntoBuffer) -{ - int status = 1; - uint32_t imagew = _TIFFCastSSizeToUInt32(TIFFRasterScanlineSize(in), - "readSeparateTilesIntoBuffer"); - uint32_t tilew = _TIFFCastSSizeToUInt32(TIFFTileRowSize(in), - "readSeparateTilesIntoBuffer"); - int iskew; - tsize_t tilesize = TIFFTileSize(in); - tdata_t tilebuf; - uint8_t *bufp = (uint8_t *)buf; - uint32_t tw, tl; - uint32_t row; - uint16_t bps = 0, bytes_per_sample; - - if (tilew && spp > (INT_MAX / tilew)) - { - TIFFError(TIFFFileName(in), - "Error, cannot handle that much samples per tile row (Tile " - "Width * Samples/Pixel)"); - return 0; - } - - if ((imagew - tilew * spp) > INT_MAX) - { - TIFFError(TIFFFileName(in), - "Error, image raster scan line size is too large"); - return 0; - } - - iskew = imagew - tilew * spp; - tilebuf = limitMalloc(tilesize); - if (tilebuf == 0) - return 0; - _TIFFmemset(tilebuf, 0, tilesize); - (void)TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw); - (void)TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); - (void)TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); - if (bps == 0) - { - TIFFError(TIFFFileName(in), "Error, cannot read BitsPerSample"); - status = 0; - goto done; - } - if ((bps % 8) != 0) - { - TIFFError( - TIFFFileName(in), - "Error, cannot handle BitsPerSample that is not a multiple of 8"); - status = 0; - goto done; - } - bytes_per_sample = bps / 8; - - for (row = 0; row < imagelength; row += tl) - { - uint32_t nrow = (row + tl > imagelength) ? imagelength - row : tl; - uint32_t colb = 0; - uint32_t col; - - for (col = 0; col < imagewidth; col += tw) - { - tsample_t s; - - for (s = 0; s < spp; s++) - { - if (TIFFReadTile(in, tilebuf, col, row, 0, s) < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read tile at %" PRIu32 " %" PRIu32 - ", " - "sample %" PRIu16, - col, row, s); - status = 0; - goto done; - } - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - if (colb + tilew * spp > imagew) - { - uint32_t width = imagew - colb; - int oskew = tilew * spp - width; - cpSeparateBufToContigBuf( - bufp + colb + s * bytes_per_sample, tilebuf, nrow, - width / (spp * bytes_per_sample), oskew + iskew, - oskew / spp, spp, bytes_per_sample); - } - else - cpSeparateBufToContigBuf(bufp + colb + s * bytes_per_sample, - tilebuf, nrow, tw, iskew, 0, spp, - bytes_per_sample); - } - colb += tilew * spp; - } - bufp += imagew * nrow; - } -done: - _TIFFfree(tilebuf); - return status; -} - -DECLAREwriteFunc(writeBufferToContigStrips) -{ - uint32_t row; - tstrip_t strip = 0; - - (void)imagewidth; - (void)spp; - (void)TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - for (row = 0; row < imagelength; row += rowsperstrip) - { - uint32_t nrows = (row + rowsperstrip > imagelength) ? imagelength - row - : rowsperstrip; - tsize_t stripsize = TIFFVStripSize(out, nrows); - if (TIFFWriteEncodedStrip(out, strip++, buf, stripsize) < 0) - { - TIFFError(TIFFFileName(out), "Error, can't write strip %" PRIu32, - strip - 1u); - return 0; - } - buf += stripsize; - } - return 1; -} - -DECLAREwriteFunc(writeBufferToSeparateStrips) -{ - uint32_t rowsize = imagewidth * spp; - tsize_t stripsize = TIFFStripSize(out); - tdata_t obuf; - tstrip_t strip = 0; - tsample_t s; - uint16_t bps = 0, bytes_per_sample; - - obuf = limitMalloc(stripsize); - if (obuf == NULL) - return (0); - _TIFFmemset(obuf, 0, stripsize); - (void)TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - (void)TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); - if (bps == 0) - { - TIFFError(TIFFFileName(out), "Error, cannot read BitsPerSample"); - _TIFFfree(obuf); - return 0; - } - if ((bps % 8) != 0) - { - TIFFError( - TIFFFileName(out), - "Error, cannot handle BitsPerSample that is not a multiple of 8"); - _TIFFfree(obuf); - return 0; - } - bytes_per_sample = bps / 8; - for (s = 0; s < spp; s++) - { - uint32_t row; - for (row = 0; row < imagelength; row += rowsperstrip) - { - uint32_t nrows = (row + rowsperstrip > imagelength) - ? imagelength - row - : rowsperstrip; - stripsize = TIFFVStripSize(out, nrows); - - cpContigBufToSeparateBuf(obuf, (uint8_t *)buf + row * rowsize + s, - nrows, imagewidth, 0, 0, spp, - bytes_per_sample); - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write strip %" PRIu32, strip - 1u); - _TIFFfree(obuf); - return 0; - } - } - } - _TIFFfree(obuf); - return 1; -} - -DECLAREwriteFunc(writeBufferToContigTiles) -{ - uint32_t imagew = _TIFFCastSSizeToUInt32(TIFFScanlineSize(out), - "writeBufferToContigTiles"); - uint32_t tilew = _TIFFCastSSizeToUInt32(TIFFTileRowSize(out), - "writeBufferToContigTiles"); - int iskew = imagew - tilew; - tsize_t tilesize = TIFFTileSize(out); - tdata_t obuf; - uint8_t *bufp = (uint8_t *)buf; - uint32_t tl, tw; - uint32_t row; - - (void)spp; - - obuf = limitMalloc(TIFFTileSize(out)); - if (obuf == NULL) - return 0; - _TIFFmemset(obuf, 0, tilesize); - (void)TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); - (void)TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); - for (row = 0; row < imagelength; row += tilelength) - { - uint32_t nrow = (row + tl > imagelength) ? imagelength - row : tl; - uint32_t colb = 0; - uint32_t col; - - for (col = 0; col < imagewidth && colb < imagew; col += tw) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - if (colb + tilew > imagew) - { - uint32_t width = imagew - colb; - int oskew = tilew - width; - cpStripToTile(obuf, bufp + colb, nrow, width, oskew, - oskew + iskew); - } - else - cpStripToTile(obuf, bufp + colb, nrow, tilew, 0, iskew); - if (TIFFWriteTile(out, obuf, col, row, 0, 0) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write tile at %" PRIu32 " %" PRIu32, - col, row); - _TIFFfree(obuf); - return 0; - } - colb += tilew; - } - bufp += nrow * imagew; - } - _TIFFfree(obuf); - return 1; -} - -DECLAREwriteFunc(writeBufferToSeparateTiles) -{ - uint32_t imagew = _TIFFCastSSizeToUInt32(TIFFScanlineSize(out), - "writeBufferToSeparateTiles"); - uint32_t tilew = _TIFFCastSSizeToUInt32(TIFFTileRowSize(out), - "writeBufferToSeparateTiles"); - uint32_t iimagew = _TIFFCastSSizeToUInt32(TIFFRasterScanlineSize(out), - "writeBufferToSeparateTiles"); - int iskew = iimagew - tilew * spp; - tsize_t tilesize = TIFFTileSize(out); - tdata_t obuf; - uint8_t *bufp = (uint8_t *)buf; - uint32_t tl, tw; - uint32_t row; - uint16_t bps = 0, bytes_per_sample; - - obuf = limitMalloc(TIFFTileSize(out)); - if (obuf == NULL) - return 0; - _TIFFmemset(obuf, 0, tilesize); - (void)TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); - (void)TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); - (void)TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); - if (bps == 0) - { - TIFFError(TIFFFileName(out), "Error, cannot read BitsPerSample"); - _TIFFfree(obuf); - return 0; - } - if ((bps % 8) != 0) - { - TIFFError( - TIFFFileName(out), - "Error, cannot handle BitsPerSample that is not a multiple of 8"); - _TIFFfree(obuf); - return 0; - } - bytes_per_sample = bps / 8; - - for (row = 0; row < imagelength; row += tl) - { - uint32_t nrow = (row + tl > imagelength) ? imagelength - row : tl; - uint32_t colb = 0; - uint32_t col; - - for (col = 0; col < imagewidth; col += tw) - { - tsample_t s; - for (s = 0; s < spp; s++) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - if (colb + tilew > imagew) - { - uint32_t width = (imagew - colb); - int oskew = tilew - width; - - cpContigBufToSeparateBuf(obuf, bufp + (colb * spp) + s, - nrow, width / bytes_per_sample, - oskew, (oskew * spp) + iskew, spp, - bytes_per_sample); - } - else - cpContigBufToSeparateBuf(obuf, bufp + (colb * spp) + s, - nrow, tilewidth, 0, iskew, spp, - bytes_per_sample); - if (TIFFWriteTile(out, obuf, col, row, 0, s) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write tile at %" PRIu32 " %" PRIu32 - " sample %" PRIu16, - col, row, s); - _TIFFfree(obuf); - return 0; - } - } - colb += tilew; - } - bufp += nrow * iimagew; - } - _TIFFfree(obuf); - return 1; -} - -/* - * Contig strips -> contig tiles. - */ -DECLAREcpFunc(cpContigStrips2ContigTiles) -{ - return cpImage(in, out, readContigStripsIntoBuffer, - writeBufferToContigTiles, imagelength, imagewidth, spp); -} - -/* - * Contig strips -> separate tiles. - */ -DECLAREcpFunc(cpContigStrips2SeparateTiles) -{ - return cpImage(in, out, readContigStripsIntoBuffer, - writeBufferToSeparateTiles, imagelength, imagewidth, spp); -} - -/* - * Separate strips -> contig tiles. - */ -DECLAREcpFunc(cpSeparateStrips2ContigTiles) -{ - return cpImage(in, out, readSeparateStripsIntoBuffer, - writeBufferToContigTiles, imagelength, imagewidth, spp); -} - -/* - * Separate strips -> separate tiles. - */ -DECLAREcpFunc(cpSeparateStrips2SeparateTiles) -{ - return cpImage(in, out, readSeparateStripsIntoBuffer, - writeBufferToSeparateTiles, imagelength, imagewidth, spp); -} - -/* - * Contig strips -> contig tiles. - */ -DECLAREcpFunc(cpContigTiles2ContigTiles) -{ - return cpImage(in, out, readContigTilesIntoBuffer, writeBufferToContigTiles, - imagelength, imagewidth, spp); -} - -/* - * Contig tiles -> separate tiles. - */ -DECLAREcpFunc(cpContigTiles2SeparateTiles) -{ - return cpImage(in, out, readContigTilesIntoBuffer, - writeBufferToSeparateTiles, imagelength, imagewidth, spp); -} - -/* - * Separate tiles -> contig tiles. - */ -DECLAREcpFunc(cpSeparateTiles2ContigTiles) -{ - return cpImage(in, out, readSeparateTilesIntoBuffer, - writeBufferToContigTiles, imagelength, imagewidth, spp); -} - -/* - * Separate tiles -> separate tiles (tile dimension change). - */ -DECLAREcpFunc(cpSeparateTiles2SeparateTiles) -{ - return cpImage(in, out, readSeparateTilesIntoBuffer, - writeBufferToSeparateTiles, imagelength, imagewidth, spp); -} - -/* - * Contig tiles -> contig tiles (tile dimension change). - */ -DECLAREcpFunc(cpContigTiles2ContigStrips) -{ - return cpImage(in, out, readContigTilesIntoBuffer, - writeBufferToContigStrips, imagelength, imagewidth, spp); -} - -/* - * Contig tiles -> separate strips. - */ -DECLAREcpFunc(cpContigTiles2SeparateStrips) -{ - return cpImage(in, out, readContigTilesIntoBuffer, - writeBufferToSeparateStrips, imagelength, imagewidth, spp); -} - -/* - * Separate tiles -> contig strips. - */ -DECLAREcpFunc(cpSeparateTiles2ContigStrips) -{ - return cpImage(in, out, readSeparateTilesIntoBuffer, - writeBufferToContigStrips, imagelength, imagewidth, spp); -} - -/* - * Separate tiles -> separate strips. - */ -DECLAREcpFunc(cpSeparateTiles2SeparateStrips) -{ - return cpImage(in, out, readSeparateTilesIntoBuffer, - writeBufferToSeparateStrips, imagelength, imagewidth, spp); -} - -/* - * Select the appropriate copy function to use. - */ -static copyFunc pickCopyFunc(TIFF *in, TIFF *out, uint16_t bitspersample, - uint16_t samplesperpixel) -{ - uint16_t shortv; - uint32_t w, l, tw, tl; - int bychunk; - - (void)TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv); - if (shortv != config && bitspersample != 8 && samplesperpixel > 1) - { - fprintf(stderr, - "%s: Cannot handle different planar configuration w/ " - "bits/sample != 8\n", - TIFFFileName(in)); - return (NULL); - } - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &l); - if (!(TIFFIsTiled(out) || TIFFIsTiled(in))) - { - uint32_t irps = (uint32_t)-1L; - TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &irps); - /* if biased, force decoded copying to allow image subtraction */ - bychunk = !bias && (rowsperstrip == irps); - } - else - { /* either in or out is tiled */ - if (bias) - { - fprintf(stderr, - "%s: Cannot handle tiled configuration w/bias image\n", - TIFFFileName(in)); - return (NULL); - } - if (TIFFIsTiled(out)) - { - if (!TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw)) - tw = w; - if (!TIFFGetField(in, TIFFTAG_TILELENGTH, &tl)) - tl = l; - bychunk = (tw == tilewidth && tl == tilelength); - } - else - { /* out's not, so in must be tiled */ - TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); - bychunk = (tw == w && tl == rowsperstrip); - } - } -#define T 1 -#define F 0 -#define pack(a, b, c, d, e) \ - ((long)(((a) << 11) | ((b) << 3) | ((c) << 2) | ((d) << 1) | (e))) - switch (pack(shortv, config, TIFFIsTiled(in), TIFFIsTiled(out), bychunk)) - { - /* Strips -> Tiles */ - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, F, T, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, F, T, T): - return cpContigStrips2ContigTiles; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, F, T, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, F, T, T): - return cpContigStrips2SeparateTiles; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, F, T, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, F, T, T): - return cpSeparateStrips2ContigTiles; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F, T, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F, T, T): - return cpSeparateStrips2SeparateTiles; - /* Tiles -> Tiles */ - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, T, T, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, T, T, T): - return cpContigTiles2ContigTiles; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, T, T, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, T, T, T): - return cpContigTiles2SeparateTiles; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, T, T, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, T, T, T): - return cpSeparateTiles2ContigTiles; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T, T, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T, T, T): - return cpSeparateTiles2SeparateTiles; - /* Tiles -> Strips */ - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, T, F, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, T, F, T): - return cpContigTiles2ContigStrips; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, T, F, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, T, F, T): - return cpContigTiles2SeparateStrips; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, T, F, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, T, F, T): - return cpSeparateTiles2ContigStrips; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T, F, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, T, F, T): - return cpSeparateTiles2SeparateStrips; - /* Strips -> Strips */ - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, F, F, F): - return bias ? cpBiasedContig2Contig : cpContig2ContigByRow; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_CONTIG, F, F, T): - return cpDecodedStrips; - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, F, F, F): - case pack(PLANARCONFIG_CONTIG, PLANARCONFIG_SEPARATE, F, F, T): - return cpContig2SeparateByRow; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, F, F, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_CONTIG, F, F, T): - return cpSeparate2ContigByRow; - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F, F, F): - case pack(PLANARCONFIG_SEPARATE, PLANARCONFIG_SEPARATE, F, F, T): - return cpSeparate2SeparateByRow; - } -#undef pack -#undef F -#undef T - fprintf(stderr, "tiffcp: %s: Don't know how to copy/convert image.\n", - TIFFFileName(in)); - return (NULL); -} diff --git a/third_party/libtiff/tools/tiffcrop.c b/third_party/libtiff/tools/tiffcrop.c deleted file mode 100644 index aac385e..0000000 --- a/third_party/libtiff/tools/tiffcrop.c +++ /dev/null @@ -1,10681 +0,0 @@ -/* clang-format off */ -/* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of - * the image data through additional options listed below - * - * Original code: - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * Additions (c) Richard Nolde 2006-2010 - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS OR ANY OTHER COPYRIGHT - * HOLDERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND - * ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE - * OR PERFORMANCE OF THIS SOFTWARE. - * - * Some portions of the current code are derived from tiffcp, primarily in - * the areas of lowlevel reading and writing of TAGS, scanlines and tiles though - * some of the original functions have been extended to support arbitrary bit - * depths. These functions are presented at the top of this file. - * - * Add support for the options below to extract sections of image(s) - * and to modify the whole image or selected portions of each image by - * rotations, mirroring, and colorscale/colormap inversion of selected - * types of TIFF images when appropriate. Some color model dependent - * functions are restricted to bilevel or 8 bit per sample data. - * See the man page for the full explanations. - * - * New Options: - * -h Display the syntax guide. - * -v Report the version and last build date for tiffcrop - * and libtiff. - * -z x1,y1,x2,y2:x3,y3,x4,y4:..xN,yN,xN + 1, yN + 1 - * Specify a series of coordinates to define rectangular - * regions by the top left and lower right corners. - * -e c|d|i|m|s export mode for images and selections from input images - * combined All images and selections are written to a single - * file (default) with multiple selections from one image - * combined into a single image - * divided All images and selections are written to a single file - * with each selection from one image written to a new image - * image Each input image is written to a new file - * (numeric filename sequence) with multiple selections from - * the image combined into one image - * multiple Each input image is written to a new file - * (numeric filename sequence) with each selection from - * the image written to a new image - * separated Individual selections from each image are written - * to separate files - * -U units [in, cm, px ] inches, centimeters or pixels - * -H # Set horizontal resolution of output images to # - * -V # Set vertical resolution of output images to # - * -J # Horizontal margin of output page to # expressed in current - * units when sectioning image into columns x rows - * using the -S cols:rows option. - * -K # Vertical margin of output page to # expressed in current - * units when sectioning image into columns x rows - * using the -S cols:rows option. - * -X # Horizontal dimension of region to extract expressed in current - * units, relative to the specified origin reference 'edge' left - * (default for X) or right. - * -Y # Vertical dimension of region to extract expressed in current - * units, relative to the specified origin reference 'edge' top - * (default for Y) or bottom. - * -O orient Orientation for output image, portrait, landscape, auto - * -P page Page size for output image segments, eg letter, legal, tabloid, - * etc. - * -S cols:rows Divide the image into equal sized segments using cols across - * and rows down - * -E t|l|r|b Edge to use as origin (i.e. 'side' of the image not 'corner') - * top = width from left, zones from top to bottom (default) - * bottom = width from left, zones from bottom to top - * left = zones from left to right, length from top - * right = zones from right to left, length from top - * -m #,#,#,# Margins from edges for selection: top, left, bottom, right - * (commas separated) - * -Z #:#,#:# Zones of the image designated as zone X of Y, - * eg 1:3 would be first of three equal portions measured - * from reference edge (i.e. 'side' not corner) - * -N odd|even|#,#-#,#|last - * Select sequences and/or ranges of images within file - * to process. The words odd or even may be used to specify - * all odd or even numbered images the word last may be used - * in place of a number in the sequence to indicate the final - * image in the file without knowing how many images there are. - * -R # Rotate image or crop selection by 90,180,or 270 degrees - * clockwise - * -F h|v Flip (mirror) image or crop selection horizontally - * or vertically - * -I [black|white|data|both] - * Invert color space, eg dark to light for bilevel and - * grayscale images If argument is white or black, set the - * PHOTOMETRIC_INTERPRETATION tag to MinIsBlack or MinIsWhite - * without altering the image data. If the argument is data - * or both, the image data are modified: - * both inverts the data and the PHOTOMETRIC_INTERPRETATION tag, - * data inverts the data but not the PHOTOMETRIC_INTERPRETATION tag - * -D input:,output:,format:,level:N,debug:N - * Dump raw data for input and/or output images to individual - * files in raw (binary) format or text (ASCII) representing - * binary data as strings of 1s and 0s. The filename arguments - * are used as stems from which individual files are created for - * each image. Text format includes annotations for image - * parameters and scanline info. Level selects which functions - * dump data, with higher numbers selecting lower level, - * scanline level routines. Debug reports a limited set - * of messages to monitor progress without enabling dump logs. - * - * Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive. - * In no case should the options be applied to a given - * selection successively. - * Note 2: Any of the -X, -Y, -Z and -z options together with other - * PAGE_MODE_x options such as -H, -V, -P, -J or -K are not supported - * and may cause buffer overflows. - */ -/* clang-format on */ - -#include "libport.h" -#include "tif_config.h" -#include "tiffiop.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#include "tiffio.h" - -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -#define TRUE 1 -#define FALSE 0 - -#ifndef TIFFhowmany -#define TIFFhowmany(x, y) \ - ((((uint32_t)(x)) + (((uint32_t)(y)) - 1)) / ((uint32_t)(y))) -#define TIFFhowmany8(x) \ - (((x)&0x07) ? ((uint32_t)(x) >> 3) + 1 : (uint32_t)(x) >> 3) -#endif - -/* - * Definitions and data structures required to support cropping and image - * manipulations. - */ - -#define EDGE_TOP 1 -#define EDGE_LEFT 2 -#define EDGE_BOTTOM 3 -#define EDGE_RIGHT 4 -#define EDGE_CENTER 5 - -#define MIRROR_HORIZ 1 -#define MIRROR_VERT 2 -#define MIRROR_BOTH 3 -#define ROTATECW_90 8 -#define ROTATECW_180 16 -#define ROTATECW_270 32 -#define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - -#define CROP_NONE \ - 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 \ - */ -#define CROP_MARGINS 1 /* "-m" */ -#define CROP_WIDTH 2 /* "-X" */ -#define CROP_LENGTH 4 /* "-Y" */ -#define CROP_ZONES 8 /* "-Z" */ -#define CROP_REGIONS 16 /* "-z" */ -#define CROP_ROTATE 32 -#define CROP_MIRROR 64 -#define CROP_INVERT 128 - -/* Modes for writing out images and selections */ -#define ONE_FILE_COMPOSITE 0 /* One file, sections combined sections */ -#define ONE_FILE_SEPARATED 1 /* One file, sections to new IFDs */ -#define FILE_PER_IMAGE_COMPOSITE 2 /* One file per image, combined sections */ -#define FILE_PER_IMAGE_SEPARATED 3 /* One file per input image */ -#define FILE_PER_SELECTION 4 /* One file per selection */ - -#define COMPOSITE_IMAGES 0 /* Selections combined into one image */ -#define SEPARATED_IMAGES 1 /* Selections saved to separate images */ - -#define STRIP 1 -#define TILE 2 - -#define MAX_REGIONS 8 /* number of regions to extract from a single page */ -#define MAX_OUTBUFFS 8 /* must match larger of zones or regions */ -#define MAX_SECTIONS 32 /* number of sections per page to write to output */ -#define MAX_IMAGES \ - 2048 /* number of images in discrete list, not in the file \ - */ -#define MAX_SAMPLES 8 /* maximum number of samples per pixel supported */ -#define MAX_BITS_PER_SAMPLE 64 /* maximum bit depth supported */ -#define MAX_EXPORT_PAGES 999999 /* maximum number of export pages per file */ - -#define DUMP_NONE 0 -#define DUMP_TEXT 1 -#define DUMP_RAW 2 - -#define TIFF_DIR_MAX 65534 - -/* To avoid mode buffer overflow */ -#define MAX_MODESTRING_LEN 9 - -/* Some conversion subroutines require image buffers, which are at least 3 bytes - * larger than the necessary size for the image itself. */ -#define NUM_BUFF_OVERSIZE_BYTES 3 - -/* Offsets into buffer for margins and fixed width and length segments */ -struct offset -{ - uint32_t tmargin; - uint32_t lmargin; - uint32_t bmargin; - uint32_t rmargin; - uint32_t crop_width; - uint32_t crop_length; - uint32_t startx; - uint32_t endx; - uint32_t starty; - uint32_t endy; -}; - -/* Description of a zone within the image. Position 1 of 3 zones would be - * the first third of the image. These are computed after margins and - * width/length requests are applied so that you can extract multiple - * zones from within a larger region for OCR or barcode recognition. - */ - -struct buffinfo -{ - size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ -}; - -struct zone -{ - int position; /* ordinal of segment to be extracted */ - int total; /* total equal sized divisions of crop area */ -}; - -struct pageseg -{ - uint32_t x1; /* index of left edge */ - uint32_t x2; /* index of right edge */ - uint32_t y1; /* index of top edge */ - uint32_t y2; /* index of bottom edge */ - int position; /* ordinal of segment to be extracted */ - int total; /* total equal sized divisions of crop area */ - uint32_t buffsize; /* size of buffer needed to hold the cropped zone */ -}; - -struct coordpairs -{ - double X1; /* index of left edge in current units */ - double X2; /* index of right edge in current units */ - double Y1; /* index of top edge in current units */ - double Y2; /* index of bottom edge in current units */ -}; - -struct region -{ - uint32_t x1; /* pixel offset of left edge */ - uint32_t x2; /* pixel offset of right edge */ - uint32_t y1; /* pixel offset of top edge */ - uint32_t y2; /* picel offset of bottom edge */ - uint32_t width; /* width in pixels */ - uint32_t length; /* length in pixels */ - uint32_t buffsize; /* size of buffer needed to hold the cropped region */ -}; - -/* Cropping parameters from command line and image data - * Note: This should be renamed to proc_opts and expanded to include all current - * globals if possible, but each function that accesses global variables will - * have to be redone. - */ -struct crop_mask -{ - double - width; /* Selection width for master crop region in requested units */ - double - length; /* Selection length for master crop region in requested units */ - double margins[4]; /* Top, left, bottom, right margins */ - float xres; /* Horizontal resolution read from image*/ - float yres; /* Vertical resolution read from image */ - uint32_t combined_width; /* Width of combined cropped zones */ - uint32_t combined_length; /* Length of combined cropped zones */ - uint32_t - bufftotal; /* Size of buffer needed to hold all the cropped region */ - uint16_t img_mode; /* Composite or separate images created from zones or - regions */ - uint16_t - exp_mode; /* Export input images or selections to one or more files */ - uint16_t crop_mode; /* Crop options to be applied */ - uint16_t res_unit; /* Resolution unit for margins and selections */ - uint16_t - edge_ref; /* Reference edge for sections extraction and combination */ - uint16_t rotation; /* Clockwise rotation of the extracted region or image */ - uint16_t mirror; /* Mirror extracted region or image horizontally or - vertically */ - uint16_t invert; /* Invert the color map of image or region */ - uint16_t photometric; /* Status of photometric interpretation for inverted - image */ - uint16_t selections; /* Number of regions or zones selected */ - uint16_t regions; /* Number of regions delimited by corner coordinates */ - struct region - regionlist[MAX_REGIONS]; /* Regions within page or master crop region */ - uint16_t zones; /* Number of zones delimited by Ordinal:Total requested */ - struct zone zonelist[MAX_REGIONS]; /* Zones indices to define a region */ - struct coordpairs corners[MAX_REGIONS]; /* Coordinates of upper left and - lower right corner */ -}; - -#define MAX_PAPERNAMES \ - (sizeof(PaperTable) / sizeof(PaperTable[0])) /* was 49 \ - */ -#define MAX_PAPERNAME_LENGTH 15 -#define DEFAULT_RESUNIT RESUNIT_INCH -#define DEFAULT_PAGE_HEIGHT 14.0 -#define DEFAULT_PAGE_WIDTH 8.5 -#define DEFAULT_RESOLUTION 300 -#define DEFAULT_PAPER_SIZE "legal" - -#define ORIENTATION_NONE 0 -#define ORIENTATION_PORTRAIT 1 -#define ORIENTATION_LANDSCAPE 2 -#define ORIENTATION_SEASCAPE 4 -#define ORIENTATION_AUTO 16 - -#define PAGE_MODE_NONE 0 -#define PAGE_MODE_RESOLUTION 1 -#define PAGE_MODE_PAPERSIZE 2 -#define PAGE_MODE_MARGINS 4 -#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - -#define INVERT_DATA_ONLY 10 -#define INVERT_DATA_AND_TAG 11 - -struct paperdef -{ - char name[MAX_PAPERNAME_LENGTH]; - double width; - double length; - double asratio; -}; - -/* European page sizes corrected from update sent by - * thomas . jarosch @ intra2net . com on 5/7/2010 - * Paper Size Width Length Aspect Ratio */ -static const struct paperdef PaperTable[/*MAX_PAPERNAMES*/] = { - {"default", 8.500, 14.000, 0.607}, - {"pa4", 8.264, 11.000, 0.751}, - {"letter", 8.500, 11.000, 0.773}, - {"legal", 8.500, 14.000, 0.607}, - {"half-letter", 8.500, 5.514, 1.542}, - {"executive", 7.264, 10.528, 0.690}, - {"tabloid", 11.000, 17.000, 0.647}, - {"11x17", 11.000, 17.000, 0.647}, - {"ledger", 17.000, 11.000, 1.545}, - {"archa", 9.000, 12.000, 0.750}, - {"archb", 12.000, 18.000, 0.667}, - {"archc", 18.000, 24.000, 0.750}, - {"archd", 24.000, 36.000, 0.667}, - {"arche", 36.000, 48.000, 0.750}, - {"csheet", 17.000, 22.000, 0.773}, - {"dsheet", 22.000, 34.000, 0.647}, - {"esheet", 34.000, 44.000, 0.773}, - {"superb", 11.708, 17.042, 0.687}, - {"commercial", 4.139, 9.528, 0.434}, - {"monarch", 3.889, 7.528, 0.517}, - {"envelope-dl", 4.333, 8.681, 0.499}, - {"envelope-c5", 6.389, 9.028, 0.708}, - {"europostcard", 4.139, 5.833, 0.710}, - {"a0", 33.110, 46.811, 0.707}, - {"a1", 23.386, 33.110, 0.706}, - {"a2", 16.535, 23.386, 0.707}, - {"a3", 11.693, 16.535, 0.707}, - {"a4", 8.268, 11.693, 0.707}, - {"a5", 5.827, 8.268, 0.705}, - {"a6", 4.134, 5.827, 0.709}, - {"a7", 2.913, 4.134, 0.705}, - {"a8", 2.047, 2.913, 0.703}, - {"a9", 1.457, 2.047, 0.712}, - {"a10", 1.024, 1.457, 0.703}, - {"b0", 39.370, 55.669, 0.707}, - {"b1", 27.835, 39.370, 0.707}, - {"b2", 19.685, 27.835, 0.707}, - {"b3", 13.898, 19.685, 0.706}, - {"b4", 9.843, 13.898, 0.708}, - {"b5", 6.929, 9.843, 0.704}, - {"b6", 4.921, 6.929, 0.710}, - {"c0", 36.102, 51.063, 0.707}, - {"c1", 25.512, 36.102, 0.707}, - {"c2", 18.031, 25.512, 0.707}, - {"c3", 12.756, 18.031, 0.707}, - {"c4", 9.016, 12.756, 0.707}, - {"c5", 6.378, 9.016, 0.707}, - {"c6", 4.488, 6.378, 0.704}, - {"", 0.000, 0.000, 1.000}}; - -/* Structure to define input image parameters */ -struct image_data -{ - float xres; - float yres; - uint32_t width; - uint32_t length; - uint16_t res_unit; - uint16_t bps; - uint16_t spp; - uint16_t planar; - uint16_t photometric; - uint16_t orientation; - uint16_t compression; - uint16_t adjustments; -}; - -/* Structure to define the output image modifiers */ -struct pagedef -{ - char name[16]; - double width; /* width in pixels */ - double length; /* length in pixels */ - double hmargin; /* margins to subtract from width of sections */ - double vmargin; /* margins to subtract from height of sections */ - double hres; /* horizontal resolution for output */ - double vres; /* vertical resolution for output */ - uint32_t mode; /* bitmask of modifiers to page format */ - uint16_t res_unit; /* resolution unit for output image */ - unsigned int rows; /* number of section rows */ - unsigned int cols; /* number of section cols */ - unsigned int orient; /* portrait, landscape, seascape, auto */ -}; - -struct dump_opts -{ - int debug; - int format; - int level; - char mode[4]; - char infilename[PATH_MAX + 1]; - char outfilename[PATH_MAX + 1]; - FILE *infile; - FILE *outfile; -}; - -/* globals */ -static int outtiled = -1; -static uint32_t tilewidth = 0; -static uint32_t tilelength = 0; - -static uint16_t config = 0; -static uint16_t compression = 0; -static uint16_t predictor = 0; -static uint16_t fillorder = 0; -static uint32_t rowsperstrip = 0; -static uint32_t g3opts = 0; -static int ignore = FALSE; /* if true, ignore read errors */ -static uint32_t defg3opts = (uint32_t)-1; -static int quality = 100; /* JPEG quality */ -static int jpegcolormode = -1; /* means YCbCr or to not convert */ -static uint16_t defcompression = (uint16_t)-1; -static uint16_t defpredictor = (uint16_t)-1; -static int pageNum = 0; -static int little_endian = 1; -static tmsize_t check_buffsize = 0; - -/* Functions adapted from tiffcp with additions or significant modifications */ -static int readContigStripsIntoBuffer(TIFF *, uint8_t *); -static int readSeparateStripsIntoBuffer(TIFF *, uint8_t *, uint32_t, uint32_t, - tsample_t, struct dump_opts *); -static int readContigTilesIntoBuffer(TIFF *, uint8_t *, uint32_t, uint32_t, - uint32_t, uint32_t, tsample_t, uint16_t); -static int readSeparateTilesIntoBuffer(TIFF *, uint8_t *, uint32_t, uint32_t, - uint32_t, uint32_t, tsample_t, uint16_t); -static int writeBufferToContigStrips(TIFF *, uint8_t *, uint32_t); -static int writeBufferToContigTiles(TIFF *, uint8_t *, uint32_t, uint32_t, - tsample_t, struct dump_opts *); -static int writeBufferToSeparateStrips(TIFF *, uint8_t *, uint32_t, uint32_t, - tsample_t, struct dump_opts *); -static int writeBufferToSeparateTiles(TIFF *, uint8_t *, uint32_t, uint32_t, - tsample_t, struct dump_opts *); -static int extractContigSamplesToBuffer(uint8_t *, uint8_t *, uint32_t, - uint32_t, tsample_t, uint16_t, uint16_t, - struct dump_opts *); -static int processCompressOptions(char *); -static void usage(int code); - -/* All other functions by Richard Nolde, not found in tiffcp */ -static void initImageData(struct image_data *); -static void initCropMasks(struct crop_mask *); -static void initPageSetup(struct pagedef *, struct pageseg *, - struct buffinfo[]); -static void initDumpOptions(struct dump_opts *); - -/* Command line and file naming functions */ -void process_command_opts(int, char *[], char *, char *, uint32_t *, uint16_t *, - uint16_t *, uint32_t *, uint32_t *, uint32_t *, - struct crop_mask *, struct pagedef *, - struct dump_opts *, unsigned int *, unsigned int *); -static int update_output_file(TIFF **, char *, int, char *, unsigned int *); - -/* * High level functions for whole image manipulation */ -static int get_page_geometry(char *, struct pagedef *); -static int computeInputPixelOffsets(struct crop_mask *, struct image_data *, - struct offset *); -static int computeOutputPixelOffsets(struct crop_mask *, struct image_data *, - struct pagedef *, struct pageseg *, - struct dump_opts *); -static int loadImage(TIFF *, struct image_data *, struct dump_opts *, - unsigned char **); -static int correct_orientation(struct image_data *, unsigned char **); -static int getCropOffsets(struct image_data *, struct crop_mask *, - struct dump_opts *); -static int processCropSelections(struct image_data *, struct crop_mask *, - unsigned char **, struct buffinfo[]); -static int writeSelections(TIFF *, TIFF **, struct crop_mask *, - struct image_data *, struct dump_opts *, - struct buffinfo[], char *, char *, unsigned int *, - unsigned int); - -/* Section functions */ -static int createImageSection(uint32_t, unsigned char **); -static int extractImageSection(struct image_data *, struct pageseg *, - unsigned char *, unsigned char *); -static int writeSingleSection(TIFF *, TIFF *, struct image_data *, - struct dump_opts *, uint32_t, uint32_t, double, - double, unsigned char *); -static int writeImageSections(TIFF *, TIFF *, struct image_data *, - struct pagedef *, struct pageseg *, - struct dump_opts *, unsigned char *, - unsigned char **); -/* Whole image functions */ -static int createCroppedImage(struct image_data *, struct crop_mask *, - unsigned char **, unsigned char **); -static int writeCroppedImage(TIFF *, TIFF *, struct image_data *image, - struct dump_opts *dump, uint32_t, uint32_t, - unsigned char *, int, int); - -/* Image manipulation functions */ -static int rotateContigSamples8bits(uint16_t, uint16_t, uint16_t, uint32_t, - uint32_t, uint32_t, uint8_t *, uint8_t *); -static int rotateContigSamples16bits(uint16_t, uint16_t, uint16_t, uint32_t, - uint32_t, uint32_t, uint8_t *, uint8_t *); -static int rotateContigSamples24bits(uint16_t, uint16_t, uint16_t, uint32_t, - uint32_t, uint32_t, uint8_t *, uint8_t *); -static int rotateContigSamples32bits(uint16_t, uint16_t, uint16_t, uint32_t, - uint32_t, uint32_t, uint8_t *, uint8_t *); -static int rotateImage(uint16_t, struct image_data *, uint32_t *, uint32_t *, - unsigned char **, size_t *, int); -static int mirrorImage(uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, - unsigned char *); -static int invertImage(uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, - unsigned char *); - -/* Functions to reverse the sequence of samples in a scanline */ -static int reverseSamples8bits(uint16_t, uint16_t, uint32_t, uint8_t *, - uint8_t *); -static int reverseSamples16bits(uint16_t, uint16_t, uint32_t, uint8_t *, - uint8_t *); -static int reverseSamples24bits(uint16_t, uint16_t, uint32_t, uint8_t *, - uint8_t *); -static int reverseSamples32bits(uint16_t, uint16_t, uint32_t, uint8_t *, - uint8_t *); -static int reverseSamplesBytes(uint16_t, uint16_t, uint32_t, uint8_t *, - uint8_t *); - -/* Functions for manipulating individual samples in an image */ -static int extractSeparateRegion(struct image_data *, struct crop_mask *, - unsigned char *, unsigned char *, int); -static int extractCompositeRegions(struct image_data *, struct crop_mask *, - unsigned char *, unsigned char *); -static int extractContigSamples8bits(uint8_t *, uint8_t *, uint32_t, tsample_t, - uint16_t, uint16_t, tsample_t, uint32_t, - uint32_t); -static int extractContigSamples16bits(uint8_t *, uint8_t *, uint32_t, tsample_t, - uint16_t, uint16_t, tsample_t, uint32_t, - uint32_t); -static int extractContigSamples24bits(uint8_t *, uint8_t *, uint32_t, tsample_t, - uint16_t, uint16_t, tsample_t, uint32_t, - uint32_t); -static int extractContigSamples32bits(uint8_t *, uint8_t *, uint32_t, tsample_t, - uint16_t, uint16_t, tsample_t, uint32_t, - uint32_t); -static int extractContigSamplesBytes(uint8_t *, uint8_t *, uint32_t, tsample_t, - uint16_t, uint16_t, tsample_t, uint32_t, - uint32_t); -static int extractContigSamplesShifted8bits(uint8_t *, uint8_t *, uint32_t, - tsample_t, uint16_t, uint16_t, - tsample_t, uint32_t, uint32_t, int); -static int extractContigSamplesShifted16bits(uint8_t *, uint8_t *, uint32_t, - tsample_t, uint16_t, uint16_t, - tsample_t, uint32_t, uint32_t, - int); -static int extractContigSamplesShifted24bits(uint8_t *, uint8_t *, uint32_t, - tsample_t, uint16_t, uint16_t, - tsample_t, uint32_t, uint32_t, - int); -static int extractContigSamplesShifted32bits(uint8_t *, uint8_t *, uint32_t, - tsample_t, uint16_t, uint16_t, - tsample_t, uint32_t, uint32_t, - int); -static int extractContigSamplesToTileBuffer(uint8_t *, uint8_t *, uint32_t, - uint32_t, uint32_t, uint32_t, - tsample_t, uint16_t, uint16_t, - uint16_t, struct dump_opts *); - -/* Functions to combine separate planes into interleaved planes */ -static int combineSeparateSamples8bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint16_t, uint16_t, FILE *, - int, int); -static int combineSeparateSamples16bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint16_t, uint16_t, FILE *, - int, int); -static int combineSeparateSamples24bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint16_t, uint16_t, FILE *, - int, int); -static int combineSeparateSamples32bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint16_t, uint16_t, FILE *, - int, int); -static int combineSeparateSamplesBytes(unsigned char *[], unsigned char *, - uint32_t, uint32_t, tsample_t, uint16_t, - FILE *, int, int); - -static int combineSeparateTileSamples8bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, FILE *, int, - int); -static int combineSeparateTileSamples16bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, FILE *, int, - int); -static int combineSeparateTileSamples24bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, FILE *, int, - int); -static int combineSeparateTileSamples32bits(uint8_t *[], uint8_t *, uint32_t, - uint32_t, uint32_t, uint32_t, - uint16_t, uint16_t, FILE *, int, - int); -static int combineSeparateTileSamplesBytes(unsigned char *[], unsigned char *, - uint32_t, uint32_t, uint32_t, - uint32_t, tsample_t, uint16_t, - FILE *, int, int); - -/* Dump functions for debugging */ -static void dump_info(FILE *, int, char *, char *, ...); -static int dump_data(FILE *, int, char *, unsigned char *, uint32_t); -static int dump_byte(FILE *, int, char *, unsigned char); -static int dump_short(FILE *, int, char *, uint16_t); -static int dump_long(FILE *, int, char *, uint32_t); -static int dump_wide(FILE *, int, char *, uint64_t); -static int dump_buffer(FILE *, int, uint32_t, uint32_t, uint32_t, - unsigned char *); - -/* End function declarations */ -/* Functions derived in whole or in part from tiffcp */ -/* The following functions are taken largely intact from tiffcp */ - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -/** - * This custom malloc function enforce a maximum allocation size - */ -static void *limitMalloc(tmsize_t s) -{ - if (maxMalloc && (s > maxMalloc)) - { - fprintf(stderr, - "MemoryLimitError: allocation of %" PRIu64 - " bytes is forbidden. Limit is %" PRIu64 ".\n", - (uint64_t)s, (uint64_t)maxMalloc); - fprintf(stderr, " use -k option to change limit.\n"); - return NULL; - } - return _TIFFmalloc(s); -} - -static const char usage_info[] = - "Copy, crop, convert, extract, and/or process TIFF files\n\n" - "usage: tiffcrop [options] source1 ... sourceN destination\n" - "where options are:\n" - " -h Print this syntax listing\n" - " -v Print tiffcrop version identifier and last revision date\n" - " \n" - " -a Append to output instead of overwriting\n" - " -B Force output to be written with Big - Endian byte order.\n" - " -L Force output to be written with Little-Endian byte order.\n" - " -M Suppress the use of memory-mapped files when reading images.\n" - " -C Suppress the use of \"strip chopping\" when reading images that " - "have a single strip/tile of uncompressed data.\n" - " \n" - " -d offset Set initial directory offset, counting first image as one, " - "not zero\n" - " -p contig Pack samples contiguously (e.g. RGBRGB...)\n" - " -p separate Store samples separately (e.g. RRR...GGG...BBB...)\n" - " -s Write output in strips\n" - " -t Write output in tiles\n" - " -i Ignore read errors\n" - " -k size Set the memory allocation limit in MiB. 0 to disable limit\n" - " \n" - " -r # Make each strip have no more than # rows\n" - " -w # Set output tile width (pixels)\n" - " -l # Set output tile length (pixels)\n" - " \n" - " -f lsb2msb Force lsb-to-msb FillOrder for output\n" - " -f msb2lsb Force msb-to-lsb FillOrder for output\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] Compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:\n" */ - " # Set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] Compress output with deflate encoding\n" - /* " Deflate (ZIP) options:\n" */ - " # Set predictor value\n" -#endif -#ifdef JPEG_SUPPORT - " -c jpeg[:opts] Compress output with JPEG encoding\n" - /* " JPEG options:\n" */ - " # Set compression quality level (0-100, default 100)\n" - " raw Output same colorspace image as input\n" - " rgb Output color image as RGB (default is YCbCr)\n" - " For example, -c jpeg:raw:50 for JPEG-encoded with 50% comp. " - "quality and the same colorspace\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits Compress output with packbits encoding\n" -#endif -#ifdef CCITT_SUPPORT - " -c g3[:opts] Compress output with CCITT Group 3 encoding\n" - /* " CCITT Group 3 options:\n" */ - " 1d Use default CCITT Group 3 1D-encoding\n" - " 2d Use optional CCITT Group 3 2D-encoding\n" - " fill Byte-align EOL codes\n" - " For example, -c g3:2d:fill for G3-2D-encoded data with byte-aligned " - "EOLs\n" - " -c g4 Compress output with CCITT Group 4 encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || defined(JPEG_SUPPORT) || \ - defined(PACKBITS_SUPPORT) || defined(CCITT_SUPPORT) - " -c none Use no compression algorithm on output\n" -#endif - "\n" - "Page and selection options:\n" - " -N odd|even|#,#-#,#|last sequences and ranges of images within " - "file to process\n" - " The words odd or even may be used to specify all odd or even " - "numbered images.\n" - " The word last may be used in place of a number in the " - "sequence to indicate.\n" - " The final image in the file without knowing how many images " - "there are.\n" - " Numbers are counted from one even though TIFF IFDs are " - "counted from zero.\n" - "\n" - " -E t|l|r|b edge to use as origin for width and length of crop region\n" - " -U units [in, cm, px ] inches, centimeters or pixels\n" - " \n" - " -m #,#,#,# margins from edges for selection: top, left, bottom, right " - "separated by commas\n" - " -X # horizontal dimension of region to extract expressed in " - "current units\n" - " -Y # vertical dimension of region to extract expressed in current " - "units\n" - " -Z #:#,#:# zones of the image designated as position X of Y,\n" - " eg 1:3 would be first of three equal portions measured from " - "reference edge\n" - " -z x1,y1,x2,y2:...:xN,yN,xN+1,yN+1\n" - " regions of the image designated by upper left and lower " - "right coordinates\n" - "\n" - "Export grouping options:\n" - " -e c|d|i|m|s export mode for images and selections from input " - "images.\n" - " When exporting a composite image from multiple zones or " - "regions\n" - " (combined and image modes), the selections must have " - "equal sizes\n" - " for the axis perpendicular to the edge specified with " - "-E.\n" - " c|combined All images and selections are written to a single file " - "(default).\n" - " with multiple selections from one image combined into a " - "single image.\n" - " d|divided All images and selections are written to a single file\n" - " with each selection from one image written to a new " - "image.\n" - " i|image Each input image is written to a new file (numeric " - "filename sequence)\n" - " with multiple selections from the image combined into " - "one image.\n" - " m|multiple Each input image is written to a new file (numeric " - "filename sequence)\n" - " with each selection from the image written to a new " - "image.\n" - " s|separated Individual selections from each image are written to " - "separate files.\n" - "\n" - "Output options:\n" - " -H # Set horizontal resolution of output images to #\n" - " -V # Set vertical resolution of output images to #\n" - " -J # Set horizontal margin of output page to # expressed in " - "current units\n" - " when sectioning image into columns x rows using the -S " - "cols:rows option\n" - " -K # Set verticalal margin of output page to # expressed in " - "current units\n" - " when sectioning image into columns x rows using the -S " - "cols:rows option\n" - " \n" - " -O orient orientation for output image, portrait, landscape, auto\n" - " -P page page size for output image segments, eg letter, legal, " - "tabloid, etc\n" - " use #.#x#.# to specify a custom page size in the currently " - "defined units\n" - " where #.# represents the width and length\n" - " -S cols:rows Divide the image into equal sized segments using cols " - "across and rows down.\n" - "\n" - " -F hor|vert|both\n" - " flip (mirror) image or region horizontally, vertically, or " - "both\n" - " -R # [90,180,or 270] degrees clockwise rotation of image or " - "extracted region\n" - " -I [black|white|data|both]\n" - " invert color space, eg dark to light for bilevel and " - "grayscale images\n" - " If argument is white or black, set the " - "PHOTOMETRIC_INTERPRETATION \n" - " tag to MinIsBlack or MinIsWhite without altering the image " - "data\n" - " If the argument is data or both, the image data are " - "modified:\n" - " both inverts the data and the PHOTOMETRIC_INTERPRETATION " - "tag,\n" - " data inverts the data but not the PHOTOMETRIC_INTERPRETATION " - "tag\n" - "\n" - "-D opt1:value1,opt2:value2,opt3:value3:opt4:value4\n" - " Debug/dump program progress and/or data to non-TIFF files.\n" - " Options include the following and must be joined as a comma\n" - " separate list. The use of this option is generally limited " - "to\n" - " program debugging and development of future options.\n" - "\n" - " debug:N Display limited program progress indicators where larger N\n" - " increase the level of detail. Note: Tiffcrop may be compiled " - "with\n" - " -DDEVELMODE to enable additional very low level debug " - "reporting.\n" - "\n" - " Format:txt|raw Format any logged data as ASCII text or raw binary \n" - " values. ASCII text dumps include strings of ones and zeroes\n" - " representing the binary values in the image data plus " - "identifying headers.\n" - "\n" - " level:N Specify the level of detail presented in the dump files.\n" - " This can vary from dumps of the entire input or output image " - "data to dumps\n" - " of data processed by specific functions. Current range of " - "levels is 1 to 3.\n" - "\n" - " input:full-path-to-directory/input-dumpname\n" - "\n" - " output:full-path-to-directory/output-dumpnaem\n" - "\n" - " When dump files are being written, each image will be " - "written to a separate\n" - " file with the name built by adding a numeric sequence value " - "to the dumpname\n" - " and an extension of .txt for ASCII dumps or .bin for binary " - "dumps.\n" - "\n" - " The four debug/dump options are independent, though it makes " - "little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" - "Note 1: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given " - "selection successively.\n" - "\n" - "Note 2: Any of the -X, -Y, -Z and -z options together with other " - "PAGE_MODE_x options\n" - " such as - H, -V, -P, -J or -K are not supported and may " - "cause buffer overflows.\n" - "\n"; - -/* This function could be modified to pass starting sample offset - * and number of samples as args to select fewer than spp - * from input image. These would then be passed to individual - * extractContigSampleXX routines. - */ -static int readContigTilesIntoBuffer(TIFF *in, uint8_t *buf, - uint32_t imagelength, uint32_t imagewidth, - uint32_t tw, uint32_t tl, tsample_t spp, - uint16_t bps) -{ - int status = 1; - tsample_t sample = 0; - tsample_t count = spp; - uint32_t row, col, trow; - uint32_t nrow, ncol; - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; - tmsize_t tile_rowsize = TIFFTileRowSize(in); - tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t *)buf; - unsigned char *src = NULL; - unsigned char *dst = NULL; - tsize_t tbytes = 0, tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(in); - unsigned char *tilebuf = NULL; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - - if ((bps % 8) == 0) - shift_width = 0; - else - { - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - } - - tile_buffsize = tilesize; - if (tilesize == 0 || tile_rowsize == 0) - { - TIFFError("readContigTilesIntoBuffer", - "Tile size or tile rowsize is zero"); - exit(EXIT_FAILURE); - } - - if (tilesize < (tsize_t)(tl * tile_rowsize)) - { -#ifdef DEBUG2 - TIFFError("readContigTilesIntoBuffer", - "Tilesize %" PRId64 - " is too small, using alternate calculation %" PRIu64, - tilesize, tl * tile_rowsize); -#endif - if (tile_rowsize != 0 && - (tmsize_t)tl > (TIFF_TMSIZE_T_MAX / tile_rowsize)) - { - TIFFError("readContigTilesIntoBuffer", - "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } - tile_buffsize = tl * tile_rowsize; - } - - /* Add 3 padding bytes for extractContigSamplesShifted32bits */ - if ((size_t)tile_buffsize > TIFF_TMSIZE_T_MAX - NUM_BUFF_OVERSIZE_BYTES) - { - TIFFError("readContigTilesIntoBuffer", - "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } - tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; - tilebuf[tile_buffsize + 1] = 0; - tilebuf[tile_buffsize + 2] = 0; - - dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; - for (col = 0; col < imagewidth; col += tw) - { - tbytes = TIFFReadTile(in, tilebuf, col, row, 0, 0); - if (tbytes < tilesize && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read tile at row %" PRIu32 - " col %" PRIu32 ", Read %" TIFF_SSIZE_FORMAT - " bytes of %" TIFF_SSIZE_FORMAT, - col, row, tbytes, tilesize); - status = 0; - _TIFFfree(tilebuf); - return status; - } - - row_offset = row * dst_rowsize; - col_offset = ((col * bps * spp) + 7) / 8; - bufp = buf + row_offset + col_offset; - - if (col + tw > imagewidth) - ncol = imagewidth - col; - else - ncol = tw; - - /* Each tile scanline will start on a byte boundary but it - * has to be merged into the scanline for the entire - * image buffer and the previous segment may not have - * ended on a byte boundary - */ - /* Optimization for common bit depths, all samples */ - if (((bps % 8) == 0) && (count == spp)) - { - for (trow = 0; trow < nrow; trow++) - { - src_offset = trow * tile_rowsize; - _TIFFmemcpy(bufp, tilebuf + src_offset, - (ncol * spp * bps) / 8); - bufp += (imagewidth * bps * spp) / 8; - } - } - else - { - /* Bit depths not a multiple of 8 and/or extract fewer than spp - * samples */ - prev_trailing_bits = trailing_bits = 0; - trailing_bits = (ncol * bps * spp) % 8; - - /* for (trow = 0; tl < nrow; trow++) */ - for (trow = 0; trow < nrow; trow++) - { - src_offset = trow * tile_rowsize; - src = tilebuf + src_offset; - dst_offset = (row + trow) * (tmsize_t)dst_rowsize; - dst = buf + dst_offset + col_offset; - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes(src, dst, ncol, - sample, spp, bps, - count, 0, ncol)) - { - TIFFError("readContigTilesIntoBuffer", - "Unable to extract row %" PRIu32 - " from tile %" PRIu32, - row, TIFFCurrentTile(in)); - _TIFFfree(tilebuf); - return 1; - } - break; - case 1: - if (bps == 1) - { - if (extractContigSamplesShifted8bits( - src, dst, ncol, sample, spp, bps, count, - 0, ncol, prev_trailing_bits)) - { - TIFFError("readContigTilesIntoBuffer", - "Unable to extract row %" PRIu32 - " from tile %" PRIu32, - row, TIFFCurrentTile(in)); - _TIFFfree(tilebuf); - return 1; - } - break; - } - else if (extractContigSamplesShifted16bits( - src, dst, ncol, sample, spp, bps, - count, 0, ncol, prev_trailing_bits)) - { - TIFFError("readContigTilesIntoBuffer", - "Unable to extract row %" PRIu32 - " from tile %" PRIu32, - row, TIFFCurrentTile(in)); - _TIFFfree(tilebuf); - return 1; - } - break; - case 2: - if (extractContigSamplesShifted24bits( - src, dst, ncol, sample, spp, bps, count, 0, - ncol, prev_trailing_bits)) - { - TIFFError("readContigTilesIntoBuffer", - "Unable to extract row %" PRIu32 - " from tile %" PRIu32, - row, TIFFCurrentTile(in)); - _TIFFfree(tilebuf); - return 1; - } - break; - case 3: - case 4: - case 5: - if (extractContigSamplesShifted32bits( - src, dst, ncol, sample, spp, bps, count, 0, - ncol, prev_trailing_bits)) - { - TIFFError("readContigTilesIntoBuffer", - "Unable to extract row %" PRIu32 - " from tile %" PRIu32, - row, TIFFCurrentTile(in)); - _TIFFfree(tilebuf); - return 1; - } - break; - default: - TIFFError("readContigTilesIntoBuffer", - "Unsupported bit depth %" PRIu16, bps); - _TIFFfree(tilebuf); - return 1; - } - } - } - } - } - - _TIFFfree(tilebuf); - return status; -} - -static int readSeparateTilesIntoBuffer(TIFF *in, uint8_t *obuf, - uint32_t imagelength, - uint32_t imagewidth, uint32_t tw, - uint32_t tl, uint16_t spp, uint16_t bps) -{ - int i, status = 1, sample; - int shift_width, bytes_per_pixel; - uint16_t bytes_per_sample; - uint32_t row, col; /* Current row and col of image */ - uint32_t nrow, ncol; /* Number of rows and cols in current tile */ - uint32_t row_offset, col_offset; /* Output buffer offsets */ - tsize_t tbytes = 0, tilesize = TIFFTileSize(in); - tsample_t s; - uint8_t *bufp = (uint8_t *)obuf; - unsigned char *srcbuffs[MAX_SAMPLES]; - unsigned char *tbuff = NULL; - - bytes_per_sample = (bps + 7) / 8; - - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; - tbuff = - (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError("readSeparateTilesIntoBuffer", - "Unable to allocate tile read buffer for sample %d", - sample); - for (i = 0; i < sample; i++) - _TIFFfree(srcbuffs[i]); - return 0; - } - srcbuffs[sample] = tbuff; - } - /* Each tile contains only the data for a single plane - * arranged in scanlines of tw * bytes_per_sample bytes. - */ - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; - for (col = 0; col < imagewidth; col += tw) - { - for (s = 0; s < spp && s < MAX_SAMPLES; s++) - { /* Read each plane of a tile set into srcbuffs[s] */ - tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s); - if (tbytes < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read tile for row %" PRIu32 - " col %" PRIu32 ", " - "sample %" PRIu16, - col, row, s); - status = 0; - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); - sample++) - { - tbuff = srcbuffs[sample]; - if (tbuff != NULL) - _TIFFfree(tbuff); - } - return status; - } - } - /* Tiles on the right edge may be padded out to tw - * which must be a multiple of 16. - * Ncol represents the visible (non padding) portion. - */ - if (col + tw > imagewidth) - ncol = imagewidth - col; - else - ncol = tw; - - row_offset = row * (((imagewidth * spp * bps) + 7) / 8); - col_offset = ((col * spp * bps) + 7) / 8; - bufp = obuf + row_offset + col_offset; - - if ((bps % 8) == 0) - { - if (combineSeparateTileSamplesBytes(srcbuffs, bufp, ncol, nrow, - imagewidth, tw, spp, bps, - NULL, 0, 0)) - { - status = 0; - break; - } - } - else - { - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - - switch (shift_width) - { - case 1: - if (combineSeparateTileSamples8bits( - srcbuffs, bufp, ncol, nrow, imagewidth, tw, spp, - bps, NULL, 0, 0)) - { - status = 0; - break; - } - break; - case 2: - if (combineSeparateTileSamples16bits( - srcbuffs, bufp, ncol, nrow, imagewidth, tw, spp, - bps, NULL, 0, 0)) - { - status = 0; - break; - } - break; - case 3: - if (combineSeparateTileSamples24bits( - srcbuffs, bufp, ncol, nrow, imagewidth, tw, spp, - bps, NULL, 0, 0)) - { - status = 0; - break; - } - break; - case 4: - case 5: - case 6: - case 7: - case 8: - if (combineSeparateTileSamples32bits( - srcbuffs, bufp, ncol, nrow, imagewidth, tw, spp, - bps, NULL, 0, 0)) - { - status = 0; - break; - } - break; - default: - TIFFError("readSeparateTilesIntoBuffer", - "Unsupported bit depth: %" PRIu16, bps); - status = 0; - break; - } - } - } - } - - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - tbuff = srcbuffs[sample]; - if (tbuff != NULL) - _TIFFfree(tbuff); - } - - return status; -} - -static int writeBufferToContigStrips(TIFF *out, uint8_t *buf, - uint32_t imagelength) -{ - uint32_t row, nrows, rowsperstrip; - tstrip_t strip = 0; - tsize_t stripsize; - - TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - for (row = 0; row < imagelength; row += rowsperstrip) - { - nrows = (row + rowsperstrip > imagelength) ? imagelength - row - : rowsperstrip; - stripsize = TIFFVStripSize(out, nrows); - if (TIFFWriteEncodedStrip(out, strip++, buf, stripsize) < 0) - { - TIFFError(TIFFFileName(out), "Error, can't write strip %" PRIu32, - strip - 1); - return 1; - } - buf += stripsize; - } - - return 0; -} - -/* Abandon plans to modify code so that plannar orientation separate images - * do not have all samples for each channel written before all samples - * for the next channel have been abandoned. - * Libtiff internals seem to depend on all data for a given sample - * being contiguous within a strip or tile when PLANAR_CONFIG is - * separate. All strips or tiles of a given plane are written - * before any strips or tiles of a different plane are stored. - */ -static int writeBufferToSeparateStrips(TIFF *out, uint8_t *buf, uint32_t length, - uint32_t width, uint16_t spp, - struct dump_opts *dump) -{ - uint8_t *src; - uint16_t bps; - uint32_t row, nrows, rowsize, rowsperstrip; - uint32_t bytes_per_sample; - tsample_t s; - tstrip_t strip = 0; - tsize_t stripsize = TIFFStripSize(out); - tsize_t rowstripsize, scanlinesize = TIFFScanlineSize(out); - tdata_t obuf; - - (void)TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - (void)TIFFGetFieldDefaulted(out, TIFFTAG_BITSPERSAMPLE, &bps); - bytes_per_sample = (bps + 7) / 8; - if (width == 0 || (uint32_t)bps * (uint32_t)spp > UINT32_MAX / width || - bps * spp * width > UINT32_MAX - 7U) - { - TIFFError( - TIFFFileName(out), - "Error, uint32_t overflow when computing (bps * spp * width) + 7"); - return 1; - } - rowsize = - ((bps * spp * width) + 7U) / 8; /* source has interleaved samples */ - if (bytes_per_sample == 0 || rowsperstrip > UINT32_MAX / bytes_per_sample || - rowsperstrip * bytes_per_sample > UINT32_MAX / (width + 1)) - { - TIFFError(TIFFFileName(out), - "Error, uint32_t overflow when computing rowsperstrip * " - "bytes_per_sample * (width + 1)"); - return 1; - } - rowstripsize = (tsize_t)rowsperstrip * bytes_per_sample * (width + 1); - - /* Add 3 padding bytes for extractContigSamples32bits */ - obuf = limitMalloc(rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - - for (s = 0; s < spp; s++) - { - for (row = 0; row < length; row += rowsperstrip) - { - nrows = (row + rowsperstrip > length) ? length - row : rowsperstrip; - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); - memset(obuf, '\0', rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, - bps, dump)) - { - _TIFFfree(obuf); - return 1; - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { - if ((uint64_t)scanlinesize > 0x0ffffffffULL) - { - dump_info(dump->infile, dump->format, "loadImage", - "Attention: scanlinesize %" PRIu64 - " is larger than UINT32_MAX.\nFollowing dump " - "might be wrong.", - (uint64_t)scanlinesize); - } - dump_info( - dump->outfile, dump->format, "", - "Sample %2d, Strip: %2d, bytes: %4zd, Row %4d, bytes: " - "%4d, Input offset: %6zd", - s + 1, strip + 1, stripsize, row + 1, - (uint32_t)scanlinesize, src - buf); - dump_buffer(dump->outfile, dump->format, nrows, - (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) - { - TIFFError(TIFFFileName(out), - "Error, can't write strip %" PRIu32, strip - 1); - _TIFFfree(obuf); - return 1; - } - } - } - - _TIFFfree(obuf); - return 0; -} - -/* Extract all planes from contiguous buffer into a single tile buffer - * to be written out as a tile. - */ -static int writeBufferToContigTiles(TIFF *out, uint8_t *buf, - uint32_t imagelength, uint32_t imagewidth, - tsample_t spp, struct dump_opts *dump) -{ - uint16_t bps; - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; - tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t *bufp = (uint8_t *)buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); - unsigned char *tilebuf = NULL; - - if (!TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || - !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps)) - return 1; - - if (tilesize == 0 || tile_rowsize == 0 || tl == 0 || tw == 0) - { - TIFFError( - "writeBufferToContigTiles", - "Tile size, tile row size, tile width, or tile length is zero"); - exit(EXIT_FAILURE); - } - - tile_buffsize = tilesize; - if (tilesize < (tsize_t)(tl * tile_rowsize)) - { -#ifdef DEBUG2 - TIFFError("writeBufferToContigTiles", - "Tilesize %" PRId64 - " is too small, using alternate calculation %" PRIu32, - tilesize, tl * tile_rowsize); -#endif - if (tile_rowsize != 0 && - (tmsize_t)tl > (TIFF_TMSIZE_T_MAX / tile_rowsize)) - { - TIFFError("writeBufferToContigTiles", - "Integer overflow when calculating buffer size"); - exit(EXIT_FAILURE); - } - tile_buffsize = tl * tile_rowsize; - } - - if (imagewidth == 0 || - (uint32_t)bps * (uint32_t)spp > UINT32_MAX / imagewidth || - bps * spp * imagewidth > UINT32_MAX - 7U) - { - TIFFError(TIFFFileName(out), "Error, uint32_t overflow when computing " - "(imagewidth * bps * spp) + 7"); - return 1; - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - - /* Add 3 padding bytes for extractContigSamples32bits */ - tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; - memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; - for (col = 0; col < imagewidth; col += tw) - { - /* Calculate visible portion of tile. */ - if (col + tw > imagewidth) - ncol = imagewidth - col; - else - ncol = tw; - - col_offset = (((col * bps * spp) + 7) / 8); - bufp = buf + (row * src_rowsize) + col_offset; - if (extractContigSamplesToTileBuffer(tilebuf, bufp, nrow, ncol, - imagewidth, tw, 0, spp, spp, - bps, dump) > 0) - { - TIFFError("writeBufferToContigTiles", - "Unable to extract data to tile for row %" PRIu32 - ", col %" PRIu32, - row, col); - _TIFFfree(tilebuf); - return 1; - } - - if (TIFFWriteTile(out, tilebuf, col, row, 0, 0) < 0) - { - TIFFError("writeBufferToContigTiles", - "Cannot write tile at %" PRIu32 " %" PRIu32, col, - row); - _TIFFfree(tilebuf); - return 1; - } - } - } - _TIFFfree(tilebuf); - - return 0; -} /* end writeBufferToContigTiles */ - -/* Extract each plane from contiguous buffer into a single tile buffer - * to be written out as a tile. - */ -static int writeBufferToSeparateTiles(TIFF *out, uint8_t *buf, - uint32_t imagelength, uint32_t imagewidth, - tsample_t spp, struct dump_opts *dump) -{ - /* Add 3 padding bytes for extractContigSamples32bits */ - tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; - uint16_t bps; - tsample_t s; - uint8_t *bufp = (uint8_t *)buf; - - if (obuf == NULL) - return 1; - memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if (!TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || - !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps)) - { - _TIFFfree(obuf); - return 1; - } - - if (imagewidth == 0 || - (uint32_t)bps * (uint32_t)spp > UINT32_MAX / imagewidth || - bps * spp * imagewidth > UINT32_MAX - 7) - { - TIFFError(TIFFFileName(out), "Error, uint32_t overflow when computing " - "(imagewidth * bps * spp) + 7"); - _TIFFfree(obuf); - return 1; - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; - for (col = 0; col < imagewidth; col += tw) - { - /* Calculate visible portion of tile. */ - if (col + tw > imagewidth) - ncol = imagewidth - col; - else - ncol = tw; - - col_offset = (((col * bps * spp) + 7) / 8); - bufp = buf + (row * src_rowsize) + col_offset; - - for (s = 0; s < spp; s++) - { - if (extractContigSamplesToTileBuffer(obuf, bufp, nrow, ncol, - imagewidth, tw, s, 1, spp, - bps, dump) > 0) - { - TIFFError("writeBufferToSeparateTiles", - "Unable to extract data to tile for row %" PRIu32 - ", col %" PRIu32 " sample %" PRIu16, - row, col, s); - _TIFFfree(obuf); - return 1; - } - - if (TIFFWriteTile(out, obuf, col, row, 0, s) < 0) - { - TIFFError("writeBufferToseparateTiles", - "Cannot write tile at %" PRIu32 " %" PRIu32 - " sample %" PRIu16, - col, row, s); - _TIFFfree(obuf); - return 1; - } - } - } - } - _TIFFfree(obuf); - - return 0; -} /* end writeBufferToSeparateTiles */ - -static void processG3Options(char *cp) -{ - if ((cp = strchr(cp, ':'))) - { - if (defg3opts == (uint32_t)-1) - defg3opts = 0; - do - { - cp++; - if (strneq(cp, "1d", 2)) - defg3opts &= ~GROUP3OPT_2DENCODING; - else if (strneq(cp, "2d", 2)) - defg3opts |= GROUP3OPT_2DENCODING; - else if (strneq(cp, "fill", 4)) - defg3opts |= GROUP3OPT_FILLBITS; - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static int processCompressOptions(char *opt) -{ - char *cp = NULL; - - if (strneq(opt, "none", 4)) - { - defcompression = COMPRESSION_NONE; - } - else if (streq(opt, "packbits")) - { - defcompression = COMPRESSION_PACKBITS; - } - else if (strneq(opt, "jpeg", 4)) - { - cp = strchr(opt, ':'); - defcompression = COMPRESSION_JPEG; - - while (cp) - { - if (isdigit((int)cp[1])) - quality = atoi(cp + 1); - else if (strneq(cp + 1, "raw", 3)) - jpegcolormode = JPEGCOLORMODE_RAW; - else if (strneq(cp + 1, "rgb", 3)) - jpegcolormode = JPEGCOLORMODE_RGB; - else - usage(EXIT_FAILURE); - cp = strchr(cp + 1, ':'); - } - } - else if (strneq(opt, "g3", 2)) - { - processG3Options(opt); - defcompression = COMPRESSION_CCITTFAX3; - } - else if (streq(opt, "g4")) - { - defcompression = COMPRESSION_CCITTFAX4; - } - else if (strneq(opt, "lzw", 3)) - { - cp = strchr(opt, ':'); - if (cp) - defpredictor = atoi(cp + 1); - defcompression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - cp = strchr(opt, ':'); - if (cp) - defpredictor = atoi(cp + 1); - defcompression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - - return (1); -} - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "\n%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField2(tag, v1, v2) \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) -#define CopyField4(tag, v1, v2, v3, v4) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) \ - TIFFSetField(out, tag, v1, v2, v3, v4) - -static void cpTag(TIFF *in, TIFF *out, uint16_t tag, uint16_t count, - TIFFDataType type) -{ - switch (type) - { - case TIFF_SHORT: - if (count == 1) - { - uint16_t shortv; - CopyField(tag, shortv); - } - else if (count == 2) - { - uint16_t shortv1, shortv2; - CopyField2(tag, shortv1, shortv2); - } - else if (count == 4) - { - uint16_t *tr, *tg, *tb, *ta; - CopyField4(tag, tr, tg, tb, ta); - } - else if (count == (uint16_t)-1) - { - uint16_t shortv1; - uint16_t *shortav; - CopyField2(tag, shortv1, shortav); - } - break; - case TIFF_LONG: - { - uint32_t longv; - CopyField(tag, longv); - } - break; - case TIFF_RATIONAL: - if (count == 1) - { - float floatv; - CopyField(tag, floatv); - } - else if (count == (uint16_t)-1) - { - float *floatav; - CopyField(tag, floatav); - } - break; - case TIFF_ASCII: - { - char *stringv; - CopyField(tag, stringv); - } - break; - case TIFF_DOUBLE: - if (count == 1) - { - double doublev; - CopyField(tag, doublev); - } - else if (count == (uint16_t)-1) - { - double *doubleav; - CopyField(tag, doubleav); - } - break; - default: - TIFFError(TIFFFileName(in), - "Data type %" PRIu16 " is not supported, tag %d skipped", - tag, type); - } -} - -static const struct cpTag -{ - uint16_t tag; - uint16_t count; - TIFFDataType type; -} tags[] = { - {TIFFTAG_SUBFILETYPE, 1, TIFF_LONG}, - {TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT}, - {TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII}, - {TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII}, - {TIFFTAG_MAKE, 1, TIFF_ASCII}, - {TIFFTAG_MODEL, 1, TIFF_ASCII}, - {TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT}, - {TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL}, - {TIFFTAG_PAGENAME, 1, TIFF_ASCII}, - {TIFFTAG_XPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_YPOSITION, 1, TIFF_RATIONAL}, - {TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT}, - {TIFFTAG_SOFTWARE, 1, TIFF_ASCII}, - {TIFFTAG_DATETIME, 1, TIFF_ASCII}, - {TIFFTAG_ARTIST, 1, TIFF_ASCII}, - {TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII}, - {TIFFTAG_WHITEPOINT, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_PRIMARYCHROMATICITIES, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT}, - {TIFFTAG_INKSET, 1, TIFF_SHORT}, - {TIFFTAG_DOTRANGE, 2, TIFF_SHORT}, - {TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII}, - {TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT}, - {TIFFTAG_YCBCRCOEFFICIENTS, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_YCBCRSUBSAMPLING, 2, TIFF_SHORT}, - {TIFFTAG_YCBCRPOSITIONING, 1, TIFF_SHORT}, - {TIFFTAG_REFERENCEBLACKWHITE, (uint16_t)-1, TIFF_RATIONAL}, - {TIFFTAG_EXTRASAMPLES, (uint16_t)-1, TIFF_SHORT}, - {TIFFTAG_SMINSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_SMAXSAMPLEVALUE, 1, TIFF_DOUBLE}, - {TIFFTAG_STONITS, 1, TIFF_DOUBLE}, -}; -#define NTAGS (sizeof(tags) / sizeof(tags[0])) - -#define CopyTag(tag, count, type) cpTag(in, out, tag, count, type) - -/* Functions written by Richard Nolde, with exceptions noted. */ -void process_command_opts(int argc, char *argv[], char *mp, char *mode, - uint32_t *dirnum, uint16_t *defconfig, - uint16_t *deffillorder, uint32_t *deftilewidth, - uint32_t *deftilelength, uint32_t *defrowsperstrip, - struct crop_mask *crop_data, struct pagedef *page, - struct dump_opts *dump, unsigned int *imagelist, - unsigned int *image_count) -{ - int c, good_args = 0; - char *opt_offset = NULL; /* Position in string of value sought */ - char *opt_ptr = NULL; /* Pointer to next token in option set */ - char *sep = NULL; /* Pointer to a token separator */ - unsigned int i, j, start, end; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - *mp++ = 'w'; - *mp = '\0'; - while ((c = getopt(argc, argv, - "ac:d:e:f:hik:l:m:p:r:stvw:z:BCD:E:F:H:I:J:K:LMN:O:P:R:" - "S:U:V:X:Y:Z:")) != -1) - { - good_args++; - switch (c) - { - case 'a': - mode[0] = 'a'; /* append to output */ - break; - case 'c': - if (!processCompressOptions(optarg)) /* compression scheme */ - { - TIFFError("Unknown compression option", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'd': - start = strtoul(optarg, NULL, 0); /* initial IFD offset */ - if (start == 0) - { - TIFFError("", "Directory offset must be greater than zero"); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - *dirnum = start - 1; - break; - case 'e': - switch (tolower((int)optarg[0])) /* image export modes*/ - { - case 'c': - crop_data->exp_mode = ONE_FILE_COMPOSITE; - crop_data->img_mode = COMPOSITE_IMAGES; - break; /* Composite */ - case 'd': - crop_data->exp_mode = ONE_FILE_SEPARATED; - crop_data->img_mode = SEPARATED_IMAGES; - break; /* Divided */ - case 'i': - crop_data->exp_mode = FILE_PER_IMAGE_COMPOSITE; - crop_data->img_mode = COMPOSITE_IMAGES; - break; /* Image */ - case 'm': - crop_data->exp_mode = FILE_PER_IMAGE_SEPARATED; - crop_data->img_mode = SEPARATED_IMAGES; - break; /* Multiple */ - case 's': - crop_data->exp_mode = FILE_PER_SELECTION; - crop_data->img_mode = SEPARATED_IMAGES; - break; /* Sections */ - default: - TIFFError("Unknown export mode", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'f': - if (streq(optarg, "lsb2msb")) /* fill order */ - *deffillorder = FILLORDER_LSB2MSB; - else if (streq(optarg, "msb2lsb")) - *deffillorder = FILLORDER_MSB2LSB; - else - { - TIFFError("Unknown fill order", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case 'i': - ignore = TRUE; /* ignore errors */ - break; - case 'k': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case 'l': - outtiled = TRUE; /* tile length */ - *deftilelength = atoi(optarg); - break; - case 'p': /* planar configuration */ - if (streq(optarg, "separate")) - *defconfig = PLANARCONFIG_SEPARATE; - else if (streq(optarg, "contig")) - *defconfig = PLANARCONFIG_CONTIG; - else - { - TIFFError("Unknown planar configuration", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'r': /* rows/strip */ - *defrowsperstrip = atol(optarg); - break; - case 's': /* generate stripped output */ - outtiled = FALSE; - break; - case 't': /* generate tiled output */ - outtiled = TRUE; - break; - case 'v': - printf("Library Release: %s\n", TIFFGetVersion()); - printf("Tiffcp code: Copyright (c) 1988-1997 Sam Leffler\n"); - printf(" : Copyright (c) 1991-1997 Silicon Graphics, " - "Inc\n"); - printf("Tiffcrop additions: Copyright (c) 2007-2010 Richard " - "Nolde\n"); - exit(EXIT_SUCCESS); - break; - case 'w': /* tile width */ - outtiled = TRUE; - *deftilewidth = atoi(optarg); - break; - case 'z': /* regions of an image specified as - x1,y1,x2,y2:x3,y3,x4,y4 etc */ - crop_data->crop_mode |= CROP_REGIONS; - for (i = 0, opt_ptr = strtok(optarg, ":"); - ((opt_ptr != NULL) && (i < MAX_REGIONS)); - (opt_ptr = strtok(NULL, ":")), i++) - { - crop_data->regions++; - if (sscanf(opt_ptr, "%lf,%lf,%lf,%lf", - &crop_data->corners[i].X1, - &crop_data->corners[i].Y1, - &crop_data->corners[i].X2, - &crop_data->corners[i].Y2) != 4) - { - TIFFError("Unable to parse coordinates for region", - "%u %s", i, optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - /* check for remaining elements over MAX_REGIONS */ - if ((opt_ptr != NULL) && (i >= MAX_REGIONS)) - { - TIFFError("Region list exceeds limit of", "%d regions %s", - MAX_REGIONS, optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - /* options for file open modes */ - case 'B': - { - if (mp < mode + MAX_MODESTRING_LEN) - { - *mp++ = 'b'; - *mp = '\0'; - } - else - { - TIFFError("To many options for output file open modes. " - "Maximum allowed ", - "%d", MAX_MODESTRING_LEN); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - break; - case 'L': - { - if (mp < mode + MAX_MODESTRING_LEN) - { - *mp++ = 'l'; - *mp = '\0'; - } - else - { - TIFFError("To many options for output file open modes. " - "Maximum allowed ", - "%d", MAX_MODESTRING_LEN); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - break; - case 'M': - { - if (mp < mode + MAX_MODESTRING_LEN) - { - *mp++ = 'm'; - *mp = '\0'; - } - else - { - TIFFError("To many options for output file open modes. " - "Maximum allowed ", - "%d", MAX_MODESTRING_LEN); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - break; - case 'C': - { - if (mp < mode + MAX_MODESTRING_LEN) - { - *mp++ = 'c'; - *mp = '\0'; - } - else - { - TIFFError("To many options for output file open modes. " - "Maximum allowed ", - "%d", MAX_MODESTRING_LEN); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - break; - /* options for Debugging / data dump */ - case 'D': - for (i = 0, opt_ptr = strtok(optarg, ","); (opt_ptr != NULL); - (opt_ptr = strtok(NULL, ",")), i++) - { - opt_offset = strpbrk(opt_ptr, ":="); - if (opt_offset == NULL) - { - TIFFError("Invalid dump option", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - - *opt_offset = '\0'; - /* convert option to lowercase */ - end = (unsigned int)strlen(opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int)*(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ - end = (unsigned int)strlen(opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int)*(opt_offset + i)); - /* check dump format value */ - if (strncmp(opt_offset + 1, "txt", 3) == 0) - { - dump->format = DUMP_TEXT; - strcpy(dump->mode, "w"); - } - else - { - if (strncmp(opt_offset + 1, "raw", 3) == 0) - { - dump->format = DUMP_RAW; - strcpy(dump->mode, "wb"); - } - else - { - TIFFError("parse_command_opts", - "Unknown dump format %s", - opt_offset + 1); - TIFFError("For valid options type", - "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - } - else - { /* Look for dump level specification */ - if (strncmp(opt_ptr, "lev", 3) == 0) - dump->level = atoi(opt_offset + 1); - /* Look for input data dump file name */ - if (strncmp(opt_ptr, "in", 2) == 0) - { - strncpy(dump->infilename, opt_offset + 1, - PATH_MAX - 20); - dump->infilename[PATH_MAX - 20] = '\0'; - } - /* Look for output data dump file name */ - if (strncmp(opt_ptr, "out", 3) == 0) - { - strncpy(dump->outfilename, opt_offset + 1, - PATH_MAX - 20); - dump->outfilename[PATH_MAX - 20] = '\0'; - } - if (strncmp(opt_ptr, "deb", 3) == 0) - dump->debug = atoi(opt_offset + 1); - } - } - if ((strlen(dump->infilename)) || (strlen(dump->outfilename))) - { - if (dump->level == 1) - TIFFError("", "Defaulting to dump level 1, no data."); - if (dump->format == DUMP_NONE) - { - TIFFError( - "", - "You must specify a dump format for dump files"); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - } - break; - - /* image manipulation routine options */ - case 'm': /* margins to exclude from selection, uppercase M was - already used */ - /* order of values must be TOP, LEFT, BOTTOM, RIGHT */ - crop_data->crop_mode |= CROP_MARGINS; - for (i = 0, opt_ptr = strtok(optarg, ",:"); - ((opt_ptr != NULL) && (i < 4)); - (opt_ptr = strtok(NULL, ",:")), i++) - { - crop_data->margins[i] = atof(opt_ptr); - } - break; - case 'E': /* edge reference */ - switch (tolower((int)optarg[0])) - { - case 't': - crop_data->edge_ref = EDGE_TOP; - break; - case 'b': - crop_data->edge_ref = EDGE_BOTTOM; - break; - case 'l': - crop_data->edge_ref = EDGE_LEFT; - break; - case 'r': - crop_data->edge_ref = EDGE_RIGHT; - break; - default: - TIFFError("Edge reference must be top, bottom, left, " - "or right", - "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'F': /* flip eg mirror image or cropped segment, M was already - used */ - crop_data->crop_mode |= CROP_MIRROR; - switch (tolower((int)optarg[0])) - { - case 'h': - crop_data->mirror = MIRROR_HORIZ; - break; - case 'v': - crop_data->mirror = MIRROR_VERT; - break; - case 'b': - crop_data->mirror = MIRROR_BOTH; - break; - default: - TIFFError("Flip mode must be horiz, vert, or both", - "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'H': /* set horizontal resolution to new value */ - page->hres = atof(optarg); - page->mode |= PAGE_MODE_RESOLUTION; - break; - case 'I': /* invert the color space, eg black to white */ - crop_data->crop_mode |= CROP_INVERT; - /* The PHOTOMETIC_INTERPRETATION tag may be updated */ - if (streq(optarg, "black")) - { - crop_data->photometric = PHOTOMETRIC_MINISBLACK; - continue; - } - if (streq(optarg, "white")) - { - crop_data->photometric = PHOTOMETRIC_MINISWHITE; - continue; - } - if (streq(optarg, "data")) - { - crop_data->photometric = INVERT_DATA_ONLY; - continue; - } - if (streq(optarg, "both")) - { - crop_data->photometric = INVERT_DATA_AND_TAG; - continue; - } - - TIFFError("Missing or unknown option for inverting " - "PHOTOMETRIC_INTERPRETATION", - "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - break; - case 'J': /* horizontal margin for sectioned output pages */ - page->hmargin = atof(optarg); - page->mode |= PAGE_MODE_MARGINS; - break; - case 'K': /* vertical margin for sectioned output pages*/ - page->vmargin = atof(optarg); - page->mode |= PAGE_MODE_MARGINS; - break; - case 'N': /* list of images to process */ - for (i = 0, opt_ptr = strtok(optarg, ","); - ((opt_ptr != NULL) && (i < MAX_IMAGES)); - (opt_ptr = strtok(NULL, ","))) - { /* We do not know how many images are in file yet - * so we build a list to include the maximum allowed - * and follow it until we hit the end of the file. - * Image count is not accurate for odd, even, last - * so page numbers won't be valid either. - */ - if (streq(opt_ptr, "odd")) - { - for (j = 1; j <= MAX_IMAGES; j += 2) - imagelist[i++] = j; - *image_count = (MAX_IMAGES - 1) / 2; - break; - } - else - { - if (streq(opt_ptr, "even")) - { - for (j = 2; j <= MAX_IMAGES; j += 2) - imagelist[i++] = j; - *image_count = MAX_IMAGES / 2; - break; - } - else - { - if (streq(opt_ptr, "last")) - imagelist[i++] = MAX_IMAGES; - else /* single value between commas */ - { - sep = strpbrk(opt_ptr, ":-"); - if (!sep) - imagelist[i++] = atoi(opt_ptr); - else - { - *sep = '\0'; - start = atoi(opt_ptr); - if (!strcmp((sep + 1), "last")) - end = MAX_IMAGES; - else - end = atoi(sep + 1); - for (j = start; - j <= end && j - start + i < MAX_IMAGES; - j++) - imagelist[i++] = j; - } - } - } - } - } - *image_count = i; - break; - case 'O': /* page orientation */ - switch (tolower((int)optarg[0])) - { - case 'a': - page->orient = ORIENTATION_AUTO; - break; - case 'p': - page->orient = ORIENTATION_PORTRAIT; - break; - case 'l': - page->orient = ORIENTATION_LANDSCAPE; - break; - default: - TIFFError( - "Orientation must be portrait, landscape, or auto.", - "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'P': /* page size selection */ - if (sscanf(optarg, "%lfx%lf", &page->width, &page->length) == 2) - { - strcpy(page->name, "Custom"); - page->mode |= PAGE_MODE_PAPERSIZE; - break; - } - if (get_page_geometry(optarg, page)) - { - if (!strcmp(optarg, "list")) - { - TIFFError("", - "Name Width Length (in inches)"); - for (i = 0; i < MAX_PAPERNAMES - 1; i++) - TIFFError("", "%-15.15s %5.2f %5.2f", - PaperTable[i].name, PaperTable[i].width, - PaperTable[i].length); - exit(EXIT_FAILURE); - } - - TIFFError("Invalid paper size", "%s", optarg); - TIFFError("", "Select one of:"); - TIFFError("", "Name Width Length (in inches)"); - for (i = 0; i < MAX_PAPERNAMES - 1; i++) - TIFFError("", "%-15.15s %5.2f %5.2f", - PaperTable[i].name, PaperTable[i].width, - PaperTable[i].length); - exit(EXIT_FAILURE); - } - else - { - page->mode |= PAGE_MODE_PAPERSIZE; - } - break; - case 'R': /* rotate image or cropped segment */ - crop_data->crop_mode |= CROP_ROTATE; - switch (strtoul(optarg, NULL, 0)) - { - case 90: - crop_data->rotation = (uint16_t)90; - break; - case 180: - crop_data->rotation = (uint16_t)180; - break; - case 270: - crop_data->rotation = (uint16_t)270; - break; - default: - TIFFError("Rotation must be 90, 180, or 270 degrees " - "clockwise", - "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'S': /* subdivide into Cols:Rows sections, eg 3:2 would be 3 - across and 2 down */ - sep = strpbrk(optarg, ",:"); - if (sep) - { - *sep = '\0'; - page->cols = atoi(optarg); - page->rows = atoi(sep + 1); - } - else - { - page->cols = atoi(optarg); - page->rows = atoi(optarg); - } - if ((page->cols * page->rows) > MAX_SECTIONS) - { - TIFFError( - "Limit for subdivisions, ie rows x columns, exceeded", - "%d", MAX_SECTIONS); - exit(EXIT_FAILURE); - } - if ((page->cols * page->rows) < 1) - { - TIFFError("No subdivisions", "%d", - (page->cols * page->rows)); - exit(EXIT_FAILURE); - } - page->mode |= PAGE_MODE_ROWSCOLS; - break; - case 'U': /* units for measurements and offsets */ - if (streq(optarg, "in")) - { - crop_data->res_unit = RESUNIT_INCH; - page->res_unit = RESUNIT_INCH; - } - else if (streq(optarg, "cm")) - { - crop_data->res_unit = RESUNIT_CENTIMETER; - page->res_unit = RESUNIT_CENTIMETER; - } - else if (streq(optarg, "px")) - { - crop_data->res_unit = RESUNIT_NONE; - page->res_unit = RESUNIT_NONE; - } - else - { - TIFFError("Illegal unit of measure", "%s", optarg); - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - } - break; - case 'V': /* set vertical resolution to new value */ - page->vres = atof(optarg); - page->mode |= PAGE_MODE_RESOLUTION; - break; - case 'X': /* selection width */ - crop_data->crop_mode |= CROP_WIDTH; - crop_data->width = atof(optarg); - break; - case 'Y': /* selection length */ - crop_data->crop_mode |= CROP_LENGTH; - crop_data->length = atof(optarg); - break; - case 'Z': /* zones of an image X:Y read as zone X of Y */ - crop_data->crop_mode |= CROP_ZONES; - for (i = 0, opt_ptr = strtok(optarg, ","); - ((opt_ptr != NULL) && (i < MAX_REGIONS)); - (opt_ptr = strtok(NULL, ",")), i++) - { - crop_data->zones++; - opt_offset = strchr(opt_ptr, ':'); - if (!opt_offset) - { - TIFFError("Wrong parameter syntax for -Z", - "tiffcrop -h"); - exit(EXIT_FAILURE); - } - *opt_offset = '\0'; - crop_data->zonelist[i].position = atoi(opt_ptr); - crop_data->zonelist[i].total = atoi(opt_offset + 1); - } - /* check for remaining elements over MAX_REGIONS */ - if ((opt_ptr != NULL) && (i >= MAX_REGIONS)) - { - TIFFError("Zone list exceeds region limit", "%d", - MAX_REGIONS); - exit(EXIT_FAILURE); - } - break; - case '?': - TIFFError("For valid options type", "tiffcrop -h"); - exit(EXIT_FAILURE); - /*NOTREACHED*/ - } - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are - * mutually exclusive) --*/ - char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || - (crop_data->crop_mode & CROP_LENGTH)) - ? 1 - : 0; - Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) - { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and " - "-S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } - - /* Check for not allowed combination: - * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x -options - * such as -H, -V, -P, -J or -K are not supported and may cause buffer -overflows. -. */ - if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) - { - TIFFError("tiffcrop input error", - "Any of the crop options -X, -Y, -Z and -z together with " - "other PAGE_MODE_x options such as - H, -V, -P, -J or -K is " - "not supported and may cause buffer overflows..->exit"); - exit(EXIT_FAILURE); - } - -} /* end process_command_opts */ - -/* Start a new output file if one has not been previously opened or - * autoindex is set to non-zero. Update page and file counters - * so TIFFTAG PAGENUM will be correct in image. - */ -static int update_output_file(TIFF **tiffout, char *mode, int autoindex, - char *outname, unsigned int *page) -{ - static int findex = 0; /* file sequence indicator */ - size_t basename_len; - char *sep; - char export_ext[16]; - char exportname[PATH_MAX]; - - if (autoindex && (*tiffout != NULL)) - { - /* Close any export file that was previously opened */ - TIFFClose(*tiffout); - *tiffout = NULL; - } - - memcpy(export_ext, ".tiff", 6); - memset(exportname, '\0', sizeof(exportname)); - -/* Leave room for page number portion of the new filename : - * hyphen + 6 digits + dot + 4 extension characters + null terminator */ -#define FILENUM_MAX_LENGTH (1 + 6 + 1 + 4 + 1) - strncpy(exportname, outname, sizeof(exportname) - FILENUM_MAX_LENGTH); - if (*tiffout == NULL) /* This is a new export file */ - { - if (autoindex) - { /* create a new filename for each export */ - findex++; - if ((sep = strstr(exportname, ".tif")) || - (sep = strstr(exportname, ".TIF"))) - { - strncpy(export_ext, sep, 5); - *sep = '\0'; - } - else - memcpy(export_ext, ".tiff", 5); - export_ext[5] = '\0'; - basename_len = strlen(exportname); - - /* MAX_EXPORT_PAGES limited to 6 digits to prevent string overflow - * of pathname */ - if (findex > MAX_EXPORT_PAGES) - { - TIFFError("update_output_file", - "Maximum of %d pages per file exceeded", - MAX_EXPORT_PAGES); - return 1; - } - - /* We previously assured that there will be space left */ - snprintf(exportname + basename_len, - sizeof(exportname) - basename_len, "-%03d%.5s", findex, - export_ext); - } - exportname[sizeof(exportname) - 1] = '\0'; - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return 1; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - *tiffout = TIFFOpenExt(exportname, mode, opts); - TIFFOpenOptionsFree(opts); - if (*tiffout == NULL) - { - TIFFError("update_output_file", "Unable to open output file %s", - exportname); - return 1; - } - *page = 0; - - return 0; - } - else - (*page)++; - - return 0; -} /* end update_output_file */ - -int main(int argc, char *argv[]) -{ - -#if !HAVE_DECL_OPTARG - extern int optind; -#endif - uint16_t defconfig = (uint16_t)-1; - uint16_t deffillorder = 0; - uint32_t deftilewidth = (uint32_t)0; - uint32_t deftilelength = (uint32_t)0; - uint32_t defrowsperstrip = (uint32_t)0; - uint32_t dirnum = 0; - - TIFF *in = NULL; - TIFF *out = NULL; - char mode[10]; - char *mp = mode; - - /** RJN additions **/ - struct image_data image; /* Image parameters for one image */ - struct crop_mask crop; /* Cropping parameters for all images */ - struct pagedef page; /* Page definition for output pages */ - struct pageseg sections[MAX_SECTIONS]; /* Sections of one output page */ - struct buffinfo - seg_buffs[MAX_SECTIONS]; /* Segment buffer sizes and pointers */ - struct dump_opts dump; /* Data dump options */ - unsigned char *read_buff = NULL; /* Input image data buffer */ - unsigned char *crop_buff = NULL; /* Crop area buffer */ - unsigned char *sect_buff = NULL; /* Image section buffer */ - unsigned char *sect_src = NULL; /* Image section buffer pointer */ - unsigned int imagelist[MAX_IMAGES + 1]; /* individually specified images */ - unsigned int image_count = 0; - unsigned int dump_images = 0; - unsigned int next_image = 0; - unsigned int next_page = 0; - unsigned int total_pages = 0; - unsigned int total_images = 0; - unsigned int end_of_input = FALSE; - int seg; - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from - complaining */ - int retval = 0; /* return value of tiffcrop */ - - assert(NUM_BUFF_OVERSIZE_BYTES >= 3); - - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); - initCropMasks(&crop); - initPageSetup(&page, sections, seg_buffs); - initDumpOptions(&dump); - - process_command_opts(argc, argv, mp, mode, &dirnum, &defconfig, - &deffillorder, &deftilewidth, &deftilelength, - &defrowsperstrip, &crop, &page, &dump, imagelist, - &image_count); - - if (argc - optind < 2) - usage(EXIT_FAILURE); - - if ((argc - optind) == 2) - pageNum = -1; - - /* Read multiple input files and write to output file(s) */ - while (optind < argc - 1) - { - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return -3; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - in = TIFFOpenExt(argv[optind], "r", opts); - TIFFOpenOptionsFree(opts); - if (in == NULL) - { - TIFFError("An input file cannot be opened: ", "%s", argv[optind]); - retval = -3; - goto failure; - } - - /* If only one input file is specified, we can use directory count */ - total_images = TIFFNumberOfDirectories(in); - if (total_images > TIFF_DIR_MAX) - { - TIFFError(TIFFFileName(in), "File contains too many directories"); - retval = 1; - goto failure; - } - if (image_count == 0) - { - dirnum = 0; - total_pages = total_images; /* Only valid with single input file */ - } - else - { - dirnum = (tdir_t)(imagelist[next_image] - 1); - next_image++; - - /* Total pages only valid for enumerated list of pages not derived - * using odd, even, or last keywords. - */ - if (image_count > total_images) - image_count = total_images; - - total_pages = image_count; - } - - /* MAX_IMAGES is used for special case "last" in selection list */ - if (dirnum == (MAX_IMAGES - 1)) - dirnum = total_images - 1; - - if (dirnum > (total_images)) - { - TIFFError(TIFFFileName(in), - "Invalid image number %" PRIu32 - ", File contains only %" PRIu32 " images", - dirnum + 1u, total_images); - retval = 1; - goto failure; - } - - if (dirnum != 0 && !TIFFSetDirectory(in, (tdir_t)dirnum)) - { - TIFFError(TIFFFileName(in), - "Error, setting subdirectory at %" PRIu32, dirnum); - retval = 1; - goto failure; - } - - end_of_input = FALSE; - while (end_of_input == FALSE) - { - config = defconfig; - compression = defcompression; - predictor = defpredictor; - fillorder = deffillorder; - rowsperstrip = defrowsperstrip; - tilewidth = deftilewidth; - tilelength = deftilelength; - g3opts = defg3opts; - - if (dump.format != DUMP_NONE) - { - /* manage input and/or output dump files here */ - dump_images++; - length = strlen(dump.infilename); - if (length > 0) - { - if (dump.infile != NULL) - fclose(dump.infile); - - /* dump.infilename is guaranteed to be NUL terminated and - have 20 bytes fewer than PATH_MAX */ - snprintf(temp_filename, sizeof(temp_filename), - "%s-read-%03d.%s", dump.infilename, dump_images, - (dump.format == DUMP_TEXT) ? "txt" : "raw"); - if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL) - { - TIFFError("Unable to open dump file for writing", "%s", - temp_filename); - retval = EXIT_FAILURE; - goto failure; - } - dump_info(dump.infile, dump.format, "Reading image", - "%u from %s", dump_images, TIFFFileName(in)); - } - length = strlen(dump.outfilename); - if (length > 0) - { - if (dump.outfile != NULL) - fclose(dump.outfile); - - /* dump.outfilename is guaranteed to be NUL terminated and - have 20 bytes fewer than PATH_MAX */ - snprintf(temp_filename, sizeof(temp_filename), - "%s-write-%03d.%s", dump.outfilename, dump_images, - (dump.format == DUMP_TEXT) ? "txt" : "raw"); - if ((dump.outfile = fopen(temp_filename, dump.mode)) == - NULL) - { - TIFFError("Unable to open dump file for writing", "%s", - temp_filename); - retval = EXIT_FAILURE; - goto failure; - } - dump_info(dump.outfile, dump.format, "Writing image", - "%u from %s", dump_images, TIFFFileName(in)); - } - } - - if (dump.debug) - TIFFError("main", "Reading image %4d of %4d total pages.", - dirnum + 1, total_pages); - - if (loadImage(in, &image, &dump, &read_buff)) - { - TIFFError("main", "Unable to load source image"); - retval = EXIT_FAILURE; - goto failure; - } - - /* Correct the image orientation if it was not ORIENTATION_TOPLEFT. - */ - if (image.adjustments != 0) - { - if (correct_orientation(&image, &read_buff)) - TIFFError("main", "Unable to correct image orientation"); - } - - if (getCropOffsets(&image, &crop, &dump)) - { - TIFFError("main", "Unable to define crop regions"); - retval = EXIT_FAILURE; - goto failure; - } - - /* Crop input image and copy zones and regions from input image into - * seg_buffs or crop_buff. */ - if (crop.selections > 0) - { - if (processCropSelections(&image, &crop, &read_buff, seg_buffs)) - { - TIFFError("main", "Unable to process image selections"); - retval = EXIT_FAILURE; - goto failure; - } - } - else /* Single image segment without zones or regions */ - { - if (createCroppedImage(&image, &crop, &read_buff, &crop_buff)) - { - TIFFError("main", "Unable to create output image"); - retval = EXIT_FAILURE; - goto failure; - } - } - /* Format and write selected image parts to output file(s). */ - if (page.mode == PAGE_MODE_NONE) - { /* Whole image or sections not based on output page size */ - if (crop.selections > 0) - { - if (writeSelections(in, &out, &crop, &image, &dump, - seg_buffs, mp, argv[argc - 1], - &next_page, total_pages)) - { - TIFFError("main", - "Unable to write new image selections"); - retval = EXIT_FAILURE; - goto failure; - } - } - else /* One file all images and sections */ - { - if (update_output_file(&out, mp, crop.exp_mode, - argv[argc - 1], &next_page)) - { - retval = EXIT_FAILURE; - goto failure; - } - if (writeCroppedImage(in, out, &image, &dump, - crop.combined_width, - crop.combined_length, crop_buff, - next_page, total_pages)) - { - TIFFError("main", "Unable to write new image"); - retval = EXIT_FAILURE; - goto failure; - } - } - } - else - { - /* If we used a crop buffer, our data is there, otherwise it is - * in the read_buffer - */ - if (crop_buff != NULL) - sect_src = crop_buff; - else - sect_src = read_buff; - /* Break input image into pages or rows and columns */ - if (computeOutputPixelOffsets(&crop, &image, &page, sections, - &dump)) - { - TIFFError("main", "Unable to compute output section data"); - retval = EXIT_FAILURE; - goto failure; - } - /* If there are multiple files on the command line, the final - * one is assumed to be the output filename into which the - * images are written. - */ - if (update_output_file(&out, mp, crop.exp_mode, argv[argc - 1], - &next_page)) - { - retval = EXIT_FAILURE; - goto failure; - } - - if (writeImageSections(in, out, &image, &page, sections, &dump, - sect_src, §_buff)) - { - TIFFError("main", "Unable to write image sections"); - retval = EXIT_FAILURE; - goto failure; - } - } - - /* No image list specified, just read the next image */ - if (image_count == 0) - dirnum++; - else - { - dirnum = (tdir_t)(imagelist[next_image] - 1); - next_image++; - } - - if (dirnum == MAX_IMAGES - 1) - dirnum = TIFFNumberOfDirectories(in) - 1; - - if (!TIFFSetDirectory(in, (tdir_t)dirnum)) - end_of_input = TRUE; - } - TIFFClose(in); - in = NULL; - optind++; - } - -failure: - /* In error case all files needs to be closed and - * all buffers need to be released. */ - - /* If we did not use the read buffer as the crop buffer */ - if (read_buff && read_buff != crop_buff) - _TIFFfree(read_buff); - - if (crop_buff) - _TIFFfree(crop_buff); - - if (sect_buff) - _TIFFfree(sect_buff); - - /* Clean up any segment buffers used for zones or regions */ - for (seg = 0; seg < crop.selections; seg++) - _TIFFfree(seg_buffs[seg].buffer); - - if (dump.format != DUMP_NONE) - { - if (dump.infile != NULL) - fclose(dump.infile); - - if (dump.outfile != NULL) - { - dump_info(dump.outfile, dump.format, "", "Completed run for %s", - out ? TIFFFileName(out) : "(not opened)"); - fclose(dump.outfile); - } - } - - if (in != NULL) - { - (void)TIFFClose(in); - } - - if (out != NULL) - { - (void)TIFFClose(out); - } - - return (retval); -} /* end main */ - -/* Debugging functions */ -static int dump_data(FILE *dumpfile, int format, char *dump_tag, - unsigned char *data, uint32_t count) -{ - int j, k; - uint32_t i; - char dump_array[10]; - unsigned char bitset; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - if (format == DUMP_TEXT) - { - fprintf(dumpfile, " %s ", dump_tag); - for (i = 0; i < count; i++) - { - for (j = 0, k = 7; j < 8; j++, k--) - { - bitset = (*(data + i)) & (((unsigned char)1 << k)) ? 1 : 0; - sprintf(&dump_array[j], (bitset) ? "1" : "0"); - } - dump_array[8] = '\0'; - fprintf(dumpfile, " %s", dump_array); - } - fprintf(dumpfile, "\n"); - } - else - { - if ((fwrite(data, 1, count, dumpfile)) != count) - { - TIFFError("", "Unable to write binary data to dump file"); - return (1); - } - } - - return (0); -} - -static int dump_byte(FILE *dumpfile, int format, char *dump_tag, - unsigned char data) -{ - int j, k; - char dump_array[10]; - unsigned char bitset; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - if (format == DUMP_TEXT) - { - fprintf(dumpfile, " %s ", dump_tag); - for (j = 0, k = 7; j < 8; j++, k--) - { - bitset = data & (((unsigned char)1 << k)) ? 1 : 0; - sprintf(&dump_array[j], (bitset) ? "1" : "0"); - } - dump_array[8] = '\0'; - fprintf(dumpfile, " %s\n", dump_array); - } - else - { - if ((fwrite(&data, 1, 1, dumpfile)) != 1) - { - TIFFError("", "Unable to write binary data to dump file"); - return (1); - } - } - - return (0); -} - -static int dump_short(FILE *dumpfile, int format, char *dump_tag, uint16_t data) -{ - int j, k; - char dump_array[20]; - unsigned char bitset; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - if (format == DUMP_TEXT) - { - fprintf(dumpfile, " %s ", dump_tag); - for (j = 0, k = 15; k >= 0; j++, k--) - { - bitset = data & (((unsigned char)1 << k)) ? 1 : 0; - sprintf(&dump_array[j], (bitset) ? "1" : "0"); - if ((k % 8) == 0) - sprintf(&dump_array[++j], " "); - } - dump_array[17] = '\0'; - fprintf(dumpfile, " %s\n", dump_array); - } - else - { - if ((fwrite(&data, 2, 1, dumpfile)) != 2) - { - TIFFError("", "Unable to write binary data to dump file"); - return (1); - } - } - - return (0); -} - -static int dump_long(FILE *dumpfile, int format, char *dump_tag, uint32_t data) -{ - int j, k; - char dump_array[40]; - unsigned char bitset; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - if (format == DUMP_TEXT) - { - fprintf(dumpfile, " %s ", dump_tag); - for (j = 0, k = 31; k >= 0; j++, k--) - { - bitset = data & (((uint32_t)1 << k)) ? 1 : 0; - sprintf(&dump_array[j], (bitset) ? "1" : "0"); - if ((k % 8) == 0) - sprintf(&dump_array[++j], " "); - } - dump_array[35] = '\0'; - fprintf(dumpfile, " %s\n", dump_array); - } - else - { - if ((fwrite(&data, 4, 1, dumpfile)) != 4) - { - TIFFError("", "Unable to write binary data to dump file"); - return (1); - } - } - return (0); -} - -static int dump_wide(FILE *dumpfile, int format, char *dump_tag, uint64_t data) -{ - int j, k; - char dump_array[80]; - unsigned char bitset; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - if (format == DUMP_TEXT) - { - fprintf(dumpfile, " %s ", dump_tag); - for (j = 0, k = 63; k >= 0; j++, k--) - { - bitset = data & (((uint64_t)1 << k)) ? 1 : 0; - sprintf(&dump_array[j], (bitset) ? "1" : "0"); - if ((k % 8) == 0) - sprintf(&dump_array[++j], " "); - } - dump_array[71] = '\0'; - fprintf(dumpfile, " %s\n", dump_array); - } - else - { - if ((fwrite(&data, 8, 1, dumpfile)) != 8) - { - TIFFError("", "Unable to write binary data to dump file"); - return (1); - } - } - - return (0); -} - -static void dump_info(FILE *dumpfile, int format, char *prefix, char *msg, ...) -{ - if (format == DUMP_TEXT) - { - va_list ap; - va_start(ap, msg); - fprintf(dumpfile, "%s ", prefix); - vfprintf(dumpfile, msg, ap); - fprintf(dumpfile, "\n"); - va_end(ap); - } -} - -static int dump_buffer(FILE *dumpfile, int format, uint32_t rows, - uint32_t width, uint32_t row, unsigned char *buff) -{ - int k; - uint32_t i; - unsigned char *dump_ptr; - - if (dumpfile == NULL) - { - TIFFError("", "Invalid FILE pointer for dump file"); - return (1); - } - - for (i = 0; i < rows; i++) - { - dump_ptr = buff + (i * width); - if (format == DUMP_TEXT) - dump_info(dumpfile, format, "", - "Row %4" PRIu32 ", %" PRIu32 " bytes at offset %" PRIu32, - row + i + 1u, width, row * width); - - for (k = width; k >= 10; k -= 10, dump_ptr += 10) - dump_data(dumpfile, format, "", dump_ptr, 10); - if (k > 0) - dump_data(dumpfile, format, "", dump_ptr, k); - } - return (0); -} - -/* Extract one or more samples from an interleaved buffer. If count == 1, - * only the sample plane indicated by sample will be extracted. If count > 1, - * count samples beginning at sample will be extracted. Portions of a - * scanline can be extracted by specifying a start and end value. - */ - -static int extractContigSamplesBytes(uint8_t *in, uint8_t *out, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, tsample_t count, - uint32_t start, uint32_t end) -{ - int i, bytes_per_sample, sindex; - uint32_t col, dst_rowsize, bit_offset, numcols; - uint32_t src_byte /*, src_bit */; - uint8_t *src = in; - uint8_t *dst = out; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("extractContigSamplesBytes", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamplesBytes", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamplesBytes", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - dst_rowsize = (bps * (end - start) * count) / 8; - - bytes_per_sample = (bps + 7) / 8; - /* Optimize case for copying all samples */ - if (count == spp) - { - src = in + (start * spp * bytes_per_sample); - _TIFFmemcpy(dst, src, dst_rowsize); - } - else - { - for (col = start; col < end; col++) - { - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - bit_offset = col * bps * spp; - if (sindex == 0) - { - src_byte = bit_offset / 8; - /* src_bit = bit_offset % 8; */ - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - /* src_bit = (bit_offset + (sindex * bps)) % 8; */ - } - src = in + src_byte; - for (i = 0; i < bytes_per_sample; i++) - *dst++ = *src++; - } - } - } - - return (0); -} /* end extractContigSamplesBytes */ - -static int extractContigSamples8bits(uint8_t *in, uint8_t *out, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, tsample_t count, - uint32_t start, uint32_t end) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint8_t maskbits = 0, matchbits = 0; - uint8_t buff1 = 0, buff2 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("extractContigSamples8bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamples8bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamples8bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = 0; - maskbits = (uint8_t)-1 >> (8 - bps); - buff1 = buff2 = 0; - for (col = start; col < end; col++) - { /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (8 - src_bit - bps); - buff1 = ((*src) & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - *dst++ = buff2; - buff2 = buff1; - ready_bits -= 8; - } - else - buff2 = (buff2 | (buff1 >> ready_bits)); - ready_bits += bps; - } - } - - while (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamples8bits */ - -static int extractContigSamples16bits(uint8_t *in, uint8_t *out, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, tsample_t count, - uint32_t start, uint32_t end) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint16_t maskbits = 0, matchbits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("extractContigSamples16bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamples16bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamples16bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = 0; - maskbits = (uint16_t)-1 >> (16 - bps); - - for (col = start; col < end; col++) - { /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (16 - src_bit - bps); - - if (little_endian) - buff1 = (src[0] << 8) | src[1]; - else - buff1 = (src[1] << 8) | src[0]; - - buff1 = (buff1 & matchbits) << (src_bit); - if (ready_bits < 8) /* add another bps bits to the buffer */ - { - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamples16bits */ - -static int extractContigSamples24bits(uint8_t *in, uint8_t *out, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, tsample_t count, - uint32_t start, uint32_t end) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint32_t maskbits = 0, matchbits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((in == NULL) || (out == NULL)) - { - TIFFError("extractContigSamples24bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamples24bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamples24bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = 0; - maskbits = (uint32_t)-1 >> (32 - bps); - for (col = start; col < end; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (32 - src_bit - bps); - if (little_endian) - { - buff1 = (src[0] << 24); - if (matchbits & 0x00ff0000) - buff1 |= (src[1] << 16); - if (matchbits & 0x0000ff00) - buff1 |= (src[2] << 8); - if (matchbits & 0x000000ff) - buff1 |= src[3]; - } - else - { - buff1 = src[0]; - if (matchbits & 0x0000ff00) - buff1 |= (src[1] << 8); - if (matchbits & 0x00ff0000) - buff1 |= (src[2] << 16); - if (matchbits & 0xff000000) - buff1 |= (src[3] << 24); - } - buff1 = (buff1 & matchbits) << (src_bit); - - if (ready_bits < 16) /* add another bps bits to the buffer */ - { - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamples24bits */ - -static int extractContigSamples32bits(uint8_t *in, uint8_t *out, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, tsample_t count, - uint32_t start, uint32_t end) -{ - int ready_bits = 0, sindex = 0 /*, shift_width = 0 */; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t maskbits = 0, matchbits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((in == NULL) || (out == NULL)) - { - TIFFError("extractContigSamples32bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamples32bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamples32bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - /* shift_width = ((bps + 7) / 8) + 1; */ - ready_bits = 0; - maskbits = (uint64_t)-1 >> (64 - bps); - for (col = start; col < end; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (64 - src_bit - bps); - if (little_endian) - { - longbuff1 = - (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = - (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; - longbuff2 = longbuff1; - } - - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - buff1 = (buff3 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - } - else - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamples32bits */ - -static int extractContigSamplesShifted8bits(uint8_t *in, uint8_t *out, - uint32_t cols, tsample_t sample, - uint16_t spp, uint16_t bps, - tsample_t count, uint32_t start, - uint32_t end, int shift) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint8_t maskbits = 0, matchbits = 0; - uint8_t buff1 = 0, buff2 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("extractContigSamplesShifted8bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamplesShifted8bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamplesShifted8bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = shift; - maskbits = (uint8_t)-1 >> (8 - bps); - buff1 = buff2 = 0; - for (col = start; col < end; col++) - { /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (8 - src_bit - bps); - buff1 = ((*src) & matchbits) << (src_bit); - if ((col == start) && (sindex == sample)) - buff2 = *src & ((uint8_t)-1) << (shift); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - *dst++ |= buff2; - buff2 = buff1; - ready_bits -= 8; - } - else - buff2 = buff2 | (buff1 >> ready_bits); - ready_bits += bps; - } - } - - while (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamplesShifted8bits */ - -static int extractContigSamplesShifted16bits(uint8_t *in, uint8_t *out, - uint32_t cols, tsample_t sample, - uint16_t spp, uint16_t bps, - tsample_t count, uint32_t start, - uint32_t end, int shift) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint16_t maskbits = 0, matchbits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("extractContigSamplesShifted16bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamplesShifted16bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamplesShifted16bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = shift; - maskbits = (uint16_t)-1 >> (16 - bps); - for (col = start; col < end; col++) - { /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (16 - src_bit - bps); - if (little_endian) - buff1 = (src[0] << 8) | src[1]; - else - buff1 = (src[1] << 8) | src[0]; - - if ((col == start) && (sindex == sample)) - buff2 = buff1 & ((uint16_t)-1) << (8 - shift); - - buff1 = (buff1 & matchbits) << (src_bit); - - if (ready_bits < 8) /* add another bps bits to the buffer */ - buff2 = buff2 | (buff1 >> ready_bits); - else /* If we have a full buffer's worth, write it out */ - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - } - - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamplesShifted16bits */ - -static int extractContigSamplesShifted24bits(uint8_t *in, uint8_t *out, - uint32_t cols, tsample_t sample, - uint16_t spp, uint16_t bps, - tsample_t count, uint32_t start, - uint32_t end, int shift) -{ - int ready_bits = 0, sindex = 0; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint32_t maskbits = 0, matchbits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((in == NULL) || (out == NULL)) - { - TIFFError("extractContigSamplesShifted24bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - /*--- Remark, which is true for all those functions - * extractCongigSamplesXXX() -- The mitigation of the start/end test does - * not always make sense, because the function is often called with e.g.: - * start = 31; end = 32; cols = 32 to extract the last column in a 32x32 - * sample image. If then, a wrong parameter (e.g. cols = 10) is provided, - * the mitigated settings would be start=0; end=1. Therefore, an error - * message and no copy action might be the better reaction to wrong - * parameter configurations. - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamplesShifted24bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamplesShifted24bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - ready_bits = shift; - maskbits = (uint32_t)-1 >> (32 - bps); - for (col = start; col < end; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (32 - src_bit - bps); - if (little_endian) - buff1 = - (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; - else - buff1 = - (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; - - if ((col == start) && (sindex == sample)) - buff2 = buff1 & ((uint32_t)-1) << (16 - shift); - - buff1 = (buff1 & matchbits) << (src_bit); - - if (ready_bits < 16) /* add another bps bits to the buffer */ - { - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamplesShifted24bits */ - -static int extractContigSamplesShifted32bits(uint8_t *in, uint8_t *out, - uint32_t cols, tsample_t sample, - uint16_t spp, uint16_t bps, - tsample_t count, uint32_t start, - uint32_t end, int shift) -{ - int ready_bits = 0, sindex = 0 /*, shift_width = 0 */; - uint32_t col, src_byte, src_bit, bit_offset, numcols; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t maskbits = 0, matchbits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - uint8_t *src = in; - uint8_t *dst = out; - - if ((in == NULL) || (out == NULL)) - { - TIFFError("extractContigSamplesShifted32bits", - "Invalid input or output buffer"); - return (1); - } - - /* Number of extracted columns shall be kept as (end-start + 1). Otherwise - * buffer-overflow might occur. 'start' and 'col' count from 0 to (cols-1) - * but 'end' is to be set one after the index of the last column to be - * copied! - */ - if (end >= start) - numcols = end - start; - else - numcols = start - end; - if ((start > end) || (start > cols)) - { - TIFFError("extractContigSamplesShifted32bits", - "Invalid start column value %" PRIu32 " ignored", start); - start = 0; - } - if ((end == 0) || (end > cols)) - { - TIFFError("extractContigSamplesShifted32bits", - "Invalid end column value %" PRIu32 " ignored", end); - end = cols; - } - if ((end - start) > numcols) - { - end = start + numcols; - } - - /* shift_width = ((bps + 7) / 8) + 1; */ - ready_bits = shift; - maskbits = (uint64_t)-1 >> (64 - bps); - for (col = start; col < end; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps * spp; - for (sindex = sample; (sindex < spp) && (sindex < (sample + count)); - sindex++) - { - if (sindex == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; - } - - src = in + src_byte; - matchbits = maskbits << (64 - src_bit - bps); - if (little_endian) - { - longbuff1 = - (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = - (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; - longbuff2 = longbuff1; - } - - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - if ((col == start) && (sindex == sample)) - buff2 = buff3 & ((uint64_t)-1) << (32 - shift); - - buff1 = (buff3 & matchbits) << (src_bit); - - if (ready_bits < 32) - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - return (0); -} /* end extractContigSamplesShifted32bits */ - -static int extractContigSamplesToBuffer(uint8_t *out, uint8_t *in, - uint32_t rows, uint32_t cols, - tsample_t sample, uint16_t spp, - uint16_t bps, struct dump_opts *dump) -{ - int shift_width, bytes_per_sample, bytes_per_pixel; - uint32_t src_rowsize, src_offset, row, first_col = 0; - uint32_t dst_rowsize, dst_offset; - tsample_t count = 1; - uint8_t *src, *dst; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if ((bps % 8) == 0) - shift_width = 0; - else - { - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - } - src_rowsize = ((bps * spp * cols) + 7) / 8; - dst_rowsize = ((bps * cols) + 7) / 8; - - if ((dump->outfile != NULL) && (dump->level == 4)) - { - dump_info(dump->outfile, dump->format, "extractContigSamplesToBuffer", - "Sample %" PRIu32 ", %" PRIu32 " rows", sample + 1u, - rows + 1u); - } - for (row = 0; row < rows; row++) - { - src_offset = row * src_rowsize; - dst_offset = row * dst_rowsize; - src = in + src_offset; - dst = out + dst_offset; - - /* pack the data into the scanline */ - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes(src, dst, cols, sample, spp, bps, - count, first_col, cols)) - return (1); - break; - case 1: - if (bps == 1) - { - if (extractContigSamples8bits(src, dst, cols, sample, spp, - bps, count, first_col, cols)) - return (1); - break; - } - else if (extractContigSamples16bits(src, dst, cols, sample, spp, - bps, count, first_col, - cols)) - return (1); - break; - case 2: - if (extractContigSamples24bits(src, dst, cols, sample, spp, bps, - count, first_col, cols)) - return (1); - break; - case 3: - case 4: - case 5: - if (extractContigSamples32bits(src, dst, cols, sample, spp, bps, - count, first_col, cols)) - return (1); - break; - default: - TIFFError("extractContigSamplesToBuffer", - "Unsupported bit depth: %" PRIu16, bps); - return (1); - } - if ((dump->outfile != NULL) && (dump->level == 4)) - dump_buffer(dump->outfile, dump->format, 1, dst_rowsize, row, dst); - } - - return (0); -} /* end extractContigSamplesToBuffer */ - -static int extractContigSamplesToTileBuffer( - uint8_t *out, uint8_t *in, uint32_t rows, uint32_t cols, - uint32_t imagewidth, uint32_t tilewidth, tsample_t sample, uint16_t count, - uint16_t spp, uint16_t bps, struct dump_opts *dump) -{ - int shift_width, bytes_per_sample, bytes_per_pixel; - uint32_t src_rowsize, src_offset, row; - uint32_t dst_rowsize, dst_offset; - uint8_t *src, *dst; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if ((bps % 8) == 0) - shift_width = 0; - else - { - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - } - - if ((dump->outfile != NULL) && (dump->level == 4)) - { - dump_info( - dump->outfile, dump->format, "extractContigSamplesToTileBuffer", - "Sample %" PRIu32 ", %" PRIu32 " rows", sample + 1u, rows + 1u); - } - - src_rowsize = ((bps * spp * imagewidth) + 7) / 8; - dst_rowsize = ((bps * tilewidth * count) + 7) / 8; - - for (row = 0; row < rows; row++) - { - src_offset = row * src_rowsize; - dst_offset = row * dst_rowsize; - src = in + src_offset; - dst = out + dst_offset; - - /* pack the data into the scanline */ - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes(src, dst, cols, sample, spp, bps, - count, 0, cols)) - return (1); - break; - case 1: - if (bps == 1) - { - if (extractContigSamples8bits(src, dst, cols, sample, spp, - bps, count, 0, cols)) - return (1); - break; - } - else if (extractContigSamples16bits(src, dst, cols, sample, spp, - bps, count, 0, cols)) - return (1); - break; - case 2: - if (extractContigSamples24bits(src, dst, cols, sample, spp, bps, - count, 0, cols)) - return (1); - break; - case 3: - case 4: - case 5: - if (extractContigSamples32bits(src, dst, cols, sample, spp, bps, - count, 0, cols)) - return (1); - break; - default: - TIFFError("extractContigSamplesToTileBuffer", - "Unsupported bit depth: %" PRIu16, bps); - return (1); - } - if ((dump->outfile != NULL) && (dump->level == 4)) - dump_buffer(dump->outfile, dump->format, 1, dst_rowsize, row, dst); - } - - return (0); -} /* end extractContigSamplesToTileBuffer */ - -static int readContigStripsIntoBuffer(TIFF *in, uint8_t *buf) -{ - uint8_t *bufp = buf; - tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); - tmsize_t stripsize = TIFFStripSize(in); - tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - - if (scanline_size == 0) - { - TIFFError("", "TIFF scanline size is zero!"); - return 0; - } - - for (strip = 0; strip < nstrips; strip++) - { - bytes_read = TIFFReadEncodedStrip(in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) - TIFFError("", - "Strip %" PRIu32 ": read %" PRId64 - " bytes, strip size %" PRIu64, - strip + 1, (uint64_t)bytes_read, (uint64_t)stripsize); - - if (bytes_read < 0 && !ignore) - { - TIFFError("", - "Error reading strip %" PRIu32 " after %" PRIu64 " rows", - strip, (uint64_t)rows); - return 0; - } - bufp += stripsize; - } - - return 1; -} /* end readContigStripsIntoBuffer */ - -static int combineSeparateSamplesBytes(unsigned char *srcbuffs[], - unsigned char *out, uint32_t cols, - uint32_t rows, uint16_t spp, - uint16_t bps, FILE *dumpfile, int format, - int level) -{ - int i, bytes_per_sample; - uint32_t row, col, col_offset, src_rowsize, dst_rowsize, row_offset; - unsigned char *src; - unsigned char *dst; - tsample_t s; - - src = srcbuffs[0]; - dst = out; - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateSamplesBytes", "Invalid buffer address"); - return (1); - } - - bytes_per_sample = (bps + 7) / 8; - - src_rowsize = ((bps * cols) + 7) / 8; - dst_rowsize = ((bps * spp * cols) + 7) / 8; - for (row = 0; row < rows; row++) - { - if ((dumpfile != NULL) && (level == 2)) - { - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - dump_info(dumpfile, format, "combineSeparateSamplesBytes", - "Input data, Sample %" PRIu16, s); - dump_buffer(dumpfile, format, 1, cols, row, - srcbuffs[s] + (row * src_rowsize)); - } - } - dst = out + (row * dst_rowsize); - row_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - col_offset = row_offset + (col * (bps / 8)); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = srcbuffs[s] + col_offset; - for (i = 0; i < bytes_per_sample; i++) - *(dst + i) = *(src + i); - dst += bytes_per_sample; - } - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateSamplesBytes", - "Output data, combined samples"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateSamplesBytes */ - -static int combineSeparateSamples8bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, int level) -{ - int ready_bits = 0; - /* int bytes_per_sample = 0; */ - uint32_t src_rowsize, dst_rowsize, src_offset; - uint32_t bit_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint8_t maskbits = 0, matchbits = 0; - uint8_t buff1 = 0, buff2 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[32]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateSamples8bits", - "Invalid input or output buffer"); - return (1); - } - - /* bytes_per_sample = (bps + 7) / 8; */ - src_rowsize = ((bps * cols) + 7) / 8; - dst_rowsize = ((bps * cols * spp) + 7) / 8; - maskbits = (uint8_t)-1 >> (8 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (8 - src_bit - bps); - /* load up next sample from each plane */ - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - buff1 = ((*src) & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - *dst++ = buff2; - buff2 = buff1; - ready_bits -= 8; - strcpy(action, "Flush"); - } - else - { - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_byte(dumpfile, format, "Match bits", matchbits); - dump_byte(dumpfile, format, "Src bits", *src); - dump_byte(dumpfile, format, "Buff1 bits", buff1); - dump_byte(dumpfile, format, "Buff2 bits", buff2); - dump_info(dumpfile, format, "", "%s", action); - } - } - } - - if (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Src byte offset %3" PRIu32 " bit offset %2" PRIu32 - " Dst offset %3td", - row + 1u, col + 1u, src_byte, src_bit, dst - out); - dump_byte(dumpfile, format, "Final bits", buff1); - } - } - - if ((dumpfile != NULL) && (level >= 2)) - { - dump_info(dumpfile, format, "combineSeparateSamples8bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateSamples8bits */ - -static int combineSeparateSamples16bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, int level) -{ - int ready_bits = 0 /*, bytes_per_sample = 0 */; - uint32_t src_rowsize, dst_rowsize; - uint32_t bit_offset, src_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint16_t maskbits = 0, matchbits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateSamples16bits", - "Invalid input or output buffer"); - return (1); - } - - /* bytes_per_sample = (bps + 7) / 8; */ - src_rowsize = ((bps * cols) + 7) / 8; - dst_rowsize = ((bps * cols * spp) + 7) / 8; - maskbits = (uint16_t)-1 >> (16 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (16 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - buff1 = (src[0] << 8) | src[1]; - else - buff1 = (src[1] << 8) | src[0]; - - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - - dump_short(dumpfile, format, "Match bits", matchbits); - dump_data(dumpfile, format, "Src bits", src, 2); - dump_short(dumpfile, format, "Buff1 bits", buff1); - dump_short(dumpfile, format, "Buff2 bits", buff2); - dump_byte(dumpfile, format, "Write byte", bytebuff); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - - /* catch any trailing bits at the end of the line */ - if (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset " - "%2d Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - dump_byte(dumpfile, format, "Final bits", bytebuff); - } - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateSamples16bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateSamples16bits */ - -static int combineSeparateSamples24bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, int level) -{ - int ready_bits = 0 /*, bytes_per_sample = 0 */; - uint32_t src_rowsize, dst_rowsize; - uint32_t bit_offset, src_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint32_t maskbits = 0, matchbits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateSamples24bits", - "Invalid input or output buffer"); - return (1); - } - - /* bytes_per_sample = (bps + 7) / 8; */ - src_rowsize = ((bps * cols) + 7) / 8; - dst_rowsize = ((bps * cols * spp) + 7) / 8; - maskbits = (uint32_t)-1 >> (32 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (32 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - buff1 = ((uint32_t)src[0] << 24) | - ((uint32_t)src[1] << 16) | ((uint32_t)src[2] << 8) | - (uint32_t)src[3]; - else - buff1 = ((uint32_t)src[3] << 24) | - ((uint32_t)src[2] << 16) | ((uint32_t)src[1] << 8) | - (uint32_t)src[0]; - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 16) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff1 = bytebuff2 = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_long(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_long(dumpfile, format, "Buff1 bits ", buff1); - dump_long(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d " - "Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - - dump_long(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_long(dumpfile, format, "Buff1 bits ", buff1); - dump_long(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %2d", ready_bits); - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateSamples24bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateSamples24bits */ - -static int combineSeparateSamples32bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, int level) -{ - int ready_bits = 0 /*, bytes_per_sample = 0, shift_width = 0 */; - uint32_t src_rowsize, dst_rowsize, bit_offset, src_offset; - uint32_t src_byte = 0, src_bit = 0; - uint32_t row, col; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t maskbits = 0, matchbits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateSamples32bits", - "Invalid input or output buffer"); - return (1); - } - - /* bytes_per_sample = (bps + 7) / 8; */ - src_rowsize = ((bps * cols) + 7) / 8; - dst_rowsize = ((bps * cols * spp) + 7) / 8; - maskbits = (uint64_t)-1 >> (64 - bps); - /* shift_width = ((bps + 7) / 8) + 1; */ - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (64 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - { - longbuff1 = (src[0] << 24) | (src[1] << 16) | - (src[2] << 8) | src[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = (src[3] << 24) | (src[2] << 16) | - (src[1] << 8) | src[0]; - longbuff2 = longbuff1; - } - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - buff1 = (buff3 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff1 = bytebuff2 = bytebuff3 = bytebuff4 = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Sample %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_wide(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 8); - dump_wide(dumpfile, format, "Buff1 bits ", buff1); - dump_wide(dumpfile, format, "Buff2 bits ", buff2); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d " - "Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - - dump_wide(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_wide(dumpfile, format, "Buff1 bits ", buff1); - dump_wide(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %2d", ready_bits); - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateSamples32bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, out); - } - } - - return (0); -} /* end combineSeparateSamples32bits */ - -static int combineSeparateTileSamplesBytes(unsigned char *srcbuffs[], - unsigned char *out, uint32_t cols, - uint32_t rows, uint32_t imagewidth, - uint32_t tw, uint16_t spp, - uint16_t bps, FILE *dumpfile, - int format, int level) -{ - int i, bytes_per_sample; - uint32_t row, col, col_offset, src_rowsize, dst_rowsize, src_offset; - unsigned char *src; - unsigned char *dst; - tsample_t s; - - src = srcbuffs[0]; - dst = out; - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateTileSamplesBytes", "Invalid buffer address"); - return (1); - } - - bytes_per_sample = (bps + 7) / 8; - src_rowsize = ((bps * tw) + 7) / 8; - dst_rowsize = imagewidth * bytes_per_sample * spp; - for (row = 0; row < rows; row++) - { - if ((dumpfile != NULL) && (level == 2)) - { - for (s = 0; s < spp; s++) - { - dump_info(dumpfile, format, "combineSeparateTileSamplesBytes", - "Input data, Sample %" PRIu16, s); - dump_buffer(dumpfile, format, 1, cols, row, - srcbuffs[s] + (row * src_rowsize)); - } - } - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; -#ifdef DEVELMODE - TIFFError("", "Tile row %4d, Src offset %6d Dst offset %6zd", row, - src_offset, dst - out); -#endif - for (col = 0; col < cols; col++) - { - col_offset = src_offset + (col * (bps / 8)); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = srcbuffs[s] + col_offset; - for (i = 0; i < bytes_per_sample; i++) - *(dst + i) = *(src + i); - dst += bytes_per_sample; - } - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateTileSamplesBytes", - "Output data, combined samples"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateTileSamplesBytes */ - -static int combineSeparateTileSamples8bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint32_t imagewidth, uint32_t tw, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, - int level) -{ - int ready_bits = 0; - uint32_t src_rowsize, dst_rowsize, src_offset; - uint32_t bit_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint8_t maskbits = 0, matchbits = 0; - uint8_t buff1 = 0, buff2 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[32]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateTileSamples8bits", - "Invalid input or output buffer"); - return (1); - } - - src_rowsize = ((bps * tw) + 7) / 8; - dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; - maskbits = (uint8_t)-1 >> (8 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (8 - src_bit - bps); - /* load up next sample from each plane */ - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - buff1 = ((*src) & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - *dst++ = buff2; - buff2 = buff1; - ready_bits -= 8; - strcpy(action, "Flush"); - } - else - { - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_byte(dumpfile, format, "Match bits", matchbits); - dump_byte(dumpfile, format, "Src bits", *src); - dump_byte(dumpfile, format, "Buff1 bits", buff1); - dump_byte(dumpfile, format, "Buff2 bits", buff2); - dump_info(dumpfile, format, "", "%s", action); - } - } - } - - if (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset " - "%2d Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - dump_byte(dumpfile, format, "Final bits", buff1); - } - } - - if ((dumpfile != NULL) && (level >= 2)) - { - dump_info(dumpfile, format, "combineSeparateTileSamples8bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateTileSamples8bits */ - -static int combineSeparateTileSamples16bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint32_t imagewidth, uint32_t tw, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, - int level) -{ - int ready_bits = 0; - uint32_t src_rowsize, dst_rowsize; - uint32_t bit_offset, src_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint16_t maskbits = 0, matchbits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateTileSamples16bits", - "Invalid input or output buffer"); - return (1); - } - - src_rowsize = ((bps * tw) + 7) / 8; - dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; - maskbits = (uint16_t)-1 >> (16 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (16 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - buff1 = (src[0] << 8) | src[1]; - else - buff1 = (src[1] << 8) | src[0]; - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - - dump_short(dumpfile, format, "Match bits", matchbits); - dump_data(dumpfile, format, "Src bits", src, 2); - dump_short(dumpfile, format, "Buff1 bits", buff1); - dump_short(dumpfile, format, "Buff2 bits", buff2); - dump_byte(dumpfile, format, "Write byte", bytebuff); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - - /* catch any trailing bits at the end of the line */ - if (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset " - "%2d Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - dump_byte(dumpfile, format, "Final bits", bytebuff); - } - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateTileSamples16bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateTileSamples16bits */ - -static int combineSeparateTileSamples24bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint32_t imagewidth, uint32_t tw, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, - int level) -{ - int ready_bits = 0; - uint32_t src_rowsize, dst_rowsize; - uint32_t bit_offset, src_offset; - uint32_t row, col, src_byte = 0, src_bit = 0; - uint32_t maskbits = 0, matchbits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateTileSamples24bits", - "Invalid input or output buffer"); - return (1); - } - - src_rowsize = ((bps * tw) + 7) / 8; - dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; - maskbits = (uint32_t)-1 >> (32 - bps); - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (32 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - buff1 = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | - src[3]; - else - buff1 = (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | - src[0]; - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 16) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff1 = bytebuff2 = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Samples %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_long(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_long(dumpfile, format, "Buff1 bits ", buff1); - dump_long(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d " - "Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - - dump_long(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_long(dumpfile, format, "Buff1 bits ", buff1); - dump_long(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %2d", ready_bits); - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateTileSamples24bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, - out + (row * dst_rowsize)); - } - } - - return (0); -} /* end combineSeparateTileSamples24bits */ - -static int combineSeparateTileSamples32bits(uint8_t *in[], uint8_t *out, - uint32_t cols, uint32_t rows, - uint32_t imagewidth, uint32_t tw, - uint16_t spp, uint16_t bps, - FILE *dumpfile, int format, - int level) -{ - int ready_bits = 0 /*, shift_width = 0 */; - uint32_t src_rowsize, dst_rowsize, bit_offset, src_offset; - uint32_t src_byte = 0, src_bit = 0; - uint32_t row, col; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t maskbits = 0, matchbits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - tsample_t s; - unsigned char *src = in[0]; - unsigned char *dst = out; - char action[8]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("combineSeparateTileSamples32bits", - "Invalid input or output buffer"); - return (1); - } - - src_rowsize = ((bps * tw) + 7) / 8; - dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; - maskbits = (uint64_t)-1 >> (64 - bps); - /* shift_width = ((bps + 7) / 8) + 1; */ - - for (row = 0; row < rows; row++) - { - ready_bits = 0; - buff1 = buff2 = 0; - dst = out + (row * dst_rowsize); - src_offset = row * src_rowsize; - for (col = 0; col < cols; col++) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = col * bps; - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - - matchbits = maskbits << (64 - src_bit - bps); - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - src = in[s] + src_offset + src_byte; - if (little_endian) - { - longbuff1 = (src[0] << 24) | (src[1] << 16) | - (src[2] << 8) | src[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = (src[3] << 24) | (src[2] << 16) | - (src[1] << 8) | src[0]; - longbuff2 = longbuff1; - } - - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - buff1 = (buff3 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - strcpy(action, "Flush"); - } - else - { /* add another bps bits to the buffer */ - bytebuff1 = bytebuff2 = bytebuff3 = bytebuff4 = 0; - buff2 = (buff2 | (buff1 >> ready_bits)); - strcpy(action, "Update"); - } - ready_bits += bps; - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3" PRIu32 ", Col %3" PRIu32 - ", Sample %" PRIu16 ", Src byte offset %3" PRIu32 - " bit offset %2" PRIu32 " Dst offset %3td", - row + 1u, col + 1u, s, src_byte, src_bit, - dst - out); - dump_wide(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 8); - dump_wide(dumpfile, format, "Buff1 bits ", buff1); - dump_wide(dumpfile, format, "Buff2 bits ", buff2); - dump_info(dumpfile, format, "", "Ready bits: %d, %s", - ready_bits, action); - } - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - if ((dumpfile != NULL) && (level == 3)) - { - dump_info(dumpfile, format, "", - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d " - "Dst offset %3zd", - row + 1, col + 1, src_byte, src_bit, dst - out); - - dump_wide(dumpfile, format, "Match bits ", matchbits); - dump_data(dumpfile, format, "Src bits ", src, 4); - dump_wide(dumpfile, format, "Buff1 bits ", buff1); - dump_wide(dumpfile, format, "Buff2 bits ", buff2); - dump_byte(dumpfile, format, "Write bits1", bytebuff1); - dump_byte(dumpfile, format, "Write bits2", bytebuff2); - dump_info(dumpfile, format, "", "Ready bits: %2d", ready_bits); - } - - if ((dumpfile != NULL) && (level == 2)) - { - dump_info(dumpfile, format, "combineSeparateTileSamples32bits", - "Output data"); - dump_buffer(dumpfile, format, 1, dst_rowsize, row, out); - } - } - - return (0); -} /* end combineSeparateTileSamples32bits */ - -static int readSeparateStripsIntoBuffer(TIFF *in, uint8_t *obuf, - uint32_t length, uint32_t width, - uint16_t spp, struct dump_opts *dump) -{ - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; - tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; - uint32_t src_rowsize, dst_rowsize, rows_processed, rps; - uint32_t rows_this_strip = 0; - tsample_t s; - tstrip_t strip; - tsize_t scanlinesize = TIFFScanlineSize(in); - tsize_t stripsize = TIFFStripSize(in); - unsigned char *srcbuffs[MAX_SAMPLES]; - unsigned char *buff = NULL; - unsigned char *dst = NULL; - - if (obuf == NULL) - { - TIFFError("readSeparateStripsIntoBuffer", "Invalid buffer argument"); - return (0); - } - - memset(srcbuffs, '\0', sizeof(srcbuffs)); - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &planar); - TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - if (rps > length) - rps = length; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - - src_rowsize = ((bps * width) + 7) / 8; - dst_rowsize = ((bps * width * spp) + 7) / 8; - dst = obuf; - - if ((dump->infile != NULL) && (dump->level == 3)) - { - dump_info(dump->infile, dump->format, "", - "Image width %" PRIu32 ", length %" PRIu32 - ", Scanline size, %4" PRId64 " bytes", - width, length, scanlinesize); - dump_info(dump->infile, dump->format, "", - "Bits per sample %" PRIu16 ", Samples per pixel %" PRIu16 - ", Shift width %d", - bps, spp, shift_width); - } - - /* Libtiff seems to assume/require that data for separate planes are - * written one complete plane after another and not interleaved in any way. - * Multiple scanlines and possibly strips of the same plane must be - * written before data for any other plane. - */ - nstrips = TIFFNumberOfStrips(in); - strips_per_sample = nstrips / spp; - - /* Add 3 padding bytes for combineSeparateSamples32bits */ - if ((size_t)stripsize > TIFF_TMSIZE_T_MAX - NUM_BUFF_OVERSIZE_BYTES) - { - TIFFError("readSeparateStripsIntoBuffer", - "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } - - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; - buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError( - "readSeparateStripsIntoBuffer", - "Unable to allocate strip read buffer for sample %" PRIu16, s); - for (i = 0; i < s; i++) - _TIFFfree(srcbuffs[i]); - return 0; - } - buff[stripsize] = 0; - buff[stripsize + 1] = 0; - buff[stripsize + 2] = 0; - srcbuffs[s] = buff; - } - - rows_processed = 0; - for (j = 0; (j < strips_per_sample) && (result == 1); j++) - { - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip(in, strip, buff, stripsize); - if (bytes_read < 0) - { - rows_this_strip = 0; - } - else - { - rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - } - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), - "Error, can't read strip %" PRIu32 - " for sample %" PRIu32, - strip, s + 1u); - result = 0; - break; - } -#ifdef DEVELMODE - TIFFError("", - "Strip %2" PRIu32 ", read %5zd" - " bytes for %4" PRIu32 " scanlines, shift width %d", - strip, bytes_read, rows_this_strip, shift_width); -#endif - } - - if (rps > rows_this_strip) - rps = rows_this_strip; - dst = obuf + (dst_rowsize * rows_processed); - if ((bps % 8) == 0) - { - if (combineSeparateSamplesBytes(srcbuffs, dst, width, rps, spp, bps, - dump->infile, dump->format, - dump->level)) - { - result = 0; - break; - } - } - else - { - switch (shift_width) - { - case 1: - if (combineSeparateSamples8bits(srcbuffs, dst, width, rps, - spp, bps, dump->infile, - dump->format, dump->level)) - { - result = 0; - break; - } - break; - case 2: - if (combineSeparateSamples16bits(srcbuffs, dst, width, rps, - spp, bps, dump->infile, - dump->format, dump->level)) - { - result = 0; - break; - } - break; - case 3: - if (combineSeparateSamples24bits(srcbuffs, dst, width, rps, - spp, bps, dump->infile, - dump->format, dump->level)) - { - result = 0; - break; - } - break; - case 4: - case 5: - case 6: - case 7: - case 8: - if (combineSeparateSamples32bits(srcbuffs, dst, width, rps, - spp, bps, dump->infile, - dump->format, dump->level)) - { - result = 0; - break; - } - break; - default: - TIFFError("readSeparateStripsIntoBuffer", - "Unsupported bit depth: %" PRIu16, bps); - result = 0; - break; - } - } - - if ((rows_processed + rps) > length) - { - rows_processed = length; - rps = length - rows_processed; - } - else - rows_processed += rps; - } - - /* free any buffers allocated for each plane or scanline and - * any temporary buffers - */ - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - buff = srcbuffs[s]; - if (buff != NULL) - _TIFFfree(buff); - } - - return (result); -} /* end readSeparateStripsIntoBuffer */ - -static int get_page_geometry(char *name, struct pagedef *page) -{ - char *ptr; - unsigned int n; - - for (ptr = name; *ptr; ptr++) - *ptr = (char)tolower((int)*ptr); - - for (n = 0; n < MAX_PAPERNAMES; n++) - { - if (strcmp(name, PaperTable[n].name) == 0) - { - page->width = PaperTable[n].width; - page->length = PaperTable[n].length; - strncpy(page->name, PaperTable[n].name, 15); - page->name[15] = '\0'; - return (0); - } - } - - return (1); -} - -static void initPageSetup(struct pagedef *page, struct pageseg *pagelist, - struct buffinfo seg_buffs[]) -{ - int i; - - strcpy(page->name, ""); - page->mode = PAGE_MODE_NONE; - page->res_unit = RESUNIT_NONE; - page->hres = 0.0; - page->vres = 0.0; - page->width = 0.0; - page->length = 0.0; - page->hmargin = 0.0; - page->vmargin = 0.0; - page->rows = 0; - page->cols = 0; - page->orient = ORIENTATION_NONE; - - for (i = 0; i < MAX_SECTIONS; i++) - { - pagelist[i].x1 = (uint32_t)0; - pagelist[i].x2 = (uint32_t)0; - pagelist[i].y1 = (uint32_t)0; - pagelist[i].y2 = (uint32_t)0; - pagelist[i].buffsize = (uint32_t)0; - pagelist[i].position = 0; - pagelist[i].total = 0; - } - - for (i = 0; i < MAX_OUTBUFFS; i++) - { - seg_buffs[i].size = 0; - seg_buffs[i].buffer = NULL; - } -} - -static void initImageData(struct image_data *image) -{ - image->xres = 0.0; - image->yres = 0.0; - image->width = 0; - image->length = 0; - image->res_unit = RESUNIT_NONE; - image->bps = 0; - image->spp = 0; - image->planar = 0; - image->photometric = 0; - image->orientation = 0; - image->compression = COMPRESSION_NONE; - image->adjustments = 0; -} - -static void initCropMasks(struct crop_mask *cps) -{ - int i; - - cps->crop_mode = CROP_NONE; - cps->res_unit = RESUNIT_NONE; - cps->edge_ref = EDGE_TOP; - cps->width = 0; - cps->length = 0; - for (i = 0; i < 4; i++) - cps->margins[i] = 0.0; - cps->bufftotal = (uint32_t)0; - cps->combined_width = (uint32_t)0; - cps->combined_length = (uint32_t)0; - cps->rotation = (uint16_t)0; - cps->photometric = INVERT_DATA_AND_TAG; - cps->mirror = (uint16_t)0; - cps->invert = (uint16_t)0; - cps->zones = (uint32_t)0; - cps->regions = (uint32_t)0; - cps->selections = (uint16_t)0; - for (i = 0; i < MAX_REGIONS; i++) - { - cps->corners[i].X1 = 0.0; - cps->corners[i].X2 = 0.0; - cps->corners[i].Y1 = 0.0; - cps->corners[i].Y2 = 0.0; - cps->regionlist[i].x1 = 0; - cps->regionlist[i].x2 = 0; - cps->regionlist[i].y1 = 0; - cps->regionlist[i].y2 = 0; - cps->regionlist[i].width = 0; - cps->regionlist[i].length = 0; - cps->regionlist[i].buffsize = 0; - cps->zonelist[i].position = 0; - cps->zonelist[i].total = 0; - } - cps->exp_mode = ONE_FILE_COMPOSITE; - cps->img_mode = COMPOSITE_IMAGES; -} - -static void initDumpOptions(struct dump_opts *dump) -{ - dump->debug = 0; - dump->format = DUMP_NONE; - dump->level = 1; - sprintf(dump->mode, "w"); - memset(dump->infilename, '\0', PATH_MAX + 1); - memset(dump->outfilename, '\0', PATH_MAX + 1); - dump->infile = NULL; - dump->outfile = NULL; -} - -/* Compute pixel offsets into the image for margins and fixed regions */ -static int computeInputPixelOffsets(struct crop_mask *crop, - struct image_data *image, - struct offset *off) -{ - double scale; - float xres, yres; - /* Values for these offsets are in pixels from start of image, not bytes, - * and are indexed from zero to width - 1 or length - 1 */ - uint32_t tmargin, bmargin, lmargin, rmargin; - uint32_t startx, endx; /* offsets of first and last columns to extract */ - uint32_t starty, endy; /* offsets of first and last row to extract */ - uint32_t width, length, crop_width, crop_length; - uint32_t i, max_width, max_length, zwidth, zlength, buffsize; - uint32_t x1, x2, y1, y2; - - if (image->res_unit != RESUNIT_INCH && - image->res_unit != RESUNIT_CENTIMETER) - { - xres = 1.0; - yres = 1.0; - } - else - { - if (((image->xres == 0) || (image->yres == 0)) && - (crop->res_unit != RESUNIT_NONE) && - ((crop->crop_mode & CROP_REGIONS) || - (crop->crop_mode & CROP_MARGINS) || - (crop->crop_mode & CROP_LENGTH) || (crop->crop_mode & CROP_WIDTH))) - { - TIFFError("computeInputPixelOffsets", - "Cannot compute margins or fixed size sections without " - "image resolution"); - TIFFError("computeInputPixelOffsets", - "Specify units in pixels and try again"); - return (-1); - } - xres = image->xres; - yres = image->yres; - } - - /* Translate user units to image units */ - scale = 1.0; - switch (crop->res_unit) - { - case RESUNIT_CENTIMETER: - if (image->res_unit == RESUNIT_INCH) - scale = 1.0 / 2.54; - break; - case RESUNIT_INCH: - if (image->res_unit == RESUNIT_CENTIMETER) - scale = 2.54; - break; - case RESUNIT_NONE: /* Dimensions in pixels */ - default: - break; - } - - if (crop->crop_mode & CROP_REGIONS) - { - max_width = max_length = 0; - for (i = 0; i < crop->regions; i++) - { - if ((crop->res_unit == RESUNIT_INCH) || - (crop->res_unit == RESUNIT_CENTIMETER)) - { - x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * - xres); - x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * - xres); - y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * - yres); - y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * - yres); - } - else - { - x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); - x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); - y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); - y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to - * bottom-right. Therefore, check that and reorder input. (be aware - * x,y are already casted to (uint32_t) and avoid (0 - 1) ) - */ - uint32_t aux; - if (x1 > x2) - { - aux = x1; - x1 = x2; - x2 = aux; - } - if (y1 > y2) - { - aux = y1; - y1 = y2; - y2 = aux; - } - if (x1 > image->width - 1) - crop->regionlist[i].x1 = image->width - 1; - else if (x1 > 0) - crop->regionlist[i].x1 = (uint32_t)(x1 - 1); - - if (x2 > image->width - 1) - crop->regionlist[i].x2 = image->width - 1; - else if (x2 > 0) - crop->regionlist[i].x2 = (uint32_t)(x2 - 1); - - zwidth = crop->regionlist[i].x2 - crop->regionlist[i].x1 + 1; - - if (y1 > image->length - 1) - crop->regionlist[i].y1 = image->length - 1; - else if (y1 > 0) - crop->regionlist[i].y1 = (uint32_t)(y1 - 1); - - if (y2 > image->length - 1) - crop->regionlist[i].y2 = image->length - 1; - else if (y2 > 0) - crop->regionlist[i].y2 = (uint32_t)(y2 - 1); - - zlength = crop->regionlist[i].y2 - crop->regionlist[i].y1 + 1; - if (zwidth > max_width) - max_width = zwidth; - if (zlength > max_length) - max_length = zlength; - - buffsize = (uint32_t)(((zwidth * image->bps * image->spp + 7) / 8) * - (zlength + 1)); - - crop->regionlist[i].buffsize = buffsize; - crop->bufftotal += buffsize; - - /* For composite images with more than one region, the - * combined_length or combined_width always needs to be equal, - * respectively. - * Otherwise, even the first section/region copy - * action might cause buffer overrun. */ - if (crop->img_mode == COMPOSITE_IMAGES) - { - switch (crop->edge_ref) - { - case EDGE_LEFT: - case EDGE_RIGHT: - if (i > 0 && zlength != crop->combined_length) - { - TIFFError( - "computeInputPixelOffsets", - "Only equal length regions can be combined for " - "-E left or right"); - return (-1); - } - crop->combined_length = zlength; - crop->combined_width += zwidth; - break; - case EDGE_BOTTOM: - case EDGE_TOP: /* width from left, length from top */ - default: - if (i > 0 && zwidth != crop->combined_width) - { - TIFFError("computeInputPixelOffsets", - "Only equal width regions can be " - "combined for -E " - "top or bottom"); - return (-1); - } - crop->combined_width = zwidth; - crop->combined_length += zlength; - break; - } - } - } - return (0); - } /* crop_mode == CROP_REGIONS */ - - /* Convert crop margins into offsets into image - * Margins are expressed as pixel rows and columns, not bytes - */ - if (crop->crop_mode & CROP_MARGINS) - { - if (crop->res_unit != RESUNIT_INCH && - crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ - tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); - lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); - bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); - rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ - tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); - lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); - bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); - rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if (lmargin == 0xFFFFFFFFU || rmargin == 0xFFFFFFFFU || - (lmargin + rmargin) > image->width) - { - TIFFError("computeInputPixelOffsets", - "Combined left and right margins exceed image width"); - lmargin = (uint32_t)0; - rmargin = (uint32_t)0; - return (-1); - } - if (tmargin == 0xFFFFFFFFU || bmargin == 0xFFFFFFFFU || - (tmargin + bmargin) > image->length) - { - TIFFError("computeInputPixelOffsets", - "Combined top and bottom margins exceed image length"); - tmargin = (uint32_t)0; - bmargin = (uint32_t)0; - return (-1); - } - } /* crop_mode == CROP_MARGINS */ - else - { /* no margins requested */ - tmargin = (uint32_t)0; - lmargin = (uint32_t)0; - bmargin = (uint32_t)0; - rmargin = (uint32_t)0; - } - - /* Width, height, and margins are expressed as pixel offsets into image */ - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) - width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) - length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) - width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) - length = - _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } - - off->tmargin = tmargin; - off->bmargin = bmargin; - off->lmargin = lmargin; - off->rmargin = rmargin; - - /* Calculate regions defined by margins, width, and length. - * Coordinates expressed as 0 to imagewidth - 1, imagelength - 1, - * since they are used to compute offsets into buffers */ - switch (crop->edge_ref) - { - case EDGE_BOTTOM: - startx = lmargin; - if ((startx + width) >= (image->width - rmargin)) - endx = image->width - rmargin - 1; - else - endx = startx + width - 1; - - endy = image->length - bmargin - 1; - if ((endy - length) <= tmargin) - starty = tmargin; - else - starty = endy - length + 1; - break; - case EDGE_RIGHT: - endx = image->width - rmargin - 1; - if ((endx - width) <= lmargin) - startx = lmargin; - else - startx = endx - width + 1; - - starty = tmargin; - if ((starty + length) >= (image->length - bmargin)) - endy = image->length - bmargin - 1; - else - endy = starty + length - 1; - break; - case EDGE_TOP: /* width from left, length from top */ - case EDGE_LEFT: - default: - startx = lmargin; - if ((startx + width) >= (image->width - rmargin)) - endx = image->width - rmargin - 1; - else - endx = startx + width - 1; - - starty = tmargin; - if ((starty + length) >= (image->length - bmargin)) - endy = image->length - bmargin - 1; - else - endy = starty + length - 1; - break; - } - off->startx = startx; - off->starty = starty; - off->endx = endx; - off->endy = endy; - - /* Silence Coverity Scan warning because this seems to be a false positive. - * "endx is known to be equal to 4294967295" might not be right here. */ - /* coverity[overflow_const:SUPPRESS] */ - if (endx + 1 <= startx) - { - TIFFError( - "computeInputPixelOffsets", - "Invalid left/right margins and /or image crop width requested"); - return (-1); - } - crop_width = endx - startx + 1; - if (crop_width > image->width) - crop_width = image->width; - - if (endy + 1 <= starty) - { - TIFFError( - "computeInputPixelOffsets", - "Invalid top/bottom margins and /or image crop length requested"); - return (-1); - } - crop_length = endy - starty + 1; - if (crop_length > image->length) - crop_length = image->length; - - off->crop_width = crop_width; - off->crop_length = crop_length; - - return (0); -} /* end computeInputPixelOffsets */ - -/* - * Translate crop options into pixel offsets for one or more regions of the - * image. Options are applied in this order: margins, specific width and length, - * zones, but all are optional. Margins are relative to each edge. Width, length - * and zones are relative to the specified reference edge. Zones are expressed - * as X:Y where X is the ordinal value in a set of Y equal sized portions. eg. - * 2:3 would indicate the middle third of the region qualified by margins and - * any explicit width and length specified. Regions are specified by coordinates - * of the top left and lower right corners with range 1 to width or height. - */ - -static int getCropOffsets(struct image_data *image, struct crop_mask *crop, - struct dump_opts *dump) -{ - struct offset offsets; - int i; - uint32_t uaux; - uint32_t seg, total, need_buff = 0; - uint32_t buffsize; - uint32_t zwidth, zlength; - - memset(&offsets, '\0', sizeof(struct offset)); - crop->bufftotal = 0; - crop->combined_width = (uint32_t)0; - crop->combined_length = (uint32_t)0; - crop->selections = 0; - - /* Compute pixel offsets if margins or fixed width or length specified */ - if ((crop->crop_mode & CROP_MARGINS) || (crop->crop_mode & CROP_REGIONS) || - (crop->crop_mode & CROP_LENGTH) || (crop->crop_mode & CROP_WIDTH)) - { - if (computeInputPixelOffsets(crop, image, &offsets)) - { - TIFFError("getCropOffsets", "Unable to compute crop margins"); - return (-1); - } - need_buff = TRUE; - crop->selections = crop->regions; - /* Regions are only calculated from top and left edges with no margins - */ - if (crop->crop_mode & CROP_REGIONS) - return (0); - } - else - { /* cropped area is the full image */ - offsets.tmargin = 0; - offsets.lmargin = 0; - offsets.bmargin = 0; - offsets.rmargin = 0; - offsets.crop_width = image->width; - offsets.crop_length = image->length; - offsets.startx = 0; - offsets.endx = image->width - 1; - offsets.starty = 0; - offsets.endy = image->length - 1; - need_buff = FALSE; - } - - if (dump->outfile != NULL) - { - dump_info(dump->outfile, dump->format, "", - "Margins: Top: %" PRIu32 " Left: %" PRIu32 - " Bottom: %" PRIu32 " Right: %" PRIu32, - offsets.tmargin, offsets.lmargin, offsets.bmargin, - offsets.rmargin); - dump_info(dump->outfile, dump->format, "", - "Crop region within margins: Adjusted Width: %6" PRIu32 - " Length: %6" PRIu32, - offsets.crop_width, offsets.crop_length); - } - - if (!(crop->crop_mode & CROP_ZONES)) /* no crop zones requested */ - { - if (need_buff == FALSE) /* No margins or fixed width or length areas */ - { - crop->selections = 0; - crop->combined_width = image->width; - crop->combined_length = image->length; - return (0); - } - else - { - /* Use one region for margins and fixed width or length areas - * even though it was not formally declared as a region. - */ - crop->selections = 1; - crop->zones = 1; - crop->zonelist[0].total = 1; - crop->zonelist[0].position = 1; - } - } - else - crop->selections = crop->zones; - - /* Initialize regions iterator i */ - i = 0; - for (int j = 0; j < crop->zones; j++) - { - seg = crop->zonelist[j].position; - total = crop->zonelist[j].total; - - /* check for not allowed zone cases like 0:0; 4:3; or negative ones etc. - * and skip that input */ - if (crop->zonelist[j].position < 0 || crop->zonelist[j].total < 0) - { - TIFFError("getCropOffsets", - "Negative crop zone values %d:%d are not allowed, thus " - "skipped.", - crop->zonelist[j].position, crop->zonelist[j].total); - continue; - } - if (seg == 0 || total == 0 || seg > total) - { - TIFFError("getCropOffsets", - "Crop zone %d:%d is out of specification, thus skipped.", - seg, total); - continue; - } - - switch (crop->edge_ref) - { - case EDGE_LEFT: /* zones from left to right, length from top */ - zlength = offsets.crop_length; - crop->regionlist[i].y1 = offsets.starty; - crop->regionlist[i].y2 = offsets.endy; - - crop->regionlist[i].x1 = - offsets.startx + - (uint32_t)(offsets.crop_width * 1.0 * (seg - 1) / total); - /* FAULT: IMHO in the old code here, the calculation of x2 was - * based on wrong assumptions. The whole image was assumed and - * 'endy' and 'starty' are not respected anymore!*/ - /* NEW PROPOSED Code: Assumption: offsets are within image with - * top left corner as origin (0,0) and 'start' <= 'end'. */ - if (crop->regionlist[i].x1 > offsets.endx) - { - crop->regionlist[i].x1 = offsets.endx; - } - else if (crop->regionlist[i].x1 >= image->width) - { - crop->regionlist[i].x1 = image->width - 1; - } - - crop->regionlist[i].x2 = - offsets.startx + - (uint32_t)(offsets.crop_width * 1.0 * seg / total); - if (crop->regionlist[i].x2 > 0) - crop->regionlist[i].x2 = crop->regionlist[i].x2 - 1; - if (crop->regionlist[i].x2 < crop->regionlist[i].x1) - { - crop->regionlist[i].x2 = crop->regionlist[i].x1; - } - else if (crop->regionlist[i].x2 > offsets.endx) - { - crop->regionlist[i].x2 = offsets.endx; - } - else if (crop->regionlist[i].x2 >= image->width) - { - crop->regionlist[i].x2 = image->width - 1; - } - zwidth = crop->regionlist[i].x2 - crop->regionlist[i].x1 + 1; - - /* This is passed to extractCropZone or extractCompositeZones */ - crop->combined_length = (uint32_t)zlength; - if (crop->exp_mode == COMPOSITE_IMAGES) - crop->combined_width += (uint32_t)zwidth; - else - crop->combined_width = (uint32_t)zwidth; - - /* When the degrees clockwise rotation is 90 or 270, check the - * boundary */ - if (((crop->rotation == 90) || (crop->rotation == 270)) && - ((crop->combined_length > image->width) || - (crop->combined_width > image->length))) - { - TIFFError("getCropOffsets", - "The crop size exceeds the image boundary size"); - return -1; - } - - break; - case EDGE_BOTTOM: /* width from left, zones from bottom to top */ - zwidth = offsets.crop_width; - crop->regionlist[i].x1 = offsets.startx; - crop->regionlist[i].x2 = offsets.endx; - - /* FAULT: IMHO in the old code here, the calculation of y1/y2 - * was based on wrong assumptions. The whole image was assumed - * and 'endy' and 'starty' are not respected anymore!*/ - /* NEW PROPOSED Code: Assumption: offsets are within image with - * top left corner as origin (0,0) and 'start' <= 'end'. */ - uaux = (uint32_t)(offsets.crop_length * 1.0 * seg / total); - if (uaux <= offsets.endy + 1) - { - crop->regionlist[i].y1 = offsets.endy - uaux + 1; - } - else - { - crop->regionlist[i].y1 = 0; - } - if (crop->regionlist[i].y1 < offsets.starty) - { - crop->regionlist[i].y1 = offsets.starty; - } - - uaux = - (uint32_t)(offsets.crop_length * 1.0 * (seg - 1) / total); - if (uaux <= offsets.endy) - { - crop->regionlist[i].y2 = offsets.endy - uaux; - } - else - { - crop->regionlist[i].y2 = 0; - } - if (crop->regionlist[i].y2 < offsets.starty) - { - crop->regionlist[i].y2 = offsets.starty; - } - zlength = crop->regionlist[i].y2 - crop->regionlist[i].y1 + 1; - - /* This is passed to extractCropZone or extractCompositeZones */ - if (crop->exp_mode == COMPOSITE_IMAGES) - crop->combined_length += (uint32_t)zlength; - else - crop->combined_length = (uint32_t)zlength; - crop->combined_width = (uint32_t)zwidth; - - /* When the degrees clockwise rotation is 90 or 270, check the - * boundary */ - if (((crop->rotation == 90) || (crop->rotation == 270)) && - ((crop->combined_length > image->width) || - (crop->combined_width > image->length))) - { - TIFFError("getCropOffsets", - "The crop size exceeds the image boundary size"); - return -1; - } - - break; - case EDGE_RIGHT: /* zones from right to left, length from top */ - zlength = offsets.crop_length; - crop->regionlist[i].y1 = offsets.starty; - crop->regionlist[i].y2 = offsets.endy; - - crop->regionlist[i].x1 = - offsets.startx + (uint32_t)(offsets.crop_width * - (total - seg) * 1.0 / total); - /* FAULT: IMHO from here on, the calculation of y2 are based on - * wrong assumptions. The whole image is assumed and 'endy' and - * 'starty' are not respected anymore!*/ - /* NEW PROPOSED Code: Assumption: offsets are within image with - * top left corner as origin (0,0) and 'start' <= 'end'. */ - uaux = (uint32_t)(offsets.crop_width * 1.0 * seg / total); - if (uaux <= offsets.endx + 1) - { - crop->regionlist[i].x1 = offsets.endx - uaux + 1; - } - else - { - crop->regionlist[i].x1 = 0; - } - if (crop->regionlist[i].x1 < offsets.startx) - { - crop->regionlist[i].x1 = offsets.startx; - } - - uaux = (uint32_t)(offsets.crop_width * 1.0 * (seg - 1) / total); - if (uaux <= offsets.endx) - { - crop->regionlist[i].x2 = offsets.endx - uaux; - } - else - { - crop->regionlist[i].x2 = 0; - } - if (crop->regionlist[i].x2 < offsets.startx) - { - crop->regionlist[i].x2 = offsets.startx; - } - zwidth = crop->regionlist[i].x2 - crop->regionlist[i].x1 + 1; - - /* This is passed to extractCropZone or extractCompositeZones */ - crop->combined_length = (uint32_t)zlength; - if (crop->exp_mode == COMPOSITE_IMAGES) - crop->combined_width += (uint32_t)zwidth; - else - crop->combined_width = (uint32_t)zwidth; - - /* When the degrees clockwise rotation is 90 or 270, check the - * boundary */ - if (((crop->rotation == 90) || (crop->rotation == 270)) && - ((crop->combined_length > image->width) || - (crop->combined_width > image->length))) - { - TIFFError("getCropOffsets", - "The crop size exceeds the image boundary size"); - return -1; - } - - break; - case EDGE_TOP: /* width from left, zones from top to bottom */ - default: - zwidth = offsets.crop_width; - crop->regionlist[i].x1 = offsets.startx; - crop->regionlist[i].x2 = offsets.endx; - - crop->regionlist[i].y1 = - offsets.starty + - (uint32_t)(offsets.crop_length * 1.0 * (seg - 1) / total); - if (crop->regionlist[i].y1 > offsets.endy) - { - crop->regionlist[i].y1 = offsets.endy; - } - else if (crop->regionlist[i].y1 >= image->length) - { - crop->regionlist[i].y1 = image->length - 1; - } - - /* FAULT: IMHO from here on, the calculation of y2 are based on - * wrong assumptions. The whole image is assumed and 'endy' and - * 'starty' are not respected anymore!*/ - /* OLD Code: - test = offsets.starty + (uint32_t)(offsets.crop_length * 1.0 * - seg / total); if (test < 1 ) crop->regionlist[i].y2 = 0; else - { - if (test > (int32_t)(image->length - 1)) - crop->regionlist[i].y2 = image->length - 1; - else - crop->regionlist[i].y2 = test - 1; - } - */ - /* NEW PROPOSED Code: Assumption: offsets are within image with - * top left corner as origin (0,0) and 'start' <= 'end'. */ - crop->regionlist[i].y2 = - offsets.starty + - (uint32_t)(offsets.crop_length * 1.0 * seg / total); - if (crop->regionlist[i].y2 > 0) - crop->regionlist[i].y2 = crop->regionlist[i].y2 - 1; - if (crop->regionlist[i].y2 < crop->regionlist[i].y1) - { - crop->regionlist[i].y2 = crop->regionlist[i].y1; - } - else if (crop->regionlist[i].y2 > offsets.endy) - { - crop->regionlist[i].y2 = offsets.endy; - } - else if (crop->regionlist[i].y2 >= image->length) - { - crop->regionlist[i].y2 = image->length - 1; - } - - zlength = crop->regionlist[i].y2 - crop->regionlist[i].y1 + 1; - - /* This is passed to extractCropZone or extractCompositeZones */ - if (crop->exp_mode == COMPOSITE_IMAGES) - crop->combined_length += (uint32_t)zlength; - else - crop->combined_length = (uint32_t)zlength; - crop->combined_width = (uint32_t)zwidth; - - /* When the degrees clockwise rotation is 90 or 270, check the - * boundary */ - if (((crop->rotation == 90) || (crop->rotation == 270)) && - ((crop->combined_length > image->width) || - (crop->combined_width > image->length))) - { - TIFFError("getCropOffsets", - "The crop size exceeds the image boundary size"); - return -1; - } - - break; - } /* end switch statement */ - - buffsize = (uint32_t)((((zwidth * image->bps * image->spp) + 7) / 8) * - (zlength + 1)); - crop->regionlist[i].width = (uint32_t)zwidth; - crop->regionlist[i].length = (uint32_t)zlength; - crop->regionlist[i].buffsize = buffsize; - crop->bufftotal += buffsize; - - if (dump->outfile != NULL) - dump_info(dump->outfile, dump->format, "", - "Zone %d, width: %4" PRIu32 ", length: %4" PRIu32 - ", x1: %4" PRIu32 " x2: %4" PRIu32 " y1: %4" PRIu32 - " y2: %4" PRIu32, - i + 1, zwidth, zlength, crop->regionlist[i].x1, - crop->regionlist[i].x2, crop->regionlist[i].y1, - crop->regionlist[i].y2); - /* increment regions iterator */ - i++; - } - /* set number of generated regions out of given zones */ - crop->selections = i; - return (0); -} /* end getCropOffsets */ - -static int computeOutputPixelOffsets(struct crop_mask *crop, - struct image_data *image, - struct pagedef *page, - struct pageseg *sections, - struct dump_opts *dump) -{ - double scale; - double pwidth, plength; /* Output page width and length in user units*/ - uint32_t iwidth, ilength; /* Input image width and length in pixels*/ - uint32_t owidth, olength; /* Output image width and length in pixels*/ - uint32_t orows, ocols; /* rows and cols for output */ - uint32_t hmargin, vmargin; /* Horizontal and vertical margins */ - uint32_t x1, x2, y1, y2, line_bytes; - /* unsigned int orientation; */ - uint32_t i, j, k; - - scale = 1.0; - if (page->res_unit == RESUNIT_NONE) - page->res_unit = image->res_unit; - - switch (image->res_unit) - { - case RESUNIT_CENTIMETER: - if (page->res_unit == RESUNIT_INCH) - scale = 1.0 / 2.54; - break; - case RESUNIT_INCH: - if (page->res_unit == RESUNIT_CENTIMETER) - scale = 2.54; - break; - case RESUNIT_NONE: /* Dimensions in pixels */ - default: - break; - } - - /* get width, height, resolutions of input image selection */ - if (crop->combined_width > 0) - iwidth = crop->combined_width; - else - iwidth = image->width; - if (crop->combined_length > 0) - ilength = crop->combined_length; - else - ilength = image->length; - - if (page->hres <= 1.0) - page->hres = image->xres; - if (page->vres <= 1.0) - page->vres = image->yres; - - if ((page->hres < 1.0) || (page->vres < 1.0)) - { - TIFFError("computeOutputPixelOffsets", - "Invalid horizontal or vertical resolution specified or read " - "from input image"); - return (1); - } - - /* If no page sizes are being specified, we just use the input image size to - * calculate maximum margins that can be taken from image. - */ - if (page->width <= 0) - pwidth = iwidth; - else - pwidth = page->width; - - if (page->length <= 0) - plength = ilength; - else - plength = page->length; - - if (dump->debug) - { - TIFFError("", - "Page size: %s, Vres: %3.2f, Hres: %3.2f, " - "Hmargin: %3.2f, Vmargin: %3.2f", - page->name, page->vres, page->hres, page->hmargin, - page->vmargin); - TIFFError("", - "Res_unit: %" PRIu16 - ", Scale: %3.2f, Page width: %3.2f, length: %3.2f", - page->res_unit, scale, pwidth, plength); - } - - /* compute margins at specified unit and resolution */ - if (page->mode & PAGE_MODE_MARGINS) - { - if (page->res_unit == RESUNIT_INCH || - page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ - hmargin = _TIFFClampDoubleToUInt32( - page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); - vmargin = _TIFFClampDoubleToUInt32( - page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ - hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * - ((image->bps + 7) / 8)); - vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * - ((image->bps + 7) / 8)); - } - - if (hmargin == 0xFFFFFFFFU || (hmargin * 2.0) > (pwidth * page->hres)) - { - TIFFError("computeOutputPixelOffsets", - "Combined left and right margins exceed page width"); - hmargin = (uint32_t)0; - return (-1); - } - if (vmargin == 0xFFFFFFFFU || (vmargin * 2.0) > (plength * page->vres)) - { - TIFFError("computeOutputPixelOffsets", - "Combined top and bottom margins exceed page length"); - vmargin = (uint32_t)0; - return (-1); - } - } - else - { - hmargin = 0; - vmargin = 0; - } - - if (page->mode & PAGE_MODE_ROWSCOLS) - { - /* Maybe someday but not for now */ - if (page->mode & PAGE_MODE_MARGINS) - TIFFError( - "computeOutputPixelOffsets", - "Output margins cannot be specified with rows and columns"); - - owidth = TIFFhowmany(iwidth, page->cols); - olength = TIFFhowmany(ilength, page->rows); - } - else - { - if (page->mode & PAGE_MODE_PAPERSIZE) - { - owidth = - _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); - olength = _TIFFClampDoubleToUInt32((plength * page->vres) - - (vmargin * 2)); - } - else - { - owidth = - _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); - olength = - _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - - if (owidth > iwidth) - owidth = iwidth; - if (olength > ilength) - olength = ilength; - - if (owidth == 0 || olength == 0) - { - TIFFError("computeOutputPixelOffsets", - "Integer overflow when calculating the number of pages"); - exit(EXIT_FAILURE); - } - - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { - case ORIENTATION_NONE: - case ORIENTATION_PORTRAIT: - ocols = TIFFhowmany(iwidth, owidth); - orows = TIFFhowmany(ilength, olength); - /* orientation = ORIENTATION_PORTRAIT; */ - break; - - case ORIENTATION_LANDSCAPE: - ocols = TIFFhowmany(iwidth, olength); - orows = TIFFhowmany(ilength, owidth); - x1 = olength; - olength = owidth; - owidth = x1; - /* orientation = ORIENTATION_LANDSCAPE; */ - break; - - case ORIENTATION_AUTO: - default: - x1 = TIFFhowmany(iwidth, owidth); - x2 = TIFFhowmany(ilength, olength); - y1 = TIFFhowmany(iwidth, olength); - y2 = TIFFhowmany(ilength, owidth); - - if ((x1 * x2) < (y1 * y2)) - { /* Portrait */ - ocols = x1; - orows = x2; - /* orientation = ORIENTATION_PORTRAIT; */ - } - else - { /* Landscape */ - ocols = y1; - orows = y2; - x1 = olength; - olength = owidth; - owidth = x1; - /* orientation = ORIENTATION_LANDSCAPE; */ - } - } - - if (ocols < 1) - ocols = 1; - if (orows < 1) - orows = 1; - - /* Always return rows and cols from calculation above. - * (correct values needed external to this function) - * Warn, if user input settings has been changed. - */ - - if ((page->rows > 0) && (page->rows != orows)) - { - TIFFError("computeOutputPixelOffsets", - "Number of user input section rows down (%" PRIu32 - ") was changed to (%" PRIu32 ")", - page->rows, orows); - } - page->rows = orows; - if ((page->cols > 0) && (page->cols != ocols)) - { - TIFFError("computeOutputPixelOffsets", - "Number of user input section cols across (%" PRIu32 - ") was changed to (%" PRIu32 ")", - page->cols, ocols); - } - page->cols = ocols; - - line_bytes = TIFFhowmany8(owidth * image->spp * image->bps); - - if ((orows * ocols) > MAX_SECTIONS) - { - TIFFError("computeOutputPixelOffsets", - "Rows and Columns exceed maximum sections\nIncrease " - "resolution or reduce sections"); - return (-1); - } - - /* build the list of offsets for each output section */ - for (k = 0, i = 0; i < orows; i++) - { - y1 = (uint32_t)(olength * i); - y2 = (uint32_t)(olength * (i + 1) - 1); - if (y2 >= ilength) - y2 = ilength - 1; - for (j = 0; (j < ocols) && (k < MAX_SECTIONS); j++, k++) - { - x1 = (uint32_t)(owidth * j); - x2 = (uint32_t)(owidth * (j + 1) - 1); - if (x2 >= iwidth) - x2 = iwidth - 1; - sections[k].x1 = x1; - sections[k].x2 = x2; - sections[k].y1 = y1; - sections[k].y2 = y2; - sections[k].buffsize = line_bytes * olength; - sections[k].position = k + 1; - sections[k].total = orows * ocols; - } - } - return (0); -} /* end computeOutputPixelOffsets */ - -static int loadImage(TIFF *in, struct image_data *image, struct dump_opts *dump, - unsigned char **read_ptr) -{ - uint32_t i; - float xres = 0.0, yres = 0.0; - uint32_t nstrips = 0, ntiles = 0; - uint16_t planar = 0; - uint16_t bps = 0, spp = 0, res_unit = 0; - uint16_t orientation = 0; - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; - tmsize_t stsize = 0, tlsize = 0, buffsize = 0; - tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ - tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - int readunit = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); - TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &planar); - TIFFGetFieldDefaulted(in, TIFFTAG_ORIENTATION, &orientation); - if (!TIFFGetFieldDefaulted(in, TIFFTAG_PHOTOMETRIC, &input_photometric)) - TIFFError("loadImage", "Image lacks Photometric interpretation tag"); - if (!TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width)) - TIFFError("loadimage", "Image lacks image width tag"); - if (!TIFFGetField(in, TIFFTAG_IMAGELENGTH, &length)) - TIFFError("loadimage", "Image lacks image length tag"); - TIFFGetFieldDefaulted(in, TIFFTAG_XRESOLUTION, &xres); - TIFFGetFieldDefaulted(in, TIFFTAG_YRESOLUTION, &yres); - if (!TIFFGetFieldDefaulted(in, TIFFTAG_RESOLUTIONUNIT, &res_unit)) - res_unit = RESUNIT_INCH; - if (!TIFFGetField(in, TIFFTAG_COMPRESSION, &input_compression)) - input_compression = COMPRESSION_NONE; - -#ifdef DEBUG2 - char compressionid[16]; - - switch (input_compression) - { - case COMPRESSION_NONE: /* 1 dump mode */ - strcpy(compressionid, "None/dump"); - break; - case COMPRESSION_CCITTRLE: /* 2 CCITT modified Huffman RLE */ - strcpy(compressionid, "Huffman RLE"); - break; - case COMPRESSION_CCITTFAX3: /* 3 CCITT Group 3 fax encoding */ - strcpy(compressionid, "Group3 Fax"); - break; - case COMPRESSION_CCITTFAX4: /* 4 CCITT Group 4 fax encoding */ - strcpy(compressionid, "Group4 Fax"); - break; - case COMPRESSION_LZW: /* 5 Lempel-Ziv & Welch */ - strcpy(compressionid, "LZW"); - break; - case COMPRESSION_OJPEG: /* 6 !6.0 JPEG */ - strcpy(compressionid, "Old Jpeg"); - break; - case COMPRESSION_JPEG: /* 7 %JPEG DCT compression */ - strcpy(compressionid, "New Jpeg"); - break; - case COMPRESSION_NEXT: /* 32766 NeXT 2-bit RLE */ - strcpy(compressionid, "Next RLE"); - break; - case COMPRESSION_CCITTRLEW: /* 32771 #1 w/ word alignment */ - strcpy(compressionid, "CITTRLEW"); - break; - case COMPRESSION_PACKBITS: /* 32773 Macintosh RLE */ - strcpy(compressionid, "Mac Packbits"); - break; - case COMPRESSION_THUNDERSCAN: /* 32809 ThunderScan RLE */ - strcpy(compressionid, "Thunderscan"); - break; - case COMPRESSION_IT8CTPAD: /* 32895 IT8 CT w/padding */ - strcpy(compressionid, "IT8 padded"); - break; - case COMPRESSION_IT8LW: /* 32896 IT8 Linework RLE */ - strcpy(compressionid, "IT8 RLE"); - break; - case COMPRESSION_IT8MP: /* 32897 IT8 Monochrome picture */ - strcpy(compressionid, "IT8 mono"); - break; - case COMPRESSION_IT8BL: /* 32898 IT8 Binary line art */ - strcpy(compressionid, "IT8 lineart"); - break; - case COMPRESSION_PIXARFILM: /* 32908 Pixar companded 10bit LZW */ - strcpy(compressionid, "Pixar 10 bit"); - break; - case COMPRESSION_PIXARLOG: /* 32909 Pixar companded 11bit ZIP */ - strcpy(compressionid, "Pixar 11bit"); - break; - case COMPRESSION_DEFLATE: /* 32946 Deflate compression */ - strcpy(compressionid, "Deflate"); - break; - case COMPRESSION_ADOBE_DEFLATE: /* 8 Deflate compression */ - strcpy(compressionid, "Adobe deflate"); - break; - default: - strcpy(compressionid, "None/unknown"); - break; - } - TIFFError("loadImage", "Input compression %s", compressionid); -#endif - - scanlinesize = TIFFScanlineSize(in); - image->bps = bps; - image->spp = spp; - image->planar = planar; - image->width = width; - image->length = length; - image->xres = xres; - image->yres = yres; - image->res_unit = res_unit; - image->compression = input_compression; - image->photometric = input_photometric; -#ifdef DEBUG2 - char photometricid[12]; - - switch (input_photometric) - { - case PHOTOMETRIC_MINISWHITE: - strcpy(photometricid, "MinIsWhite"); - break; - case PHOTOMETRIC_MINISBLACK: - strcpy(photometricid, "MinIsBlack"); - break; - case PHOTOMETRIC_RGB: - strcpy(photometricid, "RGB"); - break; - case PHOTOMETRIC_PALETTE: - strcpy(photometricid, "Palette"); - break; - case PHOTOMETRIC_MASK: - strcpy(photometricid, "Mask"); - break; - case PHOTOMETRIC_SEPARATED: - strcpy(photometricid, "Separated"); - break; - case PHOTOMETRIC_YCBCR: - strcpy(photometricid, "YCBCR"); - break; - case PHOTOMETRIC_CIELAB: - strcpy(photometricid, "CIELab"); - break; - case PHOTOMETRIC_ICCLAB: - strcpy(photometricid, "ICCLab"); - break; - case PHOTOMETRIC_ITULAB: - strcpy(photometricid, "ITULab"); - break; - case PHOTOMETRIC_LOGL: - strcpy(photometricid, "LogL"); - break; - case PHOTOMETRIC_LOGLUV: - strcpy(photometricid, "LOGLuv"); - break; - default: - strcpy(photometricid, "Unknown"); - break; - } - TIFFError("loadImage", "Input photometric interpretation %s", - photometricid); - -#endif - image->orientation = orientation; - switch (orientation) - { - case 0: - case ORIENTATION_TOPLEFT: - image->adjustments = 0; - break; - case ORIENTATION_TOPRIGHT: - image->adjustments = MIRROR_HORIZ; - break; - case ORIENTATION_BOTRIGHT: - image->adjustments = ROTATECW_180; - break; - case ORIENTATION_BOTLEFT: - image->adjustments = MIRROR_VERT; - break; - case ORIENTATION_LEFTTOP: - image->adjustments = MIRROR_VERT | ROTATECW_90; - break; - case ORIENTATION_RIGHTTOP: - image->adjustments = ROTATECW_90; - break; - case ORIENTATION_RIGHTBOT: - image->adjustments = MIRROR_VERT | ROTATECW_270; - break; - case ORIENTATION_LEFTBOT: - image->adjustments = ROTATECW_270; - break; - default: - image->adjustments = 0; - image->orientation = ORIENTATION_TOPLEFT; - } - - if ((bps == 0) || (spp == 0)) - { - TIFFError("loadImage", - "Invalid samples per pixel (%" PRIu16 - ") or bits per sample (%" PRIu16 ")", - spp, bps); - return (-1); - } - - if (TIFFIsTiled(in)) - { - readunit = TILE; - tlsize = TIFFTileSize(in); - ntiles = TIFFNumberOfTiles(in); - TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); - - tile_rowsize = TIFFTileRowSize(in); - if (ntiles == 0 || tlsize == 0 || tile_rowsize == 0) - { - TIFFError("loadImage", - "File appears to be tiled, but the number of tiles, tile " - "size, or tile rowsize is zero."); - exit(EXIT_FAILURE); - } - if (ntiles != 0 && tlsize > (tmsize_t)(TIFF_TMSIZE_T_MAX / ntiles)) - { - TIFFError("loadImage", - "Integer overflow when calculating buffer size"); - exit(EXIT_FAILURE); - } - buffsize = tlsize * ntiles; - - if (tl != 0 && ntiles != 0 && - tile_rowsize > (tmsize_t)(TIFF_TMSIZE_T_MAX / tl / ntiles)) - { - TIFFError("loadImage", - "Integer overflow when calculating buffer size"); - exit(EXIT_FAILURE); - } - if (buffsize < (tmsize_t)(ntiles * tl * tile_rowsize)) - { - buffsize = ntiles * tl * tile_rowsize; - -#ifdef DEBUG2 - TIFFError("loadImage", - "Tilesize %" PRIu32 " is too small, using ntiles * " - "tilelength * tilerowsize %" PRIu32, - tlsize, buffsize); -#endif - } - - if (dump->infile != NULL) - dump_info(dump->infile, dump->format, "", - "Tilesize: %" TIFF_SSIZE_FORMAT - ", Number of Tiles: %" PRIu32 - ", Tile row size: %" TIFF_SSIZE_FORMAT, - tlsize, ntiles, tile_rowsize); - } - else - { - tmsize_t buffsize_check; - readunit = STRIP; - TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - stsize = TIFFStripSize(in); - nstrips = TIFFNumberOfStrips(in); - if (nstrips == 0 || stsize == 0) - { - TIFFError("loadImage", "File appears to be striped, but the number " - "of stipes or stripe size is zero."); - exit(EXIT_FAILURE); - } - - if (nstrips != 0 && stsize > (tmsize_t)(TIFF_TMSIZE_T_MAX / nstrips)) - { - TIFFError("loadImage", - "Integer overflow when calculating buffer size"); - exit(EXIT_FAILURE); - } - buffsize = stsize * nstrips; - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). - * Furthermore, functions like extractContigSamplesShifted32bits() - * need a buffer, which is at least 3 bytes larger than the actual - * image. Otherwise buffer-overflow might occur there. - */ - if ((spp != 0 && bps != 0 && - width > (uint32_t)((UINT32_MAX - 7) / spp / bps)) || - (width != 0 && spp != 0 && bps != 0 && - length > (tmsize_t)(TIFF_TMSIZE_T_MAX / - (uint32_t)(((width * spp * bps) + 7) / 8)))) - { - TIFFError("loadImage", "Integer overflow detected."); - exit(EXIT_FAILURE); - } - buffsize_check = - (tmsize_t)length * (uint32_t)(((width * spp * bps) + 7) / 8); - if (buffsize < buffsize_check) - { - buffsize = buffsize_check; -#ifdef DEBUG2 - TIFFError("loadImage", - "Stripsize %" PRIu32 " is too small, using imagelength * " - "width * spp * bps / 8 = %" PRIu32, - stsize, (unsigned long)buffsize); -#endif - } - - if (dump->infile != NULL) - dump_info(dump->infile, dump->format, "", - "Stripsize: %" TIFF_SSIZE_FORMAT - ", Number of Strips: %" PRIu32 - ", Rows per Strip: %" PRIu32 - ", Scanline size: %" TIFF_SSIZE_FORMAT, - stsize, nstrips, rowsperstrip, scanlinesize); - } - - if (input_compression == COMPRESSION_JPEG) - { /* Force conversion to RGB */ - TIFFSetField(in, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - } - /* The clause up to the read statement is taken from Tom Lane's tiffcp patch - */ - else - { /* Otherwise, can't handle subsampled input */ - if (input_photometric == PHOTOMETRIC_YCBCR) - { - TIFFGetFieldDefaulted(in, TIFFTAG_YCBCRSUBSAMPLING, - &subsampling_horiz, &subsampling_vert); - if (subsampling_horiz != 1 || subsampling_vert != 1) - { - TIFFError("loadImage", - "Can't copy/convert subsampled image with " - "subsampling %" PRIu16 " horiz %" PRIu16 " vert", - subsampling_horiz, subsampling_vert); - return (-1); - } - } - } - - read_buff = *read_ptr; - /* +3 : add a few guard bytes since reverseSamples16bits() can read a bit - * outside buffer */ - /* Reuse of read_buff from previous image is quite unsafe, because other - * functions (like rotateImage() etc.) reallocate that buffer with different - * size without updating the local prev_readsize value. */ - if (read_buff) - { - _TIFFfree(read_buff); - } - if (buffsize > 0xFFFFFFFFU - 3) - { - TIFFError("loadImage", "Required read buffer size too large"); - return (-1); - } - read_buff = - (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!read_buff) - { - TIFFError("loadImage", "Unable to allocate read buffer"); - return (-1); - } - check_buffsize = buffsize + NUM_BUFF_OVERSIZE_BYTES; - - read_buff[buffsize] = 0; - read_buff[buffsize + 1] = 0; - read_buff[buffsize + 2] = 0; - - *read_ptr = read_buff; - - /* N.B. The read functions used copy separate plane data into a buffer as - * interleaved samples rather than separate planes so the same logic works - * to extract regions regardless of the way the data are organized in the - * input file. - */ - switch (readunit) - { - case STRIP: - if (planar == PLANARCONFIG_CONTIG) - { - if (!(readContigStripsIntoBuffer(in, read_buff))) - { - TIFFError("loadImage", - "Unable to read contiguous strips into buffer"); - return (-1); - } - } - else - { - if (!(readSeparateStripsIntoBuffer(in, read_buff, length, width, - spp, dump))) - { - TIFFError("loadImage", - "Unable to read separate strips into buffer"); - return (-1); - } - } - break; - - case TILE: - if (planar == PLANARCONFIG_CONTIG) - { - if (!(readContigTilesIntoBuffer(in, read_buff, length, width, - tw, tl, spp, bps))) - { - TIFFError("loadImage", - "Unable to read contiguous tiles into buffer"); - return (-1); - } - } - else - { - if (!(readSeparateTilesIntoBuffer(in, read_buff, length, width, - tw, tl, spp, bps))) - { - TIFFError("loadImage", - "Unable to read separate tiles into buffer"); - return (-1); - } - } - break; - default: - TIFFError("loadImage", "Unsupported image file format"); - return (-1); - break; - } - if ((dump->infile != NULL) && (dump->level == 2)) - { - dump_info(dump->infile, dump->format, "loadImage", - "Image width %" PRIu32 ", length %" PRIu32 - ", Raw image data, %4" TIFF_SSIZE_FORMAT " bytes", - width, length, buffsize); - dump_info(dump->infile, dump->format, "", - "Bits per sample %" PRIu16 ", Samples per pixel %" PRIu16, - bps, spp); - - if ((uint64_t)scanlinesize > 0x0ffffffffULL) - { - dump_info( - dump->infile, dump->format, "loadImage", - "Attention: scanlinesize %" PRIu64 - " is larger than UINT32_MAX.\nFollowing dump might be wrong.", - (uint64_t)scanlinesize); - } - for (i = 0; i < length; i++) - /* Apparently, the scanlinesize test above was accepted to fail. - * Thus silence Coverity Scan warning because this seems to be - * intentional. */ - /* coverity[overflow_sink:SUPPRESS] */ - dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -} /* end loadImage */ - -static int correct_orientation(struct image_data *image, - unsigned char **work_buff_ptr) -{ - uint16_t mirror, rotation; - unsigned char *work_buff; - - work_buff = *work_buff_ptr; - if ((image == NULL) || (work_buff == NULL)) - { - TIFFError("correct_orientatin", "Invalid image or buffer pointer"); - return (-1); - } - - if ((image->adjustments & MIRROR_HORIZ) || - (image->adjustments & MIRROR_VERT)) - { - mirror = (uint16_t)(image->adjustments & MIRROR_BOTH); - if (mirrorImage(image->spp, image->bps, mirror, image->width, - image->length, work_buff)) - { - TIFFError("correct_orientation", "Unable to mirror image"); - return (-1); - } - } - - if (image->adjustments & ROTATE_ANY) - { - if (image->adjustments & ROTATECW_90) - rotation = (uint16_t)90; - else if (image->adjustments & ROTATECW_180) - rotation = (uint16_t)180; - else if (image->adjustments & ROTATECW_270) - rotation = (uint16_t)270; - else - { - TIFFError("correct_orientation", "Invalid rotation value: %" PRIu16, - (uint16_t)(image->adjustments & ROTATE_ANY)); - return (-1); - } - /* Dummy variable in order not to switch two times the - * image->width,->length within rotateImage(), - * but switch xres, yres there. */ - uint32_t width = image->width; - uint32_t length = image->length; - if (rotateImage(rotation, image, &width, &length, work_buff_ptr, NULL, - TRUE)) - { - TIFFError("correct_orientation", "Unable to rotate image"); - return (-1); - } - image->orientation = ORIENTATION_TOPLEFT; - } - - return (0); -} /* end correct_orientation */ - -/* Extract multiple zones from an image and combine into a single composite - * image */ -static int extractCompositeRegions(struct image_data *image, - struct crop_mask *crop, - unsigned char *read_buff, - unsigned char *crop_buff) -{ - int shift_width, bytes_per_sample, bytes_per_pixel; - uint32_t i, trailing_bits, prev_trailing_bits; - uint32_t row, first_row, last_row, first_col, last_col; - uint32_t src_rowsize, dst_rowsize, src_offset, dst_offset; - uint32_t crop_width, crop_length, img_width /*, img_length */; - uint32_t prev_length, prev_width, composite_width; - uint16_t bps, spp; - uint8_t *src, *dst; - tsample_t count, sample = 0; /* Update to extract one or more samples */ - - img_width = image->width; - /* img_length = image->length; */ - bps = image->bps; - spp = image->spp; - count = spp; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if ((bps % 8) == 0) - shift_width = 0; - else - { - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - } - src = read_buff; - dst = crop_buff; - - /* These are setup for adding additional sections */ - prev_width = prev_length = 0; - prev_trailing_bits = trailing_bits = 0; - composite_width = crop->combined_width; - crop->combined_width = 0; - crop->combined_length = 0; - - /* If there is more than one region, check beforehand whether all the width - * and length values of the regions are the same, respectively. */ - switch (crop->edge_ref) - { - default: - case EDGE_TOP: - case EDGE_BOTTOM: - for (i = 1; i < crop->selections; i++) - { - uint32_t crop_width0 = - crop->regionlist[i - 1].x2 - crop->regionlist[i - 1].x1 + 1; - uint32_t crop_width1 = - crop->regionlist[i].x2 - crop->regionlist[i].x1 + 1; - if (crop_width0 != crop_width1) - { - TIFFError("extractCompositeRegions", - "Only equal width regions can be combined for -E " - "top or bottom"); - return (1); - } - } - break; - case EDGE_LEFT: - case EDGE_RIGHT: - for (i = 1; i < crop->selections; i++) - { - uint32_t crop_length0 = - crop->regionlist[i - 1].y2 - crop->regionlist[i - 1].y1 + 1; - uint32_t crop_length1 = - crop->regionlist[i].y2 - crop->regionlist[i].y1 + 1; - if (crop_length0 != crop_length1) - { - TIFFError("extractCompositeRegions", - "Only equal length regions can be combined for " - "-E left or right"); - return (1); - } - } - } - - for (i = 0; i < crop->selections; i++) - { - /* rows, columns, width, length are expressed in pixels */ - first_row = crop->regionlist[i].y1; - last_row = crop->regionlist[i].y2; - first_col = crop->regionlist[i].x1; - last_col = crop->regionlist[i].x2; - - crop_width = last_col - first_col + 1; - crop_length = last_row - first_row + 1; - - /* These should not be needed for composite images */ - crop->regionlist[i].width = crop_width; - crop->regionlist[i].length = crop_length; - - src_rowsize = ((img_width * bps * spp) + 7) / 8; - dst_rowsize = (((crop_width * bps * count) + 7) / 8); - - switch (crop->edge_ref) - { - default: - case EDGE_TOP: - case EDGE_BOTTOM: - if ((crop->selections > i + 1) && - (crop_width != crop->regionlist[i + 1].width)) - { - TIFFError("extractCompositeRegions", - "Only equal width regions can be combined for -E " - "top or bottom"); - return (1); - } - - crop->combined_width = crop_width; - crop->combined_length += crop_length; - - for (row = first_row; row <= last_row; row++) - { - src_offset = row * src_rowsize; - dst_offset = (row - first_row) * dst_rowsize; - src = read_buff + src_offset; - dst = crop_buff + dst_offset + (prev_length * dst_rowsize); - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 1: - if (bps == 1) - { - if (extractContigSamplesShifted8bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - } - else if (extractContigSamplesShifted16bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 2: - if (extractContigSamplesShifted24bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 3: - case 4: - case 5: - if (extractContigSamplesShifted32bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - default: - TIFFError("extractCompositeRegions", - "Unsupported bit depth %" PRIu16, bps); - return (1); - } - } - prev_length += crop_length; - break; - case EDGE_LEFT: /* splice the pieces of each row together, side by - side */ - case EDGE_RIGHT: - if ((crop->selections > i + 1) && - (crop_length != crop->regionlist[i + 1].length)) - { - TIFFError("extractCompositeRegions", - "Only equal length regions can be combined for " - "-E left or right"); - return (1); - } - crop->combined_width += crop_width; - crop->combined_length = crop_length; - dst_rowsize = (((composite_width * bps * count) + 7) / 8); - trailing_bits = (crop_width * bps * count) % 8; - for (row = first_row; row <= last_row; row++) - { - src_offset = row * src_rowsize; - dst_offset = (row - first_row) * dst_rowsize; - src = read_buff + src_offset; - dst = crop_buff + dst_offset + prev_width; - - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 1: - if (bps == 1) - { - if (extractContigSamplesShifted8bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - } - else if (extractContigSamplesShifted16bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 2: - if (extractContigSamplesShifted24bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - case 3: - case 4: - case 5: - if (extractContigSamplesShifted32bits( - src, dst, img_width, sample, spp, bps, - count, first_col, last_col + 1, - prev_trailing_bits)) - { - TIFFError("extractCompositeRegions", - "Unable to extract row %" PRIu32, - row); - return (1); - } - break; - default: - TIFFError("extractCompositeRegions", - "Unsupported bit depth %" PRIu16, bps); - return (1); - } - } - prev_width += (crop_width * bps * count) / 8; - prev_trailing_bits += trailing_bits; - if (prev_trailing_bits > 7) - prev_trailing_bits -= 8; - break; - } - } - if (crop->combined_width != composite_width) - TIFFError("combineSeparateRegions", - "Combined width does not match composite width"); - - return (0); -} /* end extractCompositeRegions */ - -/* Copy a single region of input buffer to an output buffer. - * The read functions used copy separate plane data into a buffer - * as interleaved samples rather than separate planes so the same - * logic works to extract regions regardless of the way the data - * are organized in the input file. This function can be used to - * extract one or more samples from the input image by updating the - * parameters for starting sample and number of samples to copy in the - * fifth and eighth arguments of the call to extractContigSamples. - * They would be passed as new elements of the crop_mask struct. - */ - -static int extractSeparateRegion(struct image_data *image, - struct crop_mask *crop, - unsigned char *read_buff, - unsigned char *crop_buff, int region) -{ - int shift_width, prev_trailing_bits = 0; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t src_rowsize, dst_rowsize; - uint32_t row, first_row, last_row, first_col, last_col; - uint32_t src_offset, dst_offset; - uint32_t crop_width, crop_length, img_width /*, img_length */; - uint16_t bps, spp; - uint8_t *src, *dst; - tsample_t count, sample = 0; /* Update to extract more or more samples */ - - img_width = image->width; - /* img_length = image->length; */ - bps = image->bps; - spp = image->spp; - count = spp; - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if ((bps % 8) == 0) - shift_width = 0; /* Byte aligned data only */ - else - { - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - } - - /* rows, columns, width, length are expressed in pixels */ - first_row = crop->regionlist[region].y1; - last_row = crop->regionlist[region].y2; - first_col = crop->regionlist[region].x1; - last_col = crop->regionlist[region].x2; - - crop_width = last_col - first_col + 1; - crop_length = last_row - first_row + 1; - - crop->regionlist[region].width = crop_width; - crop->regionlist[region].length = crop_length; - - src = read_buff; - dst = crop_buff; - src_rowsize = ((img_width * bps * spp) + 7) / 8; - dst_rowsize = (((crop_width * bps * spp) + 7) / 8); - - for (row = first_row; row <= last_row; row++) - { - src_offset = row * src_rowsize; - dst_offset = (row - first_row) * dst_rowsize; - src = read_buff + src_offset; - dst = crop_buff + dst_offset; - - switch (shift_width) - { - case 0: - if (extractContigSamplesBytes(src, dst, img_width, sample, spp, - bps, count, first_col, - last_col + 1)) - { - TIFFError("extractSeparateRegion", - "Unable to extract row %" PRIu32, row); - return (1); - } - break; - case 1: - if (bps == 1) - { - if (extractContigSamplesShifted8bits( - src, dst, img_width, sample, spp, bps, count, - first_col, last_col + 1, prev_trailing_bits)) - { - TIFFError("extractSeparateRegion", - "Unable to extract row %" PRIu32, row); - return (1); - } - break; - } - else if (extractContigSamplesShifted16bits( - src, dst, img_width, sample, spp, bps, count, - first_col, last_col + 1, prev_trailing_bits)) - { - TIFFError("extractSeparateRegion", - "Unable to extract row %" PRIu32, row); - return (1); - } - break; - case 2: - if (extractContigSamplesShifted24bits( - src, dst, img_width, sample, spp, bps, count, first_col, - last_col + 1, prev_trailing_bits)) - { - TIFFError("extractSeparateRegion", - "Unable to extract row %" PRIu32, row); - return (1); - } - break; - case 3: - case 4: - case 5: - if (extractContigSamplesShifted32bits( - src, dst, img_width, sample, spp, bps, count, first_col, - last_col + 1, prev_trailing_bits)) - { - TIFFError("extractSeparateRegion", - "Unable to extract row %" PRIu32, row); - return (1); - } - break; - default: - TIFFError("extractSeparateRegion", - "Unsupported bit depth %" PRIu16, bps); - return (1); - } - } - - return (0); -} /* end extractSeparateRegion */ - -static int extractImageSection(struct image_data *image, - struct pageseg *section, unsigned char *src_buff, - unsigned char *sect_buff) -{ - unsigned char bytebuff1, bytebuff2; -#ifdef DEVELMODE - /* unsigned char *src, *dst; */ -#endif - - uint32_t img_width, img_rowsize; -#ifdef DEVELMODE - uint32_t img_length; -#endif - uint32_t j, shift1, trailing_bits; - uint32_t row, first_row, last_row, first_col, last_col; - uint32_t src_offset, dst_offset, row_offset, col_offset; - uint32_t offset1, full_bytes; - uint32_t sect_width; -#ifdef DEVELMODE - uint32_t sect_length; -#endif - uint16_t bps, spp; - -#ifdef DEVELMODE - int k; - unsigned char bitset; -#endif - - img_width = image->width; -#ifdef DEVELMODE - img_length = image->length; -#endif - bps = image->bps; - spp = image->spp; - -#ifdef DEVELMODE - /* src = src_buff; */ - /* dst = sect_buff; */ -#endif - src_offset = 0; - dst_offset = 0; - -#ifdef DEVELMODE - char bitarray[39]; -#endif - - /* rows, columns, width, length are expressed in pixels - * first_row, last_row, .. are index into image array starting at 0 to - * width-1, last_col shall be also extracted. */ - first_row = section->y1; - last_row = section->y2; - first_col = section->x1; - last_col = section->x2; - - sect_width = last_col - first_col + 1; -#ifdef DEVELMODE - sect_length = last_row - first_row + 1; -#endif - /* The read function loadImage() used copy separate plane data into a buffer - * as interleaved samples rather than separate planes so the same logic - * works to extract regions regardless of the way the data are organized in - * the input file. Furthermore, bytes and bits are arranged in buffer - * according to COMPRESSION=1 and FILLORDER=1 - */ - /* row size in full bytes of source image */ - img_rowsize = (((img_width * spp * bps) + 7) / 8); - /* number of COMPLETE bytes per row in section */ - full_bytes = (sect_width * spp * bps) / 8; - /* trailing bits within the last byte of destination buffer */ - trailing_bits = (sect_width * spp * bps) % 8; - -#ifdef DEVELMODE - TIFFError("", - "First row: %" PRIu32 ", last row: %" PRIu32 - ", First col: %" PRIu32 ", last col: %" PRIu32 "\n", - first_row, last_row, first_col, last_col); - TIFFError("", - "Image width: %" PRIu32 ", Image length: %" PRIu32 - ", bps: %" PRIu16 ", spp: %" PRIu16 "\n", - img_width, img_length, bps, spp); - TIFFError("", - "Sect width: %" PRIu32 ", Sect length: %" PRIu32 - ", full bytes: %" PRIu32 " trailing bits %" PRIu32 "\n", - sect_width, sect_length, full_bytes, trailing_bits); -#endif - - if ((bps % 8) == 0) - { - col_offset = (first_col * spp * bps) / 8; - for (row = first_row; row <= last_row; row++) - { - row_offset = row * img_rowsize; - src_offset = row_offset + col_offset; - -#ifdef DEVELMODE - TIFFError("", "Src offset: %8" PRIu32 ", Dst offset: %8" PRIu32, - src_offset, dst_offset); -#endif - if (((int64_t)src_offset + full_bytes) >= check_buffsize) - { - printf( - "Bad input. Preventing reading outside of input buffer.\n"); - return (-1); - } - _TIFFmemcpy(sect_buff + dst_offset, src_buff + src_offset, - full_bytes); - dst_offset += full_bytes; - } - } - else - { /* bps != 8 */ - shift1 = - ((first_col * spp * bps) % - 8); /* shift1 = bits to skip in the first byte of source buffer*/ - for (row = first_row; row <= last_row; row++) - { - /* pull out the first byte */ - row_offset = row * img_rowsize; - offset1 = row_offset + ((first_col * spp * bps) / - 8); /* offset1 = offset into source of byte - with first bits to be extracted */ - -#ifdef DEVELMODE - for (j = 0, k = 7; j < 8; j++, k--) - { - bitset = - *(src_buff + offset1) & (((unsigned char)1 << k)) ? 1 : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - sprintf(&bitarray[8], " "); - sprintf(&bitarray[9], " "); - for (j = 10, k = 7; j < 18; j++, k--) - { - bitset = *(src_buff + offset1 + full_bytes) & - (((unsigned char)1 << k)) - ? 1 - : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[18] = '\0'; - TIFFError( - "", - "Row: %3d Offset1: %" PRIu32 ", Shift1: %" PRIu32 - ", Offset2: %" PRIu32 ", Trailing_bits: %" PRIu32 "\n", - row, offset1, shift1, offset1 + full_bytes, trailing_bits); -#endif - - bytebuff1 = bytebuff2 = 0; - if (shift1 == 0) /* the region is byte and sample aligned */ - { - if (((int64_t)offset1 + full_bytes) >= check_buffsize) - { - printf("Bad input. Preventing reading outside of input " - "buffer.\n"); - return (-1); - } - _TIFFmemcpy(sect_buff + dst_offset, src_buff + offset1, - full_bytes); - -#ifdef DEVELMODE - TIFFError("", - " Aligned data src offset1: %8" PRIu32 - ", Dst offset: %8" PRIu32 "\n", - offset1, dst_offset); - sprintf(&bitarray[18], "\n"); - sprintf(&bitarray[19], "\t"); - for (j = 20, k = 7; j < 28; j++, k--) - { - bitset = - *(sect_buff + dst_offset) & (((unsigned char)1 << k)) - ? 1 - : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[28] = ' '; - bitarray[29] = ' '; -#endif - dst_offset += full_bytes; - - if (trailing_bits != 0) - { - /* Only copy higher bits of samples and mask lower bits of - * not wanted column samples to zero */ - if (((int64_t)offset1 + full_bytes) >= check_buffsize) - { - printf("Bad input. Preventing reading outside of input " - "buffer.\n"); - return (-1); - } - bytebuff2 = src_buff[offset1 + full_bytes] & - ((unsigned char)255 << (8 - trailing_bits)); - sect_buff[dst_offset] = bytebuff2; -#ifdef DEVELMODE - TIFFError("", - " Trailing bits src offset: %8" PRIu32 - ", Dst offset: %8" PRIu32 "\n", - offset1 + full_bytes, dst_offset); - for (j = 30, k = 7; j < 38; j++, k--) - { - bitset = *(sect_buff + dst_offset) & - (((unsigned char)1 << k)) - ? 1 - : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[38] = '\0'; - TIFFError("", - "\tFirst and last bytes before and after " - "masking:\n\t%s\n\n", - bitarray); -#endif - dst_offset++; - } - } - else /* each destination byte will have to be built from two source - bytes*/ - { -#ifdef DEVELMODE - TIFFError("", - " Unalligned data src offset: %8" PRIu32 - ", Dst offset: %8" PRIu32 "\n", - offset1, dst_offset); -#endif - for (j = 0; j <= full_bytes; j++) - { - /* Skip the first shift1 bits and shift the source up by - * shift1 bits before save to destination.*/ - /* Attention: src_buff size needs to be some bytes larger - * than image size, because could read behind image here. */ - if (((int64_t)offset1 + j + 1) >= check_buffsize) - { - printf("Bad input. Preventing reading outside of input " - "buffer.\n"); - return (-1); - } - bytebuff1 = - src_buff[offset1 + j] & ((unsigned char)255 >> shift1); - bytebuff2 = src_buff[offset1 + j + 1] & - ((unsigned char)255 << (8 - shift1)); - sect_buff[dst_offset + j] = - (bytebuff1 << shift1) | (bytebuff2 >> (8 - shift1)); - } -#ifdef DEVELMODE - sprintf(&bitarray[18], "\n"); - sprintf(&bitarray[19], "\t"); - for (j = 20, k = 7; j < 28; j++, k--) - { - bitset = - *(sect_buff + dst_offset) & (((unsigned char)1 << k)) - ? 1 - : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[28] = ' '; - bitarray[29] = ' '; -#endif - dst_offset += full_bytes; - - /* Copy the trailing_bits for the last byte in the destination - buffer. Could come from one or two bytes of the source - buffer. */ - if (trailing_bits != 0) - { -#ifdef DEVELMODE - TIFFError("", - " Trailing bits %4" PRIu32 - " src offset: %8" PRIu32 - ", Dst offset: %8" PRIu32 "\n", - trailing_bits, offset1 + full_bytes, dst_offset); -#endif - /* More than necessary bits are already copied into last - * destination buffer, only masking of last byte in - * destination buffer is necessary.*/ - sect_buff[dst_offset] &= - ((uint8_t)0xFF << (8 - trailing_bits)); - } -#ifdef DEVELMODE - sprintf(&bitarray[28], " "); - sprintf(&bitarray[29], " "); - for (j = 30, k = 7; j < 38; j++, k--) - { - bitset = - *(sect_buff + dst_offset) & (((unsigned char)1 << k)) - ? 1 - : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[38] = '\0'; - TIFFError("", - "\tFirst and last bytes before and after " - "masking:\n\t%s\n\n", - bitarray); -#endif - dst_offset++; - } - } - } - - return (0); -} /* end extractImageSection */ - -static int writeSelections(TIFF *in, TIFF **out, struct crop_mask *crop, - struct image_data *image, struct dump_opts *dump, - struct buffinfo seg_buffs[], char *mp, - char *filename, unsigned int *page, - unsigned int total_pages) -{ - int i, page_count; - int autoindex = 0; - unsigned char *crop_buff = NULL; - - /* Where we open a new file depends on the export mode */ - switch (crop->exp_mode) - { - case ONE_FILE_COMPOSITE: /* Regions combined into single image */ - autoindex = 0; - crop_buff = seg_buffs[0].buffer; - if (update_output_file(out, mp, autoindex, filename, page)) - return (1); - page_count = total_pages; - if (writeCroppedImage(in, *out, image, dump, crop->combined_width, - crop->combined_length, crop_buff, *page, - total_pages)) - { - TIFFError("writeRegions", "Unable to write new image"); - return (-1); - } - break; - case ONE_FILE_SEPARATED: /* Regions as separated images */ - autoindex = 0; - if (update_output_file(out, mp, autoindex, filename, page)) - return (1); - page_count = crop->selections * total_pages; - for (i = 0; i < crop->selections; i++) - { - crop_buff = seg_buffs[i].buffer; - if (writeCroppedImage(in, *out, image, dump, - crop->regionlist[i].width, - crop->regionlist[i].length, crop_buff, - *page, page_count)) - { - TIFFError("writeRegions", "Unable to write new image"); - return (-1); - } - } - break; - case FILE_PER_IMAGE_COMPOSITE: /* Regions as composite image */ - autoindex = 1; - if (update_output_file(out, mp, autoindex, filename, page)) - return (1); - - crop_buff = seg_buffs[0].buffer; - if (writeCroppedImage(in, *out, image, dump, crop->combined_width, - crop->combined_length, crop_buff, *page, - total_pages)) - { - TIFFError("writeRegions", "Unable to write new image"); - return (-1); - } - break; - case FILE_PER_IMAGE_SEPARATED: /* Regions as separated images */ - autoindex = 1; - page_count = crop->selections; - if (update_output_file(out, mp, autoindex, filename, page)) - return (1); - - for (i = 0; i < crop->selections; i++) - { - crop_buff = seg_buffs[i].buffer; - /* Write the current region to the current file */ - if (writeCroppedImage(in, *out, image, dump, - crop->regionlist[i].width, - crop->regionlist[i].length, crop_buff, - *page, page_count)) - { - TIFFError("writeRegions", "Unable to write new image"); - return (-1); - } - } - break; - case FILE_PER_SELECTION: - autoindex = 1; - page_count = 1; - for (i = 0; i < crop->selections; i++) - { - if (update_output_file(out, mp, autoindex, filename, page)) - return (1); - - crop_buff = seg_buffs[i].buffer; - /* Write the current region to the current file */ - if (writeCroppedImage(in, *out, image, dump, - crop->regionlist[i].width, - crop->regionlist[i].length, crop_buff, - *page, page_count)) - { - TIFFError("writeRegions", "Unable to write new image"); - return (-1); - } - } - break; - default: - return (1); - } - - return (0); -} /* end writeRegions */ - -static int writeImageSections(TIFF *in, TIFF *out, struct image_data *image, - struct pagedef *page, struct pageseg *sections, - struct dump_opts *dump, unsigned char *src_buff, - unsigned char **sect_buff_ptr) -{ - double hres, vres; - uint32_t i, k, width, length, sectsize; - unsigned char *sect_buff = *sect_buff_ptr; - - hres = page->hres; - vres = page->vres; - - k = page->cols * page->rows; - if ((k < 1) || (k > MAX_SECTIONS)) - { - TIFFError("writeImageSections", - "%" PRIu32 " Rows and Columns exceed maximum " - "sections\nIncrease resolution or reduce sections", - k); - return (-1); - } - - for (i = 0; i < k; i++) - { - width = sections[i].x2 - sections[i].x1 + 1; - length = sections[i].y2 - sections[i].y1 + 1; - sectsize = - (uint32_t)ceil((width * image->bps * image->spp + 7) / (double)8) * - length; - /* allocate a buffer if we don't have one already */ - if (createImageSection(sectsize, sect_buff_ptr)) - { - TIFFError("writeImageSections", - "Unable to allocate section buffer"); - exit(EXIT_FAILURE); - } - sect_buff = *sect_buff_ptr; - - if (extractImageSection(image, §ions[i], src_buff, sect_buff)) - { - TIFFError("writeImageSections", "Unable to extract image sections"); - exit(EXIT_FAILURE); - } - - /* call the write routine here instead of outside the loop */ - if (writeSingleSection(in, out, image, dump, width, length, hres, vres, - sect_buff)) - { - TIFFError("writeImageSections", "Unable to write image section"); - exit(EXIT_FAILURE); - } - } - - return (0); -} /* end writeImageSections */ - -/* Code in this function is heavily indebted to code in tiffcp - * with modifications by Richard Nolde to handle orientation correctly. - * It will have to be updated significantly if support is added to - * extract one or more samples from original image since the - * original code assumes we are always copying all samples. - */ -static int writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - struct dump_opts *dump, uint32_t width, - uint32_t length, double hres, double vres, - unsigned char *sect_buff) -{ - uint16_t bps, spp; - uint16_t input_compression, input_photometric; - uint16_t input_planar; - const struct cpTag *p; - - /* Calling this seems to reset the compression mode on the TIFF *in file. - TIFFGetField(in, TIFFTAG_JPEGCOLORMODE, &input_jpeg_colormode); - */ - input_compression = image->compression; - input_photometric = image->photometric; - - spp = image->spp; - bps = image->bps; - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, length); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bps); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp); - -#ifdef DEBUG2 - TIFFError("writeSingleSection", "Input compression: %s", - (input_compression == COMPRESSION_OJPEG) - ? "Old Jpeg" - : ((input_compression == COMPRESSION_JPEG) ? "New Jpeg" - : "Non Jpeg")); -#endif - /* This is the global variable compression which is set - * if the user has specified a command line option for - * a compression option. Should be passed around in one - * of the parameters instead of as a global. If no user - * option specified it will still be (uint16_t) -1. */ - if (compression != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - else - { /* OJPEG is no longer supported for writing so upgrade to JPEG */ - if (input_compression == COMPRESSION_OJPEG) - { - compression = COMPRESSION_JPEG; - jpegcolormode = JPEGCOLORMODE_RAW; - TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_JPEG); - } - else /* Use the compression from the input file */ - CopyField(TIFFTAG_COMPRESSION, compression); - } - - if (compression == COMPRESSION_JPEG) - { - if ((input_photometric == - PHOTOMETRIC_PALETTE) || /* color map indexed */ - (input_photometric == PHOTOMETRIC_MASK)) /* holdout mask */ - { - TIFFError("writeSingleSection", - "JPEG compression cannot be used with %s image data", - (input_photometric == PHOTOMETRIC_PALETTE) ? "palette" - : "mask"); - return (-1); - } - if (jpegcolormode == JPEGCOLORMODE_RGB && - input_photometric == PHOTOMETRIC_YCBCR) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - } - else if (jpegcolormode == -1 && input_photometric == PHOTOMETRIC_RGB) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); - } - else - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, input_photometric); - } - } - else - { - if (compression == COMPRESSION_SGILOG || - compression == COMPRESSION_SGILOG24) - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, - spp == 1 ? PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV); - else - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, image->photometric); - } - -#ifdef DEBUG2 - TIFFError("writeSingleSection", "Input photometric: %s", - (input_photometric == PHOTOMETRIC_RGB) - ? "RGB" - : ((input_photometric == PHOTOMETRIC_YCBCR) - ? "YCbCr" - : "Not RGB or YCbCr")); -#endif - - if (((input_photometric == PHOTOMETRIC_LOGL) || - (input_photometric == PHOTOMETRIC_LOGLUV)) && - ((compression != COMPRESSION_SGILOG) && - (compression != COMPRESSION_SGILOG24))) - { - TIFFError("writeSingleSection", "LogL and LogLuv source data require " - "SGI_LOG or SGI_LOG24 compression"); - return (-1); - } - - if (fillorder != 0) - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - else - CopyTag(TIFFTAG_FILLORDER, 1, TIFF_SHORT); - - /* The loadimage function reads input orientation and sets - * image->orientation. The correct_image_orientation function - * applies the required rotation and mirror operations to - * present the data in TOPLEFT orientation and updates - * image->orientation if any transforms are performed, - * as per EXIF standard. - */ - TIFFSetField(out, TIFFTAG_ORIENTATION, image->orientation); - - /* - * Choose tiles/strip for the output image according to - * the command line arguments (-tiles, -strips) and the - * structure of the input image. - */ - if (outtiled == -1) - outtiled = TIFFIsTiled(in); - if (outtiled) - { - /* - * Setup output file's tile width&height. If either - * is not specified, use either the value from the - * input image or, if nothing is defined, use the - * library default. - */ - if (tilewidth == (uint32_t)0) - TIFFGetField(in, TIFFTAG_TILEWIDTH, &tilewidth); - if (tilelength == (uint32_t)0) - TIFFGetField(in, TIFFTAG_TILELENGTH, &tilelength); - - if (tilewidth == 0 || tilelength == 0) - TIFFDefaultTileSize(out, &tilewidth, &tilelength); - TIFFDefaultTileSize(out, &tilewidth, &tilelength); - TIFFSetField(out, TIFFTAG_TILEWIDTH, tilewidth); - TIFFSetField(out, TIFFTAG_TILELENGTH, tilelength); - } - else - { - /* - * RowsPerStrip is left unspecified: use either the - * value from the input image or, if nothing is defined, - * use the library default. - */ - if (rowsperstrip == (uint32_t)0) - { - if (!TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip)) - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - if (compression != COMPRESSION_JPEG) - { - if (rowsperstrip > length) - rowsperstrip = length; - } - } - else if (rowsperstrip == (uint32_t)-1) - rowsperstrip = length; - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - } - - TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &input_planar); - if (config != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - else - CopyField(TIFFTAG_PLANARCONFIG, config); - if (spp <= 4) - CopyTag(TIFFTAG_TRANSFERFUNCTION, 4, TIFF_SHORT); - CopyTag(TIFFTAG_COLORMAP, 4, TIFF_SHORT); - - /* SMinSampleValue & SMaxSampleValue */ - switch (compression) - { - /* These are references to GLOBAL variables set by defaults - * and /or the compression flag - */ - case COMPRESSION_JPEG: - if (((bps % 8) == 0) || ((bps % 12) == 0)) - { - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - } - else - { - TIFFError("writeSingleSection", - "JPEG compression requires 8 or 12 bits per sample"); - return (-1); - } - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - else - CopyField(TIFFTAG_PREDICTOR, predictor); - break; - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - if (bps != 1) - { - TIFFError("writeCroppedImage", - "Group 3/4 compression is not usable with bps > 1"); - return (-1); - } - if (compression == COMPRESSION_CCITTFAX3) - { - if (g3opts != (uint32_t)-1) - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); - else - CopyField(TIFFTAG_GROUP3OPTIONS, g3opts); - } - else - { - CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG); - } - CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); - CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); - break; - } - { - uint32_t len32; - void **data; - if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &len32, &data)) - TIFFSetField(out, TIFFTAG_ICCPROFILE, len32, data); - } - { - uint16_t ninks; - const char *inknames; - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) - { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) - { - int inknameslen = (int)strlen(inknames) + 1; - const char *cp = inknames; - while (ninks > 1) - { - cp = strchr(cp, '\0'); - if (cp) - { - cp++; - inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } - TIFFSetField(out, TIFFTAG_INKNAMES, inknameslen, inknames); - } - } - } - { - unsigned short pg0, pg1; - if (TIFFGetField(in, TIFFTAG_PAGENUMBER, &pg0, &pg1)) - { - if (pageNum < 0) /* only one input file */ - TIFFSetField(out, TIFFTAG_PAGENUMBER, pg0, pg1); - else - TIFFSetField(out, TIFFTAG_PAGENUMBER, pageNum++, 0); - } - } - - for (p = tags; p < &tags[NTAGS]; p++) - CopyTag(p->tag, p->count, p->type); - - /* Update these since they are overwritten from input res by loop above */ - TIFFSetField(out, TIFFTAG_XRESOLUTION, (float)hres); - TIFFSetField(out, TIFFTAG_YRESOLUTION, (float)vres); - - /* Compute the tile or strip dimensions and write to disk */ - if (outtiled) - { - if (config == PLANARCONFIG_CONTIG) - writeBufferToContigTiles(out, sect_buff, length, width, spp, dump); - else - writeBufferToSeparateTiles(out, sect_buff, length, width, spp, - dump); - } - else - { - if (config == PLANARCONFIG_CONTIG) - writeBufferToContigStrips(out, sect_buff, length); - else - writeBufferToSeparateStrips(out, sect_buff, length, width, spp, - dump); - } - - if (!TIFFWriteDirectory(out)) - { - TIFFClose(out); - return (-1); - } - - return (0); -} /* end writeSingleSection */ - -/* Create a buffer to write one section at a time */ -static int createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) -{ - unsigned char *sect_buff = NULL; - unsigned char *new_buff = NULL; - static uint32_t prev_sectsize = 0; - - sect_buff = *sect_buff_ptr; - - if (!sect_buff) - { - sect_buff = - (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", - "Unable to allocate/reallocate section buffer"); - return (-1); - } - _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { - new_buff = - _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree(sect_buff); - sect_buff = (unsigned char *)limitMalloc( - sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; - - if (!sect_buff) - { - TIFFError("createImageSection", - "Unable to allocate/reallocate section buffer"); - return (-1); - } - _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - - prev_sectsize = sectsize; - *sect_buff_ptr = sect_buff; - - return (0); -} /* end createImageSection */ - -/* Process selections defined by regions, zones, margins, or fixed sized areas - */ -static int processCropSelections(struct image_data *image, - struct crop_mask *crop, - unsigned char **read_buff_ptr, - struct buffinfo seg_buffs[]) -{ - int i; - uint32_t width, length, total_width, total_length; - tsize_t cropsize; - unsigned char *crop_buff = NULL; - unsigned char *read_buff = NULL; - unsigned char *next_buff = NULL; - tsize_t prev_cropsize = 0; - - read_buff = *read_buff_ptr; - - if (crop->img_mode == COMPOSITE_IMAGES) - { - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) - crop_buff = (unsigned char *)limitMalloc(cropsize + - NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { - next_buff = - _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!next_buff) - { - _TIFFfree(crop_buff); - crop_buff = (unsigned char *)limitMalloc( - cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; - } - } - - if (!crop_buff) - { - TIFFError("processCropSelections", - "Unable to allocate/reallocate crop buffer"); - return (-1); - } - - _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - - /* Checks for matching width or length as required */ - if (extractCompositeRegions(image, crop, read_buff, crop_buff) != 0) - return (1); - - if (crop->crop_mode & CROP_INVERT) - { - switch (crop->photometric) - { - /* Just change the interpretation */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - image->photometric = crop->photometric; - break; - case INVERT_DATA_ONLY: - case INVERT_DATA_AND_TAG: - if (invertImage(image->photometric, image->spp, image->bps, - crop->combined_width, crop->combined_length, - crop_buff)) - { - TIFFError("processCropSelections", - "Failed to invert colorspace for composite " - "regions"); - return (-1); - } - if (crop->photometric == INVERT_DATA_AND_TAG) - { - switch (image->photometric) - { - case PHOTOMETRIC_MINISWHITE: - image->photometric = PHOTOMETRIC_MINISBLACK; - break; - case PHOTOMETRIC_MINISBLACK: - image->photometric = PHOTOMETRIC_MINISWHITE; - break; - default: - break; - } - } - break; - default: - break; - } - } - - /* Mirror and Rotate will not work with multiple regions unless they are - * the same width */ - if (crop->crop_mode & CROP_MIRROR) - { - if (mirrorImage(image->spp, image->bps, crop->mirror, - crop->combined_width, crop->combined_length, - crop_buff)) - { - TIFFError("processCropSelections", - "Failed to mirror composite regions %s", - (crop->rotation == MIRROR_HORIZ) ? "horizontally" - : "vertically"); - return (-1); - } - } - - if (crop->crop_mode & CROP_ROTATE) /* rotate should be last as it can - reallocate the buffer */ - { - /* rotateImage() set up a new buffer and calculates its size - * individually. Therefore, seg_buffs size needs to be updated - * accordingly. */ - size_t rot_buf_size = 0; - if (rotateImage(crop->rotation, image, &crop->combined_width, - &crop->combined_length, &crop_buff, &rot_buf_size, - FALSE)) - { - TIFFError("processCropSelections", - "Failed to rotate composite regions by %" PRIu32 - " degrees", - crop->rotation); - return (-1); - } - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = rot_buf_size; - } - } - else /* Separated Images */ - { - total_width = total_length = 0; - for (i = 0; i < crop->selections; i++) - { - - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) - crop_buff = (unsigned char *)limitMalloc( - cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[i].size; - if (prev_cropsize < cropsize) - { - next_buff = _TIFFrealloc( - crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!next_buff) - { - _TIFFfree(crop_buff); - crop_buff = (unsigned char *)limitMalloc( - cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; - } - } - - if (!crop_buff) - { - TIFFError("processCropSelections", - "Unable to allocate/reallocate crop buffer"); - return (-1); - } - - _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - - if (extractSeparateRegion(image, crop, read_buff, crop_buff, i)) - { - TIFFError("processCropSelections", - "Unable to extract cropped region %d from image", i); - return (-1); - } - - width = crop->regionlist[i].width; - length = crop->regionlist[i].length; - - if (crop->crop_mode & CROP_INVERT) - { - switch (crop->photometric) - { - /* Just change the interpretation */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - image->photometric = crop->photometric; - break; - case INVERT_DATA_ONLY: - case INVERT_DATA_AND_TAG: - if (invertImage(image->photometric, image->spp, - image->bps, width, length, crop_buff)) - { - TIFFError("processCropSelections", - "Failed to invert colorspace for region"); - return (-1); - } - if (crop->photometric == INVERT_DATA_AND_TAG) - { - switch (image->photometric) - { - case PHOTOMETRIC_MINISWHITE: - image->photometric = PHOTOMETRIC_MINISBLACK; - break; - case PHOTOMETRIC_MINISBLACK: - image->photometric = PHOTOMETRIC_MINISWHITE; - break; - default: - break; - } - } - break; - default: - break; - } - } - - if (crop->crop_mode & CROP_MIRROR) - { - if (mirrorImage(image->spp, image->bps, crop->mirror, width, - length, crop_buff)) - { - TIFFError("processCropSelections", - "Failed to mirror crop region %s", - (crop->rotation == MIRROR_HORIZ) ? "horizontally" - : "vertically"); - return (-1); - } - } - - if (crop->crop_mode & CROP_ROTATE) /* rotate should be last as it - can reallocate the buffer */ - { - /* rotateImage() changes image->width, ->length, ->xres and - * ->yres, what it schouldn't do here, when more than one - * section is processed. ToDo: Therefore rotateImage() and its - * usage has to be reworked (e.g. like mirrorImage()) !! - * Furthermore, rotateImage() set up a new buffer and calculates - * its size individually. Therefore, seg_buffs size needs to be - * updated accordingly. */ - size_t rot_buf_size = 0; - if (rotateImage(crop->rotation, image, - &crop->regionlist[i].width, - &crop->regionlist[i].length, &crop_buff, - &rot_buf_size, FALSE)) - { - TIFFError("processCropSelections", - "Failed to rotate crop region by %" PRIu16 - " degrees", - crop->rotation); - return (-1); - } - total_width += crop->regionlist[i].width; - total_length += crop->regionlist[i].length; - crop->combined_width = total_width; - crop->combined_length = total_length; - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = rot_buf_size; - } - } /* for crop->selections loop */ - } /* Separated Images (else case) */ - return (0); -} /* end processCropSelections */ - -/* Copy the crop section of the data from the current image into a buffer - * and adjust the IFD values to reflect the new size. If no cropping is - * required, use the original read buffer as the crop buffer. - * - * There is quite a bit of redundancy between this routine and the more - * specialized processCropSelections, but this provides - * the most optimized path when no Zones or Regions are required. - */ -static int createCroppedImage(struct image_data *image, struct crop_mask *crop, - unsigned char **read_buff_ptr, - unsigned char **crop_buff_ptr) -{ - tsize_t cropsize; - unsigned char *read_buff = NULL; - unsigned char *crop_buff = NULL; - unsigned char *new_buff = NULL; - static tsize_t prev_cropsize = 0; - - read_buff = *read_buff_ptr; - - /* Memory is freed before crop_buff_ptr is overwritten */ - if (*crop_buff_ptr != NULL) - { - _TIFFfree(*crop_buff_ptr); - } - - /* process full image, no crop buffer needed */ - *crop_buff_ptr = read_buff; - crop->combined_width = image->width; - crop->combined_length = image->length; - - cropsize = crop->bufftotal; - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { - crop_buff = - (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", - "Unable to allocate/reallocate crop buffer"); - return (-1); - } - _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { - new_buff = - _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free(crop_buff); - crop_buff = (unsigned char *)limitMalloc( - cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; - if (!crop_buff) - { - TIFFError("createCroppedImage", - "Unable to allocate/reallocate crop buffer"); - return (-1); - } - _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - - *crop_buff_ptr = crop_buff; - - if (crop->crop_mode & CROP_INVERT) - { - switch (crop->photometric) - { - /* Just change the interpretation */ - case PHOTOMETRIC_MINISWHITE: - case PHOTOMETRIC_MINISBLACK: - image->photometric = crop->photometric; - break; - case INVERT_DATA_ONLY: - case INVERT_DATA_AND_TAG: - if (invertImage(image->photometric, image->spp, image->bps, - crop->combined_width, crop->combined_length, - crop_buff)) - { - TIFFError("createCroppedImage", - "Failed to invert colorspace for image or " - "cropped selection"); - return (-1); - } - if (crop->photometric == INVERT_DATA_AND_TAG) - { - switch (image->photometric) - { - case PHOTOMETRIC_MINISWHITE: - image->photometric = PHOTOMETRIC_MINISBLACK; - break; - case PHOTOMETRIC_MINISBLACK: - image->photometric = PHOTOMETRIC_MINISWHITE; - break; - default: - break; - } - } - break; - default: - break; - } - } - - if (crop->crop_mode & CROP_MIRROR) - { - if (mirrorImage(image->spp, image->bps, crop->mirror, - crop->combined_width, crop->combined_length, crop_buff)) - { - TIFFError("createCroppedImage", - "Failed to mirror image or cropped selection %s", - (crop->rotation == MIRROR_HORIZ) ? "horizontally" - : "vertically"); - return (-1); - } - } - - if (crop->crop_mode & - CROP_ROTATE) /* rotate should be last as it can reallocate the buffer */ - { - if (rotateImage(crop->rotation, image, &crop->combined_width, - &crop->combined_length, crop_buff_ptr, NULL, TRUE)) - { - TIFFError("createCroppedImage", - "Failed to rotate image or cropped selection by %" PRIu16 - " degrees", - crop->rotation); - return (-1); - } - } - - if (crop_buff == - read_buff) /* we used the read buffer for the crop buffer */ - *read_buff_ptr = NULL; /* so we don't try to free it later */ - - return (0); -} /* end createCroppedImage */ - -/* Code in this function is heavily indebted to code in tiffcp - * with modifications by Richard Nolde to handle orientation correctly. - * It will have to be updated significantly if support is added to - * extract one or more samples from original image since the - * original code assumes we are always copying all samples. - * Use of global variables for config, compression and others - * should be replaced by addition to the crop_mask struct (which - * will be renamed to proc_opts indicating that is controls - * user supplied processing options, not just cropping) and - * then passed in as an argument. - */ -static int writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - struct dump_opts *dump, uint32_t width, - uint32_t length, unsigned char *crop_buff, - int pagenum, int total_pages) -{ - uint16_t bps, spp; - uint16_t input_compression, input_photometric; - uint16_t input_planar; - const struct cpTag *p; - - input_compression = image->compression; - input_photometric = image->photometric; - spp = image->spp; - bps = image->bps; - - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, length); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bps); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp); - -#ifdef DEBUG2 - TIFFError("writeCroppedImage", "Input compression: %s", - (input_compression == COMPRESSION_OJPEG) - ? "Old Jpeg" - : ((input_compression == COMPRESSION_JPEG) ? "New Jpeg" - : "Non Jpeg")); -#endif - - if (compression != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - else - { - if (input_compression == COMPRESSION_OJPEG) - { - compression = COMPRESSION_JPEG; - jpegcolormode = JPEGCOLORMODE_RAW; - TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_JPEG); - } - else - CopyField(TIFFTAG_COMPRESSION, compression); - } - - if (compression == COMPRESSION_JPEG) - { - if ((input_photometric == - PHOTOMETRIC_PALETTE) || /* color map indexed */ - (input_photometric == PHOTOMETRIC_MASK)) /* $holdout mask */ - { - TIFFError("writeCroppedImage", - "JPEG compression cannot be used with %s image data", - (input_photometric == PHOTOMETRIC_PALETTE) ? "palette" - : "mask"); - return (-1); - } - if (jpegcolormode == JPEGCOLORMODE_RGB && - input_photometric == PHOTOMETRIC_YCBCR) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); - } - else if (jpegcolormode == -1 && input_photometric == PHOTOMETRIC_RGB) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); - } - else - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, input_photometric); - } - } - else - { - if (compression == COMPRESSION_SGILOG || - compression == COMPRESSION_SGILOG24) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, - spp == 1 ? PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV); - } - else - { - if (input_compression == COMPRESSION_SGILOG || - input_compression == COMPRESSION_SGILOG24) - { - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, - spp == 1 ? PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV); - } - else - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, image->photometric); - } - } - - if (((input_photometric == PHOTOMETRIC_LOGL) || - (input_photometric == PHOTOMETRIC_LOGLUV)) && - ((compression != COMPRESSION_SGILOG) && - (compression != COMPRESSION_SGILOG24))) - { - TIFFError("writeCroppedImage", "LogL and LogLuv source data require " - "SGI_LOG or SGI_LOG24 compression"); - return (-1); - } - - if (fillorder != 0) - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - else - CopyTag(TIFFTAG_FILLORDER, 1, TIFF_SHORT); - - /* The loadimage function reads input orientation and sets - * image->orientation. The correct_image_orientation function - * applies the required rotation and mirror operations to - * present the data in TOPLEFT orientation and updates - * image->orientation if any transforms are performed, - * as per EXIF standard. - */ - TIFFSetField(out, TIFFTAG_ORIENTATION, image->orientation); - - /* - * Choose tiles/strip for the output image according to - * the command line arguments (-tiles, -strips) and the - * structure of the input image. - */ - if (outtiled == -1) - outtiled = TIFFIsTiled(in); - if (outtiled) - { - /* - * Setup output file's tile width&height. If either - * is not specified, use either the value from the - * input image or, if nothing is defined, use the - * library default. - */ - if (tilewidth == (uint32_t)0) - TIFFGetField(in, TIFFTAG_TILEWIDTH, &tilewidth); - if (tilelength == (uint32_t)0) - TIFFGetField(in, TIFFTAG_TILELENGTH, &tilelength); - - if (tilewidth == 0 || tilelength == 0) - TIFFDefaultTileSize(out, &tilewidth, &tilelength); - TIFFSetField(out, TIFFTAG_TILEWIDTH, tilewidth); - TIFFSetField(out, TIFFTAG_TILELENGTH, tilelength); - } - else - { - /* - * RowsPerStrip is left unspecified: use either the - * value from the input image or, if nothing is defined, - * use the library default. - */ - if (rowsperstrip == (uint32_t)0) - { - if (!TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip)) - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - if (compression != COMPRESSION_JPEG) - { - if (rowsperstrip > length) - rowsperstrip = length; - } - } - else if (rowsperstrip == (uint32_t)-1) - rowsperstrip = length; - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - } - - TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &input_planar); - if (config != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - else - CopyField(TIFFTAG_PLANARCONFIG, config); - if (spp <= 4) - CopyTag(TIFFTAG_TRANSFERFUNCTION, 4, TIFF_SHORT); - CopyTag(TIFFTAG_COLORMAP, 4, TIFF_SHORT); - - /* SMinSampleValue & SMaxSampleValue */ - switch (compression) - { - case COMPRESSION_JPEG: - if (((bps % 8) == 0) || ((bps % 12) == 0)) - { - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); - } - else - { - TIFFError("writeCroppedImage", - "JPEG compression requires 8 or 12 bits per sample"); - return (-1); - } - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != (uint16_t)-1) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - else - CopyField(TIFFTAG_PREDICTOR, predictor); - break; - case COMPRESSION_CCITTFAX3: - case COMPRESSION_CCITTFAX4: - if (bps != 1) - { - TIFFError("writeCroppedImage", - "Group 3/4 compression is not usable with bps > 1"); - return (-1); - } - if (compression == COMPRESSION_CCITTFAX3) - { - if (g3opts != (uint32_t)-1) - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); - else - CopyField(TIFFTAG_GROUP3OPTIONS, g3opts); - } - else - { - CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG); - } - CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); - CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); - break; - case COMPRESSION_NONE: - break; - default: - break; - } - { - uint32_t len32; - void **data; - if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &len32, &data)) - TIFFSetField(out, TIFFTAG_ICCPROFILE, len32, data); - } - { - uint16_t ninks; - const char *inknames; - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) - { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) - { - int inknameslen = (int)strlen(inknames) + 1; - const char *cp = inknames; - while (ninks > 1) - { - cp = strchr(cp, '\0'); - if (cp) - { - cp++; - inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } - TIFFSetField(out, TIFFTAG_INKNAMES, inknameslen, inknames); - } - } - } - { - unsigned short pg0, pg1; - if (TIFFGetField(in, TIFFTAG_PAGENUMBER, &pg0, &pg1)) - { - TIFFSetField(out, TIFFTAG_PAGENUMBER, pagenum, total_pages); - } - } - - for (p = tags; p < &tags[NTAGS]; p++) - CopyTag(p->tag, p->count, p->type); - - /* Compute the tile or strip dimensions and write to disk */ - if (outtiled) - { - if (config == PLANARCONFIG_CONTIG) - { - if (writeBufferToContigTiles(out, crop_buff, length, width, spp, - dump)) - TIFFError("", - "Unable to write contiguous tile data for page %d", - pagenum); - } - else - { - if (writeBufferToSeparateTiles(out, crop_buff, length, width, spp, - dump)) - TIFFError("", "Unable to write separate tile data for page %d", - pagenum); - } - } - else - { - if (config == PLANARCONFIG_CONTIG) - { - if (writeBufferToContigStrips(out, crop_buff, length)) - TIFFError("", - "Unable to write contiguous strip data for page %d", - pagenum); - } - else - { - if (writeBufferToSeparateStrips(out, crop_buff, length, width, spp, - dump)) - TIFFError("", "Unable to write separate strip data for page %d", - pagenum); - } - } - - if (!TIFFWriteDirectory(out)) - { - TIFFError("", "Failed to write IFD for page number %d", pagenum); - return (-1); - } - - return (0); -} /* end writeCroppedImage */ - -static int rotateContigSamples8bits(uint16_t rotation, uint16_t spp, - uint16_t bps, uint32_t width, - uint32_t length, uint32_t col, uint8_t *src, - uint8_t *dst) -{ - int ready_bits = 0; - uint32_t src_byte = 0, src_bit = 0; - uint32_t row, rowsize = 0, bit_offset = 0; - uint8_t matchbits = 0, maskbits = 0; - uint8_t buff1 = 0, buff2 = 0; - uint8_t *next; - tsample_t sample; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("rotateContigSamples8bits", - "Invalid src or destination buffer"); - return (1); - } - - rowsize = ((bps * spp * width) + 7) / 8; - ready_bits = 0; - maskbits = (uint8_t)-1 >> (8 - bps); - buff1 = buff2 = 0; - - for (row = 0; row < length; row++) - { - bit_offset = col * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - src_bit = (bit_offset + (sample * bps)) % 8; - } - - switch (rotation) - { - case 90: - next = src + src_byte - (row * rowsize); - break; - case 270: - next = src + src_byte + (row * rowsize); - break; - default: - TIFFError("rotateContigSamples8bits", - "Invalid rotation %" PRIu16, rotation); - return (1); - } - matchbits = maskbits << (8 - src_bit - bps); - buff1 = ((*next) & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - *dst++ = buff2; - buff2 = buff1; - ready_bits -= 8; - } - else - { - buff2 = (buff2 | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - if (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - } - - return (0); -} /* end rotateContigSamples8bits */ - -static int rotateContigSamples16bits(uint16_t rotation, uint16_t spp, - uint16_t bps, uint32_t width, - uint32_t length, uint32_t col, - uint8_t *src, uint8_t *dst) -{ - int ready_bits = 0; - uint32_t row, rowsize, bit_offset; - uint32_t src_byte = 0, src_bit = 0; - uint16_t matchbits = 0, maskbits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - uint8_t *next; - tsample_t sample; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("rotateContigSamples16bits", - "Invalid src or destination buffer"); - return (1); - } - - rowsize = ((bps * spp * width) + 7) / 8; - ready_bits = 0; - maskbits = (uint16_t)-1 >> (16 - bps); - buff1 = buff2 = 0; - for (row = 0; row < length; row++) - { - bit_offset = col * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - src_bit = (bit_offset + (sample * bps)) % 8; - } - - switch (rotation) - { - case 90: - next = src + src_byte - (row * rowsize); - break; - case 270: - next = src + src_byte + (row * rowsize); - break; - default: - TIFFError("rotateContigSamples8bits", - "Invalid rotation %" PRIu16, rotation); - return (1); - } - matchbits = maskbits << (16 - src_bit - bps); - if (little_endian) - buff1 = (next[0] << 8) | next[1]; - else - buff1 = (next[1] << 8) | next[0]; - - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 8) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - } - else - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - if (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - } - - return (0); -} /* end rotateContigSamples16bits */ - -static int rotateContigSamples24bits(uint16_t rotation, uint16_t spp, - uint16_t bps, uint32_t width, - uint32_t length, uint32_t col, - uint8_t *src, uint8_t *dst) -{ - int ready_bits = 0; - uint32_t row, rowsize, bit_offset; - uint32_t src_byte = 0, src_bit = 0; - uint32_t matchbits = 0, maskbits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - uint8_t *next; - tsample_t sample; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("rotateContigSamples24bits", - "Invalid src or destination buffer"); - return (1); - } - - rowsize = ((bps * spp * width) + 7) / 8; - ready_bits = 0; - maskbits = (uint32_t)-1 >> (32 - bps); - buff1 = buff2 = 0; - for (row = 0; row < length; row++) - { - bit_offset = col * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - src_bit = (bit_offset + (sample * bps)) % 8; - } - - switch (rotation) - { - case 90: - next = src + src_byte - (row * rowsize); - break; - case 270: - next = src + src_byte + (row * rowsize); - break; - default: - TIFFError("rotateContigSamples8bits", - "Invalid rotation %" PRIu16, rotation); - return (1); - } - matchbits = maskbits << (32 - src_bit - bps); - if (little_endian) - buff1 = (next[0] << 24) | (next[1] << 16) | (next[2] << 8) | - next[3]; - else - buff1 = (next[3] << 24) | (next[2] << 16) | (next[1] << 8) | - next[0]; - buff1 = (buff1 & matchbits) << (src_bit); - - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 16) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - } - else - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - return (0); -} /* end rotateContigSamples24bits */ - -static int rotateContigSamples32bits(uint16_t rotation, uint16_t spp, - uint16_t bps, uint32_t width, - uint32_t length, uint32_t col, - uint8_t *src, uint8_t *dst) -{ - int ready_bits = 0 /*, shift_width = 0 */; - /* int bytes_per_sample, bytes_per_pixel; */ - uint32_t row, rowsize, bit_offset; - uint32_t src_byte, src_bit; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t maskbits = 0, matchbits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - uint8_t *next; - tsample_t sample; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("rotateContigSamples24bits", - "Invalid src or destination buffer"); - return (1); - } - - /* bytes_per_sample = (bps + 7) / 8; */ - /* bytes_per_pixel = ((bps * spp) + 7) / 8; */ - /* if (bytes_per_pixel < (bytes_per_sample + 1)) */ - /* shift_width = bytes_per_pixel; */ - /* else */ - /* shift_width = bytes_per_sample + 1; */ - - rowsize = ((bps * spp * width) + 7) / 8; - ready_bits = 0; - maskbits = (uint64_t)-1 >> (64 - bps); - buff1 = buff2 = 0; - for (row = 0; row < length; row++) - { - bit_offset = col * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - src_bit = (bit_offset + (sample * bps)) % 8; - } - - switch (rotation) - { - case 90: - next = src + src_byte - (row * rowsize); - break; - case 270: - next = src + src_byte + (row * rowsize); - break; - default: - TIFFError("rotateContigSamples8bits", - "Invalid rotation %" PRIu16, rotation); - return (1); - } - matchbits = maskbits << (64 - src_bit - bps); - if (little_endian) - { - longbuff1 = (next[0] << 24) | (next[1] << 16) | (next[2] << 8) | - next[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = (next[3] << 24) | (next[2] << 16) | (next[1] << 8) | - next[0]; - longbuff2 = longbuff1; - } - - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - buff1 = (buff3 & matchbits) << (src_bit); - - if (ready_bits < 32) - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - return (0); -} /* end rotateContigSamples32bits */ - -/* Rotate an image by a multiple of 90 degrees clockwise */ -static int rotateImage(uint16_t rotation, struct image_data *image, - uint32_t *img_width, uint32_t *img_length, - unsigned char **ibuff_ptr, size_t *rot_buf_size, - int rot_image_params) -{ - int shift_width; - uint32_t bytes_per_pixel, bytes_per_sample; - uint32_t row, rowsize, src_offset, dst_offset; - uint32_t i, col, width, length; - uint32_t colsize, col_offset, pix_offset; - tmsize_t buffsize; - unsigned char *ibuff; - unsigned char *src; - unsigned char *dst; - uint16_t spp, bps; - float res_temp; - unsigned char *rbuff = NULL; - - width = *img_width; - length = *img_length; - spp = image->spp; - bps = image->bps; - - if ((spp != 0 && bps != 0 && - width > (uint32_t)((UINT32_MAX - 7) / spp / bps)) || - (spp != 0 && bps != 0 && - length > (uint32_t)((UINT32_MAX - 7) / spp / bps))) - { - TIFFError("rotateImage", "Integer overflow detected."); - return (-1); - } - rowsize = ((bps * spp * width) + 7) / 8; - colsize = ((bps * spp * length) + 7) / 8; - if ((colsize * width) > (rowsize * length)) - { - if (((tmsize_t)colsize + 1) != 0 && - (tmsize_t)width > ((TIFF_TMSIZE_T_MAX - NUM_BUFF_OVERSIZE_BYTES) / - ((tmsize_t)colsize + 1))) - { - TIFFError("rotateImage", - "Integer overflow when calculating buffer size."); - return (-1); - } - buffsize = ((tmsize_t)colsize + 1) * width; - } - else - { - if (((tmsize_t)rowsize + 1) != 0 && - (tmsize_t)length > ((TIFF_TMSIZE_T_MAX - NUM_BUFF_OVERSIZE_BYTES) / - ((tmsize_t)rowsize + 1))) - { - TIFFError("rotateImage", - "Integer overflow when calculating buffer size."); - return (-1); - } - buffsize = ((tmsize_t)rowsize + 1) * length; - } - - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - - switch (rotation) - { - case 0: - case 360: - return (0); - case 90: - case 180: - case 270: - break; - default: - TIFFError("rotateImage", "Invalid rotation angle %" PRIu16, - rotation); - return (-1); - } - - /* Add 3 padding bytes for extractContigSamplesShifted32bits */ - if (!(rbuff = - (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("rotateImage", - "Unable to allocate rotation buffer of %" TIFF_SSIZE_FORMAT - " bytes ", - buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } - _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (rot_buf_size != NULL) - *rot_buf_size = buffsize; - - ibuff = *ibuff_ptr; - switch (rotation) - { - case 180: - if ((bps % 8) == 0) /* byte aligned data */ - { - src = ibuff; - pix_offset = (spp * bps) / 8; - for (row = 0; row < length; row++) - { - dst_offset = (length - row - 1) * rowsize; - for (col = 0; col < width; col++) - { - col_offset = (width - col - 1) * pix_offset; - dst = rbuff + dst_offset + col_offset; - - for (i = 0; i < bytes_per_pixel; i++) - *dst++ = *src++; - } - } - } - else - { /* non 8 bit per sample data */ - for (row = 0; row < length; row++) - { - src_offset = row * rowsize; - dst_offset = (length - row - 1) * rowsize; - src = ibuff + src_offset; - dst = rbuff + dst_offset; - switch (shift_width) - { - case 1: - if (bps == 1) - { - if (reverseSamples8bits(spp, bps, width, src, - dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - } - if (reverseSamples16bits(spp, bps, width, src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 2: - if (reverseSamples24bits(spp, bps, width, src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 3: - case 4: - case 5: - if (reverseSamples32bits(spp, bps, width, src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - default: - TIFFError("rotateImage", - "Unsupported bit depth %" PRIu16, bps); - _TIFFfree(rbuff); - return (-1); - } - } - } - _TIFFfree(ibuff); - *(ibuff_ptr) = rbuff; - break; - - case 90: - if ((bps % 8) == 0) /* byte aligned data */ - { - for (col = 0; col < width; col++) - { - src_offset = - ((length - 1) * rowsize) + (col * bytes_per_pixel); - dst_offset = col * colsize; - src = ibuff + src_offset; - dst = rbuff + dst_offset; - for (row = length; row > 0; row--) - { - for (i = 0; i < bytes_per_pixel; i++) - *dst++ = *(src + i); - src -= rowsize; - } - } - } - else - { /* non 8 bit per sample data */ - for (col = 0; col < width; col++) - { - src_offset = (length - 1) * rowsize; - dst_offset = col * colsize; - src = ibuff + src_offset; - dst = rbuff + dst_offset; - switch (shift_width) - { - case 1: - if (bps == 1) - { - if (rotateContigSamples8bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - } - if (rotateContigSamples16bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 2: - if (rotateContigSamples24bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 3: - case 4: - case 5: - if (rotateContigSamples32bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - default: - TIFFError("rotateImage", - "Unsupported bit depth %" PRIu16, bps); - _TIFFfree(rbuff); - return (-1); - } - } - } - _TIFFfree(ibuff); - *(ibuff_ptr) = rbuff; - - *img_width = length; - *img_length = width; - /* Only toggle image parameters if whole input image is rotated. */ - if (rot_image_params) - { - image->width = length; - image->length = width; - res_temp = image->xres; - image->xres = image->yres; - image->yres = res_temp; - } - break; - - case 270: - if ((bps % 8) == 0) /* byte aligned data */ - { - for (col = 0; col < width; col++) - { - src_offset = col * bytes_per_pixel; - dst_offset = (width - col - 1) * colsize; - src = ibuff + src_offset; - dst = rbuff + dst_offset; - for (row = length; row > 0; row--) - { - for (i = 0; i < bytes_per_pixel; i++) - *dst++ = *(src + i); - src += rowsize; - } - } - } - else - { /* non 8 bit per sample data */ - for (col = 0; col < width; col++) - { - src_offset = 0; - dst_offset = (width - col - 1) * colsize; - src = ibuff + src_offset; - dst = rbuff + dst_offset; - switch (shift_width) - { - case 1: - if (bps == 1) - { - if (rotateContigSamples8bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - } - if (rotateContigSamples16bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 2: - if (rotateContigSamples24bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - case 3: - case 4: - case 5: - if (rotateContigSamples32bits(rotation, spp, bps, - width, length, col, - src, dst)) - { - _TIFFfree(rbuff); - return (-1); - } - break; - default: - TIFFError("rotateImage", - "Unsupported bit depth %" PRIu16, bps); - _TIFFfree(rbuff); - return (-1); - } - } - } - _TIFFfree(ibuff); - *(ibuff_ptr) = rbuff; - - *img_width = length; - *img_length = width; - /* Only toggle image parameters if whole input image is rotated. */ - if (rot_image_params) - { - image->width = length; - image->length = width; - res_temp = image->xres; - image->xres = image->yres; - image->yres = res_temp; - } - break; - default: - break; - } - - return (0); -} /* end rotateImage */ - -static int reverseSamples8bits(uint16_t spp, uint16_t bps, uint32_t width, - uint8_t *ibuff, uint8_t *obuff) -{ - int ready_bits = 0; - uint32_t col; - uint32_t src_byte, src_bit; - uint32_t bit_offset = 0; - uint8_t match_bits = 0, mask_bits = 0; - uint8_t buff1 = 0, buff2 = 0; - unsigned char *src; - unsigned char *dst; - tsample_t sample; - - if ((ibuff == NULL) || (obuff == NULL)) - { - TIFFError("reverseSamples8bits", "Invalid image or work buffer"); - return (1); - } - - ready_bits = 0; - mask_bits = (uint8_t)-1 >> (8 - bps); - dst = obuff; - for (col = width; col > 0; col--) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = (col - 1) * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - src_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - src_bit = (bit_offset + (sample * bps)) % 8; - } - - src = ibuff + src_byte; - match_bits = mask_bits << (8 - src_bit - bps); - buff1 = ((*src) & match_bits) << (src_bit); - - if (ready_bits < 8) - buff2 = (buff2 | (buff1 >> ready_bits)); - else /* If we have a full buffer's worth, write it out */ - { - *dst++ = buff2; - buff2 = buff1; - ready_bits -= 8; - } - ready_bits += bps; - } - } - if (ready_bits > 0) - { - buff1 = (buff2 & ((unsigned int)255 << (8 - ready_bits))); - *dst++ = buff1; - } - - return (0); -} /* end reverseSamples8bits */ - -static int reverseSamples16bits(uint16_t spp, uint16_t bps, uint32_t width, - uint8_t *ibuff, uint8_t *obuff) -{ - int ready_bits = 0; - uint32_t col; - uint32_t src_byte = 0, high_bit = 0; - uint32_t bit_offset = 0; - uint16_t match_bits = 0, mask_bits = 0; - uint16_t buff1 = 0, buff2 = 0; - uint8_t bytebuff = 0; - unsigned char *src; - unsigned char *dst; - tsample_t sample; - - if ((ibuff == NULL) || (obuff == NULL)) - { - TIFFError("reverseSample16bits", "Invalid image or work buffer"); - return (1); - } - - ready_bits = 0; - mask_bits = (uint16_t)-1 >> (16 - bps); - dst = obuff; - for (col = width; col > 0; col--) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = (col - 1) * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - high_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - high_bit = (bit_offset + (sample * bps)) % 8; - } - - src = ibuff + src_byte; - match_bits = mask_bits << (16 - high_bit - bps); - if (little_endian) - buff1 = (src[0] << 8) | src[1]; - else - buff1 = (src[1] << 8) | src[0]; - buff1 = (buff1 & match_bits) << (high_bit); - - if (ready_bits < 8) - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - ready_bits -= 8; - /* shift in new bits */ - buff2 = ((buff2 << 8) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - if (ready_bits > 0) - { - bytebuff = (buff2 >> 8); - *dst++ = bytebuff; - } - - return (0); -} /* end reverseSamples16bits */ - -static int reverseSamples24bits(uint16_t spp, uint16_t bps, uint32_t width, - uint8_t *ibuff, uint8_t *obuff) -{ - int ready_bits = 0; - uint32_t col; - uint32_t src_byte = 0, high_bit = 0; - uint32_t bit_offset = 0; - uint32_t match_bits = 0, mask_bits = 0; - uint32_t buff1 = 0, buff2 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0; - unsigned char *src; - unsigned char *dst; - tsample_t sample; - - if ((ibuff == NULL) || (obuff == NULL)) - { - TIFFError("reverseSamples24bits", "Invalid image or work buffer"); - return (1); - } - - ready_bits = 0; - mask_bits = (uint32_t)-1 >> (32 - bps); - dst = obuff; - for (col = width; col > 0; col--) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = (col - 1) * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - high_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - high_bit = (bit_offset + (sample * bps)) % 8; - } - - src = ibuff + src_byte; - match_bits = mask_bits << (32 - high_bit - bps); - if (little_endian) - buff1 = - (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; - else - buff1 = - (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; - buff1 = (buff1 & match_bits) << (high_bit); - - if (ready_bits < 16) - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - bytebuff2 = (buff2 >> 16); - *dst++ = bytebuff2; - ready_bits -= 16; - - /* shift in new bits */ - buff2 = ((buff2 << 16) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - - /* catch any trailing bits at the end of the line */ - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 24); - *dst++ = bytebuff1; - - buff2 = (buff2 << 8); - bytebuff2 = bytebuff1; - ready_bits -= 8; - } - - return (0); -} /* end reverseSamples24bits */ - -static int reverseSamples32bits(uint16_t spp, uint16_t bps, uint32_t width, - uint8_t *ibuff, uint8_t *obuff) -{ - int ready_bits = 0 /*, shift_width = 0 */; - /* int bytes_per_sample, bytes_per_pixel; */ - uint32_t bit_offset; - uint32_t src_byte = 0, high_bit = 0; - uint32_t col; - uint32_t longbuff1 = 0, longbuff2 = 0; - uint64_t mask_bits = 0, match_bits = 0; - uint64_t buff1 = 0, buff2 = 0, buff3 = 0; - uint8_t bytebuff1 = 0, bytebuff2 = 0, bytebuff3 = 0, bytebuff4 = 0; - unsigned char *src; - unsigned char *dst; - tsample_t sample; - - if ((ibuff == NULL) || (obuff == NULL)) - { - TIFFError("reverseSamples32bits", "Invalid image or work buffer"); - return (1); - } - - ready_bits = 0; - mask_bits = (uint64_t)-1 >> (64 - bps); - dst = obuff; - - /* bytes_per_sample = (bps + 7) / 8; */ - /* bytes_per_pixel = ((bps * spp) + 7) / 8; */ - /* if (bytes_per_pixel < (bytes_per_sample + 1)) */ - /* shift_width = bytes_per_pixel; */ - /* else */ - /* shift_width = bytes_per_sample + 1; */ - - for (col = width; col > 0; col--) - { - /* Compute src byte(s) and bits within byte(s) */ - bit_offset = (col - 1) * bps * spp; - for (sample = 0; sample < spp; sample++) - { - if (sample == 0) - { - src_byte = bit_offset / 8; - high_bit = bit_offset % 8; - } - else - { - src_byte = (bit_offset + (sample * bps)) / 8; - high_bit = (bit_offset + (sample * bps)) % 8; - } - - src = ibuff + src_byte; - match_bits = mask_bits << (64 - high_bit - bps); - if (little_endian) - { - longbuff1 = - (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; - longbuff2 = longbuff1; - } - else - { - longbuff1 = - (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; - longbuff2 = longbuff1; - } - buff3 = ((uint64_t)longbuff1 << 32) | longbuff2; - buff1 = (buff3 & match_bits) << (high_bit); - - if (ready_bits < 32) - { /* add another bps bits to the buffer */ - buff2 = (buff2 | (buff1 >> ready_bits)); - } - else /* If we have a full buffer's worth, write it out */ - { - bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; - bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; - bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; - bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - - /* shift in new bits */ - buff2 = ((buff2 << 32) | (buff1 >> ready_bits)); - } - ready_bits += bps; - } - } - while (ready_bits > 0) - { - bytebuff1 = (buff2 >> 56); - *dst++ = bytebuff1; - buff2 = (buff2 << 8); - ready_bits -= 8; - } - - return (0); -} /* end reverseSamples32bits */ - -static int reverseSamplesBytes(uint16_t spp, uint16_t bps, uint32_t width, - uint8_t *src, uint8_t *dst) -{ - int i; - uint32_t col, bytes_per_pixel, col_offset; - uint8_t bytebuff1; - unsigned char swapbuff[32]; - - if ((src == NULL) || (dst == NULL)) - { - TIFFError("reverseSamplesBytes", "Invalid input or output buffer"); - return (1); - } - - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel > sizeof(swapbuff)) - { - TIFFError("reverseSamplesBytes", "bytes_per_pixel too large"); - return (1); - } - switch (bps / 8) - { - case 8: /* Use memcpy for multiple bytes per sample data */ - case 4: - case 3: - case 2: - for (col = 0; col < (width / 2); col++) - { - col_offset = col * bytes_per_pixel; - _TIFFmemcpy(swapbuff, src + col_offset, bytes_per_pixel); - _TIFFmemcpy(src + col_offset, - dst - col_offset - bytes_per_pixel, - bytes_per_pixel); - _TIFFmemcpy(dst - col_offset - bytes_per_pixel, swapbuff, - bytes_per_pixel); - } - break; - case 1: /* Use byte copy only for single byte per sample data */ - for (col = 0; col < (width / 2); col++) - { - for (i = 0; i < spp; i++) - { - bytebuff1 = *src; - *src++ = *(dst - spp + i); - *(dst - spp + i) = bytebuff1; - } - dst -= spp; - } - break; - default: - TIFFError("reverseSamplesBytes", "Unsupported bit depth %" PRIu16, - bps); - return (1); - } - return (0); -} /* end reverseSamplesBytes */ - -/* Mirror an image horizontally or vertically */ -static int mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, - uint32_t width, uint32_t length, unsigned char *ibuff) -{ - int shift_width; - uint32_t bytes_per_pixel, bytes_per_sample; - uint32_t row, rowsize, row_offset; - unsigned char *line_buff = NULL; - unsigned char *src; - unsigned char *dst; - - src = ibuff; - rowsize = ((width * bps * spp) + 7) / 8; - switch (mirror) - { - case MIRROR_BOTH: - case MIRROR_VERT: - line_buff = - (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { - TIFFError("mirrorImage", - "Unable to allocate mirror line buffer of %1u bytes", - rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } - _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) - { - _TIFFmemcpy(line_buff, src, rowsize); - _TIFFmemcpy(src, dst, rowsize); - _TIFFmemcpy(dst, line_buff, rowsize); - src += (rowsize); - dst -= (rowsize); - } - if (line_buff) - _TIFFfree(line_buff); - if (mirror == MIRROR_VERT) - break; - /* Fall through */ - case MIRROR_HORIZ: - if ((bps % 8) == 0) /* byte aligned data */ - { - for (row = 0; row < length; row++) - { - row_offset = row * rowsize; - src = ibuff + row_offset; - dst = ibuff + row_offset + rowsize; - if (reverseSamplesBytes(spp, bps, width, src, dst)) - { - return (-1); - } - } - } - else - { /* non 8 bit per sample data */ - if (!(line_buff = (unsigned char *)limitMalloc( - rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", - "Unable to allocate mirror line buffer"); - return (-1); - } - _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; - - for (row = 0; row < length; row++) - { - row_offset = row * rowsize; - src = ibuff + row_offset; - _TIFFmemset(line_buff, '\0', - rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: - if (reverseSamples16bits(spp, bps, width, src, - line_buff)) - { - _TIFFfree(line_buff); - return (-1); - } - _TIFFmemcpy(src, line_buff, rowsize); - break; - case 2: - if (reverseSamples24bits(spp, bps, width, src, - line_buff)) - { - _TIFFfree(line_buff); - return (-1); - } - _TIFFmemcpy(src, line_buff, rowsize); - break; - case 3: - case 4: - case 5: - if (reverseSamples32bits(spp, bps, width, src, - line_buff)) - { - _TIFFfree(line_buff); - return (-1); - } - _TIFFmemcpy(src, line_buff, rowsize); - break; - default: - TIFFError("mirrorImage", - "Unsupported bit depth %" PRIu16, bps); - _TIFFfree(line_buff); - return (-1); - } - } - if (line_buff) - _TIFFfree(line_buff); - } - break; - - default: - TIFFError("mirrorImage", "Invalid mirror axis %" PRIu16, mirror); - return (-1); - break; - } - - return (0); -} - -/* Invert the light and dark values for a bilevel or grayscale image */ -static int invertImage(uint16_t photometric, uint16_t spp, uint16_t bps, - uint32_t width, uint32_t length, - unsigned char *work_buff) -{ - uint32_t row, col; - unsigned char *src; - uint16_t *src_uint16; - uint32_t *src_uint32; - - if (spp != 1) - { - TIFFError( - "invertImage", - "Image inversion not supported for more than one sample per pixel"); - return (-1); - } - - if (photometric != PHOTOMETRIC_MINISWHITE && - photometric != PHOTOMETRIC_MINISBLACK) - { - TIFFError("invertImage", - "Only black and white and grayscale images can be inverted"); - return (-1); - } - - src = work_buff; - if (src == NULL) - { - TIFFError("invertImage", "Invalid crop buffer passed to invertImage"); - return (-1); - } - - switch (bps) - { - case 32: - src_uint32 = (uint32_t *)src; - for (row = 0; row < length; row++) - for (col = 0; col < width; col++) - { - *src_uint32 = ~(*src_uint32); - src_uint32++; - } - break; - case 16: - src_uint16 = (uint16_t *)src; - for (row = 0; row < length; row++) - for (col = 0; col < width; col++) - { - *src_uint16 = ~(*src_uint16); - src_uint16++; - } - break; - case 8: - case 4: - case 2: - case 1: - for (row = 0; row < length; row++) - for (col = 0; col < width; col += 8 / bps) - { - *src = ~(*src); - src++; - } - break; - default: - TIFFError("invertImage", "Unsupported bit depth %" PRIu16, bps); - return (-1); - } - - return (0); -} diff --git a/third_party/libtiff/tools/tiffdither.c b/third_party/libtiff/tools/tiffdither.c deleted file mode 100644 index 405527c..0000000 --- a/third_party/libtiff/tools/tiffdither.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) - -uint32_t imagewidth; -uint32_t imagelength; -int threshold = 128; - -static void usage(int code); - -/* - * Floyd-Steinberg error propragation with threshold. - * This code is stolen from tiffmedian. - */ -static int fsdither(TIFF *in, TIFF *out) -{ - unsigned char *outline, *inputline, *inptr; - short *thisline, *nextline, *tmpptr; - register unsigned char *outptr; - register short *thisptr, *nextptr; - register uint32_t i, j; - uint32_t imax, jmax; - int lastline, lastpixel; - int bit; - tsize_t outlinesize; - int errcode = 0; - - imax = imagelength - 1; - jmax = imagewidth - 1; - inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - thisline = (short *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, imagewidth, sizeof(short))); - nextline = (short *)_TIFFmalloc( - TIFFSafeMultiply(tmsize_t, imagewidth, sizeof(short))); - outlinesize = TIFFScanlineSize(out); - outline = (unsigned char *)_TIFFmalloc(outlinesize); - if (!(inputline && thisline && nextline && outline)) - { - fprintf(stderr, "Out of memory.\n"); - goto skip_on_error; - } - if (imagewidth > TIFFScanlineSize(in)) - { - fprintf(stderr, "Image width exceeds scanline size.\n"); - goto skip_on_error; - } - - /* - * Get first line - */ - if (TIFFReadScanline(in, inputline, 0, 0) <= 0) - goto skip_on_error; - - inptr = inputline; - nextptr = nextline; - for (j = 0; j < imagewidth; ++j) - *nextptr++ = *inptr++; - for (i = 0; i < imagelength; ++i) - { - tmpptr = thisline; - thisline = nextline; - nextline = tmpptr; - lastline = (i == imax); - if (TIFFReadScanline(in, inputline, i, 0) <= 0) - goto skip_on_error; - inptr = inputline; - nextptr = nextline; - for (j = 0; j < imagewidth; ++j) - *nextptr++ = *inptr++; - thisptr = thisline; - nextptr = nextline; - _TIFFmemset(outptr = outline, 0, outlinesize); - bit = 0x80; - for (j = 0; j < imagewidth; ++j) - { - register int v; - - lastpixel = (j == jmax); - v = *thisptr++; - if (v < 0) - v = 0; - else if (v > 255) - v = 255; - if (v > threshold) - { - *outptr |= bit; - v -= 255; - } - bit >>= 1; - if (bit == 0) - { - outptr++; - bit = 0x80; - } - if (!lastpixel) - thisptr[0] += v * 7 / 16; - if (!lastline) - { - if (j != 0) - nextptr[-1] += v * 3 / 16; - *nextptr++ += v * 5 / 16; - if (!lastpixel) - nextptr[0] += v / 16; - } - } - if (TIFFWriteScanline(out, outline, i, 0) < 0) - goto skip_on_error; - } - goto exit_label; - -skip_on_error: - errcode = 1; -exit_label: - _TIFFfree(inputline); - _TIFFfree(thisline); - _TIFFfree(nextline); - _TIFFfree(outline); - return errcode; -} - -static uint16_t compression = COMPRESSION_PACKBITS; -static uint16_t predictor = 0; -static uint32_t group3options = 0; - -static void processG3Options(char *cp) -{ - if ((cp = strchr(cp, ':'))) - { - do - { - cp++; - if (strneq(cp, "1d", 2)) - group3options &= ~GROUP3OPT_2DENCODING; - else if (strneq(cp, "2d", 2)) - group3options |= GROUP3OPT_2DENCODING; - else if (strneq(cp, "fill", 4)) - group3options |= GROUP3OPT_FILLBITS; - else - usage(EXIT_FAILURE); - } while ((cp = strchr(cp, ':'))); - } -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "g3", 2)) - { - processG3Options(opt); - compression = COMPRESSION_CCITTFAX3; - } - else if (streq(opt, "g4")) - compression = COMPRESSION_CCITTFAX4; - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -int main(int argc, char *argv[]) -{ - TIFF *in, *out; - uint16_t samplesperpixel, bitspersample = 1, shortv; - float floatv; - char thing[1024]; - uint32_t rowsperstrip = (uint32_t)-1; - uint16_t fillorder = 0; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - while ((c = getopt(argc, argv, "c:f:r:t:h")) != -1) - switch (c) - { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'f': /* fill order */ - if (streq(optarg, "lsb2msb")) - fillorder = FILLORDER_LSB2MSB; - else if (streq(optarg, "msb2lsb")) - fillorder = FILLORDER_MSB2LSB; - else - usage(EXIT_FAILURE); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 't': - threshold = atoi(optarg); - if (threshold < 0) - threshold = 0; - else if (threshold > 255) - threshold = 255; - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - if (argc - optind < 2) - usage(EXIT_FAILURE); - in = TIFFOpen(argv[optind], "r"); - if (in == NULL) - return (EXIT_FAILURE); - TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - if (samplesperpixel != 1) - { - fprintf(stderr, "%s: Not a b&w image.\n", argv[0]); - TIFFClose(in); - return (EXIT_FAILURE); - } - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); - if (bitspersample != 8) - { - fprintf(stderr, " %s: Sorry, only handle 8-bit samples.\n", argv[0]); - TIFFClose(in); - return (EXIT_FAILURE); - } - out = TIFFOpen(argv[optind + 1], "w"); - if (out == NULL) - { - TIFFClose(in); - return (EXIT_FAILURE); - } - - do - { - CopyField(TIFFTAG_IMAGEWIDTH, imagewidth); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, imagelength - 1); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - if (fillorder) - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - else - CopyField(TIFFTAG_FILLORDER, shortv); - snprintf(thing, sizeof(thing), "Dithered B&W version of %s", - argv[optind]); - TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); - CopyField(TIFFTAG_PHOTOMETRIC, shortv); - CopyField(TIFFTAG_ORIENTATION, shortv); - CopyField(TIFFTAG_XRESOLUTION, floatv); - CopyField(TIFFTAG_YRESOLUTION, floatv); - CopyField(TIFFTAG_RESOLUTIONUNIT, shortv); - rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - switch (compression) - { - case COMPRESSION_CCITTFAX3: - TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, group3options); - break; - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - fsdither(in, out); - TIFFWriteDirectory(out); - } while (TIFFReadDirectory(in)); - - TIFFClose(in); - TIFFClose(out); - return (EXIT_SUCCESS); -} - -static const char usage_info[] = - "Convert a greyscale image to bilevel using dithering\n\n" - "usage: tiffdither [options] input.tif output.tif\n" - "where options are:\n" - " -r # make each strip have no more than # rows\n" - " -t # set the threshold value for dithering (default 128)\n" - " -f lsb2msb force lsb-to-msb FillOrder for output\n" - " -f msb2lsb force msb-to-lsb FillOrder for output\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - " # set predictor value\n" - " For example, -c lzw:2 for LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - " # set predictor value\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#ifdef CCITT_SUPPORT - " -c g3[:opts] compress output with CCITT Group 3 encoding\n" - " Group 3 options:\n" - " 1d use default CCITT Group 3 1D-encoding\n" - " 2d use optional CCITT Group 3 2D-encoding\n" - " fill byte-align EOL codes\n" - " For example, -c g3:2d:fill for G3-2D-encoded data with byte-aligned " - "EOLs\n" - " -c g4 compress output with CCITT Group 4 encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || \ - defined(PACKBITS_SUPPORT) || defined(CCITT_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - "\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} diff --git a/third_party/libtiff/tools/tiffdump.c b/third_party/libtiff/tools/tiffdump.c deleted file mode 100644 index 5f9347c..0000000 --- a/third_party/libtiff/tools/tiffdump.c +++ /dev/null @@ -1,893 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include /* for isfinite() */ -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffiop.h" - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_IO_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -static union -{ - TIFFHeaderClassic classic; - TIFFHeaderBig big; - TIFFHeaderCommon common; -} hdr; -static char *appname; -static char *curfile; -static int swabflag; -static int bigendian; -static int bigtiff; -static uint32_t maxitems = 24; /* maximum indirect data items to print */ - -static const char bytefmt[] = "%s%#02" PRIx8; /* BYTE */ -static const char sbytefmt[] = "%s%" PRId8; /* SBYTE */ -static const char shortfmtd[] = "%s%" PRIu16; /* SHORT */ -static const char shortfmth[] = "%s%#" PRIx16; -static const char sshortfmtd[] = "%s%" PRId16; /* SSHORT */ -static const char sshortfmth[] = "%s%#" PRIx16; -static const char longfmtd[] = "%s%" PRIu32; /* LONG */ -static const char longfmth[] = "%s%#" PRIx32; -static const char slongfmtd[] = "%s%" PRId32; /* SLONG */ -static const char slongfmth[] = "%s%#" PRIx32; -static const char ifdfmt[] = "%s%#04" PRIx32; /* IFD offset */ -static const char long8fmt[] = "%s%" PRIu64; /* LONG8 */ -static const char slong8fmt[] = "%s%" PRId64; /* SLONG8 */ -static const char ifd8fmt[] = "%s%#08" PRIx64; /* IFD offset8 */ -static const char rationalfmt[] = "%s%g"; /* RATIONAL */ -static const char srationalfmt[] = "%s%g"; /* SRATIONAL */ -static const char floatfmt[] = "%s%g"; /* FLOAT */ -static const char doublefmt[] = "%s%g"; /* DOUBLE */ - -unsigned int hex_mode; - -static void dump(int, uint64_t); - -#if !HAVE_DECL_OPTARG -extern int optind; -extern char *optarg; -#endif - -void usage() -{ - fprintf(stderr, "\nDisplay directory information from TIFF files\n\n"); - fprintf(stderr, "usage: %s [-h] [-o offset] [-m maxitems] file.tif ...\n", - appname); - exit(EXIT_FAILURE); -} - -int main(int argc, char *argv[]) -{ - int one = 1, fd; - int multiplefiles = (argc > 1); - int c; - uint64_t diroff = 0; - hex_mode = 0; - bigendian = (*(char *)&one == 0); - - appname = argv[0]; - while ((c = getopt(argc, argv, "m:o:h")) != -1) - { - switch (c) - { - case 'h': /* print values in hex */ - hex_mode = 1; - break; - case 'o': - diroff = (uint64_t)strtoul(optarg, NULL, 0); - break; - case 'm': - maxitems = strtoul(optarg, NULL, 0); - break; - default: - usage(); - } - } - if (optind >= argc) - usage(); - for (; optind < argc; optind++) - { - fd = open(argv[optind], O_RDONLY | O_BINARY, 0); - if (fd < 0) - { - perror(argv[0]); - return (EXIT_FAILURE); - } - if (multiplefiles) - printf("%s:\n", argv[optind]); - curfile = argv[optind]; - swabflag = 0; - bigtiff = 0; - dump(fd, diroff); - close(fd); - } - return (EXIT_SUCCESS); -} - -#define ord(e) ((int)e) - -static uint64_t ReadDirectory(int, unsigned, uint64_t); -static void ReadError(char *); -static void Error(const char *, ...); -static void Fatal(const char *, ...); - -static void dump(int fd, uint64_t diroff) -{ - unsigned i, j; - uint64_t *visited_diroff = NULL; - unsigned int count_visited_dir = 0; - - _TIFF_lseek_f(fd, (_TIFF_off_t)0, 0); - if (read(fd, (char *)&hdr, sizeof(TIFFHeaderCommon)) != - sizeof(TIFFHeaderCommon)) - ReadError("TIFF header"); - if (hdr.common.tiff_magic != TIFF_BIGENDIAN && - hdr.common.tiff_magic != TIFF_LITTLEENDIAN && -#if HOST_BIGENDIAN - /* MDI is sensitive to the host byte order, unlike TIFF */ - MDI_BIGENDIAN != hdr.common.tiff_magic -#else - MDI_LITTLEENDIAN != hdr.common.tiff_magic -#endif - ) - { - Fatal("Not a TIFF or MDI file, bad magic number %u (%#x)", - hdr.common.tiff_magic, hdr.common.tiff_magic); - } - if (hdr.common.tiff_magic == TIFF_BIGENDIAN || - hdr.common.tiff_magic == MDI_BIGENDIAN) - swabflag = !bigendian; - else - swabflag = bigendian; - if (swabflag) - TIFFSwabShort(&hdr.common.tiff_version); - if (hdr.common.tiff_version == 42) - { - if (read(fd, - ((char *)&hdr.classic) + - offsetof(TIFFHeaderClassic, tiff_diroff), - 4) != 4) - ReadError("TIFF header"); - if (swabflag) - TIFFSwabLong(&hdr.classic.tiff_diroff); - printf("Magic: %#x <%s-endian> Version: %#x <%s>\n", - hdr.classic.tiff_magic, - hdr.classic.tiff_magic == TIFF_BIGENDIAN ? "big" : "little", 42, - "ClassicTIFF"); - if (diroff == 0) - diroff = hdr.classic.tiff_diroff; - } - else if (hdr.common.tiff_version == 43) - { - if (read(fd, - ((char *)&hdr.big) + offsetof(TIFFHeaderBig, tiff_offsetsize), - 12) != 12) - ReadError("TIFF header"); - if (swabflag) - { - TIFFSwabShort(&hdr.big.tiff_offsetsize); - TIFFSwabShort(&hdr.big.tiff_unused); - TIFFSwabLong8(&hdr.big.tiff_diroff); - } - printf("Magic: %#x <%s-endian> Version: %#x <%s>\n", hdr.big.tiff_magic, - hdr.big.tiff_magic == TIFF_BIGENDIAN ? "big" : "little", 43, - "BigTIFF"); - printf("OffsetSize: %#x Unused: %#x\n", hdr.big.tiff_offsetsize, - hdr.big.tiff_unused); - if (diroff == 0) - diroff = hdr.big.tiff_diroff; - bigtiff = 1; - } - else - Fatal("Not a TIFF file, bad version number %u (%#x)", - hdr.common.tiff_version, hdr.common.tiff_version); - for (i = 0; diroff != 0; i++) - { - for (j = 0; j < count_visited_dir; j++) - { - if (visited_diroff[j] == diroff) - { - free(visited_diroff); - Fatal("Cycle detected in chaining of TIFF directories!"); - } - } - { - size_t alloc_size; - alloc_size = TIFFSafeMultiply(tmsize_t, (count_visited_dir + 1), - sizeof(uint64_t)); - if (alloc_size == 0) - { - if (visited_diroff) - free(visited_diroff); - visited_diroff = 0; - } - else - { - visited_diroff = - (uint64_t *)realloc(visited_diroff, alloc_size); - } - } - if (!visited_diroff) - Fatal("Out of memory"); - visited_diroff[count_visited_dir] = diroff; - count_visited_dir++; - - if (i > 0) - putchar('\n'); - diroff = ReadDirectory(fd, i, diroff); - } - if (visited_diroff) - free(visited_diroff); -} - -static const int datawidth[] = { - 0, /* 00 = undefined */ - 1, /* 01 = TIFF_BYTE */ - 1, /* 02 = TIFF_ASCII */ - 2, /* 03 = TIFF_SHORT */ - 4, /* 04 = TIFF_LONG */ - 8, /* 05 = TIFF_RATIONAL */ - 1, /* 06 = TIFF_SBYTE */ - 1, /* 07 = TIFF_UNDEFINED */ - 2, /* 08 = TIFF_SSHORT */ - 4, /* 09 = TIFF_SLONG */ - 8, /* 10 = TIFF_SRATIONAL */ - 4, /* 11 = TIFF_FLOAT */ - 8, /* 12 = TIFF_DOUBLE */ - 4, /* 13 = TIFF_IFD */ - 0, /* 14 = undefined */ - 0, /* 15 = undefined */ - 8, /* 16 = TIFF_LONG8 */ - 8, /* 17 = TIFF_SLONG8 */ - 8, /* 18 = TIFF_IFD8 */ -}; -#define NWIDTHS (sizeof(datawidth) / sizeof(datawidth[0])) -static void PrintTag(FILE *, uint16_t); -static void PrintType(FILE *, uint16_t); -static void PrintData(FILE *, uint16_t, uint32_t, unsigned char *); - -/* - * Read the next TIFF directory from a file - * and convert it to the internal format. - * We read directories sequentially. - */ -static uint64_t ReadDirectory(int fd, unsigned int ix, uint64_t off) -{ - uint16_t dircount; - uint32_t direntrysize; - void *dirmem = NULL; - uint64_t nextdiroff = 0; - uint32_t n; - uint8_t *dp; - - if (off == 0) /* no more directories */ - goto done; - if (_TIFF_lseek_f(fd, (_TIFF_off_t)off, SEEK_SET) != (_TIFF_off_t)off) - { - Fatal("Seek error accessing TIFF directory"); - goto done; - } - if (!bigtiff) - { - if (read(fd, (char *)&dircount, sizeof(uint16_t)) != sizeof(uint16_t)) - { - ReadError("directory count"); - goto done; - } - if (swabflag) - TIFFSwabShort(&dircount); - direntrysize = 12; - } - else - { - uint64_t dircount64 = 0; - if (read(fd, (char *)&dircount64, sizeof(uint64_t)) != sizeof(uint64_t)) - { - ReadError("directory count"); - goto done; - } - if (swabflag) - TIFFSwabLong8(&dircount64); - if (dircount64 > 0xFFFF) - { - Error("Sanity check on directory count failed"); - goto done; - } - dircount = (uint16_t)dircount64; - direntrysize = 20; - } - dirmem = _TIFFmalloc(TIFFSafeMultiply(tmsize_t, dircount, direntrysize)); - if (dirmem == NULL) - { - Fatal("No space for TIFF directory"); - goto done; - } - n = read(fd, (char *)dirmem, dircount * direntrysize); - if (n != dircount * direntrysize) - { - n /= direntrysize; - Error("Could only read %" PRIu32 " of %" PRIu16 - " entries in directory at offset %" PRIu64, - n, dircount, off); - dircount = n; - nextdiroff = 0; - } - else - { - if (!bigtiff) - { - uint32_t nextdiroff32; - if (read(fd, (char *)&nextdiroff32, sizeof(uint32_t)) != - sizeof(uint32_t)) - nextdiroff32 = 0; - if (swabflag) - TIFFSwabLong(&nextdiroff32); - nextdiroff = nextdiroff32; - } - else - { - if (read(fd, (char *)&nextdiroff, sizeof(uint64_t)) != - sizeof(uint64_t)) - nextdiroff = 0; - if (swabflag) - TIFFSwabLong8(&nextdiroff); - } - } - printf("Directory %u: offset %" PRIu64 " (%#" PRIx64 ") next %" PRIu64 - " (%#" PRIx64 ")\n", - ix, off, off, nextdiroff, nextdiroff); - for (dp = (uint8_t *)dirmem, n = dircount; n > 0; n--) - { - uint16_t tag; - uint16_t type; - uint16_t typewidth; - uint64_t count; - uint64_t datasize; - int datafits; - void *datamem; - uint64_t dataoffset; - int datatruncated; - int datasizeoverflow; - - tag = *(uint16_t *)dp; - if (swabflag) - TIFFSwabShort(&tag); - dp += sizeof(uint16_t); - type = *(uint16_t *)dp; - dp += sizeof(uint16_t); - if (swabflag) - TIFFSwabShort(&type); - PrintTag(stdout, tag); - putchar(' '); - PrintType(stdout, type); - putchar(' '); - if (!bigtiff) - { - uint32_t count32; - count32 = *(uint32_t *)dp; - if (swabflag) - TIFFSwabLong(&count32); - dp += sizeof(uint32_t); - count = count32; - } - else - { - memcpy(&count, dp, sizeof(uint64_t)); - if (swabflag) - TIFFSwabLong8(&count); - dp += sizeof(uint64_t); - } - printf("%" PRIu64 "<", count); - if (type >= NWIDTHS) - typewidth = 0; - else - typewidth = datawidth[type]; - datasize = TIFFSafeMultiply(tmsize_t, count, typewidth); - datasizeoverflow = (typewidth > 0 && datasize / typewidth != count); - datafits = 1; - datamem = dp; - dataoffset = 0; - datatruncated = 0; - if (!bigtiff) - { - if (datasizeoverflow || datasize > 4) - { - uint32_t dataoffset32; - datafits = 0; - datamem = NULL; - dataoffset32 = *(uint32_t *)dp; - if (swabflag) - TIFFSwabLong(&dataoffset32); - dataoffset = dataoffset32; - } - dp += sizeof(uint32_t); - } - else - { - if (datasizeoverflow || datasize > 8) - { - datafits = 0; - datamem = NULL; - memcpy(&dataoffset, dp, sizeof(uint64_t)); - if (swabflag) - TIFFSwabLong8(&dataoffset); - } - dp += sizeof(uint64_t); - } - if (datasizeoverflow || datasize > 0x10000) - { - datatruncated = 1; - count = 0x10000 / typewidth; - datasize = TIFFSafeMultiply(tmsize_t, count, typewidth); - } - if (count > maxitems) - { - datatruncated = 1; - count = maxitems; - datasize = TIFFSafeMultiply(tmsize_t, count, typewidth); - } - if (!datafits) - { - datamem = _TIFFmalloc((tmsize_t)datasize); - if (datamem) - { - if (_TIFF_lseek_f(fd, (_TIFF_off_t)dataoffset, 0) != - (_TIFF_off_t)dataoffset) - { - Error("Seek error accessing tag %u value", tag); - _TIFFfree(datamem); - datamem = NULL; - } - else if (read(fd, datamem, (unsigned int)datasize) != - (tmsize_t)datasize) - { - Error("Read error accessing tag %u value", tag); - _TIFFfree(datamem); - datamem = NULL; - } - } - else - Error("No space for data for tag %u", tag); - } - if (datamem) - { - if (swabflag) - { - switch (type) - { - case TIFF_BYTE: - case TIFF_ASCII: - case TIFF_SBYTE: - case TIFF_UNDEFINED: - break; - case TIFF_SHORT: - case TIFF_SSHORT: - TIFFSwabArrayOfShort((uint16_t *)datamem, - (tmsize_t)count); - break; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - case TIFF_IFD: - TIFFSwabArrayOfLong((uint32_t *)datamem, - (tmsize_t)count); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - TIFFSwabArrayOfLong((uint32_t *)datamem, - (tmsize_t)count * 2); - break; - case TIFF_DOUBLE: - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - TIFFSwabArrayOfLong8((uint64_t *)datamem, - (tmsize_t)count); - break; - } - } - PrintData(stdout, type, (uint32_t)count, datamem); - if (datatruncated) - printf(" ..."); - if (!datafits) - { - _TIFFfree(datamem); - datamem = NULL; - } - } - printf(">\n"); - } -done: - if (dirmem) - _TIFFfree((char *)dirmem); - return (nextdiroff); -} - -static const struct tagname -{ - uint16_t tag; - const char *name; -} tagnames[] = { - {TIFFTAG_SUBFILETYPE, "SubFileType"}, - {TIFFTAG_OSUBFILETYPE, "OldSubFileType"}, - {TIFFTAG_IMAGEWIDTH, "ImageWidth"}, - {TIFFTAG_IMAGELENGTH, "ImageLength"}, - {TIFFTAG_BITSPERSAMPLE, "BitsPerSample"}, - {TIFFTAG_COMPRESSION, "Compression"}, - {TIFFTAG_PHOTOMETRIC, "Photometric"}, - {TIFFTAG_THRESHHOLDING, "Threshholding"}, - {TIFFTAG_CELLWIDTH, "CellWidth"}, - {TIFFTAG_CELLLENGTH, "CellLength"}, - {TIFFTAG_FILLORDER, "FillOrder"}, - {TIFFTAG_DOCUMENTNAME, "DocumentName"}, - {TIFFTAG_IMAGEDESCRIPTION, "ImageDescription"}, - {TIFFTAG_MAKE, "Make"}, - {TIFFTAG_MODEL, "Model"}, - {TIFFTAG_STRIPOFFSETS, "StripOffsets"}, - {TIFFTAG_ORIENTATION, "Orientation"}, - {TIFFTAG_SAMPLESPERPIXEL, "SamplesPerPixel"}, - {TIFFTAG_ROWSPERSTRIP, "RowsPerStrip"}, - {TIFFTAG_STRIPBYTECOUNTS, "StripByteCounts"}, - {TIFFTAG_MINSAMPLEVALUE, "MinSampleValue"}, - {TIFFTAG_MAXSAMPLEVALUE, "MaxSampleValue"}, - {TIFFTAG_XRESOLUTION, "XResolution"}, - {TIFFTAG_YRESOLUTION, "YResolution"}, - {TIFFTAG_PLANARCONFIG, "PlanarConfig"}, - {TIFFTAG_PAGENAME, "PageName"}, - {TIFFTAG_XPOSITION, "XPosition"}, - {TIFFTAG_YPOSITION, "YPosition"}, - {TIFFTAG_FREEOFFSETS, "FreeOffsets"}, - {TIFFTAG_FREEBYTECOUNTS, "FreeByteCounts"}, - {TIFFTAG_GRAYRESPONSEUNIT, "GrayResponseUnit"}, - {TIFFTAG_GRAYRESPONSECURVE, "GrayResponseCurve"}, - {TIFFTAG_GROUP3OPTIONS, "Group3Options"}, - {TIFFTAG_GROUP4OPTIONS, "Group4Options"}, - {TIFFTAG_RESOLUTIONUNIT, "ResolutionUnit"}, - {TIFFTAG_PAGENUMBER, "PageNumber"}, - {TIFFTAG_COLORRESPONSEUNIT, "ColorResponseUnit"}, - {TIFFTAG_TRANSFERFUNCTION, "TransferFunction"}, - {TIFFTAG_SOFTWARE, "Software"}, - {TIFFTAG_DATETIME, "DateTime"}, - {TIFFTAG_ARTIST, "Artist"}, - {TIFFTAG_HOSTCOMPUTER, "HostComputer"}, - {TIFFTAG_PREDICTOR, "Predictor"}, - {TIFFTAG_WHITEPOINT, "Whitepoint"}, - {TIFFTAG_PRIMARYCHROMATICITIES, "PrimaryChromaticities"}, - {TIFFTAG_COLORMAP, "Colormap"}, - {TIFFTAG_HALFTONEHINTS, "HalftoneHints"}, - {TIFFTAG_TILEWIDTH, "TileWidth"}, - {TIFFTAG_TILELENGTH, "TileLength"}, - {TIFFTAG_TILEOFFSETS, "TileOffsets"}, - {TIFFTAG_TILEBYTECOUNTS, "TileByteCounts"}, - {TIFFTAG_BADFAXLINES, "BadFaxLines"}, - {TIFFTAG_CLEANFAXDATA, "CleanFaxData"}, - {TIFFTAG_CONSECUTIVEBADFAXLINES, "ConsecutiveBadFaxLines"}, - {TIFFTAG_SUBIFD, "SubIFD"}, - {TIFFTAG_INKSET, "InkSet"}, - {TIFFTAG_INKNAMES, "InkNames"}, - {TIFFTAG_NUMBEROFINKS, "NumberOfInks"}, - {TIFFTAG_DOTRANGE, "DotRange"}, - {TIFFTAG_TARGETPRINTER, "TargetPrinter"}, - {TIFFTAG_EXTRASAMPLES, "ExtraSamples"}, - {TIFFTAG_SAMPLEFORMAT, "SampleFormat"}, - {TIFFTAG_SMINSAMPLEVALUE, "SMinSampleValue"}, - {TIFFTAG_SMAXSAMPLEVALUE, "SMaxSampleValue"}, - {TIFFTAG_JPEGPROC, "JPEGProcessingMode"}, - {TIFFTAG_JPEGIFOFFSET, "JPEGInterchangeFormat"}, - {TIFFTAG_JPEGIFBYTECOUNT, "JPEGInterchangeFormatLength"}, - {TIFFTAG_JPEGRESTARTINTERVAL, "JPEGRestartInterval"}, - {TIFFTAG_JPEGLOSSLESSPREDICTORS, "JPEGLosslessPredictors"}, - {TIFFTAG_JPEGPOINTTRANSFORM, "JPEGPointTransform"}, - {TIFFTAG_JPEGTABLES, "JPEGTables"}, - {TIFFTAG_JPEGQTABLES, "JPEGQTables"}, - {TIFFTAG_JPEGDCTABLES, "JPEGDCTables"}, - {TIFFTAG_JPEGACTABLES, "JPEGACTables"}, - {TIFFTAG_YCBCRCOEFFICIENTS, "YCbCrCoefficients"}, - {TIFFTAG_YCBCRSUBSAMPLING, "YCbCrSubsampling"}, - {TIFFTAG_YCBCRPOSITIONING, "YCbCrPositioning"}, - {TIFFTAG_REFERENCEBLACKWHITE, "ReferenceBlackWhite"}, - {TIFFTAG_REFPTS, "IgReferencePoints (Island Graphics)"}, - {TIFFTAG_REGIONTACKPOINT, "IgRegionTackPoint (Island Graphics)"}, - {TIFFTAG_REGIONWARPCORNERS, "IgRegionWarpCorners (Island Graphics)"}, - {TIFFTAG_REGIONAFFINE, "IgRegionAffine (Island Graphics)"}, - {TIFFTAG_MATTEING, "OBSOLETE Matteing (Silicon Graphics)"}, - {TIFFTAG_DATATYPE, "OBSOLETE DataType (Silicon Graphics)"}, - {TIFFTAG_IMAGEDEPTH, "ImageDepth (Silicon Graphics)"}, - {TIFFTAG_TILEDEPTH, "TileDepth (Silicon Graphics)"}, - {32768, "OLD BOGUS Matteing tag"}, - {TIFFTAG_COPYRIGHT, "Copyright"}, - {TIFFTAG_ICCPROFILE, "ICC Profile"}, - {TIFFTAG_JBIGOPTIONS, "JBIG Options"}, - {TIFFTAG_STONITS, "StoNits"}, - {TIFFTAG_GDAL_METADATA, "GDALMetadata"}, - {TIFFTAG_GDAL_NODATA, "GDALNoDataValue"}, -}; -#define NTAGS (sizeof(tagnames) / sizeof(tagnames[0])) - -static void PrintTag(FILE *fd, uint16_t tag) -{ - const struct tagname *tp; - - for (tp = tagnames; tp < &tagnames[NTAGS]; tp++) - if (tp->tag == tag) - { - fprintf(fd, "%s (%u)", tp->name, tag); - return; - } - fprintf(fd, "%u (%#x)", tag, tag); -} - -static void PrintType(FILE *fd, uint16_t type) -{ - static const char *typenames[] = { - "0", "BYTE", "ASCII", "SHORT", "LONG", - "RATIONAL", "SBYTE", "UNDEFINED", "SSHORT", "SLONG", - "SRATIONAL", "FLOAT", "DOUBLE", "IFD", "14", - "15", "LONG8", "SLONG8", "IFD8"}; -#define NTYPES (sizeof(typenames) / sizeof(typenames[0])) - - if (type < NTYPES) - fprintf(fd, "%s (%u)", typenames[type], type); - else - fprintf(fd, "%u (%#x)", type, type); -} -#undef NTYPES - -#include - -static void PrintASCII(FILE *fd, uint32_t cc, const unsigned char *cp) -{ - for (; cc > 0; cc--, cp++) - { - const char *tp; - - if (isprint(*cp)) - { - fputc(*cp, fd); - continue; - } - for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++) - if (*tp++ == *cp) - break; - if (*tp) - fprintf(fd, "\\%c", *tp); - else if (*cp) - fprintf(fd, "\\%03o", *cp); - else - fprintf(fd, "\\0"); - } -} - -static void PrintData(FILE *fd, uint16_t type, uint32_t count, - unsigned char *data) -{ - char *sep = ""; - - switch (type) - { - case TIFF_BYTE: - while (count-- > 0) - fprintf(fd, bytefmt, sep, *data++), sep = " "; - break; - case TIFF_SBYTE: - while (count-- > 0) - fprintf(fd, sbytefmt, sep, *(char *)data++), sep = " "; - break; - case TIFF_UNDEFINED: - while (count-- > 0) - fprintf(fd, bytefmt, sep, *data++), sep = " "; - break; - case TIFF_ASCII: - PrintASCII(fd, count, data); - break; - case TIFF_SHORT: - { - uint16_t *wp = (uint16_t *)data; - while (count-- > 0) - fprintf(fd, hex_mode ? shortfmth : shortfmtd, sep, *wp++), - sep = " "; - break; - } - case TIFF_SSHORT: - { - int16_t *wp = (int16_t *)data; - while (count-- > 0) - fprintf(fd, hex_mode ? sshortfmth : sshortfmtd, sep, *wp++), - sep = " "; - break; - } - case TIFF_LONG: - { - uint32_t *lp = (uint32_t *)data; - while (count-- > 0) - { - fprintf(fd, hex_mode ? longfmth : longfmtd, sep, *lp++); - sep = " "; - } - break; - } - case TIFF_SLONG: - { - int32_t *lp = (int32_t *)data; - while (count-- > 0) - fprintf(fd, hex_mode ? slongfmth : slongfmtd, sep, *lp++), - sep = " "; - break; - } - case TIFF_LONG8: - { - uint64_t *llp = (uint64_t *)data; - while (count-- > 0) - { - uint64_t val; - memcpy(&val, llp, sizeof(uint64_t)); - llp++; - fprintf(fd, long8fmt, sep, val); - sep = " "; - } - break; - } - case TIFF_SLONG8: - { - int64_t *llp = (int64_t *)data; - while (count-- > 0) - { - int64_t val; - memcpy(&val, llp, sizeof(int64_t)); - llp++; - fprintf(fd, slong8fmt, sep, val); - sep = " "; - } - break; - } - case TIFF_RATIONAL: - { - uint32_t *lp = (uint32_t *)data; - while (count-- > 0) - { - if (lp[1] == 0 || !isfinite((double)lp[1])) - fprintf(fd, "%sNan (%" PRIu32 "/%" PRIu32 ")", sep, lp[0], - lp[1]); - else - fprintf(fd, rationalfmt, sep, - (double)lp[0] / (double)lp[1]); - sep = " "; - lp += 2; - } - break; - } - case TIFF_SRATIONAL: - { - int32_t *lp = (int32_t *)data; - while (count-- > 0) - { - if (lp[1] == 0) - fprintf(fd, "%sNan (%" PRId32 "/%" PRId32 ")", sep, lp[0], - lp[1]); - else - fprintf(fd, srationalfmt, sep, - (double)lp[0] / (double)lp[1]); - sep = " "; - lp += 2; - } - break; - } - case TIFF_FLOAT: - { - float *fp = (float *)data; - while (count-- > 0) - fprintf(fd, floatfmt, sep, *fp++), sep = " "; - break; - } - case TIFF_DOUBLE: - { - double *dp = (double *)data; - while (count-- > 0) - fprintf(fd, doublefmt, sep, *dp++), sep = " "; - break; - } - case TIFF_IFD: - { - uint32_t *lp = (uint32_t *)data; - while (count-- > 0) - { - fprintf(fd, ifdfmt, sep, *lp++); - sep = " "; - } - break; - } - case TIFF_IFD8: - { - uint64_t *llp = (uint64_t *)data; - while (count-- > 0) - { - fprintf(fd, ifd8fmt, sep, *llp++); - sep = " "; - sep = " "; - } - break; - } - } -} - -static void ReadError(char *what) { Fatal("Error while reading %s", what); } - -#include - -static void vError(FILE *fd, const char *fmt, va_list ap) -{ - fprintf(fd, "%s: ", curfile); - vfprintf(fd, fmt, ap); - fprintf(fd, ".\n"); -} - -static void Error(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vError(stderr, fmt, ap); - va_end(ap); -} - -static void Fatal(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vError(stderr, fmt, ap); - va_end(ap); - exit(EXIT_FAILURE); -} diff --git a/third_party/libtiff/tools/tiffgt.c b/third_party/libtiff/tools/tiffgt.c deleted file mode 100644 index 46d0396..0000000 --- a/third_party/libtiff/tools/tiffgt.c +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * Copyright (c) 2003, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include -#if HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_OPENGL_GL_H -#include -#else -#ifdef _WIN32 -#include -#endif -#include -#endif -#ifdef HAVE_GLUT_GLUT_H -#include -#else -#include -#endif - -#include "tiffio.h" -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -static uint32_t width = 0, height = 0; /* window width & height */ -static uint32_t *raster = NULL; /* displayable image */ -static TIFFRGBAImage img; -static int order0 = 0, order; -static uint16_t photo0 = (uint16_t)-1, photo; -static int stoponerr = 0; /* stop on read error */ -static int verbose = 0; -#define TITLE_LENGTH 1024 -static char title[TITLE_LENGTH]; /* window title line */ -static uint32_t xmax, ymax; -static char **filelist = NULL; -static int fileindex; -static int filenum; -static TIFFErrorHandler oerror; -static TIFFErrorHandler owarning; - -static void cleanup_and_exit(int); -static int initImage(void); -static int prevImage(void); -static int nextImage(void); -static void setWindowSize(void); -static void usage(int); -static uint16_t photoArg(const char *); -static void raster_draw(void); -static void raster_reshape(int, int); -static void raster_keys(unsigned char, int, int); -static void raster_special(int, int, int); - -#if !HAVE_DECL_OPTARG -extern char *optarg; -extern int optind; -#endif - -/* GLUT framework on MacOS X produces deprecation warnings */ -#if defined(__GNUC__) && defined(__APPLE__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif - -static TIFF *tif = NULL; - -int main(int argc, char *argv[]) -{ - int c; - int dirnum = -1; - uint32_t diroff = 0; - - oerror = TIFFSetErrorHandler(NULL); - owarning = TIFFSetWarningHandler(NULL); - while ((c = getopt(argc, argv, "d:o:p:eflmsvwh")) != -1) - switch (c) - { - case 'd': - dirnum = atoi(optarg); - break; - case 'e': - oerror = TIFFSetErrorHandler(oerror); - break; - case 'l': - order0 = FILLORDER_LSB2MSB; - break; - case 'm': - order0 = FILLORDER_MSB2LSB; - break; - case 'o': - diroff = strtoul(optarg, NULL, 0); - break; - case 'p': - photo0 = photoArg(optarg); - break; - case 's': - stoponerr = 1; - break; - case 'w': - owarning = TIFFSetWarningHandler(owarning); - break; - case 'v': - verbose = 1; - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - filenum = argc - optind; - if (filenum < 1) - usage(EXIT_FAILURE); - - glutInit(&argc, argv); - glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); - - /* - * Get the screen size - */ - xmax = glutGet(GLUT_SCREEN_WIDTH); - ymax = glutGet(GLUT_SCREEN_HEIGHT); - - /* - * Use 90% of the screen size - */ - xmax = xmax - xmax / 10.0; - ymax = ymax - ymax / 10.0; - - filelist = (char **)_TIFFmalloc(filenum * sizeof(char *)); - if (!filelist) - { - TIFFError(argv[0], "Can not allocate space for the file list."); - return EXIT_FAILURE; - } - _TIFFmemcpy(filelist, argv + optind, filenum * sizeof(char *)); - fileindex = -1; - if (nextImage() < 0) - { - _TIFFfree(filelist); - return EXIT_FAILURE; - } - /* - * Set initial directory if user-specified - * file was opened successfully. - */ - if (dirnum != -1 && !TIFFSetDirectory(tif, dirnum)) - TIFFError(argv[0], "Error, seeking to directory %d", dirnum); - if (diroff != 0 && !TIFFSetSubDirectory(tif, diroff)) - TIFFError(argv[0], "Error, setting subdirectory at %#x", diroff); - order = order0; - photo = photo0; - if (initImage() < 0) - { - _TIFFfree(filelist); - return EXIT_FAILURE; - } - /* - * Create a new window or reconfigure an existing - * one to suit the image to be displayed. - */ - glutInitWindowSize(width, height); - snprintf(title, TITLE_LENGTH - 1, "%s [%u]", filelist[fileindex], - TIFFCurrentDirectory(tif)); - glutCreateWindow(title); - glutDisplayFunc(raster_draw); - glutReshapeFunc(raster_reshape); - glutKeyboardFunc(raster_keys); - glutSpecialFunc(raster_special); - glutMainLoop(); - - cleanup_and_exit(EXIT_SUCCESS); - return EXIT_SUCCESS; -} - -static void cleanup_and_exit(int code) -{ - TIFFRGBAImageEnd(&img); - if (filelist != NULL) - _TIFFfree(filelist); - if (raster != NULL) - _TIFFfree(raster); - if (tif != NULL) - TIFFClose(tif); - exit(code); -} - -static int initImage(void) -{ - uint32_t w, h; - - if (order) - TIFFSetField(tif, TIFFTAG_FILLORDER, order); - if (photo != (uint16_t)-1) - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photo); - if (!TIFFRGBAImageBegin(&img, tif, stoponerr, title)) - { - TIFFError(filelist[fileindex], "%s", title); - TIFFClose(tif); - tif = NULL; - return -1; - } - - /* - * Setup the image raster as required. - */ - h = img.height; - w = img.width; - if (h > ymax) - { - w = (int)(w * ((float)ymax / h)); - h = ymax; - } - if (w > xmax) - { - h = (int)(h * ((float)xmax / w)); - w = xmax; - } - - if (w != width || h != height) - { - uint32_t rastersize = _TIFFMultiply32(tif, img.width, img.height, - "allocating raster buffer"); - if (raster != NULL) - _TIFFfree(raster), raster = NULL; - raster = (uint32_t *)_TIFFCheckMalloc(tif, rastersize, sizeof(uint32_t), - "allocating raster buffer"); - if (raster == NULL) - { - width = height = 0; - TIFFError(filelist[fileindex], "No space for raster buffer"); - cleanup_and_exit(EXIT_FAILURE); - } - width = w; - height = h; - } - TIFFRGBAImageGet(&img, raster, img.width, img.height); -#if HOST_BIGENDIAN - TIFFSwabArrayOfLong(raster, img.width * img.height); -#endif - return 0; -} - -static int prevImage(void) -{ - if (fileindex > 0) - fileindex--; - else if (tif) - return fileindex; - if (tif) - TIFFClose(tif); - tif = TIFFOpen(filelist[fileindex], "r"); - if (tif == NULL) - return -1; - return fileindex; -} - -static int nextImage(void) -{ - if (fileindex < filenum - 1) - fileindex++; - else if (tif) - return fileindex; - if (tif) - TIFFClose(tif); - tif = TIFFOpen(filelist[fileindex], "r"); - if (tif == NULL) - return -1; - return fileindex; -} - -static void setWindowSize(void) { glutReshapeWindow(width, height); } - -static void raster_draw(void) -{ - glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, - (const GLvoid *)raster); - glFlush(); -} - -static void raster_reshape(int win_w, int win_h) -{ - GLfloat xratio = (GLfloat)win_w / img.width; - GLfloat yratio = (GLfloat)win_h / img.height; - int ratio = (int)(((xratio > yratio) ? xratio : yratio) * 100); - - glPixelZoom(xratio, yratio); - glViewport(0, 0, win_w, win_h); - snprintf(title, 1024, "%s [%u] %d%%", filelist[fileindex], - TIFFCurrentDirectory(tif), ratio); - glutSetWindowTitle(title); -} - -static void raster_keys(unsigned char key, int x, int y) -{ - (void)x; - (void)y; - switch (key) - { - case 'b': /* photometric MinIsBlack */ - photo = PHOTOMETRIC_MINISBLACK; - initImage(); - break; - case 'l': /* lsb-to-msb FillOrder */ - order = FILLORDER_LSB2MSB; - initImage(); - break; - case 'm': /* msb-to-lsb FillOrder */ - order = FILLORDER_MSB2LSB; - initImage(); - break; - case 'w': /* photometric MinIsWhite */ - photo = PHOTOMETRIC_MINISWHITE; - initImage(); - break; - case 'W': /* toggle warnings */ - owarning = TIFFSetWarningHandler(owarning); - initImage(); - break; - case 'E': /* toggle errors */ - oerror = TIFFSetErrorHandler(oerror); - initImage(); - break; - case 'z': /* reset to defaults */ - case 'Z': - order = order0; - photo = photo0; - if (owarning == NULL) - owarning = TIFFSetWarningHandler(NULL); - if (oerror == NULL) - oerror = TIFFSetErrorHandler(NULL); - initImage(); - break; - case 'q': /* exit */ - case '\033': - cleanup_and_exit(EXIT_SUCCESS); - } - glutPostRedisplay(); -} - -static void raster_special(int key, int x, int y) -{ - (void)x; - (void)y; - switch (key) - { - case GLUT_KEY_PAGE_UP: /* previous logical image */ - if (TIFFCurrentDirectory(tif) > 0) - { - if (TIFFSetDirectory(tif, TIFFCurrentDirectory(tif) - 1)) - { - initImage(); - setWindowSize(); - } - } - else - { - TIFFRGBAImageEnd(&img); - prevImage(); - initImage(); - setWindowSize(); - } - break; - case GLUT_KEY_PAGE_DOWN: /* next logical image */ - if (!TIFFLastDirectory(tif)) - { - if (TIFFReadDirectory(tif)) - { - initImage(); - setWindowSize(); - } - } - else - { - TIFFRGBAImageEnd(&img); - nextImage(); - initImage(); - setWindowSize(); - } - break; - case GLUT_KEY_HOME: /* 1st image in current file */ - if (TIFFSetDirectory(tif, 0)) - { - TIFFRGBAImageEnd(&img); - initImage(); - setWindowSize(); - } - break; - case GLUT_KEY_END: /* last image in current file */ - TIFFRGBAImageEnd(&img); - while (!TIFFLastDirectory(tif)) - TIFFReadDirectory(tif); - initImage(); - setWindowSize(); - break; - } - glutPostRedisplay(); -} - -/* GLUT framework on MacOS X produces deprecation warnings */ -#if defined(__GNUC__) && defined(__APPLE__) -#pragma GCC diagnostic pop -#endif - -static const char *stuff[] = { - "usage: tiffgt [options] file.tif", - "where options are:", - " -c use colormap visual", - " -d dirnum set initial directory (default is 0)", - " -e enable display of TIFF error messages", - " -l force lsb-to-msb FillOrder", - " -m force msb-to-lsb FillOrder", - " -o offset set initial directory offset", - " -p photo override photometric interpretation", - " -r use fullcolor visual", - " -s stop decoding on first error (default is ignore errors)", - " -v enable verbose mode", - " -w enable display of TIFF warning messages", - NULL}; - -static void usage(int code) -{ - int i; - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - for (i = 0; stuff[i] != NULL; i++) - fprintf(out, "%s\n", stuff[i]); - exit(code); -} - -static uint16_t photoArg(const char *arg) -{ - if (strcmp(arg, "miniswhite") == 0) - return (PHOTOMETRIC_MINISWHITE); - else if (strcmp(arg, "minisblack") == 0) - return (PHOTOMETRIC_MINISBLACK); - else if (strcmp(arg, "rgb") == 0) - return (PHOTOMETRIC_RGB); - else if (strcmp(arg, "palette") == 0) - return (PHOTOMETRIC_PALETTE); - else if (strcmp(arg, "mask") == 0) - return (PHOTOMETRIC_MASK); - else if (strcmp(arg, "separated") == 0) - return (PHOTOMETRIC_SEPARATED); - else if (strcmp(arg, "ycbcr") == 0) - return (PHOTOMETRIC_YCBCR); - else if (strcmp(arg, "cielab") == 0) - return (PHOTOMETRIC_CIELAB); - else if (strcmp(arg, "logl") == 0) - return (PHOTOMETRIC_LOGL); - else if (strcmp(arg, "logluv") == 0) - return (PHOTOMETRIC_LOGLUV); - else - return ((uint16_t)-1); -} diff --git a/third_party/libtiff/tools/tiffinfo.c b/third_party/libtiff/tools/tiffinfo.c deleted file mode 100644 index 28d2918..0000000 --- a/third_party/libtiff/tools/tiffinfo.c +++ /dev/null @@ -1,759 +0,0 @@ -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_STRINGS_H -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffiop.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -static TIFFErrorHandler old_error_handler = 0; -static int status = EXIT_SUCCESS; /* exit status */ -static int showdata = 0; /* show data */ -static int rawdata = 0; /* show raw/decoded data */ -static int showwords = 0; /* show data as bytes/words */ -static int readdata = 0; /* read data in file */ -static int stoponerr = 1; /* stop on first read error */ - -static void usage(int); -static void tiffinfo(TIFF *, uint16_t, long, int); - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -static void PrivateErrorHandler(const char *module, const char *fmt, va_list ap) -{ - if (old_error_handler) - (*old_error_handler)(module, fmt, ap); - status = EXIT_FAILURE; -} - -int main(int argc, char *argv[]) -{ - int dirnum = -1, multiplefiles, c; - uint16_t order = 0; - TIFF *tif; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - long flags = 0; - uint64_t diroff = 0; - int chopstrips = 0; /* disable strip chopping */ - int warn_about_unknown_tags = FALSE; - - while ((c = getopt(argc, argv, "f:o:M:cdDSjilmrsvwz0123456789hW")) != -1) - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - dirnum = atoi(&argv[optind - 1][1]); - break; - case 'd': - showdata++; - /* fall through... */ - case 'D': - readdata++; - break; - case 'c': - flags |= TIFFPRINT_COLORMAP | TIFFPRINT_CURVES; - break; - case 'f': /* fill order */ - if (streq(optarg, "lsb2msb")) - order = FILLORDER_LSB2MSB; - else if (streq(optarg, "msb2lsb")) - order = FILLORDER_MSB2LSB; - else - usage(EXIT_FAILURE); - break; - case 'i': - stoponerr = 0; - break; - case 'M': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - break; - case 'o': - diroff = strtoul(optarg, NULL, 0); - break; - case 'j': - flags |= TIFFPRINT_JPEGQTABLES | TIFFPRINT_JPEGACTABLES | - TIFFPRINT_JPEGDCTABLES; - break; - case 'r': - rawdata = 1; - break; - case 's': - flags |= TIFFPRINT_STRIPS; - break; - case 'w': - showwords = 1; - break; - case 'z': - chopstrips = 1; - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case 'W': - warn_about_unknown_tags = TRUE; - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - if (optind >= argc) - usage(EXIT_FAILURE); - - old_error_handler = TIFFSetErrorHandler(PrivateErrorHandler); - - multiplefiles = (argc - optind > 1); - for (; optind < argc; optind++) - { - if (multiplefiles) - printf("File %s:\n", argv[optind]); - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - status = EXIT_FAILURE; - break; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - TIFFOpenOptionsSetWarnAboutUnknownTags(opts, warn_about_unknown_tags); - tif = TIFFOpenExt(argv[optind], chopstrips ? "rC" : "rc", opts); - TIFFOpenOptionsFree(opts); - if (tif != NULL) - { - if (dirnum != -1) - { - if (TIFFSetDirectory(tif, (tdir_t)dirnum)) - tiffinfo(tif, order, flags, 1); - } - else if (diroff != 0) - { - if (TIFFSetSubDirectory(tif, diroff)) - tiffinfo(tif, order, flags, 1); - } - else - { - do - { - toff_t offset = 0; - tdir_t curdir = TIFFCurrentDirectory(tif); - printf("=== TIFF directory %u ===\n", curdir); - tiffinfo(tif, order, flags, 1); - if (TIFFGetField(tif, TIFFTAG_EXIFIFD, &offset)) - { - printf("--- EXIF directory within directory %u \n", - curdir); - if (TIFFReadEXIFDirectory(tif, offset)) - { - tiffinfo(tif, order, flags, 0); - /*-- Go back to previous directory, (directory is - * reloaded from file!) */ - TIFFSetDirectory(tif, curdir); - } - } - if (TIFFGetField(tif, TIFFTAG_GPSIFD, &offset)) - { - printf("--- GPS directory within directory %u \n", - curdir); - if (TIFFReadGPSDirectory(tif, offset)) - { - tiffinfo(tif, order, flags, 0); - TIFFSetDirectory(tif, curdir); - } - } - /*-- Check for SubIFDs --*/ - uint16_t nCount; - void *vPtr; - uint64_t *subIFDoffsets = NULL; - if (TIFFGetField(tif, TIFFTAG_SUBIFD, &nCount, &vPtr)) - { - if (nCount > 0) - { - subIFDoffsets = malloc(nCount * sizeof(uint64_t)); - if (subIFDoffsets != NULL) - { - memcpy(subIFDoffsets, vPtr, - nCount * sizeof(subIFDoffsets[0])); - printf("--- SubIFD image descriptor tag within " - "TIFF directory %u with array of %d " - "SubIFD chains ---\n", - curdir, nCount); - for (int i = 0; i < nCount; i++) - { - offset = subIFDoffsets[i]; - int s = 0; - if (TIFFSetSubDirectory(tif, offset)) - { - /* print info and check for SubIFD chain - */ - do - { - printf("--- SubIFD %d of chain %d " - "at offset 0x%" PRIx64 - " (%" PRIu64 "):\n", - s, i, offset, offset); - tiffinfo(tif, order, flags, 0); - s++; - } while (TIFFReadDirectory(tif)); - } - } - TIFFSetDirectory(tif, curdir); - free(subIFDoffsets); - subIFDoffsets = NULL; - } - else - { - fprintf(stderr, - "Error: Could not allocate memory for " - "SubIFDs list. SubIFDs not parsed.\n"); - } - } - } - printf("\n"); - } while (TIFFReadDirectory(tif)); - } - TIFFClose(tif); - } - } - return (status); -} - -static const char usage_info[] = - "Display information about TIFF files\n\n" - "usage: tiffinfo [options] input...\n" - "where options are:\n" - " -D read data\n" - " -i ignore read errors\n" - " -c display data for grey/color response curve or " - "colormap\n" - " -d display raw/decoded image data\n" - " -f lsb2msb force lsb-to-msb FillOrder for input\n" - " -f msb2lsb force msb-to-lsb FillOrder for input\n" - " -j show JPEG tables\n" - " -o offset set initial directory offset\n" - " -r read/display raw image data instead of decoded data\n" - " -s display strip offsets and byte counts\n" - " -w display raw data in words rather than bytes\n" - " -z enable strip chopping\n" - " -M size set the memory allocation limit in MiB. 0 to disable limit\n" - " -# set initial directory (first directory is # 0)\n" - " -w show image data as 16-bit words\n" - " -W warn about unknown tags\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} - -static void ShowStrip(tstrip_t strip, unsigned char *pp, uint32_t nrow, - tsize_t scanline) -{ - register tsize_t cc; - - printf("Strip %" PRIu32 ":\n", strip); - while (nrow-- > 0) - { - for (cc = 0; cc < scanline; cc++) - { - printf(" %02x", *pp++); - if (((cc + 1) % 24) == 0) - putchar('\n'); - } - putchar('\n'); - } -} - -void TIFFReadContigStripData(TIFF *tif) -{ - unsigned char *buf; - tsize_t scanline = TIFFScanlineSize(tif); - tmsize_t stripsize = TIFFStripSize(tif); - - if (maxMalloc != 0 && stripsize > maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - stripsize, maxMalloc); - return; - } - buf = (unsigned char *)_TIFFmalloc(stripsize); - if (buf) - { - uint32_t row, h = 0; - uint32_t rowsperstrip = (uint32_t)-1; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - for (row = 0; row < h; row += rowsperstrip) - { - uint32_t nrow = (row + rowsperstrip > h ? h - row : rowsperstrip); - tstrip_t strip = TIFFComputeStrip(tif, row, 0); - if (TIFFReadEncodedStrip(tif, strip, buf, nrow * scanline) < 0) - { - if (stoponerr) - break; - } - else if (showdata) - ShowStrip(strip, buf, nrow, scanline); - } - _TIFFfree(buf); - } - else - { - fprintf(stderr, "Cannot allocate %" TIFF_SSIZE_FORMAT " bytes.\n", - stripsize); - } -} - -void TIFFReadSeparateStripData(TIFF *tif) -{ - unsigned char *buf; - tsize_t scanline = TIFFScanlineSize(tif); - tmsize_t stripsize = TIFFStripSize(tif); - - if (maxMalloc != 0 && stripsize > maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - stripsize, maxMalloc); - return; - } - buf = (unsigned char *)_TIFFmalloc(stripsize); - if (buf) - { - uint32_t row, h = 0; - uint32_t rowsperstrip = (uint32_t)-1; - tsample_t s, samplesperpixel = 0; - - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - for (row = 0; row < h; row += rowsperstrip) - { - for (s = 0; s < samplesperpixel; s++) - { - uint32_t nrow = - (row + rowsperstrip > h ? h - row : rowsperstrip); - tstrip_t strip = TIFFComputeStrip(tif, row, s); - if (TIFFReadEncodedStrip(tif, strip, buf, nrow * scanline) < 0) - { - if (stoponerr) - break; - } - else if (showdata) - ShowStrip(strip, buf, nrow, scanline); - } - } - _TIFFfree(buf); - } - else - { - fprintf(stderr, "Cannot allocate %" TIFF_SSIZE_FORMAT " bytes.\n", - stripsize); - } -} - -static void ShowTile(uint32_t row, uint32_t col, tsample_t sample, - unsigned char *pp, uint32_t nrow, tsize_t rowsize) -{ - uint32_t cc; - - printf("Tile (%" PRIu32 ",%" PRIu32 "", row, col); - if (sample != (tsample_t)-1) - printf(",%" PRIu16, sample); - printf("):\n"); - while (nrow-- > 0) - { - for (cc = 0; cc < (uint32_t)rowsize; cc++) - { - printf(" %02x", *pp++); - if (((cc + 1) % 24) == 0) - putchar('\n'); - } - putchar('\n'); - } -} - -void TIFFReadContigTileData(TIFF *tif) -{ - unsigned char *buf; - tmsize_t rowsize = TIFFTileRowSize(tif); - tmsize_t tilesize = TIFFTileSize(tif); - - if (maxMalloc != 0 && tilesize > maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - tilesize, maxMalloc); - return; - } - buf = (unsigned char *)_TIFFmalloc(tilesize); - if (buf) - { - uint32_t tw = 0, th = 0, w = 0, h = 0; - uint32_t row, col; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - if (rowsize == 0 || th > (size_t)(tilesize / rowsize)) - { - fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n"); - _TIFFfree(buf); - return; - } - for (row = 0; row < h; row += th) - { - for (col = 0; col < w; col += tw) - { - if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0) - { - if (stoponerr) - break; - } - else if (showdata) - ShowTile(row, col, (tsample_t)-1, buf, th, rowsize); - } - } - _TIFFfree(buf); - } - else - { - fprintf(stderr, "Cannot allocate %" TIFF_SSIZE_FORMAT " bytes.\n", - tilesize); - } -} - -void TIFFReadSeparateTileData(TIFF *tif) -{ - unsigned char *buf; - tmsize_t rowsize = TIFFTileRowSize(tif); - tmsize_t tilesize = TIFFTileSize(tif); - - if (maxMalloc != 0 && tilesize > maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - tilesize, maxMalloc); - return; - } - buf = (unsigned char *)_TIFFmalloc(tilesize); - if (buf) - { - uint32_t tw = 0, th = 0, w = 0, h = 0; - uint32_t row, col; - tsample_t s, samplesperpixel = 0; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - if (rowsize == 0 || th > (size_t)(tilesize / rowsize)) - { - fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n"); - _TIFFfree(buf); - return; - } - for (row = 0; row < h; row += th) - { - for (col = 0; col < w; col += tw) - { - for (s = 0; s < samplesperpixel; s++) - { - if (TIFFReadTile(tif, buf, col, row, 0, s) < 0) - { - if (stoponerr) - break; - } - else if (showdata) - ShowTile(row, col, s, buf, th, rowsize); - } - } - } - _TIFFfree(buf); - } - else - { - fprintf(stderr, "Cannot allocate %" TIFF_SSIZE_FORMAT " bytes.\n", - tilesize); - } -} - -void TIFFReadData(TIFF *tif) -{ - uint16_t config = PLANARCONFIG_CONTIG; - - TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config); - if (TIFFIsTiled(tif)) - { - if (config == PLANARCONFIG_CONTIG) - TIFFReadContigTileData(tif); - else - TIFFReadSeparateTileData(tif); - } - else - { - if (config == PLANARCONFIG_CONTIG) - TIFFReadContigStripData(tif); - else - TIFFReadSeparateStripData(tif); - } -} - -static void ShowRawBytes(unsigned char *pp, uint32_t n) -{ - uint32_t i; - - for (i = 0; i < n; i++) - { - printf(" %02x", *pp++); - if (((i + 1) % 24) == 0) - printf("\n "); - } - putchar('\n'); -} - -static void ShowRawWords(uint16_t *pp, uint32_t n) -{ - uint32_t i; - - for (i = 0; i < n; i++) - { - printf(" %04" PRIx16, *pp++); - if (((i + 1) % 15) == 0) - printf("\n "); - } - putchar('\n'); -} - -static void TIFFReadRawDataStriped(TIFF *tif, int bitrev) -{ - tstrip_t nstrips = TIFFNumberOfStrips(tif); - const char *what = "Strip"; - uint64_t *stripbc = NULL; - - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc); - if (stripbc != NULL && nstrips > 0) - { - uint32_t bufsize = 0; - tdata_t buf = NULL; - tstrip_t s; - - for (s = 0; s < nstrips; s++) - { - if (stripbc[s] > bufsize || buf == NULL) - { - tdata_t newbuf; - if (maxMalloc != 0 && stripbc[s] > (uint64_t)maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - (tmsize_t)stripbc[s], maxMalloc); - break; - } - newbuf = _TIFFrealloc(buf, (tmsize_t)stripbc[s]); - if (newbuf == NULL) - { - fprintf(stderr, - "Cannot allocate buffer to read strip %" PRIu32 - "\n", - s); - break; - } - bufsize = (uint32_t)stripbc[s]; - buf = newbuf; - } - if (TIFFReadRawStrip(tif, s, buf, (tmsize_t)stripbc[s]) < 0) - { - fprintf(stderr, "Error reading strip %" PRIu32 "\n", s); - if (stoponerr) - break; - } - else if (showdata) - { - if (bitrev) - { - TIFFReverseBits(buf, (tmsize_t)stripbc[s]); - printf("%s %" PRIu32 ": (bit reversed)\n ", what, s); - } - else - printf("%s %" PRIu32 ":\n ", what, s); - if (showwords) - ShowRawWords((uint16_t *)buf, (uint32_t)stripbc[s] >> 1); - else - ShowRawBytes((unsigned char *)buf, (uint32_t)stripbc[s]); - } - } - if (buf != NULL) - _TIFFfree(buf); - } -} - -static void TIFFReadRawDataTiled(TIFF *tif, int bitrev) -{ - const char *what = "Tile"; - uint32_t ntiles = TIFFNumberOfTiles(tif); - uint64_t *tilebc = NULL; - - TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &tilebc); - if (tilebc != NULL && ntiles > 0) - { - uint64_t bufsize = 0; - tdata_t buf = NULL; - uint32_t t; - - for (t = 0; t < ntiles; t++) - { - if (tilebc[t] > bufsize || buf == NULL) - { - tdata_t newbuf; - if (maxMalloc != 0 && tilebc[t] > (uint64_t)maxMalloc) - { - fprintf(stderr, - "Memory allocation attempt %" TIFF_SSIZE_FORMAT - " over memory limit (%" TIFF_SSIZE_FORMAT ")\n", - (tmsize_t)tilebc[t], maxMalloc); - break; - } - newbuf = _TIFFrealloc(buf, (tmsize_t)tilebc[t]); - if (newbuf == NULL) - { - fprintf(stderr, - "Cannot allocate buffer to read tile %" PRIu32 "\n", - t); - break; - } - bufsize = (uint32_t)tilebc[t]; - buf = newbuf; - } - if (TIFFReadRawTile(tif, t, buf, (tmsize_t)tilebc[t]) < 0) - { - fprintf(stderr, "Error reading tile %" PRIu32 "\n", t); - if (stoponerr) - break; - } - else if (showdata) - { - if (bitrev) - { - TIFFReverseBits(buf, (tmsize_t)tilebc[t]); - printf("%s %" PRIu32 ": (bit reversed)\n ", what, t); - } - else - { - printf("%s %" PRIu32 ":\n ", what, t); - } - if (showwords) - { - ShowRawWords((uint16_t *)buf, (uint32_t)(tilebc[t] >> 1)); - } - else - { - ShowRawBytes((unsigned char *)buf, (uint32_t)tilebc[t]); - } - } - } - if (buf != NULL) - _TIFFfree(buf); - } -} - -void TIFFReadRawData(TIFF *tif, int bitrev) -{ - if (TIFFIsTiled(tif)) - { - TIFFReadRawDataTiled(tif, bitrev); - } - else - { - TIFFReadRawDataStriped(tif, bitrev); - } -} - -static void tiffinfo(TIFF *tif, uint16_t order, long flags, int is_image) -{ - TIFFPrintDirectory(tif, stdout, flags); - if (!readdata || !is_image) - return; - if (rawdata) - { - if (order) - { - uint16_t o; - TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &o); - TIFFReadRawData(tif, o != order); - } - else - TIFFReadRawData(tif, 0); - } - else - { - if (order) - TIFFSetField(tif, TIFFTAG_FILLORDER, order); - TIFFReadData(tif); - } -} diff --git a/third_party/libtiff/tools/tiffmedian.c b/third_party/libtiff/tools/tiffmedian.c deleted file mode 100644 index dc3e121..0000000 --- a/third_party/libtiff/tools/tiffmedian.c +++ /dev/null @@ -1,1016 +0,0 @@ -/* - * Apply median cut on an image. - * - * tiffmedian [-c n] [-f] input output - * -C n - set colortable size. Default is 256. - * -f - use Floyd-Steinberg dithering. - * -c lzw - compress output with LZW - * -c none - use no compression on output - * -c packbits - use packbits compression on output - * -r n - create output with n rows/strip of data - * (by default the compression scheme and rows/strip are taken - * from the input file) - * - * Notes: - * - * [1] Floyd-Steinberg dither: - * I should point out that the actual fractions we used were, assuming - * you are at X, moving left to right: - * - * X 7/16 - * 3/16 5/16 1/16 - * - * Note that the error goes to four neighbors, not three. I think this - * will probably do better (at least for black and white) than the - * 3/8-3/8-1/4 distribution, at the cost of greater processing. I have - * seen the 3/8-3/8-1/4 distribution described as "our" algorithm before, - * but I have no idea who the credit really belongs to. - - * Also, I should add that if you do zig-zag scanning (see my immediately - * previous message), it is sufficient (but not quite as good) to send - * half the error one pixel ahead (e.g. to the right on lines you scan - * left to right), and half one pixel straight down. Again, this is for - * black and white; I've not tried it with color. - * -- - * Lou Steinberg - * - * [2] Color Image Quantization for Frame Buffer Display, Paul Heckbert, - * Siggraph '82 proceedings, pp. 297-307 - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define MAX_CMAP_SIZE 256 - -#define streq(a, b) (strcmp(a, b) == 0) -#define strneq(a, b, n) (strncmp(a, b, n) == 0) - -#define COLOR_DEPTH 8 -#define MAX_COLOR 256 - -#define B_DEPTH 5 /* # bits/pixel to use */ -#define B_LEN (1L << B_DEPTH) - -#define C_DEPTH 2 -#define C_LEN (1L << C_DEPTH) /* # cells/color to use */ - -#define COLOR_SHIFT (COLOR_DEPTH - B_DEPTH) - -typedef struct colorbox -{ - struct colorbox *next, *prev; - int rmin, rmax; - int gmin, gmax; - int bmin, bmax; - uint32_t total; -} Colorbox; - -typedef struct -{ - int num_ents; - int entries[MAX_CMAP_SIZE][2]; -} C_cell; - -static uint16_t rm[MAX_CMAP_SIZE], gm[MAX_CMAP_SIZE], bm[MAX_CMAP_SIZE]; -static int num_colors; -static uint32_t histogram[B_LEN][B_LEN][B_LEN]; -static Colorbox *freeboxes; -static Colorbox *usedboxes; -static C_cell **ColorCells; -static TIFF *in, *out; -static uint32_t rowsperstrip = (uint32_t)-1; -static uint16_t compression = (uint16_t)-1; -static uint16_t bitspersample = 1; -static uint16_t samplesperpixel; -static uint32_t imagewidth; -static uint32_t imagelength; -static uint16_t predictor = 0; - -static void get_histogram(TIFF *, Colorbox *); -static void splitbox(Colorbox *); -static void shrinkbox(Colorbox *); -static void map_colortable(void); -static void quant(TIFF *, TIFF *); -static void quant_fsdither(TIFF *, TIFF *); -static Colorbox *largest_box(void); - -static void usage(int); -static int processCompressOptions(char *); - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) - -int main(int argc, char *argv[]) -{ - int i, dither = 0; - uint16_t shortv, config, photometric; - Colorbox *box_list, *ptr; - float floatv; - uint32_t longv; - int c; -#if !HAVE_DECL_OPTARG - extern int optind; - extern char *optarg; -#endif - - num_colors = MAX_CMAP_SIZE; - while ((c = getopt(argc, argv, "c:C:r:fh")) != -1) - switch (c) - { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(EXIT_FAILURE); - break; - case 'C': /* set colormap size */ - num_colors = atoi(optarg); - if (num_colors > MAX_CMAP_SIZE) - { - fprintf(stderr, "-C: colormap too big, max %d\n", - MAX_CMAP_SIZE); - usage(EXIT_FAILURE); - } - if (num_colors < 2) - { - fprintf(stderr, "-C: colormap too small, min %d\n", 2); - usage(EXIT_FAILURE); - } - break; - case 'f': /* dither */ - dither = 1; - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'h': - usage(EXIT_SUCCESS); - /*NOTREACHED*/ - break; - case '?': - usage(EXIT_FAILURE); - /*NOTREACHED*/ - break; - } - if (argc - optind != 2) - usage(EXIT_FAILURE); - in = TIFFOpen(argv[optind], "r"); - if (in == NULL) - return (EXIT_FAILURE); - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); - TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); - if (bitspersample != 8 && bitspersample != 16) - { - fprintf(stderr, "%s: Image must have at least 8-bits/sample\n", - argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric) || - photometric != PHOTOMETRIC_RGB || samplesperpixel < 3) - { - fprintf(stderr, "%s: Image must have RGB data\n", argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); - if (config != PLANARCONFIG_CONTIG) - { - fprintf(stderr, "%s: Can only handle contiguous data packing\n", - argv[optind]); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - - /* - * STEP 1: create empty boxes - */ - usedboxes = NULL; - box_list = freeboxes = - (Colorbox *)_TIFFmalloc(num_colors * sizeof(Colorbox)); - freeboxes[0].next = &freeboxes[1]; - freeboxes[0].prev = NULL; - for (i = 1; i < num_colors - 1; ++i) - { - freeboxes[i].next = &freeboxes[i + 1]; - freeboxes[i].prev = &freeboxes[i - 1]; - } - freeboxes[num_colors - 1].next = NULL; - freeboxes[num_colors - 1].prev = &freeboxes[num_colors - 2]; - - /* - * STEP 2: get histogram, initialize first box - */ - ptr = freeboxes; - freeboxes = ptr->next; - if (freeboxes) - freeboxes->prev = NULL; - ptr->next = usedboxes; - usedboxes = ptr; - if (ptr->next) - ptr->next->prev = ptr; - get_histogram(in, ptr); - - /* - * STEP 3: continually subdivide boxes until no more free - * boxes remain or until all colors assigned. - */ - while (freeboxes != NULL) - { - ptr = largest_box(); - if (ptr != NULL) - splitbox(ptr); - else - freeboxes = NULL; - } - - /* - * STEP 4: assign colors to all boxes - */ - for (i = 0, ptr = usedboxes; ptr != NULL; ++i, ptr = ptr->next) - { - rm[i] = ((ptr->rmin + ptr->rmax) << COLOR_SHIFT) / 2; - gm[i] = ((ptr->gmin + ptr->gmax) << COLOR_SHIFT) / 2; - bm[i] = ((ptr->bmin + ptr->bmax) << COLOR_SHIFT) / 2; - } - - /* We're done with the boxes now */ - _TIFFfree(box_list); - freeboxes = usedboxes = NULL; - - /* - * STEP 5: scan histogram and map all values to closest color - */ - /* 5a: create cell list as described in Heckbert[2] */ - ColorCells = - (C_cell **)_TIFFmalloc(C_LEN * C_LEN * C_LEN * sizeof(C_cell *)); - _TIFFmemset(ColorCells, 0, C_LEN * C_LEN * C_LEN * sizeof(C_cell *)); - /* 5b: create mapping from truncated pixel space to color - table entries */ - map_colortable(); - - /* - * STEP 6: scan image, match input values to table entries - */ - out = TIFFOpen(argv[optind + 1], "w"); - if (out == NULL) - { - _TIFFfree(ColorCells); - (void)TIFFClose(in); - return (EXIT_FAILURE); - } - - CopyField(TIFFTAG_SUBFILETYPE, longv); - CopyField(TIFFTAG_IMAGEWIDTH, longv); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, (short)COLOR_DEPTH); - if (compression != (uint16_t)-1) - { - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - switch (compression) - { - case COMPRESSION_LZW: - case COMPRESSION_ADOBE_DEFLATE: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - } - else - CopyField(TIFFTAG_COMPRESSION, compression); - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, (short)PHOTOMETRIC_PALETTE); - CopyField(TIFFTAG_ORIENTATION, shortv); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, (short)1); - CopyField(TIFFTAG_PLANARCONFIG, shortv); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - CopyField(TIFFTAG_MINSAMPLEVALUE, shortv); - CopyField(TIFFTAG_MAXSAMPLEVALUE, shortv); - CopyField(TIFFTAG_RESOLUTIONUNIT, shortv); - CopyField(TIFFTAG_XRESOLUTION, floatv); - CopyField(TIFFTAG_YRESOLUTION, floatv); - CopyField(TIFFTAG_XPOSITION, floatv); - CopyField(TIFFTAG_YPOSITION, floatv); - - if (dither) - quant_fsdither(in, out); - else - quant(in, out); - /* - * Scale colormap to TIFF-required 16-bit values. - */ -#define SCALE(x) (((x) * ((1L << 16) - 1)) / 255) - for (i = 0; i < MAX_CMAP_SIZE; ++i) - { - rm[i] = SCALE(rm[i]); - gm[i] = SCALE(gm[i]); - bm[i] = SCALE(bm[i]); - } - TIFFSetField(out, TIFFTAG_COLORMAP, rm, gm, bm); - (void)TIFFClose(out); - (void)TIFFClose(in); - _TIFFfree(ColorCells); - return (EXIT_SUCCESS); -} - -static int processCompressOptions(char *opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "lzw", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_LZW; - } - else if (strneq(opt, "zip", 3)) - { - char *cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp + 1); - compression = COMPRESSION_ADOBE_DEFLATE; - } - else - return (0); - return (1); -} - -static const char usage_info[] = - "Apply the median cut algorithm to an RGB TIFF file\n\n" - "usage: tiffmedian [options] input.tif output.tif\n" - "where options are:\n" - " -r # make each strip have no more than # rows\n" - " -C # create a colormap with # entries\n" - " -f use Floyd-Steinberg dithering\n" - "\n" -#ifdef LZW_SUPPORT - " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding\n" - /* " LZW options:" */ - " # set predictor value\n" - " For example, -c lzw:2 to get LZW-encoded data with horizontal " - "differencing\n" -#endif -#ifdef ZIP_SUPPORT - " -c zip[:opts] compress output with deflate encoding\n" - /* " Deflate (ZIP) options:" */ - " # set predictor value\n" -#endif -#ifdef PACKBITS_SUPPORT - " -c packbits compress output with packbits encoding\n" -#endif -#if defined(LZW_SUPPORT) || defined(ZIP_SUPPORT) || defined(PACKBITS_SUPPORT) - " -c none use no compression algorithm on output\n" -#endif - "\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usage_info); - exit(code); -} - -static void get_histogram(TIFF *in, Colorbox *box) -{ - register unsigned char *inptr; - register int red, green, blue; - register uint32_t j, i; - unsigned char *inputline; - - inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - if (inputline == NULL) - { - fprintf(stderr, "No space for scanline buffer\n"); - exit(EXIT_FAILURE); - } - box->rmin = box->gmin = box->bmin = 999; - box->rmax = box->gmax = box->bmax = -1; - box->total = imagewidth * imagelength; - - { - register uint32_t *ptr = &histogram[0][0][0]; - for (i = B_LEN * B_LEN * B_LEN; i-- > 0;) - *ptr++ = 0; - } - for (i = 0; i < imagelength; i++) - { - if (TIFFReadScanline(in, inputline, i, 0) <= 0) - { - fprintf(stderr, "Error reading scanline\n"); - exit(EXIT_FAILURE); - } - inptr = inputline; - for (j = imagewidth; j-- > 0;) - { - red = (*inptr++) & 0xff >> COLOR_SHIFT; - green = (*inptr++) & 0xff >> COLOR_SHIFT; - blue = (*inptr++) & 0xff >> COLOR_SHIFT; - if ((red | green | blue) >= B_LEN) - { - fprintf(stderr, "Logic error. " - "Histogram array overflow!\n"); - exit(EXIT_FAILURE); - } - if (red < box->rmin) - box->rmin = red; - if (red > box->rmax) - box->rmax = red; - if (green < box->gmin) - box->gmin = green; - if (green > box->gmax) - box->gmax = green; - if (blue < box->bmin) - box->bmin = blue; - if (blue > box->bmax) - box->bmax = blue; - histogram[red][green][blue]++; - } - } - _TIFFfree(inputline); -} - -static Colorbox *largest_box(void) -{ - register Colorbox *p, *b; - register uint32_t size; - - b = NULL; - size = 0; - for (p = usedboxes; p != NULL; p = p->next) - if ((p->rmax > p->rmin || p->gmax > p->gmin || p->bmax > p->bmin) && - p->total > size) - size = (b = p)->total; - return (b); -} - -static void splitbox(Colorbox *ptr) -{ - uint32_t hist2[B_LEN]; - int first = 0, last = 0; - register Colorbox *new; - register uint32_t *iptr, *histp; - register int i, j; - register int ir, ig, ib; - register uint32_t sum, sum1, sum2; - enum - { - RED, - GREEN, - BLUE - } axis; - - /* - * See which axis is the largest, do a histogram along that - * axis. Split at median point. Contract both new boxes to - * fit points and return - */ - i = ptr->rmax - ptr->rmin; - if (i >= ptr->gmax - ptr->gmin && i >= ptr->bmax - ptr->bmin) - axis = RED; - else if (ptr->gmax - ptr->gmin >= ptr->bmax - ptr->bmin) - axis = GREEN; - else - axis = BLUE; - /* get histogram along longest axis */ - switch (axis) - { - case RED: - histp = &hist2[ptr->rmin]; - for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) - { - *histp = 0; - for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) - { - iptr = &histogram[ir][ig][ptr->bmin]; - for (ib = ptr->bmin; ib <= ptr->bmax; ++ib) - *histp += *iptr++; - } - histp++; - } - first = ptr->rmin; - last = ptr->rmax; - break; - case GREEN: - histp = &hist2[ptr->gmin]; - for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) - { - *histp = 0; - for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) - { - iptr = &histogram[ir][ig][ptr->bmin]; - for (ib = ptr->bmin; ib <= ptr->bmax; ++ib) - *histp += *iptr++; - } - histp++; - } - first = ptr->gmin; - last = ptr->gmax; - break; - case BLUE: - histp = &hist2[ptr->bmin]; - for (ib = ptr->bmin; ib <= ptr->bmax; ++ib) - { - *histp = 0; - for (ir = ptr->rmin; ir <= ptr->rmax; ++ir) - { - iptr = &histogram[ir][ptr->gmin][ib]; - for (ig = ptr->gmin; ig <= ptr->gmax; ++ig) - { - *histp += *iptr; - iptr += B_LEN; - } - } - histp++; - } - first = ptr->bmin; - last = ptr->bmax; - break; - } - /* find median point */ - sum2 = ptr->total / 2; - histp = &hist2[first]; - sum = 0; - for (i = first; i <= last && (sum += *histp++) < sum2; ++i) - ; - if (i == first) - i++; - - /* Create new box, re-allocate points */ - new = freeboxes; - freeboxes = new->next; - if (freeboxes) - freeboxes->prev = NULL; - if (usedboxes) - usedboxes->prev = new; - new->next = usedboxes; - usedboxes = new; - - histp = &hist2[first]; - for (sum1 = 0, j = first; j < i; j++) - sum1 += *histp++; - for (sum2 = 0, j = i; j <= last; j++) - sum2 += *histp++; - new->total = sum1; - ptr->total = sum2; - - new->rmin = ptr->rmin; - new->rmax = ptr->rmax; - new->gmin = ptr->gmin; - new->gmax = ptr->gmax; - new->bmin = ptr->bmin; - new->bmax = ptr->bmax; - switch (axis) - { - case RED: - new->rmax = i - 1; - ptr->rmin = i; - break; - case GREEN: - new->gmax = i - 1; - ptr->gmin = i; - break; - case BLUE: - new->bmax = i - 1; - ptr->bmin = i; - break; - } - shrinkbox(new); - shrinkbox(ptr); -} - -static void shrinkbox(Colorbox *box) -{ - register uint32_t *histp; - register int ir, ig, ib; - - if (box->rmax > box->rmin) - { - for (ir = box->rmin; ir <= box->rmax; ++ir) - for (ig = box->gmin; ig <= box->gmax; ++ig) - { - histp = &histogram[ir][ig][box->bmin]; - for (ib = box->bmin; ib <= box->bmax; ++ib) - if (*histp++ != 0) - { - box->rmin = ir; - goto have_rmin; - } - } - have_rmin: - if (box->rmax > box->rmin) - for (ir = box->rmax; ir >= box->rmin; --ir) - for (ig = box->gmin; ig <= box->gmax; ++ig) - { - histp = &histogram[ir][ig][box->bmin]; - ib = box->bmin; - for (; ib <= box->bmax; ++ib) - if (*histp++ != 0) - { - box->rmax = ir; - goto have_rmax; - } - } - } -have_rmax: - if (box->gmax > box->gmin) - { - for (ig = box->gmin; ig <= box->gmax; ++ig) - for (ir = box->rmin; ir <= box->rmax; ++ir) - { - histp = &histogram[ir][ig][box->bmin]; - for (ib = box->bmin; ib <= box->bmax; ++ib) - if (*histp++ != 0) - { - box->gmin = ig; - goto have_gmin; - } - } - have_gmin: - if (box->gmax > box->gmin) - for (ig = box->gmax; ig >= box->gmin; --ig) - for (ir = box->rmin; ir <= box->rmax; ++ir) - { - histp = &histogram[ir][ig][box->bmin]; - ib = box->bmin; - for (; ib <= box->bmax; ++ib) - if (*histp++ != 0) - { - box->gmax = ig; - goto have_gmax; - } - } - } -have_gmax: - if (box->bmax > box->bmin) - { - for (ib = box->bmin; ib <= box->bmax; ++ib) - for (ir = box->rmin; ir <= box->rmax; ++ir) - { - histp = &histogram[ir][box->gmin][ib]; - for (ig = box->gmin; ig <= box->gmax; ++ig) - { - if (*histp != 0) - { - box->bmin = ib; - goto have_bmin; - } - histp += B_LEN; - } - } - have_bmin: - if (box->bmax > box->bmin) - for (ib = box->bmax; ib >= box->bmin; --ib) - for (ir = box->rmin; ir <= box->rmax; ++ir) - { - histp = &histogram[ir][box->gmin][ib]; - ig = box->gmin; - for (; ig <= box->gmax; ++ig) - { - if (*histp != 0) - { - box->bmax = ib; - goto have_bmax; - } - histp += B_LEN; - } - } - } -have_bmax:; -} - -static C_cell *create_colorcell(int red, int green, int blue) -{ - register int ir, ig, ib, i; - register C_cell *ptr; - int mindist, next_n; - register int tmp, dist, n; - - ir = red >> (COLOR_DEPTH - C_DEPTH); - ig = green >> (COLOR_DEPTH - C_DEPTH); - ib = blue >> (COLOR_DEPTH - C_DEPTH); - ptr = (C_cell *)_TIFFmalloc(sizeof(C_cell)); - *(ColorCells + ir * C_LEN * C_LEN + ig * C_LEN + ib) = ptr; - ptr->num_ents = 0; - - /* - * Step 1: find all colors inside this cell, while we're at - * it, find distance of centermost point to furthest corner - */ - mindist = 99999999; - for (i = 0; i < num_colors; ++i) - { - if (rm[i] >> (COLOR_DEPTH - C_DEPTH) != ir || - gm[i] >> (COLOR_DEPTH - C_DEPTH) != ig || - bm[i] >> (COLOR_DEPTH - C_DEPTH) != ib) - continue; - ptr->entries[ptr->num_ents][0] = i; - ptr->entries[ptr->num_ents][1] = 0; - ++ptr->num_ents; - tmp = rm[i] - red; - if (tmp < (MAX_COLOR / C_LEN / 2)) - tmp = MAX_COLOR / C_LEN - 1 - tmp; - dist = tmp * tmp; - tmp = gm[i] - green; - if (tmp < (MAX_COLOR / C_LEN / 2)) - tmp = MAX_COLOR / C_LEN - 1 - tmp; - dist += tmp * tmp; - tmp = bm[i] - blue; - if (tmp < (MAX_COLOR / C_LEN / 2)) - tmp = MAX_COLOR / C_LEN - 1 - tmp; - dist += tmp * tmp; - if (dist < mindist) - mindist = dist; - } - - /* - * Step 3: find all points within that distance to cell. - */ - for (i = 0; i < num_colors; ++i) - { - if (rm[i] >> (COLOR_DEPTH - C_DEPTH) == ir && - gm[i] >> (COLOR_DEPTH - C_DEPTH) == ig && - bm[i] >> (COLOR_DEPTH - C_DEPTH) == ib) - continue; - dist = 0; - if ((tmp = red - rm[i]) > 0 || - (tmp = rm[i] - (red + MAX_COLOR / C_LEN - 1)) > 0) - dist += tmp * tmp; - if ((tmp = green - gm[i]) > 0 || - (tmp = gm[i] - (green + MAX_COLOR / C_LEN - 1)) > 0) - dist += tmp * tmp; - if ((tmp = blue - bm[i]) > 0 || - (tmp = bm[i] - (blue + MAX_COLOR / C_LEN - 1)) > 0) - dist += tmp * tmp; - if (dist < mindist) - { - ptr->entries[ptr->num_ents][0] = i; - ptr->entries[ptr->num_ents][1] = dist; - ++ptr->num_ents; - } - } - - /* - * Sort color cells by distance, use cheap exchange sort - */ - for (n = ptr->num_ents - 1; n > 0; n = next_n) - { - next_n = 0; - for (i = 0; i < n; ++i) - if (ptr->entries[i][1] > ptr->entries[i + 1][1]) - { - tmp = ptr->entries[i][0]; - ptr->entries[i][0] = ptr->entries[i + 1][0]; - ptr->entries[i + 1][0] = tmp; - tmp = ptr->entries[i][1]; - ptr->entries[i][1] = ptr->entries[i + 1][1]; - ptr->entries[i + 1][1] = tmp; - next_n = i; - } - } - return (ptr); -} - -static void map_colortable(void) -{ - register uint32_t *histp = &histogram[0][0][0]; - register C_cell *cell = NULL; - register int j, tmp, d2, dist; - int ir, ig, ib, i; - - for (ir = 0; ir < B_LEN; ++ir) - for (ig = 0; ig < B_LEN; ++ig) - for (ib = 0; ib < B_LEN; ++ib, histp++) - { - if (*histp == 0) - { - *histp = -1; - continue; - } - cell = *(ColorCells + - (((ir >> (B_DEPTH - C_DEPTH)) << C_DEPTH * 2) + - ((ig >> (B_DEPTH - C_DEPTH)) << C_DEPTH) + - (ib >> (B_DEPTH - C_DEPTH)))); - if (cell == NULL) - cell = - create_colorcell(ir << COLOR_SHIFT, ig << COLOR_SHIFT, - ib << COLOR_SHIFT); - dist = 9999999; - for (i = 0; i < cell->num_ents && dist > cell->entries[i][1]; - ++i) - { - j = cell->entries[i][0]; - d2 = rm[j] - (ir << COLOR_SHIFT); - d2 *= d2; - tmp = gm[j] - (ig << COLOR_SHIFT); - d2 += tmp * tmp; - tmp = bm[j] - (ib << COLOR_SHIFT); - d2 += tmp * tmp; - if (d2 < dist) - { - dist = d2; - *histp = j; - } - } - } - _TIFFfree(cell); -} - -/* - * straight quantization. Each pixel is mapped to the colors - * closest to it. Color values are rounded to the nearest color - * table entry. - */ -static void quant(TIFF *in, TIFF *out) -{ - unsigned char *outline, *inputline; - register unsigned char *outptr, *inptr; - register uint32_t i, j; - register int red, green, blue; - - inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - outline = (unsigned char *)_TIFFmalloc(imagewidth); - for (i = 0; i < imagelength; i++) - { - if (TIFFReadScanline(in, inputline, i, 0) <= 0) - break; - inptr = inputline; - outptr = outline; - for (j = 0; j < imagewidth; j++) - { - red = *inptr++ >> COLOR_SHIFT; - green = *inptr++ >> COLOR_SHIFT; - blue = *inptr++ >> COLOR_SHIFT; - *outptr++ = (unsigned char)histogram[red][green][blue]; - } - if (TIFFWriteScanline(out, outline, i, 0) < 0) - break; - } - _TIFFfree(inputline); - _TIFFfree(outline); -} - -#define SWAP(type, a, b) \ - { \ - type p; \ - p = a; \ - a = b; \ - b = p; \ - } - -#define GetInputLine(tif, row, bad) \ - do \ - { \ - if (TIFFReadScanline(tif, inputline, row, 0) <= 0) \ - bad; \ - inptr = inputline; \ - nextptr = nextline; \ - for (j = 0; j < imagewidth; ++j) \ - { \ - *nextptr++ = *inptr++; \ - *nextptr++ = *inptr++; \ - *nextptr++ = *inptr++; \ - } \ - } while (0); -#define GetComponent(raw, cshift, c) \ - do \ - { \ - cshift = raw; \ - if (cshift < 0) \ - cshift = 0; \ - else if (cshift >= MAX_COLOR) \ - cshift = MAX_COLOR - 1; \ - c = cshift; \ - cshift >>= COLOR_SHIFT; \ - } while (0); - -static void quant_fsdither(TIFF *in, TIFF *out) -{ - unsigned char *outline, *inputline, *inptr; - short *thisline, *nextline; - register unsigned char *outptr; - register short *thisptr, *nextptr; - register uint32_t i, j; - uint32_t imax, jmax; - int lastline, lastpixel; - - imax = imagelength - 1; - jmax = imagewidth - 1; - inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - thisline = (short *)_TIFFmalloc(imagewidth * 3 * sizeof(short)); - nextline = (short *)_TIFFmalloc(imagewidth * 3 * sizeof(short)); - outline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); - - GetInputLine(in, 0, goto bad); /* get first line */ - for (i = 0; i < imagelength; ++i) - { - SWAP(short *, thisline, nextline); - lastline = (i == imax); - if (i <= imax) - GetInputLine(in, i, break); - thisptr = thisline; - nextptr = nextline; - outptr = outline; - for (j = 0; j < imagewidth; ++j) - { - int red, green, blue; - register int oval, r2, g2, b2; - - lastpixel = (j == jmax); - GetComponent(*thisptr++, r2, red); - GetComponent(*thisptr++, g2, green); - GetComponent(*thisptr++, b2, blue); - oval = histogram[r2][g2][b2]; - if (oval == -1) - { - int ci; - register int cj, tmp, d2, dist; - register C_cell *cell; - - cell = *(ColorCells + - (((r2 >> (B_DEPTH - C_DEPTH)) << C_DEPTH * 2) + - ((g2 >> (B_DEPTH - C_DEPTH)) << C_DEPTH) + - (b2 >> (B_DEPTH - C_DEPTH)))); - if (cell == NULL) - cell = create_colorcell(red, green, blue); - dist = 9999999; - for (ci = 0; ci < cell->num_ents && dist > cell->entries[ci][1]; - ++ci) - { - cj = cell->entries[ci][0]; - d2 = (rm[cj] >> COLOR_SHIFT) - r2; - d2 *= d2; - tmp = (gm[cj] >> COLOR_SHIFT) - g2; - d2 += tmp * tmp; - tmp = (bm[cj] >> COLOR_SHIFT) - b2; - d2 += tmp * tmp; - if (d2 < dist) - { - dist = d2; - oval = cj; - } - } - histogram[r2][g2][b2] = oval; - } - *outptr++ = oval; - red -= rm[oval]; - green -= gm[oval]; - blue -= bm[oval]; - if (!lastpixel) - { - thisptr[0] += blue * 7 / 16; - thisptr[1] += green * 7 / 16; - thisptr[2] += red * 7 / 16; - } - if (!lastline) - { - if (j != 0) - { - nextptr[-3] += blue * 3 / 16; - nextptr[-2] += green * 3 / 16; - nextptr[-1] += red * 3 / 16; - } - nextptr[0] += blue * 5 / 16; - nextptr[1] += green * 5 / 16; - nextptr[2] += red * 5 / 16; - if (!lastpixel) - { - nextptr[3] += blue / 16; - nextptr[4] += green / 16; - nextptr[5] += red / 16; - } - nextptr += 3; - } - } - if (TIFFWriteScanline(out, outline, i, 0) < 0) - break; - } -bad: - _TIFFfree(inputline); - _TIFFfree(thisline); - _TIFFfree(nextline); - _TIFFfree(outline); -} diff --git a/third_party/libtiff/tools/tiffset.c b/third_party/libtiff/tools/tiffset.c deleted file mode 100644 index c21acf7..0000000 --- a/third_party/libtiff/tools/tiffset.c +++ /dev/null @@ -1,530 +0,0 @@ -/****************************************************************************** - * Project: libtiff tools - * Purpose: Mainline for setting metadata in existing TIFF files. - * Author: Frank Warmerdam, warmerdam@pobox.com - * - ****************************************************************************** - * Copyright (c) 2000, Frank Warmerdam - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - ****************************************************************************** - */ - -#include "tif_config.h" - -#include -#include -#include - -#include "tiffio.h" - -#ifdef NEED_LIBPORT -#include "libport.h" -#endif - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -/* - Visual Studio does not support _fseeki64 and _ftelli64 until the 2005 release. - Without these interfaces, files over 2GB in size are not supported for - Windows. - For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these - interfaces. The MinGW compiler must support the requested version. MinGW - does not distribute the CRT (it is supplied by Microsoft) so the correct CRT - must be available on the target computer in order for the program to run. -*/ -#if defined(_WIN32) && !(defined(_MSC_VER) && _MSC_VER < 1400) && \ - !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800) -#define TIFFfseek(stream, offset, whence) \ - _fseeki64(stream, /* __int64 */ offset, whence) -#define TIFFftell(stream) /* __int64 */ _ftelli64(stream) -#pragma message("...... _fseeki64 defined ....") -#else -#define TIFFfseek(stream, offset, whence) fseek(stream, offset, whence) -#define TIFFftell(stream) ftell(stream) -#endif - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -static const char usageMsg[] = - "Set the value of a TIFF header to a specified value\n\n" - "usage: tiffset [options] filename\n" - "where options are:\n" - " -s [count] ... set the tag value\n" - " -u to unset the tag\n" - " -d set the directory\n" - " -sd set the subdirectory\n" - " -sf read the tag value from file (for ASCII tags " - "only)\n" - " -m set maximum memory allocation size (MiB). 0 to disable " - "limit. Must be first parameter.\n" - " -h this help screen\n" - " The options can be repeated and are processed sequentially.\n"; - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "%s\n\n", TIFFGetVersion()); - fprintf(out, "%s", usageMsg); - exit(code); -} - -static const TIFFField *GetField(TIFF *tiff, const char *tagname) -{ - const TIFFField *fip; - - if (atoi(tagname) > 0) - fip = TIFFFieldWithTag(tiff, (ttag_t)atoi(tagname)); - else - fip = TIFFFieldWithName(tiff, tagname); - - if (!fip) - { - fprintf(stderr, "Field name \"%s\" is not recognised.\n", tagname); - return (TIFFField *)NULL; - } - - return fip; -} - -/** - * This custom malloc function enforce a maximum allocation size - */ -static void *limitMalloc(tmsize_t s) -{ - if (maxMalloc && (s > maxMalloc)) - { - fprintf(stderr, - "MemoryLimitError: allocation of %" TIFF_SSIZE_FORMAT - " bytes is forbidden. Limit is %" TIFF_SSIZE_FORMAT ".\n", - s, maxMalloc); - fprintf(stderr, " use -m option to change limit.\n"); - return NULL; - } - return _TIFFmalloc(s); -} - -int main(int argc, char *argv[]) -{ - TIFF *tiff; - int arg_index; - - if (argc < 2) - usage(EXIT_FAILURE); - - tiff = TIFFOpen(argv[argc - 1], "r+"); - if (tiff == NULL) - return EXIT_FAILURE; - - for (arg_index = 1; arg_index < argc - 1; arg_index++) - { - if (strcmp(argv[arg_index], "-d") == 0 && arg_index < argc - 2) - { - arg_index++; - if (TIFFSetDirectory(tiff, atoi(argv[arg_index])) != 1) - { - fprintf(stderr, "Failed to set directory=%s\n", - argv[arg_index]); - return EXIT_FAILURE; - } - arg_index++; - } - if (strcmp(argv[arg_index], "-sd") == 0 && arg_index < argc - 2) - { - arg_index++; - if (TIFFSetSubDirectory(tiff, atoi(argv[arg_index])) != 1) - { - fprintf(stderr, "Failed to set sub directory=%s\n", - argv[arg_index]); - return EXIT_FAILURE; - } - arg_index++; - } - /* Add unset option to tiffset -- Zach Baker (niquil@niquil.net) - * 11/14/2012 */ - if (strcmp(argv[arg_index], "-u") == 0 && arg_index < argc - 2) - { - const TIFFField *fip; - const char *tagname; - arg_index++; - tagname = argv[arg_index]; - fip = GetField(tiff, tagname); - if (!fip) - return EXIT_FAILURE; - - if (TIFFUnsetField(tiff, TIFFFieldTag(fip)) != 1) - { - fprintf(stderr, "Failed to unset %s\n", TIFFFieldName(fip)); - } - arg_index++; - } - else if (strcmp(argv[arg_index], "-s") == 0 && arg_index < argc - 3) - { - const TIFFField *fip; - const char *tagname; - - arg_index++; - tagname = argv[arg_index]; - fip = GetField(tiff, tagname); - - if (!fip) - return 3; - - arg_index++; - if (TIFFFieldDataType(fip) == TIFF_ASCII) - { - if (TIFFFieldPassCount(fip)) - { - size_t len; - len = strlen(argv[arg_index]) + 1; - if (len > UINT16_MAX || - TIFFSetField(tiff, TIFFFieldTag(fip), (uint16_t)len, - argv[arg_index]) != 1) - fprintf(stderr, "Failed to set %s=%s\n", - TIFFFieldName(fip), argv[arg_index]); - } - else - { - if (TIFFSetField(tiff, TIFFFieldTag(fip), - argv[arg_index]) != 1) - fprintf(stderr, "Failed to set %s=%s\n", - TIFFFieldName(fip), argv[arg_index]); - } - } - else if (TIFFFieldWriteCount(fip) > 0 || - TIFFFieldWriteCount(fip) == TIFF_VARIABLE) - { - int ret = 1; - short wc; - - if (TIFFFieldWriteCount(fip) == TIFF_VARIABLE) - wc = atoi(argv[arg_index++]); - else - wc = TIFFFieldWriteCount(fip); - - if (argc - arg_index < wc) - { - fprintf(stderr, - "Number of tag values is not enough. " - "Expected %d values for %s tag, got %d\n", - wc, TIFFFieldName(fip), argc - arg_index); - return EXIT_FAILURE; - } - - if (wc > 1 || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) - { - int i, size; - void *array; - - switch (TIFFFieldDataType(fip)) - { - /* - * XXX: We can't use TIFFDataWidth() - * to determine the space needed to store - * the value. For TIFF_RATIONAL values - * TIFFDataWidth() returns 8, but we use 4-byte - * float to represent rationals. - */ - case TIFF_BYTE: - case TIFF_ASCII: - case TIFF_SBYTE: - case TIFF_UNDEFINED: - default: - size = 1; - break; - - case TIFF_SHORT: - case TIFF_SSHORT: - size = 2; - break; - - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_FLOAT: - case TIFF_IFD: - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - size = 4; - break; - - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - case TIFF_DOUBLE: - size = 8; - break; - } - - array = limitMalloc((tmsize_t)wc * size); - if (!array) - { - fprintf(stderr, "No space for %s tag\n", tagname); - return EXIT_FAILURE; - } - - switch (TIFFFieldDataType(fip)) - { - case TIFF_BYTE: - for (i = 0; i < wc; i++) - ((uint8_t *)array)[i] = - atoi(argv[arg_index + i]); - break; - case TIFF_SHORT: - for (i = 0; i < wc; i++) - ((uint16_t *)array)[i] = - atoi(argv[arg_index + i]); - break; - case TIFF_SBYTE: - for (i = 0; i < wc; i++) - ((int8_t *)array)[i] = - atoi(argv[arg_index + i]); - break; - case TIFF_SSHORT: - for (i = 0; i < wc; i++) - ((int16_t *)array)[i] = - atoi(argv[arg_index + i]); - break; - case TIFF_LONG: - for (i = 0; i < wc; i++) - ((uint32_t *)array)[i] = - atol(argv[arg_index + i]); - break; - case TIFF_SLONG: - case TIFF_IFD: - for (i = 0; i < wc; i++) - ((int32_t *)array)[i] = - atol(argv[arg_index + i]); - break; - case TIFF_LONG8: - for (i = 0; i < wc; i++) - ((uint64_t *)array)[i] = strtoll( - argv[arg_index + i], (char **)NULL, 10); - break; - case TIFF_SLONG8: - case TIFF_IFD8: - for (i = 0; i < wc; i++) - ((int64_t *)array)[i] = strtoll( - argv[arg_index + i], (char **)NULL, 10); - break; - case TIFF_DOUBLE: - for (i = 0; i < wc; i++) - ((double *)array)[i] = - atof(argv[arg_index + i]); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - for (i = 0; i < wc; i++) - ((float *)array)[i] = - (float)atof(argv[arg_index + i]); - break; - default: - break; - } - - if (TIFFFieldPassCount(fip)) - { - ret = TIFFSetField(tiff, TIFFFieldTag(fip), wc, array); - } - else if (TIFFFieldTag(fip) == TIFFTAG_PAGENUMBER || - TIFFFieldTag(fip) == TIFFTAG_HALFTONEHINTS || - TIFFFieldTag(fip) == TIFFTAG_YCBCRSUBSAMPLING || - TIFFFieldTag(fip) == TIFFTAG_DOTRANGE) - { - if (TIFFFieldDataType(fip) == TIFF_BYTE) - { - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - ((uint8_t *)array)[0], - ((uint8_t *)array)[1]); - } - else if (TIFFFieldDataType(fip) == TIFF_SHORT) - { - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - ((uint16_t *)array)[0], - ((uint16_t *)array)[1]); - } - } - else - { - ret = TIFFSetField(tiff, TIFFFieldTag(fip), array); - } - - _TIFFfree(array); - } - else - { - switch (TIFFFieldDataType(fip)) - { - case TIFF_BYTE: - case TIFF_SHORT: - case TIFF_SBYTE: - case TIFF_SSHORT: - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - atoi(argv[arg_index++])); - break; - case TIFF_LONG: - case TIFF_SLONG: - case TIFF_IFD: - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - atol(argv[arg_index++])); - break; - case TIFF_LONG8: - case TIFF_SLONG8: - case TIFF_IFD8: - ret = TIFFSetField( - tiff, TIFFFieldTag(fip), - strtoll(argv[arg_index++], (char **)NULL, 10)); - break; - case TIFF_DOUBLE: - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - atof(argv[arg_index++])); - break; - case TIFF_RATIONAL: - case TIFF_SRATIONAL: - case TIFF_FLOAT: - ret = TIFFSetField(tiff, TIFFFieldTag(fip), - (float)atof(argv[arg_index++])); - break; - default: - break; - } - } - - if (ret != 1) - fprintf(stderr, "Failed to set %s\n", TIFFFieldName(fip)); - arg_index += wc; - } - } - else if (strcmp(argv[arg_index], "-sf") == 0 && arg_index < argc - 3) - { - FILE *fp; - const TIFFField *fip; - char *text; - size_t len; - int ret; - int64_t fsize; - - arg_index++; - fip = GetField(tiff, argv[arg_index]); - - if (!fip) - return EXIT_FAILURE; - - if (TIFFFieldDataType(fip) != TIFF_ASCII) - { - fprintf(stderr, - "Only ASCII tags can be set from file. " - "%s is not ASCII tag.\n", - TIFFFieldName(fip)); - return EXIT_FAILURE; - } - - arg_index++; - fp = fopen(argv[arg_index], "rt"); - if (fp == NULL) - { - perror(argv[arg_index]); - continue; - } - - /* Get file size and enlarge it for some space in buffer. - * Maximum ASCII tag size is limited by uint32_t count. - */ - TIFFfseek(fp, 0L, SEEK_END); - fsize = TIFFftell(fp) + 1; - rewind(fp); - - /* for x32 tmsize_t is only int32_t. The - 1 is just here to make - * Coverity Scan happy on 64 bit builds where the condition would - * be always true otherwise. - */ - if (fsize > TIFF_TMSIZE_T_MAX - 1 || fsize <= 0) - { - fprintf( - stderr, - "Contents of %s is too large to store in an ASCII tag.\n", - argv[arg_index]); - fclose(fp); - continue; - } - text = (char *)limitMalloc((tmsize_t)fsize); - if (text == NULL) - { - fprintf(stderr, "Memory allocation error\n"); - fclose(fp); - continue; - } - len = fread(text, 1, (size_t)(fsize - 1), fp); - text[len] = '\0'; - - fclose(fp); - - if (TIFFFieldPassCount(fip)) - { - ret = - TIFFSetField(tiff, TIFFFieldTag(fip), (uint16_t)len, text); - } - else - { - ret = TIFFSetField(tiff, TIFFFieldTag(fip), text); - } - if (!ret) - { - fprintf(stderr, "Failed to set %s from file %s\n", - TIFFFieldName(fip), argv[arg_index]); - } - - _TIFFfree(text); - arg_index++; - } - else if (strcmp(argv[arg_index], "-m") == 0) - { - arg_index++; - maxMalloc = (tmsize_t)strtoul(argv[arg_index], NULL, 0) << 20; - } - else if (strcmp(argv[arg_index], "-h") == 0 || - strcmp(argv[arg_index], "--help") == 0) - { - usage(EXIT_SUCCESS); - } - else - { - fprintf(stderr, - "Unrecognised option: %s or too few parameters left " - "for this option.\n", - argv[arg_index]); - usage(EXIT_FAILURE); - } - } - - TIFFRewriteDirectory(tiff); - TIFFClose(tiff); - return EXIT_SUCCESS; -} diff --git a/third_party/libtiff/tools/tiffsplit.c b/third_party/libtiff/tools/tiffsplit.c deleted file mode 100644 index 85a473f..0000000 --- a/third_party/libtiff/tools/tiffsplit.c +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright (c) 1992-1997 Sam Leffler - * Copyright (c) 1992-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "libport.h" -#include "tif_config.h" - -#include -#include -#include - -#include "tiffio.h" - -#ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif - -#define CopyField(tag, v) \ - if (TIFFGetField(in, tag, &v)) \ - TIFFSetField(out, tag, v) -#define CopyField2(tag, v1, v2) \ - if (TIFFGetField(in, tag, &v1, &v2)) \ - TIFFSetField(out, tag, v1, v2) -#define CopyField3(tag, v1, v2, v3) \ - if (TIFFGetField(in, tag, &v1, &v2, &v3)) \ - TIFFSetField(out, tag, v1, v2, v3) - -#define PATH_LENGTH 8192 - -#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) - -/* malloc size limit (in bytes) - * disabled when set to 0 */ -static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; - -static const char TIFF_SUFFIX[] = ".tif"; - -static char fname[PATH_LENGTH]; - -static int tiffcp(TIFF *, TIFF *); -static void newfilename(void); -static int cpStrips(TIFF *, TIFF *); -static int cpTiles(TIFF *, TIFF *); - -static void usage(int); - -/** - * This custom malloc function enforce a maximum allocation size - */ -static void *limitMalloc(tmsize_t s) -{ - /* tmsize_t is signed and _TIFFmalloc() converts s to size_t. Therefore - * check for negative s. */ - if (maxMalloc && ((s > maxMalloc) || (s < 0))) - { - fprintf(stderr, - "MemoryLimitError: allocation of %" TIFF_SSIZE_FORMAT - " bytes is forbidden. Limit is %" TIFF_SSIZE_FORMAT ".\n", - s, maxMalloc); - fprintf(stderr, " use -M option to change limit.\n"); - return NULL; - } - return _TIFFmalloc(s); -} - -static void *limitRealloc(void *buf, tmsize_t s) -{ - if (maxMalloc && ((s > maxMalloc) || (s < 0))) - { - fprintf(stderr, - "MemoryLimitError: re-allocation of %" TIFF_SSIZE_FORMAT - " bytes is forbidden. Limit is %" TIFF_SSIZE_FORMAT ".\n", - s, maxMalloc); - fprintf(stderr, " use -M option to change limit.\n"); - if (buf != NULL) - _TIFFfree(buf); - return NULL; - } - return _TIFFrealloc(buf, s); -} - -int main(int argc, char *argv[]) -{ - TIFF *in, *out; -#if !HAVE_DECL_OPTARG - extern char *optarg; - extern int optind; -#endif - int c; - - while ((c = getopt(argc, argv, "M:")) != -1) - { - switch (c) - { - case 'M': - maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; - if ((maxMalloc == 0) && (optarg[0] != '0')) - { - fprintf(stderr, - "tiffsplit: Error: Option -M was not followed by a " - "number but <%s>\n", - optarg); - usage(EXIT_FAILURE); - } - break; - case '?': - usage(EXIT_SUCCESS); - break; - default: - break; - } - } - - c = argc - optind; - if (c < 1 || c > 2) - usage(EXIT_FAILURE); - if (c > 1) - { - strncpy(fname, argv[optind + 1], sizeof(fname)); - fname[sizeof(fname) - 1] = '\0'; - } - - TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); - if (opts == NULL) - { - return EXIT_FAILURE; - } - TIFFOpenOptionsSetMaxSingleMemAlloc(opts, maxMalloc); - in = TIFFOpenExt(argv[optind], "r", opts); - if (in == NULL) - { - fprintf(stderr, "tiffsplit: Error: Could not open %s \n", argv[optind]); - TIFFOpenOptionsFree(opts); - usage(EXIT_FAILURE); - } - - do - { - size_t path_len; - char *path = NULL; - - newfilename(); - - path_len = strlen(fname) + sizeof(TIFF_SUFFIX); - path = (char *)limitMalloc(path_len); - if (!path) - { - fprintf(stderr, - "tiffsplit: Error: Can't allocate %" TIFF_SIZE_FORMAT - " bytes for path-variable.\n", - path_len); - TIFFClose(in); - TIFFOpenOptionsFree(opts); - return (EXIT_FAILURE); - } - strncpy(path, fname, path_len); - path[path_len - 1] = '\0'; - strncat(path, TIFF_SUFFIX, path_len - strlen(path) - 1); - out = TIFFOpenExt(path, TIFFIsBigEndian(in) ? "wb" : "wl", opts); - - if (out == NULL) - { - TIFFClose(in); - fprintf(stderr, - "tiffsplit: Error: Could not open output file %s \n", path); - _TIFFfree(path); - TIFFOpenOptionsFree(opts); - return (EXIT_FAILURE); - } - _TIFFfree(path); - if (!tiffcp(in, out)) - { - TIFFClose(in); - TIFFClose(out); - TIFFOpenOptionsFree(opts); - fprintf(stderr, "tiffsplit: Error: Could not copy data from input " - "to output.\n"); - return (EXIT_FAILURE); - } - TIFFClose(out); - } while (TIFFReadDirectory(in)); - - TIFFOpenOptionsFree(opts); - (void)TIFFClose(in); - - return (EXIT_SUCCESS); -} - -static void newfilename(void) -{ - static int first = 1; - static long lastTurn; - static long fnum; - static short defname; - static char *fpnt; - - if (first) - { - if (fname[0]) - { - fpnt = fname + strlen(fname); - defname = 0; - } - else - { - fname[0] = 'x'; - fpnt = fname + 1; - defname = 1; - } - first = 0; - } -#define MAXFILES 17576 - if (fnum == MAXFILES) - { - if (!defname || fname[0] == 'z') - { - fprintf(stderr, "tiffsplit: too many files.\n"); - exit(EXIT_FAILURE); - } - fname[0]++; - fnum = 0; - } - if (fnum % 676 == 0) - { - if (fnum != 0) - { - /* - * advance to next letter every 676 pages - * condition for 'z'++ will be covered above - */ - fpnt[0]++; - } - else - { - /* - * set to 'a' if we are on the very first file - */ - fpnt[0] = 'a'; - } - /* - * set the value of the last turning point - */ - lastTurn = fnum; - } - /* - * start from 0 every 676 times (provided by lastTurn) - * this keeps us within a-z boundaries - */ - fpnt[1] = (char)((fnum - lastTurn) / 26) + 'a'; - /* - * cycle last letter every file, from a-z, then repeat - */ - fpnt[2] = (char)(fnum % 26) + 'a'; - fnum++; -} - -static int tiffcp(TIFF *in, TIFF *out) -{ - uint16_t bitspersample, samplesperpixel, compression, shortv, *shortav; - uint32_t w, l; - float floatv; - char *stringv; - uint32_t longv; - - CopyField(TIFFTAG_SUBFILETYPE, longv); - CopyField(TIFFTAG_TILEWIDTH, w); - CopyField(TIFFTAG_TILELENGTH, l); - CopyField(TIFFTAG_IMAGEWIDTH, w); - CopyField(TIFFTAG_IMAGELENGTH, l); - CopyField(TIFFTAG_BITSPERSAMPLE, bitspersample); - CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - CopyField(TIFFTAG_COMPRESSION, compression); - if (compression == COMPRESSION_JPEG) - { - uint32_t count = 0; - void *table = NULL; - if (TIFFGetField(in, TIFFTAG_JPEGTABLES, &count, &table) && count > 0 && - table) - { - TIFFSetField(out, TIFFTAG_JPEGTABLES, count, table); - } - } - CopyField(TIFFTAG_PHOTOMETRIC, shortv); - CopyField(TIFFTAG_PREDICTOR, shortv); - CopyField(TIFFTAG_THRESHHOLDING, shortv); - CopyField(TIFFTAG_FILLORDER, shortv); - CopyField(TIFFTAG_ORIENTATION, shortv); - CopyField(TIFFTAG_MINSAMPLEVALUE, shortv); - CopyField(TIFFTAG_MAXSAMPLEVALUE, shortv); - CopyField(TIFFTAG_XRESOLUTION, floatv); - CopyField(TIFFTAG_YRESOLUTION, floatv); - CopyField(TIFFTAG_GROUP3OPTIONS, longv); - CopyField(TIFFTAG_GROUP4OPTIONS, longv); - CopyField(TIFFTAG_RESOLUTIONUNIT, shortv); - CopyField(TIFFTAG_PLANARCONFIG, shortv); - CopyField(TIFFTAG_ROWSPERSTRIP, longv); - CopyField(TIFFTAG_XPOSITION, floatv); - CopyField(TIFFTAG_YPOSITION, floatv); - CopyField(TIFFTAG_IMAGEDEPTH, longv); - CopyField(TIFFTAG_TILEDEPTH, longv); - CopyField(TIFFTAG_SAMPLEFORMAT, shortv); - CopyField2(TIFFTAG_EXTRASAMPLES, shortv, shortav); - { - uint16_t *red, *green, *blue; - CopyField3(TIFFTAG_COLORMAP, red, green, blue); - } - { - uint16_t shortv2; - CopyField2(TIFFTAG_PAGENUMBER, shortv, shortv2); - } - CopyField(TIFFTAG_ARTIST, stringv); - CopyField(TIFFTAG_IMAGEDESCRIPTION, stringv); - CopyField(TIFFTAG_MAKE, stringv); - CopyField(TIFFTAG_MODEL, stringv); - CopyField(TIFFTAG_SOFTWARE, stringv); - CopyField(TIFFTAG_DATETIME, stringv); - CopyField(TIFFTAG_HOSTCOMPUTER, stringv); - CopyField(TIFFTAG_PAGENAME, stringv); - CopyField(TIFFTAG_DOCUMENTNAME, stringv); - CopyField(TIFFTAG_BADFAXLINES, longv); - CopyField(TIFFTAG_CLEANFAXDATA, longv); - CopyField(TIFFTAG_CONSECUTIVEBADFAXLINES, longv); - CopyField(TIFFTAG_FAXRECVPARAMS, longv); - CopyField(TIFFTAG_FAXRECVTIME, longv); - CopyField(TIFFTAG_FAXSUBADDRESS, stringv); - CopyField(TIFFTAG_FAXDCS, stringv); - if (TIFFIsTiled(in)) - return (cpTiles(in, out)); - else - return (cpStrips(in, out)); -} - -static int cpStrips(TIFF *in, TIFF *out) -{ - tmsize_t bufsize = TIFFStripSize(in); - unsigned char *buf = (unsigned char *)limitMalloc(bufsize); - if (buf) - { - tstrip_t s, ns = TIFFNumberOfStrips(in); - uint64_t *bytecounts; - - if (!TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts)) - { - fprintf(stderr, "tiffsplit: strip byte counts are missing\n"); - _TIFFfree(buf); - return (0); - } - for (s = 0; s < ns; s++) - { - if (bytecounts[s] > (uint64_t)bufsize) - { - buf = - (unsigned char *)limitRealloc(buf, (tmsize_t)bytecounts[s]); - if (!buf) - { - fprintf(stderr, - "tiffsplit: Error: Can't re-allocate " - "%" TIFF_SSIZE_FORMAT " bytes for strip-size.\n", - (tmsize_t)bytecounts[s]); - return (0); - } - bufsize = (tmsize_t)bytecounts[s]; - } - if (TIFFReadRawStrip(in, s, buf, (tmsize_t)bytecounts[s]) < 0 || - TIFFWriteRawStrip(out, s, buf, (tmsize_t)bytecounts[s]) < 0) - { - _TIFFfree(buf); - return (0); - } - } - _TIFFfree(buf); - return (1); - } - else - { - fprintf(stderr, - "tiffsplit: Error: Can't allocate %" TIFF_SSIZE_FORMAT - " bytes for strip-size.\n", - bufsize); - } - return (0); -} - -static int cpTiles(TIFF *in, TIFF *out) -{ - tmsize_t bufsize = TIFFTileSize(in); - unsigned char *buf = (unsigned char *)limitMalloc(bufsize); - - if (buf) - { - ttile_t t, nt = TIFFNumberOfTiles(in); - uint64_t *bytecounts; - - if (!TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts)) - { - fprintf(stderr, "tiffsplit: tile byte counts are missing\n"); - _TIFFfree(buf); - return (0); - } - for (t = 0; t < nt; t++) - { - if (bytecounts[t] > (uint64_t)bufsize) - { - buf = - (unsigned char *)limitRealloc(buf, (tmsize_t)bytecounts[t]); - if (!buf) - { - fprintf(stderr, - "tiffsplit: Error: Can't re-allocate " - "%" TIFF_SSIZE_FORMAT " bytes for tile-size.\n", - (tmsize_t)bytecounts[t]); - return (0); - } - bufsize = (tmsize_t)bytecounts[t]; - } - if (TIFFReadRawTile(in, t, buf, (tmsize_t)bytecounts[t]) < 0 || - TIFFWriteRawTile(out, t, buf, (tmsize_t)bytecounts[t]) < 0) - { - _TIFFfree(buf); - return (0); - } - } - _TIFFfree(buf); - return (1); - } - else - { - fprintf(stderr, - "tiffsplit: Error: Can't allocate %" TIFF_SSIZE_FORMAT - " bytes for tile-size.\n", - bufsize); - } - return (0); -} - -static void usage(int code) -{ - FILE *out = (code == EXIT_SUCCESS) ? stdout : stderr; - - fprintf(out, "\n\n%s\n\n", TIFFGetVersion()); - fprintf(out, "Split a multi-image TIFF into single-image TIFF files\n\n"); - fprintf(out, "usage: tiffsplit [option] input.tif [prefix]\n"); - fprintf(out, "where option is:\n"); - fprintf(out, " -M size set the memory allocation limit in MiB. 0 to " - "disable limit.\n"); - exit(code); -} diff --git a/third_party/zlib/CMakeLists.txt b/third_party/zlib/CMakeLists.txt deleted file mode 100644 index 9b0e568..0000000 --- a/third_party/zlib/CMakeLists.txt +++ /dev/null @@ -1,219 +0,0 @@ -# ScopeWriter raises the policy floor for compatibility with current CMake -cmake_minimum_required(VERSION 3.10...3.15) -set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) - -project(zlib C) - -set(VERSION "1.3.1") - -option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) - -set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") -set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") -set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") -set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages") -set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files") - -include(CheckTypeSize) -include(CheckFunctionExists) -include(CheckIncludeFile) -include(CheckCSourceCompiles) -enable_testing() - -check_include_file(sys/types.h HAVE_SYS_TYPES_H) -check_include_file(stdint.h HAVE_STDINT_H) -check_include_file(stddef.h HAVE_STDDEF_H) - -# -# Check to see if we have large file support -# -set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) -# We add these other definitions here because CheckTypeSize.cmake -# in CMake 2.4.x does not automatically do so and we want -# compatibility with CMake 2.4.x. -if(HAVE_SYS_TYPES_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) -endif() -if(HAVE_STDINT_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) -endif() -if(HAVE_STDDEF_H) - list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) -endif() -check_type_size(off64_t OFF64_T) -if(HAVE_OFF64_T) - add_definitions(-D_LARGEFILE64_SOURCE=1) -endif() -set(CMAKE_REQUIRED_DEFINITIONS) # clear variable - -# -# Check for fseeko -# -check_function_exists(fseeko HAVE_FSEEKO) -if(NOT HAVE_FSEEKO) - add_definitions(-DNO_FSEEKO) -endif() - -# -# Check for unistd.h -# -check_include_file(unistd.h Z_HAVE_UNISTD_H) - -if(MSVC) - set(CMAKE_DEBUG_POSTFIX "d") - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -endif() - -if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) - # If we're doing an out of source build and the user has a zconf.h - # in their source tree... - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) - message(STATUS "Renaming") - message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h") - message(STATUS "to 'zconf.h.included' because this file is included with zlib") - message(STATUS "but CMake generates it automatically in the build directory.") - file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included) - endif() -endif() - -set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein - ${ZLIB_PC} @ONLY) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) -include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) - - -#============================================================================ -# zlib -#============================================================================ - -set(ZLIB_PUBLIC_HDRS - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h - zlib.h -) -set(ZLIB_PRIVATE_HDRS - crc32.h - deflate.h - gzguts.h - inffast.h - inffixed.h - inflate.h - inftrees.h - trees.h - zutil.h -) -set(ZLIB_SRCS - adler32.c - compress.c - crc32.c - deflate.c - gzclose.c - gzlib.c - gzread.c - gzwrite.c - inflate.c - infback.c - inftrees.c - inffast.c - trees.c - uncompr.c - zutil.c -) - -if(NOT MINGW) - set(ZLIB_DLL_SRCS - win32/zlib1.rc # If present will override custom build rule below. - ) -endif() - -# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION -file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) -string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" - "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) - -if(MINGW) - # This gets us DLL resource information when compiling on MinGW. - if(NOT CMAKE_RC_COMPILER) - set(CMAKE_RC_COMPILER windres.exe) - endif() - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj - COMMAND ${CMAKE_RC_COMPILER} - -D GCC_WINDRES - -I ${CMAKE_CURRENT_SOURCE_DIR} - -I ${CMAKE_CURRENT_BINARY_DIR} - -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj - -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) -endif(MINGW) - -add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) -set_target_properties(zlib PROPERTIES SOVERSION 1) - -if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because - # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll - # seems to be the default. - # - # This has no effect with MSVC, on that platform the version info for - # the DLL comes from the resource file win32/zlib1.rc - set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) -endif() - -if(UNIX) - # On unix-like platforms the library is almost always called libz - set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) - if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) - set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") - endif() -elseif(BUILD_SHARED_LIBS AND WIN32) - # Creates zlib1.dll when building shared library version - set_target_properties(zlib PROPERTIES SUFFIX "1.dll") -endif() - -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS zlib zlibstatic - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) -endif() -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) - install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}") -endif() -if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) - install(FILES zlib.3 DESTINATION "${INSTALL_MAN_DIR}/man3") -endif() -if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) - install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}") -endif() - -#============================================================================ -# Example binaries -#============================================================================ -if(ZLIB_BUILD_EXAMPLES) - add_executable(example test/example.c) - target_link_libraries(example zlib) - add_test(example example) - - add_executable(minigzip test/minigzip.c) - target_link_libraries(minigzip zlib) - - if(HAVE_OFF64_T) - add_executable(example64 test/example.c) - target_link_libraries(example64 zlib) - set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") - add_test(example64 example64) - - add_executable(minigzip64 test/minigzip.c) - target_link_libraries(minigzip64 zlib) - set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") - endif() -endif() diff --git a/third_party/zlib/ChangeLog b/third_party/zlib/ChangeLog deleted file mode 100644 index b801a10..0000000 --- a/third_party/zlib/ChangeLog +++ /dev/null @@ -1,1618 +0,0 @@ - - ChangeLog file for zlib - -Changes in 1.3.1 (22 Jan 2024) -- Reject overflows of zip header fields in minizip -- Fix bug in inflateSync() for data held in bit buffer -- Add LIT_MEM define to use more memory for a small deflate speedup -- Fix decision on the emission of Zip64 end records in minizip -- Add bounds checking to ERR_MSG() macro, used by zError() -- Neutralize zip file traversal attacks in miniunz -- Fix a bug in ZLIB_DEBUG compiles in check_match() -- Various portability and appearance improvements - -Changes in 1.3 (18 Aug 2023) -- Remove K&R function definitions and zlib2ansi -- Fix bug in deflateBound() for level 0 and memLevel 9 -- Fix bug when gzungetc() is used immediately after gzopen() -- Fix bug when using gzflush() with a very small buffer -- Fix crash when gzsetparams() attempted for transparent write -- Fix test/example.c to work with FORCE_STORED -- Rewrite of zran in examples (see zran.c version history) -- Fix minizip to allow it to open an empty zip file -- Fix reading disk number start on zip64 files in minizip -- Fix logic error in minizip argument processing -- Add minizip testing to Makefile -- Read multiple bytes instead of byte-by-byte in minizip unzip.c -- Add memory sanitizer to configure (--memory) -- Various portability improvements -- Various documentation improvements -- Various spelling and typo corrections - -Changes in 1.2.13 (13 Oct 2022) -- Fix configure issue that discarded provided CC definition -- Correct incorrect inputs provided to the CRC functions -- Repair prototypes and exporting of new CRC functions -- Fix inflateBack to detect invalid input with distances too far -- Have infback() deliver all of the available output up to any error -- Fix a bug when getting a gzip header extra field with inflate() -- Fix bug in block type selection when Z_FIXED used -- Tighten deflateBound bounds -- Remove deleted assembler code references -- Various portability and appearance improvements - -Changes in 1.2.12 (27 Mar 2022) -- Cygwin does not have _wopen(), so do not create gzopen_w() there -- Permit a deflateParams() parameter change as soon as possible -- Limit hash table inserts after switch from stored deflate -- Fix bug when window full in deflate_stored() -- Fix CLEAR_HASH macro to be usable as a single statement -- Avoid a conversion error in gzseek when off_t type too small -- Have Makefile return non-zero error code on test failure -- Avoid some conversion warnings in gzread.c and gzwrite.c -- Update use of errno for newer Windows CE versions -- Small speedup to inflate [psumbera] -- Return an error if the gzputs string length can't fit in an int -- Add address checking in clang to -w option of configure -- Don't compute check value for raw inflate if asked to validate -- Handle case where inflateSync used when header never processed -- Avoid the use of ptrdiff_t -- Avoid an undefined behavior of memcpy() in gzappend() -- Avoid undefined behaviors of memcpy() in gz*printf() -- Avoid an undefined behavior of memcpy() in _tr_stored_block() -- Make the names in functions declarations identical to definitions -- Remove old assembler code in which bugs have manifested -- Fix deflateEnd() to not report an error at start of raw deflate -- Add legal disclaimer to README -- Emphasize the need to continue decompressing gzip members -- Correct the initialization requirements for deflateInit2() -- Fix a bug that can crash deflate on some input when using Z_FIXED -- Assure that the number of bits for deflatePrime() is valid -- Use a structure to make globals in enough.c evident -- Use a macro for the printf format of big_t in enough.c -- Clean up code style in enough.c, update version -- Use inline function instead of macro for index in enough.c -- Clarify that prefix codes are counted in enough.c -- Show all the codes for the maximum tables size in enough.c -- Add gznorm.c example, which normalizes gzip files -- Fix the zran.c example to work on a multiple-member gzip file -- Add tables for crc32_combine(), to speed it up by a factor of 200 -- Add crc32_combine_gen() and crc32_combine_op() for fast combines -- Speed up software CRC-32 computation by a factor of 1.5 to 3 -- Use atomic test and set, if available, for dynamic CRC tables -- Don't bother computing check value after successful inflateSync() -- Correct comment in crc32.c -- Add use of the ARMv8 crc32 instructions when requested -- Use ARM crc32 instructions if the ARM architecture has them -- Explicitly note that the 32-bit check values are 32 bits -- Avoid adding empty gzip member after gzflush with Z_FINISH -- Fix memory leak on error in gzlog.c -- Fix error in comment on the polynomial representation of a byte -- Clarify gz* function interfaces, referring to parameter names -- Change macro name in inflate.c to avoid collision in VxWorks -- Correct typo in blast.c -- Improve portability of contrib/minizip -- Fix indentation in minizip's zip.c -- Replace black/white with allow/block. (theresa-m) -- minizip warning fix if MAXU32 already defined. (gvollant) -- Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner) -- Clean up minizip to reduce warnings for testing -- Add fallthrough comments for gcc -- Eliminate use of ULL constants -- Separate out address sanitizing from warnings in configure -- Remove destructive aspects of make distclean -- Check for cc masquerading as gcc or clang in configure -- Fix crc32.c to compile local functions only if used - -Changes in 1.2.11 (15 Jan 2017) -- Fix deflate stored bug when pulling last block from window -- Permit immediate deflateParams changes before any deflate input - -Changes in 1.2.10 (2 Jan 2017) -- Avoid warnings on snprintf() return value -- Fix bug in deflate_stored() for zero-length input -- Fix bug in gzwrite.c that produced corrupt gzip files -- Remove files to be installed before copying them in Makefile.in -- Add warnings when compiling with assembler code - -Changes in 1.2.9 (31 Dec 2016) -- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] -- Improve contrib/blast to return unused bytes -- Assure that gzoffset() is correct when appending -- Improve compress() and uncompress() to support large lengths -- Fix bug in test/example.c where error code not saved -- Remedy Coverity warning [Randers-Pehrson] -- Improve speed of gzprintf() in transparent mode -- Fix inflateInit2() bug when windowBits is 16 or 32 -- Change DEBUG macro to ZLIB_DEBUG -- Avoid uninitialized access by gzclose_w() -- Allow building zlib outside of the source directory -- Fix bug that accepted invalid zlib header when windowBits is zero -- Fix gzseek() problem on MinGW due to buggy _lseeki64 there -- Loop on write() calls in gzwrite.c in case of non-blocking I/O -- Add --warn (-w) option to ./configure for more compiler warnings -- Reject a window size of 256 bytes if not using the zlib wrapper -- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE -- Add --debug (-d) option to ./configure to define ZLIB_DEBUG -- Fix bugs in creating a very large gzip header -- Add uncompress2() function, which returns the input size used -- Assure that deflateParams() will not switch functions mid-block -- Dramatically speed up deflation for level 0 (storing) -- Add gzfread(), duplicating the interface of fread() -- Add gzfwrite(), duplicating the interface of fwrite() -- Add deflateGetDictionary() function -- Use snprintf() for later versions of Microsoft C -- Fix *Init macros to use z_ prefix when requested -- Replace as400 with os400 for OS/400 support [Monnerat] -- Add crc32_z() and adler32_z() functions with size_t lengths -- Update Visual Studio project files [AraHaan] - -Changes in 1.2.8 (28 Apr 2013) -- Update contrib/minizip/iowin32.c for Windows RT [Vollant] -- Do not force Z_CONST for C++ -- Clean up contrib/vstudio [Roß] -- Correct spelling error in zlib.h -- Fix mixed line endings in contrib/vstudio - -Changes in 1.2.7.3 (13 Apr 2013) -- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc - -Changes in 1.2.7.2 (13 Apr 2013) -- Change check for a four-byte type back to hexadecimal -- Fix typo in win32/Makefile.msc -- Add casts in gzwrite.c for pointer differences - -Changes in 1.2.7.1 (24 Mar 2013) -- Replace use of unsafe string functions with snprintf if available -- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] -- Fix gzgetc undefine when Z_PREFIX set [Turk] -- Eliminate use of mktemp in Makefile (not always available) -- Fix bug in 'F' mode for gzopen() -- Add inflateGetDictionary() function -- Correct comment in deflate.h -- Use _snprintf for snprintf in Microsoft C -- On Darwin, only use /usr/bin/libtool if libtool is not Apple -- Delete "--version" file if created by "ar --version" [Richard G.] -- Fix configure check for veracity of compiler error return codes -- Fix CMake compilation of static lib for MSVC2010 x64 -- Remove unused variable in infback9.c -- Fix argument checks in gzlog_compress() and gzlog_write() -- Clean up the usage of z_const and respect const usage within zlib -- Clean up examples/gzlog.[ch] comparisons of different types -- Avoid shift equal to bits in type (caused endless loop) -- Fix uninitialized value bug in gzputc() introduced by const patches -- Fix memory allocation error in examples/zran.c [Nor] -- Fix bug where gzopen(), gzclose() would write an empty file -- Fix bug in gzclose() when gzwrite() runs out of memory -- Check for input buffer malloc failure in examples/gzappend.c -- Add note to contrib/blast to use binary mode in stdio -- Fix comparisons of differently signed integers in contrib/blast -- Check for invalid code length codes in contrib/puff -- Fix serious but very rare decompression bug in inftrees.c -- Update inflateBack() comments, since inflate() can be faster -- Use underscored I/O function names for WINAPI_FAMILY -- Add _tr_flush_bits to the external symbols prefixed by --zprefix -- Add contrib/vstudio/vc10 pre-build step for static only -- Quote --version-script argument in CMakeLists.txt -- Don't specify --version-script on Apple platforms in CMakeLists.txt -- Fix casting error in contrib/testzlib/testzlib.c -- Fix types in contrib/minizip to match result of get_crc_table() -- Simplify contrib/vstudio/vc10 with 'd' suffix -- Add TOP support to win32/Makefile.msc -- Support i686 and amd64 assembler builds in CMakeLists.txt -- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h -- Add vc11 and vc12 build files to contrib/vstudio -- Add gzvprintf() as an undocumented function in zlib -- Fix configure for Sun shell -- Remove runtime check in configure for four-byte integer type -- Add casts and consts to ease user conversion to C++ -- Add man pages for minizip and miniunzip -- In Makefile uninstall, don't rm if preceding cd fails -- Do not return Z_BUF_ERROR if deflateParam() has nothing to write - -Changes in 1.2.7 (2 May 2012) -- Replace use of memmove() with a simple copy for portability -- Test for existence of strerror -- Restore gzgetc_ for backward compatibility with 1.2.6 -- Fix build with non-GNU make on Solaris -- Require gcc 4.0 or later on Mac OS X to use the hidden attribute -- Include unistd.h for Watcom C -- Use __WATCOMC__ instead of __WATCOM__ -- Do not use the visibility attribute if NO_VIZ defined -- Improve the detection of no hidden visibility attribute -- Avoid using __int64 for gcc or solo compilation -- Cast to char * in gzprintf to avoid warnings [Zinser] -- Fix make_vms.com for VAX [Zinser] -- Don't use library or built-in byte swaps -- Simplify test and use of gcc hidden attribute -- Fix bug in gzclose_w() when gzwrite() fails to allocate memory -- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() -- Fix bug in test/minigzip.c for configure --solo -- Fix contrib/vstudio project link errors [Mohanathas] -- Add ability to choose the builder in make_vms.com [Schweda] -- Add DESTDIR support to mingw32 win32/Makefile.gcc -- Fix comments in win32/Makefile.gcc for proper usage -- Allow overriding the default install locations for cmake -- Generate and install the pkg-config file with cmake -- Build both a static and a shared version of zlib with cmake -- Include version symbols for cmake builds -- If using cmake with MSVC, add the source directory to the includes -- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta] -- Move obsolete emx makefile to old [Truta] -- Allow the use of -Wundef when compiling or using zlib -- Avoid the use of the -u option with mktemp -- Improve inflate() documentation on the use of Z_FINISH -- Recognize clang as gcc -- Add gzopen_w() in Windows for wide character path names -- Rename zconf.h in CMakeLists.txt to move it out of the way -- Add source directory in CMakeLists.txt for building examples -- Look in build directory for zlib.pc in CMakeLists.txt -- Remove gzflags from zlibvc.def in vc9 and vc10 -- Fix contrib/minizip compilation in the MinGW environment -- Update ./configure for Solaris, support --64 [Mooney] -- Remove -R. from Solaris shared build (possible security issue) -- Avoid race condition for parallel make (-j) running example -- Fix type mismatch between get_crc_table() and crc_table -- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler] -- Fix the path to zlib.map in CMakeLists.txt -- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe] -- Add instructions to win32/Makefile.gcc for shared install [Torri] - -Changes in 1.2.6.1 (12 Feb 2012) -- Avoid the use of the Objective-C reserved name "id" -- Include io.h in gzguts.h for Microsoft compilers -- Fix problem with ./configure --prefix and gzgetc macro -- Include gz_header definition when compiling zlib solo -- Put gzflags() functionality back in zutil.c -- Avoid library header include in crc32.c for Z_SOLO -- Use name in GCC_CLASSIC as C compiler for coverage testing, if set -- Minor cleanup in contrib/minizip/zip.c [Vollant] -- Update make_vms.com [Zinser] -- Remove unnecessary gzgetc_ function -- Use optimized byte swap operations for Microsoft and GNU [Snyder] -- Fix minor typo in zlib.h comments [Rzesniowiecki] - -Changes in 1.2.6 (29 Jan 2012) -- Update the Pascal interface in contrib/pascal -- Fix function numbers for gzgetc_ in zlibvc.def files -- Fix configure.ac for contrib/minizip [Schiffer] -- Fix large-entry detection in minizip on 64-bit systems [Schiffer] -- Have ./configure use the compiler return code for error indication -- Fix CMakeLists.txt for cross compilation [McClure] -- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes] -- Fix compilation of contrib/minizip on FreeBSD [Marquez] -- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath] -- Include io.h for Turbo C / Borland C on all platforms [Truta] -- Make version explicit in contrib/minizip/configure.ac [Bosmans] -- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant] -- Minor cleanup up contrib/minizip/unzip.c [Vollant] -- Fix bug when compiling minizip with C++ [Vollant] -- Protect for long name and extra fields in contrib/minizip [Vollant] -- Avoid some warnings in contrib/minizip [Vollant] -- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip -- Add missing libs to minizip linker command -- Add support for VPATH builds in contrib/minizip -- Add an --enable-demos option to contrib/minizip/configure -- Add the generation of configure.log by ./configure -- Exit when required parameters not provided to win32/Makefile.gcc -- Have gzputc return the character written instead of the argument -- Use the -m option on ldconfig for BSD systems [Tobias] -- Correct in zlib.map when deflateResetKeep was added - -Changes in 1.2.5.3 (15 Jan 2012) -- Restore gzgetc function for binary compatibility -- Do not use _lseeki64 under Borland C++ [Truta] -- Update win32/Makefile.msc to build test/*.c [Truta] -- Remove old/visualc6 given CMakefile and other alternatives -- Update AS400 build files and documentation [Monnerat] -- Update win32/Makefile.gcc to build test/*.c [Truta] -- Permit stronger flushes after Z_BLOCK flushes -- Avoid extraneous empty blocks when doing empty flushes -- Permit Z_NULL arguments to deflatePending -- Allow deflatePrime() to insert bits in the middle of a stream -- Remove second empty static block for Z_PARTIAL_FLUSH -- Write out all of the available bits when using Z_BLOCK -- Insert the first two strings in the hash table after a flush - -Changes in 1.2.5.2 (17 Dec 2011) -- fix ld error: unable to find version dependency 'ZLIB_1.2.5' -- use relative symlinks for shared libs -- Avoid searching past window for Z_RLE strategy -- Assure that high-water mark initialization is always applied in deflate -- Add assertions to fill_window() in deflate.c to match comments -- Update python link in README -- Correct spelling error in gzread.c -- Fix bug in gzgets() for a concatenated empty gzip stream -- Correct error in comment for gz_make() -- Change gzread() and related to ignore junk after gzip streams -- Allow gzread() and related to continue after gzclearerr() -- Allow gzrewind() and gzseek() after a premature end-of-file -- Simplify gzseek() now that raw after gzip is ignored -- Change gzgetc() to a macro for speed (~40% speedup in testing) -- Fix gzclose() to return the actual error last encountered -- Always add large file support for windows -- Include zconf.h for windows large file support -- Include zconf.h.cmakein for windows large file support -- Update zconf.h.cmakein on make distclean -- Merge vestigial vsnprintf determination from zutil.h to gzguts.h -- Clarify how gzopen() appends in zlib.h comments -- Correct documentation of gzdirect() since junk at end now ignored -- Add a transparent write mode to gzopen() when 'T' is in the mode -- Update python link in zlib man page -- Get inffixed.h and MAKEFIXED result to match -- Add a ./config --solo option to make zlib subset with no library use -- Add undocumented inflateResetKeep() function for CAB file decoding -- Add --cover option to ./configure for gcc coverage testing -- Add #define ZLIB_CONST option to use const in the z_stream interface -- Add comment to gzdopen() in zlib.h to use dup() when using fileno() -- Note behavior of uncompress() to provide as much data as it can -- Add files in contrib/minizip to aid in building libminizip -- Split off AR options in Makefile.in and configure -- Change ON macro to Z_ARG to avoid application conflicts -- Facilitate compilation with Borland C++ for pragmas and vsnprintf -- Include io.h for Turbo C / Borland C++ -- Move example.c and minigzip.c to test/ -- Simplify incomplete code table filling in inflate_table() -- Remove code from inflate.c and infback.c that is impossible to execute -- Test the inflate code with full coverage -- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw) -- Add deflateResetKeep and fix inflateResetKeep to retain dictionary -- Fix gzwrite.c to accommodate reduced memory zlib compilation -- Have inflate() with Z_FINISH avoid the allocation of a window -- Do not set strm->adler when doing raw inflate -- Fix gzeof() to behave just like feof() when read is not past end of file -- Fix bug in gzread.c when end-of-file is reached -- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF -- Document gzread() capability to read concurrently written files -- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo] - -Changes in 1.2.5.1 (10 Sep 2011) -- Update FAQ entry on shared builds (#13) -- Avoid symbolic argument to chmod in Makefile.in -- Fix bug and add consts in contrib/puff [Oberhumer] -- Update contrib/puff/zeros.raw test file to have all block types -- Add full coverage test for puff in contrib/puff/Makefile -- Fix static-only-build install in Makefile.in -- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno] -- Add libz.a dependency to shared in Makefile.in for parallel builds -- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out -- Replace $(...) with `...` in configure for non-bash sh [Bowler] -- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen] -- Add solaris* to Linux* in configure to allow gcc use [Groffen] -- Add *bsd* to Linux* case in configure [Bar-Lev] -- Add inffast.obj to dependencies in win32/Makefile.msc -- Correct spelling error in deflate.h [Kohler] -- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc -- Add test to configure for GNU C looking for gcc in output of $cc -v -- Add zlib.pc generation to win32/Makefile.gcc [Weigelt] -- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not -- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense -- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser) -- Make stronger test in zconf.h to include unistd.h for LFS -- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack] -- Fix zlib.h LFS support when Z_PREFIX used -- Add updated as400 support (removed from old) [Monnerat] -- Avoid deflate sensitivity to volatile input data -- Avoid division in adler32_combine for NO_DIVIDE -- Clarify the use of Z_FINISH with deflateBound() amount of space -- Set binary for output file in puff.c -- Use u4 type for crc_table to avoid conversion warnings -- Apply casts in zlib.h to avoid conversion warnings -- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller] -- Improve inflateSync() documentation to note indeterminacy -- Add deflatePending() function to return the amount of pending output -- Correct the spelling of "specification" in FAQ [Randers-Pehrson] -- Add a check in configure for stdarg.h, use for gzprintf() -- Check that pointers fit in ints when gzprint() compiled old style -- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] -- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] -- Add debug records in assembler code [Londer] -- Update RFC references to use http://tools.ietf.org/html/... [Li] -- Add --archs option, use of libtool to configure for Mac OS X [Borstel] - -Changes in 1.2.5 (19 Apr 2010) -- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] -- Default to libdir as sharedlibdir in configure [Nieder] -- Update copyright dates on modified source files -- Update trees.c to be able to generate modified trees.h -- Exit configure for MinGW, suggesting win32/Makefile.gcc -- Check for NULL path in gz_open [Homurlu] - -Changes in 1.2.4.5 (18 Apr 2010) -- Set sharedlibdir in configure [Torok] -- Set LDFLAGS in Makefile.in [Bar-Lev] -- Avoid mkdir objs race condition in Makefile.in [Bowler] -- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays -- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C -- Don't use hidden attribute when it is a warning generator (e.g. Solaris) - -Changes in 1.2.4.4 (18 Apr 2010) -- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] -- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty -- Try to use bash or ksh regardless of functionality of /bin/sh -- Fix configure incompatibility with NetBSD sh -- Remove attempt to run under bash or ksh since have better NetBSD fix -- Fix win32/Makefile.gcc for MinGW [Bar-Lev] -- Add diagnostic messages when using CROSS_PREFIX in configure -- Added --sharedlibdir option to configure [Weigelt] -- Use hidden visibility attribute when available [Frysinger] - -Changes in 1.2.4.3 (10 Apr 2010) -- Only use CROSS_PREFIX in configure for ar and ranlib if they exist -- Use CROSS_PREFIX for nm [Bar-Lev] -- Assume _LARGEFILE64_SOURCE defined is equivalent to true -- Avoid use of undefined symbols in #if with && and || -- Make *64 prototypes in gzguts.h consistent with functions -- Add -shared load option for MinGW in configure [Bowler] -- Move z_off64_t to public interface, use instead of off64_t -- Remove ! from shell test in configure (not portable to Solaris) -- Change +0 macro tests to -0 for possibly increased portability - -Changes in 1.2.4.2 (9 Apr 2010) -- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 -- Really provide prototypes for *64 functions when building without LFS -- Only define unlink() in minigzip.c if unistd.h not included -- Update README to point to contrib/vstudio project files -- Move projects/vc6 to old/ and remove projects/ -- Include stdlib.h in minigzip.c for setmode() definition under WinCE -- Clean up assembler builds in win32/Makefile.msc [Rowe] -- Include sys/types.h for Microsoft for off_t definition -- Fix memory leak on error in gz_open() -- Symbolize nm as $NM in configure [Weigelt] -- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] -- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined -- Fix bug in gzeof() to take into account unused input data -- Avoid initialization of structures with variables in puff.c -- Updated win32/README-WIN32.txt [Rowe] - -Changes in 1.2.4.1 (28 Mar 2010) -- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] -- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] -- Restore "for debugging" comment on sprintf() in gzlib.c -- Remove fdopen for MVS from gzguts.h -- Put new README-WIN32.txt in win32 [Rowe] -- Add check for shell to configure and invoke another shell if needed -- Fix big fat stinking bug in gzseek() on uncompressed files -- Remove vestigial F_OPEN64 define in zutil.h -- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE -- Avoid errors on non-LFS systems when applications define LFS macros -- Set EXE to ".exe" in configure for MINGW [Kahle] -- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] -- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] -- Add DLL install in win32/makefile.gcc [Bar-Lev] -- Allow Linux* or linux* from uname in configure [Bar-Lev] -- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] -- Add cross-compilation prefixes to configure [Bar-Lev] -- Match type exactly in gz_load() invocation in gzread.c -- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func -- Provide prototypes for *64 functions when building zlib without LFS -- Don't use -lc when linking shared library on MinGW -- Remove errno.h check in configure and vestigial errno code in zutil.h - -Changes in 1.2.4 (14 Mar 2010) -- Fix VER3 extraction in configure for no fourth subversion -- Update zlib.3, add docs to Makefile.in to make .pdf out of it -- Add zlib.3.pdf to distribution -- Don't set error code in gzerror() if passed pointer is NULL -- Apply destination directory fixes to CMakeLists.txt [Lowman] -- Move #cmakedefine's to a new zconf.in.cmakein -- Restore zconf.h for builds that don't use configure or cmake -- Add distclean to dummy Makefile for convenience -- Update and improve INDEX, README, and FAQ -- Update CMakeLists.txt for the return of zconf.h [Lowman] -- Update contrib/vstudio/vc9 and vc10 [Vollant] -- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc -- Apply license and readme changes to contrib/asm686 [Raiter] -- Check file name lengths and add -c option in minigzip.c [Li] -- Update contrib/amd64 and contrib/masmx86/ [Vollant] -- Avoid use of "eof" parameter in trees.c to not shadow library variable -- Update make_vms.com for removal of zlibdefs.h [Zinser] -- Update assembler code and vstudio projects in contrib [Vollant] -- Remove outdated assembler code contrib/masm686 and contrib/asm586 -- Remove old vc7 and vc8 from contrib/vstudio -- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] -- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() -- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] -- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) -- Fix bug in void-returning vsprintf() case in gzwrite.c -- Fix name change from inflate.h in contrib/inflate86/inffas86.c -- Check if temporary file exists before removing in make_vms.com [Zinser] -- Fix make install and uninstall for --static option -- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] -- Update readme.txt in contrib/masmx64 and masmx86 to assemble - -Changes in 1.2.3.9 (21 Feb 2010) -- Expunge gzio.c -- Move as400 build information to old -- Fix updates in contrib/minizip and contrib/vstudio -- Add const to vsnprintf test in configure to avoid warnings [Weigelt] -- Delete zconf.h (made by configure) [Weigelt] -- Change zconf.in.h to zconf.h.in per convention [Weigelt] -- Check for NULL buf in gzgets() -- Return empty string for gzgets() with len == 1 (like fgets()) -- Fix description of gzgets() in zlib.h for end-of-file, NULL return -- Update minizip to 1.1 [Vollant] -- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c -- Note in zlib.h that gzerror() should be used to distinguish from EOF -- Remove use of snprintf() from gzlib.c -- Fix bug in gzseek() -- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] -- Fix zconf.h generation in CMakeLists.txt [Lowman] -- Improve comments in zconf.h where modified by configure - -Changes in 1.2.3.8 (13 Feb 2010) -- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] -- Use z_off64_t in gz_zero() and gz_skip() to match state->skip -- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) -- Revert to Makefile.in from 1.2.3.6 (live with the clutter) -- Fix missing error return in gzflush(), add zlib.h note -- Add *64 functions to zlib.map [Levin] -- Fix signed/unsigned comparison in gz_comp() -- Use SFLAGS when testing shared linking in configure -- Add --64 option to ./configure to use -m64 with gcc -- Fix ./configure --help to correctly name options -- Have make fail if a test fails [Levin] -- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] -- Remove assembler object files from contrib - -Changes in 1.2.3.7 (24 Jan 2010) -- Always gzopen() with O_LARGEFILE if available -- Fix gzdirect() to work immediately after gzopen() or gzdopen() -- Make gzdirect() more precise when the state changes while reading -- Improve zlib.h documentation in many places -- Catch memory allocation failure in gz_open() -- Complete close operation if seek forward in gzclose_w() fails -- Return Z_ERRNO from gzclose_r() if close() fails -- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL -- Return zero for gzwrite() errors to match zlib.h description -- Return -1 on gzputs() error to match zlib.h description -- Add zconf.in.h to allow recovery from configure modification [Weigelt] -- Fix static library permissions in Makefile.in [Weigelt] -- Avoid warnings in configure tests that hide functionality [Weigelt] -- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] -- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] -- Avoid access of uninitialized data for first inflateReset2 call [Gomes] -- Keep object files in subdirectories to reduce the clutter somewhat -- Remove default Makefile and zlibdefs.h, add dummy Makefile -- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ -- Remove zlibdefs.h completely -- modify zconf.h instead - -Changes in 1.2.3.6 (17 Jan 2010) -- Avoid void * arithmetic in gzread.c and gzwrite.c -- Make compilers happier with const char * for gz_error message -- Avoid unused parameter warning in inflate.c -- Avoid signed-unsigned comparison warning in inflate.c -- Indent #pragma's for traditional C -- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() -- Correct email address in configure for system options -- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] -- Update zlib.map [Brown] -- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] -- Apply various fixes to CMakeLists.txt [Lowman] -- Add checks on len in gzread() and gzwrite() -- Add error message for no more room for gzungetc() -- Remove zlib version check in gzwrite() -- Defer compression of gzprintf() result until need to -- Use snprintf() in gzdopen() if available -- Remove USE_MMAP configuration determination (only used by minigzip) -- Remove examples/pigz.c (available separately) -- Update examples/gun.c to 1.6 - -Changes in 1.2.3.5 (8 Jan 2010) -- Add space after #if in zutil.h for some compilers -- Fix relatively harmless bug in deflate_fast() [Exarevsky] -- Fix same problem in deflate_slow() -- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] -- Add deflate_rle() for faster Z_RLE strategy run-length encoding -- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding -- Change name of "write" variable in inffast.c to avoid library collisions -- Fix premature EOF from gzread() in gzio.c [Brown] -- Use zlib header window size if windowBits is 0 in inflateInit2() -- Remove compressBound() call in deflate.c to avoid linking compress.o -- Replace use of errno in gz* with functions, support WinCE [Alves] -- Provide alternative to perror() in minigzip.c for WinCE [Alves] -- Don't use _vsnprintf on later versions of MSVC [Lowman] -- Add CMake build script and input file [Lowman] -- Update contrib/minizip to 1.1 [Svensson, Vollant] -- Moved nintendods directory from contrib to root -- Replace gzio.c with a new set of routines with the same functionality -- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above -- Update contrib/minizip to 1.1b -- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h - -Changes in 1.2.3.4 (21 Dec 2009) -- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility -- Update comments in configure and Makefile.in for default --shared -- Fix test -z's in configure [Marquess] -- Build examplesh and minigzipsh when not testing -- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h -- Import LDFLAGS from the environment in configure -- Fix configure to populate SFLAGS with discovered CFLAGS options -- Adapt make_vms.com to the new Makefile.in [Zinser] -- Add zlib2ansi script for C++ compilation [Marquess] -- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) -- Add AMD64 assembler code for longest match to contrib [Teterin] -- Include options from $SFLAGS when doing $LDSHARED -- Simplify 64-bit file support by introducing z_off64_t type -- Make shared object files in objs directory to work around old Sun cc -- Use only three-part version number for Darwin shared compiles -- Add rc option to ar in Makefile.in for when ./configure not run -- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* -- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile -- Protect against _FILE_OFFSET_BITS being defined when compiling zlib -- Rename Makefile.in targets allstatic to static and allshared to shared -- Fix static and shared Makefile.in targets to be independent -- Correct error return bug in gz_open() by setting state [Brown] -- Put spaces before ;;'s in configure for better sh compatibility -- Add pigz.c (parallel implementation of gzip) to examples/ -- Correct constant in crc32.c to UL [Leventhal] -- Reject negative lengths in crc32_combine() -- Add inflateReset2() function to work like inflateEnd()/inflateInit2() -- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] -- Correct typo in doc/algorithm.txt [Janik] -- Fix bug in adler32_combine() [Zhu] -- Catch missing-end-of-block-code error in all inflates and in puff - Assures that random input to inflate eventually results in an error -- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ -- Update ENOUGH and its usage to reflect discovered bounds -- Fix gzerror() error report on empty input file [Brown] -- Add ush casts in trees.c to avoid pedantic runtime errors -- Fix typo in zlib.h uncompress() description [Reiss] -- Correct inflate() comments with regard to automatic header detection -- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) -- Put new version of gzlog (2.0) in examples with interruption recovery -- Add puff compile option to permit invalid distance-too-far streams -- Add puff TEST command options, ability to read piped input -- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but - _LARGEFILE64_SOURCE not defined -- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart -- Fix deflateSetDictionary() to use all 32K for output consistency -- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) -- Clear bytes after deflate lookahead to avoid use of uninitialized data -- Change a limit in inftrees.c to be more transparent to Coverity Prevent -- Update win32/zlib.def with exported symbols from zlib.h -- Correct spelling errors in zlib.h [Willem, Sobrado] -- Allow Z_BLOCK for deflate() to force a new block -- Allow negative bits in inflatePrime() to delete existing bit buffer -- Add Z_TREES flush option to inflate() to return at end of trees -- Add inflateMark() to return current state information for random access -- Add Makefile for NintendoDS to contrib [Costa] -- Add -w in configure compile tests to avoid spurious warnings [Beucler] -- Fix typos in zlib.h comments for deflateSetDictionary() -- Fix EOF detection in transparent gzread() [Maier] - -Changes in 1.2.3.3 (2 October 2006) -- Make --shared the default for configure, add a --static option -- Add compile option to permit invalid distance-too-far streams -- Add inflateUndermine() function which is required to enable above -- Remove use of "this" variable name for C++ compatibility [Marquess] -- Add testing of shared library in make test, if shared library built -- Use ftello() and fseeko() if available instead of ftell() and fseek() -- Provide two versions of all functions that use the z_off_t type for - binary compatibility -- a normal version and a 64-bit offset version, - per the Large File Support Extension when _LARGEFILE64_SOURCE is - defined; use the 64-bit versions by default when _FILE_OFFSET_BITS - is defined to be 64 -- Add a --uname= option to configure to perhaps help with cross-compiling - -Changes in 1.2.3.2 (3 September 2006) -- Turn off silly Borland warnings [Hay] -- Use off64_t and define _LARGEFILE64_SOURCE when present -- Fix missing dependency on inffixed.h in Makefile.in -- Rig configure --shared to build both shared and static [Teredesai, Truta] -- Remove zconf.in.h and instead create a new zlibdefs.h file -- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] -- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] - -Changes in 1.2.3.1 (16 August 2006) -- Add watcom directory with OpenWatcom make files [Daniel] -- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] -- Update make_vms.com [Zinser] -- Use -fPIC for shared build in configure [Teredesai, Nicholson] -- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] -- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] -- Add some FAQ entries about the contrib directory -- Update the MVS question in the FAQ -- Avoid extraneous reads after EOF in gzio.c [Brown] -- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] -- Add comments to zlib.h about gzerror() usage [Brown] -- Set extra flags in gzip header in gzopen() like deflate() does -- Make configure options more compatible with double-dash conventions - [Weigelt] -- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] -- Fix uninstall target in Makefile.in [Truta] -- Add pkgconfig support [Weigelt] -- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] -- Replace set_data_type() with a more accurate detect_data_type() in - trees.c, according to the txtvsbin.txt document [Truta] -- Swap the order of #include and #include "zlib.h" in - gzio.c, example.c and minigzip.c [Truta] -- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, - Truta] (where?) -- Fix target "clean" from win32/Makefile.bor [Truta] -- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] -- Update zlib www home address in win32/DLL_FAQ.txt [Truta] -- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] -- Enable browse info in the "Debug" and "ASM Debug" configurations in - the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] -- Add pkgconfig support [Weigelt] -- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, - for use in win32/zlib1.rc [Polushin, Rowe, Truta] -- Add a document that explains the new text detection scheme to - doc/txtvsbin.txt [Truta] -- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] -- Move algorithm.txt into doc/ [Truta] -- Synchronize FAQ with website -- Fix compressBound(), was low for some pathological cases [Fearnley] -- Take into account wrapper variations in deflateBound() -- Set examples/zpipe.c input and output to binary mode for Windows -- Update examples/zlib_how.html with new zpipe.c (also web site) -- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems - that gcc became pickier in 4.0) -- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain - un-versioned, the patch adds versioning only for symbols introduced in - zlib-1.2.0 or later. It also declares as local those symbols which are - not designed to be exported." [Levin] -- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure -- Do not initialize global static by default in trees.c, add a response - NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] -- Don't use strerror() in gzio.c under WinCE [Yakimov] -- Don't use errno.h in zutil.h under WinCE [Yakimov] -- Move arguments for AR to its usage to allow replacing ar [Marot] -- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] -- Improve inflateInit() and inflateInit2() documentation -- Fix structure size comment in inflate.h -- Change configure help option from --h* to --help [Santos] - -Changes in 1.2.3 (18 July 2005) -- Apply security vulnerability fixes to contrib/infback9 as well -- Clean up some text files (carriage returns, trailing space) -- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] - -Changes in 1.2.2.4 (11 July 2005) -- Add inflatePrime() function for starting inflation at bit boundary -- Avoid some Visual C warnings in deflate.c -- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit - compile -- Fix some spelling errors in comments [Betts] -- Correct inflateInit2() error return documentation in zlib.h -- Add zran.c example of compressed data random access to examples - directory, shows use of inflatePrime() -- Fix cast for assignments to strm->state in inflate.c and infback.c -- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] -- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] -- Add cast in trees.c t avoid a warning [Oberhumer] -- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] -- Update make_vms.com [Zinser] -- Initialize state->write in inflateReset() since copied in inflate_fast() -- Be more strict on incomplete code sets in inflate_table() and increase - ENOUGH and MAXD -- this repairs a possible security vulnerability for - invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for - discovering the vulnerability and providing test cases -- Add ia64 support to configure for HP-UX [Smith] -- Add error return to gzread() for format or i/o error [Levin] -- Use malloc.h for OS/2 [Necasek] - -Changes in 1.2.2.3 (27 May 2005) -- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile -- Typecast fread() return values in gzio.c [Vollant] -- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) -- Fix crc check bug in gzread() after gzungetc() [Heiner] -- Add the deflateTune() function to adjust internal compression parameters -- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) -- Remove an incorrect assertion in examples/zpipe.c -- Add C++ wrapper in infback9.h [Donais] -- Fix bug in inflateCopy() when decoding fixed codes -- Note in zlib.h how much deflateSetDictionary() actually uses -- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) -- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] -- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] -- Add gzdirect() function to indicate transparent reads -- Update contrib/minizip [Vollant] -- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] -- Add casts in crc32.c to avoid warnings [Oberhumer] -- Add contrib/masmx64 [Vollant] -- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] - -Changes in 1.2.2.2 (30 December 2004) -- Replace structure assignments in deflate.c and inflate.c with zmemcpy to - avoid implicit memcpy calls (portability for no-library compilation) -- Increase sprintf() buffer size in gzdopen() to allow for large numbers -- Add INFLATE_STRICT to check distances against zlib header -- Improve WinCE errno handling and comments [Chang] -- Remove comment about no gzip header processing in FAQ -- Add Z_FIXED strategy option to deflateInit2() to force fixed trees -- Add updated make_vms.com [Coghlan], update README -- Create a new "examples" directory, move gzappend.c there, add zpipe.c, - fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html -- Add FAQ entry and comments in deflate.c on uninitialized memory access -- Add Solaris 9 make options in configure [Gilbert] -- Allow strerror() usage in gzio.c for STDC -- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] -- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] -- Use z_off_t for adler32_combine() and crc32_combine() lengths -- Make adler32() much faster for small len -- Use OS_CODE in deflate() default gzip header - -Changes in 1.2.2.1 (31 October 2004) -- Allow inflateSetDictionary() call for raw inflate -- Fix inflate header crc check bug for file names and comments -- Add deflateSetHeader() and gz_header structure for custom gzip headers -- Add inflateGetheader() to retrieve gzip headers -- Add crc32_combine() and adler32_combine() functions -- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list -- Use zstreamp consistently in zlib.h (inflate_back functions) -- Remove GUNZIP condition from definition of inflate_mode in inflate.h - and in contrib/inflate86/inffast.S [Truta, Anderson] -- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] -- Update projects/README.projects and projects/visualc6 [Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] -- Deprecate Z_ASCII; use Z_TEXT instead [Truta] -- Use a new algorithm for setting strm->data_type in trees.c [Truta] -- Do not define an exit() prototype in zutil.c unless DEBUG defined -- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] -- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() -- Fix Darwin build version identification [Peterson] - -Changes in 1.2.2 (3 October 2004) -- Update zlib.h comments on gzip in-memory processing -- Set adler to 1 in inflateReset() to support Java test suite [Walles] -- Add contrib/dotzlib [Ravn] -- Update win32/DLL_FAQ.txt [Truta] -- Update contrib/minizip [Vollant] -- Move contrib/visual-basic.txt to old/ [Truta] -- Fix assembler builds in projects/visualc6/ [Truta] - -Changes in 1.2.1.2 (9 September 2004) -- Update INDEX file -- Fix trees.c to update strm->data_type (no one ever noticed!) -- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] -- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) -- Add limited multitasking protection to DYNAMIC_CRC_TABLE -- Add NO_vsnprintf for VMS in zutil.h [Mozilla] -- Don't declare strerror() under VMS [Mozilla] -- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize -- Update contrib/ada [Anisimkov] -- Update contrib/minizip [Vollant] -- Fix configure to not hardcode directories for Darwin [Peterson] -- Fix gzio.c to not return error on empty files [Brown] -- Fix indentation; update version in contrib/delphi/ZLib.pas and - contrib/pascal/zlibpas.pas [Truta] -- Update mkasm.bat in contrib/masmx86 [Truta] -- Update contrib/untgz [Truta] -- Add projects/README.projects [Truta] -- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] -- Update win32/DLL_FAQ.txt [Truta] -- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] -- Remove an unnecessary assignment to curr in inftrees.c [Truta] -- Add OS/2 to exe builds in configure [Poltorak] -- Remove err dummy parameter in zlib.h [Kientzle] - -Changes in 1.2.1.1 (9 January 2004) -- Update email address in README -- Several FAQ updates -- Fix a big fat bug in inftrees.c that prevented decoding valid - dynamic blocks with only literals and no distance codes -- - Thanks to "Hot Emu" for the bug report and sample file -- Add a note to puff.c on no distance codes case - -Changes in 1.2.1 (17 November 2003) -- Remove a tab in contrib/gzappend/gzappend.c -- Update some interfaces in contrib for new zlib functions -- Update zlib version number in some contrib entries -- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] -- Support shared libraries on Hurd and KFreeBSD [Brown] -- Fix error in NO_DIVIDE option of adler32.c - -Changes in 1.2.0.8 (4 November 2003) -- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas -- Add experimental NO_DIVIDE #define in adler32.c - - Possibly faster on some processors (let me know if it is) -- Correct Z_BLOCK to not return on first inflate call if no wrap -- Fix strm->data_type on inflate() return to correctly indicate EOB -- Add deflatePrime() function for appending in the middle of a byte -- Add contrib/gzappend for an example of appending to a stream -- Update win32/DLL_FAQ.txt [Truta] -- Delete Turbo C comment in README [Truta] -- Improve some indentation in zconf.h [Truta] -- Fix infinite loop on bad input in configure script [Church] -- Fix gzeof() for concatenated gzip files [Johnson] -- Add example to contrib/visual-basic.txt [Michael B.] -- Add -p to mkdir's in Makefile.in [vda] -- Fix configure to properly detect presence or lack of printf functions -- Add AS400 support [Monnerat] -- Add a little Cygwin support [Wilson] - -Changes in 1.2.0.7 (21 September 2003) -- Correct some debug formats in contrib/infback9 -- Cast a type in a debug statement in trees.c -- Change search and replace delimiter in configure from % to # [Beebe] -- Update contrib/untgz to 0.2 with various fixes [Truta] -- Add build support for Amiga [Nikl] -- Remove some directories in old that have been updated to 1.2 -- Add dylib building for Mac OS X in configure and Makefile.in -- Remove old distribution stuff from Makefile -- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X -- Update links in README - -Changes in 1.2.0.6 (13 September 2003) -- Minor FAQ updates -- Update contrib/minizip to 1.00 [Vollant] -- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] -- Update POSTINC comment for 68060 [Nikl] -- Add contrib/infback9 with deflate64 decoding (unsupported) -- For MVS define NO_vsnprintf and undefine FAR [van Burik] -- Add pragma for fdopen on MVS [van Burik] - -Changes in 1.2.0.5 (8 September 2003) -- Add OF to inflateBackEnd() declaration in zlib.h -- Remember start when using gzdopen in the middle of a file -- Use internal off_t counters in gz* functions to properly handle seeks -- Perform more rigorous check for distance-too-far in inffast.c -- Add Z_BLOCK flush option to return from inflate at block boundary -- Set strm->data_type on return from inflate - - Indicate bits unused, if at block boundary, and if in last block -- Replace size_t with ptrdiff_t in crc32.c, and check for correct size -- Add condition so old NO_DEFLATE define still works for compatibility -- FAQ update regarding the Windows DLL [Truta] -- INDEX update: add qnx entry, remove aix entry [Truta] -- Install zlib.3 into mandir [Wilson] -- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] -- Adapt the zlib interface to the new DLL convention guidelines [Truta] -- Introduce ZLIB_WINAPI macro to allow the export of functions using - the WINAPI calling convention, for Visual Basic [Vollant, Truta] -- Update msdos and win32 scripts and makefiles [Truta] -- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] -- Add contrib/ada [Anisimkov] -- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] -- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] -- Add contrib/masm686 [Truta] -- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm - [Truta, Vollant] -- Update contrib/delphi; rename to contrib/pascal; add example [Truta] -- Remove contrib/delphi2; add a new contrib/delphi [Truta] -- Avoid inclusion of the nonstandard in contrib/iostream, - and fix some method prototypes [Truta] -- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip - [Truta] -- Avoid the use of backslash (\) in contrib/minizip [Vollant] -- Fix file time handling in contrib/untgz; update makefiles [Truta] -- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines - [Vollant] -- Remove contrib/vstudio/vc15_16 [Vollant] -- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] -- Update README.contrib [Truta] -- Invert the assignment order of match_head and s->prev[...] in - INSERT_STRING [Truta] -- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings - [Truta] -- Compare function pointers with 0, not with NULL or Z_NULL [Truta] -- Fix prototype of syncsearch in inflate.c [Truta] -- Introduce ASMINF macro to be enabled when using an ASM implementation - of inflate_fast [Truta] -- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] -- Modify test_gzio in example.c to take a single file name as a - parameter [Truta] -- Exit the example.c program if gzopen fails [Truta] -- Add type casts around strlen in example.c [Truta] -- Remove casting to sizeof in minigzip.c; give a proper type - to the variable compared with SUFFIX_LEN [Truta] -- Update definitions of STDC and STDC99 in zconf.h [Truta] -- Synchronize zconf.h with the new Windows DLL interface [Truta] -- Use SYS16BIT instead of __32BIT__ to distinguish between - 16- and 32-bit platforms [Truta] -- Use far memory allocators in small 16-bit memory models for - Turbo C [Truta] -- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in - zlibCompileFlags [Truta] -- Cygwin has vsnprintf [Wilson] -- In Windows16, OS_CODE is 0, as in MSDOS [Truta] -- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] - -Changes in 1.2.0.4 (10 August 2003) -- Minor FAQ updates -- Be more strict when checking inflateInit2's windowBits parameter -- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well -- Add gzip wrapper option to deflateInit2 using windowBits -- Add updated QNX rule in configure and qnx directory [Bonnefoy] -- Make inflate distance-too-far checks more rigorous -- Clean up FAR usage in inflate -- Add casting to sizeof() in gzio.c and minigzip.c - -Changes in 1.2.0.3 (19 July 2003) -- Fix silly error in gzungetc() implementation [Vollant] -- Update contrib/minizip and contrib/vstudio [Vollant] -- Fix printf format in example.c -- Correct cdecl support in zconf.in.h [Anisimkov] -- Minor FAQ updates - -Changes in 1.2.0.2 (13 July 2003) -- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons -- Attempt to avoid warnings in crc32.c for pointer-int conversion -- Add AIX to configure, remove aix directory [Bakker] -- Add some casts to minigzip.c -- Improve checking after insecure sprintf() or vsprintf() calls -- Remove #elif's from crc32.c -- Change leave label to inf_leave in inflate.c and infback.c to avoid - library conflicts -- Remove inflate gzip decoding by default--only enable gzip decoding by - special request for stricter backward compatibility -- Add zlibCompileFlags() function to return compilation information -- More typecasting in deflate.c to avoid warnings -- Remove leading underscore from _Capital #defines [Truta] -- Fix configure to link shared library when testing -- Add some Windows CE target adjustments [Mai] -- Remove #define ZLIB_DLL in zconf.h [Vollant] -- Add zlib.3 [Rodgers] -- Update RFC URL in deflate.c and algorithm.txt [Mai] -- Add zlib_dll_FAQ.txt to contrib [Truta] -- Add UL to some constants [Truta] -- Update minizip and vstudio [Vollant] -- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h -- Expand use of NO_DUMMY_DECL to avoid all dummy structures -- Added iostream3 to contrib [Schwardt] -- Replace rewind() with fseek() for WinCE [Truta] -- Improve setting of zlib format compression level flags - - Report 0 for huffman and rle strategies and for level == 0 or 1 - - Report 2 only for level == 6 -- Only deal with 64K limit when necessary at compile time [Truta] -- Allow TOO_FAR check to be turned off at compile time [Truta] -- Add gzclearerr() function [Souza] -- Add gzungetc() function - -Changes in 1.2.0.1 (17 March 2003) -- Add Z_RLE strategy for run-length encoding [Truta] - - When Z_RLE requested, restrict matches to distance one - - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE -- Correct FASTEST compilation to allow level == 0 -- Clean up what gets compiled for FASTEST -- Incorporate changes to zconf.in.h [Vollant] - - Refine detection of Turbo C need for dummy returns - - Refine ZLIB_DLL compilation - - Include additional header file on VMS for off_t typedef -- Try to use _vsnprintf where it supplants vsprintf [Vollant] -- Add some casts in inffast.c -- Enhance comments in zlib.h on what happens if gzprintf() tries to - write more than 4095 bytes before compression -- Remove unused state from inflateBackEnd() -- Remove exit(0) from minigzip.c, example.c -- Get rid of all those darn tabs -- Add "check" target to Makefile.in that does the same thing as "test" -- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in -- Update contrib/inflate86 [Anderson] -- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] -- Add msdos and win32 directories with makefiles [Truta] -- More additions and improvements to the FAQ - -Changes in 1.2.0 (9 March 2003) -- New and improved inflate code - - About 20% faster - - Does not allocate 32K window unless and until needed - - Automatically detects and decompresses gzip streams - - Raw inflate no longer needs an extra dummy byte at end - - Added inflateBack functions using a callback interface--even faster - than inflate, useful for file utilities (gzip, zip) - - Added inflateCopy() function to record state for random access on - externally generated deflate streams (e.g. in gzip files) - - More readable code (I hope) -- New and improved crc32() - - About 50% faster, thanks to suggestions from Rodney Brown -- Add deflateBound() and compressBound() functions -- Fix memory leak in deflateInit2() -- Permit setting dictionary for raw deflate (for parallel deflate) -- Fix const declaration for gzwrite() -- Check for some malloc() failures in gzio.c -- Fix bug in gzopen() on single-byte file 0x1f -- Fix bug in gzread() on concatenated file with 0x1f at end of buffer - and next buffer doesn't start with 0x8b -- Fix uncompress() to return Z_DATA_ERROR on truncated input -- Free memory at end of example.c -- Remove MAX #define in trees.c (conflicted with some libraries) -- Fix static const's in deflate.c, gzio.c, and zutil.[ch] -- Declare malloc() and free() in gzio.c if STDC not defined -- Use malloc() instead of calloc() in zutil.c if int big enough -- Define STDC for AIX -- Add aix/ with approach for compiling shared library on AIX -- Add HP-UX support for shared libraries in configure -- Add OpenUNIX support for shared libraries in configure -- Use $cc instead of gcc to build shared library -- Make prefix directory if needed when installing -- Correct Macintosh avoidance of typedef Byte in zconf.h -- Correct Turbo C memory allocation when under Linux -- Use libz.a instead of -lz in Makefile (assure use of compiled library) -- Update configure to check for snprintf or vsnprintf functions and their - return value, warn during make if using an insecure function -- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that - is lost when library is used--resolution is to build new zconf.h -- Documentation improvements (in zlib.h): - - Document raw deflate and inflate - - Update RFCs URL - - Point out that zlib and gzip formats are different - - Note that Z_BUF_ERROR is not fatal - - Document string limit for gzprintf() and possible buffer overflow - - Note requirement on avail_out when flushing - - Note permitted values of flush parameter of inflate() -- Add some FAQs (and even answers) to the FAQ -- Add contrib/inflate86/ for x86 faster inflate -- Add contrib/blast/ for PKWare Data Compression Library decompression -- Add contrib/puff/ simple inflate for deflate format description - -Changes in 1.1.4 (11 March 2002) -- ZFREE was repeated on same allocation on some error conditions - This creates a security problem described in - http://www.zlib.org/advisory-2002-03-11.txt -- Returned incorrect error (Z_MEM_ERROR) on some invalid data -- Avoid accesses before window for invalid distances with inflate window - less than 32K -- force windowBits > 8 to avoid a bug in the encoder for a window size - of 256 bytes. (A complete fix will be available in 1.1.5) - -Changes in 1.1.3 (9 July 1998) -- fix "an inflate input buffer bug that shows up on rare but persistent - occasions" (Mark) -- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) -- fix gzseek(..., SEEK_SET) in write mode -- fix crc check after a gzeek (Frank Faubert) -- fix miniunzip when the last entry in a zip file is itself a zip file - (J Lillge) -- add contrib/asm586 and contrib/asm686 (Brian Raiter) - See http://www.muppetlabs.com/~breadbox/software/assembly.html -- add support for Delphi 3 in contrib/delphi (Bob Dellaca) -- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) -- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) -- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) -- added a FAQ file - -- Support gzdopen on Mac with Metrowerks (Jason Linhart) -- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) -- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) -- avoid some warnings with Borland C (Tom Tanner) -- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) -- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) -- allow several arguments to configure (Tim Mooney, Frodo Looijaard) -- use libdir and includedir in Makefile.in (Tim Mooney) -- support shared libraries on OSF1 V4 (Tim Mooney) -- remove so_locations in "make clean" (Tim Mooney) -- fix maketree.c compilation error (Glenn, Mark) -- Python interface to zlib now in Python 1.5 (Jeremy Hylton) -- new Makefile.riscos (Rich Walker) -- initialize static descriptors in trees.c for embedded targets (Nick Smith) -- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) -- add the OS/2 files in Makefile.in too (Andrew Zabolotny) -- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) -- fix maketree.c to allow clean compilation of inffixed.h (Mark) -- fix parameter check in deflateCopy (Gunther Nikl) -- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) -- Many portability patches by Christian Spieler: - . zutil.c, zutil.h: added "const" for zmem* - . Make_vms.com: fixed some typos - . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists - . msdos/Makefile.msc: remove "default rtl link library" info from obj files - . msdos/Makefile.*: use model-dependent name for the built zlib library - . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: - new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) -- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) -- replace __far with _far for better portability (Christian Spieler, Tom Lane) -- fix test for errno.h in configure (Tim Newsham) - -Changes in 1.1.2 (19 March 98) -- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) - See http://www.winimage.com/zLibDll/unzip.html -- preinitialize the inflate tables for fixed codes, to make the code - completely thread safe (Mark) -- some simplifications and slight speed-up to the inflate code (Mark) -- fix gzeof on non-compressed files (Allan Schrum) -- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) -- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) -- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) -- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) -- do not wrap extern "C" around system includes (Tom Lane) -- mention zlib binding for TCL in README (Andreas Kupries) -- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) -- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) -- allow "configure --prefix $HOME" (Tim Mooney) -- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) -- move Makefile.sas to amiga/Makefile.sas - -Changes in 1.1.1 (27 Feb 98) -- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) -- remove block truncation heuristic which had very marginal effect for zlib - (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the - compression ratio on some files. This also allows inlining _tr_tally for - matches in deflate_slow -- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) - -Changes in 1.1.0 (24 Feb 98) -- do not return STREAM_END prematurely in inflate (John Bowler) -- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) -- compile with -DFASTEST to get compression code optimized for speed only -- in minigzip, try mmap'ing the input file first (Miguel Albrecht) -- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain - on Sun but significant on HP) - -- add a pointer to experimental unzip library in README (Gilles Vollant) -- initialize variable gcc in configure (Chris Herborth) - -Changes in 1.0.9 (17 Feb 1998) -- added gzputs and gzgets functions -- do not clear eof flag in gzseek (Mark Diekhans) -- fix gzseek for files in transparent mode (Mark Diekhans) -- do not assume that vsprintf returns the number of bytes written (Jens Krinke) -- replace EXPORT with ZEXPORT to avoid conflict with other programs -- added compress2 in zconf.h, zlib.def, zlib.dnt -- new asm code from Gilles Vollant in contrib/asm386 -- simplify the inflate code (Mark): - . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() - . ZALLOC the length list in inflate_trees_fixed() instead of using stack - . ZALLOC the value area for huft_build() instead of using stack - . Simplify Z_FINISH check in inflate() - -- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 -- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) -- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with - the declaration of FAR (Gilles Vollant) -- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) -- read_buf buf parameter of type Bytef* instead of charf* -- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) -- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) -- fix check for presence of directories in "make install" (Ian Willis) - -Changes in 1.0.8 (27 Jan 1998) -- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) -- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) -- added compress2() to allow setting the compression level -- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) -- use constant arrays for the static trees in trees.c instead of computing - them at run time (thanks to Ken Raeburn for this suggestion). To create - trees.h, compile with GEN_TREES_H and run "make test" -- check return code of example in "make test" and display result -- pass minigzip command line options to file_compress -- simplifying code of inflateSync to avoid gcc 2.8 bug - -- support CC="gcc -Wall" in configure -s (QingLong) -- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) -- fix test for shared library support to avoid compiler warnings -- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) -- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) -- do not use fdopen for Metrowerks on Mac (Brad Pettit)) -- add checks for gzputc and gzputc in example.c -- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) -- use const for the CRC table (Ken Raeburn) -- fixed "make uninstall" for shared libraries -- use Tracev instead of Trace in infblock.c -- in example.c use correct compressed length for test_sync -- suppress +vnocompatwarnings in configure for HPUX (not always supported) - -Changes in 1.0.7 (20 Jan 1998) -- fix gzseek which was broken in write mode -- return error for gzseek to negative absolute position -- fix configure for Linux (Chun-Chung Chen) -- increase stack space for MSC (Tim Wegner) -- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) -- define EXPORTVA for gzprintf (Gilles Vollant) -- added man page zlib.3 (Rick Rodgers) -- for contrib/untgz, fix makedir() and improve Makefile - -- check gzseek in write mode in example.c -- allocate extra buffer for seeks only if gzseek is actually called -- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) -- add inflateSyncPoint in zconf.h -- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def - -Changes in 1.0.6 (19 Jan 1998) -- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and - gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) -- Fix a deflate bug occurring only with compression level 0 (thanks to - Andy Buckler for finding this one) -- In minigzip, pass transparently also the first byte for .Z files -- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() -- check Z_FINISH in inflate (thanks to Marc Schluper) -- Implement deflateCopy (thanks to Adam Costello) -- make static libraries by default in configure, add --shared option -- move MSDOS or Windows specific files to directory msdos -- suppress the notion of partial flush to simplify the interface - (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) -- suppress history buffer provided by application to simplify the interface - (this feature was not implemented anyway in 1.0.4) -- next_in and avail_in must be initialized before calling inflateInit or - inflateInit2 -- add EXPORT in all exported functions (for Windows DLL) -- added Makefile.nt (thanks to Stephen Williams) -- added the unsupported "contrib" directory: - contrib/asm386/ by Gilles Vollant - 386 asm code replacing longest_match() - contrib/iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset - Another C++ I/O streams interface - contrib/untgz/ by "Pedro A. Aranda Guti\irrez" - A very simple tar.gz file extractor using zlib - contrib/visual-basic.txt by Carlos Rios - How to use compress(), uncompress() and the gz* functions from VB -- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression - level) in minigzip (thanks to Tom Lane) - -- use const for rommable constants in deflate -- added test for gzseek and gztell in example.c -- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) -- add undocumented function zError to convert error code to string - (for Tim Smithers) -- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code -- Use default memcpy for Symantec MSDOS compiler -- Add EXPORT keyword for check_func (needed for Windows DLL) -- add current directory to LD_LIBRARY_PATH for "make test" -- create also a link for libz.so.1 -- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) -- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) -- added -soname for Linux in configure (Chun-Chung Chen, -- assign numbers to the exported functions in zlib.def (for Windows DLL) -- add advice in zlib.h for best usage of deflateSetDictionary -- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) -- allow compilation with ANSI keywords only enabled for TurboC in large model -- avoid "versionString"[0] (Borland bug) -- add NEED_DUMMY_RETURN for Borland -- use variable z_verbose for tracing in debug mode (L. Peter Deutsch) -- allow compilation with CC -- defined STDC for OS/2 (David Charlap) -- limit external names to 8 chars for MVS (Thomas Lund) -- in minigzip.c, use static buffers only for 16-bit systems -- fix suffix check for "minigzip -d foo.gz" -- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) -- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) -- added makelcc.bat for lcc-win32 (Tom St Denis) -- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion -- check for unistd.h in configure (for off_t) -- remove useless check parameter in inflate_blocks_free -- avoid useless assignment of s->check to itself in inflate_blocks_new -- do not flush twice in gzclose (thanks to Ken Raeburn) -- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h -- use NO_ERRNO_H instead of enumeration of operating systems with errno.h -- work around buggy fclose on pipes for HP/UX -- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) -- fix configure if CC is already equal to gcc - -Changes in 1.0.5 (3 Jan 98) -- Fix inflate to terminate gracefully when fed corrupted or invalid data -- Use const for rommable constants in inflate -- Eliminate memory leaks on error conditions in inflate -- Removed some vestigial code in inflate -- Update web address in README - -Changes in 1.0.4 (24 Jul 96) -- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF - bit, so the decompressor could decompress all the correct data but went - on to attempt decompressing extra garbage data. This affected minigzip too -- zlibVersion and gzerror return const char* (needed for DLL) -- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) -- use z_error only for DEBUG (avoid problem with DLLs) - -Changes in 1.0.3 (2 Jul 96) -- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS - small and medium models; this makes the library incompatible with previous - versions for these models. (No effect in large model or on other systems.) -- return OK instead of BUF_ERROR if previous deflate call returned with - avail_out as zero but there is nothing to do -- added memcmp for non STDC compilers -- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) -- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) -- better check for 16-bit mode MSC (avoids problem with Symantec) - -Changes in 1.0.2 (23 May 96) -- added Windows DLL support -- added a function zlibVersion (for the DLL support) -- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) -- Bytef is define's instead of typedef'd only for Borland C -- avoid reading uninitialized memory in example.c -- mention in README that the zlib format is now RFC1950 -- updated Makefile.dj2 -- added algorithm.doc - -Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] -- fix array overlay in deflate.c which sometimes caused bad compressed data -- fix inflate bug with empty stored block -- fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generate bad compressed data -- Bytef is define'd instead of typedef'ed (work around Borland bug) -- added an INDEX file -- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), - Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) -- speed up adler32 for modern machines without auto-increment -- added -ansi for IRIX in configure -- static_init_done in trees.c is an int -- define unlink as delete for VMS -- fix configure for QNX -- add configure branch for SCO and HPUX -- avoid many warnings (unused variables, dead assignments, etc...) -- no fdopen for BeOS -- fix the Watcom fix for 32 bit mode (define FAR as empty) -- removed redefinition of Byte for MKWERKS -- work around an MWKERKS bug (incorrect merge of all .h files) - -Changes in 0.99 (27 Jan 96) -- allow preset dictionary shared between compressor and decompressor -- allow compression level 0 (no compression) -- add deflateParams in zlib.h: allow dynamic change of compression level - and compression strategy -- test large buffers and deflateParams in example.c -- add optional "configure" to build zlib as a shared library -- suppress Makefile.qnx, use configure instead -- fixed deflate for 64-bit systems (detected on Cray) -- fixed inflate_blocks for 64-bit systems (detected on Alpha) -- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) -- always return Z_BUF_ERROR when deflate() has nothing to do -- deflateInit and inflateInit are now macros to allow version checking -- prefix all global functions and types with z_ with -DZ_PREFIX -- make falloc completely reentrant (inftrees.c) -- fixed very unlikely race condition in ct_static_init -- free in reverse order of allocation to help memory manager -- use zlib-1.0/* instead of zlib/* inside the tar.gz -- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith - -Wconversion -Wstrict-prototypes -Wmissing-prototypes" -- allow gzread on concatenated .gz files -- deflateEnd now returns Z_DATA_ERROR if it was premature -- deflate is finally (?) fully deterministic (no matches beyond end of input) -- Document Z_SYNC_FLUSH -- add uninstall in Makefile -- Check for __cpluplus in zlib.h -- Better test in ct_align for partial flush -- avoid harmless warnings for Borland C++ -- initialize hash_head in deflate.c -- avoid warning on fdopen (gzio.c) for HP cc -Aa -- include stdlib.h for STDC compilers -- include errno.h for Cray -- ignore error if ranlib doesn't exist -- call ranlib twice for NeXTSTEP -- use exec_prefix instead of prefix for libz.a -- renamed ct_* as _tr_* to avoid conflict with applications -- clear z->msg in inflateInit2 before any error return -- initialize opaque in example.c, gzio.c, deflate.c and inflate.c -- fixed typo in zconf.h (_GNUC__ => __GNUC__) -- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) -- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) -- in fcalloc, normalize pointer if size > 65520 bytes -- don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc. -- use Z_BINARY instead of BINARY -- document that gzclose after gzdopen will close the file -- allow "a" as mode in gzopen -- fix error checking in gzread -- allow skipping .gz extra-field on pipes -- added reference to Perl interface in README -- put the crc table in FAR data (I dislike more and more the medium model :) -- added get_crc_table -- added a dimension to all arrays (Borland C can't count) -- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast -- guard against multiple inclusion of *.h (for precompiled header on Mac) -- Watcom C pretends to be Microsoft C small model even in 32 bit mode -- don't use unsized arrays to avoid silly warnings by Visual C++: - warning C4746: 'inflate_mask' : unsized array treated as '__far' - (what's wrong with far data in far model?) -- define enum out of inflate_blocks_state to allow compilation with C++ - -Changes in 0.95 (16 Aug 95) -- fix MSDOS small and medium model (now easier to adapt to any compiler) -- inlined send_bits -- fix the final (:-) bug for deflate with flush (output was correct but - not completely flushed in rare occasions) -- default window size is same for compression and decompression - (it's now sufficient to set MAX_WBITS in zconf.h) -- voidp -> voidpf and voidnp -> voidp (for consistency with other - typedefs and because voidnp was not near in large model) - -Changes in 0.94 (13 Aug 95) -- support MSDOS medium model -- fix deflate with flush (could sometimes generate bad output) -- fix deflateReset (zlib header was incorrectly suppressed) -- added support for VMS -- allow a compression level in gzopen() -- gzflush now calls fflush -- For deflate with flush, flush even if no more input is provided -- rename libgz.a as libz.a -- avoid complex expression in infcodes.c triggering Turbo C bug -- work around a problem with gcc on Alpha (in INSERT_STRING) -- don't use inline functions (problem with some gcc versions) -- allow renaming of Byte, uInt, etc... with #define -- avoid warning about (unused) pointer before start of array in deflate.c -- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c -- avoid reserved word 'new' in trees.c - -Changes in 0.93 (25 June 95) -- temporarily disable inline functions -- make deflate deterministic -- give enough lookahead for PARTIAL_FLUSH -- Set binary mode for stdin/stdout in minigzip.c for OS/2 -- don't even use signed char in inflate (not portable enough) -- fix inflate memory leak for segmented architectures - -Changes in 0.92 (3 May 95) -- don't assume that char is signed (problem on SGI) -- Clear bit buffer when starting a stored block -- no memcpy on Pyramid -- suppressed inftest.c -- optimized fill_window, put longest_match inline for gcc -- optimized inflate on stored blocks -- untabify all sources to simplify patches - -Changes in 0.91 (2 May 95) -- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h -- Document the memory requirements in zconf.h -- added "make install" -- fix sync search logic in inflateSync -- deflate(Z_FULL_FLUSH) now works even if output buffer too short -- after inflateSync, don't scare people with just "lo world" -- added support for DJGPP - -Changes in 0.9 (1 May 95) -- don't assume that zalloc clears the allocated memory (the TurboC bug - was Mark's bug after all :) -- let again gzread copy uncompressed data unchanged (was working in 0.71) -- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented -- added a test of inflateSync in example.c -- moved MAX_WBITS to zconf.h because users might want to change that -- document explicitly that zalloc(64K) on MSDOS must return a normalized - pointer (zero offset) -- added Makefiles for Microsoft C, Turbo C, Borland C++ -- faster crc32() - -Changes in 0.8 (29 April 95) -- added fast inflate (inffast.c) -- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this - is incompatible with previous versions of zlib which returned Z_OK -- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) - (actually that was not a compiler bug, see 0.81 above) -- gzread no longer reads one extra byte in certain cases -- In gzio destroy(), don't reference a freed structure -- avoid many warnings for MSDOS -- avoid the ERROR symbol which is used by MS Windows - -Changes in 0.71 (14 April 95) -- Fixed more MSDOS compilation problems :( There is still a bug with - TurboC large model - -Changes in 0.7 (14 April 95) -- Added full inflate support -- Simplified the crc32() interface. The pre- and post-conditioning - (one's complement) is now done inside crc32(). WARNING: this is - incompatible with previous versions; see zlib.h for the new usage - -Changes in 0.61 (12 April 95) -- workaround for a bug in TurboC. example and minigzip now work on MSDOS - -Changes in 0.6 (11 April 95) -- added minigzip.c -- added gzdopen to reopen a file descriptor as gzFile -- added transparent reading of non-gziped files in gzread -- fixed bug in gzread (don't read crc as data) -- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose) -- don't allocate big arrays in the stack (for MSDOS) -- fix some MSDOS compilation problems - -Changes in 0.5: -- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but - not yet Z_FULL_FLUSH -- support decompression but only in a single step (forced Z_FINISH) -- added opaque object for zalloc and zfree -- added deflateReset and inflateReset -- added a variable zlib_version for consistency checking -- renamed the 'filter' parameter of deflateInit2 as 'strategy' - Added Z_FILTERED and Z_HUFFMAN_ONLY constants - -Changes in 0.4: -- avoid "zip" everywhere, use zlib instead of ziplib -- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush - if compression method == 8 -- added adler32 and crc32 -- renamed deflateOptions as deflateInit2, call one or the other but not both -- added the method parameter for deflateInit2 -- added inflateInit2 -- simplified considerably deflateInit and inflateInit by not supporting - user-provided history buffer. This is supported only in deflateInit2 - and inflateInit2 - -Changes in 0.3: -- prefix all macro names with Z_ -- use Z_FINISH instead of deflateEnd to finish compression -- added Z_HUFFMAN_ONLY -- added gzerror() diff --git a/third_party/zlib/FAQ b/third_party/zlib/FAQ deleted file mode 100644 index 92f5d3e..0000000 --- a/third_party/zlib/FAQ +++ /dev/null @@ -1,367 +0,0 @@ - - Frequently Asked Questions about zlib - - -If your question is not there, please check the zlib home page -http://zlib.net/ which may have more recent information. -The latest zlib FAQ is at http://zlib.net/zlib_faq.html - - - 1. Is zlib Y2K-compliant? - - Yes. zlib doesn't handle dates. - - 2. Where can I get a Windows DLL version? - - The zlib sources can be compiled without change to produce a DLL. See the - file win32/DLL_FAQ.txt in the zlib distribution. - - 3. Where can I get a Visual Basic interface to zlib? - - See - * http://marknelson.us/1997/01/01/zlib-engine/ - * win32/DLL_FAQ.txt in the zlib distribution - - 4. compress() returns Z_BUF_ERROR. - - Make sure that before the call of compress(), the length of the compressed - buffer is equal to the available size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference - ("as any"), not by value ("as long"). - - 5. deflate() or inflate() returns Z_BUF_ERROR. - - Before making the call, make sure that avail_in and avail_out are not zero. - When setting the parameter flush equal to Z_FINISH, also make sure that - avail_out is big enough to allow processing all pending input. Note that a - Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be - made with more input or output space. A Z_BUF_ERROR may in fact be - unavoidable depending on how the functions are used, since it is not - possible to tell whether or not there is more output pending when - strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a - heavily annotated example. - - 6. Where's the zlib documentation (man pages, etc.)? - - It's in zlib.h . Examples of zlib usage are in the files test/example.c - and test/minigzip.c, with more in examples/ . - - 7. Why don't you use GNU autoconf or libtool or ...? - - Because we would like to keep zlib as a very small and simple package. - zlib is rather portable and doesn't need much configuration. - - 8. I found a bug in zlib. - - Most of the time, such problems are due to an incorrect usage of zlib. - Please try to reproduce the problem with a small program and send the - corresponding source to us at zlib@gzip.org . Do not send multi-megabyte - data files without prior agreement. - - 9. Why do I get "undefined reference to gzputc"? - - If "make test" produces something like - - example.o(.text+0x154): undefined reference to `gzputc' - - check that you don't have old files libz.* in /usr/lib, /usr/local/lib or - /usr/X11R6/lib. Remove any old versions, then do "make install". - -10. I need a Delphi interface to zlib. - - See the contrib/delphi directory in the zlib distribution. - -11. Can zlib handle .zip archives? - - Not by itself, no. See the directory contrib/minizip in the zlib - distribution. - -12. Can zlib handle .Z files? - - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt - the code of uncompress on your own. - -13. How can I make a Unix shared library? - - By default a shared (and a static) library is built for Unix. So: - - make distclean - ./configure - make - -14. How do I install a shared zlib library on Unix? - - After the above, then: - - make install - - However, many flavors of Unix come with a shared zlib already installed. - Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to - it. You can check the version at the top of zlib.h or with the - ZLIB_VERSION symbol defined in zlib.h . - -15. I have a question about OttoPDF. - - We are not the authors of OttoPDF. The real author is on the OttoPDF web - site: Joel Hainley, jhainley@myndkryme.com. - -16. Can zlib decode Flate data in an Adobe PDF file? - - Yes. See http://www.pdflib.com/ . To modify PDF forms, see - http://sourceforge.net/projects/acroformtool/ . - -17. Why am I getting this "register_frame_info not found" error on Solaris? - - After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib - generates an error such as: - - ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: - symbol __register_frame_info: referenced symbol not found - - The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See - http://www.sunfreeware.com for Solaris versions of zlib and applications - using zlib. - -18. Why does gzip give an error on a file I make with compress/deflate? - - The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip formats - use the same compressed data format internally, but have different headers - and trailers around the compressed data. - -19. Ok, so why are there two different formats? - - The gzip format was designed to retain the directory information about a - single file, such as the name and last modification date. The zlib format - on the other hand was designed for in-memory and communication channel - applications, and has a much more compact header and trailer and uses a - faster integrity check than gzip. - -20. Well that's nice, but how do I make a gzip file in memory? - - You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode the - gzip format using inflateInit2(). Read zlib.h for more details. - -21. Is zlib thread-safe? - - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* - functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's *Init* functions - allow for the application to provide custom memory allocation routines. - - Of course, you should only operate on any given zlib or gzip stream from a - single thread at a time. - -22. Can I use zlib in my commercial application? - - Yes. Please read the license in zlib.h. - -23. Is zlib under the GNU license? - - No. Please read the license in zlib.h. - -24. The license says that altered source versions must be "plainly marked". So - what exactly do I need to do to meet that requirement? - - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In - particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers - x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering - is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also - update the version strings in deflate.c and inftrees.c. - - For altered source distributions, you should also note the origin and - nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your - name (or your company's name), and an email address to contact for help or - issues with the library. - - Note that distributing a compiled zlib library along with zlib.h and - zconf.h is also a source distribution, and so you should change - ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes - in zlib.h as you would for a full source distribution. - -25. Will zlib work on a big-endian or little-endian architecture, and can I - exchange compressed data between them? - - Yes and yes. - -26. Will zlib work on a 64-bit machine? - - Yes. It has been tested on 64-bit machines, and has no dependence on any - data types being limited to 32-bits in length. If you have any - difficulties, please provide a complete problem report to zlib@gzip.org - -27. Will zlib decompress data from the PKWare Data Compression Library? - - No. The PKWare DCL uses a completely different compressed data format than - does PKZIP and zlib. However, you can look in zlib's contrib/blast - directory for a possible solution to your problem. - -28. Can I access data randomly in a compressed stream? - - No, not without some preparation. If when compressing you periodically use - Z_FULL_FLUSH, carefully write all the pending data at those points, and - keep an index of those locations, then you can start decompression at those - points. You have to be careful to not use Z_FULL_FLUSH too often, since it - can significantly degrade compression. Alternatively, you can scan a - deflate stream once to generate an index, and then use that index for - random access. See examples/zran.c . - -29. Does zlib work on MVS, OS/390, CICS, etc.? - - It has in the past, but we have not heard of any recent evidence. There - were working ports of zlib 1.1.4 to MVS, but those links no longer work. - If you know of recent, successful applications of zlib on these operating - systems, please let us know. Thanks. - -30. Is there some simpler, easier to read version of inflate I can look at to - understand the deflate format? - - First off, you should read RFC 1951. Second, yes. Look in zlib's - contrib/puff directory. - -31. Does zlib infringe on any patents? - - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: - - http://www.gzip.org/#faq11 - -32. Can zlib work with greater than 4 GB of data? - - Yes. inflate() and deflate() will process any amount of data correctly. - Each call of inflate() or deflate() is limited to input and output chunks - of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These - counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters - updated after each call of inflate() or deflate() to count beyond 4 GB. - compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. - - The word "may" appears several times above since there is a 4 GB limit only - if the compiler's "long" type is 32 bits. If the compiler's "long" type is - 64 bits, then the limit is 16 exabytes. - -33. Does zlib have any security vulnerabilities? - - The only one that we are aware of is potentially in gzprintf(). If zlib is - compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of an 8K string space (or other value as set by - gzbuffer()), other than the caller of gzprintf() assuring that the output - will not exceed 8K. On the other hand, if zlib is compiled to use - snprintf() or vsnprintf(), which should normally be the case, then there is - no vulnerability. The ./configure script will display warnings if an - insecure variation of sprintf() will be used by gzprintf(). Also the - zlibCompileFlags() function will return information on what variant of - sprintf() is used by gzprintf(). - - If you don't have snprintf() or vsnprintf() and would like one, you can - find a portable implementation here: - - http://www.ijs.si/software/snprintf/ - - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability, and versions - 1.2.1 and 1.2.2 were subject to an access exception when decompressing - invalid compressed data. - -34. Is there a Java version of zlib? - - Probably what you want is to use zlib in Java. zlib is already included - as part of the Java SDK in the java.util.zip package. If you really want - a version of zlib written in the Java language, look on the zlib home - page for links: http://zlib.net/ . - -35. I get this or that compiler or source-code scanner warning when I crank it - up to maximally-pedantic. Can't you guys write proper code? - - Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly as well as contradicted each other. So now, we simply - make sure that the code always works. - -36. Valgrind (or some similar memory access checker) says that deflate is - performing a conditional jump that depends on an uninitialized value. - Isn't that a bug? - - No. That is intentional for performance reasons, and the output of deflate - is not affected. This only started showing up recently since zlib 1.2.x - uses malloc() by default for allocations, whereas earlier versions used - calloc(), which zeros out the allocated memory. Even though the code was - correct, versions 1.2.4 and later was changed to not stimulate these - checkers. - -37. Will zlib read the (insert any ancient or arcane format here) compressed - data format? - - Probably not. Look in the comp.compression FAQ for pointers to various - formats and associated software. - -38. How can I encrypt/decrypt zip files with zlib? - - zlib doesn't support encryption. The original PKZIP encryption is very - weak and can be broken with freely available programs. To get strong - encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib - compression. For PKZIP compatible "encryption", look at - http://www.info-zip.org/ - -39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion with - the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 - correctly points to the zlib specification in RFC 1950 for the "deflate" - transfer encoding, there have been reports of servers and browsers that - incorrectly produce or expect raw deflate data per the deflate - specification in RFC 1951, most notably Microsoft. So even though the - "deflate" transfer encoding using the zlib format would be the more - efficient approach (and in fact exactly what the zlib format was designed - for), using the "gzip" transfer encoding is probably more reliable due to - an unfortunate choice of name on the part of the HTTP 1.1 authors. - - Bottom line: use the gzip format for HTTP 1.1 encoding. - -40. Does zlib support the new "Deflate64" format introduced by PKWare? - - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. In - any case, the compression improvements are so modest compared to other more - modern approaches, that it's not worth the effort to implement. - -41. I'm having a problem with the zip functions in zlib, can you help? - - There are no zip functions in zlib. You are probably using minizip by - Giles Vollant, which is found in the contrib directory of zlib. It is not - part of zlib. In fact none of the stuff in contrib is part of zlib. The - files in there are not supported by the zlib authors. You need to contact - the authors of the respective contribution for help. - -42. The match.asm code in contrib is under the GNU General Public License. - Since it's part of zlib, doesn't that mean that all of zlib falls under the - GNU GPL? - - No. The files in contrib are not part of zlib. They were contributed by - other authors and are provided as a convenience to the user within the zlib - distribution. Each item in contrib has its own license. - -43. Is zlib subject to export controls? What is its ECCN? - - zlib is not subject to export controls, and so is classified as EAR99. - -44. Can you please sign these lengthy legal documents and fax them back to us - so that we can use your software in our product? - - No. Go away. Shoo. diff --git a/third_party/zlib/INDEX b/third_party/zlib/INDEX deleted file mode 100644 index 2ba0641..0000000 --- a/third_party/zlib/INDEX +++ /dev/null @@ -1,68 +0,0 @@ -CMakeLists.txt cmake build file -ChangeLog history of changes -FAQ Frequently Asked Questions about zlib -INDEX this file -Makefile dummy Makefile that tells you to ./configure -Makefile.in template for Unix Makefile -README guess what -configure configure script for Unix -make_vms.com makefile for VMS -test/example.c zlib usages examples for build testing -test/minigzip.c minimal gzip-like functionality for build testing -test/infcover.c inf*.c code coverage for build coverage testing -treebuild.xml XML description of source file dependencies -zconf.h.cmakein zconf.h template for cmake -zconf.h.in zconf.h template for configure -zlib.3 Man page for zlib -zlib.3.pdf Man page in PDF format -zlib.map Linux symbol information -zlib.pc.in Template for pkg-config descriptor -zlib.pc.cmakein zlib.pc template for cmake -zlib2ansi perl script to convert source files for C++ compilation - -amiga/ makefiles for Amiga SAS C -as400/ makefiles for AS/400 -doc/ documentation for formats and algorithms -msdos/ makefiles for MSDOS -nintendods/ makefile for Nintendo DS -old/ makefiles for various architectures and zlib documentation - files that have not yet been updated for zlib 1.2.x -qnx/ makefiles for QNX -watcom/ makefiles for OpenWatcom -win32/ makefiles for Windows - - zlib public header files (required for library use): -zconf.h -zlib.h - - private source files used to build the zlib library: -adler32.c -compress.c -crc32.c -crc32.h -deflate.c -deflate.h -gzclose.c -gzguts.h -gzlib.c -gzread.c -gzwrite.c -infback.c -inffast.c -inffast.h -inffixed.h -inflate.c -inflate.h -inftrees.c -inftrees.h -trees.c -trees.h -uncompr.c -zutil.c -zutil.h - - source files for sample programs -See examples/README.examples - - unsupported contributions by third parties -See contrib/README.contrib diff --git a/third_party/zlib/LICENSE b/third_party/zlib/LICENSE deleted file mode 100644 index ab8ee6f..0000000 --- a/third_party/zlib/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright notice: - - (C) 1995-2022 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu diff --git a/third_party/zlib/Makefile b/third_party/zlib/Makefile deleted file mode 100644 index 6bba86c..0000000 --- a/third_party/zlib/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - -@echo "Please use ./configure first. Thank you." - -distclean: - make -f Makefile.in distclean diff --git a/third_party/zlib/Makefile.in b/third_party/zlib/Makefile.in deleted file mode 100644 index cb8b00a..0000000 --- a/third_party/zlib/Makefile.in +++ /dev/null @@ -1,410 +0,0 @@ -# Makefile for zlib -# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile and test, type: -# ./configure; make test -# Normally configure builds both a static and a shared library. -# If you want to build just a static library, use: ./configure --static - -# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: -# make install -# To install in $HOME instead of /usr/local, use: -# make install prefix=$HOME - -CC=cc - -CFLAGS=-O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DZLIB_DEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -SFLAGS=-O -LDFLAGS= -TEST_LIBS=-L. libz.a -LDSHARED=$(CC) -CPP=$(CC) -E - -STATICLIB=libz.a -SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.3.1 -SHAREDLIBM=libz.so.1 -LIBS=$(STATICLIB) $(SHAREDLIBV) - -AR=ar -ARFLAGS=rc -RANLIB=ranlib -LDCONFIG=ldconfig -LDSHAREDLIBC=-lc -TAR=tar -SHELL=/bin/sh -EXE= - -prefix = /usr/local -exec_prefix = ${prefix} -libdir = ${exec_prefix}/lib -sharedlibdir = ${libdir} -includedir = ${prefix}/include -mandir = ${prefix}/share/man -man3dir = ${mandir}/man3 -pkgconfigdir = ${libdir}/pkgconfig -SRCDIR= -ZINC= -ZINCOUT=-I. - -OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o -OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o -OBJC = $(OBJZ) $(OBJG) - -PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo -PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG) - -# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo -OBJA = -PIC_OBJA = - -OBJS = $(OBJC) $(OBJA) - -PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) - -all: static shared - -static: example$(EXE) minigzip$(EXE) - -shared: examplesh$(EXE) minigzipsh$(EXE) - -all64: example64$(EXE) minigzip64$(EXE) - -check: test - -test: all teststatic testshared - -teststatic: static - @TMPST=tmpst_$$; \ - if echo hello world | ${QEMU_RUN} ./minigzip | ${QEMU_RUN} ./minigzip -d && ${QEMU_RUN} ./example $$TMPST ; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; false; \ - fi - @rm -f tmpst_$$ - -testshared: shared - @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ - DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ - SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ - TMPSH=tmpsh_$$; \ - if echo hello world | ${QEMU_RUN} ./minigzipsh | ${QEMU_RUN} ./minigzipsh -d && ${QEMU_RUN} ./examplesh $$TMPSH; then \ - echo ' *** zlib shared test OK ***'; \ - else \ - echo ' *** zlib shared test FAILED ***'; false; \ - fi - @rm -f tmpsh_$$ - -test64: all64 - @TMP64=tmp64_$$; \ - if echo hello world | ${QEMU_RUN} ./minigzip64 | ${QEMU_RUN} ./minigzip64 -d && ${QEMU_RUN} ./example64 $$TMP64; then \ - echo ' *** zlib 64-bit test OK ***'; \ - else \ - echo ' *** zlib 64-bit test FAILED ***'; false; \ - fi - @rm -f tmp64_$$ - -infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c - -infcover: infcover.o libz.a - $(CC) $(CFLAGS) -o $@ infcover.o libz.a - -cover: infcover - rm -f *.gcda - ${QEMU_RUN} ./infcover - gcov inf*.c - -libz.a: $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -match.o: match.S - $(CPP) match.S > _match.s - $(CC) -c _match.s - mv _match.o match.o - rm -f _match.s - -match.lo: match.S - $(CPP) match.S > _match.s - $(CC) -c -fPIC _match.s - mv _match.o match.lo - rm -f _match.s - -example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c - -minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c - -example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c - -minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h - $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c - - -adler32.o: $(SRCDIR)adler32.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c - -crc32.o: $(SRCDIR)crc32.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c - -deflate.o: $(SRCDIR)deflate.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c - -infback.o: $(SRCDIR)infback.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c - -inffast.o: $(SRCDIR)inffast.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c - -inflate.o: $(SRCDIR)inflate.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c - -inftrees.o: $(SRCDIR)inftrees.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c - -trees.o: $(SRCDIR)trees.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c - -zutil.o: $(SRCDIR)zutil.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c - -compress.o: $(SRCDIR)compress.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c - -uncompr.o: $(SRCDIR)uncompr.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c - -gzclose.o: $(SRCDIR)gzclose.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c - -gzlib.o: $(SRCDIR)gzlib.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c - -gzread.o: $(SRCDIR)gzread.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c - -gzwrite.o: $(SRCDIR)gzwrite.c - $(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c - - -adler32.lo: $(SRCDIR)adler32.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c - -@mv objs/adler32.o $@ - -crc32.lo: $(SRCDIR)crc32.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c - -@mv objs/crc32.o $@ - -deflate.lo: $(SRCDIR)deflate.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c - -@mv objs/deflate.o $@ - -infback.lo: $(SRCDIR)infback.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c - -@mv objs/infback.o $@ - -inffast.lo: $(SRCDIR)inffast.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c - -@mv objs/inffast.o $@ - -inflate.lo: $(SRCDIR)inflate.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c - -@mv objs/inflate.o $@ - -inftrees.lo: $(SRCDIR)inftrees.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c - -@mv objs/inftrees.o $@ - -trees.lo: $(SRCDIR)trees.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c - -@mv objs/trees.o $@ - -zutil.lo: $(SRCDIR)zutil.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c - -@mv objs/zutil.o $@ - -compress.lo: $(SRCDIR)compress.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c - -@mv objs/compress.o $@ - -uncompr.lo: $(SRCDIR)uncompr.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c - -@mv objs/uncompr.o $@ - -gzclose.lo: $(SRCDIR)gzclose.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c - -@mv objs/gzclose.o $@ - -gzlib.lo: $(SRCDIR)gzlib.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c - -@mv objs/gzlib.o $@ - -gzread.lo: $(SRCDIR)gzread.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c - -@mv objs/gzread.o $@ - -gzwrite.lo: $(SRCDIR)gzwrite.c - -@mkdir objs 2>/dev/null || test -d objs - $(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c - -@mv objs/gzwrite.o $@ - - -placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a - $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) - rm -f $(SHAREDLIB) $(SHAREDLIBM) - ln -s $@ $(SHAREDLIB) - ln -s $@ $(SHAREDLIBM) - -@rmdir objs - -example$(EXE): example.o $(STATICLIB) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TEST_LIBS) - -minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TEST_LIBS) - -examplesh$(EXE): example.o $(SHAREDLIBV) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV) - -minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV) - -example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example64.o $(TEST_LIBS) - -minigzip64$(EXE): minigzip64.o $(STATICLIB) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip64.o $(TEST_LIBS) - -install-libs: $(LIBS) - -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi - -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi - -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi - -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi - -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi - rm -f $(DESTDIR)$(libdir)/$(STATICLIB) - cp $(STATICLIB) $(DESTDIR)$(libdir) - chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) - -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 - -@if test -n "$(SHAREDLIBV)"; then \ - rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ - cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ - echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \ - chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ - echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \ - rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \ - ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \ - ($(LDCONFIG) || true) >/dev/null 2>&1; \ - fi - rm -f $(DESTDIR)$(man3dir)/zlib.3 - cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir) - chmod 644 $(DESTDIR)$(man3dir)/zlib.3 - rm -f $(DESTDIR)$(pkgconfigdir)/zlib.pc - cp zlib.pc $(DESTDIR)$(pkgconfigdir) - chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc -# The ranlib in install is needed on NeXTSTEP which checks file times -# ldconfig is for Linux - -install: install-libs - -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi - rm -f $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h - cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir) - chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h - -uninstall: - cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h - cd $(DESTDIR)$(libdir) && rm -f libz.a; \ - if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ - rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ - fi - cd $(DESTDIR)$(man3dir) && rm -f zlib.3 - cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc - -docs: zlib.3.pdf - -zlib.3.pdf: $(SRCDIR)zlib.3 - groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@ - -zconf.h.cmakein: $(SRCDIR)zconf.h.in - -@ TEMPFILE=zconfh_$$; \ - echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\ - sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\ - touch -r $(SRCDIR)zconf.h.in $@ &&\ - rm $$TEMPFILE - -zconf: $(SRCDIR)zconf.h.in - cp -p $(SRCDIR)zconf.h.in zconf.h - -minizip-test: static - cd contrib/minizip && { CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } - -minizip-clean: - cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; } - -mostlyclean: clean -clean: minizip-clean - rm -f *.o *.lo *~ \ - example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ - example64$(EXE) minigzip64$(EXE) \ - infcover \ - libz.* foo.gz so_locations \ - _match.s maketree contrib/infback9/*.o - rm -rf objs - rm -f *.gcda *.gcno *.gcov - rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov - -maintainer-clean: distclean -distclean: clean zconf zconf.h.cmakein - rm -f Makefile zlib.pc configure.log - -@rm -f .DS_Store - @if [ -f Makefile.in ]; then \ - printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \ - printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \ - touch -r $(SRCDIR)Makefile.in Makefile ; fi - -tags: - etags $(SRCDIR)*.[ch] - -adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h -compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h -crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h -deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h -inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h -inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h -trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h - -adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h -compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h -crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h -deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h -infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h -inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h -inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h -trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h diff --git a/third_party/zlib/README b/third_party/zlib/README deleted file mode 100644 index c5f9175..0000000 --- a/third_party/zlib/README +++ /dev/null @@ -1,117 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.3.1 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and -rfc1952 (gzip format). - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example -of the library is given in the file test/example.c which also tests that -the library is working correctly. Another example is given in the file -test/minigzip.c. The compression library itself is composed of all source -files in the root directory. - -To compile all files and run the test program, follow the instructions given at -the top of Makefile.in. In short "./configure; make test", and if that goes -well, "make install" should work for most flavors of Unix. For Windows, use -one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use -make_vms.com. - -Questions about zlib should be sent to , or to Gilles Vollant - for the Windows DLL version. The zlib home page is -http://zlib.net/ . Before reporting a problem, please check this site to -verify that you have the latest version of zlib; otherwise get the latest -version and check whether the problem still exists or not. - -PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. - -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available at -https://marknelson.us/posts/1997/01/01/zlib-engine.html . - -The changes made in version 1.3.1 are documented in the file ChangeLog. - -Unsupported third party contributions are provided in directory contrib/ . - -zlib is available in Java using the java.util.zip package. Follow the API -Documentation link at: https://docs.oracle.com/search/?q=java.util.zip . - -A Perl interface to zlib and bzip2 written by Paul Marquess -can be found at https://github.com/pmqs/IO-Compress . - -A Python interface to zlib written by A.M. Kuchling is -available in Python 1.5 and later versions, see -http://docs.python.org/library/zlib.html . - -zlib is built into tcl: http://wiki.tcl.tk/4610 . - -An experimental package to read and write files in .zip format, written on top -of zlib by Gilles Vollant , is available in the -contrib/minizip directory of zlib. - - -Notes for some targets: - -- For Windows DLL versions, please see win32/DLL_FAQ.txt - -- For 64-bit Irix, deflate.c must be compiled without any optimization. With - -O, one libpng test fails. The test works in 32 bit mode (with the -n32 - compiler flag). The compiler bug has been reported to SGI. - -- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works - when compiled with cc. - -- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is - necessary to get gzprintf working correctly. This is done by configure. - -- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with - other compilers. Use "make test" to check your compiler. - -- gzdopen is not supported on RISCOS or BEOS. - -- For PalmOs, see http://palmzlib.sourceforge.net/ - - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate and - zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; they - are too numerous to cite here. - -Copyright notice: - - (C) 1995-2024 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. We make all -contributions to and distributions of this project solely in our personal -capacity, and are not conveying any rights to any intellectual property of -any third parties. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. diff --git a/third_party/zlib/adler32.c b/third_party/zlib/adler32.c deleted file mode 100644 index 04b81d2..0000000 --- a/third_party/zlib/adler32.c +++ /dev/null @@ -1,164 +0,0 @@ -/* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011, 2016 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" - -#define BASE 65521U /* largest prime smaller than 65536 */ -#define NMAX 5552 -/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ - -#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - -/* use NO_DIVIDE if your processor does not do division in hardware -- - try it both ways to see which is faster */ -#ifdef NO_DIVIDE -/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 - (thank you to John Reiser for pointing this out) */ -# define CHOP(a) \ - do { \ - unsigned long tmp = a >> 16; \ - a &= 0xffffUL; \ - a += (tmp << 4) - tmp; \ - } while (0) -# define MOD28(a) \ - do { \ - CHOP(a); \ - if (a >= BASE) a -= BASE; \ - } while (0) -# define MOD(a) \ - do { \ - CHOP(a); \ - MOD28(a); \ - } while (0) -# define MOD63(a) \ - do { /* this assumes a is not negative */ \ - z_off64_t tmp = a >> 32; \ - a &= 0xffffffffL; \ - a += (tmp << 8) - (tmp << 5) + tmp; \ - tmp = a >> 16; \ - a &= 0xffffL; \ - a += (tmp << 4) - tmp; \ - tmp = a >> 16; \ - a &= 0xffffL; \ - a += (tmp << 4) - tmp; \ - if (a >= BASE) a -= BASE; \ - } while (0) -#else -# define MOD(a) a %= BASE -# define MOD28(a) a %= BASE -# define MOD63(a) a %= BASE -#endif - -/* ========================================================================= */ -uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { - unsigned long sum2; - unsigned n; - - /* split Adler-32 into component sums */ - sum2 = (adler >> 16) & 0xffff; - adler &= 0xffff; - - /* in case user likes doing a byte at a time, keep it fast */ - if (len == 1) { - adler += buf[0]; - if (adler >= BASE) - adler -= BASE; - sum2 += adler; - if (sum2 >= BASE) - sum2 -= BASE; - return adler | (sum2 << 16); - } - - /* initial Adler-32 value (deferred check for len == 1 speed) */ - if (buf == Z_NULL) - return 1L; - - /* in case short lengths are provided, keep it somewhat fast */ - if (len < 16) { - while (len--) { - adler += *buf++; - sum2 += adler; - } - if (adler >= BASE) - adler -= BASE; - MOD28(sum2); /* only added so many BASE's */ - return adler | (sum2 << 16); - } - - /* do length NMAX blocks -- requires just one modulo operation */ - while (len >= NMAX) { - len -= NMAX; - n = NMAX / 16; /* NMAX is divisible by 16 */ - do { - DO16(buf); /* 16 sums unrolled */ - buf += 16; - } while (--n); - MOD(adler); - MOD(sum2); - } - - /* do remaining bytes (less than NMAX, still just one modulo) */ - if (len) { /* avoid modulos if none remaining */ - while (len >= 16) { - len -= 16; - DO16(buf); - buf += 16; - } - while (len--) { - adler += *buf++; - sum2 += adler; - } - MOD(adler); - MOD(sum2); - } - - /* return recombined sums */ - return adler | (sum2 << 16); -} - -/* ========================================================================= */ -uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { - return adler32_z(adler, buf, len); -} - -/* ========================================================================= */ -local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { - unsigned long sum1; - unsigned long sum2; - unsigned rem; - - /* for negative len, return invalid adler32 as a clue for debugging */ - if (len2 < 0) - return 0xffffffffUL; - - /* the derivation of this formula is left as an exercise for the reader */ - MOD63(len2); /* assumes len2 >= 0 */ - rem = (unsigned)len2; - sum1 = adler1 & 0xffff; - sum2 = rem * sum1; - MOD(sum2); - sum1 += (adler2 & 0xffff) + BASE - 1; - sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; - if (sum1 >= BASE) sum1 -= BASE; - if (sum1 >= BASE) sum1 -= BASE; - if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); - if (sum2 >= BASE) sum2 -= BASE; - return sum1 | (sum2 << 16); -} - -/* ========================================================================= */ -uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { - return adler32_combine_(adler1, adler2, len2); -} - -uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { - return adler32_combine_(adler1, adler2, len2); -} diff --git a/third_party/zlib/amiga/Makefile.pup b/third_party/zlib/amiga/Makefile.pup deleted file mode 100644 index 8940c12..0000000 --- a/third_party/zlib/amiga/Makefile.pup +++ /dev/null @@ -1,69 +0,0 @@ -# Amiga powerUP (TM) Makefile -# makefile for libpng and SAS C V6.58/7.00 PPC compiler -# Copyright (C) 1998 by Andreas R. Kleinert - -LIBNAME = libzip.a - -CC = scppc -CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \ - OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER -AR = ppc-amigaos-ar cr -RANLIB = ppc-amigaos-ranlib -LD = ppc-amigaos-ld -r -LDFLAGS = -o -LDLIBS = LIB:scppc.a LIB:end.o -RM = delete quiet - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -TEST_OBJS = example.o minigzip.o - -all: example minigzip - -check: test -test: all - example - echo hello world | minigzip | minigzip -d - -$(LIBNAME): $(OBJS) - $(AR) $@ $(OBJS) - -$(RANLIB) $@ - -example: example.o $(LIBNAME) - $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) - -minigzip: minigzip.o $(LIBNAME) - $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) - -mostlyclean: clean -clean: - $(RM) *.o example minigzip $(LIBNAME) foo.gz - -zip: - zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ - descrip.mms *.[ch] - -tgz: - cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ - zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: crc32.h zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzclose.o: zlib.h zconf.h gzguts.h -gzlib.o: zlib.h zconf.h gzguts.h -gzread.o: zlib.h zconf.h gzguts.h -gzwrite.o: zlib.h zconf.h gzguts.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -minigzip.o: zlib.h zconf.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/third_party/zlib/amiga/Makefile.sas b/third_party/zlib/amiga/Makefile.sas deleted file mode 100644 index 749e291..0000000 --- a/third_party/zlib/amiga/Makefile.sas +++ /dev/null @@ -1,68 +0,0 @@ -# SMakefile for zlib -# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly -# Osma Ahvenlampi -# Amiga, SAS/C 6.56 & Smake - -CC=sc -CFLAGS=OPT -#CFLAGS=OPT CPU=68030 -#CFLAGS=DEBUG=LINE -LDFLAGS=LIB z.lib - -SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \ - NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \ - DEF=POSTINC - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -TEST_OBJS = example.o minigzip.o - -all: SCOPTIONS example minigzip - -check: test -test: all - example - echo hello world | minigzip | minigzip -d - -install: z.lib - copy clone zlib.h zconf.h INCLUDE: - copy clone z.lib LIB: - -z.lib: $(OBJS) - oml z.lib r $(OBJS) - -example: example.o z.lib - $(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS) - -minigzip: minigzip.o z.lib - $(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS) - -mostlyclean: clean -clean: - -delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS - -SCOPTIONS: Makefile.sas - copy to $@ (uLong)max ? max : (uInt)left; - left -= stream.avail_out; - } - if (stream.avail_in == 0) { - stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; - sourceLen -= stream.avail_in; - } - err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); - } while (err == Z_OK); - - *destLen = stream.total_out; - deflateEnd(&stream); - return err == Z_STREAM_END ? Z_OK : err; -} - -/* =========================================================================== - */ -int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, - uLong sourceLen) { - return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); -} - -/* =========================================================================== - If the default memLevel or windowBits for deflateInit() is changed, then - this function needs to be updated. - */ -uLong ZEXPORT compressBound(uLong sourceLen) { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13; -} diff --git a/third_party/zlib/configure b/third_party/zlib/configure deleted file mode 100644 index c55098a..0000000 --- a/third_party/zlib/configure +++ /dev/null @@ -1,929 +0,0 @@ -#!/bin/sh -# configure script for zlib. -# -# Normally configure builds both a static and a shared library. -# If you want to build just a static library, use: ./configure --static -# -# To impose specific compiler or flags or install directory, use for example: -# prefix=$HOME CC=cc CFLAGS="-O4" ./configure -# or for csh/tcsh users: -# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) - -# Incorrect settings of CC or CFLAGS may prevent creating a shared library. -# If you have problems, try without defining CC and CFLAGS before reporting -# an error. - -# start off configure.log -echo -------------------- >> configure.log -echo $0 $* >> configure.log -date >> configure.log - -# get source directory -SRCDIR=`dirname $0` -if test $SRCDIR = "."; then - ZINC="" - ZINCOUT="-I." - SRCDIR="" -else - ZINC='-I. -include zconf.h' - ZINCOUT='-I. -I$(SRCDIR)' - SRCDIR="$SRCDIR/" -fi - -# set command prefix for cross-compilation -if [ -n "${CHOST}" ]; then - uname=${CHOST} - mname=${CHOST} - CROSS_PREFIX="${CHOST}-" -else - mname=`(uname -a || echo unknown) 2>/dev/null` -fi - -# destination name for static library -STATICLIB=libz.a - -# extract zlib version numbers from zlib.h -VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` -VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'` -VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'` - -# establish commands for library building -if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then - AR=${AR-"${CROSS_PREFIX}ar"} - test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -else - AR=${AR-"ar"} - test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -fi -ARFLAGS=${ARFLAGS-"rc"} -if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then - RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} - test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log -else - RANLIB=${RANLIB-"ranlib"} -fi -if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then - NM=${NM-"${CROSS_PREFIX}nm"} - test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log -else - NM=${NM-"nm"} -fi - -# set defaults before processing command line options -LDCONFIG=${LDCONFIG-"ldconfig"} -LDSHAREDLIBC="${LDSHAREDLIBC--lc}" -ARCHS= -prefix=${prefix-/usr/local} -exec_prefix=${exec_prefix-'${prefix}'} -libdir=${libdir-'${exec_prefix}/lib'} -sharedlibdir=${sharedlibdir-'${libdir}'} -includedir=${includedir-'${prefix}/include'} -mandir=${mandir-'${prefix}/share/man'} -shared_ext='.so' -shared=1 -solo=0 -cover=0 -zprefix=0 -zconst=0 -build64=0 -gcc=0 -warn=0 -debug=0 -address=0 -memory=0 -old_cc="$CC" -old_cflags="$CFLAGS" -OBJC='$(OBJZ) $(OBJG)' -PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' - -# leave this script, optionally in a bad way -leave() -{ - if test "$*" != "0"; then - echo "** $0 aborting." | tee -a configure.log - fi - rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version - echo -------------------- >> configure.log - echo >> configure.log - echo >> configure.log - exit $1 -} - -# process command line options -while test $# -ge 1 -do -case "$1" in - -h* | --help) - echo 'usage:' | tee -a configure.log - echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log - echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log - echo ' [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log - exit 0 ;; - -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;; - -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;; - -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;; - --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;; - -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;; - -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;; - -p* | --prefix) prefix="$2"; shift; shift ;; - -e* | --eprefix) exec_prefix="$2"; shift; shift ;; - -l* | --libdir) libdir="$2"; shift; shift ;; - -i* | --includedir) includedir="$2"; shift; shift ;; - -s* | --shared | --enable-shared) shared=1; shift ;; - -t | --static) shared=0; shift ;; - --solo) solo=1; shift ;; - --cover) cover=1; shift ;; - -z* | --zprefix) zprefix=1; shift ;; - -6* | --64) build64=1; shift ;; - -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; - --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; - --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; - -c* | --const) zconst=1; shift ;; - -w* | --warn) warn=1; shift ;; - -d* | --debug) debug=1; shift ;; - --sanitize) address=1; shift ;; - --address) address=1; shift ;; - --memory) memory=1; shift ;; - *) - echo "unknown option: $1" | tee -a configure.log - echo "$0 --help for help" | tee -a configure.log - leave 1;; - esac -done - -# temporary file name -test=ztest$$ - -# put arguments in log, also put test file in log if used in arguments -show() -{ - case "$*" in - *$test.c*) - echo === $test.c === >> configure.log - cat $test.c >> configure.log - echo === >> configure.log;; - esac - echo $* >> configure.log -} - -# check for gcc vs. cc and set compile and link flags based on the system identified by uname -cat > $test.c </dev/null 2>&1; then - cc=${CROSS_PREFIX}gcc - else - cc=${CROSS_PREFIX}cc - fi -else - cc=${CC} -fi - -case "$cc" in - *gcc*) gcc=1 ;; - *clang*) gcc=1 ;; -esac -case `$cc -v 2>&1` in - *gcc*) gcc=1 ;; - *clang*) gcc=1 ;; -esac - -show $cc -c $test.c -if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then - echo ... using gcc >> configure.log - CC="$cc" - CFLAGS="${CFLAGS--O3}" - SFLAGS="${CFLAGS--O3} -fPIC" - if test "$ARCHS"; then - CFLAGS="${CFLAGS} ${ARCHS}" - LDFLAGS="${LDFLAGS} ${ARCHS}" - fi - if test $build64 -eq 1; then - CFLAGS="${CFLAGS} -m64" - SFLAGS="${SFLAGS} -m64" - fi - if test "$warn" -eq 1; then - if test "$zconst" -eq 1; then - CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -DZLIB_CONST" - else - CFLAGS="${CFLAGS} -Wall -Wextra" - fi - fi - if test $address -eq 1; then - CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer" - fi - if test $memory -eq 1; then - CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer" - fi - if test $debug -eq 1; then - CFLAGS="${CFLAGS} -DZLIB_DEBUG" - SFLAGS="${SFLAGS} -DZLIB_DEBUG" - fi - if test -z "$uname"; then - uname=`(uname -s || echo unknown) 2>/dev/null` - fi - case "$uname" in - Linux* | linux* | *-linux* | GNU | GNU/* | solaris*) - case "$mname" in - *sparc*) - LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;; - esac - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;; - *BSD | *bsd* | DragonFly) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} - LDCONFIG="ldconfig -m" ;; - CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*) - EXE='.exe' ;; - MINGW* | mingw* | *-mingw*) - rm -f $test.[co] $test $test$shared_ext - echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log - LDSHARED=${LDSHARED-"$cc -shared"} - LDSHAREDLIBC="" - EXE='.exe' ;; - QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 - # (alain.bonnefoy@icbt.com) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; - HP-UX*) - LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} - case `(uname -m || echo unknown) 2>/dev/null` in - ia64) - shared_ext='.so' - SHAREDLIB='libz.so' ;; - *) - shared_ext='.sl' - SHAREDLIB='libz.sl' ;; - esac ;; - AIX*) - LDFLAGS="${LDFLAGS} -Wl,-brtl" ;; - Darwin* | darwin* | *-darwin*) - shared_ext='.dylib' - SHAREDLIB=libz$shared_ext - SHAREDLIBV=libz.$VER$shared_ext - SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} - if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then - AR="${CROSS_PREFIX}libtool" - elif libtool -V 2>&1 | grep Apple > /dev/null; then - AR="libtool" - else - AR="/usr/bin/libtool" - fi - ARFLAGS="-o" ;; - *) - LDSHARED=${LDSHARED-"$cc -shared"} ;; - esac -else - # find system name and corresponding cc options - CC=${CC-cc} - gcc=0 - echo ... using $CC >> configure.log - if test -z "$uname"; then - uname=`(uname -sr || echo unknown) 2>/dev/null` - fi - case "$uname" in - HP-UX*) SFLAGS=${CFLAGS-"-O +z"} - CFLAGS=${CFLAGS-"-O"} -# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} - LDSHARED=${LDSHARED-"ld -b"} - case `(uname -m || echo unknown) 2>/dev/null` in - ia64) - shared_ext='.so' - SHAREDLIB='libz.so' ;; - *) - shared_ext='.sl' - SHAREDLIB='libz.sl' ;; - esac ;; - IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} - CFLAGS=${CFLAGS-"-ansi -O2"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; - OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDFLAGS="${LDFLAGS} -Wl,-rpath,." - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;; - OSF1*) SFLAGS=${CFLAGS-"-O -std1"} - CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; - QNX*) SFLAGS=${CFLAGS-"-4 -O"} - CFLAGS=${CFLAGS-"-4 -O"} - LDSHARED=${LDSHARED-"cc"} - RANLIB=${RANLIB-"true"} - AR="cc" - ARFLAGS="-A" ;; - SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} - CFLAGS=${CFLAGS-"-O3"} - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;; - SunOS\ 5* | solaris*) - LDSHARED=${LDSHARED-"cc -G -h libz$shared_ext.$VER1"} - SFLAGS=${CFLAGS-"-fast -KPIC"} - CFLAGS=${CFLAGS-"-fast"} - if test $build64 -eq 1; then - # old versions of SunPRO/Workshop/Studio don't support -m64, - # but newer ones do. Check for it. - flag64=`$CC -flags | egrep -- '^-m64'` - if test x"$flag64" != x"" ; then - CFLAGS="${CFLAGS} -m64" - SFLAGS="${SFLAGS} -m64" - else - case `(uname -m || echo unknown) 2>/dev/null` in - i86*) - SFLAGS="$SFLAGS -xarch=amd64" - CFLAGS="$CFLAGS -xarch=amd64" ;; - *) - SFLAGS="$SFLAGS -xarch=v9" - CFLAGS="$CFLAGS -xarch=v9" ;; - esac - fi - fi - if test -n "$ZINC"; then - ZINC='-I- -I. -I$(SRCDIR)' - fi - ;; - SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} - CFLAGS=${CFLAGS-"-O2"} - LDSHARED=${LDSHARED-"ld"} ;; - SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} - CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"} - LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;; - UNIX_System_V\ 4.2.0) - SFLAGS=${CFLAGS-"-KPIC -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - UNIX_SV\ 4.2MP) - SFLAGS=${CFLAGS-"-Kconform_pic -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - OpenUNIX\ 5) - SFLAGS=${CFLAGS-"-KPIC -O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"} ;; - AIX*) # Courtesy of dbakker@arrayasolutions.com - SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} - CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} - LDSHARED=${LDSHARED-"xlc -G"} ;; - # send working options for other systems to zlib@gzip.org - *) SFLAGS=${CFLAGS-"-O"} - CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -shared"} ;; - esac -fi - -# destination names for shared library if not defined above -SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} -SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} -SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} - -echo >> configure.log - -# define functions for testing compiler and library characteristics and logging the results - -cat > $test.c </dev/null; then - try() - { - show $* - test "`( $* ) 2>&1 | tee -a configure.log`" = "" - } - echo - using any output from compiler to indicate an error >> configure.log -else - try() - { - show $* - got=`( $* ) 2>&1` - ret=$? - if test "$got" != ""; then - printf "%s\n" "$got" >> configure.log - fi - if test $ret -ne 0; then - echo "(exit code "$ret")" >> configure.log - fi - return $ret - } -fi - -tryboth() -{ - show $* - got=`( $* ) 2>&1` - ret=$? - if test "$got" != ""; then - printf "%s\n" "$got" >> configure.log - fi - if test $ret -ne 0; then - echo "(exit code "$ret")" >> configure.log - return $ret - fi - test "$got" = "" -} - -cat > $test.c << EOF -int foo() { return 0; } -EOF -echo "Checking for obsessive-compulsive compiler options..." >> configure.log -if try $CC -c $CFLAGS $test.c; then - : -else - echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log - leave 1 -fi - -echo >> configure.log - -# see if shared library build supported -cat > $test.c <> configure.log - -# check for size_t -cat > $test.c < -#include -size_t dummy = 0; -EOF -if try $CC -c $CFLAGS $test.c; then - echo "Checking for size_t... Yes." | tee -a configure.log -else - echo "Checking for size_t... No." | tee -a configure.log - # find a size_t integer type - # check for long long - cat > $test.c << EOF -long long dummy = 0; -EOF - if try $CC -c $CFLAGS $test.c; then - echo "Checking for long long... Yes." | tee -a configure.log - cat > $test.c < -int main(void) { - if (sizeof(void *) <= sizeof(int)) puts("int"); - else if (sizeof(void *) <= sizeof(long)) puts("long"); - else puts("z_longlong"); - return 0; -} -EOF - else - echo "Checking for long long... No." | tee -a configure.log - cat > $test.c < -int main(void) { - if (sizeof(void *) <= sizeof(int)) puts("int"); - else puts("long"); - return 0; -} -EOF - fi - if try $CC $CFLAGS -o $test $test.c; then - sizet=`./$test` - echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log - CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" - SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" - else - echo "Checking for a pointer-size integer type... not found." | tee -a configure.log - fi -fi - -echo >> configure.log - -# check for large file support, and if none, check for fseeko() -cat > $test.c < -off64_t dummy = 0; -EOF -if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" - SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" - ALL="${ALL} all64" - TEST="${TEST} test64" - echo "Checking for off64_t... Yes." | tee -a configure.log - echo "Checking for fseeko... Yes." | tee -a configure.log -else - echo "Checking for off64_t... No." | tee -a configure.log - echo >> configure.log - cat > $test.c < -int main(void) { - fseeko(NULL, 0, 0); - return 0; -} -EOF - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for fseeko... Yes." | tee -a configure.log - else - CFLAGS="${CFLAGS} -DNO_FSEEKO" - SFLAGS="${SFLAGS} -DNO_FSEEKO" - echo "Checking for fseeko... No." | tee -a configure.log - fi -fi - -echo >> configure.log - -# check for strerror() for use by gz* functions -cat > $test.c < -#include -int main() { return strlen(strerror(errno)); } -EOF -if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for strerror... Yes." | tee -a configure.log -else - CFLAGS="${CFLAGS} -DNO_STRERROR" - SFLAGS="${SFLAGS} -DNO_STRERROR" - echo "Checking for strerror... No." | tee -a configure.log -fi - -# copy clean zconf.h for subsequent edits -cp -p ${SRCDIR}zconf.h.in zconf.h - -echo >> configure.log - -# check for unistd.h and save result in zconf.h -cat > $test.c < -int main() { return 0; } -EOF -if try $CC -c $CFLAGS $test.c; then - sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo "Checking for unistd.h... Yes." | tee -a configure.log -else - echo "Checking for unistd.h... No." | tee -a configure.log -fi - -echo >> configure.log - -# check for stdarg.h and save result in zconf.h -cat > $test.c < -int main() { return 0; } -EOF -if try $CC -c $CFLAGS $test.c; then - sed < zconf.h "/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo "Checking for stdarg.h... Yes." | tee -a configure.log -else - echo "Checking for stdarg.h... No." | tee -a configure.log -fi - -# if the z_ prefix was requested, save that in zconf.h -if test $zprefix -eq 1; then - sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h - mv zconf.temp.h zconf.h - echo >> configure.log - echo "Using z_ prefix on all symbols." | tee -a configure.log -fi - -# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists -if test $solo -eq 1; then - sed '/#define ZCONF_H/a\ -#define Z_SOLO - -' < zconf.h > zconf.temp.h - mv zconf.temp.h zconf.h -OBJC='$(OBJZ)' -PIC_OBJC='$(PIC_OBJZ)' -fi - -# if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X -if test $cover -eq 1; then - CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" - if test -n "$GCC_CLASSIC"; then - CC=$GCC_CLASSIC - fi -fi - -echo >> configure.log - -# conduct a series of tests to resolve eight possible cases of using "vs" or "s" printf functions -# (using stdarg or not), with or without "n" (proving size of buffer), and with or without a -# return value. The most secure result is vsnprintf() with a return value. snprintf() with a -# return value is secure as well, but then gzprintf() will be limited to 20 arguments. -cat > $test.c < -#include -#include "zconf.h" -int main() -{ -#ifndef STDC - choke me -#endif - return 0; -} -EOF -if try $CC -c $CFLAGS $test.c; then - echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | tee -a configure.log - - echo >> configure.log - cat > $test.c < -#include -int mytest(const char *fmt, ...) -{ - char buf[20]; - va_list ap; - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return 0; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -#include -int mytest(const char *fmt, ...) -{ - int n; - char buf[20]; - va_list ap; - va_start(ap, fmt); - n = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return n; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of vsnprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_vsnprintf_void" - SFLAGS="$SFLAGS -DHAS_vsnprintf_void" - echo "Checking for return value of vsnprintf()... No." | tee -a configure.log - echo " WARNING: apparently vsnprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - else - CFLAGS="$CFLAGS -DNO_vsnprintf" - SFLAGS="$SFLAGS -DNO_vsnprintf" - echo "Checking for vsnprintf() in stdio.h... No." | tee -a configure.log - echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.log - echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -#include -int mytest(const char *fmt, ...) -{ - int n; - char buf[20]; - va_list ap; - va_start(ap, fmt); - n = vsprintf(buf, fmt, ap); - va_end(ap); - return n; -} -int main() -{ - return (mytest("Hello%d\n", 1)); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of vsprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_vsprintf_void" - SFLAGS="$SFLAGS -DHAS_vsprintf_void" - echo "Checking for return value of vsprintf()... No." | tee -a configure.log - echo " WARNING: apparently vsprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - fi -else - echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - snprintf(buf, sizeof(buf), "%s", "foo"); - return 0; -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC $CFLAGS -o $test $test.c; then - echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - return snprintf(buf, sizeof(buf), "%s", "foo"); -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of snprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_snprintf_void" - SFLAGS="$SFLAGS -DHAS_snprintf_void" - echo "Checking for return value of snprintf()... No." | tee -a configure.log - echo " WARNING: apparently snprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - else - CFLAGS="$CFLAGS -DNO_snprintf" - SFLAGS="$SFLAGS -DNO_snprintf" - echo "Checking for snprintf() in stdio.h... No." | tee -a configure.log - echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | tee -a configure.log - echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - - echo >> configure.log - cat >$test.c < -int mytest() -{ - char buf[20]; - return sprintf(buf, "%s", "foo"); -} -int main() -{ - return (mytest()); -} -EOF - - if try $CC -c $CFLAGS $test.c; then - echo "Checking for return value of sprintf()... Yes." | tee -a configure.log - else - CFLAGS="$CFLAGS -DHAS_sprintf_void" - SFLAGS="$SFLAGS -DHAS_sprintf_void" - echo "Checking for return value of sprintf()... No." | tee -a configure.log - echo " WARNING: apparently sprintf() does not return a value. zlib" | tee -a configure.log - echo " can build but will be open to possible string-format security" | tee -a configure.log - echo " vulnerabilities." | tee -a configure.log - fi - fi -fi - -# see if we can hide zlib internal symbols that are linked between separate source files -if test "$gcc" -eq 1; then - echo >> configure.log - cat > $test.c <> configure.log -echo ALL = $ALL >> configure.log -echo AR = $AR >> configure.log -echo ARFLAGS = $ARFLAGS >> configure.log -echo CC = $CC >> configure.log -echo CFLAGS = $CFLAGS >> configure.log -echo CPP = $CPP >> configure.log -echo EXE = $EXE >> configure.log -echo LDCONFIG = $LDCONFIG >> configure.log -echo LDFLAGS = $LDFLAGS >> configure.log -echo LDSHARED = $LDSHARED >> configure.log -echo LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log -echo OBJC = $OBJC >> configure.log -echo PIC_OBJC = $PIC_OBJC >> configure.log -echo RANLIB = $RANLIB >> configure.log -echo SFLAGS = $SFLAGS >> configure.log -echo SHAREDLIB = $SHAREDLIB >> configure.log -echo SHAREDLIBM = $SHAREDLIBM >> configure.log -echo SHAREDLIBV = $SHAREDLIBV >> configure.log -echo STATICLIB = $STATICLIB >> configure.log -echo TEST = $TEST >> configure.log -echo VER = $VER >> configure.log -echo SRCDIR = $SRCDIR >> configure.log -echo exec_prefix = $exec_prefix >> configure.log -echo includedir = $includedir >> configure.log -echo libdir = $libdir >> configure.log -echo mandir = $mandir >> configure.log -echo prefix = $prefix >> configure.log -echo sharedlibdir = $sharedlibdir >> configure.log -echo uname = $uname >> configure.log - -# update Makefile with the configure results -sed < ${SRCDIR}Makefile.in " -/^CC *=/s#=.*#=$CC# -/^CFLAGS *=/s#=.*#=$CFLAGS# -/^SFLAGS *=/s#=.*#=$SFLAGS# -/^LDFLAGS *=/s#=.*#=$LDFLAGS# -/^LDSHARED *=/s#=.*#=$LDSHARED# -/^CPP *=/s#=.*#=$CPP# -/^STATICLIB *=/s#=.*#=$STATICLIB# -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# -/^AR *=/s#=.*#=$AR# -/^ARFLAGS *=/s#=.*#=$ARFLAGS# -/^RANLIB *=/s#=.*#=$RANLIB# -/^LDCONFIG *=/s#=.*#=$LDCONFIG# -/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC# -/^EXE *=/s#=.*#=$EXE# -/^SRCDIR *=/s#=.*#=$SRCDIR# -/^ZINC *=/s#=.*#=$ZINC# -/^ZINCOUT *=/s#=.*#=$ZINCOUT# -/^prefix *=/s#=.*#=$prefix# -/^exec_prefix *=/s#=.*#=$exec_prefix# -/^libdir *=/s#=.*#=$libdir# -/^sharedlibdir *=/s#=.*#=$sharedlibdir# -/^includedir *=/s#=.*#=$includedir# -/^mandir *=/s#=.*#=$mandir# -/^OBJC *=/s#=.*#= $OBJC# -/^PIC_OBJC *=/s#=.*#= $PIC_OBJC# -/^all: */s#:.*#: $ALL# -/^test: */s#:.*#: $TEST# -" > Makefile - -# create zlib.pc with the configure results -sed < ${SRCDIR}zlib.pc.in " -/^CC *=/s#=.*#=$CC# -/^CFLAGS *=/s#=.*#=$CFLAGS# -/^CPP *=/s#=.*#=$CPP# -/^LDSHARED *=/s#=.*#=$LDSHARED# -/^STATICLIB *=/s#=.*#=$STATICLIB# -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# -/^AR *=/s#=.*#=$AR# -/^ARFLAGS *=/s#=.*#=$ARFLAGS# -/^RANLIB *=/s#=.*#=$RANLIB# -/^EXE *=/s#=.*#=$EXE# -/^prefix *=/s#=.*#=$prefix# -/^exec_prefix *=/s#=.*#=$exec_prefix# -/^libdir *=/s#=.*#=$libdir# -/^sharedlibdir *=/s#=.*#=$sharedlibdir# -/^includedir *=/s#=.*#=$includedir# -/^mandir *=/s#=.*#=$mandir# -/^LDFLAGS *=/s#=.*#=$LDFLAGS# -" | sed -e " -s/\@VERSION\@/$VER/g; -" > zlib.pc - -# done -leave 0 diff --git a/third_party/zlib/contrib/README.contrib b/third_party/zlib/contrib/README.contrib deleted file mode 100644 index 5e5f950..0000000 --- a/third_party/zlib/contrib/README.contrib +++ /dev/null @@ -1,57 +0,0 @@ -All files under this contrib directory are UNSUPPORTED. They were -provided by users of zlib and were not tested by the authors of zlib. -Use at your own risk. Please contact the authors of the contributions -for help about these, not the zlib authors. Thanks. - - -ada/ by Dmitriy Anisimkov - Support for Ada - See http://zlib-ada.sourceforge.net/ - -blast/ by Mark Adler - Decompressor for output of PKWare Data Compression Library (DCL) - -delphi/ by Cosmin Truta - Support for Delphi and C++ Builder - -dotzlib/ by Henrik Ravn - Support for Microsoft .Net and Visual C++ .Net - -gcc_gvmat64/by Gilles Vollant - GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64 - assembler to replace longest_match() and inflate_fast() - -infback9/ by Mark Adler - Unsupported diffs to infback to decode the deflate64 format - -iostream/ by Kevin Ruland - A C++ I/O streams interface to the zlib gz* functions - -iostream2/ by Tyge Løvset - Another C++ I/O streams interface - -iostream3/ by Ludwig Schwardt - and Kevin Ruland - Yet another C++ I/O streams interface - -minizip/ by Gilles Vollant - Mini zip and unzip based on zlib - Includes Zip64 support by Mathias Svensson - See http://www.winimage.com/zLibDll/minizip.html - -pascal/ by Bob Dellaca et al. - Support for Pascal - -puff/ by Mark Adler - Small, low memory usage inflate. Also serves to provide an - unambiguous description of the deflate format. - -testzlib/ by Gilles Vollant - Example of the use of zlib - -untgz/ by Pedro A. Aranda Gutierrez - A very simple tar.gz file extractor using zlib - -vstudio/ by Gilles Vollant - Building a minizip-enhanced zlib with Microsoft Visual Studio - Includes vc11 from kreuzerkrieg and vc12 from davispuh diff --git a/third_party/zlib/contrib/ada/buffer_demo.adb b/third_party/zlib/contrib/ada/buffer_demo.adb deleted file mode 100644 index 46b8638..0000000 --- a/third_party/zlib/contrib/ada/buffer_demo.adb +++ /dev/null @@ -1,106 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2004 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- --- --- $Id: buffer_demo.adb,v 1.3 2004/09/06 06:55:35 vagul Exp $ - --- This demo program provided by Dr Steve Sangwine --- --- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer --- of exactly the correct size is used for decompressed data, and the last --- few bytes passed in to Zlib are checksum bytes. - --- This program compresses a string of text, and then decompresses the --- compressed text into a buffer of the same size as the original text. - -with Ada.Streams; use Ada.Streams; -with Ada.Text_IO; - -with ZLib; use ZLib; - -procedure Buffer_Demo is - EOL : Character renames ASCII.LF; - Text : constant String - := "Four score and seven years ago our fathers brought forth," & EOL & - "upon this continent, a new nation, conceived in liberty," & EOL & - "and dedicated to the proposition that `all men are created equal'."; - - Source : Stream_Element_Array (1 .. Text'Length); - for Source'Address use Text'Address; - -begin - Ada.Text_IO.Put (Text); - Ada.Text_IO.New_Line; - Ada.Text_IO.Put_Line - ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes"); - - declare - Compressed_Data : Stream_Element_Array (1 .. Text'Length); - L : Stream_Element_Offset; - begin - Compress : declare - Compressor : Filter_Type; - I : Stream_Element_Offset; - begin - Deflate_Init (Compressor); - - -- Compress the whole of T at once. - - Translate (Compressor, Source, I, Compressed_Data, L, Finish); - pragma Assert (I = Source'Last); - - Close (Compressor); - - Ada.Text_IO.Put_Line - ("Compressed size : " - & Stream_Element_Offset'Image (L) & " bytes"); - end Compress; - - -- Now we decompress the data, passing short blocks of data to Zlib - -- (because this demonstrates the problem - the last block passed will - -- contain checksum information and there will be no output, only a - -- check inside Zlib that the checksum is correct). - - Decompress : declare - Decompressor : Filter_Type; - - Uncompressed_Data : Stream_Element_Array (1 .. Text'Length); - - Block_Size : constant := 4; - -- This makes sure that the last block contains - -- only Adler checksum data. - - P : Stream_Element_Offset := Compressed_Data'First - 1; - O : Stream_Element_Offset; - begin - Inflate_Init (Decompressor); - - loop - Translate - (Decompressor, - Compressed_Data - (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)), - P, - Uncompressed_Data - (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last), - O, - No_Flush); - - Ada.Text_IO.Put_Line - ("Total in : " & Count'Image (Total_In (Decompressor)) & - ", out : " & Count'Image (Total_Out (Decompressor))); - - exit when P = L; - end loop; - - Ada.Text_IO.New_Line; - Ada.Text_IO.Put_Line - ("Decompressed text matches original text : " - & Boolean'Image (Uncompressed_Data = Source)); - end Decompress; - end; -end Buffer_Demo; diff --git a/third_party/zlib/contrib/ada/mtest.adb b/third_party/zlib/contrib/ada/mtest.adb deleted file mode 100644 index c4dfd08..0000000 --- a/third_party/zlib/contrib/ada/mtest.adb +++ /dev/null @@ -1,156 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- --- Continuous test for ZLib multithreading. If the test would fail --- we should provide thread safe allocation routines for the Z_Stream. --- --- $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $ - -with ZLib; -with Ada.Streams; -with Ada.Numerics.Discrete_Random; -with Ada.Text_IO; -with Ada.Exceptions; -with Ada.Task_Identification; - -procedure MTest is - use Ada.Streams; - use ZLib; - - Stop : Boolean := False; - - pragma Atomic (Stop); - - subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; - - package Random_Elements is - new Ada.Numerics.Discrete_Random (Visible_Symbols); - - task type Test_Task; - - task body Test_Task is - Buffer : Stream_Element_Array (1 .. 100_000); - Gen : Random_Elements.Generator; - - Buffer_First : Stream_Element_Offset; - Compare_First : Stream_Element_Offset; - - Deflate : Filter_Type; - Inflate : Filter_Type; - - procedure Further (Item : in Stream_Element_Array); - - procedure Read_Buffer - (Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset); - - ------------- - -- Further -- - ------------- - - procedure Further (Item : in Stream_Element_Array) is - - procedure Compare (Item : in Stream_Element_Array); - - ------------- - -- Compare -- - ------------- - - procedure Compare (Item : in Stream_Element_Array) is - Next_First : Stream_Element_Offset := Compare_First + Item'Length; - begin - if Buffer (Compare_First .. Next_First - 1) /= Item then - raise Program_Error; - end if; - - Compare_First := Next_First; - end Compare; - - procedure Compare_Write is new ZLib.Write (Write => Compare); - begin - Compare_Write (Inflate, Item, No_Flush); - end Further; - - ----------------- - -- Read_Buffer -- - ----------------- - - procedure Read_Buffer - (Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset) - is - Buff_Diff : Stream_Element_Offset := Buffer'Last - Buffer_First; - Next_First : Stream_Element_Offset; - begin - if Item'Length <= Buff_Diff then - Last := Item'Last; - - Next_First := Buffer_First + Item'Length; - - Item := Buffer (Buffer_First .. Next_First - 1); - - Buffer_First := Next_First; - else - Last := Item'First + Buff_Diff; - Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last); - Buffer_First := Buffer'Last + 1; - end if; - end Read_Buffer; - - procedure Translate is new Generic_Translate - (Data_In => Read_Buffer, - Data_Out => Further); - - begin - Random_Elements.Reset (Gen); - - Buffer := (others => 20); - - Main : loop - for J in Buffer'Range loop - Buffer (J) := Random_Elements.Random (Gen); - - Deflate_Init (Deflate); - Inflate_Init (Inflate); - - Buffer_First := Buffer'First; - Compare_First := Buffer'First; - - Translate (Deflate); - - if Compare_First /= Buffer'Last + 1 then - raise Program_Error; - end if; - - Ada.Text_IO.Put_Line - (Ada.Task_Identification.Image - (Ada.Task_Identification.Current_Task) - & Stream_Element_Offset'Image (J) - & ZLib.Count'Image (Total_Out (Deflate))); - - Close (Deflate); - Close (Inflate); - - exit Main when Stop; - end loop; - end loop Main; - exception - when E : others => - Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E)); - Stop := True; - end Test_Task; - - Test : array (1 .. 4) of Test_Task; - - pragma Unreferenced (Test); - - Dummy : Character; - -begin - Ada.Text_IO.Get_Immediate (Dummy); - Stop := True; -end MTest; diff --git a/third_party/zlib/contrib/ada/read.adb b/third_party/zlib/contrib/ada/read.adb deleted file mode 100644 index 1f2efbf..0000000 --- a/third_party/zlib/contrib/ada/read.adb +++ /dev/null @@ -1,156 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $ - --- Test/demo program for the generic read interface. - -with Ada.Numerics.Discrete_Random; -with Ada.Streams; -with Ada.Text_IO; - -with ZLib; - -procedure Read is - - use Ada.Streams; - - ------------------------------------ - -- Test configuration parameters -- - ------------------------------------ - - File_Size : Stream_Element_Offset := 100_000; - - Continuous : constant Boolean := False; - -- If this constant is True, the test would be repeated again and again, - -- with increment File_Size for every iteration. - - Header : constant ZLib.Header_Type := ZLib.Default; - -- Do not use Header other than Default in ZLib versions 1.1.4 and older. - - Init_Random : constant := 8; - -- We are using the same random sequence, in case of we catch bug, - -- so we would be able to reproduce it. - - -- End -- - - Pack_Size : Stream_Element_Offset; - Offset : Stream_Element_Offset; - - Filter : ZLib.Filter_Type; - - subtype Visible_Symbols - is Stream_Element range 16#20# .. 16#7E#; - - package Random_Elements is new - Ada.Numerics.Discrete_Random (Visible_Symbols); - - Gen : Random_Elements.Generator; - Period : constant Stream_Element_Offset := 200; - -- Period constant variable for random generator not to be very random. - -- Bigger period, harder random. - - Read_Buffer : Stream_Element_Array (1 .. 2048); - Read_First : Stream_Element_Offset; - Read_Last : Stream_Element_Offset; - - procedure Reset; - - procedure Read - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset); - -- this procedure is for generic instantiation of - -- ZLib.Read - -- reading data from the File_In. - - procedure Read is new ZLib.Read - (Read, - Read_Buffer, - Rest_First => Read_First, - Rest_Last => Read_Last); - - ---------- - -- Read -- - ---------- - - procedure Read - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset) is - begin - Last := Stream_Element_Offset'Min - (Item'Last, - Item'First + File_Size - Offset); - - for J in Item'First .. Last loop - if J < Item'First + Period then - Item (J) := Random_Elements.Random (Gen); - else - Item (J) := Item (J - Period); - end if; - - Offset := Offset + 1; - end loop; - end Read; - - ----------- - -- Reset -- - ----------- - - procedure Reset is - begin - Random_Elements.Reset (Gen, Init_Random); - Pack_Size := 0; - Offset := 1; - Read_First := Read_Buffer'Last + 1; - Read_Last := Read_Buffer'Last; - end Reset; - -begin - Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); - - loop - for Level in ZLib.Compression_Level'Range loop - - Ada.Text_IO.Put ("Level =" - & ZLib.Compression_Level'Image (Level)); - - -- Deflate using generic instantiation. - - ZLib.Deflate_Init - (Filter, - Level, - Header => Header); - - Reset; - - Ada.Text_IO.Put - (Stream_Element_Offset'Image (File_Size) & " ->"); - - loop - declare - Buffer : Stream_Element_Array (1 .. 1024); - Last : Stream_Element_Offset; - begin - Read (Filter, Buffer, Last); - - Pack_Size := Pack_Size + Last - Buffer'First + 1; - - exit when Last < Buffer'Last; - end; - end loop; - - Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size)); - - ZLib.Close (Filter); - end loop; - - exit when not Continuous; - - File_Size := File_Size + 1; - end loop; -end Read; diff --git a/third_party/zlib/contrib/ada/readme.txt b/third_party/zlib/contrib/ada/readme.txt deleted file mode 100644 index efdd639..0000000 --- a/third_party/zlib/contrib/ada/readme.txt +++ /dev/null @@ -1,65 +0,0 @@ - ZLib for Ada thick binding (ZLib.Ada) - Release 1.3 - -ZLib.Ada is a thick binding interface to the popular ZLib data -compression library, available at http://www.gzip.org/zlib/. -It provides Ada-style access to the ZLib C library. - - - Here are the main changes since ZLib.Ada 1.2: - -- Attention: ZLib.Read generic routine have a initialization requirement - for Read_Last parameter now. It is a bit incompatible with previous version, - but extends functionality, we could use new parameters Allow_Read_Some and - Flush now. - -- Added Is_Open routines to ZLib and ZLib.Streams packages. - -- Add pragma Assert to check Stream_Element is 8 bit. - -- Fix extraction to buffer with exact known decompressed size. Error reported by - Steve Sangwine. - -- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits - computers. Patch provided by Pascal Obry. - -- Add Status_Error exception definition. - -- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit. - - - How to build ZLib.Ada under GNAT - -You should have the ZLib library already build on your computer, before -building ZLib.Ada. Make the directory of ZLib.Ada sources current and -issue the command: - - gnatmake test -largs -L -lz - -Or use the GNAT project file build for GNAT 3.15 or later: - - gnatmake -Pzlib.gpr -L - - - How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2 - -1. Make a project with all *.ads and *.adb files from the distribution. -2. Build the libz.a library from the ZLib C sources. -3. Rename libz.a to z.lib. -4. Add the library z.lib to the project. -5. Add the libc.lib library from the ObjectAda distribution to the project. -6. Build the executable using test.adb as a main procedure. - - - How to use ZLib.Ada - -The source files test.adb and read.adb are small demo programs that show -the main functionality of ZLib.Ada. - -The routines from the package specifications are commented. - - -Homepage: http://zlib-ada.sourceforge.net/ -Author: Dmitriy Anisimkov - -Contributors: Pascal Obry , Steve Sangwine diff --git a/third_party/zlib/contrib/ada/test.adb b/third_party/zlib/contrib/ada/test.adb deleted file mode 100644 index 8b35031..0000000 --- a/third_party/zlib/contrib/ada/test.adb +++ /dev/null @@ -1,463 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: test.adb,v 1.17 2003/08/12 12:13:30 vagul Exp $ - --- The program has a few aims. --- 1. Test ZLib.Ada95 thick binding functionality. --- 2. Show the example of use main functionality of the ZLib.Ada95 binding. --- 3. Build this program automatically compile all ZLib.Ada95 packages under --- GNAT Ada95 compiler. - -with ZLib.Streams; -with Ada.Streams.Stream_IO; -with Ada.Numerics.Discrete_Random; - -with Ada.Text_IO; - -with Ada.Calendar; - -procedure Test is - - use Ada.Streams; - use Stream_IO; - - ------------------------------------ - -- Test configuration parameters -- - ------------------------------------ - - File_Size : Count := 100_000; - Continuous : constant Boolean := False; - - Header : constant ZLib.Header_Type := ZLib.Default; - -- ZLib.None; - -- ZLib.Auto; - -- ZLib.GZip; - -- Do not use Header other then Default in ZLib versions 1.1.4 - -- and older. - - Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy; - Init_Random : constant := 10; - - -- End -- - - In_File_Name : constant String := "testzlib.in"; - -- Name of the input file - - Z_File_Name : constant String := "testzlib.zlb"; - -- Name of the compressed file. - - Out_File_Name : constant String := "testzlib.out"; - -- Name of the decompressed file. - - File_In : File_Type; - File_Out : File_Type; - File_Back : File_Type; - File_Z : ZLib.Streams.Stream_Type; - - Filter : ZLib.Filter_Type; - - Time_Stamp : Ada.Calendar.Time; - - procedure Generate_File; - -- Generate file of specified size with some random data. - -- The random data is repeatable, for the good compression. - - procedure Compare_Streams - (Left, Right : in out Root_Stream_Type'Class); - -- The procedure comparing data in 2 streams. - -- It is for compare data before and after compression/decompression. - - procedure Compare_Files (Left, Right : String); - -- Compare files. Based on the Compare_Streams. - - procedure Copy_Streams - (Source, Target : in out Root_Stream_Type'Class; - Buffer_Size : in Stream_Element_Offset := 1024); - -- Copying data from one stream to another. It is for test stream - -- interface of the library. - - procedure Data_In - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset); - -- this procedure is for generic instantiation of - -- ZLib.Generic_Translate. - -- reading data from the File_In. - - procedure Data_Out (Item : in Stream_Element_Array); - -- this procedure is for generic instantiation of - -- ZLib.Generic_Translate. - -- writing data to the File_Out. - - procedure Stamp; - -- Store the timestamp to the local variable. - - procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count); - -- Print the time statistic with the message. - - procedure Translate is new ZLib.Generic_Translate - (Data_In => Data_In, - Data_Out => Data_Out); - -- This procedure is moving data from File_In to File_Out - -- with compression or decompression, depend on initialization of - -- Filter parameter. - - ------------------- - -- Compare_Files -- - ------------------- - - procedure Compare_Files (Left, Right : String) is - Left_File, Right_File : File_Type; - begin - Open (Left_File, In_File, Left); - Open (Right_File, In_File, Right); - Compare_Streams (Stream (Left_File).all, Stream (Right_File).all); - Close (Left_File); - Close (Right_File); - end Compare_Files; - - --------------------- - -- Compare_Streams -- - --------------------- - - procedure Compare_Streams - (Left, Right : in out Ada.Streams.Root_Stream_Type'Class) - is - Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#); - Left_Last, Right_Last : Stream_Element_Offset; - begin - loop - Read (Left, Left_Buffer, Left_Last); - Read (Right, Right_Buffer, Right_Last); - - if Left_Last /= Right_Last then - Ada.Text_IO.Put_Line ("Compare error :" - & Stream_Element_Offset'Image (Left_Last) - & " /= " - & Stream_Element_Offset'Image (Right_Last)); - - raise Constraint_Error; - - elsif Left_Buffer (0 .. Left_Last) - /= Right_Buffer (0 .. Right_Last) - then - Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal."); - raise Constraint_Error; - - end if; - - exit when Left_Last < Left_Buffer'Last; - end loop; - end Compare_Streams; - - ------------------ - -- Copy_Streams -- - ------------------ - - procedure Copy_Streams - (Source, Target : in out Ada.Streams.Root_Stream_Type'Class; - Buffer_Size : in Stream_Element_Offset := 1024) - is - Buffer : Stream_Element_Array (1 .. Buffer_Size); - Last : Stream_Element_Offset; - begin - loop - Read (Source, Buffer, Last); - Write (Target, Buffer (1 .. Last)); - - exit when Last < Buffer'Last; - end loop; - end Copy_Streams; - - ------------- - -- Data_In -- - ------------- - - procedure Data_In - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset) is - begin - Read (File_In, Item, Last); - end Data_In; - - -------------- - -- Data_Out -- - -------------- - - procedure Data_Out (Item : in Stream_Element_Array) is - begin - Write (File_Out, Item); - end Data_Out; - - ------------------- - -- Generate_File -- - ------------------- - - procedure Generate_File is - subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; - - package Random_Elements is - new Ada.Numerics.Discrete_Random (Visible_Symbols); - - Gen : Random_Elements.Generator; - Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10; - - Buffer_Count : constant Count := File_Size / Buffer'Length; - -- Number of same buffers in the packet. - - Density : constant Count := 30; -- from 0 to Buffer'Length - 2; - - procedure Fill_Buffer (J, D : in Count); - -- Change the part of the buffer. - - ----------------- - -- Fill_Buffer -- - ----------------- - - procedure Fill_Buffer (J, D : in Count) is - begin - for K in 0 .. D loop - Buffer - (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1)) - := Random_Elements.Random (Gen); - - end loop; - end Fill_Buffer; - - begin - Random_Elements.Reset (Gen, Init_Random); - - Create (File_In, Out_File, In_File_Name); - - Fill_Buffer (1, Buffer'Length - 2); - - for J in 1 .. Buffer_Count loop - Write (File_In, Buffer); - - Fill_Buffer (J, Density); - end loop; - - -- fill remain size. - - Write - (File_In, - Buffer - (1 .. Stream_Element_Offset - (File_Size - Buffer'Length * Buffer_Count))); - - Flush (File_In); - Close (File_In); - end Generate_File; - - --------------------- - -- Print_Statistic -- - --------------------- - - procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is - use Ada.Calendar; - use Ada.Text_IO; - - package Count_IO is new Integer_IO (ZLib.Count); - - Curr_Dur : Duration := Clock - Time_Stamp; - begin - Put (Msg); - - Set_Col (20); - Ada.Text_IO.Put ("size ="); - - Count_IO.Put - (Data_Size, - Width => Stream_IO.Count'Image (File_Size)'Length); - - Put_Line (" duration =" & Duration'Image (Curr_Dur)); - end Print_Statistic; - - ----------- - -- Stamp -- - ----------- - - procedure Stamp is - begin - Time_Stamp := Ada.Calendar.Clock; - end Stamp; - -begin - Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); - - loop - Generate_File; - - for Level in ZLib.Compression_Level'Range loop - - Ada.Text_IO.Put_Line ("Level =" - & ZLib.Compression_Level'Image (Level)); - - -- Test generic interface. - Open (File_In, In_File, In_File_Name); - Create (File_Out, Out_File, Z_File_Name); - - Stamp; - - -- Deflate using generic instantiation. - - ZLib.Deflate_Init - (Filter => Filter, - Level => Level, - Strategy => Strategy, - Header => Header); - - Translate (Filter); - Print_Statistic ("Generic compress", ZLib.Total_Out (Filter)); - ZLib.Close (Filter); - - Close (File_In); - Close (File_Out); - - Open (File_In, In_File, Z_File_Name); - Create (File_Out, Out_File, Out_File_Name); - - Stamp; - - -- Inflate using generic instantiation. - - ZLib.Inflate_Init (Filter, Header => Header); - - Translate (Filter); - Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter)); - - ZLib.Close (Filter); - - Close (File_In); - Close (File_Out); - - Compare_Files (In_File_Name, Out_File_Name); - - -- Test stream interface. - - -- Compress to the back stream. - - Open (File_In, In_File, In_File_Name); - Create (File_Back, Out_File, Z_File_Name); - - Stamp; - - ZLib.Streams.Create - (Stream => File_Z, - Mode => ZLib.Streams.Out_Stream, - Back => ZLib.Streams.Stream_Access - (Stream (File_Back)), - Back_Compressed => True, - Level => Level, - Strategy => Strategy, - Header => Header); - - Copy_Streams - (Source => Stream (File_In).all, - Target => File_Z); - - -- Flushing internal buffers to the back stream. - - ZLib.Streams.Flush (File_Z, ZLib.Finish); - - Print_Statistic ("Write compress", - ZLib.Streams.Write_Total_Out (File_Z)); - - ZLib.Streams.Close (File_Z); - - Close (File_In); - Close (File_Back); - - -- Compare reading from original file and from - -- decompression stream. - - Open (File_In, In_File, In_File_Name); - Open (File_Back, In_File, Z_File_Name); - - ZLib.Streams.Create - (Stream => File_Z, - Mode => ZLib.Streams.In_Stream, - Back => ZLib.Streams.Stream_Access - (Stream (File_Back)), - Back_Compressed => True, - Header => Header); - - Stamp; - Compare_Streams (Stream (File_In).all, File_Z); - - Print_Statistic ("Read decompress", - ZLib.Streams.Read_Total_Out (File_Z)); - - ZLib.Streams.Close (File_Z); - Close (File_In); - Close (File_Back); - - -- Compress by reading from compression stream. - - Open (File_Back, In_File, In_File_Name); - Create (File_Out, Out_File, Z_File_Name); - - ZLib.Streams.Create - (Stream => File_Z, - Mode => ZLib.Streams.In_Stream, - Back => ZLib.Streams.Stream_Access - (Stream (File_Back)), - Back_Compressed => False, - Level => Level, - Strategy => Strategy, - Header => Header); - - Stamp; - Copy_Streams - (Source => File_Z, - Target => Stream (File_Out).all); - - Print_Statistic ("Read compress", - ZLib.Streams.Read_Total_Out (File_Z)); - - ZLib.Streams.Close (File_Z); - - Close (File_Out); - Close (File_Back); - - -- Decompress to decompression stream. - - Open (File_In, In_File, Z_File_Name); - Create (File_Back, Out_File, Out_File_Name); - - ZLib.Streams.Create - (Stream => File_Z, - Mode => ZLib.Streams.Out_Stream, - Back => ZLib.Streams.Stream_Access - (Stream (File_Back)), - Back_Compressed => False, - Header => Header); - - Stamp; - - Copy_Streams - (Source => Stream (File_In).all, - Target => File_Z); - - Print_Statistic ("Write decompress", - ZLib.Streams.Write_Total_Out (File_Z)); - - ZLib.Streams.Close (File_Z); - Close (File_In); - Close (File_Back); - - Compare_Files (In_File_Name, Out_File_Name); - end loop; - - Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok."); - - exit when not Continuous; - - File_Size := File_Size + 1; - end loop; -end Test; diff --git a/third_party/zlib/contrib/ada/zlib-streams.adb b/third_party/zlib/contrib/ada/zlib-streams.adb deleted file mode 100644 index b6497ba..0000000 --- a/third_party/zlib/contrib/ada/zlib-streams.adb +++ /dev/null @@ -1,225 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $ - -with Ada.Unchecked_Deallocation; - -package body ZLib.Streams is - - ----------- - -- Close -- - ----------- - - procedure Close (Stream : in out Stream_Type) is - procedure Free is new Ada.Unchecked_Deallocation - (Stream_Element_Array, Buffer_Access); - begin - if Stream.Mode = Out_Stream or Stream.Mode = Duplex then - -- We should flush the data written by the writer. - - Flush (Stream, Finish); - - Close (Stream.Writer); - end if; - - if Stream.Mode = In_Stream or Stream.Mode = Duplex then - Close (Stream.Reader); - Free (Stream.Buffer); - end if; - end Close; - - ------------ - -- Create -- - ------------ - - procedure Create - (Stream : out Stream_Type; - Mode : in Stream_Mode; - Back : in Stream_Access; - Back_Compressed : in Boolean; - Level : in Compression_Level := Default_Compression; - Strategy : in Strategy_Type := Default_Strategy; - Header : in Header_Type := Default; - Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset - := Default_Buffer_Size; - Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset - := Default_Buffer_Size) - is - - subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size); - - procedure Init_Filter - (Filter : in out Filter_Type; - Compress : in Boolean); - - ----------------- - -- Init_Filter -- - ----------------- - - procedure Init_Filter - (Filter : in out Filter_Type; - Compress : in Boolean) is - begin - if Compress then - Deflate_Init - (Filter, Level, Strategy, Header => Header); - else - Inflate_Init (Filter, Header => Header); - end if; - end Init_Filter; - - begin - Stream.Back := Back; - Stream.Mode := Mode; - - if Mode = Out_Stream or Mode = Duplex then - Init_Filter (Stream.Writer, Back_Compressed); - Stream.Buffer_Size := Write_Buffer_Size; - else - Stream.Buffer_Size := 0; - end if; - - if Mode = In_Stream or Mode = Duplex then - Init_Filter (Stream.Reader, not Back_Compressed); - - Stream.Buffer := new Buffer_Subtype; - Stream.Rest_First := Stream.Buffer'Last + 1; - Stream.Rest_Last := Stream.Buffer'Last; - end if; - end Create; - - ----------- - -- Flush -- - ----------- - - procedure Flush - (Stream : in out Stream_Type; - Mode : in Flush_Mode := Sync_Flush) - is - Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size); - Last : Stream_Element_Offset; - begin - loop - Flush (Stream.Writer, Buffer, Last, Mode); - - Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last)); - - exit when Last < Buffer'Last; - end loop; - end Flush; - - ------------- - -- Is_Open -- - ------------- - - function Is_Open (Stream : Stream_Type) return Boolean is - begin - return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer); - end Is_Open; - - ---------- - -- Read -- - ---------- - - procedure Read - (Stream : in out Stream_Type; - Item : out Stream_Element_Array; - Last : out Stream_Element_Offset) - is - - procedure Read - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset); - - ---------- - -- Read -- - ---------- - - procedure Read - (Item : out Stream_Element_Array; - Last : out Stream_Element_Offset) is - begin - Ada.Streams.Read (Stream.Back.all, Item, Last); - end Read; - - procedure Read is new ZLib.Read - (Read => Read, - Buffer => Stream.Buffer.all, - Rest_First => Stream.Rest_First, - Rest_Last => Stream.Rest_Last); - - begin - Read (Stream.Reader, Item, Last); - end Read; - - ------------------- - -- Read_Total_In -- - ------------------- - - function Read_Total_In (Stream : in Stream_Type) return Count is - begin - return Total_In (Stream.Reader); - end Read_Total_In; - - -------------------- - -- Read_Total_Out -- - -------------------- - - function Read_Total_Out (Stream : in Stream_Type) return Count is - begin - return Total_Out (Stream.Reader); - end Read_Total_Out; - - ----------- - -- Write -- - ----------- - - procedure Write - (Stream : in out Stream_Type; - Item : in Stream_Element_Array) - is - - procedure Write (Item : in Stream_Element_Array); - - ----------- - -- Write -- - ----------- - - procedure Write (Item : in Stream_Element_Array) is - begin - Ada.Streams.Write (Stream.Back.all, Item); - end Write; - - procedure Write is new ZLib.Write - (Write => Write, - Buffer_Size => Stream.Buffer_Size); - - begin - Write (Stream.Writer, Item, No_Flush); - end Write; - - -------------------- - -- Write_Total_In -- - -------------------- - - function Write_Total_In (Stream : in Stream_Type) return Count is - begin - return Total_In (Stream.Writer); - end Write_Total_In; - - --------------------- - -- Write_Total_Out -- - --------------------- - - function Write_Total_Out (Stream : in Stream_Type) return Count is - begin - return Total_Out (Stream.Writer); - end Write_Total_Out; - -end ZLib.Streams; diff --git a/third_party/zlib/contrib/ada/zlib-streams.ads b/third_party/zlib/contrib/ada/zlib-streams.ads deleted file mode 100644 index af13693..0000000 --- a/third_party/zlib/contrib/ada/zlib-streams.ads +++ /dev/null @@ -1,114 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $ - -package ZLib.Streams is - - type Stream_Mode is (In_Stream, Out_Stream, Duplex); - - type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class; - - type Stream_Type is - new Ada.Streams.Root_Stream_Type with private; - - procedure Read - (Stream : in out Stream_Type; - Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset); - - procedure Write - (Stream : in out Stream_Type; - Item : in Ada.Streams.Stream_Element_Array); - - procedure Flush - (Stream : in out Stream_Type; - Mode : in Flush_Mode := Sync_Flush); - -- Flush the written data to the back stream, - -- all data placed to the compressor is flushing to the Back stream. - -- Should not be used until necessary, because it is decreasing - -- compression. - - function Read_Total_In (Stream : in Stream_Type) return Count; - pragma Inline (Read_Total_In); - -- Return total number of bytes read from back stream so far. - - function Read_Total_Out (Stream : in Stream_Type) return Count; - pragma Inline (Read_Total_Out); - -- Return total number of bytes read so far. - - function Write_Total_In (Stream : in Stream_Type) return Count; - pragma Inline (Write_Total_In); - -- Return total number of bytes written so far. - - function Write_Total_Out (Stream : in Stream_Type) return Count; - pragma Inline (Write_Total_Out); - -- Return total number of bytes written to the back stream. - - procedure Create - (Stream : out Stream_Type; - Mode : in Stream_Mode; - Back : in Stream_Access; - Back_Compressed : in Boolean; - Level : in Compression_Level := Default_Compression; - Strategy : in Strategy_Type := Default_Strategy; - Header : in Header_Type := Default; - Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset - := Default_Buffer_Size; - Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset - := Default_Buffer_Size); - -- Create the Compression/Decompression stream. - -- If mode is In_Stream then Write operation is disabled. - -- If mode is Out_Stream then Read operation is disabled. - - -- If Back_Compressed is true then - -- Data written to the Stream is compressing to the Back stream - -- and data read from the Stream is decompressed data from the Back stream. - - -- If Back_Compressed is false then - -- Data written to the Stream is decompressing to the Back stream - -- and data read from the Stream is compressed data from the Back stream. - - -- !!! When the Need_Header is False ZLib-Ada is using undocumented - -- ZLib 1.1.4 functionality to do not create/wait for ZLib headers. - - function Is_Open (Stream : Stream_Type) return Boolean; - - procedure Close (Stream : in out Stream_Type); - -private - - use Ada.Streams; - - type Buffer_Access is access all Stream_Element_Array; - - type Stream_Type - is new Root_Stream_Type with - record - Mode : Stream_Mode; - - Buffer : Buffer_Access; - Rest_First : Stream_Element_Offset; - Rest_Last : Stream_Element_Offset; - -- Buffer for Read operation. - -- We need to have this buffer in the record - -- because not all read data from back stream - -- could be processed during the read operation. - - Buffer_Size : Stream_Element_Offset; - -- Buffer size for write operation. - -- We do not need to have this buffer - -- in the record because all data could be - -- processed in the write operation. - - Back : Stream_Access; - Reader : Filter_Type; - Writer : Filter_Type; - end record; - -end ZLib.Streams; diff --git a/third_party/zlib/contrib/ada/zlib-thin.adb b/third_party/zlib/contrib/ada/zlib-thin.adb deleted file mode 100644 index 0ca4a71..0000000 --- a/third_party/zlib/contrib/ada/zlib-thin.adb +++ /dev/null @@ -1,141 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $ - -package body ZLib.Thin is - - ZLIB_VERSION : constant Chars_Ptr := zlibVersion; - - Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit; - - -------------- - -- Avail_In -- - -------------- - - function Avail_In (Strm : in Z_Stream) return UInt is - begin - return Strm.Avail_In; - end Avail_In; - - --------------- - -- Avail_Out -- - --------------- - - function Avail_Out (Strm : in Z_Stream) return UInt is - begin - return Strm.Avail_Out; - end Avail_Out; - - ------------------ - -- Deflate_Init -- - ------------------ - - function Deflate_Init - (strm : Z_Streamp; - level : Int; - method : Int; - windowBits : Int; - memLevel : Int; - strategy : Int) - return Int is - begin - return deflateInit2 - (strm, - level, - method, - windowBits, - memLevel, - strategy, - ZLIB_VERSION, - Z_Stream_Size); - end Deflate_Init; - - ------------------ - -- Inflate_Init -- - ------------------ - - function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is - begin - return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size); - end Inflate_Init; - - ------------------------ - -- Last_Error_Message -- - ------------------------ - - function Last_Error_Message (Strm : in Z_Stream) return String is - use Interfaces.C.Strings; - begin - if Strm.msg = Null_Ptr then - return ""; - else - return Value (Strm.msg); - end if; - end Last_Error_Message; - - ------------ - -- Set_In -- - ------------ - - procedure Set_In - (Strm : in out Z_Stream; - Buffer : in Voidp; - Size : in UInt) is - begin - Strm.Next_In := Buffer; - Strm.Avail_In := Size; - end Set_In; - - ------------------ - -- Set_Mem_Func -- - ------------------ - - procedure Set_Mem_Func - (Strm : in out Z_Stream; - Opaque : in Voidp; - Alloc : in alloc_func; - Free : in free_func) is - begin - Strm.opaque := Opaque; - Strm.zalloc := Alloc; - Strm.zfree := Free; - end Set_Mem_Func; - - ------------- - -- Set_Out -- - ------------- - - procedure Set_Out - (Strm : in out Z_Stream; - Buffer : in Voidp; - Size : in UInt) is - begin - Strm.Next_Out := Buffer; - Strm.Avail_Out := Size; - end Set_Out; - - -------------- - -- Total_In -- - -------------- - - function Total_In (Strm : in Z_Stream) return ULong is - begin - return Strm.Total_In; - end Total_In; - - --------------- - -- Total_Out -- - --------------- - - function Total_Out (Strm : in Z_Stream) return ULong is - begin - return Strm.Total_Out; - end Total_Out; - -end ZLib.Thin; diff --git a/third_party/zlib/contrib/ada/zlib-thin.ads b/third_party/zlib/contrib/ada/zlib-thin.ads deleted file mode 100644 index 810173c..0000000 --- a/third_party/zlib/contrib/ada/zlib-thin.ads +++ /dev/null @@ -1,450 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2003 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $ - -with Interfaces.C.Strings; - -with System; - -private package ZLib.Thin is - - -- From zconf.h - - MAX_MEM_LEVEL : constant := 9; -- zconf.h:105 - -- zconf.h:105 - MAX_WBITS : constant := 15; -- zconf.h:115 - -- 32K LZ77 window - -- zconf.h:115 - SEEK_SET : constant := 8#0000#; -- zconf.h:244 - -- Seek from beginning of file. - -- zconf.h:244 - SEEK_CUR : constant := 1; -- zconf.h:245 - -- Seek from current position. - -- zconf.h:245 - SEEK_END : constant := 2; -- zconf.h:246 - -- Set file pointer to EOF plus "offset" - -- zconf.h:246 - - type Byte is new Interfaces.C.unsigned_char; -- 8 bits - -- zconf.h:214 - type UInt is new Interfaces.C.unsigned; -- 16 bits or more - -- zconf.h:216 - type Int is new Interfaces.C.int; - - type ULong is new Interfaces.C.unsigned_long; -- 32 bits or more - -- zconf.h:217 - subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr; - - type ULong_Access is access ULong; - type Int_Access is access Int; - - subtype Voidp is System.Address; -- zconf.h:232 - - subtype Byte_Access is Voidp; - - Nul : constant Voidp := System.Null_Address; - -- end from zconf - - Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125 - -- zlib.h:125 - Z_PARTIAL_FLUSH : constant := 1; -- zlib.h:126 - -- will be removed, use - -- Z_SYNC_FLUSH instead - -- zlib.h:126 - Z_SYNC_FLUSH : constant := 2; -- zlib.h:127 - -- zlib.h:127 - Z_FULL_FLUSH : constant := 3; -- zlib.h:128 - -- zlib.h:128 - Z_FINISH : constant := 4; -- zlib.h:129 - -- zlib.h:129 - Z_OK : constant := 8#0000#; -- zlib.h:132 - -- zlib.h:132 - Z_STREAM_END : constant := 1; -- zlib.h:133 - -- zlib.h:133 - Z_NEED_DICT : constant := 2; -- zlib.h:134 - -- zlib.h:134 - Z_ERRNO : constant := -1; -- zlib.h:135 - -- zlib.h:135 - Z_STREAM_ERROR : constant := -2; -- zlib.h:136 - -- zlib.h:136 - Z_DATA_ERROR : constant := -3; -- zlib.h:137 - -- zlib.h:137 - Z_MEM_ERROR : constant := -4; -- zlib.h:138 - -- zlib.h:138 - Z_BUF_ERROR : constant := -5; -- zlib.h:139 - -- zlib.h:139 - Z_VERSION_ERROR : constant := -6; -- zlib.h:140 - -- zlib.h:140 - Z_NO_COMPRESSION : constant := 8#0000#; -- zlib.h:145 - -- zlib.h:145 - Z_BEST_SPEED : constant := 1; -- zlib.h:146 - -- zlib.h:146 - Z_BEST_COMPRESSION : constant := 9; -- zlib.h:147 - -- zlib.h:147 - Z_DEFAULT_COMPRESSION : constant := -1; -- zlib.h:148 - -- zlib.h:148 - Z_FILTERED : constant := 1; -- zlib.h:151 - -- zlib.h:151 - Z_HUFFMAN_ONLY : constant := 2; -- zlib.h:152 - -- zlib.h:152 - Z_DEFAULT_STRATEGY : constant := 8#0000#; -- zlib.h:153 - -- zlib.h:153 - Z_BINARY : constant := 8#0000#; -- zlib.h:156 - -- zlib.h:156 - Z_ASCII : constant := 1; -- zlib.h:157 - -- zlib.h:157 - Z_UNKNOWN : constant := 2; -- zlib.h:158 - -- zlib.h:158 - Z_DEFLATED : constant := 8; -- zlib.h:161 - -- zlib.h:161 - Z_NULL : constant := 8#0000#; -- zlib.h:164 - -- for initializing zalloc, zfree, opaque - -- zlib.h:164 - type gzFile is new Voidp; -- zlib.h:646 - - type Z_Stream is private; - - type Z_Streamp is access all Z_Stream; -- zlib.h:89 - - type alloc_func is access function - (Opaque : Voidp; - Items : UInt; - Size : UInt) - return Voidp; -- zlib.h:63 - - type free_func is access procedure (opaque : Voidp; address : Voidp); - - function zlibVersion return Chars_Ptr; - - function Deflate (strm : Z_Streamp; flush : Int) return Int; - - function DeflateEnd (strm : Z_Streamp) return Int; - - function Inflate (strm : Z_Streamp; flush : Int) return Int; - - function InflateEnd (strm : Z_Streamp) return Int; - - function deflateSetDictionary - (strm : Z_Streamp; - dictionary : Byte_Access; - dictLength : UInt) - return Int; - - function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int; - -- zlib.h:478 - - function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495 - - function deflateParams - (strm : Z_Streamp; - level : Int; - strategy : Int) - return Int; -- zlib.h:506 - - function inflateSetDictionary - (strm : Z_Streamp; - dictionary : Byte_Access; - dictLength : UInt) - return Int; -- zlib.h:548 - - function inflateSync (strm : Z_Streamp) return Int; -- zlib.h:565 - - function inflateReset (strm : Z_Streamp) return Int; -- zlib.h:580 - - function compress - (dest : Byte_Access; - destLen : ULong_Access; - source : Byte_Access; - sourceLen : ULong) - return Int; -- zlib.h:601 - - function compress2 - (dest : Byte_Access; - destLen : ULong_Access; - source : Byte_Access; - sourceLen : ULong; - level : Int) - return Int; -- zlib.h:615 - - function uncompress - (dest : Byte_Access; - destLen : ULong_Access; - source : Byte_Access; - sourceLen : ULong) - return Int; - - function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile; - - function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile; - - function gzsetparams - (file : gzFile; - level : Int; - strategy : Int) - return Int; - - function gzread - (file : gzFile; - buf : Voidp; - len : UInt) - return Int; - - function gzwrite - (file : in gzFile; - buf : in Voidp; - len : in UInt) - return Int; - - function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int; - - function gzputs (file : in gzFile; s : in Chars_Ptr) return Int; - - function gzgets - (file : gzFile; - buf : Chars_Ptr; - len : Int) - return Chars_Ptr; - - function gzputc (file : gzFile; char : Int) return Int; - - function gzgetc (file : gzFile) return Int; - - function gzflush (file : gzFile; flush : Int) return Int; - - function gzseek - (file : gzFile; - offset : Int; - whence : Int) - return Int; - - function gzrewind (file : gzFile) return Int; - - function gztell (file : gzFile) return Int; - - function gzeof (file : gzFile) return Int; - - function gzclose (file : gzFile) return Int; - - function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr; - - function adler32 - (adler : ULong; - buf : Byte_Access; - len : UInt) - return ULong; - - function crc32 - (crc : ULong; - buf : Byte_Access; - len : UInt) - return ULong; - - function deflateInit - (strm : Z_Streamp; - level : Int; - version : Chars_Ptr; - stream_size : Int) - return Int; - - function deflateInit2 - (strm : Z_Streamp; - level : Int; - method : Int; - windowBits : Int; - memLevel : Int; - strategy : Int; - version : Chars_Ptr; - stream_size : Int) - return Int; - - function Deflate_Init - (strm : Z_Streamp; - level : Int; - method : Int; - windowBits : Int; - memLevel : Int; - strategy : Int) - return Int; - pragma Inline (Deflate_Init); - - function inflateInit - (strm : Z_Streamp; - version : Chars_Ptr; - stream_size : Int) - return Int; - - function inflateInit2 - (strm : in Z_Streamp; - windowBits : in Int; - version : in Chars_Ptr; - stream_size : in Int) - return Int; - - function inflateBackInit - (strm : in Z_Streamp; - windowBits : in Int; - window : in Byte_Access; - version : in Chars_Ptr; - stream_size : in Int) - return Int; - -- Size of window have to be 2**windowBits. - - function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int; - pragma Inline (Inflate_Init); - - function zError (err : Int) return Chars_Ptr; - - function inflateSyncPoint (z : Z_Streamp) return Int; - - function get_crc_table return ULong_Access; - - -- Interface to the available fields of the z_stream structure. - -- The application must update next_in and avail_in when avail_in has - -- dropped to zero. It must update next_out and avail_out when avail_out - -- has dropped to zero. The application must initialize zalloc, zfree and - -- opaque before calling the init function. - - procedure Set_In - (Strm : in out Z_Stream; - Buffer : in Voidp; - Size : in UInt); - pragma Inline (Set_In); - - procedure Set_Out - (Strm : in out Z_Stream; - Buffer : in Voidp; - Size : in UInt); - pragma Inline (Set_Out); - - procedure Set_Mem_Func - (Strm : in out Z_Stream; - Opaque : in Voidp; - Alloc : in alloc_func; - Free : in free_func); - pragma Inline (Set_Mem_Func); - - function Last_Error_Message (Strm : in Z_Stream) return String; - pragma Inline (Last_Error_Message); - - function Avail_Out (Strm : in Z_Stream) return UInt; - pragma Inline (Avail_Out); - - function Avail_In (Strm : in Z_Stream) return UInt; - pragma Inline (Avail_In); - - function Total_In (Strm : in Z_Stream) return ULong; - pragma Inline (Total_In); - - function Total_Out (Strm : in Z_Stream) return ULong; - pragma Inline (Total_Out); - - function inflateCopy - (dest : in Z_Streamp; - Source : in Z_Streamp) - return Int; - - function compressBound (Source_Len : in ULong) return ULong; - - function deflateBound - (Strm : in Z_Streamp; - Source_Len : in ULong) - return ULong; - - function gzungetc (C : in Int; File : in gzFile) return Int; - - function zlibCompileFlags return ULong; - -private - - type Z_Stream is record -- zlib.h:68 - Next_In : Voidp := Nul; -- next input byte - Avail_In : UInt := 0; -- number of bytes available at next_in - Total_In : ULong := 0; -- total nb of input bytes read so far - Next_Out : Voidp := Nul; -- next output byte should be put there - Avail_Out : UInt := 0; -- remaining free space at next_out - Total_Out : ULong := 0; -- total nb of bytes output so far - msg : Chars_Ptr; -- last error message, NULL if no error - state : Voidp; -- not visible by applications - zalloc : alloc_func := null; -- used to allocate the internal state - zfree : free_func := null; -- used to free the internal state - opaque : Voidp; -- private data object passed to - -- zalloc and zfree - data_type : Int; -- best guess about the data type: - -- ascii or binary - adler : ULong; -- adler32 value of the uncompressed - -- data - reserved : ULong; -- reserved for future use - end record; - - pragma Convention (C, Z_Stream); - - pragma Import (C, zlibVersion, "zlibVersion"); - pragma Import (C, Deflate, "deflate"); - pragma Import (C, DeflateEnd, "deflateEnd"); - pragma Import (C, Inflate, "inflate"); - pragma Import (C, InflateEnd, "inflateEnd"); - pragma Import (C, deflateSetDictionary, "deflateSetDictionary"); - pragma Import (C, deflateCopy, "deflateCopy"); - pragma Import (C, deflateReset, "deflateReset"); - pragma Import (C, deflateParams, "deflateParams"); - pragma Import (C, inflateSetDictionary, "inflateSetDictionary"); - pragma Import (C, inflateSync, "inflateSync"); - pragma Import (C, inflateReset, "inflateReset"); - pragma Import (C, compress, "compress"); - pragma Import (C, compress2, "compress2"); - pragma Import (C, uncompress, "uncompress"); - pragma Import (C, gzopen, "gzopen"); - pragma Import (C, gzdopen, "gzdopen"); - pragma Import (C, gzsetparams, "gzsetparams"); - pragma Import (C, gzread, "gzread"); - pragma Import (C, gzwrite, "gzwrite"); - pragma Import (C, gzprintf, "gzprintf"); - pragma Import (C, gzputs, "gzputs"); - pragma Import (C, gzgets, "gzgets"); - pragma Import (C, gzputc, "gzputc"); - pragma Import (C, gzgetc, "gzgetc"); - pragma Import (C, gzflush, "gzflush"); - pragma Import (C, gzseek, "gzseek"); - pragma Import (C, gzrewind, "gzrewind"); - pragma Import (C, gztell, "gztell"); - pragma Import (C, gzeof, "gzeof"); - pragma Import (C, gzclose, "gzclose"); - pragma Import (C, gzerror, "gzerror"); - pragma Import (C, adler32, "adler32"); - pragma Import (C, crc32, "crc32"); - pragma Import (C, deflateInit, "deflateInit_"); - pragma Import (C, inflateInit, "inflateInit_"); - pragma Import (C, deflateInit2, "deflateInit2_"); - pragma Import (C, inflateInit2, "inflateInit2_"); - pragma Import (C, zError, "zError"); - pragma Import (C, inflateSyncPoint, "inflateSyncPoint"); - pragma Import (C, get_crc_table, "get_crc_table"); - - -- since zlib 1.2.0: - - pragma Import (C, inflateCopy, "inflateCopy"); - pragma Import (C, compressBound, "compressBound"); - pragma Import (C, deflateBound, "deflateBound"); - pragma Import (C, gzungetc, "gzungetc"); - pragma Import (C, zlibCompileFlags, "zlibCompileFlags"); - - pragma Import (C, inflateBackInit, "inflateBackInit_"); - - -- I stopped binding the inflateBack routines, because realize that - -- it does not support zlib and gzip headers for now, and have no - -- symmetric deflateBack routines. - -- ZLib-Ada is symmetric regarding deflate/inflate data transformation - -- and has a similar generic callback interface for the - -- deflate/inflate transformation based on the regular Deflate/Inflate - -- routines. - - -- pragma Import (C, inflateBack, "inflateBack"); - -- pragma Import (C, inflateBackEnd, "inflateBackEnd"); - -end ZLib.Thin; diff --git a/third_party/zlib/contrib/ada/zlib.adb b/third_party/zlib/contrib/ada/zlib.adb deleted file mode 100644 index c1abe79..0000000 --- a/third_party/zlib/contrib/ada/zlib.adb +++ /dev/null @@ -1,701 +0,0 @@ ----------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2004 Dmitriy Anisimkov -- --- -- --- Open source license information is in the zlib.ads file. -- ----------------------------------------------------------------- - --- $Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp $ - -with Ada.Exceptions; -with Ada.Unchecked_Conversion; -with Ada.Unchecked_Deallocation; - -with Interfaces.C.Strings; - -with ZLib.Thin; - -package body ZLib is - - use type Thin.Int; - - type Z_Stream is new Thin.Z_Stream; - - type Return_Code_Enum is - (OK, - STREAM_END, - NEED_DICT, - ERRNO, - STREAM_ERROR, - DATA_ERROR, - MEM_ERROR, - BUF_ERROR, - VERSION_ERROR); - - type Flate_Step_Function is access - function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int; - pragma Convention (C, Flate_Step_Function); - - type Flate_End_Function is access - function (Ctrm : in Thin.Z_Streamp) return Thin.Int; - pragma Convention (C, Flate_End_Function); - - type Flate_Type is record - Step : Flate_Step_Function; - Done : Flate_End_Function; - end record; - - subtype Footer_Array is Stream_Element_Array (1 .. 8); - - Simple_GZip_Header : constant Stream_Element_Array (1 .. 10) - := (16#1f#, 16#8b#, -- Magic header - 16#08#, -- Z_DEFLATED - 16#00#, -- Flags - 16#00#, 16#00#, 16#00#, 16#00#, -- Time - 16#00#, -- XFlags - 16#03# -- OS code - ); - -- The simplest gzip header is not for informational, but just for - -- gzip format compatibility. - -- Note that some code below is using assumption - -- Simple_GZip_Header'Last > Footer_Array'Last, so do not make - -- Simple_GZip_Header'Last <= Footer_Array'Last. - - Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum - := (0 => OK, - 1 => STREAM_END, - 2 => NEED_DICT, - -1 => ERRNO, - -2 => STREAM_ERROR, - -3 => DATA_ERROR, - -4 => MEM_ERROR, - -5 => BUF_ERROR, - -6 => VERSION_ERROR); - - Flate : constant array (Boolean) of Flate_Type - := (True => (Step => Thin.Deflate'Access, - Done => Thin.DeflateEnd'Access), - False => (Step => Thin.Inflate'Access, - Done => Thin.InflateEnd'Access)); - - Flush_Finish : constant array (Boolean) of Flush_Mode - := (True => Finish, False => No_Flush); - - procedure Raise_Error (Stream : in Z_Stream); - pragma Inline (Raise_Error); - - procedure Raise_Error (Message : in String); - pragma Inline (Raise_Error); - - procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int); - - procedure Free is new Ada.Unchecked_Deallocation - (Z_Stream, Z_Stream_Access); - - function To_Thin_Access is new Ada.Unchecked_Conversion - (Z_Stream_Access, Thin.Z_Streamp); - - procedure Translate_GZip - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode); - -- Separate translate routine for make gzip header. - - procedure Translate_Auto - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode); - -- translate routine without additional headers. - - ----------------- - -- Check_Error -- - ----------------- - - procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is - use type Thin.Int; - begin - if Code /= Thin.Z_OK then - Raise_Error - (Return_Code_Enum'Image (Return_Code (Code)) - & ": " & Last_Error_Message (Stream)); - end if; - end Check_Error; - - ----------- - -- Close -- - ----------- - - procedure Close - (Filter : in out Filter_Type; - Ignore_Error : in Boolean := False) - is - Code : Thin.Int; - begin - if not Ignore_Error and then not Is_Open (Filter) then - raise Status_Error; - end if; - - Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm)); - - if Ignore_Error or else Code = Thin.Z_OK then - Free (Filter.Strm); - else - declare - Error_Message : constant String - := Last_Error_Message (Filter.Strm.all); - begin - Free (Filter.Strm); - Ada.Exceptions.Raise_Exception - (ZLib_Error'Identity, - Return_Code_Enum'Image (Return_Code (Code)) - & ": " & Error_Message); - end; - end if; - end Close; - - ----------- - -- CRC32 -- - ----------- - - function CRC32 - (CRC : in Unsigned_32; - Data : in Ada.Streams.Stream_Element_Array) - return Unsigned_32 - is - use Thin; - begin - return Unsigned_32 (crc32 (ULong (CRC), - Data'Address, - Data'Length)); - end CRC32; - - procedure CRC32 - (CRC : in out Unsigned_32; - Data : in Ada.Streams.Stream_Element_Array) is - begin - CRC := CRC32 (CRC, Data); - end CRC32; - - ------------------ - -- Deflate_Init -- - ------------------ - - procedure Deflate_Init - (Filter : in out Filter_Type; - Level : in Compression_Level := Default_Compression; - Strategy : in Strategy_Type := Default_Strategy; - Method : in Compression_Method := Deflated; - Window_Bits : in Window_Bits_Type := Default_Window_Bits; - Memory_Level : in Memory_Level_Type := Default_Memory_Level; - Header : in Header_Type := Default) - is - use type Thin.Int; - Win_Bits : Thin.Int := Thin.Int (Window_Bits); - begin - if Is_Open (Filter) then - raise Status_Error; - end if; - - -- We allow ZLib to make header only in case of default header type. - -- Otherwise we would either do header by ourselves, or do not do - -- header at all. - - if Header = None or else Header = GZip then - Win_Bits := -Win_Bits; - end if; - - -- For the GZip CRC calculation and make headers. - - if Header = GZip then - Filter.CRC := 0; - Filter.Offset := Simple_GZip_Header'First; - else - Filter.Offset := Simple_GZip_Header'Last + 1; - end if; - - Filter.Strm := new Z_Stream; - Filter.Compression := True; - Filter.Stream_End := False; - Filter.Header := Header; - - if Thin.Deflate_Init - (To_Thin_Access (Filter.Strm), - Level => Thin.Int (Level), - method => Thin.Int (Method), - windowBits => Win_Bits, - memLevel => Thin.Int (Memory_Level), - strategy => Thin.Int (Strategy)) /= Thin.Z_OK - then - Raise_Error (Filter.Strm.all); - end if; - end Deflate_Init; - - ----------- - -- Flush -- - ----------- - - procedure Flush - (Filter : in out Filter_Type; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode) - is - No_Data : Stream_Element_Array := (1 .. 0 => 0); - Last : Stream_Element_Offset; - begin - Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush); - end Flush; - - ----------------------- - -- Generic_Translate -- - ----------------------- - - procedure Generic_Translate - (Filter : in out ZLib.Filter_Type; - In_Buffer_Size : in Integer := Default_Buffer_Size; - Out_Buffer_Size : in Integer := Default_Buffer_Size) - is - In_Buffer : Stream_Element_Array - (1 .. Stream_Element_Offset (In_Buffer_Size)); - Out_Buffer : Stream_Element_Array - (1 .. Stream_Element_Offset (Out_Buffer_Size)); - Last : Stream_Element_Offset; - In_Last : Stream_Element_Offset; - In_First : Stream_Element_Offset; - Out_Last : Stream_Element_Offset; - begin - Main : loop - Data_In (In_Buffer, Last); - - In_First := In_Buffer'First; - - loop - Translate - (Filter => Filter, - In_Data => In_Buffer (In_First .. Last), - In_Last => In_Last, - Out_Data => Out_Buffer, - Out_Last => Out_Last, - Flush => Flush_Finish (Last < In_Buffer'First)); - - if Out_Buffer'First <= Out_Last then - Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last)); - end if; - - exit Main when Stream_End (Filter); - - -- The end of in buffer. - - exit when In_Last = Last; - - In_First := In_Last + 1; - end loop; - end loop Main; - - end Generic_Translate; - - ------------------ - -- Inflate_Init -- - ------------------ - - procedure Inflate_Init - (Filter : in out Filter_Type; - Window_Bits : in Window_Bits_Type := Default_Window_Bits; - Header : in Header_Type := Default) - is - use type Thin.Int; - Win_Bits : Thin.Int := Thin.Int (Window_Bits); - - procedure Check_Version; - -- Check the latest header types compatibility. - - procedure Check_Version is - begin - if Version <= "1.1.4" then - Raise_Error - ("Inflate header type " & Header_Type'Image (Header) - & " incompatible with ZLib version " & Version); - end if; - end Check_Version; - - begin - if Is_Open (Filter) then - raise Status_Error; - end if; - - case Header is - when None => - Check_Version; - - -- Inflate data without headers determined - -- by negative Win_Bits. - - Win_Bits := -Win_Bits; - when GZip => - Check_Version; - - -- Inflate gzip data defined by flag 16. - - Win_Bits := Win_Bits + 16; - when Auto => - Check_Version; - - -- Inflate with automatic detection - -- of gzip or native header defined by flag 32. - - Win_Bits := Win_Bits + 32; - when Default => null; - end case; - - Filter.Strm := new Z_Stream; - Filter.Compression := False; - Filter.Stream_End := False; - Filter.Header := Header; - - if Thin.Inflate_Init - (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK - then - Raise_Error (Filter.Strm.all); - end if; - end Inflate_Init; - - ------------- - -- Is_Open -- - ------------- - - function Is_Open (Filter : in Filter_Type) return Boolean is - begin - return Filter.Strm /= null; - end Is_Open; - - ----------------- - -- Raise_Error -- - ----------------- - - procedure Raise_Error (Message : in String) is - begin - Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message); - end Raise_Error; - - procedure Raise_Error (Stream : in Z_Stream) is - begin - Raise_Error (Last_Error_Message (Stream)); - end Raise_Error; - - ---------- - -- Read -- - ---------- - - procedure Read - (Filter : in out Filter_Type; - Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode := No_Flush) - is - In_Last : Stream_Element_Offset; - Item_First : Ada.Streams.Stream_Element_Offset := Item'First; - V_Flush : Flush_Mode := Flush; - - begin - pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1); - pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last); - - loop - if Rest_Last = Buffer'First - 1 then - V_Flush := Finish; - - elsif Rest_First > Rest_Last then - Read (Buffer, Rest_Last); - Rest_First := Buffer'First; - - if Rest_Last < Buffer'First then - V_Flush := Finish; - end if; - end if; - - Translate - (Filter => Filter, - In_Data => Buffer (Rest_First .. Rest_Last), - In_Last => In_Last, - Out_Data => Item (Item_First .. Item'Last), - Out_Last => Last, - Flush => V_Flush); - - Rest_First := In_Last + 1; - - exit when Stream_End (Filter) - or else Last = Item'Last - or else (Last >= Item'First and then Allow_Read_Some); - - Item_First := Last + 1; - end loop; - end Read; - - ---------------- - -- Stream_End -- - ---------------- - - function Stream_End (Filter : in Filter_Type) return Boolean is - begin - if Filter.Header = GZip and Filter.Compression then - return Filter.Stream_End - and then Filter.Offset = Footer_Array'Last + 1; - else - return Filter.Stream_End; - end if; - end Stream_End; - - -------------- - -- Total_In -- - -------------- - - function Total_In (Filter : in Filter_Type) return Count is - begin - return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all)); - end Total_In; - - --------------- - -- Total_Out -- - --------------- - - function Total_Out (Filter : in Filter_Type) return Count is - begin - return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all)); - end Total_Out; - - --------------- - -- Translate -- - --------------- - - procedure Translate - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode) is - begin - if Filter.Header = GZip and then Filter.Compression then - Translate_GZip - (Filter => Filter, - In_Data => In_Data, - In_Last => In_Last, - Out_Data => Out_Data, - Out_Last => Out_Last, - Flush => Flush); - else - Translate_Auto - (Filter => Filter, - In_Data => In_Data, - In_Last => In_Last, - Out_Data => Out_Data, - Out_Last => Out_Last, - Flush => Flush); - end if; - end Translate; - - -------------------- - -- Translate_Auto -- - -------------------- - - procedure Translate_Auto - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode) - is - use type Thin.Int; - Code : Thin.Int; - - begin - if not Is_Open (Filter) then - raise Status_Error; - end if; - - if Out_Data'Length = 0 and then In_Data'Length = 0 then - raise Constraint_Error; - end if; - - Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length); - Set_In (Filter.Strm.all, In_Data'Address, In_Data'Length); - - Code := Flate (Filter.Compression).Step - (To_Thin_Access (Filter.Strm), - Thin.Int (Flush)); - - if Code = Thin.Z_STREAM_END then - Filter.Stream_End := True; - else - Check_Error (Filter.Strm.all, Code); - end if; - - In_Last := In_Data'Last - - Stream_Element_Offset (Avail_In (Filter.Strm.all)); - Out_Last := Out_Data'Last - - Stream_Element_Offset (Avail_Out (Filter.Strm.all)); - end Translate_Auto; - - -------------------- - -- Translate_GZip -- - -------------------- - - procedure Translate_GZip - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode) - is - Out_First : Stream_Element_Offset; - - procedure Add_Data (Data : in Stream_Element_Array); - -- Add data to stream from the Filter.Offset till necessary, - -- used for add gzip headr/footer. - - procedure Put_32 - (Item : in out Stream_Element_Array; - Data : in Unsigned_32); - pragma Inline (Put_32); - - -------------- - -- Add_Data -- - -------------- - - procedure Add_Data (Data : in Stream_Element_Array) is - Data_First : Stream_Element_Offset renames Filter.Offset; - Data_Last : Stream_Element_Offset; - Data_Len : Stream_Element_Offset; -- -1 - Out_Len : Stream_Element_Offset; -- -1 - begin - Out_First := Out_Last + 1; - - if Data_First > Data'Last then - return; - end if; - - Data_Len := Data'Last - Data_First; - Out_Len := Out_Data'Last - Out_First; - - if Data_Len <= Out_Len then - Out_Last := Out_First + Data_Len; - Data_Last := Data'Last; - else - Out_Last := Out_Data'Last; - Data_Last := Data_First + Out_Len; - end if; - - Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last); - - Data_First := Data_Last + 1; - Out_First := Out_Last + 1; - end Add_Data; - - ------------ - -- Put_32 -- - ------------ - - procedure Put_32 - (Item : in out Stream_Element_Array; - Data : in Unsigned_32) - is - D : Unsigned_32 := Data; - begin - for J in Item'First .. Item'First + 3 loop - Item (J) := Stream_Element (D and 16#FF#); - D := Shift_Right (D, 8); - end loop; - end Put_32; - - begin - Out_Last := Out_Data'First - 1; - - if not Filter.Stream_End then - Add_Data (Simple_GZip_Header); - - Translate_Auto - (Filter => Filter, - In_Data => In_Data, - In_Last => In_Last, - Out_Data => Out_Data (Out_First .. Out_Data'Last), - Out_Last => Out_Last, - Flush => Flush); - - CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last)); - end if; - - if Filter.Stream_End and then Out_Last <= Out_Data'Last then - -- This detection method would work only when - -- Simple_GZip_Header'Last > Footer_Array'Last - - if Filter.Offset = Simple_GZip_Header'Last + 1 then - Filter.Offset := Footer_Array'First; - end if; - - declare - Footer : Footer_Array; - begin - Put_32 (Footer, Filter.CRC); - Put_32 (Footer (Footer'First + 4 .. Footer'Last), - Unsigned_32 (Total_In (Filter))); - Add_Data (Footer); - end; - end if; - end Translate_GZip; - - ------------- - -- Version -- - ------------- - - function Version return String is - begin - return Interfaces.C.Strings.Value (Thin.zlibVersion); - end Version; - - ----------- - -- Write -- - ----------- - - procedure Write - (Filter : in out Filter_Type; - Item : in Ada.Streams.Stream_Element_Array; - Flush : in Flush_Mode := No_Flush) - is - Buffer : Stream_Element_Array (1 .. Buffer_Size); - In_Last : Stream_Element_Offset; - Out_Last : Stream_Element_Offset; - In_First : Stream_Element_Offset := Item'First; - begin - if Item'Length = 0 and Flush = No_Flush then - return; - end if; - - loop - Translate - (Filter => Filter, - In_Data => Item (In_First .. Item'Last), - In_Last => In_Last, - Out_Data => Buffer, - Out_Last => Out_Last, - Flush => Flush); - - if Out_Last >= Buffer'First then - Write (Buffer (1 .. Out_Last)); - end if; - - exit when In_Last = Item'Last or Stream_End (Filter); - - In_First := In_Last + 1; - end loop; - end Write; - -end ZLib; diff --git a/third_party/zlib/contrib/ada/zlib.ads b/third_party/zlib/contrib/ada/zlib.ads deleted file mode 100644 index 81aaf1b..0000000 --- a/third_party/zlib/contrib/ada/zlib.ads +++ /dev/null @@ -1,328 +0,0 @@ ------------------------------------------------------------------------------- --- ZLib for Ada thick binding. -- --- -- --- Copyright (C) 2002-2004 Dmitriy Anisimkov -- --- -- --- This library is free software; you can redistribute it and/or modify -- --- it under the terms of the GNU General Public License as published by -- --- the Free Software Foundation; either version 2 of the License, or (at -- --- your option) any later version. -- --- -- --- This library is distributed in the hope that it will be useful, but -- --- WITHOUT ANY WARRANTY; without even the implied warranty of -- --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- --- General Public License for more details. -- --- -- --- You should have received a copy of the GNU General Public License -- --- along with this library; if not, write to the Free Software Foundation, -- --- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- -- --- As a special exception, if other files instantiate generics from this -- --- unit, or you link this unit with other files to produce an executable, -- --- this unit does not by itself cause the resulting executable to be -- --- covered by the GNU General Public License. This exception does not -- --- however invalidate any other reasons why the executable file might be -- --- covered by the GNU Public License. -- ------------------------------------------------------------------------------- - --- $Id: zlib.ads,v 1.26 2004/09/06 06:53:19 vagul Exp $ - -with Ada.Streams; - -with Interfaces; - -package ZLib is - - ZLib_Error : exception; - Status_Error : exception; - - type Compression_Level is new Integer range -1 .. 9; - - type Flush_Mode is private; - - type Compression_Method is private; - - type Window_Bits_Type is new Integer range 8 .. 15; - - type Memory_Level_Type is new Integer range 1 .. 9; - - type Unsigned_32 is new Interfaces.Unsigned_32; - - type Strategy_Type is private; - - type Header_Type is (None, Auto, Default, GZip); - -- Header type usage have a some limitation for inflate. - -- See comment for Inflate_Init. - - subtype Count is Ada.Streams.Stream_Element_Count; - - Default_Memory_Level : constant Memory_Level_Type := 8; - Default_Window_Bits : constant Window_Bits_Type := 15; - - ---------------------------------- - -- Compression method constants -- - ---------------------------------- - - Deflated : constant Compression_Method; - -- Only one method allowed in this ZLib version - - --------------------------------- - -- Compression level constants -- - --------------------------------- - - No_Compression : constant Compression_Level := 0; - Best_Speed : constant Compression_Level := 1; - Best_Compression : constant Compression_Level := 9; - Default_Compression : constant Compression_Level := -1; - - -------------------------- - -- Flush mode constants -- - -------------------------- - - No_Flush : constant Flush_Mode; - -- Regular way for compression, no flush - - Partial_Flush : constant Flush_Mode; - -- Will be removed, use Z_SYNC_FLUSH instead - - Sync_Flush : constant Flush_Mode; - -- All pending output is flushed to the output buffer and the output - -- is aligned on a byte boundary, so that the decompressor can get all - -- input data available so far. (In particular avail_in is zero after the - -- call if enough output space has been provided before the call.) - -- Flushing may degrade compression for some compression algorithms and so - -- it should be used only when necessary. - - Block_Flush : constant Flush_Mode; - -- Z_BLOCK requests that inflate() stop - -- if and when it get to the next deflate block boundary. When decoding the - -- zlib or gzip format, this will cause inflate() to return immediately - -- after the header and before the first block. When doing a raw inflate, - -- inflate() will go ahead and process the first block, and will return - -- when it gets to the end of that block, or when it runs out of data. - - Full_Flush : constant Flush_Mode; - -- All output is flushed as with SYNC_FLUSH, and the compression state - -- is reset so that decompression can restart from this point if previous - -- compressed data has been damaged or if random access is desired. Using - -- Full_Flush too often can seriously degrade the compression. - - Finish : constant Flush_Mode; - -- Just for tell the compressor that input data is complete. - - ------------------------------------ - -- Compression strategy constants -- - ------------------------------------ - - -- RLE strategy could be used only in version 1.2.0 and later. - - Filtered : constant Strategy_Type; - Huffman_Only : constant Strategy_Type; - RLE : constant Strategy_Type; - Default_Strategy : constant Strategy_Type; - - Default_Buffer_Size : constant := 4096; - - type Filter_Type is tagged limited private; - -- The filter is for compression and for decompression. - -- The usage of the type is depend of its initialization. - - function Version return String; - pragma Inline (Version); - -- Return string representation of the ZLib version. - - procedure Deflate_Init - (Filter : in out Filter_Type; - Level : in Compression_Level := Default_Compression; - Strategy : in Strategy_Type := Default_Strategy; - Method : in Compression_Method := Deflated; - Window_Bits : in Window_Bits_Type := Default_Window_Bits; - Memory_Level : in Memory_Level_Type := Default_Memory_Level; - Header : in Header_Type := Default); - -- Compressor initialization. - -- When Header parameter is Auto or Default, then default zlib header - -- would be provided for compressed data. - -- When Header is GZip, then gzip header would be set instead of - -- default header. - -- When Header is None, no header would be set for compressed data. - - procedure Inflate_Init - (Filter : in out Filter_Type; - Window_Bits : in Window_Bits_Type := Default_Window_Bits; - Header : in Header_Type := Default); - -- Decompressor initialization. - -- Default header type mean that ZLib default header is expecting in the - -- input compressed stream. - -- Header type None mean that no header is expecting in the input stream. - -- GZip header type mean that GZip header is expecting in the - -- input compressed stream. - -- Auto header type mean that header type (GZip or Native) would be - -- detected automatically in the input stream. - -- Note that header types parameter values None, GZip and Auto are - -- supported for inflate routine only in ZLib versions 1.2.0.2 and later. - -- Deflate_Init is supporting all header types. - - function Is_Open (Filter : in Filter_Type) return Boolean; - pragma Inline (Is_Open); - -- Is the filter opened for compression or decompression. - - procedure Close - (Filter : in out Filter_Type; - Ignore_Error : in Boolean := False); - -- Closing the compression or decompressor. - -- If stream is closing before the complete and Ignore_Error is False, - -- The exception would be raised. - - generic - with procedure Data_In - (Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset); - with procedure Data_Out - (Item : in Ada.Streams.Stream_Element_Array); - procedure Generic_Translate - (Filter : in out Filter_Type; - In_Buffer_Size : in Integer := Default_Buffer_Size; - Out_Buffer_Size : in Integer := Default_Buffer_Size); - -- Compress/decompress data fetch from Data_In routine and pass the result - -- to the Data_Out routine. User should provide Data_In and Data_Out - -- for compression/decompression data flow. - -- Compression or decompression depend on Filter initialization. - - function Total_In (Filter : in Filter_Type) return Count; - pragma Inline (Total_In); - -- Returns total number of input bytes read so far - - function Total_Out (Filter : in Filter_Type) return Count; - pragma Inline (Total_Out); - -- Returns total number of bytes output so far - - function CRC32 - (CRC : in Unsigned_32; - Data : in Ada.Streams.Stream_Element_Array) - return Unsigned_32; - pragma Inline (CRC32); - -- Compute CRC32, it could be necessary for make gzip format - - procedure CRC32 - (CRC : in out Unsigned_32; - Data : in Ada.Streams.Stream_Element_Array); - pragma Inline (CRC32); - -- Compute CRC32, it could be necessary for make gzip format - - ------------------------------------------------- - -- Below is more complex low level routines. -- - ------------------------------------------------- - - procedure Translate - (Filter : in out Filter_Type; - In_Data : in Ada.Streams.Stream_Element_Array; - In_Last : out Ada.Streams.Stream_Element_Offset; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode); - -- Compress/decompress the In_Data buffer and place the result into - -- Out_Data. In_Last is the index of last element from In_Data accepted by - -- the Filter. Out_Last is the last element of the received data from - -- Filter. To tell the filter that incoming data are complete put the - -- Flush parameter to Finish. - - function Stream_End (Filter : in Filter_Type) return Boolean; - pragma Inline (Stream_End); - -- Return the true when the stream is complete. - - procedure Flush - (Filter : in out Filter_Type; - Out_Data : out Ada.Streams.Stream_Element_Array; - Out_Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode); - pragma Inline (Flush); - -- Flushing the data from the compressor. - - generic - with procedure Write - (Item : in Ada.Streams.Stream_Element_Array); - -- User should provide this routine for accept - -- compressed/decompressed data. - - Buffer_Size : in Ada.Streams.Stream_Element_Offset - := Default_Buffer_Size; - -- Buffer size for Write user routine. - - procedure Write - (Filter : in out Filter_Type; - Item : in Ada.Streams.Stream_Element_Array; - Flush : in Flush_Mode := No_Flush); - -- Compress/Decompress data from Item to the generic parameter procedure - -- Write. Output buffer size could be set in Buffer_Size generic parameter. - - generic - with procedure Read - (Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset); - -- User should provide data for compression/decompression - -- thru this routine. - - Buffer : in out Ada.Streams.Stream_Element_Array; - -- Buffer for keep remaining data from the previous - -- back read. - - Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset; - -- Rest_First have to be initialized to Buffer'Last + 1 - -- Rest_Last have to be initialized to Buffer'Last - -- before usage. - - Allow_Read_Some : in Boolean := False; - -- Is it allowed to return Last < Item'Last before end of data. - - procedure Read - (Filter : in out Filter_Type; - Item : out Ada.Streams.Stream_Element_Array; - Last : out Ada.Streams.Stream_Element_Offset; - Flush : in Flush_Mode := No_Flush); - -- Compress/Decompress data from generic parameter procedure Read to the - -- Item. User should provide Buffer and initialized Rest_First, Rest_Last - -- indicators. If Allow_Read_Some is True, Read routines could return - -- Last < Item'Last only at end of stream. - -private - - use Ada.Streams; - - pragma Assert (Ada.Streams.Stream_Element'Size = 8); - pragma Assert (Ada.Streams.Stream_Element'Modulus = 2**8); - - type Flush_Mode is new Integer range 0 .. 5; - - type Compression_Method is new Integer range 8 .. 8; - - type Strategy_Type is new Integer range 0 .. 3; - - No_Flush : constant Flush_Mode := 0; - Partial_Flush : constant Flush_Mode := 1; - Sync_Flush : constant Flush_Mode := 2; - Full_Flush : constant Flush_Mode := 3; - Finish : constant Flush_Mode := 4; - Block_Flush : constant Flush_Mode := 5; - - Filtered : constant Strategy_Type := 1; - Huffman_Only : constant Strategy_Type := 2; - RLE : constant Strategy_Type := 3; - Default_Strategy : constant Strategy_Type := 0; - - Deflated : constant Compression_Method := 8; - - type Z_Stream; - - type Z_Stream_Access is access all Z_Stream; - - type Filter_Type is tagged limited record - Strm : Z_Stream_Access; - Compression : Boolean; - Stream_End : Boolean; - Header : Header_Type; - CRC : Unsigned_32; - Offset : Stream_Element_Offset; - -- Offset for gzip header/footer output. - end record; - -end ZLib; diff --git a/third_party/zlib/contrib/ada/zlib.gpr b/third_party/zlib/contrib/ada/zlib.gpr deleted file mode 100644 index 296b22a..0000000 --- a/third_party/zlib/contrib/ada/zlib.gpr +++ /dev/null @@ -1,20 +0,0 @@ -project Zlib is - - for Languages use ("Ada"); - for Source_Dirs use ("."); - for Object_Dir use "."; - for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); - - package Compiler is - for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); - end Compiler; - - package Linker is - for Default_Switches ("ada") use ("-lz"); - end Linker; - - package Builder is - for Default_Switches ("ada") use ("-s", "-gnatQ"); - end Builder; - -end Zlib; diff --git a/third_party/zlib/contrib/blast/Makefile b/third_party/zlib/contrib/blast/Makefile deleted file mode 100644 index 9be80ba..0000000 --- a/third_party/zlib/contrib/blast/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -blast: blast.c blast.h - cc -DTEST -o blast blast.c - -test: blast - blast < test.pk | cmp - test.txt - -clean: - rm -f blast blast.o diff --git a/third_party/zlib/contrib/blast/README b/third_party/zlib/contrib/blast/README deleted file mode 100644 index e3a60b3..0000000 --- a/third_party/zlib/contrib/blast/README +++ /dev/null @@ -1,4 +0,0 @@ -Read blast.h for purpose and usage. - -Mark Adler -madler@alumni.caltech.edu diff --git a/third_party/zlib/contrib/blast/blast.c b/third_party/zlib/contrib/blast/blast.c deleted file mode 100644 index e6e6590..0000000 --- a/third_party/zlib/contrib/blast/blast.c +++ /dev/null @@ -1,466 +0,0 @@ -/* blast.c - * Copyright (C) 2003, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in blast.h - * version 1.3, 24 Aug 2013 - * - * blast.c decompresses data compressed by the PKWare Compression Library. - * This function provides functionality similar to the explode() function of - * the PKWare library, hence the name "blast". - * - * This decompressor is based on the excellent format description provided by - * Ben Rudiak-Gould in comp.compression on August 13, 2001. Interestingly, the - * example Ben provided in the post is incorrect. The distance 110001 should - * instead be 111000. When corrected, the example byte stream becomes: - * - * 00 04 82 24 25 8f 80 7f - * - * which decompresses to "AIAIAIAIAIAIA" (without the quotes). - */ - -/* - * Change history: - * - * 1.0 12 Feb 2003 - First version - * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data - * 1.2 24 Oct 2012 - Add note about using binary mode in stdio - * - Fix comparisons of differently signed integers - * 1.3 24 Aug 2013 - Return unused input from blast() - * - Fix test code to correctly report unused input - * - Enable the provision of initial input to blast() - */ - -#include /* for NULL */ -#include /* for setjmp(), longjmp(), and jmp_buf */ -#include "blast.h" /* prototype for blast() */ - -#define local static /* for local function definitions */ -#define MAXBITS 13 /* maximum code length */ -#define MAXWIN 4096 /* maximum window size */ - -/* input and output state */ -struct state { - /* input state */ - blast_in infun; /* input function provided by user */ - void *inhow; /* opaque information passed to infun() */ - unsigned char *in; /* next input location */ - unsigned left; /* available input at in */ - int bitbuf; /* bit buffer */ - int bitcnt; /* number of bits in bit buffer */ - - /* input limit error return state for bits() and decode() */ - jmp_buf env; - - /* output state */ - blast_out outfun; /* output function provided by user */ - void *outhow; /* opaque information passed to outfun() */ - unsigned next; /* index of next write location in out[] */ - int first; /* true to check distances (for first 4K) */ - unsigned char out[MAXWIN]; /* output buffer and sliding window */ -}; - -/* - * Return need bits from the input stream. This always leaves less than - * eight bits in the buffer. bits() works properly for need == 0. - * - * Format notes: - * - * - Bits are stored in bytes from the least significant bit to the most - * significant bit. Therefore bits are dropped from the bottom of the bit - * buffer, using shift right, and new bytes are appended to the top of the - * bit buffer, using shift left. - */ -local int bits(struct state *s, int need) -{ - int val; /* bit accumulator */ - - /* load at least need bits into val */ - val = s->bitbuf; - while (s->bitcnt < need) { - if (s->left == 0) { - s->left = s->infun(s->inhow, &(s->in)); - if (s->left == 0) longjmp(s->env, 1); /* out of input */ - } - val |= (int)(*(s->in)++) << s->bitcnt; /* load eight bits */ - s->left--; - s->bitcnt += 8; - } - - /* drop need bits and update buffer, always zero to seven bits left */ - s->bitbuf = val >> need; - s->bitcnt -= need; - - /* return need bits, zeroing the bits above that */ - return val & ((1 << need) - 1); -} - -/* - * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of - * each length, which for a canonical code are stepped through in order. - * symbol[] are the symbol values in canonical order, where the number of - * entries is the sum of the counts in count[]. The decoding process can be - * seen in the function decode() below. - */ -struct huffman { - short *count; /* number of symbols of each length */ - short *symbol; /* canonically ordered symbols */ -}; - -/* - * Decode a code from the stream s using huffman table h. Return the symbol or - * a negative value if there is an error. If all of the lengths are zero, i.e. - * an empty code, or if the code is incomplete and an invalid code is received, - * then -9 is returned after reading MAXBITS bits. - * - * Format notes: - * - * - The codes as stored in the compressed data are bit-reversed relative to - * a simple integer ordering of codes of the same lengths. Hence below the - * bits are pulled from the compressed data one at a time and used to - * build the code value reversed from what is in the stream in order to - * permit simple integer comparisons for decoding. - * - * - The first code for the shortest length is all ones. Subsequent codes of - * the same length are simply integer decrements of the previous code. When - * moving up a length, a one bit is appended to the code. For a complete - * code, the last code of the longest length will be all zeros. To support - * this ordering, the bits pulled during decoding are inverted to apply the - * more "natural" ordering starting with all zeros and incrementing. - */ -local int decode(struct state *s, struct huffman *h) -{ - int len; /* current number of bits in code */ - int code; /* len bits being decoded */ - int first; /* first code of length len */ - int count; /* number of codes of length len */ - int index; /* index of first code of length len in symbol table */ - int bitbuf; /* bits from stream */ - int left; /* bits left in next or left to process */ - short *next; /* next number of codes */ - - bitbuf = s->bitbuf; - left = s->bitcnt; - code = first = index = 0; - len = 1; - next = h->count + 1; - while (1) { - while (left--) { - code |= (bitbuf & 1) ^ 1; /* invert code */ - bitbuf >>= 1; - count = *next++; - if (code < first + count) { /* if length len, return symbol */ - s->bitbuf = bitbuf; - s->bitcnt = (s->bitcnt - len) & 7; - return h->symbol[index + (code - first)]; - } - index += count; /* else update for next length */ - first += count; - first <<= 1; - code <<= 1; - len++; - } - left = (MAXBITS+1) - len; - if (left == 0) break; - if (s->left == 0) { - s->left = s->infun(s->inhow, &(s->in)); - if (s->left == 0) longjmp(s->env, 1); /* out of input */ - } - bitbuf = *(s->in)++; - s->left--; - if (left > 8) left = 8; - } - return -9; /* ran out of codes */ -} - -/* - * Given a list of repeated code lengths rep[0..n-1], where each byte is a - * count (high four bits + 1) and a code length (low four bits), generate the - * list of code lengths. This compaction reduces the size of the object code. - * Then given the list of code lengths length[0..n-1] representing a canonical - * Huffman code for n symbols, construct the tables required to decode those - * codes. Those tables are the number of codes of each length, and the symbols - * sorted by length, retaining their original order within each length. The - * return value is zero for a complete code set, negative for an over- - * subscribed code set, and positive for an incomplete code set. The tables - * can be used if the return value is zero or positive, but they cannot be used - * if the return value is negative. If the return value is zero, it is not - * possible for decode() using that table to return an error--any stream of - * enough bits will resolve to a symbol. If the return value is positive, then - * it is possible for decode() using that table to return an error for received - * codes past the end of the incomplete lengths. - */ -local int construct(struct huffman *h, const unsigned char *rep, int n) -{ - int symbol; /* current symbol when stepping through length[] */ - int len; /* current length when stepping through h->count[] */ - int left; /* number of possible codes left of current length */ - short offs[MAXBITS+1]; /* offsets in symbol table for each length */ - short length[256]; /* code lengths */ - - /* convert compact repeat counts into symbol bit length list */ - symbol = 0; - do { - len = *rep++; - left = (len >> 4) + 1; - len &= 15; - do { - length[symbol++] = len; - } while (--left); - } while (--n); - n = symbol; - - /* count number of codes of each length */ - for (len = 0; len <= MAXBITS; len++) - h->count[len] = 0; - for (symbol = 0; symbol < n; symbol++) - (h->count[length[symbol]])++; /* assumes lengths are within bounds */ - if (h->count[0] == n) /* no codes! */ - return 0; /* complete, but decode() will fail */ - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; /* one possible code of zero length */ - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; /* one more bit, double codes left */ - left -= h->count[len]; /* deduct count from possible codes */ - if (left < 0) return left; /* over-subscribed--return negative */ - } /* left > 0 means incomplete */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + h->count[len]; - - /* - * put symbols in table sorted by length, by symbol order within each - * length - */ - for (symbol = 0; symbol < n; symbol++) - if (length[symbol] != 0) - h->symbol[offs[length[symbol]]++] = symbol; - - /* return zero for complete set, positive for incomplete set */ - return left; -} - -/* - * Decode PKWare Compression Library stream. - * - * Format notes: - * - * - First byte is 0 if literals are uncoded or 1 if they are coded. Second - * byte is 4, 5, or 6 for the number of extra bits in the distance code. - * This is the base-2 logarithm of the dictionary size minus six. - * - * - Compressed data is a combination of literals and length/distance pairs - * terminated by an end code. Literals are either Huffman coded or - * uncoded bytes. A length/distance pair is a coded length followed by a - * coded distance to represent a string that occurs earlier in the - * uncompressed data that occurs again at the current location. - * - * - A bit preceding a literal or length/distance pair indicates which comes - * next, 0 for literals, 1 for length/distance. - * - * - If literals are uncoded, then the next eight bits are the literal, in the - * normal bit order in the stream, i.e. no bit-reversal is needed. Similarly, - * no bit reversal is needed for either the length extra bits or the distance - * extra bits. - * - * - Literal bytes are simply written to the output. A length/distance pair is - * an instruction to copy previously uncompressed bytes to the output. The - * copy is from distance bytes back in the output stream, copying for length - * bytes. - * - * - Distances pointing before the beginning of the output data are not - * permitted. - * - * - Overlapped copies, where the length is greater than the distance, are - * allowed and common. For example, a distance of one and a length of 518 - * simply copies the last byte 518 times. A distance of four and a length of - * twelve copies the last four bytes three times. A simple forward copy - * ignoring whether the length is greater than the distance or not implements - * this correctly. - */ -local int decomp(struct state *s) -{ - int lit; /* true if literals are coded */ - int dict; /* log2(dictionary size) - 6 */ - int symbol; /* decoded symbol, extra bits for distance */ - int len; /* length for copy */ - unsigned dist; /* distance for copy */ - int copy; /* copy counter */ - unsigned char *from, *to; /* copy pointers */ - static int virgin = 1; /* build tables once */ - static short litcnt[MAXBITS+1], litsym[256]; /* litcode memory */ - static short lencnt[MAXBITS+1], lensym[16]; /* lencode memory */ - static short distcnt[MAXBITS+1], distsym[64]; /* distcode memory */ - static struct huffman litcode = {litcnt, litsym}; /* length code */ - static struct huffman lencode = {lencnt, lensym}; /* length code */ - static struct huffman distcode = {distcnt, distsym};/* distance code */ - /* bit lengths of literal codes */ - static const unsigned char litlen[] = { - 11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8, - 9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5, - 7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12, - 8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27, - 44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45, - 44, 173}; - /* bit lengths of length codes 0..15 */ - static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23}; - /* bit lengths of distance codes 0..63 */ - static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248}; - static const short base[16] = { /* base for length codes */ - 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264}; - static const char extra[16] = { /* extra bits for length codes */ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8}; - - /* set up decoding tables (once--might not be thread-safe) */ - if (virgin) { - construct(&litcode, litlen, sizeof(litlen)); - construct(&lencode, lenlen, sizeof(lenlen)); - construct(&distcode, distlen, sizeof(distlen)); - virgin = 0; - } - - /* read header */ - lit = bits(s, 8); - if (lit > 1) return -1; - dict = bits(s, 8); - if (dict < 4 || dict > 6) return -2; - - /* decode literals and length/distance pairs */ - do { - if (bits(s, 1)) { - /* get length */ - symbol = decode(s, &lencode); - len = base[symbol] + bits(s, extra[symbol]); - if (len == 519) break; /* end code */ - - /* get distance */ - symbol = len == 2 ? 2 : dict; - dist = decode(s, &distcode) << symbol; - dist += bits(s, symbol); - dist++; - if (s->first && dist > s->next) - return -3; /* distance too far back */ - - /* copy length bytes from distance bytes back */ - do { - to = s->out + s->next; - from = to - dist; - copy = MAXWIN; - if (s->next < dist) { - from += copy; - copy = dist; - } - copy -= s->next; - if (copy > len) copy = len; - len -= copy; - s->next += copy; - do { - *to++ = *from++; - } while (--copy); - if (s->next == MAXWIN) { - if (s->outfun(s->outhow, s->out, s->next)) return 1; - s->next = 0; - s->first = 0; - } - } while (len != 0); - } - else { - /* get literal and write it */ - symbol = lit ? decode(s, &litcode) : bits(s, 8); - s->out[s->next++] = symbol; - if (s->next == MAXWIN) { - if (s->outfun(s->outhow, s->out, s->next)) return 1; - s->next = 0; - s->first = 0; - } - } - } while (1); - return 0; -} - -/* See comments in blast.h */ -int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow, - unsigned *left, unsigned char **in) -{ - struct state s; /* input/output state */ - int err; /* return value */ - - /* initialize input state */ - s.infun = infun; - s.inhow = inhow; - if (left != NULL && *left) { - s.left = *left; - s.in = *in; - } - else - s.left = 0; - s.bitbuf = 0; - s.bitcnt = 0; - - /* initialize output state */ - s.outfun = outfun; - s.outhow = outhow; - s.next = 0; - s.first = 1; - - /* return if bits() or decode() tries to read past available input */ - if (setjmp(s.env) != 0) /* if came back here via longjmp(), */ - err = 2; /* then skip decomp(), return error */ - else - err = decomp(&s); /* decompress */ - - /* return unused input */ - if (left != NULL) - *left = s.left; - if (in != NULL) - *in = s.left ? s.in : NULL; - - /* write any leftover output and update the error code if needed */ - if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0) - err = 1; - return err; -} - -#ifdef TEST -/* Example of how to use blast() */ -#include -#include - -#define CHUNK 16384 - -local unsigned inf(void *how, unsigned char **buf) -{ - static unsigned char hold[CHUNK]; - - *buf = hold; - return fread(hold, 1, CHUNK, (FILE *)how); -} - -local int outf(void *how, unsigned char *buf, unsigned len) -{ - return fwrite(buf, 1, len, (FILE *)how) != len; -} - -/* Decompress a PKWare Compression Library stream from stdin to stdout */ -int main(void) -{ - int ret; - unsigned left; - - /* decompress to stdout */ - left = 0; - ret = blast(inf, stdin, outf, stdout, &left, NULL); - if (ret != 0) - fprintf(stderr, "blast error: %d\n", ret); - - /* count any leftover bytes */ - while (getchar() != EOF) - left++; - if (left) - fprintf(stderr, "blast warning: %u unused bytes of input\n", left); - - /* return blast() error code */ - return ret; -} -#endif diff --git a/third_party/zlib/contrib/blast/blast.h b/third_party/zlib/contrib/blast/blast.h deleted file mode 100644 index 39835cb..0000000 --- a/third_party/zlib/contrib/blast/blast.h +++ /dev/null @@ -1,84 +0,0 @@ -/* blast.h -- interface for blast.c - Copyright (C) 2003, 2012, 2013 Mark Adler - version 1.3, 24 Aug 2013 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - - -/* - * blast() decompresses the PKWare Data Compression Library (DCL) compressed - * format. It provides the same functionality as the explode() function in - * that library. (Note: PKWare overused the "implode" verb, and the format - * used by their library implode() function is completely different and - * incompatible with the implode compression method supported by PKZIP.) - * - * The binary mode for stdio functions should be used to assure that the - * compressed data is not corrupted when read or written. For example: - * fopen(..., "rb") and fopen(..., "wb"). - */ - - -typedef unsigned (*blast_in)(void *how, unsigned char **buf); -typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len); -/* Definitions for input/output functions passed to blast(). See below for - * what the provided functions need to do. - */ - - -int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow, - unsigned *left, unsigned char **in); -/* Decompress input to output using the provided infun() and outfun() calls. - * On success, the return value of blast() is zero. If there is an error in - * the source data, i.e. it is not in the proper format, then a negative value - * is returned. If there is not enough input available or there is not enough - * output space, then a positive error is returned. - * - * The input function is invoked: len = infun(how, &buf), where buf is set by - * infun() to point to the input buffer, and infun() returns the number of - * available bytes there. If infun() returns zero, then blast() returns with - * an input error. (blast() only asks for input if it needs it.) inhow is for - * use by the application to pass an input descriptor to infun(), if desired. - * - * If left and in are not NULL and *left is not zero when blast() is called, - * then the *left bytes at *in are consumed for input before infun() is used. - * - * The output function is invoked: err = outfun(how, buf, len), where the bytes - * to be written are buf[0..len-1]. If err is not zero, then blast() returns - * with an output error. outfun() is always called with len <= 4096. outhow - * is for use by the application to pass an output descriptor to outfun(), if - * desired. - * - * If there is any unused input, *left is set to the number of bytes that were - * read and *in points to them. Otherwise *left is set to zero and *in is set - * to NULL. If left or in are NULL, then they are not set. - * - * The return codes are: - * - * 2: ran out of input before completing decompression - * 1: output error before completing decompression - * 0: successful decompression - * -1: literal flag not zero or one - * -2: dictionary size not in 4..6 - * -3: distance is too far back - * - * At the bottom of blast.c is an example program that uses blast() that can be - * compiled to produce a command-line decompression filter by defining TEST. - */ - diff --git a/third_party/zlib/contrib/blast/test.pk b/third_party/zlib/contrib/blast/test.pk deleted file mode 100644 index be10b2bbb251759ffdf6da49fadd1a3f137a54c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8 PcmZQzX;M+`Z>R?V2c!aC diff --git a/third_party/zlib/contrib/blast/test.txt b/third_party/zlib/contrib/blast/test.txt deleted file mode 100644 index bfdf1c5..0000000 --- a/third_party/zlib/contrib/blast/test.txt +++ /dev/null @@ -1 +0,0 @@ -AIAIAIAIAIAIA \ No newline at end of file diff --git a/third_party/zlib/contrib/delphi/ZLib.pas b/third_party/zlib/contrib/delphi/ZLib.pas deleted file mode 100644 index 93fa4c9..0000000 --- a/third_party/zlib/contrib/delphi/ZLib.pas +++ /dev/null @@ -1,557 +0,0 @@ -{*******************************************************} -{ } -{ Borland Delphi Supplemental Components } -{ ZLIB Data Compression Interface Unit } -{ } -{ Copyright (c) 1997,99 Borland Corporation } -{ } -{*******************************************************} - -{ Updated for zlib 1.2.x by Cosmin Truta } - -unit ZLib; - -interface - -uses SysUtils, Classes; - -type - TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl; - TFree = procedure (AppData, Block: Pointer); cdecl; - - // Internal structure. Ignore. - TZStreamRec = packed record - next_in: PChar; // next input byte - avail_in: Integer; // number of bytes available at next_in - total_in: Longint; // total nb of input bytes read so far - - next_out: PChar; // next output byte should be put here - avail_out: Integer; // remaining free space at next_out - total_out: Longint; // total nb of bytes output so far - - msg: PChar; // last error message, NULL if no error - internal: Pointer; // not visible by applications - - zalloc: TAlloc; // used to allocate the internal state - zfree: TFree; // used to free the internal state - AppData: Pointer; // private data object passed to zalloc and zfree - - data_type: Integer; // best guess about the data type: ascii or binary - adler: Longint; // adler32 value of the uncompressed data - reserved: Longint; // reserved for future use - end; - - // Abstract ancestor class - TCustomZlibStream = class(TStream) - private - FStrm: TStream; - FStrmPos: Integer; - FOnProgress: TNotifyEvent; - FZRec: TZStreamRec; - FBuffer: array [Word] of Char; - protected - procedure Progress(Sender: TObject); dynamic; - property OnProgress: TNotifyEvent read FOnProgress write FOnProgress; - constructor Create(Strm: TStream); - end; - -{ TCompressionStream compresses data on the fly as data is written to it, and - stores the compressed data to another stream. - - TCompressionStream is write-only and strictly sequential. Reading from the - stream will raise an exception. Using Seek to move the stream pointer - will raise an exception. - - Output data is cached internally, written to the output stream only when - the internal output buffer is full. All pending output data is flushed - when the stream is destroyed. - - The Position property returns the number of uncompressed bytes of - data that have been written to the stream so far. - - CompressionRate returns the on-the-fly percentage by which the original - data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100 - If raw data size = 100 and compressed data size = 25, the CompressionRate - is 75% - - The OnProgress event is called each time the output buffer is filled and - written to the output stream. This is useful for updating a progress - indicator when you are writing a large chunk of data to the compression - stream in a single call.} - - - TCompressionLevel = (clNone, clFastest, clDefault, clMax); - - TCompressionStream = class(TCustomZlibStream) - private - function GetCompressionRate: Single; - public - constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream); - destructor Destroy; override; - function Read(var Buffer; Count: Longint): Longint; override; - function Write(const Buffer; Count: Longint): Longint; override; - function Seek(Offset: Longint; Origin: Word): Longint; override; - property CompressionRate: Single read GetCompressionRate; - property OnProgress; - end; - -{ TDecompressionStream decompresses data on the fly as data is read from it. - - Compressed data comes from a separate source stream. TDecompressionStream - is read-only and unidirectional; you can seek forward in the stream, but not - backwards. The special case of setting the stream position to zero is - allowed. Seeking forward decompresses data until the requested position in - the uncompressed data has been reached. Seeking backwards, seeking relative - to the end of the stream, requesting the size of the stream, and writing to - the stream will raise an exception. - - The Position property returns the number of bytes of uncompressed data that - have been read from the stream so far. - - The OnProgress event is called each time the internal input buffer of - compressed data is exhausted and the next block is read from the input stream. - This is useful for updating a progress indicator when you are reading a - large chunk of data from the decompression stream in a single call.} - - TDecompressionStream = class(TCustomZlibStream) - public - constructor Create(Source: TStream); - destructor Destroy; override; - function Read(var Buffer; Count: Longint): Longint; override; - function Write(const Buffer; Count: Longint): Longint; override; - function Seek(Offset: Longint; Origin: Word): Longint; override; - property OnProgress; - end; - - - -{ CompressBuf compresses data, buffer to buffer, in one call. - In: InBuf = ptr to compressed data - InBytes = number of bytes in InBuf - Out: OutBuf = ptr to newly allocated buffer containing decompressed data - OutBytes = number of bytes in OutBuf } -procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; - out OutBuf: Pointer; out OutBytes: Integer); - - -{ DecompressBuf decompresses data, buffer to buffer, in one call. - In: InBuf = ptr to compressed data - InBytes = number of bytes in InBuf - OutEstimate = zero, or est. size of the decompressed data - Out: OutBuf = ptr to newly allocated buffer containing decompressed data - OutBytes = number of bytes in OutBuf } -procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; - OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); - -{ DecompressToUserBuf decompresses data, buffer to buffer, in one call. - In: InBuf = ptr to compressed data - InBytes = number of bytes in InBuf - Out: OutBuf = ptr to user-allocated buffer to contain decompressed data - BufSize = number of bytes in OutBuf } -procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; - const OutBuf: Pointer; BufSize: Integer); - -const - zlib_version = '1.3.1'; - -type - EZlibError = class(Exception); - ECompressionError = class(EZlibError); - EDecompressionError = class(EZlibError); - -implementation - -uses ZLibConst; - -const - Z_NO_FLUSH = 0; - Z_PARTIAL_FLUSH = 1; - Z_SYNC_FLUSH = 2; - Z_FULL_FLUSH = 3; - Z_FINISH = 4; - - Z_OK = 0; - Z_STREAM_END = 1; - Z_NEED_DICT = 2; - Z_ERRNO = (-1); - Z_STREAM_ERROR = (-2); - Z_DATA_ERROR = (-3); - Z_MEM_ERROR = (-4); - Z_BUF_ERROR = (-5); - Z_VERSION_ERROR = (-6); - - Z_NO_COMPRESSION = 0; - Z_BEST_SPEED = 1; - Z_BEST_COMPRESSION = 9; - Z_DEFAULT_COMPRESSION = (-1); - - Z_FILTERED = 1; - Z_HUFFMAN_ONLY = 2; - Z_RLE = 3; - Z_DEFAULT_STRATEGY = 0; - - Z_BINARY = 0; - Z_ASCII = 1; - Z_UNKNOWN = 2; - - Z_DEFLATED = 8; - - -{$L adler32.obj} -{$L compress.obj} -{$L crc32.obj} -{$L deflate.obj} -{$L infback.obj} -{$L inffast.obj} -{$L inflate.obj} -{$L inftrees.obj} -{$L trees.obj} -{$L uncompr.obj} -{$L zutil.obj} - -procedure adler32; external; -procedure compressBound; external; -procedure crc32; external; -procedure deflateInit2_; external; -procedure deflateParams; external; - -function _malloc(Size: Integer): Pointer; cdecl; -begin - Result := AllocMem(Size); -end; - -procedure _free(Block: Pointer); cdecl; -begin - FreeMem(Block); -end; - -procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; -begin - FillChar(P^, count, B); -end; - -procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; -begin - Move(source^, dest^, count); -end; - - - -// deflate compresses data -function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar; - recsize: Integer): Integer; external; -function deflate(var strm: TZStreamRec; flush: Integer): Integer; external; -function deflateEnd(var strm: TZStreamRec): Integer; external; - -// inflate decompresses data -function inflateInit_(var strm: TZStreamRec; version: PChar; - recsize: Integer): Integer; external; -function inflate(var strm: TZStreamRec; flush: Integer): Integer; external; -function inflateEnd(var strm: TZStreamRec): Integer; external; -function inflateReset(var strm: TZStreamRec): Integer; external; - - -function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl; -begin -// GetMem(Result, Items*Size); - Result := AllocMem(Items * Size); -end; - -procedure zlibFreeMem(AppData, Block: Pointer); cdecl; -begin - FreeMem(Block); -end; - -{function zlibCheck(code: Integer): Integer; -begin - Result := code; - if code < 0 then - raise EZlibError.Create('error'); //!! -end;} - -function CCheck(code: Integer): Integer; -begin - Result := code; - if code < 0 then - raise ECompressionError.Create('error'); //!! -end; - -function DCheck(code: Integer): Integer; -begin - Result := code; - if code < 0 then - raise EDecompressionError.Create('error'); //!! -end; - -procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; - out OutBuf: Pointer; out OutBytes: Integer); -var - strm: TZStreamRec; - P: Pointer; -begin - FillChar(strm, sizeof(strm), 0); - strm.zalloc := zlibAllocMem; - strm.zfree := zlibFreeMem; - OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255; - GetMem(OutBuf, OutBytes); - try - strm.next_in := InBuf; - strm.avail_in := InBytes; - strm.next_out := OutBuf; - strm.avail_out := OutBytes; - CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm))); - try - while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do - begin - P := OutBuf; - Inc(OutBytes, 256); - ReallocMem(OutBuf, OutBytes); - strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); - strm.avail_out := 256; - end; - finally - CCheck(deflateEnd(strm)); - end; - ReallocMem(OutBuf, strm.total_out); - OutBytes := strm.total_out; - except - FreeMem(OutBuf); - raise - end; -end; - - -procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; - OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); -var - strm: TZStreamRec; - P: Pointer; - BufInc: Integer; -begin - FillChar(strm, sizeof(strm), 0); - strm.zalloc := zlibAllocMem; - strm.zfree := zlibFreeMem; - BufInc := (InBytes + 255) and not 255; - if OutEstimate = 0 then - OutBytes := BufInc - else - OutBytes := OutEstimate; - GetMem(OutBuf, OutBytes); - try - strm.next_in := InBuf; - strm.avail_in := InBytes; - strm.next_out := OutBuf; - strm.avail_out := OutBytes; - DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); - try - while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do - begin - P := OutBuf; - Inc(OutBytes, BufInc); - ReallocMem(OutBuf, OutBytes); - strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); - strm.avail_out := BufInc; - end; - finally - DCheck(inflateEnd(strm)); - end; - ReallocMem(OutBuf, strm.total_out); - OutBytes := strm.total_out; - except - FreeMem(OutBuf); - raise - end; -end; - -procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; - const OutBuf: Pointer; BufSize: Integer); -var - strm: TZStreamRec; -begin - FillChar(strm, sizeof(strm), 0); - strm.zalloc := zlibAllocMem; - strm.zfree := zlibFreeMem; - strm.next_in := InBuf; - strm.avail_in := InBytes; - strm.next_out := OutBuf; - strm.avail_out := BufSize; - DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); - try - if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then - raise EZlibError.CreateRes(@sTargetBufferTooSmall); - finally - DCheck(inflateEnd(strm)); - end; -end; - -// TCustomZlibStream - -constructor TCustomZLibStream.Create(Strm: TStream); -begin - inherited Create; - FStrm := Strm; - FStrmPos := Strm.Position; - FZRec.zalloc := zlibAllocMem; - FZRec.zfree := zlibFreeMem; -end; - -procedure TCustomZLibStream.Progress(Sender: TObject); -begin - if Assigned(FOnProgress) then FOnProgress(Sender); -end; - - -// TCompressionStream - -constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel; - Dest: TStream); -const - Levels: array [TCompressionLevel] of ShortInt = - (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION); -begin - inherited Create(Dest); - FZRec.next_out := FBuffer; - FZRec.avail_out := sizeof(FBuffer); - CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec))); -end; - -destructor TCompressionStream.Destroy; -begin - FZRec.next_in := nil; - FZRec.avail_in := 0; - try - if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; - while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END) - and (FZRec.avail_out = 0) do - begin - FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); - FZRec.next_out := FBuffer; - FZRec.avail_out := sizeof(FBuffer); - end; - if FZRec.avail_out < sizeof(FBuffer) then - FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out); - finally - deflateEnd(FZRec); - end; - inherited Destroy; -end; - -function TCompressionStream.Read(var Buffer; Count: Longint): Longint; -begin - raise ECompressionError.CreateRes(@sInvalidStreamOp); -end; - -function TCompressionStream.Write(const Buffer; Count: Longint): Longint; -begin - FZRec.next_in := @Buffer; - FZRec.avail_in := Count; - if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; - while (FZRec.avail_in > 0) do - begin - CCheck(deflate(FZRec, 0)); - if FZRec.avail_out = 0 then - begin - FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); - FZRec.next_out := FBuffer; - FZRec.avail_out := sizeof(FBuffer); - FStrmPos := FStrm.Position; - Progress(Self); - end; - end; - Result := Count; -end; - -function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint; -begin - if (Offset = 0) and (Origin = soFromCurrent) then - Result := FZRec.total_in - else - raise ECompressionError.CreateRes(@sInvalidStreamOp); -end; - -function TCompressionStream.GetCompressionRate: Single; -begin - if FZRec.total_in = 0 then - Result := 0 - else - Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0; -end; - - -// TDecompressionStream - -constructor TDecompressionStream.Create(Source: TStream); -begin - inherited Create(Source); - FZRec.next_in := FBuffer; - FZRec.avail_in := 0; - DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec))); -end; - -destructor TDecompressionStream.Destroy; -begin - FStrm.Seek(-FZRec.avail_in, 1); - inflateEnd(FZRec); - inherited Destroy; -end; - -function TDecompressionStream.Read(var Buffer; Count: Longint): Longint; -begin - FZRec.next_out := @Buffer; - FZRec.avail_out := Count; - if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; - while (FZRec.avail_out > 0) do - begin - if FZRec.avail_in = 0 then - begin - FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer)); - if FZRec.avail_in = 0 then - begin - Result := Count - FZRec.avail_out; - Exit; - end; - FZRec.next_in := FBuffer; - FStrmPos := FStrm.Position; - Progress(Self); - end; - CCheck(inflate(FZRec, 0)); - end; - Result := Count; -end; - -function TDecompressionStream.Write(const Buffer; Count: Longint): Longint; -begin - raise EDecompressionError.CreateRes(@sInvalidStreamOp); -end; - -function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint; -var - I: Integer; - Buf: array [0..4095] of Char; -begin - if (Offset = 0) and (Origin = soFromBeginning) then - begin - DCheck(inflateReset(FZRec)); - FZRec.next_in := FBuffer; - FZRec.avail_in := 0; - FStrm.Position := 0; - FStrmPos := 0; - end - else if ( (Offset >= 0) and (Origin = soFromCurrent)) or - ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then - begin - if Origin = soFromBeginning then Dec(Offset, FZRec.total_out); - if Offset > 0 then - begin - for I := 1 to Offset div sizeof(Buf) do - ReadBuffer(Buf, sizeof(Buf)); - ReadBuffer(Buf, Offset mod sizeof(Buf)); - end; - end - else - raise EDecompressionError.CreateRes(@sInvalidStreamOp); - Result := FZRec.total_out; -end; - - -end. diff --git a/third_party/zlib/contrib/delphi/ZLibConst.pas b/third_party/zlib/contrib/delphi/ZLibConst.pas deleted file mode 100644 index cdfe136..0000000 --- a/third_party/zlib/contrib/delphi/ZLibConst.pas +++ /dev/null @@ -1,11 +0,0 @@ -unit ZLibConst; - -interface - -resourcestring - sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; - sInvalidStreamOp = 'Invalid stream operation'; - -implementation - -end. diff --git a/third_party/zlib/contrib/delphi/readme.txt b/third_party/zlib/contrib/delphi/readme.txt deleted file mode 100644 index 2dc9a8b..0000000 --- a/third_party/zlib/contrib/delphi/readme.txt +++ /dev/null @@ -1,76 +0,0 @@ - -Overview -======== - -This directory contains an update to the ZLib interface unit, -distributed by Borland as a Delphi supplemental component. - -The original ZLib unit is Copyright (c) 1997,99 Borland Corp., -and is based on zlib version 1.0.4. There are a series of bugs -and security problems associated with that old zlib version, and -we recommend the users to update their ZLib unit. - - -Summary of modifications -======================== - -- Improved makefile, adapted to zlib version 1.2.1. - -- Some field types from TZStreamRec are changed from Integer to - Longint, for consistency with the zlib.h header, and for 64-bit - readiness. - -- The zlib_version constant is updated. - -- The new Z_RLE strategy has its corresponding symbolic constant. - -- The allocation and deallocation functions and function types - (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl, - and _malloc and _free are added as C RTL stubs. As a result, - the original C sources of zlib can be compiled out of the box, - and linked to the ZLib unit. - - -Suggestions for improvements -============================ - -Currently, the ZLib unit provides only a limited wrapper around -the zlib library, and much of the original zlib functionality is -missing. Handling compressed file formats like ZIP/GZIP or PNG -cannot be implemented without having this functionality. -Applications that handle these formats are either using their own, -duplicated code, or not using the ZLib unit at all. - -Here are a few suggestions: - -- Checksum class wrappers around adler32() and crc32(), similar - to the Java classes that implement the java.util.zip.Checksum - interface. - -- The ability to read and write raw deflate streams, without the - zlib stream header and trailer. Raw deflate streams are used - in the ZIP file format. - -- The ability to read and write gzip streams, used in the GZIP - file format, and normally produced by the gzip program. - -- The ability to select a different compression strategy, useful - to PNG and MNG image compression, and to multimedia compression - in general. Besides the compression level - - TCompressionLevel = (clNone, clFastest, clDefault, clMax); - - which, in fact, could have used the 'z' prefix and avoided - TColor-like symbols - - TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax); - - there could be a compression strategy - - TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle); - -- ZIP and GZIP stream handling via TStreams. - - --- -Cosmin Truta diff --git a/third_party/zlib/contrib/delphi/zlibd32.mak b/third_party/zlib/contrib/delphi/zlibd32.mak deleted file mode 100644 index 9bb00b7..0000000 --- a/third_party/zlib/contrib/delphi/zlibd32.mak +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for zlib -# For use with Delphi and C++ Builder under Win32 -# Updated for zlib 1.2.x by Cosmin Truta - -# ------------ Borland C++ ------------ - -# This project uses the Delphi (fastcall/register) calling convention: -LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl - -CC = bcc32 -LD = bcc32 -AR = tlib -# do not use "-pr" in CFLAGS -CFLAGS = -a -d -k- -O2 $(LOC) -LDFLAGS = - - -# variables -ZLIB_LIB = zlib.lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# For the sake of the old Borland make, -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - - -# cleanup -clean: - -del *.obj - -del *.exe - -del *.lib - -del *.tds - -del zlib.bak - -del foo.gz - diff --git a/third_party/zlib/contrib/dotzlib/DotZLib.build b/third_party/zlib/contrib/dotzlib/DotZLib.build deleted file mode 100644 index e69630c..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib.build +++ /dev/null @@ -1,33 +0,0 @@ - - - A .Net wrapper library around ZLib1.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/dotzlib/DotZLib.chm b/third_party/zlib/contrib/dotzlib/DotZLib.chm deleted file mode 100644 index f214a444aebb20950fb3e8499b36731e1f12be95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72726 zcmeGEby!tR_Xmt0Lb^-3ySqWUyF;2oNq0+kgMffYgLESxDJ4jYNJ^JTHv%sx-r#-v z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` z_vI;+ee#sbzjsO{XNCVP63@R0M{AN*B1!j6<8|Uzf0q|x!(?qL{96fb{H6)nM=&*# zxeV=O!nTxat;`55-*4?m4MO^IWdt#`lbc#q*aMrHo-$IfN(iOzxBg4;Es!>;Hz(}aMo(4Tf$+YT zJvtK!%Nm1>MUszE<5u-yYde@0#!;MXp&PSyO(`-z(EepIslC+C-k*ejmu8Qggj1^m z^UG>pn+eNRmGHl`5_*sNY6MXA%hhxkc0UzMzeo2@z|_wYrK*|eDhW;#S}TX5hAgfA z|3?>Q|BEVK38;56w5J&`77}efDdOk27!QVhXxtfXVN(z3zNqM1ZH>DnVZYtq_VwAnCzxp5oAuQ7pEwu3w(2MwDT<#o)r(!+47=1gcbr-*x*6MX3 z-Jr*WBlkWJTEp5wPJrGB-=c46F9eHTM*0odz4v)BE_a44TLrIvgM@dDQ-pX#$)J~s z{8K7=5ke!oYA$NjyQMLWx@s@>on)SMHGAD_wxbXK$XK(AX7>MNg0fC%b^Vw*pe7N( z&4?K7cai. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/third_party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs deleted file mode 100644 index 9b6c390..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ /dev/null @@ -1,202 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - #region ChecksumGeneratorBase - ///

- /// Implements the common functionality needed for all s - /// - /// - public abstract class ChecksumGeneratorBase : ChecksumGenerator - { - /// - /// The value of the current checksum - /// - protected uint _current; - - /// - /// Initializes a new instance of the checksum generator base - the current checksum is - /// set to zero - /// - public ChecksumGeneratorBase() - { - _current = 0; - } - - /// - /// Initializes a new instance of the checksum generator base with a specified value - /// - /// The value to set the current checksum to - public ChecksumGeneratorBase(uint initialValue) - { - _current = initialValue; - } - - /// - /// Resets the current checksum to zero - /// - public void Reset() { _current = 0; } - - /// - /// Gets the current checksum value - /// - public uint Value { get { return _current; } } - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - /// All the other Update methods are implemented in terms of this one. - /// This is therefore the only method a derived class has to implement - public abstract void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with an array of bytes. - /// - /// The data to update the checksum with - public void Update(byte[] data) - { - Update(data, 0, data.Length); - } - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - public void Update(string data) - { - Update(Encoding.UTF8.GetBytes(data)); - } - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - public void Update(string data, Encoding encoding) - { - Update(encoding.GetBytes(data)); - } - - } - #endregion - - #region CRC32 - /// - /// Implements a CRC32 checksum generator - /// - public sealed class CRC32Checksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint crc32(uint crc, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the CRC32 checksum generator - /// - public CRC32Checksum() : base() {} - - /// - /// Initializes a new instance of the CRC32 checksum generator with a specified value - /// - /// The value to set the current checksum to - public CRC32Checksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - - #region Adler - /// - /// Implements a checksum generator that computes the Adler checksum on data - /// - public sealed class AdlerChecksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint adler32(uint adler, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the Adler checksum generator - /// - public AdlerChecksum() : base() {} - - /// - /// Initializes a new instance of the Adler checksum generator with a specified value - /// - /// The value to set the current checksum to - public AdlerChecksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - -} \ No newline at end of file diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/third_party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs deleted file mode 100644 index 9c8d601..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; - -namespace DotZLib -{ - - /// - /// This class implements a circular buffer - /// - internal class CircularBuffer - { - #region Private data - private int _capacity; - private int _head; - private int _tail; - private int _size; - private byte[] _buffer; - #endregion - - public CircularBuffer(int capacity) - { - Debug.Assert( capacity > 0 ); - _buffer = new byte[capacity]; - _capacity = capacity; - _head = 0; - _tail = 0; - _size = 0; - } - - public int Size { get { return _size; } } - - public int Put(byte[] source, int offset, int count) - { - Debug.Assert( count > 0 ); - int trueCount = Math.Min(count, _capacity - Size); - for (int i = 0; i < trueCount; ++i) - _buffer[(_tail+i) % _capacity] = source[offset+i]; - _tail += trueCount; - _tail %= _capacity; - _size += trueCount; - return trueCount; - } - - public bool Put(byte b) - { - if (Size == _capacity) // no room - return false; - _buffer[_tail++] = b; - _tail %= _capacity; - ++_size; - return true; - } - - public int Get(byte[] destination, int offset, int count) - { - int trueCount = Math.Min(count,Size); - for (int i = 0; i < trueCount; ++i) - destination[offset + i] = _buffer[(_head+i) % _capacity]; - _head += trueCount; - _head %= _capacity; - _size -= trueCount; - return trueCount; - } - - public int Get() - { - if (Size == 0) - return -1; - - int result = (int)_buffer[_head++ % _capacity]; - --_size; - return result; - } - - } -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/third_party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs deleted file mode 100644 index dcad290..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +++ /dev/null @@ -1,198 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements the common functionality needed for all s - /// - public abstract class CodecBase : Codec, IDisposable - { - - #region Data members - - /// - /// Instance of the internal zlib buffer structure that is - /// passed to all functions in the zlib dll - /// - internal ZStream _ztream = new ZStream(); - - /// - /// True if the object instance has been disposed, false otherwise - /// - protected bool _isDisposed = false; - - /// - /// The size of the internal buffers - /// - protected const int kBufferSize = 16384; - - private byte[] _outBuffer = new byte[kBufferSize]; - private byte[] _inBuffer = new byte[kBufferSize]; - - private GCHandle _hInput; - private GCHandle _hOutput; - - private uint _checksum = 0; - - #endregion - - /// - /// Initializes a new instance of the CodeBase class. - /// - public CodecBase() - { - try - { - _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); - _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); - } - catch (Exception) - { - CleanUp(false); - throw; - } - } - - - #region Codec Members - - /// - /// Occurs when more processed data are available. - /// - public event DataAvailableHandler DataAvailable; - - /// - /// Fires the event - /// - protected void OnDataAvailable() - { - if (_ztream.total_out > 0) - { - if (DataAvailable != null) - DataAvailable( _outBuffer, 0, (int)_ztream.total_out); - resetOutput(); - } - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - public void Add(byte[] data) - { - Add(data,0,data.Length); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - /// This must be implemented by a derived class - public abstract void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - /// This must be implemented by a derived class - public abstract void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - public uint Checksum { get { return _checksum; } } - - #endregion - - #region Destructor & IDisposable stuff - - /// - /// Destroys this instance - /// - ~CodecBase() - { - CleanUp(false); - } - - /// - /// Releases any unmanaged resources and calls the method of the derived class - /// - public void Dispose() - { - CleanUp(true); - } - - /// - /// Performs any codec specific cleanup - /// - /// This must be implemented by a derived class - protected abstract void CleanUp(); - - // performs the release of the handles and calls the derived CleanUp() - private void CleanUp(bool isDisposing) - { - if (!_isDisposed) - { - CleanUp(); - if (_hInput.IsAllocated) - _hInput.Free(); - if (_hOutput.IsAllocated) - _hOutput.Free(); - - _isDisposed = true; - } - } - - - #endregion - - #region Helper methods - - /// - /// Copies a number of bytes to the internal codec buffer - ready for processing - /// - /// The byte array that contains the data to copy - /// The index of the first byte to copy - /// The number of bytes to copy from data - protected void copyInput(byte[] data, int startIndex, int count) - { - Array.Copy(data, startIndex, _inBuffer,0, count); - _ztream.next_in = _hInput.AddrOfPinnedObject(); - _ztream.total_in = 0; - _ztream.avail_in = (uint)count; - - } - - /// - /// Resets the internal output buffers to a known state - ready for processing - /// - protected void resetOutput() - { - _ztream.total_out = 0; - _ztream.avail_out = kBufferSize; - _ztream.next_out = _hOutput.AddrOfPinnedObject(); - } - - /// - /// Updates the running checksum property - /// - /// The new checksum value - protected void setChecksum(uint newSum) - { - _checksum = newSum; - } - #endregion - - } -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/third_party/zlib/contrib/dotzlib/DotZLib/Deflater.cs deleted file mode 100644 index 9039f41..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/Deflater.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data compressor, using the deflate algorithm in the ZLib dll - /// - public sealed class Deflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Deflater - /// - /// The compression level to use for this Deflater - public Deflater(CompressLevel level) : base() - { - int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize deflater"); - - resetOutput(); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - while (err >= 0 && _ztream.avail_in > 0) - { - err = deflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = deflate(ref _ztream, (int)FlushTypes.None); - } - inputIndex += (int)_ztream.total_in; - } - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = deflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - deflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib deflate stream - /// - protected override void CleanUp() { deflateEnd(ref _ztream); } - - } -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs deleted file mode 100644 index 90c7c3b..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - - #region Internal types - - /// - /// Defines constants for the various flush types used with zlib - /// - internal enum FlushTypes - { - None, Partial, Sync, Full, Finish, Block - } - - #region ZStream structure - // internal mapping of the zlib zstream structure for marshalling - [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] - internal struct ZStream - { - public IntPtr next_in; - public uint avail_in; - public uint total_in; - - public IntPtr next_out; - public uint avail_out; - public uint total_out; - - [MarshalAs(UnmanagedType.LPStr)] - string msg; - uint state; - - uint zalloc; - uint zfree; - uint opaque; - - int data_type; - public uint adler; - uint reserved; - } - - #endregion - - #endregion - - #region Public enums - /// - /// Defines constants for the available compression levels in zlib - /// - public enum CompressLevel : int - { - /// - /// The default compression level with a reasonable compromise between compression and speed - /// - Default = -1, - /// - /// No compression at all. The data are passed straight through. - /// - None = 0, - /// - /// The maximum compression rate available. - /// - Best = 9, - /// - /// The fastest available compression level. - /// - Fastest = 1 - } - #endregion - - #region Exception classes - /// - /// The exception that is thrown when an error occurs on the zlib dll - /// - public class ZLibException : ApplicationException - { - /// - /// Initializes a new instance of the class with a specified - /// error message and error code - /// - /// The zlib error code that caused the exception - /// A message that (hopefully) describes the error - public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) - { - } - - /// - /// Initializes a new instance of the class with a specified - /// error code - /// - /// The zlib error code that caused the exception - public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) - { - } - } - #endregion - - #region Interfaces - - /// - /// Declares methods and properties that enables a running checksum to be calculated - /// - public interface ChecksumGenerator - { - /// - /// Gets the current value of the checksum - /// - uint Value { get; } - - /// - /// Clears the current checksum to 0 - /// - void Reset(); - - /// - /// Updates the current checksum with an array of bytes - /// - /// The data to update the checksum with - void Update(byte[] data); - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - void Update(string data); - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - void Update(string data, Encoding encoding); - } - - - /// - /// Represents the method that will be called from a codec when new data - /// are available. - /// - /// The byte array containing the processed data - /// The index of the first processed byte in data - /// The number of processed bytes available - /// On return from this method, the data may be overwritten, so grab it while you can. - /// You cannot assume that startIndex will be zero. - /// - public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); - - /// - /// Declares methods and events for implementing compressors/decompressors - /// - public interface Codec - { - /// - /// Occurs when more processed data are available. - /// - event DataAvailableHandler DataAvailable; - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data); - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - uint Checksum { get; } - - - } - - #endregion - - #region Classes - /// - /// Encapsulates general information about the ZLib library - /// - public class Info - { - #region DLL imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint zlibCompileFlags(); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern string zlibVersion(); - #endregion - - #region Private stuff - private uint _flags; - - // helper function that unpacks a bitsize mask - private static int bitSize(uint bits) - { - switch (bits) - { - case 0: return 16; - case 1: return 32; - case 2: return 64; - } - return -1; - } - #endregion - - /// - /// Constructs an instance of the Info class. - /// - public Info() - { - _flags = zlibCompileFlags(); - } - - /// - /// True if the library is compiled with debug info - /// - public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } - - /// - /// True if the library is compiled with assembly optimizations - /// - public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } - - /// - /// Gets the size of the unsigned int that was compiled into Zlib - /// - public int SizeOfUInt { get { return bitSize(_flags & 3); } } - - /// - /// Gets the size of the unsigned long that was compiled into Zlib - /// - public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } - - /// - /// Gets the size of the pointers that were compiled into Zlib - /// - public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } - - /// - /// Gets the size of the z_off_t type that was compiled into Zlib - /// - public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } - - /// - /// Gets the version of ZLib as a string, e.g. "1.2.1" - /// - public static string Version { get { return zlibVersion(); } } - } - - #endregion - -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj b/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj deleted file mode 100644 index dea7fb1..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/third_party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs deleted file mode 100644 index c1472f6..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +++ /dev/null @@ -1,301 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements a compressed , in GZip (.gz) format. - /// - public class GZipStream : Stream, IDisposable - { - #region Dll Imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern IntPtr gzopen(string name, string mode); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzclose(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzwrite(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzread(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzgetc(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzputc(IntPtr gzFile, int c); - - #endregion - - #region Private data - private IntPtr _gzFile; - private bool _isDisposed = false; - private bool _isWriting; - #endregion - - #region Constructors - /// - /// Creates a new file as a writeable GZipStream - /// - /// The name of the compressed file to create - /// The compression level to use when adding data - /// If an error occurred in the internal zlib function - public GZipStream(string fileName, CompressLevel level) - { - _isWriting = true; - _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - } - - /// - /// Opens an existing file as a readable GZipStream - /// - /// The name of the file to open - /// If an error occurred in the internal zlib function - public GZipStream(string fileName) - { - _isWriting = false; - _gzFile = gzopen(fileName, "rb"); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - - } - #endregion - - #region Access properties - /// - /// Returns true of this stream can be read from, false otherwise - /// - public override bool CanRead - { - get - { - return !_isWriting; - } - } - - - /// - /// Returns false. - /// - public override bool CanSeek - { - get - { - return false; - } - } - - /// - /// Returns true if this tsream is writeable, false otherwise - /// - public override bool CanWrite - { - get - { - return _isWriting; - } - } - #endregion - - #region Destructor & IDispose stuff - - /// - /// Destroys this instance - /// - ~GZipStream() - { - cleanUp(false); - } - - /// - /// Closes the external file handle - /// - public void Dispose() - { - cleanUp(true); - } - - // Does the actual closing of the file handle. - private void cleanUp(bool isDisposing) - { - if (!_isDisposed) - { - gzclose(_gzFile); - _isDisposed = true; - } - } - #endregion - - #region Basic reading and writing - /// - /// Attempts to read a number of bytes from the stream. - /// - /// The destination data buffer - /// The index of the first destination byte in buffer - /// The number of bytes requested - /// The number of bytes read - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not readable. - /// If this stream has been disposed. - public override int Read(byte[] buffer, int offset, int count) - { - if (!CanRead) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - int result; - try - { - result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - return result; - } - - /// - /// Attempts to read a single byte from the stream. - /// - /// The byte that was read, or -1 in case of error or End-Of-File - public override int ReadByte() - { - if (!CanRead) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - return gzgetc(_gzFile); - } - - /// - /// Writes a number of bytes to the stream - /// - /// - /// - /// - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void Write(byte[] buffer, int offset, int count) - { - if (!CanWrite) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - try - { - int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - } - - /// - /// Writes a single byte to the stream - /// - /// The byte to add to the stream. - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void WriteByte(byte value) - { - if (!CanWrite) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - int result = gzputc(_gzFile, (int)value); - if (result < 0) - throw new IOException(); - } - #endregion - - #region Position & length stuff - /// - /// Not supported. - /// - /// - /// Always thrown - public override void SetLength(long value) - { - throw new NotSupportedException(); - } - - /// - /// Not supported. - /// - /// - /// - /// - /// Always thrown - public override long Seek(long offset, SeekOrigin origin) - { - throw new NotSupportedException(); - } - - /// - /// Flushes the GZipStream. - /// - /// In this implementation, this method does nothing. This is because excessive - /// flushing may degrade the achievable compression rates. - public override void Flush() - { - // left empty on purpose - } - - /// - /// Gets/sets the current position in the GZipStream. Not supported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Position - { - get - { - throw new NotSupportedException(); - } - set - { - throw new NotSupportedException(); - } - } - - /// - /// Gets the size of the stream. Not supported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Length - { - get - { - throw new NotSupportedException(); - } - } - #endregion - } -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/third_party/zlib/contrib/dotzlib/DotZLib/Inflater.cs deleted file mode 100644 index d295f26..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/Inflater.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data decompressor, using the inflate algorithm in the ZLib dll - /// - public class Inflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int inflateInit_(ref ZStream sz, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Inflater - /// - public Inflater() : base() - { - int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize inflater"); - - resetOutput(); - } - - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - err = inflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = inflate(ref _ztream, (int)FlushTypes.None); - } - - inputIndex += (int)_ztream.total_in; - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = inflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - inflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib inflate stream - /// - protected override void CleanUp() { inflateEnd(ref _ztream); } - - - } -} diff --git a/third_party/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/third_party/zlib/contrib/dotzlib/DotZLib/UnitTests.cs deleted file mode 100644 index d81554b..0000000 --- a/third_party/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ /dev/null @@ -1,274 +0,0 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Collections; -using System.IO; - -// uncomment the define below to include unit tests -//#define nunit -#if nunit -using NUnit.Framework; - -// Unit tests for the DotZLib class library -// ---------------------------------------- -// -// Use this with NUnit 2 from http://www.nunit.org -// - -namespace DotZLibTests -{ - using DotZLib; - - // helper methods - internal class Utils - { - public static bool byteArrEqual( byte[] lhs, byte[] rhs ) - { - if (lhs.Length != rhs.Length) - return false; - for (int i = lhs.Length-1; i >= 0; --i) - if (lhs[i] != rhs[i]) - return false; - return true; - } - - } - - - [TestFixture] - public class CircBufferTests - { - #region Circular buffer tests - [Test] - public void SinglePutGet() - { - CircularBuffer buf = new CircularBuffer(10); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - - Assert.IsTrue(buf.Put( 1 )); - Assert.AreEqual( 1, buf.Size ); - Assert.AreEqual( 1, buf.Get() ); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - } - - [Test] - public void BlockPutGet() - { - CircularBuffer buf = new CircularBuffer(10); - byte[] arr = {1,2,3,4,5,6,7,8,9,10}; - Assert.AreEqual( 10, buf.Put(arr,0,10) ); - Assert.AreEqual( 10, buf.Size ); - Assert.IsFalse( buf.Put(11) ); - Assert.AreEqual( 1, buf.Get() ); - Assert.IsTrue( buf.Put(11) ); - - byte[] arr2 = (byte[])arr.Clone(); - Assert.AreEqual( 9, buf.Get(arr2,1,9) ); - Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); - } - - #endregion - } - - [TestFixture] - public class ChecksumTests - { - #region CRC32 Tests - [Test] - public void CRC32_Null() - { - CRC32Checksum crc32 = new CRC32Checksum(); - Assert.AreEqual( 0, crc32.Value ); - - crc32 = new CRC32Checksum(1); - Assert.AreEqual( 1, crc32.Value ); - - crc32 = new CRC32Checksum(556); - Assert.AreEqual( 556, crc32.Value ); - } - - [Test] - public void CRC32_Data() - { - CRC32Checksum crc32 = new CRC32Checksum(); - byte[] data = { 1,2,3,4,5,6,7 }; - crc32.Update(data); - Assert.AreEqual( 0x70e46888, crc32.Value ); - - crc32 = new CRC32Checksum(); - crc32.Update("penguin"); - Assert.AreEqual( 0x0e5c1a120, crc32.Value ); - - crc32 = new CRC32Checksum(1); - crc32.Update("penguin"); - Assert.AreEqual(0x43b6aa94, crc32.Value); - - } - #endregion - - #region Adler tests - - [Test] - public void Adler_Null() - { - AdlerChecksum adler = new AdlerChecksum(); - Assert.AreEqual(0, adler.Value); - - adler = new AdlerChecksum(1); - Assert.AreEqual( 1, adler.Value ); - - adler = new AdlerChecksum(556); - Assert.AreEqual( 556, adler.Value ); - } - - [Test] - public void Adler_Data() - { - AdlerChecksum adler = new AdlerChecksum(1); - byte[] data = { 1,2,3,4,5,6,7 }; - adler.Update(data); - Assert.AreEqual( 0x5b001d, adler.Value ); - - adler = new AdlerChecksum(); - adler.Update("penguin"); - Assert.AreEqual(0x0bcf02f6, adler.Value ); - - adler = new AdlerChecksum(1); - adler.Update("penguin"); - Assert.AreEqual(0x0bd602f7, adler.Value); - - } - #endregion - } - - [TestFixture] - public class InfoTests - { - #region Info tests - [Test] - public void Info_Version() - { - Info info = new Info(); - Assert.AreEqual("1.3.1", Info.Version); - Assert.AreEqual(32, info.SizeOfUInt); - Assert.AreEqual(32, info.SizeOfULong); - Assert.AreEqual(32, info.SizeOfPointer); - Assert.AreEqual(32, info.SizeOfOffset); - } - #endregion - } - - [TestFixture] - public class DeflateInflateTests - { - #region Deflate tests - [Test] - public void Deflate_Init() - { - using (Deflater def = new Deflater(CompressLevel.Default)) - { - } - } - - private ArrayList compressedData = new ArrayList(); - private uint adler1; - - private ArrayList uncompressedData = new ArrayList(); - private uint adler2; - - public void CDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - compressedData.Add(data[i+startIndex]); - } - - [Test] - public void Deflate_Compress() - { - compressedData.Clear(); - - byte[] testData = new byte[35000]; - for (int i = 0; i < testData.Length; ++i) - testData[i] = 5; - - using (Deflater def = new Deflater((CompressLevel)5)) - { - def.DataAvailable += new DataAvailableHandler(CDataAvail); - def.Add(testData); - def.Finish(); - adler1 = def.Checksum; - } - } - #endregion - - #region Inflate tests - [Test] - public void Inflate_Init() - { - using (Inflater inf = new Inflater()) - { - } - } - - private void DDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - uncompressedData.Add(data[i+startIndex]); - } - - [Test] - public void Inflate_Expand() - { - uncompressedData.Clear(); - - using (Inflater inf = new Inflater()) - { - inf.DataAvailable += new DataAvailableHandler(DDataAvail); - inf.Add((byte[])compressedData.ToArray(typeof(byte))); - inf.Finish(); - adler2 = inf.Checksum; - } - Assert.AreEqual( adler1, adler2 ); - } - #endregion - } - - [TestFixture] - public class GZipStreamTests - { - #region GZipStream test - [Test] - public void GZipStream_WriteRead() - { - using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) - { - BinaryWriter writer = new BinaryWriter(gzOut); - writer.Write("hi there"); - writer.Write(Math.PI); - writer.Write(42); - } - - using (GZipStream gzIn = new GZipStream("gzstream.gz")) - { - BinaryReader reader = new BinaryReader(gzIn); - string s = reader.ReadString(); - Assert.AreEqual("hi there",s); - double d = reader.ReadDouble(); - Assert.AreEqual(Math.PI, d); - int i = reader.ReadInt32(); - Assert.AreEqual(42,i); - } - - } - #endregion - } -} - -#endif diff --git a/third_party/zlib/contrib/dotzlib/LICENSE_1_0.txt b/third_party/zlib/contrib/dotzlib/LICENSE_1_0.txt deleted file mode 100644 index 127a5bc..0000000 --- a/third_party/zlib/contrib/dotzlib/LICENSE_1_0.txt +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/third_party/zlib/contrib/dotzlib/readme.txt b/third_party/zlib/contrib/dotzlib/readme.txt deleted file mode 100644 index 9675f41..0000000 --- a/third_party/zlib/contrib/dotzlib/readme.txt +++ /dev/null @@ -1,58 +0,0 @@ -This directory contains a .Net wrapper class library for the ZLib1.dll - -The wrapper includes support for inflating/deflating memory buffers, -.Net streaming wrappers for the gz streams part of zlib, and wrappers -for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. - -Directory structure: --------------------- - -LICENSE_1_0.txt - License file. -readme.txt - This file. -DotZLib.chm - Class library documentation -DotZLib.build - NAnt build file -DotZLib.sln - Microsoft Visual Studio 2003 solution file - -DotZLib\*.cs - Source files for the class library - -Unit tests: ------------ -The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. -To include unit tests in the build, define nunit before building. - - -Build instructions: -------------------- - -1. Using Visual Studio.Net 2003: - Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) - will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on - you are building the release or debug version of the library. Check - DotZLib/UnitTests.cs for instructions on how to include unit tests in the - build. - -2. Using NAnt: - Open a command prompt with access to the build environment and run nant - in the same directory as the DotZLib.build file. - You can define 2 properties on the nant command-line to control the build: - debug={true|false} to toggle between release/debug builds (default=true). - nunit={true|false} to include or exclude unit tests (default=true). - Also the target clean will remove binaries. - Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release - or ./DotZLib/bin/debug, depending on whether you are building the release - or debug version of the library. - - Examples: - nant -D:debug=false -D:nunit=false - will build a release mode version of the library without unit tests. - nant - will build a debug version of the library with unit tests - nant clean - will remove all previously built files. - - ---------------------------------- -Copyright (c) Henrik Ravn 2004 - -Use, modification and distribution are subject to the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/third_party/zlib/contrib/gcc_gvmat64/gvmat64.S b/third_party/zlib/contrib/gcc_gvmat64/gvmat64.S deleted file mode 100644 index 23309fa..0000000 --- a/third_party/zlib/contrib/gcc_gvmat64/gvmat64.S +++ /dev/null @@ -1,574 +0,0 @@ -/* -;uInt longest_match_x64( -; deflate_state *s, -; IPos cur_match); // current match - -; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64 -; (AMD64 on Athlon 64, Opteron, Phenom -; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) -; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode) -; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. -; -; File written by Gilles Vollant, by converting to assembly the longest_match -; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. -; and by taking inspiration on asm686 with masm, optimised assembly code -; from Brian Raiter, written 1998 -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it -; freely, subject to the following restrictions: -; -; 1. The origin of this software must not be misrepresented; you must not -; claim that you wrote the original software. If you use this software -; in a product, an acknowledgment in the product documentation would be -; appreciated but is not required. -; 2. Altered source versions must be plainly marked as such, and must not be -; misrepresented as being the original software -; 3. This notice may not be removed or altered from any source distribution. -; -; http://www.zlib.net -; http://www.winimage.com/zLibDll -; http://www.muppetlabs.com/~breadbox/software/assembly.html -; -; to compile this file for zLib, I use option: -; gcc -c -arch x86_64 gvmat64.S - - -;uInt longest_match(s, cur_match) -; deflate_state *s; -; IPos cur_match; // current match / -; -; with XCode for Mac, I had strange error with some jump on intel syntax -; this is why BEFORE_JMP and AFTER_JMP are used - */ - - -#define BEFORE_JMP .att_syntax -#define AFTER_JMP .intel_syntax noprefix - -#ifndef NO_UNDERLINE -# define match_init _match_init -# define longest_match _longest_match -#endif - -.intel_syntax noprefix - -.globl match_init, longest_match -.text -longest_match: - - - -#define LocalVarsSize 96 -/* -; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 -; free register : r14,r15 -; register can be saved : rsp -*/ - -#define chainlenwmask (rsp + 8 - LocalVarsSize) -#define nicematch (rsp + 16 - LocalVarsSize) - -#define save_rdi (rsp + 24 - LocalVarsSize) -#define save_rsi (rsp + 32 - LocalVarsSize) -#define save_rbx (rsp + 40 - LocalVarsSize) -#define save_rbp (rsp + 48 - LocalVarsSize) -#define save_r12 (rsp + 56 - LocalVarsSize) -#define save_r13 (rsp + 64 - LocalVarsSize) -#define save_r14 (rsp + 72 - LocalVarsSize) -#define save_r15 (rsp + 80 - LocalVarsSize) - - -/* -; all the +4 offsets are due to the addition of pending_buf_size (in zlib -; in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, remove the +4). -; Note : these value are good with a 8 bytes boundary pack structure -*/ - -#define MAX_MATCH 258 -#define MIN_MATCH 3 -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) - -/* -;;; Offsets for fields in the deflate_state structure. These numbers -;;; are calculated from the definition of deflate_state, with the -;;; assumption that the compiler will dword-align the fields. (Thus, -;;; changing the definition of deflate_state could easily cause this -;;; program to crash horribly, without so much as a warning at -;;; compile time. Sigh.) - -; all the +zlib1222add offsets are due to the addition of fields -; in zlib in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). -; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). -; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). -*/ - - - -/* you can check the structure offset by running - -#include -#include -#include "deflate.h" - -void print_depl() -{ -deflate_state ds; -deflate_state *s=&ds; -printf("size pointer=%u\n",(int)sizeof(void*)); - -printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s))); -printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s))); -printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s))); -printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s))); -printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s))); -printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s))); -printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s))); -printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s))); -printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s))); -printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s))); -printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); -printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s))); -printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s))); -} -*/ - -#define dsWSize 68 -#define dsWMask 76 -#define dsWindow 80 -#define dsPrev 96 -#define dsMatchLen 144 -#define dsPrevMatch 148 -#define dsStrStart 156 -#define dsMatchStart 160 -#define dsLookahead 164 -#define dsPrevLen 168 -#define dsMaxChainLen 172 -#define dsGoodMatch 188 -#define dsNiceMatch 192 - -#define window_size [ rcx + dsWSize] -#define WMask [ rcx + dsWMask] -#define window_ad [ rcx + dsWindow] -#define prev_ad [ rcx + dsPrev] -#define strstart [ rcx + dsStrStart] -#define match_start [ rcx + dsMatchStart] -#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip -#define prev_length [ rcx + dsPrevLen] -#define max_chain_length [ rcx + dsMaxChainLen] -#define good_match [ rcx + dsGoodMatch] -#define nice_match [ rcx + dsNiceMatch] - -/* -; windows: -; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match) - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. - -; -; gcc on macosx-linux: -; see http://www.x86-64.org/documentation/abi-0.99.pdf -; param 1 in rdi, param 2 in rsi -; rbx, rsp, rbp, r12 to r15 must be preserved - -;;; Save registers that the compiler may be using, and adjust esp to -;;; make room for our stack frame. - - -;;; Retrieve the function arguments. r8d will hold cur_match -;;; throughout the entire function. edx will hold the pointer to the -;;; deflate_state structure during the function's setup (before -;;; entering the main loop. - -; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) -; mac: param 1 in rdi, param 2 rsi -; this clear high 32 bits of r8, which can be garbage in both r8 and rdx -*/ - mov [save_rbx],rbx - mov [save_rbp],rbp - - - mov rcx,rdi - - mov r8d,esi - - - mov [save_r12],r12 - mov [save_r13],r13 - mov [save_r14],r14 - mov [save_r15],r15 - - -//;;; uInt wmask = s->w_mask; -//;;; unsigned chain_length = s->max_chain_length; -//;;; if (s->prev_length >= s->good_match) { -//;;; chain_length >>= 2; -//;;; } - - - mov edi, prev_length - mov esi, good_match - mov eax, WMask - mov ebx, max_chain_length - cmp edi, esi - jl LastMatchGood - shr ebx, 2 -LastMatchGood: - -//;;; chainlen is decremented once beforehand so that the function can -//;;; use the sign flag instead of the zero flag for the exit test. -//;;; It is then shifted into the high word, to make room for the wmask -//;;; value, which it will always accompany. - - dec ebx - shl ebx, 16 - or ebx, eax - -//;;; on zlib only -//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - - - - mov eax, nice_match - mov [chainlenwmask], ebx - mov r10d, Lookahead - cmp r10d, eax - cmovnl r10d, eax - mov [nicematch],r10d - - - -//;;; register Bytef *scan = s->window + s->strstart; - mov r10, window_ad - mov ebp, strstart - lea r13, [r10 + rbp] - -//;;; Determine how many bytes the scan ptr is off from being -//;;; dword-aligned. - - mov r9,r13 - neg r13 - and r13,3 - -//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? -//;;; s->strstart - (IPos)MAX_DIST(s) : NIL; - - - mov eax, window_size - sub eax, MIN_LOOKAHEAD - - - xor edi,edi - sub ebp, eax - - mov r11d, prev_length - - cmovng ebp,edi - -//;;; int best_len = s->prev_length; - - -//;;; Store the sum of s->window + best_len in esi locally, and in esi. - - lea rsi,[r10+r11] - -//;;; register ush scan_start = *(ushf*)scan; -//;;; register ush scan_end = *(ushf*)(scan+best_len-1); -//;;; Posf *prev = s->prev; - - movzx r12d,word ptr [r9] - movzx ebx, word ptr [r9 + r11 - 1] - - mov rdi, prev_ad - -//;;; Jump into the main loop. - - mov edx, [chainlenwmask] - - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - - - -LookupLoop1: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - - - - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry1: - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jz LookupLoopIsZero - AFTER_JMP - -LookupLoop2: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry2: - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jz LookupLoopIsZero - AFTER_JMP - -LookupLoop4: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry4: - - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jnz LookupLoop1 - jmp LookupLoopIsZero - AFTER_JMP -/* -;;; do { -;;; match = s->window + cur_match; -;;; if (*(ushf*)(match+best_len-1) != scan_end || -;;; *(ushf*)match != scan_start) continue; -;;; [...] -;;; } while ((cur_match = prev[cur_match & wmask]) > limit -;;; && --chain_length != 0); -;;; -;;; Here is the inner loop of the function. The function will spend the -;;; majority of its time in this loop, and majority of that time will -;;; be spent in the first ten instructions. -;;; -;;; Within this loop: -;;; ebx = scanend -;;; r8d = curmatch -;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) -;;; esi = windowbestlen - i.e., (window + bestlen) -;;; edi = prev -;;; ebp = limit -*/ -.balign 16 -LookupLoop: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry: - - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jnz LookupLoop1 - AFTER_JMP -LookupLoopIsZero: - cmp r12w, word ptr [r10 + r8] - BEFORE_JMP - jnz LookupLoop1 - AFTER_JMP - - -//;;; Store the current value of chainlen. - mov [chainlenwmask], edx -/* -;;; Point edi to the string under scrutiny, and esi to the string we -;;; are hoping to match it up with. In actuality, esi and edi are -;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is -;;; initialized to -(MAX_MATCH_8 - scanalign). -*/ - lea rsi,[r8+r10] - mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8) - lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8] - lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8] - - prefetcht1 [rsi+rdx] - prefetcht1 [rdi+rdx] - -/* -;;; Test the strings for equality, 8 bytes at a time. At the end, -;;; adjust rdx so that it is offset to the exact byte that mismatched. -;;; -;;; We already know at this point that the first three bytes of the -;;; strings match each other, and they can be safely passed over before -;;; starting the compare loop. So what this code does is skip over 0-3 -;;; bytes, as much as necessary in order to dword-align the edi -;;; pointer. (rsi will still be misaligned three times out of four.) -;;; -;;; It should be confessed that this loop usually does not represent -;;; much of the total running time. Replacing it with a more -;;; straightforward "rep cmpsb" would not drastically degrade -;;; performance. -*/ - -LoopCmps: - mov rax, [rsi + rdx] - xor rax, [rdi + rdx] - jnz LeaveLoopCmps - - mov rax, [rsi + rdx + 8] - xor rax, [rdi + rdx + 8] - jnz LeaveLoopCmps8 - - - mov rax, [rsi + rdx + 8+8] - xor rax, [rdi + rdx + 8+8] - jnz LeaveLoopCmps16 - - add rdx,8+8+8 - - BEFORE_JMP - jnz LoopCmps - jmp LenMaximum - AFTER_JMP - -LeaveLoopCmps16: add rdx,8 -LeaveLoopCmps8: add rdx,8 -LeaveLoopCmps: - - test eax, 0x0000FFFF - jnz LenLower - - test eax,0xffffffff - - jnz LenLower32 - - add rdx,4 - shr rax,32 - or ax,ax - BEFORE_JMP - jnz LenLower - AFTER_JMP - -LenLower32: - shr eax,16 - add rdx,2 - -LenLower: - sub al, 1 - adc rdx, 0 -//;;; Calculate the length of the match. If it is longer than MAX_MATCH, -//;;; then automatically accept it as the best possible match and leave. - - lea rax, [rdi + rdx] - sub rax, r9 - cmp eax, MAX_MATCH - BEFORE_JMP - jge LenMaximum - AFTER_JMP -/* -;;; If the length of the match is not longer than the best match we -;;; have so far, then forget it and return to the lookup loop. -;/////////////////////////////////// -*/ - cmp eax, r11d - jg LongerMatch - - lea rsi,[r10+r11] - - mov rdi, prev_ad - mov edx, [chainlenwmask] - BEFORE_JMP - jmp LookupLoop - AFTER_JMP -/* -;;; s->match_start = cur_match; -;;; best_len = len; -;;; if (len >= nice_match) break; -;;; scan_end = *(ushf*)(scan+best_len-1); -*/ -LongerMatch: - mov r11d, eax - mov match_start, r8d - cmp eax, [nicematch] - BEFORE_JMP - jge LeaveNow - AFTER_JMP - - lea rsi,[r10+rax] - - movzx ebx, word ptr [r9 + rax - 1] - mov rdi, prev_ad - mov edx, [chainlenwmask] - BEFORE_JMP - jmp LookupLoop - AFTER_JMP - -//;;; Accept the current string, with the maximum possible length. - -LenMaximum: - mov r11d,MAX_MATCH - mov match_start, r8d - -//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; -//;;; return s->lookahead; - -LeaveNow: - mov eax, Lookahead - cmp r11d, eax - cmovng eax, r11d - - - -//;;; Restore the stack and return from whence we came. - - -// mov rsi,[save_rsi] -// mov rdi,[save_rdi] - mov rbx,[save_rbx] - mov rbp,[save_rbp] - mov r12,[save_r12] - mov r13,[save_r13] - mov r14,[save_r14] - mov r15,[save_r15] - - - ret 0 -//; please don't remove this string ! -//; Your can freely use gvmat64 in any free or commercial app -//; but it is far better don't remove the string in the binary! - // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 - - -match_init: - ret 0 - - diff --git a/third_party/zlib/contrib/infback9/README b/third_party/zlib/contrib/infback9/README deleted file mode 100644 index e75ed13..0000000 --- a/third_party/zlib/contrib/infback9/README +++ /dev/null @@ -1 +0,0 @@ -See infback9.h for what this is and how to use it. diff --git a/third_party/zlib/contrib/infback9/infback9.c b/third_party/zlib/contrib/infback9/infback9.c deleted file mode 100644 index 742a392..0000000 --- a/third_party/zlib/contrib/infback9/infback9.c +++ /dev/null @@ -1,603 +0,0 @@ -/* infback9.c -- inflate deflate64 data using a call-back interface - * Copyright (C) 1995-2008 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "infback9.h" -#include "inftree9.h" -#include "inflate9.h" - -#define WSIZE 65536UL - -/* - strm provides memory allocation functions in zalloc and zfree, or - Z_NULL to use the library memory allocation functions. - - window is a user-supplied window and output buffer that is 64K bytes. - */ -int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window, - const char *version, int stream_size) { - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL || window == Z_NULL) - return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; - } - if (strm->zfree == (free_func)0) strm->zfree = zcfree; - state = (struct inflate_state FAR *)ZALLOC(strm, 1, - sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (voidpf)state; - state->window = window; - return Z_OK; -} - -/* - Build and output length and distance decoding tables for fixed code - decoding. - */ -#ifdef MAKEFIXED -#include - -void makefixed9(void) { - unsigned sym, bits, low, size; - code *next, *lenfix, *distfix; - struct inflate_state state; - code fixed[544]; - - /* literal/length table */ - sym = 0; - while (sym < 144) state.lens[sym++] = 8; - while (sym < 256) state.lens[sym++] = 9; - while (sym < 280) state.lens[sym++] = 7; - while (sym < 288) state.lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work); - - /* distance table */ - sym = 0; - while (sym < 32) state.lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work); - - /* write tables */ - puts(" /* inffix9.h -- table for decoding deflate64 fixed codes"); - puts(" * Generated automatically by makefixed9()."); - puts(" */"); - puts(""); - puts(" /* WARNING: this file should *not* be used by applications."); - puts(" It is part of the implementation of this library and is"); - puts(" subject to change. Applications should only use zlib.h."); - puts(" */"); - puts(""); - size = 1U << 9; - printf(" static const code lenfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 6) == 0) printf("\n "); - printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits, - lenfix[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); - size = 1U << 5; - printf("\n static const code distfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 5) == 0) printf("\n "); - printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits, - distfix[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); -} -#endif /* MAKEFIXED */ - -/* Macros for inflateBack(): */ - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Assure that some input is available. If input is requested, but denied, - then return a Z_BUF_ERROR from inflateBack(). */ -#define PULL() \ - do { \ - if (have == 0) { \ - have = in(in_desc, &next); \ - if (have == 0) { \ - next = Z_NULL; \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflateBack() - with an error if there is no input available. */ -#define PULLBYTE() \ - do { \ - PULL(); \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflateBack() with - an error. */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n <= 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* Assure that some output space is available, by writing out the window - if it's full. If the write fails, return from inflateBack() with a - Z_BUF_ERROR. */ -#define ROOM() \ - do { \ - if (left == 0) { \ - put = window; \ - left = WSIZE; \ - wrap = 1; \ - if (out(out_desc, put, (unsigned)left)) { \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* - strm provides the memory allocation functions and window buffer on input, - and provides information on the unused input on return. For Z_DATA_ERROR - returns, strm will also provide an error message. - - in() and out() are the call-back input and output functions. When - inflateBack() needs more input, it calls in(). When inflateBack() has - filled the window with output, or when it completes with data in the - window, it calls out() to write out the data. The application must not - change the provided input until in() is called again or inflateBack() - returns. The application must not change the window/output buffer until - inflateBack() returns. - - in() and out() are called with a descriptor parameter provided in the - inflateBack() call. This parameter can be a structure that provides the - information required to do the read or write, as well as accumulated - information on the input and output such as totals and check values. - - in() should return zero on failure. out() should return non-zero on - failure. If either in() or out() fails, than inflateBack() returns a - Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it - was in() or out() that caused in the error. Otherwise, inflateBack() - returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format - error, or Z_MEM_ERROR if it could not allocate memory for the state. - inflateBack() can also return Z_STREAM_ERROR if the input parameters - are not correct, i.e. strm is Z_NULL or the state was not initialized. - */ -int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc) { - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have; /* available input */ - unsigned long left; /* available output */ - inflate_mode mode; /* current inflate mode */ - int lastblock; /* true if processing last block */ - int wrap; /* true if the window has wrapped */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned extra; /* extra bits needed */ - unsigned long length; /* literal or length of data to copy */ - unsigned long offset; /* distance back to copy string from */ - unsigned long copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; -#include "inffix9.h" - - /* Check that the strm exists and that the state was initialized */ - if (strm == Z_NULL || strm->state == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* Reset the state */ - strm->msg = Z_NULL; - mode = TYPE; - lastblock = 0; - wrap = 0; - window = state->window; - next = strm->next_in; - have = next != Z_NULL ? strm->avail_in : 0; - hold = 0; - bits = 0; - put = window; - left = WSIZE; - lencode = Z_NULL; - distcode = Z_NULL; - - /* Inflate until end of block marked as last */ - for (;;) - switch (mode) { - case TYPE: - /* determine and dispatch block type */ - if (lastblock) { - BYTEBITS(); - mode = DONE; - break; - } - NEEDBITS(3); - lastblock = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - lastblock ? " (last)" : "")); - mode = STORED; - break; - case 1: /* fixed block */ - lencode = lenfix; - lenbits = 9; - distcode = distfix; - distbits = 5; - Tracev((stderr, "inflate: fixed codes block%s\n", - lastblock ? " (last)" : "")); - mode = LEN; /* decode codes */ - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - lastblock ? " (last)" : "")); - mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - mode = BAD; - } - DROPBITS(2); - break; - - case STORED: - /* get and verify stored block length */ - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - mode = BAD; - break; - } - length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %lu\n", - length)); - INITBITS(); - - /* copy stored block from input to output */ - while (length != 0) { - copy = length; - PULL(); - ROOM(); - if (copy > have) copy = have; - if (copy > left) copy = left; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - length -= copy; - } - Tracev((stderr, "inflate: stored end\n")); - mode = TYPE; - break; - - case TABLE: - /* get dynamic table entries descriptor */ - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); - if (state->nlen > 286) { - strm->msg = (char *)"too many length symbols"; - mode = BAD; - break; - } - Tracev((stderr, "inflate: table sizes ok\n")); - - /* get code length code lengths (not a typo) */ - state->have = 0; - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - lencode = (code const FAR *)(state->next); - lenbits = 7; - ret = inflate_table9(CODES, state->lens, 19, &(state->next), - &(lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - - /* get length and distance code code lengths */ - state->have = 0; - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = lencode[BITS(lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - NEEDBITS(here.bits); - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - mode = BAD; - break; - } - len = (unsigned)(state->lens[state->have - 1]); - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftree9.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - lencode = (code const FAR *)(state->next); - lenbits = 9; - ret = inflate_table9(LENS, state->lens, state->nlen, - &(state->next), &(lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - mode = BAD; - break; - } - distcode = (code const FAR *)(state->next); - distbits = 6; - ret = inflate_table9(DISTS, state->lens + state->nlen, - state->ndist, &(state->next), &(distbits), - state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - mode = LEN; - - case LEN: - /* get a literal, length, or end-of-block code */ - for (;;) { - here = lencode[BITS(lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - length = (unsigned)here.val; - - /* process literal */ - if (here.op == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - ROOM(); - *put++ = (unsigned char)(length); - left--; - mode = LEN; - break; - } - - /* process end of block */ - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - mode = TYPE; - break; - } - - /* invalid code */ - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - mode = BAD; - break; - } - - /* length code -- get extra bits, if any */ - extra = (unsigned)(here.op) & 31; - if (extra != 0) { - NEEDBITS(extra); - length += BITS(extra); - DROPBITS(extra); - } - Tracevv((stderr, "inflate: length %lu\n", length)); - - /* get distance code */ - for (;;) { - here = distcode[BITS(distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - mode = BAD; - break; - } - offset = (unsigned)here.val; - - /* get distance extra bits, if any */ - extra = (unsigned)(here.op) & 15; - if (extra != 0) { - NEEDBITS(extra); - offset += BITS(extra); - DROPBITS(extra); - } - if (offset > WSIZE - (wrap ? 0: left)) { - strm->msg = (char *)"invalid distance too far back"; - mode = BAD; - break; - } - Tracevv((stderr, "inflate: distance %lu\n", offset)); - - /* copy match from window to output */ - do { - ROOM(); - copy = WSIZE - offset; - if (copy < left) { - from = put + copy; - copy = left - copy; - } - else { - from = put - offset; - copy = left; - } - if (copy > length) copy = length; - length -= copy; - left -= copy; - do { - *put++ = *from++; - } while (--copy); - } while (length != 0); - break; - - case DONE: - /* inflate stream terminated properly -- write leftover output */ - ret = Z_STREAM_END; - if (left < WSIZE) { - if (out(out_desc, window, (unsigned)(WSIZE - left))) - ret = Z_BUF_ERROR; - } - goto inf_leave; - - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - - default: /* can't happen, but makes compilers happy */ - ret = Z_STREAM_ERROR; - goto inf_leave; - } - - /* Return unused input */ - inf_leave: - strm->next_in = next; - strm->avail_in = have; - return ret; -} - -int ZEXPORT inflateBack9End(z_stream FAR *strm) { - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - return Z_STREAM_ERROR; - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} diff --git a/third_party/zlib/contrib/infback9/infback9.h b/third_party/zlib/contrib/infback9/infback9.h deleted file mode 100644 index e391be1..0000000 --- a/third_party/zlib/contrib/infback9/infback9.h +++ /dev/null @@ -1,38 +0,0 @@ -/* infback9.h -- header for using inflateBack9 functions - * Copyright (C) 2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * This header file and associated patches provide a decoder for PKWare's - * undocumented deflate64 compression method (method 9). Use with infback9.c, - * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported. - * This should be compiled with zlib, since it uses zutil.h and zutil.o. - * This code has not yet been tested on 16-bit architectures. See the - * comments in zlib.h for inflateBack() usage. These functions are used - * identically, except that there is no windowBits parameter, and a 64K - * window must be provided. Also if int's are 16 bits, then a zero for - * the third parameter of the "out" function actually means 65536UL. - * zlib.h must be included before this header file. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -ZEXTERN int ZEXPORT inflateBack9(z_stream FAR *strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc); -ZEXTERN int ZEXPORT inflateBack9End(z_stream FAR *strm); -ZEXTERN int ZEXPORT inflateBack9Init_(z_stream FAR *strm, - unsigned char FAR *window, - const char *version, - int stream_size); -#define inflateBack9Init(strm, window) \ - inflateBack9Init_((strm), (window), \ - ZLIB_VERSION, sizeof(z_stream)) - -#ifdef __cplusplus -} -#endif - diff --git a/third_party/zlib/contrib/infback9/inffix9.h b/third_party/zlib/contrib/infback9/inffix9.h deleted file mode 100644 index f34d395..0000000 --- a/third_party/zlib/contrib/infback9/inffix9.h +++ /dev/null @@ -1,108 +0,0 @@ - /* inffix9.h -- table for decoding deflate64 fixed codes - * Generated automatically by makefixed9(). - */ - - /* WARNING: this file should *not* be used by applications. - It is part of the implementation of this library and is - subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112}, - {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160}, - {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88}, - {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208}, - {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136}, - {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227}, - {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232}, - {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124}, - {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184}, - {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82}, - {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196}, - {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130}, - {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148}, - {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106}, - {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244}, - {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118}, - {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172}, - {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94}, - {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220}, - {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131}, - {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97}, - {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226}, - {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121}, - {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178}, - {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85}, - {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202}, - {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133}, - {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154}, - {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109}, - {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250}, - {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115}, - {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166}, - {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91}, - {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214}, - {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139}, - {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0}, - {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103}, - {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238}, - {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127}, - {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80}, - {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193}, - {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128}, - {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145}, - {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104}, - {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241}, - {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116}, - {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169}, - {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92}, - {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217}, - {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140}, - {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163}, - {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98}, - {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122}, - {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181}, - {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86}, - {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205}, - {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134}, - {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157}, - {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253}, - {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113}, - {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163}, - {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89}, - {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211}, - {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137}, - {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3}, - {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101}, - {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235}, - {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125}, - {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187}, - {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83}, - {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199}, - {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151}, - {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107}, - {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247}, - {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119}, - {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175}, - {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95}, - {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223}, - {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143}, - {0,8,79},{0,9,255} - }; - - static const code distfix[32] = { - {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5}, - {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513}, - {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129}, - {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145}, - {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4}, - {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073}, - {134,5,193},{142,5,49153} - }; - diff --git a/third_party/zlib/contrib/infback9/inflate9.h b/third_party/zlib/contrib/infback9/inflate9.h deleted file mode 100644 index ec9de6f..0000000 --- a/third_party/zlib/contrib/infback9/inflate9.h +++ /dev/null @@ -1,48 +0,0 @@ -/* inflate9.h -- internal inflate state definition - * Copyright (C) 1995-2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Possible inflate modes between inflate() calls */ -typedef enum { - TYPE, /* i: waiting for type bits, including last-flag bit */ - STORED, /* i: waiting for stored size (length and complement) */ - TABLE, /* i: waiting for dynamic block table lengths */ - LEN, /* i: waiting for length/lit code */ - DONE, /* finished check, done -- remain here until reset */ - BAD /* got a data error -- remain here until reset */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to the BAD mode -- not shown for clarity) - - Read deflate blocks: - TYPE -> STORED or TABLE or LEN or DONE - STORED -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN - Read deflate codes: - LEN -> LEN or TYPE - */ - -/* state maintained between inflate() calls. Approximately 7K bytes. */ -struct inflate_state { - /* sliding window */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ -}; - diff --git a/third_party/zlib/contrib/infback9/inftree9.c b/third_party/zlib/contrib/infback9/inftree9.c deleted file mode 100644 index ac707ed..0000000 --- a/third_party/zlib/contrib/infback9/inftree9.c +++ /dev/null @@ -1,319 +0,0 @@ -/* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2024 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftree9.h" - -#define MAXBITS 15 - -const char inflate9_copyright[] = - " inflate9 1.3.1 Copyright 1995-2024 Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* - Build a set of tables to decode the provided canonical Huffman code. - The code lengths are lens[0..codes-1]. The result starts at *table, - whose indices are 0..2^bits-1. work is a writable array of at least - lens shorts, which is used as a work area. type is the type of code - to be generated, CODES, LENS, or DISTS. On return, zero is success, - -1 is an invalid code, and +1 means that ENOUGH isn't enough. table - on return points to the next available entry's address. bits is the - requested root table index bits, and on return it is the actual root - table index bits. It will differ if the request is greater than the - longest code or if it is less than the shortest code. - */ -int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, - code FAR * FAR *table, unsigned FAR *bits, - unsigned short FAR *work) { - unsigned len; /* a code's length in bits */ - unsigned sym; /* index of code symbols */ - unsigned min, max; /* minimum and maximum code lengths */ - unsigned root; /* number of index bits for root table */ - unsigned curr; /* number of index bits for current table */ - unsigned drop; /* code bits to drop for sub-table */ - int left; /* number of prefix codes available */ - unsigned used; /* code entries in table used */ - unsigned huff; /* Huffman code */ - unsigned incr; /* for incrementing code, index */ - unsigned fill; /* index for replicating entries */ - unsigned low; /* low bits for current root entry */ - unsigned mask; /* mask for low root bits */ - code this; /* table entry for duplication */ - code FAR *next; /* next available space in table */ - const unsigned short FAR *base; /* base value table to use */ - const unsigned short FAR *extra; /* extra bits table to use */ - int end; /* use base and extra for symbol > end */ - unsigned short count[MAXBITS+1]; /* number of codes of each length */ - unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ - static const unsigned short lbase[31] = { /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, - 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, - 131, 163, 195, 227, 3, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, - 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 203, 77}; - static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, - 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, - 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153}; - static const unsigned short dext[32] = { /* Distance codes 0..31 extra */ - 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, - 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138, - 139, 139, 140, 140, 141, 141, 142, 142}; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) - count[len] = 0; - for (sym = 0; sym < codes; sym++) - count[lens[sym]]++; - - /* bound code lengths, force root to be within code lengths */ - root = *bits; - for (max = MAXBITS; max >= 1; max--) - if (count[max] != 0) break; - if (root > max) root = max; - if (max == 0) return -1; /* no codes! */ - for (min = 1; min <= MAXBITS; min++) - if (count[min] != 0) break; - if (root < min) root = min; - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) return -1; /* over-subscribed */ - } - if (left > 0 && (type == CODES || max != 1)) - return -1; /* incomplete set */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + count[len]; - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) - if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftree9.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - switch (type) { - case CODES: - base = extra = work; /* dummy value--not used */ - end = 19; - break; - case LENS: - base = lbase; - base -= 257; - extra = lext; - extra -= 257; - end = 256; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize state for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = *table; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = (unsigned)(-1); /* trigger new sub-table when len > root */ - used = 1U << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) - return 1; - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - this.bits = (unsigned char)(len - drop); - if ((int)(work[sym]) < end) { - this.op = (unsigned char)0; - this.val = work[sym]; - } - else if ((int)(work[sym]) > end) { - this.op = (unsigned char)(extra[work[sym]]); - this.val = base[work[sym]]; - } - else { - this.op = (unsigned char)(32 + 64); /* end of block */ - this.val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1U << (len - drop); - fill = 1U << curr; - do { - fill -= incr; - next[(huff >> drop) + fill] = this; - } while (fill != 0); - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - - /* go to next symbol, update count, len */ - sym++; - if (--(count[len]) == 0) { - if (len == max) break; - len = lens[work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) != low) { - /* if first time, transition to sub-tables */ - if (drop == 0) - drop = root; - - /* increment past last table */ - next += 1U << curr; - - /* determine length of next table */ - curr = len - drop; - left = (int)(1 << curr); - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) break; - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1U << curr; - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) - return 1; - - /* point entry in root table to sub-table */ - low = huff & mask; - (*table)[low].op = (unsigned char)curr; - (*table)[low].bits = (unsigned char)root; - (*table)[low].val = (unsigned short)(next - *table); - } - } - - /* - Fill in rest of table for incomplete codes. This loop is similar to the - loop above in incrementing huff for table indices. It is assumed that - len is equal to curr + drop, so there is no loop needed to increment - through high index bits. When the current sub-table is filled, the loop - drops back to the root table to fill in any remaining entries there. - */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)(len - drop); - this.val = (unsigned short)0; - while (huff != 0) { - /* when done with sub-table, drop back to root table */ - if (drop != 0 && (huff & mask) != low) { - drop = 0; - len = root; - next = *table; - curr = root; - this.bits = (unsigned char)len; - } - - /* put invalid code marker in table */ - next[huff >> drop] = this; - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - } - - /* set return parameters */ - *table += used; - *bits = root; - return 0; -} diff --git a/third_party/zlib/contrib/infback9/inftree9.h b/third_party/zlib/contrib/infback9/inftree9.h deleted file mode 100644 index 1d84ec0..0000000 --- a/third_party/zlib/contrib/infback9/inftree9.h +++ /dev/null @@ -1,62 +0,0 @@ -/* inftree9.h -- header to use inftree9.c - * Copyright (C) 1995-2008 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 100eeeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of the dynamic table. The maximum number of code structures is - 1446, which is the sum of 852 for literal/length codes and 594 for distance - codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribution. The arguments to that - program are the number of symbols, the initial root table size, and the - maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns 852, and "enough 32 6 15" for distance codes returns 594. The - initial root table size (9 or 6) is found in the fifth argument of the - inflate_table() calls in infback9.c. If the root table size is changed, - then these maximum sizes would be need to be recalculated and updated. */ -#define ENOUGH_LENS 852 -#define ENOUGH_DISTS 594 -#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) - -/* Type of code to build for inflate_table9() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -extern int inflate_table9(codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work); - diff --git a/third_party/zlib/contrib/iostream/test.cpp b/third_party/zlib/contrib/iostream/test.cpp deleted file mode 100644 index e416a1c..0000000 --- a/third_party/zlib/contrib/iostream/test.cpp +++ /dev/null @@ -1,25 +0,0 @@ - -#include "zfstream.h" - -int main() { - - // Construct a stream object with this filebuffer. Anything sent - // to this stream will go to standard out. - gzofstream os( 1, ios::out ); - - // This text is getting compressed and sent to stdout. - // To prove this, run 'test | zcat'. - os << "Hello, Mommy" << endl; - - os << setcompressionlevel( Z_NO_COMPRESSION ); - os << "hello, hello, hi, ho!" << endl; - - setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) - << "I'm compressing again" << endl; - - os.close(); - - return 0; - -} - diff --git a/third_party/zlib/contrib/iostream/zfstream.cpp b/third_party/zlib/contrib/iostream/zfstream.cpp deleted file mode 100644 index 8b415b4..0000000 --- a/third_party/zlib/contrib/iostream/zfstream.cpp +++ /dev/null @@ -1,330 +0,0 @@ - -#include "zfstream.h" - -gzfilebuf::gzfilebuf() : - file(NULL), - mode(0), - own_file_descriptor(0) -{ } - -gzfilebuf::~gzfilebuf() { - - sync(); - if ( own_file_descriptor ) - close(); - -} - -gzfilebuf *gzfilebuf::open( const char *name, - int io_mode ) { - - if ( is_open() ) - return NULL; - - char char_mode[10]; - char *p = char_mode; - - if ( io_mode & ios::in ) { - mode = ios::in; - *p++ = 'r'; - } else if ( io_mode & ios::app ) { - mode = ios::app; - *p++ = 'a'; - } else { - mode = ios::out; - *p++ = 'w'; - } - - if ( io_mode & ios::binary ) { - mode |= ios::binary; - *p++ = 'b'; - } - - // Hard code the compression level - if ( io_mode & (ios::out|ios::app )) { - *p++ = '9'; - } - - // Put the end-of-string indicator - *p = '\0'; - - if ( (file = gzopen(name, char_mode)) == NULL ) - return NULL; - - own_file_descriptor = 1; - - return this; - -} - -gzfilebuf *gzfilebuf::attach( int file_descriptor, - int io_mode ) { - - if ( is_open() ) - return NULL; - - char char_mode[10]; - char *p = char_mode; - - if ( io_mode & ios::in ) { - mode = ios::in; - *p++ = 'r'; - } else if ( io_mode & ios::app ) { - mode = ios::app; - *p++ = 'a'; - } else { - mode = ios::out; - *p++ = 'w'; - } - - if ( io_mode & ios::binary ) { - mode |= ios::binary; - *p++ = 'b'; - } - - // Hard code the compression level - if ( io_mode & (ios::out|ios::app )) { - *p++ = '9'; - } - - // Put the end-of-string indicator - *p = '\0'; - - if ( (file = gzdopen(file_descriptor, char_mode)) == NULL ) - return NULL; - - own_file_descriptor = 0; - - return this; - -} - -gzfilebuf *gzfilebuf::close() { - - if ( is_open() ) { - - sync(); - gzclose( file ); - file = NULL; - - } - - return this; - -} - -int gzfilebuf::setcompressionlevel( int comp_level ) { - - return gzsetparams(file, comp_level, -2); - -} - -int gzfilebuf::setcompressionstrategy( int comp_strategy ) { - - return gzsetparams(file, -2, comp_strategy); - -} - - -streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) { - - return streampos(EOF); - -} - -int gzfilebuf::underflow() { - - // If the file hasn't been opened for reading, error. - if ( !is_open() || !(mode & ios::in) ) - return EOF; - - // if a buffer doesn't exists, allocate one. - if ( !base() ) { - - if ( (allocate()) == EOF ) - return EOF; - setp(0,0); - - } else { - - if ( in_avail() ) - return (unsigned char) *gptr(); - - if ( out_waiting() ) { - if ( flushbuf() == EOF ) - return EOF; - } - - } - - // Attempt to fill the buffer. - - int result = fillbuf(); - if ( result == EOF ) { - // disable get area - setg(0,0,0); - return EOF; - } - - return (unsigned char) *gptr(); - -} - -int gzfilebuf::overflow( int c ) { - - if ( !is_open() || !(mode & ios::out) ) - return EOF; - - if ( !base() ) { - if ( allocate() == EOF ) - return EOF; - setg(0,0,0); - } else { - if (in_avail()) { - return EOF; - } - if (out_waiting()) { - if (flushbuf() == EOF) - return EOF; - } - } - - int bl = blen(); - setp( base(), base() + bl); - - if ( c != EOF ) { - - *pptr() = c; - pbump(1); - - } - - return 0; - -} - -int gzfilebuf::sync() { - - if ( !is_open() ) - return EOF; - - if ( out_waiting() ) - return flushbuf(); - - return 0; - -} - -int gzfilebuf::flushbuf() { - - int n; - char *q; - - q = pbase(); - n = pptr() - q; - - if ( gzwrite( file, q, n) < n ) - return EOF; - - setp(0,0); - - return 0; - -} - -int gzfilebuf::fillbuf() { - - int required; - char *p; - - p = base(); - - required = blen(); - - int t = gzread( file, p, required ); - - if ( t <= 0) return EOF; - - setg( base(), base(), base()+t); - - return t; - -} - -gzfilestream_common::gzfilestream_common() : - ios( gzfilestream_common::rdbuf() ) -{ } - -gzfilestream_common::~gzfilestream_common() -{ } - -void gzfilestream_common::attach( int fd, int io_mode ) { - - if ( !buffer.attach( fd, io_mode) ) - clear( ios::failbit | ios::badbit ); - else - clear(); - -} - -void gzfilestream_common::open( const char *name, int io_mode ) { - - if ( !buffer.open( name, io_mode ) ) - clear( ios::failbit | ios::badbit ); - else - clear(); - -} - -void gzfilestream_common::close() { - - if ( !buffer.close() ) - clear( ios::failbit | ios::badbit ); - -} - -gzfilebuf *gzfilestream_common::rdbuf() -{ - return &buffer; -} - -gzifstream::gzifstream() : - ios( gzfilestream_common::rdbuf() ) -{ - clear( ios::badbit ); -} - -gzifstream::gzifstream( const char *name, int io_mode ) : - ios( gzfilestream_common::rdbuf() ) -{ - gzfilestream_common::open( name, io_mode ); -} - -gzifstream::gzifstream( int fd, int io_mode ) : - ios( gzfilestream_common::rdbuf() ) -{ - gzfilestream_common::attach( fd, io_mode ); -} - -gzifstream::~gzifstream() { } - -gzofstream::gzofstream() : - ios( gzfilestream_common::rdbuf() ) -{ - clear( ios::badbit ); -} - -gzofstream::gzofstream( const char *name, int io_mode ) : - ios( gzfilestream_common::rdbuf() ) -{ - gzfilestream_common::open( name, io_mode ); -} - -gzofstream::gzofstream( int fd, int io_mode ) : - ios( gzfilestream_common::rdbuf() ) -{ - gzfilestream_common::attach( fd, io_mode ); -} - -gzofstream::~gzofstream() { } - diff --git a/third_party/zlib/contrib/iostream/zfstream.h b/third_party/zlib/contrib/iostream/zfstream.h deleted file mode 100644 index daa89d6..0000000 --- a/third_party/zlib/contrib/iostream/zfstream.h +++ /dev/null @@ -1,129 +0,0 @@ - -#ifndef zfstream_h -#define zfstream_h - -#include -#include "zlib.h" - -class gzfilebuf : public streambuf { - -public: - - gzfilebuf( ); - virtual ~gzfilebuf(); - - gzfilebuf *open( const char *name, int io_mode ); - gzfilebuf *attach( int file_descriptor, int io_mode ); - gzfilebuf *close(); - - int setcompressionlevel( int comp_level ); - int setcompressionstrategy( int comp_strategy ); - - inline int is_open() const { return (file !=NULL); } - - virtual streampos seekoff( streamoff, ios::seek_dir, int ); - - virtual int sync(); - -protected: - - virtual int underflow(); - virtual int overflow( int = EOF ); - -private: - - gzFile file; - short mode; - short own_file_descriptor; - - int flushbuf(); - int fillbuf(); - -}; - -class gzfilestream_common : virtual public ios { - - friend class gzifstream; - friend class gzofstream; - friend gzofstream &setcompressionlevel( gzofstream &, int ); - friend gzofstream &setcompressionstrategy( gzofstream &, int ); - -public: - virtual ~gzfilestream_common(); - - void attach( int fd, int io_mode ); - void open( const char *name, int io_mode ); - void close(); - -protected: - gzfilestream_common(); - -private: - gzfilebuf *rdbuf(); - - gzfilebuf buffer; - -}; - -class gzifstream : public gzfilestream_common, public istream { - -public: - - gzifstream(); - gzifstream( const char *name, int io_mode = ios::in ); - gzifstream( int fd, int io_mode = ios::in ); - - virtual ~gzifstream(); - -}; - -class gzofstream : public gzfilestream_common, public ostream { - -public: - - gzofstream(); - gzofstream( const char *name, int io_mode = ios::out ); - gzofstream( int fd, int io_mode = ios::out ); - - virtual ~gzofstream(); - -}; - -template class gzomanip { - friend gzofstream &operator<<(gzofstream &, const gzomanip &); -public: - gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { } -private: - gzofstream &(*func)(gzofstream &, T); - T val; -}; - -template gzofstream &operator<<(gzofstream &s, const gzomanip &m) -{ - return (*m.func)(s, m.val); -} - -inline gzofstream &setcompressionlevel( gzofstream &s, int l ) -{ - (s.rdbuf())->setcompressionlevel(l); - return s; -} - -inline gzofstream &setcompressionstrategy( gzofstream &s, int l ) -{ - (s.rdbuf())->setcompressionstrategy(l); - return s; -} - -inline gzomanip setcompressionlevel(int l) -{ - return gzomanip(&setcompressionlevel,l); -} - -inline gzomanip setcompressionstrategy(int l) -{ - return gzomanip(&setcompressionstrategy,l); -} - -#endif - diff --git a/third_party/zlib/contrib/iostream2/zstream.h b/third_party/zlib/contrib/iostream2/zstream.h deleted file mode 100644 index a69b189..0000000 --- a/third_party/zlib/contrib/iostream2/zstream.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * - * Copyright (c) 1997 - * Christian Michelsen Research AS - * Advanced Computing - * Fantoftvegen 38, 5036 BERGEN, Norway - * http://www.cmr.no - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Christian Michelsen Research AS makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -#ifndef ZSTREAM__H -#define ZSTREAM__H - -/* - * zstream.h - C++ interface to the 'zlib' general purpose compression library - * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $ - */ - -#include -#include -#include -#include "zlib.h" - -#if defined(_WIN32) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -class zstringlen { -public: - zstringlen(class izstream&); - zstringlen(class ozstream&, const char*); - size_t value() const { return val.word; } -private: - struct Val { unsigned char byte; size_t word; } val; -}; - -// ----------------------------- izstream ----------------------------- - -class izstream -{ - public: - izstream() : m_fp(0) {} - izstream(FILE* fp) : m_fp(0) { open(fp); } - izstream(const char* name) : m_fp(0) { open(name); } - ~izstream() { close(); } - - /* Opens a gzip (.gz) file for reading. - * open() can be used to read a file which is not in gzip format; - * in this case read() will directly read from the file without - * decompression. errno can be checked to distinguish two error - * cases (if errno is zero, the zlib error is Z_MEM_ERROR). - */ - void open(const char* name) { - if (m_fp) close(); - m_fp = ::gzopen(name, "rb"); - } - - void open(FILE* fp) { - SET_BINARY_MODE(fp); - if (m_fp) close(); - m_fp = ::gzdopen(fileno(fp), "rb"); - } - - /* Flushes all pending input if necessary, closes the compressed file - * and deallocates all the (de)compression state. The return value is - * the zlib error number (see function error() below). - */ - int close() { - int r = ::gzclose(m_fp); - m_fp = 0; return r; - } - - /* Binary read the given number of bytes from the compressed file. - */ - int read(void* buf, size_t len) { - return ::gzread(m_fp, buf, len); - } - - /* Returns the error message for the last error which occurred on the - * given compressed file. errnum is set to zlib error number. If an - * error occurred in the file system and not in the compression library, - * errnum is set to Z_ERRNO and the application may consult errno - * to get the exact error code. - */ - const char* error(int* errnum) { - return ::gzerror(m_fp, errnum); - } - - gzFile fp() { return m_fp; } - - private: - gzFile m_fp; -}; - -/* - * Binary read the given (array of) object(s) from the compressed file. - * If the input file was not in gzip format, read() copies the objects number - * of bytes into the buffer. - * returns the number of uncompressed bytes actually read - * (0 for end of file, -1 for error). - */ -template -inline int read(izstream& zs, T* x, Items items) { - return ::gzread(zs.fp(), x, items*sizeof(T)); -} - -/* - * Binary input with the '>' operator. - */ -template -inline izstream& operator>(izstream& zs, T& x) { - ::gzread(zs.fp(), &x, sizeof(T)); - return zs; -} - - -inline zstringlen::zstringlen(izstream& zs) { - zs > val.byte; - if (val.byte == 255) zs > val.word; - else val.word = val.byte; -} - -/* - * Read length of string + the string with the '>' operator. - */ -inline izstream& operator>(izstream& zs, char* x) { - zstringlen len(zs); - ::gzread(zs.fp(), x, len.value()); - x[len.value()] = '\0'; - return zs; -} - -inline char* read_string(izstream& zs) { - zstringlen len(zs); - char* x = new char[len.value()+1]; - ::gzread(zs.fp(), x, len.value()); - x[len.value()] = '\0'; - return x; -} - -// ----------------------------- ozstream ----------------------------- - -class ozstream -{ - public: - ozstream() : m_fp(0), m_os(0) { - } - ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION) - : m_fp(0), m_os(0) { - open(fp, level); - } - ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION) - : m_fp(0), m_os(0) { - open(name, level); - } - ~ozstream() { - close(); - } - - /* Opens a gzip (.gz) file for writing. - * The compression level parameter should be in 0..9 - * errno can be checked to distinguish two error cases - * (if errno is zero, the zlib error is Z_MEM_ERROR). - */ - void open(const char* name, int level = Z_DEFAULT_COMPRESSION) { - char mode[4] = "wb\0"; - if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; - if (m_fp) close(); - m_fp = ::gzopen(name, mode); - } - - /* open from a FILE pointer. - */ - void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) { - SET_BINARY_MODE(fp); - char mode[4] = "wb\0"; - if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; - if (m_fp) close(); - m_fp = ::gzdopen(fileno(fp), mode); - } - - /* Flushes all pending output if necessary, closes the compressed file - * and deallocates all the (de)compression state. The return value is - * the zlib error number (see function error() below). - */ - int close() { - if (m_os) { - ::gzwrite(m_fp, m_os->str(), m_os->pcount()); - delete[] m_os->str(); delete m_os; m_os = 0; - } - int r = ::gzclose(m_fp); m_fp = 0; return r; - } - - /* Binary write the given number of bytes into the compressed file. - */ - int write(const void* buf, size_t len) { - return ::gzwrite(m_fp, (voidp) buf, len); - } - - /* Flushes all pending output into the compressed file. The parameter - * _flush is as in the deflate() function. The return value is the zlib - * error number (see function gzerror below). flush() returns Z_OK if - * the flush_ parameter is Z_FINISH and all output could be flushed. - * flush() should be called only when strictly necessary because it can - * degrade compression. - */ - int flush(int _flush) { - os_flush(); - return ::gzflush(m_fp, _flush); - } - - /* Returns the error message for the last error which occurred on the - * given compressed file. errnum is set to zlib error number. If an - * error occurred in the file system and not in the compression library, - * errnum is set to Z_ERRNO and the application may consult errno - * to get the exact error code. - */ - const char* error(int* errnum) { - return ::gzerror(m_fp, errnum); - } - - gzFile fp() { return m_fp; } - - ostream& os() { - if (m_os == 0) m_os = new ostrstream; - return *m_os; - } - - void os_flush() { - if (m_os && m_os->pcount()>0) { - ostrstream* oss = new ostrstream; - oss->fill(m_os->fill()); - oss->flags(m_os->flags()); - oss->precision(m_os->precision()); - oss->width(m_os->width()); - ::gzwrite(m_fp, m_os->str(), m_os->pcount()); - delete[] m_os->str(); delete m_os; m_os = oss; - } - } - - private: - gzFile m_fp; - ostrstream* m_os; -}; - -/* - * Binary write the given (array of) object(s) into the compressed file. - * returns the number of uncompressed bytes actually written - * (0 in case of error). - */ -template -inline int write(ozstream& zs, const T* x, Items items) { - return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T)); -} - -/* - * Binary output with the '<' operator. - */ -template -inline ozstream& operator<(ozstream& zs, const T& x) { - ::gzwrite(zs.fp(), (voidp) &x, sizeof(T)); - return zs; -} - -inline zstringlen::zstringlen(ozstream& zs, const char* x) { - val.byte = 255; val.word = ::strlen(x); - if (val.word < 255) zs < (val.byte = val.word); - else zs < val; -} - -/* - * Write length of string + the string with the '<' operator. - */ -inline ozstream& operator<(ozstream& zs, const char* x) { - zstringlen len(zs, x); - ::gzwrite(zs.fp(), (voidp) x, len.value()); - return zs; -} - -#ifdef _MSC_VER -inline ozstream& operator<(ozstream& zs, char* const& x) { - return zs < (const char*) x; -} -#endif - -/* - * Ascii write with the << operator; - */ -template -inline ostream& operator<<(ozstream& zs, const T& x) { - zs.os_flush(); - return zs.os() << x; -} - -#endif - diff --git a/third_party/zlib/contrib/iostream2/zstream_test.cpp b/third_party/zlib/contrib/iostream2/zstream_test.cpp deleted file mode 100644 index b2fc9e6..0000000 --- a/third_party/zlib/contrib/iostream2/zstream_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "zstream.h" -#include -#include -#include - -void main() { - char h[256] = "Hello"; - char* g = "Goodbye"; - ozstream out("temp.gz"); - out < "This works well" < h < g; - out.close(); - - izstream in("temp.gz"); // read it back - char *x = read_string(in), *y = new char[256], z[256]; - in > y > z; - in.close(); - cout << x << endl << y << endl << z << endl; - - out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results - out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; - out << z << endl << y << endl << x << endl; - out << 1.1234567890123456789 << endl; - - delete[] x; delete[] y; -} - diff --git a/third_party/zlib/contrib/iostream3/README b/third_party/zlib/contrib/iostream3/README deleted file mode 100644 index f7b319a..0000000 --- a/third_party/zlib/contrib/iostream3/README +++ /dev/null @@ -1,35 +0,0 @@ -These classes provide a C++ stream interface to the zlib library. It allows you -to do things like: - - gzofstream outf("blah.gz"); - outf << "These go into the gzip file " << 123 << endl; - -It does this by deriving a specialized stream buffer for gzipped files, which is -the way Stroustrup would have done it. :-> - -The gzifstream and gzofstream classes were originally written by Kevin Ruland -and made available in the zlib contrib/iostream directory. The older version still -compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of -this version. - -The new classes are as standard-compliant as possible, closely following the -approach of the standard library's fstream classes. It compiles under gcc versions -3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard -library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs -from the previous one in the following respects: -- added showmanyc -- added setbuf, with support for unbuffered output via setbuf(0,0) -- a few bug fixes of stream behavior -- gzipped output file opened with default compression level instead of maximum level -- setcompressionlevel()/strategy() members replaced by single setcompression() - -The code is provided "as is", with the permission to use, copy, modify, distribute -and sell it for any purpose without fee. - -Ludwig Schwardt - - -DSP Lab -Electrical & Electronic Engineering Department -University of Stellenbosch -South Africa diff --git a/third_party/zlib/contrib/iostream3/TODO b/third_party/zlib/contrib/iostream3/TODO deleted file mode 100644 index 7032f97..0000000 --- a/third_party/zlib/contrib/iostream3/TODO +++ /dev/null @@ -1,17 +0,0 @@ -Possible upgrades to gzfilebuf: - -- The ability to do putback (e.g. putbackfail) - -- The ability to seek (zlib supports this, but could be slow/tricky) - -- Simultaneous read/write access (does it make sense?) - -- Support for ios_base::ate open mode - -- Locale support? - -- Check public interface to see which calls give problems - (due to dependence on library internals) - -- Override operator<<(ostream&, gzfilebuf*) to allow direct copying - of stream buffer to stream ( i.e. os << is.rdbuf(); ) diff --git a/third_party/zlib/contrib/iostream3/test.cc b/third_party/zlib/contrib/iostream3/test.cc deleted file mode 100644 index 9423533..0000000 --- a/third_party/zlib/contrib/iostream3/test.cc +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Test program for gzifstream and gzofstream - * - * by Ludwig Schwardt - * original version by Kevin Ruland - */ - -#include "zfstream.h" -#include // for cout - -int main() { - - gzofstream outf; - gzifstream inf; - char buf[80]; - - outf.open("test1.txt.gz"); - outf << "The quick brown fox sidestepped the lazy canine\n" - << 1.3 << "\nPlan " << 9 << std::endl; - outf.close(); - std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n" - << "The quick brown fox sidestepped the lazy canine\n" - << 1.3 << "\nPlan " << 9 << std::endl; - - std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n"; - inf.open("test1.txt.gz"); - while (inf.getline(buf,80,'\n')) { - std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; - } - inf.close(); - - outf.rdbuf()->pubsetbuf(0,0); - outf.open("test2.txt.gz"); - outf << setcompression(Z_NO_COMPRESSION) - << "The quick brown fox sidestepped the lazy canine\n" - << 1.3 << "\nPlan " << 9 << std::endl; - outf.close(); - std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form"; - - std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n"; - inf.rdbuf()->pubsetbuf(0,0); - inf.open("test2.txt.gz"); - while (inf.getline(buf,80,'\n')) { - std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; - } - inf.close(); - - return 0; - -} diff --git a/third_party/zlib/contrib/iostream3/zfstream.cc b/third_party/zlib/contrib/iostream3/zfstream.cc deleted file mode 100644 index 94eb933..0000000 --- a/third_party/zlib/contrib/iostream3/zfstream.cc +++ /dev/null @@ -1,479 +0,0 @@ -/* - * A C++ I/O streams interface to the zlib gz* functions - * - * by Ludwig Schwardt - * original version by Kevin Ruland - * - * This version is standard-compliant and compatible with gcc 3.x. - */ - -#include "zfstream.h" -#include // for strcpy, strcat, strlen (mode strings) -#include // for BUFSIZ - -// Internal buffer sizes (default and "unbuffered" versions) -#define BIGBUFSIZE BUFSIZ -#define SMALLBUFSIZE 1 - -/*****************************************************************************/ - -// Default constructor -gzfilebuf::gzfilebuf() -: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false), - buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true) -{ - // No buffers to start with - this->disable_buffer(); -} - -// Destructor -gzfilebuf::~gzfilebuf() -{ - // Sync output buffer and close only if responsible for file - // (i.e. attached streams should be left open at this stage) - this->sync(); - if (own_fd) - this->close(); - // Make sure internal buffer is deallocated - this->disable_buffer(); -} - -// Set compression level and strategy -int -gzfilebuf::setcompression(int comp_level, - int comp_strategy) -{ - return gzsetparams(file, comp_level, comp_strategy); -} - -// Open gzipped file -gzfilebuf* -gzfilebuf::open(const char *name, - std::ios_base::openmode mode) -{ - // Fail if file already open - if (this->is_open()) - return NULL; - // Don't support simultaneous read/write access (yet) - if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) - return NULL; - - // Build mode string for gzopen and check it [27.8.1.3.2] - char char_mode[6] = "\0\0\0\0\0"; - if (!this->open_mode(mode, char_mode)) - return NULL; - - // Attempt to open file - if ((file = gzopen(name, char_mode)) == NULL) - return NULL; - - // On success, allocate internal buffer and set flags - this->enable_buffer(); - io_mode = mode; - own_fd = true; - return this; -} - -// Attach to gzipped file -gzfilebuf* -gzfilebuf::attach(int fd, - std::ios_base::openmode mode) -{ - // Fail if file already open - if (this->is_open()) - return NULL; - // Don't support simultaneous read/write access (yet) - if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) - return NULL; - - // Build mode string for gzdopen and check it [27.8.1.3.2] - char char_mode[6] = "\0\0\0\0\0"; - if (!this->open_mode(mode, char_mode)) - return NULL; - - // Attempt to attach to file - if ((file = gzdopen(fd, char_mode)) == NULL) - return NULL; - - // On success, allocate internal buffer and set flags - this->enable_buffer(); - io_mode = mode; - own_fd = false; - return this; -} - -// Close gzipped file -gzfilebuf* -gzfilebuf::close() -{ - // Fail immediately if no file is open - if (!this->is_open()) - return NULL; - // Assume success - gzfilebuf* retval = this; - // Attempt to sync and close gzipped file - if (this->sync() == -1) - retval = NULL; - if (gzclose(file) < 0) - retval = NULL; - // File is now gone anyway (postcondition [27.8.1.3.8]) - file = NULL; - own_fd = false; - // Destroy internal buffer if it exists - this->disable_buffer(); - return retval; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -// Convert int open mode to mode string -bool -gzfilebuf::open_mode(std::ios_base::openmode mode, - char* c_mode) const -{ - bool testb = mode & std::ios_base::binary; - bool testi = mode & std::ios_base::in; - bool testo = mode & std::ios_base::out; - bool testt = mode & std::ios_base::trunc; - bool testa = mode & std::ios_base::app; - - // Check for valid flag combinations - see [27.8.1.3.2] (Table 92) - // Original zfstream hardcoded the compression level to maximum here... - // Double the time for less than 1% size improvement seems - // excessive though - keeping it at the default level - // To change back, just append "9" to the next three mode strings - if (!testi && testo && !testt && !testa) - strcpy(c_mode, "w"); - if (!testi && testo && !testt && testa) - strcpy(c_mode, "a"); - if (!testi && testo && testt && !testa) - strcpy(c_mode, "w"); - if (testi && !testo && !testt && !testa) - strcpy(c_mode, "r"); - // No read/write mode yet -// if (testi && testo && !testt && !testa) -// strcpy(c_mode, "r+"); -// if (testi && testo && testt && !testa) -// strcpy(c_mode, "w+"); - - // Mode string should be empty for invalid combination of flags - if (strlen(c_mode) == 0) - return false; - if (testb) - strcat(c_mode, "b"); - return true; -} - -// Determine number of characters in internal get buffer -std::streamsize -gzfilebuf::showmanyc() -{ - // Calls to underflow will fail if file not opened for reading - if (!this->is_open() || !(io_mode & std::ios_base::in)) - return -1; - // Make sure get area is in use - if (this->gptr() && (this->gptr() < this->egptr())) - return std::streamsize(this->egptr() - this->gptr()); - else - return 0; -} - -// Fill get area from gzipped file -gzfilebuf::int_type -gzfilebuf::underflow() -{ - // If something is left in the get area by chance, return it - // (this shouldn't normally happen, as underflow is only supposed - // to be called when gptr >= egptr, but it serves as error check) - if (this->gptr() && (this->gptr() < this->egptr())) - return traits_type::to_int_type(*(this->gptr())); - - // If the file hasn't been opened for reading, produce error - if (!this->is_open() || !(io_mode & std::ios_base::in)) - return traits_type::eof(); - - // Attempt to fill internal buffer from gzipped file - // (buffer must be guaranteed to exist...) - int bytes_read = gzread(file, buffer, buffer_size); - // Indicates error or EOF - if (bytes_read <= 0) - { - // Reset get area - this->setg(buffer, buffer, buffer); - return traits_type::eof(); - } - // Make all bytes read from file available as get area - this->setg(buffer, buffer, buffer + bytes_read); - - // Return next character in get area - return traits_type::to_int_type(*(this->gptr())); -} - -// Write put area to gzipped file -gzfilebuf::int_type -gzfilebuf::overflow(int_type c) -{ - // Determine whether put area is in use - if (this->pbase()) - { - // Double-check pointer range - if (this->pptr() > this->epptr() || this->pptr() < this->pbase()) - return traits_type::eof(); - // Add extra character to buffer if not EOF - if (!traits_type::eq_int_type(c, traits_type::eof())) - { - *(this->pptr()) = traits_type::to_char_type(c); - this->pbump(1); - } - // Number of characters to write to file - int bytes_to_write = this->pptr() - this->pbase(); - // Overflow doesn't fail if nothing is to be written - if (bytes_to_write > 0) - { - // If the file hasn't been opened for writing, produce error - if (!this->is_open() || !(io_mode & std::ios_base::out)) - return traits_type::eof(); - // If gzipped file won't accept all bytes written to it, fail - if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write) - return traits_type::eof(); - // Reset next pointer to point to pbase on success - this->pbump(-bytes_to_write); - } - } - // Write extra character to file if not EOF - else if (!traits_type::eq_int_type(c, traits_type::eof())) - { - // If the file hasn't been opened for writing, produce error - if (!this->is_open() || !(io_mode & std::ios_base::out)) - return traits_type::eof(); - // Impromptu char buffer (allows "unbuffered" output) - char_type last_char = traits_type::to_char_type(c); - // If gzipped file won't accept this character, fail - if (gzwrite(file, &last_char, 1) != 1) - return traits_type::eof(); - } - - // If you got here, you have succeeded (even if c was EOF) - // The return value should therefore be non-EOF - if (traits_type::eq_int_type(c, traits_type::eof())) - return traits_type::not_eof(c); - else - return c; -} - -// Assign new buffer -std::streambuf* -gzfilebuf::setbuf(char_type* p, - std::streamsize n) -{ - // First make sure stuff is sync'ed, for safety - if (this->sync() == -1) - return NULL; - // If buffering is turned off on purpose via setbuf(0,0), still allocate one... - // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at - // least a buffer of size 1 (very inefficient though, therefore make it bigger?) - // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems) - if (!p || !n) - { - // Replace existing buffer (if any) with small internal buffer - this->disable_buffer(); - buffer = NULL; - buffer_size = 0; - own_buffer = true; - this->enable_buffer(); - } - else - { - // Replace existing buffer (if any) with external buffer - this->disable_buffer(); - buffer = p; - buffer_size = n; - own_buffer = false; - this->enable_buffer(); - } - return this; -} - -// Write put area to gzipped file (i.e. ensures that put area is empty) -int -gzfilebuf::sync() -{ - return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -// Allocate internal buffer -void -gzfilebuf::enable_buffer() -{ - // If internal buffer required, allocate one - if (own_buffer && !buffer) - { - // Check for buffered vs. "unbuffered" - if (buffer_size > 0) - { - // Allocate internal buffer - buffer = new char_type[buffer_size]; - // Get area starts empty and will be expanded by underflow as need arises - this->setg(buffer, buffer, buffer); - // Setup entire internal buffer as put area. - // The one-past-end pointer actually points to the last element of the buffer, - // so that overflow(c) can safely add the extra character c to the sequence. - // These pointers remain in place for the duration of the buffer - this->setp(buffer, buffer + buffer_size - 1); - } - else - { - // Even in "unbuffered" case, (small?) get buffer is still required - buffer_size = SMALLBUFSIZE; - buffer = new char_type[buffer_size]; - this->setg(buffer, buffer, buffer); - // "Unbuffered" means no put buffer - this->setp(0, 0); - } - } - else - { - // If buffer already allocated, reset buffer pointers just to make sure no - // stale chars are lying around - this->setg(buffer, buffer, buffer); - this->setp(buffer, buffer + buffer_size - 1); - } -} - -// Destroy internal buffer -void -gzfilebuf::disable_buffer() -{ - // If internal buffer exists, deallocate it - if (own_buffer && buffer) - { - // Preserve unbuffered status by zeroing size - if (!this->pbase()) - buffer_size = 0; - delete[] buffer; - buffer = NULL; - this->setg(0, 0, 0); - this->setp(0, 0); - } - else - { - // Reset buffer pointers to initial state if external buffer exists - this->setg(buffer, buffer, buffer); - if (buffer) - this->setp(buffer, buffer + buffer_size - 1); - else - this->setp(0, 0); - } -} - -/*****************************************************************************/ - -// Default constructor initializes stream buffer -gzifstream::gzifstream() -: std::istream(NULL), sb() -{ this->init(&sb); } - -// Initialize stream buffer and open file -gzifstream::gzifstream(const char* name, - std::ios_base::openmode mode) -: std::istream(NULL), sb() -{ - this->init(&sb); - this->open(name, mode); -} - -// Initialize stream buffer and attach to file -gzifstream::gzifstream(int fd, - std::ios_base::openmode mode) -: std::istream(NULL), sb() -{ - this->init(&sb); - this->attach(fd, mode); -} - -// Open file and go into fail() state if unsuccessful -void -gzifstream::open(const char* name, - std::ios_base::openmode mode) -{ - if (!sb.open(name, mode | std::ios_base::in)) - this->setstate(std::ios_base::failbit); - else - this->clear(); -} - -// Attach to file and go into fail() state if unsuccessful -void -gzifstream::attach(int fd, - std::ios_base::openmode mode) -{ - if (!sb.attach(fd, mode | std::ios_base::in)) - this->setstate(std::ios_base::failbit); - else - this->clear(); -} - -// Close file -void -gzifstream::close() -{ - if (!sb.close()) - this->setstate(std::ios_base::failbit); -} - -/*****************************************************************************/ - -// Default constructor initializes stream buffer -gzofstream::gzofstream() -: std::ostream(NULL), sb() -{ this->init(&sb); } - -// Initialize stream buffer and open file -gzofstream::gzofstream(const char* name, - std::ios_base::openmode mode) -: std::ostream(NULL), sb() -{ - this->init(&sb); - this->open(name, mode); -} - -// Initialize stream buffer and attach to file -gzofstream::gzofstream(int fd, - std::ios_base::openmode mode) -: std::ostream(NULL), sb() -{ - this->init(&sb); - this->attach(fd, mode); -} - -// Open file and go into fail() state if unsuccessful -void -gzofstream::open(const char* name, - std::ios_base::openmode mode) -{ - if (!sb.open(name, mode | std::ios_base::out)) - this->setstate(std::ios_base::failbit); - else - this->clear(); -} - -// Attach to file and go into fail() state if unsuccessful -void -gzofstream::attach(int fd, - std::ios_base::openmode mode) -{ - if (!sb.attach(fd, mode | std::ios_base::out)) - this->setstate(std::ios_base::failbit); - else - this->clear(); -} - -// Close file -void -gzofstream::close() -{ - if (!sb.close()) - this->setstate(std::ios_base::failbit); -} diff --git a/third_party/zlib/contrib/iostream3/zfstream.h b/third_party/zlib/contrib/iostream3/zfstream.h deleted file mode 100644 index ce7cc23..0000000 --- a/third_party/zlib/contrib/iostream3/zfstream.h +++ /dev/null @@ -1,467 +0,0 @@ -/* - * A C++ I/O streams interface to the zlib gz* functions - * - * by Ludwig Schwardt - * original version by Kevin Ruland - * - * This version is standard-compliant and compatible with gcc 3.x. - */ - -#ifndef ZFSTREAM_H -#define ZFSTREAM_H - -#include // not iostream, since we don't need cin/cout -#include -#include "zlib.h" - -/*****************************************************************************/ - -/** - * @brief Gzipped file stream buffer class. - * - * This class implements basic_filebuf for gzipped files. It doesn't yet support - * seeking (allowed by zlib but slow/limited), putback and read/write access - * (tricky). Otherwise, it attempts to be a drop-in replacement for the standard - * file streambuf. -*/ -class gzfilebuf : public std::streambuf -{ -public: - // Default constructor. - gzfilebuf(); - - // Destructor. - virtual - ~gzfilebuf(); - - /** - * @brief Set compression level and strategy on the fly. - * @param comp_level Compression level (see zlib.h for allowed values) - * @param comp_strategy Compression strategy (see zlib.h for allowed values) - * @return Z_OK on success, Z_STREAM_ERROR otherwise. - * - * Unfortunately, these parameters cannot be modified separately, as the - * previous zfstream version assumed. Since the strategy is seldom changed, - * it can default and setcompression(level) then becomes like the old - * setcompressionlevel(level). - */ - int - setcompression(int comp_level, - int comp_strategy = Z_DEFAULT_STRATEGY); - - /** - * @brief Check if file is open. - * @return True if file is open. - */ - bool - is_open() const { return (file != NULL); } - - /** - * @brief Open gzipped file. - * @param name File name. - * @param mode Open mode flags. - * @return @c this on success, NULL on failure. - */ - gzfilebuf* - open(const char* name, - std::ios_base::openmode mode); - - /** - * @brief Attach to already open gzipped file. - * @param fd File descriptor. - * @param mode Open mode flags. - * @return @c this on success, NULL on failure. - */ - gzfilebuf* - attach(int fd, - std::ios_base::openmode mode); - - /** - * @brief Close gzipped file. - * @return @c this on success, NULL on failure. - */ - gzfilebuf* - close(); - -protected: - /** - * @brief Convert ios open mode int to mode string used by zlib. - * @return True if valid mode flag combination. - */ - bool - open_mode(std::ios_base::openmode mode, - char* c_mode) const; - - /** - * @brief Number of characters available in stream buffer. - * @return Number of characters. - * - * This indicates number of characters in get area of stream buffer. - * These characters can be read without accessing the gzipped file. - */ - virtual std::streamsize - showmanyc(); - - /** - * @brief Fill get area from gzipped file. - * @return First character in get area on success, EOF on error. - * - * This actually reads characters from gzipped file to stream - * buffer. Always buffered. - */ - virtual int_type - underflow(); - - /** - * @brief Write put area to gzipped file. - * @param c Extra character to add to buffer contents. - * @return Non-EOF on success, EOF on error. - * - * This actually writes characters in stream buffer to - * gzipped file. With unbuffered output this is done one - * character at a time. - */ - virtual int_type - overflow(int_type c = traits_type::eof()); - - /** - * @brief Installs external stream buffer. - * @param p Pointer to char buffer. - * @param n Size of external buffer. - * @return @c this on success, NULL on failure. - * - * Call setbuf(0,0) to enable unbuffered output. - */ - virtual std::streambuf* - setbuf(char_type* p, - std::streamsize n); - - /** - * @brief Flush stream buffer to file. - * @return 0 on success, -1 on error. - * - * This calls underflow(EOF) to do the job. - */ - virtual int - sync(); - -// -// Some future enhancements -// -// virtual int_type uflow(); -// virtual int_type pbackfail(int_type c = traits_type::eof()); -// virtual pos_type -// seekoff(off_type off, -// std::ios_base::seekdir way, -// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); -// virtual pos_type -// seekpos(pos_type sp, -// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); - -private: - /** - * @brief Allocate internal buffer. - * - * This function is safe to call multiple times. It will ensure - * that a proper internal buffer exists if it is required. If the - * buffer already exists or is external, the buffer pointers will be - * reset to their original state. - */ - void - enable_buffer(); - - /** - * @brief Destroy internal buffer. - * - * This function is safe to call multiple times. It will ensure - * that the internal buffer is deallocated if it exists. In any - * case, it will also reset the buffer pointers. - */ - void - disable_buffer(); - - /** - * Underlying file pointer. - */ - gzFile file; - - /** - * Mode in which file was opened. - */ - std::ios_base::openmode io_mode; - - /** - * @brief True if this object owns file descriptor. - * - * This makes the class responsible for closing the file - * upon destruction. - */ - bool own_fd; - - /** - * @brief Stream buffer. - * - * For simplicity this remains allocated on the free store for the - * entire life span of the gzfilebuf object, unless replaced by setbuf. - */ - char_type* buffer; - - /** - * @brief Stream buffer size. - * - * Defaults to system default buffer size (typically 8192 bytes). - * Modified by setbuf. - */ - std::streamsize buffer_size; - - /** - * @brief True if this object owns stream buffer. - * - * This makes the class responsible for deleting the buffer - * upon destruction. - */ - bool own_buffer; -}; - -/*****************************************************************************/ - -/** - * @brief Gzipped file input stream class. - * - * This class implements ifstream for gzipped files. Seeking and putback - * is not supported yet. -*/ -class gzifstream : public std::istream -{ -public: - // Default constructor - gzifstream(); - - /** - * @brief Construct stream on gzipped file to be opened. - * @param name File name. - * @param mode Open mode flags (forced to contain ios::in). - */ - explicit - gzifstream(const char* name, - std::ios_base::openmode mode = std::ios_base::in); - - /** - * @brief Construct stream on already open gzipped file. - * @param fd File descriptor. - * @param mode Open mode flags (forced to contain ios::in). - */ - explicit - gzifstream(int fd, - std::ios_base::openmode mode = std::ios_base::in); - - /** - * Obtain underlying stream buffer. - */ - gzfilebuf* - rdbuf() const - { return const_cast(&sb); } - - /** - * @brief Check if file is open. - * @return True if file is open. - */ - bool - is_open() { return sb.is_open(); } - - /** - * @brief Open gzipped file. - * @param name File name. - * @param mode Open mode flags (forced to contain ios::in). - * - * Stream will be in state good() if file opens successfully; - * otherwise in state fail(). This differs from the behavior of - * ifstream, which never sets the state to good() and therefore - * won't allow you to reuse the stream for a second file unless - * you manually clear() the state. The choice is a matter of - * convenience. - */ - void - open(const char* name, - std::ios_base::openmode mode = std::ios_base::in); - - /** - * @brief Attach to already open gzipped file. - * @param fd File descriptor. - * @param mode Open mode flags (forced to contain ios::in). - * - * Stream will be in state good() if attach succeeded; otherwise - * in state fail(). - */ - void - attach(int fd, - std::ios_base::openmode mode = std::ios_base::in); - - /** - * @brief Close gzipped file. - * - * Stream will be in state fail() if close failed. - */ - void - close(); - -private: - /** - * Underlying stream buffer. - */ - gzfilebuf sb; -}; - -/*****************************************************************************/ - -/** - * @brief Gzipped file output stream class. - * - * This class implements ofstream for gzipped files. Seeking and putback - * is not supported yet. -*/ -class gzofstream : public std::ostream -{ -public: - // Default constructor - gzofstream(); - - /** - * @brief Construct stream on gzipped file to be opened. - * @param name File name. - * @param mode Open mode flags (forced to contain ios::out). - */ - explicit - gzofstream(const char* name, - std::ios_base::openmode mode = std::ios_base::out); - - /** - * @brief Construct stream on already open gzipped file. - * @param fd File descriptor. - * @param mode Open mode flags (forced to contain ios::out). - */ - explicit - gzofstream(int fd, - std::ios_base::openmode mode = std::ios_base::out); - - /** - * Obtain underlying stream buffer. - */ - gzfilebuf* - rdbuf() const - { return const_cast(&sb); } - - /** - * @brief Check if file is open. - * @return True if file is open. - */ - bool - is_open() { return sb.is_open(); } - - /** - * @brief Open gzipped file. - * @param name File name. - * @param mode Open mode flags (forced to contain ios::out). - * - * Stream will be in state good() if file opens successfully; - * otherwise in state fail(). This differs from the behavior of - * ofstream, which never sets the state to good() and therefore - * won't allow you to reuse the stream for a second file unless - * you manually clear() the state. The choice is a matter of - * convenience. - */ - void - open(const char* name, - std::ios_base::openmode mode = std::ios_base::out); - - /** - * @brief Attach to already open gzipped file. - * @param fd File descriptor. - * @param mode Open mode flags (forced to contain ios::out). - * - * Stream will be in state good() if attach succeeded; otherwise - * in state fail(). - */ - void - attach(int fd, - std::ios_base::openmode mode = std::ios_base::out); - - /** - * @brief Close gzipped file. - * - * Stream will be in state fail() if close failed. - */ - void - close(); - -private: - /** - * Underlying stream buffer. - */ - gzfilebuf sb; -}; - -/*****************************************************************************/ - -/** - * @brief Gzipped file output stream manipulator class. - * - * This class defines a two-argument manipulator for gzofstream. It is used - * as base for the setcompression(int,int) manipulator. -*/ -template - class gzomanip2 - { - public: - // Allows inserter to peek at internals - template - friend gzofstream& - operator<<(gzofstream&, - const gzomanip2&); - - // Constructor - gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2), - T1 v1, - T2 v2); - private: - // Underlying manipulator function - gzofstream& - (*func)(gzofstream&, T1, T2); - - // Arguments for manipulator function - T1 val1; - T2 val2; - }; - -/*****************************************************************************/ - -// Manipulator function thunks through to stream buffer -inline gzofstream& -setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY) -{ - (gzs.rdbuf())->setcompression(l, s); - return gzs; -} - -// Manipulator constructor stores arguments -template - inline - gzomanip2::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2), - T1 v1, - T2 v2) - : func(f), val1(v1), val2(v2) - { } - -// Inserter applies underlying manipulator function to stream -template - inline gzofstream& - operator<<(gzofstream& s, const gzomanip2& m) - { return (*m.func)(s, m.val1, m.val2); } - -// Insert this onto stream to simplify setting of compression level -inline gzomanip2 -setcompression(int l, int s = Z_DEFAULT_STRATEGY) -{ return gzomanip2(&setcompression, l, s); } - -#endif // ZFSTREAM_H - diff --git a/third_party/zlib/contrib/minizip/Makefile b/third_party/zlib/contrib/minizip/Makefile deleted file mode 100644 index 3d927ec..0000000 --- a/third_party/zlib/contrib/minizip/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -CC?=cc -CFLAGS := $(CFLAGS) -O -I../.. - -UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a -ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a - -.c.o: - $(CC) -c $(CFLAGS) $*.c - -all: miniunz minizip - -miniunz: $(UNZ_OBJS) - $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) - -minizip: $(ZIP_OBJS) - $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) - -test: miniunz minizip - @rm -f test.* - @echo hello hello hello > test.txt - ./minizip test test.txt - ./miniunz -l test.zip - @mv test.txt test.old - ./miniunz test.zip - @cmp test.txt test.old - @rm -f test.* - -clean: - /bin/rm -f *.o *~ minizip miniunz test.* diff --git a/third_party/zlib/contrib/minizip/Makefile.am b/third_party/zlib/contrib/minizip/Makefile.am deleted file mode 100644 index d343011..0000000 --- a/third_party/zlib/contrib/minizip/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -lib_LTLIBRARIES = libminizip.la - -if COND_DEMOS -bin_PROGRAMS = miniunzip minizip -endif - -zlib_top_srcdir = $(top_srcdir)/../.. -zlib_top_builddir = $(top_builddir)/../.. - -AM_CPPFLAGS = -I$(zlib_top_srcdir) -AM_LDFLAGS = -L$(zlib_top_builddir) - -if WIN32 -iowin32_src = iowin32.c -iowin32_h = iowin32.h -endif - -libminizip_la_SOURCES = \ - ioapi.c \ - mztools.c \ - unzip.c \ - zip.c \ - ${iowin32_src} - -libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz - -minizip_includedir = $(includedir)/minizip -minizip_include_HEADERS = \ - crypt.h \ - ioapi.h \ - mztools.h \ - unzip.h \ - zip.h \ - ${iowin32_h} - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = minizip.pc - -EXTRA_PROGRAMS = miniunzip minizip - -miniunzip_SOURCES = miniunz.c -miniunzip_LDADD = libminizip.la - -minizip_SOURCES = minizip.c -minizip_LDADD = libminizip.la -lz diff --git a/third_party/zlib/contrib/minizip/MiniZip64_Changes.txt b/third_party/zlib/contrib/minizip/MiniZip64_Changes.txt deleted file mode 100644 index 3759468..0000000 --- a/third_party/zlib/contrib/minizip/MiniZip64_Changes.txt +++ /dev/null @@ -1,6 +0,0 @@ - -MiniZip 1.1 was derived from MiniZip at version 1.01f - -Change in 1.0 (Okt 2009) - - **TODO - Add history** - diff --git a/third_party/zlib/contrib/minizip/MiniZip64_info.txt b/third_party/zlib/contrib/minizip/MiniZip64_info.txt deleted file mode 100644 index 57d7152..0000000 --- a/third_party/zlib/contrib/minizip/MiniZip64_info.txt +++ /dev/null @@ -1,74 +0,0 @@ -MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson - -Introduction ---------------------- -MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html ) - -When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0. -All possible work was done for compatibility. - - -Background ---------------------- -When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 -support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ ) - -That was used as a starting point. And after that ZIP64 support was added to zip.c -some refactoring and code cleanup was also done. - - -Changed from MiniZip 1.0 to MiniZip 1.1 ---------------------------------------- -* Added ZIP64 support for unzip ( by Even Rouault ) -* Added ZIP64 support for zip ( by Mathias Svensson ) -* Reverted some changed that Even Rouault did. -* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users. -* Added unzip patch for BZIP Compression method (patch create by Daniel Borca) -* Added BZIP Compress method for zip -* Did some refactoring and code cleanup - - -Credits - - Gilles Vollant - Original MiniZip author - Even Rouault - ZIP64 unzip Support - Daniel Borca - BZip Compression method support in unzip - Mathias Svensson - ZIP64 zip support - Mathias Svensson - BZip Compression method support in zip - - Resources - - ZipLayout http://result42.com/projects/ZipFileLayout - Command line tool for Windows that shows the layout and information of the headers in a zip archive. - Used when debugging and validating the creation of zip files using MiniZip64 - - - ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT - Zip File specification - - -Notes. - * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined. - -License ----------------------------------------------------------- - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - ----------------------------------------------------------- - diff --git a/third_party/zlib/contrib/minizip/configure.ac b/third_party/zlib/contrib/minizip/configure.ac deleted file mode 100644 index 15ec917..0000000 --- a/third_party/zlib/contrib/minizip/configure.ac +++ /dev/null @@ -1,32 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_INIT([minizip], [1.3.1], [bugzilla.redhat.com]) -AC_CONFIG_SRCDIR([minizip.c]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT - -AC_MSG_CHECKING([whether to build example programs]) -AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) -AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) -if test "$enable_demos" = yes -then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -case "${host}" in - *-mingw* | mingw*) - WIN32="yes" - ;; - *) - ;; -esac -AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) - - -AC_SUBST([HAVE_UNISTD_H], [0]) -AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) -AC_CONFIG_FILES([Makefile minizip.pc]) -AC_OUTPUT diff --git a/third_party/zlib/contrib/minizip/crypt.h b/third_party/zlib/contrib/minizip/crypt.h deleted file mode 100644 index 4d17542..0000000 --- a/third_party/zlib/contrib/minizip/crypt.h +++ /dev/null @@ -1,129 +0,0 @@ -/* crypt.h -- base code for crypt/uncrypt ZIPfile - - - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - - This code is a modified version of crypting code in Infozip distribution - - The encryption/decryption parts of this source code (as opposed to the - non-echoing password parts) were originally written in Europe. The - whole source package can be freely distributed, including from the USA. - (Prior to January 2000, re-export from the US was a violation of US law.) - - This encryption code is a direct transcription of the algorithm from - Roger Schlafly, described by Phil Katz in the file appnote.txt. This - file (appnote.txt) is distributed with the PKZIP program (even in the - version without encryption capabilities). - - If you don't need crypting in your application, just define symbols - NOCRYPT and NOUNCRYPT. - - This code support the "Traditional PKWARE Encryption". - - The new AES encryption added on Zip format by Winzip (see the page - http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong - Encryption is not supported. -*/ - -#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) - -/*********************************************************************** - * Return the next byte in the pseudo-random sequence - */ -static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) { - unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an - * unpredictable manner on 16-bit systems; not a problem - * with any known compiler so far, though */ - - (void)pcrc_32_tab; - temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; - return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); -} - -/*********************************************************************** - * Update the encryption keys with the next byte of plain text - */ -static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) { - (*(pkeys+0)) = CRC32((*(pkeys+0)), c); - (*(pkeys+1)) += (*(pkeys+0)) & 0xff; - (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; - { - register int keyshift = (int)((*(pkeys+1)) >> 24); - (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); - } - return c; -} - - -/*********************************************************************** - * Initialize the encryption keys and the random header according to - * the given password. - */ -static void init_keys(const char* passwd, unsigned long* pkeys, const z_crc_t* pcrc_32_tab) { - *(pkeys+0) = 305419896L; - *(pkeys+1) = 591751049L; - *(pkeys+2) = 878082192L; - while (*passwd != '\0') { - update_keys(pkeys,pcrc_32_tab,(int)*passwd); - passwd++; - } -} - -#define zdecode(pkeys,pcrc_32_tab,c) \ - (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) - -#define zencode(pkeys,pcrc_32_tab,c,t) \ - (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), (Byte)t^(c)) - -#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED - -#define RAND_HEAD_LEN 12 - /* "last resort" source for second part of crypt seed pattern */ -# ifndef ZCR_SEED2 -# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ -# endif - -static unsigned crypthead(const char* passwd, /* password string */ - unsigned char* buf, /* where to write header */ - int bufSize, - unsigned long* pkeys, - const z_crc_t* pcrc_32_tab, - unsigned long crcForCrypting) { - unsigned n; /* index in random header */ - int t; /* temporary */ - int c; /* random byte */ - unsigned char header[RAND_HEAD_LEN-2]; /* random header */ - static unsigned calls = 0; /* ensure different random header each time */ - - if (bufSize> 7) & 0xff; - header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); - } - /* Encrypt random header (last two bytes is high word of crc) */ - init_keys(passwd, pkeys, pcrc_32_tab); - for (n = 0; n < RAND_HEAD_LEN-2; n++) - { - buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); - } - buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); - buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); - return n; -} - -#endif - diff --git a/third_party/zlib/contrib/minizip/ioapi.c b/third_party/zlib/contrib/minizip/ioapi.c deleted file mode 100644 index 782d324..0000000 --- a/third_party/zlib/contrib/minizip/ioapi.c +++ /dev/null @@ -1,231 +0,0 @@ -/* ioapi.h -- IO base function header for compress/uncompress .zip - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - -*/ - -#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) - #define _CRT_SECURE_NO_WARNINGS -#endif - -#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) -// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions -#define FOPEN_FUNC(filename, mode) fopen(filename, mode) -#define FTELLO_FUNC(stream) ftello(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) -#else -#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) -#define FTELLO_FUNC(stream) ftello64(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) -#endif - - -#include "ioapi.h" - -voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc, const void*filename, int mode) { - if (pfilefunc->zfile_func64.zopen64_file != NULL) - return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); - else - { - return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); - } -} - -long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) { - if (pfilefunc->zfile_func64.zseek64_file != NULL) - return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); - else - { - uLong offsetTruncated = (uLong)offset; - if (offsetTruncated != offset) - return -1; - else - return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); - } -} - -ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc, voidpf filestream) { - if (pfilefunc->zfile_func64.zseek64_file != NULL) - return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); - else - { - uLong tell_uLong = (uLong)(*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); - if ((tell_uLong) == MAXU32) - return (ZPOS64_T)-1; - else - return tell_uLong; - } -} - -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32, const zlib_filefunc_def* p_filefunc32) { - p_filefunc64_32->zfile_func64.zopen64_file = NULL; - p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; - p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; - p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; - p_filefunc64_32->zfile_func64.ztell64_file = NULL; - p_filefunc64_32->zfile_func64.zseek64_file = NULL; - p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; - p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; - p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; - p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; - p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; -} - - - -static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char* filename, int mode) { - FILE* file = NULL; - const char* mode_fopen = NULL; - (void)opaque; - if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) - mode_fopen = "rb"; - else - if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - mode_fopen = "r+b"; - else - if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mode_fopen = "wb"; - - if ((filename!=NULL) && (mode_fopen != NULL)) - file = fopen(filename, mode_fopen); - return file; -} - -static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void* filename, int mode) { - FILE* file = NULL; - const char* mode_fopen = NULL; - (void)opaque; - if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) - mode_fopen = "rb"; - else - if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - mode_fopen = "r+b"; - else - if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mode_fopen = "wb"; - - if ((filename!=NULL) && (mode_fopen != NULL)) - file = FOPEN_FUNC((const char*)filename, mode_fopen); - return file; -} - - -static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void* buf, uLong size) { - uLong ret; - (void)opaque; - ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); - return ret; -} - -static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) { - uLong ret; - (void)opaque; - ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); - return ret; -} - -static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream) { - long ret; - (void)opaque; - ret = ftell((FILE *)stream); - return ret; -} - - -static ZPOS64_T ZCALLBACK ftell64_file_func(voidpf opaque, voidpf stream) { - ZPOS64_T ret; - (void)opaque; - ret = (ZPOS64_T)FTELLO_FUNC((FILE *)stream); - return ret; -} - -static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) { - int fseek_origin=0; - long ret; - (void)opaque; - switch (origin) - { - case ZLIB_FILEFUNC_SEEK_CUR : - fseek_origin = SEEK_CUR; - break; - case ZLIB_FILEFUNC_SEEK_END : - fseek_origin = SEEK_END; - break; - case ZLIB_FILEFUNC_SEEK_SET : - fseek_origin = SEEK_SET; - break; - default: return -1; - } - ret = 0; - if (fseek((FILE *)stream, (long)offset, fseek_origin) != 0) - ret = -1; - return ret; -} - -static long ZCALLBACK fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { - int fseek_origin=0; - long ret; - (void)opaque; - switch (origin) - { - case ZLIB_FILEFUNC_SEEK_CUR : - fseek_origin = SEEK_CUR; - break; - case ZLIB_FILEFUNC_SEEK_END : - fseek_origin = SEEK_END; - break; - case ZLIB_FILEFUNC_SEEK_SET : - fseek_origin = SEEK_SET; - break; - default: return -1; - } - ret = 0; - - if(FSEEKO_FUNC((FILE *)stream, (z_off64_t)offset, fseek_origin) != 0) - ret = -1; - - return ret; -} - - -static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream) { - int ret; - (void)opaque; - ret = fclose((FILE *)stream); - return ret; -} - -static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream) { - int ret; - (void)opaque; - ret = ferror((FILE *)stream); - return ret; -} - -void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen_file = fopen_file_func; - pzlib_filefunc_def->zread_file = fread_file_func; - pzlib_filefunc_def->zwrite_file = fwrite_file_func; - pzlib_filefunc_def->ztell_file = ftell_file_func; - pzlib_filefunc_def->zseek_file = fseek_file_func; - pzlib_filefunc_def->zclose_file = fclose_file_func; - pzlib_filefunc_def->zerror_file = ferror_file_func; - pzlib_filefunc_def->opaque = NULL; -} - -void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen64_file = fopen64_file_func; - pzlib_filefunc_def->zread_file = fread_file_func; - pzlib_filefunc_def->zwrite_file = fwrite_file_func; - pzlib_filefunc_def->ztell64_file = ftell64_file_func; - pzlib_filefunc_def->zseek64_file = fseek64_file_func; - pzlib_filefunc_def->zclose_file = fclose_file_func; - pzlib_filefunc_def->zerror_file = ferror_file_func; - pzlib_filefunc_def->opaque = NULL; -} diff --git a/third_party/zlib/contrib/minizip/ioapi.h b/third_party/zlib/contrib/minizip/ioapi.h deleted file mode 100644 index 8b1d0da..0000000 --- a/third_party/zlib/contrib/minizip/ioapi.h +++ /dev/null @@ -1,211 +0,0 @@ -/* ioapi.h -- IO base function header for compress/uncompress .zip - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - Changes - - Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) - Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. - More if/def section may be needed to support other platforms - Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. - (but you should use iowin32.c for windows instead) - -*/ - -#ifndef _ZLIBIOAPI64_H -#define _ZLIBIOAPI64_H - -#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) - - // Linux needs this to support file operation on files larger then 4+GB - // But might need better if/def to select just the platforms that needs them. - - #ifndef __USE_FILE_OFFSET64 - #define __USE_FILE_OFFSET64 - #endif - #ifndef __USE_LARGEFILE64 - #define __USE_LARGEFILE64 - #endif - #ifndef _LARGEFILE64_SOURCE - #define _LARGEFILE64_SOURCE - #endif - #ifndef _FILE_OFFSET_BIT - #define _FILE_OFFSET_BIT 64 - #endif - -#endif - -#include -#include -#include "zlib.h" - -#if defined(USE_FILE32API) -#define fopen64 fopen -#define ftello64 ftell -#define fseeko64 fseek -#else -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) -#define fopen64 fopen -#define ftello64 ftello -#define fseeko64 fseeko -#endif -#ifdef _MSC_VER - #define fopen64 fopen - #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) - #define ftello64 _ftelli64 - #define fseeko64 _fseeki64 - #else // old MSC - #define ftello64 ftell - #define fseeko64 fseek - #endif -#endif -#endif - -/* -#ifndef ZPOS64_T - #ifdef _WIN32 - #define ZPOS64_T fpos_t - #else - #include - #define ZPOS64_T uint64_t - #endif -#endif -*/ - -#ifdef HAVE_MINIZIP64_CONF_H -#include "mz64conf.h" -#endif - -/* a type chosen by DEFINE */ -#ifdef HAVE_64BIT_INT_CUSTOM -typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; -#else -#ifdef HAS_STDINT_H -#include "stdint.h" -typedef uint64_t ZPOS64_T; -#else - - - -#if defined(_MSC_VER) || defined(__BORLANDC__) -typedef unsigned __int64 ZPOS64_T; -#else -typedef unsigned long long int ZPOS64_T; -#endif -#endif -#endif - -/* Maximum unsigned 32-bit value used as placeholder for zip64 */ -#ifndef MAXU32 -#define MAXU32 (0xffffffff) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -#define ZLIB_FILEFUNC_SEEK_CUR (1) -#define ZLIB_FILEFUNC_SEEK_END (2) -#define ZLIB_FILEFUNC_SEEK_SET (0) - -#define ZLIB_FILEFUNC_MODE_READ (1) -#define ZLIB_FILEFUNC_MODE_WRITE (2) -#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) - -#define ZLIB_FILEFUNC_MODE_EXISTING (4) -#define ZLIB_FILEFUNC_MODE_CREATE (8) - - -#ifndef ZCALLBACK - #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) - #define ZCALLBACK CALLBACK - #else - #define ZCALLBACK - #endif -#endif - - - - -typedef voidpf (ZCALLBACK *open_file_func) (voidpf opaque, const char* filename, int mode); -typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size); -typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf stream, const void* buf, uLong size); -typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream); -typedef int (ZCALLBACK *testerror_file_func) (voidpf opaque, voidpf stream); - -typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream); -typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin); - - -/* here is the "old" 32 bits structure */ -typedef struct zlib_filefunc_def_s -{ - open_file_func zopen_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell_file_func ztell_file; - seek_file_func zseek_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc_def; - -typedef ZPOS64_T (ZCALLBACK *tell64_file_func) (voidpf opaque, voidpf stream); -typedef long (ZCALLBACK *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin); -typedef voidpf (ZCALLBACK *open64_file_func) (voidpf opaque, const void* filename, int mode); - -typedef struct zlib_filefunc64_def_s -{ - open64_file_func zopen64_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell64_file_func ztell64_file; - seek64_file_func zseek64_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc64_def; - -void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def); -void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def); - -/* now internal definition, only for zip.c and unzip.h */ -typedef struct zlib_filefunc64_32_def_s -{ - zlib_filefunc64_def zfile_func64; - open_file_func zopen32_file; - tell_file_func ztell32_file; - seek_file_func zseek32_file; -} zlib_filefunc64_32_def; - - -#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) -//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) -#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) -#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) - -voidpf call_zopen64(const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode); -long call_zseek64(const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin); -ZPOS64_T call_ztell64(const zlib_filefunc64_32_def* pfilefunc,voidpf filestream); - -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); - -#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) -#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) -#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/third_party/zlib/contrib/minizip/iowin32.c b/third_party/zlib/contrib/minizip/iowin32.c deleted file mode 100644 index 08536e9..0000000 --- a/third_party/zlib/contrib/minizip/iowin32.c +++ /dev/null @@ -1,440 +0,0 @@ -/* iowin32.c -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - -*/ - -#include - -#include "zlib.h" -#include "ioapi.h" -#include "iowin32.h" - -#ifndef INVALID_HANDLE_VALUE -#define INVALID_HANDLE_VALUE (0xFFFFFFFF) -#endif - -#ifndef INVALID_SET_FILE_POINTER -#define INVALID_SET_FILE_POINTER ((DWORD)-1) -#endif - - -// see Include/shared/winapifamily.h in the Windows Kit -#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) - -#if !defined(WINAPI_FAMILY_ONE_PARTITION) -#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition) -#endif - -#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) -#define IOWIN32_USING_WINRT_API 1 -#endif -#endif - -typedef struct -{ - HANDLE hf; - int error; -} WIN32FILE_IOWIN; - - -static void win32_translate_open_mode(int mode, - DWORD* lpdwDesiredAccess, - DWORD* lpdwCreationDisposition, - DWORD* lpdwShareMode, - DWORD* lpdwFlagsAndAttributes) { - *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0; - - if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) - { - *lpdwDesiredAccess = GENERIC_READ; - *lpdwCreationDisposition = OPEN_EXISTING; - *lpdwShareMode = FILE_SHARE_READ; - } - else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - { - *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; - *lpdwCreationDisposition = OPEN_EXISTING; - } - else if (mode & ZLIB_FILEFUNC_MODE_CREATE) - { - *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; - *lpdwCreationDisposition = CREATE_ALWAYS; - } -} - -static voidpf win32_build_iowin(HANDLE hFile) { - voidpf ret=NULL; - - if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) - { - WIN32FILE_IOWIN w32fiow; - w32fiow.hf = hFile; - w32fiow.error = 0; - ret = malloc(sizeof(WIN32FILE_IOWIN)); - - if (ret==NULL) - CloseHandle(hFile); - else - *((WIN32FILE_IOWIN*)ret) = w32fiow; - } - return ret; -} - -voidpf ZCALLBACK win32_open64_file_func(voidpf opaque, const void* filename, int mode) { - const char* mode_fopen = NULL; - DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; - HANDLE hFile = NULL; - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -#ifdef IOWIN32_USING_WINRT_API -#ifdef UNICODE - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - { - WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; - MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); - hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); - } -#endif -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -#endif - - return win32_build_iowin(hFile); -} - - -voidpf ZCALLBACK win32_open64_file_funcA(voidpf opaque, const void* filename, int mode) { - const char* mode_fopen = NULL; - DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; - HANDLE hFile = NULL; - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -#ifdef IOWIN32_USING_WINRT_API - if ((filename!=NULL) && (dwDesiredAccess != 0)) - { - WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; - MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); - hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); - } -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -#endif - - return win32_build_iowin(hFile); -} - - -voidpf ZCALLBACK win32_open64_file_funcW(voidpf opaque, const void* filename, int mode) { - const char* mode_fopen = NULL; - DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; - HANDLE hFile = NULL; - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -#ifdef IOWIN32_USING_WINRT_API - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile2((LPCWSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition,NULL); -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -#endif - - return win32_build_iowin(hFile); -} - - -voidpf ZCALLBACK win32_open_file_func(voidpf opaque, const char* filename, int mode) { - const char* mode_fopen = NULL; - DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; - HANDLE hFile = NULL; - - win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); - -#ifdef IOWIN32_USING_WINRT_API -#ifdef UNICODE - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - { - WCHAR filenameW[FILENAME_MAX + 0x200 + 1]; - MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); - hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL); - } -#endif -#else - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); -#endif - - return win32_build_iowin(hFile); -} - - -uLong ZCALLBACK win32_read_file_func(voidpf opaque, voidpf stream, void* buf,uLong size) { - uLong ret=0; - HANDLE hFile = NULL; - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - - if (hFile != NULL) - { - if (!ReadFile(hFile, buf, size, &ret, NULL)) - { - DWORD dwErr = GetLastError(); - if (dwErr == ERROR_HANDLE_EOF) - dwErr = 0; - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - } - } - - return ret; -} - - -uLong ZCALLBACK win32_write_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) { - uLong ret=0; - HANDLE hFile = NULL; - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - - if (hFile != NULL) - { - if (!WriteFile(hFile, buf, size, &ret, NULL)) - { - DWORD dwErr = GetLastError(); - if (dwErr == ERROR_HANDLE_EOF) - dwErr = 0; - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - } - } - - return ret; -} - -static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) { -#ifdef IOWIN32_USING_WINRT_API - return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); -#else - LONG lHigh = pos.HighPart; - DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, dwMoveMethod); - BOOL fOk = TRUE; - if (dwNewPos == 0xFFFFFFFF) - if (GetLastError() != NO_ERROR) - fOk = FALSE; - if ((newPos != NULL) && (fOk)) - { - newPos->LowPart = dwNewPos; - newPos->HighPart = lHigh; - } - return fOk; -#endif -} - -long ZCALLBACK win32_tell_file_func(voidpf opaque, voidpf stream) { - long ret=-1; - HANDLE hFile = NULL; - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - if (hFile != NULL) - { - LARGE_INTEGER pos; - pos.QuadPart = 0; - - if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = -1; - } - else - ret=(long)pos.LowPart; - } - return ret; -} - -ZPOS64_T ZCALLBACK win32_tell64_file_func(voidpf opaque, voidpf stream) { - ZPOS64_T ret= (ZPOS64_T)-1; - HANDLE hFile = NULL; - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream)->hf; - - if (hFile) - { - LARGE_INTEGER pos; - pos.QuadPart = 0; - - if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = (ZPOS64_T)-1; - } - else - ret=pos.QuadPart; - } - return ret; -} - - -long ZCALLBACK win32_seek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) { - DWORD dwMoveMethod=0xFFFFFFFF; - HANDLE hFile = NULL; - - long ret=-1; - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - switch (origin) - { - case ZLIB_FILEFUNC_SEEK_CUR : - dwMoveMethod = FILE_CURRENT; - break; - case ZLIB_FILEFUNC_SEEK_END : - dwMoveMethod = FILE_END; - break; - case ZLIB_FILEFUNC_SEEK_SET : - dwMoveMethod = FILE_BEGIN; - break; - default: return -1; - } - - if (hFile != NULL) - { - LARGE_INTEGER pos; - pos.QuadPart = offset; - if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = -1; - } - else - ret=0; - } - return ret; -} - -long ZCALLBACK win32_seek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { - DWORD dwMoveMethod=0xFFFFFFFF; - HANDLE hFile = NULL; - long ret=-1; - - if (stream!=NULL) - hFile = ((WIN32FILE_IOWIN*)stream)->hf; - - switch (origin) - { - case ZLIB_FILEFUNC_SEEK_CUR : - dwMoveMethod = FILE_CURRENT; - break; - case ZLIB_FILEFUNC_SEEK_END : - dwMoveMethod = FILE_END; - break; - case ZLIB_FILEFUNC_SEEK_SET : - dwMoveMethod = FILE_BEGIN; - break; - default: return -1; - } - - if (hFile) - { - LARGE_INTEGER pos; - pos.QuadPart = offset; - if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) - { - DWORD dwErr = GetLastError(); - ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; - ret = -1; - } - else - ret=0; - } - return ret; -} - -int ZCALLBACK win32_close_file_func(voidpf opaque, voidpf stream) { - int ret=-1; - - if (stream!=NULL) - { - HANDLE hFile; - hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - if (hFile != NULL) - { - CloseHandle(hFile); - ret=0; - } - free(stream); - } - return ret; -} - -int ZCALLBACK win32_error_file_func(voidpf opaque, voidpf stream) { - int ret=-1; - if (stream!=NULL) - { - ret = ((WIN32FILE_IOWIN*)stream) -> error; - } - return ret; -} - -void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen_file = win32_open_file_func; - pzlib_filefunc_def->zread_file = win32_read_file_func; - pzlib_filefunc_def->zwrite_file = win32_write_file_func; - pzlib_filefunc_def->ztell_file = win32_tell_file_func; - pzlib_filefunc_def->zseek_file = win32_seek_file_func; - pzlib_filefunc_def->zclose_file = win32_close_file_func; - pzlib_filefunc_def->zerror_file = win32_error_file_func; - pzlib_filefunc_def->opaque = NULL; -} - -void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen64_file = win32_open64_file_func; - pzlib_filefunc_def->zread_file = win32_read_file_func; - pzlib_filefunc_def->zwrite_file = win32_write_file_func; - pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; - pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; - pzlib_filefunc_def->zclose_file = win32_close_file_func; - pzlib_filefunc_def->zerror_file = win32_error_file_func; - pzlib_filefunc_def->opaque = NULL; -} - - -void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA; - pzlib_filefunc_def->zread_file = win32_read_file_func; - pzlib_filefunc_def->zwrite_file = win32_write_file_func; - pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; - pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; - pzlib_filefunc_def->zclose_file = win32_close_file_func; - pzlib_filefunc_def->zerror_file = win32_error_file_func; - pzlib_filefunc_def->opaque = NULL; -} - - -void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW; - pzlib_filefunc_def->zread_file = win32_read_file_func; - pzlib_filefunc_def->zwrite_file = win32_write_file_func; - pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; - pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; - pzlib_filefunc_def->zclose_file = win32_close_file_func; - pzlib_filefunc_def->zerror_file = win32_error_file_func; - pzlib_filefunc_def->opaque = NULL; -} diff --git a/third_party/zlib/contrib/minizip/iowin32.h b/third_party/zlib/contrib/minizip/iowin32.h deleted file mode 100644 index f71ef7e..0000000 --- a/third_party/zlib/contrib/minizip/iowin32.h +++ /dev/null @@ -1,29 +0,0 @@ -/* iowin32.h -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - -*/ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def); -void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def); -void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def); -void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def); - -#ifdef __cplusplus -} -#endif - diff --git a/third_party/zlib/contrib/minizip/make_vms.com b/third_party/zlib/contrib/minizip/make_vms.com deleted file mode 100644 index 9ac13a9..0000000 --- a/third_party/zlib/contrib/minizip/make_vms.com +++ /dev/null @@ -1,25 +0,0 @@ -$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig -$ open/write zdef vmsdefs.h -$ copy sys$input: zdef -$ deck -#define unix -#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from -#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator -#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord -#define Write_EndOfCentralDirectoryRecord Write_EoDRecord -$ eod -$ close zdef -$ copy vmsdefs.h,ioapi.h_orig ioapi.h -$ cc/include=[--]/prefix=all ioapi.c -$ cc/include=[--]/prefix=all miniunz.c -$ cc/include=[--]/prefix=all unzip.c -$ cc/include=[--]/prefix=all minizip.c -$ cc/include=[--]/prefix=all zip.c -$ link miniunz,unzip,ioapi,[--]libz.olb/lib -$ link minizip,zip,ioapi,[--]libz.olb/lib -$ mcr []minizip test minizip_info.txt -$ mcr []miniunz -l test.zip -$ rename minizip_info.txt; minizip_info.txt_old -$ mcr []miniunz test.zip -$ delete test.zip;* -$exit diff --git a/third_party/zlib/contrib/minizip/miniunz.c b/third_party/zlib/contrib/minizip/miniunz.c deleted file mode 100644 index d627c42..0000000 --- a/third_party/zlib/contrib/minizip/miniunz.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - miniunz.c - Version 1.1, February 14h, 2010 - sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications of Unzip for Zip64 - Copyright (C) 2007-2008 Even Rouault - - Modifications for Zip64 support on both zip and unzip - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) -*/ - -#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) - #ifndef __USE_FILE_OFFSET64 - #define __USE_FILE_OFFSET64 - #endif - #ifndef __USE_LARGEFILE64 - #define __USE_LARGEFILE64 - #endif - #ifndef _LARGEFILE64_SOURCE - #define _LARGEFILE64_SOURCE - #endif - #ifndef _FILE_OFFSET_BIT - #define _FILE_OFFSET_BIT 64 - #endif -#endif - -#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) -// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions -#define FOPEN_FUNC(filename, mode) fopen(filename, mode) -#define FTELLO_FUNC(stream) ftello(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) -#else -#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) -#define FTELLO_FUNC(stream) ftello64(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) -#endif - - -#include -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 -# include -# include -#else -# include -# include -#endif - - -#include "unzip.h" - -#define CASESENSITIVITY (0) -#define WRITEBUFFERSIZE (8192) -#define MAXFILENAME (256) - -#ifdef _WIN32 -#define USEWIN32IOAPI -#include "iowin32.h" -#endif -/* - mini unzip, demo of unzip package - - usage : - Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir] - - list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT - if it exists -*/ - - -/* change_file_date : change the date/time of a file - filename : the filename of the file where date/time must be modified - dosdate : the new date at the MSDOS format (4 bytes) - tmu_date : the SAME new date at the tm_unz format */ -static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) { -#ifdef _WIN32 - HANDLE hFile; - FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; - - hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE, - 0,NULL,OPEN_EXISTING,0,NULL); - GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); - DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); - LocalFileTimeToFileTime(&ftLocal,&ftm); - SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); - CloseHandle(hFile); -#else -#if defined(unix) || defined(__APPLE__) - (void)dosdate; - struct utimbuf ut; - struct tm newdate; - newdate.tm_sec = tmu_date.tm_sec; - newdate.tm_min=tmu_date.tm_min; - newdate.tm_hour=tmu_date.tm_hour; - newdate.tm_mday=tmu_date.tm_mday; - newdate.tm_mon=tmu_date.tm_mon; - if (tmu_date.tm_year > 1900) - newdate.tm_year=tmu_date.tm_year - 1900; - else - newdate.tm_year=tmu_date.tm_year ; - newdate.tm_isdst=-1; - - ut.actime=ut.modtime=mktime(&newdate); - utime(filename,&ut); -#else - (void)filename; - (void)dosdate; - (void)tmu_date; -#endif -#endif -} - - -/* mymkdir and change_file_date are not 100 % portable - As I don't know well Unix, I wait feedback for the unix portion */ - -static int mymkdir(const char* dirname) { - int ret=0; -#ifdef _WIN32 - ret = _mkdir(dirname); -#elif unix - ret = mkdir (dirname,0775); -#elif __APPLE__ - ret = mkdir (dirname,0775); -#else - (void)dirname; -#endif - return ret; -} - -static int makedir(const char *newdir) { - char *buffer ; - char *p; - size_t len = strlen(newdir); - - if (len == 0) - return 0; - - buffer = (char*)malloc(len+1); - if (buffer==NULL) - { - printf("Error allocating memory\n"); - return UNZ_INTERNALERROR; - } - strcpy(buffer,newdir); - - if (buffer[len-1] == '/') { - buffer[len-1] = '\0'; - } - if (mymkdir(buffer) == 0) - { - free(buffer); - return 1; - } - - p = buffer+1; - while (1) - { - char hold; - - while(*p && *p != '\\' && *p != '/') - p++; - hold = *p; - *p = 0; - if ((mymkdir(buffer) == -1) && (errno == ENOENT)) - { - printf("couldn't create directory %s\n",buffer); - free(buffer); - return 0; - } - if (hold == 0) - break; - *p++ = hold; - } - free(buffer); - return 1; -} - -static void do_banner(void) { - printf("MiniUnz 1.1, demo of zLib + Unz package written by Gilles Vollant\n"); - printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); -} - -static void do_help(void) { - printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ - " -e Extract without pathname (junk paths)\n" \ - " -x Extract with pathname\n" \ - " -v list files\n" \ - " -l list files\n" \ - " -d directory to extract into\n" \ - " -o overwrite files without prompting\n" \ - " -p extract encrypted file using password\n\n"); -} - -static void Display64BitsSize(ZPOS64_T n, int size_char) { - /* to avoid compatibility problem , we do here the conversion */ - char number[21]; - int offset=19; - int pos_string = 19; - number[20]=0; - for (;;) { - number[offset]=(char)((n%10)+'0'); - if (number[offset] != '0') - pos_string=offset; - n/=10; - if (offset==0) - break; - offset--; - } - { - int size_display_string = 19-pos_string; - while (size_char > size_display_string) - { - size_char--; - printf(" "); - } - } - - printf("%s",&number[pos_string]); -} - -static int do_list(unzFile uf) { - uLong i; - unz_global_info64 gi; - int err; - - err = unzGetGlobalInfo64(uf,&gi); - if (err!=UNZ_OK) - printf("error %d with zipfile in unzGetGlobalInfo \n",err); - printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); - printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); - for (i=0;i0) - ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size); - - /* display a '*' if the file is encrypted */ - if ((file_info.flag & 1) != 0) - charCrypt='*'; - - if (file_info.compression_method==0) - string_method="Stored"; - else - if (file_info.compression_method==Z_DEFLATED) - { - uInt iLevel=(uInt)((file_info.flag & 0x6)/2); - if (iLevel==0) - string_method="Defl:N"; - else if (iLevel==1) - string_method="Defl:X"; - else if ((iLevel==2) || (iLevel==3)) - string_method="Defl:F"; /* 2:fast , 3 : extra fast*/ - } - else - if (file_info.compression_method==Z_BZIP2ED) - { - string_method="BZip2 "; - } - else - string_method="Unkn. "; - - Display64BitsSize(file_info.uncompressed_size,7); - printf(" %6s%c",string_method,charCrypt); - Display64BitsSize(file_info.compressed_size,7); - printf(" %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", - ratio, - (uLong)file_info.tmu_date.tm_mon + 1, - (uLong)file_info.tmu_date.tm_mday, - (uLong)file_info.tmu_date.tm_year % 100, - (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min, - (uLong)file_info.crc,filename_inzip); - if ((i+1)='a') && (rep<='z')) - rep -= 0x20; - } - while ((rep!='Y') && (rep!='N') && (rep!='A')); - } - - if (rep == 'N') - skip = 1; - - if (rep == 'A') - *popt_overwrite=1; - } - - if ((skip==0) && (err==UNZ_OK)) - { - fout=FOPEN_FUNC(write_filename,"wb"); - /* some zipfile don't contain directory alone before file */ - if ((fout==NULL) && ((*popt_extract_without_path)==0) && - (filename_withoutpath!=(char*)filename_inzip)) - { - char c=*(filename_withoutpath-1); - *(filename_withoutpath-1)='\0'; - makedir(write_filename); - *(filename_withoutpath-1)=c; - fout=FOPEN_FUNC(write_filename,"wb"); - } - - if (fout==NULL) - { - printf("error opening %s\n",write_filename); - } - } - - if (fout!=NULL) - { - printf(" extracting: %s\n",write_filename); - - do - { - err = unzReadCurrentFile(uf,buf,size_buf); - if (err<0) - { - printf("error %d with zipfile in unzReadCurrentFile\n",err); - break; - } - if (err>0) - if (fwrite(buf,(unsigned)err,1,fout)!=1) - { - printf("error in writing extracted file\n"); - err=UNZ_ERRNO; - break; - } - } - while (err>0); - if (fout) - fclose(fout); - - if (err==0) - change_file_date(write_filename,file_info.dosDate, - file_info.tmu_date); - } - - if (err==UNZ_OK) - { - err = unzCloseCurrentFile (uf); - if (err!=UNZ_OK) - { - printf("error %d with zipfile in unzCloseCurrentFile\n",err); - } - } - else - unzCloseCurrentFile(uf); /* don't lose the error */ - } - - free(buf); - return err; -} - - -static int do_extract(unzFile uf, int opt_extract_without_path, int opt_overwrite, const char* password) { - uLong i; - unz_global_info64 gi; - int err; - - err = unzGetGlobalInfo64(uf,&gi); - if (err!=UNZ_OK) - printf("error %d with zipfile in unzGetGlobalInfo \n",err); - - for (i=0;i insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -miniunzip - uncompress and examine ZIP archives -.SH SYNOPSIS -.B miniunzip -.RI [ -exvlo ] -zipfile [ files_to_extract ] [-d tempdir] -.SH DESCRIPTION -.B minizip -is a simple tool which allows the extraction of compressed file -archives in the ZIP format used by the MS-DOS utility PKZIP. It was -written as a demonstration of the -.IR zlib (3) -library and therefore lack many of the features of the -.IR unzip (1) -program. -.SH OPTIONS -A number of options are supported. With the exception of -.BI \-d\ tempdir -these must be supplied before any -other arguments and are: -.TP -.BI \-l\ ,\ \-\-v -List the files in the archive without extracting them. -.TP -.B \-o -Overwrite files without prompting for confirmation. -.TP -.B \-x -Extract files (default). -.PP -The -.I zipfile -argument is the name of the archive to process. The next argument can be used -to specify a single file to extract from the archive. - -Lastly, the following option can be specified at the end of the command-line: -.TP -.BI \-d\ tempdir -Extract the archive in the directory -.I tempdir -rather than the current directory. -.SH SEE ALSO -.BR minizip (1), -.BR zlib (3), -.BR unzip (1). -.SH AUTHOR -This program was written by Gilles Vollant. This manual page was -written by Mark Brown . The -d tempdir option -was added by Dirk Eddelbuettel . diff --git a/third_party/zlib/contrib/minizip/minizip.1 b/third_party/zlib/contrib/minizip/minizip.1 deleted file mode 100644 index 1154484..0000000 --- a/third_party/zlib/contrib/minizip/minizip.1 +++ /dev/null @@ -1,46 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.TH minizip 1 "May 2, 2001" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -minizip - create ZIP archives -.SH SYNOPSIS -.B minizip -.RI [ -o ] -zipfile [ " files" ... ] -.SH DESCRIPTION -.B minizip -is a simple tool which allows the creation of compressed file archives -in the ZIP format used by the MS-DOS utility PKZIP. It was written as -a demonstration of the -.IR zlib (3) -library and therefore lack many of the features of the -.IR zip (1) -program. -.SH OPTIONS -The first argument supplied is the name of the ZIP archive to create or -.RI -o -in which case it is ignored and the second argument treated as the -name of the ZIP file. If the ZIP file already exists it will be -overwritten. -.PP -Subsequent arguments specify a list of files to place in the ZIP -archive. If none are specified then an empty archive will be created. -.SH SEE ALSO -.BR miniunzip (1), -.BR zlib (3), -.BR zip (1). -.SH AUTHOR -This program was written by Gilles Vollant. This manual page was -written by Mark Brown . - diff --git a/third_party/zlib/contrib/minizip/minizip.c b/third_party/zlib/contrib/minizip/minizip.c deleted file mode 100644 index 26ee8d0..0000000 --- a/third_party/zlib/contrib/minizip/minizip.c +++ /dev/null @@ -1,509 +0,0 @@ -/* - minizip.c - Version 1.1, February 14h, 2010 - sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications of Unzip for Zip64 - Copyright (C) 2007-2008 Even Rouault - - Modifications for Zip64 support on both zip and unzip - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) -*/ - - -#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) - #ifndef __USE_FILE_OFFSET64 - #define __USE_FILE_OFFSET64 - #endif - #ifndef __USE_LARGEFILE64 - #define __USE_LARGEFILE64 - #endif - #ifndef _LARGEFILE64_SOURCE - #define _LARGEFILE64_SOURCE - #endif - #ifndef _FILE_OFFSET_BIT - #define _FILE_OFFSET_BIT 64 - #endif -#endif - -#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) -// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions -#define FOPEN_FUNC(filename, mode) fopen(filename, mode) -#define FTELLO_FUNC(stream) ftello(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) -#else -#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) -#define FTELLO_FUNC(stream) ftello64(stream) -#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) -#endif - - - -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 -# include -# include -#else -# include -# include -# include -# include -#endif - -#include "zip.h" - -#ifdef _WIN32 - #define USEWIN32IOAPI - #include "iowin32.h" -#endif - - - -#define WRITEBUFFERSIZE (16384) -#define MAXFILENAME (256) - -#ifdef _WIN32 -/* f: name of file to get info on, tmzip: return value: access, - modification and creation times, dt: dostime */ -static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { - int ret = 0; - { - FILETIME ftLocal; - HANDLE hFind; - WIN32_FIND_DATAA ff32; - - hFind = FindFirstFileA(f,&ff32); - if (hFind != INVALID_HANDLE_VALUE) - { - FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); - FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0); - FindClose(hFind); - ret = 1; - } - } - return ret; -} -#else -#if defined(unix) || defined(__APPLE__) -/* f: name of file to get info on, tmzip: return value: access, - modification and creation times, dt: dostime */ -static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { - (void)dt; - int ret=0; - struct stat s; /* results of stat() */ - struct tm* filedate; - time_t tm_t=0; - - if (strcmp(f,"-")!=0) - { - char name[MAXFILENAME+1]; - size_t len = strlen(f); - if (len > MAXFILENAME) - len = MAXFILENAME; - - strncpy(name, f,MAXFILENAME-1); - /* strncpy doesn't append the trailing NULL, of the string is too long. */ - name[ MAXFILENAME ] = '\0'; - - if (name[len - 1] == '/') - name[len - 1] = '\0'; - /* not all systems allow stat'ing a file with / appended */ - if (stat(name,&s)==0) - { - tm_t = s.st_mtime; - ret = 1; - } - } - filedate = localtime(&tm_t); - - tmzip->tm_sec = filedate->tm_sec; - tmzip->tm_min = filedate->tm_min; - tmzip->tm_hour = filedate->tm_hour; - tmzip->tm_mday = filedate->tm_mday; - tmzip->tm_mon = filedate->tm_mon ; - tmzip->tm_year = filedate->tm_year; - - return ret; -} -#else -/* f: name of file to get info on, tmzip: return value: access, - modification and creation times, dt: dostime */ -static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { - (void)f; - (void)tmzip; - (void)dt; - return 0; -} -#endif -#endif - - - - -static int check_exist_file(const char* filename) { - FILE* ftestexist; - int ret = 1; - ftestexist = FOPEN_FUNC(filename,"rb"); - if (ftestexist==NULL) - ret = 0; - else - fclose(ftestexist); - return ret; -} - -static void do_banner(void) { - printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n"); - printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n"); -} - -static void do_help(void) { - printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \ - " -o Overwrite existing file.zip\n" \ - " -a Append to existing file.zip\n" \ - " -0 Store only\n" \ - " -1 Compress faster\n" \ - " -9 Compress better\n\n" \ - " -j exclude path. store only the file name.\n\n"); -} - -/* calculate the CRC32 of a file, - because to encrypt a file, we need known the CRC32 of the file before */ -static int getFileCrc(const char* filenameinzip, void* buf, unsigned long size_buf, unsigned long* result_crc) { - unsigned long calculate_crc=0; - int err=ZIP_OK; - FILE * fin = FOPEN_FUNC(filenameinzip,"rb"); - - unsigned long size_read = 0; - /* unsigned long total_read = 0; */ - if (fin==NULL) - { - err = ZIP_ERRNO; - } - - if (err == ZIP_OK) - do - { - err = ZIP_OK; - size_read = fread(buf,1,size_buf,fin); - if (size_read < size_buf) - if (feof(fin)==0) - { - printf("error in reading %s\n",filenameinzip); - err = ZIP_ERRNO; - } - - if (size_read>0) - calculate_crc = crc32_z(calculate_crc,buf,size_read); - /* total_read += size_read; */ - - } while ((err == ZIP_OK) && (size_read>0)); - - if (fin) - fclose(fin); - - *result_crc=calculate_crc; - printf("file %s crc %lx\n", filenameinzip, calculate_crc); - return err; -} - -static int isLargeFile(const char* filename) { - int largeFile = 0; - ZPOS64_T pos = 0; - FILE* pFile = FOPEN_FUNC(filename, "rb"); - - if(pFile != NULL) - { - FSEEKO_FUNC(pFile, 0, SEEK_END); - pos = (ZPOS64_T)FTELLO_FUNC(pFile); - - printf("File : %s is %llu bytes\n", filename, pos); - - if(pos >= 0xffffffff) - largeFile = 1; - - fclose(pFile); - } - - return largeFile; -} - -int main(int argc, char *argv[]) { - int i; - int opt_overwrite=0; - int opt_compress_level=Z_DEFAULT_COMPRESSION; - int opt_exclude_path=0; - int zipfilenamearg = 0; - char filename_try[MAXFILENAME+16]; - int zipok; - int err=0; - size_t size_buf=0; - void* buf=NULL; - const char* password=NULL; - - - do_banner(); - if (argc==1) - { - do_help(); - return 0; - } - else - { - for (i=1;i='0') && (c<='9')) - opt_compress_level = c-'0'; - if ((c=='j') || (c=='J')) - opt_exclude_path = 1; - - if (((c=='p') || (c=='P')) && (i+1='a') && (rep<='z')) - rep -= 0x20; - } - while ((rep!='Y') && (rep!='N') && (rep!='A')); - if (rep=='N') - zipok = 0; - if (rep=='A') - opt_overwrite = 2; - } - } - - if (zipok==1) - { - zipFile zf; - int errclose; -# ifdef USEWIN32IOAPI - zlib_filefunc64_def ffunc; - fill_win32_filefunc64A(&ffunc); - zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc); -# else - zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0); -# endif - - if (zf == NULL) - { - printf("error opening %s\n",filename_try); - err= ZIP_ERRNO; - } - else - printf("creating %s\n",filename_try); - - for (i=zipfilenamearg+1;(i='0') && (argv[i][1]<='9'))) && - (strlen(argv[i]) == 2))) - { - FILE * fin = NULL; - size_t size_read; - const char* filenameinzip = argv[i]; - const char *savefilenameinzip; - zip_fileinfo zi; - unsigned long crcFile=0; - int zip64 = 0; - - zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour = - zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0; - zi.dosDate = 0; - zi.internal_fa = 0; - zi.external_fa = 0; - filetime(filenameinzip,&zi.tmz_date,&zi.dosDate); - -/* - err = zipOpenNewFileInZip(zf,filenameinzip,&zi, - NULL,0,NULL,0,NULL / * comment * /, - (opt_compress_level != 0) ? Z_DEFLATED : 0, - opt_compress_level); -*/ - if ((password != NULL) && (err==ZIP_OK)) - err = getFileCrc(filenameinzip,buf,size_buf,&crcFile); - - zip64 = isLargeFile(filenameinzip); - - /* The path name saved, should not include a leading slash. */ - /*if it did, windows/xp and dynazip couldn't read the zip file. */ - savefilenameinzip = filenameinzip; - while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' ) - { - savefilenameinzip++; - } - - /*should the zip file contain any path at all?*/ - if( opt_exclude_path ) - { - const char *tmpptr; - const char *lastslash = 0; - for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++) - { - if( *tmpptr == '\\' || *tmpptr == '/') - { - lastslash = tmpptr; - } - } - if( lastslash != NULL ) - { - savefilenameinzip = lastslash+1; // base filename follows last slash. - } - } - - /**/ - err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi, - NULL,0,NULL,0,NULL /* comment*/, - (opt_compress_level != 0) ? Z_DEFLATED : 0, - opt_compress_level,0, - /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */ - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - password,crcFile, zip64); - - if (err != ZIP_OK) - printf("error in opening %s in zipfile\n",filenameinzip); - else - { - fin = FOPEN_FUNC(filenameinzip,"rb"); - if (fin==NULL) - { - err=ZIP_ERRNO; - printf("error in opening %s for reading\n",filenameinzip); - } - } - - if (err == ZIP_OK) - do - { - err = ZIP_OK; - size_read = fread(buf,1,size_buf,fin); - if (size_read < size_buf) - if (feof(fin)==0) - { - printf("error in reading %s\n",filenameinzip); - err = ZIP_ERRNO; - } - - if (size_read>0) - { - err = zipWriteInFileInZip (zf,buf,(unsigned)size_read); - if (err<0) - { - printf("error in writing %s in the zipfile\n", - filenameinzip); - } - - } - } while ((err == ZIP_OK) && (size_read>0)); - - if (fin) - fclose(fin); - - if (err<0) - err=ZIP_ERRNO; - else - { - err = zipCloseFileInZip(zf); - if (err!=ZIP_OK) - printf("error in closing %s in the zipfile\n", - filenameinzip); - } - } - } - errclose = zipClose(zf,NULL); - if (errclose != ZIP_OK) - printf("error in closing %s\n",filename_try); - } - else - { - do_help(); - } - - free(buf); - return 0; -} diff --git a/third_party/zlib/contrib/minizip/minizip.pc.in b/third_party/zlib/contrib/minizip/minizip.pc.in deleted file mode 100644 index 69b5b7f..0000000 --- a/third_party/zlib/contrib/minizip/minizip.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/minizip - -Name: minizip -Description: Minizip zip file manipulation library -Requires: -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lminizip -Libs.private: -lz -Cflags: -I${includedir} diff --git a/third_party/zlib/contrib/minizip/mztools.c b/third_party/zlib/contrib/minizip/mztools.c deleted file mode 100644 index c8d2375..0000000 --- a/third_party/zlib/contrib/minizip/mztools.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - Additional tools for Minizip - Code: Xavier Roche '2004 - License: Same as ZLIB (www.gzip.org) -*/ - -/* Code */ -#include -#include -#include -#include "zlib.h" -#include "unzip.h" - -#define READ_8(adr) ((unsigned char)*(adr)) -#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) -#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) - -#define WRITE_8(buff, n) do { \ - *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ -} while(0) -#define WRITE_16(buff, n) do { \ - WRITE_8((unsigned char*)(buff), n); \ - WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ -} while(0) -#define WRITE_32(buff, n) do { \ - WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ - WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ -} while(0) - -extern int ZEXPORT unzRepair(const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered) { - int err = Z_OK; - FILE* fpZip = fopen(file, "rb"); - FILE* fpOut = fopen(fileOut, "wb"); - FILE* fpOutCD = fopen(fileOutTmp, "wb"); - if (fpZip != NULL && fpOut != NULL) { - int entries = 0; - uLong totalBytes = 0; - char header[30]; - char filename[1024]; - char extra[1024]; - int offset = 0; - int offsetCD = 0; - while ( fread(header, 1, 30, fpZip) == 30 ) { - int currentOffset = offset; - - /* File entry */ - if (READ_32(header) == 0x04034b50) { - unsigned int version = READ_16(header + 4); - unsigned int gpflag = READ_16(header + 6); - unsigned int method = READ_16(header + 8); - unsigned int filetime = READ_16(header + 10); - unsigned int filedate = READ_16(header + 12); - unsigned int crc = READ_32(header + 14); /* crc */ - unsigned int cpsize = READ_32(header + 18); /* compressed size */ - unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ - unsigned int fnsize = READ_16(header + 26); /* file name length */ - unsigned int extsize = READ_16(header + 28); /* extra field length */ - filename[0] = extra[0] = '\0'; - - /* Header */ - if (fwrite(header, 1, 30, fpOut) == 30) { - offset += 30; - } else { - err = Z_ERRNO; - break; - } - - /* Filename */ - if (fnsize > 0) { - if (fnsize < sizeof(filename)) { - if (fread(filename, 1, fnsize, fpZip) == fnsize) { - if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { - offset += fnsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_STREAM_ERROR; - break; - } - - /* Extra field */ - if (extsize > 0) { - if (extsize < sizeof(extra)) { - if (fread(extra, 1, extsize, fpZip) == extsize) { - if (fwrite(extra, 1, extsize, fpOut) == extsize) { - offset += extsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } - - /* Data */ - { - int dataSize = cpsize; - if (dataSize == 0) { - dataSize = uncpsize; - } - if (dataSize > 0) { - char* data = malloc(dataSize); - if (data != NULL) { - if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { - if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { - offset += dataSize; - totalBytes += dataSize; - } else { - err = Z_ERRNO; - } - } else { - err = Z_ERRNO; - } - free(data); - if (err != Z_OK) { - break; - } - } else { - err = Z_MEM_ERROR; - break; - } - } - } - - /* Central directory entry */ - { - char header[46]; - char* comment = ""; - int comsize = (int) strlen(comment); - WRITE_32(header, 0x02014b50); - WRITE_16(header + 4, version); - WRITE_16(header + 6, version); - WRITE_16(header + 8, gpflag); - WRITE_16(header + 10, method); - WRITE_16(header + 12, filetime); - WRITE_16(header + 14, filedate); - WRITE_32(header + 16, crc); - WRITE_32(header + 20, cpsize); - WRITE_32(header + 24, uncpsize); - WRITE_16(header + 28, fnsize); - WRITE_16(header + 30, extsize); - WRITE_16(header + 32, comsize); - WRITE_16(header + 34, 0); /* disk # */ - WRITE_16(header + 36, 0); /* int attrb */ - WRITE_32(header + 38, 0); /* ext attrb */ - WRITE_32(header + 42, currentOffset); - /* Header */ - if (fwrite(header, 1, 46, fpOutCD) == 46) { - offsetCD += 46; - - /* Filename */ - if (fnsize > 0) { - if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { - offsetCD += fnsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_STREAM_ERROR; - break; - } - - /* Extra field */ - if (extsize > 0) { - if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { - offsetCD += extsize; - } else { - err = Z_ERRNO; - break; - } - } - - /* Comment field */ - if (comsize > 0) { - if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { - offsetCD += comsize; - } else { - err = Z_ERRNO; - break; - } - } - - - } else { - err = Z_ERRNO; - break; - } - } - - /* Success */ - entries++; - - } else { - break; - } - } - - /* Final central directory */ - { - int entriesZip = entries; - char header[22]; - char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; - int comsize = (int) strlen(comment); - if (entriesZip > 0xffff) { - entriesZip = 0xffff; - } - WRITE_32(header, 0x06054b50); - WRITE_16(header + 4, 0); /* disk # */ - WRITE_16(header + 6, 0); /* disk # */ - WRITE_16(header + 8, entriesZip); /* hack */ - WRITE_16(header + 10, entriesZip); /* hack */ - WRITE_32(header + 12, offsetCD); /* size of CD */ - WRITE_32(header + 16, offset); /* offset to CD */ - WRITE_16(header + 20, comsize); /* comment */ - - /* Header */ - if (fwrite(header, 1, 22, fpOutCD) == 22) { - - /* Comment field */ - if (comsize > 0) { - if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { - err = Z_ERRNO; - } - } - - } else { - err = Z_ERRNO; - } - } - - /* Final merge (file + central directory) */ - fclose(fpOutCD); - if (err == Z_OK) { - fpOutCD = fopen(fileOutTmp, "rb"); - if (fpOutCD != NULL) { - int nRead; - char buffer[8192]; - while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { - if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { - err = Z_ERRNO; - break; - } - } - fclose(fpOutCD); - } - } - - /* Close */ - fclose(fpZip); - fclose(fpOut); - - /* Wipe temporary file */ - (void)remove(fileOutTmp); - - /* Number of recovered entries */ - if (err == Z_OK) { - if (nRecovered != NULL) { - *nRecovered = entries; - } - if (bytesRecovered != NULL) { - *bytesRecovered = totalBytes; - } - } - } else { - err = Z_STREAM_ERROR; - } - return err; -} diff --git a/third_party/zlib/contrib/minizip/mztools.h b/third_party/zlib/contrib/minizip/mztools.h deleted file mode 100644 index 7b4b4f9..0000000 --- a/third_party/zlib/contrib/minizip/mztools.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Additional tools for Minizip - Code: Xavier Roche '2004 - License: Same as ZLIB (www.gzip.org) -*/ - -#ifndef _zip_tools_H -#define _zip_tools_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#include "unzip.h" - -/* Repair a ZIP file (missing central directory) - file: file to recover - fileOut: output file after recovery - fileOutTmp: temporary file name used for recovery -*/ -extern int ZEXPORT unzRepair(const char* file, - const char* fileOut, - const char* fileOutTmp, - uLong* nRecovered, - uLong* bytesRecovered); - - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib/minizip/unzip.c deleted file mode 100644 index ea05b7d..0000000 --- a/third_party/zlib/contrib/minizip/unzip.c +++ /dev/null @@ -1,1985 +0,0 @@ -/* unzip.c -- IO for uncompress .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications of Unzip for Zip64 - Copyright (C) 2007-2008 Even Rouault - - Modifications for Zip64 support on both zip and unzip - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - - ------------------------------------------------------------------------------------ - Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of - compatibility with older software. The following is from the original crypt.c. - Code woven in by Terry Thorsen 1/2003. - - Copyright (c) 1990-2000 Info-ZIP. All rights reserved. - - See the accompanying file LICENSE, version 2000-Apr-09 or later - (the contents of which are also included in zip.h) for terms of use. - If, for some reason, all these files are missing, the Info-ZIP license - also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html - - crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] - - The encryption/decryption parts of this source code (as opposed to the - non-echoing password parts) were originally written in Europe. The - whole source package can be freely distributed, including from the USA. - (Prior to January 2000, re-export from the US was a violation of US law.) - - This encryption code is a direct transcription of the algorithm from - Roger Schlafly, described by Phil Katz in the file appnote.txt. This - file (appnote.txt) is distributed with the PKZIP program (even in the - version without encryption capabilities). - - ------------------------------------------------------------------------------------ - - Changes in unzip.c - - 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos - 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz* - 2007-2008 - Even Rouault - Remove old C style function prototypes - 2007-2008 - Even Rouault - Add unzip support for ZIP64 - - Copyright (C) 2007-2008 Even Rouault - - - Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). - Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G - should only read the compressed/uncompressed size from the Zip64 format if - the size from normal header was 0xFFFFFFFF - Oct-2009 - Mathias Svensson - Applied some bug fixes from patches received from Gilles Vollant - Oct-2009 - Mathias Svensson - Applied support to unzip files with compression method BZIP2 (bzip2 lib is required) - Patch created by Daniel Borca - - Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer - - Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson - -*/ - - -#include -#include -#include - -#ifndef NOUNCRYPT - #define NOUNCRYPT -#endif - -#include "zlib.h" -#include "unzip.h" - -#ifdef STDC -# include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include -#endif - - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - - -#ifndef CASESENSITIVITYDEFAULT_NO -# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) -# define CASESENSITIVITYDEFAULT_NO -# endif -#endif - - -#ifndef UNZ_BUFSIZE -#define UNZ_BUFSIZE (16384) -#endif - -#ifndef UNZ_MAXFILENAMEINZIP -#define UNZ_MAXFILENAMEINZIP (256) -#endif - -#ifndef ALLOC -# define ALLOC(size) (malloc(size)) -#endif - -#define SIZECENTRALDIRITEM (0x2e) -#define SIZEZIPLOCALHEADER (0x1e) - - -const char unz_copyright[] = - " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; - -/* unz_file_info64_internal contain internal info about a file in zipfile*/ -typedef struct unz_file_info64_internal_s -{ - ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ -} unz_file_info64_internal; - - -/* file_in_zip_read_info_s contain internal information about a file in zipfile, - when reading and decompress it */ -typedef struct -{ - char *read_buffer; /* internal buffer for compressed data */ - z_stream stream; /* zLib stream structure for inflate */ - -#ifdef HAVE_BZIP2 - bz_stream bstream; /* bzLib stream structure for bziped */ -#endif - - ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ - uLong stream_initialised; /* flag set if stream structure is initialised*/ - - ZPOS64_T offset_local_extrafield;/* offset of the local extra field */ - uInt size_local_extrafield;/* size of the local extra field */ - ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/ - ZPOS64_T total_out_64; - - uLong crc32; /* crc32 of all data uncompressed */ - uLong crc32_wait; /* crc32 we must obtain after decompress all */ - ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ - ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ - zlib_filefunc64_32_def z_filefunc; - voidpf filestream; /* io structure of the zipfile */ - uLong compression_method; /* compression method (0==store) */ - ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - int raw; -} file_in_zip64_read_info_s; - - -/* unz64_s contain internal information about the zipfile -*/ -typedef struct -{ - zlib_filefunc64_32_def z_filefunc; - int is64bitOpenFunction; - voidpf filestream; /* io structure of the zipfile */ - unz_global_info64 gi; /* public global information */ - ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - ZPOS64_T num_file; /* number of the current file in the zipfile*/ - ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/ - ZPOS64_T current_file_ok; /* flag about the usability of the current file*/ - ZPOS64_T central_pos; /* position of the beginning of the central dir*/ - - ZPOS64_T size_central_dir; /* size of the central directory */ - ZPOS64_T offset_central_dir; /* offset of start of central directory with - respect to the starting disk number */ - - unz_file_info64 cur_file_info; /* public info about the current file in zip*/ - unz_file_info64_internal cur_file_info_internal; /* private info about it*/ - file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current - file if we are decompressing it */ - int encrypted; - - int isZip64; - -# ifndef NOUNCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const z_crc_t* pcrc_32_tab; -# endif -} unz64_s; - - -#ifndef NOUNCRYPT -#include "crypt.h" -#endif - - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ - -local int unz64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX) { - unsigned char c[2]; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,2); - if (err==2) - { - *pX = c[0] | ((uLong)c[1] << 8); - return UNZ_OK; - } - else - { - *pX = 0; - if (ZERROR64(*pzlib_filefunc_def,filestream)) - return UNZ_ERRNO; - else - return UNZ_EOF; - } -} - -local int unz64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX) { - unsigned char c[4]; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,4); - if (err==4) - { - *pX = c[0] | ((uLong)c[1] << 8) | ((uLong)c[2] << 16) | ((uLong)c[3] << 24); - return UNZ_OK; - } - else - { - *pX = 0; - if (ZERROR64(*pzlib_filefunc_def,filestream)) - return UNZ_ERRNO; - else - return UNZ_EOF; - } -} - - -local int unz64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - ZPOS64_T *pX) { - unsigned char c[8]; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,8); - if (err==8) - { - *pX = c[0] | ((ZPOS64_T)c[1] << 8) | ((ZPOS64_T)c[2] << 16) | ((ZPOS64_T)c[3] << 24) - | ((ZPOS64_T)c[4] << 32) | ((ZPOS64_T)c[5] << 40) | ((ZPOS64_T)c[6] << 48) | ((ZPOS64_T)c[7] << 56); - return UNZ_OK; - } - else - { - *pX = 0; - if (ZERROR64(*pzlib_filefunc_def,filestream)) - return UNZ_ERRNO; - else - return UNZ_EOF; - } -} - -/* My own strcmpi / strcasecmp */ -local int strcmpcasenosensitive_internal(const char* fileName1, const char* fileName2) { - for (;;) - { - char c1=*(fileName1++); - char c2=*(fileName2++); - if ((c1>='a') && (c1<='z')) - c1 -= 0x20; - if ((c2>='a') && (c2<='z')) - c2 -= 0x20; - if (c1=='\0') - return ((c2=='\0') ? 0 : -1); - if (c2=='\0') - return 1; - if (c1c2) - return 1; - } -} - - -#ifdef CASESENSITIVITYDEFAULT_NO -#define CASESENSITIVITYDEFAULTVALUE 2 -#else -#define CASESENSITIVITYDEFAULTVALUE 1 -#endif - -#ifndef STRCMPCASENOSENTIVEFUNCTION -#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal -#endif - -/* - Compare two filenames (fileName1,fileName2). - If iCaseSensitivity = 1, comparison is case sensitive (like strcmp) - If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi - or strcasecmp) - If iCaseSensitivity = 0, case sensitivity is default of your operating system - (like 1 on Unix, 2 on Windows) - -*/ -extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, - const char* fileName2, - int iCaseSensitivity) { - if (iCaseSensitivity==0) - iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; - - if (iCaseSensitivity==1) - return strcmp(fileName1,fileName2); - - return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); -} - -#ifndef BUFREADCOMMENT -#define BUFREADCOMMENT (0x400) -#endif - -#ifndef CENTRALDIRINVALID -#define CENTRALDIRINVALID ((ZPOS64_T)(-1)) -#endif - -/* - Locate the Central directory of a zipfile (at the end, just before - the global comment) -*/ -local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { - unsigned char* buf; - ZPOS64_T uSizeFile; - ZPOS64_T uBackRead; - ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ - ZPOS64_T uPosFound=CENTRALDIRINVALID; - - if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return CENTRALDIRINVALID; - - - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return CENTRALDIRINVALID; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); - if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { - uPosFound = uReadPos+(unsigned)i; - break; - } - - if (uPosFound!=CENTRALDIRINVALID) - break; - } - free(buf); - return uPosFound; -} - - -/* - Locate the Central directory 64 of a zipfile (at the end, just before - the global comment) -*/ -local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream) { - unsigned char* buf; - ZPOS64_T uSizeFile; - ZPOS64_T uBackRead; - ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ - ZPOS64_T uPosFound=CENTRALDIRINVALID; - uLong uL; - ZPOS64_T relativeOffset; - - if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return CENTRALDIRINVALID; - - - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return CENTRALDIRINVALID; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); - if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) - { - uPosFound = uReadPos+(unsigned)i; - break; - } - - if (uPosFound!=CENTRALDIRINVALID) - break; - } - free(buf); - if (uPosFound == CENTRALDIRINVALID) - return CENTRALDIRINVALID; - - /* Zip64 end of central directory locator */ - if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) - return CENTRALDIRINVALID; - - /* the signature, already checked */ - if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) - return CENTRALDIRINVALID; - - /* number of the disk with the start of the zip64 end of central directory */ - if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) - return CENTRALDIRINVALID; - if (uL != 0) - return CENTRALDIRINVALID; - - /* relative offset of the zip64 end of central directory record */ - if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK) - return CENTRALDIRINVALID; - - /* total number of disks */ - if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) - return CENTRALDIRINVALID; - if (uL != 1) - return CENTRALDIRINVALID; - - /* Goto end of central directory record */ - if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) - return CENTRALDIRINVALID; - - /* the signature */ - if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) - return CENTRALDIRINVALID; - - if (uL != 0x06064b50) - return CENTRALDIRINVALID; - - return relativeOffset; -} - -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer - "zlib/zlib114.zip". - If the zipfile cannot be opened (file doesn't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. -*/ -local unzFile unzOpenInternal(const void *path, - zlib_filefunc64_32_def* pzlib_filefunc64_32_def, - int is64bitOpenFunction) { - unz64_s us; - unz64_s *s; - ZPOS64_T central_pos; - uLong uL; - - uLong number_disk; /* number of the current disk, used for - spanning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the disk with central dir, used - for spanning ZIP, unsupported, always 0*/ - ZPOS64_T number_entry_CD; /* total number of entries in - the central dir - (same than number_entry on nospan) */ - - int err=UNZ_OK; - - if (unz_copyright[0]!=' ') - return NULL; - - us.z_filefunc.zseek32_file = NULL; - us.z_filefunc.ztell32_file = NULL; - if (pzlib_filefunc64_32_def==NULL) - fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); - else - us.z_filefunc = *pzlib_filefunc64_32_def; - us.is64bitOpenFunction = is64bitOpenFunction; - - - - us.filestream = ZOPEN64(us.z_filefunc, - path, - ZLIB_FILEFUNC_MODE_READ | - ZLIB_FILEFUNC_MODE_EXISTING); - if (us.filestream==NULL) - return NULL; - - central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream); - if (central_pos!=CENTRALDIRINVALID) - { - uLong uS; - ZPOS64_T uL64; - - us.isZip64 = 1; - - if (ZSEEK64(us.z_filefunc, us.filestream, - central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=UNZ_ERRNO; - - /* the signature, already checked */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - - /* size of zip64 end of central directory record */ - if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK) - err=UNZ_ERRNO; - - /* version made by */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) - err=UNZ_ERRNO; - - /* version needed to extract */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of this disk */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of the disk with the start of the central directory */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) - err=UNZ_ERRNO; - - /* total number of entries in the central directory on this disk */ - if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) - err=UNZ_ERRNO; - - /* total number of entries in the central directory */ - if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) - err=UNZ_ERRNO; - - if ((number_entry_CD!=us.gi.number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=UNZ_BADZIPFILE; - - /* size of the central directory */ - if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; - - /* offset of start of central directory with respect to the - starting disk number */ - if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; - - us.gi.size_comment = 0; - } - else - { - central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream); - if (central_pos==CENTRALDIRINVALID) - err=UNZ_ERRNO; - - us.isZip64 = 0; - - if (ZSEEK64(us.z_filefunc, us.filestream, - central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=UNZ_ERRNO; - - /* the signature, already checked */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of this disk */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of the disk with the start of the central directory */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) - err=UNZ_ERRNO; - - /* total number of entries in the central dir on this disk */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - us.gi.number_entry = uL; - - /* total number of entries in the central dir */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - number_entry_CD = uL; - - if ((number_entry_CD!=us.gi.number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=UNZ_BADZIPFILE; - - /* size of the central directory */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - us.size_central_dir = uL; - - /* offset of start of central directory with respect to the - starting disk number */ - if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - us.offset_central_dir = uL; - - /* zipfile comment length */ - if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) - err=UNZ_ERRNO; - } - - if ((central_pospfile_in_zip_read!=NULL) - unzCloseCurrentFile(file); - - ZCLOSE64(s->z_filefunc, s->filestream); - free(s); - return UNZ_OK; -} - - -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64* pglobal_info) { - unz64_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - *pglobal_info=s->gi; - return UNZ_OK; -} - -extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32) { - unz64_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - /* to do : check if number_entry is not truncated */ - pglobal_info32->number_entry = (uLong)s->gi.number_entry; - pglobal_info32->size_comment = s->gi.size_comment; - return UNZ_OK; -} -/* - Translate date/time from Dos format to tm_unz (readable more easily) -*/ -local void unz64local_DosDateToTmuDate(ZPOS64_T ulDosDate, tm_unz* ptm) { - ZPOS64_T uDate; - uDate = (ZPOS64_T)(ulDosDate>>16); - ptm->tm_mday = (int)(uDate&0x1f) ; - ptm->tm_mon = (int)((((uDate)&0x1E0)/0x20)-1) ; - ptm->tm_year = (int)(((uDate&0x0FE00)/0x0200)+1980) ; - - ptm->tm_hour = (int) ((ulDosDate &0xF800)/0x800); - ptm->tm_min = (int) ((ulDosDate&0x7E0)/0x20) ; - ptm->tm_sec = (int) (2*(ulDosDate&0x1f)) ; -} - -/* - Get Info about the current file in the zipfile, with internal only info -*/ -local int unz64local_GetCurrentFileInfoInternal(unzFile file, - unz_file_info64 *pfile_info, - unz_file_info64_internal - *pfile_info_internal, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize) { - unz64_s* s; - unz_file_info64 file_info; - unz_file_info64_internal file_info_internal; - int err=UNZ_OK; - uLong uMagic; - long lSeek=0; - uLong uL; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - if (ZSEEK64(s->z_filefunc, s->filestream, - s->pos_in_central_dir+s->byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET)!=0) - err=UNZ_ERRNO; - - - /* we check the magic */ - if (err==UNZ_OK) - { - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x02014b50) - err=UNZ_BADZIPFILE; - } - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) - err=UNZ_ERRNO; - - unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) - err=UNZ_ERRNO; - file_info.compressed_size = uL; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) - err=UNZ_ERRNO; - file_info.uncompressed_size = uL; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) - err=UNZ_ERRNO; - - // relative offset of local header - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) - err=UNZ_ERRNO; - file_info_internal.offset_curfile = uL; - - lSeek+=file_info.size_filename; - if ((err==UNZ_OK) && (szFileName!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_filename0) && (fileNameBufferSize>0)) - if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - lSeek -= uSizeRead; - } - - // Read extrafield - if ((err==UNZ_OK) && (extraField!=NULL)) - { - ZPOS64_T uSizeRead ; - if (file_info.size_file_extraz_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - } - - if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) - if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - - lSeek += file_info.size_file_extra - (uLong)uSizeRead; - } - else - lSeek += file_info.size_file_extra; - - - if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) - { - uLong acc = 0; - - // since lSeek now points to after the extra field we need to move back - lSeek -= file_info.size_file_extra; - - if (lSeek!=0) - { - if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - } - - while(acc < file_info.size_file_extra) - { - uLong headerId; - uLong dataSize; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK) - err=UNZ_ERRNO; - - /* ZIP64 extra fields */ - if (headerId == 0x0001) - { - if(file_info.uncompressed_size == MAXU32) - { - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info.compressed_size == MAXU32) - { - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info_internal.offset_curfile == MAXU32) - { - /* Relative Header offset */ - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info.disk_num_start == 0xffff) - { - /* Disk Start Number */ - if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) - err=UNZ_ERRNO; - } - - } - else - { - if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0) - err=UNZ_ERRNO; - } - - acc += 2 + 2 + dataSize; - } - } - - if ((err==UNZ_OK) && (szComment!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_file_commentz_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - } - - if ((file_info.size_file_comment>0) && (commentBufferSize>0)) - if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - lSeek+=file_info.size_file_comment - uSizeRead; - } - else - lSeek+=file_info.size_file_comment; - - - if ((err==UNZ_OK) && (pfile_info!=NULL)) - *pfile_info=file_info; - - if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) - *pfile_info_internal=file_info_internal; - - return err; -} - - - -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. -*/ -extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, - unz_file_info64 * pfile_info, - char * szFileName, uLong fileNameBufferSize, - void *extraField, uLong extraFieldBufferSize, - char* szComment, uLong commentBufferSize) { - return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, - szFileName,fileNameBufferSize, - extraField,extraFieldBufferSize, - szComment,commentBufferSize); -} - -extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, - unz_file_info * pfile_info, - char * szFileName, uLong fileNameBufferSize, - void *extraField, uLong extraFieldBufferSize, - char* szComment, uLong commentBufferSize) { - int err; - unz_file_info64 file_info64; - err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, - szFileName,fileNameBufferSize, - extraField,extraFieldBufferSize, - szComment,commentBufferSize); - if ((err==UNZ_OK) && (pfile_info != NULL)) - { - pfile_info->version = file_info64.version; - pfile_info->version_needed = file_info64.version_needed; - pfile_info->flag = file_info64.flag; - pfile_info->compression_method = file_info64.compression_method; - pfile_info->dosDate = file_info64.dosDate; - pfile_info->crc = file_info64.crc; - - pfile_info->size_filename = file_info64.size_filename; - pfile_info->size_file_extra = file_info64.size_file_extra; - pfile_info->size_file_comment = file_info64.size_file_comment; - - pfile_info->disk_num_start = file_info64.disk_num_start; - pfile_info->internal_fa = file_info64.internal_fa; - pfile_info->external_fa = file_info64.external_fa; - - pfile_info->tmu_date = file_info64.tmu_date; - - - pfile_info->compressed_size = (uLong)file_info64.compressed_size; - pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; - - } - return err; -} -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ -extern int ZEXPORT unzGoToFirstFile(unzFile file) { - int err=UNZ_OK; - unz64_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - s->pos_in_central_dir=s->offset_central_dir; - s->num_file=0; - err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ -extern int ZEXPORT unzGoToNextFile(unzFile file) { - unz64_s* s; - int err; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ - if (s->num_file+1==s->gi.number_entry) - return UNZ_END_OF_LIST_OF_FILE; - - s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + - s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; - s->num_file++; - err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - - -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ -extern int ZEXPORT unzLocateFile(unzFile file, const char *szFileName, int iCaseSensitivity) { - unz64_s* s; - int err; - - /* We remember the 'current' position in the file so that we can jump - * back there if we fail. - */ - unz_file_info64 cur_file_infoSaved; - unz_file_info64_internal cur_file_info_internalSaved; - ZPOS64_T num_fileSaved; - ZPOS64_T pos_in_central_dirSaved; - - - if (file==NULL) - return UNZ_PARAMERROR; - - if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) - return UNZ_PARAMERROR; - - s=(unz64_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - - /* Save the current state */ - num_fileSaved = s->num_file; - pos_in_central_dirSaved = s->pos_in_central_dir; - cur_file_infoSaved = s->cur_file_info; - cur_file_info_internalSaved = s->cur_file_info_internal; - - err = unzGoToFirstFile(file); - - while (err == UNZ_OK) - { - char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; - err = unzGetCurrentFileInfo64(file,NULL, - szCurrentFileName,sizeof(szCurrentFileName)-1, - NULL,0,NULL,0); - if (err == UNZ_OK) - { - if (unzStringFileNameCompare(szCurrentFileName, - szFileName,iCaseSensitivity)==0) - return UNZ_OK; - err = unzGoToNextFile(file); - } - } - - /* We failed, so restore the state of the 'current file' to where we - * were. - */ - s->num_file = num_fileSaved ; - s->pos_in_central_dir = pos_in_central_dirSaved ; - s->cur_file_info = cur_file_infoSaved; - s->cur_file_info_internal = cur_file_info_internalSaved; - return err; -} - - -/* -/////////////////////////////////////////// -// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) -// I need random access -// -// Further optimization could be realized by adding an ability -// to cache the directory in memory. The goal being a single -// comprehensive file read to put the file I need in a memory. -*/ - -/* -typedef struct unz_file_pos_s -{ - ZPOS64_T pos_in_zip_directory; // offset in file - ZPOS64_T num_of_file; // # of file -} unz_file_pos; -*/ - -extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) { - unz64_s* s; - - if (file==NULL || file_pos==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - - file_pos->pos_in_zip_directory = s->pos_in_central_dir; - file_pos->num_of_file = s->num_file; - - return UNZ_OK; -} - -extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos* file_pos) { - unz64_file_pos file_pos64; - int err = unzGetFilePos64(file,&file_pos64); - if (err==UNZ_OK) - { - file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory; - file_pos->num_of_file = (uLong)file_pos64.num_of_file; - } - return err; -} - -extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) { - unz64_s* s; - int err; - - if (file==NULL || file_pos==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - - /* jump to the right spot */ - s->pos_in_central_dir = file_pos->pos_in_zip_directory; - s->num_file = file_pos->num_of_file; - - /* set the current file */ - err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - /* return results */ - s->current_file_ok = (err == UNZ_OK); - return err; -} - -extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos* file_pos) { - unz64_file_pos file_pos64; - if (file_pos == NULL) - return UNZ_PARAMERROR; - - file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; - file_pos64.num_of_file = file_pos->num_of_file; - return unzGoToFilePos64(file,&file_pos64); -} - -/* -// Unzip Helper Functions - should be here? -/////////////////////////////////////////// -*/ - -/* - Read the local header of the current zipfile - Check the coherency of the local header and info in the end of central - directory about this file - store in *piSizeVar the size of extra info in local header - (filename and size of extra field data) -*/ -local int unz64local_CheckCurrentFileCoherencyHeader(unz64_s* s, uInt* piSizeVar, - ZPOS64_T * poffset_local_extrafield, - uInt * psize_local_extrafield) { - uLong uMagic,uData,uFlags; - uLong size_filename; - uLong size_extra_field; - int err=UNZ_OK; - - *piSizeVar = 0; - *poffset_local_extrafield = 0; - *psize_local_extrafield = 0; - - if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + - s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - - if (err==UNZ_OK) - { - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x04034b50) - err=UNZ_BADZIPFILE; - } - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) - err=UNZ_ERRNO; -/* - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) - err=UNZ_BADZIPFILE; -*/ - if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) - err=UNZ_ERRNO; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) - err=UNZ_BADZIPFILE; - - if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && -/* #ifdef HAVE_BZIP2 */ - (s->cur_file_info.compression_method!=Z_BZIP2ED) && -/* #endif */ - (s->cur_file_info.compression_method!=Z_DEFLATED)) - err=UNZ_BADZIPFILE; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ - err=UNZ_ERRNO; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ - err=UNZ_ERRNO; - else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ - err=UNZ_ERRNO; - else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) - err=UNZ_BADZIPFILE; - - *piSizeVar += (uInt)size_filename; - - if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) - err=UNZ_ERRNO; - *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + - SIZEZIPLOCALHEADER + size_filename; - *psize_local_extrafield = (uInt)size_extra_field; - - *piSizeVar += (uInt)size_extra_field; - - return err; -} - -/* - Open for reading data the current file in the zipfile. - If there is no error and the file is opened, the return value is UNZ_OK. -*/ -extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method, - int* level, int raw, const char* password) { - int err=UNZ_OK; - uInt iSizeVar; - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - ZPOS64_T offset_local_extrafield; /* offset of the local extra field */ - uInt size_local_extrafield; /* size of the local extra field */ -# ifndef NOUNCRYPT - char source[12]; -# else - if (password != NULL) - return UNZ_PARAMERROR; -# endif - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - if (!s->current_file_ok) - return UNZ_PARAMERROR; - - if (s->pfile_in_zip_read != NULL) - unzCloseCurrentFile(file); - - if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) - return UNZ_BADZIPFILE; - - pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s)); - if (pfile_in_zip_read_info==NULL) - return UNZ_INTERNALERROR; - - pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); - pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; - pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; - pfile_in_zip_read_info->pos_local_extrafield=0; - pfile_in_zip_read_info->raw=raw; - - if (pfile_in_zip_read_info->read_buffer==NULL) - { - free(pfile_in_zip_read_info); - return UNZ_INTERNALERROR; - } - - pfile_in_zip_read_info->stream_initialised=0; - - if (method!=NULL) - *method = (int)s->cur_file_info.compression_method; - - if (level!=NULL) - { - *level = 6; - switch (s->cur_file_info.flag & 0x06) - { - case 6 : *level = 1; break; - case 4 : *level = 2; break; - case 2 : *level = 9; break; - } - } - - if ((s->cur_file_info.compression_method!=0) && -/* #ifdef HAVE_BZIP2 */ - (s->cur_file_info.compression_method!=Z_BZIP2ED) && -/* #endif */ - (s->cur_file_info.compression_method!=Z_DEFLATED)) - - err=UNZ_BADZIPFILE; - - pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; - pfile_in_zip_read_info->crc32=0; - pfile_in_zip_read_info->total_out_64=0; - pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; - pfile_in_zip_read_info->filestream=s->filestream; - pfile_in_zip_read_info->z_filefunc=s->z_filefunc; - pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; - - pfile_in_zip_read_info->stream.total_out = 0; - - if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw)) - { -#ifdef HAVE_BZIP2 - pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0; - pfile_in_zip_read_info->bstream.bzfree = (free_func)0; - pfile_in_zip_read_info->bstream.opaque = (voidpf)0; - pfile_in_zip_read_info->bstream.state = (voidpf)0; - - pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; - pfile_in_zip_read_info->stream.zfree = (free_func)0; - pfile_in_zip_read_info->stream.opaque = (voidpf)0; - pfile_in_zip_read_info->stream.next_in = (voidpf)0; - pfile_in_zip_read_info->stream.avail_in = 0; - - err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0); - if (err == Z_OK) - pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; - else - { - free(pfile_in_zip_read_info->read_buffer); - free(pfile_in_zip_read_info); - return err; - } -#else - pfile_in_zip_read_info->raw=1; -#endif - } - else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) - { - pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; - pfile_in_zip_read_info->stream.zfree = (free_func)0; - pfile_in_zip_read_info->stream.opaque = (voidpf)0; - pfile_in_zip_read_info->stream.next_in = 0; - pfile_in_zip_read_info->stream.avail_in = 0; - - err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); - if (err == Z_OK) - pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; - else - { - free(pfile_in_zip_read_info->read_buffer); - free(pfile_in_zip_read_info); - return err; - } - /* windowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. - * In unzip, i don't wait absolutely Z_STREAM_END because I known the - * size of both compressed and uncompressed data - */ - } - pfile_in_zip_read_info->rest_read_compressed = - s->cur_file_info.compressed_size ; - pfile_in_zip_read_info->rest_read_uncompressed = - s->cur_file_info.uncompressed_size ; - - - pfile_in_zip_read_info->pos_in_zipfile = - s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + - iSizeVar; - - pfile_in_zip_read_info->stream.avail_in = (uInt)0; - - s->pfile_in_zip_read = pfile_in_zip_read_info; - s->encrypted = 0; - -# ifndef NOUNCRYPT - if (password != NULL) - { - int i; - s->pcrc_32_tab = get_crc_table(); - init_keys(password,s->keys,s->pcrc_32_tab); - if (ZSEEK64(s->z_filefunc, s->filestream, - s->pfile_in_zip_read->pos_in_zipfile + - s->pfile_in_zip_read->byte_before_the_zipfile, - SEEK_SET)!=0) - return UNZ_INTERNALERROR; - if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12) - return UNZ_INTERNALERROR; - - for (i = 0; i<12; i++) - zdecode(s->keys,s->pcrc_32_tab,source[i]); - - s->pfile_in_zip_read->pos_in_zipfile+=12; - s->encrypted=1; - } -# endif - - - return UNZ_OK; -} - -extern int ZEXPORT unzOpenCurrentFile(unzFile file) { - return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); -} - -extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char* password) { - return unzOpenCurrentFile3(file, NULL, NULL, 0, password); -} - -extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int* method, int* level, int raw) { - return unzOpenCurrentFile3(file, method, level, raw, NULL); -} - -/** Addition for GDAL : START */ - -extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file) { - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - s=(unz64_s*)file; - if (file==NULL) - return 0; //UNZ_PARAMERROR; - pfile_in_zip_read_info=s->pfile_in_zip_read; - if (pfile_in_zip_read_info==NULL) - return 0; //UNZ_PARAMERROR; - return pfile_in_zip_read_info->pos_in_zipfile + - pfile_in_zip_read_info->byte_before_the_zipfile; -} - -/** Addition for GDAL : END */ - -/* - Read bytes from the current file. - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if some bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ -extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len) { - int err=UNZ_OK; - uInt iRead = 0; - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - - if (pfile_in_zip_read_info->read_buffer == NULL) - return UNZ_END_OF_LIST_OF_FILE; - if (len==0) - return 0; - - pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; - - pfile_in_zip_read_info->stream.avail_out = (uInt)len; - - if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && - (!(pfile_in_zip_read_info->raw))) - pfile_in_zip_read_info->stream.avail_out = - (uInt)pfile_in_zip_read_info->rest_read_uncompressed; - - if ((len>pfile_in_zip_read_info->rest_read_compressed+ - pfile_in_zip_read_info->stream.avail_in) && - (pfile_in_zip_read_info->raw)) - pfile_in_zip_read_info->stream.avail_out = - (uInt)pfile_in_zip_read_info->rest_read_compressed+ - pfile_in_zip_read_info->stream.avail_in; - - while (pfile_in_zip_read_info->stream.avail_out>0) - { - if ((pfile_in_zip_read_info->stream.avail_in==0) && - (pfile_in_zip_read_info->rest_read_compressed>0)) - { - uInt uReadThis = UNZ_BUFSIZE; - if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; - if (uReadThis == 0) - return UNZ_EOF; - if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->pos_in_zipfile + - pfile_in_zip_read_info->byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - if (ZREAD64(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->read_buffer, - uReadThis)!=uReadThis) - return UNZ_ERRNO; - - -# ifndef NOUNCRYPT - if(s->encrypted) - { - uInt i; - for(i=0;iread_buffer[i] = - zdecode(s->keys,s->pcrc_32_tab, - pfile_in_zip_read_info->read_buffer[i]); - } -# endif - - - pfile_in_zip_read_info->pos_in_zipfile += uReadThis; - - pfile_in_zip_read_info->rest_read_compressed-=uReadThis; - - pfile_in_zip_read_info->stream.next_in = - (Bytef*)pfile_in_zip_read_info->read_buffer; - pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; - } - - if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) - { - uInt uDoCopy,i ; - - if ((pfile_in_zip_read_info->stream.avail_in == 0) && - (pfile_in_zip_read_info->rest_read_compressed == 0)) - return (iRead==0) ? UNZ_EOF : (int)iRead; - - if (pfile_in_zip_read_info->stream.avail_out < - pfile_in_zip_read_info->stream.avail_in) - uDoCopy = pfile_in_zip_read_info->stream.avail_out ; - else - uDoCopy = pfile_in_zip_read_info->stream.avail_in ; - - for (i=0;istream.next_out+i) = - *(pfile_in_zip_read_info->stream.next_in+i); - - pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; - - pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, - pfile_in_zip_read_info->stream.next_out, - uDoCopy); - pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; - pfile_in_zip_read_info->stream.avail_in -= uDoCopy; - pfile_in_zip_read_info->stream.avail_out -= uDoCopy; - pfile_in_zip_read_info->stream.next_out += uDoCopy; - pfile_in_zip_read_info->stream.next_in += uDoCopy; - pfile_in_zip_read_info->stream.total_out += uDoCopy; - iRead += uDoCopy; - } - else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) - { -#ifdef HAVE_BZIP2 - uLong uTotalOutBefore,uTotalOutAfter; - const Bytef *bufBefore; - uLong uOutThis; - - pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; - pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; - pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; - pfile_in_zip_read_info->bstream.total_in_hi32 = 0; - pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; - pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; - pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; - pfile_in_zip_read_info->bstream.total_out_hi32 = 0; - - uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; - bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; - - err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); - - uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; - uOutThis = uTotalOutAfter-uTotalOutBefore; - - pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; - - pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); - pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; - iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); - - pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; - pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; - pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; - pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; - pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; - pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; - - if (err==BZ_STREAM_END) - return (iRead==0) ? UNZ_EOF : iRead; - if (err!=BZ_OK) - break; -#endif - } // end Z_BZIP2ED - else - { - ZPOS64_T uTotalOutBefore,uTotalOutAfter; - const Bytef *bufBefore; - ZPOS64_T uOutThis; - int flush=Z_SYNC_FLUSH; - - uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; - bufBefore = pfile_in_zip_read_info->stream.next_out; - - /* - if ((pfile_in_zip_read_info->rest_read_uncompressed == - pfile_in_zip_read_info->stream.avail_out) && - (pfile_in_zip_read_info->rest_read_compressed == 0)) - flush = Z_FINISH; - */ - err=inflate(&pfile_in_zip_read_info->stream,flush); - - if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) - err = Z_DATA_ERROR; - - uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; - /* Detect overflow, because z_stream.total_out is uLong (32 bits) */ - if (uTotalOutAftertotal_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; - - pfile_in_zip_read_info->crc32 = - crc32(pfile_in_zip_read_info->crc32,bufBefore, - (uInt)(uOutThis)); - - pfile_in_zip_read_info->rest_read_uncompressed -= - uOutThis; - - iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); - - if (err==Z_STREAM_END) - return (iRead==0) ? UNZ_EOF : (int)iRead; - if (err!=Z_OK) - break; - } - } - - if (err==Z_OK) - return (int)iRead; - return err; -} - - -/* - Give the current position in uncompressed data -*/ -extern z_off_t ZEXPORT unztell(unzFile file) { - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - return (z_off_t)pfile_in_zip_read_info->stream.total_out; -} - -extern ZPOS64_T ZEXPORT unztell64(unzFile file) { - - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return (ZPOS64_T)-1; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return (ZPOS64_T)-1; - - return pfile_in_zip_read_info->total_out_64; -} - - -/* - return 1 if the end of file was reached, 0 elsewhere -*/ -extern int ZEXPORT unzeof(unzFile file) { - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - if (pfile_in_zip_read_info->rest_read_uncompressed == 0) - return 1; - else - return 0; -} - - - -/* -Read extra field from the current file (opened by unzOpenCurrentFile) -This is the local-header version of the extra field (sometimes, there is -more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field that can be read - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ -extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, unsigned len) { - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - uInt read_now; - ZPOS64_T size_to_read; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - size_to_read = (pfile_in_zip_read_info->size_local_extrafield - - pfile_in_zip_read_info->pos_local_extrafield); - - if (buf==NULL) - return (int)size_to_read; - - if (len>size_to_read) - read_now = (uInt)size_to_read; - else - read_now = (uInt)len ; - - if (read_now==0) - return 0; - - if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->offset_local_extrafield + - pfile_in_zip_read_info->pos_local_extrafield, - ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - if (ZREAD64(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - buf,read_now)!=read_now) - return UNZ_ERRNO; - - return (int)read_now; -} - -/* - Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ -extern int ZEXPORT unzCloseCurrentFile(unzFile file) { - int err=UNZ_OK; - - unz64_s* s; - file_in_zip64_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - - if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && - (!pfile_in_zip_read_info->raw)) - { - if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) - err=UNZ_CRCERROR; - } - - - free(pfile_in_zip_read_info->read_buffer); - pfile_in_zip_read_info->read_buffer = NULL; - if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) - inflateEnd(&pfile_in_zip_read_info->stream); -#ifdef HAVE_BZIP2 - else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED) - BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); -#endif - - - pfile_in_zip_read_info->stream_initialised = 0; - free(pfile_in_zip_read_info); - - s->pfile_in_zip_read=NULL; - - return err; -} - - -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ -extern int ZEXPORT unzGetGlobalComment(unzFile file, char * szComment, uLong uSizeBuf) { - unz64_s* s; - uLong uReadThis ; - if (file==NULL) - return (int)UNZ_PARAMERROR; - s=(unz64_s*)file; - - uReadThis = uSizeBuf; - if (uReadThis>s->gi.size_comment) - uReadThis = s->gi.size_comment; - - if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - if (uReadThis>0) - { - *szComment='\0'; - if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) - return UNZ_ERRNO; - } - - if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) - *(szComment+s->gi.size_comment)='\0'; - return (int)uReadThis; -} - -/* Additions by RX '2004 */ -extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) { - unz64_s* s; - - if (file==NULL) - return 0; //UNZ_PARAMERROR; - s=(unz64_s*)file; - if (!s->current_file_ok) - return 0; - if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) - if (s->num_file==s->gi.number_entry) - return 0; - return s->pos_in_central_dir; -} - -extern uLong ZEXPORT unzGetOffset(unzFile file) { - ZPOS64_T offset64; - - if (file==NULL) - return 0; //UNZ_PARAMERROR; - offset64 = unzGetOffset64(file); - return (uLong)offset64; -} - -extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) { - unz64_s* s; - int err; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz64_s*)file; - - s->pos_in_central_dir = pos; - s->num_file = s->gi.number_entry; /* hack */ - err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - -extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) { - return unzSetOffset64(file,pos); -} diff --git a/third_party/zlib/contrib/minizip/unzip.h b/third_party/zlib/contrib/minizip/unzip.h deleted file mode 100644 index d49cc18..0000000 --- a/third_party/zlib/contrib/minizip/unzip.h +++ /dev/null @@ -1,438 +0,0 @@ -/* unzip.h -- IO for uncompress .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications of Unzip for Zip64 - Copyright (C) 2007-2008 Even Rouault - - Modifications for Zip64 support on both zip and unzip - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - --------------------------------------------------------------------------------- - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - --------------------------------------------------------------------------------- - - Changes - - See header of unzip64.c - -*/ - -#ifndef _unz64_H -#define _unz64_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#ifdef HAVE_BZIP2 -#include "bzlib.h" -#endif - -#define Z_BZIP2ED 12 - -#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagunzFile__ { int unused; } unzFile__; -typedef unzFile__ *unzFile; -#else -typedef voidp unzFile; -#endif - - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (Z_ERRNO) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) - -/* tm_unz contain date/time info */ -typedef struct tm_unz_s -{ - int tm_sec; /* seconds after the minute - [0,59] */ - int tm_min; /* minutes after the hour - [0,59] */ - int tm_hour; /* hours since midnight - [0,23] */ - int tm_mday; /* day of the month - [1,31] */ - int tm_mon; /* months since January - [0,11] */ - int tm_year; /* years - [1980..2044] */ -} tm_unz; - -/* unz_global_info structure contain global data about the ZIPfile - These data comes from the end of central dir */ -typedef struct unz_global_info64_s -{ - ZPOS64_T number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info64; - -typedef struct unz_global_info_s -{ - uLong number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info; - -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_info64_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - ZPOS64_T compressed_size; /* compressed size 8 bytes */ - ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info64; - -typedef struct unz_file_info_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - uLong compressed_size; /* compressed size 4 bytes */ - uLong uncompressed_size; /* uncompressed size 4 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info; - -extern int ZEXPORT unzStringFileNameCompare(const char* fileName1, - const char* fileName2, - int iCaseSensitivity); -/* - Compare two filenames (fileName1,fileName2). - If iCaseSensitivity = 1, comparison is case sensitive (like strcmp) - If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi - or strcasecmp) - If iCaseSensitivity = 0, case sensitivity is default of your operating system - (like 1 on Unix, 2 on Windows) -*/ - - -extern unzFile ZEXPORT unzOpen(const char *path); -extern unzFile ZEXPORT unzOpen64(const void *path); -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer - "zlib/zlib113.zip". - If the zipfile cannot be opened (file don't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. - the "64" function take a const void* pointer, because the path is just the - value passed to the open64_file_func callback. - Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path - is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* - does not describe the reality -*/ - - -extern unzFile ZEXPORT unzOpen2(const char *path, - zlib_filefunc_def* pzlib_filefunc_def); -/* - Open a Zip file, like unzOpen, but provide a set of file low level API - for read/write the zip file (see ioapi.h) -*/ - -extern unzFile ZEXPORT unzOpen2_64(const void *path, - zlib_filefunc64_def* pzlib_filefunc_def); -/* - Open a Zip file, like unz64Open, but provide a set of file low level API - for read/write the zip file (see ioapi.h) -*/ - -extern int ZEXPORT unzClose(unzFile file); -/* - Close a ZipFile opened with unzOpen. - If there is files inside the .Zip opened with unzOpenCurrentFile (see later), - these files MUST be closed with unzCloseCurrentFile before call unzClose. - return UNZ_OK if there is no problem. */ - -extern int ZEXPORT unzGetGlobalInfo(unzFile file, - unz_global_info *pglobal_info); - -extern int ZEXPORT unzGetGlobalInfo64(unzFile file, - unz_global_info64 *pglobal_info); -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ - - -extern int ZEXPORT unzGetGlobalComment(unzFile file, - char *szComment, - uLong uSizeBuf); -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ - - -/***************************************************************************/ -/* Unzip package allow you browse the directory of the zipfile */ - -extern int ZEXPORT unzGoToFirstFile(unzFile file); -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ - -extern int ZEXPORT unzGoToNextFile(unzFile file); -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ - -extern int ZEXPORT unzLocateFile(unzFile file, - const char *szFileName, - int iCaseSensitivity); -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ - - -/* ****************************************** */ -/* Ryan supplied functions */ -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_pos_s -{ - uLong pos_in_zip_directory; /* offset in zip file directory */ - uLong num_of_file; /* # of file */ -} unz_file_pos; - -extern int ZEXPORT unzGetFilePos( - unzFile file, - unz_file_pos* file_pos); - -extern int ZEXPORT unzGoToFilePos( - unzFile file, - unz_file_pos* file_pos); - -typedef struct unz64_file_pos_s -{ - ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ - ZPOS64_T num_of_file; /* # of file */ -} unz64_file_pos; - -extern int ZEXPORT unzGetFilePos64( - unzFile file, - unz64_file_pos* file_pos); - -extern int ZEXPORT unzGoToFilePos64( - unzFile file, - const unz64_file_pos* file_pos); - -/* ****************************************** */ - -extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, - unz_file_info64 *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize); - -extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, - unz_file_info *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize); -/* - Get Info about the current file - if pfile_info!=NULL, the *pfile_info structure will contain some info about - the current file - if szFileName!=NULL, the filename string will be copied in szFileName - (fileNameBufferSize is the size of the buffer) - if extraField!=NULL, the extra field information will be copied in extraField - (extraFieldBufferSize is the size of the buffer). - This is the Central-header version of the extra field - if szComment!=NULL, the comment string of the file will be copied in szComment - (commentBufferSize is the size of the buffer) -*/ - - -/** Addition for GDAL : START */ - -extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file); - -/** Addition for GDAL : END */ - - -/***************************************************************************/ -/* for reading the content of the current zipfile, you can open it, read data - from it, and close it (you can close it before reading all the file) - */ - -extern int ZEXPORT unzOpenCurrentFile(unzFile file); -/* - Open for reading data the current file in the zipfile. - If there is no error, the return value is UNZ_OK. -*/ - -extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, - const char* password); -/* - Open for reading data the current file in the zipfile. - password is a crypting password - If there is no error, the return value is UNZ_OK. -*/ - -extern int ZEXPORT unzOpenCurrentFile2(unzFile file, - int* method, - int* level, - int raw); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - -extern int ZEXPORT unzOpenCurrentFile3(unzFile file, - int* method, - int* level, - int raw, - const char* password); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - - -extern int ZEXPORT unzCloseCurrentFile(unzFile file); -/* - Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ - -extern int ZEXPORT unzReadCurrentFile(unzFile file, - voidp buf, - unsigned len); -/* - Read bytes from the current file (opened by unzOpenCurrentFile) - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if some bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ - -extern z_off_t ZEXPORT unztell(unzFile file); - -extern ZPOS64_T ZEXPORT unztell64(unzFile file); -/* - Give the current position in uncompressed data -*/ - -extern int ZEXPORT unzeof(unzFile file); -/* - return 1 if the end of file was reached, 0 elsewhere -*/ - -extern int ZEXPORT unzGetLocalExtrafield(unzFile file, - voidp buf, - unsigned len); -/* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ - -/***************************************************************************/ - -/* Get the current file offset */ -extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file); -extern uLong ZEXPORT unzGetOffset (unzFile file); - -/* Set the current file offset */ -extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); -extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); - - - -#ifdef __cplusplus -} -#endif - -#endif /* _unz64_H */ - diff --git a/third_party/zlib/contrib/minizip/zip.c b/third_party/zlib/contrib/minizip/zip.c deleted file mode 100644 index 60bdffa..0000000 --- a/third_party/zlib/contrib/minizip/zip.c +++ /dev/null @@ -1,1956 +0,0 @@ -/* zip.c -- IO on .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - Changes - Oct-2009 - Mathias Svensson - Remove old C style function prototypes - Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives - Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. - Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data - It is used when recreating zip archive with RAW when deleting items from a zip. - ZIP64 data is automatically added to items that needs it, and existing ZIP64 data need to be removed. - Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) - Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer - -*/ - - -#include -#include -#include -#include -#include -#include "zlib.h" -#include "zip.h" - -#ifdef STDC -# include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include -#endif - - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -#ifndef VERSIONMADEBY -# define VERSIONMADEBY (0x0) /* platform dependent */ -#endif - -#ifndef Z_BUFSIZE -#define Z_BUFSIZE (64*1024) //(16384) -#endif - -#ifndef Z_MAXFILENAMEINZIP -#define Z_MAXFILENAMEINZIP (256) -#endif - -#ifndef ALLOC -# define ALLOC(size) (malloc(size)) -#endif - -/* -#define SIZECENTRALDIRITEM (0x2e) -#define SIZEZIPLOCALHEADER (0x1e) -*/ - -/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ - - -// NOT sure that this work on ALL platform -#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) - -#ifndef SEEK_CUR -#define SEEK_CUR 1 -#endif - -#ifndef SEEK_END -#define SEEK_END 2 -#endif - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -#ifndef DEF_MEM_LEVEL -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -#endif -const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; - - -#define SIZEDATA_INDATABLOCK (4096-(4*4)) - -#define LOCALHEADERMAGIC (0x04034b50) -#define CENTRALHEADERMAGIC (0x02014b50) -#define ENDHEADERMAGIC (0x06054b50) -#define ZIP64ENDHEADERMAGIC (0x6064b50) -#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) - -#define FLAG_LOCALHEADER_OFFSET (0x06) -#define CRC_LOCALHEADER_OFFSET (0x0e) - -#define SIZECENTRALHEADER (0x2e) /* 46 */ - -typedef struct linkedlist_datablock_internal_s -{ - struct linkedlist_datablock_internal_s* next_datablock; - uLong avail_in_this_block; - uLong filled_in_this_block; - uLong unused; /* for future use and alignment */ - unsigned char data[SIZEDATA_INDATABLOCK]; -} linkedlist_datablock_internal; - -typedef struct linkedlist_data_s -{ - linkedlist_datablock_internal* first_block; - linkedlist_datablock_internal* last_block; -} linkedlist_data; - - -typedef struct -{ - z_stream stream; /* zLib stream structure for inflate */ -#ifdef HAVE_BZIP2 - bz_stream bstream; /* bzLib stream structure for bziped */ -#endif - - int stream_initialised; /* 1 is stream is initialised */ - uInt pos_in_buffered_data; /* last written byte in buffered_data */ - - ZPOS64_T pos_local_header; /* offset of the local header of the file - currently writing */ - char* central_header; /* central header data for the current file */ - uLong size_centralExtra; - uLong size_centralheader; /* size of the central header for cur file */ - uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ - uLong flag; /* flag of the file currently writing */ - - int method; /* compression method of file currently wr.*/ - int raw; /* 1 for directly writing raw data */ - Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ - uLong dosDate; - uLong crc32; - int encrypt; - int zip64; /* Add ZIP64 extended information in the extra field */ - ZPOS64_T pos_zip64extrainfo; - ZPOS64_T totalCompressedData; - ZPOS64_T totalUncompressedData; -#ifndef NOCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const z_crc_t* pcrc_32_tab; - unsigned crypt_header_size; -#endif -} curfile64_info; - -typedef struct -{ - zlib_filefunc64_32_def z_filefunc; - voidpf filestream; /* io structure of the zipfile */ - linkedlist_data central_dir;/* datablock with central dir in construction*/ - int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ - curfile64_info ci; /* info on the file currently writing */ - - ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ - ZPOS64_T add_position_when_writing_offset; - ZPOS64_T number_entry; - -#ifndef NO_ADDFILEINEXISTINGZIP - char *globalcomment; -#endif - -} zip64_internal; - - -#ifndef NOCRYPT -#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED -#include "crypt.h" -#endif - -local linkedlist_datablock_internal* allocate_new_datablock(void) { - linkedlist_datablock_internal* ldi; - ldi = (linkedlist_datablock_internal*) - ALLOC(sizeof(linkedlist_datablock_internal)); - if (ldi!=NULL) - { - ldi->next_datablock = NULL ; - ldi->filled_in_this_block = 0 ; - ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; - } - return ldi; -} - -local void free_datablock(linkedlist_datablock_internal* ldi) { - while (ldi!=NULL) - { - linkedlist_datablock_internal* ldinext = ldi->next_datablock; - free(ldi); - ldi = ldinext; - } -} - -local void init_linkedlist(linkedlist_data* ll) { - ll->first_block = ll->last_block = NULL; -} - -local void free_linkedlist(linkedlist_data* ll) { - free_datablock(ll->first_block); - ll->first_block = ll->last_block = NULL; -} - - -local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) { - linkedlist_datablock_internal* ldi; - const unsigned char* from_copy; - - if (ll==NULL) - return ZIP_INTERNALERROR; - - if (ll->last_block == NULL) - { - ll->first_block = ll->last_block = allocate_new_datablock(); - if (ll->first_block == NULL) - return ZIP_INTERNALERROR; - } - - ldi = ll->last_block; - from_copy = (const unsigned char*)buf; - - while (len>0) - { - uInt copy_this; - uInt i; - unsigned char* to_copy; - - if (ldi->avail_in_this_block==0) - { - ldi->next_datablock = allocate_new_datablock(); - if (ldi->next_datablock == NULL) - return ZIP_INTERNALERROR; - ldi = ldi->next_datablock ; - ll->last_block = ldi; - } - - if (ldi->avail_in_this_block < len) - copy_this = (uInt)ldi->avail_in_this_block; - else - copy_this = (uInt)len; - - to_copy = &(ldi->data[ldi->filled_in_this_block]); - - for (i=0;ifilled_in_this_block += copy_this; - ldi->avail_in_this_block -= copy_this; - from_copy += copy_this ; - len -= copy_this; - } - return ZIP_OK; -} - - - -/****************************************************************************/ - -#ifndef NO_ADDFILEINEXISTINGZIP -/* =========================================================================== - Inputs a long in LSB order to the given file - nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) -*/ - -local int zip64local_putValue(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) { - unsigned char buf[8]; - int n; - for (n = 0; n < nbByte; n++) - { - buf[n] = (unsigned char)(x & 0xff); - x >>= 8; - } - if (x != 0) - { /* data overflow - hack for ZIP64 (X Roche) */ - for (n = 0; n < nbByte; n++) - { - buf[n] = 0xff; - } - } - - if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,(uLong)nbByte)!=(uLong)nbByte) - return ZIP_ERRNO; - else - return ZIP_OK; -} - -local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) { - unsigned char* buf=(unsigned char*)dest; - int n; - for (n = 0; n < nbByte; n++) { - buf[n] = (unsigned char)(x & 0xff); - x >>= 8; - } - - if (x != 0) - { /* data overflow - hack for ZIP64 */ - for (n = 0; n < nbByte; n++) - { - buf[n] = 0xff; - } - } -} - -/****************************************************************************/ - - -local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) { - uLong year = (uLong)ptm->tm_year; - if (year>=1980) - year-=1980; - else if (year>=80) - year-=80; - return - (uLong) (((uLong)(ptm->tm_mday) + (32 * (uLong)(ptm->tm_mon+1)) + (512 * year)) << 16) | - (((uLong)ptm->tm_sec/2) + (32 * (uLong)ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); -} - - -/****************************************************************************/ - -local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int* pi) { - unsigned char c; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); - if (err==1) - { - *pi = (int)c; - return ZIP_OK; - } - else - { - if (ZERROR64(*pzlib_filefunc_def,filestream)) - return ZIP_ERRNO; - else - return ZIP_EOF; - } -} - - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ -local int zip64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { - uLong x ; - int i = 0; - int err; - - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==ZIP_OK) - *pX = x; - else - *pX = 0; - return err; -} - -local int zip64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { - uLong x ; - int i = 0; - int err; - - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<16; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<24; - - if (err==ZIP_OK) - *pX = x; - else - *pX = 0; - return err; -} - - -local int zip64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) { - ZPOS64_T x; - int i = 0; - int err; - - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (ZPOS64_T)i; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<8; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<16; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<24; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<32; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<40; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<48; - - if (err==ZIP_OK) - err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((ZPOS64_T)i)<<56; - - if (err==ZIP_OK) - *pX = x; - else - *pX = 0; - - return err; -} - -#ifndef BUFREADCOMMENT -#define BUFREADCOMMENT (0x400) -#endif -/* - Locate the Central directory of a zipfile (at the end, just before - the global comment) -*/ -local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { - unsigned char* buf; - ZPOS64_T uSizeFile; - ZPOS64_T uBackRead; - ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ - ZPOS64_T uPosFound=0; - - if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; - - - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return 0; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); - if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { - uPosFound = uReadPos+(unsigned)i; - break; - } - - if (uPosFound!=0) - break; - } - free(buf); - return uPosFound; -} - -/* -Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before -the global comment) -*/ -local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { - unsigned char* buf; - ZPOS64_T uSizeFile; - ZPOS64_T uBackRead; - ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ - ZPOS64_T uPosFound=0; - uLong uL; - ZPOS64_T relativeOffset; - - if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; - - uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return 0; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); - if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - { - // Signature "0x07064b50" Zip64 end of central directory locater - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) - { - uPosFound = uReadPos+(unsigned)i; - break; - } - } - - if (uPosFound!=0) - break; - } - - free(buf); - if (uPosFound == 0) - return 0; - - /* Zip64 end of central directory locator */ - if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) - return 0; - - /* the signature, already checked */ - if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) - return 0; - - /* number of the disk with the start of the zip64 end of central directory */ - if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) - return 0; - if (uL != 0) - return 0; - - /* relative offset of the zip64 end of central directory record */ - if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) - return 0; - - /* total number of disks */ - if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) - return 0; - if (uL != 1) - return 0; - - /* Goto Zip64 end of central directory record */ - if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) - return 0; - - /* the signature */ - if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) - return 0; - - if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' - return 0; - - return relativeOffset; -} - -local int LoadCentralDirectoryRecord(zip64_internal* pziinit) { - int err=ZIP_OK; - ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - - ZPOS64_T size_central_dir; /* size of the central directory */ - ZPOS64_T offset_central_dir; /* offset of start of central directory */ - ZPOS64_T central_pos; - uLong uL; - - uLong number_disk; /* number of the current disk, used for - spanning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number of the disk with central dir, used - for spanning ZIP, unsupported, always 0*/ - ZPOS64_T number_entry; - ZPOS64_T number_entry_CD; /* total number of entries in - the central dir - (same than number_entry on nospan) */ - uLong VersionMadeBy; - uLong VersionNeeded; - uLong size_comment; - - int hasZIP64Record = 0; - - // check first if we find a ZIP64 record - central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); - if(central_pos > 0) - { - hasZIP64Record = 1; - } - else if(central_pos == 0) - { - central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); - } - -/* disable to allow appending to empty ZIP archive - if (central_pos==0) - err=ZIP_ERRNO; -*/ - - if(hasZIP64Record) - { - ZPOS64_T sizeEndOfCentralDirectory; - if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) - err=ZIP_ERRNO; - - /* the signature, already checked */ - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) - err=ZIP_ERRNO; - - /* size of zip64 end of central directory record */ - if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) - err=ZIP_ERRNO; - - /* version made by */ - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) - err=ZIP_ERRNO; - - /* version needed to extract */ - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of this disk */ - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of the disk with the start of the central directory */ - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central directory on this disk */ - if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central directory */ - if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) - err=ZIP_BADZIPFILE; - - /* size of the central directory */ - if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - /* offset of start of central directory with respect to the - starting disk number */ - if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - // TODO.. - // read the comment from the standard central header. - size_comment = 0; - } - else - { - // Read End of central Directory info - if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=ZIP_ERRNO; - - /* the signature, already checked */ - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of this disk */ - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of the disk with the start of the central directory */ - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central dir on this disk */ - number_entry = 0; - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) - err=ZIP_ERRNO; - else - number_entry = uL; - - /* total number of entries in the central dir */ - number_entry_CD = 0; - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) - err=ZIP_ERRNO; - else - number_entry_CD = uL; - - if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) - err=ZIP_BADZIPFILE; - - /* size of the central directory */ - size_central_dir = 0; - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) - err=ZIP_ERRNO; - else - size_central_dir = uL; - - /* offset of start of central directory with respect to the starting disk number */ - offset_central_dir = 0; - if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) - err=ZIP_ERRNO; - else - offset_central_dir = uL; - - - /* zipfile global comment length */ - if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) - err=ZIP_ERRNO; - } - - if ((central_posz_filefunc, pziinit->filestream); - return ZIP_ERRNO; - } - - if (size_comment>0) - { - pziinit->globalcomment = (char*)ALLOC(size_comment+1); - if (pziinit->globalcomment) - { - size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); - pziinit->globalcomment[size_comment]=0; - } - } - - byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); - pziinit->add_position_when_writing_offset = byte_before_the_zipfile; - - { - ZPOS64_T size_central_dir_to_read = size_central_dir; - size_t buf_size = SIZEDATA_INDATABLOCK; - void* buf_read = (void*)ALLOC(buf_size); - if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) - err=ZIP_ERRNO; - - while ((size_central_dir_to_read>0) && (err==ZIP_OK)) - { - ZPOS64_T read_this = SIZEDATA_INDATABLOCK; - if (read_this > size_central_dir_to_read) - read_this = size_central_dir_to_read; - - if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) - err=ZIP_ERRNO; - - if (err==ZIP_OK) - err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); - - size_central_dir_to_read-=read_this; - } - free(buf_read); - } - pziinit->begin_pos = byte_before_the_zipfile; - pziinit->number_entry = number_entry_CD; - - if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) - err=ZIP_ERRNO; - - return err; -} - - -#endif /* !NO_ADDFILEINEXISTINGZIP*/ - - -/************************************************************/ -extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) { - zip64_internal ziinit; - zip64_internal* zi; - int err=ZIP_OK; - - ziinit.z_filefunc.zseek32_file = NULL; - ziinit.z_filefunc.ztell32_file = NULL; - if (pzlib_filefunc64_32_def==NULL) - fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); - else - ziinit.z_filefunc = *pzlib_filefunc64_32_def; - - ziinit.filestream = ZOPEN64(ziinit.z_filefunc, - pathname, - (append == APPEND_STATUS_CREATE) ? - (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : - (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); - - if (ziinit.filestream == NULL) - return NULL; - - if (append == APPEND_STATUS_CREATEAFTER) - ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); - - ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); - ziinit.in_opened_file_inzip = 0; - ziinit.ci.stream_initialised = 0; - ziinit.number_entry = 0; - ziinit.add_position_when_writing_offset = 0; - init_linkedlist(&(ziinit.central_dir)); - - - - zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); - if (zi==NULL) - { - ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); - return NULL; - } - - /* now we add file in a zipfile */ -# ifndef NO_ADDFILEINEXISTINGZIP - ziinit.globalcomment = NULL; - if (append == APPEND_STATUS_ADDINZIP) - { - // Read and Cache Central Directory Records - err = LoadCentralDirectoryRecord(&ziinit); - } - - if (globalcomment) - { - *globalcomment = ziinit.globalcomment; - } -# endif /* !NO_ADDFILEINEXISTINGZIP*/ - - if (err != ZIP_OK) - { -# ifndef NO_ADDFILEINEXISTINGZIP - free(ziinit.globalcomment); -# endif /* !NO_ADDFILEINEXISTINGZIP*/ - free(zi); - return NULL; - } - else - { - *zi = ziinit; - return (zipFile)zi; - } -} - -extern zipFile ZEXPORT zipOpen2(const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) { - if (pzlib_filefunc32_def != NULL) - { - zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; - fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); - return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); - } - else - return zipOpen3(pathname, append, globalcomment, NULL); -} - -extern zipFile ZEXPORT zipOpen2_64(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) { - if (pzlib_filefunc_def != NULL) - { - zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; - zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; - zlib_filefunc64_32_def_fill.ztell32_file = NULL; - zlib_filefunc64_32_def_fill.zseek32_file = NULL; - return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); - } - else - return zipOpen3(pathname, append, globalcomment, NULL); -} - - - -extern zipFile ZEXPORT zipOpen(const char* pathname, int append) { - return zipOpen3((const void*)pathname,append,NULL,NULL); -} - -extern zipFile ZEXPORT zipOpen64(const void* pathname, int append) { - return zipOpen3(pathname,append,NULL,NULL); -} - -local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) { - /* write the local header */ - int err; - uInt size_filename = (uInt)strlen(filename); - uInt size_extrafield = size_extrafield_local; - - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); - - if (err==ZIP_OK) - { - if(zi->ci.zip64) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ - } - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); - - // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ - if (err==ZIP_OK) - { - if(zi->ci.zip64) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ - } - if (err==ZIP_OK) - { - if(zi->ci.zip64) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ - } - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); - - if(zi->ci.zip64) - { - size_extrafield += 20; - } - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); - - if ((err==ZIP_OK) && (size_filename > 0)) - { - if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) - err = ZIP_ERRNO; - } - - if ((err==ZIP_OK) && (size_extrafield_local > 0)) - { - if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) - err = ZIP_ERRNO; - } - - - if ((err==ZIP_OK) && (zi->ci.zip64)) - { - // write the Zip64 extended info - short HeaderID = 1; - short DataSize = 16; - ZPOS64_T CompressedSize = 0; - ZPOS64_T UncompressedSize = 0; - - // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) - zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); - - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)HeaderID,2); - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2); - - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); - } - - return err; -} - -/* - NOTE. - When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped - before calling this function it can be done with zipRemoveExtraInfoBlock - - It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize - unnecessary allocations. - */ -extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, - uLong versionMadeBy, uLong flagBase, int zip64) { - zip64_internal* zi; - uInt size_filename; - uInt size_comment; - uInt i; - int err = ZIP_OK; - -# ifdef NOCRYPT - (crcForCrypting); - if (password != NULL) - return ZIP_PARAMERROR; -# endif - - if (file == NULL) - return ZIP_PARAMERROR; - -#ifdef HAVE_BZIP2 - if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) - return ZIP_PARAMERROR; -#else - if ((method!=0) && (method!=Z_DEFLATED)) - return ZIP_PARAMERROR; -#endif - - // The filename and comment length must fit in 16 bits. - if ((filename!=NULL) && (strlen(filename)>0xffff)) - return ZIP_PARAMERROR; - if ((comment!=NULL) && (strlen(comment)>0xffff)) - return ZIP_PARAMERROR; - // The extra field length must fit in 16 bits. If the member also requires - // a Zip64 extra block, that will also need to fit within that 16-bit - // length, but that will be checked for later. - if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff)) - return ZIP_PARAMERROR; - - zi = (zip64_internal*)file; - - if (zi->in_opened_file_inzip == 1) - { - err = zipCloseFileInZip (file); - if (err != ZIP_OK) - return err; - } - - if (filename==NULL) - filename="-"; - - if (comment==NULL) - size_comment = 0; - else - size_comment = (uInt)strlen(comment); - - size_filename = (uInt)strlen(filename); - - if (zipfi == NULL) - zi->ci.dosDate = 0; - else - { - if (zipfi->dosDate != 0) - zi->ci.dosDate = zipfi->dosDate; - else - zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); - } - - zi->ci.flag = flagBase; - if ((level==8) || (level==9)) - zi->ci.flag |= 2; - if (level==2) - zi->ci.flag |= 4; - if (level==1) - zi->ci.flag |= 6; - if (password != NULL) - zi->ci.flag |= 1; - - zi->ci.crc32 = 0; - zi->ci.method = method; - zi->ci.encrypt = 0; - zi->ci.stream_initialised = 0; - zi->ci.pos_in_buffered_data = 0; - zi->ci.raw = raw; - zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); - - zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; - zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data - - zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); - - zi->ci.size_centralExtra = size_extrafield_global; - zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); - /* version info */ - zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); - zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); - zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); - zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); - zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); - zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ - zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ - zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ - zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); - zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); - zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); - zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ - - if (zipfi==NULL) - zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); - else - zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); - - if (zipfi==NULL) - zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); - else - zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); - - if(zi->ci.pos_local_header >= 0xffffffff) - zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); - else - zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writing_offset,4); - - for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); - - for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = - *(((const char*)extrafield_global)+i); - - for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ - size_extrafield_global+i) = *(comment+i); - if (zi->ci.central_header == NULL) - return ZIP_INTERNALERROR; - - zi->ci.zip64 = zip64; - zi->ci.totalCompressedData = 0; - zi->ci.totalUncompressedData = 0; - zi->ci.pos_zip64extrainfo = 0; - - err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); - -#ifdef HAVE_BZIP2 - zi->ci.bstream.avail_in = (uInt)0; - zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; - zi->ci.bstream.total_in_hi32 = 0; - zi->ci.bstream.total_in_lo32 = 0; - zi->ci.bstream.total_out_hi32 = 0; - zi->ci.bstream.total_out_lo32 = 0; -#endif - - zi->ci.stream.avail_in = (uInt)0; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - zi->ci.stream.total_in = 0; - zi->ci.stream.total_out = 0; - zi->ci.stream.data_type = Z_BINARY; - -#ifdef HAVE_BZIP2 - if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) -#else - if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) -#endif - { - if(zi->ci.method == Z_DEFLATED) - { - zi->ci.stream.zalloc = (alloc_func)0; - zi->ci.stream.zfree = (free_func)0; - zi->ci.stream.opaque = (voidpf)0; - - if (windowBits>0) - windowBits = -windowBits; - - err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); - - if (err==Z_OK) - zi->ci.stream_initialised = Z_DEFLATED; - } - else if(zi->ci.method == Z_BZIP2ED) - { -#ifdef HAVE_BZIP2 - // Init BZip stuff here - zi->ci.bstream.bzalloc = 0; - zi->ci.bstream.bzfree = 0; - zi->ci.bstream.opaque = (voidpf)0; - - err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); - if(err == BZ_OK) - zi->ci.stream_initialised = Z_BZIP2ED; -#endif - } - - } - -# ifndef NOCRYPT - zi->ci.crypt_header_size = 0; - if ((err==Z_OK) && (password != NULL)) - { - unsigned char bufHead[RAND_HEAD_LEN]; - unsigned int sizeHead; - zi->ci.encrypt = 1; - zi->ci.pcrc_32_tab = get_crc_table(); - /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ - - sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); - zi->ci.crypt_header_size = sizeHead; - - if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) - err = ZIP_ERRNO; - } -# endif - - if (err==Z_OK) - zi->in_opened_file_inzip = 1; - return err; -} - -extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, - uLong versionMadeBy, uLong flagBase) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, versionMadeBy, flagBase, 0); -} - -extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, VERSIONMADEBY, 0, 0); -} - -extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, int zip64) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, VERSIONMADEBY, 0, zip64); -} - -extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, 0); -} - -extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, int zip64) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, zip64); -} - -extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void*extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int zip64) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, 0, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, zip64); -} - -extern int ZEXPORT zipOpenNewFileInZip(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void*extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level) { - return zipOpenNewFileInZip4_64(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, 0, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, 0); -} - -local int zip64FlushWriteBuffer(zip64_internal* zi) { - int err=ZIP_OK; - - if (zi->ci.encrypt != 0) - { -#ifndef NOCRYPT - uInt i; - int t; - for (i=0;ici.pos_in_buffered_data;i++) - zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); -#endif - } - - if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) - err = ZIP_ERRNO; - - zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; - -#ifdef HAVE_BZIP2 - if(zi->ci.method == Z_BZIP2ED) - { - zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; - zi->ci.bstream.total_in_lo32 = 0; - zi->ci.bstream.total_in_hi32 = 0; - } - else -#endif - { - zi->ci.totalUncompressedData += zi->ci.stream.total_in; - zi->ci.stream.total_in = 0; - } - - - zi->ci.pos_in_buffered_data = 0; - - return err; -} - -extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf, unsigned int len) { - zip64_internal* zi; - int err=ZIP_OK; - - if (file == NULL) - return ZIP_PARAMERROR; - zi = (zip64_internal*)file; - - if (zi->in_opened_file_inzip == 0) - return ZIP_PARAMERROR; - - zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); - -#ifdef HAVE_BZIP2 - if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) - { - zi->ci.bstream.next_in = (void*)buf; - zi->ci.bstream.avail_in = len; - err = BZ_RUN_OK; - - while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) - { - if (zi->ci.bstream.avail_out == 0) - { - if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; - } - - - if(err != BZ_RUN_OK) - break; - - if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) - { - uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; -// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; - err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); - - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; - } - } - - if(err == BZ_RUN_OK) - err = ZIP_OK; - } - else -#endif - { - zi->ci.stream.next_in = (Bytef*)(uintptr_t)buf; - zi->ci.stream.avail_in = len; - - while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) - { - if (zi->ci.stream.avail_out == 0) - { - if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - } - - - if(err != ZIP_OK) - break; - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - uLong uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_NO_FLUSH); - - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; - } - else - { - uInt copy_this,i; - if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) - copy_this = zi->ci.stream.avail_in; - else - copy_this = zi->ci.stream.avail_out; - - for (i = 0; i < copy_this; i++) - *(((char*)zi->ci.stream.next_out)+i) = - *(((const char*)zi->ci.stream.next_in)+i); - { - zi->ci.stream.avail_in -= copy_this; - zi->ci.stream.avail_out-= copy_this; - zi->ci.stream.next_in+= copy_this; - zi->ci.stream.next_out+= copy_this; - zi->ci.stream.total_in+= copy_this; - zi->ci.stream.total_out+= copy_this; - zi->ci.pos_in_buffered_data += copy_this; - } - } - }// while(...) - } - - return err; -} - -extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, uLong uncompressed_size, uLong crc32) { - return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); -} - -extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_size, uLong crc32) { - zip64_internal* zi; - ZPOS64_T compressed_size; - uLong invalidValue = 0xffffffff; - unsigned datasize = 0; - int err=ZIP_OK; - - if (file == NULL) - return ZIP_PARAMERROR; - zi = (zip64_internal*)file; - - if (zi->in_opened_file_inzip == 0) - return ZIP_PARAMERROR; - zi->ci.stream.avail_in = 0; - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - while (err==ZIP_OK) - { - uLong uTotalOutBefore; - if (zi->ci.stream.avail_out == 0) - { - if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - } - uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_FINISH); - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; - } - } - else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) - { -#ifdef HAVE_BZIP2 - err = BZ_FINISH_OK; - while (err==BZ_FINISH_OK) - { - uLong uTotalOutBefore; - if (zi->ci.bstream.avail_out == 0) - { - if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; - } - uTotalOutBefore = zi->ci.bstream.total_out_lo32; - err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); - if(err == BZ_STREAM_END) - err = Z_STREAM_END; - - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); - } - - if(err == BZ_FINISH_OK) - err = ZIP_OK; -#endif - } - - if (err==Z_STREAM_END) - err=ZIP_OK; /* this is normal */ - - if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) - { - if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) - err = ZIP_ERRNO; - } - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - int tmp_err = deflateEnd(&zi->ci.stream); - if (err == ZIP_OK) - err = tmp_err; - zi->ci.stream_initialised = 0; - } -#ifdef HAVE_BZIP2 - else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) - { - int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); - if (err==ZIP_OK) - err = tmperr; - zi->ci.stream_initialised = 0; - } -#endif - - if (!zi->ci.raw) - { - crc32 = (uLong)zi->ci.crc32; - uncompressed_size = zi->ci.totalUncompressedData; - } - compressed_size = zi->ci.totalCompressedData; - -# ifndef NOCRYPT - compressed_size += zi->ci.crypt_header_size; -# endif - - // update Current Item crc and sizes, - if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) - { - /*version Made by*/ - zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); - /*version needed*/ - zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); - - } - - zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ - - - if(compressed_size >= 0xffffffff) - zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ - else - zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ - - /// set internal file attributes field - if (zi->ci.stream.data_type == Z_ASCII) - zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); - - if(uncompressed_size >= 0xffffffff) - zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ - else - zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ - - // Add ZIP64 extra info field for uncompressed size - if(uncompressed_size >= 0xffffffff) - datasize += 8; - - // Add ZIP64 extra info field for compressed size - if(compressed_size >= 0xffffffff) - datasize += 8; - - // Add ZIP64 extra info field for relative offset to local file header of current file - if(zi->ci.pos_local_header >= 0xffffffff) - datasize += 8; - - if(datasize > 0) - { - char* p = NULL; - - if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) - { - // we cannot write more data to the buffer that we have room for. - return ZIP_BADZIPFILE; - } - - p = zi->ci.central_header + zi->ci.size_centralheader; - - // Add Extra Information Header for 'ZIP64 information' - zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID - p += 2; - zip64local_putValue_inmemory(p, datasize, 2); // DataSize - p += 2; - - if(uncompressed_size >= 0xffffffff) - { - zip64local_putValue_inmemory(p, uncompressed_size, 8); - p += 8; - } - - if(compressed_size >= 0xffffffff) - { - zip64local_putValue_inmemory(p, compressed_size, 8); - p += 8; - } - - if(zi->ci.pos_local_header >= 0xffffffff) - { - zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); - p += 8; - } - - // Update how much extra free space we got in the memory buffer - // and increase the centralheader size so the new ZIP64 fields are included - // ( 4 below is the size of HeaderID and DataSize field ) - zi->ci.size_centralExtraFree -= datasize + 4; - zi->ci.size_centralheader += datasize + 4; - - // Update the extra info size field - zi->ci.size_centralExtra += datasize + 4; - zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); - } - - if (err==ZIP_OK) - err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); - - free(zi->ci.central_header); - - if (err==ZIP_OK) - { - // Update the LocalFileHeader with the new values. - - ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); - - if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) - err = ZIP_ERRNO; - - if (err==ZIP_OK) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ - - if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff ) - { - if(zi->ci.pos_zip64extrainfo > 0) - { - // Update the size in the ZIP64 extended field. - if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) - err = ZIP_ERRNO; - - if (err==ZIP_OK) /* compressed size, unknown */ - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); - - if (err==ZIP_OK) /* uncompressed size, unknown */ - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); - } - else - err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal - } - else - { - if (err==ZIP_OK) /* compressed size, unknown */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); - - if (err==ZIP_OK) /* uncompressed size, unknown */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); - } - - if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) - err = ZIP_ERRNO; - } - - zi->number_entry ++; - zi->in_opened_file_inzip = 0; - - return err; -} - -extern int ZEXPORT zipCloseFileInZip(zipFile file) { - return zipCloseFileInZipRaw (file,0,0); -} - -local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) { - int err = ZIP_OK; - ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset; - - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); - - /*num disks*/ - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); - - /*relative offset*/ - if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); - - /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); - - return err; -} - -local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { - int err = ZIP_OK; - - uLong Zip64DataSize = 44; - - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); - - if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? - - if (err==ZIP_OK) /* version made by */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); - - if (err==ZIP_OK) /* version needed */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); - - if (err==ZIP_OK) /* number of this disk */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); - - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); - - if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); - - if (err==ZIP_OK) /* total number of entries in the central dir */ - err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); - - if (err==ZIP_OK) /* size of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); - - if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ - { - ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; - err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); - } - return err; -} - -local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { - int err = ZIP_OK; - - /*signature*/ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); - - if (err==ZIP_OK) /* number of this disk */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ - { - { - if(zi->number_entry >= 0xFFFF) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); - } - } - - if (err==ZIP_OK) /* total number of entries in the central dir */ - { - if(zi->number_entry >= 0xFFFF) - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); - } - - if (err==ZIP_OK) /* size of the central directory */ - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); - - if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ - { - ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; - if(pos >= 0xffffffff) - { - err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); - } - else - err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writing_offset),4); - } - - return err; -} - -local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) { - int err = ZIP_OK; - uInt size_global_comment = 0; - - if(global_comment != NULL) - size_global_comment = (uInt)strlen(global_comment); - - err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); - - if (err == ZIP_OK && size_global_comment > 0) - { - if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) - err = ZIP_ERRNO; - } - return err; -} - -extern int ZEXPORT zipClose(zipFile file, const char* global_comment) { - zip64_internal* zi; - int err = 0; - uLong size_centraldir = 0; - ZPOS64_T centraldir_pos_inzip; - ZPOS64_T pos; - - if (file == NULL) - return ZIP_PARAMERROR; - - zi = (zip64_internal*)file; - - if (zi->in_opened_file_inzip == 1) - { - err = zipCloseFileInZip (file); - } - -#ifndef NO_ADDFILEINEXISTINGZIP - if (global_comment==NULL) - global_comment = zi->globalcomment; -#endif - - centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); - - if (err==ZIP_OK) - { - linkedlist_datablock_internal* ldi = zi->central_dir.first_block; - while (ldi!=NULL) - { - if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) - { - if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) - err = ZIP_ERRNO; - } - - size_centraldir += ldi->filled_in_this_block; - ldi = ldi->next_datablock; - } - } - free_linkedlist(&(zi->central_dir)); - - pos = centraldir_pos_inzip - zi->add_position_when_writing_offset; - if(pos >= 0xffffffff || zi->number_entry >= 0xFFFF) - { - ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); - Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); - - Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); - } - - if (err==ZIP_OK) - err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); - - if(err == ZIP_OK) - err = Write_GlobalComment(zi, global_comment); - - if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) - if (err == ZIP_OK) - err = ZIP_ERRNO; - -#ifndef NO_ADDFILEINEXISTINGZIP - free(zi->globalcomment); -#endif - free(zi); - - return err; -} - -extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader) { - char* p = pData; - int size = 0; - char* pNewHeader; - char* pTmp; - short header; - short dataSize; - - int retVal = ZIP_OK; - - if(pData == NULL || dataLen == NULL || *dataLen < 4) - return ZIP_PARAMERROR; - - pNewHeader = (char*)ALLOC((unsigned)*dataLen); - pTmp = pNewHeader; - - while(p < (pData + *dataLen)) - { - header = *(short*)p; - dataSize = *(((short*)p)+1); - - if( header == sHeader ) // Header found. - { - p += dataSize + 4; // skip it. do not copy to temp buffer - } - else - { - // Extra Info block should not be removed, So copy it to the temp buffer. - memcpy(pTmp, p, dataSize + 4); - p += dataSize + 4; - size += dataSize + 4; - } - - } - - if(size < *dataLen) - { - // clean old extra info block. - memset(pData,0, *dataLen); - - // copy the new extra info block over the old - if(size > 0) - memcpy(pData, pNewHeader, size); - - // set the new extra info size - *dataLen = size; - - retVal = ZIP_OK; - } - else - retVal = ZIP_ERRNO; - - free(pNewHeader); - - return retVal; -} diff --git a/third_party/zlib/contrib/minizip/zip.h b/third_party/zlib/contrib/minizip/zip.h deleted file mode 100644 index 5c7dac9..0000000 --- a/third_party/zlib/contrib/minizip/zip.h +++ /dev/null @@ -1,365 +0,0 @@ -/* zip.h -- IO on .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - --------------------------------------------------------------------------- - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - --------------------------------------------------------------------------- - - Changes - - See header of zip.h - -*/ - -#ifndef _zip12_H -#define _zip12_H - -#ifdef __cplusplus -extern "C" { -#endif - -//#define HAVE_BZIP2 - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#ifdef HAVE_BZIP2 -#include "bzlib.h" -#endif - -#define Z_BZIP2ED 12 - -#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagzipFile__ { int unused; } zipFile__; -typedef zipFile__ *zipFile; -#else -typedef voidp zipFile; -#endif - -#define ZIP_OK (0) -#define ZIP_EOF (0) -#define ZIP_ERRNO (Z_ERRNO) -#define ZIP_PARAMERROR (-102) -#define ZIP_BADZIPFILE (-103) -#define ZIP_INTERNALERROR (-104) - -#ifndef DEF_MEM_LEVEL -# if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -# else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -# endif -#endif -/* default memLevel */ - -/* tm_zip contain date/time info */ -typedef struct tm_zip_s -{ - int tm_sec; /* seconds after the minute - [0,59] */ - int tm_min; /* minutes after the hour - [0,59] */ - int tm_hour; /* hours since midnight - [0,23] */ - int tm_mday; /* day of the month - [1,31] */ - int tm_mon; /* months since January - [0,11] */ - int tm_year; /* years - [1980..2044] */ -} tm_zip; - -typedef struct -{ - tm_zip tmz_date; /* date in understandable format */ - uLong dosDate; /* if dos_date == 0, tmu_date is used */ -/* uLong flag; */ /* general purpose bit flag 2 bytes */ - - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ -} zip_fileinfo; - -typedef const char* zipcharpc; - - -#define APPEND_STATUS_CREATE (0) -#define APPEND_STATUS_CREATEAFTER (1) -#define APPEND_STATUS_ADDINZIP (2) - -extern zipFile ZEXPORT zipOpen(const char *pathname, int append); -extern zipFile ZEXPORT zipOpen64(const void *pathname, int append); -/* - Create a zipfile. - pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on - an Unix computer "zlib/zlib113.zip". - if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip - will be created at the end of the file. - (useful if the file contain a self extractor code) - if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will - add files in existing zip (be sure you don't add file that doesn't exist) - If the zipfile cannot be opened, the return value is NULL. - Else, the return value is a zipFile Handle, usable with other function - of this zip package. -*/ - -/* Note : there is no delete function into a zipfile. - If you want delete file into a zipfile, you must open a zipfile, and create another - Of course, you can use RAW reading and writing to copy the file you did not want delete -*/ - -extern zipFile ZEXPORT zipOpen2(const char *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc_def* pzlib_filefunc_def); - -extern zipFile ZEXPORT zipOpen2_64(const void *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc64_def* pzlib_filefunc_def); - -extern zipFile ZEXPORT zipOpen3(const void *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc64_32_def* pzlib_filefunc64_32_def); - -extern int ZEXPORT zipOpenNewFileInZip(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level); - -extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int zip64); - -/* - Open a file in the ZIP for writing. - filename : the filename in zip (if NULL, '-' without quote will be used - *zipfi contain supplemental information - if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local - contains the extrafield data for the local header - if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global - contains the extrafield data for the global header - if comment != NULL, comment contain the comment string - method contain the compression method (0 for store, Z_DEFLATED for deflate) - level contain the level of compression (can be Z_DEFAULT_COMPRESSION) - zip64 is set to 1 if a zip64 extended information block should be added to the local file header. - this MUST be '1' if the uncompressed size is >= 0xffffffff. - -*/ - - -extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw); - - -extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int zip64); -/* - Same than zipOpenNewFileInZip, except if raw=1, we write raw file - */ - -extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting); - -extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - int zip64); - -/* - Same than zipOpenNewFileInZip2, except - windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 - password : crypting password (NULL for no crypting) - crcForCrypting : crc of file to compress (needed for crypting) - */ - -extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - uLong versionMadeBy, - uLong flagBase); - - -extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - uLong versionMadeBy, - uLong flagBase, - int zip64); -/* - Same than zipOpenNewFileInZip4, except - versionMadeBy : value for Version made by field - flag : value for flag field (compression level info will be added) - */ - - -extern int ZEXPORT zipWriteInFileInZip(zipFile file, - const void* buf, - unsigned len); -/* - Write data in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZip(zipFile file); -/* - Close the current file in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, - uLong uncompressed_size, - uLong crc32); - -extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, - ZPOS64_T uncompressed_size, - uLong crc32); - -/* - Close the current file in the zipfile, for file opened with - parameter raw=1 in zipOpenNewFileInZip2 - uncompressed_size and crc32 are value for the uncompressed size -*/ - -extern int ZEXPORT zipClose(zipFile file, - const char* global_comment); -/* - Close the zipfile -*/ - - -extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader); -/* - zipRemoveExtraInfoBlock - Added by Mathias Svensson - - Remove extra information block from a extra information data for the local file header or central directory header - - It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. - - 0x0001 is the signature header for the ZIP64 extra information blocks - - usage. - Remove ZIP64 Extra information from a central director extra field data - zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); - - Remove ZIP64 Extra information from a Local File Header extra field data - zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* _zip64_H */ - diff --git a/third_party/zlib/contrib/nuget/nuget.csproj b/third_party/zlib/contrib/nuget/nuget.csproj deleted file mode 100644 index 68627f0..0000000 --- a/third_party/zlib/contrib/nuget/nuget.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - - net6.0 - madler.zlib.redist - $(PackageId).win - $(PackageId).linux - $(PackageId).osx - (C) 1995-2024 Jean-loup Gailly and Mark Adler - 1.3.1 - NuGet Package for consuming native builds of zlib into .NET without complexity. - - NU5128 - $(MSBuildProjectDirectory) - Jean-loup Gailly and Mark Adler - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/nuget/nuget.sln b/third_party/zlib/contrib/nuget/nuget.sln deleted file mode 100644 index 46ee8de..0000000 --- a/third_party/zlib/contrib/nuget/nuget.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget", "nuget.csproj", "{B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/pascal/example.pas b/third_party/zlib/contrib/pascal/example.pas deleted file mode 100644 index 5518b36..0000000 --- a/third_party/zlib/contrib/pascal/example.pas +++ /dev/null @@ -1,599 +0,0 @@ -(* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2003 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Pascal translation - * Copyright (C) 1998 by Jacques Nomssi Nzali. - * For conditions of distribution and use, see copyright notice in readme.txt - * - * Adaptation to the zlibpas interface - * Copyright (C) 2003 by Cosmin Truta. - * For conditions of distribution and use, see copyright notice in readme.txt - *) - -program example; - -{$DEFINE TEST_COMPRESS} -{DO NOT $DEFINE TEST_GZIO} -{$DEFINE TEST_DEFLATE} -{$DEFINE TEST_INFLATE} -{$DEFINE TEST_FLUSH} -{$DEFINE TEST_SYNC} -{$DEFINE TEST_DICT} - -uses SysUtils, zlibpas; - -const TESTFILE = 'foo.gz'; - -(* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - *) -const hello: PChar = 'hello, hello!'; - -const dictionary: PChar = 'hello'; - -var dictId: LongInt; (* Adler32 value of the dictionary *) - -procedure CHECK_ERR(err: Integer; msg: String); -begin - if err <> Z_OK then - begin - WriteLn(msg, ' error: ', err); - Halt(1); - end; -end; - -procedure EXIT_ERR(const msg: String); -begin - WriteLn('Error: ', msg); - Halt(1); -end; - -(* =========================================================================== - * Test compress and uncompress - *) -{$IFDEF TEST_COMPRESS} -procedure test_compress(compr: Pointer; comprLen: LongInt; - uncompr: Pointer; uncomprLen: LongInt); -var err: Integer; - len: LongInt; -begin - len := StrLen(hello)+1; - - err := compress(compr, comprLen, hello, len); - CHECK_ERR(err, 'compress'); - - StrCopy(PChar(uncompr), 'garbage'); - - err := uncompress(uncompr, uncomprLen, compr, comprLen); - CHECK_ERR(err, 'uncompress'); - - if StrComp(PChar(uncompr), hello) <> 0 then - EXIT_ERR('bad uncompress') - else - WriteLn('uncompress(): ', PChar(uncompr)); -end; -{$ENDIF} - -(* =========================================================================== - * Test read/write of .gz files - *) -{$IFDEF TEST_GZIO} -procedure test_gzio(const fname: PChar; (* compressed file name *) - uncompr: Pointer; - uncomprLen: LongInt); -var err: Integer; - len: Integer; - zfile: gzFile; - pos: LongInt; -begin - len := StrLen(hello)+1; - - zfile := gzopen(fname, 'wb'); - if zfile = NIL then - begin - WriteLn('gzopen error'); - Halt(1); - end; - gzputc(zfile, 'h'); - if gzputs(zfile, 'ello') <> 4 then - begin - WriteLn('gzputs err: ', gzerror(zfile, err)); - Halt(1); - end; - {$IFDEF GZ_FORMAT_STRING} - if gzprintf(zfile, ', %s!', 'hello') <> 8 then - begin - WriteLn('gzprintf err: ', gzerror(zfile, err)); - Halt(1); - end; - {$ELSE} - if gzputs(zfile, ', hello!') <> 8 then - begin - WriteLn('gzputs err: ', gzerror(zfile, err)); - Halt(1); - end; - {$ENDIF} - gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *) - gzclose(zfile); - - zfile := gzopen(fname, 'rb'); - if zfile = NIL then - begin - WriteLn('gzopen error'); - Halt(1); - end; - - StrCopy(PChar(uncompr), 'garbage'); - - if gzread(zfile, uncompr, uncomprLen) <> len then - begin - WriteLn('gzread err: ', gzerror(zfile, err)); - Halt(1); - end; - if StrComp(PChar(uncompr), hello) <> 0 then - begin - WriteLn('bad gzread: ', PChar(uncompr)); - Halt(1); - end - else - WriteLn('gzread(): ', PChar(uncompr)); - - pos := gzseek(zfile, -8, SEEK_CUR); - if (pos <> 6) or (gztell(zfile) <> pos) then - begin - WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile)); - Halt(1); - end; - - if gzgetc(zfile) <> ' ' then - begin - WriteLn('gzgetc error'); - Halt(1); - end; - - if gzungetc(' ', zfile) <> ' ' then - begin - WriteLn('gzungetc error'); - Halt(1); - end; - - gzgets(zfile, PChar(uncompr), uncomprLen); - uncomprLen := StrLen(PChar(uncompr)); - if uncomprLen <> 7 then (* " hello!" *) - begin - WriteLn('gzgets err after gzseek: ', gzerror(zfile, err)); - Halt(1); - end; - if StrComp(PChar(uncompr), hello + 6) <> 0 then - begin - WriteLn('bad gzgets after gzseek'); - Halt(1); - end - else - WriteLn('gzgets() after gzseek: ', PChar(uncompr)); - - gzclose(zfile); -end; -{$ENDIF} - -(* =========================================================================== - * Test deflate with small buffers - *) -{$IFDEF TEST_DEFLATE} -procedure test_deflate(compr: Pointer; comprLen: LongInt); -var c_stream: z_stream; (* compression stream *) - err: Integer; - len: LongInt; -begin - len := StrLen(hello)+1; - - c_stream.zalloc := NIL; - c_stream.zfree := NIL; - c_stream.opaque := NIL; - - err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, 'deflateInit'); - - c_stream.next_in := hello; - c_stream.next_out := compr; - - while (c_stream.total_in <> len) and - (c_stream.total_out < comprLen) do - begin - c_stream.avail_out := 1; { force small buffers } - c_stream.avail_in := 1; - err := deflate(c_stream, Z_NO_FLUSH); - CHECK_ERR(err, 'deflate'); - end; - - (* Finish the stream, still forcing small buffers: *) - while TRUE do - begin - c_stream.avail_out := 1; - err := deflate(c_stream, Z_FINISH); - if err = Z_STREAM_END then - break; - CHECK_ERR(err, 'deflate'); - end; - - err := deflateEnd(c_stream); - CHECK_ERR(err, 'deflateEnd'); -end; -{$ENDIF} - -(* =========================================================================== - * Test inflate with small buffers - *) -{$IFDEF TEST_INFLATE} -procedure test_inflate(compr: Pointer; comprLen : LongInt; - uncompr: Pointer; uncomprLen : LongInt); -var err: Integer; - d_stream: z_stream; (* decompression stream *) -begin - StrCopy(PChar(uncompr), 'garbage'); - - d_stream.zalloc := NIL; - d_stream.zfree := NIL; - d_stream.opaque := NIL; - - d_stream.next_in := compr; - d_stream.avail_in := 0; - d_stream.next_out := uncompr; - - err := inflateInit(d_stream); - CHECK_ERR(err, 'inflateInit'); - - while (d_stream.total_out < uncomprLen) and - (d_stream.total_in < comprLen) do - begin - d_stream.avail_out := 1; (* force small buffers *) - d_stream.avail_in := 1; - err := inflate(d_stream, Z_NO_FLUSH); - if err = Z_STREAM_END then - break; - CHECK_ERR(err, 'inflate'); - end; - - err := inflateEnd(d_stream); - CHECK_ERR(err, 'inflateEnd'); - - if StrComp(PChar(uncompr), hello) <> 0 then - EXIT_ERR('bad inflate') - else - WriteLn('inflate(): ', PChar(uncompr)); -end; -{$ENDIF} - -(* =========================================================================== - * Test deflate with large buffers and dynamic change of compression level - *) -{$IFDEF TEST_DEFLATE} -procedure test_large_deflate(compr: Pointer; comprLen: LongInt; - uncompr: Pointer; uncomprLen: LongInt); -var c_stream: z_stream; (* compression stream *) - err: Integer; -begin - c_stream.zalloc := NIL; - c_stream.zfree := NIL; - c_stream.opaque := NIL; - - err := deflateInit(c_stream, Z_BEST_SPEED); - CHECK_ERR(err, 'deflateInit'); - - c_stream.next_out := compr; - c_stream.avail_out := Integer(comprLen); - - (* At this point, uncompr is still mostly zeroes, so it should compress - * very well: - *) - c_stream.next_in := uncompr; - c_stream.avail_in := Integer(uncomprLen); - err := deflate(c_stream, Z_NO_FLUSH); - CHECK_ERR(err, 'deflate'); - if c_stream.avail_in <> 0 then - EXIT_ERR('deflate not greedy'); - - (* Feed in already compressed data and switch to no compression: *) - deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); - c_stream.next_in := compr; - c_stream.avail_in := Integer(comprLen div 2); - err := deflate(c_stream, Z_NO_FLUSH); - CHECK_ERR(err, 'deflate'); - - (* Switch back to compressing mode: *) - deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED); - c_stream.next_in := uncompr; - c_stream.avail_in := Integer(uncomprLen); - err := deflate(c_stream, Z_NO_FLUSH); - CHECK_ERR(err, 'deflate'); - - err := deflate(c_stream, Z_FINISH); - if err <> Z_STREAM_END then - EXIT_ERR('deflate should report Z_STREAM_END'); - - err := deflateEnd(c_stream); - CHECK_ERR(err, 'deflateEnd'); -end; -{$ENDIF} - -(* =========================================================================== - * Test inflate with large buffers - *) -{$IFDEF TEST_INFLATE} -procedure test_large_inflate(compr: Pointer; comprLen: LongInt; - uncompr: Pointer; uncomprLen: LongInt); -var err: Integer; - d_stream: z_stream; (* decompression stream *) -begin - StrCopy(PChar(uncompr), 'garbage'); - - d_stream.zalloc := NIL; - d_stream.zfree := NIL; - d_stream.opaque := NIL; - - d_stream.next_in := compr; - d_stream.avail_in := Integer(comprLen); - - err := inflateInit(d_stream); - CHECK_ERR(err, 'inflateInit'); - - while TRUE do - begin - d_stream.next_out := uncompr; (* discard the output *) - d_stream.avail_out := Integer(uncomprLen); - err := inflate(d_stream, Z_NO_FLUSH); - if err = Z_STREAM_END then - break; - CHECK_ERR(err, 'large inflate'); - end; - - err := inflateEnd(d_stream); - CHECK_ERR(err, 'inflateEnd'); - - if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then - begin - WriteLn('bad large inflate: ', d_stream.total_out); - Halt(1); - end - else - WriteLn('large_inflate(): OK'); -end; -{$ENDIF} - -(* =========================================================================== - * Test deflate with full flush - *) -{$IFDEF TEST_FLUSH} -procedure test_flush(compr: Pointer; var comprLen : LongInt); -var c_stream: z_stream; (* compression stream *) - err: Integer; - len: Integer; -begin - len := StrLen(hello)+1; - - c_stream.zalloc := NIL; - c_stream.zfree := NIL; - c_stream.opaque := NIL; - - err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, 'deflateInit'); - - c_stream.next_in := hello; - c_stream.next_out := compr; - c_stream.avail_in := 3; - c_stream.avail_out := Integer(comprLen); - err := deflate(c_stream, Z_FULL_FLUSH); - CHECK_ERR(err, 'deflate'); - - Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *) - c_stream.avail_in := len - 3; - - err := deflate(c_stream, Z_FINISH); - if err <> Z_STREAM_END then - CHECK_ERR(err, 'deflate'); - - err := deflateEnd(c_stream); - CHECK_ERR(err, 'deflateEnd'); - - comprLen := c_stream.total_out; -end; -{$ENDIF} - -(* =========================================================================== - * Test inflateSync() - *) -{$IFDEF TEST_SYNC} -procedure test_sync(compr: Pointer; comprLen: LongInt; - uncompr: Pointer; uncomprLen : LongInt); -var err: Integer; - d_stream: z_stream; (* decompression stream *) -begin - StrCopy(PChar(uncompr), 'garbage'); - - d_stream.zalloc := NIL; - d_stream.zfree := NIL; - d_stream.opaque := NIL; - - d_stream.next_in := compr; - d_stream.avail_in := 2; (* just read the zlib header *) - - err := inflateInit(d_stream); - CHECK_ERR(err, 'inflateInit'); - - d_stream.next_out := uncompr; - d_stream.avail_out := Integer(uncomprLen); - - inflate(d_stream, Z_NO_FLUSH); - CHECK_ERR(err, 'inflate'); - - d_stream.avail_in := Integer(comprLen-2); (* read all compressed data *) - err := inflateSync(d_stream); (* but skip the damaged part *) - CHECK_ERR(err, 'inflateSync'); - - err := inflate(d_stream, Z_FINISH); - if err <> Z_DATA_ERROR then - EXIT_ERR('inflate should report DATA_ERROR'); - (* Because of incorrect adler32 *) - - err := inflateEnd(d_stream); - CHECK_ERR(err, 'inflateEnd'); - - WriteLn('after inflateSync(): hel', PChar(uncompr)); -end; -{$ENDIF} - -(* =========================================================================== - * Test deflate with preset dictionary - *) -{$IFDEF TEST_DICT} -procedure test_dict_deflate(compr: Pointer; comprLen: LongInt); -var c_stream: z_stream; (* compression stream *) - err: Integer; -begin - c_stream.zalloc := NIL; - c_stream.zfree := NIL; - c_stream.opaque := NIL; - - err := deflateInit(c_stream, Z_BEST_COMPRESSION); - CHECK_ERR(err, 'deflateInit'); - - err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary)); - CHECK_ERR(err, 'deflateSetDictionary'); - - dictId := c_stream.adler; - c_stream.next_out := compr; - c_stream.avail_out := Integer(comprLen); - - c_stream.next_in := hello; - c_stream.avail_in := StrLen(hello)+1; - - err := deflate(c_stream, Z_FINISH); - if err <> Z_STREAM_END then - EXIT_ERR('deflate should report Z_STREAM_END'); - - err := deflateEnd(c_stream); - CHECK_ERR(err, 'deflateEnd'); -end; -{$ENDIF} - -(* =========================================================================== - * Test inflate with a preset dictionary - *) -{$IFDEF TEST_DICT} -procedure test_dict_inflate(compr: Pointer; comprLen: LongInt; - uncompr: Pointer; uncomprLen: LongInt); -var err: Integer; - d_stream: z_stream; (* decompression stream *) -begin - StrCopy(PChar(uncompr), 'garbage'); - - d_stream.zalloc := NIL; - d_stream.zfree := NIL; - d_stream.opaque := NIL; - - d_stream.next_in := compr; - d_stream.avail_in := Integer(comprLen); - - err := inflateInit(d_stream); - CHECK_ERR(err, 'inflateInit'); - - d_stream.next_out := uncompr; - d_stream.avail_out := Integer(uncomprLen); - - while TRUE do - begin - err := inflate(d_stream, Z_NO_FLUSH); - if err = Z_STREAM_END then - break; - if err = Z_NEED_DICT then - begin - if d_stream.adler <> dictId then - EXIT_ERR('unexpected dictionary'); - err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary)); - end; - CHECK_ERR(err, 'inflate with dict'); - end; - - err := inflateEnd(d_stream); - CHECK_ERR(err, 'inflateEnd'); - - if StrComp(PChar(uncompr), hello) <> 0 then - EXIT_ERR('bad inflate with dict') - else - WriteLn('inflate with dictionary: ', PChar(uncompr)); -end; -{$ENDIF} - -var compr, uncompr: Pointer; - comprLen, uncomprLen: LongInt; - -begin - if zlibVersion^ <> ZLIB_VERSION[1] then - EXIT_ERR('Incompatible zlib version'); - - WriteLn('zlib version: ', zlibVersion); - WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags])); - - comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *) - uncomprLen := comprLen; - GetMem(compr, comprLen); - GetMem(uncompr, uncomprLen); - if (compr = NIL) or (uncompr = NIL) then - EXIT_ERR('Out of memory'); - (* compr and uncompr are cleared to avoid reading uninitialized - * data and to ensure that uncompr compresses well. - *) - FillChar(compr^, comprLen, 0); - FillChar(uncompr^, uncomprLen, 0); - - {$IFDEF TEST_COMPRESS} - WriteLn('** Testing compress'); - test_compress(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - - {$IFDEF TEST_GZIO} - WriteLn('** Testing gzio'); - if ParamCount >= 1 then - test_gzio(ParamStr(1), uncompr, uncomprLen) - else - test_gzio(TESTFILE, uncompr, uncomprLen); - {$ENDIF} - - {$IFDEF TEST_DEFLATE} - WriteLn('** Testing deflate with small buffers'); - test_deflate(compr, comprLen); - {$ENDIF} - {$IFDEF TEST_INFLATE} - WriteLn('** Testing inflate with small buffers'); - test_inflate(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - - {$IFDEF TEST_DEFLATE} - WriteLn('** Testing deflate with large buffers'); - test_large_deflate(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - {$IFDEF TEST_INFLATE} - WriteLn('** Testing inflate with large buffers'); - test_large_inflate(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - - {$IFDEF TEST_FLUSH} - WriteLn('** Testing deflate with full flush'); - test_flush(compr, comprLen); - {$ENDIF} - {$IFDEF TEST_SYNC} - WriteLn('** Testing inflateSync'); - test_sync(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - comprLen := uncomprLen; - - {$IFDEF TEST_DICT} - WriteLn('** Testing deflate and inflate with preset dictionary'); - test_dict_deflate(compr, comprLen); - test_dict_inflate(compr, comprLen, uncompr, uncomprLen); - {$ENDIF} - - FreeMem(compr, comprLen); - FreeMem(uncompr, uncomprLen); -end. diff --git a/third_party/zlib/contrib/pascal/readme.txt b/third_party/zlib/contrib/pascal/readme.txt deleted file mode 100644 index 60e87c8..0000000 --- a/third_party/zlib/contrib/pascal/readme.txt +++ /dev/null @@ -1,76 +0,0 @@ - -This directory contains a Pascal (Delphi, Kylix) interface to the -zlib data compression library. - - -Directory listing -================= - -zlibd32.mak makefile for Borland C++ -example.pas usage example of zlib -zlibpas.pas the Pascal interface to zlib -readme.txt this file - - -Compatibility notes -=================== - -- Although the name "zlib" would have been more normal for the - zlibpas unit, this name is already taken by Borland's ZLib unit. - This is somehow unfortunate, because that unit is not a genuine - interface to the full-fledged zlib functionality, but a suite of - class wrappers around zlib streams. Other essential features, - such as checksums, are missing. - It would have been more appropriate for that unit to have a name - like "ZStreams", or something similar. - -- The C and zlib-supplied types int, uInt, long, uLong, etc. are - translated directly into Pascal types of similar sizes (Integer, - LongInt, etc.), to avoid namespace pollution. In particular, - there is no conversion of unsigned int into a Pascal unsigned - integer. The Word type is non-portable and has the same size - (16 bits) both in a 16-bit and in a 32-bit environment, unlike - Integer. Even if there is a 32-bit Cardinal type, there is no - real need for unsigned int in zlib under a 32-bit environment. - -- Except for the callbacks, the zlib function interfaces are - assuming the calling convention normally used in Pascal - (__pascal for DOS and Windows16, __fastcall for Windows32). - Since the cdecl keyword is used, the old Turbo Pascal does - not work with this interface. - -- The gz* function interfaces are not translated, to avoid - interfacing problems with the C runtime library. Besides, - gzprintf(gzFile file, const char *format, ...) - cannot be translated into Pascal. - - -Legal issues -============ - -The zlibpas interface is: - Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler. - Copyright (C) 1998 by Bob Dellaca. - Copyright (C) 2003 by Cosmin Truta. - -The example program is: - Copyright (C) 1995-2003 by Jean-loup Gailly. - Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali. - Copyright (C) 2003 by Cosmin Truta. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - diff --git a/third_party/zlib/contrib/pascal/zlibd32.mak b/third_party/zlib/contrib/pascal/zlibd32.mak deleted file mode 100644 index 9bb00b7..0000000 --- a/third_party/zlib/contrib/pascal/zlibd32.mak +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile for zlib -# For use with Delphi and C++ Builder under Win32 -# Updated for zlib 1.2.x by Cosmin Truta - -# ------------ Borland C++ ------------ - -# This project uses the Delphi (fastcall/register) calling convention: -LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl - -CC = bcc32 -LD = bcc32 -AR = tlib -# do not use "-pr" in CFLAGS -CFLAGS = -a -d -k- -O2 $(LOC) -LDFLAGS = - - -# variables -ZLIB_LIB = zlib.lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# For the sake of the old Borland make, -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - - -# cleanup -clean: - -del *.obj - -del *.exe - -del *.lib - -del *.tds - -del zlib.bak - -del foo.gz - diff --git a/third_party/zlib/contrib/pascal/zlibpas.pas b/third_party/zlib/contrib/pascal/zlibpas.pas deleted file mode 100644 index 0cf0e7b..0000000 --- a/third_party/zlib/contrib/pascal/zlibpas.pas +++ /dev/null @@ -1,276 +0,0 @@ -(* zlibpas -- Pascal interface to the zlib data compression library - * - * Copyright (C) 2003 Cosmin Truta. - * Derived from original sources by Bob Dellaca. - * For conditions of distribution and use, see copyright notice in readme.txt - *) - -unit zlibpas; - -interface - -const - ZLIB_VERSION = '1.3.1'; - ZLIB_VERNUM = $12a0; - -type - alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; - cdecl; - free_func = procedure(opaque, address: Pointer); - cdecl; - - in_func = function(opaque: Pointer; var buf: PByte): Integer; - cdecl; - out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer; - cdecl; - - z_streamp = ^z_stream; - z_stream = packed record - next_in: PChar; (* next input byte *) - avail_in: Integer; (* number of bytes available at next_in *) - total_in: LongInt; (* total nb of input bytes read so far *) - - next_out: PChar; (* next output byte should be put there *) - avail_out: Integer; (* remaining free space at next_out *) - total_out: LongInt; (* total nb of bytes output so far *) - - msg: PChar; (* last error message, NULL if no error *) - state: Pointer; (* not visible by applications *) - - zalloc: alloc_func; (* used to allocate the internal state *) - zfree: free_func; (* used to free the internal state *) - opaque: Pointer; (* private data object passed to zalloc and zfree *) - - data_type: Integer; (* best guess about the data type: ascii or binary *) - adler: LongInt; (* adler32 value of the uncompressed data *) - reserved: LongInt; (* reserved for future use *) - end; - - gz_headerp = ^gz_header; - gz_header = packed record - text: Integer; (* true if compressed data believed to be text *) - time: LongInt; (* modification time *) - xflags: Integer; (* extra flags (not used when writing a gzip file) *) - os: Integer; (* operating system *) - extra: PChar; (* pointer to extra field or Z_NULL if none *) - extra_len: Integer; (* extra field length (valid if extra != Z_NULL) *) - extra_max: Integer; (* space at extra (only when reading header) *) - name: PChar; (* pointer to zero-terminated file name or Z_NULL *) - name_max: Integer; (* space at name (only when reading header) *) - comment: PChar; (* pointer to zero-terminated comment or Z_NULL *) - comm_max: Integer; (* space at comment (only when reading header) *) - hcrc: Integer; (* true if there was or will be a header crc *) - done: Integer; (* true when done reading gzip header *) - end; - -(* constants *) -const - Z_NO_FLUSH = 0; - Z_PARTIAL_FLUSH = 1; - Z_SYNC_FLUSH = 2; - Z_FULL_FLUSH = 3; - Z_FINISH = 4; - Z_BLOCK = 5; - Z_TREES = 6; - - Z_OK = 0; - Z_STREAM_END = 1; - Z_NEED_DICT = 2; - Z_ERRNO = -1; - Z_STREAM_ERROR = -2; - Z_DATA_ERROR = -3; - Z_MEM_ERROR = -4; - Z_BUF_ERROR = -5; - Z_VERSION_ERROR = -6; - - Z_NO_COMPRESSION = 0; - Z_BEST_SPEED = 1; - Z_BEST_COMPRESSION = 9; - Z_DEFAULT_COMPRESSION = -1; - - Z_FILTERED = 1; - Z_HUFFMAN_ONLY = 2; - Z_RLE = 3; - Z_FIXED = 4; - Z_DEFAULT_STRATEGY = 0; - - Z_BINARY = 0; - Z_TEXT = 1; - Z_ASCII = 1; - Z_UNKNOWN = 2; - - Z_DEFLATED = 8; - -(* basic functions *) -function zlibVersion: PChar; -function deflateInit(var strm: z_stream; level: Integer): Integer; -function deflate(var strm: z_stream; flush: Integer): Integer; -function deflateEnd(var strm: z_stream): Integer; -function inflateInit(var strm: z_stream): Integer; -function inflate(var strm: z_stream; flush: Integer): Integer; -function inflateEnd(var strm: z_stream): Integer; - -(* advanced functions *) -function deflateInit2(var strm: z_stream; level, method, windowBits, - memLevel, strategy: Integer): Integer; -function deflateSetDictionary(var strm: z_stream; const dictionary: PChar; - dictLength: Integer): Integer; -function deflateCopy(var dest, source: z_stream): Integer; -function deflateReset(var strm: z_stream): Integer; -function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; -function deflateTune(var strm: z_stream; good_length, max_lazy, nice_length, max_chain: Integer): Integer; -function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; -function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer; -function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; -function deflateSetHeader(var strm: z_stream; head: gz_header): Integer; -function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; -function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; - dictLength: Integer): Integer; -function inflateSync(var strm: z_stream): Integer; -function inflateCopy(var dest, source: z_stream): Integer; -function inflateReset(var strm: z_stream): Integer; -function inflateReset2(var strm: z_stream; windowBits: Integer): Integer; -function inflatePrime(var strm: z_stream; bits, value: Integer): Integer; -function inflateMark(var strm: z_stream): LongInt; -function inflateGetHeader(var strm: z_stream; var head: gz_header): Integer; -function inflateBackInit(var strm: z_stream; - windowBits: Integer; window: PChar): Integer; -function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; - out_fn: out_func; out_desc: Pointer): Integer; -function inflateBackEnd(var strm: z_stream): Integer; -function zlibCompileFlags: LongInt; - -(* utility functions *) -function compress(dest: PChar; var destLen: LongInt; - const source: PChar; sourceLen: LongInt): Integer; -function compress2(dest: PChar; var destLen: LongInt; - const source: PChar; sourceLen: LongInt; - level: Integer): Integer; -function compressBound(sourceLen: LongInt): LongInt; -function uncompress(dest: PChar; var destLen: LongInt; - const source: PChar; sourceLen: LongInt): Integer; - -(* checksum functions *) -function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; -function adler32_combine(adler1, adler2, len2: LongInt): LongInt; -function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; -function crc32_combine(crc1, crc2, len2: LongInt): LongInt; - -(* various hacks, don't look :) *) -function deflateInit_(var strm: z_stream; level: Integer; - const version: PChar; stream_size: Integer): Integer; -function inflateInit_(var strm: z_stream; const version: PChar; - stream_size: Integer): Integer; -function deflateInit2_(var strm: z_stream; - level, method, windowBits, memLevel, strategy: Integer; - const version: PChar; stream_size: Integer): Integer; -function inflateInit2_(var strm: z_stream; windowBits: Integer; - const version: PChar; stream_size: Integer): Integer; -function inflateBackInit_(var strm: z_stream; - windowBits: Integer; window: PChar; - const version: PChar; stream_size: Integer): Integer; - - -implementation - -{$L adler32.obj} -{$L compress.obj} -{$L crc32.obj} -{$L deflate.obj} -{$L infback.obj} -{$L inffast.obj} -{$L inflate.obj} -{$L inftrees.obj} -{$L trees.obj} -{$L uncompr.obj} -{$L zutil.obj} - -function adler32; external; -function adler32_combine; external; -function compress; external; -function compress2; external; -function compressBound; external; -function crc32; external; -function crc32_combine; external; -function deflate; external; -function deflateBound; external; -function deflateCopy; external; -function deflateEnd; external; -function deflateInit_; external; -function deflateInit2_; external; -function deflateParams; external; -function deflatePending; external; -function deflatePrime; external; -function deflateReset; external; -function deflateSetDictionary; external; -function deflateSetHeader; external; -function deflateTune; external; -function inflate; external; -function inflateBack; external; -function inflateBackEnd; external; -function inflateBackInit_; external; -function inflateCopy; external; -function inflateEnd; external; -function inflateGetHeader; external; -function inflateInit_; external; -function inflateInit2_; external; -function inflateMark; external; -function inflatePrime; external; -function inflateReset; external; -function inflateReset2; external; -function inflateSetDictionary; external; -function inflateSync; external; -function uncompress; external; -function zlibCompileFlags; external; -function zlibVersion; external; - -function deflateInit(var strm: z_stream; level: Integer): Integer; -begin - Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream)); -end; - -function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel, - strategy: Integer): Integer; -begin - Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - ZLIB_VERSION, sizeof(z_stream)); -end; - -function inflateInit(var strm: z_stream): Integer; -begin - Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream)); -end; - -function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; -begin - Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream)); -end; - -function inflateBackInit(var strm: z_stream; - windowBits: Integer; window: PChar): Integer; -begin - Result := inflateBackInit_(strm, windowBits, window, - ZLIB_VERSION, sizeof(z_stream)); -end; - -function _malloc(Size: Integer): Pointer; cdecl; -begin - GetMem(Result, Size); -end; - -procedure _free(Block: Pointer); cdecl; -begin - FreeMem(Block); -end; - -procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; -begin - FillChar(P^, count, B); -end; - -procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; -begin - Move(source^, dest^, count); -end; - -end. diff --git a/third_party/zlib/contrib/puff/Makefile b/third_party/zlib/contrib/puff/Makefile deleted file mode 100644 index 0e2594c..0000000 --- a/third_party/zlib/contrib/puff/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -CFLAGS=-O - -puff: puff.o pufftest.o - -puff.o: puff.h - -pufftest.o: puff.h - -test: puff - puff zeros.raw - -puft: puff.c puff.h pufftest.o - cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o - -# puff full coverage test (should say 100%) -cov: puft - @rm -f *.gcov *.gcda - @puft -w zeros.raw 2>&1 | cat > /dev/null - @echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 - @echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 - @echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254 - @echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 - @echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null - @echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 - @echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 - @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 - @echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249 - @echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 - @echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null - @echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 - @echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245 - @puft -f zeros.raw 2>&1 | cat > /dev/null - @echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253 - @echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252 - @echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251 - @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248 - @echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250 - @echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247 - @gcov -n puff.c - -clean: - rm -f puff puft *.o *.gc* diff --git a/third_party/zlib/contrib/puff/README b/third_party/zlib/contrib/puff/README deleted file mode 100644 index d8192c7..0000000 --- a/third_party/zlib/contrib/puff/README +++ /dev/null @@ -1,63 +0,0 @@ -Puff -- A Simple Inflate -3 Mar 2003 -Mark Adler -madler@alumni.caltech.edu - -What this is -- - -puff.c provides the routine puff() to decompress the deflate data format. It -does so more slowly than zlib, but the code is about one-fifth the size of the -inflate code in zlib, and written to be very easy to read. - -Why I wrote this -- - -puff.c was written to document the deflate format unambiguously, by virtue of -being working C code. It is meant to supplement RFC 1951, which formally -describes the deflate format. I have received many questions on details of the -deflate format, and I hope that reading this code will answer those questions. -puff.c is heavily commented with details of the deflate format, especially -those little nooks and cranies of the format that might not be obvious from a -specification. - -puff.c may also be useful in applications where code size or memory usage is a -very limited resource, and speed is not as important. - -How to use it -- - -Well, most likely you should just be reading puff.c and using zlib for actual -applications, but if you must ... - -Include puff.h in your code, which provides this prototype: - -int puff(unsigned char *dest, /* pointer to destination pointer */ - unsigned long *destlen, /* amount of output space */ - unsigned char *source, /* pointer to source data pointer */ - unsigned long *sourcelen); /* amount of input available */ - -Then you can call puff() to decompress a deflate stream that is in memory in -its entirety at source, to a sufficiently sized block of memory for the -decompressed data at dest. puff() is the only external symbol in puff.c The -only C library functions that puff.c needs are setjmp() and longjmp(), which -are used to simplify error checking in the code to improve readability. puff.c -does no memory allocation, and uses less than 2K bytes off of the stack. - -If destlen is not enough space for the uncompressed data, then inflate will -return an error without writing more than destlen bytes. Note that this means -that in order to decompress the deflate data successfully, you need to know -the size of the uncompressed data ahead of time. - -If needed, puff() can determine the size of the uncompressed data with no -output space. This is done by passing dest equal to (unsigned char *)0. Then -the initial value of *destlen is ignored and *destlen is set to the length of -the uncompressed data. So if the size of the uncompressed data is not known, -then two passes of puff() can be used--first to determine the size, and second -to do the actual inflation after allocating the appropriate memory. Not -pretty, but it works. (This is one of the reasons you should be using zlib.) - -The deflate format is self-terminating. If the deflate stream does not end -in *sourcelen bytes, puff() will return an error without reading at or past -endsource. - -On return, *sourcelen is updated to the amount of input data consumed, and -*destlen is updated to the size of the uncompressed data. See the comments -in puff.c for the possible return codes for puff(). diff --git a/third_party/zlib/contrib/puff/puff.c b/third_party/zlib/contrib/puff/puff.c deleted file mode 100644 index d759825..0000000 --- a/third_party/zlib/contrib/puff/puff.c +++ /dev/null @@ -1,840 +0,0 @@ -/* - * puff.c - * Copyright (C) 2002-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in puff.h - * version 2.3, 21 Jan 2013 - * - * puff.c is a simple inflate written to be an unambiguous way to specify the - * deflate format. It is not written for speed but rather simplicity. As a - * side benefit, this code might actually be useful when small code is more - * important than speed, such as bootstrap applications. For typical deflate - * data, zlib's inflate() is about four times as fast as puff(). zlib's - * inflate compiles to around 20K on my machine, whereas puff.c compiles to - * around 4K on my machine (a PowerPC using GNU cc). If the faster decode() - * function here is used, then puff() is only twice as slow as zlib's - * inflate(). - * - * All dynamically allocated memory comes from the stack. The stack required - * is less than 2K bytes. This code is compatible with 16-bit int's and - * assumes that long's are at least 32 bits. puff.c uses the short data type, - * assumed to be 16 bits, for arrays in order to conserve memory. The code - * works whether integers are stored big endian or little endian. - * - * In the comments below are "Format notes" that describe the inflate process - * and document some of the less obvious aspects of the format. This source - * code is meant to supplement RFC 1951, which formally describes the deflate - * format: - * - * http://www.zlib.org/rfc-deflate.html - */ - -/* - * Change history: - * - * 1.0 10 Feb 2002 - First version - * 1.1 17 Feb 2002 - Clarifications of some comments and notes - * - Update puff() dest and source pointers on negative - * errors to facilitate debugging deflators - * - Remove longest from struct huffman -- not needed - * - Simplify offs[] index in construct() - * - Add input size and checking, using longjmp() to - * maintain easy readability - * - Use short data type for large arrays - * - Use pointers instead of long to specify source and - * destination sizes to avoid arbitrary 4 GB limits - * 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!), - * but leave simple version for readability - * - Make sure invalid distances detected if pointers - * are 16 bits - * - Fix fixed codes table error - * - Provide a scanning mode for determining size of - * uncompressed data - * 1.3 20 Mar 2002 - Go back to lengths for puff() parameters [Gailly] - * - Add a puff.h file for the interface - * - Add braces in puff() for else do [Gailly] - * - Use indexes instead of pointers for readability - * 1.4 31 Mar 2002 - Simplify construct() code set check - * - Fix some comments - * - Add FIXLCODES #define - * 1.5 6 Apr 2002 - Minor comment fixes - * 1.6 7 Aug 2002 - Minor format changes - * 1.7 3 Mar 2003 - Added test code for distribution - * - Added zlib-like license - * 1.8 9 Jan 2004 - Added some comments on no distance codes case - * 1.9 21 Feb 2008 - Fix bug on 16-bit integer architectures [Pohland] - * - Catch missing end-of-block symbol error - * 2.0 25 Jul 2008 - Add #define to permit distance too far back - * - Add option in TEST code for puff to write the data - * - Add option in TEST code to skip input bytes - * - Allow TEST code to read from piped stdin - * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers - * - Avoid unsigned comparisons for even happier compilers - * 2.2 25 Apr 2010 - Fix bug in variable initializations [Oberhumer] - * - Add const where appropriate [Oberhumer] - * - Split if's and ?'s for coverage testing - * - Break out test code to separate file - * - Move NIL to puff.h - * - Allow incomplete code only if single code length is 1 - * - Add full code coverage test to Makefile - * 2.3 21 Jan 2013 - Check for invalid code length codes in dynamic blocks - */ - -#include /* for setjmp(), longjmp(), and jmp_buf */ -#include "puff.h" /* prototype for puff() */ - -#define local static /* for local function definitions */ - -/* - * Maximums for allocations and loops. It is not useful to change these -- - * they are fixed by the deflate format. - */ -#define MAXBITS 15 /* maximum bits in a code */ -#define MAXLCODES 286 /* maximum number of literal/length codes */ -#define MAXDCODES 30 /* maximum number of distance codes */ -#define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */ -#define FIXLCODES 288 /* number of fixed literal/length codes */ - -/* input and output state */ -struct state { - /* output state */ - unsigned char *out; /* output buffer */ - unsigned long outlen; /* available space at out */ - unsigned long outcnt; /* bytes written to out so far */ - - /* input state */ - const unsigned char *in; /* input buffer */ - unsigned long inlen; /* available input at in */ - unsigned long incnt; /* bytes read so far */ - int bitbuf; /* bit buffer */ - int bitcnt; /* number of bits in bit buffer */ - - /* input limit error return state for bits() and decode() */ - jmp_buf env; -}; - -/* - * Return need bits from the input stream. This always leaves less than - * eight bits in the buffer. bits() works properly for need == 0. - * - * Format notes: - * - * - Bits are stored in bytes from the least significant bit to the most - * significant bit. Therefore bits are dropped from the bottom of the bit - * buffer, using shift right, and new bytes are appended to the top of the - * bit buffer, using shift left. - */ -local int bits(struct state *s, int need) -{ - long val; /* bit accumulator (can use up to 20 bits) */ - - /* load at least need bits into val */ - val = s->bitbuf; - while (s->bitcnt < need) { - if (s->incnt == s->inlen) - longjmp(s->env, 1); /* out of input */ - val |= (long)(s->in[s->incnt++]) << s->bitcnt; /* load eight bits */ - s->bitcnt += 8; - } - - /* drop need bits and update buffer, always zero to seven bits left */ - s->bitbuf = (int)(val >> need); - s->bitcnt -= need; - - /* return need bits, zeroing the bits above that */ - return (int)(val & ((1L << need) - 1)); -} - -/* - * Process a stored block. - * - * Format notes: - * - * - After the two-bit stored block type (00), the stored block length and - * stored bytes are byte-aligned for fast copying. Therefore any leftover - * bits in the byte that has the last bit of the type, as many as seven, are - * discarded. The value of the discarded bits are not defined and should not - * be checked against any expectation. - * - * - The second inverted copy of the stored block length does not have to be - * checked, but it's probably a good idea to do so anyway. - * - * - A stored block can have zero length. This is sometimes used to byte-align - * subsets of the compressed data for random access or partial recovery. - */ -local int stored(struct state *s) -{ - unsigned len; /* length of stored block */ - - /* discard leftover bits from current byte (assumes s->bitcnt < 8) */ - s->bitbuf = 0; - s->bitcnt = 0; - - /* get length and check against its one's complement */ - if (s->incnt + 4 > s->inlen) - return 2; /* not enough input */ - len = s->in[s->incnt++]; - len |= s->in[s->incnt++] << 8; - if (s->in[s->incnt++] != (~len & 0xff) || - s->in[s->incnt++] != ((~len >> 8) & 0xff)) - return -2; /* didn't match complement! */ - - /* copy len bytes from in to out */ - if (s->incnt + len > s->inlen) - return 2; /* not enough input */ - if (s->out != NIL) { - if (s->outcnt + len > s->outlen) - return 1; /* not enough output space */ - while (len--) - s->out[s->outcnt++] = s->in[s->incnt++]; - } - else { /* just scanning */ - s->outcnt += len; - s->incnt += len; - } - - /* done with a valid stored block */ - return 0; -} - -/* - * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of - * each length, which for a canonical code are stepped through in order. - * symbol[] are the symbol values in canonical order, where the number of - * entries is the sum of the counts in count[]. The decoding process can be - * seen in the function decode() below. - */ -struct huffman { - short *count; /* number of symbols of each length */ - short *symbol; /* canonically ordered symbols */ -}; - -/* - * Decode a code from the stream s using huffman table h. Return the symbol or - * a negative value if there is an error. If all of the lengths are zero, i.e. - * an empty code, or if the code is incomplete and an invalid code is received, - * then -10 is returned after reading MAXBITS bits. - * - * Format notes: - * - * - The codes as stored in the compressed data are bit-reversed relative to - * a simple integer ordering of codes of the same lengths. Hence below the - * bits are pulled from the compressed data one at a time and used to - * build the code value reversed from what is in the stream in order to - * permit simple integer comparisons for decoding. A table-based decoding - * scheme (as used in zlib) does not need to do this reversal. - * - * - The first code for the shortest length is all zeros. Subsequent codes of - * the same length are simply integer increments of the previous code. When - * moving up a length, a zero bit is appended to the code. For a complete - * code, the last code of the longest length will be all ones. - * - * - Incomplete codes are handled by this decoder, since they are permitted - * in the deflate format. See the format notes for fixed() and dynamic(). - */ -#ifdef SLOW -local int decode(struct state *s, const struct huffman *h) -{ - int len; /* current number of bits in code */ - int code; /* len bits being decoded */ - int first; /* first code of length len */ - int count; /* number of codes of length len */ - int index; /* index of first code of length len in symbol table */ - - code = first = index = 0; - for (len = 1; len <= MAXBITS; len++) { - code |= bits(s, 1); /* get next bit */ - count = h->count[len]; - if (code - count < first) /* if length len, return symbol */ - return h->symbol[index + (code - first)]; - index += count; /* else update for next length */ - first += count; - first <<= 1; - code <<= 1; - } - return -10; /* ran out of codes */ -} - -/* - * A faster version of decode() for real applications of this code. It's not - * as readable, but it makes puff() twice as fast. And it only makes the code - * a few percent larger. - */ -#else /* !SLOW */ -local int decode(struct state *s, const struct huffman *h) -{ - int len; /* current number of bits in code */ - int code; /* len bits being decoded */ - int first; /* first code of length len */ - int count; /* number of codes of length len */ - int index; /* index of first code of length len in symbol table */ - int bitbuf; /* bits from stream */ - int left; /* bits left in next or left to process */ - short *next; /* next number of codes */ - - bitbuf = s->bitbuf; - left = s->bitcnt; - code = first = index = 0; - len = 1; - next = h->count + 1; - while (1) { - while (left--) { - code |= bitbuf & 1; - bitbuf >>= 1; - count = *next++; - if (code - count < first) { /* if length len, return symbol */ - s->bitbuf = bitbuf; - s->bitcnt = (s->bitcnt - len) & 7; - return h->symbol[index + (code - first)]; - } - index += count; /* else update for next length */ - first += count; - first <<= 1; - code <<= 1; - len++; - } - left = (MAXBITS+1) - len; - if (left == 0) - break; - if (s->incnt == s->inlen) - longjmp(s->env, 1); /* out of input */ - bitbuf = s->in[s->incnt++]; - if (left > 8) - left = 8; - } - return -10; /* ran out of codes */ -} -#endif /* SLOW */ - -/* - * Given the list of code lengths length[0..n-1] representing a canonical - * Huffman code for n symbols, construct the tables required to decode those - * codes. Those tables are the number of codes of each length, and the symbols - * sorted by length, retaining their original order within each length. The - * return value is zero for a complete code set, negative for an over- - * subscribed code set, and positive for an incomplete code set. The tables - * can be used if the return value is zero or positive, but they cannot be used - * if the return value is negative. If the return value is zero, it is not - * possible for decode() using that table to return an error--any stream of - * enough bits will resolve to a symbol. If the return value is positive, then - * it is possible for decode() using that table to return an error for received - * codes past the end of the incomplete lengths. - * - * Not used by decode(), but used for error checking, h->count[0] is the number - * of the n symbols not in the code. So n - h->count[0] is the number of - * codes. This is useful for checking for incomplete codes that have more than - * one symbol, which is an error in a dynamic block. - * - * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS - * This is assured by the construction of the length arrays in dynamic() and - * fixed() and is not verified by construct(). - * - * Format notes: - * - * - Permitted and expected examples of incomplete codes are one of the fixed - * codes and any code with a single symbol which in deflate is coded as one - * bit instead of zero bits. See the format notes for fixed() and dynamic(). - * - * - Within a given code length, the symbols are kept in ascending order for - * the code bits definition. - */ -local int construct(struct huffman *h, const short *length, int n) -{ - int symbol; /* current symbol when stepping through length[] */ - int len; /* current length when stepping through h->count[] */ - int left; /* number of possible codes left of current length */ - short offs[MAXBITS+1]; /* offsets in symbol table for each length */ - - /* count number of codes of each length */ - for (len = 0; len <= MAXBITS; len++) - h->count[len] = 0; - for (symbol = 0; symbol < n; symbol++) - (h->count[length[symbol]])++; /* assumes lengths are within bounds */ - if (h->count[0] == n) /* no codes! */ - return 0; /* complete, but decode() will fail */ - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; /* one possible code of zero length */ - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; /* one more bit, double codes left */ - left -= h->count[len]; /* deduct count from possible codes */ - if (left < 0) - return left; /* over-subscribed--return negative */ - } /* left > 0 means incomplete */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + h->count[len]; - - /* - * put symbols in table sorted by length, by symbol order within each - * length - */ - for (symbol = 0; symbol < n; symbol++) - if (length[symbol] != 0) - h->symbol[offs[length[symbol]]++] = symbol; - - /* return zero for complete set, positive for incomplete set */ - return left; -} - -/* - * Decode literal/length and distance codes until an end-of-block code. - * - * Format notes: - * - * - Compressed data that is after the block type if fixed or after the code - * description if dynamic is a combination of literals and length/distance - * pairs terminated by and end-of-block code. Literals are simply Huffman - * coded bytes. A length/distance pair is a coded length followed by a - * coded distance to represent a string that occurs earlier in the - * uncompressed data that occurs again at the current location. - * - * - Literals, lengths, and the end-of-block code are combined into a single - * code of up to 286 symbols. They are 256 literals (0..255), 29 length - * symbols (257..285), and the end-of-block symbol (256). - * - * - There are 256 possible lengths (3..258), and so 29 symbols are not enough - * to represent all of those. Lengths 3..10 and 258 are in fact represented - * by just a length symbol. Lengths 11..257 are represented as a symbol and - * some number of extra bits that are added as an integer to the base length - * of the length symbol. The number of extra bits is determined by the base - * length symbol. These are in the static arrays below, lens[] for the base - * lengths and lext[] for the corresponding number of extra bits. - * - * - The reason that 258 gets its own symbol is that the longest length is used - * often in highly redundant files. Note that 258 can also be coded as the - * base value 227 plus the maximum extra value of 31. While a good deflate - * should never do this, it is not an error, and should be decoded properly. - * - * - If a length is decoded, including its extra bits if any, then it is - * followed a distance code. There are up to 30 distance symbols. Again - * there are many more possible distances (1..32768), so extra bits are added - * to a base value represented by the symbol. The distances 1..4 get their - * own symbol, but the rest require extra bits. The base distances and - * corresponding number of extra bits are below in the static arrays dist[] - * and dext[]. - * - * - Literal bytes are simply written to the output. A length/distance pair is - * an instruction to copy previously uncompressed bytes to the output. The - * copy is from distance bytes back in the output stream, copying for length - * bytes. - * - * - Distances pointing before the beginning of the output data are not - * permitted. - * - * - Overlapped copies, where the length is greater than the distance, are - * allowed and common. For example, a distance of one and a length of 258 - * simply copies the last byte 258 times. A distance of four and a length of - * twelve copies the last four bytes three times. A simple forward copy - * ignoring whether the length is greater than the distance or not implements - * this correctly. You should not use memcpy() since its behavior is not - * defined for overlapped arrays. You should not use memmove() or bcopy() - * since though their behavior -is- defined for overlapping arrays, it is - * defined to do the wrong thing in this case. - */ -local int codes(struct state *s, - const struct huffman *lencode, - const struct huffman *distcode) -{ - int symbol; /* decoded symbol */ - int len; /* length for copy */ - unsigned dist; /* distance for copy */ - static const short lens[29] = { /* Size base for length codes 257..285 */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; - static const short lext[29] = { /* Extra bits for length codes 257..285 */ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; - static const short dists[30] = { /* Offset base for distance codes 0..29 */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577}; - static const short dext[30] = { /* Extra bits for distance codes 0..29 */ - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, - 12, 12, 13, 13}; - - /* decode literals and length/distance pairs */ - do { - symbol = decode(s, lencode); - if (symbol < 0) - return symbol; /* invalid symbol */ - if (symbol < 256) { /* literal: symbol is the byte */ - /* write out the literal */ - if (s->out != NIL) { - if (s->outcnt == s->outlen) - return 1; - s->out[s->outcnt] = symbol; - } - s->outcnt++; - } - else if (symbol > 256) { /* length */ - /* get and compute length */ - symbol -= 257; - if (symbol >= 29) - return -10; /* invalid fixed code */ - len = lens[symbol] + bits(s, lext[symbol]); - - /* get and check distance */ - symbol = decode(s, distcode); - if (symbol < 0) - return symbol; /* invalid symbol */ - dist = dists[symbol] + bits(s, dext[symbol]); -#ifndef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - if (dist > s->outcnt) - return -11; /* distance too far back */ -#endif - - /* copy length bytes from distance bytes back */ - if (s->out != NIL) { - if (s->outcnt + len > s->outlen) - return 1; - while (len--) { - s->out[s->outcnt] = -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - dist > s->outcnt ? - 0 : -#endif - s->out[s->outcnt - dist]; - s->outcnt++; - } - } - else - s->outcnt += len; - } - } while (symbol != 256); /* end of block symbol */ - - /* done with a valid fixed or dynamic block */ - return 0; -} - -/* - * Process a fixed codes block. - * - * Format notes: - * - * - This block type can be useful for compressing small amounts of data for - * which the size of the code descriptions in a dynamic block exceeds the - * benefit of custom codes for that block. For fixed codes, no bits are - * spent on code descriptions. Instead the code lengths for literal/length - * codes and distance codes are fixed. The specific lengths for each symbol - * can be seen in the "for" loops below. - * - * - The literal/length code is complete, but has two symbols that are invalid - * and should result in an error if received. This cannot be implemented - * simply as an incomplete code since those two symbols are in the "middle" - * of the code. They are eight bits long and the longest literal/length\ - * code is nine bits. Therefore the code must be constructed with those - * symbols, and the invalid symbols must be detected after decoding. - * - * - The fixed distance codes also have two invalid symbols that should result - * in an error if received. Since all of the distance codes are the same - * length, this can be implemented as an incomplete code. Then the invalid - * codes are detected while decoding. - */ -local int fixed(struct state *s) -{ - static int virgin = 1; - static short lencnt[MAXBITS+1], lensym[FIXLCODES]; - static short distcnt[MAXBITS+1], distsym[MAXDCODES]; - static struct huffman lencode, distcode; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - int symbol; - short lengths[FIXLCODES]; - - /* construct lencode and distcode */ - lencode.count = lencnt; - lencode.symbol = lensym; - distcode.count = distcnt; - distcode.symbol = distsym; - - /* literal/length table */ - for (symbol = 0; symbol < 144; symbol++) - lengths[symbol] = 8; - for (; symbol < 256; symbol++) - lengths[symbol] = 9; - for (; symbol < 280; symbol++) - lengths[symbol] = 7; - for (; symbol < FIXLCODES; symbol++) - lengths[symbol] = 8; - construct(&lencode, lengths, FIXLCODES); - - /* distance table */ - for (symbol = 0; symbol < MAXDCODES; symbol++) - lengths[symbol] = 5; - construct(&distcode, lengths, MAXDCODES); - - /* do this just once */ - virgin = 0; - } - - /* decode data until end-of-block code */ - return codes(s, &lencode, &distcode); -} - -/* - * Process a dynamic codes block. - * - * Format notes: - * - * - A dynamic block starts with a description of the literal/length and - * distance codes for that block. New dynamic blocks allow the compressor to - * rapidly adapt to changing data with new codes optimized for that data. - * - * - The codes used by the deflate format are "canonical", which means that - * the actual bits of the codes are generated in an unambiguous way simply - * from the number of bits in each code. Therefore the code descriptions - * are simply a list of code lengths for each symbol. - * - * - The code lengths are stored in order for the symbols, so lengths are - * provided for each of the literal/length symbols, and for each of the - * distance symbols. - * - * - If a symbol is not used in the block, this is represented by a zero as the - * code length. This does not mean a zero-length code, but rather that no - * code should be created for this symbol. There is no way in the deflate - * format to represent a zero-length code. - * - * - The maximum number of bits in a code is 15, so the possible lengths for - * any code are 1..15. - * - * - The fact that a length of zero is not permitted for a code has an - * interesting consequence. Normally if only one symbol is used for a given - * code, then in fact that code could be represented with zero bits. However - * in deflate, that code has to be at least one bit. So for example, if - * only a single distance base symbol appears in a block, then it will be - * represented by a single code of length one, in particular one 0 bit. This - * is an incomplete code, since if a 1 bit is received, it has no meaning, - * and should result in an error. So incomplete distance codes of one symbol - * should be permitted, and the receipt of invalid codes should be handled. - * - * - It is also possible to have a single literal/length code, but that code - * must be the end-of-block code, since every dynamic block has one. This - * is not the most efficient way to create an empty block (an empty fixed - * block is fewer bits), but it is allowed by the format. So incomplete - * literal/length codes of one symbol should also be permitted. - * - * - If there are only literal codes and no lengths, then there are no distance - * codes. This is represented by one distance code with zero bits. - * - * - The list of up to 286 length/literal lengths and up to 30 distance lengths - * are themselves compressed using Huffman codes and run-length encoding. In - * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means - * that length, and the symbols 16, 17, and 18 are run-length instructions. - * Each of 16, 17, and 18 are followed by extra bits to define the length of - * the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10 - * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols - * are common, hence the special coding for zero lengths. - * - * - The symbols for 0..18 are Huffman coded, and so that code must be - * described first. This is simply a sequence of up to 19 three-bit values - * representing no code (0) or the code length for that symbol (1..7). - * - * - A dynamic block starts with three fixed-size counts from which is computed - * the number of literal/length code lengths, the number of distance code - * lengths, and the number of code length code lengths (ok, you come up with - * a better name!) in the code descriptions. For the literal/length and - * distance codes, lengths after those provided are considered zero, i.e. no - * code. The code length code lengths are received in a permuted order (see - * the order[] array below) to make a short code length code length list more - * likely. As it turns out, very short and very long codes are less likely - * to be seen in a dynamic code description, hence what may appear initially - * to be a peculiar ordering. - * - * - Given the number of literal/length code lengths (nlen) and distance code - * lengths (ndist), then they are treated as one long list of nlen + ndist - * code lengths. Therefore run-length coding can and often does cross the - * boundary between the two sets of lengths. - * - * - So to summarize, the code description at the start of a dynamic block is - * three counts for the number of code lengths for the literal/length codes, - * the distance codes, and the code length codes. This is followed by the - * code length code lengths, three bits each. This is used to construct the - * code length code which is used to read the remainder of the lengths. Then - * the literal/length code lengths and distance lengths are read as a single - * set of lengths using the code length codes. Codes are constructed from - * the resulting two sets of lengths, and then finally you can start - * decoding actual compressed data in the block. - * - * - For reference, a "typical" size for the code description in a dynamic - * block is around 80 bytes. - */ -local int dynamic(struct state *s) -{ - int nlen, ndist, ncode; /* number of lengths in descriptor */ - int index; /* index of lengths[] */ - int err; /* construct() return value */ - short lengths[MAXCODES]; /* descriptor code lengths */ - short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ - short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ - struct huffman lencode, distcode; /* length and distance codes */ - static const short order[19] = /* permutation of code length codes */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - /* construct lencode and distcode */ - lencode.count = lencnt; - lencode.symbol = lensym; - distcode.count = distcnt; - distcode.symbol = distsym; - - /* get number of lengths in each table, check lengths */ - nlen = bits(s, 5) + 257; - ndist = bits(s, 5) + 1; - ncode = bits(s, 4) + 4; - if (nlen > MAXLCODES || ndist > MAXDCODES) - return -3; /* bad counts */ - - /* read code length code lengths (really), missing lengths are zero */ - for (index = 0; index < ncode; index++) - lengths[order[index]] = bits(s, 3); - for (; index < 19; index++) - lengths[order[index]] = 0; - - /* build huffman table for code lengths codes (use lencode temporarily) */ - err = construct(&lencode, lengths, 19); - if (err != 0) /* require complete code set here */ - return -4; - - /* read length/literal and distance code length tables */ - index = 0; - while (index < nlen + ndist) { - int symbol; /* decoded value */ - int len; /* last length to repeat */ - - symbol = decode(s, &lencode); - if (symbol < 0) - return symbol; /* invalid symbol */ - if (symbol < 16) /* length in 0..15 */ - lengths[index++] = symbol; - else { /* repeat instruction */ - len = 0; /* assume repeating zeros */ - if (symbol == 16) { /* repeat last length 3..6 times */ - if (index == 0) - return -5; /* no last length! */ - len = lengths[index - 1]; /* last length */ - symbol = 3 + bits(s, 2); - } - else if (symbol == 17) /* repeat zero 3..10 times */ - symbol = 3 + bits(s, 3); - else /* == 18, repeat zero 11..138 times */ - symbol = 11 + bits(s, 7); - if (index + symbol > nlen + ndist) - return -6; /* too many lengths! */ - while (symbol--) /* repeat last or zero symbol times */ - lengths[index++] = len; - } - } - - /* check for end-of-block code -- there better be one! */ - if (lengths[256] == 0) - return -9; - - /* build huffman table for literal/length codes */ - err = construct(&lencode, lengths, nlen); - if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1])) - return -7; /* incomplete code ok only for single length 1 code */ - - /* build huffman table for distance codes */ - err = construct(&distcode, lengths + nlen, ndist); - if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1])) - return -8; /* incomplete code ok only for single length 1 code */ - - /* decode data until end-of-block code */ - return codes(s, &lencode, &distcode); -} - -/* - * Inflate source to dest. On return, destlen and sourcelen are updated to the - * size of the uncompressed data and the size of the deflate data respectively. - * On success, the return value of puff() is zero. If there is an error in the - * source data, i.e. it is not in the deflate format, then a negative value is - * returned. If there is not enough input available or there is not enough - * output space, then a positive error is returned. In that case, destlen and - * sourcelen are not updated to facilitate retrying from the beginning with the - * provision of more input data or more output space. In the case of invalid - * inflate data (a negative error), the dest and source pointers are updated to - * facilitate the debugging of deflators. - * - * puff() also has a mode to determine the size of the uncompressed output with - * no output written. For this dest must be (unsigned char *)0. In this case, - * the input value of *destlen is ignored, and on return *destlen is set to the - * size of the uncompressed output. - * - * The return codes are: - * - * 2: available inflate data did not terminate - * 1: output space exhausted before completing inflate - * 0: successful inflate - * -1: invalid block type (type == 3) - * -2: stored block length did not match one's complement - * -3: dynamic block code description: too many length or distance codes - * -4: dynamic block code description: code lengths codes incomplete - * -5: dynamic block code description: repeat lengths with no first length - * -6: dynamic block code description: repeat more than specified lengths - * -7: dynamic block code description: invalid literal/length code lengths - * -8: dynamic block code description: invalid distance code lengths - * -9: dynamic block code description: missing end-of-block code - * -10: invalid literal/length or distance code in fixed or dynamic block - * -11: distance is too far back in fixed or dynamic block - * - * Format notes: - * - * - Three bits are read for each block to determine the kind of block and - * whether or not it is the last block. Then the block is decoded and the - * process repeated if it was not the last block. - * - * - The leftover bits in the last byte of the deflate data after the last - * block (if it was a fixed or dynamic block) are undefined and have no - * expected values to check. - */ -int puff(unsigned char *dest, /* pointer to destination pointer */ - unsigned long *destlen, /* amount of output space */ - const unsigned char *source, /* pointer to source data pointer */ - unsigned long *sourcelen) /* amount of input available */ -{ - struct state s; /* input/output state */ - int last, type; /* block information */ - int err; /* return value */ - - /* initialize output state */ - s.out = dest; - s.outlen = *destlen; /* ignored if dest is NIL */ - s.outcnt = 0; - - /* initialize input state */ - s.in = source; - s.inlen = *sourcelen; - s.incnt = 0; - s.bitbuf = 0; - s.bitcnt = 0; - - /* return if bits() or decode() tries to read past available input */ - if (setjmp(s.env) != 0) /* if came back here via longjmp() */ - err = 2; /* then skip do-loop, return error */ - else { - /* process blocks until last block or error */ - do { - last = bits(&s, 1); /* one if last block */ - type = bits(&s, 2); /* block type 0..3 */ - err = type == 0 ? - stored(&s) : - (type == 1 ? - fixed(&s) : - (type == 2 ? - dynamic(&s) : - -1)); /* type == 3, invalid */ - if (err != 0) - break; /* return with error */ - } while (!last); - } - - /* update the lengths and return */ - if (err <= 0) { - *destlen = s.outcnt; - *sourcelen = s.incnt; - } - return err; -} diff --git a/third_party/zlib/contrib/puff/puff.h b/third_party/zlib/contrib/puff/puff.h deleted file mode 100644 index 428e821..0000000 --- a/third_party/zlib/contrib/puff/puff.h +++ /dev/null @@ -1,36 +0,0 @@ -/* puff.h - Copyright (C) 2002-2013 Mark Adler, all rights reserved - version 2.3, 21 Jan 2013 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - - -/* - * See puff.c for purpose and usage. - */ -#ifndef NIL -# define NIL ((unsigned char *)0) /* for no output option */ -#endif - -int puff(unsigned char *dest, /* pointer to destination pointer */ - unsigned long *destlen, /* amount of output space */ - const unsigned char *source, /* pointer to source data pointer */ - unsigned long *sourcelen); /* amount of input available */ - diff --git a/third_party/zlib/contrib/puff/pufftest.c b/third_party/zlib/contrib/puff/pufftest.c deleted file mode 100644 index 5f72ecc..0000000 --- a/third_party/zlib/contrib/puff/pufftest.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * pufftest.c - * Copyright (C) 2002-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in puff.h - * version 2.3, 21 Jan 2013 - */ - -/* Example of how to use puff(). - - Usage: puff [-w] [-f] [-nnn] file - ... | puff [-w] [-f] [-nnn] - - where file is the input file with deflate data, nnn is the number of bytes - of input to skip before inflating (e.g. to skip a zlib or gzip header), and - -w is used to write the decompressed data to stdout. -f is for coverage - testing, and causes pufftest to fail with not enough output space (-f does - a write like -w, so -w is not required). */ - -#include -#include -#include "puff.h" - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#define local static - -/* Return size times approximately the cube root of 2, keeping the result as 1, - 3, or 5 times a power of 2 -- the result is always > size, until the result - is the maximum value of an unsigned long, where it remains. This is useful - to keep reallocations less than ~33% over the actual data. */ -local size_t bythirds(size_t size) -{ - int n; - size_t m; - - m = size; - for (n = 0; m; n++) - m >>= 1; - if (n < 3) - return size + 1; - n -= 3; - m = size >> n; - m += m == 6 ? 2 : 1; - m <<= n; - return m > size ? m : (size_t)(-1); -} - -/* Read the input file *name, or stdin if name is NULL, into allocated memory. - Reallocate to larger buffers until the entire file is read in. Return a - pointer to the allocated data, or NULL if there was a memory allocation - failure. *len is the number of bytes of data read from the input file (even - if load() returns NULL). If the input file was empty or could not be opened - or read, *len is zero. */ -local void *load(const char *name, size_t *len) -{ - size_t size; - void *buf, *swap; - FILE *in; - - *len = 0; - buf = malloc(size = 4096); - if (buf == NULL) - return NULL; - in = name == NULL ? stdin : fopen(name, "rb"); - if (in != NULL) { - for (;;) { - *len += fread((char *)buf + *len, 1, size - *len, in); - if (*len < size) break; - size = bythirds(size); - if (size == *len || (swap = realloc(buf, size)) == NULL) { - free(buf); - buf = NULL; - break; - } - buf = swap; - } - fclose(in); - } - return buf; -} - -int main(int argc, char **argv) -{ - int ret, put = 0, fail = 0; - unsigned skip = 0; - char *arg, *name = NULL; - unsigned char *source = NULL, *dest; - size_t len = 0; - unsigned long sourcelen, destlen; - - /* process arguments */ - while (arg = *++argv, --argc) - if (arg[0] == '-') { - if (arg[1] == 'w' && arg[2] == 0) - put = 1; - else if (arg[1] == 'f' && arg[2] == 0) - fail = 1, put = 1; - else if (arg[1] >= '0' && arg[1] <= '9') - skip = (unsigned)atoi(arg + 1); - else { - fprintf(stderr, "invalid option %s\n", arg); - return 3; - } - } - else if (name != NULL) { - fprintf(stderr, "only one file name allowed\n"); - return 3; - } - else - name = arg; - source = load(name, &len); - if (source == NULL) { - fprintf(stderr, "memory allocation failure\n"); - return 4; - } - if (len == 0) { - fprintf(stderr, "could not read %s, or it was empty\n", - name == NULL ? "" : name); - free(source); - return 3; - } - if (skip >= len) { - fprintf(stderr, "skip request of %d leaves no input\n", skip); - free(source); - return 3; - } - - /* test inflate data with offset skip */ - len -= skip; - sourcelen = (unsigned long)len; - ret = puff(NIL, &destlen, source + skip, &sourcelen); - if (ret) - fprintf(stderr, "puff() failed with return code %d\n", ret); - else { - fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen); - if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n", - len - sourcelen); - } - - /* if requested, inflate again and write decompressed data to stdout */ - if (put && ret == 0) { - if (fail) - destlen >>= 1; - dest = malloc(destlen); - if (dest == NULL) { - fprintf(stderr, "memory allocation failure\n"); - free(source); - return 4; - } - puff(dest, &destlen, source + skip, &sourcelen); - SET_BINARY_MODE(stdout); - fwrite(dest, 1, destlen, stdout); - free(dest); - } - - /* clean up */ - free(source); - return ret; -} diff --git a/third_party/zlib/contrib/puff/zeros.raw b/third_party/zlib/contrib/puff/zeros.raw deleted file mode 100644 index 0a90e76b300205a44a0ecbf613e64aaaef2e51e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2517 zcmYdFkYHV$AkxzmXu#!mP=i#?5{3o^3jqcYc(h*%Opg+yAut*OqaiT#LSPd+y9&tF zP5<`ixi4UXdB8xJfs^6ee;AkH?VUytyFsD;HLIJ(gg5bUnNh}Q2#kinXb22!2pr%5 E0JRq+;s5{u diff --git a/third_party/zlib/contrib/testzlib/testzlib.c b/third_party/zlib/contrib/testzlib/testzlib.c deleted file mode 100644 index c4b0148..0000000 --- a/third_party/zlib/contrib/testzlib/testzlib.c +++ /dev/null @@ -1,275 +0,0 @@ -#include -#include -#include - -#include "zlib.h" - - -void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) -{ - R->HighPart = A.HighPart - B.HighPart; - if (A.LowPart >= B.LowPart) - R->LowPart = A.LowPart - B.LowPart; - else - { - R->LowPart = A.LowPart - B.LowPart; - R->HighPart --; - } -} - -#ifdef _M_X64 -// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc -unsigned __int64 __rdtsc(void); -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - // printf("rdtsc = %I64x\n",__rdtsc()); - pbeginTime64->QuadPart=__rdtsc(); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres; - unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); - LIres.QuadPart=res; - // printf("rdtsc = %I64x\n",__rdtsc()); - return LIres; -} -#else -#ifdef _M_IX86 -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ - DWORD dwEdx,dwEax; - _asm - { - rdtsc - mov dwEax,eax - mov dwEdx,edx - } - pbeginTime64->LowPart=dwEax; - pbeginTime64->HighPart=dwEdx; -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - myGetRDTSC32(pbeginTime64); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres,endTime64; - myGetRDTSC32(&endTime64); - - LIres.LowPart=LIres.HighPart=0; - MyDoMinus64(&LIres,endTime64,beginTime64); - return LIres; -} -#else -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER lr; - lr.QuadPart=0; - return lr; -} -#endif -#endif - -void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) -{ - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) - { - pbeginTime64->LowPart = GetTickCount(); - pbeginTime64->HighPart = 0; - } -} - -DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER endTime64,ticksPerSecond,ticks; - DWORDLONG ticksShifted,tickSecShifted; - DWORD dwLog=16+0; - DWORD dwRet; - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) - dwRet = (GetTickCount() - beginTime64.LowPart)*1; - else - { - MyDoMinus64(&ticks,endTime64,beginTime64); - QueryPerformanceFrequency(&ticksPerSecond); - - - { - ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); - tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); - - } - - dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); - dwRet *=1; - } - return dwRet; -} - -int ReadFileMemory(const char* filename,long* plFileSize,unsigned char** pFilePtr) -{ - FILE* stream; - unsigned char* ptr; - int retVal=1; - stream=fopen(filename, "rb"); - if (stream==NULL) - return 0; - - fseek(stream,0,SEEK_END); - - *plFileSize=ftell(stream); - fseek(stream,0,SEEK_SET); - ptr=malloc((*plFileSize)+1); - if (ptr==NULL) - retVal=0; - else - { - if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) - retVal=0; - } - fclose(stream); - *pFilePtr=ptr; - return retVal; -} - -int main(int argc, char *argv[]) -{ - int BlockSizeCompress=0x8000; - int BlockSizeUncompress=0x8000; - int cprLevel=Z_DEFAULT_COMPRESSION ; - long lFileSize; - unsigned char* FilePtr; - long lBufferSizeCpr; - long lBufferSizeUncpr; - long lCompressedSize=0; - unsigned char* CprPtr; - unsigned char* UncprPtr; - long lSizeCpr,lSizeUncpr; - DWORD dwGetTick,dwMsecQP; - LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; - - if (argc<=1) - { - printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); - return 0; - } - - if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) - { - printf("error reading %s\n",argv[1]); - return 1; - } - else printf("file %s read, %ld bytes\n",argv[1],lFileSize); - - if (argc>=3) - BlockSizeCompress=atol(argv[2]); - - if (argc>=4) - BlockSizeUncompress=atol(argv[3]); - - if (argc>=5) - cprLevel=(int)atol(argv[4]); - - lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; - lBufferSizeUncpr = lBufferSizeCpr; - - CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lFileSize; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - deflateInit(&zcpr,cprLevel); - - zcpr.next_in = FilePtr; - zcpr.next_out = CprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); - zcpr.avail_out = BlockSizeCompress; - ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeCpr=zcpr.total_out; - deflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total compress size = %u, in %u step\n",lSizeCpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); - UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lSizeCpr; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - inflateInit(&zcpr); - - zcpr.next_in = CprPtr; - zcpr.next_out = UncprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); - zcpr.avail_out = BlockSizeUncompress; - ret=inflate(&zcpr,Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeUncpr=zcpr.total_out; - inflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - if (lSizeUncpr==lFileSize) - { - if (memcmp(FilePtr,UncprPtr,lFileSize)==0) - printf("compare ok\n"); - - } - - return 0; -} diff --git a/third_party/zlib/contrib/testzlib/testzlib.txt b/third_party/zlib/contrib/testzlib/testzlib.txt deleted file mode 100644 index e508bb2..0000000 --- a/third_party/zlib/contrib/testzlib/testzlib.txt +++ /dev/null @@ -1,10 +0,0 @@ -To build testzLib with Visual Studio 2005: - -copy to a directory file from : -- root of zLib tree -- contrib/testzlib -- contrib/masmx86 -- contrib/masmx64 -- contrib/vstudio/vc7 - -and open testzlib8.sln \ No newline at end of file diff --git a/third_party/zlib/contrib/untgz/Makefile b/third_party/zlib/contrib/untgz/Makefile deleted file mode 100644 index b54266f..0000000 --- a/third_party/zlib/contrib/untgz/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -CC=cc -CFLAGS=-g - -untgz: untgz.o ../../libz.a - $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz - -untgz.o: untgz.c ../../zlib.h - $(CC) $(CFLAGS) -c -I../.. untgz.c - -../../libz.a: - cd ../..; ./configure; make - -clean: - rm -f untgz untgz.o *~ diff --git a/third_party/zlib/contrib/untgz/Makefile.msc b/third_party/zlib/contrib/untgz/Makefile.msc deleted file mode 100644 index 77b8602..0000000 --- a/third_party/zlib/contrib/untgz/Makefile.msc +++ /dev/null @@ -1,17 +0,0 @@ -CC=cl -CFLAGS=-MD - -untgz.exe: untgz.obj ..\..\zlib.lib - $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib - -untgz.obj: untgz.c ..\..\zlib.h - $(CC) $(CFLAGS) -c -I..\.. untgz.c - -..\..\zlib.lib: - cd ..\.. - $(MAKE) -f win32\makefile.msc - cd contrib\untgz - -clean: - -del untgz.obj - -del untgz.exe diff --git a/third_party/zlib/contrib/untgz/untgz.c b/third_party/zlib/contrib/untgz/untgz.c deleted file mode 100644 index 7857921..0000000 --- a/third_party/zlib/contrib/untgz/untgz.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - * untgz.c -- Display contents and extract files from a gzip'd TAR file - * - * written by Pedro A. Aranda Gutierrez - * adaptation to Unix by Jean-loup Gailly - * various fixes by Cosmin Truta - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include -#include -#include -#include - -#include "zlib.h" - -#ifdef _WIN32 -# include -# include -# include -# ifndef F_OK -# define F_OK 0 -# endif -# define mkdir(dirname,mode) _mkdir(dirname) -# ifdef _MSC_VER -# define access(path,mode) _access(path,mode) -# define chmod(path,mode) _chmod(path,mode) -# define strdup(str) _strdup(str) -# endif -#else -# include -# include -# include -#endif - - -/* values used in typeflag field */ - -#define REGTYPE '0' /* regular file */ -#define AREGTYPE '\0' /* regular file */ -#define LNKTYPE '1' /* link */ -#define SYMTYPE '2' /* reserved */ -#define CHRTYPE '3' /* character special */ -#define BLKTYPE '4' /* block special */ -#define DIRTYPE '5' /* directory */ -#define FIFOTYPE '6' /* FIFO special */ -#define CONTTYPE '7' /* reserved */ - -/* GNU tar extensions */ - -#define GNUTYPE_DUMPDIR 'D' /* file names from dumped directory */ -#define GNUTYPE_LONGLINK 'K' /* long link name */ -#define GNUTYPE_LONGNAME 'L' /* long file name */ -#define GNUTYPE_MULTIVOL 'M' /* continuation of file from another volume */ -#define GNUTYPE_NAMES 'N' /* file name that does not fit into main hdr */ -#define GNUTYPE_SPARSE 'S' /* sparse file */ -#define GNUTYPE_VOLHDR 'V' /* tape/volume header */ - - -/* tar header */ - -#define BLOCKSIZE 512 -#define SHORTNAMESIZE 100 - -struct tar_header -{ /* byte offset */ - char name[100]; /* 0 */ - char mode[8]; /* 100 */ - char uid[8]; /* 108 */ - char gid[8]; /* 116 */ - char size[12]; /* 124 */ - char mtime[12]; /* 136 */ - char chksum[8]; /* 148 */ - char typeflag; /* 156 */ - char linkname[100]; /* 157 */ - char magic[6]; /* 257 */ - char version[2]; /* 263 */ - char uname[32]; /* 265 */ - char gname[32]; /* 297 */ - char devmajor[8]; /* 329 */ - char devminor[8]; /* 337 */ - char prefix[155]; /* 345 */ - /* 500 */ -}; - -union tar_buffer -{ - char buffer[BLOCKSIZE]; - struct tar_header header; -}; - -struct attr_item -{ - struct attr_item *next; - char *fname; - int mode; - time_t time; -}; - -enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }; - -char *prog; - -void error(const char *msg) -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - -const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }; - -/* return the file name of the TGZ archive */ -/* or NULL if it does not exist */ - -char *TGZfname (const char *arcname) -{ - static char buffer[1024]; - int origlen,i; - - strcpy(buffer,arcname); - origlen = strlen(buffer); - - for (i=0; TGZsuffix[i]; i++) - { - strcpy(buffer+origlen,TGZsuffix[i]); - if (access(buffer,F_OK) == 0) - return buffer; - } - return NULL; -} - - -/* error message for the filename */ - -void TGZnotfound (const char *arcname) -{ - int i; - - fprintf(stderr,"%s: Couldn't find ",prog); - for (i=0;TGZsuffix[i];i++) - fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", - arcname, - TGZsuffix[i]); - exit(1); -} - - -/* convert octal digits to int */ -/* on error return -1 */ - -int getoct (char *p,int width) -{ - int result = 0; - char c; - - while (width--) - { - c = *p++; - if (c == 0) - break; - if (c == ' ') - continue; - if (c < '0' || c > '7') - return -1; - result = result * 8 + (c - '0'); - } - return result; -} - - -/* convert time_t to string */ -/* use the "YYYY/MM/DD hh:mm:ss" format */ - -char *strtime (time_t *t) -{ - struct tm *local; - static char result[32]; - - local = localtime(t); - sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d", - local->tm_year+1900, local->tm_mon+1, local->tm_mday, - local->tm_hour, local->tm_min, local->tm_sec); - return result; -} - - -/* set file time */ - -int setfiletime (char *fname,time_t ftime) -{ -#ifdef _WIN32 - static int isWinNT = -1; - SYSTEMTIME st; - FILETIME locft, modft; - struct tm *loctm; - HANDLE hFile; - int result; - - loctm = localtime(&ftime); - if (loctm == NULL) - return -1; - - st.wYear = (WORD)loctm->tm_year + 1900; - st.wMonth = (WORD)loctm->tm_mon + 1; - st.wDayOfWeek = (WORD)loctm->tm_wday; - st.wDay = (WORD)loctm->tm_mday; - st.wHour = (WORD)loctm->tm_hour; - st.wMinute = (WORD)loctm->tm_min; - st.wSecond = (WORD)loctm->tm_sec; - st.wMilliseconds = 0; - if (!SystemTimeToFileTime(&st, &locft) || - !LocalFileTimeToFileTime(&locft, &modft)) - return -1; - - if (isWinNT < 0) - isWinNT = (GetVersion() < 0x80000000) ? 1 : 0; - hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, - (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0), - NULL); - if (hFile == INVALID_HANDLE_VALUE) - return -1; - result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1; - CloseHandle(hFile); - return result; -#else - struct utimbuf settime; - - settime.actime = settime.modtime = ftime; - return utime(fname,&settime); -#endif -} - - -/* push file attributes */ - -void push_attr(struct attr_item **list,char *fname,int mode,time_t time) -{ - struct attr_item *item; - - item = (struct attr_item *)malloc(sizeof(struct attr_item)); - if (item == NULL) - error("Out of memory"); - item->fname = strdup(fname); - item->mode = mode; - item->time = time; - item->next = *list; - *list = item; -} - - -/* restore file attributes */ - -void restore_attr(struct attr_item **list) -{ - struct attr_item *item, *prev; - - for (item = *list; item != NULL; ) - { - setfiletime(item->fname,item->time); - chmod(item->fname,item->mode); - prev = item; - item = item->next; - free(prev); - } - *list = NULL; -} - - -/* match regular expression */ - -#define ISSPECIAL(c) (((c) == '*') || ((c) == '/')) - -int ExprMatch (char *string,char *expr) -{ - while (1) - { - if (ISSPECIAL(*expr)) - { - if (*expr == '/') - { - if (*string != '\\' && *string != '/') - return 0; - string ++; expr++; - } - else if (*expr == '*') - { - if (*expr ++ == 0) - return 1; - while (*++string != *expr) - if (*string == 0) - return 0; - } - } - else - { - if (*string != *expr) - return 0; - if (*expr++ == 0) - return 1; - string++; - } - } -} - - -/* recursive mkdir */ -/* abort on ENOENT; ignore other errors like "directory already exists" */ -/* return 1 if OK */ -/* 0 on error */ - -int makedir (char *newdir) -{ - char *buffer = strdup(newdir); - char *p; - int len = strlen(buffer); - - if (len <= 0) { - free(buffer); - return 0; - } - if (buffer[len-1] == '/') { - buffer[len-1] = '\0'; - } - if (mkdir(buffer, 0755) == 0) - { - free(buffer); - return 1; - } - - p = buffer+1; - while (1) - { - char hold; - - while(*p && *p != '\\' && *p != '/') - p++; - hold = *p; - *p = 0; - if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT)) - { - fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer); - free(buffer); - return 0; - } - if (hold == 0) - break; - *p++ = hold; - } - free(buffer); - return 1; -} - - -int matchname (int arg,int argc,char **argv,char *fname) -{ - if (arg == argc) /* no arguments given (untgz tgzarchive) */ - return 1; - - while (arg < argc) - if (ExprMatch(fname,argv[arg++])) - return 1; - - return 0; /* ignore this for the moment being */ -} - - -/* tar file list or extract */ - -int tar (gzFile in,int action,int arg,int argc,char **argv) -{ - union tar_buffer buffer; - int len; - int err; - int getheader = 1; - int remaining = 0; - FILE *outfile = NULL; - char fname[BLOCKSIZE]; - int tarmode; - time_t tartime; - struct attr_item *attributes = NULL; - - if (action == TGZ_LIST) - printf(" date time size file\n" - " ---------- -------- --------- -------------------------------------\n"); - while (1) - { - len = gzread(in, &buffer, BLOCKSIZE); - if (len < 0) - error(gzerror(in, &err)); - /* - * Always expect complete blocks to process - * the tar information. - */ - if (len != BLOCKSIZE) - { - action = TGZ_INVALID; /* force error exit */ - remaining = 0; /* force I/O cleanup */ - } - - /* - * If we have to get a tar header - */ - if (getheader >= 1) - { - /* - * if we met the end of the tar - * or the end-of-tar block, - * we are done - */ - if (len == 0 || buffer.header.name[0] == 0) - break; - - tarmode = getoct(buffer.header.mode,8); - tartime = (time_t)getoct(buffer.header.mtime,12); - if (tarmode == -1 || tartime == (time_t)-1) - { - buffer.header.name[0] = 0; - action = TGZ_INVALID; - } - - if (getheader == 1) - { - strncpy(fname,buffer.header.name,SHORTNAMESIZE); - if (fname[SHORTNAMESIZE-1] != 0) - fname[SHORTNAMESIZE] = 0; - } - else - { - /* - * The file name is longer than SHORTNAMESIZE - */ - if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0) - error("bad long name"); - getheader = 1; - } - - /* - * Act according to the type flag - */ - switch (buffer.header.typeflag) - { - case DIRTYPE: - if (action == TGZ_LIST) - printf(" %s
%s\n",strtime(&tartime),fname); - if (action == TGZ_EXTRACT) - { - makedir(fname); - push_attr(&attributes,fname,tarmode,tartime); - } - break; - case REGTYPE: - case AREGTYPE: - remaining = getoct(buffer.header.size,12); - if (remaining == -1) - { - action = TGZ_INVALID; - break; - } - if (action == TGZ_LIST) - printf(" %s %9d %s\n",strtime(&tartime),remaining,fname); - else if (action == TGZ_EXTRACT) - { - if (matchname(arg,argc,argv,fname)) - { - outfile = fopen(fname,"wb"); - if (outfile == NULL) { - /* try creating directory */ - char *p = strrchr(fname, '/'); - if (p != NULL) { - *p = '\0'; - makedir(fname); - *p = '/'; - outfile = fopen(fname,"wb"); - } - } - if (outfile != NULL) - printf("Extracting %s\n",fname); - else - fprintf(stderr, "%s: Couldn't create %s",prog,fname); - } - else - outfile = NULL; - } - getheader = 0; - break; - case GNUTYPE_LONGLINK: - case GNUTYPE_LONGNAME: - remaining = getoct(buffer.header.size,12); - if (remaining < 0 || remaining >= BLOCKSIZE) - { - action = TGZ_INVALID; - break; - } - len = gzread(in, fname, BLOCKSIZE); - if (len < 0) - error(gzerror(in, &err)); - if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) - { - action = TGZ_INVALID; - break; - } - getheader = 2; - break; - default: - if (action == TGZ_LIST) - printf(" %s <---> %s\n",strtime(&tartime),fname); - break; - } - } - else - { - unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; - - if (outfile != NULL) - { - if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) - { - fprintf(stderr, - "%s: Error writing %s -- skipping\n",prog,fname); - fclose(outfile); - outfile = NULL; - remove(fname); - } - } - remaining -= bytes; - } - - if (remaining == 0) - { - getheader = 1; - if (outfile != NULL) - { - fclose(outfile); - outfile = NULL; - if (action != TGZ_INVALID) - push_attr(&attributes,fname,tarmode,tartime); - } - } - - /* - * Abandon if errors are found - */ - if (action == TGZ_INVALID) - { - error("broken archive"); - break; - } - } - - /* - * Restore file modes and time stamps - */ - restore_attr(&attributes); - - if (gzclose(in) != Z_OK) - error("failed gzclose"); - - return 0; -} - - -/* ============================================================ */ - -void help(int exitval) -{ - printf("untgz version 0.2.1\n" - " using zlib version %s\n\n", - zlibVersion()); - printf("Usage: untgz file.tgz extract all files\n" - " untgz file.tgz fname ... extract selected files\n" - " untgz -l file.tgz list archive contents\n" - " untgz -h display this help\n"); - exit(exitval); -} - - -/* ============================================================ */ - -#if defined(WIN32) && defined(__GNUC__) -int _CRT_glob = 0; /* disable argument globbing in MinGW */ -#endif - -int main(int argc,char **argv) -{ - int action = TGZ_EXTRACT; - int arg = 1; - char *TGZfile; - gzFile f; - - prog = strrchr(argv[0],'\\'); - if (prog == NULL) - { - prog = strrchr(argv[0],'/'); - if (prog == NULL) - { - prog = strrchr(argv[0],':'); - if (prog == NULL) - prog = argv[0]; - else - prog++; - } - else - prog++; - } - else - prog++; - - if (argc == 1) - help(0); - - if (strcmp(argv[arg],"-l") == 0) - { - action = TGZ_LIST; - if (argc == ++arg) - help(0); - } - else if (strcmp(argv[arg],"-h") == 0) - { - help(0); - } - - if ((TGZfile = TGZfname(argv[arg])) == NULL) - TGZnotfound(argv[arg]); - - ++arg; - if ((action == TGZ_LIST) && (arg != argc)) - help(1); - -/* - * Process the TGZ file - */ - switch(action) - { - case TGZ_LIST: - case TGZ_EXTRACT: - f = gzopen(TGZfile,"rb"); - if (f == NULL) - { - fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile); - return 1; - } - exit(tar(f, action, arg, argc, argv)); - break; - - default: - error("Unknown option"); - exit(1); - } - - return 0; -} diff --git a/third_party/zlib/contrib/vstudio/readme.txt b/third_party/zlib/contrib/vstudio/readme.txt deleted file mode 100644 index 061bbc0..0000000 --- a/third_party/zlib/contrib/vstudio/readme.txt +++ /dev/null @@ -1,81 +0,0 @@ -Building instructions for the DLL versions of Zlib 1.3.1 -======================================================== - -This directory contains projects that build zlib and minizip using -Microsoft Visual C++ 9.0/10.0. - -You don't need to build these projects yourself. You can download the -binaries from: - http://www.winimage.com/zLibDll - -More information can be found at this site. - - - - - -Build instructions for Visual Studio 2008 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008 -- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" - -Build instructions for Visual Studio 2010 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010 - -Build instructions for Visual Studio 2012 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc11\zlibvc.sln with Microsoft Visual C++ 2012 - -Build instructions for Visual Studio 2013 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc12\zlibvc.sln with Microsoft Visual C++ 2013 - -Build instructions for Visual Studio 2015 (32 bits or 64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc14\zlibvc.sln with Microsoft Visual C++ 2015 - -Build instructions for Visual Studio 2022 (64 bits) --------------------------------------------------------------- -- Decompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc143\zlibvc.sln with Microsoft Visual C++ 2022 - - - -Important ---------- -- To use zlibwapi.dll in your application, you must define the - macro ZLIB_WINAPI when compiling your application's source files. - - -Additional notes ----------------- -- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built - by Gilles Vollant from the zlib 1.1.x sources, and distributed at - http://www.winimage.com/zLibDll - It uses the WINAPI calling convention for the exported functions, and - includes the minizip functionality. If your application needs that - particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. - -- The new DLL was renamed because there exist several incompatible - versions of zlib.dll on the Internet. - -- There is also an official DLL build of zlib, named zlib1.dll. This one - is exporting the functions using the CDECL convention. See the file - win32\DLL_FAQ.txt found in this zlib distribution. - -- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol - has a slightly different effect. To avoid compatibility problems, do - not define it here. - - -Gilles Vollant -info@winimage.com - -Visual Studio 2013, 2015, and 2022 Projects from Sean Hunt -seandhunt_7@yahoo.com diff --git a/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj b/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj deleted file mode 100644 index 1b36242..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj +++ /dev/null @@ -1,310 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters deleted file mode 100644 index 0164e7d..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {048af943-022b-4db6-beeb-a54c34774ee2} - cpp;c;cxx;def;odl;idl;hpj;bat - - - {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} - h;hpp;hxx;hm;inl;inc - - - {0844199a-966b-4f19-81db-1e0125e141b9} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj b/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj deleted file mode 100644 index ccd3651..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj +++ /dev/null @@ -1,307 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters deleted file mode 100644 index 2badd4b..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {c0419b40-bf50-40da-b153-ff74215b79de} - cpp;c;cxx;def;odl;idl;hpj;bat - - - {bb87b070-735b-478e-92ce-7383abb2f36c} - h;hpp;hxx;hm;inl;inc - - - {f46ab6a6-548f-43cb-ae96-681abb5bd5db} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj b/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj deleted file mode 100644 index 9dae277..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj +++ /dev/null @@ -1,412 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - true - - - Application - true - - - Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - EditAndContinue - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters deleted file mode 100644 index 177ea79..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {c1f6a2e3-5da5-4955-8653-310d3efe05a9} - cpp;c;cxx;def;odl;idl;hpj;bat - - - {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} - h;hpp;hxx;hm;inl;inc - - - {c274fe07-05f2-461c-964b-f6341e4e7eb5} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj b/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj deleted file mode 100644 index 8e38876..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +++ /dev/null @@ -1,310 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters deleted file mode 100644 index ac35c59..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {fa61a89f-93fc-4c89-b29e-36224b7592f4} - cpp;c;cxx;def;odl;idl;hpj;bat - - - {d4b85da0-2ba2-4934-b57f-e2584e3848ee} - h;hpp;hxx;hm;inl;inc - - - {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/zlib.rc b/third_party/zlib/contrib/vstudio/vc10/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj b/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj deleted file mode 100644 index c661517..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +++ /dev/null @@ -1,449 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters deleted file mode 100644 index d3762dc..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +++ /dev/null @@ -1,74 +0,0 @@ - - - - - {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibvc.def b/third_party/zlib/contrib/vstudio/vc10/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc10/zlibvc.sln deleted file mode 100644 index 649f40c..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibvc.sln +++ /dev/null @@ -1,135 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj b/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj deleted file mode 100644 index b46788a..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +++ /dev/null @@ -1,633 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapid - zlibwapi - zlibwapi - zlibwapid - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - true - .\zlibvc.def - true - true - Windows - false - - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - true - false - .\zlibvc.def - true - Windows - false - - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - true - false - .\zlibvc.def - true - Windows - false - - - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - true - .\zlibvc.def - true - true - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - true - false - .\zlibvc.def - true - Windows - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - true - false - .\zlibvc.def - true - Windows - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters deleted file mode 100644 index d0a5378..0000000 --- a/third_party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +++ /dev/null @@ -1,115 +0,0 @@ - - - - - {07934a85-8b61-443d-a0ee-b2eedb74f3cd} - cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 - - - {1d99675b-433d-4a21-9e50-ed4ab8b19762} - h;hpp;hxx;hm;inl;fi;fd - - - {431c0958-fa71-44d0-9084-2d19d100c0cc} - ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/miniunz.vcxproj b/third_party/zlib/contrib/vstudio/vc11/miniunz.vcxproj deleted file mode 100644 index 99be63d..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/miniunz.vcxproj +++ /dev/null @@ -1,314 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/minizip.vcxproj b/third_party/zlib/contrib/vstudio/vc11/minizip.vcxproj deleted file mode 100644 index d6e98f4..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/minizip.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/testzlib.vcxproj b/third_party/zlib/contrib/vstudio/vc11/testzlib.vcxproj deleted file mode 100644 index 1c6f26d..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/testzlib.vcxproj +++ /dev/null @@ -1,418 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - true - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - true - v110 - - - Application - true - v110 - - - Application - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj b/third_party/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj deleted file mode 100644 index 9d36336..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +++ /dev/null @@ -1,314 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/zlib.rc b/third_party/zlib/contrib/vstudio/vc11/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc11/zlibstat.vcxproj b/third_party/zlib/contrib/vstudio/vc11/zlibstat.vcxproj deleted file mode 100644 index 5890a17..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +++ /dev/null @@ -1,456 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - Unicode - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc11/zlibvc.def b/third_party/zlib/contrib/vstudio/vc11/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc11/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc11/zlibvc.sln deleted file mode 100644 index b7e3812..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/zlibvc.sln +++ /dev/null @@ -1,117 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc11/zlibvc.vcxproj b/third_party/zlib/contrib/vstudio/vc11/zlibvc.vcxproj deleted file mode 100644 index 4951b3b..0000000 --- a/third_party/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +++ /dev/null @@ -1,664 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - v110 - Unicode - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - true - v110 - - - DynamicLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/miniunz.vcxproj b/third_party/zlib/contrib/vstudio/vc12/miniunz.vcxproj deleted file mode 100644 index d88ac7f..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/miniunz.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/minizip.vcxproj b/third_party/zlib/contrib/vstudio/vc12/minizip.vcxproj deleted file mode 100644 index f1f239c..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/minizip.vcxproj +++ /dev/null @@ -1,313 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/testzlib.vcxproj b/third_party/zlib/contrib/vstudio/vc12/testzlib.vcxproj deleted file mode 100644 index 41303c0..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/testzlib.vcxproj +++ /dev/null @@ -1,422 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v120 - - - Application - MultiByte - true - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - true - v120 - - - Application - MultiByte - true - v120 - - - Application - MultiByte - v120 - - - Application - true - v120 - - - Application - true - v120 - - - Application - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - false - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj b/third_party/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj deleted file mode 100644 index c66573a..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v120 - - - Application - Unicode - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/zlib.rc b/third_party/zlib/contrib/vstudio/vc12/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc12/zlibstat.vcxproj b/third_party/zlib/contrib/vstudio/vc12/zlibstat.vcxproj deleted file mode 100644 index 6629d8e..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +++ /dev/null @@ -1,459 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - Unicode - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - StaticLibrary - false - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc12/zlibvc.def b/third_party/zlib/contrib/vstudio/vc12/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc12/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc12/zlibvc.sln deleted file mode 100644 index dcda229..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/zlibvc.sln +++ /dev/null @@ -1,119 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc12/zlibvc.vcxproj b/third_party/zlib/contrib/vstudio/vc12/zlibvc.vcxproj deleted file mode 100644 index 4e0de69..0000000 --- a/third_party/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +++ /dev/null @@ -1,668 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - Unicode - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - false - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/miniunz.vcxproj b/third_party/zlib/contrib/vstudio/vc14/miniunz.vcxproj deleted file mode 100644 index 9b5c075..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/miniunz.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/minizip.vcxproj b/third_party/zlib/contrib/vstudio/vc14/minizip.vcxproj deleted file mode 100644 index 968a410..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/minizip.vcxproj +++ /dev/null @@ -1,313 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/testzlib.vcxproj b/third_party/zlib/contrib/vstudio/vc14/testzlib.vcxproj deleted file mode 100644 index 5452049..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/testzlib.vcxproj +++ /dev/null @@ -1,422 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - v140 - - - Application - MultiByte - true - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - Application - true - v140 - - - Application - true - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - false - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj b/third_party/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj deleted file mode 100644 index d87474d..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - v140 - - - Application - Unicode - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/zlib.rc b/third_party/zlib/contrib/vstudio/vc14/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc14/zlibstat.vcxproj b/third_party/zlib/contrib/vstudio/vc14/zlibstat.vcxproj deleted file mode 100644 index 85c1e89..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +++ /dev/null @@ -1,459 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - Unicode - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - StaticLibrary - false - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc14/zlibvc.def b/third_party/zlib/contrib/vstudio/vc14/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc14/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc14/zlibvc.sln deleted file mode 100644 index 6f4a107..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/zlibvc.sln +++ /dev/null @@ -1,119 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc14/zlibvc.vcxproj b/third_party/zlib/contrib/vstudio/vc14/zlibvc.vcxproj deleted file mode 100644 index 424ff55..0000000 --- a/third_party/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +++ /dev/null @@ -1,668 +0,0 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - Unicode - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - true - v140 - - - DynamicLibrary - false - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - false - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/miniunz.vcxproj b/third_party/zlib/contrib/vstudio/vc17/miniunz.vcxproj deleted file mode 100644 index 68ef165..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/miniunz.vcxproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - 10.0 - - - - Application - MultiByte - v143 - - - Application - Unicode - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - true - true - false - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - false - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - arm64\MiniUnzip$(Configuration)\ - arm64\MiniUnzip$(Configuration)\Tmp\ - - - arm64\MiniUnzip$(Configuration)\ - arm64\MiniUnzip$(Configuration)\Tmp\ - - - arm\MiniUnzip$(Configuration)\ - arm\MiniUnzip$(Configuration)\Tmp\ - - - arm\MiniUnzip$(Configuration)\ - arm\MiniUnzip$(Configuration)\Tmp\ - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/minizip.vcxproj b/third_party/zlib/contrib/vstudio/vc17/minizip.vcxproj deleted file mode 100644 index dd3c52e..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/minizip.vcxproj +++ /dev/null @@ -1,405 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - 10.0 - - - - Application - MultiByte - v143 - - - Application - Unicode - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - true - true - false - false - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - arm64\MiniZip$(Configuration)\ - arm64\MiniZip$(Configuration)\Tmp\ - - - arm64\MiniZip$(Configuration)\ - arm64\MiniZip$(Configuration)\Tmp\ - - - arm\MiniZip$(Configuration)\ - arm\MiniZip$(Configuration)\Tmp\ - - - arm\MiniZip$(Configuration)\ - arm\MiniZip$(Configuration)\Tmp\ - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/testzlib.vcxproj b/third_party/zlib/contrib/vstudio/vc17/testzlib.vcxproj deleted file mode 100644 index 4cc99b3..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/testzlib.vcxproj +++ /dev/null @@ -1,473 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - ARM - - - ReleaseWithoutAsm - ARM64 - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - 10.0 - - - - Application - MultiByte - true - v143 - - - Application - MultiByte - true - v143 - - - Application - Unicode - v143 - - - Application - true - v143 - - - Application - true - v143 - - - Application - true - v143 - - - Application - true - v143 - - - Application - true - v143 - - - Application - true - v143 - - - Application - v143 - - - Application - v143 - - - Application - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - arm64\TestZlib$(Configuration)\ - arm64\TestZlib$(Configuration)\Tmp\ - - - arm64\TestZlib$(Configuration)\ - arm64\TestZlib$(Configuration)\Tmp\ - - - arm64\TestZlib$(Configuration)\ - arm64\TestZlib$(Configuration)\Tmp\ - - - arm\TestZlib$(Configuration)\ - arm\TestZlib$(Configuration)\Tmp\ - - - arm\TestZlib$(Configuration)\ - arm\TestZlib$(Configuration)\Tmp\ - - - arm\TestZlib$(Configuration)\ - arm\TestZlib$(Configuration)\Tmp\ - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - %(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - false - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj b/third_party/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj deleted file mode 100644 index 73bba55..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - 10.0 - - - - Application - MultiByte - v143 - - - Application - Unicode - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - Application - MultiByte - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - true - true - false - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - false - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - arm64\TestZlibDll$(Configuration)\ - arm64\TestZlibDll$(Configuration)\Tmp\ - - - arm64\TestZlibDll$(Configuration)\ - arm64\TestZlibDll$(Configuration)\Tmp\ - - - arm\TestZlibDll$(Configuration)\ - arm\TestZlibDll$(Configuration)\Tmp\ - - - arm\TestZlibDll$(Configuration)\ - arm\TestZlibDll$(Configuration)\Tmp\ - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - $(OutDir)testzlib.pdb - Console - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - MachineX64 - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlibdll.exe - true - Console - true - true - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/zlib.rc b/third_party/zlib/contrib/vstudio/vc17/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc17/zlibstat.vcxproj b/third_party/zlib/contrib/vstudio/vc17/zlibstat.vcxproj deleted file mode 100644 index b946ac2..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +++ /dev/null @@ -1,602 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - ARM - - - ReleaseWithoutAsm - ARM64 - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - 10.0 - - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - Unicode - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - StaticLibrary - false - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - arm64\ZlibStat$(Configuration)\ - arm64\ZlibStat$(Configuration)\Tmp\ - - - arm64\ZlibStat$(Configuration)\ - arm64\ZlibStat$(Configuration)\Tmp\ - - - arm64\ZlibStat$(Configuration)\ - arm64\ZlibStat$(Configuration)\Tmp\ - - - arm\ZlibStat$(Configuration)\ - arm\ZlibStat$(Configuration)\Tmp\ - - - arm\ZlibStat$(Configuration)\ - arm\ZlibStat$(Configuration)\Tmp\ - - - arm\ZlibStat$(Configuration)\ - arm\ZlibStat$(Configuration)\Tmp\ - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc17/zlibvc.def b/third_party/zlib/contrib/vstudio/vc17/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc17/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc17/zlibvc.sln deleted file mode 100644 index 67896b7..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/zlibvc.sln +++ /dev/null @@ -1,179 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33015.44 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|ARM = ReleaseWithoutAsm|ARM - ReleaseWithoutAsm|ARM64 = ReleaseWithoutAsm|ARM64 - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.ActiveCfg = Debug|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.Build.0 = Debug|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.Build.0 = Debug|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.ActiveCfg = Release|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.Build.0 = Release|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.ActiveCfg = Release|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.Build.0 = Release|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.ActiveCfg = Debug|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.Build.0 = Debug|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.Build.0 = Debug|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.ActiveCfg = Release|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.Build.0 = Release|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.ActiveCfg = Release|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.Build.0 = Release|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.ActiveCfg = Debug|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.Build.0 = Debug|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.Build.0 = Debug|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.ActiveCfg = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.Build.0 = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.ActiveCfg = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.Build.0 = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.ActiveCfg = Debug|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.Build.0 = Debug|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.Build.0 = Debug|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.ActiveCfg = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.Build.0 = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.ActiveCfg = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.Build.0 = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EAA58685-56D9-43F2-8703-FD2CB020745E} - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc17/zlibvc.vcxproj b/third_party/zlib/contrib/vstudio/vc17/zlibvc.vcxproj deleted file mode 100644 index 10a7a90..0000000 --- a/third_party/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +++ /dev/null @@ -1,875 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - ARM - - - ReleaseWithoutAsm - ARM64 - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - 10.0 - - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - v143 - Unicode - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - true - v143 - - - DynamicLibrary - false - v143 - - - DynamicLibrary - false - v143 - - - DynamicLibrary - false - v143 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - true - true - false - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - false - false - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - false - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - zlibwapi - - - arm64\ZlibDll$(Configuration)\ - arm64\ZlibDll$(Configuration)\Tmp\ - - - arm\ZlibDll$(Configuration)\ - arm\ZlibDll$(Configuration)\Tmp\ - - - arm64\ZlibDll$(Configuration)\ - arm64\ZlibDll$(Configuration)\Tmp\ - - - arm64\ZlibDll$(Configuration)\ - arm64\ZlibDll$(Configuration)\Tmp\ - - - arm\ZlibDll$(Configuration)\ - arm\ZlibDll$(Configuration)\Tmp\ - - - arm\ZlibDll$(Configuration)\ - arm\ZlibDll$(Configuration)\Tmp\ - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - false - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN32;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - %(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zlib/contrib/vstudio/vc9/miniunz.vcproj b/third_party/zlib/contrib/vstudio/vc9/miniunz.vcproj deleted file mode 100644 index 83bfbdd..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/miniunz.vcproj +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/vstudio/vc9/minizip.vcproj b/third_party/zlib/contrib/vstudio/vc9/minizip.vcproj deleted file mode 100644 index 5f4e9ee..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/minizip.vcproj +++ /dev/null @@ -1,562 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/vstudio/vc9/testzlib.vcproj b/third_party/zlib/contrib/vstudio/vc9/testzlib.vcproj deleted file mode 100644 index 9e0c37e..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/testzlib.vcproj +++ /dev/null @@ -1,796 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/vstudio/vc9/testzlibdll.vcproj b/third_party/zlib/contrib/vstudio/vc9/testzlibdll.vcproj deleted file mode 100644 index 8522f82..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/vstudio/vc9/zlib.rc b/third_party/zlib/contrib/vstudio/vc9/zlib.rc deleted file mode 100644 index a55f341..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 3, 1, 0 - PRODUCTVERSION 1, 3, 1, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.3.1\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/contrib/vstudio/vc9/zlibstat.vcproj b/third_party/zlib/contrib/vstudio/vc9/zlibstat.vcproj deleted file mode 100644 index df481e5..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/zlibstat.vcproj +++ /dev/null @@ -1,781 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/contrib/vstudio/vc9/zlibvc.def b/third_party/zlib/contrib/vstudio/vc9/zlibvc.def deleted file mode 100644 index 53947cc..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.3.1 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/third_party/zlib/contrib/vstudio/vc9/zlibvc.sln b/third_party/zlib/contrib/vstudio/vc9/zlibvc.sln deleted file mode 100644 index 75c64c3..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/zlibvc.sln +++ /dev/null @@ -1,144 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zlib/contrib/vstudio/vc9/zlibvc.vcproj b/third_party/zlib/contrib/vstudio/vc9/zlibvc.vcproj deleted file mode 100644 index 30a5091..0000000 --- a/third_party/zlib/contrib/vstudio/vc9/zlibvc.vcproj +++ /dev/null @@ -1,1100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/crc32.c b/third_party/zlib/crc32.c deleted file mode 100644 index 6c38f5c..0000000 --- a/third_party/zlib/crc32.c +++ /dev/null @@ -1,1049 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * This interleaved implementation of a CRC makes use of pipelined multiple - * arithmetic-logic units, commonly found in modern CPU cores. It is due to - * Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution. - */ - -/* @(#) $Id$ */ - -/* - Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore - protection on the static variables used to control the first-use generation - of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should - first call get_crc_table() to initialize the tables before allowing more than - one thread to use crc32(). - - MAKECRCH can be #defined to write out crc32.h. A main() routine is also - produced, so that this one source file can be compiled to an executable. - */ - -#ifdef MAKECRCH -# include -# ifndef DYNAMIC_CRC_TABLE -# define DYNAMIC_CRC_TABLE -# endif /* !DYNAMIC_CRC_TABLE */ -#endif /* MAKECRCH */ - -#include "zutil.h" /* for Z_U4, Z_U8, z_crc_t, and FAR definitions */ - - /* - A CRC of a message is computed on N braids of words in the message, where - each word consists of W bytes (4 or 8). If N is 3, for example, then three - running sparse CRCs are calculated respectively on each braid, at these - indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... - This is done starting at a word boundary, and continues until as many blocks - of N * W bytes as are available have been processed. The results are combined - into a single CRC at the end. For this code, N must be in the range 1..6 and - W must be 4 or 8. The upper limit on N can be increased if desired by adding - more #if blocks, extending the patterns apparent in the code. In addition, - crc32.h would need to be regenerated, if the maximum N value is increased. - - N and W are chosen empirically by benchmarking the execution time on a given - processor. The choices for N and W below were based on testing on Intel Kaby - Lake i7, AMD Ryzen 7, ARM Cortex-A57, Sparc64-VII, PowerPC POWER9, and MIPS64 - Octeon II processors. The Intel, AMD, and ARM processors were all fastest - with N=5, W=8. The Sparc, PowerPC, and MIPS64 were all fastest at N=5, W=4. - They were all tested with either gcc or clang, all using the -O3 optimization - level. Your mileage may vary. - */ - -/* Define N */ -#ifdef Z_TESTN -# define N Z_TESTN -#else -# define N 5 -#endif -#if N < 1 || N > 6 -# error N must be in 1..6 -#endif - -/* - z_crc_t must be at least 32 bits. z_word_t must be at least as long as - z_crc_t. It is assumed here that z_word_t is either 32 bits or 64 bits, and - that bytes are eight bits. - */ - -/* - Define W and the associated z_word_t type. If W is not defined, then a - braided calculation is not used, and the associated tables and code are not - compiled. - */ -#ifdef Z_TESTW -# if Z_TESTW-1 != -1 -# define W Z_TESTW -# endif -#else -# ifdef MAKECRCH -# define W 8 /* required for MAKECRCH */ -# else -# if defined(__x86_64__) || defined(__aarch64__) -# define W 8 -# else -# define W 4 -# endif -# endif -#endif -#ifdef W -# if W == 8 && defined(Z_U8) - typedef Z_U8 z_word_t; -# elif defined(Z_U4) -# undef W -# define W 4 - typedef Z_U4 z_word_t; -# else -# undef W -# endif -#endif - -/* If available, use the ARM processor CRC32 instruction. */ -#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 -# define ARMCRC32 -#endif - -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) -/* - Swap the bytes in a z_word_t to convert between little and big endian. Any - self-respecting compiler will optimize this to a single machine byte-swap - instruction, if one is available. This assumes that word_t is either 32 bits - or 64 bits. - */ -local z_word_t byte_swap(z_word_t word) { -# if W == 8 - return - (word & 0xff00000000000000) >> 56 | - (word & 0xff000000000000) >> 40 | - (word & 0xff0000000000) >> 24 | - (word & 0xff00000000) >> 8 | - (word & 0xff000000) << 8 | - (word & 0xff0000) << 24 | - (word & 0xff00) << 40 | - (word & 0xff) << 56; -# else /* W == 4 */ - return - (word & 0xff000000) >> 24 | - (word & 0xff0000) >> 8 | - (word & 0xff00) << 8 | - (word & 0xff) << 24; -# endif -} -#endif - -#ifdef DYNAMIC_CRC_TABLE -/* ========================================================================= - * Table of powers of x for combining CRC-32s, filled in by make_crc_table() - * below. - */ - local z_crc_t FAR x2n_table[32]; -#else -/* ========================================================================= - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers - * of x for combining CRC-32s, all made by make_crc_table(). - */ -# include "crc32.h" -#endif - -/* CRC polynomial. */ -#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ - -/* - Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, - reflected. For speed, this requires that a not be zero. - */ -local z_crc_t multmodp(z_crc_t a, z_crc_t b) { - z_crc_t m, p; - - m = (z_crc_t)1 << 31; - p = 0; - for (;;) { - if (a & m) { - p ^= b; - if ((a & (m - 1)) == 0) - break; - } - m >>= 1; - b = b & 1 ? (b >> 1) ^ POLY : b >> 1; - } - return p; -} - -/* - Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been - initialized. - */ -local z_crc_t x2nmodp(z_off64_t n, unsigned k) { - z_crc_t p; - - p = (z_crc_t)1 << 31; /* x^0 == 1 */ - while (n) { - if (n & 1) - p = multmodp(x2n_table[k & 31], p); - n >>= 1; - k++; - } - return p; -} - -#ifdef DYNAMIC_CRC_TABLE -/* ========================================================================= - * Build the tables for byte-wise and braided CRC-32 calculations, and a table - * of powers of x for combining CRC-32s. - */ -local z_crc_t FAR crc_table[256]; -#ifdef W - local z_word_t FAR crc_big_table[256]; - local z_crc_t FAR crc_braid_table[W][256]; - local z_word_t FAR crc_braid_big_table[W][256]; - local void braid(z_crc_t [][256], z_word_t [][256], int, int); -#endif -#ifdef MAKECRCH - local void write_table(FILE *, const z_crc_t FAR *, int); - local void write_table32hi(FILE *, const z_word_t FAR *, int); - local void write_table64(FILE *, const z_word_t FAR *, int); -#endif /* MAKECRCH */ - -/* - Define a once() function depending on the availability of atomics. If this is - compiled with DYNAMIC_CRC_TABLE defined, and if CRCs will be computed in - multiple threads, and if atomics are not available, then get_crc_table() must - be called to initialize the tables and must return before any threads are - allowed to compute or combine CRCs. - */ - -/* Definition of once functionality. */ -typedef struct once_s once_t; - -/* Check for the availability of atomics. */ -#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ - !defined(__STDC_NO_ATOMICS__) - -#include - -/* Structure for once(), which must be initialized with ONCE_INIT. */ -struct once_s { - atomic_flag begun; - atomic_int done; -}; -#define ONCE_INIT {ATOMIC_FLAG_INIT, 0} - -/* - Run the provided init() function exactly once, even if multiple threads - invoke once() at the same time. The state must be a once_t initialized with - ONCE_INIT. - */ -local void once(once_t *state, void (*init)(void)) { - if (!atomic_load(&state->done)) { - if (atomic_flag_test_and_set(&state->begun)) - while (!atomic_load(&state->done)) - ; - else { - init(); - atomic_store(&state->done, 1); - } - } -} - -#else /* no atomics */ - -/* Structure for once(), which must be initialized with ONCE_INIT. */ -struct once_s { - volatile int begun; - volatile int done; -}; -#define ONCE_INIT {0, 0} - -/* Test and set. Alas, not atomic, but tries to minimize the period of - vulnerability. */ -local int test_and_set(int volatile *flag) { - int was; - - was = *flag; - *flag = 1; - return was; -} - -/* Run the provided init() function once. This is not thread-safe. */ -local void once(once_t *state, void (*init)(void)) { - if (!state->done) { - if (test_and_set(&state->begun)) - while (!state->done) - ; - else { - init(); - state->done = 1; - } - } -} - -#endif - -/* State for once(). */ -local once_t made = ONCE_INIT; - -/* - Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x - (which is shifting right by one and adding x^32 mod p if the bit shifted out - is a one). We start with the highest power (least significant bit) of q and - repeat for all eight bits of q. - - The table is simply the CRC of all possible eight bit values. This is all the - information needed to generate CRCs on data a byte at a time for all - combinations of CRC register values and incoming bytes. - */ - -local void make_crc_table(void) { - unsigned i, j, n; - z_crc_t p; - - /* initialize the CRC of bytes tables */ - for (i = 0; i < 256; i++) { - p = i; - for (j = 0; j < 8; j++) - p = p & 1 ? (p >> 1) ^ POLY : p >> 1; - crc_table[i] = p; -#ifdef W - crc_big_table[i] = byte_swap(p); -#endif - } - - /* initialize the x^2^n mod p(x) table */ - p = (z_crc_t)1 << 30; /* x^1 */ - x2n_table[0] = p; - for (n = 1; n < 32; n++) - x2n_table[n] = p = multmodp(p, p); - -#ifdef W - /* initialize the braiding tables -- needs x2n_table[] */ - braid(crc_braid_table, crc_braid_big_table, N, W); -#endif - -#ifdef MAKECRCH - { - /* - The crc32.h header file contains tables for both 32-bit and 64-bit - z_word_t's, and so requires a 64-bit type be available. In that case, - z_word_t must be defined to be 64-bits. This code then also generates - and writes out the tables for the case that z_word_t is 32 bits. - */ -#if !defined(W) || W != 8 -# error Need a 64-bit integer type in order to generate crc32.h. -#endif - FILE *out; - int k, n; - z_crc_t ltl[8][256]; - z_word_t big[8][256]; - - out = fopen("crc32.h", "w"); - if (out == NULL) return; - - /* write out little-endian CRC table to crc32.h */ - fprintf(out, - "/* crc32.h -- tables for rapid CRC calculation\n" - " * Generated automatically by crc32.c\n */\n" - "\n" - "local const z_crc_t FAR crc_table[] = {\n" - " "); - write_table(out, crc_table, 256); - fprintf(out, - "};\n"); - - /* write out big-endian CRC table for 64-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#ifdef W\n" - "\n" - "#if W == 8\n" - "\n" - "local const z_word_t FAR crc_big_table[] = {\n" - " "); - write_table64(out, crc_big_table, 256); - fprintf(out, - "};\n"); - - /* write out big-endian CRC table for 32-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#else /* W == 4 */\n" - "\n" - "local const z_word_t FAR crc_big_table[] = {\n" - " "); - write_table32hi(out, crc_big_table, 256); - fprintf(out, - "};\n" - "\n" - "#endif\n"); - - /* write out braid tables for each value of N */ - for (n = 1; n <= 6; n++) { - fprintf(out, - "\n" - "#if N == %d\n", n); - - /* compute braid tables for this N and 64-bit word_t */ - braid(ltl, big, n, 8); - - /* write out braid tables for 64-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#if W == 8\n" - "\n" - "local const z_crc_t FAR crc_braid_table[][256] = {\n"); - for (k = 0; k < 8; k++) { - fprintf(out, " {"); - write_table(out, ltl[k], 256); - fprintf(out, "}%s", k < 7 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); - for (k = 0; k < 8; k++) { - fprintf(out, " {"); - write_table64(out, big[k], 256); - fprintf(out, "}%s", k < 7 ? ",\n" : ""); - } - fprintf(out, - "};\n"); - - /* compute braid tables for this N and 32-bit word_t */ - braid(ltl, big, n, 4); - - /* write out braid tables for 32-bit z_word_t to crc32.h */ - fprintf(out, - "\n" - "#else /* W == 4 */\n" - "\n" - "local const z_crc_t FAR crc_braid_table[][256] = {\n"); - for (k = 0; k < 4; k++) { - fprintf(out, " {"); - write_table(out, ltl[k], 256); - fprintf(out, "}%s", k < 3 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); - for (k = 0; k < 4; k++) { - fprintf(out, " {"); - write_table32hi(out, big[k], 256); - fprintf(out, "}%s", k < 3 ? ",\n" : ""); - } - fprintf(out, - "};\n" - "\n" - "#endif\n" - "\n" - "#endif\n"); - } - fprintf(out, - "\n" - "#endif\n"); - - /* write out zeros operator table to crc32.h */ - fprintf(out, - "\n" - "local const z_crc_t FAR x2n_table[] = {\n" - " "); - write_table(out, x2n_table, 32); - fprintf(out, - "};\n"); - fclose(out); - } -#endif /* MAKECRCH */ -} - -#ifdef MAKECRCH - -/* - Write the 32-bit values in table[0..k-1] to out, five per line in - hexadecimal separated by commas. - */ -local void write_table(FILE *out, const z_crc_t FAR *table, int k) { - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", - (unsigned long)(table[n]), - n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); -} - -/* - Write the high 32-bits of each value in table[0..k-1] to out, five per line - in hexadecimal separated by commas. - */ -local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) { - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", - (unsigned long)(table[n] >> 32), - n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); -} - -/* - Write the 64-bit values in table[0..k-1] to out, three per line in - hexadecimal separated by commas. This assumes that if there is a 64-bit - type, then there is also a long long integer type, and it is at least 64 - bits. If not, then the type cast and format string can be adjusted - accordingly. - */ -local void write_table64(FILE *out, const z_word_t FAR *table, int k) { - int n; - - for (n = 0; n < k; n++) - fprintf(out, "%s0x%016llx%s", n == 0 || n % 3 ? "" : " ", - (unsigned long long)(table[n]), - n == k - 1 ? "" : (n % 3 == 2 ? ",\n" : ", ")); -} - -/* Actually do the deed. */ -int main(void) { - make_crc_table(); - return 0; -} - -#endif /* MAKECRCH */ - -#ifdef W -/* - Generate the little and big-endian braid tables for the given n and z_word_t - size w. Each array must have room for w blocks of 256 elements. - */ -local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { - int k; - z_crc_t i, p, q; - for (k = 0; k < w; k++) { - p = x2nmodp((n * w + 3 - k) << 3, 0); - ltl[k][0] = 0; - big[w - 1 - k][0] = 0; - for (i = 1; i < 256; i++) { - ltl[k][i] = q = multmodp(i << 24, p); - big[w - 1 - k][i] = byte_swap(q); - } - } -} -#endif - -#endif /* DYNAMIC_CRC_TABLE */ - -/* ========================================================================= - * This function can be used by asm versions of crc32(), and to force the - * generation of the CRC tables in a threaded application. - */ -const z_crc_t FAR * ZEXPORT get_crc_table(void) { -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return (const z_crc_t FAR *)crc_table; -} - -/* ========================================================================= - * Use ARM machine instructions if available. This will compute the CRC about - * ten times faster than the braided calculation. This code does not check for - * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will - * only be defined if the compilation specifies an ARM processor architecture - * that has the instructions. For example, compiling with -march=armv8.1-a or - * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 - * instructions. - */ -#ifdef ARMCRC32 - -/* - Constants empirically determined to maximize speed. These values are from - measurements on a Cortex-A57. Your mileage may vary. - */ -#define Z_BATCH 3990 /* number of words in a batch */ -#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ -#define Z_BATCH_MIN 800 /* fewest words in a final batch */ - -unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, - z_size_t len) { - z_crc_t val; - z_word_t crc1, crc2; - const z_word_t *word; - z_word_t val0, val1, val2; - z_size_t last, last2, i; - z_size_t num; - - /* Return initial CRC, if requested. */ - if (buf == Z_NULL) return 0; - -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - - /* Pre-condition the CRC */ - crc = (~crc) & 0xffffffff; - - /* Compute the CRC up to a word boundary. */ - while (len && ((z_size_t)buf & 7) != 0) { - len--; - val = *buf++; - __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); - } - - /* Prepare to compute the CRC on full 64-bit words word[0..num-1]. */ - word = (z_word_t const *)buf; - num = len >> 3; - len &= 7; - - /* Do three interleaved CRCs to realize the throughput of one crc32x - instruction per cycle. Each CRC is calculated on Z_BATCH words. The - three CRCs are combined into a single CRC after each set of batches. */ - while (num >= 3 * Z_BATCH) { - crc1 = 0; - crc2 = 0; - for (i = 0; i < Z_BATCH; i++) { - val0 = word[i]; - val1 = word[i + Z_BATCH]; - val2 = word[i + 2 * Z_BATCH]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); - } - word += 3 * Z_BATCH; - num -= 3 * Z_BATCH; - crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1; - crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2; - } - - /* Do one last smaller batch with the remaining words, if there are enough - to pay for the combination of CRCs. */ - last = num / 3; - if (last >= Z_BATCH_MIN) { - last2 = last << 1; - crc1 = 0; - crc2 = 0; - for (i = 0; i < last; i++) { - val0 = word[i]; - val1 = word[i + last]; - val2 = word[i + last2]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); - } - word += 3 * last; - num -= 3 * last; - val = x2nmodp(last, 6); - crc = multmodp(val, crc) ^ crc1; - crc = multmodp(val, crc) ^ crc2; - } - - /* Compute the CRC on any remaining words. */ - for (i = 0; i < num; i++) { - val0 = word[i]; - __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); - } - word += num; - - /* Complete the CRC on any remaining bytes. */ - buf = (const unsigned char FAR *)word; - while (len) { - len--; - val = *buf++; - __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); - } - - /* Return the CRC, post-conditioned. */ - return crc ^ 0xffffffff; -} - -#else - -#ifdef W - -/* - Return the CRC of the W bytes in the word_t data, taking the - least-significant byte of the word as the first byte of data, without any pre - or post conditioning. This is used to combine the CRCs of each braid. - */ -local z_crc_t crc_word(z_word_t data) { - int k; - for (k = 0; k < W; k++) - data = (data >> 8) ^ crc_table[data & 0xff]; - return (z_crc_t)data; -} - -local z_word_t crc_word_big(z_word_t data) { - int k; - for (k = 0; k < W; k++) - data = (data << 8) ^ - crc_big_table[(data >> ((W - 1) << 3)) & 0xff]; - return data; -} - -#endif - -/* ========================================================================= */ -unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, - z_size_t len) { - /* Return initial CRC, if requested. */ - if (buf == Z_NULL) return 0; - -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - - /* Pre-condition the CRC */ - crc = (~crc) & 0xffffffff; - -#ifdef W - - /* If provided enough bytes, do a braided CRC calculation. */ - if (len >= N * W + W - 1) { - z_size_t blks; - z_word_t const *words; - unsigned endian; - int k; - - /* Compute the CRC up to a z_word_t boundary. */ - while (len && ((z_size_t)buf & (W - 1)) != 0) { - len--; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - - /* Compute the CRC on as many N z_word_t blocks as are available. */ - blks = len / (N * W); - len -= blks * N * W; - words = (z_word_t const *)buf; - - /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianness at execution time. If the - compiler knows what the endianness will be, it can optimize out the - check and the unused branch. */ - endian = 1; - if (*(unsigned char *)&endian) { - /* Little endian. */ - - z_crc_t crc0; - z_word_t word0; -#if N > 1 - z_crc_t crc1; - z_word_t word1; -#if N > 2 - z_crc_t crc2; - z_word_t word2; -#if N > 3 - z_crc_t crc3; - z_word_t word3; -#if N > 4 - z_crc_t crc4; - z_word_t word4; -#if N > 5 - z_crc_t crc5; - z_word_t word5; -#endif -#endif -#endif -#endif -#endif - - /* Initialize the CRC for each braid. */ - crc0 = crc; -#if N > 1 - crc1 = 0; -#if N > 2 - crc2 = 0; -#if N > 3 - crc3 = 0; -#if N > 4 - crc4 = 0; -#if N > 5 - crc5 = 0; -#endif -#endif -#endif -#endif -#endif - - /* - Process the first blks-1 blocks, computing the CRCs on each braid - independently. - */ - while (--blks) { - /* Load the word for each braid into registers. */ - word0 = crc0 ^ words[0]; -#if N > 1 - word1 = crc1 ^ words[1]; -#if N > 2 - word2 = crc2 ^ words[2]; -#if N > 3 - word3 = crc3 ^ words[3]; -#if N > 4 - word4 = crc4 ^ words[4]; -#if N > 5 - word5 = crc5 ^ words[5]; -#endif -#endif -#endif -#endif -#endif - words += N; - - /* Compute and update the CRC for each word. The loop should - get unrolled. */ - crc0 = crc_braid_table[0][word0 & 0xff]; -#if N > 1 - crc1 = crc_braid_table[0][word1 & 0xff]; -#if N > 2 - crc2 = crc_braid_table[0][word2 & 0xff]; -#if N > 3 - crc3 = crc_braid_table[0][word3 & 0xff]; -#if N > 4 - crc4 = crc_braid_table[0][word4 & 0xff]; -#if N > 5 - crc5 = crc_braid_table[0][word5 & 0xff]; -#endif -#endif -#endif -#endif -#endif - for (k = 1; k < W; k++) { - crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff]; -#if N > 1 - crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff]; -#if N > 2 - crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff]; -#if N > 3 - crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff]; -#if N > 4 - crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff]; -#if N > 5 - crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff]; -#endif -#endif -#endif -#endif -#endif - } - } - - /* - Process the last block, combining the CRCs of the N braids at the - same time. - */ - crc = crc_word(crc0 ^ words[0]); -#if N > 1 - crc = crc_word(crc1 ^ words[1] ^ crc); -#if N > 2 - crc = crc_word(crc2 ^ words[2] ^ crc); -#if N > 3 - crc = crc_word(crc3 ^ words[3] ^ crc); -#if N > 4 - crc = crc_word(crc4 ^ words[4] ^ crc); -#if N > 5 - crc = crc_word(crc5 ^ words[5] ^ crc); -#endif -#endif -#endif -#endif -#endif - words += N; - } - else { - /* Big endian. */ - - z_word_t crc0, word0, comb; -#if N > 1 - z_word_t crc1, word1; -#if N > 2 - z_word_t crc2, word2; -#if N > 3 - z_word_t crc3, word3; -#if N > 4 - z_word_t crc4, word4; -#if N > 5 - z_word_t crc5, word5; -#endif -#endif -#endif -#endif -#endif - - /* Initialize the CRC for each braid. */ - crc0 = byte_swap(crc); -#if N > 1 - crc1 = 0; -#if N > 2 - crc2 = 0; -#if N > 3 - crc3 = 0; -#if N > 4 - crc4 = 0; -#if N > 5 - crc5 = 0; -#endif -#endif -#endif -#endif -#endif - - /* - Process the first blks-1 blocks, computing the CRCs on each braid - independently. - */ - while (--blks) { - /* Load the word for each braid into registers. */ - word0 = crc0 ^ words[0]; -#if N > 1 - word1 = crc1 ^ words[1]; -#if N > 2 - word2 = crc2 ^ words[2]; -#if N > 3 - word3 = crc3 ^ words[3]; -#if N > 4 - word4 = crc4 ^ words[4]; -#if N > 5 - word5 = crc5 ^ words[5]; -#endif -#endif -#endif -#endif -#endif - words += N; - - /* Compute and update the CRC for each word. The loop should - get unrolled. */ - crc0 = crc_braid_big_table[0][word0 & 0xff]; -#if N > 1 - crc1 = crc_braid_big_table[0][word1 & 0xff]; -#if N > 2 - crc2 = crc_braid_big_table[0][word2 & 0xff]; -#if N > 3 - crc3 = crc_braid_big_table[0][word3 & 0xff]; -#if N > 4 - crc4 = crc_braid_big_table[0][word4 & 0xff]; -#if N > 5 - crc5 = crc_braid_big_table[0][word5 & 0xff]; -#endif -#endif -#endif -#endif -#endif - for (k = 1; k < W; k++) { - crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff]; -#if N > 1 - crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff]; -#if N > 2 - crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff]; -#if N > 3 - crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff]; -#if N > 4 - crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff]; -#if N > 5 - crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff]; -#endif -#endif -#endif -#endif -#endif - } - } - - /* - Process the last block, combining the CRCs of the N braids at the - same time. - */ - comb = crc_word_big(crc0 ^ words[0]); -#if N > 1 - comb = crc_word_big(crc1 ^ words[1] ^ comb); -#if N > 2 - comb = crc_word_big(crc2 ^ words[2] ^ comb); -#if N > 3 - comb = crc_word_big(crc3 ^ words[3] ^ comb); -#if N > 4 - comb = crc_word_big(crc4 ^ words[4] ^ comb); -#if N > 5 - comb = crc_word_big(crc5 ^ words[5] ^ comb); -#endif -#endif -#endif -#endif -#endif - words += N; - crc = byte_swap(comb); - } - - /* - Update the pointer to the remaining bytes to process. - */ - buf = (unsigned char const *)words; - } - -#endif /* W */ - - /* Complete the computation of the CRC on any remaining bytes. */ - while (len >= 8) { - len -= 8; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - while (len) { - len--; - crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; - } - - /* Return the CRC, post-conditioned. */ - return crc ^ 0xffffffff; -} - -#endif - -/* ========================================================================= */ -unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, - uInt len) { - return crc32_z(crc, buf, len); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) { - return crc32_combine64(crc1, crc2, (z_off64_t)len2); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) { -#ifdef DYNAMIC_CRC_TABLE - once(&made, make_crc_table); -#endif /* DYNAMIC_CRC_TABLE */ - return x2nmodp(len2, 3); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen(z_off_t len2) { - return crc32_combine_gen64((z_off64_t)len2); -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { - return multmodp(op, crc1) ^ (crc2 & 0xffffffff); -} diff --git a/third_party/zlib/crc32.h b/third_party/zlib/crc32.h deleted file mode 100644 index f2ce9ae..0000000 --- a/third_party/zlib/crc32.h +++ /dev/null @@ -1,9447 +0,0 @@ -/* crc32.h -- tables for rapid CRC calculation - * Generated automatically by crc32.c - */ - -local const z_crc_t FAR crc_table[] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}; - -#ifdef W - -#if W == 8 - -local const z_word_t FAR crc_big_table[] = { - 0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, - 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, - 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, - 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, - 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, - 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, - 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, - 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, - 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, - 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, - 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, - 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, - 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, - 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, - 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, - 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, - 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, - 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, - 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, - 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, - 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, - 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, - 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, - 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, - 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, - 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, - 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, - 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, - 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, - 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, - 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, - 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, - 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, - 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, - 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, - 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, - 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, - 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, - 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, - 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, - 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, - 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, - 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, - 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, - 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, - 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, - 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, - 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, - 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, - 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, - 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, - 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, - 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, - 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, - 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, - 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, - 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, - 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, - 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, - 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, - 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, - 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, - 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, - 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, - 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, - 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, - 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, - 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, - 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, - 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, - 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, - 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, - 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, - 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, - 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, - 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, - 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, - 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, - 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, - 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, - 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, - 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, - 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, - 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, - 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, - 0x8def022d00000000}; - -#else /* W == 4 */ - -local const z_word_t FAR crc_big_table[] = { - 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, - 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, - 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, - 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, - 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, - 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, - 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, - 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, - 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, - 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, - 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, - 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, - 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, - 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, - 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, - 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, - 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, - 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, - 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, - 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, - 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, - 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, - 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, - 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, - 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, - 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, - 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, - 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, - 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, - 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, - 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, - 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, - 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, - 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, - 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, - 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, - 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, - 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, - 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, - 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, - 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, - 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, - 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, - 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, - 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, - 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, - 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, - 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, - 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, - 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, - 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, - 0x8def022d}; - -#endif - -#if N == 1 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, - 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, - 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, - 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, - 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, - 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, - 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, - 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, - 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, - 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, - 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, - 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, - 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, - 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, - 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, - 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, - 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, - 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, - 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, - 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, - 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, - 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, - 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, - 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, - 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, - 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, - 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, - 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, - 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, - 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, - 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, - 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, - 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, - 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, - 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, - 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, - 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, - 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, - 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, - 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, - 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, - 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, - 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, - 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, - 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, - 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, - 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, - 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, - 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, - 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, - 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, - 0x264b06e6}, - {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, - 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, - 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, - 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, - 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, - 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, - 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, - 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, - 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, - 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, - 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, - 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, - 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, - 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, - 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, - 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, - 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, - 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, - 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, - 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, - 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, - 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, - 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, - 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, - 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, - 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, - 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, - 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, - 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, - 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, - 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, - 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, - 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, - 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, - 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, - 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, - 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, - 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, - 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, - 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, - 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, - 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, - 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, - 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, - 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, - 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, - 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, - 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, - 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, - 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, - 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, - 0x92364a30}, - {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, - 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, - 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, - 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, - 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, - 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, - 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, - 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, - 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, - 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, - 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, - 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, - 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, - 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, - 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, - 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, - 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, - 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, - 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, - 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, - 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, - 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, - 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, - 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, - 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, - 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, - 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, - 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, - 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, - 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, - 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, - 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, - 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, - 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, - 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, - 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, - 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, - 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, - 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, - 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, - 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, - 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, - 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, - 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, - 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, - 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, - 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, - 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, - 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, - 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, - 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, - 0xe4c4abcc}, - {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, - 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, - 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, - 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, - 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, - 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, - 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, - 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, - 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, - 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, - 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, - 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, - 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, - 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, - 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, - 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, - 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, - 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, - 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, - 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, - 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, - 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, - 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, - 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, - 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, - 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, - 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, - 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, - 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, - 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, - 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, - 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, - 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, - 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, - 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, - 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, - 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, - 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, - 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, - 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, - 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, - 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, - 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, - 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, - 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, - 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, - 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, - 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, - 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, - 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, - 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, - 0xca64c78c}, - {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, - 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, - 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, - 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, - 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, - 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, - 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, - 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, - 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, - 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, - 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, - 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, - 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, - 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, - 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, - 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, - 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, - 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, - 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, - 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, - 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, - 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, - 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, - 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, - 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, - 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, - 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, - 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, - 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, - 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, - 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, - 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, - 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, - 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, - 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, - 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, - 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, - 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, - 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, - 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, - 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, - 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, - 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, - 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, - 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, - 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, - 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, - 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, - 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, - 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, - 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, - 0xde0506f1}, - {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, - 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, - 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, - 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, - 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, - 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, - 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, - 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, - 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, - 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, - 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, - 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, - 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, - 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, - 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, - 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, - 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, - 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, - 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, - 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, - 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, - 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, - 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, - 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, - 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, - 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, - 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, - 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, - 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, - 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, - 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, - 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, - 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, - 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, - 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, - 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, - 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, - 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, - 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, - 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, - 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, - 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, - 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, - 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, - 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, - 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, - 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, - 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, - 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, - 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, - 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, - 0xbe9834ed}, - {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, - 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, - 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, - 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, - 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, - 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, - 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, - 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, - 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, - 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, - 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, - 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, - 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, - 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, - 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, - 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, - 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, - 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, - 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, - 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, - 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, - 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, - 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, - 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, - 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, - 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, - 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, - 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, - 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, - 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, - 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, - 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, - 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, - 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, - 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, - 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, - 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, - 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, - 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, - 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, - 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, - 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, - 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, - 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, - 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, - 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, - 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, - 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, - 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, - 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, - 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, - 0x9324fd72}, - {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, - 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, - 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, - 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, - 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, - 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, - 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, - 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, - 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, - 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, - 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, - 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, - 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, - 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, - 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, - 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, - 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, - 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, - 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, - 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, - 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, - 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, - 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, - 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, - 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, - 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, - 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, - 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, - 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, - 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, - 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, - 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, - 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, - 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, - 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, - 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, - 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, - 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, - 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, - 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, - 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, - 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, - 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, - 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, - 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, - 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, - 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, - 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, - 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, - 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, - 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, - 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, - 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, - 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, - 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, - 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, - 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, - 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, - 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, - 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, - 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, - 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, - 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, - 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, - 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, - 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, - 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, - 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, - 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, - 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, - 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, - 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, - 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, - 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, - 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, - 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, - 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, - 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, - 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, - 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, - 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, - 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, - 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, - 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, - 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, - 0x8def022d00000000}, - {0x0000000000000000, 0x41311b1900000000, 0x8262363200000000, - 0xc3532d2b00000000, 0x04c56c6400000000, 0x45f4777d00000000, - 0x86a75a5600000000, 0xc796414f00000000, 0x088ad9c800000000, - 0x49bbc2d100000000, 0x8ae8effa00000000, 0xcbd9f4e300000000, - 0x0c4fb5ac00000000, 0x4d7eaeb500000000, 0x8e2d839e00000000, - 0xcf1c988700000000, 0x5112c24a00000000, 0x1023d95300000000, - 0xd370f47800000000, 0x9241ef6100000000, 0x55d7ae2e00000000, - 0x14e6b53700000000, 0xd7b5981c00000000, 0x9684830500000000, - 0x59981b8200000000, 0x18a9009b00000000, 0xdbfa2db000000000, - 0x9acb36a900000000, 0x5d5d77e600000000, 0x1c6c6cff00000000, - 0xdf3f41d400000000, 0x9e0e5acd00000000, 0xa224849500000000, - 0xe3159f8c00000000, 0x2046b2a700000000, 0x6177a9be00000000, - 0xa6e1e8f100000000, 0xe7d0f3e800000000, 0x2483dec300000000, - 0x65b2c5da00000000, 0xaaae5d5d00000000, 0xeb9f464400000000, - 0x28cc6b6f00000000, 0x69fd707600000000, 0xae6b313900000000, - 0xef5a2a2000000000, 0x2c09070b00000000, 0x6d381c1200000000, - 0xf33646df00000000, 0xb2075dc600000000, 0x715470ed00000000, - 0x30656bf400000000, 0xf7f32abb00000000, 0xb6c231a200000000, - 0x75911c8900000000, 0x34a0079000000000, 0xfbbc9f1700000000, - 0xba8d840e00000000, 0x79dea92500000000, 0x38efb23c00000000, - 0xff79f37300000000, 0xbe48e86a00000000, 0x7d1bc54100000000, - 0x3c2ade5800000000, 0x054f79f000000000, 0x447e62e900000000, - 0x872d4fc200000000, 0xc61c54db00000000, 0x018a159400000000, - 0x40bb0e8d00000000, 0x83e823a600000000, 0xc2d938bf00000000, - 0x0dc5a03800000000, 0x4cf4bb2100000000, 0x8fa7960a00000000, - 0xce968d1300000000, 0x0900cc5c00000000, 0x4831d74500000000, - 0x8b62fa6e00000000, 0xca53e17700000000, 0x545dbbba00000000, - 0x156ca0a300000000, 0xd63f8d8800000000, 0x970e969100000000, - 0x5098d7de00000000, 0x11a9ccc700000000, 0xd2fae1ec00000000, - 0x93cbfaf500000000, 0x5cd7627200000000, 0x1de6796b00000000, - 0xdeb5544000000000, 0x9f844f5900000000, 0x58120e1600000000, - 0x1923150f00000000, 0xda70382400000000, 0x9b41233d00000000, - 0xa76bfd6500000000, 0xe65ae67c00000000, 0x2509cb5700000000, - 0x6438d04e00000000, 0xa3ae910100000000, 0xe29f8a1800000000, - 0x21cca73300000000, 0x60fdbc2a00000000, 0xafe124ad00000000, - 0xeed03fb400000000, 0x2d83129f00000000, 0x6cb2098600000000, - 0xab2448c900000000, 0xea1553d000000000, 0x29467efb00000000, - 0x687765e200000000, 0xf6793f2f00000000, 0xb748243600000000, - 0x741b091d00000000, 0x352a120400000000, 0xf2bc534b00000000, - 0xb38d485200000000, 0x70de657900000000, 0x31ef7e6000000000, - 0xfef3e6e700000000, 0xbfc2fdfe00000000, 0x7c91d0d500000000, - 0x3da0cbcc00000000, 0xfa368a8300000000, 0xbb07919a00000000, - 0x7854bcb100000000, 0x3965a7a800000000, 0x4b98833b00000000, - 0x0aa9982200000000, 0xc9fab50900000000, 0x88cbae1000000000, - 0x4f5def5f00000000, 0x0e6cf44600000000, 0xcd3fd96d00000000, - 0x8c0ec27400000000, 0x43125af300000000, 0x022341ea00000000, - 0xc1706cc100000000, 0x804177d800000000, 0x47d7369700000000, - 0x06e62d8e00000000, 0xc5b500a500000000, 0x84841bbc00000000, - 0x1a8a417100000000, 0x5bbb5a6800000000, 0x98e8774300000000, - 0xd9d96c5a00000000, 0x1e4f2d1500000000, 0x5f7e360c00000000, - 0x9c2d1b2700000000, 0xdd1c003e00000000, 0x120098b900000000, - 0x533183a000000000, 0x9062ae8b00000000, 0xd153b59200000000, - 0x16c5f4dd00000000, 0x57f4efc400000000, 0x94a7c2ef00000000, - 0xd596d9f600000000, 0xe9bc07ae00000000, 0xa88d1cb700000000, - 0x6bde319c00000000, 0x2aef2a8500000000, 0xed796bca00000000, - 0xac4870d300000000, 0x6f1b5df800000000, 0x2e2a46e100000000, - 0xe136de6600000000, 0xa007c57f00000000, 0x6354e85400000000, - 0x2265f34d00000000, 0xe5f3b20200000000, 0xa4c2a91b00000000, - 0x6791843000000000, 0x26a09f2900000000, 0xb8aec5e400000000, - 0xf99fdefd00000000, 0x3accf3d600000000, 0x7bfde8cf00000000, - 0xbc6ba98000000000, 0xfd5ab29900000000, 0x3e099fb200000000, - 0x7f3884ab00000000, 0xb0241c2c00000000, 0xf115073500000000, - 0x32462a1e00000000, 0x7377310700000000, 0xb4e1704800000000, - 0xf5d06b5100000000, 0x3683467a00000000, 0x77b25d6300000000, - 0x4ed7facb00000000, 0x0fe6e1d200000000, 0xccb5ccf900000000, - 0x8d84d7e000000000, 0x4a1296af00000000, 0x0b238db600000000, - 0xc870a09d00000000, 0x8941bb8400000000, 0x465d230300000000, - 0x076c381a00000000, 0xc43f153100000000, 0x850e0e2800000000, - 0x42984f6700000000, 0x03a9547e00000000, 0xc0fa795500000000, - 0x81cb624c00000000, 0x1fc5388100000000, 0x5ef4239800000000, - 0x9da70eb300000000, 0xdc9615aa00000000, 0x1b0054e500000000, - 0x5a314ffc00000000, 0x996262d700000000, 0xd85379ce00000000, - 0x174fe14900000000, 0x567efa5000000000, 0x952dd77b00000000, - 0xd41ccc6200000000, 0x138a8d2d00000000, 0x52bb963400000000, - 0x91e8bb1f00000000, 0xd0d9a00600000000, 0xecf37e5e00000000, - 0xadc2654700000000, 0x6e91486c00000000, 0x2fa0537500000000, - 0xe836123a00000000, 0xa907092300000000, 0x6a54240800000000, - 0x2b653f1100000000, 0xe479a79600000000, 0xa548bc8f00000000, - 0x661b91a400000000, 0x272a8abd00000000, 0xe0bccbf200000000, - 0xa18dd0eb00000000, 0x62defdc000000000, 0x23efe6d900000000, - 0xbde1bc1400000000, 0xfcd0a70d00000000, 0x3f838a2600000000, - 0x7eb2913f00000000, 0xb924d07000000000, 0xf815cb6900000000, - 0x3b46e64200000000, 0x7a77fd5b00000000, 0xb56b65dc00000000, - 0xf45a7ec500000000, 0x370953ee00000000, 0x763848f700000000, - 0xb1ae09b800000000, 0xf09f12a100000000, 0x33cc3f8a00000000, - 0x72fd249300000000}, - {0x0000000000000000, 0x376ac20100000000, 0x6ed4840300000000, - 0x59be460200000000, 0xdca8090700000000, 0xebc2cb0600000000, - 0xb27c8d0400000000, 0x85164f0500000000, 0xb851130e00000000, - 0x8f3bd10f00000000, 0xd685970d00000000, 0xe1ef550c00000000, - 0x64f91a0900000000, 0x5393d80800000000, 0x0a2d9e0a00000000, - 0x3d475c0b00000000, 0x70a3261c00000000, 0x47c9e41d00000000, - 0x1e77a21f00000000, 0x291d601e00000000, 0xac0b2f1b00000000, - 0x9b61ed1a00000000, 0xc2dfab1800000000, 0xf5b5691900000000, - 0xc8f2351200000000, 0xff98f71300000000, 0xa626b11100000000, - 0x914c731000000000, 0x145a3c1500000000, 0x2330fe1400000000, - 0x7a8eb81600000000, 0x4de47a1700000000, 0xe0464d3800000000, - 0xd72c8f3900000000, 0x8e92c93b00000000, 0xb9f80b3a00000000, - 0x3cee443f00000000, 0x0b84863e00000000, 0x523ac03c00000000, - 0x6550023d00000000, 0x58175e3600000000, 0x6f7d9c3700000000, - 0x36c3da3500000000, 0x01a9183400000000, 0x84bf573100000000, - 0xb3d5953000000000, 0xea6bd33200000000, 0xdd01113300000000, - 0x90e56b2400000000, 0xa78fa92500000000, 0xfe31ef2700000000, - 0xc95b2d2600000000, 0x4c4d622300000000, 0x7b27a02200000000, - 0x2299e62000000000, 0x15f3242100000000, 0x28b4782a00000000, - 0x1fdeba2b00000000, 0x4660fc2900000000, 0x710a3e2800000000, - 0xf41c712d00000000, 0xc376b32c00000000, 0x9ac8f52e00000000, - 0xada2372f00000000, 0xc08d9a7000000000, 0xf7e7587100000000, - 0xae591e7300000000, 0x9933dc7200000000, 0x1c25937700000000, - 0x2b4f517600000000, 0x72f1177400000000, 0x459bd57500000000, - 0x78dc897e00000000, 0x4fb64b7f00000000, 0x16080d7d00000000, - 0x2162cf7c00000000, 0xa474807900000000, 0x931e427800000000, - 0xcaa0047a00000000, 0xfdcac67b00000000, 0xb02ebc6c00000000, - 0x87447e6d00000000, 0xdefa386f00000000, 0xe990fa6e00000000, - 0x6c86b56b00000000, 0x5bec776a00000000, 0x0252316800000000, - 0x3538f36900000000, 0x087faf6200000000, 0x3f156d6300000000, - 0x66ab2b6100000000, 0x51c1e96000000000, 0xd4d7a66500000000, - 0xe3bd646400000000, 0xba03226600000000, 0x8d69e06700000000, - 0x20cbd74800000000, 0x17a1154900000000, 0x4e1f534b00000000, - 0x7975914a00000000, 0xfc63de4f00000000, 0xcb091c4e00000000, - 0x92b75a4c00000000, 0xa5dd984d00000000, 0x989ac44600000000, - 0xaff0064700000000, 0xf64e404500000000, 0xc124824400000000, - 0x4432cd4100000000, 0x73580f4000000000, 0x2ae6494200000000, - 0x1d8c8b4300000000, 0x5068f15400000000, 0x6702335500000000, - 0x3ebc755700000000, 0x09d6b75600000000, 0x8cc0f85300000000, - 0xbbaa3a5200000000, 0xe2147c5000000000, 0xd57ebe5100000000, - 0xe839e25a00000000, 0xdf53205b00000000, 0x86ed665900000000, - 0xb187a45800000000, 0x3491eb5d00000000, 0x03fb295c00000000, - 0x5a456f5e00000000, 0x6d2fad5f00000000, 0x801b35e100000000, - 0xb771f7e000000000, 0xeecfb1e200000000, 0xd9a573e300000000, - 0x5cb33ce600000000, 0x6bd9fee700000000, 0x3267b8e500000000, - 0x050d7ae400000000, 0x384a26ef00000000, 0x0f20e4ee00000000, - 0x569ea2ec00000000, 0x61f460ed00000000, 0xe4e22fe800000000, - 0xd388ede900000000, 0x8a36abeb00000000, 0xbd5c69ea00000000, - 0xf0b813fd00000000, 0xc7d2d1fc00000000, 0x9e6c97fe00000000, - 0xa90655ff00000000, 0x2c101afa00000000, 0x1b7ad8fb00000000, - 0x42c49ef900000000, 0x75ae5cf800000000, 0x48e900f300000000, - 0x7f83c2f200000000, 0x263d84f000000000, 0x115746f100000000, - 0x944109f400000000, 0xa32bcbf500000000, 0xfa958df700000000, - 0xcdff4ff600000000, 0x605d78d900000000, 0x5737bad800000000, - 0x0e89fcda00000000, 0x39e33edb00000000, 0xbcf571de00000000, - 0x8b9fb3df00000000, 0xd221f5dd00000000, 0xe54b37dc00000000, - 0xd80c6bd700000000, 0xef66a9d600000000, 0xb6d8efd400000000, - 0x81b22dd500000000, 0x04a462d000000000, 0x33cea0d100000000, - 0x6a70e6d300000000, 0x5d1a24d200000000, 0x10fe5ec500000000, - 0x27949cc400000000, 0x7e2adac600000000, 0x494018c700000000, - 0xcc5657c200000000, 0xfb3c95c300000000, 0xa282d3c100000000, - 0x95e811c000000000, 0xa8af4dcb00000000, 0x9fc58fca00000000, - 0xc67bc9c800000000, 0xf1110bc900000000, 0x740744cc00000000, - 0x436d86cd00000000, 0x1ad3c0cf00000000, 0x2db902ce00000000, - 0x4096af9100000000, 0x77fc6d9000000000, 0x2e422b9200000000, - 0x1928e99300000000, 0x9c3ea69600000000, 0xab54649700000000, - 0xf2ea229500000000, 0xc580e09400000000, 0xf8c7bc9f00000000, - 0xcfad7e9e00000000, 0x9613389c00000000, 0xa179fa9d00000000, - 0x246fb59800000000, 0x1305779900000000, 0x4abb319b00000000, - 0x7dd1f39a00000000, 0x3035898d00000000, 0x075f4b8c00000000, - 0x5ee10d8e00000000, 0x698bcf8f00000000, 0xec9d808a00000000, - 0xdbf7428b00000000, 0x8249048900000000, 0xb523c68800000000, - 0x88649a8300000000, 0xbf0e588200000000, 0xe6b01e8000000000, - 0xd1dadc8100000000, 0x54cc938400000000, 0x63a6518500000000, - 0x3a18178700000000, 0x0d72d58600000000, 0xa0d0e2a900000000, - 0x97ba20a800000000, 0xce0466aa00000000, 0xf96ea4ab00000000, - 0x7c78ebae00000000, 0x4b1229af00000000, 0x12ac6fad00000000, - 0x25c6adac00000000, 0x1881f1a700000000, 0x2feb33a600000000, - 0x765575a400000000, 0x413fb7a500000000, 0xc429f8a000000000, - 0xf3433aa100000000, 0xaafd7ca300000000, 0x9d97bea200000000, - 0xd073c4b500000000, 0xe71906b400000000, 0xbea740b600000000, - 0x89cd82b700000000, 0x0cdbcdb200000000, 0x3bb10fb300000000, - 0x620f49b100000000, 0x55658bb000000000, 0x6822d7bb00000000, - 0x5f4815ba00000000, 0x06f653b800000000, 0x319c91b900000000, - 0xb48adebc00000000, 0x83e01cbd00000000, 0xda5e5abf00000000, - 0xed3498be00000000}, - {0x0000000000000000, 0x6567bcb800000000, 0x8bc809aa00000000, - 0xeeafb51200000000, 0x5797628f00000000, 0x32f0de3700000000, - 0xdc5f6b2500000000, 0xb938d79d00000000, 0xef28b4c500000000, - 0x8a4f087d00000000, 0x64e0bd6f00000000, 0x018701d700000000, - 0xb8bfd64a00000000, 0xddd86af200000000, 0x3377dfe000000000, - 0x5610635800000000, 0x9f57195000000000, 0xfa30a5e800000000, - 0x149f10fa00000000, 0x71f8ac4200000000, 0xc8c07bdf00000000, - 0xada7c76700000000, 0x4308727500000000, 0x266fcecd00000000, - 0x707fad9500000000, 0x1518112d00000000, 0xfbb7a43f00000000, - 0x9ed0188700000000, 0x27e8cf1a00000000, 0x428f73a200000000, - 0xac20c6b000000000, 0xc9477a0800000000, 0x3eaf32a000000000, - 0x5bc88e1800000000, 0xb5673b0a00000000, 0xd00087b200000000, - 0x6938502f00000000, 0x0c5fec9700000000, 0xe2f0598500000000, - 0x8797e53d00000000, 0xd187866500000000, 0xb4e03add00000000, - 0x5a4f8fcf00000000, 0x3f28337700000000, 0x8610e4ea00000000, - 0xe377585200000000, 0x0dd8ed4000000000, 0x68bf51f800000000, - 0xa1f82bf000000000, 0xc49f974800000000, 0x2a30225a00000000, - 0x4f579ee200000000, 0xf66f497f00000000, 0x9308f5c700000000, - 0x7da740d500000000, 0x18c0fc6d00000000, 0x4ed09f3500000000, - 0x2bb7238d00000000, 0xc518969f00000000, 0xa07f2a2700000000, - 0x1947fdba00000000, 0x7c20410200000000, 0x928ff41000000000, - 0xf7e848a800000000, 0x3d58149b00000000, 0x583fa82300000000, - 0xb6901d3100000000, 0xd3f7a18900000000, 0x6acf761400000000, - 0x0fa8caac00000000, 0xe1077fbe00000000, 0x8460c30600000000, - 0xd270a05e00000000, 0xb7171ce600000000, 0x59b8a9f400000000, - 0x3cdf154c00000000, 0x85e7c2d100000000, 0xe0807e6900000000, - 0x0e2fcb7b00000000, 0x6b4877c300000000, 0xa20f0dcb00000000, - 0xc768b17300000000, 0x29c7046100000000, 0x4ca0b8d900000000, - 0xf5986f4400000000, 0x90ffd3fc00000000, 0x7e5066ee00000000, - 0x1b37da5600000000, 0x4d27b90e00000000, 0x284005b600000000, - 0xc6efb0a400000000, 0xa3880c1c00000000, 0x1ab0db8100000000, - 0x7fd7673900000000, 0x9178d22b00000000, 0xf41f6e9300000000, - 0x03f7263b00000000, 0x66909a8300000000, 0x883f2f9100000000, - 0xed58932900000000, 0x546044b400000000, 0x3107f80c00000000, - 0xdfa84d1e00000000, 0xbacff1a600000000, 0xecdf92fe00000000, - 0x89b82e4600000000, 0x67179b5400000000, 0x027027ec00000000, - 0xbb48f07100000000, 0xde2f4cc900000000, 0x3080f9db00000000, - 0x55e7456300000000, 0x9ca03f6b00000000, 0xf9c783d300000000, - 0x176836c100000000, 0x720f8a7900000000, 0xcb375de400000000, - 0xae50e15c00000000, 0x40ff544e00000000, 0x2598e8f600000000, - 0x73888bae00000000, 0x16ef371600000000, 0xf840820400000000, - 0x9d273ebc00000000, 0x241fe92100000000, 0x4178559900000000, - 0xafd7e08b00000000, 0xcab05c3300000000, 0x3bb659ed00000000, - 0x5ed1e55500000000, 0xb07e504700000000, 0xd519ecff00000000, - 0x6c213b6200000000, 0x094687da00000000, 0xe7e932c800000000, - 0x828e8e7000000000, 0xd49eed2800000000, 0xb1f9519000000000, - 0x5f56e48200000000, 0x3a31583a00000000, 0x83098fa700000000, - 0xe66e331f00000000, 0x08c1860d00000000, 0x6da63ab500000000, - 0xa4e140bd00000000, 0xc186fc0500000000, 0x2f29491700000000, - 0x4a4ef5af00000000, 0xf376223200000000, 0x96119e8a00000000, - 0x78be2b9800000000, 0x1dd9972000000000, 0x4bc9f47800000000, - 0x2eae48c000000000, 0xc001fdd200000000, 0xa566416a00000000, - 0x1c5e96f700000000, 0x79392a4f00000000, 0x97969f5d00000000, - 0xf2f123e500000000, 0x05196b4d00000000, 0x607ed7f500000000, - 0x8ed162e700000000, 0xebb6de5f00000000, 0x528e09c200000000, - 0x37e9b57a00000000, 0xd946006800000000, 0xbc21bcd000000000, - 0xea31df8800000000, 0x8f56633000000000, 0x61f9d62200000000, - 0x049e6a9a00000000, 0xbda6bd0700000000, 0xd8c101bf00000000, - 0x366eb4ad00000000, 0x5309081500000000, 0x9a4e721d00000000, - 0xff29cea500000000, 0x11867bb700000000, 0x74e1c70f00000000, - 0xcdd9109200000000, 0xa8beac2a00000000, 0x4611193800000000, - 0x2376a58000000000, 0x7566c6d800000000, 0x10017a6000000000, - 0xfeaecf7200000000, 0x9bc973ca00000000, 0x22f1a45700000000, - 0x479618ef00000000, 0xa939adfd00000000, 0xcc5e114500000000, - 0x06ee4d7600000000, 0x6389f1ce00000000, 0x8d2644dc00000000, - 0xe841f86400000000, 0x51792ff900000000, 0x341e934100000000, - 0xdab1265300000000, 0xbfd69aeb00000000, 0xe9c6f9b300000000, - 0x8ca1450b00000000, 0x620ef01900000000, 0x07694ca100000000, - 0xbe519b3c00000000, 0xdb36278400000000, 0x3599929600000000, - 0x50fe2e2e00000000, 0x99b9542600000000, 0xfcdee89e00000000, - 0x12715d8c00000000, 0x7716e13400000000, 0xce2e36a900000000, - 0xab498a1100000000, 0x45e63f0300000000, 0x208183bb00000000, - 0x7691e0e300000000, 0x13f65c5b00000000, 0xfd59e94900000000, - 0x983e55f100000000, 0x2106826c00000000, 0x44613ed400000000, - 0xaace8bc600000000, 0xcfa9377e00000000, 0x38417fd600000000, - 0x5d26c36e00000000, 0xb389767c00000000, 0xd6eecac400000000, - 0x6fd61d5900000000, 0x0ab1a1e100000000, 0xe41e14f300000000, - 0x8179a84b00000000, 0xd769cb1300000000, 0xb20e77ab00000000, - 0x5ca1c2b900000000, 0x39c67e0100000000, 0x80fea99c00000000, - 0xe599152400000000, 0x0b36a03600000000, 0x6e511c8e00000000, - 0xa716668600000000, 0xc271da3e00000000, 0x2cde6f2c00000000, - 0x49b9d39400000000, 0xf081040900000000, 0x95e6b8b100000000, - 0x7b490da300000000, 0x1e2eb11b00000000, 0x483ed24300000000, - 0x2d596efb00000000, 0xc3f6dbe900000000, 0xa691675100000000, - 0x1fa9b0cc00000000, 0x7ace0c7400000000, 0x9461b96600000000, - 0xf10605de00000000}, - {0x0000000000000000, 0xb029603d00000000, 0x6053c07a00000000, - 0xd07aa04700000000, 0xc0a680f500000000, 0x708fe0c800000000, - 0xa0f5408f00000000, 0x10dc20b200000000, 0xc14b703000000000, - 0x7162100d00000000, 0xa118b04a00000000, 0x1131d07700000000, - 0x01edf0c500000000, 0xb1c490f800000000, 0x61be30bf00000000, - 0xd197508200000000, 0x8297e06000000000, 0x32be805d00000000, - 0xe2c4201a00000000, 0x52ed402700000000, 0x4231609500000000, - 0xf21800a800000000, 0x2262a0ef00000000, 0x924bc0d200000000, - 0x43dc905000000000, 0xf3f5f06d00000000, 0x238f502a00000000, - 0x93a6301700000000, 0x837a10a500000000, 0x3353709800000000, - 0xe329d0df00000000, 0x5300b0e200000000, 0x042fc1c100000000, - 0xb406a1fc00000000, 0x647c01bb00000000, 0xd455618600000000, - 0xc489413400000000, 0x74a0210900000000, 0xa4da814e00000000, - 0x14f3e17300000000, 0xc564b1f100000000, 0x754dd1cc00000000, - 0xa537718b00000000, 0x151e11b600000000, 0x05c2310400000000, - 0xb5eb513900000000, 0x6591f17e00000000, 0xd5b8914300000000, - 0x86b821a100000000, 0x3691419c00000000, 0xe6ebe1db00000000, - 0x56c281e600000000, 0x461ea15400000000, 0xf637c16900000000, - 0x264d612e00000000, 0x9664011300000000, 0x47f3519100000000, - 0xf7da31ac00000000, 0x27a091eb00000000, 0x9789f1d600000000, - 0x8755d16400000000, 0x377cb15900000000, 0xe706111e00000000, - 0x572f712300000000, 0x4958f35800000000, 0xf971936500000000, - 0x290b332200000000, 0x9922531f00000000, 0x89fe73ad00000000, - 0x39d7139000000000, 0xe9adb3d700000000, 0x5984d3ea00000000, - 0x8813836800000000, 0x383ae35500000000, 0xe840431200000000, - 0x5869232f00000000, 0x48b5039d00000000, 0xf89c63a000000000, - 0x28e6c3e700000000, 0x98cfa3da00000000, 0xcbcf133800000000, - 0x7be6730500000000, 0xab9cd34200000000, 0x1bb5b37f00000000, - 0x0b6993cd00000000, 0xbb40f3f000000000, 0x6b3a53b700000000, - 0xdb13338a00000000, 0x0a84630800000000, 0xbaad033500000000, - 0x6ad7a37200000000, 0xdafec34f00000000, 0xca22e3fd00000000, - 0x7a0b83c000000000, 0xaa71238700000000, 0x1a5843ba00000000, - 0x4d77329900000000, 0xfd5e52a400000000, 0x2d24f2e300000000, - 0x9d0d92de00000000, 0x8dd1b26c00000000, 0x3df8d25100000000, - 0xed82721600000000, 0x5dab122b00000000, 0x8c3c42a900000000, - 0x3c15229400000000, 0xec6f82d300000000, 0x5c46e2ee00000000, - 0x4c9ac25c00000000, 0xfcb3a26100000000, 0x2cc9022600000000, - 0x9ce0621b00000000, 0xcfe0d2f900000000, 0x7fc9b2c400000000, - 0xafb3128300000000, 0x1f9a72be00000000, 0x0f46520c00000000, - 0xbf6f323100000000, 0x6f15927600000000, 0xdf3cf24b00000000, - 0x0eaba2c900000000, 0xbe82c2f400000000, 0x6ef862b300000000, - 0xded1028e00000000, 0xce0d223c00000000, 0x7e24420100000000, - 0xae5ee24600000000, 0x1e77827b00000000, 0x92b0e6b100000000, - 0x2299868c00000000, 0xf2e326cb00000000, 0x42ca46f600000000, - 0x5216664400000000, 0xe23f067900000000, 0x3245a63e00000000, - 0x826cc60300000000, 0x53fb968100000000, 0xe3d2f6bc00000000, - 0x33a856fb00000000, 0x838136c600000000, 0x935d167400000000, - 0x2374764900000000, 0xf30ed60e00000000, 0x4327b63300000000, - 0x102706d100000000, 0xa00e66ec00000000, 0x7074c6ab00000000, - 0xc05da69600000000, 0xd081862400000000, 0x60a8e61900000000, - 0xb0d2465e00000000, 0x00fb266300000000, 0xd16c76e100000000, - 0x614516dc00000000, 0xb13fb69b00000000, 0x0116d6a600000000, - 0x11caf61400000000, 0xa1e3962900000000, 0x7199366e00000000, - 0xc1b0565300000000, 0x969f277000000000, 0x26b6474d00000000, - 0xf6cce70a00000000, 0x46e5873700000000, 0x5639a78500000000, - 0xe610c7b800000000, 0x366a67ff00000000, 0x864307c200000000, - 0x57d4574000000000, 0xe7fd377d00000000, 0x3787973a00000000, - 0x87aef70700000000, 0x9772d7b500000000, 0x275bb78800000000, - 0xf72117cf00000000, 0x470877f200000000, 0x1408c71000000000, - 0xa421a72d00000000, 0x745b076a00000000, 0xc472675700000000, - 0xd4ae47e500000000, 0x648727d800000000, 0xb4fd879f00000000, - 0x04d4e7a200000000, 0xd543b72000000000, 0x656ad71d00000000, - 0xb510775a00000000, 0x0539176700000000, 0x15e537d500000000, - 0xa5cc57e800000000, 0x75b6f7af00000000, 0xc59f979200000000, - 0xdbe815e900000000, 0x6bc175d400000000, 0xbbbbd59300000000, - 0x0b92b5ae00000000, 0x1b4e951c00000000, 0xab67f52100000000, - 0x7b1d556600000000, 0xcb34355b00000000, 0x1aa365d900000000, - 0xaa8a05e400000000, 0x7af0a5a300000000, 0xcad9c59e00000000, - 0xda05e52c00000000, 0x6a2c851100000000, 0xba56255600000000, - 0x0a7f456b00000000, 0x597ff58900000000, 0xe95695b400000000, - 0x392c35f300000000, 0x890555ce00000000, 0x99d9757c00000000, - 0x29f0154100000000, 0xf98ab50600000000, 0x49a3d53b00000000, - 0x983485b900000000, 0x281de58400000000, 0xf86745c300000000, - 0x484e25fe00000000, 0x5892054c00000000, 0xe8bb657100000000, - 0x38c1c53600000000, 0x88e8a50b00000000, 0xdfc7d42800000000, - 0x6feeb41500000000, 0xbf94145200000000, 0x0fbd746f00000000, - 0x1f6154dd00000000, 0xaf4834e000000000, 0x7f3294a700000000, - 0xcf1bf49a00000000, 0x1e8ca41800000000, 0xaea5c42500000000, - 0x7edf646200000000, 0xcef6045f00000000, 0xde2a24ed00000000, - 0x6e0344d000000000, 0xbe79e49700000000, 0x0e5084aa00000000, - 0x5d50344800000000, 0xed79547500000000, 0x3d03f43200000000, - 0x8d2a940f00000000, 0x9df6b4bd00000000, 0x2ddfd48000000000, - 0xfda574c700000000, 0x4d8c14fa00000000, 0x9c1b447800000000, - 0x2c32244500000000, 0xfc48840200000000, 0x4c61e43f00000000, - 0x5cbdc48d00000000, 0xec94a4b000000000, 0x3cee04f700000000, - 0x8cc764ca00000000}, - {0x0000000000000000, 0xa5d35ccb00000000, 0x0ba1c84d00000000, - 0xae72948600000000, 0x1642919b00000000, 0xb391cd5000000000, - 0x1de359d600000000, 0xb830051d00000000, 0x6d8253ec00000000, - 0xc8510f2700000000, 0x66239ba100000000, 0xc3f0c76a00000000, - 0x7bc0c27700000000, 0xde139ebc00000000, 0x70610a3a00000000, - 0xd5b256f100000000, 0x9b02d60300000000, 0x3ed18ac800000000, - 0x90a31e4e00000000, 0x3570428500000000, 0x8d40479800000000, - 0x28931b5300000000, 0x86e18fd500000000, 0x2332d31e00000000, - 0xf68085ef00000000, 0x5353d92400000000, 0xfd214da200000000, - 0x58f2116900000000, 0xe0c2147400000000, 0x451148bf00000000, - 0xeb63dc3900000000, 0x4eb080f200000000, 0x3605ac0700000000, - 0x93d6f0cc00000000, 0x3da4644a00000000, 0x9877388100000000, - 0x20473d9c00000000, 0x8594615700000000, 0x2be6f5d100000000, - 0x8e35a91a00000000, 0x5b87ffeb00000000, 0xfe54a32000000000, - 0x502637a600000000, 0xf5f56b6d00000000, 0x4dc56e7000000000, - 0xe81632bb00000000, 0x4664a63d00000000, 0xe3b7faf600000000, - 0xad077a0400000000, 0x08d426cf00000000, 0xa6a6b24900000000, - 0x0375ee8200000000, 0xbb45eb9f00000000, 0x1e96b75400000000, - 0xb0e423d200000000, 0x15377f1900000000, 0xc08529e800000000, - 0x6556752300000000, 0xcb24e1a500000000, 0x6ef7bd6e00000000, - 0xd6c7b87300000000, 0x7314e4b800000000, 0xdd66703e00000000, - 0x78b52cf500000000, 0x6c0a580f00000000, 0xc9d904c400000000, - 0x67ab904200000000, 0xc278cc8900000000, 0x7a48c99400000000, - 0xdf9b955f00000000, 0x71e901d900000000, 0xd43a5d1200000000, - 0x01880be300000000, 0xa45b572800000000, 0x0a29c3ae00000000, - 0xaffa9f6500000000, 0x17ca9a7800000000, 0xb219c6b300000000, - 0x1c6b523500000000, 0xb9b80efe00000000, 0xf7088e0c00000000, - 0x52dbd2c700000000, 0xfca9464100000000, 0x597a1a8a00000000, - 0xe14a1f9700000000, 0x4499435c00000000, 0xeaebd7da00000000, - 0x4f388b1100000000, 0x9a8adde000000000, 0x3f59812b00000000, - 0x912b15ad00000000, 0x34f8496600000000, 0x8cc84c7b00000000, - 0x291b10b000000000, 0x8769843600000000, 0x22bad8fd00000000, - 0x5a0ff40800000000, 0xffdca8c300000000, 0x51ae3c4500000000, - 0xf47d608e00000000, 0x4c4d659300000000, 0xe99e395800000000, - 0x47ecadde00000000, 0xe23ff11500000000, 0x378da7e400000000, - 0x925efb2f00000000, 0x3c2c6fa900000000, 0x99ff336200000000, - 0x21cf367f00000000, 0x841c6ab400000000, 0x2a6efe3200000000, - 0x8fbda2f900000000, 0xc10d220b00000000, 0x64de7ec000000000, - 0xcaacea4600000000, 0x6f7fb68d00000000, 0xd74fb39000000000, - 0x729cef5b00000000, 0xdcee7bdd00000000, 0x793d271600000000, - 0xac8f71e700000000, 0x095c2d2c00000000, 0xa72eb9aa00000000, - 0x02fde56100000000, 0xbacde07c00000000, 0x1f1ebcb700000000, - 0xb16c283100000000, 0x14bf74fa00000000, 0xd814b01e00000000, - 0x7dc7ecd500000000, 0xd3b5785300000000, 0x7666249800000000, - 0xce56218500000000, 0x6b857d4e00000000, 0xc5f7e9c800000000, - 0x6024b50300000000, 0xb596e3f200000000, 0x1045bf3900000000, - 0xbe372bbf00000000, 0x1be4777400000000, 0xa3d4726900000000, - 0x06072ea200000000, 0xa875ba2400000000, 0x0da6e6ef00000000, - 0x4316661d00000000, 0xe6c53ad600000000, 0x48b7ae5000000000, - 0xed64f29b00000000, 0x5554f78600000000, 0xf087ab4d00000000, - 0x5ef53fcb00000000, 0xfb26630000000000, 0x2e9435f100000000, - 0x8b47693a00000000, 0x2535fdbc00000000, 0x80e6a17700000000, - 0x38d6a46a00000000, 0x9d05f8a100000000, 0x33776c2700000000, - 0x96a430ec00000000, 0xee111c1900000000, 0x4bc240d200000000, - 0xe5b0d45400000000, 0x4063889f00000000, 0xf8538d8200000000, - 0x5d80d14900000000, 0xf3f245cf00000000, 0x5621190400000000, - 0x83934ff500000000, 0x2640133e00000000, 0x883287b800000000, - 0x2de1db7300000000, 0x95d1de6e00000000, 0x300282a500000000, - 0x9e70162300000000, 0x3ba34ae800000000, 0x7513ca1a00000000, - 0xd0c096d100000000, 0x7eb2025700000000, 0xdb615e9c00000000, - 0x63515b8100000000, 0xc682074a00000000, 0x68f093cc00000000, - 0xcd23cf0700000000, 0x189199f600000000, 0xbd42c53d00000000, - 0x133051bb00000000, 0xb6e30d7000000000, 0x0ed3086d00000000, - 0xab0054a600000000, 0x0572c02000000000, 0xa0a19ceb00000000, - 0xb41ee81100000000, 0x11cdb4da00000000, 0xbfbf205c00000000, - 0x1a6c7c9700000000, 0xa25c798a00000000, 0x078f254100000000, - 0xa9fdb1c700000000, 0x0c2eed0c00000000, 0xd99cbbfd00000000, - 0x7c4fe73600000000, 0xd23d73b000000000, 0x77ee2f7b00000000, - 0xcfde2a6600000000, 0x6a0d76ad00000000, 0xc47fe22b00000000, - 0x61acbee000000000, 0x2f1c3e1200000000, 0x8acf62d900000000, - 0x24bdf65f00000000, 0x816eaa9400000000, 0x395eaf8900000000, - 0x9c8df34200000000, 0x32ff67c400000000, 0x972c3b0f00000000, - 0x429e6dfe00000000, 0xe74d313500000000, 0x493fa5b300000000, - 0xececf97800000000, 0x54dcfc6500000000, 0xf10fa0ae00000000, - 0x5f7d342800000000, 0xfaae68e300000000, 0x821b441600000000, - 0x27c818dd00000000, 0x89ba8c5b00000000, 0x2c69d09000000000, - 0x9459d58d00000000, 0x318a894600000000, 0x9ff81dc000000000, - 0x3a2b410b00000000, 0xef9917fa00000000, 0x4a4a4b3100000000, - 0xe438dfb700000000, 0x41eb837c00000000, 0xf9db866100000000, - 0x5c08daaa00000000, 0xf27a4e2c00000000, 0x57a912e700000000, - 0x1919921500000000, 0xbccacede00000000, 0x12b85a5800000000, - 0xb76b069300000000, 0x0f5b038e00000000, 0xaa885f4500000000, - 0x04facbc300000000, 0xa129970800000000, 0x749bc1f900000000, - 0xd1489d3200000000, 0x7f3a09b400000000, 0xdae9557f00000000, - 0x62d9506200000000, 0xc70a0ca900000000, 0x6978982f00000000, - 0xccabc4e400000000}, - {0x0000000000000000, 0xb40b77a600000000, 0x29119f9700000000, - 0x9d1ae83100000000, 0x13244ff400000000, 0xa72f385200000000, - 0x3a35d06300000000, 0x8e3ea7c500000000, 0x674eef3300000000, - 0xd345989500000000, 0x4e5f70a400000000, 0xfa54070200000000, - 0x746aa0c700000000, 0xc061d76100000000, 0x5d7b3f5000000000, - 0xe97048f600000000, 0xce9cde6700000000, 0x7a97a9c100000000, - 0xe78d41f000000000, 0x5386365600000000, 0xddb8919300000000, - 0x69b3e63500000000, 0xf4a90e0400000000, 0x40a279a200000000, - 0xa9d2315400000000, 0x1dd946f200000000, 0x80c3aec300000000, - 0x34c8d96500000000, 0xbaf67ea000000000, 0x0efd090600000000, - 0x93e7e13700000000, 0x27ec969100000000, 0x9c39bdcf00000000, - 0x2832ca6900000000, 0xb528225800000000, 0x012355fe00000000, - 0x8f1df23b00000000, 0x3b16859d00000000, 0xa60c6dac00000000, - 0x12071a0a00000000, 0xfb7752fc00000000, 0x4f7c255a00000000, - 0xd266cd6b00000000, 0x666dbacd00000000, 0xe8531d0800000000, - 0x5c586aae00000000, 0xc142829f00000000, 0x7549f53900000000, - 0x52a563a800000000, 0xe6ae140e00000000, 0x7bb4fc3f00000000, - 0xcfbf8b9900000000, 0x41812c5c00000000, 0xf58a5bfa00000000, - 0x6890b3cb00000000, 0xdc9bc46d00000000, 0x35eb8c9b00000000, - 0x81e0fb3d00000000, 0x1cfa130c00000000, 0xa8f164aa00000000, - 0x26cfc36f00000000, 0x92c4b4c900000000, 0x0fde5cf800000000, - 0xbbd52b5e00000000, 0x79750b4400000000, 0xcd7e7ce200000000, - 0x506494d300000000, 0xe46fe37500000000, 0x6a5144b000000000, - 0xde5a331600000000, 0x4340db2700000000, 0xf74bac8100000000, - 0x1e3be47700000000, 0xaa3093d100000000, 0x372a7be000000000, - 0x83210c4600000000, 0x0d1fab8300000000, 0xb914dc2500000000, - 0x240e341400000000, 0x900543b200000000, 0xb7e9d52300000000, - 0x03e2a28500000000, 0x9ef84ab400000000, 0x2af33d1200000000, - 0xa4cd9ad700000000, 0x10c6ed7100000000, 0x8ddc054000000000, - 0x39d772e600000000, 0xd0a73a1000000000, 0x64ac4db600000000, - 0xf9b6a58700000000, 0x4dbdd22100000000, 0xc38375e400000000, - 0x7788024200000000, 0xea92ea7300000000, 0x5e999dd500000000, - 0xe54cb68b00000000, 0x5147c12d00000000, 0xcc5d291c00000000, - 0x78565eba00000000, 0xf668f97f00000000, 0x42638ed900000000, - 0xdf7966e800000000, 0x6b72114e00000000, 0x820259b800000000, - 0x36092e1e00000000, 0xab13c62f00000000, 0x1f18b18900000000, - 0x9126164c00000000, 0x252d61ea00000000, 0xb83789db00000000, - 0x0c3cfe7d00000000, 0x2bd068ec00000000, 0x9fdb1f4a00000000, - 0x02c1f77b00000000, 0xb6ca80dd00000000, 0x38f4271800000000, - 0x8cff50be00000000, 0x11e5b88f00000000, 0xa5eecf2900000000, - 0x4c9e87df00000000, 0xf895f07900000000, 0x658f184800000000, - 0xd1846fee00000000, 0x5fbac82b00000000, 0xebb1bf8d00000000, - 0x76ab57bc00000000, 0xc2a0201a00000000, 0xf2ea168800000000, - 0x46e1612e00000000, 0xdbfb891f00000000, 0x6ff0feb900000000, - 0xe1ce597c00000000, 0x55c52eda00000000, 0xc8dfc6eb00000000, - 0x7cd4b14d00000000, 0x95a4f9bb00000000, 0x21af8e1d00000000, - 0xbcb5662c00000000, 0x08be118a00000000, 0x8680b64f00000000, - 0x328bc1e900000000, 0xaf9129d800000000, 0x1b9a5e7e00000000, - 0x3c76c8ef00000000, 0x887dbf4900000000, 0x1567577800000000, - 0xa16c20de00000000, 0x2f52871b00000000, 0x9b59f0bd00000000, - 0x0643188c00000000, 0xb2486f2a00000000, 0x5b3827dc00000000, - 0xef33507a00000000, 0x7229b84b00000000, 0xc622cfed00000000, - 0x481c682800000000, 0xfc171f8e00000000, 0x610df7bf00000000, - 0xd506801900000000, 0x6ed3ab4700000000, 0xdad8dce100000000, - 0x47c234d000000000, 0xf3c9437600000000, 0x7df7e4b300000000, - 0xc9fc931500000000, 0x54e67b2400000000, 0xe0ed0c8200000000, - 0x099d447400000000, 0xbd9633d200000000, 0x208cdbe300000000, - 0x9487ac4500000000, 0x1ab90b8000000000, 0xaeb27c2600000000, - 0x33a8941700000000, 0x87a3e3b100000000, 0xa04f752000000000, - 0x1444028600000000, 0x895eeab700000000, 0x3d559d1100000000, - 0xb36b3ad400000000, 0x07604d7200000000, 0x9a7aa54300000000, - 0x2e71d2e500000000, 0xc7019a1300000000, 0x730aedb500000000, - 0xee10058400000000, 0x5a1b722200000000, 0xd425d5e700000000, - 0x602ea24100000000, 0xfd344a7000000000, 0x493f3dd600000000, - 0x8b9f1dcc00000000, 0x3f946a6a00000000, 0xa28e825b00000000, - 0x1685f5fd00000000, 0x98bb523800000000, 0x2cb0259e00000000, - 0xb1aacdaf00000000, 0x05a1ba0900000000, 0xecd1f2ff00000000, - 0x58da855900000000, 0xc5c06d6800000000, 0x71cb1ace00000000, - 0xfff5bd0b00000000, 0x4bfecaad00000000, 0xd6e4229c00000000, - 0x62ef553a00000000, 0x4503c3ab00000000, 0xf108b40d00000000, - 0x6c125c3c00000000, 0xd8192b9a00000000, 0x56278c5f00000000, - 0xe22cfbf900000000, 0x7f3613c800000000, 0xcb3d646e00000000, - 0x224d2c9800000000, 0x96465b3e00000000, 0x0b5cb30f00000000, - 0xbf57c4a900000000, 0x3169636c00000000, 0x856214ca00000000, - 0x1878fcfb00000000, 0xac738b5d00000000, 0x17a6a00300000000, - 0xa3add7a500000000, 0x3eb73f9400000000, 0x8abc483200000000, - 0x0482eff700000000, 0xb089985100000000, 0x2d93706000000000, - 0x999807c600000000, 0x70e84f3000000000, 0xc4e3389600000000, - 0x59f9d0a700000000, 0xedf2a70100000000, 0x63cc00c400000000, - 0xd7c7776200000000, 0x4add9f5300000000, 0xfed6e8f500000000, - 0xd93a7e6400000000, 0x6d3109c200000000, 0xf02be1f300000000, - 0x4420965500000000, 0xca1e319000000000, 0x7e15463600000000, - 0xe30fae0700000000, 0x5704d9a100000000, 0xbe74915700000000, - 0x0a7fe6f100000000, 0x97650ec000000000, 0x236e796600000000, - 0xad50dea300000000, 0x195ba90500000000, 0x8441413400000000, - 0x304a369200000000}, - {0x0000000000000000, 0x9e00aacc00000000, 0x7d07254200000000, - 0xe3078f8e00000000, 0xfa0e4a8400000000, 0x640ee04800000000, - 0x87096fc600000000, 0x1909c50a00000000, 0xb51be5d300000000, - 0x2b1b4f1f00000000, 0xc81cc09100000000, 0x561c6a5d00000000, - 0x4f15af5700000000, 0xd115059b00000000, 0x32128a1500000000, - 0xac1220d900000000, 0x2b31bb7c00000000, 0xb53111b000000000, - 0x56369e3e00000000, 0xc83634f200000000, 0xd13ff1f800000000, - 0x4f3f5b3400000000, 0xac38d4ba00000000, 0x32387e7600000000, - 0x9e2a5eaf00000000, 0x002af46300000000, 0xe32d7bed00000000, - 0x7d2dd12100000000, 0x6424142b00000000, 0xfa24bee700000000, - 0x1923316900000000, 0x87239ba500000000, 0x566276f900000000, - 0xc862dc3500000000, 0x2b6553bb00000000, 0xb565f97700000000, - 0xac6c3c7d00000000, 0x326c96b100000000, 0xd16b193f00000000, - 0x4f6bb3f300000000, 0xe379932a00000000, 0x7d7939e600000000, - 0x9e7eb66800000000, 0x007e1ca400000000, 0x1977d9ae00000000, - 0x8777736200000000, 0x6470fcec00000000, 0xfa70562000000000, - 0x7d53cd8500000000, 0xe353674900000000, 0x0054e8c700000000, - 0x9e54420b00000000, 0x875d870100000000, 0x195d2dcd00000000, - 0xfa5aa24300000000, 0x645a088f00000000, 0xc848285600000000, - 0x5648829a00000000, 0xb54f0d1400000000, 0x2b4fa7d800000000, - 0x324662d200000000, 0xac46c81e00000000, 0x4f41479000000000, - 0xd141ed5c00000000, 0xedc29d2900000000, 0x73c237e500000000, - 0x90c5b86b00000000, 0x0ec512a700000000, 0x17ccd7ad00000000, - 0x89cc7d6100000000, 0x6acbf2ef00000000, 0xf4cb582300000000, - 0x58d978fa00000000, 0xc6d9d23600000000, 0x25de5db800000000, - 0xbbdef77400000000, 0xa2d7327e00000000, 0x3cd798b200000000, - 0xdfd0173c00000000, 0x41d0bdf000000000, 0xc6f3265500000000, - 0x58f38c9900000000, 0xbbf4031700000000, 0x25f4a9db00000000, - 0x3cfd6cd100000000, 0xa2fdc61d00000000, 0x41fa499300000000, - 0xdffae35f00000000, 0x73e8c38600000000, 0xede8694a00000000, - 0x0eefe6c400000000, 0x90ef4c0800000000, 0x89e6890200000000, - 0x17e623ce00000000, 0xf4e1ac4000000000, 0x6ae1068c00000000, - 0xbba0ebd000000000, 0x25a0411c00000000, 0xc6a7ce9200000000, - 0x58a7645e00000000, 0x41aea15400000000, 0xdfae0b9800000000, - 0x3ca9841600000000, 0xa2a92eda00000000, 0x0ebb0e0300000000, - 0x90bba4cf00000000, 0x73bc2b4100000000, 0xedbc818d00000000, - 0xf4b5448700000000, 0x6ab5ee4b00000000, 0x89b261c500000000, - 0x17b2cb0900000000, 0x909150ac00000000, 0x0e91fa6000000000, - 0xed9675ee00000000, 0x7396df2200000000, 0x6a9f1a2800000000, - 0xf49fb0e400000000, 0x17983f6a00000000, 0x899895a600000000, - 0x258ab57f00000000, 0xbb8a1fb300000000, 0x588d903d00000000, - 0xc68d3af100000000, 0xdf84fffb00000000, 0x4184553700000000, - 0xa283dab900000000, 0x3c83707500000000, 0xda853b5300000000, - 0x4485919f00000000, 0xa7821e1100000000, 0x3982b4dd00000000, - 0x208b71d700000000, 0xbe8bdb1b00000000, 0x5d8c549500000000, - 0xc38cfe5900000000, 0x6f9ede8000000000, 0xf19e744c00000000, - 0x1299fbc200000000, 0x8c99510e00000000, 0x9590940400000000, - 0x0b903ec800000000, 0xe897b14600000000, 0x76971b8a00000000, - 0xf1b4802f00000000, 0x6fb42ae300000000, 0x8cb3a56d00000000, - 0x12b30fa100000000, 0x0bbacaab00000000, 0x95ba606700000000, - 0x76bdefe900000000, 0xe8bd452500000000, 0x44af65fc00000000, - 0xdaafcf3000000000, 0x39a840be00000000, 0xa7a8ea7200000000, - 0xbea12f7800000000, 0x20a185b400000000, 0xc3a60a3a00000000, - 0x5da6a0f600000000, 0x8ce74daa00000000, 0x12e7e76600000000, - 0xf1e068e800000000, 0x6fe0c22400000000, 0x76e9072e00000000, - 0xe8e9ade200000000, 0x0bee226c00000000, 0x95ee88a000000000, - 0x39fca87900000000, 0xa7fc02b500000000, 0x44fb8d3b00000000, - 0xdafb27f700000000, 0xc3f2e2fd00000000, 0x5df2483100000000, - 0xbef5c7bf00000000, 0x20f56d7300000000, 0xa7d6f6d600000000, - 0x39d65c1a00000000, 0xdad1d39400000000, 0x44d1795800000000, - 0x5dd8bc5200000000, 0xc3d8169e00000000, 0x20df991000000000, - 0xbedf33dc00000000, 0x12cd130500000000, 0x8ccdb9c900000000, - 0x6fca364700000000, 0xf1ca9c8b00000000, 0xe8c3598100000000, - 0x76c3f34d00000000, 0x95c47cc300000000, 0x0bc4d60f00000000, - 0x3747a67a00000000, 0xa9470cb600000000, 0x4a40833800000000, - 0xd44029f400000000, 0xcd49ecfe00000000, 0x5349463200000000, - 0xb04ec9bc00000000, 0x2e4e637000000000, 0x825c43a900000000, - 0x1c5ce96500000000, 0xff5b66eb00000000, 0x615bcc2700000000, - 0x7852092d00000000, 0xe652a3e100000000, 0x05552c6f00000000, - 0x9b5586a300000000, 0x1c761d0600000000, 0x8276b7ca00000000, - 0x6171384400000000, 0xff71928800000000, 0xe678578200000000, - 0x7878fd4e00000000, 0x9b7f72c000000000, 0x057fd80c00000000, - 0xa96df8d500000000, 0x376d521900000000, 0xd46add9700000000, - 0x4a6a775b00000000, 0x5363b25100000000, 0xcd63189d00000000, - 0x2e64971300000000, 0xb0643ddf00000000, 0x6125d08300000000, - 0xff257a4f00000000, 0x1c22f5c100000000, 0x82225f0d00000000, - 0x9b2b9a0700000000, 0x052b30cb00000000, 0xe62cbf4500000000, - 0x782c158900000000, 0xd43e355000000000, 0x4a3e9f9c00000000, - 0xa939101200000000, 0x3739bade00000000, 0x2e307fd400000000, - 0xb030d51800000000, 0x53375a9600000000, 0xcd37f05a00000000, - 0x4a146bff00000000, 0xd414c13300000000, 0x37134ebd00000000, - 0xa913e47100000000, 0xb01a217b00000000, 0x2e1a8bb700000000, - 0xcd1d043900000000, 0x531daef500000000, 0xff0f8e2c00000000, - 0x610f24e000000000, 0x8208ab6e00000000, 0x1c0801a200000000, - 0x0501c4a800000000, 0x9b016e6400000000, 0x7806e1ea00000000, - 0xe6064b2600000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, - 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, - 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, - 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, - 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, - 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, - 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, - 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, - 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, - 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, - 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, - 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, - 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, - 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, - 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, - 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, - 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, - 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, - 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, - 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, - 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, - 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, - 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, - 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, - 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, - 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, - 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, - 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, - 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, - 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, - 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, - 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, - 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, - 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, - 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, - 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, - 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, - 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, - 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, - 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, - 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, - 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, - 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, - 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, - 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, - 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, - 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, - 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, - 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, - 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, - 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, - 0xde0506f1}, - {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, - 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, - 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, - 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, - 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, - 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, - 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, - 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, - 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, - 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, - 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, - 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, - 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, - 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, - 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, - 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, - 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, - 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, - 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, - 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, - 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, - 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, - 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, - 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, - 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, - 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, - 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, - 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, - 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, - 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, - 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, - 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, - 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, - 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, - 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, - 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, - 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, - 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, - 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, - 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, - 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, - 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, - 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, - 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, - 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, - 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, - 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, - 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, - 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, - 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, - 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, - 0xbe9834ed}, - {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, - 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, - 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, - 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, - 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, - 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, - 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, - 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, - 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, - 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, - 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, - 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, - 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, - 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, - 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, - 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, - 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, - 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, - 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, - 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, - 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, - 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, - 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, - 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, - 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, - 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, - 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, - 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, - 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, - 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, - 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, - 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, - 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, - 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, - 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, - 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, - 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, - 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, - 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, - 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, - 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, - 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, - 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, - 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, - 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, - 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, - 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, - 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, - 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, - 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, - 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, - 0x9324fd72}, - {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, - 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, - 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, - 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, - 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, - 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, - 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, - 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, - 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, - 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, - 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, - 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, - 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, - 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, - 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, - 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, - 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, - 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, - 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, - 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, - 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, - 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, - 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, - 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, - 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, - 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, - 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, - 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, - 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, - 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, - 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, - 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, - 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, - 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, - 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, - 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, - 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, - 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, - 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, - 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, - 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, - 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, - 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, - 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, - 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, - 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, - 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, - 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, - 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, - 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, - 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, - 0x8def022d}, - {0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, - 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, - 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, - 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, - 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, - 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, - 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, - 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, - 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, - 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, - 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, - 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, - 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, - 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, - 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, - 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, - 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, - 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, - 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, - 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, - 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, - 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, - 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, - 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, - 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, - 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, - 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, - 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, - 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, - 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, - 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, - 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, - 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, - 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, - 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, - 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, - 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, - 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, - 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, - 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, - 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, - 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, - 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, - 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, - 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, - 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, - 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, - 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, - 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, - 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, - 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, - 0x72fd2493}, - {0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, - 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, - 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, - 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, - 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, - 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, - 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, - 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, - 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, - 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, - 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, - 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, - 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, - 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, - 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, - 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, - 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, - 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, - 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, - 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, - 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, - 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, - 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, - 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, - 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, - 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, - 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, - 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, - 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, - 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, - 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, - 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, - 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, - 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, - 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, - 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, - 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, - 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, - 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, - 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, - 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, - 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, - 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, - 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, - 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, - 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, - 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, - 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, - 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, - 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, - 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, - 0xed3498be}, - {0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, - 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, - 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, - 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, - 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, - 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, - 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, - 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, - 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, - 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, - 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, - 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, - 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, - 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, - 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, - 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, - 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, - 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, - 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, - 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, - 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, - 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, - 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, - 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, - 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, - 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, - 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, - 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, - 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, - 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, - 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, - 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, - 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, - 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, - 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, - 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, - 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, - 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, - 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, - 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, - 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, - 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, - 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, - 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, - 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, - 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, - 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, - 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, - 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, - 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, - 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, - 0xf10605de}}; - -#endif - -#endif - -#if N == 2 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, - 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, - 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, - 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, - 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, - 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, - 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, - 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, - 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, - 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, - 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, - 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, - 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, - 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, - 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, - 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, - 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, - 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, - 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, - 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, - 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, - 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, - 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, - 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, - 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, - 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, - 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, - 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, - 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, - 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, - 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, - 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, - 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, - 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, - 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, - 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, - 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, - 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, - 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, - 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, - 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, - 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, - 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, - 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, - 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, - 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, - 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, - 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, - 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, - 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, - 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, - 0x0d7139d7}, - {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, - 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, - 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, - 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, - 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, - 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, - 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, - 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, - 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, - 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, - 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, - 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, - 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, - 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, - 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, - 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, - 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, - 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, - 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, - 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, - 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, - 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, - 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, - 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, - 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, - 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, - 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, - 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, - 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, - 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, - 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, - 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, - 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, - 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, - 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, - 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, - 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, - 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, - 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, - 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, - 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, - 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, - 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, - 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, - 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, - 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, - 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, - 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, - 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, - 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, - 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, - 0x1c53e98a}, - {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, - 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, - 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, - 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, - 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, - 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, - 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, - 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, - 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, - 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, - 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, - 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, - 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, - 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, - 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, - 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, - 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, - 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, - 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, - 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, - 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, - 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, - 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, - 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, - 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, - 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, - 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, - 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, - 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, - 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, - 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, - 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, - 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, - 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, - 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, - 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, - 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, - 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, - 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, - 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, - 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, - 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, - 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, - 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, - 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, - 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, - 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, - 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, - 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, - 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, - 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, - 0x3f88e851}, - {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, - 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, - 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, - 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, - 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, - 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, - 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, - 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, - 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, - 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, - 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, - 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, - 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, - 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, - 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, - 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, - 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, - 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, - 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, - 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, - 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, - 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, - 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, - 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, - 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, - 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, - 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, - 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, - 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, - 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, - 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, - 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, - 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, - 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, - 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, - 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, - 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, - 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, - 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, - 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, - 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, - 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, - 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, - 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, - 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, - 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, - 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, - 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, - 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, - 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, - 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, - 0x3dee8ca6}, - {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, - 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, - 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, - 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, - 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, - 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, - 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, - 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, - 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, - 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, - 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, - 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, - 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, - 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, - 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, - 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, - 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, - 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, - 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, - 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, - 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, - 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, - 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, - 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, - 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, - 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, - 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, - 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, - 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, - 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, - 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, - 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, - 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, - 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, - 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, - 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, - 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, - 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, - 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, - 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, - 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, - 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, - 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, - 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, - 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, - 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, - 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, - 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, - 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, - 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, - 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, - 0x36197165}, - {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, - 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, - 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, - 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, - 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, - 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, - 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, - 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, - 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, - 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, - 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, - 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, - 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, - 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, - 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, - 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, - 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, - 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, - 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, - 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, - 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, - 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, - 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, - 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, - 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, - 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, - 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, - 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, - 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, - 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, - 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, - 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, - 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, - 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, - 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, - 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, - 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, - 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, - 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, - 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, - 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, - 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, - 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, - 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, - 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, - 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, - 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, - 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, - 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, - 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, - 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, - 0x1a3b93aa}, - {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, - 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, - 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, - 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, - 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, - 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, - 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, - 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, - 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, - 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, - 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, - 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, - 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, - 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, - 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, - 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, - 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, - 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, - 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, - 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, - 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, - 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, - 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, - 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, - 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, - 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, - 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, - 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, - 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, - 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, - 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, - 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, - 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, - 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, - 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, - 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, - 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, - 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, - 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, - 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, - 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, - 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, - 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, - 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, - 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, - 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, - 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, - 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, - 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, - 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, - 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, - 0xe147d714}, - {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, - 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, - 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, - 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, - 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, - 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, - 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, - 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, - 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, - 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, - 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, - 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, - 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, - 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, - 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, - 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, - 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, - 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, - 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, - 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, - 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, - 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, - 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, - 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, - 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, - 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, - 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, - 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, - 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, - 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, - 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, - 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, - 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, - 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, - 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, - 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, - 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, - 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, - 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, - 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, - 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, - 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, - 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, - 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, - 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, - 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, - 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, - 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, - 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, - 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, - 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, - 0x494f0c4b}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x43147b1700000000, 0x8628f62e00000000, - 0xc53c8d3900000000, 0x0c51ec5d00000000, 0x4f45974a00000000, - 0x8a791a7300000000, 0xc96d616400000000, 0x18a2d8bb00000000, - 0x5bb6a3ac00000000, 0x9e8a2e9500000000, 0xdd9e558200000000, - 0x14f334e600000000, 0x57e74ff100000000, 0x92dbc2c800000000, - 0xd1cfb9df00000000, 0x7142c0ac00000000, 0x3256bbbb00000000, - 0xf76a368200000000, 0xb47e4d9500000000, 0x7d132cf100000000, - 0x3e0757e600000000, 0xfb3bdadf00000000, 0xb82fa1c800000000, - 0x69e0181700000000, 0x2af4630000000000, 0xefc8ee3900000000, - 0xacdc952e00000000, 0x65b1f44a00000000, 0x26a58f5d00000000, - 0xe399026400000000, 0xa08d797300000000, 0xa382f18200000000, - 0xe0968a9500000000, 0x25aa07ac00000000, 0x66be7cbb00000000, - 0xafd31ddf00000000, 0xecc766c800000000, 0x29fbebf100000000, - 0x6aef90e600000000, 0xbb20293900000000, 0xf834522e00000000, - 0x3d08df1700000000, 0x7e1ca40000000000, 0xb771c56400000000, - 0xf465be7300000000, 0x3159334a00000000, 0x724d485d00000000, - 0xd2c0312e00000000, 0x91d44a3900000000, 0x54e8c70000000000, - 0x17fcbc1700000000, 0xde91dd7300000000, 0x9d85a66400000000, - 0x58b92b5d00000000, 0x1bad504a00000000, 0xca62e99500000000, - 0x8976928200000000, 0x4c4a1fbb00000000, 0x0f5e64ac00000000, - 0xc63305c800000000, 0x85277edf00000000, 0x401bf3e600000000, - 0x030f88f100000000, 0x070392de00000000, 0x4417e9c900000000, - 0x812b64f000000000, 0xc23f1fe700000000, 0x0b527e8300000000, - 0x4846059400000000, 0x8d7a88ad00000000, 0xce6ef3ba00000000, - 0x1fa14a6500000000, 0x5cb5317200000000, 0x9989bc4b00000000, - 0xda9dc75c00000000, 0x13f0a63800000000, 0x50e4dd2f00000000, - 0x95d8501600000000, 0xd6cc2b0100000000, 0x7641527200000000, - 0x3555296500000000, 0xf069a45c00000000, 0xb37ddf4b00000000, - 0x7a10be2f00000000, 0x3904c53800000000, 0xfc38480100000000, - 0xbf2c331600000000, 0x6ee38ac900000000, 0x2df7f1de00000000, - 0xe8cb7ce700000000, 0xabdf07f000000000, 0x62b2669400000000, - 0x21a61d8300000000, 0xe49a90ba00000000, 0xa78eebad00000000, - 0xa481635c00000000, 0xe795184b00000000, 0x22a9957200000000, - 0x61bdee6500000000, 0xa8d08f0100000000, 0xebc4f41600000000, - 0x2ef8792f00000000, 0x6dec023800000000, 0xbc23bbe700000000, - 0xff37c0f000000000, 0x3a0b4dc900000000, 0x791f36de00000000, - 0xb07257ba00000000, 0xf3662cad00000000, 0x365aa19400000000, - 0x754eda8300000000, 0xd5c3a3f000000000, 0x96d7d8e700000000, - 0x53eb55de00000000, 0x10ff2ec900000000, 0xd9924fad00000000, - 0x9a8634ba00000000, 0x5fbab98300000000, 0x1caec29400000000, - 0xcd617b4b00000000, 0x8e75005c00000000, 0x4b498d6500000000, - 0x085df67200000000, 0xc130971600000000, 0x8224ec0100000000, - 0x4718613800000000, 0x040c1a2f00000000, 0x4f00556600000000, - 0x0c142e7100000000, 0xc928a34800000000, 0x8a3cd85f00000000, - 0x4351b93b00000000, 0x0045c22c00000000, 0xc5794f1500000000, - 0x866d340200000000, 0x57a28ddd00000000, 0x14b6f6ca00000000, - 0xd18a7bf300000000, 0x929e00e400000000, 0x5bf3618000000000, - 0x18e71a9700000000, 0xdddb97ae00000000, 0x9ecfecb900000000, - 0x3e4295ca00000000, 0x7d56eedd00000000, 0xb86a63e400000000, - 0xfb7e18f300000000, 0x3213799700000000, 0x7107028000000000, - 0xb43b8fb900000000, 0xf72ff4ae00000000, 0x26e04d7100000000, - 0x65f4366600000000, 0xa0c8bb5f00000000, 0xe3dcc04800000000, - 0x2ab1a12c00000000, 0x69a5da3b00000000, 0xac99570200000000, - 0xef8d2c1500000000, 0xec82a4e400000000, 0xaf96dff300000000, - 0x6aaa52ca00000000, 0x29be29dd00000000, 0xe0d348b900000000, - 0xa3c733ae00000000, 0x66fbbe9700000000, 0x25efc58000000000, - 0xf4207c5f00000000, 0xb734074800000000, 0x72088a7100000000, - 0x311cf16600000000, 0xf871900200000000, 0xbb65eb1500000000, - 0x7e59662c00000000, 0x3d4d1d3b00000000, 0x9dc0644800000000, - 0xded41f5f00000000, 0x1be8926600000000, 0x58fce97100000000, - 0x9191881500000000, 0xd285f30200000000, 0x17b97e3b00000000, - 0x54ad052c00000000, 0x8562bcf300000000, 0xc676c7e400000000, - 0x034a4add00000000, 0x405e31ca00000000, 0x893350ae00000000, - 0xca272bb900000000, 0x0f1ba68000000000, 0x4c0fdd9700000000, - 0x4803c7b800000000, 0x0b17bcaf00000000, 0xce2b319600000000, - 0x8d3f4a8100000000, 0x44522be500000000, 0x074650f200000000, - 0xc27addcb00000000, 0x816ea6dc00000000, 0x50a11f0300000000, - 0x13b5641400000000, 0xd689e92d00000000, 0x959d923a00000000, - 0x5cf0f35e00000000, 0x1fe4884900000000, 0xdad8057000000000, - 0x99cc7e6700000000, 0x3941071400000000, 0x7a557c0300000000, - 0xbf69f13a00000000, 0xfc7d8a2d00000000, 0x3510eb4900000000, - 0x7604905e00000000, 0xb3381d6700000000, 0xf02c667000000000, - 0x21e3dfaf00000000, 0x62f7a4b800000000, 0xa7cb298100000000, - 0xe4df529600000000, 0x2db233f200000000, 0x6ea648e500000000, - 0xab9ac5dc00000000, 0xe88ebecb00000000, 0xeb81363a00000000, - 0xa8954d2d00000000, 0x6da9c01400000000, 0x2ebdbb0300000000, - 0xe7d0da6700000000, 0xa4c4a17000000000, 0x61f82c4900000000, - 0x22ec575e00000000, 0xf323ee8100000000, 0xb037959600000000, - 0x750b18af00000000, 0x361f63b800000000, 0xff7202dc00000000, - 0xbc6679cb00000000, 0x795af4f200000000, 0x3a4e8fe500000000, - 0x9ac3f69600000000, 0xd9d78d8100000000, 0x1ceb00b800000000, - 0x5fff7baf00000000, 0x96921acb00000000, 0xd58661dc00000000, - 0x10baece500000000, 0x53ae97f200000000, 0x82612e2d00000000, - 0xc175553a00000000, 0x0449d80300000000, 0x475da31400000000, - 0x8e30c27000000000, 0xcd24b96700000000, 0x0818345e00000000, - 0x4b0c4f4900000000}, - {0x0000000000000000, 0x3e6bc2ef00000000, 0x3dd0f50400000000, - 0x03bb37eb00000000, 0x7aa0eb0900000000, 0x44cb29e600000000, - 0x47701e0d00000000, 0x791bdce200000000, 0xf440d71300000000, - 0xca2b15fc00000000, 0xc990221700000000, 0xf7fbe0f800000000, - 0x8ee03c1a00000000, 0xb08bfef500000000, 0xb330c91e00000000, - 0x8d5b0bf100000000, 0xe881ae2700000000, 0xd6ea6cc800000000, - 0xd5515b2300000000, 0xeb3a99cc00000000, 0x9221452e00000000, - 0xac4a87c100000000, 0xaff1b02a00000000, 0x919a72c500000000, - 0x1cc1793400000000, 0x22aabbdb00000000, 0x21118c3000000000, - 0x1f7a4edf00000000, 0x6661923d00000000, 0x580a50d200000000, - 0x5bb1673900000000, 0x65daa5d600000000, 0xd0035d4f00000000, - 0xee689fa000000000, 0xedd3a84b00000000, 0xd3b86aa400000000, - 0xaaa3b64600000000, 0x94c874a900000000, 0x9773434200000000, - 0xa91881ad00000000, 0x24438a5c00000000, 0x1a2848b300000000, - 0x19937f5800000000, 0x27f8bdb700000000, 0x5ee3615500000000, - 0x6088a3ba00000000, 0x6333945100000000, 0x5d5856be00000000, - 0x3882f36800000000, 0x06e9318700000000, 0x0552066c00000000, - 0x3b39c48300000000, 0x4222186100000000, 0x7c49da8e00000000, - 0x7ff2ed6500000000, 0x41992f8a00000000, 0xccc2247b00000000, - 0xf2a9e69400000000, 0xf112d17f00000000, 0xcf79139000000000, - 0xb662cf7200000000, 0x88090d9d00000000, 0x8bb23a7600000000, - 0xb5d9f89900000000, 0xa007ba9e00000000, 0x9e6c787100000000, - 0x9dd74f9a00000000, 0xa3bc8d7500000000, 0xdaa7519700000000, - 0xe4cc937800000000, 0xe777a49300000000, 0xd91c667c00000000, - 0x54476d8d00000000, 0x6a2caf6200000000, 0x6997988900000000, - 0x57fc5a6600000000, 0x2ee7868400000000, 0x108c446b00000000, - 0x1337738000000000, 0x2d5cb16f00000000, 0x488614b900000000, - 0x76edd65600000000, 0x7556e1bd00000000, 0x4b3d235200000000, - 0x3226ffb000000000, 0x0c4d3d5f00000000, 0x0ff60ab400000000, - 0x319dc85b00000000, 0xbcc6c3aa00000000, 0x82ad014500000000, - 0x811636ae00000000, 0xbf7df44100000000, 0xc66628a300000000, - 0xf80dea4c00000000, 0xfbb6dda700000000, 0xc5dd1f4800000000, - 0x7004e7d100000000, 0x4e6f253e00000000, 0x4dd412d500000000, - 0x73bfd03a00000000, 0x0aa40cd800000000, 0x34cfce3700000000, - 0x3774f9dc00000000, 0x091f3b3300000000, 0x844430c200000000, - 0xba2ff22d00000000, 0xb994c5c600000000, 0x87ff072900000000, - 0xfee4dbcb00000000, 0xc08f192400000000, 0xc3342ecf00000000, - 0xfd5fec2000000000, 0x988549f600000000, 0xa6ee8b1900000000, - 0xa555bcf200000000, 0x9b3e7e1d00000000, 0xe225a2ff00000000, - 0xdc4e601000000000, 0xdff557fb00000000, 0xe19e951400000000, - 0x6cc59ee500000000, 0x52ae5c0a00000000, 0x51156be100000000, - 0x6f7ea90e00000000, 0x166575ec00000000, 0x280eb70300000000, - 0x2bb580e800000000, 0x15de420700000000, 0x010905e600000000, - 0x3f62c70900000000, 0x3cd9f0e200000000, 0x02b2320d00000000, - 0x7ba9eeef00000000, 0x45c22c0000000000, 0x46791beb00000000, - 0x7812d90400000000, 0xf549d2f500000000, 0xcb22101a00000000, - 0xc89927f100000000, 0xf6f2e51e00000000, 0x8fe939fc00000000, - 0xb182fb1300000000, 0xb239ccf800000000, 0x8c520e1700000000, - 0xe988abc100000000, 0xd7e3692e00000000, 0xd4585ec500000000, - 0xea339c2a00000000, 0x932840c800000000, 0xad43822700000000, - 0xaef8b5cc00000000, 0x9093772300000000, 0x1dc87cd200000000, - 0x23a3be3d00000000, 0x201889d600000000, 0x1e734b3900000000, - 0x676897db00000000, 0x5903553400000000, 0x5ab862df00000000, - 0x64d3a03000000000, 0xd10a58a900000000, 0xef619a4600000000, - 0xecdaadad00000000, 0xd2b16f4200000000, 0xabaab3a000000000, - 0x95c1714f00000000, 0x967a46a400000000, 0xa811844b00000000, - 0x254a8fba00000000, 0x1b214d5500000000, 0x189a7abe00000000, - 0x26f1b85100000000, 0x5fea64b300000000, 0x6181a65c00000000, - 0x623a91b700000000, 0x5c51535800000000, 0x398bf68e00000000, - 0x07e0346100000000, 0x045b038a00000000, 0x3a30c16500000000, - 0x432b1d8700000000, 0x7d40df6800000000, 0x7efbe88300000000, - 0x40902a6c00000000, 0xcdcb219d00000000, 0xf3a0e37200000000, - 0xf01bd49900000000, 0xce70167600000000, 0xb76bca9400000000, - 0x8900087b00000000, 0x8abb3f9000000000, 0xb4d0fd7f00000000, - 0xa10ebf7800000000, 0x9f657d9700000000, 0x9cde4a7c00000000, - 0xa2b5889300000000, 0xdbae547100000000, 0xe5c5969e00000000, - 0xe67ea17500000000, 0xd815639a00000000, 0x554e686b00000000, - 0x6b25aa8400000000, 0x689e9d6f00000000, 0x56f55f8000000000, - 0x2fee836200000000, 0x1185418d00000000, 0x123e766600000000, - 0x2c55b48900000000, 0x498f115f00000000, 0x77e4d3b000000000, - 0x745fe45b00000000, 0x4a3426b400000000, 0x332ffa5600000000, - 0x0d4438b900000000, 0x0eff0f5200000000, 0x3094cdbd00000000, - 0xbdcfc64c00000000, 0x83a404a300000000, 0x801f334800000000, - 0xbe74f1a700000000, 0xc76f2d4500000000, 0xf904efaa00000000, - 0xfabfd84100000000, 0xc4d41aae00000000, 0x710de23700000000, - 0x4f6620d800000000, 0x4cdd173300000000, 0x72b6d5dc00000000, - 0x0bad093e00000000, 0x35c6cbd100000000, 0x367dfc3a00000000, - 0x08163ed500000000, 0x854d352400000000, 0xbb26f7cb00000000, - 0xb89dc02000000000, 0x86f602cf00000000, 0xffedde2d00000000, - 0xc1861cc200000000, 0xc23d2b2900000000, 0xfc56e9c600000000, - 0x998c4c1000000000, 0xa7e78eff00000000, 0xa45cb91400000000, - 0x9a377bfb00000000, 0xe32ca71900000000, 0xdd4765f600000000, - 0xdefc521d00000000, 0xe09790f200000000, 0x6dcc9b0300000000, - 0x53a759ec00000000, 0x501c6e0700000000, 0x6e77ace800000000, - 0x176c700a00000000, 0x2907b2e500000000, 0x2abc850e00000000, - 0x14d747e100000000}, - {0x0000000000000000, 0xc0df8ec100000000, 0xc1b96c5800000000, - 0x0166e29900000000, 0x8273d9b000000000, 0x42ac577100000000, - 0x43cab5e800000000, 0x83153b2900000000, 0x45e1c3ba00000000, - 0x853e4d7b00000000, 0x8458afe200000000, 0x4487212300000000, - 0xc7921a0a00000000, 0x074d94cb00000000, 0x062b765200000000, - 0xc6f4f89300000000, 0xcbc4f6ae00000000, 0x0b1b786f00000000, - 0x0a7d9af600000000, 0xcaa2143700000000, 0x49b72f1e00000000, - 0x8968a1df00000000, 0x880e434600000000, 0x48d1cd8700000000, - 0x8e25351400000000, 0x4efabbd500000000, 0x4f9c594c00000000, - 0x8f43d78d00000000, 0x0c56eca400000000, 0xcc89626500000000, - 0xcdef80fc00000000, 0x0d300e3d00000000, 0xd78f9c8600000000, - 0x1750124700000000, 0x1636f0de00000000, 0xd6e97e1f00000000, - 0x55fc453600000000, 0x9523cbf700000000, 0x9445296e00000000, - 0x549aa7af00000000, 0x926e5f3c00000000, 0x52b1d1fd00000000, - 0x53d7336400000000, 0x9308bda500000000, 0x101d868c00000000, - 0xd0c2084d00000000, 0xd1a4ead400000000, 0x117b641500000000, - 0x1c4b6a2800000000, 0xdc94e4e900000000, 0xddf2067000000000, - 0x1d2d88b100000000, 0x9e38b39800000000, 0x5ee73d5900000000, - 0x5f81dfc000000000, 0x9f5e510100000000, 0x59aaa99200000000, - 0x9975275300000000, 0x9813c5ca00000000, 0x58cc4b0b00000000, - 0xdbd9702200000000, 0x1b06fee300000000, 0x1a601c7a00000000, - 0xdabf92bb00000000, 0xef1948d600000000, 0x2fc6c61700000000, - 0x2ea0248e00000000, 0xee7faa4f00000000, 0x6d6a916600000000, - 0xadb51fa700000000, 0xacd3fd3e00000000, 0x6c0c73ff00000000, - 0xaaf88b6c00000000, 0x6a2705ad00000000, 0x6b41e73400000000, - 0xab9e69f500000000, 0x288b52dc00000000, 0xe854dc1d00000000, - 0xe9323e8400000000, 0x29edb04500000000, 0x24ddbe7800000000, - 0xe40230b900000000, 0xe564d22000000000, 0x25bb5ce100000000, - 0xa6ae67c800000000, 0x6671e90900000000, 0x67170b9000000000, - 0xa7c8855100000000, 0x613c7dc200000000, 0xa1e3f30300000000, - 0xa085119a00000000, 0x605a9f5b00000000, 0xe34fa47200000000, - 0x23902ab300000000, 0x22f6c82a00000000, 0xe22946eb00000000, - 0x3896d45000000000, 0xf8495a9100000000, 0xf92fb80800000000, - 0x39f036c900000000, 0xbae50de000000000, 0x7a3a832100000000, - 0x7b5c61b800000000, 0xbb83ef7900000000, 0x7d7717ea00000000, - 0xbda8992b00000000, 0xbcce7bb200000000, 0x7c11f57300000000, - 0xff04ce5a00000000, 0x3fdb409b00000000, 0x3ebda20200000000, - 0xfe622cc300000000, 0xf35222fe00000000, 0x338dac3f00000000, - 0x32eb4ea600000000, 0xf234c06700000000, 0x7121fb4e00000000, - 0xb1fe758f00000000, 0xb098971600000000, 0x704719d700000000, - 0xb6b3e14400000000, 0x766c6f8500000000, 0x770a8d1c00000000, - 0xb7d503dd00000000, 0x34c038f400000000, 0xf41fb63500000000, - 0xf57954ac00000000, 0x35a6da6d00000000, 0x9f35e17700000000, - 0x5fea6fb600000000, 0x5e8c8d2f00000000, 0x9e5303ee00000000, - 0x1d4638c700000000, 0xdd99b60600000000, 0xdcff549f00000000, - 0x1c20da5e00000000, 0xdad422cd00000000, 0x1a0bac0c00000000, - 0x1b6d4e9500000000, 0xdbb2c05400000000, 0x58a7fb7d00000000, - 0x987875bc00000000, 0x991e972500000000, 0x59c119e400000000, - 0x54f117d900000000, 0x942e991800000000, 0x95487b8100000000, - 0x5597f54000000000, 0xd682ce6900000000, 0x165d40a800000000, - 0x173ba23100000000, 0xd7e42cf000000000, 0x1110d46300000000, - 0xd1cf5aa200000000, 0xd0a9b83b00000000, 0x107636fa00000000, - 0x93630dd300000000, 0x53bc831200000000, 0x52da618b00000000, - 0x9205ef4a00000000, 0x48ba7df100000000, 0x8865f33000000000, - 0x890311a900000000, 0x49dc9f6800000000, 0xcac9a44100000000, - 0x0a162a8000000000, 0x0b70c81900000000, 0xcbaf46d800000000, - 0x0d5bbe4b00000000, 0xcd84308a00000000, 0xcce2d21300000000, - 0x0c3d5cd200000000, 0x8f2867fb00000000, 0x4ff7e93a00000000, - 0x4e910ba300000000, 0x8e4e856200000000, 0x837e8b5f00000000, - 0x43a1059e00000000, 0x42c7e70700000000, 0x821869c600000000, - 0x010d52ef00000000, 0xc1d2dc2e00000000, 0xc0b43eb700000000, - 0x006bb07600000000, 0xc69f48e500000000, 0x0640c62400000000, - 0x072624bd00000000, 0xc7f9aa7c00000000, 0x44ec915500000000, - 0x84331f9400000000, 0x8555fd0d00000000, 0x458a73cc00000000, - 0x702ca9a100000000, 0xb0f3276000000000, 0xb195c5f900000000, - 0x714a4b3800000000, 0xf25f701100000000, 0x3280fed000000000, - 0x33e61c4900000000, 0xf339928800000000, 0x35cd6a1b00000000, - 0xf512e4da00000000, 0xf474064300000000, 0x34ab888200000000, - 0xb7beb3ab00000000, 0x77613d6a00000000, 0x7607dff300000000, - 0xb6d8513200000000, 0xbbe85f0f00000000, 0x7b37d1ce00000000, - 0x7a51335700000000, 0xba8ebd9600000000, 0x399b86bf00000000, - 0xf944087e00000000, 0xf822eae700000000, 0x38fd642600000000, - 0xfe099cb500000000, 0x3ed6127400000000, 0x3fb0f0ed00000000, - 0xff6f7e2c00000000, 0x7c7a450500000000, 0xbca5cbc400000000, - 0xbdc3295d00000000, 0x7d1ca79c00000000, 0xa7a3352700000000, - 0x677cbbe600000000, 0x661a597f00000000, 0xa6c5d7be00000000, - 0x25d0ec9700000000, 0xe50f625600000000, 0xe46980cf00000000, - 0x24b60e0e00000000, 0xe242f69d00000000, 0x229d785c00000000, - 0x23fb9ac500000000, 0xe324140400000000, 0x60312f2d00000000, - 0xa0eea1ec00000000, 0xa188437500000000, 0x6157cdb400000000, - 0x6c67c38900000000, 0xacb84d4800000000, 0xaddeafd100000000, - 0x6d01211000000000, 0xee141a3900000000, 0x2ecb94f800000000, - 0x2fad766100000000, 0xef72f8a000000000, 0x2986003300000000, - 0xe9598ef200000000, 0xe83f6c6b00000000, 0x28e0e2aa00000000, - 0xabf5d98300000000, 0x6b2a574200000000, 0x6a4cb5db00000000, - 0xaa933b1a00000000}, - {0x0000000000000000, 0x6f4ca59b00000000, 0x9f9e3bec00000000, - 0xf0d29e7700000000, 0x7f3b060300000000, 0x1077a39800000000, - 0xe0a53def00000000, 0x8fe9987400000000, 0xfe760c0600000000, - 0x913aa99d00000000, 0x61e837ea00000000, 0x0ea4927100000000, - 0x814d0a0500000000, 0xee01af9e00000000, 0x1ed331e900000000, - 0x719f947200000000, 0xfced180c00000000, 0x93a1bd9700000000, - 0x637323e000000000, 0x0c3f867b00000000, 0x83d61e0f00000000, - 0xec9abb9400000000, 0x1c4825e300000000, 0x7304807800000000, - 0x029b140a00000000, 0x6dd7b19100000000, 0x9d052fe600000000, - 0xf2498a7d00000000, 0x7da0120900000000, 0x12ecb79200000000, - 0xe23e29e500000000, 0x8d728c7e00000000, 0xf8db311800000000, - 0x9797948300000000, 0x67450af400000000, 0x0809af6f00000000, - 0x87e0371b00000000, 0xe8ac928000000000, 0x187e0cf700000000, - 0x7732a96c00000000, 0x06ad3d1e00000000, 0x69e1988500000000, - 0x993306f200000000, 0xf67fa36900000000, 0x79963b1d00000000, - 0x16da9e8600000000, 0xe60800f100000000, 0x8944a56a00000000, - 0x0436291400000000, 0x6b7a8c8f00000000, 0x9ba812f800000000, - 0xf4e4b76300000000, 0x7b0d2f1700000000, 0x14418a8c00000000, - 0xe49314fb00000000, 0x8bdfb16000000000, 0xfa40251200000000, - 0x950c808900000000, 0x65de1efe00000000, 0x0a92bb6500000000, - 0x857b231100000000, 0xea37868a00000000, 0x1ae518fd00000000, - 0x75a9bd6600000000, 0xf0b7633000000000, 0x9ffbc6ab00000000, - 0x6f2958dc00000000, 0x0065fd4700000000, 0x8f8c653300000000, - 0xe0c0c0a800000000, 0x10125edf00000000, 0x7f5efb4400000000, - 0x0ec16f3600000000, 0x618dcaad00000000, 0x915f54da00000000, - 0xfe13f14100000000, 0x71fa693500000000, 0x1eb6ccae00000000, - 0xee6452d900000000, 0x8128f74200000000, 0x0c5a7b3c00000000, - 0x6316dea700000000, 0x93c440d000000000, 0xfc88e54b00000000, - 0x73617d3f00000000, 0x1c2dd8a400000000, 0xecff46d300000000, - 0x83b3e34800000000, 0xf22c773a00000000, 0x9d60d2a100000000, - 0x6db24cd600000000, 0x02fee94d00000000, 0x8d17713900000000, - 0xe25bd4a200000000, 0x12894ad500000000, 0x7dc5ef4e00000000, - 0x086c522800000000, 0x6720f7b300000000, 0x97f269c400000000, - 0xf8becc5f00000000, 0x7757542b00000000, 0x181bf1b000000000, - 0xe8c96fc700000000, 0x8785ca5c00000000, 0xf61a5e2e00000000, - 0x9956fbb500000000, 0x698465c200000000, 0x06c8c05900000000, - 0x8921582d00000000, 0xe66dfdb600000000, 0x16bf63c100000000, - 0x79f3c65a00000000, 0xf4814a2400000000, 0x9bcdefbf00000000, - 0x6b1f71c800000000, 0x0453d45300000000, 0x8bba4c2700000000, - 0xe4f6e9bc00000000, 0x142477cb00000000, 0x7b68d25000000000, - 0x0af7462200000000, 0x65bbe3b900000000, 0x95697dce00000000, - 0xfa25d85500000000, 0x75cc402100000000, 0x1a80e5ba00000000, - 0xea527bcd00000000, 0x851ede5600000000, 0xe06fc76000000000, - 0x8f2362fb00000000, 0x7ff1fc8c00000000, 0x10bd591700000000, - 0x9f54c16300000000, 0xf01864f800000000, 0x00cafa8f00000000, - 0x6f865f1400000000, 0x1e19cb6600000000, 0x71556efd00000000, - 0x8187f08a00000000, 0xeecb551100000000, 0x6122cd6500000000, - 0x0e6e68fe00000000, 0xfebcf68900000000, 0x91f0531200000000, - 0x1c82df6c00000000, 0x73ce7af700000000, 0x831ce48000000000, - 0xec50411b00000000, 0x63b9d96f00000000, 0x0cf57cf400000000, - 0xfc27e28300000000, 0x936b471800000000, 0xe2f4d36a00000000, - 0x8db876f100000000, 0x7d6ae88600000000, 0x12264d1d00000000, - 0x9dcfd56900000000, 0xf28370f200000000, 0x0251ee8500000000, - 0x6d1d4b1e00000000, 0x18b4f67800000000, 0x77f853e300000000, - 0x872acd9400000000, 0xe866680f00000000, 0x678ff07b00000000, - 0x08c355e000000000, 0xf811cb9700000000, 0x975d6e0c00000000, - 0xe6c2fa7e00000000, 0x898e5fe500000000, 0x795cc19200000000, - 0x1610640900000000, 0x99f9fc7d00000000, 0xf6b559e600000000, - 0x0667c79100000000, 0x692b620a00000000, 0xe459ee7400000000, - 0x8b154bef00000000, 0x7bc7d59800000000, 0x148b700300000000, - 0x9b62e87700000000, 0xf42e4dec00000000, 0x04fcd39b00000000, - 0x6bb0760000000000, 0x1a2fe27200000000, 0x756347e900000000, - 0x85b1d99e00000000, 0xeafd7c0500000000, 0x6514e47100000000, - 0x0a5841ea00000000, 0xfa8adf9d00000000, 0x95c67a0600000000, - 0x10d8a45000000000, 0x7f9401cb00000000, 0x8f469fbc00000000, - 0xe00a3a2700000000, 0x6fe3a25300000000, 0x00af07c800000000, - 0xf07d99bf00000000, 0x9f313c2400000000, 0xeeaea85600000000, - 0x81e20dcd00000000, 0x713093ba00000000, 0x1e7c362100000000, - 0x9195ae5500000000, 0xfed90bce00000000, 0x0e0b95b900000000, - 0x6147302200000000, 0xec35bc5c00000000, 0x837919c700000000, - 0x73ab87b000000000, 0x1ce7222b00000000, 0x930eba5f00000000, - 0xfc421fc400000000, 0x0c9081b300000000, 0x63dc242800000000, - 0x1243b05a00000000, 0x7d0f15c100000000, 0x8ddd8bb600000000, - 0xe2912e2d00000000, 0x6d78b65900000000, 0x023413c200000000, - 0xf2e68db500000000, 0x9daa282e00000000, 0xe803954800000000, - 0x874f30d300000000, 0x779daea400000000, 0x18d10b3f00000000, - 0x9738934b00000000, 0xf87436d000000000, 0x08a6a8a700000000, - 0x67ea0d3c00000000, 0x1675994e00000000, 0x79393cd500000000, - 0x89eba2a200000000, 0xe6a7073900000000, 0x694e9f4d00000000, - 0x06023ad600000000, 0xf6d0a4a100000000, 0x999c013a00000000, - 0x14ee8d4400000000, 0x7ba228df00000000, 0x8b70b6a800000000, - 0xe43c133300000000, 0x6bd58b4700000000, 0x04992edc00000000, - 0xf44bb0ab00000000, 0x9b07153000000000, 0xea98814200000000, - 0x85d424d900000000, 0x7506baae00000000, 0x1a4a1f3500000000, - 0x95a3874100000000, 0xfaef22da00000000, 0x0a3dbcad00000000, - 0x6571193600000000}, - {0x0000000000000000, 0x85d996dd00000000, 0x4bb55c6000000000, - 0xce6ccabd00000000, 0x966ab9c000000000, 0x13b32f1d00000000, - 0xdddfe5a000000000, 0x5806737d00000000, 0x6dd3035a00000000, - 0xe80a958700000000, 0x26665f3a00000000, 0xa3bfc9e700000000, - 0xfbb9ba9a00000000, 0x7e602c4700000000, 0xb00ce6fa00000000, - 0x35d5702700000000, 0xdaa607b400000000, 0x5f7f916900000000, - 0x91135bd400000000, 0x14cacd0900000000, 0x4cccbe7400000000, - 0xc91528a900000000, 0x0779e21400000000, 0x82a074c900000000, - 0xb77504ee00000000, 0x32ac923300000000, 0xfcc0588e00000000, - 0x7919ce5300000000, 0x211fbd2e00000000, 0xa4c62bf300000000, - 0x6aaae14e00000000, 0xef73779300000000, 0xf54b7eb300000000, - 0x7092e86e00000000, 0xbefe22d300000000, 0x3b27b40e00000000, - 0x6321c77300000000, 0xe6f851ae00000000, 0x28949b1300000000, - 0xad4d0dce00000000, 0x98987de900000000, 0x1d41eb3400000000, - 0xd32d218900000000, 0x56f4b75400000000, 0x0ef2c42900000000, - 0x8b2b52f400000000, 0x4547984900000000, 0xc09e0e9400000000, - 0x2fed790700000000, 0xaa34efda00000000, 0x6458256700000000, - 0xe181b3ba00000000, 0xb987c0c700000000, 0x3c5e561a00000000, - 0xf2329ca700000000, 0x77eb0a7a00000000, 0x423e7a5d00000000, - 0xc7e7ec8000000000, 0x098b263d00000000, 0x8c52b0e000000000, - 0xd454c39d00000000, 0x518d554000000000, 0x9fe19ffd00000000, - 0x1a38092000000000, 0xab918dbd00000000, 0x2e481b6000000000, - 0xe024d1dd00000000, 0x65fd470000000000, 0x3dfb347d00000000, - 0xb822a2a000000000, 0x764e681d00000000, 0xf397fec000000000, - 0xc6428ee700000000, 0x439b183a00000000, 0x8df7d28700000000, - 0x082e445a00000000, 0x5028372700000000, 0xd5f1a1fa00000000, - 0x1b9d6b4700000000, 0x9e44fd9a00000000, 0x71378a0900000000, - 0xf4ee1cd400000000, 0x3a82d66900000000, 0xbf5b40b400000000, - 0xe75d33c900000000, 0x6284a51400000000, 0xace86fa900000000, - 0x2931f97400000000, 0x1ce4895300000000, 0x993d1f8e00000000, - 0x5751d53300000000, 0xd28843ee00000000, 0x8a8e309300000000, - 0x0f57a64e00000000, 0xc13b6cf300000000, 0x44e2fa2e00000000, - 0x5edaf30e00000000, 0xdb0365d300000000, 0x156faf6e00000000, - 0x90b639b300000000, 0xc8b04ace00000000, 0x4d69dc1300000000, - 0x830516ae00000000, 0x06dc807300000000, 0x3309f05400000000, - 0xb6d0668900000000, 0x78bcac3400000000, 0xfd653ae900000000, - 0xa563499400000000, 0x20badf4900000000, 0xeed615f400000000, - 0x6b0f832900000000, 0x847cf4ba00000000, 0x01a5626700000000, - 0xcfc9a8da00000000, 0x4a103e0700000000, 0x12164d7a00000000, - 0x97cfdba700000000, 0x59a3111a00000000, 0xdc7a87c700000000, - 0xe9aff7e000000000, 0x6c76613d00000000, 0xa21aab8000000000, - 0x27c33d5d00000000, 0x7fc54e2000000000, 0xfa1cd8fd00000000, - 0x3470124000000000, 0xb1a9849d00000000, 0x17256aa000000000, - 0x92fcfc7d00000000, 0x5c9036c000000000, 0xd949a01d00000000, - 0x814fd36000000000, 0x049645bd00000000, 0xcafa8f0000000000, - 0x4f2319dd00000000, 0x7af669fa00000000, 0xff2fff2700000000, - 0x3143359a00000000, 0xb49aa34700000000, 0xec9cd03a00000000, - 0x694546e700000000, 0xa7298c5a00000000, 0x22f01a8700000000, - 0xcd836d1400000000, 0x485afbc900000000, 0x8636317400000000, - 0x03efa7a900000000, 0x5be9d4d400000000, 0xde30420900000000, - 0x105c88b400000000, 0x95851e6900000000, 0xa0506e4e00000000, - 0x2589f89300000000, 0xebe5322e00000000, 0x6e3ca4f300000000, - 0x363ad78e00000000, 0xb3e3415300000000, 0x7d8f8bee00000000, - 0xf8561d3300000000, 0xe26e141300000000, 0x67b782ce00000000, - 0xa9db487300000000, 0x2c02deae00000000, 0x7404add300000000, - 0xf1dd3b0e00000000, 0x3fb1f1b300000000, 0xba68676e00000000, - 0x8fbd174900000000, 0x0a64819400000000, 0xc4084b2900000000, - 0x41d1ddf400000000, 0x19d7ae8900000000, 0x9c0e385400000000, - 0x5262f2e900000000, 0xd7bb643400000000, 0x38c813a700000000, - 0xbd11857a00000000, 0x737d4fc700000000, 0xf6a4d91a00000000, - 0xaea2aa6700000000, 0x2b7b3cba00000000, 0xe517f60700000000, - 0x60ce60da00000000, 0x551b10fd00000000, 0xd0c2862000000000, - 0x1eae4c9d00000000, 0x9b77da4000000000, 0xc371a93d00000000, - 0x46a83fe000000000, 0x88c4f55d00000000, 0x0d1d638000000000, - 0xbcb4e71d00000000, 0x396d71c000000000, 0xf701bb7d00000000, - 0x72d82da000000000, 0x2ade5edd00000000, 0xaf07c80000000000, - 0x616b02bd00000000, 0xe4b2946000000000, 0xd167e44700000000, - 0x54be729a00000000, 0x9ad2b82700000000, 0x1f0b2efa00000000, - 0x470d5d8700000000, 0xc2d4cb5a00000000, 0x0cb801e700000000, - 0x8961973a00000000, 0x6612e0a900000000, 0xe3cb767400000000, - 0x2da7bcc900000000, 0xa87e2a1400000000, 0xf078596900000000, - 0x75a1cfb400000000, 0xbbcd050900000000, 0x3e1493d400000000, - 0x0bc1e3f300000000, 0x8e18752e00000000, 0x4074bf9300000000, - 0xc5ad294e00000000, 0x9dab5a3300000000, 0x1872ccee00000000, - 0xd61e065300000000, 0x53c7908e00000000, 0x49ff99ae00000000, - 0xcc260f7300000000, 0x024ac5ce00000000, 0x8793531300000000, - 0xdf95206e00000000, 0x5a4cb6b300000000, 0x94207c0e00000000, - 0x11f9ead300000000, 0x242c9af400000000, 0xa1f50c2900000000, - 0x6f99c69400000000, 0xea40504900000000, 0xb246233400000000, - 0x379fb5e900000000, 0xf9f37f5400000000, 0x7c2ae98900000000, - 0x93599e1a00000000, 0x168008c700000000, 0xd8ecc27a00000000, - 0x5d3554a700000000, 0x053327da00000000, 0x80eab10700000000, - 0x4e867bba00000000, 0xcb5fed6700000000, 0xfe8a9d4000000000, - 0x7b530b9d00000000, 0xb53fc12000000000, 0x30e657fd00000000, - 0x68e0248000000000, 0xed39b25d00000000, 0x235578e000000000, - 0xa68cee3d00000000}, - {0x0000000000000000, 0x76e10f9d00000000, 0xadc46ee100000000, - 0xdb25617c00000000, 0x1b8fac1900000000, 0x6d6ea38400000000, - 0xb64bc2f800000000, 0xc0aacd6500000000, 0x361e593300000000, - 0x40ff56ae00000000, 0x9bda37d200000000, 0xed3b384f00000000, - 0x2d91f52a00000000, 0x5b70fab700000000, 0x80559bcb00000000, - 0xf6b4945600000000, 0x6c3cb26600000000, 0x1addbdfb00000000, - 0xc1f8dc8700000000, 0xb719d31a00000000, 0x77b31e7f00000000, - 0x015211e200000000, 0xda77709e00000000, 0xac967f0300000000, - 0x5a22eb5500000000, 0x2cc3e4c800000000, 0xf7e685b400000000, - 0x81078a2900000000, 0x41ad474c00000000, 0x374c48d100000000, - 0xec6929ad00000000, 0x9a88263000000000, 0xd87864cd00000000, - 0xae996b5000000000, 0x75bc0a2c00000000, 0x035d05b100000000, - 0xc3f7c8d400000000, 0xb516c74900000000, 0x6e33a63500000000, - 0x18d2a9a800000000, 0xee663dfe00000000, 0x9887326300000000, - 0x43a2531f00000000, 0x35435c8200000000, 0xf5e991e700000000, - 0x83089e7a00000000, 0x582dff0600000000, 0x2eccf09b00000000, - 0xb444d6ab00000000, 0xc2a5d93600000000, 0x1980b84a00000000, - 0x6f61b7d700000000, 0xafcb7ab200000000, 0xd92a752f00000000, - 0x020f145300000000, 0x74ee1bce00000000, 0x825a8f9800000000, - 0xf4bb800500000000, 0x2f9ee17900000000, 0x597feee400000000, - 0x99d5238100000000, 0xef342c1c00000000, 0x34114d6000000000, - 0x42f042fd00000000, 0xf1f7b94100000000, 0x8716b6dc00000000, - 0x5c33d7a000000000, 0x2ad2d83d00000000, 0xea78155800000000, - 0x9c991ac500000000, 0x47bc7bb900000000, 0x315d742400000000, - 0xc7e9e07200000000, 0xb108efef00000000, 0x6a2d8e9300000000, - 0x1ccc810e00000000, 0xdc664c6b00000000, 0xaa8743f600000000, - 0x71a2228a00000000, 0x07432d1700000000, 0x9dcb0b2700000000, - 0xeb2a04ba00000000, 0x300f65c600000000, 0x46ee6a5b00000000, - 0x8644a73e00000000, 0xf0a5a8a300000000, 0x2b80c9df00000000, - 0x5d61c64200000000, 0xabd5521400000000, 0xdd345d8900000000, - 0x06113cf500000000, 0x70f0336800000000, 0xb05afe0d00000000, - 0xc6bbf19000000000, 0x1d9e90ec00000000, 0x6b7f9f7100000000, - 0x298fdd8c00000000, 0x5f6ed21100000000, 0x844bb36d00000000, - 0xf2aabcf000000000, 0x3200719500000000, 0x44e17e0800000000, - 0x9fc41f7400000000, 0xe92510e900000000, 0x1f9184bf00000000, - 0x69708b2200000000, 0xb255ea5e00000000, 0xc4b4e5c300000000, - 0x041e28a600000000, 0x72ff273b00000000, 0xa9da464700000000, - 0xdf3b49da00000000, 0x45b36fea00000000, 0x3352607700000000, - 0xe877010b00000000, 0x9e960e9600000000, 0x5e3cc3f300000000, - 0x28ddcc6e00000000, 0xf3f8ad1200000000, 0x8519a28f00000000, - 0x73ad36d900000000, 0x054c394400000000, 0xde69583800000000, - 0xa88857a500000000, 0x68229ac000000000, 0x1ec3955d00000000, - 0xc5e6f42100000000, 0xb307fbbc00000000, 0xe2ef738300000000, - 0x940e7c1e00000000, 0x4f2b1d6200000000, 0x39ca12ff00000000, - 0xf960df9a00000000, 0x8f81d00700000000, 0x54a4b17b00000000, - 0x2245bee600000000, 0xd4f12ab000000000, 0xa210252d00000000, - 0x7935445100000000, 0x0fd44bcc00000000, 0xcf7e86a900000000, - 0xb99f893400000000, 0x62bae84800000000, 0x145be7d500000000, - 0x8ed3c1e500000000, 0xf832ce7800000000, 0x2317af0400000000, - 0x55f6a09900000000, 0x955c6dfc00000000, 0xe3bd626100000000, - 0x3898031d00000000, 0x4e790c8000000000, 0xb8cd98d600000000, - 0xce2c974b00000000, 0x1509f63700000000, 0x63e8f9aa00000000, - 0xa34234cf00000000, 0xd5a33b5200000000, 0x0e865a2e00000000, - 0x786755b300000000, 0x3a97174e00000000, 0x4c7618d300000000, - 0x975379af00000000, 0xe1b2763200000000, 0x2118bb5700000000, - 0x57f9b4ca00000000, 0x8cdcd5b600000000, 0xfa3dda2b00000000, - 0x0c894e7d00000000, 0x7a6841e000000000, 0xa14d209c00000000, - 0xd7ac2f0100000000, 0x1706e26400000000, 0x61e7edf900000000, - 0xbac28c8500000000, 0xcc23831800000000, 0x56aba52800000000, - 0x204aaab500000000, 0xfb6fcbc900000000, 0x8d8ec45400000000, - 0x4d24093100000000, 0x3bc506ac00000000, 0xe0e067d000000000, - 0x9601684d00000000, 0x60b5fc1b00000000, 0x1654f38600000000, - 0xcd7192fa00000000, 0xbb909d6700000000, 0x7b3a500200000000, - 0x0ddb5f9f00000000, 0xd6fe3ee300000000, 0xa01f317e00000000, - 0x1318cac200000000, 0x65f9c55f00000000, 0xbedca42300000000, - 0xc83dabbe00000000, 0x089766db00000000, 0x7e76694600000000, - 0xa553083a00000000, 0xd3b207a700000000, 0x250693f100000000, - 0x53e79c6c00000000, 0x88c2fd1000000000, 0xfe23f28d00000000, - 0x3e893fe800000000, 0x4868307500000000, 0x934d510900000000, - 0xe5ac5e9400000000, 0x7f2478a400000000, 0x09c5773900000000, - 0xd2e0164500000000, 0xa40119d800000000, 0x64abd4bd00000000, - 0x124adb2000000000, 0xc96fba5c00000000, 0xbf8eb5c100000000, - 0x493a219700000000, 0x3fdb2e0a00000000, 0xe4fe4f7600000000, - 0x921f40eb00000000, 0x52b58d8e00000000, 0x2454821300000000, - 0xff71e36f00000000, 0x8990ecf200000000, 0xcb60ae0f00000000, - 0xbd81a19200000000, 0x66a4c0ee00000000, 0x1045cf7300000000, - 0xd0ef021600000000, 0xa60e0d8b00000000, 0x7d2b6cf700000000, - 0x0bca636a00000000, 0xfd7ef73c00000000, 0x8b9ff8a100000000, - 0x50ba99dd00000000, 0x265b964000000000, 0xe6f15b2500000000, - 0x901054b800000000, 0x4b3535c400000000, 0x3dd43a5900000000, - 0xa75c1c6900000000, 0xd1bd13f400000000, 0x0a98728800000000, - 0x7c797d1500000000, 0xbcd3b07000000000, 0xca32bfed00000000, - 0x1117de9100000000, 0x67f6d10c00000000, 0x9142455a00000000, - 0xe7a34ac700000000, 0x3c862bbb00000000, 0x4a67242600000000, - 0x8acde94300000000, 0xfc2ce6de00000000, 0x270987a200000000, - 0x51e8883f00000000}, - {0x0000000000000000, 0xe8dbfbb900000000, 0x91b186a800000000, - 0x796a7d1100000000, 0x63657c8a00000000, 0x8bbe873300000000, - 0xf2d4fa2200000000, 0x1a0f019b00000000, 0x87cc89cf00000000, - 0x6f17727600000000, 0x167d0f6700000000, 0xfea6f4de00000000, - 0xe4a9f54500000000, 0x0c720efc00000000, 0x751873ed00000000, - 0x9dc3885400000000, 0x4f9f624400000000, 0xa74499fd00000000, - 0xde2ee4ec00000000, 0x36f51f5500000000, 0x2cfa1ece00000000, - 0xc421e57700000000, 0xbd4b986600000000, 0x559063df00000000, - 0xc853eb8b00000000, 0x2088103200000000, 0x59e26d2300000000, - 0xb139969a00000000, 0xab36970100000000, 0x43ed6cb800000000, - 0x3a8711a900000000, 0xd25cea1000000000, 0x9e3ec58800000000, - 0x76e53e3100000000, 0x0f8f432000000000, 0xe754b89900000000, - 0xfd5bb90200000000, 0x158042bb00000000, 0x6cea3faa00000000, - 0x8431c41300000000, 0x19f24c4700000000, 0xf129b7fe00000000, - 0x8843caef00000000, 0x6098315600000000, 0x7a9730cd00000000, - 0x924ccb7400000000, 0xeb26b66500000000, 0x03fd4ddc00000000, - 0xd1a1a7cc00000000, 0x397a5c7500000000, 0x4010216400000000, - 0xa8cbdadd00000000, 0xb2c4db4600000000, 0x5a1f20ff00000000, - 0x23755dee00000000, 0xcbaea65700000000, 0x566d2e0300000000, - 0xbeb6d5ba00000000, 0xc7dca8ab00000000, 0x2f07531200000000, - 0x3508528900000000, 0xddd3a93000000000, 0xa4b9d42100000000, - 0x4c622f9800000000, 0x7d7bfbca00000000, 0x95a0007300000000, - 0xecca7d6200000000, 0x041186db00000000, 0x1e1e874000000000, - 0xf6c57cf900000000, 0x8faf01e800000000, 0x6774fa5100000000, - 0xfab7720500000000, 0x126c89bc00000000, 0x6b06f4ad00000000, - 0x83dd0f1400000000, 0x99d20e8f00000000, 0x7109f53600000000, - 0x0863882700000000, 0xe0b8739e00000000, 0x32e4998e00000000, - 0xda3f623700000000, 0xa3551f2600000000, 0x4b8ee49f00000000, - 0x5181e50400000000, 0xb95a1ebd00000000, 0xc03063ac00000000, - 0x28eb981500000000, 0xb528104100000000, 0x5df3ebf800000000, - 0x249996e900000000, 0xcc426d5000000000, 0xd64d6ccb00000000, - 0x3e96977200000000, 0x47fcea6300000000, 0xaf2711da00000000, - 0xe3453e4200000000, 0x0b9ec5fb00000000, 0x72f4b8ea00000000, - 0x9a2f435300000000, 0x802042c800000000, 0x68fbb97100000000, - 0x1191c46000000000, 0xf94a3fd900000000, 0x6489b78d00000000, - 0x8c524c3400000000, 0xf538312500000000, 0x1de3ca9c00000000, - 0x07eccb0700000000, 0xef3730be00000000, 0x965d4daf00000000, - 0x7e86b61600000000, 0xacda5c0600000000, 0x4401a7bf00000000, - 0x3d6bdaae00000000, 0xd5b0211700000000, 0xcfbf208c00000000, - 0x2764db3500000000, 0x5e0ea62400000000, 0xb6d55d9d00000000, - 0x2b16d5c900000000, 0xc3cd2e7000000000, 0xbaa7536100000000, - 0x527ca8d800000000, 0x4873a94300000000, 0xa0a852fa00000000, - 0xd9c22feb00000000, 0x3119d45200000000, 0xbbf0874e00000000, - 0x532b7cf700000000, 0x2a4101e600000000, 0xc29afa5f00000000, - 0xd895fbc400000000, 0x304e007d00000000, 0x49247d6c00000000, - 0xa1ff86d500000000, 0x3c3c0e8100000000, 0xd4e7f53800000000, - 0xad8d882900000000, 0x4556739000000000, 0x5f59720b00000000, - 0xb78289b200000000, 0xcee8f4a300000000, 0x26330f1a00000000, - 0xf46fe50a00000000, 0x1cb41eb300000000, 0x65de63a200000000, - 0x8d05981b00000000, 0x970a998000000000, 0x7fd1623900000000, - 0x06bb1f2800000000, 0xee60e49100000000, 0x73a36cc500000000, - 0x9b78977c00000000, 0xe212ea6d00000000, 0x0ac911d400000000, - 0x10c6104f00000000, 0xf81debf600000000, 0x817796e700000000, - 0x69ac6d5e00000000, 0x25ce42c600000000, 0xcd15b97f00000000, - 0xb47fc46e00000000, 0x5ca43fd700000000, 0x46ab3e4c00000000, - 0xae70c5f500000000, 0xd71ab8e400000000, 0x3fc1435d00000000, - 0xa202cb0900000000, 0x4ad930b000000000, 0x33b34da100000000, - 0xdb68b61800000000, 0xc167b78300000000, 0x29bc4c3a00000000, - 0x50d6312b00000000, 0xb80dca9200000000, 0x6a51208200000000, - 0x828adb3b00000000, 0xfbe0a62a00000000, 0x133b5d9300000000, - 0x09345c0800000000, 0xe1efa7b100000000, 0x9885daa000000000, - 0x705e211900000000, 0xed9da94d00000000, 0x054652f400000000, - 0x7c2c2fe500000000, 0x94f7d45c00000000, 0x8ef8d5c700000000, - 0x66232e7e00000000, 0x1f49536f00000000, 0xf792a8d600000000, - 0xc68b7c8400000000, 0x2e50873d00000000, 0x573afa2c00000000, - 0xbfe1019500000000, 0xa5ee000e00000000, 0x4d35fbb700000000, - 0x345f86a600000000, 0xdc847d1f00000000, 0x4147f54b00000000, - 0xa99c0ef200000000, 0xd0f673e300000000, 0x382d885a00000000, - 0x222289c100000000, 0xcaf9727800000000, 0xb3930f6900000000, - 0x5b48f4d000000000, 0x89141ec000000000, 0x61cfe57900000000, - 0x18a5986800000000, 0xf07e63d100000000, 0xea71624a00000000, - 0x02aa99f300000000, 0x7bc0e4e200000000, 0x931b1f5b00000000, - 0x0ed8970f00000000, 0xe6036cb600000000, 0x9f6911a700000000, - 0x77b2ea1e00000000, 0x6dbdeb8500000000, 0x8566103c00000000, - 0xfc0c6d2d00000000, 0x14d7969400000000, 0x58b5b90c00000000, - 0xb06e42b500000000, 0xc9043fa400000000, 0x21dfc41d00000000, - 0x3bd0c58600000000, 0xd30b3e3f00000000, 0xaa61432e00000000, - 0x42bab89700000000, 0xdf7930c300000000, 0x37a2cb7a00000000, - 0x4ec8b66b00000000, 0xa6134dd200000000, 0xbc1c4c4900000000, - 0x54c7b7f000000000, 0x2dadcae100000000, 0xc576315800000000, - 0x172adb4800000000, 0xfff120f100000000, 0x869b5de000000000, - 0x6e40a65900000000, 0x744fa7c200000000, 0x9c945c7b00000000, - 0xe5fe216a00000000, 0x0d25dad300000000, 0x90e6528700000000, - 0x783da93e00000000, 0x0157d42f00000000, 0xe98c2f9600000000, - 0xf3832e0d00000000, 0x1b58d5b400000000, 0x6232a8a500000000, - 0x8ae9531c00000000}, - {0x0000000000000000, 0x919168ae00000000, 0x6325a08700000000, - 0xf2b4c82900000000, 0x874c31d400000000, 0x16dd597a00000000, - 0xe469915300000000, 0x75f8f9fd00000000, 0x4f9f137300000000, - 0xde0e7bdd00000000, 0x2cbab3f400000000, 0xbd2bdb5a00000000, - 0xc8d322a700000000, 0x59424a0900000000, 0xabf6822000000000, - 0x3a67ea8e00000000, 0x9e3e27e600000000, 0x0faf4f4800000000, - 0xfd1b876100000000, 0x6c8aefcf00000000, 0x1972163200000000, - 0x88e37e9c00000000, 0x7a57b6b500000000, 0xebc6de1b00000000, - 0xd1a1349500000000, 0x40305c3b00000000, 0xb284941200000000, - 0x2315fcbc00000000, 0x56ed054100000000, 0xc77c6def00000000, - 0x35c8a5c600000000, 0xa459cd6800000000, 0x7d7b3f1700000000, - 0xecea57b900000000, 0x1e5e9f9000000000, 0x8fcff73e00000000, - 0xfa370ec300000000, 0x6ba6666d00000000, 0x9912ae4400000000, - 0x0883c6ea00000000, 0x32e42c6400000000, 0xa37544ca00000000, - 0x51c18ce300000000, 0xc050e44d00000000, 0xb5a81db000000000, - 0x2439751e00000000, 0xd68dbd3700000000, 0x471cd59900000000, - 0xe34518f100000000, 0x72d4705f00000000, 0x8060b87600000000, - 0x11f1d0d800000000, 0x6409292500000000, 0xf598418b00000000, - 0x072c89a200000000, 0x96bde10c00000000, 0xacda0b8200000000, - 0x3d4b632c00000000, 0xcfffab0500000000, 0x5e6ec3ab00000000, - 0x2b963a5600000000, 0xba0752f800000000, 0x48b39ad100000000, - 0xd922f27f00000000, 0xfaf67e2e00000000, 0x6b67168000000000, - 0x99d3dea900000000, 0x0842b60700000000, 0x7dba4ffa00000000, - 0xec2b275400000000, 0x1e9fef7d00000000, 0x8f0e87d300000000, - 0xb5696d5d00000000, 0x24f805f300000000, 0xd64ccdda00000000, - 0x47dda57400000000, 0x32255c8900000000, 0xa3b4342700000000, - 0x5100fc0e00000000, 0xc09194a000000000, 0x64c859c800000000, - 0xf559316600000000, 0x07edf94f00000000, 0x967c91e100000000, - 0xe384681c00000000, 0x721500b200000000, 0x80a1c89b00000000, - 0x1130a03500000000, 0x2b574abb00000000, 0xbac6221500000000, - 0x4872ea3c00000000, 0xd9e3829200000000, 0xac1b7b6f00000000, - 0x3d8a13c100000000, 0xcf3edbe800000000, 0x5eafb34600000000, - 0x878d413900000000, 0x161c299700000000, 0xe4a8e1be00000000, - 0x7539891000000000, 0x00c170ed00000000, 0x9150184300000000, - 0x63e4d06a00000000, 0xf275b8c400000000, 0xc812524a00000000, - 0x59833ae400000000, 0xab37f2cd00000000, 0x3aa69a6300000000, - 0x4f5e639e00000000, 0xdecf0b3000000000, 0x2c7bc31900000000, - 0xbdeaabb700000000, 0x19b366df00000000, 0x88220e7100000000, - 0x7a96c65800000000, 0xeb07aef600000000, 0x9eff570b00000000, - 0x0f6e3fa500000000, 0xfddaf78c00000000, 0x6c4b9f2200000000, - 0x562c75ac00000000, 0xc7bd1d0200000000, 0x3509d52b00000000, - 0xa498bd8500000000, 0xd160447800000000, 0x40f12cd600000000, - 0xb245e4ff00000000, 0x23d48c5100000000, 0xf4edfd5c00000000, - 0x657c95f200000000, 0x97c85ddb00000000, 0x0659357500000000, - 0x73a1cc8800000000, 0xe230a42600000000, 0x10846c0f00000000, - 0x811504a100000000, 0xbb72ee2f00000000, 0x2ae3868100000000, - 0xd8574ea800000000, 0x49c6260600000000, 0x3c3edffb00000000, - 0xadafb75500000000, 0x5f1b7f7c00000000, 0xce8a17d200000000, - 0x6ad3daba00000000, 0xfb42b21400000000, 0x09f67a3d00000000, - 0x9867129300000000, 0xed9feb6e00000000, 0x7c0e83c000000000, - 0x8eba4be900000000, 0x1f2b234700000000, 0x254cc9c900000000, - 0xb4dda16700000000, 0x4669694e00000000, 0xd7f801e000000000, - 0xa200f81d00000000, 0x339190b300000000, 0xc125589a00000000, - 0x50b4303400000000, 0x8996c24b00000000, 0x1807aae500000000, - 0xeab362cc00000000, 0x7b220a6200000000, 0x0edaf39f00000000, - 0x9f4b9b3100000000, 0x6dff531800000000, 0xfc6e3bb600000000, - 0xc609d13800000000, 0x5798b99600000000, 0xa52c71bf00000000, - 0x34bd191100000000, 0x4145e0ec00000000, 0xd0d4884200000000, - 0x2260406b00000000, 0xb3f128c500000000, 0x17a8e5ad00000000, - 0x86398d0300000000, 0x748d452a00000000, 0xe51c2d8400000000, - 0x90e4d47900000000, 0x0175bcd700000000, 0xf3c174fe00000000, - 0x62501c5000000000, 0x5837f6de00000000, 0xc9a69e7000000000, - 0x3b12565900000000, 0xaa833ef700000000, 0xdf7bc70a00000000, - 0x4eeaafa400000000, 0xbc5e678d00000000, 0x2dcf0f2300000000, - 0x0e1b837200000000, 0x9f8aebdc00000000, 0x6d3e23f500000000, - 0xfcaf4b5b00000000, 0x8957b2a600000000, 0x18c6da0800000000, - 0xea72122100000000, 0x7be37a8f00000000, 0x4184900100000000, - 0xd015f8af00000000, 0x22a1308600000000, 0xb330582800000000, - 0xc6c8a1d500000000, 0x5759c97b00000000, 0xa5ed015200000000, - 0x347c69fc00000000, 0x9025a49400000000, 0x01b4cc3a00000000, - 0xf300041300000000, 0x62916cbd00000000, 0x1769954000000000, - 0x86f8fdee00000000, 0x744c35c700000000, 0xe5dd5d6900000000, - 0xdfbab7e700000000, 0x4e2bdf4900000000, 0xbc9f176000000000, - 0x2d0e7fce00000000, 0x58f6863300000000, 0xc967ee9d00000000, - 0x3bd326b400000000, 0xaa424e1a00000000, 0x7360bc6500000000, - 0xe2f1d4cb00000000, 0x10451ce200000000, 0x81d4744c00000000, - 0xf42c8db100000000, 0x65bde51f00000000, 0x97092d3600000000, - 0x0698459800000000, 0x3cffaf1600000000, 0xad6ec7b800000000, - 0x5fda0f9100000000, 0xce4b673f00000000, 0xbbb39ec200000000, - 0x2a22f66c00000000, 0xd8963e4500000000, 0x490756eb00000000, - 0xed5e9b8300000000, 0x7ccff32d00000000, 0x8e7b3b0400000000, - 0x1fea53aa00000000, 0x6a12aa5700000000, 0xfb83c2f900000000, - 0x09370ad000000000, 0x98a6627e00000000, 0xa2c188f000000000, - 0x3350e05e00000000, 0xc1e4287700000000, 0x507540d900000000, - 0x258db92400000000, 0xb41cd18a00000000, 0x46a819a300000000, - 0xd739710d00000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, - 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, - 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, - 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, - 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, - 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, - 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, - 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, - 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, - 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, - 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, - 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, - 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, - 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, - 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, - 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, - 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, - 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, - 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, - 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, - 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, - 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, - 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, - 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, - 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, - 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, - 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, - 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, - 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, - 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, - 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, - 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, - 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, - 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, - 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, - 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, - 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, - 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, - 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, - 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, - 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, - 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, - 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, - 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, - 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, - 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, - 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, - 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, - 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, - 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, - 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, - 0x264b06e6}, - {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, - 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, - 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, - 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, - 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, - 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, - 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, - 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, - 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, - 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, - 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, - 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, - 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, - 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, - 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, - 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, - 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, - 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, - 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, - 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, - 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, - 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, - 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, - 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, - 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, - 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, - 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, - 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, - 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, - 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, - 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, - 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, - 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, - 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, - 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, - 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, - 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, - 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, - 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, - 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, - 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, - 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, - 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, - 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, - 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, - 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, - 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, - 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, - 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, - 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, - 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, - 0x92364a30}, - {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, - 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, - 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, - 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, - 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, - 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, - 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, - 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, - 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, - 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, - 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, - 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, - 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, - 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, - 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, - 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, - 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, - 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, - 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, - 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, - 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, - 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, - 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, - 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, - 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, - 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, - 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, - 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, - 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, - 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, - 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, - 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, - 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, - 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, - 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, - 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, - 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, - 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, - 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, - 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, - 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, - 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, - 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, - 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, - 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, - 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, - 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, - 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, - 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, - 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, - 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, - 0xe4c4abcc}, - {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, - 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, - 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, - 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, - 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, - 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, - 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, - 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, - 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, - 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, - 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, - 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, - 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, - 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, - 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, - 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, - 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, - 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, - 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, - 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, - 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, - 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, - 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, - 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, - 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, - 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, - 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, - 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, - 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, - 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, - 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, - 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, - 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, - 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, - 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, - 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, - 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, - 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, - 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, - 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, - 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, - 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, - 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, - 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, - 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, - 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, - 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, - 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, - 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, - 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, - 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, - 0xca64c78c}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0xb029603d, 0x6053c07a, 0xd07aa047, 0xc0a680f5, - 0x708fe0c8, 0xa0f5408f, 0x10dc20b2, 0xc14b7030, 0x7162100d, - 0xa118b04a, 0x1131d077, 0x01edf0c5, 0xb1c490f8, 0x61be30bf, - 0xd1975082, 0x8297e060, 0x32be805d, 0xe2c4201a, 0x52ed4027, - 0x42316095, 0xf21800a8, 0x2262a0ef, 0x924bc0d2, 0x43dc9050, - 0xf3f5f06d, 0x238f502a, 0x93a63017, 0x837a10a5, 0x33537098, - 0xe329d0df, 0x5300b0e2, 0x042fc1c1, 0xb406a1fc, 0x647c01bb, - 0xd4556186, 0xc4894134, 0x74a02109, 0xa4da814e, 0x14f3e173, - 0xc564b1f1, 0x754dd1cc, 0xa537718b, 0x151e11b6, 0x05c23104, - 0xb5eb5139, 0x6591f17e, 0xd5b89143, 0x86b821a1, 0x3691419c, - 0xe6ebe1db, 0x56c281e6, 0x461ea154, 0xf637c169, 0x264d612e, - 0x96640113, 0x47f35191, 0xf7da31ac, 0x27a091eb, 0x9789f1d6, - 0x8755d164, 0x377cb159, 0xe706111e, 0x572f7123, 0x4958f358, - 0xf9719365, 0x290b3322, 0x9922531f, 0x89fe73ad, 0x39d71390, - 0xe9adb3d7, 0x5984d3ea, 0x88138368, 0x383ae355, 0xe8404312, - 0x5869232f, 0x48b5039d, 0xf89c63a0, 0x28e6c3e7, 0x98cfa3da, - 0xcbcf1338, 0x7be67305, 0xab9cd342, 0x1bb5b37f, 0x0b6993cd, - 0xbb40f3f0, 0x6b3a53b7, 0xdb13338a, 0x0a846308, 0xbaad0335, - 0x6ad7a372, 0xdafec34f, 0xca22e3fd, 0x7a0b83c0, 0xaa712387, - 0x1a5843ba, 0x4d773299, 0xfd5e52a4, 0x2d24f2e3, 0x9d0d92de, - 0x8dd1b26c, 0x3df8d251, 0xed827216, 0x5dab122b, 0x8c3c42a9, - 0x3c152294, 0xec6f82d3, 0x5c46e2ee, 0x4c9ac25c, 0xfcb3a261, - 0x2cc90226, 0x9ce0621b, 0xcfe0d2f9, 0x7fc9b2c4, 0xafb31283, - 0x1f9a72be, 0x0f46520c, 0xbf6f3231, 0x6f159276, 0xdf3cf24b, - 0x0eaba2c9, 0xbe82c2f4, 0x6ef862b3, 0xded1028e, 0xce0d223c, - 0x7e244201, 0xae5ee246, 0x1e77827b, 0x92b0e6b1, 0x2299868c, - 0xf2e326cb, 0x42ca46f6, 0x52166644, 0xe23f0679, 0x3245a63e, - 0x826cc603, 0x53fb9681, 0xe3d2f6bc, 0x33a856fb, 0x838136c6, - 0x935d1674, 0x23747649, 0xf30ed60e, 0x4327b633, 0x102706d1, - 0xa00e66ec, 0x7074c6ab, 0xc05da696, 0xd0818624, 0x60a8e619, - 0xb0d2465e, 0x00fb2663, 0xd16c76e1, 0x614516dc, 0xb13fb69b, - 0x0116d6a6, 0x11caf614, 0xa1e39629, 0x7199366e, 0xc1b05653, - 0x969f2770, 0x26b6474d, 0xf6cce70a, 0x46e58737, 0x5639a785, - 0xe610c7b8, 0x366a67ff, 0x864307c2, 0x57d45740, 0xe7fd377d, - 0x3787973a, 0x87aef707, 0x9772d7b5, 0x275bb788, 0xf72117cf, - 0x470877f2, 0x1408c710, 0xa421a72d, 0x745b076a, 0xc4726757, - 0xd4ae47e5, 0x648727d8, 0xb4fd879f, 0x04d4e7a2, 0xd543b720, - 0x656ad71d, 0xb510775a, 0x05391767, 0x15e537d5, 0xa5cc57e8, - 0x75b6f7af, 0xc59f9792, 0xdbe815e9, 0x6bc175d4, 0xbbbbd593, - 0x0b92b5ae, 0x1b4e951c, 0xab67f521, 0x7b1d5566, 0xcb34355b, - 0x1aa365d9, 0xaa8a05e4, 0x7af0a5a3, 0xcad9c59e, 0xda05e52c, - 0x6a2c8511, 0xba562556, 0x0a7f456b, 0x597ff589, 0xe95695b4, - 0x392c35f3, 0x890555ce, 0x99d9757c, 0x29f01541, 0xf98ab506, - 0x49a3d53b, 0x983485b9, 0x281de584, 0xf86745c3, 0x484e25fe, - 0x5892054c, 0xe8bb6571, 0x38c1c536, 0x88e8a50b, 0xdfc7d428, - 0x6feeb415, 0xbf941452, 0x0fbd746f, 0x1f6154dd, 0xaf4834e0, - 0x7f3294a7, 0xcf1bf49a, 0x1e8ca418, 0xaea5c425, 0x7edf6462, - 0xcef6045f, 0xde2a24ed, 0x6e0344d0, 0xbe79e497, 0x0e5084aa, - 0x5d503448, 0xed795475, 0x3d03f432, 0x8d2a940f, 0x9df6b4bd, - 0x2ddfd480, 0xfda574c7, 0x4d8c14fa, 0x9c1b4478, 0x2c322445, - 0xfc488402, 0x4c61e43f, 0x5cbdc48d, 0xec94a4b0, 0x3cee04f7, - 0x8cc764ca}, - {0x00000000, 0xa5d35ccb, 0x0ba1c84d, 0xae729486, 0x1642919b, - 0xb391cd50, 0x1de359d6, 0xb830051d, 0x6d8253ec, 0xc8510f27, - 0x66239ba1, 0xc3f0c76a, 0x7bc0c277, 0xde139ebc, 0x70610a3a, - 0xd5b256f1, 0x9b02d603, 0x3ed18ac8, 0x90a31e4e, 0x35704285, - 0x8d404798, 0x28931b53, 0x86e18fd5, 0x2332d31e, 0xf68085ef, - 0x5353d924, 0xfd214da2, 0x58f21169, 0xe0c21474, 0x451148bf, - 0xeb63dc39, 0x4eb080f2, 0x3605ac07, 0x93d6f0cc, 0x3da4644a, - 0x98773881, 0x20473d9c, 0x85946157, 0x2be6f5d1, 0x8e35a91a, - 0x5b87ffeb, 0xfe54a320, 0x502637a6, 0xf5f56b6d, 0x4dc56e70, - 0xe81632bb, 0x4664a63d, 0xe3b7faf6, 0xad077a04, 0x08d426cf, - 0xa6a6b249, 0x0375ee82, 0xbb45eb9f, 0x1e96b754, 0xb0e423d2, - 0x15377f19, 0xc08529e8, 0x65567523, 0xcb24e1a5, 0x6ef7bd6e, - 0xd6c7b873, 0x7314e4b8, 0xdd66703e, 0x78b52cf5, 0x6c0a580f, - 0xc9d904c4, 0x67ab9042, 0xc278cc89, 0x7a48c994, 0xdf9b955f, - 0x71e901d9, 0xd43a5d12, 0x01880be3, 0xa45b5728, 0x0a29c3ae, - 0xaffa9f65, 0x17ca9a78, 0xb219c6b3, 0x1c6b5235, 0xb9b80efe, - 0xf7088e0c, 0x52dbd2c7, 0xfca94641, 0x597a1a8a, 0xe14a1f97, - 0x4499435c, 0xeaebd7da, 0x4f388b11, 0x9a8adde0, 0x3f59812b, - 0x912b15ad, 0x34f84966, 0x8cc84c7b, 0x291b10b0, 0x87698436, - 0x22bad8fd, 0x5a0ff408, 0xffdca8c3, 0x51ae3c45, 0xf47d608e, - 0x4c4d6593, 0xe99e3958, 0x47ecadde, 0xe23ff115, 0x378da7e4, - 0x925efb2f, 0x3c2c6fa9, 0x99ff3362, 0x21cf367f, 0x841c6ab4, - 0x2a6efe32, 0x8fbda2f9, 0xc10d220b, 0x64de7ec0, 0xcaacea46, - 0x6f7fb68d, 0xd74fb390, 0x729cef5b, 0xdcee7bdd, 0x793d2716, - 0xac8f71e7, 0x095c2d2c, 0xa72eb9aa, 0x02fde561, 0xbacde07c, - 0x1f1ebcb7, 0xb16c2831, 0x14bf74fa, 0xd814b01e, 0x7dc7ecd5, - 0xd3b57853, 0x76662498, 0xce562185, 0x6b857d4e, 0xc5f7e9c8, - 0x6024b503, 0xb596e3f2, 0x1045bf39, 0xbe372bbf, 0x1be47774, - 0xa3d47269, 0x06072ea2, 0xa875ba24, 0x0da6e6ef, 0x4316661d, - 0xe6c53ad6, 0x48b7ae50, 0xed64f29b, 0x5554f786, 0xf087ab4d, - 0x5ef53fcb, 0xfb266300, 0x2e9435f1, 0x8b47693a, 0x2535fdbc, - 0x80e6a177, 0x38d6a46a, 0x9d05f8a1, 0x33776c27, 0x96a430ec, - 0xee111c19, 0x4bc240d2, 0xe5b0d454, 0x4063889f, 0xf8538d82, - 0x5d80d149, 0xf3f245cf, 0x56211904, 0x83934ff5, 0x2640133e, - 0x883287b8, 0x2de1db73, 0x95d1de6e, 0x300282a5, 0x9e701623, - 0x3ba34ae8, 0x7513ca1a, 0xd0c096d1, 0x7eb20257, 0xdb615e9c, - 0x63515b81, 0xc682074a, 0x68f093cc, 0xcd23cf07, 0x189199f6, - 0xbd42c53d, 0x133051bb, 0xb6e30d70, 0x0ed3086d, 0xab0054a6, - 0x0572c020, 0xa0a19ceb, 0xb41ee811, 0x11cdb4da, 0xbfbf205c, - 0x1a6c7c97, 0xa25c798a, 0x078f2541, 0xa9fdb1c7, 0x0c2eed0c, - 0xd99cbbfd, 0x7c4fe736, 0xd23d73b0, 0x77ee2f7b, 0xcfde2a66, - 0x6a0d76ad, 0xc47fe22b, 0x61acbee0, 0x2f1c3e12, 0x8acf62d9, - 0x24bdf65f, 0x816eaa94, 0x395eaf89, 0x9c8df342, 0x32ff67c4, - 0x972c3b0f, 0x429e6dfe, 0xe74d3135, 0x493fa5b3, 0xececf978, - 0x54dcfc65, 0xf10fa0ae, 0x5f7d3428, 0xfaae68e3, 0x821b4416, - 0x27c818dd, 0x89ba8c5b, 0x2c69d090, 0x9459d58d, 0x318a8946, - 0x9ff81dc0, 0x3a2b410b, 0xef9917fa, 0x4a4a4b31, 0xe438dfb7, - 0x41eb837c, 0xf9db8661, 0x5c08daaa, 0xf27a4e2c, 0x57a912e7, - 0x19199215, 0xbccacede, 0x12b85a58, 0xb76b0693, 0x0f5b038e, - 0xaa885f45, 0x04facbc3, 0xa1299708, 0x749bc1f9, 0xd1489d32, - 0x7f3a09b4, 0xdae9557f, 0x62d95062, 0xc70a0ca9, 0x6978982f, - 0xccabc4e4}, - {0x00000000, 0xb40b77a6, 0x29119f97, 0x9d1ae831, 0x13244ff4, - 0xa72f3852, 0x3a35d063, 0x8e3ea7c5, 0x674eef33, 0xd3459895, - 0x4e5f70a4, 0xfa540702, 0x746aa0c7, 0xc061d761, 0x5d7b3f50, - 0xe97048f6, 0xce9cde67, 0x7a97a9c1, 0xe78d41f0, 0x53863656, - 0xddb89193, 0x69b3e635, 0xf4a90e04, 0x40a279a2, 0xa9d23154, - 0x1dd946f2, 0x80c3aec3, 0x34c8d965, 0xbaf67ea0, 0x0efd0906, - 0x93e7e137, 0x27ec9691, 0x9c39bdcf, 0x2832ca69, 0xb5282258, - 0x012355fe, 0x8f1df23b, 0x3b16859d, 0xa60c6dac, 0x12071a0a, - 0xfb7752fc, 0x4f7c255a, 0xd266cd6b, 0x666dbacd, 0xe8531d08, - 0x5c586aae, 0xc142829f, 0x7549f539, 0x52a563a8, 0xe6ae140e, - 0x7bb4fc3f, 0xcfbf8b99, 0x41812c5c, 0xf58a5bfa, 0x6890b3cb, - 0xdc9bc46d, 0x35eb8c9b, 0x81e0fb3d, 0x1cfa130c, 0xa8f164aa, - 0x26cfc36f, 0x92c4b4c9, 0x0fde5cf8, 0xbbd52b5e, 0x79750b44, - 0xcd7e7ce2, 0x506494d3, 0xe46fe375, 0x6a5144b0, 0xde5a3316, - 0x4340db27, 0xf74bac81, 0x1e3be477, 0xaa3093d1, 0x372a7be0, - 0x83210c46, 0x0d1fab83, 0xb914dc25, 0x240e3414, 0x900543b2, - 0xb7e9d523, 0x03e2a285, 0x9ef84ab4, 0x2af33d12, 0xa4cd9ad7, - 0x10c6ed71, 0x8ddc0540, 0x39d772e6, 0xd0a73a10, 0x64ac4db6, - 0xf9b6a587, 0x4dbdd221, 0xc38375e4, 0x77880242, 0xea92ea73, - 0x5e999dd5, 0xe54cb68b, 0x5147c12d, 0xcc5d291c, 0x78565eba, - 0xf668f97f, 0x42638ed9, 0xdf7966e8, 0x6b72114e, 0x820259b8, - 0x36092e1e, 0xab13c62f, 0x1f18b189, 0x9126164c, 0x252d61ea, - 0xb83789db, 0x0c3cfe7d, 0x2bd068ec, 0x9fdb1f4a, 0x02c1f77b, - 0xb6ca80dd, 0x38f42718, 0x8cff50be, 0x11e5b88f, 0xa5eecf29, - 0x4c9e87df, 0xf895f079, 0x658f1848, 0xd1846fee, 0x5fbac82b, - 0xebb1bf8d, 0x76ab57bc, 0xc2a0201a, 0xf2ea1688, 0x46e1612e, - 0xdbfb891f, 0x6ff0feb9, 0xe1ce597c, 0x55c52eda, 0xc8dfc6eb, - 0x7cd4b14d, 0x95a4f9bb, 0x21af8e1d, 0xbcb5662c, 0x08be118a, - 0x8680b64f, 0x328bc1e9, 0xaf9129d8, 0x1b9a5e7e, 0x3c76c8ef, - 0x887dbf49, 0x15675778, 0xa16c20de, 0x2f52871b, 0x9b59f0bd, - 0x0643188c, 0xb2486f2a, 0x5b3827dc, 0xef33507a, 0x7229b84b, - 0xc622cfed, 0x481c6828, 0xfc171f8e, 0x610df7bf, 0xd5068019, - 0x6ed3ab47, 0xdad8dce1, 0x47c234d0, 0xf3c94376, 0x7df7e4b3, - 0xc9fc9315, 0x54e67b24, 0xe0ed0c82, 0x099d4474, 0xbd9633d2, - 0x208cdbe3, 0x9487ac45, 0x1ab90b80, 0xaeb27c26, 0x33a89417, - 0x87a3e3b1, 0xa04f7520, 0x14440286, 0x895eeab7, 0x3d559d11, - 0xb36b3ad4, 0x07604d72, 0x9a7aa543, 0x2e71d2e5, 0xc7019a13, - 0x730aedb5, 0xee100584, 0x5a1b7222, 0xd425d5e7, 0x602ea241, - 0xfd344a70, 0x493f3dd6, 0x8b9f1dcc, 0x3f946a6a, 0xa28e825b, - 0x1685f5fd, 0x98bb5238, 0x2cb0259e, 0xb1aacdaf, 0x05a1ba09, - 0xecd1f2ff, 0x58da8559, 0xc5c06d68, 0x71cb1ace, 0xfff5bd0b, - 0x4bfecaad, 0xd6e4229c, 0x62ef553a, 0x4503c3ab, 0xf108b40d, - 0x6c125c3c, 0xd8192b9a, 0x56278c5f, 0xe22cfbf9, 0x7f3613c8, - 0xcb3d646e, 0x224d2c98, 0x96465b3e, 0x0b5cb30f, 0xbf57c4a9, - 0x3169636c, 0x856214ca, 0x1878fcfb, 0xac738b5d, 0x17a6a003, - 0xa3add7a5, 0x3eb73f94, 0x8abc4832, 0x0482eff7, 0xb0899851, - 0x2d937060, 0x999807c6, 0x70e84f30, 0xc4e33896, 0x59f9d0a7, - 0xedf2a701, 0x63cc00c4, 0xd7c77762, 0x4add9f53, 0xfed6e8f5, - 0xd93a7e64, 0x6d3109c2, 0xf02be1f3, 0x44209655, 0xca1e3190, - 0x7e154636, 0xe30fae07, 0x5704d9a1, 0xbe749157, 0x0a7fe6f1, - 0x97650ec0, 0x236e7966, 0xad50dea3, 0x195ba905, 0x84414134, - 0x304a3692}, - {0x00000000, 0x9e00aacc, 0x7d072542, 0xe3078f8e, 0xfa0e4a84, - 0x640ee048, 0x87096fc6, 0x1909c50a, 0xb51be5d3, 0x2b1b4f1f, - 0xc81cc091, 0x561c6a5d, 0x4f15af57, 0xd115059b, 0x32128a15, - 0xac1220d9, 0x2b31bb7c, 0xb53111b0, 0x56369e3e, 0xc83634f2, - 0xd13ff1f8, 0x4f3f5b34, 0xac38d4ba, 0x32387e76, 0x9e2a5eaf, - 0x002af463, 0xe32d7bed, 0x7d2dd121, 0x6424142b, 0xfa24bee7, - 0x19233169, 0x87239ba5, 0x566276f9, 0xc862dc35, 0x2b6553bb, - 0xb565f977, 0xac6c3c7d, 0x326c96b1, 0xd16b193f, 0x4f6bb3f3, - 0xe379932a, 0x7d7939e6, 0x9e7eb668, 0x007e1ca4, 0x1977d9ae, - 0x87777362, 0x6470fcec, 0xfa705620, 0x7d53cd85, 0xe3536749, - 0x0054e8c7, 0x9e54420b, 0x875d8701, 0x195d2dcd, 0xfa5aa243, - 0x645a088f, 0xc8482856, 0x5648829a, 0xb54f0d14, 0x2b4fa7d8, - 0x324662d2, 0xac46c81e, 0x4f414790, 0xd141ed5c, 0xedc29d29, - 0x73c237e5, 0x90c5b86b, 0x0ec512a7, 0x17ccd7ad, 0x89cc7d61, - 0x6acbf2ef, 0xf4cb5823, 0x58d978fa, 0xc6d9d236, 0x25de5db8, - 0xbbdef774, 0xa2d7327e, 0x3cd798b2, 0xdfd0173c, 0x41d0bdf0, - 0xc6f32655, 0x58f38c99, 0xbbf40317, 0x25f4a9db, 0x3cfd6cd1, - 0xa2fdc61d, 0x41fa4993, 0xdffae35f, 0x73e8c386, 0xede8694a, - 0x0eefe6c4, 0x90ef4c08, 0x89e68902, 0x17e623ce, 0xf4e1ac40, - 0x6ae1068c, 0xbba0ebd0, 0x25a0411c, 0xc6a7ce92, 0x58a7645e, - 0x41aea154, 0xdfae0b98, 0x3ca98416, 0xa2a92eda, 0x0ebb0e03, - 0x90bba4cf, 0x73bc2b41, 0xedbc818d, 0xf4b54487, 0x6ab5ee4b, - 0x89b261c5, 0x17b2cb09, 0x909150ac, 0x0e91fa60, 0xed9675ee, - 0x7396df22, 0x6a9f1a28, 0xf49fb0e4, 0x17983f6a, 0x899895a6, - 0x258ab57f, 0xbb8a1fb3, 0x588d903d, 0xc68d3af1, 0xdf84fffb, - 0x41845537, 0xa283dab9, 0x3c837075, 0xda853b53, 0x4485919f, - 0xa7821e11, 0x3982b4dd, 0x208b71d7, 0xbe8bdb1b, 0x5d8c5495, - 0xc38cfe59, 0x6f9ede80, 0xf19e744c, 0x1299fbc2, 0x8c99510e, - 0x95909404, 0x0b903ec8, 0xe897b146, 0x76971b8a, 0xf1b4802f, - 0x6fb42ae3, 0x8cb3a56d, 0x12b30fa1, 0x0bbacaab, 0x95ba6067, - 0x76bdefe9, 0xe8bd4525, 0x44af65fc, 0xdaafcf30, 0x39a840be, - 0xa7a8ea72, 0xbea12f78, 0x20a185b4, 0xc3a60a3a, 0x5da6a0f6, - 0x8ce74daa, 0x12e7e766, 0xf1e068e8, 0x6fe0c224, 0x76e9072e, - 0xe8e9ade2, 0x0bee226c, 0x95ee88a0, 0x39fca879, 0xa7fc02b5, - 0x44fb8d3b, 0xdafb27f7, 0xc3f2e2fd, 0x5df24831, 0xbef5c7bf, - 0x20f56d73, 0xa7d6f6d6, 0x39d65c1a, 0xdad1d394, 0x44d17958, - 0x5dd8bc52, 0xc3d8169e, 0x20df9910, 0xbedf33dc, 0x12cd1305, - 0x8ccdb9c9, 0x6fca3647, 0xf1ca9c8b, 0xe8c35981, 0x76c3f34d, - 0x95c47cc3, 0x0bc4d60f, 0x3747a67a, 0xa9470cb6, 0x4a408338, - 0xd44029f4, 0xcd49ecfe, 0x53494632, 0xb04ec9bc, 0x2e4e6370, - 0x825c43a9, 0x1c5ce965, 0xff5b66eb, 0x615bcc27, 0x7852092d, - 0xe652a3e1, 0x05552c6f, 0x9b5586a3, 0x1c761d06, 0x8276b7ca, - 0x61713844, 0xff719288, 0xe6785782, 0x7878fd4e, 0x9b7f72c0, - 0x057fd80c, 0xa96df8d5, 0x376d5219, 0xd46add97, 0x4a6a775b, - 0x5363b251, 0xcd63189d, 0x2e649713, 0xb0643ddf, 0x6125d083, - 0xff257a4f, 0x1c22f5c1, 0x82225f0d, 0x9b2b9a07, 0x052b30cb, - 0xe62cbf45, 0x782c1589, 0xd43e3550, 0x4a3e9f9c, 0xa9391012, - 0x3739bade, 0x2e307fd4, 0xb030d518, 0x53375a96, 0xcd37f05a, - 0x4a146bff, 0xd414c133, 0x37134ebd, 0xa913e471, 0xb01a217b, - 0x2e1a8bb7, 0xcd1d0439, 0x531daef5, 0xff0f8e2c, 0x610f24e0, - 0x8208ab6e, 0x1c0801a2, 0x0501c4a8, 0x9b016e64, 0x7806e1ea, - 0xe6064b26}}; - -#endif - -#endif - -#if N == 3 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, - 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, - 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, - 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, - 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, - 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, - 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, - 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, - 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, - 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, - 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, - 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, - 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, - 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, - 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, - 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, - 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, - 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, - 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, - 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, - 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, - 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, - 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, - 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, - 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, - 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, - 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, - 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, - 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, - 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, - 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, - 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, - 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, - 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, - 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, - 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, - 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, - 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, - 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, - 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, - 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, - 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, - 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, - 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, - 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, - 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, - 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, - 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, - 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, - 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, - 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, - 0x09cd8551}, - {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, - 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, - 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, - 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, - 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, - 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, - 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, - 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, - 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, - 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, - 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, - 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, - 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, - 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, - 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, - 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, - 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, - 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, - 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, - 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, - 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, - 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, - 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, - 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, - 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, - 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, - 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, - 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, - 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, - 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, - 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, - 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, - 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, - 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, - 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, - 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, - 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, - 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, - 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, - 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, - 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, - 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, - 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, - 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, - 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, - 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, - 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, - 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, - 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, - 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, - 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, - 0x7bc97a0c}, - {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, - 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, - 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, - 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, - 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, - 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, - 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, - 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, - 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, - 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, - 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, - 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, - 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, - 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, - 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, - 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, - 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, - 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, - 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, - 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, - 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, - 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, - 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, - 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, - 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, - 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, - 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, - 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, - 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, - 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, - 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, - 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, - 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, - 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, - 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, - 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, - 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, - 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, - 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, - 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, - 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, - 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, - 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, - 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, - 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, - 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, - 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, - 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, - 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, - 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, - 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, - 0x7851a2ca}, - {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, - 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, - 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, - 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, - 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, - 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, - 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, - 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, - 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, - 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, - 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, - 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, - 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, - 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, - 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, - 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, - 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, - 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, - 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, - 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, - 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, - 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, - 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, - 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, - 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, - 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, - 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, - 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, - 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, - 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, - 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, - 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, - 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, - 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, - 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, - 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, - 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, - 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, - 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, - 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, - 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, - 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, - 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, - 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, - 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, - 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, - 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, - 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, - 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, - 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, - 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, - 0x566b6848}, - {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, - 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, - 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, - 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, - 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, - 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, - 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, - 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, - 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, - 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, - 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, - 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, - 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, - 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, - 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, - 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, - 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, - 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, - 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, - 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, - 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, - 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, - 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, - 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, - 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, - 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, - 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, - 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, - 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, - 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, - 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, - 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, - 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, - 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, - 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, - 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, - 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, - 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, - 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, - 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, - 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, - 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, - 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, - 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, - 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, - 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, - 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, - 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, - 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, - 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, - 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, - 0xd8ac6b35}, - {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, - 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, - 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, - 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, - 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, - 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, - 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, - 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, - 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, - 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, - 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, - 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, - 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, - 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, - 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, - 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, - 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, - 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, - 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, - 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, - 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, - 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, - 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, - 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, - 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, - 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, - 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, - 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, - 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, - 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, - 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, - 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, - 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, - 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, - 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, - 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, - 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, - 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, - 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, - 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, - 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, - 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, - 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, - 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, - 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, - 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, - 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, - 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, - 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, - 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, - 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, - 0xa140efa8}, - {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, - 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, - 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, - 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, - 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, - 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, - 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, - 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, - 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, - 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, - 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, - 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, - 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, - 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, - 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, - 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, - 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, - 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, - 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, - 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, - 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, - 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, - 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, - 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, - 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, - 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, - 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, - 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, - 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, - 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, - 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, - 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, - 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, - 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, - 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, - 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, - 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, - 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, - 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, - 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, - 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, - 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, - 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, - 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, - 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, - 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, - 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, - 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, - 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, - 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, - 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, - 0x917cd6a1}, - {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, - 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, - 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, - 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, - 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, - 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, - 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, - 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, - 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, - 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, - 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, - 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, - 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, - 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, - 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, - 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, - 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, - 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, - 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, - 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, - 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, - 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, - 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, - 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, - 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, - 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, - 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, - 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, - 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, - 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, - 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, - 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, - 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, - 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, - 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, - 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, - 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, - 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, - 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, - 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, - 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, - 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, - 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, - 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, - 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, - 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, - 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, - 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, - 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, - 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, - 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, - 0x18ba364e}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x43cba68700000000, 0xc7903cd400000000, - 0x845b9a5300000000, 0xcf27087300000000, 0x8cecaef400000000, - 0x08b734a700000000, 0x4b7c922000000000, 0x9e4f10e600000000, - 0xdd84b66100000000, 0x59df2c3200000000, 0x1a148ab500000000, - 0x5168189500000000, 0x12a3be1200000000, 0x96f8244100000000, - 0xd53382c600000000, 0x7d99511700000000, 0x3e52f79000000000, - 0xba096dc300000000, 0xf9c2cb4400000000, 0xb2be596400000000, - 0xf175ffe300000000, 0x752e65b000000000, 0x36e5c33700000000, - 0xe3d641f100000000, 0xa01de77600000000, 0x24467d2500000000, - 0x678ddba200000000, 0x2cf1498200000000, 0x6f3aef0500000000, - 0xeb61755600000000, 0xa8aad3d100000000, 0xfa32a32e00000000, - 0xb9f905a900000000, 0x3da29ffa00000000, 0x7e69397d00000000, - 0x3515ab5d00000000, 0x76de0dda00000000, 0xf285978900000000, - 0xb14e310e00000000, 0x647db3c800000000, 0x27b6154f00000000, - 0xa3ed8f1c00000000, 0xe026299b00000000, 0xab5abbbb00000000, - 0xe8911d3c00000000, 0x6cca876f00000000, 0x2f0121e800000000, - 0x87abf23900000000, 0xc46054be00000000, 0x403bceed00000000, - 0x03f0686a00000000, 0x488cfa4a00000000, 0x0b475ccd00000000, - 0x8f1cc69e00000000, 0xccd7601900000000, 0x19e4e2df00000000, - 0x5a2f445800000000, 0xde74de0b00000000, 0x9dbf788c00000000, - 0xd6c3eaac00000000, 0x95084c2b00000000, 0x1153d67800000000, - 0x529870ff00000000, 0xf465465d00000000, 0xb7aee0da00000000, - 0x33f57a8900000000, 0x703edc0e00000000, 0x3b424e2e00000000, - 0x7889e8a900000000, 0xfcd272fa00000000, 0xbf19d47d00000000, - 0x6a2a56bb00000000, 0x29e1f03c00000000, 0xadba6a6f00000000, - 0xee71cce800000000, 0xa50d5ec800000000, 0xe6c6f84f00000000, - 0x629d621c00000000, 0x2156c49b00000000, 0x89fc174a00000000, - 0xca37b1cd00000000, 0x4e6c2b9e00000000, 0x0da78d1900000000, - 0x46db1f3900000000, 0x0510b9be00000000, 0x814b23ed00000000, - 0xc280856a00000000, 0x17b307ac00000000, 0x5478a12b00000000, - 0xd0233b7800000000, 0x93e89dff00000000, 0xd8940fdf00000000, - 0x9b5fa95800000000, 0x1f04330b00000000, 0x5ccf958c00000000, - 0x0e57e57300000000, 0x4d9c43f400000000, 0xc9c7d9a700000000, - 0x8a0c7f2000000000, 0xc170ed0000000000, 0x82bb4b8700000000, - 0x06e0d1d400000000, 0x452b775300000000, 0x9018f59500000000, - 0xd3d3531200000000, 0x5788c94100000000, 0x14436fc600000000, - 0x5f3ffde600000000, 0x1cf45b6100000000, 0x98afc13200000000, - 0xdb6467b500000000, 0x73ceb46400000000, 0x300512e300000000, - 0xb45e88b000000000, 0xf7952e3700000000, 0xbce9bc1700000000, - 0xff221a9000000000, 0x7b7980c300000000, 0x38b2264400000000, - 0xed81a48200000000, 0xae4a020500000000, 0x2a11985600000000, - 0x69da3ed100000000, 0x22a6acf100000000, 0x616d0a7600000000, - 0xe536902500000000, 0xa6fd36a200000000, 0xe8cb8cba00000000, - 0xab002a3d00000000, 0x2f5bb06e00000000, 0x6c9016e900000000, - 0x27ec84c900000000, 0x6427224e00000000, 0xe07cb81d00000000, - 0xa3b71e9a00000000, 0x76849c5c00000000, 0x354f3adb00000000, - 0xb114a08800000000, 0xf2df060f00000000, 0xb9a3942f00000000, - 0xfa6832a800000000, 0x7e33a8fb00000000, 0x3df80e7c00000000, - 0x9552ddad00000000, 0xd6997b2a00000000, 0x52c2e17900000000, - 0x110947fe00000000, 0x5a75d5de00000000, 0x19be735900000000, - 0x9de5e90a00000000, 0xde2e4f8d00000000, 0x0b1dcd4b00000000, - 0x48d66bcc00000000, 0xcc8df19f00000000, 0x8f46571800000000, - 0xc43ac53800000000, 0x87f163bf00000000, 0x03aaf9ec00000000, - 0x40615f6b00000000, 0x12f92f9400000000, 0x5132891300000000, - 0xd569134000000000, 0x96a2b5c700000000, 0xddde27e700000000, - 0x9e15816000000000, 0x1a4e1b3300000000, 0x5985bdb400000000, - 0x8cb63f7200000000, 0xcf7d99f500000000, 0x4b2603a600000000, - 0x08eda52100000000, 0x4391370100000000, 0x005a918600000000, - 0x84010bd500000000, 0xc7caad5200000000, 0x6f607e8300000000, - 0x2cabd80400000000, 0xa8f0425700000000, 0xeb3be4d000000000, - 0xa04776f000000000, 0xe38cd07700000000, 0x67d74a2400000000, - 0x241ceca300000000, 0xf12f6e6500000000, 0xb2e4c8e200000000, - 0x36bf52b100000000, 0x7574f43600000000, 0x3e08661600000000, - 0x7dc3c09100000000, 0xf9985ac200000000, 0xba53fc4500000000, - 0x1caecae700000000, 0x5f656c6000000000, 0xdb3ef63300000000, - 0x98f550b400000000, 0xd389c29400000000, 0x9042641300000000, - 0x1419fe4000000000, 0x57d258c700000000, 0x82e1da0100000000, - 0xc12a7c8600000000, 0x4571e6d500000000, 0x06ba405200000000, - 0x4dc6d27200000000, 0x0e0d74f500000000, 0x8a56eea600000000, - 0xc99d482100000000, 0x61379bf000000000, 0x22fc3d7700000000, - 0xa6a7a72400000000, 0xe56c01a300000000, 0xae10938300000000, - 0xeddb350400000000, 0x6980af5700000000, 0x2a4b09d000000000, - 0xff788b1600000000, 0xbcb32d9100000000, 0x38e8b7c200000000, - 0x7b23114500000000, 0x305f836500000000, 0x739425e200000000, - 0xf7cfbfb100000000, 0xb404193600000000, 0xe69c69c900000000, - 0xa557cf4e00000000, 0x210c551d00000000, 0x62c7f39a00000000, - 0x29bb61ba00000000, 0x6a70c73d00000000, 0xee2b5d6e00000000, - 0xade0fbe900000000, 0x78d3792f00000000, 0x3b18dfa800000000, - 0xbf4345fb00000000, 0xfc88e37c00000000, 0xb7f4715c00000000, - 0xf43fd7db00000000, 0x70644d8800000000, 0x33afeb0f00000000, - 0x9b0538de00000000, 0xd8ce9e5900000000, 0x5c95040a00000000, - 0x1f5ea28d00000000, 0x542230ad00000000, 0x17e9962a00000000, - 0x93b20c7900000000, 0xd079aafe00000000, 0x054a283800000000, - 0x46818ebf00000000, 0xc2da14ec00000000, 0x8111b26b00000000, - 0xca6d204b00000000, 0x89a686cc00000000, 0x0dfd1c9f00000000, - 0x4e36ba1800000000}, - {0x0000000000000000, 0xe1b652ef00000000, 0x836bd40500000000, - 0x62dd86ea00000000, 0x06d7a80b00000000, 0xe761fae400000000, - 0x85bc7c0e00000000, 0x640a2ee100000000, 0x0cae511700000000, - 0xed1803f800000000, 0x8fc5851200000000, 0x6e73d7fd00000000, - 0x0a79f91c00000000, 0xebcfabf300000000, 0x89122d1900000000, - 0x68a47ff600000000, 0x185ca32e00000000, 0xf9eaf1c100000000, - 0x9b37772b00000000, 0x7a8125c400000000, 0x1e8b0b2500000000, - 0xff3d59ca00000000, 0x9de0df2000000000, 0x7c568dcf00000000, - 0x14f2f23900000000, 0xf544a0d600000000, 0x9799263c00000000, - 0x762f74d300000000, 0x12255a3200000000, 0xf39308dd00000000, - 0x914e8e3700000000, 0x70f8dcd800000000, 0x30b8465d00000000, - 0xd10e14b200000000, 0xb3d3925800000000, 0x5265c0b700000000, - 0x366fee5600000000, 0xd7d9bcb900000000, 0xb5043a5300000000, - 0x54b268bc00000000, 0x3c16174a00000000, 0xdda045a500000000, - 0xbf7dc34f00000000, 0x5ecb91a000000000, 0x3ac1bf4100000000, - 0xdb77edae00000000, 0xb9aa6b4400000000, 0x581c39ab00000000, - 0x28e4e57300000000, 0xc952b79c00000000, 0xab8f317600000000, - 0x4a39639900000000, 0x2e334d7800000000, 0xcf851f9700000000, - 0xad58997d00000000, 0x4ceecb9200000000, 0x244ab46400000000, - 0xc5fce68b00000000, 0xa721606100000000, 0x4697328e00000000, - 0x229d1c6f00000000, 0xc32b4e8000000000, 0xa1f6c86a00000000, - 0x40409a8500000000, 0x60708dba00000000, 0x81c6df5500000000, - 0xe31b59bf00000000, 0x02ad0b5000000000, 0x66a725b100000000, - 0x8711775e00000000, 0xe5ccf1b400000000, 0x047aa35b00000000, - 0x6cdedcad00000000, 0x8d688e4200000000, 0xefb508a800000000, - 0x0e035a4700000000, 0x6a0974a600000000, 0x8bbf264900000000, - 0xe962a0a300000000, 0x08d4f24c00000000, 0x782c2e9400000000, - 0x999a7c7b00000000, 0xfb47fa9100000000, 0x1af1a87e00000000, - 0x7efb869f00000000, 0x9f4dd47000000000, 0xfd90529a00000000, - 0x1c26007500000000, 0x74827f8300000000, 0x95342d6c00000000, - 0xf7e9ab8600000000, 0x165ff96900000000, 0x7255d78800000000, - 0x93e3856700000000, 0xf13e038d00000000, 0x1088516200000000, - 0x50c8cbe700000000, 0xb17e990800000000, 0xd3a31fe200000000, - 0x32154d0d00000000, 0x561f63ec00000000, 0xb7a9310300000000, - 0xd574b7e900000000, 0x34c2e50600000000, 0x5c669af000000000, - 0xbdd0c81f00000000, 0xdf0d4ef500000000, 0x3ebb1c1a00000000, - 0x5ab132fb00000000, 0xbb07601400000000, 0xd9dae6fe00000000, - 0x386cb41100000000, 0x489468c900000000, 0xa9223a2600000000, - 0xcbffbccc00000000, 0x2a49ee2300000000, 0x4e43c0c200000000, - 0xaff5922d00000000, 0xcd2814c700000000, 0x2c9e462800000000, - 0x443a39de00000000, 0xa58c6b3100000000, 0xc751eddb00000000, - 0x26e7bf3400000000, 0x42ed91d500000000, 0xa35bc33a00000000, - 0xc18645d000000000, 0x2030173f00000000, 0x81e66bae00000000, - 0x6050394100000000, 0x028dbfab00000000, 0xe33bed4400000000, - 0x8731c3a500000000, 0x6687914a00000000, 0x045a17a000000000, - 0xe5ec454f00000000, 0x8d483ab900000000, 0x6cfe685600000000, - 0x0e23eebc00000000, 0xef95bc5300000000, 0x8b9f92b200000000, - 0x6a29c05d00000000, 0x08f446b700000000, 0xe942145800000000, - 0x99bac88000000000, 0x780c9a6f00000000, 0x1ad11c8500000000, - 0xfb674e6a00000000, 0x9f6d608b00000000, 0x7edb326400000000, - 0x1c06b48e00000000, 0xfdb0e66100000000, 0x9514999700000000, - 0x74a2cb7800000000, 0x167f4d9200000000, 0xf7c91f7d00000000, - 0x93c3319c00000000, 0x7275637300000000, 0x10a8e59900000000, - 0xf11eb77600000000, 0xb15e2df300000000, 0x50e87f1c00000000, - 0x3235f9f600000000, 0xd383ab1900000000, 0xb78985f800000000, - 0x563fd71700000000, 0x34e251fd00000000, 0xd554031200000000, - 0xbdf07ce400000000, 0x5c462e0b00000000, 0x3e9ba8e100000000, - 0xdf2dfa0e00000000, 0xbb27d4ef00000000, 0x5a91860000000000, - 0x384c00ea00000000, 0xd9fa520500000000, 0xa9028edd00000000, - 0x48b4dc3200000000, 0x2a695ad800000000, 0xcbdf083700000000, - 0xafd526d600000000, 0x4e63743900000000, 0x2cbef2d300000000, - 0xcd08a03c00000000, 0xa5acdfca00000000, 0x441a8d2500000000, - 0x26c70bcf00000000, 0xc771592000000000, 0xa37b77c100000000, - 0x42cd252e00000000, 0x2010a3c400000000, 0xc1a6f12b00000000, - 0xe196e61400000000, 0x0020b4fb00000000, 0x62fd321100000000, - 0x834b60fe00000000, 0xe7414e1f00000000, 0x06f71cf000000000, - 0x642a9a1a00000000, 0x859cc8f500000000, 0xed38b70300000000, - 0x0c8ee5ec00000000, 0x6e53630600000000, 0x8fe531e900000000, - 0xebef1f0800000000, 0x0a594de700000000, 0x6884cb0d00000000, - 0x893299e200000000, 0xf9ca453a00000000, 0x187c17d500000000, - 0x7aa1913f00000000, 0x9b17c3d000000000, 0xff1ded3100000000, - 0x1eabbfde00000000, 0x7c76393400000000, 0x9dc06bdb00000000, - 0xf564142d00000000, 0x14d246c200000000, 0x760fc02800000000, - 0x97b992c700000000, 0xf3b3bc2600000000, 0x1205eec900000000, - 0x70d8682300000000, 0x916e3acc00000000, 0xd12ea04900000000, - 0x3098f2a600000000, 0x5245744c00000000, 0xb3f326a300000000, - 0xd7f9084200000000, 0x364f5aad00000000, 0x5492dc4700000000, - 0xb5248ea800000000, 0xdd80f15e00000000, 0x3c36a3b100000000, - 0x5eeb255b00000000, 0xbf5d77b400000000, 0xdb57595500000000, - 0x3ae10bba00000000, 0x583c8d5000000000, 0xb98adfbf00000000, - 0xc972036700000000, 0x28c4518800000000, 0x4a19d76200000000, - 0xabaf858d00000000, 0xcfa5ab6c00000000, 0x2e13f98300000000, - 0x4cce7f6900000000, 0xad782d8600000000, 0xc5dc527000000000, - 0x246a009f00000000, 0x46b7867500000000, 0xa701d49a00000000, - 0xc30bfa7b00000000, 0x22bda89400000000, 0x40602e7e00000000, - 0xa1d67c9100000000}, - {0x0000000000000000, 0x5880e2d700000000, 0xf106b47400000000, - 0xa98656a300000000, 0xe20d68e900000000, 0xba8d8a3e00000000, - 0x130bdc9d00000000, 0x4b8b3e4a00000000, 0x851da10900000000, - 0xdd9d43de00000000, 0x741b157d00000000, 0x2c9bf7aa00000000, - 0x6710c9e000000000, 0x3f902b3700000000, 0x96167d9400000000, - 0xce969f4300000000, 0x0a3b421300000000, 0x52bba0c400000000, - 0xfb3df66700000000, 0xa3bd14b000000000, 0xe8362afa00000000, - 0xb0b6c82d00000000, 0x19309e8e00000000, 0x41b07c5900000000, - 0x8f26e31a00000000, 0xd7a601cd00000000, 0x7e20576e00000000, - 0x26a0b5b900000000, 0x6d2b8bf300000000, 0x35ab692400000000, - 0x9c2d3f8700000000, 0xc4addd5000000000, 0x1476842600000000, - 0x4cf666f100000000, 0xe570305200000000, 0xbdf0d28500000000, - 0xf67beccf00000000, 0xaefb0e1800000000, 0x077d58bb00000000, - 0x5ffdba6c00000000, 0x916b252f00000000, 0xc9ebc7f800000000, - 0x606d915b00000000, 0x38ed738c00000000, 0x73664dc600000000, - 0x2be6af1100000000, 0x8260f9b200000000, 0xdae01b6500000000, - 0x1e4dc63500000000, 0x46cd24e200000000, 0xef4b724100000000, - 0xb7cb909600000000, 0xfc40aedc00000000, 0xa4c04c0b00000000, - 0x0d461aa800000000, 0x55c6f87f00000000, 0x9b50673c00000000, - 0xc3d085eb00000000, 0x6a56d34800000000, 0x32d6319f00000000, - 0x795d0fd500000000, 0x21dded0200000000, 0x885bbba100000000, - 0xd0db597600000000, 0x28ec084d00000000, 0x706cea9a00000000, - 0xd9eabc3900000000, 0x816a5eee00000000, 0xcae160a400000000, - 0x9261827300000000, 0x3be7d4d000000000, 0x6367360700000000, - 0xadf1a94400000000, 0xf5714b9300000000, 0x5cf71d3000000000, - 0x0477ffe700000000, 0x4ffcc1ad00000000, 0x177c237a00000000, - 0xbefa75d900000000, 0xe67a970e00000000, 0x22d74a5e00000000, - 0x7a57a88900000000, 0xd3d1fe2a00000000, 0x8b511cfd00000000, - 0xc0da22b700000000, 0x985ac06000000000, 0x31dc96c300000000, - 0x695c741400000000, 0xa7caeb5700000000, 0xff4a098000000000, - 0x56cc5f2300000000, 0x0e4cbdf400000000, 0x45c783be00000000, - 0x1d47616900000000, 0xb4c137ca00000000, 0xec41d51d00000000, - 0x3c9a8c6b00000000, 0x641a6ebc00000000, 0xcd9c381f00000000, - 0x951cdac800000000, 0xde97e48200000000, 0x8617065500000000, - 0x2f9150f600000000, 0x7711b22100000000, 0xb9872d6200000000, - 0xe107cfb500000000, 0x4881991600000000, 0x10017bc100000000, - 0x5b8a458b00000000, 0x030aa75c00000000, 0xaa8cf1ff00000000, - 0xf20c132800000000, 0x36a1ce7800000000, 0x6e212caf00000000, - 0xc7a77a0c00000000, 0x9f2798db00000000, 0xd4aca69100000000, - 0x8c2c444600000000, 0x25aa12e500000000, 0x7d2af03200000000, - 0xb3bc6f7100000000, 0xeb3c8da600000000, 0x42badb0500000000, - 0x1a3a39d200000000, 0x51b1079800000000, 0x0931e54f00000000, - 0xa0b7b3ec00000000, 0xf837513b00000000, 0x50d8119a00000000, - 0x0858f34d00000000, 0xa1dea5ee00000000, 0xf95e473900000000, - 0xb2d5797300000000, 0xea559ba400000000, 0x43d3cd0700000000, - 0x1b532fd000000000, 0xd5c5b09300000000, 0x8d45524400000000, - 0x24c304e700000000, 0x7c43e63000000000, 0x37c8d87a00000000, - 0x6f483aad00000000, 0xc6ce6c0e00000000, 0x9e4e8ed900000000, - 0x5ae3538900000000, 0x0263b15e00000000, 0xabe5e7fd00000000, - 0xf365052a00000000, 0xb8ee3b6000000000, 0xe06ed9b700000000, - 0x49e88f1400000000, 0x11686dc300000000, 0xdffef28000000000, - 0x877e105700000000, 0x2ef846f400000000, 0x7678a42300000000, - 0x3df39a6900000000, 0x657378be00000000, 0xccf52e1d00000000, - 0x9475ccca00000000, 0x44ae95bc00000000, 0x1c2e776b00000000, - 0xb5a821c800000000, 0xed28c31f00000000, 0xa6a3fd5500000000, - 0xfe231f8200000000, 0x57a5492100000000, 0x0f25abf600000000, - 0xc1b334b500000000, 0x9933d66200000000, 0x30b580c100000000, - 0x6835621600000000, 0x23be5c5c00000000, 0x7b3ebe8b00000000, - 0xd2b8e82800000000, 0x8a380aff00000000, 0x4e95d7af00000000, - 0x1615357800000000, 0xbf9363db00000000, 0xe713810c00000000, - 0xac98bf4600000000, 0xf4185d9100000000, 0x5d9e0b3200000000, - 0x051ee9e500000000, 0xcb8876a600000000, 0x9308947100000000, - 0x3a8ec2d200000000, 0x620e200500000000, 0x29851e4f00000000, - 0x7105fc9800000000, 0xd883aa3b00000000, 0x800348ec00000000, - 0x783419d700000000, 0x20b4fb0000000000, 0x8932ada300000000, - 0xd1b24f7400000000, 0x9a39713e00000000, 0xc2b993e900000000, - 0x6b3fc54a00000000, 0x33bf279d00000000, 0xfd29b8de00000000, - 0xa5a95a0900000000, 0x0c2f0caa00000000, 0x54afee7d00000000, - 0x1f24d03700000000, 0x47a432e000000000, 0xee22644300000000, - 0xb6a2869400000000, 0x720f5bc400000000, 0x2a8fb91300000000, - 0x8309efb000000000, 0xdb890d6700000000, 0x9002332d00000000, - 0xc882d1fa00000000, 0x6104875900000000, 0x3984658e00000000, - 0xf712facd00000000, 0xaf92181a00000000, 0x06144eb900000000, - 0x5e94ac6e00000000, 0x151f922400000000, 0x4d9f70f300000000, - 0xe419265000000000, 0xbc99c48700000000, 0x6c429df100000000, - 0x34c27f2600000000, 0x9d44298500000000, 0xc5c4cb5200000000, - 0x8e4ff51800000000, 0xd6cf17cf00000000, 0x7f49416c00000000, - 0x27c9a3bb00000000, 0xe95f3cf800000000, 0xb1dfde2f00000000, - 0x1859888c00000000, 0x40d96a5b00000000, 0x0b52541100000000, - 0x53d2b6c600000000, 0xfa54e06500000000, 0xa2d402b200000000, - 0x6679dfe200000000, 0x3ef93d3500000000, 0x977f6b9600000000, - 0xcfff894100000000, 0x8474b70b00000000, 0xdcf455dc00000000, - 0x7572037f00000000, 0x2df2e1a800000000, 0xe3647eeb00000000, - 0xbbe49c3c00000000, 0x1262ca9f00000000, 0x4ae2284800000000, - 0x0169160200000000, 0x59e9f4d500000000, 0xf06fa27600000000, - 0xa8ef40a100000000}, - {0x0000000000000000, 0x463b676500000000, 0x8c76ceca00000000, - 0xca4da9af00000000, 0x59ebed4e00000000, 0x1fd08a2b00000000, - 0xd59d238400000000, 0x93a644e100000000, 0xb2d6db9d00000000, - 0xf4edbcf800000000, 0x3ea0155700000000, 0x789b723200000000, - 0xeb3d36d300000000, 0xad0651b600000000, 0x674bf81900000000, - 0x21709f7c00000000, 0x25abc6e000000000, 0x6390a18500000000, - 0xa9dd082a00000000, 0xefe66f4f00000000, 0x7c402bae00000000, - 0x3a7b4ccb00000000, 0xf036e56400000000, 0xb60d820100000000, - 0x977d1d7d00000000, 0xd1467a1800000000, 0x1b0bd3b700000000, - 0x5d30b4d200000000, 0xce96f03300000000, 0x88ad975600000000, - 0x42e03ef900000000, 0x04db599c00000000, 0x0b50fc1a00000000, - 0x4d6b9b7f00000000, 0x872632d000000000, 0xc11d55b500000000, - 0x52bb115400000000, 0x1480763100000000, 0xdecddf9e00000000, - 0x98f6b8fb00000000, 0xb986278700000000, 0xffbd40e200000000, - 0x35f0e94d00000000, 0x73cb8e2800000000, 0xe06dcac900000000, - 0xa656adac00000000, 0x6c1b040300000000, 0x2a20636600000000, - 0x2efb3afa00000000, 0x68c05d9f00000000, 0xa28df43000000000, - 0xe4b6935500000000, 0x7710d7b400000000, 0x312bb0d100000000, - 0xfb66197e00000000, 0xbd5d7e1b00000000, 0x9c2de16700000000, - 0xda16860200000000, 0x105b2fad00000000, 0x566048c800000000, - 0xc5c60c2900000000, 0x83fd6b4c00000000, 0x49b0c2e300000000, - 0x0f8ba58600000000, 0x16a0f83500000000, 0x509b9f5000000000, - 0x9ad636ff00000000, 0xdced519a00000000, 0x4f4b157b00000000, - 0x0970721e00000000, 0xc33ddbb100000000, 0x8506bcd400000000, - 0xa47623a800000000, 0xe24d44cd00000000, 0x2800ed6200000000, - 0x6e3b8a0700000000, 0xfd9dcee600000000, 0xbba6a98300000000, - 0x71eb002c00000000, 0x37d0674900000000, 0x330b3ed500000000, - 0x753059b000000000, 0xbf7df01f00000000, 0xf946977a00000000, - 0x6ae0d39b00000000, 0x2cdbb4fe00000000, 0xe6961d5100000000, - 0xa0ad7a3400000000, 0x81dde54800000000, 0xc7e6822d00000000, - 0x0dab2b8200000000, 0x4b904ce700000000, 0xd836080600000000, - 0x9e0d6f6300000000, 0x5440c6cc00000000, 0x127ba1a900000000, - 0x1df0042f00000000, 0x5bcb634a00000000, 0x9186cae500000000, - 0xd7bdad8000000000, 0x441be96100000000, 0x02208e0400000000, - 0xc86d27ab00000000, 0x8e5640ce00000000, 0xaf26dfb200000000, - 0xe91db8d700000000, 0x2350117800000000, 0x656b761d00000000, - 0xf6cd32fc00000000, 0xb0f6559900000000, 0x7abbfc3600000000, - 0x3c809b5300000000, 0x385bc2cf00000000, 0x7e60a5aa00000000, - 0xb42d0c0500000000, 0xf2166b6000000000, 0x61b02f8100000000, - 0x278b48e400000000, 0xedc6e14b00000000, 0xabfd862e00000000, - 0x8a8d195200000000, 0xccb67e3700000000, 0x06fbd79800000000, - 0x40c0b0fd00000000, 0xd366f41c00000000, 0x955d937900000000, - 0x5f103ad600000000, 0x192b5db300000000, 0x2c40f16b00000000, - 0x6a7b960e00000000, 0xa0363fa100000000, 0xe60d58c400000000, - 0x75ab1c2500000000, 0x33907b4000000000, 0xf9ddd2ef00000000, - 0xbfe6b58a00000000, 0x9e962af600000000, 0xd8ad4d9300000000, - 0x12e0e43c00000000, 0x54db835900000000, 0xc77dc7b800000000, - 0x8146a0dd00000000, 0x4b0b097200000000, 0x0d306e1700000000, - 0x09eb378b00000000, 0x4fd050ee00000000, 0x859df94100000000, - 0xc3a69e2400000000, 0x5000dac500000000, 0x163bbda000000000, - 0xdc76140f00000000, 0x9a4d736a00000000, 0xbb3dec1600000000, - 0xfd068b7300000000, 0x374b22dc00000000, 0x717045b900000000, - 0xe2d6015800000000, 0xa4ed663d00000000, 0x6ea0cf9200000000, - 0x289ba8f700000000, 0x27100d7100000000, 0x612b6a1400000000, - 0xab66c3bb00000000, 0xed5da4de00000000, 0x7efbe03f00000000, - 0x38c0875a00000000, 0xf28d2ef500000000, 0xb4b6499000000000, - 0x95c6d6ec00000000, 0xd3fdb18900000000, 0x19b0182600000000, - 0x5f8b7f4300000000, 0xcc2d3ba200000000, 0x8a165cc700000000, - 0x405bf56800000000, 0x0660920d00000000, 0x02bbcb9100000000, - 0x4480acf400000000, 0x8ecd055b00000000, 0xc8f6623e00000000, - 0x5b5026df00000000, 0x1d6b41ba00000000, 0xd726e81500000000, - 0x911d8f7000000000, 0xb06d100c00000000, 0xf656776900000000, - 0x3c1bdec600000000, 0x7a20b9a300000000, 0xe986fd4200000000, - 0xafbd9a2700000000, 0x65f0338800000000, 0x23cb54ed00000000, - 0x3ae0095e00000000, 0x7cdb6e3b00000000, 0xb696c79400000000, - 0xf0ada0f100000000, 0x630be41000000000, 0x2530837500000000, - 0xef7d2ada00000000, 0xa9464dbf00000000, 0x8836d2c300000000, - 0xce0db5a600000000, 0x04401c0900000000, 0x427b7b6c00000000, - 0xd1dd3f8d00000000, 0x97e658e800000000, 0x5dabf14700000000, - 0x1b90962200000000, 0x1f4bcfbe00000000, 0x5970a8db00000000, - 0x933d017400000000, 0xd506661100000000, 0x46a022f000000000, - 0x009b459500000000, 0xcad6ec3a00000000, 0x8ced8b5f00000000, - 0xad9d142300000000, 0xeba6734600000000, 0x21ebdae900000000, - 0x67d0bd8c00000000, 0xf476f96d00000000, 0xb24d9e0800000000, - 0x780037a700000000, 0x3e3b50c200000000, 0x31b0f54400000000, - 0x778b922100000000, 0xbdc63b8e00000000, 0xfbfd5ceb00000000, - 0x685b180a00000000, 0x2e607f6f00000000, 0xe42dd6c000000000, - 0xa216b1a500000000, 0x83662ed900000000, 0xc55d49bc00000000, - 0x0f10e01300000000, 0x492b877600000000, 0xda8dc39700000000, - 0x9cb6a4f200000000, 0x56fb0d5d00000000, 0x10c06a3800000000, - 0x141b33a400000000, 0x522054c100000000, 0x986dfd6e00000000, - 0xde569a0b00000000, 0x4df0deea00000000, 0x0bcbb98f00000000, - 0xc186102000000000, 0x87bd774500000000, 0xa6cde83900000000, - 0xe0f68f5c00000000, 0x2abb26f300000000, 0x6c80419600000000, - 0xff26057700000000, 0xb91d621200000000, 0x7350cbbd00000000, - 0x356bacd800000000}, - {0x0000000000000000, 0x9e83da9f00000000, 0x7d01c4e400000000, - 0xe3821e7b00000000, 0xbb04f91200000000, 0x2587238d00000000, - 0xc6053df600000000, 0x5886e76900000000, 0x7609f22500000000, - 0xe88a28ba00000000, 0x0b0836c100000000, 0x958bec5e00000000, - 0xcd0d0b3700000000, 0x538ed1a800000000, 0xb00ccfd300000000, - 0x2e8f154c00000000, 0xec12e44b00000000, 0x72913ed400000000, - 0x911320af00000000, 0x0f90fa3000000000, 0x57161d5900000000, - 0xc995c7c600000000, 0x2a17d9bd00000000, 0xb494032200000000, - 0x9a1b166e00000000, 0x0498ccf100000000, 0xe71ad28a00000000, - 0x7999081500000000, 0x211fef7c00000000, 0xbf9c35e300000000, - 0x5c1e2b9800000000, 0xc29df10700000000, 0xd825c89700000000, - 0x46a6120800000000, 0xa5240c7300000000, 0x3ba7d6ec00000000, - 0x6321318500000000, 0xfda2eb1a00000000, 0x1e20f56100000000, - 0x80a32ffe00000000, 0xae2c3ab200000000, 0x30afe02d00000000, - 0xd32dfe5600000000, 0x4dae24c900000000, 0x1528c3a000000000, - 0x8bab193f00000000, 0x6829074400000000, 0xf6aadddb00000000, - 0x34372cdc00000000, 0xaab4f64300000000, 0x4936e83800000000, - 0xd7b532a700000000, 0x8f33d5ce00000000, 0x11b00f5100000000, - 0xf232112a00000000, 0x6cb1cbb500000000, 0x423edef900000000, - 0xdcbd046600000000, 0x3f3f1a1d00000000, 0xa1bcc08200000000, - 0xf93a27eb00000000, 0x67b9fd7400000000, 0x843be30f00000000, - 0x1ab8399000000000, 0xf14de1f400000000, 0x6fce3b6b00000000, - 0x8c4c251000000000, 0x12cfff8f00000000, 0x4a4918e600000000, - 0xd4cac27900000000, 0x3748dc0200000000, 0xa9cb069d00000000, - 0x874413d100000000, 0x19c7c94e00000000, 0xfa45d73500000000, - 0x64c60daa00000000, 0x3c40eac300000000, 0xa2c3305c00000000, - 0x41412e2700000000, 0xdfc2f4b800000000, 0x1d5f05bf00000000, - 0x83dcdf2000000000, 0x605ec15b00000000, 0xfedd1bc400000000, - 0xa65bfcad00000000, 0x38d8263200000000, 0xdb5a384900000000, - 0x45d9e2d600000000, 0x6b56f79a00000000, 0xf5d52d0500000000, - 0x1657337e00000000, 0x88d4e9e100000000, 0xd0520e8800000000, - 0x4ed1d41700000000, 0xad53ca6c00000000, 0x33d010f300000000, - 0x2968296300000000, 0xb7ebf3fc00000000, 0x5469ed8700000000, - 0xcaea371800000000, 0x926cd07100000000, 0x0cef0aee00000000, - 0xef6d149500000000, 0x71eece0a00000000, 0x5f61db4600000000, - 0xc1e201d900000000, 0x22601fa200000000, 0xbce3c53d00000000, - 0xe465225400000000, 0x7ae6f8cb00000000, 0x9964e6b000000000, - 0x07e73c2f00000000, 0xc57acd2800000000, 0x5bf917b700000000, - 0xb87b09cc00000000, 0x26f8d35300000000, 0x7e7e343a00000000, - 0xe0fdeea500000000, 0x037ff0de00000000, 0x9dfc2a4100000000, - 0xb3733f0d00000000, 0x2df0e59200000000, 0xce72fbe900000000, - 0x50f1217600000000, 0x0877c61f00000000, 0x96f41c8000000000, - 0x757602fb00000000, 0xebf5d86400000000, 0xa39db33200000000, - 0x3d1e69ad00000000, 0xde9c77d600000000, 0x401fad4900000000, - 0x18994a2000000000, 0x861a90bf00000000, 0x65988ec400000000, - 0xfb1b545b00000000, 0xd594411700000000, 0x4b179b8800000000, - 0xa89585f300000000, 0x36165f6c00000000, 0x6e90b80500000000, - 0xf013629a00000000, 0x13917ce100000000, 0x8d12a67e00000000, - 0x4f8f577900000000, 0xd10c8de600000000, 0x328e939d00000000, - 0xac0d490200000000, 0xf48bae6b00000000, 0x6a0874f400000000, - 0x898a6a8f00000000, 0x1709b01000000000, 0x3986a55c00000000, - 0xa7057fc300000000, 0x448761b800000000, 0xda04bb2700000000, - 0x82825c4e00000000, 0x1c0186d100000000, 0xff8398aa00000000, - 0x6100423500000000, 0x7bb87ba500000000, 0xe53ba13a00000000, - 0x06b9bf4100000000, 0x983a65de00000000, 0xc0bc82b700000000, - 0x5e3f582800000000, 0xbdbd465300000000, 0x233e9ccc00000000, - 0x0db1898000000000, 0x9332531f00000000, 0x70b04d6400000000, - 0xee3397fb00000000, 0xb6b5709200000000, 0x2836aa0d00000000, - 0xcbb4b47600000000, 0x55376ee900000000, 0x97aa9fee00000000, - 0x0929457100000000, 0xeaab5b0a00000000, 0x7428819500000000, - 0x2cae66fc00000000, 0xb22dbc6300000000, 0x51afa21800000000, - 0xcf2c788700000000, 0xe1a36dcb00000000, 0x7f20b75400000000, - 0x9ca2a92f00000000, 0x022173b000000000, 0x5aa794d900000000, - 0xc4244e4600000000, 0x27a6503d00000000, 0xb9258aa200000000, - 0x52d052c600000000, 0xcc53885900000000, 0x2fd1962200000000, - 0xb1524cbd00000000, 0xe9d4abd400000000, 0x7757714b00000000, - 0x94d56f3000000000, 0x0a56b5af00000000, 0x24d9a0e300000000, - 0xba5a7a7c00000000, 0x59d8640700000000, 0xc75bbe9800000000, - 0x9fdd59f100000000, 0x015e836e00000000, 0xe2dc9d1500000000, - 0x7c5f478a00000000, 0xbec2b68d00000000, 0x20416c1200000000, - 0xc3c3726900000000, 0x5d40a8f600000000, 0x05c64f9f00000000, - 0x9b45950000000000, 0x78c78b7b00000000, 0xe64451e400000000, - 0xc8cb44a800000000, 0x56489e3700000000, 0xb5ca804c00000000, - 0x2b495ad300000000, 0x73cfbdba00000000, 0xed4c672500000000, - 0x0ece795e00000000, 0x904da3c100000000, 0x8af59a5100000000, - 0x147640ce00000000, 0xf7f45eb500000000, 0x6977842a00000000, - 0x31f1634300000000, 0xaf72b9dc00000000, 0x4cf0a7a700000000, - 0xd2737d3800000000, 0xfcfc687400000000, 0x627fb2eb00000000, - 0x81fdac9000000000, 0x1f7e760f00000000, 0x47f8916600000000, - 0xd97b4bf900000000, 0x3af9558200000000, 0xa47a8f1d00000000, - 0x66e77e1a00000000, 0xf864a48500000000, 0x1be6bafe00000000, - 0x8565606100000000, 0xdde3870800000000, 0x43605d9700000000, - 0xa0e243ec00000000, 0x3e61997300000000, 0x10ee8c3f00000000, - 0x8e6d56a000000000, 0x6def48db00000000, 0xf36c924400000000, - 0xabea752d00000000, 0x3569afb200000000, 0xd6ebb1c900000000, - 0x48686b5600000000}, - {0x0000000000000000, 0xc064281700000000, 0x80c9502e00000000, - 0x40ad783900000000, 0x0093a15c00000000, 0xc0f7894b00000000, - 0x805af17200000000, 0x403ed96500000000, 0x002643b900000000, - 0xc0426bae00000000, 0x80ef139700000000, 0x408b3b8000000000, - 0x00b5e2e500000000, 0xc0d1caf200000000, 0x807cb2cb00000000, - 0x40189adc00000000, 0x414af7a900000000, 0x812edfbe00000000, - 0xc183a78700000000, 0x01e78f9000000000, 0x41d956f500000000, - 0x81bd7ee200000000, 0xc11006db00000000, 0x01742ecc00000000, - 0x416cb41000000000, 0x81089c0700000000, 0xc1a5e43e00000000, - 0x01c1cc2900000000, 0x41ff154c00000000, 0x819b3d5b00000000, - 0xc136456200000000, 0x01526d7500000000, 0xc3929f8800000000, - 0x03f6b79f00000000, 0x435bcfa600000000, 0x833fe7b100000000, - 0xc3013ed400000000, 0x036516c300000000, 0x43c86efa00000000, - 0x83ac46ed00000000, 0xc3b4dc3100000000, 0x03d0f42600000000, - 0x437d8c1f00000000, 0x8319a40800000000, 0xc3277d6d00000000, - 0x0343557a00000000, 0x43ee2d4300000000, 0x838a055400000000, - 0x82d8682100000000, 0x42bc403600000000, 0x0211380f00000000, - 0xc275101800000000, 0x824bc97d00000000, 0x422fe16a00000000, - 0x0282995300000000, 0xc2e6b14400000000, 0x82fe2b9800000000, - 0x429a038f00000000, 0x02377bb600000000, 0xc25353a100000000, - 0x826d8ac400000000, 0x4209a2d300000000, 0x02a4daea00000000, - 0xc2c0f2fd00000000, 0xc7234eca00000000, 0x074766dd00000000, - 0x47ea1ee400000000, 0x878e36f300000000, 0xc7b0ef9600000000, - 0x07d4c78100000000, 0x4779bfb800000000, 0x871d97af00000000, - 0xc7050d7300000000, 0x0761256400000000, 0x47cc5d5d00000000, - 0x87a8754a00000000, 0xc796ac2f00000000, 0x07f2843800000000, - 0x475ffc0100000000, 0x873bd41600000000, 0x8669b96300000000, - 0x460d917400000000, 0x06a0e94d00000000, 0xc6c4c15a00000000, - 0x86fa183f00000000, 0x469e302800000000, 0x0633481100000000, - 0xc657600600000000, 0x864ffada00000000, 0x462bd2cd00000000, - 0x0686aaf400000000, 0xc6e282e300000000, 0x86dc5b8600000000, - 0x46b8739100000000, 0x06150ba800000000, 0xc67123bf00000000, - 0x04b1d14200000000, 0xc4d5f95500000000, 0x8478816c00000000, - 0x441ca97b00000000, 0x0422701e00000000, 0xc446580900000000, - 0x84eb203000000000, 0x448f082700000000, 0x049792fb00000000, - 0xc4f3baec00000000, 0x845ec2d500000000, 0x443aeac200000000, - 0x040433a700000000, 0xc4601bb000000000, 0x84cd638900000000, - 0x44a94b9e00000000, 0x45fb26eb00000000, 0x859f0efc00000000, - 0xc53276c500000000, 0x05565ed200000000, 0x456887b700000000, - 0x850cafa000000000, 0xc5a1d79900000000, 0x05c5ff8e00000000, - 0x45dd655200000000, 0x85b94d4500000000, 0xc514357c00000000, - 0x05701d6b00000000, 0x454ec40e00000000, 0x852aec1900000000, - 0xc587942000000000, 0x05e3bc3700000000, 0xcf41ed4f00000000, - 0x0f25c55800000000, 0x4f88bd6100000000, 0x8fec957600000000, - 0xcfd24c1300000000, 0x0fb6640400000000, 0x4f1b1c3d00000000, - 0x8f7f342a00000000, 0xcf67aef600000000, 0x0f0386e100000000, - 0x4faefed800000000, 0x8fcad6cf00000000, 0xcff40faa00000000, - 0x0f9027bd00000000, 0x4f3d5f8400000000, 0x8f59779300000000, - 0x8e0b1ae600000000, 0x4e6f32f100000000, 0x0ec24ac800000000, - 0xcea662df00000000, 0x8e98bbba00000000, 0x4efc93ad00000000, - 0x0e51eb9400000000, 0xce35c38300000000, 0x8e2d595f00000000, - 0x4e49714800000000, 0x0ee4097100000000, 0xce80216600000000, - 0x8ebef80300000000, 0x4edad01400000000, 0x0e77a82d00000000, - 0xce13803a00000000, 0x0cd372c700000000, 0xccb75ad000000000, - 0x8c1a22e900000000, 0x4c7e0afe00000000, 0x0c40d39b00000000, - 0xcc24fb8c00000000, 0x8c8983b500000000, 0x4cedaba200000000, - 0x0cf5317e00000000, 0xcc91196900000000, 0x8c3c615000000000, - 0x4c58494700000000, 0x0c66902200000000, 0xcc02b83500000000, - 0x8cafc00c00000000, 0x4ccbe81b00000000, 0x4d99856e00000000, - 0x8dfdad7900000000, 0xcd50d54000000000, 0x0d34fd5700000000, - 0x4d0a243200000000, 0x8d6e0c2500000000, 0xcdc3741c00000000, - 0x0da75c0b00000000, 0x4dbfc6d700000000, 0x8ddbeec000000000, - 0xcd7696f900000000, 0x0d12beee00000000, 0x4d2c678b00000000, - 0x8d484f9c00000000, 0xcde537a500000000, 0x0d811fb200000000, - 0x0862a38500000000, 0xc8068b9200000000, 0x88abf3ab00000000, - 0x48cfdbbc00000000, 0x08f102d900000000, 0xc8952ace00000000, - 0x883852f700000000, 0x485c7ae000000000, 0x0844e03c00000000, - 0xc820c82b00000000, 0x888db01200000000, 0x48e9980500000000, - 0x08d7416000000000, 0xc8b3697700000000, 0x881e114e00000000, - 0x487a395900000000, 0x4928542c00000000, 0x894c7c3b00000000, - 0xc9e1040200000000, 0x09852c1500000000, 0x49bbf57000000000, - 0x89dfdd6700000000, 0xc972a55e00000000, 0x09168d4900000000, - 0x490e179500000000, 0x896a3f8200000000, 0xc9c747bb00000000, - 0x09a36fac00000000, 0x499db6c900000000, 0x89f99ede00000000, - 0xc954e6e700000000, 0x0930cef000000000, 0xcbf03c0d00000000, - 0x0b94141a00000000, 0x4b396c2300000000, 0x8b5d443400000000, - 0xcb639d5100000000, 0x0b07b54600000000, 0x4baacd7f00000000, - 0x8bcee56800000000, 0xcbd67fb400000000, 0x0bb257a300000000, - 0x4b1f2f9a00000000, 0x8b7b078d00000000, 0xcb45dee800000000, - 0x0b21f6ff00000000, 0x4b8c8ec600000000, 0x8be8a6d100000000, - 0x8abacba400000000, 0x4adee3b300000000, 0x0a739b8a00000000, - 0xca17b39d00000000, 0x8a296af800000000, 0x4a4d42ef00000000, - 0x0ae03ad600000000, 0xca8412c100000000, 0x8a9c881d00000000, - 0x4af8a00a00000000, 0x0a55d83300000000, 0xca31f02400000000, - 0x8a0f294100000000, 0x4a6b015600000000, 0x0ac6796f00000000, - 0xcaa2517800000000}, - {0x0000000000000000, 0xd4ea739b00000000, 0xe9d396ed00000000, - 0x3d39e57600000000, 0x93a15c0000000000, 0x474b2f9b00000000, - 0x7a72caed00000000, 0xae98b97600000000, 0x2643b90000000000, - 0xf2a9ca9b00000000, 0xcf902fed00000000, 0x1b7a5c7600000000, - 0xb5e2e50000000000, 0x6108969b00000000, 0x5c3173ed00000000, - 0x88db007600000000, 0x4c86720100000000, 0x986c019a00000000, - 0xa555e4ec00000000, 0x71bf977700000000, 0xdf272e0100000000, - 0x0bcd5d9a00000000, 0x36f4b8ec00000000, 0xe21ecb7700000000, - 0x6ac5cb0100000000, 0xbe2fb89a00000000, 0x83165dec00000000, - 0x57fc2e7700000000, 0xf964970100000000, 0x2d8ee49a00000000, - 0x10b701ec00000000, 0xc45d727700000000, 0x980ce50200000000, - 0x4ce6969900000000, 0x71df73ef00000000, 0xa535007400000000, - 0x0badb90200000000, 0xdf47ca9900000000, 0xe27e2fef00000000, - 0x36945c7400000000, 0xbe4f5c0200000000, 0x6aa52f9900000000, - 0x579ccaef00000000, 0x8376b97400000000, 0x2dee000200000000, - 0xf904739900000000, 0xc43d96ef00000000, 0x10d7e57400000000, - 0xd48a970300000000, 0x0060e49800000000, 0x3d5901ee00000000, - 0xe9b3727500000000, 0x472bcb0300000000, 0x93c1b89800000000, - 0xaef85dee00000000, 0x7a122e7500000000, 0xf2c92e0300000000, - 0x26235d9800000000, 0x1b1ab8ee00000000, 0xcff0cb7500000000, - 0x6168720300000000, 0xb582019800000000, 0x88bbe4ee00000000, - 0x5c51977500000000, 0x3019ca0500000000, 0xe4f3b99e00000000, - 0xd9ca5ce800000000, 0x0d202f7300000000, 0xa3b8960500000000, - 0x7752e59e00000000, 0x4a6b00e800000000, 0x9e81737300000000, - 0x165a730500000000, 0xc2b0009e00000000, 0xff89e5e800000000, - 0x2b63967300000000, 0x85fb2f0500000000, 0x51115c9e00000000, - 0x6c28b9e800000000, 0xb8c2ca7300000000, 0x7c9fb80400000000, - 0xa875cb9f00000000, 0x954c2ee900000000, 0x41a65d7200000000, - 0xef3ee40400000000, 0x3bd4979f00000000, 0x06ed72e900000000, - 0xd207017200000000, 0x5adc010400000000, 0x8e36729f00000000, - 0xb30f97e900000000, 0x67e5e47200000000, 0xc97d5d0400000000, - 0x1d972e9f00000000, 0x20aecbe900000000, 0xf444b87200000000, - 0xa8152f0700000000, 0x7cff5c9c00000000, 0x41c6b9ea00000000, - 0x952cca7100000000, 0x3bb4730700000000, 0xef5e009c00000000, - 0xd267e5ea00000000, 0x068d967100000000, 0x8e56960700000000, - 0x5abce59c00000000, 0x678500ea00000000, 0xb36f737100000000, - 0x1df7ca0700000000, 0xc91db99c00000000, 0xf4245cea00000000, - 0x20ce2f7100000000, 0xe4935d0600000000, 0x30792e9d00000000, - 0x0d40cbeb00000000, 0xd9aab87000000000, 0x7732010600000000, - 0xa3d8729d00000000, 0x9ee197eb00000000, 0x4a0be47000000000, - 0xc2d0e40600000000, 0x163a979d00000000, 0x2b0372eb00000000, - 0xffe9017000000000, 0x5171b80600000000, 0x859bcb9d00000000, - 0xb8a22eeb00000000, 0x6c485d7000000000, 0x6032940b00000000, - 0xb4d8e79000000000, 0x89e102e600000000, 0x5d0b717d00000000, - 0xf393c80b00000000, 0x2779bb9000000000, 0x1a405ee600000000, - 0xceaa2d7d00000000, 0x46712d0b00000000, 0x929b5e9000000000, - 0xafa2bbe600000000, 0x7b48c87d00000000, 0xd5d0710b00000000, - 0x013a029000000000, 0x3c03e7e600000000, 0xe8e9947d00000000, - 0x2cb4e60a00000000, 0xf85e959100000000, 0xc56770e700000000, - 0x118d037c00000000, 0xbf15ba0a00000000, 0x6bffc99100000000, - 0x56c62ce700000000, 0x822c5f7c00000000, 0x0af75f0a00000000, - 0xde1d2c9100000000, 0xe324c9e700000000, 0x37ceba7c00000000, - 0x9956030a00000000, 0x4dbc709100000000, 0x708595e700000000, - 0xa46fe67c00000000, 0xf83e710900000000, 0x2cd4029200000000, - 0x11ede7e400000000, 0xc507947f00000000, 0x6b9f2d0900000000, - 0xbf755e9200000000, 0x824cbbe400000000, 0x56a6c87f00000000, - 0xde7dc80900000000, 0x0a97bb9200000000, 0x37ae5ee400000000, - 0xe3442d7f00000000, 0x4ddc940900000000, 0x9936e79200000000, - 0xa40f02e400000000, 0x70e5717f00000000, 0xb4b8030800000000, - 0x6052709300000000, 0x5d6b95e500000000, 0x8981e67e00000000, - 0x27195f0800000000, 0xf3f32c9300000000, 0xcecac9e500000000, - 0x1a20ba7e00000000, 0x92fbba0800000000, 0x4611c99300000000, - 0x7b282ce500000000, 0xafc25f7e00000000, 0x015ae60800000000, - 0xd5b0959300000000, 0xe88970e500000000, 0x3c63037e00000000, - 0x502b5e0e00000000, 0x84c12d9500000000, 0xb9f8c8e300000000, - 0x6d12bb7800000000, 0xc38a020e00000000, 0x1760719500000000, - 0x2a5994e300000000, 0xfeb3e77800000000, 0x7668e70e00000000, - 0xa282949500000000, 0x9fbb71e300000000, 0x4b51027800000000, - 0xe5c9bb0e00000000, 0x3123c89500000000, 0x0c1a2de300000000, - 0xd8f05e7800000000, 0x1cad2c0f00000000, 0xc8475f9400000000, - 0xf57ebae200000000, 0x2194c97900000000, 0x8f0c700f00000000, - 0x5be6039400000000, 0x66dfe6e200000000, 0xb235957900000000, - 0x3aee950f00000000, 0xee04e69400000000, 0xd33d03e200000000, - 0x07d7707900000000, 0xa94fc90f00000000, 0x7da5ba9400000000, - 0x409c5fe200000000, 0x94762c7900000000, 0xc827bb0c00000000, - 0x1ccdc89700000000, 0x21f42de100000000, 0xf51e5e7a00000000, - 0x5b86e70c00000000, 0x8f6c949700000000, 0xb25571e100000000, - 0x66bf027a00000000, 0xee64020c00000000, 0x3a8e719700000000, - 0x07b794e100000000, 0xd35de77a00000000, 0x7dc55e0c00000000, - 0xa92f2d9700000000, 0x9416c8e100000000, 0x40fcbb7a00000000, - 0x84a1c90d00000000, 0x504bba9600000000, 0x6d725fe000000000, - 0xb9982c7b00000000, 0x1700950d00000000, 0xc3eae69600000000, - 0xfed303e000000000, 0x2a39707b00000000, 0xa2e2700d00000000, - 0x7608039600000000, 0x4b31e6e000000000, 0x9fdb957b00000000, - 0x31432c0d00000000, 0xe5a95f9600000000, 0xd890bae000000000, - 0x0c7ac97b00000000}, - {0x0000000000000000, 0x2765258100000000, 0x0fcc3bd900000000, - 0x28a91e5800000000, 0x5f9e066900000000, 0x78fb23e800000000, - 0x50523db000000000, 0x7737183100000000, 0xbe3c0dd200000000, - 0x9959285300000000, 0xb1f0360b00000000, 0x9695138a00000000, - 0xe1a20bbb00000000, 0xc6c72e3a00000000, 0xee6e306200000000, - 0xc90b15e300000000, 0x3d7f6b7f00000000, 0x1a1a4efe00000000, - 0x32b350a600000000, 0x15d6752700000000, 0x62e16d1600000000, - 0x4584489700000000, 0x6d2d56cf00000000, 0x4a48734e00000000, - 0x834366ad00000000, 0xa426432c00000000, 0x8c8f5d7400000000, - 0xabea78f500000000, 0xdcdd60c400000000, 0xfbb8454500000000, - 0xd3115b1d00000000, 0xf4747e9c00000000, 0x7afed6fe00000000, - 0x5d9bf37f00000000, 0x7532ed2700000000, 0x5257c8a600000000, - 0x2560d09700000000, 0x0205f51600000000, 0x2aaceb4e00000000, - 0x0dc9cecf00000000, 0xc4c2db2c00000000, 0xe3a7fead00000000, - 0xcb0ee0f500000000, 0xec6bc57400000000, 0x9b5cdd4500000000, - 0xbc39f8c400000000, 0x9490e69c00000000, 0xb3f5c31d00000000, - 0x4781bd8100000000, 0x60e4980000000000, 0x484d865800000000, - 0x6f28a3d900000000, 0x181fbbe800000000, 0x3f7a9e6900000000, - 0x17d3803100000000, 0x30b6a5b000000000, 0xf9bdb05300000000, - 0xded895d200000000, 0xf6718b8a00000000, 0xd114ae0b00000000, - 0xa623b63a00000000, 0x814693bb00000000, 0xa9ef8de300000000, - 0x8e8aa86200000000, 0xb5fadc2600000000, 0x929ff9a700000000, - 0xba36e7ff00000000, 0x9d53c27e00000000, 0xea64da4f00000000, - 0xcd01ffce00000000, 0xe5a8e19600000000, 0xc2cdc41700000000, - 0x0bc6d1f400000000, 0x2ca3f47500000000, 0x040aea2d00000000, - 0x236fcfac00000000, 0x5458d79d00000000, 0x733df21c00000000, - 0x5b94ec4400000000, 0x7cf1c9c500000000, 0x8885b75900000000, - 0xafe092d800000000, 0x87498c8000000000, 0xa02ca90100000000, - 0xd71bb13000000000, 0xf07e94b100000000, 0xd8d78ae900000000, - 0xffb2af6800000000, 0x36b9ba8b00000000, 0x11dc9f0a00000000, - 0x3975815200000000, 0x1e10a4d300000000, 0x6927bce200000000, - 0x4e42996300000000, 0x66eb873b00000000, 0x418ea2ba00000000, - 0xcf040ad800000000, 0xe8612f5900000000, 0xc0c8310100000000, - 0xe7ad148000000000, 0x909a0cb100000000, 0xb7ff293000000000, - 0x9f56376800000000, 0xb83312e900000000, 0x7138070a00000000, - 0x565d228b00000000, 0x7ef43cd300000000, 0x5991195200000000, - 0x2ea6016300000000, 0x09c324e200000000, 0x216a3aba00000000, - 0x060f1f3b00000000, 0xf27b61a700000000, 0xd51e442600000000, - 0xfdb75a7e00000000, 0xdad27fff00000000, 0xade567ce00000000, - 0x8a80424f00000000, 0xa2295c1700000000, 0x854c799600000000, - 0x4c476c7500000000, 0x6b2249f400000000, 0x438b57ac00000000, - 0x64ee722d00000000, 0x13d96a1c00000000, 0x34bc4f9d00000000, - 0x1c1551c500000000, 0x3b70744400000000, 0x6af5b94d00000000, - 0x4d909ccc00000000, 0x6539829400000000, 0x425ca71500000000, - 0x356bbf2400000000, 0x120e9aa500000000, 0x3aa784fd00000000, - 0x1dc2a17c00000000, 0xd4c9b49f00000000, 0xf3ac911e00000000, - 0xdb058f4600000000, 0xfc60aac700000000, 0x8b57b2f600000000, - 0xac32977700000000, 0x849b892f00000000, 0xa3feacae00000000, - 0x578ad23200000000, 0x70eff7b300000000, 0x5846e9eb00000000, - 0x7f23cc6a00000000, 0x0814d45b00000000, 0x2f71f1da00000000, - 0x07d8ef8200000000, 0x20bdca0300000000, 0xe9b6dfe000000000, - 0xced3fa6100000000, 0xe67ae43900000000, 0xc11fc1b800000000, - 0xb628d98900000000, 0x914dfc0800000000, 0xb9e4e25000000000, - 0x9e81c7d100000000, 0x100b6fb300000000, 0x376e4a3200000000, - 0x1fc7546a00000000, 0x38a271eb00000000, 0x4f9569da00000000, - 0x68f04c5b00000000, 0x4059520300000000, 0x673c778200000000, - 0xae37626100000000, 0x895247e000000000, 0xa1fb59b800000000, - 0x869e7c3900000000, 0xf1a9640800000000, 0xd6cc418900000000, - 0xfe655fd100000000, 0xd9007a5000000000, 0x2d7404cc00000000, - 0x0a11214d00000000, 0x22b83f1500000000, 0x05dd1a9400000000, - 0x72ea02a500000000, 0x558f272400000000, 0x7d26397c00000000, - 0x5a431cfd00000000, 0x9348091e00000000, 0xb42d2c9f00000000, - 0x9c8432c700000000, 0xbbe1174600000000, 0xccd60f7700000000, - 0xebb32af600000000, 0xc31a34ae00000000, 0xe47f112f00000000, - 0xdf0f656b00000000, 0xf86a40ea00000000, 0xd0c35eb200000000, - 0xf7a67b3300000000, 0x8091630200000000, 0xa7f4468300000000, - 0x8f5d58db00000000, 0xa8387d5a00000000, 0x613368b900000000, - 0x46564d3800000000, 0x6eff536000000000, 0x499a76e100000000, - 0x3ead6ed000000000, 0x19c84b5100000000, 0x3161550900000000, - 0x1604708800000000, 0xe2700e1400000000, 0xc5152b9500000000, - 0xedbc35cd00000000, 0xcad9104c00000000, 0xbdee087d00000000, - 0x9a8b2dfc00000000, 0xb22233a400000000, 0x9547162500000000, - 0x5c4c03c600000000, 0x7b29264700000000, 0x5380381f00000000, - 0x74e51d9e00000000, 0x03d205af00000000, 0x24b7202e00000000, - 0x0c1e3e7600000000, 0x2b7b1bf700000000, 0xa5f1b39500000000, - 0x8294961400000000, 0xaa3d884c00000000, 0x8d58adcd00000000, - 0xfa6fb5fc00000000, 0xdd0a907d00000000, 0xf5a38e2500000000, - 0xd2c6aba400000000, 0x1bcdbe4700000000, 0x3ca89bc600000000, - 0x1401859e00000000, 0x3364a01f00000000, 0x4453b82e00000000, - 0x63369daf00000000, 0x4b9f83f700000000, 0x6cfaa67600000000, - 0x988ed8ea00000000, 0xbfebfd6b00000000, 0x9742e33300000000, - 0xb027c6b200000000, 0xc710de8300000000, 0xe075fb0200000000, - 0xc8dce55a00000000, 0xefb9c0db00000000, 0x26b2d53800000000, - 0x01d7f0b900000000, 0x297eeee100000000, 0x0e1bcb6000000000, - 0x792cd35100000000, 0x5e49f6d000000000, 0x76e0e88800000000, - 0x5185cd0900000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, - 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, - 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, - 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, - 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, - 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, - 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, - 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, - 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, - 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, - 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, - 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, - 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, - 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, - 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, - 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, - 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, - 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, - 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, - 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, - 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, - 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, - 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, - 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, - 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, - 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, - 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, - 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, - 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, - 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, - 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, - 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, - 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, - 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, - 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, - 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, - 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, - 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, - 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, - 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, - 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, - 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, - 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, - 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, - 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, - 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, - 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, - 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, - 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, - 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, - 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, - 0x36197165}, - {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, - 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, - 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, - 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, - 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, - 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, - 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, - 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, - 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, - 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, - 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, - 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, - 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, - 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, - 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, - 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, - 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, - 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, - 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, - 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, - 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, - 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, - 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, - 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, - 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, - 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, - 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, - 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, - 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, - 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, - 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, - 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, - 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, - 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, - 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, - 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, - 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, - 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, - 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, - 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, - 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, - 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, - 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, - 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, - 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, - 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, - 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, - 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, - 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, - 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, - 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, - 0x1a3b93aa}, - {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, - 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, - 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, - 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, - 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, - 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, - 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, - 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, - 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, - 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, - 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, - 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, - 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, - 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, - 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, - 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, - 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, - 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, - 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, - 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, - 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, - 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, - 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, - 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, - 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, - 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, - 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, - 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, - 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, - 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, - 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, - 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, - 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, - 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, - 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, - 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, - 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, - 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, - 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, - 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, - 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, - 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, - 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, - 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, - 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, - 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, - 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, - 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, - 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, - 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, - 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, - 0xe147d714}, - {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, - 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, - 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, - 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, - 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, - 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, - 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, - 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, - 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, - 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, - 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, - 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, - 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, - 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, - 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, - 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, - 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, - 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, - 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, - 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, - 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, - 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, - 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, - 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, - 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, - 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, - 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, - 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, - 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, - 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, - 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, - 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, - 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, - 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, - 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, - 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, - 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, - 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, - 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, - 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, - 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, - 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, - 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, - 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, - 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, - 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, - 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, - 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, - 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, - 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, - 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, - 0x494f0c4b}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x43147b17, 0x8628f62e, 0xc53c8d39, 0x0c51ec5d, - 0x4f45974a, 0x8a791a73, 0xc96d6164, 0x18a2d8bb, 0x5bb6a3ac, - 0x9e8a2e95, 0xdd9e5582, 0x14f334e6, 0x57e74ff1, 0x92dbc2c8, - 0xd1cfb9df, 0x7142c0ac, 0x3256bbbb, 0xf76a3682, 0xb47e4d95, - 0x7d132cf1, 0x3e0757e6, 0xfb3bdadf, 0xb82fa1c8, 0x69e01817, - 0x2af46300, 0xefc8ee39, 0xacdc952e, 0x65b1f44a, 0x26a58f5d, - 0xe3990264, 0xa08d7973, 0xa382f182, 0xe0968a95, 0x25aa07ac, - 0x66be7cbb, 0xafd31ddf, 0xecc766c8, 0x29fbebf1, 0x6aef90e6, - 0xbb202939, 0xf834522e, 0x3d08df17, 0x7e1ca400, 0xb771c564, - 0xf465be73, 0x3159334a, 0x724d485d, 0xd2c0312e, 0x91d44a39, - 0x54e8c700, 0x17fcbc17, 0xde91dd73, 0x9d85a664, 0x58b92b5d, - 0x1bad504a, 0xca62e995, 0x89769282, 0x4c4a1fbb, 0x0f5e64ac, - 0xc63305c8, 0x85277edf, 0x401bf3e6, 0x030f88f1, 0x070392de, - 0x4417e9c9, 0x812b64f0, 0xc23f1fe7, 0x0b527e83, 0x48460594, - 0x8d7a88ad, 0xce6ef3ba, 0x1fa14a65, 0x5cb53172, 0x9989bc4b, - 0xda9dc75c, 0x13f0a638, 0x50e4dd2f, 0x95d85016, 0xd6cc2b01, - 0x76415272, 0x35552965, 0xf069a45c, 0xb37ddf4b, 0x7a10be2f, - 0x3904c538, 0xfc384801, 0xbf2c3316, 0x6ee38ac9, 0x2df7f1de, - 0xe8cb7ce7, 0xabdf07f0, 0x62b26694, 0x21a61d83, 0xe49a90ba, - 0xa78eebad, 0xa481635c, 0xe795184b, 0x22a99572, 0x61bdee65, - 0xa8d08f01, 0xebc4f416, 0x2ef8792f, 0x6dec0238, 0xbc23bbe7, - 0xff37c0f0, 0x3a0b4dc9, 0x791f36de, 0xb07257ba, 0xf3662cad, - 0x365aa194, 0x754eda83, 0xd5c3a3f0, 0x96d7d8e7, 0x53eb55de, - 0x10ff2ec9, 0xd9924fad, 0x9a8634ba, 0x5fbab983, 0x1caec294, - 0xcd617b4b, 0x8e75005c, 0x4b498d65, 0x085df672, 0xc1309716, - 0x8224ec01, 0x47186138, 0x040c1a2f, 0x4f005566, 0x0c142e71, - 0xc928a348, 0x8a3cd85f, 0x4351b93b, 0x0045c22c, 0xc5794f15, - 0x866d3402, 0x57a28ddd, 0x14b6f6ca, 0xd18a7bf3, 0x929e00e4, - 0x5bf36180, 0x18e71a97, 0xdddb97ae, 0x9ecfecb9, 0x3e4295ca, - 0x7d56eedd, 0xb86a63e4, 0xfb7e18f3, 0x32137997, 0x71070280, - 0xb43b8fb9, 0xf72ff4ae, 0x26e04d71, 0x65f43666, 0xa0c8bb5f, - 0xe3dcc048, 0x2ab1a12c, 0x69a5da3b, 0xac995702, 0xef8d2c15, - 0xec82a4e4, 0xaf96dff3, 0x6aaa52ca, 0x29be29dd, 0xe0d348b9, - 0xa3c733ae, 0x66fbbe97, 0x25efc580, 0xf4207c5f, 0xb7340748, - 0x72088a71, 0x311cf166, 0xf8719002, 0xbb65eb15, 0x7e59662c, - 0x3d4d1d3b, 0x9dc06448, 0xded41f5f, 0x1be89266, 0x58fce971, - 0x91918815, 0xd285f302, 0x17b97e3b, 0x54ad052c, 0x8562bcf3, - 0xc676c7e4, 0x034a4add, 0x405e31ca, 0x893350ae, 0xca272bb9, - 0x0f1ba680, 0x4c0fdd97, 0x4803c7b8, 0x0b17bcaf, 0xce2b3196, - 0x8d3f4a81, 0x44522be5, 0x074650f2, 0xc27addcb, 0x816ea6dc, - 0x50a11f03, 0x13b56414, 0xd689e92d, 0x959d923a, 0x5cf0f35e, - 0x1fe48849, 0xdad80570, 0x99cc7e67, 0x39410714, 0x7a557c03, - 0xbf69f13a, 0xfc7d8a2d, 0x3510eb49, 0x7604905e, 0xb3381d67, - 0xf02c6670, 0x21e3dfaf, 0x62f7a4b8, 0xa7cb2981, 0xe4df5296, - 0x2db233f2, 0x6ea648e5, 0xab9ac5dc, 0xe88ebecb, 0xeb81363a, - 0xa8954d2d, 0x6da9c014, 0x2ebdbb03, 0xe7d0da67, 0xa4c4a170, - 0x61f82c49, 0x22ec575e, 0xf323ee81, 0xb0379596, 0x750b18af, - 0x361f63b8, 0xff7202dc, 0xbc6679cb, 0x795af4f2, 0x3a4e8fe5, - 0x9ac3f696, 0xd9d78d81, 0x1ceb00b8, 0x5fff7baf, 0x96921acb, - 0xd58661dc, 0x10baece5, 0x53ae97f2, 0x82612e2d, 0xc175553a, - 0x0449d803, 0x475da314, 0x8e30c270, 0xcd24b967, 0x0818345e, - 0x4b0c4f49}, - {0x00000000, 0x3e6bc2ef, 0x3dd0f504, 0x03bb37eb, 0x7aa0eb09, - 0x44cb29e6, 0x47701e0d, 0x791bdce2, 0xf440d713, 0xca2b15fc, - 0xc9902217, 0xf7fbe0f8, 0x8ee03c1a, 0xb08bfef5, 0xb330c91e, - 0x8d5b0bf1, 0xe881ae27, 0xd6ea6cc8, 0xd5515b23, 0xeb3a99cc, - 0x9221452e, 0xac4a87c1, 0xaff1b02a, 0x919a72c5, 0x1cc17934, - 0x22aabbdb, 0x21118c30, 0x1f7a4edf, 0x6661923d, 0x580a50d2, - 0x5bb16739, 0x65daa5d6, 0xd0035d4f, 0xee689fa0, 0xedd3a84b, - 0xd3b86aa4, 0xaaa3b646, 0x94c874a9, 0x97734342, 0xa91881ad, - 0x24438a5c, 0x1a2848b3, 0x19937f58, 0x27f8bdb7, 0x5ee36155, - 0x6088a3ba, 0x63339451, 0x5d5856be, 0x3882f368, 0x06e93187, - 0x0552066c, 0x3b39c483, 0x42221861, 0x7c49da8e, 0x7ff2ed65, - 0x41992f8a, 0xccc2247b, 0xf2a9e694, 0xf112d17f, 0xcf791390, - 0xb662cf72, 0x88090d9d, 0x8bb23a76, 0xb5d9f899, 0xa007ba9e, - 0x9e6c7871, 0x9dd74f9a, 0xa3bc8d75, 0xdaa75197, 0xe4cc9378, - 0xe777a493, 0xd91c667c, 0x54476d8d, 0x6a2caf62, 0x69979889, - 0x57fc5a66, 0x2ee78684, 0x108c446b, 0x13377380, 0x2d5cb16f, - 0x488614b9, 0x76edd656, 0x7556e1bd, 0x4b3d2352, 0x3226ffb0, - 0x0c4d3d5f, 0x0ff60ab4, 0x319dc85b, 0xbcc6c3aa, 0x82ad0145, - 0x811636ae, 0xbf7df441, 0xc66628a3, 0xf80dea4c, 0xfbb6dda7, - 0xc5dd1f48, 0x7004e7d1, 0x4e6f253e, 0x4dd412d5, 0x73bfd03a, - 0x0aa40cd8, 0x34cfce37, 0x3774f9dc, 0x091f3b33, 0x844430c2, - 0xba2ff22d, 0xb994c5c6, 0x87ff0729, 0xfee4dbcb, 0xc08f1924, - 0xc3342ecf, 0xfd5fec20, 0x988549f6, 0xa6ee8b19, 0xa555bcf2, - 0x9b3e7e1d, 0xe225a2ff, 0xdc4e6010, 0xdff557fb, 0xe19e9514, - 0x6cc59ee5, 0x52ae5c0a, 0x51156be1, 0x6f7ea90e, 0x166575ec, - 0x280eb703, 0x2bb580e8, 0x15de4207, 0x010905e6, 0x3f62c709, - 0x3cd9f0e2, 0x02b2320d, 0x7ba9eeef, 0x45c22c00, 0x46791beb, - 0x7812d904, 0xf549d2f5, 0xcb22101a, 0xc89927f1, 0xf6f2e51e, - 0x8fe939fc, 0xb182fb13, 0xb239ccf8, 0x8c520e17, 0xe988abc1, - 0xd7e3692e, 0xd4585ec5, 0xea339c2a, 0x932840c8, 0xad438227, - 0xaef8b5cc, 0x90937723, 0x1dc87cd2, 0x23a3be3d, 0x201889d6, - 0x1e734b39, 0x676897db, 0x59035534, 0x5ab862df, 0x64d3a030, - 0xd10a58a9, 0xef619a46, 0xecdaadad, 0xd2b16f42, 0xabaab3a0, - 0x95c1714f, 0x967a46a4, 0xa811844b, 0x254a8fba, 0x1b214d55, - 0x189a7abe, 0x26f1b851, 0x5fea64b3, 0x6181a65c, 0x623a91b7, - 0x5c515358, 0x398bf68e, 0x07e03461, 0x045b038a, 0x3a30c165, - 0x432b1d87, 0x7d40df68, 0x7efbe883, 0x40902a6c, 0xcdcb219d, - 0xf3a0e372, 0xf01bd499, 0xce701676, 0xb76bca94, 0x8900087b, - 0x8abb3f90, 0xb4d0fd7f, 0xa10ebf78, 0x9f657d97, 0x9cde4a7c, - 0xa2b58893, 0xdbae5471, 0xe5c5969e, 0xe67ea175, 0xd815639a, - 0x554e686b, 0x6b25aa84, 0x689e9d6f, 0x56f55f80, 0x2fee8362, - 0x1185418d, 0x123e7666, 0x2c55b489, 0x498f115f, 0x77e4d3b0, - 0x745fe45b, 0x4a3426b4, 0x332ffa56, 0x0d4438b9, 0x0eff0f52, - 0x3094cdbd, 0xbdcfc64c, 0x83a404a3, 0x801f3348, 0xbe74f1a7, - 0xc76f2d45, 0xf904efaa, 0xfabfd841, 0xc4d41aae, 0x710de237, - 0x4f6620d8, 0x4cdd1733, 0x72b6d5dc, 0x0bad093e, 0x35c6cbd1, - 0x367dfc3a, 0x08163ed5, 0x854d3524, 0xbb26f7cb, 0xb89dc020, - 0x86f602cf, 0xffedde2d, 0xc1861cc2, 0xc23d2b29, 0xfc56e9c6, - 0x998c4c10, 0xa7e78eff, 0xa45cb914, 0x9a377bfb, 0xe32ca719, - 0xdd4765f6, 0xdefc521d, 0xe09790f2, 0x6dcc9b03, 0x53a759ec, - 0x501c6e07, 0x6e77ace8, 0x176c700a, 0x2907b2e5, 0x2abc850e, - 0x14d747e1}, - {0x00000000, 0xc0df8ec1, 0xc1b96c58, 0x0166e299, 0x8273d9b0, - 0x42ac5771, 0x43cab5e8, 0x83153b29, 0x45e1c3ba, 0x853e4d7b, - 0x8458afe2, 0x44872123, 0xc7921a0a, 0x074d94cb, 0x062b7652, - 0xc6f4f893, 0xcbc4f6ae, 0x0b1b786f, 0x0a7d9af6, 0xcaa21437, - 0x49b72f1e, 0x8968a1df, 0x880e4346, 0x48d1cd87, 0x8e253514, - 0x4efabbd5, 0x4f9c594c, 0x8f43d78d, 0x0c56eca4, 0xcc896265, - 0xcdef80fc, 0x0d300e3d, 0xd78f9c86, 0x17501247, 0x1636f0de, - 0xd6e97e1f, 0x55fc4536, 0x9523cbf7, 0x9445296e, 0x549aa7af, - 0x926e5f3c, 0x52b1d1fd, 0x53d73364, 0x9308bda5, 0x101d868c, - 0xd0c2084d, 0xd1a4ead4, 0x117b6415, 0x1c4b6a28, 0xdc94e4e9, - 0xddf20670, 0x1d2d88b1, 0x9e38b398, 0x5ee73d59, 0x5f81dfc0, - 0x9f5e5101, 0x59aaa992, 0x99752753, 0x9813c5ca, 0x58cc4b0b, - 0xdbd97022, 0x1b06fee3, 0x1a601c7a, 0xdabf92bb, 0xef1948d6, - 0x2fc6c617, 0x2ea0248e, 0xee7faa4f, 0x6d6a9166, 0xadb51fa7, - 0xacd3fd3e, 0x6c0c73ff, 0xaaf88b6c, 0x6a2705ad, 0x6b41e734, - 0xab9e69f5, 0x288b52dc, 0xe854dc1d, 0xe9323e84, 0x29edb045, - 0x24ddbe78, 0xe40230b9, 0xe564d220, 0x25bb5ce1, 0xa6ae67c8, - 0x6671e909, 0x67170b90, 0xa7c88551, 0x613c7dc2, 0xa1e3f303, - 0xa085119a, 0x605a9f5b, 0xe34fa472, 0x23902ab3, 0x22f6c82a, - 0xe22946eb, 0x3896d450, 0xf8495a91, 0xf92fb808, 0x39f036c9, - 0xbae50de0, 0x7a3a8321, 0x7b5c61b8, 0xbb83ef79, 0x7d7717ea, - 0xbda8992b, 0xbcce7bb2, 0x7c11f573, 0xff04ce5a, 0x3fdb409b, - 0x3ebda202, 0xfe622cc3, 0xf35222fe, 0x338dac3f, 0x32eb4ea6, - 0xf234c067, 0x7121fb4e, 0xb1fe758f, 0xb0989716, 0x704719d7, - 0xb6b3e144, 0x766c6f85, 0x770a8d1c, 0xb7d503dd, 0x34c038f4, - 0xf41fb635, 0xf57954ac, 0x35a6da6d, 0x9f35e177, 0x5fea6fb6, - 0x5e8c8d2f, 0x9e5303ee, 0x1d4638c7, 0xdd99b606, 0xdcff549f, - 0x1c20da5e, 0xdad422cd, 0x1a0bac0c, 0x1b6d4e95, 0xdbb2c054, - 0x58a7fb7d, 0x987875bc, 0x991e9725, 0x59c119e4, 0x54f117d9, - 0x942e9918, 0x95487b81, 0x5597f540, 0xd682ce69, 0x165d40a8, - 0x173ba231, 0xd7e42cf0, 0x1110d463, 0xd1cf5aa2, 0xd0a9b83b, - 0x107636fa, 0x93630dd3, 0x53bc8312, 0x52da618b, 0x9205ef4a, - 0x48ba7df1, 0x8865f330, 0x890311a9, 0x49dc9f68, 0xcac9a441, - 0x0a162a80, 0x0b70c819, 0xcbaf46d8, 0x0d5bbe4b, 0xcd84308a, - 0xcce2d213, 0x0c3d5cd2, 0x8f2867fb, 0x4ff7e93a, 0x4e910ba3, - 0x8e4e8562, 0x837e8b5f, 0x43a1059e, 0x42c7e707, 0x821869c6, - 0x010d52ef, 0xc1d2dc2e, 0xc0b43eb7, 0x006bb076, 0xc69f48e5, - 0x0640c624, 0x072624bd, 0xc7f9aa7c, 0x44ec9155, 0x84331f94, - 0x8555fd0d, 0x458a73cc, 0x702ca9a1, 0xb0f32760, 0xb195c5f9, - 0x714a4b38, 0xf25f7011, 0x3280fed0, 0x33e61c49, 0xf3399288, - 0x35cd6a1b, 0xf512e4da, 0xf4740643, 0x34ab8882, 0xb7beb3ab, - 0x77613d6a, 0x7607dff3, 0xb6d85132, 0xbbe85f0f, 0x7b37d1ce, - 0x7a513357, 0xba8ebd96, 0x399b86bf, 0xf944087e, 0xf822eae7, - 0x38fd6426, 0xfe099cb5, 0x3ed61274, 0x3fb0f0ed, 0xff6f7e2c, - 0x7c7a4505, 0xbca5cbc4, 0xbdc3295d, 0x7d1ca79c, 0xa7a33527, - 0x677cbbe6, 0x661a597f, 0xa6c5d7be, 0x25d0ec97, 0xe50f6256, - 0xe46980cf, 0x24b60e0e, 0xe242f69d, 0x229d785c, 0x23fb9ac5, - 0xe3241404, 0x60312f2d, 0xa0eea1ec, 0xa1884375, 0x6157cdb4, - 0x6c67c389, 0xacb84d48, 0xaddeafd1, 0x6d012110, 0xee141a39, - 0x2ecb94f8, 0x2fad7661, 0xef72f8a0, 0x29860033, 0xe9598ef2, - 0xe83f6c6b, 0x28e0e2aa, 0xabf5d983, 0x6b2a5742, 0x6a4cb5db, - 0xaa933b1a}, - {0x00000000, 0x6f4ca59b, 0x9f9e3bec, 0xf0d29e77, 0x7f3b0603, - 0x1077a398, 0xe0a53def, 0x8fe99874, 0xfe760c06, 0x913aa99d, - 0x61e837ea, 0x0ea49271, 0x814d0a05, 0xee01af9e, 0x1ed331e9, - 0x719f9472, 0xfced180c, 0x93a1bd97, 0x637323e0, 0x0c3f867b, - 0x83d61e0f, 0xec9abb94, 0x1c4825e3, 0x73048078, 0x029b140a, - 0x6dd7b191, 0x9d052fe6, 0xf2498a7d, 0x7da01209, 0x12ecb792, - 0xe23e29e5, 0x8d728c7e, 0xf8db3118, 0x97979483, 0x67450af4, - 0x0809af6f, 0x87e0371b, 0xe8ac9280, 0x187e0cf7, 0x7732a96c, - 0x06ad3d1e, 0x69e19885, 0x993306f2, 0xf67fa369, 0x79963b1d, - 0x16da9e86, 0xe60800f1, 0x8944a56a, 0x04362914, 0x6b7a8c8f, - 0x9ba812f8, 0xf4e4b763, 0x7b0d2f17, 0x14418a8c, 0xe49314fb, - 0x8bdfb160, 0xfa402512, 0x950c8089, 0x65de1efe, 0x0a92bb65, - 0x857b2311, 0xea37868a, 0x1ae518fd, 0x75a9bd66, 0xf0b76330, - 0x9ffbc6ab, 0x6f2958dc, 0x0065fd47, 0x8f8c6533, 0xe0c0c0a8, - 0x10125edf, 0x7f5efb44, 0x0ec16f36, 0x618dcaad, 0x915f54da, - 0xfe13f141, 0x71fa6935, 0x1eb6ccae, 0xee6452d9, 0x8128f742, - 0x0c5a7b3c, 0x6316dea7, 0x93c440d0, 0xfc88e54b, 0x73617d3f, - 0x1c2dd8a4, 0xecff46d3, 0x83b3e348, 0xf22c773a, 0x9d60d2a1, - 0x6db24cd6, 0x02fee94d, 0x8d177139, 0xe25bd4a2, 0x12894ad5, - 0x7dc5ef4e, 0x086c5228, 0x6720f7b3, 0x97f269c4, 0xf8becc5f, - 0x7757542b, 0x181bf1b0, 0xe8c96fc7, 0x8785ca5c, 0xf61a5e2e, - 0x9956fbb5, 0x698465c2, 0x06c8c059, 0x8921582d, 0xe66dfdb6, - 0x16bf63c1, 0x79f3c65a, 0xf4814a24, 0x9bcdefbf, 0x6b1f71c8, - 0x0453d453, 0x8bba4c27, 0xe4f6e9bc, 0x142477cb, 0x7b68d250, - 0x0af74622, 0x65bbe3b9, 0x95697dce, 0xfa25d855, 0x75cc4021, - 0x1a80e5ba, 0xea527bcd, 0x851ede56, 0xe06fc760, 0x8f2362fb, - 0x7ff1fc8c, 0x10bd5917, 0x9f54c163, 0xf01864f8, 0x00cafa8f, - 0x6f865f14, 0x1e19cb66, 0x71556efd, 0x8187f08a, 0xeecb5511, - 0x6122cd65, 0x0e6e68fe, 0xfebcf689, 0x91f05312, 0x1c82df6c, - 0x73ce7af7, 0x831ce480, 0xec50411b, 0x63b9d96f, 0x0cf57cf4, - 0xfc27e283, 0x936b4718, 0xe2f4d36a, 0x8db876f1, 0x7d6ae886, - 0x12264d1d, 0x9dcfd569, 0xf28370f2, 0x0251ee85, 0x6d1d4b1e, - 0x18b4f678, 0x77f853e3, 0x872acd94, 0xe866680f, 0x678ff07b, - 0x08c355e0, 0xf811cb97, 0x975d6e0c, 0xe6c2fa7e, 0x898e5fe5, - 0x795cc192, 0x16106409, 0x99f9fc7d, 0xf6b559e6, 0x0667c791, - 0x692b620a, 0xe459ee74, 0x8b154bef, 0x7bc7d598, 0x148b7003, - 0x9b62e877, 0xf42e4dec, 0x04fcd39b, 0x6bb07600, 0x1a2fe272, - 0x756347e9, 0x85b1d99e, 0xeafd7c05, 0x6514e471, 0x0a5841ea, - 0xfa8adf9d, 0x95c67a06, 0x10d8a450, 0x7f9401cb, 0x8f469fbc, - 0xe00a3a27, 0x6fe3a253, 0x00af07c8, 0xf07d99bf, 0x9f313c24, - 0xeeaea856, 0x81e20dcd, 0x713093ba, 0x1e7c3621, 0x9195ae55, - 0xfed90bce, 0x0e0b95b9, 0x61473022, 0xec35bc5c, 0x837919c7, - 0x73ab87b0, 0x1ce7222b, 0x930eba5f, 0xfc421fc4, 0x0c9081b3, - 0x63dc2428, 0x1243b05a, 0x7d0f15c1, 0x8ddd8bb6, 0xe2912e2d, - 0x6d78b659, 0x023413c2, 0xf2e68db5, 0x9daa282e, 0xe8039548, - 0x874f30d3, 0x779daea4, 0x18d10b3f, 0x9738934b, 0xf87436d0, - 0x08a6a8a7, 0x67ea0d3c, 0x1675994e, 0x79393cd5, 0x89eba2a2, - 0xe6a70739, 0x694e9f4d, 0x06023ad6, 0xf6d0a4a1, 0x999c013a, - 0x14ee8d44, 0x7ba228df, 0x8b70b6a8, 0xe43c1333, 0x6bd58b47, - 0x04992edc, 0xf44bb0ab, 0x9b071530, 0xea988142, 0x85d424d9, - 0x7506baae, 0x1a4a1f35, 0x95a38741, 0xfaef22da, 0x0a3dbcad, - 0x65711936}}; - -#endif - -#endif - -#if N == 4 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xf1da05aa, 0x38c50d15, 0xc91f08bf, 0x718a1a2a, - 0x80501f80, 0x494f173f, 0xb8951295, 0xe3143454, 0x12ce31fe, - 0xdbd13941, 0x2a0b3ceb, 0x929e2e7e, 0x63442bd4, 0xaa5b236b, - 0x5b8126c1, 0x1d596ee9, 0xec836b43, 0x259c63fc, 0xd4466656, - 0x6cd374c3, 0x9d097169, 0x541679d6, 0xa5cc7c7c, 0xfe4d5abd, - 0x0f975f17, 0xc68857a8, 0x37525202, 0x8fc74097, 0x7e1d453d, - 0xb7024d82, 0x46d84828, 0x3ab2ddd2, 0xcb68d878, 0x0277d0c7, - 0xf3add56d, 0x4b38c7f8, 0xbae2c252, 0x73fdcaed, 0x8227cf47, - 0xd9a6e986, 0x287cec2c, 0xe163e493, 0x10b9e139, 0xa82cf3ac, - 0x59f6f606, 0x90e9feb9, 0x6133fb13, 0x27ebb33b, 0xd631b691, - 0x1f2ebe2e, 0xeef4bb84, 0x5661a911, 0xa7bbacbb, 0x6ea4a404, - 0x9f7ea1ae, 0xc4ff876f, 0x352582c5, 0xfc3a8a7a, 0x0de08fd0, - 0xb5759d45, 0x44af98ef, 0x8db09050, 0x7c6a95fa, 0x7565bba4, - 0x84bfbe0e, 0x4da0b6b1, 0xbc7ab31b, 0x04efa18e, 0xf535a424, - 0x3c2aac9b, 0xcdf0a931, 0x96718ff0, 0x67ab8a5a, 0xaeb482e5, - 0x5f6e874f, 0xe7fb95da, 0x16219070, 0xdf3e98cf, 0x2ee49d65, - 0x683cd54d, 0x99e6d0e7, 0x50f9d858, 0xa123ddf2, 0x19b6cf67, - 0xe86ccacd, 0x2173c272, 0xd0a9c7d8, 0x8b28e119, 0x7af2e4b3, - 0xb3edec0c, 0x4237e9a6, 0xfaa2fb33, 0x0b78fe99, 0xc267f626, - 0x33bdf38c, 0x4fd76676, 0xbe0d63dc, 0x77126b63, 0x86c86ec9, - 0x3e5d7c5c, 0xcf8779f6, 0x06987149, 0xf74274e3, 0xacc35222, - 0x5d195788, 0x94065f37, 0x65dc5a9d, 0xdd494808, 0x2c934da2, - 0xe58c451d, 0x145640b7, 0x528e089f, 0xa3540d35, 0x6a4b058a, - 0x9b910020, 0x230412b5, 0xd2de171f, 0x1bc11fa0, 0xea1b1a0a, - 0xb19a3ccb, 0x40403961, 0x895f31de, 0x78853474, 0xc01026e1, - 0x31ca234b, 0xf8d52bf4, 0x090f2e5e, 0xeacb7748, 0x1b1172e2, - 0xd20e7a5d, 0x23d47ff7, 0x9b416d62, 0x6a9b68c8, 0xa3846077, - 0x525e65dd, 0x09df431c, 0xf80546b6, 0x311a4e09, 0xc0c04ba3, - 0x78555936, 0x898f5c9c, 0x40905423, 0xb14a5189, 0xf79219a1, - 0x06481c0b, 0xcf5714b4, 0x3e8d111e, 0x8618038b, 0x77c20621, - 0xbedd0e9e, 0x4f070b34, 0x14862df5, 0xe55c285f, 0x2c4320e0, - 0xdd99254a, 0x650c37df, 0x94d63275, 0x5dc93aca, 0xac133f60, - 0xd079aa9a, 0x21a3af30, 0xe8bca78f, 0x1966a225, 0xa1f3b0b0, - 0x5029b51a, 0x9936bda5, 0x68ecb80f, 0x336d9ece, 0xc2b79b64, - 0x0ba893db, 0xfa729671, 0x42e784e4, 0xb33d814e, 0x7a2289f1, - 0x8bf88c5b, 0xcd20c473, 0x3cfac1d9, 0xf5e5c966, 0x043fcccc, - 0xbcaade59, 0x4d70dbf3, 0x846fd34c, 0x75b5d6e6, 0x2e34f027, - 0xdfeef58d, 0x16f1fd32, 0xe72bf898, 0x5fbeea0d, 0xae64efa7, - 0x677be718, 0x96a1e2b2, 0x9faeccec, 0x6e74c946, 0xa76bc1f9, - 0x56b1c453, 0xee24d6c6, 0x1ffed36c, 0xd6e1dbd3, 0x273bde79, - 0x7cbaf8b8, 0x8d60fd12, 0x447ff5ad, 0xb5a5f007, 0x0d30e292, - 0xfceae738, 0x35f5ef87, 0xc42fea2d, 0x82f7a205, 0x732da7af, - 0xba32af10, 0x4be8aaba, 0xf37db82f, 0x02a7bd85, 0xcbb8b53a, - 0x3a62b090, 0x61e39651, 0x903993fb, 0x59269b44, 0xa8fc9eee, - 0x10698c7b, 0xe1b389d1, 0x28ac816e, 0xd97684c4, 0xa51c113e, - 0x54c61494, 0x9dd91c2b, 0x6c031981, 0xd4960b14, 0x254c0ebe, - 0xec530601, 0x1d8903ab, 0x4608256a, 0xb7d220c0, 0x7ecd287f, - 0x8f172dd5, 0x37823f40, 0xc6583aea, 0x0f473255, 0xfe9d37ff, - 0xb8457fd7, 0x499f7a7d, 0x808072c2, 0x715a7768, 0xc9cf65fd, - 0x38156057, 0xf10a68e8, 0x00d06d42, 0x5b514b83, 0xaa8b4e29, - 0x63944696, 0x924e433c, 0x2adb51a9, 0xdb015403, 0x121e5cbc, - 0xe3c45916}, - {0x00000000, 0x0ee7e8d1, 0x1dcfd1a2, 0x13283973, 0x3b9fa344, - 0x35784b95, 0x265072e6, 0x28b79a37, 0x773f4688, 0x79d8ae59, - 0x6af0972a, 0x64177ffb, 0x4ca0e5cc, 0x42470d1d, 0x516f346e, - 0x5f88dcbf, 0xee7e8d10, 0xe09965c1, 0xf3b15cb2, 0xfd56b463, - 0xd5e12e54, 0xdb06c685, 0xc82efff6, 0xc6c91727, 0x9941cb98, - 0x97a62349, 0x848e1a3a, 0x8a69f2eb, 0xa2de68dc, 0xac39800d, - 0xbf11b97e, 0xb1f651af, 0x078c1c61, 0x096bf4b0, 0x1a43cdc3, - 0x14a42512, 0x3c13bf25, 0x32f457f4, 0x21dc6e87, 0x2f3b8656, - 0x70b35ae9, 0x7e54b238, 0x6d7c8b4b, 0x639b639a, 0x4b2cf9ad, - 0x45cb117c, 0x56e3280f, 0x5804c0de, 0xe9f29171, 0xe71579a0, - 0xf43d40d3, 0xfadaa802, 0xd26d3235, 0xdc8adae4, 0xcfa2e397, - 0xc1450b46, 0x9ecdd7f9, 0x902a3f28, 0x8302065b, 0x8de5ee8a, - 0xa55274bd, 0xabb59c6c, 0xb89da51f, 0xb67a4dce, 0x0f1838c2, - 0x01ffd013, 0x12d7e960, 0x1c3001b1, 0x34879b86, 0x3a607357, - 0x29484a24, 0x27afa2f5, 0x78277e4a, 0x76c0969b, 0x65e8afe8, - 0x6b0f4739, 0x43b8dd0e, 0x4d5f35df, 0x5e770cac, 0x5090e47d, - 0xe166b5d2, 0xef815d03, 0xfca96470, 0xf24e8ca1, 0xdaf91696, - 0xd41efe47, 0xc736c734, 0xc9d12fe5, 0x9659f35a, 0x98be1b8b, - 0x8b9622f8, 0x8571ca29, 0xadc6501e, 0xa321b8cf, 0xb00981bc, - 0xbeee696d, 0x089424a3, 0x0673cc72, 0x155bf501, 0x1bbc1dd0, - 0x330b87e7, 0x3dec6f36, 0x2ec45645, 0x2023be94, 0x7fab622b, - 0x714c8afa, 0x6264b389, 0x6c835b58, 0x4434c16f, 0x4ad329be, - 0x59fb10cd, 0x571cf81c, 0xe6eaa9b3, 0xe80d4162, 0xfb257811, - 0xf5c290c0, 0xdd750af7, 0xd392e226, 0xc0badb55, 0xce5d3384, - 0x91d5ef3b, 0x9f3207ea, 0x8c1a3e99, 0x82fdd648, 0xaa4a4c7f, - 0xa4ada4ae, 0xb7859ddd, 0xb962750c, 0x1e307184, 0x10d79955, - 0x03ffa026, 0x0d1848f7, 0x25afd2c0, 0x2b483a11, 0x38600362, - 0x3687ebb3, 0x690f370c, 0x67e8dfdd, 0x74c0e6ae, 0x7a270e7f, - 0x52909448, 0x5c777c99, 0x4f5f45ea, 0x41b8ad3b, 0xf04efc94, - 0xfea91445, 0xed812d36, 0xe366c5e7, 0xcbd15fd0, 0xc536b701, - 0xd61e8e72, 0xd8f966a3, 0x8771ba1c, 0x899652cd, 0x9abe6bbe, - 0x9459836f, 0xbcee1958, 0xb209f189, 0xa121c8fa, 0xafc6202b, - 0x19bc6de5, 0x175b8534, 0x0473bc47, 0x0a945496, 0x2223cea1, - 0x2cc42670, 0x3fec1f03, 0x310bf7d2, 0x6e832b6d, 0x6064c3bc, - 0x734cfacf, 0x7dab121e, 0x551c8829, 0x5bfb60f8, 0x48d3598b, - 0x4634b15a, 0xf7c2e0f5, 0xf9250824, 0xea0d3157, 0xe4ead986, - 0xcc5d43b1, 0xc2baab60, 0xd1929213, 0xdf757ac2, 0x80fda67d, - 0x8e1a4eac, 0x9d3277df, 0x93d59f0e, 0xbb620539, 0xb585ede8, - 0xa6add49b, 0xa84a3c4a, 0x11284946, 0x1fcfa197, 0x0ce798e4, - 0x02007035, 0x2ab7ea02, 0x245002d3, 0x37783ba0, 0x399fd371, - 0x66170fce, 0x68f0e71f, 0x7bd8de6c, 0x753f36bd, 0x5d88ac8a, - 0x536f445b, 0x40477d28, 0x4ea095f9, 0xff56c456, 0xf1b12c87, - 0xe29915f4, 0xec7efd25, 0xc4c96712, 0xca2e8fc3, 0xd906b6b0, - 0xd7e15e61, 0x886982de, 0x868e6a0f, 0x95a6537c, 0x9b41bbad, - 0xb3f6219a, 0xbd11c94b, 0xae39f038, 0xa0de18e9, 0x16a45527, - 0x1843bdf6, 0x0b6b8485, 0x058c6c54, 0x2d3bf663, 0x23dc1eb2, - 0x30f427c1, 0x3e13cf10, 0x619b13af, 0x6f7cfb7e, 0x7c54c20d, - 0x72b32adc, 0x5a04b0eb, 0x54e3583a, 0x47cb6149, 0x492c8998, - 0xf8dad837, 0xf63d30e6, 0xe5150995, 0xebf2e144, 0xc3457b73, - 0xcda293a2, 0xde8aaad1, 0xd06d4200, 0x8fe59ebf, 0x8102766e, - 0x922a4f1d, 0x9ccda7cc, 0xb47a3dfb, 0xba9dd52a, 0xa9b5ec59, - 0xa7520488}, - {0x00000000, 0x3c60e308, 0x78c1c610, 0x44a12518, 0xf1838c20, - 0xcde36f28, 0x89424a30, 0xb522a938, 0x38761e01, 0x0416fd09, - 0x40b7d811, 0x7cd73b19, 0xc9f59221, 0xf5957129, 0xb1345431, - 0x8d54b739, 0x70ec3c02, 0x4c8cdf0a, 0x082dfa12, 0x344d191a, - 0x816fb022, 0xbd0f532a, 0xf9ae7632, 0xc5ce953a, 0x489a2203, - 0x74fac10b, 0x305be413, 0x0c3b071b, 0xb919ae23, 0x85794d2b, - 0xc1d86833, 0xfdb88b3b, 0xe1d87804, 0xddb89b0c, 0x9919be14, - 0xa5795d1c, 0x105bf424, 0x2c3b172c, 0x689a3234, 0x54fad13c, - 0xd9ae6605, 0xe5ce850d, 0xa16fa015, 0x9d0f431d, 0x282dea25, - 0x144d092d, 0x50ec2c35, 0x6c8ccf3d, 0x91344406, 0xad54a70e, - 0xe9f58216, 0xd595611e, 0x60b7c826, 0x5cd72b2e, 0x18760e36, - 0x2416ed3e, 0xa9425a07, 0x9522b90f, 0xd1839c17, 0xede37f1f, - 0x58c1d627, 0x64a1352f, 0x20001037, 0x1c60f33f, 0x18c1f649, - 0x24a11541, 0x60003059, 0x5c60d351, 0xe9427a69, 0xd5229961, - 0x9183bc79, 0xade35f71, 0x20b7e848, 0x1cd70b40, 0x58762e58, - 0x6416cd50, 0xd1346468, 0xed548760, 0xa9f5a278, 0x95954170, - 0x682dca4b, 0x544d2943, 0x10ec0c5b, 0x2c8cef53, 0x99ae466b, - 0xa5cea563, 0xe16f807b, 0xdd0f6373, 0x505bd44a, 0x6c3b3742, - 0x289a125a, 0x14faf152, 0xa1d8586a, 0x9db8bb62, 0xd9199e7a, - 0xe5797d72, 0xf9198e4d, 0xc5796d45, 0x81d8485d, 0xbdb8ab55, - 0x089a026d, 0x34fae165, 0x705bc47d, 0x4c3b2775, 0xc16f904c, - 0xfd0f7344, 0xb9ae565c, 0x85ceb554, 0x30ec1c6c, 0x0c8cff64, - 0x482dda7c, 0x744d3974, 0x89f5b24f, 0xb5955147, 0xf134745f, - 0xcd549757, 0x78763e6f, 0x4416dd67, 0x00b7f87f, 0x3cd71b77, - 0xb183ac4e, 0x8de34f46, 0xc9426a5e, 0xf5228956, 0x4000206e, - 0x7c60c366, 0x38c1e67e, 0x04a10576, 0x3183ec92, 0x0de30f9a, - 0x49422a82, 0x7522c98a, 0xc00060b2, 0xfc6083ba, 0xb8c1a6a2, - 0x84a145aa, 0x09f5f293, 0x3595119b, 0x71343483, 0x4d54d78b, - 0xf8767eb3, 0xc4169dbb, 0x80b7b8a3, 0xbcd75bab, 0x416fd090, - 0x7d0f3398, 0x39ae1680, 0x05cef588, 0xb0ec5cb0, 0x8c8cbfb8, - 0xc82d9aa0, 0xf44d79a8, 0x7919ce91, 0x45792d99, 0x01d80881, - 0x3db8eb89, 0x889a42b1, 0xb4faa1b9, 0xf05b84a1, 0xcc3b67a9, - 0xd05b9496, 0xec3b779e, 0xa89a5286, 0x94fab18e, 0x21d818b6, - 0x1db8fbbe, 0x5919dea6, 0x65793dae, 0xe82d8a97, 0xd44d699f, - 0x90ec4c87, 0xac8caf8f, 0x19ae06b7, 0x25cee5bf, 0x616fc0a7, - 0x5d0f23af, 0xa0b7a894, 0x9cd74b9c, 0xd8766e84, 0xe4168d8c, - 0x513424b4, 0x6d54c7bc, 0x29f5e2a4, 0x159501ac, 0x98c1b695, - 0xa4a1559d, 0xe0007085, 0xdc60938d, 0x69423ab5, 0x5522d9bd, - 0x1183fca5, 0x2de31fad, 0x29421adb, 0x1522f9d3, 0x5183dccb, - 0x6de33fc3, 0xd8c196fb, 0xe4a175f3, 0xa00050eb, 0x9c60b3e3, - 0x113404da, 0x2d54e7d2, 0x69f5c2ca, 0x559521c2, 0xe0b788fa, - 0xdcd76bf2, 0x98764eea, 0xa416ade2, 0x59ae26d9, 0x65cec5d1, - 0x216fe0c9, 0x1d0f03c1, 0xa82daaf9, 0x944d49f1, 0xd0ec6ce9, - 0xec8c8fe1, 0x61d838d8, 0x5db8dbd0, 0x1919fec8, 0x25791dc0, - 0x905bb4f8, 0xac3b57f0, 0xe89a72e8, 0xd4fa91e0, 0xc89a62df, - 0xf4fa81d7, 0xb05ba4cf, 0x8c3b47c7, 0x3919eeff, 0x05790df7, - 0x41d828ef, 0x7db8cbe7, 0xf0ec7cde, 0xcc8c9fd6, 0x882dbace, - 0xb44d59c6, 0x016ff0fe, 0x3d0f13f6, 0x79ae36ee, 0x45ced5e6, - 0xb8765edd, 0x8416bdd5, 0xc0b798cd, 0xfcd77bc5, 0x49f5d2fd, - 0x759531f5, 0x313414ed, 0x0d54f7e5, 0x800040dc, 0xbc60a3d4, - 0xf8c186cc, 0xc4a165c4, 0x7183ccfc, 0x4de32ff4, 0x09420aec, - 0x3522e9e4}, - {0x00000000, 0x6307d924, 0xc60fb248, 0xa5086b6c, 0x576e62d1, - 0x3469bbf5, 0x9161d099, 0xf26609bd, 0xaedcc5a2, 0xcddb1c86, - 0x68d377ea, 0x0bd4aece, 0xf9b2a773, 0x9ab57e57, 0x3fbd153b, - 0x5cbacc1f, 0x86c88d05, 0xe5cf5421, 0x40c73f4d, 0x23c0e669, - 0xd1a6efd4, 0xb2a136f0, 0x17a95d9c, 0x74ae84b8, 0x281448a7, - 0x4b139183, 0xee1bfaef, 0x8d1c23cb, 0x7f7a2a76, 0x1c7df352, - 0xb975983e, 0xda72411a, 0xd6e01c4b, 0xb5e7c56f, 0x10efae03, - 0x73e87727, 0x818e7e9a, 0xe289a7be, 0x4781ccd2, 0x248615f6, - 0x783cd9e9, 0x1b3b00cd, 0xbe336ba1, 0xdd34b285, 0x2f52bb38, - 0x4c55621c, 0xe95d0970, 0x8a5ad054, 0x5028914e, 0x332f486a, - 0x96272306, 0xf520fa22, 0x0746f39f, 0x64412abb, 0xc14941d7, - 0xa24e98f3, 0xfef454ec, 0x9df38dc8, 0x38fbe6a4, 0x5bfc3f80, - 0xa99a363d, 0xca9def19, 0x6f958475, 0x0c925d51, 0x76b13ed7, - 0x15b6e7f3, 0xb0be8c9f, 0xd3b955bb, 0x21df5c06, 0x42d88522, - 0xe7d0ee4e, 0x84d7376a, 0xd86dfb75, 0xbb6a2251, 0x1e62493d, - 0x7d659019, 0x8f0399a4, 0xec044080, 0x490c2bec, 0x2a0bf2c8, - 0xf079b3d2, 0x937e6af6, 0x3676019a, 0x5571d8be, 0xa717d103, - 0xc4100827, 0x6118634b, 0x021fba6f, 0x5ea57670, 0x3da2af54, - 0x98aac438, 0xfbad1d1c, 0x09cb14a1, 0x6acccd85, 0xcfc4a6e9, - 0xacc37fcd, 0xa051229c, 0xc356fbb8, 0x665e90d4, 0x055949f0, - 0xf73f404d, 0x94389969, 0x3130f205, 0x52372b21, 0x0e8de73e, - 0x6d8a3e1a, 0xc8825576, 0xab858c52, 0x59e385ef, 0x3ae45ccb, - 0x9fec37a7, 0xfcebee83, 0x2699af99, 0x459e76bd, 0xe0961dd1, - 0x8391c4f5, 0x71f7cd48, 0x12f0146c, 0xb7f87f00, 0xd4ffa624, - 0x88456a3b, 0xeb42b31f, 0x4e4ad873, 0x2d4d0157, 0xdf2b08ea, - 0xbc2cd1ce, 0x1924baa2, 0x7a236386, 0xed627dae, 0x8e65a48a, - 0x2b6dcfe6, 0x486a16c2, 0xba0c1f7f, 0xd90bc65b, 0x7c03ad37, - 0x1f047413, 0x43beb80c, 0x20b96128, 0x85b10a44, 0xe6b6d360, - 0x14d0dadd, 0x77d703f9, 0xd2df6895, 0xb1d8b1b1, 0x6baaf0ab, - 0x08ad298f, 0xada542e3, 0xcea29bc7, 0x3cc4927a, 0x5fc34b5e, - 0xfacb2032, 0x99ccf916, 0xc5763509, 0xa671ec2d, 0x03798741, - 0x607e5e65, 0x921857d8, 0xf11f8efc, 0x5417e590, 0x37103cb4, - 0x3b8261e5, 0x5885b8c1, 0xfd8dd3ad, 0x9e8a0a89, 0x6cec0334, - 0x0febda10, 0xaae3b17c, 0xc9e46858, 0x955ea447, 0xf6597d63, - 0x5351160f, 0x3056cf2b, 0xc230c696, 0xa1371fb2, 0x043f74de, - 0x6738adfa, 0xbd4aece0, 0xde4d35c4, 0x7b455ea8, 0x1842878c, - 0xea248e31, 0x89235715, 0x2c2b3c79, 0x4f2ce55d, 0x13962942, - 0x7091f066, 0xd5999b0a, 0xb69e422e, 0x44f84b93, 0x27ff92b7, - 0x82f7f9db, 0xe1f020ff, 0x9bd34379, 0xf8d49a5d, 0x5ddcf131, - 0x3edb2815, 0xccbd21a8, 0xafbaf88c, 0x0ab293e0, 0x69b54ac4, - 0x350f86db, 0x56085fff, 0xf3003493, 0x9007edb7, 0x6261e40a, - 0x01663d2e, 0xa46e5642, 0xc7698f66, 0x1d1bce7c, 0x7e1c1758, - 0xdb147c34, 0xb813a510, 0x4a75acad, 0x29727589, 0x8c7a1ee5, - 0xef7dc7c1, 0xb3c70bde, 0xd0c0d2fa, 0x75c8b996, 0x16cf60b2, - 0xe4a9690f, 0x87aeb02b, 0x22a6db47, 0x41a10263, 0x4d335f32, - 0x2e348616, 0x8b3ced7a, 0xe83b345e, 0x1a5d3de3, 0x795ae4c7, - 0xdc528fab, 0xbf55568f, 0xe3ef9a90, 0x80e843b4, 0x25e028d8, - 0x46e7f1fc, 0xb481f841, 0xd7862165, 0x728e4a09, 0x1189932d, - 0xcbfbd237, 0xa8fc0b13, 0x0df4607f, 0x6ef3b95b, 0x9c95b0e6, - 0xff9269c2, 0x5a9a02ae, 0x399ddb8a, 0x65271795, 0x0620ceb1, - 0xa328a5dd, 0xc02f7cf9, 0x32497544, 0x514eac60, 0xf446c70c, - 0x97411e28}, - {0x00000000, 0x01b5fd1d, 0x036bfa3a, 0x02de0727, 0x06d7f474, - 0x07620969, 0x05bc0e4e, 0x0409f353, 0x0dafe8e8, 0x0c1a15f5, - 0x0ec412d2, 0x0f71efcf, 0x0b781c9c, 0x0acde181, 0x0813e6a6, - 0x09a61bbb, 0x1b5fd1d0, 0x1aea2ccd, 0x18342bea, 0x1981d6f7, - 0x1d8825a4, 0x1c3dd8b9, 0x1ee3df9e, 0x1f562283, 0x16f03938, - 0x1745c425, 0x159bc302, 0x142e3e1f, 0x1027cd4c, 0x11923051, - 0x134c3776, 0x12f9ca6b, 0x36bfa3a0, 0x370a5ebd, 0x35d4599a, - 0x3461a487, 0x306857d4, 0x31ddaac9, 0x3303adee, 0x32b650f3, - 0x3b104b48, 0x3aa5b655, 0x387bb172, 0x39ce4c6f, 0x3dc7bf3c, - 0x3c724221, 0x3eac4506, 0x3f19b81b, 0x2de07270, 0x2c558f6d, - 0x2e8b884a, 0x2f3e7557, 0x2b378604, 0x2a827b19, 0x285c7c3e, - 0x29e98123, 0x204f9a98, 0x21fa6785, 0x232460a2, 0x22919dbf, - 0x26986eec, 0x272d93f1, 0x25f394d6, 0x244669cb, 0x6d7f4740, - 0x6ccaba5d, 0x6e14bd7a, 0x6fa14067, 0x6ba8b334, 0x6a1d4e29, - 0x68c3490e, 0x6976b413, 0x60d0afa8, 0x616552b5, 0x63bb5592, - 0x620ea88f, 0x66075bdc, 0x67b2a6c1, 0x656ca1e6, 0x64d95cfb, - 0x76209690, 0x77956b8d, 0x754b6caa, 0x74fe91b7, 0x70f762e4, - 0x71429ff9, 0x739c98de, 0x722965c3, 0x7b8f7e78, 0x7a3a8365, - 0x78e48442, 0x7951795f, 0x7d588a0c, 0x7ced7711, 0x7e337036, - 0x7f868d2b, 0x5bc0e4e0, 0x5a7519fd, 0x58ab1eda, 0x591ee3c7, - 0x5d171094, 0x5ca2ed89, 0x5e7ceaae, 0x5fc917b3, 0x566f0c08, - 0x57daf115, 0x5504f632, 0x54b10b2f, 0x50b8f87c, 0x510d0561, - 0x53d30246, 0x5266ff5b, 0x409f3530, 0x412ac82d, 0x43f4cf0a, - 0x42413217, 0x4648c144, 0x47fd3c59, 0x45233b7e, 0x4496c663, - 0x4d30ddd8, 0x4c8520c5, 0x4e5b27e2, 0x4feedaff, 0x4be729ac, - 0x4a52d4b1, 0x488cd396, 0x49392e8b, 0xdafe8e80, 0xdb4b739d, - 0xd99574ba, 0xd82089a7, 0xdc297af4, 0xdd9c87e9, 0xdf4280ce, - 0xdef77dd3, 0xd7516668, 0xd6e49b75, 0xd43a9c52, 0xd58f614f, - 0xd186921c, 0xd0336f01, 0xd2ed6826, 0xd358953b, 0xc1a15f50, - 0xc014a24d, 0xc2caa56a, 0xc37f5877, 0xc776ab24, 0xc6c35639, - 0xc41d511e, 0xc5a8ac03, 0xcc0eb7b8, 0xcdbb4aa5, 0xcf654d82, - 0xced0b09f, 0xcad943cc, 0xcb6cbed1, 0xc9b2b9f6, 0xc80744eb, - 0xec412d20, 0xedf4d03d, 0xef2ad71a, 0xee9f2a07, 0xea96d954, - 0xeb232449, 0xe9fd236e, 0xe848de73, 0xe1eec5c8, 0xe05b38d5, - 0xe2853ff2, 0xe330c2ef, 0xe73931bc, 0xe68ccca1, 0xe452cb86, - 0xe5e7369b, 0xf71efcf0, 0xf6ab01ed, 0xf47506ca, 0xf5c0fbd7, - 0xf1c90884, 0xf07cf599, 0xf2a2f2be, 0xf3170fa3, 0xfab11418, - 0xfb04e905, 0xf9daee22, 0xf86f133f, 0xfc66e06c, 0xfdd31d71, - 0xff0d1a56, 0xfeb8e74b, 0xb781c9c0, 0xb63434dd, 0xb4ea33fa, - 0xb55fcee7, 0xb1563db4, 0xb0e3c0a9, 0xb23dc78e, 0xb3883a93, - 0xba2e2128, 0xbb9bdc35, 0xb945db12, 0xb8f0260f, 0xbcf9d55c, - 0xbd4c2841, 0xbf922f66, 0xbe27d27b, 0xacde1810, 0xad6be50d, - 0xafb5e22a, 0xae001f37, 0xaa09ec64, 0xabbc1179, 0xa962165e, - 0xa8d7eb43, 0xa171f0f8, 0xa0c40de5, 0xa21a0ac2, 0xa3aff7df, - 0xa7a6048c, 0xa613f991, 0xa4cdfeb6, 0xa57803ab, 0x813e6a60, - 0x808b977d, 0x8255905a, 0x83e06d47, 0x87e99e14, 0x865c6309, - 0x8482642e, 0x85379933, 0x8c918288, 0x8d247f95, 0x8ffa78b2, - 0x8e4f85af, 0x8a4676fc, 0x8bf38be1, 0x892d8cc6, 0x889871db, - 0x9a61bbb0, 0x9bd446ad, 0x990a418a, 0x98bfbc97, 0x9cb64fc4, - 0x9d03b2d9, 0x9fddb5fe, 0x9e6848e3, 0x97ce5358, 0x967bae45, - 0x94a5a962, 0x9510547f, 0x9119a72c, 0x90ac5a31, 0x92725d16, - 0x93c7a00b}, - {0x00000000, 0x6e8c1b41, 0xdd183682, 0xb3942dc3, 0x61416b45, - 0x0fcd7004, 0xbc595dc7, 0xd2d54686, 0xc282d68a, 0xac0ecdcb, - 0x1f9ae008, 0x7116fb49, 0xa3c3bdcf, 0xcd4fa68e, 0x7edb8b4d, - 0x1057900c, 0x5e74ab55, 0x30f8b014, 0x836c9dd7, 0xede08696, - 0x3f35c010, 0x51b9db51, 0xe22df692, 0x8ca1edd3, 0x9cf67ddf, - 0xf27a669e, 0x41ee4b5d, 0x2f62501c, 0xfdb7169a, 0x933b0ddb, - 0x20af2018, 0x4e233b59, 0xbce956aa, 0xd2654deb, 0x61f16028, - 0x0f7d7b69, 0xdda83def, 0xb32426ae, 0x00b00b6d, 0x6e3c102c, - 0x7e6b8020, 0x10e79b61, 0xa373b6a2, 0xcdffade3, 0x1f2aeb65, - 0x71a6f024, 0xc232dde7, 0xacbec6a6, 0xe29dfdff, 0x8c11e6be, - 0x3f85cb7d, 0x5109d03c, 0x83dc96ba, 0xed508dfb, 0x5ec4a038, - 0x3048bb79, 0x201f2b75, 0x4e933034, 0xfd071df7, 0x938b06b6, - 0x415e4030, 0x2fd25b71, 0x9c4676b2, 0xf2ca6df3, 0xa2a3ab15, - 0xcc2fb054, 0x7fbb9d97, 0x113786d6, 0xc3e2c050, 0xad6edb11, - 0x1efaf6d2, 0x7076ed93, 0x60217d9f, 0x0ead66de, 0xbd394b1d, - 0xd3b5505c, 0x016016da, 0x6fec0d9b, 0xdc782058, 0xb2f43b19, - 0xfcd70040, 0x925b1b01, 0x21cf36c2, 0x4f432d83, 0x9d966b05, - 0xf31a7044, 0x408e5d87, 0x2e0246c6, 0x3e55d6ca, 0x50d9cd8b, - 0xe34de048, 0x8dc1fb09, 0x5f14bd8f, 0x3198a6ce, 0x820c8b0d, - 0xec80904c, 0x1e4afdbf, 0x70c6e6fe, 0xc352cb3d, 0xadded07c, - 0x7f0b96fa, 0x11878dbb, 0xa213a078, 0xcc9fbb39, 0xdcc82b35, - 0xb2443074, 0x01d01db7, 0x6f5c06f6, 0xbd894070, 0xd3055b31, - 0x609176f2, 0x0e1d6db3, 0x403e56ea, 0x2eb24dab, 0x9d266068, - 0xf3aa7b29, 0x217f3daf, 0x4ff326ee, 0xfc670b2d, 0x92eb106c, - 0x82bc8060, 0xec309b21, 0x5fa4b6e2, 0x3128ada3, 0xe3fdeb25, - 0x8d71f064, 0x3ee5dda7, 0x5069c6e6, 0x9e36506b, 0xf0ba4b2a, - 0x432e66e9, 0x2da27da8, 0xff773b2e, 0x91fb206f, 0x226f0dac, - 0x4ce316ed, 0x5cb486e1, 0x32389da0, 0x81acb063, 0xef20ab22, - 0x3df5eda4, 0x5379f6e5, 0xe0eddb26, 0x8e61c067, 0xc042fb3e, - 0xaecee07f, 0x1d5acdbc, 0x73d6d6fd, 0xa103907b, 0xcf8f8b3a, - 0x7c1ba6f9, 0x1297bdb8, 0x02c02db4, 0x6c4c36f5, 0xdfd81b36, - 0xb1540077, 0x638146f1, 0x0d0d5db0, 0xbe997073, 0xd0156b32, - 0x22df06c1, 0x4c531d80, 0xffc73043, 0x914b2b02, 0x439e6d84, - 0x2d1276c5, 0x9e865b06, 0xf00a4047, 0xe05dd04b, 0x8ed1cb0a, - 0x3d45e6c9, 0x53c9fd88, 0x811cbb0e, 0xef90a04f, 0x5c048d8c, - 0x328896cd, 0x7cabad94, 0x1227b6d5, 0xa1b39b16, 0xcf3f8057, - 0x1deac6d1, 0x7366dd90, 0xc0f2f053, 0xae7eeb12, 0xbe297b1e, - 0xd0a5605f, 0x63314d9c, 0x0dbd56dd, 0xdf68105b, 0xb1e40b1a, - 0x027026d9, 0x6cfc3d98, 0x3c95fb7e, 0x5219e03f, 0xe18dcdfc, - 0x8f01d6bd, 0x5dd4903b, 0x33588b7a, 0x80cca6b9, 0xee40bdf8, - 0xfe172df4, 0x909b36b5, 0x230f1b76, 0x4d830037, 0x9f5646b1, - 0xf1da5df0, 0x424e7033, 0x2cc26b72, 0x62e1502b, 0x0c6d4b6a, - 0xbff966a9, 0xd1757de8, 0x03a03b6e, 0x6d2c202f, 0xdeb80dec, - 0xb03416ad, 0xa06386a1, 0xceef9de0, 0x7d7bb023, 0x13f7ab62, - 0xc122ede4, 0xafaef6a5, 0x1c3adb66, 0x72b6c027, 0x807cadd4, - 0xeef0b695, 0x5d649b56, 0x33e88017, 0xe13dc691, 0x8fb1ddd0, - 0x3c25f013, 0x52a9eb52, 0x42fe7b5e, 0x2c72601f, 0x9fe64ddc, - 0xf16a569d, 0x23bf101b, 0x4d330b5a, 0xfea72699, 0x902b3dd8, - 0xde080681, 0xb0841dc0, 0x03103003, 0x6d9c2b42, 0xbf496dc4, - 0xd1c57685, 0x62515b46, 0x0cdd4007, 0x1c8ad00b, 0x7206cb4a, - 0xc192e689, 0xaf1efdc8, 0x7dcbbb4e, 0x1347a00f, 0xa0d38dcc, - 0xce5f968d}, - {0x00000000, 0xe71da697, 0x154a4b6f, 0xf257edf8, 0x2a9496de, - 0xcd893049, 0x3fdeddb1, 0xd8c37b26, 0x55292dbc, 0xb2348b2b, - 0x406366d3, 0xa77ec044, 0x7fbdbb62, 0x98a01df5, 0x6af7f00d, - 0x8dea569a, 0xaa525b78, 0x4d4ffdef, 0xbf181017, 0x5805b680, - 0x80c6cda6, 0x67db6b31, 0x958c86c9, 0x7291205e, 0xff7b76c4, - 0x1866d053, 0xea313dab, 0x0d2c9b3c, 0xd5efe01a, 0x32f2468d, - 0xc0a5ab75, 0x27b80de2, 0x8fd5b0b1, 0x68c81626, 0x9a9ffbde, - 0x7d825d49, 0xa541266f, 0x425c80f8, 0xb00b6d00, 0x5716cb97, - 0xdafc9d0d, 0x3de13b9a, 0xcfb6d662, 0x28ab70f5, 0xf0680bd3, - 0x1775ad44, 0xe52240bc, 0x023fe62b, 0x2587ebc9, 0xc29a4d5e, - 0x30cda0a6, 0xd7d00631, 0x0f137d17, 0xe80edb80, 0x1a593678, - 0xfd4490ef, 0x70aec675, 0x97b360e2, 0x65e48d1a, 0x82f92b8d, - 0x5a3a50ab, 0xbd27f63c, 0x4f701bc4, 0xa86dbd53, 0xc4da6723, - 0x23c7c1b4, 0xd1902c4c, 0x368d8adb, 0xee4ef1fd, 0x0953576a, - 0xfb04ba92, 0x1c191c05, 0x91f34a9f, 0x76eeec08, 0x84b901f0, - 0x63a4a767, 0xbb67dc41, 0x5c7a7ad6, 0xae2d972e, 0x493031b9, - 0x6e883c5b, 0x89959acc, 0x7bc27734, 0x9cdfd1a3, 0x441caa85, - 0xa3010c12, 0x5156e1ea, 0xb64b477d, 0x3ba111e7, 0xdcbcb770, - 0x2eeb5a88, 0xc9f6fc1f, 0x11358739, 0xf62821ae, 0x047fcc56, - 0xe3626ac1, 0x4b0fd792, 0xac127105, 0x5e459cfd, 0xb9583a6a, - 0x619b414c, 0x8686e7db, 0x74d10a23, 0x93ccacb4, 0x1e26fa2e, - 0xf93b5cb9, 0x0b6cb141, 0xec7117d6, 0x34b26cf0, 0xd3afca67, - 0x21f8279f, 0xc6e58108, 0xe15d8cea, 0x06402a7d, 0xf417c785, - 0x130a6112, 0xcbc91a34, 0x2cd4bca3, 0xde83515b, 0x399ef7cc, - 0xb474a156, 0x536907c1, 0xa13eea39, 0x46234cae, 0x9ee03788, - 0x79fd911f, 0x8baa7ce7, 0x6cb7da70, 0x52c5c807, 0xb5d86e90, - 0x478f8368, 0xa09225ff, 0x78515ed9, 0x9f4cf84e, 0x6d1b15b6, - 0x8a06b321, 0x07ece5bb, 0xe0f1432c, 0x12a6aed4, 0xf5bb0843, - 0x2d787365, 0xca65d5f2, 0x3832380a, 0xdf2f9e9d, 0xf897937f, - 0x1f8a35e8, 0xedddd810, 0x0ac07e87, 0xd20305a1, 0x351ea336, - 0xc7494ece, 0x2054e859, 0xadbebec3, 0x4aa31854, 0xb8f4f5ac, - 0x5fe9533b, 0x872a281d, 0x60378e8a, 0x92606372, 0x757dc5e5, - 0xdd1078b6, 0x3a0dde21, 0xc85a33d9, 0x2f47954e, 0xf784ee68, - 0x109948ff, 0xe2cea507, 0x05d30390, 0x8839550a, 0x6f24f39d, - 0x9d731e65, 0x7a6eb8f2, 0xa2adc3d4, 0x45b06543, 0xb7e788bb, - 0x50fa2e2c, 0x774223ce, 0x905f8559, 0x620868a1, 0x8515ce36, - 0x5dd6b510, 0xbacb1387, 0x489cfe7f, 0xaf8158e8, 0x226b0e72, - 0xc576a8e5, 0x3721451d, 0xd03ce38a, 0x08ff98ac, 0xefe23e3b, - 0x1db5d3c3, 0xfaa87554, 0x961faf24, 0x710209b3, 0x8355e44b, - 0x644842dc, 0xbc8b39fa, 0x5b969f6d, 0xa9c17295, 0x4edcd402, - 0xc3368298, 0x242b240f, 0xd67cc9f7, 0x31616f60, 0xe9a21446, - 0x0ebfb2d1, 0xfce85f29, 0x1bf5f9be, 0x3c4df45c, 0xdb5052cb, - 0x2907bf33, 0xce1a19a4, 0x16d96282, 0xf1c4c415, 0x039329ed, - 0xe48e8f7a, 0x6964d9e0, 0x8e797f77, 0x7c2e928f, 0x9b333418, - 0x43f04f3e, 0xa4ede9a9, 0x56ba0451, 0xb1a7a2c6, 0x19ca1f95, - 0xfed7b902, 0x0c8054fa, 0xeb9df26d, 0x335e894b, 0xd4432fdc, - 0x2614c224, 0xc10964b3, 0x4ce33229, 0xabfe94be, 0x59a97946, - 0xbeb4dfd1, 0x6677a4f7, 0x816a0260, 0x733def98, 0x9420490f, - 0xb39844ed, 0x5485e27a, 0xa6d20f82, 0x41cfa915, 0x990cd233, - 0x7e1174a4, 0x8c46995c, 0x6b5b3fcb, 0xe6b16951, 0x01accfc6, - 0xf3fb223e, 0x14e684a9, 0xcc25ff8f, 0x2b385918, 0xd96fb4e0, - 0x3e721277}, - {0x00000000, 0xa58b900e, 0x9066265d, 0x35edb653, 0xfbbd4afb, - 0x5e36daf5, 0x6bdb6ca6, 0xce50fca8, 0x2c0b93b7, 0x898003b9, - 0xbc6db5ea, 0x19e625e4, 0xd7b6d94c, 0x723d4942, 0x47d0ff11, - 0xe25b6f1f, 0x5817276e, 0xfd9cb760, 0xc8710133, 0x6dfa913d, - 0xa3aa6d95, 0x0621fd9b, 0x33cc4bc8, 0x9647dbc6, 0x741cb4d9, - 0xd19724d7, 0xe47a9284, 0x41f1028a, 0x8fa1fe22, 0x2a2a6e2c, - 0x1fc7d87f, 0xba4c4871, 0xb02e4edc, 0x15a5ded2, 0x20486881, - 0x85c3f88f, 0x4b930427, 0xee189429, 0xdbf5227a, 0x7e7eb274, - 0x9c25dd6b, 0x39ae4d65, 0x0c43fb36, 0xa9c86b38, 0x67989790, - 0xc213079e, 0xf7feb1cd, 0x527521c3, 0xe83969b2, 0x4db2f9bc, - 0x785f4fef, 0xddd4dfe1, 0x13842349, 0xb60fb347, 0x83e20514, - 0x2669951a, 0xc432fa05, 0x61b96a0b, 0x5454dc58, 0xf1df4c56, - 0x3f8fb0fe, 0x9a0420f0, 0xafe996a3, 0x0a6206ad, 0xbb2d9bf9, - 0x1ea60bf7, 0x2b4bbda4, 0x8ec02daa, 0x4090d102, 0xe51b410c, - 0xd0f6f75f, 0x757d6751, 0x9726084e, 0x32ad9840, 0x07402e13, - 0xa2cbbe1d, 0x6c9b42b5, 0xc910d2bb, 0xfcfd64e8, 0x5976f4e6, - 0xe33abc97, 0x46b12c99, 0x735c9aca, 0xd6d70ac4, 0x1887f66c, - 0xbd0c6662, 0x88e1d031, 0x2d6a403f, 0xcf312f20, 0x6ababf2e, - 0x5f57097d, 0xfadc9973, 0x348c65db, 0x9107f5d5, 0xa4ea4386, - 0x0161d388, 0x0b03d525, 0xae88452b, 0x9b65f378, 0x3eee6376, - 0xf0be9fde, 0x55350fd0, 0x60d8b983, 0xc553298d, 0x27084692, - 0x8283d69c, 0xb76e60cf, 0x12e5f0c1, 0xdcb50c69, 0x793e9c67, - 0x4cd32a34, 0xe958ba3a, 0x5314f24b, 0xf69f6245, 0xc372d416, - 0x66f94418, 0xa8a9b8b0, 0x0d2228be, 0x38cf9eed, 0x9d440ee3, - 0x7f1f61fc, 0xda94f1f2, 0xef7947a1, 0x4af2d7af, 0x84a22b07, - 0x2129bb09, 0x14c40d5a, 0xb14f9d54, 0xad2a31b3, 0x08a1a1bd, - 0x3d4c17ee, 0x98c787e0, 0x56977b48, 0xf31ceb46, 0xc6f15d15, - 0x637acd1b, 0x8121a204, 0x24aa320a, 0x11478459, 0xb4cc1457, - 0x7a9ce8ff, 0xdf1778f1, 0xeafacea2, 0x4f715eac, 0xf53d16dd, - 0x50b686d3, 0x655b3080, 0xc0d0a08e, 0x0e805c26, 0xab0bcc28, - 0x9ee67a7b, 0x3b6dea75, 0xd936856a, 0x7cbd1564, 0x4950a337, - 0xecdb3339, 0x228bcf91, 0x87005f9f, 0xb2ede9cc, 0x176679c2, - 0x1d047f6f, 0xb88fef61, 0x8d625932, 0x28e9c93c, 0xe6b93594, - 0x4332a59a, 0x76df13c9, 0xd35483c7, 0x310fecd8, 0x94847cd6, - 0xa169ca85, 0x04e25a8b, 0xcab2a623, 0x6f39362d, 0x5ad4807e, - 0xff5f1070, 0x45135801, 0xe098c80f, 0xd5757e5c, 0x70feee52, - 0xbeae12fa, 0x1b2582f4, 0x2ec834a7, 0x8b43a4a9, 0x6918cbb6, - 0xcc935bb8, 0xf97eedeb, 0x5cf57de5, 0x92a5814d, 0x372e1143, - 0x02c3a710, 0xa748371e, 0x1607aa4a, 0xb38c3a44, 0x86618c17, - 0x23ea1c19, 0xedbae0b1, 0x483170bf, 0x7ddcc6ec, 0xd85756e2, - 0x3a0c39fd, 0x9f87a9f3, 0xaa6a1fa0, 0x0fe18fae, 0xc1b17306, - 0x643ae308, 0x51d7555b, 0xf45cc555, 0x4e108d24, 0xeb9b1d2a, - 0xde76ab79, 0x7bfd3b77, 0xb5adc7df, 0x102657d1, 0x25cbe182, - 0x8040718c, 0x621b1e93, 0xc7908e9d, 0xf27d38ce, 0x57f6a8c0, - 0x99a65468, 0x3c2dc466, 0x09c07235, 0xac4be23b, 0xa629e496, - 0x03a27498, 0x364fc2cb, 0x93c452c5, 0x5d94ae6d, 0xf81f3e63, - 0xcdf28830, 0x6879183e, 0x8a227721, 0x2fa9e72f, 0x1a44517c, - 0xbfcfc172, 0x719f3dda, 0xd414add4, 0xe1f91b87, 0x44728b89, - 0xfe3ec3f8, 0x5bb553f6, 0x6e58e5a5, 0xcbd375ab, 0x05838903, - 0xa008190d, 0x95e5af5e, 0x306e3f50, 0xd235504f, 0x77bec041, - 0x42537612, 0xe7d8e61c, 0x29881ab4, 0x8c038aba, 0xb9ee3ce9, - 0x1c65ace7}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0x0e908ba500000000, 0x5d26669000000000, - 0x53b6ed3500000000, 0xfb4abdfb00000000, 0xf5da365e00000000, - 0xa66cdb6b00000000, 0xa8fc50ce00000000, 0xb7930b2c00000000, - 0xb903808900000000, 0xeab56dbc00000000, 0xe425e61900000000, - 0x4cd9b6d700000000, 0x42493d7200000000, 0x11ffd04700000000, - 0x1f6f5be200000000, 0x6e27175800000000, 0x60b79cfd00000000, - 0x330171c800000000, 0x3d91fa6d00000000, 0x956daaa300000000, - 0x9bfd210600000000, 0xc84bcc3300000000, 0xc6db479600000000, - 0xd9b41c7400000000, 0xd72497d100000000, 0x84927ae400000000, - 0x8a02f14100000000, 0x22fea18f00000000, 0x2c6e2a2a00000000, - 0x7fd8c71f00000000, 0x71484cba00000000, 0xdc4e2eb000000000, - 0xd2dea51500000000, 0x8168482000000000, 0x8ff8c38500000000, - 0x2704934b00000000, 0x299418ee00000000, 0x7a22f5db00000000, - 0x74b27e7e00000000, 0x6bdd259c00000000, 0x654dae3900000000, - 0x36fb430c00000000, 0x386bc8a900000000, 0x9097986700000000, - 0x9e0713c200000000, 0xcdb1fef700000000, 0xc321755200000000, - 0xb26939e800000000, 0xbcf9b24d00000000, 0xef4f5f7800000000, - 0xe1dfd4dd00000000, 0x4923841300000000, 0x47b30fb600000000, - 0x1405e28300000000, 0x1a95692600000000, 0x05fa32c400000000, - 0x0b6ab96100000000, 0x58dc545400000000, 0x564cdff100000000, - 0xfeb08f3f00000000, 0xf020049a00000000, 0xa396e9af00000000, - 0xad06620a00000000, 0xf99b2dbb00000000, 0xf70ba61e00000000, - 0xa4bd4b2b00000000, 0xaa2dc08e00000000, 0x02d1904000000000, - 0x0c411be500000000, 0x5ff7f6d000000000, 0x51677d7500000000, - 0x4e08269700000000, 0x4098ad3200000000, 0x132e400700000000, - 0x1dbecba200000000, 0xb5429b6c00000000, 0xbbd210c900000000, - 0xe864fdfc00000000, 0xe6f4765900000000, 0x97bc3ae300000000, - 0x992cb14600000000, 0xca9a5c7300000000, 0xc40ad7d600000000, - 0x6cf6871800000000, 0x62660cbd00000000, 0x31d0e18800000000, - 0x3f406a2d00000000, 0x202f31cf00000000, 0x2ebfba6a00000000, - 0x7d09575f00000000, 0x7399dcfa00000000, 0xdb658c3400000000, - 0xd5f5079100000000, 0x8643eaa400000000, 0x88d3610100000000, - 0x25d5030b00000000, 0x2b4588ae00000000, 0x78f3659b00000000, - 0x7663ee3e00000000, 0xde9fbef000000000, 0xd00f355500000000, - 0x83b9d86000000000, 0x8d2953c500000000, 0x9246082700000000, - 0x9cd6838200000000, 0xcf606eb700000000, 0xc1f0e51200000000, - 0x690cb5dc00000000, 0x679c3e7900000000, 0x342ad34c00000000, - 0x3aba58e900000000, 0x4bf2145300000000, 0x45629ff600000000, - 0x16d472c300000000, 0x1844f96600000000, 0xb0b8a9a800000000, - 0xbe28220d00000000, 0xed9ecf3800000000, 0xe30e449d00000000, - 0xfc611f7f00000000, 0xf2f194da00000000, 0xa14779ef00000000, - 0xafd7f24a00000000, 0x072ba28400000000, 0x09bb292100000000, - 0x5a0dc41400000000, 0x549d4fb100000000, 0xb3312aad00000000, - 0xbda1a10800000000, 0xee174c3d00000000, 0xe087c79800000000, - 0x487b975600000000, 0x46eb1cf300000000, 0x155df1c600000000, - 0x1bcd7a6300000000, 0x04a2218100000000, 0x0a32aa2400000000, - 0x5984471100000000, 0x5714ccb400000000, 0xffe89c7a00000000, - 0xf17817df00000000, 0xa2cefaea00000000, 0xac5e714f00000000, - 0xdd163df500000000, 0xd386b65000000000, 0x80305b6500000000, - 0x8ea0d0c000000000, 0x265c800e00000000, 0x28cc0bab00000000, - 0x7b7ae69e00000000, 0x75ea6d3b00000000, 0x6a8536d900000000, - 0x6415bd7c00000000, 0x37a3504900000000, 0x3933dbec00000000, - 0x91cf8b2200000000, 0x9f5f008700000000, 0xcce9edb200000000, - 0xc279661700000000, 0x6f7f041d00000000, 0x61ef8fb800000000, - 0x3259628d00000000, 0x3cc9e92800000000, 0x9435b9e600000000, - 0x9aa5324300000000, 0xc913df7600000000, 0xc78354d300000000, - 0xd8ec0f3100000000, 0xd67c849400000000, 0x85ca69a100000000, - 0x8b5ae20400000000, 0x23a6b2ca00000000, 0x2d36396f00000000, - 0x7e80d45a00000000, 0x70105fff00000000, 0x0158134500000000, - 0x0fc898e000000000, 0x5c7e75d500000000, 0x52eefe7000000000, - 0xfa12aebe00000000, 0xf482251b00000000, 0xa734c82e00000000, - 0xa9a4438b00000000, 0xb6cb186900000000, 0xb85b93cc00000000, - 0xebed7ef900000000, 0xe57df55c00000000, 0x4d81a59200000000, - 0x43112e3700000000, 0x10a7c30200000000, 0x1e3748a700000000, - 0x4aaa071600000000, 0x443a8cb300000000, 0x178c618600000000, - 0x191cea2300000000, 0xb1e0baed00000000, 0xbf70314800000000, - 0xecc6dc7d00000000, 0xe25657d800000000, 0xfd390c3a00000000, - 0xf3a9879f00000000, 0xa01f6aaa00000000, 0xae8fe10f00000000, - 0x0673b1c100000000, 0x08e33a6400000000, 0x5b55d75100000000, - 0x55c55cf400000000, 0x248d104e00000000, 0x2a1d9beb00000000, - 0x79ab76de00000000, 0x773bfd7b00000000, 0xdfc7adb500000000, - 0xd157261000000000, 0x82e1cb2500000000, 0x8c71408000000000, - 0x931e1b6200000000, 0x9d8e90c700000000, 0xce387df200000000, - 0xc0a8f65700000000, 0x6854a69900000000, 0x66c42d3c00000000, - 0x3572c00900000000, 0x3be24bac00000000, 0x96e429a600000000, - 0x9874a20300000000, 0xcbc24f3600000000, 0xc552c49300000000, - 0x6dae945d00000000, 0x633e1ff800000000, 0x3088f2cd00000000, - 0x3e18796800000000, 0x2177228a00000000, 0x2fe7a92f00000000, - 0x7c51441a00000000, 0x72c1cfbf00000000, 0xda3d9f7100000000, - 0xd4ad14d400000000, 0x871bf9e100000000, 0x898b724400000000, - 0xf8c33efe00000000, 0xf653b55b00000000, 0xa5e5586e00000000, - 0xab75d3cb00000000, 0x0389830500000000, 0x0d1908a000000000, - 0x5eafe59500000000, 0x503f6e3000000000, 0x4f5035d200000000, - 0x41c0be7700000000, 0x1276534200000000, 0x1ce6d8e700000000, - 0xb41a882900000000, 0xba8a038c00000000, 0xe93ceeb900000000, - 0xe7ac651c00000000}, - {0x0000000000000000, 0x97a61de700000000, 0x6f4b4a1500000000, - 0xf8ed57f200000000, 0xde96942a00000000, 0x493089cd00000000, - 0xb1ddde3f00000000, 0x267bc3d800000000, 0xbc2d295500000000, - 0x2b8b34b200000000, 0xd366634000000000, 0x44c07ea700000000, - 0x62bbbd7f00000000, 0xf51da09800000000, 0x0df0f76a00000000, - 0x9a56ea8d00000000, 0x785b52aa00000000, 0xeffd4f4d00000000, - 0x171018bf00000000, 0x80b6055800000000, 0xa6cdc68000000000, - 0x316bdb6700000000, 0xc9868c9500000000, 0x5e20917200000000, - 0xc4767bff00000000, 0x53d0661800000000, 0xab3d31ea00000000, - 0x3c9b2c0d00000000, 0x1ae0efd500000000, 0x8d46f23200000000, - 0x75aba5c000000000, 0xe20db82700000000, 0xb1b0d58f00000000, - 0x2616c86800000000, 0xdefb9f9a00000000, 0x495d827d00000000, - 0x6f2641a500000000, 0xf8805c4200000000, 0x006d0bb000000000, - 0x97cb165700000000, 0x0d9dfcda00000000, 0x9a3be13d00000000, - 0x62d6b6cf00000000, 0xf570ab2800000000, 0xd30b68f000000000, - 0x44ad751700000000, 0xbc4022e500000000, 0x2be63f0200000000, - 0xc9eb872500000000, 0x5e4d9ac200000000, 0xa6a0cd3000000000, - 0x3106d0d700000000, 0x177d130f00000000, 0x80db0ee800000000, - 0x7836591a00000000, 0xef9044fd00000000, 0x75c6ae7000000000, - 0xe260b39700000000, 0x1a8de46500000000, 0x8d2bf98200000000, - 0xab503a5a00000000, 0x3cf627bd00000000, 0xc41b704f00000000, - 0x53bd6da800000000, 0x2367dac400000000, 0xb4c1c72300000000, - 0x4c2c90d100000000, 0xdb8a8d3600000000, 0xfdf14eee00000000, - 0x6a57530900000000, 0x92ba04fb00000000, 0x051c191c00000000, - 0x9f4af39100000000, 0x08ecee7600000000, 0xf001b98400000000, - 0x67a7a46300000000, 0x41dc67bb00000000, 0xd67a7a5c00000000, - 0x2e972dae00000000, 0xb931304900000000, 0x5b3c886e00000000, - 0xcc9a958900000000, 0x3477c27b00000000, 0xa3d1df9c00000000, - 0x85aa1c4400000000, 0x120c01a300000000, 0xeae1565100000000, - 0x7d474bb600000000, 0xe711a13b00000000, 0x70b7bcdc00000000, - 0x885aeb2e00000000, 0x1ffcf6c900000000, 0x3987351100000000, - 0xae2128f600000000, 0x56cc7f0400000000, 0xc16a62e300000000, - 0x92d70f4b00000000, 0x057112ac00000000, 0xfd9c455e00000000, - 0x6a3a58b900000000, 0x4c419b6100000000, 0xdbe7868600000000, - 0x230ad17400000000, 0xb4accc9300000000, 0x2efa261e00000000, - 0xb95c3bf900000000, 0x41b16c0b00000000, 0xd61771ec00000000, - 0xf06cb23400000000, 0x67caafd300000000, 0x9f27f82100000000, - 0x0881e5c600000000, 0xea8c5de100000000, 0x7d2a400600000000, - 0x85c717f400000000, 0x12610a1300000000, 0x341ac9cb00000000, - 0xa3bcd42c00000000, 0x5b5183de00000000, 0xccf79e3900000000, - 0x56a174b400000000, 0xc107695300000000, 0x39ea3ea100000000, - 0xae4c234600000000, 0x8837e09e00000000, 0x1f91fd7900000000, - 0xe77caa8b00000000, 0x70dab76c00000000, 0x07c8c55200000000, - 0x906ed8b500000000, 0x68838f4700000000, 0xff2592a000000000, - 0xd95e517800000000, 0x4ef84c9f00000000, 0xb6151b6d00000000, - 0x21b3068a00000000, 0xbbe5ec0700000000, 0x2c43f1e000000000, - 0xd4aea61200000000, 0x4308bbf500000000, 0x6573782d00000000, - 0xf2d565ca00000000, 0x0a38323800000000, 0x9d9e2fdf00000000, - 0x7f9397f800000000, 0xe8358a1f00000000, 0x10d8dded00000000, - 0x877ec00a00000000, 0xa10503d200000000, 0x36a31e3500000000, - 0xce4e49c700000000, 0x59e8542000000000, 0xc3bebead00000000, - 0x5418a34a00000000, 0xacf5f4b800000000, 0x3b53e95f00000000, - 0x1d282a8700000000, 0x8a8e376000000000, 0x7263609200000000, - 0xe5c57d7500000000, 0xb67810dd00000000, 0x21de0d3a00000000, - 0xd9335ac800000000, 0x4e95472f00000000, 0x68ee84f700000000, - 0xff48991000000000, 0x07a5cee200000000, 0x9003d30500000000, - 0x0a55398800000000, 0x9df3246f00000000, 0x651e739d00000000, - 0xf2b86e7a00000000, 0xd4c3ada200000000, 0x4365b04500000000, - 0xbb88e7b700000000, 0x2c2efa5000000000, 0xce23427700000000, - 0x59855f9000000000, 0xa168086200000000, 0x36ce158500000000, - 0x10b5d65d00000000, 0x8713cbba00000000, 0x7ffe9c4800000000, - 0xe85881af00000000, 0x720e6b2200000000, 0xe5a876c500000000, - 0x1d45213700000000, 0x8ae33cd000000000, 0xac98ff0800000000, - 0x3b3ee2ef00000000, 0xc3d3b51d00000000, 0x5475a8fa00000000, - 0x24af1f9600000000, 0xb309027100000000, 0x4be4558300000000, - 0xdc42486400000000, 0xfa398bbc00000000, 0x6d9f965b00000000, - 0x9572c1a900000000, 0x02d4dc4e00000000, 0x988236c300000000, - 0x0f242b2400000000, 0xf7c97cd600000000, 0x606f613100000000, - 0x4614a2e900000000, 0xd1b2bf0e00000000, 0x295fe8fc00000000, - 0xbef9f51b00000000, 0x5cf44d3c00000000, 0xcb5250db00000000, - 0x33bf072900000000, 0xa4191ace00000000, 0x8262d91600000000, - 0x15c4c4f100000000, 0xed29930300000000, 0x7a8f8ee400000000, - 0xe0d9646900000000, 0x777f798e00000000, 0x8f922e7c00000000, - 0x1834339b00000000, 0x3e4ff04300000000, 0xa9e9eda400000000, - 0x5104ba5600000000, 0xc6a2a7b100000000, 0x951fca1900000000, - 0x02b9d7fe00000000, 0xfa54800c00000000, 0x6df29deb00000000, - 0x4b895e3300000000, 0xdc2f43d400000000, 0x24c2142600000000, - 0xb36409c100000000, 0x2932e34c00000000, 0xbe94feab00000000, - 0x4679a95900000000, 0xd1dfb4be00000000, 0xf7a4776600000000, - 0x60026a8100000000, 0x98ef3d7300000000, 0x0f49209400000000, - 0xed4498b300000000, 0x7ae2855400000000, 0x820fd2a600000000, - 0x15a9cf4100000000, 0x33d20c9900000000, 0xa474117e00000000, - 0x5c99468c00000000, 0xcb3f5b6b00000000, 0x5169b1e600000000, - 0xc6cfac0100000000, 0x3e22fbf300000000, 0xa984e61400000000, - 0x8fff25cc00000000, 0x1859382b00000000, 0xe0b46fd900000000, - 0x7712723e00000000}, - {0x0000000000000000, 0x411b8c6e00000000, 0x823618dd00000000, - 0xc32d94b300000000, 0x456b416100000000, 0x0470cd0f00000000, - 0xc75d59bc00000000, 0x8646d5d200000000, 0x8ad682c200000000, - 0xcbcd0eac00000000, 0x08e09a1f00000000, 0x49fb167100000000, - 0xcfbdc3a300000000, 0x8ea64fcd00000000, 0x4d8bdb7e00000000, - 0x0c90571000000000, 0x55ab745e00000000, 0x14b0f83000000000, - 0xd79d6c8300000000, 0x9686e0ed00000000, 0x10c0353f00000000, - 0x51dbb95100000000, 0x92f62de200000000, 0xd3eda18c00000000, - 0xdf7df69c00000000, 0x9e667af200000000, 0x5d4bee4100000000, - 0x1c50622f00000000, 0x9a16b7fd00000000, 0xdb0d3b9300000000, - 0x1820af2000000000, 0x593b234e00000000, 0xaa56e9bc00000000, - 0xeb4d65d200000000, 0x2860f16100000000, 0x697b7d0f00000000, - 0xef3da8dd00000000, 0xae2624b300000000, 0x6d0bb00000000000, - 0x2c103c6e00000000, 0x20806b7e00000000, 0x619be71000000000, - 0xa2b673a300000000, 0xe3adffcd00000000, 0x65eb2a1f00000000, - 0x24f0a67100000000, 0xe7dd32c200000000, 0xa6c6beac00000000, - 0xfffd9de200000000, 0xbee6118c00000000, 0x7dcb853f00000000, - 0x3cd0095100000000, 0xba96dc8300000000, 0xfb8d50ed00000000, - 0x38a0c45e00000000, 0x79bb483000000000, 0x752b1f2000000000, - 0x3430934e00000000, 0xf71d07fd00000000, 0xb6068b9300000000, - 0x30405e4100000000, 0x715bd22f00000000, 0xb276469c00000000, - 0xf36dcaf200000000, 0x15aba3a200000000, 0x54b02fcc00000000, - 0x979dbb7f00000000, 0xd686371100000000, 0x50c0e2c300000000, - 0x11db6ead00000000, 0xd2f6fa1e00000000, 0x93ed767000000000, - 0x9f7d216000000000, 0xde66ad0e00000000, 0x1d4b39bd00000000, - 0x5c50b5d300000000, 0xda16600100000000, 0x9b0dec6f00000000, - 0x582078dc00000000, 0x193bf4b200000000, 0x4000d7fc00000000, - 0x011b5b9200000000, 0xc236cf2100000000, 0x832d434f00000000, - 0x056b969d00000000, 0x44701af300000000, 0x875d8e4000000000, - 0xc646022e00000000, 0xcad6553e00000000, 0x8bcdd95000000000, - 0x48e04de300000000, 0x09fbc18d00000000, 0x8fbd145f00000000, - 0xcea6983100000000, 0x0d8b0c8200000000, 0x4c9080ec00000000, - 0xbffd4a1e00000000, 0xfee6c67000000000, 0x3dcb52c300000000, - 0x7cd0dead00000000, 0xfa960b7f00000000, 0xbb8d871100000000, - 0x78a013a200000000, 0x39bb9fcc00000000, 0x352bc8dc00000000, - 0x743044b200000000, 0xb71dd00100000000, 0xf6065c6f00000000, - 0x704089bd00000000, 0x315b05d300000000, 0xf276916000000000, - 0xb36d1d0e00000000, 0xea563e4000000000, 0xab4db22e00000000, - 0x6860269d00000000, 0x297baaf300000000, 0xaf3d7f2100000000, - 0xee26f34f00000000, 0x2d0b67fc00000000, 0x6c10eb9200000000, - 0x6080bc8200000000, 0x219b30ec00000000, 0xe2b6a45f00000000, - 0xa3ad283100000000, 0x25ebfde300000000, 0x64f0718d00000000, - 0xa7dde53e00000000, 0xe6c6695000000000, 0x6b50369e00000000, - 0x2a4bbaf000000000, 0xe9662e4300000000, 0xa87da22d00000000, - 0x2e3b77ff00000000, 0x6f20fb9100000000, 0xac0d6f2200000000, - 0xed16e34c00000000, 0xe186b45c00000000, 0xa09d383200000000, - 0x63b0ac8100000000, 0x22ab20ef00000000, 0xa4edf53d00000000, - 0xe5f6795300000000, 0x26dbede000000000, 0x67c0618e00000000, - 0x3efb42c000000000, 0x7fe0ceae00000000, 0xbccd5a1d00000000, - 0xfdd6d67300000000, 0x7b9003a100000000, 0x3a8b8fcf00000000, - 0xf9a61b7c00000000, 0xb8bd971200000000, 0xb42dc00200000000, - 0xf5364c6c00000000, 0x361bd8df00000000, 0x770054b100000000, - 0xf146816300000000, 0xb05d0d0d00000000, 0x737099be00000000, - 0x326b15d000000000, 0xc106df2200000000, 0x801d534c00000000, - 0x4330c7ff00000000, 0x022b4b9100000000, 0x846d9e4300000000, - 0xc576122d00000000, 0x065b869e00000000, 0x47400af000000000, - 0x4bd05de000000000, 0x0acbd18e00000000, 0xc9e6453d00000000, - 0x88fdc95300000000, 0x0ebb1c8100000000, 0x4fa090ef00000000, - 0x8c8d045c00000000, 0xcd96883200000000, 0x94adab7c00000000, - 0xd5b6271200000000, 0x169bb3a100000000, 0x57803fcf00000000, - 0xd1c6ea1d00000000, 0x90dd667300000000, 0x53f0f2c000000000, - 0x12eb7eae00000000, 0x1e7b29be00000000, 0x5f60a5d000000000, - 0x9c4d316300000000, 0xdd56bd0d00000000, 0x5b1068df00000000, - 0x1a0be4b100000000, 0xd926700200000000, 0x983dfc6c00000000, - 0x7efb953c00000000, 0x3fe0195200000000, 0xfccd8de100000000, - 0xbdd6018f00000000, 0x3b90d45d00000000, 0x7a8b583300000000, - 0xb9a6cc8000000000, 0xf8bd40ee00000000, 0xf42d17fe00000000, - 0xb5369b9000000000, 0x761b0f2300000000, 0x3700834d00000000, - 0xb146569f00000000, 0xf05ddaf100000000, 0x33704e4200000000, - 0x726bc22c00000000, 0x2b50e16200000000, 0x6a4b6d0c00000000, - 0xa966f9bf00000000, 0xe87d75d100000000, 0x6e3ba00300000000, - 0x2f202c6d00000000, 0xec0db8de00000000, 0xad1634b000000000, - 0xa18663a000000000, 0xe09defce00000000, 0x23b07b7d00000000, - 0x62abf71300000000, 0xe4ed22c100000000, 0xa5f6aeaf00000000, - 0x66db3a1c00000000, 0x27c0b67200000000, 0xd4ad7c8000000000, - 0x95b6f0ee00000000, 0x569b645d00000000, 0x1780e83300000000, - 0x91c63de100000000, 0xd0ddb18f00000000, 0x13f0253c00000000, - 0x52eba95200000000, 0x5e7bfe4200000000, 0x1f60722c00000000, - 0xdc4de69f00000000, 0x9d566af100000000, 0x1b10bf2300000000, - 0x5a0b334d00000000, 0x9926a7fe00000000, 0xd83d2b9000000000, - 0x810608de00000000, 0xc01d84b000000000, 0x0330100300000000, - 0x422b9c6d00000000, 0xc46d49bf00000000, 0x8576c5d100000000, - 0x465b516200000000, 0x0740dd0c00000000, 0x0bd08a1c00000000, - 0x4acb067200000000, 0x89e692c100000000, 0xc8fd1eaf00000000, - 0x4ebbcb7d00000000, 0x0fa0471300000000, 0xcc8dd3a000000000, - 0x8d965fce00000000}, - {0x0000000000000000, 0x1dfdb50100000000, 0x3afa6b0300000000, - 0x2707de0200000000, 0x74f4d70600000000, 0x6909620700000000, - 0x4e0ebc0500000000, 0x53f3090400000000, 0xe8e8af0d00000000, - 0xf5151a0c00000000, 0xd212c40e00000000, 0xcfef710f00000000, - 0x9c1c780b00000000, 0x81e1cd0a00000000, 0xa6e6130800000000, - 0xbb1ba60900000000, 0xd0d15f1b00000000, 0xcd2cea1a00000000, - 0xea2b341800000000, 0xf7d6811900000000, 0xa425881d00000000, - 0xb9d83d1c00000000, 0x9edfe31e00000000, 0x8322561f00000000, - 0x3839f01600000000, 0x25c4451700000000, 0x02c39b1500000000, - 0x1f3e2e1400000000, 0x4ccd271000000000, 0x5130921100000000, - 0x76374c1300000000, 0x6bcaf91200000000, 0xa0a3bf3600000000, - 0xbd5e0a3700000000, 0x9a59d43500000000, 0x87a4613400000000, - 0xd457683000000000, 0xc9aadd3100000000, 0xeead033300000000, - 0xf350b63200000000, 0x484b103b00000000, 0x55b6a53a00000000, - 0x72b17b3800000000, 0x6f4cce3900000000, 0x3cbfc73d00000000, - 0x2142723c00000000, 0x0645ac3e00000000, 0x1bb8193f00000000, - 0x7072e02d00000000, 0x6d8f552c00000000, 0x4a888b2e00000000, - 0x57753e2f00000000, 0x0486372b00000000, 0x197b822a00000000, - 0x3e7c5c2800000000, 0x2381e92900000000, 0x989a4f2000000000, - 0x8567fa2100000000, 0xa260242300000000, 0xbf9d912200000000, - 0xec6e982600000000, 0xf1932d2700000000, 0xd694f32500000000, - 0xcb69462400000000, 0x40477f6d00000000, 0x5dbaca6c00000000, - 0x7abd146e00000000, 0x6740a16f00000000, 0x34b3a86b00000000, - 0x294e1d6a00000000, 0x0e49c36800000000, 0x13b4766900000000, - 0xa8afd06000000000, 0xb552656100000000, 0x9255bb6300000000, - 0x8fa80e6200000000, 0xdc5b076600000000, 0xc1a6b26700000000, - 0xe6a16c6500000000, 0xfb5cd96400000000, 0x9096207600000000, - 0x8d6b957700000000, 0xaa6c4b7500000000, 0xb791fe7400000000, - 0xe462f77000000000, 0xf99f427100000000, 0xde989c7300000000, - 0xc365297200000000, 0x787e8f7b00000000, 0x65833a7a00000000, - 0x4284e47800000000, 0x5f79517900000000, 0x0c8a587d00000000, - 0x1177ed7c00000000, 0x3670337e00000000, 0x2b8d867f00000000, - 0xe0e4c05b00000000, 0xfd19755a00000000, 0xda1eab5800000000, - 0xc7e31e5900000000, 0x9410175d00000000, 0x89eda25c00000000, - 0xaeea7c5e00000000, 0xb317c95f00000000, 0x080c6f5600000000, - 0x15f1da5700000000, 0x32f6045500000000, 0x2f0bb15400000000, - 0x7cf8b85000000000, 0x61050d5100000000, 0x4602d35300000000, - 0x5bff665200000000, 0x30359f4000000000, 0x2dc82a4100000000, - 0x0acff44300000000, 0x1732414200000000, 0x44c1484600000000, - 0x593cfd4700000000, 0x7e3b234500000000, 0x63c6964400000000, - 0xd8dd304d00000000, 0xc520854c00000000, 0xe2275b4e00000000, - 0xffdaee4f00000000, 0xac29e74b00000000, 0xb1d4524a00000000, - 0x96d38c4800000000, 0x8b2e394900000000, 0x808efeda00000000, - 0x9d734bdb00000000, 0xba7495d900000000, 0xa78920d800000000, - 0xf47a29dc00000000, 0xe9879cdd00000000, 0xce8042df00000000, - 0xd37df7de00000000, 0x686651d700000000, 0x759be4d600000000, - 0x529c3ad400000000, 0x4f618fd500000000, 0x1c9286d100000000, - 0x016f33d000000000, 0x2668edd200000000, 0x3b9558d300000000, - 0x505fa1c100000000, 0x4da214c000000000, 0x6aa5cac200000000, - 0x77587fc300000000, 0x24ab76c700000000, 0x3956c3c600000000, - 0x1e511dc400000000, 0x03aca8c500000000, 0xb8b70ecc00000000, - 0xa54abbcd00000000, 0x824d65cf00000000, 0x9fb0d0ce00000000, - 0xcc43d9ca00000000, 0xd1be6ccb00000000, 0xf6b9b2c900000000, - 0xeb4407c800000000, 0x202d41ec00000000, 0x3dd0f4ed00000000, - 0x1ad72aef00000000, 0x072a9fee00000000, 0x54d996ea00000000, - 0x492423eb00000000, 0x6e23fde900000000, 0x73de48e800000000, - 0xc8c5eee100000000, 0xd5385be000000000, 0xf23f85e200000000, - 0xefc230e300000000, 0xbc3139e700000000, 0xa1cc8ce600000000, - 0x86cb52e400000000, 0x9b36e7e500000000, 0xf0fc1ef700000000, - 0xed01abf600000000, 0xca0675f400000000, 0xd7fbc0f500000000, - 0x8408c9f100000000, 0x99f57cf000000000, 0xbef2a2f200000000, - 0xa30f17f300000000, 0x1814b1fa00000000, 0x05e904fb00000000, - 0x22eedaf900000000, 0x3f136ff800000000, 0x6ce066fc00000000, - 0x711dd3fd00000000, 0x561a0dff00000000, 0x4be7b8fe00000000, - 0xc0c981b700000000, 0xdd3434b600000000, 0xfa33eab400000000, - 0xe7ce5fb500000000, 0xb43d56b100000000, 0xa9c0e3b000000000, - 0x8ec73db200000000, 0x933a88b300000000, 0x28212eba00000000, - 0x35dc9bbb00000000, 0x12db45b900000000, 0x0f26f0b800000000, - 0x5cd5f9bc00000000, 0x41284cbd00000000, 0x662f92bf00000000, - 0x7bd227be00000000, 0x1018deac00000000, 0x0de56bad00000000, - 0x2ae2b5af00000000, 0x371f00ae00000000, 0x64ec09aa00000000, - 0x7911bcab00000000, 0x5e1662a900000000, 0x43ebd7a800000000, - 0xf8f071a100000000, 0xe50dc4a000000000, 0xc20a1aa200000000, - 0xdff7afa300000000, 0x8c04a6a700000000, 0x91f913a600000000, - 0xb6fecda400000000, 0xab0378a500000000, 0x606a3e8100000000, - 0x7d978b8000000000, 0x5a90558200000000, 0x476de08300000000, - 0x149ee98700000000, 0x09635c8600000000, 0x2e64828400000000, - 0x3399378500000000, 0x8882918c00000000, 0x957f248d00000000, - 0xb278fa8f00000000, 0xaf854f8e00000000, 0xfc76468a00000000, - 0xe18bf38b00000000, 0xc68c2d8900000000, 0xdb71988800000000, - 0xb0bb619a00000000, 0xad46d49b00000000, 0x8a410a9900000000, - 0x97bcbf9800000000, 0xc44fb69c00000000, 0xd9b2039d00000000, - 0xfeb5dd9f00000000, 0xe348689e00000000, 0x5853ce9700000000, - 0x45ae7b9600000000, 0x62a9a59400000000, 0x7f54109500000000, - 0x2ca7199100000000, 0x315aac9000000000, 0x165d729200000000, - 0x0ba0c79300000000}, - {0x0000000000000000, 0x24d9076300000000, 0x48b20fc600000000, - 0x6c6b08a500000000, 0xd1626e5700000000, 0xf5bb693400000000, - 0x99d0619100000000, 0xbd0966f200000000, 0xa2c5dcae00000000, - 0x861cdbcd00000000, 0xea77d36800000000, 0xceaed40b00000000, - 0x73a7b2f900000000, 0x577eb59a00000000, 0x3b15bd3f00000000, - 0x1fccba5c00000000, 0x058dc88600000000, 0x2154cfe500000000, - 0x4d3fc74000000000, 0x69e6c02300000000, 0xd4efa6d100000000, - 0xf036a1b200000000, 0x9c5da91700000000, 0xb884ae7400000000, - 0xa748142800000000, 0x8391134b00000000, 0xeffa1bee00000000, - 0xcb231c8d00000000, 0x762a7a7f00000000, 0x52f37d1c00000000, - 0x3e9875b900000000, 0x1a4172da00000000, 0x4b1ce0d600000000, - 0x6fc5e7b500000000, 0x03aeef1000000000, 0x2777e87300000000, - 0x9a7e8e8100000000, 0xbea789e200000000, 0xd2cc814700000000, - 0xf615862400000000, 0xe9d93c7800000000, 0xcd003b1b00000000, - 0xa16b33be00000000, 0x85b234dd00000000, 0x38bb522f00000000, - 0x1c62554c00000000, 0x70095de900000000, 0x54d05a8a00000000, - 0x4e91285000000000, 0x6a482f3300000000, 0x0623279600000000, - 0x22fa20f500000000, 0x9ff3460700000000, 0xbb2a416400000000, - 0xd74149c100000000, 0xf3984ea200000000, 0xec54f4fe00000000, - 0xc88df39d00000000, 0xa4e6fb3800000000, 0x803ffc5b00000000, - 0x3d369aa900000000, 0x19ef9dca00000000, 0x7584956f00000000, - 0x515d920c00000000, 0xd73eb17600000000, 0xf3e7b61500000000, - 0x9f8cbeb000000000, 0xbb55b9d300000000, 0x065cdf2100000000, - 0x2285d84200000000, 0x4eeed0e700000000, 0x6a37d78400000000, - 0x75fb6dd800000000, 0x51226abb00000000, 0x3d49621e00000000, - 0x1990657d00000000, 0xa499038f00000000, 0x804004ec00000000, - 0xec2b0c4900000000, 0xc8f20b2a00000000, 0xd2b379f000000000, - 0xf66a7e9300000000, 0x9a01763600000000, 0xbed8715500000000, - 0x03d117a700000000, 0x270810c400000000, 0x4b63186100000000, - 0x6fba1f0200000000, 0x7076a55e00000000, 0x54afa23d00000000, - 0x38c4aa9800000000, 0x1c1dadfb00000000, 0xa114cb0900000000, - 0x85cdcc6a00000000, 0xe9a6c4cf00000000, 0xcd7fc3ac00000000, - 0x9c2251a000000000, 0xb8fb56c300000000, 0xd4905e6600000000, - 0xf049590500000000, 0x4d403ff700000000, 0x6999389400000000, - 0x05f2303100000000, 0x212b375200000000, 0x3ee78d0e00000000, - 0x1a3e8a6d00000000, 0x765582c800000000, 0x528c85ab00000000, - 0xef85e35900000000, 0xcb5ce43a00000000, 0xa737ec9f00000000, - 0x83eeebfc00000000, 0x99af992600000000, 0xbd769e4500000000, - 0xd11d96e000000000, 0xf5c4918300000000, 0x48cdf77100000000, - 0x6c14f01200000000, 0x007ff8b700000000, 0x24a6ffd400000000, - 0x3b6a458800000000, 0x1fb342eb00000000, 0x73d84a4e00000000, - 0x57014d2d00000000, 0xea082bdf00000000, 0xced12cbc00000000, - 0xa2ba241900000000, 0x8663237a00000000, 0xae7d62ed00000000, - 0x8aa4658e00000000, 0xe6cf6d2b00000000, 0xc2166a4800000000, - 0x7f1f0cba00000000, 0x5bc60bd900000000, 0x37ad037c00000000, - 0x1374041f00000000, 0x0cb8be4300000000, 0x2861b92000000000, - 0x440ab18500000000, 0x60d3b6e600000000, 0xdddad01400000000, - 0xf903d77700000000, 0x9568dfd200000000, 0xb1b1d8b100000000, - 0xabf0aa6b00000000, 0x8f29ad0800000000, 0xe342a5ad00000000, - 0xc79ba2ce00000000, 0x7a92c43c00000000, 0x5e4bc35f00000000, - 0x3220cbfa00000000, 0x16f9cc9900000000, 0x093576c500000000, - 0x2dec71a600000000, 0x4187790300000000, 0x655e7e6000000000, - 0xd857189200000000, 0xfc8e1ff100000000, 0x90e5175400000000, - 0xb43c103700000000, 0xe561823b00000000, 0xc1b8855800000000, - 0xadd38dfd00000000, 0x890a8a9e00000000, 0x3403ec6c00000000, - 0x10daeb0f00000000, 0x7cb1e3aa00000000, 0x5868e4c900000000, - 0x47a45e9500000000, 0x637d59f600000000, 0x0f16515300000000, - 0x2bcf563000000000, 0x96c630c200000000, 0xb21f37a100000000, - 0xde743f0400000000, 0xfaad386700000000, 0xe0ec4abd00000000, - 0xc4354dde00000000, 0xa85e457b00000000, 0x8c87421800000000, - 0x318e24ea00000000, 0x1557238900000000, 0x793c2b2c00000000, - 0x5de52c4f00000000, 0x4229961300000000, 0x66f0917000000000, - 0x0a9b99d500000000, 0x2e429eb600000000, 0x934bf84400000000, - 0xb792ff2700000000, 0xdbf9f78200000000, 0xff20f0e100000000, - 0x7943d39b00000000, 0x5d9ad4f800000000, 0x31f1dc5d00000000, - 0x1528db3e00000000, 0xa821bdcc00000000, 0x8cf8baaf00000000, - 0xe093b20a00000000, 0xc44ab56900000000, 0xdb860f3500000000, - 0xff5f085600000000, 0x933400f300000000, 0xb7ed079000000000, - 0x0ae4616200000000, 0x2e3d660100000000, 0x42566ea400000000, - 0x668f69c700000000, 0x7cce1b1d00000000, 0x58171c7e00000000, - 0x347c14db00000000, 0x10a513b800000000, 0xadac754a00000000, - 0x8975722900000000, 0xe51e7a8c00000000, 0xc1c77def00000000, - 0xde0bc7b300000000, 0xfad2c0d000000000, 0x96b9c87500000000, - 0xb260cf1600000000, 0x0f69a9e400000000, 0x2bb0ae8700000000, - 0x47dba62200000000, 0x6302a14100000000, 0x325f334d00000000, - 0x1686342e00000000, 0x7aed3c8b00000000, 0x5e343be800000000, - 0xe33d5d1a00000000, 0xc7e45a7900000000, 0xab8f52dc00000000, - 0x8f5655bf00000000, 0x909aefe300000000, 0xb443e88000000000, - 0xd828e02500000000, 0xfcf1e74600000000, 0x41f881b400000000, - 0x652186d700000000, 0x094a8e7200000000, 0x2d93891100000000, - 0x37d2fbcb00000000, 0x130bfca800000000, 0x7f60f40d00000000, - 0x5bb9f36e00000000, 0xe6b0959c00000000, 0xc26992ff00000000, - 0xae029a5a00000000, 0x8adb9d3900000000, 0x9517276500000000, - 0xb1ce200600000000, 0xdda528a300000000, 0xf97c2fc000000000, - 0x4475493200000000, 0x60ac4e5100000000, 0x0cc746f400000000, - 0x281e419700000000}, - {0x0000000000000000, 0x08e3603c00000000, 0x10c6c17800000000, - 0x1825a14400000000, 0x208c83f100000000, 0x286fe3cd00000000, - 0x304a428900000000, 0x38a922b500000000, 0x011e763800000000, - 0x09fd160400000000, 0x11d8b74000000000, 0x193bd77c00000000, - 0x2192f5c900000000, 0x297195f500000000, 0x315434b100000000, - 0x39b7548d00000000, 0x023cec7000000000, 0x0adf8c4c00000000, - 0x12fa2d0800000000, 0x1a194d3400000000, 0x22b06f8100000000, - 0x2a530fbd00000000, 0x3276aef900000000, 0x3a95cec500000000, - 0x03229a4800000000, 0x0bc1fa7400000000, 0x13e45b3000000000, - 0x1b073b0c00000000, 0x23ae19b900000000, 0x2b4d798500000000, - 0x3368d8c100000000, 0x3b8bb8fd00000000, 0x0478d8e100000000, - 0x0c9bb8dd00000000, 0x14be199900000000, 0x1c5d79a500000000, - 0x24f45b1000000000, 0x2c173b2c00000000, 0x34329a6800000000, - 0x3cd1fa5400000000, 0x0566aed900000000, 0x0d85cee500000000, - 0x15a06fa100000000, 0x1d430f9d00000000, 0x25ea2d2800000000, - 0x2d094d1400000000, 0x352cec5000000000, 0x3dcf8c6c00000000, - 0x0644349100000000, 0x0ea754ad00000000, 0x1682f5e900000000, - 0x1e6195d500000000, 0x26c8b76000000000, 0x2e2bd75c00000000, - 0x360e761800000000, 0x3eed162400000000, 0x075a42a900000000, - 0x0fb9229500000000, 0x179c83d100000000, 0x1f7fe3ed00000000, - 0x27d6c15800000000, 0x2f35a16400000000, 0x3710002000000000, - 0x3ff3601c00000000, 0x49f6c11800000000, 0x4115a12400000000, - 0x5930006000000000, 0x51d3605c00000000, 0x697a42e900000000, - 0x619922d500000000, 0x79bc839100000000, 0x715fe3ad00000000, - 0x48e8b72000000000, 0x400bd71c00000000, 0x582e765800000000, - 0x50cd166400000000, 0x686434d100000000, 0x608754ed00000000, - 0x78a2f5a900000000, 0x7041959500000000, 0x4bca2d6800000000, - 0x43294d5400000000, 0x5b0cec1000000000, 0x53ef8c2c00000000, - 0x6b46ae9900000000, 0x63a5cea500000000, 0x7b806fe100000000, - 0x73630fdd00000000, 0x4ad45b5000000000, 0x42373b6c00000000, - 0x5a129a2800000000, 0x52f1fa1400000000, 0x6a58d8a100000000, - 0x62bbb89d00000000, 0x7a9e19d900000000, 0x727d79e500000000, - 0x4d8e19f900000000, 0x456d79c500000000, 0x5d48d88100000000, - 0x55abb8bd00000000, 0x6d029a0800000000, 0x65e1fa3400000000, - 0x7dc45b7000000000, 0x75273b4c00000000, 0x4c906fc100000000, - 0x44730ffd00000000, 0x5c56aeb900000000, 0x54b5ce8500000000, - 0x6c1cec3000000000, 0x64ff8c0c00000000, 0x7cda2d4800000000, - 0x74394d7400000000, 0x4fb2f58900000000, 0x475195b500000000, - 0x5f7434f100000000, 0x579754cd00000000, 0x6f3e767800000000, - 0x67dd164400000000, 0x7ff8b70000000000, 0x771bd73c00000000, - 0x4eac83b100000000, 0x464fe38d00000000, 0x5e6a42c900000000, - 0x568922f500000000, 0x6e20004000000000, 0x66c3607c00000000, - 0x7ee6c13800000000, 0x7605a10400000000, 0x92ec833100000000, - 0x9a0fe30d00000000, 0x822a424900000000, 0x8ac9227500000000, - 0xb26000c000000000, 0xba8360fc00000000, 0xa2a6c1b800000000, - 0xaa45a18400000000, 0x93f2f50900000000, 0x9b11953500000000, - 0x8334347100000000, 0x8bd7544d00000000, 0xb37e76f800000000, - 0xbb9d16c400000000, 0xa3b8b78000000000, 0xab5bd7bc00000000, - 0x90d06f4100000000, 0x98330f7d00000000, 0x8016ae3900000000, - 0x88f5ce0500000000, 0xb05cecb000000000, 0xb8bf8c8c00000000, - 0xa09a2dc800000000, 0xa8794df400000000, 0x91ce197900000000, - 0x992d794500000000, 0x8108d80100000000, 0x89ebb83d00000000, - 0xb1429a8800000000, 0xb9a1fab400000000, 0xa1845bf000000000, - 0xa9673bcc00000000, 0x96945bd000000000, 0x9e773bec00000000, - 0x86529aa800000000, 0x8eb1fa9400000000, 0xb618d82100000000, - 0xbefbb81d00000000, 0xa6de195900000000, 0xae3d796500000000, - 0x978a2de800000000, 0x9f694dd400000000, 0x874cec9000000000, - 0x8faf8cac00000000, 0xb706ae1900000000, 0xbfe5ce2500000000, - 0xa7c06f6100000000, 0xaf230f5d00000000, 0x94a8b7a000000000, - 0x9c4bd79c00000000, 0x846e76d800000000, 0x8c8d16e400000000, - 0xb424345100000000, 0xbcc7546d00000000, 0xa4e2f52900000000, - 0xac01951500000000, 0x95b6c19800000000, 0x9d55a1a400000000, - 0x857000e000000000, 0x8d9360dc00000000, 0xb53a426900000000, - 0xbdd9225500000000, 0xa5fc831100000000, 0xad1fe32d00000000, - 0xdb1a422900000000, 0xd3f9221500000000, 0xcbdc835100000000, - 0xc33fe36d00000000, 0xfb96c1d800000000, 0xf375a1e400000000, - 0xeb5000a000000000, 0xe3b3609c00000000, 0xda04341100000000, - 0xd2e7542d00000000, 0xcac2f56900000000, 0xc221955500000000, - 0xfa88b7e000000000, 0xf26bd7dc00000000, 0xea4e769800000000, - 0xe2ad16a400000000, 0xd926ae5900000000, 0xd1c5ce6500000000, - 0xc9e06f2100000000, 0xc1030f1d00000000, 0xf9aa2da800000000, - 0xf1494d9400000000, 0xe96cecd000000000, 0xe18f8cec00000000, - 0xd838d86100000000, 0xd0dbb85d00000000, 0xc8fe191900000000, - 0xc01d792500000000, 0xf8b45b9000000000, 0xf0573bac00000000, - 0xe8729ae800000000, 0xe091fad400000000, 0xdf629ac800000000, - 0xd781faf400000000, 0xcfa45bb000000000, 0xc7473b8c00000000, - 0xffee193900000000, 0xf70d790500000000, 0xef28d84100000000, - 0xe7cbb87d00000000, 0xde7cecf000000000, 0xd69f8ccc00000000, - 0xceba2d8800000000, 0xc6594db400000000, 0xfef06f0100000000, - 0xf6130f3d00000000, 0xee36ae7900000000, 0xe6d5ce4500000000, - 0xdd5e76b800000000, 0xd5bd168400000000, 0xcd98b7c000000000, - 0xc57bd7fc00000000, 0xfdd2f54900000000, 0xf531957500000000, - 0xed14343100000000, 0xe5f7540d00000000, 0xdc40008000000000, - 0xd4a360bc00000000, 0xcc86c1f800000000, 0xc465a1c400000000, - 0xfccc837100000000, 0xf42fe34d00000000, 0xec0a420900000000, - 0xe4e9223500000000}, - {0x0000000000000000, 0xd1e8e70e00000000, 0xa2d1cf1d00000000, - 0x7339281300000000, 0x44a39f3b00000000, 0x954b783500000000, - 0xe672502600000000, 0x379ab72800000000, 0x88463f7700000000, - 0x59aed87900000000, 0x2a97f06a00000000, 0xfb7f176400000000, - 0xcce5a04c00000000, 0x1d0d474200000000, 0x6e346f5100000000, - 0xbfdc885f00000000, 0x108d7eee00000000, 0xc16599e000000000, - 0xb25cb1f300000000, 0x63b456fd00000000, 0x542ee1d500000000, - 0x85c606db00000000, 0xf6ff2ec800000000, 0x2717c9c600000000, - 0x98cb419900000000, 0x4923a69700000000, 0x3a1a8e8400000000, - 0xebf2698a00000000, 0xdc68dea200000000, 0x0d8039ac00000000, - 0x7eb911bf00000000, 0xaf51f6b100000000, 0x611c8c0700000000, - 0xb0f46b0900000000, 0xc3cd431a00000000, 0x1225a41400000000, - 0x25bf133c00000000, 0xf457f43200000000, 0x876edc2100000000, - 0x56863b2f00000000, 0xe95ab37000000000, 0x38b2547e00000000, - 0x4b8b7c6d00000000, 0x9a639b6300000000, 0xadf92c4b00000000, - 0x7c11cb4500000000, 0x0f28e35600000000, 0xdec0045800000000, - 0x7191f2e900000000, 0xa07915e700000000, 0xd3403df400000000, - 0x02a8dafa00000000, 0x35326dd200000000, 0xe4da8adc00000000, - 0x97e3a2cf00000000, 0x460b45c100000000, 0xf9d7cd9e00000000, - 0x283f2a9000000000, 0x5b06028300000000, 0x8aeee58d00000000, - 0xbd7452a500000000, 0x6c9cb5ab00000000, 0x1fa59db800000000, - 0xce4d7ab600000000, 0xc238180f00000000, 0x13d0ff0100000000, - 0x60e9d71200000000, 0xb101301c00000000, 0x869b873400000000, - 0x5773603a00000000, 0x244a482900000000, 0xf5a2af2700000000, - 0x4a7e277800000000, 0x9b96c07600000000, 0xe8afe86500000000, - 0x39470f6b00000000, 0x0eddb84300000000, 0xdf355f4d00000000, - 0xac0c775e00000000, 0x7de4905000000000, 0xd2b566e100000000, - 0x035d81ef00000000, 0x7064a9fc00000000, 0xa18c4ef200000000, - 0x9616f9da00000000, 0x47fe1ed400000000, 0x34c736c700000000, - 0xe52fd1c900000000, 0x5af3599600000000, 0x8b1bbe9800000000, - 0xf822968b00000000, 0x29ca718500000000, 0x1e50c6ad00000000, - 0xcfb821a300000000, 0xbc8109b000000000, 0x6d69eebe00000000, - 0xa324940800000000, 0x72cc730600000000, 0x01f55b1500000000, - 0xd01dbc1b00000000, 0xe7870b3300000000, 0x366fec3d00000000, - 0x4556c42e00000000, 0x94be232000000000, 0x2b62ab7f00000000, - 0xfa8a4c7100000000, 0x89b3646200000000, 0x585b836c00000000, - 0x6fc1344400000000, 0xbe29d34a00000000, 0xcd10fb5900000000, - 0x1cf81c5700000000, 0xb3a9eae600000000, 0x62410de800000000, - 0x117825fb00000000, 0xc090c2f500000000, 0xf70a75dd00000000, - 0x26e292d300000000, 0x55dbbac000000000, 0x84335dce00000000, - 0x3befd59100000000, 0xea07329f00000000, 0x993e1a8c00000000, - 0x48d6fd8200000000, 0x7f4c4aaa00000000, 0xaea4ada400000000, - 0xdd9d85b700000000, 0x0c7562b900000000, 0x8471301e00000000, - 0x5599d71000000000, 0x26a0ff0300000000, 0xf748180d00000000, - 0xc0d2af2500000000, 0x113a482b00000000, 0x6203603800000000, - 0xb3eb873600000000, 0x0c370f6900000000, 0xdddfe86700000000, - 0xaee6c07400000000, 0x7f0e277a00000000, 0x4894905200000000, - 0x997c775c00000000, 0xea455f4f00000000, 0x3badb84100000000, - 0x94fc4ef000000000, 0x4514a9fe00000000, 0x362d81ed00000000, - 0xe7c566e300000000, 0xd05fd1cb00000000, 0x01b736c500000000, - 0x728e1ed600000000, 0xa366f9d800000000, 0x1cba718700000000, - 0xcd52968900000000, 0xbe6bbe9a00000000, 0x6f83599400000000, - 0x5819eebc00000000, 0x89f109b200000000, 0xfac821a100000000, - 0x2b20c6af00000000, 0xe56dbc1900000000, 0x34855b1700000000, - 0x47bc730400000000, 0x9654940a00000000, 0xa1ce232200000000, - 0x7026c42c00000000, 0x031fec3f00000000, 0xd2f70b3100000000, - 0x6d2b836e00000000, 0xbcc3646000000000, 0xcffa4c7300000000, - 0x1e12ab7d00000000, 0x29881c5500000000, 0xf860fb5b00000000, - 0x8b59d34800000000, 0x5ab1344600000000, 0xf5e0c2f700000000, - 0x240825f900000000, 0x57310dea00000000, 0x86d9eae400000000, - 0xb1435dcc00000000, 0x60abbac200000000, 0x139292d100000000, - 0xc27a75df00000000, 0x7da6fd8000000000, 0xac4e1a8e00000000, - 0xdf77329d00000000, 0x0e9fd59300000000, 0x390562bb00000000, - 0xe8ed85b500000000, 0x9bd4ada600000000, 0x4a3c4aa800000000, - 0x4649281100000000, 0x97a1cf1f00000000, 0xe498e70c00000000, - 0x3570000200000000, 0x02eab72a00000000, 0xd302502400000000, - 0xa03b783700000000, 0x71d39f3900000000, 0xce0f176600000000, - 0x1fe7f06800000000, 0x6cded87b00000000, 0xbd363f7500000000, - 0x8aac885d00000000, 0x5b446f5300000000, 0x287d474000000000, - 0xf995a04e00000000, 0x56c456ff00000000, 0x872cb1f100000000, - 0xf41599e200000000, 0x25fd7eec00000000, 0x1267c9c400000000, - 0xc38f2eca00000000, 0xb0b606d900000000, 0x615ee1d700000000, - 0xde82698800000000, 0x0f6a8e8600000000, 0x7c53a69500000000, - 0xadbb419b00000000, 0x9a21f6b300000000, 0x4bc911bd00000000, - 0x38f039ae00000000, 0xe918dea000000000, 0x2755a41600000000, - 0xf6bd431800000000, 0x85846b0b00000000, 0x546c8c0500000000, - 0x63f63b2d00000000, 0xb21edc2300000000, 0xc127f43000000000, - 0x10cf133e00000000, 0xaf139b6100000000, 0x7efb7c6f00000000, - 0x0dc2547c00000000, 0xdc2ab37200000000, 0xebb0045a00000000, - 0x3a58e35400000000, 0x4961cb4700000000, 0x98892c4900000000, - 0x37d8daf800000000, 0xe6303df600000000, 0x950915e500000000, - 0x44e1f2eb00000000, 0x737b45c300000000, 0xa293a2cd00000000, - 0xd1aa8ade00000000, 0x00426dd000000000, 0xbf9ee58f00000000, - 0x6e76028100000000, 0x1d4f2a9200000000, 0xcca7cd9c00000000, - 0xfb3d7ab400000000, 0x2ad59dba00000000, 0x59ecb5a900000000, - 0x880452a700000000}, - {0x0000000000000000, 0xaa05daf100000000, 0x150dc53800000000, - 0xbf081fc900000000, 0x2a1a8a7100000000, 0x801f508000000000, - 0x3f174f4900000000, 0x951295b800000000, 0x543414e300000000, - 0xfe31ce1200000000, 0x4139d1db00000000, 0xeb3c0b2a00000000, - 0x7e2e9e9200000000, 0xd42b446300000000, 0x6b235baa00000000, - 0xc126815b00000000, 0xe96e591d00000000, 0x436b83ec00000000, - 0xfc639c2500000000, 0x566646d400000000, 0xc374d36c00000000, - 0x6971099d00000000, 0xd679165400000000, 0x7c7ccca500000000, - 0xbd5a4dfe00000000, 0x175f970f00000000, 0xa85788c600000000, - 0x0252523700000000, 0x9740c78f00000000, 0x3d451d7e00000000, - 0x824d02b700000000, 0x2848d84600000000, 0xd2ddb23a00000000, - 0x78d868cb00000000, 0xc7d0770200000000, 0x6dd5adf300000000, - 0xf8c7384b00000000, 0x52c2e2ba00000000, 0xedcafd7300000000, - 0x47cf278200000000, 0x86e9a6d900000000, 0x2cec7c2800000000, - 0x93e463e100000000, 0x39e1b91000000000, 0xacf32ca800000000, - 0x06f6f65900000000, 0xb9fee99000000000, 0x13fb336100000000, - 0x3bb3eb2700000000, 0x91b631d600000000, 0x2ebe2e1f00000000, - 0x84bbf4ee00000000, 0x11a9615600000000, 0xbbacbba700000000, - 0x04a4a46e00000000, 0xaea17e9f00000000, 0x6f87ffc400000000, - 0xc582253500000000, 0x7a8a3afc00000000, 0xd08fe00d00000000, - 0x459d75b500000000, 0xef98af4400000000, 0x5090b08d00000000, - 0xfa956a7c00000000, 0xa4bb657500000000, 0x0ebebf8400000000, - 0xb1b6a04d00000000, 0x1bb37abc00000000, 0x8ea1ef0400000000, - 0x24a435f500000000, 0x9bac2a3c00000000, 0x31a9f0cd00000000, - 0xf08f719600000000, 0x5a8aab6700000000, 0xe582b4ae00000000, - 0x4f876e5f00000000, 0xda95fbe700000000, 0x7090211600000000, - 0xcf983edf00000000, 0x659de42e00000000, 0x4dd53c6800000000, - 0xe7d0e69900000000, 0x58d8f95000000000, 0xf2dd23a100000000, - 0x67cfb61900000000, 0xcdca6ce800000000, 0x72c2732100000000, - 0xd8c7a9d000000000, 0x19e1288b00000000, 0xb3e4f27a00000000, - 0x0cecedb300000000, 0xa6e9374200000000, 0x33fba2fa00000000, - 0x99fe780b00000000, 0x26f667c200000000, 0x8cf3bd3300000000, - 0x7666d74f00000000, 0xdc630dbe00000000, 0x636b127700000000, - 0xc96ec88600000000, 0x5c7c5d3e00000000, 0xf67987cf00000000, - 0x4971980600000000, 0xe37442f700000000, 0x2252c3ac00000000, - 0x8857195d00000000, 0x375f069400000000, 0x9d5adc6500000000, - 0x084849dd00000000, 0xa24d932c00000000, 0x1d458ce500000000, - 0xb740561400000000, 0x9f088e5200000000, 0x350d54a300000000, - 0x8a054b6a00000000, 0x2000919b00000000, 0xb512042300000000, - 0x1f17ded200000000, 0xa01fc11b00000000, 0x0a1a1bea00000000, - 0xcb3c9ab100000000, 0x6139404000000000, 0xde315f8900000000, - 0x7434857800000000, 0xe12610c000000000, 0x4b23ca3100000000, - 0xf42bd5f800000000, 0x5e2e0f0900000000, 0x4877cbea00000000, - 0xe272111b00000000, 0x5d7a0ed200000000, 0xf77fd42300000000, - 0x626d419b00000000, 0xc8689b6a00000000, 0x776084a300000000, - 0xdd655e5200000000, 0x1c43df0900000000, 0xb64605f800000000, - 0x094e1a3100000000, 0xa34bc0c000000000, 0x3659557800000000, - 0x9c5c8f8900000000, 0x2354904000000000, 0x89514ab100000000, - 0xa11992f700000000, 0x0b1c480600000000, 0xb41457cf00000000, - 0x1e118d3e00000000, 0x8b03188600000000, 0x2106c27700000000, - 0x9e0eddbe00000000, 0x340b074f00000000, 0xf52d861400000000, - 0x5f285ce500000000, 0xe020432c00000000, 0x4a2599dd00000000, - 0xdf370c6500000000, 0x7532d69400000000, 0xca3ac95d00000000, - 0x603f13ac00000000, 0x9aaa79d000000000, 0x30afa32100000000, - 0x8fa7bce800000000, 0x25a2661900000000, 0xb0b0f3a100000000, - 0x1ab5295000000000, 0xa5bd369900000000, 0x0fb8ec6800000000, - 0xce9e6d3300000000, 0x649bb7c200000000, 0xdb93a80b00000000, - 0x719672fa00000000, 0xe484e74200000000, 0x4e813db300000000, - 0xf189227a00000000, 0x5b8cf88b00000000, 0x73c420cd00000000, - 0xd9c1fa3c00000000, 0x66c9e5f500000000, 0xcccc3f0400000000, - 0x59deaabc00000000, 0xf3db704d00000000, 0x4cd36f8400000000, - 0xe6d6b57500000000, 0x27f0342e00000000, 0x8df5eedf00000000, - 0x32fdf11600000000, 0x98f82be700000000, 0x0deabe5f00000000, - 0xa7ef64ae00000000, 0x18e77b6700000000, 0xb2e2a19600000000, - 0xecccae9f00000000, 0x46c9746e00000000, 0xf9c16ba700000000, - 0x53c4b15600000000, 0xc6d624ee00000000, 0x6cd3fe1f00000000, - 0xd3dbe1d600000000, 0x79de3b2700000000, 0xb8f8ba7c00000000, - 0x12fd608d00000000, 0xadf57f4400000000, 0x07f0a5b500000000, - 0x92e2300d00000000, 0x38e7eafc00000000, 0x87eff53500000000, - 0x2dea2fc400000000, 0x05a2f78200000000, 0xafa72d7300000000, - 0x10af32ba00000000, 0xbaaae84b00000000, 0x2fb87df300000000, - 0x85bda70200000000, 0x3ab5b8cb00000000, 0x90b0623a00000000, - 0x5196e36100000000, 0xfb93399000000000, 0x449b265900000000, - 0xee9efca800000000, 0x7b8c691000000000, 0xd189b3e100000000, - 0x6e81ac2800000000, 0xc48476d900000000, 0x3e111ca500000000, - 0x9414c65400000000, 0x2b1cd99d00000000, 0x8119036c00000000, - 0x140b96d400000000, 0xbe0e4c2500000000, 0x010653ec00000000, - 0xab03891d00000000, 0x6a25084600000000, 0xc020d2b700000000, - 0x7f28cd7e00000000, 0xd52d178f00000000, 0x403f823700000000, - 0xea3a58c600000000, 0x5532470f00000000, 0xff379dfe00000000, - 0xd77f45b800000000, 0x7d7a9f4900000000, 0xc272808000000000, - 0x68775a7100000000, 0xfd65cfc900000000, 0x5760153800000000, - 0xe8680af100000000, 0x426dd00000000000, 0x834b515b00000000, - 0x294e8baa00000000, 0x9646946300000000, 0x3c434e9200000000, - 0xa951db2a00000000, 0x035401db00000000, 0xbc5c1e1200000000, - 0x1659c4e300000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, - 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, - 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, - 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, - 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, - 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, - 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, - 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, - 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, - 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, - 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, - 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, - 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, - 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, - 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, - 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, - 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, - 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, - 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, - 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, - 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, - 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, - 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, - 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, - 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, - 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, - 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, - 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, - 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, - 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, - 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, - 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, - 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, - 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, - 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, - 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, - 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, - 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, - 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, - 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, - 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, - 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, - 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, - 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, - 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, - 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, - 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, - 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, - 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, - 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, - 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, - 0x0d7139d7}, - {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, - 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, - 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, - 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, - 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, - 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, - 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, - 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, - 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, - 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, - 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, - 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, - 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, - 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, - 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, - 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, - 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, - 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, - 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, - 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, - 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, - 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, - 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, - 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, - 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, - 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, - 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, - 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, - 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, - 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, - 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, - 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, - 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, - 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, - 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, - 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, - 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, - 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, - 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, - 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, - 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, - 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, - 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, - 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, - 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, - 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, - 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, - 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, - 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, - 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, - 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, - 0x1c53e98a}, - {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, - 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, - 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, - 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, - 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, - 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, - 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, - 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, - 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, - 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, - 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, - 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, - 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, - 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, - 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, - 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, - 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, - 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, - 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, - 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, - 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, - 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, - 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, - 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, - 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, - 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, - 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, - 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, - 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, - 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, - 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, - 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, - 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, - 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, - 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, - 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, - 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, - 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, - 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, - 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, - 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, - 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, - 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, - 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, - 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, - 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, - 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, - 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, - 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, - 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, - 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, - 0x3f88e851}, - {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, - 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, - 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, - 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, - 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, - 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, - 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, - 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, - 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, - 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, - 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, - 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, - 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, - 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, - 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, - 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, - 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, - 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, - 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, - 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, - 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, - 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, - 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, - 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, - 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, - 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, - 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, - 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, - 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, - 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, - 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, - 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, - 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, - 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, - 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, - 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, - 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, - 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, - 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, - 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, - 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, - 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, - 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, - 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, - 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, - 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, - 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, - 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, - 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, - 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, - 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, - 0x3dee8ca6}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x85d996dd, 0x4bb55c60, 0xce6ccabd, 0x966ab9c0, - 0x13b32f1d, 0xdddfe5a0, 0x5806737d, 0x6dd3035a, 0xe80a9587, - 0x26665f3a, 0xa3bfc9e7, 0xfbb9ba9a, 0x7e602c47, 0xb00ce6fa, - 0x35d57027, 0xdaa607b4, 0x5f7f9169, 0x91135bd4, 0x14cacd09, - 0x4cccbe74, 0xc91528a9, 0x0779e214, 0x82a074c9, 0xb77504ee, - 0x32ac9233, 0xfcc0588e, 0x7919ce53, 0x211fbd2e, 0xa4c62bf3, - 0x6aaae14e, 0xef737793, 0xf54b7eb3, 0x7092e86e, 0xbefe22d3, - 0x3b27b40e, 0x6321c773, 0xe6f851ae, 0x28949b13, 0xad4d0dce, - 0x98987de9, 0x1d41eb34, 0xd32d2189, 0x56f4b754, 0x0ef2c429, - 0x8b2b52f4, 0x45479849, 0xc09e0e94, 0x2fed7907, 0xaa34efda, - 0x64582567, 0xe181b3ba, 0xb987c0c7, 0x3c5e561a, 0xf2329ca7, - 0x77eb0a7a, 0x423e7a5d, 0xc7e7ec80, 0x098b263d, 0x8c52b0e0, - 0xd454c39d, 0x518d5540, 0x9fe19ffd, 0x1a380920, 0xab918dbd, - 0x2e481b60, 0xe024d1dd, 0x65fd4700, 0x3dfb347d, 0xb822a2a0, - 0x764e681d, 0xf397fec0, 0xc6428ee7, 0x439b183a, 0x8df7d287, - 0x082e445a, 0x50283727, 0xd5f1a1fa, 0x1b9d6b47, 0x9e44fd9a, - 0x71378a09, 0xf4ee1cd4, 0x3a82d669, 0xbf5b40b4, 0xe75d33c9, - 0x6284a514, 0xace86fa9, 0x2931f974, 0x1ce48953, 0x993d1f8e, - 0x5751d533, 0xd28843ee, 0x8a8e3093, 0x0f57a64e, 0xc13b6cf3, - 0x44e2fa2e, 0x5edaf30e, 0xdb0365d3, 0x156faf6e, 0x90b639b3, - 0xc8b04ace, 0x4d69dc13, 0x830516ae, 0x06dc8073, 0x3309f054, - 0xb6d06689, 0x78bcac34, 0xfd653ae9, 0xa5634994, 0x20badf49, - 0xeed615f4, 0x6b0f8329, 0x847cf4ba, 0x01a56267, 0xcfc9a8da, - 0x4a103e07, 0x12164d7a, 0x97cfdba7, 0x59a3111a, 0xdc7a87c7, - 0xe9aff7e0, 0x6c76613d, 0xa21aab80, 0x27c33d5d, 0x7fc54e20, - 0xfa1cd8fd, 0x34701240, 0xb1a9849d, 0x17256aa0, 0x92fcfc7d, - 0x5c9036c0, 0xd949a01d, 0x814fd360, 0x049645bd, 0xcafa8f00, - 0x4f2319dd, 0x7af669fa, 0xff2fff27, 0x3143359a, 0xb49aa347, - 0xec9cd03a, 0x694546e7, 0xa7298c5a, 0x22f01a87, 0xcd836d14, - 0x485afbc9, 0x86363174, 0x03efa7a9, 0x5be9d4d4, 0xde304209, - 0x105c88b4, 0x95851e69, 0xa0506e4e, 0x2589f893, 0xebe5322e, - 0x6e3ca4f3, 0x363ad78e, 0xb3e34153, 0x7d8f8bee, 0xf8561d33, - 0xe26e1413, 0x67b782ce, 0xa9db4873, 0x2c02deae, 0x7404add3, - 0xf1dd3b0e, 0x3fb1f1b3, 0xba68676e, 0x8fbd1749, 0x0a648194, - 0xc4084b29, 0x41d1ddf4, 0x19d7ae89, 0x9c0e3854, 0x5262f2e9, - 0xd7bb6434, 0x38c813a7, 0xbd11857a, 0x737d4fc7, 0xf6a4d91a, - 0xaea2aa67, 0x2b7b3cba, 0xe517f607, 0x60ce60da, 0x551b10fd, - 0xd0c28620, 0x1eae4c9d, 0x9b77da40, 0xc371a93d, 0x46a83fe0, - 0x88c4f55d, 0x0d1d6380, 0xbcb4e71d, 0x396d71c0, 0xf701bb7d, - 0x72d82da0, 0x2ade5edd, 0xaf07c800, 0x616b02bd, 0xe4b29460, - 0xd167e447, 0x54be729a, 0x9ad2b827, 0x1f0b2efa, 0x470d5d87, - 0xc2d4cb5a, 0x0cb801e7, 0x8961973a, 0x6612e0a9, 0xe3cb7674, - 0x2da7bcc9, 0xa87e2a14, 0xf0785969, 0x75a1cfb4, 0xbbcd0509, - 0x3e1493d4, 0x0bc1e3f3, 0x8e18752e, 0x4074bf93, 0xc5ad294e, - 0x9dab5a33, 0x1872ccee, 0xd61e0653, 0x53c7908e, 0x49ff99ae, - 0xcc260f73, 0x024ac5ce, 0x87935313, 0xdf95206e, 0x5a4cb6b3, - 0x94207c0e, 0x11f9ead3, 0x242c9af4, 0xa1f50c29, 0x6f99c694, - 0xea405049, 0xb2462334, 0x379fb5e9, 0xf9f37f54, 0x7c2ae989, - 0x93599e1a, 0x168008c7, 0xd8ecc27a, 0x5d3554a7, 0x053327da, - 0x80eab107, 0x4e867bba, 0xcb5fed67, 0xfe8a9d40, 0x7b530b9d, - 0xb53fc120, 0x30e657fd, 0x68e02480, 0xed39b25d, 0x235578e0, - 0xa68cee3d}, - {0x00000000, 0x76e10f9d, 0xadc46ee1, 0xdb25617c, 0x1b8fac19, - 0x6d6ea384, 0xb64bc2f8, 0xc0aacd65, 0x361e5933, 0x40ff56ae, - 0x9bda37d2, 0xed3b384f, 0x2d91f52a, 0x5b70fab7, 0x80559bcb, - 0xf6b49456, 0x6c3cb266, 0x1addbdfb, 0xc1f8dc87, 0xb719d31a, - 0x77b31e7f, 0x015211e2, 0xda77709e, 0xac967f03, 0x5a22eb55, - 0x2cc3e4c8, 0xf7e685b4, 0x81078a29, 0x41ad474c, 0x374c48d1, - 0xec6929ad, 0x9a882630, 0xd87864cd, 0xae996b50, 0x75bc0a2c, - 0x035d05b1, 0xc3f7c8d4, 0xb516c749, 0x6e33a635, 0x18d2a9a8, - 0xee663dfe, 0x98873263, 0x43a2531f, 0x35435c82, 0xf5e991e7, - 0x83089e7a, 0x582dff06, 0x2eccf09b, 0xb444d6ab, 0xc2a5d936, - 0x1980b84a, 0x6f61b7d7, 0xafcb7ab2, 0xd92a752f, 0x020f1453, - 0x74ee1bce, 0x825a8f98, 0xf4bb8005, 0x2f9ee179, 0x597feee4, - 0x99d52381, 0xef342c1c, 0x34114d60, 0x42f042fd, 0xf1f7b941, - 0x8716b6dc, 0x5c33d7a0, 0x2ad2d83d, 0xea781558, 0x9c991ac5, - 0x47bc7bb9, 0x315d7424, 0xc7e9e072, 0xb108efef, 0x6a2d8e93, - 0x1ccc810e, 0xdc664c6b, 0xaa8743f6, 0x71a2228a, 0x07432d17, - 0x9dcb0b27, 0xeb2a04ba, 0x300f65c6, 0x46ee6a5b, 0x8644a73e, - 0xf0a5a8a3, 0x2b80c9df, 0x5d61c642, 0xabd55214, 0xdd345d89, - 0x06113cf5, 0x70f03368, 0xb05afe0d, 0xc6bbf190, 0x1d9e90ec, - 0x6b7f9f71, 0x298fdd8c, 0x5f6ed211, 0x844bb36d, 0xf2aabcf0, - 0x32007195, 0x44e17e08, 0x9fc41f74, 0xe92510e9, 0x1f9184bf, - 0x69708b22, 0xb255ea5e, 0xc4b4e5c3, 0x041e28a6, 0x72ff273b, - 0xa9da4647, 0xdf3b49da, 0x45b36fea, 0x33526077, 0xe877010b, - 0x9e960e96, 0x5e3cc3f3, 0x28ddcc6e, 0xf3f8ad12, 0x8519a28f, - 0x73ad36d9, 0x054c3944, 0xde695838, 0xa88857a5, 0x68229ac0, - 0x1ec3955d, 0xc5e6f421, 0xb307fbbc, 0xe2ef7383, 0x940e7c1e, - 0x4f2b1d62, 0x39ca12ff, 0xf960df9a, 0x8f81d007, 0x54a4b17b, - 0x2245bee6, 0xd4f12ab0, 0xa210252d, 0x79354451, 0x0fd44bcc, - 0xcf7e86a9, 0xb99f8934, 0x62bae848, 0x145be7d5, 0x8ed3c1e5, - 0xf832ce78, 0x2317af04, 0x55f6a099, 0x955c6dfc, 0xe3bd6261, - 0x3898031d, 0x4e790c80, 0xb8cd98d6, 0xce2c974b, 0x1509f637, - 0x63e8f9aa, 0xa34234cf, 0xd5a33b52, 0x0e865a2e, 0x786755b3, - 0x3a97174e, 0x4c7618d3, 0x975379af, 0xe1b27632, 0x2118bb57, - 0x57f9b4ca, 0x8cdcd5b6, 0xfa3dda2b, 0x0c894e7d, 0x7a6841e0, - 0xa14d209c, 0xd7ac2f01, 0x1706e264, 0x61e7edf9, 0xbac28c85, - 0xcc238318, 0x56aba528, 0x204aaab5, 0xfb6fcbc9, 0x8d8ec454, - 0x4d240931, 0x3bc506ac, 0xe0e067d0, 0x9601684d, 0x60b5fc1b, - 0x1654f386, 0xcd7192fa, 0xbb909d67, 0x7b3a5002, 0x0ddb5f9f, - 0xd6fe3ee3, 0xa01f317e, 0x1318cac2, 0x65f9c55f, 0xbedca423, - 0xc83dabbe, 0x089766db, 0x7e766946, 0xa553083a, 0xd3b207a7, - 0x250693f1, 0x53e79c6c, 0x88c2fd10, 0xfe23f28d, 0x3e893fe8, - 0x48683075, 0x934d5109, 0xe5ac5e94, 0x7f2478a4, 0x09c57739, - 0xd2e01645, 0xa40119d8, 0x64abd4bd, 0x124adb20, 0xc96fba5c, - 0xbf8eb5c1, 0x493a2197, 0x3fdb2e0a, 0xe4fe4f76, 0x921f40eb, - 0x52b58d8e, 0x24548213, 0xff71e36f, 0x8990ecf2, 0xcb60ae0f, - 0xbd81a192, 0x66a4c0ee, 0x1045cf73, 0xd0ef0216, 0xa60e0d8b, - 0x7d2b6cf7, 0x0bca636a, 0xfd7ef73c, 0x8b9ff8a1, 0x50ba99dd, - 0x265b9640, 0xe6f15b25, 0x901054b8, 0x4b3535c4, 0x3dd43a59, - 0xa75c1c69, 0xd1bd13f4, 0x0a987288, 0x7c797d15, 0xbcd3b070, - 0xca32bfed, 0x1117de91, 0x67f6d10c, 0x9142455a, 0xe7a34ac7, - 0x3c862bbb, 0x4a672426, 0x8acde943, 0xfc2ce6de, 0x270987a2, - 0x51e8883f}, - {0x00000000, 0xe8dbfbb9, 0x91b186a8, 0x796a7d11, 0x63657c8a, - 0x8bbe8733, 0xf2d4fa22, 0x1a0f019b, 0x87cc89cf, 0x6f177276, - 0x167d0f67, 0xfea6f4de, 0xe4a9f545, 0x0c720efc, 0x751873ed, - 0x9dc38854, 0x4f9f6244, 0xa74499fd, 0xde2ee4ec, 0x36f51f55, - 0x2cfa1ece, 0xc421e577, 0xbd4b9866, 0x559063df, 0xc853eb8b, - 0x20881032, 0x59e26d23, 0xb139969a, 0xab369701, 0x43ed6cb8, - 0x3a8711a9, 0xd25cea10, 0x9e3ec588, 0x76e53e31, 0x0f8f4320, - 0xe754b899, 0xfd5bb902, 0x158042bb, 0x6cea3faa, 0x8431c413, - 0x19f24c47, 0xf129b7fe, 0x8843caef, 0x60983156, 0x7a9730cd, - 0x924ccb74, 0xeb26b665, 0x03fd4ddc, 0xd1a1a7cc, 0x397a5c75, - 0x40102164, 0xa8cbdadd, 0xb2c4db46, 0x5a1f20ff, 0x23755dee, - 0xcbaea657, 0x566d2e03, 0xbeb6d5ba, 0xc7dca8ab, 0x2f075312, - 0x35085289, 0xddd3a930, 0xa4b9d421, 0x4c622f98, 0x7d7bfbca, - 0x95a00073, 0xecca7d62, 0x041186db, 0x1e1e8740, 0xf6c57cf9, - 0x8faf01e8, 0x6774fa51, 0xfab77205, 0x126c89bc, 0x6b06f4ad, - 0x83dd0f14, 0x99d20e8f, 0x7109f536, 0x08638827, 0xe0b8739e, - 0x32e4998e, 0xda3f6237, 0xa3551f26, 0x4b8ee49f, 0x5181e504, - 0xb95a1ebd, 0xc03063ac, 0x28eb9815, 0xb5281041, 0x5df3ebf8, - 0x249996e9, 0xcc426d50, 0xd64d6ccb, 0x3e969772, 0x47fcea63, - 0xaf2711da, 0xe3453e42, 0x0b9ec5fb, 0x72f4b8ea, 0x9a2f4353, - 0x802042c8, 0x68fbb971, 0x1191c460, 0xf94a3fd9, 0x6489b78d, - 0x8c524c34, 0xf5383125, 0x1de3ca9c, 0x07eccb07, 0xef3730be, - 0x965d4daf, 0x7e86b616, 0xacda5c06, 0x4401a7bf, 0x3d6bdaae, - 0xd5b02117, 0xcfbf208c, 0x2764db35, 0x5e0ea624, 0xb6d55d9d, - 0x2b16d5c9, 0xc3cd2e70, 0xbaa75361, 0x527ca8d8, 0x4873a943, - 0xa0a852fa, 0xd9c22feb, 0x3119d452, 0xbbf0874e, 0x532b7cf7, - 0x2a4101e6, 0xc29afa5f, 0xd895fbc4, 0x304e007d, 0x49247d6c, - 0xa1ff86d5, 0x3c3c0e81, 0xd4e7f538, 0xad8d8829, 0x45567390, - 0x5f59720b, 0xb78289b2, 0xcee8f4a3, 0x26330f1a, 0xf46fe50a, - 0x1cb41eb3, 0x65de63a2, 0x8d05981b, 0x970a9980, 0x7fd16239, - 0x06bb1f28, 0xee60e491, 0x73a36cc5, 0x9b78977c, 0xe212ea6d, - 0x0ac911d4, 0x10c6104f, 0xf81debf6, 0x817796e7, 0x69ac6d5e, - 0x25ce42c6, 0xcd15b97f, 0xb47fc46e, 0x5ca43fd7, 0x46ab3e4c, - 0xae70c5f5, 0xd71ab8e4, 0x3fc1435d, 0xa202cb09, 0x4ad930b0, - 0x33b34da1, 0xdb68b618, 0xc167b783, 0x29bc4c3a, 0x50d6312b, - 0xb80dca92, 0x6a512082, 0x828adb3b, 0xfbe0a62a, 0x133b5d93, - 0x09345c08, 0xe1efa7b1, 0x9885daa0, 0x705e2119, 0xed9da94d, - 0x054652f4, 0x7c2c2fe5, 0x94f7d45c, 0x8ef8d5c7, 0x66232e7e, - 0x1f49536f, 0xf792a8d6, 0xc68b7c84, 0x2e50873d, 0x573afa2c, - 0xbfe10195, 0xa5ee000e, 0x4d35fbb7, 0x345f86a6, 0xdc847d1f, - 0x4147f54b, 0xa99c0ef2, 0xd0f673e3, 0x382d885a, 0x222289c1, - 0xcaf97278, 0xb3930f69, 0x5b48f4d0, 0x89141ec0, 0x61cfe579, - 0x18a59868, 0xf07e63d1, 0xea71624a, 0x02aa99f3, 0x7bc0e4e2, - 0x931b1f5b, 0x0ed8970f, 0xe6036cb6, 0x9f6911a7, 0x77b2ea1e, - 0x6dbdeb85, 0x8566103c, 0xfc0c6d2d, 0x14d79694, 0x58b5b90c, - 0xb06e42b5, 0xc9043fa4, 0x21dfc41d, 0x3bd0c586, 0xd30b3e3f, - 0xaa61432e, 0x42bab897, 0xdf7930c3, 0x37a2cb7a, 0x4ec8b66b, - 0xa6134dd2, 0xbc1c4c49, 0x54c7b7f0, 0x2dadcae1, 0xc5763158, - 0x172adb48, 0xfff120f1, 0x869b5de0, 0x6e40a659, 0x744fa7c2, - 0x9c945c7b, 0xe5fe216a, 0x0d25dad3, 0x90e65287, 0x783da93e, - 0x0157d42f, 0xe98c2f96, 0xf3832e0d, 0x1b58d5b4, 0x6232a8a5, - 0x8ae9531c}, - {0x00000000, 0x919168ae, 0x6325a087, 0xf2b4c829, 0x874c31d4, - 0x16dd597a, 0xe4699153, 0x75f8f9fd, 0x4f9f1373, 0xde0e7bdd, - 0x2cbab3f4, 0xbd2bdb5a, 0xc8d322a7, 0x59424a09, 0xabf68220, - 0x3a67ea8e, 0x9e3e27e6, 0x0faf4f48, 0xfd1b8761, 0x6c8aefcf, - 0x19721632, 0x88e37e9c, 0x7a57b6b5, 0xebc6de1b, 0xd1a13495, - 0x40305c3b, 0xb2849412, 0x2315fcbc, 0x56ed0541, 0xc77c6def, - 0x35c8a5c6, 0xa459cd68, 0x7d7b3f17, 0xecea57b9, 0x1e5e9f90, - 0x8fcff73e, 0xfa370ec3, 0x6ba6666d, 0x9912ae44, 0x0883c6ea, - 0x32e42c64, 0xa37544ca, 0x51c18ce3, 0xc050e44d, 0xb5a81db0, - 0x2439751e, 0xd68dbd37, 0x471cd599, 0xe34518f1, 0x72d4705f, - 0x8060b876, 0x11f1d0d8, 0x64092925, 0xf598418b, 0x072c89a2, - 0x96bde10c, 0xacda0b82, 0x3d4b632c, 0xcfffab05, 0x5e6ec3ab, - 0x2b963a56, 0xba0752f8, 0x48b39ad1, 0xd922f27f, 0xfaf67e2e, - 0x6b671680, 0x99d3dea9, 0x0842b607, 0x7dba4ffa, 0xec2b2754, - 0x1e9fef7d, 0x8f0e87d3, 0xb5696d5d, 0x24f805f3, 0xd64ccdda, - 0x47dda574, 0x32255c89, 0xa3b43427, 0x5100fc0e, 0xc09194a0, - 0x64c859c8, 0xf5593166, 0x07edf94f, 0x967c91e1, 0xe384681c, - 0x721500b2, 0x80a1c89b, 0x1130a035, 0x2b574abb, 0xbac62215, - 0x4872ea3c, 0xd9e38292, 0xac1b7b6f, 0x3d8a13c1, 0xcf3edbe8, - 0x5eafb346, 0x878d4139, 0x161c2997, 0xe4a8e1be, 0x75398910, - 0x00c170ed, 0x91501843, 0x63e4d06a, 0xf275b8c4, 0xc812524a, - 0x59833ae4, 0xab37f2cd, 0x3aa69a63, 0x4f5e639e, 0xdecf0b30, - 0x2c7bc319, 0xbdeaabb7, 0x19b366df, 0x88220e71, 0x7a96c658, - 0xeb07aef6, 0x9eff570b, 0x0f6e3fa5, 0xfddaf78c, 0x6c4b9f22, - 0x562c75ac, 0xc7bd1d02, 0x3509d52b, 0xa498bd85, 0xd1604478, - 0x40f12cd6, 0xb245e4ff, 0x23d48c51, 0xf4edfd5c, 0x657c95f2, - 0x97c85ddb, 0x06593575, 0x73a1cc88, 0xe230a426, 0x10846c0f, - 0x811504a1, 0xbb72ee2f, 0x2ae38681, 0xd8574ea8, 0x49c62606, - 0x3c3edffb, 0xadafb755, 0x5f1b7f7c, 0xce8a17d2, 0x6ad3daba, - 0xfb42b214, 0x09f67a3d, 0x98671293, 0xed9feb6e, 0x7c0e83c0, - 0x8eba4be9, 0x1f2b2347, 0x254cc9c9, 0xb4dda167, 0x4669694e, - 0xd7f801e0, 0xa200f81d, 0x339190b3, 0xc125589a, 0x50b43034, - 0x8996c24b, 0x1807aae5, 0xeab362cc, 0x7b220a62, 0x0edaf39f, - 0x9f4b9b31, 0x6dff5318, 0xfc6e3bb6, 0xc609d138, 0x5798b996, - 0xa52c71bf, 0x34bd1911, 0x4145e0ec, 0xd0d48842, 0x2260406b, - 0xb3f128c5, 0x17a8e5ad, 0x86398d03, 0x748d452a, 0xe51c2d84, - 0x90e4d479, 0x0175bcd7, 0xf3c174fe, 0x62501c50, 0x5837f6de, - 0xc9a69e70, 0x3b125659, 0xaa833ef7, 0xdf7bc70a, 0x4eeaafa4, - 0xbc5e678d, 0x2dcf0f23, 0x0e1b8372, 0x9f8aebdc, 0x6d3e23f5, - 0xfcaf4b5b, 0x8957b2a6, 0x18c6da08, 0xea721221, 0x7be37a8f, - 0x41849001, 0xd015f8af, 0x22a13086, 0xb3305828, 0xc6c8a1d5, - 0x5759c97b, 0xa5ed0152, 0x347c69fc, 0x9025a494, 0x01b4cc3a, - 0xf3000413, 0x62916cbd, 0x17699540, 0x86f8fdee, 0x744c35c7, - 0xe5dd5d69, 0xdfbab7e7, 0x4e2bdf49, 0xbc9f1760, 0x2d0e7fce, - 0x58f68633, 0xc967ee9d, 0x3bd326b4, 0xaa424e1a, 0x7360bc65, - 0xe2f1d4cb, 0x10451ce2, 0x81d4744c, 0xf42c8db1, 0x65bde51f, - 0x97092d36, 0x06984598, 0x3cffaf16, 0xad6ec7b8, 0x5fda0f91, - 0xce4b673f, 0xbbb39ec2, 0x2a22f66c, 0xd8963e45, 0x490756eb, - 0xed5e9b83, 0x7ccff32d, 0x8e7b3b04, 0x1fea53aa, 0x6a12aa57, - 0xfb83c2f9, 0x09370ad0, 0x98a6627e, 0xa2c188f0, 0x3350e05e, - 0xc1e42877, 0x507540d9, 0x258db924, 0xb41cd18a, 0x46a819a3, - 0xd739710d}}; - -#endif - -#endif - -#if N == 5 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0xaf449247, 0x85f822cf, 0x2abcb088, 0xd08143df, - 0x7fc5d198, 0x55796110, 0xfa3df357, 0x7a7381ff, 0xd53713b8, - 0xff8ba330, 0x50cf3177, 0xaaf2c220, 0x05b65067, 0x2f0ae0ef, - 0x804e72a8, 0xf4e703fe, 0x5ba391b9, 0x711f2131, 0xde5bb376, - 0x24664021, 0x8b22d266, 0xa19e62ee, 0x0edaf0a9, 0x8e948201, - 0x21d01046, 0x0b6ca0ce, 0xa4283289, 0x5e15c1de, 0xf1515399, - 0xdbede311, 0x74a97156, 0x32bf01bd, 0x9dfb93fa, 0xb7472372, - 0x1803b135, 0xe23e4262, 0x4d7ad025, 0x67c660ad, 0xc882f2ea, - 0x48cc8042, 0xe7881205, 0xcd34a28d, 0x627030ca, 0x984dc39d, - 0x370951da, 0x1db5e152, 0xb2f17315, 0xc6580243, 0x691c9004, - 0x43a0208c, 0xece4b2cb, 0x16d9419c, 0xb99dd3db, 0x93216353, - 0x3c65f114, 0xbc2b83bc, 0x136f11fb, 0x39d3a173, 0x96973334, - 0x6caac063, 0xc3ee5224, 0xe952e2ac, 0x461670eb, 0x657e037a, - 0xca3a913d, 0xe08621b5, 0x4fc2b3f2, 0xb5ff40a5, 0x1abbd2e2, - 0x3007626a, 0x9f43f02d, 0x1f0d8285, 0xb04910c2, 0x9af5a04a, - 0x35b1320d, 0xcf8cc15a, 0x60c8531d, 0x4a74e395, 0xe53071d2, - 0x91990084, 0x3edd92c3, 0x1461224b, 0xbb25b00c, 0x4118435b, - 0xee5cd11c, 0xc4e06194, 0x6ba4f3d3, 0xebea817b, 0x44ae133c, - 0x6e12a3b4, 0xc15631f3, 0x3b6bc2a4, 0x942f50e3, 0xbe93e06b, - 0x11d7722c, 0x57c102c7, 0xf8859080, 0xd2392008, 0x7d7db24f, - 0x87404118, 0x2804d35f, 0x02b863d7, 0xadfcf190, 0x2db28338, - 0x82f6117f, 0xa84aa1f7, 0x070e33b0, 0xfd33c0e7, 0x527752a0, - 0x78cbe228, 0xd78f706f, 0xa3260139, 0x0c62937e, 0x26de23f6, - 0x899ab1b1, 0x73a742e6, 0xdce3d0a1, 0xf65f6029, 0x591bf26e, - 0xd95580c6, 0x76111281, 0x5cada209, 0xf3e9304e, 0x09d4c319, - 0xa690515e, 0x8c2ce1d6, 0x23687391, 0xcafc06f4, 0x65b894b3, - 0x4f04243b, 0xe040b67c, 0x1a7d452b, 0xb539d76c, 0x9f8567e4, - 0x30c1f5a3, 0xb08f870b, 0x1fcb154c, 0x3577a5c4, 0x9a333783, - 0x600ec4d4, 0xcf4a5693, 0xe5f6e61b, 0x4ab2745c, 0x3e1b050a, - 0x915f974d, 0xbbe327c5, 0x14a7b582, 0xee9a46d5, 0x41ded492, - 0x6b62641a, 0xc426f65d, 0x446884f5, 0xeb2c16b2, 0xc190a63a, - 0x6ed4347d, 0x94e9c72a, 0x3bad556d, 0x1111e5e5, 0xbe5577a2, - 0xf8430749, 0x5707950e, 0x7dbb2586, 0xd2ffb7c1, 0x28c24496, - 0x8786d6d1, 0xad3a6659, 0x027ef41e, 0x823086b6, 0x2d7414f1, - 0x07c8a479, 0xa88c363e, 0x52b1c569, 0xfdf5572e, 0xd749e7a6, - 0x780d75e1, 0x0ca404b7, 0xa3e096f0, 0x895c2678, 0x2618b43f, - 0xdc254768, 0x7361d52f, 0x59dd65a7, 0xf699f7e0, 0x76d78548, - 0xd993170f, 0xf32fa787, 0x5c6b35c0, 0xa656c697, 0x091254d0, - 0x23aee458, 0x8cea761f, 0xaf82058e, 0x00c697c9, 0x2a7a2741, - 0x853eb506, 0x7f034651, 0xd047d416, 0xfafb649e, 0x55bff6d9, - 0xd5f18471, 0x7ab51636, 0x5009a6be, 0xff4d34f9, 0x0570c7ae, - 0xaa3455e9, 0x8088e561, 0x2fcc7726, 0x5b650670, 0xf4219437, - 0xde9d24bf, 0x71d9b6f8, 0x8be445af, 0x24a0d7e8, 0x0e1c6760, - 0xa158f527, 0x2116878f, 0x8e5215c8, 0xa4eea540, 0x0baa3707, - 0xf197c450, 0x5ed35617, 0x746fe69f, 0xdb2b74d8, 0x9d3d0433, - 0x32799674, 0x18c526fc, 0xb781b4bb, 0x4dbc47ec, 0xe2f8d5ab, - 0xc8446523, 0x6700f764, 0xe74e85cc, 0x480a178b, 0x62b6a703, - 0xcdf23544, 0x37cfc613, 0x988b5454, 0xb237e4dc, 0x1d73769b, - 0x69da07cd, 0xc69e958a, 0xec222502, 0x4366b745, 0xb95b4412, - 0x161fd655, 0x3ca366dd, 0x93e7f49a, 0x13a98632, 0xbced1475, - 0x9651a4fd, 0x391536ba, 0xc328c5ed, 0x6c6c57aa, 0x46d0e722, - 0xe9947565}, - {0x00000000, 0x4e890ba9, 0x9d121752, 0xd39b1cfb, 0xe15528e5, - 0xafdc234c, 0x7c473fb7, 0x32ce341e, 0x19db578b, 0x57525c22, - 0x84c940d9, 0xca404b70, 0xf88e7f6e, 0xb60774c7, 0x659c683c, - 0x2b156395, 0x33b6af16, 0x7d3fa4bf, 0xaea4b844, 0xe02db3ed, - 0xd2e387f3, 0x9c6a8c5a, 0x4ff190a1, 0x01789b08, 0x2a6df89d, - 0x64e4f334, 0xb77fefcf, 0xf9f6e466, 0xcb38d078, 0x85b1dbd1, - 0x562ac72a, 0x18a3cc83, 0x676d5e2c, 0x29e45585, 0xfa7f497e, - 0xb4f642d7, 0x863876c9, 0xc8b17d60, 0x1b2a619b, 0x55a36a32, - 0x7eb609a7, 0x303f020e, 0xe3a41ef5, 0xad2d155c, 0x9fe32142, - 0xd16a2aeb, 0x02f13610, 0x4c783db9, 0x54dbf13a, 0x1a52fa93, - 0xc9c9e668, 0x8740edc1, 0xb58ed9df, 0xfb07d276, 0x289cce8d, - 0x6615c524, 0x4d00a6b1, 0x0389ad18, 0xd012b1e3, 0x9e9bba4a, - 0xac558e54, 0xe2dc85fd, 0x31479906, 0x7fce92af, 0xcedabc58, - 0x8053b7f1, 0x53c8ab0a, 0x1d41a0a3, 0x2f8f94bd, 0x61069f14, - 0xb29d83ef, 0xfc148846, 0xd701ebd3, 0x9988e07a, 0x4a13fc81, - 0x049af728, 0x3654c336, 0x78ddc89f, 0xab46d464, 0xe5cfdfcd, - 0xfd6c134e, 0xb3e518e7, 0x607e041c, 0x2ef70fb5, 0x1c393bab, - 0x52b03002, 0x812b2cf9, 0xcfa22750, 0xe4b744c5, 0xaa3e4f6c, - 0x79a55397, 0x372c583e, 0x05e26c20, 0x4b6b6789, 0x98f07b72, - 0xd67970db, 0xa9b7e274, 0xe73ee9dd, 0x34a5f526, 0x7a2cfe8f, - 0x48e2ca91, 0x066bc138, 0xd5f0ddc3, 0x9b79d66a, 0xb06cb5ff, - 0xfee5be56, 0x2d7ea2ad, 0x63f7a904, 0x51399d1a, 0x1fb096b3, - 0xcc2b8a48, 0x82a281e1, 0x9a014d62, 0xd48846cb, 0x07135a30, - 0x499a5199, 0x7b546587, 0x35dd6e2e, 0xe64672d5, 0xa8cf797c, - 0x83da1ae9, 0xcd531140, 0x1ec80dbb, 0x50410612, 0x628f320c, - 0x2c0639a5, 0xff9d255e, 0xb1142ef7, 0x46c47ef1, 0x084d7558, - 0xdbd669a3, 0x955f620a, 0xa7915614, 0xe9185dbd, 0x3a834146, - 0x740a4aef, 0x5f1f297a, 0x119622d3, 0xc20d3e28, 0x8c843581, - 0xbe4a019f, 0xf0c30a36, 0x235816cd, 0x6dd11d64, 0x7572d1e7, - 0x3bfbda4e, 0xe860c6b5, 0xa6e9cd1c, 0x9427f902, 0xdaaef2ab, - 0x0935ee50, 0x47bce5f9, 0x6ca9866c, 0x22208dc5, 0xf1bb913e, - 0xbf329a97, 0x8dfcae89, 0xc375a520, 0x10eeb9db, 0x5e67b272, - 0x21a920dd, 0x6f202b74, 0xbcbb378f, 0xf2323c26, 0xc0fc0838, - 0x8e750391, 0x5dee1f6a, 0x136714c3, 0x38727756, 0x76fb7cff, - 0xa5606004, 0xebe96bad, 0xd9275fb3, 0x97ae541a, 0x443548e1, - 0x0abc4348, 0x121f8fcb, 0x5c968462, 0x8f0d9899, 0xc1849330, - 0xf34aa72e, 0xbdc3ac87, 0x6e58b07c, 0x20d1bbd5, 0x0bc4d840, - 0x454dd3e9, 0x96d6cf12, 0xd85fc4bb, 0xea91f0a5, 0xa418fb0c, - 0x7783e7f7, 0x390aec5e, 0x881ec2a9, 0xc697c900, 0x150cd5fb, - 0x5b85de52, 0x694bea4c, 0x27c2e1e5, 0xf459fd1e, 0xbad0f6b7, - 0x91c59522, 0xdf4c9e8b, 0x0cd78270, 0x425e89d9, 0x7090bdc7, - 0x3e19b66e, 0xed82aa95, 0xa30ba13c, 0xbba86dbf, 0xf5216616, - 0x26ba7aed, 0x68337144, 0x5afd455a, 0x14744ef3, 0xc7ef5208, - 0x896659a1, 0xa2733a34, 0xecfa319d, 0x3f612d66, 0x71e826cf, - 0x432612d1, 0x0daf1978, 0xde340583, 0x90bd0e2a, 0xef739c85, - 0xa1fa972c, 0x72618bd7, 0x3ce8807e, 0x0e26b460, 0x40afbfc9, - 0x9334a332, 0xddbda89b, 0xf6a8cb0e, 0xb821c0a7, 0x6bbadc5c, - 0x2533d7f5, 0x17fde3eb, 0x5974e842, 0x8aeff4b9, 0xc466ff10, - 0xdcc53393, 0x924c383a, 0x41d724c1, 0x0f5e2f68, 0x3d901b76, - 0x731910df, 0xa0820c24, 0xee0b078d, 0xc51e6418, 0x8b976fb1, - 0x580c734a, 0x168578e3, 0x244b4cfd, 0x6ac24754, 0xb9595baf, - 0xf7d05006}, - {0x00000000, 0x8d88fde2, 0xc060fd85, 0x4de80067, 0x5bb0fd4b, - 0xd63800a9, 0x9bd000ce, 0x1658fd2c, 0xb761fa96, 0x3ae90774, - 0x77010713, 0xfa89faf1, 0xecd107dd, 0x6159fa3f, 0x2cb1fa58, - 0xa13907ba, 0xb5b2f36d, 0x383a0e8f, 0x75d20ee8, 0xf85af30a, - 0xee020e26, 0x638af3c4, 0x2e62f3a3, 0xa3ea0e41, 0x02d309fb, - 0x8f5bf419, 0xc2b3f47e, 0x4f3b099c, 0x5963f4b0, 0xd4eb0952, - 0x99030935, 0x148bf4d7, 0xb014e09b, 0x3d9c1d79, 0x70741d1e, - 0xfdfce0fc, 0xeba41dd0, 0x662ce032, 0x2bc4e055, 0xa64c1db7, - 0x07751a0d, 0x8afde7ef, 0xc715e788, 0x4a9d1a6a, 0x5cc5e746, - 0xd14d1aa4, 0x9ca51ac3, 0x112de721, 0x05a613f6, 0x882eee14, - 0xc5c6ee73, 0x484e1391, 0x5e16eebd, 0xd39e135f, 0x9e761338, - 0x13feeeda, 0xb2c7e960, 0x3f4f1482, 0x72a714e5, 0xff2fe907, - 0xe977142b, 0x64ffe9c9, 0x2917e9ae, 0xa49f144c, 0xbb58c777, - 0x36d03a95, 0x7b383af2, 0xf6b0c710, 0xe0e83a3c, 0x6d60c7de, - 0x2088c7b9, 0xad003a5b, 0x0c393de1, 0x81b1c003, 0xcc59c064, - 0x41d13d86, 0x5789c0aa, 0xda013d48, 0x97e93d2f, 0x1a61c0cd, - 0x0eea341a, 0x8362c9f8, 0xce8ac99f, 0x4302347d, 0x555ac951, - 0xd8d234b3, 0x953a34d4, 0x18b2c936, 0xb98bce8c, 0x3403336e, - 0x79eb3309, 0xf463ceeb, 0xe23b33c7, 0x6fb3ce25, 0x225bce42, - 0xafd333a0, 0x0b4c27ec, 0x86c4da0e, 0xcb2cda69, 0x46a4278b, - 0x50fcdaa7, 0xdd742745, 0x909c2722, 0x1d14dac0, 0xbc2ddd7a, - 0x31a52098, 0x7c4d20ff, 0xf1c5dd1d, 0xe79d2031, 0x6a15ddd3, - 0x27fdddb4, 0xaa752056, 0xbefed481, 0x33762963, 0x7e9e2904, - 0xf316d4e6, 0xe54e29ca, 0x68c6d428, 0x252ed44f, 0xa8a629ad, - 0x099f2e17, 0x8417d3f5, 0xc9ffd392, 0x44772e70, 0x522fd35c, - 0xdfa72ebe, 0x924f2ed9, 0x1fc7d33b, 0xadc088af, 0x2048754d, - 0x6da0752a, 0xe02888c8, 0xf67075e4, 0x7bf88806, 0x36108861, - 0xbb987583, 0x1aa17239, 0x97298fdb, 0xdac18fbc, 0x5749725e, - 0x41118f72, 0xcc997290, 0x817172f7, 0x0cf98f15, 0x18727bc2, - 0x95fa8620, 0xd8128647, 0x559a7ba5, 0x43c28689, 0xce4a7b6b, - 0x83a27b0c, 0x0e2a86ee, 0xaf138154, 0x229b7cb6, 0x6f737cd1, - 0xe2fb8133, 0xf4a37c1f, 0x792b81fd, 0x34c3819a, 0xb94b7c78, - 0x1dd46834, 0x905c95d6, 0xddb495b1, 0x503c6853, 0x4664957f, - 0xcbec689d, 0x860468fa, 0x0b8c9518, 0xaab592a2, 0x273d6f40, - 0x6ad56f27, 0xe75d92c5, 0xf1056fe9, 0x7c8d920b, 0x3165926c, - 0xbced6f8e, 0xa8669b59, 0x25ee66bb, 0x680666dc, 0xe58e9b3e, - 0xf3d66612, 0x7e5e9bf0, 0x33b69b97, 0xbe3e6675, 0x1f0761cf, - 0x928f9c2d, 0xdf679c4a, 0x52ef61a8, 0x44b79c84, 0xc93f6166, - 0x84d76101, 0x095f9ce3, 0x16984fd8, 0x9b10b23a, 0xd6f8b25d, - 0x5b704fbf, 0x4d28b293, 0xc0a04f71, 0x8d484f16, 0x00c0b2f4, - 0xa1f9b54e, 0x2c7148ac, 0x619948cb, 0xec11b529, 0xfa494805, - 0x77c1b5e7, 0x3a29b580, 0xb7a14862, 0xa32abcb5, 0x2ea24157, - 0x634a4130, 0xeec2bcd2, 0xf89a41fe, 0x7512bc1c, 0x38fabc7b, - 0xb5724199, 0x144b4623, 0x99c3bbc1, 0xd42bbba6, 0x59a34644, - 0x4ffbbb68, 0xc273468a, 0x8f9b46ed, 0x0213bb0f, 0xa68caf43, - 0x2b0452a1, 0x66ec52c6, 0xeb64af24, 0xfd3c5208, 0x70b4afea, - 0x3d5caf8d, 0xb0d4526f, 0x11ed55d5, 0x9c65a837, 0xd18da850, - 0x5c0555b2, 0x4a5da89e, 0xc7d5557c, 0x8a3d551b, 0x07b5a8f9, - 0x133e5c2e, 0x9eb6a1cc, 0xd35ea1ab, 0x5ed65c49, 0x488ea165, - 0xc5065c87, 0x88ee5ce0, 0x0566a102, 0xa45fa6b8, 0x29d75b5a, - 0x643f5b3d, 0xe9b7a6df, 0xffef5bf3, 0x7267a611, 0x3f8fa676, - 0xb2075b94}, - {0x00000000, 0x80f0171f, 0xda91287f, 0x5a613f60, 0x6e5356bf, - 0xeea341a0, 0xb4c27ec0, 0x343269df, 0xdca6ad7e, 0x5c56ba61, - 0x06378501, 0x86c7921e, 0xb2f5fbc1, 0x3205ecde, 0x6864d3be, - 0xe894c4a1, 0x623c5cbd, 0xe2cc4ba2, 0xb8ad74c2, 0x385d63dd, - 0x0c6f0a02, 0x8c9f1d1d, 0xd6fe227d, 0x560e3562, 0xbe9af1c3, - 0x3e6ae6dc, 0x640bd9bc, 0xe4fbcea3, 0xd0c9a77c, 0x5039b063, - 0x0a588f03, 0x8aa8981c, 0xc478b97a, 0x4488ae65, 0x1ee99105, - 0x9e19861a, 0xaa2befc5, 0x2adbf8da, 0x70bac7ba, 0xf04ad0a5, - 0x18de1404, 0x982e031b, 0xc24f3c7b, 0x42bf2b64, 0x768d42bb, - 0xf67d55a4, 0xac1c6ac4, 0x2cec7ddb, 0xa644e5c7, 0x26b4f2d8, - 0x7cd5cdb8, 0xfc25daa7, 0xc817b378, 0x48e7a467, 0x12869b07, - 0x92768c18, 0x7ae248b9, 0xfa125fa6, 0xa07360c6, 0x208377d9, - 0x14b11e06, 0x94410919, 0xce203679, 0x4ed02166, 0x538074b5, - 0xd37063aa, 0x89115cca, 0x09e14bd5, 0x3dd3220a, 0xbd233515, - 0xe7420a75, 0x67b21d6a, 0x8f26d9cb, 0x0fd6ced4, 0x55b7f1b4, - 0xd547e6ab, 0xe1758f74, 0x6185986b, 0x3be4a70b, 0xbb14b014, - 0x31bc2808, 0xb14c3f17, 0xeb2d0077, 0x6bdd1768, 0x5fef7eb7, - 0xdf1f69a8, 0x857e56c8, 0x058e41d7, 0xed1a8576, 0x6dea9269, - 0x378bad09, 0xb77bba16, 0x8349d3c9, 0x03b9c4d6, 0x59d8fbb6, - 0xd928eca9, 0x97f8cdcf, 0x1708dad0, 0x4d69e5b0, 0xcd99f2af, - 0xf9ab9b70, 0x795b8c6f, 0x233ab30f, 0xa3caa410, 0x4b5e60b1, - 0xcbae77ae, 0x91cf48ce, 0x113f5fd1, 0x250d360e, 0xa5fd2111, - 0xff9c1e71, 0x7f6c096e, 0xf5c49172, 0x7534866d, 0x2f55b90d, - 0xafa5ae12, 0x9b97c7cd, 0x1b67d0d2, 0x4106efb2, 0xc1f6f8ad, - 0x29623c0c, 0xa9922b13, 0xf3f31473, 0x7303036c, 0x47316ab3, - 0xc7c17dac, 0x9da042cc, 0x1d5055d3, 0xa700e96a, 0x27f0fe75, - 0x7d91c115, 0xfd61d60a, 0xc953bfd5, 0x49a3a8ca, 0x13c297aa, - 0x933280b5, 0x7ba64414, 0xfb56530b, 0xa1376c6b, 0x21c77b74, - 0x15f512ab, 0x950505b4, 0xcf643ad4, 0x4f942dcb, 0xc53cb5d7, - 0x45cca2c8, 0x1fad9da8, 0x9f5d8ab7, 0xab6fe368, 0x2b9ff477, - 0x71fecb17, 0xf10edc08, 0x199a18a9, 0x996a0fb6, 0xc30b30d6, - 0x43fb27c9, 0x77c94e16, 0xf7395909, 0xad586669, 0x2da87176, - 0x63785010, 0xe388470f, 0xb9e9786f, 0x39196f70, 0x0d2b06af, - 0x8ddb11b0, 0xd7ba2ed0, 0x574a39cf, 0xbfdefd6e, 0x3f2eea71, - 0x654fd511, 0xe5bfc20e, 0xd18dabd1, 0x517dbcce, 0x0b1c83ae, - 0x8bec94b1, 0x01440cad, 0x81b41bb2, 0xdbd524d2, 0x5b2533cd, - 0x6f175a12, 0xefe74d0d, 0xb586726d, 0x35766572, 0xdde2a1d3, - 0x5d12b6cc, 0x077389ac, 0x87839eb3, 0xb3b1f76c, 0x3341e073, - 0x6920df13, 0xe9d0c80c, 0xf4809ddf, 0x74708ac0, 0x2e11b5a0, - 0xaee1a2bf, 0x9ad3cb60, 0x1a23dc7f, 0x4042e31f, 0xc0b2f400, - 0x282630a1, 0xa8d627be, 0xf2b718de, 0x72470fc1, 0x4675661e, - 0xc6857101, 0x9ce44e61, 0x1c14597e, 0x96bcc162, 0x164cd67d, - 0x4c2de91d, 0xccddfe02, 0xf8ef97dd, 0x781f80c2, 0x227ebfa2, - 0xa28ea8bd, 0x4a1a6c1c, 0xcaea7b03, 0x908b4463, 0x107b537c, - 0x24493aa3, 0xa4b92dbc, 0xfed812dc, 0x7e2805c3, 0x30f824a5, - 0xb00833ba, 0xea690cda, 0x6a991bc5, 0x5eab721a, 0xde5b6505, - 0x843a5a65, 0x04ca4d7a, 0xec5e89db, 0x6cae9ec4, 0x36cfa1a4, - 0xb63fb6bb, 0x820ddf64, 0x02fdc87b, 0x589cf71b, 0xd86ce004, - 0x52c47818, 0xd2346f07, 0x88555067, 0x08a54778, 0x3c972ea7, - 0xbc6739b8, 0xe60606d8, 0x66f611c7, 0x8e62d566, 0x0e92c279, - 0x54f3fd19, 0xd403ea06, 0xe03183d9, 0x60c194c6, 0x3aa0aba6, - 0xba50bcb9}, - {0x00000000, 0x9570d495, 0xf190af6b, 0x64e07bfe, 0x38505897, - 0xad208c02, 0xc9c0f7fc, 0x5cb02369, 0x70a0b12e, 0xe5d065bb, - 0x81301e45, 0x1440cad0, 0x48f0e9b9, 0xdd803d2c, 0xb96046d2, - 0x2c109247, 0xe141625c, 0x7431b6c9, 0x10d1cd37, 0x85a119a2, - 0xd9113acb, 0x4c61ee5e, 0x288195a0, 0xbdf14135, 0x91e1d372, - 0x049107e7, 0x60717c19, 0xf501a88c, 0xa9b18be5, 0x3cc15f70, - 0x5821248e, 0xcd51f01b, 0x19f3c2f9, 0x8c83166c, 0xe8636d92, - 0x7d13b907, 0x21a39a6e, 0xb4d34efb, 0xd0333505, 0x4543e190, - 0x695373d7, 0xfc23a742, 0x98c3dcbc, 0x0db30829, 0x51032b40, - 0xc473ffd5, 0xa093842b, 0x35e350be, 0xf8b2a0a5, 0x6dc27430, - 0x09220fce, 0x9c52db5b, 0xc0e2f832, 0x55922ca7, 0x31725759, - 0xa40283cc, 0x8812118b, 0x1d62c51e, 0x7982bee0, 0xecf26a75, - 0xb042491c, 0x25329d89, 0x41d2e677, 0xd4a232e2, 0x33e785f2, - 0xa6975167, 0xc2772a99, 0x5707fe0c, 0x0bb7dd65, 0x9ec709f0, - 0xfa27720e, 0x6f57a69b, 0x434734dc, 0xd637e049, 0xb2d79bb7, - 0x27a74f22, 0x7b176c4b, 0xee67b8de, 0x8a87c320, 0x1ff717b5, - 0xd2a6e7ae, 0x47d6333b, 0x233648c5, 0xb6469c50, 0xeaf6bf39, - 0x7f866bac, 0x1b661052, 0x8e16c4c7, 0xa2065680, 0x37768215, - 0x5396f9eb, 0xc6e62d7e, 0x9a560e17, 0x0f26da82, 0x6bc6a17c, - 0xfeb675e9, 0x2a14470b, 0xbf64939e, 0xdb84e860, 0x4ef43cf5, - 0x12441f9c, 0x8734cb09, 0xe3d4b0f7, 0x76a46462, 0x5ab4f625, - 0xcfc422b0, 0xab24594e, 0x3e548ddb, 0x62e4aeb2, 0xf7947a27, - 0x937401d9, 0x0604d54c, 0xcb552557, 0x5e25f1c2, 0x3ac58a3c, - 0xafb55ea9, 0xf3057dc0, 0x6675a955, 0x0295d2ab, 0x97e5063e, - 0xbbf59479, 0x2e8540ec, 0x4a653b12, 0xdf15ef87, 0x83a5ccee, - 0x16d5187b, 0x72356385, 0xe745b710, 0x67cf0be4, 0xf2bfdf71, - 0x965fa48f, 0x032f701a, 0x5f9f5373, 0xcaef87e6, 0xae0ffc18, - 0x3b7f288d, 0x176fbaca, 0x821f6e5f, 0xe6ff15a1, 0x738fc134, - 0x2f3fe25d, 0xba4f36c8, 0xdeaf4d36, 0x4bdf99a3, 0x868e69b8, - 0x13febd2d, 0x771ec6d3, 0xe26e1246, 0xbede312f, 0x2baee5ba, - 0x4f4e9e44, 0xda3e4ad1, 0xf62ed896, 0x635e0c03, 0x07be77fd, - 0x92cea368, 0xce7e8001, 0x5b0e5494, 0x3fee2f6a, 0xaa9efbff, - 0x7e3cc91d, 0xeb4c1d88, 0x8fac6676, 0x1adcb2e3, 0x466c918a, - 0xd31c451f, 0xb7fc3ee1, 0x228cea74, 0x0e9c7833, 0x9becaca6, - 0xff0cd758, 0x6a7c03cd, 0x36cc20a4, 0xa3bcf431, 0xc75c8fcf, - 0x522c5b5a, 0x9f7dab41, 0x0a0d7fd4, 0x6eed042a, 0xfb9dd0bf, - 0xa72df3d6, 0x325d2743, 0x56bd5cbd, 0xc3cd8828, 0xefdd1a6f, - 0x7aadcefa, 0x1e4db504, 0x8b3d6191, 0xd78d42f8, 0x42fd966d, - 0x261ded93, 0xb36d3906, 0x54288e16, 0xc1585a83, 0xa5b8217d, - 0x30c8f5e8, 0x6c78d681, 0xf9080214, 0x9de879ea, 0x0898ad7f, - 0x24883f38, 0xb1f8ebad, 0xd5189053, 0x406844c6, 0x1cd867af, - 0x89a8b33a, 0xed48c8c4, 0x78381c51, 0xb569ec4a, 0x201938df, - 0x44f94321, 0xd18997b4, 0x8d39b4dd, 0x18496048, 0x7ca91bb6, - 0xe9d9cf23, 0xc5c95d64, 0x50b989f1, 0x3459f20f, 0xa129269a, - 0xfd9905f3, 0x68e9d166, 0x0c09aa98, 0x99797e0d, 0x4ddb4cef, - 0xd8ab987a, 0xbc4be384, 0x293b3711, 0x758b1478, 0xe0fbc0ed, - 0x841bbb13, 0x116b6f86, 0x3d7bfdc1, 0xa80b2954, 0xcceb52aa, - 0x599b863f, 0x052ba556, 0x905b71c3, 0xf4bb0a3d, 0x61cbdea8, - 0xac9a2eb3, 0x39eafa26, 0x5d0a81d8, 0xc87a554d, 0x94ca7624, - 0x01baa2b1, 0x655ad94f, 0xf02a0dda, 0xdc3a9f9d, 0x494a4b08, - 0x2daa30f6, 0xb8dae463, 0xe46ac70a, 0x711a139f, 0x15fa6861, - 0x808abcf4}, - {0x00000000, 0xcf9e17c8, 0x444d29d1, 0x8bd33e19, 0x889a53a2, - 0x4704446a, 0xccd77a73, 0x03496dbb, 0xca45a105, 0x05dbb6cd, - 0x8e0888d4, 0x41969f1c, 0x42dff2a7, 0x8d41e56f, 0x0692db76, - 0xc90cccbe, 0x4ffa444b, 0x80645383, 0x0bb76d9a, 0xc4297a52, - 0xc76017e9, 0x08fe0021, 0x832d3e38, 0x4cb329f0, 0x85bfe54e, - 0x4a21f286, 0xc1f2cc9f, 0x0e6cdb57, 0x0d25b6ec, 0xc2bba124, - 0x49689f3d, 0x86f688f5, 0x9ff48896, 0x506a9f5e, 0xdbb9a147, - 0x1427b68f, 0x176edb34, 0xd8f0ccfc, 0x5323f2e5, 0x9cbde52d, - 0x55b12993, 0x9a2f3e5b, 0x11fc0042, 0xde62178a, 0xdd2b7a31, - 0x12b56df9, 0x996653e0, 0x56f84428, 0xd00eccdd, 0x1f90db15, - 0x9443e50c, 0x5bddf2c4, 0x58949f7f, 0x970a88b7, 0x1cd9b6ae, - 0xd347a166, 0x1a4b6dd8, 0xd5d57a10, 0x5e064409, 0x919853c1, - 0x92d13e7a, 0x5d4f29b2, 0xd69c17ab, 0x19020063, 0xe498176d, - 0x2b0600a5, 0xa0d53ebc, 0x6f4b2974, 0x6c0244cf, 0xa39c5307, - 0x284f6d1e, 0xe7d17ad6, 0x2eddb668, 0xe143a1a0, 0x6a909fb9, - 0xa50e8871, 0xa647e5ca, 0x69d9f202, 0xe20acc1b, 0x2d94dbd3, - 0xab625326, 0x64fc44ee, 0xef2f7af7, 0x20b16d3f, 0x23f80084, - 0xec66174c, 0x67b52955, 0xa82b3e9d, 0x6127f223, 0xaeb9e5eb, - 0x256adbf2, 0xeaf4cc3a, 0xe9bda181, 0x2623b649, 0xadf08850, - 0x626e9f98, 0x7b6c9ffb, 0xb4f28833, 0x3f21b62a, 0xf0bfa1e2, - 0xf3f6cc59, 0x3c68db91, 0xb7bbe588, 0x7825f240, 0xb1293efe, - 0x7eb72936, 0xf564172f, 0x3afa00e7, 0x39b36d5c, 0xf62d7a94, - 0x7dfe448d, 0xb2605345, 0x3496dbb0, 0xfb08cc78, 0x70dbf261, - 0xbf45e5a9, 0xbc0c8812, 0x73929fda, 0xf841a1c3, 0x37dfb60b, - 0xfed37ab5, 0x314d6d7d, 0xba9e5364, 0x750044ac, 0x76492917, - 0xb9d73edf, 0x320400c6, 0xfd9a170e, 0x1241289b, 0xdddf3f53, - 0x560c014a, 0x99921682, 0x9adb7b39, 0x55456cf1, 0xde9652e8, - 0x11084520, 0xd804899e, 0x179a9e56, 0x9c49a04f, 0x53d7b787, - 0x509eda3c, 0x9f00cdf4, 0x14d3f3ed, 0xdb4de425, 0x5dbb6cd0, - 0x92257b18, 0x19f64501, 0xd66852c9, 0xd5213f72, 0x1abf28ba, - 0x916c16a3, 0x5ef2016b, 0x97fecdd5, 0x5860da1d, 0xd3b3e404, - 0x1c2df3cc, 0x1f649e77, 0xd0fa89bf, 0x5b29b7a6, 0x94b7a06e, - 0x8db5a00d, 0x422bb7c5, 0xc9f889dc, 0x06669e14, 0x052ff3af, - 0xcab1e467, 0x4162da7e, 0x8efccdb6, 0x47f00108, 0x886e16c0, - 0x03bd28d9, 0xcc233f11, 0xcf6a52aa, 0x00f44562, 0x8b277b7b, - 0x44b96cb3, 0xc24fe446, 0x0dd1f38e, 0x8602cd97, 0x499cda5f, - 0x4ad5b7e4, 0x854ba02c, 0x0e989e35, 0xc10689fd, 0x080a4543, - 0xc794528b, 0x4c476c92, 0x83d97b5a, 0x809016e1, 0x4f0e0129, - 0xc4dd3f30, 0x0b4328f8, 0xf6d93ff6, 0x3947283e, 0xb2941627, - 0x7d0a01ef, 0x7e436c54, 0xb1dd7b9c, 0x3a0e4585, 0xf590524d, - 0x3c9c9ef3, 0xf302893b, 0x78d1b722, 0xb74fa0ea, 0xb406cd51, - 0x7b98da99, 0xf04be480, 0x3fd5f348, 0xb9237bbd, 0x76bd6c75, - 0xfd6e526c, 0x32f045a4, 0x31b9281f, 0xfe273fd7, 0x75f401ce, - 0xba6a1606, 0x7366dab8, 0xbcf8cd70, 0x372bf369, 0xf8b5e4a1, - 0xfbfc891a, 0x34629ed2, 0xbfb1a0cb, 0x702fb703, 0x692db760, - 0xa6b3a0a8, 0x2d609eb1, 0xe2fe8979, 0xe1b7e4c2, 0x2e29f30a, - 0xa5facd13, 0x6a64dadb, 0xa3681665, 0x6cf601ad, 0xe7253fb4, - 0x28bb287c, 0x2bf245c7, 0xe46c520f, 0x6fbf6c16, 0xa0217bde, - 0x26d7f32b, 0xe949e4e3, 0x629adafa, 0xad04cd32, 0xae4da089, - 0x61d3b741, 0xea008958, 0x259e9e90, 0xec92522e, 0x230c45e6, - 0xa8df7bff, 0x67416c37, 0x6408018c, 0xab961644, 0x2045285d, - 0xefdb3f95}, - {0x00000000, 0x24825136, 0x4904a26c, 0x6d86f35a, 0x920944d8, - 0xb68b15ee, 0xdb0de6b4, 0xff8fb782, 0xff638ff1, 0xdbe1dec7, - 0xb6672d9d, 0x92e57cab, 0x6d6acb29, 0x49e89a1f, 0x246e6945, - 0x00ec3873, 0x25b619a3, 0x01344895, 0x6cb2bbcf, 0x4830eaf9, - 0xb7bf5d7b, 0x933d0c4d, 0xfebbff17, 0xda39ae21, 0xdad59652, - 0xfe57c764, 0x93d1343e, 0xb7536508, 0x48dcd28a, 0x6c5e83bc, - 0x01d870e6, 0x255a21d0, 0x4b6c3346, 0x6fee6270, 0x0268912a, - 0x26eac01c, 0xd965779e, 0xfde726a8, 0x9061d5f2, 0xb4e384c4, - 0xb40fbcb7, 0x908ded81, 0xfd0b1edb, 0xd9894fed, 0x2606f86f, - 0x0284a959, 0x6f025a03, 0x4b800b35, 0x6eda2ae5, 0x4a587bd3, - 0x27de8889, 0x035cd9bf, 0xfcd36e3d, 0xd8513f0b, 0xb5d7cc51, - 0x91559d67, 0x91b9a514, 0xb53bf422, 0xd8bd0778, 0xfc3f564e, - 0x03b0e1cc, 0x2732b0fa, 0x4ab443a0, 0x6e361296, 0x96d8668c, - 0xb25a37ba, 0xdfdcc4e0, 0xfb5e95d6, 0x04d12254, 0x20537362, - 0x4dd58038, 0x6957d10e, 0x69bbe97d, 0x4d39b84b, 0x20bf4b11, - 0x043d1a27, 0xfbb2ada5, 0xdf30fc93, 0xb2b60fc9, 0x96345eff, - 0xb36e7f2f, 0x97ec2e19, 0xfa6add43, 0xdee88c75, 0x21673bf7, - 0x05e56ac1, 0x6863999b, 0x4ce1c8ad, 0x4c0df0de, 0x688fa1e8, - 0x050952b2, 0x218b0384, 0xde04b406, 0xfa86e530, 0x9700166a, - 0xb382475c, 0xddb455ca, 0xf93604fc, 0x94b0f7a6, 0xb032a690, - 0x4fbd1112, 0x6b3f4024, 0x06b9b37e, 0x223be248, 0x22d7da3b, - 0x06558b0d, 0x6bd37857, 0x4f512961, 0xb0de9ee3, 0x945ccfd5, - 0xf9da3c8f, 0xdd586db9, 0xf8024c69, 0xdc801d5f, 0xb106ee05, - 0x9584bf33, 0x6a0b08b1, 0x4e895987, 0x230faadd, 0x078dfbeb, - 0x0761c398, 0x23e392ae, 0x4e6561f4, 0x6ae730c2, 0x95688740, - 0xb1ead676, 0xdc6c252c, 0xf8ee741a, 0xf6c1cb59, 0xd2439a6f, - 0xbfc56935, 0x9b473803, 0x64c88f81, 0x404adeb7, 0x2dcc2ded, - 0x094e7cdb, 0x09a244a8, 0x2d20159e, 0x40a6e6c4, 0x6424b7f2, - 0x9bab0070, 0xbf295146, 0xd2afa21c, 0xf62df32a, 0xd377d2fa, - 0xf7f583cc, 0x9a737096, 0xbef121a0, 0x417e9622, 0x65fcc714, - 0x087a344e, 0x2cf86578, 0x2c145d0b, 0x08960c3d, 0x6510ff67, - 0x4192ae51, 0xbe1d19d3, 0x9a9f48e5, 0xf719bbbf, 0xd39bea89, - 0xbdadf81f, 0x992fa929, 0xf4a95a73, 0xd02b0b45, 0x2fa4bcc7, - 0x0b26edf1, 0x66a01eab, 0x42224f9d, 0x42ce77ee, 0x664c26d8, - 0x0bcad582, 0x2f4884b4, 0xd0c73336, 0xf4456200, 0x99c3915a, - 0xbd41c06c, 0x981be1bc, 0xbc99b08a, 0xd11f43d0, 0xf59d12e6, - 0x0a12a564, 0x2e90f452, 0x43160708, 0x6794563e, 0x67786e4d, - 0x43fa3f7b, 0x2e7ccc21, 0x0afe9d17, 0xf5712a95, 0xd1f37ba3, - 0xbc7588f9, 0x98f7d9cf, 0x6019add5, 0x449bfce3, 0x291d0fb9, - 0x0d9f5e8f, 0xf210e90d, 0xd692b83b, 0xbb144b61, 0x9f961a57, - 0x9f7a2224, 0xbbf87312, 0xd67e8048, 0xf2fcd17e, 0x0d7366fc, - 0x29f137ca, 0x4477c490, 0x60f595a6, 0x45afb476, 0x612de540, - 0x0cab161a, 0x2829472c, 0xd7a6f0ae, 0xf324a198, 0x9ea252c2, - 0xba2003f4, 0xbacc3b87, 0x9e4e6ab1, 0xf3c899eb, 0xd74ac8dd, - 0x28c57f5f, 0x0c472e69, 0x61c1dd33, 0x45438c05, 0x2b759e93, - 0x0ff7cfa5, 0x62713cff, 0x46f36dc9, 0xb97cda4b, 0x9dfe8b7d, - 0xf0787827, 0xd4fa2911, 0xd4161162, 0xf0944054, 0x9d12b30e, - 0xb990e238, 0x461f55ba, 0x629d048c, 0x0f1bf7d6, 0x2b99a6e0, - 0x0ec38730, 0x2a41d606, 0x47c7255c, 0x6345746a, 0x9ccac3e8, - 0xb84892de, 0xd5ce6184, 0xf14c30b2, 0xf1a008c1, 0xd52259f7, - 0xb8a4aaad, 0x9c26fb9b, 0x63a94c19, 0x472b1d2f, 0x2aadee75, - 0x0e2fbf43}, - {0x00000000, 0x36f290f3, 0x6de521e6, 0x5b17b115, 0xdbca43cc, - 0xed38d33f, 0xb62f622a, 0x80ddf2d9, 0x6ce581d9, 0x5a17112a, - 0x0100a03f, 0x37f230cc, 0xb72fc215, 0x81dd52e6, 0xdacae3f3, - 0xec387300, 0xd9cb03b2, 0xef399341, 0xb42e2254, 0x82dcb2a7, - 0x0201407e, 0x34f3d08d, 0x6fe46198, 0x5916f16b, 0xb52e826b, - 0x83dc1298, 0xd8cba38d, 0xee39337e, 0x6ee4c1a7, 0x58165154, - 0x0301e041, 0x35f370b2, 0x68e70125, 0x5e1591d6, 0x050220c3, - 0x33f0b030, 0xb32d42e9, 0x85dfd21a, 0xdec8630f, 0xe83af3fc, - 0x040280fc, 0x32f0100f, 0x69e7a11a, 0x5f1531e9, 0xdfc8c330, - 0xe93a53c3, 0xb22de2d6, 0x84df7225, 0xb12c0297, 0x87de9264, - 0xdcc92371, 0xea3bb382, 0x6ae6415b, 0x5c14d1a8, 0x070360bd, - 0x31f1f04e, 0xddc9834e, 0xeb3b13bd, 0xb02ca2a8, 0x86de325b, - 0x0603c082, 0x30f15071, 0x6be6e164, 0x5d147197, 0xd1ce024a, - 0xe73c92b9, 0xbc2b23ac, 0x8ad9b35f, 0x0a044186, 0x3cf6d175, - 0x67e16060, 0x5113f093, 0xbd2b8393, 0x8bd91360, 0xd0cea275, - 0xe63c3286, 0x66e1c05f, 0x501350ac, 0x0b04e1b9, 0x3df6714a, - 0x080501f8, 0x3ef7910b, 0x65e0201e, 0x5312b0ed, 0xd3cf4234, - 0xe53dd2c7, 0xbe2a63d2, 0x88d8f321, 0x64e08021, 0x521210d2, - 0x0905a1c7, 0x3ff73134, 0xbf2ac3ed, 0x89d8531e, 0xd2cfe20b, - 0xe43d72f8, 0xb929036f, 0x8fdb939c, 0xd4cc2289, 0xe23eb27a, - 0x62e340a3, 0x5411d050, 0x0f066145, 0x39f4f1b6, 0xd5cc82b6, - 0xe33e1245, 0xb829a350, 0x8edb33a3, 0x0e06c17a, 0x38f45189, - 0x63e3e09c, 0x5511706f, 0x60e200dd, 0x5610902e, 0x0d07213b, - 0x3bf5b1c8, 0xbb284311, 0x8ddad3e2, 0xd6cd62f7, 0xe03ff204, - 0x0c078104, 0x3af511f7, 0x61e2a0e2, 0x57103011, 0xd7cdc2c8, - 0xe13f523b, 0xba28e32e, 0x8cda73dd, 0x78ed02d5, 0x4e1f9226, - 0x15082333, 0x23fab3c0, 0xa3274119, 0x95d5d1ea, 0xcec260ff, - 0xf830f00c, 0x1408830c, 0x22fa13ff, 0x79eda2ea, 0x4f1f3219, - 0xcfc2c0c0, 0xf9305033, 0xa227e126, 0x94d571d5, 0xa1260167, - 0x97d49194, 0xccc32081, 0xfa31b072, 0x7aec42ab, 0x4c1ed258, - 0x1709634d, 0x21fbf3be, 0xcdc380be, 0xfb31104d, 0xa026a158, - 0x96d431ab, 0x1609c372, 0x20fb5381, 0x7bece294, 0x4d1e7267, - 0x100a03f0, 0x26f89303, 0x7def2216, 0x4b1db2e5, 0xcbc0403c, - 0xfd32d0cf, 0xa62561da, 0x90d7f129, 0x7cef8229, 0x4a1d12da, - 0x110aa3cf, 0x27f8333c, 0xa725c1e5, 0x91d75116, 0xcac0e003, - 0xfc3270f0, 0xc9c10042, 0xff3390b1, 0xa42421a4, 0x92d6b157, - 0x120b438e, 0x24f9d37d, 0x7fee6268, 0x491cf29b, 0xa524819b, - 0x93d61168, 0xc8c1a07d, 0xfe33308e, 0x7eeec257, 0x481c52a4, - 0x130be3b1, 0x25f97342, 0xa923009f, 0x9fd1906c, 0xc4c62179, - 0xf234b18a, 0x72e94353, 0x441bd3a0, 0x1f0c62b5, 0x29fef246, - 0xc5c68146, 0xf33411b5, 0xa823a0a0, 0x9ed13053, 0x1e0cc28a, - 0x28fe5279, 0x73e9e36c, 0x451b739f, 0x70e8032d, 0x461a93de, - 0x1d0d22cb, 0x2bffb238, 0xab2240e1, 0x9dd0d012, 0xc6c76107, - 0xf035f1f4, 0x1c0d82f4, 0x2aff1207, 0x71e8a312, 0x471a33e1, - 0xc7c7c138, 0xf13551cb, 0xaa22e0de, 0x9cd0702d, 0xc1c401ba, - 0xf7369149, 0xac21205c, 0x9ad3b0af, 0x1a0e4276, 0x2cfcd285, - 0x77eb6390, 0x4119f363, 0xad218063, 0x9bd31090, 0xc0c4a185, - 0xf6363176, 0x76ebc3af, 0x4019535c, 0x1b0ee249, 0x2dfc72ba, - 0x180f0208, 0x2efd92fb, 0x75ea23ee, 0x4318b31d, 0xc3c541c4, - 0xf537d137, 0xae206022, 0x98d2f0d1, 0x74ea83d1, 0x42181322, - 0x190fa237, 0x2ffd32c4, 0xaf20c01d, 0x99d250ee, 0xc2c5e1fb, - 0xf4377108}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0xf390f23600000000, 0xe621e56d00000000, - 0x15b1175b00000000, 0xcc43cadb00000000, 0x3fd338ed00000000, - 0x2a622fb600000000, 0xd9f2dd8000000000, 0xd981e56c00000000, - 0x2a11175a00000000, 0x3fa0000100000000, 0xcc30f23700000000, - 0x15c22fb700000000, 0xe652dd8100000000, 0xf3e3cada00000000, - 0x007338ec00000000, 0xb203cbd900000000, 0x419339ef00000000, - 0x54222eb400000000, 0xa7b2dc8200000000, 0x7e40010200000000, - 0x8dd0f33400000000, 0x9861e46f00000000, 0x6bf1165900000000, - 0x6b822eb500000000, 0x9812dc8300000000, 0x8da3cbd800000000, - 0x7e3339ee00000000, 0xa7c1e46e00000000, 0x5451165800000000, - 0x41e0010300000000, 0xb270f33500000000, 0x2501e76800000000, - 0xd691155e00000000, 0xc320020500000000, 0x30b0f03300000000, - 0xe9422db300000000, 0x1ad2df8500000000, 0x0f63c8de00000000, - 0xfcf33ae800000000, 0xfc80020400000000, 0x0f10f03200000000, - 0x1aa1e76900000000, 0xe931155f00000000, 0x30c3c8df00000000, - 0xc3533ae900000000, 0xd6e22db200000000, 0x2572df8400000000, - 0x97022cb100000000, 0x6492de8700000000, 0x7123c9dc00000000, - 0x82b33bea00000000, 0x5b41e66a00000000, 0xa8d1145c00000000, - 0xbd60030700000000, 0x4ef0f13100000000, 0x4e83c9dd00000000, - 0xbd133beb00000000, 0xa8a22cb000000000, 0x5b32de8600000000, - 0x82c0030600000000, 0x7150f13000000000, 0x64e1e66b00000000, - 0x9771145d00000000, 0x4a02ced100000000, 0xb9923ce700000000, - 0xac232bbc00000000, 0x5fb3d98a00000000, 0x8641040a00000000, - 0x75d1f63c00000000, 0x6060e16700000000, 0x93f0135100000000, - 0x93832bbd00000000, 0x6013d98b00000000, 0x75a2ced000000000, - 0x86323ce600000000, 0x5fc0e16600000000, 0xac50135000000000, - 0xb9e1040b00000000, 0x4a71f63d00000000, 0xf801050800000000, - 0x0b91f73e00000000, 0x1e20e06500000000, 0xedb0125300000000, - 0x3442cfd300000000, 0xc7d23de500000000, 0xd2632abe00000000, - 0x21f3d88800000000, 0x2180e06400000000, 0xd210125200000000, - 0xc7a1050900000000, 0x3431f73f00000000, 0xedc32abf00000000, - 0x1e53d88900000000, 0x0be2cfd200000000, 0xf8723de400000000, - 0x6f0329b900000000, 0x9c93db8f00000000, 0x8922ccd400000000, - 0x7ab23ee200000000, 0xa340e36200000000, 0x50d0115400000000, - 0x4561060f00000000, 0xb6f1f43900000000, 0xb682ccd500000000, - 0x45123ee300000000, 0x50a329b800000000, 0xa333db8e00000000, - 0x7ac1060e00000000, 0x8951f43800000000, 0x9ce0e36300000000, - 0x6f70115500000000, 0xdd00e26000000000, 0x2e90105600000000, - 0x3b21070d00000000, 0xc8b1f53b00000000, 0x114328bb00000000, - 0xe2d3da8d00000000, 0xf762cdd600000000, 0x04f23fe000000000, - 0x0481070c00000000, 0xf711f53a00000000, 0xe2a0e26100000000, - 0x1130105700000000, 0xc8c2cdd700000000, 0x3b523fe100000000, - 0x2ee328ba00000000, 0xdd73da8c00000000, 0xd502ed7800000000, - 0x26921f4e00000000, 0x3323081500000000, 0xc0b3fa2300000000, - 0x194127a300000000, 0xead1d59500000000, 0xff60c2ce00000000, - 0x0cf030f800000000, 0x0c83081400000000, 0xff13fa2200000000, - 0xeaa2ed7900000000, 0x19321f4f00000000, 0xc0c0c2cf00000000, - 0x335030f900000000, 0x26e127a200000000, 0xd571d59400000000, - 0x670126a100000000, 0x9491d49700000000, 0x8120c3cc00000000, - 0x72b031fa00000000, 0xab42ec7a00000000, 0x58d21e4c00000000, - 0x4d63091700000000, 0xbef3fb2100000000, 0xbe80c3cd00000000, - 0x4d1031fb00000000, 0x58a126a000000000, 0xab31d49600000000, - 0x72c3091600000000, 0x8153fb2000000000, 0x94e2ec7b00000000, - 0x67721e4d00000000, 0xf0030a1000000000, 0x0393f82600000000, - 0x1622ef7d00000000, 0xe5b21d4b00000000, 0x3c40c0cb00000000, - 0xcfd032fd00000000, 0xda6125a600000000, 0x29f1d79000000000, - 0x2982ef7c00000000, 0xda121d4a00000000, 0xcfa30a1100000000, - 0x3c33f82700000000, 0xe5c125a700000000, 0x1651d79100000000, - 0x03e0c0ca00000000, 0xf07032fc00000000, 0x4200c1c900000000, - 0xb19033ff00000000, 0xa42124a400000000, 0x57b1d69200000000, - 0x8e430b1200000000, 0x7dd3f92400000000, 0x6862ee7f00000000, - 0x9bf21c4900000000, 0x9b8124a500000000, 0x6811d69300000000, - 0x7da0c1c800000000, 0x8e3033fe00000000, 0x57c2ee7e00000000, - 0xa4521c4800000000, 0xb1e30b1300000000, 0x4273f92500000000, - 0x9f0023a900000000, 0x6c90d19f00000000, 0x7921c6c400000000, - 0x8ab134f200000000, 0x5343e97200000000, 0xa0d31b4400000000, - 0xb5620c1f00000000, 0x46f2fe2900000000, 0x4681c6c500000000, - 0xb51134f300000000, 0xa0a023a800000000, 0x5330d19e00000000, - 0x8ac20c1e00000000, 0x7952fe2800000000, 0x6ce3e97300000000, - 0x9f731b4500000000, 0x2d03e87000000000, 0xde931a4600000000, - 0xcb220d1d00000000, 0x38b2ff2b00000000, 0xe14022ab00000000, - 0x12d0d09d00000000, 0x0761c7c600000000, 0xf4f135f000000000, - 0xf4820d1c00000000, 0x0712ff2a00000000, 0x12a3e87100000000, - 0xe1331a4700000000, 0x38c1c7c700000000, 0xcb5135f100000000, - 0xdee022aa00000000, 0x2d70d09c00000000, 0xba01c4c100000000, - 0x499136f700000000, 0x5c2021ac00000000, 0xafb0d39a00000000, - 0x76420e1a00000000, 0x85d2fc2c00000000, 0x9063eb7700000000, - 0x63f3194100000000, 0x638021ad00000000, 0x9010d39b00000000, - 0x85a1c4c000000000, 0x763136f600000000, 0xafc3eb7600000000, - 0x5c53194000000000, 0x49e20e1b00000000, 0xba72fc2d00000000, - 0x08020f1800000000, 0xfb92fd2e00000000, 0xee23ea7500000000, - 0x1db3184300000000, 0xc441c5c300000000, 0x37d137f500000000, - 0x226020ae00000000, 0xd1f0d29800000000, 0xd183ea7400000000, - 0x2213184200000000, 0x37a20f1900000000, 0xc432fd2f00000000, - 0x1dc020af00000000, 0xee50d29900000000, 0xfbe1c5c200000000, - 0x087137f400000000}, - {0x0000000000000000, 0x3651822400000000, 0x6ca2044900000000, - 0x5af3866d00000000, 0xd844099200000000, 0xee158bb600000000, - 0xb4e60ddb00000000, 0x82b78fff00000000, 0xf18f63ff00000000, - 0xc7dee1db00000000, 0x9d2d67b600000000, 0xab7ce59200000000, - 0x29cb6a6d00000000, 0x1f9ae84900000000, 0x45696e2400000000, - 0x7338ec0000000000, 0xa319b62500000000, 0x9548340100000000, - 0xcfbbb26c00000000, 0xf9ea304800000000, 0x7b5dbfb700000000, - 0x4d0c3d9300000000, 0x17ffbbfe00000000, 0x21ae39da00000000, - 0x5296d5da00000000, 0x64c757fe00000000, 0x3e34d19300000000, - 0x086553b700000000, 0x8ad2dc4800000000, 0xbc835e6c00000000, - 0xe670d80100000000, 0xd0215a2500000000, 0x46336c4b00000000, - 0x7062ee6f00000000, 0x2a91680200000000, 0x1cc0ea2600000000, - 0x9e7765d900000000, 0xa826e7fd00000000, 0xf2d5619000000000, - 0xc484e3b400000000, 0xb7bc0fb400000000, 0x81ed8d9000000000, - 0xdb1e0bfd00000000, 0xed4f89d900000000, 0x6ff8062600000000, - 0x59a9840200000000, 0x035a026f00000000, 0x350b804b00000000, - 0xe52ada6e00000000, 0xd37b584a00000000, 0x8988de2700000000, - 0xbfd95c0300000000, 0x3d6ed3fc00000000, 0x0b3f51d800000000, - 0x51ccd7b500000000, 0x679d559100000000, 0x14a5b99100000000, - 0x22f43bb500000000, 0x7807bdd800000000, 0x4e563ffc00000000, - 0xcce1b00300000000, 0xfab0322700000000, 0xa043b44a00000000, - 0x9612366e00000000, 0x8c66d89600000000, 0xba375ab200000000, - 0xe0c4dcdf00000000, 0xd6955efb00000000, 0x5422d10400000000, - 0x6273532000000000, 0x3880d54d00000000, 0x0ed1576900000000, - 0x7de9bb6900000000, 0x4bb8394d00000000, 0x114bbf2000000000, - 0x271a3d0400000000, 0xa5adb2fb00000000, 0x93fc30df00000000, - 0xc90fb6b200000000, 0xff5e349600000000, 0x2f7f6eb300000000, - 0x192eec9700000000, 0x43dd6afa00000000, 0x758ce8de00000000, - 0xf73b672100000000, 0xc16ae50500000000, 0x9b99636800000000, - 0xadc8e14c00000000, 0xdef00d4c00000000, 0xe8a18f6800000000, - 0xb252090500000000, 0x84038b2100000000, 0x06b404de00000000, - 0x30e586fa00000000, 0x6a16009700000000, 0x5c4782b300000000, - 0xca55b4dd00000000, 0xfc0436f900000000, 0xa6f7b09400000000, - 0x90a632b000000000, 0x1211bd4f00000000, 0x24403f6b00000000, - 0x7eb3b90600000000, 0x48e23b2200000000, 0x3bdad72200000000, - 0x0d8b550600000000, 0x5778d36b00000000, 0x6129514f00000000, - 0xe39edeb000000000, 0xd5cf5c9400000000, 0x8f3cdaf900000000, - 0xb96d58dd00000000, 0x694c02f800000000, 0x5f1d80dc00000000, - 0x05ee06b100000000, 0x33bf849500000000, 0xb1080b6a00000000, - 0x8759894e00000000, 0xddaa0f2300000000, 0xebfb8d0700000000, - 0x98c3610700000000, 0xae92e32300000000, 0xf461654e00000000, - 0xc230e76a00000000, 0x4087689500000000, 0x76d6eab100000000, - 0x2c256cdc00000000, 0x1a74eef800000000, 0x59cbc1f600000000, - 0x6f9a43d200000000, 0x3569c5bf00000000, 0x0338479b00000000, - 0x818fc86400000000, 0xb7de4a4000000000, 0xed2dcc2d00000000, - 0xdb7c4e0900000000, 0xa844a20900000000, 0x9e15202d00000000, - 0xc4e6a64000000000, 0xf2b7246400000000, 0x7000ab9b00000000, - 0x465129bf00000000, 0x1ca2afd200000000, 0x2af32df600000000, - 0xfad277d300000000, 0xcc83f5f700000000, 0x9670739a00000000, - 0xa021f1be00000000, 0x22967e4100000000, 0x14c7fc6500000000, - 0x4e347a0800000000, 0x7865f82c00000000, 0x0b5d142c00000000, - 0x3d0c960800000000, 0x67ff106500000000, 0x51ae924100000000, - 0xd3191dbe00000000, 0xe5489f9a00000000, 0xbfbb19f700000000, - 0x89ea9bd300000000, 0x1ff8adbd00000000, 0x29a92f9900000000, - 0x735aa9f400000000, 0x450b2bd000000000, 0xc7bca42f00000000, - 0xf1ed260b00000000, 0xab1ea06600000000, 0x9d4f224200000000, - 0xee77ce4200000000, 0xd8264c6600000000, 0x82d5ca0b00000000, - 0xb484482f00000000, 0x3633c7d000000000, 0x006245f400000000, - 0x5a91c39900000000, 0x6cc041bd00000000, 0xbce11b9800000000, - 0x8ab099bc00000000, 0xd0431fd100000000, 0xe6129df500000000, - 0x64a5120a00000000, 0x52f4902e00000000, 0x0807164300000000, - 0x3e56946700000000, 0x4d6e786700000000, 0x7b3ffa4300000000, - 0x21cc7c2e00000000, 0x179dfe0a00000000, 0x952a71f500000000, - 0xa37bf3d100000000, 0xf98875bc00000000, 0xcfd9f79800000000, - 0xd5ad196000000000, 0xe3fc9b4400000000, 0xb90f1d2900000000, - 0x8f5e9f0d00000000, 0x0de910f200000000, 0x3bb892d600000000, - 0x614b14bb00000000, 0x571a969f00000000, 0x24227a9f00000000, - 0x1273f8bb00000000, 0x48807ed600000000, 0x7ed1fcf200000000, - 0xfc66730d00000000, 0xca37f12900000000, 0x90c4774400000000, - 0xa695f56000000000, 0x76b4af4500000000, 0x40e52d6100000000, - 0x1a16ab0c00000000, 0x2c47292800000000, 0xaef0a6d700000000, - 0x98a124f300000000, 0xc252a29e00000000, 0xf40320ba00000000, - 0x873bccba00000000, 0xb16a4e9e00000000, 0xeb99c8f300000000, - 0xddc84ad700000000, 0x5f7fc52800000000, 0x692e470c00000000, - 0x33ddc16100000000, 0x058c434500000000, 0x939e752b00000000, - 0xa5cff70f00000000, 0xff3c716200000000, 0xc96df34600000000, - 0x4bda7cb900000000, 0x7d8bfe9d00000000, 0x277878f000000000, - 0x1129fad400000000, 0x621116d400000000, 0x544094f000000000, - 0x0eb3129d00000000, 0x38e290b900000000, 0xba551f4600000000, - 0x8c049d6200000000, 0xd6f71b0f00000000, 0xe0a6992b00000000, - 0x3087c30e00000000, 0x06d6412a00000000, 0x5c25c74700000000, - 0x6a74456300000000, 0xe8c3ca9c00000000, 0xde9248b800000000, - 0x8461ced500000000, 0xb2304cf100000000, 0xc108a0f100000000, - 0xf75922d500000000, 0xadaaa4b800000000, 0x9bfb269c00000000, - 0x194ca96300000000, 0x2f1d2b4700000000, 0x75eead2a00000000, - 0x43bf2f0e00000000}, - {0x0000000000000000, 0xc8179ecf00000000, 0xd1294d4400000000, - 0x193ed38b00000000, 0xa2539a8800000000, 0x6a44044700000000, - 0x737ad7cc00000000, 0xbb6d490300000000, 0x05a145ca00000000, - 0xcdb6db0500000000, 0xd488088e00000000, 0x1c9f964100000000, - 0xa7f2df4200000000, 0x6fe5418d00000000, 0x76db920600000000, - 0xbecc0cc900000000, 0x4b44fa4f00000000, 0x8353648000000000, - 0x9a6db70b00000000, 0x527a29c400000000, 0xe91760c700000000, - 0x2100fe0800000000, 0x383e2d8300000000, 0xf029b34c00000000, - 0x4ee5bf8500000000, 0x86f2214a00000000, 0x9fccf2c100000000, - 0x57db6c0e00000000, 0xecb6250d00000000, 0x24a1bbc200000000, - 0x3d9f684900000000, 0xf588f68600000000, 0x9688f49f00000000, - 0x5e9f6a5000000000, 0x47a1b9db00000000, 0x8fb6271400000000, - 0x34db6e1700000000, 0xfcccf0d800000000, 0xe5f2235300000000, - 0x2de5bd9c00000000, 0x9329b15500000000, 0x5b3e2f9a00000000, - 0x4200fc1100000000, 0x8a1762de00000000, 0x317a2bdd00000000, - 0xf96db51200000000, 0xe053669900000000, 0x2844f85600000000, - 0xddcc0ed000000000, 0x15db901f00000000, 0x0ce5439400000000, - 0xc4f2dd5b00000000, 0x7f9f945800000000, 0xb7880a9700000000, - 0xaeb6d91c00000000, 0x66a147d300000000, 0xd86d4b1a00000000, - 0x107ad5d500000000, 0x0944065e00000000, 0xc153989100000000, - 0x7a3ed19200000000, 0xb2294f5d00000000, 0xab179cd600000000, - 0x6300021900000000, 0x6d1798e400000000, 0xa500062b00000000, - 0xbc3ed5a000000000, 0x74294b6f00000000, 0xcf44026c00000000, - 0x07539ca300000000, 0x1e6d4f2800000000, 0xd67ad1e700000000, - 0x68b6dd2e00000000, 0xa0a143e100000000, 0xb99f906a00000000, - 0x71880ea500000000, 0xcae547a600000000, 0x02f2d96900000000, - 0x1bcc0ae200000000, 0xd3db942d00000000, 0x265362ab00000000, - 0xee44fc6400000000, 0xf77a2fef00000000, 0x3f6db12000000000, - 0x8400f82300000000, 0x4c1766ec00000000, 0x5529b56700000000, - 0x9d3e2ba800000000, 0x23f2276100000000, 0xebe5b9ae00000000, - 0xf2db6a2500000000, 0x3accf4ea00000000, 0x81a1bde900000000, - 0x49b6232600000000, 0x5088f0ad00000000, 0x989f6e6200000000, - 0xfb9f6c7b00000000, 0x3388f2b400000000, 0x2ab6213f00000000, - 0xe2a1bff000000000, 0x59ccf6f300000000, 0x91db683c00000000, - 0x88e5bbb700000000, 0x40f2257800000000, 0xfe3e29b100000000, - 0x3629b77e00000000, 0x2f1764f500000000, 0xe700fa3a00000000, - 0x5c6db33900000000, 0x947a2df600000000, 0x8d44fe7d00000000, - 0x455360b200000000, 0xb0db963400000000, 0x78cc08fb00000000, - 0x61f2db7000000000, 0xa9e545bf00000000, 0x12880cbc00000000, - 0xda9f927300000000, 0xc3a141f800000000, 0x0bb6df3700000000, - 0xb57ad3fe00000000, 0x7d6d4d3100000000, 0x64539eba00000000, - 0xac44007500000000, 0x1729497600000000, 0xdf3ed7b900000000, - 0xc600043200000000, 0x0e179afd00000000, 0x9b28411200000000, - 0x533fdfdd00000000, 0x4a010c5600000000, 0x8216929900000000, - 0x397bdb9a00000000, 0xf16c455500000000, 0xe85296de00000000, - 0x2045081100000000, 0x9e8904d800000000, 0x569e9a1700000000, - 0x4fa0499c00000000, 0x87b7d75300000000, 0x3cda9e5000000000, - 0xf4cd009f00000000, 0xedf3d31400000000, 0x25e44ddb00000000, - 0xd06cbb5d00000000, 0x187b259200000000, 0x0145f61900000000, - 0xc95268d600000000, 0x723f21d500000000, 0xba28bf1a00000000, - 0xa3166c9100000000, 0x6b01f25e00000000, 0xd5cdfe9700000000, - 0x1dda605800000000, 0x04e4b3d300000000, 0xccf32d1c00000000, - 0x779e641f00000000, 0xbf89fad000000000, 0xa6b7295b00000000, - 0x6ea0b79400000000, 0x0da0b58d00000000, 0xc5b72b4200000000, - 0xdc89f8c900000000, 0x149e660600000000, 0xaff32f0500000000, - 0x67e4b1ca00000000, 0x7eda624100000000, 0xb6cdfc8e00000000, - 0x0801f04700000000, 0xc0166e8800000000, 0xd928bd0300000000, - 0x113f23cc00000000, 0xaa526acf00000000, 0x6245f40000000000, - 0x7b7b278b00000000, 0xb36cb94400000000, 0x46e44fc200000000, - 0x8ef3d10d00000000, 0x97cd028600000000, 0x5fda9c4900000000, - 0xe4b7d54a00000000, 0x2ca04b8500000000, 0x359e980e00000000, - 0xfd8906c100000000, 0x43450a0800000000, 0x8b5294c700000000, - 0x926c474c00000000, 0x5a7bd98300000000, 0xe116908000000000, - 0x29010e4f00000000, 0x303fddc400000000, 0xf828430b00000000, - 0xf63fd9f600000000, 0x3e28473900000000, 0x271694b200000000, - 0xef010a7d00000000, 0x546c437e00000000, 0x9c7bddb100000000, - 0x85450e3a00000000, 0x4d5290f500000000, 0xf39e9c3c00000000, - 0x3b8902f300000000, 0x22b7d17800000000, 0xeaa04fb700000000, - 0x51cd06b400000000, 0x99da987b00000000, 0x80e44bf000000000, - 0x48f3d53f00000000, 0xbd7b23b900000000, 0x756cbd7600000000, - 0x6c526efd00000000, 0xa445f03200000000, 0x1f28b93100000000, - 0xd73f27fe00000000, 0xce01f47500000000, 0x06166aba00000000, - 0xb8da667300000000, 0x70cdf8bc00000000, 0x69f32b3700000000, - 0xa1e4b5f800000000, 0x1a89fcfb00000000, 0xd29e623400000000, - 0xcba0b1bf00000000, 0x03b72f7000000000, 0x60b72d6900000000, - 0xa8a0b3a600000000, 0xb19e602d00000000, 0x7989fee200000000, - 0xc2e4b7e100000000, 0x0af3292e00000000, 0x13cdfaa500000000, - 0xdbda646a00000000, 0x651668a300000000, 0xad01f66c00000000, - 0xb43f25e700000000, 0x7c28bb2800000000, 0xc745f22b00000000, - 0x0f526ce400000000, 0x166cbf6f00000000, 0xde7b21a000000000, - 0x2bf3d72600000000, 0xe3e449e900000000, 0xfada9a6200000000, - 0x32cd04ad00000000, 0x89a04dae00000000, 0x41b7d36100000000, - 0x588900ea00000000, 0x909e9e2500000000, 0x2e5292ec00000000, - 0xe6450c2300000000, 0xff7bdfa800000000, 0x376c416700000000, - 0x8c01086400000000, 0x441696ab00000000, 0x5d28452000000000, - 0x953fdbef00000000}, - {0x0000000000000000, 0x95d4709500000000, 0x6baf90f100000000, - 0xfe7be06400000000, 0x9758503800000000, 0x028c20ad00000000, - 0xfcf7c0c900000000, 0x6923b05c00000000, 0x2eb1a07000000000, - 0xbb65d0e500000000, 0x451e308100000000, 0xd0ca401400000000, - 0xb9e9f04800000000, 0x2c3d80dd00000000, 0xd24660b900000000, - 0x4792102c00000000, 0x5c6241e100000000, 0xc9b6317400000000, - 0x37cdd11000000000, 0xa219a18500000000, 0xcb3a11d900000000, - 0x5eee614c00000000, 0xa095812800000000, 0x3541f1bd00000000, - 0x72d3e19100000000, 0xe707910400000000, 0x197c716000000000, - 0x8ca801f500000000, 0xe58bb1a900000000, 0x705fc13c00000000, - 0x8e24215800000000, 0x1bf051cd00000000, 0xf9c2f31900000000, - 0x6c16838c00000000, 0x926d63e800000000, 0x07b9137d00000000, - 0x6e9aa32100000000, 0xfb4ed3b400000000, 0x053533d000000000, - 0x90e1434500000000, 0xd773536900000000, 0x42a723fc00000000, - 0xbcdcc39800000000, 0x2908b30d00000000, 0x402b035100000000, - 0xd5ff73c400000000, 0x2b8493a000000000, 0xbe50e33500000000, - 0xa5a0b2f800000000, 0x3074c26d00000000, 0xce0f220900000000, - 0x5bdb529c00000000, 0x32f8e2c000000000, 0xa72c925500000000, - 0x5957723100000000, 0xcc8302a400000000, 0x8b11128800000000, - 0x1ec5621d00000000, 0xe0be827900000000, 0x756af2ec00000000, - 0x1c4942b000000000, 0x899d322500000000, 0x77e6d24100000000, - 0xe232a2d400000000, 0xf285e73300000000, 0x675197a600000000, - 0x992a77c200000000, 0x0cfe075700000000, 0x65ddb70b00000000, - 0xf009c79e00000000, 0x0e7227fa00000000, 0x9ba6576f00000000, - 0xdc34474300000000, 0x49e037d600000000, 0xb79bd7b200000000, - 0x224fa72700000000, 0x4b6c177b00000000, 0xdeb867ee00000000, - 0x20c3878a00000000, 0xb517f71f00000000, 0xaee7a6d200000000, - 0x3b33d64700000000, 0xc548362300000000, 0x509c46b600000000, - 0x39bff6ea00000000, 0xac6b867f00000000, 0x5210661b00000000, - 0xc7c4168e00000000, 0x805606a200000000, 0x1582763700000000, - 0xebf9965300000000, 0x7e2de6c600000000, 0x170e569a00000000, - 0x82da260f00000000, 0x7ca1c66b00000000, 0xe975b6fe00000000, - 0x0b47142a00000000, 0x9e9364bf00000000, 0x60e884db00000000, - 0xf53cf44e00000000, 0x9c1f441200000000, 0x09cb348700000000, - 0xf7b0d4e300000000, 0x6264a47600000000, 0x25f6b45a00000000, - 0xb022c4cf00000000, 0x4e5924ab00000000, 0xdb8d543e00000000, - 0xb2aee46200000000, 0x277a94f700000000, 0xd901749300000000, - 0x4cd5040600000000, 0x572555cb00000000, 0xc2f1255e00000000, - 0x3c8ac53a00000000, 0xa95eb5af00000000, 0xc07d05f300000000, - 0x55a9756600000000, 0xabd2950200000000, 0x3e06e59700000000, - 0x7994f5bb00000000, 0xec40852e00000000, 0x123b654a00000000, - 0x87ef15df00000000, 0xeecca58300000000, 0x7b18d51600000000, - 0x8563357200000000, 0x10b745e700000000, 0xe40bcf6700000000, - 0x71dfbff200000000, 0x8fa45f9600000000, 0x1a702f0300000000, - 0x73539f5f00000000, 0xe687efca00000000, 0x18fc0fae00000000, - 0x8d287f3b00000000, 0xcaba6f1700000000, 0x5f6e1f8200000000, - 0xa115ffe600000000, 0x34c18f7300000000, 0x5de23f2f00000000, - 0xc8364fba00000000, 0x364dafde00000000, 0xa399df4b00000000, - 0xb8698e8600000000, 0x2dbdfe1300000000, 0xd3c61e7700000000, - 0x46126ee200000000, 0x2f31debe00000000, 0xbae5ae2b00000000, - 0x449e4e4f00000000, 0xd14a3eda00000000, 0x96d82ef600000000, - 0x030c5e6300000000, 0xfd77be0700000000, 0x68a3ce9200000000, - 0x01807ece00000000, 0x94540e5b00000000, 0x6a2fee3f00000000, - 0xfffb9eaa00000000, 0x1dc93c7e00000000, 0x881d4ceb00000000, - 0x7666ac8f00000000, 0xe3b2dc1a00000000, 0x8a916c4600000000, - 0x1f451cd300000000, 0xe13efcb700000000, 0x74ea8c2200000000, - 0x33789c0e00000000, 0xa6acec9b00000000, 0x58d70cff00000000, - 0xcd037c6a00000000, 0xa420cc3600000000, 0x31f4bca300000000, - 0xcf8f5cc700000000, 0x5a5b2c5200000000, 0x41ab7d9f00000000, - 0xd47f0d0a00000000, 0x2a04ed6e00000000, 0xbfd09dfb00000000, - 0xd6f32da700000000, 0x43275d3200000000, 0xbd5cbd5600000000, - 0x2888cdc300000000, 0x6f1addef00000000, 0xfacead7a00000000, - 0x04b54d1e00000000, 0x91613d8b00000000, 0xf8428dd700000000, - 0x6d96fd4200000000, 0x93ed1d2600000000, 0x06396db300000000, - 0x168e285400000000, 0x835a58c100000000, 0x7d21b8a500000000, - 0xe8f5c83000000000, 0x81d6786c00000000, 0x140208f900000000, - 0xea79e89d00000000, 0x7fad980800000000, 0x383f882400000000, - 0xadebf8b100000000, 0x539018d500000000, 0xc644684000000000, - 0xaf67d81c00000000, 0x3ab3a88900000000, 0xc4c848ed00000000, - 0x511c387800000000, 0x4aec69b500000000, 0xdf38192000000000, - 0x2143f94400000000, 0xb49789d100000000, 0xddb4398d00000000, - 0x4860491800000000, 0xb61ba97c00000000, 0x23cfd9e900000000, - 0x645dc9c500000000, 0xf189b95000000000, 0x0ff2593400000000, - 0x9a2629a100000000, 0xf30599fd00000000, 0x66d1e96800000000, - 0x98aa090c00000000, 0x0d7e799900000000, 0xef4cdb4d00000000, - 0x7a98abd800000000, 0x84e34bbc00000000, 0x11373b2900000000, - 0x78148b7500000000, 0xedc0fbe000000000, 0x13bb1b8400000000, - 0x866f6b1100000000, 0xc1fd7b3d00000000, 0x54290ba800000000, - 0xaa52ebcc00000000, 0x3f869b5900000000, 0x56a52b0500000000, - 0xc3715b9000000000, 0x3d0abbf400000000, 0xa8decb6100000000, - 0xb32e9aac00000000, 0x26faea3900000000, 0xd8810a5d00000000, - 0x4d557ac800000000, 0x2476ca9400000000, 0xb1a2ba0100000000, - 0x4fd95a6500000000, 0xda0d2af000000000, 0x9d9f3adc00000000, - 0x084b4a4900000000, 0xf630aa2d00000000, 0x63e4dab800000000, - 0x0ac76ae400000000, 0x9f131a7100000000, 0x6168fa1500000000, - 0xf4bc8a8000000000}, - {0x0000000000000000, 0x1f17f08000000000, 0x7f2891da00000000, - 0x603f615a00000000, 0xbf56536e00000000, 0xa041a3ee00000000, - 0xc07ec2b400000000, 0xdf69323400000000, 0x7eada6dc00000000, - 0x61ba565c00000000, 0x0185370600000000, 0x1e92c78600000000, - 0xc1fbf5b200000000, 0xdeec053200000000, 0xbed3646800000000, - 0xa1c494e800000000, 0xbd5c3c6200000000, 0xa24bcce200000000, - 0xc274adb800000000, 0xdd635d3800000000, 0x020a6f0c00000000, - 0x1d1d9f8c00000000, 0x7d22fed600000000, 0x62350e5600000000, - 0xc3f19abe00000000, 0xdce66a3e00000000, 0xbcd90b6400000000, - 0xa3cefbe400000000, 0x7ca7c9d000000000, 0x63b0395000000000, - 0x038f580a00000000, 0x1c98a88a00000000, 0x7ab978c400000000, - 0x65ae884400000000, 0x0591e91e00000000, 0x1a86199e00000000, - 0xc5ef2baa00000000, 0xdaf8db2a00000000, 0xbac7ba7000000000, - 0xa5d04af000000000, 0x0414de1800000000, 0x1b032e9800000000, - 0x7b3c4fc200000000, 0x642bbf4200000000, 0xbb428d7600000000, - 0xa4557df600000000, 0xc46a1cac00000000, 0xdb7dec2c00000000, - 0xc7e544a600000000, 0xd8f2b42600000000, 0xb8cdd57c00000000, - 0xa7da25fc00000000, 0x78b317c800000000, 0x67a4e74800000000, - 0x079b861200000000, 0x188c769200000000, 0xb948e27a00000000, - 0xa65f12fa00000000, 0xc66073a000000000, 0xd977832000000000, - 0x061eb11400000000, 0x1909419400000000, 0x793620ce00000000, - 0x6621d04e00000000, 0xb574805300000000, 0xaa6370d300000000, - 0xca5c118900000000, 0xd54be10900000000, 0x0a22d33d00000000, - 0x153523bd00000000, 0x750a42e700000000, 0x6a1db26700000000, - 0xcbd9268f00000000, 0xd4ced60f00000000, 0xb4f1b75500000000, - 0xabe647d500000000, 0x748f75e100000000, 0x6b98856100000000, - 0x0ba7e43b00000000, 0x14b014bb00000000, 0x0828bc3100000000, - 0x173f4cb100000000, 0x77002deb00000000, 0x6817dd6b00000000, - 0xb77eef5f00000000, 0xa8691fdf00000000, 0xc8567e8500000000, - 0xd7418e0500000000, 0x76851aed00000000, 0x6992ea6d00000000, - 0x09ad8b3700000000, 0x16ba7bb700000000, 0xc9d3498300000000, - 0xd6c4b90300000000, 0xb6fbd85900000000, 0xa9ec28d900000000, - 0xcfcdf89700000000, 0xd0da081700000000, 0xb0e5694d00000000, - 0xaff299cd00000000, 0x709babf900000000, 0x6f8c5b7900000000, - 0x0fb33a2300000000, 0x10a4caa300000000, 0xb1605e4b00000000, - 0xae77aecb00000000, 0xce48cf9100000000, 0xd15f3f1100000000, - 0x0e360d2500000000, 0x1121fda500000000, 0x711e9cff00000000, - 0x6e096c7f00000000, 0x7291c4f500000000, 0x6d86347500000000, - 0x0db9552f00000000, 0x12aea5af00000000, 0xcdc7979b00000000, - 0xd2d0671b00000000, 0xb2ef064100000000, 0xadf8f6c100000000, - 0x0c3c622900000000, 0x132b92a900000000, 0x7314f3f300000000, - 0x6c03037300000000, 0xb36a314700000000, 0xac7dc1c700000000, - 0xcc42a09d00000000, 0xd355501d00000000, 0x6ae900a700000000, - 0x75fef02700000000, 0x15c1917d00000000, 0x0ad661fd00000000, - 0xd5bf53c900000000, 0xcaa8a34900000000, 0xaa97c21300000000, - 0xb580329300000000, 0x1444a67b00000000, 0x0b5356fb00000000, - 0x6b6c37a100000000, 0x747bc72100000000, 0xab12f51500000000, - 0xb405059500000000, 0xd43a64cf00000000, 0xcb2d944f00000000, - 0xd7b53cc500000000, 0xc8a2cc4500000000, 0xa89dad1f00000000, - 0xb78a5d9f00000000, 0x68e36fab00000000, 0x77f49f2b00000000, - 0x17cbfe7100000000, 0x08dc0ef100000000, 0xa9189a1900000000, - 0xb60f6a9900000000, 0xd6300bc300000000, 0xc927fb4300000000, - 0x164ec97700000000, 0x095939f700000000, 0x696658ad00000000, - 0x7671a82d00000000, 0x1050786300000000, 0x0f4788e300000000, - 0x6f78e9b900000000, 0x706f193900000000, 0xaf062b0d00000000, - 0xb011db8d00000000, 0xd02ebad700000000, 0xcf394a5700000000, - 0x6efddebf00000000, 0x71ea2e3f00000000, 0x11d54f6500000000, - 0x0ec2bfe500000000, 0xd1ab8dd100000000, 0xcebc7d5100000000, - 0xae831c0b00000000, 0xb194ec8b00000000, 0xad0c440100000000, - 0xb21bb48100000000, 0xd224d5db00000000, 0xcd33255b00000000, - 0x125a176f00000000, 0x0d4de7ef00000000, 0x6d7286b500000000, - 0x7265763500000000, 0xd3a1e2dd00000000, 0xccb6125d00000000, - 0xac89730700000000, 0xb39e838700000000, 0x6cf7b1b300000000, - 0x73e0413300000000, 0x13df206900000000, 0x0cc8d0e900000000, - 0xdf9d80f400000000, 0xc08a707400000000, 0xa0b5112e00000000, - 0xbfa2e1ae00000000, 0x60cbd39a00000000, 0x7fdc231a00000000, - 0x1fe3424000000000, 0x00f4b2c000000000, 0xa130262800000000, - 0xbe27d6a800000000, 0xde18b7f200000000, 0xc10f477200000000, - 0x1e66754600000000, 0x017185c600000000, 0x614ee49c00000000, - 0x7e59141c00000000, 0x62c1bc9600000000, 0x7dd64c1600000000, - 0x1de92d4c00000000, 0x02feddcc00000000, 0xdd97eff800000000, - 0xc2801f7800000000, 0xa2bf7e2200000000, 0xbda88ea200000000, - 0x1c6c1a4a00000000, 0x037beaca00000000, 0x63448b9000000000, - 0x7c537b1000000000, 0xa33a492400000000, 0xbc2db9a400000000, - 0xdc12d8fe00000000, 0xc305287e00000000, 0xa524f83000000000, - 0xba3308b000000000, 0xda0c69ea00000000, 0xc51b996a00000000, - 0x1a72ab5e00000000, 0x05655bde00000000, 0x655a3a8400000000, - 0x7a4dca0400000000, 0xdb895eec00000000, 0xc49eae6c00000000, - 0xa4a1cf3600000000, 0xbbb63fb600000000, 0x64df0d8200000000, - 0x7bc8fd0200000000, 0x1bf79c5800000000, 0x04e06cd800000000, - 0x1878c45200000000, 0x076f34d200000000, 0x6750558800000000, - 0x7847a50800000000, 0xa72e973c00000000, 0xb83967bc00000000, - 0xd80606e600000000, 0xc711f66600000000, 0x66d5628e00000000, - 0x79c2920e00000000, 0x19fdf35400000000, 0x06ea03d400000000, - 0xd98331e000000000, 0xc694c16000000000, 0xa6aba03a00000000, - 0xb9bc50ba00000000}, - {0x0000000000000000, 0xe2fd888d00000000, 0x85fd60c000000000, - 0x6700e84d00000000, 0x4bfdb05b00000000, 0xa90038d600000000, - 0xce00d09b00000000, 0x2cfd581600000000, 0x96fa61b700000000, - 0x7407e93a00000000, 0x1307017700000000, 0xf1fa89fa00000000, - 0xdd07d1ec00000000, 0x3ffa596100000000, 0x58fab12c00000000, - 0xba0739a100000000, 0x6df3b2b500000000, 0x8f0e3a3800000000, - 0xe80ed27500000000, 0x0af35af800000000, 0x260e02ee00000000, - 0xc4f38a6300000000, 0xa3f3622e00000000, 0x410eeaa300000000, - 0xfb09d30200000000, 0x19f45b8f00000000, 0x7ef4b3c200000000, - 0x9c093b4f00000000, 0xb0f4635900000000, 0x5209ebd400000000, - 0x3509039900000000, 0xd7f48b1400000000, 0x9be014b000000000, - 0x791d9c3d00000000, 0x1e1d747000000000, 0xfce0fcfd00000000, - 0xd01da4eb00000000, 0x32e02c6600000000, 0x55e0c42b00000000, - 0xb71d4ca600000000, 0x0d1a750700000000, 0xefe7fd8a00000000, - 0x88e715c700000000, 0x6a1a9d4a00000000, 0x46e7c55c00000000, - 0xa41a4dd100000000, 0xc31aa59c00000000, 0x21e72d1100000000, - 0xf613a60500000000, 0x14ee2e8800000000, 0x73eec6c500000000, - 0x91134e4800000000, 0xbdee165e00000000, 0x5f139ed300000000, - 0x3813769e00000000, 0xdaeefe1300000000, 0x60e9c7b200000000, - 0x82144f3f00000000, 0xe514a77200000000, 0x07e92fff00000000, - 0x2b1477e900000000, 0xc9e9ff6400000000, 0xaee9172900000000, - 0x4c149fa400000000, 0x77c758bb00000000, 0x953ad03600000000, - 0xf23a387b00000000, 0x10c7b0f600000000, 0x3c3ae8e000000000, - 0xdec7606d00000000, 0xb9c7882000000000, 0x5b3a00ad00000000, - 0xe13d390c00000000, 0x03c0b18100000000, 0x64c059cc00000000, - 0x863dd14100000000, 0xaac0895700000000, 0x483d01da00000000, - 0x2f3de99700000000, 0xcdc0611a00000000, 0x1a34ea0e00000000, - 0xf8c9628300000000, 0x9fc98ace00000000, 0x7d34024300000000, - 0x51c95a5500000000, 0xb334d2d800000000, 0xd4343a9500000000, - 0x36c9b21800000000, 0x8cce8bb900000000, 0x6e33033400000000, - 0x0933eb7900000000, 0xebce63f400000000, 0xc7333be200000000, - 0x25ceb36f00000000, 0x42ce5b2200000000, 0xa033d3af00000000, - 0xec274c0b00000000, 0x0edac48600000000, 0x69da2ccb00000000, - 0x8b27a44600000000, 0xa7dafc5000000000, 0x452774dd00000000, - 0x22279c9000000000, 0xc0da141d00000000, 0x7add2dbc00000000, - 0x9820a53100000000, 0xff204d7c00000000, 0x1dddc5f100000000, - 0x31209de700000000, 0xd3dd156a00000000, 0xb4ddfd2700000000, - 0x562075aa00000000, 0x81d4febe00000000, 0x6329763300000000, - 0x04299e7e00000000, 0xe6d416f300000000, 0xca294ee500000000, - 0x28d4c66800000000, 0x4fd42e2500000000, 0xad29a6a800000000, - 0x172e9f0900000000, 0xf5d3178400000000, 0x92d3ffc900000000, - 0x702e774400000000, 0x5cd32f5200000000, 0xbe2ea7df00000000, - 0xd92e4f9200000000, 0x3bd3c71f00000000, 0xaf88c0ad00000000, - 0x4d75482000000000, 0x2a75a06d00000000, 0xc88828e000000000, - 0xe47570f600000000, 0x0688f87b00000000, 0x6188103600000000, - 0x837598bb00000000, 0x3972a11a00000000, 0xdb8f299700000000, - 0xbc8fc1da00000000, 0x5e72495700000000, 0x728f114100000000, - 0x907299cc00000000, 0xf772718100000000, 0x158ff90c00000000, - 0xc27b721800000000, 0x2086fa9500000000, 0x478612d800000000, - 0xa57b9a5500000000, 0x8986c24300000000, 0x6b7b4ace00000000, - 0x0c7ba28300000000, 0xee862a0e00000000, 0x548113af00000000, - 0xb67c9b2200000000, 0xd17c736f00000000, 0x3381fbe200000000, - 0x1f7ca3f400000000, 0xfd812b7900000000, 0x9a81c33400000000, - 0x787c4bb900000000, 0x3468d41d00000000, 0xd6955c9000000000, - 0xb195b4dd00000000, 0x53683c5000000000, 0x7f95644600000000, - 0x9d68eccb00000000, 0xfa68048600000000, 0x18958c0b00000000, - 0xa292b5aa00000000, 0x406f3d2700000000, 0x276fd56a00000000, - 0xc5925de700000000, 0xe96f05f100000000, 0x0b928d7c00000000, - 0x6c92653100000000, 0x8e6fedbc00000000, 0x599b66a800000000, - 0xbb66ee2500000000, 0xdc66066800000000, 0x3e9b8ee500000000, - 0x1266d6f300000000, 0xf09b5e7e00000000, 0x979bb63300000000, - 0x75663ebe00000000, 0xcf61071f00000000, 0x2d9c8f9200000000, - 0x4a9c67df00000000, 0xa861ef5200000000, 0x849cb74400000000, - 0x66613fc900000000, 0x0161d78400000000, 0xe39c5f0900000000, - 0xd84f981600000000, 0x3ab2109b00000000, 0x5db2f8d600000000, - 0xbf4f705b00000000, 0x93b2284d00000000, 0x714fa0c000000000, - 0x164f488d00000000, 0xf4b2c00000000000, 0x4eb5f9a100000000, - 0xac48712c00000000, 0xcb48996100000000, 0x29b511ec00000000, - 0x054849fa00000000, 0xe7b5c17700000000, 0x80b5293a00000000, - 0x6248a1b700000000, 0xb5bc2aa300000000, 0x5741a22e00000000, - 0x30414a6300000000, 0xd2bcc2ee00000000, 0xfe419af800000000, - 0x1cbc127500000000, 0x7bbcfa3800000000, 0x994172b500000000, - 0x23464b1400000000, 0xc1bbc39900000000, 0xa6bb2bd400000000, - 0x4446a35900000000, 0x68bbfb4f00000000, 0x8a4673c200000000, - 0xed469b8f00000000, 0x0fbb130200000000, 0x43af8ca600000000, - 0xa152042b00000000, 0xc652ec6600000000, 0x24af64eb00000000, - 0x08523cfd00000000, 0xeaafb47000000000, 0x8daf5c3d00000000, - 0x6f52d4b000000000, 0xd555ed1100000000, 0x37a8659c00000000, - 0x50a88dd100000000, 0xb255055c00000000, 0x9ea85d4a00000000, - 0x7c55d5c700000000, 0x1b553d8a00000000, 0xf9a8b50700000000, - 0x2e5c3e1300000000, 0xcca1b69e00000000, 0xaba15ed300000000, - 0x495cd65e00000000, 0x65a18e4800000000, 0x875c06c500000000, - 0xe05cee8800000000, 0x02a1660500000000, 0xb8a65fa400000000, - 0x5a5bd72900000000, 0x3d5b3f6400000000, 0xdfa6b7e900000000, - 0xf35befff00000000, 0x11a6677200000000, 0x76a68f3f00000000, - 0x945b07b200000000}, - {0x0000000000000000, 0xa90b894e00000000, 0x5217129d00000000, - 0xfb1c9bd300000000, 0xe52855e100000000, 0x4c23dcaf00000000, - 0xb73f477c00000000, 0x1e34ce3200000000, 0x8b57db1900000000, - 0x225c525700000000, 0xd940c98400000000, 0x704b40ca00000000, - 0x6e7f8ef800000000, 0xc77407b600000000, 0x3c689c6500000000, - 0x9563152b00000000, 0x16afb63300000000, 0xbfa43f7d00000000, - 0x44b8a4ae00000000, 0xedb32de000000000, 0xf387e3d200000000, - 0x5a8c6a9c00000000, 0xa190f14f00000000, 0x089b780100000000, - 0x9df86d2a00000000, 0x34f3e46400000000, 0xcfef7fb700000000, - 0x66e4f6f900000000, 0x78d038cb00000000, 0xd1dbb18500000000, - 0x2ac72a5600000000, 0x83cca31800000000, 0x2c5e6d6700000000, - 0x8555e42900000000, 0x7e497ffa00000000, 0xd742f6b400000000, - 0xc976388600000000, 0x607db1c800000000, 0x9b612a1b00000000, - 0x326aa35500000000, 0xa709b67e00000000, 0x0e023f3000000000, - 0xf51ea4e300000000, 0x5c152dad00000000, 0x4221e39f00000000, - 0xeb2a6ad100000000, 0x1036f10200000000, 0xb93d784c00000000, - 0x3af1db5400000000, 0x93fa521a00000000, 0x68e6c9c900000000, - 0xc1ed408700000000, 0xdfd98eb500000000, 0x76d207fb00000000, - 0x8dce9c2800000000, 0x24c5156600000000, 0xb1a6004d00000000, - 0x18ad890300000000, 0xe3b112d000000000, 0x4aba9b9e00000000, - 0x548e55ac00000000, 0xfd85dce200000000, 0x0699473100000000, - 0xaf92ce7f00000000, 0x58bcdace00000000, 0xf1b7538000000000, - 0x0aabc85300000000, 0xa3a0411d00000000, 0xbd948f2f00000000, - 0x149f066100000000, 0xef839db200000000, 0x468814fc00000000, - 0xd3eb01d700000000, 0x7ae0889900000000, 0x81fc134a00000000, - 0x28f79a0400000000, 0x36c3543600000000, 0x9fc8dd7800000000, - 0x64d446ab00000000, 0xcddfcfe500000000, 0x4e136cfd00000000, - 0xe718e5b300000000, 0x1c047e6000000000, 0xb50ff72e00000000, - 0xab3b391c00000000, 0x0230b05200000000, 0xf92c2b8100000000, - 0x5027a2cf00000000, 0xc544b7e400000000, 0x6c4f3eaa00000000, - 0x9753a57900000000, 0x3e582c3700000000, 0x206ce20500000000, - 0x89676b4b00000000, 0x727bf09800000000, 0xdb7079d600000000, - 0x74e2b7a900000000, 0xdde93ee700000000, 0x26f5a53400000000, - 0x8ffe2c7a00000000, 0x91cae24800000000, 0x38c16b0600000000, - 0xc3ddf0d500000000, 0x6ad6799b00000000, 0xffb56cb000000000, - 0x56bee5fe00000000, 0xada27e2d00000000, 0x04a9f76300000000, - 0x1a9d395100000000, 0xb396b01f00000000, 0x488a2bcc00000000, - 0xe181a28200000000, 0x624d019a00000000, 0xcb4688d400000000, - 0x305a130700000000, 0x99519a4900000000, 0x8765547b00000000, - 0x2e6edd3500000000, 0xd57246e600000000, 0x7c79cfa800000000, - 0xe91ada8300000000, 0x401153cd00000000, 0xbb0dc81e00000000, - 0x1206415000000000, 0x0c328f6200000000, 0xa539062c00000000, - 0x5e259dff00000000, 0xf72e14b100000000, 0xf17ec44600000000, - 0x58754d0800000000, 0xa369d6db00000000, 0x0a625f9500000000, - 0x145691a700000000, 0xbd5d18e900000000, 0x4641833a00000000, - 0xef4a0a7400000000, 0x7a291f5f00000000, 0xd322961100000000, - 0x283e0dc200000000, 0x8135848c00000000, 0x9f014abe00000000, - 0x360ac3f000000000, 0xcd16582300000000, 0x641dd16d00000000, - 0xe7d1727500000000, 0x4edafb3b00000000, 0xb5c660e800000000, - 0x1ccde9a600000000, 0x02f9279400000000, 0xabf2aeda00000000, - 0x50ee350900000000, 0xf9e5bc4700000000, 0x6c86a96c00000000, - 0xc58d202200000000, 0x3e91bbf100000000, 0x979a32bf00000000, - 0x89aefc8d00000000, 0x20a575c300000000, 0xdbb9ee1000000000, - 0x72b2675e00000000, 0xdd20a92100000000, 0x742b206f00000000, - 0x8f37bbbc00000000, 0x263c32f200000000, 0x3808fcc000000000, - 0x9103758e00000000, 0x6a1fee5d00000000, 0xc314671300000000, - 0x5677723800000000, 0xff7cfb7600000000, 0x046060a500000000, - 0xad6be9eb00000000, 0xb35f27d900000000, 0x1a54ae9700000000, - 0xe148354400000000, 0x4843bc0a00000000, 0xcb8f1f1200000000, - 0x6284965c00000000, 0x99980d8f00000000, 0x309384c100000000, - 0x2ea74af300000000, 0x87acc3bd00000000, 0x7cb0586e00000000, - 0xd5bbd12000000000, 0x40d8c40b00000000, 0xe9d34d4500000000, - 0x12cfd69600000000, 0xbbc45fd800000000, 0xa5f091ea00000000, - 0x0cfb18a400000000, 0xf7e7837700000000, 0x5eec0a3900000000, - 0xa9c21e8800000000, 0x00c997c600000000, 0xfbd50c1500000000, - 0x52de855b00000000, 0x4cea4b6900000000, 0xe5e1c22700000000, - 0x1efd59f400000000, 0xb7f6d0ba00000000, 0x2295c59100000000, - 0x8b9e4cdf00000000, 0x7082d70c00000000, 0xd9895e4200000000, - 0xc7bd907000000000, 0x6eb6193e00000000, 0x95aa82ed00000000, - 0x3ca10ba300000000, 0xbf6da8bb00000000, 0x166621f500000000, - 0xed7aba2600000000, 0x4471336800000000, 0x5a45fd5a00000000, - 0xf34e741400000000, 0x0852efc700000000, 0xa159668900000000, - 0x343a73a200000000, 0x9d31faec00000000, 0x662d613f00000000, - 0xcf26e87100000000, 0xd112264300000000, 0x7819af0d00000000, - 0x830534de00000000, 0x2a0ebd9000000000, 0x859c73ef00000000, - 0x2c97faa100000000, 0xd78b617200000000, 0x7e80e83c00000000, - 0x60b4260e00000000, 0xc9bfaf4000000000, 0x32a3349300000000, - 0x9ba8bddd00000000, 0x0ecba8f600000000, 0xa7c021b800000000, - 0x5cdcba6b00000000, 0xf5d7332500000000, 0xebe3fd1700000000, - 0x42e8745900000000, 0xb9f4ef8a00000000, 0x10ff66c400000000, - 0x9333c5dc00000000, 0x3a384c9200000000, 0xc124d74100000000, - 0x682f5e0f00000000, 0x761b903d00000000, 0xdf10197300000000, - 0x240c82a000000000, 0x8d070bee00000000, 0x18641ec500000000, - 0xb16f978b00000000, 0x4a730c5800000000, 0xe378851600000000, - 0xfd4c4b2400000000, 0x5447c26a00000000, 0xaf5b59b900000000, - 0x0650d0f700000000}, - {0x0000000000000000, 0x479244af00000000, 0xcf22f88500000000, - 0x88b0bc2a00000000, 0xdf4381d000000000, 0x98d1c57f00000000, - 0x1061795500000000, 0x57f33dfa00000000, 0xff81737a00000000, - 0xb81337d500000000, 0x30a38bff00000000, 0x7731cf5000000000, - 0x20c2f2aa00000000, 0x6750b60500000000, 0xefe00a2f00000000, - 0xa8724e8000000000, 0xfe03e7f400000000, 0xb991a35b00000000, - 0x31211f7100000000, 0x76b35bde00000000, 0x2140662400000000, - 0x66d2228b00000000, 0xee629ea100000000, 0xa9f0da0e00000000, - 0x0182948e00000000, 0x4610d02100000000, 0xcea06c0b00000000, - 0x893228a400000000, 0xdec1155e00000000, 0x995351f100000000, - 0x11e3eddb00000000, 0x5671a97400000000, 0xbd01bf3200000000, - 0xfa93fb9d00000000, 0x722347b700000000, 0x35b1031800000000, - 0x62423ee200000000, 0x25d07a4d00000000, 0xad60c66700000000, - 0xeaf282c800000000, 0x4280cc4800000000, 0x051288e700000000, - 0x8da234cd00000000, 0xca30706200000000, 0x9dc34d9800000000, - 0xda51093700000000, 0x52e1b51d00000000, 0x1573f1b200000000, - 0x430258c600000000, 0x04901c6900000000, 0x8c20a04300000000, - 0xcbb2e4ec00000000, 0x9c41d91600000000, 0xdbd39db900000000, - 0x5363219300000000, 0x14f1653c00000000, 0xbc832bbc00000000, - 0xfb116f1300000000, 0x73a1d33900000000, 0x3433979600000000, - 0x63c0aa6c00000000, 0x2452eec300000000, 0xace252e900000000, - 0xeb70164600000000, 0x7a037e6500000000, 0x3d913aca00000000, - 0xb52186e000000000, 0xf2b3c24f00000000, 0xa540ffb500000000, - 0xe2d2bb1a00000000, 0x6a62073000000000, 0x2df0439f00000000, - 0x85820d1f00000000, 0xc21049b000000000, 0x4aa0f59a00000000, - 0x0d32b13500000000, 0x5ac18ccf00000000, 0x1d53c86000000000, - 0x95e3744a00000000, 0xd27130e500000000, 0x8400999100000000, - 0xc392dd3e00000000, 0x4b22611400000000, 0x0cb025bb00000000, - 0x5b43184100000000, 0x1cd15cee00000000, 0x9461e0c400000000, - 0xd3f3a46b00000000, 0x7b81eaeb00000000, 0x3c13ae4400000000, - 0xb4a3126e00000000, 0xf33156c100000000, 0xa4c26b3b00000000, - 0xe3502f9400000000, 0x6be093be00000000, 0x2c72d71100000000, - 0xc702c15700000000, 0x809085f800000000, 0x082039d200000000, - 0x4fb27d7d00000000, 0x1841408700000000, 0x5fd3042800000000, - 0xd763b80200000000, 0x90f1fcad00000000, 0x3883b22d00000000, - 0x7f11f68200000000, 0xf7a14aa800000000, 0xb0330e0700000000, - 0xe7c033fd00000000, 0xa052775200000000, 0x28e2cb7800000000, - 0x6f708fd700000000, 0x390126a300000000, 0x7e93620c00000000, - 0xf623de2600000000, 0xb1b19a8900000000, 0xe642a77300000000, - 0xa1d0e3dc00000000, 0x29605ff600000000, 0x6ef21b5900000000, - 0xc68055d900000000, 0x8112117600000000, 0x09a2ad5c00000000, - 0x4e30e9f300000000, 0x19c3d40900000000, 0x5e5190a600000000, - 0xd6e12c8c00000000, 0x9173682300000000, 0xf406fcca00000000, - 0xb394b86500000000, 0x3b24044f00000000, 0x7cb640e000000000, - 0x2b457d1a00000000, 0x6cd739b500000000, 0xe467859f00000000, - 0xa3f5c13000000000, 0x0b878fb000000000, 0x4c15cb1f00000000, - 0xc4a5773500000000, 0x8337339a00000000, 0xd4c40e6000000000, - 0x93564acf00000000, 0x1be6f6e500000000, 0x5c74b24a00000000, - 0x0a051b3e00000000, 0x4d975f9100000000, 0xc527e3bb00000000, - 0x82b5a71400000000, 0xd5469aee00000000, 0x92d4de4100000000, - 0x1a64626b00000000, 0x5df626c400000000, 0xf584684400000000, - 0xb2162ceb00000000, 0x3aa690c100000000, 0x7d34d46e00000000, - 0x2ac7e99400000000, 0x6d55ad3b00000000, 0xe5e5111100000000, - 0xa27755be00000000, 0x490743f800000000, 0x0e95075700000000, - 0x8625bb7d00000000, 0xc1b7ffd200000000, 0x9644c22800000000, - 0xd1d6868700000000, 0x59663aad00000000, 0x1ef47e0200000000, - 0xb686308200000000, 0xf114742d00000000, 0x79a4c80700000000, - 0x3e368ca800000000, 0x69c5b15200000000, 0x2e57f5fd00000000, - 0xa6e749d700000000, 0xe1750d7800000000, 0xb704a40c00000000, - 0xf096e0a300000000, 0x78265c8900000000, 0x3fb4182600000000, - 0x684725dc00000000, 0x2fd5617300000000, 0xa765dd5900000000, - 0xe0f799f600000000, 0x4885d77600000000, 0x0f1793d900000000, - 0x87a72ff300000000, 0xc0356b5c00000000, 0x97c656a600000000, - 0xd054120900000000, 0x58e4ae2300000000, 0x1f76ea8c00000000, - 0x8e0582af00000000, 0xc997c60000000000, 0x41277a2a00000000, - 0x06b53e8500000000, 0x5146037f00000000, 0x16d447d000000000, - 0x9e64fbfa00000000, 0xd9f6bf5500000000, 0x7184f1d500000000, - 0x3616b57a00000000, 0xbea6095000000000, 0xf9344dff00000000, - 0xaec7700500000000, 0xe95534aa00000000, 0x61e5888000000000, - 0x2677cc2f00000000, 0x7006655b00000000, 0x379421f400000000, - 0xbf249dde00000000, 0xf8b6d97100000000, 0xaf45e48b00000000, - 0xe8d7a02400000000, 0x60671c0e00000000, 0x27f558a100000000, - 0x8f87162100000000, 0xc815528e00000000, 0x40a5eea400000000, - 0x0737aa0b00000000, 0x50c497f100000000, 0x1756d35e00000000, - 0x9fe66f7400000000, 0xd8742bdb00000000, 0x33043d9d00000000, - 0x7496793200000000, 0xfc26c51800000000, 0xbbb481b700000000, - 0xec47bc4d00000000, 0xabd5f8e200000000, 0x236544c800000000, - 0x64f7006700000000, 0xcc854ee700000000, 0x8b170a4800000000, - 0x03a7b66200000000, 0x4435f2cd00000000, 0x13c6cf3700000000, - 0x54548b9800000000, 0xdce437b200000000, 0x9b76731d00000000, - 0xcd07da6900000000, 0x8a959ec600000000, 0x022522ec00000000, - 0x45b7664300000000, 0x12445bb900000000, 0x55d61f1600000000, - 0xdd66a33c00000000, 0x9af4e79300000000, 0x3286a91300000000, - 0x7514edbc00000000, 0xfda4519600000000, 0xba36153900000000, - 0xedc528c300000000, 0xaa576c6c00000000, 0x22e7d04600000000, - 0x657594e900000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, - 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, - 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, - 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, - 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, - 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, - 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, - 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, - 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, - 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, - 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, - 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, - 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, - 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, - 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, - 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, - 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, - 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, - 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, - 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, - 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, - 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, - 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, - 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, - 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, - 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, - 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, - 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, - 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, - 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, - 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, - 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, - 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, - 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, - 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, - 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, - 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, - 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, - 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, - 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, - 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, - 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, - 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, - 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, - 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, - 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, - 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, - 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, - 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, - 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, - 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, - 0xd8ac6b35}, - {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, - 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, - 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, - 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, - 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, - 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, - 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, - 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, - 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, - 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, - 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, - 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, - 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, - 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, - 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, - 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, - 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, - 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, - 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, - 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, - 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, - 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, - 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, - 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, - 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, - 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, - 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, - 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, - 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, - 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, - 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, - 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, - 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, - 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, - 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, - 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, - 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, - 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, - 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, - 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, - 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, - 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, - 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, - 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, - 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, - 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, - 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, - 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, - 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, - 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, - 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, - 0xa140efa8}, - {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, - 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, - 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, - 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, - 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, - 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, - 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, - 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, - 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, - 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, - 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, - 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, - 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, - 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, - 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, - 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, - 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, - 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, - 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, - 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, - 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, - 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, - 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, - 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, - 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, - 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, - 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, - 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, - 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, - 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, - 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, - 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, - 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, - 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, - 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, - 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, - 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, - 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, - 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, - 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, - 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, - 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, - 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, - 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, - 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, - 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, - 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, - 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, - 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, - 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, - 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, - 0x917cd6a1}, - {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, - 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, - 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, - 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, - 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, - 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, - 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, - 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, - 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, - 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, - 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, - 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, - 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, - 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, - 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, - 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, - 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, - 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, - 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, - 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, - 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, - 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, - 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, - 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, - 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, - 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, - 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, - 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, - 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, - 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, - 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, - 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, - 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, - 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, - 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, - 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, - 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, - 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, - 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, - 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, - 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, - 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, - 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, - 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, - 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, - 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, - 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, - 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, - 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, - 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, - 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, - 0x18ba364e}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x43cba687, 0xc7903cd4, 0x845b9a53, 0xcf270873, - 0x8cecaef4, 0x08b734a7, 0x4b7c9220, 0x9e4f10e6, 0xdd84b661, - 0x59df2c32, 0x1a148ab5, 0x51681895, 0x12a3be12, 0x96f82441, - 0xd53382c6, 0x7d995117, 0x3e52f790, 0xba096dc3, 0xf9c2cb44, - 0xb2be5964, 0xf175ffe3, 0x752e65b0, 0x36e5c337, 0xe3d641f1, - 0xa01de776, 0x24467d25, 0x678ddba2, 0x2cf14982, 0x6f3aef05, - 0xeb617556, 0xa8aad3d1, 0xfa32a32e, 0xb9f905a9, 0x3da29ffa, - 0x7e69397d, 0x3515ab5d, 0x76de0dda, 0xf2859789, 0xb14e310e, - 0x647db3c8, 0x27b6154f, 0xa3ed8f1c, 0xe026299b, 0xab5abbbb, - 0xe8911d3c, 0x6cca876f, 0x2f0121e8, 0x87abf239, 0xc46054be, - 0x403bceed, 0x03f0686a, 0x488cfa4a, 0x0b475ccd, 0x8f1cc69e, - 0xccd76019, 0x19e4e2df, 0x5a2f4458, 0xde74de0b, 0x9dbf788c, - 0xd6c3eaac, 0x95084c2b, 0x1153d678, 0x529870ff, 0xf465465d, - 0xb7aee0da, 0x33f57a89, 0x703edc0e, 0x3b424e2e, 0x7889e8a9, - 0xfcd272fa, 0xbf19d47d, 0x6a2a56bb, 0x29e1f03c, 0xadba6a6f, - 0xee71cce8, 0xa50d5ec8, 0xe6c6f84f, 0x629d621c, 0x2156c49b, - 0x89fc174a, 0xca37b1cd, 0x4e6c2b9e, 0x0da78d19, 0x46db1f39, - 0x0510b9be, 0x814b23ed, 0xc280856a, 0x17b307ac, 0x5478a12b, - 0xd0233b78, 0x93e89dff, 0xd8940fdf, 0x9b5fa958, 0x1f04330b, - 0x5ccf958c, 0x0e57e573, 0x4d9c43f4, 0xc9c7d9a7, 0x8a0c7f20, - 0xc170ed00, 0x82bb4b87, 0x06e0d1d4, 0x452b7753, 0x9018f595, - 0xd3d35312, 0x5788c941, 0x14436fc6, 0x5f3ffde6, 0x1cf45b61, - 0x98afc132, 0xdb6467b5, 0x73ceb464, 0x300512e3, 0xb45e88b0, - 0xf7952e37, 0xbce9bc17, 0xff221a90, 0x7b7980c3, 0x38b22644, - 0xed81a482, 0xae4a0205, 0x2a119856, 0x69da3ed1, 0x22a6acf1, - 0x616d0a76, 0xe5369025, 0xa6fd36a2, 0xe8cb8cba, 0xab002a3d, - 0x2f5bb06e, 0x6c9016e9, 0x27ec84c9, 0x6427224e, 0xe07cb81d, - 0xa3b71e9a, 0x76849c5c, 0x354f3adb, 0xb114a088, 0xf2df060f, - 0xb9a3942f, 0xfa6832a8, 0x7e33a8fb, 0x3df80e7c, 0x9552ddad, - 0xd6997b2a, 0x52c2e179, 0x110947fe, 0x5a75d5de, 0x19be7359, - 0x9de5e90a, 0xde2e4f8d, 0x0b1dcd4b, 0x48d66bcc, 0xcc8df19f, - 0x8f465718, 0xc43ac538, 0x87f163bf, 0x03aaf9ec, 0x40615f6b, - 0x12f92f94, 0x51328913, 0xd5691340, 0x96a2b5c7, 0xddde27e7, - 0x9e158160, 0x1a4e1b33, 0x5985bdb4, 0x8cb63f72, 0xcf7d99f5, - 0x4b2603a6, 0x08eda521, 0x43913701, 0x005a9186, 0x84010bd5, - 0xc7caad52, 0x6f607e83, 0x2cabd804, 0xa8f04257, 0xeb3be4d0, - 0xa04776f0, 0xe38cd077, 0x67d74a24, 0x241ceca3, 0xf12f6e65, - 0xb2e4c8e2, 0x36bf52b1, 0x7574f436, 0x3e086616, 0x7dc3c091, - 0xf9985ac2, 0xba53fc45, 0x1caecae7, 0x5f656c60, 0xdb3ef633, - 0x98f550b4, 0xd389c294, 0x90426413, 0x1419fe40, 0x57d258c7, - 0x82e1da01, 0xc12a7c86, 0x4571e6d5, 0x06ba4052, 0x4dc6d272, - 0x0e0d74f5, 0x8a56eea6, 0xc99d4821, 0x61379bf0, 0x22fc3d77, - 0xa6a7a724, 0xe56c01a3, 0xae109383, 0xeddb3504, 0x6980af57, - 0x2a4b09d0, 0xff788b16, 0xbcb32d91, 0x38e8b7c2, 0x7b231145, - 0x305f8365, 0x739425e2, 0xf7cfbfb1, 0xb4041936, 0xe69c69c9, - 0xa557cf4e, 0x210c551d, 0x62c7f39a, 0x29bb61ba, 0x6a70c73d, - 0xee2b5d6e, 0xade0fbe9, 0x78d3792f, 0x3b18dfa8, 0xbf4345fb, - 0xfc88e37c, 0xb7f4715c, 0xf43fd7db, 0x70644d88, 0x33afeb0f, - 0x9b0538de, 0xd8ce9e59, 0x5c95040a, 0x1f5ea28d, 0x542230ad, - 0x17e9962a, 0x93b20c79, 0xd079aafe, 0x054a2838, 0x46818ebf, - 0xc2da14ec, 0x8111b26b, 0xca6d204b, 0x89a686cc, 0x0dfd1c9f, - 0x4e36ba18}, - {0x00000000, 0xe1b652ef, 0x836bd405, 0x62dd86ea, 0x06d7a80b, - 0xe761fae4, 0x85bc7c0e, 0x640a2ee1, 0x0cae5117, 0xed1803f8, - 0x8fc58512, 0x6e73d7fd, 0x0a79f91c, 0xebcfabf3, 0x89122d19, - 0x68a47ff6, 0x185ca32e, 0xf9eaf1c1, 0x9b37772b, 0x7a8125c4, - 0x1e8b0b25, 0xff3d59ca, 0x9de0df20, 0x7c568dcf, 0x14f2f239, - 0xf544a0d6, 0x9799263c, 0x762f74d3, 0x12255a32, 0xf39308dd, - 0x914e8e37, 0x70f8dcd8, 0x30b8465d, 0xd10e14b2, 0xb3d39258, - 0x5265c0b7, 0x366fee56, 0xd7d9bcb9, 0xb5043a53, 0x54b268bc, - 0x3c16174a, 0xdda045a5, 0xbf7dc34f, 0x5ecb91a0, 0x3ac1bf41, - 0xdb77edae, 0xb9aa6b44, 0x581c39ab, 0x28e4e573, 0xc952b79c, - 0xab8f3176, 0x4a396399, 0x2e334d78, 0xcf851f97, 0xad58997d, - 0x4ceecb92, 0x244ab464, 0xc5fce68b, 0xa7216061, 0x4697328e, - 0x229d1c6f, 0xc32b4e80, 0xa1f6c86a, 0x40409a85, 0x60708dba, - 0x81c6df55, 0xe31b59bf, 0x02ad0b50, 0x66a725b1, 0x8711775e, - 0xe5ccf1b4, 0x047aa35b, 0x6cdedcad, 0x8d688e42, 0xefb508a8, - 0x0e035a47, 0x6a0974a6, 0x8bbf2649, 0xe962a0a3, 0x08d4f24c, - 0x782c2e94, 0x999a7c7b, 0xfb47fa91, 0x1af1a87e, 0x7efb869f, - 0x9f4dd470, 0xfd90529a, 0x1c260075, 0x74827f83, 0x95342d6c, - 0xf7e9ab86, 0x165ff969, 0x7255d788, 0x93e38567, 0xf13e038d, - 0x10885162, 0x50c8cbe7, 0xb17e9908, 0xd3a31fe2, 0x32154d0d, - 0x561f63ec, 0xb7a93103, 0xd574b7e9, 0x34c2e506, 0x5c669af0, - 0xbdd0c81f, 0xdf0d4ef5, 0x3ebb1c1a, 0x5ab132fb, 0xbb076014, - 0xd9dae6fe, 0x386cb411, 0x489468c9, 0xa9223a26, 0xcbffbccc, - 0x2a49ee23, 0x4e43c0c2, 0xaff5922d, 0xcd2814c7, 0x2c9e4628, - 0x443a39de, 0xa58c6b31, 0xc751eddb, 0x26e7bf34, 0x42ed91d5, - 0xa35bc33a, 0xc18645d0, 0x2030173f, 0x81e66bae, 0x60503941, - 0x028dbfab, 0xe33bed44, 0x8731c3a5, 0x6687914a, 0x045a17a0, - 0xe5ec454f, 0x8d483ab9, 0x6cfe6856, 0x0e23eebc, 0xef95bc53, - 0x8b9f92b2, 0x6a29c05d, 0x08f446b7, 0xe9421458, 0x99bac880, - 0x780c9a6f, 0x1ad11c85, 0xfb674e6a, 0x9f6d608b, 0x7edb3264, - 0x1c06b48e, 0xfdb0e661, 0x95149997, 0x74a2cb78, 0x167f4d92, - 0xf7c91f7d, 0x93c3319c, 0x72756373, 0x10a8e599, 0xf11eb776, - 0xb15e2df3, 0x50e87f1c, 0x3235f9f6, 0xd383ab19, 0xb78985f8, - 0x563fd717, 0x34e251fd, 0xd5540312, 0xbdf07ce4, 0x5c462e0b, - 0x3e9ba8e1, 0xdf2dfa0e, 0xbb27d4ef, 0x5a918600, 0x384c00ea, - 0xd9fa5205, 0xa9028edd, 0x48b4dc32, 0x2a695ad8, 0xcbdf0837, - 0xafd526d6, 0x4e637439, 0x2cbef2d3, 0xcd08a03c, 0xa5acdfca, - 0x441a8d25, 0x26c70bcf, 0xc7715920, 0xa37b77c1, 0x42cd252e, - 0x2010a3c4, 0xc1a6f12b, 0xe196e614, 0x0020b4fb, 0x62fd3211, - 0x834b60fe, 0xe7414e1f, 0x06f71cf0, 0x642a9a1a, 0x859cc8f5, - 0xed38b703, 0x0c8ee5ec, 0x6e536306, 0x8fe531e9, 0xebef1f08, - 0x0a594de7, 0x6884cb0d, 0x893299e2, 0xf9ca453a, 0x187c17d5, - 0x7aa1913f, 0x9b17c3d0, 0xff1ded31, 0x1eabbfde, 0x7c763934, - 0x9dc06bdb, 0xf564142d, 0x14d246c2, 0x760fc028, 0x97b992c7, - 0xf3b3bc26, 0x1205eec9, 0x70d86823, 0x916e3acc, 0xd12ea049, - 0x3098f2a6, 0x5245744c, 0xb3f326a3, 0xd7f90842, 0x364f5aad, - 0x5492dc47, 0xb5248ea8, 0xdd80f15e, 0x3c36a3b1, 0x5eeb255b, - 0xbf5d77b4, 0xdb575955, 0x3ae10bba, 0x583c8d50, 0xb98adfbf, - 0xc9720367, 0x28c45188, 0x4a19d762, 0xabaf858d, 0xcfa5ab6c, - 0x2e13f983, 0x4cce7f69, 0xad782d86, 0xc5dc5270, 0x246a009f, - 0x46b78675, 0xa701d49a, 0xc30bfa7b, 0x22bda894, 0x40602e7e, - 0xa1d67c91}, - {0x00000000, 0x5880e2d7, 0xf106b474, 0xa98656a3, 0xe20d68e9, - 0xba8d8a3e, 0x130bdc9d, 0x4b8b3e4a, 0x851da109, 0xdd9d43de, - 0x741b157d, 0x2c9bf7aa, 0x6710c9e0, 0x3f902b37, 0x96167d94, - 0xce969f43, 0x0a3b4213, 0x52bba0c4, 0xfb3df667, 0xa3bd14b0, - 0xe8362afa, 0xb0b6c82d, 0x19309e8e, 0x41b07c59, 0x8f26e31a, - 0xd7a601cd, 0x7e20576e, 0x26a0b5b9, 0x6d2b8bf3, 0x35ab6924, - 0x9c2d3f87, 0xc4addd50, 0x14768426, 0x4cf666f1, 0xe5703052, - 0xbdf0d285, 0xf67beccf, 0xaefb0e18, 0x077d58bb, 0x5ffdba6c, - 0x916b252f, 0xc9ebc7f8, 0x606d915b, 0x38ed738c, 0x73664dc6, - 0x2be6af11, 0x8260f9b2, 0xdae01b65, 0x1e4dc635, 0x46cd24e2, - 0xef4b7241, 0xb7cb9096, 0xfc40aedc, 0xa4c04c0b, 0x0d461aa8, - 0x55c6f87f, 0x9b50673c, 0xc3d085eb, 0x6a56d348, 0x32d6319f, - 0x795d0fd5, 0x21dded02, 0x885bbba1, 0xd0db5976, 0x28ec084d, - 0x706cea9a, 0xd9eabc39, 0x816a5eee, 0xcae160a4, 0x92618273, - 0x3be7d4d0, 0x63673607, 0xadf1a944, 0xf5714b93, 0x5cf71d30, - 0x0477ffe7, 0x4ffcc1ad, 0x177c237a, 0xbefa75d9, 0xe67a970e, - 0x22d74a5e, 0x7a57a889, 0xd3d1fe2a, 0x8b511cfd, 0xc0da22b7, - 0x985ac060, 0x31dc96c3, 0x695c7414, 0xa7caeb57, 0xff4a0980, - 0x56cc5f23, 0x0e4cbdf4, 0x45c783be, 0x1d476169, 0xb4c137ca, - 0xec41d51d, 0x3c9a8c6b, 0x641a6ebc, 0xcd9c381f, 0x951cdac8, - 0xde97e482, 0x86170655, 0x2f9150f6, 0x7711b221, 0xb9872d62, - 0xe107cfb5, 0x48819916, 0x10017bc1, 0x5b8a458b, 0x030aa75c, - 0xaa8cf1ff, 0xf20c1328, 0x36a1ce78, 0x6e212caf, 0xc7a77a0c, - 0x9f2798db, 0xd4aca691, 0x8c2c4446, 0x25aa12e5, 0x7d2af032, - 0xb3bc6f71, 0xeb3c8da6, 0x42badb05, 0x1a3a39d2, 0x51b10798, - 0x0931e54f, 0xa0b7b3ec, 0xf837513b, 0x50d8119a, 0x0858f34d, - 0xa1dea5ee, 0xf95e4739, 0xb2d57973, 0xea559ba4, 0x43d3cd07, - 0x1b532fd0, 0xd5c5b093, 0x8d455244, 0x24c304e7, 0x7c43e630, - 0x37c8d87a, 0x6f483aad, 0xc6ce6c0e, 0x9e4e8ed9, 0x5ae35389, - 0x0263b15e, 0xabe5e7fd, 0xf365052a, 0xb8ee3b60, 0xe06ed9b7, - 0x49e88f14, 0x11686dc3, 0xdffef280, 0x877e1057, 0x2ef846f4, - 0x7678a423, 0x3df39a69, 0x657378be, 0xccf52e1d, 0x9475ccca, - 0x44ae95bc, 0x1c2e776b, 0xb5a821c8, 0xed28c31f, 0xa6a3fd55, - 0xfe231f82, 0x57a54921, 0x0f25abf6, 0xc1b334b5, 0x9933d662, - 0x30b580c1, 0x68356216, 0x23be5c5c, 0x7b3ebe8b, 0xd2b8e828, - 0x8a380aff, 0x4e95d7af, 0x16153578, 0xbf9363db, 0xe713810c, - 0xac98bf46, 0xf4185d91, 0x5d9e0b32, 0x051ee9e5, 0xcb8876a6, - 0x93089471, 0x3a8ec2d2, 0x620e2005, 0x29851e4f, 0x7105fc98, - 0xd883aa3b, 0x800348ec, 0x783419d7, 0x20b4fb00, 0x8932ada3, - 0xd1b24f74, 0x9a39713e, 0xc2b993e9, 0x6b3fc54a, 0x33bf279d, - 0xfd29b8de, 0xa5a95a09, 0x0c2f0caa, 0x54afee7d, 0x1f24d037, - 0x47a432e0, 0xee226443, 0xb6a28694, 0x720f5bc4, 0x2a8fb913, - 0x8309efb0, 0xdb890d67, 0x9002332d, 0xc882d1fa, 0x61048759, - 0x3984658e, 0xf712facd, 0xaf92181a, 0x06144eb9, 0x5e94ac6e, - 0x151f9224, 0x4d9f70f3, 0xe4192650, 0xbc99c487, 0x6c429df1, - 0x34c27f26, 0x9d442985, 0xc5c4cb52, 0x8e4ff518, 0xd6cf17cf, - 0x7f49416c, 0x27c9a3bb, 0xe95f3cf8, 0xb1dfde2f, 0x1859888c, - 0x40d96a5b, 0x0b525411, 0x53d2b6c6, 0xfa54e065, 0xa2d402b2, - 0x6679dfe2, 0x3ef93d35, 0x977f6b96, 0xcfff8941, 0x8474b70b, - 0xdcf455dc, 0x7572037f, 0x2df2e1a8, 0xe3647eeb, 0xbbe49c3c, - 0x1262ca9f, 0x4ae22848, 0x01691602, 0x59e9f4d5, 0xf06fa276, - 0xa8ef40a1}, - {0x00000000, 0x463b6765, 0x8c76ceca, 0xca4da9af, 0x59ebed4e, - 0x1fd08a2b, 0xd59d2384, 0x93a644e1, 0xb2d6db9d, 0xf4edbcf8, - 0x3ea01557, 0x789b7232, 0xeb3d36d3, 0xad0651b6, 0x674bf819, - 0x21709f7c, 0x25abc6e0, 0x6390a185, 0xa9dd082a, 0xefe66f4f, - 0x7c402bae, 0x3a7b4ccb, 0xf036e564, 0xb60d8201, 0x977d1d7d, - 0xd1467a18, 0x1b0bd3b7, 0x5d30b4d2, 0xce96f033, 0x88ad9756, - 0x42e03ef9, 0x04db599c, 0x0b50fc1a, 0x4d6b9b7f, 0x872632d0, - 0xc11d55b5, 0x52bb1154, 0x14807631, 0xdecddf9e, 0x98f6b8fb, - 0xb9862787, 0xffbd40e2, 0x35f0e94d, 0x73cb8e28, 0xe06dcac9, - 0xa656adac, 0x6c1b0403, 0x2a206366, 0x2efb3afa, 0x68c05d9f, - 0xa28df430, 0xe4b69355, 0x7710d7b4, 0x312bb0d1, 0xfb66197e, - 0xbd5d7e1b, 0x9c2de167, 0xda168602, 0x105b2fad, 0x566048c8, - 0xc5c60c29, 0x83fd6b4c, 0x49b0c2e3, 0x0f8ba586, 0x16a0f835, - 0x509b9f50, 0x9ad636ff, 0xdced519a, 0x4f4b157b, 0x0970721e, - 0xc33ddbb1, 0x8506bcd4, 0xa47623a8, 0xe24d44cd, 0x2800ed62, - 0x6e3b8a07, 0xfd9dcee6, 0xbba6a983, 0x71eb002c, 0x37d06749, - 0x330b3ed5, 0x753059b0, 0xbf7df01f, 0xf946977a, 0x6ae0d39b, - 0x2cdbb4fe, 0xe6961d51, 0xa0ad7a34, 0x81dde548, 0xc7e6822d, - 0x0dab2b82, 0x4b904ce7, 0xd8360806, 0x9e0d6f63, 0x5440c6cc, - 0x127ba1a9, 0x1df0042f, 0x5bcb634a, 0x9186cae5, 0xd7bdad80, - 0x441be961, 0x02208e04, 0xc86d27ab, 0x8e5640ce, 0xaf26dfb2, - 0xe91db8d7, 0x23501178, 0x656b761d, 0xf6cd32fc, 0xb0f65599, - 0x7abbfc36, 0x3c809b53, 0x385bc2cf, 0x7e60a5aa, 0xb42d0c05, - 0xf2166b60, 0x61b02f81, 0x278b48e4, 0xedc6e14b, 0xabfd862e, - 0x8a8d1952, 0xccb67e37, 0x06fbd798, 0x40c0b0fd, 0xd366f41c, - 0x955d9379, 0x5f103ad6, 0x192b5db3, 0x2c40f16b, 0x6a7b960e, - 0xa0363fa1, 0xe60d58c4, 0x75ab1c25, 0x33907b40, 0xf9ddd2ef, - 0xbfe6b58a, 0x9e962af6, 0xd8ad4d93, 0x12e0e43c, 0x54db8359, - 0xc77dc7b8, 0x8146a0dd, 0x4b0b0972, 0x0d306e17, 0x09eb378b, - 0x4fd050ee, 0x859df941, 0xc3a69e24, 0x5000dac5, 0x163bbda0, - 0xdc76140f, 0x9a4d736a, 0xbb3dec16, 0xfd068b73, 0x374b22dc, - 0x717045b9, 0xe2d60158, 0xa4ed663d, 0x6ea0cf92, 0x289ba8f7, - 0x27100d71, 0x612b6a14, 0xab66c3bb, 0xed5da4de, 0x7efbe03f, - 0x38c0875a, 0xf28d2ef5, 0xb4b64990, 0x95c6d6ec, 0xd3fdb189, - 0x19b01826, 0x5f8b7f43, 0xcc2d3ba2, 0x8a165cc7, 0x405bf568, - 0x0660920d, 0x02bbcb91, 0x4480acf4, 0x8ecd055b, 0xc8f6623e, - 0x5b5026df, 0x1d6b41ba, 0xd726e815, 0x911d8f70, 0xb06d100c, - 0xf6567769, 0x3c1bdec6, 0x7a20b9a3, 0xe986fd42, 0xafbd9a27, - 0x65f03388, 0x23cb54ed, 0x3ae0095e, 0x7cdb6e3b, 0xb696c794, - 0xf0ada0f1, 0x630be410, 0x25308375, 0xef7d2ada, 0xa9464dbf, - 0x8836d2c3, 0xce0db5a6, 0x04401c09, 0x427b7b6c, 0xd1dd3f8d, - 0x97e658e8, 0x5dabf147, 0x1b909622, 0x1f4bcfbe, 0x5970a8db, - 0x933d0174, 0xd5066611, 0x46a022f0, 0x009b4595, 0xcad6ec3a, - 0x8ced8b5f, 0xad9d1423, 0xeba67346, 0x21ebdae9, 0x67d0bd8c, - 0xf476f96d, 0xb24d9e08, 0x780037a7, 0x3e3b50c2, 0x31b0f544, - 0x778b9221, 0xbdc63b8e, 0xfbfd5ceb, 0x685b180a, 0x2e607f6f, - 0xe42dd6c0, 0xa216b1a5, 0x83662ed9, 0xc55d49bc, 0x0f10e013, - 0x492b8776, 0xda8dc397, 0x9cb6a4f2, 0x56fb0d5d, 0x10c06a38, - 0x141b33a4, 0x522054c1, 0x986dfd6e, 0xde569a0b, 0x4df0deea, - 0x0bcbb98f, 0xc1861020, 0x87bd7745, 0xa6cde839, 0xe0f68f5c, - 0x2abb26f3, 0x6c804196, 0xff260577, 0xb91d6212, 0x7350cbbd, - 0x356bacd8}}; - -#endif - -#endif - -#if N == 6 - -#if W == 8 - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x3db1ecdc, 0x7b63d9b8, 0x46d23564, 0xf6c7b370, - 0xcb765fac, 0x8da46ac8, 0xb0158614, 0x36fe60a1, 0x0b4f8c7d, - 0x4d9db919, 0x702c55c5, 0xc039d3d1, 0xfd883f0d, 0xbb5a0a69, - 0x86ebe6b5, 0x6dfcc142, 0x504d2d9e, 0x169f18fa, 0x2b2ef426, - 0x9b3b7232, 0xa68a9eee, 0xe058ab8a, 0xdde94756, 0x5b02a1e3, - 0x66b34d3f, 0x2061785b, 0x1dd09487, 0xadc51293, 0x9074fe4f, - 0xd6a6cb2b, 0xeb1727f7, 0xdbf98284, 0xe6486e58, 0xa09a5b3c, - 0x9d2bb7e0, 0x2d3e31f4, 0x108fdd28, 0x565de84c, 0x6bec0490, - 0xed07e225, 0xd0b60ef9, 0x96643b9d, 0xabd5d741, 0x1bc05155, - 0x2671bd89, 0x60a388ed, 0x5d126431, 0xb60543c6, 0x8bb4af1a, - 0xcd669a7e, 0xf0d776a2, 0x40c2f0b6, 0x7d731c6a, 0x3ba1290e, - 0x0610c5d2, 0x80fb2367, 0xbd4acfbb, 0xfb98fadf, 0xc6291603, - 0x763c9017, 0x4b8d7ccb, 0x0d5f49af, 0x30eea573, 0x6c820349, - 0x5133ef95, 0x17e1daf1, 0x2a50362d, 0x9a45b039, 0xa7f45ce5, - 0xe1266981, 0xdc97855d, 0x5a7c63e8, 0x67cd8f34, 0x211fba50, - 0x1cae568c, 0xacbbd098, 0x910a3c44, 0xd7d80920, 0xea69e5fc, - 0x017ec20b, 0x3ccf2ed7, 0x7a1d1bb3, 0x47acf76f, 0xf7b9717b, - 0xca089da7, 0x8cdaa8c3, 0xb16b441f, 0x3780a2aa, 0x0a314e76, - 0x4ce37b12, 0x715297ce, 0xc14711da, 0xfcf6fd06, 0xba24c862, - 0x879524be, 0xb77b81cd, 0x8aca6d11, 0xcc185875, 0xf1a9b4a9, - 0x41bc32bd, 0x7c0dde61, 0x3adfeb05, 0x076e07d9, 0x8185e16c, - 0xbc340db0, 0xfae638d4, 0xc757d408, 0x7742521c, 0x4af3bec0, - 0x0c218ba4, 0x31906778, 0xda87408f, 0xe736ac53, 0xa1e49937, - 0x9c5575eb, 0x2c40f3ff, 0x11f11f23, 0x57232a47, 0x6a92c69b, - 0xec79202e, 0xd1c8ccf2, 0x971af996, 0xaaab154a, 0x1abe935e, - 0x270f7f82, 0x61dd4ae6, 0x5c6ca63a, 0xd9040692, 0xe4b5ea4e, - 0xa267df2a, 0x9fd633f6, 0x2fc3b5e2, 0x1272593e, 0x54a06c5a, - 0x69118086, 0xeffa6633, 0xd24b8aef, 0x9499bf8b, 0xa9285357, - 0x193dd543, 0x248c399f, 0x625e0cfb, 0x5fefe027, 0xb4f8c7d0, - 0x89492b0c, 0xcf9b1e68, 0xf22af2b4, 0x423f74a0, 0x7f8e987c, - 0x395cad18, 0x04ed41c4, 0x8206a771, 0xbfb74bad, 0xf9657ec9, - 0xc4d49215, 0x74c11401, 0x4970f8dd, 0x0fa2cdb9, 0x32132165, - 0x02fd8416, 0x3f4c68ca, 0x799e5dae, 0x442fb172, 0xf43a3766, - 0xc98bdbba, 0x8f59eede, 0xb2e80202, 0x3403e4b7, 0x09b2086b, - 0x4f603d0f, 0x72d1d1d3, 0xc2c457c7, 0xff75bb1b, 0xb9a78e7f, - 0x841662a3, 0x6f014554, 0x52b0a988, 0x14629cec, 0x29d37030, - 0x99c6f624, 0xa4771af8, 0xe2a52f9c, 0xdf14c340, 0x59ff25f5, - 0x644ec929, 0x229cfc4d, 0x1f2d1091, 0xaf389685, 0x92897a59, - 0xd45b4f3d, 0xe9eaa3e1, 0xb58605db, 0x8837e907, 0xcee5dc63, - 0xf35430bf, 0x4341b6ab, 0x7ef05a77, 0x38226f13, 0x059383cf, - 0x8378657a, 0xbec989a6, 0xf81bbcc2, 0xc5aa501e, 0x75bfd60a, - 0x480e3ad6, 0x0edc0fb2, 0x336de36e, 0xd87ac499, 0xe5cb2845, - 0xa3191d21, 0x9ea8f1fd, 0x2ebd77e9, 0x130c9b35, 0x55deae51, - 0x686f428d, 0xee84a438, 0xd33548e4, 0x95e77d80, 0xa856915c, - 0x18431748, 0x25f2fb94, 0x6320cef0, 0x5e91222c, 0x6e7f875f, - 0x53ce6b83, 0x151c5ee7, 0x28adb23b, 0x98b8342f, 0xa509d8f3, - 0xe3dbed97, 0xde6a014b, 0x5881e7fe, 0x65300b22, 0x23e23e46, - 0x1e53d29a, 0xae46548e, 0x93f7b852, 0xd5258d36, 0xe89461ea, - 0x0383461d, 0x3e32aac1, 0x78e09fa5, 0x45517379, 0xf544f56d, - 0xc8f519b1, 0x8e272cd5, 0xb396c009, 0x357d26bc, 0x08ccca60, - 0x4e1eff04, 0x73af13d8, 0xc3ba95cc, 0xfe0b7910, 0xb8d94c74, - 0x8568a0a8}, - {0x00000000, 0x69790b65, 0xd2f216ca, 0xbb8b1daf, 0x7e952bd5, - 0x17ec20b0, 0xac673d1f, 0xc51e367a, 0xfd2a57aa, 0x94535ccf, - 0x2fd84160, 0x46a14a05, 0x83bf7c7f, 0xeac6771a, 0x514d6ab5, - 0x383461d0, 0x2125a915, 0x485ca270, 0xf3d7bfdf, 0x9aaeb4ba, - 0x5fb082c0, 0x36c989a5, 0x8d42940a, 0xe43b9f6f, 0xdc0ffebf, - 0xb576f5da, 0x0efde875, 0x6784e310, 0xa29ad56a, 0xcbe3de0f, - 0x7068c3a0, 0x1911c8c5, 0x424b522a, 0x2b32594f, 0x90b944e0, - 0xf9c04f85, 0x3cde79ff, 0x55a7729a, 0xee2c6f35, 0x87556450, - 0xbf610580, 0xd6180ee5, 0x6d93134a, 0x04ea182f, 0xc1f42e55, - 0xa88d2530, 0x1306389f, 0x7a7f33fa, 0x636efb3f, 0x0a17f05a, - 0xb19cedf5, 0xd8e5e690, 0x1dfbd0ea, 0x7482db8f, 0xcf09c620, - 0xa670cd45, 0x9e44ac95, 0xf73da7f0, 0x4cb6ba5f, 0x25cfb13a, - 0xe0d18740, 0x89a88c25, 0x3223918a, 0x5b5a9aef, 0x8496a454, - 0xedefaf31, 0x5664b29e, 0x3f1db9fb, 0xfa038f81, 0x937a84e4, - 0x28f1994b, 0x4188922e, 0x79bcf3fe, 0x10c5f89b, 0xab4ee534, - 0xc237ee51, 0x0729d82b, 0x6e50d34e, 0xd5dbcee1, 0xbca2c584, - 0xa5b30d41, 0xccca0624, 0x77411b8b, 0x1e3810ee, 0xdb262694, - 0xb25f2df1, 0x09d4305e, 0x60ad3b3b, 0x58995aeb, 0x31e0518e, - 0x8a6b4c21, 0xe3124744, 0x260c713e, 0x4f757a5b, 0xf4fe67f4, - 0x9d876c91, 0xc6ddf67e, 0xafa4fd1b, 0x142fe0b4, 0x7d56ebd1, - 0xb848ddab, 0xd131d6ce, 0x6abacb61, 0x03c3c004, 0x3bf7a1d4, - 0x528eaab1, 0xe905b71e, 0x807cbc7b, 0x45628a01, 0x2c1b8164, - 0x97909ccb, 0xfee997ae, 0xe7f85f6b, 0x8e81540e, 0x350a49a1, - 0x5c7342c4, 0x996d74be, 0xf0147fdb, 0x4b9f6274, 0x22e66911, - 0x1ad208c1, 0x73ab03a4, 0xc8201e0b, 0xa159156e, 0x64472314, - 0x0d3e2871, 0xb6b535de, 0xdfcc3ebb, 0xd25c4ee9, 0xbb25458c, - 0x00ae5823, 0x69d75346, 0xacc9653c, 0xc5b06e59, 0x7e3b73f6, - 0x17427893, 0x2f761943, 0x460f1226, 0xfd840f89, 0x94fd04ec, - 0x51e33296, 0x389a39f3, 0x8311245c, 0xea682f39, 0xf379e7fc, - 0x9a00ec99, 0x218bf136, 0x48f2fa53, 0x8deccc29, 0xe495c74c, - 0x5f1edae3, 0x3667d186, 0x0e53b056, 0x672abb33, 0xdca1a69c, - 0xb5d8adf9, 0x70c69b83, 0x19bf90e6, 0xa2348d49, 0xcb4d862c, - 0x90171cc3, 0xf96e17a6, 0x42e50a09, 0x2b9c016c, 0xee823716, - 0x87fb3c73, 0x3c7021dc, 0x55092ab9, 0x6d3d4b69, 0x0444400c, - 0xbfcf5da3, 0xd6b656c6, 0x13a860bc, 0x7ad16bd9, 0xc15a7676, - 0xa8237d13, 0xb132b5d6, 0xd84bbeb3, 0x63c0a31c, 0x0ab9a879, - 0xcfa79e03, 0xa6de9566, 0x1d5588c9, 0x742c83ac, 0x4c18e27c, - 0x2561e919, 0x9eeaf4b6, 0xf793ffd3, 0x328dc9a9, 0x5bf4c2cc, - 0xe07fdf63, 0x8906d406, 0x56caeabd, 0x3fb3e1d8, 0x8438fc77, - 0xed41f712, 0x285fc168, 0x4126ca0d, 0xfaadd7a2, 0x93d4dcc7, - 0xabe0bd17, 0xc299b672, 0x7912abdd, 0x106ba0b8, 0xd57596c2, - 0xbc0c9da7, 0x07878008, 0x6efe8b6d, 0x77ef43a8, 0x1e9648cd, - 0xa51d5562, 0xcc645e07, 0x097a687d, 0x60036318, 0xdb887eb7, - 0xb2f175d2, 0x8ac51402, 0xe3bc1f67, 0x583702c8, 0x314e09ad, - 0xf4503fd7, 0x9d2934b2, 0x26a2291d, 0x4fdb2278, 0x1481b897, - 0x7df8b3f2, 0xc673ae5d, 0xaf0aa538, 0x6a149342, 0x036d9827, - 0xb8e68588, 0xd19f8eed, 0xe9abef3d, 0x80d2e458, 0x3b59f9f7, - 0x5220f292, 0x973ec4e8, 0xfe47cf8d, 0x45ccd222, 0x2cb5d947, - 0x35a41182, 0x5cdd1ae7, 0xe7560748, 0x8e2f0c2d, 0x4b313a57, - 0x22483132, 0x99c32c9d, 0xf0ba27f8, 0xc88e4628, 0xa1f74d4d, - 0x1a7c50e2, 0x73055b87, 0xb61b6dfd, 0xdf626698, 0x64e97b37, - 0x0d907052}, - {0x00000000, 0x7fc99b93, 0xff933726, 0x805aacb5, 0x2457680d, - 0x5b9ef39e, 0xdbc45f2b, 0xa40dc4b8, 0x48aed01a, 0x37674b89, - 0xb73de73c, 0xc8f47caf, 0x6cf9b817, 0x13302384, 0x936a8f31, - 0xeca314a2, 0x915da034, 0xee943ba7, 0x6ece9712, 0x11070c81, - 0xb50ac839, 0xcac353aa, 0x4a99ff1f, 0x3550648c, 0xd9f3702e, - 0xa63aebbd, 0x26604708, 0x59a9dc9b, 0xfda41823, 0x826d83b0, - 0x02372f05, 0x7dfeb496, 0xf9ca4629, 0x8603ddba, 0x0659710f, - 0x7990ea9c, 0xdd9d2e24, 0xa254b5b7, 0x220e1902, 0x5dc78291, - 0xb1649633, 0xcead0da0, 0x4ef7a115, 0x313e3a86, 0x9533fe3e, - 0xeafa65ad, 0x6aa0c918, 0x1569528b, 0x6897e61d, 0x175e7d8e, - 0x9704d13b, 0xe8cd4aa8, 0x4cc08e10, 0x33091583, 0xb353b936, - 0xcc9a22a5, 0x20393607, 0x5ff0ad94, 0xdfaa0121, 0xa0639ab2, - 0x046e5e0a, 0x7ba7c599, 0xfbfd692c, 0x8434f2bf, 0x28e58a13, - 0x572c1180, 0xd776bd35, 0xa8bf26a6, 0x0cb2e21e, 0x737b798d, - 0xf321d538, 0x8ce84eab, 0x604b5a09, 0x1f82c19a, 0x9fd86d2f, - 0xe011f6bc, 0x441c3204, 0x3bd5a997, 0xbb8f0522, 0xc4469eb1, - 0xb9b82a27, 0xc671b1b4, 0x462b1d01, 0x39e28692, 0x9def422a, - 0xe226d9b9, 0x627c750c, 0x1db5ee9f, 0xf116fa3d, 0x8edf61ae, - 0x0e85cd1b, 0x714c5688, 0xd5419230, 0xaa8809a3, 0x2ad2a516, - 0x551b3e85, 0xd12fcc3a, 0xaee657a9, 0x2ebcfb1c, 0x5175608f, - 0xf578a437, 0x8ab13fa4, 0x0aeb9311, 0x75220882, 0x99811c20, - 0xe64887b3, 0x66122b06, 0x19dbb095, 0xbdd6742d, 0xc21fefbe, - 0x4245430b, 0x3d8cd898, 0x40726c0e, 0x3fbbf79d, 0xbfe15b28, - 0xc028c0bb, 0x64250403, 0x1bec9f90, 0x9bb63325, 0xe47fa8b6, - 0x08dcbc14, 0x77152787, 0xf74f8b32, 0x888610a1, 0x2c8bd419, - 0x53424f8a, 0xd318e33f, 0xacd178ac, 0x51cb1426, 0x2e028fb5, - 0xae582300, 0xd191b893, 0x759c7c2b, 0x0a55e7b8, 0x8a0f4b0d, - 0xf5c6d09e, 0x1965c43c, 0x66ac5faf, 0xe6f6f31a, 0x993f6889, - 0x3d32ac31, 0x42fb37a2, 0xc2a19b17, 0xbd680084, 0xc096b412, - 0xbf5f2f81, 0x3f058334, 0x40cc18a7, 0xe4c1dc1f, 0x9b08478c, - 0x1b52eb39, 0x649b70aa, 0x88386408, 0xf7f1ff9b, 0x77ab532e, - 0x0862c8bd, 0xac6f0c05, 0xd3a69796, 0x53fc3b23, 0x2c35a0b0, - 0xa801520f, 0xd7c8c99c, 0x57926529, 0x285bfeba, 0x8c563a02, - 0xf39fa191, 0x73c50d24, 0x0c0c96b7, 0xe0af8215, 0x9f661986, - 0x1f3cb533, 0x60f52ea0, 0xc4f8ea18, 0xbb31718b, 0x3b6bdd3e, - 0x44a246ad, 0x395cf23b, 0x469569a8, 0xc6cfc51d, 0xb9065e8e, - 0x1d0b9a36, 0x62c201a5, 0xe298ad10, 0x9d513683, 0x71f22221, - 0x0e3bb9b2, 0x8e611507, 0xf1a88e94, 0x55a54a2c, 0x2a6cd1bf, - 0xaa367d0a, 0xd5ffe699, 0x792e9e35, 0x06e705a6, 0x86bda913, - 0xf9743280, 0x5d79f638, 0x22b06dab, 0xa2eac11e, 0xdd235a8d, - 0x31804e2f, 0x4e49d5bc, 0xce137909, 0xb1dae29a, 0x15d72622, - 0x6a1ebdb1, 0xea441104, 0x958d8a97, 0xe8733e01, 0x97baa592, - 0x17e00927, 0x682992b4, 0xcc24560c, 0xb3edcd9f, 0x33b7612a, - 0x4c7efab9, 0xa0ddee1b, 0xdf147588, 0x5f4ed93d, 0x208742ae, - 0x848a8616, 0xfb431d85, 0x7b19b130, 0x04d02aa3, 0x80e4d81c, - 0xff2d438f, 0x7f77ef3a, 0x00be74a9, 0xa4b3b011, 0xdb7a2b82, - 0x5b208737, 0x24e91ca4, 0xc84a0806, 0xb7839395, 0x37d93f20, - 0x4810a4b3, 0xec1d600b, 0x93d4fb98, 0x138e572d, 0x6c47ccbe, - 0x11b97828, 0x6e70e3bb, 0xee2a4f0e, 0x91e3d49d, 0x35ee1025, - 0x4a278bb6, 0xca7d2703, 0xb5b4bc90, 0x5917a832, 0x26de33a1, - 0xa6849f14, 0xd94d0487, 0x7d40c03f, 0x02895bac, 0x82d3f719, - 0xfd1a6c8a}, - {0x00000000, 0xa396284c, 0x9c5d56d9, 0x3fcb7e95, 0xe3cbabf3, - 0x405d83bf, 0x7f96fd2a, 0xdc00d566, 0x1ce651a7, 0xbf7079eb, - 0x80bb077e, 0x232d2f32, 0xff2dfa54, 0x5cbbd218, 0x6370ac8d, - 0xc0e684c1, 0x39cca34e, 0x9a5a8b02, 0xa591f597, 0x0607dddb, - 0xda0708bd, 0x799120f1, 0x465a5e64, 0xe5cc7628, 0x252af2e9, - 0x86bcdaa5, 0xb977a430, 0x1ae18c7c, 0xc6e1591a, 0x65777156, - 0x5abc0fc3, 0xf92a278f, 0x7399469c, 0xd00f6ed0, 0xefc41045, - 0x4c523809, 0x9052ed6f, 0x33c4c523, 0x0c0fbbb6, 0xaf9993fa, - 0x6f7f173b, 0xcce93f77, 0xf32241e2, 0x50b469ae, 0x8cb4bcc8, - 0x2f229484, 0x10e9ea11, 0xb37fc25d, 0x4a55e5d2, 0xe9c3cd9e, - 0xd608b30b, 0x759e9b47, 0xa99e4e21, 0x0a08666d, 0x35c318f8, - 0x965530b4, 0x56b3b475, 0xf5259c39, 0xcaeee2ac, 0x6978cae0, - 0xb5781f86, 0x16ee37ca, 0x2925495f, 0x8ab36113, 0xe7328d38, - 0x44a4a574, 0x7b6fdbe1, 0xd8f9f3ad, 0x04f926cb, 0xa76f0e87, - 0x98a47012, 0x3b32585e, 0xfbd4dc9f, 0x5842f4d3, 0x67898a46, - 0xc41fa20a, 0x181f776c, 0xbb895f20, 0x844221b5, 0x27d409f9, - 0xdefe2e76, 0x7d68063a, 0x42a378af, 0xe13550e3, 0x3d358585, - 0x9ea3adc9, 0xa168d35c, 0x02fefb10, 0xc2187fd1, 0x618e579d, - 0x5e452908, 0xfdd30144, 0x21d3d422, 0x8245fc6e, 0xbd8e82fb, - 0x1e18aab7, 0x94abcba4, 0x373de3e8, 0x08f69d7d, 0xab60b531, - 0x77606057, 0xd4f6481b, 0xeb3d368e, 0x48ab1ec2, 0x884d9a03, - 0x2bdbb24f, 0x1410ccda, 0xb786e496, 0x6b8631f0, 0xc81019bc, - 0xf7db6729, 0x544d4f65, 0xad6768ea, 0x0ef140a6, 0x313a3e33, - 0x92ac167f, 0x4eacc319, 0xed3aeb55, 0xd2f195c0, 0x7167bd8c, - 0xb181394d, 0x12171101, 0x2ddc6f94, 0x8e4a47d8, 0x524a92be, - 0xf1dcbaf2, 0xce17c467, 0x6d81ec2b, 0x15141c31, 0xb682347d, - 0x89494ae8, 0x2adf62a4, 0xf6dfb7c2, 0x55499f8e, 0x6a82e11b, - 0xc914c957, 0x09f24d96, 0xaa6465da, 0x95af1b4f, 0x36393303, - 0xea39e665, 0x49afce29, 0x7664b0bc, 0xd5f298f0, 0x2cd8bf7f, - 0x8f4e9733, 0xb085e9a6, 0x1313c1ea, 0xcf13148c, 0x6c853cc0, - 0x534e4255, 0xf0d86a19, 0x303eeed8, 0x93a8c694, 0xac63b801, - 0x0ff5904d, 0xd3f5452b, 0x70636d67, 0x4fa813f2, 0xec3e3bbe, - 0x668d5aad, 0xc51b72e1, 0xfad00c74, 0x59462438, 0x8546f15e, - 0x26d0d912, 0x191ba787, 0xba8d8fcb, 0x7a6b0b0a, 0xd9fd2346, - 0xe6365dd3, 0x45a0759f, 0x99a0a0f9, 0x3a3688b5, 0x05fdf620, - 0xa66bde6c, 0x5f41f9e3, 0xfcd7d1af, 0xc31caf3a, 0x608a8776, - 0xbc8a5210, 0x1f1c7a5c, 0x20d704c9, 0x83412c85, 0x43a7a844, - 0xe0318008, 0xdffafe9d, 0x7c6cd6d1, 0xa06c03b7, 0x03fa2bfb, - 0x3c31556e, 0x9fa77d22, 0xf2269109, 0x51b0b945, 0x6e7bc7d0, - 0xcdedef9c, 0x11ed3afa, 0xb27b12b6, 0x8db06c23, 0x2e26446f, - 0xeec0c0ae, 0x4d56e8e2, 0x729d9677, 0xd10bbe3b, 0x0d0b6b5d, - 0xae9d4311, 0x91563d84, 0x32c015c8, 0xcbea3247, 0x687c1a0b, - 0x57b7649e, 0xf4214cd2, 0x282199b4, 0x8bb7b1f8, 0xb47ccf6d, - 0x17eae721, 0xd70c63e0, 0x749a4bac, 0x4b513539, 0xe8c71d75, - 0x34c7c813, 0x9751e05f, 0xa89a9eca, 0x0b0cb686, 0x81bfd795, - 0x2229ffd9, 0x1de2814c, 0xbe74a900, 0x62747c66, 0xc1e2542a, - 0xfe292abf, 0x5dbf02f3, 0x9d598632, 0x3ecfae7e, 0x0104d0eb, - 0xa292f8a7, 0x7e922dc1, 0xdd04058d, 0xe2cf7b18, 0x41595354, - 0xb87374db, 0x1be55c97, 0x242e2202, 0x87b80a4e, 0x5bb8df28, - 0xf82ef764, 0xc7e589f1, 0x6473a1bd, 0xa495257c, 0x07030d30, - 0x38c873a5, 0x9b5e5be9, 0x475e8e8f, 0xe4c8a6c3, 0xdb03d856, - 0x7895f01a}, - {0x00000000, 0x2a283862, 0x545070c4, 0x7e7848a6, 0xa8a0e188, - 0x8288d9ea, 0xfcf0914c, 0xd6d8a92e, 0x8a30c551, 0xa018fd33, - 0xde60b595, 0xf4488df7, 0x229024d9, 0x08b81cbb, 0x76c0541d, - 0x5ce86c7f, 0xcf108ce3, 0xe538b481, 0x9b40fc27, 0xb168c445, - 0x67b06d6b, 0x4d985509, 0x33e01daf, 0x19c825cd, 0x452049b2, - 0x6f0871d0, 0x11703976, 0x3b580114, 0xed80a83a, 0xc7a89058, - 0xb9d0d8fe, 0x93f8e09c, 0x45501f87, 0x6f7827e5, 0x11006f43, - 0x3b285721, 0xedf0fe0f, 0xc7d8c66d, 0xb9a08ecb, 0x9388b6a9, - 0xcf60dad6, 0xe548e2b4, 0x9b30aa12, 0xb1189270, 0x67c03b5e, - 0x4de8033c, 0x33904b9a, 0x19b873f8, 0x8a409364, 0xa068ab06, - 0xde10e3a0, 0xf438dbc2, 0x22e072ec, 0x08c84a8e, 0x76b00228, - 0x5c983a4a, 0x00705635, 0x2a586e57, 0x542026f1, 0x7e081e93, - 0xa8d0b7bd, 0x82f88fdf, 0xfc80c779, 0xd6a8ff1b, 0x8aa03f0e, - 0xa088076c, 0xdef04fca, 0xf4d877a8, 0x2200de86, 0x0828e6e4, - 0x7650ae42, 0x5c789620, 0x0090fa5f, 0x2ab8c23d, 0x54c08a9b, - 0x7ee8b2f9, 0xa8301bd7, 0x821823b5, 0xfc606b13, 0xd6485371, - 0x45b0b3ed, 0x6f988b8f, 0x11e0c329, 0x3bc8fb4b, 0xed105265, - 0xc7386a07, 0xb94022a1, 0x93681ac3, 0xcf8076bc, 0xe5a84ede, - 0x9bd00678, 0xb1f83e1a, 0x67209734, 0x4d08af56, 0x3370e7f0, - 0x1958df92, 0xcff02089, 0xe5d818eb, 0x9ba0504d, 0xb188682f, - 0x6750c101, 0x4d78f963, 0x3300b1c5, 0x192889a7, 0x45c0e5d8, - 0x6fe8ddba, 0x1190951c, 0x3bb8ad7e, 0xed600450, 0xc7483c32, - 0xb9307494, 0x93184cf6, 0x00e0ac6a, 0x2ac89408, 0x54b0dcae, - 0x7e98e4cc, 0xa8404de2, 0x82687580, 0xfc103d26, 0xd6380544, - 0x8ad0693b, 0xa0f85159, 0xde8019ff, 0xf4a8219d, 0x227088b3, - 0x0858b0d1, 0x7620f877, 0x5c08c015, 0xce31785d, 0xe419403f, - 0x9a610899, 0xb04930fb, 0x669199d5, 0x4cb9a1b7, 0x32c1e911, - 0x18e9d173, 0x4401bd0c, 0x6e29856e, 0x1051cdc8, 0x3a79f5aa, - 0xeca15c84, 0xc68964e6, 0xb8f12c40, 0x92d91422, 0x0121f4be, - 0x2b09ccdc, 0x5571847a, 0x7f59bc18, 0xa9811536, 0x83a92d54, - 0xfdd165f2, 0xd7f95d90, 0x8b1131ef, 0xa139098d, 0xdf41412b, - 0xf5697949, 0x23b1d067, 0x0999e805, 0x77e1a0a3, 0x5dc998c1, - 0x8b6167da, 0xa1495fb8, 0xdf31171e, 0xf5192f7c, 0x23c18652, - 0x09e9be30, 0x7791f696, 0x5db9cef4, 0x0151a28b, 0x2b799ae9, - 0x5501d24f, 0x7f29ea2d, 0xa9f14303, 0x83d97b61, 0xfda133c7, - 0xd7890ba5, 0x4471eb39, 0x6e59d35b, 0x10219bfd, 0x3a09a39f, - 0xecd10ab1, 0xc6f932d3, 0xb8817a75, 0x92a94217, 0xce412e68, - 0xe469160a, 0x9a115eac, 0xb03966ce, 0x66e1cfe0, 0x4cc9f782, - 0x32b1bf24, 0x18998746, 0x44914753, 0x6eb97f31, 0x10c13797, - 0x3ae90ff5, 0xec31a6db, 0xc6199eb9, 0xb861d61f, 0x9249ee7d, - 0xcea18202, 0xe489ba60, 0x9af1f2c6, 0xb0d9caa4, 0x6601638a, - 0x4c295be8, 0x3251134e, 0x18792b2c, 0x8b81cbb0, 0xa1a9f3d2, - 0xdfd1bb74, 0xf5f98316, 0x23212a38, 0x0909125a, 0x77715afc, - 0x5d59629e, 0x01b10ee1, 0x2b993683, 0x55e17e25, 0x7fc94647, - 0xa911ef69, 0x8339d70b, 0xfd419fad, 0xd769a7cf, 0x01c158d4, - 0x2be960b6, 0x55912810, 0x7fb91072, 0xa961b95c, 0x8349813e, - 0xfd31c998, 0xd719f1fa, 0x8bf19d85, 0xa1d9a5e7, 0xdfa1ed41, - 0xf589d523, 0x23517c0d, 0x0979446f, 0x77010cc9, 0x5d2934ab, - 0xced1d437, 0xe4f9ec55, 0x9a81a4f3, 0xb0a99c91, 0x667135bf, - 0x4c590ddd, 0x3221457b, 0x18097d19, 0x44e11166, 0x6ec92904, - 0x10b161a2, 0x3a9959c0, 0xec41f0ee, 0xc669c88c, 0xb811802a, - 0x9239b848}, - {0x00000000, 0x4713f6fb, 0x8e27edf6, 0xc9341b0d, 0xc73eddad, - 0x802d2b56, 0x4919305b, 0x0e0ac6a0, 0x550cbd1b, 0x121f4be0, - 0xdb2b50ed, 0x9c38a616, 0x923260b6, 0xd521964d, 0x1c158d40, - 0x5b067bbb, 0xaa197a36, 0xed0a8ccd, 0x243e97c0, 0x632d613b, - 0x6d27a79b, 0x2a345160, 0xe3004a6d, 0xa413bc96, 0xff15c72d, - 0xb80631d6, 0x71322adb, 0x3621dc20, 0x382b1a80, 0x7f38ec7b, - 0xb60cf776, 0xf11f018d, 0x8f43f22d, 0xc85004d6, 0x01641fdb, - 0x4677e920, 0x487d2f80, 0x0f6ed97b, 0xc65ac276, 0x8149348d, - 0xda4f4f36, 0x9d5cb9cd, 0x5468a2c0, 0x137b543b, 0x1d71929b, - 0x5a626460, 0x93567f6d, 0xd4458996, 0x255a881b, 0x62497ee0, - 0xab7d65ed, 0xec6e9316, 0xe26455b6, 0xa577a34d, 0x6c43b840, - 0x2b504ebb, 0x70563500, 0x3745c3fb, 0xfe71d8f6, 0xb9622e0d, - 0xb768e8ad, 0xf07b1e56, 0x394f055b, 0x7e5cf3a0, 0xc5f6e21b, - 0x82e514e0, 0x4bd10fed, 0x0cc2f916, 0x02c83fb6, 0x45dbc94d, - 0x8cefd240, 0xcbfc24bb, 0x90fa5f00, 0xd7e9a9fb, 0x1eddb2f6, - 0x59ce440d, 0x57c482ad, 0x10d77456, 0xd9e36f5b, 0x9ef099a0, - 0x6fef982d, 0x28fc6ed6, 0xe1c875db, 0xa6db8320, 0xa8d14580, - 0xefc2b37b, 0x26f6a876, 0x61e55e8d, 0x3ae32536, 0x7df0d3cd, - 0xb4c4c8c0, 0xf3d73e3b, 0xfdddf89b, 0xbace0e60, 0x73fa156d, - 0x34e9e396, 0x4ab51036, 0x0da6e6cd, 0xc492fdc0, 0x83810b3b, - 0x8d8bcd9b, 0xca983b60, 0x03ac206d, 0x44bfd696, 0x1fb9ad2d, - 0x58aa5bd6, 0x919e40db, 0xd68db620, 0xd8877080, 0x9f94867b, - 0x56a09d76, 0x11b36b8d, 0xe0ac6a00, 0xa7bf9cfb, 0x6e8b87f6, - 0x2998710d, 0x2792b7ad, 0x60814156, 0xa9b55a5b, 0xeea6aca0, - 0xb5a0d71b, 0xf2b321e0, 0x3b873aed, 0x7c94cc16, 0x729e0ab6, - 0x358dfc4d, 0xfcb9e740, 0xbbaa11bb, 0x509cc277, 0x178f348c, - 0xdebb2f81, 0x99a8d97a, 0x97a21fda, 0xd0b1e921, 0x1985f22c, - 0x5e9604d7, 0x05907f6c, 0x42838997, 0x8bb7929a, 0xcca46461, - 0xc2aea2c1, 0x85bd543a, 0x4c894f37, 0x0b9ab9cc, 0xfa85b841, - 0xbd964eba, 0x74a255b7, 0x33b1a34c, 0x3dbb65ec, 0x7aa89317, - 0xb39c881a, 0xf48f7ee1, 0xaf89055a, 0xe89af3a1, 0x21aee8ac, - 0x66bd1e57, 0x68b7d8f7, 0x2fa42e0c, 0xe6903501, 0xa183c3fa, - 0xdfdf305a, 0x98ccc6a1, 0x51f8ddac, 0x16eb2b57, 0x18e1edf7, - 0x5ff21b0c, 0x96c60001, 0xd1d5f6fa, 0x8ad38d41, 0xcdc07bba, - 0x04f460b7, 0x43e7964c, 0x4ded50ec, 0x0afea617, 0xc3cabd1a, - 0x84d94be1, 0x75c64a6c, 0x32d5bc97, 0xfbe1a79a, 0xbcf25161, - 0xb2f897c1, 0xf5eb613a, 0x3cdf7a37, 0x7bcc8ccc, 0x20caf777, - 0x67d9018c, 0xaeed1a81, 0xe9feec7a, 0xe7f42ada, 0xa0e7dc21, - 0x69d3c72c, 0x2ec031d7, 0x956a206c, 0xd279d697, 0x1b4dcd9a, - 0x5c5e3b61, 0x5254fdc1, 0x15470b3a, 0xdc731037, 0x9b60e6cc, - 0xc0669d77, 0x87756b8c, 0x4e417081, 0x0952867a, 0x075840da, - 0x404bb621, 0x897fad2c, 0xce6c5bd7, 0x3f735a5a, 0x7860aca1, - 0xb154b7ac, 0xf6474157, 0xf84d87f7, 0xbf5e710c, 0x766a6a01, - 0x31799cfa, 0x6a7fe741, 0x2d6c11ba, 0xe4580ab7, 0xa34bfc4c, - 0xad413aec, 0xea52cc17, 0x2366d71a, 0x647521e1, 0x1a29d241, - 0x5d3a24ba, 0x940e3fb7, 0xd31dc94c, 0xdd170fec, 0x9a04f917, - 0x5330e21a, 0x142314e1, 0x4f256f5a, 0x083699a1, 0xc10282ac, - 0x86117457, 0x881bb2f7, 0xcf08440c, 0x063c5f01, 0x412fa9fa, - 0xb030a877, 0xf7235e8c, 0x3e174581, 0x7904b37a, 0x770e75da, - 0x301d8321, 0xf929982c, 0xbe3a6ed7, 0xe53c156c, 0xa22fe397, - 0x6b1bf89a, 0x2c080e61, 0x2202c8c1, 0x65113e3a, 0xac252537, - 0xeb36d3cc}, - {0x00000000, 0xa13984ee, 0x99020f9d, 0x383b8b73, 0xe975197b, - 0x484c9d95, 0x707716e6, 0xd14e9208, 0x099b34b7, 0xa8a2b059, - 0x90993b2a, 0x31a0bfc4, 0xe0ee2dcc, 0x41d7a922, 0x79ec2251, - 0xd8d5a6bf, 0x1336696e, 0xb20fed80, 0x8a3466f3, 0x2b0de21d, - 0xfa437015, 0x5b7af4fb, 0x63417f88, 0xc278fb66, 0x1aad5dd9, - 0xbb94d937, 0x83af5244, 0x2296d6aa, 0xf3d844a2, 0x52e1c04c, - 0x6ada4b3f, 0xcbe3cfd1, 0x266cd2dc, 0x87555632, 0xbf6edd41, - 0x1e5759af, 0xcf19cba7, 0x6e204f49, 0x561bc43a, 0xf72240d4, - 0x2ff7e66b, 0x8ece6285, 0xb6f5e9f6, 0x17cc6d18, 0xc682ff10, - 0x67bb7bfe, 0x5f80f08d, 0xfeb97463, 0x355abbb2, 0x94633f5c, - 0xac58b42f, 0x0d6130c1, 0xdc2fa2c9, 0x7d162627, 0x452dad54, - 0xe41429ba, 0x3cc18f05, 0x9df80beb, 0xa5c38098, 0x04fa0476, - 0xd5b4967e, 0x748d1290, 0x4cb699e3, 0xed8f1d0d, 0x4cd9a5b8, - 0xede02156, 0xd5dbaa25, 0x74e22ecb, 0xa5acbcc3, 0x0495382d, - 0x3caeb35e, 0x9d9737b0, 0x4542910f, 0xe47b15e1, 0xdc409e92, - 0x7d791a7c, 0xac378874, 0x0d0e0c9a, 0x353587e9, 0x940c0307, - 0x5fefccd6, 0xfed64838, 0xc6edc34b, 0x67d447a5, 0xb69ad5ad, - 0x17a35143, 0x2f98da30, 0x8ea15ede, 0x5674f861, 0xf74d7c8f, - 0xcf76f7fc, 0x6e4f7312, 0xbf01e11a, 0x1e3865f4, 0x2603ee87, - 0x873a6a69, 0x6ab57764, 0xcb8cf38a, 0xf3b778f9, 0x528efc17, - 0x83c06e1f, 0x22f9eaf1, 0x1ac26182, 0xbbfbe56c, 0x632e43d3, - 0xc217c73d, 0xfa2c4c4e, 0x5b15c8a0, 0x8a5b5aa8, 0x2b62de46, - 0x13595535, 0xb260d1db, 0x79831e0a, 0xd8ba9ae4, 0xe0811197, - 0x41b89579, 0x90f60771, 0x31cf839f, 0x09f408ec, 0xa8cd8c02, - 0x70182abd, 0xd121ae53, 0xe91a2520, 0x4823a1ce, 0x996d33c6, - 0x3854b728, 0x006f3c5b, 0xa156b8b5, 0x99b34b70, 0x388acf9e, - 0x00b144ed, 0xa188c003, 0x70c6520b, 0xd1ffd6e5, 0xe9c45d96, - 0x48fdd978, 0x90287fc7, 0x3111fb29, 0x092a705a, 0xa813f4b4, - 0x795d66bc, 0xd864e252, 0xe05f6921, 0x4166edcf, 0x8a85221e, - 0x2bbca6f0, 0x13872d83, 0xb2bea96d, 0x63f03b65, 0xc2c9bf8b, - 0xfaf234f8, 0x5bcbb016, 0x831e16a9, 0x22279247, 0x1a1c1934, - 0xbb259dda, 0x6a6b0fd2, 0xcb528b3c, 0xf369004f, 0x525084a1, - 0xbfdf99ac, 0x1ee61d42, 0x26dd9631, 0x87e412df, 0x56aa80d7, - 0xf7930439, 0xcfa88f4a, 0x6e910ba4, 0xb644ad1b, 0x177d29f5, - 0x2f46a286, 0x8e7f2668, 0x5f31b460, 0xfe08308e, 0xc633bbfd, - 0x670a3f13, 0xace9f0c2, 0x0dd0742c, 0x35ebff5f, 0x94d27bb1, - 0x459ce9b9, 0xe4a56d57, 0xdc9ee624, 0x7da762ca, 0xa572c475, - 0x044b409b, 0x3c70cbe8, 0x9d494f06, 0x4c07dd0e, 0xed3e59e0, - 0xd505d293, 0x743c567d, 0xd56aeec8, 0x74536a26, 0x4c68e155, - 0xed5165bb, 0x3c1ff7b3, 0x9d26735d, 0xa51df82e, 0x04247cc0, - 0xdcf1da7f, 0x7dc85e91, 0x45f3d5e2, 0xe4ca510c, 0x3584c304, - 0x94bd47ea, 0xac86cc99, 0x0dbf4877, 0xc65c87a6, 0x67650348, - 0x5f5e883b, 0xfe670cd5, 0x2f299edd, 0x8e101a33, 0xb62b9140, - 0x171215ae, 0xcfc7b311, 0x6efe37ff, 0x56c5bc8c, 0xf7fc3862, - 0x26b2aa6a, 0x878b2e84, 0xbfb0a5f7, 0x1e892119, 0xf3063c14, - 0x523fb8fa, 0x6a043389, 0xcb3db767, 0x1a73256f, 0xbb4aa181, - 0x83712af2, 0x2248ae1c, 0xfa9d08a3, 0x5ba48c4d, 0x639f073e, - 0xc2a683d0, 0x13e811d8, 0xb2d19536, 0x8aea1e45, 0x2bd39aab, - 0xe030557a, 0x4109d194, 0x79325ae7, 0xd80bde09, 0x09454c01, - 0xa87cc8ef, 0x9047439c, 0x317ec772, 0xe9ab61cd, 0x4892e523, - 0x70a96e50, 0xd190eabe, 0x00de78b6, 0xa1e7fc58, 0x99dc772b, - 0x38e5f3c5}, - {0x00000000, 0xe81790a1, 0x0b5e2703, 0xe349b7a2, 0x16bc4e06, - 0xfeabdea7, 0x1de26905, 0xf5f5f9a4, 0x2d789c0c, 0xc56f0cad, - 0x2626bb0f, 0xce312bae, 0x3bc4d20a, 0xd3d342ab, 0x309af509, - 0xd88d65a8, 0x5af13818, 0xb2e6a8b9, 0x51af1f1b, 0xb9b88fba, - 0x4c4d761e, 0xa45ae6bf, 0x4713511d, 0xaf04c1bc, 0x7789a414, - 0x9f9e34b5, 0x7cd78317, 0x94c013b6, 0x6135ea12, 0x89227ab3, - 0x6a6bcd11, 0x827c5db0, 0xb5e27030, 0x5df5e091, 0xbebc5733, - 0x56abc792, 0xa35e3e36, 0x4b49ae97, 0xa8001935, 0x40178994, - 0x989aec3c, 0x708d7c9d, 0x93c4cb3f, 0x7bd35b9e, 0x8e26a23a, - 0x6631329b, 0x85788539, 0x6d6f1598, 0xef134828, 0x0704d889, - 0xe44d6f2b, 0x0c5aff8a, 0xf9af062e, 0x11b8968f, 0xf2f1212d, - 0x1ae6b18c, 0xc26bd424, 0x2a7c4485, 0xc935f327, 0x21226386, - 0xd4d79a22, 0x3cc00a83, 0xdf89bd21, 0x379e2d80, 0xb0b5e621, - 0x58a27680, 0xbbebc122, 0x53fc5183, 0xa609a827, 0x4e1e3886, - 0xad578f24, 0x45401f85, 0x9dcd7a2d, 0x75daea8c, 0x96935d2e, - 0x7e84cd8f, 0x8b71342b, 0x6366a48a, 0x802f1328, 0x68388389, - 0xea44de39, 0x02534e98, 0xe11af93a, 0x090d699b, 0xfcf8903f, - 0x14ef009e, 0xf7a6b73c, 0x1fb1279d, 0xc73c4235, 0x2f2bd294, - 0xcc626536, 0x2475f597, 0xd1800c33, 0x39979c92, 0xdade2b30, - 0x32c9bb91, 0x05579611, 0xed4006b0, 0x0e09b112, 0xe61e21b3, - 0x13ebd817, 0xfbfc48b6, 0x18b5ff14, 0xf0a26fb5, 0x282f0a1d, - 0xc0389abc, 0x23712d1e, 0xcb66bdbf, 0x3e93441b, 0xd684d4ba, - 0x35cd6318, 0xdddaf3b9, 0x5fa6ae09, 0xb7b13ea8, 0x54f8890a, - 0xbcef19ab, 0x491ae00f, 0xa10d70ae, 0x4244c70c, 0xaa5357ad, - 0x72de3205, 0x9ac9a2a4, 0x79801506, 0x919785a7, 0x64627c03, - 0x8c75eca2, 0x6f3c5b00, 0x872bcba1, 0xba1aca03, 0x520d5aa2, - 0xb144ed00, 0x59537da1, 0xaca68405, 0x44b114a4, 0xa7f8a306, - 0x4fef33a7, 0x9762560f, 0x7f75c6ae, 0x9c3c710c, 0x742be1ad, - 0x81de1809, 0x69c988a8, 0x8a803f0a, 0x6297afab, 0xe0ebf21b, - 0x08fc62ba, 0xebb5d518, 0x03a245b9, 0xf657bc1d, 0x1e402cbc, - 0xfd099b1e, 0x151e0bbf, 0xcd936e17, 0x2584feb6, 0xc6cd4914, - 0x2edad9b5, 0xdb2f2011, 0x3338b0b0, 0xd0710712, 0x386697b3, - 0x0ff8ba33, 0xe7ef2a92, 0x04a69d30, 0xecb10d91, 0x1944f435, - 0xf1536494, 0x121ad336, 0xfa0d4397, 0x2280263f, 0xca97b69e, - 0x29de013c, 0xc1c9919d, 0x343c6839, 0xdc2bf898, 0x3f624f3a, - 0xd775df9b, 0x5509822b, 0xbd1e128a, 0x5e57a528, 0xb6403589, - 0x43b5cc2d, 0xaba25c8c, 0x48ebeb2e, 0xa0fc7b8f, 0x78711e27, - 0x90668e86, 0x732f3924, 0x9b38a985, 0x6ecd5021, 0x86dac080, - 0x65937722, 0x8d84e783, 0x0aaf2c22, 0xe2b8bc83, 0x01f10b21, - 0xe9e69b80, 0x1c136224, 0xf404f285, 0x174d4527, 0xff5ad586, - 0x27d7b02e, 0xcfc0208f, 0x2c89972d, 0xc49e078c, 0x316bfe28, - 0xd97c6e89, 0x3a35d92b, 0xd222498a, 0x505e143a, 0xb849849b, - 0x5b003339, 0xb317a398, 0x46e25a3c, 0xaef5ca9d, 0x4dbc7d3f, - 0xa5abed9e, 0x7d268836, 0x95311897, 0x7678af35, 0x9e6f3f94, - 0x6b9ac630, 0x838d5691, 0x60c4e133, 0x88d37192, 0xbf4d5c12, - 0x575accb3, 0xb4137b11, 0x5c04ebb0, 0xa9f11214, 0x41e682b5, - 0xa2af3517, 0x4ab8a5b6, 0x9235c01e, 0x7a2250bf, 0x996be71d, - 0x717c77bc, 0x84898e18, 0x6c9e1eb9, 0x8fd7a91b, 0x67c039ba, - 0xe5bc640a, 0x0dabf4ab, 0xeee24309, 0x06f5d3a8, 0xf3002a0c, - 0x1b17baad, 0xf85e0d0f, 0x10499dae, 0xc8c4f806, 0x20d368a7, - 0xc39adf05, 0x2b8d4fa4, 0xde78b600, 0x366f26a1, 0xd5269103, - 0x3d3101a2}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x0000000000000000, 0xa19017e800000000, 0x03275e0b00000000, - 0xa2b749e300000000, 0x064ebc1600000000, 0xa7deabfe00000000, - 0x0569e21d00000000, 0xa4f9f5f500000000, 0x0c9c782d00000000, - 0xad0c6fc500000000, 0x0fbb262600000000, 0xae2b31ce00000000, - 0x0ad2c43b00000000, 0xab42d3d300000000, 0x09f59a3000000000, - 0xa8658dd800000000, 0x1838f15a00000000, 0xb9a8e6b200000000, - 0x1b1faf5100000000, 0xba8fb8b900000000, 0x1e764d4c00000000, - 0xbfe65aa400000000, 0x1d51134700000000, 0xbcc104af00000000, - 0x14a4897700000000, 0xb5349e9f00000000, 0x1783d77c00000000, - 0xb613c09400000000, 0x12ea356100000000, 0xb37a228900000000, - 0x11cd6b6a00000000, 0xb05d7c8200000000, 0x3070e2b500000000, - 0x91e0f55d00000000, 0x3357bcbe00000000, 0x92c7ab5600000000, - 0x363e5ea300000000, 0x97ae494b00000000, 0x351900a800000000, - 0x9489174000000000, 0x3cec9a9800000000, 0x9d7c8d7000000000, - 0x3fcbc49300000000, 0x9e5bd37b00000000, 0x3aa2268e00000000, - 0x9b32316600000000, 0x3985788500000000, 0x98156f6d00000000, - 0x284813ef00000000, 0x89d8040700000000, 0x2b6f4de400000000, - 0x8aff5a0c00000000, 0x2e06aff900000000, 0x8f96b81100000000, - 0x2d21f1f200000000, 0x8cb1e61a00000000, 0x24d46bc200000000, - 0x85447c2a00000000, 0x27f335c900000000, 0x8663222100000000, - 0x229ad7d400000000, 0x830ac03c00000000, 0x21bd89df00000000, - 0x802d9e3700000000, 0x21e6b5b000000000, 0x8076a25800000000, - 0x22c1ebbb00000000, 0x8351fc5300000000, 0x27a809a600000000, - 0x86381e4e00000000, 0x248f57ad00000000, 0x851f404500000000, - 0x2d7acd9d00000000, 0x8ceada7500000000, 0x2e5d939600000000, - 0x8fcd847e00000000, 0x2b34718b00000000, 0x8aa4666300000000, - 0x28132f8000000000, 0x8983386800000000, 0x39de44ea00000000, - 0x984e530200000000, 0x3af91ae100000000, 0x9b690d0900000000, - 0x3f90f8fc00000000, 0x9e00ef1400000000, 0x3cb7a6f700000000, - 0x9d27b11f00000000, 0x35423cc700000000, 0x94d22b2f00000000, - 0x366562cc00000000, 0x97f5752400000000, 0x330c80d100000000, - 0x929c973900000000, 0x302bdeda00000000, 0x91bbc93200000000, - 0x1196570500000000, 0xb00640ed00000000, 0x12b1090e00000000, - 0xb3211ee600000000, 0x17d8eb1300000000, 0xb648fcfb00000000, - 0x14ffb51800000000, 0xb56fa2f000000000, 0x1d0a2f2800000000, - 0xbc9a38c000000000, 0x1e2d712300000000, 0xbfbd66cb00000000, - 0x1b44933e00000000, 0xbad484d600000000, 0x1863cd3500000000, - 0xb9f3dadd00000000, 0x09aea65f00000000, 0xa83eb1b700000000, - 0x0a89f85400000000, 0xab19efbc00000000, 0x0fe01a4900000000, - 0xae700da100000000, 0x0cc7444200000000, 0xad5753aa00000000, - 0x0532de7200000000, 0xa4a2c99a00000000, 0x0615807900000000, - 0xa785979100000000, 0x037c626400000000, 0xa2ec758c00000000, - 0x005b3c6f00000000, 0xa1cb2b8700000000, 0x03ca1aba00000000, - 0xa25a0d5200000000, 0x00ed44b100000000, 0xa17d535900000000, - 0x0584a6ac00000000, 0xa414b14400000000, 0x06a3f8a700000000, - 0xa733ef4f00000000, 0x0f56629700000000, 0xaec6757f00000000, - 0x0c713c9c00000000, 0xade12b7400000000, 0x0918de8100000000, - 0xa888c96900000000, 0x0a3f808a00000000, 0xabaf976200000000, - 0x1bf2ebe000000000, 0xba62fc0800000000, 0x18d5b5eb00000000, - 0xb945a20300000000, 0x1dbc57f600000000, 0xbc2c401e00000000, - 0x1e9b09fd00000000, 0xbf0b1e1500000000, 0x176e93cd00000000, - 0xb6fe842500000000, 0x1449cdc600000000, 0xb5d9da2e00000000, - 0x11202fdb00000000, 0xb0b0383300000000, 0x120771d000000000, - 0xb397663800000000, 0x33baf80f00000000, 0x922aefe700000000, - 0x309da60400000000, 0x910db1ec00000000, 0x35f4441900000000, - 0x946453f100000000, 0x36d31a1200000000, 0x97430dfa00000000, - 0x3f26802200000000, 0x9eb697ca00000000, 0x3c01de2900000000, - 0x9d91c9c100000000, 0x39683c3400000000, 0x98f82bdc00000000, - 0x3a4f623f00000000, 0x9bdf75d700000000, 0x2b82095500000000, - 0x8a121ebd00000000, 0x28a5575e00000000, 0x893540b600000000, - 0x2dccb54300000000, 0x8c5ca2ab00000000, 0x2eebeb4800000000, - 0x8f7bfca000000000, 0x271e717800000000, 0x868e669000000000, - 0x24392f7300000000, 0x85a9389b00000000, 0x2150cd6e00000000, - 0x80c0da8600000000, 0x2277936500000000, 0x83e7848d00000000, - 0x222caf0a00000000, 0x83bcb8e200000000, 0x210bf10100000000, - 0x809be6e900000000, 0x2462131c00000000, 0x85f204f400000000, - 0x27454d1700000000, 0x86d55aff00000000, 0x2eb0d72700000000, - 0x8f20c0cf00000000, 0x2d97892c00000000, 0x8c079ec400000000, - 0x28fe6b3100000000, 0x896e7cd900000000, 0x2bd9353a00000000, - 0x8a4922d200000000, 0x3a145e5000000000, 0x9b8449b800000000, - 0x3933005b00000000, 0x98a317b300000000, 0x3c5ae24600000000, - 0x9dcaf5ae00000000, 0x3f7dbc4d00000000, 0x9eedaba500000000, - 0x3688267d00000000, 0x9718319500000000, 0x35af787600000000, - 0x943f6f9e00000000, 0x30c69a6b00000000, 0x91568d8300000000, - 0x33e1c46000000000, 0x9271d38800000000, 0x125c4dbf00000000, - 0xb3cc5a5700000000, 0x117b13b400000000, 0xb0eb045c00000000, - 0x1412f1a900000000, 0xb582e64100000000, 0x1735afa200000000, - 0xb6a5b84a00000000, 0x1ec0359200000000, 0xbf50227a00000000, - 0x1de76b9900000000, 0xbc777c7100000000, 0x188e898400000000, - 0xb91e9e6c00000000, 0x1ba9d78f00000000, 0xba39c06700000000, - 0x0a64bce500000000, 0xabf4ab0d00000000, 0x0943e2ee00000000, - 0xa8d3f50600000000, 0x0c2a00f300000000, 0xadba171b00000000, - 0x0f0d5ef800000000, 0xae9d491000000000, 0x06f8c4c800000000, - 0xa768d32000000000, 0x05df9ac300000000, 0xa44f8d2b00000000, - 0x00b678de00000000, 0xa1266f3600000000, 0x039126d500000000, - 0xa201313d00000000}, - {0x0000000000000000, 0xee8439a100000000, 0x9d0f029900000000, - 0x738b3b3800000000, 0x7b1975e900000000, 0x959d4c4800000000, - 0xe616777000000000, 0x08924ed100000000, 0xb7349b0900000000, - 0x59b0a2a800000000, 0x2a3b999000000000, 0xc4bfa03100000000, - 0xcc2deee000000000, 0x22a9d74100000000, 0x5122ec7900000000, - 0xbfa6d5d800000000, 0x6e69361300000000, 0x80ed0fb200000000, - 0xf366348a00000000, 0x1de20d2b00000000, 0x157043fa00000000, - 0xfbf47a5b00000000, 0x887f416300000000, 0x66fb78c200000000, - 0xd95dad1a00000000, 0x37d994bb00000000, 0x4452af8300000000, - 0xaad6962200000000, 0xa244d8f300000000, 0x4cc0e15200000000, - 0x3f4bda6a00000000, 0xd1cfe3cb00000000, 0xdcd26c2600000000, - 0x3256558700000000, 0x41dd6ebf00000000, 0xaf59571e00000000, - 0xa7cb19cf00000000, 0x494f206e00000000, 0x3ac41b5600000000, - 0xd44022f700000000, 0x6be6f72f00000000, 0x8562ce8e00000000, - 0xf6e9f5b600000000, 0x186dcc1700000000, 0x10ff82c600000000, - 0xfe7bbb6700000000, 0x8df0805f00000000, 0x6374b9fe00000000, - 0xb2bb5a3500000000, 0x5c3f639400000000, 0x2fb458ac00000000, - 0xc130610d00000000, 0xc9a22fdc00000000, 0x2726167d00000000, - 0x54ad2d4500000000, 0xba2914e400000000, 0x058fc13c00000000, - 0xeb0bf89d00000000, 0x9880c3a500000000, 0x7604fa0400000000, - 0x7e96b4d500000000, 0x90128d7400000000, 0xe399b64c00000000, - 0x0d1d8fed00000000, 0xb8a5d94c00000000, 0x5621e0ed00000000, - 0x25aadbd500000000, 0xcb2ee27400000000, 0xc3bcaca500000000, - 0x2d38950400000000, 0x5eb3ae3c00000000, 0xb037979d00000000, - 0x0f91424500000000, 0xe1157be400000000, 0x929e40dc00000000, - 0x7c1a797d00000000, 0x748837ac00000000, 0x9a0c0e0d00000000, - 0xe987353500000000, 0x07030c9400000000, 0xd6ccef5f00000000, - 0x3848d6fe00000000, 0x4bc3edc600000000, 0xa547d46700000000, - 0xadd59ab600000000, 0x4351a31700000000, 0x30da982f00000000, - 0xde5ea18e00000000, 0x61f8745600000000, 0x8f7c4df700000000, - 0xfcf776cf00000000, 0x12734f6e00000000, 0x1ae101bf00000000, - 0xf465381e00000000, 0x87ee032600000000, 0x696a3a8700000000, - 0x6477b56a00000000, 0x8af38ccb00000000, 0xf978b7f300000000, - 0x17fc8e5200000000, 0x1f6ec08300000000, 0xf1eaf92200000000, - 0x8261c21a00000000, 0x6ce5fbbb00000000, 0xd3432e6300000000, - 0x3dc717c200000000, 0x4e4c2cfa00000000, 0xa0c8155b00000000, - 0xa85a5b8a00000000, 0x46de622b00000000, 0x3555591300000000, - 0xdbd160b200000000, 0x0a1e837900000000, 0xe49abad800000000, - 0x971181e000000000, 0x7995b84100000000, 0x7107f69000000000, - 0x9f83cf3100000000, 0xec08f40900000000, 0x028ccda800000000, - 0xbd2a187000000000, 0x53ae21d100000000, 0x20251ae900000000, - 0xcea1234800000000, 0xc6336d9900000000, 0x28b7543800000000, - 0x5b3c6f0000000000, 0xb5b856a100000000, 0x704bb39900000000, - 0x9ecf8a3800000000, 0xed44b10000000000, 0x03c088a100000000, - 0x0b52c67000000000, 0xe5d6ffd100000000, 0x965dc4e900000000, - 0x78d9fd4800000000, 0xc77f289000000000, 0x29fb113100000000, - 0x5a702a0900000000, 0xb4f413a800000000, 0xbc665d7900000000, - 0x52e264d800000000, 0x21695fe000000000, 0xcfed664100000000, - 0x1e22858a00000000, 0xf0a6bc2b00000000, 0x832d871300000000, - 0x6da9beb200000000, 0x653bf06300000000, 0x8bbfc9c200000000, - 0xf834f2fa00000000, 0x16b0cb5b00000000, 0xa9161e8300000000, - 0x4792272200000000, 0x34191c1a00000000, 0xda9d25bb00000000, - 0xd20f6b6a00000000, 0x3c8b52cb00000000, 0x4f0069f300000000, - 0xa184505200000000, 0xac99dfbf00000000, 0x421de61e00000000, - 0x3196dd2600000000, 0xdf12e48700000000, 0xd780aa5600000000, - 0x390493f700000000, 0x4a8fa8cf00000000, 0xa40b916e00000000, - 0x1bad44b600000000, 0xf5297d1700000000, 0x86a2462f00000000, - 0x68267f8e00000000, 0x60b4315f00000000, 0x8e3008fe00000000, - 0xfdbb33c600000000, 0x133f0a6700000000, 0xc2f0e9ac00000000, - 0x2c74d00d00000000, 0x5fffeb3500000000, 0xb17bd29400000000, - 0xb9e99c4500000000, 0x576da5e400000000, 0x24e69edc00000000, - 0xca62a77d00000000, 0x75c472a500000000, 0x9b404b0400000000, - 0xe8cb703c00000000, 0x064f499d00000000, 0x0edd074c00000000, - 0xe0593eed00000000, 0x93d205d500000000, 0x7d563c7400000000, - 0xc8ee6ad500000000, 0x266a537400000000, 0x55e1684c00000000, - 0xbb6551ed00000000, 0xb3f71f3c00000000, 0x5d73269d00000000, - 0x2ef81da500000000, 0xc07c240400000000, 0x7fdaf1dc00000000, - 0x915ec87d00000000, 0xe2d5f34500000000, 0x0c51cae400000000, - 0x04c3843500000000, 0xea47bd9400000000, 0x99cc86ac00000000, - 0x7748bf0d00000000, 0xa6875cc600000000, 0x4803656700000000, - 0x3b885e5f00000000, 0xd50c67fe00000000, 0xdd9e292f00000000, - 0x331a108e00000000, 0x40912bb600000000, 0xae15121700000000, - 0x11b3c7cf00000000, 0xff37fe6e00000000, 0x8cbcc55600000000, - 0x6238fcf700000000, 0x6aaab22600000000, 0x842e8b8700000000, - 0xf7a5b0bf00000000, 0x1921891e00000000, 0x143c06f300000000, - 0xfab83f5200000000, 0x8933046a00000000, 0x67b73dcb00000000, - 0x6f25731a00000000, 0x81a14abb00000000, 0xf22a718300000000, - 0x1cae482200000000, 0xa3089dfa00000000, 0x4d8ca45b00000000, - 0x3e079f6300000000, 0xd083a6c200000000, 0xd811e81300000000, - 0x3695d1b200000000, 0x451eea8a00000000, 0xab9ad32b00000000, - 0x7a5530e000000000, 0x94d1094100000000, 0xe75a327900000000, - 0x09de0bd800000000, 0x014c450900000000, 0xefc87ca800000000, - 0x9c43479000000000, 0x72c77e3100000000, 0xcd61abe900000000, - 0x23e5924800000000, 0x506ea97000000000, 0xbeea90d100000000, - 0xb678de0000000000, 0x58fce7a100000000, 0x2b77dc9900000000, - 0xc5f3e53800000000}, - {0x0000000000000000, 0xfbf6134700000000, 0xf6ed278e00000000, - 0x0d1b34c900000000, 0xaddd3ec700000000, 0x562b2d8000000000, - 0x5b30194900000000, 0xa0c60a0e00000000, 0x1bbd0c5500000000, - 0xe04b1f1200000000, 0xed502bdb00000000, 0x16a6389c00000000, - 0xb660329200000000, 0x4d9621d500000000, 0x408d151c00000000, - 0xbb7b065b00000000, 0x367a19aa00000000, 0xcd8c0aed00000000, - 0xc0973e2400000000, 0x3b612d6300000000, 0x9ba7276d00000000, - 0x6051342a00000000, 0x6d4a00e300000000, 0x96bc13a400000000, - 0x2dc715ff00000000, 0xd63106b800000000, 0xdb2a327100000000, - 0x20dc213600000000, 0x801a2b3800000000, 0x7bec387f00000000, - 0x76f70cb600000000, 0x8d011ff100000000, 0x2df2438f00000000, - 0xd60450c800000000, 0xdb1f640100000000, 0x20e9774600000000, - 0x802f7d4800000000, 0x7bd96e0f00000000, 0x76c25ac600000000, - 0x8d34498100000000, 0x364f4fda00000000, 0xcdb95c9d00000000, - 0xc0a2685400000000, 0x3b547b1300000000, 0x9b92711d00000000, - 0x6064625a00000000, 0x6d7f569300000000, 0x968945d400000000, - 0x1b885a2500000000, 0xe07e496200000000, 0xed657dab00000000, - 0x16936eec00000000, 0xb65564e200000000, 0x4da377a500000000, - 0x40b8436c00000000, 0xbb4e502b00000000, 0x0035567000000000, - 0xfbc3453700000000, 0xf6d871fe00000000, 0x0d2e62b900000000, - 0xade868b700000000, 0x561e7bf000000000, 0x5b054f3900000000, - 0xa0f35c7e00000000, 0x1be2f6c500000000, 0xe014e58200000000, - 0xed0fd14b00000000, 0x16f9c20c00000000, 0xb63fc80200000000, - 0x4dc9db4500000000, 0x40d2ef8c00000000, 0xbb24fccb00000000, - 0x005ffa9000000000, 0xfba9e9d700000000, 0xf6b2dd1e00000000, - 0x0d44ce5900000000, 0xad82c45700000000, 0x5674d71000000000, - 0x5b6fe3d900000000, 0xa099f09e00000000, 0x2d98ef6f00000000, - 0xd66efc2800000000, 0xdb75c8e100000000, 0x2083dba600000000, - 0x8045d1a800000000, 0x7bb3c2ef00000000, 0x76a8f62600000000, - 0x8d5ee56100000000, 0x3625e33a00000000, 0xcdd3f07d00000000, - 0xc0c8c4b400000000, 0x3b3ed7f300000000, 0x9bf8ddfd00000000, - 0x600eceba00000000, 0x6d15fa7300000000, 0x96e3e93400000000, - 0x3610b54a00000000, 0xcde6a60d00000000, 0xc0fd92c400000000, - 0x3b0b818300000000, 0x9bcd8b8d00000000, 0x603b98ca00000000, - 0x6d20ac0300000000, 0x96d6bf4400000000, 0x2dadb91f00000000, - 0xd65baa5800000000, 0xdb409e9100000000, 0x20b68dd600000000, - 0x807087d800000000, 0x7b86949f00000000, 0x769da05600000000, - 0x8d6bb31100000000, 0x006aace000000000, 0xfb9cbfa700000000, - 0xf6878b6e00000000, 0x0d71982900000000, 0xadb7922700000000, - 0x5641816000000000, 0x5b5ab5a900000000, 0xa0aca6ee00000000, - 0x1bd7a0b500000000, 0xe021b3f200000000, 0xed3a873b00000000, - 0x16cc947c00000000, 0xb60a9e7200000000, 0x4dfc8d3500000000, - 0x40e7b9fc00000000, 0xbb11aabb00000000, 0x77c29c5000000000, - 0x8c348f1700000000, 0x812fbbde00000000, 0x7ad9a89900000000, - 0xda1fa29700000000, 0x21e9b1d000000000, 0x2cf2851900000000, - 0xd704965e00000000, 0x6c7f900500000000, 0x9789834200000000, - 0x9a92b78b00000000, 0x6164a4cc00000000, 0xc1a2aec200000000, - 0x3a54bd8500000000, 0x374f894c00000000, 0xccb99a0b00000000, - 0x41b885fa00000000, 0xba4e96bd00000000, 0xb755a27400000000, - 0x4ca3b13300000000, 0xec65bb3d00000000, 0x1793a87a00000000, - 0x1a889cb300000000, 0xe17e8ff400000000, 0x5a0589af00000000, - 0xa1f39ae800000000, 0xace8ae2100000000, 0x571ebd6600000000, - 0xf7d8b76800000000, 0x0c2ea42f00000000, 0x013590e600000000, - 0xfac383a100000000, 0x5a30dfdf00000000, 0xa1c6cc9800000000, - 0xacddf85100000000, 0x572beb1600000000, 0xf7ede11800000000, - 0x0c1bf25f00000000, 0x0100c69600000000, 0xfaf6d5d100000000, - 0x418dd38a00000000, 0xba7bc0cd00000000, 0xb760f40400000000, - 0x4c96e74300000000, 0xec50ed4d00000000, 0x17a6fe0a00000000, - 0x1abdcac300000000, 0xe14bd98400000000, 0x6c4ac67500000000, - 0x97bcd53200000000, 0x9aa7e1fb00000000, 0x6151f2bc00000000, - 0xc197f8b200000000, 0x3a61ebf500000000, 0x377adf3c00000000, - 0xcc8ccc7b00000000, 0x77f7ca2000000000, 0x8c01d96700000000, - 0x811aedae00000000, 0x7aecfee900000000, 0xda2af4e700000000, - 0x21dce7a000000000, 0x2cc7d36900000000, 0xd731c02e00000000, - 0x6c206a9500000000, 0x97d679d200000000, 0x9acd4d1b00000000, - 0x613b5e5c00000000, 0xc1fd545200000000, 0x3a0b471500000000, - 0x371073dc00000000, 0xcce6609b00000000, 0x779d66c000000000, - 0x8c6b758700000000, 0x8170414e00000000, 0x7a86520900000000, - 0xda40580700000000, 0x21b64b4000000000, 0x2cad7f8900000000, - 0xd75b6cce00000000, 0x5a5a733f00000000, 0xa1ac607800000000, - 0xacb754b100000000, 0x574147f600000000, 0xf7874df800000000, - 0x0c715ebf00000000, 0x016a6a7600000000, 0xfa9c793100000000, - 0x41e77f6a00000000, 0xba116c2d00000000, 0xb70a58e400000000, - 0x4cfc4ba300000000, 0xec3a41ad00000000, 0x17cc52ea00000000, - 0x1ad7662300000000, 0xe121756400000000, 0x41d2291a00000000, - 0xba243a5d00000000, 0xb73f0e9400000000, 0x4cc91dd300000000, - 0xec0f17dd00000000, 0x17f9049a00000000, 0x1ae2305300000000, - 0xe114231400000000, 0x5a6f254f00000000, 0xa199360800000000, - 0xac8202c100000000, 0x5774118600000000, 0xf7b21b8800000000, - 0x0c4408cf00000000, 0x015f3c0600000000, 0xfaa92f4100000000, - 0x77a830b000000000, 0x8c5e23f700000000, 0x8145173e00000000, - 0x7ab3047900000000, 0xda750e7700000000, 0x21831d3000000000, - 0x2c9829f900000000, 0xd76e3abe00000000, 0x6c153ce500000000, - 0x97e32fa200000000, 0x9af81b6b00000000, 0x610e082c00000000, - 0xc1c8022200000000, 0x3a3e116500000000, 0x372525ac00000000, - 0xccd336eb00000000}, - {0x0000000000000000, 0x6238282a00000000, 0xc470505400000000, - 0xa648787e00000000, 0x88e1a0a800000000, 0xead9888200000000, - 0x4c91f0fc00000000, 0x2ea9d8d600000000, 0x51c5308a00000000, - 0x33fd18a000000000, 0x95b560de00000000, 0xf78d48f400000000, - 0xd924902200000000, 0xbb1cb80800000000, 0x1d54c07600000000, - 0x7f6ce85c00000000, 0xe38c10cf00000000, 0x81b438e500000000, - 0x27fc409b00000000, 0x45c468b100000000, 0x6b6db06700000000, - 0x0955984d00000000, 0xaf1de03300000000, 0xcd25c81900000000, - 0xb249204500000000, 0xd071086f00000000, 0x7639701100000000, - 0x1401583b00000000, 0x3aa880ed00000000, 0x5890a8c700000000, - 0xfed8d0b900000000, 0x9ce0f89300000000, 0x871f504500000000, - 0xe527786f00000000, 0x436f001100000000, 0x2157283b00000000, - 0x0ffef0ed00000000, 0x6dc6d8c700000000, 0xcb8ea0b900000000, - 0xa9b6889300000000, 0xd6da60cf00000000, 0xb4e248e500000000, - 0x12aa309b00000000, 0x709218b100000000, 0x5e3bc06700000000, - 0x3c03e84d00000000, 0x9a4b903300000000, 0xf873b81900000000, - 0x6493408a00000000, 0x06ab68a000000000, 0xa0e310de00000000, - 0xc2db38f400000000, 0xec72e02200000000, 0x8e4ac80800000000, - 0x2802b07600000000, 0x4a3a985c00000000, 0x3556700000000000, - 0x576e582a00000000, 0xf126205400000000, 0x931e087e00000000, - 0xbdb7d0a800000000, 0xdf8ff88200000000, 0x79c780fc00000000, - 0x1bffa8d600000000, 0x0e3fa08a00000000, 0x6c0788a000000000, - 0xca4ff0de00000000, 0xa877d8f400000000, 0x86de002200000000, - 0xe4e6280800000000, 0x42ae507600000000, 0x2096785c00000000, - 0x5ffa900000000000, 0x3dc2b82a00000000, 0x9b8ac05400000000, - 0xf9b2e87e00000000, 0xd71b30a800000000, 0xb523188200000000, - 0x136b60fc00000000, 0x715348d600000000, 0xedb3b04500000000, - 0x8f8b986f00000000, 0x29c3e01100000000, 0x4bfbc83b00000000, - 0x655210ed00000000, 0x076a38c700000000, 0xa12240b900000000, - 0xc31a689300000000, 0xbc7680cf00000000, 0xde4ea8e500000000, - 0x7806d09b00000000, 0x1a3ef8b100000000, 0x3497206700000000, - 0x56af084d00000000, 0xf0e7703300000000, 0x92df581900000000, - 0x8920f0cf00000000, 0xeb18d8e500000000, 0x4d50a09b00000000, - 0x2f6888b100000000, 0x01c1506700000000, 0x63f9784d00000000, - 0xc5b1003300000000, 0xa789281900000000, 0xd8e5c04500000000, - 0xbadde86f00000000, 0x1c95901100000000, 0x7eadb83b00000000, - 0x500460ed00000000, 0x323c48c700000000, 0x947430b900000000, - 0xf64c189300000000, 0x6aace00000000000, 0x0894c82a00000000, - 0xaedcb05400000000, 0xcce4987e00000000, 0xe24d40a800000000, - 0x8075688200000000, 0x263d10fc00000000, 0x440538d600000000, - 0x3b69d08a00000000, 0x5951f8a000000000, 0xff1980de00000000, - 0x9d21a8f400000000, 0xb388702200000000, 0xd1b0580800000000, - 0x77f8207600000000, 0x15c0085c00000000, 0x5d7831ce00000000, - 0x3f4019e400000000, 0x9908619a00000000, 0xfb3049b000000000, - 0xd599916600000000, 0xb7a1b94c00000000, 0x11e9c13200000000, - 0x73d1e91800000000, 0x0cbd014400000000, 0x6e85296e00000000, - 0xc8cd511000000000, 0xaaf5793a00000000, 0x845ca1ec00000000, - 0xe66489c600000000, 0x402cf1b800000000, 0x2214d99200000000, - 0xbef4210100000000, 0xdccc092b00000000, 0x7a84715500000000, - 0x18bc597f00000000, 0x361581a900000000, 0x542da98300000000, - 0xf265d1fd00000000, 0x905df9d700000000, 0xef31118b00000000, - 0x8d0939a100000000, 0x2b4141df00000000, 0x497969f500000000, - 0x67d0b12300000000, 0x05e8990900000000, 0xa3a0e17700000000, - 0xc198c95d00000000, 0xda67618b00000000, 0xb85f49a100000000, - 0x1e1731df00000000, 0x7c2f19f500000000, 0x5286c12300000000, - 0x30bee90900000000, 0x96f6917700000000, 0xf4ceb95d00000000, - 0x8ba2510100000000, 0xe99a792b00000000, 0x4fd2015500000000, - 0x2dea297f00000000, 0x0343f1a900000000, 0x617bd98300000000, - 0xc733a1fd00000000, 0xa50b89d700000000, 0x39eb714400000000, - 0x5bd3596e00000000, 0xfd9b211000000000, 0x9fa3093a00000000, - 0xb10ad1ec00000000, 0xd332f9c600000000, 0x757a81b800000000, - 0x1742a99200000000, 0x682e41ce00000000, 0x0a1669e400000000, - 0xac5e119a00000000, 0xce6639b000000000, 0xe0cfe16600000000, - 0x82f7c94c00000000, 0x24bfb13200000000, 0x4687991800000000, - 0x5347914400000000, 0x317fb96e00000000, 0x9737c11000000000, - 0xf50fe93a00000000, 0xdba631ec00000000, 0xb99e19c600000000, - 0x1fd661b800000000, 0x7dee499200000000, 0x0282a1ce00000000, - 0x60ba89e400000000, 0xc6f2f19a00000000, 0xa4cad9b000000000, - 0x8a63016600000000, 0xe85b294c00000000, 0x4e13513200000000, - 0x2c2b791800000000, 0xb0cb818b00000000, 0xd2f3a9a100000000, - 0x74bbd1df00000000, 0x1683f9f500000000, 0x382a212300000000, - 0x5a12090900000000, 0xfc5a717700000000, 0x9e62595d00000000, - 0xe10eb10100000000, 0x8336992b00000000, 0x257ee15500000000, - 0x4746c97f00000000, 0x69ef11a900000000, 0x0bd7398300000000, - 0xad9f41fd00000000, 0xcfa769d700000000, 0xd458c10100000000, - 0xb660e92b00000000, 0x1028915500000000, 0x7210b97f00000000, - 0x5cb961a900000000, 0x3e81498300000000, 0x98c931fd00000000, - 0xfaf119d700000000, 0x859df18b00000000, 0xe7a5d9a100000000, - 0x41eda1df00000000, 0x23d589f500000000, 0x0d7c512300000000, - 0x6f44790900000000, 0xc90c017700000000, 0xab34295d00000000, - 0x37d4d1ce00000000, 0x55ecf9e400000000, 0xf3a4819a00000000, - 0x919ca9b000000000, 0xbf35716600000000, 0xdd0d594c00000000, - 0x7b45213200000000, 0x197d091800000000, 0x6611e14400000000, - 0x0429c96e00000000, 0xa261b11000000000, 0xc059993a00000000, - 0xeef041ec00000000, 0x8cc869c600000000, 0x2a8011b800000000, - 0x48b8399200000000}, - {0x0000000000000000, 0x4c2896a300000000, 0xd9565d9c00000000, - 0x957ecb3f00000000, 0xf3abcbe300000000, 0xbf835d4000000000, - 0x2afd967f00000000, 0x66d500dc00000000, 0xa751e61c00000000, - 0xeb7970bf00000000, 0x7e07bb8000000000, 0x322f2d2300000000, - 0x54fa2dff00000000, 0x18d2bb5c00000000, 0x8dac706300000000, - 0xc184e6c000000000, 0x4ea3cc3900000000, 0x028b5a9a00000000, - 0x97f591a500000000, 0xdbdd070600000000, 0xbd0807da00000000, - 0xf120917900000000, 0x645e5a4600000000, 0x2876cce500000000, - 0xe9f22a2500000000, 0xa5dabc8600000000, 0x30a477b900000000, - 0x7c8ce11a00000000, 0x1a59e1c600000000, 0x5671776500000000, - 0xc30fbc5a00000000, 0x8f272af900000000, 0x9c46997300000000, - 0xd06e0fd000000000, 0x4510c4ef00000000, 0x0938524c00000000, - 0x6fed529000000000, 0x23c5c43300000000, 0xb6bb0f0c00000000, - 0xfa9399af00000000, 0x3b177f6f00000000, 0x773fe9cc00000000, - 0xe24122f300000000, 0xae69b45000000000, 0xc8bcb48c00000000, - 0x8494222f00000000, 0x11eae91000000000, 0x5dc27fb300000000, - 0xd2e5554a00000000, 0x9ecdc3e900000000, 0x0bb308d600000000, - 0x479b9e7500000000, 0x214e9ea900000000, 0x6d66080a00000000, - 0xf818c33500000000, 0xb430559600000000, 0x75b4b35600000000, - 0x399c25f500000000, 0xace2eeca00000000, 0xe0ca786900000000, - 0x861f78b500000000, 0xca37ee1600000000, 0x5f49252900000000, - 0x1361b38a00000000, 0x388d32e700000000, 0x74a5a44400000000, - 0xe1db6f7b00000000, 0xadf3f9d800000000, 0xcb26f90400000000, - 0x870e6fa700000000, 0x1270a49800000000, 0x5e58323b00000000, - 0x9fdcd4fb00000000, 0xd3f4425800000000, 0x468a896700000000, - 0x0aa21fc400000000, 0x6c771f1800000000, 0x205f89bb00000000, - 0xb521428400000000, 0xf909d42700000000, 0x762efede00000000, - 0x3a06687d00000000, 0xaf78a34200000000, 0xe35035e100000000, - 0x8585353d00000000, 0xc9ada39e00000000, 0x5cd368a100000000, - 0x10fbfe0200000000, 0xd17f18c200000000, 0x9d578e6100000000, - 0x0829455e00000000, 0x4401d3fd00000000, 0x22d4d32100000000, - 0x6efc458200000000, 0xfb828ebd00000000, 0xb7aa181e00000000, - 0xa4cbab9400000000, 0xe8e33d3700000000, 0x7d9df60800000000, - 0x31b560ab00000000, 0x5760607700000000, 0x1b48f6d400000000, - 0x8e363deb00000000, 0xc21eab4800000000, 0x039a4d8800000000, - 0x4fb2db2b00000000, 0xdacc101400000000, 0x96e486b700000000, - 0xf031866b00000000, 0xbc1910c800000000, 0x2967dbf700000000, - 0x654f4d5400000000, 0xea6867ad00000000, 0xa640f10e00000000, - 0x333e3a3100000000, 0x7f16ac9200000000, 0x19c3ac4e00000000, - 0x55eb3aed00000000, 0xc095f1d200000000, 0x8cbd677100000000, - 0x4d3981b100000000, 0x0111171200000000, 0x946fdc2d00000000, - 0xd8474a8e00000000, 0xbe924a5200000000, 0xf2badcf100000000, - 0x67c417ce00000000, 0x2bec816d00000000, 0x311c141500000000, - 0x7d3482b600000000, 0xe84a498900000000, 0xa462df2a00000000, - 0xc2b7dff600000000, 0x8e9f495500000000, 0x1be1826a00000000, - 0x57c914c900000000, 0x964df20900000000, 0xda6564aa00000000, - 0x4f1baf9500000000, 0x0333393600000000, 0x65e639ea00000000, - 0x29ceaf4900000000, 0xbcb0647600000000, 0xf098f2d500000000, - 0x7fbfd82c00000000, 0x33974e8f00000000, 0xa6e985b000000000, - 0xeac1131300000000, 0x8c1413cf00000000, 0xc03c856c00000000, - 0x55424e5300000000, 0x196ad8f000000000, 0xd8ee3e3000000000, - 0x94c6a89300000000, 0x01b863ac00000000, 0x4d90f50f00000000, - 0x2b45f5d300000000, 0x676d637000000000, 0xf213a84f00000000, - 0xbe3b3eec00000000, 0xad5a8d6600000000, 0xe1721bc500000000, - 0x740cd0fa00000000, 0x3824465900000000, 0x5ef1468500000000, - 0x12d9d02600000000, 0x87a71b1900000000, 0xcb8f8dba00000000, - 0x0a0b6b7a00000000, 0x4623fdd900000000, 0xd35d36e600000000, - 0x9f75a04500000000, 0xf9a0a09900000000, 0xb588363a00000000, - 0x20f6fd0500000000, 0x6cde6ba600000000, 0xe3f9415f00000000, - 0xafd1d7fc00000000, 0x3aaf1cc300000000, 0x76878a6000000000, - 0x10528abc00000000, 0x5c7a1c1f00000000, 0xc904d72000000000, - 0x852c418300000000, 0x44a8a74300000000, 0x088031e000000000, - 0x9dfefadf00000000, 0xd1d66c7c00000000, 0xb7036ca000000000, - 0xfb2bfa0300000000, 0x6e55313c00000000, 0x227da79f00000000, - 0x099126f200000000, 0x45b9b05100000000, 0xd0c77b6e00000000, - 0x9cefedcd00000000, 0xfa3aed1100000000, 0xb6127bb200000000, - 0x236cb08d00000000, 0x6f44262e00000000, 0xaec0c0ee00000000, - 0xe2e8564d00000000, 0x77969d7200000000, 0x3bbe0bd100000000, - 0x5d6b0b0d00000000, 0x11439dae00000000, 0x843d569100000000, - 0xc815c03200000000, 0x4732eacb00000000, 0x0b1a7c6800000000, - 0x9e64b75700000000, 0xd24c21f400000000, 0xb499212800000000, - 0xf8b1b78b00000000, 0x6dcf7cb400000000, 0x21e7ea1700000000, - 0xe0630cd700000000, 0xac4b9a7400000000, 0x3935514b00000000, - 0x751dc7e800000000, 0x13c8c73400000000, 0x5fe0519700000000, - 0xca9e9aa800000000, 0x86b60c0b00000000, 0x95d7bf8100000000, - 0xd9ff292200000000, 0x4c81e21d00000000, 0x00a974be00000000, - 0x667c746200000000, 0x2a54e2c100000000, 0xbf2a29fe00000000, - 0xf302bf5d00000000, 0x3286599d00000000, 0x7eaecf3e00000000, - 0xebd0040100000000, 0xa7f892a200000000, 0xc12d927e00000000, - 0x8d0504dd00000000, 0x187bcfe200000000, 0x5453594100000000, - 0xdb7473b800000000, 0x975ce51b00000000, 0x02222e2400000000, - 0x4e0ab88700000000, 0x28dfb85b00000000, 0x64f72ef800000000, - 0xf189e5c700000000, 0xbda1736400000000, 0x7c2595a400000000, - 0x300d030700000000, 0xa573c83800000000, 0xe95b5e9b00000000, - 0x8f8e5e4700000000, 0xc3a6c8e400000000, 0x56d803db00000000, - 0x1af0957800000000}, - {0x0000000000000000, 0x939bc97f00000000, 0x263793ff00000000, - 0xb5ac5a8000000000, 0x0d68572400000000, 0x9ef39e5b00000000, - 0x2b5fc4db00000000, 0xb8c40da400000000, 0x1ad0ae4800000000, - 0x894b673700000000, 0x3ce73db700000000, 0xaf7cf4c800000000, - 0x17b8f96c00000000, 0x8423301300000000, 0x318f6a9300000000, - 0xa214a3ec00000000, 0x34a05d9100000000, 0xa73b94ee00000000, - 0x1297ce6e00000000, 0x810c071100000000, 0x39c80ab500000000, - 0xaa53c3ca00000000, 0x1fff994a00000000, 0x8c64503500000000, - 0x2e70f3d900000000, 0xbdeb3aa600000000, 0x0847602600000000, - 0x9bdca95900000000, 0x2318a4fd00000000, 0xb0836d8200000000, - 0x052f370200000000, 0x96b4fe7d00000000, 0x2946caf900000000, - 0xbadd038600000000, 0x0f71590600000000, 0x9cea907900000000, - 0x242e9ddd00000000, 0xb7b554a200000000, 0x02190e2200000000, - 0x9182c75d00000000, 0x339664b100000000, 0xa00dadce00000000, - 0x15a1f74e00000000, 0x863a3e3100000000, 0x3efe339500000000, - 0xad65faea00000000, 0x18c9a06a00000000, 0x8b52691500000000, - 0x1de6976800000000, 0x8e7d5e1700000000, 0x3bd1049700000000, - 0xa84acde800000000, 0x108ec04c00000000, 0x8315093300000000, - 0x36b953b300000000, 0xa5229acc00000000, 0x0736392000000000, - 0x94adf05f00000000, 0x2101aadf00000000, 0xb29a63a000000000, - 0x0a5e6e0400000000, 0x99c5a77b00000000, 0x2c69fdfb00000000, - 0xbff2348400000000, 0x138ae52800000000, 0x80112c5700000000, - 0x35bd76d700000000, 0xa626bfa800000000, 0x1ee2b20c00000000, - 0x8d797b7300000000, 0x38d521f300000000, 0xab4ee88c00000000, - 0x095a4b6000000000, 0x9ac1821f00000000, 0x2f6dd89f00000000, - 0xbcf611e000000000, 0x04321c4400000000, 0x97a9d53b00000000, - 0x22058fbb00000000, 0xb19e46c400000000, 0x272ab8b900000000, - 0xb4b171c600000000, 0x011d2b4600000000, 0x9286e23900000000, - 0x2a42ef9d00000000, 0xb9d926e200000000, 0x0c757c6200000000, - 0x9feeb51d00000000, 0x3dfa16f100000000, 0xae61df8e00000000, - 0x1bcd850e00000000, 0x88564c7100000000, 0x309241d500000000, - 0xa30988aa00000000, 0x16a5d22a00000000, 0x853e1b5500000000, - 0x3acc2fd100000000, 0xa957e6ae00000000, 0x1cfbbc2e00000000, - 0x8f60755100000000, 0x37a478f500000000, 0xa43fb18a00000000, - 0x1193eb0a00000000, 0x8208227500000000, 0x201c819900000000, - 0xb38748e600000000, 0x062b126600000000, 0x95b0db1900000000, - 0x2d74d6bd00000000, 0xbeef1fc200000000, 0x0b43454200000000, - 0x98d88c3d00000000, 0x0e6c724000000000, 0x9df7bb3f00000000, - 0x285be1bf00000000, 0xbbc028c000000000, 0x0304256400000000, - 0x909fec1b00000000, 0x2533b69b00000000, 0xb6a87fe400000000, - 0x14bcdc0800000000, 0x8727157700000000, 0x328b4ff700000000, - 0xa110868800000000, 0x19d48b2c00000000, 0x8a4f425300000000, - 0x3fe318d300000000, 0xac78d1ac00000000, 0x2614cb5100000000, - 0xb58f022e00000000, 0x002358ae00000000, 0x93b891d100000000, - 0x2b7c9c7500000000, 0xb8e7550a00000000, 0x0d4b0f8a00000000, - 0x9ed0c6f500000000, 0x3cc4651900000000, 0xaf5fac6600000000, - 0x1af3f6e600000000, 0x89683f9900000000, 0x31ac323d00000000, - 0xa237fb4200000000, 0x179ba1c200000000, 0x840068bd00000000, - 0x12b496c000000000, 0x812f5fbf00000000, 0x3483053f00000000, - 0xa718cc4000000000, 0x1fdcc1e400000000, 0x8c47089b00000000, - 0x39eb521b00000000, 0xaa709b6400000000, 0x0864388800000000, - 0x9bfff1f700000000, 0x2e53ab7700000000, 0xbdc8620800000000, - 0x050c6fac00000000, 0x9697a6d300000000, 0x233bfc5300000000, - 0xb0a0352c00000000, 0x0f5201a800000000, 0x9cc9c8d700000000, - 0x2965925700000000, 0xbafe5b2800000000, 0x023a568c00000000, - 0x91a19ff300000000, 0x240dc57300000000, 0xb7960c0c00000000, - 0x1582afe000000000, 0x8619669f00000000, 0x33b53c1f00000000, - 0xa02ef56000000000, 0x18eaf8c400000000, 0x8b7131bb00000000, - 0x3edd6b3b00000000, 0xad46a24400000000, 0x3bf25c3900000000, - 0xa869954600000000, 0x1dc5cfc600000000, 0x8e5e06b900000000, - 0x369a0b1d00000000, 0xa501c26200000000, 0x10ad98e200000000, - 0x8336519d00000000, 0x2122f27100000000, 0xb2b93b0e00000000, - 0x0715618e00000000, 0x948ea8f100000000, 0x2c4aa55500000000, - 0xbfd16c2a00000000, 0x0a7d36aa00000000, 0x99e6ffd500000000, - 0x359e2e7900000000, 0xa605e70600000000, 0x13a9bd8600000000, - 0x803274f900000000, 0x38f6795d00000000, 0xab6db02200000000, - 0x1ec1eaa200000000, 0x8d5a23dd00000000, 0x2f4e803100000000, - 0xbcd5494e00000000, 0x097913ce00000000, 0x9ae2dab100000000, - 0x2226d71500000000, 0xb1bd1e6a00000000, 0x041144ea00000000, - 0x978a8d9500000000, 0x013e73e800000000, 0x92a5ba9700000000, - 0x2709e01700000000, 0xb492296800000000, 0x0c5624cc00000000, - 0x9fcdedb300000000, 0x2a61b73300000000, 0xb9fa7e4c00000000, - 0x1beedda000000000, 0x887514df00000000, 0x3dd94e5f00000000, - 0xae42872000000000, 0x16868a8400000000, 0x851d43fb00000000, - 0x30b1197b00000000, 0xa32ad00400000000, 0x1cd8e48000000000, - 0x8f432dff00000000, 0x3aef777f00000000, 0xa974be0000000000, - 0x11b0b3a400000000, 0x822b7adb00000000, 0x3787205b00000000, - 0xa41ce92400000000, 0x06084ac800000000, 0x959383b700000000, - 0x203fd93700000000, 0xb3a4104800000000, 0x0b601dec00000000, - 0x98fbd49300000000, 0x2d578e1300000000, 0xbecc476c00000000, - 0x2878b91100000000, 0xbbe3706e00000000, 0x0e4f2aee00000000, - 0x9dd4e39100000000, 0x2510ee3500000000, 0xb68b274a00000000, - 0x03277dca00000000, 0x90bcb4b500000000, 0x32a8175900000000, - 0xa133de2600000000, 0x149f84a600000000, 0x87044dd900000000, - 0x3fc0407d00000000, 0xac5b890200000000, 0x19f7d38200000000, - 0x8a6c1afd00000000}, - {0x0000000000000000, 0x650b796900000000, 0xca16f2d200000000, - 0xaf1d8bbb00000000, 0xd52b957e00000000, 0xb020ec1700000000, - 0x1f3d67ac00000000, 0x7a361ec500000000, 0xaa572afd00000000, - 0xcf5c539400000000, 0x6041d82f00000000, 0x054aa14600000000, - 0x7f7cbf8300000000, 0x1a77c6ea00000000, 0xb56a4d5100000000, - 0xd061343800000000, 0x15a9252100000000, 0x70a25c4800000000, - 0xdfbfd7f300000000, 0xbab4ae9a00000000, 0xc082b05f00000000, - 0xa589c93600000000, 0x0a94428d00000000, 0x6f9f3be400000000, - 0xbffe0fdc00000000, 0xdaf576b500000000, 0x75e8fd0e00000000, - 0x10e3846700000000, 0x6ad59aa200000000, 0x0fdee3cb00000000, - 0xa0c3687000000000, 0xc5c8111900000000, 0x2a524b4200000000, - 0x4f59322b00000000, 0xe044b99000000000, 0x854fc0f900000000, - 0xff79de3c00000000, 0x9a72a75500000000, 0x356f2cee00000000, - 0x5064558700000000, 0x800561bf00000000, 0xe50e18d600000000, - 0x4a13936d00000000, 0x2f18ea0400000000, 0x552ef4c100000000, - 0x30258da800000000, 0x9f38061300000000, 0xfa337f7a00000000, - 0x3ffb6e6300000000, 0x5af0170a00000000, 0xf5ed9cb100000000, - 0x90e6e5d800000000, 0xead0fb1d00000000, 0x8fdb827400000000, - 0x20c609cf00000000, 0x45cd70a600000000, 0x95ac449e00000000, - 0xf0a73df700000000, 0x5fbab64c00000000, 0x3ab1cf2500000000, - 0x4087d1e000000000, 0x258ca88900000000, 0x8a91233200000000, - 0xef9a5a5b00000000, 0x54a4968400000000, 0x31afefed00000000, - 0x9eb2645600000000, 0xfbb91d3f00000000, 0x818f03fa00000000, - 0xe4847a9300000000, 0x4b99f12800000000, 0x2e92884100000000, - 0xfef3bc7900000000, 0x9bf8c51000000000, 0x34e54eab00000000, - 0x51ee37c200000000, 0x2bd8290700000000, 0x4ed3506e00000000, - 0xe1cedbd500000000, 0x84c5a2bc00000000, 0x410db3a500000000, - 0x2406cacc00000000, 0x8b1b417700000000, 0xee10381e00000000, - 0x942626db00000000, 0xf12d5fb200000000, 0x5e30d40900000000, - 0x3b3bad6000000000, 0xeb5a995800000000, 0x8e51e03100000000, - 0x214c6b8a00000000, 0x444712e300000000, 0x3e710c2600000000, - 0x5b7a754f00000000, 0xf467fef400000000, 0x916c879d00000000, - 0x7ef6ddc600000000, 0x1bfda4af00000000, 0xb4e02f1400000000, - 0xd1eb567d00000000, 0xabdd48b800000000, 0xced631d100000000, - 0x61cbba6a00000000, 0x04c0c30300000000, 0xd4a1f73b00000000, - 0xb1aa8e5200000000, 0x1eb705e900000000, 0x7bbc7c8000000000, - 0x018a624500000000, 0x64811b2c00000000, 0xcb9c909700000000, - 0xae97e9fe00000000, 0x6b5ff8e700000000, 0x0e54818e00000000, - 0xa1490a3500000000, 0xc442735c00000000, 0xbe746d9900000000, - 0xdb7f14f000000000, 0x74629f4b00000000, 0x1169e62200000000, - 0xc108d21a00000000, 0xa403ab7300000000, 0x0b1e20c800000000, - 0x6e1559a100000000, 0x1423476400000000, 0x71283e0d00000000, - 0xde35b5b600000000, 0xbb3eccdf00000000, 0xe94e5cd200000000, - 0x8c4525bb00000000, 0x2358ae0000000000, 0x4653d76900000000, - 0x3c65c9ac00000000, 0x596eb0c500000000, 0xf6733b7e00000000, - 0x9378421700000000, 0x4319762f00000000, 0x26120f4600000000, - 0x890f84fd00000000, 0xec04fd9400000000, 0x9632e35100000000, - 0xf3399a3800000000, 0x5c24118300000000, 0x392f68ea00000000, - 0xfce779f300000000, 0x99ec009a00000000, 0x36f18b2100000000, - 0x53faf24800000000, 0x29ccec8d00000000, 0x4cc795e400000000, - 0xe3da1e5f00000000, 0x86d1673600000000, 0x56b0530e00000000, - 0x33bb2a6700000000, 0x9ca6a1dc00000000, 0xf9add8b500000000, - 0x839bc67000000000, 0xe690bf1900000000, 0x498d34a200000000, - 0x2c864dcb00000000, 0xc31c179000000000, 0xa6176ef900000000, - 0x090ae54200000000, 0x6c019c2b00000000, 0x163782ee00000000, - 0x733cfb8700000000, 0xdc21703c00000000, 0xb92a095500000000, - 0x694b3d6d00000000, 0x0c40440400000000, 0xa35dcfbf00000000, - 0xc656b6d600000000, 0xbc60a81300000000, 0xd96bd17a00000000, - 0x76765ac100000000, 0x137d23a800000000, 0xd6b532b100000000, - 0xb3be4bd800000000, 0x1ca3c06300000000, 0x79a8b90a00000000, - 0x039ea7cf00000000, 0x6695dea600000000, 0xc988551d00000000, - 0xac832c7400000000, 0x7ce2184c00000000, 0x19e9612500000000, - 0xb6f4ea9e00000000, 0xd3ff93f700000000, 0xa9c98d3200000000, - 0xccc2f45b00000000, 0x63df7fe000000000, 0x06d4068900000000, - 0xbdeaca5600000000, 0xd8e1b33f00000000, 0x77fc388400000000, - 0x12f741ed00000000, 0x68c15f2800000000, 0x0dca264100000000, - 0xa2d7adfa00000000, 0xc7dcd49300000000, 0x17bde0ab00000000, - 0x72b699c200000000, 0xddab127900000000, 0xb8a06b1000000000, - 0xc29675d500000000, 0xa79d0cbc00000000, 0x0880870700000000, - 0x6d8bfe6e00000000, 0xa843ef7700000000, 0xcd48961e00000000, - 0x62551da500000000, 0x075e64cc00000000, 0x7d687a0900000000, - 0x1863036000000000, 0xb77e88db00000000, 0xd275f1b200000000, - 0x0214c58a00000000, 0x671fbce300000000, 0xc802375800000000, - 0xad094e3100000000, 0xd73f50f400000000, 0xb234299d00000000, - 0x1d29a22600000000, 0x7822db4f00000000, 0x97b8811400000000, - 0xf2b3f87d00000000, 0x5dae73c600000000, 0x38a50aaf00000000, - 0x4293146a00000000, 0x27986d0300000000, 0x8885e6b800000000, - 0xed8e9fd100000000, 0x3defabe900000000, 0x58e4d28000000000, - 0xf7f9593b00000000, 0x92f2205200000000, 0xe8c43e9700000000, - 0x8dcf47fe00000000, 0x22d2cc4500000000, 0x47d9b52c00000000, - 0x8211a43500000000, 0xe71add5c00000000, 0x480756e700000000, - 0x2d0c2f8e00000000, 0x573a314b00000000, 0x3231482200000000, - 0x9d2cc39900000000, 0xf827baf000000000, 0x28468ec800000000, - 0x4d4df7a100000000, 0xe2507c1a00000000, 0x875b057300000000, - 0xfd6d1bb600000000, 0x986662df00000000, 0x377be96400000000, - 0x5270900d00000000}, - {0x0000000000000000, 0xdcecb13d00000000, 0xb8d9637b00000000, - 0x6435d24600000000, 0x70b3c7f600000000, 0xac5f76cb00000000, - 0xc86aa48d00000000, 0x148615b000000000, 0xa160fe3600000000, - 0x7d8c4f0b00000000, 0x19b99d4d00000000, 0xc5552c7000000000, - 0xd1d339c000000000, 0x0d3f88fd00000000, 0x690a5abb00000000, - 0xb5e6eb8600000000, 0x42c1fc6d00000000, 0x9e2d4d5000000000, - 0xfa189f1600000000, 0x26f42e2b00000000, 0x32723b9b00000000, - 0xee9e8aa600000000, 0x8aab58e000000000, 0x5647e9dd00000000, - 0xe3a1025b00000000, 0x3f4db36600000000, 0x5b78612000000000, - 0x8794d01d00000000, 0x9312c5ad00000000, 0x4ffe749000000000, - 0x2bcba6d600000000, 0xf72717eb00000000, 0x8482f9db00000000, - 0x586e48e600000000, 0x3c5b9aa000000000, 0xe0b72b9d00000000, - 0xf4313e2d00000000, 0x28dd8f1000000000, 0x4ce85d5600000000, - 0x9004ec6b00000000, 0x25e207ed00000000, 0xf90eb6d000000000, - 0x9d3b649600000000, 0x41d7d5ab00000000, 0x5551c01b00000000, - 0x89bd712600000000, 0xed88a36000000000, 0x3164125d00000000, - 0xc64305b600000000, 0x1aafb48b00000000, 0x7e9a66cd00000000, - 0xa276d7f000000000, 0xb6f0c24000000000, 0x6a1c737d00000000, - 0x0e29a13b00000000, 0xd2c5100600000000, 0x6723fb8000000000, - 0xbbcf4abd00000000, 0xdffa98fb00000000, 0x031629c600000000, - 0x17903c7600000000, 0xcb7c8d4b00000000, 0xaf495f0d00000000, - 0x73a5ee3000000000, 0x4903826c00000000, 0x95ef335100000000, - 0xf1dae11700000000, 0x2d36502a00000000, 0x39b0459a00000000, - 0xe55cf4a700000000, 0x816926e100000000, 0x5d8597dc00000000, - 0xe8637c5a00000000, 0x348fcd6700000000, 0x50ba1f2100000000, - 0x8c56ae1c00000000, 0x98d0bbac00000000, 0x443c0a9100000000, - 0x2009d8d700000000, 0xfce569ea00000000, 0x0bc27e0100000000, - 0xd72ecf3c00000000, 0xb31b1d7a00000000, 0x6ff7ac4700000000, - 0x7b71b9f700000000, 0xa79d08ca00000000, 0xc3a8da8c00000000, - 0x1f446bb100000000, 0xaaa2803700000000, 0x764e310a00000000, - 0x127be34c00000000, 0xce97527100000000, 0xda1147c100000000, - 0x06fdf6fc00000000, 0x62c824ba00000000, 0xbe24958700000000, - 0xcd817bb700000000, 0x116dca8a00000000, 0x755818cc00000000, - 0xa9b4a9f100000000, 0xbd32bc4100000000, 0x61de0d7c00000000, - 0x05ebdf3a00000000, 0xd9076e0700000000, 0x6ce1858100000000, - 0xb00d34bc00000000, 0xd438e6fa00000000, 0x08d457c700000000, - 0x1c52427700000000, 0xc0bef34a00000000, 0xa48b210c00000000, - 0x7867903100000000, 0x8f4087da00000000, 0x53ac36e700000000, - 0x3799e4a100000000, 0xeb75559c00000000, 0xfff3402c00000000, - 0x231ff11100000000, 0x472a235700000000, 0x9bc6926a00000000, - 0x2e2079ec00000000, 0xf2ccc8d100000000, 0x96f91a9700000000, - 0x4a15abaa00000000, 0x5e93be1a00000000, 0x827f0f2700000000, - 0xe64add6100000000, 0x3aa66c5c00000000, 0x920604d900000000, - 0x4eeab5e400000000, 0x2adf67a200000000, 0xf633d69f00000000, - 0xe2b5c32f00000000, 0x3e59721200000000, 0x5a6ca05400000000, - 0x8680116900000000, 0x3366faef00000000, 0xef8a4bd200000000, - 0x8bbf999400000000, 0x575328a900000000, 0x43d53d1900000000, - 0x9f398c2400000000, 0xfb0c5e6200000000, 0x27e0ef5f00000000, - 0xd0c7f8b400000000, 0x0c2b498900000000, 0x681e9bcf00000000, - 0xb4f22af200000000, 0xa0743f4200000000, 0x7c988e7f00000000, - 0x18ad5c3900000000, 0xc441ed0400000000, 0x71a7068200000000, - 0xad4bb7bf00000000, 0xc97e65f900000000, 0x1592d4c400000000, - 0x0114c17400000000, 0xddf8704900000000, 0xb9cda20f00000000, - 0x6521133200000000, 0x1684fd0200000000, 0xca684c3f00000000, - 0xae5d9e7900000000, 0x72b12f4400000000, 0x66373af400000000, - 0xbadb8bc900000000, 0xdeee598f00000000, 0x0202e8b200000000, - 0xb7e4033400000000, 0x6b08b20900000000, 0x0f3d604f00000000, - 0xd3d1d17200000000, 0xc757c4c200000000, 0x1bbb75ff00000000, - 0x7f8ea7b900000000, 0xa362168400000000, 0x5445016f00000000, - 0x88a9b05200000000, 0xec9c621400000000, 0x3070d32900000000, - 0x24f6c69900000000, 0xf81a77a400000000, 0x9c2fa5e200000000, - 0x40c314df00000000, 0xf525ff5900000000, 0x29c94e6400000000, - 0x4dfc9c2200000000, 0x91102d1f00000000, 0x859638af00000000, - 0x597a899200000000, 0x3d4f5bd400000000, 0xe1a3eae900000000, - 0xdb0586b500000000, 0x07e9378800000000, 0x63dce5ce00000000, - 0xbf3054f300000000, 0xabb6414300000000, 0x775af07e00000000, - 0x136f223800000000, 0xcf83930500000000, 0x7a65788300000000, - 0xa689c9be00000000, 0xc2bc1bf800000000, 0x1e50aac500000000, - 0x0ad6bf7500000000, 0xd63a0e4800000000, 0xb20fdc0e00000000, - 0x6ee36d3300000000, 0x99c47ad800000000, 0x4528cbe500000000, - 0x211d19a300000000, 0xfdf1a89e00000000, 0xe977bd2e00000000, - 0x359b0c1300000000, 0x51aede5500000000, 0x8d426f6800000000, - 0x38a484ee00000000, 0xe44835d300000000, 0x807de79500000000, - 0x5c9156a800000000, 0x4817431800000000, 0x94fbf22500000000, - 0xf0ce206300000000, 0x2c22915e00000000, 0x5f877f6e00000000, - 0x836bce5300000000, 0xe75e1c1500000000, 0x3bb2ad2800000000, - 0x2f34b89800000000, 0xf3d809a500000000, 0x97eddbe300000000, - 0x4b016ade00000000, 0xfee7815800000000, 0x220b306500000000, - 0x463ee22300000000, 0x9ad2531e00000000, 0x8e5446ae00000000, - 0x52b8f79300000000, 0x368d25d500000000, 0xea6194e800000000, - 0x1d46830300000000, 0xc1aa323e00000000, 0xa59fe07800000000, - 0x7973514500000000, 0x6df544f500000000, 0xb119f5c800000000, - 0xd52c278e00000000, 0x09c096b300000000, 0xbc267d3500000000, - 0x60cacc0800000000, 0x04ff1e4e00000000, 0xd813af7300000000, - 0xcc95bac300000000, 0x10790bfe00000000, 0x744cd9b800000000, - 0xa8a0688500000000}}; - -#else /* W == 4 */ - -local const z_crc_t FAR crc_braid_table[][256] = { - {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, - 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, - 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, - 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, - 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, - 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, - 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, - 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, - 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, - 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, - 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, - 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, - 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, - 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, - 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, - 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, - 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, - 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, - 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, - 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, - 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, - 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, - 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, - 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, - 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, - 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, - 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, - 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, - 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, - 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, - 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, - 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, - 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, - 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, - 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, - 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, - 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, - 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, - 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, - 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, - 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, - 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, - 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, - 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, - 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, - 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, - 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, - 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, - 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, - 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, - 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, - 0x09cd8551}, - {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, - 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, - 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, - 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, - 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, - 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, - 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, - 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, - 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, - 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, - 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, - 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, - 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, - 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, - 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, - 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, - 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, - 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, - 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, - 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, - 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, - 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, - 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, - 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, - 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, - 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, - 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, - 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, - 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, - 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, - 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, - 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, - 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, - 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, - 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, - 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, - 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, - 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, - 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, - 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, - 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, - 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, - 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, - 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, - 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, - 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, - 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, - 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, - 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, - 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, - 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, - 0x7bc97a0c}, - {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, - 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, - 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, - 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, - 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, - 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, - 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, - 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, - 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, - 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, - 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, - 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, - 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, - 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, - 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, - 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, - 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, - 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, - 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, - 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, - 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, - 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, - 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, - 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, - 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, - 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, - 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, - 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, - 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, - 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, - 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, - 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, - 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, - 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, - 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, - 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, - 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, - 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, - 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, - 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, - 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, - 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, - 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, - 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, - 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, - 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, - 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, - 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, - 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, - 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, - 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, - 0x7851a2ca}, - {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, - 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, - 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, - 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, - 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, - 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, - 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, - 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, - 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, - 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, - 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, - 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, - 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, - 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, - 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, - 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, - 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, - 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, - 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, - 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, - 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, - 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, - 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, - 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, - 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, - 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, - 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, - 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, - 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, - 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, - 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, - 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, - 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, - 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, - 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, - 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, - 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, - 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, - 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, - 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, - 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, - 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, - 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, - 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, - 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, - 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, - 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, - 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, - 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, - 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, - 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, - 0x566b6848}}; - -local const z_word_t FAR crc_braid_big_table[][256] = { - {0x00000000, 0x9e83da9f, 0x7d01c4e4, 0xe3821e7b, 0xbb04f912, - 0x2587238d, 0xc6053df6, 0x5886e769, 0x7609f225, 0xe88a28ba, - 0x0b0836c1, 0x958bec5e, 0xcd0d0b37, 0x538ed1a8, 0xb00ccfd3, - 0x2e8f154c, 0xec12e44b, 0x72913ed4, 0x911320af, 0x0f90fa30, - 0x57161d59, 0xc995c7c6, 0x2a17d9bd, 0xb4940322, 0x9a1b166e, - 0x0498ccf1, 0xe71ad28a, 0x79990815, 0x211fef7c, 0xbf9c35e3, - 0x5c1e2b98, 0xc29df107, 0xd825c897, 0x46a61208, 0xa5240c73, - 0x3ba7d6ec, 0x63213185, 0xfda2eb1a, 0x1e20f561, 0x80a32ffe, - 0xae2c3ab2, 0x30afe02d, 0xd32dfe56, 0x4dae24c9, 0x1528c3a0, - 0x8bab193f, 0x68290744, 0xf6aadddb, 0x34372cdc, 0xaab4f643, - 0x4936e838, 0xd7b532a7, 0x8f33d5ce, 0x11b00f51, 0xf232112a, - 0x6cb1cbb5, 0x423edef9, 0xdcbd0466, 0x3f3f1a1d, 0xa1bcc082, - 0xf93a27eb, 0x67b9fd74, 0x843be30f, 0x1ab83990, 0xf14de1f4, - 0x6fce3b6b, 0x8c4c2510, 0x12cfff8f, 0x4a4918e6, 0xd4cac279, - 0x3748dc02, 0xa9cb069d, 0x874413d1, 0x19c7c94e, 0xfa45d735, - 0x64c60daa, 0x3c40eac3, 0xa2c3305c, 0x41412e27, 0xdfc2f4b8, - 0x1d5f05bf, 0x83dcdf20, 0x605ec15b, 0xfedd1bc4, 0xa65bfcad, - 0x38d82632, 0xdb5a3849, 0x45d9e2d6, 0x6b56f79a, 0xf5d52d05, - 0x1657337e, 0x88d4e9e1, 0xd0520e88, 0x4ed1d417, 0xad53ca6c, - 0x33d010f3, 0x29682963, 0xb7ebf3fc, 0x5469ed87, 0xcaea3718, - 0x926cd071, 0x0cef0aee, 0xef6d1495, 0x71eece0a, 0x5f61db46, - 0xc1e201d9, 0x22601fa2, 0xbce3c53d, 0xe4652254, 0x7ae6f8cb, - 0x9964e6b0, 0x07e73c2f, 0xc57acd28, 0x5bf917b7, 0xb87b09cc, - 0x26f8d353, 0x7e7e343a, 0xe0fdeea5, 0x037ff0de, 0x9dfc2a41, - 0xb3733f0d, 0x2df0e592, 0xce72fbe9, 0x50f12176, 0x0877c61f, - 0x96f41c80, 0x757602fb, 0xebf5d864, 0xa39db332, 0x3d1e69ad, - 0xde9c77d6, 0x401fad49, 0x18994a20, 0x861a90bf, 0x65988ec4, - 0xfb1b545b, 0xd5944117, 0x4b179b88, 0xa89585f3, 0x36165f6c, - 0x6e90b805, 0xf013629a, 0x13917ce1, 0x8d12a67e, 0x4f8f5779, - 0xd10c8de6, 0x328e939d, 0xac0d4902, 0xf48bae6b, 0x6a0874f4, - 0x898a6a8f, 0x1709b010, 0x3986a55c, 0xa7057fc3, 0x448761b8, - 0xda04bb27, 0x82825c4e, 0x1c0186d1, 0xff8398aa, 0x61004235, - 0x7bb87ba5, 0xe53ba13a, 0x06b9bf41, 0x983a65de, 0xc0bc82b7, - 0x5e3f5828, 0xbdbd4653, 0x233e9ccc, 0x0db18980, 0x9332531f, - 0x70b04d64, 0xee3397fb, 0xb6b57092, 0x2836aa0d, 0xcbb4b476, - 0x55376ee9, 0x97aa9fee, 0x09294571, 0xeaab5b0a, 0x74288195, - 0x2cae66fc, 0xb22dbc63, 0x51afa218, 0xcf2c7887, 0xe1a36dcb, - 0x7f20b754, 0x9ca2a92f, 0x022173b0, 0x5aa794d9, 0xc4244e46, - 0x27a6503d, 0xb9258aa2, 0x52d052c6, 0xcc538859, 0x2fd19622, - 0xb1524cbd, 0xe9d4abd4, 0x7757714b, 0x94d56f30, 0x0a56b5af, - 0x24d9a0e3, 0xba5a7a7c, 0x59d86407, 0xc75bbe98, 0x9fdd59f1, - 0x015e836e, 0xe2dc9d15, 0x7c5f478a, 0xbec2b68d, 0x20416c12, - 0xc3c37269, 0x5d40a8f6, 0x05c64f9f, 0x9b459500, 0x78c78b7b, - 0xe64451e4, 0xc8cb44a8, 0x56489e37, 0xb5ca804c, 0x2b495ad3, - 0x73cfbdba, 0xed4c6725, 0x0ece795e, 0x904da3c1, 0x8af59a51, - 0x147640ce, 0xf7f45eb5, 0x6977842a, 0x31f16343, 0xaf72b9dc, - 0x4cf0a7a7, 0xd2737d38, 0xfcfc6874, 0x627fb2eb, 0x81fdac90, - 0x1f7e760f, 0x47f89166, 0xd97b4bf9, 0x3af95582, 0xa47a8f1d, - 0x66e77e1a, 0xf864a485, 0x1be6bafe, 0x85656061, 0xdde38708, - 0x43605d97, 0xa0e243ec, 0x3e619973, 0x10ee8c3f, 0x8e6d56a0, - 0x6def48db, 0xf36c9244, 0xabea752d, 0x3569afb2, 0xd6ebb1c9, - 0x48686b56}, - {0x00000000, 0xc0642817, 0x80c9502e, 0x40ad7839, 0x0093a15c, - 0xc0f7894b, 0x805af172, 0x403ed965, 0x002643b9, 0xc0426bae, - 0x80ef1397, 0x408b3b80, 0x00b5e2e5, 0xc0d1caf2, 0x807cb2cb, - 0x40189adc, 0x414af7a9, 0x812edfbe, 0xc183a787, 0x01e78f90, - 0x41d956f5, 0x81bd7ee2, 0xc11006db, 0x01742ecc, 0x416cb410, - 0x81089c07, 0xc1a5e43e, 0x01c1cc29, 0x41ff154c, 0x819b3d5b, - 0xc1364562, 0x01526d75, 0xc3929f88, 0x03f6b79f, 0x435bcfa6, - 0x833fe7b1, 0xc3013ed4, 0x036516c3, 0x43c86efa, 0x83ac46ed, - 0xc3b4dc31, 0x03d0f426, 0x437d8c1f, 0x8319a408, 0xc3277d6d, - 0x0343557a, 0x43ee2d43, 0x838a0554, 0x82d86821, 0x42bc4036, - 0x0211380f, 0xc2751018, 0x824bc97d, 0x422fe16a, 0x02829953, - 0xc2e6b144, 0x82fe2b98, 0x429a038f, 0x02377bb6, 0xc25353a1, - 0x826d8ac4, 0x4209a2d3, 0x02a4daea, 0xc2c0f2fd, 0xc7234eca, - 0x074766dd, 0x47ea1ee4, 0x878e36f3, 0xc7b0ef96, 0x07d4c781, - 0x4779bfb8, 0x871d97af, 0xc7050d73, 0x07612564, 0x47cc5d5d, - 0x87a8754a, 0xc796ac2f, 0x07f28438, 0x475ffc01, 0x873bd416, - 0x8669b963, 0x460d9174, 0x06a0e94d, 0xc6c4c15a, 0x86fa183f, - 0x469e3028, 0x06334811, 0xc6576006, 0x864ffada, 0x462bd2cd, - 0x0686aaf4, 0xc6e282e3, 0x86dc5b86, 0x46b87391, 0x06150ba8, - 0xc67123bf, 0x04b1d142, 0xc4d5f955, 0x8478816c, 0x441ca97b, - 0x0422701e, 0xc4465809, 0x84eb2030, 0x448f0827, 0x049792fb, - 0xc4f3baec, 0x845ec2d5, 0x443aeac2, 0x040433a7, 0xc4601bb0, - 0x84cd6389, 0x44a94b9e, 0x45fb26eb, 0x859f0efc, 0xc53276c5, - 0x05565ed2, 0x456887b7, 0x850cafa0, 0xc5a1d799, 0x05c5ff8e, - 0x45dd6552, 0x85b94d45, 0xc514357c, 0x05701d6b, 0x454ec40e, - 0x852aec19, 0xc5879420, 0x05e3bc37, 0xcf41ed4f, 0x0f25c558, - 0x4f88bd61, 0x8fec9576, 0xcfd24c13, 0x0fb66404, 0x4f1b1c3d, - 0x8f7f342a, 0xcf67aef6, 0x0f0386e1, 0x4faefed8, 0x8fcad6cf, - 0xcff40faa, 0x0f9027bd, 0x4f3d5f84, 0x8f597793, 0x8e0b1ae6, - 0x4e6f32f1, 0x0ec24ac8, 0xcea662df, 0x8e98bbba, 0x4efc93ad, - 0x0e51eb94, 0xce35c383, 0x8e2d595f, 0x4e497148, 0x0ee40971, - 0xce802166, 0x8ebef803, 0x4edad014, 0x0e77a82d, 0xce13803a, - 0x0cd372c7, 0xccb75ad0, 0x8c1a22e9, 0x4c7e0afe, 0x0c40d39b, - 0xcc24fb8c, 0x8c8983b5, 0x4cedaba2, 0x0cf5317e, 0xcc911969, - 0x8c3c6150, 0x4c584947, 0x0c669022, 0xcc02b835, 0x8cafc00c, - 0x4ccbe81b, 0x4d99856e, 0x8dfdad79, 0xcd50d540, 0x0d34fd57, - 0x4d0a2432, 0x8d6e0c25, 0xcdc3741c, 0x0da75c0b, 0x4dbfc6d7, - 0x8ddbeec0, 0xcd7696f9, 0x0d12beee, 0x4d2c678b, 0x8d484f9c, - 0xcde537a5, 0x0d811fb2, 0x0862a385, 0xc8068b92, 0x88abf3ab, - 0x48cfdbbc, 0x08f102d9, 0xc8952ace, 0x883852f7, 0x485c7ae0, - 0x0844e03c, 0xc820c82b, 0x888db012, 0x48e99805, 0x08d74160, - 0xc8b36977, 0x881e114e, 0x487a3959, 0x4928542c, 0x894c7c3b, - 0xc9e10402, 0x09852c15, 0x49bbf570, 0x89dfdd67, 0xc972a55e, - 0x09168d49, 0x490e1795, 0x896a3f82, 0xc9c747bb, 0x09a36fac, - 0x499db6c9, 0x89f99ede, 0xc954e6e7, 0x0930cef0, 0xcbf03c0d, - 0x0b94141a, 0x4b396c23, 0x8b5d4434, 0xcb639d51, 0x0b07b546, - 0x4baacd7f, 0x8bcee568, 0xcbd67fb4, 0x0bb257a3, 0x4b1f2f9a, - 0x8b7b078d, 0xcb45dee8, 0x0b21f6ff, 0x4b8c8ec6, 0x8be8a6d1, - 0x8abacba4, 0x4adee3b3, 0x0a739b8a, 0xca17b39d, 0x8a296af8, - 0x4a4d42ef, 0x0ae03ad6, 0xca8412c1, 0x8a9c881d, 0x4af8a00a, - 0x0a55d833, 0xca31f024, 0x8a0f2941, 0x4a6b0156, 0x0ac6796f, - 0xcaa25178}, - {0x00000000, 0xd4ea739b, 0xe9d396ed, 0x3d39e576, 0x93a15c00, - 0x474b2f9b, 0x7a72caed, 0xae98b976, 0x2643b900, 0xf2a9ca9b, - 0xcf902fed, 0x1b7a5c76, 0xb5e2e500, 0x6108969b, 0x5c3173ed, - 0x88db0076, 0x4c867201, 0x986c019a, 0xa555e4ec, 0x71bf9777, - 0xdf272e01, 0x0bcd5d9a, 0x36f4b8ec, 0xe21ecb77, 0x6ac5cb01, - 0xbe2fb89a, 0x83165dec, 0x57fc2e77, 0xf9649701, 0x2d8ee49a, - 0x10b701ec, 0xc45d7277, 0x980ce502, 0x4ce69699, 0x71df73ef, - 0xa5350074, 0x0badb902, 0xdf47ca99, 0xe27e2fef, 0x36945c74, - 0xbe4f5c02, 0x6aa52f99, 0x579ccaef, 0x8376b974, 0x2dee0002, - 0xf9047399, 0xc43d96ef, 0x10d7e574, 0xd48a9703, 0x0060e498, - 0x3d5901ee, 0xe9b37275, 0x472bcb03, 0x93c1b898, 0xaef85dee, - 0x7a122e75, 0xf2c92e03, 0x26235d98, 0x1b1ab8ee, 0xcff0cb75, - 0x61687203, 0xb5820198, 0x88bbe4ee, 0x5c519775, 0x3019ca05, - 0xe4f3b99e, 0xd9ca5ce8, 0x0d202f73, 0xa3b89605, 0x7752e59e, - 0x4a6b00e8, 0x9e817373, 0x165a7305, 0xc2b0009e, 0xff89e5e8, - 0x2b639673, 0x85fb2f05, 0x51115c9e, 0x6c28b9e8, 0xb8c2ca73, - 0x7c9fb804, 0xa875cb9f, 0x954c2ee9, 0x41a65d72, 0xef3ee404, - 0x3bd4979f, 0x06ed72e9, 0xd2070172, 0x5adc0104, 0x8e36729f, - 0xb30f97e9, 0x67e5e472, 0xc97d5d04, 0x1d972e9f, 0x20aecbe9, - 0xf444b872, 0xa8152f07, 0x7cff5c9c, 0x41c6b9ea, 0x952cca71, - 0x3bb47307, 0xef5e009c, 0xd267e5ea, 0x068d9671, 0x8e569607, - 0x5abce59c, 0x678500ea, 0xb36f7371, 0x1df7ca07, 0xc91db99c, - 0xf4245cea, 0x20ce2f71, 0xe4935d06, 0x30792e9d, 0x0d40cbeb, - 0xd9aab870, 0x77320106, 0xa3d8729d, 0x9ee197eb, 0x4a0be470, - 0xc2d0e406, 0x163a979d, 0x2b0372eb, 0xffe90170, 0x5171b806, - 0x859bcb9d, 0xb8a22eeb, 0x6c485d70, 0x6032940b, 0xb4d8e790, - 0x89e102e6, 0x5d0b717d, 0xf393c80b, 0x2779bb90, 0x1a405ee6, - 0xceaa2d7d, 0x46712d0b, 0x929b5e90, 0xafa2bbe6, 0x7b48c87d, - 0xd5d0710b, 0x013a0290, 0x3c03e7e6, 0xe8e9947d, 0x2cb4e60a, - 0xf85e9591, 0xc56770e7, 0x118d037c, 0xbf15ba0a, 0x6bffc991, - 0x56c62ce7, 0x822c5f7c, 0x0af75f0a, 0xde1d2c91, 0xe324c9e7, - 0x37ceba7c, 0x9956030a, 0x4dbc7091, 0x708595e7, 0xa46fe67c, - 0xf83e7109, 0x2cd40292, 0x11ede7e4, 0xc507947f, 0x6b9f2d09, - 0xbf755e92, 0x824cbbe4, 0x56a6c87f, 0xde7dc809, 0x0a97bb92, - 0x37ae5ee4, 0xe3442d7f, 0x4ddc9409, 0x9936e792, 0xa40f02e4, - 0x70e5717f, 0xb4b80308, 0x60527093, 0x5d6b95e5, 0x8981e67e, - 0x27195f08, 0xf3f32c93, 0xcecac9e5, 0x1a20ba7e, 0x92fbba08, - 0x4611c993, 0x7b282ce5, 0xafc25f7e, 0x015ae608, 0xd5b09593, - 0xe88970e5, 0x3c63037e, 0x502b5e0e, 0x84c12d95, 0xb9f8c8e3, - 0x6d12bb78, 0xc38a020e, 0x17607195, 0x2a5994e3, 0xfeb3e778, - 0x7668e70e, 0xa2829495, 0x9fbb71e3, 0x4b510278, 0xe5c9bb0e, - 0x3123c895, 0x0c1a2de3, 0xd8f05e78, 0x1cad2c0f, 0xc8475f94, - 0xf57ebae2, 0x2194c979, 0x8f0c700f, 0x5be60394, 0x66dfe6e2, - 0xb2359579, 0x3aee950f, 0xee04e694, 0xd33d03e2, 0x07d77079, - 0xa94fc90f, 0x7da5ba94, 0x409c5fe2, 0x94762c79, 0xc827bb0c, - 0x1ccdc897, 0x21f42de1, 0xf51e5e7a, 0x5b86e70c, 0x8f6c9497, - 0xb25571e1, 0x66bf027a, 0xee64020c, 0x3a8e7197, 0x07b794e1, - 0xd35de77a, 0x7dc55e0c, 0xa92f2d97, 0x9416c8e1, 0x40fcbb7a, - 0x84a1c90d, 0x504bba96, 0x6d725fe0, 0xb9982c7b, 0x1700950d, - 0xc3eae696, 0xfed303e0, 0x2a39707b, 0xa2e2700d, 0x76080396, - 0x4b31e6e0, 0x9fdb957b, 0x31432c0d, 0xe5a95f96, 0xd890bae0, - 0x0c7ac97b}, - {0x00000000, 0x27652581, 0x0fcc3bd9, 0x28a91e58, 0x5f9e0669, - 0x78fb23e8, 0x50523db0, 0x77371831, 0xbe3c0dd2, 0x99592853, - 0xb1f0360b, 0x9695138a, 0xe1a20bbb, 0xc6c72e3a, 0xee6e3062, - 0xc90b15e3, 0x3d7f6b7f, 0x1a1a4efe, 0x32b350a6, 0x15d67527, - 0x62e16d16, 0x45844897, 0x6d2d56cf, 0x4a48734e, 0x834366ad, - 0xa426432c, 0x8c8f5d74, 0xabea78f5, 0xdcdd60c4, 0xfbb84545, - 0xd3115b1d, 0xf4747e9c, 0x7afed6fe, 0x5d9bf37f, 0x7532ed27, - 0x5257c8a6, 0x2560d097, 0x0205f516, 0x2aaceb4e, 0x0dc9cecf, - 0xc4c2db2c, 0xe3a7fead, 0xcb0ee0f5, 0xec6bc574, 0x9b5cdd45, - 0xbc39f8c4, 0x9490e69c, 0xb3f5c31d, 0x4781bd81, 0x60e49800, - 0x484d8658, 0x6f28a3d9, 0x181fbbe8, 0x3f7a9e69, 0x17d38031, - 0x30b6a5b0, 0xf9bdb053, 0xded895d2, 0xf6718b8a, 0xd114ae0b, - 0xa623b63a, 0x814693bb, 0xa9ef8de3, 0x8e8aa862, 0xb5fadc26, - 0x929ff9a7, 0xba36e7ff, 0x9d53c27e, 0xea64da4f, 0xcd01ffce, - 0xe5a8e196, 0xc2cdc417, 0x0bc6d1f4, 0x2ca3f475, 0x040aea2d, - 0x236fcfac, 0x5458d79d, 0x733df21c, 0x5b94ec44, 0x7cf1c9c5, - 0x8885b759, 0xafe092d8, 0x87498c80, 0xa02ca901, 0xd71bb130, - 0xf07e94b1, 0xd8d78ae9, 0xffb2af68, 0x36b9ba8b, 0x11dc9f0a, - 0x39758152, 0x1e10a4d3, 0x6927bce2, 0x4e429963, 0x66eb873b, - 0x418ea2ba, 0xcf040ad8, 0xe8612f59, 0xc0c83101, 0xe7ad1480, - 0x909a0cb1, 0xb7ff2930, 0x9f563768, 0xb83312e9, 0x7138070a, - 0x565d228b, 0x7ef43cd3, 0x59911952, 0x2ea60163, 0x09c324e2, - 0x216a3aba, 0x060f1f3b, 0xf27b61a7, 0xd51e4426, 0xfdb75a7e, - 0xdad27fff, 0xade567ce, 0x8a80424f, 0xa2295c17, 0x854c7996, - 0x4c476c75, 0x6b2249f4, 0x438b57ac, 0x64ee722d, 0x13d96a1c, - 0x34bc4f9d, 0x1c1551c5, 0x3b707444, 0x6af5b94d, 0x4d909ccc, - 0x65398294, 0x425ca715, 0x356bbf24, 0x120e9aa5, 0x3aa784fd, - 0x1dc2a17c, 0xd4c9b49f, 0xf3ac911e, 0xdb058f46, 0xfc60aac7, - 0x8b57b2f6, 0xac329777, 0x849b892f, 0xa3feacae, 0x578ad232, - 0x70eff7b3, 0x5846e9eb, 0x7f23cc6a, 0x0814d45b, 0x2f71f1da, - 0x07d8ef82, 0x20bdca03, 0xe9b6dfe0, 0xced3fa61, 0xe67ae439, - 0xc11fc1b8, 0xb628d989, 0x914dfc08, 0xb9e4e250, 0x9e81c7d1, - 0x100b6fb3, 0x376e4a32, 0x1fc7546a, 0x38a271eb, 0x4f9569da, - 0x68f04c5b, 0x40595203, 0x673c7782, 0xae376261, 0x895247e0, - 0xa1fb59b8, 0x869e7c39, 0xf1a96408, 0xd6cc4189, 0xfe655fd1, - 0xd9007a50, 0x2d7404cc, 0x0a11214d, 0x22b83f15, 0x05dd1a94, - 0x72ea02a5, 0x558f2724, 0x7d26397c, 0x5a431cfd, 0x9348091e, - 0xb42d2c9f, 0x9c8432c7, 0xbbe11746, 0xccd60f77, 0xebb32af6, - 0xc31a34ae, 0xe47f112f, 0xdf0f656b, 0xf86a40ea, 0xd0c35eb2, - 0xf7a67b33, 0x80916302, 0xa7f44683, 0x8f5d58db, 0xa8387d5a, - 0x613368b9, 0x46564d38, 0x6eff5360, 0x499a76e1, 0x3ead6ed0, - 0x19c84b51, 0x31615509, 0x16047088, 0xe2700e14, 0xc5152b95, - 0xedbc35cd, 0xcad9104c, 0xbdee087d, 0x9a8b2dfc, 0xb22233a4, - 0x95471625, 0x5c4c03c6, 0x7b292647, 0x5380381f, 0x74e51d9e, - 0x03d205af, 0x24b7202e, 0x0c1e3e76, 0x2b7b1bf7, 0xa5f1b395, - 0x82949614, 0xaa3d884c, 0x8d58adcd, 0xfa6fb5fc, 0xdd0a907d, - 0xf5a38e25, 0xd2c6aba4, 0x1bcdbe47, 0x3ca89bc6, 0x1401859e, - 0x3364a01f, 0x4453b82e, 0x63369daf, 0x4b9f83f7, 0x6cfaa676, - 0x988ed8ea, 0xbfebfd6b, 0x9742e333, 0xb027c6b2, 0xc710de83, - 0xe075fb02, 0xc8dce55a, 0xefb9c0db, 0x26b2d538, 0x01d7f0b9, - 0x297eeee1, 0x0e1bcb60, 0x792cd351, 0x5e49f6d0, 0x76e0e888, - 0x5185cd09}}; - -#endif - -#endif - -#endif - -local const z_crc_t FAR x2n_table[] = { - 0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000, - 0xedb88320, 0xb1e6b092, 0xa06a2517, 0xed627dae, 0x88d14467, - 0xd7bbfe6a, 0xec447f11, 0x8e7ea170, 0x6427800e, 0x4d47bae0, - 0x09fe548f, 0x83852d0f, 0x30362f1a, 0x7b5a9cc3, 0x31fec169, - 0x9fec022a, 0x6c8dedc4, 0x15d6874d, 0x5fde7a4e, 0xbad90e37, - 0x2e4e5eef, 0x4eaba214, 0xa8a472c0, 0x429a969e, 0x148d302a, - 0xc40ba6d0, 0xc4e22c3c}; - diff --git a/third_party/zlib/deflate.c b/third_party/zlib/deflate.c deleted file mode 100644 index 012ea81..0000000 --- a/third_party/zlib/deflate.c +++ /dev/null @@ -1,2139 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process depends on being able to identify portions - * of the input text which are identical to earlier input (within a - * sliding window trailing behind the input currently being processed). - * - * The most straightforward technique turns out to be the fastest for - * most input files: try all possible matches and select the longest. - * The key feature of this algorithm is that insertions into the string - * dictionary are very simple and thus fast, and deletions are avoided - * completely. Insertions are performed at each input character, whereas - * string matches are performed only when the previous match ends. So it - * is preferable to spend more time in matches to allow very fast string - * insertions and avoid deletions. The matching algorithm for small - * strings is inspired from that of Rabin & Karp. A brute force approach - * is used to find longer strings when a small match has been found. - * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze - * (by Leonid Broukhis). - * A previous version of this file used a more sophisticated algorithm - * (by Fiala and Greene) which is guaranteed to run in linear amortized - * time, but has a larger average cost, uses more memory and is patented. - * However the F&G algorithm may be faster for some highly redundant - * files if the parameter max_chain_length (described below) is too large. - * - * ACKNOWLEDGEMENTS - * - * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and - * I found it in 'freeze' written by Leonid Broukhis. - * Thanks to many people for bug reports and testing. - * - * REFERENCES - * - * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". - * Available in http://tools.ietf.org/html/rfc1951 - * - * A description of the Rabin and Karp algorithm is given in the book - * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. - * - * Fiala,E.R., and Greene,D.H. - * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 - * - */ - -/* @(#) $Id$ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.3.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -typedef enum { - need_more, /* block not completed, need more input or more output */ - block_done, /* block flush performed */ - finish_started, /* finish started, need only more output at next deflate */ - finish_done /* finish done, accept no more input or output */ -} block_state; - -typedef block_state (*compress_func)(deflate_state *s, int flush); -/* Compression function. Returns the block state after the call. */ - -local block_state deflate_stored(deflate_state *s, int flush); -local block_state deflate_fast(deflate_state *s, int flush); -#ifndef FASTEST -local block_state deflate_slow(deflate_state *s, int flush); -#endif -local block_state deflate_rle(deflate_state *s, int flush); -local block_state deflate_huff(deflate_state *s, int flush); - -/* =========================================================================== - * Local data - */ - -#define NIL 0 -/* Tail of hash chains */ - -#ifndef TOO_FAR -# define TOO_FAR 4096 -#endif -/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -typedef struct config_s { - ush good_length; /* reduce lazy search above this match length */ - ush max_lazy; /* do not perform lazy search above this match length */ - ush nice_length; /* quit search above this match length */ - ush max_chain; - compress_func func; -} config; - -#ifdef FASTEST -local const config configuration_table[2] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ -#else -local const config configuration_table[10] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ -/* 2 */ {4, 5, 16, 8, deflate_fast}, -/* 3 */ {4, 6, 32, 32, deflate_fast}, - -/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ -/* 5 */ {8, 16, 32, 32, deflate_slow}, -/* 6 */ {8, 16, 128, 128, deflate_slow}, -/* 7 */ {8, 32, 128, 256, deflate_slow}, -/* 8 */ {32, 128, 258, 1024, deflate_slow}, -/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ -#endif - -/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 - * For deflate_fast() (levels <= 3) good is ignored and lazy has a different - * meaning. - */ - -/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) - -/* =========================================================================== - * Update a hash value with the given input byte - * IN assertion: all calls to UPDATE_HASH are made with consecutive input - * characters, so that a running hash key can be computed from the previous - * key instead of complete recalculation each time. - */ -#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask) - - -/* =========================================================================== - * Insert string str in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * If this file is compiled with -DFASTEST, the compression level is forced - * to 1, and no hash chains are maintained. - * IN assertion: all calls to INSERT_STRING are made with consecutive input - * characters and the first MIN_MATCH bytes of str are valid (except for - * the last MIN_MATCH-1 bytes of the input file). - */ -#ifdef FASTEST -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#else -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#endif - -/* =========================================================================== - * Initialize the hash table (avoiding 64K overflow for 16 bit systems). - * prev[] will be initialized on the fly. - */ -#define CLEAR_HASH(s) \ - do { \ - s->head[s->hash_size - 1] = NIL; \ - zmemzero((Bytef *)s->head, \ - (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \ - } while (0) - -/* =========================================================================== - * Slide the hash table when sliding the window down (could be avoided with 32 - * bit values at the expense of memory usage). We slide even when level == 0 to - * keep the hash table consistent if we switch back to level > 0 later. - */ -#if defined(__has_feature) -# if __has_feature(memory_sanitizer) - __attribute__((no_sanitize("memory"))) -# endif -#endif -local void slide_hash(deflate_state *s) { - unsigned n, m; - Posf *p; - uInt wsize = s->w_size; - - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m - wsize : NIL); - } while (--n); - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m - wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif -} - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) { - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - zmemcpy(buf, strm->next_in, len); - if (strm->state->wrap == 1) { - strm->adler = adler32(strm->adler, buf, len); - } -#ifdef GZIP - else if (strm->state->wrap == 2) { - strm->adler = crc32(strm->adler, buf, len); - } -#endif - strm->next_in += len; - strm->total_in += len; - - return len; -} - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -local void fill_window(deflate_state *s) { - unsigned n; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (sizeof(int) <= 2) { - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if - * strstart == 0 && lookahead == 1 (input done a byte at time) - */ - more--; - } - } - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s->strstart >= wsize + MAX_DIST(s)) { - - zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - if (s->insert > s->strstart) - s->insert = s->strstart; - slide_hash(s); - more += wsize; - } - if (s->strm->avail_in == 0) break; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead + s->insert >= MIN_MATCH) { - uInt str = s->strstart - s->insert; - s->ins_h = s->window[str]; - UPDATE_HASH(s, s->ins_h, s->window[str + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - while (s->insert) { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - s->insert--; - if (s->lookahead + s->insert < MIN_MATCH) - break; - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ - if (s->high_water < s->window_size) { - ulg curr = s->strstart + (ulg)(s->lookahead); - ulg init; - - if (s->high_water < curr) { - /* Previous high water mark below current data -- zero WIN_INIT - * bytes or up to end of window, whichever is less. - */ - init = s->window_size - curr; - if (init > WIN_INIT) - init = WIN_INIT; - zmemzero(s->window + curr, (unsigned)init); - s->high_water = curr + init; - } - else if (s->high_water < (ulg)curr + WIN_INIT) { - /* High water mark at or above current data, but below current data - * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up - * to end of window, whichever is less. - */ - init = (ulg)curr + WIN_INIT - s->high_water; - if (init > s->window_size - s->high_water) - init = s->window_size - s->high_water; - zmemzero(s->window + s->high_water, (unsigned)init); - s->high_water += init; - } - } - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "not enough room for search"); -} - -/* ========================================================================= */ -int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version, - int stream_size) { - return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, - Z_DEFAULT_STRATEGY, version, stream_size); - /* To do: ignore strm->next_in if we use it as window */ -} - -/* ========================================================================= */ -int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, - int windowBits, int memLevel, int strategy, - const char *version, int stream_size) { - deflate_state *s; - int wrap = 1; - static const char my_version[] = ZLIB_VERSION; - - if (version == Z_NULL || version[0] != my_version[0] || - stream_size != sizeof(z_stream)) { - return Z_VERSION_ERROR; - } - if (strm == Z_NULL) return Z_STREAM_ERROR; - - strm->msg = Z_NULL; - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - if (windowBits < -15) - return Z_STREAM_ERROR; - windowBits = -windowBits; - } -#ifdef GZIP - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } -#endif - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { - return Z_STREAM_ERROR; - } - if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ - s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); - if (s == Z_NULL) return Z_MEM_ERROR; - strm->state = (struct internal_state FAR *)s; - s->strm = strm; - s->status = INIT_STATE; /* to pass state test in deflateReset() */ - - s->wrap = wrap; - s->gzhead = Z_NULL; - s->w_bits = (uInt)windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; - - s->hash_bits = (uInt)memLevel + 7; - s->hash_size = 1 << s->hash_bits; - s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH); - - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); - s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); - s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); - - s->high_water = 0; /* nothing written to s->window yet */ - - s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - /* We overlay pending_buf and sym_buf. This works since the average size - * for length/distance pairs over any compressed block is assured to be 31 - * bits or less. - * - * Analysis: The longest fixed codes are a length code of 8 bits plus 5 - * extra bits, for lengths 131 to 257. The longest fixed distance codes are - * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest - * possible fixed-codes length/distance pair is then 31 bits total. - * - * sym_buf starts one-fourth of the way into pending_buf. So there are - * three bytes in sym_buf for every four bytes in pending_buf. Each symbol - * in sym_buf is three bytes -- two for the distance and one for the - * literal/length. As each symbol is consumed, the pointer to the next - * sym_buf value to read moves forward three bytes. From that symbol, up to - * 31 bits are written to pending_buf. The closest the written pending_buf - * bits gets to the next sym_buf symbol to read is just before the last - * code is written. At that time, 31*(n - 2) bits have been written, just - * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at - * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1 - * symbols are written.) The closest the writing gets to what is unread is - * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and - * can range from 128 to 32768. - * - * Therefore, at a minimum, there are 142 bits of space between what is - * written and what is read in the overlain buffers, so the symbols cannot - * be overwritten by the compressed data. That space is actually 139 bits, - * due to the three-bit fixed-code block header. - * - * That covers the case where either Z_FIXED is specified, forcing fixed - * codes, or when the use of fixed codes is chosen, because that choice - * results in a smaller compressed block than dynamic codes. That latter - * condition then assures that the above analysis also covers all dynamic - * blocks. A dynamic-code block will only be chosen to be emitted if it has - * fewer bits than a fixed-code block would for the same set of symbols. - * Therefore its average symbol length is assured to be less than 31. So - * the compressed data for a dynamic block also cannot overwrite the - * symbols from which it is being constructed. - */ - - s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS); - s->pending_buf_size = (ulg)s->lit_bufsize * 4; - - if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { - s->status = FINISH_STATE; - strm->msg = ERR_MSG(Z_MEM_ERROR); - deflateEnd (strm); - return Z_MEM_ERROR; - } -#ifdef LIT_MEM - s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1)); - s->l_buf = s->pending_buf + (s->lit_bufsize << 2); - s->sym_end = s->lit_bufsize - 1; -#else - s->sym_buf = s->pending_buf + s->lit_bufsize; - s->sym_end = (s->lit_bufsize - 1) * 3; -#endif - /* We avoid equality with lit_bufsize*3 because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - - s->level = level; - s->strategy = strategy; - s->method = (Byte)method; - - return deflateReset(strm); -} - -/* ========================================================================= - * Check for a valid deflate stream state. Return 0 if ok, 1 if not. - */ -local int deflateStateCheck(z_streamp strm) { - deflate_state *s; - if (strm == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) - return 1; - s = strm->state; - if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && -#ifdef GZIP - s->status != GZIP_STATE && -#endif - s->status != EXTRA_STATE && - s->status != NAME_STATE && - s->status != COMMENT_STATE && - s->status != HCRC_STATE && - s->status != BUSY_STATE && - s->status != FINISH_STATE)) - return 1; - return 0; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary, - uInt dictLength) { - deflate_state *s; - uInt str, n; - int wrap; - unsigned avail; - z_const unsigned char *next; - - if (deflateStateCheck(strm) || dictionary == Z_NULL) - return Z_STREAM_ERROR; - s = strm->state; - wrap = s->wrap; - if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead) - return Z_STREAM_ERROR; - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap == 1) - strm->adler = adler32(strm->adler, dictionary, dictLength); - s->wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s->w_size) { - if (wrap == 0) { /* already empty otherwise */ - CLEAR_HASH(s); - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - dictionary += dictLength - s->w_size; /* use the tail */ - dictLength = s->w_size; - } - - /* insert dictionary into window and hash */ - avail = strm->avail_in; - next = strm->next_in; - strm->avail_in = dictLength; - strm->next_in = (z_const Bytef *)dictionary; - fill_window(s); - while (s->lookahead >= MIN_MATCH) { - str = s->strstart; - n = s->lookahead - (MIN_MATCH-1); - do { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - } while (--n); - s->strstart = str; - s->lookahead = MIN_MATCH-1; - fill_window(s); - } - s->strstart += s->lookahead; - s->block_start = (long)s->strstart; - s->insert = s->lookahead; - s->lookahead = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - strm->next_in = next; - strm->avail_in = avail; - s->wrap = wrap; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary, - uInt *dictLength) { - deflate_state *s; - uInt len; - - if (deflateStateCheck(strm)) - return Z_STREAM_ERROR; - s = strm->state; - len = s->strstart + s->lookahead; - if (len > s->w_size) - len = s->w_size; - if (dictionary != Z_NULL && len) - zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); - if (dictLength != Z_NULL) - *dictLength = len; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateResetKeep(z_streamp strm) { - deflate_state *s; - - if (deflateStateCheck(strm)) { - return Z_STREAM_ERROR; - } - - strm->total_in = strm->total_out = 0; - strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ - strm->data_type = Z_UNKNOWN; - - s = (deflate_state *)strm->state; - s->pending = 0; - s->pending_out = s->pending_buf; - - if (s->wrap < 0) { - s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ - } - s->status = -#ifdef GZIP - s->wrap == 2 ? GZIP_STATE : -#endif - INIT_STATE; - strm->adler = -#ifdef GZIP - s->wrap == 2 ? crc32(0L, Z_NULL, 0) : -#endif - adler32(0L, Z_NULL, 0); - s->last_flush = -2; - - _tr_init(s); - - return Z_OK; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init(deflate_state *s) { - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->insert = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -} - -/* ========================================================================= */ -int ZEXPORT deflateReset(z_streamp strm) { - int ret; - - ret = deflateResetKeep(strm); - if (ret == Z_OK) - lm_init(strm->state); - return ret; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetHeader(z_streamp strm, gz_headerp head) { - if (deflateStateCheck(strm) || strm->state->wrap != 2) - return Z_STREAM_ERROR; - strm->state->gzhead = head; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits) { - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - if (pending != Z_NULL) - *pending = strm->state->pending; - if (bits != Z_NULL) - *bits = strm->state->bi_valid; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { - deflate_state *s; - int put; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; -#ifdef LIT_MEM - if (bits < 0 || bits > 16 || - (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3)) - return Z_BUF_ERROR; -#else - if (bits < 0 || bits > 16 || - s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) - return Z_BUF_ERROR; -#endif - do { - put = Buf_size - s->bi_valid; - if (put > bits) - put = bits; - s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); - s->bi_valid += put; - _tr_flush_bits(s); - value >>= put; - bits -= put; - } while (bits); - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) { - deflate_state *s; - compress_func func; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { - return Z_STREAM_ERROR; - } - func = configuration_table[s->level].func; - - if ((strategy != s->strategy || func != configuration_table[level].func) && - s->last_flush != -2) { - /* Flush the last buffer: */ - int err = deflate(strm, Z_BLOCK); - if (err == Z_STREAM_ERROR) - return err; - if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead) - return Z_BUF_ERROR; - } - if (s->level != level) { - if (s->level == 0 && s->matches != 0) { - if (s->matches == 1) - slide_hash(s); - else - CLEAR_HASH(s); - s->matches = 0; - } - s->level = level; - s->max_lazy_match = configuration_table[level].max_lazy; - s->good_match = configuration_table[level].good_length; - s->nice_match = configuration_table[level].nice_length; - s->max_chain_length = configuration_table[level].max_chain; - } - s->strategy = strategy; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy, - int nice_length, int max_chain) { - deflate_state *s; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - s = strm->state; - s->good_match = (uInt)good_length; - s->max_lazy_match = (uInt)max_lazy; - s->nice_match = nice_length; - s->max_chain_length = (uInt)max_chain; - return Z_OK; -} - -/* ========================================================================= - * For the default windowBits of 15 and memLevel of 8, this function returns a - * close to exact, as well as small, upper bound on the compressed size. This - * is an expansion of ~0.03%, plus a small constant. - * - * For any setting other than those defaults for windowBits and memLevel, one - * of two worst case bounds is returned. This is at most an expansion of ~4% or - * ~13%, plus a small constant. - * - * Both the 0.03% and 4% derive from the overhead of stored blocks. The first - * one is for stored blocks of 16383 bytes (memLevel == 8), whereas the second - * is for stored blocks of 127 bytes (the worst case memLevel == 1). The - * expansion results from five bytes of header for each stored block. - * - * The larger expansion of 13% results from a window size less than or equal to - * the symbols buffer size (windowBits <= memLevel + 7). In that case some of - * the data being compressed may have slid out of the sliding window, impeding - * a stored block from being emitted. Then the only choice is a fixed or - * dynamic block, where a fixed block limits the maximum expansion to 9 bits - * per 8-bit byte, plus 10 bits for every block. The smallest block size for - * which this can occur is 255 (memLevel == 2). - * - * Shifts are used to approximate divisions, for speed. - */ -uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) { - deflate_state *s; - uLong fixedlen, storelen, wraplen; - - /* upper bound for fixed blocks with 9-bit literals and length 255 - (memLevel == 2, which is the lowest that may not use stored blocks) -- - ~13% overhead plus a small constant */ - fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) + - (sourceLen >> 9) + 4; - - /* upper bound for stored blocks with length 127 (memLevel == 1) -- - ~4% overhead plus a small constant */ - storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) + - (sourceLen >> 11) + 7; - - /* if can't get parameters, return larger bound plus a zlib wrapper */ - if (deflateStateCheck(strm)) - return (fixedlen > storelen ? fixedlen : storelen) + 6; - - /* compute wrapper length */ - s = strm->state; - switch (s->wrap) { - case 0: /* raw deflate */ - wraplen = 0; - break; - case 1: /* zlib wrapper */ - wraplen = 6 + (s->strstart ? 4 : 0); - break; -#ifdef GZIP - case 2: /* gzip wrapper */ - wraplen = 18; - if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ - Bytef *str; - if (s->gzhead->extra != Z_NULL) - wraplen += 2 + s->gzhead->extra_len; - str = s->gzhead->name; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - str = s->gzhead->comment; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - if (s->gzhead->hcrc) - wraplen += 2; - } - break; -#endif - default: /* for compiler happiness */ - wraplen = 6; - } - - /* if not default parameters, return one of the conservative bounds */ - if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return (s->w_bits <= s->hash_bits && s->level ? fixedlen : storelen) + - wraplen; - - /* default settings: return tight bound for that case -- ~0.03% overhead - plus a small constant */ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13 - 6 + wraplen; -} - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -local void putShortMSB(deflate_state *s, uInt b) { - put_byte(s, (Byte)(b >> 8)); - put_byte(s, (Byte)(b & 0xff)); -} - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output, except for - * some deflate_stored() output, goes through this function so some - * applications may wish to modify it to avoid allocating a large - * strm->next_out buffer and copying into it. (See also read_buf()). - */ -local void flush_pending(z_streamp strm) { - unsigned len; - deflate_state *s = strm->state; - - _tr_flush_bits(s); - len = s->pending; - if (len > strm->avail_out) len = strm->avail_out; - if (len == 0) return; - - zmemcpy(strm->next_out, s->pending_out, len); - strm->next_out += len; - s->pending_out += len; - strm->total_out += len; - strm->avail_out -= len; - s->pending -= len; - if (s->pending == 0) { - s->pending_out = s->pending_buf; - } -} - -/* =========================================================================== - * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. - */ -#define HCRC_UPDATE(beg) \ - do { \ - if (s->gzhead->hcrc && s->pending > (beg)) \ - strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ - s->pending - (beg)); \ - } while (0) - -/* ========================================================================= */ -int ZEXPORT deflate(z_streamp strm, int flush) { - int old_flush; /* value of flush param for previous deflate call */ - deflate_state *s; - - if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { - return Z_STREAM_ERROR; - } - s = strm->state; - - if (strm->next_out == Z_NULL || - (strm->avail_in != 0 && strm->next_in == Z_NULL) || - (s->status == FINISH_STATE && flush != Z_FINISH)) { - ERR_RETURN(strm, Z_STREAM_ERROR); - } - if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - - old_flush = s->last_flush; - s->last_flush = flush; - - /* Flush as much pending output as possible */ - if (s->pending != 0) { - flush_pending(strm); - if (strm->avail_out == 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s->last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && - flush != Z_FINISH) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s->status == FINISH_STATE && strm->avail_in != 0) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* Write the header */ - if (s->status == INIT_STATE && s->wrap == 0) - s->status = BUSY_STATE; - if (s->status == INIT_STATE) { - /* zlib header */ - uInt header = (Z_DEFLATED + ((s->w_bits - 8) << 4)) << 8; - uInt level_flags; - - if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) - level_flags = 0; - else if (s->level < 6) - level_flags = 1; - else if (s->level == 6) - level_flags = 2; - else - level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); - - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - strm->adler = adler32(0L, Z_NULL, 0); - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } -#ifdef GZIP - if (s->status == GZIP_STATE) { - /* gzip header */ - strm->adler = crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (s->gzhead == Z_NULL) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } - else { - put_byte(s, (s->gzhead->text ? 1 : 0) + - (s->gzhead->hcrc ? 2 : 0) + - (s->gzhead->extra == Z_NULL ? 0 : 4) + - (s->gzhead->name == Z_NULL ? 0 : 8) + - (s->gzhead->comment == Z_NULL ? 0 : 16) - ); - put_byte(s, (Byte)(s->gzhead->time & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != Z_NULL) { - put_byte(s, s->gzhead->extra_len & 0xff); - put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); - } - if (s->gzhead->hcrc) - strm->adler = crc32(strm->adler, s->pending_buf, - s->pending); - s->gzindex = 0; - s->status = EXTRA_STATE; - } - } - if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex; - while (s->pending + left > s->pending_buf_size) { - uInt copy = s->pending_buf_size - s->pending; - zmemcpy(s->pending_buf + s->pending, - s->gzhead->extra + s->gzindex, copy); - s->pending = s->pending_buf_size; - HCRC_UPDATE(beg); - s->gzindex += copy; - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - left -= copy; - } - zmemcpy(s->pending_buf + s->pending, - s->gzhead->extra + s->gzindex, left); - s->pending += left; - HCRC_UPDATE(beg); - s->gzindex = 0; - } - s->status = NAME_STATE; - } - if (s->status == NAME_STATE) { - if (s->gzhead->name != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - int val; - do { - if (s->pending == s->pending_buf_size) { - HCRC_UPDATE(beg); - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - } - val = s->gzhead->name[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - HCRC_UPDATE(beg); - s->gzindex = 0; - } - s->status = COMMENT_STATE; - } - if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != Z_NULL) { - ulg beg = s->pending; /* start of bytes to update crc */ - int val; - do { - if (s->pending == s->pending_buf_size) { - HCRC_UPDATE(beg); - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - beg = 0; - } - val = s->gzhead->comment[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - HCRC_UPDATE(beg); - } - s->status = HCRC_STATE; - } - if (s->status == HCRC_STATE) { - if (s->gzhead->hcrc) { - if (s->pending + 2 > s->pending_buf_size) { - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - strm->adler = crc32(0L, Z_NULL, 0); - } - s->status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s->pending != 0) { - s->last_flush = -1; - return Z_OK; - } - } -#endif - - /* Start a new block or continue the current one. - */ - if (strm->avail_in != 0 || s->lookahead != 0 || - (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { - block_state bstate; - - bstate = s->level == 0 ? deflate_stored(s, flush) : - s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : - s->strategy == Z_RLE ? deflate_rle(s, flush) : - (*(configuration_table[s->level].func))(s, flush); - - if (bstate == finish_started || bstate == finish_done) { - s->status = FINISH_STATE; - } - if (bstate == need_more || bstate == finish_started) { - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate == block_done) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(s); - } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - _tr_stored_block(s, (char*)0, 0L, 0); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush == Z_FULL_FLUSH) { - CLEAR_HASH(s); /* forget history */ - if (s->lookahead == 0) { - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - } - } - flush_pending(strm); - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - - if (flush != Z_FINISH) return Z_OK; - if (s->wrap <= 0) return Z_STREAM_END; - - /* Write the trailer */ -#ifdef GZIP - if (s->wrap == 2) { - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); - put_byte(s, (Byte)(strm->total_in & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); - } - else -#endif - { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ - return s->pending != 0 ? Z_OK : Z_STREAM_END; -} - -/* ========================================================================= */ -int ZEXPORT deflateEnd(z_streamp strm) { - int status; - - if (deflateStateCheck(strm)) return Z_STREAM_ERROR; - - status = strm->state->status; - - /* Deallocate in reverse order of allocations: */ - TRY_FREE(strm, strm->state->pending_buf); - TRY_FREE(strm, strm->state->head); - TRY_FREE(strm, strm->state->prev); - TRY_FREE(strm, strm->state->window); - - ZFREE(strm, strm->state); - strm->state = Z_NULL; - - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state. - * To simplify the source, this is not supported for 16-bit MSDOS (which - * doesn't have enough memory anyway to duplicate compression states). - */ -int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { -#ifdef MAXSEG_64K - (void)dest; - (void)source; - return Z_STREAM_ERROR; -#else - deflate_state *ds; - deflate_state *ss; - - - if (deflateStateCheck(source) || dest == Z_NULL) { - return Z_STREAM_ERROR; - } - - ss = source->state; - - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - - ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); - if (ds == Z_NULL) return Z_MEM_ERROR; - dest->state = (struct internal_state FAR *) ds; - zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); - ds->strm = dest; - - ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); - ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); - ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS); - - if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || - ds->pending_buf == Z_NULL) { - deflateEnd (dest); - return Z_MEM_ERROR; - } - /* following zmemcpy do not work for 16-bit MSDOS */ - zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); - zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); - zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS); - - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); -#ifdef LIT_MEM - ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1)); - ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2); -#else - ds->sym_buf = ds->pending_buf + ds->lit_bufsize; -#endif - - ds->l_desc.dyn_tree = ds->dyn_ltree; - ds->d_desc.dyn_tree = ds->dyn_dtree; - ds->bl_desc.dyn_tree = ds->bl_tree; - - return Z_OK; -#endif /* MAXSEG_64K */ -} - -#ifndef FASTEST -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -local uInt longest_match(deflate_state *s, IPos cur_match) { - unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - int best_len = (int)s->prev_length; /* best match length so far */ - int nice_match = s->nice_match; /* stop if match long enough */ - IPos limit = s->strstart > (IPos)MAX_DIST(s) ? - s->strstart - (IPos)MAX_DIST(s) : NIL; - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - Posf *prev = s->prev; - uInt wmask = s->w_mask; - -#ifdef UNALIGNED_OK - /* Compare two bytes at a time. Note: this is not always beneficial. - * Try with and without -DUNALIGNED_OK to check. - */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan + best_len - 1); -#else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len - 1]; - register Byte scan_end = scan[best_len]; -#endif - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s->prev_length >= s->good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "need lookahead"); - - do { - Assert(cur_match < s->strstart, "no future"); - match = s->window + cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ -#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) - /* This code assumes sizeof(unsigned short) == 2. Do not use - * UNALIGNED_OK if your compiler uses a different size. - */ - if (*(ushf*)(match + best_len - 1) != scan_end || - *(ushf*)match != scan_start) continue; - - /* It is not necessary to compare scan[2] and match[2] since they are - * always equal when the other bytes match, given that the hash keys - * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at - * strstart + 3, + 5, up to strstart + 257. We check for insufficient - * lookahead only every 4th comparison; the 128th check will be made - * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is - * necessary to put more guard bytes at the end of the window, or - * to check more often for insufficient lookahead. - */ - Assert(scan[2] == match[2], "scan[2]?"); - scan++, match++; - do { - } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) && - *(ushf*)(scan += 2) == *(ushf*)(match += 2) && - *(ushf*)(scan += 2) == *(ushf*)(match += 2) && - *(ushf*)(scan += 2) == *(ushf*)(match += 2) && - scan < strend); - /* The funny "do {}" generates better code on most compilers */ - - /* Here, scan <= window + strstart + 257 */ - Assert(scan <= s->window + (unsigned)(s->window_size - 1), - "wild scan"); - if (*scan == *match) scan++; - - len = (MAX_MATCH - 1) - (int)(strend - scan); - scan = strend - (MAX_MATCH-1); - -#else /* UNALIGNED_OK */ - - if (match[best_len] != scan_end || - match[best_len - 1] != scan_end1 || - *match != *scan || - *++match != scan[1]) continue; - - /* The check at best_len - 1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match++; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart + 258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window + (unsigned)(s->window_size - 1), - "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - scan = strend - MAX_MATCH; - -#endif /* UNALIGNED_OK */ - - if (len > best_len) { - s->match_start = cur_match; - best_len = len; - if (len >= nice_match) break; -#ifdef UNALIGNED_OK - scan_end = *(ushf*)(scan + best_len - 1); -#else - scan_end1 = scan[best_len - 1]; - scan_end = scan[best_len]; -#endif - } - } while ((cur_match = prev[cur_match & wmask]) > limit - && --chain_length != 0); - - if ((uInt)best_len <= s->lookahead) return (uInt)best_len; - return s->lookahead; -} - -#else /* FASTEST */ - -/* --------------------------------------------------------------------------- - * Optimized version for FASTEST only - */ -local uInt longest_match(deflate_state *s, IPos cur_match) { - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "need lookahead"); - - Assert(cur_match < s->strstart, "no future"); - - match = s->window + cur_match; - - /* Return failure if the match length is less than 2: - */ - if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; - - /* The check at best_len - 1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match += 2; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart + 258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window + (unsigned)(s->window_size - 1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - - if (len < MIN_MATCH) return MIN_MATCH - 1; - - s->match_start = cur_match; - return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; -} - -#endif /* FASTEST */ - -#ifdef ZLIB_DEBUG - -#define EQUAL 0 -/* result of memcmp for equal strings */ - -/* =========================================================================== - * Check that the match at match_start is indeed a match. - */ -local void check_match(deflate_state *s, IPos start, IPos match, int length) { - /* check that the match is indeed a match */ - Bytef *back = s->window + (int)match, *here = s->window + start; - IPos len = length; - if (match == (IPos)-1) { - /* match starts one byte before the current window -- just compare the - subsequent length-1 bytes */ - back++; - here++; - len--; - } - if (zmemcmp(back, here, len) != EQUAL) { - fprintf(stderr, " start %u, match %d, length %d\n", - start, (int)match, length); - do { - fprintf(stderr, "(%02x %02x)", *back++, *here++); - } while (--len != 0); - z_error("invalid match"); - } - if (z_verbose > 1) { - fprintf(stderr,"\\[%d,%d]", start - match, length); - do { putc(s->window[start++], stderr); } while (--length != 0); - } -} -#else -# define check_match(s, start, match, length) -#endif /* ZLIB_DEBUG */ - -/* =========================================================================== - * Flush the current block, with given end-of-file flag. - * IN assertion: strstart is set to the end of the current match. - */ -#define FLUSH_BLOCK_ONLY(s, last) { \ - _tr_flush_block(s, (s->block_start >= 0L ? \ - (charf *)&s->window[(unsigned)s->block_start] : \ - (charf *)Z_NULL), \ - (ulg)((long)s->strstart - s->block_start), \ - (last)); \ - s->block_start = s->strstart; \ - flush_pending(s->strm); \ - Tracev((stderr,"[FLUSH]")); \ -} - -/* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, last) { \ - FLUSH_BLOCK_ONLY(s, last); \ - if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ -} - -/* Maximum stored block length in deflate format (not including header). */ -#define MAX_STORED 65535 - -/* Minimum of a and b. */ -#define MIN(a, b) ((a) > (b) ? (b) : (a)) - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * - * In case deflateParams() is used to later switch to a non-zero compression - * level, s->matches (otherwise unused when storing) keeps track of the number - * of hash table slides to perform. If s->matches is 1, then one hash table - * slide will be done when switching. If s->matches is 2, the maximum value - * allowed here, then the hash table will be cleared, since two or more slides - * is the same as a clear. - * - * deflate_stored() is written to minimize the number of times an input byte is - * copied. It is most efficient with large input and output buffers, which - * maximizes the opportunities to have a single copy from next_in to next_out. - */ -local block_state deflate_stored(deflate_state *s, int flush) { - /* Smallest worthy block size when not flushing or finishing. By default - * this is 32K. This can be as small as 507 bytes for memLevel == 1. For - * large input and output buffers, the stored block size will be larger. - */ - unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); - - /* Copy as many min_block or larger stored blocks directly to next_out as - * possible. If flushing, copy the remaining available input to next_out as - * stored blocks, if there is enough space. - */ - unsigned len, left, have, last = 0; - unsigned used = s->strm->avail_in; - do { - /* Set len to the maximum size block that we can copy directly with the - * available input data and output space. Set left to how much of that - * would be copied from what's left in the window. - */ - len = MAX_STORED; /* maximum deflate stored block length */ - have = (s->bi_valid + 42) >> 3; /* number of header bytes */ - if (s->strm->avail_out < have) /* need room for header */ - break; - /* maximum stored block length that will fit in avail_out: */ - have = s->strm->avail_out - have; - left = s->strstart - s->block_start; /* bytes left in window */ - if (len > (ulg)left + s->strm->avail_in) - len = left + s->strm->avail_in; /* limit len to the input */ - if (len > have) - len = have; /* limit len to the output */ - - /* If the stored block would be less than min_block in length, or if - * unable to copy all of the available input when flushing, then try - * copying to the window and the pending buffer instead. Also don't - * write an empty block when flushing -- deflate() does that. - */ - if (len < min_block && ((len == 0 && flush != Z_FINISH) || - flush == Z_NO_FLUSH || - len != left + s->strm->avail_in)) - break; - - /* Make a dummy stored block in pending to get the header bytes, - * including any pending bits. This also updates the debugging counts. - */ - last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; - _tr_stored_block(s, (char *)0, 0L, last); - - /* Replace the lengths in the dummy stored block with len. */ - s->pending_buf[s->pending - 4] = len; - s->pending_buf[s->pending - 3] = len >> 8; - s->pending_buf[s->pending - 2] = ~len; - s->pending_buf[s->pending - 1] = ~len >> 8; - - /* Write the stored block header bytes. */ - flush_pending(s->strm); - -#ifdef ZLIB_DEBUG - /* Update debugging counts for the data about to be copied. */ - s->compressed_len += len << 3; - s->bits_sent += len << 3; -#endif - - /* Copy uncompressed bytes from the window to next_out. */ - if (left) { - if (left > len) - left = len; - zmemcpy(s->strm->next_out, s->window + s->block_start, left); - s->strm->next_out += left; - s->strm->avail_out -= left; - s->strm->total_out += left; - s->block_start += left; - len -= left; - } - - /* Copy uncompressed bytes directly from next_in to next_out, updating - * the check value. - */ - if (len) { - read_buf(s->strm, s->strm->next_out, len); - s->strm->next_out += len; - s->strm->avail_out -= len; - s->strm->total_out += len; - } - } while (last == 0); - - /* Update the sliding window with the last s->w_size bytes of the copied - * data, or append all of the copied data to the existing window if less - * than s->w_size bytes were copied. Also update the number of bytes to - * insert in the hash tables, in the event that deflateParams() switches to - * a non-zero compression level. - */ - used -= s->strm->avail_in; /* number of input bytes directly copied */ - if (used) { - /* If any input was used, then no unused input remains in the window, - * therefore s->block_start == s->strstart. - */ - if (used >= s->w_size) { /* supplant the previous history */ - s->matches = 2; /* clear hash */ - zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); - s->strstart = s->w_size; - s->insert = s->strstart; - } - else { - if (s->window_size - s->strstart <= used) { - /* Slide the window down. */ - s->strstart -= s->w_size; - zmemcpy(s->window, s->window + s->w_size, s->strstart); - if (s->matches < 2) - s->matches++; /* add a pending slide_hash() */ - if (s->insert > s->strstart) - s->insert = s->strstart; - } - zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); - s->strstart += used; - s->insert += MIN(used, s->w_size - s->insert); - } - s->block_start = s->strstart; - } - if (s->high_water < s->strstart) - s->high_water = s->strstart; - - /* If the last block was written to next_out, then done. */ - if (last) - return finish_done; - - /* If flushing and all input has been consumed, then done. */ - if (flush != Z_NO_FLUSH && flush != Z_FINISH && - s->strm->avail_in == 0 && (long)s->strstart == s->block_start) - return block_done; - - /* Fill the window with any remaining input. */ - have = s->window_size - s->strstart; - if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { - /* Slide the window down. */ - s->block_start -= s->w_size; - s->strstart -= s->w_size; - zmemcpy(s->window, s->window + s->w_size, s->strstart); - if (s->matches < 2) - s->matches++; /* add a pending slide_hash() */ - have += s->w_size; /* more space now */ - if (s->insert > s->strstart) - s->insert = s->strstart; - } - if (have > s->strm->avail_in) - have = s->strm->avail_in; - if (have) { - read_buf(s->strm, s->window + s->strstart, have); - s->strstart += have; - s->insert += MIN(have, s->w_size - s->insert); - } - if (s->high_water < s->strstart) - s->high_water = s->strstart; - - /* There was not enough avail_out to write a complete worthy or flushed - * stored block to next_out. Write a stored block to pending instead, if we - * have enough input for a worthy block, or if flushing and there is enough - * room for the remaining input as a stored block in the pending buffer. - */ - have = (s->bi_valid + 42) >> 3; /* number of header bytes */ - /* maximum stored block length that will fit in pending: */ - have = MIN(s->pending_buf_size - have, MAX_STORED); - min_block = MIN(have, s->w_size); - left = s->strstart - s->block_start; - if (left >= min_block || - ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && - s->strm->avail_in == 0 && left <= have)) { - len = MIN(left, have); - last = flush == Z_FINISH && s->strm->avail_in == 0 && - len == left ? 1 : 0; - _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); - s->block_start += len; - flush_pending(s->strm); - } - - /* We've done all we can with the available input and output. */ - return last ? finish_started : need_more; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -local block_state deflate_fast(deflate_state *s, int flush) { - IPos hash_head; /* head of the hash chain */ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart + 2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - } - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->match_start, s->match_length); - - _tr_tally_dist(s, s->strstart - s->match_start, - s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ -#ifndef FASTEST - if (s->match_length <= s->max_insert_length && - s->lookahead >= MIN_MATCH) { - s->match_length--; /* string at strstart already in table */ - do { - s->strstart++; - INSERT_STRING(s, s->strstart, hash_head); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s->match_length != 0); - s->strstart++; - } else -#endif - { - s->strstart += s->match_length; - s->match_length = 0; - s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit(s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} - -#ifndef FASTEST -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -local block_state deflate_slow(deflate_state *s, int flush) { - IPos hash_head; /* head of hash chain */ - int bflush; /* set if current block must be flushed */ - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart + 2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - */ - s->prev_length = s->match_length, s->prev_match = s->match_start; - s->match_length = MIN_MATCH-1; - - if (hash_head != NIL && s->prev_length < s->max_lazy_match && - s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - - if (s->match_length <= 5 && (s->strategy == Z_FILTERED -#if TOO_FAR <= 32767 - || (s->match_length == MIN_MATCH && - s->strstart - s->match_start > TOO_FAR) -#endif - )) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s->match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { - uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - check_match(s, s->strstart - 1, s->prev_match, s->prev_length); - - _tr_tally_dist(s, s->strstart - 1 - s->prev_match, - s->prev_length - MIN_MATCH, bflush); - - /* Insert in hash table all strings up to the end of the match. - * strstart - 1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s->lookahead -= s->prev_length - 1; - s->prev_length -= 2; - do { - if (++s->strstart <= max_insert) { - INSERT_STRING(s, s->strstart, hash_head); - } - } while (--s->prev_length != 0); - s->match_available = 0; - s->match_length = MIN_MATCH-1; - s->strstart++; - - if (bflush) FLUSH_BLOCK(s, 0); - - } else if (s->match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - Tracevv((stderr,"%c", s->window[s->strstart - 1])); - _tr_tally_lit(s, s->window[s->strstart - 1], bflush); - if (bflush) { - FLUSH_BLOCK_ONLY(s, 0); - } - s->strstart++; - s->lookahead--; - if (s->strm->avail_out == 0) return need_more; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s->match_available = 1; - s->strstart++; - s->lookahead--; - } - } - Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart - 1])); - _tr_tally_lit(s, s->window[s->strstart - 1], bflush); - s->match_available = 0; - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} -#endif /* FASTEST */ - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -local block_state deflate_rle(deflate_state *s, int flush) { - int bflush; /* set if current block must be flushed */ - uInt prev; /* byte at distance one to match */ - Bytef *scan, *strend; /* scan goes up to strend for length of run */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s->lookahead <= MAX_MATCH) { - fill_window(s); - if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s->match_length = 0; - if (s->lookahead >= MIN_MATCH && s->strstart > 0) { - scan = s->window + s->strstart - 1; - prev = *scan; - if (prev == *++scan && prev == *++scan && prev == *++scan) { - strend = s->window + s->strstart + MAX_MATCH; - do { - } while (prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - scan < strend); - s->match_length = MAX_MATCH - (uInt)(strend - scan); - if (s->match_length > s->lookahead) - s->match_length = s->lookahead; - } - Assert(scan <= s->window + (uInt)(s->window_size - 1), - "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->strstart - 1, s->match_length); - - _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - s->strstart += s->match_length; - s->match_length = 0; - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit(s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -local block_state deflate_huff(deflate_state *s, int flush) { - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s->lookahead == 0) { - fill_window(s); - if (s->lookahead == 0) { - if (flush == Z_NO_FLUSH) - return need_more; - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s->match_length = 0; - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit(s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->sym_next) - FLUSH_BLOCK(s, 0); - return block_done; -} diff --git a/third_party/zlib/deflate.h b/third_party/zlib/deflate.h deleted file mode 100644 index 24cbd8e..0000000 --- a/third_party/zlib/deflate.h +++ /dev/null @@ -1,378 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2024 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef DEFLATE_H -#define DEFLATE_H - -#include "zutil.h" - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer creation by deflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip encoding - should be left enabled. */ -#ifndef NO_GZIP -# define GZIP -#endif - -/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at - the cost of a larger memory footprint */ -/* #define LIT_MEM */ - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define Buf_size 16 -/* size of bit buffer in bi_buf */ - -#define INIT_STATE 42 /* zlib header -> BUSY_STATE */ -#ifdef GZIP -# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */ -#endif -#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */ -#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */ -#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */ -#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */ -#define BUSY_STATE 113 /* deflate -> FINISH_STATE */ -#define FINISH_STATE 666 /* stream complete */ -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - const static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - ulg pending; /* nb of bytes in the pending buffer */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - ulg gzindex; /* where in extra, name, or comment */ - Byte method; /* can only be DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to suppress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - -#ifdef LIT_MEM -# define LIT_BUFS 5 - ushf *d_buf; /* buffer for distances */ - uchf *l_buf; /* buffer for literals/lengths */ -#else -# define LIT_BUFS 4 - uchf *sym_buf; /* buffer for distances and literals/lengths */ -#endif - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt sym_next; /* running index in symbol buffer */ - uInt sym_end; /* symbol table full when sym_next reaches this */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - uInt matches; /* number of string matches in current block */ - uInt insert; /* bytes at end of window left to insert */ - -#ifdef ZLIB_DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - ulg high_water; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - -#define WIN_INIT MAX_MATCH -/* Number of bytes after end of data in window to initialize in order to avoid - memory checker errors from longest match routines */ - - /* in trees.c */ -void ZLIB_INTERNAL _tr_init(deflate_state *s); -int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc); -void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, - ulg stored_len, int last); -void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s); -void ZLIB_INTERNAL _tr_align(deflate_state *s); -void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, - ulg stored_len, int last); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef ZLIB_DEBUG -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch ZLIB_INTERNAL _length_code[]; - extern uch ZLIB_INTERNAL _dist_code[]; -#else - extern const uch ZLIB_INTERNAL _length_code[]; - extern const uch ZLIB_INTERNAL _dist_code[]; -#endif - -#ifdef LIT_MEM -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->sym_next] = 0; \ - s->l_buf[s->sym_next++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (uch)(length); \ - ush dist = (ush)(distance); \ - s->d_buf[s->sym_next] = dist; \ - s->l_buf[s->sym_next++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -#else -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->sym_buf[s->sym_next++] = 0; \ - s->sym_buf[s->sym_next++] = 0; \ - s->sym_buf[s->sym_next++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (uch)(length); \ - ush dist = (ush)(distance); \ - s->sym_buf[s->sym_next++] = (uch)dist; \ - s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \ - s->sym_buf[s->sym_next++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->sym_next == s->sym_end); \ - } -#endif -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif /* DEFLATE_H */ - diff --git a/third_party/zlib/doc/algorithm.txt b/third_party/zlib/doc/algorithm.txt deleted file mode 100644 index 029e5a3..0000000 --- a/third_party/zlib/doc/algorithm.txt +++ /dev/null @@ -1,209 +0,0 @@ -1. Compression algorithm (deflate) - -The deflation algorithm used by gzip (also zip and zlib) is a variation of -LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in -the input data. The second occurrence of a string is replaced by a -pointer to the previous string, in the form of a pair (distance, -length). Distances are limited to 32K bytes, and lengths are limited -to 258 bytes. When a string does not occur anywhere in the previous -32K bytes, it is emitted as a sequence of literal bytes. (In this -description, `string' must be taken as an arbitrary sequence of bytes, -and is not restricted to printable characters.) - -Literals or match lengths are compressed with one Huffman tree, and -match distances are compressed with another tree. The trees are stored -in a compact form at the start of each block. The blocks can have any -size (except that the compressed data for one block must fit in -available memory). A block is terminated when deflate() determines that -it would be useful to start another block with fresh trees. (This is -somewhat similar to the behavior of LZW-based _compress_.) - -Duplicated strings are found using a hash table. All input strings of -length 3 are inserted in the hash table. A hash index is computed for -the next 3 bytes. If the hash chain for this index is not empty, all -strings in the chain are compared with the current input string, and -the longest match is selected. - -The hash chains are searched starting with the most recent strings, to -favor small distances and thus take advantage of the Huffman encoding. -The hash chains are singly linked. There are no deletions from the -hash chains, the algorithm simply discards matches that are too old. - -To avoid a worst-case situation, very long hash chains are arbitrarily -truncated at a certain length, determined by a runtime option (level -parameter of deflateInit). So deflate() does not always find the longest -possible match but generally finds a match which is long enough. - -deflate() also defers the selection of matches with a lazy evaluation -mechanism. After a match of length N has been found, deflate() searches for -a longer match at the next input byte. If a longer match is found, the -previous match is truncated to a length of one (thus producing a single -literal byte) and the process of lazy evaluation begins again. Otherwise, -the original match is kept, and the next match search is attempted only N -steps later. - -The lazy match evaluation is also subject to a runtime parameter. If -the current match is long enough, deflate() reduces the search for a longer -match, thus speeding up the whole process. If compression ratio is more -important than speed, deflate() attempts a complete second search even if -the first match is already long enough. - -The lazy match evaluation is not performed for the fastest compression -modes (level parameter 1 to 3). For these fast modes, new strings -are inserted in the hash table only when no match was found, or -when the match is not too long. This degrades the compression ratio -but saves time since there are both fewer insertions and fewer searches. - - -2. Decompression algorithm (inflate) - -2.1 Introduction - -The key question is how to represent a Huffman code (or any prefix code) so -that you can decode fast. The most important characteristic is that shorter -codes are much more common than longer codes, so pay attention to decoding the -short codes fast, and let the long codes take longer to decode. - -inflate() sets up a first level table that covers some number of bits of -input less than the length of longest code. It gets that many bits from the -stream, and looks it up in the table. The table will tell if the next -code is that many bits or less and how many, and if it is, it will tell -the value, else it will point to the next level table for which inflate() -grabs more bits and tries to decode a longer code. - -How many bits to make the first lookup is a tradeoff between the time it -takes to decode and the time it takes to build the table. If building the -table took no time (and if you had infinite memory), then there would only -be a first level table to cover all the way to the longest code. However, -building the table ends up taking a lot longer for more bits since short -codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and then -to set that variable for the maximum speed. - -For inflate, which has 286 possible codes for the literal/length tree, the size -of the first table is nine bits. Also the distance trees have 30 possible -values, and the size of the first table is six bits. Note that for each of -those cases, the table ended up one bit longer than the ``average'' code -length, i.e. the code length of an approximately flat code which would be a -little more than eight bits for 286 symbols and a little less than five bits -for 30 symbols. - - -2.2 More details on the inflate table lookup - -Ok, you want to know what this cleverly obfuscated inflate tree actually -looks like. You are correct that it's not a Huffman tree. It is simply a -lookup table for the first, let's say, nine bits of a Huffman symbol. The -symbol could be as short as one bit or as long as 15 bits. If a particular -symbol is shorter than nine bits, then that symbol's translation is duplicated -in all those entries that start with that symbol's bits. For example, if the -symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a -symbol is nine bits long, it appears in the table once. - -If the symbol is longer than nine bits, then that entry in the table points -to another similar table for the remaining bits. Again, there are duplicated -entries as needed. The idea is that most of the time the symbol will be short -and there will only be one table look up. (That's whole idea behind data -compression in the first place.) For the less frequent long symbols, there -will be two lookups. If you had a compression method with really long -symbols, you could have as many levels of lookups as is efficient. For -inflate, two is enough. - -So a table entry either points to another table (in which case nine bits in -the above example are gobbled), or it contains the translation for the symbol -and the number of bits to gobble. Then you start again with the next -ungobbled bit. - -You may wonder: why not just have one lookup table for how ever many bits the -longest symbol is? The reason is that if you do that, you end up spending -more time filling in duplicate symbol entries than you do actually decoding. -At least for deflate's output that generates new trees every several 10's of -kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code -would take too long if you're only decoding several thousand symbols. At the -other extreme, you could make a new table for every bit in the code. In fact, -that's essentially a Huffman tree. But then you spend too much time -traversing the tree while decoding, even for short symbols. - -So the number of bits for the first lookup table is a trade of the time to -fill out the table vs. the time spent looking at the second level and above of -the table. - -Here is an example, scaled down: - -The code being decoded, with 10 symbols, from 1 to 6 bits long: - -A: 0 -B: 10 -C: 1100 -D: 11010 -E: 11011 -F: 11100 -G: 11101 -H: 11110 -I: 111110 -J: 111111 - -Let's make the first table three bits long (eight entries): - -000: A,1 -001: A,1 -010: A,1 -011: A,1 -100: B,2 -101: B,2 -110: -> table X (gobble 3 bits) -111: -> table Y (gobble 3 bits) - -Each entry is what the bits decode as and how many bits that is, i.e. how -many bits to gobble. Or the entry points to another table, with the number of -bits to gobble implicit in the size of the table. - -Table X is two bits long since the longest code starting with 110 is five bits -long: - -00: C,1 -01: C,1 -10: D,2 -11: E,2 - -Table Y is three bits long since the longest code starting with 111 is six -bits long: - -000: F,2 -001: F,2 -010: G,2 -011: G,2 -100: H,2 -101: H,2 -110: I,3 -111: J,3 - -So what we have here are three tables with a total of 20 entries that had to -be constructed. That's compared to 64 entries for a single table. Or -compared to 16 entries for a Huffman tree (six two entry tables and one four -entry table). Assuming that the code ideally represents the probability of -the symbols, it takes on the average 1.25 lookups per symbol. That's compared -to one lookup for the single table, or 1.66 lookups per symbol for the -Huffman tree. - -There, I think that gives you a picture of what's going on. For inflate, the -meaning of a particular symbol is often more than just a letter. It can be a -byte (a "literal"), or it can be either a length or a distance which -indicates a base value and a number of bits to fetch after the code that is -added to the base value. Or it might be the special end-of-block code. The -data structures created in inftrees.c try to encode all that information -compactly in the tables. - - -Jean-loup Gailly Mark Adler -jloup@gzip.org madler@alumni.caltech.edu - - -References: - -[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data -Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, -pp. 337-343. - -``DEFLATE Compressed Data Format Specification'' available in -http://tools.ietf.org/html/rfc1951 diff --git a/third_party/zlib/doc/crc-doc.1.0.pdf b/third_party/zlib/doc/crc-doc.1.0.pdf deleted file mode 100644 index d6942ecc09a3f8b2d7e4b6fbecc5955121e8e7cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776142 zcmbT;V{~L|w>SJ)9owmx9ox2Tc5K_Wla7s!jgHx|ZQFL<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be}Q}nFr0Z2BFzs2MF7S?2tvBTNgU()66fS+Fpd*5U=#-L zD*z^d_avaIf~EoHLZNV;1jP-5>$RV3Dn@Tt*0!#qkOCSOP9KXQf7+ga^A_03rXjNQ4NhFC;{vv5DI)aj{^)eXVAR@oaT%JT{f&g&31ohXXdBUY#)KPg!|rt*$Tnq024UQDL$xWkbfzVn&7+vFp7hb zpm~IH6Gfp2+@Asrh4su}?AjO>;_Vk83X#*-=jl56trLk~^5{AS1u?HzK}}}. - -Abstract - - This specification defines a lossless compressed data format. The - data can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a priori - bounded amount of intermediate storage. The format presently uses - the DEFLATE compression method but can be easily extended to use - other compression methods. It can be implemented readily in a manner - not covered by patents. This specification also defines the ADLER-32 - checksum (an extension and improvement of the Fletcher checksum), - used for detection of data corruption, and provides an algorithm for - computing it. - - - - -Deutsch & Gailly Informational [Page 1] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................ 3 - 1.6. Changes from previous versions ............................ 3 - 2. Detailed specification ......................................... 3 - 2.1. Overall conventions ....................................... 3 - 2.2. Data format ............................................... 4 - 2.3. Compliance ................................................ 7 - 3. References ..................................................... 7 - 4. Source code .................................................... 8 - 5. Security Considerations ........................................ 8 - 6. Acknowledgements ............................................... 8 - 7. Authors' Addresses ............................................. 8 - 8. Appendix: Rationale ............................................ 9 - 9. Appendix: Sample code ..........................................10 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - - * Can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a - priori bounded amount of intermediate storage, and hence can - be used in data communications or similar structures such as - Unix filters; - - * Can use a number of different compression methods; - - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely. - - The data format defined by this specification does not attempt to - allow random access to compressed data. - - - - - - - -Deutsch & Gailly Informational [Page 2] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into zlib format and/or decompress data from zlib - format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. - - 1.3. Scope - - The specification specifies a compressed data format that can be - used for in-memory compression of a sequence of arbitrary bytes. - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any data set that conforms to all - the specifications presented here; a compliant compressor must - produce data sets that conform to all the specifications presented - here. - - 1.5. Definitions of terms and conventions used - - byte: 8 bits stored or transmitted as a unit (same as an octet). - (For this specification, a byte is exactly 8 bits, even on - machines which store a character on a number of bits different - from 8.) See below, for the numbering of bits within a byte. - - 1.6. Changes from previous versions - - Version 3.1 was the first public release of this specification. - In version 3.2, some terminology was changed and the Adler-32 - sample code was rewritten for clarity. In version 3.3, the - support for a preset dictionary was introduced, and the - specification was converted to RFC style. - -2. Detailed specification - - 2.1. Overall conventions - - In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - - - -Deutsch & Gailly Informational [Page 3] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the MOST-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00000010|00001000| - +--------+--------+ - ^ ^ - | | - | + less significant byte = 8 - + more significant byte = 2 x 256 - - 2.2. Data format - - A zlib stream has the following structure: - - 0 1 - +---+---+ - |CMF|FLG| (more-->) - +---+---+ - - - - - - - - -Deutsch & Gailly Informational [Page 4] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - (if FLG.FDICT set) - - 0 1 2 3 - +---+---+---+---+ - | DICTID | (more-->) - +---+---+---+---+ - - +=====================+---+---+---+---+ - |...compressed data...| ADLER32 | - +=====================+---+---+---+---+ - - Any data which may appear after ADLER32 are not part of the zlib - stream. - - CMF (Compression Method and flags) - This byte is divided into a 4-bit compression method and a 4- - bit information field depending on the compression method. - - bits 0 to 3 CM Compression method - bits 4 to 7 CINFO Compression info - - CM (Compression method) - This identifies the compression method used in the file. CM = 8 - denotes the "deflate" compression method with a window size up - to 32K. This is the method used by gzip and PNG (see - references [1] and [2] in Chapter 3, below, for the reference - documents). CM = 15 is reserved. It might be used in a future - version of this specification to indicate the presence of an - extra field before the compressed data. - - CINFO (Compression info) - For CM = 8, CINFO is the base-2 logarithm of the LZ77 window - size, minus eight (CINFO=7 indicates a 32K window size). Values - of CINFO above 7 are not allowed in this version of the - specification. CINFO is not defined in this specification for - CM not equal to 8. - - FLG (FLaGs) - This flag byte is divided as follows: - - bits 0 to 4 FCHECK (check bits for CMF and FLG) - bit 5 FDICT (preset dictionary) - bits 6 to 7 FLEVEL (compression level) - - The FCHECK value must be such that CMF and FLG, when viewed as - a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG), - is a multiple of 31. - - - - -Deutsch & Gailly Informational [Page 5] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - FDICT (Preset dictionary) - If FDICT is set, a DICT dictionary identifier is present - immediately after the FLG byte. The dictionary is a sequence of - bytes which are initially fed to the compressor without - producing any compressed output. DICT is the Adler-32 checksum - of this sequence of bytes (see the definition of ADLER32 - below). The decompressor can use this identifier to determine - which dictionary has been used by the compressor. - - FLEVEL (Compression level) - These flags are available for use by specific compression - methods. The "deflate" method (CM = 8) sets these flags as - follows: - - 0 - compressor used fastest algorithm - 1 - compressor used fast algorithm - 2 - compressor used default algorithm - 3 - compressor used maximum compression, slowest algorithm - - The information in FLEVEL is not needed for decompression; it - is there to indicate if recompression might be worthwhile. - - compressed data - For compression method 8, the compressed data is stored in the - deflate compressed data format as described in the document - "DEFLATE Compressed Data Format Specification" by L. Peter - Deutsch. (See reference [3] in Chapter 3, below) - - Other compressed data formats are not specified in this version - of the zlib specification. - - ADLER32 (Adler-32 checksum) - This contains a checksum value of the uncompressed data - (excluding any dictionary data) computed according to Adler-32 - algorithm. This algorithm is a 32-bit extension and improvement - of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 - standard. See references [4] and [5] in Chapter 3, below) - - Adler-32 is composed of two sums accumulated per byte: s1 is - the sum of all bytes, s2 is the sum of all s1 values. Both sums - are done modulo 65521. s1 is initialized to 1, s2 to zero. The - Adler-32 checksum is stored as s2*65536 + s1 in most- - significant-byte first (network) order. - - - - - - - - -Deutsch & Gailly Informational [Page 6] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - 2.3. Compliance - - A compliant compressor must produce streams with correct CMF, FLG - and ADLER32, but need not support preset dictionaries. When the - zlib data format is used as part of another standard data format, - the compressor may use only preset dictionaries that are specified - by this other data format. If this other format does not use the - preset dictionary feature, the compressor must not set the FDICT - flag. - - A compliant decompressor must check CMF, FLG, and ADLER32, and - provide an error indication if any of these have incorrect values. - A compliant decompressor must give an error indication if CM is - not one of the values defined in this specification (only the - value 8 is permitted in this version), since another value could - indicate the presence of new features that would cause subsequent - data to be interpreted incorrectly. A compliant decompressor must - give an error indication if FDICT is set and DICTID is not the - identifier of a known preset dictionary. A decompressor may - ignore FLEVEL and still be compliant. When the zlib data format - is being used as a part of another standard format, a compliant - decompressor must support all the preset dictionaries specified by - the other format. When the other format does not use the preset - dictionary feature, a compliant decompressor must reject any - stream in which the FDICT flag is set. - -3. References - - [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [2] Thomas Boutell, "PNG (Portable Network Graphics) specification", - available in ftp://ftp.uu.net/graphics/png/documents/ - - [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [4] Fletcher, J. G., "An Arithmetic Checksum for Serial - Transmissions," IEEE Transactions on Communications, Vol. COM-30, - No. 1, January 1982, pp. 247-252. - - [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms," - November, 1993, pp. 144, 145. (Available from - gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073. - - - - - - - -Deutsch & Gailly Informational [Page 7] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -4. Source code - - Source code for a C language implementation of a "zlib" compliant - library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/. - -5. Security Considerations - - A decoder that fails to check the ADLER32 checksum value may be - subject to undetected data corruption. - -6. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Jean-Loup Gailly and Mark Adler designed the zlib format and wrote - the related software described in this specification. Glenn - Randers-Pehrson converted this document to RFC and HTML format. - -7. Authors' Addresses - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - - Jean-Loup Gailly - - EMail: - - Questions about the technical content of this specification can be - sent by email to - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - - - - -Deutsch & Gailly Informational [Page 8] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -8. Appendix: Rationale - - 8.1. Preset dictionaries - - A preset dictionary is specially useful to compress short input - sequences. The compressor can take advantage of the dictionary - context to encode the input in a more compact manner. The - decompressor can be initialized with the appropriate context by - virtually decompressing a compressed version of the dictionary - without producing any output. However for certain compression - algorithms such as the deflate algorithm this operation can be - achieved without actually performing any decompression. - - The compressor and the decompressor must use exactly the same - dictionary. The dictionary may be fixed or may be chosen among a - certain number of predefined dictionaries, according to the kind - of input data. The decompressor can determine which dictionary has - been chosen by the compressor by checking the dictionary - identifier. This document does not specify the contents of - predefined dictionaries, since the optimal dictionaries are - application specific. Standard data formats using this feature of - the zlib specification must precisely define the allowed - dictionaries. - - 8.2. The Adler-32 algorithm - - The Adler-32 algorithm is much faster than the CRC32 algorithm yet - still provides an extremely low probability of undetected errors. - - The modulo on unsigned long accumulators can be delayed for 5552 - bytes, so the modulo operation time is negligible. If the bytes - are a, b, c, the second sum is 3a + 2b + c + 3, and so is position - and order sensitive, unlike the first sum, which is just a - checksum. That 65521 is prime is important to avoid a possible - large class of two-byte errors that leave the check unchanged. - (The Fletcher checksum uses 255, which is not prime and which also - makes the Fletcher check insensitive to single byte changes 0 <-> - 255.) - - The sum s1 is initialized to 1 instead of zero to make the length - of the sequence part of s2, so that the length does not have to be - checked separately. (Any sequence of zeroes has a Fletcher - checksum of zero.) - - - - - - - - -Deutsch & Gailly Informational [Page 9] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - -9. Appendix: Sample code - - The following C code computes the Adler-32 checksum of a data buffer. - It is written for clarity, not for speed. The sample code is in the - ANSI C programming language. Non C users may find it easier to read - with these hints: - - & Bitwise AND operator. - >> Bitwise right shift operator. When applied to an - unsigned quantity, as here, right shift inserts zero bit(s) - at the left. - << Bitwise left shift operator. Left shift inserts zero - bit(s) at the right. - ++ "n++" increments the variable n. - % modulo operator: a % b is the remainder of a divided by b. - - #define BASE 65521 /* largest prime smaller than 65536 */ - - /* - Update a running Adler-32 checksum with the bytes buf[0..len-1] - and return the updated checksum. The Adler-32 checksum should be - initialized to 1. - - Usage example: - - unsigned long adler = 1L; - - while (read_buffer(buffer, length) != EOF) { - adler = update_adler32(adler, buffer, length); - } - if (adler != original_adler) error(); - */ - unsigned long update_adler32(unsigned long adler, - unsigned char *buf, int len) - { - unsigned long s1 = adler & 0xffff; - unsigned long s2 = (adler >> 16) & 0xffff; - int n; - - for (n = 0; n < len; n++) { - s1 = (s1 + buf[n]) % BASE; - s2 = (s2 + s1) % BASE; - } - return (s2 << 16) + s1; - } - - /* Return the adler32 of the bytes buf[0..len-1] */ - - - - -Deutsch & Gailly Informational [Page 10] - -RFC 1950 ZLIB Compressed Data Format Specification May 1996 - - - unsigned long adler32(unsigned char *buf, int len) - { - return update_adler32(1L, buf, len); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Deutsch & Gailly Informational [Page 11] - diff --git a/third_party/zlib/doc/rfc1951.txt b/third_party/zlib/doc/rfc1951.txt deleted file mode 100644 index 403c8c7..0000000 --- a/third_party/zlib/doc/rfc1951.txt +++ /dev/null @@ -1,955 +0,0 @@ - - - - - - -Network Working Group P. Deutsch -Request for Comments: 1951 Aladdin Enterprises -Category: Informational May 1996 - - - DEFLATE Compressed Data Format Specification version 1.3 - -Status of This Memo - - This memo provides information for the Internet community. This memo - does not specify an Internet standard of any kind. Distribution of - this memo is unlimited. - -IESG Note: - - The IESG takes no position on the validity of any Intellectual - Property Rights statements contained in this document. - -Notices - - Copyright (c) 1996 L. Peter Deutsch - - Permission is granted to copy and distribute this document for any - purpose and without charge, including translations into other - languages and incorporation into compilations, provided that the - copyright notice and this notice are preserved, and that any - substantive changes or deletions from the original are clearly - marked. - - A pointer to the latest version of this and related documentation in - HTML format can be found at the URL - . - -Abstract - - This specification defines a lossless compressed data format that - compresses data using a combination of the LZ77 algorithm and Huffman - coding, with efficiency comparable to the best currently available - general-purpose compression methods. The data can be produced or - consumed, even for an arbitrarily long sequentially presented input - data stream, using only an a priori bounded amount of intermediate - storage. The format can be implemented readily in a manner not - covered by patents. - - - - - - - - -Deutsch Informational [Page 1] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................ 3 - 1.6. Changes from previous versions ............................ 4 - 2. Compressed representation overview ............................. 4 - 3. Detailed specification ......................................... 5 - 3.1. Overall conventions ....................................... 5 - 3.1.1. Packing into bytes .................................. 5 - 3.2. Compressed block format ................................... 6 - 3.2.1. Synopsis of prefix and Huffman coding ............... 6 - 3.2.2. Use of Huffman coding in the "deflate" format ....... 7 - 3.2.3. Details of block format ............................. 9 - 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11 - 3.2.5. Compressed blocks (length and distance codes) ...... 11 - 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12 - 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13 - 3.3. Compliance ............................................... 14 - 4. Compression algorithm details ................................. 14 - 5. References .................................................... 16 - 6. Security Considerations ....................................... 16 - 7. Source code ................................................... 16 - 8. Acknowledgements .............................................. 16 - 9. Author's Address .............................................. 17 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - * Can be produced or consumed, even for an arbitrarily long - sequentially presented input data stream, using only an a - priori bounded amount of intermediate storage, and hence - can be used in data communications or similar structures - such as Unix filters; - * Compresses data with efficiency comparable to the best - currently available general-purpose compression methods, - and in particular considerably better than the "compress" - program; - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely; - - - -Deutsch Informational [Page 2] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - * Is compatible with the file format produced by the current - widely used gzip utility, in that conforming decompressors - will be able to read data produced by the existing gzip - compressor. - - The data format defined by this specification does not attempt to: - - * Allow random access to compressed data; - * Compress specialized data (e.g., raster graphics) as well - as the best currently available specialized algorithms. - - A simple counting argument shows that no lossless compression - algorithm can compress every possible input data set. For the - format defined here, the worst case expansion is 5 bytes per 32K- - byte block, i.e., a size increase of 0.015% for large data sets. - English text usually compresses by a factor of 2.5 to 3; - executable files usually compress somewhat less; graphical data - such as raster images may compress much more. - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into "deflate" format and/or decompress data from - "deflate" format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. Familiarity with the technique of Huffman coding - is helpful but not required. - - 1.3. Scope - - The specification specifies a method for representing a sequence - of bytes as a (usually shorter) sequence of bits, and a method for - packing the latter bit sequence into bytes. - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any data set that conforms to all - the specifications presented here; a compliant compressor must - produce data sets that conform to all the specifications presented - here. - - 1.5. Definitions of terms and conventions used - - Byte: 8 bits stored or transmitted as a unit (same as an octet). - For this specification, a byte is exactly 8 bits, even on machines - - - -Deutsch Informational [Page 3] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - which store a character on a number of bits different from eight. - See below, for the numbering of bits within a byte. - - String: a sequence of arbitrary bytes. - - 1.6. Changes from previous versions - - There have been no technical changes to the deflate format since - version 1.1 of this specification. In version 1.2, some - terminology was changed. Version 1.3 is a conversion of the - specification to RFC style. - -2. Compressed representation overview - - A compressed data set consists of a series of blocks, corresponding - to successive blocks of input data. The block sizes are arbitrary, - except that non-compressible blocks are limited to 65,535 bytes. - - Each block is compressed using a combination of the LZ77 algorithm - and Huffman coding. The Huffman trees for each block are independent - of those for previous or subsequent blocks; the LZ77 algorithm may - use a reference to a duplicated string occurring in a previous block, - up to 32K input bytes before. - - Each block consists of two parts: a pair of Huffman code trees that - describe the representation of the compressed data part, and a - compressed data part. (The Huffman trees themselves are compressed - using Huffman encoding.) The compressed data consists of a series of - elements of two types: literal bytes (of strings that have not been - detected as duplicated within the previous 32K input bytes), and - pointers to duplicated strings, where a pointer is represented as a - pair . The representation used in the - "deflate" format limits distances to 32K bytes and lengths to 258 - bytes, but does not limit the size of a block, except for - uncompressible blocks, which are limited as noted above. - - Each type of value (literals, distances, and lengths) in the - compressed data is represented using a Huffman code, using one code - tree for literals and lengths and a separate code tree for distances. - The code trees for each block appear in a compact form just before - the compressed data for that block. - - - - - - - - - - -Deutsch Informational [Page 4] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -3. Detailed specification - - 3.1. Overall conventions In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the least-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00001000|00000010| - +--------+--------+ - ^ ^ - | | - | + more significant byte = 2 x 256 - + less significant byte = 8 - - 3.1.1. Packing into bytes - - This document does not address the issue of the order in which - bits of a byte are transmitted on a bit-sequential medium, - since the final data format described here is byte- rather than - - - -Deutsch Informational [Page 5] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - bit-oriented. However, we describe the compressed block format - in below, as a sequence of data elements of various bit - lengths, not a sequence of bytes. We must therefore specify - how to pack these data elements into bytes to form the final - compressed byte sequence: - - * Data elements are packed into bytes in order of - increasing bit number within the byte, i.e., starting - with the least-significant bit of the byte. - * Data elements other than Huffman codes are packed - starting with the least-significant bit of the data - element. - * Huffman codes are packed starting with the most- - significant bit of the code. - - In other words, if one were to print out the compressed data as - a sequence of bytes, starting with the first byte at the - *right* margin and proceeding to the *left*, with the most- - significant bit of each byte on the left as usual, one would be - able to parse the result from right to left, with fixed-width - elements in the correct MSB-to-LSB order and Huffman codes in - bit-reversed order (i.e., with the first bit of the code in the - relative LSB position). - - 3.2. Compressed block format - - 3.2.1. Synopsis of prefix and Huffman coding - - Prefix coding represents symbols from an a priori known - alphabet by bit sequences (codes), one code for each symbol, in - a manner such that different symbols may be represented by bit - sequences of different lengths, but a parser can always parse - an encoded string unambiguously symbol-by-symbol. - - We define a prefix code in terms of a binary tree in which the - two edges descending from each non-leaf node are labeled 0 and - 1 and in which the leaf nodes correspond one-for-one with (are - labeled with) the symbols of the alphabet; then the code for a - symbol is the sequence of 0's and 1's on the edges leading from - the root to the leaf labeled with that symbol. For example: - - - - - - - - - - - -Deutsch Informational [Page 6] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - /\ Symbol Code - 0 1 ------ ---- - / \ A 00 - /\ B B 1 - 0 1 C 011 - / \ D 010 - A /\ - 0 1 - / \ - D C - - A parser can decode the next symbol from an encoded input - stream by walking down the tree from the root, at each step - choosing the edge corresponding to the next input bit. - - Given an alphabet with known symbol frequencies, the Huffman - algorithm allows the construction of an optimal prefix code - (one which represents strings with those symbol frequencies - using the fewest bits of any possible prefix codes for that - alphabet). Such a code is called a Huffman code. (See - reference [1] in Chapter 5, references for additional - information on Huffman codes.) - - Note that in the "deflate" format, the Huffman codes for the - various alphabets must not exceed certain maximum code lengths. - This constraint complicates the algorithm for computing code - lengths from symbol frequencies. Again, see Chapter 5, - references for details. - - 3.2.2. Use of Huffman coding in the "deflate" format - - The Huffman codes used for each alphabet in the "deflate" - format have two additional rules: - - * All codes of a given bit length have lexicographically - consecutive values, in the same order as the symbols - they represent; - - * Shorter codes lexicographically precede longer codes. - - - - - - - - - - - - -Deutsch Informational [Page 7] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - We could recode the example above to follow this rule as - follows, assuming that the order of the alphabet is ABCD: - - Symbol Code - ------ ---- - A 10 - B 0 - C 110 - D 111 - - I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are - lexicographically consecutive. - - Given this rule, we can define the Huffman code for an alphabet - just by giving the bit lengths of the codes for each symbol of - the alphabet in order; this is sufficient to determine the - actual codes. In our example, the code is completely defined - by the sequence of bit lengths (2, 1, 3, 3). The following - algorithm generates the codes as integers, intended to be read - from most- to least-significant bit. The code lengths are - initially in tree[I].Len; the codes are produced in - tree[I].Code. - - 1) Count the number of codes for each code length. Let - bl_count[N] be the number of codes of length N, N >= 1. - - 2) Find the numerical value of the smallest code for each - code length: - - code = 0; - bl_count[0] = 0; - for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits-1]) << 1; - next_code[bits] = code; - } - - 3) Assign numerical values to all codes, using consecutive - values for all codes of the same length with the base - values determined at step 2. Codes that are never used - (which have a bit length of zero) must not be assigned a - value. - - for (n = 0; n <= max_code; n++) { - len = tree[n].Len; - if (len != 0) { - tree[n].Code = next_code[len]; - next_code[len]++; - } - - - -Deutsch Informational [Page 8] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - } - - Example: - - Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3, - 3, 2, 4, 4). After step 1, we have: - - N bl_count[N] - - ----------- - 2 1 - 3 5 - 4 2 - - Step 2 computes the following next_code values: - - N next_code[N] - - ------------ - 1 0 - 2 0 - 3 2 - 4 14 - - Step 3 produces the following code values: - - Symbol Length Code - ------ ------ ---- - A 3 010 - B 3 011 - C 3 100 - D 3 101 - E 3 110 - F 2 00 - G 4 1110 - H 4 1111 - - 3.2.3. Details of block format - - Each block of compressed data begins with 3 header bits - containing the following data: - - first bit BFINAL - next 2 bits BTYPE - - Note that the header bits do not necessarily begin on a byte - boundary, since a block does not necessarily occupy an integral - number of bytes. - - - - - -Deutsch Informational [Page 9] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - BFINAL is set if and only if this is the last block of the data - set. - - BTYPE specifies how the data are compressed, as follows: - - 00 - no compression - 01 - compressed with fixed Huffman codes - 10 - compressed with dynamic Huffman codes - 11 - reserved (error) - - The only difference between the two compressed cases is how the - Huffman codes for the literal/length and distance alphabets are - defined. - - In all cases, the decoding algorithm for the actual data is as - follows: - - do - read block header from input stream. - if stored with no compression - skip any remaining bits in current partially - processed byte - read LEN and NLEN (see next section) - copy LEN bytes of data to output - otherwise - if compressed with dynamic Huffman codes - read representation of code trees (see - subsection below) - loop (until end of block code recognized) - decode literal/length value from input stream - if value < 256 - copy value (literal byte) to output stream - otherwise - if value = end of block (256) - break from loop - otherwise (value = 257..285) - decode distance from input stream - - move backwards distance bytes in the output - stream, and copy length bytes from this - position to the output stream. - end loop - while not last block - - Note that a duplicated string reference may refer to a string - in a previous block; i.e., the backward distance may cross one - or more block boundaries. However a distance cannot refer past - the beginning of the output stream. (An application using a - - - -Deutsch Informational [Page 10] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - preset dictionary might discard part of the output stream; a - distance can refer to that part of the output stream anyway) - Note also that the referenced string may overlap the current - position; for example, if the last 2 bytes decoded have values - X and Y, a string reference with - adds X,Y,X,Y,X to the output stream. - - We now specify each compression method in turn. - - 3.2.4. Non-compressed blocks (BTYPE=00) - - Any bits of input up to the next byte boundary are ignored. - The rest of the block consists of the following information: - - 0 1 2 3 4... - +---+---+---+---+================================+ - | LEN | NLEN |... LEN bytes of literal data...| - +---+---+---+---+================================+ - - LEN is the number of data bytes in the block. NLEN is the - one's complement of LEN. - - 3.2.5. Compressed blocks (length and distance codes) - - As noted above, encoded data blocks in the "deflate" format - consist of sequences of symbols drawn from three conceptually - distinct alphabets: either literal bytes, from the alphabet of - byte values (0..255), or pairs, - where the length is drawn from (3..258) and the distance is - drawn from (1..32,768). In fact, the literal and length - alphabets are merged into a single alphabet (0..285), where - values 0..255 represent literal bytes, the value 256 indicates - end-of-block, and values 257..285 represent length codes - (possibly in conjunction with extra bits following the symbol - code) as follows: - - - - - - - - - - - - - - - - -Deutsch Informational [Page 11] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - Extra Extra Extra - Code Bits Length(s) Code Bits Lengths Code Bits Length(s) - ---- ---- ------ ---- ---- ------- ---- ---- ------- - 257 0 3 267 1 15,16 277 4 67-82 - 258 0 4 268 1 17,18 278 4 83-98 - 259 0 5 269 2 19-22 279 4 99-114 - 260 0 6 270 2 23-26 280 4 115-130 - 261 0 7 271 2 27-30 281 5 131-162 - 262 0 8 272 2 31-34 282 5 163-194 - 263 0 9 273 3 35-42 283 5 195-226 - 264 0 10 274 3 43-50 284 5 227-257 - 265 1 11,12 275 3 51-58 285 0 258 - 266 1 13,14 276 3 59-66 - - The extra bits should be interpreted as a machine integer - stored with the most-significant bit first, e.g., bits 1110 - represent the value 14. - - Extra Extra Extra - Code Bits Dist Code Bits Dist Code Bits Distance - ---- ---- ---- ---- ---- ------ ---- ---- -------- - 0 0 1 10 4 33-48 20 9 1025-1536 - 1 0 2 11 4 49-64 21 9 1537-2048 - 2 0 3 12 5 65-96 22 10 2049-3072 - 3 0 4 13 5 97-128 23 10 3073-4096 - 4 1 5,6 14 6 129-192 24 11 4097-6144 - 5 1 7,8 15 6 193-256 25 11 6145-8192 - 6 2 9-12 16 7 257-384 26 12 8193-12288 - 7 2 13-16 17 7 385-512 27 12 12289-16384 - 8 3 17-24 18 8 513-768 28 13 16385-24576 - 9 3 25-32 19 8 769-1024 29 13 24577-32768 - - 3.2.6. Compression with fixed Huffman codes (BTYPE=01) - - The Huffman codes for the two alphabets are fixed, and are not - represented explicitly in the data. The Huffman code lengths - for the literal/length alphabet are: - - Lit Value Bits Codes - --------- ---- ----- - 0 - 143 8 00110000 through - 10111111 - 144 - 255 9 110010000 through - 111111111 - 256 - 279 7 0000000 through - 0010111 - 280 - 287 8 11000000 through - 11000111 - - - -Deutsch Informational [Page 12] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - The code lengths are sufficient to generate the actual codes, - as described above; we show the codes in the table for added - clarity. Literal/length values 286-287 will never actually - occur in the compressed data, but participate in the code - construction. - - Distance codes 0-31 are represented by (fixed-length) 5-bit - codes, with possible additional bits as shown in the table - shown in Paragraph 3.2.5, above. Note that distance codes 30- - 31 will never actually occur in the compressed data. - - 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) - - The Huffman codes for the two alphabets appear in the block - immediately after the header bits and before the actual - compressed data, first the literal/length code and then the - distance code. Each code is defined by a sequence of code - lengths, as discussed in Paragraph 3.2.2, above. For even - greater compactness, the code length sequences themselves are - compressed using a Huffman code. The alphabet for code lengths - is as follows: - - 0 - 15: Represent code lengths of 0 - 15 - 16: Copy the previous code length 3 - 6 times. - The next 2 bits indicate repeat length - (0 = 3, ... , 3 = 6) - Example: Codes 8, 16 (+2 bits 11), - 16 (+2 bits 10) will expand to - 12 code lengths of 8 (1 + 6 + 5) - 17: Repeat a code length of 0 for 3 - 10 times. - (3 bits of length) - 18: Repeat a code length of 0 for 11 - 138 times - (7 bits of length) - - A code length of 0 indicates that the corresponding symbol in - the literal/length or distance alphabet will not occur in the - block, and should not participate in the Huffman code - construction algorithm given earlier. If only one distance - code is used, it is encoded using one bit, not zero bits; in - this case there is a single code length of one, with one unused - code. One distance code of zero bits means that there are no - distance codes used at all (the data is all literals). - - We can now define the format of the block: - - 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286) - 5 Bits: HDIST, # of Distance codes - 1 (1 - 32) - 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19) - - - -Deutsch Informational [Page 13] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - (HCLEN + 4) x 3 bits: code lengths for the code length - alphabet given just above, in the order: 16, 17, 18, - 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 - - These code lengths are interpreted as 3-bit integers - (0-7); as above, a code length of 0 means the - corresponding symbol (literal/length or distance code - length) is not used. - - HLIT + 257 code lengths for the literal/length alphabet, - encoded using the code length Huffman code - - HDIST + 1 code lengths for the distance alphabet, - encoded using the code length Huffman code - - The actual compressed data of the block, - encoded using the literal/length and distance Huffman - codes - - The literal/length symbol 256 (end of data), - encoded using the literal/length Huffman code - - The code length repeat codes can cross from HLIT + 257 to the - HDIST + 1 code lengths. In other words, all code lengths form - a single sequence of HLIT + HDIST + 258 values. - - 3.3. Compliance - - A compressor may limit further the ranges of values specified in - the previous section and still be compliant; for example, it may - limit the range of backward pointers to some value smaller than - 32K. Similarly, a compressor may limit the size of blocks so that - a compressible block fits in memory. - - A compliant decompressor must accept the full range of possible - values defined in the previous section, and must accept blocks of - arbitrary size. - -4. Compression algorithm details - - While it is the intent of this document to define the "deflate" - compressed data format without reference to any particular - compression algorithm, the format is related to the compressed - formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below); - since many variations of LZ77 are patented, it is strongly - recommended that the implementor of a compressor follow the general - algorithm presented here, which is known not to be patented per se. - The material in this section is not part of the definition of the - - - -Deutsch Informational [Page 14] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - - specification per se, and a compressor need not follow it in order to - be compliant. - - The compressor terminates a block when it determines that starting a - new block with fresh trees would be useful, or when the block size - fills up the compressor's block buffer. - - The compressor uses a chained hash table to find duplicated strings, - using a hash function that operates on 3-byte sequences. At any - given point during compression, let XYZ be the next 3 input bytes to - be examined (not necessarily all different, of course). First, the - compressor examines the hash chain for XYZ. If the chain is empty, - the compressor simply writes out X as a literal byte and advances one - byte in the input. If the hash chain is not empty, indicating that - the sequence XYZ (or, if we are unlucky, some other 3 bytes with the - same hash function value) has occurred recently, the compressor - compares all strings on the XYZ hash chain with the actual input data - sequence starting at the current point, and selects the longest - match. - - The compressor searches the hash chains starting with the most recent - strings, to favor small distances and thus take advantage of the - Huffman encoding. The hash chains are singly linked. There are no - deletions from the hash chains; the algorithm simply discards matches - that are too old. To avoid a worst-case situation, very long hash - chains are arbitrarily truncated at a certain length, determined by a - run-time parameter. - - To improve overall compression, the compressor optionally defers the - selection of matches ("lazy matching"): after a match of length N has - been found, the compressor searches for a longer match starting at - the next input byte. If it finds a longer match, it truncates the - previous match to a length of one (thus producing a single literal - byte) and then emits the longer match. Otherwise, it emits the - original match, and, as described above, advances N bytes before - continuing. - - Run-time parameters also control this "lazy match" procedure. If - compression ratio is most important, the compressor attempts a - complete second search regardless of the length of the first match. - In the normal case, if the current match is "long enough", the - compressor reduces the search for a longer match, thus speeding up - the process. If speed is most important, the compressor inserts new - strings in the hash table only when no match was found, or when the - match is not "too long". This degrades the compression ratio but - saves time since there are both fewer insertions and fewer searches. - - - - - -Deutsch Informational [Page 15] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -5. References - - [1] Huffman, D. A., "A Method for the Construction of Minimum - Redundancy Codes", Proceedings of the Institute of Radio - Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101. - - [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data - Compression", IEEE Transactions on Information Theory, Vol. 23, - No. 3, pp. 337-343. - - [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources, - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources, - available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/ - - [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix - encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169. - - [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes," - Comm. ACM, 33,4, April 1990, pp. 449-459. - -6. Security Considerations - - Any data compression method involves the reduction of redundancy in - the data. Consequently, any corruption of the data is likely to have - severe effects and be difficult to correct. Uncompressed text, on - the other hand, will probably still be readable despite the presence - of some corrupted bytes. - - It is recommended that systems using this data format provide some - means of validating the integrity of the compressed data. See - reference [3], for example. - -7. Source code - - Source code for a C language implementation of a "deflate" compliant - compressor and decompressor is available within the zlib package at - ftp://ftp.uu.net/pub/archiving/zip/zlib/. - -8. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Phil Katz designed the deflate format. Jean-Loup Gailly and Mark - Adler wrote the related software described in this specification. - Glenn Randers-Pehrson converted this document to RFC and HTML format. - - - -Deutsch Informational [Page 16] - -RFC 1951 DEFLATE Compressed Data Format Specification May 1996 - - -9. Author's Address - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - Questions about the technical content of this specification can be - sent by email to: - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to: - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Deutsch Informational [Page 17] - diff --git a/third_party/zlib/doc/rfc1952.txt b/third_party/zlib/doc/rfc1952.txt deleted file mode 100644 index a8e51b4..0000000 --- a/third_party/zlib/doc/rfc1952.txt +++ /dev/null @@ -1,675 +0,0 @@ - - - - - - -Network Working Group P. Deutsch -Request for Comments: 1952 Aladdin Enterprises -Category: Informational May 1996 - - - GZIP file format specification version 4.3 - -Status of This Memo - - This memo provides information for the Internet community. This memo - does not specify an Internet standard of any kind. Distribution of - this memo is unlimited. - -IESG Note: - - The IESG takes no position on the validity of any Intellectual - Property Rights statements contained in this document. - -Notices - - Copyright (c) 1996 L. Peter Deutsch - - Permission is granted to copy and distribute this document for any - purpose and without charge, including translations into other - languages and incorporation into compilations, provided that the - copyright notice and this notice are preserved, and that any - substantive changes or deletions from the original are clearly - marked. - - A pointer to the latest version of this and related documentation in - HTML format can be found at the URL - . - -Abstract - - This specification defines a lossless compressed data format that is - compatible with the widely used GZIP utility. The format includes a - cyclic redundancy check value for detecting data corruption. The - format presently uses the DEFLATE method of compression but can be - easily extended to use other compression methods. The format can be - implemented readily in a manner not covered by patents. - - - - - - - - - - -Deutsch Informational [Page 1] - -RFC 1952 GZIP File Format Specification May 1996 - - -Table of Contents - - 1. Introduction ................................................... 2 - 1.1. Purpose ................................................... 2 - 1.2. Intended audience ......................................... 3 - 1.3. Scope ..................................................... 3 - 1.4. Compliance ................................................ 3 - 1.5. Definitions of terms and conventions used ................. 3 - 1.6. Changes from previous versions ............................ 3 - 2. Detailed specification ......................................... 4 - 2.1. Overall conventions ....................................... 4 - 2.2. File format ............................................... 5 - 2.3. Member format ............................................. 5 - 2.3.1. Member header and trailer ........................... 6 - 2.3.1.1. Extra field ................................... 8 - 2.3.1.2. Compliance .................................... 9 - 3. References .................................................. 9 - 4. Security Considerations .................................... 10 - 5. Acknowledgements ........................................... 10 - 6. Author's Address ........................................... 10 - 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11 - 8. Appendix: Sample CRC Code .................................. 11 - -1. Introduction - - 1.1. Purpose - - The purpose of this specification is to define a lossless - compressed data format that: - - * Is independent of CPU type, operating system, file system, - and character set, and hence can be used for interchange; - * Can compress or decompress a data stream (as opposed to a - randomly accessible file) to produce another data stream, - using only an a priori bounded amount of intermediate - storage, and hence can be used in data communications or - similar structures such as Unix filters; - * Compresses data with efficiency comparable to the best - currently available general-purpose compression methods, - and in particular considerably better than the "compress" - program; - * Can be implemented readily in a manner not covered by - patents, and hence can be practiced freely; - * Is compatible with the file format produced by the current - widely used gzip utility, in that conforming decompressors - will be able to read data produced by the existing gzip - compressor. - - - - -Deutsch Informational [Page 2] - -RFC 1952 GZIP File Format Specification May 1996 - - - The data format defined by this specification does not attempt to: - - * Provide random access to compressed data; - * Compress specialized data (e.g., raster graphics) as well as - the best currently available specialized algorithms. - - 1.2. Intended audience - - This specification is intended for use by implementors of software - to compress data into gzip format and/or decompress data from gzip - format. - - The text of the specification assumes a basic background in - programming at the level of bits and other primitive data - representations. - - 1.3. Scope - - The specification specifies a compression method and a file format - (the latter assuming only that a file can store a sequence of - arbitrary bytes). It does not specify any particular interface to - a file system or anything about character sets or encodings - (except for file names and comments, which are optional). - - 1.4. Compliance - - Unless otherwise indicated below, a compliant decompressor must be - able to accept and decompress any file that conforms to all the - specifications presented here; a compliant compressor must produce - files that conform to all the specifications presented here. The - material in the appendices is not part of the specification per se - and is not relevant to compliance. - - 1.5. Definitions of terms and conventions used - - byte: 8 bits stored or transmitted as a unit (same as an octet). - (For this specification, a byte is exactly 8 bits, even on - machines which store a character on a number of bits different - from 8.) See below for the numbering of bits within a byte. - - 1.6. Changes from previous versions - - There have been no technical changes to the gzip format since - version 4.1 of this specification. In version 4.2, some - terminology was changed, and the sample CRC code was rewritten for - clarity and to eliminate the requirement for the caller to do pre- - and post-conditioning. Version 4.3 is a conversion of the - specification to RFC style. - - - -Deutsch Informational [Page 3] - -RFC 1952 GZIP File Format Specification May 1996 - - -2. Detailed specification - - 2.1. Overall conventions - - In the diagrams below, a box like this: - - +---+ - | | <-- the vertical bars might be missing - +---+ - - represents one byte; a box like this: - - +==============+ - | | - +==============+ - - represents a variable number of bytes. - - Bytes stored within a computer do not have a "bit order", since - they are always treated as a unit. However, a byte considered as - an integer between 0 and 255 does have a most- and least- - significant bit, and since we write numbers with the most- - significant digit on the left, we also write bytes with the most- - significant bit on the left. In the diagrams below, we number the - bits of a byte so that bit 0 is the least-significant bit, i.e., - the bits are numbered: - - +--------+ - |76543210| - +--------+ - - This document does not address the issue of the order in which - bits of a byte are transmitted on a bit-sequential medium, since - the data format described here is byte- rather than bit-oriented. - - Within a computer, a number may occupy multiple bytes. All - multi-byte numbers in the format described here are stored with - the least-significant byte first (at the lower memory address). - For example, the decimal number 520 is stored as: - - 0 1 - +--------+--------+ - |00001000|00000010| - +--------+--------+ - ^ ^ - | | - | + more significant byte = 2 x 256 - + less significant byte = 8 - - - -Deutsch Informational [Page 4] - -RFC 1952 GZIP File Format Specification May 1996 - - - 2.2. File format - - A gzip file consists of a series of "members" (compressed data - sets). The format of each member is specified in the following - section. The members simply appear one after another in the file, - with no additional information before, between, or after them. - - 2.3. Member format - - Each member has the following structure: - - +---+---+---+---+---+---+---+---+---+---+ - |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->) - +---+---+---+---+---+---+---+---+---+---+ - - (if FLG.FEXTRA set) - - +---+---+=================================+ - | XLEN |...XLEN bytes of "extra field"...| (more-->) - +---+---+=================================+ - - (if FLG.FNAME set) - - +=========================================+ - |...original file name, zero-terminated...| (more-->) - +=========================================+ - - (if FLG.FCOMMENT set) - - +===================================+ - |...file comment, zero-terminated...| (more-->) - +===================================+ - - (if FLG.FHCRC set) - - +---+---+ - | CRC16 | - +---+---+ - - +=======================+ - |...compressed blocks...| (more-->) - +=======================+ - - 0 1 2 3 4 5 6 7 - +---+---+---+---+---+---+---+---+ - | CRC32 | ISIZE | - +---+---+---+---+---+---+---+---+ - - - - -Deutsch Informational [Page 5] - -RFC 1952 GZIP File Format Specification May 1996 - - - 2.3.1. Member header and trailer - - ID1 (IDentification 1) - ID2 (IDentification 2) - These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139 - (0x8b, \213), to identify the file as being in gzip format. - - CM (Compression Method) - This identifies the compression method used in the file. CM - = 0-7 are reserved. CM = 8 denotes the "deflate" - compression method, which is the one customarily used by - gzip and which is documented elsewhere. - - FLG (FLaGs) - This flag byte is divided into individual bits as follows: - - bit 0 FTEXT - bit 1 FHCRC - bit 2 FEXTRA - bit 3 FNAME - bit 4 FCOMMENT - bit 5 reserved - bit 6 reserved - bit 7 reserved - - If FTEXT is set, the file is probably ASCII text. This is - an optional indication, which the compressor may set by - checking a small amount of the input data to see whether any - non-ASCII characters are present. In case of doubt, FTEXT - is cleared, indicating binary data. For systems which have - different file formats for ascii text and binary data, the - decompressor can use FTEXT to choose the appropriate format. - We deliberately do not specify the algorithm used to set - this bit, since a compressor always has the option of - leaving it cleared and a decompressor always has the option - of ignoring it and letting some other program handle issues - of data conversion. - - If FHCRC is set, a CRC16 for the gzip header is present, - immediately before the compressed data. The CRC16 consists - of the two least significant bytes of the CRC32 for all - bytes of the gzip header up to and not including the CRC16. - [The FHCRC bit was never set by versions of gzip up to - 1.2.4, even though it was documented with a different - meaning in gzip 1.2.4.] - - If FEXTRA is set, optional extra fields are present, as - described in a following section. - - - -Deutsch Informational [Page 6] - -RFC 1952 GZIP File Format Specification May 1996 - - - If FNAME is set, an original file name is present, - terminated by a zero byte. The name must consist of ISO - 8859-1 (LATIN-1) characters; on operating systems using - EBCDIC or any other character set for file names, the name - must be translated to the ISO LATIN-1 character set. This - is the original name of the file being compressed, with any - directory components removed, and, if the file being - compressed is on a file system with case insensitive names, - forced to lower case. There is no original file name if the - data was compressed from a source other than a named file; - for example, if the source was stdin on a Unix system, there - is no file name. - - If FCOMMENT is set, a zero-terminated file comment is - present. This comment is not interpreted; it is only - intended for human consumption. The comment must consist of - ISO 8859-1 (LATIN-1) characters. Line breaks should be - denoted by a single line feed character (10 decimal). - - Reserved FLG bits must be zero. - - MTIME (Modification TIME) - This gives the most recent modification time of the original - file being compressed. The time is in Unix format, i.e., - seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this - may cause problems for MS-DOS and other systems that use - local rather than Universal time.) If the compressed data - did not come from a file, MTIME is set to the time at which - compression started. MTIME = 0 means no time stamp is - available. - - XFL (eXtra FLags) - These flags are available for use by specific compression - methods. The "deflate" method (CM = 8) sets these flags as - follows: - - XFL = 2 - compressor used maximum compression, - slowest algorithm - XFL = 4 - compressor used fastest algorithm - - OS (Operating System) - This identifies the type of file system on which compression - took place. This may be useful in determining end-of-line - convention for text files. The currently defined values are - as follows: - - - - - - -Deutsch Informational [Page 7] - -RFC 1952 GZIP File Format Specification May 1996 - - - 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32) - 1 - Amiga - 2 - VMS (or OpenVMS) - 3 - Unix - 4 - VM/CMS - 5 - Atari TOS - 6 - HPFS filesystem (OS/2, NT) - 7 - Macintosh - 8 - Z-System - 9 - CP/M - 10 - TOPS-20 - 11 - NTFS filesystem (NT) - 12 - QDOS - 13 - Acorn RISCOS - 255 - unknown - - XLEN (eXtra LENgth) - If FLG.FEXTRA is set, this gives the length of the optional - extra field. See below for details. - - CRC32 (CRC-32) - This contains a Cyclic Redundancy Check value of the - uncompressed data computed according to CRC-32 algorithm - used in the ISO 3309 standard and in section 8.1.1.6.2 of - ITU-T recommendation V.42. (See http://www.iso.ch for - ordering ISO documents. See gopher://info.itu.ch for an - online version of ITU-T V.42.) - - ISIZE (Input SIZE) - This contains the size of the original (uncompressed) input - data modulo 2^32. - - 2.3.1.1. Extra field - - If the FLG.FEXTRA bit is set, an "extra field" is present in - the header, with total length XLEN bytes. It consists of a - series of subfields, each of the form: - - +---+---+---+---+==================================+ - |SI1|SI2| LEN |... LEN bytes of subfield data ...| - +---+---+---+---+==================================+ - - SI1 and SI2 provide a subfield ID, typically two ASCII letters - with some mnemonic value. Jean-Loup Gailly - is maintaining a registry of subfield - IDs; please send him any subfield ID you wish to use. Subfield - IDs with SI2 = 0 are reserved for future use. The following - IDs are currently defined: - - - -Deutsch Informational [Page 8] - -RFC 1952 GZIP File Format Specification May 1996 - - - SI1 SI2 Data - ---------- ---------- ---- - 0x41 ('A') 0x70 ('P') Apollo file type information - - LEN gives the length of the subfield data, excluding the 4 - initial bytes. - - 2.3.1.2. Compliance - - A compliant compressor must produce files with correct ID1, - ID2, CM, CRC32, and ISIZE, but may set all the other fields in - the fixed-length part of the header to default values (255 for - OS, 0 for all others). The compressor must set all reserved - bits to zero. - - A compliant decompressor must check ID1, ID2, and CM, and - provide an error indication if any of these have incorrect - values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC - at least so it can skip over the optional fields if they are - present. It need not examine any other part of the header or - trailer; in particular, a decompressor may ignore FTEXT and OS - and always produce binary output, and still be compliant. A - compliant decompressor must give an error indication if any - reserved bit is non-zero, since such a bit could indicate the - presence of a new field that would cause subsequent data to be - interpreted incorrectly. - -3. References - - [1] "Information Processing - 8-bit single-byte coded graphic - character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987). - The ISO 8859-1 (Latin-1) character set is a superset of 7-bit - ASCII. Files defining this character set are available as - iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/ - - [2] ISO 3309 - - [3] ITU-T recommendation V.42 - - [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", - available in ftp://ftp.uu.net/pub/archiving/zip/doc/ - - [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in - ftp://prep.ai.mit.edu/pub/gnu/ - - [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table - Look-Up", Communications of the ACM, 31(8), pp.1008-1013. - - - - -Deutsch Informational [Page 9] - -RFC 1952 GZIP File Format Specification May 1996 - - - [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal, - pp.118-133. - - [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt, - describing the CRC concept. - -4. Security Considerations - - Any data compression method involves the reduction of redundancy in - the data. Consequently, any corruption of the data is likely to have - severe effects and be difficult to correct. Uncompressed text, on - the other hand, will probably still be readable despite the presence - of some corrupted bytes. - - It is recommended that systems using this data format provide some - means of validating the integrity of the compressed data, such as by - setting and checking the CRC-32 check value. - -5. Acknowledgements - - Trademarks cited in this document are the property of their - respective owners. - - Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler, - the related software described in this specification. Glenn - Randers-Pehrson converted this document to RFC and HTML format. - -6. Author's Address - - L. Peter Deutsch - Aladdin Enterprises - 203 Santa Margarita Ave. - Menlo Park, CA 94025 - - Phone: (415) 322-0103 (AM only) - FAX: (415) 322-1734 - EMail: - - Questions about the technical content of this specification can be - sent by email to: - - Jean-Loup Gailly and - Mark Adler - - Editorial comments on this specification can be sent by email to: - - L. Peter Deutsch and - Glenn Randers-Pehrson - - - -Deutsch Informational [Page 10] - -RFC 1952 GZIP File Format Specification May 1996 - - -7. Appendix: Jean-Loup Gailly's gzip utility - - The most widely used implementation of gzip compression, and the - original documentation on which this specification is based, were - created by Jean-Loup Gailly . Since this - implementation is a de facto standard, we mention some more of its - features here. Again, the material in this section is not part of - the specification per se, and implementations need not follow it to - be compliant. - - When compressing or decompressing a file, gzip preserves the - protection, ownership, and modification time attributes on the local - file system, since there is no provision for representing protection - attributes in the gzip file format itself. Since the file format - includes a modification time, the gzip decompressor provides a - command line switch that assigns the modification time from the file, - rather than the local modification time of the compressed input, to - the decompressed output. - -8. Appendix: Sample CRC Code - - The following sample code represents a practical implementation of - the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42 - for a formal specification.) - - The sample code is in the ANSI C programming language. Non C users - may find it easier to read with these hints: - - & Bitwise AND operator. - ^ Bitwise exclusive-OR operator. - >> Bitwise right shift operator. When applied to an - unsigned quantity, as here, right shift inserts zero - bit(s) at the left. - ! Logical NOT operator. - ++ "n++" increments the variable n. - 0xNNN 0x introduces a hexadecimal (base 16) constant. - Suffix L indicates a long value (at least 32 bits). - - /* Table of CRCs of all 8-bit messages. */ - unsigned long crc_table[256]; - - /* Flag: has the table been computed? Initially false. */ - int crc_table_computed = 0; - - /* Make the table for a fast CRC. */ - void make_crc_table(void) - { - unsigned long c; - - - -Deutsch Informational [Page 11] - -RFC 1952 GZIP File Format Specification May 1996 - - - int n, k; - for (n = 0; n < 256; n++) { - c = (unsigned long) n; - for (k = 0; k < 8; k++) { - if (c & 1) { - c = 0xedb88320L ^ (c >> 1); - } else { - c = c >> 1; - } - } - crc_table[n] = c; - } - crc_table_computed = 1; - } - - /* - Update a running crc with the bytes buf[0..len-1] and return - the updated crc. The crc should be initialized to zero. Pre- and - post-conditioning (one's complement) is performed within this - function so it shouldn't be done by the caller. Usage example: - - unsigned long crc = 0L; - - while (read_buffer(buffer, length) != EOF) { - crc = update_crc(crc, buffer, length); - } - if (crc != original_crc) error(); - */ - unsigned long update_crc(unsigned long crc, - unsigned char *buf, int len) - { - unsigned long c = crc ^ 0xffffffffL; - int n; - - if (!crc_table_computed) - make_crc_table(); - for (n = 0; n < len; n++) { - c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); - } - return c ^ 0xffffffffL; - } - - /* Return the CRC of the bytes buf[0..len-1]. */ - unsigned long crc(unsigned char *buf, int len) - { - return update_crc(0L, buf, len); - } - - - - -Deutsch Informational [Page 12] - diff --git a/third_party/zlib/doc/txtvsbin.txt b/third_party/zlib/doc/txtvsbin.txt deleted file mode 100644 index 2a901ea..0000000 --- a/third_party/zlib/doc/txtvsbin.txt +++ /dev/null @@ -1,107 +0,0 @@ -A Fast Method for Identifying Plain Text Files -============================================== - - -Introduction ------------- - -Given a file coming from an unknown source, it is sometimes desirable -to find out whether the format of that file is plain text. Although -this may appear like a simple task, a fully accurate detection of the -file type requires heavy-duty semantic analysis on the file contents. -It is, however, possible to obtain satisfactory results by employing -various heuristics. - -Previous versions of PKZip and other zip-compatible compression tools -were using a crude detection scheme: if more than 80% (4/5) of the bytes -found in a certain buffer are within the range [7..127], the file is -labeled as plain text, otherwise it is labeled as binary. A prominent -limitation of this scheme is the restriction to Latin-based alphabets. -Other alphabets, like Greek, Cyrillic or Asian, make extensive use of -the bytes within the range [128..255], and texts using these alphabets -are most often misidentified by this scheme; in other words, the rate -of false negatives is sometimes too high, which means that the recall -is low. Another weakness of this scheme is a reduced precision, due to -the false positives that may occur when binary files containing large -amounts of textual characters are misidentified as plain text. - -In this article we propose a new, simple detection scheme that features -a much increased precision and a near-100% recall. This scheme is -designed to work on ASCII, Unicode and other ASCII-derived alphabets, -and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.) -and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings -(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however. - - -The Algorithm -------------- - -The algorithm works by dividing the set of bytecodes [0..255] into three -categories: -- The allow list of textual bytecodes: - 9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255. -- The gray list of tolerated bytecodes: - 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC). -- The block list of undesired, non-textual bytecodes: - 0 (NUL) to 6, 14 to 31. - -If a file contains at least one byte that belongs to the allow list and -no byte that belongs to the block list, then the file is categorized as -plain text; otherwise, it is categorized as binary. (The boundary case, -when the file is empty, automatically falls into the latter category.) - - -Rationale ---------- - -The idea behind this algorithm relies on two observations. - -The first observation is that, although the full range of 7-bit codes -[0..127] is properly specified by the ASCII standard, most control -characters in the range [0..31] are not used in practice. The only -widely-used, almost universally-portable control codes are 9 (TAB), -10 (LF) and 13 (CR). There are a few more control codes that are -recognized on a reduced range of platforms and text viewers/editors: -7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these -codes are rarely (if ever) used alone, without being accompanied by -some printable text. Even the newer, portable text formats such as -XML avoid using control characters outside the list mentioned here. - -The second observation is that most of the binary files tend to contain -control characters, especially 0 (NUL). Even though the older text -detection schemes observe the presence of non-ASCII codes from the range -[128..255], the precision rarely has to suffer if this upper range is -labeled as textual, because the files that are genuinely binary tend to -contain both control characters and codes from the upper range. On the -other hand, the upper range needs to be labeled as textual, because it -is used by virtually all ASCII extensions. In particular, this range is -used for encoding non-Latin scripts. - -Since there is no counting involved, other than simply observing the -presence or the absence of some byte values, the algorithm produces -consistent results, regardless what alphabet encoding is being used. -(If counting were involved, it could be possible to obtain different -results on a text encoded, say, using ISO-8859-16 versus UTF-8.) - -There is an extra category of plain text files that are "polluted" with -one or more block-listed codes, either by mistake or by peculiar design -considerations. In such cases, a scheme that tolerates a small fraction -of block-listed codes would provide an increased recall (i.e. more true -positives). This, however, incurs a reduced precision overall, since -false positives are more likely to appear in binary files that contain -large chunks of textual data. Furthermore, "polluted" plain text should -be regarded as binary by general-purpose text detection schemes, because -general-purpose text processing algorithms might not be applicable. -Under this premise, it is safe to say that our detection method provides -a near-100% recall. - -Experiments have been run on many files coming from various platforms -and applications. We tried plain text files, system logs, source code, -formatted office documents, compiled object code, etc. The results -confirm the optimistic assumptions about the capabilities of this -algorithm. - - --- -Cosmin Truta -Last updated: 2006-May-28 diff --git a/third_party/zlib/examples/README.examples b/third_party/zlib/examples/README.examples deleted file mode 100644 index e3a4b88..0000000 --- a/third_party/zlib/examples/README.examples +++ /dev/null @@ -1,54 +0,0 @@ -This directory contains examples of the use of zlib and other relevant -programs and documentation. - -enough.c - calculation and justification of ENOUGH parameter in inftrees.h - - calculates the maximum table space used in inflate tree - construction over all possible Huffman codes - -fitblk.c - compress just enough input to nearly fill a requested output size - - zlib isn't designed to do this, but fitblk does it anyway - -gun.c - uncompress a gzip file - - illustrates the use of inflateBack() for high speed file-to-file - decompression using call-back functions - - is approximately twice as fast as gzip -d - - also provides Unix uncompress functionality, again twice as fast - -gzappend.c - append to a gzip file - - illustrates the use of the Z_BLOCK flush parameter for inflate() - - illustrates the use of deflatePrime() to start at any bit - -gzjoin.c - join gzip files without recalculating the crc or recompressing - - illustrates the use of the Z_BLOCK flush parameter for inflate() - - illustrates the use of crc32_combine() - -gzlog.c -gzlog.h - efficiently and robustly maintain a message log file in gzip format - - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(), - and deflateSetDictionary() - - illustrates use of a gzip header extra field - -gznorm.c - normalize a gzip file by combining members into a single member - - demonstrates how to concatenate deflate streams using Z_BLOCK - -zlib_how.html - painfully comprehensive description of zpipe.c (see below) - - describes in excruciating detail the use of deflate() and inflate() - -zpipe.c - reads and writes zlib streams from stdin to stdout - - illustrates the proper use of deflate() and inflate() - - deeply commented in zlib_how.html (see above) - -zran.c -zran.h - index a zlib or gzip stream and randomly access it - - illustrates the use of Z_BLOCK, inflatePrime(), and - inflateSetDictionary() to provide random access diff --git a/third_party/zlib/examples/enough.c b/third_party/zlib/examples/enough.c deleted file mode 100644 index 8a3cade..0000000 --- a/third_party/zlib/examples/enough.c +++ /dev/null @@ -1,597 +0,0 @@ -/* enough.c -- determine the maximum size of inflate's Huffman code tables over - * all possible valid and complete prefix codes, subject to a length limit. - * Copyright (C) 2007, 2008, 2012, 2018 Mark Adler - * Version 1.5 5 August 2018 Mark Adler - */ - -/* Version history: - 1.0 3 Jan 2007 First version (derived from codecount.c version 1.4) - 1.1 4 Jan 2007 Use faster incremental table usage computation - Prune examine() search on previously visited states - 1.2 5 Jan 2007 Comments clean up - As inflate does, decrease root for short codes - Refuse cases where inflate would increase root - 1.3 17 Feb 2008 Add argument for initial root table size - Fix bug for initial root table size == max - 1 - Use a macro to compute the history index - 1.4 18 Aug 2012 Avoid shifts more than bits in type (caused endless loop!) - Clean up comparisons of different types - Clean up code indentation - 1.5 5 Aug 2018 Clean up code style, formatting, and comments - Show all the codes for the maximum, and only the maximum - */ - -/* - Examine all possible prefix codes for a given number of symbols and a - maximum code length in bits to determine the maximum table size for zlib's - inflate. Only complete prefix codes are counted. - - Two codes are considered distinct if the vectors of the number of codes per - length are not identical. So permutations of the symbol assignments result - in the same code for the counting, as do permutations of the assignments of - the bit values to the codes (i.e. only canonical codes are counted). - - We build a code from shorter to longer lengths, determining how many symbols - are coded at each length. At each step, we have how many symbols remain to - be coded, what the last code length used was, and how many bit patterns of - that length remain unused. Then we add one to the code length and double the - number of unused patterns to graduate to the next code length. We then - assign all portions of the remaining symbols to that code length that - preserve the properties of a correct and eventually complete code. Those - properties are: we cannot use more bit patterns than are available; and when - all the symbols are used, there are exactly zero possible bit patterns left - unused. - - The inflate Huffman decoding algorithm uses two-level lookup tables for - speed. There is a single first-level table to decode codes up to root bits - in length (root == 9 for literal/length codes and root == 6 for distance - codes, in the current inflate implementation). The base table has 1 << root - entries and is indexed by the next root bits of input. Codes shorter than - root bits have replicated table entries, so that the correct entry is - pointed to regardless of the bits that follow the short code. If the code is - longer than root bits, then the table entry points to a second-level table. - The size of that table is determined by the longest code with that root-bit - prefix. If that longest code has length len, then the table has size 1 << - (len - root), to index the remaining bits in that set of codes. Each - subsequent root-bit prefix then has its own sub-table. The total number of - table entries required by the code is calculated incrementally as the number - of codes at each bit length is populated. When all of the codes are shorter - than root bits, then root is reduced to the longest code length, resulting - in a single, smaller, one-level table. - - The inflate algorithm also provides for small values of root (relative to - the log2 of the number of symbols), where the shortest code has more bits - than root. In that case, root is increased to the length of the shortest - code. This program, by design, does not handle that case, so it is verified - that the number of symbols is less than 1 << (root + 1). - - In order to speed up the examination (by about ten orders of magnitude for - the default arguments), the intermediate states in the build-up of a code - are remembered and previously visited branches are pruned. The memory - required for this will increase rapidly with the total number of symbols and - the maximum code length in bits. However this is a very small price to pay - for the vast speedup. - - First, all of the possible prefix codes are counted, and reachable - intermediate states are noted by a non-zero count in a saved-results array. - Second, the intermediate states that lead to (root + 1) bit or longer codes - are used to look at all sub-codes from those junctures for their inflate - memory usage. (The amount of memory used is not affected by the number of - codes of root bits or less in length.) Third, the visited states in the - construction of those sub-codes and the associated calculation of the table - size is recalled in order to avoid recalculating from the same juncture. - Beginning the code examination at (root + 1) bit codes, which is enabled by - identifying the reachable nodes, accounts for about six of the orders of - magnitude of improvement for the default arguments. About another four - orders of magnitude come from not revisiting previous states. Out of - approximately 2x10^16 possible prefix codes, only about 2x10^6 sub-codes - need to be examined to cover all of the possible table memory usage cases - for the default arguments of 286 symbols limited to 15-bit codes. - - Note that the uintmax_t type is used for counting. It is quite easy to - exceed the capacity of an eight-byte integer with a large number of symbols - and a large maximum code length, so multiple-precision arithmetic would need - to replace the integer arithmetic in that case. This program will abort if - an overflow occurs. The big_t type identifies where the counting takes - place. - - The uintmax_t type is also used for calculating the number of possible codes - remaining at the maximum length. This limits the maximum code length to the - number of bits in a long long minus the number of bits needed to represent - the symbols in a flat code. The code_t type identifies where the bit-pattern - counting takes place. - */ - -#include -#include -#include -#include -#include -#include - -#define local static - -// Special data types. -typedef uintmax_t big_t; // type for code counting -#define PRIbig "ju" // printf format for big_t -typedef uintmax_t code_t; // type for bit pattern counting -struct tab { // type for been-here check - size_t len; // allocated length of bit vector in octets - char *vec; // allocated bit vector -}; - -/* The array for saving results, num[], is indexed with this triplet: - - syms: number of symbols remaining to code - left: number of available bit patterns at length len - len: number of bits in the codes currently being assigned - - Those indices are constrained thusly when saving results: - - syms: 3..totsym (totsym == total symbols to code) - left: 2..syms - 1, but only the evens (so syms == 8 -> 2, 4, 6) - len: 1..max - 1 (max == maximum code length in bits) - - syms == 2 is not saved since that immediately leads to a single code. left - must be even, since it represents the number of available bit patterns at - the current length, which is double the number at the previous length. left - ends at syms-1 since left == syms immediately results in a single code. - (left > sym is not allowed since that would result in an incomplete code.) - len is less than max, since the code completes immediately when len == max. - - The offset into the array is calculated for the three indices with the first - one (syms) being outermost, and the last one (len) being innermost. We build - the array with length max-1 lists for the len index, with syms-3 of those - for each symbol. There are totsym-2 of those, with each one varying in - length as a function of sym. See the calculation of index in map() for the - index, and the calculation of size in main() for the size of the array. - - For the deflate example of 286 symbols limited to 15-bit codes, the array - has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than half - of the space allocated for saved results is actually used -- not all - possible triplets are reached in the generation of valid prefix codes. - */ - -/* The array for tracking visited states, done[], is itself indexed identically - to the num[] array as described above for the (syms, left, len) triplet. - Each element in the array is further indexed by the (mem, rem) doublet, - where mem is the amount of inflate table space used so far, and rem is the - remaining unused entries in the current inflate sub-table. Each indexed - element is simply one bit indicating whether the state has been visited or - not. Since the ranges for mem and rem are not known a priori, each bit - vector is of a variable size, and grows as needed to accommodate the visited - states. mem and rem are used to calculate a single index in a triangular - array. Since the range of mem is expected in the default case to be about - ten times larger than the range of rem, the array is skewed to reduce the - memory usage, with eight times the range for mem than for rem. See the - calculations for offset and bit in been_here() for the details. - - For the deflate example of 286 symbols limited to 15-bit codes, the bit - vectors grow to total 5.5 MB, in addition to the 4.3 MB done array itself. - */ - -// Type for a variable-length, allocated string. -typedef struct { - char *str; // pointer to allocated string - size_t size; // size of allocation - size_t len; // length of string, not including terminating zero -} string_t; - -// Clear a string_t. -local void string_clear(string_t *s) { - s->str[0] = 0; - s->len = 0; -} - -// Initialize a string_t. -local void string_init(string_t *s) { - s->size = 16; - s->str = malloc(s->size); - assert(s->str != NULL && "out of memory"); - string_clear(s); -} - -// Release the allocation of a string_t. -local void string_free(string_t *s) { - free(s->str); - s->str = NULL; - s->size = 0; - s->len = 0; -} - -// Save the results of printf with fmt and the subsequent argument list to s. -// Each call appends to s. The allocated space for s is increased as needed. -local void string_printf(string_t *s, char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - size_t len = s->len; - int ret = vsnprintf(s->str + len, s->size - len, fmt, ap); - assert(ret >= 0 && "out of memory"); - s->len += ret; - if (s->size < s->len + 1) { - do { - s->size <<= 1; - assert(s->size != 0 && "overflow"); - } while (s->size < s->len + 1); - s->str = realloc(s->str, s->size); - assert(s->str != NULL && "out of memory"); - vsnprintf(s->str + len, s->size - len, fmt, ap); - } - va_end(ap); -} - -// Globals to avoid propagating constants or constant pointers recursively. -struct { - int max; // maximum allowed bit length for the codes - int root; // size of base code table in bits - int large; // largest code table so far - size_t size; // number of elements in num and done - big_t tot; // total number of codes with maximum tables size - string_t out; // display of subcodes for maximum tables size - int *code; // number of symbols assigned to each bit length - big_t *num; // saved results array for code counting - struct tab *done; // states already evaluated array -} g; - -// Index function for num[] and done[]. -local inline size_t map(int syms, int left, int len) { - return ((size_t)((syms - 1) >> 1) * ((syms - 2) >> 1) + - (left >> 1) - 1) * (g.max - 1) + - len - 1; -} - -// Free allocated space in globals. -local void cleanup(void) { - if (g.done != NULL) { - for (size_t n = 0; n < g.size; n++) - if (g.done[n].len) - free(g.done[n].vec); - g.size = 0; - free(g.done); g.done = NULL; - } - free(g.num); g.num = NULL; - free(g.code); g.code = NULL; - string_free(&g.out); -} - -// Return the number of possible prefix codes using bit patterns of lengths len -// through max inclusive, coding syms symbols, with left bit patterns of length -// len unused -- return -1 if there is an overflow in the counting. Keep a -// record of previous results in num to prevent repeating the same calculation. -local big_t count(int syms, int left, int len) { - // see if only one possible code - if (syms == left) - return 1; - - // note and verify the expected state - assert(syms > left && left > 0 && len < g.max); - - // see if we've done this one already - size_t index = map(syms, left, len); - big_t got = g.num[index]; - if (got) - return got; // we have -- return the saved result - - // we need to use at least this many bit patterns so that the code won't be - // incomplete at the next length (more bit patterns than symbols) - int least = (left << 1) - syms; - if (least < 0) - least = 0; - - // we can use at most this many bit patterns, lest there not be enough - // available for the remaining symbols at the maximum length (if there were - // no limit to the code length, this would become: most = left - 1) - int most = (((code_t)left << (g.max - len)) - syms) / - (((code_t)1 << (g.max - len)) - 1); - - // count all possible codes from this juncture and add them up - big_t sum = 0; - for (int use = least; use <= most; use++) { - got = count(syms - use, (left - use) << 1, len + 1); - sum += got; - if (got == (big_t)-1 || sum < got) // overflow - return (big_t)-1; - } - - // verify that all recursive calls are productive - assert(sum != 0); - - // save the result and return it - g.num[index] = sum; - return sum; -} - -// Return true if we've been here before, set to true if not. Set a bit in a -// bit vector to indicate visiting this state. Each (syms,len,left) state has a -// variable size bit vector indexed by (mem,rem). The bit vector is lengthened -// as needed to allow setting the (mem,rem) bit. -local int been_here(int syms, int left, int len, int mem, int rem) { - // point to vector for (syms,left,len), bit in vector for (mem,rem) - size_t index = map(syms, left, len); - mem -= 1 << g.root; // mem always includes the root table - mem >>= 1; // mem and rem are always even - rem >>= 1; - size_t offset = (mem >> 3) + rem; - offset = ((offset * (offset + 1)) >> 1) + rem; - int bit = 1 << (mem & 7); - - // see if we've been here - size_t length = g.done[index].len; - if (offset < length && (g.done[index].vec[offset] & bit) != 0) - return 1; // done this! - - // we haven't been here before -- set the bit to show we have now - - // see if we need to lengthen the vector in order to set the bit - if (length <= offset) { - // if we have one already, enlarge it, zero out the appended space - char *vector; - if (length) { - do { - length <<= 1; - } while (length <= offset); - vector = realloc(g.done[index].vec, length); - assert(vector != NULL && "out of memory"); - memset(vector + g.done[index].len, 0, length - g.done[index].len); - } - - // otherwise we need to make a new vector and zero it out - else { - length = 16; - while (length <= offset) - length <<= 1; - vector = calloc(length, 1); - assert(vector != NULL && "out of memory"); - } - - // install the new vector - g.done[index].len = length; - g.done[index].vec = vector; - } - - // set the bit - g.done[index].vec[offset] |= bit; - return 0; -} - -// Examine all possible codes from the given node (syms, len, left). Compute -// the amount of memory required to build inflate's decoding tables, where the -// number of code structures used so far is mem, and the number remaining in -// the current sub-table is rem. -local void examine(int syms, int left, int len, int mem, int rem) { - // see if we have a complete code - if (syms == left) { - // set the last code entry - g.code[len] = left; - - // complete computation of memory used by this code - while (rem < left) { - left -= rem; - rem = 1 << (len - g.root); - mem += rem; - } - assert(rem == left); - - // if this is at the maximum, show the sub-code - if (mem >= g.large) { - // if this is a new maximum, update the maximum and clear out the - // printed sub-codes from the previous maximum - if (mem > g.large) { - g.large = mem; - string_clear(&g.out); - } - - // compute the starting state for this sub-code - syms = 0; - left = 1 << g.max; - for (int bits = g.max; bits > g.root; bits--) { - syms += g.code[bits]; - left -= g.code[bits]; - assert((left & 1) == 0); - left >>= 1; - } - - // print the starting state and the resulting sub-code to g.out - string_printf(&g.out, "<%u, %u, %u>:", - syms, g.root + 1, ((1 << g.root) - left) << 1); - for (int bits = g.root + 1; bits <= g.max; bits++) - if (g.code[bits]) - string_printf(&g.out, " %d[%d]", g.code[bits], bits); - string_printf(&g.out, "\n"); - } - - // remove entries as we drop back down in the recursion - g.code[len] = 0; - return; - } - - // prune the tree if we can - if (been_here(syms, left, len, mem, rem)) - return; - - // we need to use at least this many bit patterns so that the code won't be - // incomplete at the next length (more bit patterns than symbols) - int least = (left << 1) - syms; - if (least < 0) - least = 0; - - // we can use at most this many bit patterns, lest there not be enough - // available for the remaining symbols at the maximum length (if there were - // no limit to the code length, this would become: most = left - 1) - int most = (((code_t)left << (g.max - len)) - syms) / - (((code_t)1 << (g.max - len)) - 1); - - // occupy least table spaces, creating new sub-tables as needed - int use = least; - while (rem < use) { - use -= rem; - rem = 1 << (len - g.root); - mem += rem; - } - rem -= use; - - // examine codes from here, updating table space as we go - for (use = least; use <= most; use++) { - g.code[len] = use; - examine(syms - use, (left - use) << 1, len + 1, - mem + (rem ? 1 << (len - g.root) : 0), rem << 1); - if (rem == 0) { - rem = 1 << (len - g.root); - mem += rem; - } - rem--; - } - - // remove entries as we drop back down in the recursion - g.code[len] = 0; -} - -// Look at all sub-codes starting with root + 1 bits. Look at only the valid -// intermediate code states (syms, left, len). For each completed code, -// calculate the amount of memory required by inflate to build the decoding -// tables. Find the maximum amount of memory required and show the codes that -// require that maximum. -local void enough(int syms) { - // clear code - for (int n = 0; n <= g.max; n++) - g.code[n] = 0; - - // look at all (root + 1) bit and longer codes - string_clear(&g.out); // empty saved results - g.large = 1 << g.root; // base table - if (g.root < g.max) // otherwise, there's only a base table - for (int n = 3; n <= syms; n++) - for (int left = 2; left < n; left += 2) { - // look at all reachable (root + 1) bit nodes, and the - // resulting codes (complete at root + 2 or more) - size_t index = map(n, left, g.root + 1); - if (g.root + 1 < g.max && g.num[index]) // reachable node - examine(n, left, g.root + 1, 1 << g.root, 0); - - // also look at root bit codes with completions at root + 1 - // bits (not saved in num, since complete), just in case - if (g.num[index - 1] && n <= left << 1) - examine((n - left) << 1, (n - left) << 1, g.root + 1, - 1 << g.root, 0); - } - - // done - printf("maximum of %d table entries for root = %d\n", g.large, g.root); - fputs(g.out.str, stdout); -} - -// Examine and show the total number of possible prefix codes for a given -// maximum number of symbols, initial root table size, and maximum code length -// in bits -- those are the command arguments in that order. The default values -// are 286, 9, and 15 respectively, for the deflate literal/length code. The -// possible codes are counted for each number of coded symbols from two to the -// maximum. The counts for each of those and the total number of codes are -// shown. The maximum number of inflate table entries is then calculated across -// all possible codes. Each new maximum number of table entries and the -// associated sub-code (starting at root + 1 == 10 bits) is shown. -// -// To count and examine prefix codes that are not length-limited, provide a -// maximum length equal to the number of symbols minus one. -// -// For the deflate literal/length code, use "enough". For the deflate distance -// code, use "enough 30 6". -int main(int argc, char **argv) { - // set up globals for cleanup() - g.code = NULL; - g.num = NULL; - g.done = NULL; - string_init(&g.out); - - // get arguments -- default to the deflate literal/length code - int syms = 286; - g.root = 9; - g.max = 15; - if (argc > 1) { - syms = atoi(argv[1]); - if (argc > 2) { - g.root = atoi(argv[2]); - if (argc > 3) - g.max = atoi(argv[3]); - } - } - if (argc > 4 || syms < 2 || g.root < 1 || g.max < 1) { - fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n", - stderr); - return 1; - } - - // if not restricting the code length, the longest is syms - 1 - if (g.max > syms - 1) - g.max = syms - 1; - - // determine the number of bits in a code_t - int bits = 0; - for (code_t word = 1; word; word <<= 1) - bits++; - - // make sure that the calculation of most will not overflow - if (g.max > bits || (code_t)(syms - 2) >= ((code_t)-1 >> (g.max - 1))) { - fputs("abort: code length too long for internal types\n", stderr); - return 1; - } - - // reject impossible code requests - if ((code_t)(syms - 1) > ((code_t)1 << g.max) - 1) { - fprintf(stderr, "%d symbols cannot be coded in %d bits\n", - syms, g.max); - return 1; - } - - // allocate code vector - g.code = calloc(g.max + 1, sizeof(int)); - assert(g.code != NULL && "out of memory"); - - // determine size of saved results array, checking for overflows, - // allocate and clear the array (set all to zero with calloc()) - if (syms == 2) // iff max == 1 - g.num = NULL; // won't be saving any results - else { - g.size = syms >> 1; - int n = (syms - 1) >> 1; - assert(g.size <= (size_t)-1 / n && "overflow"); - g.size *= n; - n = g.max - 1; - assert(g.size <= (size_t)-1 / n && "overflow"); - g.size *= n; - g.num = calloc(g.size, sizeof(big_t)); - assert(g.num != NULL && "out of memory"); - } - - // count possible codes for all numbers of symbols, add up counts - big_t sum = 0; - for (int n = 2; n <= syms; n++) { - big_t got = count(n, 2, 1); - sum += got; - assert(got != (big_t)-1 && sum >= got && "overflow"); - } - printf("%"PRIbig" total codes for 2 to %d symbols", sum, syms); - if (g.max < syms - 1) - printf(" (%d-bit length limit)\n", g.max); - else - puts(" (no length limit)"); - - // allocate and clear done array for been_here() - if (syms == 2) - g.done = NULL; - else { - g.done = calloc(g.size, sizeof(struct tab)); - assert(g.done != NULL && "out of memory"); - } - - // find and show maximum inflate table usage - if (g.root > g.max) // reduce root to max length - g.root = g.max; - if ((code_t)syms < ((code_t)1 << (g.root + 1))) - enough(syms); - else - fputs("cannot handle minimum code lengths > root", stderr); - - // done - cleanup(); - return 0; -} diff --git a/third_party/zlib/examples/fitblk.c b/third_party/zlib/examples/fitblk.c deleted file mode 100644 index 723dc00..0000000 --- a/third_party/zlib/examples/fitblk.c +++ /dev/null @@ -1,233 +0,0 @@ -/* fitblk.c: example of fitting compressed output to a specified size - Not copyrighted -- provided to the public domain - Version 1.1 25 November 2004 Mark Adler */ - -/* Version history: - 1.0 24 Nov 2004 First version - 1.1 25 Nov 2004 Change deflateInit2() to deflateInit() - Use fixed-size, stack-allocated raw buffers - Simplify code moving compression to subroutines - Use assert() for internal errors - Add detailed description of approach - */ - -/* Approach to just fitting a requested compressed size: - - fitblk performs three compression passes on a portion of the input - data in order to determine how much of that input will compress to - nearly the requested output block size. The first pass generates - enough deflate blocks to produce output to fill the requested - output size plus a specified excess amount (see the EXCESS define - below). The last deflate block may go quite a bit past that, but - is discarded. The second pass decompresses and recompresses just - the compressed data that fit in the requested plus excess sized - buffer. The deflate process is terminated after that amount of - input, which is less than the amount consumed on the first pass. - The last deflate block of the result will be of a comparable size - to the final product, so that the header for that deflate block and - the compression ratio for that block will be about the same as in - the final product. The third compression pass decompresses the - result of the second step, but only the compressed data up to the - requested size minus an amount to allow the compressed stream to - complete (see the MARGIN define below). That will result in a - final compressed stream whose length is less than or equal to the - requested size. Assuming sufficient input and a requested size - greater than a few hundred bytes, the shortfall will typically be - less than ten bytes. - - If the input is short enough that the first compression completes - before filling the requested output size, then that compressed - stream is return with no recompression. - - EXCESS is chosen to be just greater than the shortfall seen in a - two pass approach similar to the above. That shortfall is due to - the last deflate block compressing more efficiently with a smaller - header on the second pass. EXCESS is set to be large enough so - that there is enough uncompressed data for the second pass to fill - out the requested size, and small enough so that the final deflate - block of the second pass will be close in size to the final deflate - block of the third and final pass. MARGIN is chosen to be just - large enough to assure that the final compression has enough room - to complete in all cases. - */ - -#include -#include -#include -#include "zlib.h" - -#define local static - -/* print nastygram and leave */ -local void quit(char *why) -{ - fprintf(stderr, "fitblk abort: %s\n", why); - exit(1); -} - -#define RAWLEN 4096 /* intermediate uncompressed buffer size */ - -/* compress from file to def until provided buffer is full or end of - input reached; return last deflate() return value, or Z_ERRNO if - there was read error on the file */ -local int partcompress(FILE *in, z_streamp def) -{ - int ret, flush; - unsigned char raw[RAWLEN]; - - flush = Z_NO_FLUSH; - do { - def->avail_in = fread(raw, 1, RAWLEN, in); - if (ferror(in)) - return Z_ERRNO; - def->next_in = raw; - if (feof(in)) - flush = Z_FINISH; - ret = deflate(def, flush); - assert(ret != Z_STREAM_ERROR); - } while (def->avail_out != 0 && flush == Z_NO_FLUSH); - return ret; -} - -/* recompress from inf's input to def's output; the input for inf and - the output for def are set in those structures before calling; - return last deflate() return value, or Z_MEM_ERROR if inflate() - was not able to allocate enough memory when it needed to */ -local int recompress(z_streamp inf, z_streamp def) -{ - int ret, flush; - unsigned char raw[RAWLEN]; - - flush = Z_NO_FLUSH; - do { - /* decompress */ - inf->avail_out = RAWLEN; - inf->next_out = raw; - ret = inflate(inf, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR && - ret != Z_NEED_DICT); - if (ret == Z_MEM_ERROR) - return ret; - - /* compress what was decompressed until done or no room */ - def->avail_in = RAWLEN - inf->avail_out; - def->next_in = raw; - if (inf->avail_out != 0) - flush = Z_FINISH; - ret = deflate(def, flush); - assert(ret != Z_STREAM_ERROR); - } while (ret != Z_STREAM_END && def->avail_out != 0); - return ret; -} - -#define EXCESS 256 /* empirically determined stream overage */ -#define MARGIN 8 /* amount to back off for completion */ - -/* compress from stdin to fixed-size block on stdout */ -int main(int argc, char **argv) -{ - int ret; /* return code */ - unsigned size; /* requested fixed output block size */ - unsigned have; /* bytes written by deflate() call */ - unsigned char *blk; /* intermediate and final stream */ - unsigned char *tmp; /* close to desired size stream */ - z_stream def, inf; /* zlib deflate and inflate states */ - - /* get requested output size */ - if (argc != 2) - quit("need one argument: size of output block"); - ret = strtol(argv[1], argv + 1, 10); - if (argv[1][0] != 0) - quit("argument must be a number"); - if (ret < 8) /* 8 is minimum zlib stream size */ - quit("need positive size of 8 or greater"); - size = (unsigned)ret; - - /* allocate memory for buffers and compression engine */ - blk = malloc(size + EXCESS); - def.zalloc = Z_NULL; - def.zfree = Z_NULL; - def.opaque = Z_NULL; - ret = deflateInit(&def, Z_DEFAULT_COMPRESSION); - if (ret != Z_OK || blk == NULL) - quit("out of memory"); - - /* compress from stdin until output full, or no more input */ - def.avail_out = size + EXCESS; - def.next_out = blk; - ret = partcompress(stdin, &def); - if (ret == Z_ERRNO) - quit("error reading input"); - - /* if it all fit, then size was undersubscribed -- done! */ - if (ret == Z_STREAM_END && def.avail_out >= EXCESS) { - /* write block to stdout */ - have = size + EXCESS - def.avail_out; - if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) - quit("error writing output"); - - /* clean up and print results to stderr */ - ret = deflateEnd(&def); - assert(ret != Z_STREAM_ERROR); - free(blk); - fprintf(stderr, - "%u bytes unused out of %u requested (all input)\n", - size - have, size); - return 0; - } - - /* it didn't all fit -- set up for recompression */ - inf.zalloc = Z_NULL; - inf.zfree = Z_NULL; - inf.opaque = Z_NULL; - inf.avail_in = 0; - inf.next_in = Z_NULL; - ret = inflateInit(&inf); - tmp = malloc(size + EXCESS); - if (ret != Z_OK || tmp == NULL) - quit("out of memory"); - ret = deflateReset(&def); - assert(ret != Z_STREAM_ERROR); - - /* do first recompression close to the right amount */ - inf.avail_in = size + EXCESS; - inf.next_in = blk; - def.avail_out = size + EXCESS; - def.next_out = tmp; - ret = recompress(&inf, &def); - if (ret == Z_MEM_ERROR) - quit("out of memory"); - - /* set up for next recompression */ - ret = inflateReset(&inf); - assert(ret != Z_STREAM_ERROR); - ret = deflateReset(&def); - assert(ret != Z_STREAM_ERROR); - - /* do second and final recompression (third compression) */ - inf.avail_in = size - MARGIN; /* assure stream will complete */ - inf.next_in = tmp; - def.avail_out = size; - def.next_out = blk; - ret = recompress(&inf, &def); - if (ret == Z_MEM_ERROR) - quit("out of memory"); - assert(ret == Z_STREAM_END); /* otherwise MARGIN too small */ - - /* done -- write block to stdout */ - have = size - def.avail_out; - if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) - quit("error writing output"); - - /* clean up and print results to stderr */ - free(tmp); - ret = inflateEnd(&inf); - assert(ret != Z_STREAM_ERROR); - ret = deflateEnd(&def); - assert(ret != Z_STREAM_ERROR); - free(blk); - fprintf(stderr, - "%u bytes unused out of %u requested (%lu input)\n", - size - have, size, def.total_in); - return 0; -} diff --git a/third_party/zlib/examples/gun.c b/third_party/zlib/examples/gun.c deleted file mode 100644 index bea5497..0000000 --- a/third_party/zlib/examples/gun.c +++ /dev/null @@ -1,702 +0,0 @@ -/* gun.c -- simple gunzip to give an example of the use of inflateBack() - * Copyright (C) 2003, 2005, 2008, 2010, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - Version 1.7 12 August 2012 Mark Adler */ - -/* Version history: - 1.0 16 Feb 2003 First version for testing of inflateBack() - 1.1 21 Feb 2005 Decompress concatenated gzip streams - Remove use of "this" variable (C++ keyword) - Fix return value for in() - Improve allocation failure checking - Add typecasting for void * structures - Add -h option for command version and usage - Add a bunch of comments - 1.2 20 Mar 2005 Add Unix compress (LZW) decompression - Copy file attributes from input file to output file - 1.3 12 Jun 2005 Add casts for error messages [Oberhumer] - 1.4 8 Dec 2006 LZW decompression speed improvements - 1.5 9 Feb 2008 Avoid warning in latest version of gcc - 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings - 1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8 - */ - -/* - gun [ -t ] [ name ... ] - - decompresses the data in the named gzip files. If no arguments are given, - gun will decompress from stdin to stdout. The names must end in .gz, -gz, - .z, -z, _z, or .Z. The uncompressed data will be written to a file name - with the suffix stripped. On success, the original file is deleted. On - failure, the output file is deleted. For most failures, the command will - continue to process the remaining names on the command line. A memory - allocation failure will abort the command. If -t is specified, then the - listed files or stdin will be tested as gzip files for integrity (without - checking for a proper suffix), no output will be written, and no files - will be deleted. - - Like gzip, gun allows concatenated gzip streams and will decompress them, - writing all of the uncompressed data to the output. Unlike gzip, gun allows - an empty file on input, and will produce no error writing an empty output - file. - - gun will also decompress files made by Unix compress, which uses LZW - compression. These files are automatically detected by virtue of their - magic header bytes. Since the end of Unix compress stream is marked by the - end-of-file, they cannot be concatenated. If a Unix compress stream is - encountered in an input file, it is the last stream in that file. - - Like gunzip and uncompress, the file attributes of the original compressed - file are maintained in the final uncompressed file, to the extent that the - user permissions allow it. - - On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version - 1.2.4) is on the same file, when gun is linked with zlib 1.2.2. Also the - LZW decompression provided by gun is about twice as fast as the standard - Unix uncompress command. - */ - -/* external functions and related types and constants */ -#include /* fprintf() */ -#include /* malloc(), free() */ -#include /* strerror(), strcmp(), strlen(), memcpy() */ -#include /* errno */ -#include /* open() */ -#include /* read(), write(), close(), chown(), unlink() */ -#include -#include /* stat(), chmod() */ -#include /* utime() */ -#include "zlib.h" /* inflateBackInit(), inflateBack(), */ - /* inflateBackEnd(), crc32() */ - -/* function declaration */ -#define local static - -/* buffer constants */ -#define SIZE 32768U /* input and output buffer sizes */ -#define PIECE 16384 /* limits i/o chunks for 16-bit int case */ - -/* structure for infback() to pass to input function in() -- it maintains the - input file and a buffer of size SIZE */ -struct ind { - int infile; - unsigned char *inbuf; -}; - -/* Load input buffer, assumed to be empty, and return bytes loaded and a - pointer to them. read() is called until the buffer is full, or until it - returns end-of-file or error. Return 0 on error. */ -local unsigned in(void *in_desc, z_const unsigned char **buf) -{ - int ret; - unsigned len; - unsigned char *next; - struct ind *me = (struct ind *)in_desc; - - next = me->inbuf; - *buf = next; - len = 0; - do { - ret = PIECE; - if ((unsigned)ret > SIZE - len) - ret = (int)(SIZE - len); - ret = (int)read(me->infile, next, ret); - if (ret == -1) { - len = 0; - break; - } - next += ret; - len += ret; - } while (ret != 0 && len < SIZE); - return len; -} - -/* structure for infback() to pass to output function out() -- it maintains the - output file, a running CRC-32 check on the output and the total number of - bytes output, both for checking against the gzip trailer. (The length in - the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and - the output is greater than 4 GB.) */ -struct outd { - int outfile; - int check; /* true if checking crc and total */ - unsigned long crc; - unsigned long total; -}; - -/* Write output buffer and update the CRC-32 and total bytes written. write() - is called until all of the output is written or an error is encountered. - On success out() returns 0. For a write failure, out() returns 1. If the - output file descriptor is -1, then nothing is written. - */ -local int out(void *out_desc, unsigned char *buf, unsigned len) -{ - int ret; - struct outd *me = (struct outd *)out_desc; - - if (me->check) { - me->crc = crc32(me->crc, buf, len); - me->total += len; - } - if (me->outfile != -1) - do { - ret = PIECE; - if ((unsigned)ret > len) - ret = (int)len; - ret = (int)write(me->outfile, buf, ret); - if (ret == -1) - return 1; - buf += ret; - len -= ret; - } while (len != 0); - return 0; -} - -/* next input byte macro for use inside lunpipe() and gunpipe() */ -#define NEXT() (have ? 0 : (have = in(indp, &next)), \ - last = have ? (have--, (int)(*next++)) : -1) - -/* memory for gunpipe() and lunpipe() -- - the first 256 entries of prefix[] and suffix[] are never used, could - have offset the index, but it's faster to waste the memory */ -unsigned char inbuf[SIZE]; /* input buffer */ -unsigned char outbuf[SIZE]; /* output buffer */ -unsigned short prefix[65536]; /* index to LZW prefix string */ -unsigned char suffix[65536]; /* one-character LZW suffix */ -unsigned char match[65280 + 2]; /* buffer for reversed match or gzip - 32K sliding window */ - -/* throw out what's left in the current bits byte buffer (this is a vestigial - aspect of the compressed data format derived from an implementation that - made use of a special VAX machine instruction!) */ -#define FLUSHCODE() \ - do { \ - left = 0; \ - rem = 0; \ - if (chunk > have) { \ - chunk -= have; \ - have = 0; \ - if (NEXT() == -1) \ - break; \ - chunk--; \ - if (chunk > have) { \ - chunk = have = 0; \ - break; \ - } \ - } \ - have -= chunk; \ - next += chunk; \ - chunk = 0; \ - } while (0) - -/* Decompress a compress (LZW) file from indp to outfile. The compress magic - header (two bytes) has already been read and verified. There are have bytes - of buffered input at next. strm is used for passing error information back - to gunpipe(). - - lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of - file, read error, or write error (a write error indicated by strm->next_in - not equal to Z_NULL), or Z_DATA_ERROR for invalid input. - */ -local int lunpipe(unsigned have, z_const unsigned char *next, struct ind *indp, - int outfile, z_stream *strm) -{ - int last; /* last byte read by NEXT(), or -1 if EOF */ - unsigned chunk; /* bytes left in current chunk */ - int left; /* bits left in rem */ - unsigned rem; /* unused bits from input */ - int bits; /* current bits per code */ - unsigned code; /* code, table traversal index */ - unsigned mask; /* mask for current bits codes */ - int max; /* maximum bits per code for this stream */ - unsigned flags; /* compress flags, then block compress flag */ - unsigned end; /* last valid entry in prefix/suffix tables */ - unsigned temp; /* current code */ - unsigned prev; /* previous code */ - unsigned final; /* last character written for previous code */ - unsigned stack; /* next position for reversed string */ - unsigned outcnt; /* bytes in output buffer */ - struct outd outd; /* output structure */ - unsigned char *p; - - /* set up output */ - outd.outfile = outfile; - outd.check = 0; - - /* process remainder of compress header -- a flags byte */ - flags = NEXT(); - if (last == -1) - return Z_BUF_ERROR; - if (flags & 0x60) { - strm->msg = (char *)"unknown lzw flags set"; - return Z_DATA_ERROR; - } - max = flags & 0x1f; - if (max < 9 || max > 16) { - strm->msg = (char *)"lzw bits out of range"; - return Z_DATA_ERROR; - } - if (max == 9) /* 9 doesn't really mean 9 */ - max = 10; - flags &= 0x80; /* true if block compress */ - - /* clear table */ - bits = 9; - mask = 0x1ff; - end = flags ? 256 : 255; - - /* set up: get first 9-bit code, which is the first decompressed byte, but - don't create a table entry until the next code */ - if (NEXT() == -1) /* no compressed data is ok */ - return Z_OK; - final = prev = (unsigned)last; /* low 8 bits of code */ - if (NEXT() == -1) /* missing a bit */ - return Z_BUF_ERROR; - if (last & 1) { /* code must be < 256 */ - strm->msg = (char *)"invalid lzw code"; - return Z_DATA_ERROR; - } - rem = (unsigned)last >> 1; /* remaining 7 bits */ - left = 7; - chunk = bits - 2; /* 7 bytes left in this chunk */ - outbuf[0] = (unsigned char)final; /* write first decompressed byte */ - outcnt = 1; - - /* decode codes */ - stack = 0; - for (;;) { - /* if the table will be full after this, increment the code size */ - if (end >= mask && bits < max) { - FLUSHCODE(); - bits++; - mask <<= 1; - mask++; - } - - /* get a code of length bits */ - if (chunk == 0) /* decrement chunk modulo bits */ - chunk = bits; - code = rem; /* low bits of code */ - if (NEXT() == -1) { /* EOF is end of compressed data */ - /* write remaining buffered output */ - if (outcnt && out(&outd, outbuf, outcnt)) { - strm->next_in = outbuf; /* signal write error */ - return Z_BUF_ERROR; - } - return Z_OK; - } - code += (unsigned)last << left; /* middle (or high) bits of code */ - left += 8; - chunk--; - if (bits > left) { /* need more bits */ - if (NEXT() == -1) /* can't end in middle of code */ - return Z_BUF_ERROR; - code += (unsigned)last << left; /* high bits of code */ - left += 8; - chunk--; - } - code &= mask; /* mask to current code length */ - left -= bits; /* number of unused bits */ - rem = (unsigned)last >> (8 - left); /* unused bits from last byte */ - - /* process clear code (256) */ - if (code == 256 && flags) { - FLUSHCODE(); - bits = 9; /* initialize bits and mask */ - mask = 0x1ff; - end = 255; /* empty table */ - continue; /* get next code */ - } - - /* special code to reuse last match */ - temp = code; /* save the current code */ - if (code > end) { - /* Be picky on the allowed code here, and make sure that the code - we drop through (prev) will be a valid index so that random - input does not cause an exception. The code != end + 1 check is - empirically derived, and not checked in the original uncompress - code. If this ever causes a problem, that check could be safely - removed. Leaving this check in greatly improves gun's ability - to detect random or corrupted input after a compress header. - In any case, the prev > end check must be retained. */ - if (code != end + 1 || prev > end) { - strm->msg = (char *)"invalid lzw code"; - return Z_DATA_ERROR; - } - match[stack++] = (unsigned char)final; - code = prev; - } - - /* walk through linked list to generate output in reverse order */ - p = match + stack; - while (code >= 256) { - *p++ = suffix[code]; - code = prefix[code]; - } - stack = p - match; - match[stack++] = (unsigned char)code; - final = code; - - /* link new table entry */ - if (end < mask) { - end++; - prefix[end] = (unsigned short)prev; - suffix[end] = (unsigned char)final; - } - - /* set previous code for next iteration */ - prev = temp; - - /* write output in forward order */ - while (stack > SIZE - outcnt) { - while (outcnt < SIZE) - outbuf[outcnt++] = match[--stack]; - if (out(&outd, outbuf, outcnt)) { - strm->next_in = outbuf; /* signal write error */ - return Z_BUF_ERROR; - } - outcnt = 0; - } - p = match + stack; - do { - outbuf[outcnt++] = *--p; - } while (p > match); - stack = 0; - - /* loop for next code with final and prev as the last match, rem and - left provide the first 0..7 bits of the next code, end is the last - valid table entry */ - } -} - -/* Decompress a gzip file from infile to outfile. strm is assumed to have been - successfully initialized with inflateBackInit(). The input file may consist - of a series of gzip streams, in which case all of them will be decompressed - to the output file. If outfile is -1, then the gzip stream(s) integrity is - checked and nothing is written. - - The return value is a zlib error code: Z_MEM_ERROR if out of memory, - Z_DATA_ERROR if the header or the compressed data is invalid, or if the - trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends - prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip - stream) follows a valid gzip stream. - */ -local int gunpipe(z_stream *strm, int infile, int outfile) -{ - int ret, first, last; - unsigned have, flags, len; - z_const unsigned char *next = NULL; - struct ind ind, *indp; - struct outd outd; - - /* setup input buffer */ - ind.infile = infile; - ind.inbuf = inbuf; - indp = &ind; - - /* decompress concatenated gzip streams */ - have = 0; /* no input data read in yet */ - first = 1; /* looking for first gzip header */ - strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ - for (;;) { - /* look for the two magic header bytes for a gzip stream */ - if (NEXT() == -1) { - ret = Z_OK; - break; /* empty gzip stream is ok */ - } - if (last != 31 || (NEXT() != 139 && last != 157)) { - strm->msg = (char *)"incorrect header check"; - ret = first ? Z_DATA_ERROR : Z_ERRNO; - break; /* not a gzip or compress header */ - } - first = 0; /* next non-header is junk */ - - /* process a compress (LZW) file -- can't be concatenated after this */ - if (last == 157) { - ret = lunpipe(have, next, indp, outfile, strm); - break; - } - - /* process remainder of gzip header */ - ret = Z_BUF_ERROR; - if (NEXT() != 8) { /* only deflate method allowed */ - if (last == -1) break; - strm->msg = (char *)"unknown compression method"; - ret = Z_DATA_ERROR; - break; - } - flags = NEXT(); /* header flags */ - NEXT(); /* discard mod time, xflgs, os */ - NEXT(); - NEXT(); - NEXT(); - NEXT(); - NEXT(); - if (last == -1) break; - if (flags & 0xe0) { - strm->msg = (char *)"unknown header flags set"; - ret = Z_DATA_ERROR; - break; - } - if (flags & 4) { /* extra field */ - len = NEXT(); - len += (unsigned)(NEXT()) << 8; - if (last == -1) break; - while (len > have) { - len -= have; - have = 0; - if (NEXT() == -1) break; - len--; - } - if (last == -1) break; - have -= len; - next += len; - } - if (flags & 8) /* file name */ - while (NEXT() != 0 && last != -1) - ; - if (flags & 16) /* comment */ - while (NEXT() != 0 && last != -1) - ; - if (flags & 2) { /* header crc */ - NEXT(); - NEXT(); - } - if (last == -1) break; - - /* set up output */ - outd.outfile = outfile; - outd.check = 1; - outd.crc = crc32(0L, Z_NULL, 0); - outd.total = 0; - - /* decompress data to output */ - strm->next_in = next; - strm->avail_in = have; - ret = inflateBack(strm, in, indp, out, &outd); - if (ret != Z_STREAM_END) break; - next = strm->next_in; - have = strm->avail_in; - strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ - - /* check trailer */ - ret = Z_BUF_ERROR; - if (NEXT() != (int)(outd.crc & 0xff) || - NEXT() != (int)((outd.crc >> 8) & 0xff) || - NEXT() != (int)((outd.crc >> 16) & 0xff) || - NEXT() != (int)((outd.crc >> 24) & 0xff)) { - /* crc error */ - if (last != -1) { - strm->msg = (char *)"incorrect data check"; - ret = Z_DATA_ERROR; - } - break; - } - if (NEXT() != (int)(outd.total & 0xff) || - NEXT() != (int)((outd.total >> 8) & 0xff) || - NEXT() != (int)((outd.total >> 16) & 0xff) || - NEXT() != (int)((outd.total >> 24) & 0xff)) { - /* length error */ - if (last != -1) { - strm->msg = (char *)"incorrect length check"; - ret = Z_DATA_ERROR; - } - break; - } - - /* go back and look for another gzip stream */ - } - - /* clean up and return */ - return ret; -} - -/* Copy file attributes, from -> to, as best we can. This is best effort, so - no errors are reported. The mode bits, including suid, sgid, and the sticky - bit are copied (if allowed), the owner's user id and group id are copied - (again if allowed), and the access and modify times are copied. */ -local void copymeta(char *from, char *to) -{ - struct stat was; - struct utimbuf when; - - /* get all of from's Unix meta data, return if not a regular file */ - if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG) - return; - - /* set to's mode bits, ignore errors */ - (void)chmod(to, was.st_mode & 07777); - - /* copy owner's user and group, ignore errors */ - (void)chown(to, was.st_uid, was.st_gid); - - /* copy access and modify times, ignore errors */ - when.actime = was.st_atime; - when.modtime = was.st_mtime; - (void)utime(to, &when); -} - -/* Decompress the file inname to the file outnname, of if test is true, just - decompress without writing and check the gzip trailer for integrity. If - inname is NULL or an empty string, read from stdin. If outname is NULL or - an empty string, write to stdout. strm is a pre-initialized inflateBack - structure. When appropriate, copy the file attributes from inname to - outname. - - gunzip() returns 1 if there is an out-of-memory error or an unexpected - return code from gunpipe(). Otherwise it returns 0. - */ -local int gunzip(z_stream *strm, char *inname, char *outname, int test) -{ - int ret; - int infile, outfile; - - /* open files */ - if (inname == NULL || *inname == 0) { - inname = "-"; - infile = 0; /* stdin */ - } - else { - infile = open(inname, O_RDONLY, 0); - if (infile == -1) { - fprintf(stderr, "gun cannot open %s\n", inname); - return 0; - } - } - if (test) - outfile = -1; - else if (outname == NULL || *outname == 0) { - outname = "-"; - outfile = 1; /* stdout */ - } - else { - outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); - if (outfile == -1) { - close(infile); - fprintf(stderr, "gun cannot create %s\n", outname); - return 0; - } - } - errno = 0; - - /* decompress */ - ret = gunpipe(strm, infile, outfile); - if (outfile > 2) close(outfile); - if (infile > 2) close(infile); - - /* interpret result */ - switch (ret) { - case Z_OK: - case Z_ERRNO: - if (infile > 2 && outfile > 2) { - copymeta(inname, outname); /* copy attributes */ - unlink(inname); - } - if (ret == Z_ERRNO) - fprintf(stderr, "gun warning: trailing garbage ignored in %s\n", - inname); - break; - case Z_DATA_ERROR: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg); - break; - case Z_MEM_ERROR: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun out of memory error--aborting\n"); - return 1; - case Z_BUF_ERROR: - if (outfile > 2) unlink(outname); - if (strm->next_in != Z_NULL) { - fprintf(stderr, "gun write error on %s: %s\n", - outname, strerror(errno)); - } - else if (errno) { - fprintf(stderr, "gun read error on %s: %s\n", - inname, strerror(errno)); - } - else { - fprintf(stderr, "gun unexpected end of file on %s\n", - inname); - } - break; - default: - if (outfile > 2) unlink(outname); - fprintf(stderr, "gun internal error--aborting\n"); - return 1; - } - return 0; -} - -/* Process the gun command line arguments. See the command syntax near the - beginning of this source file. */ -int main(int argc, char **argv) -{ - int ret, len, test; - char *outname; - unsigned char *window; - z_stream strm; - - /* initialize inflateBack state for repeated use */ - window = match; /* reuse LZW match buffer */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = inflateBackInit(&strm, 15, window); - if (ret != Z_OK) { - fprintf(stderr, "gun out of memory error--aborting\n"); - return 1; - } - - /* decompress each file to the same name with the suffix removed */ - argc--; - argv++; - test = 0; - if (argc && strcmp(*argv, "-h") == 0) { - fprintf(stderr, "gun 1.6 (17 Jan 2010)\n"); - fprintf(stderr, "Copyright (C) 2003-2010 Mark Adler\n"); - fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n"); - return 0; - } - if (argc && strcmp(*argv, "-t") == 0) { - test = 1; - argc--; - argv++; - } - if (argc) - do { - if (test) - outname = NULL; - else { - len = (int)strlen(*argv); - if (strcmp(*argv + len - 3, ".gz") == 0 || - strcmp(*argv + len - 3, "-gz") == 0) - len -= 3; - else if (strcmp(*argv + len - 2, ".z") == 0 || - strcmp(*argv + len - 2, "-z") == 0 || - strcmp(*argv + len - 2, "_z") == 0 || - strcmp(*argv + len - 2, ".Z") == 0) - len -= 2; - else { - fprintf(stderr, "gun error: no gz type on %s--skipping\n", - *argv); - continue; - } - outname = malloc(len + 1); - if (outname == NULL) { - fprintf(stderr, "gun out of memory error--aborting\n"); - ret = 1; - break; - } - memcpy(outname, *argv, len); - outname[len] = 0; - } - ret = gunzip(&strm, *argv, outname, test); - if (outname != NULL) free(outname); - if (ret) break; - } while (argv++, --argc); - else - ret = gunzip(&strm, NULL, NULL, test); - - /* clean up */ - inflateBackEnd(&strm); - return ret; -} diff --git a/third_party/zlib/examples/gzappend.c b/third_party/zlib/examples/gzappend.c deleted file mode 100644 index 23e93cf..0000000 --- a/third_party/zlib/examples/gzappend.c +++ /dev/null @@ -1,504 +0,0 @@ -/* gzappend -- command to append to a gzip file - - Copyright (C) 2003, 2012 Mark Adler, all rights reserved - version 1.2, 11 Oct 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* - * Change history: - * - * 1.0 19 Oct 2003 - First version - * 1.1 4 Nov 2003 - Expand and clarify some comments and notes - * - Add version and copyright to help - * - Send help to stdout instead of stderr - * - Add some preemptive typecasts - * - Add L to constants in lseek() calls - * - Remove some debugging information in error messages - * - Use new data_type definition for zlib 1.2.1 - * - Simplify and unify file operations - * - Finish off gzip file in gztack() - * - Use deflatePrime() instead of adding empty blocks - * - Keep gzip file clean on appended file read errors - * - Use in-place rotate instead of auxiliary buffer - * (Why you ask? Because it was fun to write!) - * 1.2 11 Oct 2012 - Fix for proper z_const usage - * - Check for input buffer malloc failure - */ - -/* - gzappend takes a gzip file and appends to it, compressing files from the - command line or data from stdin. The gzip file is written to directly, to - avoid copying that file, in case it's large. Note that this results in the - unfriendly behavior that if gzappend fails, the gzip file is corrupted. - - This program was written to illustrate the use of the new Z_BLOCK option of - zlib 1.2.x's inflate() function. This option returns from inflate() at each - block boundary to facilitate locating and modifying the last block bit at - the start of the final deflate block. Also whether using Z_BLOCK or not, - another required feature of zlib 1.2.x is that inflate() now provides the - number of unused bits in the last input byte used. gzappend will not work - with versions of zlib earlier than 1.2.1. - - gzappend first decompresses the gzip file internally, discarding all but - the last 32K of uncompressed data, and noting the location of the last block - bit and the number of unused bits in the last byte of the compressed data. - The gzip trailer containing the CRC-32 and length of the uncompressed data - is verified. This trailer will be later overwritten. - - Then the last block bit is cleared by seeking back in the file and rewriting - the byte that contains it. Seeking forward, the last byte of the compressed - data is saved along with the number of unused bits to initialize deflate. - - A deflate process is initialized, using the last 32K of the uncompressed - data from the gzip file to initialize the dictionary. If the total - uncompressed data was less than 32K, then all of it is used to initialize - the dictionary. The deflate output bit buffer is also initialized with the - last bits from the original deflate stream. From here on, the data to - append is simply compressed using deflate, and written to the gzip file. - When that is complete, the new CRC-32 and uncompressed length are written - as the trailer of the gzip file. - */ - -#include -#include -#include -#include -#include -#include "zlib.h" - -#define local static -#define LGCHUNK 14 -#define CHUNK (1U << LGCHUNK) -#define DSIZE 32768U - -/* print an error message and terminate with extreme prejudice */ -local void bye(char *msg1, char *msg2) -{ - fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2); - exit(1); -} - -/* return the greatest common divisor of a and b using Euclid's algorithm, - modified to be fast when one argument much greater than the other, and - coded to avoid unnecessary swapping */ -local unsigned gcd(unsigned a, unsigned b) -{ - unsigned c; - - while (a && b) - if (a > b) { - c = b; - while (a - c >= c) - c <<= 1; - a -= c; - } - else { - c = a; - while (b - c >= c) - c <<= 1; - b -= c; - } - return a + b; -} - -/* rotate list[0..len-1] left by rot positions, in place */ -local void rotate(unsigned char *list, unsigned len, unsigned rot) -{ - unsigned char tmp; - unsigned cycles; - unsigned char *start, *last, *to, *from; - - /* normalize rot and handle degenerate cases */ - if (len < 2) return; - if (rot >= len) rot %= len; - if (rot == 0) return; - - /* pointer to last entry in list */ - last = list + (len - 1); - - /* do simple left shift by one */ - if (rot == 1) { - tmp = *list; - memmove(list, list + 1, len - 1); - *last = tmp; - return; - } - - /* do simple right shift by one */ - if (rot == len - 1) { - tmp = *last; - memmove(list + 1, list, len - 1); - *list = tmp; - return; - } - - /* otherwise do rotate as a set of cycles in place */ - cycles = gcd(len, rot); /* number of cycles */ - do { - start = from = list + cycles; /* start index is arbitrary */ - tmp = *from; /* save entry to be overwritten */ - for (;;) { - to = from; /* next step in cycle */ - from += rot; /* go right rot positions */ - if (from > last) from -= len; /* (pointer better not wrap) */ - if (from == start) break; /* all but one shifted */ - *to = *from; /* shift left */ - } - *to = tmp; /* complete the circle */ - } while (--cycles); -} - -/* structure for gzip file read operations */ -typedef struct { - int fd; /* file descriptor */ - int size; /* 1 << size is bytes in buf */ - unsigned left; /* bytes available at next */ - unsigned char *buf; /* buffer */ - z_const unsigned char *next; /* next byte in buffer */ - char *name; /* file name for error messages */ -} file; - -/* reload buffer */ -local int readin(file *in) -{ - int len; - - len = read(in->fd, in->buf, 1 << in->size); - if (len == -1) bye("error reading ", in->name); - in->left = (unsigned)len; - in->next = in->buf; - return len; -} - -/* read from file in, exit if end-of-file */ -local int readmore(file *in) -{ - if (readin(in) == 0) bye("unexpected end of ", in->name); - return 0; -} - -#define read1(in) (in->left == 0 ? readmore(in) : 0, \ - in->left--, *(in->next)++) - -/* skip over n bytes of in */ -local void skip(file *in, unsigned n) -{ - unsigned bypass; - - if (n > in->left) { - n -= in->left; - bypass = n & ~((1U << in->size) - 1); - if (bypass) { - if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1) - bye("seeking ", in->name); - n -= bypass; - } - readmore(in); - if (n > in->left) - bye("unexpected end of ", in->name); - } - in->left -= n; - in->next += n; -} - -/* read a four-byte unsigned integer, little-endian, from in */ -unsigned long read4(file *in) -{ - unsigned long val; - - val = read1(in); - val += (unsigned)read1(in) << 8; - val += (unsigned long)read1(in) << 16; - val += (unsigned long)read1(in) << 24; - return val; -} - -/* skip over gzip header */ -local void gzheader(file *in) -{ - int flags; - unsigned n; - - if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file"); - if (read1(in) != 8) bye("unknown compression method in", in->name); - flags = read1(in); - if (flags & 0xe0) bye("unknown header flags set in", in->name); - skip(in, 6); - if (flags & 4) { - n = read1(in); - n += (unsigned)(read1(in)) << 8; - skip(in, n); - } - if (flags & 8) while (read1(in) != 0) ; - if (flags & 16) while (read1(in) != 0) ; - if (flags & 2) skip(in, 2); -} - -/* decompress gzip file "name", return strm with a deflate stream ready to - continue compression of the data in the gzip file, and return a file - descriptor pointing to where to write the compressed data -- the deflate - stream is initialized to compress using level "level" */ -local int gzscan(char *name, z_stream *strm, int level) -{ - int ret, lastbit, left, full; - unsigned have; - unsigned long crc, tot; - unsigned char *window; - off_t lastoff, end; - file gz; - - /* open gzip file */ - gz.name = name; - gz.fd = open(name, O_RDWR, 0); - if (gz.fd == -1) bye("cannot open ", name); - gz.buf = malloc(CHUNK); - if (gz.buf == NULL) bye("out of memory", ""); - gz.size = LGCHUNK; - gz.left = 0; - - /* skip gzip header */ - gzheader(&gz); - - /* prepare to decompress */ - window = malloc(DSIZE); - if (window == NULL) bye("out of memory", ""); - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = inflateInit2(strm, -15); - if (ret != Z_OK) bye("out of memory", " or library mismatch"); - - /* decompress the deflate stream, saving append information */ - lastbit = 0; - lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; - left = 0; - strm->avail_in = gz.left; - strm->next_in = gz.next; - crc = crc32(0L, Z_NULL, 0); - have = full = 0; - do { - /* if needed, get more input */ - if (strm->avail_in == 0) { - readmore(&gz); - strm->avail_in = gz.left; - strm->next_in = gz.next; - } - - /* set up output to next available section of sliding window */ - strm->avail_out = DSIZE - have; - strm->next_out = window + have; - - /* inflate and check for errors */ - ret = inflate(strm, Z_BLOCK); - if (ret == Z_STREAM_ERROR) bye("internal stream error!", ""); - if (ret == Z_MEM_ERROR) bye("out of memory", ""); - if (ret == Z_DATA_ERROR) - bye("invalid compressed data--format violated in", name); - - /* update crc and sliding window pointer */ - crc = crc32(crc, window + have, DSIZE - have - strm->avail_out); - if (strm->avail_out) - have = DSIZE - strm->avail_out; - else { - have = 0; - full = 1; - } - - /* process end of block */ - if (strm->data_type & 128) { - if (strm->data_type & 64) - left = strm->data_type & 0x1f; - else { - lastbit = strm->data_type & 0x1f; - lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in; - } - } - } while (ret != Z_STREAM_END); - inflateEnd(strm); - gz.left = strm->avail_in; - gz.next = strm->next_in; - - /* save the location of the end of the compressed data */ - end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; - - /* check gzip trailer and save total for deflate */ - if (crc != read4(&gz)) - bye("invalid compressed data--crc mismatch in ", name); - tot = strm->total_out; - if ((tot & 0xffffffffUL) != read4(&gz)) - bye("invalid compressed data--length mismatch in", name); - - /* if not at end of file, warn */ - if (gz.left || readin(&gz)) - fprintf(stderr, - "gzappend warning: junk at end of gzip file overwritten\n"); - - /* clear last block bit */ - lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET); - if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); - *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7))); - lseek(gz.fd, -1L, SEEK_CUR); - if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name); - - /* if window wrapped, build dictionary from window by rotating */ - if (full) { - rotate(window, DSIZE, have); - have = DSIZE; - } - - /* set up deflate stream with window, crc, total_in, and leftover bits */ - ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); - if (ret != Z_OK) bye("out of memory", ""); - deflateSetDictionary(strm, window, have); - strm->adler = crc; - strm->total_in = tot; - if (left) { - lseek(gz.fd, --end, SEEK_SET); - if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); - deflatePrime(strm, 8 - left, *gz.buf); - } - lseek(gz.fd, end, SEEK_SET); - - /* clean up and return */ - free(window); - free(gz.buf); - return gz.fd; -} - -/* append file "name" to gzip file gd using deflate stream strm -- if last - is true, then finish off the deflate stream at the end */ -local void gztack(char *name, int gd, z_stream *strm, int last) -{ - int fd, len, ret; - unsigned left; - unsigned char *in, *out; - - /* open file to compress and append */ - fd = 0; - if (name != NULL) { - fd = open(name, O_RDONLY, 0); - if (fd == -1) - fprintf(stderr, "gzappend warning: %s not found, skipping ...\n", - name); - } - - /* allocate buffers */ - in = malloc(CHUNK); - out = malloc(CHUNK); - if (in == NULL || out == NULL) bye("out of memory", ""); - - /* compress input file and append to gzip file */ - do { - /* get more input */ - len = read(fd, in, CHUNK); - if (len == -1) { - fprintf(stderr, - "gzappend warning: error reading %s, skipping rest ...\n", - name); - len = 0; - } - strm->avail_in = (unsigned)len; - strm->next_in = in; - if (len) strm->adler = crc32(strm->adler, in, (unsigned)len); - - /* compress and write all available output */ - do { - strm->avail_out = CHUNK; - strm->next_out = out; - ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH); - left = CHUNK - strm->avail_out; - while (left) { - len = write(gd, out + CHUNK - strm->avail_out - left, left); - if (len == -1) bye("writing gzip file", ""); - left -= (unsigned)len; - } - } while (strm->avail_out == 0 && ret != Z_STREAM_END); - } while (len != 0); - - /* write trailer after last entry */ - if (last) { - deflateEnd(strm); - out[0] = (unsigned char)(strm->adler); - out[1] = (unsigned char)(strm->adler >> 8); - out[2] = (unsigned char)(strm->adler >> 16); - out[3] = (unsigned char)(strm->adler >> 24); - out[4] = (unsigned char)(strm->total_in); - out[5] = (unsigned char)(strm->total_in >> 8); - out[6] = (unsigned char)(strm->total_in >> 16); - out[7] = (unsigned char)(strm->total_in >> 24); - len = 8; - do { - ret = write(gd, out + 8 - len, len); - if (ret == -1) bye("writing gzip file", ""); - len -= ret; - } while (len); - close(gd); - } - - /* clean up and return */ - free(out); - free(in); - if (fd > 0) close(fd); -} - -/* process the compression level option if present, scan the gzip file, and - append the specified files, or append the data from stdin if no other file - names are provided on the command line -- the gzip file must be writable - and seekable */ -int main(int argc, char **argv) -{ - int gd, level; - z_stream strm; - - /* ignore command name */ - argc--; argv++; - - /* provide usage if no arguments */ - if (*argv == NULL) { - printf( - "gzappend 1.2 (11 Oct 2012) Copyright (C) 2003, 2012 Mark Adler\n" - ); - printf( - "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n"); - return 0; - } - - /* set compression level */ - level = Z_DEFAULT_COMPRESSION; - if (argv[0][0] == '-') { - if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0) - bye("invalid compression level", ""); - level = argv[0][1] - '0'; - if (*++argv == NULL) bye("no gzip file name after options", ""); - } - - /* prepare to append to gzip file */ - gd = gzscan(*argv++, &strm, level); - - /* append files on command line, or from stdin if none */ - if (*argv == NULL) - gztack(NULL, gd, &strm, 1); - else - do { - gztack(*argv, gd, &strm, argv[1] == NULL); - } while (*++argv != NULL); - return 0; -} diff --git a/third_party/zlib/examples/gzjoin.c b/third_party/zlib/examples/gzjoin.c deleted file mode 100644 index 89e8098..0000000 --- a/third_party/zlib/examples/gzjoin.c +++ /dev/null @@ -1,449 +0,0 @@ -/* gzjoin -- command to join gzip files into one gzip file - - Copyright (C) 2004, 2005, 2012 Mark Adler, all rights reserved - version 1.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* - * Change history: - * - * 1.0 11 Dec 2004 - First version - * 1.1 12 Jun 2005 - Changed ssize_t to long for portability - * 1.2 14 Aug 2012 - Clean up for z_const usage - */ - -/* - gzjoin takes one or more gzip files on the command line and writes out a - single gzip file that will uncompress to the concatenation of the - uncompressed data from the individual gzip files. gzjoin does this without - having to recompress any of the data and without having to calculate a new - crc32 for the concatenated uncompressed data. gzjoin does however have to - decompress all of the input data in order to find the bits in the compressed - data that need to be modified to concatenate the streams. - - gzjoin does not do an integrity check on the input gzip files other than - checking the gzip header and decompressing the compressed data. They are - otherwise assumed to be complete and correct. - - Each joint between gzip files removes at least 18 bytes of previous trailer - and subsequent header, and inserts an average of about three bytes to the - compressed data in order to connect the streams. The output gzip file - has a minimal ten-byte gzip header with no file name or modification time. - - This program was written to illustrate the use of the Z_BLOCK option of - inflate() and the crc32_combine() function. gzjoin will not compile with - versions of zlib earlier than 1.2.3. - */ - -#include /* fputs(), fprintf(), fwrite(), putc() */ -#include /* exit(), malloc(), free() */ -#include /* open() */ -#include /* close(), read(), lseek() */ -#include "zlib.h" - /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */ - -#define local static - -/* exit with an error (return a value to allow use in an expression) */ -local int bail(char *why1, char *why2) -{ - fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2); - exit(1); - return 0; -} - -/* -- simple buffered file input with access to the buffer -- */ - -#define CHUNK 32768 /* must be a power of two and fit in unsigned */ - -/* bin buffered input file type */ -typedef struct { - char *name; /* name of file for error messages */ - int fd; /* file descriptor */ - unsigned left; /* bytes remaining at next */ - unsigned char *next; /* next byte to read */ - unsigned char *buf; /* allocated buffer of length CHUNK */ -} bin; - -/* close a buffered file and free allocated memory */ -local void bclose(bin *in) -{ - if (in != NULL) { - if (in->fd != -1) - close(in->fd); - if (in->buf != NULL) - free(in->buf); - free(in); - } -} - -/* open a buffered file for input, return a pointer to type bin, or NULL on - failure */ -local bin *bopen(char *name) -{ - bin *in; - - in = malloc(sizeof(bin)); - if (in == NULL) - return NULL; - in->buf = malloc(CHUNK); - in->fd = open(name, O_RDONLY, 0); - if (in->buf == NULL || in->fd == -1) { - bclose(in); - return NULL; - } - in->left = 0; - in->next = in->buf; - in->name = name; - return in; -} - -/* load buffer from file, return -1 on read error, 0 or 1 on success, with - 1 indicating that end-of-file was reached */ -local int bload(bin *in) -{ - long len; - - if (in == NULL) - return -1; - if (in->left != 0) - return 0; - in->next = in->buf; - do { - len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); - if (len < 0) - return -1; - in->left += (unsigned)len; - } while (len != 0 && in->left < CHUNK); - return len == 0 ? 1 : 0; -} - -/* get a byte from the file, bail if end of file */ -#define bget(in) (in->left ? 0 : bload(in), \ - in->left ? (in->left--, *(in->next)++) : \ - bail("unexpected end of file on ", in->name)) - -/* get a four-byte little-endian unsigned integer from file */ -local unsigned long bget4(bin *in) -{ - unsigned long val; - - val = bget(in); - val += (unsigned long)(bget(in)) << 8; - val += (unsigned long)(bget(in)) << 16; - val += (unsigned long)(bget(in)) << 24; - return val; -} - -/* skip bytes in file */ -local void bskip(bin *in, unsigned skip) -{ - /* check pointer */ - if (in == NULL) - return; - - /* easy case -- skip bytes in buffer */ - if (skip <= in->left) { - in->left -= skip; - in->next += skip; - return; - } - - /* skip what's in buffer, discard buffer contents */ - skip -= in->left; - in->left = 0; - - /* seek past multiples of CHUNK bytes */ - if (skip > CHUNK) { - unsigned left; - - left = skip & (CHUNK - 1); - if (left == 0) { - /* exact number of chunks: seek all the way minus one byte to check - for end-of-file with a read */ - lseek(in->fd, skip - 1, SEEK_CUR); - if (read(in->fd, in->buf, 1) != 1) - bail("unexpected end of file on ", in->name); - return; - } - - /* skip the integral chunks, update skip with remainder */ - lseek(in->fd, skip - left, SEEK_CUR); - skip = left; - } - - /* read more input and skip remainder */ - bload(in); - if (skip > in->left) - bail("unexpected end of file on ", in->name); - in->left -= skip; - in->next += skip; -} - -/* -- end of buffered input functions -- */ - -/* skip the gzip header from file in */ -local void gzhead(bin *in) -{ - int flags; - - /* verify gzip magic header and compression method */ - if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8) - bail(in->name, " is not a valid gzip file"); - - /* get and verify flags */ - flags = bget(in); - if ((flags & 0xe0) != 0) - bail("unknown reserved bits set in ", in->name); - - /* skip modification time, extra flags, and os */ - bskip(in, 6); - - /* skip extra field if present */ - if (flags & 4) { - unsigned len; - - len = bget(in); - len += (unsigned)(bget(in)) << 8; - bskip(in, len); - } - - /* skip file name if present */ - if (flags & 8) - while (bget(in) != 0) - ; - - /* skip comment if present */ - if (flags & 16) - while (bget(in) != 0) - ; - - /* skip header crc if present */ - if (flags & 2) - bskip(in, 2); -} - -/* write a four-byte little-endian unsigned integer to out */ -local void put4(unsigned long val, FILE *out) -{ - putc(val & 0xff, out); - putc((val >> 8) & 0xff, out); - putc((val >> 16) & 0xff, out); - putc((val >> 24) & 0xff, out); -} - -/* Load up zlib stream from buffered input, bail if end of file */ -local void zpull(z_streamp strm, bin *in) -{ - if (in->left == 0) - bload(in); - if (in->left == 0) - bail("unexpected end of file on ", in->name); - strm->avail_in = in->left; - strm->next_in = in->next; -} - -/* Write header for gzip file to out and initialize trailer. */ -local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out) -{ - fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); - *crc = crc32(0L, Z_NULL, 0); - *tot = 0; -} - -/* Copy the compressed data from name, zeroing the last block bit of the last - block if clr is true, and adding empty blocks as needed to get to a byte - boundary. If clr is false, then the last block becomes the last block of - the output, and the gzip trailer is written. crc and tot maintains the - crc and length (modulo 2^32) of the output for the trailer. The resulting - gzip file is written to out. gzinit() must be called before the first call - of gzcopy() to write the gzip header and to initialize crc and tot. */ -local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, - FILE *out) -{ - int ret; /* return value from zlib functions */ - int pos; /* where the "last block" bit is in byte */ - int last; /* true if processing the last block */ - bin *in; /* buffered input file */ - unsigned char *start; /* start of compressed data in buffer */ - unsigned char *junk; /* buffer for uncompressed data -- discarded */ - z_off_t len; /* length of uncompressed data (support > 4 GB) */ - z_stream strm; /* zlib inflate stream */ - - /* open gzip file and skip header */ - in = bopen(name); - if (in == NULL) - bail("could not open ", name); - gzhead(in); - - /* allocate buffer for uncompressed data and initialize raw inflate - stream */ - junk = malloc(CHUNK); - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -15); - if (junk == NULL || ret != Z_OK) - bail("out of memory", ""); - - /* inflate and copy compressed data, clear last-block bit if requested */ - len = 0; - zpull(&strm, in); - start = in->next; - last = start[0] & 1; - if (last && clr) - start[0] &= ~1; - strm.avail_out = 0; - for (;;) { - /* if input used and output done, write used input and get more */ - if (strm.avail_in == 0 && strm.avail_out != 0) { - fwrite(start, 1, strm.next_in - start, out); - start = in->buf; - in->left = 0; - zpull(&strm, in); - } - - /* decompress -- return early when end-of-block reached */ - strm.avail_out = CHUNK; - strm.next_out = junk; - ret = inflate(&strm, Z_BLOCK); - switch (ret) { - case Z_MEM_ERROR: - bail("out of memory", ""); - case Z_DATA_ERROR: - bail("invalid compressed data in ", in->name); - } - - /* update length of uncompressed data */ - len += CHUNK - strm.avail_out; - - /* check for block boundary (only get this when block copied out) */ - if (strm.data_type & 128) { - /* if that was the last block, then done */ - if (last) - break; - - /* number of unused bits in last byte */ - pos = strm.data_type & 7; - - /* find the next last-block bit */ - if (pos != 0) { - /* next last-block bit is in last used byte */ - pos = 0x100 >> pos; - last = strm.next_in[-1] & pos; - if (last && clr) - in->buf[strm.next_in - in->buf - 1] &= ~pos; - } - else { - /* next last-block bit is in next unused byte */ - if (strm.avail_in == 0) { - /* don't have that byte yet -- get it */ - fwrite(start, 1, strm.next_in - start, out); - start = in->buf; - in->left = 0; - zpull(&strm, in); - } - last = strm.next_in[0] & 1; - if (last && clr) - in->buf[strm.next_in - in->buf] &= ~1; - } - } - } - - /* update buffer with unused input */ - in->left = strm.avail_in; - in->next = in->buf + (strm.next_in - in->buf); - - /* copy used input, write empty blocks to get to byte boundary */ - pos = strm.data_type & 7; - fwrite(start, 1, in->next - start - 1, out); - last = in->next[-1]; - if (pos == 0 || !clr) - /* already at byte boundary, or last file: write last byte */ - putc(last, out); - else { - /* append empty blocks to last byte */ - last &= ((0x100 >> pos) - 1); /* assure unused bits are zero */ - if (pos & 1) { - /* odd -- append an empty stored block */ - putc(last, out); - if (pos == 1) - putc(0, out); /* two more bits in block header */ - fwrite("\0\0\xff\xff", 1, 4, out); - } - else { - /* even -- append 1, 2, or 3 empty fixed blocks */ - switch (pos) { - case 6: - putc(last | 8, out); - last = 0; - case 4: - putc(last | 0x20, out); - last = 0; - case 2: - putc(last | 0x80, out); - putc(0, out); - } - } - } - - /* update crc and tot */ - *crc = crc32_combine(*crc, bget4(in), len); - *tot += (unsigned long)len; - - /* clean up */ - inflateEnd(&strm); - free(junk); - bclose(in); - - /* write trailer if this is the last gzip file */ - if (!clr) { - put4(*crc, out); - put4(*tot, out); - } -} - -/* join the gzip files on the command line, write result to stdout */ -int main(int argc, char **argv) -{ - unsigned long crc, tot; /* running crc and total uncompressed length */ - - /* skip command name */ - argc--; - argv++; - - /* show usage if no arguments */ - if (argc == 0) { - fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n", - stderr); - return 0; - } - - /* join gzip files on command line and write to stdout */ - gzinit(&crc, &tot, stdout); - while (argc--) - gzcopy(*argv++, argc, &crc, &tot, stdout); - - /* done */ - return 0; -} diff --git a/third_party/zlib/examples/gzlog.c b/third_party/zlib/examples/gzlog.c deleted file mode 100644 index da1b02e..0000000 --- a/third_party/zlib/examples/gzlog.c +++ /dev/null @@ -1,1061 +0,0 @@ -/* - * gzlog.c - * Copyright (C) 2004, 2008, 2012, 2016, 2019 Mark Adler, all rights reserved - * For conditions of distribution and use, see copyright notice in gzlog.h - * version 2.3, 25 May 2019 - */ - -/* - gzlog provides a mechanism for frequently appending short strings to a gzip - file that is efficient both in execution time and compression ratio. The - strategy is to write the short strings in an uncompressed form to the end of - the gzip file, only compressing when the amount of uncompressed data has - reached a given threshold. - - gzlog also provides protection against interruptions in the process due to - system crashes. The status of the operation is recorded in an extra field - in the gzip file, and is only updated once the gzip file is brought to a - valid state. The last data to be appended or compressed is saved in an - auxiliary file, so that if the operation is interrupted, it can be completed - the next time an append operation is attempted. - - gzlog maintains another auxiliary file with the last 32K of data from the - compressed portion, which is preloaded for the compression of the subsequent - data. This minimizes the impact to the compression ratio of appending. - */ - -/* - Operations Concept: - - Files (log name "foo"): - foo.gz -- gzip file with the complete log - foo.add -- last message to append or last data to compress - foo.dict -- dictionary of the last 32K of data for next compression - foo.temp -- temporary dictionary file for compression after this one - foo.lock -- lock file for reading and writing the other files - foo.repairs -- log file for log file recovery operations (not compressed) - - gzip file structure: - - fixed-length (no file name) header with extra field (see below) - - compressed data ending initially with empty stored block - - uncompressed data filling out originally empty stored block and - subsequent stored blocks as needed (16K max each) - - gzip trailer - - no junk at end (no other gzip streams) - - When appending data, the information in the first three items above plus the - foo.add file are sufficient to recover an interrupted append operation. The - extra field has the necessary information to restore the start of the last - stored block and determine where to append the data in the foo.add file, as - well as the crc and length of the gzip data before the append operation. - - The foo.add file is created before the gzip file is marked for append, and - deleted after the gzip file is marked as complete. So if the append - operation is interrupted, the data to add will still be there. If due to - some external force, the foo.add file gets deleted between when the append - operation was interrupted and when recovery is attempted, the gzip file will - still be restored, but without the appended data. - - When compressing data, the information in the first two items above plus the - foo.add file are sufficient to recover an interrupted compress operation. - The extra field has the necessary information to find the end of the - compressed data, and contains both the crc and length of just the compressed - data and of the complete set of data including the contents of the foo.add - file. - - Again, the foo.add file is maintained during the compress operation in case - of an interruption. If in the unlikely event the foo.add file with the data - to be compressed is missing due to some external force, a gzip file with - just the previous compressed data will be reconstructed. In this case, all - of the data that was to be compressed is lost (approximately one megabyte). - This will not occur if all that happened was an interruption of the compress - operation. - - The third state that is marked is the replacement of the old dictionary with - the new dictionary after a compress operation. Once compression is - complete, the gzip file is marked as being in the replace state. This - completes the gzip file, so an interrupt after being so marked does not - result in recompression. Then the dictionary file is replaced, and the gzip - file is marked as completed. This state prevents the possibility of - restarting compression with the wrong dictionary file. - - All three operations are wrapped by a lock/unlock procedure. In order to - gain exclusive access to the log files, first a foo.lock file must be - exclusively created. When all operations are complete, the lock is - released by deleting the foo.lock file. If when attempting to create the - lock file, it already exists and the modify time of the lock file is more - than five minutes old (set by the PATIENCE define below), then the old - lock file is considered stale and deleted, and the exclusive creation of - the lock file is retried. To assure that there are no false assessments - of the staleness of the lock file, the operations periodically touch the - lock file to update the modified date. - - Following is the definition of the extra field with all of the information - required to enable the above append and compress operations and their - recovery if interrupted. Multi-byte values are stored little endian - (consistent with the gzip format). File pointers are eight bytes long. - The crc's and lengths for the gzip trailer are four bytes long. (Note that - the length at the end of a gzip file is used for error checking only, and - for large files is actually the length modulo 2^32.) The stored block - length is two bytes long. The gzip extra field two-byte identification is - "ap" for append. It is assumed that writing the extra field to the file is - an "atomic" operation. That is, either all of the extra field is written - to the file, or none of it is, if the operation is interrupted right at the - point of updating the extra field. This is a reasonable assumption, since - the extra field is within the first 52 bytes of the file, which is smaller - than any expected block size for a mass storage device (usually 512 bytes or - larger). - - Extra field (35 bytes): - - Pointer to first stored block length -- this points to the two-byte length - of the first stored block, which is followed by the two-byte, one's - complement of that length. The stored block length is preceded by the - three-bit header of the stored block, which is the actual start of the - stored block in the deflate format. See the bit offset field below. - - Pointer to the last stored block length. This is the same as above, but - for the last stored block of the uncompressed data in the gzip file. - Initially this is the same as the first stored block length pointer. - When the stored block gets to 16K (see the MAX_STORE define), then a new - stored block as added, at which point the last stored block length pointer - is different from the first stored block length pointer. When they are - different, the first bit of the last stored block header is eight bits, or - one byte back from the block length. - - Compressed data crc and length. This is the crc and length of the data - that is in the compressed portion of the deflate stream. These are used - only in the event that the foo.add file containing the data to compress is - lost after a compress operation is interrupted. - - Total data crc and length. This is the crc and length of all of the data - stored in the gzip file, compressed and uncompressed. It is used to - reconstruct the gzip trailer when compressing, as well as when recovering - interrupted operations. - - Final stored block length. This is used to quickly find where to append, - and allows the restoration of the original final stored block state when - an append operation is interrupted. - - First stored block start as the number of bits back from the final stored - block first length byte. This value is in the range of 3..10, and is - stored as the low three bits of the final byte of the extra field after - subtracting three (0..7). This allows the last-block bit of the stored - block header to be updated when a new stored block is added, for the case - when the first stored block and the last stored block are the same. (When - they are different, the numbers of bits back is known to be eight.) This - also allows for new compressed data to be appended to the old compressed - data in the compress operation, overwriting the previous first stored - block, or for the compressed data to be terminated and a valid gzip file - reconstructed on the off chance that a compression operation was - interrupted and the data to compress in the foo.add file was deleted. - - The operation in process. This is the next two bits in the last byte (the - bits under the mask 0x18). The are interpreted as 0: nothing in process, - 1: append in process, 2: compress in process, 3: replace in process. - - The top three bits of the last byte in the extra field are reserved and - are currently set to zero. - - Main procedure: - - Exclusively create the foo.lock file using the O_CREAT and O_EXCL modes of - the system open() call. If the modify time of an existing lock file is - more than PATIENCE seconds old, then the lock file is deleted and the - exclusive create is retried. - - Load the extra field from the foo.gz file, and see if an operation was in - progress but not completed. If so, apply the recovery procedure below. - - Perform the append procedure with the provided data. - - If the uncompressed data in the foo.gz file is 1MB or more, apply the - compress procedure. - - Delete the foo.lock file. - - Append procedure: - - Put what to append in the foo.add file so that the operation can be - restarted if this procedure is interrupted. - - Mark the foo.gz extra field with the append operation in progress. - + Restore the original last-block bit and stored block length of the last - stored block from the information in the extra field, in case a previous - append operation was interrupted. - - Append the provided data to the last stored block, creating new stored - blocks as needed and updating the stored blocks last-block bits and - lengths. - - Update the crc and length with the new data, and write the gzip trailer. - - Write over the extra field (with a single write operation) with the new - pointers, lengths, and crc's, and mark the gzip file as not in process. - Though there is still a foo.add file, it will be ignored since nothing - is in process. If a foo.add file is leftover from a previously - completed operation, it is truncated when writing new data to it. - - Delete the foo.add file. - - Compress and replace procedures: - - Read all of the uncompressed data in the stored blocks in foo.gz and write - it to foo.add. Also write foo.temp with the last 32K of that data to - provide a dictionary for the next invocation of this procedure. - - Rewrite the extra field marking foo.gz with a compression in process. - * If there is no data provided to compress (due to a missing foo.add file - when recovering), reconstruct and truncate the foo.gz file to contain - only the previous compressed data and proceed to the step after the next - one. Otherwise ... - - Compress the data with the dictionary in foo.dict, and write to the - foo.gz file starting at the bit immediately following the last previously - compressed block. If there is no foo.dict, proceed anyway with the - compression at slightly reduced efficiency. (For the foo.dict file to be - missing requires some external failure beyond simply the interruption of - a compress operation.) During this process, the foo.lock file is - periodically touched to assure that that file is not considered stale by - another process before we're done. The deflation is terminated with a - non-last empty static block (10 bits long), that is then located and - written over by a last-bit-set empty stored block. - - Append the crc and length of the data in the gzip file (previously - calculated during the append operations). - - Write over the extra field with the updated stored block offsets, bits - back, crc's, and lengths, and mark foo.gz as in process for a replacement - of the dictionary. - @ Delete the foo.add file. - - Replace foo.dict with foo.temp. - - Write over the extra field, marking foo.gz as complete. - - Recovery procedure: - - If not a replace recovery, read in the foo.add file, and provide that data - to the appropriate recovery below. If there is no foo.add file, provide - a zero data length to the recovery. In that case, the append recovery - restores the foo.gz to the previous compressed + uncompressed data state. - For the compress recovery, a missing foo.add file results in foo.gz being - restored to the previous compressed-only data state. - - Append recovery: - - Pick up append at + step above - - Compress recovery: - - Pick up compress at * step above - - Replace recovery: - - Pick up compress at @ step above - - Log the repair with a date stamp in foo.repairs - */ - -#include -#include /* rename, fopen, fprintf, fclose */ -#include /* malloc, free */ -#include /* strlen, strrchr, strcpy, strncpy, strcmp */ -#include /* open */ -#include /* lseek, read, write, close, unlink, sleep, */ - /* ftruncate, fsync */ -#include /* errno */ -#include /* time, ctime */ -#include /* stat */ -#include /* utimes */ -#include "zlib.h" /* crc32 */ - -#include "gzlog.h" /* header for external access */ - -#define local static -typedef unsigned int uint; -typedef unsigned long ulong; - -/* Macro for debugging to deterministically force recovery operations */ -#ifdef GZLOG_DEBUG - #include /* longjmp */ - jmp_buf gzlog_jump; /* where to go back to */ - int gzlog_bail = 0; /* which point to bail at (1..8) */ - int gzlog_count = -1; /* number of times through to wait */ -# define BAIL(n) do { if (n == gzlog_bail && gzlog_count-- == 0) \ - longjmp(gzlog_jump, gzlog_bail); } while (0) -#else -# define BAIL(n) -#endif - -/* how old the lock file can be in seconds before considering it stale */ -#define PATIENCE 300 - -/* maximum stored block size in Kbytes -- must be in 1..63 */ -#define MAX_STORE 16 - -/* number of stored Kbytes to trigger compression (must be >= 32 to allow - dictionary construction, and <= 204 * MAX_STORE, in order for >> 10 to - discard the stored block headers contribution of five bytes each) */ -#define TRIGGER 1024 - -/* size of a deflate dictionary (this cannot be changed) */ -#define DICT 32768U - -/* values for the operation (2 bits) */ -#define NO_OP 0 -#define APPEND_OP 1 -#define COMPRESS_OP 2 -#define REPLACE_OP 3 - -/* macros to extract little-endian integers from an unsigned byte buffer */ -#define PULL2(p) ((p)[0]+((uint)((p)[1])<<8)) -#define PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16)) -#define PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32)) - -/* macros to store integers into a byte buffer in little-endian order */ -#define PUT2(p,a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0) -#define PUT4(p,a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0) -#define PUT8(p,a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0) - -/* internal structure for log information */ -#define LOGID "\106\035\172" /* should be three non-zero characters */ -struct log { - char id[4]; /* contains LOGID to detect inadvertent overwrites */ - int fd; /* file descriptor for .gz file, opened read/write */ - char *path; /* allocated path, e.g. "/var/log/foo" or "foo" */ - char *end; /* end of path, for appending suffices such as ".gz" */ - off_t first; /* offset of first stored block first length byte */ - int back; /* location of first block id in bits back from first */ - uint stored; /* bytes currently in last stored block */ - off_t last; /* offset of last stored block first length byte */ - ulong ccrc; /* crc of compressed data */ - ulong clen; /* length (modulo 2^32) of compressed data */ - ulong tcrc; /* crc of total data */ - ulong tlen; /* length (modulo 2^32) of total data */ - time_t lock; /* last modify time of our lock file */ -}; - -/* gzip header for gzlog */ -local unsigned char log_gzhead[] = { - 0x1f, 0x8b, /* magic gzip id */ - 8, /* compression method is deflate */ - 4, /* there is an extra field (no file name) */ - 0, 0, 0, 0, /* no modification time provided */ - 0, 0xff, /* no extra flags, no OS specified */ - 39, 0, 'a', 'p', 35, 0 /* extra field with "ap" subfield */ - /* 35 is EXTRA, 39 is EXTRA + 4 */ -}; - -#define HEAD sizeof(log_gzhead) /* should be 16 */ - -/* initial gzip extra field content (52 == HEAD + EXTRA + 1) */ -local unsigned char log_gzext[] = { - 52, 0, 0, 0, 0, 0, 0, 0, /* offset of first stored block length */ - 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */ - 0, 0, 0, 0, 0, 0, 0, 0, /* compressed data crc and length */ - 0, 0, 0, 0, 0, 0, 0, 0, /* total data crc and length */ - 0, 0, /* final stored block data length */ - 5 /* op is NO_OP, last bit 8 bits back */ -}; - -#define EXTRA sizeof(log_gzext) /* should be 35 */ - -/* initial gzip data and trailer */ -local unsigned char log_gzbody[] = { - 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ - 0, 0, 0, 0, /* crc */ - 0, 0, 0, 0 /* uncompressed length */ -}; - -#define BODY sizeof(log_gzbody) - -/* Exclusively create foo.lock in order to negotiate exclusive access to the - foo.* files. If the modify time of an existing lock file is greater than - PATIENCE seconds in the past, then consider the lock file to have been - abandoned, delete it, and try the exclusive create again. Save the lock - file modify time for verification of ownership. Return 0 on success, or -1 - on failure, usually due to an access restriction or invalid path. Note that - if stat() or unlink() fails, it may be due to another process noticing the - abandoned lock file a smidge sooner and deleting it, so those are not - flagged as an error. */ -local int log_lock(struct log *log) -{ - int fd; - struct stat st; - - strcpy(log->end, ".lock"); - while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { - if (errno != EEXIST) - return -1; - if (stat(log->path, &st) == 0 && time(NULL) - st.st_mtime > PATIENCE) { - unlink(log->path); - continue; - } - sleep(2); /* relinquish the CPU for two seconds while waiting */ - } - close(fd); - if (stat(log->path, &st) == 0) - log->lock = st.st_mtime; - return 0; -} - -/* Update the modify time of the lock file to now, in order to prevent another - task from thinking that the lock is stale. Save the lock file modify time - for verification of ownership. */ -local void log_touch(struct log *log) -{ - struct stat st; - - strcpy(log->end, ".lock"); - utimes(log->path, NULL); - if (stat(log->path, &st) == 0) - log->lock = st.st_mtime; -} - -/* Check the log file modify time against what is expected. Return true if - this is not our lock. If it is our lock, touch it to keep it. */ -local int log_check(struct log *log) -{ - struct stat st; - - strcpy(log->end, ".lock"); - if (stat(log->path, &st) || st.st_mtime != log->lock) - return 1; - log_touch(log); - return 0; -} - -/* Unlock a previously acquired lock, but only if it's ours. */ -local void log_unlock(struct log *log) -{ - if (log_check(log)) - return; - strcpy(log->end, ".lock"); - unlink(log->path); - log->lock = 0; -} - -/* Check the gzip header and read in the extra field, filling in the values in - the log structure. Return op on success or -1 if the gzip header was not as - expected. op is the current operation in progress last written to the extra - field. This assumes that the gzip file has already been opened, with the - file descriptor log->fd. */ -local int log_head(struct log *log) -{ - int op; - unsigned char buf[HEAD + EXTRA]; - - if (lseek(log->fd, 0, SEEK_SET) < 0 || - read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || - memcmp(buf, log_gzhead, HEAD)) { - return -1; - } - log->first = PULL8(buf + HEAD); - log->last = PULL8(buf + HEAD + 8); - log->ccrc = PULL4(buf + HEAD + 16); - log->clen = PULL4(buf + HEAD + 20); - log->tcrc = PULL4(buf + HEAD + 24); - log->tlen = PULL4(buf + HEAD + 28); - log->stored = PULL2(buf + HEAD + 32); - log->back = 3 + (buf[HEAD + 34] & 7); - op = (buf[HEAD + 34] >> 3) & 3; - return op; -} - -/* Write over the extra field contents, marking the operation as op. Use fsync - to assure that the device is written to, and in the requested order. This - operation, and only this operation, is assumed to be atomic in order to - assure that the log is recoverable in the event of an interruption at any - point in the process. Return -1 if the write to foo.gz failed. */ -local int log_mark(struct log *log, int op) -{ - int ret; - unsigned char ext[EXTRA]; - - PUT8(ext, log->first); - PUT8(ext + 8, log->last); - PUT4(ext + 16, log->ccrc); - PUT4(ext + 20, log->clen); - PUT4(ext + 24, log->tcrc); - PUT4(ext + 28, log->tlen); - PUT2(ext + 32, log->stored); - ext[34] = log->back - 3 + (op << 3); - fsync(log->fd); - ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || - write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0; - fsync(log->fd); - return ret; -} - -/* Rewrite the last block header bits and subsequent zero bits to get to a byte - boundary, setting the last block bit if last is true, and then write the - remainder of the stored block header (length and one's complement). Leave - the file pointer after the end of the last stored block data. Return -1 if - there is a read or write failure on the foo.gz file */ -local int log_last(struct log *log, int last) -{ - int back, len, mask; - unsigned char buf[6]; - - /* determine the locations of the bytes and bits to modify */ - back = log->last == log->first ? log->back : 8; - len = back > 8 ? 2 : 1; /* bytes back from log->last */ - mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */ - - /* get the byte to modify (one or two back) into buf[0] -- don't need to - read the byte if the last-bit is eight bits back, since in that case - the entire byte will be modified */ - buf[0] = 0; - if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 || - read(log->fd, buf, 1) != 1)) - return -1; - - /* change the last-bit of the last stored block as requested -- note - that all bits above the last-bit are set to zero, per the type bits - of a stored block being 00 and per the convention that the bits to - bring the stream to a byte boundary are also zeros */ - buf[1] = 0; - buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0); - - /* write the modified stored block header and lengths, move the file - pointer to after the last stored block data */ - PUT2(buf + 2, log->stored); - PUT2(buf + 4, log->stored ^ 0xffff); - return lseek(log->fd, log->last - len, SEEK_SET) < 0 || - write(log->fd, buf + 2 - len, len + 4) != len + 4 || - lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0; -} - -/* Append len bytes from data to the locked and open log file. len may be zero - if recovering and no .add file was found. In that case, the previous state - of the foo.gz file is restored. The data is appended uncompressed in - deflate stored blocks. Return -1 if there was an error reading or writing - the foo.gz file. */ -local int log_append(struct log *log, unsigned char *data, size_t len) -{ - uint put; - off_t end; - unsigned char buf[8]; - - /* set the last block last-bit and length, in case recovering an - interrupted append, then position the file pointer to append to the - block */ - if (log_last(log, 1)) - return -1; - - /* append, adding stored blocks and updating the offset of the last stored - block as needed, and update the total crc and length */ - while (len) { - /* append as much as we can to the last block */ - put = (MAX_STORE << 10) - log->stored; - if (put > len) - put = (uint)len; - if (put) { - if (write(log->fd, data, put) != put) - return -1; - BAIL(1); - log->tcrc = crc32(log->tcrc, data, put); - log->tlen += put; - log->stored += put; - data += put; - len -= put; - } - - /* if we need to, add a new empty stored block */ - if (len) { - /* mark current block as not last */ - if (log_last(log, 0)) - return -1; - - /* point to new, empty stored block */ - log->last += 4 + log->stored + 1; - log->stored = 0; - } - - /* mark last block as last, update its length */ - if (log_last(log, 1)) - return -1; - BAIL(2); - } - - /* write the new crc and length trailer, and truncate just in case (could - be recovering from partial append with a missing foo.add file) */ - PUT4(buf, log->tcrc); - PUT4(buf + 4, log->tlen); - if (write(log->fd, buf, 8) != 8 || - (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) - return -1; - - /* write the extra field, marking the log file as done, delete .add file */ - if (log_mark(log, NO_OP)) - return -1; - strcpy(log->end, ".add"); - unlink(log->path); /* ignore error, since may not exist */ - return 0; -} - -/* Replace the foo.dict file with the foo.temp file. Also delete the foo.add - file, since the compress operation may have been interrupted before that was - done. Returns 1 if memory could not be allocated, or -1 if reading or - writing foo.gz fails, or if the rename fails for some reason other than - foo.temp not existing. foo.temp not existing is a permitted error, since - the replace operation may have been interrupted after the rename is done, - but before foo.gz is marked as complete. */ -local int log_replace(struct log *log) -{ - int ret; - char *dest; - - /* delete foo.add file */ - strcpy(log->end, ".add"); - unlink(log->path); /* ignore error, since may not exist */ - BAIL(3); - - /* rename foo.name to foo.dict, replacing foo.dict if it exists */ - strcpy(log->end, ".dict"); - dest = malloc(strlen(log->path) + 1); - if (dest == NULL) - return -2; - strcpy(dest, log->path); - strcpy(log->end, ".temp"); - ret = rename(log->path, dest); - free(dest); - if (ret && errno != ENOENT) - return -1; - BAIL(4); - - /* mark the foo.gz file as done */ - return log_mark(log, NO_OP); -} - -/* Compress the len bytes at data and append the compressed data to the - foo.gz deflate data immediately after the previous compressed data. This - overwrites the previous uncompressed data, which was stored in foo.add - and is the data provided in data[0..len-1]. If this operation is - interrupted, it picks up at the start of this routine, with the foo.add - file read in again. If there is no data to compress (len == 0), then we - simply terminate the foo.gz file after the previously compressed data, - appending a final empty stored block and the gzip trailer. Return -1 if - reading or writing the log.gz file failed, or -2 if there was a memory - allocation failure. */ -local int log_compress(struct log *log, unsigned char *data, size_t len) -{ - int fd; - uint got, max; - ssize_t dict; - off_t end; - z_stream strm; - unsigned char buf[DICT]; - - /* compress and append compressed data */ - if (len) { - /* set up for deflate, allocating memory */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - if (deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8, - Z_DEFAULT_STRATEGY) != Z_OK) - return -2; - - /* read in dictionary (last 32K of data that was compressed) */ - strcpy(log->end, ".dict"); - fd = open(log->path, O_RDONLY, 0); - if (fd >= 0) { - dict = read(fd, buf, DICT); - close(fd); - if (dict < 0) { - deflateEnd(&strm); - return -1; - } - if (dict) - deflateSetDictionary(&strm, buf, (uint)dict); - } - log_touch(log); - - /* prime deflate with last bits of previous block, position write - pointer to write those bits and overwrite what follows */ - if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1), - SEEK_SET) < 0 || - read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { - deflateEnd(&strm); - return -1; - } - deflatePrime(&strm, (8 - log->back) & 7, *buf); - - /* compress, finishing with a partial non-last empty static block */ - strm.next_in = data; - max = (((uint)0 - 1) >> 1) + 1; /* in case int smaller than size_t */ - do { - strm.avail_in = len > max ? max : (uint)len; - len -= strm.avail_in; - do { - strm.avail_out = DICT; - strm.next_out = buf; - deflate(&strm, len ? Z_NO_FLUSH : Z_PARTIAL_FLUSH); - got = DICT - strm.avail_out; - if (got && write(log->fd, buf, got) != got) { - deflateEnd(&strm); - return -1; - } - log_touch(log); - } while (strm.avail_out == 0); - } while (len); - deflateEnd(&strm); - BAIL(5); - - /* find start of empty static block -- scanning backwards the first one - bit is the second bit of the block, if the last byte is zero, then - we know the byte before that has a one in the top bit, since an - empty static block is ten bits long */ - if ((log->first = lseek(log->fd, -1, SEEK_CUR)) < 0 || - read(log->fd, buf, 1) != 1) - return -1; - log->first++; - if (*buf) { - log->back = 1; - while ((*buf & ((uint)1 << (8 - log->back++))) == 0) - ; /* guaranteed to terminate, since *buf != 0 */ - } - else - log->back = 10; - - /* update compressed crc and length */ - log->ccrc = log->tcrc; - log->clen = log->tlen; - } - else { - /* no data to compress -- fix up existing gzip stream */ - log->tcrc = log->ccrc; - log->tlen = log->clen; - } - - /* complete and truncate gzip stream */ - log->last = log->first; - log->stored = 0; - PUT4(buf, log->tcrc); - PUT4(buf + 4, log->tlen); - if (log_last(log, 1) || write(log->fd, buf, 8) != 8 || - (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) - return -1; - BAIL(6); - - /* mark as being in the replace operation */ - if (log_mark(log, REPLACE_OP)) - return -1; - - /* execute the replace operation and mark the file as done */ - return log_replace(log); -} - -/* log a repair record to the .repairs file */ -local void log_log(struct log *log, int op, char *record) -{ - time_t now; - FILE *rec; - - now = time(NULL); - strcpy(log->end, ".repairs"); - rec = fopen(log->path, "a"); - if (rec == NULL) - return; - fprintf(rec, "%.24s %s recovery: %s\n", ctime(&now), op == APPEND_OP ? - "append" : (op == COMPRESS_OP ? "compress" : "replace"), record); - fclose(rec); - return; -} - -/* Recover the interrupted operation op. First read foo.add for recovering an - append or compress operation. Return -1 if there was an error reading or - writing foo.gz or reading an existing foo.add, or -2 if there was a memory - allocation failure. */ -local int log_recover(struct log *log, int op) -{ - int fd, ret = 0; - unsigned char *data = NULL; - size_t len = 0; - struct stat st; - - /* log recovery */ - log_log(log, op, "start"); - - /* load foo.add file if expected and present */ - if (op == APPEND_OP || op == COMPRESS_OP) { - strcpy(log->end, ".add"); - if (stat(log->path, &st) == 0 && st.st_size) { - len = (size_t)(st.st_size); - if ((off_t)len != st.st_size || - (data = malloc(st.st_size)) == NULL) { - log_log(log, op, "allocation failure"); - return -2; - } - if ((fd = open(log->path, O_RDONLY, 0)) < 0) { - free(data); - log_log(log, op, ".add file read failure"); - return -1; - } - ret = (size_t)read(fd, data, len) != len; - close(fd); - if (ret) { - free(data); - log_log(log, op, ".add file read failure"); - return -1; - } - log_log(log, op, "loaded .add file"); - } - else - log_log(log, op, "missing .add file!"); - } - - /* recover the interrupted operation */ - switch (op) { - case APPEND_OP: - ret = log_append(log, data, len); - break; - case COMPRESS_OP: - ret = log_compress(log, data, len); - break; - case REPLACE_OP: - ret = log_replace(log); - } - - /* log status */ - log_log(log, op, ret ? "failure" : "complete"); - - /* clean up */ - if (data != NULL) - free(data); - return ret; -} - -/* Close the foo.gz file (if open) and release the lock. */ -local void log_close(struct log *log) -{ - if (log->fd >= 0) - close(log->fd); - log->fd = -1; - log_unlock(log); -} - -/* Open foo.gz, verify the header, and load the extra field contents, after - first creating the foo.lock file to gain exclusive access to the foo.* - files. If foo.gz does not exist or is empty, then write the initial header, - extra, and body content of an empty foo.gz log file. If there is an error - creating the lock file due to access restrictions, or an error reading or - writing the foo.gz file, or if the foo.gz file is not a proper log file for - this object (e.g. not a gzip file or does not contain the expected extra - field), then return true. If there is an error, the lock is released. - Otherwise, the lock is left in place. */ -local int log_open(struct log *log) -{ - int op; - - /* release open file resource if left over -- can occur if lock lost - between gzlog_open() and gzlog_write() */ - if (log->fd >= 0) - close(log->fd); - log->fd = -1; - - /* negotiate exclusive access */ - if (log_lock(log) < 0) - return -1; - - /* open the log file, foo.gz */ - strcpy(log->end, ".gz"); - log->fd = open(log->path, O_RDWR | O_CREAT, 0644); - if (log->fd < 0) { - log_close(log); - return -1; - } - - /* if new, initialize foo.gz with an empty log, delete old dictionary */ - if (lseek(log->fd, 0, SEEK_END) == 0) { - if (write(log->fd, log_gzhead, HEAD) != HEAD || - write(log->fd, log_gzext, EXTRA) != EXTRA || - write(log->fd, log_gzbody, BODY) != BODY) { - log_close(log); - return -1; - } - strcpy(log->end, ".dict"); - unlink(log->path); - } - - /* verify log file and load extra field information */ - if ((op = log_head(log)) < 0) { - log_close(log); - return -1; - } - - /* check for interrupted process and if so, recover */ - if (op != NO_OP && log_recover(log, op)) { - log_close(log); - return -1; - } - - /* touch the lock file to prevent another process from grabbing it */ - log_touch(log); - return 0; -} - -/* See gzlog.h for the description of the external methods below */ -gzlog *gzlog_open(char *path) -{ - size_t n; - struct log *log; - - /* check arguments */ - if (path == NULL || *path == 0) - return NULL; - - /* allocate and initialize log structure */ - log = malloc(sizeof(struct log)); - if (log == NULL) - return NULL; - strcpy(log->id, LOGID); - log->fd = -1; - - /* save path and end of path for name construction */ - n = strlen(path); - log->path = malloc(n + 9); /* allow for ".repairs" */ - if (log->path == NULL) { - free(log); - return NULL; - } - strcpy(log->path, path); - log->end = log->path + n; - - /* gain exclusive access and verify log file -- may perform a - recovery operation if needed */ - if (log_open(log)) { - free(log->path); - free(log); - return NULL; - } - - /* return pointer to log structure */ - return log; -} - -/* gzlog_compress() return values: - 0: all good - -1: file i/o error (usually access issue) - -2: memory allocation failure - -3: invalid log pointer argument */ -int gzlog_compress(gzlog *logd) -{ - int fd, ret; - uint block; - size_t len, next; - unsigned char *data, buf[5]; - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - - /* see if we lost the lock -- if so get it again and reload the extra - field information (it probably changed), recover last operation if - necessary */ - if (log_check(log) && log_open(log)) - return -1; - - /* create space for uncompressed data */ - len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) + - log->stored; - if ((data = malloc(len)) == NULL) - return -2; - - /* do statement here is just a cheap trick for error handling */ - do { - /* read in the uncompressed data */ - if (lseek(log->fd, log->first - 1, SEEK_SET) < 0) - break; - next = 0; - while (next < len) { - if (read(log->fd, buf, 5) != 5) - break; - block = PULL2(buf + 1); - if (next + block > len || - read(log->fd, (char *)data + next, block) != block) - break; - next += block; - } - if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored) - break; - log_touch(log); - - /* write the uncompressed data to the .add file */ - strcpy(log->end, ".add"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - break; - ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - break; - log_touch(log); - - /* write the dictionary for the next compress to the .temp file */ - strcpy(log->end, ".temp"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - break; - next = DICT > len ? len : DICT; - ret = (size_t)write(fd, (char *)data + len - next, next) != next; - if (ret | close(fd)) - break; - log_touch(log); - - /* roll back to compressed data, mark the compress in progress */ - log->last = log->first; - log->stored = 0; - if (log_mark(log, COMPRESS_OP)) - break; - BAIL(7); - - /* compress and append the data (clears mark) */ - ret = log_compress(log, data, len); - free(data); - return ret; - } while (0); - - /* broke out of do above on i/o error */ - free(data); - return -1; -} - -/* gzlog_write() return values: - 0: all good - -1: file i/o error (usually access issue) - -2: memory allocation failure - -3: invalid log pointer argument */ -int gzlog_write(gzlog *logd, void *data, size_t len) -{ - int fd, ret; - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - if (data == NULL || len <= 0) - return 0; - - /* see if we lost the lock -- if so get it again and reload the extra - field information (it probably changed), recover last operation if - necessary */ - if (log_check(log) && log_open(log)) - return -1; - - /* create and write .add file */ - strcpy(log->end, ".add"); - fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd < 0) - return -1; - ret = (size_t)write(fd, data, len) != len; - if (ret | close(fd)) - return -1; - log_touch(log); - - /* mark log file with append in progress */ - if (log_mark(log, APPEND_OP)) - return -1; - BAIL(8); - - /* append data (clears mark) */ - if (log_append(log, data, len)) - return -1; - - /* check to see if it's time to compress -- if not, then done */ - if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER) - return 0; - - /* time to compress */ - return gzlog_compress(log); -} - -/* gzlog_close() return values: - 0: ok - -3: invalid log pointer argument */ -int gzlog_close(gzlog *logd) -{ - struct log *log = logd; - - /* check arguments */ - if (log == NULL || strcmp(log->id, LOGID)) - return -3; - - /* close the log file and release the lock */ - log_close(log); - - /* free structure and return */ - if (log->path != NULL) - free(log->path); - strcpy(log->id, "bad"); - free(log); - return 0; -} diff --git a/third_party/zlib/examples/gzlog.h b/third_party/zlib/examples/gzlog.h deleted file mode 100644 index 6f28759..0000000 --- a/third_party/zlib/examples/gzlog.h +++ /dev/null @@ -1,92 +0,0 @@ -/* gzlog.h - Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved - version 2.2, 14 Aug 2012 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the author be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Mark Adler madler@alumni.caltech.edu - */ - -/* Version History: - 1.0 26 Nov 2004 First version - 2.0 25 Apr 2008 Complete redesign for recovery of interrupted operations - Interface changed slightly in that now path is a prefix - Compression now occurs as needed during gzlog_write() - gzlog_write() now always leaves the log file as valid gzip - 2.1 8 Jul 2012 Fix argument checks in gzlog_compress() and gzlog_write() - 2.2 14 Aug 2012 Clean up signed comparisons - */ - -/* - The gzlog object allows writing short messages to a gzipped log file, - opening the log file locked for small bursts, and then closing it. The log - object works by appending stored (uncompressed) data to the gzip file until - 1 MB has been accumulated. At that time, the stored data is compressed, and - replaces the uncompressed data in the file. The log file is truncated to - its new size at that time. After each write operation, the log file is a - valid gzip file that can decompressed to recover what was written. - - The gzlog operations can be interrupted at any point due to an application or - system crash, and the log file will be recovered the next time the log is - opened with gzlog_open(). - */ - -#ifndef GZLOG_H -#define GZLOG_H - -/* gzlog object type */ -typedef void gzlog; - -/* Open a gzlog object, creating the log file if it does not exist. Return - NULL on error. Note that gzlog_open() could take a while to complete if it - has to wait to verify that a lock is stale (possibly for five minutes), or - if there is significant contention with other instantiations of this object - when locking the resource. path is the prefix of the file names created by - this object. If path is "foo", then the log file will be "foo.gz", and - other auxiliary files will be created and destroyed during the process: - "foo.dict" for a compression dictionary, "foo.temp" for a temporary (next) - dictionary, "foo.add" for data being added or compressed, "foo.lock" for the - lock file, and "foo.repairs" to log recovery operations performed due to - interrupted gzlog operations. A gzlog_open() followed by a gzlog_close() - will recover a previously interrupted operation, if any. */ -gzlog *gzlog_open(char *path); - -/* Write to a gzlog object. Return zero on success, -1 if there is a file i/o - error on any of the gzlog files (this should not happen if gzlog_open() - succeeded, unless the device has run out of space or leftover auxiliary - files have permissions or ownership that prevent their use), -2 if there is - a memory allocation failure, or -3 if the log argument is invalid (e.g. if - it was not created by gzlog_open()). This function will write data to the - file uncompressed, until 1 MB has been accumulated, at which time that data - will be compressed. The log file will be a valid gzip file upon successful - return. */ -int gzlog_write(gzlog *log, void *data, size_t len); - -/* Force compression of any uncompressed data in the log. This should be used - sparingly, if at all. The main application would be when a log file will - not be appended to again. If this is used to compress frequently while - appending, it will both significantly increase the execution time and - reduce the compression ratio. The return codes are the same as for - gzlog_write(). */ -int gzlog_compress(gzlog *log); - -/* Close a gzlog object. Return zero on success, -3 if the log argument is - invalid. The log object is freed, and so cannot be referenced again. */ -int gzlog_close(gzlog *log); - -#endif - diff --git a/third_party/zlib/examples/gznorm.c b/third_party/zlib/examples/gznorm.c deleted file mode 100644 index 68e0a0f..0000000 --- a/third_party/zlib/examples/gznorm.c +++ /dev/null @@ -1,470 +0,0 @@ -/* gznorm.c -- normalize a gzip stream - * Copyright (C) 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.0 7 Oct 2018 Mark Adler */ - -// gznorm takes a gzip stream, potentially containing multiple members, and -// converts it to a gzip stream with a single member. In addition the gzip -// header is normalized, removing the file name and time stamp, and setting the -// other header contents (XFL, OS) to fixed values. gznorm does not recompress -// the data, so it is fast, but no advantage is gained from the history that -// could be available across member boundaries. - -#include // fread, fwrite, putc, fflush, ferror, fprintf, - // vsnprintf, stdout, stderr, NULL, FILE -#include // malloc, free -#include // strerror -#include // errno -#include // va_list, va_start, va_end -#include "zlib.h" // inflateInit2, inflate, inflateReset, inflateEnd, - // z_stream, z_off_t, crc32_combine, Z_NULL, Z_BLOCK, - // Z_OK, Z_STREAM_END, Z_BUF_ERROR, Z_DATA_ERROR, - // Z_MEM_ERROR - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#define local static - -// printf to an allocated string. Return the string, or NULL if the printf or -// allocation fails. -local char *aprintf(char *fmt, ...) { - // Get the length of the result of the printf. - va_list args; - va_start(args, fmt); - int len = vsnprintf(NULL, 0, fmt, args); - va_end(args); - if (len < 0) - return NULL; - - // Allocate the required space and printf to it. - char *str = malloc(len + 1); - if (str == NULL) - return NULL; - va_start(args, fmt); - vsnprintf(str, len + 1, fmt, args); - va_end(args); - return str; -} - -// Return with an error, putting an allocated error message in *err. Doing an -// inflateEnd() on an already ended state, or one with state set to Z_NULL, is -// permitted. -#define BYE(...) \ - do { \ - inflateEnd(&strm); \ - *err = aprintf(__VA_ARGS__); \ - return 1; \ - } while (0) - -// Chunk size for buffered reads and for decompression. Twice this many bytes -// will be allocated on the stack by gzip_normalize(). Must fit in an unsigned. -#define CHUNK 16384 - -// Read a gzip stream from in and write an equivalent normalized gzip stream to -// out. If given no input, an empty gzip stream will be written. If successful, -// 0 is returned, and *err is set to NULL. On error, 1 is returned, where the -// details of the error are returned in *err, a pointer to an allocated string. -// -// The input may be a stream with multiple gzip members, which is converted to -// a single gzip member on the output. Each gzip member is decompressed at the -// level of deflate blocks. This enables clearing the last-block bit, shifting -// the compressed data to concatenate to the previous member's compressed data, -// which can end at an arbitrary bit boundary, and identifying stored blocks in -// order to resynchronize those to byte boundaries. The deflate compressed data -// is terminated with a 10-bit empty fixed block. If any members on the input -// end with a 10-bit empty fixed block, then that block is excised from the -// stream. This avoids appending empty fixed blocks for every normalization, -// and assures that gzip_normalize applied a second time will not change the -// input. The pad bits after stored block headers and after the final deflate -// block are all forced to zeros. -local int gzip_normalize(FILE *in, FILE *out, char **err) { - // initialize the inflate engine to process a gzip member - z_stream strm; - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - if (inflateInit2(&strm, 15 + 16) != Z_OK) - BYE("out of memory"); - - // State while processing the input gzip stream. - enum { // BETWEEN -> HEAD -> BLOCK -> TAIL -> BETWEEN -> ... - BETWEEN, // between gzip members (must end in this state) - HEAD, // reading a gzip header - BLOCK, // reading deflate blocks - TAIL // reading a gzip trailer - } state = BETWEEN; // current component being processed - unsigned long crc = 0; // accumulated CRC of uncompressed data - unsigned long len = 0; // accumulated length of uncompressed data - unsigned long buf = 0; // deflate stream bit buffer of num bits - int num = 0; // number of bits in buf (at bottom) - - // Write a canonical gzip header (no mod time, file name, comment, extra - // block, or extra flags, and OS is marked as unknown). - fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); - - // Process the gzip stream from in until reaching the end of the input, - // encountering invalid input, or experiencing an i/o error. - int more; // true if not at the end of the input - do { - // State inside this loop. - unsigned char *put; // next input buffer location to process - int prev; // number of bits from previous block in - // the bit buffer, or -1 if not at the - // start of a block - unsigned long long memb; // uncompressed length of member - size_t tail; // number of trailer bytes read (0..8) - unsigned long part; // accumulated trailer component - - // Get the next chunk of input from in. - unsigned char dat[CHUNK]; - strm.avail_in = fread(dat, 1, CHUNK, in); - if (strm.avail_in == 0) - break; - more = strm.avail_in == CHUNK; - strm.next_in = put = dat; - - // Run that chunk of input through the inflate engine to exhaustion. - do { - // At this point it is assured that strm.avail_in > 0. - - // Inflate until the end of a gzip component (header, deflate - // block, trailer) is reached, or until all of the chunk is - // consumed. The resulting decompressed data is discarded, though - // the total size of the decompressed data in each member is - // tracked, for the calculation of the total CRC. - do { - // inflate and handle any errors - unsigned char scrap[CHUNK]; - strm.avail_out = CHUNK; - strm.next_out = scrap; - int ret = inflate(&strm, Z_BLOCK); - if (ret == Z_MEM_ERROR) - BYE("out of memory"); - if (ret == Z_DATA_ERROR) - BYE("input invalid: %s", strm.msg); - if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_STREAM_END) - BYE("internal error"); - - // Update the number of uncompressed bytes generated in this - // member. The actual count (not modulo 2^32) is required to - // correctly compute the total CRC. - unsigned got = CHUNK - strm.avail_out; - memb += got; - if (memb < got) - BYE("overflow error"); - - // Continue to process this chunk until it is consumed, or - // until the end of a component (header, deflate block, or - // trailer) is reached. - } while (strm.avail_out == 0 && (strm.data_type & 0x80) == 0); - - // Since strm.avail_in was > 0 for the inflate call, some input was - // just consumed. It is therefore assured that put < strm.next_in. - - // Disposition the consumed component or part of a component. - switch (state) { - case BETWEEN: - state = HEAD; - // Fall through to HEAD when some or all of the header is - // processed. - - case HEAD: - // Discard the header. - if (strm.data_type & 0x80) { - // End of header reached -- deflate blocks follow. - put = strm.next_in; - prev = num; - memb = 0; - state = BLOCK; - } - break; - - case BLOCK: - // Copy the deflate stream to the output, but with the - // last-block-bit cleared. Re-synchronize stored block - // headers to the output byte boundaries. The bytes at - // put..strm.next_in-1 is the compressed data that has been - // processed and is ready to be copied to the output. - - // At this point, it is assured that new compressed data is - // available, i.e., put < strm.next_in. If prev is -1, then - // that compressed data starts in the middle of a deflate - // block. If prev is not -1, then the bits in the bit - // buffer, possibly combined with the bits in *put, contain - // the three-bit header of the new deflate block. In that - // case, prev is the number of bits from the previous block - // that remain in the bit buffer. Since num is the number - // of bits in the bit buffer, we have that num - prev is - // the number of bits from the new block currently in the - // bit buffer. - - // If strm.data_type & 0xc0 is 0x80, then the last byte of - // the available compressed data includes the last bits of - // the end of a deflate block. In that case, that last byte - // also has strm.data_type & 0x1f bits of the next deflate - // block, in the range 0..7. If strm.data_type & 0xc0 is - // 0xc0, then the last byte of the compressed data is the - // end of the deflate stream, followed by strm.data_type & - // 0x1f pad bits, also in the range 0..7. - - // Set bits to the number of bits not yet consumed from the - // last byte. If we are at the end of the block, bits is - // either the number of bits in the last byte belonging to - // the next block, or the number of pad bits after the - // final block. In either of those cases, bits is in the - // range 0..7. - ; // (required due to C syntax oddity) - int bits = strm.data_type & 0x1f; - - if (prev != -1) { - // We are at the start of a new block. Clear the last - // block bit, and check for special cases. If it is a - // stored block, then emit the header and pad to the - // next byte boundary. If it is a final, empty fixed - // block, then excise it. - - // Some or all of the three header bits for this block - // may already be in the bit buffer. Load any remaining - // header bits into the bit buffer. - if (num - prev < 3) { - buf += (unsigned long)*put++ << num; - num += 8; - } - - // Set last to have a 1 in the position of the last - // block bit in the bit buffer. - unsigned long last = (unsigned long)1 << prev; - - if (((buf >> prev) & 7) == 3) { - // This is a final fixed block. Load at least ten - // bits from this block, including the header, into - // the bit buffer. We already have at least three, - // so at most one more byte needs to be loaded. - if (num - prev < 10) { - if (put == strm.next_in) - // Need to go get and process more input. - // We'll end up back here to finish this. - break; - buf += (unsigned long)*put++ << num; - num += 8; - } - if (((buf >> prev) & 0x3ff) == 3) { - // That final fixed block is empty. Delete it - // to avoid adding an empty block every time a - // gzip stream is normalized. - num = prev; - buf &= last - 1; // zero the pad bits - } - } - else if (((buf >> prev) & 6) == 0) { - // This is a stored block. Flush to the next - // byte boundary after the three-bit header. - num = (prev + 10) & ~7; - buf &= last - 1; // zero the pad bits - } - - // Clear the last block bit. - buf &= ~last; - - // Write out complete bytes in the bit buffer. - while (num >= 8) { - putc(buf, out); - buf >>= 8; - num -= 8; - } - - // If no more bytes left to process, then we have - // consumed the byte that had bits from the next block. - if (put == strm.next_in) - bits = 0; - } - - // We are done handling the deflate block header. Now copy - // all or almost all of the remaining compressed data that - // has been processed so far. Don't copy one byte at the - // end if it contains bits from the next deflate block or - // pad bits at the end of a deflate block. - - // mix is 1 if we are at the end of a deflate block, and if - // some of the bits in the last byte follow this block. mix - // is 0 if we are in the middle of a deflate block, if the - // deflate block ended on a byte boundary, or if all of the - // compressed data processed so far has been consumed. - int mix = (strm.data_type & 0x80) && bits; - - // Copy all of the processed compressed data to the output, - // except for the last byte if it contains bits from the - // next deflate block or pad bits at the end of the deflate - // stream. Copy the data after shifting in num bits from - // buf in front of it, leaving num bits from the end of the - // compressed data in buf when done. - unsigned char *end = strm.next_in - mix; - if (put < end) { - if (num) - // Insert num bits from buf before the data being - // copied. - do { - buf += (unsigned)(*put++) << num; - putc(buf, out); - buf >>= 8; - } while (put < end); - else { - // No shifting needed -- write directly. - fwrite(put, 1, end - put, out); - put = end; - } - } - - // Process the last processed byte if it wasn't written. - if (mix) { - // Load the last byte into the bit buffer. - buf += (unsigned)(*put++) << num; - num += 8; - - if (strm.data_type & 0x40) { - // We are at the end of the deflate stream and - // there are bits pad bits. Discard the pad bits - // and write a byte to the output, if available. - // Leave the num bits left over in buf to prepend - // to the next deflate stream. - num -= bits; - if (num >= 8) { - putc(buf, out); - num -= 8; - buf >>= 8; - } - - // Force the pad bits in the bit buffer to zeros. - buf &= ((unsigned long)1 << num) - 1; - - // Don't need to set prev here since going to TAIL. - } - else - // At the end of an internal deflate block. Leave - // the last byte in the bit buffer to examine on - // the next entry to BLOCK, when more bits from the - // next block will be available. - prev = num - bits; // number of bits in buffer - // from current block - } - - // Don't have a byte left over, so we are in the middle of - // a deflate block, or the deflate block ended on a byte - // boundary. Set prev appropriately for the next entry into - // BLOCK. - else if (strm.data_type & 0x80) - // The block ended on a byte boundary, so no header - // bits are in the bit buffer. - prev = num; - else - // In the middle of a deflate block, so no header here. - prev = -1; - - // Check for the end of the deflate stream. - if ((strm.data_type & 0xc0) == 0xc0) { - // That ends the deflate stream on the input side, the - // pad bits were discarded, and any remaining bits from - // the last block in the stream are saved in the bit - // buffer to prepend to the next stream. Process the - // gzip trailer next. - tail = 0; - part = 0; - state = TAIL; - } - break; - - case TAIL: - // Accumulate available trailer bytes to update the total - // CRC and the total uncompressed length. - do { - part = (part >> 8) + ((unsigned long)(*put++) << 24); - tail++; - if (tail == 4) { - // Update the total CRC. - z_off_t len2 = memb; - if (len2 < 0 || (unsigned long long)len2 != memb) - BYE("overflow error"); - crc = crc ? crc32_combine(crc, part, len2) : part; - part = 0; - } - else if (tail == 8) { - // Update the total uncompressed length. (It's ok - // if this sum is done modulo 2^32.) - len += part; - - // At the end of a member. Set up to inflate an - // immediately following gzip member. (If we made - // it this far, then the trailer was valid.) - if (inflateReset(&strm) != Z_OK) - BYE("internal error"); - state = BETWEEN; - break; - } - } while (put < strm.next_in); - break; - } - - // Process the input buffer until completely consumed. - } while (strm.avail_in > 0); - - // Process input until end of file, invalid input, or i/o error. - } while (more); - - // Done with the inflate engine. - inflateEnd(&strm); - - // Verify the validity of the input. - if (state != BETWEEN) - BYE("input invalid: incomplete gzip stream"); - - // Write the remaining deflate stream bits, followed by a terminating - // deflate fixed block. - buf += (unsigned long)3 << num; - putc(buf, out); - putc(buf >> 8, out); - if (num > 6) - putc(0, out); - - // Write the gzip trailer, which is the CRC and the uncompressed length - // modulo 2^32, both in little-endian order. - putc(crc, out); - putc(crc >> 8, out); - putc(crc >> 16, out); - putc(crc >> 24, out); - putc(len, out); - putc(len >> 8, out); - putc(len >> 16, out); - putc(len >> 24, out); - fflush(out); - - // Check for any i/o errors. - if (ferror(in) || ferror(out)) - BYE("i/o error: %s", strerror(errno)); - - // All good! - *err = NULL; - return 0; -} - -// Normalize the gzip stream on stdin, writing the result to stdout. -int main(void) { - // Avoid end-of-line conversions on evil operating systems. - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - - // Normalize from stdin to stdout, returning 1 on error, 0 if ok. - char *err; - int ret = gzip_normalize(stdin, stdout, &err); - if (ret) - fprintf(stderr, "gznorm error: %s\n", err); - free(err); - return ret; -} diff --git a/third_party/zlib/examples/zlib_how.html b/third_party/zlib/examples/zlib_how.html deleted file mode 100644 index 43271b9..0000000 --- a/third_party/zlib/examples/zlib_how.html +++ /dev/null @@ -1,549 +0,0 @@ - - - - -zlib Usage Example - - - -

zlib Usage Example

-We often get questions about how the deflate() and inflate() functions should be used. -Users wonder when they should provide more input, when they should use more output, -what to do with a Z_BUF_ERROR, how to make sure the process terminates properly, and -so on. So for those who have read zlib.h (a few times), and -would like further edification, below is an annotated example in C of simple routines to compress and decompress -from an input file to an output file using deflate() and inflate() respectively. The -annotations are interspersed between lines of the code. So please read between the lines. -We hope this helps explain some of the intricacies of zlib. -

-Without further ado, here is the program zpipe.c: -


-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
-   Not copyrighted -- provided to the public domain
-   Version 1.4  11 December 2005  Mark Adler */
-
-/* Version history:
-   1.0  30 Oct 2004  First version
-   1.1   8 Nov 2004  Add void casting for unused return values
-                     Use switch statement for inflate() return values
-   1.2   9 Nov 2004  Add assertions to document zlib guarantees
-   1.3   6 Apr 2005  Remove incorrect assertion in inf()
-   1.4  11 Dec 2005  Add hack to avoid MSDOS end-of-line conversions
-                     Avoid some compiler warnings for input and output buffers
- */
-
-We now include the header files for the required definitions. From -stdio.h we use fopen(), fread(), fwrite(), -feof(), ferror(), and fclose() for file i/o, and -fputs() for error messages. From string.h we use -strcmp() for command line argument processing. -From assert.h we use the assert() macro. -From zlib.h -we use the basic compression functions deflateInit(), -deflate(), and deflateEnd(), and the basic decompression -functions inflateInit(), inflate(), and -inflateEnd(). -

-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include "zlib.h"
-
-This is an ugly hack required to avoid corruption of the input and output data on -Windows/MS-DOS systems. Without this, those systems would assume that the input and output -files are text, and try to convert the end-of-line characters from one standard to -another. That would corrupt binary data, and in particular would render the compressed data unusable. -This sets the input and output to binary which suppresses the end-of-line conversions. -SET_BINARY_MODE() will be used later on stdin and stdout, at the beginning of main(). -

-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
-#  include <fcntl.h>
-#  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#  define SET_BINARY_MODE(file)
-#endif
-
-CHUNK is simply the buffer size for feeding data to and pulling data -from the zlib routines. Larger buffer sizes would be more efficient, -especially for inflate(). If the memory is available, buffers sizes -on the order of 128K or 256K bytes should be used. -

-#define CHUNK 16384
-
-The def() routine compresses data from an input file to an output file. The output data -will be in the zlib format, which is different from the gzip or zip -formats. The zlib format has a very small header of only two bytes to identify it as -a zlib stream and to provide decoding information, and a four-byte trailer with a fast -check value to verify the integrity of the uncompressed data after decoding. -

-/* Compress from file source to file dest until EOF on source.
-   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_STREAM_ERROR if an invalid compression
-   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
-   version of the library linked do not match, or Z_ERRNO if there is
-   an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-
-Here are the local variables for def(). ret will be used for zlib -return codes. flush will keep track of the current flushing state for deflate(), -which is either no flushing, or flush to completion after the end of the input file is reached. -have is the amount of data returned from deflate(). The strm structure -is used to pass information to and from the zlib routines, and to maintain the -deflate() state. in and out are the input and output buffers for -deflate(). -

-    int ret, flush;
-    unsigned have;
-    z_stream strm;
-    unsigned char in[CHUNK];
-    unsigned char out[CHUNK];
-
-The first thing we do is to initialize the zlib state for compression using -deflateInit(). This must be done before the first use of deflate(). -The zalloc, zfree, and opaque fields in the strm -structure must be initialized before calling deflateInit(). Here they are -set to the zlib constant Z_NULL to request that zlib use -the default memory allocation routines. An application may also choose to provide -custom memory allocation routines here. deflateInit() will allocate on the -order of 256K bytes for the internal state. -(See zlib Technical Details.) -

-deflateInit() is called with a pointer to the structure to be initialized and -the compression level, which is an integer in the range of -1 to 9. Lower compression -levels result in faster execution, but less compression. Higher levels result in -greater compression, but slower execution. The zlib constant Z_DEFAULT_COMPRESSION, -equal to -1, -provides a good compromise between compression and speed and is equivalent to level 6. -Level 0 actually does no compression at all, and in fact expands the data slightly to produce -the zlib format (it is not a byte-for-byte copy of the input). -More advanced applications of zlib -may use deflateInit2() here instead. Such an application may want to reduce how -much memory will be used, at some price in compression. Or it may need to request a -gzip header and trailer instead of a zlib header and trailer, or raw -encoding with no header or trailer at all. -

-We must check the return value of deflateInit() against the zlib constant -Z_OK to make sure that it was able to -allocate memory for the internal state, and that the provided arguments were valid. -deflateInit() will also check that the version of zlib that the zlib.h -file came from matches the version of zlib actually linked with the program. This -is especially important for environments in which zlib is a shared library. -

-Note that an application can initialize multiple, independent zlib streams, which can -operate in parallel. The state information maintained in the structure allows the zlib -routines to be reentrant. -


-    /* allocate deflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = deflateInit(&strm, level);
-    if (ret != Z_OK)
-        return ret;
-
-With the pleasantries out of the way, now we can get down to business. The outer do-loop -reads all of the input file and exits at the bottom of the loop once end-of-file is reached. -This loop contains the only call of deflate(). So we must make sure that all of the -input data has been processed and that all of the output data has been generated and consumed -before we fall out of the loop at the bottom. -

-    /* compress until end of file */
-    do {
-
-We start off by reading data from the input file. The number of bytes read is put directly -into avail_in, and a pointer to those bytes is put into next_in. We also -check to see if end-of-file on the input has been reached using feof(). -If we are at the end of file, then flush is set to the -zlib constant Z_FINISH, which is later passed to deflate() to -indicate that this is the last chunk of input data to compress. -If we are not yet at the end of the input, then the zlib -constant Z_NO_FLUSH will be passed to deflate to indicate that we are still -in the middle of the uncompressed data. -

-If there is an error in reading from the input file, the process is aborted with -deflateEnd() being called to free the allocated zlib state before returning -the error. We wouldn't want a memory leak, now would we? deflateEnd() can be called -at any time after the state has been initialized. Once that's done, deflateInit() (or -deflateInit2()) would have to be called to start a new compression process. There is -no point here in checking the deflateEnd() return code. The deallocation can't fail. -


-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)deflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
-        strm.next_in = in;
-
-The inner do-loop passes our chunk of input data to deflate(), and then -keeps calling deflate() until it is done producing output. Once there is no more -new output, deflate() is guaranteed to have consumed all of the input, i.e., -avail_in will be zero. -

-        /* run deflate() on input until output buffer not full, finish
-           compression if all of source has been read in */
-        do {
-
-Output space is provided to deflate() by setting avail_out to the number -of available output bytes and next_out to a pointer to that space. -

-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-
-Now we call the compression engine itself, deflate(). It takes as many of the -avail_in bytes at next_in as it can process, and writes as many as -avail_out bytes to next_out. Those counters and pointers are then -updated past the input data consumed and the output data written. It is the amount of -output space available that may limit how much input is consumed. -Hence the inner loop to make sure that -all of the input is consumed by providing more output space each time. Since avail_in -and next_in are updated by deflate(), we don't have to mess with those -between deflate() calls until it's all used up. -

-The parameters to deflate() are a pointer to the strm structure containing -the input and output information and the internal compression engine state, and a parameter -indicating whether and how to flush data to the output. Normally deflate will consume -several K bytes of input data before producing any output (except for the header), in order -to accumulate statistics on the data for optimum compression. It will then put out a burst of -compressed data, and proceed to consume more input before the next burst. Eventually, -deflate() -must be told to terminate the stream, complete the compression with provided input data, and -write out the trailer check value. deflate() will continue to compress normally as long -as the flush parameter is Z_NO_FLUSH. Once the Z_FINISH parameter is provided, -deflate() will begin to complete the compressed output stream. However depending on how -much output space is provided, deflate() may have to be called several times until it -has provided the complete compressed stream, even after it has consumed all of the input. The flush -parameter must continue to be Z_FINISH for those subsequent calls. -

-There are other values of the flush parameter that are used in more advanced applications. You can -force deflate() to produce a burst of output that encodes all of the input data provided -so far, even if it wouldn't have otherwise, for example to control data latency on a link with -compressed data. You can also ask that deflate() do that as well as erase any history up to -that point so that what follows can be decompressed independently, for example for random access -applications. Both requests will degrade compression by an amount depending on how often such -requests are made. -

-deflate() has a return value that can indicate errors, yet we do not check it here. Why -not? Well, it turns out that deflate() can do no wrong here. Let's go through -deflate()'s return values and dispense with them one by one. The possible values are -Z_OK, Z_STREAM_END, Z_STREAM_ERROR, or Z_BUF_ERROR. Z_OK -is, well, ok. Z_STREAM_END is also ok and will be returned for the last call of -deflate(). This is already guaranteed by calling deflate() with Z_FINISH -until it has no more output. Z_STREAM_ERROR is only possible if the stream is not -initialized properly, but we did initialize it properly. There is no harm in checking for -Z_STREAM_ERROR here, for example to check for the possibility that some -other part of the application inadvertently clobbered the memory containing the zlib state. -Z_BUF_ERROR will be explained further below, but -suffice it to say that this is simply an indication that deflate() could not consume -more input or produce more output. deflate() can be called again with more output space -or more available input, which it will be in this code. -


-            ret = deflate(&strm, flush);    /* no bad return value */
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-
-Now we compute how much output deflate() provided on the last call, which is the -difference between how much space was provided before the call, and how much output space -is still available after the call. Then that data, if any, is written to the output file. -We can then reuse the output buffer for the next call of deflate(). Again if there -is a file i/o error, we call deflateEnd() before returning to avoid a memory leak. -

-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)deflateEnd(&strm);
-                return Z_ERRNO;
-            }
-
-The inner do-loop is repeated until the last deflate() call fails to fill the -provided output buffer. Then we know that deflate() has done as much as it can with -the provided input, and that all of that input has been consumed. We can then fall out of this -loop and reuse the input buffer. -

-The way we tell that deflate() has no more output is by seeing that it did not fill -the output buffer, leaving avail_out greater than zero. However suppose that -deflate() has no more output, but just so happened to exactly fill the output buffer! -avail_out is zero, and we can't tell that deflate() has done all it can. -As far as we know, deflate() -has more output for us. So we call it again. But now deflate() produces no output -at all, and avail_out remains unchanged as CHUNK. That deflate() call -wasn't able to do anything, either consume input or produce output, and so it returns -Z_BUF_ERROR. (See, I told you I'd cover this later.) However this is not a problem at -all. Now we finally have the desired indication that deflate() is really done, -and so we drop out of the inner loop to provide more input to deflate(). -

-With flush set to Z_FINISH, this final set of deflate() calls will -complete the output stream. Once that is done, subsequent calls of deflate() would return -Z_STREAM_ERROR if the flush parameter is not Z_FINISH, and do no more processing -until the state is reinitialized. -

-Some applications of zlib have two loops that call deflate() -instead of the single inner loop we have here. The first loop would call -without flushing and feed all of the data to deflate(). The second loop would call -deflate() with no more -data and the Z_FINISH parameter to complete the process. As you can see from this -example, that can be avoided by simply keeping track of the current flush state. -


-        } while (strm.avail_out == 0);
-        assert(strm.avail_in == 0);     /* all input will be used */
-
-Now we check to see if we have already processed all of the input file. That information was -saved in the flush variable, so we see if that was set to Z_FINISH. If so, -then we're done and we fall out of the outer loop. We're guaranteed to get Z_STREAM_END -from the last deflate() call, since we ran it until the last chunk of input was -consumed and all of the output was generated. -

-        /* done when last data in file processed */
-    } while (flush != Z_FINISH);
-    assert(ret == Z_STREAM_END);        /* stream will be complete */
-
-The process is complete, but we still need to deallocate the state to avoid a memory leak -(or rather more like a memory hemorrhage if you didn't do this). Then -finally we can return with a happy return value. -

-    /* clean up and return */
-    (void)deflateEnd(&strm);
-    return Z_OK;
-}
-
-Now we do the same thing for decompression in the inf() routine. inf() -decompresses what is hopefully a valid zlib stream from the input file and writes the -uncompressed data to the output file. Much of the discussion above for def() -applies to inf() as well, so the discussion here will focus on the differences between -the two. -

-/* Decompress from file source to file dest until stream ends or EOF.
-   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_DATA_ERROR if the deflate data is
-   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
-   the version of the library linked do not match, or Z_ERRNO if there
-   is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-
-The local variables have the same functionality as they do for def(). The -only difference is that there is no flush variable, since inflate() -can tell from the zlib stream itself when the stream is complete. -

-    int ret;
-    unsigned have;
-    z_stream strm;
-    unsigned char in[CHUNK];
-    unsigned char out[CHUNK];
-
-The initialization of the state is the same, except that there is no compression level, -of course, and two more elements of the structure are initialized. avail_in -and next_in must be initialized before calling inflateInit(). This -is because the application has the option to provide the start of the zlib stream in -order for inflateInit() to have access to information about the compression -method to aid in memory allocation. In the current implementation of zlib -(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of -inflate() anyway. However those fields must be initialized since later versions -of zlib that provide more compression methods may take advantage of this interface. -In any case, no decompression is performed by inflateInit(), so the -avail_out and next_out fields do not need to be initialized before calling. -

-Here avail_in is set to zero and next_in is set to Z_NULL to -indicate that no input data is being provided. -


-    /* allocate inflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit(&strm);
-    if (ret != Z_OK)
-        return ret;
-
-The outer do-loop decompresses input until inflate() indicates -that it has reached the end of the compressed data and has produced all of the uncompressed -output. This is in contrast to def() which processes all of the input file. -If end-of-file is reached before the compressed data self-terminates, then the compressed -data is incomplete and an error is returned. -

-    /* decompress until deflate stream ends or end of file */
-    do {
-
-We read input data and set the strm structure accordingly. If we've reached the -end of the input file, then we leave the outer loop and report an error, since the -compressed data is incomplete. Note that we may read more data than is eventually consumed -by inflate(), if the input file continues past the zlib stream. -For applications where zlib streams are embedded in other data, this routine would -need to be modified to return the unused data, or at least indicate how much of the input -data was not used, so the application would know where to pick up after the zlib stream. -

-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)inflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        if (strm.avail_in == 0)
-            break;
-        strm.next_in = in;
-
-The inner do-loop has the same function it did in def(), which is to -keep calling inflate() until has generated all of the output it can with the -provided input. -

-        /* run inflate() on input until output buffer not full */
-        do {
-
-Just like in def(), the same output space is provided for each call of inflate(). -

-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-
-Now we run the decompression engine itself. There is no need to adjust the flush parameter, since -the zlib format is self-terminating. The main difference here is that there are -return values that we need to pay attention to. Z_DATA_ERROR -indicates that inflate() detected an error in the zlib compressed data format, -which means that either the data is not a zlib stream to begin with, or that the data was -corrupted somewhere along the way since it was compressed. The other error to be processed is -Z_MEM_ERROR, which can occur since memory allocation is deferred until inflate() -needs it, unlike deflate(), whose memory is allocated at the start by deflateInit(). -

-Advanced applications may use -deflateSetDictionary() to prime deflate() with a set of likely data to improve the -first 32K or so of compression. This is noted in the zlib header, so inflate() -requests that that dictionary be provided before it can start to decompress. Without the dictionary, -correct decompression is not possible. For this routine, we have no idea what the dictionary is, -so the Z_NEED_DICT indication is converted to a Z_DATA_ERROR. -

-inflate() can also return Z_STREAM_ERROR, which should not be possible here, -but could be checked for as noted above for def(). Z_BUF_ERROR does not need to be -checked for here, for the same reasons noted for def(). Z_STREAM_END will be -checked for later. -


-            ret = inflate(&strm, Z_NO_FLUSH);
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            switch (ret) {
-            case Z_NEED_DICT:
-                ret = Z_DATA_ERROR;     /* and fall through */
-            case Z_DATA_ERROR:
-            case Z_MEM_ERROR:
-                (void)inflateEnd(&strm);
-                return ret;
-            }
-
-The output of inflate() is handled identically to that of deflate(). -

-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)inflateEnd(&strm);
-                return Z_ERRNO;
-            }
-
-The inner do-loop ends when inflate() has no more output as indicated -by not filling the output buffer, just as for deflate(). In this case, we cannot -assert that strm.avail_in will be zero, since the deflate stream may end before the file -does. -

-        } while (strm.avail_out == 0);
-
-The outer do-loop ends when inflate() reports that it has reached the -end of the input zlib stream, has completed the decompression and integrity -check, and has provided all of the output. This is indicated by the inflate() -return value Z_STREAM_END. The inner loop is guaranteed to leave ret -equal to Z_STREAM_END if the last chunk of the input file read contained the end -of the zlib stream. So if the return value is not Z_STREAM_END, the -loop continues to read more input. -

-        /* done when inflate() says it's done */
-    } while (ret != Z_STREAM_END);
-
-At this point, decompression successfully completed, or we broke out of the loop due to no -more data being available from the input file. If the last inflate() return value -is not Z_STREAM_END, then the zlib stream was incomplete and a data error -is returned. Otherwise, we return with a happy return value. Of course, inflateEnd() -is called first to avoid a memory leak. -

-    /* clean up and return */
-    (void)inflateEnd(&strm);
-    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-
-That ends the routines that directly use zlib. The following routines make this -a command-line program by running data through the above routines from stdin to -stdout, and handling any errors reported by def() or inf(). -

-zerr() is used to interpret the possible error codes from def() -and inf(), as detailed in their comments above, and print out an error message. -Note that these are only a subset of the possible return values from deflate() -and inflate(). -


-/* report a zlib or i/o error */
-void zerr(int ret)
-{
-    fputs("zpipe: ", stderr);
-    switch (ret) {
-    case Z_ERRNO:
-        if (ferror(stdin))
-            fputs("error reading stdin\n", stderr);
-        if (ferror(stdout))
-            fputs("error writing stdout\n", stderr);
-        break;
-    case Z_STREAM_ERROR:
-        fputs("invalid compression level\n", stderr);
-        break;
-    case Z_DATA_ERROR:
-        fputs("invalid or incomplete deflate data\n", stderr);
-        break;
-    case Z_MEM_ERROR:
-        fputs("out of memory\n", stderr);
-        break;
-    case Z_VERSION_ERROR:
-        fputs("zlib version mismatch!\n", stderr);
-    }
-}
-
-Here is the main() routine used to test def() and inf(). The -zpipe command is simply a compression pipe from stdin to stdout, if -no arguments are given, or it is a decompression pipe if zpipe -d is used. If any other -arguments are provided, no compression or decompression is performed. Instead a usage -message is displayed. Examples are zpipe < foo.txt > foo.txt.z to compress, and -zpipe -d < foo.txt.z > foo.txt to decompress. -

-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
-    int ret;
-
-    /* avoid end-of-line conversions */
-    SET_BINARY_MODE(stdin);
-    SET_BINARY_MODE(stdout);
-
-    /* do compression if no arguments */
-    if (argc == 1) {
-        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* do decompression if -d specified */
-    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
-        ret = inf(stdin, stdout);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* otherwise, report usage */
-    else {
-        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
-        return 1;
-    }
-}
-
-
-Last modified 24 January 2023
-Copyright © 2004-2023 Mark Adler

- -Creative Commons License - -Creative Commons Attribution-NoDerivatives 4.0 International License. - - diff --git a/third_party/zlib/examples/zpipe.c b/third_party/zlib/examples/zpipe.c deleted file mode 100644 index 83535d1..0000000 --- a/third_party/zlib/examples/zpipe.c +++ /dev/null @@ -1,205 +0,0 @@ -/* zpipe.c: example of proper use of zlib's inflate() and deflate() - Not copyrighted -- provided to the public domain - Version 1.4 11 December 2005 Mark Adler */ - -/* Version history: - 1.0 30 Oct 2004 First version - 1.1 8 Nov 2004 Add void casting for unused return values - Use switch statement for inflate() return values - 1.2 9 Nov 2004 Add assertions to document zlib guarantees - 1.3 6 Apr 2005 Remove incorrect assertion in inf() - 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions - Avoid some compiler warnings for input and output buffers - */ - -#include -#include -#include -#include "zlib.h" - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#define CHUNK 16384 - -/* Compress from file source to file dest until EOF on source. - def() returns Z_OK on success, Z_MEM_ERROR if memory could not be - allocated for processing, Z_STREAM_ERROR if an invalid compression - level is supplied, Z_VERSION_ERROR if the version of zlib.h and the - version of the library linked do not match, or Z_ERRNO if there is - an error reading or writing the files. */ -int def(FILE *source, FILE *dest, int level) -{ - int ret, flush; - unsigned have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; - - /* allocate deflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = deflateInit(&strm, level); - if (ret != Z_OK) - return ret; - - /* compress until end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)deflateEnd(&strm); - return Z_ERRNO; - } - flush = feof(source) ? Z_FINISH : Z_NO_FLUSH; - strm.next_in = in; - - /* run deflate() on input until output buffer not full, finish - compression if all of source has been read in */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = deflate(&strm, flush); /* no bad return value */ - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - have = CHUNK - strm.avail_out; - if (fwrite(out, 1, have, dest) != have || ferror(dest)) { - (void)deflateEnd(&strm); - return Z_ERRNO; - } - } while (strm.avail_out == 0); - assert(strm.avail_in == 0); /* all input will be used */ - - /* done when last data in file processed */ - } while (flush != Z_FINISH); - assert(ret == Z_STREAM_END); /* stream will be complete */ - - /* clean up and return */ - (void)deflateEnd(&strm); - return Z_OK; -} - -/* Decompress from file source to file dest until stream ends or EOF. - inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be - allocated for processing, Z_DATA_ERROR if the deflate data is - invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and - the version of the library linked do not match, or Z_ERRNO if there - is an error reading or writing the files. */ -int inf(FILE *source, FILE *dest) -{ - int ret; - unsigned have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - if (ret != Z_OK) - return ret; - - /* decompress until deflate stream ends or end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - if (strm.avail_in == 0) - break; - strm.next_in = in; - - /* run inflate() on input until output buffer not full */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - switch (ret) { - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - have = CHUNK - strm.avail_out; - if (fwrite(out, 1, have, dest) != have || ferror(dest)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - } while (strm.avail_out == 0); - - /* done when inflate() says it's done */ - } while (ret != Z_STREAM_END); - - /* clean up and return */ - (void)inflateEnd(&strm); - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; -} - -/* report a zlib or i/o error */ -void zerr(int ret) -{ - fputs("zpipe: ", stderr); - switch (ret) { - case Z_ERRNO: - if (ferror(stdin)) - fputs("error reading stdin\n", stderr); - if (ferror(stdout)) - fputs("error writing stdout\n", stderr); - break; - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } -} - -/* compress or decompress from stdin to stdout */ -int main(int argc, char **argv) -{ - int ret; - - /* avoid end-of-line conversions */ - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - - /* do compression if no arguments */ - if (argc == 1) { - ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); - if (ret != Z_OK) - zerr(ret); - return ret; - } - - /* do decompression if -d specified */ - else if (argc == 2 && strcmp(argv[1], "-d") == 0) { - ret = inf(stdin, stdout); - if (ret != Z_OK) - zerr(ret); - return ret; - } - - /* otherwise, report usage */ - else { - fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr); - return 1; - } -} diff --git a/third_party/zlib/examples/zran.c b/third_party/zlib/examples/zran.c deleted file mode 100644 index d313595..0000000 --- a/third_party/zlib/examples/zran.c +++ /dev/null @@ -1,533 +0,0 @@ -/* zran.c -- example of deflate stream indexing and random access - * Copyright (C) 2005, 2012, 2018, 2023 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.4 13 Apr 2023 Mark Adler */ - -/* Version History: - 1.0 29 May 2005 First version - 1.1 29 Sep 2012 Fix memory reallocation error - 1.2 14 Oct 2018 Handle gzip streams with multiple members - Add a header file to facilitate usage in applications - 1.3 18 Feb 2023 Permit raw deflate streams as well as zlib and gzip - Permit crossing gzip member boundaries when extracting - Support a size_t size when extracting (was an int) - Do a binary search over the index for an access point - Expose the access point type to enable save and load - 1.4 13 Apr 2023 Add a NOPRIME define to not use inflatePrime() - */ - -// Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() -// for random access of a compressed file. A file containing a raw deflate -// stream is provided on the command line. The compressed stream is decoded in -// its entirety, and an index built with access points about every SPAN bytes -// in the uncompressed output. The compressed file is left open, and can then -// be read randomly, having to decompress on the average SPAN/2 uncompressed -// bytes before getting to the desired block of data. -// -// An access point can be created at the start of any deflate block, by saving -// the starting file offset and bit of that block, and the 32K bytes of -// uncompressed data that precede that block. Also the uncompressed offset of -// that block is saved to provide a reference for locating a desired starting -// point in the uncompressed stream. deflate_index_build() decompresses the -// input raw deflate stream a block at a time, and at the end of each block -// decides if enough uncompressed data has gone by to justify the creation of a -// new access point. If so, that point is saved in a data structure that grows -// as needed to accommodate the points. -// -// To use the index, an offset in the uncompressed data is provided, for which -// the latest access point at or preceding that offset is located in the index. -// The input file is positioned to the specified location in the index, and if -// necessary the first few bits of the compressed data is read from the file. -// inflate is initialized with those bits and the 32K of uncompressed data, and -// decompression then proceeds until the desired offset in the file is reached. -// Then decompression continues to read the requested uncompressed data from -// the file. -// -// There is some fair bit of overhead to starting inflation for the random -// access, mainly copying the 32K byte dictionary. If small pieces of the file -// are being accessed, it would make sense to implement a cache to hold some -// lookahead to avoid many calls to deflate_index_extract() for small lengths. -// -// Another way to build an index would be to use inflateCopy(). That would not -// be constrained to have access points at block boundaries, but would require -// more memory per access point, and could not be saved to a file due to the -// use of pointers in the state. The approach here allows for storage of the -// index in a file. - -#include -#include -#include -#include -#include "zlib.h" -#include "zran.h" - -#define WINSIZE 32768U // sliding window size -#define CHUNK 16384 // file input buffer size - -// See comments in zran.h. -void deflate_index_free(struct deflate_index *index) { - if (index != NULL) { - free(index->list); - free(index); - } -} - -// Add an access point to the list. If out of memory, deallocate the existing -// list and return NULL. index->mode is temporarily the allocated number of -// access points, until it is time for deflate_index_build() to return. Then -// index->mode is set to the mode of inflation. -static struct deflate_index *add_point(struct deflate_index *index, int bits, - off_t in, off_t out, unsigned left, - unsigned char *window) { - if (index == NULL) { - // The list is empty. Create it, starting with eight access points. - index = malloc(sizeof(struct deflate_index)); - if (index == NULL) - return NULL; - index->have = 0; - index->mode = 8; - index->list = malloc(sizeof(point_t) * index->mode); - if (index->list == NULL) { - free(index); - return NULL; - } - } - - else if (index->have == index->mode) { - // The list is full. Make it bigger. - index->mode <<= 1; - point_t *next = realloc(index->list, sizeof(point_t) * index->mode); - if (next == NULL) { - deflate_index_free(index); - return NULL; - } - index->list = next; - } - - // Fill in the access point and increment how many we have. - point_t *next = (point_t *)(index->list) + index->have++; - if (index->have < 0) { - // Overflowed the int! - deflate_index_free(index); - return NULL; - } - next->out = out; - next->in = in; - next->bits = bits; - if (left) - memcpy(next->window, window + WINSIZE - left, left); - if (left < WINSIZE) - memcpy(next->window + left, window, WINSIZE - left); - - // Return the index, which may have been newly allocated or destroyed. - return index; -} - -// Decompression modes. These are the inflateInit2() windowBits parameter. -#define RAW -15 -#define ZLIB 15 -#define GZIP 31 - -// See comments in zran.h. -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built) { - // Set up inflation state. - z_stream strm = {0}; // inflate engine (gets fired up later) - unsigned char buf[CHUNK]; // input buffer - unsigned char win[WINSIZE] = {0}; // output sliding window - off_t totin = 0; // total bytes read from input - off_t totout = 0; // total bytes uncompressed - int mode = 0; // mode: RAW, ZLIB, or GZIP (0 => not set yet) - - // Decompress from in, generating access points along the way. - int ret; // the return value from zlib, or Z_ERRNO - off_t last; // last access point uncompressed offset - struct deflate_index *index = NULL; // list of access points - do { - // Assure available input, at least until reaching EOF. - if (strm.avail_in == 0) { - strm.avail_in = fread(buf, 1, sizeof(buf), in); - totin += strm.avail_in; - strm.next_in = buf; - if (strm.avail_in < sizeof(buf) && ferror(in)) { - ret = Z_ERRNO; - break; - } - - if (mode == 0) { - // At the start of the input -- determine the type. Assume raw - // if it is neither zlib nor gzip. This could in theory result - // in a false positive for zlib, but in practice the fill bits - // after a stored block are always zeros, so a raw stream won't - // start with an 8 in the low nybble. - mode = strm.avail_in == 0 ? RAW : // empty -- will fail - (strm.next_in[0] & 0xf) == 8 ? ZLIB : - strm.next_in[0] == 0x1f ? GZIP : - /* else */ RAW; - ret = inflateInit2(&strm, mode); - if (ret != Z_OK) - break; - } - } - - // Assure available output. This rotates the output through, for use as - // a sliding window on the uncompressed data. - if (strm.avail_out == 0) { - strm.avail_out = sizeof(win); - strm.next_out = win; - } - - if (mode == RAW && index == NULL) - // We skip the inflate() call at the start of raw deflate data in - // order generate an access point there. Set data_type to imitate - // the end of a header. - strm.data_type = 0x80; - else { - // Inflate and update the number of uncompressed bytes. - unsigned before = strm.avail_out; - ret = inflate(&strm, Z_BLOCK); - totout += before - strm.avail_out; - } - - if ((strm.data_type & 0xc0) == 0x80 && - (index == NULL || totout - last >= span)) { - // We are at the end of a header or a non-last deflate block, so we - // can add an access point here. Furthermore, we are either at the - // very start for the first access point, or there has been span or - // more uncompressed bytes since the last access point, so we want - // to add an access point here. - index = add_point(index, strm.data_type & 7, totin - strm.avail_in, - totout, strm.avail_out, win); - if (index == NULL) { - ret = Z_MEM_ERROR; - break; - } - last = totout; - } - - if (ret == Z_STREAM_END && mode == GZIP && - (strm.avail_in || ungetc(getc(in), in) != EOF)) - // There is more input after the end of a gzip member. Reset the - // inflate state to read another gzip member. On success, this will - // set ret to Z_OK to continue decompressing. - ret = inflateReset2(&strm, GZIP); - - // Keep going until Z_STREAM_END or error. If the compressed data ends - // prematurely without a file read error, Z_BUF_ERROR is returned. - } while (ret == Z_OK); - inflateEnd(&strm); - - if (ret != Z_STREAM_END) { - // An error was encountered. Discard the index and return a negative - // error code. - deflate_index_free(index); - return ret == Z_NEED_DICT ? Z_DATA_ERROR : ret; - } - - // Shrink the index to only the occupied access points and return it. - index->mode = mode; - index->length = totout; - point_t *list = realloc(index->list, sizeof(point_t) * index->have); - if (list == NULL) { - // Seems like a realloc() to make something smaller should always work, - // but just in case. - deflate_index_free(index); - return Z_MEM_ERROR; - } - index->list = list; - *built = index; - return index->have; -} - -#ifdef NOPRIME -// Support zlib versions before 1.2.3 (July 2005), or incomplete zlib clones -// that do not have inflatePrime(). - -# define INFLATEPRIME inflatePreface - -// Append the low bits bits of value to in[] at bit position *have, updating -// *have. value must be zero above its low bits bits. bits must be positive. -// This assumes that any bits above the *have bits in the last byte are zeros. -// That assumption is preserved on return, as any bits above *have + bits in -// the last byte written will be set to zeros. -static inline void append_bits(unsigned value, int bits, - unsigned char *in, int *have) { - in += *have >> 3; // where the first bits from value will go - int k = *have & 7; // the number of bits already there - *have += bits; - if (k) - *in |= value << k; // write value above the low k bits - else - *in = value; - k = 8 - k; // the number of bits just appended - while (bits > k) { - value >>= k; // drop the bits appended - bits -= k; - k = 8; // now at a byte boundary - *++in = value; - } -} - -// Insert enough bits in the form of empty deflate blocks in front of the -// low bits bits of value, in order to bring the sequence to a byte boundary. -// Then feed that to inflate(). This does what inflatePrime() does, except that -// a negative value of bits is not supported. bits must be in 0..16. If the -// arguments are invalid, Z_STREAM_ERROR is returned. Otherwise the return -// value from inflate() is returned. -static int inflatePreface(z_stream *strm, int bits, int value) { - // Check input. - if (strm == Z_NULL || bits < 0 || bits > 16) - return Z_STREAM_ERROR; - if (bits == 0) - return Z_OK; - value &= (2 << (bits - 1)) - 1; - - // An empty dynamic block with an odd number of bits (95). The high bit of - // the last byte is unused. - static const unsigned char dyn[] = { - 4, 0xe0, 0x81, 8, 0, 0, 0, 0, 0x20, 0xa8, 0xab, 0x1f - }; - const int dynlen = 95; // number of bits in the block - - // Build an input buffer for inflate that is a multiple of eight bits in - // length, and that ends with the low bits bits of value. - unsigned char in[(dynlen + 3 * 10 + 16 + 7) / 8]; - int have = 0; - if (bits & 1) { - // Insert an empty dynamic block to get to an odd number of bits, so - // when bits bits from value are appended, we are at an even number of - // bits. - memcpy(in, dyn, sizeof(dyn)); - have = dynlen; - } - while ((have + bits) & 7) - // Insert empty fixed blocks until appending bits bits would put us on - // a byte boundary. This will insert at most three fixed blocks. - append_bits(2, 10, in, &have); - - // Append the bits bits from value, which takes us to a byte boundary. - append_bits(value, bits, in, &have); - - // Deliver the input to inflate(). There is no output space provided, but - // inflate() can't get stuck waiting on output not ingesting all of the - // provided input. The reason is that there will be at most 16 bits of - // input from value after the empty deflate blocks (which themselves - // generate no output). At least ten bits are needed to generate the first - // output byte from a fixed block. The last two bytes of the buffer have to - // be ingested in order to get ten bits, which is the most that value can - // occupy. - strm->avail_in = have >> 3; - strm->next_in = in; - strm->avail_out = 0; - strm->next_out = in; // not used, but can't be NULL - return inflate(strm, Z_NO_FLUSH); -} - -#else -# define INFLATEPRIME inflatePrime -#endif - -// See comments in zran.h. -ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index, - off_t offset, unsigned char *buf, size_t len) { - // Do a quick sanity check on the index. - if (index == NULL || index->have < 1 || index->list[0].out != 0) - return Z_STREAM_ERROR; - - // If nothing to extract, return zero bytes extracted. - if (len == 0 || offset < 0 || offset >= index->length) - return 0; - - // Find the access point closest to but not after offset. - int lo = -1, hi = index->have; - point_t *point = index->list; - while (hi - lo > 1) { - int mid = (lo + hi) >> 1; - if (offset < point[mid].out) - hi = mid; - else - lo = mid; - } - point += lo; - - // Initialize the input file and prime the inflate engine to start there. - int ret = fseeko(in, point->in - (point->bits ? 1 : 0), SEEK_SET); - if (ret == -1) - return Z_ERRNO; - int ch = 0; - if (point->bits && (ch = getc(in)) == EOF) - return ferror(in) ? Z_ERRNO : Z_BUF_ERROR; - z_stream strm = {0}; - ret = inflateInit2(&strm, RAW); - if (ret != Z_OK) - return ret; - if (point->bits) - INFLATEPRIME(&strm, point->bits, ch >> (8 - point->bits)); - inflateSetDictionary(&strm, point->window, WINSIZE); - - // Skip uncompressed bytes until offset reached, then satisfy request. - unsigned char input[CHUNK]; - unsigned char discard[WINSIZE]; - offset -= point->out; // number of bytes to skip to get to offset - size_t left = len; // number of bytes left to read after offset - do { - if (offset) { - // Discard up to offset uncompressed bytes. - strm.avail_out = offset < WINSIZE ? (unsigned)offset : WINSIZE; - strm.next_out = discard; - } - else { - // Uncompress up to left bytes into buf. - strm.avail_out = left < UINT_MAX ? (unsigned)left : UINT_MAX; - strm.next_out = buf + len - left; - } - - // Uncompress, setting got to the number of bytes uncompressed. - if (strm.avail_in == 0) { - // Assure available input. - strm.avail_in = fread(input, 1, CHUNK, in); - if (strm.avail_in < CHUNK && ferror(in)) { - ret = Z_ERRNO; - break; - } - strm.next_in = input; - } - unsigned got = strm.avail_out; - ret = inflate(&strm, Z_NO_FLUSH); - got -= strm.avail_out; - - // Update the appropriate count. - if (offset) - offset -= got; - else - left -= got; - - // If we're at the end of a gzip member and there's more to read, - // continue to the next gzip member. - if (ret == Z_STREAM_END && index->mode == GZIP) { - // Discard the gzip trailer. - unsigned drop = 8; // length of gzip trailer - if (strm.avail_in >= drop) { - strm.avail_in -= drop; - strm.next_in += drop; - } - else { - // Read and discard the remainder of the gzip trailer. - drop -= strm.avail_in; - strm.avail_in = 0; - do { - if (getc(in) == EOF) - // The input does not have a complete trailer. - return ferror(in) ? Z_ERRNO : Z_BUF_ERROR; - } while (--drop); - } - - if (strm.avail_in || ungetc(getc(in), in) != EOF) { - // There's more after the gzip trailer. Use inflate to skip the - // gzip header and resume the raw inflate there. - inflateReset2(&strm, GZIP); - do { - if (strm.avail_in == 0) { - strm.avail_in = fread(input, 1, CHUNK, in); - if (strm.avail_in < CHUNK && ferror(in)) { - ret = Z_ERRNO; - break; - } - strm.next_in = input; - } - strm.avail_out = WINSIZE; - strm.next_out = discard; - ret = inflate(&strm, Z_BLOCK); // stop at end of header - } while (ret == Z_OK && (strm.data_type & 0x80) == 0); - if (ret != Z_OK) - break; - inflateReset2(&strm, RAW); - } - } - - // Continue until we have the requested data, the deflate data has - // ended, or an error is encountered. - } while (ret == Z_OK && left); - inflateEnd(&strm); - - // Return the number of uncompressed bytes read into buf, or the error. - return ret == Z_OK || ret == Z_STREAM_END ? len - left : ret; -} - -#ifdef TEST - -#define SPAN 1048576L // desired distance between access points -#define LEN 16384 // number of bytes to extract - -// Demonstrate the use of deflate_index_build() and deflate_index_extract() by -// processing the file provided on the command line, and extracting LEN bytes -// from 2/3rds of the way through the uncompressed output, writing that to -// stdout. An offset can be provided as the second argument, in which case the -// data is extracted from there instead. -int main(int argc, char **argv) { - // Open the input file. - if (argc < 2 || argc > 3) { - fprintf(stderr, "usage: zran file.raw [offset]\n"); - return 1; - } - FILE *in = fopen(argv[1], "rb"); - if (in == NULL) { - fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); - return 1; - } - - // Get optional offset. - off_t offset = -1; - if (argc == 3) { - char *end; - offset = strtoll(argv[2], &end, 10); - if (*end || offset < 0) { - fprintf(stderr, "zran: %s is not a valid offset\n", argv[2]); - return 1; - } - } - - // Build index. - struct deflate_index *index = NULL; - int len = deflate_index_build(in, SPAN, &index); - if (len < 0) { - fclose(in); - switch (len) { - case Z_MEM_ERROR: - fprintf(stderr, "zran: out of memory\n"); - break; - case Z_BUF_ERROR: - fprintf(stderr, "zran: %s ended prematurely\n", argv[1]); - break; - case Z_DATA_ERROR: - fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); - break; - case Z_ERRNO: - fprintf(stderr, "zran: read error on %s\n", argv[1]); - break; - default: - fprintf(stderr, "zran: error %d while building index\n", len); - } - return 1; - } - fprintf(stderr, "zran: built index with %d access points\n", len); - - // Use index by reading some bytes from an arbitrary offset. - unsigned char buf[LEN]; - if (offset == -1) - offset = ((index->length + 1) << 1) / 3; - ptrdiff_t got = deflate_index_extract(in, index, offset, buf, LEN); - if (got < 0) - fprintf(stderr, "zran: extraction failed: %s error\n", - got == Z_MEM_ERROR ? "out of memory" : "input corrupted"); - else { - fwrite(buf, 1, got, stdout); - fprintf(stderr, "zran: extracted %ld bytes at %lld\n", got, offset); - } - - // Clean up and exit. - deflate_index_free(index); - fclose(in); - return 0; -} - -#endif diff --git a/third_party/zlib/examples/zran.h b/third_party/zlib/examples/zran.h deleted file mode 100644 index 9428723..0000000 --- a/third_party/zlib/examples/zran.h +++ /dev/null @@ -1,52 +0,0 @@ -/* zran.h -- example of deflated stream indexing and random access - * Copyright (C) 2005, 2012, 2018, 2023 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.3 18 Feb 2023 Mark Adler */ - -#include -#include "zlib.h" - -// Access point. -typedef struct point { - off_t out; // offset in uncompressed data - off_t in; // offset in compressed file of first full byte - int bits; // 0, or number of bits (1-7) from byte at in-1 - unsigned char window[32768]; // preceding 32K of uncompressed data -} point_t; - -// Access point list. -struct deflate_index { - int have; // number of access points in list - int mode; // -15 for raw, 15 for zlib, or 31 for gzip - off_t length; // total length of uncompressed data - point_t *list; // allocated list of access points -}; - -// Make one pass through a zlib, gzip, or raw deflate compressed stream and -// build an index, with access points about every span bytes of uncompressed -// output. gzip files with multiple members are fully indexed. span should be -// chosen to balance the speed of random access against the memory requirements -// of the list, which is about 32K bytes per access point. The return value is -// the number of access points on success (>= 1), Z_MEM_ERROR for out of -// memory, Z_BUF_ERROR for a premature end of input, Z_DATA_ERROR for a format -// or verification error in the input file, or Z_ERRNO for a file read error. -// On success, *built points to the resulting index. -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built); - -// Use the index to read len bytes from offset into buf. Return the number of -// bytes read or a negative error code. If data is requested past the end of -// the uncompressed data, then deflate_index_extract() will return a value less -// than len, indicating how much was actually read into buf. If given a valid -// index, this function should not return an error unless the file was modified -// somehow since the index was generated, given that deflate_index_build() had -// validated all of the input. If nevertheless there is a failure, Z_BUF_ERROR -// is returned if the compressed data ends prematurely, Z_DATA_ERROR if the -// deflate compressed data is not valid, Z_MEM_ERROR if out of memory, -// Z_STREAM_ERROR if the index is not valid, or Z_ERRNO if there is an error -// reading or seeking on the input file. -ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index, - off_t offset, unsigned char *buf, size_t len); - -// Deallocate an index built by deflate_index_build(). -void deflate_index_free(struct deflate_index *index); - diff --git a/third_party/zlib/gzclose.c b/third_party/zlib/gzclose.c deleted file mode 100644 index 48d6a86..0000000 --- a/third_party/zlib/gzclose.c +++ /dev/null @@ -1,23 +0,0 @@ -/* gzclose.c -- zlib gzclose() function - * Copyright (C) 2004, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* gzclose() is in a separate file so that it is linked in only if it is used. - That way the other gzclose functions can be used instead to avoid linking in - unneeded compression or decompression routines. */ -int ZEXPORT gzclose(gzFile file) { -#ifndef NO_GZCOMPRESS - gz_statep state; - - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); -#else - return gzclose_r(file); -#endif -} diff --git a/third_party/zlib/gzguts.h b/third_party/zlib/gzguts.h deleted file mode 100644 index 35e7393..0000000 --- a/third_party/zlib/gzguts.h +++ /dev/null @@ -1,215 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004-2024 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#ifdef _LARGEFILE64_SOURCE -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# endif -# undef _FILE_OFFSET_BITS -# undef _TIME_BITS -#endif - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include -#include "zlib.h" -#ifdef STDC -# include -# include -# include -#endif - -#ifndef _POSIX_SOURCE -# define _POSIX_SOURCE -#endif -#include - -#ifdef _WIN32 -# include -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include -#endif - -#if defined(_WIN32) -# define WIDECHAR -#endif - -#ifdef WINAPI_FAMILY -# define open _open -# define read _read -# define write _write -# define close _close -#endif - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS -/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 -/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) -# define vsnprintf _vsnprintf -# endif -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -# ifdef VMS -# define NO_vsnprintf -# endif -# ifdef __OS400__ -# define NO_vsnprintf -# endif -# ifdef __MVS__ -# define NO_vsnprintf -# endif -#endif - -/* unlike snprintf (which is required in C99), _snprintf does not guarantee - null termination of the result -- however this is only used in gzlib.c where - the result is assured to fit in the space provided */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -# define snprintf _snprintf -#endif - -#ifndef local -# define local static -#endif -/* since "static" is used to mean two completely different things in C, we - define "local" for the non-static meaning of "static", for readability - (compile with -Dlocal if your debugger can't find static symbols) */ - -/* gz* functions always use library allocation functions */ -#ifndef STDC - extern voidp malloc(uInt size); - extern void free(voidpf ptr); -#endif - -/* get errno and strerror definition */ -#if defined UNDER_CE -# include -# define zstrerror() gz_strwinerror((DWORD)GetLastError()) -#else -# ifndef NO_STRERROR -# include -# define zstrerror() strerror(errno) -# else -# define zstrerror() "stdio error (consult errno)" -# endif -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); - ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); - ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); - ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif - -/* default i/o buffer size -- double this for output when reading (this and - twice this must be able to fit in an unsigned type) */ -#define GZBUFSIZE 8192 - -/* gzip modes, also provide a little integrity check on the passed structure */ -#define GZ_NONE 0 -#define GZ_READ 7247 -#define GZ_WRITE 31153 -#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ - -/* values for gz_state how */ -#define LOOK 0 /* look for a gzip header */ -#define COPY 1 /* copy input directly */ -#define GZIP 2 /* decompress a gzip stream */ - -/* internal gzip file state data structure */ -typedef struct { - /* exposed contents for gzgetc() macro */ - struct gzFile_s x; /* "x" for exposed */ - /* x.have: number of bytes available at x.next */ - /* x.next: next output data to deliver or write */ - /* x.pos: current position in uncompressed data */ - /* used for both reading and writing */ - int mode; /* see gzip modes above */ - int fd; /* file descriptor */ - char *path; /* path or fd for error messages */ - unsigned size; /* buffer size, zero if not allocated yet */ - unsigned want; /* requested buffer size, default is GZBUFSIZE */ - unsigned char *in; /* input buffer (double-sized when writing) */ - unsigned char *out; /* output buffer (double-sized when reading) */ - int direct; /* 0 if processing gzip, 1 if transparent */ - /* just for reading */ - int how; /* 0: get header, 1: copy, 2: decompress */ - z_off64_t start; /* where the gzip data started, for rewinding */ - int eof; /* true if end of input file reached */ - int past; /* true if read requested past end */ - /* just for writing */ - int level; /* compression level */ - int strategy; /* compression strategy */ - int reset; /* true if a reset is pending after a Z_FINISH */ - /* seek request */ - z_off64_t skip; /* amount to skip (already rewound if backwards) */ - int seek; /* true if seek request pending */ - /* error information */ - int err; /* error code */ - char *msg; /* error message */ - /* zlib inflate or deflate stream */ - z_stream strm; /* stream structure in-place (not a pointer) */ -} gz_state; -typedef gz_state FAR *gz_statep; - -/* shared functions */ -void ZLIB_INTERNAL gz_error(gz_statep, int, const char *); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror(DWORD error); -#endif - -/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t - value -- needed when comparing unsigned to z_off64_t, which is signed - (possible z_off64_t types off_t, off64_t, and long are all signed) */ -unsigned ZLIB_INTERNAL gz_intmax(void); -#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) - diff --git a/third_party/zlib/gzlib.c b/third_party/zlib/gzlib.c deleted file mode 100644 index 983153c..0000000 --- a/third_party/zlib/gzlib.c +++ /dev/null @@ -1,582 +0,0 @@ -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2024 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -#if defined UNDER_CE - -/* Map the Windows error number in ERROR to a locale-dependent error message - string and return a pointer to it. Typically, the values for ERROR come - from GetLastError. - - The string pointed to shall not be modified by the application, but may be - overwritten by a subsequent call to gz_strwinerror - - The gz_strwinerror function does not change the current setting of - GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror(DWORD error) { - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -#endif /* UNDER_CE */ - -/* Reset gzip file state */ -local void gz_reset(gz_statep state) { - state->x.have = 0; /* no output data available */ - if (state->mode == GZ_READ) { /* for reading ... */ - state->eof = 0; /* not at end of file */ - state->past = 0; /* have not read past end yet */ - state->how = LOOK; /* look for gzip header */ - } - else /* for writing ... */ - state->reset = 0; /* no deflateReset pending */ - state->seek = 0; /* no seek request pending */ - gz_error(state, Z_OK, NULL); /* clear error */ - state->x.pos = 0; /* no uncompressed data yet */ - state->strm.avail_in = 0; /* no input data yet */ -} - -/* Open a gzip file either by name or file descriptor. */ -local gzFile gz_open(const void *path, int fd, const char *mode) { - gz_statep state; - z_size_t len; - int oflag; -#ifdef O_CLOEXEC - int cloexec = 0; -#endif -#ifdef O_EXCL - int exclusive = 0; -#endif - - /* check input */ - if (path == NULL) - return NULL; - - /* allocate gzFile structure to return */ - state = (gz_statep)malloc(sizeof(gz_state)); - if (state == NULL) - return NULL; - state->size = 0; /* no buffers allocated yet */ - state->want = GZBUFSIZE; /* requested buffer size */ - state->msg = NULL; /* no error message yet */ - - /* interpret mode */ - state->mode = GZ_NONE; - state->level = Z_DEFAULT_COMPRESSION; - state->strategy = Z_DEFAULT_STRATEGY; - state->direct = 0; - while (*mode) { - if (*mode >= '0' && *mode <= '9') - state->level = *mode - '0'; - else - switch (*mode) { - case 'r': - state->mode = GZ_READ; - break; -#ifndef NO_GZCOMPRESS - case 'w': - state->mode = GZ_WRITE; - break; - case 'a': - state->mode = GZ_APPEND; - break; -#endif - case '+': /* can't read and write at the same time */ - free(state); - return NULL; - case 'b': /* ignore -- will request binary anyway */ - break; -#ifdef O_CLOEXEC - case 'e': - cloexec = 1; - break; -#endif -#ifdef O_EXCL - case 'x': - exclusive = 1; - break; -#endif - case 'f': - state->strategy = Z_FILTERED; - break; - case 'h': - state->strategy = Z_HUFFMAN_ONLY; - break; - case 'R': - state->strategy = Z_RLE; - break; - case 'F': - state->strategy = Z_FIXED; - break; - case 'T': - state->direct = 1; - break; - default: /* could consider as an error, but just ignore */ - ; - } - mode++; - } - - /* must provide an "r", "w", or "a" */ - if (state->mode == GZ_NONE) { - free(state); - return NULL; - } - - /* can't force transparent read */ - if (state->mode == GZ_READ) { - if (state->direct) { - free(state); - return NULL; - } - state->direct = 1; /* for empty file */ - } - - /* save the path name for error messages */ -#ifdef WIDECHAR - if (fd == -2) { - len = wcstombs(NULL, path, 0); - if (len == (z_size_t)-1) - len = 0; - } - else -#endif - len = strlen((const char *)path); - state->path = (char *)malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; - } -#ifdef WIDECHAR - if (fd == -2) - if (len) - wcstombs(state->path, path, len + 1); - else - *(state->path) = 0; - else -#endif -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(state->path, len + 1, "%s", (const char *)path); -#else - strcpy(state->path, path); -#endif - - /* compute the flags for open() */ - oflag = -#ifdef O_LARGEFILE - O_LARGEFILE | -#endif -#ifdef O_BINARY - O_BINARY | -#endif -#ifdef O_CLOEXEC - (cloexec ? O_CLOEXEC : 0) | -#endif - (state->mode == GZ_READ ? - O_RDONLY : - (O_WRONLY | O_CREAT | -#ifdef O_EXCL - (exclusive ? O_EXCL : 0) | -#endif - (state->mode == GZ_WRITE ? - O_TRUNC : - O_APPEND))); - - /* open the file with the appropriate flags (or just use fd) */ - state->fd = fd > -1 ? fd : ( -#ifdef WIDECHAR - fd == -2 ? _wopen(path, oflag, 0666) : -#endif - open((const char *)path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); - return NULL; - } - if (state->mode == GZ_APPEND) { - LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ - state->mode = GZ_WRITE; /* simplify later checks */ - } - - /* save the current position for rewinding (only if reading) */ - if (state->mode == GZ_READ) { - state->start = LSEEK(state->fd, 0, SEEK_CUR); - if (state->start == -1) state->start = 0; - } - - /* initialize stream */ - gz_reset(state); - - /* return stream */ - return (gzFile)state; -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen(const char *path, const char *mode) { - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(const char *path, const char *mode) { - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(int fd, const char *mode) { - char *path; /* identifier for error messages */ - gzFile gz; - - if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(path, 7 + 3 * sizeof(int), "", fd); -#else - sprintf(path, "", fd); /* for debugging */ -#endif - gz = gz_open(path, fd, mode); - free(path); - return gz; -} - -/* -- see zlib.h -- */ -#ifdef WIDECHAR -gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) { - return gz_open(path, -2, mode); -} -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzbuffer(gzFile file, unsigned size) { - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* make sure we haven't already allocated memory */ - if (state->size != 0) - return -1; - - /* check and set requested size */ - if ((size << 1) < size) - return -1; /* need to be able to double it */ - if (size < 8) - size = 8; /* needed to behave well with flushing */ - state->want = size; - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzrewind(gzFile file) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* back up and start over */ - if (LSEEK(state->fd, state->start, SEEK_SET) == -1) - return -1; - gz_reset(state); - return 0; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) { - unsigned n; - z_off64_t ret; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* check that there's no error */ - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* can only seek from start or relative to current position */ - if (whence != SEEK_SET && whence != SEEK_CUR) - return -1; - - /* normalize offset to a SEEK_CUR specification */ - if (whence == SEEK_SET) - offset -= state->x.pos; - else if (state->seek) - offset += state->skip; - state->seek = 0; - - /* if within raw area while reading, just go there */ - if (state->mode == GZ_READ && state->how == COPY && - state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); - if (ret == -1) - return -1; - state->x.have = 0; - state->eof = 0; - state->past = 0; - state->seek = 0; - gz_error(state, Z_OK, NULL); - state->strm.avail_in = 0; - state->x.pos += offset; - return state->x.pos; - } - - /* calculate skip amount, rewinding if needed for back seek when reading */ - if (offset < 0) { - if (state->mode != GZ_READ) /* writing -- can't go backwards */ - return -1; - offset += state->x.pos; - if (offset < 0) /* before start of file! */ - return -1; - if (gzrewind(file) == -1) /* rewind, then skip to offset */ - return -1; - } - - /* if reading, skip what's in output buffer (one less gzgetc() check) */ - if (state->mode == GZ_READ) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? - (unsigned)offset : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - offset -= n; - } - - /* request skip (if not zero) */ - if (offset) { - state->seek = 1; - state->skip = offset; - } - return state->x.pos + offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) { - z_off64_t ret; - - ret = gzseek64(file, (z_off64_t)offset, whence); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gztell64(gzFile file) { - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* return position */ - return state->x.pos + (state->seek ? state->skip : 0); -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gztell(gzFile file) { - z_off64_t ret; - - ret = gztell64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzoffset64(gzFile file) { - z_off64_t offset; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* compute and return effective offset in file */ - offset = LSEEK(state->fd, 0, SEEK_CUR); - if (offset == -1) - return -1; - if (state->mode == GZ_READ) /* reading */ - offset -= state->strm.avail_in; /* don't count buffered input */ - return offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzoffset(gzFile file) { - z_off64_t ret; - - ret = gzoffset64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzeof(gzFile file) { - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return 0; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return 0; - - /* return end-of-file state */ - return state->mode == GZ_READ ? state->past : 0; -} - -/* -- see zlib.h -- */ -const char * ZEXPORT gzerror(gzFile file, int *errnum) { - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return NULL; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return NULL; - - /* return error information */ - if (errnum != NULL) - *errnum = state->err; - return state->err == Z_MEM_ERROR ? "out of memory" : - (state->msg == NULL ? "" : state->msg); -} - -/* -- see zlib.h -- */ -void ZEXPORT gzclearerr(gzFile file) { - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return; - - /* clear error and end-of-file */ - if (state->mode == GZ_READ) { - state->eof = 0; - state->past = 0; - } - gz_error(state, Z_OK, NULL); -} - -/* Create an error message in allocated memory and set state->err and - state->msg accordingly. Free any previous error message already there. Do - not try to free or allocate space if the error is Z_MEM_ERROR (out of - memory). Simply save the error message as a static string. If there is an - allocation failure constructing the error message, then convert the error to - out of memory. */ -void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { - /* free previously allocated message and clear */ - if (state->msg != NULL) { - if (state->err != Z_MEM_ERROR) - free(state->msg); - state->msg = NULL; - } - - /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ - if (err != Z_OK && err != Z_BUF_ERROR) - state->x.have = 0; - - /* set error code, and if no message, then done */ - state->err = err; - if (msg == NULL) - return; - - /* for an out of memory error, return literal string when requested */ - if (err == Z_MEM_ERROR) - return; - - /* construct error message with path */ - if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == - NULL) { - state->err = Z_MEM_ERROR; - return; - } -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, - "%s%s%s", state->path, ": ", msg); -#else - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); -#endif -} - -/* portably return maximum value for an int (when limits.h presumed not - available) -- we need to do this to cover cases where 2's complement not - used, since C standard permits 1's complement and sign-bit representations, - otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax(void) { -#ifdef INT_MAX - return INT_MAX; -#else - unsigned p = 1, q; - do { - q = p; - p <<= 1; - p++; - } while (p > q); - return q >> 1; -#endif -} diff --git a/third_party/zlib/gzread.c b/third_party/zlib/gzread.c deleted file mode 100644 index 4168cbc..0000000 --- a/third_party/zlib/gzread.c +++ /dev/null @@ -1,602 +0,0 @@ -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from - state->fd, and update state->eof, state->err, and state->msg as appropriate. - This function needs to loop on read(), since read() is not guaranteed to - read the number of bytes requested, depending on the type of descriptor. */ -local int gz_load(gz_statep state, unsigned char *buf, unsigned len, - unsigned *have) { - int ret; - unsigned get, max = ((unsigned)-1 >> 2) + 1; - - *have = 0; - do { - get = len - *have; - if (get > max) - get = max; - ret = read(state->fd, buf + *have, get); - if (ret <= 0) - break; - *have += (unsigned)ret; - } while (*have < len); - if (ret < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (ret == 0) - state->eof = 1; - return 0; -} - -/* Load up input buffer and set eof flag if last data loaded -- return -1 on - error, 0 otherwise. Note that the eof flag is set when the end of the input - file is reached, even though there may be unused data in the buffer. Once - that data has been used, no more attempts will be made to read the file. - If strm->avail_in != 0, then the current data is moved to the beginning of - the input buffer, and then the remainder of the buffer is loaded with the - available data from the input file. */ -local int gz_avail(gz_statep state) { - unsigned got; - z_streamp strm = &(state->strm); - - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in; - unsigned const char *q = strm->next_in; - unsigned n = strm->avail_in; - do { - *p++ = *q++; - } while (--n); - } - if (gz_load(state, state->in + strm->avail_in, - state->size - strm->avail_in, &got) == -1) - return -1; - strm->avail_in += got; - strm->next_in = state->in; - } - return 0; -} - -/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. - If this is the first time in, allocate required memory. state->how will be - left unchanged if there is no more input data available, will be set to COPY - if there is no gzip header and direct copying will be performed, or it will - be set to GZIP for decompression. If direct copying, then leftover input - data from the input buffer will be copied to the output buffer. In that - case, all further file reads will be directly to either the output buffer or - a user buffer. If decompressing, the inflate state will be initialized. - gz_look() will return 0 on success or -1 on failure. */ -local int gz_look(gz_statep state) { - z_streamp strm = &(state->strm); - - /* allocate read buffers and inflate memory */ - if (state->size == 0) { - /* allocate buffers */ - state->in = (unsigned char *)malloc(state->want); - state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - state->size = state->want; - - /* allocate inflate memory */ - state->strm.zalloc = Z_NULL; - state->strm.zfree = Z_NULL; - state->strm.opaque = Z_NULL; - state->strm.avail_in = 0; - state->strm.next_in = Z_NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ - free(state->out); - free(state->in); - state->size = 0; - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* get at least the magic bytes in the input buffer */ - if (strm->avail_in < 2) { - if (gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) - return 0; - } - - /* look for gzip magic bytes -- if there, do gzip decoding (note: there is - a logical dilemma here when considering the case of a partially written - gzip file, to wit, if a single 31 byte is written, then we cannot tell - whether this is a single-byte file, or just a partially written gzip - file -- for here we assume that if a gzip file is being written, then - the header will be written in a single operation, so that reading a - single byte is sufficient indication that it is not a gzip file) */ - if (strm->avail_in > 1 && - strm->next_in[0] == 31 && strm->next_in[1] == 139) { - inflateReset(strm); - state->how = GZIP; - state->direct = 0; - return 0; - } - - /* no gzip header -- if we were decoding gzip before, then this is trailing - garbage. Ignore the trailing garbage and finish. */ - if (state->direct == 0) { - strm->avail_in = 0; - state->eof = 1; - state->x.have = 0; - return 0; - } - - /* doing raw i/o, copy any leftover input to output -- this assumes that - the output buffer is larger than the input buffer, which also assures - space for gzungetc() */ - state->x.next = state->out; - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - state->how = COPY; - state->direct = 1; - return 0; -} - -/* Decompress from input to the provided next_out and avail_out in the state. - On return, state->x.have and state->x.next point to the just decompressed - data. If the gzip stream completes, state->how is reset to LOOK to look for - the next gzip stream or raw data, once state->x.have is depleted. Returns 0 - on success, -1 on failure. */ -local int gz_decomp(gz_statep state) { - int ret = Z_OK; - unsigned had; - z_streamp strm = &(state->strm); - - /* fill output buffer up to end of deflate stream */ - had = strm->avail_out; - do { - /* get more input for inflate() */ - if (strm->avail_in == 0 && gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) { - gz_error(state, Z_BUF_ERROR, "unexpected end of file"); - break; - } - - /* decompress and handle errors */ - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { - gz_error(state, Z_STREAM_ERROR, - "internal error: inflate stream corrupt"); - return -1; - } - if (ret == Z_MEM_ERROR) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ - gz_error(state, Z_DATA_ERROR, - strm->msg == NULL ? "compressed data error" : strm->msg); - return -1; - } - } while (strm->avail_out && ret != Z_STREAM_END); - - /* update available output */ - state->x.have = had - strm->avail_out; - state->x.next = strm->next_out - state->x.have; - - /* if the gzip stream completed successfully, look for another */ - if (ret == Z_STREAM_END) - state->how = LOOK; - - /* good decompression */ - return 0; -} - -/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. - Data is either copied from the input file or decompressed from the input - file depending on state->how. If state->how is LOOK, then a gzip header is - looked for to determine whether to copy or decompress. Returns -1 on error, - otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the - end of the input file has been reached and all data has been processed. */ -local int gz_fetch(gz_statep state) { - z_streamp strm = &(state->strm); - - do { - switch(state->how) { - case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ - if (gz_look(state) == -1) - return -1; - if (state->how == LOOK) - return 0; - break; - case COPY: /* -> COPY */ - if (gz_load(state, state->out, state->size << 1, &(state->x.have)) - == -1) - return -1; - state->x.next = state->out; - return 0; - case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ - strm->avail_out = state->size << 1; - strm->next_out = state->out; - if (gz_decomp(state) == -1) - return -1; - } - } while (state->x.have == 0 && (!state->eof || strm->avail_in)); - return 0; -} - -/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ -local int gz_skip(gz_statep state, z_off64_t len) { - unsigned n; - - /* skip over len bytes or reach end-of-file, whichever comes first */ - while (len) - /* skip over whatever is in output buffer */ - if (state->x.have) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? - (unsigned)len : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - len -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) - break; - - /* need more data to skip -- load up output buffer */ - else { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - } - return 0; -} - -/* Read len bytes into buf from file, or less than len up to the end of the - input. Return the number of bytes read. If zero is returned, either the - end of file was reached, or there was an error. state->err must be - consulted in that case to determine which. */ -local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) { - z_size_t got; - unsigned n; - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return 0; - } - - /* get len bytes to buf, or less than len if at the end */ - got = 0; - do { - /* set n to the maximum amount of len that fits in an unsigned int */ - n = (unsigned)-1; - if (n > len) - n = (unsigned)len; - - /* first just try copying data from the output buffer */ - if (state->x.have) { - if (state->x.have < n) - n = state->x.have; - memcpy(buf, state->x.next, n); - state->x.next += n; - state->x.have -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) { - state->past = 1; /* tried to read past end */ - break; - } - - /* need output data -- for small len or new stream load up our output - buffer */ - else if (state->how == LOOK || n < (state->size << 1)) { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return 0; - continue; /* no progress yet -- go back to copy above */ - /* the copy above assures that we will leave with space in the - output buffer, allowing at least one gzungetc() to succeed */ - } - - /* large len -- read directly into user buffer */ - else if (state->how == COPY) { /* read directly */ - if (gz_load(state, (unsigned char *)buf, n, &n) == -1) - return 0; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - state->strm.avail_out = n; - state->strm.next_out = (unsigned char *)buf; - if (gz_decomp(state) == -1) - return 0; - n = state->x.have; - state->x.have = 0; - } - - /* update progress */ - len -= n; - buf = (char *)buf + n; - got += n; - state->x.pos += n; - } while (len); - - /* return number of bytes read into user buffer */ - return got; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids a flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in an int"); - return -1; - } - - /* read len or fewer bytes to buf */ - len = (unsigned)gz_read(state, buf, len); - - /* check for an error */ - if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* return the number of bytes read (this is assured to fit in an int) */ - return (int)len; -} - -/* -- see zlib.h -- */ -z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file) { - z_size_t len; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return 0; - - /* compute bytes to read -- error on overflow */ - len = nitems * size; - if (size && len / size != nitems) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); - return 0; - } - - /* read len or fewer bytes to buf, return the number of full items read */ - return len ? gz_read(state, buf, len) / size : 0; -} - -/* -- see zlib.h -- */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -#else -# undef gzgetc -#endif -int ZEXPORT gzgetc(gzFile file) { - unsigned char buf[1]; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* try output buffer (no need to check for skip request) */ - if (state->x.have) { - state->x.have--; - state->x.pos++; - return *(state->x.next)++; - } - - /* nothing there -- try gz_read() */ - return gz_read(state, buf, 1) < 1 ? -1 : buf[0]; -} - -int ZEXPORT gzgetc_(gzFile file) { - return gzgetc(file); -} - -/* -- see zlib.h -- */ -int ZEXPORT gzungetc(int c, gzFile file) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* in case this was just opened, set up the input buffer */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) - (void)gz_look(state); - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* can't push EOF */ - if (c < 0) - return -1; - - /* if output buffer empty, put byte at end (allows more pushing) */ - if (state->x.have == 0) { - state->x.have = 1; - state->x.next = state->out + (state->size << 1) - 1; - state->x.next[0] = (unsigned char)c; - state->x.pos--; - state->past = 0; - return c; - } - - /* if no room, give up (must have already done a gzungetc()) */ - if (state->x.have == (state->size << 1)) { - gz_error(state, Z_DATA_ERROR, "out of room to push characters"); - return -1; - } - - /* slide output data if needed and insert byte before existing data */ - if (state->x.next == state->out) { - unsigned char *src = state->out + state->x.have; - unsigned char *dest = state->out + (state->size << 1); - while (src > state->out) - *--dest = *--src; - state->x.next = dest; - } - state->x.have++; - state->x.next--; - state->x.next[0] = (unsigned char)c; - state->x.pos--; - state->past = 0; - return c; -} - -/* -- see zlib.h -- */ -char * ZEXPORT gzgets(gzFile file, char *buf, int len) { - unsigned left, n; - char *str; - unsigned char *eol; - gz_statep state; - - /* check parameters and get internal structure */ - if (file == NULL || buf == NULL || len < 1) - return NULL; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return NULL; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return NULL; - } - - /* copy output bytes up to new line or len - 1, whichever comes first -- - append a terminating zero to the string (we don't check for a zero in - the contents, let the user worry about that) */ - str = buf; - left = (unsigned)len - 1; - if (left) do { - /* assure that something is in the output buffer */ - if (state->x.have == 0 && gz_fetch(state) == -1) - return NULL; /* error */ - if (state->x.have == 0) { /* end of file */ - state->past = 1; /* read past end */ - break; /* return what we have */ - } - - /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; - eol = (unsigned char *)memchr(state->x.next, '\n', n); - if (eol != NULL) - n = (unsigned)(eol - state->x.next) + 1; - - /* copy through end-of-line, or remainder if not found */ - memcpy(buf, state->x.next, n); - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - left -= n; - buf += n; - } while (left && eol == NULL); - - /* return terminated string, or if nothing, end of file */ - if (buf == str) - return NULL; - buf[0] = 0; - return str; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzdirect(gzFile file) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* if the state is not known, but we can find out, then do so (this is - mainly for right after a gzopen() or gzdopen()) */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) - (void)gz_look(state); - - /* return 1 if transparent, 0 if processing a gzip stream */ - return state->direct; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_r(gzFile file) { - int ret, err; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're reading */ - if (state->mode != GZ_READ) - return Z_STREAM_ERROR; - - /* free memory and close file */ - if (state->size) { - inflateEnd(&(state->strm)); - free(state->out); - free(state->in); - } - err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; - gz_error(state, Z_OK, NULL); - free(state->path); - ret = close(state->fd); - free(state); - return ret ? Z_ERRNO : err; -} diff --git a/third_party/zlib/gzwrite.c b/third_party/zlib/gzwrite.c deleted file mode 100644 index 435b462..0000000 --- a/third_party/zlib/gzwrite.c +++ /dev/null @@ -1,631 +0,0 @@ -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Initialize state for writing a gzip file. Mark initialization by setting - state->size to non-zero. Return -1 on a memory allocation failure, or 0 on - success. */ -local int gz_init(gz_statep state) { - int ret; - z_streamp strm = &(state->strm); - - /* allocate input buffer (double size for gzprintf) */ - state->in = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ - state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* allocate deflate memory, set up for gzip compression */ - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = deflateInit2(strm, state->level, Z_DEFLATED, - MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); - if (ret != Z_OK) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - strm->next_in = NULL; - } - - /* mark state as initialized */ - state->size = state->want; - - /* initialize write buffer if compressing */ - if (!state->direct) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = strm->next_out; - } - return 0; -} - -/* Compress whatever is at avail_in and next_in and write to the output file. - Return -1 if there is an error writing to the output file or if gz_init() - fails to allocate memory, otherwise 0. flush is assumed to be a valid - deflate() flush value. If flush is Z_FINISH, then the deflate() state is - reset to start a new gzip stream. If gz->direct is true, then simply write - to the output file without compressing, and ignore flush. */ -local int gz_comp(gz_statep state, int flush) { - int ret, writ; - unsigned have, put, max = ((unsigned)-1 >> 2) + 1; - z_streamp strm = &(state->strm); - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return -1; - - /* write directly if requested */ - if (state->direct) { - while (strm->avail_in) { - put = strm->avail_in > max ? max : strm->avail_in; - writ = write(state->fd, strm->next_in, put); - if (writ < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - strm->avail_in -= (unsigned)writ; - strm->next_in += writ; - } - return 0; - } - - /* check for a pending reset */ - if (state->reset) { - /* don't start a new gzip member unless there is data to write */ - if (strm->avail_in == 0) - return 0; - deflateReset(strm); - state->reset = 0; - } - - /* run deflate() on provided input until it produces no more output */ - ret = Z_OK; - do { - /* write out current buffer contents if full, or if flushing, but if - doing Z_FINISH then don't write until we get to Z_STREAM_END */ - if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && - (flush != Z_FINISH || ret == Z_STREAM_END))) { - while (strm->next_out > state->x.next) { - put = strm->next_out - state->x.next > (int)max ? max : - (unsigned)(strm->next_out - state->x.next); - writ = write(state->fd, state->x.next, put); - if (writ < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - state->x.next += writ; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = state->out; - } - } - - /* compress */ - have = strm->avail_out; - ret = deflate(strm, flush); - if (ret == Z_STREAM_ERROR) { - gz_error(state, Z_STREAM_ERROR, - "internal error: deflate stream corrupt"); - return -1; - } - have -= strm->avail_out; - } while (have); - - /* if that completed a deflate stream, allow another to start */ - if (flush == Z_FINISH) - state->reset = 1; - - /* all done, no errors */ - return 0; -} - -/* Compress len zeros to output. Return -1 on a write error or memory - allocation failure by gz_comp(), or 0 on success. */ -local int gz_zero(gz_statep state, z_off64_t len) { - int first; - unsigned n; - z_streamp strm = &(state->strm); - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - - /* compress len zeros (len guaranteed > 0) */ - first = 1; - while (len) { - n = GT_OFF(state->size) || (z_off64_t)state->size > len ? - (unsigned)len : state->size; - if (first) { - memset(state->in, 0, n); - first = 0; - } - strm->avail_in = n; - strm->next_in = state->in; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - len -= n; - } - return 0; -} - -/* Write len bytes from buf to file. Return the number of bytes written. If - the returned value is less than len, then there was an error. */ -local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) { - z_size_t put = len; - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* for small len, copy to input buffer, otherwise compress directly */ - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { - unsigned have, copy; - - if (state->strm.avail_in == 0) - state->strm.next_in = state->in; - have = (unsigned)((state->strm.next_in + state->strm.avail_in) - - state->in); - copy = state->size - have; - if (copy > len) - copy = (unsigned)len; - memcpy(state->in + have, buf, copy); - state->strm.avail_in += copy; - state->x.pos += copy; - buf = (const char *)buf + copy; - len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); - } - else { - /* consume whatever's left in the input buffer */ - if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* directly compress user buffer to file */ - state->strm.next_in = (z_const Bytef *)buf; - do { - unsigned n = (unsigned)-1; - if (n > len) - n = (unsigned)len; - state->strm.avail_in = n; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - len -= n; - } while (len); - } - - /* input was all buffered or compressed */ - return put; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids a flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return 0; - } - - /* write len bytes from buf (the return value will fit in an int) */ - return (int)gz_write(state, buf, len); -} - -/* -- see zlib.h -- */ -z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems, - gzFile file) { - z_size_t len; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* compute bytes to read -- error on overflow */ - len = nitems * size; - if (size && len / size != nitems) { - gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); - return 0; - } - - /* write len bytes to buf, return the number of full items written */ - return len ? gz_write(state, buf, len) / size : 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputc(gzFile file, int c) { - unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ - if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - if (have < state->size) { - state->in[have] = (unsigned char)c; - strm->avail_in++; - state->x.pos++; - return c & 0xff; - } - } - - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = (unsigned char)c; - if (gz_write(state, buf, 1) != 1) - return -1; - return c & 0xff; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputs(gzFile file, const char *s) { - z_size_t len, put; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* write string */ - len = strlen(s); - if ((int)len < 0 || (unsigned)len != len) { - gz_error(state, Z_STREAM_ERROR, "string length does not fit in int"); - return -1; - } - put = gz_write(state, s, len); - return put < len ? -1 : (int)len; -} - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - -/* -- see zlib.h -- */ -int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) { - int len; - unsigned left; - char *next; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return state->err; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* do the printf() into the input buffer, put length in len -- the input - buffer is double-sized just for this function, so there is guaranteed to - be state->size bytes available after the current contents */ - if (strm->avail_in == 0) - strm->next_in = state->in; - next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in); - next[state->size - 1] = 0; -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf(next, format, va); - for (len = 0; len < state->size; len++) - if (next[len] == 0) break; -# else - len = vsprintf(next, format, va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf(next, state->size, format, va); - len = strlen(next); -# else - len = vsnprintf(next, state->size, format, va); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0) - return 0; - - /* update buffer and position, compress first half if past that */ - strm->avail_in += (unsigned)len; - state->x.pos += len; - if (strm->avail_in >= state->size) { - left = strm->avail_in - state->size; - strm->avail_in = state->size; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return state->err; - memmove(state->in, state->in + state->size, left); - strm->next_in = state->in; - strm->avail_in = left; - } - return len; -} - -int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) { - va_list va; - int ret; - - va_start(va, format); - ret = gzvprintf(file, format, va); - va_end(va); - return ret; -} - -#else /* !STDC && !Z_HAVE_STDARG_H */ - -/* -- see zlib.h -- */ -int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, int a3, - int a4, int a5, int a6, int a7, int a8, int a9, int a10, - int a11, int a12, int a13, int a14, int a15, int a16, - int a17, int a18, int a19, int a20) { - unsigned len, left; - char *next; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return Z_STREAM_ERROR; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return state->error; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->error; - } - - /* do the printf() into the input buffer, put length in len -- the input - buffer is double-sized just for this function, so there is guaranteed to - be state->size bytes available after the current contents */ - if (strm->avail_in == 0) - strm->next_in = state->in; - next = (char *)(strm->next_in + strm->avail_in); - next[state->size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, - a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < size; len++) - if (next[len] == 0) - break; -# else - len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, - a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, - a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen(next); -# else - len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len == 0 || len >= state->size || next[state->size - 1] != 0) - return 0; - - /* update buffer and position, compress first half if past that */ - strm->avail_in += len; - state->x.pos += len; - if (strm->avail_in >= state->size) { - left = strm->avail_in - state->size; - strm->avail_in = state->size; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return state->err; - memmove(state->in, state->in + state->size, left); - strm->next_in = state->in; - strm->avail_in = left; - } - return (int)len; -} - -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzflush(gzFile file, int flush) { - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* check flush parameter */ - if (flush < 0 || flush > Z_FINISH) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* compress remaining data with requested flush */ - (void)gz_comp(state, flush); - return state->err; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzsetparams(gzFile file, int level, int strategy) { - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK || state->direct) - return Z_STREAM_ERROR; - - /* if no change is requested, then do nothing */ - if (level == state->level && strategy == state->strategy) - return Z_OK; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return state->err; - } - - /* change compression parameters for subsequent input */ - if (state->size) { - /* flush previous input with previous parameters before changing */ - if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1) - return state->err; - deflateParams(strm, level, strategy); - } - state->level = level; - state->strategy = strategy; - return Z_OK; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_w(gzFile file) { - int ret = Z_OK; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing */ - if (state->mode != GZ_WRITE) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - ret = state->err; - } - - /* flush, free memory, and close file */ - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - if (state->size) { - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); - } - free(state->in); - } - gz_error(state, Z_OK, NULL); - free(state->path); - if (close(state->fd) == -1) - ret = Z_ERRNO; - free(state); - return ret; -} diff --git a/third_party/zlib/infback.c b/third_party/zlib/infback.c deleted file mode 100644 index e7b25b3..0000000 --- a/third_party/zlib/infback.c +++ /dev/null @@ -1,628 +0,0 @@ -/* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - This code is largely copied from inflate.c. Normally either infback.o or - inflate.o would be linked into an application--not both. The interface - with inffast.c is retained so that optimized assembler-coded versions of - inflate_fast() can be used with either inflate.c or infback.c. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -/* - strm provides memory allocation functions in zalloc and zfree, or - Z_NULL to use the library memory allocation functions. - - windowBits is in the range 8..15, and window is a user-supplied - window and output buffer that is 2**windowBits bytes. - */ -int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, - unsigned char FAR *window, const char *version, - int stream_size) { - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL || window == Z_NULL || - windowBits < 8 || windowBits > 15) - return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *)ZALLOC(strm, 1, - sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->dmax = 32768U; - state->wbits = (uInt)windowBits; - state->wsize = 1U << windowBits; - state->window = window; - state->wnext = 0; - state->whave = 0; - state->sane = 1; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(struct inflate_state FAR *state) { -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -/* Macros for inflateBack(): */ - -/* Load returned state from inflate_fast() */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Set state from registers for inflate_fast() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Assure that some input is available. If input is requested, but denied, - then return a Z_BUF_ERROR from inflateBack(). */ -#define PULL() \ - do { \ - if (have == 0) { \ - have = in(in_desc, &next); \ - if (have == 0) { \ - next = Z_NULL; \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflateBack() - with an error if there is no input available. */ -#define PULLBYTE() \ - do { \ - PULL(); \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflateBack() with - an error. */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* Assure that some output space is available, by writing out the window - if it's full. If the write fails, return from inflateBack() with a - Z_BUF_ERROR. */ -#define ROOM() \ - do { \ - if (left == 0) { \ - put = state->window; \ - left = state->wsize; \ - state->whave = left; \ - if (out(out_desc, put, left)) { \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* - strm provides the memory allocation functions and window buffer on input, - and provides information on the unused input on return. For Z_DATA_ERROR - returns, strm will also provide an error message. - - in() and out() are the call-back input and output functions. When - inflateBack() needs more input, it calls in(). When inflateBack() has - filled the window with output, or when it completes with data in the - window, it calls out() to write out the data. The application must not - change the provided input until in() is called again or inflateBack() - returns. The application must not change the window/output buffer until - inflateBack() returns. - - in() and out() are called with a descriptor parameter provided in the - inflateBack() call. This parameter can be a structure that provides the - information required to do the read or write, as well as accumulated - information on the input and output such as totals and check values. - - in() should return zero on failure. out() should return non-zero on - failure. If either in() or out() fails, than inflateBack() returns a - Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it - was in() or out() that caused in the error. Otherwise, inflateBack() - returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format - error, or Z_MEM_ERROR if it could not allocate memory for the state. - inflateBack() can also return Z_STREAM_ERROR if the input parameters - are not correct, i.e. strm is Z_NULL or the state was not initialized. - */ -int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc) { - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - /* Check that the strm exists and that the state was initialized */ - if (strm == Z_NULL || strm->state == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* Reset the state */ - strm->msg = Z_NULL; - state->mode = TYPE; - state->last = 0; - state->whave = 0; - next = strm->next_in; - have = next != Z_NULL ? strm->avail_in : 0; - hold = 0; - bits = 0; - put = state->window; - left = state->wsize; - - /* Inflate until end of block marked as last */ - for (;;) - switch (state->mode) { - case TYPE: - /* determine and dispatch block type */ - if (state->last) { - BYTEBITS(); - state->mode = DONE; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN; /* decode codes */ - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - - case STORED: - /* get and verify stored block length */ - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - - /* copy stored block from input to output */ - while (state->length != 0) { - copy = state->length; - PULL(); - ROOM(); - if (copy > have) copy = have; - if (copy > left) copy = left; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - - case TABLE: - /* get dynamic table entries descriptor */ - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - - /* get code length code lengths (not a typo) */ - state->have = 0; - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - - /* get length and distance code code lengths */ - state->have = 0; - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = (unsigned)(state->lens[state->have - 1]); - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (code const FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN; - /* fallthrough */ - - case LEN: - /* use inflate_fast() if we have enough input and output */ - if (have >= 6 && left >= 258) { - RESTORE(); - if (state->whave < state->wsize) - state->whave = state->wsize - left; - inflate_fast(strm, state->wsize); - LOAD(); - break; - } - - /* get a literal, length, or end-of-block code */ - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - state->length = (unsigned)here.val; - - /* process literal */ - if (here.op == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - ROOM(); - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - } - - /* process end of block */ - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - - /* invalid code */ - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - - /* length code -- get extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - - /* get distance code */ - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - - /* get distance extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - } - if (state->offset > state->wsize - (state->whave < state->wsize ? - left : 0)) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - - /* copy match from window to output */ - do { - ROOM(); - copy = state->wsize - state->offset; - if (copy < left) { - from = put + copy; - copy = left - copy; - } - else { - from = put - state->offset; - copy = left; - } - if (copy > state->length) copy = state->length; - state->length -= copy; - left -= copy; - do { - *put++ = *from++; - } while (--copy); - } while (state->length != 0); - break; - - case DONE: - /* inflate stream terminated properly */ - ret = Z_STREAM_END; - goto inf_leave; - - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - - default: - /* can't happen, but makes compilers happy */ - ret = Z_STREAM_ERROR; - goto inf_leave; - } - - /* Write leftover output and return unused input */ - inf_leave: - if (left < state->wsize) { - if (out(out_desc, state->window, state->wsize - left) && - ret == Z_STREAM_END) - ret = Z_BUF_ERROR; - } - strm->next_in = next; - strm->avail_in = have; - return ret; -} - -int ZEXPORT inflateBackEnd(z_streamp strm) { - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - return Z_STREAM_ERROR; - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} diff --git a/third_party/zlib/inffast.c b/third_party/zlib/inffast.c deleted file mode 100644 index 9354676..0000000 --- a/third_party/zlib/inffast.c +++ /dev/null @@ -1,320 +0,0 @@ -/* inffast.c -- fast decoding - * Copyright (C) 1995-2017 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifdef ASMINF -# pragma message("Assembler code may have bugs -- use at your own risk") -#else - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - */ -void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { - struct inflate_state FAR *state; - z_const unsigned char FAR *in; /* local strm->next_in */ - z_const unsigned char FAR *last; /* have enough input while in < last */ - unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ -#ifdef INFLATE_STRICT - unsigned dmax; /* maximum distance from zlib header */ -#endif - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ - unsigned long hold; /* local strm->hold */ - unsigned bits; /* local strm->bits */ - code const FAR *lcode; /* local strm->lencode */ - code const FAR *dcode; /* local strm->distcode */ - unsigned lmask; /* mask for first level of length codes */ - unsigned dmask; /* mask for first level of distance codes */ - code const *here; /* retrieved table entry */ - unsigned op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - unsigned len; /* match length, unused bytes */ - unsigned dist; /* match distance */ - unsigned char FAR *from; /* where to copy match from */ - - /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - in = strm->next_in; - last = in + (strm->avail_in - 5); - out = strm->next_out; - beg = out - (start - strm->avail_out); - end = out + (strm->avail_out - 257); -#ifdef INFLATE_STRICT - dmax = state->dmax; -#endif - wsize = state->wsize; - whave = state->whave; - wnext = state->wnext; - window = state->window; - hold = state->hold; - bits = state->bits; - lcode = state->lencode; - dcode = state->distcode; - lmask = (1U << state->lenbits) - 1; - dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - do { - if (bits < 15) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - here = lcode + (hold & lmask); - dolen: - op = (unsigned)(here->bits); - hold >>= op; - bits -= op; - op = (unsigned)(here->op); - if (op == 0) { /* literal */ - Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here->val)); - *out++ = (unsigned char)(here->val); - } - else if (op & 16) { /* length base */ - len = (unsigned)(here->val); - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - len += (unsigned)hold & ((1U << op) - 1); - hold >>= op; - bits -= op; - } - Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - here = dcode + (hold & dmask); - dodist: - op = (unsigned)(here->bits); - hold >>= op; - bits -= op; - op = (unsigned)(here->op); - if (op & 16) { /* distance base */ - dist = (unsigned)(here->val); - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - if (bits < op) { - hold += (unsigned long)(*in++) << bits; - bits += 8; - } - } - dist += (unsigned)hold & ((1U << op) - 1); -#ifdef INFLATE_STRICT - if (dist > dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - hold >>= op; - bits -= op; - Tracevv((stderr, "inflate: distance %u\n", dist)); - op = (unsigned)(out - beg); /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state->sane) { - strm->msg = - (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - if (len <= op - whave) { - do { - *out++ = 0; - } while (--len); - continue; - } - len -= op - whave; - do { - *out++ = 0; - } while (--op > whave); - if (op == 0) { - from = out - dist; - do { - *out++ = *from++; - } while (--len); - continue; - } -#endif - } - from = window; - if (wnext == 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = window; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - *out++ = *from++; - } while (--op); - from = out - dist; /* rest from output */ - } - } - while (len > 2) { - *out++ = *from++; - *out++ = *from++; - *out++ = *from++; - len -= 3; - } - if (len) { - *out++ = *from++; - if (len > 1) - *out++ = *from++; - } - } - else { - from = out - dist; /* copy direct from output */ - do { /* minimum length is three */ - *out++ = *from++; - *out++ = *from++; - *out++ = *from++; - len -= 3; - } while (len > 2); - if (len) { - *out++ = *from++; - if (len > 1) - *out++ = *from++; - } - } - } - else if ((op & 64) == 0) { /* 2nd level distance code */ - here = dcode + here->val + (hold & ((1U << op) - 1)); - goto dodist; - } - else { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - } - else if ((op & 64) == 0) { /* 2nd level length code */ - here = lcode + here->val + (hold & ((1U << op) - 1)); - goto dolen; - } - else if (op & 32) { /* end-of-block */ - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - else { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - } while (in < last && out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - in -= len; - bits -= len << 3; - hold &= (1U << bits) - 1; - - /* update state and return */ - strm->next_in = in; - strm->next_out = out; - strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); - strm->avail_out = (unsigned)(out < end ? - 257 + (end - out) : 257 - (out - end)); - state->hold = hold; - state->bits = bits; - return; -} - -/* - inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - - Using bit fields for code structure - - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and wnext == 0 - - Special case for distance > 1 copies to do overlapped load and store copy - - Explicit branch predictions (based on measured branch probabilities) - - Deferring match copy and interspersed it with decoding subsequent codes - - Swapping literal/length else - - Swapping window/direct else - - Larger unrolled copy loops (three is about right) - - Moving len -= 3 statement into middle of loop - */ - -#endif /* !ASMINF */ diff --git a/third_party/zlib/inffast.h b/third_party/zlib/inffast.h deleted file mode 100644 index 4485318..0000000 --- a/third_party/zlib/inffast.h +++ /dev/null @@ -1,12 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); - diff --git a/third_party/zlib/inffixed.h b/third_party/zlib/inffixed.h deleted file mode 100644 index ffe8c80..0000000 --- a/third_party/zlib/inffixed.h +++ /dev/null @@ -1,95 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. - It is part of the implementation of this library and is - subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; - diff --git a/third_party/zlib/inflate.c b/third_party/zlib/inflate.c deleted file mode 100644 index 94ecff0..0000000 --- a/third_party/zlib/inflate.c +++ /dev/null @@ -1,1526 +0,0 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2022 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * Change history: - * - * 1.2.beta0 24 Nov 2002 - * - First version -- complete rewrite of inflate to simplify code, avoid - * creation of window when not needed, minimize use of window when it is - * needed, make inffast.c even faster, implement gzip decoding, and to - * improve code readability and style over the previous zlib inflate code - * - * 1.2.beta1 25 Nov 2002 - * - Use pointers for available input and output checking in inffast.c - * - Remove input and output counters in inffast.c - * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 - * - Remove unnecessary second byte pull from length extra in inffast.c - * - Unroll direct copy to three copies per loop in inffast.c - * - * 1.2.beta2 4 Dec 2002 - * - Change external routine names to reduce potential conflicts - * - Correct filename to inffixed.h for fixed tables in inflate.c - * - Make hbuf[] unsigned char to match parameter type in inflate.c - * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) - * to avoid negation problem on Alphas (64 bit) in inflate.c - * - * 1.2.beta3 22 Dec 2002 - * - Add comments on state->bits assertion in inffast.c - * - Add comments on op field in inftrees.h - * - Fix bug in reuse of allocated window after inflateReset() - * - Remove bit fields--back to byte structure for speed - * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths - * - Change post-increments to pre-increments in inflate_fast(), PPC biased? - * - Add compile time option, POSTINC, to use post-increments instead (Intel?) - * - Make MATCH copy in inflate() much faster for when inflate_fast() not used - * - Use local copies of stream next and avail values, as well as local bit - * buffer and bit count in inflate()--for speed when inflate_fast() not used - * - * 1.2.beta4 1 Jan 2003 - * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings - * - Move a comment on output buffer sizes from inffast.c to inflate.c - * - Add comments in inffast.c to introduce the inflate_fast() routine - * - Rearrange window copies in inflate_fast() for speed and simplification - * - Unroll last copy for window match in inflate_fast() - * - Use local copies of window variables in inflate_fast() for speed - * - Pull out common wnext == 0 case for speed in inflate_fast() - * - Make op and len in inflate_fast() unsigned for consistency - * - Add FAR to lcode and dcode declarations in inflate_fast() - * - Simplified bad distance check in inflate_fast() - * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new - * source file infback.c to provide a call-back interface to inflate for - * programs like gzip and unzip -- uses window as output buffer to avoid - * window copying - * - * 1.2.beta5 1 Jan 2003 - * - Improved inflateBack() interface to allow the caller to provide initial - * input in strm. - * - Fixed stored blocks bug in inflateBack() - * - * 1.2.beta6 4 Jan 2003 - * - Added comments in inffast.c on effectiveness of POSTINC - * - Typecasting all around to reduce compiler warnings - * - Changed loops from while (1) or do {} while (1) to for (;;), again to - * make compilers happy - * - Changed type of window in inflateBackInit() to unsigned char * - * - * 1.2.beta7 27 Jan 2003 - * - Changed many types to unsigned or unsigned short to avoid warnings - * - Added inflateCopy() function - * - * 1.2.0 9 Mar 2003 - * - Changed inflateBack() interface to provide separate opaque descriptors - * for the in() and out() functions - * - Changed inflateBack() argument and in_func typedef to swap the length - * and buffer address return values for the input function - * - Check next_in and next_out for Z_NULL on entry to inflate() - * - * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifdef MAKEFIXED -# ifndef BUILDFIXED -# define BUILDFIXED -# endif -#endif - -local int inflateStateCheck(z_streamp strm) { - struct inflate_state FAR *state; - if (strm == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) - return 1; - state = (struct inflate_state FAR *)strm->state; - if (state == Z_NULL || state->strm != strm || - state->mode < HEAD || state->mode > SYNC) - return 1; - return 0; -} - -int ZEXPORT inflateResetKeep(z_streamp strm) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - strm->total_in = strm->total_out = state->total = 0; - strm->msg = Z_NULL; - if (state->wrap) /* to support ill-conceived Java test suite */ - strm->adler = state->wrap & 1; - state->mode = HEAD; - state->last = 0; - state->havedict = 0; - state->flags = -1; - state->dmax = 32768U; - state->head = Z_NULL; - state->hold = 0; - state->bits = 0; - state->lencode = state->distcode = state->next = state->codes; - state->sane = 1; - state->back = -1; - Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -int ZEXPORT inflateReset(z_streamp strm) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->wsize = 0; - state->whave = 0; - state->wnext = 0; - return inflateResetKeep(strm); -} - -int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { - int wrap; - struct inflate_state FAR *state; - - /* get the state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - if (windowBits < -15) - return Z_STREAM_ERROR; - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 5; -#ifdef GUNZIP - if (windowBits < 48) - windowBits &= 15; -#endif - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) - return Z_STREAM_ERROR; - if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { - ZFREE(strm, state->window); - state->window = Z_NULL; - } - - /* update state and reset the rest of it */ - state->wrap = wrap; - state->wbits = (unsigned)windowBits; - return inflateReset(strm); -} - -int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, - const char *version, int stream_size) { - int ret; - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL) return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *) - ZALLOC(strm, 1, sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->strm = strm; - state->window = Z_NULL; - state->mode = HEAD; /* to pass state test in inflateReset2() */ - ret = inflateReset2(strm, windowBits); - if (ret != Z_OK) { - ZFREE(strm, state); - strm->state = Z_NULL; - } - return ret; -} - -int ZEXPORT inflateInit_(z_streamp strm, const char *version, - int stream_size) { - return inflateInit2_(strm, DEF_WBITS, version, stream_size); -} - -int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - if (bits == 0) - return Z_OK; - state = (struct inflate_state FAR *)strm->state; - if (bits < 0) { - state->hold = 0; - state->bits = 0; - return Z_OK; - } - if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += (unsigned)value << state->bits; - state->bits += (uInt)bits; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(struct inflate_state FAR *state) { -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -#ifdef MAKEFIXED -#include - -/* - Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also - defines BUILDFIXED, so the tables are built on the fly. makefixed() writes - those tables to stdout, which would be piped to inffixed.h. A small program - can simply call makefixed to do this: - - void makefixed(void); - - int main(void) - { - makefixed(); - return 0; - } - - Then that can be linked with zlib built with MAKEFIXED defined and run: - - a.out > inffixed.h - */ -void makefixed(void) -{ - unsigned low, size; - struct inflate_state state; - - fixedtables(&state); - puts(" /* inffixed.h -- table for decoding fixed codes"); - puts(" * Generated automatically by makefixed()."); - puts(" */"); - puts(""); - puts(" /* WARNING: this file should *not* be used by applications."); - puts(" It is part of the implementation of this library and is"); - puts(" subject to change. Applications should only use zlib.h."); - puts(" */"); - puts(""); - size = 1U << 9; - printf(" static const code lenfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 7) == 0) printf("\n "); - printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, - state.lencode[low].bits, state.lencode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); - size = 1U << 5; - printf("\n static const code distfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 6) == 0) printf("\n "); - printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, - state.distcode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); -} -#endif /* MAKEFIXED */ - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { - struct inflate_state FAR *state; - unsigned dist; - - state = (struct inflate_state FAR *)strm->state; - - /* if it hasn't been done already, allocate space for the window */ - if (state->window == Z_NULL) { - state->window = (unsigned char FAR *) - ZALLOC(strm, 1U << state->wbits, - sizeof(unsigned char)); - if (state->window == Z_NULL) return 1; - } - - /* if window not in use yet, initialize */ - if (state->wsize == 0) { - state->wsize = 1U << state->wbits; - state->wnext = 0; - state->whave = 0; - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state->wsize) { - zmemcpy(state->window, end - state->wsize, state->wsize); - state->wnext = 0; - state->whave = state->wsize; - } - else { - dist = state->wsize - state->wnext; - if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, end - copy, dist); - copy -= dist; - if (copy) { - zmemcpy(state->window, end - copy, copy); - state->wnext = copy; - state->whave = state->wsize; - } - else { - state->wnext += dist; - if (state->wnext == state->wsize) state->wnext = 0; - if (state->whave < state->wsize) state->whave += dist; - } - } - return 0; -} - -/* Macros for inflate(): */ - -/* check function to use adler32() for zlib or crc32() for gzip */ -#ifdef GUNZIP -# define UPDATE_CHECK(check, buf, len) \ - (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) -#else -# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) -#endif - -/* check macros for header crc */ -#ifdef GUNZIP -# define CRC2(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - check = crc32(check, hbuf, 2); \ - } while (0) - -# define CRC4(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - hbuf[2] = (unsigned char)((word) >> 16); \ - hbuf[3] = (unsigned char)((word) >> 24); \ - check = crc32(check, hbuf, 4); \ - } while (0) -#endif - -/* Load registers with state in inflate() for speed */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Restore state from registers in inflate() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflate() - if there is no input available. */ -#define PULLBYTE() \ - do { \ - if (have == 0) goto inf_leave; \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflate(). */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* - inflate() uses a state machine to process as much input data and generate as - much output data as possible before returning. The state machine is - structured roughly as follows: - - for (;;) switch (state) { - ... - case STATEn: - if (not enough input data or output space to make progress) - return; - ... make progress ... - state = STATEm; - break; - ... - } - - so when inflate() is called again, the same case is attempted again, and - if the appropriate resources are provided, the machine proceeds to the - next state. The NEEDBITS() macro is usually the way the state evaluates - whether it can proceed or should return. NEEDBITS() does the return if - the requested bits are not available. The typical use of the BITS macros - is: - - NEEDBITS(n); - ... do something with BITS(n) ... - DROPBITS(n); - - where NEEDBITS(n) either returns from inflate() if there isn't enough - input left to load n bits into the accumulator, or it continues. BITS(n) - gives the low n bits in the accumulator. When done, DROPBITS(n) drops - the low n bits off the accumulator. INITBITS() clears the accumulator - and sets the number of available bits to zero. BYTEBITS() discards just - enough bits to put the accumulator on a byte boundary. After BYTEBITS() - and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. - - NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return - if there is no input available. The decoding of variable length codes uses - PULLBYTE() directly in order to pull just enough bytes to decode the next - code, and no more. - - Some states loop until they get enough input, making sure that enough - state information is maintained to continue the loop where it left off - if NEEDBITS() returns in the loop. For example, want, need, and keep - would all have to actually be part of the saved state in case NEEDBITS() - returns: - - case STATEw: - while (want < need) { - NEEDBITS(n); - keep[want++] = BITS(n); - DROPBITS(n); - } - state = STATEx; - case STATEx: - - As shown above, if the next state is also the next case, then the break - is omitted. - - A state may also return if there is not enough output space available to - complete that state. Those states are copying stored data, writing a - literal byte, and copying a matching string. - - When returning, a "goto inf_leave" is used to update the total counters, - update the check value, and determine whether any progress has been made - during that inflate() call in order to return the proper return code. - Progress is defined as a change in either strm->avail_in or strm->avail_out. - When there is a window, goto inf_leave will update the window with the last - output written. If a goto inf_leave occurs in the middle of decompression - and there is no window currently, goto inf_leave will create one and copy - output to the window for the next call of inflate(). - - In this implementation, the flush parameter of inflate() only affects the - return code (per zlib.h). inflate() always writes as much as possible to - strm->next_out, given the space available and the provided input--the effect - documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers - the allocation of and copying into a sliding window until necessary, which - provides the effect documented in zlib.h for Z_FINISH when the entire input - stream available. So the only thing the flush parameter actually does is: - when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it - will return Z_BUF_ERROR if it has not reached the end of the stream. - */ - -int ZEXPORT inflate(z_streamp strm, int flush) { - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned in, out; /* save starting available input and output */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ -#ifdef GUNZIP - unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ -#endif - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - if (inflateStateCheck(strm) || strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0)) - return Z_STREAM_ERROR; - - state = (struct inflate_state FAR *)strm->state; - if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ - LOAD(); - in = have; - out = left; - ret = Z_OK; - for (;;) - switch (state->mode) { - case HEAD: - if (state->wrap == 0) { - state->mode = TYPEDO; - break; - } - NEEDBITS(16); -#ifdef GUNZIP - if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ - if (state->wbits == 0) - state->wbits = 15; - state->check = crc32(0L, Z_NULL, 0); - CRC2(state->check, hold); - INITBITS(); - state->mode = FLAGS; - break; - } - if (state->head != Z_NULL) - state->head->done = -1; - if (!(state->wrap & 1) || /* check if zlib header allowed */ -#else - if ( -#endif - ((BITS(8) << 8) + (hold >> 8)) % 31) { - strm->msg = (char *)"incorrect header check"; - state->mode = BAD; - break; - } - if (BITS(4) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - DROPBITS(4); - len = BITS(4) + 8; - if (state->wbits == 0) - state->wbits = len; - if (len > 15 || len > state->wbits) { - strm->msg = (char *)"invalid window size"; - state->mode = BAD; - break; - } - state->dmax = 1U << len; - state->flags = 0; /* indicate zlib header */ - Tracev((stderr, "inflate: zlib header ok\n")); - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = hold & 0x200 ? DICTID : TYPE; - INITBITS(); - break; -#ifdef GUNZIP - case FLAGS: - NEEDBITS(16); - state->flags = (int)(hold); - if ((state->flags & 0xff) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - if (state->flags & 0xe000) { - strm->msg = (char *)"unknown header flags set"; - state->mode = BAD; - break; - } - if (state->head != Z_NULL) - state->head->text = (int)((hold >> 8) & 1); - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - state->mode = TIME; - /* fallthrough */ - case TIME: - NEEDBITS(32); - if (state->head != Z_NULL) - state->head->time = hold; - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC4(state->check, hold); - INITBITS(); - state->mode = OS; - /* fallthrough */ - case OS: - NEEDBITS(16); - if (state->head != Z_NULL) { - state->head->xflags = (int)(hold & 0xff); - state->head->os = (int)(hold >> 8); - } - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - state->mode = EXLEN; - /* fallthrough */ - case EXLEN: - if (state->flags & 0x0400) { - NEEDBITS(16); - state->length = (unsigned)(hold); - if (state->head != Z_NULL) - state->head->extra_len = (unsigned)hold; - if ((state->flags & 0x0200) && (state->wrap & 4)) - CRC2(state->check, hold); - INITBITS(); - } - else if (state->head != Z_NULL) - state->head->extra = Z_NULL; - state->mode = EXTRA; - /* fallthrough */ - case EXTRA: - if (state->flags & 0x0400) { - copy = state->length; - if (copy > have) copy = have; - if (copy) { - if (state->head != Z_NULL && - state->head->extra != Z_NULL && - (len = state->head->extra_len - state->length) < - state->head->extra_max) { - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); - } - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - state->length -= copy; - } - if (state->length) goto inf_leave; - } - state->length = 0; - state->mode = NAME; - /* fallthrough */ - case NAME: - if (state->flags & 0x0800) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->name != Z_NULL && - state->length < state->head->name_max) - state->head->name[state->length++] = (Bytef)len; - } while (len && copy < have); - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->name = Z_NULL; - state->length = 0; - state->mode = COMMENT; - /* fallthrough */ - case COMMENT: - if (state->flags & 0x1000) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->comment != Z_NULL && - state->length < state->head->comm_max) - state->head->comment[state->length++] = (Bytef)len; - } while (len && copy < have); - if ((state->flags & 0x0200) && (state->wrap & 4)) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->comment = Z_NULL; - state->mode = HCRC; - /* fallthrough */ - case HCRC: - if (state->flags & 0x0200) { - NEEDBITS(16); - if ((state->wrap & 4) && hold != (state->check & 0xffff)) { - strm->msg = (char *)"header crc mismatch"; - state->mode = BAD; - break; - } - INITBITS(); - } - if (state->head != Z_NULL) { - state->head->hcrc = (int)((state->flags >> 9) & 1); - state->head->done = 1; - } - strm->adler = state->check = crc32(0L, Z_NULL, 0); - state->mode = TYPE; - break; -#endif - case DICTID: - NEEDBITS(32); - strm->adler = state->check = ZSWAP32(hold); - INITBITS(); - state->mode = DICT; - /* fallthrough */ - case DICT: - if (state->havedict == 0) { - RESTORE(); - return Z_NEED_DICT; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; - /* fallthrough */ - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case TYPEDO: - if (state->last) { - BYTEBITS(); - state->mode = CHECK; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN_; /* decode codes */ - if (flush == Z_TREES) { - DROPBITS(2); - goto inf_leave; - } - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - case STORED: - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - state->mode = COPY_; - if (flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case COPY_: - state->mode = COPY; - /* fallthrough */ - case COPY: - copy = state->length; - if (copy) { - if (copy > have) copy = have; - if (copy > left) copy = left; - if (copy == 0) goto inf_leave; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - break; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - case TABLE: - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - state->have = 0; - state->mode = LENLENS; - /* fallthrough */ - case LENLENS: - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - state->have = 0; - state->mode = CODELENS; - /* fallthrough */ - case CODELENS: - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = state->lens[state->have - 1]; - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (const code FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN_; - if (flush == Z_TREES) goto inf_leave; - /* fallthrough */ - case LEN_: - state->mode = LEN; - /* fallthrough */ - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); - inflate_fast(strm, out); - LOAD(); - if (state->mode == TYPE) - state->back = -1; - break; - } - state->back = 0; - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - state->length = (unsigned)here.val; - if ((int)(here.op) == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - state->mode = LIT; - break; - } - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->back = -1; - state->mode = TYPE; - break; - } - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - state->extra = (unsigned)(here.op) & 15; - state->mode = LENEXT; - /* fallthrough */ - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - state->was = state->length; - state->mode = DIST; - /* fallthrough */ - case DIST: - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - state->extra = (unsigned)(here.op) & 15; - state->mode = DISTEXT; - /* fallthrough */ - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } -#ifdef INFLATE_STRICT - if (state->offset > state->dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - state->mode = MATCH; - /* fallthrough */ - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; - if (state->offset > copy) { /* copy from window */ - copy = state->offset - copy; - if (copy > state->whave) { - if (state->sane) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - Trace((stderr, "inflate.c too far\n")); - copy -= state->whave; - if (copy > state->length) copy = state->length; - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = 0; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; -#endif - } - if (copy > state->wnext) { - copy -= state->wnext; - from = state->window + (state->wsize - copy); - } - else - from = state->window + (state->wnext - copy); - if (copy > state->length) copy = state->length; - } - else { /* copy from output */ - from = put - state->offset; - copy = state->length; - } - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = *from++; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; - case LIT: - if (left == 0) goto inf_leave; - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - case CHECK: - if (state->wrap) { - NEEDBITS(32); - out -= left; - strm->total_out += out; - state->total += out; - if ((state->wrap & 4) && out) - strm->adler = state->check = - UPDATE_CHECK(state->check, put - out, out); - out = left; - if ((state->wrap & 4) && ( -#ifdef GUNZIP - state->flags ? hold : -#endif - ZSWAP32(hold)) != state->check) { - strm->msg = (char *)"incorrect data check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: check matches trailer\n")); - } -#ifdef GUNZIP - state->mode = LENGTH; - /* fallthrough */ - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); - if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) { - strm->msg = (char *)"incorrect length check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: length matches trailer\n")); - } -#endif - state->mode = DONE; - /* fallthrough */ - case DONE: - ret = Z_STREAM_END; - goto inf_leave; - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* fallthrough */ - default: - return Z_STREAM_ERROR; - } - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - inf_leave: - RESTORE(); - if (state->wsize || (out != strm->avail_out && state->mode < BAD && - (state->mode < CHECK || flush != Z_FINISH))) - if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { - state->mode = MEM; - return Z_MEM_ERROR; - } - in -= strm->avail_in; - out -= strm->avail_out; - strm->total_in += in; - strm->total_out += out; - state->total += out; - if ((state->wrap & 4) && out) - strm->adler = state->check = - UPDATE_CHECK(state->check, strm->next_out - out, out); - strm->data_type = (int)state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0) + - (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) - ret = Z_BUF_ERROR; - return ret; -} - -int ZEXPORT inflateEnd(z_streamp strm) { - struct inflate_state FAR *state; - if (inflateStateCheck(strm)) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->window != Z_NULL) ZFREE(strm, state->window); - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} - -int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, - uInt *dictLength) { - struct inflate_state FAR *state; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* copy dictionary */ - if (state->whave && dictionary != Z_NULL) { - zmemcpy(dictionary, state->window + state->wnext, - state->whave - state->wnext); - zmemcpy(dictionary + state->whave - state->wnext, - state->window, state->wnext); - } - if (dictLength != Z_NULL) - *dictLength = state->whave; - return Z_OK; -} - -int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, - uInt dictLength) { - struct inflate_state FAR *state; - unsigned long dictid; - int ret; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->wrap != 0 && state->mode != DICT) - return Z_STREAM_ERROR; - - /* check for correct dictionary identifier */ - if (state->mode == DICT) { - dictid = adler32(0L, Z_NULL, 0); - dictid = adler32(dictid, dictionary, dictLength); - if (dictid != state->check) - return Z_DATA_ERROR; - } - - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary + dictLength, dictLength); - if (ret) { - state->mode = MEM; - return Z_MEM_ERROR; - } - state->havedict = 1; - Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { - struct inflate_state FAR *state; - - /* check state */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; - - /* save header structure */ - state->head = head; - head->done = 0; - return Z_OK; -} - -/* - Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found - or when out of input. When called, *have is the number of pattern bytes - found in order so far, in 0..3. On return *have is updated to the new - state. If on return *have equals four, then the pattern was found and the - return value is how many bytes were read including the last byte of the - pattern. If *have is less than four, then the pattern has not been found - yet and the return value is len. In the latter case, syncsearch() can be - called again with more data and the *have state. *have is initialized to - zero for the first call. - */ -local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, - unsigned len) { - unsigned got; - unsigned next; - - got = *have; - next = 0; - while (next < len && got < 4) { - if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) - got++; - else if (buf[next]) - got = 0; - else - got = 4 - got; - next++; - } - *have = got; - return next; -} - -int ZEXPORT inflateSync(z_streamp strm) { - unsigned len; /* number of bytes to look at or looked at */ - int flags; /* temporary to save header status */ - unsigned long in, out; /* temporary to save total_in and total_out */ - unsigned char buf[4]; /* to restore bit buffer to byte string */ - struct inflate_state FAR *state; - - /* check parameters */ - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; - - /* if first time, start search in bit buffer */ - if (state->mode != SYNC) { - state->mode = SYNC; - state->hold >>= state->bits & 7; - state->bits -= state->bits & 7; - len = 0; - while (state->bits >= 8) { - buf[len++] = (unsigned char)(state->hold); - state->hold >>= 8; - state->bits -= 8; - } - state->have = 0; - syncsearch(&(state->have), buf, len); - } - - /* search available input */ - len = syncsearch(&(state->have), strm->next_in, strm->avail_in); - strm->avail_in -= len; - strm->next_in += len; - strm->total_in += len; - - /* return no joy or set up to restart inflate() on a new block */ - if (state->have != 4) return Z_DATA_ERROR; - if (state->flags == -1) - state->wrap = 0; /* if no header yet, treat as raw */ - else - state->wrap &= ~4; /* no point in computing a check value now */ - flags = state->flags; - in = strm->total_in; out = strm->total_out; - inflateReset(strm); - strm->total_in = in; strm->total_out = out; - state->flags = flags; - state->mode = TYPE; - return Z_OK; -} - -/* - Returns true if inflate is currently at the end of a block generated by - Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - implementation to provide an additional safety check. PPP uses - Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored - block. When decompressing, PPP checks that at the end of input packet, - inflate is waiting for these length bytes. - */ -int ZEXPORT inflateSyncPoint(z_streamp strm) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - return state->mode == STORED && state->bits == 0; -} - -int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { - struct inflate_state FAR *state; - struct inflate_state FAR *copy; - unsigned char FAR *window; - unsigned wsize; - - /* check input */ - if (inflateStateCheck(source) || dest == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)source->state; - - /* allocate space */ - copy = (struct inflate_state FAR *) - ZALLOC(source, 1, sizeof(struct inflate_state)); - if (copy == Z_NULL) return Z_MEM_ERROR; - window = Z_NULL; - if (state->window != Z_NULL) { - window = (unsigned char FAR *) - ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); - if (window == Z_NULL) { - ZFREE(source, copy); - return Z_MEM_ERROR; - } - } - - /* copy state */ - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); - copy->strm = dest; - if (state->lencode >= state->codes && - state->lencode <= state->codes + ENOUGH - 1) { - copy->lencode = copy->codes + (state->lencode - state->codes); - copy->distcode = copy->codes + (state->distcode - state->codes); - } - copy->next = copy->codes + (state->next - state->codes); - if (window != Z_NULL) { - wsize = 1U << state->wbits; - zmemcpy(window, state->window, wsize); - } - copy->window = window; - dest->state = (struct internal_state FAR *)copy; - return Z_OK; -} - -int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - state->sane = !subvert; - return Z_OK; -#else - (void)subvert; - state->sane = 1; - return Z_DATA_ERROR; -#endif -} - -int ZEXPORT inflateValidate(z_streamp strm, int check) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (check && state->wrap) - state->wrap |= 4; - else - state->wrap &= ~4; - return Z_OK; -} - -long ZEXPORT inflateMark(z_streamp strm) { - struct inflate_state FAR *state; - - if (inflateStateCheck(strm)) - return -(1L << 16); - state = (struct inflate_state FAR *)strm->state; - return (long)(((unsigned long)((long)state->back)) << 16) + - (state->mode == COPY ? state->length : - (state->mode == MATCH ? state->was - state->length : 0)); -} - -unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { - struct inflate_state FAR *state; - if (inflateStateCheck(strm)) return (unsigned long)-1; - state = (struct inflate_state FAR *)strm->state; - return (unsigned long)(state->next - state->codes); -} diff --git a/third_party/zlib/inflate.h b/third_party/zlib/inflate.h deleted file mode 100644 index e532e05..0000000 --- a/third_party/zlib/inflate.h +++ /dev/null @@ -1,127 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2019 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer decoding by inflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip decoding - should be left enabled. */ -#ifndef NO_GZIP -# define GUNZIP -#endif - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD = 16180, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY_, /* i/o: same as COPY below, but only first time in */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN_, /* i: same as LEN below, but only first time in */ - LEN, /* i: waiting for length/lit/eob code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to BAD or MEM on error -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) or (raw) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> - HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - (raw) -> TYPEDO - Read deflate blocks: - TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK - STORED -> COPY_ -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN_ - LEN_ -> LEN - Read deflate codes in fixed or dynamic block: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* State maintained between inflate() calls -- approximately 7K bytes, not - including the allocated sliding window, which is up to 32K bytes. */ -struct inflate_state { - z_streamp strm; /* pointer back to this zlib stream */ - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip, - bit 2 true to validate check value */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags, 0 if zlib, or - -1 if raw or no header yet */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - gz_headerp head; /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ - int sane; /* if false, allow invalid distance too far */ - int back; /* bits back of last unprocessed length/lit */ - unsigned was; /* initial length of match */ -}; - diff --git a/third_party/zlib/inftrees.c b/third_party/zlib/inftrees.c deleted file mode 100644 index 98cfe16..0000000 --- a/third_party/zlib/inftrees.c +++ /dev/null @@ -1,299 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2024 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" - -#define MAXBITS 15 - -const char inflate_copyright[] = - " inflate 1.3.1 Copyright 1995-2024 Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* - Build a set of tables to decode the provided canonical Huffman code. - The code lengths are lens[0..codes-1]. The result starts at *table, - whose indices are 0..2^bits-1. work is a writable array of at least - lens shorts, which is used as a work area. type is the type of code - to be generated, CODES, LENS, or DISTS. On return, zero is success, - -1 is an invalid code, and +1 means that ENOUGH isn't enough. table - on return points to the next available entry's address. bits is the - requested root table index bits, and on return it is the actual root - table index bits. It will differ if the request is greater than the - longest code or if it is less than the shortest code. - */ -int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work) { - unsigned len; /* a code's length in bits */ - unsigned sym; /* index of code symbols */ - unsigned min, max; /* minimum and maximum code lengths */ - unsigned root; /* number of index bits for root table */ - unsigned curr; /* number of index bits for current table */ - unsigned drop; /* code bits to drop for sub-table */ - int left; /* number of prefix codes available */ - unsigned used; /* code entries in table used */ - unsigned huff; /* Huffman code */ - unsigned incr; /* for incrementing code, index */ - unsigned fill; /* index for replicating entries */ - unsigned low; /* low bits for current root entry */ - unsigned mask; /* mask for low root bits */ - code here; /* table entry for duplication */ - code FAR *next; /* next available space in table */ - const unsigned short FAR *base; /* base value table to use */ - const unsigned short FAR *extra; /* extra bits table to use */ - unsigned match; /* use base and extra for symbol >= match */ - unsigned short count[MAXBITS+1]; /* number of codes of each length */ - unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ - static const unsigned short lbase[31] = { /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77}; - static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0}; - static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64}; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) - count[len] = 0; - for (sym = 0; sym < codes; sym++) - count[lens[sym]]++; - - /* bound code lengths, force root to be within code lengths */ - root = *bits; - for (max = MAXBITS; max >= 1; max--) - if (count[max] != 0) break; - if (root > max) root = max; - if (max == 0) { /* no symbols to code at all */ - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)1; - here.val = (unsigned short)0; - *(*table)++ = here; /* make a table to force an error */ - *(*table)++ = here; - *bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) - if (count[min] != 0) break; - if (root < min) root = min; - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) return -1; /* over-subscribed */ - } - if (left > 0 && (type == CODES || max != 1)) - return -1; /* incomplete set */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + count[len]; - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) - if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - switch (type) { - case CODES: - base = extra = work; /* dummy value--not used */ - match = 20; - break; - case LENS: - base = lbase; - extra = lext; - match = 257; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - match = 0; - } - - /* initialize state for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = *table; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = (unsigned)(-1); /* trigger new sub-table when len > root */ - used = 1U << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here.bits = (unsigned char)(len - drop); - if (work[sym] + 1U < match) { - here.op = (unsigned char)0; - here.val = work[sym]; - } - else if (work[sym] >= match) { - here.op = (unsigned char)(extra[work[sym] - match]); - here.val = base[work[sym] - match]; - } - else { - here.op = (unsigned char)(32 + 64); /* end of block */ - here.val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1U << (len - drop); - fill = 1U << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - next[(huff >> drop) + fill] = here; - } while (fill != 0); - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - - /* go to next symbol, update count, len */ - sym++; - if (--(count[len]) == 0) { - if (len == max) break; - len = lens[work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) != low) { - /* if first time, transition to sub-tables */ - if (drop == 0) - drop = root; - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = (int)(1 << curr); - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) break; - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1U << curr; - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* point entry in root table to sub-table */ - low = huff & mask; - (*table)[low].op = (unsigned char)curr; - (*table)[low].bits = (unsigned char)root; - (*table)[low].val = (unsigned short)(next - *table); - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff != 0) { - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)(len - drop); - here.val = (unsigned short)0; - next[huff] = here; - } - - /* set return parameters */ - *table += used; - *bits = root; - return 0; -} diff --git a/third_party/zlib/inftrees.h b/third_party/zlib/inftrees.h deleted file mode 100644 index 3d903d8..0000000 --- a/third_party/zlib/inftrees.h +++ /dev/null @@ -1,63 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of the dynamic table. The maximum number of code structures is - 1444, which is the sum of 852 for literal/length codes and 592 for distance - codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribution. The arguments to that - program are the number of symbols, the initial root table size, and the - maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns 852, and "enough 30 6 15" for distance codes returns 592. The - initial root table size (9 or 6) is found in the fifth argument of the - inflate_table() calls in inflate.c and infback.c. If the root table size is - changed, then these maximum sizes would be need to be recalculated and - updated. */ -#define ENOUGH_LENS 852 -#define ENOUGH_DISTS 592 -#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) - -/* Type of code to build for inflate_table() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work); - diff --git a/third_party/zlib/make_vms.com b/third_party/zlib/make_vms.com deleted file mode 100644 index 4dc8a89..0000000 --- a/third_party/zlib/make_vms.com +++ /dev/null @@ -1,867 +0,0 @@ -$! make libz under VMS written by -$! Martin P.J. Zinser -$! -$! In case of problems with the install you might contact me at -$! zinser@zinser.no-ip.info(preferred) or -$! martin.zinser@eurexchange.com (work) -$! -$! Make procedure history for Zlib -$! -$!------------------------------------------------------------------------------ -$! Version history -$! 0.01 20060120 First version to receive a number -$! 0.02 20061008 Adapt to new Makefile.in -$! 0.03 20091224 Add support for large file check -$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite -$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in -$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new examples -$! subdir path, update module search in makefile.in -$! 0.07 20120115 Triggered by work done by Alexey Chupahin completely redesigned -$! shared image creation -$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared -$! image -$! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)). -$! "" -> automatic, preference: MMK, MMS, built-in. -$! -$ on error then goto err_exit -$! -$ true = 1 -$ false = 0 -$ tmpnam = "temp_" + f$getjpi("","pid") -$ tt = tmpnam + ".txt" -$ tc = tmpnam + ".c" -$ th = tmpnam + ".h" -$ define/nolog tconfig 'th' -$ its_decc = false -$ its_vaxc = false -$ its_gnuc = false -$ s_case = False -$! -$! Setup variables holding "config" information -$! -$ Make = "''p1'" -$ name = "Zlib" -$ version = "?.?.?" -$ v_string = "ZLIB_VERSION" -$ v_file = "zlib.h" -$ ccopt = "/include = []" -$ lopts = "" -$ dnsrl = "" -$ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in" -$ conf_check_string = "" -$ linkonly = false -$ optfile = name + ".opt" -$ mapfile = name + ".map" -$ libdefs = "" -$ vax = f$getsyi("HW_MODEL").lt.1024 -$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 -$ ia64 = f$getsyi("HW_MODEL").ge.4096 -$! -$! 2012-03-05 SMS. -$! Why is this needed? And if it is needed, why not simply ".not. vax"? -$! -$!!! if axp .or. ia64 then set proc/parse=extended -$! -$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL") -$ mydef = F$parse(whoami,,,"DEVICE") -$ mydir = f$parse(whoami,,,"DIRECTORY") - "][" -$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") -$! -$! Check for MMK/MMS -$! -$ if (Make .eqs. "") -$ then -$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" -$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" -$ else -$ Make = f$edit( Make, "trim") -$ endif -$! -$ gosub find_version -$! -$ open/write topt tmp.opt -$ open/write optf 'optfile' -$! -$ gosub check_opts -$! -$! Look for the compiler used -$! -$ gosub check_compiler -$ close topt -$ close optf -$! -$ if its_decc -$ then -$ ccopt = "/prefix=all" + ccopt -$ if f$trnlnm("SYS") .eqs. "" -$ then -$ if axp -$ then -$ define sys sys$library: -$ else -$ ccopt = "/decc" + ccopt -$ define sys decc$library_include: -$ endif -$ endif -$! -$! 2012-03-05 SMS. -$! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX? -$! -$ if axp .or. ia64 -$ then -$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)" -$ s_case = true -$ endif -$ endif -$ if its_vaxc .or. its_gnuc -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ endif -$! -$! Build a fake configure input header -$! -$ open/write conf_hin config.hin -$ write conf_hin "#undef _LARGEFILE64_SOURCE" -$ close conf_hin -$! -$! -$ i = 0 -$FIND_ACONF: -$ fname = f$element(i,"#",aconf_in_file) -$ if fname .eqs. "#" then goto AMISS_ERR -$ if f$search(fname) .eqs. "" -$ then -$ i = i + 1 -$ goto find_aconf -$ endif -$ open/read/err=aconf_err aconf_in 'fname' -$ open/write aconf zconf.h -$ACONF_LOOP: -$ read/end_of_file=aconf_exit aconf_in line -$ work = f$edit(line, "compress,trim") -$ if f$extract(0,6,work) .nes. "#undef" -$ then -$ if f$extract(0,12,work) .nes. "#cmakedefine" -$ then -$ write aconf line -$ endif -$ else -$ cdef = f$element(1," ",work) -$ gosub check_config -$ endif -$ goto aconf_loop -$ACONF_EXIT: -$ write aconf "" -$ write aconf "/* VMS specifics added by make_vms.com: */" -$ write aconf "#define VMS 1" -$ write aconf "#include " -$ write aconf "#include " -$ write aconf "#ifdef _LARGEFILE" -$ write aconf "# define off64_t __off64_t" -$ write aconf "# define fopen64 fopen" -$ write aconf "# define fseeko64 fseeko" -$ write aconf "# define lseek64 lseek" -$ write aconf "# define ftello64 ftell" -$ write aconf "#endif" -$ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)" -$ write aconf "# define HAVE_VSNPRINTF" -$ write aconf "#endif" -$ close aconf_in -$ close aconf -$ if f$search("''th'") .nes. "" then delete 'th';* -$! Build the thing plain or with mms -$! -$ write sys$output "Compiling Zlib sources ..." -$ if make.eqs."" -$ then -$ if (f$search( "example.obj;*") .nes. "") then delete example.obj;* -$ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;* -$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - - adler32.c zlib.h zconf.h -$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - - compress.c zlib.h zconf.h -$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - - crc32.c zlib.h zconf.h -$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - - deflate.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" - - gzclose.c zutil.h zlib.h zconf.h -$ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" - - gzlib.c zutil.h zlib.h zconf.h -$ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" - - gzread.c zutil.h zlib.h zconf.h -$ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" - - gzwrite.c zutil.h zlib.h zconf.h -$ CALL MAKE infback.OBJ "CC ''CCOPT' infback" - - infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h -$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - - inffast.c zutil.h zlib.h zconf.h inffast.h -$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - - inflate.c zutil.h zlib.h zconf.h infblock.h -$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - - inftrees.c zutil.h zlib.h zconf.h inftrees.h -$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - - trees.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - - uncompr.c zlib.h zconf.h -$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - - zutil.c zutil.h zlib.h zconf.h -$ write sys$output "Building Zlib ..." -$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ -$ write sys$output "Building example..." -$ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" - - [.test]example.c zlib.h zconf.h -$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb -$ write sys$output "Building minigzip..." -$ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" - - [.test]minigzip.c zlib.h zconf.h -$ call make minigzip.exe - - "LINK minigzip,libz.olb/lib" - - minigzip.obj libz.olb -$ else -$ gosub crea_mms -$ write sys$output "Make ''name' ''version' with ''Make' " -$ 'make' -$ endif -$! -$! Create shareable image -$! -$ gosub crea_olist -$ write sys$output "Creating libzshr.exe" -$ call map_2_shopt 'mapfile' 'optfile' -$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt -$ write sys$output "Zlib build completed" -$ delete/nolog tmp.opt;* -$ exit -$AMISS_ERR: -$ write sys$output "No source for config.hin found." -$ write sys$output "Tried any of ''aconf_in_file'" -$ goto err_exit -$CC_ERR: -$ write sys$output "C compiler required to build ''name'" -$ goto err_exit -$ERR_EXIT: -$ set message/facil/ident/sever/text -$ close/nolog optf -$ close/nolog topt -$ close/nolog aconf_in -$ close/nolog aconf -$ close/nolog out -$ close/nolog min -$ close/nolog mod -$ close/nolog h_in -$ write sys$output "Exiting..." -$ exit 2 -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE -$!------------------------------------------------------------------------------ -$! -$! Check command line options and set symbols accordingly -$! -$!------------------------------------------------------------------------------ -$! Version history -$! 0.01 20041206 First version to receive a number -$! 0.02 20060126 Add new "HELP" target -$ CHECK_OPTS: -$ i = 1 -$ OPT_LOOP: -$ if i .lt. 9 -$ then -$ cparm = f$edit(p'i',"upcase") -$! -$! Check if parameter actually contains something -$! -$ if f$edit(cparm,"trim") .nes. "" -$ then -$ if cparm .eqs. "DEBUG" -$ then -$ ccopt = ccopt + "/noopt/deb" -$ lopts = lopts + "/deb" -$ endif -$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ ccopt = ccopt + f$extract(start,len,cparm) -$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - - then s_case = true -$ endif -$ if cparm .eqs. "LINK" then linkonly = true -$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ lopts = lopts + f$extract(start,len,cparm) -$ endif -$ if f$locate("CC=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ cc_com = f$extract(start,len,cparm) - if (cc_com .nes. "DECC") .and. - - (cc_com .nes. "VAXC") .and. - - (cc_com .nes. "GNUC") -$ then -$ write sys$output "Unsupported compiler choice ''cc_com' ignored" -$ write sys$output "Use DECC, VAXC, or GNUC instead" -$ else -$ if cc_com .eqs. "DECC" then its_decc = true -$ if cc_com .eqs. "VAXC" then its_vaxc = true -$ if cc_com .eqs. "GNUC" then its_gnuc = true -$ endif -$ endif -$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ mmks = f$extract(start,len,cparm) -$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") -$ then -$ make = mmks -$ else -$ write sys$output "Unsupported make choice ''mmks' ignored" -$ write sys$output "Use MMK or MMS instead" -$ endif -$ endif -$ if cparm .eqs. "HELP" then gosub bhelp -$ endif -$ i = i + 1 -$ goto opt_loop -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Look for the compiler used -$! -$! Version history -$! 0.01 20040223 First version to receive a number -$! 0.02 20040229 Save/set value of decc$no_rooted_search_lists -$! 0.03 20060202 Extend handling of GNU C -$! 0.04 20090402 Compaq -> hp -$CHECK_COMPILER: -$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) -$ then -$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "") -$ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "") -$ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "") -$ endif -$! -$! Exit if no compiler available -$! -$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) -$ then goto CC_ERR -$ else -$ if its_decc -$ then -$ write sys$output "CC compiler check ... hp C" -$ if f$trnlnm("decc$no_rooted_search_lists") .nes. "" -$ then -$ dnrsl = f$trnlnm("decc$no_rooted_search_lists") -$ endif -$ define/nolog decc$no_rooted_search_lists 1 -$ else -$ if its_vaxc then write sys$output "CC compiler check ... VAX C" -$ if its_gnuc -$ then -$ write sys$output "CC compiler check ... GNU C" -$ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib" -$ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib" -$ cc = "gcc" -$ endif -$ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share" -$ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share" -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! If MMS/MMK are available dump out the descrip.mms if required -$! -$CREA_MMS: -$ write sys$output "Creating descrip.mms..." -$ create descrip.mms -$ open/append out descrip.mms -$ copy sys$input: out -$ deck -# descrip.mms: MMS description file for building zlib on VMS -# written by Martin P.J. Zinser -# - -OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ - gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ - deflate.obj, trees.obj, zutil.obj, inflate.obj, \ - inftrees.obj, inffast.obj - -$ eod -$ write out "CFLAGS=", ccopt -$ write out "LOPTS=", lopts -$ write out "all : example.exe minigzip.exe libz.olb" -$ copy sys$input: out -$ deck - @ write sys$output " Example applications available" - -libz.olb : libz.olb($(OBJS)) - @ write sys$output " libz available" - -example.exe : example.obj libz.olb - link $(LOPTS) example,libz.olb/lib - -minigzip.exe : minigzip.obj libz.olb - link $(LOPTS) minigzip,libz.olb/lib - -clean : - delete *.obj;*,libz.olb;*,*.opt;*,*.exe;* - - -# Other dependencies. -adler32.obj : adler32.c zutil.h zlib.h zconf.h -compress.obj : compress.c zlib.h zconf.h -crc32.obj : crc32.c zutil.h zlib.h zconf.h -deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h -example.obj : [.test]example.c zlib.h zconf.h -gzclose.obj : gzclose.c zutil.h zlib.h zconf.h -gzlib.obj : gzlib.c zutil.h zlib.h zconf.h -gzread.obj : gzread.c zutil.h zlib.h zconf.h -gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h -inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h -inflate.obj : inflate.c zutil.h zlib.h zconf.h -inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h -minigzip.obj : [.test]minigzip.c zlib.h zconf.h -trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h -uncompr.obj : uncompr.c zlib.h zconf.h -zutil.obj : zutil.c zutil.h zlib.h zconf.h -infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h -$ eod -$ close out -$ return -$!------------------------------------------------------------------------------ -$! -$! Read list of core library sources from makefile.in and create options -$! needed to build shareable image -$! -$CREA_OLIST: -$ open/read min makefile.in -$ open/write mod modules.opt -$ src_check_list = "OBJZ =#OBJG =" -$MRLOOP: -$ read/end=mrdone min rec -$ i = 0 -$SRC_CHECK_LOOP: -$ src_check = f$element(i, "#", src_check_list) -$ i = i+1 -$ if src_check .eqs. "#" then goto mrloop -$ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop -$ rec = rec - src_check -$ gosub extra_filnam -$ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop -$MRSLOOP: -$ read/end=mrdone min rec -$ gosub extra_filnam -$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop -$MRDONE: -$ close min -$ close mod -$ return -$!------------------------------------------------------------------------------ -$! -$! Take record extracted in crea_olist and split it into single filenames -$! -$EXTRA_FILNAM: -$ myrec = f$edit(rec - "\", "trim,compress") -$ i = 0 -$FELOOP: -$ srcfil = f$element(i," ", myrec) -$ if (srcfil .nes. " ") -$ then -$ write mod f$parse(srcfil,,,"NAME"), ".obj" -$ i = i + 1 -$ goto feloop -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Find current Zlib version number -$! -$FIND_VERSION: -$ open/read h_in 'v_file' -$hloop: -$ read/end=hdone h_in rec -$ rec = f$edit(rec,"TRIM") -$ if (f$extract(0,1,rec) .nes. "#") then goto hloop -$ rec = f$edit(rec - "#", "TRIM") -$ if f$element(0," ",rec) .nes. "define" then goto hloop -$ if f$element(1," ",rec) .eqs. v_string -$ then -$ version = 'f$element(2," ",rec)' -$ goto hdone -$ endif -$ goto hloop -$hdone: -$ close h_in -$ return -$!------------------------------------------------------------------------------ -$! -$CHECK_CONFIG: -$! -$ in_ldef = f$locate(cdef,libdefs) -$ if (in_ldef .lt. f$length(libdefs)) -$ then -$ write aconf "#define ''cdef' 1" -$ libdefs = f$extract(0,in_ldef,libdefs) + - - f$extract(in_ldef + f$length(cdef) + 1, - - f$length(libdefs) - in_ldef - f$length(cdef) - 1, - - libdefs) -$ else -$ if (f$type('cdef') .eqs. "INTEGER") -$ then -$ write aconf "#define ''cdef' ", 'cdef' -$ else -$ if (f$type('cdef') .eqs. "STRING") -$ then -$ write aconf "#define ''cdef' ", """", '''cdef'', """" -$ else -$ gosub check_cc_def -$ endif -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Check if this is a define relating to the properties of the C/C++ -$! compiler -$! -$ CHECK_CC_DEF: -$ if (cdef .eqs. "_LARGEFILE64_SOURCE") -$ then -$ copy sys$input: 'tc' -$ deck -#include "tconfig" -#define _LARGEFILE -#include - -int main(){ -FILE *fp; - fp = fopen("temp.txt","r"); - fseeko(fp,1,SEEK_SET); - fclose(fp); -} - -$ eod -$ test_inv = false -$ comm_h = false -$ gosub cc_prop_check -$ return -$ endif -$ write aconf "/* ", line, " */" -$ return -$!------------------------------------------------------------------------------ -$! -$! Check for properties of C/C++ compiler -$! -$! Version history -$! 0.01 20031020 First version to receive a number -$! 0.02 20031022 Added logic for defines with value -$! 0.03 20040309 Make sure local config file gets not deleted -$! 0.04 20041230 Also write include for configure run -$! 0.05 20050103 Add processing of "comment defines" -$CC_PROP_CHECK: -$ cc_prop = true -$ is_need = false -$ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true) -$ if f$search(th) .eqs. "" then create 'th' -$ set message/nofac/noident/nosever/notext -$ on error then continue -$ cc 'tmpnam' -$ if .not. ($status) then cc_prop = false -$ on error then continue -$! The headers might lie about the capabilities of the RTL -$ link 'tmpnam',tmp.opt/opt -$ if .not. ($status) then cc_prop = false -$ set message/fac/ident/sever/text -$ on error then goto err_exit -$ delete/nolog 'tmpnam'.*;*/exclude='th' -$ if (cc_prop .and. .not. is_need) .or. - - (.not. cc_prop .and. is_need) -$ then -$ write sys$output "Checking for ''cdef'... yes" -$ if f$type('cdef_val'_yes) .nes. "" -$ then -$ if f$type('cdef_val'_yes) .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes) -$ if f$type('cdef_val'_yes) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes) -$ else -$ call write_config f$fao("#define !AS 1",cdef) -$ endif -$ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. - - (cdef .eqs. "_LARGEFILE64_SOURCE") then - - call write_config f$string("#define _LARGEFILE 1") -$ else -$ write sys$output "Checking for ''cdef'... no" -$ if (comm_h) -$ then - call write_config f$fao("/* !AS */",line) -$ else -$ if f$type('cdef_val'_no) .nes. "" -$ then -$ if f$type('cdef_val'_no) .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no) -$ if f$type('cdef_val'_no) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no) -$ else -$ call write_config f$fao("#undef !AS",cdef) -$ endif -$ endif -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Check for properties of C/C++ compiler with multiple result values -$! -$! Version history -$! 0.01 20040127 First version -$! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05 -$CC_MPROP_CHECK: -$ cc_prop = true -$ i = 1 -$ idel = 1 -$ MT_LOOP: -$ if f$type(result_'i') .eqs. "STRING" -$ then -$ set message/nofac/noident/nosever/notext -$ on error then continue -$ cc 'tmpnam'_'i' -$ if .not. ($status) then cc_prop = false -$ on error then continue -$! The headers might lie about the capabilities of the RTL -$ link 'tmpnam'_'i',tmp.opt/opt -$ if .not. ($status) then cc_prop = false -$ set message/fac/ident/sever/text -$ on error then goto err_exit -$ delete/nolog 'tmpnam'_'i'.*;* -$ if (cc_prop) -$ then -$ write sys$output "Checking for ''cdef'... ", mdef_'i' -$ if f$type(mdef_'i') .eqs. "INTEGER" - - then call write_config f$fao("#define !AS !UL",cdef,mdef_'i') -$ if f$type('cdef_val'_yes) .eqs. "STRING" - - then call write_config f$fao("#define !AS !AS",cdef,mdef_'i') -$ goto msym_clean -$ else -$ i = i + 1 -$ goto mt_loop -$ endif -$ endif -$ write sys$output "Checking for ''cdef'... no" -$ call write_config f$fao("#undef !AS",cdef) -$ MSYM_CLEAN: -$ if (idel .le. msym_max) -$ then -$ delete/sym mdef_'idel' -$ idel = idel + 1 -$ goto msym_clean -$ endif -$ return -$!------------------------------------------------------------------------------ -$! -$! Write configuration to both permanent and temporary config file -$! -$! Version history -$! 0.01 20031029 First version to receive a number -$! -$WRITE_CONFIG: SUBROUTINE -$ write aconf 'p1' -$ open/append confh 'th' -$ write confh 'p1' -$ close confh -$ENDSUBROUTINE -$!------------------------------------------------------------------------------ -$! -$! Analyze the project map file and create the symbol vector for a shareable -$! image from it -$! -$! Version history -$! 0.01 20120128 First version -$! 0.02 20120226 Add pre-load logic -$! -$ MAP_2_SHOPT: Subroutine -$! -$ SAY := "WRITE_ SYS$OUTPUT" -$! -$ IF F$SEARCH("''P1'") .EQS. "" -$ THEN -$ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available" -$ goto exit_m2s -$ ENDIF -$ IF "''P2'" .EQS. "" -$ THEN -$ SAY "MAP_2_SHOPT: Error, no output file provided" -$ goto exit_m2s -$ ENDIF -$! -$ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary" -$ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread" -$ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary" -$ module4 = "inflateSync#uncompress#zlibVersion#compress" -$ open/read map 'p1 -$ if axp .or. ia64 -$ then -$ open/write aopt a.opt -$ open/write bopt b.opt -$ write aopt " CASE_SENSITIVE=YES" -$ write bopt "SYMBOL_VECTOR= (-" -$ mod_sym_num = 1 -$ MOD_SYM_LOOP: -$ if f$type(module'mod_sym_num') .nes. "" -$ then -$ mod_in = 0 -$ MOD_SYM_IN: -$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') -$ if shared_proc .nes. "#" -$ then -$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- - f$edit(shared_proc,"upcase"),shared_proc) -$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) -$ mod_in = mod_in + 1 -$ goto mod_sym_in -$ endif -$ mod_sym_num = mod_sym_num + 1 -$ goto mod_sym_loop -$ endif -$MAP_LOOP: -$ read/end=map_end map line -$ if (f$locate("{",line).lt. f$length(line)) .or. - - (f$locate("global:", line) .lt. f$length(line)) -$ then -$ proc = true -$ goto map_loop -$ endif -$ if f$locate("}",line).lt. f$length(line) then proc = false -$ if f$locate("local:", line) .lt. f$length(line) then proc = false -$ if proc -$ then -$ shared_proc = f$edit(line,"collapse") -$ chop_semi = f$locate(";", shared_proc) -$ if chop_semi .lt. f$length(shared_proc) then - - shared_proc = f$extract(0, chop_semi, shared_proc) -$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- - f$edit(shared_proc,"upcase"),shared_proc) -$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) -$ endif -$ goto map_loop -$MAP_END: -$ close/nolog aopt -$ close/nolog bopt -$ open/append libopt 'p2' -$ open/read aopt a.opt -$ open/read bopt b.opt -$ALOOP: -$ read/end=aloop_end aopt line -$ write libopt line -$ goto aloop -$ALOOP_END: -$ close/nolog aopt -$ sv = "" -$BLOOP: -$ read/end=bloop_end bopt svn -$ if (svn.nes."") -$ then -$ if (sv.nes."") then write libopt sv -$ sv = svn -$ endif -$ goto bloop -$BLOOP_END: -$ write libopt f$extract(0,f$length(sv)-2,sv), "-" -$ write libopt ")" -$ close/nolog bopt -$ delete/nolog/noconf a.opt;*,b.opt;* -$ else -$ if vax -$ then -$ open/append libopt 'p2' -$ mod_sym_num = 1 -$ VMOD_SYM_LOOP: -$ if f$type(module'mod_sym_num') .nes. "" -$ then -$ mod_in = 0 -$ VMOD_SYM_IN: -$ shared_proc = f$element(mod_in, "#", module'mod_sym_num') -$ if shared_proc .nes. "#" -$ then -$ write libopt f$fao("UNIVERSAL=!AS",- - f$edit(shared_proc,"upcase")) -$ mod_in = mod_in + 1 -$ goto vmod_sym_in -$ endif -$ mod_sym_num = mod_sym_num + 1 -$ goto vmod_sym_loop -$ endif -$VMAP_LOOP: -$ read/end=vmap_end map line -$ if (f$locate("{",line).lt. f$length(line)) .or. - - (f$locate("global:", line) .lt. f$length(line)) -$ then -$ proc = true -$ goto vmap_loop -$ endif -$ if f$locate("}",line).lt. f$length(line) then proc = false -$ if f$locate("local:", line) .lt. f$length(line) then proc = false -$ if proc -$ then -$ shared_proc = f$edit(line,"collapse") -$ chop_semi = f$locate(";", shared_proc) -$ if chop_semi .lt. f$length(shared_proc) then - - shared_proc = f$extract(0, chop_semi, shared_proc) -$ write libopt f$fao("UNIVERSAL=!AS",- - f$edit(shared_proc,"upcase")) -$ endif -$ goto vmap_loop -$VMAP_END: -$ else -$ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)" -$ write sys$output "No options file created" -$ endif -$ endif -$ EXIT_M2S: -$ close/nolog map -$ close/nolog libopt -$ endsubroutine diff --git a/third_party/zlib/msdos/Makefile.bor b/third_party/zlib/msdos/Makefile.bor deleted file mode 100644 index 3d12a2c..0000000 --- a/third_party/zlib/msdos/Makefile.bor +++ /dev/null @@ -1,115 +0,0 @@ -# Makefile for zlib -# Borland C++ -# Last updated: 15-Mar-2003 - -# To use, do "make -fmakefile.bor" -# To compile in small model, set below: MODEL=s - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. For example: -# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to the LOC macro below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------ Turbo C++, Borland C++ ------------ - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added -# to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. -CPU_TYP = 0 - -# memory model: one of s, m, c, l (small, medium, compact, large) -MODEL=l - -# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version -CC=bcc -LD=bcc -AR=tlib - -# compiler flags -# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0 -CFLAGS=-O2 -Z -m$(MODEL) $(LOC) - -LDFLAGS=-m$(MODEL) -f- - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del zlib_*.bak - -del foo.gz diff --git a/third_party/zlib/msdos/Makefile.dj2 b/third_party/zlib/msdos/Makefile.dj2 deleted file mode 100644 index 59d2037..0000000 --- a/third_party/zlib/msdos/Makefile.dj2 +++ /dev/null @@ -1,104 +0,0 @@ -# Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.dj2; make test -fmakefile.dj2 -# -# To install libz.a, zconf.h and zlib.h in the djgpp directories, type: -# -# make install -fmakefile.dj2 -# -# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as -# in the sample below if the pattern of the DJGPP distribution is to -# be followed. Remember that, while 'es around <=> are ignored in -# makefiles, they are *not* in batch files or in djgpp.env. -# - - - - - -# [make] -# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include -# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib -# BUTT=-m486 -# - - - - - -# Alternately, these variables may be defined below, overriding the values -# in djgpp.env, as -# INCLUDE_PATH=c:\usr\include -# LIBRARY_PATH=c:\usr\lib - -CC=gcc - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lz -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=libz.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -OBJA = -# to use the asm code: make OBJA=match.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -check: test -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -libz.a: $(OBJS) $(OBJA) - $(AR) $@ $(OBJS) $(OBJA) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - -# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . - -.PHONY : uninstall clean - -install: $(INCL) $(LIBS) - -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) - -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) - $(INSTALL) zlib.h $(INCLUDE_PATH) - $(INSTALL) zconf.h $(INCLUDE_PATH) - $(INSTALL) libz.a $(LIBRARY_PATH) - -uninstall: - $(RM) $(INCLUDE_PATH)\zlib.h - $(RM) $(INCLUDE_PATH)\zconf.h - $(RM) $(LIBRARY_PATH)\libz.a - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) libz.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/third_party/zlib/msdos/Makefile.emx b/third_party/zlib/msdos/Makefile.emx deleted file mode 100644 index e30f67b..0000000 --- a/third_party/zlib/msdos/Makefile.emx +++ /dev/null @@ -1,69 +0,0 @@ -# Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.emx; make test -fmakefile.emx -# - -CC=gcc - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lzlib -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=zlib.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ - uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -zlib.a: $(OBJS) - $(AR) $@ $(OBJS) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - - -.PHONY : clean - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) zlib.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/third_party/zlib/msdos/Makefile.msc b/third_party/zlib/msdos/Makefile.msc deleted file mode 100644 index ae83786..0000000 --- a/third_party/zlib/msdos/Makefile.msc +++ /dev/null @@ -1,112 +0,0 @@ -# Makefile for zlib -# Microsoft C 5.1 or later -# Last updated: 19-Mar-2003 - -# To use, do "make makefile.msc" -# To compile in small model, set below: MODEL=S - -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to the LOC macro below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------- Microsoft C 5.1 and later ------------- - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added -# to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. -CPU_TYP = 0 - -# Memory model: one of S, M, C, L (small, medium, compact, large) -MODEL=L - -CC=cl -CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) -#-Ox generates bad code with MSC 5.1 -LIB_CFLAGS=-Zl $(CFLAGS) - -LD=link -LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode -# "/farcall/packcode" are only useful for `large code' memory models -# but should be a "no-op" for small code models. - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(LIB_CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - -minigzip.obj: test/minigzip.c zlib.h zconf.h - $(CC) -c $(CFLAGS) $*.c - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - if exist $(ZLIB_LIB) del $(ZLIB_LIB) - lib $(ZLIB_LIB) $(OBJ1); - lib $(ZLIB_LIB) $(OBJ2); - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB); - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB); - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del *.map - -del zlib_*.bak - -del foo.gz diff --git a/third_party/zlib/msdos/Makefile.tc b/third_party/zlib/msdos/Makefile.tc deleted file mode 100644 index 5aec82a..0000000 --- a/third_party/zlib/msdos/Makefile.tc +++ /dev/null @@ -1,100 +0,0 @@ -# Makefile for zlib -# Turbo C 2.01, Turbo C++ 1.01 -# Last updated: 15-Mar-2003 - -# To use, do "make -fmakefile.tc" -# To compile in small model, set below: MODEL=s - -# WARNING: the small model is supported but only for small values of -# MAX_WBITS and MAX_MEM_LEVEL. For example: -# -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 -# If you wish to reduce the memory requirements (default 256K for big -# objects plus a few K), you can add to CFLAGS below: -# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 -# See zconf.h for details about the memory requirements. - -# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------ -MODEL=l -CC=tcc -LD=tcc -AR=tlib -# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 -CFLAGS=-O2 -G -Z -m$(MODEL) -LDFLAGS=-m$(MODEL) -f- - - -# variables -ZLIB_LIB = zlib_$(MODEL).lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $*.c - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -clean: - -del *.obj - -del *.lib - -del *.exe - -del zlib_*.bak - -del foo.gz diff --git a/third_party/zlib/nintendods/Makefile b/third_party/zlib/nintendods/Makefile deleted file mode 100644 index 21337d0..0000000 --- a/third_party/zlib/nintendods/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- - -ifeq ($(strip $(DEVKITARM)),) -$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") -endif - -include $(DEVKITARM)/ds_rules - -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# DATA is a list of directories containing data files -# INCLUDES is a list of directories containing header files -#--------------------------------------------------------------------------------- -TARGET := $(shell basename $(CURDIR)) -BUILD := build -SOURCES := ../../ -DATA := data -INCLUDES := include - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -mthumb -mthumb-interwork - -CFLAGS := -Wall -O2\ - -march=armv5te -mtune=arm946e-s \ - -fomit-frame-pointer -ffast-math \ - $(ARCH) - -CFLAGS += $(INCLUDE) -DARM9 -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions - -ASFLAGS := $(ARCH) -march=armv5te -mtune=arm946e-s -LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(LIBNDS) - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/lib/libz.a - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) - -export DEPSDIR := $(CURDIR)/$(BUILD) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES := $(addsuffix .o,$(BINFILES)) \ - $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -.PHONY: $(BUILD) clean all - -#--------------------------------------------------------------------------------- -all: $(BUILD) - @[ -d $@ ] || mkdir -p include - @cp ../../*.h include - -lib: - @[ -d $@ ] || mkdir -p $@ - -$(BUILD): lib - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -fr $(BUILD) lib - -#--------------------------------------------------------------------------------- -else - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -$(OUTPUT) : $(OFILES) - -#--------------------------------------------------------------------------------- -%.bin.o : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- diff --git a/third_party/zlib/nintendods/README b/third_party/zlib/nintendods/README deleted file mode 100644 index ba7a37d..0000000 --- a/third_party/zlib/nintendods/README +++ /dev/null @@ -1,5 +0,0 @@ -This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. - -Eduardo Costa -January 3, 2009 - diff --git a/third_party/zlib/old/Makefile.emx b/third_party/zlib/old/Makefile.emx deleted file mode 100644 index 612b037..0000000 --- a/third_party/zlib/old/Makefile.emx +++ /dev/null @@ -1,69 +0,0 @@ -# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. -# Copyright (C) 1995-1998 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type: -# -# make -fmakefile.emx; make test -fmakefile.emx -# - -CC=gcc -Zwin32 - -#CFLAGS=-MMD -O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-MMD -g -DZLIB_DEBUG -CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ - -Wstrict-prototypes -Wmissing-prototypes - -# If cp.exe is available, replace "copy /Y" with "cp -fp" . -CP=copy /Y -# If gnu install.exe is available, replace $(CP) with ginstall. -INSTALL=$(CP) -# The default value of RM is "rm -f." If "rm.exe" is found, comment out: -RM=del -LDLIBS=-L. -lzlib -LD=$(CC) -s -o -LDSHARED=$(CC) - -INCL=zlib.h zconf.h -LIBS=zlib.a - -AR=ar rcs - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ - gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o - -TEST_OBJS = example.o minigzip.o - -all: example.exe minigzip.exe - -test: all - ./example - echo hello world | .\minigzip | .\minigzip -d - -%.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ - -zlib.a: $(OBJS) - $(AR) $@ $(OBJS) - -%.exe : %.o $(LIBS) - $(LD) $@ $< $(LDLIBS) - - -.PHONY : clean - -clean: - $(RM) *.d - $(RM) *.o - $(RM) *.exe - $(RM) zlib.a - $(RM) foo.gz - -DEPS := $(wildcard *.d) -ifneq ($(DEPS),) -include $(DEPS) -endif diff --git a/third_party/zlib/old/Makefile.riscos b/third_party/zlib/old/Makefile.riscos deleted file mode 100644 index 57e29d3..0000000 --- a/third_party/zlib/old/Makefile.riscos +++ /dev/null @@ -1,151 +0,0 @@ -# Project: zlib_1_03 -# Patched for zlib 1.1.2 rw@shadow.org.uk 19980430 -# test works out-of-the-box, installs `somewhere' on demand - -# Toolflags: -CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = -LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ - -# change the line below to where _you_ want the library installed. -libdest = lib:zlib - -# Final targets: -@.lib: @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \ - @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \ - @.o.uncompr @.o.zutil - LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \ - @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \ - @.o.trees @.o.uncompr @.o.zutil -test: @.minigzip @.example @.lib - @copy @.lib @.libc A~C~DF~L~N~P~Q~RS~TV - @echo running tests: hang on. - @/@.minigzip -f -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -f -1 libc - @/@.minigzip -d libc-gz - @/@.minigzip -h -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -h -1 libc - @/@.minigzip -d libc-gz - @/@.minigzip -9 libc - @/@.minigzip -d libc-gz - @/@.minigzip -1 libc - @/@.minigzip -d libc-gz - @diff @.lib @.libc - @echo that should have reported '@.lib and @.libc identical' if you have diff. - @/@.example @.fred @.fred - @echo that will have given lots of hello!'s. - -@.minigzip: @.o.minigzip @.lib C:o.Stubs - Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs -@.example: @.o.example @.lib C:o.Stubs - Link $(Linkflags) @.o.example @.lib C:o.Stubs - -install: @.lib - cdir $(libdest) - cdir $(libdest).h - @copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV - @copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV - @copy @.lib $(libdest).lib A~C~DF~L~N~P~Q~RS~TV - @echo okay, installed zlib in $(libdest) - -clean:; remove @.minigzip - remove @.example - remove @.libc - -wipe @.o.* F~r~cV - remove @.fred - -# User-editable dependencies: -.c.o: - cc $(ccflags) -o $@ $< - -# Static dependencies: - -# Dynamic dependencies: -o.example: c.example -o.example: h.zlib -o.example: h.zconf -o.minigzip: c.minigzip -o.minigzip: h.zlib -o.minigzip: h.zconf -o.adler32: c.adler32 -o.adler32: h.zlib -o.adler32: h.zconf -o.compress: c.compress -o.compress: h.zlib -o.compress: h.zconf -o.crc32: c.crc32 -o.crc32: h.zlib -o.crc32: h.zconf -o.deflate: c.deflate -o.deflate: h.deflate -o.deflate: h.zutil -o.deflate: h.zlib -o.deflate: h.zconf -o.gzio: c.gzio -o.gzio: h.zutil -o.gzio: h.zlib -o.gzio: h.zconf -o.infblock: c.infblock -o.infblock: h.zutil -o.infblock: h.zlib -o.infblock: h.zconf -o.infblock: h.infblock -o.infblock: h.inftrees -o.infblock: h.infcodes -o.infblock: h.infutil -o.infcodes: c.infcodes -o.infcodes: h.zutil -o.infcodes: h.zlib -o.infcodes: h.zconf -o.infcodes: h.inftrees -o.infcodes: h.infblock -o.infcodes: h.infcodes -o.infcodes: h.infutil -o.infcodes: h.inffast -o.inffast: c.inffast -o.inffast: h.zutil -o.inffast: h.zlib -o.inffast: h.zconf -o.inffast: h.inftrees -o.inffast: h.infblock -o.inffast: h.infcodes -o.inffast: h.infutil -o.inffast: h.inffast -o.inflate: c.inflate -o.inflate: h.zutil -o.inflate: h.zlib -o.inflate: h.zconf -o.inflate: h.infblock -o.inftrees: c.inftrees -o.inftrees: h.zutil -o.inftrees: h.zlib -o.inftrees: h.zconf -o.inftrees: h.inftrees -o.inftrees: h.inffixed -o.infutil: c.infutil -o.infutil: h.zutil -o.infutil: h.zlib -o.infutil: h.zconf -o.infutil: h.infblock -o.infutil: h.inftrees -o.infutil: h.infcodes -o.infutil: h.infutil -o.trees: c.trees -o.trees: h.deflate -o.trees: h.zutil -o.trees: h.zlib -o.trees: h.zconf -o.trees: h.trees -o.uncompr: c.uncompr -o.uncompr: h.zlib -o.uncompr: h.zconf -o.zutil: c.zutil -o.zutil: h.zutil -o.zutil: h.zlib -o.zutil: h.zconf diff --git a/third_party/zlib/old/README b/third_party/zlib/old/README deleted file mode 100644 index 800bf07..0000000 --- a/third_party/zlib/old/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains files that have not been updated for zlib 1.2.x - -(Volunteers are encouraged to help clean this up. Thanks.) diff --git a/third_party/zlib/old/descrip.mms b/third_party/zlib/old/descrip.mms deleted file mode 100644 index 7066da5..0000000 --- a/third_party/zlib/old/descrip.mms +++ /dev/null @@ -1,48 +0,0 @@ -# descrip.mms: MMS description file for building zlib on VMS -# written by Martin P.J. Zinser - -cc_defs = -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - -OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ - deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ - inftrees.obj, infcodes.obj, infutil.obj, inffast.obj - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : example.exe minigzip.exe - @ write sys$output " Example applications available" -libz.olb : libz.olb($(OBJS)) - @ write sys$output " libz available" - -example.exe : example.obj libz.olb - link example,libz.olb/lib - -minigzip.exe : minigzip.obj libz.olb - link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib - -clean : - delete *.obj;*,libz.olb;* - - -# Other dependencies. -adler32.obj : zutil.h zlib.h zconf.h -compress.obj : zlib.h zconf.h -crc32.obj : zutil.h zlib.h zconf.h -deflate.obj : deflate.h zutil.h zlib.h zconf.h -example.obj : zlib.h zconf.h -gzio.obj : zutil.h zlib.h zconf.h -infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h -inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h -inflate.obj : zutil.h zlib.h zconf.h infblock.h -inftrees.obj : zutil.h zlib.h zconf.h inftrees.h -infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h -minigzip.obj : zlib.h zconf.h -trees.obj : deflate.h zutil.h zlib.h zconf.h -uncompr.obj : zlib.h zconf.h -zutil.obj : zutil.h zlib.h zconf.h diff --git a/third_party/zlib/old/os2/Makefile.os2 b/third_party/zlib/old/os2/Makefile.os2 deleted file mode 100644 index bb426c0..0000000 --- a/third_party/zlib/old/os2/Makefile.os2 +++ /dev/null @@ -1,136 +0,0 @@ -# Makefile for zlib under OS/2 using GCC (PGCC) -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile and test, type: -# cp Makefile.os2 .. -# cd .. -# make -f Makefile.os2 test - -# This makefile will build a static library z.lib, a shared library -# z.dll and a import library zdll.lib. You can use either z.lib or -# zdll.lib by specifying either -lz or -lzdll on gcc's command line - -CC=gcc -Zomf -s - -CFLAGS=-O6 -Wall -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DZLIB_DEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -#################### BUG WARNING: ##################### -## infcodes.c hits a bug in pgcc-1.0, so you have to use either -## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem) -## This bug is reportedly fixed in pgcc >1.0, but this was not tested -CFLAGS+=-fno-force-mem - -LDFLAGS=-s -L. -lzdll -Zcrtdll -LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll - -VER=1.1.0 -ZLIB=z.lib -SHAREDLIB=z.dll -SHAREDLIBIMP=zdll.lib -LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP) - -AR=emxomfar cr -IMPLIB=emximp -RANLIB=echo -TAR=tar -SHELL=bash - -prefix=/usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o - -TEST_OBJS = example.o minigzip.o - -DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ - algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ - nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ - contrib/asm386/*.asm contrib/asm386/*.c \ - contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \ - contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ - contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 - -all: example.exe minigzip.exe - -test: all - @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - echo hello world | ./minigzip | ./minigzip -d || \ - echo ' *** minigzip test FAILED ***' ; \ - if ./example; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; \ - fi - -$(ZLIB): $(OBJS) - $(AR) $@ $(OBJS) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -$(SHAREDLIB): $(OBJS) os2/z.def - $(LDSHARED) -o $@ $^ - -$(SHAREDLIBIMP): os2/z.def - $(IMPLIB) -o $@ $^ - -example.exe: example.o $(LIBS) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) - -minigzip.exe: minigzip.o $(LIBS) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) - -clean: - rm -f *.o *~ example minigzip libz.a libz.so* foo.gz - -distclean: clean - -zip: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c - v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - zip -ul9 zlib$$v $(DISTFILES) - mv Makefile~ Makefile - -dist: - mv Makefile Makefile~; cp -p Makefile.in Makefile - rm -f test.c ztest*.c - d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ - rm -f $$d.tar.gz; \ - if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ - files=""; \ - for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ - cd ..; \ - GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ - if test ! -d $$d; then rm -f $$d; fi - mv Makefile~ Makefile - -tags: - etags *.[ch] - -depend: - makedepend -- $(CFLAGS) -- *.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h -infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h -infcodes.o: zutil.h zlib.h zconf.h -infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h -inffast.o: infblock.h infcodes.h infutil.h inffast.h -inflate.o: zutil.h zlib.h zconf.h infblock.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h -minigzip.o: zlib.h zconf.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/third_party/zlib/old/os2/zlib.def b/third_party/zlib/old/os2/zlib.def deleted file mode 100644 index 4c753f1..0000000 --- a/third_party/zlib/old/os2/zlib.def +++ /dev/null @@ -1,51 +0,0 @@ -; -; Slightly modified version of ../nt/zlib.dnt :-) -; - -LIBRARY Z -DESCRIPTION "Zlib compression library for OS/2" -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE - -EXPORTS - adler32 - compress - crc32 - deflate - deflateCopy - deflateEnd - deflateInit2_ - deflateInit_ - deflateParams - deflateReset - deflateSetDictionary - gzclose - gzdopen - gzerror - gzflush - gzopen - gzread - gzwrite - inflate - inflateEnd - inflateInit2_ - inflateInit_ - inflateReset - inflateSetDictionary - inflateSync - uncompress - zlibVersion - gzprintf - gzputc - gzgetc - gzseek - gzrewind - gztell - gzeof - gzsetparams - zError - inflateSyncPoint - get_crc_table - compress2 - gzputs - gzgets diff --git a/third_party/zlib/old/visual-basic.txt b/third_party/zlib/old/visual-basic.txt deleted file mode 100644 index 3c8d2a4..0000000 --- a/third_party/zlib/old/visual-basic.txt +++ /dev/null @@ -1,160 +0,0 @@ -See below some functions declarations for Visual Basic. - -Frequently Asked Question: - -Q: Each time I use the compress function I get the -5 error (not enough - room in the output buffer). - -A: Make sure that the length of the compressed buffer is passed by - reference ("as any"), not by value ("as long"). Also check that - before the call of compress this length is equal to the total size of - the compressed buffer and not zero. - - -From: "Jon Caruana" -Subject: Re: How to port zlib declares to vb? -Date: Mon, 28 Oct 1996 18:33:03 -0600 - -Got the answer! (I haven't had time to check this but it's what I got, and -looks correct): - -He has the following routines working: - compress - uncompress - gzopen - gzwrite - gzread - gzclose - -Declares follow: (Quoted from Carlos Rios , in Vb4 form) - -#If Win16 Then 'Use Win16 calls. -Declare Function compress Lib "ZLIB.DLL" (ByVal compr As - String, comprLen As Any, ByVal buf As String, ByVal buflen - As Long) As Integer -Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr - As String, uncomprLen As Any, ByVal compr As String, ByVal - lcompr As Long) As Integer -Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As - String, ByVal mode As String) As Long -Declare Function gzread Lib "ZLIB.DLL" (ByVal file As - Long, ByVal uncompr As String, ByVal uncomprLen As Integer) - As Integer -Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As - Long, ByVal uncompr As String, ByVal uncomprLen As Integer) - As Integer -Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As - Long) As Integer -#Else -Declare Function compress Lib "ZLIB32.DLL" - (ByVal compr As String, comprLen As Any, ByVal buf As - String, ByVal buflen As Long) As Integer -Declare Function uncompress Lib "ZLIB32.DLL" - (ByVal uncompr As String, uncomprLen As Any, ByVal compr As - String, ByVal lcompr As Long) As Long -Declare Function gzopen Lib "ZLIB32.DLL" - (ByVal file As String, ByVal mode As String) As Long -Declare Function gzread Lib "ZLIB32.DLL" - (ByVal file As Long, ByVal uncompr As String, ByVal - uncomprLen As Long) As Long -Declare Function gzwrite Lib "ZLIB32.DLL" - (ByVal file As Long, ByVal uncompr As String, ByVal - uncomprLen As Long) As Long -Declare Function gzclose Lib "ZLIB32.DLL" - (ByVal file As Long) As Long -#End If - --Jon Caruana -jon-net@usa.net -Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member - - -Here is another example from Michael that he -says conforms to the VB guidelines, and that solves the problem of not -knowing the uncompressed size by storing it at the end of the file: - -'Calling the functions: -'bracket meaning: [optional] {Range of possible values} -'Call subCompressFile( [, , [level of compression {1..9}]]) -'Call subUncompressFile() - -Option Explicit -Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller' -Private Const SUCCESS As Long = 0 -Private Const strFilExt As String = ".cpr" -Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef -dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long, -ByVal level As Integer) As Long -Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef -dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long) -As Long - -Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal -strargCprFilPth As String, Optional ByVal intLvl As Integer = 9) - Dim strCprPth As String - Dim lngOriSiz As Long - Dim lngCprSiz As Long - Dim bytaryOri() As Byte - Dim bytaryCpr() As Byte - lngOriSiz = FileLen(strargOriFilPth) - ReDim bytaryOri(lngOriSiz - 1) - Open strargOriFilPth For Binary Access Read As #1 - Get #1, , bytaryOri() - Close #1 - strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth) -'Select file path and name - strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) = -strFilExt, "", strFilExt) 'Add file extension if not exists - lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit -more space then original file size - ReDim bytaryCpr(lngCprSiz - 1) - If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) = -SUCCESS Then - lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100 - ReDim Preserve bytaryCpr(lngCprSiz - 1) - Open strCprPth For Binary Access Write As #1 - Put #1, , bytaryCpr() - Put #1, , lngOriSiz 'Add the original size value to the end -(last 4 bytes) - Close #1 - Else - MsgBox "Compression error" - End If - Erase bytaryCpr - Erase bytaryOri -End Sub - -Public Sub subUncompressFile(ByVal strargFilPth As String) - Dim bytaryCpr() As Byte - Dim bytaryOri() As Byte - Dim lngOriSiz As Long - Dim lngCprSiz As Long - Dim strOriPth As String - lngCprSiz = FileLen(strargFilPth) - ReDim bytaryCpr(lngCprSiz - 1) - Open strargFilPth For Binary Access Read As #1 - Get #1, , bytaryCpr() - Close #1 - 'Read the original file size value: - lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _ - + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _ - + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _ - + bytaryCpr(lngCprSiz - 4) - ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value - ReDim bytaryOri(lngOriSiz - 1) - If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS -Then - strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt)) - Open strOriPth For Binary Access Write As #1 - Put #1, , bytaryOri() - Close #1 - Else - MsgBox "Uncompression error" - End If - Erase bytaryCpr - Erase bytaryOri -End Sub -Public Property Get lngPercentSmaller() As Long - lngPercentSmaller = lngpvtPcnSml -End Property diff --git a/third_party/zlib/os400/README400 b/third_party/zlib/os400/README400 deleted file mode 100644 index 30ed5a1..0000000 --- a/third_party/zlib/os400/README400 +++ /dev/null @@ -1,48 +0,0 @@ - ZLIB version 1.3.1 for OS/400 installation instructions - -1) Download and unpack the zlib tarball to some IFS directory. - (i.e.: /path/to/the/zlib/ifs/source/directory) - - If the installed IFS command supports gzip format, this is straightforward, -else you have to unpack first to some directory on a system supporting it, -then move the whole directory to the IFS via the network (via SMB or FTP). - -2) Edit the configuration parameters in the compilation script. - - EDTF STMF('/path/to/the/zlib/ifs/source/directory/os400/make.sh') - -Tune the parameters according to your needs if not matching the defaults. -Save the file and exit after edition. - -3) Enter qshell, then work in the zlib OS/400 specific directory. - - QSH - cd /path/to/the/zlib/ifs/source/directory/os400 - -4) Compile and install - - sh make.sh - -The script will: -- create the libraries, objects and IFS directories for the zlib environment, -- compile all modules, -- create a service program, -- create a static and a dynamic binding directory, -- install header files for C/C++ and for ILE/RPG, both for compilation in - DB2 and IFS environments. - -That's all. - - -Notes: For OS/400 ILE RPG programmers, a /copy member defining the ZLIB - API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). - In the ILE environment, the same definitions are available from - file zlib.inc located in the same IFS include directory as the - C/C++ header files. - Please read comments in this member for more information. - - Remember that most foreign textual data are ASCII coded: this - implementation does not handle conversion from/to ASCII, so - text data code conversions must be done explicitly. - - Mainly for the reason above, always open zipped files in binary mode. diff --git a/third_party/zlib/os400/bndsrc b/third_party/zlib/os400/bndsrc deleted file mode 100644 index 9f92bb1..0000000 --- a/third_party/zlib/os400/bndsrc +++ /dev/null @@ -1,127 +0,0 @@ -STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.1.3 entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32") - EXPORT SYMBOL("compress") - EXPORT SYMBOL("compress2") - EXPORT SYMBOL("crc32") - EXPORT SYMBOL("get_crc_table") - EXPORT SYMBOL("deflate") - EXPORT SYMBOL("deflateEnd") - EXPORT SYMBOL("deflateSetDictionary") - EXPORT SYMBOL("deflateCopy") - EXPORT SYMBOL("deflateReset") - EXPORT SYMBOL("deflateParams") - EXPORT SYMBOL("deflatePrime") - EXPORT SYMBOL("deflateInit_") - EXPORT SYMBOL("deflateInit2_") - EXPORT SYMBOL("gzopen") - EXPORT SYMBOL("gzdopen") - EXPORT SYMBOL("gzsetparams") - EXPORT SYMBOL("gzread") - EXPORT SYMBOL("gzwrite") - EXPORT SYMBOL("gzprintf") - EXPORT SYMBOL("gzputs") - EXPORT SYMBOL("gzgets") - EXPORT SYMBOL("gzputc") - EXPORT SYMBOL("gzgetc") - EXPORT SYMBOL("gzflush") - EXPORT SYMBOL("gzseek") - EXPORT SYMBOL("gzrewind") - EXPORT SYMBOL("gztell") - EXPORT SYMBOL("gzeof") - EXPORT SYMBOL("gzclose") - EXPORT SYMBOL("gzerror") - EXPORT SYMBOL("inflate") - EXPORT SYMBOL("inflateEnd") - EXPORT SYMBOL("inflateSetDictionary") - EXPORT SYMBOL("inflateSync") - EXPORT SYMBOL("inflateReset") - EXPORT SYMBOL("inflateInit_") - EXPORT SYMBOL("inflateInit2_") - EXPORT SYMBOL("inflateSyncPoint") - EXPORT SYMBOL("uncompress") - EXPORT SYMBOL("zlibVersion") - EXPORT SYMBOL("zError") - EXPORT SYMBOL("z_errmsg") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.1 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("compressBound") - EXPORT SYMBOL("deflateBound") - EXPORT SYMBOL("deflatePending") - EXPORT SYMBOL("gzungetc") - EXPORT SYMBOL("gzclearerr") - EXPORT SYMBOL("inflateBack") - EXPORT SYMBOL("inflateBackEnd") - EXPORT SYMBOL("inflateBackInit_") - EXPORT SYMBOL("inflateCopy") - EXPORT SYMBOL("zlibCompileFlags") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.4 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32_combine") - EXPORT SYMBOL("adler32_combine64") - EXPORT SYMBOL("crc32_combine") - EXPORT SYMBOL("crc32_combine64") - EXPORT SYMBOL("deflateSetHeader") - EXPORT SYMBOL("deflateTune") - EXPORT SYMBOL("gzbuffer") - EXPORT SYMBOL("gzclose_r") - EXPORT SYMBOL("gzclose_w") - EXPORT SYMBOL("gzdirect") - EXPORT SYMBOL("gzoffset") - EXPORT SYMBOL("gzoffset64") - EXPORT SYMBOL("gzopen64") - EXPORT SYMBOL("gzseek64") - EXPORT SYMBOL("gztell64") - EXPORT SYMBOL("inflateGetHeader") - EXPORT SYMBOL("inflateMark") - EXPORT SYMBOL("inflatePrime") - EXPORT SYMBOL("inflateReset2") - EXPORT SYMBOL("inflateUndermine") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.6 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("deflateResetKeep") - EXPORT SYMBOL("gzgetc_") - EXPORT SYMBOL("inflateResetKeep") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.8 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("gzvprintf") - EXPORT SYMBOL("inflateGetDictionary") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.9 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("adler32_z") - EXPORT SYMBOL("crc32_z") - EXPORT SYMBOL("deflateGetDictionary") - EXPORT SYMBOL("gzfread") - EXPORT SYMBOL("gzfwrite") - EXPORT SYMBOL("inflateCodesUsed") - EXPORT SYMBOL("inflateValidate") - EXPORT SYMBOL("uncompress2") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.12 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - - EXPORT SYMBOL("crc32_combine_gen64") - EXPORT SYMBOL("crc32_combine_gen") - EXPORT SYMBOL("crc32_combine_op") - -ENDPGMEXP diff --git a/third_party/zlib/os400/make.sh b/third_party/zlib/os400/make.sh deleted file mode 100644 index 19eec11..0000000 --- a/third_party/zlib/os400/make.sh +++ /dev/null @@ -1,366 +0,0 @@ -#!/bin/sh -# -# ZLIB compilation script for the OS/400. -# -# -# This is a shell script since make is not a standard component of OS/400. - - -################################################################################ -# -# Tunable configuration parameters. -# -################################################################################ - -TARGETLIB='ZLIB' # Target OS/400 program library -STATBNDDIR='ZLIB_A' # Static binding directory. -DYNBNDDIR='ZLIB' # Dynamic binding directory. -SRVPGM="ZLIB" # Service program. -IFSDIR='/zlib' # IFS support base directory. -TGTCCSID='500' # Target CCSID of objects -DEBUG='*NONE' # Debug level -OPTIMIZE='40' # Optimisation level -OUTPUT='*NONE' # Compilation output option. -TGTRLS='V6R1M0' # Target OS release - -export TARGETLIB STATBNDDIR DYNBNDDIR SRVPGM IFSDIR -export TGTCCSID DEBUG OPTIMIZE OUTPUT TGTRLS - - -################################################################################ -# -# OS/400 specific definitions. -# -################################################################################ - -LIBIFSNAME="/QSYS.LIB/${TARGETLIB}.LIB" - - -################################################################################ -# -# Procedures. -# -################################################################################ - -# action_needed dest [src] -# -# dest is an object to build -# if specified, src is an object on which dest depends. -# -# exit 0 (succeeds) if some action has to be taken, else 1. - -action_needed() - -{ - [ ! -e "${1}" ] && return 0 - [ "${2}" ] || return 1 - [ "${1}" -ot "${2}" ] && return 0 - return 1 -} - - -# make_module module_name source_name [additional_definitions] -# -# Compile source name into module if needed. -# As side effect, append the module name to variable MODULES. -# Set LINK to "YES" if the module has been compiled. - -make_module() - -{ - MODULES="${MODULES} ${1}" - MODIFSNAME="${LIBIFSNAME}/${1}.MODULE" - CSRC="`basename \"${2}\"`" - - if action_needed "${MODIFSNAME}" "${2}" - then : - elif [ ! "`sed -e \"//,/<\\\\/source>/!d\" \ - -e '/ tmphdrfile - - # Need to translate to target CCSID. - - CMD="CPY OBJ('`pwd`/tmphdrfile') TOOBJ('${DEST}')" - CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" - system "${CMD}" - # touch -r "${HFILE}" "${DEST}" - rm -f tmphdrfile - fi - - IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" - - if action_needed "${IFSFILE}" "${DEST}" - then rm -f "${IFSFILE}" - ln -s "${DEST}" "${IFSFILE}" - fi -done - - -# Install the ILE/RPG header file. - - -HFILE="${SCRIPTDIR}/zlib.inc" -DEST="${SRCPF}/ZLIB.INC.MBR" - -if action_needed "${DEST}" "${HFILE}" -then CMD="CPY OBJ('${HFILE}') TOOBJ('${DEST}')" - CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)" - system "${CMD}" - # touch -r "${HFILE}" "${DEST}" -fi - -IFSFILE="${IFSDIR}/include/`basename \"${HFILE}\"`" - -if action_needed "${IFSFILE}" "${DEST}" -then rm -f "${IFSFILE}" - ln -s "${DEST}" "${IFSFILE}" -fi - - -# Create and compile the identification source file. - -echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c -echo '#pragma comment(user, __DATE__)' >> os400.c -echo '#pragma comment(user, __TIME__)' >> os400.c -echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c -make_module OS400 os400.c -LINK= # No need to rebuild service program yet. -MODULES= - - -# Get source list. - -CSOURCES=`sed -e '/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Library - - Medium - - 2.0 - - - - zlib - zlib - alain.bonnefoy@icbt.com - Public - public - www.gzip.org/zlib - - - Jean-Loup Gailly,Mark Adler - www.gzip.org/zlib - - zlib@gzip.org - - - A massively spiffy yet delicately unobtrusive compression library. - zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system. - http://www.gzip.org/zlib - - - - - 1.3.1 - Medium - Stable - - - - - - - No License - - - - Software Development/Libraries and Extensions/C Libraries - zlib,compression - qnx6 - qnx6 - None - Developer - - - - - - - - - - - - - - Install - Post - No - Ignore - - No - Optional - - - - - - - - - - - - - InstallOver - zlib - - - - - - - - - - - - - InstallOver - zlib-dev - - - - - - - - - diff --git a/third_party/zlib/test/example.c b/third_party/zlib/test/example.c deleted file mode 100644 index c3521dd..0000000 --- a/third_party/zlib/test/example.c +++ /dev/null @@ -1,546 +0,0 @@ -/* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2006, 2011, 2016 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include - -#ifdef STDC -# include -# include -#endif - -#if defined(VMS) || defined(RISCOS) -# define TESTFILE "foo-gz" -#else -# define TESTFILE "foo.gz" -#endif - -#define CHECK_ERR(err, msg) { \ - if (err != Z_OK) { \ - fprintf(stderr, "%s error: %d\n", msg, err); \ - exit(1); \ - } \ -} - -static z_const char hello[] = "hello, hello!"; -/* "hello world" would be more standard, but the repeated "hello" - * stresses the compression code better, sorry... - */ - -static const char dictionary[] = "hello"; -static uLong dictId; /* Adler32 value of the dictionary */ - -#ifdef Z_SOLO - -static void *myalloc(void *q, unsigned n, unsigned m) { - (void)q; - return calloc(n, m); -} - -static void myfree(void *q, void *p) { - (void)q; - free(p); -} - -static alloc_func zalloc = myalloc; -static free_func zfree = myfree; - -#else /* !Z_SOLO */ - -static alloc_func zalloc = (alloc_func)0; -static free_func zfree = (free_func)0; - -/* =========================================================================== - * Test compress() and uncompress() - */ -static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - int err; - uLong len = (uLong)strlen(hello)+1; - - err = compress(compr, &comprLen, (const Bytef*)hello, len); - CHECK_ERR(err, "compress"); - - strcpy((char*)uncompr, "garbage"); - - err = uncompress(uncompr, &uncomprLen, compr, comprLen); - CHECK_ERR(err, "uncompress"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad uncompress\n"); - exit(1); - } else { - printf("uncompress(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test read/write of .gz files - */ -static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { -#ifdef NO_GZCOMPRESS - fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); -#else - int err; - int len = (int)strlen(hello)+1; - gzFile file; - z_off_t pos; - - file = gzopen(fname, "wb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - gzputc(file, 'h'); - if (gzputs(file, "ello") != 4) { - fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); - exit(1); - } - if (gzprintf(file, ", %s!", "hello") != 8) { - fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); - exit(1); - } - gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ - gzclose(file); - - file = gzopen(fname, "rb"); - if (file == NULL) { - fprintf(stderr, "gzopen error\n"); - exit(1); - } - strcpy((char*)uncompr, "garbage"); - - if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { - fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); - exit(1); - } else { - printf("gzread(): %s\n", (char*)uncompr); - } - - pos = gzseek(file, -8L, SEEK_CUR); - if (pos != 6 || gztell(file) != pos) { - fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", - (long)pos, (long)gztell(file)); - exit(1); - } - - if (gzgetc(file) != ' ') { - fprintf(stderr, "gzgetc error\n"); - exit(1); - } - - if (gzungetc(' ', file) != ' ') { - fprintf(stderr, "gzungetc error\n"); - exit(1); - } - - gzgets(file, (char*)uncompr, (int)uncomprLen); - if (strlen((char*)uncompr) != 7) { /* " hello!" */ - fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); - exit(1); - } - if (strcmp((char*)uncompr, hello + 6)) { - fprintf(stderr, "bad gzgets after gzseek\n"); - exit(1); - } else { - printf("gzgets() after gzseek: %s\n", (char*)uncompr); - } - - gzclose(file); -#endif -} - -#endif /* Z_SOLO */ - -/* =========================================================================== - * Test deflate() with small buffers - */ -static void test_deflate(Byte *compr, uLong comprLen) { - z_stream c_stream; /* compression stream */ - int err; - uLong len = (uLong)strlen(hello)+1; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - - while (c_stream.total_in != len && c_stream.total_out < comprLen) { - c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - } - /* Finish the stream, still forcing small buffers: */ - for (;;) { - c_stream.avail_out = 1; - err = deflate(&c_stream, Z_FINISH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "deflate"); - } - - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with small buffers - */ -static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 0; - d_stream.next_out = uncompr; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { - d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate\n"); - exit(1); - } else { - printf("inflate(): %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Test deflate() with large buffers and dynamic change of compression level - */ -static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_SPEED); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - /* At this point, uncompr is still mostly zeroes, so it should compress - * very well: - */ - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - if (c_stream.avail_in != 0) { - fprintf(stderr, "deflate not greedy\n"); - exit(1); - } - - /* Feed in already compressed data and switch to no compression: */ - deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); - c_stream.next_in = compr; - c_stream.avail_in = (uInt)uncomprLen/2; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - /* Switch back to compressing mode: */ - deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); - c_stream.next_in = uncompr; - c_stream.avail_in = (uInt)uncomprLen; - err = deflate(&c_stream, Z_NO_FLUSH); - CHECK_ERR(err, "deflate"); - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with large buffers - */ -static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - for (;;) { - d_stream.next_out = uncompr; /* discard the output */ - d_stream.avail_out = (uInt)uncomprLen; - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - CHECK_ERR(err, "large inflate"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (d_stream.total_out != 2*uncomprLen + uncomprLen/2) { - fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); - exit(1); - } else { - printf("large_inflate(): OK\n"); - } -} - -/* =========================================================================== - * Test deflate() with full flush - */ -static void test_flush(Byte *compr, uLong *comprLen) { - z_stream c_stream; /* compression stream */ - int err; - uInt len = (uInt)strlen(hello)+1; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.next_out = compr; - c_stream.avail_in = 3; - c_stream.avail_out = (uInt)*comprLen; - err = deflate(&c_stream, Z_FULL_FLUSH); - CHECK_ERR(err, "deflate"); - - compr[3]++; /* force an error in first compressed block */ - c_stream.avail_in = len - 3; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - CHECK_ERR(err, "deflate"); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); - - *comprLen = c_stream.total_out; -} - -/* =========================================================================== - * Test inflateSync() - */ -static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = 2; /* just read the zlib header */ - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - err = inflate(&d_stream, Z_NO_FLUSH); - CHECK_ERR(err, "inflate"); - - d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ - err = inflateSync(&d_stream); /* but skip the damaged part */ - CHECK_ERR(err, "inflateSync"); - - err = inflate(&d_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "inflate should report Z_STREAM_END\n"); - exit(1); - } - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - printf("after inflateSync(): hel%s\n", (char *)uncompr); -} - -/* =========================================================================== - * Test deflate() with preset dictionary - */ -static void test_dict_deflate(Byte *compr, uLong comprLen) { - z_stream c_stream; /* compression stream */ - int err; - - c_stream.zalloc = zalloc; - c_stream.zfree = zfree; - c_stream.opaque = (voidpf)0; - - err = deflateInit(&c_stream, Z_BEST_COMPRESSION); - CHECK_ERR(err, "deflateInit"); - - err = deflateSetDictionary(&c_stream, - (const Bytef*)dictionary, (int)sizeof(dictionary)); - CHECK_ERR(err, "deflateSetDictionary"); - - dictId = c_stream.adler; - c_stream.next_out = compr; - c_stream.avail_out = (uInt)comprLen; - - c_stream.next_in = (z_const unsigned char *)hello; - c_stream.avail_in = (uInt)strlen(hello)+1; - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - fprintf(stderr, "deflate should report Z_STREAM_END\n"); - exit(1); - } - err = deflateEnd(&c_stream); - CHECK_ERR(err, "deflateEnd"); -} - -/* =========================================================================== - * Test inflate() with a preset dictionary - */ -static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, - uLong uncomprLen) { - int err; - z_stream d_stream; /* decompression stream */ - - strcpy((char*)uncompr, "garbage"); - - d_stream.zalloc = zalloc; - d_stream.zfree = zfree; - d_stream.opaque = (voidpf)0; - - d_stream.next_in = compr; - d_stream.avail_in = (uInt)comprLen; - - err = inflateInit(&d_stream); - CHECK_ERR(err, "inflateInit"); - - d_stream.next_out = uncompr; - d_stream.avail_out = (uInt)uncomprLen; - - for (;;) { - err = inflate(&d_stream, Z_NO_FLUSH); - if (err == Z_STREAM_END) break; - if (err == Z_NEED_DICT) { - if (d_stream.adler != dictId) { - fprintf(stderr, "unexpected dictionary"); - exit(1); - } - err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, - (int)sizeof(dictionary)); - } - CHECK_ERR(err, "inflate with dict"); - } - - err = inflateEnd(&d_stream); - CHECK_ERR(err, "inflateEnd"); - - if (strcmp((char*)uncompr, hello)) { - fprintf(stderr, "bad inflate with dict\n"); - exit(1); - } else { - printf("inflate with dictionary: %s\n", (char *)uncompr); - } -} - -/* =========================================================================== - * Usage: example [output.gz [input.gz]] - */ - -int main(int argc, char *argv[]) { - Byte *compr, *uncompr; - uLong uncomprLen = 20000; - uLong comprLen = 3 * uncomprLen; - static const char* myVersion = ZLIB_VERSION; - - if (zlibVersion()[0] != myVersion[0]) { - fprintf(stderr, "incompatible zlib version\n"); - exit(1); - - } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { - fprintf(stderr, "warning: different zlib version linked: %s\n", - zlibVersion()); - } - - printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", - ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); - - compr = (Byte*)calloc((uInt)comprLen, 1); - uncompr = (Byte*)calloc((uInt)uncomprLen, 1); - /* compr and uncompr are cleared to avoid reading uninitialized - * data and to ensure that uncompr compresses well. - */ - if (compr == Z_NULL || uncompr == Z_NULL) { - printf("out of memory\n"); - exit(1); - } - -#ifdef Z_SOLO - (void)argc; - (void)argv; -#else - test_compress(compr, comprLen, uncompr, uncomprLen); - - test_gzio((argc > 1 ? argv[1] : TESTFILE), - uncompr, uncomprLen); -#endif - - test_deflate(compr, comprLen); - test_inflate(compr, comprLen, uncompr, uncomprLen); - - test_large_deflate(compr, comprLen, uncompr, uncomprLen); - test_large_inflate(compr, comprLen, uncompr, uncomprLen); - - test_flush(compr, &comprLen); - test_sync(compr, comprLen, uncompr, uncomprLen); - comprLen = 3 * uncomprLen; - - test_dict_deflate(compr, comprLen); - test_dict_inflate(compr, comprLen, uncompr, uncomprLen); - - free(compr); - free(uncompr); - - return 0; -} diff --git a/third_party/zlib/test/infcover.c b/third_party/zlib/test/infcover.c deleted file mode 100644 index 8912c40..0000000 --- a/third_party/zlib/test/infcover.c +++ /dev/null @@ -1,672 +0,0 @@ -/* infcover.c -- test zlib's inflate routines with full code coverage - * Copyright (C) 2011, 2016 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* to use, do: ./configure --cover && make cover */ - -#include -#include -#include -#include -#include "zlib.h" - -/* get definition of internal structure so we can mess with it (see pull()), - and so we can call inflate_trees() (see cover5()) */ -#define ZLIB_INTERNAL -#include "inftrees.h" -#include "inflate.h" - -#define local static - -/* -- memory tracking routines -- */ - -/* - These memory tracking routines are provided to zlib and track all of zlib's - allocations and deallocations, check for LIFO operations, keep a current - and high water mark of total bytes requested, optionally set a limit on the - total memory that can be allocated, and when done check for memory leaks. - - They are used as follows: - - z_stream strm; - mem_setup(&strm) initializes the memory tracking and sets the - zalloc, zfree, and opaque members of strm to use - memory tracking for all zlib operations on strm - mem_limit(&strm, limit) sets a limit on the total bytes requested -- a - request that exceeds this limit will result in an - allocation failure (returns NULL) -- setting the - limit to zero means no limit, which is the default - after mem_setup() - mem_used(&strm, "msg") prints to stderr "msg" and the total bytes used - mem_high(&strm, "msg") prints to stderr "msg" and the high water mark - mem_done(&strm, "msg") ends memory tracking, releases all allocations - for the tracking as well as leaked zlib blocks, if - any. If there was anything unusual, such as leaked - blocks, non-FIFO frees, or frees of addresses not - allocated, then "msg" and information about the - problem is printed to stderr. If everything is - normal, nothing is printed. mem_done resets the - strm members to Z_NULL to use the default memory - allocation routines on the next zlib initialization - using strm. - */ - -/* these items are strung together in a linked list, one for each allocation */ -struct mem_item { - void *ptr; /* pointer to allocated memory */ - size_t size; /* requested size of allocation */ - struct mem_item *next; /* pointer to next item in list, or NULL */ -}; - -/* this structure is at the root of the linked list, and tracks statistics */ -struct mem_zone { - struct mem_item *first; /* pointer to first item in list, or NULL */ - size_t total, highwater; /* total allocations, and largest total */ - size_t limit; /* memory allocation limit, or 0 if no limit */ - int notlifo, rogue; /* counts of non-LIFO frees and rogue frees */ -}; - -/* memory allocation routine to pass to zlib */ -local void *mem_alloc(void *mem, unsigned count, unsigned size) -{ - void *ptr; - struct mem_item *item; - struct mem_zone *zone = mem; - size_t len = count * (size_t)size; - - /* induced allocation failure */ - if (zone == NULL || (zone->limit && zone->total + len > zone->limit)) - return NULL; - - /* perform allocation using the standard library, fill memory with a - non-zero value to make sure that the code isn't depending on zeros */ - ptr = malloc(len); - if (ptr == NULL) - return NULL; - memset(ptr, 0xa5, len); - - /* create a new item for the list */ - item = malloc(sizeof(struct mem_item)); - if (item == NULL) { - free(ptr); - return NULL; - } - item->ptr = ptr; - item->size = len; - - /* insert item at the beginning of the list */ - item->next = zone->first; - zone->first = item; - - /* update the statistics */ - zone->total += item->size; - if (zone->total > zone->highwater) - zone->highwater = zone->total; - - /* return the allocated memory */ - return ptr; -} - -/* memory free routine to pass to zlib */ -local void mem_free(void *mem, void *ptr) -{ - struct mem_item *item, *next; - struct mem_zone *zone = mem; - - /* if no zone, just do a free */ - if (zone == NULL) { - free(ptr); - return; - } - - /* point next to the item that matches ptr, or NULL if not found -- remove - the item from the linked list if found */ - next = zone->first; - if (next) { - if (next->ptr == ptr) - zone->first = next->next; /* first one is it, remove from list */ - else { - do { /* search the linked list */ - item = next; - next = item->next; - } while (next != NULL && next->ptr != ptr); - if (next) { /* if found, remove from linked list */ - item->next = next->next; - zone->notlifo++; /* not a LIFO free */ - } - - } - } - - /* if found, update the statistics and free the item */ - if (next) { - zone->total -= next->size; - free(next); - } - - /* if not found, update the rogue count */ - else - zone->rogue++; - - /* in any case, do the requested free with the standard library function */ - free(ptr); -} - -/* set up a controlled memory allocation space for monitoring, set the stream - parameters to the controlled routines, with opaque pointing to the space */ -local void mem_setup(z_stream *strm) -{ - struct mem_zone *zone; - - zone = malloc(sizeof(struct mem_zone)); - assert(zone != NULL); - zone->first = NULL; - zone->total = 0; - zone->highwater = 0; - zone->limit = 0; - zone->notlifo = 0; - zone->rogue = 0; - strm->opaque = zone; - strm->zalloc = mem_alloc; - strm->zfree = mem_free; -} - -/* set a limit on the total memory allocation, or 0 to remove the limit */ -local void mem_limit(z_stream *strm, size_t limit) -{ - struct mem_zone *zone = strm->opaque; - - zone->limit = limit; -} - -/* show the current total requested allocations in bytes */ -local void mem_used(z_stream *strm, char *prefix) -{ - struct mem_zone *zone = strm->opaque; - - fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total); -} - -/* show the high water allocation in bytes */ -local void mem_high(z_stream *strm, char *prefix) -{ - struct mem_zone *zone = strm->opaque; - - fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater); -} - -/* release the memory allocation zone -- if there are any surprises, notify */ -local void mem_done(z_stream *strm, char *prefix) -{ - int count = 0; - struct mem_item *item, *next; - struct mem_zone *zone = strm->opaque; - - /* show high water mark */ - mem_high(strm, prefix); - - /* free leftover allocations and item structures, if any */ - item = zone->first; - while (item != NULL) { - free(item->ptr); - next = item->next; - free(item); - item = next; - count++; - } - - /* issue alerts about anything unexpected */ - if (count || zone->total) - fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n", - prefix, zone->total, count); - if (zone->notlifo) - fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo); - if (zone->rogue) - fprintf(stderr, "** %s: %d frees not recognized\n", - prefix, zone->rogue); - - /* free the zone and delete from the stream */ - free(zone); - strm->opaque = Z_NULL; - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; -} - -/* -- inflate test routines -- */ - -/* Decode a hexadecimal string, set *len to length, in[] to the bytes. This - decodes liberally, in that hex digits can be adjacent, in which case two in - a row writes a byte. Or they can be delimited by any non-hex character, - where the delimiters are ignored except when a single hex digit is followed - by a delimiter, where that single digit writes a byte. The returned data is - allocated and must eventually be freed. NULL is returned if out of memory. - If the length is not needed, then len can be NULL. */ -local unsigned char *h2b(const char *hex, unsigned *len) -{ - unsigned char *in, *re; - unsigned next, val; - - in = malloc((strlen(hex) + 1) >> 1); - if (in == NULL) - return NULL; - next = 0; - val = 1; - do { - if (*hex >= '0' && *hex <= '9') - val = (val << 4) + *hex - '0'; - else if (*hex >= 'A' && *hex <= 'F') - val = (val << 4) + *hex - 'A' + 10; - else if (*hex >= 'a' && *hex <= 'f') - val = (val << 4) + *hex - 'a' + 10; - else if (val != 1 && val < 32) /* one digit followed by delimiter */ - val += 240; /* make it look like two digits */ - if (val > 255) { /* have two digits */ - in[next++] = val & 0xff; /* save the decoded byte */ - val = 1; /* start over */ - } - } while (*hex++); /* go through the loop with the terminating null */ - if (len != NULL) - *len = next; - re = realloc(in, next); - return re == NULL ? in : re; -} - -/* generic inflate() run, where hex is the hexadecimal input data, what is the - text to include in an error message, step is how much input data to feed - inflate() on each call, or zero to feed it all, win is the window bits - parameter to inflateInit2(), len is the size of the output buffer, and err - is the error code expected from the first inflate() call (the second - inflate() call is expected to return Z_STREAM_END). If win is 47, then - header information is collected with inflateGetHeader(). If a zlib stream - is looking for a dictionary, then an empty dictionary is provided. - inflate() is run until all of the input data is consumed. */ -local void inf(char *hex, char *what, unsigned step, int win, unsigned len, - int err) -{ - int ret; - unsigned have; - unsigned char *in, *out; - z_stream strm, copy; - gz_header head; - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, win); - if (ret != Z_OK) { - mem_done(&strm, what); - return; - } - out = malloc(len); assert(out != NULL); - if (win == 47) { - head.extra = out; - head.extra_max = len; - head.name = out; - head.name_max = len; - head.comment = out; - head.comm_max = len; - ret = inflateGetHeader(&strm, &head); assert(ret == Z_OK); - } - in = h2b(hex, &have); assert(in != NULL); - if (step == 0 || step > have) - step = have; - strm.avail_in = step; - have -= step; - strm.next_in = in; - do { - strm.avail_out = len; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); assert(err == 9 || ret == err); - if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_NEED_DICT) - break; - if (ret == Z_NEED_DICT) { - ret = inflateSetDictionary(&strm, in, 1); - assert(ret == Z_DATA_ERROR); - mem_limit(&strm, 1); - ret = inflateSetDictionary(&strm, out, 0); - assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - ((struct inflate_state *)strm.state)->mode = DICT; - ret = inflateSetDictionary(&strm, out, 0); - assert(ret == Z_OK); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_BUF_ERROR); - } - ret = inflateCopy(©, &strm); assert(ret == Z_OK); - ret = inflateEnd(©); assert(ret == Z_OK); - err = 9; /* don't care next time around */ - have += strm.avail_in; - strm.avail_in = step > have ? have : step; - have -= strm.avail_in; - } while (strm.avail_in); - free(in); - free(out); - ret = inflateReset2(&strm, -8); assert(ret == Z_OK); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, what); -} - -/* cover all of the lines in inflate.c up to inflate() */ -local void cover_support(void) -{ - int ret; - z_stream strm; - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); assert(ret == Z_OK); - mem_used(&strm, "inflate init"); - ret = inflatePrime(&strm, 5, 31); assert(ret == Z_OK); - ret = inflatePrime(&strm, -1, 0); assert(ret == Z_OK); - ret = inflateSetDictionary(&strm, Z_NULL, 0); - assert(ret == Z_STREAM_ERROR); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "prime"); - - inf("63 0", "force window allocation", 0, -15, 1, Z_OK); - inf("63 18 5", "force window replacement", 0, -8, 259, Z_OK); - inf("63 18 68 30 d0 0 0", "force split window update", 4, -8, 259, Z_OK); - inf("3 0", "use fixed blocks", 0, -15, 1, Z_STREAM_END); - inf("", "bad window size", 0, 1, 0, Z_STREAM_ERROR); - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit_(&strm, "!", (int)sizeof(z_stream)); - assert(ret == Z_VERSION_ERROR); - mem_done(&strm, "wrong version"); - - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); assert(ret == Z_OK); - ret = inflateEnd(&strm); assert(ret == Z_OK); - fputs("inflate built-in memory routines\n", stderr); -} - -/* cover all inflate() header and trailer cases and code after inflate() */ -local void cover_wrap(void) -{ - int ret; - z_stream strm, copy; - unsigned char dict[257]; - - ret = inflate(Z_NULL, 0); assert(ret == Z_STREAM_ERROR); - ret = inflateEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); - ret = inflateCopy(Z_NULL, Z_NULL); assert(ret == Z_STREAM_ERROR); - fputs("inflate bad parameters\n", stderr); - - inf("1f 8b 0 0", "bad gzip method", 0, 31, 0, Z_DATA_ERROR); - inf("1f 8b 8 80", "bad gzip flags", 0, 31, 0, Z_DATA_ERROR); - inf("77 85", "bad zlib method", 0, 15, 0, Z_DATA_ERROR); - inf("8 99", "set window size from header", 0, 0, 0, Z_OK); - inf("78 9c", "bad zlib window size", 0, 8, 0, Z_DATA_ERROR); - inf("78 9c 63 0 0 0 1 0 1", "check adler32", 0, 15, 1, Z_STREAM_END); - inf("1f 8b 8 1e 0 0 0 0 0 0 1 0 0 0 0 0 0", "bad header crc", 0, 47, 1, - Z_DATA_ERROR); - inf("1f 8b 8 2 0 0 0 0 0 0 1d 26 3 0 0 0 0 0 0 0 0 0", "check gzip length", - 0, 47, 0, Z_STREAM_END); - inf("78 90", "bad zlib header check", 0, 47, 0, Z_DATA_ERROR); - inf("8 b8 0 0 0 1", "need dictionary", 0, 8, 0, Z_NEED_DICT); - inf("78 9c 63 0", "compute adler32", 0, 15, 1, Z_OK); - - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -8); - strm.avail_in = 2; - strm.next_in = (void *)"\x63"; - strm.avail_out = 1; - strm.next_out = (void *)&ret; - mem_limit(&strm, 1); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - memset(dict, 0, 257); - ret = inflateSetDictionary(&strm, dict, 257); - assert(ret == Z_OK); - mem_limit(&strm, (sizeof(struct inflate_state) << 1) + 256); - ret = inflatePrime(&strm, 16, 0); assert(ret == Z_OK); - strm.avail_in = 2; - strm.next_in = (void *)"\x80"; - ret = inflateSync(&strm); assert(ret == Z_DATA_ERROR); - ret = inflate(&strm, Z_NO_FLUSH); assert(ret == Z_STREAM_ERROR); - strm.avail_in = 4; - strm.next_in = (void *)"\0\0\xff\xff"; - ret = inflateSync(&strm); assert(ret == Z_OK); - (void)inflateSyncPoint(&strm); - ret = inflateCopy(©, &strm); assert(ret == Z_MEM_ERROR); - mem_limit(&strm, 0); - ret = inflateUndermine(&strm, 1); assert(ret == Z_DATA_ERROR); - (void)inflateMark(&strm); - ret = inflateEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "miscellaneous, force memory errors"); -} - -/* input and output functions for inflateBack() */ -local unsigned pull(void *desc, unsigned char **buf) -{ - static unsigned int next = 0; - static unsigned char dat[] = {0x63, 0, 2, 0}; - struct inflate_state *state; - - if (desc == Z_NULL) { - next = 0; - return 0; /* no input (already provided at next_in) */ - } - state = (void *)((z_stream *)desc)->state; - if (state != Z_NULL) - state->mode = SYNC; /* force an otherwise impossible situation */ - return next < sizeof(dat) ? (*buf = dat + next++, 1) : 0; -} - -local int push(void *desc, unsigned char *buf, unsigned len) -{ - (void)buf; - (void)len; - return desc != Z_NULL; /* force error if desc not null */ -} - -/* cover inflateBack() up to common deflate data cases and after those */ -local void cover_back(void) -{ - int ret; - z_stream strm; - unsigned char win[32768]; - - ret = inflateBackInit_(Z_NULL, 0, win, 0, 0); - assert(ret == Z_VERSION_ERROR); - ret = inflateBackInit(Z_NULL, 0, win); assert(ret == Z_STREAM_ERROR); - ret = inflateBack(Z_NULL, Z_NULL, Z_NULL, Z_NULL, Z_NULL); - assert(ret == Z_STREAM_ERROR); - ret = inflateBackEnd(Z_NULL); assert(ret == Z_STREAM_ERROR); - fputs("inflateBack bad parameters\n", stderr); - - mem_setup(&strm); - ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); - strm.avail_in = 2; - strm.next_in = (void *)"\x03"; - ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); - assert(ret == Z_STREAM_END); - /* force output error */ - strm.avail_in = 3; - strm.next_in = (void *)"\x63\x00"; - ret = inflateBack(&strm, pull, Z_NULL, push, &strm); - assert(ret == Z_BUF_ERROR); - /* force mode error by mucking with state */ - ret = inflateBack(&strm, pull, &strm, push, Z_NULL); - assert(ret == Z_STREAM_ERROR); - ret = inflateBackEnd(&strm); assert(ret == Z_OK); - mem_done(&strm, "inflateBack bad state"); - - ret = inflateBackInit(&strm, 15, win); assert(ret == Z_OK); - ret = inflateBackEnd(&strm); assert(ret == Z_OK); - fputs("inflateBack built-in memory routines\n", stderr); -} - -/* do a raw inflate of data in hexadecimal with both inflate and inflateBack */ -local int try(char *hex, char *id, int err) -{ - int ret; - unsigned len, size; - unsigned char *in, *out, *win; - char *prefix; - z_stream strm; - - /* convert to hex */ - in = h2b(hex, &len); - assert(in != NULL); - - /* allocate work areas */ - size = len << 3; - out = malloc(size); - assert(out != NULL); - win = malloc(32768); - assert(win != NULL); - prefix = malloc(strlen(id) + 6); - assert(prefix != NULL); - - /* first with inflate */ - strcpy(prefix, id); - strcat(prefix, "-late"); - mem_setup(&strm); - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, err < 0 ? 47 : -15); - assert(ret == Z_OK); - strm.avail_in = len; - strm.next_in = in; - do { - strm.avail_out = size; - strm.next_out = out; - ret = inflate(&strm, Z_TREES); - assert(ret != Z_STREAM_ERROR && ret != Z_MEM_ERROR); - if (ret == Z_DATA_ERROR || ret == Z_NEED_DICT) - break; - } while (strm.avail_in || strm.avail_out == 0); - if (err) { - assert(ret == Z_DATA_ERROR); - assert(strcmp(id, strm.msg) == 0); - } - inflateEnd(&strm); - mem_done(&strm, prefix); - - /* then with inflateBack */ - if (err >= 0) { - strcpy(prefix, id); - strcat(prefix, "-back"); - mem_setup(&strm); - ret = inflateBackInit(&strm, 15, win); - assert(ret == Z_OK); - strm.avail_in = len; - strm.next_in = in; - ret = inflateBack(&strm, pull, Z_NULL, push, Z_NULL); - assert(ret != Z_STREAM_ERROR); - if (err) { - assert(ret == Z_DATA_ERROR); - assert(strcmp(id, strm.msg) == 0); - } - inflateBackEnd(&strm); - mem_done(&strm, prefix); - } - - /* clean up */ - free(prefix); - free(win); - free(out); - free(in); - return ret; -} - -/* cover deflate data cases in both inflate() and inflateBack() */ -local void cover_inflate(void) -{ - try("0 0 0 0 0", "invalid stored block lengths", 1); - try("3 0", "fixed", 0); - try("6", "invalid block type", 1); - try("1 1 0 fe ff 0", "stored", 0); - try("fc 0 0", "too many length or distance symbols", 1); - try("4 0 fe ff", "invalid code lengths set", 1); - try("4 0 24 49 0", "invalid bit length repeat", 1); - try("4 0 24 e9 ff ff", "invalid bit length repeat", 1); - try("4 0 24 e9 ff 6d", "invalid code -- missing end-of-block", 1); - try("4 80 49 92 24 49 92 24 71 ff ff 93 11 0", - "invalid literal/lengths set", 1); - try("4 80 49 92 24 49 92 24 f b4 ff ff c3 84", "invalid distances set", 1); - try("4 c0 81 8 0 0 0 0 20 7f eb b 0 0", "invalid literal/length code", 1); - try("2 7e ff ff", "invalid distance code", 1); - try("c c0 81 0 0 0 0 0 90 ff 6b 4 0", "invalid distance too far back", 1); - - /* also trailer mismatch just in inflate() */ - try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 1", "incorrect data check", -1); - try("1f 8b 8 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 1", - "incorrect length check", -1); - try("5 c0 21 d 0 0 0 80 b0 fe 6d 2f 91 6c", "pull 17", 0); - try("5 e0 81 91 24 cb b2 2c 49 e2 f 2e 8b 9a 47 56 9f fb fe ec d2 ff 1f", - "long code", 0); - try("ed c0 1 1 0 0 0 40 20 ff 57 1b 42 2c 4f", "length extra", 0); - try("ed cf c1 b1 2c 47 10 c4 30 fa 6f 35 1d 1 82 59 3d fb be 2e 2a fc f c", - "long distance and extra", 0); - try("ed c0 81 0 0 0 0 80 a0 fd a9 17 a9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6", "window end", 0); - inf("2 8 20 80 0 3 0", "inflate_fast TYPE return", 0, -15, 258, - Z_STREAM_END); - inf("63 18 5 40 c 0", "window wrap", 3, -8, 300, Z_OK); -} - -/* cover remaining lines in inftrees.c */ -local void cover_trees(void) -{ - int ret; - unsigned bits; - unsigned short lens[16], work[16]; - code *next, table[ENOUGH_DISTS]; - - /* we need to call inflate_table() directly in order to manifest not- - enough errors, since zlib insures that enough is always enough */ - for (bits = 0; bits < 15; bits++) - lens[bits] = (unsigned short)(bits + 1); - lens[15] = 15; - next = table; - bits = 15; - ret = inflate_table(DISTS, lens, 16, &next, &bits, work); - assert(ret == 1); - next = table; - bits = 1; - ret = inflate_table(DISTS, lens, 16, &next, &bits, work); - assert(ret == 1); - fputs("inflate_table not enough errors\n", stderr); -} - -/* cover remaining inffast.c decoding and window copying */ -local void cover_fast(void) -{ - inf("e5 e0 81 ad 6d cb b2 2c c9 01 1e 59 63 ae 7d ee fb 4d fd b5 35 41 68" - " ff 7f 0f 0 0 0", "fast length extra bits", 0, -8, 258, Z_DATA_ERROR); - inf("25 fd 81 b5 6d 59 b6 6a 49 ea af 35 6 34 eb 8c b9 f6 b9 1e ef 67 49" - " 50 fe ff ff 3f 0 0", "fast distance extra bits", 0, -8, 258, - Z_DATA_ERROR); - inf("3 7e 0 0 0 0 0", "fast invalid distance code", 0, -8, 258, - Z_DATA_ERROR); - inf("1b 7 0 0 0 0 0", "fast invalid literal/length code", 0, -8, 258, - Z_DATA_ERROR); - inf("d c7 1 ae eb 38 c 4 41 a0 87 72 de df fb 1f b8 36 b1 38 5d ff ff 0", - "fast 2nd level codes and too far back", 0, -8, 258, Z_DATA_ERROR); - inf("63 18 5 8c 10 8 0 0 0 0", "very common case", 0, -8, 259, Z_OK); - inf("63 60 60 18 c9 0 8 18 18 18 26 c0 28 0 29 0 0 0", - "contiguous and wrap around window", 6, -8, 259, Z_OK); - inf("63 0 3 0 0 0 0 0", "copy direct from output", 0, -8, 259, - Z_STREAM_END); -} - -int main(void) -{ - fprintf(stderr, "%s\n", zlibVersion()); - cover_support(); - cover_wrap(); - cover_back(); - cover_inflate(); - cover_trees(); - cover_fast(); - return 0; -} diff --git a/third_party/zlib/test/minigzip.c b/third_party/zlib/test/minigzip.c deleted file mode 100644 index 134e10e..0000000 --- a/third_party/zlib/test/minigzip.c +++ /dev/null @@ -1,579 +0,0 @@ -/* minigzip.c -- simulate gzip using the zlib compression library - * Copyright (C) 1995-2006, 2010, 2011, 2016 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * minigzip is a minimal implementation of the gzip utility. This is - * only an example of using zlib and isn't meant to replace the - * full-featured gzip. No attempt is made to deal with file systems - * limiting names to 14 or 8+3 characters, etc... Error checking is - * very limited. So use minigzip only for testing; use gzip for the - * real thing. On MSDOS, use only on file names without extension - * or in pipe mode. - */ - -/* @(#) $Id$ */ - -#include "zlib.h" -#include - -#ifdef STDC -# include -# include -#endif - -#ifdef USE_MMAP -# include -# include -# include -#endif - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) -# include -# include -# ifdef UNDER_CE -# include -# endif -# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) -#else -# define SET_BINARY_MODE(file) -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1900 -# define snprintf _snprintf -#endif - -#ifdef VMS -# define unlink delete -# define GZ_SUFFIX "-gz" -#endif -#ifdef RISCOS -# define unlink remove -# define GZ_SUFFIX "-gz" -# define fileno(file) file->__file -#endif -#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fileno */ -#endif - -#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) -#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ - extern int unlink(const char *); -#endif -#endif - -#if defined(UNDER_CE) -# include -# define perror(s) pwinerror(s) - -/* Map the Windows error number in ERROR to a locale-dependent error - message string and return a pointer to it. Typically, the values - for ERROR come from GetLastError. - - The string pointed to shall not be modified by the application, - but may be overwritten by a subsequent call to strwinerror - - The strwinerror function does not change the current setting - of GetLastError. */ - -static char *strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -static void pwinerror (s) - const char *s; -{ - if (s && *s) - fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ())); - else - fprintf(stderr, "%s\n", strwinerror(GetLastError ())); -} - -#endif /* UNDER_CE */ - -#ifndef GZ_SUFFIX -# define GZ_SUFFIX ".gz" -#endif -#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) - -#define BUFLEN 16384 -#define MAX_NAME_LEN 1024 - -#ifdef MAXSEG_64K -# define local static - /* Needed for systems with limitation on stack size. */ -#else -# define local -#endif - -#ifdef Z_SOLO -/* for Z_SOLO, create simplified gz* functions using deflate and inflate */ - -#if defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE) -# include /* for unlink() */ -#endif - -static void *myalloc(void *q, unsigned n, unsigned m) { - (void)q; - return calloc(n, m); -} - -static void myfree(void *q, void *p) { - (void)q; - free(p); -} - -typedef struct gzFile_s { - FILE *file; - int write; - int err; - char *msg; - z_stream strm; -} *gzFile; - -static gzFile gz_open(const char *path, int fd, const char *mode) { - gzFile gz; - int ret; - - gz = malloc(sizeof(struct gzFile_s)); - if (gz == NULL) - return NULL; - gz->write = strchr(mode, 'w') != NULL; - gz->strm.zalloc = myalloc; - gz->strm.zfree = myfree; - gz->strm.opaque = Z_NULL; - if (gz->write) - ret = deflateInit2(&(gz->strm), -1, 8, 15 + 16, 8, 0); - else { - gz->strm.next_in = 0; - gz->strm.avail_in = Z_NULL; - ret = inflateInit2(&(gz->strm), 15 + 16); - } - if (ret != Z_OK) { - free(gz); - return NULL; - } - gz->file = path == NULL ? fdopen(fd, gz->write ? "wb" : "rb") : - fopen(path, gz->write ? "wb" : "rb"); - if (gz->file == NULL) { - gz->write ? deflateEnd(&(gz->strm)) : inflateEnd(&(gz->strm)); - free(gz); - return NULL; - } - gz->err = 0; - gz->msg = ""; - return gz; -} - -static gzFile gzopen(const char *path, const char *mode) { - return gz_open(path, -1, mode); -} - -static gzFile gzdopen(int fd, const char *mode) { - return gz_open(NULL, fd, mode); -} - -static int gzwrite(gzFile gz, const void *buf, unsigned len) { - z_stream *strm; - unsigned char out[BUFLEN]; - - if (gz == NULL || !gz->write) - return 0; - strm = &(gz->strm); - strm->next_in = (void *)buf; - strm->avail_in = len; - do { - strm->next_out = out; - strm->avail_out = BUFLEN; - (void)deflate(strm, Z_NO_FLUSH); - fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); - } while (strm->avail_out == 0); - return len; -} - -static int gzread(gzFile gz, void *buf, unsigned len) { - int ret; - unsigned got; - unsigned char in[1]; - z_stream *strm; - - if (gz == NULL || gz->write) - return 0; - if (gz->err) - return 0; - strm = &(gz->strm); - strm->next_out = (void *)buf; - strm->avail_out = len; - do { - got = fread(in, 1, 1, gz->file); - if (got == 0) - break; - strm->next_in = in; - strm->avail_in = 1; - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_DATA_ERROR) { - gz->err = Z_DATA_ERROR; - gz->msg = strm->msg; - return 0; - } - if (ret == Z_STREAM_END) - inflateReset(strm); - } while (strm->avail_out); - return len - strm->avail_out; -} - -static int gzclose(gzFile gz) { - z_stream *strm; - unsigned char out[BUFLEN]; - - if (gz == NULL) - return Z_STREAM_ERROR; - strm = &(gz->strm); - if (gz->write) { - strm->next_in = Z_NULL; - strm->avail_in = 0; - do { - strm->next_out = out; - strm->avail_out = BUFLEN; - (void)deflate(strm, Z_FINISH); - fwrite(out, 1, BUFLEN - strm->avail_out, gz->file); - } while (strm->avail_out == 0); - deflateEnd(strm); - } - else - inflateEnd(strm); - fclose(gz->file); - free(gz); - return Z_OK; -} - -static const char *gzerror(gzFile gz, int *err) { - *err = gz->err; - return gz->msg; -} - -#endif - -static char *prog; - -/* =========================================================================== - * Display error message and exit - */ -static void error(const char *msg) { - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - -#ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ - -/* Try compressing the input file at once using mmap. Return Z_OK if - * success, Z_ERRNO otherwise. - */ -static int gz_compress_mmap(FILE *in, gzFile out) { - int len; - int err; - int ifd = fileno(in); - caddr_t buf; /* mmap'ed buffer for the entire input file */ - off_t buf_len; /* length of the input file */ - struct stat sb; - - /* Determine the size of the file, needed for mmap: */ - if (fstat(ifd, &sb) < 0) return Z_ERRNO; - buf_len = sb.st_size; - if (buf_len <= 0) return Z_ERRNO; - - /* Now do the actual mmap: */ - buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); - if (buf == (caddr_t)(-1)) return Z_ERRNO; - - /* Compress the whole file at once: */ - len = gzwrite(out, (char *)buf, (unsigned)buf_len); - - if (len != (int)buf_len) error(gzerror(out, &err)); - - munmap(buf, buf_len); - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); - return Z_OK; -} -#endif /* USE_MMAP */ - -/* =========================================================================== - * Compress input to output then close both files. - */ - -static void gz_compress(FILE *in, gzFile out) { - local char buf[BUFLEN]; - int len; - int err; - -#ifdef USE_MMAP - /* Try first compressing with mmap. If mmap fails (minigzip used in a - * pipe), use the normal fread loop. - */ - if (gz_compress_mmap(in, out) == Z_OK) return; -#endif - for (;;) { - len = (int)fread(buf, 1, sizeof(buf), in); - if (ferror(in)) { - perror("fread"); - exit(1); - } - if (len == 0) break; - - if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); - } - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); -} - -/* =========================================================================== - * Uncompress input to output then close both files. - */ -static void gz_uncompress(gzFile in, FILE *out) { - local char buf[BUFLEN]; - int len; - int err; - - for (;;) { - len = gzread(in, buf, sizeof(buf)); - if (len < 0) error (gzerror(in, &err)); - if (len == 0) break; - - if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { - error("failed fwrite"); - } - } - if (fclose(out)) error("failed fclose"); - - if (gzclose(in) != Z_OK) error("failed gzclose"); -} - - -/* =========================================================================== - * Compress the given file: create a corresponding .gz file and remove the - * original. - */ -static void file_compress(char *file, char *mode) { - local char outfile[MAX_NAME_LEN]; - FILE *in; - gzFile out; - - if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(outfile, sizeof(outfile), "%s%s", file, GZ_SUFFIX); -#else - strcpy(outfile, file); - strcat(outfile, GZ_SUFFIX); -#endif - - in = fopen(file, "rb"); - if (in == NULL) { - perror(file); - exit(1); - } - out = gzopen(outfile, mode); - if (out == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); - exit(1); - } - gz_compress(in, out); - - unlink(file); -} - - -/* =========================================================================== - * Uncompress the given file and remove the original. - */ -static void file_uncompress(char *file) { - local char buf[MAX_NAME_LEN]; - char *infile, *outfile; - FILE *out; - gzFile in; - z_size_t len = strlen(file); - - if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { - fprintf(stderr, "%s: filename too long\n", prog); - exit(1); - } - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(buf, sizeof(buf), "%s", file); -#else - strcpy(buf, file); -#endif - - if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { - infile = file; - outfile = buf; - outfile[len-3] = '\0'; - } else { - outfile = file; - infile = buf; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(buf + len, sizeof(buf) - len, "%s", GZ_SUFFIX); -#else - strcat(infile, GZ_SUFFIX); -#endif - } - in = gzopen(infile, "rb"); - if (in == NULL) { - fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); - exit(1); - } - out = fopen(outfile, "wb"); - if (out == NULL) { - perror(file); - exit(1); - } - - gz_uncompress(in, out); - - unlink(infile); -} - - -/* =========================================================================== - * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] - * -c : write to standard output - * -d : decompress - * -f : compress with Z_FILTERED - * -h : compress with Z_HUFFMAN_ONLY - * -r : compress with Z_RLE - * -1 to -9 : compression level - */ - -int main(int argc, char *argv[]) { - int copyout = 0; - int uncompr = 0; - gzFile file; - char *bname, outmode[20]; - -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(outmode, sizeof(outmode), "%s", "wb6 "); -#else - strcpy(outmode, "wb6 "); -#endif - - prog = argv[0]; - bname = strrchr(argv[0], '/'); - if (bname) - bname++; - else - bname = argv[0]; - argc--, argv++; - - if (!strcmp(bname, "gunzip")) - uncompr = 1; - else if (!strcmp(bname, "zcat")) - copyout = uncompr = 1; - - while (argc > 0) { - if (strcmp(*argv, "-c") == 0) - copyout = 1; - else if (strcmp(*argv, "-d") == 0) - uncompr = 1; - else if (strcmp(*argv, "-f") == 0) - outmode[3] = 'f'; - else if (strcmp(*argv, "-h") == 0) - outmode[3] = 'h'; - else if (strcmp(*argv, "-r") == 0) - outmode[3] = 'R'; - else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && - (*argv)[2] == 0) - outmode[2] = (*argv)[1]; - else - break; - argc--, argv++; - } - if (outmode[3] == ' ') - outmode[3] = 0; - if (argc == 0) { - SET_BINARY_MODE(stdin); - SET_BINARY_MODE(stdout); - if (uncompr) { - file = gzdopen(fileno(stdin), "rb"); - if (file == NULL) error("can't gzdopen stdin"); - gz_uncompress(file, stdout); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - gz_compress(stdin, file); - } - } else { - if (copyout) { - SET_BINARY_MODE(stdout); - } - do { - if (uncompr) { - if (copyout) { - file = gzopen(*argv, "rb"); - if (file == NULL) - fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv); - else - gz_uncompress(file, stdout); - } else { - file_uncompress(*argv); - } - } else { - if (copyout) { - FILE * in = fopen(*argv, "rb"); - - if (in == NULL) { - perror(*argv); - } else { - file = gzdopen(fileno(stdout), outmode); - if (file == NULL) error("can't gzdopen stdout"); - - gz_compress(in, file); - } - - } else { - file_compress(*argv, outmode); - } - } - } while (argv++, --argc); - } - return 0; -} diff --git a/third_party/zlib/treebuild.xml b/third_party/zlib/treebuild.xml deleted file mode 100644 index 930b00b..0000000 --- a/third_party/zlib/treebuild.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - zip compression library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zlib/trees.c b/third_party/zlib/trees.c deleted file mode 100644 index 6a523ef..0000000 --- a/third_party/zlib/trees.c +++ /dev/null @@ -1,1117 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2024 Jean-loup Gailly - * detect_data_type() function provided freely by Cosmin Truta, 2006 - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process uses several Huffman trees. The more - * common source values are represented by shorter bit sequences. - * - * Each code tree is stored in a compressed form which is itself - * a Huffman encoding of the lengths of all the code strings (in - * ascending order by source values). The actual code strings are - * reconstructed from the lengths in the inflate process, as described - * in the deflate specification. - * - * REFERENCES - * - * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". - * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc - * - * Storer, James A. - * Data Compression: Methods and Theory, pp. 49-50. - * Computer Science Press, 1988. ISBN 0-7167-8156-5. - * - * Sedgewick, R. - * Algorithms, p290. - * Addison-Wesley, 1983. ISBN 0-201-06672-6. - */ - -/* @(#) $Id$ */ - -/* #define GEN_TREES_H */ - -#include "deflate.h" - -#ifdef ZLIB_DEBUG -# include -#endif - -/* =========================================================================== - * Constants - */ - -#define MAX_BL_BITS 7 -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -#define END_BLOCK 256 -/* end of block literal code */ - -#define REP_3_6 16 -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -#define REPZ_3_10 17 -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -#define REPZ_11_138 18 -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ - = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; - -local const int extra_dbits[D_CODES] /* extra bits for each distance code */ - = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ - = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; - -local const uch bl_order[BL_CODES] - = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ - -#if defined(GEN_TREES_H) || !defined(STDC) -/* non ANSI compilers may not accept trees.h */ - -local ct_data static_ltree[L_CODES+2]; -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -local ct_data static_dtree[D_CODES]; -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -uch _dist_code[DIST_CODE_LEN]; -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -uch _length_code[MAX_MATCH-MIN_MATCH+1]; -/* length code for each normalized match length (0 == MIN_MATCH) */ - -local int base_length[LENGTH_CODES]; -/* First normalized length for each code (0 = MIN_MATCH) */ - -local int base_dist[D_CODES]; -/* First normalized distance for each code (0 = distance of 1) */ - -#else -# include "trees.h" -#endif /* GEN_TREES_H */ - -struct static_tree_desc_s { - const ct_data *static_tree; /* static tree or NULL */ - const intf *extra_bits; /* extra bits for each code or NULL */ - int extra_base; /* base index for extra_bits */ - int elems; /* max number of elements in the tree */ - int max_length; /* max bit length for the codes */ -}; - -#ifdef NO_INIT_GLOBAL_POINTERS -# define TCONST -#else -# define TCONST const -#endif - -local TCONST static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local TCONST static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local TCONST static_tree_desc static_bl_desc = -{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -#define put_short(s, w) { \ - put_byte(s, (uch)((w) & 0xff)); \ - put_byte(s, (uch)((ush)(w) >> 8)); \ -} - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -local unsigned bi_reverse(unsigned code, int len) { - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -local void bi_flush(deflate_state *s) { - if (s->bi_valid == 16) { - put_short(s, s->bi_buf); - s->bi_buf = 0; - s->bi_valid = 0; - } else if (s->bi_valid >= 8) { - put_byte(s, (Byte)s->bi_buf); - s->bi_buf >>= 8; - s->bi_valid -= 8; - } -} - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -local void bi_windup(deflate_state *s) { - if (s->bi_valid > 8) { - put_short(s, s->bi_buf); - } else if (s->bi_valid > 0) { - put_byte(s, (Byte)s->bi_buf); - } - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef ZLIB_DEBUG - s->bits_sent = (s->bits_sent + 7) & ~7; -#endif -} - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) { - ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - unsigned code = 0; /* running code value */ - int bits; /* bit index */ - int n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits - 1]) << 1; - next_code[bits] = (ush)code; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, - "inconsistent bit counts"); - Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); - - for (n = 0; n <= max_code; n++) { - int len = tree[n].Len; - if (len == 0) continue; - /* Now reverse the bits */ - tree[n].Code = (ush)bi_reverse(next_code[len]++, len); - - Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", - n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1)); - } -} - -#ifdef GEN_TREES_H -local void gen_trees_header(void); -#endif - -#ifndef ZLIB_DEBUG -# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) - /* Send a code of the given tree. c and tree must not have side effects */ - -#else /* !ZLIB_DEBUG */ -# define send_code(s, c, tree) \ - { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ - send_bits(s, tree[c].Code, tree[c].Len); } -#endif - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -#ifdef ZLIB_DEBUG -local void send_bits(deflate_state *s, int value, int length) { - Tracevv((stderr," l %2d v %4x ", length, value)); - Assert(length > 0 && length <= 15, "invalid length"); - s->bits_sent += (ulg)length; - - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16 - bi_valid)) - * unused bits in value. - */ - if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (ush)value << s->bi_valid; - put_short(s, s->bi_buf); - s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); - s->bi_valid += length - Buf_size; - } else { - s->bi_buf |= (ush)value << s->bi_valid; - s->bi_valid += length; - } -} -#else /* !ZLIB_DEBUG */ - -#define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = (int)value;\ - s->bi_buf |= (ush)val << s->bi_valid;\ - put_short(s, s->bi_buf);\ - s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ - s->bi_valid += len - Buf_size;\ - } else {\ - s->bi_buf |= (ush)(value) << s->bi_valid;\ - s->bi_valid += len;\ - }\ -} -#endif /* ZLIB_DEBUG */ - - -/* the arguments must not have side effects */ - -/* =========================================================================== - * Initialize the various 'constant' tables. - */ -local void tr_static_init(void) { -#if defined(GEN_TREES_H) || !defined(STDC) - static int static_init_done = 0; - int n; /* iterates over tree elements */ - int bits; /* bit counter */ - int length; /* length value */ - int code; /* code value */ - int dist; /* distance index */ - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - if (static_init_done) return; - - /* For some embedded targets, global variables are not initialized: */ -#ifdef NO_INIT_GLOBAL_POINTERS - static_l_desc.static_tree = static_ltree; - static_l_desc.extra_bits = extra_lbits; - static_d_desc.static_tree = static_dtree; - static_d_desc.extra_bits = extra_dbits; - static_bl_desc.extra_bits = extra_blbits; -#endif - - /* Initialize the mapping length (0..255) -> length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = (uch)code; - } - } - Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = (uch)code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = (uch)code; - } - } - Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for ( ; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = (uch)code; - } - } - Assert (dist == 256, "tr_static_init: 256 + dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; - n = 0; - while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; - while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; - while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; - while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n].Len = 5; - static_dtree[n].Code = bi_reverse((unsigned)n, 5); - } - static_init_done = 1; - -# ifdef GEN_TREES_H - gen_trees_header(); -# endif -#endif /* defined(GEN_TREES_H) || !defined(STDC) */ -} - -/* =========================================================================== - * Generate the file trees.h describing the static trees. - */ -#ifdef GEN_TREES_H -# ifndef ZLIB_DEBUG -# include -# endif - -# define SEPARATOR(i, last, width) \ - ((i) == (last)? "\n};\n\n" : \ - ((i) % (width) == (width) - 1 ? ",\n" : ", ")) - -void gen_trees_header(void) { - FILE *header = fopen("trees.h", "w"); - int i; - - Assert (header != NULL, "Can't open trees.h"); - fprintf(header, - "/* header created automatically with -DGEN_TREES_H */\n\n"); - - fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); - for (i = 0; i < L_CODES+2; i++) { - fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, - static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); - } - - fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, - static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); - } - - fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); - for (i = 0; i < DIST_CODE_LEN; i++) { - fprintf(header, "%2u%s", _dist_code[i], - SEPARATOR(i, DIST_CODE_LEN-1, 20)); - } - - fprintf(header, - "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); - for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { - fprintf(header, "%2u%s", _length_code[i], - SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); - } - - fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); - for (i = 0; i < LENGTH_CODES; i++) { - fprintf(header, "%1u%s", base_length[i], - SEPARATOR(i, LENGTH_CODES-1, 20)); - } - - fprintf(header, "local const int base_dist[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "%5u%s", base_dist[i], - SEPARATOR(i, D_CODES-1, 10)); - } - - fclose(header); -} -#endif /* GEN_TREES_H */ - -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(deflate_state *s) { - int n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; - for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; - for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; - - s->dyn_ltree[END_BLOCK].Freq = 1; - s->opt_len = s->static_len = 0L; - s->sym_next = s->matches = 0; -} - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -void ZLIB_INTERNAL _tr_init(deflate_state *s) { - tr_static_init(); - - s->l_desc.dyn_tree = s->dyn_ltree; - s->l_desc.stat_desc = &static_l_desc; - - s->d_desc.dyn_tree = s->dyn_dtree; - s->d_desc.stat_desc = &static_d_desc; - - s->bl_desc.dyn_tree = s->bl_tree; - s->bl_desc.stat_desc = &static_bl_desc; - - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef ZLIB_DEBUG - s->compressed_len = 0L; - s->bits_sent = 0L; -#endif - - /* Initialize the first block of the first file: */ - init_block(s); -} - -#define SMALLEST 1 -/* Index within the heap array of least frequent node in the Huffman tree */ - - -/* =========================================================================== - * Remove the smallest element from the heap and recreate the heap with - * one less element. Updates heap and heap_len. - */ -#define pqremove(s, tree, top) \ -{\ - top = s->heap[SMALLEST]; \ - s->heap[SMALLEST] = s->heap[s->heap_len--]; \ - pqdownheap(s, tree, SMALLEST); \ -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -#define smaller(tree, n, m, depth) \ - (tree[n].Freq < tree[m].Freq || \ - (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -local void pqdownheap(deflate_state *s, ct_data *tree, int k) { - int v = s->heap[k]; - int j = k << 1; /* left son of k */ - while (j <= s->heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s->heap_len && - smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s->heap[j], s->depth)) break; - - /* Exchange v with the smallest son */ - s->heap[k] = s->heap[j]; k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s->heap[k] = v; -} - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -local void gen_bitlen(deflate_state *s, tree_desc *desc) { - ct_data *tree = desc->dyn_tree; - int max_code = desc->max_code; - const ct_data *stree = desc->stat_desc->static_tree; - const intf *extra = desc->stat_desc->extra_bits; - int base = desc->stat_desc->extra_base; - int max_length = desc->stat_desc->max_length; - int h; /* heap index */ - int n, m; /* iterate over the tree elements */ - int bits; /* bit length */ - int xbits; /* extra bits */ - ush f; /* frequency */ - int overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ - - for (h = s->heap_max + 1; h < HEAP_SIZE; h++) { - n = s->heap[h]; - bits = tree[tree[n].Dad].Len + 1; - if (bits > max_length) bits = max_length, overflow++; - tree[n].Len = (ush)bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) continue; /* not a leaf node */ - - s->bl_count[bits]++; - xbits = 0; - if (n >= base) xbits = extra[n - base]; - f = tree[n].Freq; - s->opt_len += (ulg)f * (unsigned)(bits + xbits); - if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits); - } - if (overflow == 0) return; - - Tracev((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s->bl_count[bits] == 0) bits--; - s->bl_count[bits]--; /* move one leaf down the tree */ - s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s->bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = s->bl_count[bits]; - while (n != 0) { - m = s->heap[--h]; - if (m > max_code) continue; - if ((unsigned) tree[m].Len != (unsigned) bits) { - Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; - tree[m].Len = (ush)bits; - } - n--; - } - } -} - -#ifdef DUMP_BL_TREE -# include -#endif - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -local void build_tree(deflate_state *s, tree_desc *desc) { - ct_data *tree = desc->dyn_tree; - const ct_data *stree = desc->stat_desc->static_tree; - int elems = desc->stat_desc->elems; - int n, m; /* iterate over heap elements */ - int max_code = -1; /* largest code with non zero frequency */ - int node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1]. - * heap[0] is not used. - */ - s->heap_len = 0, s->heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].Freq != 0) { - s->heap[++(s->heap_len)] = max_code = n; - s->depth[n] = 0; - } else { - tree[n].Len = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s->heap_len < 2) { - node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); - tree[node].Freq = 1; - s->depth[node] = 0; - s->opt_len--; if (stree) s->static_len -= stree[node].Len; - /* node is 0 or 1 so it does not have extra bits */ - } - desc->max_code = max_code; - - /* The elements heap[heap_len/2 + 1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - pqremove(s, tree, n); /* n = node of least frequency */ - m = s->heap[SMALLEST]; /* m = node of next least frequency */ - - s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ - s->heap[--(s->heap_max)] = m; - - /* Create a new node father of n and m */ - tree[node].Freq = tree[n].Freq + tree[m].Freq; - s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? - s->depth[n] : s->depth[m]) + 1); - tree[n].Dad = tree[m].Dad = (ush)node; -#ifdef DUMP_BL_TREE - if (tree == s->bl_tree) { - fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", - node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); - } -#endif - /* and insert the new node in the heap */ - s->heap[SMALLEST] = node++; - pqdownheap(s, tree, SMALLEST); - - } while (s->heap_len >= 2); - - s->heap[--(s->heap_max)] = s->heap[SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, (tree_desc *)desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes ((ct_data *)tree, max_code, s->bl_count); -} - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -local void scan_tree(deflate_state *s, ct_data *tree, int max_code) { - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - if (nextlen == 0) max_count = 138, min_count = 3; - tree[max_code + 1].Len = (ush)0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n + 1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - s->bl_tree[curlen].Freq += count; - } else if (curlen != 0) { - if (curlen != prevlen) s->bl_tree[curlen].Freq++; - s->bl_tree[REP_3_6].Freq++; - } else if (count <= 10) { - s->bl_tree[REPZ_3_10].Freq++; - } else { - s->bl_tree[REPZ_11_138].Freq++; - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -local void send_tree(deflate_state *s, ct_data *tree, int max_code) { - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - /* tree[max_code + 1].Len = -1; */ /* guard already set */ - if (nextlen == 0) max_count = 138, min_count = 3; - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n + 1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { send_code(s, curlen, s->bl_tree); } while (--count != 0); - - } else if (curlen != 0) { - if (curlen != prevlen) { - send_code(s, curlen, s->bl_tree); count--; - } - Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7); - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -local int build_bl_tree(deflate_state *s) { - int max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); - scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, (tree_desc *)(&(s->bl_desc))); - /* opt_len now includes the length of the tree representations, except the - * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4; - Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - s->opt_len, s->static_len)); - - return max_blindex; -} - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -local void send_all_trees(deflate_state *s, int lcodes, int dcodes, - int blcodes) { - int rank; /* index in bl_order */ - - Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - "too many codes"); - Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); - } - Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1); /* literal tree */ - Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1); /* distance tree */ - Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - -/* =========================================================================== - * Send a stored block - */ -void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, - ulg stored_len, int last) { - send_bits(s, (STORED_BLOCK<<1) + last, 3); /* send block type */ - bi_windup(s); /* align on byte boundary */ - put_short(s, (ush)stored_len); - put_short(s, (ush)~stored_len); - if (stored_len) - zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len); - s->pending += stored_len; -#ifdef ZLIB_DEBUG - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; - s->bits_sent += 2*16; - s->bits_sent += stored_len << 3; -#endif -} - -/* =========================================================================== - * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) - */ -void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) { - bi_flush(s); -} - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -void ZLIB_INTERNAL _tr_align(deflate_state *s) { - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); -#ifdef ZLIB_DEBUG - s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ -#endif - bi_flush(s); -} - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(deflate_state *s, const ct_data *ltree, - const ct_data *dtree) { - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned sx = 0; /* running index in symbol buffers */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->sym_next != 0) do { -#ifdef LIT_MEM - dist = s->d_buf[sx]; - lc = s->l_buf[sx++]; -#else - dist = s->sym_buf[sx++] & 0xff; - dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; - lc = s->sym_buf[sx++]; -#endif - if (dist == 0) { - send_code(s, lc, ltree); /* send a literal byte */ - Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send length code */ - extra = extra_lbits[code]; - if (extra != 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra != 0) { - dist -= (unsigned)base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check for no overlay of pending_buf on needed symbols */ -#ifdef LIT_MEM - Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow"); -#else - Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); -#endif - - } while (sx < s->sym_next); - - send_code(s, END_BLOCK, ltree); -} - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "block list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -local int detect_data_type(deflate_state *s) { - /* block_mask is the bit mask of block-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - unsigned long block_mask = 0xf3ffc07fUL; - int n; - - /* Check for non-textual ("block-listed") bytes. */ - for (n = 0; n <= 31; n++, block_mask >>= 1) - if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0)) - return Z_BINARY; - - /* Check for textual ("allow-listed") bytes. */ - if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 - || s->dyn_ltree[13].Freq != 0) - return Z_TEXT; - for (n = 32; n < LITERALS; n++) - if (s->dyn_ltree[n].Freq != 0) - return Z_TEXT; - - /* There are no "block-listed" or "allow-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and write out the encoded block. - */ -void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, - ulg stored_len, int last) { - ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - int max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s->level > 0) { - - /* Check if the file is binary or text */ - if (s->strm->data_type == Z_UNKNOWN) - s->strm->data_type = detect_data_type(s); - - /* Construct the literal and distance trees */ - build_tree(s, (tree_desc *)(&(s->l_desc))); - Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - - build_tree(s, (tree_desc *)(&(s->d_desc))); - Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s->opt_len + 3 + 7) >> 3; - static_lenb = (s->static_len + 3 + 7) >> 3; - - Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - s->sym_next / 3)); - -#ifndef FORCE_STATIC - if (static_lenb <= opt_lenb || s->strategy == Z_FIXED) -#endif - opt_lenb = static_lenb; - - } else { - Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - -#ifdef FORCE_STORED - if (buf != (char*)0) { /* force stored block */ -#else - if (stored_len + 4 <= opt_lenb && buf != (char*)0) { - /* 4: two words for the lengths */ -#endif - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (static_lenb == opt_lenb) { - send_bits(s, (STATIC_TREES<<1) + last, 3); - compress_block(s, (const ct_data *)static_ltree, - (const ct_data *)static_dtree); -#ifdef ZLIB_DEBUG - s->compressed_len += 3 + s->static_len; -#endif - } else { - send_bits(s, (DYN_TREES<<1) + last, 3); - send_all_trees(s, s->l_desc.max_code + 1, s->d_desc.max_code + 1, - max_blindex + 1); - compress_block(s, (const ct_data *)s->dyn_ltree, - (const ct_data *)s->dyn_dtree); -#ifdef ZLIB_DEBUG - s->compressed_len += 3 + s->opt_len; -#endif - } - Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); -#ifdef ZLIB_DEBUG - s->compressed_len += 7; /* align on byte boundary */ -#endif - } - Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3, - s->compressed_len - 7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { -#ifdef LIT_MEM - s->d_buf[s->sym_next] = (ush)dist; - s->l_buf[s->sym_next++] = (uch)lc; -#else - s->sym_buf[s->sym_next++] = (uch)dist; - s->sym_buf[s->sym_next++] = (uch)(dist >> 8); - s->sym_buf[s->sym_next++] = (uch)lc; -#endif - if (dist == 0) { - /* lc is the unmatched char */ - s->dyn_ltree[lc].Freq++; - } else { - s->matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - Assert((ush)dist < (ush)MAX_DIST(s) && - (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s->dyn_ltree[_length_code[lc] + LITERALS + 1].Freq++; - s->dyn_dtree[d_code(dist)].Freq++; - } - return (s->sym_next == s->sym_end); -} diff --git a/third_party/zlib/trees.h b/third_party/zlib/trees.h deleted file mode 100644 index 8ae455d..0000000 --- a/third_party/zlib/trees.h +++ /dev/null @@ -1,129 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - - diff --git a/third_party/zlib/uncompr.c b/third_party/zlib/uncompr.c deleted file mode 100644 index 5e25666..0000000 --- a/third_party/zlib/uncompr.c +++ /dev/null @@ -1,85 +0,0 @@ -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#define ZLIB_INTERNAL -#include "zlib.h" - -/* =========================================================================== - Decompresses the source buffer into the destination buffer. *sourceLen is - the byte length of the source buffer. Upon entry, *destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, - *destLen is the size of the decompressed data and *sourceLen is the number - of source bytes consumed. Upon return, source + *sourceLen points to the - first unused input byte. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, or - Z_DATA_ERROR if the input data was corrupted, including if the input data is - an incomplete zlib stream. -*/ -int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source, - uLong *sourceLen) { - z_stream stream; - int err; - const uInt max = (uInt)-1; - uLong len, left; - Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ - - len = *sourceLen; - if (*destLen) { - left = *destLen; - *destLen = 0; - } - else { - left = 1; - dest = buf; - } - - stream.next_in = (z_const Bytef *)source; - stream.avail_in = 0; - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - stream.opaque = (voidpf)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - stream.next_out = dest; - stream.avail_out = 0; - - do { - if (stream.avail_out == 0) { - stream.avail_out = left > (uLong)max ? max : (uInt)left; - left -= stream.avail_out; - } - if (stream.avail_in == 0) { - stream.avail_in = len > (uLong)max ? max : (uInt)len; - len -= stream.avail_in; - } - err = inflate(&stream, Z_NO_FLUSH); - } while (err == Z_OK); - - *sourceLen -= len + stream.avail_in; - if (dest != buf) - *destLen = stream.total_out; - else if (stream.total_out && err == Z_BUF_ERROR) - left = 1; - - inflateEnd(&stream); - return err == Z_STREAM_END ? Z_OK : - err == Z_NEED_DICT ? Z_DATA_ERROR : - err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : - err; -} - -int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, - uLong sourceLen) { - return uncompress2(dest, destLen, source, &sourceLen); -} diff --git a/third_party/zlib/watcom/watcom_f.mak b/third_party/zlib/watcom/watcom_f.mak deleted file mode 100644 index 37f4d74..0000000 --- a/third_party/zlib/watcom/watcom_f.mak +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for zlib -# OpenWatcom flat model -# Last updated: 28-Dec-2005 - -# To use, do "wmake -f watcom_f.mak" - -C_SOURCE = adler32.c compress.c crc32.c deflate.c & - gzclose.c gzlib.c gzread.c gzwrite.c & - infback.c inffast.c inflate.c inftrees.c & - trees.c uncompr.c zutil.c - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj & - gzclose.obj gzlib.obj gzread.obj gzwrite.obj & - infback.obj inffast.obj inflate.obj inftrees.obj & - trees.obj uncompr.obj zutil.obj - -CC = wcc386 -LINKER = wcl386 -CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx -ZLIB_LIB = zlib_f.lib - -.C.OBJ: - $(CC) $(CFLAGS) $[@ - -all: $(ZLIB_LIB) example.exe minigzip.exe - -$(ZLIB_LIB): $(OBJS) - wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj - wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj - wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj - wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj - wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj - -example.exe: $(ZLIB_LIB) example.obj - $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) - -minigzip.exe: $(ZLIB_LIB) minigzip.obj - $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) - -clean: .SYMBOLIC - del *.obj - del $(ZLIB_LIB) - @echo Cleaning done diff --git a/third_party/zlib/watcom/watcom_l.mak b/third_party/zlib/watcom/watcom_l.mak deleted file mode 100644 index 193eed7..0000000 --- a/third_party/zlib/watcom/watcom_l.mak +++ /dev/null @@ -1,43 +0,0 @@ -# Makefile for zlib -# OpenWatcom large model -# Last updated: 28-Dec-2005 - -# To use, do "wmake -f watcom_l.mak" - -C_SOURCE = adler32.c compress.c crc32.c deflate.c & - gzclose.c gzlib.c gzread.c gzwrite.c & - infback.c inffast.c inflate.c inftrees.c & - trees.c uncompr.c zutil.c - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj & - gzclose.obj gzlib.obj gzread.obj gzwrite.obj & - infback.obj inffast.obj inflate.obj inftrees.obj & - trees.obj uncompr.obj zutil.obj - -CC = wcc -LINKER = wcl -CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx -ZLIB_LIB = zlib_l.lib - -.C.OBJ: - $(CC) $(CFLAGS) $[@ - -all: $(ZLIB_LIB) example.exe minigzip.exe - -$(ZLIB_LIB): $(OBJS) - wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj - wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj - wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj - wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj - wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj - -example.exe: $(ZLIB_LIB) example.obj - $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) - -minigzip.exe: $(ZLIB_LIB) minigzip.obj - $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) - -clean: .SYMBOLIC - del *.obj - del $(ZLIB_LIB) - @echo Cleaning done diff --git a/third_party/zlib/win32/DLL_FAQ.txt b/third_party/zlib/win32/DLL_FAQ.txt deleted file mode 100644 index d8cf5f3..0000000 --- a/third_party/zlib/win32/DLL_FAQ.txt +++ /dev/null @@ -1,381 +0,0 @@ - - Frequently Asked Questions about ZLIB1.DLL - - -This document describes the design, the rationale, and the usage -of the common DLL build of zlib, named ZLIB1.DLL. If you have -general questions about zlib, you should see the file "FAQ" found -in the zlib distribution, or at the following location: - http://www.gzip.org/zlib/zlib_faq.html - - - 1. What is ZLIB1.DLL, and how can I get it? - - - ZLIB1.DLL is the common build of zlib as a DLL. - (Please remark the character '1' in the name.) - - Applications that link to ZLIB1.DLL can rely on the following - specification: - - * The exported symbols are exclusively defined in the source - files "zlib.h" and "zlib.def", found in an official zlib - source distribution. - * The symbols are exported by name, not by ordinal. - * The exported names are undecorated. - * The calling convention of functions is "C" (CDECL). - * The ZLIB1.DLL binary is linked to MSVCRT.DLL. - - The archive in which ZLIB1.DLL is bundled contains compiled - test programs that must run with a valid build of ZLIB1.DLL. - It is recommended to download the prebuilt DLL from the zlib - web site, instead of building it yourself, to avoid potential - incompatibilities that could be introduced by your compiler - and build settings. If you do build the DLL yourself, please - make sure that it complies with all the above requirements, - and it runs with the precompiled test programs, bundled with - the original ZLIB1.DLL distribution. - - If, for any reason, you need to build an incompatible DLL, - please use a different file name. - - - 2. Why did you change the name of the DLL to ZLIB1.DLL? - What happened to the old ZLIB.DLL? - - - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required - compilation settings that were incompatible to those used by - a static build. The DLL settings were supposed to be enabled - by defining the macro ZLIB_DLL, before including "zlib.h". - Incorrect handling of this macro was silently accepted at - build time, resulting in two major problems: - - * ZLIB_DLL was missing from the old makefile. When building - the DLL, not all people added it to the build options. In - consequence, incompatible incarnations of ZLIB.DLL started - to circulate around the net. - - * When switching from using the static library to using the - DLL, applications had to define the ZLIB_DLL macro and - to recompile all the sources that contained calls to zlib - functions. Failure to do so resulted in creating binaries - that were unable to run with the official ZLIB.DLL build. - - The only possible solution that we could foresee was to make - a binary-incompatible change in the DLL interface, in order to - remove the dependency on the ZLIB_DLL macro, and to release - the new DLL under a different name. - - We chose the name ZLIB1.DLL, where '1' indicates the major - zlib version number. We hope that we will not have to break - the binary compatibility again, at least not as long as the - zlib-1.x series will last. - - There is still a ZLIB_DLL macro, that can trigger a more - efficient build and use of the DLL, but compatibility no - longer dependents on it. - - - 3. Can I build ZLIB.DLL from the new zlib sources, and replace - an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier? - - - In principle, you can do it by assigning calling convention - keywords to the macros ZEXPORT and ZEXPORTVA. In practice, - it depends on what you mean by "an old ZLIB.DLL", because the - old DLL exists in several mutually-incompatible versions. - You have to find out first what kind of calling convention is - being used in your particular ZLIB.DLL build, and to use the - same one in the new build. If you don't know what this is all - about, you might be better off if you would just leave the old - DLL intact. - - - 4. Can I compile my application using the new zlib interface, and - link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or - earlier? - - - The official answer is "no"; the real answer depends again on - what kind of ZLIB.DLL you have. Even if you are lucky, this - course of action is unreliable. - - If you rebuild your application and you intend to use a newer - version of zlib (post- 1.1.4), it is strongly recommended to - link it to the new ZLIB1.DLL. - - - 5. Why are the zlib symbols exported by name, and not by ordinal? - - - Although exporting symbols by ordinal is a little faster, it - is risky. Any single glitch in the maintenance or use of the - DEF file that contains the ordinals can result in incompatible - builds and frustrating crashes. Simply put, the benefits of - exporting symbols by ordinal do not justify the risks. - - Technically, it should be possible to maintain ordinals in - the DEF file, and still export the symbols by name. Ordinals - exist in every DLL, and even if the dynamic linking performed - at the DLL startup is searching for names, ordinals serve as - hints, for a faster name lookup. However, if the DEF file - contains ordinals, the Microsoft linker automatically builds - an implib that will cause the executables linked to it to use - those ordinals, and not the names. It is interesting to - notice that the GNU linker for Win32 does not suffer from this - problem. - - It is possible to avoid the DEF file if the exported symbols - are accompanied by a "__declspec(dllexport)" attribute in the - source files. You can do this in zlib by predefining the - ZLIB_DLL macro. - - - 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling - convention. Why not use the STDCALL convention? - STDCALL is the standard convention in Win32, and I need it in - my Visual Basic project! - - (For readability, we use CDECL to refer to the convention - triggered by the "__cdecl" keyword, STDCALL to refer to - the convention triggered by "__stdcall", and FASTCALL to - refer to the convention triggered by "__fastcall".) - - - Most of the native Windows API functions (without varargs) use - indeed the WINAPI convention (which translates to STDCALL in - Win32), but the standard C functions use CDECL. If a user - application is intrinsically tied to the Windows API (e.g. - it calls native Windows API functions such as CreateFile()), - sometimes it makes sense to decorate its own functions with - WINAPI. But if ANSI C or POSIX portability is a goal (e.g. - it calls standard C functions such as fopen()), it is not a - sound decision to request the inclusion of , or to - use non-ANSI constructs, for the sole purpose to make the user - functions STDCALL-able. - - The functionality offered by zlib is not in the category of - "Windows functionality", but is more like "C functionality". - - Technically, STDCALL is not bad; in fact, it is slightly - faster than CDECL, and it works with variable-argument - functions, just like CDECL. It is unfortunate that, in spite - of using STDCALL in the Windows API, it is not the default - convention used by the C compilers that run under Windows. - The roots of the problem reside deep inside the unsafety of - the K&R-style function prototypes, where the argument types - are not specified; but that is another story for another day. - - The remaining fact is that CDECL is the default convention. - Even if an explicit convention is hard-coded into the function - prototypes inside C headers, problems may appear. The - necessity to expose the convention in users' callbacks is one - of these problems. - - The calling convention issues are also important when using - zlib in other programming languages. Some of them, like Ada - (GNAT) and Fortran (GNU G77), have C bindings implemented - initially on Unix, and relying on the C calling convention. - On the other hand, the pre- .NET versions of Microsoft Visual - Basic require STDCALL, while Borland Delphi prefers, although - it does not require, FASTCALL. - - In fairness to all possible uses of zlib outside the C - programming language, we choose the default "C" convention. - Anyone interested in different bindings or conventions is - encouraged to maintain specialized projects. The "contrib/" - directory from the zlib distribution already holds a couple - of foreign bindings, such as Ada, C++, and Delphi. - - - 7. I need a DLL for my Visual Basic project. What can I do? - - - Define the ZLIB_WINAPI macro before including "zlib.h", when - building both the DLL and the user application (except that - you don't need to define anything when using the DLL in Visual - Basic). The ZLIB_WINAPI macro will switch on the WINAPI - (STDCALL) convention. The name of this DLL must be different - than the official ZLIB1.DLL. - - Gilles Vollant has contributed a build named ZLIBWAPI.DLL, - with the ZLIB_WINAPI macro turned on, and with the minizip - functionality built in. For more information, please read - the notes inside "contrib/vstudio/readme.txt", found in the - zlib distribution. - - - 8. I need to use zlib in my Microsoft .NET project. What can I - do? - - - Henrik Ravn has contributed a .NET wrapper around zlib. Look - into contrib/dotzlib/, inside the zlib distribution. - - - 9. If my application uses ZLIB1.DLL, should I link it to - MSVCRT.DLL? Why? - - - It is not required, but it is recommended to link your - application to MSVCRT.DLL, if it uses ZLIB1.DLL. - - The executables (.EXE, .DLL, etc.) that are involved in the - same process and are using the C run-time library (i.e. they - are calling standard C functions), must link to the same - library. There are several libraries in the Win32 system: - CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc. - Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that - depend on it should also be linked to MSVCRT.DLL. - - -10. Why are you saying that ZLIB1.DLL and my application should - be linked to the same C run-time (CRT) library? I linked my - application and my DLLs to different C libraries (e.g. my - application to a static library, and my DLLs to MSVCRT.DLL), - and everything works fine. - - - If a user library invokes only pure Win32 API (accessible via - and the related headers), its DLL build will work - in any context. But if this library invokes standard C API, - things get more complicated. - - There is a single Win32 library in a Win32 system. Every - function in this library resides in a single DLL module, that - is safe to call from anywhere. On the other hand, there are - multiple versions of the C library, and each of them has its - own separate internal state. Standalone executables and user - DLLs that call standard C functions must link to a C run-time - (CRT) library, be it static or shared (DLL). Intermixing - occurs when an executable (not necessarily standalone) and a - DLL are linked to different CRTs, and both are running in the - same process. - - Intermixing multiple CRTs is possible, as long as their - internal states are kept intact. The Microsoft Knowledge Base - articles KB94248 "HOWTO: Use the C Run-Time" and KB140584 - "HOWTO: Link with the Correct C Run-Time (CRT) Library" - mention the potential problems raised by intermixing. - - If intermixing works for you, it's because your application - and DLLs are avoiding the corruption of each of the CRTs' - internal states, maybe by careful design, or maybe by fortune. - - Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such - as those provided by Borland, raises similar problems. - - -11. Why are you linking ZLIB1.DLL to MSVCRT.DLL? - - - MSVCRT.DLL exists on every Windows 95 with a new service pack - installed, or with Microsoft Internet Explorer 4 or later, and - on all other Windows 4.x or later (Windows 98, Windows NT 4, - or later). It is freely distributable; if not present in the - system, it can be downloaded from Microsoft or from other - software provider for free. - - The fact that MSVCRT.DLL does not exist on a virgin Windows 95 - is not so problematic. Windows 95 is scarcely found nowadays, - Microsoft ended its support a long time ago, and many recent - applications from various vendors, including Microsoft, do not - even run on it. Furthermore, no serious user should run - Windows 95 without a proper update installed. - - -12. Why are you not linking ZLIB1.DLL to - <> ? - - - We considered and abandoned the following alternatives: - - * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or - LIBCMT.LIB) is not a good option. People are using the DLL - mainly to save disk space. If you are linking your program - to a static C library, you may as well consider linking zlib - in statically, too. - - * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because - CRTDLL.DLL is present on every Win32 installation. - Unfortunately, it has a series of problems: it does not - work properly with Microsoft's C++ libraries, it does not - provide support for 64-bit file offsets, (and so on...), - and Microsoft discontinued its support a long time ago. - - * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied - with the Microsoft .NET platform, and Visual C++ 7.0/7.1, - raises problems related to the status of ZLIB1.DLL as a - system component. According to the Microsoft Knowledge Base - article KB326922 "INFO: Redistribution of the Shared C - Runtime Component in Visual C++ .NET", MSVCR70.DLL and - MSVCR71.DLL are not supposed to function as system DLLs, - because they may clash with MSVCRT.DLL. Instead, the - application's installer is supposed to put these DLLs - (if needed) in the application's private directory. - If ZLIB1.DLL depends on a non-system runtime, it cannot - function as a redistributable system component. - - * Linking ZLIB1.DLL to non-Microsoft runtimes, such as - Borland's, or Cygwin's, raises problems related to the - reliable presence of these runtimes on Win32 systems. - It's easier to let the DLL build of zlib up to the people - who distribute these runtimes, and who may proceed as - explained in the answer to Question 14. - - -13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL, - how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0 - (Visual Studio .NET) or newer? - - - Due to the problems explained in the Microsoft Knowledge Base - article KB326922 (see the previous answer), the C runtime that - comes with the VC7 environment is no longer considered a - system component. That is, it should not be assumed that this - runtime exists, or may be installed in a system directory. - Since ZLIB1.DLL is supposed to be a system component, it may - not depend on a non-system component. - - In order to link ZLIB1.DLL and your application to MSVCRT.DLL - in VC7, you need the library of Visual C++ 6.0 or older. If - you don't have this library at hand, it's probably best not to - use ZLIB1.DLL. - - We are hoping that, in the future, Microsoft will provide a - way to build applications linked to a proper system runtime, - from the Visual C++ environment. Until then, you have a - couple of alternatives, such as linking zlib in statically. - If your application requires dynamic linking, you may proceed - as explained in the answer to Question 14. - - -14. I need to link my own DLL build to a CRT different than - MSVCRT.DLL. What can I do? - - - Feel free to rebuild the DLL from the zlib sources, and link - it the way you want. You should, however, clearly state that - your build is unofficial. You should give it a different file - name, and/or install it in a private directory that can be - accessed by your application only, and is not visible to the - others (i.e. it's neither in the PATH, nor in the SYSTEM or - SYSTEM32 directories). Otherwise, your build may clash with - applications that link to the official build. - - For example, in Cygwin, zlib is linked to the Cygwin runtime - CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. - - -15. May I include additional pieces of code that I find useful, - link them in ZLIB1.DLL, and export them? - - - No. A legitimate build of ZLIB1.DLL must not include code - that does not originate from the official zlib source code. - But you can make your own private DLL build, under a different - file name, as suggested in the previous answer. - - For example, zlib is a part of the VCL library, distributed - with Borland Delphi and C++ Builder. The DLL build of VCL - is a redistributable file, named VCLxx.DLL. - - -16. May I remove some functionality out of ZLIB1.DLL, by enabling - macros like NO_GZCOMPRESS or NO_GZIP at compile time? - - - No. A legitimate build of ZLIB1.DLL must provide the complete - zlib functionality, as implemented in the official zlib source - code. But you can make your own private DLL build, under a - different file name, as suggested in the previous answer. - -** - -This document is written and maintained by -Cosmin Truta diff --git a/third_party/zlib/win32/Makefile.bor b/third_party/zlib/win32/Makefile.bor deleted file mode 100644 index 4495353..0000000 --- a/third_party/zlib/win32/Makefile.bor +++ /dev/null @@ -1,109 +0,0 @@ -# Makefile for zlib -# Borland C++ for Win32 -# -# Usage: -# make -f win32/Makefile.bor - -# ------------ Borland C++ ------------ - -# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) -# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or -# added to the declaration of LOC here: -LOC = $(LOCAL_ZLIB) - -CC = bcc32 -AS = bcc32 -LD = bcc32 -AR = tlib -CFLAGS = -a -d -k- -O2 $(LOC) -ASFLAGS = $(LOC) -LDFLAGS = $(LOC) - - -# variables -ZLIB_LIB = zlib.lib - -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj -OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -#OBJA = -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj -OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj -#OBJPA= - - -# targets -all: $(ZLIB_LIB) example.exe minigzip.exe - -.c.obj: - $(CC) -c $(CFLAGS) $< - -.asm.obj: - $(AS) -c $(ASFLAGS) $< - -adler32.obj: adler32.c zlib.h zconf.h - -compress.obj: compress.c zlib.h zconf.h - -crc32.obj: crc32.c zlib.h zconf.h crc32.h - -deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h - -gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h - -gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h - -gzread.obj: gzread.c zlib.h zconf.h gzguts.h - -gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h - -infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h - -inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ - inffast.h inffixed.h - -inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h - -trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h - -uncompr.obj: uncompr.c zlib.h zconf.h - -zutil.obj: zutil.c zutil.h zlib.h zconf.h - -example.obj: test/example.c zlib.h zconf.h - -minigzip.obj: test/minigzip.c zlib.h zconf.h - - -# For the sake of the old Borland make, -# the command line is cut to fit in the MS-DOS 128 byte limit: -$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA) - -del $(ZLIB_LIB) - $(AR) $(ZLIB_LIB) $(OBJP1) - $(AR) $(ZLIB_LIB) $(OBJP2) - $(AR) $(ZLIB_LIB) $(OBJPA) - - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -example.exe: example.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) - -minigzip.exe: minigzip.obj $(ZLIB_LIB) - $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) - - -# cleanup -clean: - -del $(ZLIB_LIB) - -del *.obj - -del *.exe - -del *.tds - -del zlib.bak - -del foo.gz diff --git a/third_party/zlib/win32/Makefile.gcc b/third_party/zlib/win32/Makefile.gcc deleted file mode 100644 index 081e391..0000000 --- a/third_party/zlib/win32/Makefile.gcc +++ /dev/null @@ -1,177 +0,0 @@ -# Makefile for zlib, derived from Makefile.dj2. -# Modified for mingw32 by C. Spieler, 6/16/98. -# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. -# Last updated: Mar 2012. -# Tested under Cygwin and MinGW. - -# Copyright (C) 1995-2003 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h - -# To compile, or to compile and test, type from the top level zlib directory: -# -# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc -# -# To install libz.a, zconf.h and zlib.h in the system directories, type: -# -# make install -fwin32/Makefile.gcc -# -# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. -# -# To install the shared lib, append SHARED_MODE=1 to the make command : -# -# make install -fwin32/Makefile.gcc SHARED_MODE=1 - -# Note: -# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), -# the DLL name should be changed from "zlib1.dll". - -STATICLIB = libz.a -SHAREDLIB = zlib1.dll -IMPLIB = libz.dll.a - -# -# Set to 1 if shared object needs to be installed -# -SHARED_MODE=0 - -#LOC = -DZLIB_DEBUG -g - -PREFIX = -CC = $(PREFIX)gcc -CFLAGS = $(LOC) -O3 -Wall - -AS = $(CC) -ASFLAGS = $(LOC) -Wall - -LD = $(CC) -LDFLAGS = $(LOC) - -AR = $(PREFIX)ar -ARFLAGS = rcs - -RC = $(PREFIX)windres -RCFLAGS = --define GCC_WINDRES - -STRIP = $(PREFIX)strip - -CP = cp -fp -# If GNU install is available, replace $(CP) with install. -INSTALL = $(CP) -RM = rm -f - -prefix ?= /usr/local -exec_prefix = $(prefix) - -OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ - gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o -OBJA = - -all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe - -test: example.exe minigzip.exe - ./example - echo hello world | ./minigzip | ./minigzip -d - -testdll: example_d.exe minigzip_d.exe - ./example_d - echo hello world | ./minigzip_d | ./minigzip_d -d - -.c.o: - $(CC) $(CFLAGS) -c -o $@ $< - -.S.o: - $(AS) $(ASFLAGS) -c -o $@ $< - -$(STATICLIB): $(OBJS) $(OBJA) - $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) - -$(IMPLIB): $(SHAREDLIB) - -$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ - -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - $(STRIP) $@ - -example.exe: example.o $(STATICLIB) - $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) - $(STRIP) $@ - -minigzip.exe: minigzip.o $(STATICLIB) - $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) - $(STRIP) $@ - -example_d.exe: example.o $(IMPLIB) - $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) - $(STRIP) $@ - -minigzip_d.exe: minigzip.o $(IMPLIB) - $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) - $(STRIP) $@ - -example.o: test/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/example.c - -minigzip.o: test/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c - -zlibrc.o: win32/zlib1.rc - $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc - -.PHONY: install uninstall clean - -install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) - @if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \ - echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \ - exit 1; \ - fi - -@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)' - -@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig - -if [ "$(SHARED_MODE)" = "1" ]; then \ - mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \ - $(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \ - $(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \ - fi - -$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)' - -$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)' - -$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)' - sed \ - -e 's|@prefix@|${prefix}|g' \ - -e 's|@exec_prefix@|${exec_prefix}|g' \ - -e 's|@libdir@|$(LIBRARY_PATH)|g' \ - -e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \ - -e 's|@includedir@|$(INCLUDE_PATH)|g' \ - -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \ - zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc - -uninstall: - -if [ "$(SHARED_MODE)" = "1" ]; then \ - $(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \ - $(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \ - fi - -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h - -$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h - -$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB) - -clean: - -$(RM) $(STATICLIB) - -$(RM) $(SHAREDLIB) - -$(RM) $(IMPLIB) - -$(RM) *.o - -$(RM) *.exe - -$(RM) foo.gz - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: crc32.h zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -gzclose.o: zlib.h zconf.h gzguts.h -gzlib.o: zlib.h zconf.h gzguts.h -gzread.o: zlib.h zconf.h gzguts.h -gzwrite.o: zlib.h zconf.h gzguts.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h diff --git a/third_party/zlib/win32/Makefile.msc b/third_party/zlib/win32/Makefile.msc deleted file mode 100644 index 9c65153..0000000 --- a/third_party/zlib/win32/Makefile.msc +++ /dev/null @@ -1,159 +0,0 @@ -# Makefile for zlib using Microsoft (Visual) C -# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler -# -# Usage: -# nmake -f win32/Makefile.msc (standard build) -# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) - -# The toplevel directory of the source tree. -# -TOP = . - -# optional build flags -LOC = - -# variables -STATICLIB = zlib.lib -SHAREDLIB = zlib1.dll -IMPLIB = zdll.lib - -CC = cl -AS = ml -LD = link -AR = lib -RC = rc -CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) -WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -ASFLAGS = -coff -Zi $(LOC) -LDFLAGS = -nologo -debug -incremental:no -opt:ref -ARFLAGS = -nologo -RCFLAGS = /dWIN32 /r - -OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ - gzwrite.obj infback.obj inflate.obj inftrees.obj inffast.obj trees.obj uncompr.obj zutil.obj -OBJA = - - -# targets -all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \ - example.exe minigzip.exe example_d.exe minigzip_d.exe - -$(STATICLIB): $(OBJS) $(OBJA) - $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA) - -$(IMPLIB): $(SHAREDLIB) - -$(SHAREDLIB): $(TOP)/win32/zlib.def $(OBJS) $(OBJA) zlib1.res - $(LD) $(LDFLAGS) -def:$(TOP)/win32/zlib.def -dll -implib:$(IMPLIB) \ - -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;2 - -example.exe: example.obj $(STATICLIB) - $(LD) $(LDFLAGS) example.obj $(STATICLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -minigzip.exe: minigzip.obj $(STATICLIB) - $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -example_d.exe: example.obj $(IMPLIB) - $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -minigzip_d.exe: minigzip.obj $(IMPLIB) - $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) - if exist $@.manifest \ - mt -nologo -manifest $@.manifest -outputresource:$@;1 - -{$(TOP)}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/test}.c.obj: - $(CC) -c -I$(TOP) $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/contrib/masmx64}.c.obj: - $(CC) -c $(WFLAGS) $(CFLAGS) $< - -{$(TOP)/contrib/masmx64}.asm.obj: - $(AS) -c $(ASFLAGS) $< - -{$(TOP)/contrib/masmx86}.asm.obj: - $(AS) -c $(ASFLAGS) $< - -adler32.obj: $(TOP)/adler32.c $(TOP)/zlib.h $(TOP)/zconf.h - -compress.obj: $(TOP)/compress.c $(TOP)/zlib.h $(TOP)/zconf.h - -crc32.obj: $(TOP)/crc32.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/crc32.h - -deflate.obj: $(TOP)/deflate.c $(TOP)/deflate.h $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - -gzclose.obj: $(TOP)/gzclose.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzlib.obj: $(TOP)/gzlib.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzread.obj: $(TOP)/gzread.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -gzwrite.obj: $(TOP)/gzwrite.c $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/gzguts.h - -infback.obj: $(TOP)/infback.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h $(TOP)/inffixed.h - -inffast.obj: $(TOP)/inffast.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h - -inflate.obj: $(TOP)/inflate.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h $(TOP)/inflate.h \ - $(TOP)/inffast.h $(TOP)/inffixed.h - -inftrees.obj: $(TOP)/inftrees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/inftrees.h - -trees.obj: $(TOP)/trees.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h $(TOP)/deflate.h $(TOP)/trees.h - -uncompr.obj: $(TOP)/uncompr.c $(TOP)/zlib.h $(TOP)/zconf.h - -zutil.obj: $(TOP)/zutil.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h - -gvmat64.obj: $(TOP)/contrib\masmx64\gvmat64.asm - -inffasx64.obj: $(TOP)/contrib\masmx64\inffasx64.asm - -inffas8664.obj: $(TOP)/contrib\masmx64\inffas8664.c $(TOP)/zutil.h $(TOP)/zlib.h $(TOP)/zconf.h \ - $(TOP)/inftrees.h $(TOP)/inflate.h $(TOP)/inffast.h - -inffas32.obj: $(TOP)/contrib\masmx86\inffas32.asm - -match686.obj: $(TOP)/contrib\masmx86\match686.asm - -example.obj: $(TOP)/test/example.c $(TOP)/zlib.h $(TOP)/zconf.h - -minigzip.obj: $(TOP)/test/minigzip.c $(TOP)/zlib.h $(TOP)/zconf.h - -zlib1.res: $(TOP)/win32/zlib1.rc - $(RC) $(RCFLAGS) /fo$@ $(TOP)/win32/zlib1.rc - -# testing -test: example.exe minigzip.exe - example - echo hello world | minigzip | minigzip -d - -testdll: example_d.exe minigzip_d.exe - example_d - echo hello world | minigzip_d | minigzip_d -d - - -# cleanup -clean: - -del $(STATICLIB) - -del $(SHAREDLIB) - -del $(IMPLIB) - -del *.obj - -del *.res - -del *.exp - -del *.exe - -del *.pdb - -del *.manifest - -del foo.gz diff --git a/third_party/zlib/win32/README-WIN32.txt b/third_party/zlib/win32/README-WIN32.txt deleted file mode 100644 index 14e6398..0000000 --- a/third_party/zlib/win32/README-WIN32.txt +++ /dev/null @@ -1,103 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.3.1 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -and rfc1952.txt (gzip format). - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled -examples are distributed in this package, example and minigzip. The example_d -and minigzip_d flavors validate that the zlib1.dll file is working correctly. - -Questions about zlib should be sent to . The zlib home page -is http://zlib.net/ . Before reporting a problem, please check this site to -verify that you have the latest version of zlib; otherwise get the latest -version and check whether the problem still exists or not. - -PLEASE read DLL_FAQ.txt, and the zlib FAQ http://zlib.net/zlib_faq.html before -asking for help. - - -Manifest: - -The package zlib-1.3.1-win32-x86.zip will contain the following files: - - README-WIN32.txt This document - ChangeLog Changes since previous zlib packages - DLL_FAQ.txt Frequently asked questions about zlib1.dll - zlib.3.pdf Documentation of this library in Adobe Acrobat format - - example.exe A statically-bound example (using zlib.lib, not the dll) - example.pdb Symbolic information for debugging example.exe - - example_d.exe A zlib1.dll bound example (using zdll.lib) - example_d.pdb Symbolic information for debugging example_d.exe - - minigzip.exe A statically-bound test program (using zlib.lib, not the dll) - minigzip.pdb Symbolic information for debugging minigzip.exe - - minigzip_d.exe A zlib1.dll bound test program (using zdll.lib) - minigzip_d.pdb Symbolic information for debugging minigzip_d.exe - - zlib.h Install these files into the compilers' INCLUDE path to - zconf.h compile programs which use zlib.lib or zdll.lib - - zdll.lib Install these files into the compilers' LIB path if linking - zdll.exp a compiled program to the zlib1.dll binary - - zlib.lib Install these files into the compilers' LIB path to link zlib - zlib.pdb into compiled programs, without zlib1.dll runtime dependency - (zlib.pdb provides debugging info to the compile time linker) - - zlib1.dll Install this binary shared library into the system PATH, or - the program's runtime directory (where the .exe resides) - zlib1.pdb Install in the same directory as zlib1.dll, in order to debug - an application crash using WinDbg or similar tools. - -All .pdb files above are entirely optional, but are very useful to a developer -attempting to diagnose program misbehavior or a crash. Many additional -important files for developers can be found in the zlib127.zip source package -available from http://zlib.net/ - review that package's README file for details. - - -Acknowledgments: - -The deflate format used by zlib was defined by Phil Katz. The deflate and -zlib specifications were written by L. Peter Deutsch. Thanks to all the -people who reported problems and suggested various improvements in zlib; they -are too numerous to cite here. - - -Copyright notice: - - (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. diff --git a/third_party/zlib/win32/VisualC.txt b/third_party/zlib/win32/VisualC.txt deleted file mode 100644 index 1005b21..0000000 --- a/third_party/zlib/win32/VisualC.txt +++ /dev/null @@ -1,3 +0,0 @@ - -To build zlib using the Microsoft Visual C++ environment, -use the appropriate project from the contrib/vstudio/ directory. diff --git a/third_party/zlib/win32/zlib.def b/third_party/zlib/win32/zlib.def deleted file mode 100644 index 666bc6f..0000000 --- a/third_party/zlib/win32/zlib.def +++ /dev/null @@ -1,97 +0,0 @@ -; zlib data compression library -EXPORTS -; basic functions - zlibVersion - deflate - deflateEnd - inflate - inflateEnd -; advanced functions - deflateSetDictionary - deflateGetDictionary - deflateCopy - deflateReset - deflateParams - deflateTune - deflateBound - deflatePending - deflatePrime - deflateSetHeader - inflateSetDictionary - inflateGetDictionary - inflateSync - inflateCopy - inflateReset - inflateReset2 - inflatePrime - inflateMark - inflateGetHeader - inflateBack - inflateBackEnd - zlibCompileFlags -; utility functions - compress - compress2 - compressBound - uncompress - uncompress2 - gzopen - gzdopen - gzbuffer - gzsetparams - gzread - gzfread - gzwrite - gzfwrite - gzprintf - gzvprintf - gzputs - gzgets - gzputc - gzgetc - gzungetc - gzflush - gzseek - gzrewind - gztell - gzoffset - gzeof - gzdirect - gzclose - gzclose_r - gzclose_w - gzerror - gzclearerr -; large file functions - gzopen64 - gzseek64 - gztell64 - gzoffset64 - adler32_combine64 - crc32_combine64 - crc32_combine_gen64 -; checksum functions - adler32 - adler32_z - crc32 - crc32_z - adler32_combine - crc32_combine - crc32_combine_gen - crc32_combine_op -; various hacks, don't look :) - deflateInit_ - deflateInit2_ - inflateInit_ - inflateInit2_ - inflateBackInit_ - gzgetc_ - zError - inflateSyncPoint - get_crc_table - inflateUndermine - inflateValidate - inflateCodesUsed - inflateResetKeep - deflateResetKeep - gzopen_w diff --git a/third_party/zlib/win32/zlib1.rc b/third_party/zlib/win32/zlib1.rc deleted file mode 100644 index ceb4ee5..0000000 --- a/third_party/zlib/win32/zlib1.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "../zlib.h" - -#ifdef GCC_WINDRES -VS_VERSION_INFO VERSIONINFO -#else -VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE -#endif - FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 - PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS 1 -#else - FILEFLAGS 0 -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - BEGIN - VALUE "FileDescription", "zlib data compression library\0" - VALUE "FileVersion", ZLIB_VERSION "\0" - VALUE "InternalName", "zlib1.dll\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - VALUE "OriginalFilename", "zlib1.dll\0" - VALUE "ProductName", "zlib\0" - VALUE "ProductVersion", ZLIB_VERSION "\0" - VALUE "Comments", "For more information visit http://www.zlib.net/\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/third_party/zlib/zconf.h.cmakein b/third_party/zlib/zconf.h.cmakein deleted file mode 100644 index 0abe3bc..0000000 --- a/third_party/zlib/zconf.h.cmakein +++ /dev/null @@ -1,545 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -#cmakedefine Z_PREFIX -#cmakedefine Z_HAVE_UNISTD_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# ifdef __WATCOMC__ -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_HAVE_UNISTD_H -# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/third_party/zlib/zconf.h.in b/third_party/zlib/zconf.h.in deleted file mode 100644 index 62adc8d..0000000 --- a/third_party/zlib/zconf.h.in +++ /dev/null @@ -1,543 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# ifdef __WATCOMC__ -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_HAVE_UNISTD_H -# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/third_party/zlib/zconf.h.included b/third_party/zlib/zconf.h.included deleted file mode 100644 index 62adc8d..0000000 --- a/third_party/zlib/zconf.h.included +++ /dev/null @@ -1,543 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# ifdef __WATCOMC__ -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_HAVE_UNISTD_H -# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/third_party/zlib/zlib.3 b/third_party/zlib/zlib.3 deleted file mode 100644 index c716020..0000000 --- a/third_party/zlib/zlib.3 +++ /dev/null @@ -1,149 +0,0 @@ -.TH ZLIB 3 "22 Jan 2024" -.SH NAME -zlib \- compression/decompression library -.SH SYNOPSIS -[see -.I zlib.h -for full description] -.SH DESCRIPTION -The -.I zlib -library is a general purpose data compression library. -The code is thread safe, assuming that the standard library functions -used are thread safe, such as memory allocation routines. -It provides in-memory compression and decompression functions, -including integrity checks of the uncompressed data. -This version of the library supports only one compression method (deflation) -but other algorithms may be added later -with the same stream interface. -.LP -Compression can be done in a single step if the buffers are large enough -or can be done by repeated calls of the compression function. -In the latter case, -the application must provide more input and/or consume the output -(providing more output space) before each call. -.LP -The library also supports reading and writing files in -.IR gzip (1) -(.gz) format -with an interface similar to that of stdio. -.LP -The library does not install any signal handler. -The decoder checks the consistency of the compressed data, -so the library should never crash even in the case of corrupted input. -.LP -All functions of the compression library are documented in the file -.IR zlib.h . -The distribution source includes examples of use of the library -in the files -.I test/example.c -and -.IR test/minigzip.c, -as well as other examples in the -.IR examples/ -directory. -.LP -Changes to this version are documented in the file -.I ChangeLog -that accompanies the source. -.LP -.I zlib -is built in to many languages and operating systems, including but not limited to -Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. -.LP -An experimental package to read and write files in the .zip format, -written on top of -.I zlib -by Gilles Vollant (info@winimage.com), -is available at: -.IP -http://www.winimage.com/zLibDll/minizip.html -and also in the -.I contrib/minizip -directory of the main -.I zlib -source distribution. -.SH "SEE ALSO" -The -.I zlib -web site can be found at: -.IP -http://zlib.net/ -.LP -The data format used by the -.I zlib -library is described by RFC -(Request for Comments) 1950 to 1952 in the files: -.IP -http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) -.br -http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) -.br -http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) -.LP -Mark Nelson wrote an article about -.I zlib -for the Jan. 1997 issue of Dr. Dobb's Journal; -a copy of the article is available at: -.IP -http://marknelson.us/1997/01/01/zlib-engine/ -.SH "REPORTING PROBLEMS" -Before reporting a problem, -please check the -.I zlib -web site to verify that you have the latest version of -.IR zlib ; -otherwise, -obtain the latest version and see if the problem still exists. -Please read the -.I zlib -FAQ at: -.IP -http://zlib.net/zlib_faq.html -.LP -before asking for help. -Send questions and/or comments to zlib@gzip.org, -or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). -.SH AUTHORS AND LICENSE -Version 1.3.1 -.LP -Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler -.LP -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -.LP -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -.LP -.nr step 1 1 -.IP \n[step]. 3 -The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -.IP \n+[step]. -Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -.IP \n+[step]. -This notice may not be removed or altered from any source distribution. -.LP -Jean-loup Gailly Mark Adler -.br -jloup@gzip.org madler@alumni.caltech.edu -.LP -The deflate format used by -.I zlib -was defined by Phil Katz. -The deflate and -.I zlib -specifications were written by L. Peter Deutsch. -Thanks to all the people who reported problems and suggested various -improvements in -.IR zlib ; -who are too numerous to cite here. -.LP -UNIX manual page by R. P. C. Rodgers, -U.S. National Library of Medicine (rodgers@nlm.nih.gov). -.\" end of man page diff --git a/third_party/zlib/zlib.3.pdf b/third_party/zlib/zlib.3.pdf deleted file mode 100644 index b224532bdd8eed1939b7dd04a7a0dd46be649c00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25523 zcmcG01yoh*_Af0dQi8My(rh{eq`SMDO?P*9cejL;N=i4<-6JNhxU_1vvpwOI{v%K4C&? zTYdpW5k3J4roIN5H!=V1M&m)EcJo!-^1J5*#LFS;hoarRpxBwx>4Mx zl=|m<$gTZa@#+CPp}W&0bE?7d^19}E+*ZOwFyPpjeWxtMnK7RITeV<>Br|IXMK)({WgquWOfxbG8iHLJ`Y2SUeovx1a5$&c!Z_V>gaYC3?o&9`6pVy~58Ml#nxevW>}MPN-U>HI>{&CS{Q zW@UZgY-J$uLaM%Y`u$2C=3ECkL8R78I;ogphO8yJCB7s&Z#{uN`s(O-v+|g|8w0Jc zF{R}+dQyID<8O}{q@Xy^9SobW7{aVzxoxNEq}eS<#6J=5O`GE+mnx^0uCevaR)5Es zfXOt#Ybt~sY$StH+^Yqzkk)J5D>sQ}qTE5{H3wh(YSURRh@WbC;}*&}ExB((HPl-^ z$l&75Wd9u_-i*zB^O=v3hgtf0o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^NU|unP2B8_iOwB07Rp0@&RB0S&)h6Cm$$4T6(h_Qbt;K zvtJY%E&IcoQ^adler to the Adler-32 checksum of all input read - so far (that is, total_in bytes). If a gzip stream is being generated, then - strm->adler will be the CRC-32 checksum of the input read so far. (See - deflateInit2 below.) - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is - considered binary. This field is only for information purposes and does not - affect the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL or the state was inadvertently written over - by the application), or Z_BUF_ERROR if no progress is possible (for example - avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and - deflate() can be called again with more input and more output space to - continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit(z_streamp strm); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. In the current version of inflate, the provided input is not - read or consumed. The allocation of a sliding window will be deferred to - the first call of inflate (if the decompression does not complete on the - first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. total_in, total_out, adler, and - msg are initialized. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression. - Actual decompression will be done by inflate(). So next_in, and avail_in, - next_out, and avail_out are unused and unchanged. The current - implementation of inflateInit() does not process any header information -- - that is deferred until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), then next_in and avail_in are updated - accordingly, and processing will resume at this point for the next call of - inflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. If the - caller of inflate() does not provide both available input and available - output space, it is possible that there will be no progress made. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - To assist in this, on return inflate() always sets strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed Adler-32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained unless inflateGetHeader() is used. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - produced so far. The CRC-32 is checked against the gzip trailer, as is the - uncompressed length, modulo 2^32. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value, in which case strm->msg points to a string with a more specific - error), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL, or the state was inadvertently written over - by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR - if no progress was possible or if there was not enough room in the output - buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is to be attempted. -*/ - - -ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state - was inconsistent. -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy); - - This is another version of deflateInit with more compression options. The - fields zalloc, zfree and opaque must be initialized before by the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - For the current implementation of deflate(), a windowBits value of 8 (a - window size of 256 bytes) is not supported. As a result, a request for 8 - will result in 9 (a 512-byte window). In that case, providing 8 to - inflateInit2() will result in an error when the zlib header with 9 is - checked against the initialization of inflate(). The remedy is to not use 8 - with deflateInit2() with this initialization, or at least in that case use 9 - with inflateInit2(). - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute a check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to the appropriate value, - if the operating system was determined at compile time. If a gzip stream is - being written, strm->adler is a CRC-32 instead of an Adler-32. - - For raw deflate or gzip encoding, a request for a 256-byte window is - rejected as invalid, since only the zlib header provides a means of - transmitting the window size to the decompressor. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, - const Bytef *dictionary, - uInt dictLength); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the Adler-32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler-32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - Adler-32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, - Bytef *dictionary, - uInt *dictLength); -/* - Returns the sliding dictionary being maintained by deflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If deflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similarly, if dictLength is Z_NULL, then it is not set. - - deflateGetDictionary() may return a length less than the window size, even - when more than the window size in input has been provided. It may return up - to 258 bytes less in that case, due to how zlib's implementation of deflate - manages the sliding window and lookahead for matches, where matches can be - up to 258 bytes long. If the application needs the last window-size bytes of - input, then that would need to be saved by the application outside of zlib. - - deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, - z_streamp source); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset(z_streamp strm); -/* - This function is equivalent to deflateEnd followed by deflateInit, but - does not free and reallocate the internal compression state. The stream - will leave the compression level and any other attributes that may have been - set unchanged. total_in, total_out, adler, and msg are initialized. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams(z_streamp strm, - int level, - int strategy); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2(). This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression approach (which is a function of the level) or the - strategy is changed, and if there have been any deflate() calls since the - state was initialized or reset, then the input available so far is - compressed with the old level and strategy using deflate(strm, Z_BLOCK). - There are three approaches for the compression levels 0, 1..3, and 4..9 - respectively. The new level and strategy will take effect at the next call - of deflate(). - - If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does - not have enough output space to complete, then the parameter change will not - take effect. In this case, deflateParams() can be called again with the - same parameters and more output space to try again. - - In order to assure a change in the parameters on the first try, the - deflate stream should be flushed using deflate() with Z_BLOCK or other flush - request until strm.avail_out is not zero, before calling deflateParams(). - Then no more input data should be provided before the deflateParams() call. - If this is done, the old level and strategy will be applied to the data - compressed before deflateParams(), and the new level and strategy will be - applied to the data compressed after deflateParams(). - - deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream - state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if - there was not enough output space to complete the compression of the - available input data before a change in the strategy or approach. Note that - in the case of a Z_BUF_ERROR, the parameters are not changed. A return - value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be - retried with more output space. -*/ - -ZEXTERN int ZEXPORT deflateTune(z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, - uLong sourceLen); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending(z_streamp strm, - unsigned *pending, - int *bits); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, - int bits, - int value); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, - gz_headerp head); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to the current operating system, with no - extra, name, or comment fields. The gzip header is returned to the default - state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, - int windowBits); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an Adler-32 or a CRC-32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see - below), inflate() will *not* automatically decode concatenated gzip members. - inflate() will return Z_STREAM_END at the end of the gzip member. The state - would need to be reset to continue decoding a subsequent gzip member. This - *must* be done if there is more data after a gzip member, in order for the - decompression to be compliant with the gzip standard (RFC 1952). - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, - const Bytef *dictionary, - uInt dictLength); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler-32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler-32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, - Bytef *dictionary, - uInt *dictLength); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similarly, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync(z_streamp strm); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current value of total_in - which indicates where valid compressed data was found. In the error case, - the application may repeatedly call inflateSync, providing more input each - time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, - z_streamp source); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset(z_streamp strm); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - total_in, total_out, adler, and msg are initialized. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, - int windowBits); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. If the window size is changed, then the - memory allocated for the window is freed, and the window will be reallocated - by inflate() if needed. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, - int bits, - int value); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark(z_streamp strm); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above, or -65536 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, - gz_headerp head); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, - unsigned char FAR *window); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func)(void FAR *, - z_const unsigned char FAR * FAR *); -typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); - -ZEXTERN int ZEXPORT inflateBack(z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the default - behavior of inflate(), which expects a zlib header and trailer around the - deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero -- buf is ignored in that - case -- and inflateBack() will return a buffer error. inflateBack() will - call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. - out() should return zero on success, or non-zero on failure. If out() - returns non-zero, inflateBack() will return with an error. Neither in() nor - out() are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags(void); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: ZLIB_DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. compress() is equivalent to compress2() with a level - parameter of Z_DEFAULT_COMPRESSION. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed data. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - -ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen); -/* - Same as uncompress, except that sourceLen is a pointer, where the - length of the source is *sourceLen. On return, *sourceLen is the number of - source bytes consumed. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); - - Open the gzip (.gz) file at path for reading and decompressing, or - compressing and writing. The mode parameter is as in fopen ("rb" or "wb") - but can also include a compression level ("wb9") or a strategy: 'f' for - filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", - 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression - as in "wb9F". (See the description of deflateInit2 for more information - about the strategy parameter.) 'T' will request transparent writing or - appending with no compression and not using the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); -/* - Associate a gzFile with the file descriptor fd. File descriptors are - obtained from calls like open, dup, creat, pipe or fileno (if the file has - been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); -/* - Set the internal buffer size used by this library's functions for file to - size. The default buffer size is 8192 bytes. This function must be called - after gzopen() or gzdopen(), and before any other calls that read or write - the file. The buffer memory allocation is always deferred to the first read - or write. Three times that size in buffer space is allocated. A larger - buffer size of, for example, 64K or 128K bytes will noticeably increase the - speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); -/* - Dynamically update the compression level and strategy for file. See the - description of deflateInit2 for the meaning of these parameters. Previously - provided data is flushed before applying the parameter changes. - - gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not - opened for writing, Z_ERRNO if there is an error writing the flushed data, - or Z_MEM_ERROR if there is a memory allocation error. -*/ - -ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); -/* - Read and decompress up to len uncompressed bytes from file into buf. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. If len is too large to fit in an int, - then nothing is read, -1 is returned, and the error state is set to - Z_STREAM_ERROR. -*/ - -ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, - gzFile file); -/* - Read and decompress up to nitems items of size size from file into buf, - otherwise operating as gzread() does. This duplicates the interface of - stdio's fread(), with size_t request and return types. If the library - defines size_t, then z_size_t is identical to size_t. If not, then z_size_t - is an unsigned integer type that can contain a pointer. - - gzfread() returns the number of full items read of size size, or zero if - the end of the file was reached and a full item could not be read, or if - there was an error. gzerror() must be consulted if zero is returned in - order to determine if there was an error. If the multiplication of size and - nitems overflows, i.e. the product does not fit in a z_size_t, then nothing - is read, zero is returned, and the error state is set to Z_STREAM_ERROR. - - In the event that the end of file is reached and only a partial item is - available at the end, i.e. the remaining uncompressed data length is not a - multiple of size, then the final partial item is nevertheless read into buf - and the end-of-file flag is set. The length of the partial item read is not - provided, but could be inferred from the result of gztell(). This behavior - is the same as the behavior of fread() implementations in common libraries, - but it prevents the direct use of gzfread() to read a concurrently written - file, resetting and retrying on end-of-file, when size is not 1. -*/ - -ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); -/* - Compress and write the len uncompressed bytes at buf to file. gzwrite - returns the number of uncompressed bytes written or 0 in case of error. -*/ - -ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, - z_size_t nitems, gzFile file); -/* - Compress and write nitems items of size size from buf to file, duplicating - the interface of stdio's fwrite(), with size_t request and return types. If - the library defines size_t, then z_size_t is identical to size_t. If not, - then z_size_t is an unsigned integer type that can contain a pointer. - - gzfwrite() returns the number of full items written of size size, or zero - if there was an error. If the multiplication of size and nitems overflows, - i.e. the product does not fit in a z_size_t, then nothing is written, zero - is returned, and the error state is set to Z_STREAM_ERROR. -*/ - -ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); -/* - Convert, format, compress, and write the arguments (...) to file under - control of the string format, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or a negative zlib error code in case - of error. The number of uncompressed bytes written is limited to 8191, or - one less than the buffer size given to gzbuffer(). The caller should assure - that this limit is not exceeded. If it is exceeded, then gzprintf() will - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf(), - because the secure snprintf() or vsnprintf() functions were not available. - This can be determined using zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); -/* - Compress and write the given null-terminated string s to file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); -/* - Read and decompress bytes from file into buf, until len-1 characters are - read, or until a newline character is read and transferred to buf, or an - end-of-file condition is encountered. If any characters are read or if len - is one, the string is terminated with a null character. If no characters - are read due to an end-of-file or len is less than one, then the buffer is - left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc(gzFile file, int c); -/* - Compress and write c, converted to an unsigned char, into file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc(gzFile file); -/* - Read and decompress one byte from file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); -/* - Push c back onto the stream for file to be read as the first character on - the next read. At least one character of push-back is always allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); -/* - Flush all pending output to file. The parameter flush is as in the - deflate() function. The return value is the zlib error number (see function - gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatenated gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, - z_off_t offset, int whence); - - Set the starting position to offset relative to whence for the next gzread - or gzwrite on file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind(gzFile file); -/* - Rewind file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell(gzFile file); - - Return the starting position for the next gzread or gzwrite on file. - This position represents a number of bytes in the uncompressed data stream, - and is zero when starting, even if appending or reading a gzip stream from - the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); - - Return the current compressed (actual) read or write offset of file. This - offset includes the count of bytes that precede the gzip stream, for example - when appending or when using gzdopen() for reading. When reading, the - offset does not include as yet unused buffered input. This information can - be used for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof(gzFile file); -/* - Return true (1) if the end-of-file indicator for file has been set while - reading, false (0) otherwise. Note that the end-of-file indicator is set - only if the read tried to go past the end of the input, but came up short. - Therefore, just like feof(), gzeof() may return false even if there is no - more data to read, in the event that the last read request was for the exact - number of bytes remaining in the input file. This will happen if the input - file size is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect(gzFile file); -/* - Return true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose(gzFile file); -/* - Flush all pending output for file, if necessary, close file and - deallocate the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r(gzFile file); -ZEXTERN int ZEXPORT gzclose_w(gzFile file); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); -/* - Return the error message for the last error which occurred on file. - errnum is set to zlib error number. If an error occurred in the file system - and not in the compression library, errnum is set to Z_ERRNO and the - application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr(gzFile file); -/* - Clear the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. An Adler-32 value is in the range of a 32-bit - unsigned integer. If buf is Z_NULL, this function returns the required - initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, - z_size_t len); -/* - Same as adler32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, - z_off_t len2); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. - If buf is Z_NULL, this function returns the required initial value for the - crc. Pre- and post-conditioning (one's complement) is performed within this - function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, - z_size_t len); -/* - Same as crc32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. len2 must be non-negative. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); - - Return the operator corresponding to length len2, to be used with - crc32_combine_op(). len2 must be non-negative. -*/ - -ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); -/* - Give the same result as crc32_combine(), using op in place of len2. op is - is generated from len2 by crc32_combine_gen(). This will be faster than - crc32_combine() if the generated op is used more than once. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, - const char *version, int stream_size); -ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, - const char *version, int stream_size); -ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size); -ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, - const char *version, int stream_size); -ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size); -#ifdef Z_PREFIX_SET -# define z_deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define z_inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#else -# define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#endif - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); - ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); - ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); - ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); - ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); - ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); - ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# define z_crc32_combine_gen z_crc32_combine_gen64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# define crc32_combine_gen crc32_combine_gen64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); - ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); - ZEXTERN z_off_t ZEXPORT gztell64(gzFile); - ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); - ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); - ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); - ZEXTERN z_off_t ZEXPORT gztell(gzFile); - ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); - ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); - -#endif /* !Z_SOLO */ - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError(int); -ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); -ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); -ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); -ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); -ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, - const char *mode); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, - const char *format, - va_list va); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ - diff --git a/third_party/zlib/zlib.map b/third_party/zlib/zlib.map deleted file mode 100644 index 31544f2..0000000 --- a/third_party/zlib/zlib.map +++ /dev/null @@ -1,100 +0,0 @@ -ZLIB_1.2.0 { - global: - compressBound; - deflateBound; - inflateBack; - inflateBackEnd; - inflateBackInit_; - inflateCopy; - local: - deflate_copyright; - inflate_copyright; - inflate_fast; - inflate_table; - zcalloc; - zcfree; - z_errmsg; - gz_error; - gz_intmax; - _*; -}; - -ZLIB_1.2.0.2 { - gzclearerr; - gzungetc; - zlibCompileFlags; -} ZLIB_1.2.0; - -ZLIB_1.2.0.8 { - deflatePrime; -} ZLIB_1.2.0.2; - -ZLIB_1.2.2 { - adler32_combine; - crc32_combine; - deflateSetHeader; - inflateGetHeader; -} ZLIB_1.2.0.8; - -ZLIB_1.2.2.3 { - deflateTune; - gzdirect; -} ZLIB_1.2.2; - -ZLIB_1.2.2.4 { - inflatePrime; -} ZLIB_1.2.2.3; - -ZLIB_1.2.3.3 { - adler32_combine64; - crc32_combine64; - gzopen64; - gzseek64; - gztell64; - inflateUndermine; -} ZLIB_1.2.2.4; - -ZLIB_1.2.3.4 { - inflateReset2; - inflateMark; -} ZLIB_1.2.3.3; - -ZLIB_1.2.3.5 { - gzbuffer; - gzoffset; - gzoffset64; - gzclose_r; - gzclose_w; -} ZLIB_1.2.3.4; - -ZLIB_1.2.5.1 { - deflatePending; -} ZLIB_1.2.3.5; - -ZLIB_1.2.5.2 { - deflateResetKeep; - gzgetc_; - inflateResetKeep; -} ZLIB_1.2.5.1; - -ZLIB_1.2.7.1 { - inflateGetDictionary; - gzvprintf; -} ZLIB_1.2.5.2; - -ZLIB_1.2.9 { - inflateCodesUsed; - inflateValidate; - uncompress2; - gzfread; - gzfwrite; - deflateGetDictionary; - adler32_z; - crc32_z; -} ZLIB_1.2.7.1; - -ZLIB_1.2.12 { - crc32_combine_gen; - crc32_combine_gen64; - crc32_combine_op; -} ZLIB_1.2.9; diff --git a/third_party/zlib/zlib.pc.cmakein b/third_party/zlib/zlib.pc.cmakein deleted file mode 100644 index a5e6429..0000000 --- a/third_party/zlib/zlib.pc.cmakein +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@INSTALL_LIB_DIR@ -sharedlibdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ - -Name: zlib -Description: zlib compression library -Version: @VERSION@ - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/third_party/zlib/zlib.pc.in b/third_party/zlib/zlib.pc.in deleted file mode 100644 index 7e5acf9..0000000 --- a/third_party/zlib/zlib.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -sharedlibdir=@sharedlibdir@ -includedir=@includedir@ - -Name: zlib -Description: zlib compression library -Version: @VERSION@ - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -lz -Cflags: -I${includedir} diff --git a/third_party/zlib/zutil.c b/third_party/zlib/zutil.c deleted file mode 100644 index b1c5d2d..0000000 --- a/third_party/zlib/zutil.c +++ /dev/null @@ -1,299 +0,0 @@ -/* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2017 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" -#ifndef Z_SOLO -# include "gzguts.h" -#endif - -z_const char * const z_errmsg[10] = { - (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ - (z_const char *)"stream end", /* Z_STREAM_END 1 */ - (z_const char *)"", /* Z_OK 0 */ - (z_const char *)"file error", /* Z_ERRNO (-1) */ - (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ - (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ - (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ - (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ - (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ - (z_const char *)"" -}; - - -const char * ZEXPORT zlibVersion(void) { - return ZLIB_VERSION; -} - -uLong ZEXPORT zlibCompileFlags(void) { - uLong flags; - - flags = 0; - switch ((int)(sizeof(uInt))) { - case 2: break; - case 4: flags += 1; break; - case 8: flags += 2; break; - default: flags += 3; - } - switch ((int)(sizeof(uLong))) { - case 2: break; - case 4: flags += 1 << 2; break; - case 8: flags += 2 << 2; break; - default: flags += 3 << 2; - } - switch ((int)(sizeof(voidpf))) { - case 2: break; - case 4: flags += 1 << 4; break; - case 8: flags += 2 << 4; break; - default: flags += 3 << 4; - } - switch ((int)(sizeof(z_off_t))) { - case 2: break; - case 4: flags += 1 << 6; break; - case 8: flags += 2 << 6; break; - default: flags += 3 << 6; - } -#ifdef ZLIB_DEBUG - flags += 1 << 8; -#endif - /* -#if defined(ASMV) || defined(ASMINF) - flags += 1 << 9; -#endif - */ -#ifdef ZLIB_WINAPI - flags += 1 << 10; -#endif -#ifdef BUILDFIXED - flags += 1 << 12; -#endif -#ifdef DYNAMIC_CRC_TABLE - flags += 1 << 13; -#endif -#ifdef NO_GZCOMPRESS - flags += 1L << 16; -#endif -#ifdef NO_GZIP - flags += 1L << 17; -#endif -#ifdef PKZIP_BUG_WORKAROUND - flags += 1L << 20; -#endif -#ifdef FASTEST - flags += 1L << 21; -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifdef NO_vsnprintf - flags += 1L << 25; -# ifdef HAS_vsprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_vsnprintf_void - flags += 1L << 26; -# endif -# endif -#else - flags += 1L << 24; -# ifdef NO_snprintf - flags += 1L << 25; -# ifdef HAS_sprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_snprintf_void - flags += 1L << 26; -# endif -# endif -#endif - return flags; -} - -#ifdef ZLIB_DEBUG -#include -# ifndef verbose -# define verbose 0 -# endif -int ZLIB_INTERNAL z_verbose = verbose; - -void ZLIB_INTERNAL z_error(char *m) { - fprintf(stderr, "%s\n", m); - exit(1); -} -#endif - -/* exported to allow conversion of error code to string for compress() and - * uncompress() - */ -const char * ZEXPORT zError(int err) { - return ERR_MSG(err); -} - -#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800 - /* The older Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. - */ - int errno = 0; -#endif - -#ifndef HAVE_MEMCPY - -void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { - if (len == 0) return; - do { - *dest++ = *source++; /* ??? to be unrolled */ - } while (--len != 0); -} - -int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { - uInt j; - - for (j = 0; j < len; j++) { - if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; - } - return 0; -} - -void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { - if (len == 0) return; - do { - *dest++ = 0; /* ??? to be unrolled */ - } while (--len != 0); -} -#endif - -#ifndef Z_SOLO - -#ifdef SYS16BIT - -#ifdef __TURBOC__ -/* Turbo C in 16-bit mode */ - -# define MY_ZCALLOC - -/* Turbo C malloc() does not allow dynamic allocation of 64K bytes - * and farmalloc(64K) returns a pointer with an offset of 8, so we - * must fix the pointer. Warning: the pointer must be put back to its - * original form in order to free it, use zcfree(). - */ - -#define MAX_PTR 10 -/* 10*64K = 640K */ - -local int next_ptr = 0; - -typedef struct ptr_table_s { - voidpf org_ptr; - voidpf new_ptr; -} ptr_table; - -local ptr_table table[MAX_PTR]; -/* This table is used to remember the original form of pointers - * to large buffers (64K). Such pointers are normalized with a zero offset. - * Since MSDOS is not a preemptive multitasking OS, this table is not - * protected from concurrent access. This hack doesn't work anyway on - * a protected system like OS/2. Use Microsoft C instead. - */ - -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { - voidpf buf; - ulg bsize = (ulg)items*size; - - (void)opaque; - - /* If we allocate less than 65520 bytes, we assume that farmalloc - * will return a usable pointer which doesn't have to be normalized. - */ - if (bsize < 65520L) { - buf = farmalloc(bsize); - if (*(ush*)&buf != 0) return buf; - } else { - buf = farmalloc(bsize + 16L); - } - if (buf == NULL || next_ptr >= MAX_PTR) return NULL; - table[next_ptr].org_ptr = buf; - - /* Normalize the pointer to seg:0 */ - *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; - *(ush*)&buf = 0; - table[next_ptr++].new_ptr = buf; - return buf; -} - -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { - int n; - - (void)opaque; - - if (*(ush*)&ptr != 0) { /* object < 64K */ - farfree(ptr); - return; - } - /* Find the original pointer */ - for (n = 0; n < next_ptr; n++) { - if (ptr != table[n].new_ptr) continue; - - farfree(table[n].org_ptr); - while (++n < next_ptr) { - table[n-1] = table[n]; - } - next_ptr--; - return; - } - Assert(0, "zcfree: ptr not found"); -} - -#endif /* __TURBOC__ */ - - -#ifdef M_I86 -/* Microsoft C in 16-bit mode */ - -# define MY_ZCALLOC - -#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) -# define _halloc halloc -# define _hfree hfree -#endif - -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) { - (void)opaque; - return _halloc((long)items, size); -} - -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { - (void)opaque; - _hfree(ptr); -} - -#endif /* M_I86 */ - -#endif /* SYS16BIT */ - - -#ifndef MY_ZCALLOC /* Any system without a special alloc function */ - -#ifndef STDC -extern voidp malloc(uInt size); -extern voidp calloc(uInt items, uInt size); -extern void free(voidpf ptr); -#endif - -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { - (void)opaque; - return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : - (voidpf)calloc(items, size); -} - -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { - (void)opaque; - free(ptr); -} - -#endif /* MY_ZCALLOC */ - -#endif /* !Z_SOLO */ diff --git a/third_party/zlib/zutil.h b/third_party/zlib/zutil.h deleted file mode 100644 index 58fa5b6..0000000 --- a/third_party/zlib/zutil.h +++ /dev/null @@ -1,255 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef ZUTIL_H -#define ZUTIL_H - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include "zlib.h" - -#if defined(STDC) && !defined(Z_SOLO) -# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) -# include -# endif -# include -# include -#endif - -#ifndef local -# define local static -#endif -/* since "static" is used to mean two completely different things in C, we - define "local" for the non-static meaning of "static", for readability - (compile with -Dlocal if your debugger can't find static symbols) */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC) -# include -# if (ULONG_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned long -# elif (ULLONG_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned long long -# elif (UINT_MAX == 0xffffffffffffffff) -# define Z_U8 unsigned -# endif -#endif - -extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) -# define OS_CODE 0x00 -# ifndef Z_SOLO -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 1 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 2 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#ifdef __370__ -# if __TARGET_LIB__ < 0x20000000 -# define OS_CODE 4 -# elif __TARGET_LIB__ < 0x40000000 -# define OS_CODE 11 -# else -# define OS_CODE 8 -# endif -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 5 -#endif - -#ifdef OS2 -# define OS_CODE 6 -# if defined(M_I86) && !defined(Z_SOLO) -# include -# endif -#endif - -#if defined(MACOS) -# define OS_CODE 7 -#endif - -#ifdef __acorn -# define OS_CODE 13 -#endif - -#if defined(WIN32) && !defined(__CYGWIN__) -# define OS_CODE 10 -#endif - -#ifdef _BEOS_ -# define OS_CODE 16 -#endif - -#ifdef __TOS_OS400__ -# define OS_CODE 18 -#endif - -#ifdef __APPLE__ -# define OS_CODE 19 -#endif - -#if defined(__BORLANDC__) && !defined(MSDOS) - #pragma warn -8004 - #pragma warn -8008 - #pragma warn -8066 -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && \ - (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); - ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); -#endif - - /* common defaults */ - -#ifndef OS_CODE -# define OS_CODE 3 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#if defined(pyr) || defined(Z_SOLO) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); - int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len); - void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len); -#endif - -/* Diagnostic functions */ -#ifdef ZLIB_DEBUG -# include - extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error(char *m); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - -#ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, - unsigned size); - void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr); -#endif - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -/* Reverse the bytes in a 32-bit value */ -#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ - (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) - -#endif /* ZUTIL_H */ - diff --git a/third_party/zstd/.buckconfig b/third_party/zstd/.buckconfig deleted file mode 100644 index 483f605..0000000 --- a/third_party/zstd/.buckconfig +++ /dev/null @@ -1,9 +0,0 @@ -[cxx] - cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 - cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith - cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 - cxxflags = -std=c++11 -Wno-deprecated-declarations - gtest_dep = //contrib/pzstd:gtest - -[httpserver] - port = 0 diff --git a/third_party/zstd/.buckversion b/third_party/zstd/.buckversion deleted file mode 100644 index 892fad9..0000000 --- a/third_party/zstd/.buckversion +++ /dev/null @@ -1 +0,0 @@ -c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b diff --git a/third_party/zstd/.cirrus.yml b/third_party/zstd/.cirrus.yml deleted file mode 100644 index 745024b..0000000 --- a/third_party/zstd/.cirrus.yml +++ /dev/null @@ -1,9 +0,0 @@ -task: - name: FreeBSD (make check) - freebsd_instance: - matrix: - image_family: freebsd-14-2 - install_script: pkg install -y gmake coreutils - script: | - MOREFLAGS="-Werror" gmake -j all - gmake check diff --git a/third_party/zstd/.gitattributes b/third_party/zstd/.gitattributes deleted file mode 100644 index 6212bd4..0000000 --- a/third_party/zstd/.gitattributes +++ /dev/null @@ -1,21 +0,0 @@ -# Set the default behavior -* text eol=lf - -# Explicitly declare source files -*.c text eol=lf -*.h text eol=lf - -# Denote files that should not be modified. -*.odt binary -*.png binary - -# Visual Studio -*.sln text eol=crlf -*.vcxproj* text eol=crlf -*.vcproj* text eol=crlf -*.suo binary -*.rc text eol=crlf - -# Windows -*.bat text eol=crlf -*.cmd text eol=crlf diff --git a/third_party/zstd/.github/ISSUE_TEMPLATE/bug_report.md b/third_party/zstd/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 755a46a..0000000 --- a/third_party/zstd/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Downloads data '...' -2. Run '...' with flags '...' -3. Scroll up on the log to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots and charts** -If applicable, add screenshots and charts to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. Mac] - - Version [e.g. 22] - - Compiler [e.g. gcc] - - Flags [e.g. O2] - - Other relevant hardware specs [e.g. Dual-core] - - Build system [e.g. Makefile] - -**Additional context** -Add any other context about the problem here. diff --git a/third_party/zstd/.github/ISSUE_TEMPLATE/feature_request.md b/third_party/zstd/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/third_party/zstd/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/third_party/zstd/.github/dependabot.yml b/third_party/zstd/.github/dependabot.yml deleted file mode 100644 index 5ace460..0000000 --- a/third_party/zstd/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/third_party/zstd/.github/workflows/android-ndk-build.yml b/third_party/zstd/.github/workflows/android-ndk-build.yml deleted file mode 100644 index 175add4..0000000 --- a/third_party/zstd/.github/workflows/android-ndk-build.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Android NDK Build - -on: - pull_request: - branches: [ dev, release, actionsTest ] - push: - branches: [ actionsTest, '*ndk*' ] - -permissions: read-all - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - - name: Set up JDK 17 - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 - with: - java-version: '17' - distribution: 'temurin' - - - name: Setup Android SDK - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2 - - - name: Install Android NDK - run: | - sdkmanager --install "ndk;27.0.12077973" - echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973" >> $GITHUB_ENV - - - name: Build with NDK - run: | - export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH - make CC=aarch64-linux-android21-clang \ - AR=llvm-ar \ - RANLIB=llvm-ranlib \ - STRIP=llvm-strip - diff --git a/third_party/zstd/.github/workflows/commit.yml b/third_party/zstd/.github/workflows/commit.yml deleted file mode 100644 index 6590728..0000000 --- a/third_party/zstd/.github/workflows/commit.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: facebook/zstd/commit -on: - push: - branches: - - dev - pull_request: - branches: - - dev - -permissions: read-all - -jobs: - short-tests-0: - runs-on: ubuntu-latest - services: - docker: - image: fbopensource/zstd-circleci-primary:0.0.1 - options: --entrypoint /bin/bash - steps: - - uses: actions/checkout@v4 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install libcurl4-gnutls-dev - - name: Test - run: | - ./tests/test-license.py - cc -v - CFLAGS="-O0 -Werror -pedantic" make allmost; make clean - make c99build; make clean - make c11build; make clean - make -j regressiontest; make clean - make check; make clean - make cxxtest; make clean - - short-tests-1: - runs-on: ubuntu-latest - services: - docker: - image: fbopensource/zstd-circleci-primary:0.0.1 - options: --entrypoint /bin/bash - steps: - - uses: actions/checkout@v4 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev lib64gcc-13-dev-powerpc-cross - - name: gnu90 build - run: make gnu90build && make clean - - name: gnu99 build - run: make gnu99build && make clean - - name: ppc64 build - run: make ppc64build V=1 && make clean - - name: ppc build - run: make ppcbuild V=1 && make clean - - name: arm build - run: make armbuild V=1 && make clean - - name: aarch64 build - run: make aarch64build V=1 && make clean - - name: test-legacy - run: make -C tests test-legacy V=1 && make clean - - name: test-longmatch - run: make -C tests test-longmatch V=1 && make clean - - name: libzstd-nomt build - run: make -C lib libzstd-nomt V=1 && make clean - - regression-test: - runs-on: ubuntu-latest - services: - docker: - image: fbopensource/zstd-circleci-primary:0.0.1 - options: --entrypoint /bin/bash - env: - CIRCLE_ARTIFACTS: "/tmp/circleci-artifacts" - steps: - - uses: actions/checkout@v4 - - name: restore_cache - uses: actions/cache@v4 - with: - key: regression-cache-{{ checksum "tests/regression/data.c" }}-v0 - path: tests/regression/cache - restore-keys: regression-cache-{{ checksum "tests/regression/data.c" }}-v0 - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install libcurl4-gnutls-dev - - name: Regression Test - run: | - make -C programs zstd - make -C tests/regression test - mkdir -p $CIRCLE_ARTIFACTS - ./tests/regression/test \ - --cache tests/regression/cache \ - --output $CIRCLE_ARTIFACTS/results.csv \ - --zstd programs/zstd - echo "NOTE: The new results.csv is uploaded as an artifact to this job" - echo " If this fails, go to the Artifacts pane in CircleCI, " - echo " download /tmp/circleci-artifacts/results.csv, and if they " - echo " are still good, copy it into the repo and commit it." - echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv" - diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv - - uses: actions/upload-artifact@v4 - with: - path: "/tmp/circleci-artifacts" diff --git a/third_party/zstd/.github/workflows/dev-long-tests.yml b/third_party/zstd/.github/workflows/dev-long-tests.yml deleted file mode 100644 index 899a57b..0000000 --- a/third_party/zstd/.github/workflows/dev-long-tests.yml +++ /dev/null @@ -1,313 +0,0 @@ -name: dev-long-tests -# Tests longer than 10mn - -concurrency: - group: long-${{ github.ref }} - cancel-in-progress: true - -on: - pull_request: - branches: [ dev, release, actionsTest ] - -permissions: read-all - -jobs: - make-all: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make all - run: make all - - # lasts ~24mn - make-test: - runs-on: ubuntu-latest - env: - DEVNULLRIGHTS: 1 - READFROMBLOCKDEVICE: 1 - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make test - run: make test - - # lasts ~26mn - make-test-macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make test on macos - run: make test - - # lasts ~24mn - make-test-32bit: - runs-on: ubuntu-latest - env: - DEVNULLRIGHTS: 1 - READFROMBLOCKDEVICE: 1 - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make test # note: `make -j test success` seems to require a clean state - run: | - sudo apt-get -qqq update - make libc6install - make clean - CFLAGS="-m32 -O2" make -j test V=1 - - no-intrinsics-fuzztest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: no intrinsics fuzztest - run: MOREFLAGS="-DZSTD_NO_INTRINSICS" make -C tests fuzztest - - tsan-zstreamtest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: thread sanitizer zstreamtest - run: CC=clang ZSTREAM_TESTTIME=-T3mn make tsan-test-zstream - - uasan-zstreamtest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: ub + address sanitizer on zstreamtest - run: CC=clang make uasan-test-zstream - - # lasts ~15mn - tsan-fuzztest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: thread sanitizer fuzztest - run: CC=clang make tsan-fuzztest - - - big-tests-zstreamtest32: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: zstream tests in 32bit mode, with big tests - run: | - sudo apt-get -qqq update - make libc6install - CC=clang make -C tests test-zstream32 FUZZER_FLAGS="--big-tests" - - # lasts ~23mn - gcc-8-asan-ubsan-testzstd: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: gcc-8 + ASan + UBSan + Test Zstd - # See https://askubuntu.com/a/1428822 - run: | - echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list - sudo apt-get -qqq update - make gcc8install - CC=gcc-8 make -j uasan-test-zstd cross.ini < - msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}} - /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror - - name: Build ${{matrix.name}} - working-directory: ${{env.GITHUB_WORKSPACE}} - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - if: ${{ matrix.arch != '' }} - run: > - msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}} - /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror - /p:InstructionSet=${{matrix.arch}} - - # This tests that we don't accidentally grow the size too much. - # If the size grows intentionally, you can raise these numbers. - # But we do need to think about binary size, since it is a concern. - libzstd-size: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: libzstd size test - run: | - make clean && make -j -C lib libzstd && ./tests/check_size.py lib/libzstd.so 1100000 - make clean && make -j -C lib libzstd ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 400000 - make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 && ./tests/check_size.py lib/libzstd.so 300000 - make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 80000 - - minimal-decompressor-macros: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: minimal decompressor macros - run: | - make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror" - make clean && make check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror" - make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" - make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" - make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" - make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" - make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" - make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" - make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1 MOREFLAGS="-Werror" - make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1 MOREFLAGS="-Werror" - - dynamic-bmi2: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: dynamic bmi2 tests - run: | - make clean && make -j check MOREFLAGS="-O0 -Werror -mbmi2" - make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1" - make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1 -mbmi2" - make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0" - make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0 -mbmi2" - - test-variants: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make all variants & validate - run: | - make -j -C programs allVariants MOREFLAGS=-O0 - ./tests/test-variants.sh - - qemu-consistency: - name: QEMU ${{ matrix.name }} - runs-on: ubuntu-24.04 - strategy: - fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. - matrix: - include: [ - { name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static }, - { name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-aarch64,xemu: qemu-aarch64-static }, - { name: PPC, xcc_pkg: gcc-powerpc-linux-gnu, xcc: powerpc-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc-static }, - { name: PPC64LE, xcc_pkg: gcc-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static }, - { name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static }, - { name: MIPS, xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static }, - { name: RISC-V, xcc_pkg: gcc-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc, xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static }, - { name: M68K, xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu_pkg: qemu-system-m68k, xemu: qemu-m68k-static }, - { name: SPARC, xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static }, - ] - env: # Set environment variables - XCC: ${{ matrix.xcc }} - XEMU: ${{ matrix.xemu }} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: apt update & install - run: | - sudo apt-get update - sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static - sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }} - - name: Environment info - run: | - echo && which $XCC - echo && $XCC --version - echo && $XCC -v # Show built-in specs - echo && which $XEMU - echo && $XEMU --version - - name: ARM - if: ${{ matrix.name == 'ARM' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: ARM64 - if: ${{ matrix.name == 'ARM64' }} - run: | - make clean - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j check -# This test is only compatible with standard libraries that support BTI (Branch Target Identification). -# Unfortunately, the standard library provided on Ubuntu 24.04 does not have this feature enabled. -# make clean -# LDFLAGS="-static -z force-bti" MOREFLAGS="-mbranch-protection=standard" CC=$XCC QEMU_SYS=$XEMU make check V=1 - - name: PPC - if: ${{ matrix.name == 'PPC' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: PPC64LE - if: ${{ matrix.name == 'PPC64LE' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: S390X - if: ${{ matrix.name == 'S390X' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: MIPS - if: ${{ matrix.name == 'MIPS' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: RISC-V - if: ${{ matrix.name == 'RISC-V' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: M68K - if: ${{ matrix.name == 'M68K' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - name: SPARC - if: ${{ matrix.name == 'SPARC' }} - run: | - LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check - - mingw-short-test: - runs-on: windows-latest - strategy: - fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. - matrix: - include: [ - { compiler: gcc, msystem: MINGW32, cflags: "-Werror"}, - { compiler: gcc, msystem: MINGW64, cflags: "-Werror"}, - { compiler: clang, msystem: MINGW64, cflags: "--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion -Wno-unused-command-line-argument"}, - ] - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # tag=v2.26.0 - with: - msystem: ${{ matrix.msystem }} - install: make diffutils - update: true - # Based on https://ariya.io/2020/07/on-github-actions-with-msys2 - - name: install mingw gcc i686 - if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'gcc') }} - run: pacman --noconfirm -S mingw-w64-i686-gcc - - name: install mingw gcc x86_64 - if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'gcc') }} - run: pacman --noconfirm -S mingw-w64-x86_64-gcc - - name: install mingw clang i686 - if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'clang') }} - run: pacman --noconfirm -S mingw-w64-i686-clang - - name: install mingw clang x86_64 - if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'clang') }} - run: pacman --noconfirm -S mingw-w64-x86_64-clang - - name: run mingw tests - run: | - make -v - export CC=${{ matrix.compiler }} - $CC --version - CFLAGS="${{ matrix.cflags }}" make -j allzstd - echo "Testing $CC ${{ matrix.msystem }}" - make clean - MSYS="" make check - - visual-runtime-tests: - runs-on: windows-latest - strategy: - matrix: - platform: [x64, Win32] - configuration: [Release] - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0 - - name: Build and run tests - working-directory: ${{env.GITHUB_WORKSPACE}} - env: - ZSTD_BIN: ./zstd.exe - DATAGEN_BIN: ./datagen.exe - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: | - msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v142 /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} - COPY build\VS2010\bin\${{matrix.platform}}_${{matrix.configuration}}\*.exe tests\ - CD tests - sh -e playTests.sh - .\fuzzer.exe -T2m - - # Following instructions at: https://github.com/marketplace/actions/install-cygwin-action - cygwin-tests: - runs-on: windows-latest - steps: - - run: git config --global core.autocrlf input - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # tag=v5 - with: - platform: x86_64 - packages: >- - autoconf, - automake, - gcc-g++, - make, - mingw64-x86_64-gcc-g++, - patch, - perl - - name: cygwin tests - shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}' - run: >- - export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32 && - export CFLAGS="-Werror -O1" && - ls && - make -j allzstd && - make -C tests fuzzer && - ./tests/fuzzer.exe -v -T1m - - name: cygwin install test - shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}' - run: >- - make -j && - make install - - pkg-config: - runs-on: ubuntu-latest - container: - image: debian:testing - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Install dependencies - run: | - apt -y update - apt -y install --no-install-recommends gcc libc6-dev make pkg-config - - name: Build and install - run: make -C lib install - - name: Test pkg-config - run: | - cc -Wall -Wextra -Wpedantic -Werror -o simple examples/simple_compression.c $(pkg-config --cflags --libs libzstd) - ./simple LICENSE - - versions-compatibility: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Versions Compatibility Test - run: | - make -C tests versionsTest - - clangbuild: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make clangbuild - run: | - make clangbuild - - gcc-pgo: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Build PGO Zstd with GCC - env: - CC: gcc - run: | - make -C programs zstd-pgo - ./programs/zstd -b - - clang-pgo: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Build PGO Zstd with Clang - env: - CC: clang - run: | - sudo apt install -y llvm - llvm-profdata --version - make -C programs zstd-pgo - ./programs/zstd -b - - intel-cet-compatibility: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: Build Zstd - run: | - make -j zstd V=1 - readelf -n zstd - - name: Get Intel SDE - run: | - curl -LO https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-lin.tar.xz - tar xJvf sde-external-9.33.0-2024-01-07-lin.tar.xz - - name: Configure Permissions - run: | - echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - - name: Run Under SDE - run: | - sde-external-9.33.0-2024-01-07-lin/sde -cet -cet-raise 0 -cet-endbr-exe -cet-stderr -cet-abort -- ./zstd -b3 - - icx: - # install instructions: https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-0/apt-005.html - name: icx-check - runs-on: ubuntu-latest - steps: - - name: install icx - run: | - # download the key to system keyring - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ - | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - - # add signed entry to apt sources and configure the APT client to use Intel repository: - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install -y intel-basekit intel-hpckit - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 - - name: make check - run: | - source /opt/intel/oneapi/setvars.sh - make CC=icx check diff --git a/third_party/zstd/.github/workflows/nightly.yml b/third_party/zstd/.github/workflows/nightly.yml deleted file mode 100644 index 5e531d3..0000000 --- a/third_party/zstd/.github/workflows/nightly.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: facebook/zstd/nightly -on: - schedule: - - cron: '0 0 * * *' - push: - branches: - - release - - dev - - '*nightly*' -permissions: read-all -jobs: - regression-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev - - name: Regression Test - run: | - make -C programs zstd - make -C tests/regression test - -# Longer tests - #- make -C tests test-zstd-nolegacy && make clean - #- pyenv global 3.4.4; make -C tests versionsTest && make clean - #- make zlibwrapper && make clean - #- gcc -v; make -C tests test32 MOREFLAGS="-I/usr/include/x86_64-linux-gnu" && make clean - #- make uasan && make clean - #- make asan32 && make clean - #- make -C tests test32 CC=clang MOREFLAGS="-g -fsanitize=address -I/usr/include/x86_64-linux-gnu" -# Valgrind tests - #- CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make clean - #- make -C tests valgrindTest && make clean -# ARM, AArch64, PowerPC, PowerPC64 tests - #- make ppctest && make clean - #- make ppc64test && make clean - #- make armtest && make clean - #- make aarch64test && make clean diff --git a/third_party/zstd/.github/workflows/publish-release-artifacts.yml b/third_party/zstd/.github/workflows/publish-release-artifacts.yml deleted file mode 100644 index f7af279..0000000 --- a/third_party/zstd/.github/workflows/publish-release-artifacts.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: publish-release-artifacts - -on: - release: - types: - - published - -permissions: read-all - -jobs: - publish-release-artifacts: - permissions: - contents: write # to fetch code and upload artifacts - - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 - - - name: Archive - env: - RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }} - RELEASE_SIGNING_KEY_PASSPHRASE: ${{ secrets.RELEASE_SIGNING_KEY_PASSPHRASE }} - run: | - # compute file name - export TAG="$(echo "$GITHUB_REF" | sed -n 's_^refs/tags/__p')" - if [ -z "$TAG" ]; then - echo "action must be run on a tag. GITHUB_REF is not a tag: $GITHUB_REF" - exit 1 - fi - # Attempt to extract "1.2.3" from "v1.2.3" to maintain artifact name backwards compat. - # Otherwise, degrade to using full tag. - export VERSION="$(echo "$TAG" | sed 's_^v\([0-9]\+\.[0-9]\+\.[0-9]\+\)$_\1_')" - export ZSTD_VERSION="zstd-$VERSION" - - # archive - git archive $TAG \ - --prefix $ZSTD_VERSION/ \ - --format tar \ - -o $ZSTD_VERSION.tar - - # Do the rest of the work in a sub-dir so we can glob everything we want to publish. - mkdir artifacts/ - mv $ZSTD_VERSION.tar artifacts/ - cd artifacts/ - - # compress - zstd -k -19 $ZSTD_VERSION.tar - gzip -k -9 $ZSTD_VERSION.tar - - # we only publish the compressed tarballs - rm $ZSTD_VERSION.tar - - # hash - sha256sum $ZSTD_VERSION.tar.zst > $ZSTD_VERSION.tar.zst.sha256 - sha256sum $ZSTD_VERSION.tar.gz > $ZSTD_VERSION.tar.gz.sha256 - - # sign - if [ -n "$RELEASE_SIGNING_KEY" ]; then - export GPG_BATCH_OPTS="--batch --no-use-agent --pinentry-mode loopback --no-tty --yes" - echo "$RELEASE_SIGNING_KEY" | gpg $GPG_BATCH_OPTS --import - gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.zst.sig $ZSTD_VERSION.tar.zst - gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.gz.sig $ZSTD_VERSION.tar.gz - fi - - - name: Publish - uses: skx/github-action-publish-binaries@b9ca5643b2f1d7371a6cba7f35333f1461bbc703 # tag=release-2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: artifacts/* diff --git a/third_party/zstd/.github/workflows/scorecards.yml b/third_party/zstd/.github/workflows/scorecards.yml deleted file mode 100644 index e532b03..0000000 --- a/third_party/zstd/.github/workflows/scorecards.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Scorecards supply-chain security -on: - # Only the default branch is supported. - branch_protection_rule: - schedule: - - cron: '22 21 * * 2' - push: - # TODO: Add release branch when supported? - branches: [ "dev" ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecards analysis - if: github.repository == 'facebook/zstd' - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Used to receive a badge. - id-token: write - # Needs for private repositories. - contents: read - actions: read - - steps: - - name: "Checkout code" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0 - with: - results_file: results.sarif - results_format: sarif - # (Optional) Read-only PAT token. Uncomment the `repo_token` line below if: - # - you want to enable the Branch-Protection check on a *public* repository, or - # - you are installing Scorecards on a *private* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. - # repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} - - # Publish the results for public repositories to enable scorecard badges. For more details, see - # https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories, `publish_results` will automatically be set to `false`, regardless - # of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - - name: "Upload artifact" - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # tag=v3.28.9 - with: - sarif_file: results.sarif diff --git a/third_party/zstd/.github/workflows/windows-artifacts.yml b/third_party/zstd/.github/workflows/windows-artifacts.yml deleted file mode 100644 index 3599947..0000000 --- a/third_party/zstd/.github/workflows/windows-artifacts.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: windows-artifacts - -on: - push: - branches: [ test_artifacts, win_artifacts ] - release: - types: - - published - -permissions: read-all - -jobs: - windows-artifacts: - # see https://ariya.io/2020/07/on-github-actions-with-msys2 - runs-on: windows-latest - # see https://github.com/msys2/setup-msys2 - strategy: - matrix: - include: - - { msystem: mingw64, env: x86_64, ziparch: win64 } - - { msystem: mingw32, env: i686, ziparch: win32 } - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 - - uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # tag=v2.26.0 - with: - msystem: ${{ matrix.msystem }} - install: make zlib git p7zip mingw-w64-${{matrix.env}}-gcc - update: true - - - name: display versions - run: | - make -v - cc -v - - - name: Building zlib to static link - run: | - git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib - make -C zlib -f win32/Makefile.gcc libz.a - - - name: Building zstd programs - run: | - CPPFLAGS=-I../zlib LDFLAGS=../zlib/libz.a make -j allzstd MOREFLAGS=-static V=1 - - - name: Create artifacts - run: | - ./lib/dll/example/build_package.bat - mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ - 7z a -tzip -mx9 zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ - cd .. - - - name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1 - with: - path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip - name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip diff --git a/third_party/zstd/.gitignore b/third_party/zstd/.gitignore deleted file mode 100644 index 4b50bb1..0000000 --- a/third_party/zstd/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Object files -*.o -*.ko -*.dSYM - -# Libraries -*.lib -*.a - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib -*.framework -*.xcframework - -# Executables -/zstd -zstdmt -*.exe -*.out -*.app - -# Test artefacts -tmp* -*.zst -*.zstd -dictionary. -dictionary -NUL -cmakebuild/ -install/ - -# Build artefacts -contrib/linux-kernel/linux/ -projects/ -bin/ -.buckd/ -buck-out/ -build-* -*.gcda - -# IDE -.clang_complete -compile_flags.txt -.clang-format - -# Other files -.directory -_codelite/ -_zstdbench/ -*.idea -*.swp -.DS_Store -googletest/ -*.d -*.vscode -*.code-workspace -compile_commands.json -.clangd -perf.data -perf.data.old diff --git a/third_party/zstd/CHANGELOG b/third_party/zstd/CHANGELOG deleted file mode 100644 index 92df0f4..0000000 --- a/third_party/zstd/CHANGELOG +++ /dev/null @@ -1,863 +0,0 @@ -V1.5.7 (Feb 2025) -fix: compression bug in 32-bit mode associated with long-lasting sessions -api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232) -api: `ZSTD_getFrameHeader()` works on skippable frames (#4228) -perf: substantial compression speed improvements (up to +30%) on small data, by @TocarIP (#4144) and @cyan4973 (#4165) -perf: improved compression speed (~+5%) for dictionary compression at low levels (#4170) -perf: much faster speed for `--patch-from` at high compression levels (#4276) -perf: higher `--patch-from` compression ratios, notably at high levels (#4288) -perf: better speed for binaries on Windows (@pps83) and when compiled with Visual Studio (@MessyHack) -perf: slight compression ratio improvement thanks to better block boundaries (#4136, #4176, #4178) -perf: slight compression ratio improvement for `dfast`, aka levels 3 and 4 (#4171) -perf: runtime bmi2 detection enabled on x86 32-bit mode (#4251) -cli: multi-threading as default CLI setting, by @daniellerozenblit -cli: new `--max` command (#4290) -build: improve `msbuild` version autodetection, support VS2022, by @ManuelBlanc -build: fix `meson` build by @artem and @Victor-C-Zhang, and on Windows by @bgilbert -build: compatibility with Apple Framework, by @Treata11 -build: improve icc/icx compatibility, by @josepho0918 and @luau-project -build: improve compatibility with Android NDK, by Adenilson Cavalcanti -portability: linux kernel branch, with improved support for Sequence producers (@embg, @gcabiddu, @cyan4973) -portability: improved qnx compatibility, suggested by @rainbowball -portability: improved install script for FreeBSD, by @sunpoet -portability: fixed test suite compatibility with gnu hurd, by @diegonc -doc: clarify specification, by @elasota -misc: improved tests/decodecorpus validation tool (#4102), by antmicro - -V1.5.6 (Mar 2024) -api: Promote `ZSTD_c_targetCBlockSize` to Stable API by @felixhandte -api: new `ZSTD_d_maxBlockSize` experimental parameter, to reduce streaming decompression memory, by @terrelln -perf: improve performance of param `ZSTD_c_targetCBlockSize`, by @Cyan4973 -perf: improved compression of arrays of integers at high compression, by @Cyan4973 -lib: reduce binary size with selective build-time exclusion, by @felixhandte -lib: improved huffman speed on small data and linux kernel, by @terrelln -lib: accept dictionaries with partial literal tables, by @terrelln -lib: fix CCtx size estimation with external sequence producer, by @embg -lib: fix corner case decoder behaviors, by @Cyan4973 and @aimuz -lib: fix zdict prototype mismatch in static_only mode, by @ldv-alt -lib: fix several bugs in magicless-format decoding, by @embg -cli: add common compressed file types to `--exclude-compressed`` by @daniellerozenblit -cli: fix mixing `-c` and `-o` commands with `--rm`, by @Cyan4973 -cli: fix erroneous exclusion of hidden files with `--output-dir-mirror` by @felixhandte -cli: improved time accuracy on BSD, by @felixhandte -cli: better errors on argument parsing, by @KapJI -tests: better compatibility with older versions of `grep`, by @Cyan4973 -tests: lorem ipsum generator as default backup content, by @Cyan4973 -build: cmake improvements by @terrelln, @sighingnow, @gjasny, @JohanMabille, @Saverio976, @gruenich, @teo-tsirpanis -build: bazel support, by @jondo2010 -build: fix cross-compiling for AArch64 with lld by @jcelerier -build: fix Apple platform compatibility, by @nidhijaju -build: fix Visual 2012 and lower compatibility, by @Cyan4973 -build: improve win32 support, by @DimitriPapadopoulos -build: better C90 compliance for zlibWrapper, by @emaste -port: make: fat binaries on macos, by @mredig -port: ARM64EC compatibility for Windows, by @dunhor -port: QNX support by @klausholstjacobsen -port: MSYS2 and Cygwin makefile installation and test support, by @QBos07 -port: risc-v support validation in CI, by @Cyan4973 -port: sparc64 support validation in CI, by @Cyan4973 -port: AIX compatibility, by @likema -port: HP-UX compatibility, by @likema -doc: Improved specification accuracy, by @elasota -bug: Fix and deprecate ZSTD_generateSequences (#3981) - -v1.5.5 (Apr 2023) -fix: fix rare corruption bug affecting the high compression mode, reported by @danlark1 (#3517, @terrelln) -perf: improve mid-level compression speed (#3529, #3533, #3543, @yoniko and #3552, @terrelln) -lib: deprecated bufferless block-level API (#3534) by @terrelln -cli: mmap large dictionaries to save memory, by @daniellerozenblit -cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit -cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte -cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte -cli: fix decompression into block device using -o, reported by @georgmu (#3583) -build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71 -build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou -build: fix MSVC+ClangCL linking issue (#3569) by @tru -build: fix zstd-dll, version of zstd CLI that links to the dynamic library (#3496) by @yoniko -build: fix MSVC warnings (#3495) by @embg -doc: updated zstd specification to clarify corner cases, by @Cyan4973 -doc: document how to create fat binaries for macos (#3568) by @rickmark -misc: improve seekable format ingestion speed (~+100%) for very small chunk sizes (#3544) by @Cyan4973 -misc: tests/fullbench can benchmark multiple files (#3516) by @dloidolt - -v1.5.4 (Feb 2023) -perf: +20% faster huffman decompression for targets that can't compile x64 assembly (#3449, @terrelln) -perf: up to +10% faster streaming compression at levels 1-2 (#3114, @embg) -perf: +4-13% for levels 5-12 by optimizing function generation (#3295, @terrelln) -pref: +3-11% compression speed for `arm` target (#3199, #3164, #3145, #3141, #3138, @JunHe77 and #3139, #3160, @danlark1) -perf: +5-30% faster dictionary compression at levels 1-4 (#3086, #3114, #3152, @embg) -perf: +10-20% cold dict compression speed by prefetching CDict tables (#3177, @embg) -perf: +1% faster compression by removing a branch in ZSTD_fast_noDict (#3129, @felixhandte) -perf: Small compression ratio improvements in high compression mode (#2983, #3391, @Cyan4973 and #3285, #3302, @daniellerozenblit) -perf: small speed improvement by better detecting `STATIC_BMI2` for `clang` (#3080, @TocarIP) -perf: Improved streaming performance when `ZSTD_c_stableInBuffer` is set (#2974, @Cyan4973) -cli: Asynchronous I/O for improved cli speed (#2975, #2985, #3021, #3022, @yoniko) -cli: Change `zstdless` behavior to align with `zless` (#2909, @binhdvo) -cli: Keep original file if `-c` or `--stdout` is given (#3052, @dirkmueller) -cli: Keep original files when result is concatenated into a single output with `-o` (#3450, @Cyan4973) -cli: Preserve Permissions and Ownership of regular files (#3432, @felixhandte) -cli: Print zlib/lz4/lzma library versions with `-vv` (#3030, @terrelln) -cli: Print checksum value for single frame files with `-lv` (#3332, @Cyan4973) -cli: Print `dictID` when present with `-lv` (#3184, @htnhan) -cli: when `stderr` is *not* the console, disable status updates, but preserve final summary (#3458, @Cyan4973) -cli: support `--best` and `--no-name` in `gzip` compatibility mode (#3059, @dirkmueller) -cli: support for `posix` high resolution timer `clock_gettime()`, for improved benchmark accuracy (#3423, @Cyan4973) -cli: improved help/usage (`-h`, `-H`) formatting (#3094, @dirkmueller and #3385, @jonpalmisc) -cli: Fix better handling of bogus numeric values (#3268, @ctkhanhly) -cli: Fix input consists of multiple files _and_ `stdin` (#3222, @yoniko) -cli: Fix tiny files passthrough (#3215, @cgbur) -cli: Fix for `-r` on empty directory (#3027, @brailovich) -cli: Fix empty string as argument for `--output-dir-*` (#3220, @embg) -cli: Fix decompression memory usage reported by `-vv --long` (#3042, @u1f35c, and #3232, @zengyijing) -cli: Fix infinite loop when empty input is passed to trainer (#3081, @terrelln) -cli: Fix `--adapt` doesn't work when `--no-progress` is also set (#3354, @terrelln) -api: Support for Block-Level Sequence Producer (#3333, @embg) -api: Support for in-place decompression (#3432, @terrelln) -api: New `ZSTD_CCtx_setCParams()` function, set all parameters defined in a `ZSTD_compressionParameters` structure (#3403, @Cyan4973) -api: Streaming decompression detects incorrect header ID sooner (#3175, @Cyan4973) -api: Window size resizing optimization for edge case (#3345, @daniellerozenblit) -api: More accurate error codes for busy-loop scenarios (#3413, #3455, @Cyan4973) -api: Fix limit overflow in `compressBound` and `decompressBound` (#3362, #3373, Cyan4973) reported by @nigeltao -api: Deprecate several advanced experimental functions: streaming (#3408, @embg), copy (#3196, @mileshu) -bug: Fix corruption that rarely occurs in 32-bit mode with wlog=25 (#3361, @terrelln) -bug: Fix for block-splitter (#3033, @Cyan4973) -bug: Fixes for Sequence Compression API (#3023, #3040, @Cyan4973) -bug: Fix leaking thread handles on Windows (#3147, @animalize) -bug: Fix timing issues with cmake/meson builds (#3166, #3167, #3170, @Cyan4973) -build: Allow user to select legacy level for cmake (#3050, @shadchin) -build: Enable legacy support by default in cmake (#3079, @niamster) -build: Meson build script improvements (#3039, #3120, #3122, #3327, #3357, @eli-schwartz and #3276, @neheb) -build: Add aarch64 to supported architectures for zstd_trace (#3054, @ooosssososos) -build: support AIX architecture (#3219, @qiongsiwu) -build: Fix `ZSTD_LIB_MINIFY` build macro, which now reduces static library size by half (#3366, @terrelln) -build: Fix Windows issues with Multithreading translation layer (#3364, #3380, @yoniko) and ARM64 target (#3320, @cwoffenden) -build: Fix `cmake` script (#3382, #3392, @terrelln and #3252 @Tachi107 and #3167 @Cyan4973) -doc: Updated man page, providing more details for `--train` mode (#3112, @Cyan4973) -doc: Add decompressor errata document (#3092, @terrelln) -misc: Enable Intel CET (#2992, #2994, @hjl-tools) -misc: Fix `contrib/` seekable format (#3058, @yhoogstrate and #3346, @daniellerozenblit) -misc: Improve speed of the one-file library generator (#3241, @wahern and #3005, @cwoffenden) - -v1.5.3 (dev version, unpublished) - -v1.5.2 (Jan, 2022) -perf: Regain Minimal memset()-ing During Reuse of Compression Contexts (@Cyan4973, #2969) -build: Build Zstd with `noexecstack` on All Architectures (@felixhandte, #2964) -doc: Clarify Licensing (@terrelln, #2981) - -v1.5.1 (Dec, 2021) -perf: rebalanced compression levels, to better match the intended speed/level curve, by @senhuang42 -perf: faster huffman decoder, using x64 assembly, by @terrelln -perf: slightly faster high speed modes (strategies fast & dfast), by @felixhandte -perf: improved binary size and faster compilation times, by @terrelln -perf: new row64 mode, used notably in level 12, by @senhuang42 -perf: faster mid-level compression speed in presence of highly repetitive patterns, by @senhuang42 -perf: minor compression ratio improvements for small data at high levels, by @cyan4973 -perf: reduced stack usage (mostly useful for Linux Kernel), by @terrelln -perf: faster compression speed on incompressible data, by @bindhvo -perf: on-demand reduced ZSTD_DCtx state size, using build macro ZSTD_DECODER_INTERNAL_BUFFER, at a small cost of performance, by @bindhvo -build: allows hiding static symbols in the dynamic library, using build macro, by @skitt -build: support for m68k (Motorola 68000's), by @cyan4973 -build: improved AIX support, by @Helflym -build: improved meson unofficial build, by @eli-schwartz -cli : custom memory limit when training dictionary (#2925), by @embg -cli : report advanced parameters information when compressing in very verbose mode (`-vv`), by @Svetlitski-FB - -v1.5.0 (May 11, 2021) -api: Various functions promoted from experimental to stable API: (#2579-2581, @senhuang42) - `ZSTD_defaultCLevel()` - `ZSTD_getDictID_fromCDict()` -api: Several experimental functions have been deprecated and will emit a compiler warning (#2582, @senhuang42) - `ZSTD_compress_advanced()` - `ZSTD_compress_usingCDict_advanced()` - `ZSTD_compressBegin_advanced()` - `ZSTD_compressBegin_usingCDict_advanced()` - `ZSTD_initCStream_srcSize()` - `ZSTD_initCStream_usingDict()` - `ZSTD_initCStream_usingCDict()` - `ZSTD_initCStream_advanced()` - `ZSTD_initCStream_usingCDict_advanced()` - `ZSTD_resetCStream()` -api: ZSTDMT_NBWORKERS_MAX reduced to 64 for 32-bit environments (@Cyan4973) -perf: Significant speed improvements for middle compression levels (#2494, @senhuang42 @terrelln) -perf: Block splitter to improve compression ratio, enabled by default for high compression levels (#2447, @senhuang42) -perf: Decompression loop refactor, speed improvements on `clang` and for `--long` modes (#2614 #2630, @Cyan4973) -perf: Reduced stack usage during compression and decompression entropy stage (#2522 #2524, @terrelln) -bug: Improve setting permissions of created files (#2525, @felixhandte) -bug: Fix large dictionary non-determinism (#2607, @terrelln) -bug: Fix non-determinism test failures on Linux i686 (#2606, @terrelln) -bug: Fix various dedicated dictionary search bugs (#2540 #2586, @senhuang42 @felixhandte) -bug: Ensure `ZSTD_estimateCCtxSize*() `monotonically increases with compression level (#2538, @senhuang42) -bug: Fix --patch-from mode parameter bound bug with small files (#2637, @occivink) -bug: Fix UBSAN error in decompression (#2625, @terrelln) -bug: Fix superblock compression divide by zero bug (#2592, @senhuang42) -bug: Make the number of physical CPU cores detection more robust (#2517, @PaulBone) -doc: Improve `zdict.h` dictionary training API documentation (#2622, @terrelln) -doc: Note that public `ZSTD_free*()` functions accept NULL pointers (#2521, @animalize) -doc: Add style guide docs for open source contributors (#2626, @Cyan4973) -tests: Better regression test coverage for different dictionary modes (#2559, @senhuang42) -tests: Better test coverage of index reduction (#2603, @terrelln) -tests: OSS-Fuzz coverage for seekable format (#2617, @senhuang42) -tests: Test coverage for ZSTD threadpool API (#2604, @senhuang42) -build: Dynamic library built multithreaded by default (#2584, @senhuang42) -build: Move `zstd_errors.h` and `zdict.h` to `lib/` root (#2597, @terrelln) -build: Allow `ZSTDMT_JOBSIZE_MIN` to be configured at compile-time, reduce default to 512KB (#2611, @Cyan4973) -build: Single file library build script moved to `build/` directory (#2618, @felixhandte) -build: `ZBUFF_*()` is no longer built by default (#2583, @senhuang42) -build: Fixed Meson build (#2548, @SupervisedThinking @kloczek) -build: Fix excessive compiler warnings with clang-cl and CMake (#2600, @nickhutchinson) -build: Detect presence of `md5` on Darwin (#2609, @felixhandte) -build: Avoid SIGBUS on armv6 (#2633, @bmwiedmann) -cli: `--progress` flag added to always display progress bar (#2595, @senhuang42) -cli: Allow reading from block devices with `--force` (#2613, @felixhandte) -cli: Fix CLI filesize display bug (#2550, @Cyan4973) -cli: Fix windows CLI `--filelist` end-of-line bug (#2620, @Cyan4973) -contrib: Various fixes for linux kernel patch (#2539, @terrelln) -contrib: Seekable format - Decompression hanging edge case fix (#2516, @senhuang42) -contrib: Seekable format - New seek table-only API (#2113 #2518, @mdittmer @Cyan4973) -contrib: Seekable format - Fix seek table descriptor check when loading (#2534, @foxeng) -contrib: Seekable format - Decompression fix for large offsets, (#2594, @azat) -misc: Automatically published release tarballs available on Github (#2535, @felixhandte) - -v1.4.9 (Mar 1, 2021) -bug: Use `umask()` to Constrain Created File Permissions (#2495, @felixhandte) -bug: Make Simple Single-Pass Functions Ignore Advanced Parameters (#2498, @terrelln) -api: Add (De)Compression Tracing Functionality (#2482, @terrelln) -api: Support References to Multiple DDicts (#2446, @senhuang42) -api: Add Function to Generate Skippable Frame (#2439, @senhuang42) -perf: New Algorithms for the Long Distance Matcher (#2483, @mpu) -perf: Performance Improvements for Long Distance Matcher (#2464, @mpu) -perf: Don't Shrink Window Log when Streaming with a Dictionary (#2451, @terrelln) -cli: Fix `--output-dir-mirror` rejection of `..` -containing paths (#2512, @felixhandte) -cli: Allow Input From Console When `-f`/`--force` is Passed (#2466, @felixhandte) -cli: Improve Help Message (#2500, @senhuang42) -tests: Remove Flaky Tests (#2455, #2486, #2445, @Cyan4973) -tests: Correctly Invoke md5 Utility on NetBSD (#2492, @niacat) -tests: Avoid Using `stat -c` on NetBSD (#2513, @felixhandte) -build: Zstd CLI Can Now be Linked to Dynamic `libzstd` (#2457, #2454 @Cyan4973) -build: Hide and Avoid Using Static-Only Symbols (#2501, #2504, @skitt) -build: CMake: Enable Only C for lib/ and programs/ Projects (#2498, @concatime) -build: CMake: Use `configure_file()` to Create the `.pc` File (#2462, @lazka) -build: Fix Fuzzer Compiler Detection & Update UBSAN Flags (#2503, @terrelln) -build: Add Guards for `_LARGEFILE_SOURCE` and `_LARGEFILE64_SOURCE` (#2444, @indygreg) -build: Improve `zlibwrapper` Makefile (#2437, @Cyan4973) -contrib: Add `recover_directory` Program (#2473, @terrelln) -doc: Change License Year to 2021 (#2452 & #2465, @terrelln & @senhuang42) -doc: Fix Typos (#2459, @ThomasWaldmann) - -v1.4.8 (Dec 18, 2020) -hotfix: wrong alignment of an internal buffer - -v1.4.7 (Dec 16, 2020) -perf: stronger --long mode at high compression levels, by @senhuang42 -perf: stronger --patch-from at high compression levels, thanks to --long improvements -perf: faster dictionary compression at medium compression levels, by @felixhandte -perf: small speed & memory usage improvements for ZSTD_compress2(), by @terrelln -perf: improved fast compression speeds with Visual Studio, by @animalize -cli : Set nb of threads with environment variable ZSTD_NBTHREADS, by @senhuang42 -cli : accept decompressing files with *.zstd suffix -cli : provide a condensed summary by default when processing multiple files -cli : fix : stdin input no longer confused as user prompt -cli : improve accuracy of several error messages -api : new sequence ingestion API, by @senhuang42 -api : shared thread pool: control total nb of threads used by multiple compression jobs, by @marxin -api : new ZSTD_getDictID_fromCDict(), by @LuAPi -api : zlibWrapper only uses public API, and is compatible with dynamic library, by @terrelln -api : fix : multithreaded compression has predictable output even in special cases (see #2327) (issue not accessible from cli) -api : fix : dictionary compression correctly respects dictionary compression level (see #2303) (issue not accessible from cli) -build: fix cmake script when using path with spaces, by @terrelln -build: improved compile-time detection of aarch64/neon platforms, by @bsdimp -build: Fix building on AIX 5.1, by @likema -build: compile paramgrill with cmake on Windows, requested by @mirh -doc : clarify repcode updates in format specification, by @felixhandte - -v1.4.6 -fix : Always return dstSize_tooSmall when that is the case -fix : Fix ZSTD_initCStream_advanced() with static allocation and no dictionary -perf: Improve small block decompression speed by 20%+, by @terrelln -perf: Reduce compression stack usage by 1 KB, by @terrelln -perf: Improve decompression speed by improving ZSTD_wildcopy, by @helloguo (#2252, #2256) -perf: Improve histogram construction, by @cyan4973 (#2253) -cli : Add --output-dir-mirror option, by @xxie24 (#2219) -cli : Warn when (de)compressing multiple files into a single output, by @senhuang42 (#2279) -cli : Improved progress bar and status summary when (de)compressing multiple files, by @senhuang42 (#2283) -cli : Call stat less often, by @felixhandte (#2262) -cli : Allow --patch-from XXX and --filelist XXX in addition to --patch-from=XXX and --filelist=XXX, by @cyan4973 (#2250) -cli : Allow --patch-from to compress stdin with --stream-size, by @bimbashrestha (#2206) -api : Do not install zbuff.h, since it has long been deprecated, by @cyan4973 (#2166). -api : Fix ZSTD_CCtx_setParameter() with ZSTD_c_compressionLevel to make 0 mean default level, by @i-do-cpp (#2291) -api : Rename ZSTDMT_NBTHREADS_MAX to ZSTDMT_NBWORKERS_MAX, by @marxin (#2228). -build: Install pkg-config file with CMake and MinGW, by @tonytheodore (#2183) -build: Install DLL with CMake on Windows, by @BioDataAnalysis (#2221) -build: Fix DLL install location with CMake, by @xantares and @bimbashrestha (#2186) -build: Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions -build: Add ZSTD_NO_INTRINSICS macro to avoid explicit intrinsics -build: Add STATIC_BMI2 macro for compile time detection of BMI2 on MSVC, by @Niadb (#2258) -build: Fix -Wcomma warnings, by @cwoffenden -build: Remove distutils requirement for meson build, by @neheb (#2197) -build: Fix cli compilation with uclibc -build: Fix cli compilation without st_mtime, by @ffontaine (#2246) -build: Fix shadowing warnings in library -build: Fix single file library compilation with Enscripten, by @yoshihitoh (#2227) -misc: Improve single file library and include dictBuilder, by @cwoffenden -misc: Allow compression dictionaries with missing symbols -misc: Add freestanding translation script in contrib/freestanding_lib -misc: Collect all of zstd's libc dependencies into zstd_deps.h -doc : Add ZSTD_versionString() to manual, by @animalize -doc : Fix documentation for ZSTD_CCtxParams_setParameter(), by @felixhandte (#2270) - -v1.4.5 (May 22, 2020) -fix : Compression ratio regression on huge files (> 3 GB) using high levels (--ultra) and multithreading, by @terrelln -perf: Improved decompression speed: x64 : +10% (clang) / +5% (gcc); ARM : from +15% to +50%, depending on SoC, by @terrelln -perf: Automatically downsizes ZSTD_DCtx when too large for too long (#2069, by @bimbashreshta) -perf: Improved fast compression speed on aarch64 (#2040, ~+3%, by @caoyzh) -perf: Small level 1 compression speed gains (depending on compiler) -cli : New --patch-from command, create and apply patches from files, by @bimbashreshta -cli : New --filelist= : Provide a list of files to operate upon from a file -cli : -b -d command can now benchmark decompression on multiple files -cli : New --no-content-size command -cli : New --show-default-cparams information command -api : ZDICT_finalizeDictionary() is promoted to stable (#2111) -api : new experimental parameter ZSTD_d_stableOutBuffer (#2094) -build: Generate a single-file libzstd library (#2065, by @cwoffenden) -build: Relative includes no longer require -I compiler flags for zstd lib subdirs (#2103, by @felixhandte) -build: zstd now compiles cleanly under -pedantic (#2099) -build: zstd now compiles with make-4.3 -build: Support mingw cross-compilation from Linux, by @Ericson2314 -build: Meson multi-thread build fix on windows -build: Some misc icc fixes backed by new ci test on travis -misc: bitflip analyzer tool, by @felixhandte -misc: Extend largeNbDicts benchmark to compression -misc: Edit-distance match finder in contrib/ -doc : Improved beginner CONTRIBUTING.md docs -doc : New issue templates for zstd - -v1.4.4 (Nov 6, 2019) -perf: Improved decompression speed, by > 10%, by @terrelln -perf: Better compression speed when re-using a context, by @felixhandte -perf: Fix compression ratio when compressing large files with small dictionary, by @senhuang42 -perf: zstd reference encoder can generate RLE blocks, by @bimbashrestha -perf: minor generic speed optimization, by @davidbolvansky -api: new ability to extract sequences from the parser for analysis, by @bimbashrestha -api: fixed decoding of magic-less frames, by @terrelln -api: fixed ZSTD_initCStream_advanced() performance with fast modes, reported by @QrczakMK -cli: Named pipes support, by @bimbashrestha -cli: short tar's extension support, by @stokito -cli: command --output-dir-flat= , generates target files into requested directory, by @senhuang42 -cli: commands --stream-size=# and --size-hint=#, by @nmagerko -cli: command --exclude-compressed, by @shashank0791 -cli: faster `-t` test mode -cli: improved some error messages, by @vangyzen -cli: fix command `-D dictionary` on Windows, reported by @artyompetrov -cli: fix rare deadlock condition within dictionary builder, by @terrelln -build: single-file decoder with emscripten compilation script, by @cwoffenden -build: fixed zlibWrapper compilation on Visual Studio, reported by @bluenlive -build: fixed deprecation warning for certain gcc version, reported by @jasonma163 -build: fix compilation on old gcc versions, by @cemeyer -build: improved installation directories for cmake script, by Dmitri Shubin -pack: modified pkgconfig, for better integration into openwrt, requested by @neheb -misc: Improved documentation : ZSTD_CLEVEL, DYNAMIC_BMI2, ZSTD_CDict, function deprecation, zstd format -misc: fixed educational decoder : accept larger literals section, and removed UNALIGNED() macro - -v1.4.3 (Aug 20, 2019) -bug: Fix Dictionary Compression Ratio Regression by @cyan4973 (#1709) -bug: Fix Buffer Overflow in legacy v0.3 decompression by @felixhandte (#1722) -build: Add support for IAR C/C++ Compiler for Arm by @joseph0918 (#1705) - -v1.4.2 (Jul 26, 2019) -bug: Fix bug in zstd-0.5 decoder by @terrelln (#1696) -bug: Fix seekable decompression in-memory API by @iburinoc (#1695) -misc: Validate blocks are smaller than size limit by @vivekmg (#1685) -misc: Restructure source files by @ephiepark (#1679) - -v1.4.1 (Jul 20, 2019) -bug: Fix data corruption in niche use cases by @terrelln (#1659) -bug: Fuzz legacy modes, fix uncovered bugs by @terrelln (#1593, #1594, #1595) -bug: Fix out of bounds read by @terrelln (#1590) -perf: Improve decode speed by ~7% @mgrice (#1668) -perf: Slightly improved compression ratio of level 3 and 4 (ZSTD_dfast) by @cyan4973 (#1681) -perf: Slightly faster compression speed when re-using a context by @cyan4973 (#1658) -perf: Improve compression ratio for small windowLog by @cyan4973 (#1624) -perf: Faster compression speed in high compression mode for repetitive data by @terrelln (#1635) -api: Add parameter to generate smaller dictionaries by @tyler-tran (#1656) -cli: Recognize symlinks when built in C99 mode by @felixhandte (#1640) -cli: Expose cpu load indicator for each file on -vv mode by @ephiepark (#1631) -cli: Restrict read permissions on destination files by @chungy (#1644) -cli: zstdgrep: handle -f flag by @felixhandte (#1618) -cli: zstdcat: follow symlinks by @vejnar (#1604) -doc: Remove extra size limit on compressed blocks by @felixhandte (#1689) -doc: Fix typo by @yk-tanigawa (#1633) -doc: Improve documentation on streaming buffer sizes by @cyan4973 (#1629) -build: CMake: support building with LZ4 @leeyoung624 (#1626) -build: CMake: install zstdless and zstdgrep by @leeyoung624 (#1647) -build: CMake: respect existing uninstall target by @j301scott (#1619) -build: Make: skip multithread tests when built without support by @michaelforney (#1620) -build: Make: Fix examples/ test target by @sjnam (#1603) -build: Meson: rename options out of deprecated namespace by @lzutao (#1665) -build: Meson: fix build by @lzutao (#1602) -build: Visual Studio: don't export symbols in static lib by @scharan (#1650) -build: Visual Studio: fix linking by @absotively (#1639) -build: Fix MinGW-W64 build by @myzhang1029 (#1600) -misc: Expand decodecorpus coverage by @ephiepark (#1664) - -v1.4.0 (Apr 17, 2019) -perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln -api: Move the advanced API, including all functions in the staging section, to the stable section -api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress -api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter -api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter -api: Don't export ZSTDMT functions from the shared library by default -api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT -api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao -api: Fix ZSTD_decompressDCtx() corner cases with a dictionary -api: Move ZSTD_getDictID_*() functions to the stable section -api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln -api: Allow compression parameters to be set when a dictionary is used -api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called -api: Fix ZSTD_estimateCStreamSize_usingCCtxParams() -api: Setting ZSTD_d_maxWindowLog to 0 means use the default -cli: Ensure that a dictionary is not used to compress itself by @shakeelrao -cli: Add --[no-]compress-literals flag to enable or disable literal compression -doc: Update the examples to use the advanced API -doc: Explain how to transition from old streaming functions to the advanced API in the header -build: Improve the Windows release packages -build: Improve CMake build by @hjmjohnson -build: Build fixes for FreeBSD by @lwhsu -build: Remove redundant warnings by @thatsafunnyname -build: Fix tests on OpenBSD by @bket -build: Extend fuzzer build system to work with the new clang engine -build: CMake now creates the libzstd.so.1 symlink -build: Improve Menson build by @lzutao -misc: Fix symbolic link detection on FreeBSD -misc: Use physical core count for -T0 on FreeBSD by @cemeyer -misc: Fix zstd --list on truncated files by @kostmo -misc: Improve logging in debug mode by @felixhandte -misc: Add CirrusCI tests by @lwhsu -misc: Optimize dictionary memory usage in corner cases -misc: Improve the dictionary builder on small or homogeneous data -misc: Fix spelling across the repo by @jsoref - -v1.3.8 (Dec 28, 2018) -perf: better decompression speed on large files (+7%) and cold dictionaries (+15%) -perf: slightly better compression ratio at high compression modes -api : finalized advanced API, last stage before "stable" status -api : new --rsyncable mode, by @terrelln -api : support decompression of empty frames into NULL (used to be an error) (#1385) -build: new set of macros to build a minimal size decoder, by @felixhandte -build: fix compilation on MIPS32, reported by @clbr (#1441) -build: fix compilation with multiple -arch flags, by @ryandesign -build: highly upgraded meson build, by @lzutao -build: improved buck support, by @obelisk -build: fix cmake script : can create debug build, by @pitrou -build: Makefile : grep works on both colored consoles and systems without color support -build: fixed zstd-pgo, by @bmwiedemann -cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423) -cli : --no-progress flag, preserving final summary (#1371), by @terrelln -cli : ensure destination file is not source file (#1422) -cli : clearer error messages, especially when input file not present -doc : clarified zstd_compression_format.md, by @ulikunitz -misc: fixed zstdgrep, returns 1 on failure, by @lzutao -misc: NEWS renamed as CHANGELOG, in accordance with fboss - -v1.3.7 (Oct 20, 2018) -perf: slightly better decompression speed on clang (depending on hardware target) -fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10 -build: no longer build backtrace by default in release mode; restrict further automatic mode -build: control backtrace support through build macro BACKTRACE -misc: added man pages for zstdless and zstdgrep, by @samrussell - -v1.3.6 (Oct 6, 2018) -perf: much faster dictionary builder, by @jenniferliu -perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte -perf: faster dictionary decompression when using a very large number of dictionaries simultaneously -cli : fix : does no longer overwrite destination when source does not exist (#1082) -cli : new command --adapt, for automatic compression level adaptation -api : fix : block api can be streamed with > 4 GB, reported by @catid -api : reduced ZSTD_DDict size by 2 KB -api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel(). -build: support Haiku target, by @korli -build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT. -doc : zstd_compression_format.md updated to match wording in IETF RFC 8478 -misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97 - -v1.3.5 (Jun 29, 2018) -perf: much faster dictionary compression, by @felixhandte -perf: small quality improvement for dictionary generation, by @terrelln -perf: slightly improved high compression levels (notably level 19) -mem : automatic memory release for long duration contexts -cli : fix : overlapLog can be manually set -cli : fix : decoding invalid lz4 frames -api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln -api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln -build: select custom libzstd scope through control macros, by @GeorgeLu97 -build: OpenBSD patch, by @bket -build: make and make all are compatible with -j -doc : clarify zstd_compression_format.md, updated for IETF RFC process -misc: pzstd compatible with reproducible compilation, by @lamby - -v1.3.4 (Mar 27, 2018) -perf: faster speed (especially decoding speed) on recent cpus (haswell+) -perf: much better performance associating --long with multi-threading, by @terrelln -perf: better compression at levels 13-15 -cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior) -cli : smoother status report in multi-threading mode -cli : added command --fast=#, for faster compression modes -cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb) -api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode -api : compression levels can be negative, for even more speed -api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime -api : ZSTDMT can accept new compression parameters during compression -api : implemented all advanced dictionary decompression prototypes -build: improved meson recipe, by Shawn Landden (@shawnl) -build: VS2017 scripts, by @HaydnTrigg -misc: all /contrib projects fixed -misc: added /contrib/docker script by @gyscos - -v1.3.3 (Dec 21, 2017) -perf: faster zstd_opt strategy (levels 16-19) -fix : bug #944 : multithreading with shared dictionary and large data, reported by @gsliepen -cli : fix : content size written in header by default -cli : fix : improved LZ4 format support, by @felixhandte -cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file -api : fix : support large skippable frames, by @terrelln -api : fix : streaming interface was adding a useless 3-bytes null block to small frames -api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" -build: fix : compilation under rhel6 and centos6, reported by @pixelb -build: added `check` target - -v1.3.2 (Oct 10, 2017) -new : long range mode, using --long command, by Stella Lau (@stellamplau) -new : ability to generate and decode magicless frames (#591) -changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode -fix : multi-threading compression works with custom allocators -fix : ZSTD_sizeof_CStream() was over-evaluating memory usage -fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22) -fix : 32-bits build can now decode large offsets (levels 21+) -cli : added LZ4 frame support by default, by Felix Handte (@felixhandte) -cli : improved --list output -cli : new : can split input file for dictionary training, using command -B# -cli : new : clean operation artefact on Ctrl-C interruption -cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851) -cli : fix : write file size in header in multiple-files mode -api : added macro ZSTD_COMPRESSBOUND() for static allocation -api : experimental : new advanced decompression API -api : fix : sizeof_CCtx() used to over-estimate -build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819) -build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818) -example : added streaming_memory_usage -license : changed /examples license to BSD + GPLv2 -license : fix a few header files to reflect new license (#825) - -v1.3.1 (Aug 21, 2017) -New license : BSD + GPLv2 -perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk) -perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760) -cli : improved and fixed --list command, by @ib (#772) -cli : command -vV to list supported formats, by @ib (#771) -build : fixed binary variants, reported by @svenha (#788) -build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718) -API exp : breaking change : ZSTD_getframeHeader() provides more information -API exp : breaking change : pinned down values of error codes -doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz) -new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74) -new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau) -updated : contrib/linux-kernel, by Nick Terrell (@terrelln) - -v1.3.0 (Jul 6, 2017) -cli : new : `--list` command, by Paul Cruz -cli : changed : xz/lzma support enabled by default -cli : changed : `-t *` continue processing list after a decompression error -API : added : ZSTD_versionString() -API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell -API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter() -API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx() -API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700) -API exp : clarified memory estimation / measurement functions. -API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1 -tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz -new : contrib/seekable_format, demo and API, by Sean Purcell -changed : contrib/linux-kernel, updated version and license, by Nick Terrell - -v1.2.0 (May 5, 2017) -cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable) -cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell -cli : new : zstdmt symlink hardwired to `zstd -T0` -cli : new : command --threads=# (#671) -cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell -cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters -cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell -cli : fix : does not output compressed data on console -cli : fix : ignore symbolic links unless --force specified, -API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument -API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters. -API : improved: ZSTDMT_compressCCtx() reduced memory usage -API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634) -API : fix : src size stored in frame header is controlled at end of frame -API : fix : enforced consistent rules for pledgedSrcSize==0 (#641) -API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate -build: improved cmake script, by @Majlen -build: enabled Multi-threading support for *BSD, by Baptiste Daroussin -tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target. -new : contrib/linux-kernel version, by Nick Terrell - -v1.1.4 (Mar 18, 2017) -cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski -cli : new : advanced benchmark command --priority=rt -cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77 -cli : fix : --rm remains silent when input is stdin -cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski -speed : improved decompression speed in streaming mode for single shot scenarios (+5%) -memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB -arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell -API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize() -API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value) -build : new: meson build system in contrib/meson, by Dima Krasner -build : improved cmake script, by @Majlen -build : added -Wformat-security flag, as recommended by Padraig Brady -doc : new : educational decoder, by Sean Purcell - -v1.1.3 (Feb 7, 2017) -cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`) -cli : new : experimental target `make zstdmt`, with multi-threading support -cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano. -cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski -cli : fix zstdless on Mac OS-X, by Andrew Janke -cli : fix #232 "compress non-files" -dictBuilder : improved dictionary generation quality, thanks to Nick Terrell -API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental) -API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul -API : new : ZDICT_finalizeDictionary() -API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511) -API : fix : all symbols properly exposed in libzstd, by Nick Terrell -build : support for Solaris target, by Przemyslaw Skibinski -doc : clarified specification, by Sean Purcell - -v1.1.2 (Dec 15, 2016) -API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init -API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize() -API : zbuff : changed : prototypes now generate deprecation warnings -lib : improved : faster decompression speed at ultra compression settings and 32-bits mode -lib : changed : only public ZSTD_ symbols are now exposed -lib : changed : reduced usage of stack memory -lib : fixed : several corner case bugs, by Nick Terrell -cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski -cli : new : preserve file attributes -cli : new : added zstdless and zstdgrep tools -cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd) -cli : fixed : zstdcat -zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski -install : better compatibility with FreeBSD, by Dimitry Andric -source tree : changed : zbuff source files moved to lib/deprecated - -v1.1.1 (Nov 2, 2016) -New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption -New : doc/zstd_manual.html, by Przemyslaw Skibinski -Improved : slightly better compression ratio at --ultra levels (>= 20) -Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report -Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section) -Added : example/multiple_streaming_compression.c -Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h) -Updated man page -Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets - -v1.1.0 (Sep 28, 2016) -New : contrib/pzstd, parallel version of zstd, by Nick Terrell -added : NetBSD install target (#338) -Improved : speed for batches of small files -Improved : speed of zlib wrapper, by Przemyslaw Skibinski -Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier -Fixed : CLI -d output to stdout by default when input is stdin (#322) -Fixed : CLI correctly detects console on Mac OS-X -Fixed : CLI supports recursive mode `-r` on Mac OS-X -Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski -Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319) -Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365) -Fixed : zstd-pgo, reported by octoploid (#329) - -v1.0.0 (Sep 1, 2016) -Change Licensing, all project is now BSD, Copyright Facebook -Small decompression speed improvement -API : Streaming API supports legacy format -API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter() -CLI supports legacy formats v0.4+ -Fixed : compression fails on certain huge files, reported by Jesse McGrew -Enhanced documentation, by Przemyslaw Skibinski - -v0.8.1 (Aug 18, 2016) -New streaming API -Changed : --ultra now enables levels beyond 19 -Changed : -i# now selects benchmark time in second -Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell -Fixed : speed regression on specific patterns (#272) -Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291) -Fixed : ICC compilation, by Przemyslaw Skibinski - -v0.8.0 (Aug 2, 2016) -Improved : better speed on clang and gcc -O2, thanks to Eric Biggers -New : Build on FreeBSD and DragonFly, thanks to JrMarino -Changed : modified API : ZSTD_compressEnd() -Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist -Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers -Fixed : large dictionaries (> 384 KB), reported by Ilona Papava -Fixed : checksum correctly checked in single-pass mode -Fixed : combined --test amd --rm, reported by Andreas M. Nilsson -Modified : minor compression level adaptations -Updated : compression format specification to v0.2.0 -changed : zstd.h moved to /lib directory - -v0.7.5 (Aug 1, 2016) -Transition version, supporting decoding of v0.8.x - -v0.7.4 (Jul 17, 2016) -Added : homebrew for Mac, by Daniel Cade -Added : more examples -Fixed : segfault when using small dictionaries, reported by Felix Handte -Modified : default compression level for CLI is now 3 -Updated : specification, to v0.1.1 - -v0.7.3 (Jul 9, 2016) -New : compression format specification -New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner. -New : `ZSTD_getDecompressedSize()` -New : OpenBSD target, by Juan Francisco Cantero Hurtado -New : `examples` directory -fixed : dictBuilder using HC levels, reported by Bartosz Taudul -fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte -fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski -modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section) -modified : legacy functions no longer need magic number - -v0.7.2 (Jul 4, 2016) -fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski. -fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner. -fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner. - -v0.7.1 (Jun 23, 2016) -fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier -fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв -fixed : corruption issue, reported by cj -modified : checksum enabled by default in command line mode - -v0.7.0 (Jun 17, 2016) -New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski -New : Command `--rm`, to remove source file after successful de/compression -New : Visual build scripts, by Christophe Chevalier -New : Support for Sparse File-systems (do not use space for zero-filled sectors) -New : Frame checksum support -New : Support pass-through mode (when using `-df`) -API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()` -API : create dictionary files from custom content, by Giuseppe Ottaviano -API : support for custom malloc/free functions -New : controllable Dictionary ID -New : Support for skippable frames - -v0.6.1 (May 13, 2016) -New : zlib wrapper API, thanks to Przemyslaw Skibinski -New : Ability to compile compressor / decompressor separately -Changed : new lib directory structure -Fixed : Legacy codec v0.5 compatible with dictionary decompression -Fixed : Decoder corruption error (#173) -Fixed : null-string roundtrip (#176) -New : benchmark mode can select directory as input -Experimental : midipix support, VMS support - -v0.6.0 (Apr 13, 2016) -Stronger high compression modes, thanks to Przemyslaw Skibinski -API : ZSTD_getFrameParams() provides size of decompressed content -New : highest compression modes require `--ultra` command to fully unleash their capacity -Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner - -v0.5.1 (Feb 18, 2016) -New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski -Changed : Dictionary builder integrated into libzstd and zstd cli -Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`. -Fix : high compression modes for big-endian platforms -New : zstd cli : `-t` | `--test` command - -v0.5.0 (Feb 5, 2016) -New : dictionary builder utility -Changed : streaming & dictionary API -Improved : better compression of small data - -v0.4.7 (Jan 22, 2016) -Improved : small compression speed improvement in HC mode -Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default -fix : bt search bug - -v0.4.6 (Jan 13, 2016) -fix : fast compression mode on Windows -New : cmake configuration file, thanks to Artyom Dymchenko -Improved : high compression mode on repetitive data -New : block-level API -New : ZSTD_duplicateCCtx() - -v0.4.5 (Dec 18, 2015) -new : -m/--multiple : compress/decompress multiple files - -v0.4.4 (Dec 14, 2015) -Fixed : high compression modes for Windows 32 bits -new : external dictionary API extended to buffered mode and accessible through command line -new : windows DLL project, thanks to Christophe Chevalier - -v0.4.3 (Dec 7, 2015) -new : external dictionary API -new : zstd-frugal - -v0.4.2 (Dec 2, 2015) -Generic minor improvements for small blocks -Fixed : big-endian compatibility, by Peter Harris (#85) - -v0.4.1 (Dec 1, 2015) -Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben) -removed `zstd.c` - -v0.4.0 (Nov 29, 2015) -Command line utility compatible with high compression levels -Removed zstdhc => merged into zstd -Added : ZBUFF API (see zstd_buffered.h) -Rolling buffer support - -v0.3.6 (Nov 10, 2015) -small blocks params - -v0.3.5 (Nov 9, 2015) -minor generic compression improvements - -v0.3.4 (Nov 6, 2015) -Faster fast cLevels - -v0.3.3 (Nov 5, 2015) -Small compression ratio improvement - -v0.3.2 (Nov 2, 2015) -Fixed Visual Studio - -v0.3.1 (Nov 2, 2015) -Small compression ratio improvement - -v0.3 (Oct 30, 2015) -HC mode : compression levels 2-26 - -v0.2.2 (Oct 28, 2015) -Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier - -v0.2.1 (Oct 24, 2015) -Fix : Read errors, advanced fuzzer tests, by Hanno Böck - -v0.2.0 (Oct 22, 2015) -**Breaking format change** -Faster decompression speed -Can still decode v0.1 format - -v0.1.3 (Oct 15, 2015) -fix uninitialization warning, reported by Evan Nemerson - -v0.1.2 (Sep 11, 2015) -frame concatenation support - -v0.1.1 (Aug 27, 2015) -fix compression bug -detects write-flush errors - -v0.1.0 (Aug 25, 2015) -first release diff --git a/third_party/zstd/CODE_OF_CONDUCT.md b/third_party/zstd/CODE_OF_CONDUCT.md deleted file mode 100644 index 0f7ad8b..0000000 --- a/third_party/zstd/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,5 +0,0 @@ -# Code of Conduct - -Facebook has adopted a Code of Conduct that we expect project participants to adhere to. -Please read the [full text](https://code.fb.com/codeofconduct/) -so that you can understand what actions will and will not be tolerated. diff --git a/third_party/zstd/CONTRIBUTING.md b/third_party/zstd/CONTRIBUTING.md deleted file mode 100644 index 57be94b..0000000 --- a/third_party/zstd/CONTRIBUTING.md +++ /dev/null @@ -1,489 +0,0 @@ -# Contributing to Zstandard -We want to make contributing to this project as easy and transparent as -possible. - -## Our Development Process -New versions are being developed in the "dev" branch, -or in their own feature branch. -When they are deemed ready for a release, they are merged into "release". - -As a consequence, all contributions must stage first through "dev" -or their own feature branch. - -## Pull Requests -We actively welcome your pull requests. - -1. Fork the repo and create your branch from `dev`. -2. If you've added code that should be tested, add tests. -3. If you've changed APIs, update the documentation. -4. Ensure the test suite passes. -5. Make sure your code lints. -6. If you haven't already, complete the Contributor License Agreement ("CLA"). - -## Contributor License Agreement ("CLA") -In order to accept your pull request, we need you to submit a CLA. You only need -to do this once to work on any of Facebook's open source projects. - -Complete your CLA here: - -## Workflow -Zstd uses a branch-based workflow for making changes to the codebase. Typically, zstd -will use a new branch per sizable topic. For smaller changes, it is okay to lump multiple -related changes into a branch. - -Our contribution process works in three main stages: -1. Local development - * Update: - * Checkout your fork of zstd if you have not already - ``` - git checkout https://github.com//zstd - cd zstd - ``` - * Update your local dev branch - ``` - git pull https://github.com/facebook/zstd dev - git push origin dev - ``` - * Topic and development: - * Make a new branch on your fork about the topic you're developing for - ``` - # branch names should be concise but sufficiently informative - git checkout -b - git push origin - ``` - * Make commits and push - ``` - # make some changes = - git add -u && git commit -m - git push origin - ``` - * Note: run local tests to ensure that your changes didn't break existing functionality - * Quick check - ``` - make check - ``` - * Longer check - ``` - make test - ``` -2. Code Review and CI tests - * Ensure CI tests pass: - * Before sharing anything to the community, create a pull request in your own fork against the dev branch - and make sure that all GitHub Actions CI tests pass. See the Continuous Integration section below for more information. - * Ensure that static analysis passes on your development machine. See the Static Analysis section - below to see how to do this. - * Create a pull request: - * When you are ready to share you changes to the community, create a pull request from your branch - to facebook:dev. You can do this very easily by clicking 'Create Pull Request' on your fork's home - page. - * From there, select the branch where you made changes as your source branch and facebook:dev - as the destination. - * Examine the diff presented between the two branches to make sure there is nothing unexpected. - * Write a good pull request description: - * While there is no strict template that our contributors follow, we would like them to - sufficiently summarize and motivate the changes they are proposing. We recommend all pull requests, - at least indirectly, address the following points. - * Is this pull request important and why? - * Is it addressing an issue? If so, what issue? (provide links for convenience please) - * Is this a new feature? If so, why is it useful and/or necessary? - * Are there background references and documents that reviewers should be aware of to properly assess this change? - * Note: make sure to point out any design and architectural decisions that you made and the rationale behind them. - * Note: if you have been working with a specific user and would like them to review your work, make sure you mention them using (@) - * Submit the pull request and iterate with feedback. -3. Merge and Release - * Getting approval: - * You will have to iterate on your changes with feedback from other collaborators to reach a point - where your pull request can be safely merged. - * To avoid too many comments on style and convention, make sure that you have a - look at our style section below before creating a pull request. - * Eventually, someone from the zstd team will approve your pull request and not long after merge it into - the dev branch. - * Housekeeping: - * Most PRs are linked with one or more Github issues. If this is the case for your PR, make sure - the corresponding issue is mentioned. If your change 'fixes' or completely addresses the - issue at hand, then please indicate this by requesting that an issue be closed by commenting. - * Just because your changes have been merged does not mean the topic or larger issue is complete. Remember - that the change must make it to an official zstd release for it to be meaningful. We recommend - that contributors track the activity on their pull request and corresponding issue(s) page(s) until - their change makes it to the next release of zstd. Users will often discover bugs in your code or - suggest ways to refine and improve your initial changes even after the pull request is merged. - -## Static Analysis -Static analysis is a process for examining the correctness or validity of a program without actually -executing it. It usually helps us find many simple bugs. Zstd uses clang's `scan-build` tool for -static analysis. You can install it by following the instructions for your OS on https://clang-analyzer.llvm.org/scan-build. - -Once installed, you can ensure that our static analysis tests pass on your local development machine -by running: -``` -make staticAnalyze -``` - -In general, you can use `scan-build` to static analyze any build script. For example, to static analyze -just `contrib/largeNbDicts` and nothing else, you can run: - -``` -scan-build make -C contrib/largeNbDicts largeNbDicts -``` - -### Pitfalls of static analysis -`scan-build` is part of our regular CI suite. Other static analyzers are not. - -It can be useful to look at additional static analyzers once in a while (and we do), but it's not a good idea to multiply the nb of analyzers run continuously at each commit and PR. The reasons are : - -- Static analyzers are full of false positive. The signal to noise ratio is actually pretty low. -- A good CI policy is "zero-warning tolerance". That means that all issues must be solved, including false positives. This quickly becomes a tedious workload. -- Multiple static analyzers will feature multiple kind of false positives, sometimes applying to the same code but in different ways leading to : - + tortuous code, trying to please multiple constraints, hurting readability and therefore maintenance. Sometimes, such complexity introduce other more subtle bugs, that are just out of scope of the analyzers. - + sometimes, these constraints are mutually exclusive : if one try to solve one, the other static analyzer will complain, they can't be both happy at the same time. -- As if that was not enough, the list of false positives change with each version. It's hard enough to follow one static analyzer, but multiple ones with their own update agenda, this quickly becomes a massive velocity reducer. - -This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kinds of reports can be useful, and are accepted. - -## Continuous Integration -CI tests run every time a pull request (PR) is created or updated. The exact tests -that get run will depend on the destination branch you specify. Some tests take -longer to run than others. Currently, our CI is set up to run a short -series of tests when creating a PR to the dev branch and a longer series of tests -when creating a PR to the release branch. You can look in the configuration files -of the respective CI platform for more information on what gets run when. - -Most people will just want to create a PR with the destination set to their local dev -branch of zstd. You can then find the status of the tests on the PR's page. You can also -re-run tests and cancel running tests from the PR page or from the respective CI's dashboard. - -Almost all of zstd's CI runs on GitHub Actions (configured at `.github/workflows`), which will automatically run on PRs to your -own fork. A small number of tests run on other services (e.g. Travis CI, Circle CI, Appveyor). -These require work to set up on your local fork, and (at least for Travis CI) cost money. -Therefore, if the PR on your local fork passes GitHub Actions, feel free to submit a PR -against the main repo. - -### Third-party CI -A small number of tests cannot run on GitHub Actions, or have yet to be migrated. -For these, we use a variety of third-party services (listed below). It is not necessary to set -these up on your fork in order to contribute to zstd; however, we do link to instructions for those -who want earlier signal. - -| Service | Purpose | Setup Links | Config Path | -|-----------|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------| -| Travis CI | Used for testing on non-x86 architectures such as PowerPC | https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github
https://github.com/marketplace/travis-ci | `.travis.yml` | -| AppVeyor | Used for some Windows testing (e.g. cygwin, mingw) | https://www.appveyor.com/blog/2018/10/02/github-apps-integration/
https://github.com/marketplace/appveyor | `appveyor.yml` | -| Cirrus CI | Used for testing on FreeBSD | https://github.com/marketplace/cirrus-ci/ | `.cirrus.yml` | -| Circle CI | Historically was used to provide faster signal,
but we may be able to migrate these to Github Actions | https://circleci.com/docs/2.0/getting-started/#setting-up-circleci
https://youtu.be/Js3hMUsSZ2c
https://circleci.com/docs/2.0/enable-checks/ | `.circleci/config.yml` | - -Note: the instructions linked above mostly cover how to set up a repository with CI from scratch. -The general idea should be the same for setting up CI on your fork of zstd, but you may have to -follow slightly different steps. In particular, please ignore any instructions related to setting up -config files (since zstd already has configs for each of these services). - -## Performance -Performance is extremely important for zstd and we only merge pull requests whose performance -landscape and corresponding trade-offs have been adequately analyzed, reproduced, and presented. -This high bar for performance means that every PR which has the potential to -impact performance takes a very long time for us to properly review. That being said, we -always welcome contributions to improve performance (or worsen performance for the trade-off of -something else). Please keep the following in mind before submitting a performance related PR: - -1. Zstd isn't as old as gzip but it has been around for time now and its evolution is -very well documented via past Github issues and pull requests. It may be the case that your -particular performance optimization has already been considered in the past. Please take some -time to search through old issues and pull requests using keywords specific to your -would-be PR. Of course, just because a topic has already been discussed (and perhaps rejected -on some grounds) in the past, doesn't mean it isn't worth bringing up again. But even in that case, -it will be helpful for you to have context from that topic's history before contributing. -2. The distinction between noise and actual performance gains can unfortunately be very subtle -especially when microbenchmarking extremely small wins or losses. The only remedy to getting -something subtle merged is extensive benchmarking. You will be doing us a great favor if you -take the time to run extensive, long-duration, and potentially cross-(os, platform, process, etc) -benchmarks on your end before submitting a PR. Of course, you will not be able to benchmark -your changes on every single processor and os out there (and neither will we) but do that best -you can:) We've added some things to think about when benchmarking below in the Benchmarking -Performance section which might be helpful for you. -3. Optimizing performance for a certain OS, processor vendor, compiler, or network system is a perfectly -legitimate thing to do as long as it does not harm the overall performance health of Zstd. -This is a hard balance to strike but please keep in mind other aspects of Zstd when -submitting changes that are clang-specific, windows-specific, etc. - -## Benchmarking Performance -Performance microbenchmarking is a tricky subject but also essential for Zstd. We value empirical -testing over theoretical speculation. This guide it not perfect but for most scenarios, it -is a good place to start. - -### Stability -Unfortunately, the most important aspect in being able to benchmark reliably is to have a stable -benchmarking machine. A virtual machine, a machine with shared resources, or your laptop -will typically not be stable enough to obtain reliable benchmark results. If you can get your -hands on a desktop, this is usually a better scenario. - -Of course, benchmarking can be done on non-hyper-stable machines as well. You will just have to -do a little more work to ensure that you are in fact measuring the changes you've made and not -noise. Here are some things you can do to make your benchmarks more stable: - -1. The most simple thing you can do to drastically improve the stability of your benchmark is -to run it multiple times and then aggregate the results of those runs. As a general rule of -thumb, the smaller the change you are trying to measure, the more samples of benchmark runs -you will have to aggregate over to get reliable results. Here are some additional things to keep in -mind when running multiple trials: - * How you aggregate your samples are important. You might be tempted to use the mean of your - results. While this is certainly going to be a more stable number than a raw single sample - benchmark number, you might have more luck by taking the median. The mean is not robust to - outliers whereas the median is. Better still, you could simply take the fastest speed your - benchmark achieved on each run since that is likely the fastest your process will be - capable of running your code. In our experience, this (aggregating by just taking the sample - with the fastest running time) has been the most stable approach. - * The more samples you have, the more stable your benchmarks should be. You can verify - your improved stability by looking at the size of your confidence intervals as you - increase your sample count. These should get smaller and smaller. Eventually hopefully - smaller than the performance win you are expecting. - * Most processors will take some time to get `hot` when running anything. The observations - you collect during that time period will very different from the true performance number. Having - a very large number of sample will help alleviate this problem slightly but you can also - address is directly by simply not including the first `n` iterations of your benchmark in - your aggregations. You can determine `n` by simply looking at the results from each iteration - and then hand picking a good threshold after which the variance in results seems to stabilize. -2. You cannot really get reliable benchmarks if your host machine is simultaneously running -another cpu/memory-intensive application in the background. If you are running benchmarks on your -personal laptop for instance, you should close all applications (including your code editor and -browser) before running your benchmarks. You might also have invisible background applications -running. You can see what these are by looking at either Activity Monitor on Mac or Task Manager -on Windows. You will get more stable benchmark results of you end those processes as well. - * If you have multiple cores, you can even run your benchmark on a reserved core to prevent - pollution from other OS and user processes. There are a number of ways to do this depending - on your OS: - * On linux boxes, you have use https://github.com/lpechacek/cpuset. - * On Windows, you can "Set Processor Affinity" using https://www.thewindowsclub.com/processor-affinity-windows - * On Mac, you can try to use their dedicated affinity API https://developer.apple.com/library/archive/releasenotes/Performance/RN-AffinityAPI/#//apple_ref/doc/uid/TP40006635-CH1-DontLinkElementID_2 -3. To benchmark, you will likely end up writing a separate c/c++ program that will link libzstd. -Dynamically linking your library will introduce some added variation (not a large amount but -definitely some). Statically linking libzstd will be more stable. Static libraries should -be enabled by default when building zstd. -4. Use a profiler with a good high resolution timer. See the section below on profiling for -details on this. -5. Disable frequency scaling, turbo boost and address space randomization (this will vary by OS) -6. Try to avoid storage. On some systems you can use tmpfs. Putting the program, inputs and outputs on -tmpfs avoids touching a real storage system, which can have a pretty big variability. - -Also check our LLVM's guide on benchmarking here: https://llvm.org/docs/Benchmarking.html - -### Zstd benchmark -The fastest signal you can get regarding your performance changes is via the in-build zstd cli -bench option. You can run Zstd as you typically would for your scenario using some set of options -and then additionally also specify the `-b#` option. Doing this will run our benchmarking pipeline -for that options you have just provided. If you want to look at the internals of how this -benchmarking script works, you can check out programs/benchzstd.c - -For example: say you have made a change that you believe improves the speed of zstd level 1. The -very first thing you should use to assess whether you actually achieved any sort of improvement -is `zstd -b`. You might try to do something like this. Note: you can use the `-i` option to -specify a running time for your benchmark in seconds (default is 3 seconds). -Usually, the longer the running time, the more stable your results will be. - -``` -$ git checkout -$ make && cp zstd zstd-old -$ git checkout -$ make && cp zstd zstd-new -$ zstd-old -i5 -b1 - 1 : 8990 -> 3992 (2.252), 302.6 MB/s , 626.4 MB/s -$ zstd-new -i5 -b1 - 1 : 8990 -> 3992 (2.252), 302.8 MB/s , 628.4 MB/s -``` - -Unless your performance win is large enough to be visible despite the intrinsic noise -on your computer, benchzstd alone will likely not be enough to validate the impact of your -changes. For example, the results of the example above indicate that effectively nothing -changed but there could be a small <3% improvement that the noise on the host machine -obscured. So unless you see a large performance win (10-15% consistently) using just -this method of evaluation will not be sufficient. - -### Profiling -There are a number of great profilers out there. We're going to briefly mention how you can -profile your code using `instruments` on mac, `perf` on linux and `visual studio profiler` -on Windows. - -Say you have an idea for a change that you think will provide some good performance gains -for level 1 compression on Zstd. Typically this means, you have identified a section of -code that you think can be made to run faster. - -The first thing you will want to do is make sure that the piece of code is actually taking up -a notable amount of time to run. It is usually not worth optimizing something which accounts for less than -0.0001% of the total running time. Luckily, there are tools to help with this. -Profilers will let you see how much time your code spends inside a particular function. -If your target code snippet is only part of a function, it might be worth trying to -isolate that snippet by moving it to its own function (this is usually not necessary but -might be). - -Most profilers (including the profilers discussed below) will generate a call graph of -functions for you. Your goal will be to find your function of interest in this call graph -and then inspect the time spent inside of it. You might also want to look at the annotated -assembly which most profilers will provide you with. - -#### Instruments -We will once again consider the scenario where you think you've identified a piece of code -whose performance can be improved upon. Follow these steps to profile your code using -Instruments. - -1. Open Instruments -2. Select `Time Profiler` from the list of standard templates -3. Close all other applications except for your instruments window and your terminal -4. Run your benchmarking script from your terminal window - * You will want a benchmark that runs for at least a few seconds (5 seconds will - usually be long enough). This way the profiler will have something to work with - and you will have ample time to attach your profiler to this process:) - * I will just use benchzstd as my benchmarmking script for this example: -``` -$ zstd -b1 -i5 # this will run for 5 seconds -``` -5. Once you run your benchmarking script, switch back over to instruments and attach your -process to the time profiler. You can do this by: - * Clicking on the `All Processes` drop down in the top left of the toolbar. - * Selecting your process from the dropdown. In my case, it is just going to be labeled - `zstd` - * Hitting the bright red record circle button on the top left of the toolbar -6. You profiler will now start collecting metrics from your benchmarking script. Once -you think you have collected enough samples (usually this is the case after 3 seconds of -recording), stop your profiler. -7. Make sure that in toolbar of the bottom window, `profile` is selected. -8. You should be able to see your call graph. - * If you don't see the call graph or an incomplete call graph, make sure you have compiled - zstd and your benchmarking script using debug flags. On mac and linux, this just means - you will have to supply the `-g` flag alone with your build script. You might also - have to provide the `-fno-omit-frame-pointer` flag -9. Dig down the graph to find your function call and then inspect it by double clicking -the list item. You will be able to see the annotated source code and the assembly side by -side. - -#### Perf - -This wiki has a pretty detailed tutorial on getting started working with perf so we'll -leave you to check that out of you're getting started: - -https://perf.wiki.kernel.org/index.php/Tutorial - -Some general notes on perf: -* Use `perf stat -r # ` to quickly get some relevant timing and -counter statistics. Perf uses a high resolution timer and this is likely one -of the first things your team will run when assessing your PR. -* Perf has a long list of hardware counters that can be viewed with `perf --list`. -When measuring optimizations, something worth trying is to make sure the hardware -counters you expect to be impacted by your change are in fact being so. For example, -if you expect the L1 cache misses to decrease with your change, you can look at the -counter `L1-dcache-load-misses` -* Perf hardware counters will not work on a virtual machine. - -#### Visual Studio - -TODO - -## Issues -We use GitHub issues to track public bugs. Please ensure your description is -clear and has sufficient instructions to be able to reproduce the issue. - -Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe -disclosure of security bugs. In those cases, please go through the process -outlined on that page and do not file a public issue. - -## Coding Style -It's a pretty long topic, which is difficult to summarize in a single paragraph. -As a rule of thumbs, try to imitate the coding style of -similar lines of codes around your contribution. -The following is a non-exhaustive list of rules employed in zstd code base: - -### C90 -This code base is following strict C90 standard, -with 2 extensions : 64-bit `long long` types, and variadic macros. -This rule is applied strictly to code within `lib/` and `programs/`. -Sub-project in `contrib/` are allowed to use other conventions. - -### C++ direct compatibility : symbol mangling -All public symbol declarations must be wrapped in `extern “C” { … }`, -so that this project can be compiled as C++98 code, -and linked into C++ applications. - -### Minimal Frugal -This design requirement is fundamental to preserve the portability of the code base. -#### Dependencies -- Reduce dependencies to the minimum possible level. - Any dependency should be considered “bad” by default, - and only tolerated because it provides a service in a better way than can be achieved locally. - The only external dependencies this repository tolerates are - standard C libraries, and in rare cases, system level headers. -- Within `lib/`, this policy is even more drastic. - The only external dependencies allowed are ``, ``, ``, - and even then, not directly. - In particular, no function shall ever allocate on heap directly, - and must use instead `ZSTD_malloc()` and equivalent. - Other accepted non-symbol headers are `` and ``. -- Within the project, there is a strict hierarchy of dependencies that must be respected. - `programs/` is allowed to depend on `lib/`, but only its public API. - Within `lib/`, `lib/common` doesn't depend on any other directory. - `lib/compress` and `lib/decompress` shall not depend on each other. - `lib/dictBuilder` can depend on `lib/common` and `lib/compress`, but not `lib/decompress`. -#### Resources -- Functions in `lib/` must use very little stack space, - several dozens of bytes max. - Everything larger must use the heap allocator, - or require a scratch buffer to be emplaced manually. - -### Naming -* All public symbols are prefixed with `ZSTD_` - + private symbols, with a scope limited to their own unit, are free of this restriction. - However, since `libzstd` source code can be amalgamated, - each symbol name must attempt to be (and remain) unique. - Avoid too generic names that could become ground for future collisions. - This generally implies usage of some form of prefix. -* For symbols (functions and variables), naming convention is `PREFIX_camelCase`. - + In some advanced cases, one can also find : - - `PREFIX_prefix2_camelCase` - - `PREFIX_camelCase_extendedQualifier` -* Multi-words names generally consist of an action followed by object: - - for example : `ZSTD_createCCtx()` -* Prefer positive actions - - `goBackward` rather than `notGoForward` -* Type names (`struct`, etc.) follow similar convention, - except that they are allowed and even invited to start by an Uppercase letter. - Example : `ZSTD_CCtx`, `ZSTD_CDict` -* Macro names are all Capital letters. - The same composition rules (`PREFIX_NAME_QUALIFIER`) apply. -* File names are all lowercase letters. - The convention is `snake_case`. - File names **must** be unique across the entire code base, - even when they stand in clearly separated directories. - -### Qualifiers -* This code base is `const` friendly, if not `const` fanatical. - Any variable that can be `const` (aka. read-only) **must** be `const`. - Any pointer which content will not be modified must be `const`. - This property is then controlled at compiler level. - `const` variables are an important signal to readers that this variable isn't modified. - Conversely, non-const variables are a signal to readers to watch out for modifications later on in the function. -* If a function must be inlined, mention it explicitly, - using project's own portable macros, such as `FORCE_INLINE_ATTR`, - defined in `lib/common/compiler.h`. - -### Debugging -* **Assertions** are welcome, and should be used very liberally, - to control any condition the code expects for its correct execution. - These assertion checks will be run in debug builds, and disabled in production. -* For traces, this project provides its own debug macros, - in particular `DEBUGLOG(level, ...)`, defined in `lib/common/debug.h`. - -### Code documentation -* Avoid code documentation that merely repeats what the code is already stating. - Whenever applicable, prefer employing the code as the primary way to convey explanations. - Example 1 : `int nbTokens = n;` instead of `int i = n; /* i is a nb of tokens *./`. - Example 2 : `assert(size > 0);` instead of `/* here, size should be positive */`. -* At declaration level, the documentation explains how to use the function or variable - and when applicable why it's needed, of the scenarios where it can be useful. -* At implementation level, the documentation explains the general outline of the algorithm employed, - and when applicable why this specific choice was preferred. - -### General layout -* 4 spaces for indentation rather than tabs -* Code documentation shall directly precede function declaration or implementation -* Function implementations and its code documentation should be preceded and followed by an empty line - - -## License -By contributing to Zstandard, you agree that your contributions will be licensed -under both the [LICENSE](LICENSE) file and the [COPYING](COPYING) file in the root directory of this source tree. diff --git a/third_party/zstd/COPYING b/third_party/zstd/COPYING deleted file mode 100644 index ecbc059..0000000 --- a/third_party/zstd/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. \ No newline at end of file diff --git a/third_party/zstd/LICENSE b/third_party/zstd/LICENSE deleted file mode 100644 index 7580028..0000000 --- a/third_party/zstd/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -BSD License - -For Zstandard software - -Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook, nor Meta, nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/zstd/Makefile b/third_party/zstd/Makefile deleted file mode 100644 index e8e6bcf..0000000 --- a/third_party/zstd/Makefile +++ /dev/null @@ -1,471 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -# verbose mode (print commands) on V=1 or VERBOSE=1 -Q = $(if $(filter 1,$(V) $(VERBOSE)),,@) - -PRGDIR = programs -ZSTDDIR = lib -BUILDIR = build -ZWRAPDIR = zlibWrapper -TESTDIR = tests -FUZZDIR = $(TESTDIR)/fuzz - -# Define nul output -VOID = /dev/null - -# When cross-compiling from linux to windows, you might -# need to specify this as "Windows." Fedora build fails -# without it. -# -# Note: mingw-w64 build from linux to windows does not -# fail on other tested distros (ubuntu, debian) even -# without manually specifying the TARGET_SYSTEM. -TARGET_SYSTEM ?= $(OS) -CP ?= cp - -ifneq (,$(filter Windows%,$(TARGET_SYSTEM))) - EXT =.exe -else - EXT = -endif - -## default: Build lib-release and zstd-release -.PHONY: default -default: lib-release zstd-release - -.PHONY: all -all: allmost examples manual contrib - -.PHONY: allmost -allmost: allzstd zlibwrapper - -# skip zwrapper, can't build that on alternate architectures without the proper zlib installed -.PHONY: allzstd -allzstd: lib - $(Q)$(MAKE) -C $(PRGDIR) all - $(Q)$(MAKE) -C $(TESTDIR) all - -.PHONY: all32 -all32: - $(MAKE) -C $(PRGDIR) zstd32 - $(MAKE) -C $(TESTDIR) all32 - -.PHONY: lib lib-release lib-mt lib-nomt -lib lib-release lib-mt lib-nomt: - $(Q)$(MAKE) -C $(ZSTDDIR) $@ - -.PHONY: zstd zstd-release -zstd zstd-release: - $(Q)$(MAKE) -C $(PRGDIR) $@ - $(Q)ln -sf $(PRGDIR)/zstd$(EXT) zstd$(EXT) - -.PHONY: zstdmt -zstdmt: - $(Q)$(MAKE) -C $(PRGDIR) $@ - $(Q)$(CP) $(PRGDIR)/zstd$(EXT) ./zstdmt$(EXT) - -.PHONY: zlibwrapper -zlibwrapper: lib - $(MAKE) -C $(ZWRAPDIR) all - -## test: run long-duration tests -.PHONY: test -DEBUGLEVEL ?= 1 -test: MOREFLAGS += -g -Werror -test: - DEBUGLEVEL=$(DEBUGLEVEL) MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants - $(MAKE) -C $(TESTDIR) $@ - ZSTD=../../programs/zstd $(MAKE) -C doc/educational_decoder $@ - -## check: run basic tests for `zstd` cli -.PHONY: check -check: - $(Q)$(MAKE) -C $(TESTDIR) $@ - -.PHONY: automated_benchmarking -automated_benchmarking: - $(MAKE) -C $(TESTDIR) $@ - -.PHONY: benchmarking -benchmarking: automated_benchmarking - -## examples: build all examples in `examples/` directory -.PHONY: examples -examples: lib - $(MAKE) -C examples all - -## manual: generate API documentation in html format -.PHONY: manual -manual: - $(MAKE) -C contrib/gen_html $@ - -## man: generate man page -.PHONY: man -man: - $(MAKE) -C programs $@ - -## contrib: build all supported projects in `/contrib` directory -.PHONY: contrib -contrib: lib - $(MAKE) -C contrib/pzstd all - $(MAKE) -C contrib/seekable_format/examples all - $(MAKE) -C contrib/seekable_format/tests test - $(MAKE) -C contrib/largeNbDicts all - $(MAKE) -C contrib/externalSequenceProducer all - cd build/single_file_libs/ ; ./build_decoder_test.sh - cd build/single_file_libs/ ; ./build_library_test.sh - -.PHONY: cleanTabs -cleanTabs: - cd contrib; ./cleanTabs - -.PHONY: clean -clean: - $(Q)$(MAKE) -C $(ZSTDDIR) $@ > $(VOID) - $(Q)$(MAKE) -C $(PRGDIR) $@ > $(VOID) - $(Q)$(MAKE) -C $(TESTDIR) $@ > $(VOID) - $(Q)$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID) - $(Q)$(MAKE) -C examples/ $@ > $(VOID) - $(Q)$(MAKE) -C contrib/gen_html $@ > $(VOID) - $(Q)$(MAKE) -C contrib/pzstd $@ > $(VOID) - $(Q)$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID) - $(Q)$(MAKE) -C contrib/seekable_format/tests $@ > $(VOID) - $(Q)$(MAKE) -C contrib/largeNbDicts $@ > $(VOID) - $(Q)$(MAKE) -C contrib/externalSequenceProducer $@ > $(VOID) - $(Q)$(RM) zstd$(EXT) zstdmt$(EXT) tmp* - $(Q)$(RM) -r lz4 cmakebuild mesonbuild install - @echo Cleaning completed - -#------------------------------------------------------------------------------ -# make install is validated only for Linux, macOS, Hurd and some BSD targets -#------------------------------------------------------------------------------ -ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT% CYGWIN_NT% Haiku AIX,$(shell sh -c 'MSYSTEM="MSYS" uname') )) - -HOST_OS = POSIX - -MKDIR ?= mkdir -p - -HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo 0) -EGREP_OPTIONS ?= -ifeq ($(HAVE_COLORNEVER), 1) -EGREP_OPTIONS += --color=never -endif -EGREP = egrep $(EGREP_OPTIONS) - -# Print a two column output of targets and their description. To add a target description, put a -# comment in the Makefile with the format "## : ". For example: -# -## list: Print all targets and their descriptions (if provided) -.PHONY: list -list: - $(Q)TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ - | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ - | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \ - { \ - printf "Target Name\tDescription\n"; \ - printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \ - for target in $$TARGETS; do \ - line=$$($(EGREP) "^##[[:space:]]+$$target:" $(lastword $(MAKEFILE_LIST))); \ - description=$$(echo $$line | awk '{i=index($$0,":"); print substr($$0,i+1)}' | xargs); \ - printf "$$target\t$$description\n"; \ - done \ - } | column -t -s $$'\t' - -.PHONY: install armtest usan asan uasan msan asan32 -install: - $(Q)$(MAKE) -C $(ZSTDDIR) $@ - $(Q)$(MAKE) -C $(PRGDIR) $@ - -.PHONY: uninstall -uninstall: - $(Q)$(MAKE) -C $(ZSTDDIR) $@ - $(Q)$(MAKE) -C $(PRGDIR) $@ - -.PHONY: travis-install -travis-install: - $(MAKE) install PREFIX=~/install_test_dir - -.PHONY: clangbuild-darwin-fat -clangbuild-darwin-fat: clean - clang -v - CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch arm64" $(MAKE) zstd-release - mv programs/zstd programs/zstd_arm64 - CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch x86_64" $(MAKE) zstd-release - mv programs/zstd programs/zstd_x64 - lipo -create programs/zstd_x64 programs/zstd_arm64 -output programs/zstd - -.PHONY: gcc5build gcc6build gcc7build clangbuild m32build armbuild aarch64build ppcbuild ppc64build -gcc5build: clean - gcc-5 -v - CC=gcc-5 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" - -gcc6build: clean - gcc-6 -v - CC=gcc-6 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" - -gcc7build: clean - gcc-7 -v - CC=gcc-7 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" - -clangbuild: clean - clang -v - CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all - -m32build: clean - gcc -v - $(MAKE) all32 - -armbuild: clean - CC=arm-linux-gnueabi-gcc CFLAGS="-Werror" $(MAKE) allzstd - -aarch64build: clean - CC=aarch64-linux-gnu-gcc CFLAGS="-Werror -O0" $(MAKE) allzstd - -ppcbuild: clean - CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) -j allzstd - -ppc64build: clean - CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) -j allzstd - -.PHONY: armfuzz aarch64fuzz ppcfuzz ppc64fuzz -armfuzz: clean - CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest - -aarch64fuzz: clean - ld -v - CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest - -ppcfuzz: clean - CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest - -ppc64fuzz: clean - CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest - -.PHONY: cxxtest gcc5test gcc6test armtest aarch64test ppctest ppc64test -cxxtest: CXXFLAGS += -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -cxxtest: clean - $(MAKE) -C $(PRGDIR) all CC="$(CXX) -Wno-deprecated" CFLAGS="$(CXXFLAGS)" # adding -Wno-deprecated to avoid clang++ warning on dealing with C files directly - -gcc5test: clean - gcc-5 -v - $(MAKE) all CC=gcc-5 MOREFLAGS="-Werror $(MOREFLAGS)" - -gcc6test: clean - gcc-6 -v - $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror $(MOREFLAGS)" - -armtest: clean - $(MAKE) -C $(TESTDIR) datagen # use native, faster - $(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" - -aarch64test: - $(MAKE) -C $(TESTDIR) datagen # use native, faster - $(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" - -ppctest: clean - $(MAKE) -C $(TESTDIR) datagen # use native, faster - $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" - -ppc64test: clean - $(MAKE) -C $(TESTDIR) datagen # use native, faster - $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" - -.PHONY: arm-ppc-compilation -arm-ppc-compilation: - $(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" - $(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" - $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)" - $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)" - -regressiontest: - $(MAKE) -C $(FUZZDIR) regressiontest - -uasanregressiontest: - $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=address,undefined -Werror" CXXFLAGS="-O3 -fsanitize=address,undefined -Werror" - -msanregressiontest: - $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory -Werror" CXXFLAGS="-O3 -fsanitize=memory -Werror" - -update_regressionResults : REGRESS_RESULTS_DIR := /tmp/regress_results_dir/ -update_regressionResults: - $(MAKE) -j -C programs zstd - $(MAKE) -j -C tests/regression test - $(RM) -r $(REGRESS_RESULTS_DIR) - $(MKDIR) $(REGRESS_RESULTS_DIR) - ./tests/regression/test \ - --cache tests/regression/cache \ - --output $(REGRESS_RESULTS_DIR)/results.csv \ - --zstd programs/zstd - echo "Showing results differences" - ! diff tests/regression/results.csv $(REGRESS_RESULTS_DIR)/results.csv - echo "Updating results.csv" - $(CP) $(REGRESS_RESULTS_DIR)/results.csv tests/regression/results.csv - - -# run UBsan with -fsanitize-recover=pointer-overflow -# this only works with recent compilers such as gcc 8+ -usan: clean - $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=undefined -Werror $(MOREFLAGS)" - -asan: clean - $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror $(MOREFLAGS)" - -asan-%: clean - LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* - -msan: clean - $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" HAVE_LZMA=0 # datagen.c fails this test for no obvious reason - -msan-%: - $(MAKE) clean - LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -j -C $(TESTDIR) HAVE_LZMA=0 $* - -asan32: clean - $(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address $(MOREFLAGS)" - -uasan: clean - $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)" - -uasan-%: clean - LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* - -tsan-%: clean - LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" - -.PHONY: apt-install -apt-install: - # TODO: uncomment once issue 3011 is resolved and remove hack from Github Actions .yml - # sudo apt-get update - sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES) - -.PHONY: apt-add-repo -apt-add-repo: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update -y -qq - -.PHONY: ppcinstall arminstall valgrindinstall libc6install gcc6install gcc7install gcc8install gpp6install clang38install lz4install -ppcinstall: - APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install - -arminstall: - APT_PACKAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install - -valgrindinstall: - APT_PACKAGES="valgrind" $(MAKE) apt-install - -libc6install: - APT_PACKAGES="libc6-dev-i386 gcc-multilib" $(MAKE) apt-install - -gcc6install: apt-add-repo - APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-6 gcc-6-multilib" $(MAKE) apt-install - -gcc7install: apt-add-repo - APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib" $(MAKE) apt-install - -gcc8install: apt-add-repo - APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib" $(MAKE) apt-install - -gpp6install: apt-add-repo - APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install - -clang38install: - APT_PACKAGES="clang-3.8" $(MAKE) apt-install - -# Ubuntu 14.04 ships a too-old lz4 -lz4install: - [ -e lz4 ] || git clone https://github.com/lz4/lz4 && sudo $(MAKE) -C lz4 install - -endif - - -ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname') )) -HOST_OS = MSYS -endif - -#------------------------------------------------------------------------ -# target specific tests -#------------------------------------------------------------------------ -ifneq (,$(filter MSYS POSIX,$(HOST_OS))) - -CMAKE ?= cmake -CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON - -ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname'))) -CMAKE_PARAMS = -G"MSYS Makefiles" -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -endif - -.PHONY: cmakebuild -cmakebuild: - $(CMAKE) --version - $(RM) -r cmakebuild install - $(MKDIR) cmakebuild install - cd cmakebuild; $(CMAKE) -Wdev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror -O0" -DCMAKE_INSTALL_PREFIX=install $(CMAKE_PARAMS) ../build/cmake - $(CMAKE) --build cmakebuild --target install -- -j V=1 - cd cmakebuild; ctest -V -L Medium - -MESON ?= meson -NINJA ?= ninja - -.PHONY: mesonbuild -mesonbuild: - $(MESON) setup \ - --buildtype=debugoptimized \ - -Db_lundef=false \ - -Dauto_features=enabled \ - -Dbin_programs=true \ - -Dbin_tests=true \ - -Dbin_contrib=true \ - -Ddefault_library=both \ - build/meson mesonbuild - $(NINJA) -C mesonbuild/ - $(MESON) test -C mesonbuild/ --print-errorlogs - $(MESON) install -C mesonbuild --destdir staging/ - -.PHONY: c89build gnu90build c99build gnu99build c11build bmix64build bmix32build bmi32build staticAnalyze -c89build: clean - $(CC) -v - CFLAGS="-std=c89 -Werror -Wno-attributes -Wpedantic -Wno-long-long -Wno-variadic-macros -O0" $(MAKE) lib zstd - -gnu90build: clean - $(CC) -v - CFLAGS="-std=gnu90 -Werror -O0" $(MAKE) allmost - -c99build: clean - $(CC) -v - CFLAGS="-std=c99 -Werror -O0" $(MAKE) allmost - -gnu99build: clean - $(CC) -v - CFLAGS="-std=gnu99 -Werror -O0" $(MAKE) allmost - -c11build: clean - $(CC) -v - CFLAGS="-std=c11 -Werror -O0" $(MAKE) allmost - -bmix64build: clean - $(CC) -v - CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(TESTDIR) test - -bmix32build: clean - $(CC) -v - CFLAGS="-O3 -mbmi -mx32 -Werror" $(MAKE) -C $(TESTDIR) test - -bmi32build: clean - $(CC) -v - CFLAGS="-O3 -mbmi -m32 -Werror" $(MAKE) -C $(TESTDIR) test - -# static analyzer test uses clang's scan-build -# does not analyze zlibWrapper, due to detected issues in zlib source code -staticAnalyze: SCANBUILD ?= scan-build -staticAnalyze: - $(CC) -v - CC=$(CC) CPPFLAGS=-g $(SCANBUILD) --status-bugs -v $(MAKE) zstd -endif diff --git a/third_party/zstd/Package.swift b/third_party/zstd/Package.swift deleted file mode 100644 index 97f2c6a..0000000 --- a/third_party/zstd/Package.swift +++ /dev/null @@ -1,36 +0,0 @@ -// swift-tools-version:5.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "zstd", - platforms: [ - .macOS(.v10_10), .iOS(.v9), .tvOS(.v9) - ], - products: [ - // Products define the executables and libraries a package produces, and make them visible to other packages. - .library( - name: "libzstd", - targets: [ "libzstd" ]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages this package depends on. - .target( - name: "libzstd", - path: "lib", - sources: [ "common", "compress", "decompress", "dictBuilder" ], - publicHeadersPath: ".", - cSettings: [ - .headerSearchPath(".") - ]) - ], - swiftLanguageVersions: [.v5], - cLanguageStandard: .gnu11, - cxxLanguageStandard: .gnucxx14 -) diff --git a/third_party/zstd/README.md b/third_party/zstd/README.md deleted file mode 100644 index d91ef5d..0000000 --- a/third_party/zstd/README.md +++ /dev/null @@ -1,237 +0,0 @@ -

Zstandard

- -__Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm, -targeting real-time compression scenarios at zlib-level and better compression ratios. -It's backed by a very fast entropy stage, provided by [Huff0 and FSE library](https://github.com/Cyan4973/FiniteStateEntropy). - -Zstandard's format is stable and documented in [RFC8878](https://datatracker.ietf.org/doc/html/rfc8878). Multiple independent implementations are already available. -This repository represents the reference implementation, provided as an open-source dual [BSD](LICENSE) OR [GPLv2](COPYING) licensed **C** library, -and a command line utility producing and decoding `.zst`, `.gz`, `.xz` and `.lz4` files. -Should your project require another programming language, -a list of known ports and bindings is provided on [Zstandard homepage](https://facebook.github.io/zstd/#other-languages). - -**Development branch status:** - -[![Build Status][travisDevBadge]][travisLink] -[![Build status][CircleDevBadge]][CircleLink] -[![Build status][CirrusDevBadge]][CirrusLink] -[![Fuzzing Status][OSSFuzzBadge]][OSSFuzzLink] - -[travisDevBadge]: https://api.travis-ci.com/facebook/zstd.svg?branch=dev "Continuous Integration test suite" -[travisLink]: https://travis-ci.com/facebook/zstd -[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" -[CircleLink]: https://circleci.com/gh/facebook/zstd -[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev -[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd -[OSSFuzzBadge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/zstd.svg -[OSSFuzzLink]: https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zstd - -## Benchmarks - -For reference, several fast compression algorithms were tested and compared -on a desktop featuring a Core i7-9700K CPU @ 4.9GHz -and running Ubuntu 20.04 (`Linux ubu20 5.15.0-101-generic`), -using [lzbench], an open-source in-memory benchmark by @inikep -compiled with [gcc] 9.4.0, -on the [Silesia compression corpus]. - -[lzbench]: https://github.com/inikep/lzbench -[Silesia compression corpus]: https://sun.aei.polsl.pl//~sdeor/index.php?page=silesia -[gcc]: https://gcc.gnu.org/ - -| Compressor name | Ratio | Compression| Decompress.| -| --------------- | ------| -----------| ---------- | -| **zstd 1.5.6 -1** | 2.887 | 510 MB/s | 1580 MB/s | -| [zlib] 1.2.11 -1 | 2.743 | 95 MB/s | 400 MB/s | -| brotli 1.0.9 -0 | 2.702 | 395 MB/s | 430 MB/s | -| **zstd 1.5.6 --fast=1** | 2.437 | 545 MB/s | 1890 MB/s | -| **zstd 1.5.6 --fast=3** | 2.239 | 650 MB/s | 2000 MB/s | -| quicklz 1.5.0 -1 | 2.238 | 525 MB/s | 750 MB/s | -| lzo1x 2.10 -1 | 2.106 | 650 MB/s | 825 MB/s | -| [lz4] 1.9.4 | 2.101 | 700 MB/s | 4000 MB/s | -| lzf 3.6 -1 | 2.077 | 420 MB/s | 830 MB/s | -| snappy 1.1.9 | 2.073 | 530 MB/s | 1660 MB/s | - -[zlib]: https://www.zlib.net/ -[lz4]: https://lz4.github.io/lz4/ - -The negative compression levels, specified with `--fast=#`, -offer faster compression and decompression speed -at the cost of compression ratio. - -Zstd can also offer stronger compression ratios at the cost of compression speed. -Speed vs Compression trade-off is configurable by small increments. -Decompression speed is preserved and remains roughly the same at all settings, -a property shared by most LZ compression algorithms, such as [zlib] or lzma. - -The following tests were run -on a server running Linux Debian (`Linux version 4.14.0-3-amd64`) -with a Core i7-6700K CPU @ 4.0GHz, -using [lzbench], an open-source in-memory benchmark by @inikep -compiled with [gcc] 7.3.0, -on the [Silesia compression corpus]. - -Compression Speed vs Ratio | Decompression Speed ----------------------------|-------------------- -![Compression Speed vs Ratio](doc/images/CSpeed2.png "Compression Speed vs Ratio") | ![Decompression Speed](doc/images/DSpeed3.png "Decompression Speed") - -A few other algorithms can produce higher compression ratios at slower speeds, falling outside of the graph. -For a larger picture including slow modes, [click on this link](doc/images/DCspeed5.png). - - -## The case for Small Data compression - -Previous charts provide results applicable to typical file and stream scenarios (several MB). Small data comes with different perspectives. - -The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms, and reason is, compression algorithms learn from past data how to compress future data. But at the beginning of a new data set, there is no "past" to build upon. - -To solve this situation, Zstd offers a __training mode__, which can be used to tune the algorithm for a selected type of data. -Training Zstandard is achieved by providing it with a few samples (one file per sample). The result of this training is stored in a file called "dictionary", which must be loaded before compression and decompression. -Using this dictionary, the compression ratio achievable on small data improves dramatically. - -The following example uses the `github-users` [sample set](https://github.com/facebook/zstd/releases/tag/v1.1.3), created from [github public API](https://developer.github.com/v3/users/#get-all-users). -It consists of roughly 10K records weighing about 1KB each. - -Compression Ratio | Compression Speed | Decompression Speed -------------------|-------------------|-------------------- -![Compression Ratio](doc/images/dict-cr.png "Compression Ratio") | ![Compression Speed](doc/images/dict-cs.png "Compression Speed") | ![Decompression Speed](doc/images/dict-ds.png "Decompression Speed") - - -These compression gains are achieved while simultaneously providing _faster_ compression and decompression speeds. - -Training works if there is some correlation in a family of small data samples. The more data-specific a dictionary is, the more efficient it is (there is no _universal dictionary_). -Hence, deploying one dictionary per type of data will provide the greatest benefits. -Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file. - -### Dictionary compression How To: - -1. Create the dictionary - - `zstd --train FullPathToTrainingSet/* -o dictionaryName` - -2. Compress with dictionary - - `zstd -D dictionaryName FILE` - -3. Decompress with dictionary - - `zstd -D dictionaryName --decompress FILE.zst` - - -## Build instructions - -`make` is the officially maintained build system of this project. -All other build systems are "compatible" and 3rd-party maintained, -they may feature small differences in advanced options. -When your system allows it, prefer using `make` to build `zstd` and `libzstd`. - -### Makefile - -If your system is compatible with standard `make` (or `gmake`), -invoking `make` in root directory will generate `zstd` cli in root directory. -It will also create `libzstd` into `lib/`. - -Other available options include: -- `make install` : create and install zstd cli, library and man pages -- `make check` : create and run `zstd`, test its behavior on local platform - -The `Makefile` follows the [GNU Standard Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html), -allowing staged install, standard flags, directory variables and command variables. - -For advanced use cases, specialized compilation flags which control binary generation -are documented in [`lib/README.md`](lib/README.md#modular-build) for the `libzstd` library -and in [`programs/README.md`](programs/README.md#compilation-variables) for the `zstd` CLI. - -### cmake - -A `cmake` project generator is provided within `build/cmake`. -It can generate Makefiles or other build scripts -to create `zstd` binary, and `libzstd` dynamic and static libraries. - -By default, `CMAKE_BUILD_TYPE` is set to `Release`. - -#### Support for Fat (Universal2) Output - -`zstd` can be built and installed with support for both Apple Silicon (M1/M2) as well as Intel by using CMake's Universal2 support. -To perform a Fat/Universal2 build and install use the following commands: - -```bash -cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64" -cd build-cmake-debug -ninja -sudo ninja install -``` - -### Meson - -A Meson project is provided within [`build/meson`](build/meson). Follow -build instructions in that directory. - -You can also take a look at [`.travis.yml`](.travis.yml) file for an -example about how Meson is used to build this project. - -Note that default build type is **release**. - -### VCPKG -You can build and install zstd [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: - - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.sh - ./vcpkg integrate install - ./vcpkg install zstd - -The zstd port in vcpkg is kept up to date by Microsoft team members and community contributors. -If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. - -### Conan - -You can install pre-built binaries for zstd or build it from source using [Conan](https://conan.io/). Use the following command: - -```bash -conan install --requires="zstd/[*]" --build=missing -``` - -The zstd Conan recipe is kept up to date by Conan maintainers and community contributors. -If the version is out of date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the ConanCenterIndex repository. - -### Visual Studio (Windows) - -Going into `build` directory, you will find additional possibilities: -- Projects for Visual Studio 2005, 2008 and 2010. - + VS2010 project is compatible with VS2012, VS2013, VS2015 and VS2017. -- Automated build scripts for Visual compiler by [@KrzysFR](https://github.com/KrzysFR), in `build/VS_scripts`, - which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution. - -### Buck - -You can build the zstd binary via buck by executing: `buck build programs:zstd` from the root of the repo. -The output binary will be in `buck-out/gen/programs/`. - -### Bazel - -You easily can integrate zstd into your Bazel project by using the module hosted on the [Bazel Central Repository](https://registry.bazel.build/modules/zstd). - -## Testing - -You can run quick local smoke tests by running `make check`. -If you can't use `make`, execute the `playTest.sh` script from the `src/tests` directory. -Two env variables `$ZSTD_BIN` and `$DATAGEN_BIN` are needed for the test script to locate the `zstd` and `datagen` binary. -For information on CI testing, please refer to `TESTING.md`. - -## Status - -Zstandard is currently deployed within Facebook and many other large cloud infrastructures. -It is run continuously to compress large amounts of data in multiple formats and use cases. -Zstandard is considered safe for production environments. - -## License - -Zstandard is dual-licensed under [BSD](LICENSE) OR [GPLv2](COPYING). - -## Contributing - -The `dev` branch is the one where all contributions are merged before reaching `release`. -If you plan to propose a patch, please commit into the `dev` branch, or its own feature branch. -Direct commit to `release` are not permitted. -For more information, please read [CONTRIBUTING](CONTRIBUTING.md). diff --git a/third_party/zstd/SECURITY.md b/third_party/zstd/SECURITY.md deleted file mode 100644 index a5f9a7e..0000000 --- a/third_party/zstd/SECURITY.md +++ /dev/null @@ -1,15 +0,0 @@ -# Reporting and Fixing Security Issues - -Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors. Security issues in this open source project can be safely reported via the Meta Bug Bounty program: - -https://www.facebook.com/whitehat - -Meta's security team will triage your report and determine whether or not is it eligible for a bounty under our program. - -# Receiving Vulnerability Notifications - -In the case that a significant security vulnerability is reported to us or discovered by us---without being publicly known---we will, at our discretion, notify high-profile, high-exposure users of Zstandard ahead of our public disclosure of the issue and associated fix. - -If you believe your project would benefit from inclusion in this list, please reach out to one of the maintainers. - - diff --git a/third_party/zstd/TESTING.md b/third_party/zstd/TESTING.md deleted file mode 100644 index df842cc..0000000 --- a/third_party/zstd/TESTING.md +++ /dev/null @@ -1,43 +0,0 @@ -Testing -======= - -Zstandard CI testing is split up into three sections: -short, medium, and long tests. - -Short Tests ------------ -Short tests run on CircleCI for new commits on every branch and pull request. -They consist of the following tests: -- Compilation on all supported targets (x86, x86_64, ARM, AArch64, PowerPC, and PowerPC64) -- Compilation on various versions of gcc, clang, and g++ -- `tests/playTests.sh` on x86_64, without the tests on long data (CLI tests) -- Small tests (`tests/legacy.c`, `tests/longmatch.c`) on x64_64 - -Medium Tests ------------- -Medium tests run on every commit and pull request to `dev` branch, on TravisCI. -They consist of the following tests: -- The following tests run with UBsan and Asan on x86_64 and x86, as well as with - Msan on x86_64 - - `tests/playTests.sh --test-large-data` - - Fuzzer tests: `tests/fuzzer.c`, `tests/zstreamtest.c`, and `tests/decodecorpus.c` -- `tests/zstreamtest.c` under Tsan (streaming mode, including multithreaded mode) -- Valgrind Test (`make -C tests test-valgrind`) (testing CLI and fuzzer under `valgrind`) -- Fuzzer tests (see above) on ARM, AArch64, PowerPC, and PowerPC64 - -Long Tests ----------- -Long tests run on all commits to `release` branch, -and once a day on the current version of `dev` branch, -on TravisCI. -They consist of the following tests: -- Entire test suite (including fuzzers and some other specialized tests) on: - - x86_64 and x86 with UBsan and Asan - - x86_64 with Msan - - ARM, AArch64, PowerPC, and PowerPC64 -- Streaming mode fuzzer with Tsan (for the `zstdmt` testing) -- ZlibWrapper tests, including under valgrind -- Versions test (ensuring `zstd` can decode files from all previous versions) -- `pzstd` with asan and tsan, as well as in 32-bits mode -- Testing `zstd` with legacy mode off -- Entire test suite and make install on macOS diff --git a/third_party/zstd/build/.gitignore b/third_party/zstd/build/.gitignore deleted file mode 100644 index 5a18b30..0000000 --- a/third_party/zstd/build/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Visual C++ -.vs/ -*Copy -*.db -*.opensdf -*.sdf -*.suo -*.user -*.opendb - -VS2008/bin/ -VS2010/bin/ -VS2010/zwrapbench/ -VS2012/ -VS2013/ -VS2015/ -Studio* - -# CMake -cmake/build/ -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -build -lib -!cmake/lib -!meson/lib diff --git a/third_party/zstd/build/LICENSE b/third_party/zstd/build/LICENSE deleted file mode 100644 index e69de29..0000000 diff --git a/third_party/zstd/build/README.md b/third_party/zstd/build/README.md deleted file mode 100644 index 23f92ce..0000000 --- a/third_party/zstd/build/README.md +++ /dev/null @@ -1,56 +0,0 @@ -Projects for various integrated development environments (IDE) -============================================================== - -#### Included projects - -The following projects are included with the zstd distribution: -- `cmake` - CMake project contributed by Artyom Dymchenko -- `VS2005` - Visual Studio 2005 Project (this project has been moved to the contrib directory and will no longer be supported) -- `VS2008` - Visual Studio 2008 project -- `VS2010` - Visual Studio 2010 project (which also works well with Visual Studio 2012, 2013, 2015) -- `VS_scripts` - command line scripts prepared for Visual Studio compilation without IDE - - -#### How to compile zstd with Visual Studio - -1. Install Visual Studio e.g. VS 2015 Community Edition (it's free). -2. Download the latest version of zstd from https://github.com/facebook/zstd/releases -3. Decompress ZIP archive. -4. Go to decompressed directory then to `projects` then `VS2010` and open `zstd.sln` -5. Visual Studio will ask about converting VS2010 project to VS2015 and you should agree. -6. Change `Debug` to `Release` and if you have 64-bit Windows change also `Win32` to `x64`. -7. Press F7 on keyboard or select `BUILD` from the menu bar and choose `Build Solution`. -8. If compilation will be fine a compiled executable will be in `projects\VS2010\bin\x64\Release\zstd.exe` - - -#### Projects available within zstd.sln - -The Visual Studio solution file `visual\VS2010\zstd.sln` contains many projects that will be compiled to the -`visual\VS2010\bin\$(Platform)_$(Configuration)` directory. For example `zstd` set to `x64` and -`Release` will be compiled to `visual\VS2010\bin\x64_Release\zstd.exe`. The solution file contains the -following projects: - -- `zstd` : Command Line Utility, supporting gzip-like arguments -- `datagen` : Synthetic and parametrable data generator, for tests -- `fullbench` : Precisely measure speed for each zstd inner functions -- `fuzzer` : Test tool, to check zstd integrity on target platform -- `libzstd` : A static ZSTD library compiled to `libzstd_static.lib` -- `libzstd-dll` : A dynamic ZSTD library (DLL) compiled to `libzstd.dll` with the import library `libzstd.lib` -- `fullbench-dll` : The fullbench program compiled with the import library; the executable requires ZSTD DLL - - -#### Using ZSTD DLL with Microsoft Visual C++ project - -The header file `lib\zstd.h` and the import library -`visual\VS2010\bin\$(Platform)_$(Configuration)\libzstd.lib` are required to compile -a project using Visual C++. - -1. The path to header files should be added to `Additional Include Directories` that can - be found in Project Properties of Visual Studio IDE in the `C/C++` Property Pages on the `General` page. -2. The import library has to be added to `Additional Dependencies` that can - be found in Project Properties in the `Linker` Property Pages on the `Input` page. - If one will provide only the name `libzstd.lib` without a full path to the library - then the directory has to be added to `Linker\General\Additional Library Directories`. - -The compiled executable will require ZSTD DLL which is available at -`visual\VS2010\bin\$(Platform)_$(Configuration)\libzstd.dll`. diff --git a/third_party/zstd/build/VS2008/fullbench/fullbench.vcproj b/third_party/zstd/build/VS2008/fullbench/fullbench.vcproj deleted file mode 100644 index 5e349dc..0000000 --- a/third_party/zstd/build/VS2008/fullbench/fullbench.vcproj +++ /dev/null @@ -1,549 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2008/fuzzer/fuzzer.vcproj b/third_party/zstd/build/VS2008/fuzzer/fuzzer.vcproj deleted file mode 100644 index 32f2846..0000000 --- a/third_party/zstd/build/VS2008/fuzzer/fuzzer.vcproj +++ /dev/null @@ -1,585 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2008/zstd.sln b/third_party/zstd/build/VS2008/zstd.sln deleted file mode 100644 index 97b88c8..0000000 --- a/third_party/zstd/build/VS2008/zstd.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd\zstd.vcproj", "{1A2AB08E-5CE7-4C5B-BE55-458157C14051}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcproj", "{A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcproj", "{CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstdlib", "zstdlib\zstdlib.vcproj", "{99DE2A79-7298-4004-A0ED-030D7A3796CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.ActiveCfg = Debug|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.Build.0 = Debug|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.ActiveCfg = Debug|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.Build.0 = Debug|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.ActiveCfg = Release|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.Build.0 = Release|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.ActiveCfg = Release|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.Build.0 = Release|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.Build.0 = Debug|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.ActiveCfg = Debug|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.Build.0 = Debug|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.ActiveCfg = Release|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.Build.0 = Release|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.ActiveCfg = Release|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.Build.0 = Release|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.Build.0 = Debug|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.ActiveCfg = Debug|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.Build.0 = Debug|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.ActiveCfg = Release|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.Build.0 = Release|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.ActiveCfg = Release|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.Build.0 = Release|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.Build.0 = Debug|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.ActiveCfg = Debug|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.Build.0 = Debug|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.ActiveCfg = Release|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.Build.0 = Release|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.ActiveCfg = Release|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zstd/build/VS2008/zstd/zstd.vcproj b/third_party/zstd/build/VS2008/zstd/zstd.vcproj deleted file mode 100644 index de1501d..0000000 --- a/third_party/zstd/build/VS2008/zstd/zstd.vcproj +++ /dev/null @@ -1,677 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2008/zstdlib/zstdlib.vcproj b/third_party/zstd/build/VS2008/zstdlib/zstdlib.vcproj deleted file mode 100644 index 88c1aee..0000000 --- a/third_party/zstd/build/VS2008/zstdlib/zstdlib.vcproj +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2010/CompileAsCpp.props b/third_party/zstd/build/VS2010/CompileAsCpp.props deleted file mode 100644 index 372a94b..0000000 --- a/third_party/zstd/build/VS2010/CompileAsCpp.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - CompileAsCpp - - - diff --git a/third_party/zstd/build/VS2010/datagen/datagen.vcxproj b/third_party/zstd/build/VS2010/datagen/datagen.vcxproj deleted file mode 100644 index aaba478..0000000 --- a/third_party/zstd/build/VS2010/datagen/datagen.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {037E781E-81A6-494B-B1B3-438AB1200523} - Win32Proj - datagen - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - false - $(IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - - - true - false - $(IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - - - false - false - $(IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - - - false - false - $(IncludePath);$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2010/fullbench/fullbench.vcxproj b/third_party/zstd/build/VS2010/fullbench/fullbench.vcxproj deleted file mode 100644 index c78a72e..0000000 --- a/third_party/zstd/build/VS2010/fullbench/fullbench.vcxproj +++ /dev/null @@ -1,220 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8} - Win32Proj - fullbench - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2010/fuzzer/fuzzer.vcxproj b/third_party/zstd/build/VS2010/fuzzer/fuzzer.vcxproj deleted file mode 100644 index ccbd251..0000000 --- a/third_party/zstd/build/VS2010/fuzzer/fuzzer.vcxproj +++ /dev/null @@ -1,224 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6FD4352B-346C-4703-96EA-D4A8B9A6976E} - Win32Proj - fuzzer - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress;$(UniversalCRT_IncludePath); - - - true - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress;$(UniversalCRT_IncludePath); - - - false - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress;$(UniversalCRT_IncludePath); - - - false - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress;$(UniversalCRT_IncludePath); - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - - - Console - true - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc b/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc deleted file mode 100644 index 13e8746..0000000 --- a/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc +++ /dev/null @@ -1,51 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// - -#include "zstd.h" /* ZSTD_VERSION_STRING */ -#define APSTUDIO_READONLY_SYMBOLS -#include "verrsrc.h" -#undef APSTUDIO_READONLY_SYMBOLS - - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE 9, 1 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION ZSTD_VERSION_MAJOR,ZSTD_VERSION_MINOR,ZSTD_VERSION_RELEASE,0 - PRODUCTVERSION ZSTD_VERSION_MAJOR,ZSTD_VERSION_MINOR,ZSTD_VERSION_RELEASE,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "Meta Platforms, Inc." - VALUE "FileDescription", "Zstandard - Fast and efficient compression algorithm" - VALUE "FileVersion", ZSTD_VERSION_STRING - VALUE "InternalName", "libzstd.dll" - VALUE "LegalCopyright", "Copyright (c) Meta Platforms, Inc. and affiliates." - VALUE "OriginalFilename", "libzstd.dll" - VALUE "ProductName", "Zstandard" - VALUE "ProductVersion", ZSTD_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1200 - END -END - -#endif diff --git a/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj b/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj deleted file mode 100644 index 6925e0f..0000000 --- a/third_party/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj +++ /dev/null @@ -1,250 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {00000000-94D5-4BF9-8A50-7BD9929A0850} - Win32Proj - libzstd-dll - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - DynamicLibrary - true - MultiByte - - - DynamicLibrary - true - MultiByte - - - DynamicLibrary - false - true - MultiByte - - - DynamicLibrary - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - libzstd - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - true - libzstd - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - false - libzstd - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - false - libzstd - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - - - - Level4 - Disabled - ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - EditAndContinue - true - false - - - Console - true - MachineX86 - - - - - - - Level4 - Disabled - ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - ProgramDatabase - false - - - Console - true - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - MultiThreaded - ProgramDatabase - - - Console - true - true - true - MachineX86 - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - false - MultiThreaded - ProgramDatabase - true - true - - - Console - true - true - true - - - - - - diff --git a/third_party/zstd/build/VS2010/libzstd/libzstd.vcxproj b/third_party/zstd/build/VS2010/libzstd/libzstd.vcxproj deleted file mode 100644 index 82a2d82..0000000 --- a/third_party/zstd/build/VS2010/libzstd/libzstd.vcxproj +++ /dev/null @@ -1,243 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850} - Win32Proj - libzstd - libzstd_static - MultiByte - StaticLibrary - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - true - - - true - - - false - true - - - false - true - - - - - - - - - - - - - - - - - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - - - - $(OutDir)$(TargetName).pdb - - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - EditAndContinue - true - false - - - Console - true - MachineX86 - - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - ProgramDatabase - false - - - Console - true - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - MultiThreaded - ProgramDatabase - - - Console - true - true - true - MachineX86 - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - false - MultiThreaded - ProgramDatabase - true - true - - - Console - true - true - true - - - - - - diff --git a/third_party/zstd/build/VS2010/zstd.sln b/third_party/zstd/build/VS2010/zstd.sln deleted file mode 100644 index 528aae8..0000000 --- a/third_party/zstd/build/VS2010/zstd.sln +++ /dev/null @@ -1,84 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd\zstd.vcxproj", "{4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcxproj", "{6FD4352B-346C-4703-96EA-D4A8B9A6976E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcxproj", "{61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "datagen", "datagen\datagen.vcxproj", "{037E781E-81A6-494B-B1B3-438AB1200523}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzstd", "libzstd\libzstd.vcxproj", "{8BFD8150-94D5-4BF9-8A50-7BD9929A0850}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzstd-dll", "libzstd-dll\libzstd-dll.vcxproj", "{00000000-94D5-4BF9-8A50-7BD9929A0850}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Debug|Win32.ActiveCfg = Debug|Win32 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Debug|Win32.Build.0 = Debug|Win32 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Debug|x64.ActiveCfg = Debug|x64 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Debug|x64.Build.0 = Debug|x64 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Release|Win32.ActiveCfg = Release|Win32 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Release|Win32.Build.0 = Release|Win32 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Release|x64.ActiveCfg = Release|x64 - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C}.Release|x64.Build.0 = Release|x64 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Debug|Win32.ActiveCfg = Debug|Win32 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Debug|Win32.Build.0 = Debug|Win32 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Debug|x64.ActiveCfg = Debug|x64 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Debug|x64.Build.0 = Debug|x64 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Release|Win32.ActiveCfg = Release|Win32 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Release|Win32.Build.0 = Release|Win32 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Release|x64.ActiveCfg = Release|x64 - {6FD4352B-346C-4703-96EA-D4A8B9A6976E}.Release|x64.Build.0 = Release|x64 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|Win32.Build.0 = Debug|Win32 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|x64.ActiveCfg = Debug|x64 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|x64.Build.0 = Debug|x64 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|Win32.ActiveCfg = Release|Win32 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|Win32.Build.0 = Release|Win32 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|x64.ActiveCfg = Release|x64 - {61ABD629-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|x64.Build.0 = Release|x64 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|Win32.Build.0 = Debug|Win32 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|x64.ActiveCfg = Debug|x64 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Debug|x64.Build.0 = Debug|x64 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|Win32.ActiveCfg = Release|Win32 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|Win32.Build.0 = Release|Win32 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|x64.ActiveCfg = Release|x64 - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8}.Release|x64.Build.0 = Release|x64 - {037E781E-81A6-494B-B1B3-438AB1200523}.Debug|Win32.ActiveCfg = Debug|Win32 - {037E781E-81A6-494B-B1B3-438AB1200523}.Debug|Win32.Build.0 = Debug|Win32 - {037E781E-81A6-494B-B1B3-438AB1200523}.Debug|x64.ActiveCfg = Debug|x64 - {037E781E-81A6-494B-B1B3-438AB1200523}.Debug|x64.Build.0 = Debug|x64 - {037E781E-81A6-494B-B1B3-438AB1200523}.Release|Win32.ActiveCfg = Release|Win32 - {037E781E-81A6-494B-B1B3-438AB1200523}.Release|Win32.Build.0 = Release|Win32 - {037E781E-81A6-494B-B1B3-438AB1200523}.Release|x64.ActiveCfg = Release|x64 - {037E781E-81A6-494B-B1B3-438AB1200523}.Release|x64.Build.0 = Release|x64 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Debug|Win32.ActiveCfg = Debug|Win32 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Debug|Win32.Build.0 = Debug|Win32 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Debug|x64.ActiveCfg = Debug|x64 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Debug|x64.Build.0 = Debug|x64 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Release|Win32.ActiveCfg = Release|Win32 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Release|Win32.Build.0 = Release|Win32 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Release|x64.ActiveCfg = Release|x64 - {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}.Release|x64.Build.0 = Release|x64 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Debug|Win32.ActiveCfg = Debug|Win32 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Debug|Win32.Build.0 = Debug|Win32 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Debug|x64.ActiveCfg = Debug|x64 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Debug|x64.Build.0 = Debug|x64 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Release|Win32.ActiveCfg = Release|Win32 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Release|Win32.Build.0 = Release|Win32 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Release|x64.ActiveCfg = Release|x64 - {00000000-94D5-4BF9-8A50-7BD9929A0850}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zstd/build/VS2010/zstd/zstd.rc b/third_party/zstd/build/VS2010/zstd/zstd.rc deleted file mode 100644 index a2118c2..0000000 --- a/third_party/zstd/build/VS2010/zstd/zstd.rc +++ /dev/null @@ -1,51 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// - -#include "zstd.h" /* ZSTD_VERSION_STRING */ -#define APSTUDIO_READONLY_SYMBOLS -#include "verrsrc.h" -#undef APSTUDIO_READONLY_SYMBOLS - - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE 9, 1 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION ZSTD_VERSION_MAJOR,ZSTD_VERSION_MINOR,ZSTD_VERSION_RELEASE,0 - PRODUCTVERSION ZSTD_VERSION_MAJOR,ZSTD_VERSION_MINOR,ZSTD_VERSION_RELEASE,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "Meta Platforms, Inc." - VALUE "FileDescription", "Zstandard - Fast and efficient compression algorithm" - VALUE "FileVersion", ZSTD_VERSION_STRING - VALUE "InternalName", "zstd.exe" - VALUE "LegalCopyright", "Copyright (c) Meta Platforms, Inc. and affiliates." - VALUE "OriginalFilename", "zstd.exe" - VALUE "ProductName", "Zstandard" - VALUE "ProductVersion", ZSTD_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1200 - END -END - -#endif diff --git a/third_party/zstd/build/VS2010/zstd/zstd.vcxproj b/third_party/zstd/build/VS2010/zstd/zstd.vcxproj deleted file mode 100644 index 0558687..0000000 --- a/third_party/zstd/build/VS2010/zstd/zstd.vcxproj +++ /dev/null @@ -1,266 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C} - Win32Proj - zstd - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - NotSet - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\compress;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - $(LibraryPath) - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\compress;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - $(LibraryPath); - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\compress;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - $(LibraryPath) - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\compress;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\dictBuilder;$(UniversalCRT_IncludePath); - false - $(LibraryPath); - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - $(InstructionSet) - - - Console - true - setargv.obj;%(AdditionalDependencies) - - - - - - - Level4 - Disabled - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - false - $(InstructionSet) - - - Console - true - setargv.obj;%(AdditionalDependencies) - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - $(InstructionSet) - - - Console - true - true - true - setargv.obj;%(AdditionalDependencies) - - - - - Level4 - - - MaxSpeed - true - true - ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - false - false - MultiThreaded - /DZSTD_MULTITHREAD %(AdditionalOptions) - $(InstructionSet) - - - Console - true - true - true - setargv.obj;%(AdditionalDependencies) - - - - - - diff --git a/third_party/zstd/build/VS_scripts/README.md b/third_party/zstd/build/VS_scripts/README.md deleted file mode 100644 index 6ccaca7..0000000 --- a/third_party/zstd/build/VS_scripts/README.md +++ /dev/null @@ -1,64 +0,0 @@ -Command line scripts for Visual Studio compilation without IDE -============================================================== - -Here are a few command lines for reference : - -### Build with Visual Studio 2013 for msvcr120.dll - -Running the following command will build both the `Release Win32` and `Release x64` versions: -```batch -build.VS2013.cmd -``` -The result of each build will be in the corresponding `bin\Release\{ARCH}\` folder. - -If you want to only need one architecture: -- Win32: `build.generic.cmd VS2013 Win32 Release v120` -- x64: `build.generic.cmd VS2013 x64 Release v120` - -If you want a Debug build: -- Win32: `build.generic.cmd VS2013 Win32 Debug v120` -- x64: `build.generic.cmd VS2013 x64 Debug v120` - -### Build with Visual Studio 2015 for msvcr140.dll - -Running the following command will build both the `Release Win32` and `Release x64` versions: -```batch -build.VS2015.cmd -``` -The result of each build will be in the corresponding `bin\Release\{ARCH}\` folder. - -If you want to only need one architecture: -- Win32: `build.generic.cmd VS2015 Win32 Release v140` -- x64: `build.generic.cmd VS2015 x64 Release v140` - -If you want a Debug build: -- Win32: `build.generic.cmd VS2015 Win32 Debug v140` -- x64: `build.generic.cmd VS2015 x64 Debug v140` - -### Build with Visual Studio 2015 for msvcr120.dll - -This capability is offered through `build.generic.cmd` using proper arguments: - -**For Win32** -```batch -build.generic.cmd VS2015 Win32 Release v120 -``` -The result of the build will be in the `bin\Release\Win32\` folder. - -**For x64** -```batch -build.generic.cmd VS2015 x64 Release v120 -``` -The result of the build will be in the `bin\Release\x64\` folder. - -If you want Debug builds, replace `Release` with `Debug`. - -### Build with Visual Studio 2017 - -`build.VS2017.cmd`, contributed by [@HaydnTrigg](https://github.com/HaydnTrigg), -will build both the `Release Win32` and `Release x64` versions -of the first VS2017 variant it finds, in this priority order : -Enterprise > Professional > Community - -Alternatively, it's possible to target a specific version, -using appropriate script, such as `build.VS2017Enterprise.cmd` for example. diff --git a/third_party/zstd/build/VS_scripts/build.VS2010.cmd b/third_party/zstd/build/VS_scripts/build.VS2010.cmd deleted file mode 100644 index c3bc176..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2010.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2010 Win32 Release v100 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2010 x64 Release v100 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2012.cmd b/third_party/zstd/build/VS_scripts/build.VS2012.cmd deleted file mode 100644 index d7399a9..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2012.cmd +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2012 Win32 Release v110 -rem build 64-bit -call "%~p0%build.generic.cmd" VS2012 x64 Release v110 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2013.cmd b/third_party/zstd/build/VS_scripts/build.VS2013.cmd deleted file mode 100644 index 486ba6c..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2013.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2013 Win32 Release v120 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2013 x64 Release v120 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2015.cmd b/third_party/zstd/build/VS_scripts/build.VS2015.cmd deleted file mode 100644 index abc41c9..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2015.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2015 Win32 Release v140 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2015 x64 Release v140 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2017.cmd b/third_party/zstd/build/VS_scripts/build.VS2017.cmd deleted file mode 100644 index a810faa..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2017.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2017 Win32 Release v141 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2017 x64 Release v141 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2017Community.cmd b/third_party/zstd/build/VS_scripts/build.VS2017Community.cmd deleted file mode 100644 index 133e1b4..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2017Community.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2017Community Win32 Release v141 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2017Community x64 Release v141 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2017Enterprise.cmd b/third_party/zstd/build/VS_scripts/build.VS2017Enterprise.cmd deleted file mode 100644 index 6a70932..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2017Enterprise.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2017Enterprise Win32 Release v141 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2017Enterprise x64 Release v141 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VS2017Professional.cmd b/third_party/zstd/build/VS_scripts/build.VS2017Professional.cmd deleted file mode 100644 index d183519..0000000 --- a/third_party/zstd/build/VS_scripts/build.VS2017Professional.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" VS2017Professional Win32 Release v141 - -rem build 64-bit -call "%~p0%build.generic.cmd" VS2017Professional x64 Release v141 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.VSPreview.cmd b/third_party/zstd/build/VS_scripts/build.VSPreview.cmd deleted file mode 100644 index c594bb1..0000000 --- a/third_party/zstd/build/VS_scripts/build.VSPreview.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -rem build 32-bit -call "%~p0%build.generic.cmd" preview Win32 Release v143 - -rem build 64-bit -call "%~p0%build.generic.cmd" preview x64 Release v143 \ No newline at end of file diff --git a/third_party/zstd/build/VS_scripts/build.generic.cmd b/third_party/zstd/build/VS_scripts/build.generic.cmd deleted file mode 100644 index 0912d23..0000000 --- a/third_party/zstd/build/VS_scripts/build.generic.cmd +++ /dev/null @@ -1,67 +0,0 @@ -@echo off - -IF "%1%" == "" GOTO display_help - -SETLOCAL ENABLEDELAYEDEXPANSION - -SET msbuild_version=%1 - -SET msbuild_platform=%2 -IF "%msbuild_platform%" == "" SET msbuild_platform=x64 - -SET msbuild_configuration=%3 -IF "%msbuild_configuration%" == "" SET msbuild_configuration=Release - -SET msbuild_toolset=%4 - -GOTO build - -:display_help - -echo Syntax: build.generic.cmd msbuild_version msbuild_platform msbuild_configuration msbuild_toolset -echo msbuild_version: VS installed version (latest, VS2012, VS2013, VS2015, VS2017, VS2019, VS2022, ...) -echo msbuild_platform: Platform (x64 or Win32) -echo msbuild_configuration: VS configuration (Release or Debug) -echo msbuild_toolset: Platform Toolset (v100, v110, v120, v140, v141, v142, v143, ...) - -EXIT /B 1 - -:build - -SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" -IF %msbuild_version% == VS2013 SET msbuild="%programfiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -IF %msbuild_version% == VS2015 SET msbuild="%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -IF %msbuild_version% == VS2017 SET vswhere_params=-version [15,16) -products * -IF %msbuild_version% == VS2017Community SET vswhere_params=-version [15,16) -products Community -IF %msbuild_version% == VS2017Enterprise SET vswhere_params=-version [15,16) -products Enterprise -IF %msbuild_version% == VS2017Professional SET vswhere_params=-version [15,16) -products Professional -IF %msbuild_version% == VS2019 SET vswhere_params=-version [16,17) -products * -IF %msbuild_version% == VS2022 SET vswhere_params=-version [17,18) -products * -REM Add the next Visual Studio version here. -IF %msbuild_version% == latest SET vswhere_params=-latest -products * -IF %msbuild_version% == preview SET vswhere_params=-prerelease -products * - -IF NOT DEFINED vswhere_params GOTO skip_vswhere -SET vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -FOR /F "USEBACKQ TOKENS=*" %%F IN (`%vswhere% !vswhere_params! -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) DO ( - SET msbuild="%%F" -) -:skip_vswhere - -SET project="%~p0\..\VS2010\zstd.sln" - -SET msbuild_params=/verbosity:minimal /nologo /t:Clean,Build /p:Platform=%msbuild_platform% /p:Configuration=%msbuild_configuration% -IF NOT "%msbuild_toolset%" == "" SET msbuild_params=%msbuild_params% /p:PlatformToolset=%msbuild_toolset% - -SET output=%~p0%bin -SET output="%output%/%msbuild_configuration%/%msbuild_platform%/" -SET msbuild_params=%msbuild_params% /p:OutDir=%output% - -echo ### Building %msbuild_version% project for %msbuild_configuration% %msbuild_platform% (%msbuild_toolset%)... -echo ### Build Params: %msbuild_params% - -%msbuild% %project% %msbuild_params% -IF ERRORLEVEL 1 EXIT /B 1 -echo # Success -echo # OutDir: %output% -echo # diff --git a/third_party/zstd/build/cmake/.gitignore b/third_party/zstd/build/cmake/.gitignore deleted file mode 100644 index 2e51e89..0000000 --- a/third_party/zstd/build/cmake/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# cmake working directory -cmakeBuild - -# cmake artefacts -CMakeCache.txt -CMakeFiles -Makefile -cmake_install.cmake -cmake_uninstall.cmake -*.1 diff --git a/third_party/zstd/build/cmake/CMakeLists.txt b/third_party/zstd/build/cmake/CMakeLists.txt deleted file mode 100644 index 347d41c..0000000 --- a/third_party/zstd/build/cmake/CMakeLists.txt +++ /dev/null @@ -1,228 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -cmake_minimum_required(VERSION 3.10 FATAL_ERROR) - -# As of 2018-12-26 ZSTD has been validated to build with cmake version 3.13.2 new policies. -# Set and use the newest cmake policies that are validated to work -set(ZSTD_MAX_VALIDATED_CMAKE_MAJOR_VERSION "3") -set(ZSTD_MAX_VALIDATED_CMAKE_MINOR_VERSION "13") #Policies never changed at PATCH level -if("${ZSTD_MAX_VALIDATED_CMAKE_MAJOR_VERSION}" EQUAL "${CMAKE_MAJOR_VERSION}" AND - "${ZSTD_MAX_VALIDATED_CMAKE_MINOR_VERSION}" GREATER "${CMAKE_MINOR_VERSION}") - set(ZSTD_CMAKE_POLICY_VERSION "${CMAKE_VERSION}") -else() - set(ZSTD_CMAKE_POLICY_VERSION "${ZSTD_MAX_VALIDATED_CMAKE_MAJOR_VERSION}.${ZSTD_MAX_VALIDATED_CMAKE_MINOR_VERSION}.0") -endif() -cmake_policy(VERSION ${ZSTD_CMAKE_POLICY_VERSION}) - -set(CMAKE_BUILD_WITH_INSTALL_RPATH on) - -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") -set(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") -set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib) -# Parse version -include(GetZstdLibraryVersion) -GetZstdLibraryVersion(${LIBRARY_DIR}/zstd.h zstd_VERSION_MAJOR zstd_VERSION_MINOR zstd_VERSION_PATCH) - -set(ZSTD_SHORT_VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}") -set(ZSTD_FULL_VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}") - -project(zstd - VERSION "${ZSTD_FULL_VERSION}" - LANGUAGES C # Main library is in C - ASM # And ASM - CXX # Testing contributed code also utilizes CXX - ) - -message(STATUS "ZSTD VERSION: ${zstd_VERSION}") -set(zstd_HOMEPAGE_URL "https://facebook.github.io/zstd") -set(zstd_DESCRIPTION "Zstandard is a real-time compression algorithm, providing high compression ratios.") - -# Set a default build type if none was specified -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message(STATUS "Setting build type to 'Release' as none was specified.") - set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) - # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") -endif() - -include(GNUInstallDirs) - -#----------------------------------------------------------------------------- -# Add extra compilation flags -#----------------------------------------------------------------------------- -include(AddZstdCompilationFlags) -ADD_ZSTD_COMPILATION_FLAGS() - -# Always hide XXHash symbols -add_definitions(-DXXH_NAMESPACE=ZSTD_) - -#----------------------------------------------------------------------------- -# Installation variables -#----------------------------------------------------------------------------- -message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") -message(STATUS "CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}") - -#----------------------------------------------------------------------------- -# Options -#----------------------------------------------------------------------------- - -# Legacy support -option(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" ON) - -if (ZSTD_LEGACY_SUPPORT) - message(STATUS "ZSTD_LEGACY_SUPPORT defined!") - set(ZSTD_LEGACY_LEVEL 5 CACHE STRING "") - add_definitions(-DZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_LEVEL}) -else () - message(STATUS "ZSTD_LEGACY_SUPPORT not defined!") - add_definitions(-DZSTD_LEGACY_SUPPORT=0) -endif () - -if (APPLE) - option(ZSTD_FRAMEWORK "Build as Apple Frameworks" OFF) -endif () - -if (ANDROID) - set(ZSTD_MULTITHREAD_SUPPORT_DEFAULT OFF) - # Old versions of bionic libc don't have fseeko/ftello - if ((NOT ${ANDROID_PLATFORM_LEVEL}) OR ${ANDROID_PLATFORM_LEVEL} VERSION_LESS 24) - message(STATUS "Setting compile definitions for old Android API") - add_compile_definitions(LIBC_NO_FSEEKO) - endif () -else() - set(ZSTD_MULTITHREAD_SUPPORT_DEFAULT ON) -endif() - -# Multi-threading support -option(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ${ZSTD_MULTITHREAD_SUPPORT_DEFAULT}) - -if (ZSTD_MULTITHREAD_SUPPORT) - message(STATUS "ZSTD_MULTITHREAD_SUPPORT is enabled") -else () - message(STATUS "ZSTD_MULTITHREAD_SUPPORT is disabled") -endif () - -option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" ON) -option(ZSTD_BUILD_CONTRIB "BUILD CONTRIB" OFF) - -# Respect the conventional CMake option for enabling tests if it was specified on the first configure -if (BUILD_TESTING) - set(ZSTD_BUILD_TESTS_default ON) -else() - set(ZSTD_BUILD_TESTS_default OFF) -endif() -option(ZSTD_BUILD_TESTS "BUILD TESTS" ${ZSTD_BUILD_TESTS_default}) -if (MSVC) - option(ZSTD_USE_STATIC_RUNTIME "LINK TO STATIC RUN-TIME LIBRARIES" OFF) -endif () - -#----------------------------------------------------------------------------- -# External dependencies -#----------------------------------------------------------------------------- -# Define a function to handle special thread settings for HP-UX -# See https://github.com/facebook/zstd/pull/3862 for details. -function(setup_hpux_threads) - find_package(Threads) - if (NOT Threads_FOUND) - set(CMAKE_USE_PTHREADS_INIT 1 PARENT_SCOPE) - set(CMAKE_THREAD_LIBS_INIT -lpthread PARENT_SCOPE) - set(CMAKE_HAVE_THREADS_LIBRARY 1 PARENT_SCOPE) - set(Threads_FOUND TRUE PARENT_SCOPE) - endif() -endfunction() - -if (ZSTD_MULTITHREAD_SUPPORT AND UNIX) - if (CMAKE_SYSTEM_NAME MATCHES "HP-UX") - setup_hpux_threads() - else() - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - endif() - if (CMAKE_USE_PTHREADS_INIT) - set(THREADS_LIBS "${CMAKE_THREAD_LIBS_INIT}") - else() - message(SEND_ERROR "ZSTD currently does not support thread libraries other than pthreads") - endif() -endif () - -#----------------------------------------------------------------------------- -# Add source directories -#----------------------------------------------------------------------------- -add_subdirectory(lib) - -option(ZSTD_PROGRAMS_LINK_SHARED "PROGRAMS LINK SHARED" OFF) - -if (ZSTD_BUILD_PROGRAMS) - if (NOT ZSTD_BUILD_STATIC AND NOT ZSTD_PROGRAMS_LINK_SHARED) - message(SEND_ERROR "You need to build static library to build zstd CLI") - elseif(NOT ZSTD_BUILD_SHARED AND ZSTD_PROGRAMS_LINK_SHARED) - message(SEND_ERROR "You need to build shared library to build zstd CLI") - endif () - - add_subdirectory(programs) -endif () - -if (ZSTD_BUILD_TESTS) - enable_testing() - if (NOT ZSTD_BUILD_STATIC) - message(SEND_ERROR "You need to build static library to build tests") - endif () - - add_subdirectory(tests) -endif () - -if (ZSTD_BUILD_CONTRIB) - add_subdirectory(contrib) -endif () - -#----------------------------------------------------------------------------- -# Add clean-all target -#----------------------------------------------------------------------------- -add_custom_target(clean-all - COMMAND ${CMAKE_BUILD_TOOL} clean - COMMAND rm -rf ${CMAKE_BINARY_DIR}/ -) - -#----------------------------------------------------------------------------- -# Generate Package Config files -# -# This section is based on the boiler plate code from: -# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages -#----------------------------------------------------------------------------- -include(CMakePackageConfigHelpers) -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/zstdConfigVersion.cmake" - VERSION ${zstd_VERSION} - COMPATIBILITY SameMajorVersion - ) - -# A Package Config file that works from the build directory -export(EXPORT zstdExports - FILE "${CMAKE_CURRENT_BINARY_DIR}/zstdTargets.cmake" - NAMESPACE zstd:: - ) - -# A Package Config file that works from the installation directory -set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/zstd) -install(EXPORT zstdExports - FILE zstdTargets.cmake - NAMESPACE zstd:: - DESTINATION ${ConfigPackageLocation} - ) -configure_package_config_file( - zstdConfig.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/zstdConfig.cmake" - INSTALL_DESTINATION ${ConfigPackageLocation} -) -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/zstdConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/zstdConfigVersion.cmake" - DESTINATION ${ConfigPackageLocation} - ) diff --git a/third_party/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/third_party/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake deleted file mode 100644 index 5f381c6..0000000 --- a/third_party/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +++ /dev/null @@ -1,136 +0,0 @@ -include(CheckCXXCompilerFlag) -include(CheckCCompilerFlag) - -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) - set(ZSTD_HAVE_CHECK_LINKER_FLAG true) -else () - set(ZSTD_HAVE_CHECK_LINKER_FLAG false) -endif () -if (ZSTD_HAVE_CHECK_LINKER_FLAG) - include(CheckLinkerFlag) -endif() - -function(EnableCompilerFlag _flag _C _CXX _LD) - string(REGEX REPLACE "\\+" "PLUS" varname "${_flag}") - string(REGEX REPLACE "[^A-Za-z0-9]+" "_" varname "${varname}") - string(REGEX REPLACE "^_+" "" varname "${varname}") - string(TOUPPER "${varname}" varname) - if (_C) - CHECK_C_COMPILER_FLAG(${_flag} C_FLAG_${varname}) - if (C_FLAG_${varname}) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}" PARENT_SCOPE) - endif () - endif () - if (_CXX) - CHECK_CXX_COMPILER_FLAG(${_flag} CXX_FLAG_${varname}) - if (CXX_FLAG_${varname}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag}" PARENT_SCOPE) - endif () - endif () - if (_LD) - # We never add a linker flag with CMake < 3.18. We will - # implement CHECK_LINKER_FLAG() like feature for CMake < 3.18 - # or require CMake >= 3.18 when we need to add a required - # linker flag in future. - # - # We also skip linker flags check for MSVC compilers (which includes - # clang-cl) since currently check_linker_flag() doesn't give correct - # results for this configuration, - # see: https://gitlab.kitware.com/cmake/cmake/-/issues/22023 - if (ZSTD_HAVE_CHECK_LINKER_FLAG AND NOT MSVC) - CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname}) - else () - set(LD_FLAG_${varname} false) - endif () - if (LD_FLAG_${varname}) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_flag}" PARENT_SCOPE) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${_flag}" PARENT_SCOPE) - endif () - endif () -endfunction() - -macro(ADD_ZSTD_COMPILATION_FLAGS) - # We set ZSTD_HAS_NOEXECSTACK if we are certain we've set all the required - # compiler flags to mark the stack as non-executable. - set(ZSTD_HAS_NOEXECSTACK false) - - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" OR MINGW) #Not only UNIX but also WIN32 for MinGW - # It's possible to select the exact standard used for compilation. - # It's not necessary, but can be employed for specific purposes. - # Note that zstd source code is compatible with both C++98 and above - # and C-gnu90 (c90 + long long + variadic macros ) and above - # EnableCompilerFlag("-std=c++11" false true) # Set C++ compilation to c++11 standard - # EnableCompilerFlag("-std=c99" true false) # Set C compilation to c99 standard - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND MSVC) - # clang-cl normally maps -Wall to -Weverything. - EnableCompilerFlag("/clang:-Wall" true true false) - else () - EnableCompilerFlag("-Wall" true true false) - endif () - EnableCompilerFlag("-Wextra" true true false) - EnableCompilerFlag("-Wundef" true true false) - EnableCompilerFlag("-Wshadow" true true false) - EnableCompilerFlag("-Wcast-align" true true false) - EnableCompilerFlag("-Wcast-qual" true true false) - EnableCompilerFlag("-Wstrict-prototypes" true false false) - # Enable asserts in Debug mode - if (CMAKE_BUILD_TYPE MATCHES "Debug") - EnableCompilerFlag("-DDEBUGLEVEL=1" true true false) - endif () - # Add noexecstack flags - # LDFLAGS - EnableCompilerFlag("-Wl,-z,noexecstack" false false true) - # CFLAGS & CXXFLAGS - EnableCompilerFlag("-Qunused-arguments" true true false) - EnableCompilerFlag("-Wa,--noexecstack" true true false) - # NOTE: Using 3 nested ifs because the variables are sometimes - # empty if the condition is false, and sometimes equal to false. - # This implicitly converts them to truthy values. There may be - # a better way to do this, but this reliably works. - if (${LD_FLAG_WL_Z_NOEXECSTACK}) - if (${C_FLAG_WA_NOEXECSTACK}) - if (${CXX_FLAG_WA_NOEXECSTACK}) - # We've succeeded in marking the stack as non-executable - set(ZSTD_HAS_NOEXECSTACK true) - endif() - endif() - endif() - elseif (MSVC) # Add specific compilation flags for Windows Visual - - set(ACTIVATE_MULTITHREADED_COMPILATION "ON" CACHE BOOL "activate multi-threaded compilation (/MP flag)") - if (CMAKE_GENERATOR MATCHES "Visual Studio" AND ACTIVATE_MULTITHREADED_COMPILATION) - EnableCompilerFlag("/MP" true true false) - endif () - - # UNICODE SUPPORT - EnableCompilerFlag("/D_UNICODE" true true false) - EnableCompilerFlag("/DUNICODE" true true false) - # Enable asserts in Debug mode - if (CMAKE_BUILD_TYPE MATCHES "Debug") - EnableCompilerFlag("/DDEBUGLEVEL=1" true true false) - endif () - endif () - - # Remove duplicates compilation flags - foreach (flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if( ${flag_var} ) - separate_arguments(${flag_var}) - string(REPLACE ";" " " ${flag_var} "${${flag_var}}") - endif() - endforeach () - - if (MSVC AND ZSTD_USE_STATIC_RUNTIME) - foreach (flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if ( ${flag_var} ) - string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - endif() - endforeach () - endif () - -endmacro() diff --git a/third_party/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake b/third_party/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake deleted file mode 100644 index d0fac06..0000000 --- a/third_party/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Find LibLZ4 -# -# Find LibLZ4 headers and library -# -# Result Variables -# -# LIBLZ4_FOUND - True if lz4 is found -# LIBLZ4_INCLUDE_DIRS - lz4 headers directories -# LIBLZ4_LIBRARIES - lz4 libraries -# LIBLZ4_VERSION_MAJOR - The major version of lz4 -# LIBLZ4_VERSION_MINOR - The minor version of lz4 -# LIBLZ4_VERSION_RELEASE - The release version of lz4 -# LIBLZ4_VERSION_STRING - version number string (e.g. 1.8.3) -# -# Hints -# -# Set ``LZ4_ROOT_DIR`` to the directory of lz4.h and lz4 library - -set(_LIBLZ4_ROOT_HINTS - ENV LZ4_ROOT_DIR) - -find_path( LIBLZ4_INCLUDE_DIR lz4.h - HINTS ${_LIBLZ4_ROOT_HINTS}) -find_library( LIBLZ4_LIBRARY NAMES lz4 liblz4 liblz4_static - HINTS ${_LIBLZ4_ROOT_HINTS}) - -if(LIBLZ4_INCLUDE_DIR) - file(STRINGS "${LIBLZ4_INCLUDE_DIR}/lz4.h" LIBLZ4_HEADER_CONTENT REGEX "#define LZ4_VERSION_[A-Z]+ +[0-9]+") - - string(REGEX REPLACE ".*#define LZ4_VERSION_MAJOR +([0-9]+).*" "\\1" LIBLZ4_VERSION_MAJOR "${LIBLZ4_HEADER_CONTENT}") - string(REGEX REPLACE ".*#define LZ4_VERSION_MINOR +([0-9]+).*" "\\1" LIBLZ4_VERSION_MINOR "${LIBLZ4_HEADER_CONTENT}") - string(REGEX REPLACE ".*#define LZ4_VERSION_RELEASE +([0-9]+).*" "\\1" LIBLZ4_VERSION_RELEASE "${LIBLZ4_HEADER_CONTENT}") - - set(LIBLZ4_VERSION_STRING "${LIBLZ4_VERSION_MAJOR}.${LIBLZ4_VERSION_MINOR}.${LIBLZ4_VERSION_RELEASE}") - unset(LIBLZ4_HEADER_CONTENT) -endif() - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZ4 REQUIRED_VARS LIBLZ4_INCLUDE_DIR - LIBLZ4_LIBRARY - VERSION_VAR LIBLZ4_VERSION_STRING - FAIL_MESSAGE "Could NOT find LZ4, try to set the paths to lz4.h and lz4 library in environment variable LZ4_ROOT_DIR") - -if (LIBLZ4_FOUND) - set(LIBLZ4_LIBRARIES ${LIBLZ4_LIBRARY}) - set(LIBLZ4_INCLUDE_DIRS ${LIBLZ4_INCLUDE_DIR}) -endif () - -mark_as_advanced( LIBLZ4_INCLUDE_DIR LIBLZ4_LIBRARY ) diff --git a/third_party/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake b/third_party/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake deleted file mode 100644 index e8ed606..0000000 --- a/third_party/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake +++ /dev/null @@ -1,10 +0,0 @@ -function(GetZstdLibraryVersion _header _major _minor _patch) - # Read file content - file(READ ${_header} CONTENT) - - string(REGEX MATCH ".*define ZSTD_VERSION_MAJOR *([0-9]+).*define ZSTD_VERSION_MINOR *([0-9]+).*define ZSTD_VERSION_RELEASE *([0-9]+)" VERSION_REGEX "${CONTENT}") - set(${_major} ${CMAKE_MATCH_1} PARENT_SCOPE) - set(${_minor} ${CMAKE_MATCH_2} PARENT_SCOPE) - set(${_patch} ${CMAKE_MATCH_3} PARENT_SCOPE) -endfunction() - diff --git a/third_party/zstd/build/cmake/CMakeModules/JoinPaths.cmake b/third_party/zstd/build/cmake/CMakeModules/JoinPaths.cmake deleted file mode 100644 index c68d91b..0000000 --- a/third_party/zstd/build/cmake/CMakeModules/JoinPaths.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# This module provides function for joining paths -# known from most languages -# -# SPDX-License-Identifier: (MIT OR CC0-1.0) -# Copyright 2020 Jan Tojnar -# https://github.com/jtojnar/cmake-snips -# -# Modelled after Python’s os.path.join -# https://docs.python.org/3.7/library/os.path.html#os.path.join -# Windows not supported -function(join_paths joined_path first_path_segment) - set(temp_path "${first_path_segment}") - foreach(current_segment IN LISTS ARGN) - if(NOT ("${current_segment}" STREQUAL "")) - if(IS_ABSOLUTE "${current_segment}") - set(temp_path "${current_segment}") - else() - set(temp_path "${temp_path}/${current_segment}") - endif() - endif() - endforeach() - set(${joined_path} "${temp_path}" PARENT_SCOPE) -endfunction() diff --git a/third_party/zstd/build/cmake/README.md b/third_party/zstd/build/cmake/README.md deleted file mode 100644 index 6baa597..0000000 --- a/third_party/zstd/build/cmake/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# Cmake contributions - -Contributions to the cmake build configurations are welcome. Please -use case sensitivity that matches modern (i.e. cmake version 2.6 and above) -conventions of using lower-case for commands, and upper-case for -variables. - -## How to build - -As cmake doesn't support command like `cmake clean`, it's recommended to perform an "out of source build". -To do this, you can create a new directory and build in it: -```sh -cd build/cmake -mkdir builddir -cd builddir -cmake .. -make -``` -Then you can clean all cmake caches by simply delete the new directory: -```sh -rm -rf build/cmake/builddir -``` - -And of course, you can directly build in build/cmake: -```sh -cd build/cmake -cmake -make -``` - -To show cmake build options, you can: -```sh -cd build/cmake/builddir -cmake -LH .. -``` - -Bool options can be set to `ON/OFF` with `-D[option]=[ON/OFF]`. You can configure cmake options like this: -```sh -cd build/cmake/builddir -cmake -DZSTD_BUILD_TESTS=ON -DZSTD_LEGACY_SUPPORT=OFF .. -make -``` - -**Apple Frameworks** -It's generally recommended to have CMake with versions higher than 3.14 for [iOS-derived platforms](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#id27). -```sh -cmake -S. -B build-cmake -DZSTD_FRAMEWORK=ON -DCMAKE_SYSTEM_NAME=iOS -``` -Or you can utilize [iOS-CMake](https://github.com/leetal/ios-cmake) toolchain for CMake versions lower than 3.14 -```sh -cmake -B build -G Xcode -DCMAKE_TOOLCHAIN_FILE= -DPLATFORM=OS64 -DZSTD_FRAMEWORK=ON -``` - -### how to use it with CMake FetchContent - -For all options available, you can see it on -```cmake -include(FetchContent) - -set(ZSTD_BUILD_STATIC ON) -set(ZSTD_BUILD_SHARED OFF) - -FetchContent_Declare( - zstd - URL "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz" - DOWNLOAD_EXTRACT_TIMESTAMP TRUE - SOURCE_SUBDIR build/cmake -) - -FetchContent_MakeAvailable(zstd) - -target_link_libraries( - ${PROJECT_NAME} - PRIVATE - libzstd_static -) - -# On windows and macos this is needed -target_include_directories( - ${PROJECT_NAME} - PRIVATE - ${zstd_SOURCE_DIR}/lib -) -``` - -### referring -[Looking for a 'cmake clean' command to clear up CMake output](https://stackoverflow.com/questions/9680420/looking-for-a-cmake-clean-command-to-clear-up-cmake-output) - -## CMake Style Recommendations - -### Indent all code correctly, i.e. the body of - - * if/else/endif - * foreach/endforeach - * while/endwhile - * macro/endmacro - * function/endfunction - -Use spaces for indenting, 2, 3 or 4 spaces preferably. Use the same amount of -spaces for indenting as is used in the rest of the file. Do not use tabs. - -### Upper/lower casing - -Most important: use consistent upper- or lowercasing within one file ! - -In general, the all-lowercase style is preferred. - -So, this is recommended: - -``` -add_executable(foo foo.c) -``` - -These forms are discouraged - -``` -ADD_EXECUTABLE(bar bar.c) -Add_Executable(hello hello.c) -aDd_ExEcUtAbLe(blub blub.c) -``` - -### End commands -To make the code easier to read, use empty commands for endforeach(), endif(), -endfunction(), endmacro() and endwhile(). Also, use empty else() commands. - -For example, do this: - -``` -if(FOOVAR) - some_command(...) -else() - another_command(...) -endif() -``` - -and not this: - -``` -if(BARVAR) - some_other_command(...) -endif(BARVAR) -``` - -### Other resources for best practices - -https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#modules diff --git a/third_party/zstd/build/cmake/contrib/CMakeLists.txt b/third_party/zstd/build/cmake/contrib/CMakeLists.txt deleted file mode 100644 index 8df2a17..0000000 --- a/third_party/zstd/build/cmake/contrib/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -project(contrib) - -add_subdirectory(pzstd) -add_subdirectory(gen_html) diff --git a/third_party/zstd/build/cmake/contrib/gen_html/CMakeLists.txt b/third_party/zstd/build/cmake/contrib/gen_html/CMakeLists.txt deleted file mode 100644 index d1ff6c6..0000000 --- a/third_party/zstd/build/cmake/contrib/gen_html/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -project(gen_html) -include(GetZstdLibraryVersion) - -set(CMAKE_INCLUDE_CURRENT_DIR TRUE) - -# Define programs directory, where sources and header files are located -set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib) -set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs) -set(GENHTML_DIR ${ZSTD_SOURCE_DIR}/contrib/gen_html) -set(GENHTML_BINARY ${PROJECT_BINARY_DIR}/gen_html${CMAKE_EXECUTABLE_SUFFIX}) -include_directories(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${GENHTML_DIR}) - -add_executable(gen_html ${GENHTML_DIR}/gen_html.cpp) - -GetZstdLibraryVersion(${LIBRARY_DIR}/zstd.h VMAJOR VMINOR VRELEASE) -set(LIBVERSION "${VMAJOR}.${VMINOR}.${VRELEASE}") -add_custom_target(zstd_manual.html ALL - ${GENHTML_BINARY} "${LIBVERSION}" "${LIBRARY_DIR}/zstd.h" "${PROJECT_BINARY_DIR}/zstd_manual.html" - DEPENDS gen_html COMMENT "Update zstd manual") - -install(FILES "${PROJECT_BINARY_DIR}/zstd_manual.html" DESTINATION "${CMAKE_INSTALL_DOCDIR}") diff --git a/third_party/zstd/build/cmake/contrib/pzstd/CMakeLists.txt b/third_party/zstd/build/cmake/contrib/pzstd/CMakeLists.txt deleted file mode 100644 index e1c8e06..0000000 --- a/third_party/zstd/build/cmake/contrib/pzstd/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -project(pzstd) - -set(CMAKE_INCLUDE_CURRENT_DIR TRUE) - -# Define programs directory, where sources and header files are located -set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib) -set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs) -set(PZSTD_DIR ${ZSTD_SOURCE_DIR}/contrib/pzstd) -include_directories(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${PZSTD_DIR}) - -add_executable(pzstd ${PROGRAMS_DIR}/util.c ${PZSTD_DIR}/main.cpp ${PZSTD_DIR}/Options.cpp ${PZSTD_DIR}/Pzstd.cpp ${PZSTD_DIR}/SkippableFrame.cpp) -target_compile_features(pzstd PRIVATE cxx_std_11) -set_property(TARGET pzstd APPEND PROPERTY COMPILE_DEFINITIONS "NDEBUG") -set_property(TARGET pzstd APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow") - -if (ZSTD_BUILD_SHARED) - set(ZSTD_LIB libzstd_shared) -else() - set(ZSTD_LIB libzstd_static) -endif() - -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) -if (CMAKE_USE_PTHREADS_INIT) - target_link_libraries(pzstd ${ZSTD_LIB} ${CMAKE_THREAD_LIBS_INIT}) -else() - message(SEND_ERROR "ZSTD currently does not support thread libraries other than pthreads") -endif() - -install(TARGETS pzstd RUNTIME DESTINATION "bin") diff --git a/third_party/zstd/build/cmake/lib/.gitignore b/third_party/zstd/build/cmake/lib/.gitignore deleted file mode 100644 index a4444c8..0000000 --- a/third_party/zstd/build/cmake/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# cmake build artefact -libzstd.pc diff --git a/third_party/zstd/build/cmake/lib/CMakeLists.txt b/third_party/zstd/build/cmake/lib/CMakeLists.txt deleted file mode 100644 index 4e902a1..0000000 --- a/third_party/zstd/build/cmake/lib/CMakeLists.txt +++ /dev/null @@ -1,295 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -project(libzstd C ASM) - -set(CMAKE_INCLUDE_CURRENT_DIR TRUE) -option(ZSTD_BUILD_STATIC "BUILD STATIC LIBRARIES" ON) -option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" ON) -option(ZSTD_BUILD_COMPRESSION "BUILD COMPRESSION MODULE" ON) -option(ZSTD_BUILD_DECOMPRESSION "BUILD DECOMPRESSION MODULE" ON) -option(ZSTD_BUILD_DICTBUILDER "BUILD DICTBUILDER MODULE" ON) -option(ZSTD_BUILD_DEPRECATED "BUILD DEPRECATED MODULE" OFF) - -set(ZSTDLIB_VISIBLE "" CACHE STRING "Visibility for ZSTDLIB API") -set(ZSTDERRORLIB_VISIBLE "" CACHE STRING "Visibility for ZSTDERRORLIB_VISIBLE API") -set(ZDICTLIB_VISIBLE "" CACHE STRING "Visibility for ZDICTLIB_VISIBLE API") -set(ZSTDLIB_STATIC_API "" CACHE STRING "Visibility for ZSTDLIB_STATIC_API API") -set(ZDICTLIB_STATIC_API "" CACHE STRING "Visibility for ZDICTLIB_STATIC_API API") - -set_property(CACHE ZSTDLIB_VISIBLE PROPERTY STRINGS "" "hidden" "default" "protected" "internal") -set_property(CACHE ZSTDERRORLIB_VISIBLE PROPERTY STRINGS "" "hidden" "default" "protected" "internal") -set_property(CACHE ZDICTLIB_VISIBLE PROPERTY STRINGS "" "hidden" "default" "protected" "internal") -set_property(CACHE ZSTDLIB_STATIC_API PROPERTY STRINGS "" "hidden" "default" "protected" "internal") -set_property(CACHE ZDICTLIB_STATIC_API PROPERTY STRINGS "" "hidden" "default" "protected" "internal") - -if(NOT ZSTD_BUILD_SHARED AND NOT ZSTD_BUILD_STATIC) - message(SEND_ERROR "You need to build at least one flavor of libzstd") -endif() - -file(GLOB CommonSources ${LIBRARY_DIR}/common/*.c) -file(GLOB CompressSources ${LIBRARY_DIR}/compress/*.c) -file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c) -if (MSVC) - add_compile_options(-DZSTD_DISABLE_ASM) -else () - if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|AMD64.*|x86_64.*|X86_64.*" AND ${ZSTD_HAS_NOEXECSTACK}) - set(DecompressSources ${DecompressSources} ${LIBRARY_DIR}/decompress/huf_decompress_amd64.S) - else() - add_compile_options(-DZSTD_DISABLE_ASM) - endif() -endif () -file(GLOB DictBuilderSources ${LIBRARY_DIR}/dictBuilder/*.c) -file(GLOB DeprecatedSources ${LIBRARY_DIR}/deprecated/*.c) - -file(GLOB PublicHeaders ${LIBRARY_DIR}/*.h) -file(GLOB CommonHeaders ${LIBRARY_DIR}/common/*.h) -file(GLOB CompressHeaders ${LIBRARY_DIR}/compress/*.h) -file(GLOB DecompressHeaders ${LIBRARY_DIR}/decompress/*.h) -file(GLOB DictBuilderHeaders ${LIBRARY_DIR}/dictBuilder/*.h) -file(GLOB DeprecatedHeaders ${LIBRARY_DIR}/deprecated/*.h) - -set(Sources ${CommonSources}) -set(Headers ${PublicHeaders} ${CommonHeaders}) -if (ZSTD_BUILD_COMPRESSION) - set(Sources ${Sources} ${CompressSources}) - set(Headers ${Headers} ${CompressHeaders}) -endif() -if (ZSTD_BUILD_DECOMPRESSION) - set(Sources ${Sources} ${DecompressSources}) - set(Headers ${Headers} ${DecompressHeaders}) -endif() -if (ZSTD_BUILD_DICTBUILDER) - set(Sources ${Sources} ${DictBuilderSources}) - set(Headers ${Headers} ${DictBuilderHeaders}) -endif() -if (ZSTD_BUILD_DEPRECATED) - set(Sources ${Sources} ${DeprecatedSources}) - set(Headers ${Headers} ${DeprecatedHeaders}) -endif() - -if (ZSTD_LEGACY_SUPPORT) - set(LIBRARY_LEGACY_DIR ${LIBRARY_DIR}/legacy) - - set(Sources ${Sources} - ${LIBRARY_LEGACY_DIR}/zstd_v01.c - ${LIBRARY_LEGACY_DIR}/zstd_v02.c - ${LIBRARY_LEGACY_DIR}/zstd_v03.c - ${LIBRARY_LEGACY_DIR}/zstd_v04.c - ${LIBRARY_LEGACY_DIR}/zstd_v05.c - ${LIBRARY_LEGACY_DIR}/zstd_v06.c - ${LIBRARY_LEGACY_DIR}/zstd_v07.c) - - set(Headers ${Headers} - ${LIBRARY_LEGACY_DIR}/zstd_legacy.h - ${LIBRARY_LEGACY_DIR}/zstd_v01.h - ${LIBRARY_LEGACY_DIR}/zstd_v02.h - ${LIBRARY_LEGACY_DIR}/zstd_v03.h - ${LIBRARY_LEGACY_DIR}/zstd_v04.h - ${LIBRARY_LEGACY_DIR}/zstd_v05.h - ${LIBRARY_LEGACY_DIR}/zstd_v06.h - ${LIBRARY_LEGACY_DIR}/zstd_v07.h) -endif () - -if (MSVC) - set(MSVC_RESOURCE_DIR ${ZSTD_SOURCE_DIR}/build/VS2010/libzstd-dll) - set(PlatformDependResources ${MSVC_RESOURCE_DIR}/libzstd-dll.rc) -endif () - -# Explicitly set the language to C for all files, including ASM files. -# Our assembly expects to be compiled by a C compiler, and is only enabled for -# __GNUC__ compatible compilers. Otherwise all the ASM code is disabled by -# macros. -if(NOT CMAKE_ASM_COMPILER STREQUAL CMAKE_C_COMPILER) - set_source_files_properties(${Sources} PROPERTIES LANGUAGE C) -endif() - -macro (add_definition target var) - if (NOT ("${${var}}" STREQUAL "")) - set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS "${var}=__attribute__((visibility(\"${${var}}\")))") - endif () -endmacro () - -# Define directories containing the library's public headers -set(PUBLIC_INCLUDE_DIRS ${LIBRARY_DIR}) -set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /I \"${LIBRARY_DIR}\"") -# Split project to static and shared libraries build -set(library_targets) -if (ZSTD_BUILD_SHARED) - add_library(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) - target_include_directories(libzstd_shared INTERFACE $) - list(APPEND library_targets libzstd_shared) - if (ZSTD_MULTITHREAD_SUPPORT) - set_property(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") - if (UNIX) - target_link_libraries(libzstd_shared ${THREADS_LIBS}) - endif () - endif () - add_definition(libzstd_shared ZSTDLIB_VISIBLE) - add_definition(libzstd_shared ZSTDERRORLIB_VISIBLE) - add_definition(libzstd_shared ZDICTLIB_VISIBLE) -endif () -if (ZSTD_BUILD_STATIC) - add_library(libzstd_static STATIC ${Sources} ${Headers}) - target_include_directories(libzstd_static INTERFACE $) - list(APPEND library_targets libzstd_static) - if (ZSTD_MULTITHREAD_SUPPORT) - set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") - if (UNIX) - target_link_libraries(libzstd_static ${THREADS_LIBS}) - endif () - endif () - add_definition(libzstd_static ZSTDLIB_VISIBLE) - add_definition(libzstd_static ZSTDERRORLIB_VISIBLE) - add_definition(libzstd_static ZDICTLIB_VISIBLE) - add_definition(libzstd_static ZSTDLIB_STATIC_API) - add_definition(libzstd_static ZDICTLIB_STATIC_API) -endif () -if (ZSTD_BUILD_SHARED AND NOT ZSTD_BUILD_STATIC) - if (NOT BUILD_SHARED_LIBS) - message(WARNING "BUILD_SHARED_LIBS is OFF, but ZSTD_BUILD_SHARED is ON and ZSTD_BUILD_STATIC is OFF, which takes precedence, so libzstd is a shared library") - endif () - add_library(libzstd INTERFACE) - target_link_libraries(libzstd INTERFACE libzstd_shared) - list(APPEND library_targets libzstd) -endif () -if (ZSTD_BUILD_STATIC AND NOT ZSTD_BUILD_SHARED) - if (BUILD_SHARED_LIBS) - message(WARNING "BUILD_SHARED_LIBS is ON, but ZSTD_BUILD_SHARED is OFF and ZSTD_BUILD_STATIC is ON, which takes precedence, is set so libzstd is a static library") - endif () - add_library(libzstd INTERFACE) - target_link_libraries(libzstd INTERFACE libzstd_static) - list(APPEND library_targets libzstd) -endif () -if (ZSTD_BUILD_SHARED AND ZSTD_BUILD_STATIC) - # If both ZSTD_BUILD_SHARED and ZSTD_BUILD_STATIC are set, which is the - # default, fallback to using BUILD_SHARED_LIBS to determine whether to - # set libzstd to static or shared. - if (BUILD_SHARED_LIBS) - add_library(libzstd INTERFACE) - target_link_libraries(libzstd INTERFACE libzstd_shared) - list(APPEND library_targets libzstd) - else () - add_library(libzstd INTERFACE) - target_link_libraries(libzstd INTERFACE libzstd_static) - list(APPEND library_targets libzstd) - endif () -endif () - -# Add specific compile definitions for MSVC project -if (MSVC) - if (ZSTD_BUILD_SHARED) - set_property(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") - endif () - if (ZSTD_BUILD_STATIC) - set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS") - endif () -endif () - -# With MSVC static library needs to be renamed to avoid conflict with import library -if (MSVC OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MINGW)) - set(STATIC_LIBRARY_BASE_NAME zstd_static) -else () - set(STATIC_LIBRARY_BASE_NAME zstd) -endif () - -# Define static and shared library names -if (ZSTD_BUILD_SHARED) - set_target_properties( - libzstd_shared - PROPERTIES - OUTPUT_NAME zstd - VERSION ${ZSTD_FULL_VERSION} - SOVERSION ${zstd_VERSION_MAJOR}) - - if (ZSTD_FRAMEWORK) - set_target_properties( - libzstd_shared - PROPERTIES - FRAMEWORK TRUE - FRAMEWORK_VERSION "${ZSTD_FULL_VERSION}" - PRODUCT_BUNDLE_IDENTIFIER "github.com/facebook/zstd" - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - PUBLIC_HEADER "${PublicHeaders}" - OUTPUT_NAME "zstd" - XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" - XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO" - XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO" - MACOSX_FRAMEWORK_IDENTIFIER "github.com/facebook/zstd" - MACOSX_FRAMEWORK_BUNDLE_VERSION "${ZSTD_FULL_VERSION}" - MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${ZSTD_SHORT_VERSION}" - MACOSX_RPATH TRUE - RESOURCE ${PublicHeaders}) - endif () -endif () - -if (ZSTD_BUILD_STATIC) - set_target_properties( - libzstd_static - PROPERTIES - POSITION_INDEPENDENT_CODE On - OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) - - if (ZSTD_FRAMEWORK) - set_target_properties( - libzstd_static - PROPERTIES - FRAMEWORK TRUE - FRAMEWORK_VERSION "${ZSTD_FULL_VERSION}" - PRODUCT_BUNDLE_IDENTIFIER "github.com/facebook/zstd/${STATIC_LIBRARY_BASE_NAME}" - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - PUBLIC_HEADER "${PublicHeaders}" - OUTPUT_NAME "${STATIC_LIBRARY_BASE_NAME}" - XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" - XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO" - XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO" - MACOSX_FRAMEWORK_IDENTIFIER "github.com/facebook/zstd/${STATIC_LIBRARY_BASE_NAME}" - MACOSX_FRAMEWORK_BUNDLE_VERSION "${ZSTD_FULL_VERSION}" - MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${ZSTD_SHORT_VERSION}" - MACOSX_RPATH TRUE - RESOURCE ${PublicHeaders}) - endif () -endif () - -# pkg-config -include(JoinPaths) # can be replaced by cmake_path(APPEND) in CMake 3.20 -set(PREFIX "${CMAKE_INSTALL_PREFIX}") -set(EXEC_PREFIX "\${prefix}") -join_paths(LIBDIR "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}") -join_paths(INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") -set(LIBS_PRIVATE "${THREADS_LIBS}") -set(VERSION "${zstd_VERSION}") - -configure_file("${LIBRARY_DIR}/libzstd.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - -# install target -install(FILES ${PublicHeaders} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - -install(TARGETS ${library_targets} - EXPORT zstdExports - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" - FRAMEWORK DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime OPTIONAL - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - ) - -# uninstall target -if (NOT TARGET uninstall) - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) - - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -endif () diff --git a/third_party/zstd/build/cmake/lib/cmake_uninstall.cmake.in b/third_party/zstd/build/cmake/lib/cmake_uninstall.cmake.in deleted file mode 100644 index 9f1d045..0000000 --- a/third_party/zstd/build/cmake/lib/cmake_uninstall.cmake.in +++ /dev/null @@ -1,22 +0,0 @@ - -if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") - message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") -endif() - -file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) -string(REGEX REPLACE "\n" ";" files "${files}") -foreach(file ${files}) - message(STATUS "Uninstalling $ENV{DESTDIR}${file}") - if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - exec_program( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - if(NOT "${rm_retval}" STREQUAL 0) - message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") - endif() - else() - message(STATUS "File $ENV{DESTDIR}${file} does not exist.") - endif() -endforeach() diff --git a/third_party/zstd/build/cmake/programs/.gitignore b/third_party/zstd/build/cmake/programs/.gitignore deleted file mode 100644 index ae3a8a3..0000000 --- a/third_party/zstd/build/cmake/programs/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# produced by make -zstd -zstd-frugal -unzstd -zstdcat diff --git a/third_party/zstd/build/cmake/programs/CMakeLists.txt b/third_party/zstd/build/cmake/programs/CMakeLists.txt deleted file mode 100644 index 5e239e3..0000000 --- a/third_party/zstd/build/cmake/programs/CMakeLists.txt +++ /dev/null @@ -1,144 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -project(programs C) - -set(CMAKE_INCLUDE_CURRENT_DIR TRUE) - -# Define programs directory, where sources and header files are located -set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib) -set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs) -include_directories(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder) - -if (ZSTD_LEGACY_SUPPORT) - set(PROGRAMS_LEGACY_DIR ${PROGRAMS_DIR}/legacy) - include_directories(${PROGRAMS_LEGACY_DIR} ${LIBRARY_DIR}/legacy) -endif () - -if (ZSTD_PROGRAMS_LINK_SHARED) - set(PROGRAMS_ZSTD_LINK_TARGET libzstd_shared) -else () - set(PROGRAMS_ZSTD_LINK_TARGET libzstd_static) -endif () - -if (MSVC) - set(MSVC_RESOURCE_DIR ${ZSTD_SOURCE_DIR}/build/VS2010/zstd) - set(PlatformDependResources ${MSVC_RESOURCE_DIR}/zstd.rc) -endif () - -file(GLOB ZSTD_PROGRAM_SRCS "${PROGRAMS_DIR}/*.c") -if (MSVC AND ZSTD_PROGRAMS_LINK_SHARED) - list(APPEND ZSTD_PROGRAM_SRCS ${LIBRARY_DIR}/common/pool.c ${LIBRARY_DIR}/common/threading.c) -endif () - -add_executable(zstd ${ZSTD_PROGRAM_SRCS}) -target_link_libraries(zstd ${PROGRAMS_ZSTD_LINK_TARGET}) -if (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") - target_link_libraries(zstd rt) -endif () -install(TARGETS zstd - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}") - -if (UNIX) - add_custom_target(zstdcat ALL ${CMAKE_COMMAND} -E create_symlink zstd zstdcat DEPENDS zstd COMMENT "Creating zstdcat symlink") - add_custom_target(unzstd ALL ${CMAKE_COMMAND} -E create_symlink zstd unzstd DEPENDS zstd COMMENT "Creating unzstd symlink") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zstdcat DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unzstd DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(PROGRAMS ${PROGRAMS_DIR}/zstdgrep DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(PROGRAMS ${PROGRAMS_DIR}/zstdless DESTINATION "${CMAKE_INSTALL_BINDIR}") - - add_custom_target(zstd.1 ALL - ${CMAKE_COMMAND} -E copy ${PROGRAMS_DIR}/zstd.1 . - COMMENT "Copying manpage zstd.1") - add_custom_target(zstdgrep.1 ALL - ${CMAKE_COMMAND} -E copy ${PROGRAMS_DIR}/zstdgrep.1 . - COMMENT "Copying manpage zstdgrep.1") - add_custom_target(zstdless.1 ALL - ${CMAKE_COMMAND} -E copy ${PROGRAMS_DIR}/zstdless.1 . - COMMENT "Copying manpage zstdless.1") - add_custom_target(zstdcat.1 ALL ${CMAKE_COMMAND} -E create_symlink zstd.1 zstdcat.1 DEPENDS zstd.1 COMMENT "Creating zstdcat.1 symlink") - add_custom_target(unzstd.1 ALL ${CMAKE_COMMAND} -E create_symlink zstd.1 unzstd.1 DEPENDS zstd.1 COMMENT "Creating unzstd.1 symlink") - - # Define MAN_INSTALL_DIR if necessary - if (MAN_INSTALL_DIR) - else () - set(MAN_INSTALL_DIR ${CMAKE_INSTALL_MANDIR}/man1) - endif () - - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/zstd.1 - ${CMAKE_CURRENT_BINARY_DIR}/zstdcat.1 - ${CMAKE_CURRENT_BINARY_DIR}/unzstd.1 - ${CMAKE_CURRENT_BINARY_DIR}/zstdgrep.1 - ${CMAKE_CURRENT_BINARY_DIR}/zstdless.1 - DESTINATION "${MAN_INSTALL_DIR}") - - add_executable(zstd-frugal ${PROGRAMS_DIR}/zstdcli.c - ${PROGRAMS_DIR}/util.c ${PROGRAMS_DIR}/timefn.c - ${PROGRAMS_DIR}/fileio.c ${PROGRAMS_DIR}/fileio_asyncio.c) - target_link_libraries(zstd-frugal ${PROGRAMS_ZSTD_LINK_TARGET}) - set_property(TARGET zstd-frugal APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_NOBENCH;ZSTD_NODICT;ZSTD_NOTRACE") -endif () - -# Add multi-threading support definitions - -if (ZSTD_MULTITHREAD_SUPPORT) - set_property(TARGET zstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") - - if (UNIX) - target_link_libraries(zstd ${THREADS_LIBS}) - - add_custom_target(zstdmt ALL ${CMAKE_COMMAND} -E create_symlink zstd zstdmt DEPENDS zstd COMMENT "Creating zstdmt symlink") - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zstdmt DESTINATION "${CMAKE_INSTALL_BINDIR}") - endif () -endif () - -option(ZSTD_ZLIB_SUPPORT "ZLIB SUPPORT" OFF) -option(ZSTD_LZMA_SUPPORT "LZMA SUPPORT" OFF) -option(ZSTD_LZ4_SUPPORT "LZ4 SUPPORT" OFF) - -# Add gzip support -if (ZSTD_ZLIB_SUPPORT) - find_package(ZLIB REQUIRED) - - if (ZLIB_FOUND) - include_directories(${ZLIB_INCLUDE_DIRS}) - target_link_libraries(zstd ${ZLIB_LIBRARIES}) - set_property(TARGET zstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_GZCOMPRESS;ZSTD_GZDECOMPRESS") - else () - message(SEND_ERROR "zlib library is missing") - endif () -endif () - -# Add lzma support -if (ZSTD_LZMA_SUPPORT) - find_package(LibLZMA REQUIRED) - - if (LIBLZMA_FOUND) - include_directories(${LIBLZMA_INCLUDE_DIRS}) - target_link_libraries(zstd ${LIBLZMA_LIBRARIES}) - set_property(TARGET zstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_LZMACOMPRESS;ZSTD_LZMADECOMPRESS") - else () - message(SEND_ERROR "lzma library is missing") - endif () -endif () - -# Add lz4 support -if (ZSTD_LZ4_SUPPORT) - find_package(LibLZ4 REQUIRED) - - if (LIBLZ4_FOUND) - include_directories(${LIBLZ4_INCLUDE_DIRS}) - target_link_libraries(zstd ${LIBLZ4_LIBRARIES}) - set_property(TARGET zstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_LZ4COMPRESS;ZSTD_LZ4DECOMPRESS") - else () - message(SEND_ERROR "lz4 library is missing") - endif () -endif () diff --git a/third_party/zstd/build/cmake/tests/.gitignore b/third_party/zstd/build/cmake/tests/.gitignore deleted file mode 100644 index ca2947f..0000000 --- a/third_party/zstd/build/cmake/tests/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# produced by make -datagen -fullbench -fuzzer -paramgrill - diff --git a/third_party/zstd/build/cmake/tests/CMakeLists.txt b/third_party/zstd/build/cmake/tests/CMakeLists.txt deleted file mode 100644 index 56104a4..0000000 --- a/third_party/zstd/build/cmake/tests/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ -# ################################################################ -# zstd - Makefile -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# BSD license -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, this -# list of conditions and the following disclaimer in the documentation and/or -# other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# You can contact the author at : -# - zstd homepage : https://facebook.github.io/zstd/ -# ################################################################ - -project(tests) - -# name: Cache variable name. The value is expected to be a semicolon-separated -# list of command line flags -# default_value: Value to initialize the option with. Can be space separated. -function(AddTestFlagsOption name default_value doc) - string(STRIP "${default_value}" default_value) - string(REGEX REPLACE " +" ";" default_value "${default_value}") - set(${name} ${default_value} CACHE STRING "${doc}") - mark_as_advanced(${name}) -endfunction() - -set(CMAKE_INCLUDE_CURRENT_DIR TRUE) - -# Define programs directory, where sources and header files are located -set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib) -set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs) -set(TESTS_DIR ${ZSTD_SOURCE_DIR}/tests) -include_directories(${TESTS_DIR} ${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${LIBRARY_DIR}/compress ${LIBRARY_DIR}/dictBuilder) - -add_executable(datagen ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/lorem.c ${TESTS_DIR}/loremOut.c ${TESTS_DIR}/datagencli.c) -target_link_libraries(datagen libzstd_static) - -# -# fullbench -# -add_executable(fullbench ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/lorem.c ${PROGRAMS_DIR}/util.c ${PROGRAMS_DIR}/timefn.c ${PROGRAMS_DIR}/benchfn.c ${PROGRAMS_DIR}/benchzstd.c ${TESTS_DIR}/fullbench.c) -if (NOT MSVC) - target_compile_options(fullbench PRIVATE "-Wno-deprecated-declarations") -endif() -target_link_libraries(fullbench libzstd_static) -add_test(NAME fullbench COMMAND "$" ${ZSTD_FULLBENCH_FLAGS}) - -# -# fuzzer -# -add_executable(fuzzer ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/util.c ${PROGRAMS_DIR}/timefn.c ${TESTS_DIR}/fuzzer.c) -if (NOT MSVC) - target_compile_options(fuzzer PRIVATE "-Wno-deprecated-declarations") -endif() -target_link_libraries(fuzzer libzstd_static) -AddTestFlagsOption(ZSTD_FUZZER_FLAGS "$ENV{FUZZERTEST} $ENV{FUZZER_FLAGS}" - "Semicolon-separated list of flags to pass to the fuzzer test (see `fuzzer -h` for usage)") -add_test(NAME fuzzer COMMAND "$" ${ZSTD_FUZZER_FLAGS}) -# Disable the timeout since the run time is too long for the default timeout of -# 1500 seconds and varies considerably between low-end and high-end CPUs. -# set_tests_properties(fuzzer PROPERTIES TIMEOUT 0) - -# -# zstreamtest -# -add_executable(zstreamtest ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/util.c ${PROGRAMS_DIR}/timefn.c ${TESTS_DIR}/seqgen.c ${TESTS_DIR}/zstreamtest.c ${TESTS_DIR}/external_matchfinder.c) -if (NOT MSVC) - target_compile_options(zstreamtest PRIVATE "-Wno-deprecated-declarations") -endif() -target_link_libraries(zstreamtest libzstd_static) -AddTestFlagsOption(ZSTD_ZSTREAM_FLAGS "$ENV{ZSTREAM_TESTTIME} $ENV{FUZZER_FLAGS}" - "Semicolon-separated list of flags to pass to the zstreamtest test (see `zstreamtest -h` for usage)") -add_test(NAME zstreamtest COMMAND "$" ${ZSTD_ZSTREAM_FLAGS}) - -# -# playTests.sh -# -AddTestFlagsOption(ZSTD_PLAYTESTS_FLAGS "$ENV{PLAYTESTS_FLAGS}" - "Semicolon-separated list of flags to pass to the playTests.sh test") -add_test(NAME playTests COMMAND sh -c "\"${TESTS_DIR}/playTests.sh\" ${ZSTD_PLAYTESTS_FLAGS}") -find_program(UNAME uname) # Run script only in unix shell environments -if (ZSTD_BUILD_PROGRAMS AND UNAME) - set_property(TEST playTests APPEND PROPERTY ENVIRONMENT - "ZSTD_BIN=$" - "DATAGEN_BIN=$" - ) -else() - message(STATUS "Disabling playTests.sh test because requirements not met") - set_tests_properties(playTests PROPERTIES DISABLED YES) -endif() - -# Label the "Medium" set of tests (see TESTING.md) -set_property(TEST fuzzer zstreamtest playTests APPEND PROPERTY LABELS Medium) - -add_executable(paramgrill ${PROGRAMS_DIR}/benchfn.c ${PROGRAMS_DIR}/benchzstd.c ${PROGRAMS_DIR}/datagen.c ${PROGRAMS_DIR}/lorem.c ${PROGRAMS_DIR}/util.c ${PROGRAMS_DIR}/timefn.c ${TESTS_DIR}/paramgrill.c) -if (UNIX) - target_link_libraries(paramgrill libzstd_static m) #m is math library -else() - target_link_libraries(paramgrill libzstd_static) -endif () diff --git a/third_party/zstd/build/cmake/zstdConfig.cmake.in b/third_party/zstd/build/cmake/zstdConfig.cmake.in deleted file mode 100644 index f4190f9..0000000 --- a/third_party/zstd/build/cmake/zstdConfig.cmake.in +++ /dev/null @@ -1,10 +0,0 @@ -@PACKAGE_INIT@ - -include(CMakeFindDependencyMacro) -if(@ZSTD_MULTITHREAD_SUPPORT@ AND "@UNIX@") - find_dependency(Threads) -endif() - -include("${CMAKE_CURRENT_LIST_DIR}/zstdTargets.cmake") - -check_required_components("zstd") diff --git a/third_party/zstd/build/meson/GetZstdLibraryVersion.py b/third_party/zstd/build/meson/GetZstdLibraryVersion.py deleted file mode 100644 index 461af5f..0000000 --- a/third_party/zstd/build/meson/GetZstdLibraryVersion.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# -import re - - -def find_version_tuple(filepath): - version_file_data = None - with open(filepath) as fd: - version_file_data = fd.read() - - patterns = r"""#\s*define\s+ZSTD_VERSION_MAJOR\s+([0-9]+) -#\s*define\s+ZSTD_VERSION_MINOR\s+([0-9]+) -#\s*define\s+ZSTD_VERSION_RELEASE\s+([0-9]+) -""" - regex = re.compile(patterns, re.MULTILINE) - version_match = regex.search(version_file_data) - if version_match: - return version_match.groups() - raise Exception("Unable to find version string") - - -def main(): - import argparse - parser = argparse.ArgumentParser(description='Print zstd version from lib/zstd.h') - parser.add_argument('file', help='path to lib/zstd.h') - args = parser.parse_args() - version_tuple = find_version_tuple(args.file) - print('.'.join(version_tuple)) - - -if __name__ == '__main__': - main() diff --git a/third_party/zstd/build/meson/InstallSymlink.py b/third_party/zstd/build/meson/InstallSymlink.py deleted file mode 100644 index 3f2998c..0000000 --- a/third_party/zstd/build/meson/InstallSymlink.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# -# This file should be synced with https://github.com/lzutao/meson-symlink - -import os -import pathlib # since Python 3.4 - - -def install_symlink(src, dst, install_dir, dst_is_dir=False, dir_mode=0o777): - if not install_dir.exists(): - install_dir.mkdir(mode=dir_mode, parents=True, exist_ok=True) - if not install_dir.is_dir(): - raise NotADirectoryError(install_dir) - - new_dst = install_dir.joinpath(dst) - if new_dst.is_symlink() and os.readlink(new_dst) == src: - print('File exists: {!r} -> {!r}'.format(new_dst, src)) - return - print('Installing symlink {!r} -> {!r}'.format(new_dst, src)) - new_dst.symlink_to(src, target_is_directory=dst_is_dir) - - -def main(): - import argparse - parser = argparse.ArgumentParser(description='Install a symlink', - usage='{0} [-h] [-d] [-m MODE] source dest install_dir\n\n' - 'example:\n' - ' {0} dash sh /bin'.format(pathlib.Path(__file__).name)) - parser.add_argument('source', help='target to link') - parser.add_argument('dest', help='link name') - parser.add_argument('install_dir', help='installation directory') - parser.add_argument('-d', '--isdir', - action='store_true', - help='dest is a directory') - parser.add_argument('-m', '--mode', - help='directory mode on creating if not exist', - default='0o755') - args = parser.parse_args() - - dir_mode = int(args.mode, 8) - - meson_destdir = os.environ.get('MESON_INSTALL_DESTDIR_PREFIX', default='') - install_dir = pathlib.Path(meson_destdir, args.install_dir) - install_symlink(args.source, args.dest, install_dir, args.isdir, dir_mode) - - -if __name__ == '__main__': - main() diff --git a/third_party/zstd/build/meson/README.md b/third_party/zstd/build/meson/README.md deleted file mode 100644 index d393a06..0000000 --- a/third_party/zstd/build/meson/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Meson build system for zstandard -================================ - -Meson is a build system designed to optimize programmer productivity. -It aims to do this by providing simple, out-of-the-box support for -modern software development tools and practices, such as unit tests, -coverage reports, Valgrind, CCache and the like. - -This Meson build system is provided with no guarantee and maintained -by Dima Krasner \. - -It outputs one `libzstd`, either shared or static, depending on -`default_library` option. - -## How to build - -`cd` to this meson directory (`build/meson`) - -```sh -meson setup -Dbin_programs=true -Dbin_contrib=true builddir -cd builddir -ninja # to build -ninja install # to install -``` - -You might want to install it in staging directory: - -```sh -DESTDIR=./staging ninja install -``` - -To configure build options, use: - -```sh -meson configure -``` - -See [man meson(1)](https://manpages.debian.org/testing/meson/meson.1.en.html). diff --git a/third_party/zstd/build/meson/contrib/gen_html/meson.build b/third_party/zstd/build/meson/contrib/gen_html/meson.build deleted file mode 100644 index 3f30253..0000000 --- a/third_party/zstd/build/meson/contrib/gen_html/meson.build +++ /dev/null @@ -1,30 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -zstd_rootdir = '../../../..' - -gen_html_includes = include_directories(join_paths(zstd_rootdir, 'programs'), - join_paths(zstd_rootdir, 'lib'), - join_paths(zstd_rootdir, 'lib/common'), - join_paths(zstd_rootdir, 'contrib/gen_html')) - -gen_html = executable('gen_html', - join_paths(zstd_rootdir, 'contrib/gen_html/gen_html.cpp'), - include_directories: gen_html_includes, - native: true, - install: false) - -# Update zstd manual -zstd_manual_html = custom_target('zstd_manual.html', - output : 'zstd_manual.html', - command : [gen_html, - zstd_version, - join_paths(meson.current_source_dir(), zstd_rootdir, 'lib/zstd.h'), - '@OUTPUT@'], - install : false) diff --git a/third_party/zstd/build/meson/contrib/meson.build b/third_party/zstd/build/meson/contrib/meson.build deleted file mode 100644 index 7f6d03a..0000000 --- a/third_party/zstd/build/meson/contrib/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -subdir('pzstd') -subdir('gen_html') diff --git a/third_party/zstd/build/meson/contrib/pzstd/meson.build b/third_party/zstd/build/meson/contrib/pzstd/meson.build deleted file mode 100644 index c3ee3d6..0000000 --- a/third_party/zstd/build/meson/contrib/pzstd/meson.build +++ /dev/null @@ -1,25 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -zstd_rootdir = '../../../..' - -pzstd_includes = include_directories(join_paths(zstd_rootdir, 'programs'), - join_paths(zstd_rootdir, 'contrib/pzstd')) -pzstd_sources = [join_paths(zstd_rootdir, 'programs/util.c'), - join_paths(zstd_rootdir, 'contrib/pzstd/main.cpp'), - join_paths(zstd_rootdir, 'contrib/pzstd/Options.cpp'), - join_paths(zstd_rootdir, 'contrib/pzstd/Pzstd.cpp'), - join_paths(zstd_rootdir, 'contrib/pzstd/SkippableFrame.cpp')] -pzstd = executable('pzstd', - pzstd_sources, - cpp_args: pzstd_warning_flags, - include_directories: pzstd_includes, - dependencies: [ libzstd_internal_dep, thread_dep ], - override_options: ['b_ndebug=true'], - install: true) diff --git a/third_party/zstd/build/meson/lib/meson.build b/third_party/zstd/build/meson/lib/meson.build deleted file mode 100644 index d086fc2..0000000 --- a/third_party/zstd/build/meson/lib/meson.build +++ /dev/null @@ -1,171 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -zstd_rootdir = '../../..' - -libzstd_includes = [include_directories(join_paths(zstd_rootdir,'lib'), - join_paths(zstd_rootdir, 'lib/common'), - join_paths(zstd_rootdir, 'lib/compress'), - join_paths(zstd_rootdir, 'lib/decompress'), - join_paths(zstd_rootdir, 'lib/dictBuilder'))] - -libzstd_sources = [join_paths(zstd_rootdir, 'lib/common/entropy_common.c'), - join_paths(zstd_rootdir, 'lib/common/fse_decompress.c'), - join_paths(zstd_rootdir, 'lib/common/threading.c'), - join_paths(zstd_rootdir, 'lib/common/pool.c'), - join_paths(zstd_rootdir, 'lib/common/zstd_common.c'), - join_paths(zstd_rootdir, 'lib/common/error_private.c'), - join_paths(zstd_rootdir, 'lib/common/xxhash.c'), - join_paths(zstd_rootdir, 'lib/compress/hist.c'), - join_paths(zstd_rootdir, 'lib/compress/fse_compress.c'), - join_paths(zstd_rootdir, 'lib/compress/huf_compress.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_compress.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_compress_literals.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_compress_sequences.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_compress_superblock.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_preSplit.c'), - join_paths(zstd_rootdir, 'lib/compress/zstdmt_compress.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_fast.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_double_fast.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_lazy.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_opt.c'), - join_paths(zstd_rootdir, 'lib/compress/zstd_ldm.c'), - join_paths(zstd_rootdir, 'lib/decompress/huf_decompress.c'), - join_paths(zstd_rootdir, 'lib/decompress/zstd_decompress.c'), - join_paths(zstd_rootdir, 'lib/decompress/zstd_decompress_block.c'), - join_paths(zstd_rootdir, 'lib/decompress/zstd_ddict.c'), - join_paths(zstd_rootdir, 'lib/dictBuilder/cover.c'), - join_paths(zstd_rootdir, 'lib/dictBuilder/fastcover.c'), - join_paths(zstd_rootdir, 'lib/dictBuilder/divsufsort.c'), - join_paths(zstd_rootdir, 'lib/dictBuilder/zdict.c')] - -# really we need anything that defines __GNUC__ as that is what ZSTD_ASM_SUPPORTED is gated on -# but these are the two compilers that are supported in tree and actually handle this correctly -# Otherwise, explicitly disable assembly. -if [compiler_gcc, compiler_clang].contains(cc_id) - libzstd_sources += join_paths(zstd_rootdir, 'lib/decompress/huf_decompress_amd64.S') -else - add_project_arguments('-DZSTD_DISABLE_ASM', language: 'c') -endif - -# Explicit define legacy support -add_project_arguments('-DZSTD_LEGACY_SUPPORT=@0@'.format(legacy_level), - language: 'c') - -if legacy_level == 0 - message('Legacy support: DISABLED') -else - # See ZSTD_LEGACY_SUPPORT of lib/README.md - message('Enable legacy support back to version 0.@0@'.format(legacy_level)) - - libzstd_includes += [ include_directories(join_paths(zstd_rootdir, 'lib/legacy')) ] - foreach i : [1, 2, 3, 4, 5, 6, 7] - if legacy_level <= i - libzstd_sources += join_paths(zstd_rootdir, 'lib/legacy/zstd_v0@0@.c'.format(i)) - endif - endforeach -endif - -libzstd_deps = [] -if use_multi_thread - message('Enable multi-threading support') - add_project_arguments('-DZSTD_MULTITHREAD', language: 'c') - libzstd_deps = [ thread_dep ] -endif - -libzstd_c_args = [] -if cc_id == compiler_msvc - if default_library_type != 'static' - libzstd_sources += [windows_mod.compile_resources( - join_paths(zstd_rootdir, 'build/VS2010/libzstd-dll/libzstd-dll.rc'), - include_directories: libzstd_includes)] - libzstd_c_args += ['-DZSTD_DLL_EXPORT=1', - '-DZSTD_HEAPMODE=0', - '-D_CONSOLE', - '-D_CRT_SECURE_NO_WARNINGS'] - else - libzstd_c_args += ['-DZSTD_HEAPMODE=0', - '-D_CRT_SECURE_NO_WARNINGS'] - endif -endif - -mingw_ansi_stdio_flags = [] -if host_machine_os == os_windows and cc_id == compiler_gcc - mingw_ansi_stdio_flags = [ '-D__USE_MINGW_ANSI_STDIO' ] -endif -libzstd_c_args += mingw_ansi_stdio_flags - -libzstd_debug_cflags = [] -if use_debug - libzstd_c_args += '-DDEBUGLEVEL=@0@'.format(debug_level) - if cc_id == compiler_gcc or cc_id == compiler_clang - libzstd_debug_cflags = ['-Wstrict-aliasing=1', '-Wswitch-enum', - '-Wdeclaration-after-statement', '-Wstrict-prototypes', - '-Wundef', '-Wpointer-arith', '-Wvla', - '-Wformat=2', '-Winit-self', '-Wfloat-equal', '-Wwrite-strings', - '-Wredundant-decls', '-Wmissing-prototypes', '-Wc++-compat'] - endif -endif -libzstd_c_args += cc.get_supported_arguments(libzstd_debug_cflags) - -libzstd = library('zstd', - libzstd_sources, - include_directories: libzstd_includes, - c_args: libzstd_c_args, - gnu_symbol_visibility: 'hidden', - dependencies: libzstd_deps, - install: true, - version: zstd_libversion) - -libzstd_dep = declare_dependency(link_with: libzstd, - include_directories: join_paths(zstd_rootdir,'lib')) # Do not expose private headers - -# we link to both: -# - the shared library (for public symbols) -# - the static library (for private symbols) -# -# this is needed because internally private symbols are used all the time, and -# -fvisibility=hidden means those cannot be found -if get_option('default_library') == 'static' - libzstd_static = libzstd - libzstd_internal_dep = declare_dependency(link_with: libzstd, - include_directories: libzstd_includes) -else - if get_option('default_library') == 'shared' - libzstd_static = static_library('zstd_objlib', - objects: libzstd.extract_all_objects(recursive: true), - build_by_default: false) - else - libzstd_static = libzstd.get_static_lib() - endif - - if cc_id == compiler_msvc - # msvc does not actually support linking to both, but errors out with: - # error LNK2005: ZSTD_ already defined in zstd.lib(zstd-1.dll) - libzstd_internal_dep = declare_dependency(link_with: libzstd_static, - include_directories: libzstd_includes) - else - libzstd_internal_dep = declare_dependency(link_with: libzstd, - # the static library must be linked after the shared one - dependencies: declare_dependency(link_with: libzstd_static), - include_directories: libzstd_includes) - endif -endif - -pkgconfig.generate(libzstd, - name: 'libzstd', - filebase: 'libzstd', - description: 'fast lossless compression algorithm library', - version: zstd_libversion, - url: 'https://facebook.github.io/zstd/') - -install_headers(join_paths(zstd_rootdir, 'lib/zstd.h'), - join_paths(zstd_rootdir, 'lib/zdict.h'), - join_paths(zstd_rootdir, 'lib/zstd_errors.h')) diff --git a/third_party/zstd/build/meson/meson.build b/third_party/zstd/build/meson/meson.build deleted file mode 100644 index 5c35478..0000000 --- a/third_party/zstd/build/meson/meson.build +++ /dev/null @@ -1,156 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -project('zstd', - ['c', 'cpp'], - license: ['BSD', 'GPLv2'], - default_options : [ - # There shouldn't be any need to force a C standard convention for zstd - # but in case one would want that anyway, this can be done here. - # 'c_std=gnu99', - # c++11 standard is useful for pzstd - 'cpp_std=c++11', - 'buildtype=release', - 'warning_level=3', - # -Wdocumentation does not actually pass, nor do the test binaries, - # so this isn't safe - #'werror=true' - ], - version: run_command( - find_program('GetZstdLibraryVersion.py'), '../../lib/zstd.h', - check: true).stdout().strip(), - meson_version: '>=0.50.0') - -cc = meson.get_compiler('c') -cxx = meson.get_compiler('cpp') -pkgconfig = import('pkgconfig') -windows_mod = import('windows') - -host_machine_os = host_machine.system() -os_windows = 'windows' -os_linux = 'linux' -os_darwin = 'darwin' -os_freebsd = 'freebsd' -os_sun = 'sunos' - -cc_id = cc.get_id() -compiler_gcc = 'gcc' -compiler_clang = 'clang' -compiler_msvc = 'msvc' - -zstd_version = meson.project_version() - -zstd_libversion = zstd_version - -# ============================================================================= -# Installation directories -# ============================================================================= - -zstd_prefix = get_option('prefix') -zstd_bindir = get_option('bindir') -zstd_datadir = get_option('datadir') -zstd_mandir = get_option('mandir') -zstd_docdir = join_paths(zstd_datadir, 'doc', meson.project_name()) - -# ============================================================================= -# Project options -# ============================================================================= - -# Built-in options -use_debug = get_option('debug') -buildtype = get_option('buildtype') -default_library_type = get_option('default_library') - -# Custom options -debug_level = get_option('debug_level') -legacy_level = get_option('legacy_level') -use_backtrace = get_option('backtrace') -use_static_runtime = get_option('static_runtime') - -bin_programs = get_option('bin_programs') -bin_contrib = get_option('bin_contrib') -bin_tests = get_option('bin_tests') - -feature_multi_thread = get_option('multi_thread') -feature_zlib = get_option('zlib') -feature_lzma = get_option('lzma') -feature_lz4 = get_option('lz4') - -# ============================================================================= -# Dependencies -# ============================================================================= - -libm_dep = cc.find_library('m', required: false) -if host_machine_os == os_windows - thread_dep = dependency('', required: false) - use_multi_thread = not feature_multi_thread.disabled() -else - thread_dep = dependency('threads', required: feature_multi_thread) - use_multi_thread = thread_dep.found() -endif -# Arguments in dependency should be equivalent to those passed to pkg-config -zlib_dep = dependency('zlib', required: feature_zlib) -use_zlib = zlib_dep.found() -lzma_dep = dependency('liblzma', required: feature_lzma) -use_lzma = lzma_dep.found() -lz4_dep = dependency('liblz4', required: feature_lz4) -use_lz4 = lz4_dep.found() - -# ============================================================================= -# Compiler flags -# ============================================================================= - -add_project_arguments('-DXXH_NAMESPACE=ZSTD_', language: ['c']) - -pzstd_warning_flags = [] -if [compiler_gcc, compiler_clang].contains(cc_id) - common_warning_flags = [ '-Wundef', '-Wshadow', '-Wcast-align', '-Wcast-qual' ] - pzstd_warning_flags = ['-Wno-shadow', '-Wno-deprecated-declarations'] - if cc_id == compiler_clang - common_warning_flags += ['-Wconversion', '-Wno-sign-conversion', '-Wdocumentation'] - endif - noexecstack_flags = ['-Wa,--noexecstack' ] - noexecstack_link_flags = ['-Wl,-z,noexecstack'] - cc_compile_flags = cc.get_supported_arguments(common_warning_flags + noexecstack_flags + ['-Wstrict-prototypes']) - cxx_compile_flags = cxx.get_supported_arguments(common_warning_flags + noexecstack_flags) - add_project_arguments(cc_compile_flags, language : 'c') - add_project_arguments(cxx_compile_flags, language : 'cpp') - cc_link_flags = cc.get_supported_link_arguments(noexecstack_link_flags) - cxx_link_flags = cxx.get_supported_link_arguments(noexecstack_link_flags) - add_project_link_arguments(cc_link_flags, language: 'c') - add_project_link_arguments(cxx_link_flags, language: 'cpp') -elif cc_id == compiler_msvc - msvc_compile_flags = [ '/D_UNICODE', '/DUNICODE' ] - if use_multi_thread - msvc_compile_flags += '/MP' - endif - if use_static_runtime - msvc_compile_flags += '/MT' - endif - add_project_arguments(msvc_compile_flags, language: ['c', 'cpp']) -endif - -# ============================================================================= -# Subdirs -# ============================================================================= - -subdir('lib') - -if bin_programs or bin_tests - subdir('programs') -endif - -if bin_tests - subdir('tests') -endif - -if bin_contrib - subdir('contrib') -endif diff --git a/third_party/zstd/build/meson/meson_options.txt b/third_party/zstd/build/meson/meson_options.txt deleted file mode 100644 index 4705178..0000000 --- a/third_party/zstd/build/meson/meson_options.txt +++ /dev/null @@ -1,36 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -# Read guidelines from https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting - -option('legacy_level', type: 'integer', min: 0, max: 7, value: 5, - description: 'Support any legacy format: 7 to 1 for v0.7+ to v0.1+') -option('debug_level', type: 'integer', min: 0, max: 9, value: 1, - description: 'Enable run-time debug. See lib/common/debug.h') -option('backtrace', type: 'feature', value: 'disabled', - description: 'Display a stack backtrace when execution generates a runtime exception') -option('static_runtime', type: 'boolean', value: false, - description: 'Link to static run-time libraries on MSVC') - -option('bin_programs', type: 'boolean', value: true, - description: 'Enable programs build') -option('bin_tests', type: 'boolean', value: false, - description: 'Enable tests build') -option('bin_contrib', type: 'boolean', value: false, - description: 'Enable contrib build') - -option('multi_thread', type: 'feature', value: 'enabled', - description: 'Enable multi-threading when pthread or Windows is detected') -option('zlib', type: 'feature', value: 'auto', - description: 'Enable zlib support') -option('lzma', type: 'feature', value: 'auto', - description: 'Enable lzma support') -option('lz4', type: 'feature', value: 'auto', - description: 'Enable lz4 support') diff --git a/third_party/zstd/build/meson/programs/meson.build b/third_party/zstd/build/meson/programs/meson.build deleted file mode 100644 index e103a62..0000000 --- a/third_party/zstd/build/meson/programs/meson.build +++ /dev/null @@ -1,124 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -zstd_rootdir = '../../..' - -zstd_programs_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'), - join_paths(zstd_rootdir, 'programs/util.c'), - join_paths(zstd_rootdir, 'programs/timefn.c'), - join_paths(zstd_rootdir, 'programs/fileio.c'), - join_paths(zstd_rootdir, 'programs/fileio_asyncio.c'), - join_paths(zstd_rootdir, 'programs/benchfn.c'), - join_paths(zstd_rootdir, 'programs/benchzstd.c'), - join_paths(zstd_rootdir, 'programs/datagen.c'), - join_paths(zstd_rootdir, 'programs/lorem.c'), - join_paths(zstd_rootdir, 'programs/dibio.c'), - join_paths(zstd_rootdir, 'programs/zstdcli_trace.c')] - -zstd_deps = [ libzstd_internal_dep ] -zstd_c_args = libzstd_debug_cflags - -zstd_frugal_deps = [ libzstd_internal_dep ] -zstd_frugal_c_args = [ '-DZSTD_NOBENCH', '-DZSTD_NODICT', '-DZSTD_NOTRACE' ] - -if use_multi_thread - zstd_deps += [ thread_dep ] - zstd_c_args += [ '-DZSTD_MULTITHREAD' ] - zstd_frugal_deps += [ thread_dep ] - zstd_frugal_c_args += [ '-DZSTD_MULTITHREAD' ] -endif - -if use_zlib - zstd_deps += [ zlib_dep ] - zstd_c_args += [ '-DZSTD_GZCOMPRESS', '-DZSTD_GZDECOMPRESS' ] -endif - -if use_lzma - zstd_deps += [ lzma_dep ] - zstd_c_args += [ '-DZSTD_LZMACOMPRESS', '-DZSTD_LZMADECOMPRESS' ] -endif - -if use_lz4 - zstd_deps += [ lz4_dep ] - zstd_c_args += [ '-DZSTD_LZ4COMPRESS', '-DZSTD_LZ4DECOMPRESS' ] -endif - -export_dynamic_on_windows = false -# explicit backtrace enable/disable for Linux & Darwin -have_execinfo = cc.has_header('execinfo.h', required: use_backtrace) -if not have_execinfo - zstd_c_args += '-DBACKTRACE_ENABLE=0' -elif use_debug and host_machine_os == os_windows # MinGW target - zstd_c_args += '-DBACKTRACE_ENABLE=1' - export_dynamic_on_windows = true -endif - -if cc_id == compiler_msvc - if default_library_type != 'static' - zstd_programs_sources += [windows_mod.compile_resources( - join_paths(zstd_rootdir, 'build/VS2010/zstd/zstd.rc'), - include_directories: libzstd_includes)] - endif -endif - -zstd = executable('zstd', - zstd_programs_sources, - c_args: zstd_c_args, - dependencies: zstd_deps, - export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0 - build_by_default: bin_programs, - install: bin_programs) - -if not bin_programs - # we generate rules to build the programs, but don't install anything - # so do not continue to installing scripts and manpages - subdir_done() -endif - -zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'), - join_paths(zstd_rootdir, 'programs/timefn.c'), - join_paths(zstd_rootdir, 'programs/util.c'), - join_paths(zstd_rootdir, 'programs/fileio.c'), - join_paths(zstd_rootdir, 'programs/fileio_asyncio.c')] - -# Minimal target, with only zstd compression and decompression. -# No bench. No legacy. -executable('zstd-frugal', - zstd_frugal_sources, - dependencies: zstd_frugal_deps, - c_args: zstd_frugal_c_args, - install: true) - -install_data(join_paths(zstd_rootdir, 'programs/zstdgrep'), - join_paths(zstd_rootdir, 'programs/zstdless'), - install_dir: zstd_bindir) - -# ============================================================================= -# Programs and manpages installing -# ============================================================================= - -install_man(join_paths(zstd_rootdir, 'programs/zstd.1'), - join_paths(zstd_rootdir, 'programs/zstdgrep.1'), - join_paths(zstd_rootdir, 'programs/zstdless.1')) - -InstallSymlink_py = '../InstallSymlink.py' -zstd_man1_dir = join_paths(zstd_mandir, 'man1') -bin_EXT = host_machine_os == os_windows ? '.exe' : '' -man1_EXT = meson.version().version_compare('>=0.49.0') ? '.1' : '.1.gz' - -foreach f : ['zstdcat', 'unzstd'] - meson.add_install_script(InstallSymlink_py, 'zstd' + bin_EXT, f + bin_EXT, zstd_bindir) - meson.add_install_script(InstallSymlink_py, 'zstd' + man1_EXT, f + man1_EXT, zstd_man1_dir) -endforeach - -if use_multi_thread - meson.add_install_script(InstallSymlink_py, 'zstd' + bin_EXT, 'zstdmt' + bin_EXT, zstd_bindir) - meson.add_install_script(InstallSymlink_py, 'zstd' + man1_EXT, 'zstdmt' + man1_EXT, zstd_man1_dir) -endif diff --git a/third_party/zstd/build/meson/tests/meson.build b/third_party/zstd/build/meson/tests/meson.build deleted file mode 100644 index 71ffc50..0000000 --- a/third_party/zstd/build/meson/tests/meson.build +++ /dev/null @@ -1,217 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018-present Dima Krasner -# lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# - -zstd_rootdir = '../../..' - -tests_supported_oses = [os_linux, 'gnu/kfreebsd', os_darwin, 'gnu', 'openbsd', - os_freebsd, 'netbsd', 'dragonfly', os_sun] - -# ============================================================================= -# Test flags -# ============================================================================= - -FUZZER_FLAGS = ['--no-big-tests'] -FUZZERTEST = '-T200s' -ZSTREAM_TESTTIME = '-T90s' -DECODECORPUS_TESTTIME = '-T30' - -# ============================================================================= -# Executables -# ============================================================================= - -test_includes = [ include_directories(join_paths(zstd_rootdir, 'programs')) ] - -testcommon_sources = [join_paths(zstd_rootdir, 'programs/datagen.c'), - join_paths(zstd_rootdir, 'programs/lorem.c'), - join_paths(zstd_rootdir, 'programs/util.c'), - join_paths(zstd_rootdir, 'programs/timefn.c'), - join_paths(zstd_rootdir, 'programs/benchfn.c'), - join_paths(zstd_rootdir, 'programs/benchzstd.c')] - -testcommon = static_library('testcommon', - testcommon_sources, - # needed due to use of private symbol + -fvisibility=hidden - link_with: libzstd_static) - -testcommon_dep = declare_dependency(link_with: testcommon, - dependencies: libzstd_deps, - include_directories: libzstd_includes) - -datagen_sources = [join_paths(zstd_rootdir, 'tests/datagencli.c'), - join_paths(zstd_rootdir, 'tests/loremOut.c')] -datagen = executable('datagen', - datagen_sources, - c_args: [ '-DNDEBUG' ], - include_directories: test_includes, - dependencies: testcommon_dep, - install: false) - -fullbench_sources = [join_paths(zstd_rootdir, 'tests/fullbench.c')] -fullbench = executable('fullbench', - fullbench_sources, - include_directories: test_includes, - dependencies: testcommon_dep, - install: false) - -fuzzer_sources = [join_paths(zstd_rootdir, 'tests/fuzzer.c')] -fuzzer = executable('fuzzer', - fuzzer_sources, - include_directories: test_includes, - dependencies: [ testcommon_dep, thread_dep ], - install: false) - -zstreamtest_sources = [ - join_paths(zstd_rootdir, 'tests/seqgen.c'), - join_paths(zstd_rootdir, 'tests/zstreamtest.c'), - join_paths(zstd_rootdir, 'tests/external_matchfinder.c')] -zstreamtest = executable('zstreamtest', - zstreamtest_sources, - include_directories: test_includes, - dependencies: testcommon_dep, - install: false) - -paramgrill_sources = [join_paths(zstd_rootdir, 'tests/paramgrill.c')] -paramgrill = executable('paramgrill', - paramgrill_sources, - include_directories: test_includes, - dependencies: [ testcommon_dep, libm_dep ], - install: false) - -roundTripCrash_sources = [join_paths(zstd_rootdir, 'tests/roundTripCrash.c')] -roundTripCrash = executable('roundTripCrash', - roundTripCrash_sources, - dependencies: [ testcommon_dep ], - install: false) - -longmatch_sources = [join_paths(zstd_rootdir, 'tests/longmatch.c')] -longmatch = executable('longmatch', - longmatch_sources, - dependencies: [ libzstd_internal_dep ], - install: false) - -invalidDictionaries_sources = [join_paths(zstd_rootdir, 'tests/invalidDictionaries.c')] -invalidDictionaries = executable('invalidDictionaries', - invalidDictionaries_sources, - dependencies: [ libzstd_dep ], - install: false) - -if 0 < legacy_level and legacy_level <= 4 - legacy_sources = [join_paths(zstd_rootdir, 'tests/legacy.c')] - legacy = executable('legacy', - legacy_sources, - # Use -Dlegacy_level build option to control it - #c_args: '-DZSTD_LEGACY_SUPPORT=4', - dependencies: [ libzstd_dep ], - install: false) -endif - -decodecorpus_sources = [join_paths(zstd_rootdir, 'tests/decodecorpus.c')] -decodecorpus = executable('decodecorpus', - decodecorpus_sources, - include_directories: test_includes, - dependencies: [ testcommon_dep, libm_dep ], - install: false) - -poolTests_sources = [join_paths(zstd_rootdir, 'tests/poolTests.c')] -poolTests = executable('poolTests', - poolTests_sources, - include_directories: test_includes, - dependencies: [ testcommon_dep, thread_dep ], - install: false) - -checkTag_sources = [join_paths(zstd_rootdir, 'tests/checkTag.c')] -checkTag = executable('checkTag', - checkTag_sources, - dependencies: [ libzstd_dep ], - install: false) - -# ============================================================================= -# Tests (Use "meson test --list" to list all tests) -# ============================================================================= - -if tests_supported_oses.contains(host_machine_os) - valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: false) - valgrindTest_py = files('valgrindTest.py') - if valgrind_prog.found() - test('valgrindTest', - valgrindTest_py, - args: [valgrind_prog.path(), zstd, datagen, fuzzer, fullbench], - depends: [zstd, datagen, fuzzer, fullbench], - timeout: 600) # Timeout should work on HDD drive - endif -endif - -if host_machine_os != os_windows - playTests_sh = find_program(join_paths(zstd_rootdir, 'tests/playTests.sh'), required: true) - - # add slow tests only if the meson version is new enough to support - # test setups with default-excluded suites - if meson.version().version_compare('>=0.57.0') - matrix = {'fast': [], 'slow': ['--test-large-data']} - else - matrix = {'fast': []} - endif - - foreach suite, opt: matrix - test('test-zstd-'+suite, - playTests_sh, - args: opt, - env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'], - depends: [datagen, zstd], - suite: suite, - workdir: meson.current_build_dir(), - timeout: 2800) # Timeout should work on HDD drive - endforeach -endif - -test('test-fullbench-1', - fullbench, - args: ['-i1'], - depends: [datagen], - timeout: 60) -test('test-fullbench-2', - fullbench, - args: ['-i1', '-P0'], - depends: [datagen], - timeout: 60) - -if use_zlib - test('test-fuzzer', - fuzzer, - args: ['-v', FUZZERTEST] + FUZZER_FLAGS, - timeout: 480) -endif - -test('test-zstream-1', - zstreamtest, - args: ['-v', ZSTREAM_TESTTIME] + FUZZER_FLAGS, - timeout: 240) -test('test-zstream-3', - zstreamtest, - args: ['--newapi', '-t1', ZSTREAM_TESTTIME] + FUZZER_FLAGS, - timeout: 120) -test('test-longmatch', longmatch, timeout: 36) -test('test-invalidDictionaries', invalidDictionaries) # should be fast -if 0 < legacy_level and legacy_level <= 4 - test('test-legacy', legacy) # should be fast -endif -test('test-decodecorpus', - decodecorpus, - args: ['-t', DECODECORPUS_TESTTIME], - timeout: 60) -test('test-poolTests', poolTests) # should be fast - -if meson.version().version_compare('>=0.57.0') - add_test_setup('fast', - is_default: true, - exclude_suites: ['slow']) - add_test_setup('slow', - exclude_suites: ['fast']) -endif diff --git a/third_party/zstd/build/meson/tests/valgrindTest.py b/third_party/zstd/build/meson/tests/valgrindTest.py deleted file mode 100644 index 05d8487..0000000 --- a/third_party/zstd/build/meson/tests/valgrindTest.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python3 -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# -import os -import subprocess -import tempfile - - -def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench): - VALGRIND_ARGS = [valgrind, '--leak-check=full', '--show-leak-kinds=all', '--error-exitcode=1'] - - print('\n ---- valgrind tests : memory analyzer ----') - - subprocess.check_call([*VALGRIND_ARGS, datagen, '-g50M'], stdout=subprocess.DEVNULL) - - if subprocess.call([*VALGRIND_ARGS, zstd], - stdout=subprocess.DEVNULL) == 0: - raise subprocess.SubprocessError('zstd without argument should have failed') - - with subprocess.Popen([datagen, '-g80'], stdout=subprocess.PIPE) as p1, \ - subprocess.Popen([*VALGRIND_ARGS, zstd, '-', '-c'], - stdin=p1.stdout, - stdout=subprocess.DEVNULL) as p2: - p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits. - p2.communicate() - if p2.returncode != 0: - raise subprocess.SubprocessError() - - with subprocess.Popen([datagen, '-g16KB'], stdout=subprocess.PIPE) as p1, \ - subprocess.Popen([*VALGRIND_ARGS, zstd, '-vf', '-', '-c'], - stdin=p1.stdout, - stdout=subprocess.DEVNULL) as p2: - p1.stdout.close() - p2.communicate() - if p2.returncode != 0: - raise subprocess.SubprocessError() - - with tempfile.NamedTemporaryFile() as tmp_fd: - with subprocess.Popen([datagen, '-g2930KB'], stdout=subprocess.PIPE) as p1, \ - subprocess.Popen([*VALGRIND_ARGS, zstd, '-5', '-vf', '-', '-o', tmp_fd.name], - stdin=p1.stdout) as p2: - p1.stdout.close() - p2.communicate() - if p2.returncode != 0: - raise subprocess.SubprocessError() - - subprocess.check_call([*VALGRIND_ARGS, zstd, '-vdf', tmp_fd.name, '-c'], - stdout=subprocess.DEVNULL) - - with subprocess.Popen([datagen, '-g64MB'], stdout=subprocess.PIPE) as p1, \ - subprocess.Popen([*VALGRIND_ARGS, zstd, '-vf', '-', '-c'], - stdin=p1.stdout, - stdout=subprocess.DEVNULL) as p2: - p1.stdout.close() - p2.communicate() - if p2.returncode != 0: - raise subprocess.SubprocessError() - - subprocess.check_call([*VALGRIND_ARGS, fuzzer, '-T1mn', '-t1']) - subprocess.check_call([*VALGRIND_ARGS, fullbench, '-i1']) - - -def main(): - import argparse - parser = argparse.ArgumentParser(description='Valgrind tests : memory analyzer') - parser.add_argument('valgrind', help='valgrind path') - parser.add_argument('zstd', help='zstd path') - parser.add_argument('datagen', help='datagen path') - parser.add_argument('fuzzer', help='fuzzer path') - parser.add_argument('fullbench', help='fullbench path') - - args = parser.parse_args() - - valgrind = args.valgrind - zstd = args.zstd - datagen = args.datagen - fuzzer = args.fuzzer - fullbench = args.fullbench - - valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench) - - -if __name__ == '__main__': - main() diff --git a/third_party/zstd/build/single_file_libs/.gitignore b/third_party/zstd/build/single_file_libs/.gitignore deleted file mode 100644 index b769e10..0000000 --- a/third_party/zstd/build/single_file_libs/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ - -# build artifacts -zstddeclib.c -zstdenclib.c -zstd.c -zstd.h -zstd_errors.h - -# test artifacts -temp* diff --git a/third_party/zstd/build/single_file_libs/README.md b/third_party/zstd/build/single_file_libs/README.md deleted file mode 100644 index 64c973a..0000000 --- a/third_party/zstd/build/single_file_libs/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Single File Zstandard Libraries - -The script `combine.sh` creates an _amalgamated_ source file that can be used with or without `zstd.h`. This isn't a _header-only_ file but it does offer a similar level of simplicity when integrating into a project. - -All it now takes to support Zstd in your own projects is the addition of a single file, two if using the header, with no configuration or further build steps. - -Decompressor ------------- - -This is the most common use case. The decompression library is small, adding, for example, 26kB to an Emscripten compiled WebAssembly project. Native implementations add a little more, 40-70kB depending on the compiler and platform. - -Create `zstddeclib.c` from the Zstd source using: -``` -cd zstd/build/single_file_libs -python3 combine.py -r ../../lib -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c -``` -Then add the resulting file to your project (see the [example files](examples)). - -`create_single_file_decoder.sh` will run the above script, creating the file `zstddeclib.c` (`build_decoder_test.sh` will also create `zstddeclib.c`, then compile and test the result). - -Full Library ------------- - -The same tool can amalgamate the entire Zstd library for ease of adding both compression and decompression to a project. The [roundtrip example](examples/roundtrip.c) uses the original `zstd.h` with the remaining source files combined into `zstd.c` (currently just over 1.2MB) created from `zstd-in.c`. As with the standalone decoder the most useful compile flags have already been rolled-in and the resulting file can be added to a project as-is. - -Create `zstd.c` from the Zstd source using: -``` -cd zstd/build/single_file_libs -python3 combine.py -r ../../lib -x legacy/zstd_legacy.h -k zstd.h -o zstd.c zstd-in.c -``` -It's possible to create a compressor-only library but since the decompressor is so small in comparison this doesn't bring much of a gain (but for the curious, simply remove the files in the _decompress_ section at the end of `zstd-in.c`). - -`create_single_file_library.sh` will run the script to create `zstd.c` (`build_library_test.sh` will also create `zstd.c`, then compile and test the result). diff --git a/third_party/zstd/build/single_file_libs/build_decoder_test.sh b/third_party/zstd/build/single_file_libs/build_decoder_test.sh deleted file mode 100644 index c4ca55f..0000000 --- a/third_party/zstd/build/single_file_libs/build_decoder_test.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -# Temporary compiled binary -OUT_FILE="tempbin" - -# Optional temporary compiled WebAssembly -OUT_WASM="temp.wasm" - -# Source files to compile using Emscripten. -IN_FILES="examples/emscripten.c" - -# Emscripten build using emcc. -emscripten_emcc_build() { - # Compile the same example as above - CC_FLAGS="-Wall -Wextra -Wshadow -Werror -Os -g0 -flto" - emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES - # Did compilation work? - if [ $? -ne 0 ]; then - echo "Compiling ${IN_FILES}: FAILED" - exit 1 - fi - echo "Compiling ${IN_FILES}: PASSED" - rm -f $OUT_WASM -} - -# Emscripten build using docker. -emscripten_docker_build() { - docker container run --rm \ - --volume $PWD:/code \ - --workdir /code \ - emscripten/emsdk:latest \ - emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES - # Did compilation work? - if [ $? -ne 0 ]; then - echo "Compiling ${IN_FILES} (using docker): FAILED" - exit 1 - fi - echo "Compiling ${IN_FILES} (using docker): PASSED" - rm -f $OUT_WASM -} - -# Try Emscripten build using emcc or docker. -try_emscripten_build() { - which emcc > /dev/null - if [ $? -eq 0 ]; then - emscripten_emcc_build - return $? - fi - - which docker > /dev/null - if [ $? -eq 0 ]; then - emscripten_docker_build - return $? - fi - - echo "(Skipping Emscripten test)" -} - -# Amalgamate the sources -./create_single_file_decoder.sh -# Did combining work? -if [ $? -ne 0 ]; then - echo "Single file decoder creation script: FAILED" - exit 1 -fi -echo "Single file decoder creation script: PASSED" - -# Compile the generated output -cc -Wall -Wextra -Wshadow -Werror -Os -g0 -o $OUT_FILE examples/simple.c -# Did compilation work? -if [ $? -ne 0 ]; then - echo "Compiling simple.c: FAILED" - exit 1 -fi -echo "Compiling simple.c: PASSED" - -# Run then delete the compiled output -./$OUT_FILE -retVal=$? -rm -f $OUT_FILE -# Did the test work? -if [ $retVal -ne 0 ]; then - echo "Running simple.c: FAILED" - exit 1 -fi -echo "Running simple.c: PASSED" - -# Try Emscripten build if emcc or docker command is available. -try_emscripten_build - -exit 0 diff --git a/third_party/zstd/build/single_file_libs/build_library_test.sh b/third_party/zstd/build/single_file_libs/build_library_test.sh deleted file mode 100644 index b67cd99..0000000 --- a/third_party/zstd/build/single_file_libs/build_library_test.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -# Where to find the sources (only used to copy zstd.h) -ZSTD_SRC_ROOT="../../lib" - -# Temporary compiled binary -OUT_FILE="tempbin" - -# Optional temporary compiled WebAssembly -OUT_WASM="temp.wasm" - -# Source files to compile using Emscripten. -IN_FILES="zstd.c examples/roundtrip.c" - -# Emscripten build using emcc. -emscripten_emcc_build() { - # Compile the same example as above - CC_FLAGS="-Wall -Wextra -Wshadow -Werror -Os -g0 -flto" - emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES - # Did compilation work? - if [ $? -ne 0 ]; then - echo "Compiling ${IN_FILES}: FAILED" - exit 1 - fi - echo "Compiling ${IN_FILES}: PASSED" - rm -f $OUT_WASM -} - -# Emscripten build using docker. -emscripten_docker_build() { - docker container run --rm \ - --volume $PWD:/code \ - --workdir /code \ - emscripten/emsdk:latest \ - emcc $CC_FLAGS -s WASM=1 -I. -o $OUT_WASM $IN_FILES - # Did compilation work? - if [ $? -ne 0 ]; then - echo "Compiling ${IN_FILES} (using docker): FAILED" - exit 1 - fi - echo "Compiling ${IN_FILES} (using docker): PASSED" - rm -f $OUT_WASM -} - -# Try Emscripten build using emcc or docker. -try_emscripten_build() { - which emcc > /dev/null - if [ $? -eq 0 ]; then - emscripten_emcc_build - return $? - fi - - which docker > /dev/null - if [ $? -eq 0 ]; then - emscripten_docker_build - return $? - fi - - echo "(Skipping Emscripten test)" -} - -# Amalgamate the sources -./create_single_file_library.sh -# Did combining work? -if [ $? -ne 0 ]; then - echo "Single file library creation script: FAILED" - exit 1 -fi -echo "Single file library creation script: PASSED" - -# Copy the header to here (for the tests) -cp "$ZSTD_SRC_ROOT/zstd.h" examples/zstd.h -cp "$ZSTD_SRC_ROOT/zstd_errors.h" examples/zstd_errors.h - -# Compile the generated output -cc -Wall -Wextra -Werror -Wshadow -pthread -I. -Os -g0 -o $OUT_FILE zstd.c examples/roundtrip.c -# Did compilation work? -if [ $? -ne 0 ]; then - echo "Compiling roundtrip.c: FAILED" - exit 1 -fi -echo "Compiling roundtrip.c: PASSED" - -# Run then delete the compiled output -./$OUT_FILE -retVal=$? -rm -f $OUT_FILE -# Did the test work? -if [ $retVal -ne 0 ]; then - echo "Running roundtrip.c: FAILED" - exit 1 -fi -echo "Running roundtrip.c: PASSED" - -# Try Emscripten build if emcc or docker command is available. -try_emscripten_build - -exit 0 diff --git a/third_party/zstd/build/single_file_libs/combine.py b/third_party/zstd/build/single_file_libs/combine.py deleted file mode 100644 index 771dd20..0000000 --- a/third_party/zstd/build/single_file_libs/combine.py +++ /dev/null @@ -1,234 +0,0 @@ -#!/usr/bin/env python3 - -# Tool to bundle multiple C/C++ source files, inlining any includes. -# -# Note: there are two types of exclusion options: the '-x' flag, which besides -# excluding a file also adds an #error directive in place of the #include, and -# the '-k' flag, which keeps the #include and doesn't inline the file. The -# intended use cases are: '-x' for files that would normally be #if'd out, so -# features that 100% won't be used in the amalgamated file, for which every -# occurrence adds the error, and '-k' for headers that we wish to manually -# include, such as a project's public API, for which occurrences after the first -# are removed. -# -# Todo: the error handling could be better, which currently throws and halts -# (which is functional just not very friendly). -# -# Author: Carl Woffenden, Numfum GmbH (this script is released under a CC0 license/Public Domain) - -import argparse, re, sys - -from pathlib import Path -from typing import Any, List, Optional, Pattern, Set, TextIO - -# Set of file roots when searching (equivalent to -I paths for the compiler). -roots: Set[Path] = set() - -# Set of (canonical) file Path objects to exclude from inlining (and not only -# exclude but to add a compiler error directive when they're encountered). -excludes: Set[Path] = set() - -# Set of (canonical) file Path objects to keep as include directives. -keeps: Set[Path] = set() - -# Whether to keep the #pragma once directives (unlikely, since this will result -# in a warning, but the option is there). -keep_pragma: bool = False - -# Destination file object (or stdout if no output file was supplied). -destn: TextIO = sys.stdout - -# Set of file Path objects previously inlined (and to ignore if reencountering). -found: Set[Path] = set() - -# Compiled regex Pattern to handle "#pragma once" in various formats: -# -# #pragma once -# #pragma once -# # pragma once -# #pragma once -# #pragma once // comment -# -# Ignoring commented versions, same as include_regex. -# -pragma_regex: Pattern = re.compile(r'^\s*#\s*pragma\s*once\s*') - -# Compiled regex Pattern to handle the following type of file includes: -# -# #include "file" -# #include "file" -# # include "file" -# #include "file" -# #include "file" // comment -# #include "file" // comment with quote " -# -# And all combinations of, as well as ignoring the following: -# -# #include -# //#include "file" -# /*#include "file"*/ -# -# We don't try to catch errors since the compiler will do this (and the code is -# expected to be valid before processing) and we don't care what follows the -# file (whether it's a valid comment or not, since anything after the quoted -# string is ignored) -# -include_regex: Pattern = re.compile(r'^\s*#\s*include\s*"(.+?)"') - -# Simple tests to prove include_regex's cases. -# -def test_match_include() -> bool: - if (include_regex.match('#include "file"') and - include_regex.match(' #include "file"') and - include_regex.match('# include "file"') and - include_regex.match('#include "file"') and - include_regex.match('#include "file" // comment')): - if (not include_regex.match('#include ') and - not include_regex.match('//#include "file"') and - not include_regex.match('/*#include "file"*/')): - found = include_regex.match('#include "file" // "') - if (found and found.group(1) == 'file'): - print('#include match valid') - return True - return False - -# Simple tests to prove pragma_regex's cases. -# -def test_match_pragma() -> bool: - if (pragma_regex.match('#pragma once') and - pragma_regex.match(' #pragma once') and - pragma_regex.match('# pragma once') and - pragma_regex.match('#pragma once') and - pragma_regex.match('#pragma once // comment')): - if (not pragma_regex.match('//#pragma once') and - not pragma_regex.match('/*#pragma once*/')): - print('#pragma once match valid') - return True - return False - -# Finds 'file'. First the list of 'root' paths are searched, followed by the -# currently processing file's 'parent' path, returning a valid Path in -# canonical form. If no match is found None is returned. -# -def resolve_include(file: str, parent: Optional[Path] = None) -> Optional[Path]: - for root in roots: - found = root.joinpath(file).resolve() - if (found.is_file()): - return found - if (parent): - found = parent.joinpath(file).resolve(); - else: - found = Path(file) - if (found.is_file()): - return found - return None - -# Helper to resolve lists of files. 'file_list' is passed in from the arguments -# and each entry resolved to its canonical path (like any include entry, either -# from the list of root paths or the owning file's 'parent', which in this case -# is case is the input file). The results are stored in 'resolved'. -# -def resolve_excluded_files(file_list: Optional[List[str]], resolved: Set[Path], parent: Optional[Path] = None) -> None: - if (file_list): - for filename in file_list: - found = resolve_include(filename, parent) - if (found): - resolved.add(found) - else: - error_line(f'Warning: excluded file not found: {filename}') - -# Writes 'line' to the open 'destn' (or stdout). -# -def write_line(line: str) -> None: - print(line, file=destn) - -# Logs 'line' to stderr. This is also used for general notifications that we -# don't want to go to stdout (so the source can be piped). -# -def error_line(line: Any) -> None: - print(line, file=sys.stderr) - -# Inline the contents of 'file' (with any of its includes also inlined, etc.). -# -# Note: text encoding errors are ignored and replaced with ? when reading the -# input files. This isn't ideal, but it's more than likely in the comments than -# code and a) the text editor has probably also failed to read the same content, -# and b) the compiler probably did too. -# -def add_file(file: Path, file_name: str = None) -> None: - if (file.is_file()): - if (not file_name): - file_name = file.name - error_line(f'Processing: {file_name}') - with file.open('r', errors='replace') as opened: - for line in opened: - line = line.rstrip('\n') - match_include = include_regex.match(line); - if (match_include): - # We have a quoted include directive so grab the file - inc_name = match_include.group(1) - resolved = resolve_include(inc_name, file.parent) - if (resolved): - if (resolved in excludes): - # The file was excluded so error if the compiler uses it - write_line(f'#error Using excluded file: {inc_name} (re-amalgamate source to fix)') - error_line(f'Excluding: {inc_name}') - else: - if (resolved not in found): - # The file was not previously encountered - found.add(resolved) - if (resolved in keeps): - # But the include was flagged to keep as included - write_line(f'/**** *NOT* inlining {inc_name} ****/') - write_line(line) - error_line(f'Not inlining: {inc_name}') - else: - # The file was neither excluded nor seen before so inline it - write_line(f'/**** start inlining {inc_name} ****/') - add_file(resolved, inc_name) - write_line(f'/**** ended inlining {inc_name} ****/') - else: - write_line(f'/**** skipping file: {inc_name} ****/') - else: - # The include file didn't resolve to a file - write_line(f'#error Unable to find: {inc_name}') - error_line(f'Error: Unable to find: {inc_name}') - else: - # Skip any 'pragma once' directives, otherwise write the source line - if (keep_pragma or not pragma_regex.match(line)): - write_line(line) - else: - error_line(f'Error: Invalid file: {file}') - -# Start here -parser = argparse.ArgumentParser(description='Amalgamate Tool', epilog=f'example: {sys.argv[0]} -r ../my/path -r ../other/path -o out.c in.c') -parser.add_argument('-r', '--root', action='append', type=Path, help='file root search path') -parser.add_argument('-x', '--exclude', action='append', help='file to completely exclude from inlining') -parser.add_argument('-k', '--keep', action='append', help='file to exclude from inlining but keep the include directive') -parser.add_argument('-p', '--pragma', action='store_true', default=False, help='keep any "#pragma once" directives (removed by default)') -parser.add_argument('-o', '--output', type=argparse.FileType('w'), help='output file (otherwise stdout)') -parser.add_argument('input', type=Path, help='input file') -args = parser.parse_args() - -# Fail early on an invalid input (and store it so we don't recurse) -args.input = args.input.resolve(strict=True) -found.add(args.input) - -# Resolve all of the root paths upfront (we'll halt here on invalid roots) -if (args.root): - for path in args.root: - roots.add(path.resolve(strict=True)) - -# The remaining params: so resolve the excluded files and #pragma once directive -resolve_excluded_files(args.exclude, excludes, args.input.parent) -resolve_excluded_files(args.keep, keeps, args.input.parent) -keep_pragma = args.pragma; - -# Then recursively process the input file -try: - if (args.output): - destn = args.output - add_file(args.input) -finally: - if (destn): - destn.close() diff --git a/third_party/zstd/build/single_file_libs/combine.sh b/third_party/zstd/build/single_file_libs/combine.sh deleted file mode 100644 index 222c2c3..0000000 --- a/third_party/zstd/build/single_file_libs/combine.sh +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh -e - -# Tool to bundle multiple C/C++ source files, inlining any includes. -# -# TODO: ROOTS, FOUND, etc., as arrays (since they fail on paths with spaces) -# -# Author: Carl Woffenden, Numfum GmbH (this script is released under a CC0 license/Public Domain) - -# Common file roots -ROOTS="." - -# -x option excluded includes -XINCS="" - -# -k option includes to keep as include directives -KINCS="" - -# Files previously visited -FOUND="" - -# Optional destination file (empty string to write to stdout) -DESTN="" - -# Whether the "#pragma once" directives should be written to the output -PONCE=0 - -# Prints the script usage then exits -usage() { - echo "Usage: $0 [-r ] [-x
] [-k
] [-o ] infile" - echo " -r file root search path" - echo " -x file to completely exclude from inlining" - echo " -k file to exclude from inlining but keep the include directive" - echo " -p keep any '#pragma once' directives (removed by default)" - echo " -o output file (otherwise stdout)" - echo "Example: $0 -r ../my/path - r ../other/path -o out.c in.c" - exit 1 -} - -# Tests that the grep implementation works as expected (older OSX grep fails) -test_deps() { - if ! echo '#include "foo"' | grep -Eq '^\s*#\s*include\s*".+"'; then - echo "Aborting: the grep implementation fails to parse include lines" - exit 1 - fi - if ! echo '"foo.h"' | sed -E 's/"([^"]+)"/\1/' | grep -Eq '^foo\.h$'; then - echo "Aborting: sed is unavailable or non-functional" - exit 1 - fi -} - -# Test if glob pattern $1 matches subject $2 (see fnmatch(3)) -fnmatch() { - case "$2" in - $1) - return 0 - ;; - esac - return 1 -} - -# Test if line $1 is local include directive -is_include_line() { - fnmatch "*#*include*" "$1" || return 1 - printf "%s\n" "$1" | grep -Eq '^\s*#\s*include\s*".+"' -} - -# Test if line $1 is pragma once directive -is_pragma_once_line() { - fnmatch "*#*pragma*once*" "$1" || return 1 - printf "%s\n" "$1" | grep -Eq '^\s*#\s*pragma\s*once\s*' -} - -# Tests if list $1 has item $2 (returning zero on a match) -# (originally used grep -Eq "(^|\s*)$2(\$|\s*)) -readonly list_FS="$IFS" -list_has_item() { - # Re: escaping glob pattern special characters in item string: - # - # bash (tested 3.2.57, 5.1.4), dash (tested 0.5.10.2), NetBSD /bin/sh - # (tested 8.2), and Solaris /bin/sh (tested 11.4) require escaping - # backslashes in a bracket expression despite POSIX specifying that - # backslash loses significance in a bracket expression. - # - # Conversely, neither FreeBSD /bin/sh (tested 12.2) nor OpenBSD /bin/sh - # (tested 7.1) obey backslash-escaping in case statement patterns even - # outside bracket expressions, so escape special characters using bracket - # expressions. - # - # Solaris /bin/sh (tested 11.4) requires vertical bar (|) to be escaped. - # - # All accommodations should behave as expected under strict POSIX semantics. - if fnmatch "*[\\*?[|]*" "$2"; then - set -- "$1" "$(printf '%s\n' "$2" | sed -e 's/[*?[|]/[&]/g; s/[\]/[\\&]/g')" - fi - for item_P in "*[$list_FS]$2[$list_FS]*" "*[$list_FS]$2" "$2[$list_FS]*" "$2"; do - fnmatch "${item_P}" "$1" && return 0 - done - return 1 -} - -# Adds a new line with the supplied arguments to $DESTN (or stdout) -write_line() { - if [ -n "$DESTN" ]; then - printf '%s\n' "$@" >> "$DESTN" - else - printf '%s\n' "$@" - fi -} - -log_line() { - echo $@ >&2 -} - -# Find this file! -resolve_include() { - local srcdir=$1 - local inc=$2 - for root in $srcdir $ROOTS; do - if [ -f "$root/$inc" ]; then - # Try to reduce the file path into a canonical form (so that multiple) - # includes of the same file are successfully deduplicated, even if they - # are expressed differently. - local relpath="$(realpath --relative-to . "$root/$inc" 2>/dev/null)" - if [ "$relpath" != "" ]; then # not all realpaths support --relative-to - echo "$relpath" - return 0 - fi - local relpath="$(realpath "$root/$inc" 2>/dev/null)" - if [ "$relpath" != "" ]; then # not all distros have realpath... - echo "$relpath" - return 0 - fi - # Fallback on Python to reduce the path if the above fails. - local relpath=$(python -c "import os,sys; print os.path.relpath(sys.argv[1])" "$root/$inc" 2>/dev/null) - if [ "$relpath" != "" ]; then # not all distros have realpath... - echo "$relpath" - return 0 - fi - # Worst case, fall back to just the root + relative include path. The - # problem with this is that it is possible to emit multiple different - # resolved paths to the same file, depending on exactly how its included. - # Since the main loop below keeps a list of the resolved paths it's - # already included, in order to avoid repeated includes, this failure to - # produce a canonical/reduced path can lead to multiple inclusions of the - # same file. But it seems like the resulting single file library still - # works (hurray include guards!), so I guess it's ok. - echo "$root/$inc" - return 0 - fi - done - return 1 -} - -# Adds the contents of $1 with any of its includes inlined -add_file() { - local file=$1 - if [ -n "$file" ]; then - log_line "Processing: $file" - # Get directory of the current so we can resolve relative includes - local srcdir="$(dirname "$file")" - # Read the file - local line= - while IFS= read -r line; do - if is_include_line "$line"; then - # We have an include directive so strip the (first) file - local inc=$(echo "$line" | grep -Eo '".*"' | sed -E 's/"([^"]+)"/\1/' | head -1) - local res_inc="$(resolve_include "$srcdir" "$inc")" - if list_has_item "$XINCS" "$inc"; then - # The file was excluded so error if the source attempts to use it - write_line "#error Using excluded file: $inc (re-amalgamate source to fix)" - log_line "Excluding: $inc" - else - if ! list_has_item "$FOUND" "$res_inc"; then - # The file was not previously encountered - FOUND="$FOUND $res_inc" - if list_has_item "$KINCS" "$inc"; then - # But the include was flagged to keep as included - write_line "/**** *NOT* inlining $inc ****/" - write_line "$line" - log_line "Not Inlining: $inc" - else - # The file was neither excluded nor seen before so inline it - write_line "/**** start inlining $inc ****/" - add_file "$res_inc" - write_line "/**** ended inlining $inc ****/" - fi - else - write_line "/**** skipping file: $inc ****/" - fi - fi - else - # Skip any 'pragma once' directives, otherwise write the source line - local write=$PONCE - if [ $write -eq 0 ]; then - if ! is_pragma_once_line "$line"; then - write=1 - fi - fi - if [ $write -ne 0 ]; then - write_line "$line" - fi - fi - done < "$file" - else - write_line "#error Unable to find \"$1\"" - log_line "Error: Unable to find: \"$1\"" - fi -} - -while getopts ":r:x:k:po:" opts; do - case $opts in - r) - ROOTS="$ROOTS $OPTARG" - ;; - x) - XINCS="$XINCS $OPTARG" - ;; - k) - KINCS="$KINCS $OPTARG" - ;; - p) - PONCE=1 - ;; - o) - DESTN="$OPTARG" - ;; - *) - usage - ;; - esac -done -shift $((OPTIND-1)) - -if [ -n "$1" ]; then - if [ -f "$1" ]; then - if [ -n "$DESTN" ]; then - printf "" > "$DESTN" - fi - test_deps - log_line "Processing using the slower shell script; this might take a while" - add_file "$1" - else - echo "Input file not found: \"$1\"" - exit 1 - fi -else - usage -fi -exit 0 diff --git a/third_party/zstd/build/single_file_libs/create_single_file_decoder.sh b/third_party/zstd/build/single_file_libs/create_single_file_decoder.sh deleted file mode 100644 index 3c0c577..0000000 --- a/third_party/zstd/build/single_file_libs/create_single_file_decoder.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# Where to find the sources -ZSTD_SRC_ROOT="../../lib" - -# Amalgamate the sources -echo "Amalgamating files..." -# Using the faster Python script if we have 3.8 or higher -if python3 -c 'import sys; assert sys.version_info >= (3,8)' 2>/dev/null; then - ./combine.py -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c -else - ./combine.sh -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c -fi -# Did combining work? -if [ $? -ne 0 ]; then - echo "Combine script: FAILED" - exit 1 -fi -echo "Combine script: PASSED" diff --git a/third_party/zstd/build/single_file_libs/create_single_file_library.sh b/third_party/zstd/build/single_file_libs/create_single_file_library.sh deleted file mode 100644 index a6f71f0..0000000 --- a/third_party/zstd/build/single_file_libs/create_single_file_library.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# Where to find the sources -ZSTD_SRC_ROOT="../../lib" - -# Amalgamate the sources -echo "Amalgamating files..." -# Using the faster Python script if we have 3.8 or higher -if python3 -c 'import sys; assert sys.version_info >= (3,8)' 2>/dev/null; then - ./combine.py -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstd.c zstd-in.c -else - ./combine.sh -r "$ZSTD_SRC_ROOT" -x legacy/zstd_legacy.h -o zstd.c zstd-in.c -fi -# Did combining work? -if [ $? -ne 0 ]; then - echo "Combine script: FAILED" - exit 1 -fi -echo "Combine script: PASSED" diff --git a/third_party/zstd/build/single_file_libs/examples/README.md b/third_party/zstd/build/single_file_libs/examples/README.md deleted file mode 100644 index e93bee3..0000000 --- a/third_party/zstd/build/single_file_libs/examples/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Single File ZStandard Examples - -The examples `#include` the generated `zstddeclib.c` directly but work equally as well when including `zstd.h` and compiling the amalgamated source separately. - -`simple.c` is the most basic example of decompressing content and verifying the result. - -`emscripten.c` is a bare-bones [Emscripten](https://github.com/emscripten-core/emscripten) compiled WebGL demo using Zstd to further compress a DXT1 texture (see the [original PNG image](testcard.png)). The 256x256 texture would normally be 32kB, but even when bundled with the Zstd decompressor the resulting WebAssembly weighs in at 41kB (`shell.html` is a support file to run the Wasm). - -`roundtrip.c` is an example to use with the optional [amalgamated library](../create_single_file_library.sh) showing compression the decompression. - -The example files in this directory are released under a [Creative Commons Zero license](https://creativecommons.org/publicdomain/zero/1.0/) (or Public Domain, whichever is applicable in your jurisdiction). diff --git a/third_party/zstd/build/single_file_libs/examples/emscripten.c b/third_party/zstd/build/single_file_libs/examples/emscripten.c deleted file mode 100644 index 10dae86..0000000 --- a/third_party/zstd/build/single_file_libs/examples/emscripten.c +++ /dev/null @@ -1,340 +0,0 @@ -/** - * \file emscripten.c - * Emscripten example of using the single-file \c zstddeclib. Draws a rotating - * textured quad with data from the in-line Zstd compressed DXT1 texture (DXT1 - * being hardware compression, further compressed with Zstd). - * \n - * Compile using: - * \code - * export CC_FLAGS="-Wall -Wextra -Werror -Os -g0 -flto --llvm-lto 3 -lGL -DNDEBUG=1" - * export EM_FLAGS="-s WASM=1 -s ENVIRONMENT=web --shell-file shell.html --closure 1" - * emcc $CC_FLAGS $EM_FLAGS -o out.html emscripten.c - * \endcode - * - * \author Carl Woffenden, Numfum GmbH (released under a CC0 license) - */ - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "../zstddeclib.c" - -//************************* Test Data (DXT texture) **************************/ - -/** - * Zstd compressed DXT1 256x256 texture source. - * \n - * See \c testcard.png for the original. - */ -static uint8_t const srcZstd[] = { -#include "testcard-zstd.inl" -}; - -/** - * Uncompressed size of \c #srcZstd. - */ -#define DXT1_256x256 32768 - -/** - * Destination for decoding \c #srcZstd. - */ -static uint8_t dstDxt1[DXT1_256x256] = {}; - -#ifndef ZSTD_VERSION_MAJOR -/** - * For the case where the decompression library hasn't been included we add a - * dummy function to fake the process and stop the buffers being optimised out. - */ -size_t ZSTD_decompress(void* dst, size_t dstLen, const void* src, size_t srcLen) { - return (memcmp(dst, src, (srcLen < dstLen) ? srcLen : dstLen)) ? dstLen : 0; -} -#endif - -//*************************** Program and Shaders ***************************/ - -/** - * Program object ID. - */ -static GLuint progId = 0; - -/** - * Vertex shader ID. - */ -static GLuint vertId = 0; - -/** - * Fragment shader ID. - */ -static GLuint fragId = 0; - -//********************************* Uniforms *********************************/ - -/** - * Quad rotation angle ID. - */ -static GLint uRotId = -1; - -/** - * Draw colour ID. - */ -static GLint uTx0Id = -1; - -//******************************* Shader Source ******************************/ - -/** - * Vertex shader to draw texture mapped polys with an applied rotation. - */ -static GLchar const vertShader2D[] = -#if GL_ES_VERSION_2_0 - "#version 100\n" - "precision mediump float;\n" -#else - "#version 120\n" -#endif - "uniform float uRot;" // rotation - "attribute vec2 aPos;" // vertex position coords - "attribute vec2 aUV0;" // vertex texture UV0 - "varying vec2 vUV0;" // (passed to fragment shader) - "void main() {" - " float cosA = cos(radians(uRot));" - " float sinA = sin(radians(uRot));" - " mat3 rot = mat3(cosA, -sinA, 0.0," - " sinA, cosA, 0.0," - " 0.0, 0.0, 1.0);" - " gl_Position = vec4(rot * vec3(aPos, 1.0), 1.0);" - " vUV0 = aUV0;" - "}"; - -/** - * Fragment shader for the above polys. - */ -static GLchar const fragShader2D[] = -#if GL_ES_VERSION_2_0 - "#version 100\n" - "precision mediump float;\n" -#else - "#version 120\n" -#endif - "uniform sampler2D uTx0;" - "varying vec2 vUV0;" // (passed from fragment shader) - "void main() {" - " gl_FragColor = texture2D(uTx0, vUV0);" - "}"; - -/** - * Helper to compile a shader. - * - * \param type shader type - * \param text shader source - * \return the shader ID (or zero if compilation failed) - */ -static GLuint compileShader(GLenum const type, const GLchar* text) { - GLuint shader = glCreateShader(type); - if (shader) { - glShaderSource (shader, 1, &text, NULL); - glCompileShader(shader); - GLint compiled; - glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); - if (compiled) { - return shader; - } else { - GLint logLen; - glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLen); - if (logLen > 1) { - GLchar* logStr = malloc(logLen); - glGetShaderInfoLog(shader, logLen, NULL, logStr); - #ifndef NDEBUG - printf("Shader compilation error: %s\n", logStr); - #endif - free(logStr); - } - glDeleteShader(shader); - } - } - return 0; -} - -//********************************** Helpers *********************************/ - -/** - * Vertex position index. - */ -#define GL_VERT_POSXY_ID 0 - -/** - * Vertex UV0 index. - */ -#define GL_VERT_TXUV0_ID 1 - - /** - * \c GL vec2 storage type. - */ -struct vec2 { - float x; - float y; -}; - -/** - * Combined 2D vertex and 2D texture coordinates. - */ -struct posTex2d { - struct vec2 pos; - struct vec2 uv0; -}; - -//****************************************************************************/ - -/** - * Current quad rotation angle (in degrees, updated per frame). - */ -static float rotDeg = 0.0f; - -/** - * Emscripten (single) GL context. - */ -static EMSCRIPTEN_WEBGL_CONTEXT_HANDLE glCtx = 0; - -/** - * Emscripten resize handler. - */ -static EM_BOOL resize(int type, const EmscriptenUiEvent* e, void* data) { - double surfaceW; - double surfaceH; - if (emscripten_get_element_css_size ("#canvas", &surfaceW, &surfaceH) == EMSCRIPTEN_RESULT_SUCCESS) { - emscripten_set_canvas_element_size("#canvas", surfaceW, surfaceH); - if (glCtx) { - glViewport(0, 0, (int) surfaceW, (int) surfaceH); - } - } - (void) type; - (void) data; - (void) e; - return EM_FALSE; -} - -/** - * Boilerplate to create a WebGL context. - */ -static EM_BOOL initContext() { - // Default attributes - EmscriptenWebGLContextAttributes attr; - emscripten_webgl_init_context_attributes(&attr); - if ((glCtx = emscripten_webgl_create_context("#canvas", &attr))) { - // Bind the context and fire a resize to get the initial size - emscripten_webgl_make_context_current(glCtx); - emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, EM_FALSE, resize); - resize(0, NULL, NULL); - return EM_TRUE; - } - return EM_FALSE; -} - -/** - * Called once per frame (clears the screen and draws the rotating quad). - */ -static void tick() { - glClearColor(1.0f, 0.0f, 1.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - if (uRotId >= 0) { - glUniform1f(uRotId, rotDeg); - rotDeg += 0.1f; - if (rotDeg >= 360.0f) { - rotDeg -= 360.0f; - } - } - - glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); - glFlush(); -} - -/** - * Creates the GL context, shaders and quad data, decompresses the Zstd data - * and 'uploads' the resulting texture. - * - * As a (naive) comparison, removing Zstd and building with "-Os -g0 s WASM=1 - * -lGL emscripten.c" results in a 15kB WebAssembly file; re-adding Zstd - * increases the Wasm by 26kB. - */ -int main() { - if (initContext()) { - // Compile shaders and set the initial GL state - if ((progId = glCreateProgram())) { - vertId = compileShader(GL_VERTEX_SHADER, vertShader2D); - fragId = compileShader(GL_FRAGMENT_SHADER, fragShader2D); - - glBindAttribLocation(progId, GL_VERT_POSXY_ID, "aPos"); - glBindAttribLocation(progId, GL_VERT_TXUV0_ID, "aUV0"); - - glAttachShader(progId, vertId); - glAttachShader(progId, fragId); - glLinkProgram (progId); - glUseProgram (progId); - uRotId = glGetUniformLocation(progId, "uRot"); - uTx0Id = glGetUniformLocation(progId, "uTx0"); - if (uTx0Id >= 0) { - glUniform1i(uTx0Id, 0); - } - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); - glDisable(GL_DITHER); - - glCullFace(GL_BACK); - glEnable(GL_CULL_FACE); - } - - GLuint vertsBuf = 0; - GLuint indexBuf = 0; - GLuint txName = 0; - // Create the textured quad (vert positions then UVs) - struct posTex2d verts2d[] = { - {{-0.85f, -0.85f}, {0.0f, 0.0f}}, // BL - {{ 0.85f, -0.85f}, {1.0f, 0.0f}}, // BR - {{-0.85f, 0.85f}, {0.0f, 1.0f}}, // TL - {{ 0.85f, 0.85f}, {1.0f, 1.0f}}, // TR - }; - uint16_t index2d[] = { - 0, 1, 2, - 2, 1, 3, - }; - glGenBuffers(1, &vertsBuf); - glBindBuffer(GL_ARRAY_BUFFER, vertsBuf); - glBufferData(GL_ARRAY_BUFFER, - sizeof(verts2d), verts2d, GL_STATIC_DRAW); - glVertexAttribPointer(GL_VERT_POSXY_ID, 2, - GL_FLOAT, GL_FALSE, sizeof(struct posTex2d), 0); - glVertexAttribPointer(GL_VERT_TXUV0_ID, 2, - GL_FLOAT, GL_FALSE, sizeof(struct posTex2d), - (void*) offsetof(struct posTex2d, uv0)); - glGenBuffers(1, &indexBuf); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuf); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, - sizeof(index2d), index2d, GL_STATIC_DRAW); - glEnableVertexAttribArray(GL_VERT_POSXY_ID); - glEnableVertexAttribArray(GL_VERT_TXUV0_ID); - - // Decode the Zstd data and create the texture - if (ZSTD_decompress(dstDxt1, DXT1_256x256, srcZstd, sizeof srcZstd) == DXT1_256x256) { - glGenTextures(1, &txName); - glBindTexture(GL_TEXTURE_2D, txName); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glCompressedTexImage2D(GL_TEXTURE_2D, 0, - GL_COMPRESSED_RGB_S3TC_DXT1_EXT, - 256, 256, 0, DXT1_256x256, dstDxt1); - } else { - printf("Failed to decode Zstd data\n"); - } - emscripten_set_main_loop(tick, 0, EM_FALSE); - emscripten_exit_with_live_runtime(); - } - return EXIT_FAILURE; -} diff --git a/third_party/zstd/build/single_file_libs/examples/roundtrip.c b/third_party/zstd/build/single_file_libs/examples/roundtrip.c deleted file mode 100644 index b228de8..0000000 --- a/third_party/zstd/build/single_file_libs/examples/roundtrip.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * \file roundtrip.c - * In this example we include \c zstd.h and compile separately the amalgamated - * \c zstd.c: - * \code - * cc -Wall -Wextra -Werror -I. -Os -g0 zstd.c examples/roundtrip.c - * \endcode - * - * \author Carl Woffenden, Numfum GmbH (released under a CC0 license) - */ - -#include -#include -#include -#include -#include - -#include "zstd.h" - -//************************** Test Data (DXT texture) **************************/ - -/** - * Raw test data (borrowed from the Emscripten example). - * \n - * See \c testcard.png for the original. - */ -static uint8_t const rawData[] = { -#include "testcard-dxt1.inl" -}; - -#ifndef ZSTD_VERSION_MAJOR -/* - * For the case where the decompression library hasn't been included we add - * dummy functions to fake the process and stop the buffers being optimised out. - */ -size_t ZSTD_compressBound(size_t maxSrc) { - return maxSrc + 32; -} -int ZSTD_maxCLevel(void) { - return 20; -} -size_t ZSTD_compress(void* dst, size_t dstLen, const void* src, size_t srcLen, int level) { - return (memcmp(dst, src, (srcLen < dstLen) ? srcLen : dstLen)) ? level : dstLen; -} -unsigned ZSTD_isError(size_t code) { - return ((int) code) < 0; -} -size_t ZSTD_decompress(void* dst, size_t dstLen, const void* src, size_t srcLen) { - return (memcmp(dst, src, (srcLen < dstLen) ? srcLen : dstLen)) ? 0 : dstLen; -} -#endif - -//*****************************************************************************/ - -/** - * Simple single-file test to compress \c rawData, decompress the result, then - * compare the decompressed version with the original. - */ -int main() { - size_t bounds = ZSTD_compressBound(sizeof rawData); - void* compBuf = malloc(bounds); - void* testBuf = malloc(sizeof rawData); - int compare = -1; - if (compBuf && testBuf) { - size_t compSize = ZSTD_compress(compBuf, bounds, rawData, sizeof rawData, ZSTD_maxCLevel()); - if (!ZSTD_isError(compSize)) { - printf("Compression: PASSED (size: %lu, uncompressed: %lu)\n", (unsigned long) compSize, (unsigned long) (sizeof rawData)); - size_t decSize = ZSTD_decompress(testBuf, sizeof rawData, compBuf, compSize); - if (!ZSTD_isError(decSize)) { - printf("Decompression: PASSED\n"); - compare = memcmp(rawData, testBuf, decSize); - printf("Byte comparison: %s\n", (compare == 0) ? "PASSED" : "FAILED"); - } else { - printf("Decompression: FAILED\n"); - } - } else { - printf("Compression: FAILED\n"); - } - free(compBuf); - free(testBuf); - } - return (compare == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff --git a/third_party/zstd/build/single_file_libs/examples/shell.html b/third_party/zstd/build/single_file_libs/examples/shell.html deleted file mode 100644 index 5beb0e6..0000000 --- a/third_party/zstd/build/single_file_libs/examples/shell.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - Emscripten Shell - - - - - -{{{ SCRIPT }}} - - diff --git a/third_party/zstd/build/single_file_libs/examples/simple.c b/third_party/zstd/build/single_file_libs/examples/simple.c deleted file mode 100644 index ee63416..0000000 --- a/third_party/zstd/build/single_file_libs/examples/simple.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - * \file simple.c - * Simple standalone example of using the single-file \c zstddeclib. - * - * \note In this simple example we include the amalgamated source and compile - * just this single file, but we could equally (and more conventionally) - * include \c zstd.h and compile both this file and \c zstddeclib.c (the - * resulting binaries differ slightly in size but perform the same). - * - * \author Carl Woffenden, Numfum GmbH (released under a CC0 license) - */ - -#include -#include -#include -#include -#include - -#include "../zstddeclib.c" - -//************************* Test Data (DXT texture) **************************/ - -/** - * Raw 256x256 DXT1 data (used to compare the result). - * \n - * See \c testcard.png for the original. - */ -static uint8_t const rawDxt1[] = { -#include "testcard-dxt1.inl" -}; - -/** - * Zstd compressed version of \c #rawDxt1. - * \n - * See \c testcard.png for the original. - */ -static uint8_t const srcZstd[] = { -#include "testcard-zstd.inl" -}; - -/** - * Destination for decoding \c #srcZstd. - */ -static uint8_t dstDxt1[sizeof rawDxt1] = {}; - -#ifndef ZSTD_VERSION_MAJOR -/** - * For the case where the decompression library hasn't been included we add a - * dummy function to fake the process and stop the buffers being optimised out. - */ -size_t ZSTD_decompress(void* dst, size_t dstLen, const void* src, size_t srcLen) { - return (memcmp(dst, src, (srcLen < dstLen) ? srcLen : dstLen)) ? 0 : dstLen; -} -#endif - -//****************************************************************************/ - -/** - * Simple single-file test to decompress \c #srcZstd into \c # dstDxt1 then - * compare the resulting bytes with \c #rawDxt1. - * \n - * As a (naive) comparison, removing Zstd and building with "-Os -g0 simple.c" - * results in a 44kB binary (macOS 10.14, Clang 10); re-adding Zstd increases - * the binary by 56kB (after calling \c strip). - */ -int main() { - size_t size = ZSTD_decompress(dstDxt1, sizeof dstDxt1, srcZstd, sizeof srcZstd); - int compare = memcmp(rawDxt1, dstDxt1, sizeof dstDxt1); - printf("Decompressed size: %s\n", (size == sizeof dstDxt1) ? "PASSED" : "FAILED"); - printf("Byte comparison: %s\n", (compare == 0) ? "PASSED" : "FAILED"); - if (size == sizeof dstDxt1 && compare == 0) { - return EXIT_SUCCESS; - } - return EXIT_FAILURE; -} diff --git a/third_party/zstd/build/single_file_libs/examples/testcard-dxt1.inl b/third_party/zstd/build/single_file_libs/examples/testcard-dxt1.inl deleted file mode 100644 index e099e66..0000000 --- a/third_party/zstd/build/single_file_libs/examples/testcard-dxt1.inl +++ /dev/null @@ -1,2731 +0,0 @@ -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0x30, 0x84, 0x00, 0x55, 0x55, 0xb5, -0xde, 0xf7, 0x30, 0x84, 0x00, 0x15, 0x35, 0x20, 0xdf, 0xff, 0x30, 0x84, -0x00, 0xd4, 0x80, 0x54, 0xde, 0xf7, 0x30, 0x84, 0x00, 0x2b, 0x7e, 0x55, -0xde, 0xf7, 0x10, 0x84, 0x00, 0xa0, 0x55, 0x55, 0xdf, 0xff, 0xe7, 0x39, -0x00, 0x2a, 0x3f, 0x3f, 0x82, 0x10, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0xff, 0xff, 0x28, 0x42, 0x00, 0xff, 0xff, 0xff, 0x41, 0x08, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0x8a, 0x52, 0x00, 0x3f, 0x3f, 0x3f, -0xff, 0xff, 0x08, 0x42, 0x00, 0xa8, 0xfc, 0xfc, 0xde, 0xf7, 0x30, 0x84, -0x00, 0x02, 0x55, 0x55, 0xff, 0xff, 0x10, 0x84, 0x00, 0xfa, 0xaf, 0x55, -0xdf, 0xff, 0x30, 0x84, 0x00, 0x15, 0x20, 0x35, 0xde, 0xf7, 0x30, 0x84, -0x00, 0x54, 0x54, 0x80, 0xff, 0xff, 0x30, 0x84, 0x00, 0x55, 0x55, 0x57, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x10, 0x84, 0x15, 0x15, 0x15, 0x2d, 0xff, 0xff, 0x30, 0x84, -0x54, 0xd4, 0x88, 0x5c, 0xff, 0xff, 0x10, 0x84, 0xb5, 0xe2, 0x57, 0x55, -0x7d, 0xef, 0x30, 0x84, 0xe0, 0x55, 0x55, 0x55, 0x41, 0x08, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x30, 0x84, 0xd4, 0x54, 0x54, 0x54, -0x9d, 0xef, 0x30, 0x84, 0x82, 0xd5, 0x55, 0x55, 0xff, 0xff, 0x10, 0x84, -0x57, 0xe2, 0xb5, 0x55, 0xff, 0xff, 0x30, 0x84, 0x15, 0x15, 0x38, 0x2d, -0xff, 0xff, 0x10, 0x84, 0x54, 0x54, 0x54, 0x5c, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x41, 0x08, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0x9e, 0xf7, 0x10, 0x84, 0x55, 0x55, 0x35, 0xe2, -0x5c, 0xe7, 0x10, 0x84, 0xb5, 0x83, 0x5c, 0x55, 0xff, 0xff, 0x30, 0x84, -0x38, 0x15, 0x15, 0x15, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xf7, 0x30, 0x84, -0x88, 0x94, 0x54, 0x54, 0x5c, 0xe7, 0x10, 0x84, 0x57, 0x70, 0x0d, 0xd5, -0xbe, 0xf7, 0x30, 0x84, 0x55, 0x55, 0x57, 0x62, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x08, 0x42, -0x3f, 0x3f, 0x2f, 0x00, 0x51, 0x8c, 0xdf, 0xff, 0x61, 0x25, 0x01, 0x55, -0xff, 0xff, 0x49, 0x4a, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x69, 0x4a, -0x2f, 0xff, 0xff, 0x00, 0x51, 0x8c, 0xff, 0xff, 0x42, 0x66, 0x60, 0x55, -0xff, 0xff, 0x28, 0x42, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, -0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, 0xff, 0xff, 0xff, 0xff, -0x99, 0xff, 0x00, 0x5a, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0xde, 0xf7, 0x10, 0x84, 0x00, 0x55, 0xd5, 0x25, 0xbe, 0xf7, 0x30, 0x84, -0x00, 0xc9, 0x58, 0x57, 0xff, 0xff, 0x08, 0x42, 0x00, 0x3f, 0x3f, 0x3f, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0x42, -0x00, 0xbc, 0xfc, 0xfc, 0xbe, 0xf7, 0x10, 0x84, 0x00, 0x58, 0xc9, 0x35, -0xff, 0xff, 0x10, 0x84, 0x00, 0x55, 0x55, 0x56, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, -0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xc1, 0x59, -0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, 0xff, 0xff, 0xff, 0xff, -0x99, 0xff, 0x00, 0x5a, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, -0xff, 0xff, 0xff, 0xff, 0xe9, 0x93, 0xc7, 0x8b, 0xaa, 0xaa, 0xaa, 0x2a, -0xbe, 0xf7, 0x10, 0x84, 0x54, 0x94, 0x8c, 0x70, 0x7d, 0xef, 0x10, 0x84, -0x63, 0x5c, 0x55, 0x55, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0x71, 0x8c, 0xcf, 0x7b, 0xbf, 0xff, 0xff, 0xff, 0x9d, 0xef, 0x10, 0x84, -0x72, 0x8d, 0x95, 0x55, 0xbe, 0xf7, 0x10, 0x84, 0x15, 0x15, 0x1c, 0x23, -0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xc1, 0x59, -0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, -0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x99, 0xff, 0x00, 0x5a, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, -0xff, 0xff, 0xff, 0xff, 0x56, 0xd6, 0xa1, 0x72, 0xff, 0xff, 0xff, 0x3f, -0x5c, 0xef, 0x2a, 0x94, 0x15, 0x8d, 0x73, 0x54, 0x41, 0x08, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x30, 0x84, 0x25, 0x15, 0x15, 0x15, 0x7c, 0xf7, 0x09, 0x94, -0x55, 0x5c, 0x73, 0x85, 0x09, 0x94, 0xa7, 0x8b, 0xff, 0xff, 0xff, 0xfe, -0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xc1, 0x59, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff, 0x00, 0x5a, -0xff, 0xff, 0xff, 0xff, 0x7c, 0xf7, 0xc8, 0x8b, 0x55, 0x55, 0xd5, 0x35, -0x3b, 0xef, 0x09, 0x94, 0x05, 0x61, 0x58, 0x57, 0x2a, 0x9c, 0xc7, 0x8b, -0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xf9, 0xe6, 0x60, 0x6a, 0x3f, 0xff, 0xff, 0xff, -0x9d, 0xf7, 0x09, 0x94, 0x56, 0x52, 0x49, 0x35, 0xc2, 0x72, 0xce, 0xac, -0xaa, 0xaa, 0xaa, 0xa9, 0xf6, 0xff, 0xc1, 0x59, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x10, 0x84, 0x00, 0x54, 0xd4, 0x34, -0xde, 0xf7, 0xef, 0x7b, 0x00, 0x73, 0x5c, 0x57, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0xde, 0xf7, 0xef, 0x7b, 0x00, 0x73, 0xcd, 0x35, -0xff, 0xff, 0x10, 0x84, 0x00, 0x15, 0x15, 0x17, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x5d, 0xf7, 0xef, 0xaa, 0x55, 0x55, 0xd5, 0x35, -0xde, 0xf7, 0xef, 0x7b, 0xcc, 0x70, 0x5c, 0x54, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x2c, 0x63, 0xd3, 0x9c, 0x6a, 0xaa, 0xaa, 0xaa, 0xde, 0xf7, 0xef, 0x7b, -0x1c, 0x33, 0x0d, 0x35, 0xd4, 0x62, 0x57, 0x94, 0xaa, 0xaa, 0xaa, 0xa9, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xd8, 0xdd, 0xcb, 0x99, 0xff, 0xff, 0xff, 0x3f, -0xdb, 0xee, 0x30, 0xb3, 0x85, 0x61, 0x50, 0x54, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x1d, 0xe7, 0xb6, 0x83, 0x54, 0x52, 0x41, 0x85, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x30, 0xb3, 0x0f, 0xb3, 0xff, 0xff, 0xff, 0xbf, -0x9e, 0xf7, 0x30, 0xb3, 0x35, 0xcd, 0x71, 0x5a, 0xf2, 0xbb, 0xae, 0xaa, -0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, -0x76, 0xfe, 0x01, 0xd8, 0xff, 0xff, 0xff, 0xff, 0x76, 0xfe, 0x01, 0xd8, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, -0xff, 0xff, 0xff, 0xff, 0xda, 0xf7, 0x81, 0xf7, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x5e, 0xef, 0x96, 0x7b, -0x15, 0xd5, 0x55, 0x55, 0x9e, 0xf7, 0xb6, 0x7b, 0x57, 0x5c, 0x53, 0x69, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x7d, 0xf7, 0x2f, 0xb3, 0x95, 0x35, 0xc5, 0x69, 0xdb, 0xee, 0x0f, 0xb3, -0x54, 0x57, 0x55, 0x55, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x5e, 0xef, 0xf2, 0x49, 0x8f, 0x3f, 0xbf, 0xff, 0x7e, 0xef, 0x96, 0x7b, -0x55, 0x57, 0x54, 0x5a, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x7d, 0xf7, 0x2f, 0xb3, 0x55, 0x55, 0x95, 0x35, 0x7d, 0xf7, 0x30, 0xb3, -0x53, 0x5c, 0x56, 0x55, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x7e, 0xef, 0xb6, 0x83, 0x71, 0x4d, 0xa5, 0x15, -0x73, 0x5a, 0xb8, 0x9c, 0xaa, 0xaa, 0xaa, 0xa9, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xfc, 0xee, 0x70, 0xb3, -0xc5, 0x49, 0x51, 0x58, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x19, 0xa5, 0xaf, 0x28, 0x2a, 0xaa, 0xaa, 0xaa, 0x1d, 0xe7, 0xd6, 0x83, -0x54, 0x58, 0x51, 0x49, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x10, 0x84, -0x15, 0x15, 0x35, 0x00, 0x9e, 0xf7, 0x30, 0xb3, 0x54, 0x57, 0x55, 0x55, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -0x41, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x08, 0x00, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x3d, 0xe7, 0xb6, 0x7b, 0xc5, 0x35, 0x15, 0xd5, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0x08, 0x42, -0x00, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x71, 0x8c, 0x00, 0x11, 0x1b, 0x14, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x1f, 0x62, 0x1e, 0x5a, 0xea, 0xaa, 0xaa, 0xea, -0x1f, 0x62, 0xfd, 0x59, 0xfe, 0xfa, 0xfe, 0xfe, 0x1e, 0x5a, 0xfd, 0x59, -0x5f, 0x57, 0x57, 0x57, 0xfd, 0x59, 0xdb, 0x51, 0xfa, 0xfa, 0xfa, 0xfa, -0xfc, 0x51, 0xba, 0x51, 0xfe, 0xfe, 0xfa, 0xfe, 0xda, 0x51, 0x99, 0x49, -0xea, 0xea, 0xe8, 0xea, 0xb9, 0x51, 0x98, 0x49, 0x7e, 0x7e, 0x7e, 0x7e, -0x97, 0x49, 0x76, 0x41, 0xe8, 0xe8, 0xe8, 0xe8, 0x97, 0x49, 0x75, 0x41, -0x5f, 0x5f, 0x5f, 0x5f, 0x75, 0x41, 0x32, 0x39, 0xea, 0xea, 0xea, 0xea, -0x53, 0x39, 0x32, 0x39, 0x7e, 0x7e, 0x5e, 0x7e, 0x31, 0x39, 0x10, 0x31, -0xfa, 0xfa, 0x78, 0x7a, 0x0f, 0x31, 0xcd, 0x28, 0xa0, 0x80, 0x80, 0x80, -0xee, 0x30, 0xed, 0x28, 0x5e, 0x7e, 0x5e, 0x5e, 0xcc, 0x28, 0xaa, 0x20, -0xa0, 0xa0, 0xa0, 0xa0, 0xcc, 0x28, 0xaa, 0x20, 0x5f, 0x5f, 0x5f, 0x5f, -0xaa, 0x20, 0x88, 0x18, 0xfa, 0xfa, 0xfa, 0xfa, 0x88, 0x18, 0x66, 0x18, -0xe8, 0xe8, 0xe8, 0xe8, 0x87, 0x18, 0x45, 0x10, 0xfa, 0xfa, 0xfa, 0xfa, -0x66, 0x10, 0x44, 0x10, 0x7e, 0x7e, 0x7e, 0x7e, 0x44, 0x10, 0x22, 0x08, -0xa8, 0xe8, 0xa8, 0xe8, 0x44, 0x10, 0x22, 0x08, 0x5f, 0x7f, 0x7f, 0x7f, -0x22, 0x08, 0x01, 0x08, 0xea, 0xfa, 0xfa, 0xea, 0x01, 0x08, 0x00, 0x00, -0xaa, 0xea, 0xaa, 0xaa, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x51, 0x8c, -0x00, 0x50, 0x78, 0x44, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x3c, 0xe7, 0x69, 0x4a, 0xbf, 0x3f, 0x2f, 0x8f, -0xff, 0xff, 0xef, 0x7b, 0x16, 0x17, 0x15, 0x15, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x1f, 0x62, 0x1e, 0x5a, 0xaa, 0xea, 0xaa, 0xea, 0x1f, 0x62, 0xfd, 0x59, -0xfe, 0xfe, 0xfe, 0xfe, 0x1e, 0x5a, 0xfd, 0x59, 0x57, 0x57, 0x57, 0x57, -0xfd, 0x59, 0xdb, 0x51, 0xfa, 0xfa, 0xfa, 0xfa, 0xdb, 0x51, 0xb9, 0x51, -0xa0, 0xa0, 0xa0, 0x80, 0xba, 0x51, 0xb9, 0x49, 0xe8, 0xe8, 0xe8, 0xe8, -0xda, 0x51, 0x98, 0x49, 0x5f, 0x7f, 0x7f, 0x5f, 0x97, 0x49, 0x76, 0x41, -0xe8, 0xe8, 0xe8, 0xe0, 0x97, 0x49, 0x75, 0x41, 0x57, 0x57, 0x5f, 0x5f, -0x75, 0x41, 0x32, 0x39, 0xea, 0xea, 0xea, 0xea, 0x53, 0x39, 0x32, 0x39, -0x5c, 0x5e, 0x7e, 0x5e, 0x32, 0x39, 0x0f, 0x31, 0xfa, 0xfa, 0xfa, 0xfa, -0x0f, 0x31, 0xee, 0x28, 0xe0, 0xe0, 0xa0, 0xa0, 0x10, 0x31, 0xed, 0x28, -0x5f, 0x5f, 0x5f, 0x5f, 0xcc, 0x28, 0xcb, 0x20, 0xe0, 0xe8, 0xe8, 0xe0, -0xcc, 0x28, 0xaa, 0x20, 0x5f, 0x5f, 0x5f, 0x5f, 0xa9, 0x20, 0x88, 0x18, -0xe8, 0xe8, 0xe8, 0xe8, 0x88, 0x18, 0x66, 0x18, 0xe8, 0xe8, 0xe8, 0xe8, -0x67, 0x18, 0x65, 0x10, 0xfe, 0xfa, 0xfe, 0xfa, 0x66, 0x10, 0x44, 0x10, -0x7e, 0x7e, 0x7e, 0x7e, 0x44, 0x10, 0x22, 0x08, 0xa8, 0xa8, 0xa8, 0xa8, -0x44, 0x10, 0x22, 0x08, 0x5f, 0x7f, 0x7f, 0x7f, 0x22, 0x08, 0x01, 0x08, -0xf8, 0xe8, 0xea, 0xea, 0x01, 0x08, 0x00, 0x00, 0xaa, 0xe8, 0xea, 0xe8, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x84, 0xe4, 0x34, 0x94, 0xd4, -0x3c, 0xe7, 0x69, 0x4a, 0xff, 0xff, 0xfe, 0xfc, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x9d, 0xef, 0x30, 0x84, 0x4d, 0x79, 0x51, 0x5a, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x1f, 0x62, 0x1e, 0x5a, -0xea, 0xea, 0xea, 0xea, 0x1f, 0x62, 0xfd, 0x59, 0xfe, 0xfe, 0xfa, 0xfe, -0x1e, 0x5a, 0xfd, 0x59, 0x57, 0x5f, 0x57, 0x57, 0xfd, 0x59, 0xdb, 0x51, -0xfa, 0xfa, 0xfa, 0xfa, 0xdb, 0x51, 0xba, 0x51, 0xe0, 0xe0, 0xe0, 0xe0, -0xba, 0x51, 0xb9, 0x49, 0xe8, 0xe8, 0xe8, 0xe8, 0xda, 0x51, 0x98, 0x49, -0x5f, 0x5f, 0x5f, 0x5f, 0x97, 0x49, 0x76, 0x41, 0xe8, 0xe0, 0xe8, 0xe0, -0x97, 0x49, 0x75, 0x41, 0x5f, 0x5f, 0x5f, 0x5f, 0x75, 0x41, 0x32, 0x39, -0xea, 0xea, 0xea, 0xea, 0x53, 0x39, 0x32, 0x39, 0x7e, 0x7a, 0x7a, 0x7e, -0x31, 0x39, 0x10, 0x31, 0x78, 0xf8, 0xf8, 0x78, 0x0f, 0x31, 0xee, 0x28, -0xa0, 0xe0, 0xa0, 0xe0, 0x10, 0x31, 0xed, 0x28, 0x5f, 0x5f, 0x5f, 0x5f, -0xed, 0x28, 0xaa, 0x20, 0xea, 0xea, 0xea, 0xea, 0xcc, 0x28, 0xaa, 0x20, -0x5f, 0x5f, 0x5f, 0x5f, 0xaa, 0x20, 0x88, 0x18, 0xfa, 0xfa, 0xfa, 0xfa, -0x88, 0x18, 0x66, 0x18, 0xe8, 0xe8, 0xe8, 0xe8, 0x67, 0x18, 0x65, 0x10, -0xfa, 0xfa, 0xf8, 0xfa, 0x66, 0x10, 0x44, 0x10, 0x7e, 0x7e, 0x7e, 0x7e, -0x44, 0x10, 0x22, 0x08, 0xa8, 0xa8, 0xa8, 0xa8, 0x44, 0x10, 0x22, 0x08, -0x5f, 0x5f, 0x7f, 0x5f, 0x22, 0x08, 0x01, 0x08, 0xea, 0xea, 0xea, 0xe8, -0x01, 0x08, 0x00, 0x00, 0xea, 0xea, 0xe8, 0xea, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x08, 0x42, 0xfc, 0xfc, 0xfc, 0xfc, 0x9e, 0xf7, 0x30, 0x84, -0x5c, 0x5b, 0x51, 0x69, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0xff, 0xff, 0xef, 0x7b, 0x55, 0xd5, 0x95, 0x00, 0xbe, 0xf7, 0x10, 0x84, -0x5c, 0x54, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x1f, 0x62, 0x1e, 0x5a, 0xea, 0xaa, 0xea, 0xea, -0x1f, 0x62, 0xfd, 0x59, 0xfe, 0xfe, 0xfe, 0xfe, 0x1e, 0x5a, 0xfd, 0x59, -0x57, 0x57, 0x57, 0x57, 0xfd, 0x59, 0xdb, 0x51, 0xea, 0xfa, 0xfa, 0xea, -0xdb, 0x51, 0xb9, 0x51, 0x80, 0x80, 0xa0, 0x80, 0xba, 0x51, 0xb8, 0x49, -0xa8, 0xa8, 0xa8, 0xa0, 0xb9, 0x51, 0x98, 0x49, 0x7e, 0x7e, 0x7e, 0x7e, -0x97, 0x49, 0x76, 0x41, 0xa8, 0xe8, 0xe8, 0xe0, 0x97, 0x49, 0x75, 0x41, -0x5f, 0x5f, 0x57, 0x5f, 0x75, 0x41, 0x32, 0x39, 0xea, 0xea, 0xea, 0xea, -0x53, 0x39, 0x32, 0x39, 0x58, 0x7e, 0x7a, 0x7a, 0x32, 0x39, 0x0f, 0x31, -0xfa, 0xfa, 0xfa, 0xfa, 0x0f, 0x31, 0xee, 0x28, 0xa0, 0xe0, 0xe0, 0xe0, -0xef, 0x30, 0xed, 0x28, 0x5e, 0x7f, 0x5e, 0x7f, 0xed, 0x28, 0xaa, 0x20, -0xea, 0xea, 0xea, 0xea, 0xcc, 0x28, 0xaa, 0x20, 0x5f, 0x5f, 0x5f, 0x5f, -0xa9, 0x20, 0x88, 0x18, 0xf8, 0xe8, 0xe8, 0xe8, 0x88, 0x18, 0x66, 0x18, -0xe8, 0xe8, 0xe8, 0xe8, 0x67, 0x18, 0x65, 0x10, 0xfa, 0xfa, 0xfa, 0xfa, -0x66, 0x10, 0x44, 0x10, 0x7e, 0x7e, 0x7e, 0x7e, 0x44, 0x10, 0x22, 0x08, -0xa8, 0xa8, 0xa8, 0xe0, 0x44, 0x10, 0x22, 0x08, 0x7f, 0x7f, 0x5f, 0x5f, -0x22, 0x08, 0x01, 0x08, 0xfa, 0xf8, 0xfa, 0xf8, 0x01, 0x08, 0x00, 0x00, -0xa8, 0xa8, 0xa8, 0xa8, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0xbe, 0xf7, 0x10, 0x84, 0x4d, 0xc5, 0xb5, 0x00, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0xff, 0xff, 0x30, 0x84, -0x00, 0xe5, 0x45, 0x6d, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x8c, 0xf8, 0x6b, 0xf0, 0xaa, 0xaa, 0xaa, 0xea, 0x8c, 0xf0, 0x6b, 0xf0, -0xff, 0xdf, 0xff, 0xff, 0x8b, 0xf0, 0x6b, 0xe8, 0x5f, 0x5f, 0x7f, 0x5f, -0x6b, 0xe8, 0x6a, 0xd8, 0xfa, 0xfa, 0xfa, 0xfa, 0x6a, 0xd8, 0x6a, 0xd0, -0xe0, 0xa0, 0xe0, 0xe0, 0x6a, 0xd0, 0x69, 0xc8, 0xf8, 0xf8, 0x78, 0xf8, -0x69, 0xc8, 0x49, 0xb8, 0xa8, 0xe8, 0xe8, 0xe8, 0x69, 0xc0, 0x48, 0xb0, -0xfa, 0xfa, 0xfa, 0xfe, 0x69, 0xb8, 0x48, 0xa8, 0x5f, 0x5f, 0x5f, 0x5f, -0x48, 0xa8, 0x47, 0x98, 0x7a, 0xfa, 0xfa, 0xfa, 0x47, 0x98, 0x47, 0x90, -0x7c, 0x5c, 0x58, 0x5c, 0x47, 0x90, 0x46, 0x80, 0x7a, 0x7e, 0x7a, 0x7e, -0x46, 0x80, 0x45, 0x70, 0xf8, 0xf8, 0xf8, 0xf8, 0x45, 0x70, 0x25, 0x68, -0x78, 0x78, 0x78, 0x78, 0x25, 0x68, 0x24, 0x58, 0xfa, 0xfa, 0xfa, 0xfa, -0x24, 0x58, 0x24, 0x50, 0x78, 0x78, 0x78, 0x78, 0x24, 0x50, 0x23, 0x40, -0xfa, 0xfa, 0xfa, 0xfa, 0x23, 0x40, 0x23, 0x38, 0x78, 0x78, 0x78, 0x78, -0x23, 0x38, 0x02, 0x28, 0xea, 0xea, 0xea, 0xea, 0x22, 0x30, 0x02, 0x20, -0xfa, 0xfe, 0xfa, 0xfa, 0x02, 0x20, 0x01, 0x18, 0xe8, 0xe8, 0xe8, 0xf8, -0x01, 0x18, 0x01, 0x10, 0xf8, 0xf8, 0xf8, 0xe8, 0x01, 0x10, 0x00, 0x08, -0xe8, 0xe8, 0xe8, 0xe0, 0x01, 0x10, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0xff, 0xff, 0x10, 0x84, 0x00, 0xd5, 0x55, 0x55, 0xff, 0xff, 0x10, 0x84, -0x00, 0x56, 0x54, 0x5e, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0x7d, 0xef, 0x10, 0x84, 0x79, 0x51, 0x53, 0x5a, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x6c, 0xf8, 0x6b, 0xf0, -0xe8, 0xa8, 0xe8, 0xa8, 0x8b, 0xf8, 0x6b, 0xe8, 0xea, 0xfa, 0xfa, 0xea, -0x8b, 0xf0, 0x6b, 0xe8, 0x57, 0x57, 0x57, 0x57, 0x6b, 0xe8, 0x6a, 0xd8, -0xfa, 0xfa, 0xfa, 0xfa, 0x6a, 0xd8, 0x6a, 0xd0, 0xa0, 0xa0, 0xa0, 0xe0, -0x6a, 0xd0, 0x69, 0xc8, 0x60, 0x68, 0xf8, 0xe8, 0x6a, 0xd0, 0x69, 0xc0, -0x5f, 0x5f, 0x5f, 0x5f, 0x69, 0xc0, 0x48, 0xb0, 0xfa, 0xfa, 0xfa, 0xfa, -0x68, 0xb0, 0x48, 0xa8, 0x7e, 0x7a, 0x7e, 0x7a, 0x48, 0xa8, 0x47, 0x98, -0x7a, 0xfa, 0x7a, 0xfa, 0x47, 0x90, 0x47, 0x98, 0x09, 0x09, 0x09, 0x09, -0x47, 0x90, 0x46, 0x80, 0x7e, 0x7e, 0x7e, 0x7e, 0x46, 0x80, 0x25, 0x70, -0xe8, 0xe8, 0xe8, 0xf8, 0x46, 0x78, 0x25, 0x68, 0x7e, 0x7e, 0x7e, 0x7e, -0x45, 0x68, 0x24, 0x58, 0xfa, 0xfe, 0xfa, 0xfa, 0x24, 0x58, 0x24, 0x50, -0x78, 0x78, 0x78, 0x78, 0x24, 0x50, 0x23, 0x40, 0xfa, 0xfa, 0xfa, 0xfa, -0x23, 0x40, 0x23, 0x38, 0x78, 0x78, 0x78, 0x78, 0x23, 0x38, 0x02, 0x28, -0xea, 0xea, 0xfa, 0xea, 0x02, 0x30, 0x22, 0x20, 0xfe, 0xfe, 0xfa, 0xfa, -0x22, 0x28, 0x01, 0x18, 0x7e, 0x7e, 0xfe, 0xfe, 0x01, 0x18, 0x01, 0x10, -0xe8, 0xe8, 0xe8, 0xe8, 0x01, 0x10, 0x00, 0x08, 0xe8, 0xe8, 0xe8, 0xe0, -0x01, 0x08, 0x00, 0x08, 0xff, 0xff, 0xfb, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0x10, 0x84, 0x5b, 0x51, 0x71, 0x69, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xdf, 0xff, 0x10, 0x84, 0x54, 0x54, 0xd4, 0x94, -0x1c, 0xe7, 0xef, 0x7b, 0x5c, 0x54, 0x54, 0x56, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,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02, 0x20, 0xfa, 0xfe, 0xfa, 0xfa, 0x22, 0x28, 0x01, 0x18, -0xfe, 0xfe, 0xfe, 0xfe, 0x01, 0x18, 0x01, 0x10, 0xe8, 0xe8, 0xe8, 0xf8, -0x01, 0x10, 0x00, 0x08, 0xe8, 0xe8, 0xe0, 0xe8, 0x01, 0x10, 0x00, 0x00, -0xfe, 0xfa, 0xfa, 0xfe, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x7d, 0xef, 0x10, 0x84, 0x4d, 0x45, 0xe5, 0xa5, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xff, 0xff, 0x10, 0x84, 0x94, 0x14, 0xb4, 0x00, 0xdf, 0xff, 0xef, 0x7b, -0x57, 0x55, 0x55, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x8c, 0xf8, 0x6b, 0xf0, 0xea, 0xea, 0xea, 0xea, 0x8c, 0xf0, 0x6b, 0xf0, -0xff, 0xff, 0xff, 0xfb, 0x6b, 0xf0, 0x6b, 0xe0, 0xea, 0xfa, 0xea, 0xfa, -0x6b, 0xe8, 0x6a, 0xd8, 0xfa, 0xfa, 0xfa, 0xfa, 0x6a, 0xd8, 0x6a, 0xd0, -0xe0, 0xe0, 0xa0, 0xe0, 0x6a, 0xd0, 0x69, 0xc8, 0x70, 0xe8, 0x78, 0xe8, -0x6a, 0xd0, 0x69, 0xc0, 0x5f, 0x5f, 0x5f, 0x5f, 0x69, 0xc0, 0x48, 0xb0, -0xfe, 0xfe, 0xfa, 0x7a, 0x68, 0xb0, 0x48, 0xa8, 0x7a, 0x7a, 0x7e, 0x7a, -0x48, 0xa8, 0x47, 0x98, 0xfa, 0xfa, 0xfa, 0xfa, 0x47, 0x90, 0x47, 0x98, -0x09, 0x09, 0x09, 0x09, 0x47, 0x90, 0x46, 0x80, 0x7a, 0x7a, 0x7e, 0x7e, -0x46, 0x80, 0x25, 0x70, 0xe8, 0xe8, 0xe8, 0xe8, 0x45, 0x70, 0x25, 0x68, -0x78, 0x78, 0x78, 0x78, 0x25, 0x68, 0x24, 0x58, 0xfa, 0xfa, 0xfa, 0xfa, -0x24, 0x58, 0x24, 0x50, 0x78, 0x78, 0x78, 0x78, 0x24, 0x50, 0x23, 0x40, -0xfa, 0xfa, 0xfa, 0xfa, 0x23, 0x40, 0x23, 0x38, 0x78, 0x78, 0x78, 0x78, -0x23, 0x38, 0x02, 0x28, 0xea, 0xfa, 0xea, 0xea, 0x22, 0x30, 0x02, 0x20, -0xfa, 0xfa, 0xfa, 0xfe, 0x22, 0x28, 0x01, 0x18, 0xfe, 0xfe, 0xfe, 0x7e, -0x01, 0x18, 0x01, 0x10, 0xe8, 0xe8, 0xf8, 0xe8, 0x01, 0x10, 0x00, 0x08, -0xa8, 0xe8, 0xa0, 0xa8, 0x01, 0x10, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x10, 0x84, -0xb5, 0x15, 0x95, 0x00, 0xff, 0xff, 0x10, 0x84, 0x15, 0x15, 0x17, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0xf7, 0x30, 0x84, -0x00, 0x44, 0x44, 0x6c, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x41, 0x08, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0xbe, 0xf7, 0x10, 0x84, 0x00, 0x14, 0x14, 0x1c, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xde, 0xf7, 0x30, 0x84, 0x6c, 0x78, 0x78, 0x50, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf7, 0x30, 0x84, -0x1e, 0x1b, 0x1b, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xdf, 0xff, 0x10, 0x84, 0x50, 0x50, 0x58, 0x58, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x30, 0x84, 0x11, 0x11, 0x39, 0x39, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0x42, -0xf8, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0xff, 0xff, 0x08, 0x42, 0x2b, 0x2b, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xa2, 0x10, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x04, 0x21, 0xbe, 0xf7, -0x55, 0x5a, 0x5a, 0x5a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xff, 0xff, 0x28, 0x42, 0xfc, 0xfc, 0xfc, 0xfc, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, -0xde, 0xff, 0xc8, 0x88, 0xff, 0xff, 0xff, 0xff, 0xde, 0xff, 0xc8, 0x88, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x71, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x71, 0x39, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf7, 0x49, 0x4a, 0x0f, 0x0f, 0x0f, 0x0f, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0xff, 0x28, 0x42, -0xfc, 0xfc, 0xfc, 0xfc, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x10, 0x84, 0xdf, 0xff, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xa2, 0x10, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xd3, 0x9d, 0x02, 0x10, -0xff, 0xff, 0xff, 0xff, 0xd3, 0x9d, 0x02, 0x10, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xbe, 0xf7, 0xaa, 0x52, -0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xff, 0xff, 0x08, 0x42, 0x00, 0xf8, 0xf8, 0xf8, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0x08, 0x42, 0x00, 0x2b, 0x2b, 0x2b, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x10, 0x84, -0x58, 0x58, 0x50, 0x50, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xdf, 0xff, 0x30, 0x84, 0x39, 0x39, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xde, 0xf7, 0x30, 0x84, 0x50, 0x78, 0x78, 0x6c, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf7, 0x30, 0x84, -0x11, 0x1b, 0x1b, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xbe, 0xf7, 0x30, 0x84, 0x4c, 0x44, 0x44, 0x00, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x41, 0x08, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0xbe, 0xf7, 0x10, 0x84, 0x1c, 0x14, 0x14, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xff, 0xff, 0x10, 0x84, -0x00, 0xb4, 0x14, 0x94, 0xdf, 0xff, 0xef, 0x7b, 0x00, 0x55, 0x55, 0x57, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0xff, 0xff, 0x10, 0x84, 0x00, 0x95, 0x15, 0xb5, -0xff, 0xff, 0x10, 0x84, 0x00, 0x17, 0x15, 0x15, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xdf, 0xff, 0x10, 0x84, 0x94, 0xd4, 0x54, 0x54, -0x3c, 0xe7, 0xef, 0x7b, 0x56, 0x54, 0x54, 0x5c, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x7d, 0xef, 0x10, 0x84, 0xa5, 0xe5, 0x45, 0x4d, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0x5d, 0xef, 0x10, 0x84, -0x5a, 0x53, 0x51, 0x79, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x7d, 0xef, 0x10, 0x84, -0x69, 0x71, 0x51, 0x5b, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0xff, 0xff, 0x30, 0x84, 0x6d, 0x45, 0xe5, 0x00, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, -0xd6, 0xb5, 0x21, 0x08, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xb5, 0x21, 0x08, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0xff, 0xff, 0x10, 0x84, -0x55, 0x55, 0xd5, 0x00, 0xff, 0xff, 0x10, 0x84, 0x5e, 0x54, 0x56, 0x00, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0xff, 0xff, 0xef, 0x7b, 0x00, 0x95, 0xd5, 0x55, 0xbe, 0xf7, 0x10, 0x84, -0x00, 0x57, 0x54, 0x5c, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0xbe, 0xf7, 0x10, 0x84, 0x00, 0xb5, 0xc5, 0x4d, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x9e, 0xf7, 0x30, 0x84, 0x5a, 0x51, 0x79, 0x4d, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0x42, 0xfc, 0xfc, 0xfc, 0xfc, -0x9e, 0xf7, 0x30, 0x84, 0x69, 0x51, 0x5b, 0x5c, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x3c, 0xe7, 0x69, 0x4a, 0x8f, 0x2f, 0x3f, 0xbf, 0xff, 0xff, 0xef, 0x7b, -0x15, 0x15, 0x17, 0x16, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x10, 0x84, 0xd4, 0x94, 0x34, 0xe4, 0x1c, 0xe7, 0x69, 0x4a, -0xfc, 0xfe, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x08, 0x42, -0xff, 0xff, 0xff, 0x00, 0xdf, 0xff, 0x71, 0x8c, 0x14, 0x1b, 0x11, 0x00, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x51, 0x8c, -0x44, 0x78, 0x50, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0xff, 0xff, 0x10, 0x84, 0x00, 0x35, 0x15, 0x15, 0xbe, 0xef, 0xb0, 0x4c, -0x55, 0x55, 0x57, 0x54, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x5b, 0xe7, 0x29, 0x7c, -0xd5, 0x15, 0x35, 0xc5, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x9d, 0xe7, 0xd0, 0x54, 0x5a, 0x51, 0x69, 0xc5, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x52, 0x70, 0xa5, -0xaa, 0xaa, 0xaa, 0x6a, 0x3a, 0xe7, 0x6a, 0x84, 0x49, 0x51, 0x58, 0x54, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x9d, 0xef, 0xb0, 0x4c, 0x35, 0x95, 0x55, 0x55, 0x9d, 0xef, 0xd0, 0x4c, -0x55, 0x56, 0x5c, 0x53, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x9d, 0xef, 0x49, 0x84, 0x15, 0xa5, 0x4d, 0x71, -0x2e, 0x9d, 0xa6, 0x6b, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x9d, 0xe7, 0xb0, 0x4c, 0x69, 0xc5, 0x35, 0x95, -0x3c, 0xd7, 0xaf, 0x4c, 0x55, 0x55, 0x57, 0x54, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x7c, 0xef, 0xc0, 0x4a, 0xff, 0xbf, 0x3f, 0x8f, -0x9c, 0xef, 0x29, 0x7c, 0x5a, 0x54, 0x57, 0x55, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xb0, 0x4c, 0xb0, 0x44, 0x2a, 0xaa, 0xaa, 0xaa, 0xbe, 0xef, 0xb0, 0x4c, -0x5a, 0x71, 0xcd, 0x35, 0x6e, 0x3c, 0xf1, 0x5c, 0xaa, 0xaa, 0xaa, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x7c, 0xef, 0x29, 0x7c, 0x55, 0x55, 0xd5, 0x15, -0xbd, 0xf7, 0x49, 0x7c, 0x69, 0x53, 0x5c, 0x57, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x7d, 0xe7, 0xb0, 0x4c, 0x95, 0x55, 0x55, 0x55, -0x3b, 0xd7, 0xd0, 0x4c, 0x54, 0x50, 0x61, 0x85, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x3a, 0xe7, 0x49, 0x84, 0x85, 0x41, 0x52, 0x54, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x9d, 0xe7, 0x8f, 0x44, -0x35, 0xd5, 0x55, 0x55, 0xde, 0xf7, 0xef, 0x7b, 0x54, 0x5c, 0x70, 0xcc, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x2c, 0x63, 0xd3, 0x9c, 0xaa, 0xaa, 0xaa, 0x6a, -0xde, 0xf7, 0xef, 0x7b, 0x35, 0x0d, 0x33, 0x1c, 0x70, 0xad, 0x85, 0x63, -0xfe, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xdf, 0xff, 0x10, 0x84, 0x34, 0xd4, 0x54, 0x00, 0xde, 0xf7, 0xef, 0x7b, -0x57, 0x5c, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0x14, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, -0xff, 0xff, 0xff, 0xff, 0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, -0xc0, 0xf5, 0x00, 0xa6, 0xff, 0xff, 0xff, 0xff, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x14, 0x06, 0xde, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x14, 0x06, 0xde, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, -0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x06, 0xc0, 0x05, 0xaa, 0xaa, 0xaa, 0xaa, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x1e, 0xf0, 0x14, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, -0x00, 0xf0, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0x00, 0xa0, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, -0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x14, 0x00, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0xde, 0xf7, 0xef, 0x7b, 0x35, 0xcd, 0x73, 0x00, 0xff, 0xff, 0x10, 0x84, -0x17, 0x15, 0x15, 0x00, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x7e, 0xef, 0xd6, 0x63, 0x35, 0xd5, 0x55, 0x55, -0x3d, 0xe7, 0x17, 0x6c, 0x57, 0x58, 0x61, 0x05, 0xd8, 0x8c, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x57, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0xfd, 0xde, 0x93, 0x32, 0xff, 0xff, 0xff, 0x3f, -0x9e, 0xef, 0x37, 0x6c, 0x35, 0x49, 0x52, 0x56, 0xf6, 0x63, 0xfb, 0xb5, -0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0x9e, 0xef, 0xf6, 0x63, -0x95, 0x55, 0x55, 0x55, 0x5e, 0xe7, 0x16, 0x6c, 0x5c, 0x73, 0x8d, 0x15, -0x41, 0x08, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x84, 0x15, 0x15, 0x15, 0x25, -0x9e, 0xef, 0x36, 0x6c, 0x85, 0x73, 0x5c, 0x55, 0x16, 0x6c, 0xf6, 0x63, -0x57, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x16, 0x6c, 0xf6, 0x63, 0xd5, 0x55, 0x55, 0x55, 0xbe, 0xf7, 0x10, 0x84, -0x70, 0x8c, 0x94, 0x54, 0x7d, 0xef, 0x10, 0x84, 0x55, 0x55, 0x5c, 0x63, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0x71, 0x8c, 0xcf, 0x7b, -0xff, 0xff, 0xff, 0xbf, 0x9d, 0xef, 0x10, 0x84, 0x55, 0x95, 0x8d, 0x72, -0xbe, 0xf7, 0x10, 0x84, 0x23, 0x1c, 0x15, 0x15, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xd5, 0x0a, 0x04, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0xde, 0xf7, 0x10, 0x84, 0x25, 0xd5, 0x55, 0x00, 0xbe, 0xf7, 0x30, 0x84, -0x57, 0x58, 0xc9, 0x00, 0xff, 0xff, 0x08, 0x42, 0x3f, 0x3f, 0x3f, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0xff, 0xff, 0x08, 0x42, -0xfc, 0xfc, 0xbc, 0x00, 0xbe, 0xf7, 0x10, 0x84, 0x35, 0xc9, 0x58, 0x00, -0xff, 0xff, 0x10, 0x84, 0x56, 0x55, 0x55, 0x00, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xf6, 0x63, 0x55, 0x55, 0x55, 0x55, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, -0xff, 0xff, 0xff, 0xff, 0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, -0xda, 0xfd, 0x60, 0x3b, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0xff, 0xff, 0x08, 0x42, 0x00, 0x2f, 0x3f, 0x3f, 0xff, 0xff, 0x8a, 0x52, -0x00, 0xfc, 0xe0, 0x2c, 0xdf, 0xff, 0x30, 0x84, 0x00, 0x55, 0x55, 0x56, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0xdf, 0xff, 0x30, 0x84, 0x00, 0x55, 0x55, 0x25, 0xff, 0xff, 0x8a, 0x52, -0x00, 0x2f, 0x22, 0x3e, 0xff, 0xff, 0x08, 0x42, 0x00, 0xfc, 0xfc, 0xfc, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0x55, 0xa9, 0xa9, 0xa9, 0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa9, 0xa9, 0xa9, -0x00, 0x00, 0xff, 0xff, 0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, -0x55, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0xff, 0xff, 0x55, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x41, 0x08, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0x9e, 0xf7, 0x10, 0x84, 0xe2, 0x35, 0x55, 0x55, 0x3c, 0xe7, 0x10, 0x84, -0x55, 0x5c, 0x83, 0xb5, 0xff, 0xff, 0x30, 0x84, 0x15, 0x15, 0x15, 0x38, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xde, 0xf7, 0x30, 0x84, 0x54, 0x54, 0x94, 0x88, -0x5c, 0xe7, 0x10, 0x84, 0xd5, 0x0d, 0x70, 0x57, 0xbe, 0xf7, 0x30, 0x84, -0x62, 0x57, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0x10, 0x84, 0x2d, 0x15, 0x15, 0x15, 0xff, 0xff, 0x30, 0x84, -0x5c, 0x88, 0xd4, 0x54, 0xff, 0xff, 0x10, 0x84, 0x55, 0x57, 0xe2, 0xb5, -0x9d, 0xef, 0x30, 0x84, 0x55, 0x55, 0x55, 0xe0, 0x41, 0x08, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0xff, 0xff, 0x30, 0x84, 0x54, 0x54, 0x54, 0xd4, -0x9d, 0xef, 0x30, 0x84, 0x55, 0x55, 0xd5, 0x82, 0xff, 0xff, 0x10, 0x84, -0x55, 0xb5, 0xe2, 0x57, 0xff, 0xff, 0x30, 0x84, 0x2d, 0x38, 0x15, 0x15, -0xff, 0xff, 0x10, 0x84, 0x5c, 0x54, 0x54, 0x54, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, -0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0xa9, 0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, -0xfb, 0xdf, 0x0a, 0x52, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xff, 0xff, 0x30, 0x84, -0xb5, 0x55, 0x55, 0x00, 0xde, 0xf7, 0x30, 0x84, 0x20, 0x35, 0x15, 0x00, -0xdf, 0xff, 0x30, 0x84, 0x54, 0x80, 0xd4, 0x00, 0xde, 0xf7, 0x30, 0x84, -0x55, 0x7e, 0x2b, 0x00, 0xdf, 0xff, 0x10, 0x84, 0x55, 0x55, 0xa0, 0x00, -0xef, 0x7b, 0xdf, 0xff, 0x40, 0x40, 0x6a, 0x55, 0x82, 0x10, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0xff, 0xff, 0x28, 0x42, 0xff, 0xff, 0xff, 0x00, -0x21, 0x08, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0xc3, 0x18, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0xff, 0xff, 0x08, 0x42, 0xfc, 0xfc, 0xa8, 0x00, -0xde, 0xf7, 0x30, 0x84, 0x55, 0x55, 0x02, 0x00, 0xff, 0xff, 0x10, 0x84, -0x55, 0xaf, 0xfa, 0x00, 0xdf, 0xff, 0x30, 0x84, 0x35, 0x20, 0x15, 0x00, -0xde, 0xf7, 0x30, 0x84, 0x80, 0x54, 0x54, 0x00, 0xff, 0xff, 0x30, 0x84, -0x57, 0x55, 0x55, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, -0xa9, 0xa9, 0xa9, 0x55, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0x6a, 0x6a, 0x6a, 0x55, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xa9, 0xa9, 0x55, -0x00, 0x00, 0xff, 0xff, 0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, -0xaa, 0xaa, 0xaa, 0x55, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6a, 0x6a, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, -0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55, -0x00, 0x00, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55 \ No newline at end of file diff --git a/third_party/zstd/build/single_file_libs/examples/testcard-zstd.inl b/third_party/zstd/build/single_file_libs/examples/testcard-zstd.inl deleted file mode 100644 index 9e43883..0000000 --- a/third_party/zstd/build/single_file_libs/examples/testcard-zstd.inl +++ /dev/null @@ -1,261 +0,0 @@ -0x28, 0xb5, 0x2f, 0xfd, 0x60, 0x00, 0x7f, 0x6d, 0x61, 0x00, 0x0a, 0x66, -0xec, 0x17, 0x48, 0x60, 0x1c, 0x5a, 0xc9, 0x5d, 0x1a, 0x38, 0x07, 0xe8, -0xc5, 0x82, 0x99, 0x68, 0xe6, 0x95, 0x45, 0x58, 0x0d, 0x0c, 0xf3, 0x36, -0xc8, 0xd9, 0x0f, 0x46, 0x2d, 0x68, 0x11, 0xf8, 0x31, 0x10, 0xa1, 0x1a, -0x2f, 0x99, 0x5c, 0x84, 0xfd, 0x92, 0x02, 0xe6, 0x3b, 0x44, 0x9b, 0x01, -0x5d, 0x92, 0xff, 0x38, 0x26, 0x00, 0x6a, 0x6b, 0xc3, 0x53, 0xb2, 0x0c, -0x25, 0xf3, 0xd8, 0x59, 0x68, 0x9b, 0x14, 0x8a, 0x89, 0x75, 0x18, 0x03, -0x1d, 0xc9, 0x0f, 0x63, 0x01, 0x73, 0x01, 0x72, 0x01, 0x4f, 0x66, 0x31, -0x58, 0x0f, 0x97, 0x4b, 0x0c, 0x4c, 0x06, 0xac, 0x07, 0x0b, 0x68, 0xd4, -0xad, 0x80, 0x64, 0x13, 0x74, 0xa1, 0x12, 0x16, 0x58, 0xcf, 0x1a, 0x95, -0x5f, 0x0d, 0x26, 0x55, 0xd0, 0x9c, 0xf4, 0x52, 0x35, 0x2e, 0x20, 0xc1, -0x06, 0x69, 0x03, 0x0a, 0x93, 0x83, 0x5e, 0x27, 0x9b, 0x4c, 0x6d, 0xee, -0x87, 0x03, 0x30, 0x6c, 0x46, 0xd7, 0x50, 0x5c, 0xca, 0xe6, 0xa6, 0x4d, -0xa8, 0xf6, 0xab, 0xd7, 0x0e, 0x27, 0x27, 0x90, 0xc4, 0xb2, 0xd1, 0x10, -0xfa, 0x43, 0x82, 0xc8, 0xf2, 0xe5, 0xff, 0xff, 0xd5, 0x52, 0x62, 0x43, -0x87, 0x26, 0x2a, 0x05, 0x70, 0x0e, 0xb0, 0x2f, 0xc4, 0x56, 0xef, 0xb5, -0xca, 0xb8, 0x53, 0xb7, 0x96, 0x0e, 0xe7, 0x00, 0x2c, 0xa8, 0xda, 0x3b, -0x07, 0x70, 0xa7, 0x78, 0x38, 0x60, 0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8, 0xc9, 0x0a, 0x88, 0x1f, 0xd6, 0x47, 0x54, -0xf1, 0xd3, 0xfb, 0x62, 0xa7, 0xfd, 0xf2, 0x8b, 0xfd, 0xb6, 0xe4, 0x2e, -0xb6, 0x91, 0x73, 0x1c, 0xd0, 0x7b, 0xba, 0x83, 0xc9, 0xac, 0x51, 0x39, -0x92, 0xc5, 0x4f, 0x30, 0x1e, 0x2e, 0xd5, 0xf1, 0xa8, 0xa6, 0xa5, 0x80, -0x70, 0xb9, 0xbc, 0xb7, 0xc2, 0x52, 0x32, 0x6c, 0xe3, 0x3d, 0xed, 0x41, -0xa4, 0x4b, 0x31, 0x2a, 0xe6, 0x62, 0x11, 0x19, 0x95, 0x73, 0x1d, 0xbf, -0xe1, 0x6c, 0xfc, 0x47, 0x75, 0x6c, 0x37, 0x63, 0x02, 0xf8, 0x34, 0x40, -0x9a, 0x00, 0x1d, 0xf7, 0x32, 0x56, 0x77, 0xda, 0x5b, 0x9f, 0x9f, 0x0f, -0xbb, 0x91, 0x5b, 0xbd, 0xe7, 0x58, 0x82, 0x4a, 0x20, 0xcd, 0x4f, 0x47, -0x15, 0xf3, 0x51, 0xf1, 0x43, 0x51, 0x10, 0x96, 0xae, 0xba, 0xf7, 0x21, -0x50, 0xef, 0x55, 0x27, 0x0c, 0x1f, 0xe0, 0x54, 0xf8, 0xc9, 0x69, 0xef, -0xb9, 0x53, 0xf7, 0x83, 0x73, 0x9d, 0xce, 0x86, 0x07, 0x83, 0x44, 0x61, -0x37, 0x35, 0x35, 0x33, 0x4e, 0x33, 0x33, 0x3e, 0x9f, 0x50, 0x48, 0x24, -0xe6, 0xd0, 0x79, 0x49, 0xc3, 0x2d, 0xa0, 0x46, 0x31, 0x9a, 0x72, 0xc3, -0x84, 0xff, 0x7a, 0x95, 0xbb, 0x00, 0x22, 0xcc, 0x14, 0x00, 0x04, 0xac, -0x60, 0x64, 0x86, 0xe4, 0x6f, 0xb1, 0x58, 0xf4, 0xdc, 0xb0, 0x05, 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, 0xa2, 0x60, 0x73, -0xf1, 0xe0, 0x17, 0x50, 0xb5, 0x93, 0x81, 0xac, 0xf1, 0xc9, 0xd4, 0x66, -0x73, 0x71, 0xce, 0x63, 0xa8, 0x60, 0x98, 0xda, 0x86, 0x46, 0x72, 0xec, -0x54, 0xc1, 0xe6, 0x8a, 0x10, 0x23, 0x2d, 0x0c, 0xdd, 0x44, 0x0b, 0xa0, -0x44, 0xa4, 0x9d, 0x0e, 0x64, 0x31, 0x30, 0x45, 0xb1, 0x97, 0x4c, 0x6d, -0x9f, 0x43, 0x99, 0x71, 0xa8, 0x9a, 0xe6, 0xbd, 0x3a, 0xe1, 0xff, 0x7f, -0x33, 0x61, 0xf1, 0x48, 0xda, 0x48, 0x28, 0x10, 0x23, 0x9b, 0x24, 0xeb, -0xee, 0xbd, 0x35, 0x0e, 0x6e, 0x75, 0x23, 0x20, 0xd6, 0x95, 0x8c, 0xa5, -0x24, 0xec, 0x44, 0x67, 0x52, 0x2e, 0x78, 0x2a, 0xba, 0x3e, 0x3a, 0x4e, -0xc9, 0x5c, 0x23, 0xb0, 0xd5, 0xfb, 0x29, 0xaf, 0x9a, 0x0b, 0x90, 0x89, -0xd8, 0xec, 0xa9, 0xa8, 0x13, 0xfc, 0x22, 0xfa, 0xf2, 0x74, 0x2f, 0x4e, -0x35, 0xb0, 0x6d, 0x6c, 0xfd, 0xc4, 0xfe, 0xd0, 0x98, 0x3d, 0xe5, 0x43, -0x0a, 0xd0, 0x33, 0x26, 0x3b, 0x12, 0x7d, 0x65, 0xa1, 0xff, 0xff, 0x6f, -0x53, 0x0e, 0x28, 0x84, 0xa7, 0xa2, 0x2e, 0xf8, 0x4a, 0xb6, 0xa1, 0x47, -0xf5, 0xd0, 0x13, 0x9d, 0xd9, 0x50, 0xef, 0x9f, 0x31, 0xb4, 0x13, 0x67, -0xf9, 0x0a, 0x99, 0xb5, 0x80, 0xec, 0x4a, 0x1a, 0x59, 0x21, 0x3b, 0xce, -0xc5, 0x7e, 0x96, 0x85, 0x92, 0xc5, 0xb0, 0x75, 0xaa, 0x41, 0x16, 0xa9, -0xd3, 0xde, 0x13, 0x7d, 0xd9, 0x61, 0x30, 0x1c, 0x73, 0x61, 0x54, 0x90, -0xcf, 0xd4, 0xe8, 0xfe, 0xbf, 0xbf, 0x36, 0x57, 0x26, 0x38, 0xab, 0x06, -0xc4, 0x7e, 0x3c, 0x5b, 0x35, 0xd2, 0x7c, 0x2c, 0x0a, 0x82, 0xf2, 0xa8, -0xf2, 0x8b, 0x48, 0xa9, 0x90, 0x00, 0x01, 0x10, 0x10, 0x14, 0x04, 0x00, -0x32, 0xa2, 0x06, 0x82, 0x28, 0x90, 0xc2, 0xb4, 0x85, 0xda, 0x01, 0x52, -0xe9, 0x18, 0x85, 0x60, 0x00, 0x00, 0x20, 0x0c, 0x00, 0x14, 0x41, 0x00, -0x40, 0xa0, 0x04, 0x40, 0x00, 0x80, 0x50, 0x03, 0x01, 0x10, 0x18, 0x01, -0x80, 0xd4, 0x14, 0x99, 0x01, 0xfd, 0x07, 0xf8, 0x16, 0x0e, 0xd9, 0x5d, -0xa3, 0x70, 0xfe, 0xda, 0x17, 0xfa, 0xce, 0x46, 0x9a, 0x99, 0x81, 0x1a, -0x39, 0xba, 0x63, 0xb1, 0x18, 0x11, 0x58, 0xd7, 0xc7, 0xba, 0x03, 0x3e, -0x01, 0xf2, 0xf9, 0x4e, 0x12, 0xa3, 0x50, 0x7b, 0xaf, 0x7b, 0x60, 0x5c, -0x83, 0x23, 0xd2, 0x60, 0x27, 0x84, 0xad, 0xb8, 0x02, 0xed, 0xfe, 0xb4, -0x9c, 0x08, 0x9f, 0x49, 0xae, 0x55, 0x02, 0x94, 0xc0, 0x1b, 0x90, 0x75, -0x0b, 0x90, 0xc4, 0xc7, 0x43, 0x9e, 0x67, 0x25, 0x70, 0x61, 0x0d, 0xb8, -0x7a, 0x97, 0x43, 0xfc, 0xd1, 0x7e, 0x68, 0xed, 0x03, 0xb7, 0x1e, 0x75, -0xe9, 0x4d, 0x7a, 0x23, 0x18, 0x37, 0x63, 0x6f, 0xab, 0x5f, 0x7c, 0x5b, -0x1c, 0x05, 0xdf, 0x3f, 0x00, 0x86, 0x37, 0xa0, 0xfa, 0x0c, 0xe0, 0xed, -0x35, 0x35, 0x2f, 0xd8, 0xd1, 0x75, 0xba, 0x37, 0x34, 0x7e, 0xb0, 0x84, -0x2a, 0x01, 0x0c, 0x98, 0xed, 0x47, 0xf9, 0x86, 0x81, 0x74, 0x00, 0x5d, -0x8b, 0x4c, 0x18, 0x8a, 0x31, 0xcd, 0xae, 0x07, 0x44, 0xb5, 0xd5, 0x07, -0xa0, 0xdf, 0xf4, 0xfa, 0xa6, 0x42, 0xd0, 0x4f, 0x17, 0xd8, 0xdf, 0xb6, -0x34, 0x44, 0xe3, 0x01, 0xc4, 0xb6, 0x2d, 0xb5, 0x56, 0xc6, 0x2a, 0x1f, -0x05, 0x6c, 0x35, 0xe0, 0x09, 0x31, 0xef, 0x60, 0xfe, 0xaf, 0x07, 0x80, -0x32, 0xa0, 0xe9, 0xd3, 0x96, 0x45, 0xa7, 0xaa, 0xb6, 0xfb, 0x03, 0x10, -0xe3, 0x97, 0x96, 0x8d, 0x3a, 0x01, 0xdd, 0x58, 0x58, 0x78, 0x00, 0xab, -0xff, 0x06, 0xa0, 0xd6, 0x01, 0x58, 0x08, 0xb7, 0xdc, 0x2d, 0xa7, 0xfb, -0x22, 0xa8, 0x67, 0x00, 0xe3, 0xcf, 0x82, 0x43, 0xfc, 0x96, 0x1b, 0x40, -0x63, 0xcf, 0x9d, 0x42, 0x5d, 0x66, 0x40, 0xaa, 0xaf, 0x28, 0x94, 0xd3, -0x2a, 0xd4, 0x02, 0x13, 0xd2, 0xdf, 0x03, 0x9c, 0x60, 0x6b, 0x16, 0x94, -0xb4, 0xbe, 0x62, 0xc2, 0x35, 0x60, 0x45, 0x09, 0x23, 0x5a, 0xe0, 0x85, -0xb3, 0x03, 0x50, 0x68, 0x0c, 0x20, 0xa5, 0xf9, 0x94, 0xd2, 0x35, 0x80, -0xad, 0x4c, 0x4e, 0x40, 0x41, 0x97, 0x92, 0x75, 0xbe, 0x0c, 0x03, 0x50, -0x85, 0x08, 0xaf, 0x36, 0x00, 0x68, 0xaf, 0x09, 0xb3, 0x0c, 0x20, 0x4f, -0x81, 0x6a, 0x6a, 0xf5, 0x0d, 0x70, 0x69, 0x00, 0x4c, 0xb4, 0x0f, 0x59, -0xe7, 0x31, 0x0a, 0x45, 0x9f, 0xde, 0x90, 0xd6, 0x38, 0x80, 0x6b, 0x2c, -0xb9, 0x2f, 0xd4, 0x01, 0x40, 0x14, 0xd5, 0xed, 0x8e, 0x01, 0x53, 0xbf, -0x03, 0x18, 0x1e, 0xb0, 0xc1, 0x85, 0x32, 0xec, 0x78, 0x2b, 0xf0, 0xbb, -0xbb, 0x6c, 0xf3, 0x4d, 0xdc, 0x73, 0x40, 0xfd, 0x10, 0x09, 0x9e, 0x20, -0xe2, 0x12, 0x8c, 0xe0, 0xd2, 0xed, 0x80, 0x6b, 0xcc, 0x78, 0x20, 0x03, -0xd0, 0x5e, 0x06, 0xf4, 0xb0, 0xc4, 0x0e, 0x15, 0x1d, 0x80, 0xb4, 0x76, -0xdf, 0x49, 0x03, 0x50, 0x82, 0xad, 0xda, 0x8b, 0x5a, 0x61, 0xc2, 0x5e, -0xb5, 0x1e, 0x46, 0xc0, 0xde, 0xaa, 0x0e, 0x15, 0x06, 0xd2, 0xf4, 0xb2, -0xd1, 0xed, 0x38, 0x0a, 0x03, 0x18, 0x33, 0x1a, 0x80, 0x61, 0x3e, 0xec, -0x7c, 0x74, 0xa8, 0x1d, 0x80, 0x1a, 0xce, 0x25, 0x1d, 0x41, 0xd1, 0xc1, -0x03, 0x28, 0xb5, 0xaf, 0x72, 0x9c, 0x59, 0x7a, 0xe1, 0x7d, 0xc0, 0xa5, -0x08, 0x1e, 0x18, 0x24, 0xfa, 0xbd, 0x99, 0x4a, 0x31, 0xa0, 0xea, 0xee, -0xf8, 0x36, 0x60, 0x98, 0xc9, 0x10, 0xd1, 0xa7, 0x35, 0x00, 0x8d, 0x40, -0x8e, 0x5a, 0x35, 0x0f, 0x80, 0xb1, 0xd4, 0x32, 0x79, 0x40, 0x34, 0x05, -0x7e, 0x98, 0xc6, 0x80, 0x3e, 0x90, 0x01, 0x65, 0xf4, 0x80, 0x73, 0x08, -0x64, 0xd7, 0x36, 0xc1, 0x7c, 0xc0, 0x5c, 0x75, 0x00, 0xc5, 0x09, 0x58, -0x9c, 0x13, 0x01, 0x72, 0x37, 0x9b, 0x79, 0xe4, 0x05, 0xd1, 0x01, 0x04, -0x98, 0x08, 0x74, 0xfd, 0xfc, 0x3f, 0x1c, 0x00, 0x73, 0x01, 0xfc, 0x1c, -0xcc, 0x16, 0x43, 0x19, 0x1d, 0xac, 0x61, 0x4b, 0x11, 0xc2, 0xa0, 0xf2, -0x01, 0x0b, 0x7b, 0x3b, 0xf4, 0xfc, 0x58, 0x5d, 0x2d, 0x5c, 0x01, 0x8c, -0x62, 0x17, 0x78, 0xbe, 0x60, 0x8c, 0x01, 0x6f, 0x91, 0x49, 0x65, 0x54, -0x92, 0xe9, 0x01, 0x1e, 0x10, 0x77, 0x35, 0x00, 0xa8, 0xd4, 0xc7, 0x71, -0x07, 0xd8, 0xcd, 0xa3, 0x7d, 0x69, 0x20, 0xac, 0x07, 0x00, 0x35, 0xc7, -0x62, 0xee, 0x8c, 0x7d, 0x0c, 0xb8, 0x43, 0x0e, 0x00, 0x08, 0xfb, 0xe7, -0xec, 0x33, 0x37, 0x04, 0x80, 0x2d, 0x1d, 0xa6, 0x13, 0x34, 0x1b, 0x1d, -0xc0, 0xca, 0x00, 0x92, 0xed, 0x2e, 0x56, 0xbe, 0x91, 0x80, 0x0c, 0x88, -0xa6, 0x01, 0xdf, 0x7f, 0x90, 0x49, 0xed, 0x0c, 0xe0, 0x08, 0x73, 0x28, -0x74, 0xc7, 0xe1, 0xb1, 0x03, 0x5d, 0xc5, 0xab, 0x61, 0x42, 0xdf, 0x03, -0x43, 0xf3, 0x35, 0x04, 0xcf, 0xc6, 0x1d, 0x79, 0x07, 0x40, 0x22, 0xe4, -0x68, 0x0d, 0x01, 0x95, 0xad, 0x72, 0x69, 0x00, 0x39, 0x9d, 0x53, 0x8f, -0x13, 0x0d, 0xb0, 0x29, 0x79, 0x1a, 0x39, 0x20, 0x12, 0x28, 0x9b, 0x02, -0x8f, 0x74, 0x90, 0x4c, 0xe8, 0xd1, 0x57, 0xf4, 0x01, 0x44, 0x04, 0xe0, -0x0c, 0x82, 0x91, 0xc5, 0x4f, 0x8f, 0xc6, 0x00, 0x43, 0x85, 0x65, 0xc8, -0xe6, 0x34, 0x1d, 0x80, 0xc0, 0xca, 0xdb, 0x57, 0x6c, 0x00, 0x72, 0x42, -0x5f, 0xd0, 0x49, 0x57, 0x47, 0xd4, 0x97, 0x18, 0x18, 0x80, 0x68, 0x8e, -0x0a, 0xf1, 0x6b, 0x34, 0xf1, 0x60, 0x2c, 0x41, 0x29, 0xd3, 0x3d, 0x55, -0x95, 0xb1, 0x3c, 0xd4, 0x95, 0x42, 0xef, 0xe7, 0xca, 0x00, 0x2e, 0xce, -0x25, 0xc2, 0xca, 0xf5, 0x00, 0x17, 0x3b, 0x8c, 0x42, 0x88, 0x03, 0xde, -0x97, 0xe1, 0x3a, 0x74, 0xb0, 0x33, 0xe0, 0x8f, 0x47, 0xeb, 0x2a, 0x5f, -0x36, 0x3e, 0x5a, 0xff, 0xc5, 0x80, 0xb9, 0x13, 0xa9, 0x1f, 0xf8, 0x86, -0xc9, 0x51, 0xf8, 0x4c, 0xaa, 0xe1, 0x65, 0x80, 0xb0, 0x8b, 0x91, 0xec, -0xcc, 0xbf, 0x70, 0x19, 0x98, 0x03, 0x10, 0xf0, 0x38, 0x40, 0xc4, 0x65, -0xbe, 0x41, 0xb2, 0x58, 0x3f, 0xe0, 0xcc, 0x0e, 0x08, 0x2b, 0x73, 0xf4, -0xdd, 0x86, 0x06, 0xa0, 0xc6, 0x8f, 0x1a, 0x32, 0x66, 0x50, 0x8e, 0xe1, -0x59, 0x67, 0x00, 0xed, 0x66, 0x1d, 0xdd, 0xfa, 0x7b, 0xe2, 0x56, 0x89, -0xd9, 0xa0, 0x4f, 0x41, 0x94, 0x28, 0xb8, 0xc6, 0xc7, 0x64, 0xde, 0x9b, -0x64, 0x44, 0x33, 0x39, 0xb5, 0x6c, 0xb9, 0x42, 0xe7, 0x7e, 0x16, 0xd2, -0x01, 0x12, 0x03, 0xb3, 0x48, 0x47, 0x6b, 0x75, 0x26, 0x19, 0x8c, 0xac, -0x6f, 0xb1, 0x6f, 0xdc, 0x04, 0x27, 0x3a, 0x00, 0xd6, 0xae, 0xfa, 0xe1, -0xf7, 0x30, 0xa4, 0xdb, 0xd5, 0x86, 0x5a, 0x07, 0x11, 0xde, 0xea, 0xf4, -0xb0, 0x83, 0x16, 0xbb, 0xc6, 0x00, 0x6e, 0xf2, 0x6b, 0x40, 0x81, 0x01, -0x67, 0x0e, 0xa9, 0x82, 0x23, 0x04, 0x34, 0xed, 0x02, 0xf5, 0xe4, 0x0e, -0x58, 0xe8, 0x8a, 0x58, 0x57, 0xb0, 0x56, 0x65, 0x3d, 0x40, 0x64, 0x03, -0x6e, 0x7b, 0x07, 0x20, 0x99, 0x90, 0x36, 0x95, 0x9f, 0xdf, 0x3d, 0xe8, -0x00, 0xa0, 0x57, 0x8f, 0x6d, 0xa4, 0xb3, 0x1d, 0x7a, 0x06, 0xa8, 0x26, -0x41, 0xb0, 0x8c, 0x9c, 0x10, 0x85, 0x6c, 0xb4, 0x31, 0xa6, 0x5b, 0x7a, -0x10, 0x51, 0x15, 0x3c, 0xa2, 0x42, 0xd3, 0x23, 0x02, 0xc0, 0x17, 0x7e, -0x03, 0x28, 0xba, 0xce, 0x9b, 0xae, 0xdd, 0x1a, 0x19, 0xd0, 0x15, 0xac, -0xeb, 0x20, 0x3c, 0x3a, 0x00, 0xc6, 0xbb, 0x8a, 0xd5, 0x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, 0xdd, 0xdc, 0x01, 0x22, 0x18, 0xce, -0xa1, 0xd8, 0xcb, 0x67, 0xd5, 0x38, 0x4a, 0xbc, 0xd5, 0x81, 0x3d, 0x03, -0x98, 0x35, 0x60, 0x41, 0x85, 0x0c, 0x1d, 0xe7, 0x76, 0xf8, 0x11, 0x52, -0x76, 0xf6, 0x06, 0x16, 0x02, 0x45, 0xc8, 0xd8, 0x2f, 0x5e, 0x57, 0xbc, -0x3b, 0x89, 0x97, 0x09, 0x3e, 0x03, 0x34, 0x1a, 0x9d, 0x37, 0x87, 0x48, -0x0a, 0xe0, 0xa7, 0x4f, 0x8c, 0x3a, 0xa2, 0xaf, 0xfd, 0x7b, 0x80, 0xcf, -0xe5, 0x18, 0x61, 0x68, 0xba, 0x61, 0x8b, 0x09, 0xaa, 0xa3, 0x0c, 0x47, -0x3c, 0x43, 0x03, 0xac, 0xa3, 0x2e, 0x5e, 0x72, 0x0c, 0x80, 0x19, 0x61, -0xe6, 0x6e, 0x0e, 0xd9, 0xe8, 0xe8, 0xaf, 0x11, 0x9b, 0x4a, 0x73, 0x7a, -0x61, 0x66, 0xf0, 0x54, 0x1d, 0x18, 0xc8, 0x23, 0x36, 0xbf, 0xb5, 0xf4, -0x86, 0x54, 0xed, 0xb5, 0x91, 0xee, 0xb8, 0xbc, 0xde, 0xc3, 0x87, 0x9b, -0x2f, 0x81, 0xf2, 0xee, 0xa3, 0xec, 0x02 \ No newline at end of file diff --git a/third_party/zstd/build/single_file_libs/examples/testcard.png b/third_party/zstd/build/single_file_libs/examples/testcard.png deleted file mode 100644 index 43088bb169697b7ef55841da016b1f1beda3ef68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12675 zcmc(`2UL^W)+qXgUZnRPiUJBG^iV@bQ4o|WA_NFUdhZw{G^L0lMLGgXQIM(>30*;? z2!iz9oAl26*n6M-pZ|_??tk8UcZ{1sk}qq`wdP#2t-02mMCs~iQjoEd0RTX8^{Q5zS6a~LXU9X#X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/build/single_file_libs/zstd-in.c +++ /dev/null @@ -1,91 +0,0 @@ -/** - * \file zstd.c - * Single-file Zstandard library. - * - * Generate using: - * \code - * python combine.py -r ../../lib -x legacy/zstd_legacy.h -o zstd.c zstd-in.c - * \endcode - */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -/* - * Settings to bake for the single library file. - * - * Note: It's important that none of these affects 'zstd.h' (only the - * implementation files we're amalgamating). - * - * Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also - * defined in mem.h (breaking C99 compatibility). - * - * Note: the undefs for xxHash allow Zstd's implementation to coincide with - * standalone xxHash usage (with global defines). - * - * Note: if you enable ZSTD_LEGACY_SUPPORT the combine.py script will need - * re-running without the "-x legacy/zstd_legacy.h" option (it excludes the - * legacy support at the source level). - * - * Note: multithreading is enabled for all platforms apart from Emscripten. - */ -#define DEBUGLEVEL 0 -#define MEM_MODULE -#undef XXH_NAMESPACE -#define XXH_NAMESPACE ZSTD_ -#undef XXH_PRIVATE_API -#define XXH_PRIVATE_API -#undef XXH_INLINE_ALL -#define XXH_INLINE_ALL -#define ZSTD_LEGACY_SUPPORT 0 -#ifndef __EMSCRIPTEN__ -#define ZSTD_MULTITHREAD -#endif -#define ZSTD_TRACE 0 -/* TODO: Can't amalgamate ASM function */ -#define ZSTD_DISABLE_ASM 1 - -/* Include zstd_deps.h first with all the options we need enabled. */ -#define ZSTD_DEPS_NEED_MALLOC -#define ZSTD_DEPS_NEED_MATH64 -#include "common/zstd_deps.h" - -#include "common/debug.c" -#include "common/entropy_common.c" -#include "common/error_private.c" -#include "common/fse_decompress.c" -#include "common/threading.c" -#include "common/pool.c" -#include "common/zstd_common.c" - -#include "compress/fse_compress.c" -#include "compress/hist.c" -#include "compress/huf_compress.c" -#include "compress/zstd_compress_literals.c" -#include "compress/zstd_compress_sequences.c" -#include "compress/zstd_compress_superblock.c" -#include "compress/zstd_preSplit.c" -#include "compress/zstd_compress.c" -#include "compress/zstd_double_fast.c" -#include "compress/zstd_fast.c" -#include "compress/zstd_lazy.c" -#include "compress/zstd_ldm.c" -#include "compress/zstd_opt.c" -#ifdef ZSTD_MULTITHREAD -#include "compress/zstdmt_compress.c" -#endif - -#include "decompress/huf_decompress.c" -#include "decompress/zstd_ddict.c" -#include "decompress/zstd_decompress.c" -#include "decompress/zstd_decompress_block.c" - -#include "dictBuilder/cover.c" -#include "dictBuilder/divsufsort.c" -#include "dictBuilder/fastcover.c" -#include "dictBuilder/zdict.c" diff --git a/third_party/zstd/build/single_file_libs/zstddeclib-in.c b/third_party/zstd/build/single_file_libs/zstddeclib-in.c deleted file mode 100644 index 8d9c1f5..0000000 --- a/third_party/zstd/build/single_file_libs/zstddeclib-in.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - * \file zstddeclib.c - * Single-file Zstandard decompressor. - * - * Generate using: - * \code - * python combine.py -r ../../lib -x legacy/zstd_legacy.h -o zstddeclib.c zstddeclib-in.c - * \endcode - */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -/* - * Settings to bake for the standalone decompressor. - * - * Note: It's important that none of these affects 'zstd.h' (only the - * implementation files we're amalgamating). - * - * Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also - * defined in mem.h (breaking C99 compatibility). - * - * Note: the undefs for xxHash allow Zstd's implementation to coincide with - * standalone xxHash usage (with global defines). - * - * Note: if you enable ZSTD_LEGACY_SUPPORT the combine.py script will need - * re-running without the "-x legacy/zstd_legacy.h" option (it excludes the - * legacy support at the source level). - */ -#define DEBUGLEVEL 0 -#define MEM_MODULE -#undef XXH_NAMESPACE -#define XXH_NAMESPACE ZSTD_ -#undef XXH_PRIVATE_API -#define XXH_PRIVATE_API -#undef XXH_INLINE_ALL -#define XXH_INLINE_ALL -#define ZSTD_LEGACY_SUPPORT 0 -#define ZSTD_STRIP_ERROR_STRINGS -#define ZSTD_TRACE 0 -/* TODO: Can't amalgamate ASM function */ -#define ZSTD_DISABLE_ASM 1 - -/* Include zstd_deps.h first with all the options we need enabled. */ -#define ZSTD_DEPS_NEED_MALLOC -#include "common/zstd_deps.h" - -#include "common/debug.c" -#include "common/entropy_common.c" -#include "common/error_private.c" -#include "common/fse_decompress.c" -#include "common/zstd_common.c" - -#include "decompress/huf_decompress.c" -#include "decompress/zstd_ddict.c" -#include "decompress/zstd_decompress.c" -#include "decompress/zstd_decompress_block.c" diff --git a/third_party/zstd/contrib/VS2005/README.md b/third_party/zstd/contrib/VS2005/README.md deleted file mode 100644 index ec1ef68..0000000 --- a/third_party/zstd/contrib/VS2005/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Project Support Notice - -The VS2005 Project directory has been moved to the contrib directory in order to indicate that it will no longer be supported. diff --git a/third_party/zstd/contrib/VS2005/fullbench/fullbench.vcproj b/third_party/zstd/contrib/VS2005/fullbench/fullbench.vcproj deleted file mode 100644 index 98f8593..0000000 --- a/third_party/zstd/contrib/VS2005/fullbench/fullbench.vcproj +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj b/third_party/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj deleted file mode 100644 index d182535..0000000 --- a/third_party/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/contrib/VS2005/zstd.sln b/third_party/zstd/contrib/VS2005/zstd.sln deleted file mode 100644 index 0c31ae1..0000000 --- a/third_party/zstd/contrib/VS2005/zstd.sln +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd\zstd.vcproj", "{1A2AB08E-5CE7-4C5B-BE55-458157C14051}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcproj", "{A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcproj", "{CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstdlib", "zstdlib\zstdlib.vcproj", "{99DE2A79-7298-4004-A0ED-030D7A3796CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.ActiveCfg = Debug|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.Build.0 = Debug|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.ActiveCfg = Debug|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.Build.0 = Debug|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.ActiveCfg = Release|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.Build.0 = Release|Win32 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.ActiveCfg = Release|x64 - {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.Build.0 = Release|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.ActiveCfg = Debug|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.Build.0 = Debug|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.ActiveCfg = Debug|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.Build.0 = Debug|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.ActiveCfg = Release|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.Build.0 = Release|Win32 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.ActiveCfg = Release|x64 - {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.Build.0 = Release|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.Build.0 = Debug|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.ActiveCfg = Debug|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.Build.0 = Debug|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.ActiveCfg = Release|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.Build.0 = Release|Win32 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.ActiveCfg = Release|x64 - {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.Build.0 = Release|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.Build.0 = Debug|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.ActiveCfg = Debug|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.Build.0 = Debug|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.ActiveCfg = Release|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.Build.0 = Release|Win32 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.ActiveCfg = Release|x64 - {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zstd/contrib/VS2005/zstd/zstd.vcproj b/third_party/zstd/contrib/VS2005/zstd/zstd.vcproj deleted file mode 100644 index e37ebee..0000000 --- a/third_party/zstd/contrib/VS2005/zstd/zstd.vcproj +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj b/third_party/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj deleted file mode 100644 index 67ddd2d..0000000 --- a/third_party/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/zstd/contrib/cleanTabs b/third_party/zstd/contrib/cleanTabs deleted file mode 100644 index 215913a..0000000 --- a/third_party/zstd/contrib/cleanTabs +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -sed -i '' $'s/\t/ /g' ../lib/**/*.{h,c} ../programs/*.{h,c} ../tests/*.c ./**/*.{h,cpp} ../examples/*.c ../zlibWrapper/*.{h,c} diff --git a/third_party/zstd/contrib/diagnose_corruption/.gitignore b/third_party/zstd/contrib/diagnose_corruption/.gitignore deleted file mode 100644 index a8e92b6..0000000 --- a/third_party/zstd/contrib/diagnose_corruption/.gitignore +++ /dev/null @@ -1 +0,0 @@ -check_flipped_bits diff --git a/third_party/zstd/contrib/diagnose_corruption/Makefile b/third_party/zstd/contrib/diagnose_corruption/Makefile deleted file mode 100644 index ecc9e63..0000000 --- a/third_party/zstd/contrib/diagnose_corruption/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -.PHONY: all -all: check_flipped_bits - -ZSTDLIBDIR ?= ../../lib - -CFLAGS ?= -O3 -CFLAGS += -I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZSTDLIBDIR)/compress \ - -I$(ZSTDLIBDIR)/decompress -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -Wmissing-prototypes -CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) -FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) - -.PHONY: $(ZSTDLIBDIR)/libzstd.a -$(ZSTDLIBDIR)/libzstd.a: - $(MAKE) -C $(ZSTDLIBDIR) libzstd.a - -check_flipped_bits: check_flipped_bits.c $(ZSTDLIBDIR)/libzstd.a - $(CC) $(FLAGS) $< -o $@$(EXT) $(ZSTDLIBDIR)/libzstd.a - -.PHONY: clean -clean: - rm -f check_flipped_bits diff --git a/third_party/zstd/contrib/diagnose_corruption/check_flipped_bits.c b/third_party/zstd/contrib/diagnose_corruption/check_flipped_bits.c deleted file mode 100644 index 09ddd46..0000000 --- a/third_party/zstd/contrib/diagnose_corruption/check_flipped_bits.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" -#include "zstd_errors.h" - -#include -#include -#include -#include -#include -#include - -typedef struct { - char *input; - size_t input_size; - - char *perturbed; /* same size as input */ - - char *output; - size_t output_size; - - const char *dict_file_name; - const char *dict_file_dir_name; - int32_t dict_id; - char *dict; - size_t dict_size; - ZSTD_DDict* ddict; - - ZSTD_DCtx* dctx; - - int success_count; - int error_counts[ZSTD_error_maxCode]; -} stuff_t; - -static void free_stuff(stuff_t* stuff) { - free(stuff->input); - free(stuff->output); - ZSTD_freeDDict(stuff->ddict); - free(stuff->dict); - ZSTD_freeDCtx(stuff->dctx); -} - -static void usage(void) { - fprintf(stderr, "check_flipped_bits input_filename [-d dict] [-D dict_dir]\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "Arguments:\n"); - fprintf(stderr, " -d file: path to a dictionary file to use.\n"); - fprintf(stderr, " -D dir : path to a directory, with files containing dictionaries, of the\n" - " form DICTID.zstd-dict, e.g., 12345.zstd-dict.\n"); - exit(1); -} - -static void print_summary(stuff_t* stuff) { - int error_code; - fprintf(stderr, "%9d successful decompressions\n", stuff->success_count); - for (error_code = 0; error_code < ZSTD_error_maxCode; error_code++) { - int count = stuff->error_counts[error_code]; - if (count) { - fprintf( - stderr, "%9d failed decompressions with message: %s\n", - count, ZSTD_getErrorString(error_code)); - } - } -} - -static char* readFile(const char* filename, size_t* size) { - struct stat statbuf; - int ret; - FILE* f; - char *buf; - size_t bytes_read; - - ret = stat(filename, &statbuf); - if (ret != 0) { - fprintf(stderr, "stat failed: %m\n"); - return NULL; - } - if ((statbuf.st_mode & S_IFREG) != S_IFREG) { - fprintf(stderr, "Input must be regular file\n"); - return NULL; - } - - *size = statbuf.st_size; - - f = fopen(filename, "r"); - if (f == NULL) { - fprintf(stderr, "fopen failed: %m\n"); - return NULL; - } - - buf = malloc(*size); - if (buf == NULL) { - fprintf(stderr, "malloc failed\n"); - fclose(f); - return NULL; - } - - bytes_read = fread(buf, 1, *size, f); - if (bytes_read != *size) { - fprintf(stderr, "failed to read whole file\n"); - fclose(f); - free(buf); - return NULL; - } - - ret = fclose(f); - if (ret != 0) { - fprintf(stderr, "fclose failed: %m\n"); - free(buf); - return NULL; - } - - return buf; -} - -static ZSTD_DDict* readDict(const char* filename, char **buf, size_t* size, int32_t* dict_id) { - ZSTD_DDict* ddict; - *buf = readFile(filename, size); - if (*buf == NULL) { - fprintf(stderr, "Opening dictionary file '%s' failed\n", filename); - return NULL; - } - - ddict = ZSTD_createDDict_advanced(*buf, *size, ZSTD_dlm_byRef, ZSTD_dct_auto, ZSTD_defaultCMem); - if (ddict == NULL) { - fprintf(stderr, "Failed to create ddict.\n"); - return NULL; - } - if (dict_id != NULL) { - *dict_id = ZSTD_getDictID_fromDDict(ddict); - } - return ddict; -} - -static ZSTD_DDict* readDictByID(stuff_t *stuff, int32_t dict_id, char **buf, size_t* size) { - if (stuff->dict_file_dir_name == NULL) { - return NULL; - } else { - size_t dir_name_len = strlen(stuff->dict_file_dir_name); - int dir_needs_separator = 0; - size_t dict_file_name_alloc_size = dir_name_len + 1 /* '/' */ + 10 /* max int32_t len */ + strlen(".zstd-dict") + 1 /* '\0' */; - char *dict_file_name = malloc(dict_file_name_alloc_size); - ZSTD_DDict* ddict; - int32_t read_dict_id; - if (dict_file_name == NULL) { - fprintf(stderr, "malloc failed.\n"); - return 0; - } - - if (dir_name_len > 0 && stuff->dict_file_dir_name[dir_name_len - 1] != '/') { - dir_needs_separator = 1; - } - - snprintf( - dict_file_name, - dict_file_name_alloc_size, - "%s%s%u.zstd-dict", - stuff->dict_file_dir_name, - dir_needs_separator ? "/" : "", - dict_id); - - /* fprintf(stderr, "Loading dict %u from '%s'.\n", dict_id, dict_file_name); */ - - ddict = readDict(dict_file_name, buf, size, &read_dict_id); - if (ddict == NULL) { - fprintf(stderr, "Failed to create ddict from '%s'.\n", dict_file_name); - free(dict_file_name); - return 0; - } - if (read_dict_id != dict_id) { - fprintf(stderr, "Read dictID (%u) does not match expected (%u).\n", read_dict_id, dict_id); - free(dict_file_name); - ZSTD_freeDDict(ddict); - return 0; - } - - free(dict_file_name); - return ddict; - } -} - -static int init_stuff(stuff_t* stuff, int argc, char *argv[]) { - const char* input_filename; - - if (argc < 2) { - usage(); - } - - input_filename = argv[1]; - stuff->input_size = 0; - stuff->input = readFile(input_filename, &stuff->input_size); - if (stuff->input == NULL) { - fprintf(stderr, "Failed to read input file.\n"); - return 0; - } - - stuff->perturbed = malloc(stuff->input_size); - if (stuff->perturbed == NULL) { - fprintf(stderr, "malloc failed.\n"); - return 0; - } - memcpy(stuff->perturbed, stuff->input, stuff->input_size); - - stuff->output_size = ZSTD_DStreamOutSize(); - stuff->output = malloc(stuff->output_size); - if (stuff->output == NULL) { - fprintf(stderr, "malloc failed.\n"); - return 0; - } - - stuff->dict_file_name = NULL; - stuff->dict_file_dir_name = NULL; - stuff->dict_id = 0; - stuff->dict = NULL; - stuff->dict_size = 0; - stuff->ddict = NULL; - - if (argc > 2) { - if (!strcmp(argv[2], "-d")) { - if (argc > 3) { - stuff->dict_file_name = argv[3]; - } else { - usage(); - } - } else - if (!strcmp(argv[2], "-D")) { - if (argc > 3) { - stuff->dict_file_dir_name = argv[3]; - } else { - usage(); - } - } else { - usage(); - } - } - - if (stuff->dict_file_dir_name) { - int32_t dict_id = ZSTD_getDictID_fromFrame(stuff->input, stuff->input_size); - if (dict_id != 0) { - stuff->ddict = readDictByID(stuff, dict_id, &stuff->dict, &stuff->dict_size); - if (stuff->ddict == NULL) { - fprintf(stderr, "Failed to create cached ddict.\n"); - return 0; - } - stuff->dict_id = dict_id; - } - } else - if (stuff->dict_file_name) { - stuff->ddict = readDict(stuff->dict_file_name, &stuff->dict, &stuff->dict_size, &stuff->dict_id); - if (stuff->ddict == NULL) { - fprintf(stderr, "Failed to create ddict from '%s'.\n", stuff->dict_file_name); - return 0; - } - } - - stuff->dctx = ZSTD_createDCtx(); - if (stuff->dctx == NULL) { - return 0; - } - - stuff->success_count = 0; - memset(stuff->error_counts, 0, sizeof(stuff->error_counts)); - - return 1; -} - -static int test_decompress(stuff_t* stuff) { - size_t ret; - ZSTD_inBuffer in = {stuff->perturbed, stuff->input_size, 0}; - ZSTD_outBuffer out = {stuff->output, stuff->output_size, 0}; - ZSTD_DCtx* dctx = stuff->dctx; - int32_t custom_dict_id = ZSTD_getDictID_fromFrame(in.src, in.size); - char *custom_dict = NULL; - size_t custom_dict_size = 0; - ZSTD_DDict* custom_ddict = NULL; - - if (custom_dict_id != 0 && custom_dict_id != stuff->dict_id) { - /* fprintf(stderr, "Instead of dict %u, this perturbed blob wants dict %u.\n", stuff->dict_id, custom_dict_id); */ - custom_ddict = readDictByID(stuff, custom_dict_id, &custom_dict, &custom_dict_size); - } - - ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only); - - if (custom_ddict != NULL) { - ZSTD_DCtx_refDDict(dctx, custom_ddict); - } else { - ZSTD_DCtx_refDDict(dctx, stuff->ddict); - } - - while (in.pos != in.size) { - out.pos = 0; - ret = ZSTD_decompressStream(dctx, &out, &in); - - if (ZSTD_isError(ret)) { - unsigned int code = ZSTD_getErrorCode(ret); - if (code >= ZSTD_error_maxCode) { - fprintf(stderr, "Received unexpected error code!\n"); - exit(1); - } - stuff->error_counts[code]++; - /* - fprintf( - stderr, "Decompression failed: %s\n", ZSTD_getErrorName(ret)); - */ - if (custom_ddict != NULL) { - ZSTD_freeDDict(custom_ddict); - free(custom_dict); - } - return 0; - } - } - - stuff->success_count++; - - if (custom_ddict != NULL) { - ZSTD_freeDDict(custom_ddict); - free(custom_dict); - } - return 1; -} - -static int perturb_bits(stuff_t* stuff) { - size_t pos; - size_t bit; - for (pos = 0; pos < stuff->input_size; pos++) { - unsigned char old_val = stuff->input[pos]; - if (pos % 1000 == 0) { - fprintf(stderr, "Perturbing byte %zu / %zu\n", pos, stuff->input_size); - } - for (bit = 0; bit < 8; bit++) { - unsigned char new_val = old_val ^ (1 << bit); - stuff->perturbed[pos] = new_val; - if (test_decompress(stuff)) { - fprintf( - stderr, - "Flipping byte %zu bit %zu (0x%02x -> 0x%02x) " - "produced a successful decompression!\n", - pos, bit, old_val, new_val); - } - } - stuff->perturbed[pos] = old_val; - } - return 1; -} - -static int perturb_bytes(stuff_t* stuff) { - size_t pos; - size_t new_val; - for (pos = 0; pos < stuff->input_size; pos++) { - unsigned char old_val = stuff->input[pos]; - if (pos % 1000 == 0) { - fprintf(stderr, "Perturbing byte %zu / %zu\n", pos, stuff->input_size); - } - for (new_val = 0; new_val < 256; new_val++) { - stuff->perturbed[pos] = new_val; - if (test_decompress(stuff)) { - fprintf( - stderr, - "Changing byte %zu (0x%02x -> 0x%02x) " - "produced a successful decompression!\n", - pos, old_val, (unsigned char)new_val); - } - } - stuff->perturbed[pos] = old_val; - } - return 1; -} - -int main(int argc, char* argv[]) { - stuff_t stuff; - - if(!init_stuff(&stuff, argc, argv)) { - fprintf(stderr, "Failed to init.\n"); - return 1; - } - - if (test_decompress(&stuff)) { - fprintf(stderr, "Blob already decompresses successfully!\n"); - return 1; - } - - perturb_bits(&stuff); - - perturb_bytes(&stuff); - - print_summary(&stuff); - - free_stuff(&stuff); - - return 0; -} diff --git a/third_party/zstd/contrib/docker/Dockerfile b/third_party/zstd/contrib/docker/Dockerfile deleted file mode 100644 index 912bf19..0000000 --- a/third_party/zstd/contrib/docker/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Dockerfile -# First image to build the binary -FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a as builder - -RUN apk --no-cache add make gcc libc-dev -COPY . /src -RUN mkdir /pkg && cd /src && make && make DESTDIR=/pkg install - -# Second minimal image to only keep the built binary -FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a - -# Copy the built files -COPY --from=builder /pkg / - -# Copy the license as well -RUN mkdir -p /usr/local/share/licenses/zstd -COPY --from=builder /src/LICENSE /usr/local/share/licences/zstd/ - -# Just run `zstd` if no other command is given -CMD ["/usr/local/bin/zstd"] diff --git a/third_party/zstd/contrib/docker/README.md b/third_party/zstd/contrib/docker/README.md deleted file mode 100644 index 43f6d7a..0000000 --- a/third_party/zstd/contrib/docker/README.md +++ /dev/null @@ -1,20 +0,0 @@ - -## Requirement - -The `Dockerfile` script requires a version of `docker` >= 17.05 - -## Installing docker - -The official docker install docs use a ppa with a modern version available: -https://docs.docker.com/install/linux/docker-ce/ubuntu/ - -## How to run - -`docker build -t zstd .` - -## test - -``` -echo foo | docker run -i --rm zstd | docker run -i --rm zstd zstdcat -foo -``` diff --git a/third_party/zstd/contrib/externalSequenceProducer/.gitignore b/third_party/zstd/contrib/externalSequenceProducer/.gitignore deleted file mode 100644 index 147710a..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# build artifacts -externalSequenceProducer diff --git a/third_party/zstd/contrib/externalSequenceProducer/Makefile b/third_party/zstd/contrib/externalSequenceProducer/Makefile deleted file mode 100644 index 0591ae0..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# ################################################################ -# Copyright (c) Yann Collet, Meta Platforms, Inc. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -PROGDIR = ../../programs -LIBDIR = ../../lib - -LIBZSTD = $(LIBDIR)/libzstd.a - -CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/compress -I$(LIBDIR)/common - -CFLAGS ?= -O3 -CFLAGS += -std=gnu99 -DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum \ - -Wstrict-prototypes -Wundef -Wpointer-arith \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) - -default: externalSequenceProducer - -all: externalSequenceProducer - -externalSequenceProducer: sequence_producer.c main.c $(LIBZSTD) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -.PHONY: $(LIBZSTD) -$(LIBZSTD): - $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" - -clean: - $(RM) *.o - $(MAKE) -C $(LIBDIR) clean > /dev/null - $(RM) externalSequenceProducer diff --git a/third_party/zstd/contrib/externalSequenceProducer/README.md b/third_party/zstd/contrib/externalSequenceProducer/README.md deleted file mode 100644 index c16a170..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/README.md +++ /dev/null @@ -1,14 +0,0 @@ -externalSequenceProducer -===================== - -`externalSequenceProducer` is a test tool for the Block-Level Sequence Producer API. -It demonstrates how to use the API to perform a simple round-trip test. - -A sample sequence producer is provided in sequence_producer.c, but the user can swap -this out with a different one if desired. The sample sequence producer implements -LZ parsing with a 1KB hashtable. Dictionary-based parsing is not currently supported. - -Command line : -``` -externalSequenceProducer filename -``` diff --git a/third_party/zstd/contrib/externalSequenceProducer/main.c b/third_party/zstd/contrib/externalSequenceProducer/main.c deleted file mode 100644 index e67e295..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/main.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include -#include -#include -#include - -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" -#include "zstd_errors.h" -#include "sequence_producer.h" // simpleSequenceProducer - -#define CHECK(res) \ -do { \ - if (ZSTD_isError(res)) { \ - printf("ERROR: %s\n", ZSTD_getErrorName(res)); \ - return 1; \ - } \ -} while (0) \ - -int main(int argc, char *argv[]) { - if (argc != 2) { - printf("Usage: externalSequenceProducer \n"); - return 1; - } - - ZSTD_CCtx* const zc = ZSTD_createCCtx(); - - int simpleSequenceProducerState = 0xdeadbeef; - - // Here is the crucial bit of code! - ZSTD_registerSequenceProducer( - zc, - &simpleSequenceProducerState, - simpleSequenceProducer - ); - - { - size_t const res = ZSTD_CCtx_setParameter(zc, ZSTD_c_enableSeqProducerFallback, 1); - CHECK(res); - } - - FILE *f = fopen(argv[1], "rb"); - assert(f); - { - int const ret = fseek(f, 0, SEEK_END); - assert(ret == 0); - } - size_t const srcSize = ftell(f); - { - int const ret = fseek(f, 0, SEEK_SET); - assert(ret == 0); - } - - char* const src = malloc(srcSize + 1); - assert(src); - { - size_t const ret = fread(src, srcSize, 1, f); - assert(ret == 1); - int const ret2 = fclose(f); - assert(ret2 == 0); - } - - size_t const dstSize = ZSTD_compressBound(srcSize); - char* const dst = malloc(dstSize); - assert(dst); - - size_t const cSize = ZSTD_compress2(zc, dst, dstSize, src, srcSize); - CHECK(cSize); - - char* const val = malloc(srcSize); - assert(val); - - { - size_t const res = ZSTD_decompress(val, srcSize, dst, cSize); - CHECK(res); - } - - if (memcmp(src, val, srcSize) == 0) { - printf("Compression and decompression were successful!\n"); - printf("Original size: %lu\n", srcSize); - printf("Compressed size: %lu\n", cSize); - } else { - printf("ERROR: input and validation buffers don't match!\n"); - for (size_t i = 0; i < srcSize; i++) { - if (src[i] != val[i]) { - printf("First bad index: %zu\n", i); - break; - } - } - return 1; - } - - ZSTD_freeCCtx(zc); - free(src); - free(dst); - free(val); - return 0; -} diff --git a/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.c b/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.c deleted file mode 100644 index 60a2f95..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_compress_internal.h" -#include "sequence_producer.h" - -#define HSIZE 1024 -static U32 const HLOG = 10; -static U32 const MLS = 4; -static U32 const BADIDX = 0xffffffff; - -size_t simpleSequenceProducer( - void* sequenceProducerState, - ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, - const void* src, size_t srcSize, - const void* dict, size_t dictSize, - int compressionLevel, - size_t windowSize -) { - const BYTE* const istart = (const BYTE*)src; - const BYTE* const iend = istart + srcSize; - const BYTE* ip = istart; - const BYTE* anchor = istart; - size_t seqCount = 0; - U32 hashTable[HSIZE]; - - (void)sequenceProducerState; - (void)dict; - (void)dictSize; - (void)outSeqsCapacity; - (void)compressionLevel; - - { int i; - for (i=0; i < HSIZE; i++) { - hashTable[i] = BADIDX; - } } - - while (ip + MLS < iend) { - size_t const hash = ZSTD_hashPtr(ip, HLOG, MLS); - U32 const matchIndex = hashTable[hash]; - hashTable[hash] = (U32)(ip - istart); - - if (matchIndex != BADIDX) { - const BYTE* const match = istart + matchIndex; - U32 const matchLen = (U32)ZSTD_count(ip, match, iend); - if (matchLen >= ZSTD_MINMATCH_MIN) { - U32 const litLen = (U32)(ip - anchor); - U32 const offset = (U32)(ip - match); - ZSTD_Sequence const seq = { - offset, litLen, matchLen, 0 - }; - - /* Note: it's crucial to stay within the window size! */ - if (offset <= windowSize) { - outSeqs[seqCount++] = seq; - ip += matchLen; - anchor = ip; - continue; - } - } - } - - ip++; - } - - { ZSTD_Sequence const finalSeq = { - 0, (U32)(iend - anchor), 0, 0 - }; - outSeqs[seqCount++] = finalSeq; - } - - return seqCount; -} diff --git a/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.h b/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.h deleted file mode 100644 index 19f9982..0000000 --- a/third_party/zstd/contrib/externalSequenceProducer/sequence_producer.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef MATCHFINDER_H -#define MATCHFINDER_H - -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" - -size_t simpleSequenceProducer( - void* sequenceProducerState, - ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, - const void* src, size_t srcSize, - const void* dict, size_t dictSize, - int compressionLevel, - size_t windowSize -); - -#endif diff --git a/third_party/zstd/contrib/freestanding_lib/freestanding.py b/third_party/zstd/contrib/freestanding_lib/freestanding.py deleted file mode 100644 index df69832..0000000 --- a/third_party/zstd/contrib/freestanding_lib/freestanding.py +++ /dev/null @@ -1,774 +0,0 @@ -#!/usr/bin/env python3 -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ########################################################################## - -import argparse -import contextlib -import os -import re -import shutil -import sys -from typing import Optional - - -INCLUDED_SUBDIRS = ["common", "compress", "decompress"] - -SKIPPED_FILES = [ - "common/mem.h", - "common/zstd_deps.h", - "common/pool.c", - "common/pool.h", - "common/threading.c", - "common/threading.h", - "common/zstd_trace.h", - "compress/zstdmt_compress.h", - "compress/zstdmt_compress.c", -] - -XXHASH_FILES = [ - "common/xxhash.c", - "common/xxhash.h", -] - - -class FileLines(object): - def __init__(self, filename): - self.filename = filename - with open(self.filename, "r") as f: - self.lines = f.readlines() - - def write(self): - with open(self.filename, "w") as f: - f.write("".join(self.lines)) - - -class PartialPreprocessor(object): - """ - Looks for simple ifdefs and ifndefs and replaces them. - Handles && and ||. - Has fancy logic to handle translating elifs to ifs. - Only looks for macros in the first part of the expression with no - parens. - Does not handle multi-line macros (only looks in first line). - """ - def __init__(self, defs: [(str, Optional[str])], replaces: [(str, str)], undefs: [str]): - MACRO_GROUP = r"(?P[a-zA-Z_][a-zA-Z_0-9]*)" - ELIF_GROUP = r"(?Pel)?" - OP_GROUP = r"(?P&&|\|\|)?" - - self._defs = {macro:value for macro, value in defs} - self._replaces = {macro:value for macro, value in replaces} - self._defs.update(self._replaces) - self._undefs = set(undefs) - - self._define = re.compile(r"\s*#\s*define") - self._if = re.compile(r"\s*#\s*if") - self._elif = re.compile(r"\s*#\s*(?Pel)if") - self._else = re.compile(r"\s*#\s*(?Pelse)") - self._endif = re.compile(r"\s*#\s*endif") - - self._ifdef = re.compile(fr"\s*#\s*if(?Pn)?def {MACRO_GROUP}\s*") - self._if_defined = re.compile( - fr"\s*#\s*{ELIF_GROUP}if\s+(?P!)?\s*defined\s*\(\s*{MACRO_GROUP}\s*\)\s*{OP_GROUP}" - ) - self._if_defined_value = re.compile( - fr"\s*#\s*{ELIF_GROUP}if\s+defined\s*\(\s*{MACRO_GROUP}\s*\)\s*" - fr"(?P&&)\s*" - fr"(?P\()?\s*" - fr"(?P[a-zA-Z_][a-zA-Z_0-9]*)\s*" - fr"(?P[=>[0-9]*)\s*" - fr"(?P\))?\s*" - ) - self._if_true = re.compile( - fr"\s*#\s*{ELIF_GROUP}if\s+{MACRO_GROUP}\s*{OP_GROUP}" - ) - - self._c_comment = re.compile(r"/\*.*?\*/") - self._cpp_comment = re.compile(r"//") - - def _log(self, *args, **kwargs): - print(*args, **kwargs) - - def _strip_comments(self, line): - # First strip c-style comments (may include //) - while True: - m = self._c_comment.search(line) - if m is None: - break - line = line[:m.start()] + line[m.end():] - - # Then strip cpp-style comments - m = self._cpp_comment.search(line) - if m is not None: - line = line[:m.start()] - - return line - - def _fixup_indentation(self, macro, replace: [str]): - if len(replace) == 0: - return replace - if len(replace) == 1 and self._define.match(replace[0]) is None: - # If there is only one line, only replace defines - return replace - - - all_pound = True - for line in replace: - if not line.startswith('#'): - all_pound = False - if all_pound: - replace = [line[1:] for line in replace] - - min_spaces = len(replace[0]) - for line in replace: - spaces = 0 - for i, c in enumerate(line): - if c != ' ': - # Non-preprocessor line ==> skip the fixup - if not all_pound and c != '#': - return replace - spaces = i - break - min_spaces = min(min_spaces, spaces) - - replace = [line[min_spaces:] for line in replace] - - if all_pound: - replace = ["#" + line for line in replace] - - return replace - - def _handle_if_block(self, macro, idx, is_true, prepend): - """ - Remove the #if or #elif block starting on this line. - """ - REMOVE_ONE = 0 - KEEP_ONE = 1 - REMOVE_REST = 2 - - if is_true: - state = KEEP_ONE - else: - state = REMOVE_ONE - - line = self._inlines[idx] - is_if = self._if.match(line) is not None - assert is_if or self._elif.match(line) is not None - depth = 0 - - start_idx = idx - - idx += 1 - replace = prepend - finished = False - while idx < len(self._inlines): - line = self._inlines[idx] - # Nested if statement - if self._if.match(line): - depth += 1 - idx += 1 - continue - # We're inside a nested statement - if depth > 0: - if self._endif.match(line): - depth -= 1 - idx += 1 - continue - - # We're at the original depth - - # Looking only for an endif. - # We've found a true statement, but haven't - # completely elided the if block, so we just - # remove the remainder. - if state == REMOVE_REST: - if self._endif.match(line): - if is_if: - # Remove the endif because we took the first if - idx += 1 - finished = True - break - idx += 1 - continue - - if state == KEEP_ONE: - m = self._elif.match(line) - if self._endif.match(line): - replace += self._inlines[start_idx + 1:idx] - idx += 1 - finished = True - break - if self._elif.match(line) or self._else.match(line): - replace += self._inlines[start_idx + 1:idx] - state = REMOVE_REST - idx += 1 - continue - - if state == REMOVE_ONE: - m = self._elif.match(line) - if m is not None: - if is_if: - idx += 1 - b = m.start('elif') - e = m.end('elif') - assert e - b == 2 - replace.append(line[:b] + line[e:]) - finished = True - break - m = self._else.match(line) - if m is not None: - if is_if: - idx += 1 - while self._endif.match(self._inlines[idx]) is None: - replace.append(self._inlines[idx]) - idx += 1 - idx += 1 - finished = True - break - if self._endif.match(line): - if is_if: - # Remove the endif because no other elifs - idx += 1 - finished = True - break - idx += 1 - continue - if not finished: - raise RuntimeError("Unterminated if block!") - - replace = self._fixup_indentation(macro, replace) - - self._log(f"\tHardwiring {macro}") - if start_idx > 0: - self._log(f"\t\t {self._inlines[start_idx - 1][:-1]}") - for x in range(start_idx, idx): - self._log(f"\t\t- {self._inlines[x][:-1]}") - for line in replace: - self._log(f"\t\t+ {line[:-1]}") - if idx < len(self._inlines): - self._log(f"\t\t {self._inlines[idx][:-1]}") - - return idx, replace - - def _preprocess_once(self): - outlines = [] - idx = 0 - changed = False - while idx < len(self._inlines): - line = self._inlines[idx] - sline = self._strip_comments(line) - m = self._ifdef.fullmatch(sline) - if_true = False - if m is None: - m = self._if_defined_value.fullmatch(sline) - if m is None: - m = self._if_defined.match(sline) - if m is None: - m = self._if_true.match(sline) - if_true = (m is not None) - if m is None: - outlines.append(line) - idx += 1 - continue - - groups = m.groupdict() - macro = groups['macro'] - op = groups.get('op') - - if not (macro in self._defs or macro in self._undefs): - outlines.append(line) - idx += 1 - continue - - defined = macro in self._defs - - # Needed variables set: - # resolved: Is the statement fully resolved? - # is_true: If resolved, is the statement true? - ifdef = False - if if_true: - if not defined: - outlines.append(line) - idx += 1 - continue - - defined_value = self._defs[macro] - is_int = True - try: - defined_value = int(defined_value) - except TypeError: - is_int = False - except ValueError: - is_int = False - - resolved = is_int - is_true = (defined_value != 0) - - if resolved and op is not None: - if op == '&&': - resolved = not is_true - else: - assert op == '||' - resolved = is_true - - else: - ifdef = groups.get('not') is None - elseif = groups.get('elif') is not None - - macro2 = groups.get('macro2') - cmp = groups.get('cmp') - value = groups.get('value') - openp = groups.get('openp') - closep = groups.get('closep') - - is_true = (ifdef == defined) - resolved = True - if op is not None: - if op == '&&': - resolved = not is_true - else: - assert op == '||' - resolved = is_true - - if macro2 is not None and not resolved: - assert ifdef and defined and op == '&&' and cmp is not None - # If the statement is true, but we have a single value check, then - # check the value. - defined_value = self._defs[macro] - are_ints = True - try: - defined_value = int(defined_value) - value = int(value) - except TypeError: - are_ints = False - except ValueError: - are_ints = False - if ( - macro == macro2 and - ((openp is None) == (closep is None)) and - are_ints - ): - resolved = True - if cmp == '<': - is_true = defined_value < value - elif cmp == '<=': - is_true = defined_value <= value - elif cmp == '==': - is_true = defined_value == value - elif cmp == '!=': - is_true = defined_value != value - elif cmp == '>=': - is_true = defined_value >= value - elif cmp == '>': - is_true = defined_value > value - else: - resolved = False - - if op is not None and not resolved: - # Remove the first op in the line + spaces - if op == '&&': - opre = op - else: - assert op == '||' - opre = r'\|\|' - needle = re.compile(fr"(?P\s*#\s*(el)?if\s+).*?(?P{opre}\s*)") - match = needle.match(line) - assert match is not None - newline = line[:match.end('if')] + line[match.end('op'):] - - self._log(f"\tHardwiring partially resolved {macro}") - self._log(f"\t\t- {line[:-1]}") - self._log(f"\t\t+ {newline[:-1]}") - - outlines.append(newline) - idx += 1 - continue - - # Skip any statements we cannot fully compute - if not resolved: - outlines.append(line) - idx += 1 - continue - - prepend = [] - if macro in self._replaces: - assert not ifdef - assert op is None - value = self._replaces.pop(macro) - prepend = [f"#define {macro} {value}\n"] - - idx, replace = self._handle_if_block(macro, idx, is_true, prepend) - outlines += replace - changed = True - - return changed, outlines - - def preprocess(self, filename): - with open(filename, 'r') as f: - self._inlines = f.readlines() - changed = True - iters = 0 - while changed: - iters += 1 - changed, outlines = self._preprocess_once() - self._inlines = outlines - - with open(filename, 'w') as f: - f.write(''.join(self._inlines)) - - -class Freestanding(object): - def __init__( - self, zstd_deps: str, mem: str, source_lib: str, output_lib: str, - external_xxhash: bool, xxh64_state: Optional[str], - xxh64_prefix: Optional[str], rewritten_includes: [(str, str)], - defs: [(str, Optional[str])], replaces: [(str, str)], - undefs: [str], excludes: [str], seds: [str], spdx: bool, - ): - self._zstd_deps = zstd_deps - self._mem = mem - self._src_lib = source_lib - self._dst_lib = output_lib - self._external_xxhash = external_xxhash - self._xxh64_state = xxh64_state - self._xxh64_prefix = xxh64_prefix - self._rewritten_includes = rewritten_includes - self._defs = defs - self._replaces = replaces - self._undefs = undefs - self._excludes = excludes - self._seds = seds - self._spdx = spdx - - def _dst_lib_file_paths(self): - """ - Yields all the file paths in the dst_lib. - """ - for root, dirname, filenames in os.walk(self._dst_lib): - for filename in filenames: - filepath = os.path.join(root, filename) - yield filepath - - def _log(self, *args, **kwargs): - print(*args, **kwargs) - - def _copy_file(self, lib_path): - suffixes = [".c", ".h", ".S"] - if not any((lib_path.endswith(suffix) for suffix in suffixes)): - return - if lib_path in SKIPPED_FILES: - self._log(f"\tSkipping file: {lib_path}") - return - if self._external_xxhash and lib_path in XXHASH_FILES: - self._log(f"\tSkipping xxhash file: {lib_path}") - return - - src_path = os.path.join(self._src_lib, lib_path) - dst_path = os.path.join(self._dst_lib, lib_path) - self._log(f"\tCopying: {src_path} -> {dst_path}") - shutil.copyfile(src_path, dst_path) - - def _copy_source_lib(self): - self._log("Copying source library into output library") - - assert os.path.exists(self._src_lib) - os.makedirs(self._dst_lib, exist_ok=True) - self._copy_file("zstd.h") - self._copy_file("zstd_errors.h") - for subdir in INCLUDED_SUBDIRS: - src_dir = os.path.join(self._src_lib, subdir) - dst_dir = os.path.join(self._dst_lib, subdir) - - assert os.path.exists(src_dir) - os.makedirs(dst_dir, exist_ok=True) - - for filename in os.listdir(src_dir): - lib_path = os.path.join(subdir, filename) - self._copy_file(lib_path) - - def _copy_zstd_deps(self): - dst_zstd_deps = os.path.join(self._dst_lib, "common", "zstd_deps.h") - self._log(f"Copying zstd_deps: {self._zstd_deps} -> {dst_zstd_deps}") - shutil.copyfile(self._zstd_deps, dst_zstd_deps) - - def _copy_mem(self): - dst_mem = os.path.join(self._dst_lib, "common", "mem.h") - self._log(f"Copying mem: {self._mem} -> {dst_mem}") - shutil.copyfile(self._mem, dst_mem) - - def _hardwire_preprocessor(self, name: str, value: Optional[str] = None, undef=False): - """ - If value=None then hardwire that it is defined, but not what the value is. - If undef=True then value must be None. - If value='' then the macro is defined to '' exactly. - """ - assert not (undef and value is not None) - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - - def _hardwire_defines(self): - self._log("Hardwiring macros") - partial_preprocessor = PartialPreprocessor(self._defs, self._replaces, self._undefs) - for filepath in self._dst_lib_file_paths(): - partial_preprocessor.preprocess(filepath) - - def _remove_excludes(self): - self._log("Removing excluded sections") - for exclude in self._excludes: - self._log(f"\tRemoving excluded sections for: {exclude}") - begin_re = re.compile(f"BEGIN {exclude}") - end_re = re.compile(f"END {exclude}") - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - outlines = [] - skipped = [] - emit = True - for line in file.lines: - if emit and begin_re.search(line) is not None: - assert end_re.search(line) is None - emit = False - if emit: - outlines.append(line) - else: - skipped.append(line) - if end_re.search(line) is not None: - assert begin_re.search(line) is None - self._log(f"\t\tRemoving excluded section: {exclude}") - for s in skipped: - self._log(f"\t\t\t- {s}") - emit = True - skipped = [] - if not emit: - raise RuntimeError("Excluded section unfinished!") - file.lines = outlines - file.write() - - def _rewrite_include(self, original, rewritten): - self._log(f"\tRewriting include: {original} -> {rewritten}") - regex = re.compile(f"\\s*#\\s*include\\s*(?P{original})") - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - for i, line in enumerate(file.lines): - match = regex.match(line) - if match is None: - continue - s = match.start('include') - e = match.end('include') - file.lines[i] = line[:s] + rewritten + line[e:] - file.write() - - def _rewrite_includes(self): - self._log("Rewriting includes") - for original, rewritten in self._rewritten_includes: - self._rewrite_include(original, rewritten) - - def _replace_xxh64_prefix(self): - if self._xxh64_prefix is None: - return - self._log(f"Replacing XXH64 prefix with {self._xxh64_prefix}") - replacements = [] - if self._xxh64_state is not None: - replacements.append( - (re.compile(r"([^\w]|^)(?PXXH64_state_t)([^\w]|$)"), self._xxh64_state) - ) - if self._xxh64_prefix is not None: - replacements.append( - (re.compile(r"([^\w]|^)(?PXXH64)[\(_]"), self._xxh64_prefix) - ) - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - for i, line in enumerate(file.lines): - modified = False - for regex, replacement in replacements: - match = regex.search(line) - while match is not None: - modified = True - b = match.start('orig') - e = match.end('orig') - line = line[:b] + replacement + line[e:] - match = regex.search(line) - if modified: - self._log(f"\t- {file.lines[i][:-1]}") - self._log(f"\t+ {line[:-1]}") - file.lines[i] = line - file.write() - - def _parse_sed(self, sed): - assert sed[0] == 's' - delim = sed[1] - match = re.fullmatch(f's{delim}(.+){delim}(.*){delim}(.*)', sed) - assert match is not None - regex = re.compile(match.group(1)) - format_str = match.group(2) - is_global = match.group(3) == 'g' - return regex, format_str, is_global - - def _process_sed(self, sed): - self._log(f"Processing sed: {sed}") - regex, format_str, is_global = self._parse_sed(sed) - - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - for i, line in enumerate(file.lines): - modified = False - while True: - match = regex.search(line) - if match is None: - break - replacement = format_str.format(match.groups(''), match.groupdict('')) - b = match.start() - e = match.end() - line = line[:b] + replacement + line[e:] - modified = True - if not is_global: - break - if modified: - self._log(f"\t- {file.lines[i][:-1]}") - self._log(f"\t+ {line[:-1]}") - file.lines[i] = line - file.write() - - def _process_seds(self): - self._log("Processing seds") - for sed in self._seds: - self._process_sed(sed) - - def _process_spdx(self): - if not self._spdx: - return - self._log("Processing spdx") - SPDX_C = "// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n" - SPDX_H_S = "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n" - for filepath in self._dst_lib_file_paths(): - file = FileLines(filepath) - if file.lines[0] == SPDX_C or file.lines[0] == SPDX_H_S: - continue - for line in file.lines: - if "SPDX-License-Identifier" in line: - raise RuntimeError(f"Unexpected SPDX license identifier: {file.filename} {repr(line)}") - if file.filename.endswith(".c"): - file.lines.insert(0, SPDX_C) - elif file.filename.endswith(".h") or file.filename.endswith(".S"): - file.lines.insert(0, SPDX_H_S) - else: - raise RuntimeError(f"Unexpected file extension: {file.filename}") - file.write() - - - - def go(self): - self._copy_source_lib() - self._copy_zstd_deps() - self._copy_mem() - self._hardwire_defines() - self._remove_excludes() - self._rewrite_includes() - self._replace_xxh64_prefix() - self._process_seds() - self._process_spdx() - - -def parse_optional_pair(defines: [str]) -> [(str, Optional[str])]: - output = [] - for define in defines: - parsed = define.split('=') - if len(parsed) == 1: - output.append((parsed[0], None)) - elif len(parsed) == 2: - output.append((parsed[0], parsed[1])) - else: - raise RuntimeError(f"Bad define: {define}") - return output - - -def parse_pair(rewritten_includes: [str]) -> [(str, str)]: - output = [] - for rewritten_include in rewritten_includes: - parsed = rewritten_include.split('=') - if len(parsed) == 2: - output.append((parsed[0], parsed[1])) - else: - raise RuntimeError(f"Bad rewritten include: {rewritten_include}") - return output - - - -def main(name, args): - parser = argparse.ArgumentParser(prog=name) - parser.add_argument("--zstd-deps", default="zstd_deps.h", help="Zstd dependencies file") - parser.add_argument("--mem", default="mem.h", help="Memory module") - parser.add_argument("--source-lib", default="../../lib", help="Location of the zstd library") - parser.add_argument("--output-lib", default="./freestanding_lib", help="Where to output the freestanding zstd library") - parser.add_argument("--xxhash", default=None, help="Alternate external xxhash include e.g. --xxhash=''. If set xxhash is not included.") - parser.add_argument("--xxh64-state", default=None, help="Alternate XXH64 state type (excluding _) e.g. --xxh64-state='struct xxh64_state'") - parser.add_argument("--xxh64-prefix", default=None, help="Alternate XXH64 function prefix (excluding _) e.g. --xxh64-prefix=xxh64") - parser.add_argument("--rewrite-include", default=[], dest="rewritten_includes", action="append", help="Rewrite an include REGEX=NEW (e.g. '=')") - parser.add_argument("--sed", default=[], dest="seds", action="append", help="Apply a sed replacement. Format: `s/REGEX/FORMAT/[g]`. REGEX is a Python regex. FORMAT is a Python format string formatted by the regex dict.") - parser.add_argument("--spdx", action="store_true", help="Add SPDX License Identifiers") - parser.add_argument("-D", "--define", default=[], dest="defs", action="append", help="Pre-define this macro (can be passed multiple times)") - parser.add_argument("-U", "--undefine", default=[], dest="undefs", action="append", help="Pre-undefine this macro (can be passed multiple times)") - parser.add_argument("-R", "--replace", default=[], dest="replaces", action="append", help="Pre-define this macro and replace the first ifndef block with its definition") - parser.add_argument("-E", "--exclude", default=[], dest="excludes", action="append", help="Exclude all lines between 'BEGIN ' and 'END '") - args = parser.parse_args(args) - - # Always remove threading - if "ZSTD_MULTITHREAD" not in args.undefs: - args.undefs.append("ZSTD_MULTITHREAD") - - args.defs = parse_optional_pair(args.defs) - for name, _ in args.defs: - if name in args.undefs: - raise RuntimeError(f"{name} is both defined and undefined!") - - # Always set tracing to 0 - if "ZSTD_NO_TRACE" not in (arg[0] for arg in args.defs): - args.defs.append(("ZSTD_NO_TRACE", None)) - args.defs.append(("ZSTD_TRACE", "0")) - - args.replaces = parse_pair(args.replaces) - for name, _ in args.replaces: - if name in args.undefs or name in args.defs: - raise RuntimeError(f"{name} is both replaced and (un)defined!") - - args.rewritten_includes = parse_pair(args.rewritten_includes) - - external_xxhash = False - if args.xxhash is not None: - external_xxhash = True - args.rewritten_includes.append(('"(\\.\\./common/)?xxhash.h"', args.xxhash)) - - if args.xxh64_prefix is not None: - if not external_xxhash: - raise RuntimeError("--xxh64-prefix may only be used with --xxhash provided") - - if args.xxh64_state is not None: - if not external_xxhash: - raise RuntimeError("--xxh64-state may only be used with --xxhash provided") - - Freestanding( - args.zstd_deps, - args.mem, - args.source_lib, - args.output_lib, - external_xxhash, - args.xxh64_state, - args.xxh64_prefix, - args.rewritten_includes, - args.defs, - args.replaces, - args.undefs, - args.excludes, - args.seds, - args.spdx, - ).go() - -if __name__ == "__main__": - main(sys.argv[0], sys.argv[1:]) diff --git a/third_party/zstd/contrib/gen_html/.gitignore b/third_party/zstd/contrib/gen_html/.gitignore deleted file mode 100644 index 3446114..0000000 --- a/third_party/zstd/contrib/gen_html/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# make artefact -gen_html -zstd_manual.html diff --git a/third_party/zstd/contrib/gen_html/Makefile b/third_party/zstd/contrib/gen_html/Makefile deleted file mode 100644 index f93669e..0000000 --- a/third_party/zstd/contrib/gen_html/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -CXXFLAGS ?= -O3 -CXXFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wno-comment -CXXFLAGS += $(MOREFLAGS) -FLAGS = $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) - -ZSTDAPI = ../../lib/zstd.h -ZSTDMANUAL = ../../doc/zstd_manual.html -LIBVER_MAJOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` -LIBVER_MINOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` -LIBVER_PATCH_SCRIPT:=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` -LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT) -LIBVER := $(shell echo $(LIBVER_SCRIPT)) - - -# Define *.exe as extension for Windows systems -ifneq (,$(filter Windows%,$(OS))) -EXT =.exe -else -EXT = -endif - - -.PHONY: default -default: gen_html - -.PHONY: all -all: manual - -gen_html: gen_html.cpp - $(CXX) $(FLAGS) $^ -o $@$(EXT) - -$(ZSTDMANUAL): gen_html $(ZSTDAPI) - echo "Update zstd manual in /doc" - ./gen_html$(EXT) $(LIBVER) $(ZSTDAPI) $(ZSTDMANUAL) - -.PHONY: manual -manual: gen_html $(ZSTDMANUAL) - -.PHONY: clean -clean: - @$(RM) gen_html$(EXT) - @echo Cleaning completed diff --git a/third_party/zstd/contrib/gen_html/README.md b/third_party/zstd/contrib/gen_html/README.md deleted file mode 100644 index 63a4caa..0000000 --- a/third_party/zstd/contrib/gen_html/README.md +++ /dev/null @@ -1,31 +0,0 @@ -gen_html - a program for automatic generation of zstd manual -============================================================ - -#### Introduction - -This simple C++ program generates a single-page HTML manual from `zstd.h`. - -The format of recognized comment blocks is following: -- comments of type `/*!` mean: this is a function declaration; switch comments with declarations -- comments of type `/**` and `/*-` mean: this is a comment; use a `

` header for the first line -- comments of type `/*=` and `/**=` mean: use a `

` header and show also all functions until first empty line -- comments of type `/*X` where `X` is different from above-mentioned are ignored - -Moreover: -- `ZSTDLIB_API` is removed to improve readability -- `typedef` are detected and included even if uncommented -- comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold) - - -#### Usage - -The program requires 3 parameters: -``` -gen_html [zstd_version] [input_file] [output_html] -``` - -To compile program and generate zstd manual we have used: -``` -make -./gen_html.exe 1.1.1 ../../lib/zstd.h zstd_manual.html -``` diff --git a/third_party/zstd/contrib/gen_html/gen-zstd-manual.sh b/third_party/zstd/contrib/gen_html/gen-zstd-manual.sh deleted file mode 100644 index 57a8b6e..0000000 --- a/third_party/zstd/contrib/gen_html/gen-zstd-manual.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -LIBVER_MAJOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` -LIBVER_MINOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` -LIBVER_PATCH_SCRIPT=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` -LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT - -echo ZSTD_VERSION=$LIBVER_SCRIPT -./gen_html $LIBVER_SCRIPT ../../lib/zstd.h ./zstd_manual.html diff --git a/third_party/zstd/contrib/gen_html/gen_html.cpp b/third_party/zstd/contrib/gen_html/gen_html.cpp deleted file mode 100644 index adf0f41..0000000 --- a/third_party/zstd/contrib/gen_html/gen_html.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -#include -#include -#include -#include -using namespace std; - - -/* trim string at the beginning and at the end */ -void trim(string& s, string characters) -{ - size_t p = s.find_first_not_of(characters); - s.erase(0, p); - - p = s.find_last_not_of(characters); - if (string::npos != p) - s.erase(p+1); -} - - -/* trim C++ style comments */ -void trim_comments(string &s) -{ - size_t spos, epos; - - spos = s.find("/*"); - epos = s.find("*/"); - s = s.substr(spos+3, epos-(spos+3)); -} - - -/* get lines until a given terminator */ -vector get_lines(vector& input, int& linenum, string terminator) -{ - vector out; - string line; - size_t epos; - - while ((size_t)linenum < input.size()) { - line = input[linenum]; - - if (terminator.empty() && line.empty()) { linenum--; break; } - - epos = line.find(terminator); - if (!terminator.empty() && epos!=string::npos) { - out.push_back(line); - break; - } - out.push_back(line); - linenum++; - } - return out; -} - - -/* print line with ZSTDLIB_API removed and C++ comments not bold */ -void print_line(stringstream &sout, string line) -{ - size_t spos; - - if (line.substr(0,12) == "ZSTDLIB_API ") line = line.substr(12); - spos = line.find("/*"); - if (spos!=string::npos) { - sout << line.substr(0, spos); - sout << "" << line.substr(spos) << "" << endl; - } else { - // fprintf(stderr, "lines=%s\n", line.c_str()); - sout << line << endl; - } -} - - -int main(int argc, char *argv[]) { - char exclam; - int linenum, chapter = 1; - vector input, lines, comments, chapters; - string line, version; - size_t spos, l; - stringstream sout; - ifstream istream; - ofstream ostream; - - if (argc < 4) { - cout << "usage: " << argv[0] << " [zstd_version] [input_file] [output_html]" << endl; - return 1; - } - - version = "zstd " + string(argv[1]) + " Manual"; - - istream.open(argv[2], ifstream::in); - if (!istream.is_open()) { - cout << "Error opening file " << argv[2] << endl; - return 1; - } - - ostream.open(argv[3], ifstream::out); - if (!ostream.is_open()) { - cout << "Error opening file " << argv[3] << endl; - return 1; - } - - while (getline(istream, line)) { - input.push_back(line); - } - - for (linenum=0; (size_t)linenum < input.size(); linenum++) { - line = input[linenum]; - - /* typedefs are detected and included even if uncommented */ - if (line.substr(0,7) == "typedef" && line.find("{")!=string::npos) { - lines = get_lines(input, linenum, "}"); - sout << "
";
-            for (l=0; l

" << endl; - continue; - } - - /* comments of type /**< and /*!< are detected and only function declaration is highlighted (bold) */ - if ((line.find("/**<")!=string::npos || line.find("/*!<")!=string::npos) && line.find("*/")!=string::npos) { - sout << "
";
-            print_line(sout, line);
-            sout << "

" << endl; - continue; - } - - spos = line.find("/**="); - if (spos==string::npos) { - spos = line.find("/*!"); - if (spos==string::npos) - spos = line.find("/**"); - if (spos==string::npos) - spos = line.find("/*-"); - if (spos==string::npos) - spos = line.find("/*="); - if (spos==string::npos) - continue; - exclam = line[spos+2]; - } - else exclam = '='; - - comments = get_lines(input, linenum, "*/"); - if (!comments.empty()) comments[0] = line.substr(spos+3); - if (!comments.empty()) comments[comments.size()-1] = comments[comments.size()-1].substr(0, comments[comments.size()-1].find("*/")); - for (l=0; l"; - for (l=0; l

"; - for (l=0; l
" << endl << endl; - } else if (exclam == '=') { /* comments of type /*= and /**= mean: use a

header and show also all functions until first empty line */ - trim(comments[0], " "); - sout << "

" << comments[0] << "

";
-            for (l=1; l
";
-            lines = get_lines(input, ++linenum, "");
-            for (l=0; l
" << endl; - } else { /* comments of type /** and /*- mean: this is a comment; use a

header for the first line */ - if (comments.empty()) continue; - - trim(comments[0], " "); - sout << "

" << comments[0] << "

";
-            chapters.push_back(comments[0]);
-            chapter++;
-
-            for (l=1; l 1)
-                sout << "
" << endl << endl; - else - sout << "
" << endl << endl; - } - } - - ostream << "\n\n\n" << version << "\n\n" << endl; - ostream << "

" << version << "

\n"; - ostream << "Note: the content of this file has been automatically generated by parsing \"zstd.h\" \n"; - - ostream << "
\n

Contents

\n
    \n"; - for (size_t i=0; i" << chapters[i].c_str() << "\n"; - ostream << "
\n
\n"; - - ostream << sout.str(); - ostream << "" << endl << "" << endl; - - return 0; -} diff --git a/third_party/zstd/contrib/largeNbDicts/.gitignore b/third_party/zstd/contrib/largeNbDicts/.gitignore deleted file mode 100644 index e77c4e4..0000000 --- a/third_party/zstd/contrib/largeNbDicts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# build artifacts -largeNbDicts diff --git a/third_party/zstd/contrib/largeNbDicts/Makefile b/third_party/zstd/contrib/largeNbDicts/Makefile deleted file mode 100644 index 40734e6..0000000 --- a/third_party/zstd/contrib/largeNbDicts/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -PROGDIR = ../../programs -LIBDIR = ../../lib - -LIBZSTD = $(LIBDIR)/libzstd.a - -CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/common -I$(LIBDIR)/dictBuilder -I$(PROGDIR) - -CFLAGS ?= -O3 -CFLAGS += -std=gnu99 -DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum \ - -Wstrict-prototypes -Wundef -Wpointer-arith \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) - - -default: largeNbDicts - -all : largeNbDicts - -largeNbDicts: util.o timefn.o benchfn.o datagen.o xxhash.o largeNbDicts.c $(LIBZSTD) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -.PHONY: $(LIBZSTD) -$(LIBZSTD): - $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" - -benchfn.o: $(PROGDIR)/benchfn.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -timefn.o: $(PROGDIR)/timefn.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -datagen.o: $(PROGDIR)/datagen.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -util.o: $(PROGDIR)/util.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - - -xxhash.o : $(LIBDIR)/common/xxhash.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - - -clean: - $(RM) *.o - $(MAKE) -C $(LIBDIR) clean > /dev/null - $(RM) largeNbDicts diff --git a/third_party/zstd/contrib/largeNbDicts/README.md b/third_party/zstd/contrib/largeNbDicts/README.md deleted file mode 100644 index 010102c..0000000 --- a/third_party/zstd/contrib/largeNbDicts/README.md +++ /dev/null @@ -1,33 +0,0 @@ -largeNbDicts -===================== - -`largeNbDicts` is a benchmark test tool -dedicated to the specific scenario of -dictionary decompression using a very large number of dictionaries. -When dictionaries are constantly changing, they are always "cold", -suffering from increased latency due to cache misses. - -The tool is created in a bid to investigate performance for this scenario, -and experiment mitigation techniques. - -Command line : -``` -largeNbDicts [Options] filename(s) - -Options : --z : benchmark compression (default) --d : benchmark decompression --r : recursively load all files in subdirectories (default: off) --B# : split input into blocks of size # (default: no split) --# : use compression level # (default: 3) --D # : use # as a dictionary (default: create one) --i# : nb benchmark rounds (default: 6) ---nbBlocks=#: use # blocks for bench (default: one per file) ---nbDicts=# : create # dictionaries for bench (default: one per block) --h : help (this text) - -Advanced Options (see zstd.h for documentation) : ---dedicated-dict-search ---dict-content-type=# ---dict-attach-pref=# -``` diff --git a/third_party/zstd/contrib/largeNbDicts/largeNbDicts.c b/third_party/zstd/contrib/largeNbDicts/largeNbDicts.c deleted file mode 100644 index 6502f12..0000000 --- a/third_party/zstd/contrib/largeNbDicts/largeNbDicts.c +++ /dev/null @@ -1,1085 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* largeNbDicts - * This is a benchmark test tool - * dedicated to the specific case of dictionary decompression - * using a very large nb of dictionaries - * thus suffering latency from lots of cache misses. - * It's created in a bid to investigate performance and find optimizations. */ - - -/*--- Dependencies ---*/ - -#include /* size_t */ -#include /* malloc, free, abort, qsort*/ -#include /* fprintf */ -#include /* UINT_MAX */ -#include /* assert */ - -#include "util.h" -#include "benchfn.h" -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" -#include "zdict.h" - - -/*--- Constants --- */ - -#define KB *(1<<10) -#define MB *(1<<20) - -#define BLOCKSIZE_DEFAULT 0 /* no slicing into blocks */ -#define DICTSIZE (4 KB) -#define CLEVEL_DEFAULT 3 -#define DICT_LOAD_METHOD ZSTD_dlm_byCopy - -#define BENCH_TIME_DEFAULT_S 6 -#define RUN_TIME_DEFAULT_MS 1000 -#define BENCH_TIME_DEFAULT_MS (BENCH_TIME_DEFAULT_S * RUN_TIME_DEFAULT_MS) - -#define DISPLAY_LEVEL_DEFAULT 3 - -#define BENCH_SIZE_MAX (1200 MB) - - -/*--- Macros ---*/ - -#define CONTROL(c) { if (!(c)) abort(); } -#undef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - - -/*--- Display Macros ---*/ - -#define DISPLAY(...) fprintf(stdout, __VA_ARGS__) -#define DISPLAYLEVEL(l, ...) { if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); } } -static int g_displayLevel = DISPLAY_LEVEL_DEFAULT; /* 0 : no display, 1: errors, 2 : + result + interaction + warnings, 3 : + progression, 4 : + information */ - - -/*--- buffer_t ---*/ - -typedef struct { - void* ptr; - size_t size; - size_t capacity; -} buffer_t; - -static const buffer_t kBuffNull = { NULL, 0, 0 }; - -/* @return : kBuffNull if any error */ -static buffer_t createBuffer(size_t capacity) -{ - assert(capacity > 0); - void* const ptr = malloc(capacity); - if (ptr==NULL) return kBuffNull; - - buffer_t buffer; - buffer.ptr = ptr; - buffer.capacity = capacity; - buffer.size = 0; - return buffer; -} - -static void freeBuffer(buffer_t buff) -{ - free(buff.ptr); -} - - -static void fillBuffer_fromHandle(buffer_t* buff, FILE* f) -{ - size_t const readSize = fread(buff->ptr, 1, buff->capacity, f); - buff->size = readSize; -} - - -/* @return : kBuffNull if any error */ -static buffer_t createBuffer_fromFile(const char* fileName) -{ - U64 const fileSize = UTIL_getFileSize(fileName); - size_t const bufferSize = (size_t) fileSize; - - if (fileSize == UTIL_FILESIZE_UNKNOWN) return kBuffNull; - assert((U64)bufferSize == fileSize); /* check overflow */ - - { FILE* const f = fopen(fileName, "rb"); - if (f == NULL) return kBuffNull; - - buffer_t buff = createBuffer(bufferSize); - CONTROL(buff.ptr != NULL); - - fillBuffer_fromHandle(&buff, f); - CONTROL(buff.size == buff.capacity); - - fclose(f); /* do nothing specific if fclose() fails */ - return buff; - } -} - - -/* @return : kBuffNull if any error */ -static buffer_t -createDictionaryBuffer(const char* dictionaryName, - const void* srcBuffer, - const size_t* srcBlockSizes, size_t nbBlocks, - size_t requestedDictSize) -{ - if (dictionaryName) { - DISPLAYLEVEL(3, "loading dictionary %s \n", dictionaryName); - return createBuffer_fromFile(dictionaryName); /* note : result might be kBuffNull */ - - } else { - - DISPLAYLEVEL(3, "creating dictionary, of target size %u bytes \n", - (unsigned)requestedDictSize); - void* const dictBuffer = malloc(requestedDictSize); - CONTROL(dictBuffer != NULL); - - assert(nbBlocks <= UINT_MAX); - size_t const dictSize = ZDICT_trainFromBuffer(dictBuffer, requestedDictSize, - srcBuffer, - srcBlockSizes, (unsigned)nbBlocks); - CONTROL(!ZSTD_isError(dictSize)); - - buffer_t result; - result.ptr = dictBuffer; - result.capacity = requestedDictSize; - result.size = dictSize; - return result; - } -} - -/*! BMK_loadFiles() : - * Loads `buffer`, with content from files listed within `fileNamesTable`. - * Fills `buffer` entirely. - * @return : 0 on success, !=0 on error */ -static int loadFiles(void* buffer, size_t bufferSize, - size_t* fileSizes, - const char* const * fileNamesTable, unsigned nbFiles) -{ - size_t pos = 0, totalSize = 0; - - for (unsigned n=0; n 0); - void* const srcBuffer = malloc(loadedSize); - assert(srcBuffer != NULL); - - assert(nbFiles > 0); - size_t* const fileSizes = (size_t*)calloc(nbFiles, sizeof(*fileSizes)); - assert(fileSizes != NULL); - - /* Load input buffer */ - int const errorCode = loadFiles(srcBuffer, loadedSize, - fileSizes, - fileNamesTable, nbFiles); - assert(errorCode == 0); - - void** sliceTable = (void**)malloc(nbFiles * sizeof(*sliceTable)); - assert(sliceTable != NULL); - - char* const ptr = (char*)srcBuffer; - size_t pos = 0; - unsigned fileNb = 0; - for ( ; (pos < loadedSize) && (fileNb < nbFiles); fileNb++) { - sliceTable[fileNb] = ptr + pos; - pos += fileSizes[fileNb]; - } - assert(pos == loadedSize); - assert(fileNb == nbFiles); - - - buffer_t buffer; - buffer.ptr = srcBuffer; - buffer.capacity = loadedSize; - buffer.size = loadedSize; - - slice_collection_t slices; - slices.slicePtrs = sliceTable; - slices.capacities = fileSizes; - slices.nbSlices = nbFiles; - - buffer_collection_t bc; - bc.buffer = buffer; - bc.slices = slices; - return bc; -} - - - - -/*--- ddict_collection_t ---*/ - -typedef struct { - ZSTD_DDict** ddicts; - size_t nbDDict; -} ddict_collection_t; - -typedef struct { - ZSTD_CDict** cdicts; - size_t nbCDict; -} cdict_collection_t; - -static const cdict_collection_t kNullCDictCollection = { NULL, 0 }; - -static void freeCDictCollection(cdict_collection_t cdictc) -{ - for (size_t dictNb=0; dictNb < cdictc.nbCDict; dictNb++) { - ZSTD_freeCDict(cdictc.cdicts[dictNb]); - } - free(cdictc.cdicts); -} - -/* returns .buffers=NULL if operation fails */ -static cdict_collection_t createCDictCollection(const void* dictBuffer, size_t dictSize, size_t nbCDict, ZSTD_dictContentType_e dictContentType, ZSTD_CCtx_params* cctxParams) -{ - ZSTD_CDict** const cdicts = malloc(nbCDict * sizeof(ZSTD_CDict*)); - if (cdicts==NULL) return kNullCDictCollection; - for (size_t dictNb=0; dictNb < nbCDict; dictNb++) { - cdicts[dictNb] = ZSTD_createCDict_advanced2(dictBuffer, dictSize, DICT_LOAD_METHOD, dictContentType, cctxParams, ZSTD_defaultCMem); - CONTROL(cdicts[dictNb] != NULL); - } - cdict_collection_t cdictc; - cdictc.cdicts = cdicts; - cdictc.nbCDict = nbCDict; - return cdictc; -} - -static const ddict_collection_t kNullDDictCollection = { NULL, 0 }; - -static void freeDDictCollection(ddict_collection_t ddictc) -{ - for (size_t dictNb=0; dictNb < ddictc.nbDDict; dictNb++) { - ZSTD_freeDDict(ddictc.ddicts[dictNb]); - } - free(ddictc.ddicts); -} - -/* returns .buffers=NULL if operation fails */ -static ddict_collection_t createDDictCollection(const void* dictBuffer, size_t dictSize, size_t nbDDict) -{ - ZSTD_DDict** const ddicts = malloc(nbDDict * sizeof(ZSTD_DDict*)); - assert(ddicts != NULL); - if (ddicts==NULL) return kNullDDictCollection; - for (size_t dictNb=0; dictNb < nbDDict; dictNb++) { - ddicts[dictNb] = ZSTD_createDDict(dictBuffer, dictSize); - assert(ddicts[dictNb] != NULL); - } - ddict_collection_t ddictc; - ddictc.ddicts = ddicts; - ddictc.nbDDict = nbDDict; - return ddictc; -} - - -/* mess with addresses, so that linear scanning dictionaries != linear address scanning */ -void shuffleCDictionaries(cdict_collection_t dicts) -{ - size_t const nbDicts = dicts.nbCDict; - for (size_t r=0; rcctx, ci->dictionaries.cdicts[ci->dictNb]); - ZSTD_compress2(ci->cctx, - dst, srcSize, - src, srcSize); - - ci->dictNb = ci->dictNb + 1; - if (ci->dictNb >= ci->nbDicts) ci->dictNb = 0; - - return srcSize; -} - -/* benched function */ -size_t decompress(const void* src, size_t srcSize, void* dst, size_t dstCapacity, void* payload) -{ - decompressInstructions* const di = (decompressInstructions*) payload; - - size_t const result = ZSTD_decompress_usingDDict(di->dctx, - dst, dstCapacity, - src, srcSize, - di->dictionaries.ddicts[di->dictNb]); - - di->dictNb = di->dictNb + 1; - if (di->dictNb >= di->nbDicts) di->dictNb = 0; - - return result; -} - -typedef enum { - fastest = 0, - median = 1, -} metricAggregatePref_e; - -/* compareFunction() : - * Sort input in decreasing order when used with qsort() */ -int compareFunction(const void *a, const void *b) -{ - double x = *(const double *)a; - double y = *(const double *)b; - if (x < y) - return 1; - else if (x > y) - return -1; - return 0; -} - -double aggregateData(double *data, size_t size, - metricAggregatePref_e metricAggregatePref) -{ - qsort(data, size, sizeof(*data), compareFunction); - if (metricAggregatePref == fastest) - return data[0]; - else /* median */ - return (data[(size - 1) / 2] + data[size / 2]) / 2; -} - -static int benchMem(slice_collection_t dstBlocks, slice_collection_t srcBlocks, - ddict_collection_t ddictionaries, - cdict_collection_t cdictionaries, unsigned nbRounds, - int benchCompression, const char *exeName, - ZSTD_CCtx_params *cctxParams, - metricAggregatePref_e metricAggregatePref) -{ - assert(dstBlocks.nbSlices == srcBlocks.nbSlices); - if (benchCompression) assert(cctxParams); - - unsigned const ms_per_round = RUN_TIME_DEFAULT_MS; - unsigned const total_time_ms = nbRounds * ms_per_round; - - double *const speedPerRound = (double *)malloc(nbRounds * sizeof(double)); - - BMK_timedFnState_t* const benchState = - BMK_createTimedFnState(total_time_ms, ms_per_round); - - decompressInstructions di = createDecompressInstructions(ddictionaries); - compressInstructions ci = - createCompressInstructions(cdictionaries, cctxParams); - void* payload = benchCompression ? (void*)&ci : (void*)&di; - BMK_benchParams_t const bp = { - .benchFn = benchCompression ? compress : decompress, - .benchPayload = payload, - .initFn = NULL, - .initPayload = NULL, - .errorFn = ZSTD_isError, - .blockCount = dstBlocks.nbSlices, - .srcBuffers = (const void* const*) srcBlocks.slicePtrs, - .srcSizes = srcBlocks.capacities, - .dstBuffers = dstBlocks.slicePtrs, - .dstCapacities = dstBlocks.capacities, - .blockResults = NULL - }; - - size_t roundNb = 0; - for (;;) { - BMK_runOutcome_t const outcome = BMK_benchTimedFn(benchState, bp); - CONTROL(BMK_isSuccessful_runOutcome(outcome)); - - BMK_runTime_t const result = BMK_extract_runTime(outcome); - double const dTime_ns = result.nanoSecPerRun; - double const dTime_sec = (double)dTime_ns / 1000000000; - size_t const srcSize = result.sumOfReturn; - double const speed_MBps = (double)srcSize / dTime_sec / (1 MB); - speedPerRound[roundNb] = speed_MBps; - if (benchCompression) - DISPLAY("Compression Speed : %.1f MB/s \r", speed_MBps); - else - DISPLAY("Decompression Speed : %.1f MB/s \r", speed_MBps); - - fflush(stdout); - if (BMK_isCompleted_TimedFn(benchState)) break; - roundNb++; - } - DISPLAY("\n"); - /* BMK_benchTimedFn may not run exactly nbRounds iterations */ - double speedAggregated = - aggregateData(speedPerRound, roundNb + 1, metricAggregatePref); - if (metricAggregatePref == fastest) - DISPLAY("Fastest Speed : %.1f MB/s \n", speedAggregated); - else - DISPLAY("Median Speed : %.1f MB/s \n", speedAggregated); - - char* csvFileName = malloc(strlen(exeName) + 5); - strcpy(csvFileName, exeName); - strcat(csvFileName, ".csv"); - FILE* csvFile = fopen(csvFileName, "r"); - if (!csvFile) { - csvFile = fopen(csvFileName, "wt"); - assert(csvFile); - fprintf(csvFile, "%s\n", exeName); - /* Print table headers */ - fprintf( - csvFile, - "Compression/Decompression,Level,nbDicts,dictAttachPref,metricAggregatePref,Speed\n"); - } else { - fclose(csvFile); - csvFile = fopen(csvFileName, "at"); - assert(csvFile); - } - - int cLevel = -1; - int dictAttachPref = -1; - if (benchCompression) { - ZSTD_CCtxParams_getParameter(cctxParams, ZSTD_c_compressionLevel, - &cLevel); - ZSTD_CCtxParams_getParameter(cctxParams, ZSTD_c_forceAttachDict, - &dictAttachPref); - } - fprintf(csvFile, "%s,%d,%ld,%d,%d,%.1f\n", - benchCompression ? "Compression" : "Decompression", cLevel, - benchCompression ? ci.nbDicts : di.nbDicts, dictAttachPref, - metricAggregatePref, speedAggregated); - fclose(csvFile); - free(csvFileName); - - freeDecompressInstructions(di); - freeCompressInstructions(ci); - BMK_freeTimedFnState(benchState); - - return 0; /* success */ -} - - -/*! bench() : - * fileName : file to load for benchmarking purpose - * dictionary : optional (can be NULL), file to load as dictionary, - * if none provided : will be calculated on the fly by the program. - * @return : 0 is success, 1+ otherwise */ -int bench(const char **fileNameTable, unsigned nbFiles, const char *dictionary, - size_t blockSize, int clevel, unsigned nbDictMax, unsigned nbBlocks, - unsigned nbRounds, int benchCompression, - ZSTD_dictContentType_e dictContentType, ZSTD_CCtx_params *cctxParams, - const char *exeName, metricAggregatePref_e metricAggregatePref) -{ - int result = 0; - - DISPLAYLEVEL(3, "loading %u files... \n", nbFiles); - buffer_collection_t const srcs = createBufferCollection_fromFiles(fileNameTable, nbFiles); - CONTROL(srcs.buffer.ptr != NULL); - buffer_t srcBuffer = srcs.buffer; - size_t const srcSize = srcBuffer.size; - DISPLAYLEVEL(3, "created src buffer of size %.1f MB \n", - (double)srcSize / (1 MB)); - - slice_collection_t const srcSlices = splitSlices(srcs.slices, blockSize, nbBlocks); - nbBlocks = (unsigned)(srcSlices.nbSlices); - DISPLAYLEVEL(3, "split input into %u blocks ", nbBlocks); - if (blockSize) - DISPLAYLEVEL(3, "of max size %u bytes ", (unsigned)blockSize); - DISPLAYLEVEL(3, "\n"); - size_t const totalSrcSlicesSize = sliceCollection_totalCapacity(srcSlices); - - - size_t* const dstCapacities = malloc(nbBlocks * sizeof(*dstCapacities)); - CONTROL(dstCapacities != NULL); - size_t dstBufferCapacity = 0; - for (size_t bnb=0; bnb='0') && (**stringPtr <='9')) { - unsigned const max = (((unsigned)(-1)) / 10) - 1; - assert(result <= max); /* check overflow */ - result *= 10, result += (unsigned)**stringPtr - '0', (*stringPtr)++ ; - } - if ((**stringPtr=='K') || (**stringPtr=='M')) { - unsigned const maxK = ((unsigned)(-1)) >> 10; - assert(result <= maxK); /* check overflow */ - result <<= 10; - if (**stringPtr=='M') { - assert(result <= maxK); /* check overflow */ - result <<= 10; - } - (*stringPtr)++; /* skip `K` or `M` */ - if (**stringPtr=='i') (*stringPtr)++; - if (**stringPtr=='B') (*stringPtr)++; - } - return result; -} - -/** longCommandWArg() : - * check if *stringPtr is the same as longCommand. - * If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand. - * @return 0 and doesn't modify *stringPtr otherwise. - */ -static int longCommandWArg(const char** stringPtr, const char* longCommand) -{ - size_t const comSize = strlen(longCommand); - int const result = !strncmp(*stringPtr, longCommand, comSize); - if (result) *stringPtr += comSize; - return result; -} - - -int usage(const char* exeName) -{ - DISPLAY (" \n"); - DISPLAY (" %s [Options] filename(s) \n", exeName); - DISPLAY (" \n"); - DISPLAY ("Options : \n"); - DISPLAY ("-z : benchmark compression (default) \n"); - DISPLAY ("-d : benchmark decompression \n"); - DISPLAY ("-r : recursively load all files in subdirectories (default: off) \n"); - DISPLAY ("-B# : split input into blocks of size # (default: no split) \n"); - DISPLAY ("-# : use compression level # (default: %u) \n", CLEVEL_DEFAULT); - DISPLAY ("-D # : use # as a dictionary (default: create one) \n"); - DISPLAY ("-i# : nb benchmark rounds (default: %u) \n", BENCH_TIME_DEFAULT_S); - DISPLAY ("-p# : print speed for all rounds 0=fastest 1=median (default: 0) \n"); - DISPLAY ("--nbBlocks=#: use # blocks for bench (default: one per file) \n"); - DISPLAY ("--nbDicts=# : create # dictionaries for bench (default: one per block) \n"); - DISPLAY ("-h : help (this text) \n"); - DISPLAY (" \n"); - DISPLAY ("Advanced Options (see zstd.h for documentation) : \n"); - DISPLAY ("--dedicated-dict-search\n"); - DISPLAY ("--dict-content-type=#\n"); - DISPLAY ("--dict-attach-pref=#\n"); - return 0; -} - -int bad_usage(const char* exeName) -{ - DISPLAY (" bad usage : \n"); - usage(exeName); - return 1; -} - -int main (int argc, const char** argv) -{ - int recursiveMode = 0; - int benchCompression = 1; - int dedicatedDictSearch = 0; - unsigned nbRounds = BENCH_TIME_DEFAULT_S; - const char* const exeName = argv[0]; - - if (argc < 2) return bad_usage(exeName); - - const char** nameTable = (const char**)malloc((size_t)argc * sizeof(const char*)); - assert(nameTable != NULL); - unsigned nameIdx = 0; - - const char* dictionary = NULL; - int cLevel = CLEVEL_DEFAULT; - size_t blockSize = BLOCKSIZE_DEFAULT; - unsigned nbDicts = 0; /* determine nbDicts automatically: 1 dictionary per block */ - unsigned nbBlocks = 0; /* determine nbBlocks automatically, from source and blockSize */ - ZSTD_dictContentType_e dictContentType = ZSTD_dct_auto; - ZSTD_dictAttachPref_e dictAttachPref = ZSTD_dictDefaultAttach; - ZSTD_ParamSwitch_e prefetchCDictTables = ZSTD_ps_auto; - metricAggregatePref_e metricAggregatePref = fastest; - - for (int argNb = 1; argNb < argc ; argNb++) { - const char* argument = argv[argNb]; - if (!strcmp(argument, "-h")) { free(nameTable); return usage(exeName); } - if (!strcmp(argument, "-d")) { benchCompression = 0; continue; } - if (!strcmp(argument, "-z")) { benchCompression = 1; continue; } - if (!strcmp(argument, "-r")) { recursiveMode = 1; continue; } - if (!strcmp(argument, "-D")) { argNb++; assert(argNb < argc); dictionary = argv[argNb]; continue; } - if (longCommandWArg(&argument, "-i")) { nbRounds = readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "-p")) { metricAggregatePref = (int)readU32FromChar(&argument); continue;} - if (longCommandWArg(&argument, "--dictionary=")) { dictionary = argument; continue; } - if (longCommandWArg(&argument, "-B")) { blockSize = readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--blockSize=")) { blockSize = readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--nbDicts=")) { nbDicts = readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--nbBlocks=")) { nbBlocks = readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--clevel=")) { cLevel = (int)readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--dedicated-dict-search")) { dedicatedDictSearch = 1; continue; } - if (longCommandWArg(&argument, "--dict-content-type=")) { dictContentType = (int)readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--dict-attach-pref=")) { dictAttachPref = (int)readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "--prefetch-cdict-tables=")) { prefetchCDictTables = (int)readU32FromChar(&argument); continue; } - if (longCommandWArg(&argument, "-")) { cLevel = (int)readU32FromChar(&argument); continue; } - /* anything that's not a command is a filename */ - nameTable[nameIdx++] = argument; - } - - FileNamesTable* filenameTable; - - if (recursiveMode) { -#ifndef UTIL_HAS_CREATEFILELIST - assert(0); /* missing capability, do not run */ -#endif - filenameTable = UTIL_createExpandedFNT(nameTable, nameIdx, 1 /* follow_links */); - } else { - filenameTable = UTIL_assembleFileNamesTable(nameTable, nameIdx, NULL); - nameTable = NULL; /* UTIL_createFileNamesTable() takes ownership of nameTable */ - } - - ZSTD_CCtx_params* cctxParams = ZSTD_createCCtxParams(); - ZSTD_CCtxParams_init(cctxParams, cLevel); - ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_enableDedicatedDictSearch, dedicatedDictSearch); - ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_nbWorkers, 0); - ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_forceAttachDict, dictAttachPref); - ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_prefetchCDictTables, prefetchCDictTables); - - int result = - bench(filenameTable->fileNames, (unsigned)filenameTable->tableSize, - dictionary, blockSize, cLevel, nbDicts, nbBlocks, nbRounds, - benchCompression, dictContentType, cctxParams, exeName, - metricAggregatePref); - - UTIL_freeFileNamesTable(filenameTable); - free(nameTable); - ZSTD_freeCCtxParams(cctxParams); - - return result; -} diff --git a/third_party/zstd/contrib/linux-kernel/.gitignore b/third_party/zstd/contrib/linux-kernel/.gitignore deleted file mode 100644 index d8dfeef..0000000 --- a/third_party/zstd/contrib/linux-kernel/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -!lib/zstd -!lib/zstd/* -*.o -*.a diff --git a/third_party/zstd/contrib/linux-kernel/Makefile b/third_party/zstd/contrib/linux-kernel/Makefile deleted file mode 100644 index 63dd15d..0000000 --- a/third_party/zstd/contrib/linux-kernel/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -.PHONY: libzstd -libzstd: - rm -rf linux - mkdir -p linux - mkdir -p linux/include/linux - mkdir -p linux/lib/zstd - ../freestanding_lib/freestanding.py \ - --source-lib ../../lib \ - --output-lib linux/lib/zstd \ - --xxhash '' \ - --xxh64-state 'struct xxh64_state' \ - --xxh64-prefix 'xxh64' \ - --rewrite-include '=' \ - --rewrite-include '=' \ - --rewrite-include '"\.\./zstd.h"=' \ - --rewrite-include '"(\.\./)?zstd_errors.h"=' \ - --sed 's,/\*\*\*,/* *,g' \ - --sed 's,/\*\*,/*,g' \ - --spdx \ - -DZSTD_NO_INTRINSICS \ - -DZSTD_NO_UNUSED_FUNCTIONS \ - -DZSTD_LEGACY_SUPPORT=0 \ - -DZSTD_STATIC_LINKING_ONLY \ - -DFSE_STATIC_LINKING_ONLY \ - -DXXH_STATIC_LINKING_ONLY \ - -D__GNUC__ \ - -D__linux__=1 \ - -DSTATIC_BMI2=0 \ - -DZSTD_ADDRESS_SANITIZER=0 \ - -DZSTD_MEMORY_SANITIZER=0 \ - -DZSTD_DATAFLOW_SANITIZER=0 \ - -DZSTD_COMPRESS_HEAPMODE=1 \ - -UNO_PREFETCH \ - -U__cplusplus \ - -UZSTD_DLL_EXPORT \ - -UZSTD_DLL_IMPORT \ - -U__ICCARM__ \ - -UZSTD_MULTITHREAD \ - -U_MSC_VER \ - -U_WIN32 \ - -RZSTDLIB_VISIBLE= \ - -RZSTDERRORLIB_VISIBLE= \ - -RZSTD_FALLTHROUGH=fallthrough \ - -DZSTD_HAVE_WEAK_SYMBOLS=0 \ - -DZSTD_TRACE=0 \ - -DZSTD_NO_TRACE \ - -DZSTD_DISABLE_ASM \ - -DZSTD_LINUX_KERNEL - rm linux/lib/zstd/decompress/huf_decompress_amd64.S - mv linux/lib/zstd/zstd.h linux/include/linux/zstd_lib.h - mv linux/lib/zstd/zstd_errors.h linux/include/linux/ - cp linux_zstd.h linux/include/linux/zstd.h - cp zstd_common_module.c linux/lib/zstd - cp zstd_compress_module.c linux/lib/zstd - cp zstd_decompress_module.c linux/lib/zstd - cp decompress_sources.h linux/lib/zstd - cp linux.mk linux/lib/zstd/Makefile - -LINUX ?= $(HOME)/repos/linux - -.PHONY: import -import: libzstd - rm -f $(LINUX)/include/linux/zstd.h - rm -f $(LINUX)/include/linux/zstd_errors.h - rm -rf $(LINUX)/lib/zstd - cp linux/include/linux/zstd.h $(LINUX)/include/linux - cp linux/include/linux/zstd_lib.h $(LINUX)/include/linux - cp linux/include/linux/zstd_errors.h $(LINUX)/include/linux - cp -r linux/lib/zstd $(LINUX)/lib - -import-upstream: - rm -rf $(LINUX)/lib/zstd - mkdir $(LINUX)/lib/zstd - cp ../../lib/zstd.h $(LINUX)/include/linux/zstd_lib.h - cp -r ../../lib/common $(LINUX)/lib/zstd - cp -r ../../lib/compress $(LINUX)/lib/zstd - cp -r ../../lib/decompress $(LINUX)/lib/zstd - mv $(LINUX)/lib/zstd/zstd_errors.h $(LINUX)/include/linux - rm $(LINUX)/lib/zstd/common/threading.* - rm $(LINUX)/lib/zstd/common/pool.* - rm $(LINUX)/lib/zstd/common/xxhash.* - rm $(LINUX)/lib/zstd/compress/zstdmt_* - -DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wpointer-arith \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -Wmissing-prototypes -Wc++-compat \ - -Wimplicit-fallthrough - -.PHONY: test -test: libzstd - $(MAKE) -C test run-test CFLAGS="-O3 $(CFLAGS) $(DEBUGFLAGS) -Werror" -j - -.PHONY: clean -clean: - $(RM) -rf linux - $(MAKE) -C test clean diff --git a/third_party/zstd/contrib/linux-kernel/README.md b/third_party/zstd/contrib/linux-kernel/README.md deleted file mode 100644 index bfa070d..0000000 --- a/third_party/zstd/contrib/linux-kernel/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Zstd in the Linux Kernel - -This directory contains the scripts needed to transform upstream zstd into the version imported into the kernel. All the transforms are automated and tested by our continuous integration. - -## Upgrading Zstd in the Linux Kernel - -1. `cd` into this directory. -2. Run `make libzstd` and read the output. Make sure that all the diffs printed and changes made by the script are correct. -3. Run `make test` and ensure that it passes. -4. Import zstd into the Linux Kernel `make import LINUX=/path/to/linux/repo` -5. Inspect the diff for sanity. -6. Check the Linux Kernel history for zstd. If any patches were made to the kernel version of zstd, but not to upstream zstd, then port them upstream if necessary. -7. Test the diff. Benchmark if necessary. Make sure to test multiple architectures: At least x86, i386, and arm. -8. Submit the patch to the LKML. diff --git a/third_party/zstd/contrib/linux-kernel/btrfs-benchmark.sh b/third_party/zstd/contrib/linux-kernel/btrfs-benchmark.sh deleted file mode 100644 index 5e28da9..0000000 --- a/third_party/zstd/contrib/linux-kernel/btrfs-benchmark.sh +++ /dev/null @@ -1,104 +0,0 @@ -# !/bin/sh -set -e - -# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. -# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and -# 16 GB of RAM and an SSD. - -# silesia is a directory that can be downloaded from -# http://mattmahoney.net/dc/silesia.html -# ls -l silesia/ -# total 203M -# -rwxr-xr-x 1 terrelln 9.8M Apr 12 2002 dickens -# -rwxr-xr-x 1 terrelln 49M May 31 2002 mozilla -# -rwxr-xr-x 1 terrelln 9.6M Mar 20 2003 mr -# -rwxr-xr-x 1 terrelln 32M Apr 2 2002 nci -# -rwxr-xr-x 1 terrelln 5.9M Jul 4 2002 ooffice -# -rwxr-xr-x 1 terrelln 9.7M Apr 11 2002 osdb -# -rwxr-xr-x 1 terrelln 6.4M Apr 2 2002 reymont -# -rwxr-xr-x 1 terrelln 21M Mar 25 2002 samba -# -rwxr-xr-x 1 terrelln 7.0M Mar 24 2002 sao -# -rwxr-xr-x 1 terrelln 40M Mar 25 2002 webster -# -rwxr-xr-x 1 terrelln 8.1M Apr 4 2002 x-ray -# -rwxr-xr-x 1 terrelln 5.1M Nov 30 2000 xml - -# $HOME is on a ext4 filesystem -BENCHMARK_DIR="$HOME/silesia/" -N=10 - -# Normalize the environment -sudo umount /mnt/btrfs 2> /dev/null > /dev/null || true -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs -sudo rm -rf /mnt/btrfs/* -sync -sudo umount /mnt/btrfs -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs - -# Run the benchmark -echo "Compression" -time sh -c "for i in \$(seq $N); do sudo cp -r $BENCHMARK_DIR /mnt/btrfs/\$i; done; sync" - -echo "Approximate compression ratio" -printf "%d / %d\n" \ - $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ - $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); - -# Unmount and remount to avoid any caching -sudo umount /mnt/btrfs -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs - -echo "Decompression" -time sudo tar -c /mnt/btrfs 2> /dev/null | wc -c > /dev/null - -sudo rm -rf /mnt/btrfs/* -sudo umount /mnt/btrfs - -# Run for each of -o compress-force={none, lzo, zlib, zstd} 5 times and take the -# min time and ratio. -# Ran zstd with compression levels {1, 3, 6, 9, 12, 15}. -# Original size: 2119415342 B (using du /mnt/btrfs) - -# none -# compress: 4.205 s -# decompress: 3.090 s -# ratio: 0.99 - -# lzo -# compress: 5.328 s -# decompress: 4.793 s -# ratio: 1.66 - -# zlib -# compress: 32.588 s -# decompress: 8.791 s -# ratio : 2.58 - -# zstd 1 -# compress: 8.147 s -# decompress: 5.527 s -# ratio : 2.57 - -# zstd 3 -# compress: 12.207 s -# decompress: 5.195 s -# ratio : 2.71 - -# zstd 6 -# compress: 30.253 s -# decompress: 5.324 s -# ratio : 2.87 - -# zstd 9 -# compress: 49.659 s -# decompress: 5.220 s -# ratio : 2.92 - -# zstd 12 -# compress: 99.245 s -# decompress: 5.193 s -# ratio : 2.93 - -# zstd 15 -# compress: 196.997 s -# decompress: 5.992 s -# ratio : 3.01 diff --git a/third_party/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh b/third_party/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh deleted file mode 100644 index 69721d0..0000000 --- a/third_party/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh +++ /dev/null @@ -1,99 +0,0 @@ -# !/bin/sh -set -e - -# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. -# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and -# 16 GB of RAM and an SSD. - -# silesia is a directory that can be downloaded from -# http://mattmahoney.net/dc/silesia.html -# ls -l silesia/ -# total 203M -# -rwxr-xr-x 1 terrelln 9.8M Apr 12 2002 dickens -# -rwxr-xr-x 1 terrelln 49M May 31 2002 mozilla -# -rwxr-xr-x 1 terrelln 9.6M Mar 20 2003 mr -# -rwxr-xr-x 1 terrelln 32M Apr 2 2002 nci -# -rwxr-xr-x 1 terrelln 5.9M Jul 4 2002 ooffice -# -rwxr-xr-x 1 terrelln 9.7M Apr 11 2002 osdb -# -rwxr-xr-x 1 terrelln 6.4M Apr 2 2002 reymont -# -rwxr-xr-x 1 terrelln 21M Mar 25 2002 samba -# -rwxr-xr-x 1 terrelln 7.0M Mar 24 2002 sao -# -rwxr-xr-x 1 terrelln 40M Mar 25 2002 webster -# -rwxr-xr-x 1 terrelln 8.1M Apr 4 2002 x-ray -# -rwxr-xr-x 1 terrelln 5.1M Nov 30 2000 xml - -# $HOME is on a ext4 filesystem -BENCHMARK_FILE="linux-4.11.6.tar" -BENCHMARK_DIR="$HOME/$BENCHMARK_FILE" - -# Normalize the environment -sudo umount /mnt/btrfs 2> /dev/null > /dev/null || true -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs -sudo rm -rf /mnt/btrfs/* -sync -sudo umount /mnt/btrfs -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs - -# Run the benchmark -echo "Copy" -time sh -c "sudo cp -r $BENCHMARK_DIR /mnt/btrfs/$BENCHMARK_FILE && sync" - -echo "Approximate tarred compression ratio" -printf "%d / %d\n" \ - $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ - $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); - -# Unmount and remount to avoid any caching -sudo umount /mnt/btrfs -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs - -echo "Extract" -time sh -c "sudo tar -C /mnt/btrfs -xf /mnt/btrfs/$BENCHMARK_FILE && sync" - -# Remove the tarball, leaving only the extracted data -sudo rm /mnt/btrfs/$BENCHMARK_FILE -# Unmount and remount to avoid any caching -sudo umount /mnt/btrfs -sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs - -echo "Approximate extracted compression ratio" -printf "%d / %d\n" \ - $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ - $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); - -echo "Read" -time sudo tar -c /mnt/btrfs 2> /dev/null | wc -c > /dev/null - -sudo rm -rf /mnt/btrfs/* -sudo umount /mnt/btrfs - -# Run for each of -o compress-force={none, lzo, zlib, zstd} 5 times and take the -# min time and ratio. - -# none -# copy: 0.981 s -# extract: 5.501 s -# read: 8.807 s -# tarball ratio: 0.97 -# extracted ratio: 0.78 - -# lzo -# copy: 1.631 s -# extract: 8.458 s -# read: 8.585 s -# tarball ratio: 2.06 -# extracted ratio: 1.38 - -# zlib -# copy: 7.750 s -# extract: 21.544 s -# read: 11.744 s -# tarball ratio : 3.40 -# extracted ratio: 1.86 - -# zstd 1 -# copy: 2.579 s -# extract: 11.479 s -# read: 9.389 s -# tarball ratio : 3.57 -# extracted ratio: 1.85 diff --git a/third_party/zstd/contrib/linux-kernel/decompress_sources.h b/third_party/zstd/contrib/linux-kernel/decompress_sources.h deleted file mode 100644 index 8a47eb2..0000000 --- a/third_party/zstd/contrib/linux-kernel/decompress_sources.h +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* - * This file includes every .c file needed for decompression. - * It is used by lib/decompress_unzstd.c to include the decompression - * source into the translation-unit, so it can be used for kernel - * decompression. - */ - -/* - * Disable the ASM Huffman implementation because we need to - * include all the sources. - */ -#define ZSTD_DISABLE_ASM 1 - -#include "common/debug.c" -#include "common/entropy_common.c" -#include "common/error_private.c" -#include "common/fse_decompress.c" -#include "common/zstd_common.c" -#include "decompress/huf_decompress.c" -#include "decompress/zstd_ddict.c" -#include "decompress/zstd_decompress.c" -#include "decompress/zstd_decompress_block.c" -#include "zstd_decompress_module.c" diff --git a/third_party/zstd/contrib/linux-kernel/linux.mk b/third_party/zstd/contrib/linux-kernel/linux.mk deleted file mode 100644 index be218b5..0000000 --- a/third_party/zstd/contrib/linux-kernel/linux.mk +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ -obj-$(CONFIG_ZSTD_COMPRESS) += zstd_compress.o -obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o -obj-$(CONFIG_ZSTD_COMMON) += zstd_common.o - -zstd_compress-y := \ - zstd_compress_module.o \ - compress/fse_compress.o \ - compress/hist.o \ - compress/huf_compress.o \ - compress/zstd_compress.o \ - compress/zstd_compress_literals.o \ - compress/zstd_compress_sequences.o \ - compress/zstd_compress_superblock.o \ - compress/zstd_double_fast.o \ - compress/zstd_fast.o \ - compress/zstd_lazy.o \ - compress/zstd_ldm.o \ - compress/zstd_opt.o \ - compress/zstd_preSplit.o \ - -zstd_decompress-y := \ - zstd_decompress_module.o \ - decompress/huf_decompress.o \ - decompress/zstd_ddict.o \ - decompress/zstd_decompress.o \ - decompress/zstd_decompress_block.o \ - -zstd_common-y := \ - zstd_common_module.o \ - common/debug.o \ - common/entropy_common.o \ - common/error_private.o \ - common/fse_decompress.o \ - common/zstd_common.o \ diff --git a/third_party/zstd/contrib/linux-kernel/linux_zstd.h b/third_party/zstd/contrib/linux-kernel/linux_zstd.h deleted file mode 100644 index dda8a2d..0000000 --- a/third_party/zstd/contrib/linux-kernel/linux_zstd.h +++ /dev/null @@ -1,525 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of https://github.com/facebook/zstd) and - * the GPLv2 (found in the COPYING file in the root directory of - * https://github.com/facebook/zstd). You may select, at your option, one of the - * above-listed licenses. - */ - -#ifndef LINUX_ZSTD_H -#define LINUX_ZSTD_H - -/** - * This is a kernel-style API that wraps the upstream zstd API, which cannot be - * used directly because the symbols aren't exported. It exposes the minimal - * functionality which is currently required by users of zstd in the kernel. - * Expose extra functions from lib/zstd/zstd.h as needed. - */ - -/* ====== Dependency ====== */ -#include -#include -#include - -/* ====== Helper Functions ====== */ -/** - * zstd_compress_bound() - maximum compressed size in worst case scenario - * @src_size: The size of the data to compress. - * - * Return: The maximum compressed size in the worst case scenario. - */ -size_t zstd_compress_bound(size_t src_size); - -/** - * zstd_is_error() - tells if a size_t function result is an error code - * @code: The function result to check for error. - * - * Return: Non-zero iff the code is an error. - */ -unsigned int zstd_is_error(size_t code); - -/** - * enum zstd_error_code - zstd error codes - */ -typedef ZSTD_ErrorCode zstd_error_code; - -/** - * zstd_get_error_code() - translates an error function result to an error code - * @code: The function result for which zstd_is_error(code) is true. - * - * Return: A unique error code for this error. - */ -zstd_error_code zstd_get_error_code(size_t code); - -/** - * zstd_get_error_name() - translates an error function result to a string - * @code: The function result for which zstd_is_error(code) is true. - * - * Return: An error string corresponding to the error code. - */ -const char *zstd_get_error_name(size_t code); - -/** - * zstd_min_clevel() - minimum allowed compression level - * - * Return: The minimum allowed compression level. - */ -int zstd_min_clevel(void); - -/** - * zstd_max_clevel() - maximum allowed compression level - * - * Return: The maximum allowed compression level. - */ -int zstd_max_clevel(void); - -/* ====== Parameter Selection ====== */ - -/** - * enum zstd_strategy - zstd compression search strategy - * - * From faster to stronger. See zstd_lib.h. - */ -typedef ZSTD_strategy zstd_strategy; - -/** - * struct zstd_compression_parameters - zstd compression parameters - * @windowLog: Log of the largest match distance. Larger means more - * compression, and more memory needed during decompression. - * @chainLog: Fully searched segment. Larger means more compression, - * slower, and more memory (useless for fast). - * @hashLog: Dispatch table. Larger means more compression, - * slower, and more memory. - * @searchLog: Number of searches. Larger means more compression and slower. - * @searchLength: Match length searched. Larger means faster decompression, - * sometimes less compression. - * @targetLength: Acceptable match size for optimal parser (only). Larger means - * more compression, and slower. - * @strategy: The zstd compression strategy. - * - * See zstd_lib.h. - */ -typedef ZSTD_compressionParameters zstd_compression_parameters; - -/** - * struct zstd_frame_parameters - zstd frame parameters - * @contentSizeFlag: Controls whether content size will be present in the - * frame header (when known). - * @checksumFlag: Controls whether a 32-bit checksum is generated at the - * end of the frame for error detection. - * @noDictIDFlag: Controls whether dictID will be saved into the frame - * header when using dictionary compression. - * - * The default value is all fields set to 0. See zstd_lib.h. - */ -typedef ZSTD_frameParameters zstd_frame_parameters; - -/** - * struct zstd_parameters - zstd parameters - * @cParams: The compression parameters. - * @fParams: The frame parameters. - */ -typedef ZSTD_parameters zstd_parameters; - -/** - * zstd_get_params() - returns zstd_parameters for selected level - * @level: The compression level - * @estimated_src_size: The estimated source size to compress or 0 - * if unknown. - * - * Return: The selected zstd_parameters. - */ -zstd_parameters zstd_get_params(int level, - unsigned long long estimated_src_size); - -typedef ZSTD_CCtx zstd_cctx; -typedef ZSTD_cParameter zstd_cparameter; - -/** - * zstd_cctx_set_param() - sets a compression parameter - * @cctx: The context. Must have been initialized with zstd_init_cctx(). - * @param: The parameter to set. - * @value: The value to set the parameter to. - * - * Return: Zero or an error, which can be checked using zstd_is_error(). - */ -size_t zstd_cctx_set_param(zstd_cctx *cctx, zstd_cparameter param, int value); - -/* ====== Single-pass Compression ====== */ - -/** - * zstd_cctx_workspace_bound() - max memory needed to initialize a zstd_cctx - * @parameters: The compression parameters to be used. - * - * If multiple compression parameters might be used, the caller must call - * zstd_cctx_workspace_bound() for each set of parameters and use the maximum - * size. - * - * Return: A lower bound on the size of the workspace that is passed to - * zstd_init_cctx(). - */ -size_t zstd_cctx_workspace_bound(const zstd_compression_parameters *parameters); - -/** - * zstd_cctx_workspace_bound_with_ext_seq_prod() - max memory needed to - * initialize a zstd_cctx when using the block-level external sequence - * producer API. - * @parameters: The compression parameters to be used. - * - * If multiple compression parameters might be used, the caller must call - * this function for each set of parameters and use the maximum size. - * - * Return: A lower bound on the size of the workspace that is passed to - * zstd_init_cctx(). - */ -size_t zstd_cctx_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *parameters); - -/** - * zstd_init_cctx() - initialize a zstd compression context - * @workspace: The workspace to emplace the context into. It must outlive - * the returned context. - * @workspace_size: The size of workspace. Use zstd_cctx_workspace_bound() to - * determine how large the workspace must be. - * - * Return: A zstd compression context or NULL on error. - */ -zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size); - -/** - * zstd_compress_cctx() - compress src into dst with the initialized parameters - * @cctx: The context. Must have been initialized with zstd_init_cctx(). - * @dst: The buffer to compress src into. - * @dst_capacity: The size of the destination buffer. May be any size, but - * ZSTD_compressBound(srcSize) is guaranteed to be large enough. - * @src: The data to compress. - * @src_size: The size of the data to compress. - * @parameters: The compression parameters to be used. - * - * Return: The compressed size or an error, which can be checked using - * zstd_is_error(). - */ -size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity, - const void *src, size_t src_size, const zstd_parameters *parameters); - -/* ====== Single-pass Decompression ====== */ - -typedef ZSTD_DCtx zstd_dctx; - -/** - * zstd_dctx_workspace_bound() - max memory needed to initialize a zstd_dctx - * - * Return: A lower bound on the size of the workspace that is passed to - * zstd_init_dctx(). - */ -size_t zstd_dctx_workspace_bound(void); - -/** - * zstd_init_dctx() - initialize a zstd decompression context - * @workspace: The workspace to emplace the context into. It must outlive - * the returned context. - * @workspace_size: The size of workspace. Use zstd_dctx_workspace_bound() to - * determine how large the workspace must be. - * - * Return: A zstd decompression context or NULL on error. - */ -zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size); - -/** - * zstd_decompress_dctx() - decompress zstd compressed src into dst - * @dctx: The decompression context. - * @dst: The buffer to decompress src into. - * @dst_capacity: The size of the destination buffer. Must be at least as large - * as the decompressed size. If the caller cannot upper bound the - * decompressed size, then it's better to use the streaming API. - * @src: The zstd compressed data to decompress. Multiple concatenated - * frames and skippable frames are allowed. - * @src_size: The exact size of the data to decompress. - * - * Return: The decompressed size or an error, which can be checked using - * zstd_is_error(). - */ -size_t zstd_decompress_dctx(zstd_dctx *dctx, void *dst, size_t dst_capacity, - const void *src, size_t src_size); - -/* ====== Streaming Buffers ====== */ - -/** - * struct zstd_in_buffer - input buffer for streaming - * @src: Start of the input buffer. - * @size: Size of the input buffer. - * @pos: Position where reading stopped. Will be updated. - * Necessarily 0 <= pos <= size. - * - * See zstd_lib.h. - */ -typedef ZSTD_inBuffer zstd_in_buffer; - -/** - * struct zstd_out_buffer - output buffer for streaming - * @dst: Start of the output buffer. - * @size: Size of the output buffer. - * @pos: Position where writing stopped. Will be updated. - * Necessarily 0 <= pos <= size. - * - * See zstd_lib.h. - */ -typedef ZSTD_outBuffer zstd_out_buffer; - -/* ====== Streaming Compression ====== */ - -typedef ZSTD_CStream zstd_cstream; - -/** - * zstd_cstream_workspace_bound() - memory needed to initialize a zstd_cstream - * @cparams: The compression parameters to be used for compression. - * - * Return: A lower bound on the size of the workspace that is passed to - * zstd_init_cstream(). - */ -size_t zstd_cstream_workspace_bound(const zstd_compression_parameters *cparams); - -/** - * zstd_cstream_workspace_bound_with_ext_seq_prod() - memory needed to initialize - * a zstd_cstream when using the block-level external sequence producer API. - * @cparams: The compression parameters to be used for compression. - * - * Return: A lower bound on the size of the workspace that is passed to - * zstd_init_cstream(). - */ -size_t zstd_cstream_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *cparams); - -/** - * zstd_init_cstream() - initialize a zstd streaming compression context - * @parameters The zstd parameters to use for compression. - * @pledged_src_size: If params.fParams.contentSizeFlag == 1 then the caller - * must pass the source size (zero means empty source). - * Otherwise, the caller may optionally pass the source - * size, or zero if unknown. - * @workspace: The workspace to emplace the context into. It must outlive - * the returned context. - * @workspace_size: The size of workspace. - * Use zstd_cstream_workspace_bound(params->cparams) to - * determine how large the workspace must be. - * - * Return: The zstd streaming compression context or NULL on error. - */ -zstd_cstream *zstd_init_cstream(const zstd_parameters *parameters, - unsigned long long pledged_src_size, void *workspace, size_t workspace_size); - -/** - * zstd_reset_cstream() - reset the context using parameters from creation - * @cstream: The zstd streaming compression context to reset. - * @pledged_src_size: Optionally the source size, or zero if unknown. - * - * Resets the context using the parameters from creation. Skips dictionary - * loading, since it can be reused. If `pledged_src_size` is non-zero the frame - * content size is always written into the frame header. - * - * Return: Zero or an error, which can be checked using - * zstd_is_error(). - */ -size_t zstd_reset_cstream(zstd_cstream *cstream, - unsigned long long pledged_src_size); - -/** - * zstd_compress_stream() - streaming compress some of input into output - * @cstream: The zstd streaming compression context. - * @output: Destination buffer. `output->pos` is updated to indicate how much - * compressed data was written. - * @input: Source buffer. `input->pos` is updated to indicate how much data - * was read. Note that it may not consume the entire input, in which - * case `input->pos < input->size`, and it's up to the caller to - * present remaining data again. - * - * The `input` and `output` buffers may be any size. Guaranteed to make some - * forward progress if `input` and `output` are not empty. - * - * Return: A hint for the number of bytes to use as the input for the next - * function call or an error, which can be checked using - * zstd_is_error(). - */ -size_t zstd_compress_stream(zstd_cstream *cstream, zstd_out_buffer *output, - zstd_in_buffer *input); - -/** - * zstd_flush_stream() - flush internal buffers into output - * @cstream: The zstd streaming compression context. - * @output: Destination buffer. `output->pos` is updated to indicate how much - * compressed data was written. - * - * zstd_flush_stream() must be called until it returns 0, meaning all the data - * has been flushed. Since zstd_flush_stream() causes a block to be ended, - * calling it too often will degrade the compression ratio. - * - * Return: The number of bytes still present within internal buffers or an - * error, which can be checked using zstd_is_error(). - */ -size_t zstd_flush_stream(zstd_cstream *cstream, zstd_out_buffer *output); - -/** - * zstd_end_stream() - flush internal buffers into output and end the frame - * @cstream: The zstd streaming compression context. - * @output: Destination buffer. `output->pos` is updated to indicate how much - * compressed data was written. - * - * zstd_end_stream() must be called until it returns 0, meaning all the data has - * been flushed and the frame epilogue has been written. - * - * Return: The number of bytes still present within internal buffers or an - * error, which can be checked using zstd_is_error(). - */ -size_t zstd_end_stream(zstd_cstream *cstream, zstd_out_buffer *output); - -/* ====== Streaming Decompression ====== */ - -typedef ZSTD_DStream zstd_dstream; - -/** - * zstd_dstream_workspace_bound() - memory needed to initialize a zstd_dstream - * @max_window_size: The maximum window size allowed for compressed frames. - * - * Return: A lower bound on the size of the workspace that is passed - * to zstd_init_dstream(). - */ -size_t zstd_dstream_workspace_bound(size_t max_window_size); - -/** - * zstd_init_dstream() - initialize a zstd streaming decompression context - * @max_window_size: The maximum window size allowed for compressed frames. - * @workspace: The workspace to emplace the context into. It must outlive - * the returned context. - * @workspaceSize: The size of workspace. - * Use zstd_dstream_workspace_bound(max_window_size) to - * determine how large the workspace must be. - * - * Return: The zstd streaming decompression context. - */ -zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace, - size_t workspace_size); - -/** - * zstd_reset_dstream() - reset the context using parameters from creation - * @dstream: The zstd streaming decompression context to reset. - * - * Resets the context using the parameters from creation. Skips dictionary - * loading, since it can be reused. - * - * Return: Zero or an error, which can be checked using zstd_is_error(). - */ -size_t zstd_reset_dstream(zstd_dstream *dstream); - -/** - * zstd_decompress_stream() - streaming decompress some of input into output - * @dstream: The zstd streaming decompression context. - * @output: Destination buffer. `output.pos` is updated to indicate how much - * decompressed data was written. - * @input: Source buffer. `input.pos` is updated to indicate how much data was - * read. Note that it may not consume the entire input, in which case - * `input.pos < input.size`, and it's up to the caller to present - * remaining data again. - * - * The `input` and `output` buffers may be any size. Guaranteed to make some - * forward progress if `input` and `output` are not empty. - * zstd_decompress_stream() will not consume the last byte of the frame until - * the entire frame is flushed. - * - * Return: Returns 0 iff a frame is completely decoded and fully flushed. - * Otherwise returns a hint for the number of bytes to use as the - * input for the next function call or an error, which can be checked - * using zstd_is_error(). The size hint will never load more than the - * frame. - */ -size_t zstd_decompress_stream(zstd_dstream *dstream, zstd_out_buffer *output, - zstd_in_buffer *input); - -/* ====== Frame Inspection Functions ====== */ - -/** - * zstd_find_frame_compressed_size() - returns the size of a compressed frame - * @src: Source buffer. It should point to the start of a zstd encoded - * frame or a skippable frame. - * @src_size: The size of the source buffer. It must be at least as large as the - * size of the frame. - * - * Return: The compressed size of the frame pointed to by `src` or an error, - * which can be check with zstd_is_error(). - * Suitable to pass to ZSTD_decompress() or similar functions. - */ -size_t zstd_find_frame_compressed_size(const void *src, size_t src_size); - -/** - * zstd_register_sequence_producer() - exposes the zstd library function - * ZSTD_registerSequenceProducer(). This is used for the block-level external - * sequence producer API. See upstream zstd.h for detailed documentation. - */ -typedef ZSTD_sequenceProducer_F zstd_sequence_producer_f; -void zstd_register_sequence_producer( - zstd_cctx *cctx, - void* sequence_producer_state, - zstd_sequence_producer_f sequence_producer -); - -/** - * struct zstd_frame_params - zstd frame parameters stored in the frame header - * @frameContentSize: The frame content size, or ZSTD_CONTENTSIZE_UNKNOWN if not - * present. - * @windowSize: The window size, or 0 if the frame is a skippable frame. - * @blockSizeMax: The maximum block size. - * @frameType: The frame type (zstd or skippable) - * @headerSize: The size of the frame header. - * @dictID: The dictionary id, or 0 if not present. - * @checksumFlag: Whether a checksum was used. - * - * See zstd_lib.h. - */ -typedef ZSTD_FrameHeader zstd_frame_header; - -/** - * zstd_get_frame_header() - extracts parameters from a zstd or skippable frame - * @params: On success the frame parameters are written here. - * @src: The source buffer. It must point to a zstd or skippable frame. - * @src_size: The size of the source buffer. - * - * Return: 0 on success. If more data is required it returns how many bytes - * must be provided to make forward progress. Otherwise it returns - * an error, which can be checked using zstd_is_error(). - */ -size_t zstd_get_frame_header(zstd_frame_header *params, const void *src, - size_t src_size); - -/** - * struct zstd_sequence - a sequence of literals or a match - * - * @offset: The offset of the match - * @litLength: The literal length of the sequence - * @matchLength: The match length of the sequence - * @rep: Represents which repeat offset is used - */ -typedef ZSTD_Sequence zstd_sequence; - -/** - * zstd_compress_sequences_and_literals() - compress an array of zstd_sequence and literals - * - * @cctx: The zstd compression context. - * @dst: The buffer to compress the data into. - * @dst_capacity: The size of the destination buffer. - * @in_seqs: The array of zstd_sequence to compress. - * @in_seqs_size: The number of sequences in in_seqs. - * @literals: The literals associated to the sequences to be compressed. - * @lit_size: The size of the literals in the literals buffer. - * @lit_capacity: The size of the literals buffer. - * @decompressed_size: The size of the input data - * - * Return: The compressed size or an error, which can be checked using - * zstd_is_error(). - */ -size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, size_t dst_capacity, - const zstd_sequence *in_seqs, size_t in_seqs_size, - const void* literals, size_t lit_size, size_t lit_capacity, - size_t decompressed_size); - -#endif /* LINUX_ZSTD_H */ diff --git a/third_party/zstd/contrib/linux-kernel/mem.h b/third_party/zstd/contrib/linux-kernel/mem.h deleted file mode 100644 index d9bd752..0000000 --- a/third_party/zstd/contrib/linux-kernel/mem.h +++ /dev/null @@ -1,262 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef MEM_H_MODULE -#define MEM_H_MODULE - -/*-**************************************** -* Dependencies -******************************************/ -#include /* get_unaligned, put_unaligned* */ -#include /* inline */ -#include /* swab32, swab64 */ -#include /* size_t, ptrdiff_t */ -#include "debug.h" /* DEBUG_STATIC_ASSERT */ - -/*-**************************************** -* Compiler specifics -******************************************/ -#undef MEM_STATIC /* may be already defined from common/compiler.h */ -#define MEM_STATIC static inline - -/*-************************************************************** -* Basic Types -*****************************************************************/ -typedef uint8_t BYTE; -typedef uint8_t U8; -typedef int8_t S8; -typedef uint16_t U16; -typedef int16_t S16; -typedef uint32_t U32; -typedef int32_t S32; -typedef uint64_t U64; -typedef int64_t S64; - -/*-************************************************************** -* Memory I/O API -*****************************************************************/ -/*=== Static platform detection ===*/ -MEM_STATIC unsigned MEM_32bits(void); -MEM_STATIC unsigned MEM_64bits(void); -MEM_STATIC unsigned MEM_isLittleEndian(void); - -/*=== Native unaligned read/write ===*/ -MEM_STATIC U16 MEM_read16(const void* memPtr); -MEM_STATIC U32 MEM_read32(const void* memPtr); -MEM_STATIC U64 MEM_read64(const void* memPtr); -MEM_STATIC size_t MEM_readST(const void* memPtr); - -MEM_STATIC void MEM_write16(void* memPtr, U16 value); -MEM_STATIC void MEM_write32(void* memPtr, U32 value); -MEM_STATIC void MEM_write64(void* memPtr, U64 value); - -/*=== Little endian unaligned read/write ===*/ -MEM_STATIC U16 MEM_readLE16(const void* memPtr); -MEM_STATIC U32 MEM_readLE24(const void* memPtr); -MEM_STATIC U32 MEM_readLE32(const void* memPtr); -MEM_STATIC U64 MEM_readLE64(const void* memPtr); -MEM_STATIC size_t MEM_readLEST(const void* memPtr); - -MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val); -MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val); -MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32); -MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64); -MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val); - -/*=== Big endian unaligned read/write ===*/ -MEM_STATIC U32 MEM_readBE32(const void* memPtr); -MEM_STATIC U64 MEM_readBE64(const void* memPtr); -MEM_STATIC size_t MEM_readBEST(const void* memPtr); - -MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32); -MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64); -MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val); - -/*=== Byteswap ===*/ -MEM_STATIC U32 MEM_swap32(U32 in); -MEM_STATIC U64 MEM_swap64(U64 in); -MEM_STATIC size_t MEM_swapST(size_t in); - -/*-************************************************************** -* Memory I/O Implementation -*****************************************************************/ -MEM_STATIC unsigned MEM_32bits(void) -{ - return sizeof(size_t) == 4; -} - -MEM_STATIC unsigned MEM_64bits(void) -{ - return sizeof(size_t) == 8; -} - -#if defined(__LITTLE_ENDIAN) -#define MEM_LITTLE_ENDIAN 1 -#else -#define MEM_LITTLE_ENDIAN 0 -#endif - -MEM_STATIC unsigned MEM_isLittleEndian(void) -{ - return MEM_LITTLE_ENDIAN; -} - -MEM_STATIC U16 MEM_read16(const void *memPtr) -{ - return get_unaligned((const U16 *)memPtr); -} - -MEM_STATIC U32 MEM_read32(const void *memPtr) -{ - return get_unaligned((const U32 *)memPtr); -} - -MEM_STATIC U64 MEM_read64(const void *memPtr) -{ - return get_unaligned((const U64 *)memPtr); -} - -MEM_STATIC size_t MEM_readST(const void *memPtr) -{ - return get_unaligned((const size_t *)memPtr); -} - -MEM_STATIC void MEM_write16(void *memPtr, U16 value) -{ - put_unaligned(value, (U16 *)memPtr); -} - -MEM_STATIC void MEM_write32(void *memPtr, U32 value) -{ - put_unaligned(value, (U32 *)memPtr); -} - -MEM_STATIC void MEM_write64(void *memPtr, U64 value) -{ - put_unaligned(value, (U64 *)memPtr); -} - -/*=== Little endian r/w ===*/ - -MEM_STATIC U16 MEM_readLE16(const void *memPtr) -{ - return get_unaligned_le16(memPtr); -} - -MEM_STATIC void MEM_writeLE16(void *memPtr, U16 val) -{ - put_unaligned_le16(val, memPtr); -} - -MEM_STATIC U32 MEM_readLE24(const void *memPtr) -{ - return MEM_readLE16(memPtr) + (((const BYTE *)memPtr)[2] << 16); -} - -MEM_STATIC void MEM_writeLE24(void *memPtr, U32 val) -{ - MEM_writeLE16(memPtr, (U16)val); - ((BYTE *)memPtr)[2] = (BYTE)(val >> 16); -} - -MEM_STATIC U32 MEM_readLE32(const void *memPtr) -{ - return get_unaligned_le32(memPtr); -} - -MEM_STATIC void MEM_writeLE32(void *memPtr, U32 val32) -{ - put_unaligned_le32(val32, memPtr); -} - -MEM_STATIC U64 MEM_readLE64(const void *memPtr) -{ - return get_unaligned_le64(memPtr); -} - -MEM_STATIC void MEM_writeLE64(void *memPtr, U64 val64) -{ - put_unaligned_le64(val64, memPtr); -} - -MEM_STATIC size_t MEM_readLEST(const void *memPtr) -{ - if (MEM_32bits()) - return (size_t)MEM_readLE32(memPtr); - else - return (size_t)MEM_readLE64(memPtr); -} - -MEM_STATIC void MEM_writeLEST(void *memPtr, size_t val) -{ - if (MEM_32bits()) - MEM_writeLE32(memPtr, (U32)val); - else - MEM_writeLE64(memPtr, (U64)val); -} - -/*=== Big endian r/w ===*/ - -MEM_STATIC U32 MEM_readBE32(const void *memPtr) -{ - return get_unaligned_be32(memPtr); -} - -MEM_STATIC void MEM_writeBE32(void *memPtr, U32 val32) -{ - put_unaligned_be32(val32, memPtr); -} - -MEM_STATIC U64 MEM_readBE64(const void *memPtr) -{ - return get_unaligned_be64(memPtr); -} - -MEM_STATIC void MEM_writeBE64(void *memPtr, U64 val64) -{ - put_unaligned_be64(val64, memPtr); -} - -MEM_STATIC size_t MEM_readBEST(const void *memPtr) -{ - if (MEM_32bits()) - return (size_t)MEM_readBE32(memPtr); - else - return (size_t)MEM_readBE64(memPtr); -} - -MEM_STATIC void MEM_writeBEST(void *memPtr, size_t val) -{ - if (MEM_32bits()) - MEM_writeBE32(memPtr, (U32)val); - else - MEM_writeBE64(memPtr, (U64)val); -} - -MEM_STATIC U32 MEM_swap32(U32 in) -{ - return swab32(in); -} - -MEM_STATIC U64 MEM_swap64(U64 in) -{ - return swab64(in); -} - -MEM_STATIC size_t MEM_swapST(size_t in) -{ - if (MEM_32bits()) - return (size_t)MEM_swap32((U32)in); - else - return (size_t)MEM_swap64((U64)in); -} - -#endif /* MEM_H_MODULE */ diff --git a/third_party/zstd/contrib/linux-kernel/squashfs-benchmark.sh b/third_party/zstd/contrib/linux-kernel/squashfs-benchmark.sh deleted file mode 100644 index 02dfd73..0000000 --- a/third_party/zstd/contrib/linux-kernel/squashfs-benchmark.sh +++ /dev/null @@ -1,39 +0,0 @@ -# !/bin/sh -set -e - -# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. -# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and -# 16 GB of RAM and an SSD. - -# $BENCHMARK_DIR is generated with the following commands, from the Ubuntu image -# ubuntu-16.10-desktop-amd64.iso. -# > mkdir mnt -# > sudo mount -o loop ubuntu-16.10-desktop-amd64.iso mnt -# > cp mnt/casper/filesystem.squashfs . -# > sudo unsquashfs filesystem.squashfs - -# $HOME is on a ext4 filesystem -BENCHMARK_DIR="$HOME/squashfs-root/" -BENCHMARK_FS="$HOME/filesystem.squashfs" - -# Normalize the environment -sudo rm -f $BENCHMARK_FS 2> /dev/null > /dev/null || true -sudo umount /mnt/squashfs 2> /dev/null > /dev/null || true - -# Run the benchmark -echo "Compression" -echo "sudo mksquashfs $BENCHMARK_DIR $BENCHMARK_FS $@" -time sudo mksquashfs $BENCHMARK_DIR $BENCHMARK_FS $@ 2> /dev/null > /dev/null - -echo "Approximate compression ratio" -printf "%d / %d\n" \ - $(sudo du -sx --block-size=1 $BENCHMARK_DIR | cut -f1) \ - $(sudo du -sx --block-size=1 $BENCHMARK_FS | cut -f1); - -# Mount the filesystem -sudo mount -t squashfs $BENCHMARK_FS /mnt/squashfs - -echo "Decompression" -time sudo tar -c /mnt/squashfs 2> /dev/null | wc -c > /dev/null - -sudo umount /mnt/squashfs diff --git a/third_party/zstd/contrib/linux-kernel/test/Makefile b/third_party/zstd/contrib/linux-kernel/test/Makefile deleted file mode 100644 index 67b55e6..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -LINUX := ../linux -LINUX_ZSTDLIB := $(LINUX)/lib/zstd - -CPPFLAGS += -I$(LINUX)/include -I$(LINUX_ZSTDLIB) -Iinclude -DNDEBUG -Wno-deprecated-declarations -# Don't poison the workspace, it currently doesn't work with static allocation and workspace reuse -CPPFLAGS += -DZSTD_ASAN_DONT_POISON_WORKSPACE - -LINUX_ZSTD_MODULE := $(wildcard $(LINUX_ZSTDLIB)/*.c) -LINUX_ZSTD_COMMON := $(wildcard $(LINUX_ZSTDLIB)/common/*.c) -LINUX_ZSTD_COMPRESS := $(wildcard $(LINUX_ZSTDLIB)/compress/*.c) -LINUX_ZSTD_DECOMPRESS := $(wildcard $(LINUX_ZSTDLIB)/decompress/*.c $(LINUX_ZSTDLIB)/decompress/*.S) -LINUX_ZSTD_FILES := $(LINUX_ZSTD_MODULE) $(LINUX_ZSTD_COMMON) $(LINUX_ZSTD_COMPRESS) $(LINUX_ZSTD_DECOMPRESS) -LINUX_ZSTD_OBJECTS0 := $(LINUX_ZSTD_FILES:.c=.o) -LINUX_ZSTD_OBJECTS := $(LINUX_ZSTD_OBJECTS0:.S=.o) - -%.o: %.S - $(COMPILE.S) $(OUTPUT_OPTION) $< - -liblinuxzstd.a: $(LINUX_ZSTD_OBJECTS) - $(AR) $(ARFLAGS) $@ $^ - -test: test.c liblinuxzstd.a - $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ -o $@ - -static_test: static_test.c - $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ -o $@ - -run-test: test static_test - ./macro-test.sh - ./test - ./static_test - -.PHONY: -clean: - $(RM) -f $(LINUX_ZSTDLIB)/*.o - $(RM) -f $(LINUX_ZSTDLIB)/**/*.o - $(RM) -f *.o *.a - $(RM) -f static_test - $(RM) -f test diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/compiler.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/compiler.h deleted file mode 100644 index 988ce4a..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/compiler.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_COMPILER_H -#define LINUX_COMPILER_H - -#ifndef inline -#define inline __inline __attribute__((unused)) -#endif - -#ifndef noinline -#define noinline __attribute__((noinline)) -#endif - -#define fallthrough __attribute__((__fallthrough__)) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/errno.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/errno.h deleted file mode 100644 index b4bdcba..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/errno.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_ERRNO_H -#define LINUX_ERRNO_H - -#define EINVAL 22 - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/kernel.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/kernel.h deleted file mode 100644 index a4d791c..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/kernel.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_KERNEL_H -#define LINUX_KERNEL_H - -#define WARN_ON(x) - -#define PTR_ALIGN(p, a) (typeof(p))ALIGN((unsigned long long)(p), (a)) -#define ALIGN(x, a) ALIGN_MASK((x), (a) - 1) -#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/limits.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/limits.h deleted file mode 100644 index 574aa7b..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/limits.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_LIMITS_H -#define LINUX_LIMITS_H - -#include - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/math64.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/math64.h deleted file mode 100644 index 7f6713e..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/math64.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_MATH64_H -#define LINUX_MATH64_H - -#define div_u64(dividend, divisor) ((dividend) / (divisor)) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/module.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/module.h deleted file mode 100644 index 06ef56f..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/module.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_MODULE_H -#define LINUX_MODULE_H - -#define EXPORT_SYMBOL(symbol) \ - void* __##symbol = symbol -#define EXPORT_SYMBOL_GPL(symbol) \ - void* __##symbol = symbol -#define MODULE_LICENSE(license) -#define MODULE_DESCRIPTION(description) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/printk.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/printk.h deleted file mode 100644 index 92a2527..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/printk.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_PRINTK_H -#define LINUX_PRINTK_H - -#define pr_debug(...) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/stddef.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/stddef.h deleted file mode 100644 index 15c7408..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/stddef.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_STDDEF_H -#define LINUX_STDDEF_H - -#include - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/swab.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/swab.h deleted file mode 100644 index 2b48b43..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/swab.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_SWAB_H -#define LINUX_SWAB_H - -#define swab32(x) __builtin_bswap32((x)) -#define swab64(x) __builtin_bswap64((x)) - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/types.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/types.h deleted file mode 100644 index b413db6..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/types.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#ifndef LINUX_TYPES_H -#define LINUX_TYPES_H - -#include -#include - -#endif diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/unaligned.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/unaligned.h deleted file mode 100644 index 86ec4ca..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/unaligned.h +++ /dev/null @@ -1,187 +0,0 @@ -#ifndef ASM_UNALIGNED_H -#define ASM_UNALIGNED_H - -#include -#include - -#ifndef __LITTLE_ENDIAN -# if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN__) -# define __LITTLE_ENDIAN 1 -# endif -#endif - -#ifdef __LITTLE_ENDIAN -# define _IS_LITTLE_ENDIAN 1 -#else -# define _IS_LITTLE_ENDIAN 0 -#endif - -static unsigned _isLittleEndian(void) -{ - const union { uint32_t u; uint8_t c[4]; } one = { 1 }; - assert(_IS_LITTLE_ENDIAN == one.c[0]); - (void)one; - return _IS_LITTLE_ENDIAN; -} - -static uint16_t _swap16(uint16_t in) -{ - return ((in & 0xF) << 8) + ((in & 0xF0) >> 8); -} - -static uint32_t _swap32(uint32_t in) -{ - return __builtin_bswap32(in); -} - -static uint64_t _swap64(uint64_t in) -{ - return __builtin_bswap64(in); -} - -/* Little endian */ -static uint16_t get_unaligned_le16(const void* memPtr) -{ - uint16_t val; - __builtin_memcpy(&val, memPtr, sizeof(val)); - if (!_isLittleEndian()) _swap16(val); - return val; -} - -static uint32_t get_unaligned_le32(const void* memPtr) -{ - uint32_t val; - __builtin_memcpy(&val, memPtr, sizeof(val)); - if (!_isLittleEndian()) _swap32(val); - return val; -} - -static uint64_t get_unaligned_le64(const void* memPtr) -{ - uint64_t val; - __builtin_memcpy(&val, memPtr, sizeof(val)); - if (!_isLittleEndian()) _swap64(val); - return val; -} - -static void put_unaligned_le16(uint16_t value, void* memPtr) -{ - if (!_isLittleEndian()) value = _swap16(value); - __builtin_memcpy(memPtr, &value, sizeof(value)); -} - -static void put_unaligned_le32(uint32_t value, void* memPtr) -{ - if (!_isLittleEndian()) value = _swap32(value); - __builtin_memcpy(memPtr, &value, sizeof(value)); -} - -static void put_unaligned_le64(uint64_t value, void* memPtr) -{ - if (!_isLittleEndian()) value = _swap64(value); - __builtin_memcpy(memPtr, &value, sizeof(value)); -} - -/* big endian */ -static uint32_t get_unaligned_be32(const void* memPtr) -{ - uint32_t val; - __builtin_memcpy(&val, memPtr, sizeof(val)); - if (_isLittleEndian()) _swap32(val); - return val; -} - -static uint64_t get_unaligned_be64(const void* memPtr) -{ - uint64_t val; - __builtin_memcpy(&val, memPtr, sizeof(val)); - if (_isLittleEndian()) _swap64(val); - return val; -} - -static void put_unaligned_be32(uint32_t value, void* memPtr) -{ - if (_isLittleEndian()) value = _swap32(value); - __builtin_memcpy(memPtr, &value, sizeof(value)); -} - -static void put_unaligned_be64(uint64_t value, void* memPtr) -{ - if (_isLittleEndian()) value = _swap64(value); - __builtin_memcpy(memPtr, &value, sizeof(value)); -} - -/* generic */ -extern void __bad_unaligned_access_size(void); - -#define __get_unaligned_le(ptr) ((typeof(*(ptr)))({ \ - __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ - __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_le16((ptr)), \ - __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \ - __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \ - __bad_unaligned_access_size())))); \ - })) - -#define __get_unaligned_be(ptr) ((typeof(*(ptr)))({ \ - __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ - __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_be16((ptr)), \ - __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_be32((ptr)), \ - __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_be64((ptr)), \ - __bad_unaligned_access_size())))); \ - })) - -#define __put_unaligned_le(val, ptr) \ - ({ \ - void *__gu_p = (ptr); \ - switch (sizeof(*(ptr))) { \ - case 1: \ - *(uint8_t *)__gu_p = (uint8_t)(val); \ - break; \ - case 2: \ - put_unaligned_le16((uint16_t)(val), __gu_p); \ - break; \ - case 4: \ - put_unaligned_le32((uint32_t)(val), __gu_p); \ - break; \ - case 8: \ - put_unaligned_le64((uint64_t)(val), __gu_p); \ - break; \ - default: \ - __bad_unaligned_access_size(); \ - break; \ - } \ - (void)0; \ - }) - -#define __put_unaligned_be(val, ptr) \ - ({ \ - void *__gu_p = (ptr); \ - switch (sizeof(*(ptr))) { \ - case 1: \ - *(uint8_t *)__gu_p = (uint8_t)(val); \ - break; \ - case 2: \ - put_unaligned_be16((uint16_t)(val), __gu_p); \ - break; \ - case 4: \ - put_unaligned_be32((uint32_t)(val), __gu_p); \ - break; \ - case 8: \ - put_unaligned_be64((uint64_t)(val), __gu_p); \ - break; \ - default: \ - __bad_unaligned_access_size(); \ - break; \ - } \ - (void)0; \ - }) - -#if _IS_LITTLE_ENDIAN -# define get_unaligned __get_unaligned_le -# define put_unaligned __put_unaligned_le -#else -# define get_unaligned __get_unaligned_be -# define put_unaligned __put_unaligned_be -#endif - -#endif // ASM_UNALIGNED_H diff --git a/third_party/zstd/contrib/linux-kernel/test/include/linux/xxhash.h b/third_party/zstd/contrib/linux-kernel/test/include/linux/xxhash.h deleted file mode 100644 index f993eb9..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/include/linux/xxhash.h +++ /dev/null @@ -1,745 +0,0 @@ -/* - * xxHash - Extremely Fast Hash algorithm - * Copyright (C) 2012-2016, Yann Collet. - * - * BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. This program is dual-licensed; you may select - * either version 2 of the GNU General Public License ("GPL") or BSD license - * ("BSD"). - * - * You can contact the author at: - * - xxHash homepage: https://cyan4973.github.io/xxHash/ - * - xxHash source repository: https://github.com/Cyan4973/xxHash - */ - -/* - * Notice extracted from xxHash homepage: - * - * xxHash is an extremely fast Hash algorithm, running at RAM speed limits. - * It also successfully passes all tests from the SMHasher suite. - * - * Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 - * Duo @3GHz) - * - * Name Speed Q.Score Author - * xxHash 5.4 GB/s 10 - * CrapWow 3.2 GB/s 2 Andrew - * MumurHash 3a 2.7 GB/s 10 Austin Appleby - * SpookyHash 2.0 GB/s 10 Bob Jenkins - * SBox 1.4 GB/s 9 Bret Mulvey - * Lookup3 1.2 GB/s 9 Bob Jenkins - * SuperFastHash 1.2 GB/s 1 Paul Hsieh - * CityHash64 1.05 GB/s 10 Pike & Alakuijala - * FNV 0.55 GB/s 5 Fowler, Noll, Vo - * CRC32 0.43 GB/s 9 - * MD5-32 0.33 GB/s 10 Ronald L. Rivest - * SHA1-32 0.28 GB/s 10 - * - * Q.Score is a measure of quality of the hash function. - * It depends on successfully passing SMHasher test set. - * 10 is a perfect score. - * - * A 64-bits version, named xxh64 offers much better speed, - * but for 64-bits applications only. - * Name Speed on 64 bits Speed on 32 bits - * xxh64 13.8 GB/s 1.9 GB/s - * xxh32 6.8 GB/s 6.0 GB/s - */ - -#ifndef XXHASH_H -#define XXHASH_H - -#include - -#define XXH_API static inline __attribute__((unused)) -/*-**************************** - * Simple Hash Functions - *****************************/ - -/** - * xxh32() - calculate the 32-bit hash of the input with a given seed. - * - * @input: The data to hash. - * @length: The length of the data to hash. - * @seed: The seed can be used to alter the result predictably. - * - * Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s - * - * Return: The 32-bit hash of the data. - */ -XXH_API uint32_t xxh32(const void *input, size_t length, uint32_t seed); - -/** - * xxh64() - calculate the 64-bit hash of the input with a given seed. - * - * @input: The data to hash. - * @length: The length of the data to hash. - * @seed: The seed can be used to alter the result predictably. - * - * This function runs 2x faster on 64-bit systems, but slower on 32-bit systems. - * - * Return: The 64-bit hash of the data. - */ -XXH_API uint64_t xxh64(const void *input, size_t length, uint64_t seed); - -/** - * xxhash() - calculate wordsize hash of the input with a given seed - * @input: The data to hash. - * @length: The length of the data to hash. - * @seed: The seed can be used to alter the result predictably. - * - * If the hash does not need to be comparable between machines with - * different word sizes, this function will call whichever of xxh32() - * or xxh64() is faster. - * - * Return: wordsize hash of the data. - */ - -static inline unsigned long xxhash(const void *input, size_t length, - uint64_t seed) -{ - if (sizeof(size_t) == 8) - return xxh64(input, length, seed); - else - return xxh32(input, length, seed); -} - -/*-**************************** - * Streaming Hash Functions - *****************************/ - -/* - * These definitions are only meant to allow allocation of XXH state - * statically, on stack, or in a struct for example. - * Do not use members directly. - */ - -/** - * struct xxh32_state - private xxh32 state, do not use members directly - */ -struct xxh32_state { - uint32_t total_len_32; - uint32_t large_len; - uint32_t v1; - uint32_t v2; - uint32_t v3; - uint32_t v4; - uint32_t mem32[4]; - uint32_t memsize; -}; - -/** - * struct xxh32_state - private xxh64 state, do not use members directly - */ -struct xxh64_state { - uint64_t total_len; - uint64_t v1; - uint64_t v2; - uint64_t v3; - uint64_t v4; - uint64_t mem64[4]; - uint32_t memsize; -}; - -/** - * xxh32_reset() - reset the xxh32 state to start a new hashing operation - * - * @state: The xxh32 state to reset. - * @seed: Initialize the hash state with this seed. - * - * Call this function on any xxh32_state to prepare for a new hashing operation. - */ -XXH_API void xxh32_reset(struct xxh32_state *state, uint32_t seed); - -/** - * xxh32_update() - hash the data given and update the xxh32 state - * - * @state: The xxh32 state to update. - * @input: The data to hash. - * @length: The length of the data to hash. - * - * After calling xxh32_reset() call xxh32_update() as many times as necessary. - * - * Return: Zero on success, otherwise an error code. - */ -XXH_API int xxh32_update(struct xxh32_state *state, const void *input, size_t length); - -/** - * xxh32_digest() - produce the current xxh32 hash - * - * @state: Produce the current xxh32 hash of this state. - * - * A hash value can be produced at any time. It is still possible to continue - * inserting input into the hash state after a call to xxh32_digest(), and - * generate new hashes later on, by calling xxh32_digest() again. - * - * Return: The xxh32 hash stored in the state. - */ -XXH_API uint32_t xxh32_digest(const struct xxh32_state *state); - -/** - * xxh64_reset() - reset the xxh64 state to start a new hashing operation - * - * @state: The xxh64 state to reset. - * @seed: Initialize the hash state with this seed. - */ -XXH_API void xxh64_reset(struct xxh64_state *state, uint64_t seed); - -/** - * xxh64_update() - hash the data given and update the xxh64 state - * @state: The xxh64 state to update. - * @input: The data to hash. - * @length: The length of the data to hash. - * - * After calling xxh64_reset() call xxh64_update() as many times as necessary. - * - * Return: Zero on success, otherwise an error code. - */ -XXH_API int xxh64_update(struct xxh64_state *state, const void *input, size_t length); - -/** - * xxh64_digest() - produce the current xxh64 hash - * - * @state: Produce the current xxh64 hash of this state. - * - * A hash value can be produced at any time. It is still possible to continue - * inserting input into the hash state after a call to xxh64_digest(), and - * generate new hashes later on, by calling xxh64_digest() again. - * - * Return: The xxh64 hash stored in the state. - */ -XXH_API uint64_t xxh64_digest(const struct xxh64_state *state); - -/*-************************** - * Utils - ***************************/ - -/** - * xxh32_copy_state() - copy the source state into the destination state - * - * @src: The source xxh32 state. - * @dst: The destination xxh32 state. - */ -XXH_API void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src); - -/** - * xxh64_copy_state() - copy the source state into the destination state - * - * @src: The source xxh64 state. - * @dst: The destination xxh64 state. - */ -XXH_API void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src); - -/* - * xxHash - Extremely Fast Hash algorithm - * Copyright (C) 2012-2016, Yann Collet. - * - * BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. This program is dual-licensed; you may select - * either version 2 of the GNU General Public License ("GPL") or BSD license - * ("BSD"). - * - * You can contact the author at: - * - xxHash homepage: https://cyan4973.github.io/xxHash/ - * - xxHash source repository: https://github.com/Cyan4973/xxHash - */ - -#include -#include -#include -#include -#include - -/*-************************************* - * Macros - **************************************/ -#define xxh_rotl32(x, r) ((x << r) | (x >> (32 - r))) -#define xxh_rotl64(x, r) ((x << r) | (x >> (64 - r))) - -#ifdef __LITTLE_ENDIAN -# define XXH_CPU_LITTLE_ENDIAN 1 -#else -# define XXH_CPU_LITTLE_ENDIAN 0 -#endif - -/*-************************************* - * Constants - **************************************/ -static const uint32_t PRIME32_1 = 2654435761U; -static const uint32_t PRIME32_2 = 2246822519U; -static const uint32_t PRIME32_3 = 3266489917U; -static const uint32_t PRIME32_4 = 668265263U; -static const uint32_t PRIME32_5 = 374761393U; - -static const uint64_t PRIME64_1 = 11400714785074694791ULL; -static const uint64_t PRIME64_2 = 14029467366897019727ULL; -static const uint64_t PRIME64_3 = 1609587929392839161ULL; -static const uint64_t PRIME64_4 = 9650029242287828579ULL; -static const uint64_t PRIME64_5 = 2870177450012600261ULL; - -/*-************************** - * Utils - ***************************/ -XXH_API void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src) -{ - __builtin_memcpy(dst, src, sizeof(*dst)); -} - -XXH_API void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src) -{ - __builtin_memcpy(dst, src, sizeof(*dst)); -} - -/*-*************************** - * Simple Hash Functions - ****************************/ -static uint32_t xxh32_round(uint32_t seed, const uint32_t input) -{ - seed += input * PRIME32_2; - seed = xxh_rotl32(seed, 13); - seed *= PRIME32_1; - return seed; -} - -XXH_API uint32_t xxh32(const void *input, const size_t len, const uint32_t seed) -{ - const uint8_t *p = (const uint8_t *)input; - const uint8_t *b_end = p + len; - uint32_t h32; - - if (len >= 16) { - const uint8_t *const limit = b_end - 16; - uint32_t v1 = seed + PRIME32_1 + PRIME32_2; - uint32_t v2 = seed + PRIME32_2; - uint32_t v3 = seed + 0; - uint32_t v4 = seed - PRIME32_1; - - do { - v1 = xxh32_round(v1, get_unaligned_le32(p)); - p += 4; - v2 = xxh32_round(v2, get_unaligned_le32(p)); - p += 4; - v3 = xxh32_round(v3, get_unaligned_le32(p)); - p += 4; - v4 = xxh32_round(v4, get_unaligned_le32(p)); - p += 4; - } while (p <= limit); - - h32 = xxh_rotl32(v1, 1) + xxh_rotl32(v2, 7) + - xxh_rotl32(v3, 12) + xxh_rotl32(v4, 18); - } else { - h32 = seed + PRIME32_5; - } - - h32 += (uint32_t)len; - - while (p + 4 <= b_end) { - h32 += get_unaligned_le32(p) * PRIME32_3; - h32 = xxh_rotl32(h32, 17) * PRIME32_4; - p += 4; - } - - while (p < b_end) { - h32 += (*p) * PRIME32_5; - h32 = xxh_rotl32(h32, 11) * PRIME32_1; - p++; - } - - h32 ^= h32 >> 15; - h32 *= PRIME32_2; - h32 ^= h32 >> 13; - h32 *= PRIME32_3; - h32 ^= h32 >> 16; - - return h32; -} - -static uint64_t xxh64_round(uint64_t acc, const uint64_t input) -{ - acc += input * PRIME64_2; - acc = xxh_rotl64(acc, 31); - acc *= PRIME64_1; - return acc; -} - -static uint64_t xxh64_merge_round(uint64_t acc, uint64_t val) -{ - val = xxh64_round(0, val); - acc ^= val; - acc = acc * PRIME64_1 + PRIME64_4; - return acc; -} - -XXH_API uint64_t xxh64(const void *input, const size_t len, const uint64_t seed) -{ - const uint8_t *p = (const uint8_t *)input; - const uint8_t *const b_end = p + len; - uint64_t h64; - - if (len >= 32) { - const uint8_t *const limit = b_end - 32; - uint64_t v1 = seed + PRIME64_1 + PRIME64_2; - uint64_t v2 = seed + PRIME64_2; - uint64_t v3 = seed + 0; - uint64_t v4 = seed - PRIME64_1; - - do { - v1 = xxh64_round(v1, get_unaligned_le64(p)); - p += 8; - v2 = xxh64_round(v2, get_unaligned_le64(p)); - p += 8; - v3 = xxh64_round(v3, get_unaligned_le64(p)); - p += 8; - v4 = xxh64_round(v4, get_unaligned_le64(p)); - p += 8; - } while (p <= limit); - - h64 = xxh_rotl64(v1, 1) + xxh_rotl64(v2, 7) + - xxh_rotl64(v3, 12) + xxh_rotl64(v4, 18); - h64 = xxh64_merge_round(h64, v1); - h64 = xxh64_merge_round(h64, v2); - h64 = xxh64_merge_round(h64, v3); - h64 = xxh64_merge_round(h64, v4); - - } else { - h64 = seed + PRIME64_5; - } - - h64 += (uint64_t)len; - - while (p + 8 <= b_end) { - const uint64_t k1 = xxh64_round(0, get_unaligned_le64(p)); - - h64 ^= k1; - h64 = xxh_rotl64(h64, 27) * PRIME64_1 + PRIME64_4; - p += 8; - } - - if (p + 4 <= b_end) { - h64 ^= (uint64_t)(get_unaligned_le32(p)) * PRIME64_1; - h64 = xxh_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; - p += 4; - } - - while (p < b_end) { - h64 ^= (*p) * PRIME64_5; - h64 = xxh_rotl64(h64, 11) * PRIME64_1; - p++; - } - - h64 ^= h64 >> 33; - h64 *= PRIME64_2; - h64 ^= h64 >> 29; - h64 *= PRIME64_3; - h64 ^= h64 >> 32; - - return h64; -} - -/*-************************************************** - * Advanced Hash Functions - ***************************************************/ -XXH_API void xxh32_reset(struct xxh32_state *statePtr, const uint32_t seed) -{ - /* use a local state for memcpy() to avoid strict-aliasing warnings */ - struct xxh32_state state; - - __builtin_memset(&state, 0, sizeof(state)); - state.v1 = seed + PRIME32_1 + PRIME32_2; - state.v2 = seed + PRIME32_2; - state.v3 = seed + 0; - state.v4 = seed - PRIME32_1; - __builtin_memcpy(statePtr, &state, sizeof(state)); -} - -XXH_API void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed) -{ - /* use a local state for memcpy() to avoid strict-aliasing warnings */ - struct xxh64_state state; - - __builtin_memset(&state, 0, sizeof(state)); - state.v1 = seed + PRIME64_1 + PRIME64_2; - state.v2 = seed + PRIME64_2; - state.v3 = seed + 0; - state.v4 = seed - PRIME64_1; - __builtin_memcpy(statePtr, &state, sizeof(state)); -} - -XXH_API int xxh32_update(struct xxh32_state *state, const void *input, const size_t len) -{ - const uint8_t *p = (const uint8_t *)input; - const uint8_t *const b_end = p + len; - - if (input == NULL) - return -EINVAL; - - state->total_len_32 += (uint32_t)len; - state->large_len |= (len >= 16) | (state->total_len_32 >= 16); - - if (state->memsize + len < 16) { /* fill in tmp buffer */ - __builtin_memcpy((uint8_t *)(state->mem32) + state->memsize, input, len); - state->memsize += (uint32_t)len; - return 0; - } - - if (state->memsize) { /* some data left from previous update */ - const uint32_t *p32 = state->mem32; - - __builtin_memcpy((uint8_t *)(state->mem32) + state->memsize, input, - 16 - state->memsize); - - state->v1 = xxh32_round(state->v1, get_unaligned_le32(p32)); - p32++; - state->v2 = xxh32_round(state->v2, get_unaligned_le32(p32)); - p32++; - state->v3 = xxh32_round(state->v3, get_unaligned_le32(p32)); - p32++; - state->v4 = xxh32_round(state->v4, get_unaligned_le32(p32)); - p32++; - - p += 16-state->memsize; - state->memsize = 0; - } - - if (p <= b_end - 16) { - const uint8_t *const limit = b_end - 16; - uint32_t v1 = state->v1; - uint32_t v2 = state->v2; - uint32_t v3 = state->v3; - uint32_t v4 = state->v4; - - do { - v1 = xxh32_round(v1, get_unaligned_le32(p)); - p += 4; - v2 = xxh32_round(v2, get_unaligned_le32(p)); - p += 4; - v3 = xxh32_round(v3, get_unaligned_le32(p)); - p += 4; - v4 = xxh32_round(v4, get_unaligned_le32(p)); - p += 4; - } while (p <= limit); - - state->v1 = v1; - state->v2 = v2; - state->v3 = v3; - state->v4 = v4; - } - - if (p < b_end) { - __builtin_memcpy(state->mem32, p, (size_t)(b_end-p)); - state->memsize = (uint32_t)(b_end-p); - } - - return 0; -} - -XXH_API uint32_t xxh32_digest(const struct xxh32_state *state) -{ - const uint8_t *p = (const uint8_t *)state->mem32; - const uint8_t *const b_end = (const uint8_t *)(state->mem32) + - state->memsize; - uint32_t h32; - - if (state->large_len) { - h32 = xxh_rotl32(state->v1, 1) + xxh_rotl32(state->v2, 7) + - xxh_rotl32(state->v3, 12) + xxh_rotl32(state->v4, 18); - } else { - h32 = state->v3 /* == seed */ + PRIME32_5; - } - - h32 += state->total_len_32; - - while (p + 4 <= b_end) { - h32 += get_unaligned_le32(p) * PRIME32_3; - h32 = xxh_rotl32(h32, 17) * PRIME32_4; - p += 4; - } - - while (p < b_end) { - h32 += (*p) * PRIME32_5; - h32 = xxh_rotl32(h32, 11) * PRIME32_1; - p++; - } - - h32 ^= h32 >> 15; - h32 *= PRIME32_2; - h32 ^= h32 >> 13; - h32 *= PRIME32_3; - h32 ^= h32 >> 16; - - return h32; -} - -XXH_API int xxh64_update(struct xxh64_state *state, const void *input, const size_t len) -{ - const uint8_t *p = (const uint8_t *)input; - const uint8_t *const b_end = p + len; - - if (input == NULL) - return -EINVAL; - - state->total_len += len; - - if (state->memsize + len < 32) { /* fill in tmp buffer */ - __builtin_memcpy(((uint8_t *)state->mem64) + state->memsize, input, len); - state->memsize += (uint32_t)len; - return 0; - } - - if (state->memsize) { /* tmp buffer is full */ - uint64_t *p64 = state->mem64; - - __builtin_memcpy(((uint8_t *)p64) + state->memsize, input, - 32 - state->memsize); - - state->v1 = xxh64_round(state->v1, get_unaligned_le64(p64)); - p64++; - state->v2 = xxh64_round(state->v2, get_unaligned_le64(p64)); - p64++; - state->v3 = xxh64_round(state->v3, get_unaligned_le64(p64)); - p64++; - state->v4 = xxh64_round(state->v4, get_unaligned_le64(p64)); - - p += 32 - state->memsize; - state->memsize = 0; - } - - if (p + 32 <= b_end) { - const uint8_t *const limit = b_end - 32; - uint64_t v1 = state->v1; - uint64_t v2 = state->v2; - uint64_t v3 = state->v3; - uint64_t v4 = state->v4; - - do { - v1 = xxh64_round(v1, get_unaligned_le64(p)); - p += 8; - v2 = xxh64_round(v2, get_unaligned_le64(p)); - p += 8; - v3 = xxh64_round(v3, get_unaligned_le64(p)); - p += 8; - v4 = xxh64_round(v4, get_unaligned_le64(p)); - p += 8; - } while (p <= limit); - - state->v1 = v1; - state->v2 = v2; - state->v3 = v3; - state->v4 = v4; - } - - if (p < b_end) { - __builtin_memcpy(state->mem64, p, (size_t)(b_end-p)); - state->memsize = (uint32_t)(b_end - p); - } - - return 0; -} - -XXH_API uint64_t xxh64_digest(const struct xxh64_state *state) -{ - const uint8_t *p = (const uint8_t *)state->mem64; - const uint8_t *const b_end = (const uint8_t *)state->mem64 + - state->memsize; - uint64_t h64; - - if (state->total_len >= 32) { - const uint64_t v1 = state->v1; - const uint64_t v2 = state->v2; - const uint64_t v3 = state->v3; - const uint64_t v4 = state->v4; - - h64 = xxh_rotl64(v1, 1) + xxh_rotl64(v2, 7) + - xxh_rotl64(v3, 12) + xxh_rotl64(v4, 18); - h64 = xxh64_merge_round(h64, v1); - h64 = xxh64_merge_round(h64, v2); - h64 = xxh64_merge_round(h64, v3); - h64 = xxh64_merge_round(h64, v4); - } else { - h64 = state->v3 + PRIME64_5; - } - - h64 += (uint64_t)state->total_len; - - while (p + 8 <= b_end) { - const uint64_t k1 = xxh64_round(0, get_unaligned_le64(p)); - - h64 ^= k1; - h64 = xxh_rotl64(h64, 27) * PRIME64_1 + PRIME64_4; - p += 8; - } - - if (p + 4 <= b_end) { - h64 ^= (uint64_t)(get_unaligned_le32(p)) * PRIME64_1; - h64 = xxh_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; - p += 4; - } - - while (p < b_end) { - h64 ^= (*p) * PRIME64_5; - h64 = xxh_rotl64(h64, 11) * PRIME64_1; - p++; - } - - h64 ^= h64 >> 33; - h64 *= PRIME64_2; - h64 ^= h64 >> 29; - h64 *= PRIME64_3; - h64 ^= h64 >> 32; - - return h64; -} - -#endif /* XXHASH_H */ diff --git a/third_party/zstd/contrib/linux-kernel/test/macro-test.sh b/third_party/zstd/contrib/linux-kernel/test/macro-test.sh deleted file mode 100644 index 9ea84aa..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/macro-test.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env sh - -set -e - -SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) -INCLUDE_DIR="$SCRIPT_DIR/../linux/include" -LIB_DIR="$SCRIPT_DIR/../linux/lib" - - -print() { - printf '%b' "${*}" -} - -println() { - printf '%b\n' "${*}" -} - -die() { - println "$@" 1>&2 - exit 1 -} - -test_not_present() { - print "Testing that '$1' is not present... " - grep -r $1 "$INCLUDE_DIR" "$LIB_DIR" && die "Fail!" - println "Okay" -} - -println "This test checks that the macro removal process worked as expected" -println "If this test fails, then freestanding.py wasn't able to remove one of these" -println "macros from the source code completely. You'll either need to rewrite the check" -println "or improve freestanding.py." -println "" - -test_not_present "ZSTD_NO_INTRINSICS" -test_not_present "ZSTD_NO_UNUSED_FUNCTIONS" -test_not_present "ZSTD_LEGACY_SUPPORT" -test_not_present "STATIC_BMI2" -test_not_present "ZSTD_DLL_EXPORT" -test_not_present "ZSTD_DLL_IMPORT" -test_not_present "__ICCARM__" -test_not_present "_MSC_VER" -test_not_present "_WIN32" -test_not_present "__linux__" diff --git a/third_party/zstd/contrib/linux-kernel/test/static_test.c b/third_party/zstd/contrib/linux-kernel/test/static_test.c deleted file mode 100644 index ba4a420..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/static_test.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#include -#include -#include -#include - -#include "decompress_sources.h" -#include - -#define CONTROL(x) \ - do { \ - if (!(x)) { \ - fprintf(stderr, "%s:%u: %s failed!\n", __FUNCTION__, __LINE__, #x); \ - abort(); \ - } \ - } while (0) - - -static const char kEmptyZstdFrame[] = { - 0x28, 0xb5, 0x2f, 0xfd, 0x24, 0x00, 0x01, 0x00, 0x00, 0x99, 0xe9, 0xd8, 0x51 -}; - -static void test_decompress_unzstd(void) { - fprintf(stderr, "Testing decompress unzstd... "); - { - size_t const wkspSize = zstd_dctx_workspace_bound(); - void* wksp = malloc(wkspSize); - ZSTD_DCtx* dctx = zstd_init_dctx(wksp, wkspSize); - CONTROL(wksp != NULL); - CONTROL(dctx != NULL); - { - size_t const dSize = zstd_decompress_dctx(dctx, NULL, 0, kEmptyZstdFrame, sizeof(kEmptyZstdFrame)); - CONTROL(!zstd_is_error(dSize)); - CONTROL(dSize == 0); - } - free(wksp); - } - fprintf(stderr, "Ok\n"); -} - -int main(void) { - test_decompress_unzstd(); - return 0; -} diff --git a/third_party/zstd/contrib/linux-kernel/test/test.c b/third_party/zstd/contrib/linux-kernel/test/test.c deleted file mode 100644 index 0f4ba3f..0000000 --- a/third_party/zstd/contrib/linux-kernel/test/test.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ -#include -#include -#include -#include - -#include - -#define CONTROL(x) \ - do { \ - if (!(x)) { \ - fprintf(stderr, "%s:%u: %s failed!\n", __FUNCTION__, __LINE__, #x); \ - abort(); \ - } \ - } while (0) - -typedef struct { - char *data; - char *data2; - size_t dataSize; - char *comp; - size_t compSize; -} test_data_t; - -static test_data_t create_test_data(void) { - test_data_t data; - data.dataSize = 128 * 1024; - data.data = (char*)malloc(data.dataSize); - CONTROL(data.data != NULL); - data.data2 = (char*)malloc(data.dataSize); - CONTROL(data.data2 != NULL); - data.compSize = zstd_compress_bound(data.dataSize); - data.comp = (char*)malloc(data.compSize); - CONTROL(data.comp != NULL); - memset(data.data, 0, data.dataSize); - return data; -} - -static void free_test_data(test_data_t const *data) { - free(data->data); - free(data->data2); - free(data->comp); -} - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -static void test_btrfs(test_data_t const *data) { - size_t const size = MIN(data->dataSize, 128 * 1024); - fprintf(stderr, "testing btrfs use cases... "); - for (int level = -1; level < 16; ++level) { - zstd_parameters params = zstd_get_params(level, size); - size_t const workspaceSize = - MAX(zstd_cstream_workspace_bound(¶ms.cParams), - zstd_dstream_workspace_bound(size)); - void *workspace = malloc(workspaceSize); - - char const *ip = data->data; - char const *iend = ip + size; - char *op = data->comp; - char *oend = op + data->compSize; - - CONTROL(params.cParams.windowLog <= 17); - CONTROL(workspace != NULL); - { - zstd_cstream *cctx = zstd_init_cstream(¶ms, size, workspace, workspaceSize); - zstd_out_buffer out = {NULL, 0, 0}; - zstd_in_buffer in = {NULL, 0, 0}; - CONTROL(cctx != NULL); - for (;;) { - if (in.pos == in.size) { - in.src = ip; - in.size = MIN(4096, iend - ip); - in.pos = 0; - ip += in.size; - } - - if (out.pos == out.size) { - out.dst = op; - out.size = MIN(4096, oend - op); - out.pos = 0; - op += out.size; - } - - if (ip != iend || in.pos < in.size) { - CONTROL(!zstd_is_error(zstd_compress_stream(cctx, &out, &in))); - } else { - size_t const ret = zstd_end_stream(cctx, &out); - CONTROL(!zstd_is_error(ret)); - if (ret == 0) { - break; - } - } - } - op += out.pos; - } - - ip = data->comp; - iend = op; - op = data->data2; - oend = op + size; - { - zstd_dstream *dctx = zstd_init_dstream(1ULL << params.cParams.windowLog, workspace, workspaceSize); - zstd_out_buffer out = {NULL, 0, 0}; - zstd_in_buffer in = {NULL, 0, 0}; - CONTROL(dctx != NULL); - for (;;) { - if (in.pos == in.size) { - in.src = ip; - in.size = MIN(4096, iend - ip); - in.pos = 0; - ip += in.size; - } - - if (out.pos == out.size) { - out.dst = op; - out.size = MIN(4096, oend - op); - out.pos = 0; - op += out.size; - } - { - size_t const ret = zstd_decompress_stream(dctx, &out, &in); - CONTROL(!zstd_is_error(ret)); - if (ret == 0) { - break; - } - } - } - } - CONTROL((size_t)(op - data->data2) == data->dataSize); - CONTROL(!memcmp(data->data, data->data2, data->dataSize)); - free(workspace); - } - fprintf(stderr, "Ok\n"); -} - -static void test_decompress_unzstd(test_data_t const *data) { - size_t cSize; - fprintf(stderr, "Testing decompress unzstd... "); - { - zstd_parameters params = zstd_get_params(19, 0); - size_t const wkspSize = zstd_cctx_workspace_bound(¶ms.cParams); - void* wksp = malloc(wkspSize); - zstd_cctx* cctx = zstd_init_cctx(wksp, wkspSize); - CONTROL(wksp != NULL); - CONTROL(cctx != NULL); - cSize = zstd_compress_cctx(cctx, data->comp, data->compSize, data->data, data->dataSize, ¶ms); - CONTROL(!zstd_is_error(cSize)); - free(wksp); - } - { - size_t const wkspSize = zstd_dctx_workspace_bound(); - void* wksp = malloc(wkspSize); - zstd_dctx* dctx = zstd_init_dctx(wksp, wkspSize); - CONTROL(wksp != NULL); - CONTROL(dctx != NULL); - { - size_t const dSize = zstd_decompress_dctx(dctx, data->data2, data->dataSize, data->comp, cSize); - CONTROL(!zstd_is_error(dSize)); - CONTROL(dSize == data->dataSize); - } - CONTROL(!memcmp(data->data, data->data2, data->dataSize)); - free(wksp); - } - fprintf(stderr, "Ok\n"); -} - -static void test_f2fs(void) { - fprintf(stderr, "testing f2fs uses... "); - CONTROL(zstd_min_clevel() < 0); - CONTROL(zstd_max_clevel() == 22); - fprintf(stderr, "Ok\n"); -} - -static char *g_stack = NULL; - -static void __attribute__((noinline)) use(void *x) { - asm volatile("" : "+r"(x)); -} - -static void __attribute__((noinline)) fill_stack(void) { - memset(g_stack, 0x33, 8192); -} - -static void __attribute__((noinline)) set_stack(void) { - - char stack[8192]; - g_stack = stack; - use(g_stack); -} - -static void __attribute__((noinline)) check_stack(void) { - size_t cleanStack = 0; - while (cleanStack < 8192 && g_stack[cleanStack] == 0x33) { - ++cleanStack; - } - { - size_t const stackSize = 8192 - cleanStack; - fprintf(stderr, "Maximum stack size: %zu\n", stackSize); - CONTROL(stackSize <= 2048 + 512); - } -} - -static void test_stack_usage(test_data_t const *data) { - set_stack(); - fill_stack(); - test_f2fs(); - test_btrfs(data); - test_decompress_unzstd(data); - check_stack(); -} - -int main(void) { - test_data_t data = create_test_data(); - test_f2fs(); - test_btrfs(&data); - test_decompress_unzstd(&data); - test_stack_usage(&data); - free_test_data(&data); - return 0; -} diff --git a/third_party/zstd/contrib/linux-kernel/zstd_common_module.c b/third_party/zstd/contrib/linux-kernel/zstd_common_module.c deleted file mode 100644 index 466828e..0000000 --- a/third_party/zstd/contrib/linux-kernel/zstd_common_module.c +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include - -#include "common/huf.h" -#include "common/fse.h" -#include "common/zstd_internal.h" - -// Export symbols shared by compress and decompress into a common module - -#undef ZSTD_isError /* defined within zstd_internal.h */ -EXPORT_SYMBOL_GPL(FSE_readNCount); -EXPORT_SYMBOL_GPL(HUF_readStats); -EXPORT_SYMBOL_GPL(HUF_readStats_wksp); -EXPORT_SYMBOL_GPL(ZSTD_isError); -EXPORT_SYMBOL_GPL(ZSTD_getErrorName); -EXPORT_SYMBOL_GPL(ZSTD_getErrorCode); - -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DESCRIPTION("Zstd Common"); diff --git a/third_party/zstd/contrib/linux-kernel/zstd_compress_module.c b/third_party/zstd/contrib/linux-kernel/zstd_compress_module.c deleted file mode 100644 index 804efe6..0000000 --- a/third_party/zstd/contrib/linux-kernel/zstd_compress_module.c +++ /dev/null @@ -1,237 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include -#include -#include -#include - -#include "common/zstd_deps.h" -#include "common/zstd_internal.h" -#include "compress/zstd_compress_internal.h" - -#define ZSTD_FORWARD_IF_ERR(ret) \ - do { \ - size_t const __ret = (ret); \ - if (ZSTD_isError(__ret)) \ - return __ret; \ - } while (0) - -static size_t zstd_cctx_init(zstd_cctx *cctx, const zstd_parameters *parameters, - unsigned long long pledged_src_size) -{ - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_reset( - cctx, ZSTD_reset_session_and_parameters)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setPledgedSrcSize( - cctx, pledged_src_size)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_windowLog, parameters->cParams.windowLog)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_hashLog, parameters->cParams.hashLog)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_chainLog, parameters->cParams.chainLog)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_searchLog, parameters->cParams.searchLog)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_minMatch, parameters->cParams.minMatch)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_targetLength, parameters->cParams.targetLength)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_strategy, parameters->cParams.strategy)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_contentSizeFlag, parameters->fParams.contentSizeFlag)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_checksumFlag, parameters->fParams.checksumFlag)); - ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( - cctx, ZSTD_c_dictIDFlag, !parameters->fParams.noDictIDFlag)); - return 0; -} - -int zstd_min_clevel(void) -{ - return ZSTD_minCLevel(); -} -EXPORT_SYMBOL(zstd_min_clevel); - -int zstd_max_clevel(void) -{ - return ZSTD_maxCLevel(); -} -EXPORT_SYMBOL(zstd_max_clevel); - -size_t zstd_compress_bound(size_t src_size) -{ - return ZSTD_compressBound(src_size); -} -EXPORT_SYMBOL(zstd_compress_bound); - -zstd_parameters zstd_get_params(int level, - unsigned long long estimated_src_size) -{ - return ZSTD_getParams(level, estimated_src_size, 0); -} -EXPORT_SYMBOL(zstd_get_params); - -size_t zstd_cctx_set_param(zstd_cctx *cctx, ZSTD_cParameter param, int value) -{ - return ZSTD_CCtx_setParameter(cctx, param, value); -} -EXPORT_SYMBOL(zstd_cctx_set_param); - -size_t zstd_cctx_workspace_bound(const zstd_compression_parameters *cparams) -{ - return ZSTD_estimateCCtxSize_usingCParams(*cparams); -} -EXPORT_SYMBOL(zstd_cctx_workspace_bound); - -// Used by zstd_cctx_workspace_bound_with_ext_seq_prod() -static size_t dummy_external_sequence_producer( - void *sequenceProducerState, - ZSTD_Sequence *outSeqs, size_t outSeqsCapacity, - const void *src, size_t srcSize, - const void *dict, size_t dictSize, - int compressionLevel, - size_t windowSize) -{ - (void)sequenceProducerState; - (void)outSeqs; (void)outSeqsCapacity; - (void)src; (void)srcSize; - (void)dict; (void)dictSize; - (void)compressionLevel; - (void)windowSize; - return ZSTD_SEQUENCE_PRODUCER_ERROR; -} - -static void init_cctx_params_from_compress_params( - ZSTD_CCtx_params *cctx_params, - const zstd_compression_parameters *compress_params) -{ - ZSTD_parameters zstd_params; - memset(&zstd_params, 0, sizeof(zstd_params)); - zstd_params.cParams = *compress_params; - ZSTD_CCtxParams_init_advanced(cctx_params, zstd_params); -} - -size_t zstd_cctx_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *compress_params) -{ - ZSTD_CCtx_params cctx_params; - init_cctx_params_from_compress_params(&cctx_params, compress_params); - ZSTD_CCtxParams_registerSequenceProducer(&cctx_params, NULL, dummy_external_sequence_producer); - return ZSTD_estimateCCtxSize_usingCCtxParams(&cctx_params); -} -EXPORT_SYMBOL(zstd_cctx_workspace_bound_with_ext_seq_prod); - -size_t zstd_cstream_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *compress_params) -{ - ZSTD_CCtx_params cctx_params; - init_cctx_params_from_compress_params(&cctx_params, compress_params); - ZSTD_CCtxParams_registerSequenceProducer(&cctx_params, NULL, dummy_external_sequence_producer); - return ZSTD_estimateCStreamSize_usingCCtxParams(&cctx_params); -} -EXPORT_SYMBOL(zstd_cstream_workspace_bound_with_ext_seq_prod); - -zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size) -{ - if (workspace == NULL) - return NULL; - return ZSTD_initStaticCCtx(workspace, workspace_size); -} -EXPORT_SYMBOL(zstd_init_cctx); - -size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity, - const void *src, size_t src_size, const zstd_parameters *parameters) -{ - ZSTD_FORWARD_IF_ERR(zstd_cctx_init(cctx, parameters, src_size)); - return ZSTD_compress2(cctx, dst, dst_capacity, src, src_size); -} -EXPORT_SYMBOL(zstd_compress_cctx); - -size_t zstd_cstream_workspace_bound(const zstd_compression_parameters *cparams) -{ - return ZSTD_estimateCStreamSize_usingCParams(*cparams); -} -EXPORT_SYMBOL(zstd_cstream_workspace_bound); - -zstd_cstream *zstd_init_cstream(const zstd_parameters *parameters, - unsigned long long pledged_src_size, void *workspace, size_t workspace_size) -{ - zstd_cstream *cstream; - - if (workspace == NULL) - return NULL; - - cstream = ZSTD_initStaticCStream(workspace, workspace_size); - if (cstream == NULL) - return NULL; - - /* 0 means unknown in linux zstd API but means 0 in new zstd API */ - if (pledged_src_size == 0) - pledged_src_size = ZSTD_CONTENTSIZE_UNKNOWN; - - if (ZSTD_isError(zstd_cctx_init(cstream, parameters, pledged_src_size))) - return NULL; - - return cstream; -} -EXPORT_SYMBOL(zstd_init_cstream); - -size_t zstd_reset_cstream(zstd_cstream *cstream, - unsigned long long pledged_src_size) -{ - if (pledged_src_size == 0) - pledged_src_size = ZSTD_CONTENTSIZE_UNKNOWN; - ZSTD_FORWARD_IF_ERR( ZSTD_CCtx_reset(cstream, ZSTD_reset_session_only) ); - ZSTD_FORWARD_IF_ERR( ZSTD_CCtx_setPledgedSrcSize(cstream, pledged_src_size) ); - return 0; -} -EXPORT_SYMBOL(zstd_reset_cstream); - -size_t zstd_compress_stream(zstd_cstream *cstream, zstd_out_buffer *output, - zstd_in_buffer *input) -{ - return ZSTD_compressStream(cstream, output, input); -} -EXPORT_SYMBOL(zstd_compress_stream); - -size_t zstd_flush_stream(zstd_cstream *cstream, zstd_out_buffer *output) -{ - return ZSTD_flushStream(cstream, output); -} -EXPORT_SYMBOL(zstd_flush_stream); - -size_t zstd_end_stream(zstd_cstream *cstream, zstd_out_buffer *output) -{ - return ZSTD_endStream(cstream, output); -} -EXPORT_SYMBOL(zstd_end_stream); - -void zstd_register_sequence_producer( - zstd_cctx *cctx, - void* sequence_producer_state, - zstd_sequence_producer_f sequence_producer -) { - ZSTD_registerSequenceProducer(cctx, sequence_producer_state, sequence_producer); -} -EXPORT_SYMBOL(zstd_register_sequence_producer); - -size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, size_t dst_capacity, - const zstd_sequence *in_seqs, size_t in_seqs_size, - const void* literals, size_t lit_size, size_t lit_capacity, - size_t decompressed_size) -{ - return ZSTD_compressSequencesAndLiterals(cctx, dst, dst_capacity, in_seqs, - in_seqs_size, literals, lit_size, - lit_capacity, decompressed_size); -} -EXPORT_SYMBOL(zstd_compress_sequences_and_literals); - -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DESCRIPTION("Zstd Compressor"); diff --git a/third_party/zstd/contrib/linux-kernel/zstd_decompress_module.c b/third_party/zstd/contrib/linux-kernel/zstd_decompress_module.c deleted file mode 100644 index 7d31518..0000000 --- a/third_party/zstd/contrib/linux-kernel/zstd_decompress_module.c +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include -#include -#include -#include - -#include "common/zstd_deps.h" - -/* Common symbols. zstd_compress must depend on zstd_decompress. */ - -unsigned int zstd_is_error(size_t code) -{ - return ZSTD_isError(code); -} -EXPORT_SYMBOL(zstd_is_error); - -zstd_error_code zstd_get_error_code(size_t code) -{ - return ZSTD_getErrorCode(code); -} -EXPORT_SYMBOL(zstd_get_error_code); - -const char *zstd_get_error_name(size_t code) -{ - return ZSTD_getErrorName(code); -} -EXPORT_SYMBOL(zstd_get_error_name); - -/* Decompression symbols. */ - -size_t zstd_dctx_workspace_bound(void) -{ - return ZSTD_estimateDCtxSize(); -} -EXPORT_SYMBOL(zstd_dctx_workspace_bound); - -zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size) -{ - if (workspace == NULL) - return NULL; - return ZSTD_initStaticDCtx(workspace, workspace_size); -} -EXPORT_SYMBOL(zstd_init_dctx); - -size_t zstd_decompress_dctx(zstd_dctx *dctx, void *dst, size_t dst_capacity, - const void *src, size_t src_size) -{ - return ZSTD_decompressDCtx(dctx, dst, dst_capacity, src, src_size); -} -EXPORT_SYMBOL(zstd_decompress_dctx); - -size_t zstd_dstream_workspace_bound(size_t max_window_size) -{ - return ZSTD_estimateDStreamSize(max_window_size); -} -EXPORT_SYMBOL(zstd_dstream_workspace_bound); - -zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace, - size_t workspace_size) -{ - if (workspace == NULL) - return NULL; - (void)max_window_size; - return ZSTD_initStaticDStream(workspace, workspace_size); -} -EXPORT_SYMBOL(zstd_init_dstream); - -size_t zstd_reset_dstream(zstd_dstream *dstream) -{ - return ZSTD_DCtx_reset(dstream, ZSTD_reset_session_only); -} -EXPORT_SYMBOL(zstd_reset_dstream); - -size_t zstd_decompress_stream(zstd_dstream *dstream, zstd_out_buffer *output, - zstd_in_buffer *input) -{ - return ZSTD_decompressStream(dstream, output, input); -} -EXPORT_SYMBOL(zstd_decompress_stream); - -size_t zstd_find_frame_compressed_size(const void *src, size_t src_size) -{ - return ZSTD_findFrameCompressedSize(src, src_size); -} -EXPORT_SYMBOL(zstd_find_frame_compressed_size); - -size_t zstd_get_frame_header(zstd_frame_header *header, const void *src, - size_t src_size) -{ - return ZSTD_getFrameHeader(header, src, src_size); -} -EXPORT_SYMBOL(zstd_get_frame_header); - -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DESCRIPTION("Zstd Decompressor"); diff --git a/third_party/zstd/contrib/linux-kernel/zstd_deps.h b/third_party/zstd/contrib/linux-kernel/zstd_deps.h deleted file mode 100644 index f931f7d..0000000 --- a/third_party/zstd/contrib/linux-kernel/zstd_deps.h +++ /dev/null @@ -1,121 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* - * This file provides common libc dependencies that zstd requires. - * The purpose is to allow replacing this file with a custom implementation - * to compile zstd without libc support. - */ - -/* Need: - * NULL - * INT_MAX - * UINT_MAX - * ZSTD_memcpy() - * ZSTD_memset() - * ZSTD_memmove() - */ -#ifndef ZSTD_DEPS_COMMON -#define ZSTD_DEPS_COMMON - -#include -#include - -#define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) -#define ZSTD_memmove(d,s,n) __builtin_memmove((d),(s),(n)) -#define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) - -#endif /* ZSTD_DEPS_COMMON */ - -/* - * Define malloc as always failing. That means the user must - * either use ZSTD_customMem or statically allocate memory. - * Need: - * ZSTD_malloc() - * ZSTD_free() - * ZSTD_calloc() - */ -#ifdef ZSTD_DEPS_NEED_MALLOC -#ifndef ZSTD_DEPS_MALLOC -#define ZSTD_DEPS_MALLOC - -#define ZSTD_malloc(s) ({ (void)(s); NULL; }) -#define ZSTD_free(p) ((void)(p)) -#define ZSTD_calloc(n,s) ({ (void)(n); (void)(s); NULL; }) - -#endif /* ZSTD_DEPS_MALLOC */ -#endif /* ZSTD_DEPS_NEED_MALLOC */ - -/* - * Provides 64-bit math support. - * Need: - * U64 ZSTD_div64(U64 dividend, U32 divisor) - */ -#ifdef ZSTD_DEPS_NEED_MATH64 -#ifndef ZSTD_DEPS_MATH64 -#define ZSTD_DEPS_MATH64 - -#include - -static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) { - return div_u64(dividend, divisor); -} - -#endif /* ZSTD_DEPS_MATH64 */ -#endif /* ZSTD_DEPS_NEED_MATH64 */ - -/* - * This is only requested when DEBUGLEVEL >= 1, meaning - * it is disabled in production. - * Need: - * assert() - */ -#ifdef ZSTD_DEPS_NEED_ASSERT -#ifndef ZSTD_DEPS_ASSERT -#define ZSTD_DEPS_ASSERT - -#include - -#define assert(x) WARN_ON(!(x)) - -#endif /* ZSTD_DEPS_ASSERT */ -#endif /* ZSTD_DEPS_NEED_ASSERT */ - -/* - * This is only requested when DEBUGLEVEL >= 2, meaning - * it is disabled in production. - * Need: - * ZSTD_DEBUG_PRINT() - */ -#ifdef ZSTD_DEPS_NEED_IO -#ifndef ZSTD_DEPS_IO -#define ZSTD_DEPS_IO - -#include - -#define ZSTD_DEBUG_PRINT(...) pr_debug(__VA_ARGS__) - -#endif /* ZSTD_DEPS_IO */ -#endif /* ZSTD_DEPS_NEED_IO */ - -/* - * Only requested when MSAN is enabled. - * Need: - * intptr_t - */ -#ifdef ZSTD_DEPS_NEED_STDINT -#ifndef ZSTD_DEPS_STDINT -#define ZSTD_DEPS_STDINT - -/* intptr_t already provided by ZSTD_DEPS_COMMON */ - -#endif /* ZSTD_DEPS_STDINT */ -#endif /* ZSTD_DEPS_NEED_STDINT */ diff --git a/third_party/zstd/contrib/match_finders/README.md b/third_party/zstd/contrib/match_finders/README.md deleted file mode 100644 index 54055c3..0000000 --- a/third_party/zstd/contrib/match_finders/README.md +++ /dev/null @@ -1,42 +0,0 @@ -## Edit Distance Match Finder - -``` -/* This match finder leverages techniques used in file comparison algorithms - * to find matches between a dictionary and a source file. - * - * The original motivation for studying this approach was to try and optimize - * Zstandard for the use case of patching: the most common scenario being - * updating an existing software package with the next version. When patching, - * the difference between the old version of the package and the new version - * is generally tiny (most of the new file will be identical to - * the old one). In more technical terms, the edit distance (the minimal number - * of changes required to take one sequence of bytes to another) between the - * files would be small relative to the size of the file. - * - * Various 'diffing' algorithms utilize this notion of edit distance and - * the corresponding concept of a minimal edit script between two - * sequences to identify the regions within two files where they differ. - * The core algorithm used in this match finder is described in: - * - * "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, - * Algorithmica Vol. 1, 1986, pp. 251-266, - * . - * - * Additional algorithmic heuristics for speed improvement have also been included. - * These we inspired from implementations of various regular and binary diffing - * algorithms such as GNU diff, bsdiff, and Xdelta. - * - * Note: after some experimentation, this approach proved to not provide enough - * utility to justify the additional CPU used in finding matches. The one area - * where this approach consistently outperforms Zstandard even on level 19 is - * when compressing small files (<10 KB) using an equally small dictionary that - * is very similar to the source file. For the use case that this was intended, - * (large similar files) this approach by itself took 5-10X longer than zstd-19 and - * generally resulted in 2-3X larger files. The core advantage that zstd-19 has - * over this approach for match finding is the overlapping matches. This approach - * cannot find any. - * - * I'm leaving this in the contrib section in case this ever becomes interesting - * to explore again. - * */ -``` diff --git a/third_party/zstd/contrib/match_finders/zstd_edist.c b/third_party/zstd/contrib/match_finders/zstd_edist.c deleted file mode 100644 index d685cdd..0000000 --- a/third_party/zstd/contrib/match_finders/zstd_edist.c +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/*-************************************* -* Dependencies -***************************************/ - -/* Currently relies on qsort when combining contiguous matches. This can probably - * be avoided but would require changes to the algorithm. The qsort is far from - * the bottleneck in this algorithm even for medium sized files so it's probably - * not worth trying to address */ -#include -#include - -#include "zstd_edist.h" -#include "mem.h" - -/*-************************************* -* Constants -***************************************/ - -/* Just a sential for the entries of the diagonal matrix */ -#define ZSTD_EDIST_DIAG_MAX (S32)(1 << 30) - -/* How large should a snake be to be considered a 'big' snake. - * For an explanation of what a 'snake' is with respect to the - * edit distance matrix, see the linked paper in zstd_edist.h */ -#define ZSTD_EDIST_SNAKE_THRESH 20 - -/* After how many iterations should we start to use the heuristic - * based on 'big' snakes */ -#define ZSTD_EDIST_SNAKE_ITER_THRESH 200 - -/* After how many iterations should be just give up and take - * the best available edit script for this round */ -#define ZSTD_EDIST_EXPENSIVE_THRESH 1024 - -/*-************************************* -* Structures -***************************************/ - -typedef struct { - U32 dictIdx; - U32 srcIdx; - U32 matchLength; -} ZSTD_eDist_match; - -typedef struct { - const BYTE* dict; - const BYTE* src; - size_t dictSize; - size_t srcSize; - S32* forwardDiag; /* Entries of the forward diagonal stored here */ - S32* backwardDiag; /* Entries of the backward diagonal stored here. - * Note: this buffer and the 'forwardDiag' buffer - * are contiguous. See the ZSTD_eDist_genSequences */ - ZSTD_eDist_match* matches; /* Accumulate matches of length 1 in this buffer. - * In a subsequence post-processing step, we combine - * contiguous matches. */ - U32 nbMatches; -} ZSTD_eDist_state; - -typedef struct { - S32 dictMid; /* The mid diagonal for the dictionary */ - S32 srcMid; /* The mid diagonal for the source */ - int lowUseHeuristics; /* Should we use heuristics for the low part */ - int highUseHeuristics; /* Should we use heuristics for the high part */ -} ZSTD_eDist_partition; - -/*-************************************* -* Internal -***************************************/ - -static void ZSTD_eDist_diag(ZSTD_eDist_state* state, - ZSTD_eDist_partition* partition, - S32 dictLow, S32 dictHigh, S32 srcLow, - S32 srcHigh, int useHeuristics) -{ - S32* const forwardDiag = state->forwardDiag; - S32* const backwardDiag = state->backwardDiag; - const BYTE* const dict = state->dict; - const BYTE* const src = state->src; - - S32 const diagMin = dictLow - srcHigh; - S32 const diagMax = dictHigh - srcLow; - S32 const forwardMid = dictLow - srcLow; - S32 const backwardMid = dictHigh - srcHigh; - - S32 forwardMin = forwardMid; - S32 forwardMax = forwardMid; - S32 backwardMin = backwardMid; - S32 backwardMax = backwardMid; - int odd = (forwardMid - backwardMid) & 1; - U32 iterations; - - forwardDiag[forwardMid] = dictLow; - backwardDiag[backwardMid] = dictHigh; - - /* Main loop for updating diag entries. Unless useHeuristics is - * set to false, this loop will run until it finds the minimal - * edit script */ - for (iterations = 1;;iterations++) { - S32 diag; - int bigSnake = 0; - - if (forwardMin > diagMin) { - forwardMin--; - forwardDiag[forwardMin - 1] = -1; - } else { - forwardMin++; - } - - if (forwardMax < diagMax) { - forwardMax++; - forwardDiag[forwardMax + 1] = -1; - } else { - forwardMax--; - } - - for (diag = forwardMax; diag >= forwardMin; diag -= 2) { - S32 dictIdx; - S32 srcIdx; - S32 low = forwardDiag[diag - 1]; - S32 high = forwardDiag[diag + 1]; - S32 dictIdx0 = low < high ? high : low + 1; - - for (dictIdx = dictIdx0, srcIdx = dictIdx0 - diag; - dictIdx < dictHigh && srcIdx < srcHigh && dict[dictIdx] == src[srcIdx]; - dictIdx++, srcIdx++) continue; - - if (dictIdx - dictIdx0 > ZSTD_EDIST_SNAKE_THRESH) - bigSnake = 1; - - forwardDiag[diag] = dictIdx; - - if (odd && backwardMin <= diag && diag <= backwardMax && backwardDiag[diag] <= dictIdx) { - partition->dictMid = dictIdx; - partition->srcMid = srcIdx; - partition->lowUseHeuristics = 0; - partition->highUseHeuristics = 0; - return; - } - } - - if (backwardMin > diagMin) { - backwardMin--; - backwardDiag[backwardMin - 1] = ZSTD_EDIST_DIAG_MAX; - } else { - backwardMin++; - } - - if (backwardMax < diagMax) { - backwardMax++; - backwardDiag[backwardMax + 1] = ZSTD_EDIST_DIAG_MAX; - } else { - backwardMax--; - } - - - for (diag = backwardMax; diag >= backwardMin; diag -= 2) { - S32 dictIdx; - S32 srcIdx; - S32 low = backwardDiag[diag - 1]; - S32 high = backwardDiag[diag + 1]; - S32 dictIdx0 = low < high ? low : high - 1; - - for (dictIdx = dictIdx0, srcIdx = dictIdx0 - diag; - dictLow < dictIdx && srcLow < srcIdx && dict[dictIdx - 1] == src[srcIdx - 1]; - dictIdx--, srcIdx--) continue; - - if (dictIdx0 - dictIdx > ZSTD_EDIST_SNAKE_THRESH) - bigSnake = 1; - - backwardDiag[diag] = dictIdx; - - if (!odd && forwardMin <= diag && diag <= forwardMax && dictIdx <= forwardDiag[diag]) { - partition->dictMid = dictIdx; - partition->srcMid = srcIdx; - partition->lowUseHeuristics = 0; - partition->highUseHeuristics = 0; - return; - } - } - - if (!useHeuristics) - continue; - - /* Everything under this point is a heuristic. Using these will - * substantially speed up the match finding. In some cases, taking - * the total match finding time from several minutes to seconds. - * Of course, the caveat is that the edit script found may no longer - * be optimal */ - - /* Big snake heuristic */ - if (iterations > ZSTD_EDIST_SNAKE_ITER_THRESH && bigSnake) { - { - S32 best = 0; - - for (diag = forwardMax; diag >= forwardMin; diag -= 2) { - S32 diagDiag = diag - forwardMid; - S32 dictIdx = forwardDiag[diag]; - S32 srcIdx = dictIdx - diag; - S32 v = (dictIdx - dictLow) * 2 - diagDiag; - - if (v > 12 * (iterations + (diagDiag < 0 ? -diagDiag : diagDiag))) { - if (v > best - && dictLow + ZSTD_EDIST_SNAKE_THRESH <= dictIdx && dictIdx <= dictHigh - && srcLow + ZSTD_EDIST_SNAKE_THRESH <= srcIdx && srcIdx <= srcHigh) { - S32 k; - for (k = 1; dict[dictIdx - k] == src[srcIdx - k]; k++) { - if (k == ZSTD_EDIST_SNAKE_THRESH) { - best = v; - partition->dictMid = dictIdx; - partition->srcMid = srcIdx; - break; - } - } - } - } - } - - if (best > 0) { - partition->lowUseHeuristics = 0; - partition->highUseHeuristics = 1; - return; - } - } - - { - S32 best = 0; - - for (diag = backwardMax; diag >= backwardMin; diag -= 2) { - S32 diagDiag = diag - backwardMid; - S32 dictIdx = backwardDiag[diag]; - S32 srcIdx = dictIdx - diag; - S32 v = (dictHigh - dictIdx) * 2 + diagDiag; - - if (v > 12 * (iterations + (diagDiag < 0 ? -diagDiag : diagDiag))) { - if (v > best - && dictLow < dictIdx && dictIdx <= dictHigh - ZSTD_EDIST_SNAKE_THRESH - && srcLow < srcIdx && srcIdx <= srcHigh - ZSTD_EDIST_SNAKE_THRESH) { - int k; - for (k = 0; dict[dictIdx + k] == src[srcIdx + k]; k++) { - if (k == ZSTD_EDIST_SNAKE_THRESH - 1) { - best = v; - partition->dictMid = dictIdx; - partition->srcMid = srcIdx; - break; - } - } - } - } - } - - if (best > 0) { - partition->lowUseHeuristics = 1; - partition->highUseHeuristics = 0; - return; - } - } - } - - /* More general 'too expensive' heuristic */ - if (iterations >= ZSTD_EDIST_EXPENSIVE_THRESH) { - S32 forwardDictSrcBest; - S32 forwardDictBest = 0; - S32 backwardDictSrcBest; - S32 backwardDictBest = 0; - - forwardDictSrcBest = -1; - for (diag = forwardMax; diag >= forwardMin; diag -= 2) { - S32 dictIdx = MIN(forwardDiag[diag], dictHigh); - S32 srcIdx = dictIdx - diag; - - if (srcHigh < srcIdx) { - dictIdx = srcHigh + diag; - srcIdx = srcHigh; - } - - if (forwardDictSrcBest < dictIdx + srcIdx) { - forwardDictSrcBest = dictIdx + srcIdx; - forwardDictBest = dictIdx; - } - } - - backwardDictSrcBest = ZSTD_EDIST_DIAG_MAX; - for (diag = backwardMax; diag >= backwardMin; diag -= 2) { - S32 dictIdx = MAX(dictLow, backwardDiag[diag]); - S32 srcIdx = dictIdx - diag; - - if (srcIdx < srcLow) { - dictIdx = srcLow + diag; - srcIdx = srcLow; - } - - if (dictIdx + srcIdx < backwardDictSrcBest) { - backwardDictSrcBest = dictIdx + srcIdx; - backwardDictBest = dictIdx; - } - } - - if ((dictHigh + srcHigh) - backwardDictSrcBest < forwardDictSrcBest - (dictLow + srcLow)) { - partition->dictMid = forwardDictBest; - partition->srcMid = forwardDictSrcBest - forwardDictBest; - partition->lowUseHeuristics = 0; - partition->highUseHeuristics = 1; - } else { - partition->dictMid = backwardDictBest; - partition->srcMid = backwardDictSrcBest - backwardDictBest; - partition->lowUseHeuristics = 1; - partition->highUseHeuristics = 0; - } - return; - } - } -} - -static void ZSTD_eDist_insertMatch(ZSTD_eDist_state* state, - S32 const dictIdx, S32 const srcIdx) -{ - state->matches[state->nbMatches].dictIdx = dictIdx; - state->matches[state->nbMatches].srcIdx = srcIdx; - state->matches[state->nbMatches].matchLength = 1; - state->nbMatches++; -} - -static int ZSTD_eDist_compare(ZSTD_eDist_state* state, - S32 dictLow, S32 dictHigh, S32 srcLow, - S32 srcHigh, int useHeuristics) -{ - const BYTE* const dict = state->dict; - const BYTE* const src = state->src; - - /* Found matches while traversing from the low end */ - while (dictLow < dictHigh && srcLow < srcHigh && dict[dictLow] == src[srcLow]) { - ZSTD_eDist_insertMatch(state, dictLow, srcLow); - dictLow++; - srcLow++; - } - - /* Found matches while traversing from the high end */ - while (dictLow < dictHigh && srcLow < srcHigh && dict[dictHigh - 1] == src[srcHigh - 1]) { - ZSTD_eDist_insertMatch(state, dictHigh - 1, srcHigh - 1); - dictHigh--; - srcHigh--; - } - - /* If the low and high end end up touching. If we wanted to make - * note of the differences like most diffing algorithms do, we would - * do so here. In our case, we're only concerned with matches - * Note: if you wanted to find the edit distance of the algorithm, - * you could just accumulate the cost for an insertion/deletion - * below. */ - if (dictLow == dictHigh) { - while (srcLow < srcHigh) { - /* Reaching this point means inserting src[srcLow] into - * the current position of dict */ - srcLow++; - } - } else if (srcLow == srcHigh) { - while (dictLow < dictHigh) { - /* Reaching this point means deleting dict[dictLow] from - * the current position of dict */ - dictLow++; - } - } else { - ZSTD_eDist_partition partition; - partition.dictMid = 0; - partition.srcMid = 0; - ZSTD_eDist_diag(state, &partition, dictLow, dictHigh, - srcLow, srcHigh, useHeuristics); - if (ZSTD_eDist_compare(state, dictLow, partition.dictMid, - srcLow, partition.srcMid, partition.lowUseHeuristics)) - return 1; - if (ZSTD_eDist_compare(state, partition.dictMid, dictHigh, - partition.srcMid, srcHigh, partition.highUseHeuristics)) - return 1; - } - - return 0; -} - -static int ZSTD_eDist_matchComp(const void* p, const void* q) -{ - S32 const l = ((ZSTD_eDist_match*)p)->srcIdx; - S32 const r = ((ZSTD_eDist_match*)q)->srcIdx; - return (l - r); -} - -/* The matches from the approach above will all be of the form - * (dictIdx, srcIdx, 1). This method combines contiguous matches - * of length MINMATCH or greater. Matches less than MINMATCH - * are discarded */ -static void ZSTD_eDist_combineMatches(ZSTD_eDist_state* state) -{ - /* Create a new buffer to put the combined matches into - * and memcpy to state->matches after */ - ZSTD_eDist_match* combinedMatches = - ZSTD_malloc(state->nbMatches * sizeof(ZSTD_eDist_match), - ZSTD_defaultCMem); - - U32 nbCombinedMatches = 1; - size_t i; - - /* Make sure that the srcIdx and dictIdx are in sorted order. - * The combination step won't work otherwise */ - qsort(state->matches, state->nbMatches, sizeof(ZSTD_eDist_match), ZSTD_eDist_matchComp); - - memcpy(combinedMatches, state->matches, sizeof(ZSTD_eDist_match)); - for (i = 1; i < state->nbMatches; i++) { - ZSTD_eDist_match const match = state->matches[i]; - ZSTD_eDist_match const combinedMatch = - combinedMatches[nbCombinedMatches - 1]; - if (combinedMatch.srcIdx + combinedMatch.matchLength == match.srcIdx && - combinedMatch.dictIdx + combinedMatch.matchLength == match.dictIdx) { - combinedMatches[nbCombinedMatches - 1].matchLength++; - } else { - /* Discard matches that are less than MINMATCH */ - if (combinedMatches[nbCombinedMatches - 1].matchLength < MINMATCH) { - nbCombinedMatches--; - } - - memcpy(combinedMatches + nbCombinedMatches, - state->matches + i, sizeof(ZSTD_eDist_match)); - nbCombinedMatches++; - } - } - memcpy(state->matches, combinedMatches, nbCombinedMatches * sizeof(ZSTD_eDist_match)); - state->nbMatches = nbCombinedMatches; - ZSTD_free(combinedMatches, ZSTD_defaultCMem); -} - -static size_t ZSTD_eDist_convertMatchesToSequences(ZSTD_Sequence* sequences, - ZSTD_eDist_state* state) -{ - const ZSTD_eDist_match* matches = state->matches; - size_t const nbMatches = state->nbMatches; - size_t const dictSize = state->dictSize; - size_t nbSequences = 0; - size_t i; - for (i = 0; i < nbMatches; i++) { - ZSTD_eDist_match const match = matches[i]; - U32 const litLength = !i ? match.srcIdx : - match.srcIdx - (matches[i - 1].srcIdx + matches[i - 1].matchLength); - U32 const offset = (match.srcIdx + dictSize) - match.dictIdx; - U32 const matchLength = match.matchLength; - sequences[nbSequences].offset = offset; - sequences[nbSequences].litLength = litLength; - sequences[nbSequences].matchLength = matchLength; - nbSequences++; - } - return nbSequences; -} - -/*-************************************* -* Internal utils -***************************************/ - -static size_t ZSTD_eDist_hamingDist(const BYTE* const a, - const BYTE* const b, size_t n) -{ - size_t i; - size_t dist = 0; - for (i = 0; i < n; i++) - dist += a[i] != b[i]; - return dist; -} - -/* This is a pretty naive recursive implementation that should only - * be used for quick tests obviously. Don't try and run this on a - * GB file or something. There are faster implementations. Use those - * if you need to run it for large files. */ -static size_t ZSTD_eDist_levenshteinDist(const BYTE* const s, - size_t const sn, const BYTE* const t, - size_t const tn) -{ - size_t a, b, c; - - if (!sn) - return tn; - if (!tn) - return sn; - - if (s[sn - 1] == t[tn - 1]) - return ZSTD_eDist_levenshteinDist( - s, sn - 1, t, tn - 1); - - a = ZSTD_eDist_levenshteinDist(s, sn - 1, t, tn - 1); - b = ZSTD_eDist_levenshteinDist(s, sn, t, tn - 1); - c = ZSTD_eDist_levenshteinDist(s, sn - 1, t, tn); - - if (a > b) - a = b; - if (a > c) - a = c; - - return a + 1; -} - -static void ZSTD_eDist_validateMatches(ZSTD_eDist_match* matches, - size_t const nbMatches, const BYTE* const dict, - size_t const dictSize, const BYTE* const src, - size_t const srcSize) -{ - size_t i; - for (i = 0; i < nbMatches; i++) { - ZSTD_eDist_match match = matches[i]; - U32 const dictIdx = match.dictIdx; - U32 const srcIdx = match.srcIdx; - U32 const matchLength = match.matchLength; - - assert(dictIdx + matchLength < dictSize); - assert(srcIdx + matchLength < srcSize); - assert(!memcmp(dict + dictIdx, src + srcIdx, matchLength)); - } -} - -/*-************************************* -* API -***************************************/ - -size_t ZSTD_eDist_genSequences(ZSTD_Sequence* sequences, - const void* dict, size_t dictSize, - const void* src, size_t srcSize, - int useHeuristics) -{ - size_t const nbDiags = dictSize + srcSize + 3; - S32* buffer = ZSTD_malloc(nbDiags * 2 * sizeof(S32), ZSTD_defaultCMem); - ZSTD_eDist_state state; - size_t nbSequences = 0; - - state.dict = (const BYTE*)dict; - state.src = (const BYTE*)src; - state.dictSize = dictSize; - state.srcSize = srcSize; - state.forwardDiag = buffer; - state.backwardDiag = buffer + nbDiags; - state.forwardDiag += srcSize + 1; - state.backwardDiag += srcSize + 1; - state.matches = ZSTD_malloc(srcSize * sizeof(ZSTD_eDist_match), ZSTD_defaultCMem); - state.nbMatches = 0; - - ZSTD_eDist_compare(&state, 0, dictSize, 0, srcSize, 1); - ZSTD_eDist_combineMatches(&state); - nbSequences = ZSTD_eDist_convertMatchesToSequences(sequences, &state); - - ZSTD_free(buffer, ZSTD_defaultCMem); - ZSTD_free(state.matches, ZSTD_defaultCMem); - - return nbSequences; -} diff --git a/third_party/zstd/contrib/match_finders/zstd_edist.h b/third_party/zstd/contrib/match_finders/zstd_edist.h deleted file mode 100644 index c739e2a..0000000 --- a/third_party/zstd/contrib/match_finders/zstd_edist.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* This match finder leverages techniques used in file comparison algorithms - * to find matches between a dictionary and a source file. - * - * The original motivation for studying this approach was to try and optimize - * Zstandard for the use case of patching: the most common scenario being - * updating an existing software package with the next version. When patching, - * the difference between the old version of the package and the new version - * is generally tiny (most of the new file will be identical to - * the old one). In more technical terms, the edit distance (the minimal number - * of changes required to take one sequence of bytes to another) between the - * files would be small relative to the size of the file. - * - * Various 'diffing' algorithms utilize this notion of edit distance and - * the corresponding concept of a minimal edit script between two - * sequences to identify the regions within two files where they differ. - * The core algorithm used in this match finder is described in: - * - * "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, - * Algorithmica Vol. 1, 1986, pp. 251-266, - * . - * - * Additional algorithmic heuristics for speed improvement have also been included. - * These we inspired from implementations of various regular and binary diffing - * algorithms such as GNU diff, bsdiff, and Xdelta. - * - * Note: after some experimentation, this approach proved to not provide enough - * utility to justify the additional CPU used in finding matches. The one area - * where this approach consistently outperforms Zstandard even on level 19 is - * when compressing small files (<10 KB) using an equally small dictionary that - * is very similar to the source file. For the use case that this was intended, - * (large similar files) this approach by itself took 5-10X longer than zstd-19 and - * generally resulted in 2-3X larger files. The core advantage that zstd-19 has - * over this approach for match finding is the overlapping matches. This approach - * cannot find any. - * - * I'm leaving this in the contrib section in case this ever becomes interesting - * to explore again. - * */ - -#ifndef ZSTD_EDIST_H -#define ZSTD_EDIST_H - -/*-************************************* -* Dependencies -***************************************/ - -#include -#include "zstd_internal.h" /* ZSTD_Sequence */ - -/*! ZSTD_eDist_genSequences() : - * Will populate the provided ZSTD_Sequence buffer with sequences - * based on the optimal or near-optimal (depending on 'useHeuristics') - * edit script between 'dict' and 'src.' - * @return : the number of sequences found */ -size_t ZSTD_eDist_genSequences(ZSTD_Sequence* sequences, - const void* dict, size_t dictSize, - const void* src, size_t srcSize, - int useHeuristics); - -#endif diff --git a/third_party/zstd/contrib/premake/premake4.lua b/third_party/zstd/contrib/premake/premake4.lua deleted file mode 100644 index 6675e2e..0000000 --- a/third_party/zstd/contrib/premake/premake4.lua +++ /dev/null @@ -1,6 +0,0 @@ --- Include zstd.lua in your GENie or premake4 file, which exposes a project_zstd function -dofile('zstd.lua') - -solution 'example' - configurations { 'Debug', 'Release' } - project_zstd('../../lib/') diff --git a/third_party/zstd/contrib/premake/zstd.lua b/third_party/zstd/contrib/premake/zstd.lua deleted file mode 100644 index df1ace3..0000000 --- a/third_party/zstd/contrib/premake/zstd.lua +++ /dev/null @@ -1,80 +0,0 @@ --- This GENie/premake file copies the behavior of the Makefile in the lib folder. --- Basic usage: project_zstd(ZSTD_DIR) - -function project_zstd(dir, compression, decompression, deprecated, dictbuilder, legacy) - if compression == nil then compression = true end - if decompression == nil then decompression = true end - if deprecated == nil then deprecated = false end - if dictbuilder == nil then dictbuilder = false end - - if legacy == nil then legacy = 0 end - - if not compression then - dictbuilder = false - deprecated = false - end - - if not decompression then - legacy = 0 - deprecated = false - end - - project 'zstd' - kind 'StaticLib' - language 'C' - - files { - dir .. 'zstd.h', - dir .. 'common/**.c', - dir .. 'common/**.h' - } - - if compression then - files { - dir .. 'compress/**.c', - dir .. 'compress/**.h' - } - end - - if decompression then - files { - dir .. 'decompress/**.c', - dir .. 'decompress/**.h' - } - end - - if dictbuilder then - files { - dir .. 'dictBuilder/**.c', - dir .. 'dictBuilder/**.h' - } - end - - if deprecated then - files { - dir .. 'deprecated/**.c', - dir .. 'deprecated/**.h' - } - end - - if legacy ~= 0 then - if legacy >= 8 then - files { - dir .. 'legacy/zstd_v0' .. (legacy - 7) .. '.*' - } - end - includedirs { - dir .. 'legacy' - } - end - - includedirs { - dir, - dir .. 'common' - } - - defines { - 'XXH_NAMESPACE=ZSTD_', - 'ZSTD_LEGACY_SUPPORT=' .. legacy - } -end diff --git a/third_party/zstd/contrib/pzstd/.gitignore b/third_party/zstd/contrib/pzstd/.gitignore deleted file mode 100644 index 84e68fb..0000000 --- a/third_party/zstd/contrib/pzstd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# compilation result -pzstd diff --git a/third_party/zstd/contrib/pzstd/BUCK b/third_party/zstd/contrib/pzstd/BUCK deleted file mode 100644 index d04eeed..0000000 --- a/third_party/zstd/contrib/pzstd/BUCK +++ /dev/null @@ -1,72 +0,0 @@ -cxx_library( - name='libpzstd', - visibility=['PUBLIC'], - header_namespace='', - exported_headers=[ - 'ErrorHolder.h', - 'Logging.h', - 'Pzstd.h', - ], - headers=[ - 'SkippableFrame.h', - ], - srcs=[ - 'Pzstd.cpp', - 'SkippableFrame.cpp', - ], - deps=[ - ':options', - '//contrib/pzstd/utils:utils', - '//lib:mem', - '//lib:zstd', - ], -) - -cxx_library( - name='options', - visibility=['PUBLIC'], - header_namespace='', - exported_headers=['Options.h'], - srcs=['Options.cpp'], - deps=[ - '//contrib/pzstd/utils:scope_guard', - '//lib:zstd', - '//programs:util', - ], -) - -cxx_binary( - name='pzstd', - visibility=['PUBLIC'], - srcs=['main.cpp'], - deps=[ - ':libpzstd', - ':options', - ], -) - -# Must run "make googletest" first -cxx_library( - name='gtest', - srcs=glob([ - 'googletest/googletest/src/gtest-all.cc', - 'googletest/googlemock/src/gmock-all.cc', - 'googletest/googlemock/src/gmock_main.cc', - ]), - header_namespace='', - exported_headers=subdir_glob([ - ('googletest/googletest/include', '**/*.h'), - ('googletest/googlemock/include', '**/*.h'), - ]), - headers=subdir_glob([ - ('googletest/googletest', 'src/*.cc'), - ('googletest/googletest', 'src/*.h'), - ('googletest/googlemock', 'src/*.cc'), - ('googletest/googlemock', 'src/*.h'), - ]), - platform_linker_flags=[ - ('android', []), - ('', ['-lpthread']), - ], - visibility=['PUBLIC'], -) diff --git a/third_party/zstd/contrib/pzstd/ErrorHolder.h b/third_party/zstd/contrib/pzstd/ErrorHolder.h deleted file mode 100644 index 2c2797e..0000000 --- a/third_party/zstd/contrib/pzstd/ErrorHolder.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include -#include -#include -#include - -namespace pzstd { - -// Coordinates graceful shutdown of the pzstd pipeline -class ErrorHolder { - std::atomic error_; - std::string message_; - - public: - ErrorHolder() : error_(false) {} - - bool hasError() noexcept { - return error_.load(); - } - - void setError(std::string message) noexcept { - // Given multiple possibly concurrent calls, exactly one will ever succeed. - bool expected = false; - if (error_.compare_exchange_strong(expected, true)) { - message_ = std::move(message); - } - } - - bool check(bool predicate, std::string message) noexcept { - if (!predicate) { - setError(std::move(message)); - } - return !hasError(); - } - - std::string getError() noexcept { - error_.store(false); - return std::move(message_); - } - - ~ErrorHolder() { - assert(!hasError()); - } -}; -} diff --git a/third_party/zstd/contrib/pzstd/Logging.h b/third_party/zstd/contrib/pzstd/Logging.h deleted file mode 100644 index 84a08d2..0000000 --- a/third_party/zstd/contrib/pzstd/Logging.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include -#include - -namespace pzstd { - -constexpr int kLogError = 1; -constexpr int kLogInfo = 2; -constexpr int kLogDebug = 3; -constexpr int kLogVerbose = 4; - -class Logger { - std::mutex mutex_; - FILE* out_; - const int level_; - - using Clock = std::chrono::system_clock; - Clock::time_point lastUpdate_; - std::chrono::milliseconds refreshRate_; - - public: - explicit Logger(int level, FILE* out = stderr) - : out_(out), level_(level), lastUpdate_(Clock::now()), - refreshRate_(150) {} - - - bool logsAt(int level) { - return level <= level_; - } - - template - void operator()(int level, const char *fmt, Args... args) { - if (level > level_) { - return; - } - std::lock_guard lock(mutex_); - std::fprintf(out_, fmt, args...); - } - - template - void update(int level, const char *fmt, Args... args) { - if (level > level_) { - return; - } - std::lock_guard lock(mutex_); - auto now = Clock::now(); - if (now - lastUpdate_ > refreshRate_) { - lastUpdate_ = now; - std::fprintf(out_, "\r"); - std::fprintf(out_, fmt, args...); - } - } - - void clear(int level) { - if (level > level_) { - return; - } - std::lock_guard lock(mutex_); - std::fprintf(out_, "\r%79s\r", ""); - } -}; - -} diff --git a/third_party/zstd/contrib/pzstd/Makefile b/third_party/zstd/contrib/pzstd/Makefile deleted file mode 100644 index e4b3e8a..0000000 --- a/third_party/zstd/contrib/pzstd/Makefile +++ /dev/null @@ -1,265 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -# Standard variables for installation -DESTDIR ?= -PREFIX ?= /usr/local -BINDIR := $(PREFIX)/bin - -ZSTDDIR = ../../lib -PROGDIR = ../../programs - -# External program to use to run tests, e.g. qemu or valgrind -TESTPROG ?= -# Flags to pass to the tests -TESTFLAGS ?= - -# We use gcc/clang to generate the header dependencies of files -DEPFLAGS = -MMD -MP -MF $*.Td -POSTCOMPILE = mv -f $*.Td $*.d - -# CFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS are for the users to override -CFLAGS ?= -O3 -Wall -Wextra -CXXFLAGS ?= -O3 -Wall -Wextra -pedantic -CPPFLAGS ?= -LDFLAGS ?= - -# PZstd uses legacy APIs -CFLAGS += -Wno-deprecated-declarations - -# Include flags -PZSTD_INC = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I. -GTEST_INC = -isystem googletest/googletest/include - -# Set the minimum required by gtest -PZSTD_CXX_STD := -std=c++14 - -PZSTD_CPPFLAGS = $(PZSTD_INC) -PZSTD_CCXXFLAGS = -PZSTD_CFLAGS = $(PZSTD_CCXXFLAGS) -PZSTD_CXXFLAGS = $(PZSTD_CCXXFLAGS) $(PZSTD_CXX_STD) -PZSTD_LDFLAGS = -EXTRA_FLAGS = -ALL_CFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CFLAGS) $(PZSTD_CFLAGS) -ALL_CXXFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CXXFLAGS) $(PZSTD_CXXFLAGS) -ALL_LDFLAGS = $(EXTRA_FLAGS) $(CXXFLAGS) $(LDFLAGS) $(PZSTD_LDFLAGS) - - -# gtest libraries need to go before "-lpthread" because they depend on it. -GTEST_LIB = -L googletest/build/googlemock/gtest -LIBS = - -# Compilation commands -LD_COMMAND = $(CXX) $^ $(ALL_LDFLAGS) $(LIBS) -pthread -o $@ -CC_COMMAND = $(CC) $(DEPFLAGS) $(ALL_CFLAGS) -c $< -o $@ -CXX_COMMAND = $(CXX) $(DEPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@ - -# List all the pzstd source files so we can determine their dependencies -PZSTD_SRCS := $(wildcard *.cpp) -PZSTD_TESTS := $(wildcard test/*.cpp) -UTILS_TESTS := $(wildcard utils/test/*.cpp) -ALL_SRCS := $(PZSTD_SRCS) $(PZSTD_TESTS) $(UTILS_TESTS) - - -# Define *.exe as extension for Windows systems -ifneq (,$(filter Windows%,$(OS))) -EXT =.exe -else -EXT = -endif - -# Standard targets -.PHONY: default -default: all - -.PHONY: test-pzstd -test-pzstd: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* -test-pzstd: clean googletest pzstd tests check - -.PHONY: test-pzstd32 -test-pzstd32: clean googletest32 all32 check - -.PHONY: test-pzstd-tsan -test-pzstd-tsan: LDFLAGS=-fuse-ld=gold -test-pzstd-tsan: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* -test-pzstd-tsan: clean googletest tsan check - -.PHONY: test-pzstd-asan -test-pzstd-asan: LDFLAGS=-fuse-ld=gold -test-pzstd-asan: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* -test-pzstd-asan: clean asan check - -.PHONY: check -check: - $(TESTPROG) ./utils/test/BufferTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./utils/test/RangeTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./utils/test/ResourcePoolTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./utils/test/ScopeGuardTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./utils/test/ThreadPoolTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./utils/test/WorkQueueTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./test/OptionsTest$(EXT) $(TESTFLAGS) - $(TESTPROG) ./test/PzstdTest$(EXT) $(TESTFLAGS) - -.PHONY: install -install: PZSTD_CPPFLAGS += -DNDEBUG -install: pzstd$(EXT) - install -d -m 755 $(DESTDIR)$(BINDIR)/ - install -m 755 pzstd$(EXT) $(DESTDIR)$(BINDIR)/pzstd$(EXT) - -.PHONY: uninstall -uninstall: - $(RM) $(DESTDIR)$(BINDIR)/pzstd$(EXT) - -# Targets for many different builds -.PHONY: all -all: PZSTD_CPPFLAGS += -DNDEBUG -all: pzstd$(EXT) - -.PHONY: debug -debug: EXTRA_FLAGS += -g -debug: pzstd$(EXT) tests roundtrip - -.PHONY: tsan -tsan: PZSTD_CCXXFLAGS += -fsanitize=thread -fPIC -tsan: PZSTD_LDFLAGS += -fsanitize=thread -tsan: debug - -.PHONY: asan -asan: EXTRA_FLAGS += -fsanitize=address -asan: debug - -.PHONY: ubsan -ubsan: EXTRA_FLAGS += -fsanitize=undefined -ubsan: debug - -.PHONY: all32 -all32: EXTRA_FLAGS += -m32 -all32: all tests roundtrip - -.PHONY: debug32 -debug32: EXTRA_FLAGS += -m32 -debug32: debug - -.PHONY: asan32 -asan32: EXTRA_FLAGS += -m32 -asan32: asan - -.PHONY: tsan32 -tsan32: EXTRA_FLAGS += -m32 -tsan32: tsan - -.PHONY: ubsan32 -ubsan32: EXTRA_FLAGS += -m32 -ubsan32: ubsan - -# Run long round trip tests -.PHONY: roundtripcheck -roundtripcheck: roundtrip check - $(TESTPROG) ./test/RoundTripTest$(EXT) $(TESTFLAGS) - -# Build the main binary -pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a - $(LD_COMMAND) - -# Target that depends on all the tests -.PHONY: tests -tests: EXTRA_FLAGS += -Wno-deprecated-declarations -tests: $(patsubst %,%$(EXT),$(basename $(PZSTD_TESTS) $(UTILS_TESTS))) - -# Build the round trip tests -.PHONY: roundtrip -roundtrip: EXTRA_FLAGS += -Wno-deprecated-declarations -roundtrip: test/RoundTripTest$(EXT) - -# Use the static library that zstd builds for simplicity and -# so we get the compiler options correct -.PHONY: $(ZSTDDIR)/libzstd.a -$(ZSTDDIR)/libzstd.a: - CFLAGS="$(ALL_CFLAGS)" LDFLAGS="$(ALL_LDFLAGS)" $(MAKE) -C $(ZSTDDIR) libzstd.a - -# Rules to build the tests -test/RoundTripTest$(EXT): test/RoundTripTest.o $(PROGDIR)/datagen.o \ - $(PROGDIR)/util.o Options.o \ - Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a - $(LD_COMMAND) - -test/%Test$(EXT): PZSTD_LDFLAGS += $(GTEST_LIB) -test/%Test$(EXT): LIBS += -lgtest -lgtest_main -test/%Test$(EXT): test/%Test.o $(PROGDIR)/datagen.o \ - $(PROGDIR)/util.o Options.o Pzstd.o \ - SkippableFrame.o $(ZSTDDIR)/libzstd.a - $(LD_COMMAND) - -utils/test/%Test$(EXT): PZSTD_LDFLAGS += $(GTEST_LIB) -utils/test/%Test$(EXT): LIBS += -lgtest -lgtest_main -utils/test/%Test$(EXT): utils/test/%Test.o - $(LD_COMMAND) - - -GTEST_CMAKEFLAGS = - -# Install googletest -.PHONY: googletest -googletest: PZSTD_CCXXFLAGS += -fPIC -googletest: - @$(RM) -rf googletest - @git clone https://github.com/google/googletest - @mkdir -p googletest/build - @cd googletest/build && cmake $(GTEST_CMAKEFLAGS) -DCMAKE_CXX_FLAGS="$(ALL_CXXFLAGS)" .. && $(MAKE) - -.PHONY: googletest32 -googletest32: PZSTD_CCXXFLAGS += -m32 -googletest32: googletest - -.PHONY: googletest-mingw64 -googletest-mingw64: GTEST_CMAKEFLAGS += -G "MSYS Makefiles" -googletest-mingw64: googletest - -.PHONY: clean -clean: - $(RM) -f *.o pzstd$(EXT) *.Td *.d - $(RM) -f test/*.o test/*Test$(EXT) test/*.Td test/*.d - $(RM) -f utils/test/*.o utils/test/*Test$(EXT) utils/test/*.Td utils/test/*.d - $(RM) -f $(PROGDIR)/*.o $(PROGDIR)/*.Td $(PROGDIR)/*.d - $(MAKE) -C $(ZSTDDIR) clean - @echo Cleaning completed - - -# Cancel implicit rules -%.o: %.c -%.o: %.cpp - -# Object file rules -%.o: %.c - $(CC_COMMAND) - $(POSTCOMPILE) - -$(PROGDIR)/%.o: $(PROGDIR)/%.c - $(CC_COMMAND) - $(POSTCOMPILE) - -%.o: %.cpp - $(CXX_COMMAND) - $(POSTCOMPILE) - -test/%.o: PZSTD_CPPFLAGS += $(GTEST_INC) -test/%.o: test/%.cpp - $(CXX_COMMAND) - $(POSTCOMPILE) - -utils/test/%.o: PZSTD_CPPFLAGS += $(GTEST_INC) -utils/test/%.o: utils/test/%.cpp - $(CXX_COMMAND) - $(POSTCOMPILE) - -# Dependency file stuff -.PRECIOUS: %.d test/%.d utils/test/%.d - -# Include rules that specify header file dependencies --include $(patsubst %,%.d,$(basename $(ALL_SRCS))) diff --git a/third_party/zstd/contrib/pzstd/Options.cpp b/third_party/zstd/contrib/pzstd/Options.cpp deleted file mode 100644 index 90841b9..0000000 --- a/third_party/zstd/contrib/pzstd/Options.cpp +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "Options.h" -#include "util.h" -#include "utils/ScopeGuard.h" - -#include -#include -#include -#include -#include -#include -#include - - -namespace pzstd { - -namespace { -unsigned defaultNumThreads() { -#ifdef PZSTD_NUM_THREADS - return PZSTD_NUM_THREADS; -#else - return std::thread::hardware_concurrency(); -#endif -} - -unsigned parseUnsigned(const char **arg) { - unsigned result = 0; - while (**arg >= '0' && **arg <= '9') { - result *= 10; - result += **arg - '0'; - ++(*arg); - } - return result; -} - -const char *getArgument(const char *options, const char **argv, int &i, - int argc) { - if (options[1] != 0) { - return options + 1; - } - ++i; - if (i == argc) { - std::fprintf(stderr, "Option -%c requires an argument, but none provided\n", - *options); - return nullptr; - } - return argv[i]; -} - -const std::string kZstdExtension = ".zst"; -constexpr char kStdIn[] = "-"; -constexpr char kStdOut[] = "-"; -constexpr unsigned kDefaultCompressionLevel = 3; -constexpr unsigned kMaxNonUltraCompressionLevel = 19; - -#ifdef _WIN32 -const char nullOutput[] = "nul"; -#else -const char nullOutput[] = "/dev/null"; -#endif - -void notSupported(const char *option) { - std::fprintf(stderr, "Operation not supported: %s\n", option); -} - -void usage() { - std::fprintf(stderr, "Usage:\n"); - std::fprintf(stderr, " pzstd [args] [FILE(s)]\n"); - std::fprintf(stderr, "Parallel ZSTD options:\n"); - std::fprintf(stderr, " -p, --processes # : number of threads to use for (de)compression (default:)\n"); - - std::fprintf(stderr, "ZSTD options:\n"); - std::fprintf(stderr, " -# : # compression level (1-%d, default:%d)\n", kMaxNonUltraCompressionLevel, kDefaultCompressionLevel); - std::fprintf(stderr, " -d, --decompress : decompression\n"); - std::fprintf(stderr, " -o file : result stored into `file` (only if 1 input file)\n"); - std::fprintf(stderr, " -f, --force : overwrite output without prompting, (de)compress links\n"); - std::fprintf(stderr, " --rm : remove source file(s) after successful (de)compression\n"); - std::fprintf(stderr, " -k, --keep : preserve source file(s) (default)\n"); - std::fprintf(stderr, " -h, --help : display help and exit\n"); - std::fprintf(stderr, " -V, --version : display version number and exit\n"); - std::fprintf(stderr, " -v, --verbose : verbose mode; specify multiple times to increase log level (default:2)\n"); - std::fprintf(stderr, " -q, --quiet : suppress warnings; specify twice to suppress errors too\n"); - std::fprintf(stderr, " -c, --stdout : write to standard output (even if it is the console)\n"); -#ifdef UTIL_HAS_CREATEFILELIST - std::fprintf(stderr, " -r : operate recursively on directories\n"); -#endif - std::fprintf(stderr, " --ultra : enable levels beyond %i, up to %i (requires more memory)\n", kMaxNonUltraCompressionLevel, ZSTD_maxCLevel()); - std::fprintf(stderr, " -C, --check : integrity check (default)\n"); - std::fprintf(stderr, " --no-check : no integrity check\n"); - std::fprintf(stderr, " -t, --test : test compressed file integrity\n"); - std::fprintf(stderr, " -- : all arguments after \"--\" are treated as files\n"); -} -} // anonymous namespace - -Options::Options() - : numThreads(defaultNumThreads()), maxWindowLog(23), - compressionLevel(kDefaultCompressionLevel), decompress(false), - overwrite(false), keepSource(true), writeMode(WriteMode::Auto), - checksum(true), verbosity(2) {} - -Options::Status Options::parse(int argc, const char **argv) { - bool test = false; - bool recursive = false; - bool ultra = false; - bool forceStdout = false; - bool followLinks = false; - // Local copy of input files, which are pointers into argv. - std::vector localInputFiles; - for (int i = 1; i < argc; ++i) { - const char *arg = argv[i]; - // Protect against empty arguments - if (arg[0] == 0) { - continue; - } - // Everything after "--" is an input file - if (!std::strcmp(arg, "--")) { - ++i; - std::copy(argv + i, argv + argc, std::back_inserter(localInputFiles)); - break; - } - // Long arguments that don't have a short option - { - bool isLongOption = true; - if (!std::strcmp(arg, "--rm")) { - keepSource = false; - } else if (!std::strcmp(arg, "--ultra")) { - ultra = true; - maxWindowLog = 0; - } else if (!std::strcmp(arg, "--no-check")) { - checksum = false; - } else if (!std::strcmp(arg, "--sparse")) { - writeMode = WriteMode::Sparse; - notSupported("Sparse mode"); - return Status::Failure; - } else if (!std::strcmp(arg, "--no-sparse")) { - writeMode = WriteMode::Regular; - notSupported("Sparse mode"); - return Status::Failure; - } else if (!std::strcmp(arg, "--dictID")) { - notSupported(arg); - return Status::Failure; - } else if (!std::strcmp(arg, "--no-dictID")) { - notSupported(arg); - return Status::Failure; - } else { - isLongOption = false; - } - if (isLongOption) { - continue; - } - } - // Arguments with a short option simply set their short option. - const char *options = nullptr; - if (!std::strcmp(arg, "--processes")) { - options = "p"; - } else if (!std::strcmp(arg, "--version")) { - options = "V"; - } else if (!std::strcmp(arg, "--help")) { - options = "h"; - } else if (!std::strcmp(arg, "--decompress")) { - options = "d"; - } else if (!std::strcmp(arg, "--force")) { - options = "f"; - } else if (!std::strcmp(arg, "--stdout")) { - options = "c"; - } else if (!std::strcmp(arg, "--keep")) { - options = "k"; - } else if (!std::strcmp(arg, "--verbose")) { - options = "v"; - } else if (!std::strcmp(arg, "--quiet")) { - options = "q"; - } else if (!std::strcmp(arg, "--check")) { - options = "C"; - } else if (!std::strcmp(arg, "--test")) { - options = "t"; - } else if (arg[0] == '-' && arg[1] != 0) { - options = arg + 1; - } else { - localInputFiles.emplace_back(arg); - continue; - } - assert(options != nullptr); - - bool finished = false; - while (!finished && *options != 0) { - // Parse the compression level - if (*options >= '0' && *options <= '9') { - compressionLevel = parseUnsigned(&options); - continue; - } - - switch (*options) { - case 'h': - case 'H': - usage(); - return Status::Message; - case 'V': - std::fprintf(stderr, "PZSTD version: %s.\n", ZSTD_VERSION_STRING); - return Status::Message; - case 'p': { - finished = true; - const char *optionArgument = getArgument(options, argv, i, argc); - if (optionArgument == nullptr) { - return Status::Failure; - } - if (*optionArgument < '0' || *optionArgument > '9') { - std::fprintf(stderr, "Option -p expects a number, but %s provided\n", - optionArgument); - return Status::Failure; - } - numThreads = parseUnsigned(&optionArgument); - if (*optionArgument != 0) { - std::fprintf(stderr, - "Option -p expects a number, but %u%s provided\n", - numThreads, optionArgument); - return Status::Failure; - } - break; - } - case 'o': { - finished = true; - const char *optionArgument = getArgument(options, argv, i, argc); - if (optionArgument == nullptr) { - return Status::Failure; - } - outputFile = optionArgument; - break; - } - case 'C': - checksum = true; - break; - case 'k': - keepSource = true; - break; - case 'd': - decompress = true; - break; - case 'f': - overwrite = true; - forceStdout = true; - followLinks = true; - break; - case 't': - test = true; - decompress = true; - break; -#ifdef UTIL_HAS_CREATEFILELIST - case 'r': - recursive = true; - break; -#endif - case 'c': - outputFile = kStdOut; - forceStdout = true; - break; - case 'v': - ++verbosity; - break; - case 'q': - --verbosity; - // Ignore them for now - break; - // Unsupported options from Zstd - case 'D': - case 's': - notSupported("Zstd dictionaries."); - return Status::Failure; - case 'b': - case 'e': - case 'i': - case 'B': - notSupported("Zstd benchmarking options."); - return Status::Failure; - default: - std::fprintf(stderr, "Invalid argument: %s\n", arg); - return Status::Failure; - } - if (!finished) { - ++options; - } - } // while (*options != 0); - } // for (int i = 1; i < argc; ++i); - - // Set options for test mode - if (test) { - outputFile = nullOutput; - keepSource = true; - } - - // Input file defaults to standard input if not provided. - if (localInputFiles.empty()) { - localInputFiles.emplace_back(kStdIn); - } - - // Check validity of input files - if (localInputFiles.size() > 1) { - const auto it = std::find(localInputFiles.begin(), localInputFiles.end(), - std::string{kStdIn}); - if (it != localInputFiles.end()) { - std::fprintf( - stderr, - "Cannot specify standard input when handling multiple files\n"); - return Status::Failure; - } - } - if (localInputFiles.size() > 1 || recursive) { - if (!outputFile.empty() && outputFile != nullOutput) { - std::fprintf( - stderr, - "Cannot specify an output file when handling multiple inputs\n"); - return Status::Failure; - } - } - - g_utilDisplayLevel = verbosity; - // Remove local input files that are symbolic links - if (!followLinks) { - localInputFiles.erase(std::remove_if(localInputFiles.begin(), localInputFiles.end(), - [&](const char *path) { - bool isLink = UTIL_isLink(path); - if (isLink && verbosity >= 2) { - std::fprintf( - stderr, - "Warning : %s is symbolic link, ignoring\n", - path); - } - return isLink; - }), localInputFiles.end()); - } - - // Translate input files/directories into files to (de)compress - if (recursive) { - FileNamesTable* const files = UTIL_createExpandedFNT(localInputFiles.data(), localInputFiles.size(), followLinks); - if (files == nullptr) { - std::fprintf(stderr, "Error traversing directories\n"); - return Status::Failure; - } - auto guard = - makeScopeGuard([&] { UTIL_freeFileNamesTable(files); }); - if (files->tableSize == 0) { - std::fprintf(stderr, "No files found\n"); - return Status::Failure; - } - inputFiles.resize(files->tableSize); - std::copy(files->fileNames, files->fileNames + files->tableSize, inputFiles.begin()); - } else { - inputFiles.resize(localInputFiles.size()); - std::copy(localInputFiles.begin(), localInputFiles.end(), - inputFiles.begin()); - } - localInputFiles.clear(); - assert(!inputFiles.empty()); - - // If reading from standard input, default to standard output - if (inputFiles[0] == kStdIn && outputFile.empty()) { - assert(inputFiles.size() == 1); - outputFile = "-"; - } - - if (inputFiles[0] == kStdIn && IS_CONSOLE(stdin)) { - assert(inputFiles.size() == 1); - std::fprintf(stderr, "Cannot read input from interactive console\n"); - return Status::Failure; - } - if (outputFile == "-" && IS_CONSOLE(stdout) && !(forceStdout && decompress)) { - std::fprintf(stderr, "Will not write to console stdout unless -c or -f is " - "specified and decompressing\n"); - return Status::Failure; - } - - // Check compression level - { - unsigned maxCLevel = - ultra ? ZSTD_maxCLevel() : kMaxNonUltraCompressionLevel; - if (compressionLevel > maxCLevel || compressionLevel == 0) { - std::fprintf(stderr, "Invalid compression level %u.\n", compressionLevel); - return Status::Failure; - } - } - - // Check that numThreads is set - if (numThreads == 0) { - std::fprintf(stderr, "Invalid arguments: # of threads not specified " - "and unable to determine hardware concurrency.\n"); - return Status::Failure; - } - - // Modify verbosity - // If we are piping input and output, turn off interaction - if (inputFiles[0] == kStdIn && outputFile == kStdOut && verbosity == 2) { - verbosity = 1; - } - // If we are in multi-file mode, turn off interaction - if (inputFiles.size() > 1 && verbosity == 2) { - verbosity = 1; - } - - return Status::Success; -} - -std::string Options::getOutputFile(const std::string &inputFile) const { - if (!outputFile.empty()) { - return outputFile; - } - // Attempt to add/remove zstd extension from the input file - if (decompress) { - int stemSize = inputFile.size() - kZstdExtension.size(); - if (stemSize > 0 && inputFile.substr(stemSize) == kZstdExtension) { - return inputFile.substr(0, stemSize); - } else { - return ""; - } - } else { - return inputFile + kZstdExtension; - } -} -} diff --git a/third_party/zstd/contrib/pzstd/Options.h b/third_party/zstd/contrib/pzstd/Options.h deleted file mode 100644 index 92c18a3..0000000 --- a/third_party/zstd/contrib/pzstd/Options.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#define ZSTD_STATIC_LINKING_ONLY -#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* No deprecation warnings, pzstd itself is deprecated - * and uses deprecated functions - */ -#include "zstd.h" -#undef ZSTD_STATIC_LINKING_ONLY - -#include -#include -#include - -namespace pzstd { - -struct Options { - enum class WriteMode { Regular, Auto, Sparse }; - - unsigned numThreads; - unsigned maxWindowLog; - unsigned compressionLevel; - bool decompress; - std::vector inputFiles; - std::string outputFile; - bool overwrite; - bool keepSource; - WriteMode writeMode; - bool checksum; - int verbosity; - - enum class Status { - Success, // Successfully parsed options - Failure, // Failure to parse options - Message // Options specified to print a message (e.g. "-h") - }; - - Options(); - Options(unsigned numThreads, unsigned maxWindowLog, unsigned compressionLevel, - bool decompress, std::vector inputFiles, - std::string outputFile, bool overwrite, bool keepSource, - WriteMode writeMode, bool checksum, int verbosity) - : numThreads(numThreads), maxWindowLog(maxWindowLog), - compressionLevel(compressionLevel), decompress(decompress), - inputFiles(std::move(inputFiles)), outputFile(std::move(outputFile)), - overwrite(overwrite), keepSource(keepSource), writeMode(writeMode), - checksum(checksum), verbosity(verbosity) {} - - Status parse(int argc, const char **argv); - - ZSTD_parameters determineParameters() const { - ZSTD_parameters params = ZSTD_getParams(compressionLevel, 0, 0); - params.fParams.contentSizeFlag = 0; - params.fParams.checksumFlag = checksum; - if (maxWindowLog != 0 && params.cParams.windowLog > maxWindowLog) { - params.cParams.windowLog = maxWindowLog; - params.cParams = ZSTD_adjustCParams(params.cParams, 0, 0); - } - return params; - } - - std::string getOutputFile(const std::string &inputFile) const; -}; -} diff --git a/third_party/zstd/contrib/pzstd/Pzstd.cpp b/third_party/zstd/contrib/pzstd/Pzstd.cpp deleted file mode 100644 index 048a006..0000000 --- a/third_party/zstd/contrib/pzstd/Pzstd.cpp +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "platform.h" /* Large Files support, SET_BINARY_MODE */ -#include "Pzstd.h" -#include "SkippableFrame.h" -#include "utils/FileSystem.h" -#include "utils/Portability.h" -#include "utils/Range.h" -#include "utils/ScopeGuard.h" -#include "utils/ThreadPool.h" -#include "utils/WorkQueue.h" - -#include -#include -#include -#include -#include -#include -#include - - -namespace pzstd { - -namespace { -#ifdef _WIN32 -const std::string nullOutput = "nul"; -#else -const std::string nullOutput = "/dev/null"; -#endif -} - -using std::size_t; - -static std::uintmax_t fileSizeOrZero(const std::string &file) { - if (file == "-") { - return 0; - } - std::error_code ec; - auto size = file_size(file, ec); - if (ec) { - size = 0; - } - return size; -} - -static std::uint64_t handleOneInput(const Options &options, - const std::string &inputFile, - FILE* inputFd, - const std::string &outputFile, - FILE* outputFd, - SharedState& state) { - auto inputSize = fileSizeOrZero(inputFile); - // WorkQueue outlives ThreadPool so in the case of error we are certain - // we don't accidentally try to call push() on it after it is destroyed - WorkQueue> outs{options.numThreads + 1}; - std::uint64_t bytesRead; - std::uint64_t bytesWritten; - { - // Initialize the (de)compression thread pool with numThreads - ThreadPool executor(options.numThreads); - // Run the reader thread on an extra thread - ThreadPool readExecutor(1); - if (!options.decompress) { - // Add a job that reads the input and starts all the compression jobs - readExecutor.add( - [&state, &outs, &executor, inputFd, inputSize, &options, &bytesRead] { - bytesRead = asyncCompressChunks( - state, - outs, - executor, - inputFd, - inputSize, - options.numThreads, - options.determineParameters()); - }); - // Start writing - bytesWritten = writeFile(state, outs, outputFd, options.decompress); - } else { - // Add a job that reads the input and starts all the decompression jobs - readExecutor.add([&state, &outs, &executor, inputFd, &bytesRead] { - bytesRead = asyncDecompressFrames(state, outs, executor, inputFd); - }); - // Start writing - bytesWritten = writeFile(state, outs, outputFd, options.decompress); - } - } - if (!state.errorHolder.hasError()) { - std::string inputFileName = inputFile == "-" ? "stdin" : inputFile; - std::string outputFileName = outputFile == "-" ? "stdout" : outputFile; - if (!options.decompress) { - double ratio = static_cast(bytesWritten) / - static_cast(bytesRead + !bytesRead); - state.log(kLogInfo, "%-20s :%6.2f%% (%6" PRIu64 " => %6" PRIu64 - " bytes, %s)\n", - inputFileName.c_str(), ratio * 100, bytesRead, bytesWritten, - outputFileName.c_str()); - } else { - state.log(kLogInfo, "%-20s: %" PRIu64 " bytes \n", - inputFileName.c_str(),bytesWritten); - } - } - return bytesWritten; -} - -static FILE *openInputFile(const std::string &inputFile, - ErrorHolder &errorHolder) { - if (inputFile == "-") { - SET_BINARY_MODE(stdin); - return stdin; - } - // Check if input file is a directory - { - std::error_code ec; - if (is_directory(inputFile, ec)) { - errorHolder.setError("Output file is a directory -- ignored"); - return nullptr; - } - } - auto inputFd = std::fopen(inputFile.c_str(), "rb"); - if (!errorHolder.check(inputFd != nullptr, "Failed to open input file")) { - return nullptr; - } - return inputFd; -} - -static FILE *openOutputFile(const Options &options, - const std::string &outputFile, - SharedState& state) { - if (outputFile == "-") { - SET_BINARY_MODE(stdout); - return stdout; - } - // Check if the output file exists and then open it - if (!options.overwrite && outputFile != nullOutput) { - auto outputFd = std::fopen(outputFile.c_str(), "rb"); - if (outputFd != nullptr) { - std::fclose(outputFd); - if (!state.log.logsAt(kLogInfo)) { - state.errorHolder.setError("Output file exists"); - return nullptr; - } - state.log( - kLogInfo, - "pzstd: %s already exists; do you wish to overwrite (y/n) ? ", - outputFile.c_str()); - int c = getchar(); - if (c != 'y' && c != 'Y') { - state.errorHolder.setError("Not overwritten"); - return nullptr; - } - } - } - auto outputFd = std::fopen(outputFile.c_str(), "wb"); - if (!state.errorHolder.check( - outputFd != nullptr, "Failed to open output file")) { - return nullptr; - } - return outputFd; -} - -int pzstdMain(const Options &options) { - int returnCode = 0; - SharedState state(options); - for (const auto& input : options.inputFiles) { - // Setup the shared state - auto printErrorGuard = makeScopeGuard([&] { - if (state.errorHolder.hasError()) { - returnCode = 1; - state.log(kLogError, "pzstd: %s: %s.\n", input.c_str(), - state.errorHolder.getError().c_str()); - } - }); - // Open the input file - auto inputFd = openInputFile(input, state.errorHolder); - if (inputFd == nullptr) { - continue; - } - auto closeInputGuard = makeScopeGuard([&] { std::fclose(inputFd); }); - // Open the output file - auto outputFile = options.getOutputFile(input); - if (!state.errorHolder.check(outputFile != "", - "Input file does not have extension .zst")) { - continue; - } - auto outputFd = openOutputFile(options, outputFile, state); - if (outputFd == nullptr) { - continue; - } - auto closeOutputGuard = makeScopeGuard([&] { std::fclose(outputFd); }); - // (de)compress the file - handleOneInput(options, input, inputFd, outputFile, outputFd, state); - if (state.errorHolder.hasError()) { - continue; - } - // Delete the input file if necessary - if (!options.keepSource) { - // Be sure that we are done and have written everything before we delete - if (!state.errorHolder.check(std::fclose(inputFd) == 0, - "Failed to close input file")) { - continue; - } - closeInputGuard.dismiss(); - if (!state.errorHolder.check(std::fclose(outputFd) == 0, - "Failed to close output file")) { - continue; - } - closeOutputGuard.dismiss(); - if (std::remove(input.c_str()) != 0) { - state.errorHolder.setError("Failed to remove input file"); - continue; - } - } - } - // Returns 1 if any of the files failed to (de)compress. - return returnCode; -} - -/// Construct a `ZSTD_inBuffer` that points to the data in `buffer`. -static ZSTD_inBuffer makeZstdInBuffer(const Buffer& buffer) { - return ZSTD_inBuffer{buffer.data(), buffer.size(), 0}; -} - -/** - * Advance `buffer` and `inBuffer` by the amount of data read, as indicated by - * `inBuffer.pos`. - */ -void advance(Buffer& buffer, ZSTD_inBuffer& inBuffer) { - auto pos = inBuffer.pos; - inBuffer.src = static_cast(inBuffer.src) + pos; - inBuffer.size -= pos; - inBuffer.pos = 0; - return buffer.advance(pos); -} - -/// Construct a `ZSTD_outBuffer` that points to the data in `buffer`. -static ZSTD_outBuffer makeZstdOutBuffer(Buffer& buffer) { - return ZSTD_outBuffer{buffer.data(), buffer.size(), 0}; -} - -/** - * Split `buffer` and advance `outBuffer` by the amount of data written, as - * indicated by `outBuffer.pos`. - */ -Buffer split(Buffer& buffer, ZSTD_outBuffer& outBuffer) { - auto pos = outBuffer.pos; - outBuffer.dst = static_cast(outBuffer.dst) + pos; - outBuffer.size -= pos; - outBuffer.pos = 0; - return buffer.splitAt(pos); -} - -/** - * Stream chunks of input from `in`, compress it, and stream it out to `out`. - * - * @param state The shared state - * @param in Queue that we `pop()` input buffers from - * @param out Queue that we `push()` compressed output buffers to - * @param maxInputSize An upper bound on the size of the input - */ -static void compress( - SharedState& state, - std::shared_ptr in, - std::shared_ptr out, - size_t maxInputSize) { - auto& errorHolder = state.errorHolder; - auto guard = makeScopeGuard([&] { - in->finish(); - out->finish(); - }); - // Initialize the CCtx - auto ctx = state.cStreamPool->get(); - if (!errorHolder.check(ctx != nullptr, "Failed to allocate ZSTD_CStream")) { - return; - } - { - auto err = ZSTD_CCtx_reset(ctx.get(), ZSTD_reset_session_only); - if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { - return; - } - } - - // Allocate space for the result - auto outBuffer = Buffer(ZSTD_compressBound(maxInputSize)); - auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); - { - Buffer inBuffer; - // Read a buffer in from the input queue - while (in->pop(inBuffer) && !errorHolder.hasError()) { - auto zstdInBuffer = makeZstdInBuffer(inBuffer); - // Compress the whole buffer and send it to the output queue - while (!inBuffer.empty() && !errorHolder.hasError()) { - if (!errorHolder.check( - !outBuffer.empty(), "ZSTD_compressBound() was too small")) { - return; - } - // Compress - auto err = - ZSTD_compressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); - if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { - return; - } - // Split the compressed data off outBuffer and pass to the output queue - out->push(split(outBuffer, zstdOutBuffer)); - // Forget about the data we already compressed - advance(inBuffer, zstdInBuffer); - } - } - } - // Write the epilog - size_t bytesLeft; - do { - if (!errorHolder.check( - !outBuffer.empty(), "ZSTD_compressBound() was too small")) { - return; - } - bytesLeft = ZSTD_endStream(ctx.get(), &zstdOutBuffer); - if (!errorHolder.check( - !ZSTD_isError(bytesLeft), ZSTD_getErrorName(bytesLeft))) { - return; - } - out->push(split(outBuffer, zstdOutBuffer)); - } while (bytesLeft != 0 && !errorHolder.hasError()); -} - -/** - * Calculates how large each independently compressed frame should be. - * - * @param size The size of the source if known, 0 otherwise - * @param numThreads The number of threads available to run compression jobs on - * @param params The zstd parameters to be used for compression - */ -static size_t calculateStep( - std::uintmax_t size, - size_t numThreads, - const ZSTD_parameters ¶ms) { - (void)size; - (void)numThreads; - // Not validated to work correctly for window logs > 23. - // It will definitely fail if windowLog + 2 is >= 4GB because - // the skippable frame can only store sizes up to 4GB. - assert(params.cParams.windowLog <= 23); - return size_t{1} << (params.cParams.windowLog + 2); -} - -namespace { -enum class FileStatus { Continue, Done, Error }; -/// Determines the status of the file descriptor `fd`. -FileStatus fileStatus(FILE* fd) { - if (std::feof(fd)) { - return FileStatus::Done; - } else if (std::ferror(fd)) { - return FileStatus::Error; - } - return FileStatus::Continue; -} -} // anonymous namespace - -/** - * Reads `size` data in chunks of `chunkSize` and puts it into `queue`. - * Will read less if an error or EOF occurs. - * Returns the status of the file after all of the reads have occurred. - */ -static FileStatus -readData(BufferWorkQueue& queue, size_t chunkSize, size_t size, FILE* fd, - std::uint64_t *totalBytesRead) { - Buffer buffer(size); - while (!buffer.empty()) { - auto bytesRead = - std::fread(buffer.data(), 1, std::min(chunkSize, buffer.size()), fd); - *totalBytesRead += bytesRead; - queue.push(buffer.splitAt(bytesRead)); - auto status = fileStatus(fd); - if (status != FileStatus::Continue) { - return status; - } - } - return FileStatus::Continue; -} - -std::uint64_t asyncCompressChunks( - SharedState& state, - WorkQueue>& chunks, - ThreadPool& executor, - FILE* fd, - std::uintmax_t size, - size_t numThreads, - ZSTD_parameters params) { - auto chunksGuard = makeScopeGuard([&] { chunks.finish(); }); - std::uint64_t bytesRead = 0; - - // Break the input up into chunks of size `step` and compress each chunk - // independently. - size_t step = calculateStep(size, numThreads, params); - state.log(kLogDebug, "Chosen frame size: %zu\n", step); - auto status = FileStatus::Continue; - while (status == FileStatus::Continue && !state.errorHolder.hasError()) { - // Make a new input queue that we will put the chunk's input data into. - auto in = std::make_shared(); - auto inGuard = makeScopeGuard([&] { in->finish(); }); - // Make a new output queue that compress will put the compressed data into. - auto out = std::make_shared(); - // Start compression in the thread pool - executor.add([&state, in, out, step] { - return compress( - state, std::move(in), std::move(out), step); - }); - // Pass the output queue to the writer thread. - chunks.push(std::move(out)); - state.log(kLogVerbose, "%s\n", "Starting a new frame"); - // Fill the input queue for the compression job we just started - status = readData(*in, ZSTD_CStreamInSize(), step, fd, &bytesRead); - } - state.errorHolder.check(status != FileStatus::Error, "Error reading input"); - return bytesRead; -} - -/** - * Decompress a frame, whose data is streamed into `in`, and stream the output - * to `out`. - * - * @param state The shared state - * @param in Queue that we `pop()` input buffers from. It contains - * exactly one compressed frame. - * @param out Queue that we `push()` decompressed output buffers to - */ -static void decompress( - SharedState& state, - std::shared_ptr in, - std::shared_ptr out) { - auto& errorHolder = state.errorHolder; - auto guard = makeScopeGuard([&] { - in->finish(); - out->finish(); - }); - // Initialize the DCtx - auto ctx = state.dStreamPool->get(); - if (!errorHolder.check(ctx != nullptr, "Failed to allocate ZSTD_DStream")) { - return; - } - { - auto err = ZSTD_DCtx_reset(ctx.get(), ZSTD_reset_session_only); - if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { - return; - } - } - - const size_t outSize = ZSTD_DStreamOutSize(); - Buffer inBuffer; - size_t returnCode = 0; - // Read a buffer in from the input queue - while (in->pop(inBuffer) && !errorHolder.hasError()) { - auto zstdInBuffer = makeZstdInBuffer(inBuffer); - // Decompress the whole buffer and send it to the output queue - while (!inBuffer.empty() && !errorHolder.hasError()) { - // Allocate a buffer with at least outSize bytes. - Buffer outBuffer(outSize); - auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); - // Decompress - returnCode = - ZSTD_decompressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); - if (!errorHolder.check( - !ZSTD_isError(returnCode), ZSTD_getErrorName(returnCode))) { - return; - } - // Pass the buffer with the decompressed data to the output queue - out->push(split(outBuffer, zstdOutBuffer)); - // Advance past the input we already read - advance(inBuffer, zstdInBuffer); - if (returnCode == 0) { - // The frame is over, prepare to (maybe) start a new frame - ZSTD_initDStream(ctx.get()); - } - } - } - if (!errorHolder.check(returnCode <= 1, "Incomplete block")) { - return; - } - // We've given ZSTD_decompressStream all of our data, but there may still - // be data to read. - while (returnCode == 1) { - // Allocate a buffer with at least outSize bytes. - Buffer outBuffer(outSize); - auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); - // Pass in no input. - ZSTD_inBuffer zstdInBuffer{nullptr, 0, 0}; - // Decompress - returnCode = - ZSTD_decompressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); - if (!errorHolder.check( - !ZSTD_isError(returnCode), ZSTD_getErrorName(returnCode))) { - return; - } - // Pass the buffer with the decompressed data to the output queue - out->push(split(outBuffer, zstdOutBuffer)); - } -} - -std::uint64_t asyncDecompressFrames( - SharedState& state, - WorkQueue>& frames, - ThreadPool& executor, - FILE* fd) { - auto framesGuard = makeScopeGuard([&] { frames.finish(); }); - std::uint64_t totalBytesRead = 0; - - // Split the source up into its component frames. - // If we find our recognized skippable frame we know the next frames size - // which means that we can decompress each standard frame in independently. - // Otherwise, we will decompress using only one decompression task. - const size_t chunkSize = ZSTD_DStreamInSize(); - auto status = FileStatus::Continue; - while (status == FileStatus::Continue && !state.errorHolder.hasError()) { - // Make a new input queue that we will put the frames's bytes into. - auto in = std::make_shared(); - auto inGuard = makeScopeGuard([&] { in->finish(); }); - // Make a output queue that decompress will put the decompressed data into - auto out = std::make_shared(); - - size_t frameSize; - { - // Calculate the size of the next frame. - // frameSize is 0 if the frame info can't be decoded. - Buffer buffer(SkippableFrame::kSize); - auto bytesRead = std::fread(buffer.data(), 1, buffer.size(), fd); - totalBytesRead += bytesRead; - status = fileStatus(fd); - if (bytesRead == 0 && status != FileStatus::Continue) { - break; - } - buffer.subtract(buffer.size() - bytesRead); - frameSize = SkippableFrame::tryRead(buffer.range()); - in->push(std::move(buffer)); - } - if (frameSize == 0) { - // We hit a non SkippableFrame, so this will be the last job. - // Make sure that we don't use too much memory - in->setMaxSize(64); - out->setMaxSize(64); - } - // Start decompression in the thread pool - executor.add([&state, in, out] { - return decompress(state, std::move(in), std::move(out)); - }); - // Pass the output queue to the writer thread - frames.push(std::move(out)); - if (frameSize == 0) { - // We hit a non SkippableFrame ==> not compressed by pzstd or corrupted - // Pass the rest of the source to this decompression task - state.log(kLogVerbose, "%s\n", - "Input not in pzstd format, falling back to serial decompression"); - while (status == FileStatus::Continue && !state.errorHolder.hasError()) { - status = readData(*in, chunkSize, chunkSize, fd, &totalBytesRead); - } - break; - } - state.log(kLogVerbose, "Decompressing a frame of size %zu", frameSize); - // Fill the input queue for the decompression job we just started - status = readData(*in, chunkSize, frameSize, fd, &totalBytesRead); - } - state.errorHolder.check(status != FileStatus::Error, "Error reading input"); - return totalBytesRead; -} - -/// Write `data` to `fd`, returns true iff success. -static bool writeData(ByteRange data, FILE* fd) { - while (!data.empty()) { - data.advance(std::fwrite(data.begin(), 1, data.size(), fd)); - if (std::ferror(fd)) { - return false; - } - } - return true; -} - -std::uint64_t writeFile( - SharedState& state, - WorkQueue>& outs, - FILE* outputFd, - bool decompress) { - auto& errorHolder = state.errorHolder; - auto outsFinishGuard = makeScopeGuard([&outs] { outs.finish(); }); - auto lineClearGuard = makeScopeGuard([&state] { - state.log.clear(kLogInfo); - }); - std::uint64_t bytesWritten = 0; - std::shared_ptr out; - // Grab the output queue for each decompression job (in order). - while (outs.pop(out)) { - auto outFinishGuard = makeScopeGuard([&out] { out->finish(); }); - if (errorHolder.hasError()) { - continue; - } - if (!decompress) { - // If we are compressing and want to write skippable frames we can't - // start writing before compression is done because we need to know the - // compressed size. - // Wait for the compressed size to be available and write skippable frame - assert(uint64_t(out->size()) < uint64_t(1) << 32); - SkippableFrame frame(uint32_t(out->size())); - if (!writeData(frame.data(), outputFd)) { - errorHolder.setError("Failed to write output"); - return bytesWritten; - } - bytesWritten += frame.kSize; - } - // For each chunk of the frame: Pop it from the queue and write it - Buffer buffer; - while (out->pop(buffer) && !errorHolder.hasError()) { - if (!writeData(buffer.range(), outputFd)) { - errorHolder.setError("Failed to write output"); - return bytesWritten; - } - bytesWritten += buffer.size(); - state.log.update(kLogInfo, "Written: %u MB ", - static_cast(bytesWritten >> 20)); - } - } - return bytesWritten; -} -} diff --git a/third_party/zstd/contrib/pzstd/Pzstd.h b/third_party/zstd/contrib/pzstd/Pzstd.h deleted file mode 100644 index 3645e59..0000000 --- a/third_party/zstd/contrib/pzstd/Pzstd.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "ErrorHolder.h" -#include "Logging.h" -#include "Options.h" -#include "utils/Buffer.h" -#include "utils/Range.h" -#include "utils/ResourcePool.h" -#include "utils/ThreadPool.h" -#include "utils/WorkQueue.h" -#define ZSTD_STATIC_LINKING_ONLY -#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* No deprecation warnings, pzstd itself is deprecated - * and uses deprecated functions - */ -#include "zstd.h" -#undef ZSTD_STATIC_LINKING_ONLY - -#include -#include -#include - -namespace pzstd { -/** - * Runs pzstd with `options` and returns the number of bytes written. - * An error occurred if `errorHandler.hasError()`. - * - * @param options The pzstd options to use for (de)compression - * @returns 0 upon success and non-zero on failure. - */ -int pzstdMain(const Options& options); - -class SharedState { - public: - SharedState(const Options& options) : log(options.verbosity) { - if (!options.decompress) { - auto parameters = options.determineParameters(); - cStreamPool.reset(new ResourcePool{ - [this, parameters]() -> ZSTD_CStream* { - this->log(kLogVerbose, "%s\n", "Creating new ZSTD_CStream"); - auto zcs = ZSTD_createCStream(); - if (zcs) { - auto err = ZSTD_initCStream_advanced( - zcs, nullptr, 0, parameters, 0); - if (ZSTD_isError(err)) { - ZSTD_freeCStream(zcs); - return nullptr; - } - } - return zcs; - }, - [](ZSTD_CStream *zcs) { - ZSTD_freeCStream(zcs); - }}); - } else { - dStreamPool.reset(new ResourcePool{ - [this]() -> ZSTD_DStream* { - this->log(kLogVerbose, "%s\n", "Creating new ZSTD_DStream"); - auto zds = ZSTD_createDStream(); - if (zds) { - auto err = ZSTD_initDStream(zds); - if (ZSTD_isError(err)) { - ZSTD_freeDStream(zds); - return nullptr; - } - } - return zds; - }, - [](ZSTD_DStream *zds) { - ZSTD_freeDStream(zds); - }}); - } - } - - ~SharedState() { - // The resource pools have references to this, so destroy them first. - cStreamPool.reset(); - dStreamPool.reset(); - } - - Logger log; - ErrorHolder errorHolder; - std::unique_ptr> cStreamPool; - std::unique_ptr> dStreamPool; -}; - -/** - * Streams input from `fd`, breaks input up into chunks, and compresses each - * chunk independently. Output of each chunk gets streamed to a queue, and - * the output queues get put into `chunks` in order. - * - * @param state The shared state - * @param chunks Each compression jobs output queue gets `pushed()` here - * as soon as it is available - * @param executor The thread pool to run compression jobs in - * @param fd The input file descriptor - * @param size The size of the input file if known, 0 otherwise - * @param numThreads The number of threads in the thread pool - * @param parameters The zstd parameters to use for compression - * @returns The number of bytes read from the file - */ -std::uint64_t asyncCompressChunks( - SharedState& state, - WorkQueue>& chunks, - ThreadPool& executor, - FILE* fd, - std::uintmax_t size, - std::size_t numThreads, - ZSTD_parameters parameters); - -/** - * Streams input from `fd`. If pzstd headers are available it breaks the input - * up into independent frames. It sends each frame to an independent - * decompression job. Output of each frame gets streamed to a queue, and - * the output queues get put into `frames` in order. - * - * @param state The shared state - * @param frames Each decompression jobs output queue gets `pushed()` here - * as soon as it is available - * @param executor The thread pool to run compression jobs in - * @param fd The input file descriptor - * @returns The number of bytes read from the file - */ -std::uint64_t asyncDecompressFrames( - SharedState& state, - WorkQueue>& frames, - ThreadPool& executor, - FILE* fd); - -/** - * Streams input in from each queue in `outs` in order, and writes the data to - * `outputFd`. - * - * @param state The shared state - * @param outs A queue of output queues, one for each - * (de)compression job. - * @param outputFd The file descriptor to write to - * @param decompress Are we decompressing? - * @returns The number of bytes written - */ -std::uint64_t writeFile( - SharedState& state, - WorkQueue>& outs, - FILE* outputFd, - bool decompress); -} diff --git a/third_party/zstd/contrib/pzstd/README.md b/third_party/zstd/contrib/pzstd/README.md deleted file mode 100644 index bc8f831..0000000 --- a/third_party/zstd/contrib/pzstd/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Parallel Zstandard (PZstandard) - -Parallel Zstandard is a Pigz-like tool for Zstandard. -It provides Zstandard format compatible compression and decompression that is able to utilize multiple cores. -It breaks the input up into equal sized chunks and compresses each chunk independently into a Zstandard frame. -It then concatenates the frames together to produce the final compressed output. -Pzstandard will write a 12 byte header for each frame that is a skippable frame in the Zstandard format, which tells PZstandard the size of the next compressed frame. -PZstandard supports parallel decompression of files compressed with PZstandard. -When decompressing files compressed with Zstandard, PZstandard does IO in one thread, and decompression in another. - -## Usage - -PZstandard supports the same command line interface as Zstandard, but also provides the `-p` option to specify the number of threads. -Dictionary mode is not currently supported. - -Basic usage - - pzstd input-file -o output-file -p num-threads -# # Compression - pzstd -d input-file -o output-file -p num-threads # Decompression - -PZstandard also supports piping and fifo pipes - - cat input-file | pzstd -p num-threads -# -c > /dev/null - -For more options - - pzstd --help - -PZstandard tries to pick a smart default number of threads if not specified (displayed in `pzstd --help`). -If this number is not suitable, during compilation you can define `PZSTD_NUM_THREADS` to the number of threads you prefer. - -## Benchmarks - -As a reference, PZstandard and Pigz were compared on an Intel Core i7 @ 3.1 GHz, each using 4 threads, with the [Silesia compression corpus](https://sun.aei.polsl.pl//~sdeor/index.php?page=silesia). - -Compression Speed vs Ratio with 4 Threads | Decompression Speed with 4 Threads -------------------------------------------|----------------------------------- -![Compression Speed vs Ratio](images/Cspeed.png "Compression Speed vs Ratio") | ![Decompression Speed](images/Dspeed.png "Decompression Speed") - -The test procedure was to run each of the following commands 2 times for each compression level, and take the minimum time. - - time pzstd -# -p 4 -c silesia.tar > silesia.tar.zst - time pzstd -d -p 4 -c silesia.tar.zst > /dev/null - - time pigz -# -p 4 -k -c silesia.tar > silesia.tar.gz - time pigz -d -p 4 -k -c silesia.tar.gz > /dev/null - -PZstandard was tested using compression levels 1-19, and Pigz was tested using compression levels 1-9. -Pigz cannot do parallel decompression, it simply does each of reading, decompression, and writing on separate threads. - -## Tests - -Tests require that you have [gtest](https://github.com/google/googletest) installed. -Set `GTEST_INC` and `GTEST_LIB` in `Makefile` to specify the location of the gtest headers and libraries. -Alternatively, run `make googletest`, which will clone googletest and build it. -Run `make tests && make check` to run tests. diff --git a/third_party/zstd/contrib/pzstd/SkippableFrame.cpp b/third_party/zstd/contrib/pzstd/SkippableFrame.cpp deleted file mode 100644 index 3bea4eb..0000000 --- a/third_party/zstd/contrib/pzstd/SkippableFrame.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "SkippableFrame.h" -#include "mem.h" -#include "utils/Range.h" - -#include - -using namespace pzstd; - -SkippableFrame::SkippableFrame(std::uint32_t size) : frameSize_(size) { - MEM_writeLE32(data_.data(), kSkippableFrameMagicNumber); - MEM_writeLE32(data_.data() + 4, kFrameContentsSize); - MEM_writeLE32(data_.data() + 8, frameSize_); -} - -/* static */ std::size_t SkippableFrame::tryRead(ByteRange bytes) { - if (bytes.size() < SkippableFrame::kSize || - MEM_readLE32(bytes.begin()) != kSkippableFrameMagicNumber || - MEM_readLE32(bytes.begin() + 4) != kFrameContentsSize) { - return 0; - } - return MEM_readLE32(bytes.begin() + 8); -} diff --git a/third_party/zstd/contrib/pzstd/SkippableFrame.h b/third_party/zstd/contrib/pzstd/SkippableFrame.h deleted file mode 100644 index 817415e..0000000 --- a/third_party/zstd/contrib/pzstd/SkippableFrame.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "utils/Range.h" - -#include -#include -#include -#include - -namespace pzstd { -/** - * We put a skippable frame before each frame. - * It contains a skippable frame magic number, the size of the skippable frame, - * and the size of the next frame. - * Each skippable frame is exactly 12 bytes in little endian format. - * The first 8 bytes are for compatibility with the ZSTD format. - * If we have N threads, the output will look like - * - * [0x184D2A50|4|size1] [frame1 of size size1] - * [0x184D2A50|4|size2] [frame2 of size size2] - * ... - * [0x184D2A50|4|sizeN] [frameN of size sizeN] - * - * Each sizeX is 4 bytes. - * - * These skippable frames should allow us to skip through the compressed file - * and only load at most N pages. - */ -class SkippableFrame { - public: - static constexpr std::size_t kSize = 12; - - private: - std::uint32_t frameSize_; - std::array data_; - static constexpr std::uint32_t kSkippableFrameMagicNumber = 0x184D2A50; - // Could be improved if the size fits in less bytes - static constexpr std::uint32_t kFrameContentsSize = kSize - 8; - - public: - // Write the skippable frame to data_ in LE format. - explicit SkippableFrame(std::uint32_t size); - - // Read the skippable frame from bytes in LE format. - static std::size_t tryRead(ByteRange bytes); - - ByteRange data() const { - return {data_.data(), data_.size()}; - } - - // Size of the next frame. - std::size_t frameSize() const { - return frameSize_; - } -}; -} diff --git a/third_party/zstd/contrib/pzstd/images/Cspeed.png b/third_party/zstd/contrib/pzstd/images/Cspeed.png deleted file mode 100644 index aca4f663ea2e98b6df7c1344b51af99757549d8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69804 zcmeFZWn5I<_Xi5dAi{&7f~ce-B8}1@VbG~`BOwivLk%!s)7^r^&|T7?G}0XdC?$== zAbt0M0nhKbFYlZC`M(fh_MCI}Uh&;)eb?IOt-P!l0p2w{3=9kc3GqiyFfg#cU|^gv z#Ki%hcwiW|g8wjWpNKuc$ZjW}1Am-*F0N*afkAo^{SVV9t{Yq;j3M#pzM>=MBJx}e zxnb<#kMYsq<~xziGC>l!61X;Aw{Jee!t}iHIw3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uo0`pb5EyzDOzW8fyMZ{rYQjEI}t!gl-FDX}q09|+;_dOfG zj=%|T2dNZR=PF55Bf;;9O$hS${xg1TY_@D~tvcqR-C~Kg9<$l;YUNQqHL=T{_Gmwt z-bRq2Vit&rOG@L2*LB>h0v}wB`uZ8C>0b3OYq@{$_s2ij9E_S7lfemJ5_|f pQ%ftJInO=Pm*Hvg*8yQhk811c_TYJD@K0(mmS(m)>89>y{sO6Bn*jg- diff --git a/third_party/zstd/contrib/pzstd/main.cpp b/third_party/zstd/contrib/pzstd/main.cpp deleted file mode 100644 index 422b4a5..0000000 --- a/third_party/zstd/contrib/pzstd/main.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "ErrorHolder.h" -#include "Options.h" -#include "Pzstd.h" - -using namespace pzstd; - -int main(int argc, const char** argv) { - Options options; - switch (options.parse(argc, argv)) { - case Options::Status::Failure: - return 1; - case Options::Status::Message: - return 0; - default: - break; - } - - return pzstdMain(options); -} diff --git a/third_party/zstd/contrib/pzstd/test/BUCK b/third_party/zstd/contrib/pzstd/test/BUCK deleted file mode 100644 index 6d3fdd3..0000000 --- a/third_party/zstd/contrib/pzstd/test/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -cxx_test( - name='options_test', - srcs=['OptionsTest.cpp'], - deps=['//contrib/pzstd:options'], -) - -cxx_test( - name='pzstd_test', - srcs=['PzstdTest.cpp'], - deps=[ - ':round_trip', - '//contrib/pzstd:libpzstd', - '//contrib/pzstd/utils:scope_guard', - '//programs:datagen', - ], -) - -cxx_binary( - name='round_trip_test', - srcs=['RoundTripTest.cpp'], - deps=[ - ':round_trip', - '//contrib/pzstd/utils:scope_guard', - '//programs:datagen', - ] -) - -cxx_library( - name='round_trip', - header_namespace='test', - exported_headers=['RoundTrip.h'], - deps=[ - '//contrib/pzstd:libpzstd', - '//contrib/pzstd:options', - '//contrib/pzstd/utils:scope_guard', - ] -) diff --git a/third_party/zstd/contrib/pzstd/test/OptionsTest.cpp b/third_party/zstd/contrib/pzstd/test/OptionsTest.cpp deleted file mode 100644 index 91e3975..0000000 --- a/third_party/zstd/contrib/pzstd/test/OptionsTest.cpp +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "Options.h" - -#include -#include - -using namespace pzstd; - -namespace pzstd { -bool operator==(const Options &lhs, const Options &rhs) { - return lhs.numThreads == rhs.numThreads && - lhs.maxWindowLog == rhs.maxWindowLog && - lhs.compressionLevel == rhs.compressionLevel && - lhs.decompress == rhs.decompress && lhs.inputFiles == rhs.inputFiles && - lhs.outputFile == rhs.outputFile && lhs.overwrite == rhs.overwrite && - lhs.keepSource == rhs.keepSource && lhs.writeMode == rhs.writeMode && - lhs.checksum == rhs.checksum && lhs.verbosity == rhs.verbosity; -} - -std::ostream &operator<<(std::ostream &out, const Options &opt) { - out << "{"; - { - out << "\n\t" - << "numThreads: " << opt.numThreads; - out << ",\n\t" - << "maxWindowLog: " << opt.maxWindowLog; - out << ",\n\t" - << "compressionLevel: " << opt.compressionLevel; - out << ",\n\t" - << "decompress: " << opt.decompress; - out << ",\n\t" - << "inputFiles: {"; - { - bool first = true; - for (const auto &file : opt.inputFiles) { - if (!first) { - out << ","; - } - first = false; - out << "\n\t\t" << file; - } - } - out << "\n\t}"; - out << ",\n\t" - << "outputFile: " << opt.outputFile; - out << ",\n\t" - << "overwrite: " << opt.overwrite; - out << ",\n\t" - << "keepSource: " << opt.keepSource; - out << ",\n\t" - << "writeMode: " << static_cast(opt.writeMode); - out << ",\n\t" - << "checksum: " << opt.checksum; - out << ",\n\t" - << "verbosity: " << opt.verbosity; - } - out << "\n}"; - return out; -} -} - -namespace { -#ifdef _WIN32 -const char nullOutput[] = "nul"; -#else -const char nullOutput[] = "/dev/null"; -#endif - -constexpr auto autoMode = Options::WriteMode::Auto; -} // anonymous namespace - -#define EXPECT_SUCCESS(...) EXPECT_EQ(Options::Status::Success, __VA_ARGS__) -#define EXPECT_FAILURE(...) EXPECT_EQ(Options::Status::Failure, __VA_ARGS__) -#define EXPECT_MESSAGE(...) EXPECT_EQ(Options::Status::Message, __VA_ARGS__) - -template -std::array makeArray(Args... args) { - return {{nullptr, args...}}; -} - -TEST(Options, ValidInputs) { - { - Options options; - auto args = makeArray("--processes", "5", "-o", "x", "y", "-f"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {5, 23, 3, false, {"y"}, "x", - true, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("-p", "1", "input", "-19"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {1, 23, 19, false, {"input"}, "", - false, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = - makeArray("--ultra", "-22", "-p", "1", "-o", "x", "-d", "x.zst", "-f"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {1, 0, 22, true, {"x.zst"}, "x", - true, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("--processes", "100", "hello.zst", "--decompress", - "--force"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {100, 23, 3, true, {"hello.zst"}, "", true, - true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("x", "-dp", "1", "-c"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {1, 23, 3, true, {"x"}, "-", - false, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("x", "-dp", "1", "--stdout"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {1, 23, 3, true, {"x"}, "-", - false, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("-p", "1", "x", "-5", "-fo", "-", "--ultra", "-d"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {1, 0, 5, true, {"x"}, "-", - true, true, autoMode, true, 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("silesia.tar", "-o", "silesia.tar.pzstd", "-p", "2"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {2, - 23, - 3, - false, - {"silesia.tar"}, - "silesia.tar.pzstd", - false, - true, - autoMode, - true, - 2}; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("x", "-p", "1"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-p", "1"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - } -} - -TEST(Options, GetOutputFile) { - { - Options options; - auto args = makeArray("x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ("x.zst", options.getOutputFile(options.inputFiles[0])); - } - { - Options options; - auto args = makeArray("x", "y", "-o", nullOutput); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(nullOutput, options.getOutputFile(options.inputFiles[0])); - } - { - Options options; - auto args = makeArray("x.zst", "-do", nullOutput); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(nullOutput, options.getOutputFile(options.inputFiles[0])); - } - { - Options options; - auto args = makeArray("x.zst", "-d"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ("x", options.getOutputFile(options.inputFiles[0])); - } - { - Options options; - auto args = makeArray("xzst", "-d"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ("", options.getOutputFile(options.inputFiles[0])); - } - { - Options options; - auto args = makeArray("xzst", "-doxx"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ("xx", options.getOutputFile(options.inputFiles[0])); - } -} - -TEST(Options, MultipleFiles) { - { - Options options; - auto args = makeArray("x", "y", "z"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected; - expected.inputFiles = {"x", "y", "z"}; - expected.verbosity = 1; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("x", "y", "z", "-o", nullOutput); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected; - expected.inputFiles = {"x", "y", "z"}; - expected.outputFile = nullOutput; - expected.verbosity = 1; - EXPECT_EQ(expected, options); - } - { - Options options; - auto args = makeArray("x", "y", "-o-"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "y", "-o", "file"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-qqvd12qp4", "-f", "x", "--", "--rm", "-c"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - Options expected = {4, 23, 12, true, {"x", "--rm", "-c"}, - "", true, true, autoMode, true, - 0}; - EXPECT_EQ(expected, options); - } -} - -TEST(Options, NumThreads) { - { - Options options; - auto args = makeArray("x", "-dfo", "-"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-p", "0", "-fo", "-"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-f", "-p", "-o", "-"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, BadCompressionLevel) { - { - Options options; - auto args = makeArray("x", "-20"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "--ultra", "-23"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "--1"); // negative 1? - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, InvalidOption) { - { - Options options; - auto args = makeArray("x", "-x"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, BadOutputFile) { - { - Options options; - auto args = makeArray("notzst", "-d", "-p", "1"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ("", options.getOutputFile(options.inputFiles.front())); - } -} - -TEST(Options, BadOptionsWithArguments) { - { - Options options; - auto args = makeArray("x", "-pf"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-p", "10f"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-p"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-o"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("x", "-o"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, KeepSource) { - { - Options options; - auto args = makeArray("x", "--rm", "-k"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.keepSource); - } - { - Options options; - auto args = makeArray("x", "--rm", "--keep"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.keepSource); - } - { - Options options; - auto args = makeArray("x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.keepSource); - } - { - Options options; - auto args = makeArray("x", "--rm"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(false, options.keepSource); - } -} - -TEST(Options, Verbosity) { - { - Options options; - auto args = makeArray("x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(2, options.verbosity); - } - { - Options options; - auto args = makeArray("--quiet", "-qq", "x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(-1, options.verbosity); - } - { - Options options; - auto args = makeArray("x", "y"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(1, options.verbosity); - } - { - Options options; - auto args = makeArray("--", "x", "y"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(1, options.verbosity); - } - { - Options options; - auto args = makeArray("-qv", "x", "y"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(1, options.verbosity); - } - { - Options options; - auto args = makeArray("-v", "x", "y"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(3, options.verbosity); - } - { - Options options; - auto args = makeArray("-v", "x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(3, options.verbosity); - } -} - -TEST(Options, TestMode) { - { - Options options; - auto args = makeArray("x", "-t"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.keepSource); - EXPECT_EQ(true, options.decompress); - EXPECT_EQ(nullOutput, options.outputFile); - } - { - Options options; - auto args = makeArray("x", "--test", "--rm", "-ohello"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.keepSource); - EXPECT_EQ(true, options.decompress); - EXPECT_EQ(nullOutput, options.outputFile); - } -} - -TEST(Options, Checksum) { - { - Options options; - auto args = makeArray("x.zst", "--no-check", "-Cd"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.checksum); - } - { - Options options; - auto args = makeArray("x"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.checksum); - } - { - Options options; - auto args = makeArray("x", "--no-check", "--check"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(true, options.checksum); - } - { - Options options; - auto args = makeArray("x", "--no-check"); - EXPECT_SUCCESS(options.parse(args.size(), args.data())); - EXPECT_EQ(false, options.checksum); - } -} - -TEST(Options, InputFiles) { - { - Options options; - auto args = makeArray("-cd"); - options.parse(args.size(), args.data()); - EXPECT_EQ(1, options.inputFiles.size()); - EXPECT_EQ("-", options.inputFiles[0]); - EXPECT_EQ("-", options.outputFile); - } - { - Options options; - auto args = makeArray(); - options.parse(args.size(), args.data()); - EXPECT_EQ(1, options.inputFiles.size()); - EXPECT_EQ("-", options.inputFiles[0]); - EXPECT_EQ("-", options.outputFile); - } - { - Options options; - auto args = makeArray("-d"); - options.parse(args.size(), args.data()); - EXPECT_EQ(1, options.inputFiles.size()); - EXPECT_EQ("-", options.inputFiles[0]); - EXPECT_EQ("-", options.outputFile); - } - { - Options options; - auto args = makeArray("x", "-"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, InvalidOptions) { - { - Options options; - auto args = makeArray("-ibasdf"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("- "); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-n15"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-0", "x"); - EXPECT_FAILURE(options.parse(args.size(), args.data())); - } -} - -TEST(Options, Extras) { - { - Options options; - auto args = makeArray("-h"); - EXPECT_MESSAGE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-H"); - EXPECT_MESSAGE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("-V"); - EXPECT_MESSAGE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("--help"); - EXPECT_MESSAGE(options.parse(args.size(), args.data())); - } - { - Options options; - auto args = makeArray("--version"); - EXPECT_MESSAGE(options.parse(args.size(), args.data())); - } -} diff --git a/third_party/zstd/contrib/pzstd/test/PzstdTest.cpp b/third_party/zstd/contrib/pzstd/test/PzstdTest.cpp deleted file mode 100644 index 3249f86..0000000 --- a/third_party/zstd/contrib/pzstd/test/PzstdTest.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "Pzstd.h" -#include "datagen.h" -#include "test/RoundTrip.h" -#include "utils/ScopeGuard.h" - -#include -#include -#include -#include -#include - -using namespace std; -using namespace pzstd; - -TEST(Pzstd, SmallSizes) { - unsigned seed = std::random_device{}(); - std::fprintf(stderr, "Pzstd.SmallSizes seed: %u\n", seed); - std::mt19937 gen(seed); - - for (unsigned len = 1; len < 256; ++len) { - if (len % 16 == 0) { - std::fprintf(stderr, "%u / 16\n", len / 16); - } - std::string inputFile = std::tmpnam(nullptr); - auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); - { - static uint8_t buf[256]; - RDG_genBuffer(buf, len, 0.5, 0.0, gen()); - auto fd = std::fopen(inputFile.c_str(), "wb"); - auto written = std::fwrite(buf, 1, len, fd); - std::fclose(fd); - ASSERT_EQ(written, len); - } - for (unsigned numThreads = 1; numThreads <= 2; ++numThreads) { - for (unsigned level = 1; level <= 4; level *= 4) { - auto errorGuard = makeScopeGuard([&] { - std::fprintf(stderr, "# threads: %u\n", numThreads); - std::fprintf(stderr, "compression level: %u\n", level); - }); - Options options; - options.overwrite = true; - options.inputFiles = {inputFile}; - options.numThreads = numThreads; - options.compressionLevel = level; - options.verbosity = 1; - ASSERT_TRUE(roundTrip(options)); - errorGuard.dismiss(); - } - } - } -} - -TEST(Pzstd, LargeSizes) { - unsigned seed = std::random_device{}(); - std::fprintf(stderr, "Pzstd.LargeSizes seed: %u\n", seed); - std::mt19937 gen(seed); - - for (unsigned len = 1 << 20; len <= (1 << 24); len *= 2) { - std::string inputFile = std::tmpnam(nullptr); - auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); - { - std::unique_ptr buf(new uint8_t[len]); - RDG_genBuffer(buf.get(), len, 0.5, 0.0, gen()); - auto fd = std::fopen(inputFile.c_str(), "wb"); - auto written = std::fwrite(buf.get(), 1, len, fd); - std::fclose(fd); - ASSERT_EQ(written, len); - } - for (unsigned numThreads = 1; numThreads <= 16; numThreads *= 4) { - for (unsigned level = 1; level <= 4; level *= 4) { - auto errorGuard = makeScopeGuard([&] { - std::fprintf(stderr, "# threads: %u\n", numThreads); - std::fprintf(stderr, "compression level: %u\n", level); - }); - Options options; - options.overwrite = true; - options.inputFiles = {inputFile}; - options.numThreads = std::min(numThreads, options.numThreads); - options.compressionLevel = level; - options.verbosity = 1; - ASSERT_TRUE(roundTrip(options)); - errorGuard.dismiss(); - } - } - } -} - -TEST(Pzstd, DISABLED_ExtremelyLargeSize) { - unsigned seed = std::random_device{}(); - std::fprintf(stderr, "Pzstd.ExtremelyLargeSize seed: %u\n", seed); - std::mt19937 gen(seed); - - std::string inputFile = std::tmpnam(nullptr); - auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); - - { - // Write 4GB + 64 MB - constexpr size_t kLength = 1 << 26; - std::unique_ptr buf(new uint8_t[kLength]); - auto fd = std::fopen(inputFile.c_str(), "wb"); - auto closeGuard = makeScopeGuard([&] { std::fclose(fd); }); - for (size_t i = 0; i < (1 << 6) + 1; ++i) { - RDG_genBuffer(buf.get(), kLength, 0.5, 0.0, gen()); - auto written = std::fwrite(buf.get(), 1, kLength, fd); - if (written != kLength) { - std::fprintf(stderr, "Failed to write file, skipping test\n"); - return; - } - } - } - - Options options; - options.overwrite = true; - options.inputFiles = {inputFile}; - options.compressionLevel = 1; - if (options.numThreads == 0) { - options.numThreads = 1; - } - ASSERT_TRUE(roundTrip(options)); -} - -TEST(Pzstd, ExtremelyCompressible) { - std::string inputFile = std::tmpnam(nullptr); - auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); - { - std::unique_ptr buf(new uint8_t[10000]); - std::memset(buf.get(), 'a', 10000); - auto fd = std::fopen(inputFile.c_str(), "wb"); - auto written = std::fwrite(buf.get(), 1, 10000, fd); - std::fclose(fd); - ASSERT_EQ(written, 10000); - } - Options options; - options.overwrite = true; - options.inputFiles = {inputFile}; - options.numThreads = 1; - options.compressionLevel = 1; - ASSERT_TRUE(roundTrip(options)); -} diff --git a/third_party/zstd/contrib/pzstd/test/RoundTrip.h b/third_party/zstd/contrib/pzstd/test/RoundTrip.h deleted file mode 100644 index f777622..0000000 --- a/third_party/zstd/contrib/pzstd/test/RoundTrip.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "Options.h" -#include "Pzstd.h" -#include "utils/ScopeGuard.h" - -#include -#include -#include -#include - -namespace pzstd { - -inline bool check(std::string source, std::string decompressed) { - std::unique_ptr sBuf(new std::uint8_t[1024]); - std::unique_ptr dBuf(new std::uint8_t[1024]); - - auto sFd = std::fopen(source.c_str(), "rb"); - auto dFd = std::fopen(decompressed.c_str(), "rb"); - auto guard = makeScopeGuard([&] { - std::fclose(sFd); - std::fclose(dFd); - }); - - size_t sRead, dRead; - - do { - sRead = std::fread(sBuf.get(), 1, 1024, sFd); - dRead = std::fread(dBuf.get(), 1, 1024, dFd); - if (std::ferror(sFd) || std::ferror(dFd)) { - return false; - } - if (sRead != dRead) { - return false; - } - - for (size_t i = 0; i < sRead; ++i) { - if (sBuf.get()[i] != dBuf.get()[i]) { - return false; - } - } - } while (sRead == 1024); - if (!std::feof(sFd) || !std::feof(dFd)) { - return false; - } - return true; -} - -inline bool roundTrip(Options& options) { - if (options.inputFiles.size() != 1) { - return false; - } - std::string source = options.inputFiles.front(); - std::string compressedFile = std::tmpnam(nullptr); - std::string decompressedFile = std::tmpnam(nullptr); - auto guard = makeScopeGuard([&] { - std::remove(compressedFile.c_str()); - std::remove(decompressedFile.c_str()); - }); - - { - options.outputFile = compressedFile; - options.decompress = false; - if (pzstdMain(options) != 0) { - return false; - } - } - { - options.decompress = true; - options.inputFiles.front() = compressedFile; - options.outputFile = decompressedFile; - if (pzstdMain(options) != 0) { - return false; - } - } - return check(source, decompressedFile); -} -} diff --git a/third_party/zstd/contrib/pzstd/test/RoundTripTest.cpp b/third_party/zstd/contrib/pzstd/test/RoundTripTest.cpp deleted file mode 100644 index 27c5028..0000000 --- a/third_party/zstd/contrib/pzstd/test/RoundTripTest.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "datagen.h" -#include "Options.h" -#include "test/RoundTrip.h" -#include "utils/ScopeGuard.h" - -#include -#include -#include -#include -#include - -using namespace std; -using namespace pzstd; - -namespace { -string -writeData(size_t size, double matchProba, double litProba, unsigned seed) { - std::unique_ptr buf(new uint8_t[size]); - RDG_genBuffer(buf.get(), size, matchProba, litProba, seed); - string file = tmpnam(nullptr); - auto fd = std::fopen(file.c_str(), "wb"); - auto guard = makeScopeGuard([&] { std::fclose(fd); }); - auto bytesWritten = std::fwrite(buf.get(), 1, size, fd); - if (bytesWritten != size) { - std::abort(); - } - return file; -} - -template -string generateInputFile(Generator& gen) { - // Use inputs ranging from 1 Byte to 2^16 Bytes - std::uniform_int_distribution size{1, 1 << 16}; - std::uniform_real_distribution<> prob{0, 1}; - return writeData(size(gen), prob(gen), prob(gen), gen()); -} - -template -Options generateOptions(Generator& gen, const string& inputFile) { - Options options; - options.inputFiles = {inputFile}; - options.overwrite = true; - - std::uniform_int_distribution numThreads{1, 32}; - std::uniform_int_distribution compressionLevel{1, 10}; - - options.numThreads = numThreads(gen); - options.compressionLevel = compressionLevel(gen); - - return options; -} -} - -int main() { - std::mt19937 gen(std::random_device{}()); - - auto newlineGuard = makeScopeGuard([] { std::fprintf(stderr, "\n"); }); - for (unsigned i = 0; i < 10000; ++i) { - if (i % 100 == 0) { - std::fprintf(stderr, "Progress: %u%%\r", i / 100); - } - auto inputFile = generateInputFile(gen); - auto inputGuard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); - for (unsigned i = 0; i < 10; ++i) { - auto options = generateOptions(gen, inputFile); - if (!roundTrip(options)) { - std::fprintf(stderr, "numThreads: %u\n", options.numThreads); - std::fprintf(stderr, "level: %u\n", options.compressionLevel); - std::fprintf(stderr, "decompress? %u\n", (unsigned)options.decompress); - std::fprintf(stderr, "file: %s\n", inputFile.c_str()); - return 1; - } - } - } - return 0; -} diff --git a/third_party/zstd/contrib/pzstd/utils/BUCK b/third_party/zstd/contrib/pzstd/utils/BUCK deleted file mode 100644 index e757f41..0000000 --- a/third_party/zstd/contrib/pzstd/utils/BUCK +++ /dev/null @@ -1,75 +0,0 @@ -cxx_library( - name='buffer', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['Buffer.h'], - deps=[':range'], -) - -cxx_library( - name='file_system', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['FileSystem.h'], - deps=[':range'], -) - -cxx_library( - name='likely', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['Likely.h'], -) - -cxx_library( - name='range', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['Range.h'], - deps=[':likely'], -) - -cxx_library( - name='resource_pool', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['ResourcePool.h'], -) - -cxx_library( - name='scope_guard', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['ScopeGuard.h'], -) - -cxx_library( - name='thread_pool', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['ThreadPool.h'], - deps=[':work_queue'], -) - -cxx_library( - name='work_queue', - visibility=['PUBLIC'], - header_namespace='utils', - exported_headers=['WorkQueue.h'], - deps=[':buffer'], -) - -cxx_library( - name='utils', - visibility=['PUBLIC'], - deps=[ - ':buffer', - ':file_system', - ':likely', - ':range', - ':resource_pool', - ':scope_guard', - ':thread_pool', - ':work_queue', - ], -) diff --git a/third_party/zstd/contrib/pzstd/utils/Buffer.h b/third_party/zstd/contrib/pzstd/utils/Buffer.h deleted file mode 100644 index a85f770..0000000 --- a/third_party/zstd/contrib/pzstd/utils/Buffer.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "utils/Range.h" - -#include -#include -#include - -namespace pzstd { - -/** - * A `Buffer` has a pointer to a shared buffer, and a range of the buffer that - * it owns. - * The idea is that you can allocate one buffer, and write chunks into it - * and break off those chunks. - * The underlying buffer is reference counted, and will be destroyed when all - * `Buffer`s that reference it are destroyed. - */ -class Buffer { - std::shared_ptr buffer_; - MutableByteRange range_; - - static void delete_buffer(unsigned char* buffer) { - delete[] buffer; - } - - public: - /// Construct an empty buffer that owns no data. - explicit Buffer() {} - - /// Construct a `Buffer` that owns a new underlying buffer of size `size`. - explicit Buffer(std::size_t size) - : buffer_(new unsigned char[size], delete_buffer), - range_(buffer_.get(), buffer_.get() + size) {} - - explicit Buffer(std::shared_ptr buffer, MutableByteRange data) - : buffer_(buffer), range_(data) {} - - Buffer(Buffer&&) = default; - Buffer& operator=(Buffer&&) = default; - - /** - * Splits the data into two pieces: [begin, begin + n), [begin + n, end). - * Their data both points into the same underlying buffer. - * Modifies the original `Buffer` to point to only [begin + n, end). - * - * @param n The offset to split at. - * @returns A buffer that owns the data [begin, begin + n). - */ - Buffer splitAt(std::size_t n) { - auto firstPiece = range_.subpiece(0, n); - range_.advance(n); - return Buffer(buffer_, firstPiece); - } - - /// Modifies the buffer to point to the range [begin + n, end). - void advance(std::size_t n) { - range_.advance(n); - } - - /// Modifies the buffer to point to the range [begin, end - n). - void subtract(std::size_t n) { - range_.subtract(n); - } - - /// Returns a read only `Range` pointing to the `Buffer`s data. - ByteRange range() const { - return range_; - } - /// Returns a mutable `Range` pointing to the `Buffer`s data. - MutableByteRange range() { - return range_; - } - - const unsigned char* data() const { - return range_.data(); - } - - unsigned char* data() { - return range_.data(); - } - - std::size_t size() const { - return range_.size(); - } - - bool empty() const { - return range_.empty(); - } -}; -} diff --git a/third_party/zstd/contrib/pzstd/utils/FileSystem.h b/third_party/zstd/contrib/pzstd/utils/FileSystem.h deleted file mode 100644 index 8d57d05..0000000 --- a/third_party/zstd/contrib/pzstd/utils/FileSystem.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "utils/Portability.h" -#include "utils/Range.h" - -#include -#include -#include -#include -#include - -// A small subset of `std::filesystem`. -// `std::filesystem` should be a drop in replacement. -// See https://en.cppreference.com/w/cpp/filesystem for documentation. - -namespace pzstd { - -// using file_status = ... causes gcc to emit a false positive warning -#if defined(_MSC_VER) -typedef struct ::_stat64 file_status; -#else -typedef struct ::stat file_status; -#endif - -/// https://en.cppreference.com/w/cpp/filesystem/status -inline file_status status(StringPiece path, std::error_code& ec) noexcept { - file_status status; -#if defined(_MSC_VER) - const auto error = ::_stat64(path.data(), &status); -#else - const auto error = ::stat(path.data(), &status); -#endif - if (error) { - ec.assign(errno, std::generic_category()); - } else { - ec.clear(); - } - return status; -} - -/// https://en.cppreference.com/w/cpp/filesystem/is_regular_file -inline bool is_regular_file(file_status status) noexcept { -#if defined(S_ISREG) - return S_ISREG(status.st_mode); -#elif !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) - return (status.st_mode & S_IFMT) == S_IFREG; -#else - static_assert(false, "No POSIX stat() support."); -#endif -} - -/// https://en.cppreference.com/w/cpp/filesystem/is_regular_file -inline bool is_regular_file(StringPiece path, std::error_code& ec) noexcept { - return is_regular_file(status(path, ec)); -} - -/// https://en.cppreference.com/w/cpp/filesystem/is_directory -inline bool is_directory(file_status status) noexcept { -#if defined(S_ISDIR) - return S_ISDIR(status.st_mode); -#elif !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) - return (status.st_mode & S_IFMT) == S_IFDIR; -#else - static_assert(false, "NO POSIX stat() support."); -#endif -} - -/// https://en.cppreference.com/w/cpp/filesystem/is_directory -inline bool is_directory(StringPiece path, std::error_code& ec) noexcept { - return is_directory(status(path, ec)); -} - -/// https://en.cppreference.com/w/cpp/filesystem/file_size -inline std::uintmax_t file_size( - StringPiece path, - std::error_code& ec) noexcept { - auto stat = status(path, ec); - if (ec) { - return std::numeric_limits::max(); - } - if (!is_regular_file(stat)) { - ec.assign(ENOTSUP, std::generic_category()); - return std::numeric_limits::max(); - } - ec.clear(); - return stat.st_size; -} -} diff --git a/third_party/zstd/contrib/pzstd/utils/Likely.h b/third_party/zstd/contrib/pzstd/utils/Likely.h deleted file mode 100644 index 52243a6..0000000 --- a/third_party/zstd/contrib/pzstd/utils/Likely.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -/** - * Compiler hints to indicate the fast path of an "if" branch: whether - * the if condition is likely to be true or false. - * - * @author Tudor Bosman (tudorb@fb.com) - */ - -#pragma once - -#undef LIKELY -#undef UNLIKELY - -#if defined(__GNUC__) && __GNUC__ >= 4 -#define LIKELY(x) (__builtin_expect((x), 1)) -#define UNLIKELY(x) (__builtin_expect((x), 0)) -#else -#define LIKELY(x) (x) -#define UNLIKELY(x) (x) -#endif diff --git a/third_party/zstd/contrib/pzstd/utils/Portability.h b/third_party/zstd/contrib/pzstd/utils/Portability.h deleted file mode 100644 index ef1f86e..0000000 --- a/third_party/zstd/contrib/pzstd/utils/Portability.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -#pragma once - -#include - -// Required for windows, which defines min/max, but we want the std:: version. -#undef min -#undef max diff --git a/third_party/zstd/contrib/pzstd/utils/Range.h b/third_party/zstd/contrib/pzstd/utils/Range.h deleted file mode 100644 index 0fd8f9f..0000000 --- a/third_party/zstd/contrib/pzstd/utils/Range.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -/** - * A subset of `folly/Range.h`. - * All code copied verbatim modulo formatting - */ -#pragma once - -#include "utils/Likely.h" -#include "utils/Portability.h" - -#include -#include -#include -#include -#include -#include - -namespace pzstd { - -namespace detail { -/* - *Use IsCharPointer::type to enable const char* or char*. - *Use IsCharPointer::const_type to enable only const char*. -*/ -template -struct IsCharPointer {}; - -template <> -struct IsCharPointer { - typedef int type; -}; - -template <> -struct IsCharPointer { - typedef int const_type; - typedef int type; -}; - -} // namespace detail - -template -class Range { - Iter b_; - Iter e_; - - public: - using size_type = std::size_t; - using iterator = Iter; - using const_iterator = Iter; - using value_type = typename std::remove_reference< - typename std::iterator_traits::reference>::type; - using reference = typename std::iterator_traits::reference; - - constexpr Range() : b_(), e_() {} - constexpr Range(Iter begin, Iter end) : b_(begin), e_(end) {} - - constexpr Range(Iter begin, size_type size) : b_(begin), e_(begin + size) {} - - template ::type = 0> - /* implicit */ Range(Iter str) : b_(str), e_(str + std::strlen(str)) {} - - template ::const_type = 0> - /* implicit */ Range(const std::string& str) - : b_(str.data()), e_(b_ + str.size()) {} - - // Allow implicit conversion from Range to Range if From is - // implicitly convertible to To. - template < - class OtherIter, - typename std::enable_if< - (!std::is_same::value && - std::is_convertible::value), - int>::type = 0> - constexpr /* implicit */ Range(const Range& other) - : b_(other.begin()), e_(other.end()) {} - - Range(const Range&) = default; - Range(Range&&) = default; - - Range& operator=(const Range&) = default; - Range& operator=(Range&&) = default; - - constexpr size_type size() const { - return e_ - b_; - } - bool empty() const { - return b_ == e_; - } - Iter data() const { - return b_; - } - Iter begin() const { - return b_; - } - Iter end() const { - return e_; - } - - void advance(size_type n) { - if (UNLIKELY(n > size())) { - throw std::out_of_range("index out of range"); - } - b_ += n; - } - - void subtract(size_type n) { - if (UNLIKELY(n > size())) { - throw std::out_of_range("index out of range"); - } - e_ -= n; - } - - Range subpiece(size_type first, size_type length = std::string::npos) const { - if (UNLIKELY(first > size())) { - throw std::out_of_range("index out of range"); - } - - return Range(b_ + first, std::min(length, size() - first)); - } -}; - -using ByteRange = Range; -using MutableByteRange = Range; -using StringPiece = Range; -} diff --git a/third_party/zstd/contrib/pzstd/utils/ResourcePool.h b/third_party/zstd/contrib/pzstd/utils/ResourcePool.h deleted file mode 100644 index 7c4bb62..0000000 --- a/third_party/zstd/contrib/pzstd/utils/ResourcePool.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include -#include -#include -#include -#include - -namespace pzstd { - -/** - * An unbounded pool of resources. - * A `ResourcePool` requires a factory function that takes allocates `T*` and - * a free function that frees a `T*`. - * Calling `ResourcePool::get()` will give you a new `ResourcePool::UniquePtr` - * to a `T`, and when it goes out of scope the resource will be returned to the - * pool. - * The `ResourcePool` *must* survive longer than any resources it hands out. - * Remember that `ResourcePool` hands out mutable `T`s, so make sure to clean - * up the resource before or after every use. - */ -template -class ResourcePool { - public: - class Deleter; - using Factory = std::function; - using Free = std::function; - using UniquePtr = std::unique_ptr; - - private: - std::mutex mutex_; - Factory factory_; - Free free_; - std::vector resources_; - unsigned inUse_; - - public: - /** - * Creates a `ResourcePool`. - * - * @param factory The function to use to create new resources. - * @param free The function to use to free resources created by `factory`. - */ - ResourcePool(Factory factory, Free free) - : factory_(std::move(factory)), free_(std::move(free)), inUse_(0) {} - - /** - * @returns A unique pointer to a resource. The resource is null iff - * there are no available resources and `factory()` returns null. - */ - UniquePtr get() { - std::lock_guard lock(mutex_); - if (!resources_.empty()) { - UniquePtr resource{resources_.back(), Deleter{*this}}; - resources_.pop_back(); - ++inUse_; - return resource; - } - UniquePtr resource{factory_(), Deleter{*this}}; - ++inUse_; - return resource; - } - - ~ResourcePool() noexcept { - assert(inUse_ == 0); - for (const auto resource : resources_) { - free_(resource); - } - } - - class Deleter { - ResourcePool *pool_; - public: - explicit Deleter(ResourcePool &pool) : pool_(&pool) {} - - void operator() (T *resource) { - std::lock_guard lock(pool_->mutex_); - // Make sure we don't put null resources into the pool - if (resource) { - pool_->resources_.push_back(resource); - } - assert(pool_->inUse_ > 0); - --pool_->inUse_; - } - }; -}; - -} diff --git a/third_party/zstd/contrib/pzstd/utils/ScopeGuard.h b/third_party/zstd/contrib/pzstd/utils/ScopeGuard.h deleted file mode 100644 index 911fd98..0000000 --- a/third_party/zstd/contrib/pzstd/utils/ScopeGuard.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include - -namespace pzstd { - -/** - * Dismissable scope guard. - * `Function` must be callable and take no parameters. - * Unless `dismiss()` is called, the callable is executed upon destruction of - * `ScopeGuard`. - * - * Example: - * - * auto guard = makeScopeGuard([&] { cleanup(); }); - */ -template -class ScopeGuard { - Function function; - bool dismissed; - - public: - explicit ScopeGuard(Function&& function) - : function(std::move(function)), dismissed(false) {} - - void dismiss() { - dismissed = true; - } - - ~ScopeGuard() noexcept { - if (!dismissed) { - function(); - } - } -}; - -/// Creates a scope guard from `function`. -template -ScopeGuard makeScopeGuard(Function&& function) { - return ScopeGuard(std::forward(function)); -} -} diff --git a/third_party/zstd/contrib/pzstd/utils/ThreadPool.h b/third_party/zstd/contrib/pzstd/utils/ThreadPool.h deleted file mode 100644 index a087d7c..0000000 --- a/third_party/zstd/contrib/pzstd/utils/ThreadPool.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "utils/WorkQueue.h" - -#include -#include -#include -#include - -namespace pzstd { -/// A simple thread pool that pulls tasks off its queue in FIFO order. -class ThreadPool { - std::vector threads_; - - WorkQueue> tasks_; - - public: - /// Constructs a thread pool with `numThreads` threads. - explicit ThreadPool(std::size_t numThreads) { - threads_.reserve(numThreads); - for (std::size_t i = 0; i < numThreads; ++i) { - threads_.emplace_back([this] { - std::function task; - while (tasks_.pop(task)) { - task(); - } - }); - } - } - - /// Finishes all tasks currently in the queue. - ~ThreadPool() { - tasks_.finish(); - for (auto& thread : threads_) { - thread.join(); - } - } - - /** - * Adds `task` to the queue of tasks to execute. Since `task` is a - * `std::function<>`, it cannot be a move only type. So any lambda passed must - * not capture move only types (like `std::unique_ptr`). - * - * @param task The task to execute. - */ - void add(std::function task) { - tasks_.push(std::move(task)); - } -}; -} diff --git a/third_party/zstd/contrib/pzstd/utils/WorkQueue.h b/third_party/zstd/contrib/pzstd/utils/WorkQueue.h deleted file mode 100644 index 07842e5..0000000 --- a/third_party/zstd/contrib/pzstd/utils/WorkQueue.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#pragma once - -#include "utils/Buffer.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace pzstd { - -/// Unbounded thread-safe work queue. -template -class WorkQueue { - // Protects all member variable access - std::mutex mutex_; - std::condition_variable readerCv_; - std::condition_variable writerCv_; - std::condition_variable finishCv_; - - std::queue queue_; - bool done_; - std::size_t maxSize_; - - // Must have lock to call this function - bool full() const { - if (maxSize_ == 0) { - return false; - } - return queue_.size() >= maxSize_; - } - - public: - /** - * Constructs an empty work queue with an optional max size. - * If `maxSize == 0` the queue size is unbounded. - * - * @param maxSize The maximum allowed size of the work queue. - */ - WorkQueue(std::size_t maxSize = 0) : done_(false), maxSize_(maxSize) {} - - /** - * Push an item onto the work queue. Notify a single thread that work is - * available. If `finish()` has been called, do nothing and return false. - * If `push()` returns false, then `item` has not been moved from. - * - * @param item Item to push onto the queue. - * @returns True upon success, false if `finish()` has been called. An - * item was pushed iff `push()` returns true. - */ - bool push(T&& item) { - { - std::unique_lock lock(mutex_); - while (full() && !done_) { - writerCv_.wait(lock); - } - if (done_) { - return false; - } - queue_.push(std::move(item)); - } - readerCv_.notify_one(); - return true; - } - - /** - * Attempts to pop an item off the work queue. It will block until data is - * available or `finish()` has been called. - * - * @param[out] item If `pop` returns `true`, it contains the popped item. - * If `pop` returns `false`, it is unmodified. - * @returns True upon success. False if the queue is empty and - * `finish()` has been called. - */ - bool pop(T& item) { - { - std::unique_lock lock(mutex_); - while (queue_.empty() && !done_) { - readerCv_.wait(lock); - } - if (queue_.empty()) { - assert(done_); - return false; - } - item = std::move(queue_.front()); - queue_.pop(); - } - writerCv_.notify_one(); - return true; - } - - /** - * Sets the maximum queue size. If `maxSize == 0` then it is unbounded. - * - * @param maxSize The new maximum queue size. - */ - void setMaxSize(std::size_t maxSize) { - { - std::lock_guard lock(mutex_); - maxSize_ = maxSize; - } - writerCv_.notify_all(); - } - - /** - * Promise that either the reader side or the writer side is done. - * If the writer is done, `push()` won't be called again, so once the queue - * is empty there will never be any more work. If the reader is done, `pop()` - * won't be called again, so further items pushed will just be ignored. - */ - void finish() { - { - std::lock_guard lock(mutex_); - done_ = true; - } - readerCv_.notify_all(); - writerCv_.notify_all(); - finishCv_.notify_all(); - } - - /// Blocks until `finish()` has been called (but the queue may not be empty). - void waitUntilFinished() { - std::unique_lock lock(mutex_); - while (!done_) { - finishCv_.wait(lock); - } - } -}; - -/// Work queue for `Buffer`s that knows the total number of bytes in the queue. -class BufferWorkQueue { - WorkQueue queue_; - std::atomic size_; - - public: - BufferWorkQueue(std::size_t maxSize = 0) : queue_(maxSize), size_(0) {} - - void push(Buffer buffer) { - size_.fetch_add(buffer.size()); - queue_.push(std::move(buffer)); - } - - bool pop(Buffer& buffer) { - bool result = queue_.pop(buffer); - if (result) { - size_.fetch_sub(buffer.size()); - } - return result; - } - - void setMaxSize(std::size_t maxSize) { - queue_.setMaxSize(maxSize); - } - - void finish() { - queue_.finish(); - } - - /** - * Blocks until `finish()` has been called. - * - * @returns The total number of bytes of all the `Buffer`s currently in the - * queue. - */ - std::size_t size() { - queue_.waitUntilFinished(); - return size_.load(); - } -}; -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/BUCK b/third_party/zstd/contrib/pzstd/utils/test/BUCK deleted file mode 100644 index a5113ca..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -cxx_test( - name='buffer_test', - srcs=['BufferTest.cpp'], - deps=['//contrib/pzstd/utils:buffer'], -) - -cxx_test( - name='range_test', - srcs=['RangeTest.cpp'], - deps=['//contrib/pzstd/utils:range'], -) - -cxx_test( - name='resource_pool_test', - srcs=['ResourcePoolTest.cpp'], - deps=['//contrib/pzstd/utils:resource_pool'], -) - -cxx_test( - name='scope_guard_test', - srcs=['ScopeGuardTest.cpp'], - deps=['//contrib/pzstd/utils:scope_guard'], -) - -cxx_test( - name='thread_pool_test', - srcs=['ThreadPoolTest.cpp'], - deps=['//contrib/pzstd/utils:thread_pool'], -) - -cxx_test( - name='work_queue_test', - srcs=['RangeTest.cpp'], - deps=['//contrib/pzstd/utils:work_queue'], -) diff --git a/third_party/zstd/contrib/pzstd/utils/test/BufferTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/BufferTest.cpp deleted file mode 100644 index 58bf08d..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/BufferTest.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/Buffer.h" -#include "utils/Range.h" - -#include -#include - -using namespace pzstd; - -namespace { -void deleter(const unsigned char* buf) { - delete[] buf; -} -} - -TEST(Buffer, Constructors) { - Buffer empty; - EXPECT_TRUE(empty.empty()); - EXPECT_EQ(0, empty.size()); - - Buffer sized(5); - EXPECT_FALSE(sized.empty()); - EXPECT_EQ(5, sized.size()); - - Buffer moved(std::move(sized)); - EXPECT_FALSE(sized.empty()); - EXPECT_EQ(5, sized.size()); - - Buffer assigned; - assigned = std::move(moved); - EXPECT_FALSE(sized.empty()); - EXPECT_EQ(5, sized.size()); -} - -TEST(Buffer, BufferManagement) { - std::shared_ptr buf(new unsigned char[10], deleter); - { - Buffer acquired(buf, MutableByteRange(buf.get(), buf.get() + 10)); - EXPECT_EQ(2, buf.use_count()); - Buffer moved(std::move(acquired)); - EXPECT_EQ(2, buf.use_count()); - Buffer assigned; - assigned = std::move(moved); - EXPECT_EQ(2, buf.use_count()); - - Buffer split = assigned.splitAt(5); - EXPECT_EQ(3, buf.use_count()); - - split.advance(1); - assigned.subtract(1); - EXPECT_EQ(3, buf.use_count()); - } - EXPECT_EQ(1, buf.use_count()); -} - -TEST(Buffer, Modifiers) { - Buffer buf(10); - { - unsigned char i = 0; - for (auto& byte : buf.range()) { - byte = i++; - } - } - - auto prefix = buf.splitAt(2); - - ASSERT_EQ(2, prefix.size()); - EXPECT_EQ(0, *prefix.data()); - - ASSERT_EQ(8, buf.size()); - EXPECT_EQ(2, *buf.data()); - - buf.advance(2); - EXPECT_EQ(4, *buf.data()); - - EXPECT_EQ(9, *(buf.range().end() - 1)); - - buf.subtract(2); - EXPECT_EQ(7, *(buf.range().end() - 1)); - - EXPECT_EQ(4, buf.size()); -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/RangeTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/RangeTest.cpp deleted file mode 100644 index 8b7dee2..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/RangeTest.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/Range.h" - -#include -#include - -using namespace pzstd; - -// Range is directly copied from folly. -// Just some sanity tests to make sure everything seems to work. - -TEST(Range, Constructors) { - StringPiece empty; - EXPECT_TRUE(empty.empty()); - EXPECT_EQ(0, empty.size()); - - std::string str = "hello"; - { - Range piece(str.begin(), str.end()); - EXPECT_EQ(5, piece.size()); - EXPECT_EQ('h', *piece.data()); - EXPECT_EQ('o', *(piece.end() - 1)); - } - - { - StringPiece piece(str.data(), str.size()); - EXPECT_EQ(5, piece.size()); - EXPECT_EQ('h', *piece.data()); - EXPECT_EQ('o', *(piece.end() - 1)); - } - - { - StringPiece piece(str); - EXPECT_EQ(5, piece.size()); - EXPECT_EQ('h', *piece.data()); - EXPECT_EQ('o', *(piece.end() - 1)); - } - - { - StringPiece piece(str.c_str()); - EXPECT_EQ(5, piece.size()); - EXPECT_EQ('h', *piece.data()); - EXPECT_EQ('o', *(piece.end() - 1)); - } -} - -TEST(Range, Modifiers) { - StringPiece range("hello world"); - ASSERT_EQ(11, range.size()); - - { - auto hello = range.subpiece(0, 5); - EXPECT_EQ(5, hello.size()); - EXPECT_EQ('h', *hello.data()); - EXPECT_EQ('o', *(hello.end() - 1)); - } - { - auto hello = range; - hello.subtract(6); - EXPECT_EQ(5, hello.size()); - EXPECT_EQ('h', *hello.data()); - EXPECT_EQ('o', *(hello.end() - 1)); - } - { - auto world = range; - world.advance(6); - EXPECT_EQ(5, world.size()); - EXPECT_EQ('w', *world.data()); - EXPECT_EQ('d', *(world.end() - 1)); - } - - std::string expected = "hello world"; - EXPECT_EQ(expected, std::string(range.begin(), range.end())); - EXPECT_EQ(expected, std::string(range.data(), range.size())); -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp deleted file mode 100644 index 750ee08..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/ResourcePool.h" - -#include -#include -#include - -using namespace pzstd; - -TEST(ResourcePool, FullTest) { - unsigned numCreated = 0; - unsigned numDeleted = 0; - { - ResourcePool pool( - [&numCreated] { ++numCreated; return new int{5}; }, - [&numDeleted](int *x) { ++numDeleted; delete x; }); - - { - auto i = pool.get(); - EXPECT_EQ(5, *i); - *i = 6; - } - { - auto i = pool.get(); - EXPECT_EQ(6, *i); - auto j = pool.get(); - EXPECT_EQ(5, *j); - *j = 7; - } - { - auto i = pool.get(); - EXPECT_EQ(6, *i); - auto j = pool.get(); - EXPECT_EQ(7, *j); - } - } - EXPECT_EQ(2, numCreated); - EXPECT_EQ(numCreated, numDeleted); -} - -TEST(ResourcePool, ThreadSafe) { - std::atomic numCreated{0}; - std::atomic numDeleted{0}; - { - ResourcePool pool( - [&numCreated] { ++numCreated; return new int{0}; }, - [&numDeleted](int *x) { ++numDeleted; delete x; }); - auto push = [&pool] { - for (int i = 0; i < 100; ++i) { - auto x = pool.get(); - ++*x; - } - }; - std::thread t1{push}; - std::thread t2{push}; - t1.join(); - t2.join(); - - auto x = pool.get(); - auto y = pool.get(); - EXPECT_EQ(200, *x + *y); - } - EXPECT_GE(2, numCreated); - EXPECT_EQ(numCreated, numDeleted); -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp deleted file mode 100644 index 0f77cdf..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/ScopeGuard.h" - -#include - -using namespace pzstd; - -TEST(ScopeGuard, Dismiss) { - { - auto guard = makeScopeGuard([&] { EXPECT_TRUE(false); }); - guard.dismiss(); - } -} - -TEST(ScopeGuard, Executes) { - bool executed = false; - { - auto guard = makeScopeGuard([&] { executed = true; }); - } - EXPECT_TRUE(executed); -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp deleted file mode 100644 index a01052e..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/ThreadPool.h" - -#include -#include -#include -#include -#include - -using namespace pzstd; - -TEST(ThreadPool, Ordering) { - std::vector results; - - { - ThreadPool executor(1); - for (int i = 0; i < 10; ++i) { - executor.add([ &results, i ] { results.push_back(i); }); - } - } - - for (int i = 0; i < 10; ++i) { - EXPECT_EQ(i, results[i]); - } -} - -TEST(ThreadPool, AllJobsFinished) { - std::atomic numFinished{0}; - std::atomic start{false}; - { - std::cerr << "Creating executor" << std::endl; - ThreadPool executor(5); - for (int i = 0; i < 10; ++i) { - executor.add([ &numFinished, &start ] { - while (!start.load()) { - std::this_thread::yield(); - } - ++numFinished; - }); - } - std::cerr << "Starting" << std::endl; - start.store(true); - std::cerr << "Finishing" << std::endl; - } - EXPECT_EQ(10, numFinished.load()); -} - -TEST(ThreadPool, AddJobWhileJoining) { - std::atomic done{false}; - { - ThreadPool executor(1); - executor.add([&executor, &done] { - while (!done.load()) { - std::this_thread::yield(); - } - // Sleep for a second to be sure that we are joining - std::this_thread::sleep_for(std::chrono::seconds(1)); - executor.add([] { - EXPECT_TRUE(false); - }); - }); - done.store(true); - } -} diff --git a/third_party/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp b/third_party/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp deleted file mode 100644 index 16600bb..0000000 --- a/third_party/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/Buffer.h" -#include "utils/WorkQueue.h" - -#include -#include -#include -#include -#include -#include - -using namespace pzstd; - -namespace { -struct Popper { - WorkQueue* queue; - int* results; - std::mutex* mutex; - - void operator()() { - int result; - while (queue->pop(result)) { - std::lock_guard lock(*mutex); - results[result] = result; - } - } -}; -} - -TEST(WorkQueue, SingleThreaded) { - WorkQueue queue; - int result; - - queue.push(5); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(5, result); - - queue.push(1); - queue.push(2); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(1, result); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(2, result); - - queue.push(1); - queue.push(2); - queue.finish(); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(1, result); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(2, result); - EXPECT_FALSE(queue.pop(result)); - - queue.waitUntilFinished(); -} - -TEST(WorkQueue, SPSC) { - WorkQueue queue; - const int max = 100; - - for (int i = 0; i < 10; ++i) { - queue.push(int{i}); - } - - std::thread thread([ &queue, max ] { - int result; - for (int i = 0;; ++i) { - if (!queue.pop(result)) { - EXPECT_EQ(i, max); - break; - } - EXPECT_EQ(i, result); - } - }); - - std::this_thread::yield(); - for (int i = 10; i < max; ++i) { - queue.push(int{i}); - } - queue.finish(); - - thread.join(); -} - -TEST(WorkQueue, SPMC) { - WorkQueue queue; - std::vector results(50, -1); - std::mutex mutex; - std::vector threads; - for (int i = 0; i < 5; ++i) { - threads.emplace_back(Popper{&queue, results.data(), &mutex}); - } - - for (int i = 0; i < 50; ++i) { - queue.push(int{i}); - } - queue.finish(); - - for (auto& thread : threads) { - thread.join(); - } - - for (int i = 0; i < 50; ++i) { - EXPECT_EQ(i, results[i]); - } -} - -TEST(WorkQueue, MPMC) { - WorkQueue queue; - std::vector results(100, -1); - std::mutex mutex; - std::vector popperThreads; - for (int i = 0; i < 4; ++i) { - popperThreads.emplace_back(Popper{&queue, results.data(), &mutex}); - } - - std::vector pusherThreads; - for (int i = 0; i < 2; ++i) { - auto min = i * 50; - auto max = (i + 1) * 50; - pusherThreads.emplace_back( - [ &queue, min, max ] { - for (int i = min; i < max; ++i) { - queue.push(int{i}); - } - }); - } - - for (auto& thread : pusherThreads) { - thread.join(); - } - queue.finish(); - - for (auto& thread : popperThreads) { - thread.join(); - } - - for (int i = 0; i < 100; ++i) { - EXPECT_EQ(i, results[i]); - } -} - -TEST(WorkQueue, BoundedSizeWorks) { - WorkQueue queue(1); - int result; - queue.push(5); - queue.pop(result); - queue.push(5); - queue.pop(result); - queue.push(5); - queue.finish(); - queue.pop(result); - EXPECT_EQ(5, result); -} - -TEST(WorkQueue, BoundedSizePushAfterFinish) { - WorkQueue queue(1); - int result; - queue.push(5); - std::thread pusher([&queue] { - queue.push(6); - }); - // Dirtily try and make sure that pusher has run. - std::this_thread::sleep_for(std::chrono::seconds(1)); - queue.finish(); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(5, result); - EXPECT_FALSE(queue.pop(result)); - - pusher.join(); -} - -TEST(WorkQueue, SetMaxSize) { - WorkQueue queue(2); - int result; - queue.push(5); - queue.push(6); - queue.setMaxSize(1); - std::thread pusher([&queue] { - queue.push(7); - }); - // Dirtily try and make sure that pusher has run. - std::this_thread::sleep_for(std::chrono::seconds(1)); - queue.finish(); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(5, result); - EXPECT_TRUE(queue.pop(result)); - EXPECT_EQ(6, result); - EXPECT_FALSE(queue.pop(result)); - - pusher.join(); -} - -TEST(WorkQueue, BoundedSizeMPMC) { - WorkQueue queue(10); - std::vector results(200, -1); - std::mutex mutex; - std::cerr << "Creating popperThreads" << std::endl; - std::vector popperThreads; - for (int i = 0; i < 4; ++i) { - popperThreads.emplace_back(Popper{&queue, results.data(), &mutex}); - } - - std::cerr << "Creating pusherThreads" << std::endl; - std::vector pusherThreads; - for (int i = 0; i < 2; ++i) { - auto min = i * 100; - auto max = (i + 1) * 100; - pusherThreads.emplace_back( - [ &queue, min, max ] { - for (int i = min; i < max; ++i) { - queue.push(int{i}); - } - }); - } - - std::cerr << "Joining pusherThreads" << std::endl; - for (auto& thread : pusherThreads) { - thread.join(); - } - std::cerr << "Finishing queue" << std::endl; - queue.finish(); - - std::cerr << "Joining popperThreads" << std::endl; - for (auto& thread : popperThreads) { - thread.join(); - } - - std::cerr << "Inspecting results" << std::endl; - for (int i = 0; i < 200; ++i) { - EXPECT_EQ(i, results[i]); - } -} - -TEST(WorkQueue, FailedPush) { - WorkQueue> queue; - std::unique_ptr x(new int{5}); - EXPECT_TRUE(queue.push(std::move(x))); - EXPECT_EQ(nullptr, x); - queue.finish(); - x.reset(new int{6}); - EXPECT_FALSE(queue.push(std::move(x))); - EXPECT_NE(nullptr, x); - EXPECT_EQ(6, *x); -} - -TEST(BufferWorkQueue, SizeCalculatedCorrectly) { - { - BufferWorkQueue queue; - queue.finish(); - EXPECT_EQ(0, queue.size()); - } - { - BufferWorkQueue queue; - queue.push(Buffer(10)); - queue.finish(); - EXPECT_EQ(10, queue.size()); - } - { - BufferWorkQueue queue; - queue.push(Buffer(10)); - queue.push(Buffer(5)); - queue.finish(); - EXPECT_EQ(15, queue.size()); - } - { - BufferWorkQueue queue; - queue.push(Buffer(10)); - queue.push(Buffer(5)); - queue.finish(); - Buffer buffer; - queue.pop(buffer); - EXPECT_EQ(5, queue.size()); - } -} diff --git a/third_party/zstd/contrib/recovery/Makefile b/third_party/zstd/contrib/recovery/Makefile deleted file mode 100644 index be6ea4b..0000000 --- a/third_party/zstd/contrib/recovery/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -.PHONY: all -all: recover_directory - -ZSTDLIBDIR ?= ../../lib -PROGRAMDIR ?= ../../programs - -CFLAGS ?= -O3 -CFLAGS += -I$(ZSTDLIBDIR) -I$(PROGRAMDIR) -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum \ - -Wstrict-prototypes -Wundef \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -Wmissing-prototypes -CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) -FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) - -.PHONY: $(ZSTDLIBDIR)/libzstd.a -$(ZSTDLIBDIR)/libzstd.a: - $(MAKE) -C $(ZSTDLIBDIR) libzstd.a - -recover_directory: recover_directory.c $(ZSTDLIBDIR)/libzstd.a $(PROGRAMDIR)/util.c - $(CC) $(FLAGS) $^ -o $@$(EXT) - -.PHONY: clean -clean: - rm -f recover_directory diff --git a/third_party/zstd/contrib/recovery/recover_directory.c b/third_party/zstd/contrib/recovery/recover_directory.c deleted file mode 100644 index b9bd7ab..0000000 --- a/third_party/zstd/contrib/recovery/recover_directory.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include -#include -#include - -#define ZSTD_STATIC_LINKING_ONLY -#include "util.h" -#include "zstd.h" - -#define CHECK(cond, ...) \ - do { \ - if (!(cond)) { \ - fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, #cond); \ - fprintf(stderr, "" __VA_ARGS__); \ - fprintf(stderr, "\n"); \ - exit(1); \ - } \ - } while (0) - -static void usage(char const *program) { - fprintf(stderr, "USAGE: %s FILE.zst PREFIX\n", program); - fprintf(stderr, "FILE.zst: A zstd compressed file with multiple frames\n"); - fprintf(stderr, "PREFIX: The output prefix. Uncompressed files will be " - "created named ${PREFIX}0 ${PREFIX}1...\n\n"); - fprintf(stderr, "This program takes concatenated zstd frames and " - "decompresses them into individual files.\n"); - fprintf(stderr, "E.g. files created with a command like: zstd -r directory " - "-o file.zst\n"); -} - -typedef struct { - char *data; - size_t size; - size_t frames; - size_t maxFrameSize; -} ZstdFrames; - -static ZstdFrames readFile(char const *fileName) { - U64 const fileSize = UTIL_getFileSize(fileName); - CHECK(fileSize != UTIL_FILESIZE_UNKNOWN, "Unknown file size!"); - - char *const data = (char *)malloc(fileSize); - CHECK(data != NULL, "Allocation failed"); - - FILE *file = fopen(fileName, "rb"); - CHECK(file != NULL, "fopen failed"); - - size_t const readSize = fread(data, 1, fileSize, file); - CHECK(readSize == fileSize, "fread failed"); - - fclose(file); - ZstdFrames frames; - frames.data = (char *)data; - frames.size = fileSize; - frames.frames = 0; - - size_t index; - size_t maxFrameSize = 0; - for (index = 0; index < fileSize;) { - size_t const frameSize = - ZSTD_findFrameCompressedSize(data + index, fileSize - index); - CHECK(!ZSTD_isError(frameSize), "Bad zstd frame: %s", - ZSTD_getErrorName(frameSize)); - if (frameSize > maxFrameSize) - maxFrameSize = frameSize; - frames.frames += 1; - index += frameSize; - } - CHECK(index == fileSize, "Zstd file corrupt!"); - frames.maxFrameSize = maxFrameSize; - - return frames; -} - -static int computePadding(size_t numFrames) { - return snprintf(NULL, 0, "%u", (unsigned)numFrames); -} - -int main(int argc, char **argv) { - if (argc != 3) { - usage(argv[0]); - exit(1); - } - char const *const zstdFile = argv[1]; - char const *const prefix = argv[2]; - - ZstdFrames frames = readFile(zstdFile); - - if (frames.frames <= 1) { - fprintf( - stderr, - "%s only has %u zstd frame. Simply use `zstd -d` to decompress it.\n", - zstdFile, (unsigned)frames.frames); - exit(1); - } - - int const padding = computePadding(frames.frames - 1); - - size_t const outFileNameSize = strlen(prefix) + padding + 1; - char* outFileName = malloc(outFileNameSize); - CHECK(outFileName != NULL, "Allocation failure"); - - size_t const bufferSize = 128 * 1024; - void *buffer = malloc(bufferSize); - CHECK(buffer != NULL, "Allocation failure"); - - ZSTD_DCtx* dctx = ZSTD_createDCtx(); - CHECK(dctx != NULL, "Allocation failure"); - - fprintf(stderr, "Recovering %u files...\n", (unsigned)frames.frames); - - size_t index; - size_t frame = 0; - for (index = 0; index < frames.size; ++frame) { - size_t const frameSize = - ZSTD_findFrameCompressedSize(frames.data + index, frames.size - index); - - int const ret = snprintf(outFileName, outFileNameSize, "%s%0*u", prefix, padding, (unsigned)frame); - CHECK(ret >= 0 && (size_t)ret <= outFileNameSize, "snprintf failed!"); - - FILE* outFile = fopen(outFileName, "wb"); - CHECK(outFile != NULL, "fopen failed"); - - ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only); - ZSTD_inBuffer in = {frames.data + index, frameSize, 0}; - while (in.pos < in.size) { - ZSTD_outBuffer out = {buffer, bufferSize, 0}; - CHECK(!ZSTD_isError(ZSTD_decompressStream(dctx, &out, &in)), "decompression failed"); - size_t const writeSize = fwrite(out.dst, 1, out.pos, outFile); - CHECK(writeSize == out.pos, "fwrite failed"); - } - fclose(outFile); - fprintf(stderr, "Recovered %s\n", outFileName); - index += frameSize; - } - fprintf(stderr, "Complete\n"); - - free(outFileName); - ZSTD_freeDCtx(dctx); - free(buffer); - free(frames.data); - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/README.md b/third_party/zstd/contrib/seekable_format/README.md deleted file mode 100644 index fedf96b..0000000 --- a/third_party/zstd/contrib/seekable_format/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Zstandard Seekable Format - -The seekable format splits compressed data into a series of independent "frames", -each compressed individually, -so that decompression of a section in the middle of an archive -only requires zstd to decompress at most a frame's worth of extra data, -instead of the entire archive. - -The frames are appended, so that the decompression of the entire payload -still regenerates the original content, using any compliant zstd decoder. - -On top of that, the seekable format generates a jump table, -which makes it possible to jump directly to the position of the relevant frame -when requesting only a segment of the data. -The jump table is simply ignored by zstd decoders unaware of the seekable format. - -The format is delivered with an API to create seekable archives -and to retrieve arbitrary segments inside the archive. - -### Maximum Frame Size parameter - -When creating a seekable archive, the main parameter is the maximum frame size. - -At compression time, user can manually select the boundaries between segments, -but they don't have to: long segments will be automatically split -when larger than selected maximum frame size. - -Small frame sizes reduce decompression cost when requesting small segments, -because the decoder will nonetheless have to decompress an entire frame -to recover just a single byte from it. - -A good rule of thumb is to select a maximum frame size roughly equivalent -to the access pattern when it's known. -For example, if the application tends to request 4KB blocks, -then it's a good idea to set a maximum frame size in the vicinity of 4 KB. - -But small frame sizes also reduce compression ratio, -and increase the cost for the jump table, -so there is a balance to find. - -In general, try to avoid really tiny frame sizes (<1 KB), -which would have a large negative impact on compression ratio. diff --git a/third_party/zstd/contrib/seekable_format/examples/.gitignore b/third_party/zstd/contrib/seekable_format/examples/.gitignore deleted file mode 100644 index 0b83f5e..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -seekable_compression -seekable_decompression -seekable_decompression_mem -parallel_processing -parallel_compression diff --git a/third_party/zstd/contrib/seekable_format/examples/Makefile b/third_party/zstd/contrib/seekable_format/examples/Makefile deleted file mode 100644 index fcc0458..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -# This Makefile presumes libzstd is built, using `make` in / or /lib/ - -ZSTDLIB_PATH = ../../../lib -ZSTDLIB_NAME = libzstd.a -ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) - -CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I../../../lib -I../../../lib/common - -CFLAGS ?= -O3 -CFLAGS += -g - -SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB) - -.PHONY: default all clean test - -default: all - -all: seekable_compression seekable_decompression seekable_decompression_mem \ - parallel_processing - -$(ZSTDLIB): - make -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) - -seekable_compression : seekable_compression.c $(SEEKABLE_OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -seekable_decompression : seekable_decompression.c $(SEEKABLE_OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -seekable_decompression_mem : seekable_decompression_mem.c $(SEEKABLE_OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -parallel_processing : parallel_processing.c $(SEEKABLE_OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ -pthread - -parallel_compression : parallel_compression.c $(SEEKABLE_OBJS) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ -pthread - -clean: - @rm -f core *.o tmp* result* *.zst \ - seekable_compression seekable_decompression \ - seekable_decompression_mem \ - parallel_processing parallel_compression - @echo Cleaning completed diff --git a/third_party/zstd/contrib/seekable_format/examples/parallel_compression.c b/third_party/zstd/contrib/seekable_format/examples/parallel_compression.c deleted file mode 100644 index 4e06fae..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/parallel_compression.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -#include // malloc, free, exit, atoi -#include // fprintf, perror, feof, fopen, etc. -#include // strlen, memset, strcat -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed -#include -#if defined(WIN32) || defined(_WIN32) -# include -# define SLEEP(x) Sleep(x) -#else -# include -# define SLEEP(x) usleep(x * 1000) -#endif - -#include "xxhash.h" - -#include "pool.h" // use zstd thread pool for demo - -#include "../zstd_seekable.h" - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc:"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - -static void fseek_orDie(FILE* file, long int offset, int origin) -{ - if (!fseek(file, offset, origin)) { - if (!fflush(file)) return; - } - /* error */ - perror("fseek"); - exit(7); -} - -static long int ftell_orDie(FILE* file) -{ - long int off = ftell(file); - if (off != -1) return off; - /* error */ - perror("ftell"); - exit(8); -} - -struct job { - const void* src; - size_t srcSize; - void* dst; - size_t dstSize; - - unsigned checksum; - - int compressionLevel; - int done; -}; - -static void compressFrame(void* opaque) -{ - struct job* job = opaque; - - job->checksum = XXH64(job->src, job->srcSize, 0); - - size_t ret = ZSTD_compress(job->dst, job->dstSize, job->src, job->srcSize, job->compressionLevel); - if (ZSTD_isError(ret)) { - fprintf(stderr, "ZSTD_compress() error : %s \n", ZSTD_getErrorName(ret)); - exit(20); - } - - job->dstSize = ret; - job->done = 1; -} - -static void compressFile_orDie(const char* fname, const char* outName, int cLevel, unsigned frameSize, int nbThreads) -{ - POOL_ctx* pool = POOL_create(nbThreads, nbThreads); - if (pool == NULL) { fprintf(stderr, "POOL_create() error \n"); exit(9); } - - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = fopen_orDie(outName, "wb"); - - if (ZSTD_compressBound(frameSize) > 0xFFFFFFFFU) { fprintf(stderr, "Frame size too large \n"); exit(10); } - unsigned dstSize = ZSTD_compressBound(frameSize); - - - fseek_orDie(fin, 0, SEEK_END); - long int length = ftell_orDie(fin); - fseek_orDie(fin, 0, SEEK_SET); - - size_t numFrames = (length + frameSize - 1) / frameSize; - - struct job* jobs = malloc_orDie(sizeof(struct job) * numFrames); - - size_t i; - for(i = 0; i < numFrames; i++) { - void* in = malloc_orDie(frameSize); - void* out = malloc_orDie(dstSize); - - size_t inSize = fread_orDie(in, frameSize, fin); - - jobs[i].src = in; - jobs[i].srcSize = inSize; - jobs[i].dst = out; - jobs[i].dstSize = dstSize; - jobs[i].compressionLevel = cLevel; - jobs[i].done = 0; - POOL_add(pool, compressFrame, &jobs[i]); - } - - ZSTD_frameLog* fl = ZSTD_seekable_createFrameLog(1); - if (fl == NULL) { fprintf(stderr, "ZSTD_seekable_createFrameLog() failed \n"); exit(11); } - for (i = 0; i < numFrames; i++) { - while (!jobs[i].done) SLEEP(5); /* wake up every 5 milliseconds to check */ - fwrite_orDie(jobs[i].dst, jobs[i].dstSize, fout); - free((void*)jobs[i].src); - free(jobs[i].dst); - - size_t ret = ZSTD_seekable_logFrame(fl, jobs[i].dstSize, jobs[i].srcSize, jobs[i].checksum); - if (ZSTD_isError(ret)) { fprintf(stderr, "ZSTD_seekable_logFrame() error : %s \n", ZSTD_getErrorName(ret)); } - } - - { unsigned char seekTableBuff[1024]; - ZSTD_outBuffer out = {seekTableBuff, 1024, 0}; - while (ZSTD_seekable_writeSeekTable(fl, &out) != 0) { - fwrite_orDie(seekTableBuff, out.pos, fout); - out.pos = 0; - } - fwrite_orDie(seekTableBuff, out.pos, fout); - } - - ZSTD_seekable_freeFrameLog(fl); - free(jobs); - fclose_orDie(fout); - fclose_orDie(fin); -} - -static const char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (const char*)outSpace; -} - -int main(int argc, const char** argv) { - const char* const exeName = argv[0]; - if (argc!=4) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE FRAME_SIZE NB_THREADS\n", exeName); - return 1; - } - - { const char* const inFileName = argv[1]; - unsigned const frameSize = (unsigned)atoi(argv[2]); - int const nbThreads = atoi(argv[3]); - - const char* const outFileName = createOutFilename_orDie(inFileName); - compressFile_orDie(inFileName, outFileName, 5, frameSize, nbThreads); - } - - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/examples/parallel_processing.c b/third_party/zstd/contrib/seekable_format/examples/parallel_processing.c deleted file mode 100644 index 9283710..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/parallel_processing.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -/* - * A simple demo that sums up all the bytes in the file in parallel using - * seekable decompression and the zstd thread pool - */ - -#include // malloc, exit -#include // fprintf, perror, feof -#include // strerror -#include // errno -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed -#include -#if defined(_WIN32) -# include -# define SLEEP(x) Sleep(x) -#else -# include -# define SLEEP(x) usleep(x * 1000) -#endif - -#include "pool.h" // use zstd thread pool for demo - -#include "../zstd_seekable.h" - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc"); - exit(1); -} - -static void* realloc_orDie(void* ptr, size_t size) -{ - ptr = realloc(ptr, size); - if (ptr) return ptr; - /* error */ - perror("realloc"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - -static void fseek_orDie(FILE* file, long int offset, int origin) { - if (!fseek(file, offset, origin)) { - if (!fflush(file)) return; - } - /* error */ - perror("fseek"); - exit(7); -} - -struct sum_job { - const char* fname; - unsigned long long sum; - unsigned frameNb; - int done; -}; - -static void sumFrame(void* opaque) -{ - struct sum_job* job = (struct sum_job*)opaque; - job->done = 0; - - FILE* const fin = fopen_orDie(job->fname, "rb"); - - ZSTD_seekable* const seekable = ZSTD_seekable_create(); - if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } - - size_t const initResult = ZSTD_seekable_initFile(seekable, fin); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - size_t const frameSize = ZSTD_seekable_getFrameDecompressedSize(seekable, job->frameNb); - unsigned char* data = malloc_orDie(frameSize); - - size_t result = ZSTD_seekable_decompressFrame(seekable, data, frameSize, job->frameNb); - if (ZSTD_isError(result)) { fprintf(stderr, "ZSTD_seekable_decompressFrame() error : %s \n", ZSTD_getErrorName(result)); exit(12); } - - unsigned long long sum = 0; - size_t i; - for (i = 0; i < frameSize; i++) { - sum += data[i]; - } - job->sum = sum; - job->done = 1; - - fclose(fin); - ZSTD_seekable_free(seekable); - free(data); -} - -static void sumFile_orDie(const char* fname, int nbThreads) -{ - POOL_ctx* pool = POOL_create(nbThreads, nbThreads); - if (pool == NULL) { fprintf(stderr, "POOL_create() error \n"); exit(9); } - - FILE* const fin = fopen_orDie(fname, "rb"); - - ZSTD_seekable* const seekable = ZSTD_seekable_create(); - if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } - - size_t const initResult = ZSTD_seekable_initFile(seekable, fin); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - unsigned const numFrames = ZSTD_seekable_getNumFrames(seekable); - struct sum_job* jobs = (struct sum_job*)malloc(numFrames * sizeof(struct sum_job)); - - unsigned fnb; - for (fnb = 0; fnb < numFrames; fnb++) { - jobs[fnb] = (struct sum_job){ fname, 0, fnb, 0 }; - POOL_add(pool, sumFrame, &jobs[fnb]); - } - - unsigned long long total = 0; - - for (fnb = 0; fnb < numFrames; fnb++) { - while (!jobs[fnb].done) SLEEP(5); /* wake up every 5 milliseconds to check */ - total += jobs[fnb].sum; - } - - printf("Sum: %llu\n", total); - - POOL_free(pool); - ZSTD_seekable_free(seekable); - fclose(fin); - free(jobs); -} - - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=3) { - fprintf(stderr, "wrong arguments\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, "%s FILE NB_THREADS\n", exeName); - return 1; - } - - { - const char* const inFilename = argv[1]; - int const nbThreads = atoi(argv[2]); - sumFile_orDie(inFilename, nbThreads); - } - - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/examples/seekable_compression.c b/third_party/zstd/contrib/seekable_format/examples/seekable_compression.c deleted file mode 100644 index c3d227d..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/seekable_compression.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -#include // malloc, free, exit, atoi -#include // fprintf, perror, feof, fopen, etc. -#include // strlen, memset, strcat -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed - -#include "../zstd_seekable.h" - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc:"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - -static void compressFile_orDie(const char* fname, const char* outName, int cLevel, unsigned frameSize) -{ - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = fopen_orDie(outName, "wb"); - size_t const buffInSize = ZSTD_CStreamInSize(); /* can always read one full block */ - void* const buffIn = malloc_orDie(buffInSize); - size_t const buffOutSize = ZSTD_CStreamOutSize(); /* can always flush a full block */ - void* const buffOut = malloc_orDie(buffOutSize); - - ZSTD_seekable_CStream* const cstream = ZSTD_seekable_createCStream(); - if (cstream==NULL) { fprintf(stderr, "ZSTD_seekable_createCStream() error \n"); exit(10); } - size_t const initResult = ZSTD_seekable_initCStream(cstream, cLevel, 1, frameSize); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_initCStream() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - size_t read, toRead = buffInSize; - while( (read = fread_orDie(buffIn, toRead, fin)) ) { - ZSTD_inBuffer input = { buffIn, read, 0 }; - while (input.pos < input.size) { - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - toRead = ZSTD_seekable_compressStream(cstream, &output , &input); /* toRead is guaranteed to be <= ZSTD_CStreamInSize() */ - if (ZSTD_isError(toRead)) { fprintf(stderr, "ZSTD_seekable_compressStream() error : %s \n", ZSTD_getErrorName(toRead)); exit(12); } - if (toRead > buffInSize) toRead = buffInSize; /* Safely handle case when `buffInSize` is manually changed to a value < ZSTD_CStreamInSize()*/ - fwrite_orDie(buffOut, output.pos, fout); - } - } - - while (1) { - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - size_t const remainingToFlush = ZSTD_seekable_endStream(cstream, &output); /* close stream */ - if (ZSTD_isError(remainingToFlush)) { fprintf(stderr, "ZSTD_seekable_endStream() error : %s \n", ZSTD_getErrorName(remainingToFlush)); exit(13); } - fwrite_orDie(buffOut, output.pos, fout); - if (!remainingToFlush) break; - } - - ZSTD_seekable_freeCStream(cstream); - fclose_orDie(fout); - fclose_orDie(fin); - free(buffIn); - free(buffOut); -} - -static char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (char*)outSpace; -} - -#define CLEVEL_DEFAULT 5 -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - if (argc<3 || argc>4) { - printf("wrong arguments \n"); - printf("usage: \n"); - printf("%s FILE FRAME_SIZE [LEVEL] \n", exeName); - return 1; - } - - { const char* const inFileName = argv[1]; - unsigned const frameSize = (unsigned)atoi(argv[2]); - int const cLevel = (argc==4) ? atoi(argv[3]) : CLEVEL_DEFAULT; - - char* const outFileName = createOutFilename_orDie(inFileName); - compressFile_orDie(inFileName, outFileName, cLevel, frameSize); - free(outFileName); - } - - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/examples/seekable_decompression.c b/third_party/zstd/contrib/seekable_format/examples/seekable_decompression.c deleted file mode 100644 index 7edbca8..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/seekable_decompression.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - - -#include // malloc, exit -#include // fprintf, perror, feof -#include // strerror -#include // errno -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed -#include - -#include "../zstd_seekable.h" - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc"); - exit(1); -} - -static void* realloc_orDie(void* ptr, size_t size) -{ - ptr = realloc(ptr, size); - if (ptr) return ptr; - /* error */ - perror("realloc"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - -static void fseek_orDie(FILE* file, long int offset, int origin) { - if (!fseek(file, offset, origin)) { - if (!fflush(file)) return; - } - /* error */ - perror("fseek"); - exit(7); -} - - -static void decompressFile_orDie(const char* fname, off_t startOffset, off_t endOffset) -{ - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = stdout; - size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ - void* const buffOut = malloc_orDie(buffOutSize); - - ZSTD_seekable* const seekable = ZSTD_seekable_create(); - if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } - - size_t const initResult = ZSTD_seekable_initFile(seekable, fin); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - while (startOffset < endOffset) { - size_t const result = ZSTD_seekable_decompress(seekable, buffOut, MIN(endOffset - startOffset, buffOutSize), startOffset); - if (!result) { - break; - } - - if (ZSTD_isError(result)) { - fprintf(stderr, "ZSTD_seekable_decompress() error : %s \n", - ZSTD_getErrorName(result)); - exit(12); - } - fwrite_orDie(buffOut, result, fout); - startOffset += result; - } - - ZSTD_seekable_free(seekable); - fclose_orDie(fin); - fclose_orDie(fout); - free(buffOut); -} - - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=4) { - fprintf(stderr, "wrong arguments\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, "%s FILE START END\n", exeName); - return 1; - } - - { - const char* const inFilename = argv[1]; - off_t const startOffset = atoll(argv[2]); - off_t const endOffset = atoll(argv[3]); - decompressFile_orDie(inFilename, startOffset, endOffset); - } - - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c b/third_party/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c deleted file mode 100644 index 44a06fb..0000000 --- a/third_party/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - - -#include // malloc, exit -#include // fprintf, perror, feof -#include // strerror -#include // errno -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed -#include - -#include "zstd_seekable.h" - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) - -#define MAX_FILE_SIZE (8 * 1024 * 1024) - -static void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc"); - exit(1); -} - -static void* realloc_orDie(void* ptr, size_t size) -{ - ptr = realloc(ptr, size); - if (ptr) return ptr; - /* error */ - perror("realloc"); - exit(1); -} - -static FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(3); -} - -static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(4); -} - -static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(5); -} - -static size_t fclose_orDie(FILE* file) -{ - if (!fclose(file)) return 0; - /* error */ - perror("fclose"); - exit(6); -} - -static void fseek_orDie(FILE* file, long int offset, int origin) { - if (!fseek(file, offset, origin)) { - if (!fflush(file)) return; - } - /* error */ - perror("fseek"); - exit(7); -} - - -static void decompressFile_orDie(const char* fname, off_t startOffset, off_t endOffset) -{ - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = stdout; - // Just for demo purposes, assume file is <= MAX_FILE_SIZE - void* const buffIn = malloc_orDie(MAX_FILE_SIZE); - size_t const inSize = fread_orDie(buffIn, MAX_FILE_SIZE, fin); - size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ - void* const buffOut = malloc_orDie(buffOutSize); - - ZSTD_seekable* const seekable = ZSTD_seekable_create(); - if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } - - size_t const initResult = ZSTD_seekable_initBuff(seekable, buffIn, inSize); - if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } - - while (startOffset < endOffset) { - size_t const result = ZSTD_seekable_decompress(seekable, buffOut, MIN(endOffset - startOffset, buffOutSize), startOffset); - if (!result) { - break; - } - - if (ZSTD_isError(result)) { - fprintf(stderr, "ZSTD_seekable_decompress() error : %s \n", - ZSTD_getErrorName(result)); - exit(12); - } - fwrite_orDie(buffOut, result, fout); - startOffset += result; - } - - ZSTD_seekable_free(seekable); - fclose_orDie(fin); - fclose_orDie(fout); - free(buffIn); - free(buffOut); -} - - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=4) { - fprintf(stderr, "wrong arguments\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, "%s FILE START END\n", exeName); - return 1; - } - - { - const char* const inFilename = argv[1]; - off_t const startOffset = atoll(argv[2]); - off_t const endOffset = atoll(argv[3]); - decompressFile_orDie(inFilename, startOffset, endOffset); - } - - return 0; -} diff --git a/third_party/zstd/contrib/seekable_format/tests/.gitignore b/third_party/zstd/contrib/seekable_format/tests/.gitignore deleted file mode 100644 index f831eaf..0000000 --- a/third_party/zstd/contrib/seekable_format/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -seekable_tests diff --git a/third_party/zstd/contrib/seekable_format/tests/Makefile b/third_party/zstd/contrib/seekable_format/tests/Makefile deleted file mode 100644 index a81f222..0000000 --- a/third_party/zstd/contrib/seekable_format/tests/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -# This Makefile presumes libzstd is built, using `make` in / or /lib/ - -ZSTDLIB_PATH = ../../../lib -ZSTDLIB_NAME = libzstd.a -ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) - -CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I$(ZSTDLIB_PATH) -I$(ZSTDLIB_PATH)/common - -CFLAGS ?= -O3 -CFLAGS += -g -Wall -Wextra -Wcast-qual -Wcast-align -Wconversion \ - -Wformat=2 -Wstrict-aliasing=1 - -SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB) - -.PHONY: default clean test -default: test - -test: seekable_tests - ./seekable_tests - -$(ZSTDLIB): - $(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) - -seekable_tests : $(SEEKABLE_OBJS) - -clean: - @$(RM) core *.o tmp* result* *.zst \ - seekable_tests - @echo Cleaning completed diff --git a/third_party/zstd/contrib/seekable_format/tests/seekable_tests.c b/third_party/zstd/contrib/seekable_format/tests/seekable_tests.c deleted file mode 100644 index f89bdc9..0000000 --- a/third_party/zstd/contrib/seekable_format/tests/seekable_tests.c +++ /dev/null @@ -1,363 +0,0 @@ -#include -#include -#include // malloc -#include -#include -#include - -#include "../zstd_seekable.h" - - -/* ZSTD_seekable_customFile implementation that reads/seeks a buffer while keeping track of total bytes read */ -typedef struct { - const void *ptr; - size_t size; - size_t pos; - size_t totalRead; -} buffWrapperWithTotal_t; - -static int readBuffWithTotal(void* opaque, void* buffer, size_t n) -{ - buffWrapperWithTotal_t* const buff = (buffWrapperWithTotal_t*)opaque; - assert(buff != NULL); - if (buff->pos + n > buff->size) return -1; - memcpy(buffer, (const char*)buff->ptr + buff->pos, n); - buff->pos += n; - buff->totalRead += n; - return 0; -} - -static int seekBuffWithTotal(void* opaque, long long offset, int origin) -{ - buffWrapperWithTotal_t* const buff = (buffWrapperWithTotal_t*) opaque; - unsigned long long newOffset; - assert(buff != NULL); - switch (origin) { - case SEEK_SET: - assert(offset >= 0); - newOffset = (unsigned long long)offset; - break; - case SEEK_CUR: - newOffset = (unsigned long long)((long long)buff->pos + offset); - break; - case SEEK_END: - newOffset = (unsigned long long)((long long)buff->size + offset); - break; - default: - assert(0); /* not possible */ - } - if (newOffset > buff->size) { - return -1; - } - buff->pos = newOffset; - return 0; -} - -/* Basic unit tests for zstd seekable format */ -int main(int argc, const char** argv) -{ - unsigned testNb = 1; - (void)argc; (void)argv; - printf("Beginning zstd seekable format tests...\n"); - - printf("Test %u - simple round trip: ", testNb++); - { size_t const inSize = 4000; - void* const inBuffer = malloc(inSize); - assert(inBuffer != NULL); - - size_t const seekCapacity = 5000; - void* const seekBuffer = malloc(seekCapacity); - assert(seekBuffer != NULL); - size_t seekSize; - - size_t const outCapacity = inSize; - void* const outBuffer = malloc(outCapacity); - assert(outBuffer != NULL); - - ZSTD_seekable_CStream* const zscs = ZSTD_seekable_createCStream(); - assert(zscs != NULL); - - { size_t const initStatus = ZSTD_seekable_initCStream(zscs, 9, 0 /* checksumFlag */, (unsigned)inSize /* maxFrameSize */); - assert(!ZSTD_isError(initStatus)); - } - - { ZSTD_outBuffer outb = { .dst=seekBuffer, .pos=0, .size=seekCapacity }; - ZSTD_inBuffer inb = { .src=inBuffer, .pos=0, .size=inSize }; - - size_t const cStatus = ZSTD_seekable_compressStream(zscs, &outb, &inb); - assert(!ZSTD_isError(cStatus)); - assert(inb.pos == inb.size); - - size_t const endStatus = ZSTD_seekable_endStream(zscs, &outb); - assert(!ZSTD_isError(endStatus)); - seekSize = outb.pos; - } - - ZSTD_seekable* const stream = ZSTD_seekable_create(); - assert(stream != NULL); - { size_t const initStatus = ZSTD_seekable_initBuff(stream, seekBuffer, seekSize); - assert(!ZSTD_isError(initStatus)); } - - { size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, outCapacity, 0); - assert(decStatus == inSize); } - - /* unit test ZSTD_seekTable functions */ - ZSTD_seekTable* const zst = ZSTD_seekTable_create_fromSeekable(stream); - assert(zst != NULL); - - unsigned const nbFrames = ZSTD_seekTable_getNumFrames(zst); - assert(nbFrames > 0); - - unsigned long long const frame0Offset = ZSTD_seekTable_getFrameCompressedOffset(zst, 0); - assert(frame0Offset == 0); - - unsigned long long const content0Offset = ZSTD_seekTable_getFrameDecompressedOffset(zst, 0); - assert(content0Offset == 0); - - size_t const cSize = ZSTD_seekTable_getFrameCompressedSize(zst, 0); - assert(!ZSTD_isError(cSize)); - assert(cSize <= seekCapacity); - - size_t const origSize = ZSTD_seekTable_getFrameDecompressedSize(zst, 0); - assert(origSize == inSize); - - unsigned const fo1idx = ZSTD_seekTable_offsetToFrameIndex(zst, 1); - assert(fo1idx == 0); - - free(inBuffer); - free(seekBuffer); - free(outBuffer); - ZSTD_seekable_freeCStream(zscs); - ZSTD_seekTable_free(zst); - ZSTD_seekable_free(stream); - } - printf("Success!\n"); - - - printf("Test %u - check that seekable decompress does not hang: ", testNb++); - { /* Github issue #2335 */ - const size_t compressed_size = 17; - const uint8_t compressed_data[17] = { - '^', - '*', - 'M', - '\x18', - '\t', - '\x00', - '\x00', - '\x00', - '\x00', - '\x00', - '\x00', - '\x00', - (uint8_t)('\x03'), - (uint8_t)('\xb1'), - (uint8_t)('\xea'), - (uint8_t)('\x92'), - (uint8_t)('\x8f'), - }; - const size_t uncompressed_size = 32; - uint8_t uncompressed_data[32]; - - ZSTD_seekable* const stream = ZSTD_seekable_create(); - assert(stream != NULL); - { size_t const status = ZSTD_seekable_initBuff(stream, compressed_data, compressed_size); - if (ZSTD_isError(status)) { - ZSTD_seekable_free(stream); - goto _test_error; - } } - - /* Should return an error, but not hang */ - { const size_t offset = 2; - size_t const status = ZSTD_seekable_decompress(stream, uncompressed_data, uncompressed_size, offset); - if (!ZSTD_isError(status)) { - ZSTD_seekable_free(stream); - goto _test_error; - } } - - ZSTD_seekable_free(stream); - } - printf("Success!\n"); - - printf("Test %u - check #2 that seekable decompress does not hang: ", testNb++); - { /* Github issue #FIXME */ - const size_t compressed_size = 27; - const uint8_t compressed_data[27] = { - (uint8_t)'\x28', - (uint8_t)'\xb5', - (uint8_t)'\x2f', - (uint8_t)'\xfd', - (uint8_t)'\x00', - (uint8_t)'\x32', - (uint8_t)'\x91', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x5e', - (uint8_t)'\x2a', - (uint8_t)'\x4d', - (uint8_t)'\x18', - (uint8_t)'\x09', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\x00', - (uint8_t)'\xb1', - (uint8_t)'\xea', - (uint8_t)'\x92', - (uint8_t)'\x8f', - }; - const size_t uncompressed_size = 400; - uint8_t uncompressed_data[400]; - - ZSTD_seekable* stream = ZSTD_seekable_create(); - size_t status = ZSTD_seekable_initBuff(stream, compressed_data, compressed_size); - if (ZSTD_isError(status)) { - ZSTD_seekable_free(stream); - goto _test_error; - } - - const size_t offset = 2; - /* Should return an error, but not hang */ - status = ZSTD_seekable_decompress(stream, uncompressed_data, uncompressed_size, offset); - if (!ZSTD_isError(status)) { - ZSTD_seekable_free(stream); - goto _test_error; - } - - ZSTD_seekable_free(stream); - } - printf("Success!\n"); - - - printf("Test %u - check ZSTD magic in compressing empty string: ", testNb++); - { // compressing empty string should return a zstd header - size_t const capacity = 255; - char* inBuffer = malloc(capacity); - assert(inBuffer != NULL); - inBuffer[0] = '\0'; - void* const outBuffer = malloc(capacity); - assert(outBuffer != NULL); - - ZSTD_seekable_CStream *s = ZSTD_seekable_createCStream(); - ZSTD_seekable_initCStream(s, 1, 1, 255); - - ZSTD_inBuffer input = { .src=inBuffer, .pos=0, .size=0 }; - ZSTD_outBuffer output = { .dst=outBuffer, .pos=0, .size=capacity }; - - ZSTD_seekable_compressStream(s, &output, &input); - ZSTD_seekable_endStream(s, &output); - - if((((char*)output.dst)[0] != '\x28') | (((char*)output.dst)[1] != '\xb5') | (((char*)output.dst)[2] != '\x2f') | (((char*)output.dst)[3] != '\xfd')) { - printf("%#02x %#02x %#02x %#02x\n", ((char*)output.dst)[0], ((char*)output.dst)[1] , ((char*)output.dst)[2] , ((char*)output.dst)[3] ); - - free(inBuffer); - free(outBuffer); - ZSTD_seekable_freeCStream(s); - goto _test_error; - } - - free(inBuffer); - free(outBuffer); - ZSTD_seekable_freeCStream(s); - } - printf("Success!\n"); - - - printf("Test %u - multiple decompress calls: ", testNb++); - { char const inBuffer[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt"; - size_t const inSize = sizeof(inBuffer); - - size_t const seekCapacity = 5000; - void* const seekBuffer = malloc(seekCapacity); - assert(seekBuffer != NULL); - size_t seekSize; - - size_t const outCapacity = inSize; - char* const outBuffer = malloc(outCapacity); - assert(outBuffer != NULL); - - ZSTD_seekable_CStream* const zscs = ZSTD_seekable_createCStream(); - assert(zscs != NULL); - - /* compress test data with a small frame size to ensure multiple frames in the output */ - unsigned const maxFrameSize = 40; - { size_t const initStatus = ZSTD_seekable_initCStream(zscs, 9, 0 /* checksumFlag */, maxFrameSize); - assert(!ZSTD_isError(initStatus)); - } - - { ZSTD_outBuffer outb = { .dst=seekBuffer, .pos=0, .size=seekCapacity }; - ZSTD_inBuffer inb = { .src=inBuffer, .pos=0, .size=inSize }; - - while (inb.pos < inb.size) { - size_t const cStatus = ZSTD_seekable_compressStream(zscs, &outb, &inb); - assert(!ZSTD_isError(cStatus)); - } - - size_t const endStatus = ZSTD_seekable_endStream(zscs, &outb); - assert(!ZSTD_isError(endStatus)); - seekSize = outb.pos; - } - - ZSTD_seekable* const stream = ZSTD_seekable_create(); - assert(stream != NULL); - buffWrapperWithTotal_t buffWrapper = {seekBuffer, seekSize, 0, 0}; - { ZSTD_seekable_customFile srcFile = {&buffWrapper, &readBuffWithTotal, &seekBuffWithTotal}; - size_t const initStatus = ZSTD_seekable_initAdvanced(stream, srcFile); - assert(!ZSTD_isError(initStatus)); } - - /* Perform a series of small reads and seeks (repeatedly read 1 byte and skip 1 byte) - and check that we didn't reread input data unnecessarily */ - size_t pos; - for (pos = 0; pos < inSize; pos += 2) { - size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, 1, pos); - if (decStatus != 1 || outBuffer[0] != inBuffer[pos]) { - goto _test_error; - } - } - if (buffWrapper.totalRead > seekSize) { - /* We read more than the compressed size, meaning there were some rereads. - This is unneeded because we only seeked forward. */ - printf("Too much data read: %zu read, with compressed size %zu\n", buffWrapper.totalRead, seekSize); - goto _test_error; - } - - /* Perform some reads and seeks to ensure correctness */ - struct { - size_t offset; - size_t size; - } const tests[] = { /* Assume the frame size is 40 */ - {20, 40}, /* read partial data from two frames */ - {60, 10}, /* continue reading from the same offset */ - {50, 20}, /* seek backward within the same frame */ - {10, 10}, /* seek backward to a different frame */ - {25, 10}, /* seek forward within the same frame */ - {60, 10}, /* seek forward to a different frame */ - }; - size_t idx; - for (idx = 0; idx < sizeof(tests) / sizeof(tests[0]); idx++) { - size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, tests[idx].size, tests[idx].offset); - if (decStatus != tests[idx].size || memcmp(outBuffer, inBuffer + tests[idx].offset, tests[idx].size) != 0) { - goto _test_error; - } - } - - free(seekBuffer); - free(outBuffer); - ZSTD_seekable_freeCStream(zscs); - ZSTD_seekable_free(stream); - } - printf("Success!\n"); - - /* TODO: Add more tests */ - printf("Finished tests\n"); - return 0; - -_test_error: - printf("test failed! Exiting..\n"); - return 1; -} diff --git a/third_party/zstd/contrib/seekable_format/zstd_seekable.h b/third_party/zstd/contrib/seekable_format/zstd_seekable.h deleted file mode 100644 index b1f83d0..0000000 --- a/third_party/zstd/contrib/seekable_format/zstd_seekable.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef SEEKABLE_H -#define SEEKABLE_H - -#include -#include "zstd.h" /* ZSTDLIB_API */ - -#if defined (__cplusplus) -extern "C" { -#endif - - -#define ZSTD_seekTableFooterSize 9 - -#define ZSTD_SEEKABLE_MAGICNUMBER 0x8F92EAB1 - -#define ZSTD_SEEKABLE_MAXFRAMES 0x8000000U - -/* Limit maximum size to avoid potential issues storing the compressed size */ -#define ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE 0x40000000U - -/*-**************************************************************************** -* Seekable Format -* -* The seekable format splits the compressed data into a series of "frames", -* each compressed individually so that decompression of a section in the -* middle of an archive only requires zstd to decompress at most a frame's -* worth of extra data, instead of the entire archive. -******************************************************************************/ - -typedef struct ZSTD_seekable_CStream_s ZSTD_seekable_CStream; -typedef struct ZSTD_seekable_s ZSTD_seekable; -typedef struct ZSTD_seekTable_s ZSTD_seekTable; - -/*-**************************************************************************** -* Seekable compression - HowTo -* A ZSTD_seekable_CStream object is required to tracking streaming operation. -* Use ZSTD_seekable_createCStream() and ZSTD_seekable_freeCStream() to create/ -* release resources. -* -* Streaming objects are reusable to avoid allocation and deallocation, -* to start a new compression operation call ZSTD_seekable_initCStream() on the -* compressor. -* -* Data streamed to the seekable compressor will automatically be split into -* frames of size `maxFrameSize` (provided in ZSTD_seekable_initCStream()), -* or if none is provided, will be cut off whenever ZSTD_seekable_endFrame() is -* called or when the default maximum frame size (2GB) is reached. -* -* Use ZSTD_seekable_initCStream() to initialize a ZSTD_seekable_CStream object -* for a new compression operation. -* - `maxFrameSize` indicates the size at which to automatically start a new -* seekable frame. -* `maxFrameSize == 0` implies the default maximum size. -* Smaller frame sizes allow faster decompression of small segments, -* since retrieving a single byte requires decompression of -* the full frame where the byte belongs. -* In general, size the frames to roughly correspond to -* the access granularity (when it's known). -* But small sizes also reduce compression ratio. -* Avoid really tiny frame sizes (< 1 KB), -* that would hurt compression ratio considerably. -* - `checksumFlag` indicates whether or not the seek table should include frame -* checksums on the uncompressed data for verification. -* @return : a size hint for input to provide for compression, or an error code -* checkable with ZSTD_isError() -* -* Use ZSTD_seekable_compressStream() repetitively to consume input stream. -* The function will automatically update both `pos` fields. -* Note that it may not consume the entire input, in which case `pos < size`, -* and it's up to the caller to present again remaining data. -* @return : a size hint, preferred nb of bytes to use as input for next -* function call or an error code, which can be tested using -* ZSTD_isError(). -* Note 1 : it's just a hint, to help latency a little, any other -* value will work fine. -* -* At any time, call ZSTD_seekable_endFrame() to end the current frame and -* start a new one. -* -* ZSTD_seekable_endStream() will end the current frame, and then write the seek -* table so that decompressors can efficiently find compressed frames. -* ZSTD_seekable_endStream() may return a number > 0 if it was unable to flush -* all the necessary data to `output`. In this case, it should be called again -* until all remaining data is flushed out and 0 is returned. -******************************************************************************/ - -/*===== Seekable compressor management =====*/ -ZSTDLIB_API ZSTD_seekable_CStream* ZSTD_seekable_createCStream(void); -ZSTDLIB_API size_t ZSTD_seekable_freeCStream(ZSTD_seekable_CStream* zcs); - -/*===== Seekable compression functions =====*/ -ZSTDLIB_API size_t ZSTD_seekable_initCStream(ZSTD_seekable_CStream* zcs, int compressionLevel, int checksumFlag, unsigned maxFrameSize); -ZSTDLIB_API size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input); -ZSTDLIB_API size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output); -ZSTDLIB_API size_t ZSTD_seekable_endStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output); - -/*= Raw seek table API - * These functions allow for the seek table to be constructed directly. - * This table can then be appended to a file of concatenated frames. - * This allows the frames to be compressed independently, even in parallel, - * and compiled together afterward into a seekable archive. - * - * Use ZSTD_seekable_createFrameLog() to allocate and initialize a tracking - * structure. - * - * Call ZSTD_seekable_logFrame() once for each frame in the archive. - * checksum is optional, and will not be used if checksumFlag was 0 when the - * frame log was created. If present, it should be the least significant 32 - * bits of the XXH64 hash of the uncompressed data. - * - * Call ZSTD_seekable_writeSeekTable to serialize the data into a seek table. - * If the entire table was written, the return value will be 0. Otherwise, - * it will be equal to the number of bytes left to write. */ -typedef struct ZSTD_frameLog_s ZSTD_frameLog; -ZSTDLIB_API ZSTD_frameLog* ZSTD_seekable_createFrameLog(int checksumFlag); -ZSTDLIB_API size_t ZSTD_seekable_freeFrameLog(ZSTD_frameLog* fl); -ZSTDLIB_API size_t ZSTD_seekable_logFrame(ZSTD_frameLog* fl, unsigned compressedSize, unsigned decompressedSize, unsigned checksum); -ZSTDLIB_API size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* output); - - -/*-**************************************************************************** -* Seekable decompression - HowTo -* A ZSTD_seekable object is required to tracking the seekTable. -* -* Call ZSTD_seekable_init* to initialize a ZSTD_seekable object with the -* the seek table provided in the input. -* There are three modes for ZSTD_seekable_init: -* - ZSTD_seekable_initBuff() : An in-memory API. The data contained in -* `src` should be the entire seekable file, including the seek table. -* `src` should be kept alive and unmodified until the ZSTD_seekable object -* is freed or reset. -* - ZSTD_seekable_initFile() : A simplified file API using stdio. fread and -* fseek will be used to access the required data for building the seek -* table and doing decompression operations. `src` should not be closed -* or modified until the ZSTD_seekable object is freed or reset. -* - ZSTD_seekable_initAdvanced() : A general API allowing the client to -* provide its own read and seek callbacks. -* + ZSTD_seekable_read() : read exactly `n` bytes into `buffer`. -* Premature EOF should be treated as an error. -* + ZSTD_seekable_seek() : seek the read head to `offset` from `origin`, -* where origin is either SEEK_SET (beginning of -* file), or SEEK_END (end of file). -* Both functions should return a non-negative value in case of success, and a -* negative value in case of failure. If implementing using this API and -* stdio, be careful with files larger than 4GB and fseek. All of these -* functions return an error code checkable with ZSTD_isError(). -* -* Call ZSTD_seekable_decompress to decompress `dstSize` bytes at decompressed -* offset `offset`. ZSTD_seekable_decompress may have to decompress the entire -* prefix of the frame before the desired data if it has not already processed -* this section. If ZSTD_seekable_decompress is called multiple times for a -* consecutive range of data, it will efficiently retain the decompressor object -* and avoid redecompressing frame prefixes. The return value is the number of -* bytes decompressed, or an error code checkable with ZSTD_isError(). -* -* The seek table access functions can be used to obtain the data contained -* in the seek table. If frameIndex is larger than the value returned by -* ZSTD_seekable_getNumFrames(), they will return error codes checkable with -* ZSTD_isError(). Note that since the offset access functions return -* unsigned long long instead of size_t, in this case they will instead return -* the value ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE. -******************************************************************************/ - -/*===== Seekable decompressor management =====*/ -ZSTDLIB_API ZSTD_seekable* ZSTD_seekable_create(void); -ZSTDLIB_API size_t ZSTD_seekable_free(ZSTD_seekable* zs); - -/*===== Seekable decompression functions =====*/ -ZSTDLIB_API size_t ZSTD_seekable_initBuff(ZSTD_seekable* zs, const void* src, size_t srcSize); -ZSTDLIB_API size_t ZSTD_seekable_initFile(ZSTD_seekable* zs, FILE* src); -ZSTDLIB_API size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned long long offset); -ZSTDLIB_API size_t ZSTD_seekable_decompressFrame(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned frameIndex); - -#define ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE (0ULL-2) -/*===== Seekable seek table access functions =====*/ -ZSTDLIB_API unsigned ZSTD_seekable_getNumFrames(const ZSTD_seekable* zs); -ZSTDLIB_API unsigned long long ZSTD_seekable_getFrameCompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex); -ZSTDLIB_API unsigned long long ZSTD_seekable_getFrameDecompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex); -ZSTDLIB_API size_t ZSTD_seekable_getFrameCompressedSize(const ZSTD_seekable* zs, unsigned frameIndex); -ZSTDLIB_API size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* zs, unsigned frameIndex); -ZSTDLIB_API unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsigned long long offset); - - -/*-**************************************************************************** -* Direct exploitation of the seekTable -* -* Memory constrained use cases that manage multiple archives -* benefit from retaining multiple archive seek tables -* without retaining a ZSTD_seekable instance for each. -* -* Below API allow the above-mentioned use cases -* to initialize a ZSTD_seekable, extract its (smaller) ZSTD_seekTable, -* then throw the ZSTD_seekable away to save memory. -* -* Standard ZSTD operations can then be used -* to decompress frames based on seek table offsets. -******************************************************************************/ - -/*===== Independent seek table management =====*/ -ZSTDLIB_API ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs); -ZSTDLIB_API size_t ZSTD_seekTable_free(ZSTD_seekTable* st); - -/*===== Direct seek table access functions =====*/ -ZSTDLIB_API unsigned ZSTD_seekTable_getNumFrames(const ZSTD_seekTable* st); -ZSTDLIB_API unsigned long long ZSTD_seekTable_getFrameCompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex); -ZSTDLIB_API unsigned long long ZSTD_seekTable_getFrameDecompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex); -ZSTDLIB_API size_t ZSTD_seekTable_getFrameCompressedSize(const ZSTD_seekTable* st, unsigned frameIndex); -ZSTDLIB_API size_t ZSTD_seekTable_getFrameDecompressedSize(const ZSTD_seekTable* st, unsigned frameIndex); -ZSTDLIB_API unsigned ZSTD_seekTable_offsetToFrameIndex(const ZSTD_seekTable* st, unsigned long long offset); - - -/*===== Seekable advanced I/O API =====*/ -typedef int(ZSTD_seekable_read)(void* opaque, void* buffer, size_t n); -typedef int(ZSTD_seekable_seek)(void* opaque, long long offset, int origin); -typedef struct { - void* opaque; - ZSTD_seekable_read* read; - ZSTD_seekable_seek* seek; -} ZSTD_seekable_customFile; -ZSTDLIB_API size_t ZSTD_seekable_initAdvanced(ZSTD_seekable* zs, ZSTD_seekable_customFile src); - -#if defined (__cplusplus) -} -#endif - -#endif diff --git a/third_party/zstd/contrib/seekable_format/zstd_seekable_compression_format.md b/third_party/zstd/contrib/seekable_format/zstd_seekable_compression_format.md deleted file mode 100644 index 7bd0790..0000000 --- a/third_party/zstd/contrib/seekable_format/zstd_seekable_compression_format.md +++ /dev/null @@ -1,116 +0,0 @@ -# Zstandard Seekable Format - -### Notices - -Copyright (c) Meta Platforms, Inc. and affiliates. - -Permission is granted to copy and distribute this document -for any purpose and without charge, -including translations into other languages -and incorporation into compilations, -provided that the copyright notice and this notice are preserved, -and that any substantive changes or deletions from the original -are clearly marked. -Distribution of this document is unlimited. - -### Version -0.1.0 (11/04/17) - -## Introduction -This document defines a format for compressed data to be stored so that subranges of the data can be efficiently decompressed without requiring the entire document to be decompressed. -This is done by splitting up the input data into frames, -each of which are compressed independently, -and so can be decompressed independently. -Decompression then takes advantage of a provided 'seek table', which allows the decompressor to immediately jump to the desired data. This is done in a way that is compatible with the original Zstandard format by placing the seek table in a Zstandard skippable frame. - -### Overall conventions -In this document: -- square brackets i.e. `[` and `]` are used to indicate optional fields or parameters. -- the naming convention for identifiers is `Mixed_Case_With_Underscores` -- All numeric fields are little-endian unless specified otherwise - -## Format - -The format consists of a number of frames (Zstandard compressed frames and skippable frames), followed by a final skippable frame at the end containing the seek table. - -### Seek Table Format -The structure of the seek table frame is as follows: - -|`Skippable_Magic_Number`|`Frame_Size`|`[Seek_Table_Entries]`|`Seek_Table_Footer`| -|------------------------|------------|----------------------|-------------------| -| 4 bytes | 4 bytes | 8-12 bytes each | 9 bytes | - -__`Skippable_Magic_Number`__ - -Value : 0x184D2A5E. -This is for compatibility with [Zstandard skippable frames]. -Since it is legal for other Zstandard skippable frames to use the same -magic number, it is not recommended for a decoder to recognize frames -solely on this. - -__`Frame_Size`__ - -The total size of the skippable frame, not including the `Skippable_Magic_Number` or `Frame_Size`. -This is for compatibility with [Zstandard skippable frames]. - -[Zstandard skippable frames]: https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#skippable-frames - -#### `Seek_Table_Footer` -The seek table footer format is as follows: - -|`Number_Of_Frames`|`Seek_Table_Descriptor`|`Seekable_Magic_Number`| -|------------------|-----------------------|-----------------------| -| 4 bytes | 1 byte | 4 bytes | - -__`Seekable_Magic_Number`__ - -Value : 0x8F92EAB1. -This value must be the last bytes present in the compressed file so that decoders -can efficiently find it and determine if there is an actual seek table present. - -__`Number_Of_Frames`__ - -The number of stored frames in the data. - -__`Seek_Table_Descriptor`__ - -A bitfield describing the format of the seek table. - -| Bit number | Field name | -| ---------- | ---------- | -| 7 | `Checksum_Flag` | -| 6-2 | `Reserved_Bits` | -| 1-0 | `Unused_Bits` | - -While only `Checksum_Flag` currently exists, there are 7 other bits in this field that can be used for future changes to the format, -for example the addition of inline dictionaries. - -__`Checksum_Flag`__ - -If the checksum flag is set, each of the seek table entries contains a 4 byte checksum of the uncompressed data contained in its frame. - -`Reserved_Bits` are not currently used but may be used in the future for breaking changes, so a compliant decoder should ensure they are set to 0. `Unused_Bits` may be used in the future for non-breaking changes, so a compliant decoder should not interpret these bits. - -#### __`Seek_Table_Entries`__ - -`Seek_Table_Entries` consists of `Number_Of_Frames` (one for each frame in the data, not including the seek table frame) entries of the following form, in sequence: - -|`Compressed_Size`|`Decompressed_Size`|`[Checksum]`| -|-----------------|-------------------|------------| -| 4 bytes | 4 bytes | 4 bytes | - -__`Compressed_Size`__ - -The compressed size of the frame. -The cumulative sum of the `Compressed_Size` fields of frames `0` to `i` gives the offset in the compressed file of frame `i+1`. - -__`Decompressed_Size`__ - -The size of the decompressed data contained in the frame. For skippable or otherwise empty frames, this value is 0. - -__`Checksum`__ - -Only present if `Checksum_Flag` is set in the `Seek_Table_Descriptor`. Value : the least significant 32 bits of the XXH64 digest of the uncompressed data, stored in little-endian format. - -## Version Changes -- 0.1.0: initial version diff --git a/third_party/zstd/contrib/seekable_format/zstdseek_compress.c b/third_party/zstd/contrib/seekable_format/zstdseek_compress.c deleted file mode 100644 index 4997807..0000000 --- a/third_party/zstd/contrib/seekable_format/zstdseek_compress.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ - -#include /* malloc, free */ -#include /* UINT_MAX */ -#include - -#define XXH_STATIC_LINKING_ONLY -#include "xxhash.h" - -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" -#include "zstd_errors.h" -#include "mem.h" - -#include "zstd_seekable.h" - -#define CHECK_Z(f) { size_t const ret = (f); if (ret != 0) return ret; } - -#undef ERROR -#define ERROR(name) ((size_t)-ZSTD_error_##name) - -#undef MIN -#undef MAX -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -typedef struct { - U32 cSize; - U32 dSize; - U32 checksum; -} framelogEntry_t; - -struct ZSTD_frameLog_s { - framelogEntry_t* entries; - U32 size; - U32 capacity; - - int checksumFlag; - - /* for use when streaming out the seek table */ - U32 seekTablePos; - U32 seekTableIndex; -} framelog_t; - -struct ZSTD_seekable_CStream_s { - ZSTD_CStream* cstream; - ZSTD_frameLog framelog; - - U32 frameCSize; - U32 frameDSize; - - XXH64_state_t xxhState; - - U32 maxFrameSize; - - int writingSeekTable; -}; - -static size_t ZSTD_seekable_frameLog_allocVec(ZSTD_frameLog* fl) -{ - /* allocate some initial space */ - size_t const FRAMELOG_STARTING_CAPACITY = 16; - fl->entries = (framelogEntry_t*)malloc( - sizeof(framelogEntry_t) * FRAMELOG_STARTING_CAPACITY); - if (fl->entries == NULL) return ERROR(memory_allocation); - fl->capacity = (U32)FRAMELOG_STARTING_CAPACITY; - return 0; -} - -static size_t ZSTD_seekable_frameLog_freeVec(ZSTD_frameLog* fl) -{ - if (fl != NULL) free(fl->entries); - return 0; -} - -ZSTD_frameLog* ZSTD_seekable_createFrameLog(int checksumFlag) -{ - ZSTD_frameLog* const fl = (ZSTD_frameLog*)malloc(sizeof(ZSTD_frameLog)); - if (fl == NULL) return NULL; - - if (ZSTD_isError(ZSTD_seekable_frameLog_allocVec(fl))) { - free(fl); - return NULL; - } - - fl->checksumFlag = checksumFlag; - fl->seekTablePos = 0; - fl->seekTableIndex = 0; - fl->size = 0; - - return fl; -} - -size_t ZSTD_seekable_freeFrameLog(ZSTD_frameLog* fl) -{ - ZSTD_seekable_frameLog_freeVec(fl); - free(fl); - return 0; -} - -ZSTD_seekable_CStream* ZSTD_seekable_createCStream(void) -{ - ZSTD_seekable_CStream* const zcs = (ZSTD_seekable_CStream*)malloc(sizeof(ZSTD_seekable_CStream)); - if (zcs == NULL) return NULL; - - memset(zcs, 0, sizeof(*zcs)); - - zcs->cstream = ZSTD_createCStream(); - if (zcs->cstream == NULL) goto failed1; - - if (ZSTD_isError(ZSTD_seekable_frameLog_allocVec(&zcs->framelog))) goto failed2; - - return zcs; - -failed2: - ZSTD_freeCStream(zcs->cstream); -failed1: - free(zcs); - return NULL; -} - -size_t ZSTD_seekable_freeCStream(ZSTD_seekable_CStream* zcs) -{ - if (zcs == NULL) return 0; /* support free on null */ - ZSTD_freeCStream(zcs->cstream); - ZSTD_seekable_frameLog_freeVec(&zcs->framelog); - free(zcs); - return 0; -} - -size_t ZSTD_seekable_initCStream(ZSTD_seekable_CStream* zcs, - int compressionLevel, - int checksumFlag, - unsigned maxFrameSize) -{ - zcs->framelog.size = 0; - zcs->frameCSize = 0; - zcs->frameDSize = 0; - - /* make sure maxFrameSize has a reasonable value */ - if (maxFrameSize > ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE) { - return ERROR(frameParameter_unsupported); - } - - zcs->maxFrameSize = maxFrameSize ? - maxFrameSize : ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE; - - zcs->framelog.checksumFlag = checksumFlag; - if (zcs->framelog.checksumFlag) { - XXH64_reset(&zcs->xxhState, 0); - } - - zcs->framelog.seekTablePos = 0; - zcs->framelog.seekTableIndex = 0; - zcs->writingSeekTable = 0; - - return ZSTD_initCStream(zcs->cstream, compressionLevel); -} - -size_t ZSTD_seekable_logFrame(ZSTD_frameLog* fl, - unsigned compressedSize, - unsigned decompressedSize, - unsigned checksum) -{ - if (fl->size == ZSTD_SEEKABLE_MAXFRAMES) - return ERROR(frameIndex_tooLarge); - - /* grow the buffer if required */ - if (fl->size == fl->capacity) { - /* exponential size increase for constant amortized runtime */ - size_t const newCapacity = fl->capacity * 2; - framelogEntry_t* const newEntries = (framelogEntry_t*)realloc(fl->entries, - sizeof(framelogEntry_t) * newCapacity); - - if (newEntries == NULL) return ERROR(memory_allocation); - - fl->entries = newEntries; - assert(newCapacity <= UINT_MAX); - fl->capacity = (U32)newCapacity; - } - - fl->entries[fl->size] = (framelogEntry_t){ - compressedSize, decompressedSize, checksum - }; - fl->size++; - - return 0; -} - -size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output) -{ - size_t const prevOutPos = output->pos; - /* end the frame */ - size_t ret = ZSTD_endStream(zcs->cstream, output); - - zcs->frameCSize += (U32)(output->pos - prevOutPos); - - /* need to flush before doing the rest */ - if (ret) return ret; - - /* frame done */ - - /* store the frame data for later */ - ret = ZSTD_seekable_logFrame( - &zcs->framelog, zcs->frameCSize, zcs->frameDSize, - zcs->framelog.checksumFlag - ? XXH64_digest(&zcs->xxhState) & 0xFFFFFFFFU - : 0); - if (ret) return ret; - - /* reset for the next frame */ - zcs->frameCSize = 0; - zcs->frameDSize = 0; - - ZSTD_CCtx_reset(zcs->cstream, ZSTD_reset_session_only); - if (zcs->framelog.checksumFlag) XXH64_reset(&zcs->xxhState, 0); - - return 0; -} - -size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) -{ - const BYTE* const inBase = (const BYTE*) input->src + input->pos; - size_t inLen = input->size - input->pos; - - assert(zcs->maxFrameSize < INT_MAX); - ZSTD_CCtx_setParameter(zcs->cstream, ZSTD_c_srcSizeHint, (int)zcs->maxFrameSize); - inLen = MIN(inLen, (size_t)(zcs->maxFrameSize - zcs->frameDSize)); - - /* if we haven't finished flushing the last frame, don't start writing a new one */ - if (inLen > 0) { - ZSTD_inBuffer inTmp = { inBase, inLen, 0 }; - size_t const prevOutPos = output->pos; - - size_t const ret = ZSTD_compressStream(zcs->cstream, output, &inTmp); - - if (zcs->framelog.checksumFlag) { - XXH64_update(&zcs->xxhState, inBase, inTmp.pos); - } - - zcs->frameCSize += (U32)(output->pos - prevOutPos); - zcs->frameDSize += (U32)inTmp.pos; - - input->pos += inTmp.pos; - - if (ZSTD_isError(ret)) return ret; - } - - if (zcs->maxFrameSize == zcs->frameDSize) { - /* log the frame and start over */ - size_t const ret = ZSTD_seekable_endFrame(zcs, output); - if (ZSTD_isError(ret)) return ret; - - /* get the client ready for the next frame */ - return (size_t)zcs->maxFrameSize; - } - - return (size_t)(zcs->maxFrameSize - zcs->frameDSize); -} - -static inline size_t ZSTD_seekable_seekTableSize(const ZSTD_frameLog* fl) -{ - size_t const sizePerFrame = 8 + (fl->checksumFlag?4:0); - size_t const seekTableLen = ZSTD_SKIPPABLEHEADERSIZE + - sizePerFrame * fl->size + - ZSTD_seekTableFooterSize; - - return seekTableLen; -} - -static inline size_t ZSTD_stwrite32(ZSTD_frameLog* fl, - ZSTD_outBuffer* output, U32 const value, - U32 const offset) -{ - if (fl->seekTablePos < offset + 4) { - BYTE tmp[4]; /* so that we can work with buffers too small to write a whole word to */ - size_t const lenWrite = - MIN(output->size - output->pos, offset + 4 - fl->seekTablePos); - MEM_writeLE32(tmp, value); - memcpy((BYTE*)output->dst + output->pos, - tmp + (fl->seekTablePos - offset), lenWrite); - output->pos += lenWrite; - fl->seekTablePos += (U32)lenWrite; - - if (lenWrite < 4) return ZSTD_seekable_seekTableSize(fl) - fl->seekTablePos; - } - return 0; -} - -size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* output) -{ - /* seekTableIndex: the current index in the table and - * seekTableSize: the amount of the table written so far - * - * This function is written this way so that if it has to return early - * because of a small buffer, it can keep going where it left off. - */ - - size_t const sizePerFrame = 8 + (fl->checksumFlag?4:0); - size_t const seekTableLen = ZSTD_seekable_seekTableSize(fl); - - CHECK_Z(ZSTD_stwrite32(fl, output, ZSTD_MAGIC_SKIPPABLE_START | 0xE, 0)); - assert(seekTableLen <= (size_t)UINT_MAX); - CHECK_Z(ZSTD_stwrite32(fl, output, (U32)seekTableLen - ZSTD_SKIPPABLEHEADERSIZE, 4)); - - while (fl->seekTableIndex < fl->size) { - unsigned long long const start = ZSTD_SKIPPABLEHEADERSIZE + sizePerFrame * fl->seekTableIndex; - assert(start + 8 <= UINT_MAX); - CHECK_Z(ZSTD_stwrite32(fl, output, - fl->entries[fl->seekTableIndex].cSize, - (U32)start + 0)); - - CHECK_Z(ZSTD_stwrite32(fl, output, - fl->entries[fl->seekTableIndex].dSize, - (U32)start + 4)); - - if (fl->checksumFlag) { - CHECK_Z(ZSTD_stwrite32( - fl, output, fl->entries[fl->seekTableIndex].checksum, - (U32)start + 8)); - } - - fl->seekTableIndex++; - } - - assert(seekTableLen <= UINT_MAX); - CHECK_Z(ZSTD_stwrite32(fl, output, fl->size, - (U32)seekTableLen - ZSTD_seekTableFooterSize)); - - if (output->size - output->pos < 1) return seekTableLen - fl->seekTablePos; - if (fl->seekTablePos < seekTableLen - 4) { - BYTE const sfd = (BYTE)((fl->checksumFlag) << 7); - - ((BYTE*)output->dst)[output->pos] = sfd; - output->pos++; - fl->seekTablePos++; - } - - CHECK_Z(ZSTD_stwrite32(fl, output, ZSTD_SEEKABLE_MAGICNUMBER, - (U32)seekTableLen - 4)); - - if (fl->seekTablePos != seekTableLen) return ERROR(GENERIC); - return 0; -} - -size_t ZSTD_seekable_endStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output) -{ - if (!zcs->writingSeekTable) { - const size_t endFrame = ZSTD_seekable_endFrame(zcs, output); - if (ZSTD_isError(endFrame)) return endFrame; - /* return an accurate size hint */ - if (endFrame) return endFrame + ZSTD_seekable_seekTableSize(&zcs->framelog); - } - - zcs->writingSeekTable = 1; - - return ZSTD_seekable_writeSeekTable(&zcs->framelog, output); -} diff --git a/third_party/zstd/contrib/seekable_format/zstdseek_decompress.c b/third_party/zstd/contrib/seekable_format/zstdseek_decompress.c deleted file mode 100644 index ab9088a..0000000 --- a/third_party/zstd/contrib/seekable_format/zstdseek_decompress.c +++ /dev/null @@ -1,600 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* ********************************************************* -* Turn on Large Files support (>4GB) for 32-bit Linux/Unix -***********************************************************/ -#if !defined(__64BIT__) || defined(__MINGW32__) /* No point defining Large file for 64 bit but MinGW-w64 requires it */ -# if !defined(_FILE_OFFSET_BITS) -# define _FILE_OFFSET_BITS 64 /* turn off_t into a 64-bit type for ftello, fseeko */ -# endif -# if !defined(_LARGEFILE_SOURCE) /* obsolete macro, replaced with _FILE_OFFSET_BITS */ -# define _LARGEFILE_SOURCE 1 /* Large File Support extension (LFS) - fseeko, ftello */ -# endif -# if defined(_AIX) || defined(__hpux) -# define _LARGE_FILES /* Large file support on 32-bits AIX and HP-UX */ -# endif -#endif - -/* ************************************************************ -* Detect POSIX version -* PLATFORM_POSIX_VERSION = 0 for non-Unix e.g. Windows -* PLATFORM_POSIX_VERSION = 1 for Unix-like but non-POSIX -* PLATFORM_POSIX_VERSION > 1 is equal to found _POSIX_VERSION -* Value of PLATFORM_POSIX_VERSION can be forced on command line -***************************************************************/ -#ifndef PLATFORM_POSIX_VERSION - -# if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) /* POSIX.1-2001 (SUSv3) conformant */ \ - || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* BSD distros */ - /* exception rule : force posix version to 200112L, - * note: it's better to use unistd.h's _POSIX_VERSION whenever possible */ -# define PLATFORM_POSIX_VERSION 200112L - -/* try to determine posix version through official unistd.h's _POSIX_VERSION (https://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html). - * note : there is no simple way to know in advance if is present or not on target system, - * Posix specification mandates its presence and its content, but target system must respect this spec. - * It's necessary to _not_ #include whenever target OS is not unix-like - * otherwise it will block preprocessing stage. - * The following list of build macros tries to "guess" if target OS is likely unix-like, and therefore can #include - */ -# elif !defined(_WIN32) \ - && ( defined(__unix__) || defined(__unix) \ - || defined(__midipix__) || defined(__VMS) || defined(__HAIKU__) ) - -# if defined(__linux__) || defined(__linux) || defined(__CYGWIN__) -# ifndef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 200809L /* feature test macro : https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html */ -# endif -# endif -# include /* declares _POSIX_VERSION */ -# if defined(_POSIX_VERSION) /* POSIX compliant */ -# define PLATFORM_POSIX_VERSION _POSIX_VERSION -# else -# define PLATFORM_POSIX_VERSION 1 -# endif - -# ifdef __UCLIBC__ -# ifndef __USE_MISC -# define __USE_MISC /* enable st_mtim on uclibc */ -# endif -# endif - -# else /* non-unix target platform (like Windows) */ -# define PLATFORM_POSIX_VERSION 0 -# endif - -#endif /* PLATFORM_POSIX_VERSION */ - - -/* ************************************************************ -* Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW -***************************************************************/ -#if defined(LIBC_NO_FSEEKO) -/* Some older libc implementations don't include these functions (e.g. Bionic < 24) */ -# define LONG_SEEK fseek -#elif defined(_MSC_VER) && _MSC_VER >= 1400 -# define LONG_SEEK _fseeki64 -#elif !defined(__64BIT__) && (PLATFORM_POSIX_VERSION >= 200112L) /* No point defining Large file for 64 bit */ -# define LONG_SEEK fseeko -#elif defined(__MINGW32__) && !defined(__STRICT_ANSI__) && !defined(__NO_MINGW_LFS) && defined(__MSVCRT__) -# define LONG_SEEK fseeko64 -#elif defined(_WIN32) && !defined(__DJGPP__) -# include - static int LONG_SEEK(FILE* file, __int64 offset, int origin) { - LARGE_INTEGER off; - DWORD method; - off.QuadPart = offset; - if (origin == SEEK_END) - method = FILE_END; - else if (origin == SEEK_CUR) - method = FILE_CURRENT; - else - method = FILE_BEGIN; - - if (SetFilePointerEx((HANDLE) _get_osfhandle(_fileno(file)), off, NULL, method)) - return 0; - else - return -1; - } -#else -# define LONG_SEEK fseek -#endif - -#include /* malloc, free */ -#include /* FILE* */ -#include /* UNIT_MAX */ -#include - -#define XXH_STATIC_LINKING_ONLY -#include "xxhash.h" - -#define ZSTD_STATIC_LINKING_ONLY -#include "zstd.h" -#include "zstd_errors.h" -#include "mem.h" -#include "zstd_seekable.h" - -#undef ERROR -#define ERROR(name) ((size_t)-ZSTD_error_##name) - -#define CHECK_IO(f) { int const errcod = (f); if (errcod < 0) return ERROR(seekableIO); } - -#undef MIN -#undef MAX -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -#define ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX 16 - -/* Special-case callbacks for FILE* and in-memory modes, so that we can treat - * them the same way as the advanced API */ -static int ZSTD_seekable_read_FILE(void* opaque, void* buffer, size_t n) -{ - size_t const result = fread(buffer, 1, n, (FILE*)opaque); - if (result != n) { - return -1; - } - return 0; -} - -static int ZSTD_seekable_seek_FILE(void* opaque, long long offset, int origin) -{ - int const ret = LONG_SEEK((FILE*)opaque, offset, origin); - if (ret) return ret; - return fflush((FILE*)opaque); -} - -typedef struct { - const void *ptr; - size_t size; - size_t pos; -} buffWrapper_t; - -static int ZSTD_seekable_read_buff(void* opaque, void* buffer, size_t n) -{ - buffWrapper_t* const buff = (buffWrapper_t*)opaque; - assert(buff != NULL); - if (buff->pos + n > buff->size) return -1; - memcpy(buffer, (const BYTE*)buff->ptr + buff->pos, n); - buff->pos += n; - return 0; -} - -static int ZSTD_seekable_seek_buff(void* opaque, long long offset, int origin) -{ - buffWrapper_t* const buff = (buffWrapper_t*) opaque; - unsigned long long newOffset; - assert(buff != NULL); - switch (origin) { - case SEEK_SET: - assert(offset >= 0); - newOffset = (unsigned long long)offset; - break; - case SEEK_CUR: - newOffset = (unsigned long long)((long long)buff->pos + offset); - break; - case SEEK_END: - newOffset = (unsigned long long)((long long)buff->size + offset); - break; - default: - assert(0); /* not possible */ - } - if (newOffset > buff->size) { - return -1; - } - buff->pos = newOffset; - return 0; -} - -typedef struct { - U64 cOffset; - U64 dOffset; - U32 checksum; -} seekEntry_t; - -struct ZSTD_seekTable_s { - seekEntry_t* entries; - size_t tableLen; - - int checksumFlag; -}; - -#define SEEKABLE_BUFF_SIZE ZSTD_BLOCKSIZE_MAX - -struct ZSTD_seekable_s { - ZSTD_DStream* dstream; - ZSTD_seekTable seekTable; - ZSTD_seekable_customFile src; - - U64 decompressedOffset; - U32 curFrame; - - BYTE inBuff[SEEKABLE_BUFF_SIZE]; /* need to do our own input buffering */ - BYTE outBuff[SEEKABLE_BUFF_SIZE]; /* so we can efficiently decompress the - starts of chunks before we get to the - desired section */ - ZSTD_inBuffer in; /* maintain continuity across ZSTD_seekable_decompress operations */ - buffWrapper_t buffWrapper; /* for `src.opaque` in in-memory mode */ - - XXH64_state_t xxhState; -}; - -ZSTD_seekable* ZSTD_seekable_create(void) -{ - ZSTD_seekable* const zs = (ZSTD_seekable*)malloc(sizeof(ZSTD_seekable)); - if (zs == NULL) return NULL; - - /* also initializes stage to zsds_init */ - memset(zs, 0, sizeof(*zs)); - - zs->dstream = ZSTD_createDStream(); - if (zs->dstream == NULL) { - free(zs); - return NULL; - } - - return zs; -} - -size_t ZSTD_seekable_free(ZSTD_seekable* zs) -{ - if (zs == NULL) return 0; /* support free on null */ - ZSTD_freeDStream(zs->dstream); - free(zs->seekTable.entries); - free(zs); - return 0; -} - -ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs) -{ - assert(zs != NULL); - if (zs->seekTable.entries == NULL) return NULL; - ZSTD_seekTable* const st = (ZSTD_seekTable*)malloc(sizeof(ZSTD_seekTable)); - if (st==NULL) return NULL; - - st->checksumFlag = zs->seekTable.checksumFlag; - st->tableLen = zs->seekTable.tableLen; - - /* Allocate an extra entry at the end to match logic of initial allocation */ - size_t const entriesSize = sizeof(seekEntry_t) * (zs->seekTable.tableLen + 1); - seekEntry_t* const entries = (seekEntry_t*)malloc(entriesSize); - if (entries==NULL) { - free(st); - return NULL; - } - - memcpy(entries, zs->seekTable.entries, entriesSize); - st->entries = entries; - return st; -} - -size_t ZSTD_seekTable_free(ZSTD_seekTable* st) -{ - if (st == NULL) return 0; /* support free on null */ - free(st->entries); - free(st); - return 0; -} - -/** ZSTD_seekable_offsetToFrameIndex() : - * Performs a binary search to find the last frame with a decompressed offset - * <= pos - * @return : the frame's index */ -unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsigned long long pos) -{ - return ZSTD_seekTable_offsetToFrameIndex(&zs->seekTable, pos); -} - -unsigned ZSTD_seekTable_offsetToFrameIndex(const ZSTD_seekTable* st, unsigned long long pos) -{ - U32 lo = 0; - U32 hi = (U32)st->tableLen; - assert(st->tableLen <= UINT_MAX); - - if (pos >= st->entries[st->tableLen].dOffset) { - return (unsigned)st->tableLen; - } - - while (lo + 1 < hi) { - U32 const mid = lo + ((hi - lo) >> 1); - if (st->entries[mid].dOffset <= pos) { - lo = mid; - } else { - hi = mid; - } - } - return lo; -} - -unsigned ZSTD_seekable_getNumFrames(const ZSTD_seekable* zs) -{ - return ZSTD_seekTable_getNumFrames(&zs->seekTable); -} - -unsigned ZSTD_seekTable_getNumFrames(const ZSTD_seekTable* st) -{ - assert(st->tableLen <= UINT_MAX); - return (unsigned)st->tableLen; -} - -unsigned long long ZSTD_seekable_getFrameCompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex) -{ - return ZSTD_seekTable_getFrameCompressedOffset(&zs->seekTable, frameIndex); -} - -unsigned long long ZSTD_seekTable_getFrameCompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex) -{ - if (frameIndex >= st->tableLen) return ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE; - return st->entries[frameIndex].cOffset; -} - -unsigned long long ZSTD_seekable_getFrameDecompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex) -{ - return ZSTD_seekTable_getFrameDecompressedOffset(&zs->seekTable, frameIndex); -} - -unsigned long long ZSTD_seekTable_getFrameDecompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex) -{ - if (frameIndex >= st->tableLen) return ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE; - return st->entries[frameIndex].dOffset; -} - -size_t ZSTD_seekable_getFrameCompressedSize(const ZSTD_seekable* zs, unsigned frameIndex) -{ - return ZSTD_seekTable_getFrameCompressedSize(&zs->seekTable, frameIndex); -} - -size_t ZSTD_seekTable_getFrameCompressedSize(const ZSTD_seekTable* st, unsigned frameIndex) -{ - if (frameIndex >= st->tableLen) return ERROR(frameIndex_tooLarge); - return st->entries[frameIndex + 1].cOffset - - st->entries[frameIndex].cOffset; -} - -size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* zs, unsigned frameIndex) -{ - return ZSTD_seekTable_getFrameDecompressedSize(&zs->seekTable, frameIndex); -} - -size_t ZSTD_seekTable_getFrameDecompressedSize(const ZSTD_seekTable* st, unsigned frameIndex) -{ - if (frameIndex > st->tableLen) return ERROR(frameIndex_tooLarge); - return st->entries[frameIndex + 1].dOffset - - st->entries[frameIndex].dOffset; -} - -static size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable* zs) -{ - int checksumFlag; - ZSTD_seekable_customFile src = zs->src; - /* read the footer, fixed size */ - CHECK_IO(src.seek(src.opaque, -(int)ZSTD_seekTableFooterSize, SEEK_END)); - CHECK_IO(src.read(src.opaque, zs->inBuff, ZSTD_seekTableFooterSize)); - - if (MEM_readLE32(zs->inBuff + 5) != ZSTD_SEEKABLE_MAGICNUMBER) { - return ERROR(prefix_unknown); - } - - { BYTE const sfd = zs->inBuff[4]; - checksumFlag = sfd >> 7; - - /* check reserved bits */ - if ((sfd >> 2) & 0x1f) { - return ERROR(corruption_detected); - } } - - { U32 const numFrames = MEM_readLE32(zs->inBuff); - U32 const sizePerEntry = 8 + (checksumFlag?4:0); - U32 const tableSize = sizePerEntry * numFrames; - U32 const frameSize = tableSize + ZSTD_seekTableFooterSize + ZSTD_SKIPPABLEHEADERSIZE; - - U32 remaining = frameSize - ZSTD_seekTableFooterSize; /* don't need to re-read footer */ - { U32 const toRead = MIN(remaining, SEEKABLE_BUFF_SIZE); - CHECK_IO(src.seek(src.opaque, -(S64)frameSize, SEEK_END)); - CHECK_IO(src.read(src.opaque, zs->inBuff, toRead)); - remaining -= toRead; - } - - if (MEM_readLE32(zs->inBuff) != (ZSTD_MAGIC_SKIPPABLE_START | 0xE)) { - return ERROR(prefix_unknown); - } - if (MEM_readLE32(zs->inBuff+4) + ZSTD_SKIPPABLEHEADERSIZE != frameSize) { - return ERROR(prefix_unknown); - } - - { /* Allocate an extra entry at the end so that we can do size - * computations on the last element without special case */ - seekEntry_t* const entries = (seekEntry_t*)malloc(sizeof(seekEntry_t) * (numFrames + 1)); - - U32 idx = 0; - U32 pos = 8; - - U64 cOffset = 0; - U64 dOffset = 0; - - if (entries == NULL) return ERROR(memory_allocation); - - /* compute cumulative positions */ - for (; idx < numFrames; idx++) { - if (pos + sizePerEntry > SEEKABLE_BUFF_SIZE) { - U32 const offset = SEEKABLE_BUFF_SIZE - pos; - U32 const toRead = MIN(remaining, SEEKABLE_BUFF_SIZE - offset); - memmove(zs->inBuff, zs->inBuff + pos, offset); /* move any data we haven't read yet */ - CHECK_IO(src.read(src.opaque, zs->inBuff+offset, toRead)); - remaining -= toRead; - pos = 0; - } - entries[idx].cOffset = cOffset; - entries[idx].dOffset = dOffset; - - cOffset += MEM_readLE32(zs->inBuff + pos); - pos += 4; - dOffset += MEM_readLE32(zs->inBuff + pos); - pos += 4; - if (checksumFlag) { - entries[idx].checksum = MEM_readLE32(zs->inBuff + pos); - pos += 4; - } - } - entries[numFrames].cOffset = cOffset; - entries[numFrames].dOffset = dOffset; - - zs->seekTable.entries = entries; - zs->seekTable.tableLen = numFrames; - zs->seekTable.checksumFlag = checksumFlag; - return 0; - } - } -} - -size_t ZSTD_seekable_initBuff(ZSTD_seekable* zs, const void* src, size_t srcSize) -{ - zs->buffWrapper = (buffWrapper_t){src, srcSize, 0}; - { ZSTD_seekable_customFile srcFile = {&zs->buffWrapper, - &ZSTD_seekable_read_buff, - &ZSTD_seekable_seek_buff}; - return ZSTD_seekable_initAdvanced(zs, srcFile); } -} - -size_t ZSTD_seekable_initFile(ZSTD_seekable* zs, FILE* src) -{ - ZSTD_seekable_customFile srcFile = {src, &ZSTD_seekable_read_FILE, - &ZSTD_seekable_seek_FILE}; - return ZSTD_seekable_initAdvanced(zs, srcFile); -} - -size_t ZSTD_seekable_initAdvanced(ZSTD_seekable* zs, ZSTD_seekable_customFile src) -{ - zs->src = src; - - { const size_t seekTableInit = ZSTD_seekable_loadSeekTable(zs); - if (ZSTD_isError(seekTableInit)) return seekTableInit; } - - zs->decompressedOffset = (U64)-1; - zs->curFrame = (U32)-1; - - { const size_t dstreamInit = ZSTD_initDStream(zs->dstream); - if (ZSTD_isError(dstreamInit)) return dstreamInit; } - return 0; -} - -size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t len, unsigned long long offset) -{ - unsigned long long const eos = zs->seekTable.entries[zs->seekTable.tableLen].dOffset; - if (offset + len > eos) { - len = eos - offset; - } - - U32 targetFrame = ZSTD_seekable_offsetToFrameIndex(zs, offset); - U32 noOutputProgressCount = 0; - size_t srcBytesRead = 0; - do { - /* check if we can continue from a previous decompress job */ - if (targetFrame != zs->curFrame || offset < zs->decompressedOffset) { - zs->decompressedOffset = zs->seekTable.entries[targetFrame].dOffset; - zs->curFrame = targetFrame; - - assert(zs->seekTable.entries[targetFrame].cOffset < LLONG_MAX); - CHECK_IO(zs->src.seek(zs->src.opaque, - (long long)zs->seekTable.entries[targetFrame].cOffset, - SEEK_SET)); - zs->in = (ZSTD_inBuffer){zs->inBuff, 0, 0}; - XXH64_reset(&zs->xxhState, 0); - ZSTD_DCtx_reset(zs->dstream, ZSTD_reset_session_only); - if (zs->buffWrapper.size && srcBytesRead > zs->buffWrapper.size) { - return ERROR(seekableIO); - } - } - - while (zs->decompressedOffset < offset + len) { - size_t toRead; - ZSTD_outBuffer outTmp; - size_t prevOutPos; - size_t prevInPos; - size_t forwardProgress; - if (zs->decompressedOffset < offset) { - /* dummy decompressions until we get to the target offset */ - outTmp = (ZSTD_outBuffer){zs->outBuff, (size_t) (MIN(SEEKABLE_BUFF_SIZE, offset - zs->decompressedOffset)), 0}; - } else { - outTmp = (ZSTD_outBuffer){dst, len, (size_t) (zs->decompressedOffset - offset)}; - } - - prevOutPos = outTmp.pos; - prevInPos = zs->in.pos; - toRead = ZSTD_decompressStream(zs->dstream, &outTmp, &zs->in); - if (ZSTD_isError(toRead)) { - return toRead; - } - - if (zs->seekTable.checksumFlag) { - XXH64_update(&zs->xxhState, (BYTE*)outTmp.dst + prevOutPos, - outTmp.pos - prevOutPos); - } - forwardProgress = outTmp.pos - prevOutPos; - if (forwardProgress == 0) { - if (noOutputProgressCount++ > ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX) { - return ERROR(seekableIO); - } - } else { - noOutputProgressCount = 0; - } - zs->decompressedOffset += forwardProgress; - srcBytesRead += zs->in.pos - prevInPos; - - if (toRead == 0) { - /* frame complete */ - - /* verify checksum */ - if (zs->seekTable.checksumFlag && - (XXH64_digest(&zs->xxhState) & 0xFFFFFFFFU) != - zs->seekTable.entries[targetFrame].checksum) { - return ERROR(corruption_detected); - } - - if (zs->decompressedOffset < offset + len) { - /* go back to the start and force a reset of the stream */ - targetFrame = ZSTD_seekable_offsetToFrameIndex(zs, zs->decompressedOffset); - /* in this case it will fail later with corruption_detected, since last block does not have checksum */ - assert(targetFrame != zs->seekTable.tableLen); - } - break; - } - - /* read in more data if we're done with this buffer */ - if (zs->in.pos == zs->in.size) { - toRead = MIN(toRead, SEEKABLE_BUFF_SIZE); - CHECK_IO(zs->src.read(zs->src.opaque, zs->inBuff, toRead)); - zs->in.size = toRead; - zs->in.pos = 0; - } - } /* while (zs->decompressedOffset < offset + len) */ - } while (zs->decompressedOffset != offset + len); - - return len; -} - -size_t ZSTD_seekable_decompressFrame(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned frameIndex) -{ - if (frameIndex >= zs->seekTable.tableLen) { - return ERROR(frameIndex_tooLarge); - } - - { size_t const decompressedSize = - zs->seekTable.entries[frameIndex + 1].dOffset - - zs->seekTable.entries[frameIndex].dOffset; - if (dstSize < decompressedSize) { - return ERROR(dstSize_tooSmall); - } - return ZSTD_seekable_decompress( - zs, dst, decompressedSize, - zs->seekTable.entries[frameIndex].dOffset); - } -} diff --git a/third_party/zstd/contrib/seqBench/Makefile b/third_party/zstd/contrib/seqBench/Makefile deleted file mode 100644 index e7f08a4..0000000 --- a/third_party/zstd/contrib/seqBench/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ################################################################ - -PROGDIR = ../../programs -LIBDIR = ../../lib - -LIBZSTD = $(LIBDIR)/libzstd.a - -CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/common -I$(LIBDIR)/dictBuilder -I$(PROGDIR) - -CFLAGS ?= -O3 -g -CFLAGS += -std=gnu99 -DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum \ - -Wstrict-prototypes -Wundef -Wpointer-arith \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -Wredundant-decls -CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) - - -default: seqBench - -all : seqBench - -seqBench: util.o timefn.o benchfn.o datagen.o xxhash.o seqBench.c $(LIBZSTD) - $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ - -.PHONY: $(LIBZSTD) -$(LIBZSTD): - $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" - -benchfn.o: $(PROGDIR)/benchfn.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -timefn.o: $(PROGDIR)/timefn.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -datagen.o: $(PROGDIR)/datagen.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - -util.o: $(PROGDIR)/util.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - - -xxhash.o : $(LIBDIR)/common/xxhash.c - $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c - - -clean: - $(RM) *.o - $(MAKE) -C $(LIBDIR) clean > /dev/null - $(RM) seqBench diff --git a/third_party/zstd/contrib/seqBench/seqBench.c b/third_party/zstd/contrib/seqBench/seqBench.c deleted file mode 100644 index 7efebec..0000000 --- a/third_party/zstd/contrib/seqBench/seqBench.c +++ /dev/null @@ -1,53 +0,0 @@ -#define ZSTD_STATIC_LINKING_ONLY -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]) { - ZSTD_CCtx* zc = ZSTD_createCCtx(); - - if (argc != 2) { - printf("Usage: seqBench \n"); // TODO provide the block delim option here - return 1; - } - - FILE *f = fopen(argv[1], "rb"); - fseek(f, 0, SEEK_END); - long inBufSize = ftell(f); - fseek(f, 0, SEEK_SET); - - char *inBuf = malloc(inBufSize + 1); - fread(inBuf, inBufSize, 1, f); - fclose(f); - - size_t seqsSize = ZSTD_sequenceBound(inBufSize); - ZSTD_Sequence *seqs = (ZSTD_Sequence*)malloc(seqsSize * sizeof(ZSTD_Sequence)); - char *outBuf = malloc(ZSTD_compressBound(inBufSize)); - - ZSTD_generateSequences(zc, seqs, seqsSize, inBuf, inBufSize); - ZSTD_CCtx_setParameter(zc, ZSTD_c_blockDelimiters, ZSTD_sf_explicitBlockDelimiters); - size_t outBufSize = ZSTD_compressSequences(zc, outBuf, inBufSize, seqs, seqsSize, inBuf, inBufSize); - if (ZSTD_isError(outBufSize)) { - printf("ERROR: %lu\n", outBufSize); - return 1; - } - - char *validationBuf = malloc(inBufSize); - ZSTD_decompress(validationBuf, inBufSize, outBuf, outBufSize); - - if (memcmp(inBuf, validationBuf, inBufSize) == 0) { - printf("Compression and decompression were successful!\n"); - } else { - printf("ERROR: input and validation buffers don't match!\n"); - for (int i = 0; i < inBufSize; i++) { - if (inBuf[i] != validationBuf[i]) { - printf("First bad index: %d\n", i); - break; - } - } - } - - return 0; -} diff --git a/third_party/zstd/contrib/snap/snapcraft.yaml b/third_party/zstd/contrib/snap/snapcraft.yaml deleted file mode 100644 index 0a77946..0000000 --- a/third_party/zstd/contrib/snap/snapcraft.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: zstd -version: git -summary: Zstandard - Fast real-time compression algorithm -description: | - Zstandard, or zstd as short version, is a fast lossless compression - algorithm, targeting real-time compression scenarios at zlib-level and better - compression ratios. It's backed by a very fast entropy stage, provided by - Huff0 and FSE library - -grade: devel # must be 'stable' to release into candidate/stable channels -confinement: devmode # use 'strict' once you have the right plugs and slots - -apps: - zstd: - command: usr/local/bin/zstd - plugs: [home, removable-media] - zstdgrep: - command: usr/local/bin/zstdgrep - plugs: [home, removable-media] - zstdless: - command: usr/local/bin/zstdless - plugs: [home, removable-media] - -parts: - zstd: - source: . - plugin: make - build-packages: [g++] diff --git a/third_party/zstd/doc/README.md b/third_party/zstd/doc/README.md deleted file mode 100644 index 8f3babc..0000000 --- a/third_party/zstd/doc/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Zstandard Documentation -======================= - -This directory contains material defining the Zstandard format, -as well as detailed instructions to use `zstd` library. - -__`zstd_manual.html`__ : Documentation of `zstd.h` API, in html format. -Unfortunately, Github doesn't display `html` files in parsed format, just as source code. -For a readable display of html API documentation of latest release, -use this link: [https://raw.githack.com/facebook/zstd/release/doc/zstd_manual.html](https://raw.githack.com/facebook/zstd/release/doc/zstd_manual.html) . - -__`zstd_compression_format.md`__ : This document defines the Zstandard compression format. -Compliant decoders must adhere to this document, -and compliant encoders must generate data that follows it. - -Should you look for resources to develop your own port of Zstandard algorithm, -you may find the following resources useful : - -__`educational_decoder`__ : This directory contains an implementation of a Zstandard decoder, -compliant with the Zstandard compression format. -It can be used, for example, to better understand the format, -or as the basis for a separate implementation of Zstandard decoder. - -[__`decode_corpus`__](https://github.com/facebook/zstd/tree/dev/tests#decodecorpus---tool-to-generate-zstandard-frames-for-decoder-testing) : -This tool, stored in `/tests` directory, is able to generate random valid frames, -which is useful if you wish to test your decoder and verify it fully supports the specification. diff --git a/third_party/zstd/doc/decompressor_errata.md b/third_party/zstd/doc/decompressor_errata.md deleted file mode 100644 index b570f73..0000000 --- a/third_party/zstd/doc/decompressor_errata.md +++ /dev/null @@ -1,148 +0,0 @@ -Decompressor Errata -=================== - -This document captures known decompressor bugs, where the decompressor rejects a valid zstd frame. -Each entry will contain: -1. The last affected decompressor versions. -2. The decompressor components affected. -2. Whether the compressed frame could ever be produced by the reference compressor. -3. An example frame (hexadecimal string when it can be short enough, link to golden file otherwise) -4. A description of the bug. - -The document is in reverse chronological order, with the bugs that affect the most recent zstd decompressor versions listed first. - - -No sequence using the 2-bytes format ------------------------------------------------- - -**Last affected version**: v1.5.5 - -**Affected decompressor component(s)**: Library & CLI - -**Produced by the reference compressor**: No - -**Example Frame**: see zstd/tests/golden-decompression/zeroSeq_2B.zst - -The zstd decoder incorrectly expects FSE tables when there are 0 sequences present in the block -if the value 0 is encoded using the 2-bytes format. -Instead, it should immediately end the sequence section, and move on to next block. - -This situation was never generated by the reference compressor, -because representing 0 sequences with the 2-bytes format is inefficient -(the 1-byte format is always used in this case). - - -Compressed block with a size of exactly 128 KB ------------------------------------------------- - -**Last affected version**: v1.5.2 - -**Affected decompressor component(s)**: Library & CLI - -**Produced by the reference compressor**: No - -**Example Frame**: see zstd/tests/golden-decompression/block-128k.zst - -The zstd decoder incorrectly rejected blocks of type `Compressed_Block` when their size was exactly 128 KB. -Note that `128 KB - 1` was accepted, and `128 KB + 1` is forbidden by the spec. - -This type of block was never generated by the reference compressor. - -These blocks used to be disallowed by the spec up until spec version 0.3.2 when the restriction was lifted by [PR#1689](https://github.com/facebook/zstd/pull/1689). - -> A Compressed_Block has the extra restriction that Block_Size is always strictly less than the decompressed size. If this condition cannot be respected, the block must be sent uncompressed instead (Raw_Block). - - -Compressed block with 0 literals and 0 sequences ------------------------------------------------- - -**Last affected version**: v1.5.2 - -**Affected decompressor component(s)**: Library & CLI - -**Produced by the reference compressor**: No - -**Example Frame**: `28b5 2ffd 2000 1500 0000 00` - -The zstd decoder incorrectly rejected blocks of type `Compressed_Block` that encodes literals as `Raw_Literals_Block` with no literals, and has no sequences. - -This type of block was never generated by the reference compressor. - -Additionally, these blocks were disallowed by the spec up until spec version 0.3.2 when the restriction was lifted by [PR#1689](https://github.com/facebook/zstd/pull/1689). - -> A Compressed_Block has the extra restriction that Block_Size is always strictly less than the decompressed size. If this condition cannot be respected, the block must be sent uncompressed instead (Raw_Block). - - -First block is RLE block ------------------------- - -**Last affected version**: v1.4.3 - -**Affected decompressor component(s)**: CLI only - -**Produced by the reference compressor**: No - -**Example Frame**: `28b5 2ffd a001 0002 0002 0010 000b 0000 00` - -The zstd CLI decompressor rejected cases where the first block was an RLE block whose `Block_Size` is 131072, and the frame contains more than one block. -This only affected the zstd CLI, and not the library. - -The example is an RLE block with 131072 bytes, followed by a second RLE block with 1 byte. - -The compressor currently works around this limitation by explicitly avoiding producing RLE blocks as the first -block. - -https://github.com/facebook/zstd/blob/8814aa5bfa74f05a86e55e9d508da177a893ceeb/lib/compress/zstd_compress.c#L3527-L3535 - - -Tiny FSE Table & Block ----------------------- - -**Last affected version**: v1.3.4 - -**Affected decompressor component(s)**: Library & CLI - -**Produced by the reference compressor**: Possibly until version v1.3.4, but probably never - -**Example Frame**: `28b5 2ffd 2027 c500 0080 f3f1 f0ec ebc6 c5c7 f09d 4300 0000 e0e0 0658 0100 603e 52` - -The zstd library rejected blocks of type `Compressed_Block` whose offset of the last table with type `FSE_Compressed_Mode` was less than 4 bytes from the end of the block. - -In more depth, let `Last_Table_Offset` be the offset in the compressed block (excluding the header) that -the last table with type `FSE_Compressed_Mode` started. If `Block_Content - Last_Table_Offset < 4` then -the buggy zstd decompressor would reject the block. This occurs when the last serialized table is 2 bytes -and the bitstream size is 1 byte. - -For example: -* There is 1 sequence in the block -* `Literals_Lengths_Mode` is `FSE_Compressed_Mode` & the serialized table size is 2 bytes -* `Offsets_Mode` is `Predefined_Mode` -* `Match_Lengths_Mode` is `Predefined_Mode` -* The bitstream is 1 byte. E.g. there is only one sequence and it fits in 1 byte. - -The total `Block_Content` is `5` bytes, and `Last_Table_Offset` is `2`. - -See the compressor workaround code: - -https://github.com/facebook/zstd/blob/8814aa5bfa74f05a86e55e9d508da177a893ceeb/lib/compress/zstd_compress.c#L2667-L2682 - -Magicless format ----------------------- - -**Last affected version**: v1.5.5 - -**Affected decompressor component(s)**: Library - -**Produced by the reference compressor**: Yes (example: https://gist.github.com/embg/9940726094f4cf2cef162cffe9319232) - -**Example Frame**: `27 b5 2f fd 00 03 19 00 00 66 6f 6f 3f ba c4 59` - -v1.5.6 fixes several bugs in which the magicless-format decoder rejects valid frames. -These include but are not limited to: -* Valid frames that happen to begin with a legacy magic number (little-endian) -* Valid frames that happen to begin with a skippable magic number (little-endian) - -If you are affected by this issue and cannot update to v1.5.6 or later, there is a -workaround to recover affected data. Simply prepend the ZSTD magic number -`0xFD2FB528` (little-endian) to your data and decompress using the standard-format -decoder. diff --git a/third_party/zstd/doc/decompressor_permissive.md b/third_party/zstd/doc/decompressor_permissive.md deleted file mode 100644 index 164d6c8..0000000 --- a/third_party/zstd/doc/decompressor_permissive.md +++ /dev/null @@ -1,80 +0,0 @@ -Decompressor Permissiveness to Invalid Data -=========================================== - -This document describes the behavior of the reference decompressor in cases -where it accepts formally invalid data instead of reporting an error. - -While the reference decompressor *must* decode any compliant frame following -the specification, its ability to detect erroneous data is on a best effort -basis: the decoder may accept input data that would be formally invalid, -when it causes no risk to the decoder, and which detection would cost too much -complexity or speed regression. - -In practice, the vast majority of invalid data are detected, if only because -many corruption events are dangerous for the decoder process (such as -requesting an out-of-bound memory access) and many more are easy to check. - -This document lists a few known cases where invalid data was formerly accepted -by the decoder, and what has changed since. - - -Truncated Huffman states ------------------------- - -**Last affected version**: v1.5.6 - -**Produced by the reference compressor**: No - -**Example Frame**: `28b5 2ffd 0000 5500 0072 8001 0420 7e1f 02aa 00` - -When using FSE-compressed Huffman weights, the compressed weight bitstream -could contain fewer bits than necessary to decode the initial states. - -The reference decompressor up to v1.5.6 will decode truncated or missing -initial states as zero, which can result in a valid Huffman tree if only -the second state is truncated. - -In newer versions, truncated initial states are reported as a corruption -error by the decoder. - - -Offset == 0 ------------ - -**Last affected version**: v1.5.5 - -**Produced by the reference compressor**: No - -**Example Frame**: `28b5 2ffd 0000 4500 0008 0002 002f 430b ae` - -If a sequence is decoded with `literals_length = 0` and `offset_value = 3` -while `Repeated_Offset_1 = 1`, the computed offset will be `0`, which is -invalid. - -The reference decompressor up to v1.5.5 processes this case as if the computed -offset was `1`, including inserting `1` into the repeated offset list. -This prevents the output buffer from remaining uninitialized, thus denying a -potential attack vector from an untrusted source. -However, in the rare case where this scenario would be the outcome of a -transmission or storage error, the decoder relies on the checksum to detect -the error. - -In newer versions, this case is always detected and reported as a corruption error. - - -Non-zeroes reserved bits ------------------------- - -**Last affected version**: v1.5.5 - -**Produced by the reference compressor**: No - -The Sequences section of each block has a header, and one of its elements is a -byte, which describes the compression mode of each symbol. -This byte contains 2 reserved bits which must be set to zero. - -The reference decompressor up to v1.5.5 just ignores these 2 bits. -This behavior has no consequence for the rest of the frame decoding process. - -In newer versions, the 2 reserved bits are actively checked for value zero, -and the decoder reports a corruption error if they are not. diff --git a/third_party/zstd/doc/educational_decoder/.gitignore b/third_party/zstd/doc/educational_decoder/.gitignore deleted file mode 100644 index b801306..0000000 --- a/third_party/zstd/doc/educational_decoder/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Build artifacts -harness diff --git a/third_party/zstd/doc/educational_decoder/Makefile b/third_party/zstd/doc/educational_decoder/Makefile deleted file mode 100644 index b3154d9..0000000 --- a/third_party/zstd/doc/educational_decoder/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -ZSTD ?= zstd # note: requires zstd installation on local system - -UNAME?= $(shell sh -c 'MSYSTEM="MSYS" uname') -ifeq ($(UNAME), SunOS) -DIFF ?= gdiff -else -DIFF ?= diff -endif - -HARNESS_FILES=*.c - -MULTITHREAD_LDFLAGS = -pthread -DEBUGFLAGS= -g -DZSTD_DEBUG=1 -CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ - -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR) -CFLAGS ?= -O2 -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ - -Wstrict-aliasing=1 -Wswitch-enum \ - -Wredundant-decls -Wstrict-prototypes -Wundef \ - -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ - -std=c99 -CFLAGS += $(DEBUGFLAGS) -CFLAGS += $(MOREFLAGS) -FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITHREAD_LDFLAGS) - -harness: $(HARNESS_FILES) - $(CC) $(FLAGS) $^ -o $@ - -clean: - @$(RM) harness *.o - @$(RM) -rf harness.dSYM # MacOS specific - -test: harness - # - # Testing single-file decompression with educational decoder - # - @$(ZSTD) -f README.md -o tmp.zst - @./harness tmp.zst tmp - @$(DIFF) -s tmp README.md - @$(RM) tmp* - # - # Testing dictionary decompression with education decoder - # - # note : files are presented multiple for training, to reach minimum threshold - @$(ZSTD) --train harness.c zstd_decompress.c zstd_decompress.h README.md \ - harness.c zstd_decompress.c zstd_decompress.h README.md \ - harness.c zstd_decompress.c zstd_decompress.h README.md \ - -o dictionary - @$(ZSTD) -f README.md -D dictionary -o tmp.zst - @./harness tmp.zst tmp dictionary - @$(DIFF) -s tmp README.md - @$(RM) tmp* dictionary diff --git a/third_party/zstd/doc/educational_decoder/README.md b/third_party/zstd/doc/educational_decoder/README.md deleted file mode 100644 index c89451c..0000000 --- a/third_party/zstd/doc/educational_decoder/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Educational Decoder -=================== - -`zstd_decompress.c` is a self-contained implementation in C99 of a decoder, -according to the [Zstandard format specification]. -While it does not implement as many features as the reference decoder, -such as the streaming API or content checksums, it is written to be easy to -follow and understand, to help understand how the Zstandard format works. -It's laid out to match the [format specification], -so it can be used to understand how complex segments could be implemented. -It also contains implementations of Huffman and FSE table decoding. - -[Zstandard format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md -[format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md - -While the library's primary objective is code clarity, -it also happens to compile into a small object file. -The object file can be made even smaller by removing error messages, -using the macro directive `ZDEC_NO_MESSAGE` at compilation time. -This can be reduced even further by foregoing dictionary support, -by defining `ZDEC_NO_DICTIONARY`. - -`harness.c` provides a simple test harness around the decoder: - - harness [dictionary] - -As an additional resource to be used with this decoder, -see the `decodecorpus` tool in the [tests] directory. -It generates valid Zstandard frames that can be used to verify -a Zstandard decoder implementation. -Note that to use the tool to verify this decoder implementation, -the --content-size flag should be set, -as this decoder does not handle streaming decoding, -and so it must know the decompressed size in advance. - -[tests]: https://github.com/facebook/zstd/blob/dev/tests/ diff --git a/third_party/zstd/doc/educational_decoder/harness.c b/third_party/zstd/doc/educational_decoder/harness.c deleted file mode 100644 index 12c5a80..0000000 --- a/third_party/zstd/doc/educational_decoder/harness.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include -#include - -#include "zstd_decompress.h" - -typedef unsigned char u8; - -// If the data doesn't have decompressed size with it, fallback on assuming the -// compression ratio is at most 16 -#define MAX_COMPRESSION_RATIO (16) - -// Protect against allocating too much memory for output -#define MAX_OUTPUT_SIZE ((size_t)1024 * 1024 * 1024) - -// Error message then exit -#define ERR_OUT(...) { fprintf(stderr, __VA_ARGS__); exit(1); } - - -typedef struct { - u8* address; - size_t size; -} buffer_s; - -static void freeBuffer(buffer_s b) { free(b.address); } - -static buffer_s read_file(const char *path) -{ - FILE* const f = fopen(path, "rb"); - if (!f) ERR_OUT("failed to open file %s \n", path); - - fseek(f, 0L, SEEK_END); - size_t const size = (size_t)ftell(f); - rewind(f); - - void* const ptr = malloc(size); - if (!ptr) ERR_OUT("failed to allocate memory to hold %s \n", path); - - size_t const read = fread(ptr, 1, size, f); - if (read != size) ERR_OUT("error while reading file %s \n", path); - - fclose(f); - buffer_s const b = { ptr, size }; - return b; -} - -static void write_file(const char* path, const u8* ptr, size_t size) -{ - FILE* const f = fopen(path, "wb"); - if (!f) ERR_OUT("failed to open file %s \n", path); - - size_t written = 0; - while (written < size) { - written += fwrite(ptr+written, 1, size, f); - if (ferror(f)) ERR_OUT("error while writing file %s\n", path); - } - - fclose(f); -} - -int main(int argc, char **argv) -{ - if (argc < 3) - ERR_OUT("usage: %s [dictionary] \n", argv[0]); - - buffer_s const input = read_file(argv[1]); - - buffer_s dict = { NULL, 0 }; - if (argc >= 4) { - dict = read_file(argv[3]); - } - - size_t out_capacity = ZSTD_get_decompressed_size(input.address, input.size); - if (out_capacity == (size_t)-1) { - out_capacity = MAX_COMPRESSION_RATIO * input.size; - fprintf(stderr, "WARNING: Compressed data does not contain " - "decompressed size, going to assume the compression " - "ratio is at most %d (decompressed size of at most " - "%u) \n", - MAX_COMPRESSION_RATIO, (unsigned)out_capacity); - } - if (out_capacity > MAX_OUTPUT_SIZE) - ERR_OUT("Required output size too large for this implementation \n"); - - u8* const output = malloc(out_capacity); - if (!output) ERR_OUT("failed to allocate memory \n"); - - dictionary_t* const parsed_dict = create_dictionary(); - if (dict.size) { -#if defined (ZDEC_NO_DICTIONARY) - printf("dict.size = %zu \n", dict.size); - ERR_OUT("no dictionary support \n"); -#else - parse_dictionary(parsed_dict, dict.address, dict.size); -#endif - } - size_t const decompressed_size = - ZSTD_decompress_with_dict(output, out_capacity, - input.address, input.size, - parsed_dict); - - free_dictionary(parsed_dict); - - write_file(argv[2], output, decompressed_size); - - freeBuffer(input); - freeBuffer(dict); - free(output); - return 0; -} diff --git a/third_party/zstd/doc/educational_decoder/zstd_decompress.c b/third_party/zstd/doc/educational_decoder/zstd_decompress.c deleted file mode 100644 index 839e085..0000000 --- a/third_party/zstd/doc/educational_decoder/zstd_decompress.c +++ /dev/null @@ -1,2323 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/// Zstandard educational decoder implementation -/// See https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md - -#include // uint8_t, etc. -#include // malloc, free, exit -#include // fprintf -#include // memset, memcpy -#include "zstd_decompress.h" - - -/******* IMPORTANT CONSTANTS *********************************************/ - -// Zstandard frame -// "Magic_Number -// 4 Bytes, little-endian format. Value : 0xFD2FB528" -#define ZSTD_MAGIC_NUMBER 0xFD2FB528U - -// The size of `Block_Content` is limited by `Block_Maximum_Size`, -#define ZSTD_BLOCK_SIZE_MAX ((size_t)128 * 1024) - -// literal blocks can't be larger than their block -#define MAX_LITERALS_SIZE ZSTD_BLOCK_SIZE_MAX - - -/******* UTILITY MACROS AND TYPES *********************************************/ -#define MAX(a, b) ((a) > (b) ? (a) : (b)) -#define MIN(a, b) ((a) < (b) ? (a) : (b)) - -#if defined(ZDEC_NO_MESSAGE) -#define MESSAGE(...) -#else -#define MESSAGE(...) fprintf(stderr, "" __VA_ARGS__) -#endif - -/// This decoder calls exit(1) when it encounters an error, however a production -/// library should propagate error codes -#define ERROR(s) \ - do { \ - MESSAGE("Error: %s\n", s); \ - exit(1); \ - } while (0) -#define INP_SIZE() \ - ERROR("Input buffer smaller than it should be or input is " \ - "corrupted") -#define OUT_SIZE() ERROR("Output buffer too small for output") -#define CORRUPTION() ERROR("Corruption detected while decompressing") -#define BAD_ALLOC() ERROR("Memory allocation error") -#define IMPOSSIBLE() ERROR("An impossibility has occurred") - -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; - -typedef int8_t i8; -typedef int16_t i16; -typedef int32_t i32; -typedef int64_t i64; -/******* END UTILITY MACROS AND TYPES *****************************************/ - -/******* IMPLEMENTATION PRIMITIVE PROTOTYPES **********************************/ -/// The implementations for these functions can be found at the bottom of this -/// file. They implement low-level functionality needed for the higher level -/// decompression functions. - -/*** IO STREAM OPERATIONS *************/ - -/// ostream_t/istream_t are used to wrap the pointers/length data passed into -/// ZSTD_decompress, so that all IO operations are safely bounds checked -/// They are written/read forward, and reads are treated as little-endian -/// They should be used opaquely to ensure safety -typedef struct { - u8 *ptr; - size_t len; -} ostream_t; - -typedef struct { - const u8 *ptr; - size_t len; - - // Input often reads a few bits at a time, so maintain an internal offset - int bit_offset; -} istream_t; - -/// The following two functions are the only ones that allow the istream to be -/// non-byte aligned - -/// Reads `num` bits from a bitstream, and updates the internal offset -static inline u64 IO_read_bits(istream_t *const in, const int num_bits); -/// Backs-up the stream by `num` bits so they can be read again -static inline void IO_rewind_bits(istream_t *const in, const int num_bits); -/// If the remaining bits in a byte will be unused, advance to the end of the -/// byte -static inline void IO_align_stream(istream_t *const in); - -/// Write the given byte into the output stream -static inline void IO_write_byte(ostream_t *const out, u8 symb); - -/// Returns the number of bytes left to be read in this stream. The stream must -/// be byte aligned. -static inline size_t IO_istream_len(const istream_t *const in); - -/// Advances the stream by `len` bytes, and returns a pointer to the chunk that -/// was skipped. The stream must be byte aligned. -static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len); -/// Advances the stream by `len` bytes, and returns a pointer to the chunk that -/// was skipped so it can be written to. -static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len); - -/// Advance the inner state by `len` bytes. The stream must be byte aligned. -static inline void IO_advance_input(istream_t *const in, size_t len); - -/// Returns an `ostream_t` constructed from the given pointer and length. -static inline ostream_t IO_make_ostream(u8 *out, size_t len); -/// Returns an `istream_t` constructed from the given pointer and length. -static inline istream_t IO_make_istream(const u8 *in, size_t len); - -/// Returns an `istream_t` with the same base as `in`, and length `len`. -/// Then, advance `in` to account for the consumed bytes. -/// `in` must be byte aligned. -static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len); -/*** END IO STREAM OPERATIONS *********/ - -/*** BITSTREAM OPERATIONS *************/ -/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits, -/// and return them interpreted as a little-endian unsigned integer. -static inline u64 read_bits_LE(const u8 *src, const int num_bits, - const size_t offset); - -/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so -/// it updates `offset` to `offset - bits`, and then reads `bits` bits from -/// `src + offset`. If the offset becomes negative, the extra bits at the -/// bottom are filled in with `0` bits instead of reading from before `src`. -static inline u64 STREAM_read_bits(const u8 *src, const int bits, - i64 *const offset); -/*** END BITSTREAM OPERATIONS *********/ - -/*** BIT COUNTING OPERATIONS **********/ -/// Returns the index of the highest set bit in `num`, or `-1` if `num == 0` -static inline int highest_set_bit(const u64 num); -/*** END BIT COUNTING OPERATIONS ******/ - -/*** HUFFMAN PRIMITIVES ***************/ -// Table decode method uses exponential memory, so we need to limit depth -#define HUF_MAX_BITS (16) - -// Limit the maximum number of symbols to 256 so we can store a symbol in a byte -#define HUF_MAX_SYMBS (256) - -/// Structure containing all tables necessary for efficient Huffman decoding -typedef struct { - u8 *symbols; - u8 *num_bits; - int max_bits; -} HUF_dtable; - -/// Decode a single symbol and read in enough bits to refresh the state -static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset); -/// Read in a full state's worth of bits to initialize it -static inline void HUF_init_state(const HUF_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset); - -/// Decompresses a single Huffman stream, returns the number of bytes decoded. -/// `src_len` must be the exact length of the Huffman-coded block. -static size_t HUF_decompress_1stream(const HUF_dtable *const dtable, - ostream_t *const out, istream_t *const in); -/// Same as previous but decodes 4 streams, formatted as in the Zstandard -/// specification. -/// `src_len` must be the exact length of the Huffman-coded block. -static size_t HUF_decompress_4stream(const HUF_dtable *const dtable, - ostream_t *const out, istream_t *const in); - -/// Initialize a Huffman decoding table using the table of bit counts provided -static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits, - const int num_symbs); -/// Initialize a Huffman decoding table using the table of weights provided -/// Weights follow the definition provided in the Zstandard specification -static void HUF_init_dtable_usingweights(HUF_dtable *const table, - const u8 *const weights, - const int num_symbs); - -/// Free the malloc'ed parts of a decoding table -static void HUF_free_dtable(HUF_dtable *const dtable); -/*** END HUFFMAN PRIMITIVES ***********/ - -/*** FSE PRIMITIVES *******************/ -/// For more description of FSE see -/// https://github.com/Cyan4973/FiniteStateEntropy/ - -// FSE table decoding uses exponential memory, so limit the maximum accuracy -#define FSE_MAX_ACCURACY_LOG (15) -// Limit the maximum number of symbols so they can be stored in a single byte -#define FSE_MAX_SYMBS (256) - -/// The tables needed to decode FSE encoded streams -typedef struct { - u8 *symbols; - u8 *num_bits; - u16 *new_state_base; - int accuracy_log; -} FSE_dtable; - -/// Return the symbol for the current state -static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable, - const u16 state); -/// Read the number of bits necessary to update state, update, and shift offset -/// back to reflect the bits read -static inline void FSE_update_state(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset); - -/// Combine peek and update: decode a symbol and update the state -static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset); - -/// Read bits from the stream to initialize the state and shift offset back -static inline void FSE_init_state(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset); - -/// Decompress two interleaved bitstreams (e.g. compressed Huffman weights) -/// using an FSE decoding table. `src_len` must be the exact length of the -/// block. -static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable, - ostream_t *const out, - istream_t *const in); - -/// Initialize a decoding table using normalized frequencies. -static void FSE_init_dtable(FSE_dtable *const dtable, - const i16 *const norm_freqs, const int num_symbs, - const int accuracy_log); - -/// Decode an FSE header as defined in the Zstandard format specification and -/// use the decoded frequencies to initialize a decoding table. -static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in, - const int max_accuracy_log); - -/// Initialize an FSE table that will always return the same symbol and consume -/// 0 bits per symbol, to be used for RLE mode in sequence commands -static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb); - -/// Free the malloc'ed parts of a decoding table -static void FSE_free_dtable(FSE_dtable *const dtable); -/*** END FSE PRIMITIVES ***************/ - -/******* END IMPLEMENTATION PRIMITIVE PROTOTYPES ******************************/ - -/******* ZSTD HELPER STRUCTS AND PROTOTYPES ***********************************/ - -/// A small structure that can be reused in various places that need to access -/// frame header information -typedef struct { - // The size of window that we need to be able to contiguously store for - // references - size_t window_size; - // The total output size of this compressed frame - size_t frame_content_size; - - // The dictionary id if this frame uses one - u32 dictionary_id; - - // Whether or not the content of this frame has a checksum - int content_checksum_flag; - // Whether or not the output for this frame is in a single segment - int single_segment_flag; -} frame_header_t; - -/// The context needed to decode blocks in a frame -typedef struct { - frame_header_t header; - - // The total amount of data available for backreferences, to determine if an - // offset too large to be correct - size_t current_total_output; - - const u8 *dict_content; - size_t dict_content_len; - - // Entropy encoding tables so they can be repeated by future blocks instead - // of retransmitting - HUF_dtable literals_dtable; - FSE_dtable ll_dtable; - FSE_dtable ml_dtable; - FSE_dtable of_dtable; - - // The last 3 offsets for the special "repeat offsets". - u64 previous_offsets[3]; -} frame_context_t; - -/// The decoded contents of a dictionary so that it doesn't have to be repeated -/// for each frame that uses it -struct dictionary_s { - // Entropy tables - HUF_dtable literals_dtable; - FSE_dtable ll_dtable; - FSE_dtable ml_dtable; - FSE_dtable of_dtable; - - // Raw content for backreferences - u8 *content; - size_t content_size; - - // Offset history to prepopulate the frame's history - u64 previous_offsets[3]; - - u32 dictionary_id; -}; - -/// A tuple containing the parts necessary to decode and execute a ZSTD sequence -/// command -typedef struct { - u32 literal_length; - u32 match_length; - u32 offset; -} sequence_command_t; - -/// The decoder works top-down, starting at the high level like Zstd frames, and -/// working down to lower more technical levels such as blocks, literals, and -/// sequences. The high-level functions roughly follow the outline of the -/// format specification: -/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md - -/// Before the implementation of each high-level function declared here, the -/// prototypes for their helper functions are defined and explained - -/// Decode a single Zstd frame, or error if the input is not a valid frame. -/// Accepts a dict argument, which may be NULL indicating no dictionary. -/// See -/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame-concatenation -static void decode_frame(ostream_t *const out, istream_t *const in, - const dictionary_t *const dict); - -// Decode data in a compressed block -static void decompress_block(frame_context_t *const ctx, ostream_t *const out, - istream_t *const in); - -// Decode the literals section of a block -static size_t decode_literals(frame_context_t *const ctx, istream_t *const in, - u8 **const literals); - -// Decode the sequences part of a block -static size_t decode_sequences(frame_context_t *const ctx, istream_t *const in, - sequence_command_t **const sequences); - -// Execute the decoded sequences on the literals block -static void execute_sequences(frame_context_t *const ctx, ostream_t *const out, - const u8 *const literals, - const size_t literals_len, - const sequence_command_t *const sequences, - const size_t num_sequences); - -// Copies literals and returns the total literal length that was copied -static u32 copy_literals(const size_t seq, istream_t *litstream, - ostream_t *const out); - -// Given an offset code from a sequence command (either an actual offset value -// or an index for previous offset), computes the correct offset and updates -// the offset history -static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist); - -// Given an offset, match length, and total output, as well as the frame -// context for the dictionary, determines if the dictionary is used and -// executes the copy operation -static void execute_match_copy(frame_context_t *const ctx, size_t offset, - size_t match_length, size_t total_output, - ostream_t *const out); - -/******* END ZSTD HELPER STRUCTS AND PROTOTYPES *******************************/ - -size_t ZSTD_decompress(void *const dst, const size_t dst_len, - const void *const src, const size_t src_len) { - dictionary_t* const uninit_dict = create_dictionary(); - size_t const decomp_size = ZSTD_decompress_with_dict(dst, dst_len, src, - src_len, uninit_dict); - free_dictionary(uninit_dict); - return decomp_size; -} - -size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len, - const void *const src, const size_t src_len, - dictionary_t* parsed_dict) { - - istream_t in = IO_make_istream(src, src_len); - ostream_t out = IO_make_ostream(dst, dst_len); - - // "A content compressed by Zstandard is transformed into a Zstandard frame. - // Multiple frames can be appended into a single file or stream. A frame is - // totally independent, has a defined beginning and end, and a set of - // parameters which tells the decoder how to decompress it." - - /* this decoder assumes decompression of a single frame */ - decode_frame(&out, &in, parsed_dict); - - return (size_t)(out.ptr - (u8 *)dst); -} - -/******* FRAME DECODING ******************************************************/ - -static void decode_data_frame(ostream_t *const out, istream_t *const in, - const dictionary_t *const dict); -static void init_frame_context(frame_context_t *const context, - istream_t *const in, - const dictionary_t *const dict); -static void free_frame_context(frame_context_t *const context); -static void parse_frame_header(frame_header_t *const header, - istream_t *const in); -static void frame_context_apply_dict(frame_context_t *const ctx, - const dictionary_t *const dict); - -static void decompress_data(frame_context_t *const ctx, ostream_t *const out, - istream_t *const in); - -static void decode_frame(ostream_t *const out, istream_t *const in, - const dictionary_t *const dict) { - const u32 magic_number = (u32)IO_read_bits(in, 32); - if (magic_number == ZSTD_MAGIC_NUMBER) { - // ZSTD frame - decode_data_frame(out, in, dict); - - return; - } - - // not a real frame or a skippable frame - ERROR("Tried to decode non-ZSTD frame"); -} - -/// Decode a frame that contains compressed data. Not all frames do as there -/// are skippable frames. -/// See -/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#general-structure-of-zstandard-frame-format -static void decode_data_frame(ostream_t *const out, istream_t *const in, - const dictionary_t *const dict) { - frame_context_t ctx; - - // Initialize the context that needs to be carried from block to block - init_frame_context(&ctx, in, dict); - - if (ctx.header.frame_content_size != 0 && - ctx.header.frame_content_size > out->len) { - OUT_SIZE(); - } - - decompress_data(&ctx, out, in); - - free_frame_context(&ctx); -} - -/// Takes the information provided in the header and dictionary, and initializes -/// the context for this frame -static void init_frame_context(frame_context_t *const context, - istream_t *const in, - const dictionary_t *const dict) { - // Most fields in context are correct when initialized to 0 - memset(context, 0, sizeof(frame_context_t)); - - // Parse data from the frame header - parse_frame_header(&context->header, in); - - // Set up the offset history for the repeat offset commands - context->previous_offsets[0] = 1; - context->previous_offsets[1] = 4; - context->previous_offsets[2] = 8; - - // Apply details from the dict if it exists - frame_context_apply_dict(context, dict); -} - -static void free_frame_context(frame_context_t *const context) { - HUF_free_dtable(&context->literals_dtable); - - FSE_free_dtable(&context->ll_dtable); - FSE_free_dtable(&context->ml_dtable); - FSE_free_dtable(&context->of_dtable); - - memset(context, 0, sizeof(frame_context_t)); -} - -static void parse_frame_header(frame_header_t *const header, - istream_t *const in) { - // "The first header's byte is called the Frame_Header_Descriptor. It tells - // which other fields are present. Decoding this byte is enough to tell the - // size of Frame_Header. - // - // Bit number Field name - // 7-6 Frame_Content_Size_flag - // 5 Single_Segment_flag - // 4 Unused_bit - // 3 Reserved_bit - // 2 Content_Checksum_flag - // 1-0 Dictionary_ID_flag" - const u8 descriptor = (u8)IO_read_bits(in, 8); - - // decode frame header descriptor into flags - const u8 frame_content_size_flag = descriptor >> 6; - const u8 single_segment_flag = (descriptor >> 5) & 1; - const u8 reserved_bit = (descriptor >> 3) & 1; - const u8 content_checksum_flag = (descriptor >> 2) & 1; - const u8 dictionary_id_flag = descriptor & 3; - - if (reserved_bit != 0) { - CORRUPTION(); - } - - header->single_segment_flag = single_segment_flag; - header->content_checksum_flag = content_checksum_flag; - - // decode window size - if (!single_segment_flag) { - // "Provides guarantees on maximum back-reference distance that will be - // used within compressed data. This information is important for - // decoders to allocate enough memory. - // - // Bit numbers 7-3 2-0 - // Field name Exponent Mantissa" - u8 window_descriptor = (u8)IO_read_bits(in, 8); - u8 exponent = window_descriptor >> 3; - u8 mantissa = window_descriptor & 7; - - // Use the algorithm from the specification to compute window size - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor - size_t window_base = (size_t)1 << (10 + exponent); - size_t window_add = (window_base / 8) * mantissa; - header->window_size = window_base + window_add; - } - - // decode dictionary id if it exists - if (dictionary_id_flag) { - // "This is a variable size field, which contains the ID of the - // dictionary required to properly decode the frame. Note that this - // field is optional. When it's not present, it's up to the caller to - // make sure it uses the correct dictionary. Format is little-endian." - const int bytes_array[] = {0, 1, 2, 4}; - const int bytes = bytes_array[dictionary_id_flag]; - - header->dictionary_id = (u32)IO_read_bits(in, bytes * 8); - } else { - header->dictionary_id = 0; - } - - // decode frame content size if it exists - if (single_segment_flag || frame_content_size_flag) { - // "This is the original (uncompressed) size. This information is - // optional. The Field_Size is provided according to value of - // Frame_Content_Size_flag. The Field_Size can be equal to 0 (not - // present), 1, 2, 4 or 8 bytes. Format is little-endian." - // - // if frame_content_size_flag == 0 but single_segment_flag is set, we - // still have a 1 byte field - const int bytes_array[] = {1, 2, 4, 8}; - const int bytes = bytes_array[frame_content_size_flag]; - - header->frame_content_size = IO_read_bits(in, bytes * 8); - if (bytes == 2) { - // "When Field_Size is 2, the offset of 256 is added." - header->frame_content_size += 256; - } - } else { - header->frame_content_size = 0; - } - - if (single_segment_flag) { - // "The Window_Descriptor byte is optional. It is absent when - // Single_Segment_flag is set. In this case, the maximum back-reference - // distance is the content size itself, which can be any value from 1 to - // 2^64-1 bytes (16 EB)." - header->window_size = header->frame_content_size; - } -} - -/// Decompress the data from a frame block by block -static void decompress_data(frame_context_t *const ctx, ostream_t *const out, - istream_t *const in) { - // "A frame encapsulates one or multiple blocks. Each block can be - // compressed or not, and has a guaranteed maximum content size, which - // depends on frame parameters. Unlike frames, each block depends on - // previous blocks for proper decoding. However, each block can be - // decompressed without waiting for its successor, allowing streaming - // operations." - int last_block = 0; - do { - // "Last_Block - // - // The lowest bit signals if this block is the last one. Frame ends - // right after this block. - // - // Block_Type and Block_Size - // - // The next 2 bits represent the Block_Type, while the remaining 21 bits - // represent the Block_Size. Format is little-endian." - last_block = (int)IO_read_bits(in, 1); - const int block_type = (int)IO_read_bits(in, 2); - const size_t block_len = IO_read_bits(in, 21); - - switch (block_type) { - case 0: { - // "Raw_Block - this is an uncompressed block. Block_Size is the - // number of bytes to read and copy." - const u8 *const read_ptr = IO_get_read_ptr(in, block_len); - u8 *const write_ptr = IO_get_write_ptr(out, block_len); - - // Copy the raw data into the output - memcpy(write_ptr, read_ptr, block_len); - - ctx->current_total_output += block_len; - break; - } - case 1: { - // "RLE_Block - this is a single byte, repeated N times. In which - // case, Block_Size is the size to regenerate, while the - // "compressed" block is just 1 byte (the byte to repeat)." - const u8 *const read_ptr = IO_get_read_ptr(in, 1); - u8 *const write_ptr = IO_get_write_ptr(out, block_len); - - // Copy `block_len` copies of `read_ptr[0]` to the output - memset(write_ptr, read_ptr[0], block_len); - - ctx->current_total_output += block_len; - break; - } - case 2: { - // "Compressed_Block - this is a Zstandard compressed block, - // detailed in another section of this specification. Block_Size is - // the compressed size. - - // Create a sub-stream for the block - istream_t block_stream = IO_make_sub_istream(in, block_len); - decompress_block(ctx, out, &block_stream); - break; - } - case 3: - // "Reserved - this is not a block. This value cannot be used with - // current version of this specification." - CORRUPTION(); - break; - default: - IMPOSSIBLE(); - } - } while (!last_block); - - if (ctx->header.content_checksum_flag) { - // This program does not support checking the checksum, so skip over it - // if it's present - IO_advance_input(in, 4); - } -} -/******* END FRAME DECODING ***************************************************/ - -/******* BLOCK DECOMPRESSION **************************************************/ -static void decompress_block(frame_context_t *const ctx, ostream_t *const out, - istream_t *const in) { - // "A compressed block consists of 2 sections : - // - // Literals_Section - // Sequences_Section" - - - // Part 1: decode the literals block - u8 *literals = NULL; - const size_t literals_size = decode_literals(ctx, in, &literals); - - // Part 2: decode the sequences block - sequence_command_t *sequences = NULL; - const size_t num_sequences = - decode_sequences(ctx, in, &sequences); - - // Part 3: combine literals and sequence commands to generate output - execute_sequences(ctx, out, literals, literals_size, sequences, - num_sequences); - free(literals); - free(sequences); -} -/******* END BLOCK DECOMPRESSION **********************************************/ - -/******* LITERALS DECODING ****************************************************/ -static size_t decode_literals_simple(istream_t *const in, u8 **const literals, - const int block_type, - const int size_format); -static size_t decode_literals_compressed(frame_context_t *const ctx, - istream_t *const in, - u8 **const literals, - const int block_type, - const int size_format); -static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in); -static void fse_decode_hufweights(ostream_t *weights, istream_t *const in, - int *const num_symbs); - -static size_t decode_literals(frame_context_t *const ctx, istream_t *const in, - u8 **const literals) { - // "Literals can be stored uncompressed or compressed using Huffman prefix - // codes. When compressed, an optional tree description can be present, - // followed by 1 or 4 streams." - // - // "Literals_Section_Header - // - // Header is in charge of describing how literals are packed. It's a - // byte-aligned variable-size bitfield, ranging from 1 to 5 bytes, using - // little-endian convention." - // - // "Literals_Block_Type - // - // This field uses 2 lowest bits of first byte, describing 4 different block - // types" - // - // size_format takes between 1 and 2 bits - int block_type = (int)IO_read_bits(in, 2); - int size_format = (int)IO_read_bits(in, 2); - - if (block_type <= 1) { - // Raw or RLE literals block - return decode_literals_simple(in, literals, block_type, - size_format); - } else { - // Huffman compressed literals - return decode_literals_compressed(ctx, in, literals, block_type, - size_format); - } -} - -/// Decodes literals blocks in raw or RLE form -static size_t decode_literals_simple(istream_t *const in, u8 **const literals, - const int block_type, - const int size_format) { - size_t size; - switch (size_format) { - // These cases are in the form ?0 - // In this case, the ? bit is actually part of the size field - case 0: - case 2: - // "Size_Format uses 1 bit. Regenerated_Size uses 5 bits (0-31)." - IO_rewind_bits(in, 1); - size = IO_read_bits(in, 5); - break; - case 1: - // "Size_Format uses 2 bits. Regenerated_Size uses 12 bits (0-4095)." - size = IO_read_bits(in, 12); - break; - case 3: - // "Size_Format uses 2 bits. Regenerated_Size uses 20 bits (0-1048575)." - size = IO_read_bits(in, 20); - break; - default: - // Size format is in range 0-3 - IMPOSSIBLE(); - } - - if (size > MAX_LITERALS_SIZE) { - CORRUPTION(); - } - - *literals = malloc(size); - if (!*literals) { - BAD_ALLOC(); - } - - switch (block_type) { - case 0: { - // "Raw_Literals_Block - Literals are stored uncompressed." - const u8 *const read_ptr = IO_get_read_ptr(in, size); - memcpy(*literals, read_ptr, size); - break; - } - case 1: { - // "RLE_Literals_Block - Literals consist of a single byte value repeated N times." - const u8 *const read_ptr = IO_get_read_ptr(in, 1); - memset(*literals, read_ptr[0], size); - break; - } - default: - IMPOSSIBLE(); - } - - return size; -} - -/// Decodes Huffman compressed literals -static size_t decode_literals_compressed(frame_context_t *const ctx, - istream_t *const in, - u8 **const literals, - const int block_type, - const int size_format) { - size_t regenerated_size, compressed_size; - // Only size_format=0 has 1 stream, so default to 4 - int num_streams = 4; - switch (size_format) { - case 0: - // "A single stream. Both Compressed_Size and Regenerated_Size use 10 - // bits (0-1023)." - num_streams = 1; - // Fall through as it has the same size format - /* fallthrough */ - case 1: - // "4 streams. Both Compressed_Size and Regenerated_Size use 10 bits - // (0-1023)." - regenerated_size = IO_read_bits(in, 10); - compressed_size = IO_read_bits(in, 10); - break; - case 2: - // "4 streams. Both Compressed_Size and Regenerated_Size use 14 bits - // (0-16383)." - regenerated_size = IO_read_bits(in, 14); - compressed_size = IO_read_bits(in, 14); - break; - case 3: - // "4 streams. Both Compressed_Size and Regenerated_Size use 18 bits - // (0-262143)." - regenerated_size = IO_read_bits(in, 18); - compressed_size = IO_read_bits(in, 18); - break; - default: - // Impossible - IMPOSSIBLE(); - } - if (regenerated_size > MAX_LITERALS_SIZE) { - CORRUPTION(); - } - - *literals = malloc(regenerated_size); - if (!*literals) { - BAD_ALLOC(); - } - - ostream_t lit_stream = IO_make_ostream(*literals, regenerated_size); - istream_t huf_stream = IO_make_sub_istream(in, compressed_size); - - if (block_type == 2) { - // Decode the provided Huffman table - // "This section is only present when Literals_Block_Type type is - // Compressed_Literals_Block (2)." - - HUF_free_dtable(&ctx->literals_dtable); - decode_huf_table(&ctx->literals_dtable, &huf_stream); - } else { - // If the previous Huffman table is being repeated, ensure it exists - if (!ctx->literals_dtable.symbols) { - CORRUPTION(); - } - } - - size_t symbols_decoded; - if (num_streams == 1) { - symbols_decoded = HUF_decompress_1stream(&ctx->literals_dtable, &lit_stream, &huf_stream); - } else { - symbols_decoded = HUF_decompress_4stream(&ctx->literals_dtable, &lit_stream, &huf_stream); - } - - if (symbols_decoded != regenerated_size) { - CORRUPTION(); - } - - return regenerated_size; -} - -// Decode the Huffman table description -static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in) { - // "All literal values from zero (included) to last present one (excluded) - // are represented by Weight with values from 0 to Max_Number_of_Bits." - - // "This is a single byte value (0-255), which describes how to decode the list of weights." - const u8 header = IO_read_bits(in, 8); - - u8 weights[HUF_MAX_SYMBS]; - memset(weights, 0, sizeof(weights)); - - int num_symbs; - - if (header >= 128) { - // "This is a direct representation, where each Weight is written - // directly as a 4 bits field (0-15). The full representation occupies - // ((Number_of_Symbols+1)/2) bytes, meaning it uses a last full byte - // even if Number_of_Symbols is odd. Number_of_Symbols = headerByte - - // 127" - num_symbs = header - 127; - const size_t bytes = (num_symbs + 1) / 2; - - const u8 *const weight_src = IO_get_read_ptr(in, bytes); - - for (int i = 0; i < num_symbs; i++) { - // "They are encoded forward, 2 - // weights to a byte with the first weight taking the top four bits - // and the second taking the bottom four (e.g. the following - // operations could be used to read the weights: Weight[0] = - // (Byte[0] >> 4), Weight[1] = (Byte[0] & 0xf), etc.)." - if (i % 2 == 0) { - weights[i] = weight_src[i / 2] >> 4; - } else { - weights[i] = weight_src[i / 2] & 0xf; - } - } - } else { - // The weights are FSE encoded, decode them before we can construct the - // table - istream_t fse_stream = IO_make_sub_istream(in, header); - ostream_t weight_stream = IO_make_ostream(weights, HUF_MAX_SYMBS); - fse_decode_hufweights(&weight_stream, &fse_stream, &num_symbs); - } - - // Construct the table using the decoded weights - HUF_init_dtable_usingweights(dtable, weights, num_symbs); -} - -static void fse_decode_hufweights(ostream_t *weights, istream_t *const in, - int *const num_symbs) { - const int MAX_ACCURACY_LOG = 7; - - FSE_dtable dtable; - - // "An FSE bitstream starts by a header, describing probabilities - // distribution. It will create a Decoding Table. For a list of Huffman - // weights, maximum accuracy is 7 bits." - FSE_decode_header(&dtable, in, MAX_ACCURACY_LOG); - - // Decode the weights - *num_symbs = FSE_decompress_interleaved2(&dtable, weights, in); - - FSE_free_dtable(&dtable); -} -/******* END LITERALS DECODING ************************************************/ - -/******* SEQUENCE DECODING ****************************************************/ -/// The combination of FSE states needed to decode sequences -typedef struct { - FSE_dtable ll_table; - FSE_dtable of_table; - FSE_dtable ml_table; - - u16 ll_state; - u16 of_state; - u16 ml_state; -} sequence_states_t; - -/// Different modes to signal to decode_seq_tables what to do -typedef enum { - seq_literal_length = 0, - seq_offset = 1, - seq_match_length = 2, -} seq_part_t; - -typedef enum { - seq_predefined = 0, - seq_rle = 1, - seq_fse = 2, - seq_repeat = 3, -} seq_mode_t; - -/// The predefined FSE distribution tables for `seq_predefined` mode -static const i16 SEQ_LITERAL_LENGTH_DEFAULT_DIST[36] = { - 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, -1, -1, -1, -1}; -static const i16 SEQ_OFFSET_DEFAULT_DIST[29] = { - 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1}; -static const i16 SEQ_MATCH_LENGTH_DEFAULT_DIST[53] = { - 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1}; - -/// The sequence decoding baseline and number of additional bits to read/add -/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets -static const u32 SEQ_LITERAL_LENGTH_BASELINES[36] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 18, 20, 22, 24, 28, 32, 40, - 48, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; -static const u8 SEQ_LITERAL_LENGTH_EXTRA_BITS[36] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - -static const u32 SEQ_MATCH_LENGTH_BASELINES[53] = { - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 37, 39, 41, 43, 47, 51, 59, 67, 83, - 99, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539}; -static const u8 SEQ_MATCH_LENGTH_EXTRA_BITS[53] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 2, 2, 3, 3, 4, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - -/// Offset decoding is simpler so we just need a maximum code value -static const u8 SEQ_MAX_CODES[3] = {35, (u8)-1, 52}; - -static void decompress_sequences(frame_context_t *const ctx, - istream_t *const in, - sequence_command_t *const sequences, - const size_t num_sequences); -static sequence_command_t decode_sequence(sequence_states_t *const state, - const u8 *const src, - i64 *const offset, - int lastSequence); -static void decode_seq_table(FSE_dtable *const table, istream_t *const in, - const seq_part_t type, const seq_mode_t mode); - -static size_t decode_sequences(frame_context_t *const ctx, istream_t *in, - sequence_command_t **const sequences) { - // "A compressed block is a succession of sequences . A sequence is a - // literal copy command, followed by a match copy command. A literal copy - // command specifies a length. It is the number of bytes to be copied (or - // extracted) from the literal section. A match copy command specifies an - // offset and a length. The offset gives the position to copy from, which - // can be within a previous block." - - size_t num_sequences; - - // "Number_of_Sequences - // - // This is a variable size field using between 1 and 3 bytes. Let's call its - // first byte byte0." - u8 header = IO_read_bits(in, 8); - if (header < 128) { - // "Number_of_Sequences = byte0 . Uses 1 byte." - num_sequences = header; - } else if (header < 255) { - // "Number_of_Sequences = ((byte0-128) << 8) + byte1 . Uses 2 bytes." - num_sequences = ((header - 128) << 8) + IO_read_bits(in, 8); - } else { - // "Number_of_Sequences = byte1 + (byte2<<8) + 0x7F00 . Uses 3 bytes." - num_sequences = IO_read_bits(in, 16) + 0x7F00; - } - - if (num_sequences == 0) { - // "There are no sequences. The sequence section stops there." - *sequences = NULL; - return 0; - } - - *sequences = malloc(num_sequences * sizeof(sequence_command_t)); - if (!*sequences) { - BAD_ALLOC(); - } - - decompress_sequences(ctx, in, *sequences, num_sequences); - return num_sequences; -} - -/// Decompress the FSE encoded sequence commands -static void decompress_sequences(frame_context_t *const ctx, istream_t *in, - sequence_command_t *const sequences, - const size_t num_sequences) { - // "The Sequences_Section regroup all symbols required to decode commands. - // There are 3 symbol types : literals lengths, offsets and match lengths. - // They are encoded together, interleaved, in a single bitstream." - - // "Symbol compression modes - // - // This is a single byte, defining the compression mode of each symbol - // type." - // - // Bit number : Field name - // 7-6 : Literals_Lengths_Mode - // 5-4 : Offsets_Mode - // 3-2 : Match_Lengths_Mode - // 1-0 : Reserved - u8 compression_modes = IO_read_bits(in, 8); - - if ((compression_modes & 3) != 0) { - // Reserved bits set - CORRUPTION(); - } - - // "Following the header, up to 3 distribution tables can be described. When - // present, they are in this order : - // - // Literals lengths - // Offsets - // Match Lengths" - // Update the tables we have stored in the context - decode_seq_table(&ctx->ll_dtable, in, seq_literal_length, - (compression_modes >> 6) & 3); - - decode_seq_table(&ctx->of_dtable, in, seq_offset, - (compression_modes >> 4) & 3); - - decode_seq_table(&ctx->ml_dtable, in, seq_match_length, - (compression_modes >> 2) & 3); - - - sequence_states_t states; - - // Initialize the decoding tables - { - states.ll_table = ctx->ll_dtable; - states.of_table = ctx->of_dtable; - states.ml_table = ctx->ml_dtable; - } - - const size_t len = IO_istream_len(in); - const u8 *const src = IO_get_read_ptr(in, len); - - // "After writing the last bit containing information, the compressor writes - // a single 1-bit and then fills the byte with 0-7 0 bits of padding." - const int padding = 8 - highest_set_bit(src[len - 1]); - // The offset starts at the end because FSE streams are read backwards - i64 bit_offset = (i64)(len * 8 - (size_t)padding); - - // "The bitstream starts with initial state values, each using the required - // number of bits in their respective accuracy, decoded previously from - // their normalized distribution. - // - // It starts by Literals_Length_State, followed by Offset_State, and finally - // Match_Length_State." - FSE_init_state(&states.ll_table, &states.ll_state, src, &bit_offset); - FSE_init_state(&states.of_table, &states.of_state, src, &bit_offset); - FSE_init_state(&states.ml_table, &states.ml_state, src, &bit_offset); - - for (size_t i = 0; i < num_sequences; i++) { - // Decode sequences one by one - sequences[i] = decode_sequence(&states, src, &bit_offset, i==num_sequences-1); - } - - if (bit_offset != 0) { - CORRUPTION(); - } -} - -// Decode a single sequence and update the state -static sequence_command_t decode_sequence(sequence_states_t *const states, - const u8 *const src, - i64 *const offset, - int lastSequence) { - // "Each symbol is a code in its own context, which specifies Baseline and - // Number_of_Bits to add. Codes are FSE compressed, and interleaved with raw - // additional bits in the same bitstream." - - // Decode symbols, but don't update states - const u8 of_code = FSE_peek_symbol(&states->of_table, states->of_state); - const u8 ll_code = FSE_peek_symbol(&states->ll_table, states->ll_state); - const u8 ml_code = FSE_peek_symbol(&states->ml_table, states->ml_state); - - // Offset doesn't need a max value as it's not decoded using a table - if (ll_code > SEQ_MAX_CODES[seq_literal_length] || - ml_code > SEQ_MAX_CODES[seq_match_length]) { - CORRUPTION(); - } - - // Read the interleaved bits - sequence_command_t seq; - // "Decoding starts by reading the Number_of_Bits required to decode Offset. - // It then does the same for Match_Length, and then for Literals_Length." - seq.offset = ((u32)1 << of_code) + STREAM_read_bits(src, of_code, offset); - - seq.match_length = - SEQ_MATCH_LENGTH_BASELINES[ml_code] + - STREAM_read_bits(src, SEQ_MATCH_LENGTH_EXTRA_BITS[ml_code], offset); - - seq.literal_length = - SEQ_LITERAL_LENGTH_BASELINES[ll_code] + - STREAM_read_bits(src, SEQ_LITERAL_LENGTH_EXTRA_BITS[ll_code], offset); - - // "If it is not the last sequence in the block, the next operation is to - // update states. Using the rules pre-calculated in the decoding tables, - // Literals_Length_State is updated, followed by Match_Length_State, and - // then Offset_State." - // If the stream is complete don't read bits to update state - if (!lastSequence) { - FSE_update_state(&states->ll_table, &states->ll_state, src, offset); - FSE_update_state(&states->ml_table, &states->ml_state, src, offset); - FSE_update_state(&states->of_table, &states->of_state, src, offset); - } - - return seq; -} - -/// Given a sequence part and table mode, decode the FSE distribution -/// Errors if the mode is `seq_repeat` without a pre-existing table in `table` -static void decode_seq_table(FSE_dtable *const table, istream_t *const in, - const seq_part_t type, const seq_mode_t mode) { - // Constant arrays indexed by seq_part_t - const i16 *const default_distributions[] = {SEQ_LITERAL_LENGTH_DEFAULT_DIST, - SEQ_OFFSET_DEFAULT_DIST, - SEQ_MATCH_LENGTH_DEFAULT_DIST}; - const size_t default_distribution_lengths[] = {36, 29, 53}; - const size_t default_distribution_accuracies[] = {6, 5, 6}; - - const size_t max_accuracies[] = {9, 8, 9}; - - if (mode != seq_repeat) { - // Free old one before overwriting - FSE_free_dtable(table); - } - - switch (mode) { - case seq_predefined: { - // "Predefined_Mode : uses a predefined distribution table." - const i16 *distribution = default_distributions[type]; - const size_t symbs = default_distribution_lengths[type]; - const size_t accuracy_log = default_distribution_accuracies[type]; - - FSE_init_dtable(table, distribution, symbs, accuracy_log); - break; - } - case seq_rle: { - // "RLE_Mode : it's a single code, repeated Number_of_Sequences times." - const u8 symb = IO_get_read_ptr(in, 1)[0]; - FSE_init_dtable_rle(table, symb); - break; - } - case seq_fse: { - // "FSE_Compressed_Mode : standard FSE compression. A distribution table - // will be present " - FSE_decode_header(table, in, max_accuracies[type]); - break; - } - case seq_repeat: - // "Repeat_Mode : reuse distribution table from previous compressed - // block." - // Nothing to do here, table will be unchanged - if (!table->symbols) { - // This mode is invalid if we don't already have a table - CORRUPTION(); - } - break; - default: - // Impossible, as mode is from 0-3 - IMPOSSIBLE(); - break; - } - -} -/******* END SEQUENCE DECODING ************************************************/ - -/******* SEQUENCE EXECUTION ***************************************************/ -static void execute_sequences(frame_context_t *const ctx, ostream_t *const out, - const u8 *const literals, - const size_t literals_len, - const sequence_command_t *const sequences, - const size_t num_sequences) { - istream_t litstream = IO_make_istream(literals, literals_len); - - u64 *const offset_hist = ctx->previous_offsets; - size_t total_output = ctx->current_total_output; - - for (size_t i = 0; i < num_sequences; i++) { - const sequence_command_t seq = sequences[i]; - { - const u32 literals_size = copy_literals(seq.literal_length, &litstream, out); - total_output += literals_size; - } - - size_t const offset = compute_offset(seq, offset_hist); - - size_t const match_length = seq.match_length; - - execute_match_copy(ctx, offset, match_length, total_output, out); - - total_output += match_length; - } - - // Copy any leftover literals - { - size_t len = IO_istream_len(&litstream); - copy_literals(len, &litstream, out); - total_output += len; - } - - ctx->current_total_output = total_output; -} - -static u32 copy_literals(const size_t literal_length, istream_t *litstream, - ostream_t *const out) { - // If the sequence asks for more literals than are left, the - // sequence must be corrupted - if (literal_length > IO_istream_len(litstream)) { - CORRUPTION(); - } - - u8 *const write_ptr = IO_get_write_ptr(out, literal_length); - const u8 *const read_ptr = - IO_get_read_ptr(litstream, literal_length); - // Copy literals to output - memcpy(write_ptr, read_ptr, literal_length); - - return literal_length; -} - -static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist) { - size_t offset; - // Offsets are special, we need to handle the repeat offsets - if (seq.offset <= 3) { - // "The first 3 values define a repeated offset and we will call - // them Repeated_Offset1, Repeated_Offset2, and Repeated_Offset3. - // They are sorted in recency order, with Repeated_Offset1 meaning - // 'most recent one'". - - // Use 0 indexing for the array - u32 idx = seq.offset - 1; - if (seq.literal_length == 0) { - // "There is an exception though, when current sequence's - // literals length is 0. In this case, repeated offsets are - // shifted by one, so Repeated_Offset1 becomes Repeated_Offset2, - // Repeated_Offset2 becomes Repeated_Offset3, and - // Repeated_Offset3 becomes Repeated_Offset1 - 1_byte." - idx++; - } - - if (idx == 0) { - offset = offset_hist[0]; - } else { - // If idx == 3 then literal length was 0 and the offset was 3, - // as per the exception listed above - offset = idx < 3 ? offset_hist[idx] : offset_hist[0] - 1; - - // If idx == 1 we don't need to modify offset_hist[2], since - // we're using the second-most recent code - if (idx > 1) { - offset_hist[2] = offset_hist[1]; - } - offset_hist[1] = offset_hist[0]; - offset_hist[0] = offset; - } - } else { - // When it's not a repeat offset: - // "if (Offset_Value > 3) offset = Offset_Value - 3;" - offset = seq.offset - 3; - - // Shift back history - offset_hist[2] = offset_hist[1]; - offset_hist[1] = offset_hist[0]; - offset_hist[0] = offset; - } - return offset; -} - -static void execute_match_copy(frame_context_t *const ctx, size_t offset, - size_t match_length, size_t total_output, - ostream_t *const out) { - u8 *write_ptr = IO_get_write_ptr(out, match_length); - if (total_output <= ctx->header.window_size) { - // In this case offset might go back into the dictionary - if (offset > total_output + ctx->dict_content_len) { - // The offset goes beyond even the dictionary - CORRUPTION(); - } - - if (offset > total_output) { - // "The rest of the dictionary is its content. The content act - // as a "past" in front of data to compress or decompress, so it - // can be referenced in sequence commands." - const size_t dict_copy = - MIN(offset - total_output, match_length); - const size_t dict_offset = - ctx->dict_content_len - (offset - total_output); - - memcpy(write_ptr, ctx->dict_content + dict_offset, dict_copy); - write_ptr += dict_copy; - match_length -= dict_copy; - } - } else if (offset > ctx->header.window_size) { - CORRUPTION(); - } - - // We must copy byte by byte because the match length might be larger - // than the offset - // ex: if the output so far was "abc", a command with offset=3 and - // match_length=6 would produce "abcabcabc" as the new output - for (size_t j = 0; j < match_length; j++) { - *write_ptr = *(write_ptr - offset); - write_ptr++; - } -} -/******* END SEQUENCE EXECUTION ***********************************************/ - -/******* OUTPUT SIZE COUNTING *************************************************/ -/// Get the decompressed size of an input stream so memory can be allocated in -/// advance. -/// This implementation assumes `src` points to a single ZSTD-compressed frame -size_t ZSTD_get_decompressed_size(const void *src, const size_t src_len) { - istream_t in = IO_make_istream(src, src_len); - - // get decompressed size from ZSTD frame header - { - const u32 magic_number = (u32)IO_read_bits(&in, 32); - - if (magic_number == ZSTD_MAGIC_NUMBER) { - // ZSTD frame - frame_header_t header; - parse_frame_header(&header, &in); - - if (header.frame_content_size == 0 && !header.single_segment_flag) { - // Content size not provided, we can't tell - return (size_t)-1; - } - - return header.frame_content_size; - } else { - // not a real frame or skippable frame - ERROR("ZSTD frame magic number did not match"); - } - } -} -/******* END OUTPUT SIZE COUNTING *********************************************/ - -/******* DICTIONARY PARSING ***************************************************/ -dictionary_t* create_dictionary(void) { - dictionary_t* const dict = calloc(1, sizeof(dictionary_t)); - if (!dict) { - BAD_ALLOC(); - } - return dict; -} - -/// Free an allocated dictionary -void free_dictionary(dictionary_t *const dict) { - HUF_free_dtable(&dict->literals_dtable); - FSE_free_dtable(&dict->ll_dtable); - FSE_free_dtable(&dict->of_dtable); - FSE_free_dtable(&dict->ml_dtable); - - free(dict->content); - - memset(dict, 0, sizeof(dictionary_t)); - - free(dict); -} - - -#if !defined(ZDEC_NO_DICTIONARY) -#define DICT_SIZE_ERROR() ERROR("Dictionary size cannot be less than 8 bytes") -#define NULL_SRC() ERROR("Tried to create dictionary with pointer to null src"); - -static void init_dictionary_content(dictionary_t *const dict, - istream_t *const in); - -void parse_dictionary(dictionary_t *const dict, const void *src, - size_t src_len) { - const u8 *byte_src = (const u8 *)src; - memset(dict, 0, sizeof(dictionary_t)); - if (src == NULL) { /* cannot initialize dictionary with null src */ - NULL_SRC(); - } - if (src_len < 8) { - DICT_SIZE_ERROR(); - } - - istream_t in = IO_make_istream(byte_src, src_len); - - const u32 magic_number = IO_read_bits(&in, 32); - if (magic_number != 0xEC30A437) { - // raw content dict - IO_rewind_bits(&in, 32); - init_dictionary_content(dict, &in); - return; - } - - dict->dictionary_id = IO_read_bits(&in, 32); - - // "Entropy_Tables : following the same format as the tables in compressed - // blocks. They are stored in following order : Huffman tables for literals, - // FSE table for offsets, FSE table for match lengths, and FSE table for - // literals lengths. It's finally followed by 3 offset values, populating - // recent offsets (instead of using {1,4,8}), stored in order, 4-bytes - // little-endian each, for a total of 12 bytes. Each recent offset must have - // a value < dictionary size." - decode_huf_table(&dict->literals_dtable, &in); - decode_seq_table(&dict->of_dtable, &in, seq_offset, seq_fse); - decode_seq_table(&dict->ml_dtable, &in, seq_match_length, seq_fse); - decode_seq_table(&dict->ll_dtable, &in, seq_literal_length, seq_fse); - - // Read in the previous offset history - dict->previous_offsets[0] = IO_read_bits(&in, 32); - dict->previous_offsets[1] = IO_read_bits(&in, 32); - dict->previous_offsets[2] = IO_read_bits(&in, 32); - - // Ensure the provided offsets aren't too large - // "Each recent offset must have a value < dictionary size." - for (int i = 0; i < 3; i++) { - if (dict->previous_offsets[i] > src_len) { - ERROR("Dictionary corrupted"); - } - } - - // "Content : The rest of the dictionary is its content. The content act as - // a "past" in front of data to compress or decompress, so it can be - // referenced in sequence commands." - init_dictionary_content(dict, &in); -} - -static void init_dictionary_content(dictionary_t *const dict, - istream_t *const in) { - // Copy in the content - dict->content_size = IO_istream_len(in); - dict->content = malloc(dict->content_size); - if (!dict->content) { - BAD_ALLOC(); - } - - const u8 *const content = IO_get_read_ptr(in, dict->content_size); - - memcpy(dict->content, content, dict->content_size); -} - -static void HUF_copy_dtable(HUF_dtable *const dst, - const HUF_dtable *const src) { - if (src->max_bits == 0) { - memset(dst, 0, sizeof(HUF_dtable)); - return; - } - - const size_t size = (size_t)1 << src->max_bits; - dst->max_bits = src->max_bits; - - dst->symbols = malloc(size); - dst->num_bits = malloc(size); - if (!dst->symbols || !dst->num_bits) { - BAD_ALLOC(); - } - - memcpy(dst->symbols, src->symbols, size); - memcpy(dst->num_bits, src->num_bits, size); -} - -static void FSE_copy_dtable(FSE_dtable *const dst, const FSE_dtable *const src) { - if (src->accuracy_log == 0) { - memset(dst, 0, sizeof(FSE_dtable)); - return; - } - - size_t size = (size_t)1 << src->accuracy_log; - dst->accuracy_log = src->accuracy_log; - - dst->symbols = malloc(size); - dst->num_bits = malloc(size); - dst->new_state_base = malloc(size * sizeof(u16)); - if (!dst->symbols || !dst->num_bits || !dst->new_state_base) { - BAD_ALLOC(); - } - - memcpy(dst->symbols, src->symbols, size); - memcpy(dst->num_bits, src->num_bits, size); - memcpy(dst->new_state_base, src->new_state_base, size * sizeof(u16)); -} - -/// A dictionary acts as initializing values for the frame context before -/// decompression, so we implement it by applying it's predetermined -/// tables and content to the context before beginning decompression -static void frame_context_apply_dict(frame_context_t *const ctx, - const dictionary_t *const dict) { - // If the content pointer is NULL then it must be an empty dict - if (!dict || !dict->content) - return; - - // If the requested dictionary_id is non-zero, the correct dictionary must - // be present - if (ctx->header.dictionary_id != 0 && - ctx->header.dictionary_id != dict->dictionary_id) { - ERROR("Wrong dictionary provided"); - } - - // Copy the dict content to the context for references during sequence - // execution - ctx->dict_content = dict->content; - ctx->dict_content_len = dict->content_size; - - // If it's a formatted dict copy the precomputed tables in so they can - // be used in the table repeat modes - if (dict->dictionary_id != 0) { - // Deep copy the entropy tables so they can be freed independently of - // the dictionary struct - HUF_copy_dtable(&ctx->literals_dtable, &dict->literals_dtable); - FSE_copy_dtable(&ctx->ll_dtable, &dict->ll_dtable); - FSE_copy_dtable(&ctx->of_dtable, &dict->of_dtable); - FSE_copy_dtable(&ctx->ml_dtable, &dict->ml_dtable); - - // Copy the repeated offsets - memcpy(ctx->previous_offsets, dict->previous_offsets, - sizeof(ctx->previous_offsets)); - } -} - -#else // ZDEC_NO_DICTIONARY is defined - -static void frame_context_apply_dict(frame_context_t *const ctx, - const dictionary_t *const dict) { - (void)ctx; - if (dict && dict->content) ERROR("dictionary not supported"); -} - -#endif -/******* END DICTIONARY PARSING ***********************************************/ - -/******* IO STREAM OPERATIONS *************************************************/ - -/// Reads `num` bits from a bitstream, and updates the internal offset -static inline u64 IO_read_bits(istream_t *const in, const int num_bits) { - if (num_bits > 64 || num_bits <= 0) { - ERROR("Attempt to read an invalid number of bits"); - } - - const size_t bytes = (num_bits + in->bit_offset + 7) / 8; - const size_t full_bytes = (num_bits + in->bit_offset) / 8; - if (bytes > in->len) { - INP_SIZE(); - } - - const u64 result = read_bits_LE(in->ptr, num_bits, in->bit_offset); - - in->bit_offset = (num_bits + in->bit_offset) % 8; - in->ptr += full_bytes; - in->len -= full_bytes; - - return result; -} - -/// If a non-zero number of bits have been read from the current byte, advance -/// the offset to the next byte -static inline void IO_rewind_bits(istream_t *const in, int num_bits) { - if (num_bits < 0) { - ERROR("Attempting to rewind stream by a negative number of bits"); - } - - // move the offset back by `num_bits` bits - const int new_offset = in->bit_offset - num_bits; - // determine the number of whole bytes we have to rewind, rounding up to an - // integer number (e.g. if `new_offset == -5`, `bytes == 1`) - const i64 bytes = -(new_offset - 7) / 8; - - in->ptr -= bytes; - in->len += bytes; - // make sure the resulting `bit_offset` is positive, as mod in C does not - // convert numbers from negative to positive (e.g. -22 % 8 == -6) - in->bit_offset = ((new_offset % 8) + 8) % 8; -} - -/// If the remaining bits in a byte will be unused, advance to the end of the -/// byte -static inline void IO_align_stream(istream_t *const in) { - if (in->bit_offset != 0) { - if (in->len == 0) { - INP_SIZE(); - } - in->ptr++; - in->len--; - in->bit_offset = 0; - } -} - -/// Write the given byte into the output stream -static inline void IO_write_byte(ostream_t *const out, u8 symb) { - if (out->len == 0) { - OUT_SIZE(); - } - - out->ptr[0] = symb; - out->ptr++; - out->len--; -} - -/// Returns the number of bytes left to be read in this stream. The stream must -/// be byte aligned. -static inline size_t IO_istream_len(const istream_t *const in) { - return in->len; -} - -/// Returns a pointer where `len` bytes can be read, and advances the internal -/// state. The stream must be byte aligned. -static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len) { - if (len > in->len) { - INP_SIZE(); - } - if (in->bit_offset != 0) { - ERROR("Attempting to operate on a non-byte aligned stream"); - } - const u8 *const ptr = in->ptr; - in->ptr += len; - in->len -= len; - - return ptr; -} -/// Returns a pointer to write `len` bytes to, and advances the internal state -static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len) { - if (len > out->len) { - OUT_SIZE(); - } - u8 *const ptr = out->ptr; - out->ptr += len; - out->len -= len; - - return ptr; -} - -/// Advance the inner state by `len` bytes -static inline void IO_advance_input(istream_t *const in, size_t len) { - if (len > in->len) { - INP_SIZE(); - } - if (in->bit_offset != 0) { - ERROR("Attempting to operate on a non-byte aligned stream"); - } - - in->ptr += len; - in->len -= len; -} - -/// Returns an `ostream_t` constructed from the given pointer and length -static inline ostream_t IO_make_ostream(u8 *out, size_t len) { - return (ostream_t) { out, len }; -} - -/// Returns an `istream_t` constructed from the given pointer and length -static inline istream_t IO_make_istream(const u8 *in, size_t len) { - return (istream_t) { in, len, 0 }; -} - -/// Returns an `istream_t` with the same base as `in`, and length `len` -/// Then, advance `in` to account for the consumed bytes -/// `in` must be byte aligned -static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len) { - // Consume `len` bytes of the parent stream - const u8 *const ptr = IO_get_read_ptr(in, len); - - // Make a substream using the pointer to those `len` bytes - return IO_make_istream(ptr, len); -} -/******* END IO STREAM OPERATIONS *********************************************/ - -/******* BITSTREAM OPERATIONS *************************************************/ -/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits -static inline u64 read_bits_LE(const u8 *src, const int num_bits, - const size_t offset) { - if (num_bits > 64) { - ERROR("Attempt to read an invalid number of bits"); - } - - // Skip over bytes that aren't in range - src += offset / 8; - size_t bit_offset = offset % 8; - u64 res = 0; - - int shift = 0; - int left = num_bits; - while (left > 0) { - u64 mask = left >= 8 ? 0xff : (((u64)1 << left) - 1); - // Read the next byte, shift it to account for the offset, and then mask - // out the top part if we don't need all the bits - res += (((u64)*src++ >> bit_offset) & mask) << shift; - shift += 8 - bit_offset; - left -= 8 - bit_offset; - bit_offset = 0; - } - - return res; -} - -/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so -/// it updates `offset` to `offset - bits`, and then reads `bits` bits from -/// `src + offset`. If the offset becomes negative, the extra bits at the -/// bottom are filled in with `0` bits instead of reading from before `src`. -static inline u64 STREAM_read_bits(const u8 *const src, const int bits, - i64 *const offset) { - *offset = *offset - bits; - size_t actual_off = *offset; - size_t actual_bits = bits; - // Don't actually read bits from before the start of src, so if `*offset < - // 0` fix actual_off and actual_bits to reflect the quantity to read - if (*offset < 0) { - actual_bits += *offset; - actual_off = 0; - } - u64 res = read_bits_LE(src, actual_bits, actual_off); - - if (*offset < 0) { - // Fill in the bottom "overflowed" bits with 0's - res = -*offset >= 64 ? 0 : (res << -*offset); - } - return res; -} -/******* END BITSTREAM OPERATIONS *********************************************/ - -/******* BIT COUNTING OPERATIONS **********************************************/ -/// Returns `x`, where `2^x` is the largest power of 2 less than or equal to -/// `num`, or `-1` if `num == 0`. -static inline int highest_set_bit(const u64 num) { - for (int i = 63; i >= 0; i--) { - if (((u64)1 << i) <= num) { - return i; - } - } - return -1; -} -/******* END BIT COUNTING OPERATIONS ******************************************/ - -/******* HUFFMAN PRIMITIVES ***************************************************/ -static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset) { - // Look up the symbol and number of bits to read - const u8 symb = dtable->symbols[*state]; - const u8 bits = dtable->num_bits[*state]; - const u16 rest = STREAM_read_bits(src, bits, offset); - // Shift `bits` bits out of the state, keeping the low order bits that - // weren't necessary to determine this symbol. Then add in the new bits - // read from the stream. - *state = ((*state << bits) + rest) & (((u16)1 << dtable->max_bits) - 1); - - return symb; -} - -static inline void HUF_init_state(const HUF_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset) { - // Read in a full `dtable->max_bits` bits to initialize the state - const u8 bits = dtable->max_bits; - *state = STREAM_read_bits(src, bits, offset); -} - -static size_t HUF_decompress_1stream(const HUF_dtable *const dtable, - ostream_t *const out, - istream_t *const in) { - const size_t len = IO_istream_len(in); - if (len == 0) { - INP_SIZE(); - } - const u8 *const src = IO_get_read_ptr(in, len); - - // "Each bitstream must be read backward, that is starting from the end down - // to the beginning. Therefore it's necessary to know the size of each - // bitstream. - // - // It's also necessary to know exactly which bit is the latest. This is - // detected by a final bit flag : the highest bit of latest byte is a - // final-bit-flag. Consequently, a last byte of 0 is not possible. And the - // final-bit-flag itself is not part of the useful bitstream. Hence, the - // last byte contains between 0 and 7 useful bits." - const int padding = 8 - highest_set_bit(src[len - 1]); - - // Offset starts at the end because HUF streams are read backwards - i64 bit_offset = len * 8 - padding; - u16 state; - - HUF_init_state(dtable, &state, src, &bit_offset); - - size_t symbols_written = 0; - while (bit_offset > -dtable->max_bits) { - // Iterate over the stream, decoding one symbol at a time - IO_write_byte(out, HUF_decode_symbol(dtable, &state, src, &bit_offset)); - symbols_written++; - } - // "The process continues up to reading the required number of symbols per - // stream. If a bitstream is not entirely and exactly consumed, hence - // reaching exactly its beginning position with all bits consumed, the - // decoding process is considered faulty." - - // When all symbols have been decoded, the final state value shouldn't have - // any data from the stream, so it should have "read" dtable->max_bits from - // before the start of `src` - // Therefore `offset`, the edge to start reading new bits at, should be - // dtable->max_bits before the start of the stream - if (bit_offset != -dtable->max_bits) { - CORRUPTION(); - } - - return symbols_written; -} - -static size_t HUF_decompress_4stream(const HUF_dtable *const dtable, - ostream_t *const out, istream_t *const in) { - // "Compressed size is provided explicitly : in the 4-streams variant, - // bitstreams are preceded by 3 unsigned little-endian 16-bits values. Each - // value represents the compressed size of one stream, in order. The last - // stream size is deducted from total compressed size and from previously - // decoded stream sizes" - const size_t csize1 = IO_read_bits(in, 16); - const size_t csize2 = IO_read_bits(in, 16); - const size_t csize3 = IO_read_bits(in, 16); - - istream_t in1 = IO_make_sub_istream(in, csize1); - istream_t in2 = IO_make_sub_istream(in, csize2); - istream_t in3 = IO_make_sub_istream(in, csize3); - istream_t in4 = IO_make_sub_istream(in, IO_istream_len(in)); - - size_t total_output = 0; - // Decode each stream independently for simplicity - // If we wanted to we could decode all 4 at the same time for speed, - // utilizing more execution units - total_output += HUF_decompress_1stream(dtable, out, &in1); - total_output += HUF_decompress_1stream(dtable, out, &in2); - total_output += HUF_decompress_1stream(dtable, out, &in3); - total_output += HUF_decompress_1stream(dtable, out, &in4); - - return total_output; -} - -/// Initializes a Huffman table using canonical Huffman codes -/// For more explanation on canonical Huffman codes see -/// https://www.cs.scranton.edu/~mccloske/courses/cmps340/huff_canonical_dec2015.html -/// Codes within a level are allocated in symbol order (i.e. smaller symbols get -/// earlier codes) -static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits, - const int num_symbs) { - memset(table, 0, sizeof(HUF_dtable)); - if (num_symbs > HUF_MAX_SYMBS) { - ERROR("Too many symbols for Huffman"); - } - - u8 max_bits = 0; - u16 rank_count[HUF_MAX_BITS + 1]; - memset(rank_count, 0, sizeof(rank_count)); - - // Count the number of symbols for each number of bits, and determine the - // depth of the tree - for (int i = 0; i < num_symbs; i++) { - if (bits[i] > HUF_MAX_BITS) { - ERROR("Huffman table depth too large"); - } - max_bits = MAX(max_bits, bits[i]); - rank_count[bits[i]]++; - } - - const size_t table_size = 1 << max_bits; - table->max_bits = max_bits; - table->symbols = malloc(table_size); - table->num_bits = malloc(table_size); - - if (!table->symbols || !table->num_bits) { - free(table->symbols); - free(table->num_bits); - BAD_ALLOC(); - } - - // "Symbols are sorted by Weight. Within same Weight, symbols keep natural - // order. Symbols with a Weight of zero are removed. Then, starting from - // lowest weight, prefix codes are distributed in order." - - u32 rank_idx[HUF_MAX_BITS + 1]; - // Initialize the starting codes for each rank (number of bits) - rank_idx[max_bits] = 0; - for (int i = max_bits; i >= 1; i--) { - rank_idx[i - 1] = rank_idx[i] + rank_count[i] * (1 << (max_bits - i)); - // The entire range takes the same number of bits so we can memset it - memset(&table->num_bits[rank_idx[i]], i, rank_idx[i - 1] - rank_idx[i]); - } - - if (rank_idx[0] != table_size) { - CORRUPTION(); - } - - // Allocate codes and fill in the table - for (int i = 0; i < num_symbs; i++) { - if (bits[i] != 0) { - // Allocate a code for this symbol and set its range in the table - const u16 code = rank_idx[bits[i]]; - // Since the code doesn't care about the bottom `max_bits - bits[i]` - // bits of state, it gets a range that spans all possible values of - // the lower bits - const u16 len = 1 << (max_bits - bits[i]); - memset(&table->symbols[code], i, len); - rank_idx[bits[i]] += len; - } - } -} - -static void HUF_init_dtable_usingweights(HUF_dtable *const table, - const u8 *const weights, - const int num_symbs) { - // +1 because the last weight is not transmitted in the header - if (num_symbs + 1 > HUF_MAX_SYMBS) { - ERROR("Too many symbols for Huffman"); - } - - u8 bits[HUF_MAX_SYMBS]; - - u64 weight_sum = 0; - for (int i = 0; i < num_symbs; i++) { - // Weights are in the same range as bit count - if (weights[i] > HUF_MAX_BITS) { - CORRUPTION(); - } - weight_sum += weights[i] > 0 ? (u64)1 << (weights[i] - 1) : 0; - } - - // Find the first power of 2 larger than the sum - const int max_bits = highest_set_bit(weight_sum) + 1; - const u64 left_over = ((u64)1 << max_bits) - weight_sum; - // If the left over isn't a power of 2, the weights are invalid - if (left_over & (left_over - 1)) { - CORRUPTION(); - } - - // left_over is used to find the last weight as it's not transmitted - // by inverting 2^(weight - 1) we can determine the value of last_weight - const int last_weight = highest_set_bit(left_over) + 1; - - for (int i = 0; i < num_symbs; i++) { - // "Number_of_Bits = Number_of_Bits ? Max_Number_of_Bits + 1 - Weight : 0" - bits[i] = weights[i] > 0 ? (max_bits + 1 - weights[i]) : 0; - } - bits[num_symbs] = - max_bits + 1 - last_weight; // Last weight is always non-zero - - HUF_init_dtable(table, bits, num_symbs + 1); -} - -static void HUF_free_dtable(HUF_dtable *const dtable) { - free(dtable->symbols); - free(dtable->num_bits); - memset(dtable, 0, sizeof(HUF_dtable)); -} -/******* END HUFFMAN PRIMITIVES ***********************************************/ - -/******* FSE PRIMITIVES *******************************************************/ -/// For more description of FSE see -/// https://github.com/Cyan4973/FiniteStateEntropy/ - -/// Allow a symbol to be decoded without updating state -static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable, - const u16 state) { - return dtable->symbols[state]; -} - -/// Consumes bits from the input and uses the current state to determine the -/// next state -static inline void FSE_update_state(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset) { - const u8 bits = dtable->num_bits[*state]; - const u16 rest = STREAM_read_bits(src, bits, offset); - *state = dtable->new_state_base[*state] + rest; -} - -/// Decodes a single FSE symbol and updates the offset -static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset) { - const u8 symb = FSE_peek_symbol(dtable, *state); - FSE_update_state(dtable, state, src, offset); - return symb; -} - -static inline void FSE_init_state(const FSE_dtable *const dtable, - u16 *const state, const u8 *const src, - i64 *const offset) { - // Read in a full `accuracy_log` bits to initialize the state - const u8 bits = dtable->accuracy_log; - *state = STREAM_read_bits(src, bits, offset); -} - -static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable, - ostream_t *const out, - istream_t *const in) { - const size_t len = IO_istream_len(in); - if (len == 0) { - INP_SIZE(); - } - const u8 *const src = IO_get_read_ptr(in, len); - - // "Each bitstream must be read backward, that is starting from the end down - // to the beginning. Therefore it's necessary to know the size of each - // bitstream. - // - // It's also necessary to know exactly which bit is the latest. This is - // detected by a final bit flag : the highest bit of latest byte is a - // final-bit-flag. Consequently, a last byte of 0 is not possible. And the - // final-bit-flag itself is not part of the useful bitstream. Hence, the - // last byte contains between 0 and 7 useful bits." - const int padding = 8 - highest_set_bit(src[len - 1]); - i64 offset = len * 8 - padding; - - u16 state1, state2; - // "The first state (State1) encodes the even indexed symbols, and the - // second (State2) encodes the odd indexes. State1 is initialized first, and - // then State2, and they take turns decoding a single symbol and updating - // their state." - FSE_init_state(dtable, &state1, src, &offset); - FSE_init_state(dtable, &state2, src, &offset); - - // Decode until we overflow the stream - // Since we decode in reverse order, overflowing the stream is offset going - // negative - size_t symbols_written = 0; - while (1) { - // "The number of symbols to decode is determined by tracking bitStream - // overflow condition: If updating state after decoding a symbol would - // require more bits than remain in the stream, it is assumed the extra - // bits are 0. Then, the symbols for each of the final states are - // decoded and the process is complete." - IO_write_byte(out, FSE_decode_symbol(dtable, &state1, src, &offset)); - symbols_written++; - if (offset < 0) { - // There's still a symbol to decode in state2 - IO_write_byte(out, FSE_peek_symbol(dtable, state2)); - symbols_written++; - break; - } - - IO_write_byte(out, FSE_decode_symbol(dtable, &state2, src, &offset)); - symbols_written++; - if (offset < 0) { - // There's still a symbol to decode in state1 - IO_write_byte(out, FSE_peek_symbol(dtable, state1)); - symbols_written++; - break; - } - } - - return symbols_written; -} - -static void FSE_init_dtable(FSE_dtable *const dtable, - const i16 *const norm_freqs, const int num_symbs, - const int accuracy_log) { - if (accuracy_log > FSE_MAX_ACCURACY_LOG) { - ERROR("FSE accuracy too large"); - } - if (num_symbs > FSE_MAX_SYMBS) { - ERROR("Too many symbols for FSE"); - } - - dtable->accuracy_log = accuracy_log; - - const size_t size = (size_t)1 << accuracy_log; - dtable->symbols = malloc(size * sizeof(u8)); - dtable->num_bits = malloc(size * sizeof(u8)); - dtable->new_state_base = malloc(size * sizeof(u16)); - - if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) { - BAD_ALLOC(); - } - - // Used to determine how many bits need to be read for each state, - // and where the destination range should start - // Needs to be u16 because max value is 2 * max number of symbols, - // which can be larger than a byte can store - u16 state_desc[FSE_MAX_SYMBS]; - - // "Symbols are scanned in their natural order for "less than 1" - // probabilities. Symbols with this probability are being attributed a - // single cell, starting from the end of the table. These symbols define a - // full state reset, reading Accuracy_Log bits." - int high_threshold = size; - for (int s = 0; s < num_symbs; s++) { - // Scan for low probability symbols to put at the top - if (norm_freqs[s] == -1) { - dtable->symbols[--high_threshold] = s; - state_desc[s] = 1; - } - } - - // "All remaining symbols are sorted in their natural order. Starting from - // symbol 0 and table position 0, each symbol gets attributed as many cells - // as its probability. Cell allocation is spread, not linear." - // Place the rest in the table - const u16 step = (size >> 1) + (size >> 3) + 3; - const u16 mask = size - 1; - u16 pos = 0; - for (int s = 0; s < num_symbs; s++) { - if (norm_freqs[s] <= 0) { - continue; - } - - state_desc[s] = norm_freqs[s]; - - for (int i = 0; i < norm_freqs[s]; i++) { - // Give `norm_freqs[s]` states to symbol s - dtable->symbols[pos] = s; - // "A position is skipped if already occupied, typically by a "less - // than 1" probability symbol." - do { - pos = (pos + step) & mask; - } while (pos >= - high_threshold); - // Note: no other collision checking is necessary as `step` is - // coprime to `size`, so the cycle will visit each position exactly - // once - } - } - if (pos != 0) { - CORRUPTION(); - } - - // Now we can fill baseline and num bits - for (size_t i = 0; i < size; i++) { - u8 symbol = dtable->symbols[i]; - u16 next_state_desc = state_desc[symbol]++; - // Fills in the table appropriately, next_state_desc increases by symbol - // over time, decreasing number of bits - dtable->num_bits[i] = (u8)(accuracy_log - highest_set_bit(next_state_desc)); - // Baseline increases until the bit threshold is passed, at which point - // it resets to 0 - dtable->new_state_base[i] = - ((u16)next_state_desc << dtable->num_bits[i]) - size; - } -} - -/// Decode an FSE header as defined in the Zstandard format specification and -/// use the decoded frequencies to initialize a decoding table. -static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in, - const int max_accuracy_log) { - // "An FSE distribution table describes the probabilities of all symbols - // from 0 to the last present one (included) on a normalized scale of 1 << - // Accuracy_Log . - // - // It's a bitstream which is read forward, in little-endian fashion. It's - // not necessary to know its exact size, since it will be discovered and - // reported by the decoding process. - if (max_accuracy_log > FSE_MAX_ACCURACY_LOG) { - ERROR("FSE accuracy too large"); - } - - // The bitstream starts by reporting on which scale it operates. - // Accuracy_Log = low4bits + 5. Note that maximum Accuracy_Log for literal - // and match lengths is 9, and for offsets is 8. Higher values are - // considered errors." - const int accuracy_log = 5 + IO_read_bits(in, 4); - if (accuracy_log > max_accuracy_log) { - ERROR("FSE accuracy too large"); - } - - // "Then follows each symbol value, from 0 to last present one. The number - // of bits used by each field is variable. It depends on : - // - // Remaining probabilities + 1 : example : Presuming an Accuracy_Log of 8, - // and presuming 100 probabilities points have already been distributed, the - // decoder may read any value from 0 to 255 - 100 + 1 == 156 (inclusive). - // Therefore, it must read log2sup(156) == 8 bits. - // - // Value decoded : small values use 1 less bit : example : Presuming values - // from 0 to 156 (inclusive) are possible, 255-156 = 99 values are remaining - // in an 8-bits field. They are used this way : first 99 values (hence from - // 0 to 98) use only 7 bits, values from 99 to 156 use 8 bits. " - - i32 remaining = 1 << accuracy_log; - i16 frequencies[FSE_MAX_SYMBS]; - - int symb = 0; - while (remaining > 0 && symb < FSE_MAX_SYMBS) { - // Log of the number of possible values we could read - int bits = highest_set_bit(remaining + 1) + 1; - - u16 val = IO_read_bits(in, bits); - - // Try to mask out the lower bits to see if it qualifies for the "small - // value" threshold - const u16 lower_mask = ((u16)1 << (bits - 1)) - 1; - const u16 threshold = ((u16)1 << bits) - 1 - (remaining + 1); - - if ((val & lower_mask) < threshold) { - IO_rewind_bits(in, 1); - val = val & lower_mask; - } else if (val > lower_mask) { - val = val - threshold; - } - - // "Probability is obtained from Value decoded by following formula : - // Proba = value - 1" - const i16 proba = (i16)val - 1; - - // "It means value 0 becomes negative probability -1. -1 is a special - // probability, which means "less than 1". Its effect on distribution - // table is described in next paragraph. For the purpose of calculating - // cumulated distribution, it counts as one." - remaining -= proba < 0 ? -proba : proba; - - frequencies[symb] = proba; - symb++; - - // "When a symbol has a probability of zero, it is followed by a 2-bits - // repeat flag. This repeat flag tells how many probabilities of zeroes - // follow the current one. It provides a number ranging from 0 to 3. If - // it is a 3, another 2-bits repeat flag follows, and so on." - if (proba == 0) { - // Read the next two bits to see how many more 0s - int repeat = IO_read_bits(in, 2); - - while (1) { - for (int i = 0; i < repeat && symb < FSE_MAX_SYMBS; i++) { - frequencies[symb++] = 0; - } - if (repeat == 3) { - repeat = IO_read_bits(in, 2); - } else { - break; - } - } - } - } - IO_align_stream(in); - - // "When last symbol reaches cumulated total of 1 << Accuracy_Log, decoding - // is complete. If the last symbol makes cumulated total go above 1 << - // Accuracy_Log, distribution is considered corrupted." - if (remaining != 0 || symb >= FSE_MAX_SYMBS) { - CORRUPTION(); - } - - // Initialize the decoding table using the determined weights - FSE_init_dtable(dtable, frequencies, symb, accuracy_log); -} - -static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb) { - dtable->symbols = malloc(sizeof(u8)); - dtable->num_bits = malloc(sizeof(u8)); - dtable->new_state_base = malloc(sizeof(u16)); - - if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) { - BAD_ALLOC(); - } - - // This setup will always have a state of 0, always return symbol `symb`, - // and never consume any bits - dtable->symbols[0] = symb; - dtable->num_bits[0] = 0; - dtable->new_state_base[0] = 0; - dtable->accuracy_log = 0; -} - -static void FSE_free_dtable(FSE_dtable *const dtable) { - free(dtable->symbols); - free(dtable->num_bits); - free(dtable->new_state_base); - memset(dtable, 0, sizeof(FSE_dtable)); -} -/******* END FSE PRIMITIVES ***************************************************/ diff --git a/third_party/zstd/doc/educational_decoder/zstd_decompress.h b/third_party/zstd/doc/educational_decoder/zstd_decompress.h deleted file mode 100644 index c13c813..0000000 --- a/third_party/zstd/doc/educational_decoder/zstd_decompress.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include /* size_t */ - -/******* EXPOSED TYPES ********************************************************/ -/* -* Contains the parsed contents of a dictionary -* This includes Huffman and FSE tables used for decoding and data on offsets -*/ -typedef struct dictionary_s dictionary_t; -/******* END EXPOSED TYPES ****************************************************/ - -/******* DECOMPRESSION FUNCTIONS **********************************************/ -/// Zstandard decompression functions. -/// `dst` must point to a space at least as large as the reconstructed output. -size_t ZSTD_decompress(void *const dst, const size_t dst_len, - const void *const src, const size_t src_len); - -/// If `dict != NULL` and `dict_len >= 8`, does the same thing as -/// `ZSTD_decompress` but uses the provided dict -size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len, - const void *const src, const size_t src_len, - dictionary_t* parsed_dict); - -/// Get the decompressed size of an input stream so memory can be allocated in -/// advance -/// Returns -1 if the size can't be determined -/// Assumes decompression of a single frame -size_t ZSTD_get_decompressed_size(const void *const src, const size_t src_len); -/******* END DECOMPRESSION FUNCTIONS ******************************************/ - -/******* DICTIONARY MANAGEMENT ***********************************************/ -/* - * Return a valid dictionary_t pointer for use with dictionary initialization - * or decompression - */ -dictionary_t* create_dictionary(void); - -/* - * Parse a provided dictionary blob for use in decompression - * `src` -- must point to memory space representing the dictionary - * `src_len` -- must provide the dictionary size - * `dict` -- will contain the parsed contents of the dictionary and - * can be used for decompression - */ -void parse_dictionary(dictionary_t *const dict, const void *src, - size_t src_len); - -/* - * Free internal Huffman tables, FSE tables, and dictionary content - */ -void free_dictionary(dictionary_t *const dict); -/******* END DICTIONARY MANAGEMENT *******************************************/ diff --git a/third_party/zstd/doc/images/CSpeed2.png b/third_party/zstd/doc/images/CSpeed2.png deleted file mode 100644 index 42affa46ea4789c4d722fc47e3aa71d23058faf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 73335 zcmeFZRX~)_`#uZ^NC={$NQ#6=E8U?;N_T^RbVx6~qM%aJ9ZEOS9R?{~(nxp1()?!u zKVLCKQ%4#A%GHmMfBNk`|3+u*1=Is!^MENW1eW>>w_IuhIt%9T6Ev z0O9X1R_{GT7W2)Aia+M$?jN56W81FZ zr>1^Li#wZTB1`yx?4trfP@<#;vGC5{djzZZM#m|%Rq>V~{^#gn27!*QWlMx*k$-Ke zRu>7Gp1AL>!sUNXU4jXwJ|Gl0xc1NUjR5QNwnOXv=dso;}y8nO67f$W}Ln#Zq{Ic-)cR9VGfhudeDvFDX>yK7Km`wY!(lWS1pZrp=7#bkj zbl%5RXQG`;6mWH|S{f)2v0ojf&(6*c3J<4}PkH)~|3HPJ1S`*Dr`M*Pmnt$caw9a? z<;nHyA6NN1xwyHfCjzQn1C> z*EbDAZDpiF8T$_3l6UHAT($S0gXbPe{pZzJcj&aw^^4RDI(NW0kr&;Fb!M)mj}!9q z<=obNv>W@f)jio9_qXP)C;iyPU%YtHu^24ZuJTF&_#Ky%jl#JL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+5s5yHXW#Rpu4J@i9;iY}ES@j*KWxqG-}E)!d!UfG+a$q{D#fW*7+0rBr>OE1 zcu9rC`;7!-zJqrpS?dpc#+C>XEEO~M6Ro{e*AURXlTOTlXWL{py&ouU^^s7vp8 zJ9Y_-vEFAKOAKB|C%X~qRcz-k89p6+&aO32M|bES)Vky0z;mKsCc-K*Y-XSga2A)Q zQFuHagWqRRb_g9X_Tq`%J^rsp!kaTG$r_rO(@nyY551%cKXzg|HAA0LIvSFd6Pw?c z5p-SQ7vv<_Epdo41qhZCdkV+k)BGaLS0#o%-_1i4oBD?~bU@<>-&g0z4&TTL9hXbC zW3VA`MUI(z<80IZi}OZF1}Rc<5J;v`R66P{C&jQvUr62mFd5nDoshC)$xEL<;w;Me zlf|DAK3w8PZl*zxPcgUR6vGa@KeALPA$8i?(6E@DPVwQ^N(X+ho>%dTaoV%@PvGkN zIMr*t3NU`0akR*pr*)rIQ3x$+gAORu?@+!WEz|e`cKC$}uy@FNjOf5aeEx94dfae# z8^*k!sKGCwp#t4gF!5%2c5rM*Q{_{N=ctJ8xR@~bmEK9W#!HJ zLtAial3TdIi62me-Pg0!C@<8wLs-2?mt9q3-ZRr3L5R{s{k>lndm)HL=5ecZ?yN)OtLg66iR!P6a1@ z5yq3(-3H2zoJB1(uiQ?bKeYGAFKI%HSiIju1GyJ|d{H7@WJ|2M2v8}Z kkNMaC_Sd5~#zZ%vFoveu=-i&l647a4m#-~a#s diff --git a/third_party/zstd/doc/images/DSpeed3.png b/third_party/zstd/doc/images/DSpeed3.png deleted file mode 100644 index 4818b11180a74514e1f7af61e0a9dcd91e6b4b07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27123 zcmeIbXIPVK7d0q|3V1{X0i|0I0RfQ?QY`e|r6Wjh(tEQZAVsQlr1wY-5Sof0T}mi{ zfYJ#8qy-@Y-~AwX-g#%P@5j_@X8fV&knof|x$nK#UTf`bu!@rO8B!Y3W5jXWiVByNoz2Cb(O3`4l?3@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HC)fmtx)>5I<~q-`szi~i*P?=`1Yg?*v~ei7J!;J`jx$Ey!CCdWlB{GW2?(Fz#!CX;ZfhNtzoYpXq(X@rsIaU^Bth z<)gmhB&K{CyUUMkzqHsH{vMBs_VQXfpr^^82V#CfA#39f1(dI?zQo>{lxg)0=phz< zm+2CsUXq^ln9=_r#jdC$46|oi<;a=di;aog%;GQ*Atid6z^o=v3oSKFM>`{L#8LKr z$%$}!miBY&B-Jd9n~vAC9VH!?0P9cV+ea0Ok%;Off%I;{_E<5pGe`$g2>yw(enWcs z6e}~#0t@X$uDm(%@Yn6h8irTeojDVuv&l4R*t7{LQ%WbA1Kz%iy~QAwsu$Yrot_cm zPn^WKZGJFW@cy~HX!H#xfk}&co)pKB$eZY5AsBlThP+#r$|?a@e-tbK^XbG1gMo1M7v6p{`{Sa- z=_$5-Js86yG-95^6SB#|87fTZU6`qReB}@O`IzL9u@?{B_){t)Q!AG{eJSo?Lel1J zO_Qfwd@**pS#a+OU#*5cgooFob!nuwv1$`AAj~tEry8=2r=M56;DB#J2l(A6F+1-96D| z7P^kmTHTHJUEPf}WF_ItP7ke}*vvY)b3>UkJT$P$^oYV`=nY)He`5=I_l1g<9<_js zUDi;3s6_DW>&9f)meQ7xnORIK-L=W;()^x33OZy->QTJ0y zNk+8U@atlZjLd!0iiB~8<2)1;6bA(vDQ)yw?>>JzeP*n5nZPhsO1gR}e=K9ixI5Cl z#^1GkJyDK4?-UJljWMFGElOI+5H37K$Nz}=2z*FEu~b)CKLik>GLnC_2#oA>bRd@a ozklwznftopEhHc?lG^=H%etl4sXFW{;npY$4^?F4^aM$n*aa+ diff --git a/third_party/zstd/doc/images/dict-cr.png b/third_party/zstd/doc/images/dict-cr.png deleted file mode 100644 index 6da34da46bde23942c10e100a3354681399c3e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90412 zcmeFZ`CF6c7B*TpyU=b6)Y_IZTdA^J6+{d(iEan#Mu>=t%oda&Q3FJT1d>Q;>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uIqkJvTk7OZ?<#vC=za>OnX}sO6xG4F*IyY#bd6ViVA-k~2uMm-Pj(Gv z3;n_uKR-Xa#5X}91zkqp=Z_RQ#!}Fk(QVGPAdy+wDiLP5=MvXmf&rz#mm@KC1Z}i+ zlN(i%zCWE*F}jK8@`*>3^|p*lh21_0B6ih7fbZ*sA;@GJdQhg4avFQCX`|(%cyMD# z98als!I>k{v}|Qag&$=Z@X_VSCvq*`bCrFBqidQF5w;Q!F#+_aFWAZb$_%?&hcg`8 zGB|Sl6^uG1+@v@NK{~l%N>m{=%^+IW>9}5vN=zC4p+&?Z8(%Wz(-EX6H&C4;T@Q(x zo%~yaBdpL|vm0Nb0-nipyrVY*KE{c@2REB5EKzm`)*^z!tc+UnWFPOMG2J=r6BA2jclT+M6j zxr42dL<}0Hu#Kbp^{c<~K^O)q4a}AfW4;zB{6S|7LCiwK9zgBZxCq~Rw$!a+f~sd57JYCRBpt)=+dRSl>k4TK*rWt zzv?k!{IBR^I&`T$r{Z54-=Al2S5Em_ChoNQT=+|lhqv}VTr1wa^tLeJMgMT%XYhBx OBjjlKmo;CU%=;hEEK0rr diff --git a/third_party/zstd/doc/images/dict-cs.png b/third_party/zstd/doc/images/dict-cs.png deleted file mode 100644 index a0d8d250565c82f1634b434b93c80d034650e080..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91518 zcmd?R`(KiGA3wfs@8#~hnQLvC=Qg+8R%vFam_XfWwwaPyc}z-69F!<{- z{d_(zvrh*3Tm0ANzwf>Gp2fGveNVmj-ljY6z4x!y4>kjT`E#*)2KcoJcgp{N?>*qz z%>oDiNjx5od+$A~k2iicAsK%HA36Nqx4uVCr*4{Oj~3K@e_QnFGgM0Qz{;=H^u>|~ zaY1jocSYh3KiRvvd)JFMhWB^nzWt+Z|BjS5lmDGZw?iI1o!WJwPy{rem5dOmDO zU;lA9>?D==_dQxIR;;@5M06=>5w=P`Sun@qPw zZIib}t5=sdNBbOKocP3aJ>}z6D(%aZ@%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D8YOyzXHr=)Li@Y$BSUI*1sS{63;fLzTYofLT&3yUd|9#f6EtS;9 z7NZHkG(*_Z522=GJe^oOMfFRnM#=7g;N9yR{pusbJHUc>o^6{b1!xKW*B4Z%YgNPN acdSTXZ#N^(p8E=Tojc?9d&w!kJO2-1)RnUU diff --git a/third_party/zstd/doc/images/zstd_cdict_v1_3_5.png b/third_party/zstd/doc/images/zstd_cdict_v1_3_5.png deleted file mode 100644 index cce67c83abbf8a8ff62f16eda279fc3088efc8f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 93969 zcmbq)byOQ&*KcajLa|byI7N#UcbB38io1KU;u>fR#flUOBxs8Sg1cLBr?^A$26qXP zoA!CX=l$;e_nx(8W#-JxnX}Kf-`@Kq;;pJY4i*^}006*IRFKsG0PbI)k0bp1=pM|8 z_6h*t38TG?%v*a)O8`J20t~i&o1jn9b8sSx_$>KMI_#}X91FvTM0|r+V}<#Wzti8o zaSX4!&l(xd`{wJLdn86+T8B5!vA=w}PwWxQcE7*Dl}KGm|NSy)`URy#6AJ1-;&SJ{ zx#T`__5L1Bc(C=40e=gPhPL^>7}6Kd2OloKiporCKRWezusqpF04VPCZ&)6=DtSy0 zXMeL%SJ&ir#r(+w@NL(6YEVf{e*3;+o4AM!keqWto~I5>|#-2W|!@#?ll~8G-_zd`XklqfdA=n) z#rD8$xW5>J@jdLPAn$`)98d@WFu89{r05>4&{KIrz--+i^NMd(@}0~pQSW2w%#5DB#?y^)=r-=eS%JOB_Hk_zUb=tqF}BU6 zJ^2^;;o_yprQ*$fsZVXRdISMaTtg^Bu%ua6$jqY-Llx)?@P{HyI`vk)EFK*_Kf-WL zyZk82V4qNzgRg;M&w&s`a3fwKaG<~`n)&$PKE!(SI^(hSvF5QqR|+KKg&Lc*W2#=Y zUf9gn8CI-}EY+2_{BPY}Z6xv}iX`g0Hr0g+>WTsb3Vo_Cg^tvZgr1~?d=Cke&5|vb zt?X2ZuxCjskn;Q{_x1$dldlUWPYi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sftvi4#a4xPCZb z!WU!Jt3Wn`xQ{-##q-CfY@UsUH(22Y;KC7*90(B8UieY3I`5y^nX*^YK{`BL{an^L HB{Ts5ea1Wy diff --git a/third_party/zstd/doc/images/zstd_logo86.png b/third_party/zstd/doc/images/zstd_logo86.png deleted file mode 100644 index 8abefe21b1e172b9683392057421984f64c8c9a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13069 zcmeHucQ~Bi*7oS4Bw7&NDA9%)z4sb52qJ>PVAL^2??jF05+s7?q9#g02!as3mk^@& zE;`>xekJF7&wJkQT-W#hcU*gB_Fn5=_g;JLwf5tghe#bQ6=DJ!0ssI&tfs1{i~iI@ zzqIkO(C?X^*9OoZcqlbZCA>vEI#MQ<80M1<0DxA{Ti*z!3-w?^Af2t@4lpK^7Xrov z^MqRi0G<;i&+k7q5ph?#gb>`oXjGD*tF-sRWoS5*vl?J!yH{A$MIjK}{{e4uQ4lcS zb9r{?cG;St`vAo`YT(WJQl>DU0Z%*a^6b`@$M(v(f502RdMbavsoc{8<#{&0<+YF! zU%!jfgY7xYjPRznXM>>=C*GD9C(7Dpqs|{6a`-c7ung>-yJcOtF+a`_X&%LCvoUVi zHwbvyESd4SY%8F-(JbGr@LYUd=B$paKK*@ct0zy&l1JtCt-uv$l(47nF@4ESQ)4f9 z&g|q|>K^8XEH~wi8`uw|S`VXdXvsTm*@tF)neN&<@fVlrzFYq| z$@$~iyiF(r5dNMylwSGW_Ya?MQYvWdw0yCQew?#XWi9mMU6;h0qOU{0rAp^;6bGO5u!ktDNW1Bo zxmePSeY6nv>{xs6j6BFVDv{#Ri#h8gNb1c5h0h4*2E9+G4qZEY{3%MnH#d!6$7jlw zk~J!y4-FM$#e?!+xONEDOzv?Q=yv2L8Dslr8*2)U>e@S2jrJGkK79bM5*qcUm2$_T zbLFf5G2+7*^89+K zMr=`xj$Zdu&v9Id@SPg*j?aL-Sreb$bnC#8jTryq>I^7Z0v0S?LC0@ApH>0c;v2sr zv6}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0uT0{ z|7`0Ufc4Ek+TRki@Xxlk4*1np*Z%IH`{=f^`bS${`MZx6F0Wi(UhZ66Y+qdLo}cfW zpU<70&7PeNpPUSxoU|Puw;mt293QtG9km`Ey*oUrIXtR9JSzQhSn}hr;NVC8!H=AS zA8GpsDfMTd&gsY2f4NFvbAlu zwGH3ew%yvc-rRb)v1z=qd4FTmXk*i0V^e#5Lu-9QaeYI6eM4@2Lt$-QW^G+)bxmM( zjc0X@Yjurdb&YmqmEhMx(CfRKoUl#J3HUHyB8CZ-m4j?OL~z5#*3p%IbMPvR1iQeM1#m0MU;Qd(C2=H2_c z`i75fpF6vHdi(kZhDXLHzb`JWtZi;>@9Z5M9v`2ao}FKGzudG$Pl#cmuA*3=gD;!_ z0APuzDaz@4PE3wqy=7G=!I?4nTJ4B#`x9+dj!uihquiM&=%#76>*hshFLl)AZ4amIH?clmC=@q9( zE&+loB?_XWVTnCtkK959+3_D$r+bc)yiC)4@i1cc0>4z6Af7HCHA>oVa;J*n?o<|q z0t5OF$aCl93Z2qcyXh{9gaqewR?&U7q0giV6`*#Mbk&)AyAHmkCDK6xfi0U{=X z8KcExLFqW3RF4cMafa{zI8=$!1uMrdkWxDn4L&y`CVN$}9lnt-b^GISr~? z?}nkvdT>Y>J5Uy;Y`7`$>Bosj@*|{X6NsNa_+|0YL0fr!uTvJzI9N$4YzKRZ@>-L&(&G!5bp1L#}5`BR0I~q!a9D; z&XrAi+ioBOGRjJf-Jkh_iRM1ld`I|S- z?Ks&U4v*|6yNY>%wgp2IViaD#jwsB12^@5P7k|KMn1f+_*ip%34tiqLZuG1}P(PU2 zz6eB5RuDTpu$xC1y}>YT7T_;>&gpDu4VseE>a$@Le~>OO-W0!RNg%J{{S|N)3pEq diff --git a/third_party/zstd/doc/zstd_compression_format.md b/third_party/zstd/doc/zstd_compression_format.md deleted file mode 100644 index a2bf20c..0000000 --- a/third_party/zstd/doc/zstd_compression_format.md +++ /dev/null @@ -1,1771 +0,0 @@ -Zstandard Compression Format -============================ - -### Notices - -Copyright (c) Meta Platforms, Inc. and affiliates. - -Permission is granted to copy and distribute this document -for any purpose and without charge, -including translations into other languages -and incorporation into compilations, -provided that the copyright notice and this notice are preserved, -and that any substantive changes or deletions from the original -are clearly marked. -Distribution of this document is unlimited. - -### Version - -0.4.3 (2024-10-07) - - -Introduction ------------- - -The purpose of this document is to define a lossless compressed data format, -that is independent of CPU type, operating system, -file system and character set, suitable for -file compression, pipe and streaming compression, -using the [Zstandard algorithm](https://facebook.github.io/zstd/). -The text of the specification assumes a basic background in programming -at the level of bits and other primitive data representations. - -The data can be produced or consumed, -even for an arbitrarily long sequentially presented input data stream, -using only an a priori bounded amount of intermediate storage, -and hence can be used in data communications. -The format uses the Zstandard compression method, -and optional [xxHash-64 checksum method](https://cyan4973.github.io/xxHash/), -for detection of data corruption. - -The data format defined by this specification -does not attempt to allow random access to compressed data. - -Unless otherwise indicated below, -a compliant compressor must produce data sets -that conform to the specifications presented here. -It doesn’t need to support all options though. - -A compliant decompressor must be able to decompress -at least one working set of parameters -that conforms to the specifications presented here. -It may also ignore informative fields, such as checksum. -Whenever it does not support a parameter defined in the compressed stream, -it must produce a non-ambiguous error code and associated error message -explaining which parameter is unsupported. - -This specification is intended for use by implementers of software -to compress data into Zstandard format and/or decompress data from Zstandard format. -The Zstandard format is supported by an open source reference implementation, -written in portable C, and available at : https://github.com/facebook/zstd . - - -### Overall conventions -In this document: -- square brackets i.e. `[` and `]` are used to indicate optional fields or parameters. -- the naming convention for identifiers is `Mixed_Case_With_Underscores` - -### Definitions -Content compressed by Zstandard is transformed into a Zstandard __frame__. -Multiple frames can be appended into a single file or stream. -A frame is completely independent, has a defined beginning and end, -and a set of parameters which tells the decoder how to decompress it. - -A frame encapsulates one or multiple __blocks__. -Each block contains arbitrary content, which is described by its header, -and has a guaranteed maximum content size, which depends on frame parameters. -Unlike frames, each block depends on previous blocks for proper decoding. -However, each block can be decompressed without waiting for its successor, -allowing streaming operations. - -Overview ---------- -- [Frames](#frames) - - [Zstandard frames](#zstandard-frames) - - [Blocks](#blocks) - - [Literals Section](#literals-section) - - [Sequences Section](#sequences-section) - - [Sequence Execution](#sequence-execution) - - [Skippable frames](#skippable-frames) -- [Entropy Encoding](#entropy-encoding) - - [FSE](#fse) - - [Huffman Coding](#huffman-coding) -- [Dictionary Format](#dictionary-format) - -Frames ------- -Zstandard compressed data is made of one or more __frames__. -Each frame is independent and can be decompressed independently of other frames. -The decompressed content of multiple concatenated frames is the concatenation of -each frame decompressed content. - -There are two frame formats defined by Zstandard: - Zstandard frames and Skippable frames. -Zstandard frames contain compressed data, while -skippable frames contain custom user metadata. - -## Zstandard frames -The structure of a single Zstandard frame is following: - -| `Magic_Number` | `Frame_Header` |`Data_Block`| [More data blocks] | [`Content_Checksum`] | -|:--------------:|:--------------:|:----------:| ------------------ |:--------------------:| -| 4 bytes | 2-14 bytes | n bytes | | 0-4 bytes | - -__`Magic_Number`__ - -4 Bytes, __little-endian__ format. -Value : 0xFD2FB528 -Note: This value was selected to be less probable to find at the beginning of some random file. -It avoids trivial patterns (0x00, 0xFF, repeated bytes, increasing bytes, etc.), -contains byte values outside of ASCII range, -and doesn't map into UTF8 space. -It reduces the chances that a text file represent this value by accident. - -__`Frame_Header`__ - -2 to 14 Bytes, detailed in [`Frame_Header`](#frame_header). - -__`Data_Block`__ - -Detailed in [`Blocks`](#blocks). -That’s where compressed data is stored. - -__`Content_Checksum`__ - -An optional 32-bit checksum, only present if `Content_Checksum_flag` is set. -The content checksum is the result -of [xxh64() hash function](https://cyan4973.github.io/xxHash/) -digesting the original (decoded) data as input, and a seed of zero. -The low 4 bytes of the checksum are stored in __little-endian__ format. - -### `Frame_Header` - -The `Frame_Header` has a variable size, with a minimum of 2 bytes, -and up to 14 bytes depending on optional parameters. -The structure of `Frame_Header` is following: - -| `Frame_Header_Descriptor` | [`Window_Descriptor`] | [`Dictionary_ID`] | [`Frame_Content_Size`] | -| ------------------------- | --------------------- | ----------------- | ---------------------- | -| 1 byte | 0-1 byte | 0-4 bytes | 0-8 bytes | - -#### `Frame_Header_Descriptor` - -The first header's byte is called the `Frame_Header_Descriptor`. -It describes which other fields are present. -Decoding this byte is enough to tell the size of `Frame_Header`. - -| Bit number | Field name | -| ---------- | ---------- | -| 7-6 | `Frame_Content_Size_flag` | -| 5 | `Single_Segment_flag` | -| 4 | `Unused_bit` | -| 3 | `Reserved_bit` | -| 2 | `Content_Checksum_flag` | -| 1-0 | `Dictionary_ID_flag` | - -In this table, bit 7 is the highest bit, while bit 0 is the lowest one. - -__`Frame_Content_Size_flag`__ - -This is a 2-bits flag (`= Frame_Header_Descriptor >> 6`), -specifying if `Frame_Content_Size` (the decompressed data size) -is provided within the header. -`Flag_Value` provides `FCS_Field_Size`, -which is the number of bytes used by `Frame_Content_Size` -according to the following table: - -| `Flag_Value` | 0 | 1 | 2 | 3 | -| -------------- | ------ | --- | --- | --- | -|`FCS_Field_Size`| 0 or 1 | 2 | 4 | 8 | - -When `Flag_Value` is `0`, `FCS_Field_Size` depends on `Single_Segment_flag` : -if `Single_Segment_flag` is set, `FCS_Field_Size` is 1. -Otherwise, `FCS_Field_Size` is 0 : `Frame_Content_Size` is not provided. - -__`Single_Segment_flag`__ - -If this flag is set, -data must be regenerated within a single continuous memory segment. - -In this case, `Window_Descriptor` byte is skipped, -but `Frame_Content_Size` is necessarily present. -As a consequence, the decoder must allocate a memory segment -of size equal or larger than `Frame_Content_Size`. - -In order to preserve the decoder from unreasonable memory requirements, -a decoder is allowed to reject a compressed frame -which requests a memory size beyond decoder's authorized range. - -For broader compatibility, decoders are recommended to support -memory sizes of at least 8 MB. -This is only a recommendation, -each decoder is free to support higher or lower limits, -depending on local limitations. - -__`Unused_bit`__ - -A decoder compliant with this specification version shall not interpret this bit. -It might be used in any future version, -to signal a property which is transparent to properly decode the frame. -An encoder compliant with this specification version must set this bit to zero. - -__`Reserved_bit`__ - -This bit is reserved for some future feature. -Its value _must be zero_. -A decoder compliant with this specification version must ensure it is not set. -This bit may be used in a future revision, -to signal a feature that must be interpreted to decode the frame correctly. - -__`Content_Checksum_flag`__ - -If this flag is set, a 32-bits `Content_Checksum` will be present at frame's end. -See `Content_Checksum` paragraph. - -__`Dictionary_ID_flag`__ - -This is a 2-bits flag (`= FHD & 3`), -telling if a dictionary ID is provided within the header. -It also specifies the size of this field as `DID_Field_Size`. - -|`Flag_Value` | 0 | 1 | 2 | 3 | -| -------------- | --- | --- | --- | --- | -|`DID_Field_Size`| 0 | 1 | 2 | 4 | - -#### `Window_Descriptor` - -Provides guarantees on minimum memory buffer required to decompress a frame. -This information is important for decoders to allocate enough memory. - -The `Window_Descriptor` byte is optional. -When `Single_Segment_flag` is set, `Window_Descriptor` is not present. -In this case, `Window_Size` is `Frame_Content_Size`, -which can be any value from 0 to 2^64-1 bytes (16 ExaBytes). - -| Bit numbers | 7-3 | 2-0 | -| ----------- | ---------- | ---------- | -| Field name | `Exponent` | `Mantissa` | - -The minimum memory buffer size is called `Window_Size`. -It is described by the following formulas : -``` -windowLog = 10 + Exponent; -windowBase = 1 << windowLog; -windowAdd = (windowBase / 8) * Mantissa; -Window_Size = windowBase + windowAdd; -``` -The minimum `Window_Size` is 1 KB. -The maximum `Window_Size` is `(1<<41) + 7*(1<<38)` bytes, which is 3.75 TB. - -In general, larger `Window_Size` tend to improve compression ratio, -but at the cost of memory usage. - -To properly decode compressed data, -a decoder will need to allocate a buffer of at least `Window_Size` bytes. - -In order to preserve decoder from unreasonable memory requirements, -a decoder is allowed to reject a compressed frame -which requests a memory size beyond decoder's authorized range. - -For improved interoperability, -it's recommended for decoders to support `Window_Size` of up to 8 MB, -and it's recommended for encoders to not generate frame requiring `Window_Size` larger than 8 MB. -It's merely a recommendation though, -decoders are free to support larger or lower limits, -depending on local limitations. - -#### `Dictionary_ID` - -This is a variable size field, which contains -the ID of the dictionary required to properly decode the frame. -`Dictionary_ID` field is optional. When it's not present, -it's up to the decoder to know which dictionary to use. - -`Dictionary_ID` field size is provided by `DID_Field_Size`. -`DID_Field_Size` is directly derived from value of `Dictionary_ID_flag`. -1 byte can represent an ID 0-255. -2 bytes can represent an ID 0-65535. -4 bytes can represent an ID 0-4294967295. -Format is __little-endian__. - -It's allowed to represent a small ID (for example `13`) -with a large 4-bytes dictionary ID, even if it is less efficient. - -A value of `0` has same meaning as no `Dictionary_ID`, -in which case the frame may or may not need a dictionary to be decoded, -and the ID of such a dictionary is not specified. -The decoder must know this information by other means. - -#### `Frame_Content_Size` - -This is the original (uncompressed) size. This information is optional. -`Frame_Content_Size` uses a variable number of bytes, provided by `FCS_Field_Size`. -`FCS_Field_Size` is provided by the value of `Frame_Content_Size_flag`. -`FCS_Field_Size` can be equal to 0 (not present), 1, 2, 4 or 8 bytes. - -| `FCS_Field_Size` | Range | -| ---------------- | ---------- | -| 0 | unknown | -| 1 | 0 - 255 | -| 2 | 256 - 65791| -| 4 | 0 - 2^32-1 | -| 8 | 0 - 2^64-1 | - -`Frame_Content_Size` format is __little-endian__. -When `FCS_Field_Size` is 1, 4 or 8 bytes, the value is read directly. -When `FCS_Field_Size` is 2, _the offset of 256 is added_. -It's allowed to represent a small size (for example `18`) using any compatible variant. - - -Blocks -------- - -After `Magic_Number` and `Frame_Header`, there are some number of blocks. -Each frame must have at least one block, -but there is no upper limit on the number of blocks per frame. - -The structure of a block is as follows: - -| `Block_Header` | `Block_Content` | -|:--------------:|:---------------:| -| 3 bytes | n bytes | - -__`Block_Header`__ - -`Block_Header` uses 3 bytes, written using __little-endian__ convention. -It contains 3 fields : - -| `Last_Block` | `Block_Type` | `Block_Size` | -|:------------:|:------------:|:------------:| -| bit 0 | bits 1-2 | bits 3-23 | - -__`Last_Block`__ - -The lowest bit signals if this block is the last one. -The frame will end after this last block. -It may be followed by an optional `Content_Checksum` -(see [Zstandard Frames](#zstandard-frames)). - -__`Block_Type`__ - -The next 2 bits represent the `Block_Type`. -`Block_Type` influences the meaning of `Block_Size`. -There are 4 block types : - -| Value | 0 | 1 | 2 | 3 | -| ------------ | ----------- | ----------- | ------------------ | --------- | -| `Block_Type` | `Raw_Block` | `RLE_Block` | `Compressed_Block` | `Reserved`| - -- `Raw_Block` - this is an uncompressed block. - `Block_Content` contains `Block_Size` bytes. - -- `RLE_Block` - this is a single byte, repeated `Block_Size` times. - `Block_Content` consists of a single byte. - On the decompression side, this byte must be repeated `Block_Size` times. - -- `Compressed_Block` - this is a [Zstandard compressed block](#compressed-blocks), - explained later on. - `Block_Size` is the length of `Block_Content`, the compressed data. - The decompressed size is not known, - but its maximum possible value is guaranteed (see below) - -- `Reserved` - this is not a block. - This value cannot be used with current version of this specification. - If such a value is present, it is considered corrupted data. - -__`Block_Size`__ - -The upper 21 bits of `Block_Header` represent the `Block_Size`. - -When `Block_Type` is `Compressed_Block` or `Raw_Block`, -`Block_Size` is the size of `Block_Content` (hence excluding `Block_Header`). - -When `Block_Type` is `RLE_Block`, since `Block_Content`’s size is always 1, -`Block_Size` represents the number of times this byte must be repeated. - -`Block_Size` is limited by `Block_Maximum_Size` (see below). - -__`Block_Content`__ and __`Block_Maximum_Size`__ - -The size of `Block_Content` is limited by `Block_Maximum_Size`, -which is the smallest of: -- `Window_Size` -- 128 KB - -`Block_Maximum_Size` is constant for a given frame. -This maximum is applicable to both the decompressed size -and the compressed size of any block in the frame. - -The reasoning for this limit is that a decoder can read this information -at the beginning of a frame and use it to allocate buffers. -The guarantees on the size of blocks ensure that -the buffers will be large enough for any following block of the valid frame. - - -Compressed Blocks ------------------ -To decompress a compressed block, the compressed size must be provided -from `Block_Size` field within `Block_Header`. - -A compressed block consists of 2 sections : -- [Literals Section](#literals-section) -- [Sequences Section](#sequences-section) - -The results of the two sections are then combined to produce the decompressed -data in [Sequence Execution](#sequence-execution) - -#### Prerequisites -To decode a compressed block, the following elements are necessary : -- Previous decoded data, up to a distance of `Window_Size`, - or beginning of the Frame, whichever is smaller. -- List of "recent offsets" from previous `Compressed_Block`. -- The previous Huffman tree, required by `Treeless_Literals_Block` type -- Previous FSE decoding tables, required by `Repeat_Mode` - for each symbol type (literals lengths, match lengths, offsets) - -Note that decoding tables aren't always from the previous `Compressed_Block`. - -- Every decoding table can come from a dictionary. -- The Huffman tree comes from the previous `Compressed_Literals_Block`. - -Literals Section ----------------- -All literals are regrouped in the first part of the block. -They can be decoded first, and then copied during [Sequence Execution], -or they can be decoded on the flow during [Sequence Execution]. - -Literals can be stored uncompressed or compressed using Huffman prefix codes. -When compressed, a tree description may optionally be present, -followed by 1 or 4 streams. - -| `Literals_Section_Header` | [`Huffman_Tree_Description`] | [jumpTable] | Stream1 | [Stream2] | [Stream3] | [Stream4] | -| ------------------------- | ---------------------------- | ----------- | ------- | --------- | --------- | --------- | - - -### `Literals_Section_Header` - -Header is in charge of describing how literals are packed. -It's a byte-aligned variable-size bitfield, ranging from 1 to 5 bytes, -using __little-endian__ convention. - -| `Literals_Block_Type` | `Size_Format` | `Regenerated_Size` | [`Compressed_Size`] | -| --------------------- | ------------- | ------------------ | ------------------- | -| 2 bits | 1 - 2 bits | 5 - 20 bits | 0 - 18 bits | - -In this representation, bits on the left are the lowest bits. - -__`Literals_Block_Type`__ - -This field uses 2 lowest bits of first byte, describing 4 different block types : - -| `Literals_Block_Type` | Value | -| --------------------------- | ----- | -| `Raw_Literals_Block` | 0 | -| `RLE_Literals_Block` | 1 | -| `Compressed_Literals_Block` | 2 | -| `Treeless_Literals_Block` | 3 | - -- `Raw_Literals_Block` - Literals are stored uncompressed. -- `RLE_Literals_Block` - Literals consist of a single byte value - repeated `Regenerated_Size` times. -- `Compressed_Literals_Block` - This is a standard Huffman-compressed block, - starting with a Huffman tree description. - In this mode, there are at least 2 different literals represented in the Huffman tree description. - See details below. -- `Treeless_Literals_Block` - This is a Huffman-compressed block, - using Huffman tree _from previous Huffman-compressed literals block_. - `Huffman_Tree_Description` will be skipped. - Note: If this mode is triggered without any previous Huffman-table in the frame - (or [dictionary](#dictionary-format)), this should be treated as data corruption. - -__`Size_Format`__ - -`Size_Format` is divided into 2 families : - -- For `Raw_Literals_Block` and `RLE_Literals_Block`, - it's only necessary to decode `Regenerated_Size`. - There is no `Compressed_Size` field. -- For `Compressed_Block` and `Treeless_Literals_Block`, - it's required to decode both `Compressed_Size` - and `Regenerated_Size` (the decompressed size). - It's also necessary to decode the number of streams (1 or 4). - -For values spanning several bytes, convention is __little-endian__. - -__`Size_Format` for `Raw_Literals_Block` and `RLE_Literals_Block`__ : - -`Size_Format` uses 1 _or_ 2 bits. -Its value is : `Size_Format = (Literals_Section_Header[0]>>2) & 3` - -- `Size_Format` == 00 or 10 : `Size_Format` uses 1 bit. - `Regenerated_Size` uses 5 bits (0-31). - `Literals_Section_Header` uses 1 byte. - `Regenerated_Size = Literals_Section_Header[0]>>3` -- `Size_Format` == 01 : `Size_Format` uses 2 bits. - `Regenerated_Size` uses 12 bits (0-4095). - `Literals_Section_Header` uses 2 bytes. - `Regenerated_Size = (Literals_Section_Header[0]>>4) + (Literals_Section_Header[1]<<4)` -- `Size_Format` == 11 : `Size_Format` uses 2 bits. - `Regenerated_Size` uses 20 bits (0-1048575). - `Literals_Section_Header` uses 3 bytes. - `Regenerated_Size = (Literals_Section_Header[0]>>4) + (Literals_Section_Header[1]<<4) + (Literals_Section_Header[2]<<12)` - -Only Stream1 is present for these cases. -Note : it's allowed to represent a short value (for example `27`) -using a long format, even if it's less efficient. - -__`Size_Format` for `Compressed_Literals_Block` and `Treeless_Literals_Block`__ : - -`Size_Format` always uses 2 bits. - -- `Size_Format` == 00 : _A single stream_. - Both `Regenerated_Size` and `Compressed_Size` use 10 bits (0-1023). - `Literals_Section_Header` uses 3 bytes. -- `Size_Format` == 01 : 4 streams. - Both `Regenerated_Size` and `Compressed_Size` use 10 bits (6-1023). - `Literals_Section_Header` uses 3 bytes. -- `Size_Format` == 10 : 4 streams. - Both `Regenerated_Size` and `Compressed_Size` use 14 bits (6-16383). - `Literals_Section_Header` uses 4 bytes. -- `Size_Format` == 11 : 4 streams. - Both `Regenerated_Size` and `Compressed_Size` use 18 bits (6-262143). - `Literals_Section_Header` uses 5 bytes. - -Both `Compressed_Size` and `Regenerated_Size` fields follow __little-endian__ convention. -Note: `Compressed_Size` __includes__ the size of the Huffman Tree description -_when_ it is present. -Note 2: `Compressed_Size` can never be `==0`. -Even in single-stream scenario, assuming an empty content, it must be `>=1`, -since it contains at least the final end bit flag. -In 4-streams scenario, a valid `Compressed_Size` is necessarily `>= 10` -(6 bytes for the jump table, + 4x1 bytes for the 4 streams). - -4 streams is faster than 1 stream in decompression speed, -by exploiting instruction level parallelism. -But it's also more expensive, -costing on average ~7.3 bytes more than the 1 stream mode, mostly from the jump table. - -In general, use the 4 streams mode when there are more literals to decode, -to favor higher decompression speeds. -Note that beyond >1KB of literals, the 4 streams mode is compulsory. - -Note that a minimum of 6 bytes is required for the 4 streams mode. -That's a technical minimum, but it's not recommended to employ the 4 streams mode -for such a small quantity, that would be wasteful. -A more practical lower bound would be around ~256 bytes. - -#### Raw Literals Block -The data in Stream1 is `Regenerated_Size` bytes long, -it contains the raw literals data to be used during [Sequence Execution]. - -#### RLE Literals Block -Stream1 consists of a single byte which should be repeated `Regenerated_Size` times -to generate the decoded literals. - -#### Compressed Literals Block and Treeless Literals Block -Both of these modes contain Huffman encoded data. - -For `Treeless_Literals_Block`, -the Huffman table comes from previously compressed literals block, -or from a dictionary. - - -### `Huffman_Tree_Description` -This section is only present when `Literals_Block_Type` type is `Compressed_Literals_Block` (`2`). -The tree describes the weights of all literals symbols that can be present in the literals block, at least 2 and up to 256. -The format of the Huffman tree description can be found at [Huffman Tree description](#huffman-tree-description). -The size of `Huffman_Tree_Description` is determined during decoding process, -it must be used to determine where streams begin. -`Total_Streams_Size = Compressed_Size - Huffman_Tree_Description_Size`. - - -### Jump Table -The Jump Table is only present when there are 4 Huffman-coded streams. - -Reminder : Huffman compressed data consists of either 1 or 4 streams. - -If only one stream is present, it is a single bitstream occupying the entire -remaining portion of the literals block, encoded as described in -[Huffman-Coded Streams](#huffman-coded-streams). - -If there are four streams, `Literals_Section_Header` only provided -enough information to know the decompressed and compressed sizes -of all four streams _combined_. -The decompressed size of _each_ stream is equal to `(Regenerated_Size+3)/4`, -except for the last stream which may be up to 3 bytes smaller, -to reach a total decompressed size as specified in `Regenerated_Size`. - -The compressed size of each stream is provided explicitly in the Jump Table. -Jump Table is 6 bytes long, and consists of three 2-byte __little-endian__ fields, -describing the compressed sizes of the first three streams. -`Stream4_Size` is computed from `Total_Streams_Size` minus sizes of other streams: - -`Stream4_Size = Total_Streams_Size - 6 - Stream1_Size - Stream2_Size - Stream3_Size`. - -`Stream4_Size` is necessarily `>= 1`. Therefore, -if `Total_Streams_Size < Stream1_Size + Stream2_Size + Stream3_Size + 6 + 1`, -data is considered corrupted. - -Each of these 4 bitstreams is then decoded independently as a Huffman-Coded stream, -as described in [Huffman-Coded Streams](#huffman-coded-streams) - - -Sequences Section ------------------ -A compressed block is a succession of _sequences_ . -A sequence is a literal copy command, followed by a match copy command. -A literal copy command specifies a length. -It is the number of bytes to be copied (or extracted) from the Literals Section. -A match copy command specifies an offset and a length. - -When all _sequences_ are decoded, -if there are literals left in the _literals section_, -these bytes are added at the end of the block. - -This is described in more detail in [Sequence Execution](#sequence-execution). - -The `Sequences_Section` regroup all symbols required to decode commands. -There are 3 symbol types : literals lengths, offsets and match lengths. -They are encoded together, interleaved, in a single _bitstream_. - -The `Sequences_Section` starts by a header, -followed by optional probability tables for each symbol type, -followed by the bitstream. - -| `Sequences_Section_Header` | [`Literals_Length_Table`] | [`Offset_Table`] | [`Match_Length_Table`] | bitStream | -| -------------------------- | ------------------------- | ---------------- | ---------------------- | --------- | - -To decode the `Sequences_Section`, it's required to know its size. -Its size is deduced from the size of `Literals_Section`: -`Sequences_Section_Size = Block_Size - Literals_Section_Size`. - - -#### `Sequences_Section_Header` - -Consists of 2 items: -- `Number_of_Sequences` -- Symbol compression modes - -__`Number_of_Sequences`__ - -This is a variable size field using between 1 and 3 bytes. -Let's call its first byte `byte0`. -- `if (byte0 < 128)` : `Number_of_Sequences = byte0` . Uses 1 byte. -- `if (byte0 < 255)` : `Number_of_Sequences = ((byte0 - 0x80) << 8) + byte1`. Uses 2 bytes. - Note that the 2 bytes format fully overlaps the 1 byte format. -- `if (byte0 == 255)`: `Number_of_Sequences = byte1 + (byte2<<8) + 0x7F00`. Uses 3 bytes. - -`if (Number_of_Sequences == 0)` : there are no sequences. - The sequence section stops immediately, - FSE tables used in `Repeat_Mode` aren't updated. - Block's decompressed content is defined solely by the Literals Section content. - -__Symbol compression modes__ - -This is a single byte, defining the compression mode of each symbol type. - -|Bit number| 7-6 | 5-4 | 3-2 | 1-0 | -| -------- | ----------------------- | -------------- | -------------------- | ---------- | -|Field name| `Literals_Lengths_Mode` | `Offsets_Mode` | `Match_Lengths_Mode` | `Reserved` | - -The last field, `Reserved`, must be all-zeroes. - -`Literals_Lengths_Mode`, `Offsets_Mode` and `Match_Lengths_Mode` define the `Compression_Mode` of -literals lengths, offsets, and match lengths symbols respectively. - -They follow the same enumeration : - -| Value | 0 | 1 | 2 | 3 | -| ------------------ | ----------------- | ---------- | --------------------- | ------------- | -| `Compression_Mode` | `Predefined_Mode` | `RLE_Mode` | `FSE_Compressed_Mode` | `Repeat_Mode` | - -- `Predefined_Mode` : A predefined FSE distribution table is used, defined in - [default distributions](#default-distributions). - No distribution table will be present. -- `RLE_Mode` : The table description consists of a single byte, which contains the symbol's value. - This symbol will be used for all sequences. -- `FSE_Compressed_Mode` : standard FSE compression. - A distribution table will be present. - The format of this distribution table is described in [FSE Table Description](#fse-table-description). - Note that the maximum allowed accuracy log for literals length and match length tables is 9, - and the maximum accuracy log for the offsets table is 8. - `FSE_Compressed_Mode` must not be used when only one symbol is present, - `RLE_Mode` should be used instead (although any other mode will work). -- `Repeat_Mode` : The table used in the previous `Compressed_Block` with `Number_of_Sequences > 0` will be used again, - or if this is the first block, table in the dictionary will be used. - Note that this includes `RLE_mode`, so if `Repeat_Mode` follows `RLE_Mode`, the same symbol will be repeated. - It also includes `Predefined_Mode`, in which case `Repeat_Mode` will have same outcome as `Predefined_Mode`. - No distribution table will be present. - If this mode is used without any previous sequence table in the frame - (nor [dictionary](#dictionary-format)) to repeat, this should be treated as corruption. - -#### The codes for literals lengths, match lengths, and offsets. - -Each symbol is a _code_ in its own context, -which specifies `Baseline` and `Number_of_Bits` to add. -_Codes_ are FSE compressed, -and interleaved with raw additional bits in the same bitstream. - -##### Literals length codes - -Literals length codes are values ranging from `0` to `35` included. -They define lengths from 0 to 131071 bytes. -The literals length is equal to the decoded `Baseline` plus -the result of reading `Number_of_Bits` bits from the bitstream, -as a __little-endian__ value. - -| `Literals_Length_Code` | 0-15 | -| ---------------------- | ---------------------- | -| length | `Literals_Length_Code` | -| `Number_of_Bits` | 0 | - -| `Literals_Length_Code` | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -| ---------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -| `Baseline` | 16 | 18 | 20 | 22 | 24 | 28 | 32 | 40 | -| `Number_of_Bits` | 1 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | - -| `Literals_Length_Code` | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -| ---------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -| `Baseline` | 48 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | -| `Number_of_Bits` | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | - -| `Literals_Length_Code` | 32 | 33 | 34 | 35 | -| ---------------------- | ---- | ---- | ---- | ---- | -| `Baseline` | 8192 |16384 |32768 |65536 | -| `Number_of_Bits` | 13 | 14 | 15 | 16 | - - -##### Match length codes - -Match length codes are values ranging from `0` to `52` included. -They define lengths from 3 to 131074 bytes. -The match length is equal to the decoded `Baseline` plus -the result of reading `Number_of_Bits` bits from the bitstream, -as a __little-endian__ value. - -| `Match_Length_Code` | 0-31 | -| ------------------- | ----------------------- | -| value | `Match_Length_Code` + 3 | -| `Number_of_Bits` | 0 | - -| `Match_Length_Code` | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -| ------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -| `Baseline` | 35 | 37 | 39 | 41 | 43 | 47 | 51 | 59 | -| `Number_of_Bits` | 1 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | - -| `Match_Length_Code` | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -| ------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | -| `Baseline` | 67 | 83 | 99 | 131 | 259 | 515 | 1027 | 2051 | -| `Number_of_Bits` | 4 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | - -| `Match_Length_Code` | 48 | 49 | 50 | 51 | 52 | -| ------------------- | ---- | ---- | ---- | ---- | ---- | -| `Baseline` | 4099 | 8195 |16387 |32771 |65539 | -| `Number_of_Bits` | 12 | 13 | 14 | 15 | 16 | - -##### Offset codes - -Offset codes are values ranging from `0` to `N`. - -A decoder is free to limit its maximum `N` supported. -Recommendation is to support at least up to `22`. -For information, at the time of this writing. -the reference decoder supports a maximum `N` value of `31`. - -An offset code is also the number of additional bits to read in __little-endian__ fashion, -and can be translated into an `Offset_Value` using the following formulas : - -``` -Offset_Value = (1 << offsetCode) + readNBits(offsetCode); -if (Offset_Value > 3) offset = Offset_Value - 3; -``` -It means that maximum `Offset_Value` is `(2^(N+1))-1` -supporting back-reference distances up to `(2^(N+1))-4`, -but is limited by [maximum back-reference distance](#window_descriptor). - -`Offset_Value` from 1 to 3 are special : they define "repeat codes". -This is described in more detail in [Repeat Offsets](#repeat-offsets). - -#### Decoding Sequences -FSE bitstreams are read in reverse direction than written. In zstd, -the compressor writes bits forward into a block and the decompressor -must read the bitstream _backwards_. - -To find the start of the bitstream it is therefore necessary to -know the offset of the last byte of the block which can be found -by counting `Block_Size` bytes after the block header. - -After writing the last bit containing information, the compressor -writes a single `1`-bit and then fills the byte with 0-7 `0` bits of -padding. The last byte of the compressed bitstream cannot be `0` for -that reason. - -When decompressing, the last byte containing the padding is the first -byte to read. The decompressor needs to skip 0-7 initial `0`-bits and -the first `1`-bit it occurs. Afterwards, the useful part of the bitstream -begins. - -FSE decoding requires a 'state' to be carried from symbol to symbol. -For more explanation on FSE decoding, see the [FSE section](#fse). - -For sequence decoding, a separate state keeps track of each -literal lengths, offsets, and match lengths symbols. -Some FSE primitives are also used. -For more details on the operation of these primitives, see the [FSE section](#fse). - -##### Starting states -The bitstream starts with initial FSE state values, -each using the required number of bits in their respective _accuracy_, -decoded previously from their normalized distribution. - -It starts by `Literals_Length_State`, -followed by `Offset_State`, -and finally `Match_Length_State`. - -Reminder : always keep in mind that all values are read _backward_, -so the 'start' of the bitstream is at the highest position in memory, -immediately before the last `1`-bit for padding. - -After decoding the starting states, a single sequence is decoded -`Number_Of_Sequences` times. -These sequences are decoded in order from first to last. -Since the compressor writes the bitstream in the forward direction, -this means the compressor must encode the sequences starting with the last -one and ending with the first. - -##### Decoding a sequence -For each of the symbol types, the FSE state can be used to determine the appropriate code. -The code then defines the `Baseline` and `Number_of_Bits` to read for each type. -See the [description of the codes] for how to determine these values. - -[description of the codes]: #the-codes-for-literals-lengths-match-lengths-and-offsets - -Decoding starts by reading the `Number_of_Bits` required to decode `Offset`. -It then does the same for `Match_Length`, and then for `Literals_Length`. -This sequence is then used for [sequence execution](#sequence-execution). - -If it is not the last sequence in the block, -the next operation is to update states. -Using the rules pre-calculated in the decoding tables, -`Literals_Length_State` is updated, -followed by `Match_Length_State`, -and then `Offset_State`. -See the [FSE section](#fse) for details on how to update states from the bitstream. - -This operation will be repeated `Number_of_Sequences` times. -At the end, the bitstream shall be entirely consumed, -otherwise the bitstream is considered corrupted. - -#### Default Distributions -If `Predefined_Mode` is selected for a symbol type, -its FSE decoding table is generated from a predefined distribution table defined here. -For details on how to convert this distribution into a decoding table, see the [FSE section]. - -[FSE section]: #from-normalized-distribution-to-decoding-tables - -##### Literals Length -The decoding table uses an accuracy log of 6 bits (64 states). -``` -short literalsLength_defaultDistribution[36] = - { 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, - -1,-1,-1,-1 }; -``` - -##### Match Length -The decoding table uses an accuracy log of 6 bits (64 states). -``` -short matchLengths_defaultDistribution[53] = - { 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1,-1, - -1,-1,-1,-1,-1 }; -``` - -##### Offset Codes -The decoding table uses an accuracy log of 5 bits (32 states), -and supports a maximum `N` value of 28, allowing offset values up to 536,870,908 . - -If any sequence in the compressed block requires a larger offset than this, -it's not possible to use the default distribution to represent it. -``` -short offsetCodes_defaultDistribution[29] = - { 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1,-1,-1,-1,-1,-1 }; -``` - - -Sequence Execution ------------------- -Once literals and sequences have been decoded, -they are combined to produce the decoded content of a block. - -Each sequence consists of a tuple of (`literals_length`, `offset_value`, `match_length`), -decoded as described in the [Sequences Section](#sequences-section). -To execute a sequence, first copy `literals_length` bytes -from the decoded literals to the output. - -Then `match_length` bytes are copied from previous decoded data. -The offset to copy from is determined by `offset_value`: -if `offset_value > 3`, then the offset is `offset_value - 3`. -If `offset_value` is from 1-3, the offset is a special repeat offset value. -See the [repeat offset](#repeat-offsets) section for how the offset is determined -in this case. - -The offset is defined as from the current position, so an offset of 6 -and a match length of 3 means that 3 bytes should be copied from 6 bytes back. -Note that all offsets leading to previously decoded data -must be smaller than `Window_Size` defined in `Frame_Header_Descriptor`. - -#### Repeat offsets -As seen in [Sequence Execution](#sequence-execution), -the first 3 values define a repeated offset and we will call them -`Repeated_Offset1`, `Repeated_Offset2`, and `Repeated_Offset3`. -They are sorted in recency order, with `Repeated_Offset1` meaning "most recent one". - -If `offset_value == 1`, then the offset used is `Repeated_Offset1`, etc. - -There is an exception though, when current sequence's `literals_length = 0`. -In this case, repeated offsets are shifted by one, -so an `offset_value` of 1 means `Repeated_Offset2`, -an `offset_value` of 2 means `Repeated_Offset3`, -and an `offset_value` of 3 means `Repeated_Offset1 - 1`. - -In the final case, if `Repeated_Offset1 - 1` evaluates to 0, then the -data is considered corrupted. - -For the first block, the starting offset history is populated with following values : -`Repeated_Offset1`=1, `Repeated_Offset2`=4, `Repeated_Offset3`=8, -unless a dictionary is used, in which case they come from the dictionary. - -Then each block gets its starting offset history from the ending values of the most recent `Compressed_Block`. -Note that blocks which are not `Compressed_Block` are skipped, they do not contribute to offset history. - -[Offset Codes]: #offset-codes - -###### Offset updates rules - -During the execution of the sequences of a `Compressed_Block`, the -`Repeated_Offsets`' values are kept up to date, so that they always represent -the three most-recently used offsets. In order to achieve that, they are -updated after executing each sequence in the following way: - -When the sequence's `offset_value` does not refer to one of the -`Repeated_Offsets`--when it has value greater than 3, or when it has value 3 -and the sequence's `literals_length` is zero--the `Repeated_Offsets`' values -are shifted back one, and `Repeated_Offset1` takes on the value of the -just-used offset. - -Otherwise, when the sequence's `offset_value` refers to one of the -`Repeated_Offsets`--when it has value 1 or 2, or when it has value 3 and the -sequence's `literals_length` is non-zero--the `Repeated_Offsets` are re-ordered -so that `Repeated_Offset1` takes on the value of the used Repeated_Offset, and -the existing values are pushed back from the first `Repeated_Offset` through to -the `Repeated_Offset` selected by the `offset_value`. This effectively performs -a single-stepped wrapping rotation of the values of these offsets, so that -their order again reflects the recency of their use. - -The following table shows the values of the `Repeated_Offsets` as a series of -sequences are applied to them: - -| `offset_value` | `literals_length` | `Repeated_Offset1` | `Repeated_Offset2` | `Repeated_Offset3` | Comment | -|:--------------:|:-----------------:|:------------------:|:------------------:|:------------------:|:-----------------------:| -| | | 1 | 4 | 8 | starting values | -| 1114 | 11 | 1111 | 1 | 4 | non-repeat | -| 1 | 22 | 1111 | 1 | 4 | repeat 1: no change | -| 2225 | 22 | 2222 | 1111 | 1 | non-repeat | -| 1114 | 111 | 1111 | 2222 | 1111 | non-repeat | -| 3336 | 33 | 3333 | 1111 | 2222 | non-repeat | -| 2 | 22 | 1111 | 3333 | 2222 | repeat 2: swap 1 & 2 | -| 3 | 33 | 2222 | 1111 | 3333 | repeat 3: rotate 3 to 1 | -| 3 | 0 | 2221 | 2222 | 1111 | special case : insert `repeat1 - 1` | -| 1 | 0 | 2222 | 2221 | 1111 | == repeat 2 | - - -Skippable Frames ----------------- - -| `Magic_Number` | `Frame_Size` | `User_Data` | -|:--------------:|:------------:|:-----------:| -| 4 bytes | 4 bytes | n bytes | - -Skippable frames allow the insertion of user-defined metadata -into a flow of concatenated frames. - -Skippable frames defined in this specification are compatible with [LZ4] ones. - -[LZ4]:https://lz4.github.io/lz4/ - -From a compliant decoder perspective, skippable frames need just be skipped, -and their content ignored, resuming decoding after the skippable frame. - -It can be noted that a skippable frame -can be used to watermark a stream of concatenated frames -embedding any kind of tracking information (even just a UUID). -Users wary of such possibility should scan the stream of concatenated frames -in an attempt to detect such frame for analysis or removal. - -__`Magic_Number`__ - -4 Bytes, __little-endian__ format. -Value : 0x184D2A5?, which means any value from 0x184D2A50 to 0x184D2A5F. -All 16 values are valid to identify a skippable frame. -This specification doesn't detail any specific tagging for skippable frames. - -__`Frame_Size`__ - -This is the size, in bytes, of the following `User_Data` -(without including the magic number nor the size field itself). -This field is represented using 4 Bytes, __little-endian__ format, unsigned 32-bits. -This means `User_Data` can’t be bigger than (2^32-1) bytes. - -__`User_Data`__ - -The `User_Data` can be anything. Data will just be skipped by the decoder. - - - -Entropy Encoding ----------------- -Two types of entropy encoding are used by the Zstandard format: -FSE, and Huffman coding. -Huffman is used to compress literals, -while FSE is used for all other symbols -(`Literals_Length_Code`, `Match_Length_Code`, offset codes) -and to compress Huffman headers. - - -FSE ---- -FSE, short for Finite State Entropy, is an entropy codec based on [ANS]. -FSE encoding/decoding involves a state that is carried over between symbols. -Decoding must be done in the opposite direction as encoding. -Therefore, all FSE bitstreams are read from end to beginning. -Note that the order of the bits in the stream is not reversed, -we just read each multi-bits element in the reverse order they are encoded. - -For additional details on FSE, see [Finite State Entropy]. - -[Finite State Entropy]:https://github.com/Cyan4973/FiniteStateEntropy/ - -FSE decoding is directed by a decoding table with a power of 2 size, each row containing three elements: -`Symbol`, `Num_Bits`, and `Baseline`. -The `log2` of the table size is its `Accuracy_Log`. -An FSE state value represents an index in this table. - -To obtain the initial state value, consume `Accuracy_Log` bits from the stream as a __little-endian__ value. -The first symbol in the stream is the `Symbol` indicated in the table for that state. -To obtain the next state value, -the decoder should consume `Num_Bits` bits from the stream as a __little-endian__ value and add it to `Baseline`. - -[ANS]: https://en.wikipedia.org/wiki/Asymmetric_Numeral_Systems - -### FSE Table Description -To decode an FSE bitstream, it is necessary to build its FSE decoding table. -The decoding table is derived from a distribution of Probabilities. -The Zstandard format encodes distributions of Probabilities as follows: - -The distribution of probabilities is described in a bitstream which is read forward, -in __little-endian__ fashion. -The amount of bytes consumed from the bitstream to describe the distribution -is discovered at the end of the decoding process. - -The bitstream starts by reporting on which scale the distribution operates. -Let's `low4Bits` designate the lowest 4 bits of the first byte : -`Accuracy_Log = low4bits + 5`. - -An FSE distribution table describes the probabilities of all symbols -from `0` to the last present one (included) in natural order. -The sum of probabilities is normalized to reach a power of 2 total of `1 << Accuracy_Log` . -There must be two or more symbols with non-zero probabilities. - -The number of bits used to decode each probability is variable. -It depends on : - -- Remaining probabilities + 1 : - __example__ : - Presuming an `Accuracy_Log` of 8, - and presuming 100 probability points have already been distributed, - the decoder may read any value from `0` to `256 - 100 + 1 == 157` (inclusive). - Therefore, it may read up to `log2sup(157) == 8` bits, where `log2sup(N)` - is the smallest integer `T` that satisfies `(1 << T) > N`. - -- Value decoded : small values use 1 less bit : - __example__ : - Presuming values from 0 to 157 (inclusive) are possible, - 255-157 = 98 values are remaining in an 8-bits field. - They are used this way : - first 98 values (hence from 0 to 97) use only 7 bits, - values from 98 to 157 use 8 bits. - This is achieved through this scheme : - - | 8-bit field read | Value decoded | Nb of bits consumed | - | ---------------- | ------------- | ------------------- | - | 0 - 97 | 0 - 97 | 7 | - | 98 - 127 | 98 - 127 | 8 | - | 128 - 225 | 0 - 97 | 7 | - | 226 - 255 | 128 - 157 | 8 | - -Probability is derived from Value decoded using the following formula: -`Probality = Value - 1` - -Consequently, a Probability of `0` is described by a Value `1`. - -A Value `0` is used to signal a special case, named "Probability `-1`". -It describes a probability which should have been "less than 1". -Its effect on the decoding table building process is described in the [next section]. -For the purpose of counting total allocated probability points, it counts as one. - -[next section]:#from-normalized-distribution-to-decoding-tables - -Symbols probabilities are read one by one, in order. -After each probability is decoded, the total nb of probability points is updated. -This is used to determine how many bits must be read to decode the probability of next symbol. - -When a symbol has a __probability__ of `zero` (decoded from reading a Value `1`), -it is followed by a 2-bits repeat flag. -This repeat flag tells how many probabilities of zeroes follow the current one. -It provides a number ranging from 0 to 3. -If it is a 3, another 2-bits repeat flag follows, and so on. - -When the Probability for a symbol makes cumulated total reach `1 << Accuracy_Log`, -then it's the last symbol, and decoding is complete. - -Then the decoder can tell how many bytes were used in this process, -and how many symbols are present. -The bitstream consumes a round number of bytes. -Any remaining bit within the last byte is just unused. - -If this process results in a non-zero probability for a symbol outside of the -valid range of symbols that the FSE table is defined for, even if that symbol is -not used, then the data is considered corrupted. -For the specific case of offset codes, -a decoder implementation may reject a frame containing a non-zero probability -for an offset code larger than the largest offset code supported by the decoder -implementation. - -#### From normalized distribution to decoding tables - -The normalized distribution of probabilities is enough -to create a unique decoding table. -It is generated using the following build rule : - -The table has a size of `Table_Size = 1 << Accuracy_Log`. -Each row specifies the decoded symbol, -and instructions to reach the next state (`Number_of_Bits` and `Baseline`). - -Symbols are first scanned in their natural order for "less than 1" probabilities -(previously decoded from a Value of `0`). -Symbols with this special probability are being attributed a single row, -starting from the end of the table and retreating. -These symbols define a full state reset, reading `Accuracy_Log` bits. - -Then, all remaining symbols, sorted in natural order, are allocated rows. -Starting from smallest present symbol, and table position `0`, -each symbol gets allocated as many rows as its probability. - -Row allocation is not linear, it follows this order, in modular arithmetic: -``` -position += (tableSize>>1) + (tableSize>>3) + 3; -position &= tableSize-1; -``` - -Using above ordering rule, each symbol gets allocated as many rows as its probability. -If a position is already occupied by a "less than 1" probability symbol, -it is simply skipped, and the next position is allocated instead. -Once enough rows have been allocated for the current symbol, -the allocation process continues, using the next symbol, in natural order. -This process guarantees that the table is entirely and exactly filled. - -Each row specifies a decoded symbol, and is accessed by current state value. -It also specifies `Number_of_Bits` and `Baseline`, which are required to determine next state value. - -To correctly set these fields, it's necessary to sort all occurrences of each symbol in state value order, -and then attribute N+1 bits to lower rows, and N bits to higher rows, -following the process described below (using an example): - -__Example__ : -Presuming an `Accuracy_Log` of 7, -let's imagine a symbol with a Probability of 5: -it receives 5 rows, corresponding to 5 state values between `0` and `127`. - -In this example, the first state value happens to be `1` (after unspecified previous symbols). -The next 4 states are then determined using above modular arithmetic rule, -which specifies to add `64+16+3 = 83` modulo `128` to jump to next position, -producing the following series: `1`, `84`, `39`, `122`, `77` (modular arithmetic). -(note: the next symbol will then start at `32`). - -These state values are then sorted in natural order, -resulting in the following series: `1`, `39`, `77`, `84`, `122`. - -The next power of 2 after 5 is 8. -Therefore, the probability space will be divided into 8 equal parts. -Since the probability space is `1<<7 = 128` large, each share is `128/8 = 16` large. - -In order to reach 8 shares, the `8-5 = 3` lowest states will count "double", -doubling their shares (32 in width), hence requiring one more bit. - -Baseline is assigned starting from the lowest state using fewer bits, -continuing in natural state order, looping back at the beginning. -Each state takes its allocated range from Baseline, sized by its `Number_of_Bits`. - -| state order | 0 | 1 | 2 | 3 | 4 | -| ---------------- | ----- | ----- | ------ | ---- | ------ | -| state value | 1 | 39 | 77 | 84 | 122 | -| width | 32 | 32 | 32 | 16 | 16 | -| `Number_of_Bits` | 5 | 5 | 5 | 4 | 4 | -| allocation order | 3 | 4 | 5 | 1 | 2 | -| `Baseline` | 32 | 64 | 96 | 0 | 16 | -| range | 32-63 | 64-95 | 96-127 | 0-15 | 16-31 | - -During decoding, the next state value is determined by using current state value as row number, -then reading the required `Number_of_Bits` from the bitstream, and adding the specified `Baseline`. - -Note: -as a trivial example, it follows that, for a symbol with a Probability of `1`, -`Baseline` is necessarily `0`, and `Number_of_Bits` is necessarily `Accuracy_Log`. - -See [Appendix A] to see the outcome of this process applied to the default distributions. - -[Appendix A]: #appendix-a---decoding-tables-for-predefined-codes - - -Huffman Coding --------------- -Zstandard Huffman-coded streams are read backwards, -similar to the FSE bitstreams. -Therefore, to find the start of the bitstream, it is required to -know the offset of the last byte of the Huffman-coded stream. - -After writing the last bit containing information, the compressor -writes a single `1`-bit and then fills the byte with 0-7 `0` bits of -padding. The last byte of the compressed bitstream cannot be `0` for -that reason. - -When decompressing, the last byte containing the padding is the first -byte to read. The decompressor needs to skip 0-7 initial `0`-bits and -the first `1`-bit it occurs. Afterwards, the useful part of the bitstream -begins. - -The bitstream contains Huffman-coded symbols in __little-endian__ order, -with the codes defined by the method below. - -### Huffman Tree Description - -Prefix coding represents symbols from an a priori known alphabet -by bit sequences (codewords), one codeword for each symbol, -in a manner such that different symbols may be represented -by bit sequences of different lengths, -but a parser can always parse an encoded string -unambiguously symbol-by-symbol. - -Given an alphabet with known symbol frequencies, -the Huffman algorithm allows the construction of an optimal prefix code -using the fewest bits of any possible prefix codes for that alphabet. - -Prefix code must not exceed a maximum code length. -More bits improve accuracy but cost more header size, -and require more memory or more complex decoding operations. -This specification limits maximum code length to 11 bits. - -#### Representation - -All literal symbols from zero (included) to last present one (excluded) -are represented by `Weight` with values from `0` to `Max_Number_of_Bits`. -Transformation from `Weight` to `Number_of_Bits` follows this formula : -``` -Number_of_Bits = Weight ? (Max_Number_of_Bits + 1 - Weight) : 0 -``` -When a literal symbol is not present, it receives a `Weight` of 0. -The least frequent symbol receives a `Weight` of 1. -If no literal has a `Weight` of 1, then the data is considered corrupted. -If there are not at least two literals with non-zero `Weight`, then the data -is considered corrupted. -The most frequent symbol receives a `Weight` anywhere between 1 and 11 (max). -The last symbol's `Weight` is deduced from previously retrieved Weights, -by completing to the nearest power of 2. It's necessarily non 0. -If it's not possible to reach a clean power of 2 with a single `Weight` value, -the Huffman Tree Description is considered invalid. -This final power of 2 gives `Max_Number_of_Bits`, the depth of the current tree. -`Max_Number_of_Bits` must be <= 11, -otherwise the representation is considered corrupted. - -__Example__ : -Let's presume the following Huffman tree must be described : - -| literal symbol | A | B | C | D | E | F | -| ---------------- | --- | --- | --- | --- | --- | --- | -| `Number_of_Bits` | 1 | 2 | 3 | 0 | 4 | 4 | - -The tree depth is 4, since its longest elements uses 4 bits -(longest elements are the ones with smallest frequency). - -All symbols will now receive a `Weight` instead of `Number_of_Bits`. -Weight formula is : -``` -Weight = Number_of_Bits ? (Max_Number_of_Bits + 1 - Number_of_Bits) : 0 -``` -It gives the following series of Weights : - -| literal symbol | A | B | C | D | E | F | -| -------------- | --- | --- | --- | --- | --- | --- | -| `Weight` | 4 | 3 | 2 | 0 | 1 | 1 | - -This list will be sent to the decoder, with the following modifications: - -- `F` will not be listed, because it can be determined from previous symbols -- nor will symbols above `F` as they are all 0 -- on the other hand, all symbols before `A`, starting with `\0`, will be listed, with a Weight of 0. - -The decoder will do the inverse operation : -having collected weights of literal symbols from `A` to `E`, -it knows the last literal, `F`, is present with a non-zero `Weight`. -The `Weight` of `F` can be determined by advancing to the next power of 2. -The sum of `2^(Weight-1)` (excluding 0's) is : -`8 + 4 + 2 + 0 + 1 = 15`. -Nearest larger power of 2 value is 16. -Therefore, `Max_Number_of_Bits = log2(16) = 4` and `Weight[F] = log_2(16 - 15) + 1 = 1`. - -#### Huffman Tree header - -This is a single byte value (0-255), -which describes how the series of weights is encoded. - -- if `headerByte` < 128 : - the series of weights is compressed using FSE (see below). - The length of the FSE-compressed series is equal to `headerByte` (0-127). - -- if `headerByte` >= 128 : - + the series of weights uses a direct representation, - where each `Weight` is encoded directly as a 4 bits field (0-15). - + They are encoded forward, 2 weights to a byte, - first weight taking the top four bits and second one taking the bottom four. - * e.g. the following operations could be used to read the weights: - `Weight[0] = (Byte[0] >> 4), Weight[1] = (Byte[0] & 0xf)`, etc. - + The full representation occupies `Ceiling(Number_of_Weights/2)` bytes, - meaning it uses only full bytes even if `Number_of_Weights` is odd. - + `Number_of_Weights = headerByte - 127`. - * Note that maximum `Number_of_Weights` is 255-127 = 128, - therefore, only up to 128 `Weight` can be encoded using direct representation. - * Since the last non-zero `Weight` is _not_ encoded, - this scheme is compatible with alphabet sizes of up to 129 symbols, - hence including literal symbol 128. - * If any literal symbol > 128 has a non-zero `Weight`, - direct representation is not possible. - In such case, it's necessary to use FSE compression. - - -#### Finite State Entropy (FSE) compression of Huffman weights - -In this case, the series of Huffman weights is compressed using FSE compression. -It's a single bitstream with 2 interleaved states, -sharing a single distribution table. - -To decode an FSE bitstream, it is necessary to know its compressed size. -Compressed size is provided by `headerByte`. -It's also necessary to know its _maximum possible_ decompressed size, -which is `255`, since literal symbols span from `0` to `255`, -and last symbol's `Weight` is not represented. - -An FSE bitstream starts by a header, describing probabilities distribution. -It will create a Decoding Table. -For a list of Huffman weights, the maximum accuracy log is 6 bits. -For more description see the [FSE header description](#fse-table-description) - -The Huffman header compression uses 2 states, -which share the same FSE distribution table. -The first state (`State1`) encodes the even indexed symbols, -and the second (`State2`) encodes the odd indexed symbols. -`State1` is initialized first, and then `State2`, and they take turns -decoding a single symbol and updating their state. -For more details on these FSE operations, see the [FSE section](#fse). - -The number of symbols to decode is determined -by tracking bitStream overflow condition: -If updating state after decoding a symbol would require more bits than -remain in the stream, it is assumed that extra bits are 0. Then, -symbols for each of the final states are decoded and the process is complete. - -If this process would produce more weights than the maximum number of decoded -weights (255), then the data is considered corrupted. - -If either of the 2 initial states are absent or truncated, then the data is -considered corrupted. Consequently, it is not possible to encode fewer than -2 weights using this mode. - -#### Conversion from weights to Huffman prefix codes - -All present symbols shall now have a `Weight` value. -It is possible to transform weights into `Number_of_Bits`, using this formula: -``` -Number_of_Bits = (Weight>0) ? Max_Number_of_Bits + 1 - Weight : 0 -``` -In order to determine which prefix code is assigned to each Symbol, -Symbols are first sorted by `Weight`, then by natural sequential order. -Symbols with a `Weight` of zero are removed. -Then, starting from lowest `Weight` (hence highest `Number_of_Bits`), -prefix codes are assigned in ascending order. - -__Example__ : -Let's assume the following list of weights has been decoded: - -| Literal | A | B | C | D | E | F | -| -------- | --- | --- | --- | --- | --- | --- | -| `Weight` | 4 | 3 | 2 | 0 | 1 | 1 | - -Sorted by weight and then natural sequential order, -it gives the following prefix codes distribution: - -| Literal | D | E | F | C | B | A | -| ---------------- | --- | ---- | ---- | ---- | ---- | ---- | -| `Weight` | 0 | 1 | 1 | 2 | 3 | 4 | -| `Number_of_Bits` | 0 | 4 | 4 | 3 | 2 | 1 | -| prefix code | N/A | 0000 | 0001 | 001 | 01 | 1 | -| ascending order | N/A | 0000 | 0001 | 001x | 01xx | 1xxx | - -### Huffman-coded Streams - -Given a Huffman decoding table, -it's possible to decode a Huffman-coded stream. - -Each bitstream must be read _backward_, -that is starting from the end down to the beginning. -Therefore it's necessary to know the size of each bitstream. - -It's also necessary to know exactly which _bit_ is the last one. -This is detected by a final bit flag : -the highest bit of latest byte is a final-bit-flag. -Consequently, a last byte of `0` is not possible. -And the final-bit-flag itself is not part of the useful bitstream. -Hence, the last byte contains between 0 and 7 useful bits. - -Starting from the end, -it's possible to read the bitstream in a __little-endian__ fashion, -keeping track of already used bits. Since the bitstream is encoded in reverse -order, starting from the end read symbols in forward order. - -For example, if the literal sequence `ABEF` was encoded using above prefix code, -it would be encoded (in reverse order) as: - -|Symbol | F | E | B | A | Padding | -|--------|------|------|----|---|---------| -|Encoding|`0000`|`0001`|`01`|`1`| `00001` | - -Resulting in following 2-bytes bitstream : -``` -00010000 00001101 -``` - -Here is an alternative representation with the symbol codes separated by underscore: -``` -0001_0000 00001_1_01 -``` - -Reading highest `Max_Number_of_Bits` bits, -it's possible to compare extracted value to decoding table, -determining the symbol to decode and number of bits to discard. - -The process continues up to reading the required number of symbols per stream. -If a bitstream is not entirely and exactly consumed, -hence reaching exactly its beginning position with _all_ bits consumed, -the decoding process is considered faulty. - - -Dictionary Format ------------------ - -Zstandard is compatible with "raw content" dictionaries, -free of any format restriction, except that they must be at least 8 bytes. -These dictionaries function as if they were just the `Content` part -of a formatted dictionary. - -But dictionaries created by `zstd --train` follow a format, described here. - -__Pre-requisites__ : a dictionary has a size, - defined either by a buffer limit, or a file size. - -| `Magic_Number` | `Dictionary_ID` | `Entropy_Tables` | `Content` | -| -------------- | --------------- | ---------------- | --------- | - -__`Magic_Number`__ : 4 bytes ID, value 0xEC30A437, __little-endian__ format - -__`Dictionary_ID`__ : 4 bytes, stored in __little-endian__ format. - `Dictionary_ID` can be any value, except 0 (which means no `Dictionary_ID`). - It's used by decoders to check if they use the correct dictionary. - -_Reserved ranges :_ -If the dictionary is going to be distributed in a public environment, -the following ranges of `Dictionary_ID` are reserved for some future registrar -and shall not be used : - - - low range : <= 32767 - - high range : >= (2^31) - -Outside of these ranges, any value of `Dictionary_ID` -which is both `>= 32768` and `< (1<<31)` can be used freely, -even in public environment. - - -__`Entropy_Tables`__ : follow the same format as tables in [compressed blocks]. - See the relevant [FSE](#fse-table-description) - and [Huffman](#huffman-tree-description) sections for how to decode these tables. - They are stored in following order : - Huffman tables for literals, FSE table for offsets, - FSE table for match lengths, and FSE table for literals lengths. - These tables populate the Repeat Stats literals mode and - Repeat distribution mode for sequence decoding. - It's finally followed by 3 offset values, populating recent offsets (instead of using `{1,4,8}`), - stored in order, 4-bytes __little-endian__ each, for a total of 12 bytes. - Each recent offset must have a value <= dictionary content size, and cannot equal 0. - -__`Content`__ : The rest of the dictionary is its content. - The content act as a "past" in front of data to compress or decompress, - so it can be referenced in sequence commands. - As long as the amount of data decoded from this frame is less than or - equal to `Window_Size`, sequence commands may specify offsets longer - than the total length of decoded output so far to reference back to the - dictionary, even parts of the dictionary with offsets larger than `Window_Size`. - After the total output has surpassed `Window_Size` however, - this is no longer allowed and the dictionary is no longer accessible. - -[compressed blocks]: #the-format-of-compressed_block - -If a dictionary is provided by an external source, -it should be loaded with great care, its content considered untrusted. - - - -Appendix A - Decoding tables for predefined codes -------------------------------------------------- - -This appendix contains FSE decoding tables -for the predefined literal length, match length, and offset codes. -The tables have been constructed using the algorithm as given above in chapter -"from normalized distribution to decoding tables". -The tables here can be used as examples -to crosscheck that an implementation build its decoding tables correctly. - -#### Literal Length Code: - -| State | Symbol | Number_Of_Bits | Base | -| ----- | ------ | -------------- | ---- | -| 0 | 0 | 4 | 0 | -| 1 | 0 | 4 | 16 | -| 2 | 1 | 5 | 32 | -| 3 | 3 | 5 | 0 | -| 4 | 4 | 5 | 0 | -| 5 | 6 | 5 | 0 | -| 6 | 7 | 5 | 0 | -| 7 | 9 | 5 | 0 | -| 8 | 10 | 5 | 0 | -| 9 | 12 | 5 | 0 | -| 10 | 14 | 6 | 0 | -| 11 | 16 | 5 | 0 | -| 12 | 18 | 5 | 0 | -| 13 | 19 | 5 | 0 | -| 14 | 21 | 5 | 0 | -| 15 | 22 | 5 | 0 | -| 16 | 24 | 5 | 0 | -| 17 | 25 | 5 | 32 | -| 18 | 26 | 5 | 0 | -| 19 | 27 | 6 | 0 | -| 20 | 29 | 6 | 0 | -| 21 | 31 | 6 | 0 | -| 22 | 0 | 4 | 32 | -| 23 | 1 | 4 | 0 | -| 24 | 2 | 5 | 0 | -| 25 | 4 | 5 | 32 | -| 26 | 5 | 5 | 0 | -| 27 | 7 | 5 | 32 | -| 28 | 8 | 5 | 0 | -| 29 | 10 | 5 | 32 | -| 30 | 11 | 5 | 0 | -| 31 | 13 | 6 | 0 | -| 32 | 16 | 5 | 32 | -| 33 | 17 | 5 | 0 | -| 34 | 19 | 5 | 32 | -| 35 | 20 | 5 | 0 | -| 36 | 22 | 5 | 32 | -| 37 | 23 | 5 | 0 | -| 38 | 25 | 4 | 0 | -| 39 | 25 | 4 | 16 | -| 40 | 26 | 5 | 32 | -| 41 | 28 | 6 | 0 | -| 42 | 30 | 6 | 0 | -| 43 | 0 | 4 | 48 | -| 44 | 1 | 4 | 16 | -| 45 | 2 | 5 | 32 | -| 46 | 3 | 5 | 32 | -| 47 | 5 | 5 | 32 | -| 48 | 6 | 5 | 32 | -| 49 | 8 | 5 | 32 | -| 50 | 9 | 5 | 32 | -| 51 | 11 | 5 | 32 | -| 52 | 12 | 5 | 32 | -| 53 | 15 | 6 | 0 | -| 54 | 17 | 5 | 32 | -| 55 | 18 | 5 | 32 | -| 56 | 20 | 5 | 32 | -| 57 | 21 | 5 | 32 | -| 58 | 23 | 5 | 32 | -| 59 | 24 | 5 | 32 | -| 60 | 35 | 6 | 0 | -| 61 | 34 | 6 | 0 | -| 62 | 33 | 6 | 0 | -| 63 | 32 | 6 | 0 | - -#### Match Length Code: - -| State | Symbol | Number_Of_Bits | Base | -| ----- | ------ | -------------- | ---- | -| 0 | 0 | 6 | 0 | -| 1 | 1 | 4 | 0 | -| 2 | 2 | 5 | 32 | -| 3 | 3 | 5 | 0 | -| 4 | 5 | 5 | 0 | -| 5 | 6 | 5 | 0 | -| 6 | 8 | 5 | 0 | -| 7 | 10 | 6 | 0 | -| 8 | 13 | 6 | 0 | -| 9 | 16 | 6 | 0 | -| 10 | 19 | 6 | 0 | -| 11 | 22 | 6 | 0 | -| 12 | 25 | 6 | 0 | -| 13 | 28 | 6 | 0 | -| 14 | 31 | 6 | 0 | -| 15 | 33 | 6 | 0 | -| 16 | 35 | 6 | 0 | -| 17 | 37 | 6 | 0 | -| 18 | 39 | 6 | 0 | -| 19 | 41 | 6 | 0 | -| 20 | 43 | 6 | 0 | -| 21 | 45 | 6 | 0 | -| 22 | 1 | 4 | 16 | -| 23 | 2 | 4 | 0 | -| 24 | 3 | 5 | 32 | -| 25 | 4 | 5 | 0 | -| 26 | 6 | 5 | 32 | -| 27 | 7 | 5 | 0 | -| 28 | 9 | 6 | 0 | -| 29 | 12 | 6 | 0 | -| 30 | 15 | 6 | 0 | -| 31 | 18 | 6 | 0 | -| 32 | 21 | 6 | 0 | -| 33 | 24 | 6 | 0 | -| 34 | 27 | 6 | 0 | -| 35 | 30 | 6 | 0 | -| 36 | 32 | 6 | 0 | -| 37 | 34 | 6 | 0 | -| 38 | 36 | 6 | 0 | -| 39 | 38 | 6 | 0 | -| 40 | 40 | 6 | 0 | -| 41 | 42 | 6 | 0 | -| 42 | 44 | 6 | 0 | -| 43 | 1 | 4 | 32 | -| 44 | 1 | 4 | 48 | -| 45 | 2 | 4 | 16 | -| 46 | 4 | 5 | 32 | -| 47 | 5 | 5 | 32 | -| 48 | 7 | 5 | 32 | -| 49 | 8 | 5 | 32 | -| 50 | 11 | 6 | 0 | -| 51 | 14 | 6 | 0 | -| 52 | 17 | 6 | 0 | -| 53 | 20 | 6 | 0 | -| 54 | 23 | 6 | 0 | -| 55 | 26 | 6 | 0 | -| 56 | 29 | 6 | 0 | -| 57 | 52 | 6 | 0 | -| 58 | 51 | 6 | 0 | -| 59 | 50 | 6 | 0 | -| 60 | 49 | 6 | 0 | -| 61 | 48 | 6 | 0 | -| 62 | 47 | 6 | 0 | -| 63 | 46 | 6 | 0 | - -#### Offset Code: - -| State | Symbol | Number_Of_Bits | Base | -| ----- | ------ | -------------- | ---- | -| 0 | 0 | 5 | 0 | -| 1 | 6 | 4 | 0 | -| 2 | 9 | 5 | 0 | -| 3 | 15 | 5 | 0 | -| 4 | 21 | 5 | 0 | -| 5 | 3 | 5 | 0 | -| 6 | 7 | 4 | 0 | -| 7 | 12 | 5 | 0 | -| 8 | 18 | 5 | 0 | -| 9 | 23 | 5 | 0 | -| 10 | 5 | 5 | 0 | -| 11 | 8 | 4 | 0 | -| 12 | 14 | 5 | 0 | -| 13 | 20 | 5 | 0 | -| 14 | 2 | 5 | 0 | -| 15 | 7 | 4 | 16 | -| 16 | 11 | 5 | 0 | -| 17 | 17 | 5 | 0 | -| 18 | 22 | 5 | 0 | -| 19 | 4 | 5 | 0 | -| 20 | 8 | 4 | 16 | -| 21 | 13 | 5 | 0 | -| 22 | 19 | 5 | 0 | -| 23 | 1 | 5 | 0 | -| 24 | 6 | 4 | 16 | -| 25 | 10 | 5 | 0 | -| 26 | 16 | 5 | 0 | -| 27 | 28 | 5 | 0 | -| 28 | 27 | 5 | 0 | -| 29 | 26 | 5 | 0 | -| 30 | 25 | 5 | 0 | -| 31 | 24 | 5 | 0 | - - - -Appendix B - Resources for implementers -------------------------------------------------- - -An open source reference implementation is available on : -https://github.com/facebook/zstd - -The project contains a frame generator, called [decodeCorpus], -which can be used by any 3rd-party implementation -to verify that a tested decoder is compliant with the specification. - -[decodeCorpus]: https://github.com/facebook/zstd/tree/v1.3.4/tests#decodecorpus---tool-to-generate-zstandard-frames-for-decoder-testing - -`decodeCorpus` generates random valid frames. -A compliant decoder should be able to decode them all, -or at least provide a meaningful error code explaining for which reason it cannot -(memory limit restrictions for example). - - -Version changes ---------------- -- 0.4.3 : clarifications for Huffman prefix code assignment example -- 0.4.2 : refactor FSE table construction process, inspired by Donald Pian -- 0.4.1 : clarifications on a few error scenarios, by Eric Lasota -- 0.4.0 : fixed imprecise behavior for nbSeq==0, detected by Igor Pavlov -- 0.3.9 : clarifications for Huffman-compressed literal sizes. -- 0.3.8 : clarifications for Huffman Blocks and Huffman Tree descriptions. -- 0.3.7 : clarifications for Repeat_Offsets, matching RFC8878 -- 0.3.6 : clarifications for Dictionary_ID -- 0.3.5 : clarifications for Block_Maximum_Size -- 0.3.4 : clarifications for FSE decoding table -- 0.3.3 : clarifications for field Block_Size -- 0.3.2 : remove additional block size restriction on compressed blocks -- 0.3.1 : minor clarification regarding offset history update rules -- 0.3.0 : minor edits to match RFC8478 -- 0.2.9 : clarifications for huffman weights direct representation, by Ulrich Kunitz -- 0.2.8 : clarifications for IETF RFC discuss -- 0.2.7 : clarifications from IETF RFC review, by Vijay Gurbani and Nick Terrell -- 0.2.6 : fixed an error in huffman example, by Ulrich Kunitz -- 0.2.5 : minor typos and clarifications -- 0.2.4 : section restructuring, by Sean Purcell -- 0.2.3 : clarified several details, by Sean Purcell -- 0.2.2 : added predefined codes, by Johannes Rudolph -- 0.2.1 : clarify field names, by Przemyslaw Skibinski -- 0.2.0 : numerous format adjustments for zstd v0.8+ -- 0.1.2 : limit Huffman tree depth to 11 bits -- 0.1.1 : reserved dictID ranges -- 0.1.0 : initial release diff --git a/third_party/zstd/doc/zstd_manual.html b/third_party/zstd/doc/zstd_manual.html deleted file mode 100644 index 485d5ea..0000000 --- a/third_party/zstd/doc/zstd_manual.html +++ /dev/null @@ -1,2237 +0,0 @@ - - - -zstd 1.5.7 Manual - - -

zstd 1.5.7 Manual

-Note: the content of this file has been automatically generated by parsing "zstd.h" -
-

Contents

-
    -
  1. Introduction
  2. -
  3. Version
  4. -
  5. Simple Core API
  6. -
  7. Explicit context
  8. -
  9. Advanced compression API (Requires v1.4.0+)
  10. -
  11. Advanced decompression API (Requires v1.4.0+)
  12. -
  13. Streaming
  14. -
  15. Streaming compression - HowTo
  16. -
  17. Streaming decompression - HowTo
  18. -
  19. Simple dictionary API
  20. -
  21. Bulk processing dictionary API
  22. -
  23. Dictionary helper functions
  24. -
  25. Advanced dictionary and prefix API (Requires v1.4.0+)
  26. -
  27. experimental API (static linking only)
  28. -
  29. Frame header and size functions
  30. -
  31. Memory management
  32. -
  33. Advanced compression functions
  34. -
  35. Advanced decompression functions
  36. -
  37. Advanced streaming functions
  38. -
  39. Buffer-less and synchronous inner streaming functions (DEPRECATED)
  40. -
  41. Buffer-less streaming compression (synchronous mode)
  42. -
  43. Buffer-less streaming decompression (synchronous mode)
  44. -
  45. Block level API (DEPRECATED)
  46. -
-
-

Introduction

-  zstd, short for Zstandard, is a fast lossless compression algorithm, targeting
-  real-time compression scenarios at zlib-level and better compression ratios.
-  The zstd compression library provides in-memory compression and decompression
-  functions.
-
-  The library supports regular compression levels from 1 up to ZSTD_maxCLevel(),
-  which is currently 22. Levels >= 20, labeled `--ultra`, should be used with
-  caution, as they require more memory. The library also offers negative
-  compression levels, which extend the range of speed vs. ratio preferences.
-  The lower the level, the faster the speed (at the cost of compression).
-
-  Compression can be done in:
-    - a single step (described as Simple API)
-    - a single step, reusing a context (described as Explicit context)
-    - unbounded multiple steps (described as Streaming compression)
-
-  The compression ratio achievable on small data can be highly improved using
-  a dictionary. Dictionary compression can be performed in:
-    - a single step (described as Simple dictionary API)
-    - a single step, reusing a dictionary (described as Bulk-processing
-      dictionary API)
-
-  Advanced experimental functions can be accessed using
-  `#define ZSTD_STATIC_LINKING_ONLY` before including zstd.h.
-
-  Advanced experimental APIs should never be used with a dynamically-linked
-  library. They are not "stable"; their definitions or signatures may change in
-  the future. Only static linking is allowed.
-
- -

Version


-
-
unsigned ZSTD_versionNumber(void);
-

Return runtime library version, the value is (MAJOR*100*100 + MINOR*100 + RELEASE). -


- -
const char* ZSTD_versionString(void);
-

Return runtime library version, like "1.4.5". Requires v1.3.0+. -


- -

Simple Core API


-
-
size_t ZSTD_compress( void* dst, size_t dstCapacity,
-                const void* src, size_t srcSize,
-                      int compressionLevel);
-

Compresses `src` content as a single zstd compressed frame into already allocated `dst`. - NOTE: Providing `dstCapacity >= ZSTD_compressBound(srcSize)` guarantees that zstd will have - enough space to successfully compress the data. - @return : compressed size written into `dst` (<= `dstCapacity), - or an error code if it fails (which can be tested using ZSTD_isError()). -


- -
size_t ZSTD_decompress( void* dst, size_t dstCapacity,
-                  const void* src, size_t compressedSize);
-

`compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames. - Multiple compressed frames can be decompressed at once with this method. - The result will be the concatenation of all decompressed frames, back to back. - `dstCapacity` is an upper bound of originalSize to regenerate. - First frame's decompressed size can be extracted using ZSTD_getFrameContentSize(). - If maximum upper bound isn't known, prefer using streaming mode to decompress data. - @return : the number of bytes decompressed into `dst` (<= `dstCapacity`), - or an errorCode if it fails (which can be tested using ZSTD_isError()). -


- -

Decompression helper functions


-
#define ZSTD_CONTENTSIZE_UNKNOWN (0ULL - 1)
-#define ZSTD_CONTENTSIZE_ERROR   (0ULL - 2)
-unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize);
-

`src` should point to the start of a ZSTD encoded frame. - `srcSize` must be at least as large as the frame header. - hint : any size >= `ZSTD_frameHeaderSize_max` is large enough. - @return : - decompressed size of `src` frame content, if known - - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined - - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) - note 1 : a 0 return value means the frame is valid but "empty". - note 2 : decompressed size is an optional field, it may not be present (typically in streaming mode). - When `return==ZSTD_CONTENTSIZE_UNKNOWN`, data to decompress could be any size. - In which case, it's necessary to use streaming mode to decompress data. - Optionally, application can rely on some implicit limit, - as ZSTD_decompress() only needs an upper bound of decompressed size. - (For example, data could be necessarily cut into blocks <= 16 KB). - note 3 : decompressed size is always present when compression is completed using single-pass functions, - such as ZSTD_compress(), ZSTD_compressCCtx() ZSTD_compress_usingDict() or ZSTD_compress_usingCDict(). - note 4 : decompressed size can be very large (64-bits value), - potentially larger than what local system can handle as a single memory segment. - In which case, it's necessary to use streaming mode to decompress data. - note 5 : If source is untrusted, decompressed size could be wrong or intentionally modified. - Always ensure return value fits within application's authorized limits. - Each application can set its own limits. - note 6 : This function replaces ZSTD_getDecompressedSize() -


- -
ZSTD_DEPRECATED("Replaced by ZSTD_getFrameContentSize")
-ZSTDLIB_API
-unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize);
-

NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize(). - Both functions work the same way, but ZSTD_getDecompressedSize() blends - "empty", "unknown" and "error" results to the same return value (0), - while ZSTD_getFrameContentSize() gives them separate return values. - @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise. -


- -
size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize);
-

`src` should point to the start of a ZSTD frame or skippable frame. - `srcSize` must be >= first frame size - @return : the compressed size of the first frame starting at `src`, - suitable to pass as `srcSize` to `ZSTD_decompress` or similar, - or an error code if input is invalid -


- -

Compression helper functions


-
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00ULL : 0xFF00FF00U)
-#define ZSTD_COMPRESSBOUND(srcSize)   (((size_t)(srcSize) >= ZSTD_MAX_INPUT_SIZE) ? 0 : (srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((128<<10) - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0))  /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
-size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case single-pass scenario */
-

maximum compressed size in worst case single-pass scenario. - When invoking `ZSTD_compress()`, or any other one-pass compression function, - it's recommended to provide @dstCapacity >= ZSTD_compressBound(srcSize) - as it eliminates one potential failure scenario, - aka not enough room in dst buffer to write the compressed frame. - Note : ZSTD_compressBound() itself can fail, if @srcSize >= ZSTD_MAX_INPUT_SIZE . - In which case, ZSTD_compressBound() will return an error code - which can be tested using ZSTD_isError(). - - ZSTD_COMPRESSBOUND() : - same as ZSTD_compressBound(), but as a macro. - It can be used to produce constants, which can be useful for static allocation, - for example to size a static array on stack. - Will produce constant value 0 if srcSize is too large. - -


- -

Error helper functions

#include "zstd_errors.h" /* list of errors */
-/* ZSTD_isError() :
- * Most ZSTD_* functions returning a size_t value can be tested for error,
- * using ZSTD_isError().
- * @return 1 if error, 0 otherwise
- */
-unsigned     ZSTD_isError(size_t result);      /*!< tells if a `size_t` function result is an error code */
-ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult); /* convert a result into an error code, which can be compared to error enum list */
-const char*  ZSTD_getErrorName(size_t result); /*!< provides readable string from a function result */
-int          ZSTD_minCLevel(void);             /*!< minimum negative compression level allowed, requires v1.4.0+ */
-int          ZSTD_maxCLevel(void);             /*!< maximum compression level available */
-int          ZSTD_defaultCLevel(void);         /*!< default compression level, specified by ZSTD_CLEVEL_DEFAULT, requires v1.5.0+ */
-

-

Explicit context


-
-

Compression context

  When compressing many times,
-  it is recommended to allocate a compression context just once,
-  and reuse it for each successive compression operation.
-  This will make the workload easier for system's memory.
-  Note : re-using context is just a speed / resource optimization.
-         It doesn't change the compression ratio, which remains identical.
-  Note 2: For parallel execution in multi-threaded environments,
-         use one different context per thread .
- 
-
typedef struct ZSTD_CCtx_s ZSTD_CCtx;
-ZSTD_CCtx* ZSTD_createCCtx(void);
-size_t     ZSTD_freeCCtx(ZSTD_CCtx* cctx);  /* compatible with NULL pointer */
-

-
size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
-                         void* dst, size_t dstCapacity,
-                   const void* src, size_t srcSize,
-                         int compressionLevel);
-

Same as ZSTD_compress(), using an explicit ZSTD_CCtx. - Important : in order to mirror `ZSTD_compress()` behavior, - this function compresses at the requested compression level, - __ignoring any other advanced parameter__ . - If any advanced parameter was set using the advanced API, - they will all be reset. Only @compressionLevel remains. - -


- -

Decompression context

  When decompressing many times,
-  it is recommended to allocate a context only once,
-  and reuse it for each successive compression operation.
-  This will make workload friendlier for system's memory.
-  Use one context per thread for parallel execution. 
-
typedef struct ZSTD_DCtx_s ZSTD_DCtx;
-ZSTD_DCtx* ZSTD_createDCtx(void);
-size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);  /* accept NULL pointer */
-

-
size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx,
-                           void* dst, size_t dstCapacity,
-                     const void* src, size_t srcSize);
-

Same as ZSTD_decompress(), - requires an allocated ZSTD_DCtx. - Compatible with sticky parameters (see below). - -


- -

Advanced compression API (Requires v1.4.0+)


-
-
typedef enum { ZSTD_fast=1,
-               ZSTD_dfast=2,
-               ZSTD_greedy=3,
-               ZSTD_lazy=4,
-               ZSTD_lazy2=5,
-               ZSTD_btlazy2=6,
-               ZSTD_btopt=7,
-               ZSTD_btultra=8,
-               ZSTD_btultra2=9
-               /* note : new strategies _might_ be added in the future.
-                         Only the order (from fast to strong) is guaranteed */
-} ZSTD_strategy;
-

-
typedef enum {
-
-    /* compression parameters
-     * Note: When compressing with a ZSTD_CDict these parameters are superseded
-     * by the parameters used to construct the ZSTD_CDict.
-     * See ZSTD_CCtx_refCDict() for more info (superseded-by-cdict). */
-    ZSTD_c_compressionLevel=100, /* Set compression parameters according to pre-defined cLevel table.
-                              * Note that exact compression parameters are dynamically determined,
-                              * depending on both compression level and srcSize (when known).
-                              * Default level is ZSTD_CLEVEL_DEFAULT==3.
-                              * Special: value 0 means default, which is controlled by ZSTD_CLEVEL_DEFAULT.
-                              * Note 1 : it's possible to pass a negative compression level.
-                              * Note 2 : setting a level does not automatically set all other compression parameters
-                              *   to default. Setting this will however eventually dynamically impact the compression
-                              *   parameters which have not been manually set. The manually set
-                              *   ones will 'stick'. */
-    /* Advanced compression parameters :
-     * It's possible to pin down compression parameters to some specific values.
-     * In which case, these values are no longer dynamically selected by the compressor */
-    ZSTD_c_windowLog=101,    /* Maximum allowed back-reference distance, expressed as power of 2.
-                              * This will set a memory budget for streaming decompression,
-                              * with larger values requiring more memory
-                              * and typically compressing more.
-                              * Must be clamped between ZSTD_WINDOWLOG_MIN and ZSTD_WINDOWLOG_MAX.
-                              * Special: value 0 means "use default windowLog".
-                              * Note: Using a windowLog greater than ZSTD_WINDOWLOG_LIMIT_DEFAULT
-                              *       requires explicitly allowing such size at streaming decompression stage. */
-    ZSTD_c_hashLog=102,      /* Size of the initial probe table, as a power of 2.
-                              * Resulting memory usage is (1 << (hashLog+2)).
-                              * Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.
-                              * Larger tables improve compression ratio of strategies <= dFast,
-                              * and improve speed of strategies > dFast.
-                              * Special: value 0 means "use default hashLog". */
-    ZSTD_c_chainLog=103,     /* Size of the multi-probe search table, as a power of 2.
-                              * Resulting memory usage is (1 << (chainLog+2)).
-                              * Must be clamped between ZSTD_CHAINLOG_MIN and ZSTD_CHAINLOG_MAX.
-                              * Larger tables result in better and slower compression.
-                              * This parameter is useless for "fast" strategy.
-                              * It's still useful when using "dfast" strategy,
-                              * in which case it defines a secondary probe table.
-                              * Special: value 0 means "use default chainLog". */
-    ZSTD_c_searchLog=104,    /* Number of search attempts, as a power of 2.
-                              * More attempts result in better and slower compression.
-                              * This parameter is useless for "fast" and "dFast" strategies.
-                              * Special: value 0 means "use default searchLog". */
-    ZSTD_c_minMatch=105,     /* Minimum size of searched matches.
-                              * Note that Zstandard can still find matches of smaller size,
-                              * it just tweaks its search algorithm to look for this size and larger.
-                              * Larger values increase compression and decompression speed, but decrease ratio.
-                              * Must be clamped between ZSTD_MINMATCH_MIN and ZSTD_MINMATCH_MAX.
-                              * Note that currently, for all strategies < btopt, effective minimum is 4.
-                              *                    , for all strategies > fast, effective maximum is 6.
-                              * Special: value 0 means "use default minMatchLength". */
-    ZSTD_c_targetLength=106, /* Impact of this field depends on strategy.
-                              * For strategies btopt, btultra & btultra2:
-                              *     Length of Match considered "good enough" to stop search.
-                              *     Larger values make compression stronger, and slower.
-                              * For strategy fast:
-                              *     Distance between match sampling.
-                              *     Larger values make compression faster, and weaker.
-                              * Special: value 0 means "use default targetLength". */
-    ZSTD_c_strategy=107,     /* See ZSTD_strategy enum definition.
-                              * The higher the value of selected strategy, the more complex it is,
-                              * resulting in stronger and slower compression.
-                              * Special: value 0 means "use default strategy". */
-
-    ZSTD_c_targetCBlockSize=130, /* v1.5.6+
-                                  * Attempts to fit compressed block size into approximately targetCBlockSize.
-                                  * Bound by ZSTD_TARGETCBLOCKSIZE_MIN and ZSTD_TARGETCBLOCKSIZE_MAX.
-                                  * Note that it's not a guarantee, just a convergence target (default:0).
-                                  * No target when targetCBlockSize == 0.
-                                  * This is helpful in low bandwidth streaming environments to improve end-to-end latency,
-                                  * when a client can make use of partial documents (a prominent example being Chrome).
-                                  * Note: this parameter is stable since v1.5.6.
-                                  * It was present as an experimental parameter in earlier versions,
-                                  * but it's not recommended using it with earlier library versions
-                                  * due to massive performance regressions.
-                                  */
-    /* LDM mode parameters */
-    ZSTD_c_enableLongDistanceMatching=160, /* Enable long distance matching.
-                                     * This parameter is designed to improve compression ratio
-                                     * for large inputs, by finding large matches at long distance.
-                                     * It increases memory usage and window size.
-                                     * Note: enabling this parameter increases default ZSTD_c_windowLog to 128 MB
-                                     * except when expressly set to a different value.
-                                     * Note: will be enabled by default if ZSTD_c_windowLog >= 128 MB and
-                                     * compression strategy >= ZSTD_btopt (== compression level 16+) */
-    ZSTD_c_ldmHashLog=161,   /* Size of the table for long distance matching, as a power of 2.
-                              * Larger values increase memory usage and compression ratio,
-                              * but decrease compression speed.
-                              * Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX
-                              * default: windowlog - 7.
-                              * Special: value 0 means "automatically determine hashlog". */
-    ZSTD_c_ldmMinMatch=162,  /* Minimum match size for long distance matcher.
-                              * Larger/too small values usually decrease compression ratio.
-                              * Must be clamped between ZSTD_LDM_MINMATCH_MIN and ZSTD_LDM_MINMATCH_MAX.
-                              * Special: value 0 means "use default value" (default: 64). */
-    ZSTD_c_ldmBucketSizeLog=163, /* Log size of each bucket in the LDM hash table for collision resolution.
-                              * Larger values improve collision resolution but decrease compression speed.
-                              * The maximum value is ZSTD_LDM_BUCKETSIZELOG_MAX.
-                              * Special: value 0 means "use default value" (default: 3). */
-    ZSTD_c_ldmHashRateLog=164, /* Frequency of inserting/looking up entries into the LDM hash table.
-                              * Must be clamped between 0 and (ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN).
-                              * Default is MAX(0, (windowLog - ldmHashLog)), optimizing hash table usage.
-                              * Larger values improve compression speed.
-                              * Deviating far from default value will likely result in a compression ratio decrease.
-                              * Special: value 0 means "automatically determine hashRateLog". */
-
-    /* frame parameters */
-    ZSTD_c_contentSizeFlag=200, /* Content size will be written into frame header _whenever known_ (default:1)
-                              * Content size must be known at the beginning of compression.
-                              * This is automatically the case when using ZSTD_compress2(),
-                              * For streaming scenarios, content size must be provided with ZSTD_CCtx_setPledgedSrcSize() */
-    ZSTD_c_checksumFlag=201, /* A 32-bits checksum of content is written at end of frame (default:0) */
-    ZSTD_c_dictIDFlag=202,   /* When applicable, dictionary's ID is written into frame header (default:1) */
-
-    /* multi-threading parameters */
-    /* These parameters are only active if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
-     * Otherwise, trying to set any other value than default (0) will be a no-op and return an error.
-     * In a situation where it's unknown if the linked library supports multi-threading or not,
-     * setting ZSTD_c_nbWorkers to any value >= 1 and consulting the return value provides a quick way to check this property.
-     */
-    ZSTD_c_nbWorkers=400,    /* Select how many threads will be spawned to compress in parallel.
-                              * When nbWorkers >= 1, triggers asynchronous mode when invoking ZSTD_compressStream*() :
-                              * ZSTD_compressStream*() consumes input and flush output if possible, but immediately gives back control to caller,
-                              * while compression is performed in parallel, within worker thread(s).
-                              * (note : a strong exception to this rule is when first invocation of ZSTD_compressStream2() sets ZSTD_e_end :
-                              *  in which case, ZSTD_compressStream2() delegates to ZSTD_compress2(), which is always a blocking call).
-                              * More workers improve speed, but also increase memory usage.
-                              * Default value is `0`, aka "single-threaded mode" : no worker is spawned,
-                              * compression is performed inside Caller's thread, and all invocations are blocking */
-    ZSTD_c_jobSize=401,      /* Size of a compression job. This value is enforced only when nbWorkers >= 1.
-                              * Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
-                              * 0 means default, which is dynamically determined based on compression parameters.
-                              * Job size must be a minimum of overlap size, or ZSTDMT_JOBSIZE_MIN (= 512 KB), whichever is largest.
-                              * The minimum size is automatically and transparently enforced. */
-    ZSTD_c_overlapLog=402,   /* Control the overlap size, as a fraction of window size.
-                              * The overlap size is an amount of data reloaded from previous job at the beginning of a new job.
-                              * It helps preserve compression ratio, while each job is compressed in parallel.
-                              * This value is enforced only when nbWorkers >= 1.
-                              * Larger values increase compression ratio, but decrease speed.
-                              * Possible values range from 0 to 9 :
-                              * - 0 means "default" : value will be determined by the library, depending on strategy
-                              * - 1 means "no overlap"
-                              * - 9 means "full overlap", using a full window size.
-                              * Each intermediate rank increases/decreases load size by a factor 2 :
-                              * 9: full window;  8: w/2;  7: w/4;  6: w/8;  5:w/16;  4: w/32;  3:w/64;  2:w/128;  1:no overlap;  0:default
-                              * default value varies between 6 and 9, depending on strategy */
-
-    /* note : additional experimental parameters are also available
-     * within the experimental section of the API.
-     * At the time of this writing, they include :
-     * ZSTD_c_rsyncable
-     * ZSTD_c_format
-     * ZSTD_c_forceMaxWindow
-     * ZSTD_c_forceAttachDict
-     * ZSTD_c_literalCompressionMode
-     * ZSTD_c_srcSizeHint
-     * ZSTD_c_enableDedicatedDictSearch
-     * ZSTD_c_stableInBuffer
-     * ZSTD_c_stableOutBuffer
-     * ZSTD_c_blockDelimiters
-     * ZSTD_c_validateSequences
-     * ZSTD_c_blockSplitterLevel
-     * ZSTD_c_splitAfterSequences
-     * ZSTD_c_useRowMatchFinder
-     * ZSTD_c_prefetchCDictTables
-     * ZSTD_c_enableSeqProducerFallback
-     * ZSTD_c_maxBlockSize
-     * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
-     * note : never ever use experimentalParam? names directly;
-     *        also, the enums values themselves are unstable and can still change.
-     */
-     ZSTD_c_experimentalParam1=500,
-     ZSTD_c_experimentalParam2=10,
-     ZSTD_c_experimentalParam3=1000,
-     ZSTD_c_experimentalParam4=1001,
-     ZSTD_c_experimentalParam5=1002,
-     /* was ZSTD_c_experimentalParam6=1003; is now ZSTD_c_targetCBlockSize */
-     ZSTD_c_experimentalParam7=1004,
-     ZSTD_c_experimentalParam8=1005,
-     ZSTD_c_experimentalParam9=1006,
-     ZSTD_c_experimentalParam10=1007,
-     ZSTD_c_experimentalParam11=1008,
-     ZSTD_c_experimentalParam12=1009,
-     ZSTD_c_experimentalParam13=1010,
-     ZSTD_c_experimentalParam14=1011,
-     ZSTD_c_experimentalParam15=1012,
-     ZSTD_c_experimentalParam16=1013,
-     ZSTD_c_experimentalParam17=1014,
-     ZSTD_c_experimentalParam18=1015,
-     ZSTD_c_experimentalParam19=1016,
-     ZSTD_c_experimentalParam20=1017
-} ZSTD_cParameter;
-

-
typedef struct {
-    size_t error;
-    int lowerBound;
-    int upperBound;
-} ZSTD_bounds;
-

-
ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam);
-

All parameters must belong to an interval with lower and upper bounds, - otherwise they will either trigger an error or be automatically clamped. - @return : a structure, ZSTD_bounds, which contains - - an error status field, which must be tested using ZSTD_isError() - - lower and upper bounds, both inclusive - -


- -
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value);
-

Set one compression parameter, selected by enum ZSTD_cParameter. - All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). - Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). - Setting a parameter is generally only possible during frame initialization (before starting compression). - Exception : when using multi-threading mode (nbWorkers >= 1), - the following parameters can be updated _during_ compression (within same frame): - => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. - new parameters will be active for next job only (after a flush()). - @return : an error code (which can be tested using ZSTD_isError()). - -


- -
size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize);
-

Total input data size to be compressed as a single frame. - Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. - This value will also be controlled at end of frame, and trigger an error if not respected. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame. - In order to mean "unknown content size", pass constant ZSTD_CONTENTSIZE_UNKNOWN. - ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame. - Note 2 : pledgedSrcSize is only valid once, for the next frame. - It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN. - Note 3 : Whenever all input data is provided and consumed in a single round, - for example with ZSTD_compress2(), - or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end), - this value is automatically overridden by srcSize instead. - -


- -
typedef enum {
-    ZSTD_reset_session_only = 1,
-    ZSTD_reset_parameters = 2,
-    ZSTD_reset_session_and_parameters = 3
-} ZSTD_ResetDirective;
-

-
size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset);
-

There are 2 different things that can be reset, independently or jointly : - - The session : will stop compressing current frame, and make CCtx ready to start a new one. - Useful after an error, or to interrupt any ongoing compression. - Any internal data not yet flushed is cancelled. - Compression parameters and dictionary remain unchanged. - They will be used to compress next frame. - Resetting session never fails. - - The parameters : changes all parameters back to "default". - This also removes any reference to any dictionary or external sequence producer. - Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing) - otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError()) - - Both : similar to resetting the session, followed by resetting parameters. - -


- -
size_t ZSTD_compress2( ZSTD_CCtx* cctx,
-                       void* dst, size_t dstCapacity,
-                 const void* src, size_t srcSize);
-

Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. - (note that this entry point doesn't even expose a compression level parameter). - ZSTD_compress2() always starts a new frame. - Should cctx hold data from a previously unfinished frame, everything about it is forgotten. - - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - - The function is always blocking, returns when compression is completed. - NOTE: Providing `dstCapacity >= ZSTD_compressBound(srcSize)` guarantees that zstd will have - enough space to successfully compress the data, though it is possible it fails for other reasons. - @return : compressed size written into `dst` (<= `dstCapacity), - or an error code if it fails (which can be tested using ZSTD_isError()). - -


- -

Advanced decompression API (Requires v1.4.0+)


-
-
typedef enum {
-
-    ZSTD_d_windowLogMax=100, /* Select a size limit (in power of 2) beyond which
-                              * the streaming API will refuse to allocate memory buffer
-                              * in order to protect the host from unreasonable memory requirements.
-                              * This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode.
-                              * By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
-                              * Special: value 0 means "use default maximum windowLog". */
-
-    /* note : additional experimental parameters are also available
-     * within the experimental section of the API.
-     * At the time of this writing, they include :
-     * ZSTD_d_format
-     * ZSTD_d_stableOutBuffer
-     * ZSTD_d_forceIgnoreChecksum
-     * ZSTD_d_refMultipleDDicts
-     * ZSTD_d_disableHuffmanAssembly
-     * ZSTD_d_maxBlockSize
-     * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
-     * note : never ever use experimentalParam? names directly
-     */
-     ZSTD_d_experimentalParam1=1000,
-     ZSTD_d_experimentalParam2=1001,
-     ZSTD_d_experimentalParam3=1002,
-     ZSTD_d_experimentalParam4=1003,
-     ZSTD_d_experimentalParam5=1004,
-     ZSTD_d_experimentalParam6=1005
-
-} ZSTD_dParameter;
-

-
ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam);
-

All parameters must belong to an interval with lower and upper bounds, - otherwise they will either trigger an error or be automatically clamped. - @return : a structure, ZSTD_bounds, which contains - - an error status field, which must be tested using ZSTD_isError() - - both lower and upper bounds, inclusive - -


- -
size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int value);
-

Set one compression parameter, selected by enum ZSTD_dParameter. - All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds(). - Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). - Setting a parameter is only possible during frame initialization (before starting decompression). - @return : 0, or an error code (which can be tested using ZSTD_isError()). - -


- -
size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset);
-

Return a DCtx to clean state. - Session and parameters can be reset jointly or separately. - Parameters can only be reset when no active frame is being decompressed. - @return : 0, or an error code, which can be tested with ZSTD_isError() - -


- -

Streaming


-
-
typedef struct ZSTD_inBuffer_s {
-  const void* src;    /**< start of input buffer */
-  size_t size;        /**< size of input buffer */
-  size_t pos;         /**< position where reading stopped. Will be updated. Necessarily 0 <= pos <= size */
-} ZSTD_inBuffer;
-

-
typedef struct ZSTD_outBuffer_s {
-  void*  dst;         /**< start of output buffer */
-  size_t size;        /**< size of output buffer */
-  size_t pos;         /**< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size */
-} ZSTD_outBuffer;
-

-

Streaming compression - HowTo

-  A ZSTD_CStream object is required to track streaming operation.
-  Use ZSTD_createCStream() and ZSTD_freeCStream() to create/release resources.
-  ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
-  It is recommended to reuse ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
-
-  For parallel execution, use one separate ZSTD_CStream per thread.
-
-  note : since v1.3.0, ZSTD_CStream and ZSTD_CCtx are the same thing.
-
-  Parameters are sticky : when starting a new compression on the same context,
-  it will reuse the same sticky parameters as previous compression session.
-  When in doubt, it's recommended to fully initialize the context before usage.
-  Use ZSTD_CCtx_reset() to reset the context and ZSTD_CCtx_setParameter(),
-  ZSTD_CCtx_setPledgedSrcSize(), or ZSTD_CCtx_loadDictionary() and friends to
-  set more specific parameters, the pledged source size, or load a dictionary.
-
-  Use ZSTD_compressStream2() with ZSTD_e_continue as many times as necessary to
-  consume input stream. The function will automatically update both `pos`
-  fields within `input` and `output`.
-  Note that the function may not consume the entire input, for example, because
-  the output buffer is already full, in which case `input.pos < input.size`.
-  The caller must check if input has been entirely consumed.
-  If not, the caller must make some room to receive more compressed data,
-  and then present again remaining input data.
-  note: ZSTD_e_continue is guaranteed to make some forward progress when called,
-        but doesn't guarantee maximal forward progress. This is especially relevant
-        when compressing with multiple threads. The call won't block if it can
-        consume some input, but if it can't it will wait for some, but not all,
-        output to be flushed.
- @return : provides a minimum amount of data remaining to be flushed from internal buffers
-           or an error code, which can be tested using ZSTD_isError().
-
-  At any moment, it's possible to flush whatever data might remain stuck within internal buffer,
-  using ZSTD_compressStream2() with ZSTD_e_flush. `output->pos` will be updated.
-  Note that, if `output->size` is too small, a single invocation with ZSTD_e_flush might not be enough (return code > 0).
-  In which case, make some room to receive more compressed data, and call again ZSTD_compressStream2() with ZSTD_e_flush.
-  You must continue calling ZSTD_compressStream2() with ZSTD_e_flush until it returns 0, at which point you can change the
-  operation.
-  note: ZSTD_e_flush will flush as much output as possible, meaning when compressing with multiple threads, it will
-        block until the flush is complete or the output buffer is full.
-  @return : 0 if internal buffers are entirely flushed,
-            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
-            or an error code, which can be tested using ZSTD_isError().
-
-  Calling ZSTD_compressStream2() with ZSTD_e_end instructs to finish a frame.
-  It will perform a flush and write frame epilogue.
-  The epilogue is required for decoders to consider a frame completed.
-  flush operation is the same, and follows same rules as calling ZSTD_compressStream2() with ZSTD_e_flush.
-  You must continue calling ZSTD_compressStream2() with ZSTD_e_end until it returns 0, at which point you are free to
-  start a new frame.
-  note: ZSTD_e_end will flush as much output as possible, meaning when compressing with multiple threads, it will
-        block until the flush is complete or the output buffer is full.
-  @return : 0 if frame fully completed and fully flushed,
-            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
-            or an error code, which can be tested using ZSTD_isError().
-
- 
-
- -
typedef ZSTD_CCtx ZSTD_CStream;  /**< CCtx and CStream are now effectively same object (>= v1.3.0) */
-

-

ZSTD_CStream management functions

ZSTD_CStream* ZSTD_createCStream(void);
-size_t ZSTD_freeCStream(ZSTD_CStream* zcs);  /* accept NULL pointer */
-

-

Streaming compression functions

typedef enum {
-    ZSTD_e_continue=0, /* collect more data, encoder decides when to output compressed result, for optimal compression ratio */
-    ZSTD_e_flush=1,    /* flush any data provided so far,
-                        * it creates (at least) one new block, that can be decoded immediately on reception;
-                        * frame will continue: any future data can still reference previously compressed data, improving compression.
-                        * note : multithreaded compression will block to flush as much output as possible. */
-    ZSTD_e_end=2       /* flush any remaining data _and_ close current frame.
-                        * note that frame is only closed after compressed data is fully flushed (return value == 0).
-                        * After that point, any additional data starts a new frame.
-                        * note : each frame is independent (does not reference any content from previous frame).
-                        : note : multithreaded compression will block to flush as much output as possible. */
-} ZSTD_EndDirective;
-

-
size_t ZSTD_compressStream2( ZSTD_CCtx* cctx,
-                             ZSTD_outBuffer* output,
-                             ZSTD_inBuffer* input,
-                             ZSTD_EndDirective endOp);
-

Behaves about the same as ZSTD_compressStream, with additional control on end directive. - - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode) - - output->pos must be <= dstCapacity, input->pos must be <= srcSize - - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - - endOp must be a valid directive - - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller. - - When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available, - and then immediately returns, just indicating that there is some data remaining to be flushed. - The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte. - - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking. - - @return provides a minimum amount of data remaining to be flushed from internal buffers - or an error code, which can be tested using ZSTD_isError(). - if @return != 0, flush is not fully completed, there is still some data left within internal buffers. - This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers. - For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed. - - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0), - only ZSTD_e_end or ZSTD_e_flush operations are allowed. - Before starting a new compression job, or changing compression parameters, - it is required to fully flush internal buffers. - - note: if an operation ends with an error, it may leave @cctx in an undefined state. - Therefore, it's UB to invoke ZSTD_compressStream2() of ZSTD_compressStream() on such a state. - In order to be re-employed after an error, a state must be reset, - which can be done explicitly (ZSTD_CCtx_reset()), - or is sometimes implied by methods starting a new compression job (ZSTD_initCStream(), ZSTD_compressCCtx()) - -


- -
size_t ZSTD_CStreamInSize(void);    /**< recommended size for input buffer */
-

-
size_t ZSTD_CStreamOutSize(void);   /**< recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block. */
-

-
size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel);
-/*!
- * Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue).
- * NOTE: The return value is different. ZSTD_compressStream() returns a hint for
- * the next read size (if non-zero and not an error). ZSTD_compressStream2()
- * returns the minimum nb of bytes left to flush (if non-zero and not an error).
- */
-size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
-/*! Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush). */
-size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
-/*! Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end). */
-size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
-

- ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) - ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); - - Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API - to compress with a dictionary. - -


- -

Streaming decompression - HowTo

-  A ZSTD_DStream object is required to track streaming operations.
-  Use ZSTD_createDStream() and ZSTD_freeDStream() to create/release resources.
-  ZSTD_DStream objects can be re-employed multiple times.
-
-  Use ZSTD_initDStream() to start a new decompression operation.
- @return : recommended first input size
-  Alternatively, use advanced API to set specific properties.
-
-  Use ZSTD_decompressStream() repetitively to consume your input.
-  The function will update both `pos` fields.
-  If `input.pos < input.size`, some input has not been consumed.
-  It's up to the caller to present again remaining data.
-
-  The function tries to flush all data decoded immediately, respecting output buffer size.
-  If `output.pos < output.size`, decoder has flushed everything it could.
-
-  However, when `output.pos == output.size`, it's more difficult to know.
-  If @return > 0, the frame is not complete, meaning
-  either there is still some data left to flush within internal buffers,
-  or there is more input to read to complete the frame (or both).
-  In which case, call ZSTD_decompressStream() again to flush whatever remains in the buffer.
-  Note : with no additional input provided, amount of data flushed is necessarily <= ZSTD_BLOCKSIZE_MAX.
- @return : 0 when a frame is completely decoded and fully flushed,
-        or an error code, which can be tested using ZSTD_isError(),
-        or any other value > 0, which means there is still some decoding or flushing to do to complete current frame :
-                                the return value is a suggested next input size (just a hint for better latency)
-                                that will never request more than the remaining content of the compressed frame.
- 
-
- -
typedef ZSTD_DCtx ZSTD_DStream;  /**< DCtx and DStream are now effectively same object (>= v1.3.0) */
-

-

ZSTD_DStream management functions

ZSTD_DStream* ZSTD_createDStream(void);
-size_t ZSTD_freeDStream(ZSTD_DStream* zds);  /* accept NULL pointer */
-

-

Streaming decompression functions


-
size_t ZSTD_initDStream(ZSTD_DStream* zds);
-

Initialize/reset DStream state for new decompression operation. - Call before new decompression operation using same DStream. - - Note : This function is redundant with the advanced API and equivalent to: - ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); - ZSTD_DCtx_refDDict(zds, NULL); - -


- -
size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
-

Streaming decompression function. - Call repetitively to consume full input updating it as necessary. - Function will update both input and output `pos` fields exposing current state via these fields: - - `input.pos < input.size`, some input remaining and caller should provide remaining input - on the next call. - - `output.pos < output.size`, decoder flushed internal output buffer. - - `output.pos == output.size`, unflushed data potentially present in the internal buffers, - check ZSTD_decompressStream() @return value, - if > 0, invoke it again to flush remaining data to output. - Note : with no additional input, amount of data flushed <= ZSTD_BLOCKSIZE_MAX. - - @return : 0 when a frame is completely decoded and fully flushed, - or an error code, which can be tested using ZSTD_isError(), - or any other value > 0, which means there is some decoding or flushing to do to complete current frame. - - Note: when an operation returns with an error code, the @zds state may be left in undefined state. - It's UB to invoke `ZSTD_decompressStream()` on such a state. - In order to re-use such a state, it must be first reset, - which can be done explicitly (`ZSTD_DCtx_reset()`), - or is implied for operations starting some new decompression job (`ZSTD_initDStream`, `ZSTD_decompressDCtx()`, `ZSTD_decompress_usingDict()`) - -


- -
size_t ZSTD_DStreamInSize(void);    /*!< recommended size for input buffer */
-

-
size_t ZSTD_DStreamOutSize(void);   /*!< recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances. */
-

-

Simple dictionary API


-
-
size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx,
-                               void* dst, size_t dstCapacity,
-                         const void* src, size_t srcSize,
-                         const void* dict,size_t dictSize,
-                               int compressionLevel);
-

Compression at an explicit compression level using a Dictionary. - A dictionary can be any arbitrary data segment (also called a prefix), - or a buffer with specified information (see zdict.h). - Note : This function loads the dictionary, resulting in significant startup delay. - It's intended for a dictionary used only once. - Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used. -


- -
size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx,
-                                 void* dst, size_t dstCapacity,
-                           const void* src, size_t srcSize,
-                           const void* dict,size_t dictSize);
-

Decompression using a known Dictionary. - Dictionary must be identical to the one used during compression. - Note : This function loads the dictionary, resulting in significant startup delay. - It's intended for a dictionary used only once. - Note : When `dict == NULL || dictSize < 8` no dictionary is used. -


- -

Bulk processing dictionary API


-
-
ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize,
-                             int compressionLevel);
-

When compressing multiple messages or blocks using the same dictionary, - it's recommended to digest the dictionary only once, since it's a costly operation. - ZSTD_createCDict() will create a state from digesting a dictionary. - The resulting state can be used for future compression operations with very limited startup cost. - ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. - @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. - Note 1 : Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate @dictBuffer content. - Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, - in which case the only thing that it transports is the @compressionLevel. - This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, - expecting a ZSTD_CDict parameter with any data, including those without a known dictionary. -


- -
size_t      ZSTD_freeCDict(ZSTD_CDict* CDict);
-

Function frees memory allocated by ZSTD_createCDict(). - If a NULL pointer is passed, no operation is performed. -


- -
size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
-                                void* dst, size_t dstCapacity,
-                          const void* src, size_t srcSize,
-                          const ZSTD_CDict* cdict);
-

Compression using a digested Dictionary. - Recommended when same dictionary is used multiple times. - Note : compression level is _decided at dictionary creation time_, - and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no) -


- -
ZSTD_DDict* ZSTD_createDDict(const void* dictBuffer, size_t dictSize);
-

Create a digested dictionary, ready to start decompression operation without startup delay. - dictBuffer can be released after DDict creation, as its content is copied inside DDict. -


- -
size_t      ZSTD_freeDDict(ZSTD_DDict* ddict);
-

Function frees memory allocated with ZSTD_createDDict() - If a NULL pointer is passed, no operation is performed. -


- -
size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx,
-                                  void* dst, size_t dstCapacity,
-                            const void* src, size_t srcSize,
-                            const ZSTD_DDict* ddict);
-

Decompression using a digested Dictionary. - Recommended when same dictionary is used multiple times. -


- -

Dictionary helper functions


-
-
unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize);
-

Provides the dictID stored within dictionary. - if @return == 0, the dictionary is not conformant with Zstandard specification. - It can still be loaded, but as a content-only dictionary. -


- -
unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict);
-

Provides the dictID of the dictionary loaded into `cdict`. - If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. - Non-conformant dictionaries can still be loaded, but as content-only dictionaries. -


- -
unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict);
-

Provides the dictID of the dictionary loaded into `ddict`. - If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. - Non-conformant dictionaries can still be loaded, but as content-only dictionaries. -


- -
unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
-

Provides the dictID required to decompressed the frame stored within `src`. - If @return == 0, the dictID could not be decoded. - This could for one of the following reasons : - - The frame does not require a dictionary to be decoded (most common case). - - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information. - Note : this use case also happens when using a non-conformant dictionary. - - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`). - - This is not a Zstandard frame. - When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code. -


- -

Advanced dictionary and prefix API (Requires v1.4.0+)

- This API allows dictionaries to be used with ZSTD_compress2(),
- ZSTD_compressStream2(), and ZSTD_decompressDCtx().
- Dictionaries are sticky, they remain valid when same context is reused,
- they only reset when the context is reset
- with ZSTD_reset_parameters or ZSTD_reset_session_and_parameters.
- In contrast, Prefixes are single-use.
-
- -
size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
-

Create an internal CDict from `dict` buffer. - Decompression will have to use same dictionary. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary, - meaning "return to no-dictionary mode". - Note 1 : Dictionary is sticky, it will be used for all future compressed frames, - until parameters are reset, a new dictionary is loaded, or the dictionary - is explicitly invalidated by loading a NULL dictionary. - Note 2 : Loading a dictionary involves building tables. - It's also a CPU consuming operation, with non-negligible impact on latency. - Tables are dependent on compression parameters, and for this reason, - compression parameters can no longer be changed after loading a dictionary. - Note 3 :`dict` content will be copied internally. - Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. - In such a case, dictionary buffer must outlive its users. - Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() - to precisely select how dictionary content must be interpreted. - Note 5 : This method does not benefit from LDM (long distance mode). - If you want to employ LDM on some large dictionary content, - prefer employing ZSTD_CCtx_refPrefix() described below. - -


- -
size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict);
-

Reference a prepared dictionary, to be used for all future compressed frames. - Note that compression parameters are enforced from within CDict, - and supersede any compression parameter previously set within CCtx. - The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. - The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. - The dictionary will remain valid for future compressed frames using same CCtx. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Special : Referencing a NULL CDict means "return to no-dictionary mode". - Note 1 : Currently, only one dictionary can be managed. - Referencing a new dictionary effectively "discards" any previous one. - Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx. -


- -
size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx,
-                     const void* prefix, size_t prefixSize);
-

Reference a prefix (single-usage dictionary) for next compressed frame. - A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end). - Decompression will need same prefix to properly regenerate data. - Compressing with a prefix is similar in outcome as performing a diff and compressing it, - but performs much faster, especially during decompression (compression speed is tunable with compression level). - This method is compatible with LDM (long distance mode). - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary - Note 1 : Prefix buffer is referenced. It **must** outlive compression. - Its content must remain unmodified during compression. - Note 2 : If the intention is to diff some large src data blob with some prior version of itself, - ensure that the window size is large enough to contain the entire source. - See ZSTD_c_windowLog. - Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters. - It's a CPU consuming operation, with non-negligible impact on latency. - If there is a need to use the same prefix multiple times, consider loadDictionary instead. - Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent). - Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation. -


- -
size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
-

Create an internal DDict from dict buffer, to be used to decompress all future frames. - The dictionary remains valid for all future frames, until explicitly invalidated, or - a new dictionary is loaded. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary, - meaning "return to no-dictionary mode". - Note 1 : Loading a dictionary involves building tables, - which has a non-negligible impact on CPU usage and latency. - It's recommended to "load once, use many times", to amortize the cost - Note 2 :`dict` content will be copied internally, so `dict` can be released after loading. - Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead. - Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of - how dictionary content is loaded and interpreted. - -


- -
size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
-

Reference a prepared dictionary, to be used to decompress next frames. - The dictionary remains active for decompression of future frames using same DCtx. - - If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function - will store the DDict references in a table, and the DDict used for decompression - will be determined at decompression time, as per the dict ID in the frame. - The memory for the table is allocated on the first call to refDDict, and can be - freed with ZSTD_freeDCtx(). - - If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary - will be managed, and referencing a dictionary effectively "discards" any previous one. - - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Special: referencing a NULL DDict means "return to no-dictionary mode". - Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx. - -


- -
size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx,
-                     const void* prefix, size_t prefixSize);
-

Reference a prefix (single-usage dictionary) to decompress next frame. - This is the reverse operation of ZSTD_CCtx_refPrefix(), - and must use the same prefix as the one used during compression. - Prefix is **only used once**. Reference is discarded at end of frame. - End of frame is reached when ZSTD_decompressStream() returns 0. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary - Note 2 : Prefix buffer is referenced. It **must** outlive decompression. - Prefix buffer must remain unmodified up to the end of frame, - reached when ZSTD_decompressStream() returns 0. - Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent). - Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section) - Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. - A full dictionary is more costly, as it requires building tables. - -


- -
size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx);
-size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx);
-size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs);
-size_t ZSTD_sizeof_DStream(const ZSTD_DStream* zds);
-size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict);
-size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
-

These functions give the _current_ memory usage of selected object. - Note that object memory usage can evolve (increase or decrease) over time. -


- -

experimental API (static linking only)

- The following symbols and constants
- are not planned to join "stable API" status in the near future.
- They can still change in future versions.
- Some of them are planned to remain in the static_only section indefinitely.
- Some of them might be removed in the future (especially when redundant with existing stable functions)
- 
-
- -
typedef struct {
-    unsigned int offset;      /* The offset of the match. (NOT the same as the offset code)
-                               * If offset == 0 and matchLength == 0, this sequence represents the last
-                               * literals in the block of litLength size.
-                               */
-
-    unsigned int litLength;   /* Literal length of the sequence. */
-    unsigned int matchLength; /* Match length of the sequence. */
-
-                              /* Note: Users of this API may provide a sequence with matchLength == litLength == offset == 0.
-                               * In this case, we will treat the sequence as a marker for a block boundary.
-                               */
-
-    unsigned int rep;         /* Represents which repeat offset is represented by the field 'offset'.
-                               * Ranges from [0, 3].
-                               *
-                               * Repeat offsets are essentially previous offsets from previous sequences sorted in
-                               * recency order. For more detail, see doc/zstd_compression_format.md
-                               *
-                               * If rep == 0, then 'offset' does not contain a repeat offset.
-                               * If rep > 0:
-                               *  If litLength != 0:
-                               *      rep == 1 --> offset == repeat_offset_1
-                               *      rep == 2 --> offset == repeat_offset_2
-                               *      rep == 3 --> offset == repeat_offset_3
-                               *  If litLength == 0:
-                               *      rep == 1 --> offset == repeat_offset_2
-                               *      rep == 2 --> offset == repeat_offset_3
-                               *      rep == 3 --> offset == repeat_offset_1 - 1
-                               *
-                               * Note: This field is optional. ZSTD_generateSequences() will calculate the value of
-                               * 'rep', but repeat offsets do not necessarily need to be calculated from an external
-                               * sequence provider perspective. For example, ZSTD_compressSequences() does not
-                               * use this 'rep' field at all (as of now).
-                               */
-} ZSTD_Sequence;
-

-
typedef struct {
-    unsigned windowLog;       /**< largest match distance : larger == more compression, more memory needed during decompression */
-    unsigned chainLog;        /**< fully searched segment : larger == more compression, slower, more memory (useless for fast) */
-    unsigned hashLog;         /**< dispatch table : larger == faster, more memory */
-    unsigned searchLog;       /**< nb of searches : larger == more compression, slower */
-    unsigned minMatch;        /**< match length searched : larger == faster decompression, sometimes less compression */
-    unsigned targetLength;    /**< acceptable match size for optimal parser (only) : larger == more compression, slower */
-    ZSTD_strategy strategy;   /**< see ZSTD_strategy definition above */
-} ZSTD_compressionParameters;
-

-
typedef struct {
-    int contentSizeFlag; /**< 1: content size will be in frame header (when known) */
-    int checksumFlag;    /**< 1: generate a 32-bits checksum using XXH64 algorithm at end of frame, for error detection */
-    int noDictIDFlag;    /**< 1: no dictID will be saved into frame header (dictID is only useful for dictionary compression) */
-} ZSTD_frameParameters;
-

-
typedef struct {
-    ZSTD_compressionParameters cParams;
-    ZSTD_frameParameters fParams;
-} ZSTD_parameters;
-

-
typedef enum {
-    ZSTD_dct_auto = 0,       /* dictionary is "full" when starting with ZSTD_MAGIC_DICTIONARY, otherwise it is "rawContent" */
-    ZSTD_dct_rawContent = 1, /* ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARY */
-    ZSTD_dct_fullDict = 2    /* refuses to load a dictionary if it does not respect Zstandard's specification, starting with ZSTD_MAGIC_DICTIONARY */
-} ZSTD_dictContentType_e;
-

-
typedef enum {
-    ZSTD_dlm_byCopy = 0,  /**< Copy dictionary content internally */
-    ZSTD_dlm_byRef = 1    /**< Reference dictionary content -- the dictionary buffer must outlive its users. */
-} ZSTD_dictLoadMethod_e;
-

-
typedef enum {
-    ZSTD_f_zstd1 = 0,           /* zstd frame format, specified in zstd_compression_format.md (default) */
-    ZSTD_f_zstd1_magicless = 1  /* Variant of zstd frame format, without initial 4-bytes magic number.
-                                 * Useful to save 4 bytes per generated frame.
-                                 * Decoder cannot recognise automatically this format, requiring this instruction. */
-} ZSTD_format_e;
-

-
typedef enum {
-    /* Note: this enum controls ZSTD_d_forceIgnoreChecksum */
-    ZSTD_d_validateChecksum = 0,
-    ZSTD_d_ignoreChecksum = 1
-} ZSTD_forceIgnoreChecksum_e;
-

-
typedef enum {
-    /* Note: this enum controls ZSTD_d_refMultipleDDicts */
-    ZSTD_rmd_refSingleDDict = 0,
-    ZSTD_rmd_refMultipleDDicts = 1
-} ZSTD_refMultipleDDicts_e;
-

-
typedef enum {
-    /* Note: this enum and the behavior it controls are effectively internal
-     * implementation details of the compressor. They are expected to continue
-     * to evolve and should be considered only in the context of extremely
-     * advanced performance tuning.
-     *
-     * Zstd currently supports the use of a CDict in three ways:
-     *
-     * - The contents of the CDict can be copied into the working context. This
-     *   means that the compression can search both the dictionary and input
-     *   while operating on a single set of internal tables. This makes
-     *   the compression faster per-byte of input. However, the initial copy of
-     *   the CDict's tables incurs a fixed cost at the beginning of the
-     *   compression. For small compressions (< 8 KB), that copy can dominate
-     *   the cost of the compression.
-     *
-     * - The CDict's tables can be used in-place. In this model, compression is
-     *   slower per input byte, because the compressor has to search two sets of
-     *   tables. However, this model incurs no start-up cost (as long as the
-     *   working context's tables can be reused). For small inputs, this can be
-     *   faster than copying the CDict's tables.
-     *
-     * - The CDict's tables are not used at all, and instead we use the working
-     *   context alone to reload the dictionary and use params based on the source
-     *   size. See ZSTD_compress_insertDictionary() and ZSTD_compress_usingDict().
-     *   This method is effective when the dictionary sizes are very small relative
-     *   to the input size, and the input size is fairly large to begin with.
-     *
-     * Zstd has a simple internal heuristic that selects which strategy to use
-     * at the beginning of a compression. However, if experimentation shows that
-     * Zstd is making poor choices, it is possible to override that choice with
-     * this enum.
-     */
-    ZSTD_dictDefaultAttach = 0, /* Use the default heuristic. */
-    ZSTD_dictForceAttach   = 1, /* Never copy the dictionary. */
-    ZSTD_dictForceCopy     = 2, /* Always copy the dictionary. */
-    ZSTD_dictForceLoad     = 3  /* Always reload the dictionary */
-} ZSTD_dictAttachPref_e;
-

-
typedef enum {
-  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
-                               *   Negative compression levels will be uncompressed, and positive compression
-                               *   levels will be compressed. */
-  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
-                               *   emitted if Huffman compression is not profitable. */
-  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
-} ZSTD_literalCompressionMode_e;
-

-
typedef enum {
-  /* Note: This enum controls features which are conditionally beneficial.
-   * Zstd can take a decision on whether or not to enable the feature (ZSTD_ps_auto),
-   * but setting the switch to ZSTD_ps_enable or ZSTD_ps_disable force enable/disable the feature.
-   */
-  ZSTD_ps_auto = 0,         /* Let the library automatically determine whether the feature shall be enabled */
-  ZSTD_ps_enable = 1,       /* Force-enable the feature */
-  ZSTD_ps_disable = 2       /* Do not use the feature */
-} ZSTD_ParamSwitch_e;
-

-

Frame header and size functions


-
-
ZSTDLIB_STATIC_API unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize);
-

`src` should point to the start of a series of ZSTD encoded and/or skippable frames - `srcSize` must be the _exact_ size of this series - (i.e. there should be a frame boundary at `src + srcSize`) - @return : - decompressed size of all data in all successive frames - - if the decompressed size cannot be determined: ZSTD_CONTENTSIZE_UNKNOWN - - if an error occurred: ZSTD_CONTENTSIZE_ERROR - - note 1 : decompressed size is an optional field, that may not be present, especially in streaming mode. - When `return==ZSTD_CONTENTSIZE_UNKNOWN`, data to decompress could be any size. - In which case, it's necessary to use streaming mode to decompress data. - note 2 : decompressed size is always present when compression is done with ZSTD_compress() - note 3 : decompressed size can be very large (64-bits value), - potentially larger than what local system can handle as a single memory segment. - In which case, it's necessary to use streaming mode to decompress data. - note 4 : If source is untrusted, decompressed size could be wrong or intentionally modified. - Always ensure result fits within application's authorized limits. - Each application can set its own limits. - note 5 : ZSTD_findDecompressedSize handles multiple frames, and so it must traverse the input to - read each contained frame header. This is fast as most of the data is skipped, - however it does mean that all frame data must be present and valid. -


- -
ZSTDLIB_STATIC_API unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize);
-

`src` should point to the start of a series of ZSTD encoded and/or skippable frames - `srcSize` must be the _exact_ size of this series - (i.e. there should be a frame boundary at `src + srcSize`) - @return : - upper-bound for the decompressed size of all data in all successive frames - - if an error occurred: ZSTD_CONTENTSIZE_ERROR - - note 1 : an error can occur if `src` contains an invalid or incorrectly formatted frame. - note 2 : the upper-bound is exact when the decompressed size field is available in every ZSTD encoded frame of `src`. - in this case, `ZSTD_findDecompressedSize` and `ZSTD_decompressBound` return the same value. - note 3 : when the decompressed size field isn't available, the upper-bound for that frame is calculated by: - upper-bound = # blocks * min(128 KB, Window_Size) - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize);
-

srcSize must be >= ZSTD_FRAMEHEADERSIZE_PREFIX. - @return : size of the Frame Header, - or an error code (if srcSize is too small) -


- -
typedef enum { ZSTD_frame, ZSTD_skippableFrame } ZSTD_FrameType_e;
-

-
typedef struct {
-    unsigned long long frameContentSize; /* if == ZSTD_CONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty" */
-    unsigned long long windowSize;       /* can be very large, up to <= frameContentSize */
-    unsigned blockSizeMax;
-    ZSTD_FrameType_e frameType;          /* if == ZSTD_skippableFrame, frameContentSize is the size of skippable content */
-    unsigned headerSize;
-    unsigned dictID;
-    unsigned checksumFlag;
-    unsigned _reserved1;
-    unsigned _reserved2;
-} ZSTD_frameHeader;
-

-
ZSTDLIB_STATIC_API size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize);   /**< doesn't consume input */
-/*! ZSTD_getFrameHeader_advanced() :
- *  same as ZSTD_getFrameHeader(),
- *  with added capability to select a format (like ZSTD_f_zstd1_magicless) */
-ZSTDLIB_STATIC_API size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format);
-

decode Frame Header, or requires larger `srcSize`. - @return : 0, `zfhPtr` is correctly filled, - >0, `srcSize` is too small, value is wanted `srcSize` amount, - or an error code, which can be tested using ZSTD_isError() -


- -
ZSTDLIB_STATIC_API size_t ZSTD_decompressionMargin(const void* src, size_t srcSize);
-

Zstd supports in-place decompression, where the input and output buffers overlap. - In this case, the output buffer must be at least (Margin + Output_Size) bytes large, - and the input buffer must be at the end of the output buffer. - - _______________________ Output Buffer ________________________ - | | - | ____ Input Buffer ____| - | | | - v v v - |---------------------------------------|-----------|----------| - ^ ^ ^ - |___________________ Output_Size ___________________|_ Margin _| - - NOTE: See also ZSTD_DECOMPRESSION_MARGIN(). - NOTE: This applies only to single-pass decompression through ZSTD_decompress() or - ZSTD_decompressDCtx(). - NOTE: This function supports multi-frame input. - - @param src The compressed frame(s) - @param srcSize The size of the compressed frame(s) - @returns The decompression margin or an error that can be checked with ZSTD_isError(). - -


- -
#define ZSTD_DECOMPRESSION_MARGIN(originalSize, blockSize) ((size_t)(                                              \
-        ZSTD_FRAMEHEADERSIZE_MAX                                                              /* Frame header */ + \
-        4                                                                                         /* checksum */ + \
-        ((originalSize) == 0 ? 0 : 3 * (((originalSize) + (blockSize) - 1) / blockSize)) /* 3 bytes per block */ + \
-        (blockSize)                                                                    /* One block of margin */   \
-    ))
-

Similar to ZSTD_decompressionMargin(), but instead of computing the margin from - the compressed frame, compute it from the original size and the blockSizeLog. - See ZSTD_decompressionMargin() for details. - - WARNING: This macro does not support multi-frame input, the input must be a single - zstd frame. If you need that support use the function, or implement it yourself. - - @param originalSize The original uncompressed size of the data. - @param blockSize The block size == MIN(windowSize, ZSTD_BLOCKSIZE_MAX). - Unless you explicitly set the windowLog smaller than - ZSTD_BLOCKSIZELOG_MAX you can just use ZSTD_BLOCKSIZE_MAX. - -


- -
typedef enum {
-  ZSTD_sf_noBlockDelimiters = 0,         /* ZSTD_Sequence[] has no block delimiters, just sequences */
-  ZSTD_sf_explicitBlockDelimiters = 1    /* ZSTD_Sequence[] contains explicit block delimiters */
-} ZSTD_SequenceFormat_e;
-

-
ZSTDLIB_STATIC_API size_t ZSTD_sequenceBound(size_t srcSize);
-

`srcSize` : size of the input buffer - @return : upper-bound for the number of sequences that can be generated - from a buffer of srcSize bytes - - note : returns number of sequences - to get bytes, multiply by sizeof(ZSTD_Sequence). - -


- -
ZSTD_DEPRECATED("For debugging only, will be replaced by ZSTD_extractSequences()")
-ZSTDLIB_STATIC_API size_t
-ZSTD_generateSequences(ZSTD_CCtx* zc,
-           ZSTD_Sequence* outSeqs, size_t outSeqsCapacity,
-           const void* src, size_t srcSize);
-

WARNING: This function is meant for debugging and informational purposes ONLY! - Its implementation is flawed, and it will be deleted in a future version. - It is not guaranteed to succeed, as there are several cases where it will give - up and fail. You should NOT use this function in production code. - - This function is deprecated, and will be removed in a future version. - - Generate sequences using ZSTD_compress2(), given a source buffer. - - @param zc The compression context to be used for ZSTD_compress2(). Set any - compression parameters you need on this context. - @param outSeqs The output sequences buffer of size @p outSeqsSize - @param outSeqsCapacity The size of the output sequences buffer. - ZSTD_sequenceBound(srcSize) is an upper bound on the number - of sequences that can be generated. - @param src The source buffer to generate sequences from of size @p srcSize. - @param srcSize The size of the source buffer. - - Each block will end with a dummy sequence - with offset == 0, matchLength == 0, and litLength == length of last literals. - litLength may be == 0, and if so, then the sequence of (of: 0 ml: 0 ll: 0) - simply acts as a block delimiter. - - @returns The number of sequences generated, necessarily less than - ZSTD_sequenceBound(srcSize), or an error code that can be checked - with ZSTD_isError(). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize);
-

Given an array of ZSTD_Sequence, remove all sequences that represent block delimiters/last literals - by merging them into the literals of the next sequence. - - As such, the final generated result has no explicit representation of block boundaries, - and the final last literals segment is not represented in the sequences. - - The output of this function can be fed into ZSTD_compressSequences() with CCtx - setting of ZSTD_c_blockDelimiters as ZSTD_sf_noBlockDelimiters - @return : number of sequences left after merging - -


- -
ZSTDLIB_STATIC_API size_t
-ZSTD_compressSequences(ZSTD_CCtx* cctx,
-           void* dst, size_t dstCapacity,
-     const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
-     const void* src, size_t srcSize);
-

Compress an array of ZSTD_Sequence, associated with @src buffer, into dst. - @src contains the entire input (not just the literals). - If @srcSize > sum(sequence.length), the remaining bytes are considered all literals - If a dictionary is included, then the cctx should reference the dict (see: ZSTD_CCtx_refCDict(), ZSTD_CCtx_loadDictionary(), etc.). - The entire source is compressed into a single frame. - - The compression behavior changes based on cctx params. In particular: - If ZSTD_c_blockDelimiters == ZSTD_sf_noBlockDelimiters, the array of ZSTD_Sequence is expected to contain - no block delimiters (defined in ZSTD_Sequence). Block boundaries are roughly determined based on - the block size derived from the cctx, and sequences may be split. This is the default setting. - - If ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, the array of ZSTD_Sequence is expected to contain - valid block delimiters (defined in ZSTD_Sequence). Behavior is undefined if no block delimiters are provided. - - When ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, it's possible to decide generating repcodes - using the advanced parameter ZSTD_c_repcodeResolution. Repcodes will improve compression ratio, though the benefit - can vary greatly depending on Sequences. On the other hand, repcode resolution is an expensive operation. - By default, it's disabled at low (<10) compression levels, and enabled above the threshold (>=10). - ZSTD_c_repcodeResolution makes it possible to directly manage this processing in either direction. - - If ZSTD_c_validateSequences == 0, this function blindly accepts the Sequences provided. Invalid Sequences cause undefined - behavior. If ZSTD_c_validateSequences == 1, then the function will detect invalid Sequences (see doc/zstd_compression_format.md for - specifics regarding offset/matchlength requirements) and then bail out and return an error. - - In addition to the two adjustable experimental params, there are other important cctx params. - - ZSTD_c_minMatch MUST be set as less than or equal to the smallest match generated by the match finder. It has a minimum value of ZSTD_MINMATCH_MIN. - - ZSTD_c_compressionLevel accordingly adjusts the strength of the entropy coder, as it would in typical compression. - - ZSTD_c_windowLog affects offset validation: this function will return an error at higher debug levels if a provided offset - is larger than what the spec allows for a given window log and dictionary (if present). See: doc/zstd_compression_format.md - - Note: Repcodes are, as of now, always re-calculated within this function, ZSTD_Sequence.rep is effectively unused. - Dev Note: Once ability to ingest repcodes become available, the explicit block delims mode must respect those repcodes exactly, - and cannot emit an RLE block that disagrees with the repcode history. - @return : final compressed size, or a ZSTD error code. - -


- -
ZSTDLIB_STATIC_API size_t
-ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
-                      void* dst, size_t dstCapacity,
-                const ZSTD_Sequence* inSeqs, size_t nbSequences,
-                const void* literals, size_t litSize, size_t litCapacity,
-                size_t decompressedSize);
-

This is a variant of ZSTD_compressSequences() which, - instead of receiving (src,srcSize) as input parameter, receives (literals,litSize), - aka all the literals, already extracted and laid out into a single continuous buffer. - This can be useful if the process generating the sequences also happens to generate the buffer of literals, - thus skipping an extraction + caching stage. - It's a speed optimization, useful when the right conditions are met, - but it also features the following limitations: - - Only supports explicit delimiter mode - - Currently does not support Sequences validation (so input Sequences are trusted) - - Not compatible with frame checksum, which must be disabled - - If any block is incompressible, will fail and return an error - - @litSize must be == sum of all @.litLength fields in @inSeqs. Any discrepancy will generate an error. - - the buffer @literals must have a size @litCapacity which is larger than @litSize by at least 8 bytes. - - @decompressedSize must be correct, and correspond to the sum of all Sequences. Any discrepancy will generate an error. - @return : final compressed size, or a ZSTD error code. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity,
-                                const void* src, size_t srcSize, unsigned magicVariant);
-

Generates a zstd skippable frame containing data given by src, and writes it to dst buffer. - - Skippable frames begin with a 4-byte magic number. There are 16 possible choices of magic number, - ranging from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15. - As such, the parameter magicVariant controls the exact skippable frame magic number variant used, so - the magic number used will be ZSTD_MAGIC_SKIPPABLE_START + magicVariant. - - Returns an error if destination buffer is not large enough, if the source size is not representable - with a 4-byte unsigned int, or if the parameter magicVariant is greater than 15 (and therefore invalid). - - @return : number of bytes written or a ZSTD error. - -


- -
size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, unsigned* magicVariant,
-                                const void* src, size_t srcSize);
-

Retrieves a zstd skippable frame containing data given by src, and writes it to dst buffer. - - The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, - i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested - in the magicVariant. - - Returns an error if destination buffer is not large enough, or if the frame is not skippable. - - @return : number of bytes written or a ZSTD error. - -


- -
unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size);
-

Tells if the content of `buffer` starts with a valid Frame Identifier for a skippable frame. - -


- -

Memory management


-
-
ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize(int maxCompressionLevel);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateDCtxSize(void);
-

These functions make it possible to estimate memory usage - of a future {D,C}Ctx, before its creation. - This is useful in combination with ZSTD_initStatic(), - which makes it possible to employ a static buffer for ZSTD_CCtx* state. - - ZSTD_estimateCCtxSize() will provide a memory budget large enough - to compress data of any size using one-shot compression ZSTD_compressCCtx() or ZSTD_compress2() - associated with any compression level up to max specified one. - The estimate will assume the input may be arbitrarily large, - which is the worst case. - - Note that the size estimation is specific for one-shot compression, - it is not valid for streaming (see ZSTD_estimateCStreamSize*()) - nor other potential ways of using a ZSTD_CCtx* state. - - When srcSize can be bound by a known and rather "small" value, - this knowledge can be used to provide a tighter budget estimation - because the ZSTD_CCtx* state will need less memory for small inputs. - This tighter estimation can be provided by employing more advanced functions - ZSTD_estimateCCtxSize_usingCParams(), which can be used in tandem with ZSTD_getCParams(), - and ZSTD_estimateCCtxSize_usingCCtxParams(), which can be used in tandem with ZSTD_CCtxParams_setParameter(). - Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limits. - - Note : only single-threaded compression is supported. - ZSTD_estimateCCtxSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize(int maxCompressionLevel);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateDStreamSize(size_t maxWindowSize);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize);
-

ZSTD_estimateCStreamSize() will provide a memory budget large enough for streaming compression - using any compression level up to the max specified one. - It will also consider src size to be arbitrarily "large", which is a worst case scenario. - If srcSize is known to always be small, ZSTD_estimateCStreamSize_usingCParams() can provide a tighter estimation. - ZSTD_estimateCStreamSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel. - ZSTD_estimateCStreamSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParams_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_c_nbWorkers is >= 1. - Note : CStream size estimation is only correct for single-threaded compression. - ZSTD_estimateCStreamSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. - Note 2 : ZSTD_estimateCStreamSize* functions are not compatible with the Block-Level Sequence Producer API at this time. - Size estimates assume that no external sequence producer is registered. - - ZSTD_DStream memory budget depends on frame's window Size. - This information can be passed manually, using ZSTD_estimateDStreamSize, - or deducted from a valid frame Header, using ZSTD_estimateDStreamSize_fromFrame(); - Any frame requesting a window size larger than max specified one will be rejected. - Note : if streaming is init with function ZSTD_init?Stream_usingDict(), - an internal ?Dict will be created, which additional size is not estimated here. - In this case, get total size by adding ZSTD_estimate?DictSize - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, ZSTD_dictLoadMethod_e dictLoadMethod);
-ZSTDLIB_STATIC_API size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod);
-

ZSTD_estimateCDictSize() will bet that src size is relatively "small", and content is copied, like ZSTD_createCDict(). - ZSTD_estimateCDictSize_advanced() makes it possible to control compression parameters precisely, like ZSTD_createCDict_advanced(). - Note : dictionaries created by reference (`ZSTD_dlm_byRef`) are logically smaller. - -


- -
ZSTDLIB_STATIC_API ZSTD_CCtx*    ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize);
-ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_initStaticCStream(void* workspace, size_t workspaceSize);    /**< same as ZSTD_initStaticCCtx() */
-

Initialize an object using a pre-allocated fixed-size buffer. - workspace: The memory area to emplace the object into. - Provided pointer *must be 8-bytes aligned*. - Buffer must outlive object. - workspaceSize: Use ZSTD_estimate*Size() to determine - how large workspace must be to support target scenario. - @return : pointer to object (same address as workspace, just different type), - or NULL if error (size too small, incorrect alignment, etc.) - Note : zstd will never resize nor malloc() when using a static buffer. - If the object requires more memory than available, - zstd will just error out (typically ZSTD_error_memory_allocation). - Note 2 : there is no corresponding "free" function. - Since workspace is allocated externally, it must be freed externally too. - Note 3 : cParams : use ZSTD_getCParams() to convert a compression level - into its associated cParams. - Limitation 1 : currently not compatible with internal dictionary creation, triggered by - ZSTD_CCtx_loadDictionary(), ZSTD_initCStream_usingDict() or ZSTD_initDStream_usingDict(). - Limitation 2 : static cctx currently not compatible with multi-threading. - Limitation 3 : static dctx is incompatible with legacy support. - -


- -
ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_initStaticDStream(void* workspace, size_t workspaceSize);    /**< same as ZSTD_initStaticDCtx() */
-

-
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
-typedef void  (*ZSTD_freeFunction) (void* opaque, void* address);
-typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
-static
-#ifdef __GNUC__
-__attribute__((__unused__))
-#endif
-

These prototypes make it possible to pass your own allocation/free functions. - ZSTD_customMem is provided at creation time, using ZSTD_create*_advanced() variants listed below. - All allocation/free operations will be completed using these custom variants instead of regular ones. - -


- -
ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL };  /**< this constant defers to stdlib's functions */
-

-
typedef struct POOL_ctx_s ZSTD_threadPool;
-ZSTDLIB_STATIC_API ZSTD_threadPool* ZSTD_createThreadPool(size_t numThreads);
-ZSTDLIB_STATIC_API void ZSTD_freeThreadPool (ZSTD_threadPool* pool);  /* accept NULL pointer */
-ZSTDLIB_STATIC_API size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx* cctx, ZSTD_threadPool* pool);
-

These prototypes make it possible to share a thread pool among multiple compression contexts. - This can limit resources for applications with multiple threads where each one uses - a threaded compression mode (via ZSTD_c_nbWorkers parameter). - ZSTD_createThreadPool creates a new thread pool with a given number of threads. - Note that the lifetime of such pool must exist while being used. - ZSTD_CCtx_refThreadPool assigns a thread pool to a context (use NULL argument value - to use an internal thread pool). - ZSTD_freeThreadPool frees a thread pool, accepts NULL pointer. - -


- -

Advanced compression functions


-
-
ZSTDLIB_STATIC_API ZSTD_CDict* ZSTD_createCDict_byReference(const void* dictBuffer, size_t dictSize, int compressionLevel);
-

Create a digested dictionary for compression - Dictionary content is just referenced, not duplicated. - As a consequence, `dictBuffer` **must** outlive CDict, - and its content must remain unmodified throughout the lifetime of CDict. - note: equivalent to ZSTD_createCDict_advanced(), with dictLoadMethod==ZSTD_dlm_byRef -


- -
ZSTDLIB_STATIC_API ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long estimatedSrcSize, size_t dictSize);
-

@return ZSTD_compressionParameters structure for a selected compression level and estimated srcSize. - `estimatedSrcSize` value is optional, select 0 if not known -


- -
ZSTDLIB_STATIC_API ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long estimatedSrcSize, size_t dictSize);
-

same as ZSTD_getCParams(), but @return a full `ZSTD_parameters` object instead of sub-component `ZSTD_compressionParameters`. - All fields of `ZSTD_frameParameters` are set to default : contentSize=1, checksum=0, noDictID=0 -


- -
ZSTDLIB_STATIC_API size_t ZSTD_checkCParams(ZSTD_compressionParameters params);
-

Ensure param values remain within authorized range. - @return 0 on success, or an error code (can be checked with ZSTD_isError()) -


- -
ZSTDLIB_STATIC_API ZSTD_compressionParameters ZSTD_adjustCParams(ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize);
-

optimize params for a given `srcSize` and `dictSize`. - `srcSize` can be unknown, in which case use ZSTD_CONTENTSIZE_UNKNOWN. - `dictSize` must be `0` when there is no dictionary. - cPar can be invalid : all parameters will be clamped within valid range in the @return struct. - This function never fails (wide contract) -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters cparams);
-

Set all parameters provided within @p cparams into the working @p cctx. - Note : if modifying parameters during compression (MT mode only), - note that changes to the .windowLog parameter will be ignored. - @return 0 on success, or an error code (can be checked with ZSTD_isError()). - On failure, no parameters are updated. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setFParams(ZSTD_CCtx* cctx, ZSTD_frameParameters fparams);
-

Set all parameters provided within @p fparams into the working @p cctx. - @return 0 on success, or an error code (can be checked with ZSTD_isError()). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setParams(ZSTD_CCtx* cctx, ZSTD_parameters params);
-

Set all parameters provided within @p params into the working @p cctx. - @return 0 on success, or an error code (can be checked with ZSTD_isError()). - -


- -
ZSTD_DEPRECATED("use ZSTD_compress2")
-ZSTDLIB_STATIC_API
-size_t ZSTD_compress_advanced(ZSTD_CCtx* cctx,
-                  void* dst, size_t dstCapacity,
-            const void* src, size_t srcSize,
-            const void* dict,size_t dictSize,
-                  ZSTD_parameters params);
-

Note : this function is now DEPRECATED. - It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_setParameter() and other parameter setters. - This prototype will generate compilation warnings. -


- -
ZSTD_DEPRECATED("use ZSTD_compress2 with ZSTD_CCtx_loadDictionary")
-ZSTDLIB_STATIC_API
-size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx,
-                                  void* dst, size_t dstCapacity,
-                            const void* src, size_t srcSize,
-                            const ZSTD_CDict* cdict,
-                                  ZSTD_frameParameters fParams);
-

Note : this function is now DEPRECATED. - It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_loadDictionary() and other parameter setters. - This prototype will generate compilation warnings. -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_loadDictionary_byReference(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
-

Same as ZSTD_CCtx_loadDictionary(), but dictionary content is referenced, instead of being copied into CCtx. - It saves some memory, but also requires that `dict` outlives its usage within `cctx` -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_loadDictionary_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType);
-

Same as ZSTD_CCtx_loadDictionary(), but gives finer control over - how to load the dictionary (by copy ? by reference ?) - and how to interpret it (automatic ? force raw mode ? full mode only ?) -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType);
-

Same as ZSTD_CCtx_refPrefix(), but gives finer control over - how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?) -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_getParameter(const ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value);
-

Get the requested compression parameter value, selected by enum ZSTD_cParameter, - and store it into int* value. - @return : 0, or an error code (which can be tested with ZSTD_isError()). - -


- -
ZSTDLIB_STATIC_API ZSTD_CCtx_params* ZSTD_createCCtxParams(void);
-ZSTDLIB_STATIC_API size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);  /* accept NULL pointer */
-

Quick howto : - - ZSTD_createCCtxParams() : Create a ZSTD_CCtx_params structure - - ZSTD_CCtxParams_setParameter() : Push parameters one by one into - an existing ZSTD_CCtx_params structure. - This is similar to - ZSTD_CCtx_setParameter(). - - ZSTD_CCtx_setParametersUsingCCtxParams() : Apply parameters to - an existing CCtx. - These parameters will be applied to - all subsequent frames. - - ZSTD_compressStream2() : Do compression using the CCtx. - - ZSTD_freeCCtxParams() : Free the memory, accept NULL pointer. - - This can be used with ZSTD_estimateCCtxSize_advanced_usingCCtxParams() - for static allocation of CCtx for single-threaded compression. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params);
-

Reset params to default values. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel);
-

Initializes the compression parameters of cctxParams according to - compression level. All other parameters are reset to their default values. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params);
-

Initializes the compression and frame parameters of cctxParams according to - params. All other parameters are reset to their default values. - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* params, ZSTD_cParameter param, int value);
-

Similar to ZSTD_CCtx_setParameter. - Set one compression parameter, selected by enum ZSTD_cParameter. - Parameters must be applied to a ZSTD_CCtx using - ZSTD_CCtx_setParametersUsingCCtxParams(). - @result : a code representing success or failure (which can be tested with - ZSTD_isError()). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_getParameter(const ZSTD_CCtx_params* params, ZSTD_cParameter param, int* value);
-

Similar to ZSTD_CCtx_getParameter. - Get the requested value of one compression parameter, selected by enum ZSTD_cParameter. - @result : 0, or an error code (which can be tested with ZSTD_isError()). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setParametersUsingCCtxParams(
-        ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params);
-

Apply a set of ZSTD_CCtx_params to the compression context. - This can be done even after compression is started, - if nbWorkers==0, this will have no impact until a new compression is started. - if nbWorkers>=1, new parameters will be picked up at next job, - with a few restrictions (windowLog, pledgedSrcSize, nbWorkers, jobSize, and overlapLog are not updated). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_compressStream2_simpleArgs (
-                ZSTD_CCtx* cctx,
-                void* dst, size_t dstCapacity, size_t* dstPos,
-          const void* src, size_t srcSize, size_t* srcPos,
-                ZSTD_EndDirective endOp);
-

Same as ZSTD_compressStream2(), - but using only integral types as arguments. - This variant might be helpful for binders from dynamic languages - which have troubles handling structures containing memory pointers. - -


- -

Advanced decompression functions


-
-
ZSTDLIB_STATIC_API unsigned ZSTD_isFrame(const void* buffer, size_t size);
-

Tells if the content of `buffer` starts with a valid Frame Identifier. - Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. - Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. - Note 3 : Skippable Frame Identifiers are considered valid. -


- -
ZSTDLIB_STATIC_API ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t dictSize);
-

Create a digested dictionary, ready to start decompression operation without startup delay. - Dictionary content is referenced, and therefore stays in dictBuffer. - It is important that dictBuffer outlives DDict, - it must remain read accessible throughout the lifetime of DDict -


- -
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
-

Same as ZSTD_DCtx_loadDictionary(), - but references `dict` content instead of copying it into `dctx`. - This saves memory if `dict` remains around., - However, it's imperative that `dict` remains accessible (and unmodified) while being used, so it must outlive decompression. -


- -
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType);
-

Same as ZSTD_DCtx_loadDictionary(), - but gives direct control over - how to load the dictionary (by copy ? by reference ?) - and how to interpret it (automatic ? force raw mode ? full mode only ?). -


- -
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType);
-

Same as ZSTD_DCtx_refPrefix(), but gives finer control over - how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?) -


- -
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize);
-

Refuses allocating internal buffers for frames requiring a window size larger than provided limit. - This protects a decoder context from reserving too much memory for itself (potential attack scenario). - This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode. - By default, a decompression context accepts all window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) - @return : 0, or an error code (which can be tested using ZSTD_isError()). - -


- -
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int* value);
-

Get the requested decompression parameter value, selected by enum ZSTD_dParameter, - and store it into int* value. - @return : 0, or an error code (which can be tested with ZSTD_isError()). - -


- -
ZSTD_DEPRECATED("use ZSTD_DCtx_setParameter() instead")
-ZSTDLIB_STATIC_API
-size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format);
-

This function is REDUNDANT. Prefer ZSTD_DCtx_setParameter(). - Instruct the decoder context about what kind of data to decode next. - This instruction is mandatory to decode data without a fully-formed header, - such ZSTD_f_zstd1_magicless for example. - @return : 0, or an error code (which can be tested using ZSTD_isError()). -


- -
ZSTDLIB_STATIC_API size_t ZSTD_decompressStream_simpleArgs (
-                ZSTD_DCtx* dctx,
-                void* dst, size_t dstCapacity, size_t* dstPos,
-          const void* src, size_t srcSize, size_t* srcPos);
-

Same as ZSTD_decompressStream(), - but using only integral types as arguments. - This can be helpful for binders from dynamic languages - which have troubles handling structures containing memory pointers. - -


- -

Advanced streaming functions

  Warning : most of these functions are now redundant with the Advanced API.
-  Once Advanced API reaches "stable" status,
-  redundant functions will be deprecated, and then at some point removed.
-
- -

Advanced Streaming compression functions


-
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs,
-             int compressionLevel,
-             unsigned long long pledgedSrcSize);
-

This function is DEPRECATED, and equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) - ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); - ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); - - pledgedSrcSize must be correct. If it is not known at init time, use - ZSTD_CONTENTSIZE_UNKNOWN. Note that, for compatibility with older programs, - "0" also disables frame content size field. It may be enabled in the future. - This prototype will generate compilation warnings. - -


- -
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs,
-         const void* dict, size_t dictSize,
-               int compressionLevel);
-

This function is DEPRECATED, and is equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); - ZSTD_CCtx_loadDictionary(zcs, dict, dictSize); - - Creates of an internal CDict (incompatible with static CCtx), except if - dict == NULL or dictSize < 8, in which case no dict is used. - Note: dict is loaded with ZSTD_dct_auto (treated as a full zstd dictionary if - it begins with ZSTD_MAGIC_DICTIONARY, else as raw content) and ZSTD_dlm_byCopy. - This prototype will generate compilation warnings. - -


- -
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
-        const void* dict, size_t dictSize,
-              ZSTD_parameters params,
-              unsigned long long pledgedSrcSize);
-

This function is DEPRECATED, and is equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_setParams(zcs, params); - ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); - ZSTD_CCtx_loadDictionary(zcs, dict, dictSize); - - dict is loaded with ZSTD_dct_auto and ZSTD_dlm_byCopy. - pledgedSrcSize must be correct. - If srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. - This prototype will generate compilation warnings. - -


- -
ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict);
-

This function is DEPRECATED, and equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_refCDict(zcs, cdict); - - note : cdict will just be referenced, and must outlive compression session - This prototype will generate compilation warnings. - -


- -
ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
-                   const ZSTD_CDict* cdict,
-                         ZSTD_frameParameters fParams,
-                         unsigned long long pledgedSrcSize);
-

This function is DEPRECATED, and is equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_setFParams(zcs, fParams); - ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); - ZSTD_CCtx_refCDict(zcs, cdict); - - same as ZSTD_initCStream_usingCDict(), with control over frame parameters. - pledgedSrcSize must be correct. If srcSize is not known at init time, use - value ZSTD_CONTENTSIZE_UNKNOWN. - This prototype will generate compilation warnings. - -


- -
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API
-size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
-

This function is DEPRECATED, and is equivalent to: - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); - Note: ZSTD_resetCStream() interprets pledgedSrcSize == 0 as ZSTD_CONTENTSIZE_UNKNOWN, but - ZSTD_CCtx_setPledgedSrcSize() does not do the same, so ZSTD_CONTENTSIZE_UNKNOWN must be - explicitly specified. - - start a new frame, using same parameters from previous frame. - This is typically useful to skip dictionary loading stage, since it will reuse it in-place. - Note that zcs must be init at least once before using ZSTD_resetCStream(). - If pledgedSrcSize is not known at reset time, use macro ZSTD_CONTENTSIZE_UNKNOWN. - If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end. - For the time being, pledgedSrcSize==0 is interpreted as "srcSize unknown" for compatibility with older programs, - but it will change to mean "empty" in future version, so use macro ZSTD_CONTENTSIZE_UNKNOWN instead. - @return : 0, or an error code (which can be tested using ZSTD_isError()) - This prototype will generate compilation warnings. - -


- -
typedef struct {
-    unsigned long long ingested;   /* nb input bytes read and buffered */
-    unsigned long long consumed;   /* nb input bytes actually compressed */
-    unsigned long long produced;   /* nb of compressed bytes generated and buffered */
-    unsigned long long flushed;    /* nb of compressed bytes flushed : not provided; can be tracked from caller side */
-    unsigned currentJobID;         /* MT only : latest started job nb */
-    unsigned nbActiveWorkers;      /* MT only : nb of workers actively compressing at probe time */
-} ZSTD_frameProgression;
-

-
ZSTDLIB_STATIC_API size_t ZSTD_toFlushNow(ZSTD_CCtx* cctx);
-

Tell how many bytes are ready to be flushed immediately. - Useful for multithreading scenarios (nbWorkers >= 1). - Probe the oldest active job, defined as oldest job not yet entirely flushed, - and check its output buffer. - @return : amount of data stored in oldest job and ready to be flushed immediately. - if @return == 0, it means either : - + there is no active job (could be checked with ZSTD_frameProgression()), or - + oldest job is still actively compressing data, - but everything it has produced has also been flushed so far, - therefore flush speed is limited by production speed of oldest job - irrespective of the speed of concurrent (and newer) jobs. - -


- -

Advanced Streaming decompression functions


-
ZSTD_DEPRECATED("use ZSTD_DCtx_reset + ZSTD_DCtx_loadDictionary, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize);
-

- ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); - ZSTD_DCtx_loadDictionary(zds, dict, dictSize); - - note: no dictionary will be used if dict == NULL or dictSize < 8 - -


- -
ZSTD_DEPRECATED("use ZSTD_DCtx_reset + ZSTD_DCtx_refDDict, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict);
-

- ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); - ZSTD_DCtx_refDDict(zds, ddict); - - note : ddict is referenced, it must outlive decompression session - -


- -
ZSTD_DEPRECATED("use ZSTD_DCtx_reset, see zstd.h for detailed instructions")
-ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds);
-

- ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); - - reuse decompression parameters from previous init; saves dictionary loading - -


- -
ZSTDLIB_STATIC_API void
-ZSTD_registerSequenceProducer(
-  ZSTD_CCtx* cctx,
-  void* sequenceProducerState,
-  ZSTD_sequenceProducer_F sequenceProducer
-);
-

Instruct zstd to use a block-level external sequence producer function. - - The sequenceProducerState must be initialized by the caller, and the caller is - responsible for managing its lifetime. This parameter is sticky across - compressions. It will remain set until the user explicitly resets compression - parameters. - - Sequence producer registration is considered to be an "advanced parameter", - part of the "advanced API". This means it will only have an effect on compression - APIs which respect advanced parameters, such as compress2() and compressStream2(). - Older compression APIs such as compressCCtx(), which predate the introduction of - "advanced parameters", will ignore any external sequence producer setting. - - The sequence producer can be "cleared" by registering a NULL function pointer. This - removes all limitations described above in the "LIMITATIONS" section of the API docs. - - The user is strongly encouraged to read the full API documentation (above) before - calling this function. -


- -
ZSTDLIB_STATIC_API void
-ZSTD_CCtxParams_registerSequenceProducer(
-  ZSTD_CCtx_params* params,
-  void* sequenceProducerState,
-  ZSTD_sequenceProducer_F sequenceProducer
-);
-

Same as ZSTD_registerSequenceProducer(), but operates on ZSTD_CCtx_params. - This is used for accurate size estimation with ZSTD_estimateCCtxSize_usingCCtxParams(), - which is needed when creating a ZSTD_CCtx with ZSTD_initStaticCCtx(). - - If you are using the external sequence producer API in a scenario where ZSTD_initStaticCCtx() - is required, then this function is for you. Otherwise, you probably don't need it. - - See tests/zstreamtest.c for example usage. -


- -

Buffer-less and synchronous inner streaming functions (DEPRECATED)

-  This API is deprecated, and will be removed in a future version.
-  It allows streaming (de)compression with user allocated buffers.
-  However, it is hard to use, and not as well tested as the rest of
-  our API.
-
-  Please use the normal streaming API instead: ZSTD_compressStream2,
-  and ZSTD_decompressStream.
-  If there is functionality that you need, but it doesn't provide,
-  please open an issue on our GitHub.
- 
-
- -

Buffer-less streaming compression (synchronous mode)

-  A ZSTD_CCtx object is required to track streaming operations.
-  Use ZSTD_createCCtx() / ZSTD_freeCCtx() to manage resource.
-  ZSTD_CCtx object can be reused multiple times within successive compression operations.
-
-  Start by initializing a context.
-  Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
-
-  Then, consume your input using ZSTD_compressContinue().
-  There are some important considerations to keep in mind when using this advanced function :
-  - ZSTD_compressContinue() has no internal buffer. It uses externally provided buffers only.
-  - Interface is synchronous : input is consumed entirely and produces 1+ compressed blocks.
-  - Caller must ensure there is enough space in `dst` to store compressed data under worst case scenario.
-    Worst case evaluation is provided by ZSTD_compressBound().
-    ZSTD_compressContinue() doesn't guarantee recover after a failed compression.
-  - ZSTD_compressContinue() presumes prior input ***is still accessible and unmodified*** (up to maximum distance size, see WindowLog).
-    It remembers all previous contiguous blocks, plus one separated memory segment (which can itself consists of multiple contiguous blocks)
-  - ZSTD_compressContinue() detects that prior input has been overwritten when `src` buffer overlaps.
-    In which case, it will "discard" the relevant memory section from its history.
-
-  Finish a frame with ZSTD_compressEnd(), which will write the last block(s) and optional checksum.
-  It's possible to use srcSize==0, in which case, it will write a final empty block to end the frame.
-  Without last block mark, frames are considered unfinished (hence corrupted) by compliant decoders.
-
-  `ZSTD_CCtx` object can be reused (ZSTD_compressBegin()) to compress again.
-
- -

Buffer-less streaming compression functions

ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel);
-ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel);
-ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /**< note: fails if cdict==NULL */
-

-
size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize is not known, use ZSTD_CONTENTSIZE_UNKNOWN */
-

-
size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize : If srcSize is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN */
-

-

Buffer-less streaming decompression (synchronous mode)

-  A ZSTD_DCtx object is required to track streaming operations.
-  Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
-  A ZSTD_DCtx object can be reused multiple times.
-
-  First typical operation is to retrieve frame parameters, using ZSTD_getFrameHeader().
-  Frame header is extracted from the beginning of compressed frame, so providing only the frame's beginning is enough.
-  Data fragment must be large enough to ensure successful decoding.
- `ZSTD_frameHeaderSize_max` bytes is guaranteed to always be large enough.
-  result  : 0 : successful decoding, the `ZSTD_frameHeader` structure is correctly filled.
-           >0 : `srcSize` is too small, please provide at least result bytes on next attempt.
-           errorCode, which can be tested using ZSTD_isError().
-
-  It fills a ZSTD_FrameHeader structure with important information to correctly decode the frame,
-  such as the dictionary ID, content size, or maximum back-reference distance (`windowSize`).
-  Note that these values could be wrong, either because of data corruption, or because a 3rd party deliberately spoofs false information.
-  As a consequence, check that values remain within valid application range.
-  For example, do not allocate memory blindly, check that `windowSize` is within expectation.
-  Each application can set its own limits, depending on local restrictions.
-  For extended interoperability, it is recommended to support `windowSize` of at least 8 MB.
-
-  ZSTD_decompressContinue() needs previous data blocks during decompression, up to `windowSize` bytes.
-  ZSTD_decompressContinue() is very sensitive to contiguity,
-  if 2 blocks don't follow each other, make sure that either the compressor breaks contiguity at the same place,
-  or that previous contiguous segment is large enough to properly handle maximum back-reference distance.
-  There are multiple ways to guarantee this condition.
-
-  The most memory efficient way is to use a round buffer of sufficient size.
-  Sufficient size is determined by invoking ZSTD_decodingBufferSize_min(),
-  which can return an error code if required value is too large for current system (in 32-bits mode).
-  In a round buffer methodology, ZSTD_decompressContinue() decompresses each block next to previous one,
-  up to the moment there is not enough room left in the buffer to guarantee decoding another full block,
-  which maximum size is provided in `ZSTD_frameHeader` structure, field `blockSizeMax`.
-  At which point, decoding can resume from the beginning of the buffer.
-  Note that already decoded data stored in the buffer should be flushed before being overwritten.
-
-  There are alternatives possible, for example using two or more buffers of size `windowSize` each, though they consume more memory.
-
-  Finally, if you control the compression process, you can also ignore all buffer size rules,
-  as long as the encoder and decoder progress in "lock-step",
-  aka use exactly the same buffer sizes, break contiguity at the same place, etc.
-
-  Once buffers are setup, start decompression, with ZSTD_decompressBegin().
-  If decompression requires a dictionary, use ZSTD_decompressBegin_usingDict() or ZSTD_decompressBegin_usingDDict().
-
-  Then use ZSTD_nextSrcSizeToDecompress() and ZSTD_decompressContinue() alternatively.
-  ZSTD_nextSrcSizeToDecompress() tells how many bytes to provide as 'srcSize' to ZSTD_decompressContinue().
-  ZSTD_decompressContinue() requires this _exact_ amount of bytes, or it will fail.
-
-  result of ZSTD_decompressContinue() is the number of bytes regenerated within 'dst' (necessarily <= dstCapacity).
-  It can be zero : it just means ZSTD_decompressContinue() has decoded some metadata item.
-  It can also be an error code, which can be tested with ZSTD_isError().
-
-  A frame is fully decoded when ZSTD_nextSrcSizeToDecompress() returns zero.
-  Context can then be reset to start a new decompression.
-
-  Note : it's possible to know if next input to present is a header or a block, using ZSTD_nextInputType().
-  This information is not required to properly decode a frame.
-
-  == Special case : skippable frames 
-
-  Skippable frames allow integration of user-defined data into a flow of concatenated frames.
-  Skippable frames will be ignored (skipped) by decompressor.
-  The format of skippable frames is as follows :
-  a) Skippable frame ID - 4 Bytes, Little endian format, any value from 0x184D2A50 to 0x184D2A5F
-  b) Frame Size - 4 Bytes, Little endian format, unsigned 32-bits
-  c) Frame Content - any content (User Data) of length equal to Frame Size
-  For skippable frames ZSTD_getFrameHeader() returns zfhPtr->frameType==ZSTD_skippableFrame.
-  For skippable frames ZSTD_decompressContinue() always returns 0 : it only skips the content.
-
- -

Buffer-less streaming decompression functions


-
ZSTDLIB_STATIC_API size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize);  /**< when frame content size is not known, pass in frameContentSize == ZSTD_CONTENTSIZE_UNKNOWN */
-

-
typedef enum { ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame } ZSTD_nextInputType_e;
-

-

Block level API (DEPRECATED)


-
-

You can get the frame header down to 2 bytes by setting: - - ZSTD_c_format = ZSTD_f_zstd1_magicless - - ZSTD_c_contentSizeFlag = 0 - - ZSTD_c_checksumFlag = 0 - - ZSTD_c_dictIDFlag = 0 - - This API is not as well tested as our normal API, so we recommend not using it. - We will be removing it in a future version. If the normal API doesn't provide - the functionality you need, please open a GitHub issue. - - Block functions produce and decode raw zstd blocks, without frame metadata. - Frame metadata cost is typically ~12 bytes, which can be non-negligible for very small blocks (< 100 bytes). - But users will have to take in charge needed metadata to regenerate data, such as compressed and content sizes. - - A few rules to respect : - - Compressing and decompressing require a context structure - + Use ZSTD_createCCtx() and ZSTD_createDCtx() - - It is necessary to init context before starting - + compression : any ZSTD_compressBegin*() variant, including with dictionary - + decompression : any ZSTD_decompressBegin*() variant, including with dictionary - - Block size is limited, it must be <= ZSTD_getBlockSize() <= ZSTD_BLOCKSIZE_MAX == 128 KB - + If input is larger than a block size, it's necessary to split input data into multiple blocks - + For inputs larger than a single block, consider using regular ZSTD_compress() instead. - Frame metadata is not that costly, and quickly becomes negligible as source size grows larger than a block. - - When a block is considered not compressible enough, ZSTD_compressBlock() result will be 0 (zero) ! - ===> In which case, nothing is produced into `dst` ! - + User __must__ test for such outcome and deal directly with uncompressed data - + A block cannot be declared incompressible if ZSTD_compressBlock() return value was != 0. - Doing so would mess up with statistics history, leading to potential data corruption. - + ZSTD_decompressBlock() _doesn't accept uncompressed data as input_ !! - + In case of multiple successive blocks, should some of them be uncompressed, - decoder must be informed of their existence in order to follow proper history. - Use ZSTD_insertBlock() for such a case. -


- -

Raw zstd block functions

ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_getBlockSize   (const ZSTD_CCtx* cctx);
-ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_compressBlock  (ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
-ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
-ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
-ZSTDLIB_STATIC_API size_t ZSTD_insertBlock    (ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize);  /**< insert uncompressed block into `dctx` history. Useful for multi-blocks decompression. */
-

- - diff --git a/third_party/zstd/examples/.gitignore b/third_party/zstd/examples/.gitignore deleted file mode 100644 index d682cae..0000000 --- a/third_party/zstd/examples/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -#build -simple_compression -simple_decompression -multiple_simple_compression -dictionary_compression -dictionary_decompression -streaming_compression -streaming_decompression -multiple_streaming_compression -streaming_memory_usage - -#test artefact -tmp* -test* -*.zst diff --git a/third_party/zstd/examples/Makefile b/third_party/zstd/examples/Makefile deleted file mode 100644 index 31f52d3..0000000 --- a/third_party/zstd/examples/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -LIBDIR =../lib -CPPFLAGS += -I$(LIBDIR) -LIB = $(LIBDIR)/libzstd.a - - -.PHONY: default -default: all - -.PHONY: all -all: simple_compression simple_decompression \ - multiple_simple_compression\ - dictionary_compression dictionary_decompression \ - streaming_compression streaming_decompression \ - multiple_streaming_compression streaming_memory_usage - -$(LIB) : - $(MAKE) -C $(LIBDIR) libzstd.a - -simple_compression.o: common.h -simple_compression : $(LIB) - -simple_decompression.o: common.h -simple_decompression : $(LIB) - -multiple_simple_compression.o: common.h -multiple_simple_compression : $(LIB) - -dictionary_compression.o: common.h -dictionary_compression : $(LIB) - -dictionary_decompression.o: common.h -dictionary_decompression : $(LIB) - -streaming_compression.o: common.h -streaming_compression : $(LIB) - -multiple_streaming_compression.o: common.h -multiple_streaming_compression : $(LIB) - -streaming_decompression.o: common.h -streaming_decompression : $(LIB) - -streaming_memory_usage.o: common.h -streaming_memory_usage : $(LIB) - - -.PHONY:clean -clean: - @$(RM) core *.o tmp* result* *.zst \ - simple_compression simple_decompression \ - multiple_simple_compression \ - dictionary_compression dictionary_decompression \ - streaming_compression streaming_decompression \ - multiple_streaming_compression streaming_memory_usage - @echo Cleaning completed - -.PHONY:test -test: all - cp README.md tmp - cp Makefile tmp2 - @echo -- Simple compression tests - ./simple_compression tmp - ./simple_decompression tmp.zst - ./multiple_simple_compression *.c - ./streaming_decompression tmp.zst > /dev/null - @echo -- Streaming memory usage - ./streaming_memory_usage - @echo -- Streaming compression tests - ./streaming_compression tmp - ./streaming_decompression tmp.zst > /dev/null - @echo -- Edge cases detection - ! ./streaming_decompression tmp # invalid input, must fail - ! ./simple_decompression tmp # invalid input, must fail - touch tmpNull # create 0-size file - ./simple_compression tmpNull - ./simple_decompression tmpNull.zst # 0-size frame : must work - @echo -- Multiple streaming tests - ./multiple_streaming_compression *.c - @echo -- Dictionary compression tests - ./dictionary_compression tmp2 tmp README.md - ./dictionary_decompression tmp2.zst tmp.zst README.md - $(RM) tmp* *.zst - @echo tests completed diff --git a/third_party/zstd/examples/README.md b/third_party/zstd/examples/README.md deleted file mode 100644 index 0bff7ac..0000000 --- a/third_party/zstd/examples/README.md +++ /dev/null @@ -1,46 +0,0 @@ -Zstandard library : usage examples -================================== - -- [Simple compression](simple_compression.c) : - Compress a single file. - Introduces usage of : `ZSTD_compress()` - -- [Simple decompression](simple_decompression.c) : - Decompress a single file. - Only compatible with simple compression. - Result remains in memory. - Introduces usage of : `ZSTD_decompress()` - -- [Multiple simple compression](multiple_simple_compression.c) : - Compress multiple files (in simple mode) in a single command line. - Demonstrates memory preservation technique that - minimizes malloc()/free() calls by re-using existing resources. - Introduces usage of : `ZSTD_compressCCtx()` - -- [Streaming memory usage](streaming_memory_usage.c) : - Provides amount of memory used by streaming context. - Introduces usage of : `ZSTD_sizeof_CStream()` - -- [Streaming compression](streaming_compression.c) : - Compress a single file. - Introduces usage of : `ZSTD_compressStream()` - -- [Multiple Streaming compression](multiple_streaming_compression.c) : - Compress multiple files (in streaming mode) in a single command line. - Introduces memory usage preservation technique, - reducing impact of malloc()/free() and memset() by re-using existing resources. - -- [Streaming decompression](streaming_decompression.c) : - Decompress a single file compressed by zstd. - Compatible with both simple and streaming compression. - Result is sent to stdout. - Introduces usage of : `ZSTD_decompressStream()` - -- [Dictionary compression](dictionary_compression.c) : - Compress multiple files using the same dictionary. - Introduces usage of : `ZSTD_createCDict()` and `ZSTD_compress_usingCDict()` - -- [Dictionary decompression](dictionary_decompression.c) : - Decompress multiple files using the same dictionary. - Result remains in memory. - Introduces usage of : `ZSTD_createDDict()` and `ZSTD_decompress_usingDDict()` diff --git a/third_party/zstd/examples/common.h b/third_party/zstd/examples/common.h deleted file mode 100644 index 4873e87..0000000 --- a/third_party/zstd/examples/common.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* - * This header file has common utility functions used in examples. - */ -#ifndef COMMON_H -#define COMMON_H - -#include // malloc, free, exit -#include // fprintf, perror, fopen, etc. -#include // strerror -#include // errno -#include // stat -#include - - -/* UNUSED_ATTR tells the compiler it is okay if the function is unused. */ -#if defined(__GNUC__) -# define UNUSED_ATTR __attribute__((unused)) -#else -# define UNUSED_ATTR -#endif - -#define HEADER_FUNCTION static UNUSED_ATTR - - -/* - * Define the returned error code from utility functions. - */ -typedef enum { - ERROR_fsize = 1, - ERROR_fopen = 2, - ERROR_fclose = 3, - ERROR_fread = 4, - ERROR_fwrite = 5, - ERROR_loadFile = 6, - ERROR_saveFile = 7, - ERROR_malloc = 8, - ERROR_largeFile = 9, -} COMMON_ErrorCode; - -/*! CHECK - * Check that the condition holds. If it doesn't print a message and die. - */ -#define CHECK(cond, ...) \ - do { \ - if (!(cond)) { \ - fprintf(stderr, \ - "%s:%d CHECK(%s) failed: ", \ - __FILE__, \ - __LINE__, \ - #cond); \ - fprintf(stderr, "" __VA_ARGS__); \ - fprintf(stderr, "\n"); \ - exit(1); \ - } \ - } while (0) - -/*! CHECK_ZSTD - * Check the zstd error code and die if an error occurred after printing a - * message. - */ -#define CHECK_ZSTD(fn) \ - do { \ - size_t const err = (fn); \ - CHECK(!ZSTD_isError(err), "%s", ZSTD_getErrorName(err)); \ - } while (0) - -/*! fsize_orDie() : - * Get the size of a given file path. - * - * @return The size of a given file path. - */ -HEADER_FUNCTION size_t fsize_orDie(const char *filename) -{ - struct stat st; - if (stat(filename, &st) != 0) { - /* error */ - perror(filename); - exit(ERROR_fsize); - } - - off_t const fileSize = st.st_size; - size_t const size = (size_t)fileSize; - /* 1. fileSize should be non-negative, - * 2. if off_t -> size_t type conversion results in discrepancy, - * the file size is too large for type size_t. - */ - if ((fileSize < 0) || (fileSize != (off_t)size)) { - fprintf(stderr, "%s : filesize too large \n", filename); - exit(ERROR_largeFile); - } - return size; -} - -/*! fopen_orDie() : - * Open a file using given file path and open option. - * - * @return If successful this function will return a FILE pointer to an - * opened file otherwise it sends an error to stderr and exits. - */ -HEADER_FUNCTION FILE* fopen_orDie(const char *filename, const char *instruction) -{ - FILE* const inFile = fopen(filename, instruction); - if (inFile) return inFile; - /* error */ - perror(filename); - exit(ERROR_fopen); -} - -/*! fclose_orDie() : - * Close an opened file using given FILE pointer. - */ -HEADER_FUNCTION void fclose_orDie(FILE* file) -{ - if (!fclose(file)) { return; }; - /* error */ - perror("fclose"); - exit(ERROR_fclose); -} - -/*! fread_orDie() : - * - * Read sizeToRead bytes from a given file, storing them at the - * location given by buffer. - * - * @return The number of bytes read. - */ -HEADER_FUNCTION size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) -{ - size_t const readSize = fread(buffer, 1, sizeToRead, file); - if (readSize == sizeToRead) return readSize; /* good */ - if (feof(file)) return readSize; /* good, reached end of file */ - /* error */ - perror("fread"); - exit(ERROR_fread); -} - -/*! fwrite_orDie() : - * - * Write sizeToWrite bytes to a file pointed to by file, obtaining - * them from a location given by buffer. - * - * Note: This function will send an error to stderr and exit if it - * cannot write data to the given file pointer. - * - * @return The number of bytes written. - */ -HEADER_FUNCTION size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) -{ - size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); - if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ - /* error */ - perror("fwrite"); - exit(ERROR_fwrite); -} - -/*! malloc_orDie() : - * Allocate memory. - * - * @return If successful this function returns a pointer to allo- - * cated memory. If there is an error, this function will send that - * error to stderr and exit. - */ -HEADER_FUNCTION void* malloc_orDie(size_t size) -{ - void* const buff = malloc(size); - if (buff) return buff; - /* error */ - perror("malloc"); - exit(ERROR_malloc); -} - -/*! loadFile_orDie() : - * load file into buffer (memory). - * - * Note: This function will send an error to stderr and exit if it - * cannot read data from the given file path. - * - * @return If successful this function will load file into buffer and - * return file size, otherwise it will printout an error to stderr and exit. - */ -HEADER_FUNCTION size_t loadFile_orDie(const char* fileName, void* buffer, size_t bufferSize) -{ - size_t const fileSize = fsize_orDie(fileName); - CHECK(fileSize <= bufferSize, "File too large!"); - - FILE* const inFile = fopen_orDie(fileName, "rb"); - size_t const readSize = fread(buffer, 1, fileSize, inFile); - if (readSize != (size_t)fileSize) { - fprintf(stderr, "fread: %s : %s \n", fileName, strerror(errno)); - exit(ERROR_fread); - } - fclose(inFile); /* can't fail, read only */ - return fileSize; -} - -/*! mallocAndLoadFile_orDie() : - * allocate memory buffer and then load file into it. - * - * Note: This function will send an error to stderr and exit if memory allocation - * fails or it cannot read data from the given file path. - * - * @return If successful this function will return buffer and bufferSize(=fileSize), - * otherwise it will printout an error to stderr and exit. - */ -HEADER_FUNCTION void* mallocAndLoadFile_orDie(const char* fileName, size_t* bufferSize) -{ - size_t const fileSize = fsize_orDie(fileName); - *bufferSize = fileSize; - void* const buffer = malloc_orDie(*bufferSize); - loadFile_orDie(fileName, buffer, *bufferSize); - return buffer; -} - -/*! saveFile_orDie() : - * - * Save buffSize bytes to a given file path, obtaining them from a location pointed - * to by buff. - * - * Note: This function will send an error to stderr and exit if it - * cannot write to a given file. - */ -HEADER_FUNCTION void saveFile_orDie(const char* fileName, const void* buff, size_t buffSize) -{ - FILE* const oFile = fopen_orDie(fileName, "wb"); - size_t const wSize = fwrite(buff, 1, buffSize, oFile); - if (wSize != (size_t)buffSize) { - fprintf(stderr, "fwrite: %s : %s \n", fileName, strerror(errno)); - exit(ERROR_fwrite); - } - if (fclose(oFile)) { - perror(fileName); - exit(ERROR_fclose); - } -} - -#endif diff --git a/third_party/zstd/examples/dictionary_compression.c b/third_party/zstd/examples/dictionary_compression.c deleted file mode 100644 index 83edc1c..0000000 --- a/third_party/zstd/examples/dictionary_compression.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -**/ - -/* This example deals with Dictionary compression, - * its counterpart is `examples/dictionary_decompression.c` . - * These examples presume that a dictionary already exists. - * The main method to create a dictionary is `zstd --train`, - * look at the CLI documentation for details. - * Another possible method is to employ dictionary training API, - * published in `lib/zdict.h` . -**/ - -#include // printf -#include // free -#include // memset, strcat -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -/* createDict() : -** `dictFileName` is supposed already created using `zstd --train` */ -static ZSTD_CDict* createCDict_orDie(const char* dictFileName, int cLevel) -{ - size_t dictSize; - printf("loading dictionary %s \n", dictFileName); - void* const dictBuffer = mallocAndLoadFile_orDie(dictFileName, &dictSize); - ZSTD_CDict* const cdict = ZSTD_createCDict(dictBuffer, dictSize, cLevel); - CHECK(cdict != NULL, "ZSTD_createCDict() failed!"); - free(dictBuffer); - return cdict; -} - - -static void compress(const char* fname, const char* oname, const ZSTD_CDict* cdict) -{ - size_t fSize; - void* const fBuff = mallocAndLoadFile_orDie(fname, &fSize); - size_t const cBuffSize = ZSTD_compressBound(fSize); - void* const cBuff = malloc_orDie(cBuffSize); - - /* Compress using the dictionary. - * This function writes the dictionary id, and content size into the header. - * But, it doesn't use a checksum. You can control these options using the - * advanced API: ZSTD_CCtx_setParameter(), ZSTD_CCtx_refCDict(), - * and ZSTD_compress2(). - */ - ZSTD_CCtx* const cctx = ZSTD_createCCtx(); - CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); - size_t const cSize = ZSTD_compress_usingCDict(cctx, cBuff, cBuffSize, fBuff, fSize, cdict); - CHECK_ZSTD(cSize); - - saveFile_orDie(oname, cBuff, cSize); - - /* success */ - printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); - - ZSTD_freeCCtx(cctx); /* never fails */ - free(fBuff); - free(cBuff); -} - - -static char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (char*)outSpace; -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - int const cLevel = 3; - - if (argc<3) { - fprintf(stderr, "wrong arguments\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, "%s [FILES] dictionary\n", exeName); - return 1; - } - - /* load dictionary only once */ - const char* const dictName = argv[argc-1]; - ZSTD_CDict* const dictPtr = createCDict_orDie(dictName, cLevel); - - int u; - for (u=1; u // printf -#include // free -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -/* createDict() : - `dictFileName` is supposed to have been created using `zstd --train` */ -static ZSTD_DDict* createDict_orDie(const char* dictFileName) -{ - size_t dictSize; - printf("loading dictionary %s \n", dictFileName); - void* const dictBuffer = mallocAndLoadFile_orDie(dictFileName, &dictSize); - ZSTD_DDict* const ddict = ZSTD_createDDict(dictBuffer, dictSize); - CHECK(ddict != NULL, "ZSTD_createDDict() failed!"); - free(dictBuffer); - return ddict; -} - -static void decompress(const char* fname, const ZSTD_DDict* ddict) -{ - size_t cSize; - void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); - /* Read the content size from the frame header. For simplicity we require - * that it is always present. By default, zstd will write the content size - * in the header when it is known. If you can't guarantee that the frame - * content size is always written into the header, either use streaming - * decompression, or ZSTD_decompressBound(). - */ - unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); - CHECK(rSize != ZSTD_CONTENTSIZE_ERROR, "%s: not compressed by zstd!", fname); - CHECK(rSize != ZSTD_CONTENTSIZE_UNKNOWN, "%s: original size unknown!", fname); - void* const rBuff = malloc_orDie((size_t)rSize); - - /* Check that the dictionary ID matches. - * If a non-zstd dictionary is used, then both will be zero. - * By default zstd always writes the dictionary ID into the frame. - * Zstd will check if there is a dictionary ID mismatch as well. - */ - unsigned const expectedDictID = ZSTD_getDictID_fromDDict(ddict); - unsigned const actualDictID = ZSTD_getDictID_fromFrame(cBuff, cSize); - CHECK(actualDictID == expectedDictID, - "DictID mismatch: expected %u got %u", - expectedDictID, - actualDictID); - - /* Decompress using the dictionary. - * If you need to control the decompression parameters, then use the - * advanced API: ZSTD_DCtx_setParameter(), ZSTD_DCtx_refDDict(), and - * ZSTD_decompressDCtx(). - */ - ZSTD_DCtx* const dctx = ZSTD_createDCtx(); - CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); - size_t const dSize = ZSTD_decompress_usingDDict(dctx, rBuff, rSize, cBuff, cSize, ddict); - CHECK_ZSTD(dSize); - /* When zstd knows the content size, it will error if it doesn't match. */ - CHECK(dSize == rSize, "Impossible because zstd will check this condition!"); - - /* success */ - printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); - - ZSTD_freeDCtx(dctx); - free(rBuff); - free(cBuff); -} - - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc<3) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s [FILES] dictionary\n", exeName); - return 1; - } - - /* load dictionary only once */ - const char* const dictName = argv[argc-1]; - ZSTD_DDict* const dictPtr = createDict_orDie(dictName); - - int u; - for (u=1; u // printf -#include // free -#include // memcpy, strlen -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -typedef struct { - void* fBuffer; - void* cBuffer; - size_t fBufferSize; - size_t cBufferSize; - ZSTD_CCtx* cctx; -} resources; - -/* - * allocate memory for buffers big enough to compress all files - * as well as memory for output file name (ofn) - */ -static resources createResources_orDie(int argc, const char** argv, char **ofn, size_t* ofnBufferLen) -{ - size_t maxFilenameLength=0; - size_t maxFileSize = 0; - - int argNb; - for (argNb = 1; argNb < argc; argNb++) { - const char* const filename = argv[argNb]; - size_t const filenameLength = strlen(filename); - size_t const fileSize = fsize_orDie(filename); - - if (filenameLength > maxFilenameLength) maxFilenameLength = filenameLength; - if (fileSize > maxFileSize) maxFileSize = fileSize; - } - - resources ress; - ress.fBufferSize = maxFileSize; - ress.cBufferSize = ZSTD_compressBound(maxFileSize); - - *ofnBufferLen = maxFilenameLength + 5; - *ofn = (char*)malloc_orDie(*ofnBufferLen); - ress.fBuffer = malloc_orDie(ress.fBufferSize); - ress.cBuffer = malloc_orDie(ress.cBufferSize); - ress.cctx = ZSTD_createCCtx(); - CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); - return ress; -} - -static void freeResources(resources ress, char *outFilename) -{ - free(ress.fBuffer); - free(ress.cBuffer); - ZSTD_freeCCtx(ress.cctx); /* never fails */ - free(outFilename); -} - -/* compress with pre-allocated context (ZSTD_CCtx) and input/output buffers*/ -static void compressFile_orDie(resources ress, const char* fname, const char* oname) -{ - size_t fSize = loadFile_orDie(fname, ress.fBuffer, ress.fBufferSize); - - /* Compress using the context. - * If you need more control over parameters, use the advanced API: - * ZSTD_CCtx_setParameter(), and ZSTD_compress2(). - */ - size_t const cSize = ZSTD_compressCCtx(ress.cctx, ress.cBuffer, ress.cBufferSize, ress.fBuffer, fSize, 1); - CHECK_ZSTD(cSize); - - saveFile_orDie(oname, ress.cBuffer, cSize); - - /* success */ - printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc<2) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE(s)\n", exeName); - return 1; - } - - /* memory allocation for outFilename and resources */ - char* outFilename; - size_t outFilenameBufferLen; - resources const ress = createResources_orDie(argc, argv, &outFilename, &outFilenameBufferLen); - - /* compress files with shared context, input and output buffers */ - int argNb; - for (argNb = 1; argNb < argc; argNb++) { - const char* const inFilename = argv[argNb]; - size_t const inFilenameLen = strlen(inFilename); - CHECK(inFilenameLen + 5 <= outFilenameBufferLen, "File name too long!"); - memcpy(outFilename, inFilename, inFilenameLen); - memcpy(outFilename+inFilenameLen, ".zst", 5); - compressFile_orDie(ress, inFilename, outFilename); - } - - /* free memory */ - freeResources(ress,outFilename); - - printf("compressed %i files \n", argc-1); - - return 0; -} diff --git a/third_party/zstd/examples/multiple_streaming_compression.c b/third_party/zstd/examples/multiple_streaming_compression.c deleted file mode 100644 index b12ad03..0000000 --- a/third_party/zstd/examples/multiple_streaming_compression.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/* The objective of this example is to show of to compress multiple successive files -* while preserving memory management. -* All structures and buffers will be created only once, -* and shared across all compression operations */ - -#include // printf -#include // free -#include // memset, strcat -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -typedef struct { - void* buffIn; - void* buffOut; - size_t buffInSize; - size_t buffOutSize; - ZSTD_CCtx* cctx; -} resources; - -static resources createResources_orDie(int cLevel) -{ - resources ress; - ress.buffInSize = ZSTD_CStreamInSize(); /* can always read one full block */ - ress.buffOutSize= ZSTD_CStreamOutSize(); /* can always flush a full block */ - ress.buffIn = malloc_orDie(ress.buffInSize); - ress.buffOut= malloc_orDie(ress.buffOutSize); - ress.cctx = ZSTD_createCCtx(); - CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); - - /* Set any compression parameters you want here. - * They will persist for every compression operation. - * Here we set the compression level, and enable the checksum. - */ - CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, cLevel) ); - CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_checksumFlag, 1) ); - return ress; -} - -static void freeResources(resources ress) -{ - ZSTD_freeCCtx(ress.cctx); - free(ress.buffIn); - free(ress.buffOut); -} - -static void compressFile_orDie(resources ress, const char* fname, const char* outName) -{ - // Open the input and output files. - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = fopen_orDie(outName, "wb"); - - /* Reset the context to a clean state to start a new compression operation. - * The parameters are sticky, so we keep the compression level and extra - * parameters that we set in createResources_orDie(). - */ - CHECK_ZSTD( ZSTD_CCtx_reset(ress.cctx, ZSTD_reset_session_only) ); - - size_t const toRead = ress.buffInSize; - size_t read; - while ( (read = fread_orDie(ress.buffIn, toRead, fin)) ) { - /* This loop is the same as streaming_compression.c. - * See that file for detailed comments. - */ - int const lastChunk = (read < toRead); - ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; - - ZSTD_inBuffer input = { ress.buffIn, read, 0 }; - int finished; - do { - ZSTD_outBuffer output = { ress.buffOut, ress.buffOutSize, 0 }; - size_t const remaining = ZSTD_compressStream2(ress.cctx, &output, &input, mode); - CHECK_ZSTD(remaining); - fwrite_orDie(ress.buffOut, output.pos, fout); - finished = lastChunk ? (remaining == 0) : (input.pos == input.size); - } while (!finished); - CHECK(input.pos == input.size, - "Impossible: zstd only returns 0 when the input is completely consumed!"); - } - - fclose_orDie(fout); - fclose_orDie(fin); -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc<2) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE(s)\n", exeName); - return 1; - } - - int const cLevel = 7; - resources const ress = createResources_orDie(cLevel); - void* ofnBuffer = NULL; - size_t ofnbSize = 0; - - int argNb; - for (argNb = 1; argNb < argc; argNb++) { - const char* const ifn = argv[argNb]; - size_t const ifnSize = strlen(ifn); - size_t const ofnSize = ifnSize + 5; - if (ofnbSize <= ofnSize) { - ofnbSize = ofnSize + 16; - free(ofnBuffer); - ofnBuffer = malloc_orDie(ofnbSize); - } - memset(ofnBuffer, 0, ofnSize); - strcat(ofnBuffer, ifn); - strcat(ofnBuffer, ".zst"); - compressFile_orDie(ress, ifn, ofnBuffer); - } - - freeResources(ress); - free(ofnBuffer); - - printf("compressed %i files \n", argc-1); - - return 0; -} diff --git a/third_party/zstd/examples/simple_compression.c b/third_party/zstd/examples/simple_compression.c deleted file mode 100644 index 7c88072..0000000 --- a/third_party/zstd/examples/simple_compression.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include // printf -#include // free -#include // strlen, strcat, memset -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -static void compress_orDie(const char* fname, const char* oname) -{ - size_t fSize; - void* const fBuff = mallocAndLoadFile_orDie(fname, &fSize); - size_t const cBuffSize = ZSTD_compressBound(fSize); - void* const cBuff = malloc_orDie(cBuffSize); - - /* Compress. - * If you are doing many compressions, you may want to reuse the context. - * See the multiple_simple_compression.c example. - */ - size_t const cSize = ZSTD_compress(cBuff, cBuffSize, fBuff, fSize, 1); - CHECK_ZSTD(cSize); - - saveFile_orDie(oname, cBuff, cSize); - - /* success */ - printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); - - free(fBuff); - free(cBuff); -} - -static char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* const outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (char*)outSpace; -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=2) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE\n", exeName); - return 1; - } - - const char* const inFilename = argv[1]; - - char* const outFilename = createOutFilename_orDie(inFilename); - compress_orDie(inFilename, outFilename); - free(outFilename); - return 0; -} diff --git a/third_party/zstd/examples/simple_decompression.c b/third_party/zstd/examples/simple_decompression.c deleted file mode 100644 index f499156..0000000 --- a/third_party/zstd/examples/simple_decompression.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include // printf -#include // free -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -static void decompress(const char* fname) -{ - size_t cSize; - void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); - /* Read the content size from the frame header. For simplicity we require - * that it is always present. By default, zstd will write the content size - * in the header when it is known. If you can't guarantee that the frame - * content size is always written into the header, either use streaming - * decompression, or ZSTD_decompressBound(). - */ - unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); - CHECK(rSize != ZSTD_CONTENTSIZE_ERROR, "%s: not compressed by zstd!", fname); - CHECK(rSize != ZSTD_CONTENTSIZE_UNKNOWN, "%s: original size unknown!", fname); - - void* const rBuff = malloc_orDie((size_t)rSize); - - /* Decompress. - * If you are doing many decompressions, you may want to reuse the context - * and use ZSTD_decompressDCtx(). If you want to set advanced parameters, - * use ZSTD_DCtx_setParameter(). - */ - size_t const dSize = ZSTD_decompress(rBuff, rSize, cBuff, cSize); - CHECK_ZSTD(dSize); - /* When zstd knows the content size, it will error if it doesn't match. */ - CHECK(dSize == rSize, "Impossible because zstd will check this condition!"); - - /* success */ - printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); - - free(rBuff); - free(cBuff); -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=2) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE\n", exeName); - return 1; - } - - decompress(argv[1]); - - printf("%s correctly decoded (in memory). \n", argv[1]); - - return 0; -} diff --git a/third_party/zstd/examples/streaming_compression.c b/third_party/zstd/examples/streaming_compression.c deleted file mode 100644 index 063aa82..0000000 --- a/third_party/zstd/examples/streaming_compression.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#include // printf -#include // free -#include // memset, strcat, strlen -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -static void compressFile_orDie(const char* fname, const char* outName, int cLevel, - int nbThreads) -{ - fprintf (stderr, "Starting compression of %s with level %d, using %d threads\n", - fname, cLevel, nbThreads); - - /* Open the input and output files. */ - FILE* const fin = fopen_orDie(fname, "rb"); - FILE* const fout = fopen_orDie(outName, "wb"); - /* Create the input and output buffers. - * They may be any size, but we recommend using these functions to size them. - * Performance will only suffer significantly for very tiny buffers. - */ - size_t const buffInSize = ZSTD_CStreamInSize(); - void* const buffIn = malloc_orDie(buffInSize); - size_t const buffOutSize = ZSTD_CStreamOutSize(); - void* const buffOut = malloc_orDie(buffOutSize); - - /* Create the context. */ - ZSTD_CCtx* const cctx = ZSTD_createCCtx(); - CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); - - /* Set any parameters you want. - * Here we set the compression level, and enable the checksum. - */ - CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel) ); - CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); - if (nbThreads > 1) { - size_t const r = ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); - if (ZSTD_isError(r)) { - fprintf (stderr, "Note: the linked libzstd library doesn't support multithreading. " - "Reverting to single-thread mode. \n"); - } - } - - /* This loop read from the input file, compresses that entire chunk, - * and writes all output produced to the output file. - */ - size_t const toRead = buffInSize; - for (;;) { - size_t read = fread_orDie(buffIn, toRead, fin); - /* Select the flush mode. - * If the read may not be finished (read == toRead) we use - * ZSTD_e_continue. If this is the last chunk, we use ZSTD_e_end. - * Zstd optimizes the case where the first flush mode is ZSTD_e_end, - * since it knows it is compressing the entire source in one pass. - */ - int const lastChunk = (read < toRead); - ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; - /* Set the input buffer to what we just read. - * We compress until the input buffer is empty, each time flushing the - * output. - */ - ZSTD_inBuffer input = { buffIn, read, 0 }; - int finished; - do { - /* Compress into the output buffer and write all of the output to - * the file so we can reuse the buffer next iteration. - */ - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); - CHECK_ZSTD(remaining); - fwrite_orDie(buffOut, output.pos, fout); - /* If we're on the last chunk we're finished when zstd returns 0, - * which means its consumed all the input AND finished the frame. - * Otherwise, we're finished when we've consumed all the input. - */ - finished = lastChunk ? (remaining == 0) : (input.pos == input.size); - } while (!finished); - CHECK(input.pos == input.size, - "Impossible: zstd only returns 0 when the input is completely consumed!"); - - if (lastChunk) { - break; - } - } - - ZSTD_freeCCtx(cctx); - fclose_orDie(fout); - fclose_orDie(fin); - free(buffIn); - free(buffOut); -} - - -static char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* const outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (char*)outSpace; -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc < 2) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s FILE [LEVEL] [THREADS]\n", exeName); - return 1; - } - - int cLevel = 1; - int nbThreads = 1; - - if (argc >= 3) { - cLevel = atoi (argv[2]); - CHECK(cLevel != 0, "can't parse LEVEL!"); - } - - if (argc >= 4) { - nbThreads = atoi (argv[3]); - CHECK(nbThreads != 0, "can't parse THREADS!"); - } - - const char* const inFilename = argv[1]; - - char* const outFilename = createOutFilename_orDie(inFilename); - compressFile_orDie(inFilename, outFilename, cLevel, nbThreads); - - free(outFilename); /* not strictly required, since program execution stops there, - * but some static analyzer may complain otherwise */ - return 0; -} diff --git a/third_party/zstd/examples/streaming_compression_thread_pool.c b/third_party/zstd/examples/streaming_compression_thread_pool.c deleted file mode 100644 index a1a0241..0000000 --- a/third_party/zstd/examples/streaming_compression_thread_pool.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) Martin Liska, SUSE, Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#include // printf -#include // free -#include // memset, strcat, strlen -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() -#include - -typedef struct compress_args -{ - const char *fname; - char *outName; - int cLevel; -#if defined(ZSTD_STATIC_LINKING_ONLY) - ZSTD_threadPool *pool; -#endif -} compress_args_t; - -static void *compressFile_orDie(void *data) -{ - const int nbThreads = 16; - - compress_args_t *args = (compress_args_t *)data; - fprintf (stderr, "Starting compression of %s with level %d, using %d threads\n", args->fname, args->cLevel, nbThreads); - /* Open the input and output files. */ - FILE* const fin = fopen_orDie(args->fname, "rb"); - FILE* const fout = fopen_orDie(args->outName, "wb"); - /* Create the input and output buffers. - * They may be any size, but we recommend using these functions to size them. - * Performance will only suffer significantly for very tiny buffers. - */ - size_t const buffInSize = ZSTD_CStreamInSize(); - void* const buffIn = malloc_orDie(buffInSize); - size_t const buffOutSize = ZSTD_CStreamOutSize(); - void* const buffOut = malloc_orDie(buffOutSize); - - /* Create the context. */ - ZSTD_CCtx* const cctx = ZSTD_createCCtx(); - CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); - -#if defined(ZSTD_STATIC_LINKING_ONLY) - size_t r = ZSTD_CCtx_refThreadPool(cctx, args->pool); - CHECK(r == 0, "ZSTD_CCtx_refThreadPool failed!"); -#endif - - /* Set any parameters you want. - * Here we set the compression level, and enable the checksum. - */ - CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, args->cLevel) ); - CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); - ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); - - /* This loop reads from the input file, compresses that entire chunk, - * and writes all output produced to the output file. - */ - size_t const toRead = buffInSize; - for (;;) { - size_t read = fread_orDie(buffIn, toRead, fin); - /* Select the flush mode. - * If the read may not be finished (read == toRead) we use - * ZSTD_e_continue. If this is the last chunk, we use ZSTD_e_end. - * Zstd optimizes the case where the first flush mode is ZSTD_e_end, - * since it knows it is compressing the entire source in one pass. - */ - int const lastChunk = (read < toRead); - ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; - /* Set the input buffer to what we just read. - * We compress until the input buffer is empty, each time flushing the - * output. - */ - ZSTD_inBuffer input = { buffIn, read, 0 }; - int finished; - do { - /* Compress into the output buffer and write all of the output to - * the file so we can reuse the buffer next iteration. - */ - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); - CHECK_ZSTD(remaining); - fwrite_orDie(buffOut, output.pos, fout); - /* If we're on the last chunk we're finished when zstd returns 0, - * which means its consumed all the input AND finished the frame. - * Otherwise, we're finished when we've consumed all the input. - */ - finished = lastChunk ? (remaining == 0) : (input.pos == input.size); - } while (!finished); - CHECK(input.pos == input.size, - "Impossible: zstd only returns 0 when the input is completely consumed!"); - - if (lastChunk) { - break; - } - } - - fprintf (stderr, "Finishing compression of %s\n", args->outName); - - ZSTD_freeCCtx(cctx); - fclose_orDie(fout); - fclose_orDie(fin); - free(buffIn); - free(buffOut); - free(args->outName); - - return NULL; -} - - -static char* createOutFilename_orDie(const char* filename) -{ - size_t const inL = strlen(filename); - size_t const outL = inL + 5; - void* const outSpace = malloc_orDie(outL); - memset(outSpace, 0, outL); - strcat(outSpace, filename); - strcat(outSpace, ".zst"); - return (char*)outSpace; -} - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc<=3) { - printf("wrong arguments\n"); - printf("usage:\n"); - printf("%s POOL_SIZE LEVEL FILES\n", exeName); - return 1; - } - - int pool_size = atoi (argv[1]); - CHECK(pool_size != 0, "can't parse POOL_SIZE!"); - - int level = atoi (argv[2]); - CHECK(level != 0, "can't parse LEVEL!"); - - argc -= 3; - argv += 3; - -#if defined(ZSTD_STATIC_LINKING_ONLY) - ZSTD_threadPool *pool = ZSTD_createThreadPool (pool_size); - CHECK(pool != NULL, "ZSTD_createThreadPool() failed!"); - fprintf (stderr, "Using shared thread pool of size %d\n", pool_size); -#else - fprintf (stderr, "All threads use its own thread pool\n"); -#endif - - pthread_t *threads = malloc_orDie(argc * sizeof(pthread_t)); - compress_args_t *args = malloc_orDie(argc * sizeof(compress_args_t)); - - for (unsigned i = 0; i < argc; i++) - { - args[i].fname = argv[i]; - args[i].outName = createOutFilename_orDie(args[i].fname); - args[i].cLevel = level; -#if defined(ZSTD_STATIC_LINKING_ONLY) - args[i].pool = pool; -#endif - - pthread_create (&threads[i], NULL, compressFile_orDie, &args[i]); - } - - for (unsigned i = 0; i < argc; i++) - pthread_join (threads[i], NULL); - -#if defined(ZSTD_STATIC_LINKING_ONLY) - ZSTD_freeThreadPool (pool); -#endif - - return 0; -} diff --git a/third_party/zstd/examples/streaming_decompression.c b/third_party/zstd/examples/streaming_decompression.c deleted file mode 100644 index 95fa112..0000000 --- a/third_party/zstd/examples/streaming_decompression.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#include // fprintf -#include // free -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - -static void decompressFile_orDie(const char* fname) -{ - FILE* const fin = fopen_orDie(fname, "rb"); - size_t const buffInSize = ZSTD_DStreamInSize(); - void* const buffIn = malloc_orDie(buffInSize); - FILE* const fout = stdout; - size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ - void* const buffOut = malloc_orDie(buffOutSize); - - ZSTD_DCtx* const dctx = ZSTD_createDCtx(); - CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); - - /* This loop assumes that the input file is one or more concatenated zstd - * streams. This example won't work if there is trailing non-zstd data at - * the end, but streaming decompression in general handles this case. - * ZSTD_decompressStream() returns 0 exactly when the frame is completed, - * and doesn't consume input after the frame. - */ - size_t const toRead = buffInSize; - size_t read; - size_t lastRet = 0; - int isEmpty = 1; - while ( (read = fread_orDie(buffIn, toRead, fin)) ) { - isEmpty = 0; - ZSTD_inBuffer input = { buffIn, read, 0 }; - /* Given a valid frame, zstd won't consume the last byte of the frame - * until it has flushed all of the decompressed data of the frame. - * Therefore, instead of checking if the return code is 0, we can - * decompress just check if input.pos < input.size. - */ - while (input.pos < input.size) { - ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; - /* The return code is zero if the frame is complete, but there may - * be multiple frames concatenated together. Zstd will automatically - * reset the context when a frame is complete. Still, calling - * ZSTD_DCtx_reset() can be useful to reset the context to a clean - * state, for instance if the last decompression call returned an - * error. - */ - size_t const ret = ZSTD_decompressStream(dctx, &output , &input); - CHECK_ZSTD(ret); - fwrite_orDie(buffOut, output.pos, fout); - lastRet = ret; - } - } - - if (isEmpty) { - fprintf(stderr, "input is empty\n"); - exit(1); - } - - if (lastRet != 0) { - /* The last return value from ZSTD_decompressStream did not end on a - * frame, but we reached the end of the file! We assume this is an - * error, and the input was truncated. - */ - fprintf(stderr, "EOF before end of stream: %zu\n", lastRet); - exit(1); - } - - ZSTD_freeDCtx(dctx); - fclose_orDie(fin); - fclose_orDie(fout); - free(buffIn); - free(buffOut); -} - - -int main(int argc, const char** argv) -{ - const char* const exeName = argv[0]; - - if (argc!=2) { - fprintf(stderr, "wrong arguments\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, "%s FILE\n", exeName); - return 1; - } - - const char* const inFilename = argv[1]; - - decompressFile_orDie(inFilename); - return 0; -} diff --git a/third_party/zstd/examples/streaming_memory_usage.c b/third_party/zstd/examples/streaming_memory_usage.c deleted file mode 100644 index 957acb6..0000000 --- a/third_party/zstd/examples/streaming_memory_usage.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/*=== Tuning parameter ===*/ -#ifndef MAX_TESTED_LEVEL -#define MAX_TESTED_LEVEL 12 -#endif - - -/*=== Dependencies ===*/ -#include // printf -#define ZSTD_STATIC_LINKING_ONLY -#include // presumes zstd library is installed -#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() - - -/*=== functions ===*/ - -/*! readU32FromChar() : - @return : unsigned integer value read from input in `char` format - allows and interprets K, KB, KiB, M, MB and MiB suffix. - Will also modify `*stringPtr`, advancing it to position where it stopped reading. - Note : function result can overflow if digit string > MAX_UINT */ -static unsigned readU32FromChar(const char** stringPtr) -{ - unsigned result = 0; - while ((**stringPtr >='0') && (**stringPtr <='9')) - result *= 10, result += **stringPtr - '0', (*stringPtr)++ ; - if ((**stringPtr=='K') || (**stringPtr=='M')) { - result <<= 10; - if (**stringPtr=='M') result <<= 10; - (*stringPtr)++ ; - if (**stringPtr=='i') (*stringPtr)++; - if (**stringPtr=='B') (*stringPtr)++; - } - return result; -} - - -int main(int argc, char const *argv[]) { - - printf("\n Zstandard (v%s) memory usage for streaming : \n\n", ZSTD_versionString()); - - unsigned wLog = 0; - if (argc > 1) { - const char* valStr = argv[1]; - wLog = readU32FromChar(&valStr); - } - - int compressionLevel; - for (compressionLevel = 1; compressionLevel <= MAX_TESTED_LEVEL; compressionLevel++) { -#define INPUT_SIZE 5 -#define COMPRESSED_SIZE 128 - char const dataToCompress[INPUT_SIZE] = "abcde"; - char compressedData[COMPRESSED_SIZE]; - char decompressedData[INPUT_SIZE]; - /* the ZSTD_CCtx_params structure is a way to save parameters and use - * them across multiple contexts. We use them here so we can call the - * function ZSTD_estimateCStreamSize_usingCCtxParams(). - */ - ZSTD_CCtx_params* const cctxParams = ZSTD_createCCtxParams(); - CHECK(cctxParams != NULL, "ZSTD_createCCtxParams() failed!"); - - /* Set the compression level. */ - CHECK_ZSTD( ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_compressionLevel, compressionLevel) ); - /* Set the window log. - * The value 0 means use the default window log, which is equivalent to - * not setting it. - */ - CHECK_ZSTD( ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_windowLog, wLog) ); - - /* Force the compressor to allocate the maximum memory size for a given - * level by not providing the pledged source size, or calling - * ZSTD_compressStream2() with ZSTD_e_end. - */ - ZSTD_CCtx* const cctx = ZSTD_createCCtx(); - CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); - CHECK_ZSTD( ZSTD_CCtx_setParametersUsingCCtxParams(cctx, cctxParams) ); - size_t compressedSize; - { - ZSTD_inBuffer inBuff = { dataToCompress, sizeof(dataToCompress), 0 }; - ZSTD_outBuffer outBuff = { compressedData, sizeof(compressedData), 0 }; - CHECK_ZSTD( ZSTD_compressStream(cctx, &outBuff, &inBuff) ); - size_t const remaining = ZSTD_endStream(cctx, &outBuff); - CHECK_ZSTD(remaining); - CHECK(remaining == 0, "Frame not flushed!"); - compressedSize = outBuff.pos; - } - - ZSTD_DCtx* const dctx = ZSTD_createDCtx(); - CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); - /* Set the maximum allowed window log. - * The value 0 means use the default window log, which is equivalent to - * not setting it. - */ - CHECK_ZSTD( ZSTD_DCtx_setParameter(dctx, ZSTD_d_windowLogMax, wLog) ); - /* forces decompressor to use maximum memory size, since the - * decompressed size is not stored in the frame header. - */ - { ZSTD_inBuffer inBuff = { compressedData, compressedSize, 0 }; - ZSTD_outBuffer outBuff = { decompressedData, sizeof(decompressedData), 0 }; - size_t const remaining = ZSTD_decompressStream(dctx, &outBuff, &inBuff); - CHECK_ZSTD(remaining); - CHECK(remaining == 0, "Frame not complete!"); - CHECK(outBuff.pos == sizeof(dataToCompress), "Bad decompression!"); - } - - size_t const cstreamSize = ZSTD_sizeof_CStream(cctx); - size_t const cstreamEstimatedSize = ZSTD_estimateCStreamSize_usingCCtxParams(cctxParams); - size_t const dstreamSize = ZSTD_sizeof_DStream(dctx); - size_t const dstreamEstimatedSize = ZSTD_estimateDStreamSize_fromFrame(compressedData, compressedSize); - - CHECK(cstreamSize <= cstreamEstimatedSize, "Compression mem (%u) > estimated (%u)", - (unsigned)cstreamSize, (unsigned)cstreamEstimatedSize); - CHECK(dstreamSize <= dstreamEstimatedSize, "Decompression mem (%u) > estimated (%u)", - (unsigned)dstreamSize, (unsigned)dstreamEstimatedSize); - - printf("Level %2i : Compression Mem = %5u KB (estimated : %5u KB) ; Decompression Mem = %4u KB (estimated : %5u KB)\n", - compressionLevel, - (unsigned)(cstreamSize>>10), (unsigned)(cstreamEstimatedSize>>10), - (unsigned)(dstreamSize>>10), (unsigned)(dstreamEstimatedSize>>10)); - - ZSTD_freeDCtx(dctx); - ZSTD_freeCCtx(cctx); - ZSTD_freeCCtxParams(cctxParams); - if (wLog) break; /* single test */ - } - return 0; -} diff --git a/third_party/zstd/lib/.gitignore b/third_party/zstd/lib/.gitignore deleted file mode 100644 index 4cd50ac..0000000 --- a/third_party/zstd/lib/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# make install artefact -libzstd.pc -libzstd-nomt diff --git a/third_party/zstd/lib/BUCK b/third_party/zstd/lib/BUCK deleted file mode 100644 index 60c6bbb..0000000 --- a/third_party/zstd/lib/BUCK +++ /dev/null @@ -1,232 +0,0 @@ -cxx_library( - name='zstd', - header_namespace='', - exported_headers=['zstd.h'], - visibility=['PUBLIC'], - deps=[ - ':common', - ':compress', - ':decompress', - ':deprecated', - ], -) - -cxx_library( - name='compress', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('compress', 'zstd*.h'), - ]), - srcs=glob(['compress/zstd*.c', 'compress/hist.c']), - deps=[':common'], -) - -cxx_library( - name='decompress', - header_namespace='', - visibility=['PUBLIC'], - headers=subdir_glob([ - ('decompress', '*_impl.h'), - ]), - srcs=glob(['decompress/zstd*.c']), - deps=[ - ':common', - ':legacy', - ], -) - -cxx_library( - name='deprecated', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('deprecated', '*.h'), - ]), - srcs=glob(['deprecated/*.c']), - deps=[':common'], -) - -cxx_library( - name='legacy', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('legacy', '*.h'), - ]), - srcs=glob(['legacy/*.c']), - deps=[':common'], - exported_preprocessor_flags=[ - '-DZSTD_LEGACY_SUPPORT=4', - ], -) - -cxx_library( - name='zdict', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=['zdict.h'], - headers=subdir_glob([ - ('dictBuilder', 'divsufsort.h'), - ('dictBuilder', 'cover.h'), - ]), - srcs=glob(['dictBuilder/*.c']), - deps=[':common'], -) - -cxx_library( - name='compiler', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'compiler.h'), - ]), -) - -cxx_library( - name='cpu', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'cpu.h'), - ]), -) - -cxx_library( - name='bitstream', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'bitstream.h'), - ]), -) - -cxx_library( - name='entropy', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'fse.h'), - ('common', 'huf.h'), - ]), - srcs=[ - 'common/entropy_common.c', - 'common/fse_decompress.c', - 'compress/fse_compress.c', - 'compress/huf_compress.c', - 'decompress/huf_decompress.c', - ], - deps=[ - ':debug', - ':bitstream', - ':compiler', - ':errors', - ':mem', - ], -) - -cxx_library( - name='errors', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=[ - 'zstd_errors.h', - 'common/error_private.h', - ] - srcs=['common/error_private.c'], -) - -cxx_library( - name='mem', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'mem.h'), - ]), -) - -cxx_library( - name='pool', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'pool.h'), - ]), - srcs=['common/pool.c'], - deps=[ - ':threading', - ':zstd_common', - ], -) - -cxx_library( - name='threading', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'threading.h'), - ]), - srcs=['common/threading.c'], - exported_preprocessor_flags=[ - '-DZSTD_MULTITHREAD', - ], - exported_linker_flags=[ - '-pthread', - ], -) - -cxx_library( - name='xxhash', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'xxhash.h'), - ]), - srcs=['common/xxhash.c'], - exported_preprocessor_flags=[ - '-DXXH_NAMESPACE=ZSTD_', - ], -) - -cxx_library( - name='zstd_common', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('', 'zstd.h'), - ('common', 'zstd_internal.h'), - ]), - srcs=['common/zstd_common.c'], - deps=[ - ':compiler', - ':errors', - ':mem', - ], -) - -cxx_library( - name='debug', - header_namespace='', - visibility=['PUBLIC'], - exported_headers=subdir_glob([ - ('common', 'debug.h'), - ]), - srcs=['common/debug.c'], -) - -cxx_library( - name='common', - deps=[ - ':debug', - ':bitstream', - ':compiler', - ':cpu', - ':entropy', - ':errors', - ':mem', - ':pool', - ':threading', - ':xxhash', - ':zstd_common', - ] -) diff --git a/third_party/zstd/lib/Makefile b/third_party/zstd/lib/Makefile deleted file mode 100644 index a6a0eb0..0000000 --- a/third_party/zstd/lib/Makefile +++ /dev/null @@ -1,389 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -# default target (when running `make` with no argument) -lib-release: - -# Modules -ZSTD_LIB_COMPRESSION ?= 1 -ZSTD_LIB_DECOMPRESSION ?= 1 -ZSTD_LIB_DICTBUILDER ?= 1 -ZSTD_LIB_DEPRECATED ?= 0 - -# Input variables for libzstd.mk -ifeq ($(ZSTD_LIB_COMPRESSION), 0) - ZSTD_LIB_DICTBUILDER = 0 - ZSTD_LIB_DEPRECATED = 0 -endif - -ifeq ($(ZSTD_LIB_DECOMPRESSION), 0) - ZSTD_LEGACY_SUPPORT = 0 - ZSTD_LIB_DEPRECATED = 0 -endif - -include libzstd.mk - -ZSTD_FILES := $(ZSTD_COMMON_FILES) $(ZSTD_LEGACY_FILES) - -ifneq ($(ZSTD_LIB_COMPRESSION), 0) - ZSTD_FILES += $(ZSTD_COMPRESS_FILES) -endif - -ifneq ($(ZSTD_LIB_DECOMPRESSION), 0) - ZSTD_FILES += $(ZSTD_DECOMPRESS_FILES) -endif - -ifneq ($(ZSTD_LIB_DEPRECATED), 0) - ZSTD_FILES += $(ZSTD_DEPRECATED_FILES) -endif - -ifneq ($(ZSTD_LIB_DICTBUILDER), 0) - ZSTD_FILES += $(ZSTD_DICTBUILDER_FILES) -endif - -ZSTD_LOCAL_SRC := $(notdir $(ZSTD_FILES)) -ZSTD_LOCAL_OBJ0 := $(ZSTD_LOCAL_SRC:.c=.o) -ZSTD_LOCAL_OBJ := $(ZSTD_LOCAL_OBJ0:.S=.o) - -VERSION := $(ZSTD_VERSION) - -# Note: by default, the static library is built single-threaded and dynamic library is built -# multi-threaded. It is possible to force multi or single threaded builds by appending -# -mt or -nomt to the build target (like lib-mt for multi-threaded, lib-nomt for single-threaded). - - -CPPFLAGS_DYNLIB += -DZSTD_MULTITHREAD # dynamic library build defaults to multi-threaded -LDFLAGS_DYNLIB += -pthread -CPPFLAGS_STATICLIB += # static library build defaults to single-threaded - -# pkg-config Libs.private points to LDFLAGS_DYNLIB -PCLIB := $(LDFLAGS_DYNLIB) - -ifeq ($(findstring GCC,$(CCVER)),GCC) -decompress/zstd_decompress_block.o : CFLAGS+=-fno-tree-vectorize -endif - - -# macOS linker doesn't support -soname, and use different extension -# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html -UNAME_TARGET_SYSTEM ?= $(UNAME) - -ifeq ($(UNAME_TARGET_SYSTEM), Darwin) - SHARED_EXT = dylib - SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT) - SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) - SONAME_FLAGS = -install_name $(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) -else - ifeq ($(UNAME_TARGET_SYSTEM), AIX) - SONAME_FLAGS = - else - SONAME_FLAGS = -Wl,-soname=libzstd.$(SHARED_EXT).$(LIBVER_MAJOR) - endif - SHARED_EXT = so - SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR) - SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) -endif - - -.PHONY: all -all: lib - - -.PHONY: libzstd.a # must be run every time -libzstd.a: CPPFLAGS += $(CPPFLAGS_STATICLIB) - -SET_CACHE_DIRECTORY = \ - +$(MAKE) --no-print-directory $@ \ - BUILD_DIR=obj/$(HASH_DIR) \ - CPPFLAGS="$(CPPFLAGS)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" - -ifndef BUILD_DIR -# determine BUILD_DIR from compilation flags - -libzstd.a: - $(SET_CACHE_DIRECTORY) - -else -# BUILD_DIR is defined - -ZSTD_STATICLIB_DIR := $(BUILD_DIR)/static -ZSTD_STATICLIB := $(ZSTD_STATICLIB_DIR)/libzstd.a -ZSTD_STATICLIB_OBJ := $(addprefix $(ZSTD_STATICLIB_DIR)/,$(ZSTD_LOCAL_OBJ)) -$(ZSTD_STATICLIB): ARFLAGS = rcs -$(ZSTD_STATICLIB): | $(ZSTD_STATICLIB_DIR) -$(ZSTD_STATICLIB): $(ZSTD_STATICLIB_OBJ) - # Check for multithread flag at target execution time - $(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\ - @echo compiling multi-threaded static library $(LIBVER),\ - @echo compiling single-threaded static library $(LIBVER)) - $(AR) $(ARFLAGS) $@ $^ - -libzstd.a: $(ZSTD_STATICLIB) - cp -f $< $@ - -endif - -ifneq (,$(filter Windows%,$(TARGET_SYSTEM))) - -LIBZSTD = dll/libzstd.dll -$(LIBZSTD): $(ZSTD_FILES) - @echo compiling dynamic library $(LIBVER) - $(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -Wl,--out-implib,dll/libzstd.dll.a -shared $^ -o $@ - -else # not Windows - -LIBZSTD = libzstd.$(SHARED_EXT_VER) -.PHONY: $(LIBZSTD) # must be run every time -$(LIBZSTD): CPPFLAGS += $(CPPFLAGS_DYNLIB) -$(LIBZSTD): CFLAGS += -fPIC -fvisibility=hidden -$(LIBZSTD): LDFLAGS += -shared $(LDFLAGS_DYNLIB) - -ifndef BUILD_DIR -# determine BUILD_DIR from compilation flags - -$(LIBZSTD): - $(SET_CACHE_DIRECTORY) - -else -# BUILD_DIR is defined - -ZSTD_DYNLIB_DIR := $(BUILD_DIR)/dynamic -ZSTD_DYNLIB := $(ZSTD_DYNLIB_DIR)/$(LIBZSTD) -ZSTD_DYNLIB_OBJ := $(addprefix $(ZSTD_DYNLIB_DIR)/,$(ZSTD_LOCAL_OBJ)) - -$(ZSTD_DYNLIB): | $(ZSTD_DYNLIB_DIR) -$(ZSTD_DYNLIB): $(ZSTD_DYNLIB_OBJ) -# Check for multithread flag at target execution time - $(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\ - @echo compiling multi-threaded dynamic library $(LIBVER),\ - @echo compiling single-threaded dynamic library $(LIBVER)) - $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ - @echo creating versioned links - ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) - ln -sf $@ libzstd.$(SHARED_EXT) - -$(LIBZSTD): $(ZSTD_DYNLIB) - cp -f $< $@ - -endif # ifndef BUILD_DIR -endif # if windows - -.PHONY: libzstd -libzstd : $(LIBZSTD) - -.PHONY: lib -lib : libzstd.a libzstd - - -# note : do not define lib-mt or lib-release as .PHONY -# make does not consider implicit pattern rule for .PHONY target - -%-mt : CPPFLAGS_DYNLIB := -DZSTD_MULTITHREAD -%-mt : CPPFLAGS_STATICLIB := -DZSTD_MULTITHREAD -%-mt : LDFLAGS_DYNLIB := -pthread -%-mt : PCLIB := -%-mt : PCMTLIB := $(LDFLAGS_DYNLIB) -%-mt : % - @echo multi-threaded build completed - -%-nomt : CPPFLAGS_DYNLIB := -%-nomt : LDFLAGS_DYNLIB := -%-nomt : CPPFLAGS_STATICLIB := -%-nomt : PCLIB := -%-nomt : % - @echo single-threaded build completed - -%-release : DEBUGFLAGS := -%-release : % - @echo release build completed - - -# Generate .h dependencies automatically - -# -MMD: compiler generates dependency information as a side-effect of compilation, without system headers -# -MP: adds phony target for each dependency other than main file. -DEPFLAGS = -MMD -MP - -# ensure that ZSTD_DYNLIB_DIR exists prior to generating %.o -$(ZSTD_DYNLIB_DIR)/%.o : %.c | $(ZSTD_DYNLIB_DIR) - @echo CC $@ - $(COMPILE.c) $(DEPFLAGS) $(OUTPUT_OPTION) $< - -$(ZSTD_STATICLIB_DIR)/%.o : %.c | $(ZSTD_STATICLIB_DIR) - @echo CC $@ - $(COMPILE.c) $(DEPFLAGS) $(OUTPUT_OPTION) $< - -$(ZSTD_DYNLIB_DIR)/%.o : %.S | $(ZSTD_DYNLIB_DIR) - @echo AS $@ - $(COMPILE.S) $(OUTPUT_OPTION) $< - -$(ZSTD_STATICLIB_DIR)/%.o : %.S | $(ZSTD_STATICLIB_DIR) - @echo AS $@ - $(COMPILE.S) $(OUTPUT_OPTION) $< - -MKDIR ?= mkdir -p -$(BUILD_DIR) $(ZSTD_DYNLIB_DIR) $(ZSTD_STATICLIB_DIR): - $(MKDIR) $@ - -DEPFILES := $(ZSTD_DYNLIB_OBJ:.o=.d) $(ZSTD_STATICLIB_OBJ:.o=.d) -$(DEPFILES): - -# The leading '-' means: do not fail is include fails (ex: directory does not exist yet) --include $(wildcard $(DEPFILES)) - - -# Special case : build library in single-thread mode _and_ without zstdmt_compress.c -# Note : we still need threading.c and pool.c for the dictionary builder, -# but they will correctly behave single-threaded. -ZSTDMT_FILES = zstdmt_compress.c -ZSTD_NOMT_FILES = $(filter-out $(ZSTDMT_FILES),$(notdir $(ZSTD_FILES))) -libzstd-nomt: CFLAGS += -fPIC -fvisibility=hidden -libzstd-nomt: LDFLAGS += -shared -libzstd-nomt: $(ZSTD_NOMT_FILES) - @echo compiling single-thread dynamic library $(LIBVER) - @echo files : $(ZSTD_NOMT_FILES) - @if echo "$(ZSTD_NOMT_FILES)" | tr ' ' '\n' | $(GREP) -q zstdmt; then \ - echo "Error: Found zstdmt in list."; \ - exit 1; \ - fi - $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ - -.PHONY: clean -clean: - $(RM) -r *.dSYM # macOS-specific - $(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc - $(RM) dll/libzstd.dll dll/libzstd.lib libzstd-nomt* - $(RM) -r obj/* - @echo Cleaning library completed - -#----------------------------------------------------------------------------- -# make install is validated only for below listed environments -#----------------------------------------------------------------------------- -ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX MSYS_NT% CYGWIN_NT%,$(UNAME))) - -lib: libzstd.pc - -HAS_EXPLICIT_EXEC_PREFIX := $(if $(or $(EXEC_PREFIX),$(exec_prefix)),1,) - -DESTDIR ?= -# directory variables : GNU conventions prefer lowercase -# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html -# support both lower and uppercase (BSD), use uppercase in script -prefix ?= /usr/local -PREFIX ?= $(prefix) -exec_prefix ?= $(PREFIX) -EXEC_PREFIX ?= $(exec_prefix) -libdir ?= $(EXEC_PREFIX)/lib -LIBDIR ?= $(libdir) -includedir ?= $(PREFIX)/include -INCLUDEDIR ?= $(includedir) - -PCINCDIR := $(patsubst $(PREFIX)%,%,$(INCLUDEDIR)) -PCLIBDIR := $(patsubst $(EXEC_PREFIX)%,%,$(LIBDIR)) - -# If we successfully stripped off a prefix, we'll add a reference to the -# relevant pc variable. -PCINCPREFIX := $(if $(findstring $(INCLUDEDIR),$(PCINCDIR)),,$${prefix}) -PCLIBPREFIX := $(if $(findstring $(LIBDIR),$(PCLIBDIR)),,$${exec_prefix}) - -# If no explicit EXEC_PREFIX was set by the caller, write it out as a reference -# to PREFIX, rather than as a resolved value. -PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix}) - - -ifneq ($(MT),) - PCLIB := - PCMTLIB := $(LDFLAGS_DYNLIB) -else - PCLIB := $(LDFLAGS_DYNLIB) -endif - -ifneq (,$(filter FreeBSD NetBSD DragonFly,$(UNAME))) - PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig -else - PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig -endif - -ifneq (,$(filter SunOS,$(UNAME))) - INSTALL ?= ginstall -else - INSTALL ?= install -endif - -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= $(INSTALL) -m 644 - - -# pkg-config library define. -# For static single-threaded library declare -pthread in Libs.private -# For static multi-threaded library declare -pthread in Libs and Cflags -.PHONY: libzstd.pc -libzstd.pc: libzstd.pc.in - @echo creating pkgconfig - @sed \ - -e 's|@PREFIX@|$(PREFIX)|' \ - -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \ - -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \ - -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \ - -e 's|@VERSION@|$(VERSION)|' \ - -e 's|@LIBS_MT@|$(PCMTLIB)|' \ - -e 's|@LIBS_PRIVATE@|$(PCLIB)|' \ - $< >$@ - -.PHONY: install -install: install-pc install-static install-shared install-includes - @echo zstd static and shared library installed - -.PHONY: install-pc -install-pc: libzstd.pc - [ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ - $(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ - -.PHONY: install-static -install-static: - # only generate libzstd.a if it's not already present - [ -e libzstd.a ] || $(MAKE) libzstd.a-release - [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ - @echo Installing static library - $(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) - -.PHONY: install-shared -install-shared: - # only generate libzstd.so if it's not already present - [ -e $(LIBZSTD) ] || $(MAKE) libzstd-release - [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ - @echo Installing shared library - $(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) - ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) - ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) - -.PHONY: install-includes -install-includes: - [ -e $(DESTDIR)$(INCLUDEDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/ - @echo Installing includes - $(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR) - -.PHONY: uninstall -uninstall: - $(RM) $(DESTDIR)$(LIBDIR)/libzstd.a - $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) - $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) - $(RM) $(DESTDIR)$(LIBDIR)/$(LIBZSTD) - $(RM) $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc - $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h - $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h - $(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h - @echo zstd libraries successfully uninstalled - -endif diff --git a/third_party/zstd/lib/README.md b/third_party/zstd/lib/README.md deleted file mode 100644 index b37f5fc..0000000 --- a/third_party/zstd/lib/README.md +++ /dev/null @@ -1,248 +0,0 @@ -Zstandard library files -================================ - -The __lib__ directory is split into several sub-directories, -in order to make it easier to select or exclude features. - - -#### Building - -`Makefile` script is provided, supporting [Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html#Makefile-Conventions), -including commands variables, staged install, directory variables and standard targets. -- `make` : generates both static and dynamic libraries -- `make install` : install libraries and headers in target system directories - -`libzstd` default scope is pretty large, including compression, decompression, dictionary builder, -and support for decoding legacy formats >= v0.5.0. -The scope can be reduced on demand (see paragraph _modular build_). - - -#### Multithreading support - -When building with `make`, by default the dynamic library is multithreaded and static library is single-threaded (for compatibility reasons). - -Enabling multithreading requires 2 conditions : -- set build macro `ZSTD_MULTITHREAD` (`-DZSTD_MULTITHREAD` for `gcc`) -- for POSIX systems : compile with pthread (`-pthread` compilation flag for `gcc`) - -For convenience, we provide a build target to generate multi and single threaded libraries: -- Force enable multithreading on both dynamic and static libraries by appending `-mt` to the target, e.g. `make lib-mt`. - Note that the `.pc` generated on calling `make lib-mt` will already include the require Libs and Cflags. -- Force disable multithreading on both dynamic and static libraries by appending `-nomt` to the target, e.g. `make lib-nomt`. -- By default, as mentioned before, dynamic library is multithreaded, and static library is single-threaded, e.g. `make lib`. - -When linking a POSIX program with a multithreaded version of `libzstd`, -note that it's necessary to invoke the `-pthread` flag during link stage. - -The `.pc` generated from `make install` or `make install-pc` always assume a single-threaded static library -is compiled. To correctly generate a `.pc` for the multi-threaded static library, set `MT=1` as ENV variable. - -Multithreading capabilities are exposed -via the [advanced API defined in `lib/zstd.h`](https://github.com/facebook/zstd/blob/v1.4.3/lib/zstd.h#L351). - - -#### API - -Zstandard's stable API is exposed within [lib/zstd.h](zstd.h). - - -#### Advanced API - -Optional advanced features are exposed via : - -- `lib/zstd_errors.h` : translates `size_t` function results - into a `ZSTD_ErrorCode`, for accurate error handling. - -- `ZSTD_STATIC_LINKING_ONLY` : if this macro is defined _before_ including `zstd.h`, - it unlocks access to the experimental API, - exposed in the second part of `zstd.h`. - All definitions in the experimental APIs are unstable, - they may still change in the future, or even be removed. - As a consequence, experimental definitions shall ___never be used with dynamic library___ ! - Only static linking is allowed. - - -#### Modular build - -It's possible to compile only a limited set of features within `libzstd`. -The file structure is designed to make this selection manually achievable for any build system : - -- Directory `lib/common` is always required, for all variants. - -- Compression source code lies in `lib/compress` - -- Decompression source code lies in `lib/decompress` - -- It's possible to include only `compress` or only `decompress`, they don't depend on each other. - -- `lib/dictBuilder` : makes it possible to generate dictionaries from a set of samples. - The API is exposed in `lib/dictBuilder/zdict.h`. - This module depends on both `lib/common` and `lib/compress` . - -- `lib/legacy` : makes it possible to decompress legacy zstd formats, starting from `v0.1.0`. - This module depends on `lib/common` and `lib/decompress`. - To enable this feature, define `ZSTD_LEGACY_SUPPORT` during compilation. - Specifying a number limits versions supported to that version onward. - For example, `ZSTD_LEGACY_SUPPORT=2` means : "support legacy formats >= v0.2.0". - Conversely, `ZSTD_LEGACY_SUPPORT=0` means "do __not__ support legacy formats". - By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=5`. - Decoding supported legacy format is a transparent capability triggered within decompression functions. - It's also allowed to invoke legacy API directly, exposed in `lib/legacy/zstd_legacy.h`. - Each version does also provide its own set of advanced API. - For example, advanced API for version `v0.4` is exposed in `lib/legacy/zstd_v04.h` . - -- While invoking `make libzstd`, it's possible to define build macros - `ZSTD_LIB_COMPRESSION`, `ZSTD_LIB_DECOMPRESSION`, `ZSTD_LIB_DICTBUILDER`, - and `ZSTD_LIB_DEPRECATED` as `0` to forgo compilation of the - corresponding features. This will also disable compilation of all - dependencies (e.g. `ZSTD_LIB_COMPRESSION=0` will also disable - dictBuilder). - -- There are a number of options that can help minimize the binary size of - `libzstd`. - - The first step is to select the components needed (using the above-described - `ZSTD_LIB_COMPRESSION` etc.). - - The next step is to set `ZSTD_LIB_MINIFY` to `1` when invoking `make`. This - disables various optional components and changes the compilation flags to - prioritize space-saving. - - Detailed options: Zstandard's code and build environment is set up by default - to optimize above all else for performance. In pursuit of this goal, Zstandard - makes significant trade-offs in code size. For example, Zstandard often has - more than one implementation of a particular component, with each - implementation optimized for different scenarios. For example, the Huffman - decoder has complementary implementations that decode the stream one symbol at - a time or two symbols at a time. Zstd normally includes both (and dispatches - between them at runtime), but by defining `HUF_FORCE_DECOMPRESS_X1` or - `HUF_FORCE_DECOMPRESS_X2`, you can force the use of one or the other, avoiding - compilation of the other. Similarly, `ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT` - and `ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG` force the compilation and use of - only one or the other of two decompression implementations. The smallest - binary is achieved by using `HUF_FORCE_DECOMPRESS_X1` and - `ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT` (implied by `ZSTD_LIB_MINIFY`). - - On the compressor side, Zstd's compression levels map to several internal - strategies. In environments where the higher compression levels aren't used, - it is possible to exclude all but the fastest strategy with - `ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1`. (Note that this will change - the behavior of the default compression level.) Or if you want to retain the - default compressor as well, you can set - `ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1`, at the cost of an additional - ~20KB or so. - - For squeezing the last ounce of size out, you can also define - `ZSTD_NO_INLINE`, which disables inlining, and `ZSTD_STRIP_ERROR_STRINGS`, - which removes the error messages that are otherwise returned by - `ZSTD_getErrorName` (implied by `ZSTD_LIB_MINIFY`). - - Finally, when integrating into your application, make sure you're doing link- - time optimization and unused symbol garbage collection (via some combination of, - e.g., `-flto`, `-ffat-lto-objects`, `-fuse-linker-plugin`, - `-ffunction-sections`, `-fdata-sections`, `-fmerge-all-constants`, - `-Wl,--gc-sections`, `-Wl,-z,norelro`, and an archiver that understands - the compiler's intermediate representation, e.g., `AR=gcc-ar`). Consult your - compiler's documentation. - -- While invoking `make libzstd`, the build macro `ZSTD_LEGACY_MULTITHREADED_API=1` - will expose the deprecated `ZSTDMT` API exposed by `zstdmt_compress.h` in - the shared library, which is now hidden by default. - -- The build macro `STATIC_BMI2` can be set to 1 to force usage of `bmi2` instructions. - It is generally not necessary to set this build macro, - because `STATIC_BMI2` will be automatically set to 1 - on detecting the presence of the corresponding instruction set in the compilation target. - It's nonetheless available as an optional manual toggle for better control, - and can also be used to forcefully disable `bmi2` instructions by setting it to 0. - -- The build macro `DYNAMIC_BMI2` can be set to 1 or 0 in order to generate binaries - which can detect at runtime the presence of BMI2 instructions, and use them only if present. - These instructions contribute to better performance, notably on the decoder side. - By default, this feature is automatically enabled on detecting - the right instruction set (x64) and compiler (clang or gcc >= 5). - It's obviously disabled for different cpus, - or when BMI2 instruction set is _required_ by the compiler command line - (in this case, only the BMI2 code path is generated). - Setting this macro will either force to generate the BMI2 dispatcher (1) - or prevent it (0). It overrides automatic detection. - -- The build macro `ZSTD_NO_UNUSED_FUNCTIONS` can be defined to hide the definitions of functions - that zstd does not use. Not all unused functions are hidden, but they can be if needed. - Currently, this macro will hide function definitions in FSE and HUF that use an excessive - amount of stack space. - -- The build macro `ZSTD_NO_INTRINSICS` can be defined to disable all explicit intrinsics. - Compiler builtins are still used. - -- The build macro `ZSTD_DECODER_INTERNAL_BUFFER` can be set to control - the amount of extra memory used during decompression to store literals. - This defaults to 64kB. Reducing this value reduces the memory footprint of - `ZSTD_DCtx` decompression contexts, - but might also result in a small decompression speed cost. - -- The C compiler macros `ZSTDLIB_VISIBLE`, `ZSTDERRORLIB_VISIBLE` and `ZDICTLIB_VISIBLE` - can be overridden to control the visibility of zstd's API. Additionally, - `ZSTDLIB_STATIC_API` and `ZDICTLIB_STATIC_API` can be overridden to control the visibility - of zstd's static API. Specifically, it can be set to `ZSTDLIB_HIDDEN` to hide the symbols - from the shared library. These macros default to `ZSTDLIB_VISIBILITY`, - `ZSTDERRORLIB_VSIBILITY`, and `ZDICTLIB_VISIBILITY` if unset, for backwards compatibility - with the old macro names. - -- The C compiler macro `HUF_DISABLE_FAST_DECODE` disables the newer Huffman fast C - and assembly decoding loops. You may want to use this macro if these loops are - slower on your platform. - -#### Windows : using MinGW+MSYS to create DLL - -DLL can be created using MinGW+MSYS with the `make libzstd` command. -This command creates `dll\libzstd.dll` and the import library `dll\libzstd.lib`. -The import library is only required with Visual C++. -The header file `zstd.h` and the dynamic library `dll\libzstd.dll` are required to -compile a project using gcc/MinGW. -The dynamic library has to be added to linking options. -It means that if a project that uses ZSTD consists of a single `test-dll.c` -file it should be linked with `dll\libzstd.dll`. For example: -``` - gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\libzstd.dll -``` -The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. - - -#### Advanced Build options - -The build system requires a hash function in order to -separate object files created with different compilation flags. -By default, it tries to use `md5sum` or equivalent. -The hash function can be manually switched by setting the `HASH` variable. -For example : `make HASH=xxhsum` -The hash function needs to generate at least 64-bit using hexadecimal format. -When no hash function is found, -the Makefile just generates all object files into the same default directory, -irrespective of compilation flags. -This functionality only matters if `libzstd` is compiled multiple times -with different build flags. - -The build directory, where object files are stored -can also be manually controlled using variable `BUILD_DIR`, -for example `make BUILD_DIR=objectDir/v1`. -In which case, the hash function doesn't matter. - - -#### Deprecated API - -Obsolete API on their way out are stored in directory `lib/deprecated`. -At this stage, it contains older streaming prototypes, in `lib/deprecated/zbuff.h`. -These prototypes will be removed in some future version. -Consider migrating code towards supported streaming API exposed in `zstd.h`. - - -#### Miscellaneous - -The other files are not source code. There are : - - - `BUCK` : support for `buck` build system (https://buckbuild.com/) - - `Makefile` : `make` script to build and install zstd library (static and dynamic) - - `README.md` : this file - - `dll/` : resources directory for Windows compilation - - `libzstd.pc.in` : script for `pkg-config` (used in `make install`) diff --git a/third_party/zstd/lib/common/allocations.h b/third_party/zstd/lib/common/allocations.h deleted file mode 100644 index 5e89955..0000000 --- a/third_party/zstd/lib/common/allocations.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* This file provides custom allocation primitives - */ - -#define ZSTD_DEPS_NEED_MALLOC -#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */ - -#include "compiler.h" /* MEM_STATIC */ -#define ZSTD_STATIC_LINKING_ONLY -#include "../zstd.h" /* ZSTD_customMem */ - -#ifndef ZSTD_ALLOCATIONS_H -#define ZSTD_ALLOCATIONS_H - -/* custom memory allocation functions */ - -MEM_STATIC void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) -{ - if (customMem.customAlloc) - return customMem.customAlloc(customMem.opaque, size); - return ZSTD_malloc(size); -} - -MEM_STATIC void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) -{ - if (customMem.customAlloc) { - /* calloc implemented as malloc+memset; - * not as efficient as calloc, but next best guess for custom malloc */ - void* const ptr = customMem.customAlloc(customMem.opaque, size); - ZSTD_memset(ptr, 0, size); - return ptr; - } - return ZSTD_calloc(1, size); -} - -MEM_STATIC void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) -{ - if (ptr!=NULL) { - if (customMem.customFree) - customMem.customFree(customMem.opaque, ptr); - else - ZSTD_free(ptr); - } -} - -#endif /* ZSTD_ALLOCATIONS_H */ diff --git a/third_party/zstd/lib/common/bits.h b/third_party/zstd/lib/common/bits.h deleted file mode 100644 index f452f08..0000000 --- a/third_party/zstd/lib/common/bits.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_BITS_H -#define ZSTD_BITS_H - -#include "mem.h" - -MEM_STATIC unsigned ZSTD_countTrailingZeros32_fallback(U32 val) -{ - assert(val != 0); - { - static const U32 DeBruijnBytePos[32] = {0, 1, 28, 2, 29, 14, 24, 3, - 30, 22, 20, 15, 25, 17, 4, 8, - 31, 27, 13, 23, 21, 19, 16, 7, - 26, 12, 18, 6, 11, 5, 10, 9}; - return DeBruijnBytePos[((U32) ((val & -(S32) val) * 0x077CB531U)) >> 27]; - } -} - -MEM_STATIC unsigned ZSTD_countTrailingZeros32(U32 val) -{ - assert(val != 0); -#if defined(_MSC_VER) -# if STATIC_BMI2 - return (unsigned)_tzcnt_u32(val); -# else - if (val != 0) { - unsigned long r; - _BitScanForward(&r, val); - return (unsigned)r; - } else { - __assume(0); /* Should not reach this code path */ - } -# endif -#elif defined(__GNUC__) && (__GNUC__ >= 4) - return (unsigned)__builtin_ctz(val); -#elif defined(__ICCARM__) - return (unsigned)__builtin_ctz(val); -#else - return ZSTD_countTrailingZeros32_fallback(val); -#endif -} - -MEM_STATIC unsigned ZSTD_countLeadingZeros32_fallback(U32 val) -{ - assert(val != 0); - { - static const U32 DeBruijnClz[32] = {0, 9, 1, 10, 13, 21, 2, 29, - 11, 14, 16, 18, 22, 25, 3, 30, - 8, 12, 20, 28, 15, 17, 24, 7, - 19, 27, 23, 6, 26, 5, 4, 31}; - val |= val >> 1; - val |= val >> 2; - val |= val >> 4; - val |= val >> 8; - val |= val >> 16; - return 31 - DeBruijnClz[(val * 0x07C4ACDDU) >> 27]; - } -} - -MEM_STATIC unsigned ZSTD_countLeadingZeros32(U32 val) -{ - assert(val != 0); -#if defined(_MSC_VER) -# if STATIC_BMI2 - return (unsigned)_lzcnt_u32(val); -# else - if (val != 0) { - unsigned long r; - _BitScanReverse(&r, val); - return (unsigned)(31 - r); - } else { - __assume(0); /* Should not reach this code path */ - } -# endif -#elif defined(__GNUC__) && (__GNUC__ >= 4) - return (unsigned)__builtin_clz(val); -#elif defined(__ICCARM__) - return (unsigned)__builtin_clz(val); -#else - return ZSTD_countLeadingZeros32_fallback(val); -#endif -} - -MEM_STATIC unsigned ZSTD_countTrailingZeros64(U64 val) -{ - assert(val != 0); -#if defined(_MSC_VER) && defined(_WIN64) -# if STATIC_BMI2 - return (unsigned)_tzcnt_u64(val); -# else - if (val != 0) { - unsigned long r; - _BitScanForward64(&r, val); - return (unsigned)r; - } else { - __assume(0); /* Should not reach this code path */ - } -# endif -#elif defined(__GNUC__) && (__GNUC__ >= 4) && defined(__LP64__) - return (unsigned)__builtin_ctzll(val); -#elif defined(__ICCARM__) - return (unsigned)__builtin_ctzll(val); -#else - { - U32 mostSignificantWord = (U32)(val >> 32); - U32 leastSignificantWord = (U32)val; - if (leastSignificantWord == 0) { - return 32 + ZSTD_countTrailingZeros32(mostSignificantWord); - } else { - return ZSTD_countTrailingZeros32(leastSignificantWord); - } - } -#endif -} - -MEM_STATIC unsigned ZSTD_countLeadingZeros64(U64 val) -{ - assert(val != 0); -#if defined(_MSC_VER) && defined(_WIN64) -# if STATIC_BMI2 - return (unsigned)_lzcnt_u64(val); -# else - if (val != 0) { - unsigned long r; - _BitScanReverse64(&r, val); - return (unsigned)(63 - r); - } else { - __assume(0); /* Should not reach this code path */ - } -# endif -#elif defined(__GNUC__) && (__GNUC__ >= 4) - return (unsigned)(__builtin_clzll(val)); -#elif defined(__ICCARM__) - return (unsigned)(__builtin_clzll(val)); -#else - { - U32 mostSignificantWord = (U32)(val >> 32); - U32 leastSignificantWord = (U32)val; - if (mostSignificantWord == 0) { - return 32 + ZSTD_countLeadingZeros32(leastSignificantWord); - } else { - return ZSTD_countLeadingZeros32(mostSignificantWord); - } - } -#endif -} - -MEM_STATIC unsigned ZSTD_NbCommonBytes(size_t val) -{ - if (MEM_isLittleEndian()) { - if (MEM_64bits()) { - return ZSTD_countTrailingZeros64((U64)val) >> 3; - } else { - return ZSTD_countTrailingZeros32((U32)val) >> 3; - } - } else { /* Big Endian CPU */ - if (MEM_64bits()) { - return ZSTD_countLeadingZeros64((U64)val) >> 3; - } else { - return ZSTD_countLeadingZeros32((U32)val) >> 3; - } - } -} - -MEM_STATIC unsigned ZSTD_highbit32(U32 val) /* compress, dictBuilder, decodeCorpus */ -{ - assert(val != 0); - return 31 - ZSTD_countLeadingZeros32(val); -} - -/* ZSTD_rotateRight_*(): - * Rotates a bitfield to the right by "count" bits. - * https://en.wikipedia.org/w/index.php?title=Circular_shift&oldid=991635599#Implementing_circular_shifts - */ -MEM_STATIC -U64 ZSTD_rotateRight_U64(U64 const value, U32 count) { - assert(count < 64); - count &= 0x3F; /* for fickle pattern recognition */ - return (value >> count) | (U64)(value << ((0U - count) & 0x3F)); -} - -MEM_STATIC -U32 ZSTD_rotateRight_U32(U32 const value, U32 count) { - assert(count < 32); - count &= 0x1F; /* for fickle pattern recognition */ - return (value >> count) | (U32)(value << ((0U - count) & 0x1F)); -} - -MEM_STATIC -U16 ZSTD_rotateRight_U16(U16 const value, U32 count) { - assert(count < 16); - count &= 0x0F; /* for fickle pattern recognition */ - return (value >> count) | (U16)(value << ((0U - count) & 0x0F)); -} - -#endif /* ZSTD_BITS_H */ diff --git a/third_party/zstd/lib/common/bitstream.h b/third_party/zstd/lib/common/bitstream.h deleted file mode 100644 index 3b7ad48..0000000 --- a/third_party/zstd/lib/common/bitstream.h +++ /dev/null @@ -1,454 +0,0 @@ -/* ****************************************************************** - * bitstream - * Part of FSE library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ -#ifndef BITSTREAM_H_MODULE -#define BITSTREAM_H_MODULE - -/* -* This API consists of small unitary functions, which must be inlined for best performance. -* Since link-time-optimization is not available for all compilers, -* these functions are defined into a .h to be included. -*/ - -/*-**************************************** -* Dependencies -******************************************/ -#include "mem.h" /* unaligned access routines */ -#include "compiler.h" /* UNLIKELY() */ -#include "debug.h" /* assert(), DEBUGLOG(), RAWLOG() */ -#include "error_private.h" /* error codes and messages */ -#include "bits.h" /* ZSTD_highbit32 */ - -/*========================================= -* Target specific -=========================================*/ -#ifndef ZSTD_NO_INTRINSICS -# if (defined(__BMI__) || defined(__BMI2__)) && defined(__GNUC__) -# include /* support for bextr (experimental)/bzhi */ -# elif defined(__ICCARM__) -# include -# endif -#endif - -#define STREAM_ACCUMULATOR_MIN_32 25 -#define STREAM_ACCUMULATOR_MIN_64 57 -#define STREAM_ACCUMULATOR_MIN ((U32)(MEM_32bits() ? STREAM_ACCUMULATOR_MIN_32 : STREAM_ACCUMULATOR_MIN_64)) - - -/*-****************************************** -* bitStream encoding API (write forward) -********************************************/ -typedef size_t BitContainerType; -/* bitStream can mix input from multiple sources. - * A critical property of these streams is that they encode and decode in **reverse** direction. - * So the first bit sequence you add will be the last to be read, like a LIFO stack. - */ -typedef struct { - BitContainerType bitContainer; - unsigned bitPos; - char* startPtr; - char* ptr; - char* endPtr; -} BIT_CStream_t; - -MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, void* dstBuffer, size_t dstCapacity); -MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, BitContainerType value, unsigned nbBits); -MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC); -MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC); - -/* Start with initCStream, providing the size of buffer to write into. -* bitStream will never write outside of this buffer. -* `dstCapacity` must be >= sizeof(bitD->bitContainer), otherwise @return will be an error code. -* -* bits are first added to a local register. -* Local register is BitContainerType, 64-bits on 64-bits systems, or 32-bits on 32-bits systems. -* Writing data into memory is an explicit operation, performed by the flushBits function. -* Hence keep track how many bits are potentially stored into local register to avoid register overflow. -* After a flushBits, a maximum of 7 bits might still be stored into local register. -* -* Avoid storing elements of more than 24 bits if you want compatibility with 32-bits bitstream readers. -* -* Last operation is to close the bitStream. -* The function returns the final size of CStream in bytes. -* If data couldn't fit into `dstBuffer`, it will return a 0 ( == not storable) -*/ - - -/*-******************************************** -* bitStream decoding API (read backward) -**********************************************/ -typedef struct { - BitContainerType bitContainer; - unsigned bitsConsumed; - const char* ptr; - const char* start; - const char* limitPtr; -} BIT_DStream_t; - -typedef enum { BIT_DStream_unfinished = 0, /* fully refilled */ - BIT_DStream_endOfBuffer = 1, /* still some bits left in bitstream */ - BIT_DStream_completed = 2, /* bitstream entirely consumed, bit-exact */ - BIT_DStream_overflow = 3 /* user requested more bits than present in bitstream */ - } BIT_DStream_status; /* result of BIT_reloadDStream() */ - -MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize); -MEM_STATIC BitContainerType BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits); -MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD); -MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* bitD); - - -/* Start by invoking BIT_initDStream(). -* A chunk of the bitStream is then stored into a local register. -* Local register size is 64-bits on 64-bits systems, 32-bits on 32-bits systems (BitContainerType). -* You can then retrieve bitFields stored into the local register, **in reverse order**. -* Local register is explicitly reloaded from memory by the BIT_reloadDStream() method. -* A reload guarantee a minimum of ((8*sizeof(bitD->bitContainer))-7) bits when its result is BIT_DStream_unfinished. -* Otherwise, it can be less than that, so proceed accordingly. -* Checking if DStream has reached its end can be performed with BIT_endOfDStream(). -*/ - - -/*-**************************************** -* unsafe API -******************************************/ -MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, BitContainerType value, unsigned nbBits); -/* faster, but works only if value is "clean", meaning all high bits above nbBits are 0 */ - -MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC); -/* unsafe version; does not check buffer overflow */ - -MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits); -/* faster, but works only if nbBits >= 1 */ - -/*===== Local Constants =====*/ -static const unsigned BIT_mask[] = { - 0, 1, 3, 7, 0xF, 0x1F, - 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, - 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0x1FFFF, - 0x3FFFF, 0x7FFFF, 0xFFFFF, 0x1FFFFF, 0x3FFFFF, 0x7FFFFF, - 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF, 0x7FFFFFF, 0xFFFFFFF, 0x1FFFFFFF, - 0x3FFFFFFF, 0x7FFFFFFF}; /* up to 31 bits */ -#define BIT_MASK_SIZE (sizeof(BIT_mask) / sizeof(BIT_mask[0])) - -/*-************************************************************** -* bitStream encoding -****************************************************************/ -/*! BIT_initCStream() : - * `dstCapacity` must be > sizeof(size_t) - * @return : 0 if success, - * otherwise an error code (can be tested using ERR_isError()) */ -MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, - void* startPtr, size_t dstCapacity) -{ - bitC->bitContainer = 0; - bitC->bitPos = 0; - bitC->startPtr = (char*)startPtr; - bitC->ptr = bitC->startPtr; - bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->bitContainer); - if (dstCapacity <= sizeof(bitC->bitContainer)) return ERROR(dstSize_tooSmall); - return 0; -} - -FORCE_INLINE_TEMPLATE BitContainerType BIT_getLowerBits(BitContainerType bitContainer, U32 const nbBits) -{ -#if STATIC_BMI2 && !defined(ZSTD_NO_INTRINSICS) -# if (defined(__x86_64__) || defined(_M_X64)) && !defined(__ILP32__) - return _bzhi_u64(bitContainer, nbBits); -# else - DEBUG_STATIC_ASSERT(sizeof(bitContainer) == sizeof(U32)); - return _bzhi_u32(bitContainer, nbBits); -# endif -#else - assert(nbBits < BIT_MASK_SIZE); - return bitContainer & BIT_mask[nbBits]; -#endif -} - -/*! BIT_addBits() : - * can add up to 31 bits into `bitC`. - * Note : does not check for register overflow ! */ -MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, - BitContainerType value, unsigned nbBits) -{ - DEBUG_STATIC_ASSERT(BIT_MASK_SIZE == 32); - assert(nbBits < BIT_MASK_SIZE); - assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8); - bitC->bitContainer |= BIT_getLowerBits(value, nbBits) << bitC->bitPos; - bitC->bitPos += nbBits; -} - -/*! BIT_addBitsFast() : - * works only if `value` is _clean_, - * meaning all high bits above nbBits are 0 */ -MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, - BitContainerType value, unsigned nbBits) -{ - assert((value>>nbBits) == 0); - assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8); - bitC->bitContainer |= value << bitC->bitPos; - bitC->bitPos += nbBits; -} - -/*! BIT_flushBitsFast() : - * assumption : bitContainer has not overflowed - * unsafe version; does not check buffer overflow */ -MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC) -{ - size_t const nbBytes = bitC->bitPos >> 3; - assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8); - assert(bitC->ptr <= bitC->endPtr); - MEM_writeLEST(bitC->ptr, bitC->bitContainer); - bitC->ptr += nbBytes; - bitC->bitPos &= 7; - bitC->bitContainer >>= nbBytes*8; -} - -/*! BIT_flushBits() : - * assumption : bitContainer has not overflowed - * safe version; check for buffer overflow, and prevents it. - * note : does not signal buffer overflow. - * overflow will be revealed later on using BIT_closeCStream() */ -MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC) -{ - size_t const nbBytes = bitC->bitPos >> 3; - assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8); - assert(bitC->ptr <= bitC->endPtr); - MEM_writeLEST(bitC->ptr, bitC->bitContainer); - bitC->ptr += nbBytes; - if (bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr; - bitC->bitPos &= 7; - bitC->bitContainer >>= nbBytes*8; -} - -/*! BIT_closeCStream() : - * @return : size of CStream, in bytes, - * or 0 if it could not fit into dstBuffer */ -MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC) -{ - BIT_addBitsFast(bitC, 1, 1); /* endMark */ - BIT_flushBits(bitC); - if (bitC->ptr >= bitC->endPtr) return 0; /* overflow detected */ - return (size_t)(bitC->ptr - bitC->startPtr) + (bitC->bitPos > 0); -} - - -/*-******************************************************** -* bitStream decoding -**********************************************************/ -/*! BIT_initDStream() : - * Initialize a BIT_DStream_t. - * `bitD` : a pointer to an already allocated BIT_DStream_t structure. - * `srcSize` must be the *exact* size of the bitStream, in bytes. - * @return : size of stream (== srcSize), or an errorCode if a problem is detected - */ -MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize) -{ - if (srcSize < 1) { ZSTD_memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); } - - bitD->start = (const char*)srcBuffer; - bitD->limitPtr = bitD->start + sizeof(bitD->bitContainer); - - if (srcSize >= sizeof(bitD->bitContainer)) { /* normal case */ - bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(bitD->bitContainer); - bitD->bitContainer = MEM_readLEST(bitD->ptr); - { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; - bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; /* ensures bitsConsumed is always set */ - if (lastByte == 0) return ERROR(GENERIC); /* endMark not present */ } - } else { - bitD->ptr = bitD->start; - bitD->bitContainer = *(const BYTE*)(bitD->start); - switch(srcSize) - { - case 7: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16); - ZSTD_FALLTHROUGH; - - case 6: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[5]) << (sizeof(bitD->bitContainer)*8 - 24); - ZSTD_FALLTHROUGH; - - case 5: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[4]) << (sizeof(bitD->bitContainer)*8 - 32); - ZSTD_FALLTHROUGH; - - case 4: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[3]) << 24; - ZSTD_FALLTHROUGH; - - case 3: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[2]) << 16; - ZSTD_FALLTHROUGH; - - case 2: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[1]) << 8; - ZSTD_FALLTHROUGH; - - default: break; - } - { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; - bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; - if (lastByte == 0) return ERROR(corruption_detected); /* endMark not present */ - } - bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8; - } - - return srcSize; -} - -FORCE_INLINE_TEMPLATE BitContainerType BIT_getUpperBits(BitContainerType bitContainer, U32 const start) -{ - return bitContainer >> start; -} - -FORCE_INLINE_TEMPLATE BitContainerType BIT_getMiddleBits(BitContainerType bitContainer, U32 const start, U32 const nbBits) -{ - U32 const regMask = sizeof(bitContainer)*8 - 1; - /* if start > regMask, bitstream is corrupted, and result is undefined */ - assert(nbBits < BIT_MASK_SIZE); - /* x86 transform & ((1 << nbBits) - 1) to bzhi instruction, it is better - * than accessing memory. When bmi2 instruction is not present, we consider - * such cpus old (pre-Haswell, 2013) and their performance is not of that - * importance. - */ -#if defined(__x86_64__) || defined(_M_X64) - return (bitContainer >> (start & regMask)) & ((((U64)1) << nbBits) - 1); -#else - return (bitContainer >> (start & regMask)) & BIT_mask[nbBits]; -#endif -} - -/*! BIT_lookBits() : - * Provides next n bits from local register. - * local register is not modified. - * On 32-bits, maxNbBits==24. - * On 64-bits, maxNbBits==56. - * @return : value extracted */ -FORCE_INLINE_TEMPLATE BitContainerType BIT_lookBits(const BIT_DStream_t* bitD, U32 nbBits) -{ - /* arbitrate between double-shift and shift+mask */ -#if 1 - /* if bitD->bitsConsumed + nbBits > sizeof(bitD->bitContainer)*8, - * bitstream is likely corrupted, and result is undefined */ - return BIT_getMiddleBits(bitD->bitContainer, (sizeof(bitD->bitContainer)*8) - bitD->bitsConsumed - nbBits, nbBits); -#else - /* this code path is slower on my os-x laptop */ - U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; - return ((bitD->bitContainer << (bitD->bitsConsumed & regMask)) >> 1) >> ((regMask-nbBits) & regMask); -#endif -} - -/*! BIT_lookBitsFast() : - * unsafe version; only works if nbBits >= 1 */ -MEM_STATIC BitContainerType BIT_lookBitsFast(const BIT_DStream_t* bitD, U32 nbBits) -{ - U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; - assert(nbBits >= 1); - return (bitD->bitContainer << (bitD->bitsConsumed & regMask)) >> (((regMask+1)-nbBits) & regMask); -} - -FORCE_INLINE_TEMPLATE void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) -{ - bitD->bitsConsumed += nbBits; -} - -/*! BIT_readBits() : - * Read (consume) next n bits from local register and update. - * Pay attention to not read more than nbBits contained into local register. - * @return : extracted value. */ -FORCE_INLINE_TEMPLATE BitContainerType BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits) -{ - BitContainerType const value = BIT_lookBits(bitD, nbBits); - BIT_skipBits(bitD, nbBits); - return value; -} - -/*! BIT_readBitsFast() : - * unsafe version; only works if nbBits >= 1 */ -MEM_STATIC BitContainerType BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits) -{ - BitContainerType const value = BIT_lookBitsFast(bitD, nbBits); - assert(nbBits >= 1); - BIT_skipBits(bitD, nbBits); - return value; -} - -/*! BIT_reloadDStream_internal() : - * Simple variant of BIT_reloadDStream(), with two conditions: - * 1. bitstream is valid : bitsConsumed <= sizeof(bitD->bitContainer)*8 - * 2. look window is valid after shifted down : bitD->ptr >= bitD->start - */ -MEM_STATIC BIT_DStream_status BIT_reloadDStream_internal(BIT_DStream_t* bitD) -{ - assert(bitD->bitsConsumed <= sizeof(bitD->bitContainer)*8); - bitD->ptr -= bitD->bitsConsumed >> 3; - assert(bitD->ptr >= bitD->start); - bitD->bitsConsumed &= 7; - bitD->bitContainer = MEM_readLEST(bitD->ptr); - return BIT_DStream_unfinished; -} - -/*! BIT_reloadDStreamFast() : - * Similar to BIT_reloadDStream(), but with two differences: - * 1. bitsConsumed <= sizeof(bitD->bitContainer)*8 must hold! - * 2. Returns BIT_DStream_overflow when bitD->ptr < bitD->limitPtr, at this - * point you must use BIT_reloadDStream() to reload. - */ -MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD) -{ - if (UNLIKELY(bitD->ptr < bitD->limitPtr)) - return BIT_DStream_overflow; - return BIT_reloadDStream_internal(bitD); -} - -/*! BIT_reloadDStream() : - * Refill `bitD` from buffer previously set in BIT_initDStream() . - * This function is safe, it guarantees it will not never beyond src buffer. - * @return : status of `BIT_DStream_t` internal register. - * when status == BIT_DStream_unfinished, internal register is filled with at least 25 or 57 bits */ -FORCE_INLINE_TEMPLATE BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD) -{ - /* note : once in overflow mode, a bitstream remains in this mode until it's reset */ - if (UNLIKELY(bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8))) { - static const BitContainerType zeroFilled = 0; - bitD->ptr = (const char*)&zeroFilled; /* aliasing is allowed for char */ - /* overflow detected, erroneous scenario or end of stream: no update */ - return BIT_DStream_overflow; - } - - assert(bitD->ptr >= bitD->start); - - if (bitD->ptr >= bitD->limitPtr) { - return BIT_reloadDStream_internal(bitD); - } - if (bitD->ptr == bitD->start) { - /* reached end of bitStream => no update */ - if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BIT_DStream_endOfBuffer; - return BIT_DStream_completed; - } - /* start < ptr < limitPtr => cautious update */ - { U32 nbBytes = bitD->bitsConsumed >> 3; - BIT_DStream_status result = BIT_DStream_unfinished; - if (bitD->ptr - nbBytes < bitD->start) { - nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ - result = BIT_DStream_endOfBuffer; - } - bitD->ptr -= nbBytes; - bitD->bitsConsumed -= nbBytes*8; - bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD->bitContainer), otherwise bitD->ptr == bitD->start */ - return result; - } -} - -/*! BIT_endOfDStream() : - * @return : 1 if DStream has _exactly_ reached its end (all bits consumed). - */ -MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream) -{ - return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer)*8)); -} - -#endif /* BITSTREAM_H_MODULE */ diff --git a/third_party/zstd/lib/common/compiler.h b/third_party/zstd/lib/common/compiler.h deleted file mode 100644 index 1f7da50..0000000 --- a/third_party/zstd/lib/common/compiler.h +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_COMPILER_H -#define ZSTD_COMPILER_H - -#include - -#include "portability_macros.h" - -/*-******************************************************* -* Compiler specifics -*********************************************************/ -/* force inlining */ - -#if !defined(ZSTD_NO_INLINE) -#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# define INLINE_KEYWORD inline -#else -# define INLINE_KEYWORD -#endif - -#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) -# define FORCE_INLINE_ATTR __attribute__((always_inline)) -#elif defined(_MSC_VER) -# define FORCE_INLINE_ATTR __forceinline -#else -# define FORCE_INLINE_ATTR -#endif - -#else - -#define INLINE_KEYWORD -#define FORCE_INLINE_ATTR - -#endif - -/** - On MSVC qsort requires that functions passed into it use the __cdecl calling conversion(CC). - This explicitly marks such functions as __cdecl so that the code will still compile - if a CC other than __cdecl has been made the default. -*/ -#if defined(_MSC_VER) -# define WIN_CDECL __cdecl -#else -# define WIN_CDECL -#endif - -/* UNUSED_ATTR tells the compiler it is okay if the function is unused. */ -#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) -# define UNUSED_ATTR __attribute__((unused)) -#else -# define UNUSED_ATTR -#endif - -/** - * FORCE_INLINE_TEMPLATE is used to define C "templates", which take constant - * parameters. They must be inlined for the compiler to eliminate the constant - * branches. - */ -#define FORCE_INLINE_TEMPLATE static INLINE_KEYWORD FORCE_INLINE_ATTR UNUSED_ATTR -/** - * HINT_INLINE is used to help the compiler generate better code. It is *not* - * used for "templates", so it can be tweaked based on the compilers - * performance. - * - * gcc-4.8 and gcc-4.9 have been shown to benefit from leaving off the - * always_inline attribute. - * - * clang up to 5.0.0 (trunk) benefit tremendously from the always_inline - * attribute. - */ -#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8 && __GNUC__ < 5 -# define HINT_INLINE static INLINE_KEYWORD -#else -# define HINT_INLINE FORCE_INLINE_TEMPLATE -#endif - -/* "soft" inline : - * The compiler is free to select if it's a good idea to inline or not. - * The main objective is to silence compiler warnings - * when a defined function in included but not used. - * - * Note : this macro is prefixed `MEM_` because it used to be provided by `mem.h` unit. - * Updating the prefix is probably preferable, but requires a fairly large codemod, - * since this name is used everywhere. - */ -#ifndef MEM_STATIC /* already defined in Linux Kernel mem.h */ -#if defined(__GNUC__) -# define MEM_STATIC static __inline UNUSED_ATTR -#elif defined(__IAR_SYSTEMS_ICC__) -# define MEM_STATIC static inline UNUSED_ATTR -#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# define MEM_STATIC static inline -#elif defined(_MSC_VER) -# define MEM_STATIC static __inline -#else -# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ -#endif -#endif - -/* force no inlining */ -#ifdef _MSC_VER -# define FORCE_NOINLINE static __declspec(noinline) -#else -# if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) -# define FORCE_NOINLINE static __attribute__((__noinline__)) -# else -# define FORCE_NOINLINE static -# endif -#endif - - -/* target attribute */ -#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) -# define TARGET_ATTRIBUTE(target) __attribute__((__target__(target))) -#else -# define TARGET_ATTRIBUTE(target) -#endif - -/* Target attribute for BMI2 dynamic dispatch. - * Enable lzcnt, bmi, and bmi2. - * We test for bmi1 & bmi2. lzcnt is included in bmi1. - */ -#define BMI2_TARGET_ATTRIBUTE TARGET_ATTRIBUTE("lzcnt,bmi,bmi2") - -/* prefetch - * can be disabled, by declaring NO_PREFETCH build macro */ -#if defined(NO_PREFETCH) -# define PREFETCH_L1(ptr) do { (void)(ptr); } while (0) /* disabled */ -# define PREFETCH_L2(ptr) do { (void)(ptr); } while (0) /* disabled */ -#else -# if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) && !defined(_M_ARM64EC) /* _mm_prefetch() is not defined outside of x86/x64 */ -# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ -# define PREFETCH_L1(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) -# define PREFETCH_L2(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T1) -# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) -# define PREFETCH_L1(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) -# define PREFETCH_L2(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 2 /* locality */) -# elif defined(__aarch64__) -# define PREFETCH_L1(ptr) do { __asm__ __volatile__("prfm pldl1keep, %0" ::"Q"(*(ptr))); } while (0) -# define PREFETCH_L2(ptr) do { __asm__ __volatile__("prfm pldl2keep, %0" ::"Q"(*(ptr))); } while (0) -# else -# define PREFETCH_L1(ptr) do { (void)(ptr); } while (0) /* disabled */ -# define PREFETCH_L2(ptr) do { (void)(ptr); } while (0) /* disabled */ -# endif -#endif /* NO_PREFETCH */ - -#define CACHELINE_SIZE 64 - -#define PREFETCH_AREA(p, s) \ - do { \ - const char* const _ptr = (const char*)(p); \ - size_t const _size = (size_t)(s); \ - size_t _pos; \ - for (_pos=0; _pos<_size; _pos+=CACHELINE_SIZE) { \ - PREFETCH_L2(_ptr + _pos); \ - } \ - } while (0) - -/* vectorization - * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax, - * and some compilers, like Intel ICC and MCST LCC, do not support it at all. */ -#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && !defined(__LCC__) -# if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5) -# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) -# else -# define DONT_VECTORIZE _Pragma("GCC optimize(\"no-tree-vectorize\")") -# endif -#else -# define DONT_VECTORIZE -#endif - -/* Tell the compiler that a branch is likely or unlikely. - * Only use these macros if it causes the compiler to generate better code. - * If you can remove a LIKELY/UNLIKELY annotation without speed changes in gcc - * and clang, please do. - */ -#if defined(__GNUC__) -#define LIKELY(x) (__builtin_expect((x), 1)) -#define UNLIKELY(x) (__builtin_expect((x), 0)) -#else -#define LIKELY(x) (x) -#define UNLIKELY(x) (x) -#endif - -#if __has_builtin(__builtin_unreachable) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))) -# define ZSTD_UNREACHABLE do { assert(0), __builtin_unreachable(); } while (0) -#else -# define ZSTD_UNREACHABLE do { assert(0); } while (0) -#endif - -/* disable warnings */ -#ifdef _MSC_VER /* Visual Studio */ -# include /* For Visual 2005 */ -# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ -# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ -# pragma warning(disable : 4324) /* disable: C4324: padded structure */ -#endif - -/* compile time determination of SIMD support */ -#if !defined(ZSTD_NO_INTRINSICS) -# if defined(__AVX2__) -# define ZSTD_ARCH_X86_AVX2 -# endif -# if defined(__SSE2__) || defined(_M_X64) || (defined (_M_IX86) && defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) -# define ZSTD_ARCH_X86_SSE2 -# endif -# if defined(__ARM_NEON) || defined(_M_ARM64) -# define ZSTD_ARCH_ARM_NEON -# endif -# -# if defined(ZSTD_ARCH_X86_AVX2) -# include -# endif -# if defined(ZSTD_ARCH_X86_SSE2) -# include -# elif defined(ZSTD_ARCH_ARM_NEON) -# include -# endif -#endif - -/* C-language Attributes are added in C23. */ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201710L) && defined(__has_c_attribute) -# define ZSTD_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) -#else -# define ZSTD_HAS_C_ATTRIBUTE(x) 0 -#endif - -/* Only use C++ attributes in C++. Some compilers report support for C++ - * attributes when compiling with C. - */ -#if defined(__cplusplus) && defined(__has_cpp_attribute) -# define ZSTD_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -# define ZSTD_HAS_CPP_ATTRIBUTE(x) 0 -#endif - -/* Define ZSTD_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute. - * - C23: https://en.cppreference.com/w/c/language/attributes/fallthrough - * - CPP17: https://en.cppreference.com/w/cpp/language/attributes/fallthrough - * - Else: __attribute__((__fallthrough__)) - */ -#ifndef ZSTD_FALLTHROUGH -# if ZSTD_HAS_C_ATTRIBUTE(fallthrough) -# define ZSTD_FALLTHROUGH [[fallthrough]] -# elif ZSTD_HAS_CPP_ATTRIBUTE(fallthrough) -# define ZSTD_FALLTHROUGH [[fallthrough]] -# elif __has_attribute(__fallthrough__) -/* Leading semicolon is to satisfy gcc-11 with -pedantic. Without the semicolon - * gcc complains about: a label can only be part of a statement and a declaration is not a statement. - */ -# define ZSTD_FALLTHROUGH ; __attribute__((__fallthrough__)) -# else -# define ZSTD_FALLTHROUGH -# endif -#endif - -/*-************************************************************** -* Alignment -*****************************************************************/ - -/* @return 1 if @u is a 2^n value, 0 otherwise - * useful to check a value is valid for alignment restrictions */ -MEM_STATIC int ZSTD_isPower2(size_t u) { - return (u & (u-1)) == 0; -} - -/* this test was initially positioned in mem.h, - * but this file is removed (or replaced) for linux kernel - * so it's now hosted in compiler.h, - * which remains valid for both user & kernel spaces. - */ - -#ifndef ZSTD_ALIGNOF -# if defined(__GNUC__) || defined(_MSC_VER) -/* covers gcc, clang & MSVC */ -/* note : this section must come first, before C11, - * due to a limitation in the kernel source generator */ -# define ZSTD_ALIGNOF(T) __alignof(T) - -# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) -/* C11 support */ -# include -# define ZSTD_ALIGNOF(T) alignof(T) - -# else -/* No known support for alignof() - imperfect backup */ -# define ZSTD_ALIGNOF(T) (sizeof(void*) < sizeof(T) ? sizeof(void*) : sizeof(T)) - -# endif -#endif /* ZSTD_ALIGNOF */ - -#ifndef ZSTD_ALIGNED -/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */ -# if defined(__GNUC__) || defined(__clang__) -# define ZSTD_ALIGNED(a) __attribute__((aligned(a))) -# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ -# define ZSTD_ALIGNED(a) _Alignas(a) -#elif defined(_MSC_VER) -# define ZSTD_ALIGNED(n) __declspec(align(n)) -# else - /* this compiler will require its own alignment instruction */ -# define ZSTD_ALIGNED(...) -# endif -#endif /* ZSTD_ALIGNED */ - - -/*-************************************************************** -* Sanitizer -*****************************************************************/ - -/** - * Zstd relies on pointer overflow in its decompressor. - * We add this attribute to functions that rely on pointer overflow. - */ -#ifndef ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -# if __has_attribute(no_sanitize) -# if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 8 - /* gcc < 8 only has signed-integer-overlow which triggers on pointer overflow */ -# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR __attribute__((no_sanitize("signed-integer-overflow"))) -# else - /* older versions of clang [3.7, 5.0) will warn that pointer-overflow is ignored. */ -# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR __attribute__((no_sanitize("pointer-overflow"))) -# endif -# else -# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -# endif -#endif - -/** - * Helper function to perform a wrapped pointer difference without triggering - * UBSAN. - * - * @returns lhs - rhs with wrapping - */ -MEM_STATIC -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -ptrdiff_t ZSTD_wrappedPtrDiff(unsigned char const* lhs, unsigned char const* rhs) -{ - return lhs - rhs; -} - -/** - * Helper function to perform a wrapped pointer add without triggering UBSAN. - * - * @return ptr + add with wrapping - */ -MEM_STATIC -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -unsigned char const* ZSTD_wrappedPtrAdd(unsigned char const* ptr, ptrdiff_t add) -{ - return ptr + add; -} - -/** - * Helper function to perform a wrapped pointer subtraction without triggering - * UBSAN. - * - * @return ptr - sub with wrapping - */ -MEM_STATIC -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -unsigned char const* ZSTD_wrappedPtrSub(unsigned char const* ptr, ptrdiff_t sub) -{ - return ptr - sub; -} - -/** - * Helper function to add to a pointer that works around C's undefined behavior - * of adding 0 to NULL. - * - * @returns `ptr + add` except it defines `NULL + 0 == NULL`. - */ -MEM_STATIC -unsigned char* ZSTD_maybeNullPtrAdd(unsigned char* ptr, ptrdiff_t add) -{ - return add > 0 ? ptr + add : ptr; -} - -/* Issue #3240 reports an ASAN failure on an llvm-mingw build. Out of an - * abundance of caution, disable our custom poisoning on mingw. */ -#ifdef __MINGW32__ -#ifndef ZSTD_ASAN_DONT_POISON_WORKSPACE -#define ZSTD_ASAN_DONT_POISON_WORKSPACE 1 -#endif -#ifndef ZSTD_MSAN_DONT_POISON_WORKSPACE -#define ZSTD_MSAN_DONT_POISON_WORKSPACE 1 -#endif -#endif - -#if ZSTD_MEMORY_SANITIZER && !defined(ZSTD_MSAN_DONT_POISON_WORKSPACE) -/* Not all platforms that support msan provide sanitizers/msan_interface.h. - * We therefore declare the functions we need ourselves, rather than trying to - * include the header file... */ -#include /* size_t */ -#define ZSTD_DEPS_NEED_STDINT -#include "zstd_deps.h" /* intptr_t */ - -/* Make memory region fully initialized (without changing its contents). */ -void __msan_unpoison(const volatile void *a, size_t size); - -/* Make memory region fully uninitialized (without changing its contents). - This is a legacy interface that does not update origin information. Use - __msan_allocated_memory() instead. */ -void __msan_poison(const volatile void *a, size_t size); - -/* Returns the offset of the first (at least partially) poisoned byte in the - memory range, or -1 if the whole range is good. */ -intptr_t __msan_test_shadow(const volatile void *x, size_t size); - -/* Print shadow and origin for the memory range to stderr in a human-readable - format. */ -void __msan_print_shadow(const volatile void *x, size_t size); -#endif - -#if ZSTD_ADDRESS_SANITIZER && !defined(ZSTD_ASAN_DONT_POISON_WORKSPACE) -/* Not all platforms that support asan provide sanitizers/asan_interface.h. - * We therefore declare the functions we need ourselves, rather than trying to - * include the header file... */ -#include /* size_t */ - -/** - * Marks a memory region ([addr, addr+size)) as unaddressable. - * - * This memory must be previously allocated by your program. Instrumented - * code is forbidden from accessing addresses in this region until it is - * unpoisoned. This function is not guaranteed to poison the entire region - - * it could poison only a subregion of [addr, addr+size) due to ASan - * alignment restrictions. - * - * \note This function is not thread-safe because no two threads can poison or - * unpoison memory in the same memory region simultaneously. - * - * \param addr Start of memory region. - * \param size Size of memory region. */ -void __asan_poison_memory_region(void const volatile *addr, size_t size); - -/** - * Marks a memory region ([addr, addr+size)) as addressable. - * - * This memory must be previously allocated by your program. Accessing - * addresses in this region is allowed until this region is poisoned again. - * This function could unpoison a super-region of [addr, addr+size) due - * to ASan alignment restrictions. - * - * \note This function is not thread-safe because no two threads can - * poison or unpoison memory in the same memory region simultaneously. - * - * \param addr Start of memory region. - * \param size Size of memory region. */ -void __asan_unpoison_memory_region(void const volatile *addr, size_t size); -#endif - -#endif /* ZSTD_COMPILER_H */ diff --git a/third_party/zstd/lib/common/cpu.h b/third_party/zstd/lib/common/cpu.h deleted file mode 100644 index 3f15d56..0000000 --- a/third_party/zstd/lib/common/cpu.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_COMMON_CPU_H -#define ZSTD_COMMON_CPU_H - -/** - * Implementation taken from folly/CpuId.h - * https://github.com/facebook/folly/blob/master/folly/CpuId.h - */ - -#include "mem.h" - -#ifdef _MSC_VER -#include -#endif - -typedef struct { - U32 f1c; - U32 f1d; - U32 f7b; - U32 f7c; -} ZSTD_cpuid_t; - -MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) { - U32 f1c = 0; - U32 f1d = 0; - U32 f7b = 0; - U32 f7c = 0; -#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) -#if !defined(_M_X64) || !defined(__clang__) || __clang_major__ >= 16 - int reg[4]; - __cpuid((int*)reg, 0); - { - int const n = reg[0]; - if (n >= 1) { - __cpuid((int*)reg, 1); - f1c = (U32)reg[2]; - f1d = (U32)reg[3]; - } - if (n >= 7) { - __cpuidex((int*)reg, 7, 0); - f7b = (U32)reg[1]; - f7c = (U32)reg[2]; - } - } -#else - /* Clang compiler has a bug (fixed in https://reviews.llvm.org/D101338) in - * which the `__cpuid` intrinsic does not save and restore `rbx` as it needs - * to due to being a reserved register. So in that case, do the `cpuid` - * ourselves. Clang supports inline assembly anyway. - */ - U32 n; - __asm__( - "pushq %%rbx\n\t" - "cpuid\n\t" - "popq %%rbx\n\t" - : "=a"(n) - : "a"(0) - : "rcx", "rdx"); - if (n >= 1) { - U32 f1a; - __asm__( - "pushq %%rbx\n\t" - "cpuid\n\t" - "popq %%rbx\n\t" - : "=a"(f1a), "=c"(f1c), "=d"(f1d) - : "a"(1) - :); - } - if (n >= 7) { - __asm__( - "pushq %%rbx\n\t" - "cpuid\n\t" - "movq %%rbx, %%rax\n\t" - "popq %%rbx" - : "=a"(f7b), "=c"(f7c) - : "a"(7), "c"(0) - : "rdx"); - } -#endif -#elif defined(__i386__) && defined(__PIC__) && !defined(__clang__) && defined(__GNUC__) - /* The following block like the normal cpuid branch below, but gcc - * reserves ebx for use of its pic register so we must specially - * handle the save and restore to avoid clobbering the register - */ - U32 n; - __asm__( - "pushl %%ebx\n\t" - "cpuid\n\t" - "popl %%ebx\n\t" - : "=a"(n) - : "a"(0) - : "ecx", "edx"); - if (n >= 1) { - U32 f1a; - __asm__( - "pushl %%ebx\n\t" - "cpuid\n\t" - "popl %%ebx\n\t" - : "=a"(f1a), "=c"(f1c), "=d"(f1d) - : "a"(1)); - } - if (n >= 7) { - __asm__( - "pushl %%ebx\n\t" - "cpuid\n\t" - "movl %%ebx, %%eax\n\t" - "popl %%ebx" - : "=a"(f7b), "=c"(f7c) - : "a"(7), "c"(0) - : "edx"); - } -#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__) - U32 n; - __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx"); - if (n >= 1) { - U32 f1a; - __asm__("cpuid" : "=a"(f1a), "=c"(f1c), "=d"(f1d) : "a"(1) : "ebx"); - } - if (n >= 7) { - U32 f7a; - __asm__("cpuid" - : "=a"(f7a), "=b"(f7b), "=c"(f7c) - : "a"(7), "c"(0) - : "edx"); - } -#endif - { - ZSTD_cpuid_t cpuid; - cpuid.f1c = f1c; - cpuid.f1d = f1d; - cpuid.f7b = f7b; - cpuid.f7c = f7c; - return cpuid; - } -} - -#define X(name, r, bit) \ - MEM_STATIC int ZSTD_cpuid_##name(ZSTD_cpuid_t const cpuid) { \ - return ((cpuid.r) & (1U << bit)) != 0; \ - } - -/* cpuid(1): Processor Info and Feature Bits. */ -#define C(name, bit) X(name, f1c, bit) - C(sse3, 0) - C(pclmuldq, 1) - C(dtes64, 2) - C(monitor, 3) - C(dscpl, 4) - C(vmx, 5) - C(smx, 6) - C(eist, 7) - C(tm2, 8) - C(ssse3, 9) - C(cnxtid, 10) - C(fma, 12) - C(cx16, 13) - C(xtpr, 14) - C(pdcm, 15) - C(pcid, 17) - C(dca, 18) - C(sse41, 19) - C(sse42, 20) - C(x2apic, 21) - C(movbe, 22) - C(popcnt, 23) - C(tscdeadline, 24) - C(aes, 25) - C(xsave, 26) - C(osxsave, 27) - C(avx, 28) - C(f16c, 29) - C(rdrand, 30) -#undef C -#define D(name, bit) X(name, f1d, bit) - D(fpu, 0) - D(vme, 1) - D(de, 2) - D(pse, 3) - D(tsc, 4) - D(msr, 5) - D(pae, 6) - D(mce, 7) - D(cx8, 8) - D(apic, 9) - D(sep, 11) - D(mtrr, 12) - D(pge, 13) - D(mca, 14) - D(cmov, 15) - D(pat, 16) - D(pse36, 17) - D(psn, 18) - D(clfsh, 19) - D(ds, 21) - D(acpi, 22) - D(mmx, 23) - D(fxsr, 24) - D(sse, 25) - D(sse2, 26) - D(ss, 27) - D(htt, 28) - D(tm, 29) - D(pbe, 31) -#undef D - -/* cpuid(7): Extended Features. */ -#define B(name, bit) X(name, f7b, bit) - B(bmi1, 3) - B(hle, 4) - B(avx2, 5) - B(smep, 7) - B(bmi2, 8) - B(erms, 9) - B(invpcid, 10) - B(rtm, 11) - B(mpx, 14) - B(avx512f, 16) - B(avx512dq, 17) - B(rdseed, 18) - B(adx, 19) - B(smap, 20) - B(avx512ifma, 21) - B(pcommit, 22) - B(clflushopt, 23) - B(clwb, 24) - B(avx512pf, 26) - B(avx512er, 27) - B(avx512cd, 28) - B(sha, 29) - B(avx512bw, 30) - B(avx512vl, 31) -#undef B -#define C(name, bit) X(name, f7c, bit) - C(prefetchwt1, 0) - C(avx512vbmi, 1) -#undef C - -#undef X - -#endif /* ZSTD_COMMON_CPU_H */ diff --git a/third_party/zstd/lib/common/debug.c b/third_party/zstd/lib/common/debug.c deleted file mode 100644 index 9d0b7d2..0000000 --- a/third_party/zstd/lib/common/debug.c +++ /dev/null @@ -1,30 +0,0 @@ -/* ****************************************************************** - * debug - * Part of FSE library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - - -/* - * This module only hosts one global variable - * which can be used to dynamically influence the verbosity of traces, - * such as DEBUGLOG and RAWLOG - */ - -#include "debug.h" - -#if !defined(ZSTD_LINUX_KERNEL) || (DEBUGLEVEL>=2) -/* We only use this when DEBUGLEVEL>=2, but we get -Werror=pedantic errors if a - * translation unit is empty. So remove this from Linux kernel builds, but - * otherwise just leave it in. - */ -int g_debuglevel = DEBUGLEVEL; -#endif diff --git a/third_party/zstd/lib/common/debug.h b/third_party/zstd/lib/common/debug.h deleted file mode 100644 index 4b60ddf..0000000 --- a/third_party/zstd/lib/common/debug.h +++ /dev/null @@ -1,107 +0,0 @@ -/* ****************************************************************** - * debug - * Part of FSE library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - - -/* - * The purpose of this header is to enable debug functions. - * They regroup assert(), DEBUGLOG() and RAWLOG() for run-time, - * and DEBUG_STATIC_ASSERT() for compile-time. - * - * By default, DEBUGLEVEL==0, which means run-time debug is disabled. - * - * Level 1 enables assert() only. - * Starting level 2, traces can be generated and pushed to stderr. - * The higher the level, the more verbose the traces. - * - * It's possible to dynamically adjust level using variable g_debug_level, - * which is only declared if DEBUGLEVEL>=2, - * and is a global variable, not multi-thread protected (use with care) - */ - -#ifndef DEBUG_H_12987983217 -#define DEBUG_H_12987983217 - - -/* static assert is triggered at compile time, leaving no runtime artefact. - * static assert only works with compile-time constants. - * Also, this variant can only be used inside a function. */ -#define DEBUG_STATIC_ASSERT(c) (void)sizeof(char[(c) ? 1 : -1]) - - -/* DEBUGLEVEL is expected to be defined externally, - * typically through compiler command line. - * Value must be a number. */ -#ifndef DEBUGLEVEL -# define DEBUGLEVEL 0 -#endif - - -/* recommended values for DEBUGLEVEL : - * 0 : release mode, no debug, all run-time checks disabled - * 1 : enables assert() only, no display - * 2 : reserved, for currently active debug path - * 3 : events once per object lifetime (CCtx, CDict, etc.) - * 4 : events once per frame - * 5 : events once per block - * 6 : events once per sequence (verbose) - * 7+: events at every position (*very* verbose) - * - * It's generally inconvenient to output traces > 5. - * In which case, it's possible to selectively trigger high verbosity levels - * by modifying g_debug_level. - */ - -#if (DEBUGLEVEL>=1) -# define ZSTD_DEPS_NEED_ASSERT -# include "zstd_deps.h" -#else -# ifndef assert /* assert may be already defined, due to prior #include */ -# define assert(condition) ((void)0) /* disable assert (default) */ -# endif -#endif - -#if (DEBUGLEVEL>=2) -# define ZSTD_DEPS_NEED_IO -# include "zstd_deps.h" -extern int g_debuglevel; /* the variable is only declared, - it actually lives in debug.c, - and is shared by the whole process. - It's not thread-safe. - It's useful when enabling very verbose levels - on selective conditions (such as position in src) */ - -# define RAWLOG(l, ...) \ - do { \ - if (l<=g_debuglevel) { \ - ZSTD_DEBUG_PRINT(__VA_ARGS__); \ - } \ - } while (0) - -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) -#define LINE_AS_STRING TOSTRING(__LINE__) - -# define DEBUGLOG(l, ...) \ - do { \ - if (l<=g_debuglevel) { \ - ZSTD_DEBUG_PRINT(__FILE__ ":" LINE_AS_STRING ": " __VA_ARGS__); \ - ZSTD_DEBUG_PRINT(" \n"); \ - } \ - } while (0) -#else -# define RAWLOG(l, ...) do { } while (0) /* disabled */ -# define DEBUGLOG(l, ...) do { } while (0) /* disabled */ -#endif - -#endif /* DEBUG_H_12987983217 */ diff --git a/third_party/zstd/lib/common/entropy_common.c b/third_party/zstd/lib/common/entropy_common.c deleted file mode 100644 index e2173af..0000000 --- a/third_party/zstd/lib/common/entropy_common.c +++ /dev/null @@ -1,340 +0,0 @@ -/* ****************************************************************** - * Common functions of New Generation Entropy library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* ************************************* -* Dependencies -***************************************/ -#include "mem.h" -#include "error_private.h" /* ERR_*, ERROR */ -#define FSE_STATIC_LINKING_ONLY /* FSE_MIN_TABLELOG */ -#include "fse.h" -#include "huf.h" -#include "bits.h" /* ZSDT_highbit32, ZSTD_countTrailingZeros32 */ - - -/*=== Version ===*/ -unsigned FSE_versionNumber(void) { return FSE_VERSION_NUMBER; } - - -/*=== Error Management ===*/ -unsigned FSE_isError(size_t code) { return ERR_isError(code); } -const char* FSE_getErrorName(size_t code) { return ERR_getErrorName(code); } - -unsigned HUF_isError(size_t code) { return ERR_isError(code); } -const char* HUF_getErrorName(size_t code) { return ERR_getErrorName(code); } - - -/*-************************************************************** -* FSE NCount encoding-decoding -****************************************************************/ -FORCE_INLINE_TEMPLATE -size_t FSE_readNCount_body(short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize) -{ - const BYTE* const istart = (const BYTE*) headerBuffer; - const BYTE* const iend = istart + hbSize; - const BYTE* ip = istart; - int nbBits; - int remaining; - int threshold; - U32 bitStream; - int bitCount; - unsigned charnum = 0; - unsigned const maxSV1 = *maxSVPtr + 1; - int previous0 = 0; - - if (hbSize < 8) { - /* This function only works when hbSize >= 8 */ - char buffer[8] = {0}; - ZSTD_memcpy(buffer, headerBuffer, hbSize); - { size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr, - buffer, sizeof(buffer)); - if (FSE_isError(countSize)) return countSize; - if (countSize > hbSize) return ERROR(corruption_detected); - return countSize; - } } - assert(hbSize >= 8); - - /* init */ - ZSTD_memset(normalizedCounter, 0, (*maxSVPtr+1) * sizeof(normalizedCounter[0])); /* all symbols not present in NCount have a frequency of 0 */ - bitStream = MEM_readLE32(ip); - nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ - if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); - bitStream >>= 4; - bitCount = 4; - *tableLogPtr = nbBits; - remaining = (1<> 1; - while (repeats >= 12) { - charnum += 3 * 12; - if (LIKELY(ip <= iend-7)) { - ip += 3; - } else { - bitCount -= (int)(8 * (iend - 7 - ip)); - bitCount &= 31; - ip = iend - 4; - } - bitStream = MEM_readLE32(ip) >> bitCount; - repeats = ZSTD_countTrailingZeros32(~bitStream | 0x80000000) >> 1; - } - charnum += 3 * repeats; - bitStream >>= 2 * repeats; - bitCount += 2 * repeats; - - /* Add the final repeat which isn't 0b11. */ - assert((bitStream & 3) < 3); - charnum += bitStream & 3; - bitCount += 2; - - /* This is an error, but break and return an error - * at the end, because returning out of a loop makes - * it harder for the compiler to optimize. - */ - if (charnum >= maxSV1) break; - - /* We don't need to set the normalized count to 0 - * because we already memset the whole buffer to 0. - */ - - if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { - assert((bitCount >> 3) <= 3); /* For first condition to work */ - ip += bitCount>>3; - bitCount &= 7; - } else { - bitCount -= (int)(8 * (iend - 4 - ip)); - bitCount &= 31; - ip = iend - 4; - } - bitStream = MEM_readLE32(ip) >> bitCount; - } - { - int const max = (2*threshold-1) - remaining; - int count; - - if ((bitStream & (threshold-1)) < (U32)max) { - count = bitStream & (threshold-1); - bitCount += nbBits-1; - } else { - count = bitStream & (2*threshold-1); - if (count >= threshold) count -= max; - bitCount += nbBits; - } - - count--; /* extra accuracy */ - /* When it matters (small blocks), this is a - * predictable branch, because we don't use -1. - */ - if (count >= 0) { - remaining -= count; - } else { - assert(count == -1); - remaining += count; - } - normalizedCounter[charnum++] = (short)count; - previous0 = !count; - - assert(threshold > 1); - if (remaining < threshold) { - /* This branch can be folded into the - * threshold update condition because we - * know that threshold > 1. - */ - if (remaining <= 1) break; - nbBits = ZSTD_highbit32(remaining) + 1; - threshold = 1 << (nbBits - 1); - } - if (charnum >= maxSV1) break; - - if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { - ip += bitCount>>3; - bitCount &= 7; - } else { - bitCount -= (int)(8 * (iend - 4 - ip)); - bitCount &= 31; - ip = iend - 4; - } - bitStream = MEM_readLE32(ip) >> bitCount; - } } - if (remaining != 1) return ERROR(corruption_detected); - /* Only possible when there are too many zeros. */ - if (charnum > maxSV1) return ERROR(maxSymbolValue_tooSmall); - if (bitCount > 32) return ERROR(corruption_detected); - *maxSVPtr = charnum-1; - - ip += (bitCount+7)>>3; - return ip-istart; -} - -/* Avoids the FORCE_INLINE of the _body() function. */ -static size_t FSE_readNCount_body_default( - short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize) -{ - return FSE_readNCount_body(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); -} - -#if DYNAMIC_BMI2 -BMI2_TARGET_ATTRIBUTE static size_t FSE_readNCount_body_bmi2( - short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize) -{ - return FSE_readNCount_body(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); -} -#endif - -size_t FSE_readNCount_bmi2( - short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize, int bmi2) -{ -#if DYNAMIC_BMI2 - if (bmi2) { - return FSE_readNCount_body_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); - } -#endif - (void)bmi2; - return FSE_readNCount_body_default(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); -} - -size_t FSE_readNCount( - short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize) -{ - return FSE_readNCount_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize, /* bmi2 */ 0); -} - - -/*! HUF_readStats() : - Read compact Huffman tree, saved by HUF_writeCTable(). - `huffWeight` is destination buffer. - `rankStats` is assumed to be a table of at least HUF_TABLELOG_MAX U32. - @return : size read from `src` , or an error Code . - Note : Needed by HUF_readCTable() and HUF_readDTableX?() . -*/ -size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize) -{ - U32 wksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; - return HUF_readStats_wksp(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, wksp, sizeof(wksp), /* flags */ 0); -} - -FORCE_INLINE_TEMPLATE size_t -HUF_readStats_body(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize, - void* workSpace, size_t wkspSize, - int bmi2) -{ - U32 weightTotal; - const BYTE* ip = (const BYTE*) src; - size_t iSize; - size_t oSize; - - if (!srcSize) return ERROR(srcSize_wrong); - iSize = ip[0]; - /* ZSTD_memset(huffWeight, 0, hwSize); *//* is not necessary, even though some analyzer complain ... */ - - if (iSize >= 128) { /* special header */ - oSize = iSize - 127; - iSize = ((oSize+1)/2); - if (iSize+1 > srcSize) return ERROR(srcSize_wrong); - if (oSize >= hwSize) return ERROR(corruption_detected); - ip += 1; - { U32 n; - for (n=0; n> 4; - huffWeight[n+1] = ip[n/2] & 15; - } } } - else { /* header compressed with FSE (normal case) */ - if (iSize+1 > srcSize) return ERROR(srcSize_wrong); - /* max (hwSize-1) values decoded, as last one is implied */ - oSize = FSE_decompress_wksp_bmi2(huffWeight, hwSize-1, ip+1, iSize, 6, workSpace, wkspSize, bmi2); - if (FSE_isError(oSize)) return oSize; - } - - /* collect weight stats */ - ZSTD_memset(rankStats, 0, (HUF_TABLELOG_MAX + 1) * sizeof(U32)); - weightTotal = 0; - { U32 n; for (n=0; n HUF_TABLELOG_MAX) return ERROR(corruption_detected); - rankStats[huffWeight[n]]++; - weightTotal += (1 << huffWeight[n]) >> 1; - } } - if (weightTotal == 0) return ERROR(corruption_detected); - - /* get last non-null symbol weight (implied, total must be 2^n) */ - { U32 const tableLog = ZSTD_highbit32(weightTotal) + 1; - if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected); - *tableLogPtr = tableLog; - /* determine last weight */ - { U32 const total = 1 << tableLog; - U32 const rest = total - weightTotal; - U32 const verif = 1 << ZSTD_highbit32(rest); - U32 const lastWeight = ZSTD_highbit32(rest) + 1; - if (verif != rest) return ERROR(corruption_detected); /* last value must be a clean power of 2 */ - huffWeight[oSize] = (BYTE)lastWeight; - rankStats[lastWeight]++; - } } - - /* check tree construction validity */ - if ((rankStats[1] < 2) || (rankStats[1] & 1)) return ERROR(corruption_detected); /* by construction : at least 2 elts of rank 1, must be even */ - - /* results */ - *nbSymbolsPtr = (U32)(oSize+1); - return iSize+1; -} - -/* Avoids the FORCE_INLINE of the _body() function. */ -static size_t HUF_readStats_body_default(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize, - void* workSpace, size_t wkspSize) -{ - return HUF_readStats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize, 0); -} - -#if DYNAMIC_BMI2 -static BMI2_TARGET_ATTRIBUTE size_t HUF_readStats_body_bmi2(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize, - void* workSpace, size_t wkspSize) -{ - return HUF_readStats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize, 1); -} -#endif - -size_t HUF_readStats_wksp(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize, - void* workSpace, size_t wkspSize, - int flags) -{ -#if DYNAMIC_BMI2 - if (flags & HUF_flags_bmi2) { - return HUF_readStats_body_bmi2(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize); - } -#endif - (void)flags; - return HUF_readStats_body_default(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize); -} diff --git a/third_party/zstd/lib/common/error_private.c b/third_party/zstd/lib/common/error_private.c deleted file mode 100644 index 7e7f24f..0000000 --- a/third_party/zstd/lib/common/error_private.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* The purpose of this file is to have a single list of error strings embedded in binary */ - -#include "error_private.h" - -const char* ERR_getErrorString(ERR_enum code) -{ -#ifdef ZSTD_STRIP_ERROR_STRINGS - (void)code; - return "Error strings stripped"; -#else - static const char* const notErrorCode = "Unspecified error code"; - switch( code ) - { - case PREFIX(no_error): return "No error detected"; - case PREFIX(GENERIC): return "Error (generic)"; - case PREFIX(prefix_unknown): return "Unknown frame descriptor"; - case PREFIX(version_unsupported): return "Version not supported"; - case PREFIX(frameParameter_unsupported): return "Unsupported frame parameter"; - case PREFIX(frameParameter_windowTooLarge): return "Frame requires too much memory for decoding"; - case PREFIX(corruption_detected): return "Data corruption detected"; - case PREFIX(checksum_wrong): return "Restored data doesn't match checksum"; - case PREFIX(literals_headerWrong): return "Header of Literals' block doesn't respect format specification"; - case PREFIX(parameter_unsupported): return "Unsupported parameter"; - case PREFIX(parameter_combination_unsupported): return "Unsupported combination of parameters"; - case PREFIX(parameter_outOfBound): return "Parameter is out of bound"; - case PREFIX(init_missing): return "Context should be init first"; - case PREFIX(memory_allocation): return "Allocation error : not enough memory"; - case PREFIX(workSpace_tooSmall): return "workSpace buffer is not large enough"; - case PREFIX(stage_wrong): return "Operation not authorized at current processing stage"; - case PREFIX(tableLog_tooLarge): return "tableLog requires too much memory : unsupported"; - case PREFIX(maxSymbolValue_tooLarge): return "Unsupported max Symbol Value : too large"; - case PREFIX(maxSymbolValue_tooSmall): return "Specified maxSymbolValue is too small"; - case PREFIX(cannotProduce_uncompressedBlock): return "This mode cannot generate an uncompressed block"; - case PREFIX(stabilityCondition_notRespected): return "pledged buffer stability condition is not respected"; - case PREFIX(dictionary_corrupted): return "Dictionary is corrupted"; - case PREFIX(dictionary_wrong): return "Dictionary mismatch"; - case PREFIX(dictionaryCreation_failed): return "Cannot create Dictionary from provided samples"; - case PREFIX(dstSize_tooSmall): return "Destination buffer is too small"; - case PREFIX(srcSize_wrong): return "Src size is incorrect"; - case PREFIX(dstBuffer_null): return "Operation on NULL destination buffer"; - case PREFIX(noForwardProgress_destFull): return "Operation made no progress over multiple calls, due to output buffer being full"; - case PREFIX(noForwardProgress_inputEmpty): return "Operation made no progress over multiple calls, due to input being empty"; - /* following error codes are not stable and may be removed or changed in a future version */ - case PREFIX(frameIndex_tooLarge): return "Frame index is too large"; - case PREFIX(seekableIO): return "An I/O error occurred when reading/seeking"; - case PREFIX(dstBuffer_wrong): return "Destination buffer is wrong"; - case PREFIX(srcBuffer_wrong): return "Source buffer is wrong"; - case PREFIX(sequenceProducer_failed): return "Block-level external sequence producer returned an error code"; - case PREFIX(externalSequences_invalid): return "External sequences are not valid"; - case PREFIX(maxCode): - default: return notErrorCode; - } -#endif -} diff --git a/third_party/zstd/lib/common/error_private.h b/third_party/zstd/lib/common/error_private.h deleted file mode 100644 index 9dcc859..0000000 --- a/third_party/zstd/lib/common/error_private.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* Note : this module is expected to remain private, do not expose it */ - -#ifndef ERROR_H_MODULE -#define ERROR_H_MODULE - -/* **************************************** -* Dependencies -******************************************/ -#include "../zstd_errors.h" /* enum list */ -#include "compiler.h" -#include "debug.h" -#include "zstd_deps.h" /* size_t */ - -/* **************************************** -* Compiler-specific -******************************************/ -#if defined(__GNUC__) -# define ERR_STATIC static __attribute__((unused)) -#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# define ERR_STATIC static inline -#elif defined(_MSC_VER) -# define ERR_STATIC static __inline -#else -# define ERR_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ -#endif - - -/*-**************************************** -* Customization (error_public.h) -******************************************/ -typedef ZSTD_ErrorCode ERR_enum; -#define PREFIX(name) ZSTD_error_##name - - -/*-**************************************** -* Error codes handling -******************************************/ -#undef ERROR /* already defined on Visual Studio */ -#define ERROR(name) ZSTD_ERROR(name) -#define ZSTD_ERROR(name) ((size_t)-PREFIX(name)) - -ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } - -ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if (!ERR_isError(code)) return (ERR_enum)0; return (ERR_enum) (0-code); } - -/* check and forward error code */ -#define CHECK_V_F(e, f) \ - size_t const e = f; \ - do { \ - if (ERR_isError(e)) \ - return e; \ - } while (0) -#define CHECK_F(f) do { CHECK_V_F(_var_err__, f); } while (0) - - -/*-**************************************** -* Error Strings -******************************************/ - -const char* ERR_getErrorString(ERR_enum code); /* error_private.c */ - -ERR_STATIC const char* ERR_getErrorName(size_t code) -{ - return ERR_getErrorString(ERR_getErrorCode(code)); -} - -/** - * Ignore: this is an internal helper. - * - * This is a helper function to help force C99-correctness during compilation. - * Under strict compilation modes, variadic macro arguments can't be empty. - * However, variadic function arguments can be. Using a function therefore lets - * us statically check that at least one (string) argument was passed, - * independent of the compilation flags. - */ -static INLINE_KEYWORD UNUSED_ATTR -void _force_has_format_string(const char *format, ...) { - (void)format; -} - -/** - * Ignore: this is an internal helper. - * - * We want to force this function invocation to be syntactically correct, but - * we don't want to force runtime evaluation of its arguments. - */ -#define _FORCE_HAS_FORMAT_STRING(...) \ - do { \ - if (0) { \ - _force_has_format_string(__VA_ARGS__); \ - } \ - } while (0) - -#define ERR_QUOTE(str) #str - -/** - * Return the specified error if the condition evaluates to true. - * - * In debug modes, prints additional information. - * In order to do that (particularly, printing the conditional that failed), - * this can't just wrap RETURN_ERROR(). - */ -#define RETURN_ERROR_IF(cond, err, ...) \ - do { \ - if (cond) { \ - RAWLOG(3, "%s:%d: ERROR!: check %s failed, returning %s", \ - __FILE__, __LINE__, ERR_QUOTE(cond), ERR_QUOTE(ERROR(err))); \ - _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ - RAWLOG(3, ": " __VA_ARGS__); \ - RAWLOG(3, "\n"); \ - return ERROR(err); \ - } \ - } while (0) - -/** - * Unconditionally return the specified error. - * - * In debug modes, prints additional information. - */ -#define RETURN_ERROR(err, ...) \ - do { \ - RAWLOG(3, "%s:%d: ERROR!: unconditional check failed, returning %s", \ - __FILE__, __LINE__, ERR_QUOTE(ERROR(err))); \ - _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ - RAWLOG(3, ": " __VA_ARGS__); \ - RAWLOG(3, "\n"); \ - return ERROR(err); \ - } while(0) - -/** - * If the provided expression evaluates to an error code, returns that error code. - * - * In debug modes, prints additional information. - */ -#define FORWARD_IF_ERROR(err, ...) \ - do { \ - size_t const err_code = (err); \ - if (ERR_isError(err_code)) { \ - RAWLOG(3, "%s:%d: ERROR!: forwarding error in %s: %s", \ - __FILE__, __LINE__, ERR_QUOTE(err), ERR_getErrorName(err_code)); \ - _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ - RAWLOG(3, ": " __VA_ARGS__); \ - RAWLOG(3, "\n"); \ - return err_code; \ - } \ - } while(0) - -#endif /* ERROR_H_MODULE */ diff --git a/third_party/zstd/lib/common/fse.h b/third_party/zstd/lib/common/fse.h deleted file mode 100644 index b6c2a3e..0000000 --- a/third_party/zstd/lib/common/fse.h +++ /dev/null @@ -1,625 +0,0 @@ -/* ****************************************************************** - * FSE : Finite State Entropy codec - * Public Prototypes declaration - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ -#ifndef FSE_H -#define FSE_H - - -/*-***************************************** -* Dependencies -******************************************/ -#include "zstd_deps.h" /* size_t, ptrdiff_t */ - -/*-***************************************** -* FSE_PUBLIC_API : control library symbols visibility -******************************************/ -#if defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) && defined(__GNUC__) && (__GNUC__ >= 4) -# define FSE_PUBLIC_API __attribute__ ((visibility ("default"))) -#elif defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) /* Visual expected */ -# define FSE_PUBLIC_API __declspec(dllexport) -#elif defined(FSE_DLL_IMPORT) && (FSE_DLL_IMPORT==1) -# define FSE_PUBLIC_API __declspec(dllimport) /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ -#else -# define FSE_PUBLIC_API -#endif - -/*------ Version ------*/ -#define FSE_VERSION_MAJOR 0 -#define FSE_VERSION_MINOR 9 -#define FSE_VERSION_RELEASE 0 - -#define FSE_LIB_VERSION FSE_VERSION_MAJOR.FSE_VERSION_MINOR.FSE_VERSION_RELEASE -#define FSE_QUOTE(str) #str -#define FSE_EXPAND_AND_QUOTE(str) FSE_QUOTE(str) -#define FSE_VERSION_STRING FSE_EXPAND_AND_QUOTE(FSE_LIB_VERSION) - -#define FSE_VERSION_NUMBER (FSE_VERSION_MAJOR *100*100 + FSE_VERSION_MINOR *100 + FSE_VERSION_RELEASE) -FSE_PUBLIC_API unsigned FSE_versionNumber(void); /**< library version number; to be used when checking dll version */ - - -/*-***************************************** -* Tool functions -******************************************/ -FSE_PUBLIC_API size_t FSE_compressBound(size_t size); /* maximum compressed size */ - -/* Error Management */ -FSE_PUBLIC_API unsigned FSE_isError(size_t code); /* tells if a return value is an error code */ -FSE_PUBLIC_API const char* FSE_getErrorName(size_t code); /* provides error code string (useful for debugging) */ - - -/*-***************************************** -* FSE detailed API -******************************************/ -/*! -FSE_compress() does the following: -1. count symbol occurrence from source[] into table count[] (see hist.h) -2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog) -3. save normalized counters to memory buffer using writeNCount() -4. build encoding table 'CTable' from normalized counters -5. encode the data stream using encoding table 'CTable' - -FSE_decompress() does the following: -1. read normalized counters with readNCount() -2. build decoding table 'DTable' from normalized counters -3. decode the data stream using decoding table 'DTable' - -The following API allows targeting specific sub-functions for advanced tasks. -For example, it's possible to compress several blocks using the same 'CTable', -or to save and provide normalized distribution using external method. -*/ - -/* *** COMPRESSION *** */ - -/*! FSE_optimalTableLog(): - dynamically downsize 'tableLog' when conditions are met. - It saves CPU time, by using smaller tables, while preserving or even improving compression ratio. - @return : recommended tableLog (necessarily <= 'maxTableLog') */ -FSE_PUBLIC_API unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); - -/*! FSE_normalizeCount(): - normalize counts so that sum(count[]) == Power_of_2 (2^tableLog) - 'normalizedCounter' is a table of short, of minimum size (maxSymbolValue+1). - useLowProbCount is a boolean parameter which trades off compressed size for - faster header decoding. When it is set to 1, the compressed data will be slightly - smaller. And when it is set to 0, FSE_readNCount() and FSE_buildDTable() will be - faster. If you are compressing a small amount of data (< 2 KB) then useLowProbCount=0 - is a good default, since header deserialization makes a big speed difference. - Otherwise, useLowProbCount=1 is a good default, since the speed difference is small. - @return : tableLog, - or an errorCode, which can be tested using FSE_isError() */ -FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, - const unsigned* count, size_t srcSize, unsigned maxSymbolValue, unsigned useLowProbCount); - -/*! FSE_NCountWriteBound(): - Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'. - Typically useful for allocation purpose. */ -FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog); - -/*! FSE_writeNCount(): - Compactly save 'normalizedCounter' into 'buffer'. - @return : size of the compressed table, - or an errorCode, which can be tested using FSE_isError(). */ -FSE_PUBLIC_API size_t FSE_writeNCount (void* buffer, size_t bufferSize, - const short* normalizedCounter, - unsigned maxSymbolValue, unsigned tableLog); - -/*! Constructor and Destructor of FSE_CTable. - Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' */ -typedef unsigned FSE_CTable; /* don't allocate that. It's only meant to be more restrictive than void* */ - -/*! FSE_buildCTable(): - Builds `ct`, which must be already allocated, using FSE_createCTable(). - @return : 0, or an errorCode, which can be tested using FSE_isError() */ -FSE_PUBLIC_API size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); - -/*! FSE_compress_usingCTable(): - Compress `src` using `ct` into `dst` which must be already allocated. - @return : size of compressed data (<= `dstCapacity`), - or 0 if compressed data could not fit into `dst`, - or an errorCode, which can be tested using FSE_isError() */ -FSE_PUBLIC_API size_t FSE_compress_usingCTable (void* dst, size_t dstCapacity, const void* src, size_t srcSize, const FSE_CTable* ct); - -/*! -Tutorial : ----------- -The first step is to count all symbols. FSE_count() does this job very fast. -Result will be saved into 'count', a table of unsigned int, which must be already allocated, and have 'maxSymbolValuePtr[0]+1' cells. -'src' is a table of bytes of size 'srcSize'. All values within 'src' MUST be <= maxSymbolValuePtr[0] -maxSymbolValuePtr[0] will be updated, with its real value (necessarily <= original value) -FSE_count() will return the number of occurrence of the most frequent symbol. -This can be used to know if there is a single symbol within 'src', and to quickly evaluate its compressibility. -If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError()). - -The next step is to normalize the frequencies. -FSE_normalizeCount() will ensure that sum of frequencies is == 2 ^'tableLog'. -It also guarantees a minimum of 1 to any Symbol with frequency >= 1. -You can use 'tableLog'==0 to mean "use default tableLog value". -If you are unsure of which tableLog value to use, you can ask FSE_optimalTableLog(), -which will provide the optimal valid tableLog given sourceSize, maxSymbolValue, and a user-defined maximum (0 means "default"). - -The result of FSE_normalizeCount() will be saved into a table, -called 'normalizedCounter', which is a table of signed short. -'normalizedCounter' must be already allocated, and have at least 'maxSymbolValue+1' cells. -The return value is tableLog if everything proceeded as expected. -It is 0 if there is a single symbol within distribution. -If there is an error (ex: invalid tableLog value), the function will return an ErrorCode (which can be tested using FSE_isError()). - -'normalizedCounter' can be saved in a compact manner to a memory area using FSE_writeNCount(). -'buffer' must be already allocated. -For guaranteed success, buffer size must be at least FSE_headerBound(). -The result of the function is the number of bytes written into 'buffer'. -If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError(); ex : buffer size too small). - -'normalizedCounter' can then be used to create the compression table 'CTable'. -The space required by 'CTable' must be already allocated, using FSE_createCTable(). -You can then use FSE_buildCTable() to fill 'CTable'. -If there is an error, both functions will return an ErrorCode (which can be tested using FSE_isError()). - -'CTable' can then be used to compress 'src', with FSE_compress_usingCTable(). -Similar to FSE_count(), the convention is that 'src' is assumed to be a table of char of size 'srcSize' -The function returns the size of compressed data (without header), necessarily <= `dstCapacity`. -If it returns '0', compressed data could not fit into 'dst'. -If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError()). -*/ - - -/* *** DECOMPRESSION *** */ - -/*! FSE_readNCount(): - Read compactly saved 'normalizedCounter' from 'rBuffer'. - @return : size read from 'rBuffer', - or an errorCode, which can be tested using FSE_isError(). - maxSymbolValuePtr[0] and tableLogPtr[0] will also be updated with their respective values */ -FSE_PUBLIC_API size_t FSE_readNCount (short* normalizedCounter, - unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, - const void* rBuffer, size_t rBuffSize); - -/*! FSE_readNCount_bmi2(): - * Same as FSE_readNCount() but pass bmi2=1 when your CPU supports BMI2 and 0 otherwise. - */ -FSE_PUBLIC_API size_t FSE_readNCount_bmi2(short* normalizedCounter, - unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, - const void* rBuffer, size_t rBuffSize, int bmi2); - -typedef unsigned FSE_DTable; /* don't allocate that. It's just a way to be more restrictive than void* */ - -/*! -Tutorial : ----------- -(Note : these functions only decompress FSE-compressed blocks. - If block is uncompressed, use memcpy() instead - If block is a single repeated byte, use memset() instead ) - -The first step is to obtain the normalized frequencies of symbols. -This can be performed by FSE_readNCount() if it was saved using FSE_writeNCount(). -'normalizedCounter' must be already allocated, and have at least 'maxSymbolValuePtr[0]+1' cells of signed short. -In practice, that means it's necessary to know 'maxSymbolValue' beforehand, -or size the table to handle worst case situations (typically 256). -FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'. -The result of FSE_readNCount() is the number of bytes read from 'rBuffer'. -Note that 'rBufferSize' must be at least 4 bytes, even if useful information is less than that. -If there is an error, the function will return an error code, which can be tested using FSE_isError(). - -The next step is to build the decompression tables 'FSE_DTable' from 'normalizedCounter'. -This is performed by the function FSE_buildDTable(). -The space required by 'FSE_DTable' must be already allocated using FSE_createDTable(). -If there is an error, the function will return an error code, which can be tested using FSE_isError(). - -`FSE_DTable` can then be used to decompress `cSrc`, with FSE_decompress_usingDTable(). -`cSrcSize` must be strictly correct, otherwise decompression will fail. -FSE_decompress_usingDTable() result will tell how many bytes were regenerated (<=`dstCapacity`). -If there is an error, the function will return an error code, which can be tested using FSE_isError(). (ex: dst buffer too small) -*/ - -#endif /* FSE_H */ - - -#if defined(FSE_STATIC_LINKING_ONLY) && !defined(FSE_H_FSE_STATIC_LINKING_ONLY) -#define FSE_H_FSE_STATIC_LINKING_ONLY -#include "bitstream.h" - -/* ***************************************** -* Static allocation -*******************************************/ -/* FSE buffer bounds */ -#define FSE_NCOUNTBOUND 512 -#define FSE_BLOCKBOUND(size) ((size) + ((size)>>7) + 4 /* fse states */ + sizeof(size_t) /* bitContainer */) -#define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ - -/* It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros */ -#define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<((maxTableLog)-1)) + (((maxSymbolValue)+1)*2)) -#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<<(maxTableLog))) - -/* or use the size to malloc() space directly. Pay attention to alignment restrictions though */ -#define FSE_CTABLE_SIZE(maxTableLog, maxSymbolValue) (FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) * sizeof(FSE_CTable)) -#define FSE_DTABLE_SIZE(maxTableLog) (FSE_DTABLE_SIZE_U32(maxTableLog) * sizeof(FSE_DTable)) - - -/* ***************************************** - * FSE advanced API - ***************************************** */ - -unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minus); -/**< same as FSE_optimalTableLog(), which used `minus==2` */ - -size_t FSE_buildCTable_rle (FSE_CTable* ct, unsigned char symbolValue); -/**< build a fake FSE_CTable, designed to compress always the same symbolValue */ - -/* FSE_buildCTable_wksp() : - * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). - * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`. - * See FSE_buildCTable_wksp() for breakdown of workspace usage. - */ -#define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (((maxSymbolValue + 2) + (1ull << (tableLog)))/2 + sizeof(U64)/sizeof(U32) /* additional 8 bytes for potential table overwrite */) -#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)) -size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); - -#define FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) (sizeof(short) * (maxSymbolValue + 1) + (1ULL << maxTableLog) + 8) -#define FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) ((FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) + sizeof(unsigned) - 1) / sizeof(unsigned)) -FSE_PUBLIC_API size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); -/**< Same as FSE_buildDTable(), using an externally allocated `workspace` produced with `FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxSymbolValue)` */ - -#define FSE_DECOMPRESS_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) (FSE_DTABLE_SIZE_U32(maxTableLog) + 1 + FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) + (FSE_MAX_SYMBOL_VALUE + 1) / 2 + 1) -#define FSE_DECOMPRESS_WKSP_SIZE(maxTableLog, maxSymbolValue) (FSE_DECOMPRESS_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) * sizeof(unsigned)) -size_t FSE_decompress_wksp_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize, int bmi2); -/**< same as FSE_decompress(), using an externally allocated `workSpace` produced with `FSE_DECOMPRESS_WKSP_SIZE_U32(maxLog, maxSymbolValue)`. - * Set bmi2 to 1 if your CPU supports BMI2 or 0 if it doesn't */ - -typedef enum { - FSE_repeat_none, /**< Cannot use the previous table */ - FSE_repeat_check, /**< Can use the previous table but it must be checked */ - FSE_repeat_valid /**< Can use the previous table and it is assumed to be valid */ - } FSE_repeat; - -/* ***************************************** -* FSE symbol compression API -*******************************************/ -/*! - This API consists of small unitary functions, which highly benefit from being inlined. - Hence their body are included in next section. -*/ -typedef struct { - ptrdiff_t value; - const void* stateTable; - const void* symbolTT; - unsigned stateLog; -} FSE_CState_t; - -static void FSE_initCState(FSE_CState_t* CStatePtr, const FSE_CTable* ct); - -static void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* CStatePtr, unsigned symbol); - -static void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* CStatePtr); - -/**< -These functions are inner components of FSE_compress_usingCTable(). -They allow the creation of custom streams, mixing multiple tables and bit sources. - -A key property to keep in mind is that encoding and decoding are done **in reverse direction**. -So the first symbol you will encode is the last you will decode, like a LIFO stack. - -You will need a few variables to track your CStream. They are : - -FSE_CTable ct; // Provided by FSE_buildCTable() -BIT_CStream_t bitStream; // bitStream tracking structure -FSE_CState_t state; // State tracking structure (can have several) - - -The first thing to do is to init bitStream and state. - size_t errorCode = BIT_initCStream(&bitStream, dstBuffer, maxDstSize); - FSE_initCState(&state, ct); - -Note that BIT_initCStream() can produce an error code, so its result should be tested, using FSE_isError(); -You can then encode your input data, byte after byte. -FSE_encodeSymbol() outputs a maximum of 'tableLog' bits at a time. -Remember decoding will be done in reverse direction. - FSE_encodeByte(&bitStream, &state, symbol); - -At any time, you can also add any bit sequence. -Note : maximum allowed nbBits is 25, for compatibility with 32-bits decoders - BIT_addBits(&bitStream, bitField, nbBits); - -The above methods don't commit data to memory, they just store it into local register, for speed. -Local register size is 64-bits on 64-bits systems, 32-bits on 32-bits systems (size_t). -Writing data to memory is a manual operation, performed by the flushBits function. - BIT_flushBits(&bitStream); - -Your last FSE encoding operation shall be to flush your last state value(s). - FSE_flushState(&bitStream, &state); - -Finally, you must close the bitStream. -The function returns the size of CStream in bytes. -If data couldn't fit into dstBuffer, it will return a 0 ( == not compressible) -If there is an error, it returns an errorCode (which can be tested using FSE_isError()). - size_t size = BIT_closeCStream(&bitStream); -*/ - - -/* ***************************************** -* FSE symbol decompression API -*******************************************/ -typedef struct { - size_t state; - const void* table; /* precise table may vary, depending on U16 */ -} FSE_DState_t; - - -static void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt); - -static unsigned char FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD); - -static unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr); - -/**< -Let's now decompose FSE_decompress_usingDTable() into its unitary components. -You will decode FSE-encoded symbols from the bitStream, -and also any other bitFields you put in, **in reverse order**. - -You will need a few variables to track your bitStream. They are : - -BIT_DStream_t DStream; // Stream context -FSE_DState_t DState; // State context. Multiple ones are possible -FSE_DTable* DTablePtr; // Decoding table, provided by FSE_buildDTable() - -The first thing to do is to init the bitStream. - errorCode = BIT_initDStream(&DStream, srcBuffer, srcSize); - -You should then retrieve your initial state(s) -(in reverse flushing order if you have several ones) : - errorCode = FSE_initDState(&DState, &DStream, DTablePtr); - -You can then decode your data, symbol after symbol. -For information the maximum number of bits read by FSE_decodeSymbol() is 'tableLog'. -Keep in mind that symbols are decoded in reverse order, like a LIFO stack (last in, first out). - unsigned char symbol = FSE_decodeSymbol(&DState, &DStream); - -You can retrieve any bitfield you eventually stored into the bitStream (in reverse order) -Note : maximum allowed nbBits is 25, for 32-bits compatibility - size_t bitField = BIT_readBits(&DStream, nbBits); - -All above operations only read from local register (which size depends on size_t). -Refueling the register from memory is manually performed by the reload method. - endSignal = FSE_reloadDStream(&DStream); - -BIT_reloadDStream() result tells if there is still some more data to read from DStream. -BIT_DStream_unfinished : there is still some data left into the DStream. -BIT_DStream_endOfBuffer : Dstream reached end of buffer. Its container may no longer be completely filled. -BIT_DStream_completed : Dstream reached its exact end, corresponding in general to decompression completed. -BIT_DStream_tooFar : Dstream went too far. Decompression result is corrupted. - -When reaching end of buffer (BIT_DStream_endOfBuffer), progress slowly, notably if you decode multiple symbols per loop, -to properly detect the exact end of stream. -After each decoded symbol, check if DStream is fully consumed using this simple test : - BIT_reloadDStream(&DStream) >= BIT_DStream_completed - -When it's done, verify decompression is fully completed, by checking both DStream and the relevant states. -Checking if DStream has reached its end is performed by : - BIT_endOfDStream(&DStream); -Check also the states. There might be some symbols left there, if some high probability ones (>50%) are possible. - FSE_endOfDState(&DState); -*/ - - -/* ***************************************** -* FSE unsafe API -*******************************************/ -static unsigned char FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD); -/* faster, but works only if nbBits is always >= 1 (otherwise, result will be corrupted) */ - - -/* ***************************************** -* Implementation of inlined functions -*******************************************/ -typedef struct { - int deltaFindState; - U32 deltaNbBits; -} FSE_symbolCompressionTransform; /* total 8 bytes */ - -MEM_STATIC void FSE_initCState(FSE_CState_t* statePtr, const FSE_CTable* ct) -{ - const void* ptr = ct; - const U16* u16ptr = (const U16*) ptr; - const U32 tableLog = MEM_read16(ptr); - statePtr->value = (ptrdiff_t)1<stateTable = u16ptr+2; - statePtr->symbolTT = ct + 1 + (tableLog ? (1<<(tableLog-1)) : 1); - statePtr->stateLog = tableLog; -} - - -/*! FSE_initCState2() : -* Same as FSE_initCState(), but the first symbol to include (which will be the last to be read) -* uses the smallest state value possible, saving the cost of this symbol */ -MEM_STATIC void FSE_initCState2(FSE_CState_t* statePtr, const FSE_CTable* ct, U32 symbol) -{ - FSE_initCState(statePtr, ct); - { const FSE_symbolCompressionTransform symbolTT = ((const FSE_symbolCompressionTransform*)(statePtr->symbolTT))[symbol]; - const U16* stateTable = (const U16*)(statePtr->stateTable); - U32 nbBitsOut = (U32)((symbolTT.deltaNbBits + (1<<15)) >> 16); - statePtr->value = (nbBitsOut << 16) - symbolTT.deltaNbBits; - statePtr->value = stateTable[(statePtr->value >> nbBitsOut) + symbolTT.deltaFindState]; - } -} - -MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* statePtr, unsigned symbol) -{ - FSE_symbolCompressionTransform const symbolTT = ((const FSE_symbolCompressionTransform*)(statePtr->symbolTT))[symbol]; - const U16* const stateTable = (const U16*)(statePtr->stateTable); - U32 const nbBitsOut = (U32)((statePtr->value + symbolTT.deltaNbBits) >> 16); - BIT_addBits(bitC, (BitContainerType)statePtr->value, nbBitsOut); - statePtr->value = stateTable[ (statePtr->value >> nbBitsOut) + symbolTT.deltaFindState]; -} - -MEM_STATIC void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* statePtr) -{ - BIT_addBits(bitC, (BitContainerType)statePtr->value, statePtr->stateLog); - BIT_flushBits(bitC); -} - - -/* FSE_getMaxNbBits() : - * Approximate maximum cost of a symbol, in bits. - * Fractional get rounded up (i.e. a symbol with a normalized frequency of 3 gives the same result as a frequency of 2) - * note 1 : assume symbolValue is valid (<= maxSymbolValue) - * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */ -MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue) -{ - const FSE_symbolCompressionTransform* symbolTT = (const FSE_symbolCompressionTransform*) symbolTTPtr; - return (symbolTT[symbolValue].deltaNbBits + ((1<<16)-1)) >> 16; -} - -/* FSE_bitCost() : - * Approximate symbol cost, as fractional value, using fixed-point format (accuracyLog fractional bits) - * note 1 : assume symbolValue is valid (<= maxSymbolValue) - * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */ -MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog) -{ - const FSE_symbolCompressionTransform* symbolTT = (const FSE_symbolCompressionTransform*) symbolTTPtr; - U32 const minNbBits = symbolTT[symbolValue].deltaNbBits >> 16; - U32 const threshold = (minNbBits+1) << 16; - assert(tableLog < 16); - assert(accuracyLog < 31-tableLog); /* ensure enough room for renormalization double shift */ - { U32 const tableSize = 1 << tableLog; - U32 const deltaFromThreshold = threshold - (symbolTT[symbolValue].deltaNbBits + tableSize); - U32 const normalizedDeltaFromThreshold = (deltaFromThreshold << accuracyLog) >> tableLog; /* linear interpolation (very approximate) */ - U32 const bitMultiplier = 1 << accuracyLog; - assert(symbolTT[symbolValue].deltaNbBits + tableSize <= threshold); - assert(normalizedDeltaFromThreshold <= bitMultiplier); - return (minNbBits+1)*bitMultiplier - normalizedDeltaFromThreshold; - } -} - - -/* ====== Decompression ====== */ - -typedef struct { - U16 tableLog; - U16 fastMode; -} FSE_DTableHeader; /* sizeof U32 */ - -typedef struct -{ - unsigned short newState; - unsigned char symbol; - unsigned char nbBits; -} FSE_decode_t; /* size == U32 */ - -MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt) -{ - const void* ptr = dt; - const FSE_DTableHeader* const DTableH = (const FSE_DTableHeader*)ptr; - DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog); - BIT_reloadDStream(bitD); - DStatePtr->table = dt + 1; -} - -MEM_STATIC BYTE FSE_peekSymbol(const FSE_DState_t* DStatePtr) -{ - FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - return DInfo.symbol; -} - -MEM_STATIC void FSE_updateState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) -{ - FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - U32 const nbBits = DInfo.nbBits; - size_t const lowBits = BIT_readBits(bitD, nbBits); - DStatePtr->state = DInfo.newState + lowBits; -} - -MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) -{ - FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - U32 const nbBits = DInfo.nbBits; - BYTE const symbol = DInfo.symbol; - size_t const lowBits = BIT_readBits(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -/*! FSE_decodeSymbolFast() : - unsafe, only works if no symbol has a probability > 50% */ -MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) -{ - FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - U32 const nbBits = DInfo.nbBits; - BYTE const symbol = DInfo.symbol; - size_t const lowBits = BIT_readBitsFast(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) -{ - return DStatePtr->state == 0; -} - - - -#ifndef FSE_COMMONDEFS_ONLY - -/* ************************************************************** -* Tuning parameters -****************************************************************/ -/*!MEMORY_USAGE : -* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) -* Increasing memory usage improves compression ratio -* Reduced memory usage can improve speed, due to cache effect -* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ -#ifndef FSE_MAX_MEMORY_USAGE -# define FSE_MAX_MEMORY_USAGE 14 -#endif -#ifndef FSE_DEFAULT_MEMORY_USAGE -# define FSE_DEFAULT_MEMORY_USAGE 13 -#endif -#if (FSE_DEFAULT_MEMORY_USAGE > FSE_MAX_MEMORY_USAGE) -# error "FSE_DEFAULT_MEMORY_USAGE must be <= FSE_MAX_MEMORY_USAGE" -#endif - -/*!FSE_MAX_SYMBOL_VALUE : -* Maximum symbol value authorized. -* Required for proper stack allocation */ -#ifndef FSE_MAX_SYMBOL_VALUE -# define FSE_MAX_SYMBOL_VALUE 255 -#endif - -/* ************************************************************** -* template functions type & suffix -****************************************************************/ -#define FSE_FUNCTION_TYPE BYTE -#define FSE_FUNCTION_EXTENSION -#define FSE_DECODE_TYPE FSE_decode_t - - -#endif /* !FSE_COMMONDEFS_ONLY */ - - -/* *************************************************************** -* Constants -*****************************************************************/ -#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) -#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX -# error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" -#endif - -#define FSE_TABLESTEP(tableSize) (((tableSize)>>1) + ((tableSize)>>3) + 3) - -#endif /* FSE_STATIC_LINKING_ONLY */ diff --git a/third_party/zstd/lib/common/fse_decompress.c b/third_party/zstd/lib/common/fse_decompress.c deleted file mode 100644 index c8f1bb0..0000000 --- a/third_party/zstd/lib/common/fse_decompress.c +++ /dev/null @@ -1,315 +0,0 @@ -/* ****************************************************************** - * FSE : Finite State Entropy decoder - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - - -/* ************************************************************** -* Includes -****************************************************************/ -#include "debug.h" /* assert */ -#include "bitstream.h" -#include "compiler.h" -#define FSE_STATIC_LINKING_ONLY -#include "fse.h" -#include "error_private.h" -#include "zstd_deps.h" /* ZSTD_memcpy */ -#include "bits.h" /* ZSTD_highbit32 */ - - -/* ************************************************************** -* Error Management -****************************************************************/ -#define FSE_isError ERR_isError -#define FSE_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ - - -/* ************************************************************** -* Templates -****************************************************************/ -/* - designed to be included - for type-specific functions (template emulation in C) - Objective is to write these functions only once, for improved maintenance -*/ - -/* safety checks */ -#ifndef FSE_FUNCTION_EXTENSION -# error "FSE_FUNCTION_EXTENSION must be defined" -#endif -#ifndef FSE_FUNCTION_TYPE -# error "FSE_FUNCTION_TYPE must be defined" -#endif - -/* Function names */ -#define FSE_CAT(X,Y) X##Y -#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) -#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) - -static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) -{ - void* const tdPtr = dt+1; /* because *dt is unsigned, 32-bits aligned on 32-bits */ - FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*) (tdPtr); - U16* symbolNext = (U16*)workSpace; - BYTE* spread = (BYTE*)(symbolNext + maxSymbolValue + 1); - - U32 const maxSV1 = maxSymbolValue + 1; - U32 const tableSize = 1 << tableLog; - U32 highThreshold = tableSize-1; - - /* Sanity Checks */ - if (FSE_BUILD_DTABLE_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(maxSymbolValue_tooLarge); - if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); - if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); - - /* Init, lay down lowprob symbols */ - { FSE_DTableHeader DTableH; - DTableH.tableLog = (U16)tableLog; - DTableH.fastMode = 1; - { S16 const largeLimit= (S16)(1 << (tableLog-1)); - U32 s; - for (s=0; s= largeLimit) DTableH.fastMode=0; - symbolNext[s] = (U16)normalizedCounter[s]; - } } } - ZSTD_memcpy(dt, &DTableH, sizeof(DTableH)); - } - - /* Spread symbols */ - if (highThreshold == tableSize - 1) { - size_t const tableMask = tableSize-1; - size_t const step = FSE_TABLESTEP(tableSize); - /* First lay down the symbols in order. - * We use a uint64_t to lay down 8 bytes at a time. This reduces branch - * misses since small blocks generally have small table logs, so nearly - * all symbols have counts <= 8. We ensure we have 8 bytes at the end of - * our buffer to handle the over-write. - */ - { U64 const add = 0x0101010101010101ull; - size_t pos = 0; - U64 sv = 0; - U32 s; - for (s=0; s highThreshold) position = (position + step) & tableMask; /* lowprob area */ - } } - if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ - } - - /* Build Decoding table */ - { U32 u; - for (u=0; u sizeof(bitD.bitContainer)*8) /* This test must be static */ - BIT_reloadDStream(&bitD); - - op[1] = FSE_GETSYMBOL(&state2); - - if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - { if (BIT_reloadDStream(&bitD) > BIT_DStream_unfinished) { op+=2; break; } } - - op[2] = FSE_GETSYMBOL(&state1); - - if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - BIT_reloadDStream(&bitD); - - op[3] = FSE_GETSYMBOL(&state2); - } - - /* tail */ - /* note : BIT_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly BIT_DStream_completed */ - while (1) { - if (op>(omax-2)) return ERROR(dstSize_tooSmall); - *op++ = FSE_GETSYMBOL(&state1); - if (BIT_reloadDStream(&bitD)==BIT_DStream_overflow) { - *op++ = FSE_GETSYMBOL(&state2); - break; - } - - if (op>(omax-2)) return ERROR(dstSize_tooSmall); - *op++ = FSE_GETSYMBOL(&state2); - if (BIT_reloadDStream(&bitD)==BIT_DStream_overflow) { - *op++ = FSE_GETSYMBOL(&state1); - break; - } } - - assert(op >= ostart); - return (size_t)(op-ostart); -} - -typedef struct { - short ncount[FSE_MAX_SYMBOL_VALUE + 1]; -} FSE_DecompressWksp; - - -FORCE_INLINE_TEMPLATE size_t FSE_decompress_wksp_body( - void* dst, size_t dstCapacity, - const void* cSrc, size_t cSrcSize, - unsigned maxLog, void* workSpace, size_t wkspSize, - int bmi2) -{ - const BYTE* const istart = (const BYTE*)cSrc; - const BYTE* ip = istart; - unsigned tableLog; - unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; - FSE_DecompressWksp* const wksp = (FSE_DecompressWksp*)workSpace; - size_t const dtablePos = sizeof(FSE_DecompressWksp) / sizeof(FSE_DTable); - FSE_DTable* const dtable = (FSE_DTable*)workSpace + dtablePos; - - FSE_STATIC_ASSERT((FSE_MAX_SYMBOL_VALUE + 1) % 2 == 0); - if (wkspSize < sizeof(*wksp)) return ERROR(GENERIC); - - /* correct offset to dtable depends on this property */ - FSE_STATIC_ASSERT(sizeof(FSE_DecompressWksp) % sizeof(FSE_DTable) == 0); - - /* normal FSE decoding mode */ - { size_t const NCountLength = - FSE_readNCount_bmi2(wksp->ncount, &maxSymbolValue, &tableLog, istart, cSrcSize, bmi2); - if (FSE_isError(NCountLength)) return NCountLength; - if (tableLog > maxLog) return ERROR(tableLog_tooLarge); - assert(NCountLength <= cSrcSize); - ip += NCountLength; - cSrcSize -= NCountLength; - } - - if (FSE_DECOMPRESS_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(tableLog_tooLarge); - assert(sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog) <= wkspSize); - workSpace = (BYTE*)workSpace + sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); - wkspSize -= sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); - - CHECK_F( FSE_buildDTable_internal(dtable, wksp->ncount, maxSymbolValue, tableLog, workSpace, wkspSize) ); - - { - const void* ptr = dtable; - const FSE_DTableHeader* DTableH = (const FSE_DTableHeader*)ptr; - const U32 fastMode = DTableH->fastMode; - - /* select fast mode (static) */ - if (fastMode) return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, dtable, 1); - return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, dtable, 0); - } -} - -/* Avoids the FORCE_INLINE of the _body() function. */ -static size_t FSE_decompress_wksp_body_default(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize) -{ - return FSE_decompress_wksp_body(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize, 0); -} - -#if DYNAMIC_BMI2 -BMI2_TARGET_ATTRIBUTE static size_t FSE_decompress_wksp_body_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize) -{ - return FSE_decompress_wksp_body(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize, 1); -} -#endif - -size_t FSE_decompress_wksp_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize, int bmi2) -{ -#if DYNAMIC_BMI2 - if (bmi2) { - return FSE_decompress_wksp_body_bmi2(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize); - } -#endif - (void)bmi2; - return FSE_decompress_wksp_body_default(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize); -} - -#endif /* FSE_COMMONDEFS_ONLY */ diff --git a/third_party/zstd/lib/common/huf.h b/third_party/zstd/lib/common/huf.h deleted file mode 100644 index 4b142c4..0000000 --- a/third_party/zstd/lib/common/huf.h +++ /dev/null @@ -1,277 +0,0 @@ -/* ****************************************************************** - * huff0 huffman codec, - * part of Finite State Entropy library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -#ifndef HUF_H_298734234 -#define HUF_H_298734234 - -/* *** Dependencies *** */ -#include "zstd_deps.h" /* size_t */ -#include "mem.h" /* U32 */ -#define FSE_STATIC_LINKING_ONLY -#include "fse.h" - -/* *** Tool functions *** */ -#define HUF_BLOCKSIZE_MAX (128 * 1024) /**< maximum input size for a single block compressed with HUF_compress */ -size_t HUF_compressBound(size_t size); /**< maximum compressed size (worst case) */ - -/* Error Management */ -unsigned HUF_isError(size_t code); /**< tells if a return value is an error code */ -const char* HUF_getErrorName(size_t code); /**< provides error code string (useful for debugging) */ - - -#define HUF_WORKSPACE_SIZE ((8 << 10) + 512 /* sorting scratch space */) -#define HUF_WORKSPACE_SIZE_U64 (HUF_WORKSPACE_SIZE / sizeof(U64)) - -/* *** Constants *** */ -#define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */ -#define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */ -#define HUF_SYMBOLVALUE_MAX 255 - -#define HUF_TABLELOG_ABSOLUTEMAX 12 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ -#if (HUF_TABLELOG_MAX > HUF_TABLELOG_ABSOLUTEMAX) -# error "HUF_TABLELOG_MAX is too large !" -#endif - - -/* **************************************** -* Static allocation -******************************************/ -/* HUF buffer bounds */ -#define HUF_CTABLEBOUND 129 -#define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true when incompressible is pre-filtered with fast heuristic */ -#define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ - -/* static allocation of HUF's Compression Table */ -/* this is a private definition, just exposed for allocation and strict aliasing purpose. never EVER access its members directly */ -typedef size_t HUF_CElt; /* consider it an incomplete type */ -#define HUF_CTABLE_SIZE_ST(maxSymbolValue) ((maxSymbolValue)+2) /* Use tables of size_t, for proper alignment */ -#define HUF_CTABLE_SIZE(maxSymbolValue) (HUF_CTABLE_SIZE_ST(maxSymbolValue) * sizeof(size_t)) -#define HUF_CREATE_STATIC_CTABLE(name, maxSymbolValue) \ - HUF_CElt name[HUF_CTABLE_SIZE_ST(maxSymbolValue)] /* no final ; */ - -/* static allocation of HUF's DTable */ -typedef U32 HUF_DTable; -#define HUF_DTABLE_SIZE(maxTableLog) (1 + (1<<(maxTableLog))) -#define HUF_CREATE_STATIC_DTABLEX1(DTable, maxTableLog) \ - HUF_DTable DTable[HUF_DTABLE_SIZE((maxTableLog)-1)] = { ((U32)((maxTableLog)-1) * 0x01000001) } -#define HUF_CREATE_STATIC_DTABLEX2(DTable, maxTableLog) \ - HUF_DTable DTable[HUF_DTABLE_SIZE(maxTableLog)] = { ((U32)(maxTableLog) * 0x01000001) } - - -/* **************************************** -* Advanced decompression functions -******************************************/ - -/** - * Huffman flags bitset. - * For all flags, 0 is the default value. - */ -typedef enum { - /** - * If compiled with DYNAMIC_BMI2: Set flag only if the CPU supports BMI2 at runtime. - * Otherwise: Ignored. - */ - HUF_flags_bmi2 = (1 << 0), - /** - * If set: Test possible table depths to find the one that produces the smallest header + encoded size. - * If unset: Use heuristic to find the table depth. - */ - HUF_flags_optimalDepth = (1 << 1), - /** - * If set: If the previous table can encode the input, always reuse the previous table. - * If unset: If the previous table can encode the input, reuse the previous table if it results in a smaller output. - */ - HUF_flags_preferRepeat = (1 << 2), - /** - * If set: Sample the input and check if the sample is uncompressible, if it is then don't attempt to compress. - * If unset: Always histogram the entire input. - */ - HUF_flags_suspectUncompressible = (1 << 3), - /** - * If set: Don't use assembly implementations - * If unset: Allow using assembly implementations - */ - HUF_flags_disableAsm = (1 << 4), - /** - * If set: Don't use the fast decoding loop, always use the fallback decoding loop. - * If unset: Use the fast decoding loop when possible. - */ - HUF_flags_disableFast = (1 << 5) -} HUF_flags_e; - - -/* **************************************** - * HUF detailed API - * ****************************************/ -#define HUF_OPTIMAL_DEPTH_THRESHOLD ZSTD_btultra - -/*! HUF_compress() does the following: - * 1. count symbol occurrence from source[] into table count[] using FSE_count() (exposed within "fse.h") - * 2. (optional) refine tableLog using HUF_optimalTableLog() - * 3. build Huffman table from count using HUF_buildCTable() - * 4. save Huffman table to memory buffer using HUF_writeCTable() - * 5. encode the data stream using HUF_compress4X_usingCTable() - * - * The following API allows targeting specific sub-functions for advanced tasks. - * For example, it's possible to compress several blocks using the same 'CTable', - * or to save and regenerate 'CTable' using external methods. - */ -unsigned HUF_minTableLog(unsigned symbolCardinality); -unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue); -unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, void* workSpace, - size_t wkspSize, HUF_CElt* table, const unsigned* count, int flags); /* table is used as scratch space for building and testing tables, not a return value */ -size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, void* workspace, size_t workspaceSize); -size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags); -size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); -int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); - -typedef enum { - HUF_repeat_none, /**< Cannot use the previous table */ - HUF_repeat_check, /**< Can use the previous table but it must be checked. Note : The previous table must have been constructed by HUF_compress{1, 4}X_repeat */ - HUF_repeat_valid /**< Can use the previous table and it is assumed to be valid */ - } HUF_repeat; - -/** HUF_compress4X_repeat() : - * Same as HUF_compress4X_wksp(), but considers using hufTable if *repeat != HUF_repeat_none. - * If it uses hufTable it does not modify hufTable or repeat. - * If it doesn't, it sets *repeat = HUF_repeat_none, and it sets hufTable to the table used. - * If preferRepeat then the old table will always be used if valid. - * If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */ -size_t HUF_compress4X_repeat(void* dst, size_t dstSize, - const void* src, size_t srcSize, - unsigned maxSymbolValue, unsigned tableLog, - void* workSpace, size_t wkspSize, /**< `workSpace` must be aligned on 4-bytes boundaries, `wkspSize` must be >= HUF_WORKSPACE_SIZE */ - HUF_CElt* hufTable, HUF_repeat* repeat, int flags); - -/** HUF_buildCTable_wksp() : - * Same as HUF_buildCTable(), but using externally allocated scratch buffer. - * `workSpace` must be aligned on 4-bytes boundaries, and its size must be >= HUF_CTABLE_WORKSPACE_SIZE. - */ -#define HUF_CTABLE_WORKSPACE_SIZE_U32 ((4 * (HUF_SYMBOLVALUE_MAX + 1)) + 192) -#define HUF_CTABLE_WORKSPACE_SIZE (HUF_CTABLE_WORKSPACE_SIZE_U32 * sizeof(unsigned)) -size_t HUF_buildCTable_wksp (HUF_CElt* tree, - const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, - void* workSpace, size_t wkspSize); - -/*! HUF_readStats() : - * Read compact Huffman tree, saved by HUF_writeCTable(). - * `huffWeight` is destination buffer. - * @return : size read from `src` , or an error Code . - * Note : Needed by HUF_readCTable() and HUF_readDTableXn() . */ -size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, - U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize); - -/*! HUF_readStats_wksp() : - * Same as HUF_readStats() but takes an external workspace which must be - * 4-byte aligned and its size must be >= HUF_READ_STATS_WORKSPACE_SIZE. - * If the CPU has BMI2 support, pass bmi2=1, otherwise pass bmi2=0. - */ -#define HUF_READ_STATS_WORKSPACE_SIZE_U32 FSE_DECOMPRESS_WKSP_SIZE_U32(6, HUF_TABLELOG_MAX-1) -#define HUF_READ_STATS_WORKSPACE_SIZE (HUF_READ_STATS_WORKSPACE_SIZE_U32 * sizeof(unsigned)) -size_t HUF_readStats_wksp(BYTE* huffWeight, size_t hwSize, - U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize, - void* workspace, size_t wkspSize, - int flags); - -/** HUF_readCTable() : - * Loading a CTable saved with HUF_writeCTable() */ -size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned *hasZeroWeights); - -/** HUF_getNbBitsFromCTable() : - * Read nbBits from CTable symbolTable, for symbol `symbolValue` presumed <= HUF_SYMBOLVALUE_MAX - * Note 1 : If symbolValue > HUF_readCTableHeader(symbolTable).maxSymbolValue, returns 0 - * Note 2 : is not inlined, as HUF_CElt definition is private - */ -U32 HUF_getNbBitsFromCTable(const HUF_CElt* symbolTable, U32 symbolValue); - -typedef struct { - BYTE tableLog; - BYTE maxSymbolValue; - BYTE unused[sizeof(size_t) - 2]; -} HUF_CTableHeader; - -/** HUF_readCTableHeader() : - * @returns The header from the CTable specifying the tableLog and the maxSymbolValue. - */ -HUF_CTableHeader HUF_readCTableHeader(HUF_CElt const* ctable); - -/* - * HUF_decompress() does the following: - * 1. select the decompression algorithm (X1, X2) based on pre-computed heuristics - * 2. build Huffman table from save, using HUF_readDTableX?() - * 3. decode 1 or 4 segments in parallel using HUF_decompress?X?_usingDTable() - */ - -/** HUF_selectDecoder() : - * Tells which decoder is likely to decode faster, - * based on a set of pre-computed metrics. - * @return : 0==HUF_decompress4X1, 1==HUF_decompress4X2 . - * Assumption : 0 < dstSize <= 128 KB */ -U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize); - -/** - * The minimum workspace size for the `workSpace` used in - * HUF_readDTableX1_wksp() and HUF_readDTableX2_wksp(). - * - * The space used depends on HUF_TABLELOG_MAX, ranging from ~1500 bytes when - * HUF_TABLE_LOG_MAX=12 to ~1850 bytes when HUF_TABLE_LOG_MAX=15. - * Buffer overflow errors may potentially occur if code modifications result in - * a required workspace size greater than that specified in the following - * macro. - */ -#define HUF_DECOMPRESS_WORKSPACE_SIZE ((2 << 10) + (1 << 9)) -#define HUF_DECOMPRESS_WORKSPACE_SIZE_U32 (HUF_DECOMPRESS_WORKSPACE_SIZE / sizeof(U32)) - - -/* ====================== */ -/* single stream variants */ -/* ====================== */ - -size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags); -/** HUF_compress1X_repeat() : - * Same as HUF_compress1X_wksp(), but considers using hufTable if *repeat != HUF_repeat_none. - * If it uses hufTable it does not modify hufTable or repeat. - * If it doesn't, it sets *repeat = HUF_repeat_none, and it sets hufTable to the table used. - * If preferRepeat then the old table will always be used if valid. - * If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */ -size_t HUF_compress1X_repeat(void* dst, size_t dstSize, - const void* src, size_t srcSize, - unsigned maxSymbolValue, unsigned tableLog, - void* workSpace, size_t wkspSize, /**< `workSpace` must be aligned on 4-bytes boundaries, `wkspSize` must be >= HUF_WORKSPACE_SIZE */ - HUF_CElt* hufTable, HUF_repeat* repeat, int flags); - -size_t HUF_decompress1X_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); -#ifndef HUF_FORCE_DECOMPRESS_X1 -size_t HUF_decompress1X2_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); /**< double-symbols decoder */ -#endif - -/* BMI2 variants. - * If the CPU has BMI2 support, pass bmi2=1, otherwise pass bmi2=0. - */ -size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags); -#ifndef HUF_FORCE_DECOMPRESS_X2 -size_t HUF_decompress1X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); -#endif -size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags); -size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); -#ifndef HUF_FORCE_DECOMPRESS_X2 -size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags); -#endif -#ifndef HUF_FORCE_DECOMPRESS_X1 -size_t HUF_readDTableX2_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags); -#endif - -#endif /* HUF_H_298734234 */ diff --git a/third_party/zstd/lib/common/mem.h b/third_party/zstd/lib/common/mem.h deleted file mode 100644 index e66a2ea..0000000 --- a/third_party/zstd/lib/common/mem.h +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef MEM_H_MODULE -#define MEM_H_MODULE - -/*-**************************************** -* Dependencies -******************************************/ -#include /* size_t, ptrdiff_t */ -#include "compiler.h" /* __has_builtin */ -#include "debug.h" /* DEBUG_STATIC_ASSERT */ -#include "zstd_deps.h" /* ZSTD_memcpy */ - - -/*-**************************************** -* Compiler specifics -******************************************/ -#if defined(_MSC_VER) /* Visual Studio */ -# include /* _byteswap_ulong */ -# include /* _byteswap_* */ -#elif defined(__ICCARM__) -# include -#endif - -/*-************************************************************** -* Basic Types -*****************************************************************/ -#if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# if defined(_AIX) -# include -# else -# include /* intptr_t */ -# endif - typedef uint8_t BYTE; - typedef uint8_t U8; - typedef int8_t S8; - typedef uint16_t U16; - typedef int16_t S16; - typedef uint32_t U32; - typedef int32_t S32; - typedef uint64_t U64; - typedef int64_t S64; -#else -# include -#if CHAR_BIT != 8 -# error "this implementation requires char to be exactly 8-bit type" -#endif - typedef unsigned char BYTE; - typedef unsigned char U8; - typedef signed char S8; -#if USHRT_MAX != 65535 -# error "this implementation requires short to be exactly 16-bit type" -#endif - typedef unsigned short U16; - typedef signed short S16; -#if UINT_MAX != 4294967295 -# error "this implementation requires int to be exactly 32-bit type" -#endif - typedef unsigned int U32; - typedef signed int S32; -/* note : there are no limits defined for long long type in C90. - * limits exist in C99, however, in such case, is preferred */ - typedef unsigned long long U64; - typedef signed long long S64; -#endif - -/*-************************************************************** -* Memory I/O API -*****************************************************************/ -/*=== Static platform detection ===*/ -MEM_STATIC unsigned MEM_32bits(void); -MEM_STATIC unsigned MEM_64bits(void); -MEM_STATIC unsigned MEM_isLittleEndian(void); - -/*=== Native unaligned read/write ===*/ -MEM_STATIC U16 MEM_read16(const void* memPtr); -MEM_STATIC U32 MEM_read32(const void* memPtr); -MEM_STATIC U64 MEM_read64(const void* memPtr); -MEM_STATIC size_t MEM_readST(const void* memPtr); - -MEM_STATIC void MEM_write16(void* memPtr, U16 value); -MEM_STATIC void MEM_write32(void* memPtr, U32 value); -MEM_STATIC void MEM_write64(void* memPtr, U64 value); - -/*=== Little endian unaligned read/write ===*/ -MEM_STATIC U16 MEM_readLE16(const void* memPtr); -MEM_STATIC U32 MEM_readLE24(const void* memPtr); -MEM_STATIC U32 MEM_readLE32(const void* memPtr); -MEM_STATIC U64 MEM_readLE64(const void* memPtr); -MEM_STATIC size_t MEM_readLEST(const void* memPtr); - -MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val); -MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val); -MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32); -MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64); -MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val); - -/*=== Big endian unaligned read/write ===*/ -MEM_STATIC U32 MEM_readBE32(const void* memPtr); -MEM_STATIC U64 MEM_readBE64(const void* memPtr); -MEM_STATIC size_t MEM_readBEST(const void* memPtr); - -MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32); -MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64); -MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val); - -/*=== Byteswap ===*/ -MEM_STATIC U32 MEM_swap32(U32 in); -MEM_STATIC U64 MEM_swap64(U64 in); -MEM_STATIC size_t MEM_swapST(size_t in); - - -/*-************************************************************** -* Memory I/O Implementation -*****************************************************************/ -/* MEM_FORCE_MEMORY_ACCESS : For accessing unaligned memory: - * Method 0 : always use `memcpy()`. Safe and portable. - * Method 1 : Use compiler extension to set unaligned access. - * Method 2 : direct access. This method is portable but violate C standard. - * It can generate buggy code on targets depending on alignment. - * Default : method 1 if supported, else method 0 - */ -#ifndef MEM_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ -# ifdef __GNUC__ -# define MEM_FORCE_MEMORY_ACCESS 1 -# endif -#endif - -MEM_STATIC unsigned MEM_32bits(void) { return sizeof(size_t)==4; } -MEM_STATIC unsigned MEM_64bits(void) { return sizeof(size_t)==8; } - -MEM_STATIC unsigned MEM_isLittleEndian(void) -{ -#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - return 1; -#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) - return 0; -#elif defined(__clang__) && __LITTLE_ENDIAN__ - return 1; -#elif defined(__clang__) && __BIG_ENDIAN__ - return 0; -#elif defined(_MSC_VER) && (_M_X64 || _M_IX86) - return 1; -#elif defined(__DMC__) && defined(_M_IX86) - return 1; -#elif defined(__IAR_SYSTEMS_ICC__) && __LITTLE_ENDIAN__ - return 1; -#else - const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ - return one.c[0]; -#endif -} - -#if defined(MEM_FORCE_MEMORY_ACCESS) && (MEM_FORCE_MEMORY_ACCESS==2) - -/* violates C standard, by lying on structure alignment. -Only use if no other choice to achieve best performance on target platform */ -MEM_STATIC U16 MEM_read16(const void* memPtr) { return *(const U16*) memPtr; } -MEM_STATIC U32 MEM_read32(const void* memPtr) { return *(const U32*) memPtr; } -MEM_STATIC U64 MEM_read64(const void* memPtr) { return *(const U64*) memPtr; } -MEM_STATIC size_t MEM_readST(const void* memPtr) { return *(const size_t*) memPtr; } - -MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } -MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } -MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(U64*)memPtr = value; } - -#elif defined(MEM_FORCE_MEMORY_ACCESS) && (MEM_FORCE_MEMORY_ACCESS==1) - -typedef __attribute__((aligned(1))) U16 unalign16; -typedef __attribute__((aligned(1))) U32 unalign32; -typedef __attribute__((aligned(1))) U64 unalign64; -typedef __attribute__((aligned(1))) size_t unalignArch; - -MEM_STATIC U16 MEM_read16(const void* ptr) { return *(const unalign16*)ptr; } -MEM_STATIC U32 MEM_read32(const void* ptr) { return *(const unalign32*)ptr; } -MEM_STATIC U64 MEM_read64(const void* ptr) { return *(const unalign64*)ptr; } -MEM_STATIC size_t MEM_readST(const void* ptr) { return *(const unalignArch*)ptr; } - -MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(unalign16*)memPtr = value; } -MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(unalign32*)memPtr = value; } -MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(unalign64*)memPtr = value; } - -#else - -/* default method, safe and standard. - can sometimes prove slower */ - -MEM_STATIC U16 MEM_read16(const void* memPtr) -{ - U16 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC U32 MEM_read32(const void* memPtr) -{ - U32 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC U64 MEM_read64(const void* memPtr) -{ - U64 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC size_t MEM_readST(const void* memPtr) -{ - size_t val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC void MEM_write16(void* memPtr, U16 value) -{ - ZSTD_memcpy(memPtr, &value, sizeof(value)); -} - -MEM_STATIC void MEM_write32(void* memPtr, U32 value) -{ - ZSTD_memcpy(memPtr, &value, sizeof(value)); -} - -MEM_STATIC void MEM_write64(void* memPtr, U64 value) -{ - ZSTD_memcpy(memPtr, &value, sizeof(value)); -} - -#endif /* MEM_FORCE_MEMORY_ACCESS */ - -MEM_STATIC U32 MEM_swap32_fallback(U32 in) -{ - return ((in << 24) & 0xff000000 ) | - ((in << 8) & 0x00ff0000 ) | - ((in >> 8) & 0x0000ff00 ) | - ((in >> 24) & 0x000000ff ); -} - -MEM_STATIC U32 MEM_swap32(U32 in) -{ -#if defined(_MSC_VER) /* Visual Studio */ - return _byteswap_ulong(in); -#elif (defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)) \ - || (defined(__clang__) && __has_builtin(__builtin_bswap32)) - return __builtin_bswap32(in); -#elif defined(__ICCARM__) - return __REV(in); -#else - return MEM_swap32_fallback(in); -#endif -} - -MEM_STATIC U64 MEM_swap64_fallback(U64 in) -{ - return ((in << 56) & 0xff00000000000000ULL) | - ((in << 40) & 0x00ff000000000000ULL) | - ((in << 24) & 0x0000ff0000000000ULL) | - ((in << 8) & 0x000000ff00000000ULL) | - ((in >> 8) & 0x00000000ff000000ULL) | - ((in >> 24) & 0x0000000000ff0000ULL) | - ((in >> 40) & 0x000000000000ff00ULL) | - ((in >> 56) & 0x00000000000000ffULL); -} - -MEM_STATIC U64 MEM_swap64(U64 in) -{ -#if defined(_MSC_VER) /* Visual Studio */ - return _byteswap_uint64(in); -#elif (defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)) \ - || (defined(__clang__) && __has_builtin(__builtin_bswap64)) - return __builtin_bswap64(in); -#else - return MEM_swap64_fallback(in); -#endif -} - -MEM_STATIC size_t MEM_swapST(size_t in) -{ - if (MEM_32bits()) - return (size_t)MEM_swap32((U32)in); - else - return (size_t)MEM_swap64((U64)in); -} - -/*=== Little endian r/w ===*/ - -MEM_STATIC U16 MEM_readLE16(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read16(memPtr); - else { - const BYTE* p = (const BYTE*)memPtr; - return (U16)(p[0] + (p[1]<<8)); - } -} - -MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val) -{ - if (MEM_isLittleEndian()) { - MEM_write16(memPtr, val); - } else { - BYTE* p = (BYTE*)memPtr; - p[0] = (BYTE)val; - p[1] = (BYTE)(val>>8); - } -} - -MEM_STATIC U32 MEM_readLE24(const void* memPtr) -{ - return (U32)MEM_readLE16(memPtr) + ((U32)(((const BYTE*)memPtr)[2]) << 16); -} - -MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val) -{ - MEM_writeLE16(memPtr, (U16)val); - ((BYTE*)memPtr)[2] = (BYTE)(val>>16); -} - -MEM_STATIC U32 MEM_readLE32(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read32(memPtr); - else - return MEM_swap32(MEM_read32(memPtr)); -} - -MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32) -{ - if (MEM_isLittleEndian()) - MEM_write32(memPtr, val32); - else - MEM_write32(memPtr, MEM_swap32(val32)); -} - -MEM_STATIC U64 MEM_readLE64(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read64(memPtr); - else - return MEM_swap64(MEM_read64(memPtr)); -} - -MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64) -{ - if (MEM_isLittleEndian()) - MEM_write64(memPtr, val64); - else - MEM_write64(memPtr, MEM_swap64(val64)); -} - -MEM_STATIC size_t MEM_readLEST(const void* memPtr) -{ - if (MEM_32bits()) - return (size_t)MEM_readLE32(memPtr); - else - return (size_t)MEM_readLE64(memPtr); -} - -MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val) -{ - if (MEM_32bits()) - MEM_writeLE32(memPtr, (U32)val); - else - MEM_writeLE64(memPtr, (U64)val); -} - -/*=== Big endian r/w ===*/ - -MEM_STATIC U32 MEM_readBE32(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_swap32(MEM_read32(memPtr)); - else - return MEM_read32(memPtr); -} - -MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32) -{ - if (MEM_isLittleEndian()) - MEM_write32(memPtr, MEM_swap32(val32)); - else - MEM_write32(memPtr, val32); -} - -MEM_STATIC U64 MEM_readBE64(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_swap64(MEM_read64(memPtr)); - else - return MEM_read64(memPtr); -} - -MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64) -{ - if (MEM_isLittleEndian()) - MEM_write64(memPtr, MEM_swap64(val64)); - else - MEM_write64(memPtr, val64); -} - -MEM_STATIC size_t MEM_readBEST(const void* memPtr) -{ - if (MEM_32bits()) - return (size_t)MEM_readBE32(memPtr); - else - return (size_t)MEM_readBE64(memPtr); -} - -MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val) -{ - if (MEM_32bits()) - MEM_writeBE32(memPtr, (U32)val); - else - MEM_writeBE64(memPtr, (U64)val); -} - -/* code only tested on 32 and 64 bits systems */ -MEM_STATIC void MEM_check(void) { DEBUG_STATIC_ASSERT((sizeof(size_t)==4) || (sizeof(size_t)==8)); } - -#endif /* MEM_H_MODULE */ diff --git a/third_party/zstd/lib/common/pool.c b/third_party/zstd/lib/common/pool.c deleted file mode 100644 index 3adcefc..0000000 --- a/third_party/zstd/lib/common/pool.c +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/* ====== Dependencies ======= */ -#include "../common/allocations.h" /* ZSTD_customCalloc, ZSTD_customFree */ -#include "zstd_deps.h" /* size_t */ -#include "debug.h" /* assert */ -#include "pool.h" - -/* ====== Compiler specifics ====== */ -#if defined(_MSC_VER) -# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ -#endif - - -#ifdef ZSTD_MULTITHREAD - -#include "threading.h" /* pthread adaptation */ - -/* A job is a function and an opaque argument */ -typedef struct POOL_job_s { - POOL_function function; - void *opaque; -} POOL_job; - -struct POOL_ctx_s { - ZSTD_customMem customMem; - /* Keep track of the threads */ - ZSTD_pthread_t* threads; - size_t threadCapacity; - size_t threadLimit; - - /* The queue is a circular buffer */ - POOL_job *queue; - size_t queueHead; - size_t queueTail; - size_t queueSize; - - /* The number of threads working on jobs */ - size_t numThreadsBusy; - /* Indicates if the queue is empty */ - int queueEmpty; - - /* The mutex protects the queue */ - ZSTD_pthread_mutex_t queueMutex; - /* Condition variable for pushers to wait on when the queue is full */ - ZSTD_pthread_cond_t queuePushCond; - /* Condition variables for poppers to wait on when the queue is empty */ - ZSTD_pthread_cond_t queuePopCond; - /* Indicates if the queue is shutting down */ - int shutdown; -}; - -/* POOL_thread() : - * Work thread for the thread pool. - * Waits for jobs and executes them. - * @returns : NULL on failure else non-null. - */ -static void* POOL_thread(void* opaque) { - POOL_ctx* const ctx = (POOL_ctx*)opaque; - if (!ctx) { return NULL; } - for (;;) { - /* Lock the mutex and wait for a non-empty queue or until shutdown */ - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - - while ( ctx->queueEmpty - || (ctx->numThreadsBusy >= ctx->threadLimit) ) { - if (ctx->shutdown) { - /* even if !queueEmpty, (possible if numThreadsBusy >= threadLimit), - * a few threads will be shutdown while !queueEmpty, - * but enough threads will remain active to finish the queue */ - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - return opaque; - } - ZSTD_pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex); - } - /* Pop a job off the queue */ - { POOL_job const job = ctx->queue[ctx->queueHead]; - ctx->queueHead = (ctx->queueHead + 1) % ctx->queueSize; - ctx->numThreadsBusy++; - ctx->queueEmpty = (ctx->queueHead == ctx->queueTail); - /* Unlock the mutex, signal a pusher, and run the job */ - ZSTD_pthread_cond_signal(&ctx->queuePushCond); - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - - job.function(job.opaque); - - /* If the intended queue size was 0, signal after finishing job */ - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - ctx->numThreadsBusy--; - ZSTD_pthread_cond_signal(&ctx->queuePushCond); - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - } - } /* for (;;) */ - assert(0); /* Unreachable */ -} - -/* ZSTD_createThreadPool() : public access point */ -POOL_ctx* ZSTD_createThreadPool(size_t numThreads) { - return POOL_create (numThreads, 0); -} - -POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) { - return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem); -} - -POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, - ZSTD_customMem customMem) -{ - POOL_ctx* ctx; - /* Check parameters */ - if (!numThreads) { return NULL; } - /* Allocate the context and zero initialize */ - ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); - if (!ctx) { return NULL; } - /* Initialize the job queue. - * It needs one extra space since one space is wasted to differentiate - * empty and full queues. - */ - ctx->queueSize = queueSize + 1; - ctx->queue = (POOL_job*)ZSTD_customCalloc(ctx->queueSize * sizeof(POOL_job), customMem); - ctx->queueHead = 0; - ctx->queueTail = 0; - ctx->numThreadsBusy = 0; - ctx->queueEmpty = 1; - { - int error = 0; - error |= ZSTD_pthread_mutex_init(&ctx->queueMutex, NULL); - error |= ZSTD_pthread_cond_init(&ctx->queuePushCond, NULL); - error |= ZSTD_pthread_cond_init(&ctx->queuePopCond, NULL); - if (error) { POOL_free(ctx); return NULL; } - } - ctx->shutdown = 0; - /* Allocate space for the thread handles */ - ctx->threads = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), customMem); - ctx->threadCapacity = 0; - ctx->customMem = customMem; - /* Check for errors */ - if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; } - /* Initialize the threads */ - { size_t i; - for (i = 0; i < numThreads; ++i) { - if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) { - ctx->threadCapacity = i; - POOL_free(ctx); - return NULL; - } } - ctx->threadCapacity = numThreads; - ctx->threadLimit = numThreads; - } - return ctx; -} - -/*! POOL_join() : - Shutdown the queue, wake any sleeping threads, and join all of the threads. -*/ -static void POOL_join(POOL_ctx* ctx) { - /* Shut down the queue */ - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - ctx->shutdown = 1; - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - /* Wake up sleeping threads */ - ZSTD_pthread_cond_broadcast(&ctx->queuePushCond); - ZSTD_pthread_cond_broadcast(&ctx->queuePopCond); - /* Join all of the threads */ - { size_t i; - for (i = 0; i < ctx->threadCapacity; ++i) { - ZSTD_pthread_join(ctx->threads[i]); /* note : could fail */ - } } -} - -void POOL_free(POOL_ctx *ctx) { - if (!ctx) { return; } - POOL_join(ctx); - ZSTD_pthread_mutex_destroy(&ctx->queueMutex); - ZSTD_pthread_cond_destroy(&ctx->queuePushCond); - ZSTD_pthread_cond_destroy(&ctx->queuePopCond); - ZSTD_customFree(ctx->queue, ctx->customMem); - ZSTD_customFree(ctx->threads, ctx->customMem); - ZSTD_customFree(ctx, ctx->customMem); -} - -/*! POOL_joinJobs() : - * Waits for all queued jobs to finish executing. - */ -void POOL_joinJobs(POOL_ctx* ctx) { - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - while(!ctx->queueEmpty || ctx->numThreadsBusy > 0) { - ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex); - } - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); -} - -void ZSTD_freeThreadPool (ZSTD_threadPool* pool) { - POOL_free (pool); -} - -size_t POOL_sizeof(const POOL_ctx* ctx) { - if (ctx==NULL) return 0; /* supports sizeof NULL */ - return sizeof(*ctx) - + ctx->queueSize * sizeof(POOL_job) - + ctx->threadCapacity * sizeof(ZSTD_pthread_t); -} - - -/* @return : 0 on success, 1 on error */ -static int POOL_resize_internal(POOL_ctx* ctx, size_t numThreads) -{ - if (numThreads <= ctx->threadCapacity) { - if (!numThreads) return 1; - ctx->threadLimit = numThreads; - return 0; - } - /* numThreads > threadCapacity */ - { ZSTD_pthread_t* const threadPool = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); - if (!threadPool) return 1; - /* replace existing thread pool */ - ZSTD_memcpy(threadPool, ctx->threads, ctx->threadCapacity * sizeof(ZSTD_pthread_t)); - ZSTD_customFree(ctx->threads, ctx->customMem); - ctx->threads = threadPool; - /* Initialize additional threads */ - { size_t threadId; - for (threadId = ctx->threadCapacity; threadId < numThreads; ++threadId) { - if (ZSTD_pthread_create(&threadPool[threadId], NULL, &POOL_thread, ctx)) { - ctx->threadCapacity = threadId; - return 1; - } } - } } - /* successfully expanded */ - ctx->threadCapacity = numThreads; - ctx->threadLimit = numThreads; - return 0; -} - -/* @return : 0 on success, 1 on error */ -int POOL_resize(POOL_ctx* ctx, size_t numThreads) -{ - int result; - if (ctx==NULL) return 1; - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - result = POOL_resize_internal(ctx, numThreads); - ZSTD_pthread_cond_broadcast(&ctx->queuePopCond); - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - return result; -} - -/** - * Returns 1 if the queue is full and 0 otherwise. - * - * When queueSize is 1 (pool was created with an intended queueSize of 0), - * then a queue is empty if there is a thread free _and_ no job is waiting. - */ -static int isQueueFull(POOL_ctx const* ctx) { - if (ctx->queueSize > 1) { - return ctx->queueHead == ((ctx->queueTail + 1) % ctx->queueSize); - } else { - return (ctx->numThreadsBusy == ctx->threadLimit) || - !ctx->queueEmpty; - } -} - - -static void -POOL_add_internal(POOL_ctx* ctx, POOL_function function, void *opaque) -{ - POOL_job job; - job.function = function; - job.opaque = opaque; - assert(ctx != NULL); - if (ctx->shutdown) return; - - ctx->queueEmpty = 0; - ctx->queue[ctx->queueTail] = job; - ctx->queueTail = (ctx->queueTail + 1) % ctx->queueSize; - ZSTD_pthread_cond_signal(&ctx->queuePopCond); -} - -void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) -{ - assert(ctx != NULL); - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - /* Wait until there is space in the queue for the new job */ - while (isQueueFull(ctx) && (!ctx->shutdown)) { - ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex); - } - POOL_add_internal(ctx, function, opaque); - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); -} - - -int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) -{ - assert(ctx != NULL); - ZSTD_pthread_mutex_lock(&ctx->queueMutex); - if (isQueueFull(ctx)) { - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - return 0; - } - POOL_add_internal(ctx, function, opaque); - ZSTD_pthread_mutex_unlock(&ctx->queueMutex); - return 1; -} - - -#else /* ZSTD_MULTITHREAD not defined */ - -/* ========================== */ -/* No multi-threading support */ -/* ========================== */ - - -/* We don't need any data, but if it is empty, malloc() might return NULL. */ -struct POOL_ctx_s { - int dummy; -}; -static POOL_ctx g_poolCtx; - -POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) { - return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem); -} - -POOL_ctx* -POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) -{ - (void)numThreads; - (void)queueSize; - (void)customMem; - return &g_poolCtx; -} - -void POOL_free(POOL_ctx* ctx) { - assert(!ctx || ctx == &g_poolCtx); - (void)ctx; -} - -void POOL_joinJobs(POOL_ctx* ctx){ - assert(!ctx || ctx == &g_poolCtx); - (void)ctx; -} - -int POOL_resize(POOL_ctx* ctx, size_t numThreads) { - (void)ctx; (void)numThreads; - return 0; -} - -void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) { - (void)ctx; - function(opaque); -} - -int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) { - (void)ctx; - function(opaque); - return 1; -} - -size_t POOL_sizeof(const POOL_ctx* ctx) { - if (ctx==NULL) return 0; /* supports sizeof NULL */ - assert(ctx == &g_poolCtx); - return sizeof(*ctx); -} - -#endif /* ZSTD_MULTITHREAD */ diff --git a/third_party/zstd/lib/common/pool.h b/third_party/zstd/lib/common/pool.h deleted file mode 100644 index f39b7f1..0000000 --- a/third_party/zstd/lib/common/pool.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef POOL_H -#define POOL_H - - -#include "zstd_deps.h" -#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_customMem */ -#include "../zstd.h" - -typedef struct POOL_ctx_s POOL_ctx; - -/*! POOL_create() : - * Create a thread pool with at most `numThreads` threads. - * `numThreads` must be at least 1. - * The maximum number of queued jobs before blocking is `queueSize`. - * @return : POOL_ctx pointer on success, else NULL. -*/ -POOL_ctx* POOL_create(size_t numThreads, size_t queueSize); - -POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, - ZSTD_customMem customMem); - -/*! POOL_free() : - * Free a thread pool returned by POOL_create(). - */ -void POOL_free(POOL_ctx* ctx); - - -/*! POOL_joinJobs() : - * Waits for all queued jobs to finish executing. - */ -void POOL_joinJobs(POOL_ctx* ctx); - -/*! POOL_resize() : - * Expands or shrinks pool's number of threads. - * This is more efficient than releasing + creating a new context, - * since it tries to preserve and reuse existing threads. - * `numThreads` must be at least 1. - * @return : 0 when resize was successful, - * !0 (typically 1) if there is an error. - * note : only numThreads can be resized, queueSize remains unchanged. - */ -int POOL_resize(POOL_ctx* ctx, size_t numThreads); - -/*! POOL_sizeof() : - * @return threadpool memory usage - * note : compatible with NULL (returns 0 in this case) - */ -size_t POOL_sizeof(const POOL_ctx* ctx); - -/*! POOL_function : - * The function type that can be added to a thread pool. - */ -typedef void (*POOL_function)(void*); - -/*! POOL_add() : - * Add the job `function(opaque)` to the thread pool. `ctx` must be valid. - * Possibly blocks until there is room in the queue. - * Note : The function may be executed asynchronously, - * therefore, `opaque` must live until function has been completed. - */ -void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque); - - -/*! POOL_tryAdd() : - * Add the job `function(opaque)` to thread pool _if_ a queue slot is available. - * Returns immediately even if not (does not block). - * @return : 1 if successful, 0 if not. - */ -int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque); - -#endif diff --git a/third_party/zstd/lib/common/portability_macros.h b/third_party/zstd/lib/common/portability_macros.h deleted file mode 100644 index 8607341..0000000 --- a/third_party/zstd/lib/common/portability_macros.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_PORTABILITY_MACROS_H -#define ZSTD_PORTABILITY_MACROS_H - -/** - * This header file contains macro definitions to support portability. - * This header is shared between C and ASM code, so it MUST only - * contain macro definitions. It MUST not contain any C code. - * - * This header ONLY defines macros to detect platforms/feature support. - * - */ - - -/* compat. with non-clang compilers */ -#ifndef __has_attribute - #define __has_attribute(x) 0 -#endif - -/* compat. with non-clang compilers */ -#ifndef __has_builtin -# define __has_builtin(x) 0 -#endif - -/* compat. with non-clang compilers */ -#ifndef __has_feature -# define __has_feature(x) 0 -#endif - -/* detects whether we are being compiled under msan */ -#ifndef ZSTD_MEMORY_SANITIZER -# if __has_feature(memory_sanitizer) -# define ZSTD_MEMORY_SANITIZER 1 -# else -# define ZSTD_MEMORY_SANITIZER 0 -# endif -#endif - -/* detects whether we are being compiled under asan */ -#ifndef ZSTD_ADDRESS_SANITIZER -# if __has_feature(address_sanitizer) -# define ZSTD_ADDRESS_SANITIZER 1 -# elif defined(__SANITIZE_ADDRESS__) -# define ZSTD_ADDRESS_SANITIZER 1 -# else -# define ZSTD_ADDRESS_SANITIZER 0 -# endif -#endif - -/* detects whether we are being compiled under dfsan */ -#ifndef ZSTD_DATAFLOW_SANITIZER -# if __has_feature(dataflow_sanitizer) -# define ZSTD_DATAFLOW_SANITIZER 1 -# else -# define ZSTD_DATAFLOW_SANITIZER 0 -# endif -#endif - -/* Mark the internal assembly functions as hidden */ -#ifdef __ELF__ -# define ZSTD_HIDE_ASM_FUNCTION(func) .hidden func -#elif defined(__APPLE__) -# define ZSTD_HIDE_ASM_FUNCTION(func) .private_extern func -#else -# define ZSTD_HIDE_ASM_FUNCTION(func) -#endif - -/* Compile time determination of BMI2 support */ -#ifndef STATIC_BMI2 -# if defined(__BMI2__) -# define STATIC_BMI2 1 -# elif defined(_MSC_VER) && defined(__AVX2__) -# define STATIC_BMI2 1 /* MSVC does not have a BMI2 specific flag, but every CPU that supports AVX2 also supports BMI2 */ -# endif -#endif - -#ifndef STATIC_BMI2 -# define STATIC_BMI2 0 -#endif - -/* Enable runtime BMI2 dispatch based on the CPU. - * Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default. - */ -#ifndef DYNAMIC_BMI2 -# if ((defined(__clang__) && __has_attribute(__target__)) \ - || (defined(__GNUC__) \ - && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \ - && (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)) \ - && !defined(__BMI2__) -# define DYNAMIC_BMI2 1 -# else -# define DYNAMIC_BMI2 0 -# endif -#endif - -/** - * Only enable assembly for GNU C compatible compilers, - * because other platforms may not support GAS assembly syntax. - * - * Only enable assembly for Linux / MacOS / Win32, other platforms may - * work, but they haven't been tested. This could likely be - * extended to BSD systems. - * - * Disable assembly when MSAN is enabled, because MSAN requires - * 100% of code to be instrumented to work. - */ -#if defined(__GNUC__) -# if defined(__linux__) || defined(__linux) || defined(__APPLE__) || defined(_WIN32) -# if ZSTD_MEMORY_SANITIZER -# define ZSTD_ASM_SUPPORTED 0 -# elif ZSTD_DATAFLOW_SANITIZER -# define ZSTD_ASM_SUPPORTED 0 -# else -# define ZSTD_ASM_SUPPORTED 1 -# endif -# else -# define ZSTD_ASM_SUPPORTED 0 -# endif -#else -# define ZSTD_ASM_SUPPORTED 0 -#endif - -/** - * Determines whether we should enable assembly for x86-64 - * with BMI2. - * - * Enable if all of the following conditions hold: - * - ASM hasn't been explicitly disabled by defining ZSTD_DISABLE_ASM - * - Assembly is supported - * - We are compiling for x86-64 and either: - * - DYNAMIC_BMI2 is enabled - * - BMI2 is supported at compile time - */ -#if !defined(ZSTD_DISABLE_ASM) && \ - ZSTD_ASM_SUPPORTED && \ - defined(__x86_64__) && \ - (DYNAMIC_BMI2 || defined(__BMI2__)) -# define ZSTD_ENABLE_ASM_X86_64_BMI2 1 -#else -# define ZSTD_ENABLE_ASM_X86_64_BMI2 0 -#endif - -/* - * For x86 ELF targets, add .note.gnu.property section for Intel CET in - * assembly sources when CET is enabled. - * - * Additionally, any function that may be called indirectly must begin - * with ZSTD_CET_ENDBRANCH. - */ -#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__)) \ - && defined(__has_include) -# if __has_include() -# include -# define ZSTD_CET_ENDBRANCH _CET_ENDBR -# endif -#endif - -#ifndef ZSTD_CET_ENDBRANCH -# define ZSTD_CET_ENDBRANCH -#endif - -#endif /* ZSTD_PORTABILITY_MACROS_H */ diff --git a/third_party/zstd/lib/common/threading.c b/third_party/zstd/lib/common/threading.c deleted file mode 100644 index 25bb8b9..0000000 --- a/third_party/zstd/lib/common/threading.c +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) 2016 Tino Reichardt - * All rights reserved. - * - * You can contact the author at: - * - zstdmt source repository: https://github.com/mcmilk/zstdmt - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/** - * This file will hold wrapper for systems, which do not support pthreads - */ - -#include "threading.h" - -/* create fake symbol to avoid empty translation unit warning */ -int g_ZSTD_threading_useless_symbol; - -#if defined(ZSTD_MULTITHREAD) && defined(_WIN32) - -/** - * Windows minimalist Pthread Wrapper - */ - - -/* === Dependencies === */ -#include -#include - - -/* === Implementation === */ - -typedef struct { - void* (*start_routine)(void*); - void* arg; - int initialized; - ZSTD_pthread_cond_t initialized_cond; - ZSTD_pthread_mutex_t initialized_mutex; -} ZSTD_thread_params_t; - -static unsigned __stdcall worker(void *arg) -{ - void* (*start_routine)(void*); - void* thread_arg; - - /* Initialized thread_arg and start_routine and signal main thread that we don't need it - * to wait any longer. - */ - { - ZSTD_thread_params_t* thread_param = (ZSTD_thread_params_t*)arg; - thread_arg = thread_param->arg; - start_routine = thread_param->start_routine; - - /* Signal main thread that we are running and do not depend on its memory anymore */ - ZSTD_pthread_mutex_lock(&thread_param->initialized_mutex); - thread_param->initialized = 1; - ZSTD_pthread_cond_signal(&thread_param->initialized_cond); - ZSTD_pthread_mutex_unlock(&thread_param->initialized_mutex); - } - - start_routine(thread_arg); - - return 0; -} - -int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, - void* (*start_routine) (void*), void* arg) -{ - ZSTD_thread_params_t thread_param; - (void)unused; - - if (thread==NULL) return -1; - *thread = NULL; - - thread_param.start_routine = start_routine; - thread_param.arg = arg; - thread_param.initialized = 0; - - /* Setup thread initialization synchronization */ - if(ZSTD_pthread_cond_init(&thread_param.initialized_cond, NULL)) { - /* Should never happen on Windows */ - return -1; - } - if(ZSTD_pthread_mutex_init(&thread_param.initialized_mutex, NULL)) { - /* Should never happen on Windows */ - ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); - return -1; - } - - /* Spawn thread */ - *thread = (HANDLE)_beginthreadex(NULL, 0, worker, &thread_param, 0, NULL); - if (*thread==NULL) { - ZSTD_pthread_mutex_destroy(&thread_param.initialized_mutex); - ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); - return errno; - } - - /* Wait for thread to be initialized */ - ZSTD_pthread_mutex_lock(&thread_param.initialized_mutex); - while(!thread_param.initialized) { - ZSTD_pthread_cond_wait(&thread_param.initialized_cond, &thread_param.initialized_mutex); - } - ZSTD_pthread_mutex_unlock(&thread_param.initialized_mutex); - ZSTD_pthread_mutex_destroy(&thread_param.initialized_mutex); - ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); - - return 0; -} - -int ZSTD_pthread_join(ZSTD_pthread_t thread) -{ - DWORD result; - - if (!thread) return 0; - - result = WaitForSingleObject(thread, INFINITE); - CloseHandle(thread); - - switch (result) { - case WAIT_OBJECT_0: - return 0; - case WAIT_ABANDONED: - return EINVAL; - default: - return GetLastError(); - } -} - -#endif /* ZSTD_MULTITHREAD */ - -#if defined(ZSTD_MULTITHREAD) && DEBUGLEVEL >= 1 && !defined(_WIN32) - -#define ZSTD_DEPS_NEED_MALLOC -#include "zstd_deps.h" - -int ZSTD_pthread_mutex_init(ZSTD_pthread_mutex_t* mutex, pthread_mutexattr_t const* attr) -{ - assert(mutex != NULL); - *mutex = (pthread_mutex_t*)ZSTD_malloc(sizeof(pthread_mutex_t)); - if (!*mutex) - return 1; - return pthread_mutex_init(*mutex, attr); -} - -int ZSTD_pthread_mutex_destroy(ZSTD_pthread_mutex_t* mutex) -{ - assert(mutex != NULL); - if (!*mutex) - return 0; - { - int const ret = pthread_mutex_destroy(*mutex); - ZSTD_free(*mutex); - return ret; - } -} - -int ZSTD_pthread_cond_init(ZSTD_pthread_cond_t* cond, pthread_condattr_t const* attr) -{ - assert(cond != NULL); - *cond = (pthread_cond_t*)ZSTD_malloc(sizeof(pthread_cond_t)); - if (!*cond) - return 1; - return pthread_cond_init(*cond, attr); -} - -int ZSTD_pthread_cond_destroy(ZSTD_pthread_cond_t* cond) -{ - assert(cond != NULL); - if (!*cond) - return 0; - { - int const ret = pthread_cond_destroy(*cond); - ZSTD_free(*cond); - return ret; - } -} - -#endif diff --git a/third_party/zstd/lib/common/threading.h b/third_party/zstd/lib/common/threading.h deleted file mode 100644 index e123cdf..0000000 --- a/third_party/zstd/lib/common/threading.h +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) 2016 Tino Reichardt - * All rights reserved. - * - * You can contact the author at: - * - zstdmt source repository: https://github.com/mcmilk/zstdmt - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef THREADING_H_938743 -#define THREADING_H_938743 - -#include "debug.h" - -#if defined(ZSTD_MULTITHREAD) && defined(_WIN32) - -/** - * Windows minimalist Pthread Wrapper - */ -#ifdef WINVER -# undef WINVER -#endif -#define WINVER 0x0600 - -#ifdef _WIN32_WINNT -# undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0600 - -#ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif - -#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */ -#include -#undef ERROR -#define ERROR(name) ZSTD_ERROR(name) - - -/* mutex */ -#define ZSTD_pthread_mutex_t CRITICAL_SECTION -#define ZSTD_pthread_mutex_init(a, b) ((void)(b), InitializeCriticalSection((a)), 0) -#define ZSTD_pthread_mutex_destroy(a) DeleteCriticalSection((a)) -#define ZSTD_pthread_mutex_lock(a) EnterCriticalSection((a)) -#define ZSTD_pthread_mutex_unlock(a) LeaveCriticalSection((a)) - -/* condition variable */ -#define ZSTD_pthread_cond_t CONDITION_VARIABLE -#define ZSTD_pthread_cond_init(a, b) ((void)(b), InitializeConditionVariable((a)), 0) -#define ZSTD_pthread_cond_destroy(a) ((void)(a)) -#define ZSTD_pthread_cond_wait(a, b) SleepConditionVariableCS((a), (b), INFINITE) -#define ZSTD_pthread_cond_signal(a) WakeConditionVariable((a)) -#define ZSTD_pthread_cond_broadcast(a) WakeAllConditionVariable((a)) - -/* ZSTD_pthread_create() and ZSTD_pthread_join() */ -typedef HANDLE ZSTD_pthread_t; - -int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, - void* (*start_routine) (void*), void* arg); - -int ZSTD_pthread_join(ZSTD_pthread_t thread); - -/** - * add here more wrappers as required - */ - -#elif defined(ZSTD_MULTITHREAD) /* posix assumed ; need a better detection method */ -/* === POSIX Systems === */ -# include - -#if DEBUGLEVEL < 1 - -#define ZSTD_pthread_mutex_t pthread_mutex_t -#define ZSTD_pthread_mutex_init(a, b) pthread_mutex_init((a), (b)) -#define ZSTD_pthread_mutex_destroy(a) pthread_mutex_destroy((a)) -#define ZSTD_pthread_mutex_lock(a) pthread_mutex_lock((a)) -#define ZSTD_pthread_mutex_unlock(a) pthread_mutex_unlock((a)) - -#define ZSTD_pthread_cond_t pthread_cond_t -#define ZSTD_pthread_cond_init(a, b) pthread_cond_init((a), (b)) -#define ZSTD_pthread_cond_destroy(a) pthread_cond_destroy((a)) -#define ZSTD_pthread_cond_wait(a, b) pthread_cond_wait((a), (b)) -#define ZSTD_pthread_cond_signal(a) pthread_cond_signal((a)) -#define ZSTD_pthread_cond_broadcast(a) pthread_cond_broadcast((a)) - -#define ZSTD_pthread_t pthread_t -#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d)) -#define ZSTD_pthread_join(a) pthread_join((a),NULL) - -#else /* DEBUGLEVEL >= 1 */ - -/* Debug implementation of threading. - * In this implementation we use pointers for mutexes and condition variables. - * This way, if we forget to init/destroy them the program will crash or ASAN - * will report leaks. - */ - -#define ZSTD_pthread_mutex_t pthread_mutex_t* -int ZSTD_pthread_mutex_init(ZSTD_pthread_mutex_t* mutex, pthread_mutexattr_t const* attr); -int ZSTD_pthread_mutex_destroy(ZSTD_pthread_mutex_t* mutex); -#define ZSTD_pthread_mutex_lock(a) pthread_mutex_lock(*(a)) -#define ZSTD_pthread_mutex_unlock(a) pthread_mutex_unlock(*(a)) - -#define ZSTD_pthread_cond_t pthread_cond_t* -int ZSTD_pthread_cond_init(ZSTD_pthread_cond_t* cond, pthread_condattr_t const* attr); -int ZSTD_pthread_cond_destroy(ZSTD_pthread_cond_t* cond); -#define ZSTD_pthread_cond_wait(a, b) pthread_cond_wait(*(a), *(b)) -#define ZSTD_pthread_cond_signal(a) pthread_cond_signal(*(a)) -#define ZSTD_pthread_cond_broadcast(a) pthread_cond_broadcast(*(a)) - -#define ZSTD_pthread_t pthread_t -#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d)) -#define ZSTD_pthread_join(a) pthread_join((a),NULL) - -#endif - -#else /* ZSTD_MULTITHREAD not defined */ -/* No multithreading support */ - -typedef int ZSTD_pthread_mutex_t; -#define ZSTD_pthread_mutex_init(a, b) ((void)(a), (void)(b), 0) -#define ZSTD_pthread_mutex_destroy(a) ((void)(a)) -#define ZSTD_pthread_mutex_lock(a) ((void)(a)) -#define ZSTD_pthread_mutex_unlock(a) ((void)(a)) - -typedef int ZSTD_pthread_cond_t; -#define ZSTD_pthread_cond_init(a, b) ((void)(a), (void)(b), 0) -#define ZSTD_pthread_cond_destroy(a) ((void)(a)) -#define ZSTD_pthread_cond_wait(a, b) ((void)(a), (void)(b)) -#define ZSTD_pthread_cond_signal(a) ((void)(a)) -#define ZSTD_pthread_cond_broadcast(a) ((void)(a)) - -/* do not use ZSTD_pthread_t */ - -#endif /* ZSTD_MULTITHREAD */ - - -#endif /* THREADING_H_938743 */ diff --git a/third_party/zstd/lib/common/xxhash.c b/third_party/zstd/lib/common/xxhash.c deleted file mode 100644 index 052cd52..0000000 --- a/third_party/zstd/lib/common/xxhash.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * xxHash - Extremely Fast Hash algorithm - * Copyright (c) Yann Collet - Meta Platforms, Inc - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* - * xxhash.c instantiates functions defined in xxhash.h - */ - -#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */ -#define XXH_IMPLEMENTATION /* access definitions */ - -#include "xxhash.h" diff --git a/third_party/zstd/lib/common/xxhash.h b/third_party/zstd/lib/common/xxhash.h deleted file mode 100644 index b6af402..0000000 --- a/third_party/zstd/lib/common/xxhash.h +++ /dev/null @@ -1,7094 +0,0 @@ -/* - * xxHash - Extremely Fast Hash algorithm - * Header File - * Copyright (c) Yann Collet - Meta Platforms, Inc - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* Local adaptations for Zstandard */ - -#ifndef XXH_NO_XXH3 -# define XXH_NO_XXH3 -#endif - -#ifndef XXH_NAMESPACE -# define XXH_NAMESPACE ZSTD_ -#endif - -/*! - * @mainpage xxHash - * - * xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed - * limits. - * - * It is proposed in four flavors, in three families: - * 1. @ref XXH32_family - * - Classic 32-bit hash function. Simple, compact, and runs on almost all - * 32-bit and 64-bit systems. - * 2. @ref XXH64_family - * - Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most - * 64-bit systems (but _not_ 32-bit systems). - * 3. @ref XXH3_family - * - Modern 64-bit and 128-bit hash function family which features improved - * strength and performance across the board, especially on smaller data. - * It benefits greatly from SIMD and 64-bit without requiring it. - * - * Benchmarks - * --- - * The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04. - * The open source benchmark program is compiled with clang v10.0 using -O3 flag. - * - * | Hash Name | ISA ext | Width | Large Data Speed | Small Data Velocity | - * | -------------------- | ------- | ----: | ---------------: | ------------------: | - * | XXH3_64bits() | @b AVX2 | 64 | 59.4 GB/s | 133.1 | - * | MeowHash | AES-NI | 128 | 58.2 GB/s | 52.5 | - * | XXH3_128bits() | @b AVX2 | 128 | 57.9 GB/s | 118.1 | - * | CLHash | PCLMUL | 64 | 37.1 GB/s | 58.1 | - * | XXH3_64bits() | @b SSE2 | 64 | 31.5 GB/s | 133.1 | - * | XXH3_128bits() | @b SSE2 | 128 | 29.6 GB/s | 118.1 | - * | RAM sequential read | | N/A | 28.0 GB/s | N/A | - * | ahash | AES-NI | 64 | 22.5 GB/s | 107.2 | - * | City64 | | 64 | 22.0 GB/s | 76.6 | - * | T1ha2 | | 64 | 22.0 GB/s | 99.0 | - * | City128 | | 128 | 21.7 GB/s | 57.7 | - * | FarmHash | AES-NI | 64 | 21.3 GB/s | 71.9 | - * | XXH64() | | 64 | 19.4 GB/s | 71.0 | - * | SpookyHash | | 64 | 19.3 GB/s | 53.2 | - * | Mum | | 64 | 18.0 GB/s | 67.0 | - * | CRC32C | SSE4.2 | 32 | 13.0 GB/s | 57.9 | - * | XXH32() | | 32 | 9.7 GB/s | 71.9 | - * | City32 | | 32 | 9.1 GB/s | 66.0 | - * | Blake3* | @b AVX2 | 256 | 4.4 GB/s | 8.1 | - * | Murmur3 | | 32 | 3.9 GB/s | 56.1 | - * | SipHash* | | 64 | 3.0 GB/s | 43.2 | - * | Blake3* | @b SSE2 | 256 | 2.4 GB/s | 8.1 | - * | HighwayHash | | 64 | 1.4 GB/s | 6.0 | - * | FNV64 | | 64 | 1.2 GB/s | 62.7 | - * | Blake2* | | 256 | 1.1 GB/s | 5.1 | - * | SHA1* | | 160 | 0.8 GB/s | 5.6 | - * | MD5* | | 128 | 0.6 GB/s | 7.8 | - * @note - * - Hashes which require a specific ISA extension are noted. SSE2 is also noted, - * even though it is mandatory on x64. - * - Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic - * by modern standards. - * - Small data velocity is a rough average of algorithm's efficiency for small - * data. For more accurate information, see the wiki. - * - More benchmarks and strength tests are found on the wiki: - * https://github.com/Cyan4973/xxHash/wiki - * - * Usage - * ------ - * All xxHash variants use a similar API. Changing the algorithm is a trivial - * substitution. - * - * @pre - * For functions which take an input and length parameter, the following - * requirements are assumed: - * - The range from [`input`, `input + length`) is valid, readable memory. - * - The only exception is if the `length` is `0`, `input` may be `NULL`. - * - For C++, the objects must have the *TriviallyCopyable* property, as the - * functions access bytes directly as if it was an array of `unsigned char`. - * - * @anchor single_shot_example - * **Single Shot** - * - * These functions are stateless functions which hash a contiguous block of memory, - * immediately returning the result. They are the easiest and usually the fastest - * option. - * - * XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits() - * - * @code{.c} - * #include - * #include "xxhash.h" - * - * // Example for a function which hashes a null terminated string with XXH32(). - * XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed) - * { - * // NULL pointers are only valid if the length is zero - * size_t length = (string == NULL) ? 0 : strlen(string); - * return XXH32(string, length, seed); - * } - * @endcode - * - * - * @anchor streaming_example - * **Streaming** - * - * These groups of functions allow incremental hashing of unknown size, even - * more than what would fit in a size_t. - * - * XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset() - * - * @code{.c} - * #include - * #include - * #include "xxhash.h" - * // Example for a function which hashes a FILE incrementally with XXH3_64bits(). - * XXH64_hash_t hashFile(FILE* f) - * { - * // Allocate a state struct. Do not just use malloc() or new. - * XXH3_state_t* state = XXH3_createState(); - * assert(state != NULL && "Out of memory!"); - * // Reset the state to start a new hashing session. - * XXH3_64bits_reset(state); - * char buffer[4096]; - * size_t count; - * // Read the file in chunks - * while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) { - * // Run update() as many times as necessary to process the data - * XXH3_64bits_update(state, buffer, count); - * } - * // Retrieve the finalized hash. This will not change the state. - * XXH64_hash_t result = XXH3_64bits_digest(state); - * // Free the state. Do not use free(). - * XXH3_freeState(state); - * return result; - * } - * @endcode - * - * Streaming functions generate the xxHash value from an incremental input. - * This method is slower than single-call functions, due to state management. - * For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized. - * - * An XXH state must first be allocated using `XXH*_createState()`. - * - * Start a new hash by initializing the state with a seed using `XXH*_reset()`. - * - * Then, feed the hash state by calling `XXH*_update()` as many times as necessary. - * - * The function returns an error code, with 0 meaning OK, and any other value - * meaning there is an error. - * - * Finally, a hash value can be produced anytime, by using `XXH*_digest()`. - * This function returns the nn-bits hash as an int or long long. - * - * It's still possible to continue inserting input into the hash state after a - * digest, and generate new hash values later on by invoking `XXH*_digest()`. - * - * When done, release the state using `XXH*_freeState()`. - * - * - * @anchor canonical_representation_example - * **Canonical Representation** - * - * The default return values from XXH functions are unsigned 32, 64 and 128 bit - * integers. - * This the simplest and fastest format for further post-processing. - * - * However, this leaves open the question of what is the order on the byte level, - * since little and big endian conventions will store the same number differently. - * - * The canonical representation settles this issue by mandating big-endian - * convention, the same convention as human-readable numbers (large digits first). - * - * When writing hash values to storage, sending them over a network, or printing - * them, it's highly recommended to use the canonical representation to ensure - * portability across a wider range of systems, present and future. - * - * The following functions allow transformation of hash values to and from - * canonical format. - * - * XXH32_canonicalFromHash(), XXH32_hashFromCanonical(), - * XXH64_canonicalFromHash(), XXH64_hashFromCanonical(), - * XXH128_canonicalFromHash(), XXH128_hashFromCanonical(), - * - * @code{.c} - * #include - * #include "xxhash.h" - * - * // Example for a function which prints XXH32_hash_t in human readable format - * void printXxh32(XXH32_hash_t hash) - * { - * XXH32_canonical_t cano; - * XXH32_canonicalFromHash(&cano, hash); - * size_t i; - * for(i = 0; i < sizeof(cano.digest); ++i) { - * printf("%02x", cano.digest[i]); - * } - * printf("\n"); - * } - * - * // Example for a function which converts XXH32_canonical_t to XXH32_hash_t - * XXH32_hash_t convertCanonicalToXxh32(XXH32_canonical_t cano) - * { - * XXH32_hash_t hash = XXH32_hashFromCanonical(&cano); - * return hash; - * } - * @endcode - * - * - * @file xxhash.h - * xxHash prototypes and implementation - */ - -/* **************************** - * INLINE mode - ******************************/ -/*! - * @defgroup public Public API - * Contains details on the public xxHash functions. - * @{ - */ -#ifdef XXH_DOXYGEN -/*! - * @brief Gives access to internal state declaration, required for static allocation. - * - * Incompatible with dynamic linking, due to risks of ABI changes. - * - * Usage: - * @code{.c} - * #define XXH_STATIC_LINKING_ONLY - * #include "xxhash.h" - * @endcode - */ -# define XXH_STATIC_LINKING_ONLY -/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */ - -/*! - * @brief Gives access to internal definitions. - * - * Usage: - * @code{.c} - * #define XXH_STATIC_LINKING_ONLY - * #define XXH_IMPLEMENTATION - * #include "xxhash.h" - * @endcode - */ -# define XXH_IMPLEMENTATION -/* Do not undef XXH_IMPLEMENTATION for Doxygen */ - -/*! - * @brief Exposes the implementation and marks all functions as `inline`. - * - * Use these build macros to inline xxhash into the target unit. - * Inlining improves performance on small inputs, especially when the length is - * expressed as a compile-time constant: - * - * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html - * - * It also keeps xxHash symbols private to the unit, so they are not exported. - * - * Usage: - * @code{.c} - * #define XXH_INLINE_ALL - * #include "xxhash.h" - * @endcode - * Do not compile and link xxhash.o as a separate object, as it is not useful. - */ -# define XXH_INLINE_ALL -# undef XXH_INLINE_ALL -/*! - * @brief Exposes the implementation without marking functions as inline. - */ -# define XXH_PRIVATE_API -# undef XXH_PRIVATE_API -/*! - * @brief Emulate a namespace by transparently prefixing all symbols. - * - * If you want to include _and expose_ xxHash functions from within your own - * library, but also want to avoid symbol collisions with other libraries which - * may also include xxHash, you can use @ref XXH_NAMESPACE to automatically prefix - * any public symbol from xxhash library with the value of @ref XXH_NAMESPACE - * (therefore, avoid empty or numeric values). - * - * Note that no change is required within the calling program as long as it - * includes `xxhash.h`: Regular symbol names will be automatically translated - * by this header. - */ -# define XXH_NAMESPACE /* YOUR NAME HERE */ -# undef XXH_NAMESPACE -#endif - -#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \ - && !defined(XXH_INLINE_ALL_31684351384) - /* this section should be traversed only once */ -# define XXH_INLINE_ALL_31684351384 - /* give access to the advanced API, required to compile implementations */ -# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */ -# define XXH_STATIC_LINKING_ONLY - /* make all functions private */ -# undef XXH_PUBLIC_API -# if defined(__GNUC__) -# define XXH_PUBLIC_API static __inline __attribute__((unused)) -# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# define XXH_PUBLIC_API static inline -# elif defined(_MSC_VER) -# define XXH_PUBLIC_API static __inline -# else - /* note: this version may generate warnings for unused static functions */ -# define XXH_PUBLIC_API static -# endif - - /* - * This part deals with the special case where a unit wants to inline xxHash, - * but "xxhash.h" has previously been included without XXH_INLINE_ALL, - * such as part of some previously included *.h header file. - * Without further action, the new include would just be ignored, - * and functions would effectively _not_ be inlined (silent failure). - * The following macros solve this situation by prefixing all inlined names, - * avoiding naming collision with previous inclusions. - */ - /* Before that, we unconditionally #undef all symbols, - * in case they were already defined with XXH_NAMESPACE. - * They will then be redefined for XXH_INLINE_ALL - */ -# undef XXH_versionNumber - /* XXH32 */ -# undef XXH32 -# undef XXH32_createState -# undef XXH32_freeState -# undef XXH32_reset -# undef XXH32_update -# undef XXH32_digest -# undef XXH32_copyState -# undef XXH32_canonicalFromHash -# undef XXH32_hashFromCanonical - /* XXH64 */ -# undef XXH64 -# undef XXH64_createState -# undef XXH64_freeState -# undef XXH64_reset -# undef XXH64_update -# undef XXH64_digest -# undef XXH64_copyState -# undef XXH64_canonicalFromHash -# undef XXH64_hashFromCanonical - /* XXH3_64bits */ -# undef XXH3_64bits -# undef XXH3_64bits_withSecret -# undef XXH3_64bits_withSeed -# undef XXH3_64bits_withSecretandSeed -# undef XXH3_createState -# undef XXH3_freeState -# undef XXH3_copyState -# undef XXH3_64bits_reset -# undef XXH3_64bits_reset_withSeed -# undef XXH3_64bits_reset_withSecret -# undef XXH3_64bits_update -# undef XXH3_64bits_digest -# undef XXH3_generateSecret - /* XXH3_128bits */ -# undef XXH128 -# undef XXH3_128bits -# undef XXH3_128bits_withSeed -# undef XXH3_128bits_withSecret -# undef XXH3_128bits_reset -# undef XXH3_128bits_reset_withSeed -# undef XXH3_128bits_reset_withSecret -# undef XXH3_128bits_reset_withSecretandSeed -# undef XXH3_128bits_update -# undef XXH3_128bits_digest -# undef XXH128_isEqual -# undef XXH128_cmp -# undef XXH128_canonicalFromHash -# undef XXH128_hashFromCanonical - /* Finally, free the namespace itself */ -# undef XXH_NAMESPACE - - /* employ the namespace for XXH_INLINE_ALL */ -# define XXH_NAMESPACE XXH_INLINE_ - /* - * Some identifiers (enums, type names) are not symbols, - * but they must nonetheless be renamed to avoid redeclaration. - * Alternative solution: do not redeclare them. - * However, this requires some #ifdefs, and has a more dispersed impact. - * Meanwhile, renaming can be achieved in a single place. - */ -# define XXH_IPREF(Id) XXH_NAMESPACE ## Id -# define XXH_OK XXH_IPREF(XXH_OK) -# define XXH_ERROR XXH_IPREF(XXH_ERROR) -# define XXH_errorcode XXH_IPREF(XXH_errorcode) -# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t) -# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t) -# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t) -# define XXH32_state_s XXH_IPREF(XXH32_state_s) -# define XXH32_state_t XXH_IPREF(XXH32_state_t) -# define XXH64_state_s XXH_IPREF(XXH64_state_s) -# define XXH64_state_t XXH_IPREF(XXH64_state_t) -# define XXH3_state_s XXH_IPREF(XXH3_state_s) -# define XXH3_state_t XXH_IPREF(XXH3_state_t) -# define XXH128_hash_t XXH_IPREF(XXH128_hash_t) - /* Ensure the header is parsed again, even if it was previously included */ -# undef XXHASH_H_5627135585666179 -# undef XXHASH_H_STATIC_13879238742 -#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */ - -/* **************************************************************** - * Stable API - *****************************************************************/ -#ifndef XXHASH_H_5627135585666179 -#define XXHASH_H_5627135585666179 1 - -/*! @brief Marks a global symbol. */ -#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) -# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) -# ifdef XXH_EXPORT -# define XXH_PUBLIC_API __declspec(dllexport) -# elif XXH_IMPORT -# define XXH_PUBLIC_API __declspec(dllimport) -# endif -# else -# define XXH_PUBLIC_API /* do nothing */ -# endif -#endif - -#ifdef XXH_NAMESPACE -# define XXH_CAT(A,B) A##B -# define XXH_NAME2(A,B) XXH_CAT(A,B) -# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) -/* XXH32 */ -# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) -# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) -# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) -# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) -# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) -# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) -# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) -# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) -# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) -/* XXH64 */ -# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) -# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) -# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) -# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) -# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) -# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) -# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) -# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) -# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) -/* XXH3_64bits */ -# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits) -# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret) -# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed) -# define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecretandSeed) -# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState) -# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState) -# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState) -# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset) -# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed) -# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret) -# define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed) -# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update) -# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest) -# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret) -# define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed) -/* XXH3_128bits */ -# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128) -# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits) -# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed) -# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret) -# define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed) -# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset) -# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed) -# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret) -# define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed) -# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update) -# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest) -# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual) -# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp) -# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash) -# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical) -#endif - - -/* ************************************* -* Compiler specifics -***************************************/ - -/* specific declaration modes for Windows */ -#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) -# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) -# ifdef XXH_EXPORT -# define XXH_PUBLIC_API __declspec(dllexport) -# elif XXH_IMPORT -# define XXH_PUBLIC_API __declspec(dllimport) -# endif -# else -# define XXH_PUBLIC_API /* do nothing */ -# endif -#endif - -#if defined (__GNUC__) -# define XXH_CONSTF __attribute__((const)) -# define XXH_PUREF __attribute__((pure)) -# define XXH_MALLOCF __attribute__((malloc)) -#else -# define XXH_CONSTF /* disable */ -# define XXH_PUREF -# define XXH_MALLOCF -#endif - -/* ************************************* -* Version -***************************************/ -#define XXH_VERSION_MAJOR 0 -#define XXH_VERSION_MINOR 8 -#define XXH_VERSION_RELEASE 2 -/*! @brief Version number, encoded as two digits each */ -#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) - -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * @brief Obtains the xxHash version. - * - * This is mostly useful when xxHash is compiled as a shared library, - * since the returned value comes from the library, as opposed to header file. - * - * @return @ref XXH_VERSION_NUMBER of the invoked library. - */ -XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void); - -#if defined (__cplusplus) -} -#endif - -/* **************************** -* Common basic types -******************************/ -#include /* size_t */ -/*! - * @brief Exit code for the streaming API. - */ -typedef enum { - XXH_OK = 0, /*!< OK */ - XXH_ERROR /*!< Error */ -} XXH_errorcode; - - -/*-********************************************************************** -* 32-bit hash -************************************************************************/ -#if defined(XXH_DOXYGEN) /* Don't show include */ -/*! - * @brief An unsigned 32-bit integer. - * - * Not necessarily defined to `uint32_t` but functionally equivalent. - */ -typedef uint32_t XXH32_hash_t; - -#elif !defined (__VMS) \ - && (defined (__cplusplus) \ - || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# ifdef _AIX -# include -# else -# include -# endif - typedef uint32_t XXH32_hash_t; - -#else -# include -# if UINT_MAX == 0xFFFFFFFFUL - typedef unsigned int XXH32_hash_t; -# elif ULONG_MAX == 0xFFFFFFFFUL - typedef unsigned long XXH32_hash_t; -# else -# error "unsupported platform: need a 32-bit type" -# endif -#endif - -#if defined (__cplusplus) -extern "C" { -#endif - -/*! - * @} - * - * @defgroup XXH32_family XXH32 family - * @ingroup public - * Contains functions used in the classic 32-bit xxHash algorithm. - * - * @note - * XXH32 is useful for older platforms, with no or poor 64-bit performance. - * Note that the @ref XXH3_family provides competitive speed for both 32-bit - * and 64-bit systems, and offers true 64/128 bit hash results. - * - * @see @ref XXH64_family, @ref XXH3_family : Other xxHash families - * @see @ref XXH32_impl for implementation details - * @{ - */ - -/*! - * @brief Calculates the 32-bit hash of @p input using xxHash32. - * - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * @param seed The 32-bit seed to alter the hash's output predictably. - * - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return The calculated 32-bit xxHash32 value. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed); - -#ifndef XXH_NO_STREAM -/*! - * @typedef struct XXH32_state_s XXH32_state_t - * @brief The opaque state struct for the XXH32 streaming API. - * - * @see XXH32_state_s for details. - */ -typedef struct XXH32_state_s XXH32_state_t; - -/*! - * @brief Allocates an @ref XXH32_state_t. - * - * @return An allocated pointer of @ref XXH32_state_t on success. - * @return `NULL` on failure. - * - * @note Must be freed with XXH32_freeState(). - */ -XXH_PUBLIC_API XXH_MALLOCF XXH32_state_t* XXH32_createState(void); -/*! - * @brief Frees an @ref XXH32_state_t. - * - * @param statePtr A pointer to an @ref XXH32_state_t allocated with @ref XXH32_createState(). - * - * @return @ref XXH_OK. - * - * @note @p statePtr must be allocated with XXH32_createState(). - * - */ -XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); -/*! - * @brief Copies one @ref XXH32_state_t to another. - * - * @param dst_state The state to copy to. - * @param src_state The state to copy from. - * @pre - * @p dst_state and @p src_state must not be `NULL` and must not overlap. - */ -XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); - -/*! - * @brief Resets an @ref XXH32_state_t to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param seed The 32-bit seed to alter the hash result predictably. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note This function resets and seeds a state. Call it before @ref XXH32_update(). - */ -XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, XXH32_hash_t seed); - -/*! - * @brief Consumes a block of @p input to an @ref XXH32_state_t. - * - * @param statePtr The state struct to update. - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note Call this to incrementally consume blocks of data. - */ -XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); - -/*! - * @brief Returns the calculated hash value from an @ref XXH32_state_t. - * - * @param statePtr The state struct to calculate the hash from. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return The calculated 32-bit xxHash32 value from that state. - * - * @note - * Calling XXH32_digest() will not affect @p statePtr, so you can update, - * digest, and update again. - */ -XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); -#endif /* !XXH_NO_STREAM */ - -/******* Canonical representation *******/ - -/*! - * @brief Canonical (big endian) representation of @ref XXH32_hash_t. - */ -typedef struct { - unsigned char digest[4]; /*!< Hash bytes, big endian */ -} XXH32_canonical_t; - -/*! - * @brief Converts an @ref XXH32_hash_t to a big endian @ref XXH32_canonical_t. - * - * @param dst The @ref XXH32_canonical_t pointer to be stored to. - * @param hash The @ref XXH32_hash_t to be converted. - * - * @pre - * @p dst must not be `NULL`. - * - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); - -/*! - * @brief Converts an @ref XXH32_canonical_t to a native @ref XXH32_hash_t. - * - * @param src The @ref XXH32_canonical_t to convert. - * - * @pre - * @p src must not be `NULL`. - * - * @return The converted hash. - * - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); - - -/*! @cond Doxygen ignores this part */ -#ifdef __has_attribute -# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x) -#else -# define XXH_HAS_ATTRIBUTE(x) 0 -#endif -/*! @endcond */ - -/*! @cond Doxygen ignores this part */ -/* - * C23 __STDC_VERSION__ number hasn't been specified yet. For now - * leave as `201711L` (C17 + 1). - * TODO: Update to correct value when its been specified. - */ -#define XXH_C23_VN 201711L -/*! @endcond */ - -/*! @cond Doxygen ignores this part */ -/* C-language Attributes are added in C23. */ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute) -# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) -#else -# define XXH_HAS_C_ATTRIBUTE(x) 0 -#endif -/*! @endcond */ - -/*! @cond Doxygen ignores this part */ -#if defined(__cplusplus) && defined(__has_cpp_attribute) -# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -# define XXH_HAS_CPP_ATTRIBUTE(x) 0 -#endif -/*! @endcond */ - -/*! @cond Doxygen ignores this part */ -/* - * Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute - * introduced in CPP17 and C23. - * CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough - * C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough - */ -#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough) -# define XXH_FALLTHROUGH [[fallthrough]] -#elif XXH_HAS_ATTRIBUTE(__fallthrough__) -# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define XXH_FALLTHROUGH /* fallthrough */ -#endif -/*! @endcond */ - -/*! @cond Doxygen ignores this part */ -/* - * Define XXH_NOESCAPE for annotated pointers in public API. - * https://clang.llvm.org/docs/AttributeReference.html#noescape - * As of writing this, only supported by clang. - */ -#if XXH_HAS_ATTRIBUTE(noescape) -# define XXH_NOESCAPE __attribute__((noescape)) -#else -# define XXH_NOESCAPE -#endif -/*! @endcond */ - -#if defined (__cplusplus) -} /* end of extern "C" */ -#endif - -/*! - * @} - * @ingroup public - * @{ - */ - -#ifndef XXH_NO_LONG_LONG -/*-********************************************************************** -* 64-bit hash -************************************************************************/ -#if defined(XXH_DOXYGEN) /* don't include */ -/*! - * @brief An unsigned 64-bit integer. - * - * Not necessarily defined to `uint64_t` but functionally equivalent. - */ -typedef uint64_t XXH64_hash_t; -#elif !defined (__VMS) \ - && (defined (__cplusplus) \ - || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# ifdef _AIX -# include -# else -# include -# endif - typedef uint64_t XXH64_hash_t; -#else -# include -# if defined(__LP64__) && ULONG_MAX == 0xFFFFFFFFFFFFFFFFULL - /* LP64 ABI says uint64_t is unsigned long */ - typedef unsigned long XXH64_hash_t; -# else - /* the following type must have a width of 64-bit */ - typedef unsigned long long XXH64_hash_t; -# endif -#endif - -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * @} - * - * @defgroup XXH64_family XXH64 family - * @ingroup public - * @{ - * Contains functions used in the classic 64-bit xxHash algorithm. - * - * @note - * XXH3 provides competitive speed for both 32-bit and 64-bit systems, - * and offers true 64/128 bit hash results. - * It provides better speed for systems with vector processing capabilities. - */ - -/*! - * @brief Calculates the 64-bit hash of @p input using xxHash64. - * - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * @param seed The 64-bit seed to alter the hash's output predictably. - * - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return The calculated 64-bit xxHash64 value. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed); - -/******* Streaming *******/ -#ifndef XXH_NO_STREAM -/*! - * @brief The opaque state struct for the XXH64 streaming API. - * - * @see XXH64_state_s for details. - */ -typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ - -/*! - * @brief Allocates an @ref XXH64_state_t. - * - * @return An allocated pointer of @ref XXH64_state_t on success. - * @return `NULL` on failure. - * - * @note Must be freed with XXH64_freeState(). - */ -XXH_PUBLIC_API XXH_MALLOCF XXH64_state_t* XXH64_createState(void); - -/*! - * @brief Frees an @ref XXH64_state_t. - * - * @param statePtr A pointer to an @ref XXH64_state_t allocated with @ref XXH64_createState(). - * - * @return @ref XXH_OK. - * - * @note @p statePtr must be allocated with XXH64_createState(). - */ -XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); - -/*! - * @brief Copies one @ref XXH64_state_t to another. - * - * @param dst_state The state to copy to. - * @param src_state The state to copy from. - * @pre - * @p dst_state and @p src_state must not be `NULL` and must not overlap. - */ -XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dst_state, const XXH64_state_t* src_state); - -/*! - * @brief Resets an @ref XXH64_state_t to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note This function resets and seeds a state. Call it before @ref XXH64_update(). - */ -XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed); - -/*! - * @brief Consumes a block of @p input to an @ref XXH64_state_t. - * - * @param statePtr The state struct to update. - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note Call this to incrementally consume blocks of data. - */ -XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH_NOESCAPE XXH64_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); - -/*! - * @brief Returns the calculated hash value from an @ref XXH64_state_t. - * - * @param statePtr The state struct to calculate the hash from. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return The calculated 64-bit xxHash64 value from that state. - * - * @note - * Calling XXH64_digest() will not affect @p statePtr, so you can update, - * digest, and update again. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (XXH_NOESCAPE const XXH64_state_t* statePtr); -#endif /* !XXH_NO_STREAM */ -/******* Canonical representation *******/ - -/*! - * @brief Canonical (big endian) representation of @ref XXH64_hash_t. - */ -typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t; - -/*! - * @brief Converts an @ref XXH64_hash_t to a big endian @ref XXH64_canonical_t. - * - * @param dst The @ref XXH64_canonical_t pointer to be stored to. - * @param hash The @ref XXH64_hash_t to be converted. - * - * @pre - * @p dst must not be `NULL`. - * - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash); - -/*! - * @brief Converts an @ref XXH64_canonical_t to a native @ref XXH64_hash_t. - * - * @param src The @ref XXH64_canonical_t to convert. - * - * @pre - * @p src must not be `NULL`. - * - * @return The converted hash. - * - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src); - -#ifndef XXH_NO_XXH3 - -/*! - * @} - * ************************************************************************ - * @defgroup XXH3_family XXH3 family - * @ingroup public - * @{ - * - * XXH3 is a more recent hash algorithm featuring: - * - Improved speed for both small and large inputs - * - True 64-bit and 128-bit outputs - * - SIMD acceleration - * - Improved 32-bit viability - * - * Speed analysis methodology is explained here: - * - * https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html - * - * Compared to XXH64, expect XXH3 to run approximately - * ~2x faster on large inputs and >3x faster on small ones, - * exact differences vary depending on platform. - * - * XXH3's speed benefits greatly from SIMD and 64-bit arithmetic, - * but does not require it. - * Most 32-bit and 64-bit targets that can run XXH32 smoothly can run XXH3 - * at competitive speeds, even without vector support. Further details are - * explained in the implementation. - * - * XXH3 has a fast scalar implementation, but it also includes accelerated SIMD - * implementations for many common platforms: - * - AVX512 - * - AVX2 - * - SSE2 - * - ARM NEON - * - WebAssembly SIMD128 - * - POWER8 VSX - * - s390x ZVector - * This can be controlled via the @ref XXH_VECTOR macro, but it automatically - * selects the best version according to predefined macros. For the x86 family, an - * automatic runtime dispatcher is included separately in @ref xxh_x86dispatch.c. - * - * XXH3 implementation is portable: - * it has a generic C90 formulation that can be compiled on any platform, - * all implementations generate exactly the same hash value on all platforms. - * Starting from v0.8.0, it's also labelled "stable", meaning that - * any future version will also generate the same hash value. - * - * XXH3 offers 2 variants, _64bits and _128bits. - * - * When only 64 bits are needed, prefer invoking the _64bits variant, as it - * reduces the amount of mixing, resulting in faster speed on small inputs. - * It's also generally simpler to manipulate a scalar return type than a struct. - * - * The API supports one-shot hashing, streaming mode, and custom secrets. - */ -/*-********************************************************************** -* XXH3 64-bit variant -************************************************************************/ - -/*! - * @brief Calculates 64-bit unseeded variant of XXH3 hash of @p input. - * - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return The calculated 64-bit XXH3 hash value. - * - * @note - * This is equivalent to @ref XXH3_64bits_withSeed() with a seed of `0`, however - * it may have slightly better performance due to constant propagation of the - * defaults. - * - * @see - * XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length); - -/*! - * @brief Calculates 64-bit seeded variant of XXH3 hash of @p input. - * - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return The calculated 64-bit XXH3 hash value. - * - * @note - * seed == 0 produces the same results as @ref XXH3_64bits(). - * - * This variant generates a custom secret on the fly based on default secret - * altered using the @p seed value. - * - * While this operation is decently fast, note that it's not completely free. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed); - -/*! - * The bare minimum size for a custom secret. - * - * @see - * XXH3_64bits_withSecret(), XXH3_64bits_reset_withSecret(), - * XXH3_128bits_withSecret(), XXH3_128bits_reset_withSecret(). - */ -#define XXH3_SECRET_SIZE_MIN 136 - -/*! - * @brief Calculates 64-bit variant of XXH3 with a custom "secret". - * - * @param data The block of data to be hashed, at least @p len bytes in size. - * @param len The length of @p data, in bytes. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * - * @return The calculated 64-bit XXH3 hash value. - * - * @pre - * The memory between @p data and @p data + @p len must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p data may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * It's possible to provide any blob of bytes as a "secret" to generate the hash. - * This makes it more difficult for an external actor to prepare an intentional collision. - * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN). - * However, the quality of the secret impacts the dispersion of the hash algorithm. - * Therefore, the secret _must_ look like a bunch of random bytes. - * Avoid "trivial" or structured data such as repeated sequences or a text document. - * Whenever in doubt about the "randomness" of the blob of bytes, - * consider employing @ref XXH3_generateSecret() instead (see below). - * It will generate a proper high entropy secret derived from the blob of bytes. - * Another advantage of using XXH3_generateSecret() is that - * it guarantees that all bits within the initial blob of bytes - * will impact every bit of the output. - * This is not necessarily the case when using the blob of bytes directly - * because, when hashing _small_ inputs, only a portion of the secret is employed. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize); - - -/******* Streaming *******/ -#ifndef XXH_NO_STREAM -/* - * Streaming requires state maintenance. - * This operation costs memory and CPU. - * As a consequence, streaming is slower than one-shot hashing. - * For better performance, prefer one-shot functions whenever applicable. - */ - -/*! - * @brief The opaque state struct for the XXH3 streaming API. - * - * @see XXH3_state_s for details. - */ -typedef struct XXH3_state_s XXH3_state_t; -XXH_PUBLIC_API XXH_MALLOCF XXH3_state_t* XXH3_createState(void); -XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr); - -/*! - * @brief Copies one @ref XXH3_state_t to another. - * - * @param dst_state The state to copy to. - * @param src_state The state to copy from. - * @pre - * @p dst_state and @p src_state must not be `NULL` and must not overlap. - */ -XXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state); - -/*! - * @brief Resets an @ref XXH3_state_t to begin a new hash. - * - * @param statePtr The state struct to reset. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * - This function resets `statePtr` and generate a secret with default parameters. - * - Call this function before @ref XXH3_64bits_update(). - * - Digest will be equivalent to `XXH3_64bits()`. - * - */ -XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr); - -/*! - * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * - This function resets `statePtr` and generate a secret from `seed`. - * - Call this function before @ref XXH3_64bits_update(). - * - Digest will be equivalent to `XXH3_64bits_withSeed()`. - * - */ -XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed); - -/*! - * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * `secret` is referenced, it _must outlive_ the hash streaming session. - * - * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN, - * and the quality of produced hash values depends on secret's entropy - * (secret's content should look like a bunch of random bytes). - * When in doubt about the randomness of a candidate `secret`, - * consider employing `XXH3_generateSecret()` instead (see below). - */ -XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize); - -/*! - * @brief Consumes a block of @p input to an @ref XXH3_state_t. - * - * @param statePtr The state struct to update. - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * @pre - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note Call this to incrementally consume blocks of data. - */ -XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); - -/*! - * @brief Returns the calculated XXH3 64-bit hash value from an @ref XXH3_state_t. - * - * @param statePtr The state struct to calculate the hash from. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return The calculated XXH3 64-bit hash value from that state. - * - * @note - * Calling XXH3_64bits_digest() will not affect @p statePtr, so you can update, - * digest, and update again. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); -#endif /* !XXH_NO_STREAM */ - -/* note : canonical representation of XXH3 is the same as XXH64 - * since they both produce XXH64_hash_t values */ - - -/*-********************************************************************** -* XXH3 128-bit variant -************************************************************************/ - -/*! - * @brief The return value from 128-bit hashes. - * - * Stored in little endian order, although the fields themselves are in native - * endianness. - */ -typedef struct { - XXH64_hash_t low64; /*!< `value & 0xFFFFFFFFFFFFFFFF` */ - XXH64_hash_t high64; /*!< `value >> 64` */ -} XXH128_hash_t; - -/*! - * @brief Calculates 128-bit unseeded variant of XXH3 of @p data. - * - * @param data The block of data to be hashed, at least @p length bytes in size. - * @param len The length of @p data, in bytes. - * - * @return The calculated 128-bit variant of XXH3 value. - * - * The 128-bit variant of XXH3 has more strength, but it has a bit of overhead - * for shorter inputs. - * - * This is equivalent to @ref XXH3_128bits_withSeed() with a seed of `0`, however - * it may have slightly better performance due to constant propagation of the - * defaults. - * - * @see XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len); -/*! @brief Calculates 128-bit seeded variant of XXH3 hash of @p data. - * - * @param data The block of data to be hashed, at least @p length bytes in size. - * @param len The length of @p data, in bytes. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * @return The calculated 128-bit variant of XXH3 value. - * - * @note - * seed == 0 produces the same results as @ref XXH3_64bits(). - * - * This variant generates a custom secret on the fly based on default secret - * altered using the @p seed value. - * - * While this operation is decently fast, note that it's not completely free. - * - * @see XXH3_128bits(), XXH3_128bits_withSecret(): other seeding variants - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSeed(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed); -/*! - * @brief Calculates 128-bit variant of XXH3 with a custom "secret". - * - * @param data The block of data to be hashed, at least @p len bytes in size. - * @param len The length of @p data, in bytes. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * - * @return The calculated 128-bit variant of XXH3 value. - * - * It's possible to provide any blob of bytes as a "secret" to generate the hash. - * This makes it more difficult for an external actor to prepare an intentional collision. - * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN). - * However, the quality of the secret impacts the dispersion of the hash algorithm. - * Therefore, the secret _must_ look like a bunch of random bytes. - * Avoid "trivial" or structured data such as repeated sequences or a text document. - * Whenever in doubt about the "randomness" of the blob of bytes, - * consider employing @ref XXH3_generateSecret() instead (see below). - * It will generate a proper high entropy secret derived from the blob of bytes. - * Another advantage of using XXH3_generateSecret() is that - * it guarantees that all bits within the initial blob of bytes - * will impact every bit of the output. - * This is not necessarily the case when using the blob of bytes directly - * because, when hashing _small_ inputs, only a portion of the secret is employed. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize); - -/******* Streaming *******/ -#ifndef XXH_NO_STREAM -/* - * Streaming requires state maintenance. - * This operation costs memory and CPU. - * As a consequence, streaming is slower than one-shot hashing. - * For better performance, prefer one-shot functions whenever applicable. - * - * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits(). - * Use already declared XXH3_createState() and XXH3_freeState(). - * - * All reset and streaming functions have same meaning as their 64-bit counterpart. - */ - -/*! - * @brief Resets an @ref XXH3_state_t to begin a new hash. - * - * @param statePtr The state struct to reset. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * - This function resets `statePtr` and generate a secret with default parameters. - * - Call it before @ref XXH3_128bits_update(). - * - Digest will be equivalent to `XXH3_128bits()`. - */ -XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr); - -/*! - * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * - This function resets `statePtr` and generate a secret from `seed`. - * - Call it before @ref XXH3_128bits_update(). - * - Digest will be equivalent to `XXH3_128bits_withSeed()`. - */ -XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed); -/*! - * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. - * - * @param statePtr The state struct to reset. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * `secret` is referenced, it _must outlive_ the hash streaming session. - * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN, - * and the quality of produced hash values depends on secret's entropy - * (secret's content should look like a bunch of random bytes). - * When in doubt about the randomness of a candidate `secret`, - * consider employing `XXH3_generateSecret()` instead (see below). - */ -XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize); - -/*! - * @brief Consumes a block of @p input to an @ref XXH3_state_t. - * - * Call this to incrementally consume blocks of data. - * - * @param statePtr The state struct to update. - * @param input The block of data to be hashed, at least @p length bytes in size. - * @param length The length of @p input, in bytes. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @note - * The memory between @p input and @p input + @p length must be valid, - * readable, contiguous memory. However, if @p length is `0`, @p input may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - */ -XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); - -/*! - * @brief Returns the calculated XXH3 128-bit hash value from an @ref XXH3_state_t. - * - * @param statePtr The state struct to calculate the hash from. - * - * @pre - * @p statePtr must not be `NULL`. - * - * @return The calculated XXH3 128-bit hash value from that state. - * - * @note - * Calling XXH3_128bits_digest() will not affect @p statePtr, so you can update, - * digest, and update again. - * - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); -#endif /* !XXH_NO_STREAM */ - -/* Following helper functions make it possible to compare XXH128_hast_t values. - * Since XXH128_hash_t is a structure, this capability is not offered by the language. - * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */ - -/*! - * @brief Check equality of two XXH128_hash_t values - * - * @param h1 The 128-bit hash value. - * @param h2 Another 128-bit hash value. - * - * @return `1` if `h1` and `h2` are equal. - * @return `0` if they are not. - */ -XXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2); - -/*! - * @brief Compares two @ref XXH128_hash_t - * - * This comparator is compatible with stdlib's `qsort()`/`bsearch()`. - * - * @param h128_1 Left-hand side value - * @param h128_2 Right-hand side value - * - * @return >0 if @p h128_1 > @p h128_2 - * @return =0 if @p h128_1 == @p h128_2 - * @return <0 if @p h128_1 < @p h128_2 - */ -XXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2); - - -/******* Canonical representation *******/ -typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t; - - -/*! - * @brief Converts an @ref XXH128_hash_t to a big endian @ref XXH128_canonical_t. - * - * @param dst The @ref XXH128_canonical_t pointer to be stored to. - * @param hash The @ref XXH128_hash_t to be converted. - * - * @pre - * @p dst must not be `NULL`. - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash); - -/*! - * @brief Converts an @ref XXH128_canonical_t to a native @ref XXH128_hash_t. - * - * @param src The @ref XXH128_canonical_t to convert. - * - * @pre - * @p src must not be `NULL`. - * - * @return The converted hash. - * @see @ref canonical_representation_example "Canonical Representation Example" - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src); - - -#endif /* !XXH_NO_XXH3 */ - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -#endif /* XXH_NO_LONG_LONG */ - -/*! - * @} - */ -#endif /* XXHASH_H_5627135585666179 */ - - - -#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) -#define XXHASH_H_STATIC_13879238742 -/* **************************************************************************** - * This section contains declarations which are not guaranteed to remain stable. - * They may change in future versions, becoming incompatible with a different - * version of the library. - * These declarations should only be used with static linking. - * Never use them in association with dynamic linking! - ***************************************************************************** */ - -/* - * These definitions are only present to allow static allocation - * of XXH states, on stack or in a struct, for example. - * Never **ever** access their members directly. - */ - -/*! - * @internal - * @brief Structure for XXH32 streaming API. - * - * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, - * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is - * an opaque type. This allows fields to safely be changed. - * - * Typedef'd to @ref XXH32_state_t. - * Do not access the members of this struct directly. - * @see XXH64_state_s, XXH3_state_s - */ -struct XXH32_state_s { - XXH32_hash_t total_len_32; /*!< Total length hashed, modulo 2^32 */ - XXH32_hash_t large_len; /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */ - XXH32_hash_t v[4]; /*!< Accumulator lanes */ - XXH32_hash_t mem32[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */ - XXH32_hash_t memsize; /*!< Amount of data in @ref mem32 */ - XXH32_hash_t reserved; /*!< Reserved field. Do not read nor write to it. */ -}; /* typedef'd to XXH32_state_t */ - - -#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */ - -/*! - * @internal - * @brief Structure for XXH64 streaming API. - * - * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, - * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is - * an opaque type. This allows fields to safely be changed. - * - * Typedef'd to @ref XXH64_state_t. - * Do not access the members of this struct directly. - * @see XXH32_state_s, XXH3_state_s - */ -struct XXH64_state_s { - XXH64_hash_t total_len; /*!< Total length hashed. This is always 64-bit. */ - XXH64_hash_t v[4]; /*!< Accumulator lanes */ - XXH64_hash_t mem64[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[32]. */ - XXH32_hash_t memsize; /*!< Amount of data in @ref mem64 */ - XXH32_hash_t reserved32; /*!< Reserved field, needed for padding anyways*/ - XXH64_hash_t reserved64; /*!< Reserved field. Do not read or write to it. */ -}; /* typedef'd to XXH64_state_t */ - -#ifndef XXH_NO_XXH3 - -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */ -# include -# define XXH_ALIGN(n) alignas(n) -#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */ -/* In C++ alignas() is a keyword */ -# define XXH_ALIGN(n) alignas(n) -#elif defined(__GNUC__) -# define XXH_ALIGN(n) __attribute__ ((aligned(n))) -#elif defined(_MSC_VER) -# define XXH_ALIGN(n) __declspec(align(n)) -#else -# define XXH_ALIGN(n) /* disabled */ -#endif - -/* Old GCC versions only accept the attribute after the type in structures. */ -#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \ - && ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \ - && defined(__GNUC__) -# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align) -#else -# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type -#endif - -/*! - * @brief The size of the internal XXH3 buffer. - * - * This is the optimal update size for incremental hashing. - * - * @see XXH3_64b_update(), XXH3_128b_update(). - */ -#define XXH3_INTERNALBUFFER_SIZE 256 - -/*! - * @internal - * @brief Default size of the secret buffer (and @ref XXH3_kSecret). - * - * This is the size used in @ref XXH3_kSecret and the seeded functions. - * - * Not to be confused with @ref XXH3_SECRET_SIZE_MIN. - */ -#define XXH3_SECRET_DEFAULT_SIZE 192 - -/*! - * @internal - * @brief Structure for XXH3 streaming API. - * - * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, - * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. - * Otherwise it is an opaque type. - * Never use this definition in combination with dynamic library. - * This allows fields to safely be changed in the future. - * - * @note ** This structure has a strict alignment requirement of 64 bytes!! ** - * Do not allocate this with `malloc()` or `new`, - * it will not be sufficiently aligned. - * Use @ref XXH3_createState() and @ref XXH3_freeState(), or stack allocation. - * - * Typedef'd to @ref XXH3_state_t. - * Do never access the members of this struct directly. - * - * @see XXH3_INITSTATE() for stack initialization. - * @see XXH3_createState(), XXH3_freeState(). - * @see XXH32_state_s, XXH64_state_s - */ -struct XXH3_state_s { - XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]); - /*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */ - XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]); - /*!< Used to store a custom secret generated from a seed. */ - XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]); - /*!< The internal buffer. @see XXH32_state_s::mem32 */ - XXH32_hash_t bufferedSize; - /*!< The amount of memory in @ref buffer, @see XXH32_state_s::memsize */ - XXH32_hash_t useSeed; - /*!< Reserved field. Needed for padding on 64-bit. */ - size_t nbStripesSoFar; - /*!< Number or stripes processed. */ - XXH64_hash_t totalLen; - /*!< Total length hashed. 64-bit even on 32-bit targets. */ - size_t nbStripesPerBlock; - /*!< Number of stripes per block. */ - size_t secretLimit; - /*!< Size of @ref customSecret or @ref extSecret */ - XXH64_hash_t seed; - /*!< Seed for _withSeed variants. Must be zero otherwise, @see XXH3_INITSTATE() */ - XXH64_hash_t reserved64; - /*!< Reserved field. */ - const unsigned char* extSecret; - /*!< Reference to an external secret for the _withSecret variants, NULL - * for other variants. */ - /* note: there may be some padding at the end due to alignment on 64 bytes */ -}; /* typedef'd to XXH3_state_t */ - -#undef XXH_ALIGN_MEMBER - -/*! - * @brief Initializes a stack-allocated `XXH3_state_s`. - * - * When the @ref XXH3_state_t structure is merely emplaced on stack, - * it should be initialized with XXH3_INITSTATE() or a memset() - * in case its first reset uses XXH3_NNbits_reset_withSeed(). - * This init can be omitted if the first reset uses default or _withSecret mode. - * This operation isn't necessary when the state is created with XXH3_createState(). - * Note that this doesn't prepare the state for a streaming operation, - * it's still necessary to use XXH3_NNbits_reset*() afterwards. - */ -#define XXH3_INITSTATE(XXH3_state_ptr) \ - do { \ - XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \ - tmp_xxh3_state_ptr->seed = 0; \ - tmp_xxh3_state_ptr->extSecret = NULL; \ - } while(0) - - -#if defined (__cplusplus) -extern "C" { -#endif - -/*! - * @brief Calculates the 128-bit hash of @p data using XXH3. - * - * @param data The block of data to be hashed, at least @p len bytes in size. - * @param len The length of @p data, in bytes. - * @param seed The 64-bit seed to alter the hash's output predictably. - * - * @pre - * The memory between @p data and @p data + @p len must be valid, - * readable, contiguous memory. However, if @p len is `0`, @p data may be - * `NULL`. In C++, this also must be *TriviallyCopyable*. - * - * @return The calculated 128-bit XXH3 value. - * - * @see @ref single_shot_example "Single Shot Example" for an example. - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed); - - -/* === Experimental API === */ -/* Symbols defined below must be considered tied to a specific library version. */ - -/*! - * @brief Derive a high-entropy secret from any user-defined content, named customSeed. - * - * @param secretBuffer A writable buffer for derived high-entropy secret data. - * @param secretSize Size of secretBuffer, in bytes. Must be >= XXH3_SECRET_DEFAULT_SIZE. - * @param customSeed A user-defined content. - * @param customSeedSize Size of customSeed, in bytes. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * The generated secret can be used in combination with `*_withSecret()` functions. - * The `_withSecret()` variants are useful to provide a higher level of protection - * than 64-bit seed, as it becomes much more difficult for an external actor to - * guess how to impact the calculation logic. - * - * The function accepts as input a custom seed of any length and any content, - * and derives from it a high-entropy secret of length @p secretSize into an - * already allocated buffer @p secretBuffer. - * - * The generated secret can then be used with any `*_withSecret()` variant. - * The functions @ref XXH3_128bits_withSecret(), @ref XXH3_64bits_withSecret(), - * @ref XXH3_128bits_reset_withSecret() and @ref XXH3_64bits_reset_withSecret() - * are part of this list. They all accept a `secret` parameter - * which must be large enough for implementation reasons (>= @ref XXH3_SECRET_SIZE_MIN) - * _and_ feature very high entropy (consist of random-looking bytes). - * These conditions can be a high bar to meet, so @ref XXH3_generateSecret() can - * be employed to ensure proper quality. - * - * @p customSeed can be anything. It can have any size, even small ones, - * and its content can be anything, even "poor entropy" sources such as a bunch - * of zeroes. The resulting `secret` will nonetheless provide all required qualities. - * - * @pre - * - @p secretSize must be >= @ref XXH3_SECRET_SIZE_MIN - * - When @p customSeedSize > 0, supplying NULL as customSeed is undefined behavior. - * - * Example code: - * @code{.c} - * #include - * #include - * #include - * #define XXH_STATIC_LINKING_ONLY // expose unstable API - * #include "xxhash.h" - * // Hashes argv[2] using the entropy from argv[1]. - * int main(int argc, char* argv[]) - * { - * char secret[XXH3_SECRET_SIZE_MIN]; - * if (argv != 3) { return 1; } - * XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1])); - * XXH64_hash_t h = XXH3_64bits_withSecret( - * argv[2], strlen(argv[2]), - * secret, sizeof(secret) - * ); - * printf("%016llx\n", (unsigned long long) h); - * } - * @endcode - */ -XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize); - -/*! - * @brief Generate the same secret as the _withSeed() variants. - * - * @param secretBuffer A writable buffer of @ref XXH3_SECRET_SIZE_MIN bytes - * @param seed The 64-bit seed to alter the hash result predictably. - * - * The generated secret can be used in combination with - *`*_withSecret()` and `_withSecretandSeed()` variants. - * - * Example C++ `std::string` hash class: - * @code{.cpp} - * #include - * #define XXH_STATIC_LINKING_ONLY // expose unstable API - * #include "xxhash.h" - * // Slow, seeds each time - * class HashSlow { - * XXH64_hash_t seed; - * public: - * HashSlow(XXH64_hash_t s) : seed{s} {} - * size_t operator()(const std::string& x) const { - * return size_t{XXH3_64bits_withSeed(x.c_str(), x.length(), seed)}; - * } - * }; - * // Fast, caches the seeded secret for future uses. - * class HashFast { - * unsigned char secret[XXH3_SECRET_SIZE_MIN]; - * public: - * HashFast(XXH64_hash_t s) { - * XXH3_generateSecret_fromSeed(secret, seed); - * } - * size_t operator()(const std::string& x) const { - * return size_t{ - * XXH3_64bits_withSecret(x.c_str(), x.length(), secret, sizeof(secret)) - * }; - * } - * }; - * @endcode - */ -XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed); - -/*! - * @brief Calculates 64/128-bit seeded variant of XXH3 hash of @p data. - * - * @param data The block of data to be hashed, at least @p len bytes in size. - * @param len The length of @p data, in bytes. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * @param seed The 64-bit seed to alter the hash result predictably. - * - * These variants generate hash values using either - * @p seed for "short" keys (< @ref XXH3_MIDSIZE_MAX = 240 bytes) - * or @p secret for "large" keys (>= @ref XXH3_MIDSIZE_MAX). - * - * This generally benefits speed, compared to `_withSeed()` or `_withSecret()`. - * `_withSeed()` has to generate the secret on the fly for "large" keys. - * It's fast, but can be perceptible for "not so large" keys (< 1 KB). - * `_withSecret()` has to generate the masks on the fly for "small" keys, - * which requires more instructions than _withSeed() variants. - * Therefore, _withSecretandSeed variant combines the best of both worlds. - * - * When @p secret has been generated by XXH3_generateSecret_fromSeed(), - * this variant produces *exactly* the same results as `_withSeed()` variant, - * hence offering only a pure speed benefit on "large" input, - * by skipping the need to regenerate the secret for every large input. - * - * Another usage scenario is to hash the secret to a 64-bit hash value, - * for example with XXH3_64bits(), which then becomes the seed, - * and then employ both the seed and the secret in _withSecretandSeed(). - * On top of speed, an added benefit is that each bit in the secret - * has a 50% chance to swap each bit in the output, via its impact to the seed. - * - * This is not guaranteed when using the secret directly in "small data" scenarios, - * because only portions of the secret are employed for small data. - */ -XXH_PUBLIC_API XXH_PUREF XXH64_hash_t -XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len, - XXH_NOESCAPE const void* secret, size_t secretSize, - XXH64_hash_t seed); -/*! - * @brief Calculates 128-bit seeded variant of XXH3 hash of @p data. - * - * @param input The block of data to be hashed, at least @p len bytes in size. - * @param length The length of @p data, in bytes. - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * @param seed64 The 64-bit seed to alter the hash result predictably. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @see XXH3_64bits_withSecretandSeed() - */ -XXH_PUBLIC_API XXH_PUREF XXH128_hash_t -XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, - XXH_NOESCAPE const void* secret, size_t secretSize, - XXH64_hash_t seed64); -#ifndef XXH_NO_STREAM -/*! - * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. - * - * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * @param seed64 The 64-bit seed to alter the hash result predictably. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @see XXH3_64bits_withSecretandSeed() - */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, - XXH_NOESCAPE const void* secret, size_t secretSize, - XXH64_hash_t seed64); -/*! - * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. - * - * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). - * @param secret The secret data. - * @param secretSize The length of @p secret, in bytes. - * @param seed64 The 64-bit seed to alter the hash result predictably. - * - * @return @ref XXH_OK on success. - * @return @ref XXH_ERROR on failure. - * - * @see XXH3_64bits_withSecretandSeed() - */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, - XXH_NOESCAPE const void* secret, size_t secretSize, - XXH64_hash_t seed64); -#endif /* !XXH_NO_STREAM */ - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -#endif /* !XXH_NO_XXH3 */ -#endif /* XXH_NO_LONG_LONG */ - -#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) -# define XXH_IMPLEMENTATION -#endif - -#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */ - - -/* ======================================================================== */ -/* ======================================================================== */ -/* ======================================================================== */ - - -/*-********************************************************************** - * xxHash implementation - *-********************************************************************** - * xxHash's implementation used to be hosted inside xxhash.c. - * - * However, inlining requires implementation to be visible to the compiler, - * hence be included alongside the header. - * Previously, implementation was hosted inside xxhash.c, - * which was then #included when inlining was activated. - * This construction created issues with a few build and install systems, - * as it required xxhash.c to be stored in /include directory. - * - * xxHash implementation is now directly integrated within xxhash.h. - * As a consequence, xxhash.c is no longer needed in /include. - * - * xxhash.c is still available and is still useful. - * In a "normal" setup, when xxhash is not inlined, - * xxhash.h only exposes the prototypes and public symbols, - * while xxhash.c can be built into an object file xxhash.o - * which can then be linked into the final binary. - ************************************************************************/ - -#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \ - || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387) -# define XXH_IMPLEM_13a8737387 - -/* ************************************* -* Tuning parameters -***************************************/ - -/*! - * @defgroup tuning Tuning parameters - * @{ - * - * Various macros to control xxHash's behavior. - */ -#ifdef XXH_DOXYGEN -/*! - * @brief Define this to disable 64-bit code. - * - * Useful if only using the @ref XXH32_family and you have a strict C90 compiler. - */ -# define XXH_NO_LONG_LONG -# undef XXH_NO_LONG_LONG /* don't actually */ -/*! - * @brief Controls how unaligned memory is accessed. - * - * By default, access to unaligned memory is controlled by `memcpy()`, which is - * safe and portable. - * - * Unfortunately, on some target/compiler combinations, the generated assembly - * is sub-optimal. - * - * The below switch allow selection of a different access method - * in the search for improved performance. - * - * @par Possible options: - * - * - `XXH_FORCE_MEMORY_ACCESS=0` (default): `memcpy` - * @par - * Use `memcpy()`. Safe and portable. Note that most modern compilers will - * eliminate the function call and treat it as an unaligned access. - * - * - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((aligned(1)))` - * @par - * Depends on compiler extensions and is therefore not portable. - * This method is safe _if_ your compiler supports it, - * and *generally* as fast or faster than `memcpy`. - * - * - `XXH_FORCE_MEMORY_ACCESS=2`: Direct cast - * @par - * Casts directly and dereferences. This method doesn't depend on the - * compiler, but it violates the C standard as it directly dereferences an - * unaligned pointer. It can generate buggy code on targets which do not - * support unaligned memory accesses, but in some circumstances, it's the - * only known way to get the most performance. - * - * - `XXH_FORCE_MEMORY_ACCESS=3`: Byteshift - * @par - * Also portable. This can generate the best code on old compilers which don't - * inline small `memcpy()` calls, and it might also be faster on big-endian - * systems which lack a native byteswap instruction. However, some compilers - * will emit literal byteshifts even if the target supports unaligned access. - * - * - * @warning - * Methods 1 and 2 rely on implementation-defined behavior. Use these with - * care, as what works on one compiler/platform/optimization level may cause - * another to read garbage data or even crash. - * - * See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details. - * - * Prefer these methods in priority order (0 > 3 > 1 > 2) - */ -# define XXH_FORCE_MEMORY_ACCESS 0 - -/*! - * @def XXH_SIZE_OPT - * @brief Controls how much xxHash optimizes for size. - * - * xxHash, when compiled, tends to result in a rather large binary size. This - * is mostly due to heavy usage to forced inlining and constant folding of the - * @ref XXH3_family to increase performance. - * - * However, some developers prefer size over speed. This option can - * significantly reduce the size of the generated code. When using the `-Os` - * or `-Oz` options on GCC or Clang, this is defined to 1 by default, - * otherwise it is defined to 0. - * - * Most of these size optimizations can be controlled manually. - * - * This is a number from 0-2. - * - `XXH_SIZE_OPT` == 0: Default. xxHash makes no size optimizations. Speed - * comes first. - * - `XXH_SIZE_OPT` == 1: Default for `-Os` and `-Oz`. xxHash is more - * conservative and disables hacks that increase code size. It implies the - * options @ref XXH_NO_INLINE_HINTS == 1, @ref XXH_FORCE_ALIGN_CHECK == 0, - * and @ref XXH3_NEON_LANES == 8 if they are not already defined. - * - `XXH_SIZE_OPT` == 2: xxHash tries to make itself as small as possible. - * Performance may cry. For example, the single shot functions just use the - * streaming API. - */ -# define XXH_SIZE_OPT 0 - -/*! - * @def XXH_FORCE_ALIGN_CHECK - * @brief If defined to non-zero, adds a special path for aligned inputs (XXH32() - * and XXH64() only). - * - * This is an important performance trick for architectures without decent - * unaligned memory access performance. - * - * It checks for input alignment, and when conditions are met, uses a "fast - * path" employing direct 32-bit/64-bit reads, resulting in _dramatically - * faster_ read speed. - * - * The check costs one initial branch per hash, which is generally negligible, - * but not zero. - * - * Moreover, it's not useful to generate an additional code path if memory - * access uses the same instruction for both aligned and unaligned - * addresses (e.g. x86 and aarch64). - * - * In these cases, the alignment check can be removed by setting this macro to 0. - * Then the code will always use unaligned memory access. - * Align check is automatically disabled on x86, x64, ARM64, and some ARM chips - * which are platforms known to offer good unaligned memory accesses performance. - * - * It is also disabled by default when @ref XXH_SIZE_OPT >= 1. - * - * This option does not affect XXH3 (only XXH32 and XXH64). - */ -# define XXH_FORCE_ALIGN_CHECK 0 - -/*! - * @def XXH_NO_INLINE_HINTS - * @brief When non-zero, sets all functions to `static`. - * - * By default, xxHash tries to force the compiler to inline almost all internal - * functions. - * - * This can usually improve performance due to reduced jumping and improved - * constant folding, but significantly increases the size of the binary which - * might not be favorable. - * - * Additionally, sometimes the forced inlining can be detrimental to performance, - * depending on the architecture. - * - * XXH_NO_INLINE_HINTS marks all internal functions as static, giving the - * compiler full control on whether to inline or not. - * - * When not optimizing (-O0), using `-fno-inline` with GCC or Clang, or if - * @ref XXH_SIZE_OPT >= 1, this will automatically be defined. - */ -# define XXH_NO_INLINE_HINTS 0 - -/*! - * @def XXH3_INLINE_SECRET - * @brief Determines whether to inline the XXH3 withSecret code. - * - * When the secret size is known, the compiler can improve the performance - * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret(). - * - * However, if the secret size is not known, it doesn't have any benefit. This - * happens when xxHash is compiled into a global symbol. Therefore, if - * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0. - * - * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers - * that are *sometimes* force inline on -Og, and it is impossible to automatically - * detect this optimization level. - */ -# define XXH3_INLINE_SECRET 0 - -/*! - * @def XXH32_ENDJMP - * @brief Whether to use a jump for `XXH32_finalize`. - * - * For performance, `XXH32_finalize` uses multiple branches in the finalizer. - * This is generally preferable for performance, - * but depending on exact architecture, a jmp may be preferable. - * - * This setting is only possibly making a difference for very small inputs. - */ -# define XXH32_ENDJMP 0 - -/*! - * @internal - * @brief Redefines old internal names. - * - * For compatibility with code that uses xxHash's internals before the names - * were changed to improve namespacing. There is no other reason to use this. - */ -# define XXH_OLD_NAMES -# undef XXH_OLD_NAMES /* don't actually use, it is ugly. */ - -/*! - * @def XXH_NO_STREAM - * @brief Disables the streaming API. - * - * When xxHash is not inlined and the streaming functions are not used, disabling - * the streaming functions can improve code size significantly, especially with - * the @ref XXH3_family which tends to make constant folded copies of itself. - */ -# define XXH_NO_STREAM -# undef XXH_NO_STREAM /* don't actually */ -#endif /* XXH_DOXYGEN */ -/*! - * @} - */ - -#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ - /* prefer __packed__ structures (method 1) for GCC - * < ARMv7 with unaligned access (e.g. Raspbian armhf) still uses byte shifting, so we use memcpy - * which for some reason does unaligned loads. */ -# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED)) -# define XXH_FORCE_MEMORY_ACCESS 1 -# endif -#endif - -#ifndef XXH_SIZE_OPT - /* default to 1 for -Os or -Oz */ -# if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__) -# define XXH_SIZE_OPT 1 -# else -# define XXH_SIZE_OPT 0 -# endif -#endif - -#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ - /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */ -# if XXH_SIZE_OPT >= 1 || \ - defined(__i386) || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \ - || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */ -# define XXH_FORCE_ALIGN_CHECK 0 -# else -# define XXH_FORCE_ALIGN_CHECK 1 -# endif -#endif - -#ifndef XXH_NO_INLINE_HINTS -# if XXH_SIZE_OPT >= 1 || defined(__NO_INLINE__) /* -O0, -fno-inline */ -# define XXH_NO_INLINE_HINTS 1 -# else -# define XXH_NO_INLINE_HINTS 0 -# endif -#endif - -#ifndef XXH3_INLINE_SECRET -# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \ - || !defined(XXH_INLINE_ALL) -# define XXH3_INLINE_SECRET 0 -# else -# define XXH3_INLINE_SECRET 1 -# endif -#endif - -#ifndef XXH32_ENDJMP -/* generally preferable for performance */ -# define XXH32_ENDJMP 0 -#endif - -/*! - * @defgroup impl Implementation - * @{ - */ - -/* ************************************* -* Includes & Memory related functions -***************************************/ -#include /* memcmp, memcpy */ -#include /* ULLONG_MAX */ - -#if defined(XXH_NO_STREAM) -/* nothing */ -#elif defined(XXH_NO_STDLIB) - -/* When requesting to disable any mention of stdlib, - * the library loses the ability to invoked malloc / free. - * In practice, it means that functions like `XXH*_createState()` - * will always fail, and return NULL. - * This flag is useful in situations where - * xxhash.h is integrated into some kernel, embedded or limited environment - * without access to dynamic allocation. - */ - -#if defined (__cplusplus) -extern "C" { -#endif - -static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; } -static void XXH_free(void* p) { (void)p; } - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -#else - -/* - * Modify the local functions below should you wish to use - * different memory routines for malloc() and free() - */ -#include - -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * @internal - * @brief Modify this function to use a different routine than malloc(). - */ -static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); } - -/*! - * @internal - * @brief Modify this function to use a different routine than free(). - */ -static void XXH_free(void* p) { free(p); } - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -#endif /* XXH_NO_STDLIB */ - -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * @internal - * @brief Modify this function to use a different routine than memcpy(). - */ -static void* XXH_memcpy(void* dest, const void* src, size_t size) -{ - return memcpy(dest,src,size); -} - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -/* ************************************* -* Compiler Specific Options -***************************************/ -#ifdef _MSC_VER /* Visual Studio warning fix */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -#endif - -#if XXH_NO_INLINE_HINTS /* disable inlining hints */ -# if defined(__GNUC__) || defined(__clang__) -# define XXH_FORCE_INLINE static __attribute__((unused)) -# else -# define XXH_FORCE_INLINE static -# endif -# define XXH_NO_INLINE static -/* enable inlining hints */ -#elif defined(__GNUC__) || defined(__clang__) -# define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused)) -# define XXH_NO_INLINE static __attribute__((noinline)) -#elif defined(_MSC_VER) /* Visual Studio */ -# define XXH_FORCE_INLINE static __forceinline -# define XXH_NO_INLINE static __declspec(noinline) -#elif defined (__cplusplus) \ - || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */ -# define XXH_FORCE_INLINE static inline -# define XXH_NO_INLINE static -#else -# define XXH_FORCE_INLINE static -# define XXH_NO_INLINE static -#endif - -#if XXH3_INLINE_SECRET -# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE -#else -# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE -#endif - - -/* ************************************* -* Debug -***************************************/ -/*! - * @ingroup tuning - * @def XXH_DEBUGLEVEL - * @brief Sets the debugging level. - * - * XXH_DEBUGLEVEL is expected to be defined externally, typically via the - * compiler's command line options. The value must be a number. - */ -#ifndef XXH_DEBUGLEVEL -# ifdef DEBUGLEVEL /* backwards compat */ -# define XXH_DEBUGLEVEL DEBUGLEVEL -# else -# define XXH_DEBUGLEVEL 0 -# endif -#endif - -#if (XXH_DEBUGLEVEL>=1) -# include /* note: can still be disabled with NDEBUG */ -# define XXH_ASSERT(c) assert(c) -#else -# if defined(__INTEL_COMPILER) -# define XXH_ASSERT(c) XXH_ASSUME((unsigned char) (c)) -# else -# define XXH_ASSERT(c) XXH_ASSUME(c) -# endif -#endif - -/* note: use after variable declarations */ -#ifndef XXH_STATIC_ASSERT -# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ -# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0) -# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ -# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) -# else -# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0) -# endif -# define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c) -#endif - -/*! - * @internal - * @def XXH_COMPILER_GUARD(var) - * @brief Used to prevent unwanted optimizations for @p var. - * - * It uses an empty GCC inline assembly statement with a register constraint - * which forces @p var into a general purpose register (eg eax, ebx, ecx - * on x86) and marks it as modified. - * - * This is used in a few places to avoid unwanted autovectorization (e.g. - * XXH32_round()). All vectorization we want is explicit via intrinsics, - * and _usually_ isn't wanted elsewhere. - * - * We also use it to prevent unwanted constant folding for AArch64 in - * XXH3_initCustomSecret_scalar(). - */ -#if defined(__GNUC__) || defined(__clang__) -# define XXH_COMPILER_GUARD(var) __asm__("" : "+r" (var)) -#else -# define XXH_COMPILER_GUARD(var) ((void)0) -#endif - -/* Specifically for NEON vectors which use the "w" constraint, on - * Clang. */ -#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__) -# define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__("" : "+w" (var)) -#else -# define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0) -#endif - -/* ************************************* -* Basic Types -***************************************/ -#if !defined (__VMS) \ - && (defined (__cplusplus) \ - || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) -# ifdef _AIX -# include -# else -# include -# endif - typedef uint8_t xxh_u8; -#else - typedef unsigned char xxh_u8; -#endif -typedef XXH32_hash_t xxh_u32; - -#ifdef XXH_OLD_NAMES -# warning "XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly" -# define BYTE xxh_u8 -# define U8 xxh_u8 -# define U32 xxh_u32 -#endif - -#if defined (__cplusplus) -extern "C" { -#endif - -/* *** Memory access *** */ - -/*! - * @internal - * @fn xxh_u32 XXH_read32(const void* ptr) - * @brief Reads an unaligned 32-bit integer from @p ptr in native endianness. - * - * Affected by @ref XXH_FORCE_MEMORY_ACCESS. - * - * @param ptr The pointer to read from. - * @return The 32-bit native endian integer from the bytes at @p ptr. - */ - -/*! - * @internal - * @fn xxh_u32 XXH_readLE32(const void* ptr) - * @brief Reads an unaligned 32-bit little endian integer from @p ptr. - * - * Affected by @ref XXH_FORCE_MEMORY_ACCESS. - * - * @param ptr The pointer to read from. - * @return The 32-bit little endian integer from the bytes at @p ptr. - */ - -/*! - * @internal - * @fn xxh_u32 XXH_readBE32(const void* ptr) - * @brief Reads an unaligned 32-bit big endian integer from @p ptr. - * - * Affected by @ref XXH_FORCE_MEMORY_ACCESS. - * - * @param ptr The pointer to read from. - * @return The 32-bit big endian integer from the bytes at @p ptr. - */ - -/*! - * @internal - * @fn xxh_u32 XXH_readLE32_align(const void* ptr, XXH_alignment align) - * @brief Like @ref XXH_readLE32(), but has an option for aligned reads. - * - * Affected by @ref XXH_FORCE_MEMORY_ACCESS. - * Note that when @ref XXH_FORCE_ALIGN_CHECK == 0, the @p align parameter is - * always @ref XXH_alignment::XXH_unaligned. - * - * @param ptr The pointer to read from. - * @param align Whether @p ptr is aligned. - * @pre - * If @p align == @ref XXH_alignment::XXH_aligned, @p ptr must be 4 byte - * aligned. - * @return The 32-bit little endian integer from the bytes at @p ptr. - */ - -#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) -/* - * Manual byteshift. Best for old compilers which don't inline memcpy. - * We actually directly use XXH_readLE32 and XXH_readBE32. - */ -#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) - -/* - * Force direct memory access. Only works on CPU which support unaligned memory - * access in hardware. - */ -static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; } - -#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) - -/* - * __attribute__((aligned(1))) is supported by gcc and clang. Originally the - * documentation claimed that it only increased the alignment, but actually it - * can decrease it on gcc, clang, and icc: - * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502, - * https://gcc.godbolt.org/z/xYez1j67Y. - */ -#ifdef XXH_OLD_NAMES -typedef union { xxh_u32 u32; } __attribute__((packed)) unalign; -#endif -static xxh_u32 XXH_read32(const void* ptr) -{ - typedef __attribute__((aligned(1))) xxh_u32 xxh_unalign32; - return *((const xxh_unalign32*)ptr); -} - -#else - -/* - * Portable and safe solution. Generally efficient. - * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html - */ -static xxh_u32 XXH_read32(const void* memPtr) -{ - xxh_u32 val; - XXH_memcpy(&val, memPtr, sizeof(val)); - return val; -} - -#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ - - -/* *** Endianness *** */ - -/*! - * @ingroup tuning - * @def XXH_CPU_LITTLE_ENDIAN - * @brief Whether the target is little endian. - * - * Defined to 1 if the target is little endian, or 0 if it is big endian. - * It can be defined externally, for example on the compiler command line. - * - * If it is not defined, - * a runtime check (which is usually constant folded) is used instead. - * - * @note - * This is not necessarily defined to an integer constant. - * - * @see XXH_isLittleEndian() for the runtime check. - */ -#ifndef XXH_CPU_LITTLE_ENDIAN -/* - * Try to detect endianness automatically, to avoid the nonstandard behavior - * in `XXH_isLittleEndian()` - */ -# if defined(_WIN32) /* Windows is always little endian */ \ - || defined(__LITTLE_ENDIAN__) \ - || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -# define XXH_CPU_LITTLE_ENDIAN 1 -# elif defined(__BIG_ENDIAN__) \ - || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) -# define XXH_CPU_LITTLE_ENDIAN 0 -# else -/*! - * @internal - * @brief Runtime check for @ref XXH_CPU_LITTLE_ENDIAN. - * - * Most compilers will constant fold this. - */ -static int XXH_isLittleEndian(void) -{ - /* - * Portable and well-defined behavior. - * Don't use static: it is detrimental to performance. - */ - const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 }; - return one.c[0]; -} -# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian() -# endif -#endif - - - - -/* **************************************** -* Compiler-specific Functions and Macros -******************************************/ -#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) - -#ifdef __has_builtin -# define XXH_HAS_BUILTIN(x) __has_builtin(x) -#else -# define XXH_HAS_BUILTIN(x) 0 -#endif - - - -/* - * C23 and future versions have standard "unreachable()". - * Once it has been implemented reliably we can add it as an - * additional case: - * - * ``` - * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) - * # include - * # ifdef unreachable - * # define XXH_UNREACHABLE() unreachable() - * # endif - * #endif - * ``` - * - * Note C++23 also has std::unreachable() which can be detected - * as follows: - * ``` - * #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L) - * # include - * # define XXH_UNREACHABLE() std::unreachable() - * #endif - * ``` - * NB: `__cpp_lib_unreachable` is defined in the `` header. - * We don't use that as including `` in `extern "C"` blocks - * doesn't work on GCC12 - */ - -#if XXH_HAS_BUILTIN(__builtin_unreachable) -# define XXH_UNREACHABLE() __builtin_unreachable() - -#elif defined(_MSC_VER) -# define XXH_UNREACHABLE() __assume(0) - -#else -# define XXH_UNREACHABLE() -#endif - -#if XXH_HAS_BUILTIN(__builtin_assume) -# define XXH_ASSUME(c) __builtin_assume(c) -#else -# define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); } -#endif - -/*! - * @internal - * @def XXH_rotl32(x,r) - * @brief 32-bit rotate left. - * - * @param x The 32-bit integer to be rotated. - * @param r The number of bits to rotate. - * @pre - * @p r > 0 && @p r < 32 - * @note - * @p x and @p r may be evaluated multiple times. - * @return The rotated result. - */ -#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \ - && XXH_HAS_BUILTIN(__builtin_rotateleft64) -# define XXH_rotl32 __builtin_rotateleft32 -# define XXH_rotl64 __builtin_rotateleft64 -/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */ -#elif defined(_MSC_VER) -# define XXH_rotl32(x,r) _rotl(x,r) -# define XXH_rotl64(x,r) _rotl64(x,r) -#else -# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) -# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r)))) -#endif - -/*! - * @internal - * @fn xxh_u32 XXH_swap32(xxh_u32 x) - * @brief A 32-bit byteswap. - * - * @param x The 32-bit integer to byteswap. - * @return @p x, byteswapped. - */ -#if defined(_MSC_VER) /* Visual Studio */ -# define XXH_swap32 _byteswap_ulong -#elif XXH_GCC_VERSION >= 403 -# define XXH_swap32 __builtin_bswap32 -#else -static xxh_u32 XXH_swap32 (xxh_u32 x) -{ - return ((x << 24) & 0xff000000 ) | - ((x << 8) & 0x00ff0000 ) | - ((x >> 8) & 0x0000ff00 ) | - ((x >> 24) & 0x000000ff ); -} -#endif - - -/* *************************** -* Memory reads -*****************************/ - -/*! - * @internal - * @brief Enum to indicate whether a pointer is aligned. - */ -typedef enum { - XXH_aligned, /*!< Aligned */ - XXH_unaligned /*!< Possibly unaligned */ -} XXH_alignment; - -/* - * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. - * - * This is ideal for older compilers which don't inline memcpy. - */ -#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) - -XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr) -{ - const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; - return bytePtr[0] - | ((xxh_u32)bytePtr[1] << 8) - | ((xxh_u32)bytePtr[2] << 16) - | ((xxh_u32)bytePtr[3] << 24); -} - -XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr) -{ - const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; - return bytePtr[3] - | ((xxh_u32)bytePtr[2] << 8) - | ((xxh_u32)bytePtr[1] << 16) - | ((xxh_u32)bytePtr[0] << 24); -} - -#else -XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr) -{ - return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); -} - -static xxh_u32 XXH_readBE32(const void* ptr) -{ - return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); -} -#endif - -XXH_FORCE_INLINE xxh_u32 -XXH_readLE32_align(const void* ptr, XXH_alignment align) -{ - if (align==XXH_unaligned) { - return XXH_readLE32(ptr); - } else { - return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr); - } -} - - -/* ************************************* -* Misc -***************************************/ -/*! @ingroup public */ -XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } - - -/* ******************************************************************* -* 32-bit hash functions -*********************************************************************/ -/*! - * @} - * @defgroup XXH32_impl XXH32 implementation - * @ingroup impl - * - * Details on the XXH32 implementation. - * @{ - */ - /* #define instead of static const, to be used as initializers */ -#define XXH_PRIME32_1 0x9E3779B1U /*!< 0b10011110001101110111100110110001 */ -#define XXH_PRIME32_2 0x85EBCA77U /*!< 0b10000101111010111100101001110111 */ -#define XXH_PRIME32_3 0xC2B2AE3DU /*!< 0b11000010101100101010111000111101 */ -#define XXH_PRIME32_4 0x27D4EB2FU /*!< 0b00100111110101001110101100101111 */ -#define XXH_PRIME32_5 0x165667B1U /*!< 0b00010110010101100110011110110001 */ - -#ifdef XXH_OLD_NAMES -# define PRIME32_1 XXH_PRIME32_1 -# define PRIME32_2 XXH_PRIME32_2 -# define PRIME32_3 XXH_PRIME32_3 -# define PRIME32_4 XXH_PRIME32_4 -# define PRIME32_5 XXH_PRIME32_5 -#endif - -/*! - * @internal - * @brief Normal stripe processing routine. - * - * This shuffles the bits so that any bit from @p input impacts several bits in - * @p acc. - * - * @param acc The accumulator lane. - * @param input The stripe of input to mix. - * @return The mixed accumulator lane. - */ -static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input) -{ - acc += input * XXH_PRIME32_2; - acc = XXH_rotl32(acc, 13); - acc *= XXH_PRIME32_1; -#if (defined(__SSE4_1__) || defined(__aarch64__) || defined(__wasm_simd128__)) && !defined(XXH_ENABLE_AUTOVECTORIZE) - /* - * UGLY HACK: - * A compiler fence is the only thing that prevents GCC and Clang from - * autovectorizing the XXH32 loop (pragmas and attributes don't work for some - * reason) without globally disabling SSE4.1. - * - * The reason we want to avoid vectorization is because despite working on - * 4 integers at a time, there are multiple factors slowing XXH32 down on - * SSE4: - * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on - * newer chips!) making it slightly slower to multiply four integers at - * once compared to four integers independently. Even when pmulld was - * fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE - * just to multiply unless doing a long operation. - * - * - Four instructions are required to rotate, - * movqda tmp, v // not required with VEX encoding - * pslld tmp, 13 // tmp <<= 13 - * psrld v, 19 // x >>= 19 - * por v, tmp // x |= tmp - * compared to one for scalar: - * roll v, 13 // reliably fast across the board - * shldl v, v, 13 // Sandy Bridge and later prefer this for some reason - * - * - Instruction level parallelism is actually more beneficial here because - * the SIMD actually serializes this operation: While v1 is rotating, v2 - * can load data, while v3 can multiply. SSE forces them to operate - * together. - * - * This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing - * the loop. NEON is only faster on the A53, and with the newer cores, it is less - * than half the speed. - * - * Additionally, this is used on WASM SIMD128 because it JITs to the same - * SIMD instructions and has the same issue. - */ - XXH_COMPILER_GUARD(acc); -#endif - return acc; -} - -/*! - * @internal - * @brief Mixes all bits to finalize the hash. - * - * The final mix ensures that all input bits have a chance to impact any bit in - * the output digest, resulting in an unbiased distribution. - * - * @param hash The hash to avalanche. - * @return The avalanched hash. - */ -static xxh_u32 XXH32_avalanche(xxh_u32 hash) -{ - hash ^= hash >> 15; - hash *= XXH_PRIME32_2; - hash ^= hash >> 13; - hash *= XXH_PRIME32_3; - hash ^= hash >> 16; - return hash; -} - -#define XXH_get32bits(p) XXH_readLE32_align(p, align) - -/*! - * @internal - * @brief Processes the last 0-15 bytes of @p ptr. - * - * There may be up to 15 bytes remaining to consume from the input. - * This final stage will digest them to ensure that all input bytes are present - * in the final mix. - * - * @param hash The hash to finalize. - * @param ptr The pointer to the remaining input. - * @param len The remaining length, modulo 16. - * @param align Whether @p ptr is aligned. - * @return The finalized hash. - * @see XXH64_finalize(). - */ -static XXH_PUREF xxh_u32 -XXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) -{ -#define XXH_PROCESS1 do { \ - hash += (*ptr++) * XXH_PRIME32_5; \ - hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \ -} while (0) - -#define XXH_PROCESS4 do { \ - hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \ - ptr += 4; \ - hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \ -} while (0) - - if (ptr==NULL) XXH_ASSERT(len == 0); - - /* Compact rerolled version; generally faster */ - if (!XXH32_ENDJMP) { - len &= 15; - while (len >= 4) { - XXH_PROCESS4; - len -= 4; - } - while (len > 0) { - XXH_PROCESS1; - --len; - } - return XXH32_avalanche(hash); - } else { - switch(len&15) /* or switch(bEnd - p) */ { - case 12: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 8: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 4: XXH_PROCESS4; - return XXH32_avalanche(hash); - - case 13: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 9: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 5: XXH_PROCESS4; - XXH_PROCESS1; - return XXH32_avalanche(hash); - - case 14: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 10: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 6: XXH_PROCESS4; - XXH_PROCESS1; - XXH_PROCESS1; - return XXH32_avalanche(hash); - - case 15: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 11: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 7: XXH_PROCESS4; - XXH_FALLTHROUGH; /* fallthrough */ - case 3: XXH_PROCESS1; - XXH_FALLTHROUGH; /* fallthrough */ - case 2: XXH_PROCESS1; - XXH_FALLTHROUGH; /* fallthrough */ - case 1: XXH_PROCESS1; - XXH_FALLTHROUGH; /* fallthrough */ - case 0: return XXH32_avalanche(hash); - } - XXH_ASSERT(0); - return hash; /* reaching this point is deemed impossible */ - } -} - -#ifdef XXH_OLD_NAMES -# define PROCESS1 XXH_PROCESS1 -# define PROCESS4 XXH_PROCESS4 -#else -# undef XXH_PROCESS1 -# undef XXH_PROCESS4 -#endif - -/*! - * @internal - * @brief The implementation for @ref XXH32(). - * - * @param input , len , seed Directly passed from @ref XXH32(). - * @param align Whether @p input is aligned. - * @return The calculated hash. - */ -XXH_FORCE_INLINE XXH_PUREF xxh_u32 -XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align) -{ - xxh_u32 h32; - - if (input==NULL) XXH_ASSERT(len == 0); - - if (len>=16) { - const xxh_u8* const bEnd = input + len; - const xxh_u8* const limit = bEnd - 15; - xxh_u32 v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2; - xxh_u32 v2 = seed + XXH_PRIME32_2; - xxh_u32 v3 = seed + 0; - xxh_u32 v4 = seed - XXH_PRIME32_1; - - do { - v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; - v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4; - v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4; - v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4; - } while (input < limit); - - h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) - + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); - } else { - h32 = seed + XXH_PRIME32_5; - } - - h32 += (xxh_u32)len; - - return XXH32_finalize(h32, input, len&15, align); -} - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed) -{ -#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2 - /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ - XXH32_state_t state; - XXH32_reset(&state, seed); - XXH32_update(&state, (const xxh_u8*)input, len); - return XXH32_digest(&state); -#else - if (XXH_FORCE_ALIGN_CHECK) { - if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ - return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); - } } - - return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); -#endif -} - - - -/******* Hash streaming *******/ -#ifndef XXH_NO_STREAM -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) -{ - return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); -} -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) -{ - XXH_free(statePtr); - return XXH_OK; -} - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) -{ - XXH_memcpy(dstState, srcState, sizeof(*dstState)); -} - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed) -{ - XXH_ASSERT(statePtr != NULL); - memset(statePtr, 0, sizeof(*statePtr)); - statePtr->v[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2; - statePtr->v[1] = seed + XXH_PRIME32_2; - statePtr->v[2] = seed + 0; - statePtr->v[3] = seed - XXH_PRIME32_1; - return XXH_OK; -} - - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH_errorcode -XXH32_update(XXH32_state_t* state, const void* input, size_t len) -{ - if (input==NULL) { - XXH_ASSERT(len == 0); - return XXH_OK; - } - - { const xxh_u8* p = (const xxh_u8*)input; - const xxh_u8* const bEnd = p + len; - - state->total_len_32 += (XXH32_hash_t)len; - state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16)); - - if (state->memsize + len < 16) { /* fill in tmp buffer */ - XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len); - state->memsize += (XXH32_hash_t)len; - return XXH_OK; - } - - if (state->memsize) { /* some data left from previous update */ - XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize); - { const xxh_u32* p32 = state->mem32; - state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p32)); p32++; - state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p32)); p32++; - state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p32)); p32++; - state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p32)); - } - p += 16-state->memsize; - state->memsize = 0; - } - - if (p <= bEnd-16) { - const xxh_u8* const limit = bEnd - 16; - - do { - state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p)); p+=4; - state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p)); p+=4; - state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p)); p+=4; - state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p)); p+=4; - } while (p<=limit); - - } - - if (p < bEnd) { - XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); - state->memsize = (unsigned)(bEnd-p); - } - } - - return XXH_OK; -} - - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state) -{ - xxh_u32 h32; - - if (state->large_len) { - h32 = XXH_rotl32(state->v[0], 1) - + XXH_rotl32(state->v[1], 7) - + XXH_rotl32(state->v[2], 12) - + XXH_rotl32(state->v[3], 18); - } else { - h32 = state->v[2] /* == seed */ + XXH_PRIME32_5; - } - - h32 += state->total_len_32; - - return XXH32_finalize(h32, (const xxh_u8*)state->mem32, state->memsize, XXH_aligned); -} -#endif /* !XXH_NO_STREAM */ - -/******* Canonical representation *******/ - -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) -{ - XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); - if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); - XXH_memcpy(dst, &hash, sizeof(*dst)); -} -/*! @ingroup XXH32_family */ -XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) -{ - return XXH_readBE32(src); -} - - -#ifndef XXH_NO_LONG_LONG - -/* ******************************************************************* -* 64-bit hash functions -*********************************************************************/ -/*! - * @} - * @ingroup impl - * @{ - */ -/******* Memory access *******/ - -typedef XXH64_hash_t xxh_u64; - -#ifdef XXH_OLD_NAMES -# define U64 xxh_u64 -#endif - -#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) -/* - * Manual byteshift. Best for old compilers which don't inline memcpy. - * We actually directly use XXH_readLE64 and XXH_readBE64. - */ -#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) - -/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ -static xxh_u64 XXH_read64(const void* memPtr) -{ - return *(const xxh_u64*) memPtr; -} - -#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) - -/* - * __attribute__((aligned(1))) is supported by gcc and clang. Originally the - * documentation claimed that it only increased the alignment, but actually it - * can decrease it on gcc, clang, and icc: - * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502, - * https://gcc.godbolt.org/z/xYez1j67Y. - */ -#ifdef XXH_OLD_NAMES -typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unalign64; -#endif -static xxh_u64 XXH_read64(const void* ptr) -{ - typedef __attribute__((aligned(1))) xxh_u64 xxh_unalign64; - return *((const xxh_unalign64*)ptr); -} - -#else - -/* - * Portable and safe solution. Generally efficient. - * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html - */ -static xxh_u64 XXH_read64(const void* memPtr) -{ - xxh_u64 val; - XXH_memcpy(&val, memPtr, sizeof(val)); - return val; -} - -#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ - -#if defined(_MSC_VER) /* Visual Studio */ -# define XXH_swap64 _byteswap_uint64 -#elif XXH_GCC_VERSION >= 403 -# define XXH_swap64 __builtin_bswap64 -#else -static xxh_u64 XXH_swap64(xxh_u64 x) -{ - return ((x << 56) & 0xff00000000000000ULL) | - ((x << 40) & 0x00ff000000000000ULL) | - ((x << 24) & 0x0000ff0000000000ULL) | - ((x << 8) & 0x000000ff00000000ULL) | - ((x >> 8) & 0x00000000ff000000ULL) | - ((x >> 24) & 0x0000000000ff0000ULL) | - ((x >> 40) & 0x000000000000ff00ULL) | - ((x >> 56) & 0x00000000000000ffULL); -} -#endif - - -/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */ -#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) - -XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr) -{ - const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; - return bytePtr[0] - | ((xxh_u64)bytePtr[1] << 8) - | ((xxh_u64)bytePtr[2] << 16) - | ((xxh_u64)bytePtr[3] << 24) - | ((xxh_u64)bytePtr[4] << 32) - | ((xxh_u64)bytePtr[5] << 40) - | ((xxh_u64)bytePtr[6] << 48) - | ((xxh_u64)bytePtr[7] << 56); -} - -XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr) -{ - const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; - return bytePtr[7] - | ((xxh_u64)bytePtr[6] << 8) - | ((xxh_u64)bytePtr[5] << 16) - | ((xxh_u64)bytePtr[4] << 24) - | ((xxh_u64)bytePtr[3] << 32) - | ((xxh_u64)bytePtr[2] << 40) - | ((xxh_u64)bytePtr[1] << 48) - | ((xxh_u64)bytePtr[0] << 56); -} - -#else -XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr) -{ - return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); -} - -static xxh_u64 XXH_readBE64(const void* ptr) -{ - return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); -} -#endif - -XXH_FORCE_INLINE xxh_u64 -XXH_readLE64_align(const void* ptr, XXH_alignment align) -{ - if (align==XXH_unaligned) - return XXH_readLE64(ptr); - else - return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr); -} - - -/******* xxh64 *******/ -/*! - * @} - * @defgroup XXH64_impl XXH64 implementation - * @ingroup impl - * - * Details on the XXH64 implementation. - * @{ - */ -/* #define rather that static const, to be used as initializers */ -#define XXH_PRIME64_1 0x9E3779B185EBCA87ULL /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */ -#define XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */ -#define XXH_PRIME64_3 0x165667B19E3779F9ULL /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */ -#define XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */ -#define XXH_PRIME64_5 0x27D4EB2F165667C5ULL /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */ - -#ifdef XXH_OLD_NAMES -# define PRIME64_1 XXH_PRIME64_1 -# define PRIME64_2 XXH_PRIME64_2 -# define PRIME64_3 XXH_PRIME64_3 -# define PRIME64_4 XXH_PRIME64_4 -# define PRIME64_5 XXH_PRIME64_5 -#endif - -/*! @copydoc XXH32_round */ -static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input) -{ - acc += input * XXH_PRIME64_2; - acc = XXH_rotl64(acc, 31); - acc *= XXH_PRIME64_1; -#if (defined(__AVX512F__)) && !defined(XXH_ENABLE_AUTOVECTORIZE) - /* - * DISABLE AUTOVECTORIZATION: - * A compiler fence is used to prevent GCC and Clang from - * autovectorizing the XXH64 loop (pragmas and attributes don't work for some - * reason) without globally disabling AVX512. - * - * Autovectorization of XXH64 tends to be detrimental, - * though the exact outcome may change depending on exact cpu and compiler version. - * For information, it has been reported as detrimental for Skylake-X, - * but possibly beneficial for Zen4. - * - * The default is to disable auto-vectorization, - * but you can select to enable it instead using `XXH_ENABLE_AUTOVECTORIZE` build variable. - */ - XXH_COMPILER_GUARD(acc); -#endif - return acc; -} - -static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val) -{ - val = XXH64_round(0, val); - acc ^= val; - acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4; - return acc; -} - -/*! @copydoc XXH32_avalanche */ -static xxh_u64 XXH64_avalanche(xxh_u64 hash) -{ - hash ^= hash >> 33; - hash *= XXH_PRIME64_2; - hash ^= hash >> 29; - hash *= XXH_PRIME64_3; - hash ^= hash >> 32; - return hash; -} - - -#define XXH_get64bits(p) XXH_readLE64_align(p, align) - -/*! - * @internal - * @brief Processes the last 0-31 bytes of @p ptr. - * - * There may be up to 31 bytes remaining to consume from the input. - * This final stage will digest them to ensure that all input bytes are present - * in the final mix. - * - * @param hash The hash to finalize. - * @param ptr The pointer to the remaining input. - * @param len The remaining length, modulo 32. - * @param align Whether @p ptr is aligned. - * @return The finalized hash - * @see XXH32_finalize(). - */ -static XXH_PUREF xxh_u64 -XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) -{ - if (ptr==NULL) XXH_ASSERT(len == 0); - len &= 31; - while (len >= 8) { - xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); - ptr += 8; - hash ^= k1; - hash = XXH_rotl64(hash,27) * XXH_PRIME64_1 + XXH_PRIME64_4; - len -= 8; - } - if (len >= 4) { - hash ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1; - ptr += 4; - hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3; - len -= 4; - } - while (len > 0) { - hash ^= (*ptr++) * XXH_PRIME64_5; - hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1; - --len; - } - return XXH64_avalanche(hash); -} - -#ifdef XXH_OLD_NAMES -# define PROCESS1_64 XXH_PROCESS1_64 -# define PROCESS4_64 XXH_PROCESS4_64 -# define PROCESS8_64 XXH_PROCESS8_64 -#else -# undef XXH_PROCESS1_64 -# undef XXH_PROCESS4_64 -# undef XXH_PROCESS8_64 -#endif - -/*! - * @internal - * @brief The implementation for @ref XXH64(). - * - * @param input , len , seed Directly passed from @ref XXH64(). - * @param align Whether @p input is aligned. - * @return The calculated hash. - */ -XXH_FORCE_INLINE XXH_PUREF xxh_u64 -XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align) -{ - xxh_u64 h64; - if (input==NULL) XXH_ASSERT(len == 0); - - if (len>=32) { - const xxh_u8* const bEnd = input + len; - const xxh_u8* const limit = bEnd - 31; - xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2; - xxh_u64 v2 = seed + XXH_PRIME64_2; - xxh_u64 v3 = seed + 0; - xxh_u64 v4 = seed - XXH_PRIME64_1; - - do { - v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8; - v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8; - v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8; - v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8; - } while (input= 2 - /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ - XXH64_state_t state; - XXH64_reset(&state, seed); - XXH64_update(&state, (const xxh_u8*)input, len); - return XXH64_digest(&state); -#else - if (XXH_FORCE_ALIGN_CHECK) { - if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */ - return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); - } } - - return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); - -#endif -} - -/******* Hash Streaming *******/ -#ifndef XXH_NO_STREAM -/*! @ingroup XXH64_family*/ -XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) -{ - return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); -} -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) -{ - XXH_free(statePtr); - return XXH_OK; -} - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState) -{ - XXH_memcpy(dstState, srcState, sizeof(*dstState)); -} - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed) -{ - XXH_ASSERT(statePtr != NULL); - memset(statePtr, 0, sizeof(*statePtr)); - statePtr->v[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2; - statePtr->v[1] = seed + XXH_PRIME64_2; - statePtr->v[2] = seed + 0; - statePtr->v[3] = seed - XXH_PRIME64_1; - return XXH_OK; -} - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API XXH_errorcode -XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len) -{ - if (input==NULL) { - XXH_ASSERT(len == 0); - return XXH_OK; - } - - { const xxh_u8* p = (const xxh_u8*)input; - const xxh_u8* const bEnd = p + len; - - state->total_len += len; - - if (state->memsize + len < 32) { /* fill in tmp buffer */ - XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len); - state->memsize += (xxh_u32)len; - return XXH_OK; - } - - if (state->memsize) { /* tmp buffer is full */ - XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize); - state->v[0] = XXH64_round(state->v[0], XXH_readLE64(state->mem64+0)); - state->v[1] = XXH64_round(state->v[1], XXH_readLE64(state->mem64+1)); - state->v[2] = XXH64_round(state->v[2], XXH_readLE64(state->mem64+2)); - state->v[3] = XXH64_round(state->v[3], XXH_readLE64(state->mem64+3)); - p += 32 - state->memsize; - state->memsize = 0; - } - - if (p+32 <= bEnd) { - const xxh_u8* const limit = bEnd - 32; - - do { - state->v[0] = XXH64_round(state->v[0], XXH_readLE64(p)); p+=8; - state->v[1] = XXH64_round(state->v[1], XXH_readLE64(p)); p+=8; - state->v[2] = XXH64_round(state->v[2], XXH_readLE64(p)); p+=8; - state->v[3] = XXH64_round(state->v[3], XXH_readLE64(p)); p+=8; - } while (p<=limit); - - } - - if (p < bEnd) { - XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); - state->memsize = (unsigned)(bEnd-p); - } - } - - return XXH_OK; -} - - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state) -{ - xxh_u64 h64; - - if (state->total_len >= 32) { - h64 = XXH_rotl64(state->v[0], 1) + XXH_rotl64(state->v[1], 7) + XXH_rotl64(state->v[2], 12) + XXH_rotl64(state->v[3], 18); - h64 = XXH64_mergeRound(h64, state->v[0]); - h64 = XXH64_mergeRound(h64, state->v[1]); - h64 = XXH64_mergeRound(h64, state->v[2]); - h64 = XXH64_mergeRound(h64, state->v[3]); - } else { - h64 = state->v[2] /*seed*/ + XXH_PRIME64_5; - } - - h64 += (xxh_u64) state->total_len; - - return XXH64_finalize(h64, (const xxh_u8*)state->mem64, (size_t)state->total_len, XXH_aligned); -} -#endif /* !XXH_NO_STREAM */ - -/******* Canonical representation *******/ - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash) -{ - XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); - if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); - XXH_memcpy(dst, &hash, sizeof(*dst)); -} - -/*! @ingroup XXH64_family */ -XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src) -{ - return XXH_readBE64(src); -} - -#if defined (__cplusplus) -} -#endif - -#ifndef XXH_NO_XXH3 - -/* ********************************************************************* -* XXH3 -* New generation hash designed for speed on small keys and vectorization -************************************************************************ */ -/*! - * @} - * @defgroup XXH3_impl XXH3 implementation - * @ingroup impl - * @{ - */ - -/* === Compiler specifics === */ - -#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */ -# define XXH_RESTRICT /* disable */ -#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */ -# define XXH_RESTRICT restrict -#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \ - || (defined (__clang__)) \ - || (defined (_MSC_VER) && (_MSC_VER >= 1400)) \ - || (defined (__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)) -/* - * There are a LOT more compilers that recognize __restrict but this - * covers the major ones. - */ -# define XXH_RESTRICT __restrict -#else -# define XXH_RESTRICT /* disable */ -#endif - -#if (defined(__GNUC__) && (__GNUC__ >= 3)) \ - || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \ - || defined(__clang__) -# define XXH_likely(x) __builtin_expect(x, 1) -# define XXH_unlikely(x) __builtin_expect(x, 0) -#else -# define XXH_likely(x) (x) -# define XXH_unlikely(x) (x) -#endif - -#ifndef XXH_HAS_INCLUDE -# ifdef __has_include -/* - * Not defined as XXH_HAS_INCLUDE(x) (function-like) because - * this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion) - */ -# define XXH_HAS_INCLUDE __has_include -# else -# define XXH_HAS_INCLUDE(x) 0 -# endif -#endif - -#if defined(__GNUC__) || defined(__clang__) -# if defined(__ARM_FEATURE_SVE) -# include -# endif -# if defined(__ARM_NEON__) || defined(__ARM_NEON) \ - || (defined(_M_ARM) && _M_ARM >= 7) \ - || defined(_M_ARM64) || defined(_M_ARM64EC) \ - || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE()) /* WASM SIMD128 via SIMDe */ -# define inline __inline__ /* circumvent a clang bug */ -# include -# undef inline -# elif defined(__AVX2__) -# include -# elif defined(__SSE2__) -# include -# endif -#endif - -#if defined(_MSC_VER) -# include -#endif - -/* - * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while - * remaining a true 64-bit/128-bit hash function. - * - * This is done by prioritizing a subset of 64-bit operations that can be - * emulated without too many steps on the average 32-bit machine. - * - * For example, these two lines seem similar, and run equally fast on 64-bit: - * - * xxh_u64 x; - * x ^= (x >> 47); // good - * x ^= (x >> 13); // bad - * - * However, to a 32-bit machine, there is a major difference. - * - * x ^= (x >> 47) looks like this: - * - * x.lo ^= (x.hi >> (47 - 32)); - * - * while x ^= (x >> 13) looks like this: - * - * // note: funnel shifts are not usually cheap. - * x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13)); - * x.hi ^= (x.hi >> 13); - * - * The first one is significantly faster than the second, simply because the - * shift is larger than 32. This means: - * - All the bits we need are in the upper 32 bits, so we can ignore the lower - * 32 bits in the shift. - * - The shift result will always fit in the lower 32 bits, and therefore, - * we can ignore the upper 32 bits in the xor. - * - * Thanks to this optimization, XXH3 only requires these features to be efficient: - * - * - Usable unaligned access - * - A 32-bit or 64-bit ALU - * - If 32-bit, a decent ADC instruction - * - A 32 or 64-bit multiply with a 64-bit result - * - For the 128-bit variant, a decent byteswap helps short inputs. - * - * The first two are already required by XXH32, and almost all 32-bit and 64-bit - * platforms which can run XXH32 can run XXH3 efficiently. - * - * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one - * notable exception. - * - * First of all, Thumb-1 lacks support for the UMULL instruction which - * performs the important long multiply. This means numerous __aeabi_lmul - * calls. - * - * Second of all, the 8 functional registers are just not enough. - * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need - * Lo registers, and this shuffling results in thousands more MOVs than A32. - * - * A32 and T32 don't have this limitation. They can access all 14 registers, - * do a 32->64 multiply with UMULL, and the flexible operand allowing free - * shifts is helpful, too. - * - * Therefore, we do a quick sanity check. - * - * If compiling Thumb-1 for a target which supports ARM instructions, we will - * emit a warning, as it is not a "sane" platform to compile for. - * - * Usually, if this happens, it is because of an accident and you probably need - * to specify -march, as you likely meant to compile for a newer architecture. - * - * Credit: large sections of the vectorial and asm source code paths - * have been contributed by @easyaspi314 - */ -#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM) -# warning "XXH3 is highly inefficient without ARM or Thumb-2." -#endif - -/* ========================================== - * Vectorization detection - * ========================================== */ - -#ifdef XXH_DOXYGEN -/*! - * @ingroup tuning - * @brief Overrides the vectorization implementation chosen for XXH3. - * - * Can be defined to 0 to disable SIMD or any of the values mentioned in - * @ref XXH_VECTOR_TYPE. - * - * If this is not defined, it uses predefined macros to determine the best - * implementation. - */ -# define XXH_VECTOR XXH_SCALAR -/*! - * @ingroup tuning - * @brief Possible values for @ref XXH_VECTOR. - * - * Note that these are actually implemented as macros. - * - * If this is not defined, it is detected automatically. - * internal macro XXH_X86DISPATCH overrides this. - */ -enum XXH_VECTOR_TYPE /* fake enum */ { - XXH_SCALAR = 0, /*!< Portable scalar version */ - XXH_SSE2 = 1, /*!< - * SSE2 for Pentium 4, Opteron, all x86_64. - * - * @note SSE2 is also guaranteed on Windows 10, macOS, and - * Android x86. - */ - XXH_AVX2 = 2, /*!< AVX2 for Haswell and Bulldozer */ - XXH_AVX512 = 3, /*!< AVX512 for Skylake and Icelake */ - XXH_NEON = 4, /*!< - * NEON for most ARMv7-A, all AArch64, and WASM SIMD128 - * via the SIMDeverywhere polyfill provided with the - * Emscripten SDK. - */ - XXH_VSX = 5, /*!< VSX and ZVector for POWER8/z13 (64-bit) */ - XXH_SVE = 6, /*!< SVE for some ARMv8-A and ARMv9-A */ -}; -/*! - * @ingroup tuning - * @brief Selects the minimum alignment for XXH3's accumulators. - * - * When using SIMD, this should match the alignment required for said vector - * type, so, for example, 32 for AVX2. - * - * Default: Auto detected. - */ -# define XXH_ACC_ALIGN 8 -#endif - -/* Actual definition */ -#ifndef XXH_DOXYGEN -# define XXH_SCALAR 0 -# define XXH_SSE2 1 -# define XXH_AVX2 2 -# define XXH_AVX512 3 -# define XXH_NEON 4 -# define XXH_VSX 5 -# define XXH_SVE 6 -#endif - -#ifndef XXH_VECTOR /* can be defined on command line */ -# if defined(__ARM_FEATURE_SVE) -# define XXH_VECTOR XXH_SVE -# elif ( \ - defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \ - || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \ - || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE()) /* wasm simd128 via SIMDe */ \ - ) && ( \ - defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \ - || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \ - ) -# define XXH_VECTOR XXH_NEON -# elif defined(__AVX512F__) -# define XXH_VECTOR XXH_AVX512 -# elif defined(__AVX2__) -# define XXH_VECTOR XXH_AVX2 -# elif defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) -# define XXH_VECTOR XXH_SSE2 -# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \ - || (defined(__s390x__) && defined(__VEC__)) \ - && defined(__GNUC__) /* TODO: IBM XL */ -# define XXH_VECTOR XXH_VSX -# else -# define XXH_VECTOR XXH_SCALAR -# endif -#endif - -/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */ -#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE) -# ifdef _MSC_VER -# pragma warning(once : 4606) -# else -# warning "__ARM_FEATURE_SVE isn't supported. Use SCALAR instead." -# endif -# undef XXH_VECTOR -# define XXH_VECTOR XXH_SCALAR -#endif - -/* - * Controls the alignment of the accumulator, - * for compatibility with aligned vector loads, which are usually faster. - */ -#ifndef XXH_ACC_ALIGN -# if defined(XXH_X86DISPATCH) -# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */ -# elif XXH_VECTOR == XXH_SCALAR /* scalar */ -# define XXH_ACC_ALIGN 8 -# elif XXH_VECTOR == XXH_SSE2 /* sse2 */ -# define XXH_ACC_ALIGN 16 -# elif XXH_VECTOR == XXH_AVX2 /* avx2 */ -# define XXH_ACC_ALIGN 32 -# elif XXH_VECTOR == XXH_NEON /* neon */ -# define XXH_ACC_ALIGN 16 -# elif XXH_VECTOR == XXH_VSX /* vsx */ -# define XXH_ACC_ALIGN 16 -# elif XXH_VECTOR == XXH_AVX512 /* avx512 */ -# define XXH_ACC_ALIGN 64 -# elif XXH_VECTOR == XXH_SVE /* sve */ -# define XXH_ACC_ALIGN 64 -# endif -#endif - -#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \ - || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512 -# define XXH_SEC_ALIGN XXH_ACC_ALIGN -#elif XXH_VECTOR == XXH_SVE -# define XXH_SEC_ALIGN XXH_ACC_ALIGN -#else -# define XXH_SEC_ALIGN 8 -#endif - -#if defined(__GNUC__) || defined(__clang__) -# define XXH_ALIASING __attribute__((may_alias)) -#else -# define XXH_ALIASING /* nothing */ -#endif - -/* - * UGLY HACK: - * GCC usually generates the best code with -O3 for xxHash. - * - * However, when targeting AVX2, it is overzealous in its unrolling resulting - * in code roughly 3/4 the speed of Clang. - * - * There are other issues, such as GCC splitting _mm256_loadu_si256 into - * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which - * only applies to Sandy and Ivy Bridge... which don't even support AVX2. - * - * That is why when compiling the AVX2 version, it is recommended to use either - * -O2 -mavx2 -march=haswell - * or - * -O2 -mavx2 -mno-avx256-split-unaligned-load - * for decent performance, or to use Clang instead. - * - * Fortunately, we can control the first one with a pragma that forces GCC into - * -O2, but the other one we can't control without "failed to inline always - * inline function due to target mismatch" warnings. - */ -#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \ - && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ - && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */ -# pragma GCC push_options -# pragma GCC optimize("-O2") -#endif - -#if defined (__cplusplus) -extern "C" { -#endif - -#if XXH_VECTOR == XXH_NEON - -/* - * UGLY HACK: While AArch64 GCC on Linux does not seem to care, on macOS, GCC -O3 - * optimizes out the entire hashLong loop because of the aliasing violation. - * - * However, GCC is also inefficient at load-store optimization with vld1q/vst1q, - * so the only option is to mark it as aliasing. - */ -typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING; - -/*! - * @internal - * @brief `vld1q_u64` but faster and alignment-safe. - * - * On AArch64, unaligned access is always safe, but on ARMv7-a, it is only - * *conditionally* safe (`vld1` has an alignment bit like `movdq[ua]` in x86). - * - * GCC for AArch64 sees `vld1q_u8` as an intrinsic instead of a load, so it - * prohibits load-store optimizations. Therefore, a direct dereference is used. - * - * Otherwise, `vld1q_u8` is used with `vreinterpretq_u8_u64` to do a safe - * unaligned load. - */ -#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) -XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -Wcast-align */ -{ - return *(xxh_aliasing_uint64x2_t const *)ptr; -} -#else -XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) -{ - return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr)); -} -#endif - -/*! - * @internal - * @brief `vmlal_u32` on low and high halves of a vector. - * - * This is a workaround for AArch64 GCC < 11 which implemented arm_neon.h with - * inline assembly and were therefore incapable of merging the `vget_{low, high}_u32` - * with `vmlal_u32`. - */ -#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11 -XXH_FORCE_INLINE uint64x2_t -XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) -{ - /* Inline assembly is the only way */ - __asm__("umlal %0.2d, %1.2s, %2.2s" : "+w" (acc) : "w" (lhs), "w" (rhs)); - return acc; -} -XXH_FORCE_INLINE uint64x2_t -XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) -{ - /* This intrinsic works as expected */ - return vmlal_high_u32(acc, lhs, rhs); -} -#else -/* Portable intrinsic versions */ -XXH_FORCE_INLINE uint64x2_t -XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) -{ - return vmlal_u32(acc, vget_low_u32(lhs), vget_low_u32(rhs)); -} -/*! @copydoc XXH_vmlal_low_u32 - * Assume the compiler converts this to vmlal_high_u32 on aarch64 */ -XXH_FORCE_INLINE uint64x2_t -XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) -{ - return vmlal_u32(acc, vget_high_u32(lhs), vget_high_u32(rhs)); -} -#endif - -/*! - * @ingroup tuning - * @brief Controls the NEON to scalar ratio for XXH3 - * - * This can be set to 2, 4, 6, or 8. - * - * ARM Cortex CPUs are _very_ sensitive to how their pipelines are used. - * - * For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those - * can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU - * bandwidth. - * - * This is even more noticeable on the more advanced cores like the Cortex-A76 which - * can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once. - * - * Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes - * and 2 scalar lanes, which is chosen by default. - * - * This does not apply to Apple processors or 32-bit processors, which run better with - * full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes. - * - * This change benefits CPUs with large micro-op buffers without negatively affecting - * most other CPUs: - * - * | Chipset | Dispatch type | NEON only | 6:2 hybrid | Diff. | - * |:----------------------|:--------------------|----------:|-----------:|------:| - * | Snapdragon 730 (A76) | 2 NEON/8 micro-ops | 8.8 GB/s | 10.1 GB/s | ~16% | - * | Snapdragon 835 (A73) | 2 NEON/3 micro-ops | 5.1 GB/s | 5.3 GB/s | ~5% | - * | Marvell PXA1928 (A53) | In-order dual-issue | 1.9 GB/s | 1.9 GB/s | 0% | - * | Apple M1 | 4 NEON/8 micro-ops | 37.3 GB/s | 36.1 GB/s | ~-3% | - * - * It also seems to fix some bad codegen on GCC, making it almost as fast as clang. - * - * When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning - * it effectively becomes worse 4. - * - * @see XXH3_accumulate_512_neon() - */ -# ifndef XXH3_NEON_LANES -# if (defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) \ - && !defined(__APPLE__) && XXH_SIZE_OPT <= 0 -# define XXH3_NEON_LANES 6 -# else -# define XXH3_NEON_LANES XXH_ACC_NB -# endif -# endif -#endif /* XXH_VECTOR == XXH_NEON */ - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -/* - * VSX and Z Vector helpers. - * - * This is very messy, and any pull requests to clean this up are welcome. - * - * There are a lot of problems with supporting VSX and s390x, due to - * inconsistent intrinsics, spotty coverage, and multiple endiannesses. - */ -#if XXH_VECTOR == XXH_VSX -/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`, - * and `pixel`. This is a problem for obvious reasons. - * - * These keywords are unnecessary; the spec literally says they are - * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd - * after including the header. - * - * We use pragma push_macro/pop_macro to keep the namespace clean. */ -# pragma push_macro("bool") -# pragma push_macro("vector") -# pragma push_macro("pixel") -/* silence potential macro redefined warnings */ -# undef bool -# undef vector -# undef pixel - -# if defined(__s390x__) -# include -# else -# include -# endif - -/* Restore the original macro values, if applicable. */ -# pragma pop_macro("pixel") -# pragma pop_macro("vector") -# pragma pop_macro("bool") - -typedef __vector unsigned long long xxh_u64x2; -typedef __vector unsigned char xxh_u8x16; -typedef __vector unsigned xxh_u32x4; - -/* - * UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue. - */ -typedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING; - -# ifndef XXH_VSX_BE -# if defined(__BIG_ENDIAN__) \ - || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) -# define XXH_VSX_BE 1 -# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__ -# warning "-maltivec=be is not recommended. Please use native endianness." -# define XXH_VSX_BE 1 -# else -# define XXH_VSX_BE 0 -# endif -# endif /* !defined(XXH_VSX_BE) */ - -# if XXH_VSX_BE -# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__)) -# define XXH_vec_revb vec_revb -# else -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * A polyfill for POWER9's vec_revb(). - */ -XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val) -{ - xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, - 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 }; - return vec_perm(val, val, vByteSwap); -} -#if defined (__cplusplus) -} /* extern "C" */ -#endif -# endif -# endif /* XXH_VSX_BE */ - -#if defined (__cplusplus) -extern "C" { -#endif -/*! - * Performs an unaligned vector load and byte swaps it on big endian. - */ -XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr) -{ - xxh_u64x2 ret; - XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2)); -# if XXH_VSX_BE - ret = XXH_vec_revb(ret); -# endif - return ret; -} - -/* - * vec_mulo and vec_mule are very problematic intrinsics on PowerPC - * - * These intrinsics weren't added until GCC 8, despite existing for a while, - * and they are endian dependent. Also, their meaning swap depending on version. - * */ -# if defined(__s390x__) - /* s390x is always big endian, no issue on this platform */ -# define XXH_vec_mulo vec_mulo -# define XXH_vec_mule vec_mule -# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) && !defined(__ibmxl__) -/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */ - /* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */ -# define XXH_vec_mulo __builtin_altivec_vmulouw -# define XXH_vec_mule __builtin_altivec_vmuleuw -# else -/* gcc needs inline assembly */ -/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */ -XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b) -{ - xxh_u64x2 result; - __asm__("vmulouw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); - return result; -} -XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b) -{ - xxh_u64x2 result; - __asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); - return result; -} -# endif /* XXH_vec_mulo, XXH_vec_mule */ - -#if defined (__cplusplus) -} /* extern "C" */ -#endif - -#endif /* XXH_VECTOR == XXH_VSX */ - -#if XXH_VECTOR == XXH_SVE -#define ACCRND(acc, offset) \ -do { \ - svuint64_t input_vec = svld1_u64(mask, xinput + offset); \ - svuint64_t secret_vec = svld1_u64(mask, xsecret + offset); \ - svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec); \ - svuint64_t swapped = svtbl_u64(input_vec, kSwap); \ - svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \ - svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \ - svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \ - acc = svadd_u64_x(mask, acc, mul); \ -} while (0) -#endif /* XXH_VECTOR == XXH_SVE */ - -/* prefetch - * can be disabled, by declaring XXH_NO_PREFETCH build macro */ -#if defined(XXH_NO_PREFETCH) -# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ -#else -# if XXH_SIZE_OPT >= 1 -# define XXH_PREFETCH(ptr) (void)(ptr) -# elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */ -# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ -# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) -# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) -# define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) -# else -# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ -# endif -#endif /* XXH_NO_PREFETCH */ - -#if defined (__cplusplus) -extern "C" { -#endif -/* ========================================== - * XXH3 default settings - * ========================================== */ - -#define XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */ - -#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN) -# error "default keyset is not large enough" -#endif - -/*! Pseudorandom secret taken directly from FARSH. */ -XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = { - 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c, - 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, - 0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21, - 0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c, - 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3, - 0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8, - 0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d, - 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64, - 0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb, - 0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e, - 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce, - 0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e, -}; - -static const xxh_u64 PRIME_MX1 = 0x165667919E3779F9ULL; /*!< 0b0001011001010110011001111001000110011110001101110111100111111001 */ -static const xxh_u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL; /*!< 0b1001111110110010000111000110010100011110100110001101111100100101 */ - -#ifdef XXH_OLD_NAMES -# define kSecret XXH3_kSecret -#endif - -#ifdef XXH_DOXYGEN -/*! - * @brief Calculates a 32-bit to 64-bit long multiply. - * - * Implemented as a macro. - * - * Wraps `__emulu` on MSVC x86 because it tends to call `__allmul` when it doesn't - * need to (but it shouldn't need to anyways, it is about 7 instructions to do - * a 64x64 multiply...). Since we know that this will _always_ emit `MULL`, we - * use that instead of the normal method. - * - * If you are compiling for platforms like Thumb-1 and don't have a better option, - * you may also want to write your own long multiply routine here. - * - * @param x, y Numbers to be multiplied - * @return 64-bit product of the low 32 bits of @p x and @p y. - */ -XXH_FORCE_INLINE xxh_u64 -XXH_mult32to64(xxh_u64 x, xxh_u64 y) -{ - return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF); -} -#elif defined(_MSC_VER) && defined(_M_IX86) -# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y)) -#else -/* - * Downcast + upcast is usually better than masking on older compilers like - * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers. - * - * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands - * and perform a full 64x64 multiply -- entirely redundant on 32-bit. - */ -# define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y)) -#endif - -/*! - * @brief Calculates a 64->128-bit long multiply. - * - * Uses `__uint128_t` and `_umul128` if available, otherwise uses a scalar - * version. - * - * @param lhs , rhs The 64-bit integers to be multiplied - * @return The 128-bit result represented in an @ref XXH128_hash_t. - */ -static XXH128_hash_t -XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs) -{ - /* - * GCC/Clang __uint128_t method. - * - * On most 64-bit targets, GCC and Clang define a __uint128_t type. - * This is usually the best way as it usually uses a native long 64-bit - * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64. - * - * Usually. - * - * Despite being a 32-bit platform, Clang (and emscripten) define this type - * despite not having the arithmetic for it. This results in a laggy - * compiler builtin call which calculates a full 128-bit multiply. - * In that case it is best to use the portable one. - * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677 - */ -#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \ - && defined(__SIZEOF_INT128__) \ - || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128) - - __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs; - XXH128_hash_t r128; - r128.low64 = (xxh_u64)(product); - r128.high64 = (xxh_u64)(product >> 64); - return r128; - - /* - * MSVC for x64's _umul128 method. - * - * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct); - * - * This compiles to single operand MUL on x64. - */ -#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC) - -#ifndef _MSC_VER -# pragma intrinsic(_umul128) -#endif - xxh_u64 product_high; - xxh_u64 const product_low = _umul128(lhs, rhs, &product_high); - XXH128_hash_t r128; - r128.low64 = product_low; - r128.high64 = product_high; - return r128; - - /* - * MSVC for ARM64's __umulh method. - * - * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method. - */ -#elif defined(_M_ARM64) || defined(_M_ARM64EC) - -#ifndef _MSC_VER -# pragma intrinsic(__umulh) -#endif - XXH128_hash_t r128; - r128.low64 = lhs * rhs; - r128.high64 = __umulh(lhs, rhs); - return r128; - -#else - /* - * Portable scalar method. Optimized for 32-bit and 64-bit ALUs. - * - * This is a fast and simple grade school multiply, which is shown below - * with base 10 arithmetic instead of base 0x100000000. - * - * 9 3 // D2 lhs = 93 - * x 7 5 // D2 rhs = 75 - * ---------- - * 1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15 - * 4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45 - * 2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21 - * + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63 - * --------- - * 2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27 - * + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67 - * --------- - * 6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975 - * - * The reasons for adding the products like this are: - * 1. It avoids manual carry tracking. Just like how - * (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX. - * This avoids a lot of complexity. - * - * 2. It hints for, and on Clang, compiles to, the powerful UMAAL - * instruction available in ARM's Digital Signal Processing extension - * in 32-bit ARMv6 and later, which is shown below: - * - * void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm) - * { - * xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm; - * *RdLo = (xxh_u32)(product & 0xFFFFFFFF); - * *RdHi = (xxh_u32)(product >> 32); - * } - * - * This instruction was designed for efficient long multiplication, and - * allows this to be calculated in only 4 instructions at speeds - * comparable to some 64-bit ALUs. - * - * 3. It isn't terrible on other platforms. Usually this will be a couple - * of 32-bit ADD/ADCs. - */ - - /* First calculate all of the cross products. */ - xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF); - xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32, rhs & 0xFFFFFFFF); - xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32); - xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32, rhs >> 32); - - /* Now add the products together. These will never overflow. */ - xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi; - xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32) + hi_hi; - xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF); - - XXH128_hash_t r128; - r128.low64 = lower; - r128.high64 = upper; - return r128; -#endif -} - -/*! - * @brief Calculates a 64-bit to 128-bit multiply, then XOR folds it. - * - * The reason for the separate function is to prevent passing too many structs - * around by value. This will hopefully inline the multiply, but we don't force it. - * - * @param lhs , rhs The 64-bit integers to multiply - * @return The low 64 bits of the product XOR'd by the high 64 bits. - * @see XXH_mult64to128() - */ -static xxh_u64 -XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs) -{ - XXH128_hash_t product = XXH_mult64to128(lhs, rhs); - return product.low64 ^ product.high64; -} - -/*! Seems to produce slightly better code on GCC for some reason. */ -XXH_FORCE_INLINE XXH_CONSTF xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift) -{ - XXH_ASSERT(0 <= shift && shift < 64); - return v64 ^ (v64 >> shift); -} - -/* - * This is a fast avalanche stage, - * suitable when input bits are already partially mixed - */ -static XXH64_hash_t XXH3_avalanche(xxh_u64 h64) -{ - h64 = XXH_xorshift64(h64, 37); - h64 *= PRIME_MX1; - h64 = XXH_xorshift64(h64, 32); - return h64; -} - -/* - * This is a stronger avalanche, - * inspired by Pelle Evensen's rrmxmx - * preferable when input has not been previously mixed - */ -static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len) -{ - /* this mix is inspired by Pelle Evensen's rrmxmx */ - h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24); - h64 *= PRIME_MX2; - h64 ^= (h64 >> 35) + len ; - h64 *= PRIME_MX2; - return XXH_xorshift64(h64, 28); -} - - -/* ========================================== - * Short keys - * ========================================== - * One of the shortcomings of XXH32 and XXH64 was that their performance was - * sub-optimal on short lengths. It used an iterative algorithm which strongly - * favored lengths that were a multiple of 4 or 8. - * - * Instead of iterating over individual inputs, we use a set of single shot - * functions which piece together a range of lengths and operate in constant time. - * - * Additionally, the number of multiplies has been significantly reduced. This - * reduces latency, especially when emulating 64-bit multiplies on 32-bit. - * - * Depending on the platform, this may or may not be faster than XXH32, but it - * is almost guaranteed to be faster than XXH64. - */ - -/* - * At very short lengths, there isn't enough input to fully hide secrets, or use - * the entire secret. - * - * There is also only a limited amount of mixing we can do before significantly - * impacting performance. - * - * Therefore, we use different sections of the secret and always mix two secret - * samples with an XOR. This should have no effect on performance on the - * seedless or withSeed variants because everything _should_ be constant folded - * by modern compilers. - * - * The XOR mixing hides individual parts of the secret and increases entropy. - * - * This adds an extra layer of strength for custom secrets. - */ -XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(input != NULL); - XXH_ASSERT(1 <= len && len <= 3); - XXH_ASSERT(secret != NULL); - /* - * len = 1: combined = { input[0], 0x01, input[0], input[0] } - * len = 2: combined = { input[1], 0x02, input[0], input[1] } - * len = 3: combined = { input[2], 0x03, input[0], input[1] } - */ - { xxh_u8 const c1 = input[0]; - xxh_u8 const c2 = input[len >> 1]; - xxh_u8 const c3 = input[len - 1]; - xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2 << 24) - | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); - xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; - xxh_u64 const keyed = (xxh_u64)combined ^ bitflip; - return XXH64_avalanche(keyed); - } -} - -XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(input != NULL); - XXH_ASSERT(secret != NULL); - XXH_ASSERT(4 <= len && len <= 8); - seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; - { xxh_u32 const input1 = XXH_readLE32(input); - xxh_u32 const input2 = XXH_readLE32(input + len - 4); - xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed; - xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32); - xxh_u64 const keyed = input64 ^ bitflip; - return XXH3_rrmxmx(keyed, len); - } -} - -XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(input != NULL); - XXH_ASSERT(secret != NULL); - XXH_ASSERT(9 <= len && len <= 16); - { xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed; - xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed; - xxh_u64 const input_lo = XXH_readLE64(input) ^ bitflip1; - xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2; - xxh_u64 const acc = len - + XXH_swap64(input_lo) + input_hi - + XXH3_mul128_fold64(input_lo, input_hi); - return XXH3_avalanche(acc); - } -} - -XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(len <= 16); - { if (XXH_likely(len > 8)) return XXH3_len_9to16_64b(input, len, secret, seed); - if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed); - if (len) return XXH3_len_1to3_64b(input, len, secret, seed); - return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64))); - } -} - -/* - * DISCLAIMER: There are known *seed-dependent* multicollisions here due to - * multiplication by zero, affecting hashes of lengths 17 to 240. - * - * However, they are very unlikely. - * - * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all - * unseeded non-cryptographic hashes, it does not attempt to defend itself - * against specially crafted inputs, only random inputs. - * - * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes - * cancelling out the secret is taken an arbitrary number of times (addressed - * in XXH3_accumulate_512), this collision is very unlikely with random inputs - * and/or proper seeding: - * - * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a - * function that is only called up to 16 times per hash with up to 240 bytes of - * input. - * - * This is not too bad for a non-cryptographic hash function, especially with - * only 64 bit outputs. - * - * The 128-bit variant (which trades some speed for strength) is NOT affected - * by this, although it is always a good idea to use a proper seed if you care - * about strength. - */ -XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input, - const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64) -{ -#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ - && defined(__i386__) && defined(__SSE2__) /* x86 + SSE2 */ \ - && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable like XXH32 hack */ - /* - * UGLY HACK: - * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in - * slower code. - * - * By forcing seed64 into a register, we disrupt the cost model and - * cause it to scalarize. See `XXH32_round()` - * - * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600, - * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on - * GCC 9.2, despite both emitting scalar code. - * - * GCC generates much better scalar code than Clang for the rest of XXH3, - * which is why finding a more optimal codepath is an interest. - */ - XXH_COMPILER_GUARD(seed64); -#endif - { xxh_u64 const input_lo = XXH_readLE64(input); - xxh_u64 const input_hi = XXH_readLE64(input+8); - return XXH3_mul128_fold64( - input_lo ^ (XXH_readLE64(secret) + seed64), - input_hi ^ (XXH_readLE64(secret+8) - seed64) - ); - } -} - -/* For mid range keys, XXH3 uses a Mum-hash variant. */ -XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH64_hash_t seed) -{ - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; - XXH_ASSERT(16 < len && len <= 128); - - { xxh_u64 acc = len * XXH_PRIME64_1; -#if XXH_SIZE_OPT >= 1 - /* Smaller and cleaner, but slightly slower. */ - unsigned int i = (unsigned int)(len - 1) / 32; - do { - acc += XXH3_mix16B(input+16 * i, secret+32*i, seed); - acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed); - } while (i-- != 0); -#else - if (len > 32) { - if (len > 64) { - if (len > 96) { - acc += XXH3_mix16B(input+48, secret+96, seed); - acc += XXH3_mix16B(input+len-64, secret+112, seed); - } - acc += XXH3_mix16B(input+32, secret+64, seed); - acc += XXH3_mix16B(input+len-48, secret+80, seed); - } - acc += XXH3_mix16B(input+16, secret+32, seed); - acc += XXH3_mix16B(input+len-32, secret+48, seed); - } - acc += XXH3_mix16B(input+0, secret+0, seed); - acc += XXH3_mix16B(input+len-16, secret+16, seed); -#endif - return XXH3_avalanche(acc); - } -} - -/*! - * @brief Maximum size of "short" key in bytes. - */ -#define XXH3_MIDSIZE_MAX 240 - -XXH_NO_INLINE XXH_PUREF XXH64_hash_t -XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH64_hash_t seed) -{ - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; - XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); - - #define XXH3_MIDSIZE_STARTOFFSET 3 - #define XXH3_MIDSIZE_LASTOFFSET 17 - - { xxh_u64 acc = len * XXH_PRIME64_1; - xxh_u64 acc_end; - unsigned int const nbRounds = (unsigned int)len / 16; - unsigned int i; - XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); - for (i=0; i<8; i++) { - acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed); - } - /* last bytes */ - acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed); - XXH_ASSERT(nbRounds >= 8); - acc = XXH3_avalanche(acc); -#if defined(__clang__) /* Clang */ \ - && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ - && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ - /* - * UGLY HACK: - * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86. - * In everywhere else, it uses scalar code. - * - * For 64->128-bit multiplies, even if the NEON was 100% optimal, it - * would still be slower than UMAAL (see XXH_mult64to128). - * - * Unfortunately, Clang doesn't handle the long multiplies properly and - * converts them to the nonexistent "vmulq_u64" intrinsic, which is then - * scalarized into an ugly mess of VMOV.32 instructions. - * - * This mess is difficult to avoid without turning autovectorization - * off completely, but they are usually relatively minor and/or not - * worth it to fix. - * - * This loop is the easiest to fix, as unlike XXH32, this pragma - * _actually works_ because it is a loop vectorization instead of an - * SLP vectorization. - */ - #pragma clang loop vectorize(disable) -#endif - for (i=8 ; i < nbRounds; i++) { - /* - * Prevents clang for unrolling the acc loop and interleaving with this one. - */ - XXH_COMPILER_GUARD(acc); - acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed); - } - return XXH3_avalanche(acc + acc_end); - } -} - - -/* ======= Long Keys ======= */ - -#define XXH_STRIPE_LEN 64 -#define XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */ -#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64)) - -#ifdef XXH_OLD_NAMES -# define STRIPE_LEN XXH_STRIPE_LEN -# define ACC_NB XXH_ACC_NB -#endif - -#ifndef XXH_PREFETCH_DIST -# ifdef __clang__ -# define XXH_PREFETCH_DIST 320 -# else -# if (XXH_VECTOR == XXH_AVX512) -# define XXH_PREFETCH_DIST 512 -# else -# define XXH_PREFETCH_DIST 384 -# endif -# endif /* __clang__ */ -#endif /* XXH_PREFETCH_DIST */ - -/* - * These macros are to generate an XXH3_accumulate() function. - * The two arguments select the name suffix and target attribute. - * - * The name of this symbol is XXH3_accumulate_() and it calls - * XXH3_accumulate_512_(). - * - * It may be useful to hand implement this function if the compiler fails to - * optimize the inline function. - */ -#define XXH3_ACCUMULATE_TEMPLATE(name) \ -void \ -XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ - const xxh_u8* XXH_RESTRICT input, \ - const xxh_u8* XXH_RESTRICT secret, \ - size_t nbStripes) \ -{ \ - size_t n; \ - for (n = 0; n < nbStripes; n++ ) { \ - const xxh_u8* const in = input + n*XXH_STRIPE_LEN; \ - XXH_PREFETCH(in + XXH_PREFETCH_DIST); \ - XXH3_accumulate_512_##name( \ - acc, \ - in, \ - secret + n*XXH_SECRET_CONSUME_RATE); \ - } \ -} - - -XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64) -{ - if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64); - XXH_memcpy(dst, &v64, sizeof(v64)); -} - -/* Several intrinsic functions below are supposed to accept __int64 as argument, - * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ . - * However, several environments do not define __int64 type, - * requiring a workaround. - */ -#if !defined (__VMS) \ - && (defined (__cplusplus) \ - || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) - typedef int64_t xxh_i64; -#else - /* the following type must have a width of 64-bit */ - typedef long long xxh_i64; -#endif - - -/* - * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized. - * - * It is a hardened version of UMAC, based off of FARSH's implementation. - * - * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD - * implementations, and it is ridiculously fast. - * - * We harden it by mixing the original input to the accumulators as well as the product. - * - * This means that in the (relatively likely) case of a multiply by zero, the - * original input is preserved. - * - * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve - * cross-pollination, as otherwise the upper and lower halves would be - * essentially independent. - * - * This doesn't matter on 64-bit hashes since they all get merged together in - * the end, so we skip the extra step. - * - * Both XXH3_64bits and XXH3_128bits use this subroutine. - */ - -#if (XXH_VECTOR == XXH_AVX512) \ - || (defined(XXH_DISPATCH_AVX512) && XXH_DISPATCH_AVX512 != 0) - -#ifndef XXH_TARGET_AVX512 -# define XXH_TARGET_AVX512 /* disable attribute target */ -#endif - -XXH_FORCE_INLINE XXH_TARGET_AVX512 void -XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - __m512i* const xacc = (__m512i *) acc; - XXH_ASSERT((((size_t)acc) & 63) == 0); - XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); - - { - /* data_vec = input[0]; */ - __m512i const data_vec = _mm512_loadu_si512 (input); - /* key_vec = secret[0]; */ - __m512i const key_vec = _mm512_loadu_si512 (secret); - /* data_key = data_vec ^ key_vec; */ - __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); - /* data_key_lo = data_key >> 32; */ - __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32); - /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ - __m512i const product = _mm512_mul_epu32 (data_key, data_key_lo); - /* xacc[0] += swap(data_vec); */ - __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2)); - __m512i const sum = _mm512_add_epi64(*xacc, data_swap); - /* xacc[0] += product; */ - *xacc = _mm512_add_epi64(product, sum); - } -} -XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512) - -/* - * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing. - * - * Multiplication isn't perfect, as explained by Google in HighwayHash: - * - * // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to - * // varying degrees. In descending order of goodness, bytes - * // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32. - * // As expected, the upper and lower bytes are much worse. - * - * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291 - * - * Since our algorithm uses a pseudorandom secret to add some variance into the - * mix, we don't need to (or want to) mix as often or as much as HighwayHash does. - * - * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid - * extraction. - * - * Both XXH3_64bits and XXH3_128bits use this subroutine. - */ - -XXH_FORCE_INLINE XXH_TARGET_AVX512 void -XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 63) == 0); - XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); - { __m512i* const xacc = (__m512i*) acc; - const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1); - - /* xacc[0] ^= (xacc[0] >> 47) */ - __m512i const acc_vec = *xacc; - __m512i const shifted = _mm512_srli_epi64 (acc_vec, 47); - /* xacc[0] ^= secret; */ - __m512i const key_vec = _mm512_loadu_si512 (secret); - __m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */); - - /* xacc[0] *= XXH_PRIME32_1; */ - __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32); - __m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32); - __m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32); - *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32)); - } -} - -XXH_FORCE_INLINE XXH_TARGET_AVX512 void -XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64) -{ - XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0); - XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64); - XXH_ASSERT(((size_t)customSecret & 63) == 0); - (void)(&XXH_writeLE64); - { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i); - __m512i const seed_pos = _mm512_set1_epi64((xxh_i64)seed64); - __m512i const seed = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos); - - const __m512i* const src = (const __m512i*) ((const void*) XXH3_kSecret); - __m512i* const dest = ( __m512i*) customSecret; - int i; - XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */ - XXH_ASSERT(((size_t)dest & 63) == 0); - for (i=0; i < nbRounds; ++i) { - dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed); - } } -} - -#endif - -#if (XXH_VECTOR == XXH_AVX2) \ - || (defined(XXH_DISPATCH_AVX2) && XXH_DISPATCH_AVX2 != 0) - -#ifndef XXH_TARGET_AVX2 -# define XXH_TARGET_AVX2 /* disable attribute target */ -#endif - -XXH_FORCE_INLINE XXH_TARGET_AVX2 void -XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 31) == 0); - { __m256i* const xacc = (__m256i *) acc; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ - const __m256i* const xinput = (const __m256i *) input; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ - const __m256i* const xsecret = (const __m256i *) secret; - - size_t i; - for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { - /* data_vec = xinput[i]; */ - __m256i const data_vec = _mm256_loadu_si256 (xinput+i); - /* key_vec = xsecret[i]; */ - __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); - /* data_key = data_vec ^ key_vec; */ - __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); - /* data_key_lo = data_key >> 32; */ - __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32); - /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ - __m256i const product = _mm256_mul_epu32 (data_key, data_key_lo); - /* xacc[i] += swap(data_vec); */ - __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2)); - __m256i const sum = _mm256_add_epi64(xacc[i], data_swap); - /* xacc[i] += product; */ - xacc[i] = _mm256_add_epi64(product, sum); - } } -} -XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2) - -XXH_FORCE_INLINE XXH_TARGET_AVX2 void -XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 31) == 0); - { __m256i* const xacc = (__m256i*) acc; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ - const __m256i* const xsecret = (const __m256i *) secret; - const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1); - - size_t i; - for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { - /* xacc[i] ^= (xacc[i] >> 47) */ - __m256i const acc_vec = xacc[i]; - __m256i const shifted = _mm256_srli_epi64 (acc_vec, 47); - __m256i const data_vec = _mm256_xor_si256 (acc_vec, shifted); - /* xacc[i] ^= xsecret; */ - __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); - __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); - - /* xacc[i] *= XXH_PRIME32_1; */ - __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32); - __m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32); - __m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32); - xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32)); - } - } -} - -XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) -{ - XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0); - XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6); - XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64); - (void)(&XXH_writeLE64); - XXH_PREFETCH(customSecret); - { __m256i const seed = _mm256_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64, (xxh_i64)(0U - seed64), (xxh_i64)seed64); - - const __m256i* const src = (const __m256i*) ((const void*) XXH3_kSecret); - __m256i* dest = ( __m256i*) customSecret; - -# if defined(__GNUC__) || defined(__clang__) - /* - * On GCC & Clang, marking 'dest' as modified will cause the compiler: - * - do not extract the secret from sse registers in the internal loop - * - use less common registers, and avoid pushing these reg into stack - */ - XXH_COMPILER_GUARD(dest); -# endif - XXH_ASSERT(((size_t)src & 31) == 0); /* control alignment */ - XXH_ASSERT(((size_t)dest & 31) == 0); - - /* GCC -O2 need unroll loop manually */ - dest[0] = _mm256_add_epi64(_mm256_load_si256(src+0), seed); - dest[1] = _mm256_add_epi64(_mm256_load_si256(src+1), seed); - dest[2] = _mm256_add_epi64(_mm256_load_si256(src+2), seed); - dest[3] = _mm256_add_epi64(_mm256_load_si256(src+3), seed); - dest[4] = _mm256_add_epi64(_mm256_load_si256(src+4), seed); - dest[5] = _mm256_add_epi64(_mm256_load_si256(src+5), seed); - } -} - -#endif - -/* x86dispatch always generates SSE2 */ -#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH) - -#ifndef XXH_TARGET_SSE2 -# define XXH_TARGET_SSE2 /* disable attribute target */ -#endif - -XXH_FORCE_INLINE XXH_TARGET_SSE2 void -XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - /* SSE2 is just a half-scale version of the AVX2 version. */ - XXH_ASSERT((((size_t)acc) & 15) == 0); - { __m128i* const xacc = (__m128i *) acc; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ - const __m128i* const xinput = (const __m128i *) input; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ - const __m128i* const xsecret = (const __m128i *) secret; - - size_t i; - for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { - /* data_vec = xinput[i]; */ - __m128i const data_vec = _mm_loadu_si128 (xinput+i); - /* key_vec = xsecret[i]; */ - __m128i const key_vec = _mm_loadu_si128 (xsecret+i); - /* data_key = data_vec ^ key_vec; */ - __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); - /* data_key_lo = data_key >> 32; */ - __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); - /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ - __m128i const product = _mm_mul_epu32 (data_key, data_key_lo); - /* xacc[i] += swap(data_vec); */ - __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2)); - __m128i const sum = _mm_add_epi64(xacc[i], data_swap); - /* xacc[i] += product; */ - xacc[i] = _mm_add_epi64(product, sum); - } } -} -XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) - -XXH_FORCE_INLINE XXH_TARGET_SSE2 void -XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 15) == 0); - { __m128i* const xacc = (__m128i*) acc; - /* Unaligned. This is mainly for pointer arithmetic, and because - * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ - const __m128i* const xsecret = (const __m128i *) secret; - const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1); - - size_t i; - for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { - /* xacc[i] ^= (xacc[i] >> 47) */ - __m128i const acc_vec = xacc[i]; - __m128i const shifted = _mm_srli_epi64 (acc_vec, 47); - __m128i const data_vec = _mm_xor_si128 (acc_vec, shifted); - /* xacc[i] ^= xsecret[i]; */ - __m128i const key_vec = _mm_loadu_si128 (xsecret+i); - __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); - - /* xacc[i] *= XXH_PRIME32_1; */ - __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); - __m128i const prod_lo = _mm_mul_epu32 (data_key, prime32); - __m128i const prod_hi = _mm_mul_epu32 (data_key_hi, prime32); - xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32)); - } - } -} - -XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) -{ - XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); - (void)(&XXH_writeLE64); - { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i); - -# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900 - /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */ - XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) }; - __m128i const seed = _mm_load_si128((__m128i const*)seed64x2); -# else - __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64); -# endif - int i; - - const void* const src16 = XXH3_kSecret; - __m128i* dst16 = (__m128i*) customSecret; -# if defined(__GNUC__) || defined(__clang__) - /* - * On GCC & Clang, marking 'dest' as modified will cause the compiler: - * - do not extract the secret from sse registers in the internal loop - * - use less common registers, and avoid pushing these reg into stack - */ - XXH_COMPILER_GUARD(dst16); -# endif - XXH_ASSERT(((size_t)src16 & 15) == 0); /* control alignment */ - XXH_ASSERT(((size_t)dst16 & 15) == 0); - - for (i=0; i < nbRounds; ++i) { - dst16[i] = _mm_add_epi64(_mm_load_si128((const __m128i *)src16+i), seed); - } } -} - -#endif - -#if (XXH_VECTOR == XXH_NEON) - -/* forward declarations for the scalar routines */ -XXH_FORCE_INLINE void -XXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input, - void const* XXH_RESTRICT secret, size_t lane); - -XXH_FORCE_INLINE void -XXH3_scalarScrambleRound(void* XXH_RESTRICT acc, - void const* XXH_RESTRICT secret, size_t lane); - -/*! - * @internal - * @brief The bulk processing loop for NEON and WASM SIMD128. - * - * The NEON code path is actually partially scalar when running on AArch64. This - * is to optimize the pipelining and can have up to 15% speedup depending on the - * CPU, and it also mitigates some GCC codegen issues. - * - * @see XXH3_NEON_LANES for configuring this and details about this optimization. - * - * NEON's 32-bit to 64-bit long multiply takes a half vector of 32-bit - * integers instead of the other platforms which mask full 64-bit vectors, - * so the setup is more complicated than just shifting right. - * - * Additionally, there is an optimization for 4 lanes at once noted below. - * - * Since, as stated, the most optimal amount of lanes for Cortexes is 6, - * there needs to be *three* versions of the accumulate operation used - * for the remaining 2 lanes. - * - * WASM's SIMD128 uses SIMDe's arm_neon.h polyfill because the intrinsics overlap - * nearly perfectly. - */ - -XXH_FORCE_INLINE void -XXH3_accumulate_512_neon( void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 15) == 0); - XXH_STATIC_ASSERT(XXH3_NEON_LANES > 0 && XXH3_NEON_LANES <= XXH_ACC_NB && XXH3_NEON_LANES % 2 == 0); - { /* GCC for darwin arm64 does not like aliasing here */ - xxh_aliasing_uint64x2_t* const xacc = (xxh_aliasing_uint64x2_t*) acc; - /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */ - uint8_t const* xinput = (const uint8_t *) input; - uint8_t const* xsecret = (const uint8_t *) secret; - - size_t i; -#ifdef __wasm_simd128__ - /* - * On WASM SIMD128, Clang emits direct address loads when XXH3_kSecret - * is constant propagated, which results in it converting it to this - * inside the loop: - * - * a = v128.load(XXH3_kSecret + 0 + $secret_offset, offset = 0) - * b = v128.load(XXH3_kSecret + 16 + $secret_offset, offset = 0) - * ... - * - * This requires a full 32-bit address immediate (and therefore a 6 byte - * instruction) as well as an add for each offset. - * - * Putting an asm guard prevents it from folding (at the cost of losing - * the alignment hint), and uses the free offset in `v128.load` instead - * of adding secret_offset each time which overall reduces code size by - * about a kilobyte and improves performance. - */ - XXH_COMPILER_GUARD(xsecret); -#endif - /* Scalar lanes use the normal scalarRound routine */ - for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) { - XXH3_scalarRound(acc, input, secret, i); - } - i = 0; - /* 4 NEON lanes at a time. */ - for (; i+1 < XXH3_NEON_LANES / 2; i+=2) { - /* data_vec = xinput[i]; */ - uint64x2_t data_vec_1 = XXH_vld1q_u64(xinput + (i * 16)); - uint64x2_t data_vec_2 = XXH_vld1q_u64(xinput + ((i+1) * 16)); - /* key_vec = xsecret[i]; */ - uint64x2_t key_vec_1 = XXH_vld1q_u64(xsecret + (i * 16)); - uint64x2_t key_vec_2 = XXH_vld1q_u64(xsecret + ((i+1) * 16)); - /* data_swap = swap(data_vec) */ - uint64x2_t data_swap_1 = vextq_u64(data_vec_1, data_vec_1, 1); - uint64x2_t data_swap_2 = vextq_u64(data_vec_2, data_vec_2, 1); - /* data_key = data_vec ^ key_vec; */ - uint64x2_t data_key_1 = veorq_u64(data_vec_1, key_vec_1); - uint64x2_t data_key_2 = veorq_u64(data_vec_2, key_vec_2); - - /* - * If we reinterpret the 64x2 vectors as 32x4 vectors, we can use a - * de-interleave operation for 4 lanes in 1 step with `vuzpq_u32` to - * get one vector with the low 32 bits of each lane, and one vector - * with the high 32 bits of each lane. - * - * The intrinsic returns a double vector because the original ARMv7-a - * instruction modified both arguments in place. AArch64 and SIMD128 emit - * two instructions from this intrinsic. - * - * [ dk11L | dk11H | dk12L | dk12H ] -> [ dk11L | dk12L | dk21L | dk22L ] - * [ dk21L | dk21H | dk22L | dk22H ] -> [ dk11H | dk12H | dk21H | dk22H ] - */ - uint32x4x2_t unzipped = vuzpq_u32( - vreinterpretq_u32_u64(data_key_1), - vreinterpretq_u32_u64(data_key_2) - ); - /* data_key_lo = data_key & 0xFFFFFFFF */ - uint32x4_t data_key_lo = unzipped.val[0]; - /* data_key_hi = data_key >> 32 */ - uint32x4_t data_key_hi = unzipped.val[1]; - /* - * Then, we can split the vectors horizontally and multiply which, as for most - * widening intrinsics, have a variant that works on both high half vectors - * for free on AArch64. A similar instruction is available on SIMD128. - * - * sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi - */ - uint64x2_t sum_1 = XXH_vmlal_low_u32(data_swap_1, data_key_lo, data_key_hi); - uint64x2_t sum_2 = XXH_vmlal_high_u32(data_swap_2, data_key_lo, data_key_hi); - /* - * Clang reorders - * a += b * c; // umlal swap.2d, dkl.2s, dkh.2s - * c += a; // add acc.2d, acc.2d, swap.2d - * to - * c += a; // add acc.2d, acc.2d, swap.2d - * c += b * c; // umlal acc.2d, dkl.2s, dkh.2s - * - * While it would make sense in theory since the addition is faster, - * for reasons likely related to umlal being limited to certain NEON - * pipelines, this is worse. A compiler guard fixes this. - */ - XXH_COMPILER_GUARD_CLANG_NEON(sum_1); - XXH_COMPILER_GUARD_CLANG_NEON(sum_2); - /* xacc[i] = acc_vec + sum; */ - xacc[i] = vaddq_u64(xacc[i], sum_1); - xacc[i+1] = vaddq_u64(xacc[i+1], sum_2); - } - /* Operate on the remaining NEON lanes 2 at a time. */ - for (; i < XXH3_NEON_LANES / 2; i++) { - /* data_vec = xinput[i]; */ - uint64x2_t data_vec = XXH_vld1q_u64(xinput + (i * 16)); - /* key_vec = xsecret[i]; */ - uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16)); - /* acc_vec_2 = swap(data_vec) */ - uint64x2_t data_swap = vextq_u64(data_vec, data_vec, 1); - /* data_key = data_vec ^ key_vec; */ - uint64x2_t data_key = veorq_u64(data_vec, key_vec); - /* For two lanes, just use VMOVN and VSHRN. */ - /* data_key_lo = data_key & 0xFFFFFFFF; */ - uint32x2_t data_key_lo = vmovn_u64(data_key); - /* data_key_hi = data_key >> 32; */ - uint32x2_t data_key_hi = vshrn_n_u64(data_key, 32); - /* sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi; */ - uint64x2_t sum = vmlal_u32(data_swap, data_key_lo, data_key_hi); - /* Same Clang workaround as before */ - XXH_COMPILER_GUARD_CLANG_NEON(sum); - /* xacc[i] = acc_vec + sum; */ - xacc[i] = vaddq_u64 (xacc[i], sum); - } - } -} -XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon) - -XXH_FORCE_INLINE void -XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 15) == 0); - - { xxh_aliasing_uint64x2_t* xacc = (xxh_aliasing_uint64x2_t*) acc; - uint8_t const* xsecret = (uint8_t const*) secret; - - size_t i; - /* WASM uses operator overloads and doesn't need these. */ -#ifndef __wasm_simd128__ - /* { prime32_1, prime32_1 } */ - uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1); - /* { 0, prime32_1, 0, prime32_1 } */ - uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32)); -#endif - - /* AArch64 uses both scalar and neon at the same time */ - for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) { - XXH3_scalarScrambleRound(acc, secret, i); - } - for (i=0; i < XXH3_NEON_LANES / 2; i++) { - /* xacc[i] ^= (xacc[i] >> 47); */ - uint64x2_t acc_vec = xacc[i]; - uint64x2_t shifted = vshrq_n_u64(acc_vec, 47); - uint64x2_t data_vec = veorq_u64(acc_vec, shifted); - - /* xacc[i] ^= xsecret[i]; */ - uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16)); - uint64x2_t data_key = veorq_u64(data_vec, key_vec); - /* xacc[i] *= XXH_PRIME32_1 */ -#ifdef __wasm_simd128__ - /* SIMD128 has multiply by u64x2, use it instead of expanding and scalarizing */ - xacc[i] = data_key * XXH_PRIME32_1; -#else - /* - * Expanded version with portable NEON intrinsics - * - * lo(x) * lo(y) + (hi(x) * lo(y) << 32) - * - * prod_hi = hi(data_key) * lo(prime) << 32 - * - * Since we only need 32 bits of this multiply a trick can be used, reinterpreting the vector - * as a uint32x4_t and multiplying by { 0, prime, 0, prime } to cancel out the unwanted bits - * and avoid the shift. - */ - uint32x4_t prod_hi = vmulq_u32 (vreinterpretq_u32_u64(data_key), kPrimeHi); - /* Extract low bits for vmlal_u32 */ - uint32x2_t data_key_lo = vmovn_u64(data_key); - /* xacc[i] = prod_hi + lo(data_key) * XXH_PRIME32_1; */ - xacc[i] = vmlal_u32(vreinterpretq_u64_u32(prod_hi), data_key_lo, kPrimeLo); -#endif - } - } -} -#endif - -#if (XXH_VECTOR == XXH_VSX) - -XXH_FORCE_INLINE void -XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - /* presumed aligned */ - xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc; - xxh_u8 const* const xinput = (xxh_u8 const*) input; /* no alignment restriction */ - xxh_u8 const* const xsecret = (xxh_u8 const*) secret; /* no alignment restriction */ - xxh_u64x2 const v32 = { 32, 32 }; - size_t i; - for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { - /* data_vec = xinput[i]; */ - xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + 16*i); - /* key_vec = xsecret[i]; */ - xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i); - xxh_u64x2 const data_key = data_vec ^ key_vec; - /* shuffled = (data_key << 32) | (data_key >> 32); */ - xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32); - /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */ - xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled); - /* acc_vec = xacc[i]; */ - xxh_u64x2 acc_vec = xacc[i]; - acc_vec += product; - - /* swap high and low halves */ -#ifdef __s390x__ - acc_vec += vec_permi(data_vec, data_vec, 2); -#else - acc_vec += vec_xxpermdi(data_vec, data_vec, 2); -#endif - xacc[i] = acc_vec; - } -} -XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx) - -XXH_FORCE_INLINE void -XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - XXH_ASSERT((((size_t)acc) & 15) == 0); - - { xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc; - const xxh_u8* const xsecret = (const xxh_u8*) secret; - /* constants */ - xxh_u64x2 const v32 = { 32, 32 }; - xxh_u64x2 const v47 = { 47, 47 }; - xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }; - size_t i; - for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { - /* xacc[i] ^= (xacc[i] >> 47); */ - xxh_u64x2 const acc_vec = xacc[i]; - xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47); - - /* xacc[i] ^= xsecret[i]; */ - xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i); - xxh_u64x2 const data_key = data_vec ^ key_vec; - - /* xacc[i] *= XXH_PRIME32_1 */ - /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF); */ - xxh_u64x2 const prod_even = XXH_vec_mule((xxh_u32x4)data_key, prime); - /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32); */ - xxh_u64x2 const prod_odd = XXH_vec_mulo((xxh_u32x4)data_key, prime); - xacc[i] = prod_odd + (prod_even << v32); - } } -} - -#endif - -#if (XXH_VECTOR == XXH_SVE) - -XXH_FORCE_INLINE void -XXH3_accumulate_512_sve( void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - uint64_t *xacc = (uint64_t *)acc; - const uint64_t *xinput = (const uint64_t *)(const void *)input; - const uint64_t *xsecret = (const uint64_t *)(const void *)secret; - svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1); - uint64_t element_count = svcntd(); - if (element_count >= 8) { - svbool_t mask = svptrue_pat_b64(SV_VL8); - svuint64_t vacc = svld1_u64(mask, xacc); - ACCRND(vacc, 0); - svst1_u64(mask, xacc, vacc); - } else if (element_count == 2) { /* sve128 */ - svbool_t mask = svptrue_pat_b64(SV_VL2); - svuint64_t acc0 = svld1_u64(mask, xacc + 0); - svuint64_t acc1 = svld1_u64(mask, xacc + 2); - svuint64_t acc2 = svld1_u64(mask, xacc + 4); - svuint64_t acc3 = svld1_u64(mask, xacc + 6); - ACCRND(acc0, 0); - ACCRND(acc1, 2); - ACCRND(acc2, 4); - ACCRND(acc3, 6); - svst1_u64(mask, xacc + 0, acc0); - svst1_u64(mask, xacc + 2, acc1); - svst1_u64(mask, xacc + 4, acc2); - svst1_u64(mask, xacc + 6, acc3); - } else { - svbool_t mask = svptrue_pat_b64(SV_VL4); - svuint64_t acc0 = svld1_u64(mask, xacc + 0); - svuint64_t acc1 = svld1_u64(mask, xacc + 4); - ACCRND(acc0, 0); - ACCRND(acc1, 4); - svst1_u64(mask, xacc + 0, acc0); - svst1_u64(mask, xacc + 4, acc1); - } -} - -XXH_FORCE_INLINE void -XXH3_accumulate_sve(xxh_u64* XXH_RESTRICT acc, - const xxh_u8* XXH_RESTRICT input, - const xxh_u8* XXH_RESTRICT secret, - size_t nbStripes) -{ - if (nbStripes != 0) { - uint64_t *xacc = (uint64_t *)acc; - const uint64_t *xinput = (const uint64_t *)(const void *)input; - const uint64_t *xsecret = (const uint64_t *)(const void *)secret; - svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1); - uint64_t element_count = svcntd(); - if (element_count >= 8) { - svbool_t mask = svptrue_pat_b64(SV_VL8); - svuint64_t vacc = svld1_u64(mask, xacc + 0); - do { - /* svprfd(svbool_t, void *, enum svfprop); */ - svprfd(mask, xinput + 128, SV_PLDL1STRM); - ACCRND(vacc, 0); - xinput += 8; - xsecret += 1; - nbStripes--; - } while (nbStripes != 0); - - svst1_u64(mask, xacc + 0, vacc); - } else if (element_count == 2) { /* sve128 */ - svbool_t mask = svptrue_pat_b64(SV_VL2); - svuint64_t acc0 = svld1_u64(mask, xacc + 0); - svuint64_t acc1 = svld1_u64(mask, xacc + 2); - svuint64_t acc2 = svld1_u64(mask, xacc + 4); - svuint64_t acc3 = svld1_u64(mask, xacc + 6); - do { - svprfd(mask, xinput + 128, SV_PLDL1STRM); - ACCRND(acc0, 0); - ACCRND(acc1, 2); - ACCRND(acc2, 4); - ACCRND(acc3, 6); - xinput += 8; - xsecret += 1; - nbStripes--; - } while (nbStripes != 0); - - svst1_u64(mask, xacc + 0, acc0); - svst1_u64(mask, xacc + 2, acc1); - svst1_u64(mask, xacc + 4, acc2); - svst1_u64(mask, xacc + 6, acc3); - } else { - svbool_t mask = svptrue_pat_b64(SV_VL4); - svuint64_t acc0 = svld1_u64(mask, xacc + 0); - svuint64_t acc1 = svld1_u64(mask, xacc + 4); - do { - svprfd(mask, xinput + 128, SV_PLDL1STRM); - ACCRND(acc0, 0); - ACCRND(acc1, 4); - xinput += 8; - xsecret += 1; - nbStripes--; - } while (nbStripes != 0); - - svst1_u64(mask, xacc + 0, acc0); - svst1_u64(mask, xacc + 4, acc1); - } - } -} - -#endif - -/* scalar variants - universal */ - -#if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__)) -/* - * In XXH3_scalarRound(), GCC and Clang have a similar codegen issue, where they - * emit an excess mask and a full 64-bit multiply-add (MADD X-form). - * - * While this might not seem like much, as AArch64 is a 64-bit architecture, only - * big Cortex designs have a full 64-bit multiplier. - * - * On the little cores, the smaller 32-bit multiplier is used, and full 64-bit - * multiplies expand to 2-3 multiplies in microcode. This has a major penalty - * of up to 4 latency cycles and 2 stall cycles in the multiply pipeline. - * - * Thankfully, AArch64 still provides the 32-bit long multiply-add (UMADDL) which does - * not have this penalty and does the mask automatically. - */ -XXH_FORCE_INLINE xxh_u64 -XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc) -{ - xxh_u64 ret; - /* note: %x = 64-bit register, %w = 32-bit register */ - __asm__("umaddl %x0, %w1, %w2, %x3" : "=r" (ret) : "r" (lhs), "r" (rhs), "r" (acc)); - return ret; -} -#else -XXH_FORCE_INLINE xxh_u64 -XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc) -{ - return XXH_mult32to64((xxh_u32)lhs, (xxh_u32)rhs) + acc; -} -#endif - -/*! - * @internal - * @brief Scalar round for @ref XXH3_accumulate_512_scalar(). - * - * This is extracted to its own function because the NEON path uses a combination - * of NEON and scalar. - */ -XXH_FORCE_INLINE void -XXH3_scalarRound(void* XXH_RESTRICT acc, - void const* XXH_RESTRICT input, - void const* XXH_RESTRICT secret, - size_t lane) -{ - xxh_u64* xacc = (xxh_u64*) acc; - xxh_u8 const* xinput = (xxh_u8 const*) input; - xxh_u8 const* xsecret = (xxh_u8 const*) secret; - XXH_ASSERT(lane < XXH_ACC_NB); - XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0); - { - xxh_u64 const data_val = XXH_readLE64(xinput + lane * 8); - xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + lane * 8); - xacc[lane ^ 1] += data_val; /* swap adjacent lanes */ - xacc[lane] = XXH_mult32to64_add64(data_key /* & 0xFFFFFFFF */, data_key >> 32, xacc[lane]); - } -} - -/*! - * @internal - * @brief Processes a 64 byte block of data using the scalar path. - */ -XXH_FORCE_INLINE void -XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc, - const void* XXH_RESTRICT input, - const void* XXH_RESTRICT secret) -{ - size_t i; - /* ARM GCC refuses to unroll this loop, resulting in a 24% slowdown on ARMv6. */ -#if defined(__GNUC__) && !defined(__clang__) \ - && (defined(__arm__) || defined(__thumb2__)) \ - && defined(__ARM_FEATURE_UNALIGNED) /* no unaligned access just wastes bytes */ \ - && XXH_SIZE_OPT <= 0 -# pragma GCC unroll 8 -#endif - for (i=0; i < XXH_ACC_NB; i++) { - XXH3_scalarRound(acc, input, secret, i); - } -} -XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar) - -/*! - * @internal - * @brief Scalar scramble step for @ref XXH3_scrambleAcc_scalar(). - * - * This is extracted to its own function because the NEON path uses a combination - * of NEON and scalar. - */ -XXH_FORCE_INLINE void -XXH3_scalarScrambleRound(void* XXH_RESTRICT acc, - void const* XXH_RESTRICT secret, - size_t lane) -{ - xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ - const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ - XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0); - XXH_ASSERT(lane < XXH_ACC_NB); - { - xxh_u64 const key64 = XXH_readLE64(xsecret + lane * 8); - xxh_u64 acc64 = xacc[lane]; - acc64 = XXH_xorshift64(acc64, 47); - acc64 ^= key64; - acc64 *= XXH_PRIME32_1; - xacc[lane] = acc64; - } -} - -/*! - * @internal - * @brief Scrambles the accumulators after a large chunk has been read - */ -XXH_FORCE_INLINE void -XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) -{ - size_t i; - for (i=0; i < XXH_ACC_NB; i++) { - XXH3_scalarScrambleRound(acc, secret, i); - } -} - -XXH_FORCE_INLINE void -XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64) -{ - /* - * We need a separate pointer for the hack below, - * which requires a non-const pointer. - * Any decent compiler will optimize this out otherwise. - */ - const xxh_u8* kSecretPtr = XXH3_kSecret; - XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); - -#if defined(__GNUC__) && defined(__aarch64__) - /* - * UGLY HACK: - * GCC and Clang generate a bunch of MOV/MOVK pairs for aarch64, and they are - * placed sequentially, in order, at the top of the unrolled loop. - * - * While MOVK is great for generating constants (2 cycles for a 64-bit - * constant compared to 4 cycles for LDR), it fights for bandwidth with - * the arithmetic instructions. - * - * I L S - * MOVK - * MOVK - * MOVK - * MOVK - * ADD - * SUB STR - * STR - * By forcing loads from memory (as the asm line causes the compiler to assume - * that XXH3_kSecretPtr has been changed), the pipelines are used more - * efficiently: - * I L S - * LDR - * ADD LDR - * SUB STR - * STR - * - * See XXH3_NEON_LANES for details on the pipsline. - * - * XXH3_64bits_withSeed, len == 256, Snapdragon 835 - * without hack: 2654.4 MB/s - * with hack: 3202.9 MB/s - */ - XXH_COMPILER_GUARD(kSecretPtr); -#endif - { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16; - int i; - for (i=0; i < nbRounds; i++) { - /* - * The asm hack causes the compiler to assume that kSecretPtr aliases with - * customSecret, and on aarch64, this prevented LDP from merging two - * loads together for free. Putting the loads together before the stores - * properly generates LDP. - */ - xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i) + seed64; - xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64; - XXH_writeLE64((xxh_u8*)customSecret + 16*i, lo); - XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi); - } } -} - - -typedef void (*XXH3_f_accumulate)(xxh_u64* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, size_t); -typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*); -typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64); - - -#if (XXH_VECTOR == XXH_AVX512) - -#define XXH3_accumulate_512 XXH3_accumulate_512_avx512 -#define XXH3_accumulate XXH3_accumulate_avx512 -#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512 -#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512 - -#elif (XXH_VECTOR == XXH_AVX2) - -#define XXH3_accumulate_512 XXH3_accumulate_512_avx2 -#define XXH3_accumulate XXH3_accumulate_avx2 -#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2 -#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2 - -#elif (XXH_VECTOR == XXH_SSE2) - -#define XXH3_accumulate_512 XXH3_accumulate_512_sse2 -#define XXH3_accumulate XXH3_accumulate_sse2 -#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2 -#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2 - -#elif (XXH_VECTOR == XXH_NEON) - -#define XXH3_accumulate_512 XXH3_accumulate_512_neon -#define XXH3_accumulate XXH3_accumulate_neon -#define XXH3_scrambleAcc XXH3_scrambleAcc_neon -#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar - -#elif (XXH_VECTOR == XXH_VSX) - -#define XXH3_accumulate_512 XXH3_accumulate_512_vsx -#define XXH3_accumulate XXH3_accumulate_vsx -#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx -#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar - -#elif (XXH_VECTOR == XXH_SVE) -#define XXH3_accumulate_512 XXH3_accumulate_512_sve -#define XXH3_accumulate XXH3_accumulate_sve -#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar -#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar - -#else /* scalar */ - -#define XXH3_accumulate_512 XXH3_accumulate_512_scalar -#define XXH3_accumulate XXH3_accumulate_scalar -#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar -#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar - -#endif - -#if XXH_SIZE_OPT >= 1 /* don't do SIMD for initialization */ -# undef XXH3_initCustomSecret -# define XXH3_initCustomSecret XXH3_initCustomSecret_scalar -#endif - -XXH_FORCE_INLINE void -XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc, - const xxh_u8* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble) -{ - size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE; - size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock; - size_t const nb_blocks = (len - 1) / block_len; - - size_t n; - - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); - - for (n = 0; n < nb_blocks; n++) { - f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); - f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); - } - - /* last partial block */ - XXH_ASSERT(len > XXH_STRIPE_LEN); - { size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN; - XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE)); - f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); - - /* last stripe */ - { const xxh_u8* const p = input + len - XXH_STRIPE_LEN; -#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */ - XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START); - } } -} - -XXH_FORCE_INLINE xxh_u64 -XXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret) -{ - return XXH3_mul128_fold64( - acc[0] ^ XXH_readLE64(secret), - acc[1] ^ XXH_readLE64(secret+8) ); -} - -static XXH64_hash_t -XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start) -{ - xxh_u64 result64 = start; - size_t i = 0; - - for (i = 0; i < 4; i++) { - result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i); -#if defined(__clang__) /* Clang */ \ - && (defined(__arm__) || defined(__thumb__)) /* ARMv7 */ \ - && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ - && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ - /* - * UGLY HACK: - * Prevent autovectorization on Clang ARMv7-a. Exact same problem as - * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b. - * XXH3_64bits, len == 256, Snapdragon 835: - * without hack: 2063.7 MB/s - * with hack: 2560.7 MB/s - */ - XXH_COMPILER_GUARD(result64); -#endif - } - - return XXH3_avalanche(result64); -} - -#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \ - XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 } - -XXH_FORCE_INLINE XXH64_hash_t -XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, - const void* XXH_RESTRICT secret, size_t secretSize, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble) -{ - XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; - - XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble); - - /* converge into final hash */ - XXH_STATIC_ASSERT(sizeof(acc) == 64); - /* do not align on 8, so that the secret is different from the accumulator */ -#define XXH_SECRET_MERGEACCS_START 11 - XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); - return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1); -} - -/* - * It's important for performance to transmit secret's size (when it's static) - * so that the compiler can properly optimize the vectorized loop. - * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. - * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE - * breaks -Og, this is XXH_NO_INLINE. - */ -XXH3_WITH_SECRET_INLINE XXH64_hash_t -XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) -{ - (void)seed64; - return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate, XXH3_scrambleAcc); -} - -/* - * It's preferable for performance that XXH3_hashLong is not inlined, - * as it results in a smaller function for small data, easier to the instruction cache. - * Note that inside this no_inline function, we do inline the internal loop, - * and provide a statically defined secret size to allow optimization of vector loop. - */ -XXH_NO_INLINE XXH_PUREF XXH64_hash_t -XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) -{ - (void)seed64; (void)secret; (void)secretLen; - return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc); -} - -/* - * XXH3_hashLong_64b_withSeed(): - * Generate a custom key based on alteration of default XXH3_kSecret with the seed, - * and then use this key for long mode hashing. - * - * This operation is decently fast but nonetheless costs a little bit of time. - * Try to avoid it whenever possible (typically when seed==0). - * - * It's important for performance that XXH3_hashLong is not inlined. Not sure - * why (uop cache maybe?), but the difference is large and easily measurable. - */ -XXH_FORCE_INLINE XXH64_hash_t -XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len, - XXH64_hash_t seed, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble, - XXH3_f_initCustomSecret f_initSec) -{ -#if XXH_SIZE_OPT <= 0 - if (seed == 0) - return XXH3_hashLong_64b_internal(input, len, - XXH3_kSecret, sizeof(XXH3_kSecret), - f_acc, f_scramble); -#endif - { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; - f_initSec(secret, seed); - return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret), - f_acc, f_scramble); - } -} - -/* - * It's important for performance that XXH3_hashLong is not inlined. - */ -XXH_NO_INLINE XXH64_hash_t -XXH3_hashLong_64b_withSeed(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) -{ - (void)secret; (void)secretLen; - return XXH3_hashLong_64b_withSeed_internal(input, len, seed, - XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret); -} - - -typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t, - XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t); - -XXH_FORCE_INLINE XXH64_hash_t -XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, - XXH3_hashLong64_f f_hashLong) -{ - XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); - /* - * If an action is to be taken if `secretLen` condition is not respected, - * it should be done here. - * For now, it's a contract pre-condition. - * Adding a check and a branch here would cost performance at every hash. - * Also, note that function signature doesn't offer room to return an error. - */ - if (len <= 16) - return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); - if (len <= 128) - return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); - if (len <= XXH3_MIDSIZE_MAX) - return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); - return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen); -} - - -/* === Public entry point === */ - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length) -{ - return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH64_hash_t -XXH3_64bits_withSecret(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize) -{ - return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH64_hash_t -XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed) -{ - return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed); -} - -XXH_PUBLIC_API XXH64_hash_t -XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) -{ - if (length <= XXH3_MIDSIZE_MAX) - return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); - return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize); -} - - -/* === XXH3 streaming === */ -#ifndef XXH_NO_STREAM -/* - * Malloc's a pointer that is always aligned to align. - * - * This must be freed with `XXH_alignedFree()`. - * - * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte - * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2 - * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON. - * - * This underalignment previously caused a rather obvious crash which went - * completely unnoticed due to XXH3_createState() not actually being tested. - * Credit to RedSpah for noticing this bug. - * - * The alignment is done manually: Functions like posix_memalign or _mm_malloc - * are avoided: To maintain portability, we would have to write a fallback - * like this anyways, and besides, testing for the existence of library - * functions without relying on external build tools is impossible. - * - * The method is simple: Overallocate, manually align, and store the offset - * to the original behind the returned pointer. - * - * Align must be a power of 2 and 8 <= align <= 128. - */ -static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align) -{ - XXH_ASSERT(align <= 128 && align >= 8); /* range check */ - XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */ - XXH_ASSERT(s != 0 && s < (s + align)); /* empty/overflow */ - { /* Overallocate to make room for manual realignment and an offset byte */ - xxh_u8* base = (xxh_u8*)XXH_malloc(s + align); - if (base != NULL) { - /* - * Get the offset needed to align this pointer. - * - * Even if the returned pointer is aligned, there will always be - * at least one byte to store the offset to the original pointer. - */ - size_t offset = align - ((size_t)base & (align - 1)); /* base % align */ - /* Add the offset for the now-aligned pointer */ - xxh_u8* ptr = base + offset; - - XXH_ASSERT((size_t)ptr % align == 0); - - /* Store the offset immediately before the returned pointer. */ - ptr[-1] = (xxh_u8)offset; - return ptr; - } - return NULL; - } -} -/* - * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass - * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout. - */ -static void XXH_alignedFree(void* p) -{ - if (p != NULL) { - xxh_u8* ptr = (xxh_u8*)p; - /* Get the offset byte we added in XXH_malloc. */ - xxh_u8 offset = ptr[-1]; - /* Free the original malloc'd pointer */ - xxh_u8* base = ptr - offset; - XXH_free(base); - } -} -/*! @ingroup XXH3_family */ -/*! - * @brief Allocate an @ref XXH3_state_t. - * - * @return An allocated pointer of @ref XXH3_state_t on success. - * @return `NULL` on failure. - * - * @note Must be freed with XXH3_freeState(). - */ -XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void) -{ - XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64); - if (state==NULL) return NULL; - XXH3_INITSTATE(state); - return state; -} - -/*! @ingroup XXH3_family */ -/*! - * @brief Frees an @ref XXH3_state_t. - * - * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). - * - * @return @ref XXH_OK. - * - * @note Must be allocated with XXH3_createState(). - */ -XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr) -{ - XXH_alignedFree(statePtr); - return XXH_OK; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API void -XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state) -{ - XXH_memcpy(dst_state, src_state, sizeof(*dst_state)); -} - -static void -XXH3_reset_internal(XXH3_state_t* statePtr, - XXH64_hash_t seed, - const void* secret, size_t secretSize) -{ - size_t const initStart = offsetof(XXH3_state_t, bufferedSize); - size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart; - XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart); - XXH_ASSERT(statePtr != NULL); - /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */ - memset((char*)statePtr + initStart, 0, initLength); - statePtr->acc[0] = XXH_PRIME32_3; - statePtr->acc[1] = XXH_PRIME64_1; - statePtr->acc[2] = XXH_PRIME64_2; - statePtr->acc[3] = XXH_PRIME64_3; - statePtr->acc[4] = XXH_PRIME64_4; - statePtr->acc[5] = XXH_PRIME32_2; - statePtr->acc[6] = XXH_PRIME64_5; - statePtr->acc[7] = XXH_PRIME32_1; - statePtr->seed = seed; - statePtr->useSeed = (seed != 0); - statePtr->extSecret = (const unsigned char*)secret; - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); - statePtr->secretLimit = secretSize - XXH_STRIPE_LEN; - statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr) -{ - if (statePtr == NULL) return XXH_ERROR; - XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); - return XXH_OK; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize) -{ - if (statePtr == NULL) return XXH_ERROR; - XXH3_reset_internal(statePtr, 0, secret, secretSize); - if (secret == NULL) return XXH_ERROR; - if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; - return XXH_OK; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed) -{ - if (statePtr == NULL) return XXH_ERROR; - if (seed==0) return XXH3_64bits_reset(statePtr); - if ((seed != statePtr->seed) || (statePtr->extSecret != NULL)) - XXH3_initCustomSecret(statePtr->customSecret, seed); - XXH3_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE); - return XXH_OK; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed64) -{ - if (statePtr == NULL) return XXH_ERROR; - if (secret == NULL) return XXH_ERROR; - if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; - XXH3_reset_internal(statePtr, seed64, secret, secretSize); - statePtr->useSeed = 1; /* always, even if seed64==0 */ - return XXH_OK; -} - -/*! - * @internal - * @brief Processes a large input for XXH3_update() and XXH3_digest_long(). - * - * Unlike XXH3_hashLong_internal_loop(), this can process data that overlaps a block. - * - * @param acc Pointer to the 8 accumulator lanes - * @param nbStripesSoFarPtr In/out pointer to the number of leftover stripes in the block* - * @param nbStripesPerBlock Number of stripes in a block - * @param input Input pointer - * @param nbStripes Number of stripes to process - * @param secret Secret pointer - * @param secretLimit Offset of the last block in @p secret - * @param f_acc Pointer to an XXH3_accumulate implementation - * @param f_scramble Pointer to an XXH3_scrambleAcc implementation - * @return Pointer past the end of @p input after processing - */ -XXH_FORCE_INLINE const xxh_u8 * -XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc, - size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock, - const xxh_u8* XXH_RESTRICT input, size_t nbStripes, - const xxh_u8* XXH_RESTRICT secret, size_t secretLimit, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble) -{ - const xxh_u8* initialSecret = secret + *nbStripesSoFarPtr * XXH_SECRET_CONSUME_RATE; - /* Process full blocks */ - if (nbStripes >= (nbStripesPerBlock - *nbStripesSoFarPtr)) { - /* Process the initial partial block... */ - size_t nbStripesThisIter = nbStripesPerBlock - *nbStripesSoFarPtr; - - do { - /* Accumulate and scramble */ - f_acc(acc, input, initialSecret, nbStripesThisIter); - f_scramble(acc, secret + secretLimit); - input += nbStripesThisIter * XXH_STRIPE_LEN; - nbStripes -= nbStripesThisIter; - /* Then continue the loop with the full block size */ - nbStripesThisIter = nbStripesPerBlock; - initialSecret = secret; - } while (nbStripes >= nbStripesPerBlock); - *nbStripesSoFarPtr = 0; - } - /* Process a partial block */ - if (nbStripes > 0) { - f_acc(acc, input, initialSecret, nbStripes); - input += nbStripes * XXH_STRIPE_LEN; - *nbStripesSoFarPtr += nbStripes; - } - /* Return end pointer */ - return input; -} - -#ifndef XXH3_STREAM_USE_STACK -# if XXH_SIZE_OPT <= 0 && !defined(__clang__) /* clang doesn't need additional stack space */ -# define XXH3_STREAM_USE_STACK 1 -# endif -#endif -/* - * Both XXH3_64bits_update and XXH3_128bits_update use this routine. - */ -XXH_FORCE_INLINE XXH_errorcode -XXH3_update(XXH3_state_t* XXH_RESTRICT const state, - const xxh_u8* XXH_RESTRICT input, size_t len, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble) -{ - if (input==NULL) { - XXH_ASSERT(len == 0); - return XXH_OK; - } - - XXH_ASSERT(state != NULL); - { const xxh_u8* const bEnd = input + len; - const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; -#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 - /* For some reason, gcc and MSVC seem to suffer greatly - * when operating accumulators directly into state. - * Operating into stack space seems to enable proper optimization. - * clang, on the other hand, doesn't seem to need this trick */ - XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8]; - XXH_memcpy(acc, state->acc, sizeof(acc)); -#else - xxh_u64* XXH_RESTRICT const acc = state->acc; -#endif - state->totalLen += len; - XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE); - - /* small input : just fill in tmp buffer */ - if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) { - XXH_memcpy(state->buffer + state->bufferedSize, input, len); - state->bufferedSize += (XXH32_hash_t)len; - return XXH_OK; - } - - /* total input is now > XXH3_INTERNALBUFFER_SIZE */ - #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) - XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0); /* clean multiple */ - - /* - * Internal buffer is partially filled (always, except at beginning) - * Complete it, then consume it. - */ - if (state->bufferedSize) { - size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize; - XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize); - input += loadSize; - XXH3_consumeStripes(acc, - &state->nbStripesSoFar, state->nbStripesPerBlock, - state->buffer, XXH3_INTERNALBUFFER_STRIPES, - secret, state->secretLimit, - f_acc, f_scramble); - state->bufferedSize = 0; - } - XXH_ASSERT(input < bEnd); - if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) { - size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN; - input = XXH3_consumeStripes(acc, - &state->nbStripesSoFar, state->nbStripesPerBlock, - input, nbStripes, - secret, state->secretLimit, - f_acc, f_scramble); - XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN); - - } - /* Some remaining input (always) : buffer it */ - XXH_ASSERT(input < bEnd); - XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE); - XXH_ASSERT(state->bufferedSize == 0); - XXH_memcpy(state->buffer, input, (size_t)(bEnd-input)); - state->bufferedSize = (XXH32_hash_t)(bEnd-input); -#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 - /* save stack accumulators into state */ - XXH_memcpy(state->acc, acc, sizeof(acc)); -#endif - } - - return XXH_OK; -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) -{ - return XXH3_update(state, (const xxh_u8*)input, len, - XXH3_accumulate, XXH3_scrambleAcc); -} - - -XXH_FORCE_INLINE void -XXH3_digest_long (XXH64_hash_t* acc, - const XXH3_state_t* state, - const unsigned char* secret) -{ - xxh_u8 lastStripe[XXH_STRIPE_LEN]; - const xxh_u8* lastStripePtr; - - /* - * Digest on a local copy. This way, the state remains unaltered, and it can - * continue ingesting more input afterwards. - */ - XXH_memcpy(acc, state->acc, sizeof(state->acc)); - if (state->bufferedSize >= XXH_STRIPE_LEN) { - /* Consume remaining stripes then point to remaining data in buffer */ - size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN; - size_t nbStripesSoFar = state->nbStripesSoFar; - XXH3_consumeStripes(acc, - &nbStripesSoFar, state->nbStripesPerBlock, - state->buffer, nbStripes, - secret, state->secretLimit, - XXH3_accumulate, XXH3_scrambleAcc); - lastStripePtr = state->buffer + state->bufferedSize - XXH_STRIPE_LEN; - } else { /* bufferedSize < XXH_STRIPE_LEN */ - /* Copy to temp buffer */ - size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize; - XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */ - XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize); - XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize); - lastStripePtr = lastStripe; - } - /* Last stripe */ - XXH3_accumulate_512(acc, - lastStripePtr, - secret + state->secretLimit - XXH_SECRET_LASTACC_START); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* state) -{ - const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; - if (state->totalLen > XXH3_MIDSIZE_MAX) { - XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; - XXH3_digest_long(acc, state, secret); - return XXH3_mergeAccs(acc, - secret + XXH_SECRET_MERGEACCS_START, - (xxh_u64)state->totalLen * XXH_PRIME64_1); - } - /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */ - if (state->useSeed) - return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); - return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen), - secret, state->secretLimit + XXH_STRIPE_LEN); -} -#endif /* !XXH_NO_STREAM */ - - -/* ========================================== - * XXH3 128 bits (a.k.a XXH128) - * ========================================== - * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant, - * even without counting the significantly larger output size. - * - * For example, extra steps are taken to avoid the seed-dependent collisions - * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B). - * - * This strength naturally comes at the cost of some speed, especially on short - * lengths. Note that longer hashes are about as fast as the 64-bit version - * due to it using only a slight modification of the 64-bit loop. - * - * XXH128 is also more oriented towards 64-bit machines. It is still extremely - * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64). - */ - -XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - /* A doubled version of 1to3_64b with different constants. */ - XXH_ASSERT(input != NULL); - XXH_ASSERT(1 <= len && len <= 3); - XXH_ASSERT(secret != NULL); - /* - * len = 1: combinedl = { input[0], 0x01, input[0], input[0] } - * len = 2: combinedl = { input[1], 0x02, input[0], input[1] } - * len = 3: combinedl = { input[2], 0x03, input[0], input[1] } - */ - { xxh_u8 const c1 = input[0]; - xxh_u8 const c2 = input[len >> 1]; - xxh_u8 const c3 = input[len - 1]; - xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24) - | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); - xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13); - xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; - xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed; - xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl; - xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph; - XXH128_hash_t h128; - h128.low64 = XXH64_avalanche(keyed_lo); - h128.high64 = XXH64_avalanche(keyed_hi); - return h128; - } -} - -XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(input != NULL); - XXH_ASSERT(secret != NULL); - XXH_ASSERT(4 <= len && len <= 8); - seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; - { xxh_u32 const input_lo = XXH_readLE32(input); - xxh_u32 const input_hi = XXH_readLE32(input + len - 4); - xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32); - xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed; - xxh_u64 const keyed = input_64 ^ bitflip; - - /* Shift len to the left to ensure it is even, this avoids even multiplies. */ - XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2)); - - m128.high64 += (m128.low64 << 1); - m128.low64 ^= (m128.high64 >> 3); - - m128.low64 = XXH_xorshift64(m128.low64, 35); - m128.low64 *= PRIME_MX2; - m128.low64 = XXH_xorshift64(m128.low64, 28); - m128.high64 = XXH3_avalanche(m128.high64); - return m128; - } -} - -XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(input != NULL); - XXH_ASSERT(secret != NULL); - XXH_ASSERT(9 <= len && len <= 16); - { xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed; - xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed; - xxh_u64 const input_lo = XXH_readLE64(input); - xxh_u64 input_hi = XXH_readLE64(input + len - 8); - XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1); - /* - * Put len in the middle of m128 to ensure that the length gets mixed to - * both the low and high bits in the 128x64 multiply below. - */ - m128.low64 += (xxh_u64)(len - 1) << 54; - input_hi ^= bitfliph; - /* - * Add the high 32 bits of input_hi to the high 32 bits of m128, then - * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to - * the high 64 bits of m128. - * - * The best approach to this operation is different on 32-bit and 64-bit. - */ - if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */ - /* - * 32-bit optimized version, which is more readable. - * - * On 32-bit, it removes an ADC and delays a dependency between the two - * halves of m128.high64, but it generates an extra mask on 64-bit. - */ - m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2); - } else { - /* - * 64-bit optimized (albeit more confusing) version. - * - * Uses some properties of addition and multiplication to remove the mask: - * - * Let: - * a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF) - * b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000) - * c = XXH_PRIME32_2 - * - * a + (b * c) - * Inverse Property: x + y - x == y - * a + (b * (1 + c - 1)) - * Distributive Property: x * (y + z) == (x * y) + (x * z) - * a + (b * 1) + (b * (c - 1)) - * Identity Property: x * 1 == x - * a + b + (b * (c - 1)) - * - * Substitute a, b, and c: - * input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) - * - * Since input_hi.hi + input_hi.lo == input_hi, we get this: - * input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) - */ - m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1); - } - /* m128 ^= XXH_swap64(m128 >> 64); */ - m128.low64 ^= XXH_swap64(m128.high64); - - { /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */ - XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2); - h128.high64 += m128.high64 * XXH_PRIME64_2; - - h128.low64 = XXH3_avalanche(h128.low64); - h128.high64 = XXH3_avalanche(h128.high64); - return h128; - } } -} - -/* - * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN - */ -XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) -{ - XXH_ASSERT(len <= 16); - { if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed); - if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed); - if (len) return XXH3_len_1to3_128b(input, len, secret, seed); - { XXH128_hash_t h128; - xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72); - xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88); - h128.low64 = XXH64_avalanche(seed ^ bitflipl); - h128.high64 = XXH64_avalanche( seed ^ bitfliph); - return h128; - } } -} - -/* - * A bit slower than XXH3_mix16B, but handles multiply by zero better. - */ -XXH_FORCE_INLINE XXH128_hash_t -XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2, - const xxh_u8* secret, XXH64_hash_t seed) -{ - acc.low64 += XXH3_mix16B (input_1, secret+0, seed); - acc.low64 ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8); - acc.high64 += XXH3_mix16B (input_2, secret+16, seed); - acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8); - return acc; -} - - -XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH64_hash_t seed) -{ - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; - XXH_ASSERT(16 < len && len <= 128); - - { XXH128_hash_t acc; - acc.low64 = len * XXH_PRIME64_1; - acc.high64 = 0; - -#if XXH_SIZE_OPT >= 1 - { - /* Smaller, but slightly slower. */ - unsigned int i = (unsigned int)(len - 1) / 32; - do { - acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed); - } while (i-- != 0); - } -#else - if (len > 32) { - if (len > 64) { - if (len > 96) { - acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed); - } - acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed); - } - acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed); - } - acc = XXH128_mix32B(acc, input, input+len-16, secret, seed); -#endif - { XXH128_hash_t h128; - h128.low64 = acc.low64 + acc.high64; - h128.high64 = (acc.low64 * XXH_PRIME64_1) - + (acc.high64 * XXH_PRIME64_4) - + ((len - seed) * XXH_PRIME64_2); - h128.low64 = XXH3_avalanche(h128.low64); - h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); - return h128; - } - } -} - -XXH_NO_INLINE XXH_PUREF XXH128_hash_t -XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH64_hash_t seed) -{ - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; - XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); - - { XXH128_hash_t acc; - unsigned i; - acc.low64 = len * XXH_PRIME64_1; - acc.high64 = 0; - /* - * We set as `i` as offset + 32. We do this so that unchanged - * `len` can be used as upper bound. This reaches a sweet spot - * where both x86 and aarch64 get simple agen and good codegen - * for the loop. - */ - for (i = 32; i < 160; i += 32) { - acc = XXH128_mix32B(acc, - input + i - 32, - input + i - 16, - secret + i - 32, - seed); - } - acc.low64 = XXH3_avalanche(acc.low64); - acc.high64 = XXH3_avalanche(acc.high64); - /* - * NB: `i <= len` will duplicate the last 32-bytes if - * len % 32 was zero. This is an unfortunate necessity to keep - * the hash result stable. - */ - for (i=160; i <= len; i += 32) { - acc = XXH128_mix32B(acc, - input + i - 32, - input + i - 16, - secret + XXH3_MIDSIZE_STARTOFFSET + i - 160, - seed); - } - /* last bytes */ - acc = XXH128_mix32B(acc, - input + len - 16, - input + len - 32, - secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16, - (XXH64_hash_t)0 - seed); - - { XXH128_hash_t h128; - h128.low64 = acc.low64 + acc.high64; - h128.high64 = (acc.low64 * XXH_PRIME64_1) - + (acc.high64 * XXH_PRIME64_4) - + ((len - seed) * XXH_PRIME64_2); - h128.low64 = XXH3_avalanche(h128.low64); - h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); - return h128; - } - } -} - -XXH_FORCE_INLINE XXH128_hash_t -XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len, - const xxh_u8* XXH_RESTRICT secret, size_t secretSize, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble) -{ - XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; - - XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc, f_scramble); - - /* converge into final hash */ - XXH_STATIC_ASSERT(sizeof(acc) == 64); - XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); - { XXH128_hash_t h128; - h128.low64 = XXH3_mergeAccs(acc, - secret + XXH_SECRET_MERGEACCS_START, - (xxh_u64)len * XXH_PRIME64_1); - h128.high64 = XXH3_mergeAccs(acc, - secret + secretSize - - sizeof(acc) - XXH_SECRET_MERGEACCS_START, - ~((xxh_u64)len * XXH_PRIME64_2)); - return h128; - } -} - -/* - * It's important for performance that XXH3_hashLong() is not inlined. - */ -XXH_NO_INLINE XXH_PUREF XXH128_hash_t -XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, - const void* XXH_RESTRICT secret, size_t secretLen) -{ - (void)seed64; (void)secret; (void)secretLen; - return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), - XXH3_accumulate, XXH3_scrambleAcc); -} - -/* - * It's important for performance to pass @p secretLen (when it's static) - * to the compiler, so that it can properly optimize the vectorized loop. - * - * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE - * breaks -Og, this is XXH_NO_INLINE. - */ -XXH3_WITH_SECRET_INLINE XXH128_hash_t -XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, - const void* XXH_RESTRICT secret, size_t secretLen) -{ - (void)seed64; - return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen, - XXH3_accumulate, XXH3_scrambleAcc); -} - -XXH_FORCE_INLINE XXH128_hash_t -XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len, - XXH64_hash_t seed64, - XXH3_f_accumulate f_acc, - XXH3_f_scrambleAcc f_scramble, - XXH3_f_initCustomSecret f_initSec) -{ - if (seed64 == 0) - return XXH3_hashLong_128b_internal(input, len, - XXH3_kSecret, sizeof(XXH3_kSecret), - f_acc, f_scramble); - { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; - f_initSec(secret, seed64); - return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret), - f_acc, f_scramble); - } -} - -/* - * It's important for performance that XXH3_hashLong is not inlined. - */ -XXH_NO_INLINE XXH128_hash_t -XXH3_hashLong_128b_withSeed(const void* input, size_t len, - XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen) -{ - (void)secret; (void)secretLen; - return XXH3_hashLong_128b_withSeed_internal(input, len, seed64, - XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret); -} - -typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t, - XXH64_hash_t, const void* XXH_RESTRICT, size_t); - -XXH_FORCE_INLINE XXH128_hash_t -XXH3_128bits_internal(const void* input, size_t len, - XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, - XXH3_hashLong128_f f_hl128) -{ - XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); - /* - * If an action is to be taken if `secret` conditions are not respected, - * it should be done here. - * For now, it's a contract pre-condition. - * Adding a check and a branch here would cost performance at every hash. - */ - if (len <= 16) - return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); - if (len <= 128) - return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); - if (len <= XXH3_MIDSIZE_MAX) - return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); - return f_hl128(input, len, seed64, secret, secretLen); -} - - -/* === Public XXH128 API === */ - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input, size_t len) -{ - return XXH3_128bits_internal(input, len, 0, - XXH3_kSecret, sizeof(XXH3_kSecret), - XXH3_hashLong_128b_default); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t -XXH3_128bits_withSecret(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize) -{ - return XXH3_128bits_internal(input, len, 0, - (const xxh_u8*)secret, secretSize, - XXH3_hashLong_128b_withSecret); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t -XXH3_128bits_withSeed(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed) -{ - return XXH3_128bits_internal(input, len, seed, - XXH3_kSecret, sizeof(XXH3_kSecret), - XXH3_hashLong_128b_withSeed); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t -XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) -{ - if (len <= XXH3_MIDSIZE_MAX) - return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); - return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t -XXH128(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed) -{ - return XXH3_128bits_withSeed(input, len, seed); -} - - -/* === XXH3 128-bit streaming === */ -#ifndef XXH_NO_STREAM -/* - * All initialization and update functions are identical to 64-bit streaming variant. - * The only difference is the finalization routine. - */ - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr) -{ - return XXH3_64bits_reset(statePtr); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize) -{ - return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed) -{ - return XXH3_64bits_reset_withSeed(statePtr, seed); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) -{ - return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) -{ - return XXH3_64bits_update(state, input, len); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* state) -{ - const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; - if (state->totalLen > XXH3_MIDSIZE_MAX) { - XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; - XXH3_digest_long(acc, state, secret); - XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); - { XXH128_hash_t h128; - h128.low64 = XXH3_mergeAccs(acc, - secret + XXH_SECRET_MERGEACCS_START, - (xxh_u64)state->totalLen * XXH_PRIME64_1); - h128.high64 = XXH3_mergeAccs(acc, - secret + state->secretLimit + XXH_STRIPE_LEN - - sizeof(acc) - XXH_SECRET_MERGEACCS_START, - ~((xxh_u64)state->totalLen * XXH_PRIME64_2)); - return h128; - } - } - /* len <= XXH3_MIDSIZE_MAX : short code */ - if (state->seed) - return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); - return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen), - secret, state->secretLimit + XXH_STRIPE_LEN); -} -#endif /* !XXH_NO_STREAM */ -/* 128-bit utility functions */ - -/* return : 1 is equal, 0 if different */ -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2) -{ - /* note : XXH128_hash_t is compact, it has no padding byte */ - return !(memcmp(&h1, &h2, sizeof(h1))); -} - -/* This prototype is compatible with stdlib's qsort(). - * @return : >0 if *h128_1 > *h128_2 - * <0 if *h128_1 < *h128_2 - * =0 if *h128_1 == *h128_2 */ -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2) -{ - XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1; - XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2; - int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64); - /* note : bets that, in most cases, hash values are different */ - if (hcmp) return hcmp; - return (h1.low64 > h2.low64) - (h2.low64 > h1.low64); -} - - -/*====== Canonical representation ======*/ -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API void -XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash) -{ - XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t)); - if (XXH_CPU_LITTLE_ENDIAN) { - hash.high64 = XXH_swap64(hash.high64); - hash.low64 = XXH_swap64(hash.low64); - } - XXH_memcpy(dst, &hash.high64, sizeof(hash.high64)); - XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64)); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH128_hash_t -XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src) -{ - XXH128_hash_t h; - h.high64 = XXH_readBE64(src); - h.low64 = XXH_readBE64(src->digest + 8); - return h; -} - - - -/* ========================================== - * Secret generators - * ========================================== - */ -#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x)) - -XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128) -{ - XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 ); - XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 ); -} - -/*! @ingroup XXH3_family */ -XXH_PUBLIC_API XXH_errorcode -XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize) -{ -#if (XXH_DEBUGLEVEL >= 1) - XXH_ASSERT(secretBuffer != NULL); - XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); -#else - /* production mode, assert() are disabled */ - if (secretBuffer == NULL) return XXH_ERROR; - if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; -#endif - - if (customSeedSize == 0) { - customSeed = XXH3_kSecret; - customSeedSize = XXH_SECRET_DEFAULT_SIZE; - } -#if (XXH_DEBUGLEVEL >= 1) - XXH_ASSERT(customSeed != NULL); -#else - if (customSeed == NULL) return XXH_ERROR; -#endif - - /* Fill secretBuffer with a copy of customSeed - repeat as needed */ - { size_t pos = 0; - while (pos < secretSize) { - size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize); - memcpy((char*)secretBuffer + pos, customSeed, toCopy); - pos += toCopy; - } } - - { size_t const nbSeg16 = secretSize / 16; - size_t n; - XXH128_canonical_t scrambler; - XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0)); - for (n=0; n -#include -#include - -#if defined(__GNUC__) && __GNUC__ >= 4 -# define ZSTD_memcpy(d,s,l) __builtin_memcpy((d),(s),(l)) -# define ZSTD_memmove(d,s,l) __builtin_memmove((d),(s),(l)) -# define ZSTD_memset(p,v,l) __builtin_memset((p),(v),(l)) -#else -# define ZSTD_memcpy(d,s,l) memcpy((d),(s),(l)) -# define ZSTD_memmove(d,s,l) memmove((d),(s),(l)) -# define ZSTD_memset(p,v,l) memset((p),(v),(l)) -#endif - -#endif /* ZSTD_DEPS_COMMON */ - -/* Need: - * ZSTD_malloc() - * ZSTD_free() - * ZSTD_calloc() - */ -#ifdef ZSTD_DEPS_NEED_MALLOC -#ifndef ZSTD_DEPS_MALLOC -#define ZSTD_DEPS_MALLOC - -#include - -#define ZSTD_malloc(s) malloc(s) -#define ZSTD_calloc(n,s) calloc((n), (s)) -#define ZSTD_free(p) free((p)) - -#endif /* ZSTD_DEPS_MALLOC */ -#endif /* ZSTD_DEPS_NEED_MALLOC */ - -/* - * Provides 64-bit math support. - * Need: - * U64 ZSTD_div64(U64 dividend, U32 divisor) - */ -#ifdef ZSTD_DEPS_NEED_MATH64 -#ifndef ZSTD_DEPS_MATH64 -#define ZSTD_DEPS_MATH64 - -#define ZSTD_div64(dividend, divisor) ((dividend) / (divisor)) - -#endif /* ZSTD_DEPS_MATH64 */ -#endif /* ZSTD_DEPS_NEED_MATH64 */ - -/* Need: - * assert() - */ -#ifdef ZSTD_DEPS_NEED_ASSERT -#ifndef ZSTD_DEPS_ASSERT -#define ZSTD_DEPS_ASSERT - -#include - -#endif /* ZSTD_DEPS_ASSERT */ -#endif /* ZSTD_DEPS_NEED_ASSERT */ - -/* Need: - * ZSTD_DEBUG_PRINT() - */ -#ifdef ZSTD_DEPS_NEED_IO -#ifndef ZSTD_DEPS_IO -#define ZSTD_DEPS_IO - -#include -#define ZSTD_DEBUG_PRINT(...) fprintf(stderr, __VA_ARGS__) - -#endif /* ZSTD_DEPS_IO */ -#endif /* ZSTD_DEPS_NEED_IO */ - -/* Only requested when is known to be present. - * Need: - * intptr_t - */ -#ifdef ZSTD_DEPS_NEED_STDINT -#ifndef ZSTD_DEPS_STDINT -#define ZSTD_DEPS_STDINT - -#include - -#endif /* ZSTD_DEPS_STDINT */ -#endif /* ZSTD_DEPS_NEED_STDINT */ diff --git a/third_party/zstd/lib/common/zstd_internal.h b/third_party/zstd/lib/common/zstd_internal.h deleted file mode 100644 index 2789a35..0000000 --- a/third_party/zstd/lib/common/zstd_internal.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_CCOMMON_H_MODULE -#define ZSTD_CCOMMON_H_MODULE - -/* this module contains definitions which must be identical - * across compression, decompression and dictBuilder. - * It also contains a few functions useful to at least 2 of them - * and which benefit from being inlined */ - -/*-************************************* -* Dependencies -***************************************/ -#include "compiler.h" -#include "cpu.h" -#include "mem.h" -#include "debug.h" /* assert, DEBUGLOG, RAWLOG, g_debuglevel */ -#include "error_private.h" -#define ZSTD_STATIC_LINKING_ONLY -#include "../zstd.h" -#define FSE_STATIC_LINKING_ONLY -#include "fse.h" -#include "huf.h" -#ifndef XXH_STATIC_LINKING_ONLY -# define XXH_STATIC_LINKING_ONLY /* XXH64_state_t */ -#endif -#include "xxhash.h" /* XXH_reset, update, digest */ -#ifndef ZSTD_NO_TRACE -# include "zstd_trace.h" -#else -# define ZSTD_TRACE 0 -#endif - -/* ---- static assert (debug) --- */ -#define ZSTD_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) -#define ZSTD_isError ERR_isError /* for inlining */ -#define FSE_isError ERR_isError -#define HUF_isError ERR_isError - - -/*-************************************* -* shared macros -***************************************/ -#undef MIN -#undef MAX -#define MIN(a,b) ((a)<(b) ? (a) : (b)) -#define MAX(a,b) ((a)>(b) ? (a) : (b)) -#define BOUNDED(min,val,max) (MAX(min,MIN(val,max))) - - -/*-************************************* -* Common constants -***************************************/ -#define ZSTD_OPT_NUM (1<<12) - -#define ZSTD_REP_NUM 3 /* number of repcodes */ -static UNUSED_ATTR const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 }; - -#define KB *(1 <<10) -#define MB *(1 <<20) -#define GB *(1U<<30) - -#define BIT7 128 -#define BIT6 64 -#define BIT5 32 -#define BIT4 16 -#define BIT1 2 -#define BIT0 1 - -#define ZSTD_WINDOWLOG_ABSOLUTEMIN 10 -static UNUSED_ATTR const size_t ZSTD_fcs_fieldSize[4] = { 0, 2, 4, 8 }; -static UNUSED_ATTR const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 }; - -#define ZSTD_FRAMEIDSIZE 4 /* magic number size */ - -#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */ -static UNUSED_ATTR const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE; -typedef enum { bt_raw, bt_rle, bt_compressed, bt_reserved } blockType_e; - -#define ZSTD_FRAMECHECKSUMSIZE 4 - -#define MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ -#define MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */) /* for a non-null block */ -#define MIN_LITERALS_FOR_4_STREAMS 6 - -typedef enum { set_basic, set_rle, set_compressed, set_repeat } SymbolEncodingType_e; - -#define LONGNBSEQ 0x7F00 - -#define MINMATCH 3 - -#define Litbits 8 -#define LitHufLog 11 -#define MaxLit ((1<= WILDCOPY_VECLEN || diff <= -WILDCOPY_VECLEN); - /* Separate out the first COPY16() call because the copy length is - * almost certain to be short, so the branches have different - * probabilities. Since it is almost certain to be short, only do - * one COPY16() in the first call. Then, do two calls per loop since - * at that point it is more likely to have a high trip count. - */ - ZSTD_copy16(op, ip); - if (16 >= length) return; - op += 16; - ip += 16; - do { - COPY16(op, ip); - COPY16(op, ip); - } - while (op < oend); - } -} - -MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ - size_t const length = MIN(dstCapacity, srcSize); - if (length > 0) { - ZSTD_memcpy(dst, src, length); - } - return length; -} - -/* define "workspace is too large" as this number of times larger than needed */ -#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 - -/* when workspace is continuously too large - * during at least this number of times, - * context's memory usage is considered wasteful, - * because it's sized to handle a worst case scenario which rarely happens. - * In which case, resize it down to free some memory */ -#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 - -/* Controls whether the input/output buffer is buffered or stable. */ -typedef enum { - ZSTD_bm_buffered = 0, /* Buffer the input/output */ - ZSTD_bm_stable = 1 /* ZSTD_inBuffer/ZSTD_outBuffer is stable */ -} ZSTD_bufferMode_e; - - -/*-******************************************* -* Private declarations -*********************************************/ - -/** - * Contains the compressed frame size and an upper-bound for the decompressed frame size. - * Note: before using `compressedSize`, check for errors using ZSTD_isError(). - * similarly, before using `decompressedBound`, check for errors using: - * `decompressedBound != ZSTD_CONTENTSIZE_ERROR` - */ -typedef struct { - size_t nbBlocks; - size_t compressedSize; - unsigned long long decompressedBound; -} ZSTD_frameSizeInfo; /* decompress & legacy */ - -/* ZSTD_invalidateRepCodes() : - * ensures next compression will not use repcodes from previous block. - * Note : only works with regular variant; - * do not use with extDict variant ! */ -void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx); /* zstdmt, adaptive_compression (shouldn't get this definition from here) */ - - -typedef struct { - blockType_e blockType; - U32 lastBlock; - U32 origSize; -} blockProperties_t; /* declared here for decompress and fullbench */ - -/*! ZSTD_getcBlockSize() : - * Provides the size of compressed block from block header `src` */ -/* Used by: decompress, fullbench */ -size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, - blockProperties_t* bpPtr); - -/*! ZSTD_decodeSeqHeaders() : - * decode sequence header from src */ -/* Used by: zstd_decompress_block, fullbench */ -size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, - const void* src, size_t srcSize); - -/** - * @returns true iff the CPU supports dynamic BMI2 dispatch. - */ -MEM_STATIC int ZSTD_cpuSupportsBmi2(void) -{ - ZSTD_cpuid_t cpuid = ZSTD_cpuid(); - return ZSTD_cpuid_bmi1(cpuid) && ZSTD_cpuid_bmi2(cpuid); -} - -#endif /* ZSTD_CCOMMON_H_MODULE */ diff --git a/third_party/zstd/lib/common/zstd_trace.h b/third_party/zstd/lib/common/zstd_trace.h deleted file mode 100644 index d8eec10..0000000 --- a/third_party/zstd/lib/common/zstd_trace.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_TRACE_H -#define ZSTD_TRACE_H - -#include - -/* weak symbol support - * For now, enable conservatively: - * - Only GNUC - * - Only ELF - * - Only x86-64, i386, aarch64 and risc-v. - * Also, explicitly disable on platforms known not to work so they aren't - * forgotten in the future. - */ -#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && \ - defined(__GNUC__) && defined(__ELF__) && \ - (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86) || defined(__aarch64__) || defined(__riscv)) && \ - !defined(__APPLE__) && !defined(_WIN32) && !defined(__MINGW32__) && \ - !defined(__CYGWIN__) && !defined(_AIX) -# define ZSTD_HAVE_WEAK_SYMBOLS 1 -#else -# define ZSTD_HAVE_WEAK_SYMBOLS 0 -#endif -#if ZSTD_HAVE_WEAK_SYMBOLS -# define ZSTD_WEAK_ATTR __attribute__((__weak__)) -#else -# define ZSTD_WEAK_ATTR -#endif - -/* Only enable tracing when weak symbols are available. */ -#ifndef ZSTD_TRACE -# define ZSTD_TRACE ZSTD_HAVE_WEAK_SYMBOLS -#endif - -#if ZSTD_TRACE - -struct ZSTD_CCtx_s; -struct ZSTD_DCtx_s; -struct ZSTD_CCtx_params_s; - -typedef struct { - /** - * ZSTD_VERSION_NUMBER - * - * This is guaranteed to be the first member of ZSTD_trace. - * Otherwise, this struct is not stable between versions. If - * the version number does not match your expectation, you - * should not interpret the rest of the struct. - */ - unsigned version; - /** - * Non-zero if streaming (de)compression is used. - */ - int streaming; - /** - * The dictionary ID. - */ - unsigned dictionaryID; - /** - * Is the dictionary cold? - * Only set on decompression. - */ - int dictionaryIsCold; - /** - * The dictionary size or zero if no dictionary. - */ - size_t dictionarySize; - /** - * The uncompressed size of the data. - */ - size_t uncompressedSize; - /** - * The compressed size of the data. - */ - size_t compressedSize; - /** - * The fully resolved CCtx parameters (NULL on decompression). - */ - struct ZSTD_CCtx_params_s const* params; - /** - * The ZSTD_CCtx pointer (NULL on decompression). - */ - struct ZSTD_CCtx_s const* cctx; - /** - * The ZSTD_DCtx pointer (NULL on compression). - */ - struct ZSTD_DCtx_s const* dctx; -} ZSTD_Trace; - -/** - * A tracing context. It must be 0 when tracing is disabled. - * Otherwise, any non-zero value returned by a tracing begin() - * function is presented to any subsequent calls to end(). - * - * Any non-zero value is treated as tracing is enabled and not - * interpreted by the library. - * - * Two possible uses are: - * * A timestamp for when the begin() function was called. - * * A unique key identifying the (de)compression, like the - * address of the [dc]ctx pointer if you need to track - * more information than just a timestamp. - */ -typedef unsigned long long ZSTD_TraceCtx; - -/** - * Trace the beginning of a compression call. - * @param cctx The dctx pointer for the compression. - * It can be used as a key to map begin() to end(). - * @returns Non-zero if tracing is enabled. The return value is - * passed to ZSTD_trace_compress_end(). - */ -ZSTD_WEAK_ATTR ZSTD_TraceCtx ZSTD_trace_compress_begin( - struct ZSTD_CCtx_s const* cctx); - -/** - * Trace the end of a compression call. - * @param ctx The return value of ZSTD_trace_compress_begin(). - * @param trace The zstd tracing info. - */ -ZSTD_WEAK_ATTR void ZSTD_trace_compress_end( - ZSTD_TraceCtx ctx, - ZSTD_Trace const* trace); - -/** - * Trace the beginning of a decompression call. - * @param dctx The dctx pointer for the decompression. - * It can be used as a key to map begin() to end(). - * @returns Non-zero if tracing is enabled. The return value is - * passed to ZSTD_trace_compress_end(). - */ -ZSTD_WEAK_ATTR ZSTD_TraceCtx ZSTD_trace_decompress_begin( - struct ZSTD_DCtx_s const* dctx); - -/** - * Trace the end of a decompression call. - * @param ctx The return value of ZSTD_trace_decompress_begin(). - * @param trace The zstd tracing info. - */ -ZSTD_WEAK_ATTR void ZSTD_trace_decompress_end( - ZSTD_TraceCtx ctx, - ZSTD_Trace const* trace); - -#endif /* ZSTD_TRACE */ - -#endif /* ZSTD_TRACE_H */ diff --git a/third_party/zstd/lib/compress/clevels.h b/third_party/zstd/lib/compress/clevels.h deleted file mode 100644 index c18da46..0000000 --- a/third_party/zstd/lib/compress/clevels.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_CLEVELS_H -#define ZSTD_CLEVELS_H - -#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_compressionParameters */ -#include "../zstd.h" - -/*-===== Pre-defined compression levels =====-*/ - -#define ZSTD_MAX_CLEVEL 22 - -#ifdef __GNUC__ -__attribute__((__unused__)) -#endif - -static const ZSTD_compressionParameters ZSTD_defaultCParameters[4][ZSTD_MAX_CLEVEL+1] = { -{ /* "default" - for any srcSize > 256 KB */ - /* W, C, H, S, L, TL, strat */ - { 19, 12, 13, 1, 6, 1, ZSTD_fast }, /* base for negative levels */ - { 19, 13, 14, 1, 7, 0, ZSTD_fast }, /* level 1 */ - { 20, 15, 16, 1, 6, 0, ZSTD_fast }, /* level 2 */ - { 21, 16, 17, 1, 5, 0, ZSTD_dfast }, /* level 3 */ - { 21, 18, 18, 1, 5, 0, ZSTD_dfast }, /* level 4 */ - { 21, 18, 19, 3, 5, 2, ZSTD_greedy }, /* level 5 */ - { 21, 18, 19, 3, 5, 4, ZSTD_lazy }, /* level 6 */ - { 21, 19, 20, 4, 5, 8, ZSTD_lazy }, /* level 7 */ - { 21, 19, 20, 4, 5, 16, ZSTD_lazy2 }, /* level 8 */ - { 22, 20, 21, 4, 5, 16, ZSTD_lazy2 }, /* level 9 */ - { 22, 21, 22, 5, 5, 16, ZSTD_lazy2 }, /* level 10 */ - { 22, 21, 22, 6, 5, 16, ZSTD_lazy2 }, /* level 11 */ - { 22, 22, 23, 6, 5, 32, ZSTD_lazy2 }, /* level 12 */ - { 22, 22, 22, 4, 5, 32, ZSTD_btlazy2 }, /* level 13 */ - { 22, 22, 23, 5, 5, 32, ZSTD_btlazy2 }, /* level 14 */ - { 22, 23, 23, 6, 5, 32, ZSTD_btlazy2 }, /* level 15 */ - { 22, 22, 22, 5, 5, 48, ZSTD_btopt }, /* level 16 */ - { 23, 23, 22, 5, 4, 64, ZSTD_btopt }, /* level 17 */ - { 23, 23, 22, 6, 3, 64, ZSTD_btultra }, /* level 18 */ - { 23, 24, 22, 7, 3,256, ZSTD_btultra2}, /* level 19 */ - { 25, 25, 23, 7, 3,256, ZSTD_btultra2}, /* level 20 */ - { 26, 26, 24, 7, 3,512, ZSTD_btultra2}, /* level 21 */ - { 27, 27, 25, 9, 3,999, ZSTD_btultra2}, /* level 22 */ -}, -{ /* for srcSize <= 256 KB */ - /* W, C, H, S, L, T, strat */ - { 18, 12, 13, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ - { 18, 13, 14, 1, 6, 0, ZSTD_fast }, /* level 1 */ - { 18, 14, 14, 1, 5, 0, ZSTD_dfast }, /* level 2 */ - { 18, 16, 16, 1, 4, 0, ZSTD_dfast }, /* level 3 */ - { 18, 16, 17, 3, 5, 2, ZSTD_greedy }, /* level 4.*/ - { 18, 17, 18, 5, 5, 2, ZSTD_greedy }, /* level 5.*/ - { 18, 18, 19, 3, 5, 4, ZSTD_lazy }, /* level 6.*/ - { 18, 18, 19, 4, 4, 4, ZSTD_lazy }, /* level 7 */ - { 18, 18, 19, 4, 4, 8, ZSTD_lazy2 }, /* level 8 */ - { 18, 18, 19, 5, 4, 8, ZSTD_lazy2 }, /* level 9 */ - { 18, 18, 19, 6, 4, 8, ZSTD_lazy2 }, /* level 10 */ - { 18, 18, 19, 5, 4, 12, ZSTD_btlazy2 }, /* level 11.*/ - { 18, 19, 19, 7, 4, 12, ZSTD_btlazy2 }, /* level 12.*/ - { 18, 18, 19, 4, 4, 16, ZSTD_btopt }, /* level 13 */ - { 18, 18, 19, 4, 3, 32, ZSTD_btopt }, /* level 14.*/ - { 18, 18, 19, 6, 3,128, ZSTD_btopt }, /* level 15.*/ - { 18, 19, 19, 6, 3,128, ZSTD_btultra }, /* level 16.*/ - { 18, 19, 19, 8, 3,256, ZSTD_btultra }, /* level 17.*/ - { 18, 19, 19, 6, 3,128, ZSTD_btultra2}, /* level 18.*/ - { 18, 19, 19, 8, 3,256, ZSTD_btultra2}, /* level 19.*/ - { 18, 19, 19, 10, 3,512, ZSTD_btultra2}, /* level 20.*/ - { 18, 19, 19, 12, 3,512, ZSTD_btultra2}, /* level 21.*/ - { 18, 19, 19, 13, 3,999, ZSTD_btultra2}, /* level 22.*/ -}, -{ /* for srcSize <= 128 KB */ - /* W, C, H, S, L, T, strat */ - { 17, 12, 12, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ - { 17, 12, 13, 1, 6, 0, ZSTD_fast }, /* level 1 */ - { 17, 13, 15, 1, 5, 0, ZSTD_fast }, /* level 2 */ - { 17, 15, 16, 2, 5, 0, ZSTD_dfast }, /* level 3 */ - { 17, 17, 17, 2, 4, 0, ZSTD_dfast }, /* level 4 */ - { 17, 16, 17, 3, 4, 2, ZSTD_greedy }, /* level 5 */ - { 17, 16, 17, 3, 4, 4, ZSTD_lazy }, /* level 6 */ - { 17, 16, 17, 3, 4, 8, ZSTD_lazy2 }, /* level 7 */ - { 17, 16, 17, 4, 4, 8, ZSTD_lazy2 }, /* level 8 */ - { 17, 16, 17, 5, 4, 8, ZSTD_lazy2 }, /* level 9 */ - { 17, 16, 17, 6, 4, 8, ZSTD_lazy2 }, /* level 10 */ - { 17, 17, 17, 5, 4, 8, ZSTD_btlazy2 }, /* level 11 */ - { 17, 18, 17, 7, 4, 12, ZSTD_btlazy2 }, /* level 12 */ - { 17, 18, 17, 3, 4, 12, ZSTD_btopt }, /* level 13.*/ - { 17, 18, 17, 4, 3, 32, ZSTD_btopt }, /* level 14.*/ - { 17, 18, 17, 6, 3,256, ZSTD_btopt }, /* level 15.*/ - { 17, 18, 17, 6, 3,128, ZSTD_btultra }, /* level 16.*/ - { 17, 18, 17, 8, 3,256, ZSTD_btultra }, /* level 17.*/ - { 17, 18, 17, 10, 3,512, ZSTD_btultra }, /* level 18.*/ - { 17, 18, 17, 5, 3,256, ZSTD_btultra2}, /* level 19.*/ - { 17, 18, 17, 7, 3,512, ZSTD_btultra2}, /* level 20.*/ - { 17, 18, 17, 9, 3,512, ZSTD_btultra2}, /* level 21.*/ - { 17, 18, 17, 11, 3,999, ZSTD_btultra2}, /* level 22.*/ -}, -{ /* for srcSize <= 16 KB */ - /* W, C, H, S, L, T, strat */ - { 14, 12, 13, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ - { 14, 14, 15, 1, 5, 0, ZSTD_fast }, /* level 1 */ - { 14, 14, 15, 1, 4, 0, ZSTD_fast }, /* level 2 */ - { 14, 14, 15, 2, 4, 0, ZSTD_dfast }, /* level 3 */ - { 14, 14, 14, 4, 4, 2, ZSTD_greedy }, /* level 4 */ - { 14, 14, 14, 3, 4, 4, ZSTD_lazy }, /* level 5.*/ - { 14, 14, 14, 4, 4, 8, ZSTD_lazy2 }, /* level 6 */ - { 14, 14, 14, 6, 4, 8, ZSTD_lazy2 }, /* level 7 */ - { 14, 14, 14, 8, 4, 8, ZSTD_lazy2 }, /* level 8.*/ - { 14, 15, 14, 5, 4, 8, ZSTD_btlazy2 }, /* level 9.*/ - { 14, 15, 14, 9, 4, 8, ZSTD_btlazy2 }, /* level 10.*/ - { 14, 15, 14, 3, 4, 12, ZSTD_btopt }, /* level 11.*/ - { 14, 15, 14, 4, 3, 24, ZSTD_btopt }, /* level 12.*/ - { 14, 15, 14, 5, 3, 32, ZSTD_btultra }, /* level 13.*/ - { 14, 15, 15, 6, 3, 64, ZSTD_btultra }, /* level 14.*/ - { 14, 15, 15, 7, 3,256, ZSTD_btultra }, /* level 15.*/ - { 14, 15, 15, 5, 3, 48, ZSTD_btultra2}, /* level 16.*/ - { 14, 15, 15, 6, 3,128, ZSTD_btultra2}, /* level 17.*/ - { 14, 15, 15, 7, 3,256, ZSTD_btultra2}, /* level 18.*/ - { 14, 15, 15, 8, 3,256, ZSTD_btultra2}, /* level 19.*/ - { 14, 15, 15, 8, 3,512, ZSTD_btultra2}, /* level 20.*/ - { 14, 15, 15, 9, 3,512, ZSTD_btultra2}, /* level 21.*/ - { 14, 15, 15, 10, 3,999, ZSTD_btultra2}, /* level 22.*/ -}, -}; - - - -#endif /* ZSTD_CLEVELS_H */ diff --git a/third_party/zstd/lib/compress/fse_compress.c b/third_party/zstd/lib/compress/fse_compress.c deleted file mode 100644 index 1ce3cf1..0000000 --- a/third_party/zstd/lib/compress/fse_compress.c +++ /dev/null @@ -1,625 +0,0 @@ -/* ****************************************************************** - * FSE : Finite State Entropy encoder - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* ************************************************************** -* Includes -****************************************************************/ -#include "../common/compiler.h" -#include "../common/mem.h" /* U32, U16, etc. */ -#include "../common/debug.h" /* assert, DEBUGLOG */ -#include "hist.h" /* HIST_count_wksp */ -#include "../common/bitstream.h" -#define FSE_STATIC_LINKING_ONLY -#include "../common/fse.h" -#include "../common/error_private.h" -#define ZSTD_DEPS_NEED_MALLOC -#define ZSTD_DEPS_NEED_MATH64 -#include "../common/zstd_deps.h" /* ZSTD_memset */ -#include "../common/bits.h" /* ZSTD_highbit32 */ - - -/* ************************************************************** -* Error Management -****************************************************************/ -#define FSE_isError ERR_isError - - -/* ************************************************************** -* Templates -****************************************************************/ -/* - designed to be included - for type-specific functions (template emulation in C) - Objective is to write these functions only once, for improved maintenance -*/ - -/* safety checks */ -#ifndef FSE_FUNCTION_EXTENSION -# error "FSE_FUNCTION_EXTENSION must be defined" -#endif -#ifndef FSE_FUNCTION_TYPE -# error "FSE_FUNCTION_TYPE must be defined" -#endif - -/* Function names */ -#define FSE_CAT(X,Y) X##Y -#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) -#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) - - -/* Function templates */ - -/* FSE_buildCTable_wksp() : - * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). - * wkspSize should be sized to handle worst case situation, which is `1<>1 : 1) ; - FSE_symbolCompressionTransform* const symbolTT = (FSE_symbolCompressionTransform*) (FSCT); - U32 const step = FSE_TABLESTEP(tableSize); - U32 const maxSV1 = maxSymbolValue+1; - - U16* cumul = (U16*)workSpace; /* size = maxSV1 */ - FSE_FUNCTION_TYPE* const tableSymbol = (FSE_FUNCTION_TYPE*)(cumul + (maxSV1+1)); /* size = tableSize */ - - U32 highThreshold = tableSize-1; - - assert(((size_t)workSpace & 1) == 0); /* Must be 2 bytes-aligned */ - if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge); - /* CTable header */ - tableU16[-2] = (U16) tableLog; - tableU16[-1] = (U16) maxSymbolValue; - assert(tableLog < 16); /* required for threshold strategy to work */ - - /* For explanations on how to distribute symbol values over the table : - * https://fastcompression.blogspot.fr/2014/02/fse-distributing-symbol-values.html */ - - #ifdef __clang_analyzer__ - ZSTD_memset(tableSymbol, 0, sizeof(*tableSymbol) * tableSize); /* useless initialization, just to keep scan-build happy */ - #endif - - /* symbol start positions */ - { U32 u; - cumul[0] = 0; - for (u=1; u <= maxSV1; u++) { - if (normalizedCounter[u-1]==-1) { /* Low proba symbol */ - cumul[u] = cumul[u-1] + 1; - tableSymbol[highThreshold--] = (FSE_FUNCTION_TYPE)(u-1); - } else { - assert(normalizedCounter[u-1] >= 0); - cumul[u] = cumul[u-1] + (U16)normalizedCounter[u-1]; - assert(cumul[u] >= cumul[u-1]); /* no overflow */ - } } - cumul[maxSV1] = (U16)(tableSize+1); - } - - /* Spread symbols */ - if (highThreshold == tableSize - 1) { - /* Case for no low prob count symbols. Lay down 8 bytes at a time - * to reduce branch misses since we are operating on a small block - */ - BYTE* const spread = tableSymbol + tableSize; /* size = tableSize + 8 (may write beyond tableSize) */ - { U64 const add = 0x0101010101010101ull; - size_t pos = 0; - U64 sv = 0; - U32 s; - for (s=0; s=0); - pos += (size_t)n; - } - } - /* Spread symbols across the table. Lack of lowprob symbols means that - * we don't need variable sized inner loop, so we can unroll the loop and - * reduce branch misses. - */ - { size_t position = 0; - size_t s; - size_t const unroll = 2; /* Experimentally determined optimal unroll */ - assert(tableSize % unroll == 0); /* FSE_MIN_TABLELOG is 5 */ - for (s = 0; s < (size_t)tableSize; s += unroll) { - size_t u; - for (u = 0; u < unroll; ++u) { - size_t const uPosition = (position + (u * step)) & tableMask; - tableSymbol[uPosition] = spread[s + u]; - } - position = (position + (unroll * step)) & tableMask; - } - assert(position == 0); /* Must have initialized all positions */ - } - } else { - U32 position = 0; - U32 symbol; - for (symbol=0; symbol highThreshold) - position = (position + step) & tableMask; /* Low proba area */ - } } - assert(position==0); /* Must have initialized all positions */ - } - - /* Build table */ - { U32 u; for (u=0; u 1); - { U32 const maxBitsOut = tableLog - ZSTD_highbit32 ((U32)normalizedCounter[s]-1); - U32 const minStatePlus = (U32)normalizedCounter[s] << maxBitsOut; - symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; - symbolTT[s].deltaFindState = (int)(total - (unsigned)normalizedCounter[s]); - total += (unsigned)normalizedCounter[s]; - } } } } - -#if 0 /* debug : symbol costs */ - DEBUGLOG(5, "\n --- table statistics : "); - { U32 symbol; - for (symbol=0; symbol<=maxSymbolValue; symbol++) { - DEBUGLOG(5, "%3u: w=%3i, maxBits=%u, fracBits=%.2f", - symbol, normalizedCounter[symbol], - FSE_getMaxNbBits(symbolTT, symbol), - (double)FSE_bitCost(symbolTT, tableLog, symbol, 8) / 256); - } } -#endif - - return 0; -} - - - -#ifndef FSE_COMMONDEFS_ONLY - -/*-************************************************************** -* FSE NCount encoding -****************************************************************/ -size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) -{ - size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog - + 4 /* bitCount initialized at 4 */ - + 2 /* first two symbols may use one additional bit each */) / 8) - + 1 /* round up to whole nb bytes */ - + 2 /* additional two bytes for bitstream flush */; - return maxSymbolValue ? maxHeaderSize : FSE_NCOUNTBOUND; /* maxSymbolValue==0 ? use default */ -} - -static size_t -FSE_writeNCount_generic (void* header, size_t headerBufferSize, - const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, - unsigned writeIsSafe) -{ - BYTE* const ostart = (BYTE*) header; - BYTE* out = ostart; - BYTE* const oend = ostart + headerBufferSize; - int nbBits; - const int tableSize = 1 << tableLog; - int remaining; - int threshold; - U32 bitStream = 0; - int bitCount = 0; - unsigned symbol = 0; - unsigned const alphabetSize = maxSymbolValue + 1; - int previousIs0 = 0; - - /* Table Size */ - bitStream += (tableLog-FSE_MIN_TABLELOG) << bitCount; - bitCount += 4; - - /* Init */ - remaining = tableSize+1; /* +1 for extra accuracy */ - threshold = tableSize; - nbBits = (int)tableLog+1; - - while ((symbol < alphabetSize) && (remaining>1)) { /* stops at 1 */ - if (previousIs0) { - unsigned start = symbol; - while ((symbol < alphabetSize) && !normalizedCounter[symbol]) symbol++; - if (symbol == alphabetSize) break; /* incorrect distribution */ - while (symbol >= start+24) { - start+=24; - bitStream += 0xFFFFU << bitCount; - if ((!writeIsSafe) && (out > oend-2)) - return ERROR(dstSize_tooSmall); /* Buffer overflow */ - out[0] = (BYTE) bitStream; - out[1] = (BYTE)(bitStream>>8); - out+=2; - bitStream>>=16; - } - while (symbol >= start+3) { - start+=3; - bitStream += 3U << bitCount; - bitCount += 2; - } - bitStream += (symbol-start) << bitCount; - bitCount += 2; - if (bitCount>16) { - if ((!writeIsSafe) && (out > oend - 2)) - return ERROR(dstSize_tooSmall); /* Buffer overflow */ - out[0] = (BYTE)bitStream; - out[1] = (BYTE)(bitStream>>8); - out += 2; - bitStream >>= 16; - bitCount -= 16; - } } - { int count = normalizedCounter[symbol++]; - int const max = (2*threshold-1) - remaining; - remaining -= count < 0 ? -count : count; - count++; /* +1 for extra accuracy */ - if (count>=threshold) - count += max; /* [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[ */ - bitStream += (U32)count << bitCount; - bitCount += nbBits; - bitCount -= (count>=1; } - } - if (bitCount>16) { - if ((!writeIsSafe) && (out > oend - 2)) - return ERROR(dstSize_tooSmall); /* Buffer overflow */ - out[0] = (BYTE)bitStream; - out[1] = (BYTE)(bitStream>>8); - out += 2; - bitStream >>= 16; - bitCount -= 16; - } } - - if (remaining != 1) - return ERROR(GENERIC); /* incorrect normalized distribution */ - assert(symbol <= alphabetSize); - - /* flush remaining bitStream */ - if ((!writeIsSafe) && (out > oend - 2)) - return ERROR(dstSize_tooSmall); /* Buffer overflow */ - out[0] = (BYTE)bitStream; - out[1] = (BYTE)(bitStream>>8); - out+= (bitCount+7) /8; - - assert(out >= ostart); - return (size_t)(out-ostart); -} - - -size_t FSE_writeNCount (void* buffer, size_t bufferSize, - const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) -{ - if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported */ - if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported */ - - if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog)) - return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0); - - return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1 /* write in buffer is safe */); -} - - -/*-************************************************************** -* FSE Compression Code -****************************************************************/ - -/* provides the minimum logSize to safely represent a distribution */ -static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) -{ - U32 minBitsSrc = ZSTD_highbit32((U32)(srcSize)) + 1; - U32 minBitsSymbols = ZSTD_highbit32(maxSymbolValue) + 2; - U32 minBits = minBitsSrc < minBitsSymbols ? minBitsSrc : minBitsSymbols; - assert(srcSize > 1); /* Not supported, RLE should be used instead */ - return minBits; -} - -unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minus) -{ - U32 maxBitsSrc = ZSTD_highbit32((U32)(srcSize - 1)) - minus; - U32 tableLog = maxTableLog; - U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue); - assert(srcSize > 1); /* Not supported, RLE should be used instead */ - if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG; - if (maxBitsSrc < tableLog) tableLog = maxBitsSrc; /* Accuracy can be reduced */ - if (minBits > tableLog) tableLog = minBits; /* Need a minimum to safely represent all symbol values */ - if (tableLog < FSE_MIN_TABLELOG) tableLog = FSE_MIN_TABLELOG; - if (tableLog > FSE_MAX_TABLELOG) tableLog = FSE_MAX_TABLELOG; - return tableLog; -} - -unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) -{ - return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2); -} - -/* Secondary normalization method. - To be used when primary method fails. */ - -static size_t FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue, short lowProbCount) -{ - short const NOT_YET_ASSIGNED = -2; - U32 s; - U32 distributed = 0; - U32 ToDistribute; - - /* Init */ - U32 const lowThreshold = (U32)(total >> tableLog); - U32 lowOne = (U32)((total * 3) >> (tableLog + 1)); - - for (s=0; s<=maxSymbolValue; s++) { - if (count[s] == 0) { - norm[s]=0; - continue; - } - if (count[s] <= lowThreshold) { - norm[s] = lowProbCount; - distributed++; - total -= count[s]; - continue; - } - if (count[s] <= lowOne) { - norm[s] = 1; - distributed++; - total -= count[s]; - continue; - } - - norm[s]=NOT_YET_ASSIGNED; - } - ToDistribute = (1 << tableLog) - distributed; - - if (ToDistribute == 0) - return 0; - - if ((total / ToDistribute) > lowOne) { - /* risk of rounding to zero */ - lowOne = (U32)((total * 3) / (ToDistribute * 2)); - for (s=0; s<=maxSymbolValue; s++) { - if ((norm[s] == NOT_YET_ASSIGNED) && (count[s] <= lowOne)) { - norm[s] = 1; - distributed++; - total -= count[s]; - continue; - } } - ToDistribute = (1 << tableLog) - distributed; - } - - if (distributed == maxSymbolValue+1) { - /* all values are pretty poor; - probably incompressible data (should have already been detected); - find max, then give all remaining points to max */ - U32 maxV = 0, maxC = 0; - for (s=0; s<=maxSymbolValue; s++) - if (count[s] > maxC) { maxV=s; maxC=count[s]; } - norm[maxV] += (short)ToDistribute; - return 0; - } - - if (total == 0) { - /* all of the symbols were low enough for the lowOne or lowThreshold */ - for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1)) - if (norm[s] > 0) { ToDistribute--; norm[s]++; } - return 0; - } - - { U64 const vStepLog = 62 - tableLog; - U64 const mid = (1ULL << (vStepLog-1)) - 1; - U64 const rStep = ZSTD_div64((((U64)1<> vStepLog); - U32 const sEnd = (U32)(end >> vStepLog); - U32 const weight = sEnd - sStart; - if (weight < 1) - return ERROR(GENERIC); - norm[s] = (short)weight; - tmpTotal = end; - } } } - - return 0; -} - -size_t FSE_normalizeCount (short* normalizedCounter, unsigned tableLog, - const unsigned* count, size_t total, - unsigned maxSymbolValue, unsigned useLowProbCount) -{ - /* Sanity checks */ - if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG; - if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported size */ - if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported size */ - if (tableLog < FSE_minTableLog(total, maxSymbolValue)) return ERROR(GENERIC); /* Too small tableLog, compression potentially impossible */ - - { static U32 const rtbTable[] = { 0, 473195, 504333, 520860, 550000, 700000, 750000, 830000 }; - short const lowProbCount = useLowProbCount ? -1 : 1; - U64 const scale = 62 - tableLog; - U64 const step = ZSTD_div64((U64)1<<62, (U32)total); /* <== here, one division ! */ - U64 const vStep = 1ULL<<(scale-20); - int stillToDistribute = 1<> tableLog); - - for (s=0; s<=maxSymbolValue; s++) { - if (count[s] == total) return 0; /* rle special case */ - if (count[s] == 0) { normalizedCounter[s]=0; continue; } - if (count[s] <= lowThreshold) { - normalizedCounter[s] = lowProbCount; - stillToDistribute--; - } else { - short proba = (short)((count[s]*step) >> scale); - if (proba<8) { - U64 restToBeat = vStep * rtbTable[proba]; - proba += (count[s]*step) - ((U64)proba< restToBeat; - } - if (proba > largestP) { largestP=proba; largest=s; } - normalizedCounter[s] = proba; - stillToDistribute -= proba; - } } - if (-stillToDistribute >= (normalizedCounter[largest] >> 1)) { - /* corner case, need another normalization method */ - size_t const errorCode = FSE_normalizeM2(normalizedCounter, tableLog, count, total, maxSymbolValue, lowProbCount); - if (FSE_isError(errorCode)) return errorCode; - } - else normalizedCounter[largest] += (short)stillToDistribute; - } - -#if 0 - { /* Print Table (debug) */ - U32 s; - U32 nTotal = 0; - for (s=0; s<=maxSymbolValue; s++) - RAWLOG(2, "%3i: %4i \n", s, normalizedCounter[s]); - for (s=0; s<=maxSymbolValue; s++) - nTotal += abs(normalizedCounter[s]); - if (nTotal != (1U< FSE_MAX_TABLELOG*4+7 ) && (srcSize & 2)) { /* test bit 2 */ - FSE_encodeSymbol(&bitC, &CState2, *--ip); - FSE_encodeSymbol(&bitC, &CState1, *--ip); - FSE_FLUSHBITS(&bitC); - } - - /* 2 or 4 encoding per loop */ - while ( ip>istart ) { - - FSE_encodeSymbol(&bitC, &CState2, *--ip); - - if (sizeof(bitC.bitContainer)*8 < FSE_MAX_TABLELOG*2+7 ) /* this test must be static */ - FSE_FLUSHBITS(&bitC); - - FSE_encodeSymbol(&bitC, &CState1, *--ip); - - if (sizeof(bitC.bitContainer)*8 > FSE_MAX_TABLELOG*4+7 ) { /* this test must be static */ - FSE_encodeSymbol(&bitC, &CState2, *--ip); - FSE_encodeSymbol(&bitC, &CState1, *--ip); - } - - FSE_FLUSHBITS(&bitC); - } - - FSE_flushCState(&bitC, &CState2); - FSE_flushCState(&bitC, &CState1); - return BIT_closeCStream(&bitC); -} - -size_t FSE_compress_usingCTable (void* dst, size_t dstSize, - const void* src, size_t srcSize, - const FSE_CTable* ct) -{ - unsigned const fast = (dstSize >= FSE_BLOCKBOUND(srcSize)); - - if (fast) - return FSE_compress_usingCTable_generic(dst, dstSize, src, srcSize, ct, 1); - else - return FSE_compress_usingCTable_generic(dst, dstSize, src, srcSize, ct, 0); -} - - -size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); } - -#endif /* FSE_COMMONDEFS_ONLY */ diff --git a/third_party/zstd/lib/compress/hist.c b/third_party/zstd/lib/compress/hist.c deleted file mode 100644 index 4ccf9a9..0000000 --- a/third_party/zstd/lib/compress/hist.c +++ /dev/null @@ -1,191 +0,0 @@ -/* ****************************************************************** - * hist : Histogram functions - * part of Finite State Entropy project - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* --- dependencies --- */ -#include "../common/mem.h" /* U32, BYTE, etc. */ -#include "../common/debug.h" /* assert, DEBUGLOG */ -#include "../common/error_private.h" /* ERROR */ -#include "hist.h" - - -/* --- Error management --- */ -unsigned HIST_isError(size_t code) { return ERR_isError(code); } - -/*-************************************************************** - * Histogram functions - ****************************************************************/ -void HIST_add(unsigned* count, const void* src, size_t srcSize) -{ - const BYTE* ip = (const BYTE*)src; - const BYTE* const end = ip + srcSize; - - while (ip largestCount) largestCount = count[s]; - } - - return largestCount; -} - -typedef enum { trustInput, checkMaxSymbolValue } HIST_checkInput_e; - -/* HIST_count_parallel_wksp() : - * store histogram into 4 intermediate tables, recombined at the end. - * this design makes better use of OoO cpus, - * and is noticeably faster when some values are heavily repeated. - * But it needs some additional workspace for intermediate tables. - * `workSpace` must be a U32 table of size >= HIST_WKSP_SIZE_U32. - * @return : largest histogram frequency, - * or an error code (notably when histogram's alphabet is larger than *maxSymbolValuePtr) */ -static size_t HIST_count_parallel_wksp( - unsigned* count, unsigned* maxSymbolValuePtr, - const void* source, size_t sourceSize, - HIST_checkInput_e check, - U32* const workSpace) -{ - const BYTE* ip = (const BYTE*)source; - const BYTE* const iend = ip+sourceSize; - size_t const countSize = (*maxSymbolValuePtr + 1) * sizeof(*count); - unsigned max=0; - U32* const Counting1 = workSpace; - U32* const Counting2 = Counting1 + 256; - U32* const Counting3 = Counting2 + 256; - U32* const Counting4 = Counting3 + 256; - - /* safety checks */ - assert(*maxSymbolValuePtr <= 255); - if (!sourceSize) { - ZSTD_memset(count, 0, countSize); - *maxSymbolValuePtr = 0; - return 0; - } - ZSTD_memset(workSpace, 0, 4*256*sizeof(unsigned)); - - /* by stripes of 16 bytes */ - { U32 cached = MEM_read32(ip); ip += 4; - while (ip < iend-15) { - U32 c = cached; cached = MEM_read32(ip); ip += 4; - Counting1[(BYTE) c ]++; - Counting2[(BYTE)(c>>8) ]++; - Counting3[(BYTE)(c>>16)]++; - Counting4[ c>>24 ]++; - c = cached; cached = MEM_read32(ip); ip += 4; - Counting1[(BYTE) c ]++; - Counting2[(BYTE)(c>>8) ]++; - Counting3[(BYTE)(c>>16)]++; - Counting4[ c>>24 ]++; - c = cached; cached = MEM_read32(ip); ip += 4; - Counting1[(BYTE) c ]++; - Counting2[(BYTE)(c>>8) ]++; - Counting3[(BYTE)(c>>16)]++; - Counting4[ c>>24 ]++; - c = cached; cached = MEM_read32(ip); ip += 4; - Counting1[(BYTE) c ]++; - Counting2[(BYTE)(c>>8) ]++; - Counting3[(BYTE)(c>>16)]++; - Counting4[ c>>24 ]++; - } - ip-=4; - } - - /* finish last symbols */ - while (ip max) max = Counting1[s]; - } } - - { unsigned maxSymbolValue = 255; - while (!Counting1[maxSymbolValue]) maxSymbolValue--; - if (check && maxSymbolValue > *maxSymbolValuePtr) return ERROR(maxSymbolValue_tooSmall); - *maxSymbolValuePtr = maxSymbolValue; - ZSTD_memmove(count, Counting1, countSize); /* in case count & Counting1 are overlapping */ - } - return (size_t)max; -} - -/* HIST_countFast_wksp() : - * Same as HIST_countFast(), but using an externally provided scratch buffer. - * `workSpace` is a writable buffer which must be 4-bytes aligned, - * `workSpaceSize` must be >= HIST_WKSP_SIZE - */ -size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, - const void* source, size_t sourceSize, - void* workSpace, size_t workSpaceSize) -{ - if (sourceSize < 1500) /* heuristic threshold */ - return HIST_count_simple(count, maxSymbolValuePtr, source, sourceSize); - if ((size_t)workSpace & 3) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ - if (workSpaceSize < HIST_WKSP_SIZE) return ERROR(workSpace_tooSmall); - return HIST_count_parallel_wksp(count, maxSymbolValuePtr, source, sourceSize, trustInput, (U32*)workSpace); -} - -/* HIST_count_wksp() : - * Same as HIST_count(), but using an externally provided scratch buffer. - * `workSpace` size must be table of >= HIST_WKSP_SIZE_U32 unsigned */ -size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr, - const void* source, size_t sourceSize, - void* workSpace, size_t workSpaceSize) -{ - if ((size_t)workSpace & 3) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ - if (workSpaceSize < HIST_WKSP_SIZE) return ERROR(workSpace_tooSmall); - if (*maxSymbolValuePtr < 255) - return HIST_count_parallel_wksp(count, maxSymbolValuePtr, source, sourceSize, checkMaxSymbolValue, (U32*)workSpace); - *maxSymbolValuePtr = 255; - return HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, workSpace, workSpaceSize); -} - -#ifndef ZSTD_NO_UNUSED_FUNCTIONS -/* fast variant (unsafe : won't check if src contains values beyond count[] limit) */ -size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr, - const void* source, size_t sourceSize) -{ - unsigned tmpCounters[HIST_WKSP_SIZE_U32]; - return HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, tmpCounters, sizeof(tmpCounters)); -} - -size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize) -{ - unsigned tmpCounters[HIST_WKSP_SIZE_U32]; - return HIST_count_wksp(count, maxSymbolValuePtr, src, srcSize, tmpCounters, sizeof(tmpCounters)); -} -#endif diff --git a/third_party/zstd/lib/compress/hist.h b/third_party/zstd/lib/compress/hist.h deleted file mode 100644 index bea2a9e..0000000 --- a/third_party/zstd/lib/compress/hist.h +++ /dev/null @@ -1,82 +0,0 @@ -/* ****************************************************************** - * hist : Histogram functions - * part of Finite State Entropy project - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* --- dependencies --- */ -#include "../common/zstd_deps.h" /* size_t */ - - -/* --- simple histogram functions --- */ - -/*! HIST_count(): - * Provides the precise count of each byte within a table 'count'. - * 'count' is a table of unsigned int, of minimum size (*maxSymbolValuePtr+1). - * Updates *maxSymbolValuePtr with actual largest symbol value detected. - * @return : count of the most frequent symbol (which isn't identified). - * or an error code, which can be tested using HIST_isError(). - * note : if return == srcSize, there is only one symbol. - */ -size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize); - -unsigned HIST_isError(size_t code); /**< tells if a return value is an error code */ - - -/* --- advanced histogram functions --- */ - -#define HIST_WKSP_SIZE_U32 1024 -#define HIST_WKSP_SIZE (HIST_WKSP_SIZE_U32 * sizeof(unsigned)) -/** HIST_count_wksp() : - * Same as HIST_count(), but using an externally provided scratch buffer. - * Benefit is this function will use very little stack space. - * `workSpace` is a writable buffer which must be 4-bytes aligned, - * `workSpaceSize` must be >= HIST_WKSP_SIZE - */ -size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize, - void* workSpace, size_t workSpaceSize); - -/** HIST_countFast() : - * same as HIST_count(), but blindly trusts that all byte values within src are <= *maxSymbolValuePtr. - * This function is unsafe, and will segfault if any value within `src` is `> *maxSymbolValuePtr` - */ -size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize); - -/** HIST_countFast_wksp() : - * Same as HIST_countFast(), but using an externally provided scratch buffer. - * `workSpace` is a writable buffer which must be 4-bytes aligned, - * `workSpaceSize` must be >= HIST_WKSP_SIZE - */ -size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize, - void* workSpace, size_t workSpaceSize); - -/*! HIST_count_simple() : - * Same as HIST_countFast(), this function is unsafe, - * and will segfault if any value within `src` is `> *maxSymbolValuePtr`. - * It is also a bit slower for large inputs. - * However, it does not need any additional memory (not even on stack). - * @return : count of the most frequent symbol. - * Note this function doesn't produce any error (i.e. it must succeed). - */ -unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr, - const void* src, size_t srcSize); - -/*! HIST_add() : - * Lowest level: just add nb of occurrences of characters from @src into @count. - * @count is not reset. @count array is presumed large enough (i.e. 1 KB). - @ This function does not need any additional stack memory. - */ -void HIST_add(unsigned* count, const void* src, size_t srcSize); diff --git a/third_party/zstd/lib/compress/huf_compress.c b/third_party/zstd/lib/compress/huf_compress.c deleted file mode 100644 index ea00072..0000000 --- a/third_party/zstd/lib/compress/huf_compress.c +++ /dev/null @@ -1,1464 +0,0 @@ -/* ****************************************************************** - * Huffman encoder, part of New Generation Entropy library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - Public forum : https://groups.google.com/forum/#!forum/lz4c - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* ************************************************************** -* Compiler specifics -****************************************************************/ -#ifdef _MSC_VER /* Visual Studio */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -#endif - - -/* ************************************************************** -* Includes -****************************************************************/ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset */ -#include "../common/compiler.h" -#include "../common/bitstream.h" -#include "hist.h" -#define FSE_STATIC_LINKING_ONLY /* FSE_optimalTableLog_internal */ -#include "../common/fse.h" /* header compression */ -#include "../common/huf.h" -#include "../common/error_private.h" -#include "../common/bits.h" /* ZSTD_highbit32 */ - - -/* ************************************************************** -* Error Management -****************************************************************/ -#define HUF_isError ERR_isError -#define HUF_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ - - -/* ************************************************************** -* Required declarations -****************************************************************/ -typedef struct nodeElt_s { - U32 count; - U16 parent; - BYTE byte; - BYTE nbBits; -} nodeElt; - - -/* ************************************************************** -* Debug Traces -****************************************************************/ - -#if DEBUGLEVEL >= 2 - -static size_t showU32(const U32* arr, size_t size) -{ - size_t u; - for (u=0; u= add) { - assert(add < align); - assert(((size_t)aligned & mask) == 0); - *workspaceSizePtr -= add; - return aligned; - } else { - *workspaceSizePtr = 0; - return NULL; - } -} - - -/* HUF_compressWeights() : - * Same as FSE_compress(), but dedicated to huff0's weights compression. - * The use case needs much less stack memory. - * Note : all elements within weightTable are supposed to be <= HUF_TABLELOG_MAX. - */ -#define MAX_FSE_TABLELOG_FOR_HUFF_HEADER 6 - -typedef struct { - FSE_CTable CTable[FSE_CTABLE_SIZE_U32(MAX_FSE_TABLELOG_FOR_HUFF_HEADER, HUF_TABLELOG_MAX)]; - U32 scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; - unsigned count[HUF_TABLELOG_MAX+1]; - S16 norm[HUF_TABLELOG_MAX+1]; -} HUF_CompressWeightsWksp; - -static size_t -HUF_compressWeights(void* dst, size_t dstSize, - const void* weightTable, size_t wtSize, - void* workspace, size_t workspaceSize) -{ - BYTE* const ostart = (BYTE*) dst; - BYTE* op = ostart; - BYTE* const oend = ostart + dstSize; - - unsigned maxSymbolValue = HUF_TABLELOG_MAX; - U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; - HUF_CompressWeightsWksp* wksp = (HUF_CompressWeightsWksp*)HUF_alignUpWorkspace(workspace, &workspaceSize, ZSTD_ALIGNOF(U32)); - - if (workspaceSize < sizeof(HUF_CompressWeightsWksp)) return ERROR(GENERIC); - - /* init conditions */ - if (wtSize <= 1) return 0; /* Not compressible */ - - /* Scan input and build symbol stats */ - { unsigned const maxCount = HIST_count_simple(wksp->count, &maxSymbolValue, weightTable, wtSize); /* never fails */ - if (maxCount == wtSize) return 1; /* only a single symbol in src : rle */ - if (maxCount == 1) return 0; /* each symbol present maximum once => not compressible */ - } - - tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue); - CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowProbCount */ 0) ); - - /* Write table description header */ - { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) ); - op += hSize; - } - - /* Compress */ - CHECK_F( FSE_buildCTable_wksp(wksp->CTable, wksp->norm, maxSymbolValue, tableLog, wksp->scratchBuffer, sizeof(wksp->scratchBuffer)) ); - { CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, wksp->CTable) ); - if (cSize == 0) return 0; /* not enough space for compressed data */ - op += cSize; - } - - return (size_t)(op-ostart); -} - -static size_t HUF_getNbBits(HUF_CElt elt) -{ - return elt & 0xFF; -} - -static size_t HUF_getNbBitsFast(HUF_CElt elt) -{ - return elt; -} - -static size_t HUF_getValue(HUF_CElt elt) -{ - return elt & ~(size_t)0xFF; -} - -static size_t HUF_getValueFast(HUF_CElt elt) -{ - return elt; -} - -static void HUF_setNbBits(HUF_CElt* elt, size_t nbBits) -{ - assert(nbBits <= HUF_TABLELOG_ABSOLUTEMAX); - *elt = nbBits; -} - -static void HUF_setValue(HUF_CElt* elt, size_t value) -{ - size_t const nbBits = HUF_getNbBits(*elt); - if (nbBits > 0) { - assert((value >> nbBits) == 0); - *elt |= value << (sizeof(HUF_CElt) * 8 - nbBits); - } -} - -HUF_CTableHeader HUF_readCTableHeader(HUF_CElt const* ctable) -{ - HUF_CTableHeader header; - ZSTD_memcpy(&header, ctable, sizeof(header)); - return header; -} - -static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 maxSymbolValue) -{ - HUF_CTableHeader header; - HUF_STATIC_ASSERT(sizeof(ctable[0]) == sizeof(header)); - ZSTD_memset(&header, 0, sizeof(header)); - assert(tableLog < 256); - header.tableLog = (BYTE)tableLog; - assert(maxSymbolValue < 256); - header.maxSymbolValue = (BYTE)maxSymbolValue; - ZSTD_memcpy(ctable, &header, sizeof(header)); -} - -typedef struct { - HUF_CompressWeightsWksp wksp; - BYTE bitsToWeight[HUF_TABLELOG_MAX + 1]; /* precomputed conversion table */ - BYTE huffWeight[HUF_SYMBOLVALUE_MAX]; -} HUF_WriteCTableWksp; - -size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, - const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, - void* workspace, size_t workspaceSize) -{ - HUF_CElt const* const ct = CTable + 1; - BYTE* op = (BYTE*)dst; - U32 n; - HUF_WriteCTableWksp* wksp = (HUF_WriteCTableWksp*)HUF_alignUpWorkspace(workspace, &workspaceSize, ZSTD_ALIGNOF(U32)); - - HUF_STATIC_ASSERT(HUF_CTABLE_WORKSPACE_SIZE >= sizeof(HUF_WriteCTableWksp)); - - assert(HUF_readCTableHeader(CTable).maxSymbolValue == maxSymbolValue); - assert(HUF_readCTableHeader(CTable).tableLog == huffLog); - - /* check conditions */ - if (workspaceSize < sizeof(HUF_WriteCTableWksp)) return ERROR(GENERIC); - if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); - - /* convert to weight */ - wksp->bitsToWeight[0] = 0; - for (n=1; nbitsToWeight[n] = (BYTE)(huffLog + 1 - n); - for (n=0; nhuffWeight[n] = wksp->bitsToWeight[HUF_getNbBits(ct[n])]; - - /* attempt weights compression by FSE */ - if (maxDstSize < 1) return ERROR(dstSize_tooSmall); - { CHECK_V_F(hSize, HUF_compressWeights(op+1, maxDstSize-1, wksp->huffWeight, maxSymbolValue, &wksp->wksp, sizeof(wksp->wksp)) ); - if ((hSize>1) & (hSize < maxSymbolValue/2)) { /* FSE compressed */ - op[0] = (BYTE)hSize; - return hSize+1; - } } - - /* write raw values as 4-bits (max : 15) */ - if (maxSymbolValue > (256-128)) return ERROR(GENERIC); /* should not happen : likely means source cannot be compressed */ - if (((maxSymbolValue+1)/2) + 1 > maxDstSize) return ERROR(dstSize_tooSmall); /* not enough space within dst buffer */ - op[0] = (BYTE)(128 /*special case*/ + (maxSymbolValue-1)); - wksp->huffWeight[maxSymbolValue] = 0; /* to be sure it doesn't cause msan issue in final combination */ - for (n=0; nhuffWeight[n] << 4) + wksp->huffWeight[n+1]); - return ((maxSymbolValue+1)/2) + 1; -} - - -size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned* hasZeroWeights) -{ - BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; /* init not required, even though some static analyzer may complain */ - U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; /* large enough for values from 0 to 16 */ - U32 tableLog = 0; - U32 nbSymbols = 0; - HUF_CElt* const ct = CTable + 1; - - /* get symbol weights */ - CHECK_V_F(readSize, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize)); - *hasZeroWeights = (rankVal[0] > 0); - - /* check result */ - if (tableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); - if (nbSymbols > *maxSymbolValuePtr+1) return ERROR(maxSymbolValue_tooSmall); - - *maxSymbolValuePtr = nbSymbols - 1; - - HUF_writeCTableHeader(CTable, tableLog, *maxSymbolValuePtr); - - /* Prepare base value per rank */ - { U32 n, nextRankStart = 0; - for (n=1; n<=tableLog; n++) { - U32 curr = nextRankStart; - nextRankStart += (rankVal[n] << (n-1)); - rankVal[n] = curr; - } } - - /* fill nbBits */ - { U32 n; for (n=0; nn=tableLog+1 */ - U16 valPerRank[HUF_TABLELOG_MAX+2] = {0}; - { U32 n; for (n=0; n0; n--) { /* start at n=tablelog <-> w=1 */ - valPerRank[n] = min; /* get starting value within each rank */ - min += nbPerRank[n]; - min >>= 1; - } } - /* assign value within rank, symbol order */ - { U32 n; for (n=0; n HUF_readCTableHeader(CTable).maxSymbolValue) - return 0; - return (U32)HUF_getNbBits(ct[symbolValue]); -} - - -/** - * HUF_setMaxHeight(): - * Try to enforce @targetNbBits on the Huffman tree described in @huffNode. - * - * It attempts to convert all nodes with nbBits > @targetNbBits - * to employ @targetNbBits instead. Then it adjusts the tree - * so that it remains a valid canonical Huffman tree. - * - * @pre The sum of the ranks of each symbol == 2^largestBits, - * where largestBits == huffNode[lastNonNull].nbBits. - * @post The sum of the ranks of each symbol == 2^largestBits, - * where largestBits is the return value (expected <= targetNbBits). - * - * @param huffNode The Huffman tree modified in place to enforce targetNbBits. - * It's presumed sorted, from most frequent to rarest symbol. - * @param lastNonNull The symbol with the lowest count in the Huffman tree. - * @param targetNbBits The allowed number of bits, which the Huffman tree - * may not respect. After this function the Huffman tree will - * respect targetNbBits. - * @return The maximum number of bits of the Huffman tree after adjustment. - */ -static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 targetNbBits) -{ - const U32 largestBits = huffNode[lastNonNull].nbBits; - /* early exit : no elt > targetNbBits, so the tree is already valid. */ - if (largestBits <= targetNbBits) return largestBits; - - DEBUGLOG(5, "HUF_setMaxHeight (targetNbBits = %u)", targetNbBits); - - /* there are several too large elements (at least >= 2) */ - { int totalCost = 0; - const U32 baseCost = 1 << (largestBits - targetNbBits); - int n = (int)lastNonNull; - - /* Adjust any ranks > targetNbBits to targetNbBits. - * Compute totalCost, which is how far the sum of the ranks is - * we are over 2^largestBits after adjust the offending ranks. - */ - while (huffNode[n].nbBits > targetNbBits) { - totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); - huffNode[n].nbBits = (BYTE)targetNbBits; - n--; - } - /* n stops at huffNode[n].nbBits <= targetNbBits */ - assert(huffNode[n].nbBits <= targetNbBits); - /* n end at index of smallest symbol using < targetNbBits */ - while (huffNode[n].nbBits == targetNbBits) --n; - - /* renorm totalCost from 2^largestBits to 2^targetNbBits - * note : totalCost is necessarily a multiple of baseCost */ - assert(((U32)totalCost & (baseCost - 1)) == 0); - totalCost >>= (largestBits - targetNbBits); - assert(totalCost > 0); - - /* repay normalized cost */ - { U32 const noSymbol = 0xF0F0F0F0; - U32 rankLast[HUF_TABLELOG_MAX+2]; - - /* Get pos of last (smallest = lowest cum. count) symbol per rank */ - ZSTD_memset(rankLast, 0xF0, sizeof(rankLast)); - { U32 currentNbBits = targetNbBits; - int pos; - for (pos=n ; pos >= 0; pos--) { - if (huffNode[pos].nbBits >= currentNbBits) continue; - currentNbBits = huffNode[pos].nbBits; /* < targetNbBits */ - rankLast[targetNbBits-currentNbBits] = (U32)pos; - } } - - while (totalCost > 0) { - /* Try to reduce the next power of 2 above totalCost because we - * gain back half the rank. - */ - U32 nBitsToDecrease = ZSTD_highbit32((U32)totalCost) + 1; - for ( ; nBitsToDecrease > 1; nBitsToDecrease--) { - U32 const highPos = rankLast[nBitsToDecrease]; - U32 const lowPos = rankLast[nBitsToDecrease-1]; - if (highPos == noSymbol) continue; - /* Decrease highPos if no symbols of lowPos or if it is - * not cheaper to remove 2 lowPos than highPos. - */ - if (lowPos == noSymbol) break; - { U32 const highTotal = huffNode[highPos].count; - U32 const lowTotal = 2 * huffNode[lowPos].count; - if (highTotal <= lowTotal) break; - } } - /* only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !) */ - assert(rankLast[nBitsToDecrease] != noSymbol || nBitsToDecrease == 1); - /* HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary */ - while ((nBitsToDecrease<=HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol)) - nBitsToDecrease++; - assert(rankLast[nBitsToDecrease] != noSymbol); - /* Increase the number of bits to gain back half the rank cost. */ - totalCost -= 1 << (nBitsToDecrease-1); - huffNode[rankLast[nBitsToDecrease]].nbBits++; - - /* Fix up the new rank. - * If the new rank was empty, this symbol is now its smallest. - * Otherwise, this symbol will be the largest in the new rank so no adjustment. - */ - if (rankLast[nBitsToDecrease-1] == noSymbol) - rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]; - /* Fix up the old rank. - * If the symbol was at position 0, meaning it was the highest weight symbol in the tree, - * it must be the only symbol in its rank, so the old rank now has no symbols. - * Otherwise, since the Huffman nodes are sorted by count, the previous position is now - * the smallest node in the rank. If the previous position belongs to a different rank, - * then the rank is now empty. - */ - if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */ - rankLast[nBitsToDecrease] = noSymbol; - else { - rankLast[nBitsToDecrease]--; - if (huffNode[rankLast[nBitsToDecrease]].nbBits != targetNbBits-nBitsToDecrease) - rankLast[nBitsToDecrease] = noSymbol; /* this rank is now empty */ - } - } /* while (totalCost > 0) */ - - /* If we've removed too much weight, then we have to add it back. - * To avoid overshooting again, we only adjust the smallest rank. - * We take the largest nodes from the lowest rank 0 and move them - * to rank 1. There's guaranteed to be enough rank 0 symbols because - * TODO. - */ - while (totalCost < 0) { /* Sometimes, cost correction overshoot */ - /* special case : no rank 1 symbol (using targetNbBits-1); - * let's create one from largest rank 0 (using targetNbBits). - */ - if (rankLast[1] == noSymbol) { - while (huffNode[n].nbBits == targetNbBits) n--; - huffNode[n+1].nbBits--; - assert(n >= 0); - rankLast[1] = (U32)(n+1); - totalCost++; - continue; - } - huffNode[ rankLast[1] + 1 ].nbBits--; - rankLast[1]++; - totalCost ++; - } - } /* repay normalized cost */ - } /* there are several too large elements (at least >= 2) */ - - return targetNbBits; -} - -typedef struct { - U16 base; - U16 curr; -} rankPos; - -typedef nodeElt huffNodeTable[2 * (HUF_SYMBOLVALUE_MAX + 1)]; - -/* Number of buckets available for HUF_sort() */ -#define RANK_POSITION_TABLE_SIZE 192 - -typedef struct { - huffNodeTable huffNodeTbl; - rankPos rankPosition[RANK_POSITION_TABLE_SIZE]; -} HUF_buildCTable_wksp_tables; - -/* RANK_POSITION_DISTINCT_COUNT_CUTOFF == Cutoff point in HUF_sort() buckets for which we use log2 bucketing. - * Strategy is to use as many buckets as possible for representing distinct - * counts while using the remainder to represent all "large" counts. - * - * To satisfy this requirement for 192 buckets, we can do the following: - * Let buckets 0-166 represent distinct counts of [0, 166] - * Let buckets 166 to 192 represent all remaining counts up to RANK_POSITION_MAX_COUNT_LOG using log2 bucketing. - */ -#define RANK_POSITION_MAX_COUNT_LOG 32 -#define RANK_POSITION_LOG_BUCKETS_BEGIN ((RANK_POSITION_TABLE_SIZE - 1) - RANK_POSITION_MAX_COUNT_LOG - 1 /* == 158 */) -#define RANK_POSITION_DISTINCT_COUNT_CUTOFF (RANK_POSITION_LOG_BUCKETS_BEGIN + ZSTD_highbit32(RANK_POSITION_LOG_BUCKETS_BEGIN) /* == 166 */) - -/* Return the appropriate bucket index for a given count. See definition of - * RANK_POSITION_DISTINCT_COUNT_CUTOFF for explanation of bucketing strategy. - */ -static U32 HUF_getIndex(U32 const count) { - return (count < RANK_POSITION_DISTINCT_COUNT_CUTOFF) - ? count - : ZSTD_highbit32(count) + RANK_POSITION_LOG_BUCKETS_BEGIN; -} - -/* Helper swap function for HUF_quickSortPartition() */ -static void HUF_swapNodes(nodeElt* a, nodeElt* b) { - nodeElt tmp = *a; - *a = *b; - *b = tmp; -} - -/* Returns 0 if the huffNode array is not sorted by descending count */ -MEM_STATIC int HUF_isSorted(nodeElt huffNode[], U32 const maxSymbolValue1) { - U32 i; - for (i = 1; i < maxSymbolValue1; ++i) { - if (huffNode[i].count > huffNode[i-1].count) { - return 0; - } - } - return 1; -} - -/* Insertion sort by descending order */ -HINT_INLINE void HUF_insertionSort(nodeElt huffNode[], int const low, int const high) { - int i; - int const size = high-low+1; - huffNode += low; - for (i = 1; i < size; ++i) { - nodeElt const key = huffNode[i]; - int j = i - 1; - while (j >= 0 && huffNode[j].count < key.count) { - huffNode[j + 1] = huffNode[j]; - j--; - } - huffNode[j + 1] = key; - } -} - -/* Pivot helper function for quicksort. */ -static int HUF_quickSortPartition(nodeElt arr[], int const low, int const high) { - /* Simply select rightmost element as pivot. "Better" selectors like - * median-of-three don't experimentally appear to have any benefit. - */ - U32 const pivot = arr[high].count; - int i = low - 1; - int j = low; - for ( ; j < high; j++) { - if (arr[j].count > pivot) { - i++; - HUF_swapNodes(&arr[i], &arr[j]); - } - } - HUF_swapNodes(&arr[i + 1], &arr[high]); - return i + 1; -} - -/* Classic quicksort by descending with partially iterative calls - * to reduce worst case callstack size. - */ -static void HUF_simpleQuickSort(nodeElt arr[], int low, int high) { - int const kInsertionSortThreshold = 8; - if (high - low < kInsertionSortThreshold) { - HUF_insertionSort(arr, low, high); - return; - } - while (low < high) { - int const idx = HUF_quickSortPartition(arr, low, high); - if (idx - low < high - idx) { - HUF_simpleQuickSort(arr, low, idx - 1); - low = idx + 1; - } else { - HUF_simpleQuickSort(arr, idx + 1, high); - high = idx - 1; - } - } -} - -/** - * HUF_sort(): - * Sorts the symbols [0, maxSymbolValue] by count[symbol] in decreasing order. - * This is a typical bucket sorting strategy that uses either quicksort or insertion sort to sort each bucket. - * - * @param[out] huffNode Sorted symbols by decreasing count. Only members `.count` and `.byte` are filled. - * Must have (maxSymbolValue + 1) entries. - * @param[in] count Histogram of the symbols. - * @param[in] maxSymbolValue Maximum symbol value. - * @param rankPosition This is a scratch workspace. Must have RANK_POSITION_TABLE_SIZE entries. - */ -static void HUF_sort(nodeElt huffNode[], const unsigned count[], U32 const maxSymbolValue, rankPos rankPosition[]) { - U32 n; - U32 const maxSymbolValue1 = maxSymbolValue+1; - - /* Compute base and set curr to base. - * For symbol s let lowerRank = HUF_getIndex(count[n]) and rank = lowerRank + 1. - * See HUF_getIndex to see bucketing strategy. - * We attribute each symbol to lowerRank's base value, because we want to know where - * each rank begins in the output, so for rank R we want to count ranks R+1 and above. - */ - ZSTD_memset(rankPosition, 0, sizeof(*rankPosition) * RANK_POSITION_TABLE_SIZE); - for (n = 0; n < maxSymbolValue1; ++n) { - U32 lowerRank = HUF_getIndex(count[n]); - assert(lowerRank < RANK_POSITION_TABLE_SIZE - 1); - rankPosition[lowerRank].base++; - } - - assert(rankPosition[RANK_POSITION_TABLE_SIZE - 1].base == 0); - /* Set up the rankPosition table */ - for (n = RANK_POSITION_TABLE_SIZE - 1; n > 0; --n) { - rankPosition[n-1].base += rankPosition[n].base; - rankPosition[n-1].curr = rankPosition[n-1].base; - } - - /* Insert each symbol into their appropriate bucket, setting up rankPosition table. */ - for (n = 0; n < maxSymbolValue1; ++n) { - U32 const c = count[n]; - U32 const r = HUF_getIndex(c) + 1; - U32 const pos = rankPosition[r].curr++; - assert(pos < maxSymbolValue1); - huffNode[pos].count = c; - huffNode[pos].byte = (BYTE)n; - } - - /* Sort each bucket. */ - for (n = RANK_POSITION_DISTINCT_COUNT_CUTOFF; n < RANK_POSITION_TABLE_SIZE - 1; ++n) { - int const bucketSize = rankPosition[n].curr - rankPosition[n].base; - U32 const bucketStartIdx = rankPosition[n].base; - if (bucketSize > 1) { - assert(bucketStartIdx < maxSymbolValue1); - HUF_simpleQuickSort(huffNode + bucketStartIdx, 0, bucketSize-1); - } - } - - assert(HUF_isSorted(huffNode, maxSymbolValue1)); -} - - -/** HUF_buildCTable_wksp() : - * Same as HUF_buildCTable(), but using externally allocated scratch buffer. - * `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as sizeof(HUF_buildCTable_wksp_tables). - */ -#define STARTNODE (HUF_SYMBOLVALUE_MAX+1) - -/* HUF_buildTree(): - * Takes the huffNode array sorted by HUF_sort() and builds an unlimited-depth Huffman tree. - * - * @param huffNode The array sorted by HUF_sort(). Builds the Huffman tree in this array. - * @param maxSymbolValue The maximum symbol value. - * @return The smallest node in the Huffman tree (by count). - */ -static int HUF_buildTree(nodeElt* huffNode, U32 maxSymbolValue) -{ - nodeElt* const huffNode0 = huffNode - 1; - int nonNullRank; - int lowS, lowN; - int nodeNb = STARTNODE; - int n, nodeRoot; - DEBUGLOG(5, "HUF_buildTree (alphabet size = %u)", maxSymbolValue + 1); - /* init for parents */ - nonNullRank = (int)maxSymbolValue; - while(huffNode[nonNullRank].count == 0) nonNullRank--; - lowS = nonNullRank; nodeRoot = nodeNb + lowS - 1; lowN = nodeNb; - huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; - huffNode[lowS].parent = huffNode[lowS-1].parent = (U16)nodeNb; - nodeNb++; lowS-=2; - for (n=nodeNb; n<=nodeRoot; n++) huffNode[n].count = (U32)(1U<<30); - huffNode0[0].count = (U32)(1U<<31); /* fake entry, strong barrier */ - - /* create parents */ - while (nodeNb <= nodeRoot) { - int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; - int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; - huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; - huffNode[n1].parent = huffNode[n2].parent = (U16)nodeNb; - nodeNb++; - } - - /* distribute weights (unlimited tree height) */ - huffNode[nodeRoot].nbBits = 0; - for (n=nodeRoot-1; n>=STARTNODE; n--) - huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; - for (n=0; n<=nonNullRank; n++) - huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; - - DEBUGLOG(6, "Initial distribution of bits completed (%zu sorted symbols)", showHNodeBits(huffNode, maxSymbolValue+1)); - - return nonNullRank; -} - -/** - * HUF_buildCTableFromTree(): - * Build the CTable given the Huffman tree in huffNode. - * - * @param[out] CTable The output Huffman CTable. - * @param huffNode The Huffman tree. - * @param nonNullRank The last and smallest node in the Huffman tree. - * @param maxSymbolValue The maximum symbol value. - * @param maxNbBits The exact maximum number of bits used in the Huffman tree. - */ -static void HUF_buildCTableFromTree(HUF_CElt* CTable, nodeElt const* huffNode, int nonNullRank, U32 maxSymbolValue, U32 maxNbBits) -{ - HUF_CElt* const ct = CTable + 1; - /* fill result into ctable (val, nbBits) */ - int n; - U16 nbPerRank[HUF_TABLELOG_MAX+1] = {0}; - U16 valPerRank[HUF_TABLELOG_MAX+1] = {0}; - int const alphabetSize = (int)(maxSymbolValue + 1); - for (n=0; n<=nonNullRank; n++) - nbPerRank[huffNode[n].nbBits]++; - /* determine starting value per rank */ - { U16 min = 0; - for (n=(int)maxNbBits; n>0; n--) { - valPerRank[n] = min; /* get starting value within each rank */ - min += nbPerRank[n]; - min >>= 1; - } } - for (n=0; nhuffNodeTbl; - nodeElt* const huffNode = huffNode0+1; - int nonNullRank; - - HUF_STATIC_ASSERT(HUF_CTABLE_WORKSPACE_SIZE == sizeof(HUF_buildCTable_wksp_tables)); - - DEBUGLOG(5, "HUF_buildCTable_wksp (alphabet size = %u)", maxSymbolValue+1); - - /* safety checks */ - if (wkspSize < sizeof(HUF_buildCTable_wksp_tables)) - return ERROR(workSpace_tooSmall); - if (maxNbBits == 0) maxNbBits = HUF_TABLELOG_DEFAULT; - if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) - return ERROR(maxSymbolValue_tooLarge); - ZSTD_memset(huffNode0, 0, sizeof(huffNodeTable)); - - /* sort, decreasing order */ - HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); - DEBUGLOG(6, "sorted symbols completed (%zu symbols)", showHNodeSymbols(huffNode, maxSymbolValue+1)); - - /* build tree */ - nonNullRank = HUF_buildTree(huffNode, maxSymbolValue); - - /* determine and enforce maxTableLog */ - maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); - if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */ - - HUF_buildCTableFromTree(CTable, huffNode, nonNullRank, maxSymbolValue, maxNbBits); - - return maxNbBits; -} - -size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) -{ - HUF_CElt const* ct = CTable + 1; - size_t nbBits = 0; - int s; - for (s = 0; s <= (int)maxSymbolValue; ++s) { - nbBits += HUF_getNbBits(ct[s]) * count[s]; - } - return nbBits >> 3; -} - -int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { - HUF_CTableHeader header = HUF_readCTableHeader(CTable); - HUF_CElt const* ct = CTable + 1; - int bad = 0; - int s; - - assert(header.tableLog <= HUF_TABLELOG_ABSOLUTEMAX); - - if (header.maxSymbolValue < maxSymbolValue) - return 0; - - for (s = 0; s <= (int)maxSymbolValue; ++s) { - bad |= (count[s] != 0) & (HUF_getNbBits(ct[s]) == 0); - } - return !bad; -} - -size_t HUF_compressBound(size_t size) { return HUF_COMPRESSBOUND(size); } - -/** HUF_CStream_t: - * Huffman uses its own BIT_CStream_t implementation. - * There are three major differences from BIT_CStream_t: - * 1. HUF_addBits() takes a HUF_CElt (size_t) which is - * the pair (nbBits, value) in the format: - * format: - * - Bits [0, 4) = nbBits - * - Bits [4, 64 - nbBits) = 0 - * - Bits [64 - nbBits, 64) = value - * 2. The bitContainer is built from the upper bits and - * right shifted. E.g. to add a new value of N bits - * you right shift the bitContainer by N, then or in - * the new value into the N upper bits. - * 3. The bitstream has two bit containers. You can add - * bits to the second container and merge them into - * the first container. - */ - -#define HUF_BITS_IN_CONTAINER (sizeof(size_t) * 8) - -typedef struct { - size_t bitContainer[2]; - size_t bitPos[2]; - - BYTE* startPtr; - BYTE* ptr; - BYTE* endPtr; -} HUF_CStream_t; - -/**! HUF_initCStream(): - * Initializes the bitstream. - * @returns 0 or an error code. - */ -static size_t HUF_initCStream(HUF_CStream_t* bitC, - void* startPtr, size_t dstCapacity) -{ - ZSTD_memset(bitC, 0, sizeof(*bitC)); - bitC->startPtr = (BYTE*)startPtr; - bitC->ptr = bitC->startPtr; - bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->bitContainer[0]); - if (dstCapacity <= sizeof(bitC->bitContainer[0])) return ERROR(dstSize_tooSmall); - return 0; -} - -/*! HUF_addBits(): - * Adds the symbol stored in HUF_CElt elt to the bitstream. - * - * @param elt The element we're adding. This is a (nbBits, value) pair. - * See the HUF_CStream_t docs for the format. - * @param idx Insert into the bitstream at this idx. - * @param kFast This is a template parameter. If the bitstream is guaranteed - * to have at least 4 unused bits after this call it may be 1, - * otherwise it must be 0. HUF_addBits() is faster when fast is set. - */ -FORCE_INLINE_TEMPLATE void HUF_addBits(HUF_CStream_t* bitC, HUF_CElt elt, int idx, int kFast) -{ - assert(idx <= 1); - assert(HUF_getNbBits(elt) <= HUF_TABLELOG_ABSOLUTEMAX); - /* This is efficient on x86-64 with BMI2 because shrx - * only reads the low 6 bits of the register. The compiler - * knows this and elides the mask. When fast is set, - * every operation can use the same value loaded from elt. - */ - bitC->bitContainer[idx] >>= HUF_getNbBits(elt); - bitC->bitContainer[idx] |= kFast ? HUF_getValueFast(elt) : HUF_getValue(elt); - /* We only read the low 8 bits of bitC->bitPos[idx] so it - * doesn't matter that the high bits have noise from the value. - */ - bitC->bitPos[idx] += HUF_getNbBitsFast(elt); - assert((bitC->bitPos[idx] & 0xFF) <= HUF_BITS_IN_CONTAINER); - /* The last 4-bits of elt are dirty if fast is set, - * so we must not be overwriting bits that have already been - * inserted into the bit container. - */ -#if DEBUGLEVEL >= 1 - { - size_t const nbBits = HUF_getNbBits(elt); - size_t const dirtyBits = nbBits == 0 ? 0 : ZSTD_highbit32((U32)nbBits) + 1; - (void)dirtyBits; - /* Middle bits are 0. */ - assert(((elt >> dirtyBits) << (dirtyBits + nbBits)) == 0); - /* We didn't overwrite any bits in the bit container. */ - assert(!kFast || (bitC->bitPos[idx] & 0xFF) <= HUF_BITS_IN_CONTAINER); - (void)dirtyBits; - } -#endif -} - -FORCE_INLINE_TEMPLATE void HUF_zeroIndex1(HUF_CStream_t* bitC) -{ - bitC->bitContainer[1] = 0; - bitC->bitPos[1] = 0; -} - -/*! HUF_mergeIndex1() : - * Merges the bit container @ index 1 into the bit container @ index 0 - * and zeros the bit container @ index 1. - */ -FORCE_INLINE_TEMPLATE void HUF_mergeIndex1(HUF_CStream_t* bitC) -{ - assert((bitC->bitPos[1] & 0xFF) < HUF_BITS_IN_CONTAINER); - bitC->bitContainer[0] >>= (bitC->bitPos[1] & 0xFF); - bitC->bitContainer[0] |= bitC->bitContainer[1]; - bitC->bitPos[0] += bitC->bitPos[1]; - assert((bitC->bitPos[0] & 0xFF) <= HUF_BITS_IN_CONTAINER); -} - -/*! HUF_flushBits() : -* Flushes the bits in the bit container @ index 0. -* -* @post bitPos will be < 8. -* @param kFast If kFast is set then we must know a-priori that -* the bit container will not overflow. -*/ -FORCE_INLINE_TEMPLATE void HUF_flushBits(HUF_CStream_t* bitC, int kFast) -{ - /* The upper bits of bitPos are noisy, so we must mask by 0xFF. */ - size_t const nbBits = bitC->bitPos[0] & 0xFF; - size_t const nbBytes = nbBits >> 3; - /* The top nbBits bits of bitContainer are the ones we need. */ - size_t const bitContainer = bitC->bitContainer[0] >> (HUF_BITS_IN_CONTAINER - nbBits); - /* Mask bitPos to account for the bytes we consumed. */ - bitC->bitPos[0] &= 7; - assert(nbBits > 0); - assert(nbBits <= sizeof(bitC->bitContainer[0]) * 8); - assert(bitC->ptr <= bitC->endPtr); - MEM_writeLEST(bitC->ptr, bitContainer); - bitC->ptr += nbBytes; - assert(!kFast || bitC->ptr <= bitC->endPtr); - if (!kFast && bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr; - /* bitContainer doesn't need to be modified because the leftover - * bits are already the top bitPos bits. And we don't care about - * noise in the lower values. - */ -} - -/*! HUF_endMark() - * @returns The Huffman stream end mark: A 1-bit value = 1. - */ -static HUF_CElt HUF_endMark(void) -{ - HUF_CElt endMark; - HUF_setNbBits(&endMark, 1); - HUF_setValue(&endMark, 1); - return endMark; -} - -/*! HUF_closeCStream() : - * @return Size of CStream, in bytes, - * or 0 if it could not fit into dstBuffer */ -static size_t HUF_closeCStream(HUF_CStream_t* bitC) -{ - HUF_addBits(bitC, HUF_endMark(), /* idx */ 0, /* kFast */ 0); - HUF_flushBits(bitC, /* kFast */ 0); - { - size_t const nbBits = bitC->bitPos[0] & 0xFF; - if (bitC->ptr >= bitC->endPtr) return 0; /* overflow detected */ - return (size_t)(bitC->ptr - bitC->startPtr) + (nbBits > 0); - } -} - -FORCE_INLINE_TEMPLATE void -HUF_encodeSymbol(HUF_CStream_t* bitCPtr, U32 symbol, const HUF_CElt* CTable, int idx, int fast) -{ - HUF_addBits(bitCPtr, CTable[symbol], idx, fast); -} - -FORCE_INLINE_TEMPLATE void -HUF_compress1X_usingCTable_internal_body_loop(HUF_CStream_t* bitC, - const BYTE* ip, size_t srcSize, - const HUF_CElt* ct, - int kUnroll, int kFastFlush, int kLastFast) -{ - /* Join to kUnroll */ - int n = (int)srcSize; - int rem = n % kUnroll; - if (rem > 0) { - for (; rem > 0; --rem) { - HUF_encodeSymbol(bitC, ip[--n], ct, 0, /* fast */ 0); - } - HUF_flushBits(bitC, kFastFlush); - } - assert(n % kUnroll == 0); - - /* Join to 2 * kUnroll */ - if (n % (2 * kUnroll)) { - int u; - for (u = 1; u < kUnroll; ++u) { - HUF_encodeSymbol(bitC, ip[n - u], ct, 0, 1); - } - HUF_encodeSymbol(bitC, ip[n - kUnroll], ct, 0, kLastFast); - HUF_flushBits(bitC, kFastFlush); - n -= kUnroll; - } - assert(n % (2 * kUnroll) == 0); - - for (; n>0; n-= 2 * kUnroll) { - /* Encode kUnroll symbols into the bitstream @ index 0. */ - int u; - for (u = 1; u < kUnroll; ++u) { - HUF_encodeSymbol(bitC, ip[n - u], ct, /* idx */ 0, /* fast */ 1); - } - HUF_encodeSymbol(bitC, ip[n - kUnroll], ct, /* idx */ 0, /* fast */ kLastFast); - HUF_flushBits(bitC, kFastFlush); - /* Encode kUnroll symbols into the bitstream @ index 1. - * This allows us to start filling the bit container - * without any data dependencies. - */ - HUF_zeroIndex1(bitC); - for (u = 1; u < kUnroll; ++u) { - HUF_encodeSymbol(bitC, ip[n - kUnroll - u], ct, /* idx */ 1, /* fast */ 1); - } - HUF_encodeSymbol(bitC, ip[n - kUnroll - kUnroll], ct, /* idx */ 1, /* fast */ kLastFast); - /* Merge bitstream @ index 1 into the bitstream @ index 0 */ - HUF_mergeIndex1(bitC); - HUF_flushBits(bitC, kFastFlush); - } - assert(n == 0); - -} - -/** - * Returns a tight upper bound on the output space needed by Huffman - * with 8 bytes buffer to handle over-writes. If the output is at least - * this large we don't need to do bounds checks during Huffman encoding. - */ -static size_t HUF_tightCompressBound(size_t srcSize, size_t tableLog) -{ - return ((srcSize * tableLog) >> 3) + 8; -} - - -FORCE_INLINE_TEMPLATE size_t -HUF_compress1X_usingCTable_internal_body(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable) -{ - U32 const tableLog = HUF_readCTableHeader(CTable).tableLog; - HUF_CElt const* ct = CTable + 1; - const BYTE* ip = (const BYTE*) src; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstSize; - HUF_CStream_t bitC; - - /* init */ - if (dstSize < 8) return 0; /* not enough space to compress */ - { BYTE* op = ostart; - size_t const initErr = HUF_initCStream(&bitC, op, (size_t)(oend-op)); - if (HUF_isError(initErr)) return 0; } - - if (dstSize < HUF_tightCompressBound(srcSize, (size_t)tableLog) || tableLog > 11) - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ MEM_32bits() ? 2 : 4, /* kFast */ 0, /* kLastFast */ 0); - else { - if (MEM_32bits()) { - switch (tableLog) { - case 11: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 2, /* kFastFlush */ 1, /* kLastFast */ 0); - break; - case 10: ZSTD_FALLTHROUGH; - case 9: ZSTD_FALLTHROUGH; - case 8: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 2, /* kFastFlush */ 1, /* kLastFast */ 1); - break; - case 7: ZSTD_FALLTHROUGH; - default: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 3, /* kFastFlush */ 1, /* kLastFast */ 1); - break; - } - } else { - switch (tableLog) { - case 11: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 5, /* kFastFlush */ 1, /* kLastFast */ 0); - break; - case 10: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 5, /* kFastFlush */ 1, /* kLastFast */ 1); - break; - case 9: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 6, /* kFastFlush */ 1, /* kLastFast */ 0); - break; - case 8: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 7, /* kFastFlush */ 1, /* kLastFast */ 0); - break; - case 7: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 8, /* kFastFlush */ 1, /* kLastFast */ 0); - break; - case 6: ZSTD_FALLTHROUGH; - default: - HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 9, /* kFastFlush */ 1, /* kLastFast */ 1); - break; - } - } - } - assert(bitC.ptr <= bitC.endPtr); - - return HUF_closeCStream(&bitC); -} - -#if DYNAMIC_BMI2 - -static BMI2_TARGET_ATTRIBUTE size_t -HUF_compress1X_usingCTable_internal_bmi2(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable) -{ - return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); -} - -static size_t -HUF_compress1X_usingCTable_internal_default(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable) -{ - return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); -} - -static size_t -HUF_compress1X_usingCTable_internal(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable, const int flags) -{ - if (flags & HUF_flags_bmi2) { - return HUF_compress1X_usingCTable_internal_bmi2(dst, dstSize, src, srcSize, CTable); - } - return HUF_compress1X_usingCTable_internal_default(dst, dstSize, src, srcSize, CTable); -} - -#else - -static size_t -HUF_compress1X_usingCTable_internal(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable, const int flags) -{ - (void)flags; - return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); -} - -#endif - -size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags) -{ - return HUF_compress1X_usingCTable_internal(dst, dstSize, src, srcSize, CTable, flags); -} - -static size_t -HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, - const void* src, size_t srcSize, - const HUF_CElt* CTable, int flags) -{ - size_t const segmentSize = (srcSize+3)/4; /* first 3 segments */ - const BYTE* ip = (const BYTE*) src; - const BYTE* const iend = ip + srcSize; - BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ostart + dstSize; - BYTE* op = ostart; - - if (dstSize < 6 + 1 + 1 + 1 + 8) return 0; /* minimum space to compress successfully */ - if (srcSize < 12) return 0; /* no saving possible : too small input */ - op += 6; /* jumpTable */ - - assert(op <= oend); - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); - if (cSize == 0 || cSize > 65535) return 0; - MEM_writeLE16(ostart, (U16)cSize); - op += cSize; - } - - ip += segmentSize; - assert(op <= oend); - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); - if (cSize == 0 || cSize > 65535) return 0; - MEM_writeLE16(ostart+2, (U16)cSize); - op += cSize; - } - - ip += segmentSize; - assert(op <= oend); - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); - if (cSize == 0 || cSize > 65535) return 0; - MEM_writeLE16(ostart+4, (U16)cSize); - op += cSize; - } - - ip += segmentSize; - assert(op <= oend); - assert(ip <= iend); - { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, (size_t)(iend-ip), CTable, flags) ); - if (cSize == 0 || cSize > 65535) return 0; - op += cSize; - } - - return (size_t)(op-ostart); -} - -size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags) -{ - return HUF_compress4X_usingCTable_internal(dst, dstSize, src, srcSize, CTable, flags); -} - -typedef enum { HUF_singleStream, HUF_fourStreams } HUF_nbStreams_e; - -static size_t HUF_compressCTable_internal( - BYTE* const ostart, BYTE* op, BYTE* const oend, - const void* src, size_t srcSize, - HUF_nbStreams_e nbStreams, const HUF_CElt* CTable, const int flags) -{ - size_t const cSize = (nbStreams==HUF_singleStream) ? - HUF_compress1X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, flags) : - HUF_compress4X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, flags); - if (HUF_isError(cSize)) { return cSize; } - if (cSize==0) { return 0; } /* uncompressible */ - op += cSize; - /* check compressibility */ - assert(op >= ostart); - if ((size_t)(op-ostart) >= srcSize-1) { return 0; } - return (size_t)(op-ostart); -} - -typedef struct { - unsigned count[HUF_SYMBOLVALUE_MAX + 1]; - HUF_CElt CTable[HUF_CTABLE_SIZE_ST(HUF_SYMBOLVALUE_MAX)]; - union { - HUF_buildCTable_wksp_tables buildCTable_wksp; - HUF_WriteCTableWksp writeCTable_wksp; - U32 hist_wksp[HIST_WKSP_SIZE_U32]; - } wksps; -} HUF_compress_tables_t; - -#define SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE 4096 -#define SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO 10 /* Must be >= 2 */ - -unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue) -{ - unsigned cardinality = 0; - unsigned i; - - for (i = 0; i < maxSymbolValue + 1; i++) { - if (count[i] != 0) cardinality += 1; - } - - return cardinality; -} - -unsigned HUF_minTableLog(unsigned symbolCardinality) -{ - U32 minBitsSymbols = ZSTD_highbit32(symbolCardinality) + 1; - return minBitsSymbols; -} - -unsigned HUF_optimalTableLog( - unsigned maxTableLog, - size_t srcSize, - unsigned maxSymbolValue, - void* workSpace, size_t wkspSize, - HUF_CElt* table, - const unsigned* count, - int flags) -{ - assert(srcSize > 1); /* Not supported, RLE should be used instead */ - assert(wkspSize >= sizeof(HUF_buildCTable_wksp_tables)); - - if (!(flags & HUF_flags_optimalDepth)) { - /* cheap evaluation, based on FSE */ - return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1); - } - - { BYTE* dst = (BYTE*)workSpace + sizeof(HUF_WriteCTableWksp); - size_t dstSize = wkspSize - sizeof(HUF_WriteCTableWksp); - size_t hSize, newSize; - const unsigned symbolCardinality = HUF_cardinality(count, maxSymbolValue); - const unsigned minTableLog = HUF_minTableLog(symbolCardinality); - size_t optSize = ((size_t) ~0) - 1; - unsigned optLog = maxTableLog, optLogGuess; - - DEBUGLOG(6, "HUF_optimalTableLog: probing huf depth (srcSize=%zu)", srcSize); - - /* Search until size increases */ - for (optLogGuess = minTableLog; optLogGuess <= maxTableLog; optLogGuess++) { - DEBUGLOG(7, "checking for huffLog=%u", optLogGuess); - - { size_t maxBits = HUF_buildCTable_wksp(table, count, maxSymbolValue, optLogGuess, workSpace, wkspSize); - if (ERR_isError(maxBits)) continue; - - if (maxBits < optLogGuess && optLogGuess > minTableLog) break; - - hSize = HUF_writeCTable_wksp(dst, dstSize, table, maxSymbolValue, (U32)maxBits, workSpace, wkspSize); - } - - if (ERR_isError(hSize)) continue; - - newSize = HUF_estimateCompressedSize(table, count, maxSymbolValue) + hSize; - - if (newSize > optSize + 1) { - break; - } - - if (newSize < optSize) { - optSize = newSize; - optLog = optLogGuess; - } - } - assert(optLog <= HUF_TABLELOG_MAX); - return optLog; - } -} - -/* HUF_compress_internal() : - * `workSpace_align4` must be aligned on 4-bytes boundaries, - * and occupies the same space as a table of HUF_WORKSPACE_SIZE_U64 unsigned */ -static size_t -HUF_compress_internal (void* dst, size_t dstSize, - const void* src, size_t srcSize, - unsigned maxSymbolValue, unsigned huffLog, - HUF_nbStreams_e nbStreams, - void* workSpace, size_t wkspSize, - HUF_CElt* oldHufTable, HUF_repeat* repeat, int flags) -{ - HUF_compress_tables_t* const table = (HUF_compress_tables_t*)HUF_alignUpWorkspace(workSpace, &wkspSize, ZSTD_ALIGNOF(size_t)); - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstSize; - BYTE* op = ostart; - - DEBUGLOG(5, "HUF_compress_internal (srcSize=%zu)", srcSize); - HUF_STATIC_ASSERT(sizeof(*table) + HUF_WORKSPACE_MAX_ALIGNMENT <= HUF_WORKSPACE_SIZE); - - /* checks & inits */ - if (wkspSize < sizeof(*table)) return ERROR(workSpace_tooSmall); - if (!srcSize) return 0; /* Uncompressed */ - if (!dstSize) return 0; /* cannot fit anything within dst budget */ - if (srcSize > HUF_BLOCKSIZE_MAX) return ERROR(srcSize_wrong); /* current block size limit */ - if (huffLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); - if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); - if (!maxSymbolValue) maxSymbolValue = HUF_SYMBOLVALUE_MAX; - if (!huffLog) huffLog = HUF_TABLELOG_DEFAULT; - - /* Heuristic : If old table is valid, use it for small inputs */ - if ((flags & HUF_flags_preferRepeat) && repeat && *repeat == HUF_repeat_valid) { - return HUF_compressCTable_internal(ostart, op, oend, - src, srcSize, - nbStreams, oldHufTable, flags); - } - - /* If uncompressible data is suspected, do a smaller sampling first */ - DEBUG_STATIC_ASSERT(SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO >= 2); - if ((flags & HUF_flags_suspectUncompressible) && srcSize >= (SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE * SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO)) { - size_t largestTotal = 0; - DEBUGLOG(5, "input suspected incompressible : sampling to check"); - { unsigned maxSymbolValueBegin = maxSymbolValue; - CHECK_V_F(largestBegin, HIST_count_simple (table->count, &maxSymbolValueBegin, (const BYTE*)src, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) ); - largestTotal += largestBegin; - } - { unsigned maxSymbolValueEnd = maxSymbolValue; - CHECK_V_F(largestEnd, HIST_count_simple (table->count, &maxSymbolValueEnd, (const BYTE*)src + srcSize - SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) ); - largestTotal += largestEnd; - } - if (largestTotal <= ((2 * SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) >> 7)+4) return 0; /* heuristic : probably not compressible enough */ - } - - /* Scan input and build symbol stats */ - { CHECK_V_F(largest, HIST_count_wksp (table->count, &maxSymbolValue, (const BYTE*)src, srcSize, table->wksps.hist_wksp, sizeof(table->wksps.hist_wksp)) ); - if (largest == srcSize) { *ostart = ((const BYTE*)src)[0]; return 1; } /* single symbol, rle */ - if (largest <= (srcSize >> 7)+4) return 0; /* heuristic : probably not compressible enough */ - } - DEBUGLOG(6, "histogram detail completed (%zu symbols)", showU32(table->count, maxSymbolValue+1)); - - /* Check validity of previous table */ - if ( repeat - && *repeat == HUF_repeat_check - && !HUF_validateCTable(oldHufTable, table->count, maxSymbolValue)) { - *repeat = HUF_repeat_none; - } - /* Heuristic : use existing table for small inputs */ - if ((flags & HUF_flags_preferRepeat) && repeat && *repeat != HUF_repeat_none) { - return HUF_compressCTable_internal(ostart, op, oend, - src, srcSize, - nbStreams, oldHufTable, flags); - } - - /* Build Huffman Tree */ - huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue, &table->wksps, sizeof(table->wksps), table->CTable, table->count, flags); - { size_t const maxBits = HUF_buildCTable_wksp(table->CTable, table->count, - maxSymbolValue, huffLog, - &table->wksps.buildCTable_wksp, sizeof(table->wksps.buildCTable_wksp)); - CHECK_F(maxBits); - huffLog = (U32)maxBits; - DEBUGLOG(6, "bit distribution completed (%zu symbols)", showCTableBits(table->CTable + 1, maxSymbolValue+1)); - } - - /* Write table description header */ - { CHECK_V_F(hSize, HUF_writeCTable_wksp(op, dstSize, table->CTable, maxSymbolValue, huffLog, - &table->wksps.writeCTable_wksp, sizeof(table->wksps.writeCTable_wksp)) ); - /* Check if using previous huffman table is beneficial */ - if (repeat && *repeat != HUF_repeat_none) { - size_t const oldSize = HUF_estimateCompressedSize(oldHufTable, table->count, maxSymbolValue); - size_t const newSize = HUF_estimateCompressedSize(table->CTable, table->count, maxSymbolValue); - if (oldSize <= hSize + newSize || hSize + 12 >= srcSize) { - return HUF_compressCTable_internal(ostart, op, oend, - src, srcSize, - nbStreams, oldHufTable, flags); - } } - - /* Use the new huffman table */ - if (hSize + 12ul >= srcSize) { return 0; } - op += hSize; - if (repeat) { *repeat = HUF_repeat_none; } - if (oldHufTable) - ZSTD_memcpy(oldHufTable, table->CTable, sizeof(table->CTable)); /* Save new table */ - } - return HUF_compressCTable_internal(ostart, op, oend, - src, srcSize, - nbStreams, table->CTable, flags); -} - -size_t HUF_compress1X_repeat (void* dst, size_t dstSize, - const void* src, size_t srcSize, - unsigned maxSymbolValue, unsigned huffLog, - void* workSpace, size_t wkspSize, - HUF_CElt* hufTable, HUF_repeat* repeat, int flags) -{ - DEBUGLOG(5, "HUF_compress1X_repeat (srcSize = %zu)", srcSize); - return HUF_compress_internal(dst, dstSize, src, srcSize, - maxSymbolValue, huffLog, HUF_singleStream, - workSpace, wkspSize, hufTable, - repeat, flags); -} - -/* HUF_compress4X_repeat(): - * compress input using 4 streams. - * consider skipping quickly - * reuse an existing huffman compression table */ -size_t HUF_compress4X_repeat (void* dst, size_t dstSize, - const void* src, size_t srcSize, - unsigned maxSymbolValue, unsigned huffLog, - void* workSpace, size_t wkspSize, - HUF_CElt* hufTable, HUF_repeat* repeat, int flags) -{ - DEBUGLOG(5, "HUF_compress4X_repeat (srcSize = %zu)", srcSize); - return HUF_compress_internal(dst, dstSize, src, srcSize, - maxSymbolValue, huffLog, HUF_fourStreams, - workSpace, wkspSize, - hufTable, repeat, flags); -} diff --git a/third_party/zstd/lib/compress/zstd_compress.c b/third_party/zstd/lib/compress/zstd_compress.c deleted file mode 100644 index d928b1d..0000000 --- a/third_party/zstd/lib/compress/zstd_compress.c +++ /dev/null @@ -1,7843 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/*-************************************* -* Dependencies -***************************************/ -#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ -#include "../common/zstd_deps.h" /* INT_MAX, ZSTD_memset, ZSTD_memcpy */ -#include "../common/mem.h" -#include "../common/error_private.h" -#include "hist.h" /* HIST_countFast_wksp */ -#define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */ -#include "../common/fse.h" -#include "../common/huf.h" -#include "zstd_compress_internal.h" -#include "zstd_compress_sequences.h" -#include "zstd_compress_literals.h" -#include "zstd_fast.h" -#include "zstd_double_fast.h" -#include "zstd_lazy.h" -#include "zstd_opt.h" -#include "zstd_ldm.h" -#include "zstd_compress_superblock.h" -#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_rotateRight_U64 */ - -/* *************************************************************** -* Tuning parameters -*****************************************************************/ -/*! - * COMPRESS_HEAPMODE : - * Select how default decompression function ZSTD_compress() allocates its context, - * on stack (0, default), or into heap (1). - * Note that functions with explicit context such as ZSTD_compressCCtx() are unaffected. - */ -#ifndef ZSTD_COMPRESS_HEAPMODE -# define ZSTD_COMPRESS_HEAPMODE 0 -#endif - -/*! - * ZSTD_HASHLOG3_MAX : - * Maximum size of the hash table dedicated to find 3-bytes matches, - * in log format, aka 17 => 1 << 17 == 128Ki positions. - * This structure is only used in zstd_opt. - * Since allocation is centralized for all strategies, it has to be known here. - * The actual (selected) size of the hash table is then stored in ZSTD_MatchState_t.hashLog3, - * so that zstd_opt.c doesn't need to know about this constant. - */ -#ifndef ZSTD_HASHLOG3_MAX -# define ZSTD_HASHLOG3_MAX 17 -#endif - -/*-************************************* -* Helper functions -***************************************/ -/* ZSTD_compressBound() - * Note that the result from this function is only valid for - * the one-pass compression functions. - * When employing the streaming mode, - * if flushes are frequently altering the size of blocks, - * the overhead from block headers can make the compressed data larger - * than the return value of ZSTD_compressBound(). - */ -size_t ZSTD_compressBound(size_t srcSize) { - size_t const r = ZSTD_COMPRESSBOUND(srcSize); - if (r==0) return ERROR(srcSize_wrong); - return r; -} - - -/*-************************************* -* Context memory management -***************************************/ -struct ZSTD_CDict_s { - const void* dictContent; - size_t dictContentSize; - ZSTD_dictContentType_e dictContentType; /* The dictContentType the CDict was created with */ - U32* entropyWorkspace; /* entropy workspace of HUF_WORKSPACE_SIZE bytes */ - ZSTD_cwksp workspace; - ZSTD_MatchState_t matchState; - ZSTD_compressedBlockState_t cBlockState; - ZSTD_customMem customMem; - U32 dictID; - int compressionLevel; /* 0 indicates that advanced API was used to select CDict params */ - ZSTD_ParamSwitch_e useRowMatchFinder; /* Indicates whether the CDict was created with params that would use - * row-based matchfinder. Unless the cdict is reloaded, we will use - * the same greedy/lazy matchfinder at compression time. - */ -}; /* typedef'd to ZSTD_CDict within "zstd.h" */ - -ZSTD_CCtx* ZSTD_createCCtx(void) -{ - return ZSTD_createCCtx_advanced(ZSTD_defaultCMem); -} - -static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) -{ - assert(cctx != NULL); - ZSTD_memset(cctx, 0, sizeof(*cctx)); - cctx->customMem = memManager; - cctx->bmi2 = ZSTD_cpuSupportsBmi2(); - { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); - assert(!ZSTD_isError(err)); - (void)err; - } -} - -ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) -{ - ZSTD_STATIC_ASSERT(zcss_init==0); - ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN==(0ULL - 1)); - if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; - { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); - if (!cctx) return NULL; - ZSTD_initCCtx(cctx, customMem); - return cctx; - } -} - -ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize) -{ - ZSTD_cwksp ws; - ZSTD_CCtx* cctx; - if (workspaceSize <= sizeof(ZSTD_CCtx)) return NULL; /* minimum size */ - if ((size_t)workspace & 7) return NULL; /* must be 8-aligned */ - ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_static_alloc); - - cctx = (ZSTD_CCtx*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CCtx)); - if (cctx == NULL) return NULL; - - ZSTD_memset(cctx, 0, sizeof(ZSTD_CCtx)); - ZSTD_cwksp_move(&cctx->workspace, &ws); - cctx->staticSize = workspaceSize; - - /* statically sized space. tmpWorkspace never moves (but prev/next block swap places) */ - if (!ZSTD_cwksp_check_available(&cctx->workspace, TMP_WORKSPACE_SIZE + 2 * sizeof(ZSTD_compressedBlockState_t))) return NULL; - cctx->blockState.prevCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); - cctx->blockState.nextCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); - cctx->tmpWorkspace = ZSTD_cwksp_reserve_object(&cctx->workspace, TMP_WORKSPACE_SIZE); - cctx->tmpWkspSize = TMP_WORKSPACE_SIZE; - cctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); - return cctx; -} - -/** - * Clears and frees all of the dictionaries in the CCtx. - */ -static void ZSTD_clearAllDicts(ZSTD_CCtx* cctx) -{ - ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); - ZSTD_freeCDict(cctx->localDict.cdict); - ZSTD_memset(&cctx->localDict, 0, sizeof(cctx->localDict)); - ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); - cctx->cdict = NULL; -} - -static size_t ZSTD_sizeof_localDict(ZSTD_localDict dict) -{ - size_t const bufferSize = dict.dictBuffer != NULL ? dict.dictSize : 0; - size_t const cdictSize = ZSTD_sizeof_CDict(dict.cdict); - return bufferSize + cdictSize; -} - -static void ZSTD_freeCCtxContent(ZSTD_CCtx* cctx) -{ - assert(cctx != NULL); - assert(cctx->staticSize == 0); - ZSTD_clearAllDicts(cctx); -#ifdef ZSTD_MULTITHREAD - ZSTDMT_freeCCtx(cctx->mtctx); cctx->mtctx = NULL; -#endif - ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); -} - -size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx) -{ - DEBUGLOG(3, "ZSTD_freeCCtx (address: %p)", (void*)cctx); - if (cctx==NULL) return 0; /* support free on NULL */ - RETURN_ERROR_IF(cctx->staticSize, memory_allocation, - "not compatible with static CCtx"); - { int cctxInWorkspace = ZSTD_cwksp_owns_buffer(&cctx->workspace, cctx); - ZSTD_freeCCtxContent(cctx); - if (!cctxInWorkspace) ZSTD_customFree(cctx, cctx->customMem); - } - return 0; -} - - -static size_t ZSTD_sizeof_mtctx(const ZSTD_CCtx* cctx) -{ -#ifdef ZSTD_MULTITHREAD - return ZSTDMT_sizeof_CCtx(cctx->mtctx); -#else - (void)cctx; - return 0; -#endif -} - - -size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx) -{ - if (cctx==NULL) return 0; /* support sizeof on NULL */ - /* cctx may be in the workspace */ - return (cctx->workspace.workspace == cctx ? 0 : sizeof(*cctx)) - + ZSTD_cwksp_sizeof(&cctx->workspace) - + ZSTD_sizeof_localDict(cctx->localDict) - + ZSTD_sizeof_mtctx(cctx); -} - -size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs) -{ - return ZSTD_sizeof_CCtx(zcs); /* same object */ -} - -/* private API call, for dictBuilder only */ -const SeqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx) { return &(ctx->seqStore); } - -/* Returns true if the strategy supports using a row based matchfinder */ -static int ZSTD_rowMatchFinderSupported(const ZSTD_strategy strategy) { - return (strategy >= ZSTD_greedy && strategy <= ZSTD_lazy2); -} - -/* Returns true if the strategy and useRowMatchFinder mode indicate that we will use the row based matchfinder - * for this compression. - */ -static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_ParamSwitch_e mode) { - assert(mode != ZSTD_ps_auto); - return ZSTD_rowMatchFinderSupported(strategy) && (mode == ZSTD_ps_enable); -} - -/* Returns row matchfinder usage given an initial mode and cParams */ -static ZSTD_ParamSwitch_e ZSTD_resolveRowMatchFinderMode(ZSTD_ParamSwitch_e mode, - const ZSTD_compressionParameters* const cParams) { - if (mode != ZSTD_ps_auto) return mode; /* if requested enabled, but no SIMD, we still will use row matchfinder */ - mode = ZSTD_ps_disable; - if (!ZSTD_rowMatchFinderSupported(cParams->strategy)) return mode; - if (cParams->windowLog > 14) mode = ZSTD_ps_enable; - return mode; -} - -/* Returns block splitter usage (generally speaking, when using slower/stronger compression modes) */ -static ZSTD_ParamSwitch_e ZSTD_resolveBlockSplitterMode(ZSTD_ParamSwitch_e mode, - const ZSTD_compressionParameters* const cParams) { - if (mode != ZSTD_ps_auto) return mode; - return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 17) ? ZSTD_ps_enable : ZSTD_ps_disable; -} - -/* Returns 1 if the arguments indicate that we should allocate a chainTable, 0 otherwise */ -static int ZSTD_allocateChainTable(const ZSTD_strategy strategy, - const ZSTD_ParamSwitch_e useRowMatchFinder, - const U32 forDDSDict) { - assert(useRowMatchFinder != ZSTD_ps_auto); - /* We always should allocate a chaintable if we are allocating a matchstate for a DDS dictionary matchstate. - * We do not allocate a chaintable if we are using ZSTD_fast, or are using the row-based matchfinder. - */ - return forDDSDict || ((strategy != ZSTD_fast) && !ZSTD_rowMatchFinderUsed(strategy, useRowMatchFinder)); -} - -/* Returns ZSTD_ps_enable if compression parameters are such that we should - * enable long distance matching (wlog >= 27, strategy >= btopt). - * Returns ZSTD_ps_disable otherwise. - */ -static ZSTD_ParamSwitch_e ZSTD_resolveEnableLdm(ZSTD_ParamSwitch_e mode, - const ZSTD_compressionParameters* const cParams) { - if (mode != ZSTD_ps_auto) return mode; - return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 27) ? ZSTD_ps_enable : ZSTD_ps_disable; -} - -static int ZSTD_resolveExternalSequenceValidation(int mode) { - return mode; -} - -/* Resolves maxBlockSize to the default if no value is present. */ -static size_t ZSTD_resolveMaxBlockSize(size_t maxBlockSize) { - if (maxBlockSize == 0) { - return ZSTD_BLOCKSIZE_MAX; - } else { - return maxBlockSize; - } -} - -static ZSTD_ParamSwitch_e ZSTD_resolveExternalRepcodeSearch(ZSTD_ParamSwitch_e value, int cLevel) { - if (value != ZSTD_ps_auto) return value; - if (cLevel < 10) { - return ZSTD_ps_disable; - } else { - return ZSTD_ps_enable; - } -} - -/* Returns 1 if compression parameters are such that CDict hashtable and chaintable indices are tagged. - * If so, the tags need to be removed in ZSTD_resetCCtx_byCopyingCDict. */ -static int ZSTD_CDictIndicesAreTagged(const ZSTD_compressionParameters* const cParams) { - return cParams->strategy == ZSTD_fast || cParams->strategy == ZSTD_dfast; -} - -static ZSTD_CCtx_params ZSTD_makeCCtxParamsFromCParams( - ZSTD_compressionParameters cParams) -{ - ZSTD_CCtx_params cctxParams; - /* should not matter, as all cParams are presumed properly defined */ - ZSTD_CCtxParams_init(&cctxParams, ZSTD_CLEVEL_DEFAULT); - cctxParams.cParams = cParams; - - /* Adjust advanced params according to cParams */ - cctxParams.ldmParams.enableLdm = ZSTD_resolveEnableLdm(cctxParams.ldmParams.enableLdm, &cParams); - if (cctxParams.ldmParams.enableLdm == ZSTD_ps_enable) { - ZSTD_ldm_adjustParameters(&cctxParams.ldmParams, &cParams); - assert(cctxParams.ldmParams.hashLog >= cctxParams.ldmParams.bucketSizeLog); - assert(cctxParams.ldmParams.hashRateLog < 32); - } - cctxParams.postBlockSplitter = ZSTD_resolveBlockSplitterMode(cctxParams.postBlockSplitter, &cParams); - cctxParams.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams.useRowMatchFinder, &cParams); - cctxParams.validateSequences = ZSTD_resolveExternalSequenceValidation(cctxParams.validateSequences); - cctxParams.maxBlockSize = ZSTD_resolveMaxBlockSize(cctxParams.maxBlockSize); - cctxParams.searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(cctxParams.searchForExternalRepcodes, - cctxParams.compressionLevel); - assert(!ZSTD_checkCParams(cParams)); - return cctxParams; -} - -static ZSTD_CCtx_params* ZSTD_createCCtxParams_advanced( - ZSTD_customMem customMem) -{ - ZSTD_CCtx_params* params; - if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; - params = (ZSTD_CCtx_params*)ZSTD_customCalloc( - sizeof(ZSTD_CCtx_params), customMem); - if (!params) { return NULL; } - ZSTD_CCtxParams_init(params, ZSTD_CLEVEL_DEFAULT); - params->customMem = customMem; - return params; -} - -ZSTD_CCtx_params* ZSTD_createCCtxParams(void) -{ - return ZSTD_createCCtxParams_advanced(ZSTD_defaultCMem); -} - -size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params) -{ - if (params == NULL) { return 0; } - ZSTD_customFree(params, params->customMem); - return 0; -} - -size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params) -{ - return ZSTD_CCtxParams_init(params, ZSTD_CLEVEL_DEFAULT); -} - -size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel) { - RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); - ZSTD_memset(cctxParams, 0, sizeof(*cctxParams)); - cctxParams->compressionLevel = compressionLevel; - cctxParams->fParams.contentSizeFlag = 1; - return 0; -} - -#define ZSTD_NO_CLEVEL 0 - -/** - * Initializes `cctxParams` from `params` and `compressionLevel`. - * @param compressionLevel If params are derived from a compression level then that compression level, otherwise ZSTD_NO_CLEVEL. - */ -static void -ZSTD_CCtxParams_init_internal(ZSTD_CCtx_params* cctxParams, - const ZSTD_parameters* params, - int compressionLevel) -{ - assert(!ZSTD_checkCParams(params->cParams)); - ZSTD_memset(cctxParams, 0, sizeof(*cctxParams)); - cctxParams->cParams = params->cParams; - cctxParams->fParams = params->fParams; - /* Should not matter, as all cParams are presumed properly defined. - * But, set it for tracing anyway. - */ - cctxParams->compressionLevel = compressionLevel; - cctxParams->useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams->useRowMatchFinder, ¶ms->cParams); - cctxParams->postBlockSplitter = ZSTD_resolveBlockSplitterMode(cctxParams->postBlockSplitter, ¶ms->cParams); - cctxParams->ldmParams.enableLdm = ZSTD_resolveEnableLdm(cctxParams->ldmParams.enableLdm, ¶ms->cParams); - cctxParams->validateSequences = ZSTD_resolveExternalSequenceValidation(cctxParams->validateSequences); - cctxParams->maxBlockSize = ZSTD_resolveMaxBlockSize(cctxParams->maxBlockSize); - cctxParams->searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(cctxParams->searchForExternalRepcodes, compressionLevel); - DEBUGLOG(4, "ZSTD_CCtxParams_init_internal: useRowMatchFinder=%d, useBlockSplitter=%d ldm=%d", - cctxParams->useRowMatchFinder, cctxParams->postBlockSplitter, cctxParams->ldmParams.enableLdm); -} - -size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params) -{ - RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); - FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); - ZSTD_CCtxParams_init_internal(cctxParams, ¶ms, ZSTD_NO_CLEVEL); - return 0; -} - -/** - * Sets cctxParams' cParams and fParams from params, but otherwise leaves them alone. - * @param params Validated zstd parameters. - */ -static void ZSTD_CCtxParams_setZstdParams( - ZSTD_CCtx_params* cctxParams, const ZSTD_parameters* params) -{ - assert(!ZSTD_checkCParams(params->cParams)); - cctxParams->cParams = params->cParams; - cctxParams->fParams = params->fParams; - /* Should not matter, as all cParams are presumed properly defined. - * But, set it for tracing anyway. - */ - cctxParams->compressionLevel = ZSTD_NO_CLEVEL; -} - -ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param) -{ - ZSTD_bounds bounds = { 0, 0, 0 }; - - switch(param) - { - case ZSTD_c_compressionLevel: - bounds.lowerBound = ZSTD_minCLevel(); - bounds.upperBound = ZSTD_maxCLevel(); - return bounds; - - case ZSTD_c_windowLog: - bounds.lowerBound = ZSTD_WINDOWLOG_MIN; - bounds.upperBound = ZSTD_WINDOWLOG_MAX; - return bounds; - - case ZSTD_c_hashLog: - bounds.lowerBound = ZSTD_HASHLOG_MIN; - bounds.upperBound = ZSTD_HASHLOG_MAX; - return bounds; - - case ZSTD_c_chainLog: - bounds.lowerBound = ZSTD_CHAINLOG_MIN; - bounds.upperBound = ZSTD_CHAINLOG_MAX; - return bounds; - - case ZSTD_c_searchLog: - bounds.lowerBound = ZSTD_SEARCHLOG_MIN; - bounds.upperBound = ZSTD_SEARCHLOG_MAX; - return bounds; - - case ZSTD_c_minMatch: - bounds.lowerBound = ZSTD_MINMATCH_MIN; - bounds.upperBound = ZSTD_MINMATCH_MAX; - return bounds; - - case ZSTD_c_targetLength: - bounds.lowerBound = ZSTD_TARGETLENGTH_MIN; - bounds.upperBound = ZSTD_TARGETLENGTH_MAX; - return bounds; - - case ZSTD_c_strategy: - bounds.lowerBound = ZSTD_STRATEGY_MIN; - bounds.upperBound = ZSTD_STRATEGY_MAX; - return bounds; - - case ZSTD_c_contentSizeFlag: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_checksumFlag: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_dictIDFlag: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_nbWorkers: - bounds.lowerBound = 0; -#ifdef ZSTD_MULTITHREAD - bounds.upperBound = ZSTDMT_NBWORKERS_MAX; -#else - bounds.upperBound = 0; -#endif - return bounds; - - case ZSTD_c_jobSize: - bounds.lowerBound = 0; -#ifdef ZSTD_MULTITHREAD - bounds.upperBound = ZSTDMT_JOBSIZE_MAX; -#else - bounds.upperBound = 0; -#endif - return bounds; - - case ZSTD_c_overlapLog: -#ifdef ZSTD_MULTITHREAD - bounds.lowerBound = ZSTD_OVERLAPLOG_MIN; - bounds.upperBound = ZSTD_OVERLAPLOG_MAX; -#else - bounds.lowerBound = 0; - bounds.upperBound = 0; -#endif - return bounds; - - case ZSTD_c_enableDedicatedDictSearch: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_enableLongDistanceMatching: - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - case ZSTD_c_ldmHashLog: - bounds.lowerBound = ZSTD_LDM_HASHLOG_MIN; - bounds.upperBound = ZSTD_LDM_HASHLOG_MAX; - return bounds; - - case ZSTD_c_ldmMinMatch: - bounds.lowerBound = ZSTD_LDM_MINMATCH_MIN; - bounds.upperBound = ZSTD_LDM_MINMATCH_MAX; - return bounds; - - case ZSTD_c_ldmBucketSizeLog: - bounds.lowerBound = ZSTD_LDM_BUCKETSIZELOG_MIN; - bounds.upperBound = ZSTD_LDM_BUCKETSIZELOG_MAX; - return bounds; - - case ZSTD_c_ldmHashRateLog: - bounds.lowerBound = ZSTD_LDM_HASHRATELOG_MIN; - bounds.upperBound = ZSTD_LDM_HASHRATELOG_MAX; - return bounds; - - /* experimental parameters */ - case ZSTD_c_rsyncable: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_forceMaxWindow : - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_format: - ZSTD_STATIC_ASSERT(ZSTD_f_zstd1 < ZSTD_f_zstd1_magicless); - bounds.lowerBound = ZSTD_f_zstd1; - bounds.upperBound = ZSTD_f_zstd1_magicless; /* note : how to ensure at compile time that this is the highest value enum ? */ - return bounds; - - case ZSTD_c_forceAttachDict: - ZSTD_STATIC_ASSERT(ZSTD_dictDefaultAttach < ZSTD_dictForceLoad); - bounds.lowerBound = ZSTD_dictDefaultAttach; - bounds.upperBound = ZSTD_dictForceLoad; /* note : how to ensure at compile time that this is the highest value enum ? */ - return bounds; - - case ZSTD_c_literalCompressionMode: - ZSTD_STATIC_ASSERT(ZSTD_ps_auto < ZSTD_ps_enable && ZSTD_ps_enable < ZSTD_ps_disable); - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - case ZSTD_c_targetCBlockSize: - bounds.lowerBound = ZSTD_TARGETCBLOCKSIZE_MIN; - bounds.upperBound = ZSTD_TARGETCBLOCKSIZE_MAX; - return bounds; - - case ZSTD_c_srcSizeHint: - bounds.lowerBound = ZSTD_SRCSIZEHINT_MIN; - bounds.upperBound = ZSTD_SRCSIZEHINT_MAX; - return bounds; - - case ZSTD_c_stableInBuffer: - case ZSTD_c_stableOutBuffer: - bounds.lowerBound = (int)ZSTD_bm_buffered; - bounds.upperBound = (int)ZSTD_bm_stable; - return bounds; - - case ZSTD_c_blockDelimiters: - bounds.lowerBound = (int)ZSTD_sf_noBlockDelimiters; - bounds.upperBound = (int)ZSTD_sf_explicitBlockDelimiters; - return bounds; - - case ZSTD_c_validateSequences: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_splitAfterSequences: - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - case ZSTD_c_blockSplitterLevel: - bounds.lowerBound = 0; - bounds.upperBound = ZSTD_BLOCKSPLITTER_LEVEL_MAX; - return bounds; - - case ZSTD_c_useRowMatchFinder: - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - case ZSTD_c_deterministicRefPrefix: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_prefetchCDictTables: - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - case ZSTD_c_enableSeqProducerFallback: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - - case ZSTD_c_maxBlockSize: - bounds.lowerBound = ZSTD_BLOCKSIZE_MAX_MIN; - bounds.upperBound = ZSTD_BLOCKSIZE_MAX; - return bounds; - - case ZSTD_c_repcodeResolution: - bounds.lowerBound = (int)ZSTD_ps_auto; - bounds.upperBound = (int)ZSTD_ps_disable; - return bounds; - - default: - bounds.error = ERROR(parameter_unsupported); - return bounds; - } -} - -/* ZSTD_cParam_clampBounds: - * Clamps the value into the bounded range. - */ -static size_t ZSTD_cParam_clampBounds(ZSTD_cParameter cParam, int* value) -{ - ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); - if (ZSTD_isError(bounds.error)) return bounds.error; - if (*value < bounds.lowerBound) *value = bounds.lowerBound; - if (*value > bounds.upperBound) *value = bounds.upperBound; - return 0; -} - -#define BOUNDCHECK(cParam, val) \ - do { \ - RETURN_ERROR_IF(!ZSTD_cParam_withinBounds(cParam,val), \ - parameter_outOfBound, "Param out of bounds"); \ - } while (0) - - -static int ZSTD_isUpdateAuthorized(ZSTD_cParameter param) -{ - switch(param) - { - case ZSTD_c_compressionLevel: - case ZSTD_c_hashLog: - case ZSTD_c_chainLog: - case ZSTD_c_searchLog: - case ZSTD_c_minMatch: - case ZSTD_c_targetLength: - case ZSTD_c_strategy: - case ZSTD_c_blockSplitterLevel: - return 1; - - case ZSTD_c_format: - case ZSTD_c_windowLog: - case ZSTD_c_contentSizeFlag: - case ZSTD_c_checksumFlag: - case ZSTD_c_dictIDFlag: - case ZSTD_c_forceMaxWindow : - case ZSTD_c_nbWorkers: - case ZSTD_c_jobSize: - case ZSTD_c_overlapLog: - case ZSTD_c_rsyncable: - case ZSTD_c_enableDedicatedDictSearch: - case ZSTD_c_enableLongDistanceMatching: - case ZSTD_c_ldmHashLog: - case ZSTD_c_ldmMinMatch: - case ZSTD_c_ldmBucketSizeLog: - case ZSTD_c_ldmHashRateLog: - case ZSTD_c_forceAttachDict: - case ZSTD_c_literalCompressionMode: - case ZSTD_c_targetCBlockSize: - case ZSTD_c_srcSizeHint: - case ZSTD_c_stableInBuffer: - case ZSTD_c_stableOutBuffer: - case ZSTD_c_blockDelimiters: - case ZSTD_c_validateSequences: - case ZSTD_c_splitAfterSequences: - case ZSTD_c_useRowMatchFinder: - case ZSTD_c_deterministicRefPrefix: - case ZSTD_c_prefetchCDictTables: - case ZSTD_c_enableSeqProducerFallback: - case ZSTD_c_maxBlockSize: - case ZSTD_c_repcodeResolution: - default: - return 0; - } -} - -size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value) -{ - DEBUGLOG(4, "ZSTD_CCtx_setParameter (%i, %i)", (int)param, value); - if (cctx->streamStage != zcss_init) { - if (ZSTD_isUpdateAuthorized(param)) { - cctx->cParamsChanged = 1; - } else { - RETURN_ERROR(stage_wrong, "can only set params in cctx init stage"); - } } - - switch(param) - { - case ZSTD_c_nbWorkers: - RETURN_ERROR_IF((value!=0) && cctx->staticSize, parameter_unsupported, - "MT not compatible with static alloc"); - break; - - case ZSTD_c_compressionLevel: - case ZSTD_c_windowLog: - case ZSTD_c_hashLog: - case ZSTD_c_chainLog: - case ZSTD_c_searchLog: - case ZSTD_c_minMatch: - case ZSTD_c_targetLength: - case ZSTD_c_strategy: - case ZSTD_c_ldmHashRateLog: - case ZSTD_c_format: - case ZSTD_c_contentSizeFlag: - case ZSTD_c_checksumFlag: - case ZSTD_c_dictIDFlag: - case ZSTD_c_forceMaxWindow: - case ZSTD_c_forceAttachDict: - case ZSTD_c_literalCompressionMode: - case ZSTD_c_jobSize: - case ZSTD_c_overlapLog: - case ZSTD_c_rsyncable: - case ZSTD_c_enableDedicatedDictSearch: - case ZSTD_c_enableLongDistanceMatching: - case ZSTD_c_ldmHashLog: - case ZSTD_c_ldmMinMatch: - case ZSTD_c_ldmBucketSizeLog: - case ZSTD_c_targetCBlockSize: - case ZSTD_c_srcSizeHint: - case ZSTD_c_stableInBuffer: - case ZSTD_c_stableOutBuffer: - case ZSTD_c_blockDelimiters: - case ZSTD_c_validateSequences: - case ZSTD_c_splitAfterSequences: - case ZSTD_c_blockSplitterLevel: - case ZSTD_c_useRowMatchFinder: - case ZSTD_c_deterministicRefPrefix: - case ZSTD_c_prefetchCDictTables: - case ZSTD_c_enableSeqProducerFallback: - case ZSTD_c_maxBlockSize: - case ZSTD_c_repcodeResolution: - break; - - default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); - } - return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value); -} - -size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, - ZSTD_cParameter param, int value) -{ - DEBUGLOG(4, "ZSTD_CCtxParams_setParameter (%i, %i)", (int)param, value); - switch(param) - { - case ZSTD_c_format : - BOUNDCHECK(ZSTD_c_format, value); - CCtxParams->format = (ZSTD_format_e)value; - return (size_t)CCtxParams->format; - - case ZSTD_c_compressionLevel : { - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); - if (value == 0) - CCtxParams->compressionLevel = ZSTD_CLEVEL_DEFAULT; /* 0 == default */ - else - CCtxParams->compressionLevel = value; - if (CCtxParams->compressionLevel >= 0) return (size_t)CCtxParams->compressionLevel; - return 0; /* return type (size_t) cannot represent negative values */ - } - - case ZSTD_c_windowLog : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_windowLog, value); - CCtxParams->cParams.windowLog = (U32)value; - return CCtxParams->cParams.windowLog; - - case ZSTD_c_hashLog : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_hashLog, value); - CCtxParams->cParams.hashLog = (U32)value; - return CCtxParams->cParams.hashLog; - - case ZSTD_c_chainLog : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_chainLog, value); - CCtxParams->cParams.chainLog = (U32)value; - return CCtxParams->cParams.chainLog; - - case ZSTD_c_searchLog : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_searchLog, value); - CCtxParams->cParams.searchLog = (U32)value; - return (size_t)value; - - case ZSTD_c_minMatch : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_minMatch, value); - CCtxParams->cParams.minMatch = (U32)value; - return CCtxParams->cParams.minMatch; - - case ZSTD_c_targetLength : - BOUNDCHECK(ZSTD_c_targetLength, value); - CCtxParams->cParams.targetLength = (U32)value; - return CCtxParams->cParams.targetLength; - - case ZSTD_c_strategy : - if (value!=0) /* 0 => use default */ - BOUNDCHECK(ZSTD_c_strategy, value); - CCtxParams->cParams.strategy = (ZSTD_strategy)value; - return (size_t)CCtxParams->cParams.strategy; - - case ZSTD_c_contentSizeFlag : - /* Content size written in frame header _when known_ (default:1) */ - DEBUGLOG(4, "set content size flag = %u", (value!=0)); - CCtxParams->fParams.contentSizeFlag = value != 0; - return (size_t)CCtxParams->fParams.contentSizeFlag; - - case ZSTD_c_checksumFlag : - /* A 32-bits content checksum will be calculated and written at end of frame (default:0) */ - CCtxParams->fParams.checksumFlag = value != 0; - return (size_t)CCtxParams->fParams.checksumFlag; - - case ZSTD_c_dictIDFlag : /* When applicable, dictionary's dictID is provided in frame header (default:1) */ - DEBUGLOG(4, "set dictIDFlag = %u", (value!=0)); - CCtxParams->fParams.noDictIDFlag = !value; - return !CCtxParams->fParams.noDictIDFlag; - - case ZSTD_c_forceMaxWindow : - CCtxParams->forceWindow = (value != 0); - return (size_t)CCtxParams->forceWindow; - - case ZSTD_c_forceAttachDict : { - const ZSTD_dictAttachPref_e pref = (ZSTD_dictAttachPref_e)value; - BOUNDCHECK(ZSTD_c_forceAttachDict, (int)pref); - CCtxParams->attachDictPref = pref; - return CCtxParams->attachDictPref; - } - - case ZSTD_c_literalCompressionMode : { - const ZSTD_ParamSwitch_e lcm = (ZSTD_ParamSwitch_e)value; - BOUNDCHECK(ZSTD_c_literalCompressionMode, (int)lcm); - CCtxParams->literalCompressionMode = lcm; - return CCtxParams->literalCompressionMode; - } - - case ZSTD_c_nbWorkers : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); - return 0; -#else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); - CCtxParams->nbWorkers = value; - return (size_t)(CCtxParams->nbWorkers); -#endif - - case ZSTD_c_jobSize : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); - return 0; -#else - /* Adjust to the minimum non-default value. */ - if (value != 0 && value < ZSTDMT_JOBSIZE_MIN) - value = ZSTDMT_JOBSIZE_MIN; - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); - assert(value >= 0); - CCtxParams->jobSize = (size_t)value; - return CCtxParams->jobSize; -#endif - - case ZSTD_c_overlapLog : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); - return 0; -#else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); - CCtxParams->overlapLog = value; - return (size_t)CCtxParams->overlapLog; -#endif - - case ZSTD_c_rsyncable : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); - return 0; -#else - FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); - CCtxParams->rsyncable = value; - return (size_t)CCtxParams->rsyncable; -#endif - - case ZSTD_c_enableDedicatedDictSearch : - CCtxParams->enableDedicatedDictSearch = (value!=0); - return (size_t)CCtxParams->enableDedicatedDictSearch; - - case ZSTD_c_enableLongDistanceMatching : - BOUNDCHECK(ZSTD_c_enableLongDistanceMatching, value); - CCtxParams->ldmParams.enableLdm = (ZSTD_ParamSwitch_e)value; - return CCtxParams->ldmParams.enableLdm; - - case ZSTD_c_ldmHashLog : - if (value!=0) /* 0 ==> auto */ - BOUNDCHECK(ZSTD_c_ldmHashLog, value); - CCtxParams->ldmParams.hashLog = (U32)value; - return CCtxParams->ldmParams.hashLog; - - case ZSTD_c_ldmMinMatch : - if (value!=0) /* 0 ==> default */ - BOUNDCHECK(ZSTD_c_ldmMinMatch, value); - CCtxParams->ldmParams.minMatchLength = (U32)value; - return CCtxParams->ldmParams.minMatchLength; - - case ZSTD_c_ldmBucketSizeLog : - if (value!=0) /* 0 ==> default */ - BOUNDCHECK(ZSTD_c_ldmBucketSizeLog, value); - CCtxParams->ldmParams.bucketSizeLog = (U32)value; - return CCtxParams->ldmParams.bucketSizeLog; - - case ZSTD_c_ldmHashRateLog : - if (value!=0) /* 0 ==> default */ - BOUNDCHECK(ZSTD_c_ldmHashRateLog, value); - CCtxParams->ldmParams.hashRateLog = (U32)value; - return CCtxParams->ldmParams.hashRateLog; - - case ZSTD_c_targetCBlockSize : - if (value!=0) { /* 0 ==> default */ - value = MAX(value, ZSTD_TARGETCBLOCKSIZE_MIN); - BOUNDCHECK(ZSTD_c_targetCBlockSize, value); - } - CCtxParams->targetCBlockSize = (U32)value; - return CCtxParams->targetCBlockSize; - - case ZSTD_c_srcSizeHint : - if (value!=0) /* 0 ==> default */ - BOUNDCHECK(ZSTD_c_srcSizeHint, value); - CCtxParams->srcSizeHint = value; - return (size_t)CCtxParams->srcSizeHint; - - case ZSTD_c_stableInBuffer: - BOUNDCHECK(ZSTD_c_stableInBuffer, value); - CCtxParams->inBufferMode = (ZSTD_bufferMode_e)value; - return CCtxParams->inBufferMode; - - case ZSTD_c_stableOutBuffer: - BOUNDCHECK(ZSTD_c_stableOutBuffer, value); - CCtxParams->outBufferMode = (ZSTD_bufferMode_e)value; - return CCtxParams->outBufferMode; - - case ZSTD_c_blockDelimiters: - BOUNDCHECK(ZSTD_c_blockDelimiters, value); - CCtxParams->blockDelimiters = (ZSTD_SequenceFormat_e)value; - return CCtxParams->blockDelimiters; - - case ZSTD_c_validateSequences: - BOUNDCHECK(ZSTD_c_validateSequences, value); - CCtxParams->validateSequences = value; - return (size_t)CCtxParams->validateSequences; - - case ZSTD_c_splitAfterSequences: - BOUNDCHECK(ZSTD_c_splitAfterSequences, value); - CCtxParams->postBlockSplitter = (ZSTD_ParamSwitch_e)value; - return CCtxParams->postBlockSplitter; - - case ZSTD_c_blockSplitterLevel: - BOUNDCHECK(ZSTD_c_blockSplitterLevel, value); - CCtxParams->preBlockSplitter_level = value; - return (size_t)CCtxParams->preBlockSplitter_level; - - case ZSTD_c_useRowMatchFinder: - BOUNDCHECK(ZSTD_c_useRowMatchFinder, value); - CCtxParams->useRowMatchFinder = (ZSTD_ParamSwitch_e)value; - return CCtxParams->useRowMatchFinder; - - case ZSTD_c_deterministicRefPrefix: - BOUNDCHECK(ZSTD_c_deterministicRefPrefix, value); - CCtxParams->deterministicRefPrefix = !!value; - return (size_t)CCtxParams->deterministicRefPrefix; - - case ZSTD_c_prefetchCDictTables: - BOUNDCHECK(ZSTD_c_prefetchCDictTables, value); - CCtxParams->prefetchCDictTables = (ZSTD_ParamSwitch_e)value; - return CCtxParams->prefetchCDictTables; - - case ZSTD_c_enableSeqProducerFallback: - BOUNDCHECK(ZSTD_c_enableSeqProducerFallback, value); - CCtxParams->enableMatchFinderFallback = value; - return (size_t)CCtxParams->enableMatchFinderFallback; - - case ZSTD_c_maxBlockSize: - if (value!=0) /* 0 ==> default */ - BOUNDCHECK(ZSTD_c_maxBlockSize, value); - assert(value>=0); - CCtxParams->maxBlockSize = (size_t)value; - return CCtxParams->maxBlockSize; - - case ZSTD_c_repcodeResolution: - BOUNDCHECK(ZSTD_c_repcodeResolution, value); - CCtxParams->searchForExternalRepcodes = (ZSTD_ParamSwitch_e)value; - return CCtxParams->searchForExternalRepcodes; - - default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); - } -} - -size_t ZSTD_CCtx_getParameter(ZSTD_CCtx const* cctx, ZSTD_cParameter param, int* value) -{ - return ZSTD_CCtxParams_getParameter(&cctx->requestedParams, param, value); -} - -size_t ZSTD_CCtxParams_getParameter( - ZSTD_CCtx_params const* CCtxParams, ZSTD_cParameter param, int* value) -{ - switch(param) - { - case ZSTD_c_format : - *value = (int)CCtxParams->format; - break; - case ZSTD_c_compressionLevel : - *value = CCtxParams->compressionLevel; - break; - case ZSTD_c_windowLog : - *value = (int)CCtxParams->cParams.windowLog; - break; - case ZSTD_c_hashLog : - *value = (int)CCtxParams->cParams.hashLog; - break; - case ZSTD_c_chainLog : - *value = (int)CCtxParams->cParams.chainLog; - break; - case ZSTD_c_searchLog : - *value = (int)CCtxParams->cParams.searchLog; - break; - case ZSTD_c_minMatch : - *value = (int)CCtxParams->cParams.minMatch; - break; - case ZSTD_c_targetLength : - *value = (int)CCtxParams->cParams.targetLength; - break; - case ZSTD_c_strategy : - *value = (int)CCtxParams->cParams.strategy; - break; - case ZSTD_c_contentSizeFlag : - *value = CCtxParams->fParams.contentSizeFlag; - break; - case ZSTD_c_checksumFlag : - *value = CCtxParams->fParams.checksumFlag; - break; - case ZSTD_c_dictIDFlag : - *value = !CCtxParams->fParams.noDictIDFlag; - break; - case ZSTD_c_forceMaxWindow : - *value = CCtxParams->forceWindow; - break; - case ZSTD_c_forceAttachDict : - *value = (int)CCtxParams->attachDictPref; - break; - case ZSTD_c_literalCompressionMode : - *value = (int)CCtxParams->literalCompressionMode; - break; - case ZSTD_c_nbWorkers : -#ifndef ZSTD_MULTITHREAD - assert(CCtxParams->nbWorkers == 0); -#endif - *value = CCtxParams->nbWorkers; - break; - case ZSTD_c_jobSize : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); -#else - assert(CCtxParams->jobSize <= INT_MAX); - *value = (int)CCtxParams->jobSize; - break; -#endif - case ZSTD_c_overlapLog : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); -#else - *value = CCtxParams->overlapLog; - break; -#endif - case ZSTD_c_rsyncable : -#ifndef ZSTD_MULTITHREAD - RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); -#else - *value = CCtxParams->rsyncable; - break; -#endif - case ZSTD_c_enableDedicatedDictSearch : - *value = CCtxParams->enableDedicatedDictSearch; - break; - case ZSTD_c_enableLongDistanceMatching : - *value = (int)CCtxParams->ldmParams.enableLdm; - break; - case ZSTD_c_ldmHashLog : - *value = (int)CCtxParams->ldmParams.hashLog; - break; - case ZSTD_c_ldmMinMatch : - *value = (int)CCtxParams->ldmParams.minMatchLength; - break; - case ZSTD_c_ldmBucketSizeLog : - *value = (int)CCtxParams->ldmParams.bucketSizeLog; - break; - case ZSTD_c_ldmHashRateLog : - *value = (int)CCtxParams->ldmParams.hashRateLog; - break; - case ZSTD_c_targetCBlockSize : - *value = (int)CCtxParams->targetCBlockSize; - break; - case ZSTD_c_srcSizeHint : - *value = (int)CCtxParams->srcSizeHint; - break; - case ZSTD_c_stableInBuffer : - *value = (int)CCtxParams->inBufferMode; - break; - case ZSTD_c_stableOutBuffer : - *value = (int)CCtxParams->outBufferMode; - break; - case ZSTD_c_blockDelimiters : - *value = (int)CCtxParams->blockDelimiters; - break; - case ZSTD_c_validateSequences : - *value = (int)CCtxParams->validateSequences; - break; - case ZSTD_c_splitAfterSequences : - *value = (int)CCtxParams->postBlockSplitter; - break; - case ZSTD_c_blockSplitterLevel : - *value = CCtxParams->preBlockSplitter_level; - break; - case ZSTD_c_useRowMatchFinder : - *value = (int)CCtxParams->useRowMatchFinder; - break; - case ZSTD_c_deterministicRefPrefix: - *value = (int)CCtxParams->deterministicRefPrefix; - break; - case ZSTD_c_prefetchCDictTables: - *value = (int)CCtxParams->prefetchCDictTables; - break; - case ZSTD_c_enableSeqProducerFallback: - *value = CCtxParams->enableMatchFinderFallback; - break; - case ZSTD_c_maxBlockSize: - *value = (int)CCtxParams->maxBlockSize; - break; - case ZSTD_c_repcodeResolution: - *value = (int)CCtxParams->searchForExternalRepcodes; - break; - default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); - } - return 0; -} - -/** ZSTD_CCtx_setParametersUsingCCtxParams() : - * just applies `params` into `cctx` - * no action is performed, parameters are merely stored. - * If ZSTDMT is enabled, parameters are pushed to cctx->mtctx. - * This is possible even if a compression is ongoing. - * In which case, new parameters will be applied on the fly, starting with next compression job. - */ -size_t ZSTD_CCtx_setParametersUsingCCtxParams( - ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params) -{ - DEBUGLOG(4, "ZSTD_CCtx_setParametersUsingCCtxParams"); - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "The context is in the wrong stage!"); - RETURN_ERROR_IF(cctx->cdict, stage_wrong, - "Can't override parameters with cdict attached (some must " - "be inherited from the cdict)."); - - cctx->requestedParams = *params; - return 0; -} - -size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters cparams) -{ - ZSTD_STATIC_ASSERT(sizeof(cparams) == 7 * 4 /* all params are listed below */); - DEBUGLOG(4, "ZSTD_CCtx_setCParams"); - /* only update if all parameters are valid */ - FORWARD_IF_ERROR(ZSTD_checkCParams(cparams), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, (int)cparams.windowLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_chainLog, (int)cparams.chainLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_hashLog, (int)cparams.hashLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_searchLog, (int)cparams.searchLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_minMatch, (int)cparams.minMatch), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetLength, (int)cparams.targetLength), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, (int)cparams.strategy), ""); - return 0; -} - -size_t ZSTD_CCtx_setFParams(ZSTD_CCtx* cctx, ZSTD_frameParameters fparams) -{ - ZSTD_STATIC_ASSERT(sizeof(fparams) == 3 * 4 /* all params are listed below */); - DEBUGLOG(4, "ZSTD_CCtx_setFParams"); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_contentSizeFlag, fparams.contentSizeFlag != 0), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, fparams.checksumFlag != 0), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_dictIDFlag, fparams.noDictIDFlag == 0), ""); - return 0; -} - -size_t ZSTD_CCtx_setParams(ZSTD_CCtx* cctx, ZSTD_parameters params) -{ - DEBUGLOG(4, "ZSTD_CCtx_setParams"); - /* First check cParams, because we want to update all or none. */ - FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); - /* Next set fParams, because this could fail if the cctx isn't in init stage. */ - FORWARD_IF_ERROR(ZSTD_CCtx_setFParams(cctx, params.fParams), ""); - /* Finally set cParams, which should succeed. */ - FORWARD_IF_ERROR(ZSTD_CCtx_setCParams(cctx, params.cParams), ""); - return 0; -} - -size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize) -{ - DEBUGLOG(4, "ZSTD_CCtx_setPledgedSrcSize to %llu bytes", pledgedSrcSize); - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Can't set pledgedSrcSize when not in init stage."); - cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1; - return 0; -} - -static ZSTD_compressionParameters ZSTD_dedicatedDictSearch_getCParams( - int const compressionLevel, - size_t const dictSize); -static int ZSTD_dedicatedDictSearch_isSupported( - const ZSTD_compressionParameters* cParams); -static void ZSTD_dedicatedDictSearch_revertCParams( - ZSTD_compressionParameters* cParams); - -/** - * Initializes the local dictionary using requested parameters. - * NOTE: Initialization does not employ the pledged src size, - * because the dictionary may be used for multiple compressions. - */ -static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx) -{ - ZSTD_localDict* const dl = &cctx->localDict; - if (dl->dict == NULL) { - /* No local dictionary. */ - assert(dl->dictBuffer == NULL); - assert(dl->cdict == NULL); - assert(dl->dictSize == 0); - return 0; - } - if (dl->cdict != NULL) { - /* Local dictionary already initialized. */ - assert(cctx->cdict == dl->cdict); - return 0; - } - assert(dl->dictSize > 0); - assert(cctx->cdict == NULL); - assert(cctx->prefixDict.dict == NULL); - - dl->cdict = ZSTD_createCDict_advanced2( - dl->dict, - dl->dictSize, - ZSTD_dlm_byRef, - dl->dictContentType, - &cctx->requestedParams, - cctx->customMem); - RETURN_ERROR_IF(!dl->cdict, memory_allocation, "ZSTD_createCDict_advanced failed"); - cctx->cdict = dl->cdict; - return 0; -} - -size_t ZSTD_CCtx_loadDictionary_advanced( - ZSTD_CCtx* cctx, - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType) -{ - DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize); - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Can't load a dictionary when cctx is not in init stage."); - ZSTD_clearAllDicts(cctx); /* erase any previously set dictionary */ - if (dict == NULL || dictSize == 0) /* no dictionary */ - return 0; - if (dictLoadMethod == ZSTD_dlm_byRef) { - cctx->localDict.dict = dict; - } else { - /* copy dictionary content inside CCtx to own its lifetime */ - void* dictBuffer; - RETURN_ERROR_IF(cctx->staticSize, memory_allocation, - "static CCtx can't allocate for an internal copy of dictionary"); - dictBuffer = ZSTD_customMalloc(dictSize, cctx->customMem); - RETURN_ERROR_IF(dictBuffer==NULL, memory_allocation, - "allocation failed for dictionary content"); - ZSTD_memcpy(dictBuffer, dict, dictSize); - cctx->localDict.dictBuffer = dictBuffer; /* owned ptr to free */ - cctx->localDict.dict = dictBuffer; /* read-only reference */ - } - cctx->localDict.dictSize = dictSize; - cctx->localDict.dictContentType = dictContentType; - return 0; -} - -size_t ZSTD_CCtx_loadDictionary_byReference( - ZSTD_CCtx* cctx, const void* dict, size_t dictSize) -{ - return ZSTD_CCtx_loadDictionary_advanced( - cctx, dict, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto); -} - -size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize) -{ - return ZSTD_CCtx_loadDictionary_advanced( - cctx, dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto); -} - - -size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) -{ - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Can't ref a dict when ctx not in init stage."); - /* Free the existing local cdict (if any) to save memory. */ - ZSTD_clearAllDicts(cctx); - cctx->cdict = cdict; - return 0; -} - -size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx* cctx, ZSTD_threadPool* pool) -{ - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Can't ref a pool when ctx not in init stage."); - cctx->pool = pool; - return 0; -} - -size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize) -{ - return ZSTD_CCtx_refPrefix_advanced(cctx, prefix, prefixSize, ZSTD_dct_rawContent); -} - -size_t ZSTD_CCtx_refPrefix_advanced( - ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) -{ - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Can't ref a prefix when ctx not in init stage."); - ZSTD_clearAllDicts(cctx); - if (prefix != NULL && prefixSize > 0) { - cctx->prefixDict.dict = prefix; - cctx->prefixDict.dictSize = prefixSize; - cctx->prefixDict.dictContentType = dictContentType; - } - return 0; -} - -/*! ZSTD_CCtx_reset() : - * Also dumps dictionary */ -size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset) -{ - if ( (reset == ZSTD_reset_session_only) - || (reset == ZSTD_reset_session_and_parameters) ) { - cctx->streamStage = zcss_init; - cctx->pledgedSrcSizePlusOne = 0; - } - if ( (reset == ZSTD_reset_parameters) - || (reset == ZSTD_reset_session_and_parameters) ) { - RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, - "Reset parameters is only possible during init stage."); - ZSTD_clearAllDicts(cctx); - return ZSTD_CCtxParams_reset(&cctx->requestedParams); - } - return 0; -} - - -/** ZSTD_checkCParams() : - control CParam values remain within authorized range. - @return : 0, or an error code if one value is beyond authorized range */ -size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams) -{ - BOUNDCHECK(ZSTD_c_windowLog, (int)cParams.windowLog); - BOUNDCHECK(ZSTD_c_chainLog, (int)cParams.chainLog); - BOUNDCHECK(ZSTD_c_hashLog, (int)cParams.hashLog); - BOUNDCHECK(ZSTD_c_searchLog, (int)cParams.searchLog); - BOUNDCHECK(ZSTD_c_minMatch, (int)cParams.minMatch); - BOUNDCHECK(ZSTD_c_targetLength,(int)cParams.targetLength); - BOUNDCHECK(ZSTD_c_strategy, (int)cParams.strategy); - return 0; -} - -/** ZSTD_clampCParams() : - * make CParam values within valid range. - * @return : valid CParams */ -static ZSTD_compressionParameters -ZSTD_clampCParams(ZSTD_compressionParameters cParams) -{ -# define CLAMP_TYPE(cParam, val, type) \ - do { \ - ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); \ - if ((int)valbounds.upperBound) val=(type)bounds.upperBound; \ - } while (0) -# define CLAMP(cParam, val) CLAMP_TYPE(cParam, val, unsigned) - CLAMP(ZSTD_c_windowLog, cParams.windowLog); - CLAMP(ZSTD_c_chainLog, cParams.chainLog); - CLAMP(ZSTD_c_hashLog, cParams.hashLog); - CLAMP(ZSTD_c_searchLog, cParams.searchLog); - CLAMP(ZSTD_c_minMatch, cParams.minMatch); - CLAMP(ZSTD_c_targetLength,cParams.targetLength); - CLAMP_TYPE(ZSTD_c_strategy,cParams.strategy, ZSTD_strategy); - return cParams; -} - -/** ZSTD_cycleLog() : - * condition for correct operation : hashLog > 1 */ -U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) -{ - U32 const btScale = ((U32)strat >= (U32)ZSTD_btlazy2); - return hashLog - btScale; -} - -/** ZSTD_dictAndWindowLog() : - * Returns an adjusted window log that is large enough to fit the source and the dictionary. - * The zstd format says that the entire dictionary is valid if one byte of the dictionary - * is within the window. So the hashLog and chainLog should be large enough to reference both - * the dictionary and the window. So we must use this adjusted dictAndWindowLog when downsizing - * the hashLog and windowLog. - * NOTE: srcSize must not be ZSTD_CONTENTSIZE_UNKNOWN. - */ -static U32 ZSTD_dictAndWindowLog(U32 windowLog, U64 srcSize, U64 dictSize) -{ - const U64 maxWindowSize = 1ULL << ZSTD_WINDOWLOG_MAX; - /* No dictionary ==> No change */ - if (dictSize == 0) { - return windowLog; - } - assert(windowLog <= ZSTD_WINDOWLOG_MAX); - assert(srcSize != ZSTD_CONTENTSIZE_UNKNOWN); /* Handled in ZSTD_adjustCParams_internal() */ - { - U64 const windowSize = 1ULL << windowLog; - U64 const dictAndWindowSize = dictSize + windowSize; - /* If the window size is already large enough to fit both the source and the dictionary - * then just use the window size. Otherwise adjust so that it fits the dictionary and - * the window. - */ - if (windowSize >= dictSize + srcSize) { - return windowLog; /* Window size large enough already */ - } else if (dictAndWindowSize >= maxWindowSize) { - return ZSTD_WINDOWLOG_MAX; /* Larger than max window log */ - } else { - return ZSTD_highbit32((U32)dictAndWindowSize - 1) + 1; - } - } -} - -/** ZSTD_adjustCParams_internal() : - * optimize `cPar` for a specified input (`srcSize` and `dictSize`). - * mostly downsize to reduce memory consumption and initialization latency. - * `srcSize` can be ZSTD_CONTENTSIZE_UNKNOWN when not known. - * `mode` is the mode for parameter adjustment. See docs for `ZSTD_CParamMode_e`. - * note : `srcSize==0` means 0! - * condition : cPar is presumed validated (can be checked using ZSTD_checkCParams()). */ -static ZSTD_compressionParameters -ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar, - unsigned long long srcSize, - size_t dictSize, - ZSTD_CParamMode_e mode, - ZSTD_ParamSwitch_e useRowMatchFinder) -{ - const U64 minSrcSize = 513; /* (1<<9) + 1 */ - const U64 maxWindowResize = 1ULL << (ZSTD_WINDOWLOG_MAX-1); - assert(ZSTD_checkCParams(cPar)==0); - - /* Cascade the selected strategy down to the next-highest one built into - * this binary. */ -#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_btultra2) { - cPar.strategy = ZSTD_btultra; - } - if (cPar.strategy == ZSTD_btultra) { - cPar.strategy = ZSTD_btopt; - } -#endif -#ifdef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_btopt) { - cPar.strategy = ZSTD_btlazy2; - } -#endif -#ifdef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_btlazy2) { - cPar.strategy = ZSTD_lazy2; - } -#endif -#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_lazy2) { - cPar.strategy = ZSTD_lazy; - } -#endif -#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_lazy) { - cPar.strategy = ZSTD_greedy; - } -#endif -#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_greedy) { - cPar.strategy = ZSTD_dfast; - } -#endif -#ifdef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR - if (cPar.strategy == ZSTD_dfast) { - cPar.strategy = ZSTD_fast; - cPar.targetLength = 0; - } -#endif - - switch (mode) { - case ZSTD_cpm_unknown: - case ZSTD_cpm_noAttachDict: - /* If we don't know the source size, don't make any - * assumptions about it. We will already have selected - * smaller parameters if a dictionary is in use. - */ - break; - case ZSTD_cpm_createCDict: - /* Assume a small source size when creating a dictionary - * with an unknown source size. - */ - if (dictSize && srcSize == ZSTD_CONTENTSIZE_UNKNOWN) - srcSize = minSrcSize; - break; - case ZSTD_cpm_attachDict: - /* Dictionary has its own dedicated parameters which have - * already been selected. We are selecting parameters - * for only the source. - */ - dictSize = 0; - break; - default: - assert(0); - break; - } - - /* resize windowLog if input is small enough, to use less memory */ - if ( (srcSize <= maxWindowResize) - && (dictSize <= maxWindowResize) ) { - U32 const tSize = (U32)(srcSize + dictSize); - static U32 const hashSizeMin = 1 << ZSTD_HASHLOG_MIN; - U32 const srcLog = (tSize < hashSizeMin) ? ZSTD_HASHLOG_MIN : - ZSTD_highbit32(tSize-1) + 1; - if (cPar.windowLog > srcLog) cPar.windowLog = srcLog; - } - if (srcSize != ZSTD_CONTENTSIZE_UNKNOWN) { - U32 const dictAndWindowLog = ZSTD_dictAndWindowLog(cPar.windowLog, (U64)srcSize, (U64)dictSize); - U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy); - if (cPar.hashLog > dictAndWindowLog+1) cPar.hashLog = dictAndWindowLog+1; - if (cycleLog > dictAndWindowLog) - cPar.chainLog -= (cycleLog - dictAndWindowLog); - } - - if (cPar.windowLog < ZSTD_WINDOWLOG_ABSOLUTEMIN) - cPar.windowLog = ZSTD_WINDOWLOG_ABSOLUTEMIN; /* minimum wlog required for valid frame header */ - - /* We can't use more than 32 bits of hash in total, so that means that we require: - * (hashLog + 8) <= 32 && (chainLog + 8) <= 32 - */ - if (mode == ZSTD_cpm_createCDict && ZSTD_CDictIndicesAreTagged(&cPar)) { - U32 const maxShortCacheHashLog = 32 - ZSTD_SHORT_CACHE_TAG_BITS; - if (cPar.hashLog > maxShortCacheHashLog) { - cPar.hashLog = maxShortCacheHashLog; - } - if (cPar.chainLog > maxShortCacheHashLog) { - cPar.chainLog = maxShortCacheHashLog; - } - } - - - /* At this point, we aren't 100% sure if we are using the row match finder. - * Unless it is explicitly disabled, conservatively assume that it is enabled. - * In this case it will only be disabled for small sources, so shrinking the - * hash log a little bit shouldn't result in any ratio loss. - */ - if (useRowMatchFinder == ZSTD_ps_auto) - useRowMatchFinder = ZSTD_ps_enable; - - /* We can't hash more than 32-bits in total. So that means that we require: - * (hashLog - rowLog + 8) <= 32 - */ - if (ZSTD_rowMatchFinderUsed(cPar.strategy, useRowMatchFinder)) { - /* Switch to 32-entry rows if searchLog is 5 (or more) */ - U32 const rowLog = BOUNDED(4, cPar.searchLog, 6); - U32 const maxRowHashLog = 32 - ZSTD_ROW_HASH_TAG_BITS; - U32 const maxHashLog = maxRowHashLog + rowLog; - assert(cPar.hashLog >= rowLog); - if (cPar.hashLog > maxHashLog) { - cPar.hashLog = maxHashLog; - } - } - - return cPar; -} - -ZSTD_compressionParameters -ZSTD_adjustCParams(ZSTD_compressionParameters cPar, - unsigned long long srcSize, - size_t dictSize) -{ - cPar = ZSTD_clampCParams(cPar); /* resulting cPar is necessarily valid (all parameters within range) */ - if (srcSize == 0) srcSize = ZSTD_CONTENTSIZE_UNKNOWN; - return ZSTD_adjustCParams_internal(cPar, srcSize, dictSize, ZSTD_cpm_unknown, ZSTD_ps_auto); -} - -static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); -static ZSTD_parameters ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); - -static void ZSTD_overrideCParams( - ZSTD_compressionParameters* cParams, - const ZSTD_compressionParameters* overrides) -{ - if (overrides->windowLog) cParams->windowLog = overrides->windowLog; - if (overrides->hashLog) cParams->hashLog = overrides->hashLog; - if (overrides->chainLog) cParams->chainLog = overrides->chainLog; - if (overrides->searchLog) cParams->searchLog = overrides->searchLog; - if (overrides->minMatch) cParams->minMatch = overrides->minMatch; - if (overrides->targetLength) cParams->targetLength = overrides->targetLength; - if (overrides->strategy) cParams->strategy = overrides->strategy; -} - -ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( - const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) -{ - ZSTD_compressionParameters cParams; - if (srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN && CCtxParams->srcSizeHint > 0) { - assert(CCtxParams->srcSizeHint>=0); - srcSizeHint = (U64)CCtxParams->srcSizeHint; - } - cParams = ZSTD_getCParams_internal(CCtxParams->compressionLevel, srcSizeHint, dictSize, mode); - if (CCtxParams->ldmParams.enableLdm == ZSTD_ps_enable) cParams.windowLog = ZSTD_LDM_DEFAULT_WINDOW_LOG; - ZSTD_overrideCParams(&cParams, &CCtxParams->cParams); - assert(!ZSTD_checkCParams(cParams)); - /* srcSizeHint == 0 means 0 */ - return ZSTD_adjustCParams_internal(cParams, srcSizeHint, dictSize, mode, CCtxParams->useRowMatchFinder); -} - -static size_t -ZSTD_sizeof_matchState(const ZSTD_compressionParameters* const cParams, - const ZSTD_ParamSwitch_e useRowMatchFinder, - const int enableDedicatedDictSearch, - const U32 forCCtx) -{ - /* chain table size should be 0 for fast or row-hash strategies */ - size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, enableDedicatedDictSearch && !forCCtx) - ? ((size_t)1 << cParams->chainLog) - : 0; - size_t const hSize = ((size_t)1) << cParams->hashLog; - U32 const hashLog3 = (forCCtx && cParams->minMatch==3) ? MIN(ZSTD_HASHLOG3_MAX, cParams->windowLog) : 0; - size_t const h3Size = hashLog3 ? ((size_t)1) << hashLog3 : 0; - /* We don't use ZSTD_cwksp_alloc_size() here because the tables aren't - * surrounded by redzones in ASAN. */ - size_t const tableSpace = chainSize * sizeof(U32) - + hSize * sizeof(U32) - + h3Size * sizeof(U32); - size_t const optPotentialSpace = - ZSTD_cwksp_aligned64_alloc_size((MaxML+1) * sizeof(U32)) - + ZSTD_cwksp_aligned64_alloc_size((MaxLL+1) * sizeof(U32)) - + ZSTD_cwksp_aligned64_alloc_size((MaxOff+1) * sizeof(U32)) - + ZSTD_cwksp_aligned64_alloc_size((1<strategy, useRowMatchFinder) - ? ZSTD_cwksp_aligned64_alloc_size(hSize) - : 0; - size_t const optSpace = (forCCtx && (cParams->strategy >= ZSTD_btopt)) - ? optPotentialSpace - : 0; - size_t const slackSpace = ZSTD_cwksp_slack_space_required(); - - /* tables are guaranteed to be sized in multiples of 64 bytes (or 16 uint32_t) */ - ZSTD_STATIC_ASSERT(ZSTD_HASHLOG_MIN >= 4 && ZSTD_WINDOWLOG_MIN >= 4 && ZSTD_CHAINLOG_MIN >= 4); - assert(useRowMatchFinder != ZSTD_ps_auto); - - DEBUGLOG(4, "chainSize: %u - hSize: %u - h3Size: %u", - (U32)chainSize, (U32)hSize, (U32)h3Size); - return tableSpace + optSpace + slackSpace + lazyAdditionalSpace; -} - -/* Helper function for calculating memory requirements. - * Gives a tighter bound than ZSTD_sequenceBound() by taking minMatch into account. */ -static size_t ZSTD_maxNbSeq(size_t blockSize, unsigned minMatch, int useSequenceProducer) { - U32 const divider = (minMatch==3 || useSequenceProducer) ? 3 : 4; - return blockSize / divider; -} - -static size_t ZSTD_estimateCCtxSize_usingCCtxParams_internal( - const ZSTD_compressionParameters* cParams, - const ldmParams_t* ldmParams, - const int isStatic, - const ZSTD_ParamSwitch_e useRowMatchFinder, - const size_t buffInSize, - const size_t buffOutSize, - const U64 pledgedSrcSize, - int useSequenceProducer, - size_t maxBlockSize) -{ - size_t const windowSize = (size_t) BOUNDED(1ULL, 1ULL << cParams->windowLog, pledgedSrcSize); - size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(maxBlockSize), windowSize); - size_t const maxNbSeq = ZSTD_maxNbSeq(blockSize, cParams->minMatch, useSequenceProducer); - size_t const tokenSpace = ZSTD_cwksp_alloc_size(WILDCOPY_OVERLENGTH + blockSize) - + ZSTD_cwksp_aligned64_alloc_size(maxNbSeq * sizeof(SeqDef)) - + 3 * ZSTD_cwksp_alloc_size(maxNbSeq * sizeof(BYTE)); - size_t const tmpWorkSpace = ZSTD_cwksp_alloc_size(TMP_WORKSPACE_SIZE); - size_t const blockStateSpace = 2 * ZSTD_cwksp_alloc_size(sizeof(ZSTD_compressedBlockState_t)); - size_t const matchStateSize = ZSTD_sizeof_matchState(cParams, useRowMatchFinder, /* enableDedicatedDictSearch */ 0, /* forCCtx */ 1); - - size_t const ldmSpace = ZSTD_ldm_getTableSize(*ldmParams); - size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(*ldmParams, blockSize); - size_t const ldmSeqSpace = ldmParams->enableLdm == ZSTD_ps_enable ? - ZSTD_cwksp_aligned64_alloc_size(maxNbLdmSeq * sizeof(rawSeq)) : 0; - - - size_t const bufferSpace = ZSTD_cwksp_alloc_size(buffInSize) - + ZSTD_cwksp_alloc_size(buffOutSize); - - size_t const cctxSpace = isStatic ? ZSTD_cwksp_alloc_size(sizeof(ZSTD_CCtx)) : 0; - - size_t const maxNbExternalSeq = ZSTD_sequenceBound(blockSize); - size_t const externalSeqSpace = useSequenceProducer - ? ZSTD_cwksp_aligned64_alloc_size(maxNbExternalSeq * sizeof(ZSTD_Sequence)) - : 0; - - size_t const neededSpace = - cctxSpace + - tmpWorkSpace + - blockStateSpace + - ldmSpace + - ldmSeqSpace + - matchStateSize + - tokenSpace + - bufferSpace + - externalSeqSpace; - - DEBUGLOG(5, "estimate workspace : %u", (U32)neededSpace); - return neededSpace; -} - -size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params) -{ - ZSTD_compressionParameters const cParams = - ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); - ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params->useRowMatchFinder, - &cParams); - - RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); - /* estimateCCtxSize is for one-shot compression. So no buffers should - * be needed. However, we still allocate two 0-sized buffers, which can - * take space under ASAN. */ - return ZSTD_estimateCCtxSize_usingCCtxParams_internal( - &cParams, ¶ms->ldmParams, 1, useRowMatchFinder, 0, 0, ZSTD_CONTENTSIZE_UNKNOWN, ZSTD_hasExtSeqProd(params), params->maxBlockSize); -} - -size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams) -{ - ZSTD_CCtx_params initialParams = ZSTD_makeCCtxParamsFromCParams(cParams); - if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { - /* Pick bigger of not using and using row-based matchfinder for greedy and lazy strategies */ - size_t noRowCCtxSize; - size_t rowCCtxSize; - initialParams.useRowMatchFinder = ZSTD_ps_disable; - noRowCCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); - initialParams.useRowMatchFinder = ZSTD_ps_enable; - rowCCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); - return MAX(noRowCCtxSize, rowCCtxSize); - } else { - return ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); - } -} - -static size_t ZSTD_estimateCCtxSize_internal(int compressionLevel) -{ - int tier = 0; - size_t largestSize = 0; - static const unsigned long long srcSizeTiers[4] = {16 KB, 128 KB, 256 KB, ZSTD_CONTENTSIZE_UNKNOWN}; - for (; tier < 4; ++tier) { - /* Choose the set of cParams for a given level across all srcSizes that give the largest cctxSize */ - ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, srcSizeTiers[tier], 0, ZSTD_cpm_noAttachDict); - largestSize = MAX(ZSTD_estimateCCtxSize_usingCParams(cParams), largestSize); - } - return largestSize; -} - -size_t ZSTD_estimateCCtxSize(int compressionLevel) -{ - int level; - size_t memBudget = 0; - for (level=MIN(compressionLevel, 1); level<=compressionLevel; level++) { - /* Ensure monotonically increasing memory usage as compression level increases */ - size_t const newMB = ZSTD_estimateCCtxSize_internal(level); - if (newMB > memBudget) memBudget = newMB; - } - return memBudget; -} - -size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params) -{ - RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); - { ZSTD_compressionParameters const cParams = - ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); - size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(params->maxBlockSize), (size_t)1 << cParams.windowLog); - size_t const inBuffSize = (params->inBufferMode == ZSTD_bm_buffered) - ? ((size_t)1 << cParams.windowLog) + blockSize - : 0; - size_t const outBuffSize = (params->outBufferMode == ZSTD_bm_buffered) - ? ZSTD_compressBound(blockSize) + 1 - : 0; - ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params->useRowMatchFinder, ¶ms->cParams); - - return ZSTD_estimateCCtxSize_usingCCtxParams_internal( - &cParams, ¶ms->ldmParams, 1, useRowMatchFinder, inBuffSize, outBuffSize, - ZSTD_CONTENTSIZE_UNKNOWN, ZSTD_hasExtSeqProd(params), params->maxBlockSize); - } -} - -size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams) -{ - ZSTD_CCtx_params initialParams = ZSTD_makeCCtxParamsFromCParams(cParams); - if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { - /* Pick bigger of not using and using row-based matchfinder for greedy and lazy strategies */ - size_t noRowCCtxSize; - size_t rowCCtxSize; - initialParams.useRowMatchFinder = ZSTD_ps_disable; - noRowCCtxSize = ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); - initialParams.useRowMatchFinder = ZSTD_ps_enable; - rowCCtxSize = ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); - return MAX(noRowCCtxSize, rowCCtxSize); - } else { - return ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); - } -} - -static size_t ZSTD_estimateCStreamSize_internal(int compressionLevel) -{ - ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); - return ZSTD_estimateCStreamSize_usingCParams(cParams); -} - -size_t ZSTD_estimateCStreamSize(int compressionLevel) -{ - int level; - size_t memBudget = 0; - for (level=MIN(compressionLevel, 1); level<=compressionLevel; level++) { - size_t const newMB = ZSTD_estimateCStreamSize_internal(level); - if (newMB > memBudget) memBudget = newMB; - } - return memBudget; -} - -/* ZSTD_getFrameProgression(): - * tells how much data has been consumed (input) and produced (output) for current frame. - * able to count progression inside worker threads (non-blocking mode). - */ -ZSTD_frameProgression ZSTD_getFrameProgression(const ZSTD_CCtx* cctx) -{ -#ifdef ZSTD_MULTITHREAD - if (cctx->appliedParams.nbWorkers > 0) { - return ZSTDMT_getFrameProgression(cctx->mtctx); - } -#endif - { ZSTD_frameProgression fp; - size_t const buffered = (cctx->inBuff == NULL) ? 0 : - cctx->inBuffPos - cctx->inToCompress; - if (buffered) assert(cctx->inBuffPos >= cctx->inToCompress); - assert(buffered <= ZSTD_BLOCKSIZE_MAX); - fp.ingested = cctx->consumedSrcSize + buffered; - fp.consumed = cctx->consumedSrcSize; - fp.produced = cctx->producedCSize; - fp.flushed = cctx->producedCSize; /* simplified; some data might still be left within streaming output buffer */ - fp.currentJobID = 0; - fp.nbActiveWorkers = 0; - return fp; -} } - -/*! ZSTD_toFlushNow() - * Only useful for multithreading scenarios currently (nbWorkers >= 1). - */ -size_t ZSTD_toFlushNow(ZSTD_CCtx* cctx) -{ -#ifdef ZSTD_MULTITHREAD - if (cctx->appliedParams.nbWorkers > 0) { - return ZSTDMT_toFlushNow(cctx->mtctx); - } -#endif - (void)cctx; - return 0; /* over-simplification; could also check if context is currently running in streaming mode, and in which case, report how many bytes are left to be flushed within output buffer */ -} - -static void ZSTD_assertEqualCParams(ZSTD_compressionParameters cParams1, - ZSTD_compressionParameters cParams2) -{ - (void)cParams1; - (void)cParams2; - assert(cParams1.windowLog == cParams2.windowLog); - assert(cParams1.chainLog == cParams2.chainLog); - assert(cParams1.hashLog == cParams2.hashLog); - assert(cParams1.searchLog == cParams2.searchLog); - assert(cParams1.minMatch == cParams2.minMatch); - assert(cParams1.targetLength == cParams2.targetLength); - assert(cParams1.strategy == cParams2.strategy); -} - -void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs) -{ - int i; - for (i = 0; i < ZSTD_REP_NUM; ++i) - bs->rep[i] = repStartValue[i]; - bs->entropy.huf.repeatMode = HUF_repeat_none; - bs->entropy.fse.offcode_repeatMode = FSE_repeat_none; - bs->entropy.fse.matchlength_repeatMode = FSE_repeat_none; - bs->entropy.fse.litlength_repeatMode = FSE_repeat_none; -} - -/*! ZSTD_invalidateMatchState() - * Invalidate all the matches in the match finder tables. - * Requires nextSrc and base to be set (can be NULL). - */ -static void ZSTD_invalidateMatchState(ZSTD_MatchState_t* ms) -{ - ZSTD_window_clear(&ms->window); - - ms->nextToUpdate = ms->window.dictLimit; - ms->loadedDictEnd = 0; - ms->opt.litLengthSum = 0; /* force reset of btopt stats */ - ms->dictMatchState = NULL; -} - -/** - * Controls, for this matchState reset, whether the tables need to be cleared / - * prepared for the coming compression (ZSTDcrp_makeClean), or whether the - * tables can be left unclean (ZSTDcrp_leaveDirty), because we know that a - * subsequent operation will overwrite the table space anyways (e.g., copying - * the matchState contents in from a CDict). - */ -typedef enum { - ZSTDcrp_makeClean, - ZSTDcrp_leaveDirty -} ZSTD_compResetPolicy_e; - -/** - * Controls, for this matchState reset, whether indexing can continue where it - * left off (ZSTDirp_continue), or whether it needs to be restarted from zero - * (ZSTDirp_reset). - */ -typedef enum { - ZSTDirp_continue, - ZSTDirp_reset -} ZSTD_indexResetPolicy_e; - -typedef enum { - ZSTD_resetTarget_CDict, - ZSTD_resetTarget_CCtx -} ZSTD_resetTarget_e; - -/* Mixes bits in a 64 bits in a value, based on XXH3_rrmxmx */ -static U64 ZSTD_bitmix(U64 val, U64 len) { - val ^= ZSTD_rotateRight_U64(val, 49) ^ ZSTD_rotateRight_U64(val, 24); - val *= 0x9FB21C651E98DF25ULL; - val ^= (val >> 35) + len ; - val *= 0x9FB21C651E98DF25ULL; - return val ^ (val >> 28); -} - -/* Mixes in the hashSalt and hashSaltEntropy to create a new hashSalt */ -static void ZSTD_advanceHashSalt(ZSTD_MatchState_t* ms) { - ms->hashSalt = ZSTD_bitmix(ms->hashSalt, 8) ^ ZSTD_bitmix((U64) ms->hashSaltEntropy, 4); -} - -static size_t -ZSTD_reset_matchState(ZSTD_MatchState_t* ms, - ZSTD_cwksp* ws, - const ZSTD_compressionParameters* cParams, - const ZSTD_ParamSwitch_e useRowMatchFinder, - const ZSTD_compResetPolicy_e crp, - const ZSTD_indexResetPolicy_e forceResetIndex, - const ZSTD_resetTarget_e forWho) -{ - /* disable chain table allocation for fast or row-based strategies */ - size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, - ms->dedicatedDictSearch && (forWho == ZSTD_resetTarget_CDict)) - ? ((size_t)1 << cParams->chainLog) - : 0; - size_t const hSize = ((size_t)1) << cParams->hashLog; - U32 const hashLog3 = ((forWho == ZSTD_resetTarget_CCtx) && cParams->minMatch==3) ? MIN(ZSTD_HASHLOG3_MAX, cParams->windowLog) : 0; - size_t const h3Size = hashLog3 ? ((size_t)1) << hashLog3 : 0; - - DEBUGLOG(4, "reset indices : %u", forceResetIndex == ZSTDirp_reset); - assert(useRowMatchFinder != ZSTD_ps_auto); - if (forceResetIndex == ZSTDirp_reset) { - ZSTD_window_init(&ms->window); - ZSTD_cwksp_mark_tables_dirty(ws); - } - - ms->hashLog3 = hashLog3; - ms->lazySkipping = 0; - - ZSTD_invalidateMatchState(ms); - - assert(!ZSTD_cwksp_reserve_failed(ws)); /* check that allocation hasn't already failed */ - - ZSTD_cwksp_clear_tables(ws); - - DEBUGLOG(5, "reserving table space"); - /* table Space */ - ms->hashTable = (U32*)ZSTD_cwksp_reserve_table(ws, hSize * sizeof(U32)); - ms->chainTable = (U32*)ZSTD_cwksp_reserve_table(ws, chainSize * sizeof(U32)); - ms->hashTable3 = (U32*)ZSTD_cwksp_reserve_table(ws, h3Size * sizeof(U32)); - RETURN_ERROR_IF(ZSTD_cwksp_reserve_failed(ws), memory_allocation, - "failed a workspace allocation in ZSTD_reset_matchState"); - - DEBUGLOG(4, "reset table : %u", crp!=ZSTDcrp_leaveDirty); - if (crp!=ZSTDcrp_leaveDirty) { - /* reset tables only */ - ZSTD_cwksp_clean_tables(ws); - } - - if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) { - /* Row match finder needs an additional table of hashes ("tags") */ - size_t const tagTableSize = hSize; - /* We want to generate a new salt in case we reset a Cctx, but we always want to use - * 0 when we reset a Cdict */ - if(forWho == ZSTD_resetTarget_CCtx) { - ms->tagTable = (BYTE*) ZSTD_cwksp_reserve_aligned_init_once(ws, tagTableSize); - ZSTD_advanceHashSalt(ms); - } else { - /* When we are not salting we want to always memset the memory */ - ms->tagTable = (BYTE*) ZSTD_cwksp_reserve_aligned64(ws, tagTableSize); - ZSTD_memset(ms->tagTable, 0, tagTableSize); - ms->hashSalt = 0; - } - { /* Switch to 32-entry rows if searchLog is 5 (or more) */ - U32 const rowLog = BOUNDED(4, cParams->searchLog, 6); - assert(cParams->hashLog >= rowLog); - ms->rowHashLog = cParams->hashLog - rowLog; - } - } - - /* opt parser space */ - if ((forWho == ZSTD_resetTarget_CCtx) && (cParams->strategy >= ZSTD_btopt)) { - DEBUGLOG(4, "reserving optimal parser space"); - ms->opt.litFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (1<opt.litLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxLL+1) * sizeof(unsigned)); - ms->opt.matchLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxML+1) * sizeof(unsigned)); - ms->opt.offCodeFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxOff+1) * sizeof(unsigned)); - ms->opt.matchTable = (ZSTD_match_t*)ZSTD_cwksp_reserve_aligned64(ws, ZSTD_OPT_SIZE * sizeof(ZSTD_match_t)); - ms->opt.priceTable = (ZSTD_optimal_t*)ZSTD_cwksp_reserve_aligned64(ws, ZSTD_OPT_SIZE * sizeof(ZSTD_optimal_t)); - } - - ms->cParams = *cParams; - - RETURN_ERROR_IF(ZSTD_cwksp_reserve_failed(ws), memory_allocation, - "failed a workspace allocation in ZSTD_reset_matchState"); - return 0; -} - -/* ZSTD_indexTooCloseToMax() : - * minor optimization : prefer memset() rather than reduceIndex() - * which is measurably slow in some circumstances (reported for Visual Studio). - * Works when re-using a context for a lot of smallish inputs : - * if all inputs are smaller than ZSTD_INDEXOVERFLOW_MARGIN, - * memset() will be triggered before reduceIndex(). - */ -#define ZSTD_INDEXOVERFLOW_MARGIN (16 MB) -static int ZSTD_indexTooCloseToMax(ZSTD_window_t w) -{ - return (size_t)(w.nextSrc - w.base) > (ZSTD_CURRENT_MAX - ZSTD_INDEXOVERFLOW_MARGIN); -} - -/** ZSTD_dictTooBig(): - * When dictionaries are larger than ZSTD_CHUNKSIZE_MAX they can't be loaded in - * one go generically. So we ensure that in that case we reset the tables to zero, - * so that we can load as much of the dictionary as possible. - */ -static int ZSTD_dictTooBig(size_t const loadedDictSize) -{ - return loadedDictSize > ZSTD_CHUNKSIZE_MAX; -} - -/*! ZSTD_resetCCtx_internal() : - * @param loadedDictSize The size of the dictionary to be loaded - * into the context, if any. If no dictionary is used, or the - * dictionary is being attached / copied, then pass 0. - * note : `params` are assumed fully validated at this stage. - */ -static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, - ZSTD_CCtx_params const* params, - U64 const pledgedSrcSize, - size_t const loadedDictSize, - ZSTD_compResetPolicy_e const crp, - ZSTD_buffered_policy_e const zbuff) -{ - ZSTD_cwksp* const ws = &zc->workspace; - DEBUGLOG(4, "ZSTD_resetCCtx_internal: pledgedSrcSize=%u, wlog=%u, useRowMatchFinder=%d useBlockSplitter=%d", - (U32)pledgedSrcSize, params->cParams.windowLog, (int)params->useRowMatchFinder, (int)params->postBlockSplitter); - assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); - - zc->isFirstBlock = 1; - - /* Set applied params early so we can modify them for LDM, - * and point params at the applied params. - */ - zc->appliedParams = *params; - params = &zc->appliedParams; - - assert(params->useRowMatchFinder != ZSTD_ps_auto); - assert(params->postBlockSplitter != ZSTD_ps_auto); - assert(params->ldmParams.enableLdm != ZSTD_ps_auto); - assert(params->maxBlockSize != 0); - if (params->ldmParams.enableLdm == ZSTD_ps_enable) { - /* Adjust long distance matching parameters */ - ZSTD_ldm_adjustParameters(&zc->appliedParams.ldmParams, ¶ms->cParams); - assert(params->ldmParams.hashLog >= params->ldmParams.bucketSizeLog); - assert(params->ldmParams.hashRateLog < 32); - } - - { size_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << params->cParams.windowLog), pledgedSrcSize)); - size_t const blockSize = MIN(params->maxBlockSize, windowSize); - size_t const maxNbSeq = ZSTD_maxNbSeq(blockSize, params->cParams.minMatch, ZSTD_hasExtSeqProd(params)); - size_t const buffOutSize = (zbuff == ZSTDb_buffered && params->outBufferMode == ZSTD_bm_buffered) - ? ZSTD_compressBound(blockSize) + 1 - : 0; - size_t const buffInSize = (zbuff == ZSTDb_buffered && params->inBufferMode == ZSTD_bm_buffered) - ? windowSize + blockSize - : 0; - size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(params->ldmParams, blockSize); - - int const indexTooClose = ZSTD_indexTooCloseToMax(zc->blockState.matchState.window); - int const dictTooBig = ZSTD_dictTooBig(loadedDictSize); - ZSTD_indexResetPolicy_e needsIndexReset = - (indexTooClose || dictTooBig || !zc->initialized) ? ZSTDirp_reset : ZSTDirp_continue; - - size_t const neededSpace = - ZSTD_estimateCCtxSize_usingCCtxParams_internal( - ¶ms->cParams, ¶ms->ldmParams, zc->staticSize != 0, params->useRowMatchFinder, - buffInSize, buffOutSize, pledgedSrcSize, ZSTD_hasExtSeqProd(params), params->maxBlockSize); - - FORWARD_IF_ERROR(neededSpace, "cctx size estimate failed!"); - - if (!zc->staticSize) ZSTD_cwksp_bump_oversized_duration(ws, 0); - - { /* Check if workspace is large enough, alloc a new one if needed */ - int const workspaceTooSmall = ZSTD_cwksp_sizeof(ws) < neededSpace; - int const workspaceWasteful = ZSTD_cwksp_check_wasteful(ws, neededSpace); - int resizeWorkspace = workspaceTooSmall || workspaceWasteful; - DEBUGLOG(4, "Need %zu B workspace", neededSpace); - DEBUGLOG(4, "windowSize: %zu - blockSize: %zu", windowSize, blockSize); - - if (resizeWorkspace) { - DEBUGLOG(4, "Resize workspaceSize from %zuKB to %zuKB", - ZSTD_cwksp_sizeof(ws) >> 10, - neededSpace >> 10); - - RETURN_ERROR_IF(zc->staticSize, memory_allocation, "static cctx : no resize"); - - needsIndexReset = ZSTDirp_reset; - - ZSTD_cwksp_free(ws, zc->customMem); - FORWARD_IF_ERROR(ZSTD_cwksp_create(ws, neededSpace, zc->customMem), ""); - - DEBUGLOG(5, "reserving object space"); - /* Statically sized space. - * tmpWorkspace never moves, - * though prev/next block swap places */ - assert(ZSTD_cwksp_check_available(ws, 2 * sizeof(ZSTD_compressedBlockState_t))); - zc->blockState.prevCBlock = (ZSTD_compressedBlockState_t*) ZSTD_cwksp_reserve_object(ws, sizeof(ZSTD_compressedBlockState_t)); - RETURN_ERROR_IF(zc->blockState.prevCBlock == NULL, memory_allocation, "couldn't allocate prevCBlock"); - zc->blockState.nextCBlock = (ZSTD_compressedBlockState_t*) ZSTD_cwksp_reserve_object(ws, sizeof(ZSTD_compressedBlockState_t)); - RETURN_ERROR_IF(zc->blockState.nextCBlock == NULL, memory_allocation, "couldn't allocate nextCBlock"); - zc->tmpWorkspace = ZSTD_cwksp_reserve_object(ws, TMP_WORKSPACE_SIZE); - RETURN_ERROR_IF(zc->tmpWorkspace == NULL, memory_allocation, "couldn't allocate tmpWorkspace"); - zc->tmpWkspSize = TMP_WORKSPACE_SIZE; - } } - - ZSTD_cwksp_clear(ws); - - /* init params */ - zc->blockState.matchState.cParams = params->cParams; - zc->blockState.matchState.prefetchCDictTables = params->prefetchCDictTables == ZSTD_ps_enable; - zc->pledgedSrcSizePlusOne = pledgedSrcSize+1; - zc->consumedSrcSize = 0; - zc->producedCSize = 0; - if (pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN) - zc->appliedParams.fParams.contentSizeFlag = 0; - DEBUGLOG(4, "pledged content size : %u ; flag : %u", - (unsigned)pledgedSrcSize, zc->appliedParams.fParams.contentSizeFlag); - zc->blockSizeMax = blockSize; - - XXH64_reset(&zc->xxhState, 0); - zc->stage = ZSTDcs_init; - zc->dictID = 0; - zc->dictContentSize = 0; - - ZSTD_reset_compressedBlockState(zc->blockState.prevCBlock); - - FORWARD_IF_ERROR(ZSTD_reset_matchState( - &zc->blockState.matchState, - ws, - ¶ms->cParams, - params->useRowMatchFinder, - crp, - needsIndexReset, - ZSTD_resetTarget_CCtx), ""); - - zc->seqStore.sequencesStart = (SeqDef*)ZSTD_cwksp_reserve_aligned64(ws, maxNbSeq * sizeof(SeqDef)); - - /* ldm hash table */ - if (params->ldmParams.enableLdm == ZSTD_ps_enable) { - /* TODO: avoid memset? */ - size_t const ldmHSize = ((size_t)1) << params->ldmParams.hashLog; - zc->ldmState.hashTable = (ldmEntry_t*)ZSTD_cwksp_reserve_aligned64(ws, ldmHSize * sizeof(ldmEntry_t)); - ZSTD_memset(zc->ldmState.hashTable, 0, ldmHSize * sizeof(ldmEntry_t)); - zc->ldmSequences = (rawSeq*)ZSTD_cwksp_reserve_aligned64(ws, maxNbLdmSeq * sizeof(rawSeq)); - zc->maxNbLdmSequences = maxNbLdmSeq; - - ZSTD_window_init(&zc->ldmState.window); - zc->ldmState.loadedDictEnd = 0; - } - - /* reserve space for block-level external sequences */ - if (ZSTD_hasExtSeqProd(params)) { - size_t const maxNbExternalSeq = ZSTD_sequenceBound(blockSize); - zc->extSeqBufCapacity = maxNbExternalSeq; - zc->extSeqBuf = - (ZSTD_Sequence*)ZSTD_cwksp_reserve_aligned64(ws, maxNbExternalSeq * sizeof(ZSTD_Sequence)); - } - - /* buffers */ - - /* ZSTD_wildcopy() is used to copy into the literals buffer, - * so we have to oversize the buffer by WILDCOPY_OVERLENGTH bytes. - */ - zc->seqStore.litStart = ZSTD_cwksp_reserve_buffer(ws, blockSize + WILDCOPY_OVERLENGTH); - zc->seqStore.maxNbLit = blockSize; - - zc->bufferedPolicy = zbuff; - zc->inBuffSize = buffInSize; - zc->inBuff = (char*)ZSTD_cwksp_reserve_buffer(ws, buffInSize); - zc->outBuffSize = buffOutSize; - zc->outBuff = (char*)ZSTD_cwksp_reserve_buffer(ws, buffOutSize); - - /* ldm bucketOffsets table */ - if (params->ldmParams.enableLdm == ZSTD_ps_enable) { - /* TODO: avoid memset? */ - size_t const numBuckets = - ((size_t)1) << (params->ldmParams.hashLog - - params->ldmParams.bucketSizeLog); - zc->ldmState.bucketOffsets = ZSTD_cwksp_reserve_buffer(ws, numBuckets); - ZSTD_memset(zc->ldmState.bucketOffsets, 0, numBuckets); - } - - /* sequences storage */ - ZSTD_referenceExternalSequences(zc, NULL, 0); - zc->seqStore.maxNbSeq = maxNbSeq; - zc->seqStore.llCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); - zc->seqStore.mlCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); - zc->seqStore.ofCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); - - DEBUGLOG(3, "wksp: finished allocating, %zd bytes remain available", ZSTD_cwksp_available_space(ws)); - assert(ZSTD_cwksp_estimated_space_within_bounds(ws, neededSpace)); - - zc->initialized = 1; - - return 0; - } -} - -/* ZSTD_invalidateRepCodes() : - * ensures next compression will not use repcodes from previous block. - * Note : only works with regular variant; - * do not use with extDict variant ! */ -void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx) { - int i; - for (i=0; iblockState.prevCBlock->rep[i] = 0; - assert(!ZSTD_window_hasExtDict(cctx->blockState.matchState.window)); -} - -/* These are the approximate sizes for each strategy past which copying the - * dictionary tables into the working context is faster than using them - * in-place. - */ -static const size_t attachDictSizeCutoffs[ZSTD_STRATEGY_MAX+1] = { - 8 KB, /* unused */ - 8 KB, /* ZSTD_fast */ - 16 KB, /* ZSTD_dfast */ - 32 KB, /* ZSTD_greedy */ - 32 KB, /* ZSTD_lazy */ - 32 KB, /* ZSTD_lazy2 */ - 32 KB, /* ZSTD_btlazy2 */ - 32 KB, /* ZSTD_btopt */ - 8 KB, /* ZSTD_btultra */ - 8 KB /* ZSTD_btultra2 */ -}; - -static int ZSTD_shouldAttachDict(const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, - U64 pledgedSrcSize) -{ - size_t cutoff = attachDictSizeCutoffs[cdict->matchState.cParams.strategy]; - int const dedicatedDictSearch = cdict->matchState.dedicatedDictSearch; - return dedicatedDictSearch - || ( ( pledgedSrcSize <= cutoff - || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN - || params->attachDictPref == ZSTD_dictForceAttach ) - && params->attachDictPref != ZSTD_dictForceCopy - && !params->forceWindow ); /* dictMatchState isn't correctly - * handled in _enforceMaxDist */ -} - -static size_t -ZSTD_resetCCtx_byAttachingCDict(ZSTD_CCtx* cctx, - const ZSTD_CDict* cdict, - ZSTD_CCtx_params params, - U64 pledgedSrcSize, - ZSTD_buffered_policy_e zbuff) -{ - DEBUGLOG(4, "ZSTD_resetCCtx_byAttachingCDict() pledgedSrcSize=%llu", - (unsigned long long)pledgedSrcSize); - { - ZSTD_compressionParameters adjusted_cdict_cParams = cdict->matchState.cParams; - unsigned const windowLog = params.cParams.windowLog; - assert(windowLog != 0); - /* Resize working context table params for input only, since the dict - * has its own tables. */ - /* pledgedSrcSize == 0 means 0! */ - - if (cdict->matchState.dedicatedDictSearch) { - ZSTD_dedicatedDictSearch_revertCParams(&adjusted_cdict_cParams); - } - - params.cParams = ZSTD_adjustCParams_internal(adjusted_cdict_cParams, pledgedSrcSize, - cdict->dictContentSize, ZSTD_cpm_attachDict, - params.useRowMatchFinder); - params.cParams.windowLog = windowLog; - params.useRowMatchFinder = cdict->useRowMatchFinder; /* cdict overrides */ - FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, ¶ms, pledgedSrcSize, - /* loadedDictSize */ 0, - ZSTDcrp_makeClean, zbuff), ""); - assert(cctx->appliedParams.cParams.strategy == adjusted_cdict_cParams.strategy); - } - - { const U32 cdictEnd = (U32)( cdict->matchState.window.nextSrc - - cdict->matchState.window.base); - const U32 cdictLen = cdictEnd - cdict->matchState.window.dictLimit; - if (cdictLen == 0) { - /* don't even attach dictionaries with no contents */ - DEBUGLOG(4, "skipping attaching empty dictionary"); - } else { - DEBUGLOG(4, "attaching dictionary into context"); - cctx->blockState.matchState.dictMatchState = &cdict->matchState; - - /* prep working match state so dict matches never have negative indices - * when they are translated to the working context's index space. */ - if (cctx->blockState.matchState.window.dictLimit < cdictEnd) { - cctx->blockState.matchState.window.nextSrc = - cctx->blockState.matchState.window.base + cdictEnd; - ZSTD_window_clear(&cctx->blockState.matchState.window); - } - /* loadedDictEnd is expressed within the referential of the active context */ - cctx->blockState.matchState.loadedDictEnd = cctx->blockState.matchState.window.dictLimit; - } } - - cctx->dictID = cdict->dictID; - cctx->dictContentSize = cdict->dictContentSize; - - /* copy block state */ - ZSTD_memcpy(cctx->blockState.prevCBlock, &cdict->cBlockState, sizeof(cdict->cBlockState)); - - return 0; -} - -static void ZSTD_copyCDictTableIntoCCtx(U32* dst, U32 const* src, size_t tableSize, - ZSTD_compressionParameters const* cParams) { - if (ZSTD_CDictIndicesAreTagged(cParams)){ - /* Remove tags from the CDict table if they are present. - * See docs on "short cache" in zstd_compress_internal.h for context. */ - size_t i; - for (i = 0; i < tableSize; i++) { - U32 const taggedIndex = src[i]; - U32 const index = taggedIndex >> ZSTD_SHORT_CACHE_TAG_BITS; - dst[i] = index; - } - } else { - ZSTD_memcpy(dst, src, tableSize * sizeof(U32)); - } -} - -static size_t ZSTD_resetCCtx_byCopyingCDict(ZSTD_CCtx* cctx, - const ZSTD_CDict* cdict, - ZSTD_CCtx_params params, - U64 pledgedSrcSize, - ZSTD_buffered_policy_e zbuff) -{ - const ZSTD_compressionParameters *cdict_cParams = &cdict->matchState.cParams; - - assert(!cdict->matchState.dedicatedDictSearch); - DEBUGLOG(4, "ZSTD_resetCCtx_byCopyingCDict() pledgedSrcSize=%llu", - (unsigned long long)pledgedSrcSize); - - { unsigned const windowLog = params.cParams.windowLog; - assert(windowLog != 0); - /* Copy only compression parameters related to tables. */ - params.cParams = *cdict_cParams; - params.cParams.windowLog = windowLog; - params.useRowMatchFinder = cdict->useRowMatchFinder; - FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, ¶ms, pledgedSrcSize, - /* loadedDictSize */ 0, - ZSTDcrp_leaveDirty, zbuff), ""); - assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); - assert(cctx->appliedParams.cParams.hashLog == cdict_cParams->hashLog); - assert(cctx->appliedParams.cParams.chainLog == cdict_cParams->chainLog); - } - - ZSTD_cwksp_mark_tables_dirty(&cctx->workspace); - assert(params.useRowMatchFinder != ZSTD_ps_auto); - - /* copy tables */ - { size_t const chainSize = ZSTD_allocateChainTable(cdict_cParams->strategy, cdict->useRowMatchFinder, 0 /* DDS guaranteed disabled */) - ? ((size_t)1 << cdict_cParams->chainLog) - : 0; - size_t const hSize = (size_t)1 << cdict_cParams->hashLog; - - ZSTD_copyCDictTableIntoCCtx(cctx->blockState.matchState.hashTable, - cdict->matchState.hashTable, - hSize, cdict_cParams); - - /* Do not copy cdict's chainTable if cctx has parameters such that it would not use chainTable */ - if (ZSTD_allocateChainTable(cctx->appliedParams.cParams.strategy, cctx->appliedParams.useRowMatchFinder, 0 /* forDDSDict */)) { - ZSTD_copyCDictTableIntoCCtx(cctx->blockState.matchState.chainTable, - cdict->matchState.chainTable, - chainSize, cdict_cParams); - } - /* copy tag table */ - if (ZSTD_rowMatchFinderUsed(cdict_cParams->strategy, cdict->useRowMatchFinder)) { - size_t const tagTableSize = hSize; - ZSTD_memcpy(cctx->blockState.matchState.tagTable, - cdict->matchState.tagTable, - tagTableSize); - cctx->blockState.matchState.hashSalt = cdict->matchState.hashSalt; - } - } - - /* Zero the hashTable3, since the cdict never fills it */ - assert(cctx->blockState.matchState.hashLog3 <= 31); - { U32 const h3log = cctx->blockState.matchState.hashLog3; - size_t const h3Size = h3log ? ((size_t)1 << h3log) : 0; - assert(cdict->matchState.hashLog3 == 0); - ZSTD_memset(cctx->blockState.matchState.hashTable3, 0, h3Size * sizeof(U32)); - } - - ZSTD_cwksp_mark_tables_clean(&cctx->workspace); - - /* copy dictionary offsets */ - { ZSTD_MatchState_t const* srcMatchState = &cdict->matchState; - ZSTD_MatchState_t* dstMatchState = &cctx->blockState.matchState; - dstMatchState->window = srcMatchState->window; - dstMatchState->nextToUpdate = srcMatchState->nextToUpdate; - dstMatchState->loadedDictEnd= srcMatchState->loadedDictEnd; - } - - cctx->dictID = cdict->dictID; - cctx->dictContentSize = cdict->dictContentSize; - - /* copy block state */ - ZSTD_memcpy(cctx->blockState.prevCBlock, &cdict->cBlockState, sizeof(cdict->cBlockState)); - - return 0; -} - -/* We have a choice between copying the dictionary context into the working - * context, or referencing the dictionary context from the working context - * in-place. We decide here which strategy to use. */ -static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx, - const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, - U64 pledgedSrcSize, - ZSTD_buffered_policy_e zbuff) -{ - - DEBUGLOG(4, "ZSTD_resetCCtx_usingCDict (pledgedSrcSize=%u)", - (unsigned)pledgedSrcSize); - - if (ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) { - return ZSTD_resetCCtx_byAttachingCDict( - cctx, cdict, *params, pledgedSrcSize, zbuff); - } else { - return ZSTD_resetCCtx_byCopyingCDict( - cctx, cdict, *params, pledgedSrcSize, zbuff); - } -} - -/*! ZSTD_copyCCtx_internal() : - * Duplicate an existing context `srcCCtx` into another one `dstCCtx`. - * Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()). - * The "context", in this case, refers to the hash and chain tables, - * entropy tables, and dictionary references. - * `windowLog` value is enforced if != 0, otherwise value is copied from srcCCtx. - * @return : 0, or an error code */ -static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx, - const ZSTD_CCtx* srcCCtx, - ZSTD_frameParameters fParams, - U64 pledgedSrcSize, - ZSTD_buffered_policy_e zbuff) -{ - RETURN_ERROR_IF(srcCCtx->stage!=ZSTDcs_init, stage_wrong, - "Can't copy a ctx that's not in init stage."); - DEBUGLOG(5, "ZSTD_copyCCtx_internal"); - ZSTD_memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); - { ZSTD_CCtx_params params = dstCCtx->requestedParams; - /* Copy only compression parameters related to tables. */ - params.cParams = srcCCtx->appliedParams.cParams; - assert(srcCCtx->appliedParams.useRowMatchFinder != ZSTD_ps_auto); - assert(srcCCtx->appliedParams.postBlockSplitter != ZSTD_ps_auto); - assert(srcCCtx->appliedParams.ldmParams.enableLdm != ZSTD_ps_auto); - params.useRowMatchFinder = srcCCtx->appliedParams.useRowMatchFinder; - params.postBlockSplitter = srcCCtx->appliedParams.postBlockSplitter; - params.ldmParams = srcCCtx->appliedParams.ldmParams; - params.fParams = fParams; - params.maxBlockSize = srcCCtx->appliedParams.maxBlockSize; - ZSTD_resetCCtx_internal(dstCCtx, ¶ms, pledgedSrcSize, - /* loadedDictSize */ 0, - ZSTDcrp_leaveDirty, zbuff); - assert(dstCCtx->appliedParams.cParams.windowLog == srcCCtx->appliedParams.cParams.windowLog); - assert(dstCCtx->appliedParams.cParams.strategy == srcCCtx->appliedParams.cParams.strategy); - assert(dstCCtx->appliedParams.cParams.hashLog == srcCCtx->appliedParams.cParams.hashLog); - assert(dstCCtx->appliedParams.cParams.chainLog == srcCCtx->appliedParams.cParams.chainLog); - assert(dstCCtx->blockState.matchState.hashLog3 == srcCCtx->blockState.matchState.hashLog3); - } - - ZSTD_cwksp_mark_tables_dirty(&dstCCtx->workspace); - - /* copy tables */ - { size_t const chainSize = ZSTD_allocateChainTable(srcCCtx->appliedParams.cParams.strategy, - srcCCtx->appliedParams.useRowMatchFinder, - 0 /* forDDSDict */) - ? ((size_t)1 << srcCCtx->appliedParams.cParams.chainLog) - : 0; - size_t const hSize = (size_t)1 << srcCCtx->appliedParams.cParams.hashLog; - U32 const h3log = srcCCtx->blockState.matchState.hashLog3; - size_t const h3Size = h3log ? ((size_t)1 << h3log) : 0; - - ZSTD_memcpy(dstCCtx->blockState.matchState.hashTable, - srcCCtx->blockState.matchState.hashTable, - hSize * sizeof(U32)); - ZSTD_memcpy(dstCCtx->blockState.matchState.chainTable, - srcCCtx->blockState.matchState.chainTable, - chainSize * sizeof(U32)); - ZSTD_memcpy(dstCCtx->blockState.matchState.hashTable3, - srcCCtx->blockState.matchState.hashTable3, - h3Size * sizeof(U32)); - } - - ZSTD_cwksp_mark_tables_clean(&dstCCtx->workspace); - - /* copy dictionary offsets */ - { - const ZSTD_MatchState_t* srcMatchState = &srcCCtx->blockState.matchState; - ZSTD_MatchState_t* dstMatchState = &dstCCtx->blockState.matchState; - dstMatchState->window = srcMatchState->window; - dstMatchState->nextToUpdate = srcMatchState->nextToUpdate; - dstMatchState->loadedDictEnd= srcMatchState->loadedDictEnd; - } - dstCCtx->dictID = srcCCtx->dictID; - dstCCtx->dictContentSize = srcCCtx->dictContentSize; - - /* copy block state */ - ZSTD_memcpy(dstCCtx->blockState.prevCBlock, srcCCtx->blockState.prevCBlock, sizeof(*srcCCtx->blockState.prevCBlock)); - - return 0; -} - -/*! ZSTD_copyCCtx() : - * Duplicate an existing context `srcCCtx` into another one `dstCCtx`. - * Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()). - * pledgedSrcSize==0 means "unknown". -* @return : 0, or an error code */ -size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx, unsigned long long pledgedSrcSize) -{ - ZSTD_frameParameters fParams = { 1 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; - ZSTD_buffered_policy_e const zbuff = srcCCtx->bufferedPolicy; - ZSTD_STATIC_ASSERT((U32)ZSTDb_buffered==1); - if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; - fParams.contentSizeFlag = (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN); - - return ZSTD_copyCCtx_internal(dstCCtx, srcCCtx, - fParams, pledgedSrcSize, - zbuff); -} - - -#define ZSTD_ROWSIZE 16 -/*! ZSTD_reduceTable() : - * reduce table indexes by `reducerValue`, or squash to zero. - * PreserveMark preserves "unsorted mark" for btlazy2 strategy. - * It must be set to a clear 0/1 value, to remove branch during inlining. - * Presume table size is a multiple of ZSTD_ROWSIZE - * to help auto-vectorization */ -FORCE_INLINE_TEMPLATE void -ZSTD_reduceTable_internal (U32* const table, U32 const size, U32 const reducerValue, int const preserveMark) -{ - int const nbRows = (int)size / ZSTD_ROWSIZE; - int cellNb = 0; - int rowNb; - /* Protect special index values < ZSTD_WINDOW_START_INDEX. */ - U32 const reducerThreshold = reducerValue + ZSTD_WINDOW_START_INDEX; - assert((size & (ZSTD_ROWSIZE-1)) == 0); /* multiple of ZSTD_ROWSIZE */ - assert(size < (1U<<31)); /* can be cast to int */ - -#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) - /* To validate that the table reuse logic is sound, and that we don't - * access table space that we haven't cleaned, we re-"poison" the table - * space every time we mark it dirty. - * - * This function however is intended to operate on those dirty tables and - * re-clean them. So when this function is used correctly, we can unpoison - * the memory it operated on. This introduces a blind spot though, since - * if we now try to operate on __actually__ poisoned memory, we will not - * detect that. */ - __msan_unpoison(table, size * sizeof(U32)); -#endif - - for (rowNb=0 ; rowNb < nbRows ; rowNb++) { - int column; - for (column=0; columncParams.hashLog; - ZSTD_reduceTable(ms->hashTable, hSize, reducerValue); - } - - if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicatedDictSearch)) { - U32 const chainSize = (U32)1 << params->cParams.chainLog; - if (params->cParams.strategy == ZSTD_btlazy2) - ZSTD_reduceTable_btlazy2(ms->chainTable, chainSize, reducerValue); - else - ZSTD_reduceTable(ms->chainTable, chainSize, reducerValue); - } - - if (ms->hashLog3) { - U32 const h3Size = (U32)1 << ms->hashLog3; - ZSTD_reduceTable(ms->hashTable3, h3Size, reducerValue); - } -} - - -/*-******************************************************* -* Block entropic compression -*********************************************************/ - -/* See doc/zstd_compression_format.md for detailed format description */ - -int ZSTD_seqToCodes(const SeqStore_t* seqStorePtr) -{ - const SeqDef* const sequences = seqStorePtr->sequencesStart; - BYTE* const llCodeTable = seqStorePtr->llCode; - BYTE* const ofCodeTable = seqStorePtr->ofCode; - BYTE* const mlCodeTable = seqStorePtr->mlCode; - U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - U32 u; - int longOffsets = 0; - assert(nbSeq <= seqStorePtr->maxNbSeq); - for (u=0; u= STREAM_ACCUMULATOR_MIN)); - if (MEM_32bits() && ofCode >= STREAM_ACCUMULATOR_MIN) - longOffsets = 1; - } - if (seqStorePtr->longLengthType==ZSTD_llt_literalLength) - llCodeTable[seqStorePtr->longLengthPos] = MaxLL; - if (seqStorePtr->longLengthType==ZSTD_llt_matchLength) - mlCodeTable[seqStorePtr->longLengthPos] = MaxML; - return longOffsets; -} - -/* ZSTD_useTargetCBlockSize(): - * Returns if target compressed block size param is being used. - * If used, compression will do best effort to make a compressed block size to be around targetCBlockSize. - * Returns 1 if true, 0 otherwise. */ -static int ZSTD_useTargetCBlockSize(const ZSTD_CCtx_params* cctxParams) -{ - DEBUGLOG(5, "ZSTD_useTargetCBlockSize (targetCBlockSize=%zu)", cctxParams->targetCBlockSize); - return (cctxParams->targetCBlockSize != 0); -} - -/* ZSTD_blockSplitterEnabled(): - * Returns if block splitting param is being used - * If used, compression will do best effort to split a block in order to improve compression ratio. - * At the time this function is called, the parameter must be finalized. - * Returns 1 if true, 0 otherwise. */ -static int ZSTD_blockSplitterEnabled(ZSTD_CCtx_params* cctxParams) -{ - DEBUGLOG(5, "ZSTD_blockSplitterEnabled (postBlockSplitter=%d)", cctxParams->postBlockSplitter); - assert(cctxParams->postBlockSplitter != ZSTD_ps_auto); - return (cctxParams->postBlockSplitter == ZSTD_ps_enable); -} - -/* Type returned by ZSTD_buildSequencesStatistics containing finalized symbol encoding types - * and size of the sequences statistics - */ -typedef struct { - U32 LLtype; - U32 Offtype; - U32 MLtype; - size_t size; - size_t lastCountSize; /* Accounts for bug in 1.3.4. More detail in ZSTD_entropyCompressSeqStore_internal() */ - int longOffsets; -} ZSTD_symbolEncodingTypeStats_t; - -/* ZSTD_buildSequencesStatistics(): - * Returns a ZSTD_symbolEncodingTypeStats_t, or a zstd error code in the `size` field. - * Modifies `nextEntropy` to have the appropriate values as a side effect. - * nbSeq must be greater than 0. - * - * entropyWkspSize must be of size at least ENTROPY_WORKSPACE_SIZE - (MaxSeq + 1)*sizeof(U32) - */ -static ZSTD_symbolEncodingTypeStats_t -ZSTD_buildSequencesStatistics( - const SeqStore_t* seqStorePtr, size_t nbSeq, - const ZSTD_fseCTables_t* prevEntropy, ZSTD_fseCTables_t* nextEntropy, - BYTE* dst, const BYTE* const dstEnd, - ZSTD_strategy strategy, unsigned* countWorkspace, - void* entropyWorkspace, size_t entropyWkspSize) -{ - BYTE* const ostart = dst; - const BYTE* const oend = dstEnd; - BYTE* op = ostart; - FSE_CTable* CTable_LitLength = nextEntropy->litlengthCTable; - FSE_CTable* CTable_OffsetBits = nextEntropy->offcodeCTable; - FSE_CTable* CTable_MatchLength = nextEntropy->matchlengthCTable; - const BYTE* const ofCodeTable = seqStorePtr->ofCode; - const BYTE* const llCodeTable = seqStorePtr->llCode; - const BYTE* const mlCodeTable = seqStorePtr->mlCode; - ZSTD_symbolEncodingTypeStats_t stats; - - stats.lastCountSize = 0; - /* convert length/distances into codes */ - stats.longOffsets = ZSTD_seqToCodes(seqStorePtr); - assert(op <= oend); - assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ - /* build CTable for Literal Lengths */ - { unsigned max = MaxLL; - size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ - DEBUGLOG(5, "Building LL table"); - nextEntropy->litlength_repeatMode = prevEntropy->litlength_repeatMode; - stats.LLtype = ZSTD_selectEncodingType(&nextEntropy->litlength_repeatMode, - countWorkspace, max, mostFrequent, nbSeq, - LLFSELog, prevEntropy->litlengthCTable, - LL_defaultNorm, LL_defaultNormLog, - ZSTD_defaultAllowed, strategy); - assert(set_basic < set_compressed && set_rle < set_compressed); - assert(!(stats.LLtype < set_compressed && nextEntropy->litlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ - { size_t const countSize = ZSTD_buildCTable( - op, (size_t)(oend - op), - CTable_LitLength, LLFSELog, (SymbolEncodingType_e)stats.LLtype, - countWorkspace, max, llCodeTable, nbSeq, - LL_defaultNorm, LL_defaultNormLog, MaxLL, - prevEntropy->litlengthCTable, - sizeof(prevEntropy->litlengthCTable), - entropyWorkspace, entropyWkspSize); - if (ZSTD_isError(countSize)) { - DEBUGLOG(3, "ZSTD_buildCTable for LitLens failed"); - stats.size = countSize; - return stats; - } - if (stats.LLtype == set_compressed) - stats.lastCountSize = countSize; - op += countSize; - assert(op <= oend); - } } - /* build CTable for Offsets */ - { unsigned max = MaxOff; - size_t const mostFrequent = HIST_countFast_wksp( - countWorkspace, &max, ofCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ - /* We can only use the basic table if max <= DefaultMaxOff, otherwise the offsets are too large */ - ZSTD_DefaultPolicy_e const defaultPolicy = (max <= DefaultMaxOff) ? ZSTD_defaultAllowed : ZSTD_defaultDisallowed; - DEBUGLOG(5, "Building OF table"); - nextEntropy->offcode_repeatMode = prevEntropy->offcode_repeatMode; - stats.Offtype = ZSTD_selectEncodingType(&nextEntropy->offcode_repeatMode, - countWorkspace, max, mostFrequent, nbSeq, - OffFSELog, prevEntropy->offcodeCTable, - OF_defaultNorm, OF_defaultNormLog, - defaultPolicy, strategy); - assert(!(stats.Offtype < set_compressed && nextEntropy->offcode_repeatMode != FSE_repeat_none)); /* We don't copy tables */ - { size_t const countSize = ZSTD_buildCTable( - op, (size_t)(oend - op), - CTable_OffsetBits, OffFSELog, (SymbolEncodingType_e)stats.Offtype, - countWorkspace, max, ofCodeTable, nbSeq, - OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, - prevEntropy->offcodeCTable, - sizeof(prevEntropy->offcodeCTable), - entropyWorkspace, entropyWkspSize); - if (ZSTD_isError(countSize)) { - DEBUGLOG(3, "ZSTD_buildCTable for Offsets failed"); - stats.size = countSize; - return stats; - } - if (stats.Offtype == set_compressed) - stats.lastCountSize = countSize; - op += countSize; - assert(op <= oend); - } } - /* build CTable for MatchLengths */ - { unsigned max = MaxML; - size_t const mostFrequent = HIST_countFast_wksp( - countWorkspace, &max, mlCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ - DEBUGLOG(5, "Building ML table (remaining space : %i)", (int)(oend-op)); - nextEntropy->matchlength_repeatMode = prevEntropy->matchlength_repeatMode; - stats.MLtype = ZSTD_selectEncodingType(&nextEntropy->matchlength_repeatMode, - countWorkspace, max, mostFrequent, nbSeq, - MLFSELog, prevEntropy->matchlengthCTable, - ML_defaultNorm, ML_defaultNormLog, - ZSTD_defaultAllowed, strategy); - assert(!(stats.MLtype < set_compressed && nextEntropy->matchlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ - { size_t const countSize = ZSTD_buildCTable( - op, (size_t)(oend - op), - CTable_MatchLength, MLFSELog, (SymbolEncodingType_e)stats.MLtype, - countWorkspace, max, mlCodeTable, nbSeq, - ML_defaultNorm, ML_defaultNormLog, MaxML, - prevEntropy->matchlengthCTable, - sizeof(prevEntropy->matchlengthCTable), - entropyWorkspace, entropyWkspSize); - if (ZSTD_isError(countSize)) { - DEBUGLOG(3, "ZSTD_buildCTable for MatchLengths failed"); - stats.size = countSize; - return stats; - } - if (stats.MLtype == set_compressed) - stats.lastCountSize = countSize; - op += countSize; - assert(op <= oend); - } } - stats.size = (size_t)(op-ostart); - return stats; -} - -/* ZSTD_entropyCompressSeqStore_internal(): - * compresses both literals and sequences - * Returns compressed size of block, or a zstd error. - */ -#define SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO 20 -MEM_STATIC size_t -ZSTD_entropyCompressSeqStore_internal( - void* dst, size_t dstCapacity, - const void* literals, size_t litSize, - const SeqStore_t* seqStorePtr, - const ZSTD_entropyCTables_t* prevEntropy, - ZSTD_entropyCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - void* entropyWorkspace, size_t entropyWkspSize, - const int bmi2) -{ - ZSTD_strategy const strategy = cctxParams->cParams.strategy; - unsigned* count = (unsigned*)entropyWorkspace; - FSE_CTable* CTable_LitLength = nextEntropy->fse.litlengthCTable; - FSE_CTable* CTable_OffsetBits = nextEntropy->fse.offcodeCTable; - FSE_CTable* CTable_MatchLength = nextEntropy->fse.matchlengthCTable; - const SeqDef* const sequences = seqStorePtr->sequencesStart; - const size_t nbSeq = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - const BYTE* const ofCodeTable = seqStorePtr->ofCode; - const BYTE* const llCodeTable = seqStorePtr->llCode; - const BYTE* const mlCodeTable = seqStorePtr->mlCode; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstCapacity; - BYTE* op = ostart; - size_t lastCountSize; - int longOffsets = 0; - - entropyWorkspace = count + (MaxSeq + 1); - entropyWkspSize -= (MaxSeq + 1) * sizeof(*count); - - DEBUGLOG(5, "ZSTD_entropyCompressSeqStore_internal (nbSeq=%zu, dstCapacity=%zu)", nbSeq, dstCapacity); - ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<= HUF_WORKSPACE_SIZE); - - /* Compress literals */ - { size_t const numSequences = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - /* Base suspicion of uncompressibility on ratio of literals to sequences */ - int const suspectUncompressible = (numSequences == 0) || (litSize / numSequences >= SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO); - - size_t const cSize = ZSTD_compressLiterals( - op, dstCapacity, - literals, litSize, - entropyWorkspace, entropyWkspSize, - &prevEntropy->huf, &nextEntropy->huf, - cctxParams->cParams.strategy, - ZSTD_literalsCompressionIsDisabled(cctxParams), - suspectUncompressible, bmi2); - FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); - assert(cSize <= dstCapacity); - op += cSize; - } - - /* Sequences Header */ - RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, - dstSize_tooSmall, "Can't fit seq hdr in output buf!"); - if (nbSeq < 128) { - *op++ = (BYTE)nbSeq; - } else if (nbSeq < LONGNBSEQ) { - op[0] = (BYTE)((nbSeq>>8) + 0x80); - op[1] = (BYTE)nbSeq; - op+=2; - } else { - op[0]=0xFF; - MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)); - op+=3; - } - assert(op <= oend); - if (nbSeq==0) { - /* Copy the old tables over as if we repeated them */ - ZSTD_memcpy(&nextEntropy->fse, &prevEntropy->fse, sizeof(prevEntropy->fse)); - return (size_t)(op - ostart); - } - { BYTE* const seqHead = op++; - /* build stats for sequences */ - const ZSTD_symbolEncodingTypeStats_t stats = - ZSTD_buildSequencesStatistics(seqStorePtr, nbSeq, - &prevEntropy->fse, &nextEntropy->fse, - op, oend, - strategy, count, - entropyWorkspace, entropyWkspSize); - FORWARD_IF_ERROR(stats.size, "ZSTD_buildSequencesStatistics failed!"); - *seqHead = (BYTE)((stats.LLtype<<6) + (stats.Offtype<<4) + (stats.MLtype<<2)); - lastCountSize = stats.lastCountSize; - op += stats.size; - longOffsets = stats.longOffsets; - } - - { size_t const bitstreamSize = ZSTD_encodeSequences( - op, (size_t)(oend - op), - CTable_MatchLength, mlCodeTable, - CTable_OffsetBits, ofCodeTable, - CTable_LitLength, llCodeTable, - sequences, nbSeq, - longOffsets, bmi2); - FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); - op += bitstreamSize; - assert(op <= oend); - /* zstd versions <= 1.3.4 mistakenly report corruption when - * FSE_readNCount() receives a buffer < 4 bytes. - * Fixed by https://github.com/facebook/zstd/pull/1146. - * This can happen when the last set_compressed table present is 2 - * bytes and the bitstream is only one byte. - * In this exceedingly rare case, we will simply emit an uncompressed - * block, since it isn't worth optimizing. - */ - if (lastCountSize && (lastCountSize + bitstreamSize) < 4) { - /* lastCountSize >= 2 && bitstreamSize > 0 ==> lastCountSize == 3 */ - assert(lastCountSize + bitstreamSize == 3); - DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.3.4 by " - "emitting an uncompressed block."); - return 0; - } - } - - DEBUGLOG(5, "compressed block size : %u", (unsigned)(op - ostart)); - return (size_t)(op - ostart); -} - -static size_t -ZSTD_entropyCompressSeqStore_wExtLitBuffer( - void* dst, size_t dstCapacity, - const void* literals, size_t litSize, - size_t blockSize, - const SeqStore_t* seqStorePtr, - const ZSTD_entropyCTables_t* prevEntropy, - ZSTD_entropyCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - void* entropyWorkspace, size_t entropyWkspSize, - int bmi2) -{ - size_t const cSize = ZSTD_entropyCompressSeqStore_internal( - dst, dstCapacity, - literals, litSize, - seqStorePtr, prevEntropy, nextEntropy, cctxParams, - entropyWorkspace, entropyWkspSize, bmi2); - if (cSize == 0) return 0; - /* When srcSize <= dstCapacity, there is enough space to write a raw uncompressed block. - * Since we ran out of space, block must be not compressible, so fall back to raw uncompressed block. - */ - if ((cSize == ERROR(dstSize_tooSmall)) & (blockSize <= dstCapacity)) { - DEBUGLOG(4, "not enough dstCapacity (%zu) for ZSTD_entropyCompressSeqStore_internal()=> do not compress block", dstCapacity); - return 0; /* block not compressed */ - } - FORWARD_IF_ERROR(cSize, "ZSTD_entropyCompressSeqStore_internal failed"); - - /* Check compressibility */ - { size_t const maxCSize = blockSize - ZSTD_minGain(blockSize, cctxParams->cParams.strategy); - if (cSize >= maxCSize) return 0; /* block not compressed */ - } - DEBUGLOG(5, "ZSTD_entropyCompressSeqStore() cSize: %zu", cSize); - /* libzstd decoder before > v1.5.4 is not compatible with compressed blocks of size ZSTD_BLOCKSIZE_MAX exactly. - * This restriction is indirectly already fulfilled by respecting ZSTD_minGain() condition above. - */ - assert(cSize < ZSTD_BLOCKSIZE_MAX); - return cSize; -} - -static size_t -ZSTD_entropyCompressSeqStore( - const SeqStore_t* seqStorePtr, - const ZSTD_entropyCTables_t* prevEntropy, - ZSTD_entropyCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - void* dst, size_t dstCapacity, - size_t srcSize, - void* entropyWorkspace, size_t entropyWkspSize, - int bmi2) -{ - return ZSTD_entropyCompressSeqStore_wExtLitBuffer( - dst, dstCapacity, - seqStorePtr->litStart, (size_t)(seqStorePtr->lit - seqStorePtr->litStart), - srcSize, - seqStorePtr, - prevEntropy, nextEntropy, - cctxParams, - entropyWorkspace, entropyWkspSize, - bmi2); -} - -/* ZSTD_selectBlockCompressor() : - * Not static, but internal use only (used by long distance matcher) - * assumption : strat is a valid strategy */ -ZSTD_BlockCompressor_f ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_ParamSwitch_e useRowMatchFinder, ZSTD_dictMode_e dictMode) -{ - static const ZSTD_BlockCompressor_f blockCompressor[4][ZSTD_STRATEGY_MAX+1] = { - { ZSTD_compressBlock_fast /* default for 0 */, - ZSTD_compressBlock_fast, - ZSTD_COMPRESSBLOCK_DOUBLEFAST, - ZSTD_COMPRESSBLOCK_GREEDY, - ZSTD_COMPRESSBLOCK_LAZY, - ZSTD_COMPRESSBLOCK_LAZY2, - ZSTD_COMPRESSBLOCK_BTLAZY2, - ZSTD_COMPRESSBLOCK_BTOPT, - ZSTD_COMPRESSBLOCK_BTULTRA, - ZSTD_COMPRESSBLOCK_BTULTRA2 - }, - { ZSTD_compressBlock_fast_extDict /* default for 0 */, - ZSTD_compressBlock_fast_extDict, - ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT, - ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT, - ZSTD_COMPRESSBLOCK_LAZY_EXTDICT, - ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT, - ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT, - ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT, - ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT, - ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT - }, - { ZSTD_compressBlock_fast_dictMatchState /* default for 0 */, - ZSTD_compressBlock_fast_dictMatchState, - ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE, - ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE - }, - { NULL /* default for 0 */, - NULL, - NULL, - ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH, - ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH, - ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH, - NULL, - NULL, - NULL, - NULL } - }; - ZSTD_BlockCompressor_f selectedCompressor; - ZSTD_STATIC_ASSERT((unsigned)ZSTD_fast == 1); - - assert(ZSTD_cParam_withinBounds(ZSTD_c_strategy, (int)strat)); - DEBUGLOG(5, "Selected block compressor: dictMode=%d strat=%d rowMatchfinder=%d", (int)dictMode, (int)strat, (int)useRowMatchFinder); - if (ZSTD_rowMatchFinderUsed(strat, useRowMatchFinder)) { - static const ZSTD_BlockCompressor_f rowBasedBlockCompressors[4][3] = { - { - ZSTD_COMPRESSBLOCK_GREEDY_ROW, - ZSTD_COMPRESSBLOCK_LAZY_ROW, - ZSTD_COMPRESSBLOCK_LAZY2_ROW - }, - { - ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW, - ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW, - ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW - }, - { - ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW, - ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW, - ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW - }, - { - ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW, - ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW, - ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW - } - }; - DEBUGLOG(5, "Selecting a row-based matchfinder"); - assert(useRowMatchFinder != ZSTD_ps_auto); - selectedCompressor = rowBasedBlockCompressors[(int)dictMode][(int)strat - (int)ZSTD_greedy]; - } else { - selectedCompressor = blockCompressor[(int)dictMode][(int)strat]; - } - assert(selectedCompressor != NULL); - return selectedCompressor; -} - -static void ZSTD_storeLastLiterals(SeqStore_t* seqStorePtr, - const BYTE* anchor, size_t lastLLSize) -{ - ZSTD_memcpy(seqStorePtr->lit, anchor, lastLLSize); - seqStorePtr->lit += lastLLSize; -} - -void ZSTD_resetSeqStore(SeqStore_t* ssPtr) -{ - ssPtr->lit = ssPtr->litStart; - ssPtr->sequences = ssPtr->sequencesStart; - ssPtr->longLengthType = ZSTD_llt_none; -} - -/* ZSTD_postProcessSequenceProducerResult() : - * Validates and post-processes sequences obtained through the external matchfinder API: - * - Checks whether nbExternalSeqs represents an error condition. - * - Appends a block delimiter to outSeqs if one is not already present. - * See zstd.h for context regarding block delimiters. - * Returns the number of sequences after post-processing, or an error code. */ -static size_t ZSTD_postProcessSequenceProducerResult( - ZSTD_Sequence* outSeqs, size_t nbExternalSeqs, size_t outSeqsCapacity, size_t srcSize -) { - RETURN_ERROR_IF( - nbExternalSeqs > outSeqsCapacity, - sequenceProducer_failed, - "External sequence producer returned error code %lu", - (unsigned long)nbExternalSeqs - ); - - RETURN_ERROR_IF( - nbExternalSeqs == 0 && srcSize > 0, - sequenceProducer_failed, - "Got zero sequences from external sequence producer for a non-empty src buffer!" - ); - - if (srcSize == 0) { - ZSTD_memset(&outSeqs[0], 0, sizeof(ZSTD_Sequence)); - return 1; - } - - { - ZSTD_Sequence const lastSeq = outSeqs[nbExternalSeqs - 1]; - - /* We can return early if lastSeq is already a block delimiter. */ - if (lastSeq.offset == 0 && lastSeq.matchLength == 0) { - return nbExternalSeqs; - } - - /* This error condition is only possible if the external matchfinder - * produced an invalid parse, by definition of ZSTD_sequenceBound(). */ - RETURN_ERROR_IF( - nbExternalSeqs == outSeqsCapacity, - sequenceProducer_failed, - "nbExternalSeqs == outSeqsCapacity but lastSeq is not a block delimiter!" - ); - - /* lastSeq is not a block delimiter, so we need to append one. */ - ZSTD_memset(&outSeqs[nbExternalSeqs], 0, sizeof(ZSTD_Sequence)); - return nbExternalSeqs + 1; - } -} - -/* ZSTD_fastSequenceLengthSum() : - * Returns sum(litLen) + sum(matchLen) + lastLits for *seqBuf*. - * Similar to another function in zstd_compress.c (determine_blockSize), - * except it doesn't check for a block delimiter to end summation. - * Removing the early exit allows the compiler to auto-vectorize (https://godbolt.org/z/cY1cajz9P). - * This function can be deleted and replaced by determine_blockSize after we resolve issue #3456. */ -static size_t ZSTD_fastSequenceLengthSum(ZSTD_Sequence const* seqBuf, size_t seqBufSize) { - size_t matchLenSum, litLenSum, i; - matchLenSum = 0; - litLenSum = 0; - for (i = 0; i < seqBufSize; i++) { - litLenSum += seqBuf[i].litLength; - matchLenSum += seqBuf[i].matchLength; - } - return litLenSum + matchLenSum; -} - -/** - * Function to validate sequences produced by a block compressor. - */ -static void ZSTD_validateSeqStore(const SeqStore_t* seqStore, const ZSTD_compressionParameters* cParams) -{ -#if DEBUGLEVEL >= 1 - const SeqDef* seq = seqStore->sequencesStart; - const SeqDef* const seqEnd = seqStore->sequences; - size_t const matchLenLowerBound = cParams->minMatch == 3 ? 3 : 4; - for (; seq < seqEnd; ++seq) { - const ZSTD_SequenceLength seqLength = ZSTD_getSequenceLength(seqStore, seq); - assert(seqLength.matchLength >= matchLenLowerBound); - (void)seqLength; - (void)matchLenLowerBound; - } -#else - (void)seqStore; - (void)cParams; -#endif -} - -static size_t -ZSTD_transferSequences_wBlockDelim(ZSTD_CCtx* cctx, - ZSTD_SequencePosition* seqPos, - const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, - const void* src, size_t blockSize, - ZSTD_ParamSwitch_e externalRepSearch); - -typedef enum { ZSTDbss_compress, ZSTDbss_noCompress } ZSTD_BuildSeqStore_e; - -static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize) -{ - ZSTD_MatchState_t* const ms = &zc->blockState.matchState; - DEBUGLOG(5, "ZSTD_buildSeqStore (srcSize=%zu)", srcSize); - assert(srcSize <= ZSTD_BLOCKSIZE_MAX); - /* Assert that we have correctly flushed the ctx params into the ms's copy */ - ZSTD_assertEqualCParams(zc->appliedParams.cParams, ms->cParams); - /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding - * additional 1. We need to revisit and change this logic to be more consistent */ - if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1+1) { - if (zc->appliedParams.cParams.strategy >= ZSTD_btopt) { - ZSTD_ldm_skipRawSeqStoreBytes(&zc->externSeqStore, srcSize); - } else { - ZSTD_ldm_skipSequences(&zc->externSeqStore, srcSize, zc->appliedParams.cParams.minMatch); - } - return ZSTDbss_noCompress; /* don't even attempt compression below a certain srcSize */ - } - ZSTD_resetSeqStore(&(zc->seqStore)); - /* required for optimal parser to read stats from dictionary */ - ms->opt.symbolCosts = &zc->blockState.prevCBlock->entropy; - /* tell the optimal parser how we expect to compress literals */ - ms->opt.literalCompressionMode = zc->appliedParams.literalCompressionMode; - /* a gap between an attached dict and the current window is not safe, - * they must remain adjacent, - * and when that stops being the case, the dict must be unset */ - assert(ms->dictMatchState == NULL || ms->loadedDictEnd == ms->window.dictLimit); - - /* limited update after a very long match */ - { const BYTE* const base = ms->window.base; - const BYTE* const istart = (const BYTE*)src; - const U32 curr = (U32)(istart-base); - if (sizeof(ptrdiff_t)==8) assert(istart - base < (ptrdiff_t)(U32)(-1)); /* ensure no overflow */ - if (curr > ms->nextToUpdate + 384) - ms->nextToUpdate = curr - MIN(192, (U32)(curr - ms->nextToUpdate - 384)); - } - - /* select and store sequences */ - { ZSTD_dictMode_e const dictMode = ZSTD_matchState_dictMode(ms); - size_t lastLLSize; - { int i; - for (i = 0; i < ZSTD_REP_NUM; ++i) - zc->blockState.nextCBlock->rep[i] = zc->blockState.prevCBlock->rep[i]; - } - if (zc->externSeqStore.pos < zc->externSeqStore.size) { - assert(zc->appliedParams.ldmParams.enableLdm == ZSTD_ps_disable); - - /* External matchfinder + LDM is technically possible, just not implemented yet. - * We need to revisit soon and implement it. */ - RETURN_ERROR_IF( - ZSTD_hasExtSeqProd(&zc->appliedParams), - parameter_combination_unsupported, - "Long-distance matching with external sequence producer enabled is not currently supported." - ); - - /* Updates ldmSeqStore.pos */ - lastLLSize = - ZSTD_ldm_blockCompress(&zc->externSeqStore, - ms, &zc->seqStore, - zc->blockState.nextCBlock->rep, - zc->appliedParams.useRowMatchFinder, - src, srcSize); - assert(zc->externSeqStore.pos <= zc->externSeqStore.size); - } else if (zc->appliedParams.ldmParams.enableLdm == ZSTD_ps_enable) { - RawSeqStore_t ldmSeqStore = kNullRawSeqStore; - - /* External matchfinder + LDM is technically possible, just not implemented yet. - * We need to revisit soon and implement it. */ - RETURN_ERROR_IF( - ZSTD_hasExtSeqProd(&zc->appliedParams), - parameter_combination_unsupported, - "Long-distance matching with external sequence producer enabled is not currently supported." - ); - - ldmSeqStore.seq = zc->ldmSequences; - ldmSeqStore.capacity = zc->maxNbLdmSequences; - /* Updates ldmSeqStore.size */ - FORWARD_IF_ERROR(ZSTD_ldm_generateSequences(&zc->ldmState, &ldmSeqStore, - &zc->appliedParams.ldmParams, - src, srcSize), ""); - /* Updates ldmSeqStore.pos */ - lastLLSize = - ZSTD_ldm_blockCompress(&ldmSeqStore, - ms, &zc->seqStore, - zc->blockState.nextCBlock->rep, - zc->appliedParams.useRowMatchFinder, - src, srcSize); - assert(ldmSeqStore.pos == ldmSeqStore.size); - } else if (ZSTD_hasExtSeqProd(&zc->appliedParams)) { - assert( - zc->extSeqBufCapacity >= ZSTD_sequenceBound(srcSize) - ); - assert(zc->appliedParams.extSeqProdFunc != NULL); - - { U32 const windowSize = (U32)1 << zc->appliedParams.cParams.windowLog; - - size_t const nbExternalSeqs = (zc->appliedParams.extSeqProdFunc)( - zc->appliedParams.extSeqProdState, - zc->extSeqBuf, - zc->extSeqBufCapacity, - src, srcSize, - NULL, 0, /* dict and dictSize, currently not supported */ - zc->appliedParams.compressionLevel, - windowSize - ); - - size_t const nbPostProcessedSeqs = ZSTD_postProcessSequenceProducerResult( - zc->extSeqBuf, - nbExternalSeqs, - zc->extSeqBufCapacity, - srcSize - ); - - /* Return early if there is no error, since we don't need to worry about last literals */ - if (!ZSTD_isError(nbPostProcessedSeqs)) { - ZSTD_SequencePosition seqPos = {0,0,0}; - size_t const seqLenSum = ZSTD_fastSequenceLengthSum(zc->extSeqBuf, nbPostProcessedSeqs); - RETURN_ERROR_IF(seqLenSum > srcSize, externalSequences_invalid, "External sequences imply too large a block!"); - FORWARD_IF_ERROR( - ZSTD_transferSequences_wBlockDelim( - zc, &seqPos, - zc->extSeqBuf, nbPostProcessedSeqs, - src, srcSize, - zc->appliedParams.searchForExternalRepcodes - ), - "Failed to copy external sequences to seqStore!" - ); - ms->ldmSeqStore = NULL; - DEBUGLOG(5, "Copied %lu sequences from external sequence producer to internal seqStore.", (unsigned long)nbExternalSeqs); - return ZSTDbss_compress; - } - - /* Propagate the error if fallback is disabled */ - if (!zc->appliedParams.enableMatchFinderFallback) { - return nbPostProcessedSeqs; - } - - /* Fallback to software matchfinder */ - { ZSTD_BlockCompressor_f const blockCompressor = - ZSTD_selectBlockCompressor( - zc->appliedParams.cParams.strategy, - zc->appliedParams.useRowMatchFinder, - dictMode); - ms->ldmSeqStore = NULL; - DEBUGLOG( - 5, - "External sequence producer returned error code %lu. Falling back to internal parser.", - (unsigned long)nbExternalSeqs - ); - lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize); - } } - } else { /* not long range mode and no external matchfinder */ - ZSTD_BlockCompressor_f const blockCompressor = ZSTD_selectBlockCompressor( - zc->appliedParams.cParams.strategy, - zc->appliedParams.useRowMatchFinder, - dictMode); - ms->ldmSeqStore = NULL; - lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize); - } - { const BYTE* const lastLiterals = (const BYTE*)src + srcSize - lastLLSize; - ZSTD_storeLastLiterals(&zc->seqStore, lastLiterals, lastLLSize); - } } - ZSTD_validateSeqStore(&zc->seqStore, &zc->appliedParams.cParams); - return ZSTDbss_compress; -} - -static size_t ZSTD_copyBlockSequences(SeqCollector* seqCollector, const SeqStore_t* seqStore, const U32 prevRepcodes[ZSTD_REP_NUM]) -{ - const SeqDef* inSeqs = seqStore->sequencesStart; - const size_t nbInSequences = (size_t)(seqStore->sequences - inSeqs); - const size_t nbInLiterals = (size_t)(seqStore->lit - seqStore->litStart); - - ZSTD_Sequence* outSeqs = seqCollector->seqIndex == 0 ? seqCollector->seqStart : seqCollector->seqStart + seqCollector->seqIndex; - const size_t nbOutSequences = nbInSequences + 1; - size_t nbOutLiterals = 0; - Repcodes_t repcodes; - size_t i; - - /* Bounds check that we have enough space for every input sequence - * and the block delimiter - */ - assert(seqCollector->seqIndex <= seqCollector->maxSequences); - RETURN_ERROR_IF( - nbOutSequences > (size_t)(seqCollector->maxSequences - seqCollector->seqIndex), - dstSize_tooSmall, - "Not enough space to copy sequences"); - - ZSTD_memcpy(&repcodes, prevRepcodes, sizeof(repcodes)); - for (i = 0; i < nbInSequences; ++i) { - U32 rawOffset; - outSeqs[i].litLength = inSeqs[i].litLength; - outSeqs[i].matchLength = inSeqs[i].mlBase + MINMATCH; - outSeqs[i].rep = 0; - - /* Handle the possible single length >= 64K - * There can only be one because we add MINMATCH to every match length, - * and blocks are at most 128K. - */ - if (i == seqStore->longLengthPos) { - if (seqStore->longLengthType == ZSTD_llt_literalLength) { - outSeqs[i].litLength += 0x10000; - } else if (seqStore->longLengthType == ZSTD_llt_matchLength) { - outSeqs[i].matchLength += 0x10000; - } - } - - /* Determine the raw offset given the offBase, which may be a repcode. */ - if (OFFBASE_IS_REPCODE(inSeqs[i].offBase)) { - const U32 repcode = OFFBASE_TO_REPCODE(inSeqs[i].offBase); - assert(repcode > 0); - outSeqs[i].rep = repcode; - if (outSeqs[i].litLength != 0) { - rawOffset = repcodes.rep[repcode - 1]; - } else { - if (repcode == 3) { - assert(repcodes.rep[0] > 1); - rawOffset = repcodes.rep[0] - 1; - } else { - rawOffset = repcodes.rep[repcode]; - } - } - } else { - rawOffset = OFFBASE_TO_OFFSET(inSeqs[i].offBase); - } - outSeqs[i].offset = rawOffset; - - /* Update repcode history for the sequence */ - ZSTD_updateRep(repcodes.rep, - inSeqs[i].offBase, - inSeqs[i].litLength == 0); - - nbOutLiterals += outSeqs[i].litLength; - } - /* Insert last literals (if any exist) in the block as a sequence with ml == off == 0. - * If there are no last literals, then we'll emit (of: 0, ml: 0, ll: 0), which is a marker - * for the block boundary, according to the API. - */ - assert(nbInLiterals >= nbOutLiterals); - { - const size_t lastLLSize = nbInLiterals - nbOutLiterals; - outSeqs[nbInSequences].litLength = (U32)lastLLSize; - outSeqs[nbInSequences].matchLength = 0; - outSeqs[nbInSequences].offset = 0; - assert(nbOutSequences == nbInSequences + 1); - } - seqCollector->seqIndex += nbOutSequences; - assert(seqCollector->seqIndex <= seqCollector->maxSequences); - - return 0; -} - -size_t ZSTD_sequenceBound(size_t srcSize) { - const size_t maxNbSeq = (srcSize / ZSTD_MINMATCH_MIN) + 1; - const size_t maxNbDelims = (srcSize / ZSTD_BLOCKSIZE_MAX_MIN) + 1; - return maxNbSeq + maxNbDelims; -} - -size_t ZSTD_generateSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs, - size_t outSeqsSize, const void* src, size_t srcSize) -{ - const size_t dstCapacity = ZSTD_compressBound(srcSize); - void* dst; /* Make C90 happy. */ - SeqCollector seqCollector; - { - int targetCBlockSize; - FORWARD_IF_ERROR(ZSTD_CCtx_getParameter(zc, ZSTD_c_targetCBlockSize, &targetCBlockSize), ""); - RETURN_ERROR_IF(targetCBlockSize != 0, parameter_unsupported, "targetCBlockSize != 0"); - } - { - int nbWorkers; - FORWARD_IF_ERROR(ZSTD_CCtx_getParameter(zc, ZSTD_c_nbWorkers, &nbWorkers), ""); - RETURN_ERROR_IF(nbWorkers != 0, parameter_unsupported, "nbWorkers != 0"); - } - - dst = ZSTD_customMalloc(dstCapacity, ZSTD_defaultCMem); - RETURN_ERROR_IF(dst == NULL, memory_allocation, "NULL pointer!"); - - seqCollector.collectSequences = 1; - seqCollector.seqStart = outSeqs; - seqCollector.seqIndex = 0; - seqCollector.maxSequences = outSeqsSize; - zc->seqCollector = seqCollector; - - { - const size_t ret = ZSTD_compress2(zc, dst, dstCapacity, src, srcSize); - ZSTD_customFree(dst, ZSTD_defaultCMem); - FORWARD_IF_ERROR(ret, "ZSTD_compress2 failed"); - } - assert(zc->seqCollector.seqIndex <= ZSTD_sequenceBound(srcSize)); - return zc->seqCollector.seqIndex; -} - -size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize) { - size_t in = 0; - size_t out = 0; - for (; in < seqsSize; ++in) { - if (sequences[in].offset == 0 && sequences[in].matchLength == 0) { - if (in != seqsSize - 1) { - sequences[in+1].litLength += sequences[in].litLength; - } - } else { - sequences[out] = sequences[in]; - ++out; - } - } - return out; -} - -/* Unrolled loop to read four size_ts of input at a time. Returns 1 if is RLE, 0 if not. */ -static int ZSTD_isRLE(const BYTE* src, size_t length) { - const BYTE* ip = src; - const BYTE value = ip[0]; - const size_t valueST = (size_t)((U64)value * 0x0101010101010101ULL); - const size_t unrollSize = sizeof(size_t) * 4; - const size_t unrollMask = unrollSize - 1; - const size_t prefixLength = length & unrollMask; - size_t i; - if (length == 1) return 1; - /* Check if prefix is RLE first before using unrolled loop */ - if (prefixLength && ZSTD_count(ip+1, ip, ip+prefixLength) != prefixLength-1) { - return 0; - } - for (i = prefixLength; i != length; i += unrollSize) { - size_t u; - for (u = 0; u < unrollSize; u += sizeof(size_t)) { - if (MEM_readST(ip + i + u) != valueST) { - return 0; - } } } - return 1; -} - -/* Returns true if the given block may be RLE. - * This is just a heuristic based on the compressibility. - * It may return both false positives and false negatives. - */ -static int ZSTD_maybeRLE(SeqStore_t const* seqStore) -{ - size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); - size_t const nbLits = (size_t)(seqStore->lit - seqStore->litStart); - - return nbSeqs < 4 && nbLits < 10; -} - -static void -ZSTD_blockState_confirmRepcodesAndEntropyTables(ZSTD_blockState_t* const bs) -{ - ZSTD_compressedBlockState_t* const tmp = bs->prevCBlock; - bs->prevCBlock = bs->nextCBlock; - bs->nextCBlock = tmp; -} - -/* Writes the block header */ -static void -writeBlockHeader(void* op, size_t cSize, size_t blockSize, U32 lastBlock) -{ - U32 const cBlockHeader = cSize == 1 ? - lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : - lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); - MEM_writeLE24(op, cBlockHeader); - DEBUGLOG(5, "writeBlockHeader: cSize: %zu blockSize: %zu lastBlock: %u", cSize, blockSize, lastBlock); -} - -/** ZSTD_buildBlockEntropyStats_literals() : - * Builds entropy for the literals. - * Stores literals block type (raw, rle, compressed, repeat) and - * huffman description table to hufMetadata. - * Requires ENTROPY_WORKSPACE_SIZE workspace - * @return : size of huffman description table, or an error code - */ -static size_t -ZSTD_buildBlockEntropyStats_literals(void* const src, size_t srcSize, - const ZSTD_hufCTables_t* prevHuf, - ZSTD_hufCTables_t* nextHuf, - ZSTD_hufCTablesMetadata_t* hufMetadata, - const int literalsCompressionIsDisabled, - void* workspace, size_t wkspSize, - int hufFlags) -{ - BYTE* const wkspStart = (BYTE*)workspace; - BYTE* const wkspEnd = wkspStart + wkspSize; - BYTE* const countWkspStart = wkspStart; - unsigned* const countWksp = (unsigned*)workspace; - const size_t countWkspSize = (HUF_SYMBOLVALUE_MAX + 1) * sizeof(unsigned); - BYTE* const nodeWksp = countWkspStart + countWkspSize; - const size_t nodeWkspSize = (size_t)(wkspEnd - nodeWksp); - unsigned maxSymbolValue = HUF_SYMBOLVALUE_MAX; - unsigned huffLog = LitHufLog; - HUF_repeat repeat = prevHuf->repeatMode; - DEBUGLOG(5, "ZSTD_buildBlockEntropyStats_literals (srcSize=%zu)", srcSize); - - /* Prepare nextEntropy assuming reusing the existing table */ - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - - if (literalsCompressionIsDisabled) { - DEBUGLOG(5, "set_basic - disabled"); - hufMetadata->hType = set_basic; - return 0; - } - - /* small ? don't even attempt compression (speed opt) */ -#ifndef COMPRESS_LITERALS_SIZE_MIN -# define COMPRESS_LITERALS_SIZE_MIN 63 /* heuristic */ -#endif - { size_t const minLitSize = (prevHuf->repeatMode == HUF_repeat_valid) ? 6 : COMPRESS_LITERALS_SIZE_MIN; - if (srcSize <= minLitSize) { - DEBUGLOG(5, "set_basic - too small"); - hufMetadata->hType = set_basic; - return 0; - } } - - /* Scan input and build symbol stats */ - { size_t const largest = - HIST_count_wksp (countWksp, &maxSymbolValue, - (const BYTE*)src, srcSize, - workspace, wkspSize); - FORWARD_IF_ERROR(largest, "HIST_count_wksp failed"); - if (largest == srcSize) { - /* only one literal symbol */ - DEBUGLOG(5, "set_rle"); - hufMetadata->hType = set_rle; - return 0; - } - if (largest <= (srcSize >> 7)+4) { - /* heuristic: likely not compressible */ - DEBUGLOG(5, "set_basic - no gain"); - hufMetadata->hType = set_basic; - return 0; - } } - - /* Validate the previous Huffman table */ - if (repeat == HUF_repeat_check - && !HUF_validateCTable((HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue)) { - repeat = HUF_repeat_none; - } - - /* Build Huffman Tree */ - ZSTD_memset(nextHuf->CTable, 0, sizeof(nextHuf->CTable)); - huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue, nodeWksp, nodeWkspSize, nextHuf->CTable, countWksp, hufFlags); - assert(huffLog <= LitHufLog); - { size_t const maxBits = HUF_buildCTable_wksp((HUF_CElt*)nextHuf->CTable, countWksp, - maxSymbolValue, huffLog, - nodeWksp, nodeWkspSize); - FORWARD_IF_ERROR(maxBits, "HUF_buildCTable_wksp"); - huffLog = (U32)maxBits; - } - { /* Build and write the CTable */ - size_t const newCSize = HUF_estimateCompressedSize( - (HUF_CElt*)nextHuf->CTable, countWksp, maxSymbolValue); - size_t const hSize = HUF_writeCTable_wksp( - hufMetadata->hufDesBuffer, sizeof(hufMetadata->hufDesBuffer), - (HUF_CElt*)nextHuf->CTable, maxSymbolValue, huffLog, - nodeWksp, nodeWkspSize); - /* Check against repeating the previous CTable */ - if (repeat != HUF_repeat_none) { - size_t const oldCSize = HUF_estimateCompressedSize( - (HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue); - if (oldCSize < srcSize && (oldCSize <= hSize + newCSize || hSize + 12 >= srcSize)) { - DEBUGLOG(5, "set_repeat - smaller"); - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - hufMetadata->hType = set_repeat; - return 0; - } } - if (newCSize + hSize >= srcSize) { - DEBUGLOG(5, "set_basic - no gains"); - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - hufMetadata->hType = set_basic; - return 0; - } - DEBUGLOG(5, "set_compressed (hSize=%u)", (U32)hSize); - hufMetadata->hType = set_compressed; - nextHuf->repeatMode = HUF_repeat_check; - return hSize; - } -} - - -/* ZSTD_buildDummySequencesStatistics(): - * Returns a ZSTD_symbolEncodingTypeStats_t with all encoding types as set_basic, - * and updates nextEntropy to the appropriate repeatMode. - */ -static ZSTD_symbolEncodingTypeStats_t -ZSTD_buildDummySequencesStatistics(ZSTD_fseCTables_t* nextEntropy) -{ - ZSTD_symbolEncodingTypeStats_t stats = {set_basic, set_basic, set_basic, 0, 0, 0}; - nextEntropy->litlength_repeatMode = FSE_repeat_none; - nextEntropy->offcode_repeatMode = FSE_repeat_none; - nextEntropy->matchlength_repeatMode = FSE_repeat_none; - return stats; -} - -/** ZSTD_buildBlockEntropyStats_sequences() : - * Builds entropy for the sequences. - * Stores symbol compression modes and fse table to fseMetadata. - * Requires ENTROPY_WORKSPACE_SIZE wksp. - * @return : size of fse tables or error code */ -static size_t -ZSTD_buildBlockEntropyStats_sequences( - const SeqStore_t* seqStorePtr, - const ZSTD_fseCTables_t* prevEntropy, - ZSTD_fseCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - ZSTD_fseCTablesMetadata_t* fseMetadata, - void* workspace, size_t wkspSize) -{ - ZSTD_strategy const strategy = cctxParams->cParams.strategy; - size_t const nbSeq = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - BYTE* const ostart = fseMetadata->fseTablesBuffer; - BYTE* const oend = ostart + sizeof(fseMetadata->fseTablesBuffer); - BYTE* op = ostart; - unsigned* countWorkspace = (unsigned*)workspace; - unsigned* entropyWorkspace = countWorkspace + (MaxSeq + 1); - size_t entropyWorkspaceSize = wkspSize - (MaxSeq + 1) * sizeof(*countWorkspace); - ZSTD_symbolEncodingTypeStats_t stats; - - DEBUGLOG(5, "ZSTD_buildBlockEntropyStats_sequences (nbSeq=%zu)", nbSeq); - stats = nbSeq != 0 ? ZSTD_buildSequencesStatistics(seqStorePtr, nbSeq, - prevEntropy, nextEntropy, op, oend, - strategy, countWorkspace, - entropyWorkspace, entropyWorkspaceSize) - : ZSTD_buildDummySequencesStatistics(nextEntropy); - FORWARD_IF_ERROR(stats.size, "ZSTD_buildSequencesStatistics failed!"); - fseMetadata->llType = (SymbolEncodingType_e) stats.LLtype; - fseMetadata->ofType = (SymbolEncodingType_e) stats.Offtype; - fseMetadata->mlType = (SymbolEncodingType_e) stats.MLtype; - fseMetadata->lastCountSize = stats.lastCountSize; - return stats.size; -} - - -/** ZSTD_buildBlockEntropyStats() : - * Builds entropy for the block. - * Requires workspace size ENTROPY_WORKSPACE_SIZE - * @return : 0 on success, or an error code - * Note : also employed in superblock - */ -size_t ZSTD_buildBlockEntropyStats( - const SeqStore_t* seqStorePtr, - const ZSTD_entropyCTables_t* prevEntropy, - ZSTD_entropyCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - ZSTD_entropyCTablesMetadata_t* entropyMetadata, - void* workspace, size_t wkspSize) -{ - size_t const litSize = (size_t)(seqStorePtr->lit - seqStorePtr->litStart); - int const huf_useOptDepth = (cctxParams->cParams.strategy >= HUF_OPTIMAL_DEPTH_THRESHOLD); - int const hufFlags = huf_useOptDepth ? HUF_flags_optimalDepth : 0; - - entropyMetadata->hufMetadata.hufDesSize = - ZSTD_buildBlockEntropyStats_literals(seqStorePtr->litStart, litSize, - &prevEntropy->huf, &nextEntropy->huf, - &entropyMetadata->hufMetadata, - ZSTD_literalsCompressionIsDisabled(cctxParams), - workspace, wkspSize, hufFlags); - - FORWARD_IF_ERROR(entropyMetadata->hufMetadata.hufDesSize, "ZSTD_buildBlockEntropyStats_literals failed"); - entropyMetadata->fseMetadata.fseTablesSize = - ZSTD_buildBlockEntropyStats_sequences(seqStorePtr, - &prevEntropy->fse, &nextEntropy->fse, - cctxParams, - &entropyMetadata->fseMetadata, - workspace, wkspSize); - FORWARD_IF_ERROR(entropyMetadata->fseMetadata.fseTablesSize, "ZSTD_buildBlockEntropyStats_sequences failed"); - return 0; -} - -/* Returns the size estimate for the literals section (header + content) of a block */ -static size_t -ZSTD_estimateBlockSize_literal(const BYTE* literals, size_t litSize, - const ZSTD_hufCTables_t* huf, - const ZSTD_hufCTablesMetadata_t* hufMetadata, - void* workspace, size_t wkspSize, - int writeEntropy) -{ - unsigned* const countWksp = (unsigned*)workspace; - unsigned maxSymbolValue = HUF_SYMBOLVALUE_MAX; - size_t literalSectionHeaderSize = 3 + (litSize >= 1 KB) + (litSize >= 16 KB); - U32 singleStream = litSize < 256; - - if (hufMetadata->hType == set_basic) return litSize; - else if (hufMetadata->hType == set_rle) return 1; - else if (hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat) { - size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); - if (ZSTD_isError(largest)) return litSize; - { size_t cLitSizeEstimate = HUF_estimateCompressedSize((const HUF_CElt*)huf->CTable, countWksp, maxSymbolValue); - if (writeEntropy) cLitSizeEstimate += hufMetadata->hufDesSize; - if (!singleStream) cLitSizeEstimate += 6; /* multi-stream huffman uses 6-byte jump table */ - return cLitSizeEstimate + literalSectionHeaderSize; - } } - assert(0); /* impossible */ - return 0; -} - -/* Returns the size estimate for the FSE-compressed symbols (of, ml, ll) of a block */ -static size_t -ZSTD_estimateBlockSize_symbolType(SymbolEncodingType_e type, - const BYTE* codeTable, size_t nbSeq, unsigned maxCode, - const FSE_CTable* fseCTable, - const U8* additionalBits, - short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, - void* workspace, size_t wkspSize) -{ - unsigned* const countWksp = (unsigned*)workspace; - const BYTE* ctp = codeTable; - const BYTE* const ctStart = ctp; - const BYTE* const ctEnd = ctStart + nbSeq; - size_t cSymbolTypeSizeEstimateInBits = 0; - unsigned max = maxCode; - - HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ - if (type == set_basic) { - /* We selected this encoding type, so it must be valid. */ - assert(max <= defaultMax); - (void)defaultMax; - cSymbolTypeSizeEstimateInBits = ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, countWksp, max); - } else if (type == set_rle) { - cSymbolTypeSizeEstimateInBits = 0; - } else if (type == set_compressed || type == set_repeat) { - cSymbolTypeSizeEstimateInBits = ZSTD_fseBitCost(fseCTable, countWksp, max); - } - if (ZSTD_isError(cSymbolTypeSizeEstimateInBits)) { - return nbSeq * 10; - } - while (ctp < ctEnd) { - if (additionalBits) cSymbolTypeSizeEstimateInBits += additionalBits[*ctp]; - else cSymbolTypeSizeEstimateInBits += *ctp; /* for offset, offset code is also the number of additional bits */ - ctp++; - } - return cSymbolTypeSizeEstimateInBits >> 3; -} - -/* Returns the size estimate for the sequences section (header + content) of a block */ -static size_t -ZSTD_estimateBlockSize_sequences(const BYTE* ofCodeTable, - const BYTE* llCodeTable, - const BYTE* mlCodeTable, - size_t nbSeq, - const ZSTD_fseCTables_t* fseTables, - const ZSTD_fseCTablesMetadata_t* fseMetadata, - void* workspace, size_t wkspSize, - int writeEntropy) -{ - size_t sequencesSectionHeaderSize = 1 /* seqHead */ + 1 /* min seqSize size */ + (nbSeq >= 128) + (nbSeq >= LONGNBSEQ); - size_t cSeqSizeEstimate = 0; - cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->ofType, ofCodeTable, nbSeq, MaxOff, - fseTables->offcodeCTable, NULL, - OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, - workspace, wkspSize); - cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->llType, llCodeTable, nbSeq, MaxLL, - fseTables->litlengthCTable, LL_bits, - LL_defaultNorm, LL_defaultNormLog, MaxLL, - workspace, wkspSize); - cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->mlType, mlCodeTable, nbSeq, MaxML, - fseTables->matchlengthCTable, ML_bits, - ML_defaultNorm, ML_defaultNormLog, MaxML, - workspace, wkspSize); - if (writeEntropy) cSeqSizeEstimate += fseMetadata->fseTablesSize; - return cSeqSizeEstimate + sequencesSectionHeaderSize; -} - -/* Returns the size estimate for a given stream of literals, of, ll, ml */ -static size_t -ZSTD_estimateBlockSize(const BYTE* literals, size_t litSize, - const BYTE* ofCodeTable, - const BYTE* llCodeTable, - const BYTE* mlCodeTable, - size_t nbSeq, - const ZSTD_entropyCTables_t* entropy, - const ZSTD_entropyCTablesMetadata_t* entropyMetadata, - void* workspace, size_t wkspSize, - int writeLitEntropy, int writeSeqEntropy) -{ - size_t const literalsSize = ZSTD_estimateBlockSize_literal(literals, litSize, - &entropy->huf, &entropyMetadata->hufMetadata, - workspace, wkspSize, writeLitEntropy); - size_t const seqSize = ZSTD_estimateBlockSize_sequences(ofCodeTable, llCodeTable, mlCodeTable, - nbSeq, &entropy->fse, &entropyMetadata->fseMetadata, - workspace, wkspSize, writeSeqEntropy); - return seqSize + literalsSize + ZSTD_blockHeaderSize; -} - -/* Builds entropy statistics and uses them for blocksize estimation. - * - * @return: estimated compressed size of the seqStore, or a zstd error. - */ -static size_t -ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(SeqStore_t* seqStore, ZSTD_CCtx* zc) -{ - ZSTD_entropyCTablesMetadata_t* const entropyMetadata = &zc->blockSplitCtx.entropyMetadata; - DEBUGLOG(6, "ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize()"); - FORWARD_IF_ERROR(ZSTD_buildBlockEntropyStats(seqStore, - &zc->blockState.prevCBlock->entropy, - &zc->blockState.nextCBlock->entropy, - &zc->appliedParams, - entropyMetadata, - zc->tmpWorkspace, zc->tmpWkspSize), ""); - return ZSTD_estimateBlockSize( - seqStore->litStart, (size_t)(seqStore->lit - seqStore->litStart), - seqStore->ofCode, seqStore->llCode, seqStore->mlCode, - (size_t)(seqStore->sequences - seqStore->sequencesStart), - &zc->blockState.nextCBlock->entropy, - entropyMetadata, - zc->tmpWorkspace, zc->tmpWkspSize, - (int)(entropyMetadata->hufMetadata.hType == set_compressed), 1); -} - -/* Returns literals bytes represented in a seqStore */ -static size_t ZSTD_countSeqStoreLiteralsBytes(const SeqStore_t* const seqStore) -{ - size_t literalsBytes = 0; - size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); - size_t i; - for (i = 0; i < nbSeqs; ++i) { - SeqDef const seq = seqStore->sequencesStart[i]; - literalsBytes += seq.litLength; - if (i == seqStore->longLengthPos && seqStore->longLengthType == ZSTD_llt_literalLength) { - literalsBytes += 0x10000; - } } - return literalsBytes; -} - -/* Returns match bytes represented in a seqStore */ -static size_t ZSTD_countSeqStoreMatchBytes(const SeqStore_t* const seqStore) -{ - size_t matchBytes = 0; - size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); - size_t i; - for (i = 0; i < nbSeqs; ++i) { - SeqDef seq = seqStore->sequencesStart[i]; - matchBytes += seq.mlBase + MINMATCH; - if (i == seqStore->longLengthPos && seqStore->longLengthType == ZSTD_llt_matchLength) { - matchBytes += 0x10000; - } } - return matchBytes; -} - -/* Derives the seqStore that is a chunk of the originalSeqStore from [startIdx, endIdx). - * Stores the result in resultSeqStore. - */ -static void ZSTD_deriveSeqStoreChunk(SeqStore_t* resultSeqStore, - const SeqStore_t* originalSeqStore, - size_t startIdx, size_t endIdx) -{ - *resultSeqStore = *originalSeqStore; - if (startIdx > 0) { - resultSeqStore->sequences = originalSeqStore->sequencesStart + startIdx; - resultSeqStore->litStart += ZSTD_countSeqStoreLiteralsBytes(resultSeqStore); - } - - /* Move longLengthPos into the correct position if necessary */ - if (originalSeqStore->longLengthType != ZSTD_llt_none) { - if (originalSeqStore->longLengthPos < startIdx || originalSeqStore->longLengthPos > endIdx) { - resultSeqStore->longLengthType = ZSTD_llt_none; - } else { - resultSeqStore->longLengthPos -= (U32)startIdx; - } - } - resultSeqStore->sequencesStart = originalSeqStore->sequencesStart + startIdx; - resultSeqStore->sequences = originalSeqStore->sequencesStart + endIdx; - if (endIdx == (size_t)(originalSeqStore->sequences - originalSeqStore->sequencesStart)) { - /* This accounts for possible last literals if the derived chunk reaches the end of the block */ - assert(resultSeqStore->lit == originalSeqStore->lit); - } else { - size_t const literalsBytes = ZSTD_countSeqStoreLiteralsBytes(resultSeqStore); - resultSeqStore->lit = resultSeqStore->litStart + literalsBytes; - } - resultSeqStore->llCode += startIdx; - resultSeqStore->mlCode += startIdx; - resultSeqStore->ofCode += startIdx; -} - -/** - * Returns the raw offset represented by the combination of offBase, ll0, and repcode history. - * offBase must represent a repcode in the numeric representation of ZSTD_storeSeq(). - */ -static U32 -ZSTD_resolveRepcodeToRawOffset(const U32 rep[ZSTD_REP_NUM], const U32 offBase, const U32 ll0) -{ - U32 const adjustedRepCode = OFFBASE_TO_REPCODE(offBase) - 1 + ll0; /* [ 0 - 3 ] */ - assert(OFFBASE_IS_REPCODE(offBase)); - if (adjustedRepCode == ZSTD_REP_NUM) { - assert(ll0); - /* litlength == 0 and offCode == 2 implies selection of first repcode - 1 - * This is only valid if it results in a valid offset value, aka > 0. - * Note : it may happen that `rep[0]==1` in exceptional circumstances. - * In which case this function will return 0, which is an invalid offset. - * It's not an issue though, since this value will be - * compared and discarded within ZSTD_seqStore_resolveOffCodes(). - */ - return rep[0] - 1; - } - return rep[adjustedRepCode]; -} - -/** - * ZSTD_seqStore_resolveOffCodes() reconciles any possible divergences in offset history that may arise - * due to emission of RLE/raw blocks that disturb the offset history, - * and replaces any repcodes within the seqStore that may be invalid. - * - * dRepcodes are updated as would be on the decompression side. - * cRepcodes are updated exactly in accordance with the seqStore. - * - * Note : this function assumes seq->offBase respects the following numbering scheme : - * 0 : invalid - * 1-3 : repcode 1-3 - * 4+ : real_offset+3 - */ -static void -ZSTD_seqStore_resolveOffCodes(Repcodes_t* const dRepcodes, Repcodes_t* const cRepcodes, - const SeqStore_t* const seqStore, U32 const nbSeq) -{ - U32 idx = 0; - U32 const longLitLenIdx = seqStore->longLengthType == ZSTD_llt_literalLength ? seqStore->longLengthPos : nbSeq; - for (; idx < nbSeq; ++idx) { - SeqDef* const seq = seqStore->sequencesStart + idx; - U32 const ll0 = (seq->litLength == 0) && (idx != longLitLenIdx); - U32 const offBase = seq->offBase; - assert(offBase > 0); - if (OFFBASE_IS_REPCODE(offBase)) { - U32 const dRawOffset = ZSTD_resolveRepcodeToRawOffset(dRepcodes->rep, offBase, ll0); - U32 const cRawOffset = ZSTD_resolveRepcodeToRawOffset(cRepcodes->rep, offBase, ll0); - /* Adjust simulated decompression repcode history if we come across a mismatch. Replace - * the repcode with the offset it actually references, determined by the compression - * repcode history. - */ - if (dRawOffset != cRawOffset) { - seq->offBase = OFFSET_TO_OFFBASE(cRawOffset); - } - } - /* Compression repcode history is always updated with values directly from the unmodified seqStore. - * Decompression repcode history may use modified seq->offset value taken from compression repcode history. - */ - ZSTD_updateRep(dRepcodes->rep, seq->offBase, ll0); - ZSTD_updateRep(cRepcodes->rep, offBase, ll0); - } -} - -/* ZSTD_compressSeqStore_singleBlock(): - * Compresses a seqStore into a block with a block header, into the buffer dst. - * - * Returns the total size of that block (including header) or a ZSTD error code. - */ -static size_t -ZSTD_compressSeqStore_singleBlock(ZSTD_CCtx* zc, - const SeqStore_t* const seqStore, - Repcodes_t* const dRep, Repcodes_t* const cRep, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - U32 lastBlock, U32 isPartition) -{ - const U32 rleMaxLength = 25; - BYTE* op = (BYTE*)dst; - const BYTE* ip = (const BYTE*)src; - size_t cSize; - size_t cSeqsSize; - - /* In case of an RLE or raw block, the simulated decompression repcode history must be reset */ - Repcodes_t const dRepOriginal = *dRep; - DEBUGLOG(5, "ZSTD_compressSeqStore_singleBlock"); - if (isPartition) - ZSTD_seqStore_resolveOffCodes(dRep, cRep, seqStore, (U32)(seqStore->sequences - seqStore->sequencesStart)); - - RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "Block header doesn't fit"); - cSeqsSize = ZSTD_entropyCompressSeqStore(seqStore, - &zc->blockState.prevCBlock->entropy, &zc->blockState.nextCBlock->entropy, - &zc->appliedParams, - op + ZSTD_blockHeaderSize, dstCapacity - ZSTD_blockHeaderSize, - srcSize, - zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */, - zc->bmi2); - FORWARD_IF_ERROR(cSeqsSize, "ZSTD_entropyCompressSeqStore failed!"); - - if (!zc->isFirstBlock && - cSeqsSize < rleMaxLength && - ZSTD_isRLE((BYTE const*)src, srcSize)) { - /* We don't want to emit our first block as a RLE even if it qualifies because - * doing so will cause the decoder (cli only) to throw a "should consume all input error." - * This is only an issue for zstd <= v1.4.3 - */ - cSeqsSize = 1; - } - - /* Sequence collection not supported when block splitting */ - if (zc->seqCollector.collectSequences) { - FORWARD_IF_ERROR(ZSTD_copyBlockSequences(&zc->seqCollector, seqStore, dRepOriginal.rep), "copyBlockSequences failed"); - ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); - return 0; - } - - if (cSeqsSize == 0) { - cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, srcSize, lastBlock); - FORWARD_IF_ERROR(cSize, "Nocompress block failed"); - DEBUGLOG(5, "Writing out nocompress block, size: %zu", cSize); - *dRep = dRepOriginal; /* reset simulated decompression repcode history */ - } else if (cSeqsSize == 1) { - cSize = ZSTD_rleCompressBlock(op, dstCapacity, *ip, srcSize, lastBlock); - FORWARD_IF_ERROR(cSize, "RLE compress block failed"); - DEBUGLOG(5, "Writing out RLE block, size: %zu", cSize); - *dRep = dRepOriginal; /* reset simulated decompression repcode history */ - } else { - ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); - writeBlockHeader(op, cSeqsSize, srcSize, lastBlock); - cSize = ZSTD_blockHeaderSize + cSeqsSize; - DEBUGLOG(5, "Writing out compressed block, size: %zu", cSize); - } - - if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - - return cSize; -} - -/* Struct to keep track of where we are in our recursive calls. */ -typedef struct { - U32* splitLocations; /* Array of split indices */ - size_t idx; /* The current index within splitLocations being worked on */ -} seqStoreSplits; - -#define MIN_SEQUENCES_BLOCK_SPLITTING 300 - -/* Helper function to perform the recursive search for block splits. - * Estimates the cost of seqStore prior to split, and estimates the cost of splitting the sequences in half. - * If advantageous to split, then we recurse down the two sub-blocks. - * If not, or if an error occurred in estimation, then we do not recurse. - * - * Note: The recursion depth is capped by a heuristic minimum number of sequences, - * defined by MIN_SEQUENCES_BLOCK_SPLITTING. - * In theory, this means the absolute largest recursion depth is 10 == log2(maxNbSeqInBlock/MIN_SEQUENCES_BLOCK_SPLITTING). - * In practice, recursion depth usually doesn't go beyond 4. - * - * Furthermore, the number of splits is capped by ZSTD_MAX_NB_BLOCK_SPLITS. - * At ZSTD_MAX_NB_BLOCK_SPLITS == 196 with the current existing blockSize - * maximum of 128 KB, this value is actually impossible to reach. - */ -static void -ZSTD_deriveBlockSplitsHelper(seqStoreSplits* splits, size_t startIdx, size_t endIdx, - ZSTD_CCtx* zc, const SeqStore_t* origSeqStore) -{ - SeqStore_t* const fullSeqStoreChunk = &zc->blockSplitCtx.fullSeqStoreChunk; - SeqStore_t* const firstHalfSeqStore = &zc->blockSplitCtx.firstHalfSeqStore; - SeqStore_t* const secondHalfSeqStore = &zc->blockSplitCtx.secondHalfSeqStore; - size_t estimatedOriginalSize; - size_t estimatedFirstHalfSize; - size_t estimatedSecondHalfSize; - size_t midIdx = (startIdx + endIdx)/2; - - DEBUGLOG(5, "ZSTD_deriveBlockSplitsHelper: startIdx=%zu endIdx=%zu", startIdx, endIdx); - assert(endIdx >= startIdx); - if (endIdx - startIdx < MIN_SEQUENCES_BLOCK_SPLITTING || splits->idx >= ZSTD_MAX_NB_BLOCK_SPLITS) { - DEBUGLOG(6, "ZSTD_deriveBlockSplitsHelper: Too few sequences (%zu)", endIdx - startIdx); - return; - } - ZSTD_deriveSeqStoreChunk(fullSeqStoreChunk, origSeqStore, startIdx, endIdx); - ZSTD_deriveSeqStoreChunk(firstHalfSeqStore, origSeqStore, startIdx, midIdx); - ZSTD_deriveSeqStoreChunk(secondHalfSeqStore, origSeqStore, midIdx, endIdx); - estimatedOriginalSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(fullSeqStoreChunk, zc); - estimatedFirstHalfSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(firstHalfSeqStore, zc); - estimatedSecondHalfSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(secondHalfSeqStore, zc); - DEBUGLOG(5, "Estimated original block size: %zu -- First half split: %zu -- Second half split: %zu", - estimatedOriginalSize, estimatedFirstHalfSize, estimatedSecondHalfSize); - if (ZSTD_isError(estimatedOriginalSize) || ZSTD_isError(estimatedFirstHalfSize) || ZSTD_isError(estimatedSecondHalfSize)) { - return; - } - if (estimatedFirstHalfSize + estimatedSecondHalfSize < estimatedOriginalSize) { - DEBUGLOG(5, "split decided at seqNb:%zu", midIdx); - ZSTD_deriveBlockSplitsHelper(splits, startIdx, midIdx, zc, origSeqStore); - splits->splitLocations[splits->idx] = (U32)midIdx; - splits->idx++; - ZSTD_deriveBlockSplitsHelper(splits, midIdx, endIdx, zc, origSeqStore); - } -} - -/* Base recursive function. - * Populates a table with intra-block partition indices that can improve compression ratio. - * - * @return: number of splits made (which equals the size of the partition table - 1). - */ -static size_t ZSTD_deriveBlockSplits(ZSTD_CCtx* zc, U32 partitions[], U32 nbSeq) -{ - seqStoreSplits splits; - splits.splitLocations = partitions; - splits.idx = 0; - if (nbSeq <= 4) { - DEBUGLOG(5, "ZSTD_deriveBlockSplits: Too few sequences to split (%u <= 4)", nbSeq); - /* Refuse to try and split anything with less than 4 sequences */ - return 0; - } - ZSTD_deriveBlockSplitsHelper(&splits, 0, nbSeq, zc, &zc->seqStore); - splits.splitLocations[splits.idx] = nbSeq; - DEBUGLOG(5, "ZSTD_deriveBlockSplits: final nb partitions: %zu", splits.idx+1); - return splits.idx; -} - -/* ZSTD_compressBlock_splitBlock(): - * Attempts to split a given block into multiple blocks to improve compression ratio. - * - * Returns combined size of all blocks (which includes headers), or a ZSTD error code. - */ -static size_t -ZSTD_compressBlock_splitBlock_internal(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t blockSize, - U32 lastBlock, U32 nbSeq) -{ - size_t cSize = 0; - const BYTE* ip = (const BYTE*)src; - BYTE* op = (BYTE*)dst; - size_t i = 0; - size_t srcBytesTotal = 0; - U32* const partitions = zc->blockSplitCtx.partitions; /* size == ZSTD_MAX_NB_BLOCK_SPLITS */ - SeqStore_t* const nextSeqStore = &zc->blockSplitCtx.nextSeqStore; - SeqStore_t* const currSeqStore = &zc->blockSplitCtx.currSeqStore; - size_t const numSplits = ZSTD_deriveBlockSplits(zc, partitions, nbSeq); - - /* If a block is split and some partitions are emitted as RLE/uncompressed, then repcode history - * may become invalid. In order to reconcile potentially invalid repcodes, we keep track of two - * separate repcode histories that simulate repcode history on compression and decompression side, - * and use the histories to determine whether we must replace a particular repcode with its raw offset. - * - * 1) cRep gets updated for each partition, regardless of whether the block was emitted as uncompressed - * or RLE. This allows us to retrieve the offset value that an invalid repcode references within - * a nocompress/RLE block. - * 2) dRep gets updated only for compressed partitions, and when a repcode gets replaced, will use - * the replacement offset value rather than the original repcode to update the repcode history. - * dRep also will be the final repcode history sent to the next block. - * - * See ZSTD_seqStore_resolveOffCodes() for more details. - */ - Repcodes_t dRep; - Repcodes_t cRep; - ZSTD_memcpy(dRep.rep, zc->blockState.prevCBlock->rep, sizeof(Repcodes_t)); - ZSTD_memcpy(cRep.rep, zc->blockState.prevCBlock->rep, sizeof(Repcodes_t)); - ZSTD_memset(nextSeqStore, 0, sizeof(SeqStore_t)); - - DEBUGLOG(5, "ZSTD_compressBlock_splitBlock_internal (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u)", - (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, - (unsigned)zc->blockState.matchState.nextToUpdate); - - if (numSplits == 0) { - size_t cSizeSingleBlock = - ZSTD_compressSeqStore_singleBlock(zc, &zc->seqStore, - &dRep, &cRep, - op, dstCapacity, - ip, blockSize, - lastBlock, 0 /* isPartition */); - FORWARD_IF_ERROR(cSizeSingleBlock, "Compressing single block from splitBlock_internal() failed!"); - DEBUGLOG(5, "ZSTD_compressBlock_splitBlock_internal: No splits"); - assert(zc->blockSizeMax <= ZSTD_BLOCKSIZE_MAX); - assert(cSizeSingleBlock <= zc->blockSizeMax + ZSTD_blockHeaderSize); - return cSizeSingleBlock; - } - - ZSTD_deriveSeqStoreChunk(currSeqStore, &zc->seqStore, 0, partitions[0]); - for (i = 0; i <= numSplits; ++i) { - size_t cSizeChunk; - U32 const lastPartition = (i == numSplits); - U32 lastBlockEntireSrc = 0; - - size_t srcBytes = ZSTD_countSeqStoreLiteralsBytes(currSeqStore) + ZSTD_countSeqStoreMatchBytes(currSeqStore); - srcBytesTotal += srcBytes; - if (lastPartition) { - /* This is the final partition, need to account for possible last literals */ - srcBytes += blockSize - srcBytesTotal; - lastBlockEntireSrc = lastBlock; - } else { - ZSTD_deriveSeqStoreChunk(nextSeqStore, &zc->seqStore, partitions[i], partitions[i+1]); - } - - cSizeChunk = ZSTD_compressSeqStore_singleBlock(zc, currSeqStore, - &dRep, &cRep, - op, dstCapacity, - ip, srcBytes, - lastBlockEntireSrc, 1 /* isPartition */); - DEBUGLOG(5, "Estimated size: %zu vs %zu : actual size", - ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(currSeqStore, zc), cSizeChunk); - FORWARD_IF_ERROR(cSizeChunk, "Compressing chunk failed!"); - - ip += srcBytes; - op += cSizeChunk; - dstCapacity -= cSizeChunk; - cSize += cSizeChunk; - *currSeqStore = *nextSeqStore; - assert(cSizeChunk <= zc->blockSizeMax + ZSTD_blockHeaderSize); - } - /* cRep and dRep may have diverged during the compression. - * If so, we use the dRep repcodes for the next block. - */ - ZSTD_memcpy(zc->blockState.prevCBlock->rep, dRep.rep, sizeof(Repcodes_t)); - return cSize; -} - -static size_t -ZSTD_compressBlock_splitBlock(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, U32 lastBlock) -{ - U32 nbSeq; - size_t cSize; - DEBUGLOG(5, "ZSTD_compressBlock_splitBlock"); - assert(zc->appliedParams.postBlockSplitter == ZSTD_ps_enable); - - { const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); - FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); - if (bss == ZSTDbss_noCompress) { - if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - RETURN_ERROR_IF(zc->seqCollector.collectSequences, sequenceProducer_failed, "Uncompressible block"); - cSize = ZSTD_noCompressBlock(dst, dstCapacity, src, srcSize, lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); - DEBUGLOG(5, "ZSTD_compressBlock_splitBlock: Nocompress block"); - return cSize; - } - nbSeq = (U32)(zc->seqStore.sequences - zc->seqStore.sequencesStart); - } - - cSize = ZSTD_compressBlock_splitBlock_internal(zc, dst, dstCapacity, src, srcSize, lastBlock, nbSeq); - FORWARD_IF_ERROR(cSize, "Splitting blocks failed!"); - return cSize; -} - -static size_t -ZSTD_compressBlock_internal(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, U32 frame) -{ - /* This is an estimated upper bound for the length of an rle block. - * This isn't the actual upper bound. - * Finding the real threshold needs further investigation. - */ - const U32 rleMaxLength = 25; - size_t cSize; - const BYTE* ip = (const BYTE*)src; - BYTE* op = (BYTE*)dst; - DEBUGLOG(5, "ZSTD_compressBlock_internal (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u)", - (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, - (unsigned)zc->blockState.matchState.nextToUpdate); - - { const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); - FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); - if (bss == ZSTDbss_noCompress) { - RETURN_ERROR_IF(zc->seqCollector.collectSequences, sequenceProducer_failed, "Uncompressible block"); - cSize = 0; - goto out; - } - } - - if (zc->seqCollector.collectSequences) { - FORWARD_IF_ERROR(ZSTD_copyBlockSequences(&zc->seqCollector, ZSTD_getSeqStore(zc), zc->blockState.prevCBlock->rep), "copyBlockSequences failed"); - ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); - return 0; - } - - /* encode sequences and literals */ - cSize = ZSTD_entropyCompressSeqStore(&zc->seqStore, - &zc->blockState.prevCBlock->entropy, &zc->blockState.nextCBlock->entropy, - &zc->appliedParams, - dst, dstCapacity, - srcSize, - zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */, - zc->bmi2); - - if (frame && - /* We don't want to emit our first block as a RLE even if it qualifies because - * doing so will cause the decoder (cli only) to throw a "should consume all input error." - * This is only an issue for zstd <= v1.4.3 - */ - !zc->isFirstBlock && - cSize < rleMaxLength && - ZSTD_isRLE(ip, srcSize)) - { - cSize = 1; - op[0] = ip[0]; - } - -out: - if (!ZSTD_isError(cSize) && cSize > 1) { - ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); - } - /* We check that dictionaries have offset codes available for the first - * block. After the first block, the offcode table might not have large - * enough codes to represent the offsets in the data. - */ - if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - - return cSize; -} - -static size_t ZSTD_compressBlock_targetCBlockSize_body(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const size_t bss, U32 lastBlock) -{ - DEBUGLOG(6, "Attempting ZSTD_compressSuperBlock()"); - if (bss == ZSTDbss_compress) { - if (/* We don't want to emit our first block as a RLE even if it qualifies because - * doing so will cause the decoder (cli only) to throw a "should consume all input error." - * This is only an issue for zstd <= v1.4.3 - */ - !zc->isFirstBlock && - ZSTD_maybeRLE(&zc->seqStore) && - ZSTD_isRLE((BYTE const*)src, srcSize)) - { - return ZSTD_rleCompressBlock(dst, dstCapacity, *(BYTE const*)src, srcSize, lastBlock); - } - /* Attempt superblock compression. - * - * Note that compressed size of ZSTD_compressSuperBlock() is not bound by the - * standard ZSTD_compressBound(). This is a problem, because even if we have - * space now, taking an extra byte now could cause us to run out of space later - * and violate ZSTD_compressBound(). - * - * Define blockBound(blockSize) = blockSize + ZSTD_blockHeaderSize. - * - * In order to respect ZSTD_compressBound() we must attempt to emit a raw - * uncompressed block in these cases: - * * cSize == 0: Return code for an uncompressed block. - * * cSize == dstSize_tooSmall: We may have expanded beyond blockBound(srcSize). - * ZSTD_noCompressBlock() will return dstSize_tooSmall if we are really out of - * output space. - * * cSize >= blockBound(srcSize): We have expanded the block too much so - * emit an uncompressed block. - */ - { size_t const cSize = - ZSTD_compressSuperBlock(zc, dst, dstCapacity, src, srcSize, lastBlock); - if (cSize != ERROR(dstSize_tooSmall)) { - size_t const maxCSize = - srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy); - FORWARD_IF_ERROR(cSize, "ZSTD_compressSuperBlock failed"); - if (cSize != 0 && cSize < maxCSize + ZSTD_blockHeaderSize) { - ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); - return cSize; - } - } - } - } /* if (bss == ZSTDbss_compress)*/ - - DEBUGLOG(6, "Resorting to ZSTD_noCompressBlock()"); - /* Superblock compression failed, attempt to emit a single no compress block. - * The decoder will be able to stream this block since it is uncompressed. - */ - return ZSTD_noCompressBlock(dst, dstCapacity, src, srcSize, lastBlock); -} - -static size_t ZSTD_compressBlock_targetCBlockSize(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - U32 lastBlock) -{ - size_t cSize = 0; - const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); - DEBUGLOG(5, "ZSTD_compressBlock_targetCBlockSize (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u, srcSize=%zu)", - (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, (unsigned)zc->blockState.matchState.nextToUpdate, srcSize); - FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); - - cSize = ZSTD_compressBlock_targetCBlockSize_body(zc, dst, dstCapacity, src, srcSize, bss, lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize_body failed"); - - if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - - return cSize; -} - -static void ZSTD_overflowCorrectIfNeeded(ZSTD_MatchState_t* ms, - ZSTD_cwksp* ws, - ZSTD_CCtx_params const* params, - void const* ip, - void const* iend) -{ - U32 const cycleLog = ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy); - U32 const maxDist = (U32)1 << params->cParams.windowLog; - if (ZSTD_window_needOverflowCorrection(ms->window, cycleLog, maxDist, ms->loadedDictEnd, ip, iend)) { - U32 const correction = ZSTD_window_correctOverflow(&ms->window, cycleLog, maxDist, ip); - ZSTD_STATIC_ASSERT(ZSTD_CHAINLOG_MAX <= 30); - ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX_32 <= 30); - ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX <= 31); - ZSTD_cwksp_mark_tables_dirty(ws); - ZSTD_reduceIndex(ms, params, correction); - ZSTD_cwksp_mark_tables_clean(ws); - if (ms->nextToUpdate < correction) ms->nextToUpdate = 0; - else ms->nextToUpdate -= correction; - /* invalidate dictionaries on overflow correction */ - ms->loadedDictEnd = 0; - ms->dictMatchState = NULL; - } -} - -#include "zstd_preSplit.h" - -static size_t ZSTD_optimalBlockSize(ZSTD_CCtx* cctx, const void* src, size_t srcSize, size_t blockSizeMax, int splitLevel, ZSTD_strategy strat, S64 savings) -{ - /* split level based on compression strategy, from `fast` to `btultra2` */ - static const int splitLevels[] = { 0, 0, 1, 2, 2, 3, 3, 4, 4, 4 }; - /* note: conservatively only split full blocks (128 KB) currently. - * While it's possible to go lower, let's keep it simple for a first implementation. - * Besides, benefits of splitting are reduced when blocks are already small. - */ - if (srcSize < 128 KB || blockSizeMax < 128 KB) - return MIN(srcSize, blockSizeMax); - /* do not split incompressible data though: - * require verified savings to allow pre-splitting. - * Note: as a consequence, the first full block is not split. - */ - if (savings < 3) { - DEBUGLOG(6, "don't attempt splitting: savings (%i) too low", (int)savings); - return 128 KB; - } - /* apply @splitLevel, or use default value (which depends on @strat). - * note that splitting heuristic is still conditioned by @savings >= 3, - * so the first block will not reach this code path */ - if (splitLevel == 1) return 128 KB; - if (splitLevel == 0) { - assert(ZSTD_fast <= strat && strat <= ZSTD_btultra2); - splitLevel = splitLevels[strat]; - } else { - assert(2 <= splitLevel && splitLevel <= 6); - splitLevel -= 2; - } - return ZSTD_splitBlock(src, blockSizeMax, splitLevel, cctx->tmpWorkspace, cctx->tmpWkspSize); -} - -/*! ZSTD_compress_frameChunk() : -* Compress a chunk of data into one or multiple blocks. -* All blocks will be terminated, all input will be consumed. -* Function will issue an error if there is not enough `dstCapacity` to hold the compressed content. -* Frame is supposed already started (header already produced) -* @return : compressed size, or an error code -*/ -static size_t ZSTD_compress_frameChunk(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - U32 lastFrameChunk) -{ - size_t blockSizeMax = cctx->blockSizeMax; - size_t remaining = srcSize; - const BYTE* ip = (const BYTE*)src; - BYTE* const ostart = (BYTE*)dst; - BYTE* op = ostart; - U32 const maxDist = (U32)1 << cctx->appliedParams.cParams.windowLog; - S64 savings = (S64)cctx->consumedSrcSize - (S64)cctx->producedCSize; - - assert(cctx->appliedParams.cParams.windowLog <= ZSTD_WINDOWLOG_MAX); - - DEBUGLOG(5, "ZSTD_compress_frameChunk (srcSize=%u, blockSizeMax=%u)", (unsigned)srcSize, (unsigned)blockSizeMax); - if (cctx->appliedParams.fParams.checksumFlag && srcSize) - XXH64_update(&cctx->xxhState, src, srcSize); - - while (remaining) { - ZSTD_MatchState_t* const ms = &cctx->blockState.matchState; - size_t const blockSize = ZSTD_optimalBlockSize(cctx, - ip, remaining, - blockSizeMax, - cctx->appliedParams.preBlockSplitter_level, - cctx->appliedParams.cParams.strategy, - savings); - U32 const lastBlock = lastFrameChunk & (blockSize == remaining); - assert(blockSize <= remaining); - - /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding - * additional 1. We need to revisit and change this logic to be more consistent */ - RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize + MIN_CBLOCK_SIZE + 1, - dstSize_tooSmall, - "not enough space to store compressed block"); - - ZSTD_overflowCorrectIfNeeded( - ms, &cctx->workspace, &cctx->appliedParams, ip, ip + blockSize); - ZSTD_checkDictValidity(&ms->window, ip + blockSize, maxDist, &ms->loadedDictEnd, &ms->dictMatchState); - ZSTD_window_enforceMaxDist(&ms->window, ip, maxDist, &ms->loadedDictEnd, &ms->dictMatchState); - - /* Ensure hash/chain table insertion resumes no sooner than lowlimit */ - if (ms->nextToUpdate < ms->window.lowLimit) ms->nextToUpdate = ms->window.lowLimit; - - { size_t cSize; - if (ZSTD_useTargetCBlockSize(&cctx->appliedParams)) { - cSize = ZSTD_compressBlock_targetCBlockSize(cctx, op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize failed"); - assert(cSize > 0); - assert(cSize <= blockSize + ZSTD_blockHeaderSize); - } else if (ZSTD_blockSplitterEnabled(&cctx->appliedParams)) { - cSize = ZSTD_compressBlock_splitBlock(cctx, op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_splitBlock failed"); - assert(cSize > 0 || cctx->seqCollector.collectSequences == 1); - } else { - cSize = ZSTD_compressBlock_internal(cctx, - op+ZSTD_blockHeaderSize, dstCapacity-ZSTD_blockHeaderSize, - ip, blockSize, 1 /* frame */); - FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_internal failed"); - - if (cSize == 0) { /* block is not compressible */ - cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); - } else { - U32 const cBlockHeader = cSize == 1 ? - lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : - lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); - MEM_writeLE24(op, cBlockHeader); - cSize += ZSTD_blockHeaderSize; - } - } /* if (ZSTD_useTargetCBlockSize(&cctx->appliedParams))*/ - - /* @savings is employed to ensure that splitting doesn't worsen expansion of incompressible data. - * Without splitting, the maximum expansion is 3 bytes per full block. - * An adversarial input could attempt to fudge the split detector, - * and make it split incompressible data, resulting in more block headers. - * Note that, since ZSTD_COMPRESSBOUND() assumes a worst case scenario of 1KB per block, - * and the splitter never creates blocks that small (current lower limit is 8 KB), - * there is already no risk to expand beyond ZSTD_COMPRESSBOUND() limit. - * But if the goal is to not expand by more than 3-bytes per 128 KB full block, - * then yes, it becomes possible to make the block splitter oversplit incompressible data. - * Using @savings, we enforce an even more conservative condition, - * requiring the presence of enough savings (at least 3 bytes) to authorize splitting, - * otherwise only full blocks are used. - * But being conservative is fine, - * since splitting barely compressible blocks is not fruitful anyway */ - savings += (S64)blockSize - (S64)cSize; - - ip += blockSize; - assert(remaining >= blockSize); - remaining -= blockSize; - op += cSize; - assert(dstCapacity >= cSize); - dstCapacity -= cSize; - cctx->isFirstBlock = 0; - DEBUGLOG(5, "ZSTD_compress_frameChunk: adding a block of size %u", - (unsigned)cSize); - } } - - if (lastFrameChunk && (op>ostart)) cctx->stage = ZSTDcs_ending; - return (size_t)(op-ostart); -} - - -static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity, - const ZSTD_CCtx_params* params, - U64 pledgedSrcSize, U32 dictID) -{ - BYTE* const op = (BYTE*)dst; - U32 const dictIDSizeCodeLength = (dictID>0) + (dictID>=256) + (dictID>=65536); /* 0-3 */ - U32 const dictIDSizeCode = params->fParams.noDictIDFlag ? 0 : dictIDSizeCodeLength; /* 0-3 */ - U32 const checksumFlag = params->fParams.checksumFlag>0; - U32 const windowSize = (U32)1 << params->cParams.windowLog; - U32 const singleSegment = params->fParams.contentSizeFlag && (windowSize >= pledgedSrcSize); - BYTE const windowLogByte = (BYTE)((params->cParams.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN) << 3); - U32 const fcsCode = params->fParams.contentSizeFlag ? - (pledgedSrcSize>=256) + (pledgedSrcSize>=65536+256) + (pledgedSrcSize>=0xFFFFFFFFU) : 0; /* 0-3 */ - BYTE const frameHeaderDescriptionByte = (BYTE)(dictIDSizeCode + (checksumFlag<<2) + (singleSegment<<5) + (fcsCode<<6) ); - size_t pos=0; - - assert(!(params->fParams.contentSizeFlag && pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)); - RETURN_ERROR_IF(dstCapacity < ZSTD_FRAMEHEADERSIZE_MAX, dstSize_tooSmall, - "dst buf is too small to fit worst-case frame header size."); - DEBUGLOG(4, "ZSTD_writeFrameHeader : dictIDFlag : %u ; dictID : %u ; dictIDSizeCode : %u", - !params->fParams.noDictIDFlag, (unsigned)dictID, (unsigned)dictIDSizeCode); - if (params->format == ZSTD_f_zstd1) { - MEM_writeLE32(dst, ZSTD_MAGICNUMBER); - pos = 4; - } - op[pos++] = frameHeaderDescriptionByte; - if (!singleSegment) op[pos++] = windowLogByte; - switch(dictIDSizeCode) - { - default: - assert(0); /* impossible */ - ZSTD_FALLTHROUGH; - case 0 : break; - case 1 : op[pos] = (BYTE)(dictID); pos++; break; - case 2 : MEM_writeLE16(op+pos, (U16)dictID); pos+=2; break; - case 3 : MEM_writeLE32(op+pos, dictID); pos+=4; break; - } - switch(fcsCode) - { - default: - assert(0); /* impossible */ - ZSTD_FALLTHROUGH; - case 0 : if (singleSegment) op[pos++] = (BYTE)(pledgedSrcSize); break; - case 1 : MEM_writeLE16(op+pos, (U16)(pledgedSrcSize-256)); pos+=2; break; - case 2 : MEM_writeLE32(op+pos, (U32)(pledgedSrcSize)); pos+=4; break; - case 3 : MEM_writeLE64(op+pos, (U64)(pledgedSrcSize)); pos+=8; break; - } - return pos; -} - -/* ZSTD_writeSkippableFrame_advanced() : - * Writes out a skippable frame with the specified magic number variant (16 are supported), - * from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15, and the desired source data. - * - * Returns the total number of bytes written, or a ZSTD error code. - */ -size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity, - const void* src, size_t srcSize, unsigned magicVariant) { - BYTE* op = (BYTE*)dst; - RETURN_ERROR_IF(dstCapacity < srcSize + ZSTD_SKIPPABLEHEADERSIZE /* Skippable frame overhead */, - dstSize_tooSmall, "Not enough room for skippable frame"); - RETURN_ERROR_IF(srcSize > (unsigned)0xFFFFFFFF, srcSize_wrong, "Src size too large for skippable frame"); - RETURN_ERROR_IF(magicVariant > 15, parameter_outOfBound, "Skippable frame magic number variant not supported"); - - MEM_writeLE32(op, (U32)(ZSTD_MAGIC_SKIPPABLE_START + magicVariant)); - MEM_writeLE32(op+4, (U32)srcSize); - ZSTD_memcpy(op+8, src, srcSize); - return srcSize + ZSTD_SKIPPABLEHEADERSIZE; -} - -/* ZSTD_writeLastEmptyBlock() : - * output an empty Block with end-of-frame mark to complete a frame - * @return : size of data written into `dst` (== ZSTD_blockHeaderSize (defined in zstd_internal.h)) - * or an error code if `dstCapacity` is too small (stage == ZSTDcs_init); - assert(nbSeq == 0 || cctx->appliedParams.ldmParams.enableLdm != ZSTD_ps_enable); - cctx->externSeqStore.seq = seq; - cctx->externSeqStore.size = nbSeq; - cctx->externSeqStore.capacity = nbSeq; - cctx->externSeqStore.pos = 0; - cctx->externSeqStore.posInSequence = 0; -} - - -static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - U32 frame, U32 lastFrameChunk) -{ - ZSTD_MatchState_t* const ms = &cctx->blockState.matchState; - size_t fhSize = 0; - - DEBUGLOG(5, "ZSTD_compressContinue_internal, stage: %u, srcSize: %u", - cctx->stage, (unsigned)srcSize); - RETURN_ERROR_IF(cctx->stage==ZSTDcs_created, stage_wrong, - "missing init (ZSTD_compressBegin)"); - - if (frame && (cctx->stage==ZSTDcs_init)) { - fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, - cctx->pledgedSrcSizePlusOne-1, cctx->dictID); - FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); - assert(fhSize <= dstCapacity); - dstCapacity -= fhSize; - dst = (char*)dst + fhSize; - cctx->stage = ZSTDcs_ongoing; - } - - if (!srcSize) return fhSize; /* do not generate an empty block if no input */ - - if (!ZSTD_window_update(&ms->window, src, srcSize, ms->forceNonContiguous)) { - ms->forceNonContiguous = 0; - ms->nextToUpdate = ms->window.dictLimit; - } - if (cctx->appliedParams.ldmParams.enableLdm == ZSTD_ps_enable) { - ZSTD_window_update(&cctx->ldmState.window, src, srcSize, /* forceNonContiguous */ 0); - } - - if (!frame) { - /* overflow check and correction for block mode */ - ZSTD_overflowCorrectIfNeeded( - ms, &cctx->workspace, &cctx->appliedParams, - src, (BYTE const*)src + srcSize); - } - - DEBUGLOG(5, "ZSTD_compressContinue_internal (blockSize=%u)", (unsigned)cctx->blockSizeMax); - { size_t const cSize = frame ? - ZSTD_compress_frameChunk (cctx, dst, dstCapacity, src, srcSize, lastFrameChunk) : - ZSTD_compressBlock_internal (cctx, dst, dstCapacity, src, srcSize, 0 /* frame */); - FORWARD_IF_ERROR(cSize, "%s", frame ? "ZSTD_compress_frameChunk failed" : "ZSTD_compressBlock_internal failed"); - cctx->consumedSrcSize += srcSize; - cctx->producedCSize += (cSize + fhSize); - assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); - if (cctx->pledgedSrcSizePlusOne != 0) { /* control src size */ - ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN == (unsigned long long)-1); - RETURN_ERROR_IF( - cctx->consumedSrcSize+1 > cctx->pledgedSrcSizePlusOne, - srcSize_wrong, - "error : pledgedSrcSize = %u, while realSrcSize >= %u", - (unsigned)cctx->pledgedSrcSizePlusOne-1, - (unsigned)cctx->consumedSrcSize); - } - return cSize + fhSize; - } -} - -size_t ZSTD_compressContinue_public(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_compressContinue (srcSize=%u)", (unsigned)srcSize); - return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 1 /* frame mode */, 0 /* last chunk */); -} - -/* NOTE: Must just wrap ZSTD_compressContinue_public() */ -size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - return ZSTD_compressContinue_public(cctx, dst, dstCapacity, src, srcSize); -} - -static size_t ZSTD_getBlockSize_deprecated(const ZSTD_CCtx* cctx) -{ - ZSTD_compressionParameters const cParams = cctx->appliedParams.cParams; - assert(!ZSTD_checkCParams(cParams)); - return MIN(cctx->appliedParams.maxBlockSize, (size_t)1 << cParams.windowLog); -} - -/* NOTE: Must just wrap ZSTD_getBlockSize_deprecated() */ -size_t ZSTD_getBlockSize(const ZSTD_CCtx* cctx) -{ - return ZSTD_getBlockSize_deprecated(cctx); -} - -/* NOTE: Must just wrap ZSTD_compressBlock_deprecated() */ -size_t ZSTD_compressBlock_deprecated(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_compressBlock: srcSize = %u", (unsigned)srcSize); - { size_t const blockSizeMax = ZSTD_getBlockSize_deprecated(cctx); - RETURN_ERROR_IF(srcSize > blockSizeMax, srcSize_wrong, "input is larger than a block"); } - - return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 0 /* frame mode */, 0 /* last chunk */); -} - -/* NOTE: Must just wrap ZSTD_compressBlock_deprecated() */ -size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ - return ZSTD_compressBlock_deprecated(cctx, dst, dstCapacity, src, srcSize); -} - -/*! ZSTD_loadDictionaryContent() : - * @return : 0, or an error code - */ -static size_t -ZSTD_loadDictionaryContent(ZSTD_MatchState_t* ms, - ldmState_t* ls, - ZSTD_cwksp* ws, - ZSTD_CCtx_params const* params, - const void* src, size_t srcSize, - ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp) -{ - const BYTE* ip = (const BYTE*) src; - const BYTE* const iend = ip + srcSize; - int const loadLdmDict = params->ldmParams.enableLdm == ZSTD_ps_enable && ls != NULL; - - /* Assert that the ms params match the params we're being given */ - ZSTD_assertEqualCParams(params->cParams, ms->cParams); - - { /* Ensure large dictionaries can't cause index overflow */ - - /* Allow the dictionary to set indices up to exactly ZSTD_CURRENT_MAX. - * Dictionaries right at the edge will immediately trigger overflow - * correction, but I don't want to insert extra constraints here. - */ - U32 maxDictSize = ZSTD_CURRENT_MAX - ZSTD_WINDOW_START_INDEX; - - int const CDictTaggedIndices = ZSTD_CDictIndicesAreTagged(¶ms->cParams); - if (CDictTaggedIndices && tfp == ZSTD_tfp_forCDict) { - /* Some dictionary matchfinders in zstd use "short cache", - * which treats the lower ZSTD_SHORT_CACHE_TAG_BITS of each - * CDict hashtable entry as a tag rather than as part of an index. - * When short cache is used, we need to truncate the dictionary - * so that its indices don't overlap with the tag. */ - U32 const shortCacheMaxDictSize = (1u << (32 - ZSTD_SHORT_CACHE_TAG_BITS)) - ZSTD_WINDOW_START_INDEX; - maxDictSize = MIN(maxDictSize, shortCacheMaxDictSize); - assert(!loadLdmDict); - } - - /* If the dictionary is too large, only load the suffix of the dictionary. */ - if (srcSize > maxDictSize) { - ip = iend - maxDictSize; - src = ip; - srcSize = maxDictSize; - } - } - - if (srcSize > ZSTD_CHUNKSIZE_MAX) { - /* We must have cleared our windows when our source is this large. */ - assert(ZSTD_window_isEmpty(ms->window)); - if (loadLdmDict) assert(ZSTD_window_isEmpty(ls->window)); - } - ZSTD_window_update(&ms->window, src, srcSize, /* forceNonContiguous */ 0); - - DEBUGLOG(4, "ZSTD_loadDictionaryContent: useRowMatchFinder=%d", (int)params->useRowMatchFinder); - - if (loadLdmDict) { /* Load the entire dict into LDM matchfinders. */ - DEBUGLOG(4, "ZSTD_loadDictionaryContent: Trigger loadLdmDict"); - ZSTD_window_update(&ls->window, src, srcSize, /* forceNonContiguous */ 0); - ls->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ls->window.base); - ZSTD_ldm_fillHashTable(ls, ip, iend, ¶ms->ldmParams); - DEBUGLOG(4, "ZSTD_loadDictionaryContent: ZSTD_ldm_fillHashTable completes"); - } - - /* If the dict is larger than we can reasonably index in our tables, only load the suffix. */ - { U32 maxDictSize = 1U << MIN(MAX(params->cParams.hashLog + 3, params->cParams.chainLog + 1), 31); - if (srcSize > maxDictSize) { - ip = iend - maxDictSize; - src = ip; - srcSize = maxDictSize; - } - } - - ms->nextToUpdate = (U32)(ip - ms->window.base); - ms->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ms->window.base); - ms->forceNonContiguous = params->deterministicRefPrefix; - - if (srcSize <= HASH_READ_SIZE) return 0; - - ZSTD_overflowCorrectIfNeeded(ms, ws, params, ip, iend); - - switch(params->cParams.strategy) - { - case ZSTD_fast: - ZSTD_fillHashTable(ms, iend, dtlm, tfp); - break; - case ZSTD_dfast: -#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR - ZSTD_fillDoubleHashTable(ms, iend, dtlm, tfp); -#else - assert(0); /* shouldn't be called: cparams should've been adjusted. */ -#endif - break; - - case ZSTD_greedy: - case ZSTD_lazy: - case ZSTD_lazy2: -#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) - assert(srcSize >= HASH_READ_SIZE); - if (ms->dedicatedDictSearch) { - assert(ms->chainTable != NULL); - ZSTD_dedicatedDictSearch_lazy_loadDictionary(ms, iend-HASH_READ_SIZE); - } else { - assert(params->useRowMatchFinder != ZSTD_ps_auto); - if (params->useRowMatchFinder == ZSTD_ps_enable) { - size_t const tagTableSize = ((size_t)1 << params->cParams.hashLog); - ZSTD_memset(ms->tagTable, 0, tagTableSize); - ZSTD_row_update(ms, iend-HASH_READ_SIZE); - DEBUGLOG(4, "Using row-based hash table for lazy dict"); - } else { - ZSTD_insertAndFindFirstIndex(ms, iend-HASH_READ_SIZE); - DEBUGLOG(4, "Using chain-based hash table for lazy dict"); - } - } -#else - assert(0); /* shouldn't be called: cparams should've been adjusted. */ -#endif - break; - - case ZSTD_btlazy2: /* we want the dictionary table fully sorted */ - case ZSTD_btopt: - case ZSTD_btultra: - case ZSTD_btultra2: -#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) - assert(srcSize >= HASH_READ_SIZE); - DEBUGLOG(4, "Fill %u bytes into the Binary Tree", (unsigned)srcSize); - ZSTD_updateTree(ms, iend-HASH_READ_SIZE, iend); -#else - assert(0); /* shouldn't be called: cparams should've been adjusted. */ -#endif - break; - - default: - assert(0); /* not possible : not a valid strategy id */ - } - - ms->nextToUpdate = (U32)(iend - ms->window.base); - return 0; -} - - -/* Dictionaries that assign zero probability to symbols that show up causes problems - * when FSE encoding. Mark dictionaries with zero probability symbols as FSE_repeat_check - * and only dictionaries with 100% valid symbols can be assumed valid. - */ -static FSE_repeat ZSTD_dictNCountRepeat(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) -{ - U32 s; - if (dictMaxSymbolValue < maxSymbolValue) { - return FSE_repeat_check; - } - for (s = 0; s <= maxSymbolValue; ++s) { - if (normalizedCounter[s] == 0) { - return FSE_repeat_check; - } - } - return FSE_repeat_valid; -} - -size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, - const void* const dict, size_t dictSize) -{ - short offcodeNCount[MaxOff+1]; - unsigned offcodeMaxValue = MaxOff; - const BYTE* dictPtr = (const BYTE*)dict; /* skip magic num and dict ID */ - const BYTE* const dictEnd = dictPtr + dictSize; - dictPtr += 8; - bs->entropy.huf.repeatMode = HUF_repeat_check; - - { unsigned maxSymbolValue = 255; - unsigned hasZeroWeights = 1; - size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)bs->entropy.huf.CTable, &maxSymbolValue, dictPtr, - (size_t)(dictEnd-dictPtr), &hasZeroWeights); - - /* We only set the loaded table as valid if it contains all non-zero - * weights. Otherwise, we set it to check */ - if (!hasZeroWeights && maxSymbolValue == 255) - bs->entropy.huf.repeatMode = HUF_repeat_valid; - - RETURN_ERROR_IF(HUF_isError(hufHeaderSize), dictionary_corrupted, ""); - dictPtr += hufHeaderSize; - } - - { unsigned offcodeLog; - size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); - /* fill all offset symbols to avoid garbage at end of table */ - RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( - bs->entropy.fse.offcodeCTable, - offcodeNCount, MaxOff, offcodeLog, - workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted, ""); - /* Defer checking offcodeMaxValue because we need to know the size of the dictionary content */ - dictPtr += offcodeHeaderSize; - } - - { short matchlengthNCount[MaxML+1]; - unsigned matchlengthMaxValue = MaxML, matchlengthLog; - size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); - RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( - bs->entropy.fse.matchlengthCTable, - matchlengthNCount, matchlengthMaxValue, matchlengthLog, - workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted, ""); - bs->entropy.fse.matchlength_repeatMode = ZSTD_dictNCountRepeat(matchlengthNCount, matchlengthMaxValue, MaxML); - dictPtr += matchlengthHeaderSize; - } - - { short litlengthNCount[MaxLL+1]; - unsigned litlengthMaxValue = MaxLL, litlengthLog; - size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); - RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( - bs->entropy.fse.litlengthCTable, - litlengthNCount, litlengthMaxValue, litlengthLog, - workspace, HUF_WORKSPACE_SIZE)), - dictionary_corrupted, ""); - bs->entropy.fse.litlength_repeatMode = ZSTD_dictNCountRepeat(litlengthNCount, litlengthMaxValue, MaxLL); - dictPtr += litlengthHeaderSize; - } - - RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); - bs->rep[0] = MEM_readLE32(dictPtr+0); - bs->rep[1] = MEM_readLE32(dictPtr+4); - bs->rep[2] = MEM_readLE32(dictPtr+8); - dictPtr += 12; - - { size_t const dictContentSize = (size_t)(dictEnd - dictPtr); - U32 offcodeMax = MaxOff; - if (dictContentSize <= ((U32)-1) - 128 KB) { - U32 const maxOffset = (U32)dictContentSize + 128 KB; /* The maximum offset that must be supported */ - offcodeMax = ZSTD_highbit32(maxOffset); /* Calculate minimum offset code required to represent maxOffset */ - } - /* All offset values <= dictContentSize + 128 KB must be representable for a valid table */ - bs->entropy.fse.offcode_repeatMode = ZSTD_dictNCountRepeat(offcodeNCount, offcodeMaxValue, MIN(offcodeMax, MaxOff)); - - /* All repCodes must be <= dictContentSize and != 0 */ - { U32 u; - for (u=0; u<3; u++) { - RETURN_ERROR_IF(bs->rep[u] == 0, dictionary_corrupted, ""); - RETURN_ERROR_IF(bs->rep[u] > dictContentSize, dictionary_corrupted, ""); - } } } - - return (size_t)(dictPtr - (const BYTE*)dict); -} - -/* Dictionary format : - * See : - * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#dictionary-format - */ -/*! ZSTD_loadZstdDictionary() : - * @return : dictID, or an error code - * assumptions : magic number supposed already checked - * dictSize supposed >= 8 - */ -static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, - ZSTD_MatchState_t* ms, - ZSTD_cwksp* ws, - ZSTD_CCtx_params const* params, - const void* dict, size_t dictSize, - ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp, - void* workspace) -{ - const BYTE* dictPtr = (const BYTE*)dict; - const BYTE* const dictEnd = dictPtr + dictSize; - size_t dictID; - size_t eSize; - ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<= 8); - assert(MEM_readLE32(dictPtr) == ZSTD_MAGIC_DICTIONARY); - - dictID = params->fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr + 4 /* skip magic number */ ); - eSize = ZSTD_loadCEntropy(bs, workspace, dict, dictSize); - FORWARD_IF_ERROR(eSize, "ZSTD_loadCEntropy failed"); - dictPtr += eSize; - - { - size_t const dictContentSize = (size_t)(dictEnd - dictPtr); - FORWARD_IF_ERROR(ZSTD_loadDictionaryContent( - ms, NULL, ws, params, dictPtr, dictContentSize, dtlm, tfp), ""); - } - return dictID; -} - -/** ZSTD_compress_insertDictionary() : -* @return : dictID, or an error code */ -static size_t -ZSTD_compress_insertDictionary(ZSTD_compressedBlockState_t* bs, - ZSTD_MatchState_t* ms, - ldmState_t* ls, - ZSTD_cwksp* ws, - const ZSTD_CCtx_params* params, - const void* dict, size_t dictSize, - ZSTD_dictContentType_e dictContentType, - ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp, - void* workspace) -{ - DEBUGLOG(4, "ZSTD_compress_insertDictionary (dictSize=%u)", (U32)dictSize); - if ((dict==NULL) || (dictSize<8)) { - RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); - return 0; - } - - ZSTD_reset_compressedBlockState(bs); - - /* dict restricted modes */ - if (dictContentType == ZSTD_dct_rawContent) - return ZSTD_loadDictionaryContent(ms, ls, ws, params, dict, dictSize, dtlm, tfp); - - if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) { - if (dictContentType == ZSTD_dct_auto) { - DEBUGLOG(4, "raw content dictionary detected"); - return ZSTD_loadDictionaryContent( - ms, ls, ws, params, dict, dictSize, dtlm, tfp); - } - RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); - assert(0); /* impossible */ - } - - /* dict as full zstd dictionary */ - return ZSTD_loadZstdDictionary( - bs, ms, ws, params, dict, dictSize, dtlm, tfp, workspace); -} - -#define ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF (128 KB) -#define ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER (6ULL) - -/*! ZSTD_compressBegin_internal() : - * Assumption : either @dict OR @cdict (or none) is non-NULL, never both - * @return : 0, or an error code */ -static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx, - const void* dict, size_t dictSize, - ZSTD_dictContentType_e dictContentType, - ZSTD_dictTableLoadMethod_e dtlm, - const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, U64 pledgedSrcSize, - ZSTD_buffered_policy_e zbuff) -{ - size_t const dictContentSize = cdict ? cdict->dictContentSize : dictSize; -#if ZSTD_TRACE - cctx->traceCtx = (ZSTD_trace_compress_begin != NULL) ? ZSTD_trace_compress_begin(cctx) : 0; -#endif - DEBUGLOG(4, "ZSTD_compressBegin_internal: wlog=%u", params->cParams.windowLog); - /* params are supposed to be fully validated at this point */ - assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); - assert(!((dict) && (cdict))); /* either dict or cdict, not both */ - if ( (cdict) - && (cdict->dictContentSize > 0) - && ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF - || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER - || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN - || cdict->compressionLevel == 0) - && (params->attachDictPref != ZSTD_dictForceLoad) ) { - return ZSTD_resetCCtx_usingCDict(cctx, cdict, params, pledgedSrcSize, zbuff); - } - - FORWARD_IF_ERROR( ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, - dictContentSize, - ZSTDcrp_makeClean, zbuff) , ""); - { size_t const dictID = cdict ? - ZSTD_compress_insertDictionary( - cctx->blockState.prevCBlock, &cctx->blockState.matchState, - &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, cdict->dictContent, - cdict->dictContentSize, cdict->dictContentType, dtlm, - ZSTD_tfp_forCCtx, cctx->tmpWorkspace) - : ZSTD_compress_insertDictionary( - cctx->blockState.prevCBlock, &cctx->blockState.matchState, - &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, dict, dictSize, - dictContentType, dtlm, ZSTD_tfp_forCCtx, cctx->tmpWorkspace); - FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); - assert(dictID <= UINT_MAX); - cctx->dictID = (U32)dictID; - cctx->dictContentSize = dictContentSize; - } - return 0; -} - -size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx, - const void* dict, size_t dictSize, - ZSTD_dictContentType_e dictContentType, - ZSTD_dictTableLoadMethod_e dtlm, - const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, - unsigned long long pledgedSrcSize) -{ - DEBUGLOG(4, "ZSTD_compressBegin_advanced_internal: wlog=%u", params->cParams.windowLog); - /* compression parameters verification and optimization */ - FORWARD_IF_ERROR( ZSTD_checkCParams(params->cParams) , ""); - return ZSTD_compressBegin_internal(cctx, - dict, dictSize, dictContentType, dtlm, - cdict, - params, pledgedSrcSize, - ZSTDb_not_buffered); -} - -/*! ZSTD_compressBegin_advanced() : -* @return : 0, or an error code */ -size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, - const void* dict, size_t dictSize, - ZSTD_parameters params, unsigned long long pledgedSrcSize) -{ - ZSTD_CCtx_params cctxParams; - ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, ZSTD_NO_CLEVEL); - return ZSTD_compressBegin_advanced_internal(cctx, - dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, - NULL /*cdict*/, - &cctxParams, pledgedSrcSize); -} - -static size_t -ZSTD_compressBegin_usingDict_deprecated(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) -{ - ZSTD_CCtx_params cctxParams; - { ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_noAttachDict); - ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel); - } - DEBUGLOG(4, "ZSTD_compressBegin_usingDict (dictSize=%u)", (unsigned)dictSize); - return ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, - &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, ZSTDb_not_buffered); -} - -size_t -ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) -{ - return ZSTD_compressBegin_usingDict_deprecated(cctx, dict, dictSize, compressionLevel); -} - -size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel) -{ - return ZSTD_compressBegin_usingDict_deprecated(cctx, NULL, 0, compressionLevel); -} - - -/*! ZSTD_writeEpilogue() : -* Ends a frame. -* @return : nb of bytes written into dst (or an error code) */ -static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity) -{ - BYTE* const ostart = (BYTE*)dst; - BYTE* op = ostart; - - DEBUGLOG(4, "ZSTD_writeEpilogue"); - RETURN_ERROR_IF(cctx->stage == ZSTDcs_created, stage_wrong, "init missing"); - - /* special case : empty frame */ - if (cctx->stage == ZSTDcs_init) { - size_t fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, 0, 0); - FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); - dstCapacity -= fhSize; - op += fhSize; - cctx->stage = ZSTDcs_ongoing; - } - - if (cctx->stage != ZSTDcs_ending) { - /* write one last empty block, make it the "last" block */ - U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1) + 0; - ZSTD_STATIC_ASSERT(ZSTD_BLOCKHEADERSIZE == 3); - RETURN_ERROR_IF(dstCapacity<3, dstSize_tooSmall, "no room for epilogue"); - MEM_writeLE24(op, cBlockHeader24); - op += ZSTD_blockHeaderSize; - dstCapacity -= ZSTD_blockHeaderSize; - } - - if (cctx->appliedParams.fParams.checksumFlag) { - U32 const checksum = (U32) XXH64_digest(&cctx->xxhState); - RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for checksum"); - DEBUGLOG(4, "ZSTD_writeEpilogue: write checksum : %08X", (unsigned)checksum); - MEM_writeLE32(op, checksum); - op += 4; - } - - cctx->stage = ZSTDcs_created; /* return to "created but no init" status */ - return (size_t)(op-ostart); -} - -void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize) -{ -#if ZSTD_TRACE - if (cctx->traceCtx && ZSTD_trace_compress_end != NULL) { - int const streaming = cctx->inBuffSize > 0 || cctx->outBuffSize > 0 || cctx->appliedParams.nbWorkers > 0; - ZSTD_Trace trace; - ZSTD_memset(&trace, 0, sizeof(trace)); - trace.version = ZSTD_VERSION_NUMBER; - trace.streaming = streaming; - trace.dictionaryID = cctx->dictID; - trace.dictionarySize = cctx->dictContentSize; - trace.uncompressedSize = cctx->consumedSrcSize; - trace.compressedSize = cctx->producedCSize + extraCSize; - trace.params = &cctx->appliedParams; - trace.cctx = cctx; - ZSTD_trace_compress_end(cctx->traceCtx, &trace); - } - cctx->traceCtx = 0; -#else - (void)cctx; - (void)extraCSize; -#endif -} - -size_t ZSTD_compressEnd_public(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - size_t endResult; - size_t const cSize = ZSTD_compressContinue_internal(cctx, - dst, dstCapacity, src, srcSize, - 1 /* frame mode */, 1 /* last chunk */); - FORWARD_IF_ERROR(cSize, "ZSTD_compressContinue_internal failed"); - endResult = ZSTD_writeEpilogue(cctx, (char*)dst + cSize, dstCapacity-cSize); - FORWARD_IF_ERROR(endResult, "ZSTD_writeEpilogue failed"); - assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); - if (cctx->pledgedSrcSizePlusOne != 0) { /* control src size */ - ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN == (unsigned long long)-1); - DEBUGLOG(4, "end of frame : controlling src size"); - RETURN_ERROR_IF( - cctx->pledgedSrcSizePlusOne != cctx->consumedSrcSize+1, - srcSize_wrong, - "error : pledgedSrcSize = %u, while realSrcSize = %u", - (unsigned)cctx->pledgedSrcSizePlusOne-1, - (unsigned)cctx->consumedSrcSize); - } - ZSTD_CCtx_trace(cctx, endResult); - return cSize + endResult; -} - -/* NOTE: Must just wrap ZSTD_compressEnd_public() */ -size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); -} - -size_t ZSTD_compress_advanced (ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict,size_t dictSize, - ZSTD_parameters params) -{ - DEBUGLOG(4, "ZSTD_compress_advanced"); - FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); - ZSTD_CCtxParams_init_internal(&cctx->simpleApiParams, ¶ms, ZSTD_NO_CLEVEL); - return ZSTD_compress_advanced_internal(cctx, - dst, dstCapacity, - src, srcSize, - dict, dictSize, - &cctx->simpleApiParams); -} - -/* Internal */ -size_t ZSTD_compress_advanced_internal( - ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict,size_t dictSize, - const ZSTD_CCtx_params* params) -{ - DEBUGLOG(4, "ZSTD_compress_advanced_internal (srcSize:%u)", (unsigned)srcSize); - FORWARD_IF_ERROR( ZSTD_compressBegin_internal(cctx, - dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, - params, srcSize, ZSTDb_not_buffered) , ""); - return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); -} - -size_t ZSTD_compress_usingDict(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict, size_t dictSize, - int compressionLevel) -{ - { - ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, srcSize, dict ? dictSize : 0, ZSTD_cpm_noAttachDict); - assert(params.fParams.contentSizeFlag == 1); - ZSTD_CCtxParams_init_internal(&cctx->simpleApiParams, ¶ms, (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT: compressionLevel); - } - DEBUGLOG(4, "ZSTD_compress_usingDict (srcSize=%u)", (unsigned)srcSize); - return ZSTD_compress_advanced_internal(cctx, dst, dstCapacity, src, srcSize, dict, dictSize, &cctx->simpleApiParams); -} - -size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - int compressionLevel) -{ - DEBUGLOG(4, "ZSTD_compressCCtx (srcSize=%u)", (unsigned)srcSize); - assert(cctx != NULL); - return ZSTD_compress_usingDict(cctx, dst, dstCapacity, src, srcSize, NULL, 0, compressionLevel); -} - -size_t ZSTD_compress(void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - int compressionLevel) -{ - size_t result; -#if ZSTD_COMPRESS_HEAPMODE - ZSTD_CCtx* cctx = ZSTD_createCCtx(); - RETURN_ERROR_IF(!cctx, memory_allocation, "ZSTD_createCCtx failed"); - result = ZSTD_compressCCtx(cctx, dst, dstCapacity, src, srcSize, compressionLevel); - ZSTD_freeCCtx(cctx); -#else - ZSTD_CCtx ctxBody; - ZSTD_initCCtx(&ctxBody, ZSTD_defaultCMem); - result = ZSTD_compressCCtx(&ctxBody, dst, dstCapacity, src, srcSize, compressionLevel); - ZSTD_freeCCtxContent(&ctxBody); /* can't free ctxBody itself, as it's on stack; free only heap content */ -#endif - return result; -} - - -/* ===== Dictionary API ===== */ - -/*! ZSTD_estimateCDictSize_advanced() : - * Estimate amount of memory that will be needed to create a dictionary with following arguments */ -size_t ZSTD_estimateCDictSize_advanced( - size_t dictSize, ZSTD_compressionParameters cParams, - ZSTD_dictLoadMethod_e dictLoadMethod) -{ - DEBUGLOG(5, "sizeof(ZSTD_CDict) : %u", (unsigned)sizeof(ZSTD_CDict)); - return ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) - + ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) - /* enableDedicatedDictSearch == 1 ensures that CDict estimation will not be too small - * in case we are using DDS with row-hash. */ - + ZSTD_sizeof_matchState(&cParams, ZSTD_resolveRowMatchFinderMode(ZSTD_ps_auto, &cParams), - /* enableDedicatedDictSearch */ 1, /* forCCtx */ 0) - + (dictLoadMethod == ZSTD_dlm_byRef ? 0 - : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void *)))); -} - -size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel) -{ - ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); - return ZSTD_estimateCDictSize_advanced(dictSize, cParams, ZSTD_dlm_byCopy); -} - -size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict) -{ - if (cdict==NULL) return 0; /* support sizeof on NULL */ - DEBUGLOG(5, "sizeof(*cdict) : %u", (unsigned)sizeof(*cdict)); - /* cdict may be in the workspace */ - return (cdict->workspace.workspace == cdict ? 0 : sizeof(*cdict)) - + ZSTD_cwksp_sizeof(&cdict->workspace); -} - -static size_t ZSTD_initCDict_internal( - ZSTD_CDict* cdict, - const void* dictBuffer, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType, - ZSTD_CCtx_params params) -{ - DEBUGLOG(3, "ZSTD_initCDict_internal (dictContentType:%u)", (unsigned)dictContentType); - assert(!ZSTD_checkCParams(params.cParams)); - cdict->matchState.cParams = params.cParams; - cdict->matchState.dedicatedDictSearch = params.enableDedicatedDictSearch; - if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dictBuffer) || (!dictSize)) { - cdict->dictContent = dictBuffer; - } else { - void *internalBuffer = ZSTD_cwksp_reserve_object(&cdict->workspace, ZSTD_cwksp_align(dictSize, sizeof(void*))); - RETURN_ERROR_IF(!internalBuffer, memory_allocation, "NULL pointer!"); - cdict->dictContent = internalBuffer; - ZSTD_memcpy(internalBuffer, dictBuffer, dictSize); - } - cdict->dictContentSize = dictSize; - cdict->dictContentType = dictContentType; - - cdict->entropyWorkspace = (U32*)ZSTD_cwksp_reserve_object(&cdict->workspace, HUF_WORKSPACE_SIZE); - - - /* Reset the state to no dictionary */ - ZSTD_reset_compressedBlockState(&cdict->cBlockState); - FORWARD_IF_ERROR(ZSTD_reset_matchState( - &cdict->matchState, - &cdict->workspace, - ¶ms.cParams, - params.useRowMatchFinder, - ZSTDcrp_makeClean, - ZSTDirp_reset, - ZSTD_resetTarget_CDict), ""); - /* (Maybe) load the dictionary - * Skips loading the dictionary if it is < 8 bytes. - */ - { params.compressionLevel = ZSTD_CLEVEL_DEFAULT; - params.fParams.contentSizeFlag = 1; - { size_t const dictID = ZSTD_compress_insertDictionary( - &cdict->cBlockState, &cdict->matchState, NULL, &cdict->workspace, - ¶ms, cdict->dictContent, cdict->dictContentSize, - dictContentType, ZSTD_dtlm_full, ZSTD_tfp_forCDict, cdict->entropyWorkspace); - FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); - assert(dictID <= (size_t)(U32)-1); - cdict->dictID = (U32)dictID; - } - } - - return 0; -} - -static ZSTD_CDict* -ZSTD_createCDict_advanced_internal(size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_compressionParameters cParams, - ZSTD_ParamSwitch_e useRowMatchFinder, - int enableDedicatedDictSearch, - ZSTD_customMem customMem) -{ - if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; - DEBUGLOG(3, "ZSTD_createCDict_advanced_internal (dictSize=%u)", (unsigned)dictSize); - - { size_t const workspaceSize = - ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) + - ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) + - ZSTD_sizeof_matchState(&cParams, useRowMatchFinder, enableDedicatedDictSearch, /* forCCtx */ 0) + - (dictLoadMethod == ZSTD_dlm_byRef ? 0 - : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void*)))); - void* const workspace = ZSTD_customMalloc(workspaceSize, customMem); - ZSTD_cwksp ws; - ZSTD_CDict* cdict; - - if (!workspace) { - ZSTD_customFree(workspace, customMem); - return NULL; - } - - ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_dynamic_alloc); - - cdict = (ZSTD_CDict*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CDict)); - assert(cdict != NULL); - ZSTD_cwksp_move(&cdict->workspace, &ws); - cdict->customMem = customMem; - cdict->compressionLevel = ZSTD_NO_CLEVEL; /* signals advanced API usage */ - cdict->useRowMatchFinder = useRowMatchFinder; - return cdict; - } -} - -ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType, - ZSTD_compressionParameters cParams, - ZSTD_customMem customMem) -{ - ZSTD_CCtx_params cctxParams; - ZSTD_memset(&cctxParams, 0, sizeof(cctxParams)); - DEBUGLOG(3, "ZSTD_createCDict_advanced, dictSize=%u, mode=%u", (unsigned)dictSize, (unsigned)dictContentType); - ZSTD_CCtxParams_init(&cctxParams, 0); - cctxParams.cParams = cParams; - cctxParams.customMem = customMem; - return ZSTD_createCDict_advanced2( - dictBuffer, dictSize, - dictLoadMethod, dictContentType, - &cctxParams, customMem); -} - -ZSTD_CDict* ZSTD_createCDict_advanced2( - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType, - const ZSTD_CCtx_params* originalCctxParams, - ZSTD_customMem customMem) -{ - ZSTD_CCtx_params cctxParams = *originalCctxParams; - ZSTD_compressionParameters cParams; - ZSTD_CDict* cdict; - - DEBUGLOG(3, "ZSTD_createCDict_advanced2, dictSize=%u, mode=%u", (unsigned)dictSize, (unsigned)dictContentType); - if (!customMem.customAlloc ^ !customMem.customFree) return NULL; - - if (cctxParams.enableDedicatedDictSearch) { - cParams = ZSTD_dedicatedDictSearch_getCParams( - cctxParams.compressionLevel, dictSize); - ZSTD_overrideCParams(&cParams, &cctxParams.cParams); - } else { - cParams = ZSTD_getCParamsFromCCtxParams( - &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); - } - - if (!ZSTD_dedicatedDictSearch_isSupported(&cParams)) { - /* Fall back to non-DDSS params */ - cctxParams.enableDedicatedDictSearch = 0; - cParams = ZSTD_getCParamsFromCCtxParams( - &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); - } - - DEBUGLOG(3, "ZSTD_createCDict_advanced2: DedicatedDictSearch=%u", cctxParams.enableDedicatedDictSearch); - cctxParams.cParams = cParams; - cctxParams.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams.useRowMatchFinder, &cParams); - - cdict = ZSTD_createCDict_advanced_internal(dictSize, - dictLoadMethod, cctxParams.cParams, - cctxParams.useRowMatchFinder, cctxParams.enableDedicatedDictSearch, - customMem); - - if (!cdict || ZSTD_isError( ZSTD_initCDict_internal(cdict, - dict, dictSize, - dictLoadMethod, dictContentType, - cctxParams) )) { - ZSTD_freeCDict(cdict); - return NULL; - } - - return cdict; -} - -ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionLevel) -{ - ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); - ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dict, dictSize, - ZSTD_dlm_byCopy, ZSTD_dct_auto, - cParams, ZSTD_defaultCMem); - if (cdict) - cdict->compressionLevel = (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel; - return cdict; -} - -ZSTD_CDict* ZSTD_createCDict_byReference(const void* dict, size_t dictSize, int compressionLevel) -{ - ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); - ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dict, dictSize, - ZSTD_dlm_byRef, ZSTD_dct_auto, - cParams, ZSTD_defaultCMem); - if (cdict) - cdict->compressionLevel = (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel; - return cdict; -} - -size_t ZSTD_freeCDict(ZSTD_CDict* cdict) -{ - if (cdict==NULL) return 0; /* support free on NULL */ - { ZSTD_customMem const cMem = cdict->customMem; - int cdictInWorkspace = ZSTD_cwksp_owns_buffer(&cdict->workspace, cdict); - ZSTD_cwksp_free(&cdict->workspace, cMem); - if (!cdictInWorkspace) { - ZSTD_customFree(cdict, cMem); - } - return 0; - } -} - -/*! ZSTD_initStaticCDict_advanced() : - * Generate a digested dictionary in provided memory area. - * workspace: The memory area to emplace the dictionary into. - * Provided pointer must 8-bytes aligned. - * It must outlive dictionary usage. - * workspaceSize: Use ZSTD_estimateCDictSize() - * to determine how large workspace must be. - * cParams : use ZSTD_getCParams() to transform a compression level - * into its relevant cParams. - * @return : pointer to ZSTD_CDict*, or NULL if error (size too small) - * Note : there is no corresponding "free" function. - * Since workspace was allocated externally, it must be freed externally. - */ -const ZSTD_CDict* ZSTD_initStaticCDict( - void* workspace, size_t workspaceSize, - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType, - ZSTD_compressionParameters cParams) -{ - ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(ZSTD_ps_auto, &cParams); - /* enableDedicatedDictSearch == 1 ensures matchstate is not too small in case this CDict will be used for DDS + row hash */ - size_t const matchStateSize = ZSTD_sizeof_matchState(&cParams, useRowMatchFinder, /* enableDedicatedDictSearch */ 1, /* forCCtx */ 0); - size_t const neededSize = ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) - + (dictLoadMethod == ZSTD_dlm_byRef ? 0 - : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void*)))) - + ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) - + matchStateSize; - ZSTD_CDict* cdict; - ZSTD_CCtx_params params; - - DEBUGLOG(4, "ZSTD_initStaticCDict (dictSize==%u)", (unsigned)dictSize); - if ((size_t)workspace & 7) return NULL; /* 8-aligned */ - - { - ZSTD_cwksp ws; - ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_static_alloc); - cdict = (ZSTD_CDict*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CDict)); - if (cdict == NULL) return NULL; - ZSTD_cwksp_move(&cdict->workspace, &ws); - } - - if (workspaceSize < neededSize) return NULL; - - ZSTD_CCtxParams_init(¶ms, 0); - params.cParams = cParams; - params.useRowMatchFinder = useRowMatchFinder; - cdict->useRowMatchFinder = useRowMatchFinder; - cdict->compressionLevel = ZSTD_NO_CLEVEL; - - if (ZSTD_isError( ZSTD_initCDict_internal(cdict, - dict, dictSize, - dictLoadMethod, dictContentType, - params) )) - return NULL; - - return cdict; -} - -ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict) -{ - assert(cdict != NULL); - return cdict->matchState.cParams; -} - -/*! ZSTD_getDictID_fromCDict() : - * Provides the dictID of the dictionary loaded into `cdict`. - * If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. - * Non-conformant dictionaries can still be loaded, but as content-only dictionaries. */ -unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict) -{ - if (cdict==NULL) return 0; - return cdict->dictID; -} - -/* ZSTD_compressBegin_usingCDict_internal() : - * Implementation of various ZSTD_compressBegin_usingCDict* functions. - */ -static size_t ZSTD_compressBegin_usingCDict_internal( - ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, - ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) -{ - ZSTD_CCtx_params cctxParams; - DEBUGLOG(4, "ZSTD_compressBegin_usingCDict_internal"); - RETURN_ERROR_IF(cdict==NULL, dictionary_wrong, "NULL pointer!"); - /* Initialize the cctxParams from the cdict */ - { - ZSTD_parameters params; - params.fParams = fParams; - params.cParams = ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF - || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER - || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN - || cdict->compressionLevel == 0 ) ? - ZSTD_getCParamsFromCDict(cdict) - : ZSTD_getCParams(cdict->compressionLevel, - pledgedSrcSize, - cdict->dictContentSize); - ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, cdict->compressionLevel); - } - /* Increase window log to fit the entire dictionary and source if the - * source size is known. Limit the increase to 19, which is the - * window log for compression level 1 with the largest source size. - */ - if (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN) { - U32 const limitedSrcSize = (U32)MIN(pledgedSrcSize, 1U << 19); - U32 const limitedSrcLog = limitedSrcSize > 1 ? ZSTD_highbit32(limitedSrcSize - 1) + 1 : 1; - cctxParams.cParams.windowLog = MAX(cctxParams.cParams.windowLog, limitedSrcLog); - } - return ZSTD_compressBegin_internal(cctx, - NULL, 0, ZSTD_dct_auto, ZSTD_dtlm_fast, - cdict, - &cctxParams, pledgedSrcSize, - ZSTDb_not_buffered); -} - - -/* ZSTD_compressBegin_usingCDict_advanced() : - * This function is DEPRECATED. - * cdict must be != NULL */ -size_t ZSTD_compressBegin_usingCDict_advanced( - ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, - ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) -{ - return ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, pledgedSrcSize); -} - -/* ZSTD_compressBegin_usingCDict() : - * cdict must be != NULL */ -size_t ZSTD_compressBegin_usingCDict_deprecated(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) -{ - ZSTD_frameParameters const fParams = { 0 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; - return ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, ZSTD_CONTENTSIZE_UNKNOWN); -} - -size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) -{ - return ZSTD_compressBegin_usingCDict_deprecated(cctx, cdict); -} - -/*! ZSTD_compress_usingCDict_internal(): - * Implementation of various ZSTD_compress_usingCDict* functions. - */ -static size_t ZSTD_compress_usingCDict_internal(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const ZSTD_CDict* cdict, ZSTD_frameParameters fParams) -{ - FORWARD_IF_ERROR(ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, srcSize), ""); /* will check if cdict != NULL */ - return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); -} - -/*! ZSTD_compress_usingCDict_advanced(): - * This function is DEPRECATED. - */ -size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const ZSTD_CDict* cdict, ZSTD_frameParameters fParams) -{ - return ZSTD_compress_usingCDict_internal(cctx, dst, dstCapacity, src, srcSize, cdict, fParams); -} - -/*! ZSTD_compress_usingCDict() : - * Compression using a digested Dictionary. - * Faster startup than ZSTD_compress_usingDict(), recommended when same dictionary is used multiple times. - * Note that compression parameters are decided at CDict creation time - * while frame parameters are hardcoded */ -size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const ZSTD_CDict* cdict) -{ - ZSTD_frameParameters const fParams = { 1 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; - return ZSTD_compress_usingCDict_internal(cctx, dst, dstCapacity, src, srcSize, cdict, fParams); -} - - - -/* ****************************************************************** -* Streaming -********************************************************************/ - -ZSTD_CStream* ZSTD_createCStream(void) -{ - DEBUGLOG(3, "ZSTD_createCStream"); - return ZSTD_createCStream_advanced(ZSTD_defaultCMem); -} - -ZSTD_CStream* ZSTD_initStaticCStream(void *workspace, size_t workspaceSize) -{ - return ZSTD_initStaticCCtx(workspace, workspaceSize); -} - -ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem) -{ /* CStream and CCtx are now same object */ - return ZSTD_createCCtx_advanced(customMem); -} - -size_t ZSTD_freeCStream(ZSTD_CStream* zcs) -{ - return ZSTD_freeCCtx(zcs); /* same object */ -} - - - -/*====== Initialization ======*/ - -size_t ZSTD_CStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX; } - -size_t ZSTD_CStreamOutSize(void) -{ - return ZSTD_compressBound(ZSTD_BLOCKSIZE_MAX) + ZSTD_blockHeaderSize + 4 /* 32-bits hash */ ; -} - -static ZSTD_CParamMode_e ZSTD_getCParamMode(ZSTD_CDict const* cdict, ZSTD_CCtx_params const* params, U64 pledgedSrcSize) -{ - if (cdict != NULL && ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) - return ZSTD_cpm_attachDict; - else - return ZSTD_cpm_noAttachDict; -} - -/* ZSTD_resetCStream(): - * pledgedSrcSize == 0 means "unknown" */ -size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pss) -{ - /* temporary : 0 interpreted as "unknown" during transition period. - * Users willing to specify "unknown" **must** use ZSTD_CONTENTSIZE_UNKNOWN. - * 0 will be interpreted as "empty" in the future. - */ - U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; - DEBUGLOG(4, "ZSTD_resetCStream: pledgedSrcSize = %u", (unsigned)pledgedSrcSize); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); - return 0; -} - -/*! ZSTD_initCStream_internal() : - * Note : for lib/compress only. Used by zstdmt_compress.c. - * Assumption 1 : params are valid - * Assumption 2 : either dict, or cdict, is defined, not both */ -size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, - const void* dict, size_t dictSize, const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, - unsigned long long pledgedSrcSize) -{ - DEBUGLOG(4, "ZSTD_initCStream_internal"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); - assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); - zcs->requestedParams = *params; - assert(!((dict) && (cdict))); /* either dict or cdict, not both */ - if (dict) { - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); - } else { - /* Dictionary is cleared if !cdict */ - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); - } - return 0; -} - -/* ZSTD_initCStream_usingCDict_advanced() : - * same as ZSTD_initCStream_usingCDict(), with control over frame parameters */ -size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, - const ZSTD_CDict* cdict, - ZSTD_frameParameters fParams, - unsigned long long pledgedSrcSize) -{ - DEBUGLOG(4, "ZSTD_initCStream_usingCDict_advanced"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); - zcs->requestedParams.fParams = fParams; - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); - return 0; -} - -/* note : cdict must outlive compression session */ -size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict) -{ - DEBUGLOG(4, "ZSTD_initCStream_usingCDict"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); - return 0; -} - - -/* ZSTD_initCStream_advanced() : - * pledgedSrcSize must be exact. - * if srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. - * dict is loaded with default parameters ZSTD_dct_auto and ZSTD_dlm_byCopy. */ -size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, - const void* dict, size_t dictSize, - ZSTD_parameters params, unsigned long long pss) -{ - /* for compatibility with older programs relying on this behavior. - * Users should now specify ZSTD_CONTENTSIZE_UNKNOWN. - * This line will be removed in the future. - */ - U64 const pledgedSrcSize = (pss==0 && params.fParams.contentSizeFlag==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; - DEBUGLOG(4, "ZSTD_initCStream_advanced"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); - FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); - ZSTD_CCtxParams_setZstdParams(&zcs->requestedParams, ¶ms); - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); - return 0; -} - -size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel) -{ - DEBUGLOG(4, "ZSTD_initCStream_usingDict"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); - return 0; -} - -size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pss) -{ - /* temporary : 0 interpreted as "unknown" during transition period. - * Users willing to specify "unknown" **must** use ZSTD_CONTENTSIZE_UNKNOWN. - * 0 will be interpreted as "empty" in the future. - */ - U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; - DEBUGLOG(4, "ZSTD_initCStream_srcSize"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); - return 0; -} - -size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel) -{ - DEBUGLOG(4, "ZSTD_initCStream"); - FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); - FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); - return 0; -} - -/*====== Compression ======*/ - -static size_t ZSTD_nextInputSizeHint(const ZSTD_CCtx* cctx) -{ - if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { - return cctx->blockSizeMax - cctx->stableIn_notConsumed; - } - assert(cctx->appliedParams.inBufferMode == ZSTD_bm_buffered); - { size_t hintInSize = cctx->inBuffTarget - cctx->inBuffPos; - if (hintInSize==0) hintInSize = cctx->blockSizeMax; - return hintInSize; - } -} - -/** ZSTD_compressStream_generic(): - * internal function for all *compressStream*() variants - * @return : hint size for next input to complete ongoing block */ -static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, - ZSTD_outBuffer* output, - ZSTD_inBuffer* input, - ZSTD_EndDirective const flushMode) -{ - const char* const istart = (assert(input != NULL), (const char*)input->src); - const char* const iend = (istart != NULL) ? istart + input->size : istart; - const char* ip = (istart != NULL) ? istart + input->pos : istart; - char* const ostart = (assert(output != NULL), (char*)output->dst); - char* const oend = (ostart != NULL) ? ostart + output->size : ostart; - char* op = (ostart != NULL) ? ostart + output->pos : ostart; - U32 someMoreWork = 1; - - /* check expectations */ - DEBUGLOG(5, "ZSTD_compressStream_generic, flush=%i, srcSize = %zu", (int)flushMode, input->size - input->pos); - assert(zcs != NULL); - if (zcs->appliedParams.inBufferMode == ZSTD_bm_stable) { - assert(input->pos >= zcs->stableIn_notConsumed); - input->pos -= zcs->stableIn_notConsumed; - if (ip) ip -= zcs->stableIn_notConsumed; - zcs->stableIn_notConsumed = 0; - } - if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { - assert(zcs->inBuff != NULL); - assert(zcs->inBuffSize > 0); - } - if (zcs->appliedParams.outBufferMode == ZSTD_bm_buffered) { - assert(zcs->outBuff != NULL); - assert(zcs->outBuffSize > 0); - } - if (input->src == NULL) assert(input->size == 0); - assert(input->pos <= input->size); - if (output->dst == NULL) assert(output->size == 0); - assert(output->pos <= output->size); - assert((U32)flushMode <= (U32)ZSTD_e_end); - - while (someMoreWork) { - switch(zcs->streamStage) - { - case zcss_init: - RETURN_ERROR(init_missing, "call ZSTD_initCStream() first!"); - - case zcss_load: - if ( (flushMode == ZSTD_e_end) - && ( (size_t)(oend-op) >= ZSTD_compressBound((size_t)(iend-ip)) /* Enough output space */ - || zcs->appliedParams.outBufferMode == ZSTD_bm_stable) /* OR we are allowed to return dstSizeTooSmall */ - && (zcs->inBuffPos == 0) ) { - /* shortcut to compression pass directly into output buffer */ - size_t const cSize = ZSTD_compressEnd_public(zcs, - op, (size_t)(oend-op), - ip, (size_t)(iend-ip)); - DEBUGLOG(4, "ZSTD_compressEnd : cSize=%u", (unsigned)cSize); - FORWARD_IF_ERROR(cSize, "ZSTD_compressEnd failed"); - ip = iend; - op += cSize; - zcs->frameEnded = 1; - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - someMoreWork = 0; break; - } - /* complete loading into inBuffer in buffered mode */ - if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { - size_t const toLoad = zcs->inBuffTarget - zcs->inBuffPos; - size_t const loaded = ZSTD_limitCopy( - zcs->inBuff + zcs->inBuffPos, toLoad, - ip, (size_t)(iend-ip)); - zcs->inBuffPos += loaded; - if (ip) ip += loaded; - if ( (flushMode == ZSTD_e_continue) - && (zcs->inBuffPos < zcs->inBuffTarget) ) { - /* not enough input to fill full block : stop here */ - someMoreWork = 0; break; - } - if ( (flushMode == ZSTD_e_flush) - && (zcs->inBuffPos == zcs->inToCompress) ) { - /* empty */ - someMoreWork = 0; break; - } - } else { - assert(zcs->appliedParams.inBufferMode == ZSTD_bm_stable); - if ( (flushMode == ZSTD_e_continue) - && ( (size_t)(iend - ip) < zcs->blockSizeMax) ) { - /* can't compress a full block : stop here */ - zcs->stableIn_notConsumed = (size_t)(iend - ip); - ip = iend; /* pretend to have consumed input */ - someMoreWork = 0; break; - } - if ( (flushMode == ZSTD_e_flush) - && (ip == iend) ) { - /* empty */ - someMoreWork = 0; break; - } - } - /* compress current block (note : this stage cannot be stopped in the middle) */ - DEBUGLOG(5, "stream compression stage (flushMode==%u)", flushMode); - { int const inputBuffered = (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered); - void* cDst; - size_t cSize; - size_t oSize = (size_t)(oend-op); - size_t const iSize = inputBuffered ? zcs->inBuffPos - zcs->inToCompress - : MIN((size_t)(iend - ip), zcs->blockSizeMax); - if (oSize >= ZSTD_compressBound(iSize) || zcs->appliedParams.outBufferMode == ZSTD_bm_stable) - cDst = op; /* compress into output buffer, to skip flush stage */ - else - cDst = zcs->outBuff, oSize = zcs->outBuffSize; - if (inputBuffered) { - unsigned const lastBlock = (flushMode == ZSTD_e_end) && (ip==iend); - cSize = lastBlock ? - ZSTD_compressEnd_public(zcs, cDst, oSize, - zcs->inBuff + zcs->inToCompress, iSize) : - ZSTD_compressContinue_public(zcs, cDst, oSize, - zcs->inBuff + zcs->inToCompress, iSize); - FORWARD_IF_ERROR(cSize, "%s", lastBlock ? "ZSTD_compressEnd failed" : "ZSTD_compressContinue failed"); - zcs->frameEnded = lastBlock; - /* prepare next block */ - zcs->inBuffTarget = zcs->inBuffPos + zcs->blockSizeMax; - if (zcs->inBuffTarget > zcs->inBuffSize) - zcs->inBuffPos = 0, zcs->inBuffTarget = zcs->blockSizeMax; - DEBUGLOG(5, "inBuffTarget:%u / inBuffSize:%u", - (unsigned)zcs->inBuffTarget, (unsigned)zcs->inBuffSize); - if (!lastBlock) - assert(zcs->inBuffTarget <= zcs->inBuffSize); - zcs->inToCompress = zcs->inBuffPos; - } else { /* !inputBuffered, hence ZSTD_bm_stable */ - unsigned const lastBlock = (flushMode == ZSTD_e_end) && (ip + iSize == iend); - cSize = lastBlock ? - ZSTD_compressEnd_public(zcs, cDst, oSize, ip, iSize) : - ZSTD_compressContinue_public(zcs, cDst, oSize, ip, iSize); - /* Consume the input prior to error checking to mirror buffered mode. */ - if (ip) ip += iSize; - FORWARD_IF_ERROR(cSize, "%s", lastBlock ? "ZSTD_compressEnd failed" : "ZSTD_compressContinue failed"); - zcs->frameEnded = lastBlock; - if (lastBlock) assert(ip == iend); - } - if (cDst == op) { /* no need to flush */ - op += cSize; - if (zcs->frameEnded) { - DEBUGLOG(5, "Frame completed directly in outBuffer"); - someMoreWork = 0; - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - } - break; - } - zcs->outBuffContentSize = cSize; - zcs->outBuffFlushedSize = 0; - zcs->streamStage = zcss_flush; /* pass-through to flush stage */ - } - ZSTD_FALLTHROUGH; - case zcss_flush: - DEBUGLOG(5, "flush stage"); - assert(zcs->appliedParams.outBufferMode == ZSTD_bm_buffered); - { size_t const toFlush = zcs->outBuffContentSize - zcs->outBuffFlushedSize; - size_t const flushed = ZSTD_limitCopy(op, (size_t)(oend-op), - zcs->outBuff + zcs->outBuffFlushedSize, toFlush); - DEBUGLOG(5, "toFlush: %u into %u ==> flushed: %u", - (unsigned)toFlush, (unsigned)(oend-op), (unsigned)flushed); - if (flushed) - op += flushed; - zcs->outBuffFlushedSize += flushed; - if (toFlush!=flushed) { - /* flush not fully completed, presumably because dst is too small */ - assert(op==oend); - someMoreWork = 0; - break; - } - zcs->outBuffContentSize = zcs->outBuffFlushedSize = 0; - if (zcs->frameEnded) { - DEBUGLOG(5, "Frame completed on flush"); - someMoreWork = 0; - ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); - break; - } - zcs->streamStage = zcss_load; - break; - } - - default: /* impossible */ - assert(0); - } - } - - input->pos = (size_t)(ip - istart); - output->pos = (size_t)(op - ostart); - if (zcs->frameEnded) return 0; - return ZSTD_nextInputSizeHint(zcs); -} - -static size_t ZSTD_nextInputSizeHint_MTorST(const ZSTD_CCtx* cctx) -{ -#ifdef ZSTD_MULTITHREAD - if (cctx->appliedParams.nbWorkers >= 1) { - assert(cctx->mtctx != NULL); - return ZSTDMT_nextInputSizeHint(cctx->mtctx); - } -#endif - return ZSTD_nextInputSizeHint(cctx); - -} - -size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) -{ - FORWARD_IF_ERROR( ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue) , ""); - return ZSTD_nextInputSizeHint_MTorST(zcs); -} - -/* After a compression call set the expected input/output buffer. - * This is validated at the start of the next compression call. - */ -static void -ZSTD_setBufferExpectations(ZSTD_CCtx* cctx, const ZSTD_outBuffer* output, const ZSTD_inBuffer* input) -{ - DEBUGLOG(5, "ZSTD_setBufferExpectations (for advanced stable in/out modes)"); - if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { - cctx->expectedInBuffer = *input; - } - if (cctx->appliedParams.outBufferMode == ZSTD_bm_stable) { - cctx->expectedOutBufferSize = output->size - output->pos; - } -} - -/* Validate that the input/output buffers match the expectations set by - * ZSTD_setBufferExpectations. - */ -static size_t ZSTD_checkBufferStability(ZSTD_CCtx const* cctx, - ZSTD_outBuffer const* output, - ZSTD_inBuffer const* input, - ZSTD_EndDirective endOp) -{ - if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { - ZSTD_inBuffer const expect = cctx->expectedInBuffer; - if (expect.src != input->src || expect.pos != input->pos) - RETURN_ERROR(stabilityCondition_notRespected, "ZSTD_c_stableInBuffer enabled but input differs!"); - } - (void)endOp; - if (cctx->appliedParams.outBufferMode == ZSTD_bm_stable) { - size_t const outBufferSize = output->size - output->pos; - if (cctx->expectedOutBufferSize != outBufferSize) - RETURN_ERROR(stabilityCondition_notRespected, "ZSTD_c_stableOutBuffer enabled but output size differs!"); - } - return 0; -} - -/* - * If @endOp == ZSTD_e_end, @inSize becomes pledgedSrcSize. - * Otherwise, it's ignored. - * @return: 0 on success, or a ZSTD_error code otherwise. - */ -static size_t ZSTD_CCtx_init_compressStream2(ZSTD_CCtx* cctx, - ZSTD_EndDirective endOp, - size_t inSize) -{ - ZSTD_CCtx_params params = cctx->requestedParams; - ZSTD_prefixDict const prefixDict = cctx->prefixDict; - FORWARD_IF_ERROR( ZSTD_initLocalDict(cctx) , ""); /* Init the local dict if present. */ - ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */ - assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */ - if (cctx->cdict && !cctx->localDict.cdict) { - /* Let the cdict's compression level take priority over the requested params. - * But do not take the cdict's compression level if the "cdict" is actually a localDict - * generated from ZSTD_initLocalDict(). - */ - params.compressionLevel = cctx->cdict->compressionLevel; - } - DEBUGLOG(4, "ZSTD_CCtx_init_compressStream2 : transparent init stage"); - if (endOp == ZSTD_e_end) cctx->pledgedSrcSizePlusOne = inSize + 1; /* auto-determine pledgedSrcSize */ - - { size_t const dictSize = prefixDict.dict - ? prefixDict.dictSize - : (cctx->cdict ? cctx->cdict->dictContentSize : 0); - ZSTD_CParamMode_e const mode = ZSTD_getCParamMode(cctx->cdict, ¶ms, cctx->pledgedSrcSizePlusOne - 1); - params.cParams = ZSTD_getCParamsFromCCtxParams( - ¶ms, cctx->pledgedSrcSizePlusOne-1, - dictSize, mode); - } - - params.postBlockSplitter = ZSTD_resolveBlockSplitterMode(params.postBlockSplitter, ¶ms.cParams); - params.ldmParams.enableLdm = ZSTD_resolveEnableLdm(params.ldmParams.enableLdm, ¶ms.cParams); - params.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params.useRowMatchFinder, ¶ms.cParams); - params.validateSequences = ZSTD_resolveExternalSequenceValidation(params.validateSequences); - params.maxBlockSize = ZSTD_resolveMaxBlockSize(params.maxBlockSize); - params.searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(params.searchForExternalRepcodes, params.compressionLevel); - -#ifdef ZSTD_MULTITHREAD - /* If external matchfinder is enabled, make sure to fail before checking job size (for consistency) */ - RETURN_ERROR_IF( - ZSTD_hasExtSeqProd(¶ms) && params.nbWorkers >= 1, - parameter_combination_unsupported, - "External sequence producer isn't supported with nbWorkers >= 1" - ); - - if ((cctx->pledgedSrcSizePlusOne-1) <= ZSTDMT_JOBSIZE_MIN) { - params.nbWorkers = 0; /* do not invoke multi-threading when src size is too small */ - } - if (params.nbWorkers > 0) { -# if ZSTD_TRACE - cctx->traceCtx = (ZSTD_trace_compress_begin != NULL) ? ZSTD_trace_compress_begin(cctx) : 0; -# endif - /* mt context creation */ - if (cctx->mtctx == NULL) { - DEBUGLOG(4, "ZSTD_compressStream2: creating new mtctx for nbWorkers=%u", - params.nbWorkers); - cctx->mtctx = ZSTDMT_createCCtx_advanced((U32)params.nbWorkers, cctx->customMem, cctx->pool); - RETURN_ERROR_IF(cctx->mtctx == NULL, memory_allocation, "NULL pointer!"); - } - /* mt compression */ - DEBUGLOG(4, "call ZSTDMT_initCStream_internal as nbWorkers=%u", params.nbWorkers); - FORWARD_IF_ERROR( ZSTDMT_initCStream_internal( - cctx->mtctx, - prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, - cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) , ""); - cctx->dictID = cctx->cdict ? cctx->cdict->dictID : 0; - cctx->dictContentSize = cctx->cdict ? cctx->cdict->dictContentSize : prefixDict.dictSize; - cctx->consumedSrcSize = 0; - cctx->producedCSize = 0; - cctx->streamStage = zcss_load; - cctx->appliedParams = params; - } else -#endif /* ZSTD_MULTITHREAD */ - { U64 const pledgedSrcSize = cctx->pledgedSrcSizePlusOne - 1; - assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams))); - FORWARD_IF_ERROR( ZSTD_compressBegin_internal(cctx, - prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, ZSTD_dtlm_fast, - cctx->cdict, - ¶ms, pledgedSrcSize, - ZSTDb_buffered) , ""); - assert(cctx->appliedParams.nbWorkers == 0); - cctx->inToCompress = 0; - cctx->inBuffPos = 0; - if (cctx->appliedParams.inBufferMode == ZSTD_bm_buffered) { - /* for small input: avoid automatic flush on reaching end of block, since - * it would require to add a 3-bytes null block to end frame - */ - cctx->inBuffTarget = cctx->blockSizeMax + (cctx->blockSizeMax == pledgedSrcSize); - } else { - cctx->inBuffTarget = 0; - } - cctx->outBuffContentSize = cctx->outBuffFlushedSize = 0; - cctx->streamStage = zcss_load; - cctx->frameEnded = 0; - } - return 0; -} - -/* @return provides a minimum amount of data remaining to be flushed from internal buffers - */ -size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, - ZSTD_outBuffer* output, - ZSTD_inBuffer* input, - ZSTD_EndDirective endOp) -{ - DEBUGLOG(5, "ZSTD_compressStream2, endOp=%u ", (unsigned)endOp); - /* check conditions */ - RETURN_ERROR_IF(output->pos > output->size, dstSize_tooSmall, "invalid output buffer"); - RETURN_ERROR_IF(input->pos > input->size, srcSize_wrong, "invalid input buffer"); - RETURN_ERROR_IF((U32)endOp > (U32)ZSTD_e_end, parameter_outOfBound, "invalid endDirective"); - assert(cctx != NULL); - - /* transparent initialization stage */ - if (cctx->streamStage == zcss_init) { - size_t const inputSize = input->size - input->pos; /* no obligation to start from pos==0 */ - size_t const totalInputSize = inputSize + cctx->stableIn_notConsumed; - if ( (cctx->requestedParams.inBufferMode == ZSTD_bm_stable) /* input is presumed stable, across invocations */ - && (endOp == ZSTD_e_continue) /* no flush requested, more input to come */ - && (totalInputSize < ZSTD_BLOCKSIZE_MAX) ) { /* not even reached one block yet */ - if (cctx->stableIn_notConsumed) { /* not the first time */ - /* check stable source guarantees */ - RETURN_ERROR_IF(input->src != cctx->expectedInBuffer.src, stabilityCondition_notRespected, "stableInBuffer condition not respected: wrong src pointer"); - RETURN_ERROR_IF(input->pos != cctx->expectedInBuffer.size, stabilityCondition_notRespected, "stableInBuffer condition not respected: externally modified pos"); - } - /* pretend input was consumed, to give a sense forward progress */ - input->pos = input->size; - /* save stable inBuffer, for later control, and flush/end */ - cctx->expectedInBuffer = *input; - /* but actually input wasn't consumed, so keep track of position from where compression shall resume */ - cctx->stableIn_notConsumed += inputSize; - /* don't initialize yet, wait for the first block of flush() order, for better parameters adaptation */ - return ZSTD_FRAMEHEADERSIZE_MIN(cctx->requestedParams.format); /* at least some header to produce */ - } - FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, endOp, totalInputSize), "compressStream2 initialization failed"); - ZSTD_setBufferExpectations(cctx, output, input); /* Set initial buffer expectations now that we've initialized */ - } - /* end of transparent initialization stage */ - - FORWARD_IF_ERROR(ZSTD_checkBufferStability(cctx, output, input, endOp), "invalid buffers"); - /* compression stage */ -#ifdef ZSTD_MULTITHREAD - if (cctx->appliedParams.nbWorkers > 0) { - size_t flushMin; - if (cctx->cParamsChanged) { - ZSTDMT_updateCParams_whileCompressing(cctx->mtctx, &cctx->requestedParams); - cctx->cParamsChanged = 0; - } - if (cctx->stableIn_notConsumed) { - assert(cctx->appliedParams.inBufferMode == ZSTD_bm_stable); - /* some early data was skipped - make it available for consumption */ - assert(input->pos >= cctx->stableIn_notConsumed); - input->pos -= cctx->stableIn_notConsumed; - cctx->stableIn_notConsumed = 0; - } - for (;;) { - size_t const ipos = input->pos; - size_t const opos = output->pos; - flushMin = ZSTDMT_compressStream_generic(cctx->mtctx, output, input, endOp); - cctx->consumedSrcSize += (U64)(input->pos - ipos); - cctx->producedCSize += (U64)(output->pos - opos); - if ( ZSTD_isError(flushMin) - || (endOp == ZSTD_e_end && flushMin == 0) ) { /* compression completed */ - if (flushMin == 0) - ZSTD_CCtx_trace(cctx, 0); - ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); - } - FORWARD_IF_ERROR(flushMin, "ZSTDMT_compressStream_generic failed"); - - if (endOp == ZSTD_e_continue) { - /* We only require some progress with ZSTD_e_continue, not maximal progress. - * We're done if we've consumed or produced any bytes, or either buffer is - * full. - */ - if (input->pos != ipos || output->pos != opos || input->pos == input->size || output->pos == output->size) - break; - } else { - assert(endOp == ZSTD_e_flush || endOp == ZSTD_e_end); - /* We require maximal progress. We're done when the flush is complete or the - * output buffer is full. - */ - if (flushMin == 0 || output->pos == output->size) - break; - } - } - DEBUGLOG(5, "completed ZSTD_compressStream2 delegating to ZSTDMT_compressStream_generic"); - /* Either we don't require maximum forward progress, we've finished the - * flush, or we are out of output space. - */ - assert(endOp == ZSTD_e_continue || flushMin == 0 || output->pos == output->size); - ZSTD_setBufferExpectations(cctx, output, input); - return flushMin; - } -#endif /* ZSTD_MULTITHREAD */ - FORWARD_IF_ERROR( ZSTD_compressStream_generic(cctx, output, input, endOp) , ""); - DEBUGLOG(5, "completed ZSTD_compressStream2"); - ZSTD_setBufferExpectations(cctx, output, input); - return cctx->outBuffContentSize - cctx->outBuffFlushedSize; /* remaining to flush */ -} - -size_t ZSTD_compressStream2_simpleArgs ( - ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, size_t* dstPos, - const void* src, size_t srcSize, size_t* srcPos, - ZSTD_EndDirective endOp) -{ - ZSTD_outBuffer output; - ZSTD_inBuffer input; - output.dst = dst; - output.size = dstCapacity; - output.pos = *dstPos; - input.src = src; - input.size = srcSize; - input.pos = *srcPos; - /* ZSTD_compressStream2() will check validity of dstPos and srcPos */ - { size_t const cErr = ZSTD_compressStream2(cctx, &output, &input, endOp); - *dstPos = output.pos; - *srcPos = input.pos; - return cErr; - } -} - -size_t ZSTD_compress2(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - ZSTD_bufferMode_e const originalInBufferMode = cctx->requestedParams.inBufferMode; - ZSTD_bufferMode_e const originalOutBufferMode = cctx->requestedParams.outBufferMode; - DEBUGLOG(4, "ZSTD_compress2 (srcSize=%u)", (unsigned)srcSize); - ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); - /* Enable stable input/output buffers. */ - cctx->requestedParams.inBufferMode = ZSTD_bm_stable; - cctx->requestedParams.outBufferMode = ZSTD_bm_stable; - { size_t oPos = 0; - size_t iPos = 0; - size_t const result = ZSTD_compressStream2_simpleArgs(cctx, - dst, dstCapacity, &oPos, - src, srcSize, &iPos, - ZSTD_e_end); - /* Reset to the original values. */ - cctx->requestedParams.inBufferMode = originalInBufferMode; - cctx->requestedParams.outBufferMode = originalOutBufferMode; - - FORWARD_IF_ERROR(result, "ZSTD_compressStream2_simpleArgs failed"); - if (result != 0) { /* compression not completed, due to lack of output space */ - assert(oPos == dstCapacity); - RETURN_ERROR(dstSize_tooSmall, ""); - } - assert(iPos == srcSize); /* all input is expected consumed */ - return oPos; - } -} - -/* ZSTD_validateSequence() : - * @offBase : must use the format required by ZSTD_storeSeq() - * @returns a ZSTD error code if sequence is not valid - */ -static size_t -ZSTD_validateSequence(U32 offBase, U32 matchLength, U32 minMatch, - size_t posInSrc, U32 windowLog, size_t dictSize, int useSequenceProducer) -{ - U32 const windowSize = 1u << windowLog; - /* posInSrc represents the amount of data the decoder would decode up to this point. - * As long as the amount of data decoded is less than or equal to window size, offsets may be - * larger than the total length of output decoded in order to reference the dict, even larger than - * window size. After output surpasses windowSize, we're limited to windowSize offsets again. - */ - size_t const offsetBound = posInSrc > windowSize ? (size_t)windowSize : posInSrc + (size_t)dictSize; - size_t const matchLenLowerBound = (minMatch == 3 || useSequenceProducer) ? 3 : 4; - RETURN_ERROR_IF(offBase > OFFSET_TO_OFFBASE(offsetBound), externalSequences_invalid, "Offset too large!"); - /* Validate maxNbSeq is large enough for the given matchLength and minMatch */ - RETURN_ERROR_IF(matchLength < matchLenLowerBound, externalSequences_invalid, "Matchlength too small for the minMatch"); - return 0; -} - -/* Returns an offset code, given a sequence's raw offset, the ongoing repcode array, and whether litLength == 0 */ -static U32 ZSTD_finalizeOffBase(U32 rawOffset, const U32 rep[ZSTD_REP_NUM], U32 ll0) -{ - U32 offBase = OFFSET_TO_OFFBASE(rawOffset); - - if (!ll0 && rawOffset == rep[0]) { - offBase = REPCODE1_TO_OFFBASE; - } else if (rawOffset == rep[1]) { - offBase = REPCODE_TO_OFFBASE(2 - ll0); - } else if (rawOffset == rep[2]) { - offBase = REPCODE_TO_OFFBASE(3 - ll0); - } else if (ll0 && rawOffset == rep[0] - 1) { - offBase = REPCODE3_TO_OFFBASE; - } - return offBase; -} - -/* This function scans through an array of ZSTD_Sequence, - * storing the sequences it reads, until it reaches a block delimiter. - * Note that the block delimiter includes the last literals of the block. - * @blockSize must be == sum(sequence_lengths). - * @returns @blockSize on success, and a ZSTD_error otherwise. - */ -static size_t -ZSTD_transferSequences_wBlockDelim(ZSTD_CCtx* cctx, - ZSTD_SequencePosition* seqPos, - const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, - const void* src, size_t blockSize, - ZSTD_ParamSwitch_e externalRepSearch) -{ - U32 idx = seqPos->idx; - U32 const startIdx = idx; - BYTE const* ip = (BYTE const*)(src); - const BYTE* const iend = ip + blockSize; - Repcodes_t updatedRepcodes; - U32 dictSize; - - DEBUGLOG(5, "ZSTD_transferSequences_wBlockDelim (blockSize = %zu)", blockSize); - - if (cctx->cdict) { - dictSize = (U32)cctx->cdict->dictContentSize; - } else if (cctx->prefixDict.dict) { - dictSize = (U32)cctx->prefixDict.dictSize; - } else { - dictSize = 0; - } - ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); - for (; idx < inSeqsSize && (inSeqs[idx].matchLength != 0 || inSeqs[idx].offset != 0); ++idx) { - U32 const litLength = inSeqs[idx].litLength; - U32 const matchLength = inSeqs[idx].matchLength; - U32 offBase; - - if (externalRepSearch == ZSTD_ps_disable) { - offBase = OFFSET_TO_OFFBASE(inSeqs[idx].offset); - } else { - U32 const ll0 = (litLength == 0); - offBase = ZSTD_finalizeOffBase(inSeqs[idx].offset, updatedRepcodes.rep, ll0); - ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); - } - - DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); - if (cctx->appliedParams.validateSequences) { - seqPos->posInSrc += litLength + matchLength; - FORWARD_IF_ERROR(ZSTD_validateSequence(offBase, matchLength, cctx->appliedParams.cParams.minMatch, - seqPos->posInSrc, - cctx->appliedParams.cParams.windowLog, dictSize, - ZSTD_hasExtSeqProd(&cctx->appliedParams)), - "Sequence validation failed"); - } - RETURN_ERROR_IF(idx - seqPos->idx >= cctx->seqStore.maxNbSeq, externalSequences_invalid, - "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); - ZSTD_storeSeq(&cctx->seqStore, litLength, ip, iend, offBase, matchLength); - ip += matchLength + litLength; - } - RETURN_ERROR_IF(idx == inSeqsSize, externalSequences_invalid, "Block delimiter not found."); - - /* If we skipped repcode search while parsing, we need to update repcodes now */ - assert(externalRepSearch != ZSTD_ps_auto); - assert(idx >= startIdx); - if (externalRepSearch == ZSTD_ps_disable && idx != startIdx) { - U32* const rep = updatedRepcodes.rep; - U32 lastSeqIdx = idx - 1; /* index of last non-block-delimiter sequence */ - - if (lastSeqIdx >= startIdx + 2) { - rep[2] = inSeqs[lastSeqIdx - 2].offset; - rep[1] = inSeqs[lastSeqIdx - 1].offset; - rep[0] = inSeqs[lastSeqIdx].offset; - } else if (lastSeqIdx == startIdx + 1) { - rep[2] = rep[0]; - rep[1] = inSeqs[lastSeqIdx - 1].offset; - rep[0] = inSeqs[lastSeqIdx].offset; - } else { - assert(lastSeqIdx == startIdx); - rep[2] = rep[1]; - rep[1] = rep[0]; - rep[0] = inSeqs[lastSeqIdx].offset; - } - } - - ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); - - if (inSeqs[idx].litLength) { - DEBUGLOG(6, "Storing last literals of size: %u", inSeqs[idx].litLength); - ZSTD_storeLastLiterals(&cctx->seqStore, ip, inSeqs[idx].litLength); - ip += inSeqs[idx].litLength; - seqPos->posInSrc += inSeqs[idx].litLength; - } - RETURN_ERROR_IF(ip != iend, externalSequences_invalid, "Blocksize doesn't agree with block delimiter!"); - seqPos->idx = idx+1; - return blockSize; -} - -/* - * This function attempts to scan through @blockSize bytes in @src - * represented by the sequences in @inSeqs, - * storing any (partial) sequences. - * - * Occasionally, we may want to reduce the actual number of bytes consumed from @src - * to avoid splitting a match, notably if it would produce a match smaller than MINMATCH. - * - * @returns the number of bytes consumed from @src, necessarily <= @blockSize. - * Otherwise, it may return a ZSTD error if something went wrong. - */ -static size_t -ZSTD_transferSequences_noDelim(ZSTD_CCtx* cctx, - ZSTD_SequencePosition* seqPos, - const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, - const void* src, size_t blockSize, - ZSTD_ParamSwitch_e externalRepSearch) -{ - U32 idx = seqPos->idx; - U32 startPosInSequence = seqPos->posInSequence; - U32 endPosInSequence = seqPos->posInSequence + (U32)blockSize; - size_t dictSize; - const BYTE* const istart = (const BYTE*)(src); - const BYTE* ip = istart; - const BYTE* iend = istart + blockSize; /* May be adjusted if we decide to process fewer than blockSize bytes */ - Repcodes_t updatedRepcodes; - U32 bytesAdjustment = 0; - U32 finalMatchSplit = 0; - - /* TODO(embg) support fast parsing mode in noBlockDelim mode */ - (void)externalRepSearch; - - if (cctx->cdict) { - dictSize = cctx->cdict->dictContentSize; - } else if (cctx->prefixDict.dict) { - dictSize = cctx->prefixDict.dictSize; - } else { - dictSize = 0; - } - DEBUGLOG(5, "ZSTD_transferSequences_noDelim: idx: %u PIS: %u blockSize: %zu", idx, startPosInSequence, blockSize); - DEBUGLOG(5, "Start seq: idx: %u (of: %u ml: %u ll: %u)", idx, inSeqs[idx].offset, inSeqs[idx].matchLength, inSeqs[idx].litLength); - ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); - while (endPosInSequence && idx < inSeqsSize && !finalMatchSplit) { - const ZSTD_Sequence currSeq = inSeqs[idx]; - U32 litLength = currSeq.litLength; - U32 matchLength = currSeq.matchLength; - U32 const rawOffset = currSeq.offset; - U32 offBase; - - /* Modify the sequence depending on where endPosInSequence lies */ - if (endPosInSequence >= currSeq.litLength + currSeq.matchLength) { - if (startPosInSequence >= litLength) { - startPosInSequence -= litLength; - litLength = 0; - matchLength -= startPosInSequence; - } else { - litLength -= startPosInSequence; - } - /* Move to the next sequence */ - endPosInSequence -= currSeq.litLength + currSeq.matchLength; - startPosInSequence = 0; - } else { - /* This is the final (partial) sequence we're adding from inSeqs, and endPosInSequence - does not reach the end of the match. So, we have to split the sequence */ - DEBUGLOG(6, "Require a split: diff: %u, idx: %u PIS: %u", - currSeq.litLength + currSeq.matchLength - endPosInSequence, idx, endPosInSequence); - if (endPosInSequence > litLength) { - U32 firstHalfMatchLength; - litLength = startPosInSequence >= litLength ? 0 : litLength - startPosInSequence; - firstHalfMatchLength = endPosInSequence - startPosInSequence - litLength; - if (matchLength > blockSize && firstHalfMatchLength >= cctx->appliedParams.cParams.minMatch) { - /* Only ever split the match if it is larger than the block size */ - U32 secondHalfMatchLength = currSeq.matchLength + currSeq.litLength - endPosInSequence; - if (secondHalfMatchLength < cctx->appliedParams.cParams.minMatch) { - /* Move the endPosInSequence backward so that it creates match of minMatch length */ - endPosInSequence -= cctx->appliedParams.cParams.minMatch - secondHalfMatchLength; - bytesAdjustment = cctx->appliedParams.cParams.minMatch - secondHalfMatchLength; - firstHalfMatchLength -= bytesAdjustment; - } - matchLength = firstHalfMatchLength; - /* Flag that we split the last match - after storing the sequence, exit the loop, - but keep the value of endPosInSequence */ - finalMatchSplit = 1; - } else { - /* Move the position in sequence backwards so that we don't split match, and break to store - * the last literals. We use the original currSeq.litLength as a marker for where endPosInSequence - * should go. We prefer to do this whenever it is not necessary to split the match, or if doing so - * would cause the first half of the match to be too small - */ - bytesAdjustment = endPosInSequence - currSeq.litLength; - endPosInSequence = currSeq.litLength; - break; - } - } else { - /* This sequence ends inside the literals, break to store the last literals */ - break; - } - } - /* Check if this offset can be represented with a repcode */ - { U32 const ll0 = (litLength == 0); - offBase = ZSTD_finalizeOffBase(rawOffset, updatedRepcodes.rep, ll0); - ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); - } - - if (cctx->appliedParams.validateSequences) { - seqPos->posInSrc += litLength + matchLength; - FORWARD_IF_ERROR(ZSTD_validateSequence(offBase, matchLength, cctx->appliedParams.cParams.minMatch, seqPos->posInSrc, - cctx->appliedParams.cParams.windowLog, dictSize, ZSTD_hasExtSeqProd(&cctx->appliedParams)), - "Sequence validation failed"); - } - DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); - RETURN_ERROR_IF(idx - seqPos->idx >= cctx->seqStore.maxNbSeq, externalSequences_invalid, - "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); - ZSTD_storeSeq(&cctx->seqStore, litLength, ip, iend, offBase, matchLength); - ip += matchLength + litLength; - if (!finalMatchSplit) - idx++; /* Next Sequence */ - } - DEBUGLOG(5, "Ending seq: idx: %u (of: %u ml: %u ll: %u)", idx, inSeqs[idx].offset, inSeqs[idx].matchLength, inSeqs[idx].litLength); - assert(idx == inSeqsSize || endPosInSequence <= inSeqs[idx].litLength + inSeqs[idx].matchLength); - seqPos->idx = idx; - seqPos->posInSequence = endPosInSequence; - ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); - - iend -= bytesAdjustment; - if (ip != iend) { - /* Store any last literals */ - U32 const lastLLSize = (U32)(iend - ip); - assert(ip <= iend); - DEBUGLOG(6, "Storing last literals of size: %u", lastLLSize); - ZSTD_storeLastLiterals(&cctx->seqStore, ip, lastLLSize); - seqPos->posInSrc += lastLLSize; - } - - return (size_t)(iend-istart); -} - -/* @seqPos represents a position within @inSeqs, - * it is read and updated by this function, - * once the goal to produce a block of size @blockSize is reached. - * @return: nb of bytes consumed from @src, necessarily <= @blockSize. - */ -typedef size_t (*ZSTD_SequenceCopier_f)(ZSTD_CCtx* cctx, - ZSTD_SequencePosition* seqPos, - const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, - const void* src, size_t blockSize, - ZSTD_ParamSwitch_e externalRepSearch); - -static ZSTD_SequenceCopier_f ZSTD_selectSequenceCopier(ZSTD_SequenceFormat_e mode) -{ - assert(ZSTD_cParam_withinBounds(ZSTD_c_blockDelimiters, (int)mode)); - if (mode == ZSTD_sf_explicitBlockDelimiters) { - return ZSTD_transferSequences_wBlockDelim; - } - assert(mode == ZSTD_sf_noBlockDelimiters); - return ZSTD_transferSequences_noDelim; -} - -/* Discover the size of next block by searching for the delimiter. - * Note that a block delimiter **must** exist in this mode, - * otherwise it's an input error. - * The block size retrieved will be later compared to ensure it remains within bounds */ -static size_t -blockSize_explicitDelimiter(const ZSTD_Sequence* inSeqs, size_t inSeqsSize, ZSTD_SequencePosition seqPos) -{ - int end = 0; - size_t blockSize = 0; - size_t spos = seqPos.idx; - DEBUGLOG(6, "blockSize_explicitDelimiter : seq %zu / %zu", spos, inSeqsSize); - assert(spos <= inSeqsSize); - while (spos < inSeqsSize) { - end = (inSeqs[spos].offset == 0); - blockSize += inSeqs[spos].litLength + inSeqs[spos].matchLength; - if (end) { - if (inSeqs[spos].matchLength != 0) - RETURN_ERROR(externalSequences_invalid, "delimiter format error : both matchlength and offset must be == 0"); - break; - } - spos++; - } - if (!end) - RETURN_ERROR(externalSequences_invalid, "Reached end of sequences without finding a block delimiter"); - return blockSize; -} - -static size_t determine_blockSize(ZSTD_SequenceFormat_e mode, - size_t blockSize, size_t remaining, - const ZSTD_Sequence* inSeqs, size_t inSeqsSize, - ZSTD_SequencePosition seqPos) -{ - DEBUGLOG(6, "determine_blockSize : remainingSize = %zu", remaining); - if (mode == ZSTD_sf_noBlockDelimiters) { - /* Note: more a "target" block size */ - return MIN(remaining, blockSize); - } - assert(mode == ZSTD_sf_explicitBlockDelimiters); - { size_t const explicitBlockSize = blockSize_explicitDelimiter(inSeqs, inSeqsSize, seqPos); - FORWARD_IF_ERROR(explicitBlockSize, "Error while determining block size with explicit delimiters"); - if (explicitBlockSize > blockSize) - RETURN_ERROR(externalSequences_invalid, "sequences incorrectly define a too large block"); - if (explicitBlockSize > remaining) - RETURN_ERROR(externalSequences_invalid, "sequences define a frame longer than source"); - return explicitBlockSize; - } -} - -/* Compress all provided sequences, block-by-block. - * - * Returns the cumulative size of all compressed blocks (including their headers), - * otherwise a ZSTD error. - */ -static size_t -ZSTD_compressSequences_internal(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const ZSTD_Sequence* inSeqs, size_t inSeqsSize, - const void* src, size_t srcSize) -{ - size_t cSize = 0; - size_t remaining = srcSize; - ZSTD_SequencePosition seqPos = {0, 0, 0}; - - const BYTE* ip = (BYTE const*)src; - BYTE* op = (BYTE*)dst; - ZSTD_SequenceCopier_f const sequenceCopier = ZSTD_selectSequenceCopier(cctx->appliedParams.blockDelimiters); - - DEBUGLOG(4, "ZSTD_compressSequences_internal srcSize: %zu, inSeqsSize: %zu", srcSize, inSeqsSize); - /* Special case: empty frame */ - if (remaining == 0) { - U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1); - RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "No room for empty frame block header"); - MEM_writeLE32(op, cBlockHeader24); - op += ZSTD_blockHeaderSize; - dstCapacity -= ZSTD_blockHeaderSize; - cSize += ZSTD_blockHeaderSize; - } - - while (remaining) { - size_t compressedSeqsSize; - size_t cBlockSize; - size_t blockSize = determine_blockSize(cctx->appliedParams.blockDelimiters, - cctx->blockSizeMax, remaining, - inSeqs, inSeqsSize, seqPos); - U32 const lastBlock = (blockSize == remaining); - FORWARD_IF_ERROR(blockSize, "Error while trying to determine block size"); - assert(blockSize <= remaining); - ZSTD_resetSeqStore(&cctx->seqStore); - - blockSize = sequenceCopier(cctx, - &seqPos, inSeqs, inSeqsSize, - ip, blockSize, - cctx->appliedParams.searchForExternalRepcodes); - FORWARD_IF_ERROR(blockSize, "Bad sequence copy"); - - /* If blocks are too small, emit as a nocompress block */ - /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding - * additional 1. We need to revisit and change this logic to be more consistent */ - if (blockSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1+1) { - cBlockSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cBlockSize, "Nocompress block failed"); - DEBUGLOG(5, "Block too small (%zu): data remains uncompressed: cSize=%zu", blockSize, cBlockSize); - cSize += cBlockSize; - ip += blockSize; - op += cBlockSize; - remaining -= blockSize; - dstCapacity -= cBlockSize; - continue; - } - - RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "not enough dstCapacity to write a new compressed block"); - compressedSeqsSize = ZSTD_entropyCompressSeqStore(&cctx->seqStore, - &cctx->blockState.prevCBlock->entropy, &cctx->blockState.nextCBlock->entropy, - &cctx->appliedParams, - op + ZSTD_blockHeaderSize /* Leave space for block header */, dstCapacity - ZSTD_blockHeaderSize, - blockSize, - cctx->tmpWorkspace, cctx->tmpWkspSize /* statically allocated in resetCCtx */, - cctx->bmi2); - FORWARD_IF_ERROR(compressedSeqsSize, "Compressing sequences of block failed"); - DEBUGLOG(5, "Compressed sequences size: %zu", compressedSeqsSize); - - if (!cctx->isFirstBlock && - ZSTD_maybeRLE(&cctx->seqStore) && - ZSTD_isRLE(ip, blockSize)) { - /* Note: don't emit the first block as RLE even if it qualifies because - * doing so will cause the decoder (cli <= v1.4.3 only) to throw an (invalid) error - * "should consume all input error." - */ - compressedSeqsSize = 1; - } - - if (compressedSeqsSize == 0) { - /* ZSTD_noCompressBlock writes the block header as well */ - cBlockSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cBlockSize, "ZSTD_noCompressBlock failed"); - DEBUGLOG(5, "Writing out nocompress block, size: %zu", cBlockSize); - } else if (compressedSeqsSize == 1) { - cBlockSize = ZSTD_rleCompressBlock(op, dstCapacity, *ip, blockSize, lastBlock); - FORWARD_IF_ERROR(cBlockSize, "ZSTD_rleCompressBlock failed"); - DEBUGLOG(5, "Writing out RLE block, size: %zu", cBlockSize); - } else { - U32 cBlockHeader; - /* Error checking and repcodes update */ - ZSTD_blockState_confirmRepcodesAndEntropyTables(&cctx->blockState); - if (cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - - /* Write block header into beginning of block*/ - cBlockHeader = lastBlock + (((U32)bt_compressed)<<1) + (U32)(compressedSeqsSize << 3); - MEM_writeLE24(op, cBlockHeader); - cBlockSize = ZSTD_blockHeaderSize + compressedSeqsSize; - DEBUGLOG(5, "Writing out compressed block, size: %zu", cBlockSize); - } - - cSize += cBlockSize; - - if (lastBlock) { - break; - } else { - ip += blockSize; - op += cBlockSize; - remaining -= blockSize; - dstCapacity -= cBlockSize; - cctx->isFirstBlock = 0; - } - DEBUGLOG(5, "cSize running total: %zu (remaining dstCapacity=%zu)", cSize, dstCapacity); - } - - DEBUGLOG(4, "cSize final total: %zu", cSize); - return cSize; -} - -size_t ZSTD_compressSequences(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const ZSTD_Sequence* inSeqs, size_t inSeqsSize, - const void* src, size_t srcSize) -{ - BYTE* op = (BYTE*)dst; - size_t cSize = 0; - - /* Transparent initialization stage, same as compressStream2() */ - DEBUGLOG(4, "ZSTD_compressSequences (nbSeqs=%zu,dstCapacity=%zu)", inSeqsSize, dstCapacity); - assert(cctx != NULL); - FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, srcSize), "CCtx initialization failed"); - - /* Begin writing output, starting with frame header */ - { size_t const frameHeaderSize = ZSTD_writeFrameHeader(op, dstCapacity, - &cctx->appliedParams, srcSize, cctx->dictID); - op += frameHeaderSize; - assert(frameHeaderSize <= dstCapacity); - dstCapacity -= frameHeaderSize; - cSize += frameHeaderSize; - } - if (cctx->appliedParams.fParams.checksumFlag && srcSize) { - XXH64_update(&cctx->xxhState, src, srcSize); - } - - /* Now generate compressed blocks */ - { size_t const cBlocksSize = ZSTD_compressSequences_internal(cctx, - op, dstCapacity, - inSeqs, inSeqsSize, - src, srcSize); - FORWARD_IF_ERROR(cBlocksSize, "Compressing blocks failed!"); - cSize += cBlocksSize; - assert(cBlocksSize <= dstCapacity); - dstCapacity -= cBlocksSize; - } - - /* Complete with frame checksum, if needed */ - if (cctx->appliedParams.fParams.checksumFlag) { - U32 const checksum = (U32) XXH64_digest(&cctx->xxhState); - RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for checksum"); - DEBUGLOG(4, "Write checksum : %08X", (unsigned)checksum); - MEM_writeLE32((char*)dst + cSize, checksum); - cSize += 4; - } - - DEBUGLOG(4, "Final compressed size: %zu", cSize); - return cSize; -} - - -#if defined(__AVX2__) - -#include /* AVX2 intrinsics */ - -/* - * Convert 2 sequences per iteration, using AVX2 intrinsics: - * - offset -> offBase = offset + 2 - * - litLength -> (U16) litLength - * - matchLength -> (U16)(matchLength - 3) - * - rep is ignored - * Store only 8 bytes per SeqDef (offBase[4], litLength[2], mlBase[2]). - * - * At the end, instead of extracting two __m128i, - * we use _mm256_permute4x64_epi64(..., 0xE8) to move lane2 into lane1, - * then store the lower 16 bytes in one go. - * - * @returns 0 on succes, with no long length detected - * @returns > 0 if there is one long length (> 65535), - * indicating the position, and type. - */ -static size_t convertSequences_noRepcodes( - SeqDef* dstSeqs, - const ZSTD_Sequence* inSeqs, - size_t nbSequences) -{ - /* - * addition: - * For each 128-bit half: (offset+2, litLength+0, matchLength-3, rep+0) - */ - const __m256i addition = _mm256_setr_epi32( - ZSTD_REP_NUM, 0, -MINMATCH, 0, /* for sequence i */ - ZSTD_REP_NUM, 0, -MINMATCH, 0 /* for sequence i+1 */ - ); - - /* limit: check if there is a long length */ - const __m256i limit = _mm256_set1_epi32(65535); - - /* - * shuffle mask for byte-level rearrangement in each 128-bit half: - * - * Input layout (after addition) per 128-bit half: - * [ offset+2 (4 bytes) | litLength (4 bytes) | matchLength (4 bytes) | rep (4 bytes) ] - * We only need: - * offBase (4 bytes) = offset+2 - * litLength (2 bytes) = low 2 bytes of litLength - * mlBase (2 bytes) = low 2 bytes of (matchLength) - * => Bytes [0..3, 4..5, 8..9], zero the rest. - */ - const __m256i mask = _mm256_setr_epi8( - /* For the lower 128 bits => sequence i */ - 0, 1, 2, 3, /* offset+2 */ - 4, 5, /* litLength (16 bits) */ - 8, 9, /* matchLength (16 bits) */ - (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, - (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, - - /* For the upper 128 bits => sequence i+1 */ - 16,17,18,19, /* offset+2 */ - 20,21, /* litLength */ - 24,25, /* matchLength */ - (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, - (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80 - ); - - /* - * Next, we'll use _mm256_permute4x64_epi64(vshf, 0xE8). - * Explanation of 0xE8 = 11101000b => [lane0, lane2, lane2, lane3]. - * So the lower 128 bits become [lane0, lane2] => combining seq0 and seq1. - */ -#define PERM_LANE_0X_E8 0xE8 /* [0,2,2,3] in lane indices */ - - size_t longLen = 0, i = 0; - - /* AVX permutation depends on the specific definition of target structures */ - ZSTD_STATIC_ASSERT(sizeof(ZSTD_Sequence) == 16); - ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, offset) == 0); - ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, litLength) == 4); - ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, matchLength) == 8); - ZSTD_STATIC_ASSERT(sizeof(SeqDef) == 8); - ZSTD_STATIC_ASSERT(offsetof(SeqDef, offBase) == 0); - ZSTD_STATIC_ASSERT(offsetof(SeqDef, litLength) == 4); - ZSTD_STATIC_ASSERT(offsetof(SeqDef, mlBase) == 6); - - /* Process 2 sequences per loop iteration */ - for (; i + 1 < nbSequences; i += 2) { - /* Load 2 ZSTD_Sequence (32 bytes) */ - __m256i vin = _mm256_loadu_si256((const __m256i*)(const void*)&inSeqs[i]); - - /* Add {2, 0, -3, 0} in each 128-bit half */ - __m256i vadd = _mm256_add_epi32(vin, addition); - - /* Check for long length */ - __m256i ll_cmp = _mm256_cmpgt_epi32(vadd, limit); /* 0xFFFFFFFF for element > 65535 */ - int ll_res = _mm256_movemask_epi8(ll_cmp); - - /* Shuffle bytes so each half gives us the 8 bytes we need */ - __m256i vshf = _mm256_shuffle_epi8(vadd, mask); - /* - * Now: - * Lane0 = seq0's 8 bytes - * Lane1 = 0 - * Lane2 = seq1's 8 bytes - * Lane3 = 0 - */ - - /* Permute 64-bit lanes => move Lane2 down into Lane1. */ - __m256i vperm = _mm256_permute4x64_epi64(vshf, PERM_LANE_0X_E8); - /* - * Now the lower 16 bytes (Lane0+Lane1) = [seq0, seq1]. - * The upper 16 bytes are [Lane2, Lane3] = [seq1, 0], but we won't use them. - */ - - /* Store only the lower 16 bytes => 2 SeqDef (8 bytes each) */ - _mm_storeu_si128((__m128i *)(void*)&dstSeqs[i], _mm256_castsi256_si128(vperm)); - /* - * This writes out 16 bytes total: - * - offset 0..7 => seq0 (offBase, litLength, mlBase) - * - offset 8..15 => seq1 (offBase, litLength, mlBase) - */ - - /* check (unlikely) long lengths > 65535 - * indices for lengths correspond to bits [4..7], [8..11], [20..23], [24..27] - * => combined mask = 0x0FF00FF0 - */ - if (UNLIKELY((ll_res & 0x0FF00FF0) != 0)) { - /* long length detected: let's figure out which one*/ - if (inSeqs[i].matchLength > 65535+MINMATCH) { - assert(longLen == 0); - longLen = i + 1; - } - if (inSeqs[i].litLength > 65535) { - assert(longLen == 0); - longLen = i + nbSequences + 1; - } - if (inSeqs[i+1].matchLength > 65535+MINMATCH) { - assert(longLen == 0); - longLen = i + 1 + 1; - } - if (inSeqs[i+1].litLength > 65535) { - assert(longLen == 0); - longLen = i + 1 + nbSequences + 1; - } - } - } - - /* Handle leftover if @nbSequences is odd */ - if (i < nbSequences) { - /* process last sequence */ - assert(i == nbSequences - 1); - dstSeqs[i].offBase = OFFSET_TO_OFFBASE(inSeqs[i].offset); - dstSeqs[i].litLength = (U16)inSeqs[i].litLength; - dstSeqs[i].mlBase = (U16)(inSeqs[i].matchLength - MINMATCH); - /* check (unlikely) long lengths > 65535 */ - if (UNLIKELY(inSeqs[i].matchLength > 65535+MINMATCH)) { - assert(longLen == 0); - longLen = i + 1; - } - if (UNLIKELY(inSeqs[i].litLength > 65535)) { - assert(longLen == 0); - longLen = i + nbSequences + 1; - } - } - - return longLen; -} - -/* the vector implementation could also be ported to SSSE3, - * but since this implementation is targeting modern systems (>= Sapphire Rapid), - * it's not useful to develop and maintain code for older pre-AVX2 platforms */ - -#else /* no AVX2 */ - -static size_t convertSequences_noRepcodes( - SeqDef* dstSeqs, - const ZSTD_Sequence* inSeqs, - size_t nbSequences) -{ - size_t longLen = 0; - size_t n; - for (n=0; n 65535 */ - if (UNLIKELY(inSeqs[n].matchLength > 65535+MINMATCH)) { - assert(longLen == 0); - longLen = n + 1; - } - if (UNLIKELY(inSeqs[n].litLength > 65535)) { - assert(longLen == 0); - longLen = n + nbSequences + 1; - } - } - return longLen; -} - -#endif - -/* - * Precondition: Sequences must end on an explicit Block Delimiter - * @return: 0 on success, or an error code. - * Note: Sequence validation functionality has been disabled (removed). - * This is helpful to generate a lean main pipeline, improving performance. - * It may be re-inserted later. - */ -size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx, - const ZSTD_Sequence* const inSeqs, size_t nbSequences, - int repcodeResolution) -{ - Repcodes_t updatedRepcodes; - size_t seqNb = 0; - - DEBUGLOG(5, "ZSTD_convertBlockSequences (nbSequences = %zu)", nbSequences); - - RETURN_ERROR_IF(nbSequences >= cctx->seqStore.maxNbSeq, externalSequences_invalid, - "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); - - ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); - - /* check end condition */ - assert(nbSequences >= 1); - assert(inSeqs[nbSequences-1].matchLength == 0); - assert(inSeqs[nbSequences-1].offset == 0); - - /* Convert Sequences from public format to internal format */ - if (!repcodeResolution) { - size_t const longl = convertSequences_noRepcodes(cctx->seqStore.sequencesStart, inSeqs, nbSequences-1); - cctx->seqStore.sequences = cctx->seqStore.sequencesStart + nbSequences-1; - if (longl) { - DEBUGLOG(5, "long length"); - assert(cctx->seqStore.longLengthType == ZSTD_llt_none); - if (longl <= nbSequences-1) { - DEBUGLOG(5, "long match length detected at pos %zu", longl-1); - cctx->seqStore.longLengthType = ZSTD_llt_matchLength; - cctx->seqStore.longLengthPos = (U32)(longl-1); - } else { - DEBUGLOG(5, "long literals length detected at pos %zu", longl-nbSequences); - assert(longl <= 2* (nbSequences-1)); - cctx->seqStore.longLengthType = ZSTD_llt_literalLength; - cctx->seqStore.longLengthPos = (U32)(longl-(nbSequences-1)-1); - } - } - } else { - for (seqNb = 0; seqNb < nbSequences - 1 ; seqNb++) { - U32 const litLength = inSeqs[seqNb].litLength; - U32 const matchLength = inSeqs[seqNb].matchLength; - U32 const ll0 = (litLength == 0); - U32 const offBase = ZSTD_finalizeOffBase(inSeqs[seqNb].offset, updatedRepcodes.rep, ll0); - - DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); - ZSTD_storeSeqOnly(&cctx->seqStore, litLength, offBase, matchLength); - ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); - } - } - - /* If we skipped repcode search while parsing, we need to update repcodes now */ - if (!repcodeResolution && nbSequences > 1) { - U32* const rep = updatedRepcodes.rep; - - if (nbSequences >= 4) { - U32 lastSeqIdx = (U32)nbSequences - 2; /* index of last full sequence */ - rep[2] = inSeqs[lastSeqIdx - 2].offset; - rep[1] = inSeqs[lastSeqIdx - 1].offset; - rep[0] = inSeqs[lastSeqIdx].offset; - } else if (nbSequences == 3) { - rep[2] = rep[0]; - rep[1] = inSeqs[0].offset; - rep[0] = inSeqs[1].offset; - } else { - assert(nbSequences == 2); - rep[2] = rep[1]; - rep[1] = rep[0]; - rep[0] = inSeqs[0].offset; - } - } - - ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); - - return 0; -} - -#if defined(ZSTD_ARCH_X86_AVX2) - -BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs) -{ - size_t i; - __m256i const zeroVec = _mm256_setzero_si256(); - __m256i sumVec = zeroVec; /* accumulates match+lit in 32-bit lanes */ - ZSTD_ALIGNED(32) U32 tmp[8]; /* temporary buffer for reduction */ - size_t mSum = 0, lSum = 0; - ZSTD_STATIC_ASSERT(sizeof(ZSTD_Sequence) == 16); - - /* Process 2 structs (32 bytes) at a time */ - for (i = 0; i + 2 <= nbSeqs; i += 2) { - /* Load two consecutive ZSTD_Sequence (8×4 = 32 bytes) */ - __m256i data = _mm256_loadu_si256((const __m256i*)(const void*)&seqs[i]); - /* check end of block signal */ - __m256i cmp = _mm256_cmpeq_epi32(data, zeroVec); - int cmp_res = _mm256_movemask_epi8(cmp); - /* indices for match lengths correspond to bits [8..11], [24..27] - * => combined mask = 0x0F000F00 */ - ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, matchLength) == 8); - if (cmp_res & 0x0F000F00) break; - /* Accumulate in sumVec */ - sumVec = _mm256_add_epi32(sumVec, data); - } - - /* Horizontal reduction */ - _mm256_store_si256((__m256i*)tmp, sumVec); - lSum = tmp[1] + tmp[5]; - mSum = tmp[2] + tmp[6]; - - /* Handle the leftover */ - for (; i < nbSeqs; i++) { - lSum += seqs[i].litLength; - mSum += seqs[i].matchLength; - if (seqs[i].matchLength == 0) break; /* end of block */ - } - - if (i==nbSeqs) { - /* reaching end of sequences: end of block signal was not present */ - BlockSummary bs; - bs.nbSequences = ERROR(externalSequences_invalid); - return bs; - } - { BlockSummary bs; - bs.nbSequences = i+1; - bs.blockSize = lSum + mSum; - bs.litSize = lSum; - return bs; - } -} - -#else - -BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs) -{ - size_t totalMatchSize = 0; - size_t litSize = 0; - size_t n; - assert(seqs); - for (n=0; nappliedParams.searchForExternalRepcodes == ZSTD_ps_enable); - assert(cctx->appliedParams.searchForExternalRepcodes != ZSTD_ps_auto); - - DEBUGLOG(4, "ZSTD_compressSequencesAndLiterals_internal: nbSeqs=%zu, litSize=%zu", nbSequences, litSize); - RETURN_ERROR_IF(nbSequences == 0, externalSequences_invalid, "Requires at least 1 end-of-block"); - - /* Special case: empty frame */ - if ((nbSequences == 1) && (inSeqs[0].litLength == 0)) { - U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1); - RETURN_ERROR_IF(dstCapacity<3, dstSize_tooSmall, "No room for empty frame block header"); - MEM_writeLE24(op, cBlockHeader24); - op += ZSTD_blockHeaderSize; - dstCapacity -= ZSTD_blockHeaderSize; - cSize += ZSTD_blockHeaderSize; - } - - while (nbSequences) { - size_t compressedSeqsSize, cBlockSize, conversionStatus; - BlockSummary const block = ZSTD_get1BlockSummary(inSeqs, nbSequences); - U32 const lastBlock = (block.nbSequences == nbSequences); - FORWARD_IF_ERROR(block.nbSequences, "Error while trying to determine nb of sequences for a block"); - assert(block.nbSequences <= nbSequences); - RETURN_ERROR_IF(block.litSize > litSize, externalSequences_invalid, "discrepancy: Sequences require more literals than present in buffer"); - ZSTD_resetSeqStore(&cctx->seqStore); - - conversionStatus = ZSTD_convertBlockSequences(cctx, - inSeqs, block.nbSequences, - repcodeResolution); - FORWARD_IF_ERROR(conversionStatus, "Bad sequence conversion"); - inSeqs += block.nbSequences; - nbSequences -= block.nbSequences; - remaining -= block.blockSize; - - /* Note: when blockSize is very small, other variant send it uncompressed. - * Here, we still send the sequences, because we don't have the original source to send it uncompressed. - * One could imagine in theory reproducing the source from the sequences, - * but that's complex and costly memory intensive, and goes against the objectives of this variant. */ - - RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "not enough dstCapacity to write a new compressed block"); - - compressedSeqsSize = ZSTD_entropyCompressSeqStore_internal( - op + ZSTD_blockHeaderSize /* Leave space for block header */, dstCapacity - ZSTD_blockHeaderSize, - literals, block.litSize, - &cctx->seqStore, - &cctx->blockState.prevCBlock->entropy, &cctx->blockState.nextCBlock->entropy, - &cctx->appliedParams, - cctx->tmpWorkspace, cctx->tmpWkspSize /* statically allocated in resetCCtx */, - cctx->bmi2); - FORWARD_IF_ERROR(compressedSeqsSize, "Compressing sequences of block failed"); - /* note: the spec forbids for any compressed block to be larger than maximum block size */ - if (compressedSeqsSize > cctx->blockSizeMax) compressedSeqsSize = 0; - DEBUGLOG(5, "Compressed sequences size: %zu", compressedSeqsSize); - litSize -= block.litSize; - literals = (const char*)literals + block.litSize; - - /* Note: difficult to check source for RLE block when only Literals are provided, - * but it could be considered from analyzing the sequence directly */ - - if (compressedSeqsSize == 0) { - /* Sending uncompressed blocks is out of reach, because the source is not provided. - * In theory, one could use the sequences to regenerate the source, like a decompressor, - * but it's complex, and memory hungry, killing the purpose of this variant. - * Current outcome: generate an error code. - */ - RETURN_ERROR(cannotProduce_uncompressedBlock, "ZSTD_compressSequencesAndLiterals cannot generate an uncompressed block"); - } else { - U32 cBlockHeader; - assert(compressedSeqsSize > 1); /* no RLE */ - /* Error checking and repcodes update */ - ZSTD_blockState_confirmRepcodesAndEntropyTables(&cctx->blockState); - if (cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) - cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; - - /* Write block header into beginning of block*/ - cBlockHeader = lastBlock + (((U32)bt_compressed)<<1) + (U32)(compressedSeqsSize << 3); - MEM_writeLE24(op, cBlockHeader); - cBlockSize = ZSTD_blockHeaderSize + compressedSeqsSize; - DEBUGLOG(5, "Writing out compressed block, size: %zu", cBlockSize); - } - - cSize += cBlockSize; - op += cBlockSize; - dstCapacity -= cBlockSize; - cctx->isFirstBlock = 0; - DEBUGLOG(5, "cSize running total: %zu (remaining dstCapacity=%zu)", cSize, dstCapacity); - - if (lastBlock) { - assert(nbSequences == 0); - break; - } - } - - RETURN_ERROR_IF(litSize != 0, externalSequences_invalid, "literals must be entirely and exactly consumed"); - RETURN_ERROR_IF(remaining != 0, externalSequences_invalid, "Sequences must represent a total of exactly srcSize=%zu", srcSize); - DEBUGLOG(4, "cSize final total: %zu", cSize); - return cSize; -} - -size_t -ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const ZSTD_Sequence* inSeqs, size_t inSeqsSize, - const void* literals, size_t litSize, size_t litCapacity, - size_t decompressedSize) -{ - BYTE* op = (BYTE*)dst; - size_t cSize = 0; - - /* Transparent initialization stage, same as compressStream2() */ - DEBUGLOG(4, "ZSTD_compressSequencesAndLiterals (dstCapacity=%zu)", dstCapacity); - assert(cctx != NULL); - if (litCapacity < litSize) { - RETURN_ERROR(workSpace_tooSmall, "literals buffer is not large enough: must be at least 8 bytes larger than litSize (risk of read out-of-bound)"); - } - FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, decompressedSize), "CCtx initialization failed"); - - if (cctx->appliedParams.blockDelimiters == ZSTD_sf_noBlockDelimiters) { - RETURN_ERROR(frameParameter_unsupported, "This mode is only compatible with explicit delimiters"); - } - if (cctx->appliedParams.validateSequences) { - RETURN_ERROR(parameter_unsupported, "This mode is not compatible with Sequence validation"); - } - if (cctx->appliedParams.fParams.checksumFlag) { - RETURN_ERROR(frameParameter_unsupported, "this mode is not compatible with frame checksum"); - } - - /* Begin writing output, starting with frame header */ - { size_t const frameHeaderSize = ZSTD_writeFrameHeader(op, dstCapacity, - &cctx->appliedParams, decompressedSize, cctx->dictID); - op += frameHeaderSize; - assert(frameHeaderSize <= dstCapacity); - dstCapacity -= frameHeaderSize; - cSize += frameHeaderSize; - } - - /* Now generate compressed blocks */ - { size_t const cBlocksSize = ZSTD_compressSequencesAndLiterals_internal(cctx, - op, dstCapacity, - inSeqs, inSeqsSize, - literals, litSize, decompressedSize); - FORWARD_IF_ERROR(cBlocksSize, "Compressing blocks failed!"); - cSize += cBlocksSize; - assert(cBlocksSize <= dstCapacity); - dstCapacity -= cBlocksSize; - } - - DEBUGLOG(4, "Final compressed size: %zu", cSize); - return cSize; -} - -/*====== Finalize ======*/ - -static ZSTD_inBuffer inBuffer_forEndFlush(const ZSTD_CStream* zcs) -{ - const ZSTD_inBuffer nullInput = { NULL, 0, 0 }; - const int stableInput = (zcs->appliedParams.inBufferMode == ZSTD_bm_stable); - return stableInput ? zcs->expectedInBuffer : nullInput; -} - -/*! ZSTD_flushStream() : - * @return : amount of data remaining to flush */ -size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) -{ - ZSTD_inBuffer input = inBuffer_forEndFlush(zcs); - input.size = input.pos; /* do not ingest more input during flush */ - return ZSTD_compressStream2(zcs, output, &input, ZSTD_e_flush); -} - -size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) -{ - ZSTD_inBuffer input = inBuffer_forEndFlush(zcs); - size_t const remainingToFlush = ZSTD_compressStream2(zcs, output, &input, ZSTD_e_end); - FORWARD_IF_ERROR(remainingToFlush , "ZSTD_compressStream2(,,ZSTD_e_end) failed"); - if (zcs->appliedParams.nbWorkers > 0) return remainingToFlush; /* minimal estimation */ - /* single thread mode : attempt to calculate remaining to flush more precisely */ - { size_t const lastBlockSize = zcs->frameEnded ? 0 : ZSTD_BLOCKHEADERSIZE; - size_t const checksumSize = (size_t)(zcs->frameEnded ? 0 : zcs->appliedParams.fParams.checksumFlag * 4); - size_t const toFlush = remainingToFlush + lastBlockSize + checksumSize; - DEBUGLOG(4, "ZSTD_endStream : remaining to flush : %u", (unsigned)toFlush); - return toFlush; - } -} - - -/*-===== Pre-defined compression levels =====-*/ -#include "clevels.h" - -int ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; } -int ZSTD_minCLevel(void) { return (int)-ZSTD_TARGETLENGTH_MAX; } -int ZSTD_defaultCLevel(void) { return ZSTD_CLEVEL_DEFAULT; } - -static ZSTD_compressionParameters ZSTD_dedicatedDictSearch_getCParams(int const compressionLevel, size_t const dictSize) -{ - ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, 0, dictSize, ZSTD_cpm_createCDict); - switch (cParams.strategy) { - case ZSTD_fast: - case ZSTD_dfast: - break; - case ZSTD_greedy: - case ZSTD_lazy: - case ZSTD_lazy2: - cParams.hashLog += ZSTD_LAZY_DDSS_BUCKET_LOG; - break; - case ZSTD_btlazy2: - case ZSTD_btopt: - case ZSTD_btultra: - case ZSTD_btultra2: - break; - } - return cParams; -} - -static int ZSTD_dedicatedDictSearch_isSupported( - ZSTD_compressionParameters const* cParams) -{ - return (cParams->strategy >= ZSTD_greedy) - && (cParams->strategy <= ZSTD_lazy2) - && (cParams->hashLog > cParams->chainLog) - && (cParams->chainLog <= 24); -} - -/** - * Reverses the adjustment applied to cparams when enabling dedicated dict - * search. This is used to recover the params set to be used in the working - * context. (Otherwise, those tables would also grow.) - */ -static void ZSTD_dedicatedDictSearch_revertCParams( - ZSTD_compressionParameters* cParams) { - switch (cParams->strategy) { - case ZSTD_fast: - case ZSTD_dfast: - break; - case ZSTD_greedy: - case ZSTD_lazy: - case ZSTD_lazy2: - cParams->hashLog -= ZSTD_LAZY_DDSS_BUCKET_LOG; - if (cParams->hashLog < ZSTD_HASHLOG_MIN) { - cParams->hashLog = ZSTD_HASHLOG_MIN; - } - break; - case ZSTD_btlazy2: - case ZSTD_btopt: - case ZSTD_btultra: - case ZSTD_btultra2: - break; - } -} - -static U64 ZSTD_getCParamRowSize(U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) -{ - switch (mode) { - case ZSTD_cpm_unknown: - case ZSTD_cpm_noAttachDict: - case ZSTD_cpm_createCDict: - break; - case ZSTD_cpm_attachDict: - dictSize = 0; - break; - default: - assert(0); - break; - } - { int const unknown = srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN; - size_t const addedSize = unknown && dictSize > 0 ? 500 : 0; - return unknown && dictSize == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : srcSizeHint+dictSize+addedSize; - } -} - -/*! ZSTD_getCParams_internal() : - * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. - * Note: srcSizeHint 0 means 0, use ZSTD_CONTENTSIZE_UNKNOWN for unknown. - * Use dictSize == 0 for unknown or unused. - * Note: `mode` controls how we treat the `dictSize`. See docs for `ZSTD_CParamMode_e`. */ -static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) -{ - U64 const rSize = ZSTD_getCParamRowSize(srcSizeHint, dictSize, mode); - U32 const tableID = (rSize <= 256 KB) + (rSize <= 128 KB) + (rSize <= 16 KB); - int row; - DEBUGLOG(5, "ZSTD_getCParams_internal (cLevel=%i)", compressionLevel); - - /* row */ - if (compressionLevel == 0) row = ZSTD_CLEVEL_DEFAULT; /* 0 == default */ - else if (compressionLevel < 0) row = 0; /* entry 0 is baseline for fast mode */ - else if (compressionLevel > ZSTD_MAX_CLEVEL) row = ZSTD_MAX_CLEVEL; - else row = compressionLevel; - - { ZSTD_compressionParameters cp = ZSTD_defaultCParameters[tableID][row]; - DEBUGLOG(5, "ZSTD_getCParams_internal selected tableID: %u row: %u strat: %u", tableID, row, (U32)cp.strategy); - /* acceleration factor */ - if (compressionLevel < 0) { - int const clampedCompressionLevel = MAX(ZSTD_minCLevel(), compressionLevel); - cp.targetLength = (unsigned)(-clampedCompressionLevel); - } - /* refine parameters based on srcSize & dictSize */ - return ZSTD_adjustCParams_internal(cp, srcSizeHint, dictSize, mode, ZSTD_ps_auto); - } -} - -/*! ZSTD_getCParams() : - * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. - * Size values are optional, provide 0 if not known or unused */ -ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) -{ - if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; - return ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize, ZSTD_cpm_unknown); -} - -/*! ZSTD_getParams() : - * same idea as ZSTD_getCParams() - * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). - * Fields of `ZSTD_frameParameters` are set to default values */ -static ZSTD_parameters -ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) -{ - ZSTD_parameters params; - ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize, mode); - DEBUGLOG(5, "ZSTD_getParams (cLevel=%i)", compressionLevel); - ZSTD_memset(¶ms, 0, sizeof(params)); - params.cParams = cParams; - params.fParams.contentSizeFlag = 1; - return params; -} - -/*! ZSTD_getParams() : - * same idea as ZSTD_getCParams() - * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). - * Fields of `ZSTD_frameParameters` are set to default values */ -ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) -{ - if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; - return ZSTD_getParams_internal(compressionLevel, srcSizeHint, dictSize, ZSTD_cpm_unknown); -} - -void ZSTD_registerSequenceProducer( - ZSTD_CCtx* zc, - void* extSeqProdState, - ZSTD_sequenceProducer_F extSeqProdFunc) -{ - assert(zc != NULL); - ZSTD_CCtxParams_registerSequenceProducer( - &zc->requestedParams, extSeqProdState, extSeqProdFunc - ); -} - -void ZSTD_CCtxParams_registerSequenceProducer( - ZSTD_CCtx_params* params, - void* extSeqProdState, - ZSTD_sequenceProducer_F extSeqProdFunc) -{ - assert(params != NULL); - if (extSeqProdFunc != NULL) { - params->extSeqProdFunc = extSeqProdFunc; - params->extSeqProdState = extSeqProdState; - } else { - params->extSeqProdFunc = NULL; - params->extSeqProdState = NULL; - } -} diff --git a/third_party/zstd/lib/compress/zstd_compress_internal.h b/third_party/zstd/lib/compress/zstd_compress_internal.h deleted file mode 100644 index ca5e2a4..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_internal.h +++ /dev/null @@ -1,1636 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* This header contains definitions - * that shall **only** be used by modules within lib/compress. - */ - -#ifndef ZSTD_COMPRESS_H -#define ZSTD_COMPRESS_H - -/*-************************************* -* Dependencies -***************************************/ -#include "../common/zstd_internal.h" -#include "zstd_cwksp.h" -#ifdef ZSTD_MULTITHREAD -# include "zstdmt_compress.h" -#endif -#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_NbCommonBytes */ -#include "zstd_preSplit.h" /* ZSTD_SLIPBLOCK_WORKSPACESIZE */ - -/*-************************************* -* Constants -***************************************/ -#define kSearchStrength 8 -#define HASH_READ_SIZE 8 -#define ZSTD_DUBT_UNSORTED_MARK 1 /* For btlazy2 strategy, index ZSTD_DUBT_UNSORTED_MARK==1 means "unsorted". - It could be confused for a real successor at index "1", if sorted as larger than its predecessor. - It's not a big deal though : candidate will just be sorted again. - Additionally, candidate position 1 will be lost. - But candidate 1 cannot hide a large tree of candidates, so it's a minimal loss. - The benefit is that ZSTD_DUBT_UNSORTED_MARK cannot be mishandled after table reuse with a different strategy. - This constant is required by ZSTD_compressBlock_btlazy2() and ZSTD_reduceTable_internal() */ - - -/*-************************************* -* Context memory management -***************************************/ -typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e; -typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage; - -typedef struct ZSTD_prefixDict_s { - const void* dict; - size_t dictSize; - ZSTD_dictContentType_e dictContentType; -} ZSTD_prefixDict; - -typedef struct { - void* dictBuffer; - void const* dict; - size_t dictSize; - ZSTD_dictContentType_e dictContentType; - ZSTD_CDict* cdict; -} ZSTD_localDict; - -typedef struct { - HUF_CElt CTable[HUF_CTABLE_SIZE_ST(255)]; - HUF_repeat repeatMode; -} ZSTD_hufCTables_t; - -typedef struct { - FSE_CTable offcodeCTable[FSE_CTABLE_SIZE_U32(OffFSELog, MaxOff)]; - FSE_CTable matchlengthCTable[FSE_CTABLE_SIZE_U32(MLFSELog, MaxML)]; - FSE_CTable litlengthCTable[FSE_CTABLE_SIZE_U32(LLFSELog, MaxLL)]; - FSE_repeat offcode_repeatMode; - FSE_repeat matchlength_repeatMode; - FSE_repeat litlength_repeatMode; -} ZSTD_fseCTables_t; - -typedef struct { - ZSTD_hufCTables_t huf; - ZSTD_fseCTables_t fse; -} ZSTD_entropyCTables_t; - -/*********************************************** -* Sequences * -***********************************************/ -typedef struct SeqDef_s { - U32 offBase; /* offBase == Offset + ZSTD_REP_NUM, or repcode 1,2,3 */ - U16 litLength; - U16 mlBase; /* mlBase == matchLength - MINMATCH */ -} SeqDef; - -/* Controls whether seqStore has a single "long" litLength or matchLength. See SeqStore_t. */ -typedef enum { - ZSTD_llt_none = 0, /* no longLengthType */ - ZSTD_llt_literalLength = 1, /* represents a long literal */ - ZSTD_llt_matchLength = 2 /* represents a long match */ -} ZSTD_longLengthType_e; - -typedef struct { - SeqDef* sequencesStart; - SeqDef* sequences; /* ptr to end of sequences */ - BYTE* litStart; - BYTE* lit; /* ptr to end of literals */ - BYTE* llCode; - BYTE* mlCode; - BYTE* ofCode; - size_t maxNbSeq; - size_t maxNbLit; - - /* longLengthPos and longLengthType to allow us to represent either a single litLength or matchLength - * in the seqStore that has a value larger than U16 (if it exists). To do so, we increment - * the existing value of the litLength or matchLength by 0x10000. - */ - ZSTD_longLengthType_e longLengthType; - U32 longLengthPos; /* Index of the sequence to apply long length modification to */ -} SeqStore_t; - -typedef struct { - U32 litLength; - U32 matchLength; -} ZSTD_SequenceLength; - -/** - * Returns the ZSTD_SequenceLength for the given sequences. It handles the decoding of long sequences - * indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength. - */ -MEM_STATIC ZSTD_SequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq) -{ - ZSTD_SequenceLength seqLen; - seqLen.litLength = seq->litLength; - seqLen.matchLength = seq->mlBase + MINMATCH; - if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) { - if (seqStore->longLengthType == ZSTD_llt_literalLength) { - seqLen.litLength += 0x10000; - } - if (seqStore->longLengthType == ZSTD_llt_matchLength) { - seqLen.matchLength += 0x10000; - } - } - return seqLen; -} - -const SeqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx); /* compress & dictBuilder */ -int ZSTD_seqToCodes(const SeqStore_t* seqStorePtr); /* compress, dictBuilder, decodeCorpus (shouldn't get its definition from here) */ - - -/*********************************************** -* Entropy buffer statistics structs and funcs * -***********************************************/ -/** ZSTD_hufCTablesMetadata_t : - * Stores Literals Block Type for a super-block in hType, and - * huffman tree description in hufDesBuffer. - * hufDesSize refers to the size of huffman tree description in bytes. - * This metadata is populated in ZSTD_buildBlockEntropyStats_literals() */ -typedef struct { - SymbolEncodingType_e hType; - BYTE hufDesBuffer[ZSTD_MAX_HUF_HEADER_SIZE]; - size_t hufDesSize; -} ZSTD_hufCTablesMetadata_t; - -/** ZSTD_fseCTablesMetadata_t : - * Stores symbol compression modes for a super-block in {ll, ol, ml}Type, and - * fse tables in fseTablesBuffer. - * fseTablesSize refers to the size of fse tables in bytes. - * This metadata is populated in ZSTD_buildBlockEntropyStats_sequences() */ -typedef struct { - SymbolEncodingType_e llType; - SymbolEncodingType_e ofType; - SymbolEncodingType_e mlType; - BYTE fseTablesBuffer[ZSTD_MAX_FSE_HEADERS_SIZE]; - size_t fseTablesSize; - size_t lastCountSize; /* This is to account for bug in 1.3.4. More detail in ZSTD_entropyCompressSeqStore_internal() */ -} ZSTD_fseCTablesMetadata_t; - -typedef struct { - ZSTD_hufCTablesMetadata_t hufMetadata; - ZSTD_fseCTablesMetadata_t fseMetadata; -} ZSTD_entropyCTablesMetadata_t; - -/** ZSTD_buildBlockEntropyStats() : - * Builds entropy for the block. - * @return : 0 on success or error code */ -size_t ZSTD_buildBlockEntropyStats( - const SeqStore_t* seqStorePtr, - const ZSTD_entropyCTables_t* prevEntropy, - ZSTD_entropyCTables_t* nextEntropy, - const ZSTD_CCtx_params* cctxParams, - ZSTD_entropyCTablesMetadata_t* entropyMetadata, - void* workspace, size_t wkspSize); - -/********************************* -* Compression internals structs * -*********************************/ - -typedef struct { - U32 off; /* Offset sumtype code for the match, using ZSTD_storeSeq() format */ - U32 len; /* Raw length of match */ -} ZSTD_match_t; - -typedef struct { - U32 offset; /* Offset of sequence */ - U32 litLength; /* Length of literals prior to match */ - U32 matchLength; /* Raw length of match */ -} rawSeq; - -typedef struct { - rawSeq* seq; /* The start of the sequences */ - size_t pos; /* The index in seq where reading stopped. pos <= size. */ - size_t posInSequence; /* The position within the sequence at seq[pos] where reading - stopped. posInSequence <= seq[pos].litLength + seq[pos].matchLength */ - size_t size; /* The number of sequences. <= capacity. */ - size_t capacity; /* The capacity starting from `seq` pointer */ -} RawSeqStore_t; - -UNUSED_ATTR static const RawSeqStore_t kNullRawSeqStore = {NULL, 0, 0, 0, 0}; - -typedef struct { - int price; /* price from beginning of segment to this position */ - U32 off; /* offset of previous match */ - U32 mlen; /* length of previous match */ - U32 litlen; /* nb of literals since previous match */ - U32 rep[ZSTD_REP_NUM]; /* offset history after previous match */ -} ZSTD_optimal_t; - -typedef enum { zop_dynamic=0, zop_predef } ZSTD_OptPrice_e; - -#define ZSTD_OPT_SIZE (ZSTD_OPT_NUM+3) -typedef struct { - /* All tables are allocated inside cctx->workspace by ZSTD_resetCCtx_internal() */ - unsigned* litFreq; /* table of literals statistics, of size 256 */ - unsigned* litLengthFreq; /* table of litLength statistics, of size (MaxLL+1) */ - unsigned* matchLengthFreq; /* table of matchLength statistics, of size (MaxML+1) */ - unsigned* offCodeFreq; /* table of offCode statistics, of size (MaxOff+1) */ - ZSTD_match_t* matchTable; /* list of found matches, of size ZSTD_OPT_SIZE */ - ZSTD_optimal_t* priceTable; /* All positions tracked by optimal parser, of size ZSTD_OPT_SIZE */ - - U32 litSum; /* nb of literals */ - U32 litLengthSum; /* nb of litLength codes */ - U32 matchLengthSum; /* nb of matchLength codes */ - U32 offCodeSum; /* nb of offset codes */ - U32 litSumBasePrice; /* to compare to log2(litfreq) */ - U32 litLengthSumBasePrice; /* to compare to log2(llfreq) */ - U32 matchLengthSumBasePrice;/* to compare to log2(mlfreq) */ - U32 offCodeSumBasePrice; /* to compare to log2(offreq) */ - ZSTD_OptPrice_e priceType; /* prices can be determined dynamically, or follow a pre-defined cost structure */ - const ZSTD_entropyCTables_t* symbolCosts; /* pre-calculated dictionary statistics */ - ZSTD_ParamSwitch_e literalCompressionMode; -} optState_t; - -typedef struct { - ZSTD_entropyCTables_t entropy; - U32 rep[ZSTD_REP_NUM]; -} ZSTD_compressedBlockState_t; - -typedef struct { - BYTE const* nextSrc; /* next block here to continue on current prefix */ - BYTE const* base; /* All regular indexes relative to this position */ - BYTE const* dictBase; /* extDict indexes relative to this position */ - U32 dictLimit; /* below that point, need extDict */ - U32 lowLimit; /* below that point, no more valid data */ - U32 nbOverflowCorrections; /* Number of times overflow correction has run since - * ZSTD_window_init(). Useful for debugging coredumps - * and for ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY. - */ -} ZSTD_window_t; - -#define ZSTD_WINDOW_START_INDEX 2 - -typedef struct ZSTD_MatchState_t ZSTD_MatchState_t; - -#define ZSTD_ROW_HASH_CACHE_SIZE 8 /* Size of prefetching hash cache for row-based matchfinder */ - -struct ZSTD_MatchState_t { - ZSTD_window_t window; /* State for window round buffer management */ - U32 loadedDictEnd; /* index of end of dictionary, within context's referential. - * When loadedDictEnd != 0, a dictionary is in use, and still valid. - * This relies on a mechanism to set loadedDictEnd=0 when dictionary is no longer within distance. - * Such mechanism is provided within ZSTD_window_enforceMaxDist() and ZSTD_checkDictValidity(). - * When dict referential is copied into active context (i.e. not attached), - * loadedDictEnd == dictSize, since referential starts from zero. - */ - U32 nextToUpdate; /* index from which to continue table update */ - U32 hashLog3; /* dispatch table for matches of len==3 : larger == faster, more memory */ - - U32 rowHashLog; /* For row-based matchfinder: Hashlog based on nb of rows in the hashTable.*/ - BYTE* tagTable; /* For row-based matchFinder: A row-based table containing the hashes and head index. */ - U32 hashCache[ZSTD_ROW_HASH_CACHE_SIZE]; /* For row-based matchFinder: a cache of hashes to improve speed */ - U64 hashSalt; /* For row-based matchFinder: salts the hash for reuse of tag table */ - U32 hashSaltEntropy; /* For row-based matchFinder: collects entropy for salt generation */ - - U32* hashTable; - U32* hashTable3; - U32* chainTable; - - int forceNonContiguous; /* Non-zero if we should force non-contiguous load for the next window update. */ - - int dedicatedDictSearch; /* Indicates whether this matchState is using the - * dedicated dictionary search structure. - */ - optState_t opt; /* optimal parser state */ - const ZSTD_MatchState_t* dictMatchState; - ZSTD_compressionParameters cParams; - const RawSeqStore_t* ldmSeqStore; - - /* Controls prefetching in some dictMatchState matchfinders. - * This behavior is controlled from the cctx ms. - * This parameter has no effect in the cdict ms. */ - int prefetchCDictTables; - - /* When == 0, lazy match finders insert every position. - * When != 0, lazy match finders only insert positions they search. - * This allows them to skip much faster over incompressible data, - * at a small cost to compression ratio. - */ - int lazySkipping; -}; - -typedef struct { - ZSTD_compressedBlockState_t* prevCBlock; - ZSTD_compressedBlockState_t* nextCBlock; - ZSTD_MatchState_t matchState; -} ZSTD_blockState_t; - -typedef struct { - U32 offset; - U32 checksum; -} ldmEntry_t; - -typedef struct { - BYTE const* split; - U32 hash; - U32 checksum; - ldmEntry_t* bucket; -} ldmMatchCandidate_t; - -#define LDM_BATCH_SIZE 64 - -typedef struct { - ZSTD_window_t window; /* State for the window round buffer management */ - ldmEntry_t* hashTable; - U32 loadedDictEnd; - BYTE* bucketOffsets; /* Next position in bucket to insert entry */ - size_t splitIndices[LDM_BATCH_SIZE]; - ldmMatchCandidate_t matchCandidates[LDM_BATCH_SIZE]; -} ldmState_t; - -typedef struct { - ZSTD_ParamSwitch_e enableLdm; /* ZSTD_ps_enable to enable LDM. ZSTD_ps_auto by default */ - U32 hashLog; /* Log size of hashTable */ - U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */ - U32 minMatchLength; /* Minimum match length */ - U32 hashRateLog; /* Log number of entries to skip */ - U32 windowLog; /* Window log for the LDM */ -} ldmParams_t; - -typedef struct { - int collectSequences; - ZSTD_Sequence* seqStart; - size_t seqIndex; - size_t maxSequences; -} SeqCollector; - -struct ZSTD_CCtx_params_s { - ZSTD_format_e format; - ZSTD_compressionParameters cParams; - ZSTD_frameParameters fParams; - - int compressionLevel; - int forceWindow; /* force back-references to respect limit of - * 1< 63) ? ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength]; -} - -/* ZSTD_MLcode() : - * note : mlBase = matchLength - MINMATCH; - * because it's the format it's stored in seqStore->sequences */ -MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) -{ - static const BYTE ML_Code[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, - 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 }; - static const U32 ML_deltaCode = 36; - return (mlBase > 127) ? ZSTD_highbit32(mlBase) + ML_deltaCode : ML_Code[mlBase]; -} - -/* ZSTD_cParam_withinBounds: - * @return 1 if value is within cParam bounds, - * 0 otherwise */ -MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value) -{ - ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); - if (ZSTD_isError(bounds.error)) return 0; - if (value < bounds.lowerBound) return 0; - if (value > bounds.upperBound) return 0; - return 1; -} - -/* ZSTD_selectAddr: - * @return index >= lowLimit ? candidate : backup, - * tries to force branchless codegen. */ -MEM_STATIC const BYTE* -ZSTD_selectAddr(U32 index, U32 lowLimit, const BYTE* candidate, const BYTE* backup) -{ -#if defined(__GNUC__) && defined(__x86_64__) - __asm__ ( - "cmp %1, %2\n" - "cmova %3, %0\n" - : "+r"(candidate) - : "r"(index), "r"(lowLimit), "r"(backup) - ); - return candidate; -#else - return index >= lowLimit ? candidate : backup; -#endif -} - -/* ZSTD_noCompressBlock() : - * Writes uncompressed block to dst buffer from given src. - * Returns the size of the block */ -MEM_STATIC size_t -ZSTD_noCompressBlock(void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) -{ - U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); - DEBUGLOG(5, "ZSTD_noCompressBlock (srcSize=%zu, dstCapacity=%zu)", srcSize, dstCapacity); - RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, - dstSize_tooSmall, "dst buf too small for uncompressed block"); - MEM_writeLE24(dst, cBlockHeader24); - ZSTD_memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); - return ZSTD_blockHeaderSize + srcSize; -} - -MEM_STATIC size_t -ZSTD_rleCompressBlock(void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) -{ - BYTE* const op = (BYTE*)dst; - U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); - RETURN_ERROR_IF(dstCapacity < 4, dstSize_tooSmall, ""); - MEM_writeLE24(op, cBlockHeader); - op[3] = src; - return 4; -} - - -/* ZSTD_minGain() : - * minimum compression required - * to generate a compress block or a compressed literals section. - * note : use same formula for both situations */ -MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat) -{ - U32 const minlog = (strat>=ZSTD_btultra) ? (U32)(strat) - 1 : 6; - ZSTD_STATIC_ASSERT(ZSTD_btultra == 8); - assert(ZSTD_cParam_withinBounds(ZSTD_c_strategy, (int)strat)); - return (srcSize >> minlog) + 2; -} - -MEM_STATIC int ZSTD_literalsCompressionIsDisabled(const ZSTD_CCtx_params* cctxParams) -{ - switch (cctxParams->literalCompressionMode) { - case ZSTD_ps_enable: - return 0; - case ZSTD_ps_disable: - return 1; - default: - assert(0 /* impossible: pre-validated */); - ZSTD_FALLTHROUGH; - case ZSTD_ps_auto: - return (cctxParams->cParams.strategy == ZSTD_fast) && (cctxParams->cParams.targetLength > 0); - } -} - -/*! ZSTD_safecopyLiterals() : - * memcpy() function that won't read beyond more than WILDCOPY_OVERLENGTH bytes past ilimit_w. - * Only called when the sequence ends past ilimit_w, so it only needs to be optimized for single - * large copies. - */ -static void -ZSTD_safecopyLiterals(BYTE* op, BYTE const* ip, BYTE const* const iend, BYTE const* ilimit_w) -{ - assert(iend > ilimit_w); - if (ip <= ilimit_w) { - ZSTD_wildcopy(op, ip, ilimit_w - ip, ZSTD_no_overlap); - op += ilimit_w - ip; - ip = ilimit_w; - } - while (ip < iend) *op++ = *ip++; -} - - -#define REPCODE1_TO_OFFBASE REPCODE_TO_OFFBASE(1) -#define REPCODE2_TO_OFFBASE REPCODE_TO_OFFBASE(2) -#define REPCODE3_TO_OFFBASE REPCODE_TO_OFFBASE(3) -#define REPCODE_TO_OFFBASE(r) (assert((r)>=1), assert((r)<=ZSTD_REP_NUM), (r)) /* accepts IDs 1,2,3 */ -#define OFFSET_TO_OFFBASE(o) (assert((o)>0), o + ZSTD_REP_NUM) -#define OFFBASE_IS_OFFSET(o) ((o) > ZSTD_REP_NUM) -#define OFFBASE_IS_REPCODE(o) ( 1 <= (o) && (o) <= ZSTD_REP_NUM) -#define OFFBASE_TO_OFFSET(o) (assert(OFFBASE_IS_OFFSET(o)), (o) - ZSTD_REP_NUM) -#define OFFBASE_TO_REPCODE(o) (assert(OFFBASE_IS_REPCODE(o)), (o)) /* returns ID 1,2,3 */ - -/*! ZSTD_storeSeqOnly() : - * Store a sequence (litlen, litPtr, offBase and matchLength) into SeqStore_t. - * Literals themselves are not copied, but @litPtr is updated. - * @offBase : Users should employ macros REPCODE_TO_OFFBASE() and OFFSET_TO_OFFBASE(). - * @matchLength : must be >= MINMATCH -*/ -HINT_INLINE UNUSED_ATTR void -ZSTD_storeSeqOnly(SeqStore_t* seqStorePtr, - size_t litLength, - U32 offBase, - size_t matchLength) -{ - assert((size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart) < seqStorePtr->maxNbSeq); - - /* literal Length */ - assert(litLength <= ZSTD_BLOCKSIZE_MAX); - if (UNLIKELY(litLength>0xFFFF)) { - assert(seqStorePtr->longLengthType == ZSTD_llt_none); /* there can only be a single long length */ - seqStorePtr->longLengthType = ZSTD_llt_literalLength; - seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - } - seqStorePtr->sequences[0].litLength = (U16)litLength; - - /* match offset */ - seqStorePtr->sequences[0].offBase = offBase; - - /* match Length */ - assert(matchLength <= ZSTD_BLOCKSIZE_MAX); - assert(matchLength >= MINMATCH); - { size_t const mlBase = matchLength - MINMATCH; - if (UNLIKELY(mlBase>0xFFFF)) { - assert(seqStorePtr->longLengthType == ZSTD_llt_none); /* there can only be a single long length */ - seqStorePtr->longLengthType = ZSTD_llt_matchLength; - seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - } - seqStorePtr->sequences[0].mlBase = (U16)mlBase; - } - - seqStorePtr->sequences++; -} - -/*! ZSTD_storeSeq() : - * Store a sequence (litlen, litPtr, offBase and matchLength) into SeqStore_t. - * @offBase : Users should employ macros REPCODE_TO_OFFBASE() and OFFSET_TO_OFFBASE(). - * @matchLength : must be >= MINMATCH - * Allowed to over-read literals up to litLimit. -*/ -HINT_INLINE UNUSED_ATTR void -ZSTD_storeSeq(SeqStore_t* seqStorePtr, - size_t litLength, const BYTE* literals, const BYTE* litLimit, - U32 offBase, - size_t matchLength) -{ - BYTE const* const litLimit_w = litLimit - WILDCOPY_OVERLENGTH; - BYTE const* const litEnd = literals + litLength; -#if defined(DEBUGLEVEL) && (DEBUGLEVEL >= 6) - static const BYTE* g_start = NULL; - if (g_start==NULL) g_start = (const BYTE*)literals; /* note : index only works for compression within a single segment */ - { U32 const pos = (U32)((const BYTE*)literals - g_start); - DEBUGLOG(6, "Cpos%7u :%3u literals, match%4u bytes at offBase%7u", - pos, (U32)litLength, (U32)matchLength, (U32)offBase); - } -#endif - assert((size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart) < seqStorePtr->maxNbSeq); - /* copy Literals */ - assert(seqStorePtr->maxNbLit <= 128 KB); - assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + seqStorePtr->maxNbLit); - assert(literals + litLength <= litLimit); - if (litEnd <= litLimit_w) { - /* Common case we can use wildcopy. - * First copy 16 bytes, because literals are likely short. - */ - ZSTD_STATIC_ASSERT(WILDCOPY_OVERLENGTH >= 16); - ZSTD_copy16(seqStorePtr->lit, literals); - if (litLength > 16) { - ZSTD_wildcopy(seqStorePtr->lit+16, literals+16, (ptrdiff_t)litLength-16, ZSTD_no_overlap); - } - } else { - ZSTD_safecopyLiterals(seqStorePtr->lit, literals, litEnd, litLimit_w); - } - seqStorePtr->lit += litLength; - - ZSTD_storeSeqOnly(seqStorePtr, litLength, offBase, matchLength); -} - -/* ZSTD_updateRep() : - * updates in-place @rep (array of repeat offsets) - * @offBase : sum-type, using numeric representation of ZSTD_storeSeq() - */ -MEM_STATIC void -ZSTD_updateRep(U32 rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) -{ - if (OFFBASE_IS_OFFSET(offBase)) { /* full offset */ - rep[2] = rep[1]; - rep[1] = rep[0]; - rep[0] = OFFBASE_TO_OFFSET(offBase); - } else { /* repcode */ - U32 const repCode = OFFBASE_TO_REPCODE(offBase) - 1 + ll0; - if (repCode > 0) { /* note : if repCode==0, no change */ - U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; - rep[2] = (repCode >= 2) ? rep[1] : rep[2]; - rep[1] = rep[0]; - rep[0] = currentOffset; - } else { /* repCode == 0 */ - /* nothing to do */ - } - } -} - -typedef struct repcodes_s { - U32 rep[3]; -} Repcodes_t; - -MEM_STATIC Repcodes_t -ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) -{ - Repcodes_t newReps; - ZSTD_memcpy(&newReps, rep, sizeof(newReps)); - ZSTD_updateRep(newReps.rep, offBase, ll0); - return newReps; -} - - -/*-************************************* -* Match length counter -***************************************/ -MEM_STATIC size_t ZSTD_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* const pInLimit) -{ - const BYTE* const pStart = pIn; - const BYTE* const pInLoopLimit = pInLimit - (sizeof(size_t)-1); - - if (pIn < pInLoopLimit) { - { size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); - if (diff) return ZSTD_NbCommonBytes(diff); } - pIn+=sizeof(size_t); pMatch+=sizeof(size_t); - while (pIn < pInLoopLimit) { - size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); - if (!diff) { pIn+=sizeof(size_t); pMatch+=sizeof(size_t); continue; } - pIn += ZSTD_NbCommonBytes(diff); - return (size_t)(pIn - pStart); - } } - if (MEM_64bits() && (pIn<(pInLimit-3)) && (MEM_read32(pMatch) == MEM_read32(pIn))) { pIn+=4; pMatch+=4; } - if ((pIn<(pInLimit-1)) && (MEM_read16(pMatch) == MEM_read16(pIn))) { pIn+=2; pMatch+=2; } - if ((pIn> (32-h) ; } -MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h, 0); } /* only in zstd_opt.h */ -MEM_STATIC size_t ZSTD_hash3PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash3(MEM_readLE32(ptr), h, s); } - -static const U32 prime4bytes = 2654435761U; -static U32 ZSTD_hash4(U32 u, U32 h, U32 s) { assert(h <= 32); return ((u * prime4bytes) ^ s) >> (32-h) ; } -static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_readLE32(ptr), h, 0); } -static size_t ZSTD_hash4PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash4(MEM_readLE32(ptr), h, s); } - -static const U64 prime5bytes = 889523592379ULL; -static size_t ZSTD_hash5(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-40)) * prime5bytes) ^ s) >> (64-h)) ; } -static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h, 0); } -static size_t ZSTD_hash5PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash5(MEM_readLE64(p), h, s); } - -static const U64 prime6bytes = 227718039650203ULL; -static size_t ZSTD_hash6(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-48)) * prime6bytes) ^ s) >> (64-h)) ; } -static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h, 0); } -static size_t ZSTD_hash6PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash6(MEM_readLE64(p), h, s); } - -static const U64 prime7bytes = 58295818150454627ULL; -static size_t ZSTD_hash7(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-56)) * prime7bytes) ^ s) >> (64-h)) ; } -static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h, 0); } -static size_t ZSTD_hash7PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash7(MEM_readLE64(p), h, s); } - -static const U64 prime8bytes = 0xCF1BBCDCB7A56463ULL; -static size_t ZSTD_hash8(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u) * prime8bytes) ^ s) >> (64-h)) ; } -static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h, 0); } -static size_t ZSTD_hash8PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash8(MEM_readLE64(p), h, s); } - - -MEM_STATIC FORCE_INLINE_ATTR -size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls) -{ - /* Although some of these hashes do support hBits up to 64, some do not. - * To be on the safe side, always avoid hBits > 32. */ - assert(hBits <= 32); - - switch(mls) - { - default: - case 4: return ZSTD_hash4Ptr(p, hBits); - case 5: return ZSTD_hash5Ptr(p, hBits); - case 6: return ZSTD_hash6Ptr(p, hBits); - case 7: return ZSTD_hash7Ptr(p, hBits); - case 8: return ZSTD_hash8Ptr(p, hBits); - } -} - -MEM_STATIC FORCE_INLINE_ATTR -size_t ZSTD_hashPtrSalted(const void* p, U32 hBits, U32 mls, const U64 hashSalt) { - /* Although some of these hashes do support hBits up to 64, some do not. - * To be on the safe side, always avoid hBits > 32. */ - assert(hBits <= 32); - - switch(mls) - { - default: - case 4: return ZSTD_hash4PtrS(p, hBits, (U32)hashSalt); - case 5: return ZSTD_hash5PtrS(p, hBits, hashSalt); - case 6: return ZSTD_hash6PtrS(p, hBits, hashSalt); - case 7: return ZSTD_hash7PtrS(p, hBits, hashSalt); - case 8: return ZSTD_hash8PtrS(p, hBits, hashSalt); - } -} - - -/** ZSTD_ipow() : - * Return base^exponent. - */ -static U64 ZSTD_ipow(U64 base, U64 exponent) -{ - U64 power = 1; - while (exponent) { - if (exponent & 1) power *= base; - exponent >>= 1; - base *= base; - } - return power; -} - -#define ZSTD_ROLL_HASH_CHAR_OFFSET 10 - -/** ZSTD_rollingHash_append() : - * Add the buffer to the hash value. - */ -static U64 ZSTD_rollingHash_append(U64 hash, void const* buf, size_t size) -{ - BYTE const* istart = (BYTE const*)buf; - size_t pos; - for (pos = 0; pos < size; ++pos) { - hash *= prime8bytes; - hash += istart[pos] + ZSTD_ROLL_HASH_CHAR_OFFSET; - } - return hash; -} - -/** ZSTD_rollingHash_compute() : - * Compute the rolling hash value of the buffer. - */ -MEM_STATIC U64 ZSTD_rollingHash_compute(void const* buf, size_t size) -{ - return ZSTD_rollingHash_append(0, buf, size); -} - -/** ZSTD_rollingHash_primePower() : - * Compute the primePower to be passed to ZSTD_rollingHash_rotate() for a hash - * over a window of length bytes. - */ -MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length) -{ - return ZSTD_ipow(prime8bytes, length - 1); -} - -/** ZSTD_rollingHash_rotate() : - * Rotate the rolling hash by one byte. - */ -MEM_STATIC U64 ZSTD_rollingHash_rotate(U64 hash, BYTE toRemove, BYTE toAdd, U64 primePower) -{ - hash -= (toRemove + ZSTD_ROLL_HASH_CHAR_OFFSET) * primePower; - hash *= prime8bytes; - hash += toAdd + ZSTD_ROLL_HASH_CHAR_OFFSET; - return hash; -} - -/*-************************************* -* Round buffer management -***************************************/ -/* Max @current value allowed: - * In 32-bit mode: we want to avoid crossing the 2 GB limit, - * reducing risks of side effects in case of signed operations on indexes. - * In 64-bit mode: we want to ensure that adding the maximum job size (512 MB) - * doesn't overflow U32 index capacity (4 GB) */ -#define ZSTD_CURRENT_MAX (MEM_64bits() ? 3500U MB : 2000U MB) -/* Maximum chunk size before overflow correction needs to be called again */ -#define ZSTD_CHUNKSIZE_MAX \ - ( ((U32)-1) /* Maximum ending current index */ \ - - ZSTD_CURRENT_MAX) /* Maximum beginning lowLimit */ - -/** - * ZSTD_window_clear(): - * Clears the window containing the history by simply setting it to empty. - */ -MEM_STATIC void ZSTD_window_clear(ZSTD_window_t* window) -{ - size_t const endT = (size_t)(window->nextSrc - window->base); - U32 const end = (U32)endT; - - window->lowLimit = end; - window->dictLimit = end; -} - -MEM_STATIC U32 ZSTD_window_isEmpty(ZSTD_window_t const window) -{ - return window.dictLimit == ZSTD_WINDOW_START_INDEX && - window.lowLimit == ZSTD_WINDOW_START_INDEX && - (window.nextSrc - window.base) == ZSTD_WINDOW_START_INDEX; -} - -/** - * ZSTD_window_hasExtDict(): - * Returns non-zero if the window has a non-empty extDict. - */ -MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window) -{ - return window.lowLimit < window.dictLimit; -} - -/** - * ZSTD_matchState_dictMode(): - * Inspects the provided matchState and figures out what dictMode should be - * passed to the compressor. - */ -MEM_STATIC ZSTD_dictMode_e ZSTD_matchState_dictMode(const ZSTD_MatchState_t *ms) -{ - return ZSTD_window_hasExtDict(ms->window) ? - ZSTD_extDict : - ms->dictMatchState != NULL ? - (ms->dictMatchState->dedicatedDictSearch ? ZSTD_dedicatedDictSearch : ZSTD_dictMatchState) : - ZSTD_noDict; -} - -/* Defining this macro to non-zero tells zstd to run the overflow correction - * code much more frequently. This is very inefficient, and should only be - * used for tests and fuzzers. - */ -#ifndef ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY -# ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -# define ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY 1 -# else -# define ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY 0 -# endif -#endif - -/** - * ZSTD_window_canOverflowCorrect(): - * Returns non-zero if the indices are large enough for overflow correction - * to work correctly without impacting compression ratio. - */ -MEM_STATIC U32 ZSTD_window_canOverflowCorrect(ZSTD_window_t const window, - U32 cycleLog, - U32 maxDist, - U32 loadedDictEnd, - void const* src) -{ - U32 const cycleSize = 1u << cycleLog; - U32 const curr = (U32)((BYTE const*)src - window.base); - U32 const minIndexToOverflowCorrect = cycleSize - + MAX(maxDist, cycleSize) - + ZSTD_WINDOW_START_INDEX; - - /* Adjust the min index to backoff the overflow correction frequency, - * so we don't waste too much CPU in overflow correction. If this - * computation overflows we don't really care, we just need to make - * sure it is at least minIndexToOverflowCorrect. - */ - U32 const adjustment = window.nbOverflowCorrections + 1; - U32 const adjustedIndex = MAX(minIndexToOverflowCorrect * adjustment, - minIndexToOverflowCorrect); - U32 const indexLargeEnough = curr > adjustedIndex; - - /* Only overflow correct early if the dictionary is invalidated already, - * so we don't hurt compression ratio. - */ - U32 const dictionaryInvalidated = curr > maxDist + loadedDictEnd; - - return indexLargeEnough && dictionaryInvalidated; -} - -/** - * ZSTD_window_needOverflowCorrection(): - * Returns non-zero if the indices are getting too large and need overflow - * protection. - */ -MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, - U32 cycleLog, - U32 maxDist, - U32 loadedDictEnd, - void const* src, - void const* srcEnd) -{ - U32 const curr = (U32)((BYTE const*)srcEnd - window.base); - if (ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY) { - if (ZSTD_window_canOverflowCorrect(window, cycleLog, maxDist, loadedDictEnd, src)) { - return 1; - } - } - return curr > ZSTD_CURRENT_MAX; -} - -/** - * ZSTD_window_correctOverflow(): - * Reduces the indices to protect from index overflow. - * Returns the correction made to the indices, which must be applied to every - * stored index. - * - * The least significant cycleLog bits of the indices must remain the same, - * which may be 0. Every index up to maxDist in the past must be valid. - */ -MEM_STATIC -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, - U32 maxDist, void const* src) -{ - /* preemptive overflow correction: - * 1. correction is large enough: - * lowLimit > (3<<29) ==> current > 3<<29 + 1< (3<<29 + 1< (3<<29) - (1< (3<<29) - (1<<30) (NOTE: chainLog <= 30) - * > 1<<29 - * - * 2. (ip+ZSTD_CHUNKSIZE_MAX - cctx->base) doesn't overflow: - * After correction, current is less than (1<base < 1<<32. - * 3. (cctx->lowLimit + 1< 3<<29 + 1<base); - U32 const currentCycle = curr & cycleMask; - /* Ensure newCurrent - maxDist >= ZSTD_WINDOW_START_INDEX. */ - U32 const currentCycleCorrection = currentCycle < ZSTD_WINDOW_START_INDEX - ? MAX(cycleSize, ZSTD_WINDOW_START_INDEX) - : 0; - U32 const newCurrent = currentCycle - + currentCycleCorrection - + MAX(maxDist, cycleSize); - U32 const correction = curr - newCurrent; - /* maxDist must be a power of two so that: - * (newCurrent & cycleMask) == (curr & cycleMask) - * This is required to not corrupt the chains / binary tree. - */ - assert((maxDist & (maxDist - 1)) == 0); - assert((curr & cycleMask) == (newCurrent & cycleMask)); - assert(curr > newCurrent); - if (!ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY) { - /* Loose bound, should be around 1<<29 (see above) */ - assert(correction > 1<<28); - } - - window->base += correction; - window->dictBase += correction; - if (window->lowLimit < correction + ZSTD_WINDOW_START_INDEX) { - window->lowLimit = ZSTD_WINDOW_START_INDEX; - } else { - window->lowLimit -= correction; - } - if (window->dictLimit < correction + ZSTD_WINDOW_START_INDEX) { - window->dictLimit = ZSTD_WINDOW_START_INDEX; - } else { - window->dictLimit -= correction; - } - - /* Ensure we can still reference the full window. */ - assert(newCurrent >= maxDist); - assert(newCurrent - maxDist >= ZSTD_WINDOW_START_INDEX); - /* Ensure that lowLimit and dictLimit didn't underflow. */ - assert(window->lowLimit <= newCurrent); - assert(window->dictLimit <= newCurrent); - - ++window->nbOverflowCorrections; - - DEBUGLOG(4, "Correction of 0x%x bytes to lowLimit=0x%x", correction, - window->lowLimit); - return correction; -} - -/** - * ZSTD_window_enforceMaxDist(): - * Updates lowLimit so that: - * (srcEnd - base) - lowLimit == maxDist + loadedDictEnd - * - * It ensures index is valid as long as index >= lowLimit. - * This must be called before a block compression call. - * - * loadedDictEnd is only defined if a dictionary is in use for current compression. - * As the name implies, loadedDictEnd represents the index at end of dictionary. - * The value lies within context's referential, it can be directly compared to blockEndIdx. - * - * If loadedDictEndPtr is NULL, no dictionary is in use, and we use loadedDictEnd == 0. - * If loadedDictEndPtr is not NULL, we set it to zero after updating lowLimit. - * This is because dictionaries are allowed to be referenced fully - * as long as the last byte of the dictionary is in the window. - * Once input has progressed beyond window size, dictionary cannot be referenced anymore. - * - * In normal dict mode, the dictionary lies between lowLimit and dictLimit. - * In dictMatchState mode, lowLimit and dictLimit are the same, - * and the dictionary is below them. - * forceWindow and dictMatchState are therefore incompatible. - */ -MEM_STATIC void -ZSTD_window_enforceMaxDist(ZSTD_window_t* window, - const void* blockEnd, - U32 maxDist, - U32* loadedDictEndPtr, - const ZSTD_MatchState_t** dictMatchStatePtr) -{ - U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); - U32 const loadedDictEnd = (loadedDictEndPtr != NULL) ? *loadedDictEndPtr : 0; - DEBUGLOG(5, "ZSTD_window_enforceMaxDist: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u", - (unsigned)blockEndIdx, (unsigned)maxDist, (unsigned)loadedDictEnd); - - /* - When there is no dictionary : loadedDictEnd == 0. - In which case, the test (blockEndIdx > maxDist) is merely to avoid - overflowing next operation `newLowLimit = blockEndIdx - maxDist`. - - When there is a standard dictionary : - Index referential is copied from the dictionary, - which means it starts from 0. - In which case, loadedDictEnd == dictSize, - and it makes sense to compare `blockEndIdx > maxDist + dictSize` - since `blockEndIdx` also starts from zero. - - When there is an attached dictionary : - loadedDictEnd is expressed within the referential of the context, - so it can be directly compared against blockEndIdx. - */ - if (blockEndIdx > maxDist + loadedDictEnd) { - U32 const newLowLimit = blockEndIdx - maxDist; - if (window->lowLimit < newLowLimit) window->lowLimit = newLowLimit; - if (window->dictLimit < window->lowLimit) { - DEBUGLOG(5, "Update dictLimit to match lowLimit, from %u to %u", - (unsigned)window->dictLimit, (unsigned)window->lowLimit); - window->dictLimit = window->lowLimit; - } - /* On reaching window size, dictionaries are invalidated */ - if (loadedDictEndPtr) *loadedDictEndPtr = 0; - if (dictMatchStatePtr) *dictMatchStatePtr = NULL; - } -} - -/* Similar to ZSTD_window_enforceMaxDist(), - * but only invalidates dictionary - * when input progresses beyond window size. - * assumption : loadedDictEndPtr and dictMatchStatePtr are valid (non NULL) - * loadedDictEnd uses same referential as window->base - * maxDist is the window size */ -MEM_STATIC void -ZSTD_checkDictValidity(const ZSTD_window_t* window, - const void* blockEnd, - U32 maxDist, - U32* loadedDictEndPtr, - const ZSTD_MatchState_t** dictMatchStatePtr) -{ - assert(loadedDictEndPtr != NULL); - assert(dictMatchStatePtr != NULL); - { U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); - U32 const loadedDictEnd = *loadedDictEndPtr; - DEBUGLOG(5, "ZSTD_checkDictValidity: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u", - (unsigned)blockEndIdx, (unsigned)maxDist, (unsigned)loadedDictEnd); - assert(blockEndIdx >= loadedDictEnd); - - if (blockEndIdx > loadedDictEnd + maxDist || loadedDictEnd != window->dictLimit) { - /* On reaching window size, dictionaries are invalidated. - * For simplification, if window size is reached anywhere within next block, - * the dictionary is invalidated for the full block. - * - * We also have to invalidate the dictionary if ZSTD_window_update() has detected - * non-contiguous segments, which means that loadedDictEnd != window->dictLimit. - * loadedDictEnd may be 0, if forceWindow is true, but in that case we never use - * dictMatchState, so setting it to NULL is not a problem. - */ - DEBUGLOG(6, "invalidating dictionary for current block (distance > windowSize)"); - *loadedDictEndPtr = 0; - *dictMatchStatePtr = NULL; - } else { - if (*loadedDictEndPtr != 0) { - DEBUGLOG(6, "dictionary considered valid for current block"); - } } } -} - -MEM_STATIC void ZSTD_window_init(ZSTD_window_t* window) { - ZSTD_memset(window, 0, sizeof(*window)); - window->base = (BYTE const*)" "; - window->dictBase = (BYTE const*)" "; - ZSTD_STATIC_ASSERT(ZSTD_DUBT_UNSORTED_MARK < ZSTD_WINDOW_START_INDEX); /* Start above ZSTD_DUBT_UNSORTED_MARK */ - window->dictLimit = ZSTD_WINDOW_START_INDEX; /* start from >0, so that 1st position is valid */ - window->lowLimit = ZSTD_WINDOW_START_INDEX; /* it ensures first and later CCtx usages compress the same */ - window->nextSrc = window->base + ZSTD_WINDOW_START_INDEX; /* see issue #1241 */ - window->nbOverflowCorrections = 0; -} - -/** - * ZSTD_window_update(): - * Updates the window by appending [src, src + srcSize) to the window. - * If it is not contiguous, the current prefix becomes the extDict, and we - * forget about the extDict. Handles overlap of the prefix and extDict. - * Returns non-zero if the segment is contiguous. - */ -MEM_STATIC -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_window_update(ZSTD_window_t* window, - const void* src, size_t srcSize, - int forceNonContiguous) -{ - BYTE const* const ip = (BYTE const*)src; - U32 contiguous = 1; - DEBUGLOG(5, "ZSTD_window_update"); - if (srcSize == 0) - return contiguous; - assert(window->base != NULL); - assert(window->dictBase != NULL); - /* Check if blocks follow each other */ - if (src != window->nextSrc || forceNonContiguous) { - /* not contiguous */ - size_t const distanceFromBase = (size_t)(window->nextSrc - window->base); - DEBUGLOG(5, "Non contiguous blocks, new segment starts at %u", window->dictLimit); - window->lowLimit = window->dictLimit; - assert(distanceFromBase == (size_t)(U32)distanceFromBase); /* should never overflow */ - window->dictLimit = (U32)distanceFromBase; - window->dictBase = window->base; - window->base = ip - distanceFromBase; - /* ms->nextToUpdate = window->dictLimit; */ - if (window->dictLimit - window->lowLimit < HASH_READ_SIZE) window->lowLimit = window->dictLimit; /* too small extDict */ - contiguous = 0; - } - window->nextSrc = ip + srcSize; - /* if input and dictionary overlap : reduce dictionary (area presumed modified by input) */ - if ( (ip+srcSize > window->dictBase + window->lowLimit) - & (ip < window->dictBase + window->dictLimit)) { - size_t const highInputIdx = (size_t)((ip + srcSize) - window->dictBase); - U32 const lowLimitMax = (highInputIdx > (size_t)window->dictLimit) ? window->dictLimit : (U32)highInputIdx; - assert(highInputIdx < UINT_MAX); - window->lowLimit = lowLimitMax; - DEBUGLOG(5, "Overlapping extDict and input : new lowLimit = %u", window->lowLimit); - } - return contiguous; -} - -/** - * Returns the lowest allowed match index. It may either be in the ext-dict or the prefix. - */ -MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) -{ - U32 const maxDistance = 1U << windowLog; - U32 const lowestValid = ms->window.lowLimit; - U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; - U32 const isDictionary = (ms->loadedDictEnd != 0); - /* When using a dictionary the entire dictionary is valid if a single byte of the dictionary - * is within the window. We invalidate the dictionary (and set loadedDictEnd to 0) when it isn't - * valid for the entire block. So this check is sufficient to find the lowest valid match index. - */ - U32 const matchLowest = isDictionary ? lowestValid : withinWindow; - return matchLowest; -} - -/** - * Returns the lowest allowed match index in the prefix. - */ -MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) -{ - U32 const maxDistance = 1U << windowLog; - U32 const lowestValid = ms->window.dictLimit; - U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; - U32 const isDictionary = (ms->loadedDictEnd != 0); - /* When computing the lowest prefix index we need to take the dictionary into account to handle - * the edge case where the dictionary and the source are contiguous in memory. - */ - U32 const matchLowest = isDictionary ? lowestValid : withinWindow; - return matchLowest; -} - -/* index_safety_check: - * intentional underflow : ensure repIndex isn't overlapping dict + prefix - * @return 1 if values are not overlapping, - * 0 otherwise */ -MEM_STATIC int ZSTD_index_overlap_check(const U32 prefixLowestIndex, const U32 repIndex) { - return ((U32)((prefixLowestIndex-1) - repIndex) >= 3); -} - - -/* debug functions */ -#if (DEBUGLEVEL>=2) - -MEM_STATIC double ZSTD_fWeight(U32 rawStat) -{ - U32 const fp_accuracy = 8; - U32 const fp_multiplier = (1 << fp_accuracy); - U32 const newStat = rawStat + 1; - U32 const hb = ZSTD_highbit32(newStat); - U32 const BWeight = hb * fp_multiplier; - U32 const FWeight = (newStat << fp_accuracy) >> hb; - U32 const weight = BWeight + FWeight; - assert(hb + fp_accuracy < 31); - return (double)weight / fp_multiplier; -} - -/* display a table content, - * listing each element, its frequency, and its predicted bit cost */ -MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) -{ - unsigned u, sum; - for (u=0, sum=0; u<=max; u++) sum += table[u]; - DEBUGLOG(2, "total nb elts: %u", sum); - for (u=0; u<=max; u++) { - DEBUGLOG(2, "%2u: %5u (%.2f)", - u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); - } -} - -#endif - -/* Short Cache */ - -/* Normally, zstd matchfinders follow this flow: - * 1. Compute hash at ip - * 2. Load index from hashTable[hash] - * 3. Check if *ip == *(base + index) - * In dictionary compression, loading *(base + index) is often an L2 or even L3 miss. - * - * Short cache is an optimization which allows us to avoid step 3 most of the time - * when the data doesn't actually match. With short cache, the flow becomes: - * 1. Compute (hash, currentTag) at ip. currentTag is an 8-bit independent hash at ip. - * 2. Load (index, matchTag) from hashTable[hash]. See ZSTD_writeTaggedIndex to understand how this works. - * 3. Only if currentTag == matchTag, check *ip == *(base + index). Otherwise, continue. - * - * Currently, short cache is only implemented in CDict hashtables. Thus, its use is limited to - * dictMatchState matchfinders. - */ -#define ZSTD_SHORT_CACHE_TAG_BITS 8 -#define ZSTD_SHORT_CACHE_TAG_MASK ((1u << ZSTD_SHORT_CACHE_TAG_BITS) - 1) - -/* Helper function for ZSTD_fillHashTable and ZSTD_fillDoubleHashTable. - * Unpacks hashAndTag into (hash, tag), then packs (index, tag) into hashTable[hash]. */ -MEM_STATIC void ZSTD_writeTaggedIndex(U32* const hashTable, size_t hashAndTag, U32 index) { - size_t const hash = hashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS; - U32 const tag = (U32)(hashAndTag & ZSTD_SHORT_CACHE_TAG_MASK); - assert(index >> (32 - ZSTD_SHORT_CACHE_TAG_BITS) == 0); - hashTable[hash] = (index << ZSTD_SHORT_CACHE_TAG_BITS) | tag; -} - -/* Helper function for short cache matchfinders. - * Unpacks tag1 and tag2 from lower bits of packedTag1 and packedTag2, then checks if the tags match. */ -MEM_STATIC int ZSTD_comparePackedTags(size_t packedTag1, size_t packedTag2) { - U32 const tag1 = packedTag1 & ZSTD_SHORT_CACHE_TAG_MASK; - U32 const tag2 = packedTag2 & ZSTD_SHORT_CACHE_TAG_MASK; - return tag1 == tag2; -} - -/* =============================================================== - * Shared internal declarations - * These prototypes may be called from sources not in lib/compress - * =============================================================== */ - -/* ZSTD_loadCEntropy() : - * dict : must point at beginning of a valid zstd dictionary. - * return : size of dictionary header (size of magic number + dict ID + entropy tables) - * assumptions : magic number supposed already checked - * and dictSize >= 8 */ -size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, - const void* const dict, size_t dictSize); - -void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs); - -typedef struct { - U32 idx; /* Index in array of ZSTD_Sequence */ - U32 posInSequence; /* Position within sequence at idx */ - size_t posInSrc; /* Number of bytes given by sequences provided so far */ -} ZSTD_SequencePosition; - -/* for benchmark */ -size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx, - const ZSTD_Sequence* const inSeqs, size_t nbSequences, - int const repcodeResolution); - -typedef struct { - size_t nbSequences; - size_t blockSize; - size_t litSize; -} BlockSummary; - -BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs); - -/* ============================================================== - * Private declarations - * These prototypes shall only be called from within lib/compress - * ============================================================== */ - -/* ZSTD_getCParamsFromCCtxParams() : - * cParams are built depending on compressionLevel, src size hints, - * LDM and manually set compression parameters. - * Note: srcSizeHint == 0 means 0! - */ -ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( - const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); - -/*! ZSTD_initCStream_internal() : - * Private use only. Init streaming operation. - * expects params to be valid. - * must receive dict, or cdict, or none, but not both. - * @return : 0, or an error code */ -size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, - const void* dict, size_t dictSize, - const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, unsigned long long pledgedSrcSize); - -void ZSTD_resetSeqStore(SeqStore_t* ssPtr); - -/*! ZSTD_getCParamsFromCDict() : - * as the name implies */ -ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict); - -/* ZSTD_compressBegin_advanced_internal() : - * Private use only. To be called from zstdmt_compress.c. */ -size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx, - const void* dict, size_t dictSize, - ZSTD_dictContentType_e dictContentType, - ZSTD_dictTableLoadMethod_e dtlm, - const ZSTD_CDict* cdict, - const ZSTD_CCtx_params* params, - unsigned long long pledgedSrcSize); - -/* ZSTD_compress_advanced_internal() : - * Private use only. To be called from zstdmt_compress.c. */ -size_t ZSTD_compress_advanced_internal(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict,size_t dictSize, - const ZSTD_CCtx_params* params); - - -/* ZSTD_writeLastEmptyBlock() : - * output an empty Block with end-of-frame mark to complete a frame - * @return : size of data written into `dst` (== ZSTD_blockHeaderSize (defined in zstd_internal.h)) - * or an error code if `dstCapacity` is too small ( 1 */ -U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat); - -/** ZSTD_CCtx_trace() : - * Trace the end of a compression call. - */ -void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize); - -/* Returns 1 if an external sequence producer is registered, otherwise returns 0. */ -MEM_STATIC int ZSTD_hasExtSeqProd(const ZSTD_CCtx_params* params) { - return params->extSeqProdFunc != NULL; -} - -/* =============================================================== - * Deprecated definitions that are still used internally to avoid - * deprecation warnings. These functions are exactly equivalent to - * their public variants, but avoid the deprecation warnings. - * =============================================================== */ - -size_t ZSTD_compressBegin_usingCDict_deprecated(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); - -size_t ZSTD_compressContinue_public(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize); - -size_t ZSTD_compressEnd_public(ZSTD_CCtx* cctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize); - -size_t ZSTD_compressBlock_deprecated(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize); - - -#endif /* ZSTD_COMPRESS_H */ diff --git a/third_party/zstd/lib/compress/zstd_compress_literals.c b/third_party/zstd/lib/compress/zstd_compress_literals.c deleted file mode 100644 index 06036de..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_literals.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - /*-************************************* - * Dependencies - ***************************************/ -#include "zstd_compress_literals.h" - - -/* ************************************************************** -* Debug Traces -****************************************************************/ -#if DEBUGLEVEL >= 2 - -static size_t showHexa(const void* src, size_t srcSize) -{ - const BYTE* const ip = (const BYTE*)src; - size_t u; - for (u=0; u31) + (srcSize>4095); - - DEBUGLOG(5, "ZSTD_noCompressLiterals: srcSize=%zu, dstCapacity=%zu", srcSize, dstCapacity); - - RETURN_ERROR_IF(srcSize + flSize > dstCapacity, dstSize_tooSmall, ""); - - switch(flSize) - { - case 1: /* 2 - 1 - 5 */ - ostart[0] = (BYTE)((U32)set_basic + (srcSize<<3)); - break; - case 2: /* 2 - 2 - 12 */ - MEM_writeLE16(ostart, (U16)((U32)set_basic + (1<<2) + (srcSize<<4))); - break; - case 3: /* 2 - 2 - 20 */ - MEM_writeLE32(ostart, (U32)((U32)set_basic + (3<<2) + (srcSize<<4))); - break; - default: /* not necessary : flSize is {1,2,3} */ - assert(0); - } - - ZSTD_memcpy(ostart + flSize, src, srcSize); - DEBUGLOG(5, "Raw (uncompressed) literals: %u -> %u", (U32)srcSize, (U32)(srcSize + flSize)); - return srcSize + flSize; -} - -static int allBytesIdentical(const void* src, size_t srcSize) -{ - assert(srcSize >= 1); - assert(src != NULL); - { const BYTE b = ((const BYTE*)src)[0]; - size_t p; - for (p=1; p31) + (srcSize>4095); - - assert(dstCapacity >= 4); (void)dstCapacity; - assert(allBytesIdentical(src, srcSize)); - - switch(flSize) - { - case 1: /* 2 - 1 - 5 */ - ostart[0] = (BYTE)((U32)set_rle + (srcSize<<3)); - break; - case 2: /* 2 - 2 - 12 */ - MEM_writeLE16(ostart, (U16)((U32)set_rle + (1<<2) + (srcSize<<4))); - break; - case 3: /* 2 - 2 - 20 */ - MEM_writeLE32(ostart, (U32)((U32)set_rle + (3<<2) + (srcSize<<4))); - break; - default: /* not necessary : flSize is {1,2,3} */ - assert(0); - } - - ostart[flSize] = *(const BYTE*)src; - DEBUGLOG(5, "RLE : Repeated Literal (%02X: %u times) -> %u bytes encoded", ((const BYTE*)src)[0], (U32)srcSize, (U32)flSize + 1); - return flSize+1; -} - -/* ZSTD_minLiteralsToCompress() : - * returns minimal amount of literals - * for literal compression to even be attempted. - * Minimum is made tighter as compression strategy increases. - */ -static size_t -ZSTD_minLiteralsToCompress(ZSTD_strategy strategy, HUF_repeat huf_repeat) -{ - assert((int)strategy >= 0); - assert((int)strategy <= 9); - /* btultra2 : min 8 bytes; - * then 2x larger for each successive compression strategy - * max threshold 64 bytes */ - { int const shift = MIN(9-(int)strategy, 3); - size_t const mintc = (huf_repeat == HUF_repeat_valid) ? 6 : (size_t)8 << shift; - DEBUGLOG(7, "minLiteralsToCompress = %zu", mintc); - return mintc; - } -} - -size_t ZSTD_compressLiterals ( - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - void* entropyWorkspace, size_t entropyWorkspaceSize, - const ZSTD_hufCTables_t* prevHuf, - ZSTD_hufCTables_t* nextHuf, - ZSTD_strategy strategy, - int disableLiteralCompression, - int suspectUncompressible, - int bmi2) -{ - size_t const lhSize = 3 + (srcSize >= 1 KB) + (srcSize >= 16 KB); - BYTE* const ostart = (BYTE*)dst; - U32 singleStream = srcSize < 256; - SymbolEncodingType_e hType = set_compressed; - size_t cLitSize; - - DEBUGLOG(5,"ZSTD_compressLiterals (disableLiteralCompression=%i, srcSize=%u, dstCapacity=%zu)", - disableLiteralCompression, (U32)srcSize, dstCapacity); - - DEBUGLOG(6, "Completed literals listing (%zu bytes)", showHexa(src, srcSize)); - - /* Prepare nextEntropy assuming reusing the existing table */ - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - - if (disableLiteralCompression) - return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); - - /* if too small, don't even attempt compression (speed opt) */ - if (srcSize < ZSTD_minLiteralsToCompress(strategy, prevHuf->repeatMode)) - return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); - - RETURN_ERROR_IF(dstCapacity < lhSize+1, dstSize_tooSmall, "not enough space for compression"); - { HUF_repeat repeat = prevHuf->repeatMode; - int const flags = 0 - | (bmi2 ? HUF_flags_bmi2 : 0) - | (strategy < ZSTD_lazy && srcSize <= 1024 ? HUF_flags_preferRepeat : 0) - | (strategy >= HUF_OPTIMAL_DEPTH_THRESHOLD ? HUF_flags_optimalDepth : 0) - | (suspectUncompressible ? HUF_flags_suspectUncompressible : 0); - - typedef size_t (*huf_compress_f)(void*, size_t, const void*, size_t, unsigned, unsigned, void*, size_t, HUF_CElt*, HUF_repeat*, int); - huf_compress_f huf_compress; - if (repeat == HUF_repeat_valid && lhSize == 3) singleStream = 1; - huf_compress = singleStream ? HUF_compress1X_repeat : HUF_compress4X_repeat; - cLitSize = huf_compress(ostart+lhSize, dstCapacity-lhSize, - src, srcSize, - HUF_SYMBOLVALUE_MAX, LitHufLog, - entropyWorkspace, entropyWorkspaceSize, - (HUF_CElt*)nextHuf->CTable, - &repeat, flags); - DEBUGLOG(5, "%zu literals compressed into %zu bytes (before header)", srcSize, cLitSize); - if (repeat != HUF_repeat_none) { - /* reused the existing table */ - DEBUGLOG(5, "reusing statistics from previous huffman block"); - hType = set_repeat; - } - } - - { size_t const minGain = ZSTD_minGain(srcSize, strategy); - if ((cLitSize==0) || (cLitSize >= srcSize - minGain) || ERR_isError(cLitSize)) { - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); - } } - if (cLitSize==1) { - /* A return value of 1 signals that the alphabet consists of a single symbol. - * However, in some rare circumstances, it could be the compressed size (a single byte). - * For that outcome to have a chance to happen, it's necessary that `srcSize < 8`. - * (it's also necessary to not generate statistics). - * Therefore, in such a case, actively check that all bytes are identical. */ - if ((srcSize >= 8) || allBytesIdentical(src, srcSize)) { - ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); - return ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize); - } } - - if (hType == set_compressed) { - /* using a newly constructed table */ - nextHuf->repeatMode = HUF_repeat_check; - } - - /* Build header */ - switch(lhSize) - { - case 3: /* 2 - 2 - 10 - 10 */ - if (!singleStream) assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); - { U32 const lhc = hType + ((U32)(!singleStream) << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<14); - MEM_writeLE24(ostart, lhc); - break; - } - case 4: /* 2 - 2 - 14 - 14 */ - assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); - { U32 const lhc = hType + (2 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<18); - MEM_writeLE32(ostart, lhc); - break; - } - case 5: /* 2 - 2 - 18 - 18 */ - assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); - { U32 const lhc = hType + (3 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<22); - MEM_writeLE32(ostart, lhc); - ostart[4] = (BYTE)(cLitSize >> 10); - break; - } - default: /* not possible : lhSize is {3,4,5} */ - assert(0); - } - DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)srcSize, (U32)(lhSize+cLitSize)); - return lhSize+cLitSize; -} diff --git a/third_party/zstd/lib/compress/zstd_compress_literals.h b/third_party/zstd/lib/compress/zstd_compress_literals.h deleted file mode 100644 index b060c8a..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_literals.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_COMPRESS_LITERALS_H -#define ZSTD_COMPRESS_LITERALS_H - -#include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */ - - -size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize); - -/* ZSTD_compressRleLiteralsBlock() : - * Conditions : - * - All bytes in @src are identical - * - dstCapacity >= 4 */ -size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize); - -/* ZSTD_compressLiterals(): - * @entropyWorkspace: must be aligned on 4-bytes boundaries - * @entropyWorkspaceSize : must be >= HUF_WORKSPACE_SIZE - * @suspectUncompressible: sampling checks, to potentially skip huffman coding - */ -size_t ZSTD_compressLiterals (void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - void* entropyWorkspace, size_t entropyWorkspaceSize, - const ZSTD_hufCTables_t* prevHuf, - ZSTD_hufCTables_t* nextHuf, - ZSTD_strategy strategy, int disableLiteralCompression, - int suspectUncompressible, - int bmi2); - -#endif /* ZSTD_COMPRESS_LITERALS_H */ diff --git a/third_party/zstd/lib/compress/zstd_compress_sequences.c b/third_party/zstd/lib/compress/zstd_compress_sequences.c deleted file mode 100644 index 7beb9da..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_sequences.c +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - /*-************************************* - * Dependencies - ***************************************/ -#include "zstd_compress_sequences.h" - -/** - * -log2(x / 256) lookup table for x in [0, 256). - * If x == 0: Return 0 - * Else: Return floor(-log2(x / 256) * 256) - */ -static unsigned const kInverseProbabilityLog256[256] = { - 0, 2048, 1792, 1642, 1536, 1453, 1386, 1329, 1280, 1236, 1197, 1162, - 1130, 1100, 1073, 1047, 1024, 1001, 980, 960, 941, 923, 906, 889, - 874, 859, 844, 830, 817, 804, 791, 779, 768, 756, 745, 734, - 724, 714, 704, 694, 685, 676, 667, 658, 650, 642, 633, 626, - 618, 610, 603, 595, 588, 581, 574, 567, 561, 554, 548, 542, - 535, 529, 523, 517, 512, 506, 500, 495, 489, 484, 478, 473, - 468, 463, 458, 453, 448, 443, 438, 434, 429, 424, 420, 415, - 411, 407, 402, 398, 394, 390, 386, 382, 377, 373, 370, 366, - 362, 358, 354, 350, 347, 343, 339, 336, 332, 329, 325, 322, - 318, 315, 311, 308, 305, 302, 298, 295, 292, 289, 286, 282, - 279, 276, 273, 270, 267, 264, 261, 258, 256, 253, 250, 247, - 244, 241, 239, 236, 233, 230, 228, 225, 222, 220, 217, 215, - 212, 209, 207, 204, 202, 199, 197, 194, 192, 190, 187, 185, - 182, 180, 178, 175, 173, 171, 168, 166, 164, 162, 159, 157, - 155, 153, 151, 149, 146, 144, 142, 140, 138, 136, 134, 132, - 130, 128, 126, 123, 121, 119, 117, 115, 114, 112, 110, 108, - 106, 104, 102, 100, 98, 96, 94, 93, 91, 89, 87, 85, - 83, 82, 80, 78, 76, 74, 73, 71, 69, 67, 66, 64, - 62, 61, 59, 57, 55, 54, 52, 50, 49, 47, 46, 44, - 42, 41, 39, 37, 36, 34, 33, 31, 30, 28, 26, 25, - 23, 22, 20, 19, 17, 16, 14, 13, 11, 10, 8, 7, - 5, 4, 2, 1, -}; - -static unsigned ZSTD_getFSEMaxSymbolValue(FSE_CTable const* ctable) { - void const* ptr = ctable; - U16 const* u16ptr = (U16 const*)ptr; - U32 const maxSymbolValue = MEM_read16(u16ptr + 1); - return maxSymbolValue; -} - -/** - * Returns true if we should use ncount=-1 else we should - * use ncount=1 for low probability symbols instead. - */ -static unsigned ZSTD_useLowProbCount(size_t const nbSeq) -{ - /* Heuristic: This should cover most blocks <= 16K and - * start to fade out after 16K to about 32K depending on - * compressibility. - */ - return nbSeq >= 2048; -} - -/** - * Returns the cost in bytes of encoding the normalized count header. - * Returns an error if any of the helper functions return an error. - */ -static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max, - size_t const nbSeq, unsigned const FSELog) -{ - BYTE wksp[FSE_NCOUNTBOUND]; - S16 norm[MaxSeq + 1]; - const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); - FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), ""); - return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog); -} - -/** - * Returns the cost in bits of encoding the distribution described by count - * using the entropy bound. - */ -static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max, size_t const total) -{ - unsigned cost = 0; - unsigned s; - - assert(total > 0); - for (s = 0; s <= max; ++s) { - unsigned norm = (unsigned)((256 * count[s]) / total); - if (count[s] != 0 && norm == 0) - norm = 1; - assert(count[s] < total); - cost += count[s] * kInverseProbabilityLog256[norm]; - } - return cost >> 8; -} - -/** - * Returns the cost in bits of encoding the distribution in count using ctable. - * Returns an error if ctable cannot represent all the symbols in count. - */ -size_t ZSTD_fseBitCost( - FSE_CTable const* ctable, - unsigned const* count, - unsigned const max) -{ - unsigned const kAccuracyLog = 8; - size_t cost = 0; - unsigned s; - FSE_CState_t cstate; - FSE_initCState(&cstate, ctable); - if (ZSTD_getFSEMaxSymbolValue(ctable) < max) { - DEBUGLOG(5, "Repeat FSE_CTable has maxSymbolValue %u < %u", - ZSTD_getFSEMaxSymbolValue(ctable), max); - return ERROR(GENERIC); - } - for (s = 0; s <= max; ++s) { - unsigned const tableLog = cstate.stateLog; - unsigned const badCost = (tableLog + 1) << kAccuracyLog; - unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog); - if (count[s] == 0) - continue; - if (bitCost >= badCost) { - DEBUGLOG(5, "Repeat FSE_CTable has Prob[%u] == 0", s); - return ERROR(GENERIC); - } - cost += (size_t)count[s] * bitCost; - } - return cost >> kAccuracyLog; -} - -/** - * Returns the cost in bits of encoding the distribution in count using the - * table described by norm. The max symbol support by norm is assumed >= max. - * norm must be valid for every symbol with non-zero probability in count. - */ -size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, - unsigned const* count, unsigned const max) -{ - unsigned const shift = 8 - accuracyLog; - size_t cost = 0; - unsigned s; - assert(accuracyLog <= 8); - for (s = 0; s <= max; ++s) { - unsigned const normAcc = (norm[s] != -1) ? (unsigned)norm[s] : 1; - unsigned const norm256 = normAcc << shift; - assert(norm256 > 0); - assert(norm256 < 256); - cost += count[s] * kInverseProbabilityLog256[norm256]; - } - return cost >> 8; -} - -SymbolEncodingType_e -ZSTD_selectEncodingType( - FSE_repeat* repeatMode, unsigned const* count, unsigned const max, - size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, - FSE_CTable const* prevCTable, - short const* defaultNorm, U32 defaultNormLog, - ZSTD_DefaultPolicy_e const isDefaultAllowed, - ZSTD_strategy const strategy) -{ - ZSTD_STATIC_ASSERT(ZSTD_defaultDisallowed == 0 && ZSTD_defaultAllowed != 0); - if (mostFrequent == nbSeq) { - *repeatMode = FSE_repeat_none; - if (isDefaultAllowed && nbSeq <= 2) { - /* Prefer set_basic over set_rle when there are 2 or fewer symbols, - * since RLE uses 1 byte, but set_basic uses 5-6 bits per symbol. - * If basic encoding isn't possible, always choose RLE. - */ - DEBUGLOG(5, "Selected set_basic"); - return set_basic; - } - DEBUGLOG(5, "Selected set_rle"); - return set_rle; - } - if (strategy < ZSTD_lazy) { - if (isDefaultAllowed) { - size_t const staticFse_nbSeq_max = 1000; - size_t const mult = 10 - strategy; - size_t const baseLog = 3; - size_t const dynamicFse_nbSeq_min = (((size_t)1 << defaultNormLog) * mult) >> baseLog; /* 28-36 for offset, 56-72 for lengths */ - assert(defaultNormLog >= 5 && defaultNormLog <= 6); /* xx_DEFAULTNORMLOG */ - assert(mult <= 9 && mult >= 7); - if ( (*repeatMode == FSE_repeat_valid) - && (nbSeq < staticFse_nbSeq_max) ) { - DEBUGLOG(5, "Selected set_repeat"); - return set_repeat; - } - if ( (nbSeq < dynamicFse_nbSeq_min) - || (mostFrequent < (nbSeq >> (defaultNormLog-1))) ) { - DEBUGLOG(5, "Selected set_basic"); - /* The format allows default tables to be repeated, but it isn't useful. - * When using simple heuristics to select encoding type, we don't want - * to confuse these tables with dictionaries. When running more careful - * analysis, we don't need to waste time checking both repeating tables - * and default tables. - */ - *repeatMode = FSE_repeat_none; - return set_basic; - } - } - } else { - size_t const basicCost = isDefaultAllowed ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, count, max) : ERROR(GENERIC); - size_t const repeatCost = *repeatMode != FSE_repeat_none ? ZSTD_fseBitCost(prevCTable, count, max) : ERROR(GENERIC); - size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog); - size_t const compressedCost = (NCountCost << 3) + ZSTD_entropyCost(count, max, nbSeq); - - if (isDefaultAllowed) { - assert(!ZSTD_isError(basicCost)); - assert(!(*repeatMode == FSE_repeat_valid && ZSTD_isError(repeatCost))); - } - assert(!ZSTD_isError(NCountCost)); - assert(compressedCost < ERROR(maxCode)); - DEBUGLOG(5, "Estimated bit costs: basic=%u\trepeat=%u\tcompressed=%u", - (unsigned)basicCost, (unsigned)repeatCost, (unsigned)compressedCost); - if (basicCost <= repeatCost && basicCost <= compressedCost) { - DEBUGLOG(5, "Selected set_basic"); - assert(isDefaultAllowed); - *repeatMode = FSE_repeat_none; - return set_basic; - } - if (repeatCost <= compressedCost) { - DEBUGLOG(5, "Selected set_repeat"); - assert(!ZSTD_isError(repeatCost)); - return set_repeat; - } - assert(compressedCost < basicCost && compressedCost < repeatCost); - } - DEBUGLOG(5, "Selected set_compressed"); - *repeatMode = FSE_repeat_check; - return set_compressed; -} - -typedef struct { - S16 norm[MaxSeq + 1]; - U32 wksp[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(MaxSeq, MaxFSELog)]; -} ZSTD_BuildCTableWksp; - -size_t -ZSTD_buildCTable(void* dst, size_t dstCapacity, - FSE_CTable* nextCTable, U32 FSELog, SymbolEncodingType_e type, - unsigned* count, U32 max, - const BYTE* codeTable, size_t nbSeq, - const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax, - const FSE_CTable* prevCTable, size_t prevCTableSize, - void* entropyWorkspace, size_t entropyWorkspaceSize) -{ - BYTE* op = (BYTE*)dst; - const BYTE* const oend = op + dstCapacity; - DEBUGLOG(6, "ZSTD_buildCTable (dstCapacity=%u)", (unsigned)dstCapacity); - - switch (type) { - case set_rle: - FORWARD_IF_ERROR(FSE_buildCTable_rle(nextCTable, (BYTE)max), ""); - RETURN_ERROR_IF(dstCapacity==0, dstSize_tooSmall, "not enough space"); - *op = codeTable[0]; - return 1; - case set_repeat: - ZSTD_memcpy(nextCTable, prevCTable, prevCTableSize); - return 0; - case set_basic: - FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, defaultNorm, defaultMax, defaultNormLog, entropyWorkspace, entropyWorkspaceSize), ""); /* note : could be pre-calculated */ - return 0; - case set_compressed: { - ZSTD_BuildCTableWksp* wksp = (ZSTD_BuildCTableWksp*)entropyWorkspace; - size_t nbSeq_1 = nbSeq; - const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); - if (count[codeTable[nbSeq-1]] > 1) { - count[codeTable[nbSeq-1]]--; - nbSeq_1--; - } - assert(nbSeq_1 > 1); - assert(entropyWorkspaceSize >= sizeof(ZSTD_BuildCTableWksp)); - (void)entropyWorkspaceSize; - FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCount(nbSeq_1)), "FSE_normalizeCount failed"); - assert(oend >= op); - { size_t const NCountSize = FSE_writeNCount(op, (size_t)(oend - op), wksp->norm, max, tableLog); /* overflow protected */ - FORWARD_IF_ERROR(NCountSize, "FSE_writeNCount failed"); - FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, wksp->norm, max, tableLog, wksp->wksp, sizeof(wksp->wksp)), "FSE_buildCTable_wksp failed"); - return NCountSize; - } - } - default: assert(0); RETURN_ERROR(GENERIC, "impossible to reach"); - } -} - -FORCE_INLINE_TEMPLATE size_t -ZSTD_encodeSequences_body( - void* dst, size_t dstCapacity, - FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, - FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, - FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, - SeqDef const* sequences, size_t nbSeq, int longOffsets) -{ - BIT_CStream_t blockStream; - FSE_CState_t stateMatchLength; - FSE_CState_t stateOffsetBits; - FSE_CState_t stateLitLength; - - RETURN_ERROR_IF( - ERR_isError(BIT_initCStream(&blockStream, dst, dstCapacity)), - dstSize_tooSmall, "not enough space remaining"); - DEBUGLOG(6, "available space for bitstream : %i (dstCapacity=%u)", - (int)(blockStream.endPtr - blockStream.startPtr), - (unsigned)dstCapacity); - - /* first symbols */ - FSE_initCState2(&stateMatchLength, CTable_MatchLength, mlCodeTable[nbSeq-1]); - FSE_initCState2(&stateOffsetBits, CTable_OffsetBits, ofCodeTable[nbSeq-1]); - FSE_initCState2(&stateLitLength, CTable_LitLength, llCodeTable[nbSeq-1]); - BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); - if (MEM_32bits()) BIT_flushBits(&blockStream); - BIT_addBits(&blockStream, sequences[nbSeq-1].mlBase, ML_bits[mlCodeTable[nbSeq-1]]); - if (MEM_32bits()) BIT_flushBits(&blockStream); - if (longOffsets) { - U32 const ofBits = ofCodeTable[nbSeq-1]; - unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); - if (extraBits) { - BIT_addBits(&blockStream, sequences[nbSeq-1].offBase, extraBits); - BIT_flushBits(&blockStream); - } - BIT_addBits(&blockStream, sequences[nbSeq-1].offBase >> extraBits, - ofBits - extraBits); - } else { - BIT_addBits(&blockStream, sequences[nbSeq-1].offBase, ofCodeTable[nbSeq-1]); - } - BIT_flushBits(&blockStream); - - { size_t n; - for (n=nbSeq-2 ; n= 64-7-(LLFSELog+MLFSELog+OffFSELog))) - BIT_flushBits(&blockStream); /* (7)*/ - BIT_addBits(&blockStream, sequences[n].litLength, llBits); - if (MEM_32bits() && ((llBits+mlBits)>24)) BIT_flushBits(&blockStream); - BIT_addBits(&blockStream, sequences[n].mlBase, mlBits); - if (MEM_32bits() || (ofBits+mlBits+llBits > 56)) BIT_flushBits(&blockStream); - if (longOffsets) { - unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); - if (extraBits) { - BIT_addBits(&blockStream, sequences[n].offBase, extraBits); - BIT_flushBits(&blockStream); /* (7)*/ - } - BIT_addBits(&blockStream, sequences[n].offBase >> extraBits, - ofBits - extraBits); /* 31 */ - } else { - BIT_addBits(&blockStream, sequences[n].offBase, ofBits); /* 31 */ - } - BIT_flushBits(&blockStream); /* (7)*/ - DEBUGLOG(7, "remaining space : %i", (int)(blockStream.endPtr - blockStream.ptr)); - } } - - DEBUGLOG(6, "ZSTD_encodeSequences: flushing ML state with %u bits", stateMatchLength.stateLog); - FSE_flushCState(&blockStream, &stateMatchLength); - DEBUGLOG(6, "ZSTD_encodeSequences: flushing Off state with %u bits", stateOffsetBits.stateLog); - FSE_flushCState(&blockStream, &stateOffsetBits); - DEBUGLOG(6, "ZSTD_encodeSequences: flushing LL state with %u bits", stateLitLength.stateLog); - FSE_flushCState(&blockStream, &stateLitLength); - - { size_t const streamSize = BIT_closeCStream(&blockStream); - RETURN_ERROR_IF(streamSize==0, dstSize_tooSmall, "not enough space"); - return streamSize; - } -} - -static size_t -ZSTD_encodeSequences_default( - void* dst, size_t dstCapacity, - FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, - FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, - FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, - SeqDef const* sequences, size_t nbSeq, int longOffsets) -{ - return ZSTD_encodeSequences_body(dst, dstCapacity, - CTable_MatchLength, mlCodeTable, - CTable_OffsetBits, ofCodeTable, - CTable_LitLength, llCodeTable, - sequences, nbSeq, longOffsets); -} - - -#if DYNAMIC_BMI2 - -static BMI2_TARGET_ATTRIBUTE size_t -ZSTD_encodeSequences_bmi2( - void* dst, size_t dstCapacity, - FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, - FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, - FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, - SeqDef const* sequences, size_t nbSeq, int longOffsets) -{ - return ZSTD_encodeSequences_body(dst, dstCapacity, - CTable_MatchLength, mlCodeTable, - CTable_OffsetBits, ofCodeTable, - CTable_LitLength, llCodeTable, - sequences, nbSeq, longOffsets); -} - -#endif - -size_t ZSTD_encodeSequences( - void* dst, size_t dstCapacity, - FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, - FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, - FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, - SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2) -{ - DEBUGLOG(5, "ZSTD_encodeSequences: dstCapacity = %u", (unsigned)dstCapacity); -#if DYNAMIC_BMI2 - if (bmi2) { - return ZSTD_encodeSequences_bmi2(dst, dstCapacity, - CTable_MatchLength, mlCodeTable, - CTable_OffsetBits, ofCodeTable, - CTable_LitLength, llCodeTable, - sequences, nbSeq, longOffsets); - } -#endif - (void)bmi2; - return ZSTD_encodeSequences_default(dst, dstCapacity, - CTable_MatchLength, mlCodeTable, - CTable_OffsetBits, ofCodeTable, - CTable_LitLength, llCodeTable, - sequences, nbSeq, longOffsets); -} diff --git a/third_party/zstd/lib/compress/zstd_compress_sequences.h b/third_party/zstd/lib/compress/zstd_compress_sequences.h deleted file mode 100644 index 4be8e91..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_sequences.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_COMPRESS_SEQUENCES_H -#define ZSTD_COMPRESS_SEQUENCES_H - -#include "zstd_compress_internal.h" /* SeqDef */ -#include "../common/fse.h" /* FSE_repeat, FSE_CTable */ -#include "../common/zstd_internal.h" /* SymbolEncodingType_e, ZSTD_strategy */ - -typedef enum { - ZSTD_defaultDisallowed = 0, - ZSTD_defaultAllowed = 1 -} ZSTD_DefaultPolicy_e; - -SymbolEncodingType_e -ZSTD_selectEncodingType( - FSE_repeat* repeatMode, unsigned const* count, unsigned const max, - size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, - FSE_CTable const* prevCTable, - short const* defaultNorm, U32 defaultNormLog, - ZSTD_DefaultPolicy_e const isDefaultAllowed, - ZSTD_strategy const strategy); - -size_t -ZSTD_buildCTable(void* dst, size_t dstCapacity, - FSE_CTable* nextCTable, U32 FSELog, SymbolEncodingType_e type, - unsigned* count, U32 max, - const BYTE* codeTable, size_t nbSeq, - const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax, - const FSE_CTable* prevCTable, size_t prevCTableSize, - void* entropyWorkspace, size_t entropyWorkspaceSize); - -size_t ZSTD_encodeSequences( - void* dst, size_t dstCapacity, - FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, - FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, - FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, - SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2); - -size_t ZSTD_fseBitCost( - FSE_CTable const* ctable, - unsigned const* count, - unsigned const max); - -size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, - unsigned const* count, unsigned const max); -#endif /* ZSTD_COMPRESS_SEQUENCES_H */ diff --git a/third_party/zstd/lib/compress/zstd_compress_superblock.c b/third_party/zstd/lib/compress/zstd_compress_superblock.c deleted file mode 100644 index 6f57345..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_superblock.c +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - /*-************************************* - * Dependencies - ***************************************/ -#include "zstd_compress_superblock.h" - -#include "../common/zstd_internal.h" /* ZSTD_getSequenceLength */ -#include "hist.h" /* HIST_countFast_wksp */ -#include "zstd_compress_internal.h" /* ZSTD_[huf|fse|entropy]CTablesMetadata_t */ -#include "zstd_compress_sequences.h" -#include "zstd_compress_literals.h" - -/** ZSTD_compressSubBlock_literal() : - * Compresses literals section for a sub-block. - * When we have to write the Huffman table we will sometimes choose a header - * size larger than necessary. This is because we have to pick the header size - * before we know the table size + compressed size, so we have a bound on the - * table size. If we guessed incorrectly, we fall back to uncompressed literals. - * - * We write the header when writeEntropy=1 and set entropyWritten=1 when we succeeded - * in writing the header, otherwise it is set to 0. - * - * hufMetadata->hType has literals block type info. - * If it is set_basic, all sub-blocks literals section will be Raw_Literals_Block. - * If it is set_rle, all sub-blocks literals section will be RLE_Literals_Block. - * If it is set_compressed, first sub-block's literals section will be Compressed_Literals_Block - * If it is set_compressed, first sub-block's literals section will be Treeless_Literals_Block - * and the following sub-blocks' literals sections will be Treeless_Literals_Block. - * @return : compressed size of literals section of a sub-block - * Or 0 if unable to compress. - * Or error code */ -static size_t -ZSTD_compressSubBlock_literal(const HUF_CElt* hufTable, - const ZSTD_hufCTablesMetadata_t* hufMetadata, - const BYTE* literals, size_t litSize, - void* dst, size_t dstSize, - const int bmi2, int writeEntropy, int* entropyWritten) -{ - size_t const header = writeEntropy ? 200 : 0; - size_t const lhSize = 3 + (litSize >= (1 KB - header)) + (litSize >= (16 KB - header)); - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstSize; - BYTE* op = ostart + lhSize; - U32 const singleStream = lhSize == 3; - SymbolEncodingType_e hType = writeEntropy ? hufMetadata->hType : set_repeat; - size_t cLitSize = 0; - - DEBUGLOG(5, "ZSTD_compressSubBlock_literal (litSize=%zu, lhSize=%zu, writeEntropy=%d)", litSize, lhSize, writeEntropy); - - *entropyWritten = 0; - if (litSize == 0 || hufMetadata->hType == set_basic) { - DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal"); - return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); - } else if (hufMetadata->hType == set_rle) { - DEBUGLOG(5, "ZSTD_compressSubBlock_literal using rle literal"); - return ZSTD_compressRleLiteralsBlock(dst, dstSize, literals, litSize); - } - - assert(litSize > 0); - assert(hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat); - - if (writeEntropy && hufMetadata->hType == set_compressed) { - ZSTD_memcpy(op, hufMetadata->hufDesBuffer, hufMetadata->hufDesSize); - op += hufMetadata->hufDesSize; - cLitSize += hufMetadata->hufDesSize; - DEBUGLOG(5, "ZSTD_compressSubBlock_literal (hSize=%zu)", hufMetadata->hufDesSize); - } - - { int const flags = bmi2 ? HUF_flags_bmi2 : 0; - const size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, (size_t)(oend-op), literals, litSize, hufTable, flags) - : HUF_compress4X_usingCTable(op, (size_t)(oend-op), literals, litSize, hufTable, flags); - op += cSize; - cLitSize += cSize; - if (cSize == 0 || ERR_isError(cSize)) { - DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); - return 0; - } - /* If we expand and we aren't writing a header then emit uncompressed */ - if (!writeEntropy && cLitSize >= litSize) { - DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal because uncompressible"); - return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); - } - /* If we are writing headers then allow expansion that doesn't change our header size. */ - if (lhSize < (size_t)(3 + (cLitSize >= 1 KB) + (cLitSize >= 16 KB))) { - assert(cLitSize > litSize); - DEBUGLOG(5, "Literals expanded beyond allowed header size"); - return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); - } - DEBUGLOG(5, "ZSTD_compressSubBlock_literal (cSize=%zu)", cSize); - } - - /* Build header */ - switch(lhSize) - { - case 3: /* 2 - 2 - 10 - 10 */ - { U32 const lhc = hType + ((U32)(!singleStream) << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<14); - MEM_writeLE24(ostart, lhc); - break; - } - case 4: /* 2 - 2 - 14 - 14 */ - { U32 const lhc = hType + (2 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<18); - MEM_writeLE32(ostart, lhc); - break; - } - case 5: /* 2 - 2 - 18 - 18 */ - { U32 const lhc = hType + (3 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<22); - MEM_writeLE32(ostart, lhc); - ostart[4] = (BYTE)(cLitSize >> 10); - break; - } - default: /* not possible : lhSize is {3,4,5} */ - assert(0); - } - *entropyWritten = 1; - DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)litSize, (U32)(op-ostart)); - return (size_t)(op-ostart); -} - -static size_t -ZSTD_seqDecompressedSize(SeqStore_t const* seqStore, - const SeqDef* sequences, size_t nbSeqs, - size_t litSize, int lastSubBlock) -{ - size_t matchLengthSum = 0; - size_t litLengthSum = 0; - size_t n; - for (n=0; nllType, fseMetadata->ofType, and fseMetadata->mlType have - * symbol compression modes for the super-block. - * The first successfully compressed block will have these in its header. - * We set entropyWritten=1 when we succeed in compressing the sequences. - * The following sub-blocks will always have repeat mode. - * @return : compressed size of sequences section of a sub-block - * Or 0 if it is unable to compress - * Or error code. */ -static size_t -ZSTD_compressSubBlock_sequences(const ZSTD_fseCTables_t* fseTables, - const ZSTD_fseCTablesMetadata_t* fseMetadata, - const SeqDef* sequences, size_t nbSeq, - const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, - const ZSTD_CCtx_params* cctxParams, - void* dst, size_t dstCapacity, - const int bmi2, int writeEntropy, int* entropyWritten) -{ - const int longOffsets = cctxParams->cParams.windowLog > STREAM_ACCUMULATOR_MIN; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstCapacity; - BYTE* op = ostart; - BYTE* seqHead; - - DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, longOffsets); - - *entropyWritten = 0; - /* Sequences Header */ - RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, - dstSize_tooSmall, ""); - if (nbSeq < 128) - *op++ = (BYTE)nbSeq; - else if (nbSeq < LONGNBSEQ) - op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; - else - op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; - if (nbSeq==0) { - return (size_t)(op - ostart); - } - - /* seqHead : flags for FSE encoding type */ - seqHead = op++; - - DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (seqHeadSize=%u)", (unsigned)(op-ostart)); - - if (writeEntropy) { - const U32 LLtype = fseMetadata->llType; - const U32 Offtype = fseMetadata->ofType; - const U32 MLtype = fseMetadata->mlType; - DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (fseTablesSize=%zu)", fseMetadata->fseTablesSize); - *seqHead = (BYTE)((LLtype<<6) + (Offtype<<4) + (MLtype<<2)); - ZSTD_memcpy(op, fseMetadata->fseTablesBuffer, fseMetadata->fseTablesSize); - op += fseMetadata->fseTablesSize; - } else { - const U32 repeat = set_repeat; - *seqHead = (BYTE)((repeat<<6) + (repeat<<4) + (repeat<<2)); - } - - { size_t const bitstreamSize = ZSTD_encodeSequences( - op, (size_t)(oend - op), - fseTables->matchlengthCTable, mlCode, - fseTables->offcodeCTable, ofCode, - fseTables->litlengthCTable, llCode, - sequences, nbSeq, - longOffsets, bmi2); - FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); - op += bitstreamSize; - /* zstd versions <= 1.3.4 mistakenly report corruption when - * FSE_readNCount() receives a buffer < 4 bytes. - * Fixed by https://github.com/facebook/zstd/pull/1146. - * This can happen when the last set_compressed table present is 2 - * bytes and the bitstream is only one byte. - * In this exceedingly rare case, we will simply emit an uncompressed - * block, since it isn't worth optimizing. - */ -#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - if (writeEntropy && fseMetadata->lastCountSize && fseMetadata->lastCountSize + bitstreamSize < 4) { - /* NCountSize >= 2 && bitstreamSize > 0 ==> lastCountSize == 3 */ - assert(fseMetadata->lastCountSize + bitstreamSize == 3); - DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.3.4 by " - "emitting an uncompressed block."); - return 0; - } -#endif - DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (bitstreamSize=%zu)", bitstreamSize); - } - - /* zstd versions <= 1.4.0 mistakenly report error when - * sequences section body size is less than 3 bytes. - * Fixed by https://github.com/facebook/zstd/pull/1664. - * This can happen when the previous sequences section block is compressed - * with rle mode and the current block's sequences section is compressed - * with repeat mode where sequences section body size can be 1 byte. - */ -#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - if (op-seqHead < 4) { - DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.4.0 by emitting " - "an uncompressed block when sequences are < 4 bytes"); - return 0; - } -#endif - - *entropyWritten = 1; - return (size_t)(op - ostart); -} - -/** ZSTD_compressSubBlock() : - * Compresses a single sub-block. - * @return : compressed size of the sub-block - * Or 0 if it failed to compress. */ -static size_t ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy, - const ZSTD_entropyCTablesMetadata_t* entropyMetadata, - const SeqDef* sequences, size_t nbSeq, - const BYTE* literals, size_t litSize, - const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, - const ZSTD_CCtx_params* cctxParams, - void* dst, size_t dstCapacity, - const int bmi2, - int writeLitEntropy, int writeSeqEntropy, - int* litEntropyWritten, int* seqEntropyWritten, - U32 lastBlock) -{ - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstCapacity; - BYTE* op = ostart + ZSTD_blockHeaderSize; - DEBUGLOG(5, "ZSTD_compressSubBlock (litSize=%zu, nbSeq=%zu, writeLitEntropy=%d, writeSeqEntropy=%d, lastBlock=%d)", - litSize, nbSeq, writeLitEntropy, writeSeqEntropy, lastBlock); - { size_t cLitSize = ZSTD_compressSubBlock_literal((const HUF_CElt*)entropy->huf.CTable, - &entropyMetadata->hufMetadata, literals, litSize, - op, (size_t)(oend-op), - bmi2, writeLitEntropy, litEntropyWritten); - FORWARD_IF_ERROR(cLitSize, "ZSTD_compressSubBlock_literal failed"); - if (cLitSize == 0) return 0; - op += cLitSize; - } - { size_t cSeqSize = ZSTD_compressSubBlock_sequences(&entropy->fse, - &entropyMetadata->fseMetadata, - sequences, nbSeq, - llCode, mlCode, ofCode, - cctxParams, - op, (size_t)(oend-op), - bmi2, writeSeqEntropy, seqEntropyWritten); - FORWARD_IF_ERROR(cSeqSize, "ZSTD_compressSubBlock_sequences failed"); - if (cSeqSize == 0) return 0; - op += cSeqSize; - } - /* Write block header */ - { size_t cSize = (size_t)(op-ostart) - ZSTD_blockHeaderSize; - U32 const cBlockHeader24 = lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); - MEM_writeLE24(ostart, cBlockHeader24); - } - return (size_t)(op-ostart); -} - -static size_t ZSTD_estimateSubBlockSize_literal(const BYTE* literals, size_t litSize, - const ZSTD_hufCTables_t* huf, - const ZSTD_hufCTablesMetadata_t* hufMetadata, - void* workspace, size_t wkspSize, - int writeEntropy) -{ - unsigned* const countWksp = (unsigned*)workspace; - unsigned maxSymbolValue = 255; - size_t literalSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ - - if (hufMetadata->hType == set_basic) return litSize; - else if (hufMetadata->hType == set_rle) return 1; - else if (hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat) { - size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); - if (ZSTD_isError(largest)) return litSize; - { size_t cLitSizeEstimate = HUF_estimateCompressedSize((const HUF_CElt*)huf->CTable, countWksp, maxSymbolValue); - if (writeEntropy) cLitSizeEstimate += hufMetadata->hufDesSize; - return cLitSizeEstimate + literalSectionHeaderSize; - } } - assert(0); /* impossible */ - return 0; -} - -static size_t ZSTD_estimateSubBlockSize_symbolType(SymbolEncodingType_e type, - const BYTE* codeTable, unsigned maxCode, - size_t nbSeq, const FSE_CTable* fseCTable, - const U8* additionalBits, - short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, - void* workspace, size_t wkspSize) -{ - unsigned* const countWksp = (unsigned*)workspace; - const BYTE* ctp = codeTable; - const BYTE* const ctStart = ctp; - const BYTE* const ctEnd = ctStart + nbSeq; - size_t cSymbolTypeSizeEstimateInBits = 0; - unsigned max = maxCode; - - HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ - if (type == set_basic) { - /* We selected this encoding type, so it must be valid. */ - assert(max <= defaultMax); - cSymbolTypeSizeEstimateInBits = max <= defaultMax - ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, countWksp, max) - : ERROR(GENERIC); - } else if (type == set_rle) { - cSymbolTypeSizeEstimateInBits = 0; - } else if (type == set_compressed || type == set_repeat) { - cSymbolTypeSizeEstimateInBits = ZSTD_fseBitCost(fseCTable, countWksp, max); - } - if (ZSTD_isError(cSymbolTypeSizeEstimateInBits)) return nbSeq * 10; - while (ctp < ctEnd) { - if (additionalBits) cSymbolTypeSizeEstimateInBits += additionalBits[*ctp]; - else cSymbolTypeSizeEstimateInBits += *ctp; /* for offset, offset code is also the number of additional bits */ - ctp++; - } - return cSymbolTypeSizeEstimateInBits / 8; -} - -static size_t ZSTD_estimateSubBlockSize_sequences(const BYTE* ofCodeTable, - const BYTE* llCodeTable, - const BYTE* mlCodeTable, - size_t nbSeq, - const ZSTD_fseCTables_t* fseTables, - const ZSTD_fseCTablesMetadata_t* fseMetadata, - void* workspace, size_t wkspSize, - int writeEntropy) -{ - size_t const sequencesSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ - size_t cSeqSizeEstimate = 0; - if (nbSeq == 0) return sequencesSectionHeaderSize; - cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->ofType, ofCodeTable, MaxOff, - nbSeq, fseTables->offcodeCTable, NULL, - OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, - workspace, wkspSize); - cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->llType, llCodeTable, MaxLL, - nbSeq, fseTables->litlengthCTable, LL_bits, - LL_defaultNorm, LL_defaultNormLog, MaxLL, - workspace, wkspSize); - cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->mlType, mlCodeTable, MaxML, - nbSeq, fseTables->matchlengthCTable, ML_bits, - ML_defaultNorm, ML_defaultNormLog, MaxML, - workspace, wkspSize); - if (writeEntropy) cSeqSizeEstimate += fseMetadata->fseTablesSize; - return cSeqSizeEstimate + sequencesSectionHeaderSize; -} - -typedef struct { - size_t estLitSize; - size_t estBlockSize; -} EstimatedBlockSize; -static EstimatedBlockSize ZSTD_estimateSubBlockSize(const BYTE* literals, size_t litSize, - const BYTE* ofCodeTable, - const BYTE* llCodeTable, - const BYTE* mlCodeTable, - size_t nbSeq, - const ZSTD_entropyCTables_t* entropy, - const ZSTD_entropyCTablesMetadata_t* entropyMetadata, - void* workspace, size_t wkspSize, - int writeLitEntropy, int writeSeqEntropy) -{ - EstimatedBlockSize ebs; - ebs.estLitSize = ZSTD_estimateSubBlockSize_literal(literals, litSize, - &entropy->huf, &entropyMetadata->hufMetadata, - workspace, wkspSize, writeLitEntropy); - ebs.estBlockSize = ZSTD_estimateSubBlockSize_sequences(ofCodeTable, llCodeTable, mlCodeTable, - nbSeq, &entropy->fse, &entropyMetadata->fseMetadata, - workspace, wkspSize, writeSeqEntropy); - ebs.estBlockSize += ebs.estLitSize + ZSTD_blockHeaderSize; - return ebs; -} - -static int ZSTD_needSequenceEntropyTables(ZSTD_fseCTablesMetadata_t const* fseMetadata) -{ - if (fseMetadata->llType == set_compressed || fseMetadata->llType == set_rle) - return 1; - if (fseMetadata->mlType == set_compressed || fseMetadata->mlType == set_rle) - return 1; - if (fseMetadata->ofType == set_compressed || fseMetadata->ofType == set_rle) - return 1; - return 0; -} - -static size_t countLiterals(SeqStore_t const* seqStore, const SeqDef* sp, size_t seqCount) -{ - size_t n, total = 0; - assert(sp != NULL); - for (n=0; n %zu bytes", seqCount, (const void*)sp, total); - return total; -} - -#define BYTESCALE 256 - -static size_t sizeBlockSequences(const SeqDef* sp, size_t nbSeqs, - size_t targetBudget, size_t avgLitCost, size_t avgSeqCost, - int firstSubBlock) -{ - size_t n, budget = 0, inSize=0; - /* entropy headers */ - size_t const headerSize = (size_t)firstSubBlock * 120 * BYTESCALE; /* generous estimate */ - assert(firstSubBlock==0 || firstSubBlock==1); - budget += headerSize; - - /* first sequence => at least one sequence*/ - budget += sp[0].litLength * avgLitCost + avgSeqCost; - if (budget > targetBudget) return 1; - inSize = sp[0].litLength + (sp[0].mlBase+MINMATCH); - - /* loop over sequences */ - for (n=1; n targetBudget) - /* though continue to expand until the sub-block is deemed compressible */ - && (budget < inSize * BYTESCALE) ) - break; - } - - return n; -} - -/** ZSTD_compressSubBlock_multi() : - * Breaks super-block into multiple sub-blocks and compresses them. - * Entropy will be written into the first block. - * The following blocks use repeat_mode to compress. - * Sub-blocks are all compressed, except the last one when beneficial. - * @return : compressed size of the super block (which features multiple ZSTD blocks) - * or 0 if it failed to compress. */ -static size_t ZSTD_compressSubBlock_multi(const SeqStore_t* seqStorePtr, - const ZSTD_compressedBlockState_t* prevCBlock, - ZSTD_compressedBlockState_t* nextCBlock, - const ZSTD_entropyCTablesMetadata_t* entropyMetadata, - const ZSTD_CCtx_params* cctxParams, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const int bmi2, U32 lastBlock, - void* workspace, size_t wkspSize) -{ - const SeqDef* const sstart = seqStorePtr->sequencesStart; - const SeqDef* const send = seqStorePtr->sequences; - const SeqDef* sp = sstart; /* tracks progresses within seqStorePtr->sequences */ - size_t const nbSeqs = (size_t)(send - sstart); - const BYTE* const lstart = seqStorePtr->litStart; - const BYTE* const lend = seqStorePtr->lit; - const BYTE* lp = lstart; - size_t const nbLiterals = (size_t)(lend - lstart); - BYTE const* ip = (BYTE const*)src; - BYTE const* const iend = ip + srcSize; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ostart + dstCapacity; - BYTE* op = ostart; - const BYTE* llCodePtr = seqStorePtr->llCode; - const BYTE* mlCodePtr = seqStorePtr->mlCode; - const BYTE* ofCodePtr = seqStorePtr->ofCode; - size_t const minTarget = ZSTD_TARGETCBLOCKSIZE_MIN; /* enforce minimum size, to reduce undesirable side effects */ - size_t const targetCBlockSize = MAX(minTarget, cctxParams->targetCBlockSize); - int writeLitEntropy = (entropyMetadata->hufMetadata.hType == set_compressed); - int writeSeqEntropy = 1; - - DEBUGLOG(5, "ZSTD_compressSubBlock_multi (srcSize=%u, litSize=%u, nbSeq=%u)", - (unsigned)srcSize, (unsigned)(lend-lstart), (unsigned)(send-sstart)); - - /* let's start by a general estimation for the full block */ - if (nbSeqs > 0) { - EstimatedBlockSize const ebs = - ZSTD_estimateSubBlockSize(lp, nbLiterals, - ofCodePtr, llCodePtr, mlCodePtr, nbSeqs, - &nextCBlock->entropy, entropyMetadata, - workspace, wkspSize, - writeLitEntropy, writeSeqEntropy); - /* quick estimation */ - size_t const avgLitCost = nbLiterals ? (ebs.estLitSize * BYTESCALE) / nbLiterals : BYTESCALE; - size_t const avgSeqCost = ((ebs.estBlockSize - ebs.estLitSize) * BYTESCALE) / nbSeqs; - const size_t nbSubBlocks = MAX((ebs.estBlockSize + (targetCBlockSize/2)) / targetCBlockSize, 1); - size_t n, avgBlockBudget, blockBudgetSupp=0; - avgBlockBudget = (ebs.estBlockSize * BYTESCALE) / nbSubBlocks; - DEBUGLOG(5, "estimated fullblock size=%u bytes ; avgLitCost=%.2f ; avgSeqCost=%.2f ; targetCBlockSize=%u, nbSubBlocks=%u ; avgBlockBudget=%.0f bytes", - (unsigned)ebs.estBlockSize, (double)avgLitCost/BYTESCALE, (double)avgSeqCost/BYTESCALE, - (unsigned)targetCBlockSize, (unsigned)nbSubBlocks, (double)avgBlockBudget/BYTESCALE); - /* simplification: if estimates states that the full superblock doesn't compress, just bail out immediately - * this will result in the production of a single uncompressed block covering @srcSize.*/ - if (ebs.estBlockSize > srcSize) return 0; - - /* compress and write sub-blocks */ - assert(nbSubBlocks>0); - for (n=0; n < nbSubBlocks-1; n++) { - /* determine nb of sequences for current sub-block + nbLiterals from next sequence */ - size_t const seqCount = sizeBlockSequences(sp, (size_t)(send-sp), - avgBlockBudget + blockBudgetSupp, avgLitCost, avgSeqCost, n==0); - /* if reached last sequence : break to last sub-block (simplification) */ - assert(seqCount <= (size_t)(send-sp)); - if (sp + seqCount == send) break; - assert(seqCount > 0); - /* compress sub-block */ - { int litEntropyWritten = 0; - int seqEntropyWritten = 0; - size_t litSize = countLiterals(seqStorePtr, sp, seqCount); - const size_t decompressedSize = - ZSTD_seqDecompressedSize(seqStorePtr, sp, seqCount, litSize, 0); - size_t const cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, - sp, seqCount, - lp, litSize, - llCodePtr, mlCodePtr, ofCodePtr, - cctxParams, - op, (size_t)(oend-op), - bmi2, writeLitEntropy, writeSeqEntropy, - &litEntropyWritten, &seqEntropyWritten, - 0); - FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); - - /* check compressibility, update state components */ - if (cSize > 0 && cSize < decompressedSize) { - DEBUGLOG(5, "Committed sub-block compressing %u bytes => %u bytes", - (unsigned)decompressedSize, (unsigned)cSize); - assert(ip + decompressedSize <= iend); - ip += decompressedSize; - lp += litSize; - op += cSize; - llCodePtr += seqCount; - mlCodePtr += seqCount; - ofCodePtr += seqCount; - /* Entropy only needs to be written once */ - if (litEntropyWritten) { - writeLitEntropy = 0; - } - if (seqEntropyWritten) { - writeSeqEntropy = 0; - } - sp += seqCount; - blockBudgetSupp = 0; - } } - /* otherwise : do not compress yet, coalesce current sub-block with following one */ - } - } /* if (nbSeqs > 0) */ - - /* write last block */ - DEBUGLOG(5, "Generate last sub-block: %u sequences remaining", (unsigned)(send - sp)); - { int litEntropyWritten = 0; - int seqEntropyWritten = 0; - size_t litSize = (size_t)(lend - lp); - size_t seqCount = (size_t)(send - sp); - const size_t decompressedSize = - ZSTD_seqDecompressedSize(seqStorePtr, sp, seqCount, litSize, 1); - size_t const cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, - sp, seqCount, - lp, litSize, - llCodePtr, mlCodePtr, ofCodePtr, - cctxParams, - op, (size_t)(oend-op), - bmi2, writeLitEntropy, writeSeqEntropy, - &litEntropyWritten, &seqEntropyWritten, - lastBlock); - FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); - - /* update pointers, the nb of literals borrowed from next sequence must be preserved */ - if (cSize > 0 && cSize < decompressedSize) { - DEBUGLOG(5, "Last sub-block compressed %u bytes => %u bytes", - (unsigned)decompressedSize, (unsigned)cSize); - assert(ip + decompressedSize <= iend); - ip += decompressedSize; - lp += litSize; - op += cSize; - llCodePtr += seqCount; - mlCodePtr += seqCount; - ofCodePtr += seqCount; - /* Entropy only needs to be written once */ - if (litEntropyWritten) { - writeLitEntropy = 0; - } - if (seqEntropyWritten) { - writeSeqEntropy = 0; - } - sp += seqCount; - } - } - - - if (writeLitEntropy) { - DEBUGLOG(5, "Literal entropy tables were never written"); - ZSTD_memcpy(&nextCBlock->entropy.huf, &prevCBlock->entropy.huf, sizeof(prevCBlock->entropy.huf)); - } - if (writeSeqEntropy && ZSTD_needSequenceEntropyTables(&entropyMetadata->fseMetadata)) { - /* If we haven't written our entropy tables, then we've violated our contract and - * must emit an uncompressed block. - */ - DEBUGLOG(5, "Sequence entropy tables were never written => cancel, emit an uncompressed block"); - return 0; - } - - if (ip < iend) { - /* some data left : last part of the block sent uncompressed */ - size_t const rSize = (size_t)((iend - ip)); - size_t const cSize = ZSTD_noCompressBlock(op, (size_t)(oend - op), ip, rSize, lastBlock); - DEBUGLOG(5, "Generate last uncompressed sub-block of %u bytes", (unsigned)(rSize)); - FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); - assert(cSize != 0); - op += cSize; - /* We have to regenerate the repcodes because we've skipped some sequences */ - if (sp < send) { - const SeqDef* seq; - Repcodes_t rep; - ZSTD_memcpy(&rep, prevCBlock->rep, sizeof(rep)); - for (seq = sstart; seq < sp; ++seq) { - ZSTD_updateRep(rep.rep, seq->offBase, ZSTD_getSequenceLength(seqStorePtr, seq).litLength == 0); - } - ZSTD_memcpy(nextCBlock->rep, &rep, sizeof(rep)); - } - } - - DEBUGLOG(5, "ZSTD_compressSubBlock_multi compressed all subBlocks: total compressed size = %u", - (unsigned)(op-ostart)); - return (size_t)(op-ostart); -} - -size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - unsigned lastBlock) -{ - ZSTD_entropyCTablesMetadata_t entropyMetadata; - - FORWARD_IF_ERROR(ZSTD_buildBlockEntropyStats(&zc->seqStore, - &zc->blockState.prevCBlock->entropy, - &zc->blockState.nextCBlock->entropy, - &zc->appliedParams, - &entropyMetadata, - zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */), ""); - - return ZSTD_compressSubBlock_multi(&zc->seqStore, - zc->blockState.prevCBlock, - zc->blockState.nextCBlock, - &entropyMetadata, - &zc->appliedParams, - dst, dstCapacity, - src, srcSize, - zc->bmi2, lastBlock, - zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */); -} diff --git a/third_party/zstd/lib/compress/zstd_compress_superblock.h b/third_party/zstd/lib/compress/zstd_compress_superblock.h deleted file mode 100644 index 8e494f0..0000000 --- a/third_party/zstd/lib/compress/zstd_compress_superblock.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_COMPRESS_ADVANCED_H -#define ZSTD_COMPRESS_ADVANCED_H - -/*-************************************* -* Dependencies -***************************************/ - -#include "../zstd.h" /* ZSTD_CCtx */ - -/*-************************************* -* Target Compressed Block Size -***************************************/ - -/* ZSTD_compressSuperBlock() : - * Used to compress a super block when targetCBlockSize is being used. - * The given block will be compressed into multiple sub blocks that are around targetCBlockSize. */ -size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, - void* dst, size_t dstCapacity, - void const* src, size_t srcSize, - unsigned lastBlock); - -#endif /* ZSTD_COMPRESS_ADVANCED_H */ diff --git a/third_party/zstd/lib/compress/zstd_cwksp.h b/third_party/zstd/lib/compress/zstd_cwksp.h deleted file mode 100644 index 7751800..0000000 --- a/third_party/zstd/lib/compress/zstd_cwksp.h +++ /dev/null @@ -1,765 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_CWKSP_H -#define ZSTD_CWKSP_H - -/*-************************************* -* Dependencies -***************************************/ -#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customFree */ -#include "../common/zstd_internal.h" -#include "../common/portability_macros.h" -#include "../common/compiler.h" /* ZS2_isPower2 */ - -/*-************************************* -* Constants -***************************************/ - -/* Since the workspace is effectively its own little malloc implementation / - * arena, when we run under ASAN, we should similarly insert redzones between - * each internal element of the workspace, so ASAN will catch overruns that - * reach outside an object but that stay inside the workspace. - * - * This defines the size of that redzone. - */ -#ifndef ZSTD_CWKSP_ASAN_REDZONE_SIZE -#define ZSTD_CWKSP_ASAN_REDZONE_SIZE 128 -#endif - - -/* Set our tables and aligneds to align by 64 bytes */ -#define ZSTD_CWKSP_ALIGNMENT_BYTES 64 - -/*-************************************* -* Structures -***************************************/ -typedef enum { - ZSTD_cwksp_alloc_objects, - ZSTD_cwksp_alloc_aligned_init_once, - ZSTD_cwksp_alloc_aligned, - ZSTD_cwksp_alloc_buffers -} ZSTD_cwksp_alloc_phase_e; - -/** - * Used to describe whether the workspace is statically allocated (and will not - * necessarily ever be freed), or if it's dynamically allocated and we can - * expect a well-formed caller to free this. - */ -typedef enum { - ZSTD_cwksp_dynamic_alloc, - ZSTD_cwksp_static_alloc -} ZSTD_cwksp_static_alloc_e; - -/** - * Zstd fits all its internal datastructures into a single continuous buffer, - * so that it only needs to perform a single OS allocation (or so that a buffer - * can be provided to it and it can perform no allocations at all). This buffer - * is called the workspace. - * - * Several optimizations complicate that process of allocating memory ranges - * from this workspace for each internal datastructure: - * - * - These different internal datastructures have different setup requirements: - * - * - The static objects need to be cleared once and can then be trivially - * reused for each compression. - * - * - Various buffers don't need to be initialized at all--they are always - * written into before they're read. - * - * - The matchstate tables have a unique requirement that they don't need - * their memory to be totally cleared, but they do need the memory to have - * some bound, i.e., a guarantee that all values in the memory they've been - * allocated is less than some maximum value (which is the starting value - * for the indices that they will then use for compression). When this - * guarantee is provided to them, they can use the memory without any setup - * work. When it can't, they have to clear the area. - * - * - These buffers also have different alignment requirements. - * - * - We would like to reuse the objects in the workspace for multiple - * compressions without having to perform any expensive reallocation or - * reinitialization work. - * - * - We would like to be able to efficiently reuse the workspace across - * multiple compressions **even when the compression parameters change** and - * we need to resize some of the objects (where possible). - * - * To attempt to manage this buffer, given these constraints, the ZSTD_cwksp - * abstraction was created. It works as follows: - * - * Workspace Layout: - * - * [ ... workspace ... ] - * [objects][tables ->] free space [<- buffers][<- aligned][<- init once] - * - * The various objects that live in the workspace are divided into the - * following categories, and are allocated separately: - * - * - Static objects: this is optionally the enclosing ZSTD_CCtx or ZSTD_CDict, - * so that literally everything fits in a single buffer. Note: if present, - * this must be the first object in the workspace, since ZSTD_customFree{CCtx, - * CDict}() rely on a pointer comparison to see whether one or two frees are - * required. - * - * - Fixed size objects: these are fixed-size, fixed-count objects that are - * nonetheless "dynamically" allocated in the workspace so that we can - * control how they're initialized separately from the broader ZSTD_CCtx. - * Examples: - * - Entropy Workspace - * - 2 x ZSTD_compressedBlockState_t - * - CDict dictionary contents - * - * - Tables: these are any of several different datastructures (hash tables, - * chain tables, binary trees) that all respect a common format: they are - * uint32_t arrays, all of whose values are between 0 and (nextSrc - base). - * Their sizes depend on the cparams. These tables are 64-byte aligned. - * - * - Init once: these buffers require to be initialized at least once before - * use. They should be used when we want to skip memory initialization - * while not triggering memory checkers (like Valgrind) when reading from - * from this memory without writing to it first. - * These buffers should be used carefully as they might contain data - * from previous compressions. - * Buffers are aligned to 64 bytes. - * - * - Aligned: these buffers don't require any initialization before they're - * used. The user of the buffer should make sure they write into a buffer - * location before reading from it. - * Buffers are aligned to 64 bytes. - * - * - Buffers: these buffers are used for various purposes that don't require - * any alignment or initialization before they're used. This means they can - * be moved around at no cost for a new compression. - * - * Allocating Memory: - * - * The various types of objects must be allocated in order, so they can be - * correctly packed into the workspace buffer. That order is: - * - * 1. Objects - * 2. Init once / Tables - * 3. Aligned / Tables - * 4. Buffers / Tables - * - * Attempts to reserve objects of different types out of order will fail. - */ -typedef struct { - void* workspace; - void* workspaceEnd; - - void* objectEnd; - void* tableEnd; - void* tableValidEnd; - void* allocStart; - void* initOnceStart; - - BYTE allocFailed; - int workspaceOversizedDuration; - ZSTD_cwksp_alloc_phase_e phase; - ZSTD_cwksp_static_alloc_e isStatic; -} ZSTD_cwksp; - -/*-************************************* -* Functions -***************************************/ - -MEM_STATIC size_t ZSTD_cwksp_available_space(ZSTD_cwksp* ws); -MEM_STATIC void* ZSTD_cwksp_initialAllocStart(ZSTD_cwksp* ws); - -MEM_STATIC void ZSTD_cwksp_assert_internal_consistency(ZSTD_cwksp* ws) { - (void)ws; - assert(ws->workspace <= ws->objectEnd); - assert(ws->objectEnd <= ws->tableEnd); - assert(ws->objectEnd <= ws->tableValidEnd); - assert(ws->tableEnd <= ws->allocStart); - assert(ws->tableValidEnd <= ws->allocStart); - assert(ws->allocStart <= ws->workspaceEnd); - assert(ws->initOnceStart <= ZSTD_cwksp_initialAllocStart(ws)); - assert(ws->workspace <= ws->initOnceStart); -#if ZSTD_MEMORY_SANITIZER - { - intptr_t const offset = __msan_test_shadow(ws->initOnceStart, - (U8*)ZSTD_cwksp_initialAllocStart(ws) - (U8*)ws->initOnceStart); - (void)offset; -#if defined(ZSTD_MSAN_PRINT) - if(offset!=-1) { - __msan_print_shadow((U8*)ws->initOnceStart + offset - 8, 32); - } -#endif - assert(offset==-1); - }; -#endif -} - -/** - * Align must be a power of 2. - */ -MEM_STATIC size_t ZSTD_cwksp_align(size_t size, size_t align) { - size_t const mask = align - 1; - assert(ZSTD_isPower2(align)); - return (size + mask) & ~mask; -} - -/** - * Use this to determine how much space in the workspace we will consume to - * allocate this object. (Normally it should be exactly the size of the object, - * but under special conditions, like ASAN, where we pad each object, it might - * be larger.) - * - * Since tables aren't currently redzoned, you don't need to call through this - * to figure out how much space you need for the matchState tables. Everything - * else is though. - * - * Do not use for sizing aligned buffers. Instead, use ZSTD_cwksp_aligned64_alloc_size(). - */ -MEM_STATIC size_t ZSTD_cwksp_alloc_size(size_t size) { - if (size == 0) - return 0; -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - return size + 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; -#else - return size; -#endif -} - -MEM_STATIC size_t ZSTD_cwksp_aligned_alloc_size(size_t size, size_t alignment) { - return ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(size, alignment)); -} - -/** - * Returns an adjusted alloc size that is the nearest larger multiple of 64 bytes. - * Used to determine the number of bytes required for a given "aligned". - */ -MEM_STATIC size_t ZSTD_cwksp_aligned64_alloc_size(size_t size) { - return ZSTD_cwksp_aligned_alloc_size(size, ZSTD_CWKSP_ALIGNMENT_BYTES); -} - -/** - * Returns the amount of additional space the cwksp must allocate - * for internal purposes (currently only alignment). - */ -MEM_STATIC size_t ZSTD_cwksp_slack_space_required(void) { - /* For alignment, the wksp will always allocate an additional 2*ZSTD_CWKSP_ALIGNMENT_BYTES - * bytes to align the beginning of tables section and end of buffers; - */ - size_t const slackSpace = ZSTD_CWKSP_ALIGNMENT_BYTES * 2; - return slackSpace; -} - - -/** - * Return the number of additional bytes required to align a pointer to the given number of bytes. - * alignBytes must be a power of two. - */ -MEM_STATIC size_t ZSTD_cwksp_bytes_to_align_ptr(void* ptr, const size_t alignBytes) { - size_t const alignBytesMask = alignBytes - 1; - size_t const bytes = (alignBytes - ((size_t)ptr & (alignBytesMask))) & alignBytesMask; - assert(ZSTD_isPower2(alignBytes)); - assert(bytes < alignBytes); - return bytes; -} - -/** - * Returns the initial value for allocStart which is used to determine the position from - * which we can allocate from the end of the workspace. - */ -MEM_STATIC void* ZSTD_cwksp_initialAllocStart(ZSTD_cwksp* ws) -{ - char* endPtr = (char*)ws->workspaceEnd; - assert(ZSTD_isPower2(ZSTD_CWKSP_ALIGNMENT_BYTES)); - endPtr = endPtr - ((size_t)endPtr % ZSTD_CWKSP_ALIGNMENT_BYTES); - return (void*)endPtr; -} - -/** - * Internal function. Do not use directly. - * Reserves the given number of bytes within the aligned/buffer segment of the wksp, - * which counts from the end of the wksp (as opposed to the object/table segment). - * - * Returns a pointer to the beginning of that space. - */ -MEM_STATIC void* -ZSTD_cwksp_reserve_internal_buffer_space(ZSTD_cwksp* ws, size_t const bytes) -{ - void* const alloc = (BYTE*)ws->allocStart - bytes; - void* const bottom = ws->tableEnd; - DEBUGLOG(5, "cwksp: reserving [0x%p]:%zd bytes; %zd bytes remaining", - alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); - ZSTD_cwksp_assert_internal_consistency(ws); - assert(alloc >= bottom); - if (alloc < bottom) { - DEBUGLOG(4, "cwksp: alloc failed!"); - ws->allocFailed = 1; - return NULL; - } - /* the area is reserved from the end of wksp. - * If it overlaps with tableValidEnd, it voids guarantees on values' range */ - if (alloc < ws->tableValidEnd) { - ws->tableValidEnd = alloc; - } - ws->allocStart = alloc; - return alloc; -} - -/** - * Moves the cwksp to the next phase, and does any necessary allocations. - * cwksp initialization must necessarily go through each phase in order. - * Returns a 0 on success, or zstd error - */ -MEM_STATIC size_t -ZSTD_cwksp_internal_advance_phase(ZSTD_cwksp* ws, ZSTD_cwksp_alloc_phase_e phase) -{ - assert(phase >= ws->phase); - if (phase > ws->phase) { - /* Going from allocating objects to allocating initOnce / tables */ - if (ws->phase < ZSTD_cwksp_alloc_aligned_init_once && - phase >= ZSTD_cwksp_alloc_aligned_init_once) { - ws->tableValidEnd = ws->objectEnd; - ws->initOnceStart = ZSTD_cwksp_initialAllocStart(ws); - - { /* Align the start of the tables to 64 bytes. Use [0, 63] bytes */ - void *const alloc = ws->objectEnd; - size_t const bytesToAlign = ZSTD_cwksp_bytes_to_align_ptr(alloc, ZSTD_CWKSP_ALIGNMENT_BYTES); - void *const objectEnd = (BYTE *) alloc + bytesToAlign; - DEBUGLOG(5, "reserving table alignment addtl space: %zu", bytesToAlign); - RETURN_ERROR_IF(objectEnd > ws->workspaceEnd, memory_allocation, - "table phase - alignment initial allocation failed!"); - ws->objectEnd = objectEnd; - ws->tableEnd = objectEnd; /* table area starts being empty */ - if (ws->tableValidEnd < ws->tableEnd) { - ws->tableValidEnd = ws->tableEnd; - } - } - } - ws->phase = phase; - ZSTD_cwksp_assert_internal_consistency(ws); - } - return 0; -} - -/** - * Returns whether this object/buffer/etc was allocated in this workspace. - */ -MEM_STATIC int ZSTD_cwksp_owns_buffer(const ZSTD_cwksp* ws, const void* ptr) -{ - return (ptr != NULL) && (ws->workspace <= ptr) && (ptr < ws->workspaceEnd); -} - -/** - * Internal function. Do not use directly. - */ -MEM_STATIC void* -ZSTD_cwksp_reserve_internal(ZSTD_cwksp* ws, size_t bytes, ZSTD_cwksp_alloc_phase_e phase) -{ - void* alloc; - if (ZSTD_isError(ZSTD_cwksp_internal_advance_phase(ws, phase)) || bytes == 0) { - return NULL; - } - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* over-reserve space */ - bytes += 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; -#endif - - alloc = ZSTD_cwksp_reserve_internal_buffer_space(ws, bytes); - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* Move alloc so there's ZSTD_CWKSP_ASAN_REDZONE_SIZE unused space on - * either size. */ - if (alloc) { - alloc = (BYTE *)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; - if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { - /* We need to keep the redzone poisoned while unpoisoning the bytes that - * are actually allocated. */ - __asan_unpoison_memory_region(alloc, bytes - 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE); - } - } -#endif - - return alloc; -} - -/** - * Reserves and returns unaligned memory. - */ -MEM_STATIC BYTE* ZSTD_cwksp_reserve_buffer(ZSTD_cwksp* ws, size_t bytes) -{ - return (BYTE*)ZSTD_cwksp_reserve_internal(ws, bytes, ZSTD_cwksp_alloc_buffers); -} - -/** - * Reserves and returns memory sized on and aligned on ZSTD_CWKSP_ALIGNMENT_BYTES (64 bytes). - * This memory has been initialized at least once in the past. - * This doesn't mean it has been initialized this time, and it might contain data from previous - * operations. - * The main usage is for algorithms that might need read access into uninitialized memory. - * The algorithm must maintain safety under these conditions and must make sure it doesn't - * leak any of the past data (directly or in side channels). - */ -MEM_STATIC void* ZSTD_cwksp_reserve_aligned_init_once(ZSTD_cwksp* ws, size_t bytes) -{ - size_t const alignedBytes = ZSTD_cwksp_align(bytes, ZSTD_CWKSP_ALIGNMENT_BYTES); - void* ptr = ZSTD_cwksp_reserve_internal(ws, alignedBytes, ZSTD_cwksp_alloc_aligned_init_once); - assert(((size_t)ptr & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); - if(ptr && ptr < ws->initOnceStart) { - /* We assume the memory following the current allocation is either: - * 1. Not usable as initOnce memory (end of workspace) - * 2. Another initOnce buffer that has been allocated before (and so was previously memset) - * 3. An ASAN redzone, in which case we don't want to write on it - * For these reasons it should be fine to not explicitly zero every byte up to ws->initOnceStart. - * Note that we assume here that MSAN and ASAN cannot run in the same time. */ - ZSTD_memset(ptr, 0, MIN((size_t)((U8*)ws->initOnceStart - (U8*)ptr), alignedBytes)); - ws->initOnceStart = ptr; - } -#if ZSTD_MEMORY_SANITIZER - assert(__msan_test_shadow(ptr, bytes) == -1); -#endif - return ptr; -} - -/** - * Reserves and returns memory sized on and aligned on ZSTD_CWKSP_ALIGNMENT_BYTES (64 bytes). - */ -MEM_STATIC void* ZSTD_cwksp_reserve_aligned64(ZSTD_cwksp* ws, size_t bytes) -{ - void* const ptr = ZSTD_cwksp_reserve_internal(ws, - ZSTD_cwksp_align(bytes, ZSTD_CWKSP_ALIGNMENT_BYTES), - ZSTD_cwksp_alloc_aligned); - assert(((size_t)ptr & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); - return ptr; -} - -/** - * Aligned on 64 bytes. These buffers have the special property that - * their values remain constrained, allowing us to reuse them without - * memset()-ing them. - */ -MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes) -{ - const ZSTD_cwksp_alloc_phase_e phase = ZSTD_cwksp_alloc_aligned_init_once; - void* alloc; - void* end; - void* top; - - /* We can only start allocating tables after we are done reserving space for objects at the - * start of the workspace */ - if(ws->phase < phase) { - if (ZSTD_isError(ZSTD_cwksp_internal_advance_phase(ws, phase))) { - return NULL; - } - } - alloc = ws->tableEnd; - end = (BYTE *)alloc + bytes; - top = ws->allocStart; - - DEBUGLOG(5, "cwksp: reserving %p table %zd bytes, %zd bytes remaining", - alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); - assert((bytes & (sizeof(U32)-1)) == 0); - ZSTD_cwksp_assert_internal_consistency(ws); - assert(end <= top); - if (end > top) { - DEBUGLOG(4, "cwksp: table alloc failed!"); - ws->allocFailed = 1; - return NULL; - } - ws->tableEnd = end; - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { - __asan_unpoison_memory_region(alloc, bytes); - } -#endif - - assert((bytes & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); - assert(((size_t)alloc & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); - return alloc; -} - -/** - * Aligned on sizeof(void*). - * Note : should happen only once, at workspace first initialization - */ -MEM_STATIC void* ZSTD_cwksp_reserve_object(ZSTD_cwksp* ws, size_t bytes) -{ - size_t const roundedBytes = ZSTD_cwksp_align(bytes, sizeof(void*)); - void* alloc = ws->objectEnd; - void* end = (BYTE*)alloc + roundedBytes; - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* over-reserve space */ - end = (BYTE *)end + 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; -#endif - - DEBUGLOG(4, - "cwksp: reserving %p object %zd bytes (rounded to %zd), %zd bytes remaining", - alloc, bytes, roundedBytes, ZSTD_cwksp_available_space(ws) - roundedBytes); - assert((size_t)alloc % ZSTD_ALIGNOF(void*) == 0); - assert(bytes % ZSTD_ALIGNOF(void*) == 0); - ZSTD_cwksp_assert_internal_consistency(ws); - /* we must be in the first phase, no advance is possible */ - if (ws->phase != ZSTD_cwksp_alloc_objects || end > ws->workspaceEnd) { - DEBUGLOG(3, "cwksp: object alloc failed!"); - ws->allocFailed = 1; - return NULL; - } - ws->objectEnd = end; - ws->tableEnd = end; - ws->tableValidEnd = end; - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* Move alloc so there's ZSTD_CWKSP_ASAN_REDZONE_SIZE unused space on - * either size. */ - alloc = (BYTE*)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; - if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { - __asan_unpoison_memory_region(alloc, bytes); - } -#endif - - return alloc; -} -/** - * with alignment control - * Note : should happen only once, at workspace first initialization - */ -MEM_STATIC void* ZSTD_cwksp_reserve_object_aligned(ZSTD_cwksp* ws, size_t byteSize, size_t alignment) -{ - size_t const mask = alignment - 1; - size_t const surplus = (alignment > sizeof(void*)) ? alignment - sizeof(void*) : 0; - void* const start = ZSTD_cwksp_reserve_object(ws, byteSize + surplus); - if (start == NULL) return NULL; - if (surplus == 0) return start; - assert(ZSTD_isPower2(alignment)); - return (void*)(((size_t)start + surplus) & ~mask); -} - -MEM_STATIC void ZSTD_cwksp_mark_tables_dirty(ZSTD_cwksp* ws) -{ - DEBUGLOG(4, "cwksp: ZSTD_cwksp_mark_tables_dirty"); - -#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) - /* To validate that the table reuse logic is sound, and that we don't - * access table space that we haven't cleaned, we re-"poison" the table - * space every time we mark it dirty. - * Since tableValidEnd space and initOnce space may overlap we don't poison - * the initOnce portion as it break its promise. This means that this poisoning - * check isn't always applied fully. */ - { - size_t size = (BYTE*)ws->tableValidEnd - (BYTE*)ws->objectEnd; - assert(__msan_test_shadow(ws->objectEnd, size) == -1); - if((BYTE*)ws->tableValidEnd < (BYTE*)ws->initOnceStart) { - __msan_poison(ws->objectEnd, size); - } else { - assert(ws->initOnceStart >= ws->objectEnd); - __msan_poison(ws->objectEnd, (BYTE*)ws->initOnceStart - (BYTE*)ws->objectEnd); - } - } -#endif - - assert(ws->tableValidEnd >= ws->objectEnd); - assert(ws->tableValidEnd <= ws->allocStart); - ws->tableValidEnd = ws->objectEnd; - ZSTD_cwksp_assert_internal_consistency(ws); -} - -MEM_STATIC void ZSTD_cwksp_mark_tables_clean(ZSTD_cwksp* ws) { - DEBUGLOG(4, "cwksp: ZSTD_cwksp_mark_tables_clean"); - assert(ws->tableValidEnd >= ws->objectEnd); - assert(ws->tableValidEnd <= ws->allocStart); - if (ws->tableValidEnd < ws->tableEnd) { - ws->tableValidEnd = ws->tableEnd; - } - ZSTD_cwksp_assert_internal_consistency(ws); -} - -/** - * Zero the part of the allocated tables not already marked clean. - */ -MEM_STATIC void ZSTD_cwksp_clean_tables(ZSTD_cwksp* ws) { - DEBUGLOG(4, "cwksp: ZSTD_cwksp_clean_tables"); - assert(ws->tableValidEnd >= ws->objectEnd); - assert(ws->tableValidEnd <= ws->allocStart); - if (ws->tableValidEnd < ws->tableEnd) { - ZSTD_memset(ws->tableValidEnd, 0, (size_t)((BYTE*)ws->tableEnd - (BYTE*)ws->tableValidEnd)); - } - ZSTD_cwksp_mark_tables_clean(ws); -} - -/** - * Invalidates table allocations. - * All other allocations remain valid. - */ -MEM_STATIC void ZSTD_cwksp_clear_tables(ZSTD_cwksp* ws) -{ - DEBUGLOG(4, "cwksp: clearing tables!"); - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* We don't do this when the workspace is statically allocated, because - * when that is the case, we have no capability to hook into the end of the - * workspace's lifecycle to unpoison the memory. - */ - if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { - size_t size = (BYTE*)ws->tableValidEnd - (BYTE*)ws->objectEnd; - __asan_poison_memory_region(ws->objectEnd, size); - } -#endif - - ws->tableEnd = ws->objectEnd; - ZSTD_cwksp_assert_internal_consistency(ws); -} - -/** - * Invalidates all buffer, aligned, and table allocations. - * Object allocations remain valid. - */ -MEM_STATIC void ZSTD_cwksp_clear(ZSTD_cwksp* ws) { - DEBUGLOG(4, "cwksp: clearing!"); - -#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) - /* To validate that the context reuse logic is sound, and that we don't - * access stuff that this compression hasn't initialized, we re-"poison" - * the workspace except for the areas in which we expect memory reuse - * without initialization (objects, valid tables area and init once - * memory). */ - { - if((BYTE*)ws->tableValidEnd < (BYTE*)ws->initOnceStart) { - size_t size = (BYTE*)ws->initOnceStart - (BYTE*)ws->tableValidEnd; - __msan_poison(ws->tableValidEnd, size); - } - } -#endif - -#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) - /* We don't do this when the workspace is statically allocated, because - * when that is the case, we have no capability to hook into the end of the - * workspace's lifecycle to unpoison the memory. - */ - if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { - size_t size = (BYTE*)ws->workspaceEnd - (BYTE*)ws->objectEnd; - __asan_poison_memory_region(ws->objectEnd, size); - } -#endif - - ws->tableEnd = ws->objectEnd; - ws->allocStart = ZSTD_cwksp_initialAllocStart(ws); - ws->allocFailed = 0; - if (ws->phase > ZSTD_cwksp_alloc_aligned_init_once) { - ws->phase = ZSTD_cwksp_alloc_aligned_init_once; - } - ZSTD_cwksp_assert_internal_consistency(ws); -} - -MEM_STATIC size_t ZSTD_cwksp_sizeof(const ZSTD_cwksp* ws) { - return (size_t)((BYTE*)ws->workspaceEnd - (BYTE*)ws->workspace); -} - -MEM_STATIC size_t ZSTD_cwksp_used(const ZSTD_cwksp* ws) { - return (size_t)((BYTE*)ws->tableEnd - (BYTE*)ws->workspace) - + (size_t)((BYTE*)ws->workspaceEnd - (BYTE*)ws->allocStart); -} - -/** - * The provided workspace takes ownership of the buffer [start, start+size). - * Any existing values in the workspace are ignored (the previously managed - * buffer, if present, must be separately freed). - */ -MEM_STATIC void ZSTD_cwksp_init(ZSTD_cwksp* ws, void* start, size_t size, ZSTD_cwksp_static_alloc_e isStatic) { - DEBUGLOG(4, "cwksp: init'ing workspace with %zd bytes", size); - assert(((size_t)start & (sizeof(void*)-1)) == 0); /* ensure correct alignment */ - ws->workspace = start; - ws->workspaceEnd = (BYTE*)start + size; - ws->objectEnd = ws->workspace; - ws->tableValidEnd = ws->objectEnd; - ws->initOnceStart = ZSTD_cwksp_initialAllocStart(ws); - ws->phase = ZSTD_cwksp_alloc_objects; - ws->isStatic = isStatic; - ZSTD_cwksp_clear(ws); - ws->workspaceOversizedDuration = 0; - ZSTD_cwksp_assert_internal_consistency(ws); -} - -MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { - void* workspace = ZSTD_customMalloc(size, customMem); - DEBUGLOG(4, "cwksp: creating new workspace with %zd bytes", size); - RETURN_ERROR_IF(workspace == NULL, memory_allocation, "NULL pointer!"); - ZSTD_cwksp_init(ws, workspace, size, ZSTD_cwksp_dynamic_alloc); - return 0; -} - -MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { - void *ptr = ws->workspace; - DEBUGLOG(4, "cwksp: freeing workspace"); -#if ZSTD_MEMORY_SANITIZER && !defined(ZSTD_MSAN_DONT_POISON_WORKSPACE) - if (ptr != NULL && customMem.customFree != NULL) { - __msan_unpoison(ptr, ZSTD_cwksp_sizeof(ws)); - } -#endif - ZSTD_memset(ws, 0, sizeof(ZSTD_cwksp)); - ZSTD_customFree(ptr, customMem); -} - -/** - * Moves the management of a workspace from one cwksp to another. The src cwksp - * is left in an invalid state (src must be re-init()'ed before it's used again). - */ -MEM_STATIC void ZSTD_cwksp_move(ZSTD_cwksp* dst, ZSTD_cwksp* src) { - *dst = *src; - ZSTD_memset(src, 0, sizeof(ZSTD_cwksp)); -} - -MEM_STATIC int ZSTD_cwksp_reserve_failed(const ZSTD_cwksp* ws) { - return ws->allocFailed; -} - -/*-************************************* -* Functions Checking Free Space -***************************************/ - -/* ZSTD_alignmentSpaceWithinBounds() : - * Returns if the estimated space needed for a wksp is within an acceptable limit of the - * actual amount of space used. - */ -MEM_STATIC int ZSTD_cwksp_estimated_space_within_bounds(const ZSTD_cwksp *const ws, size_t const estimatedSpace) { - /* We have an alignment space between objects and tables between tables and buffers, so we can have up to twice - * the alignment bytes difference between estimation and actual usage */ - return (estimatedSpace - ZSTD_cwksp_slack_space_required()) <= ZSTD_cwksp_used(ws) && - ZSTD_cwksp_used(ws) <= estimatedSpace; -} - - -MEM_STATIC size_t ZSTD_cwksp_available_space(ZSTD_cwksp* ws) { - return (size_t)((BYTE*)ws->allocStart - (BYTE*)ws->tableEnd); -} - -MEM_STATIC int ZSTD_cwksp_check_available(ZSTD_cwksp* ws, size_t additionalNeededSpace) { - return ZSTD_cwksp_available_space(ws) >= additionalNeededSpace; -} - -MEM_STATIC int ZSTD_cwksp_check_too_large(ZSTD_cwksp* ws, size_t additionalNeededSpace) { - return ZSTD_cwksp_check_available( - ws, additionalNeededSpace * ZSTD_WORKSPACETOOLARGE_FACTOR); -} - -MEM_STATIC int ZSTD_cwksp_check_wasteful(ZSTD_cwksp* ws, size_t additionalNeededSpace) { - return ZSTD_cwksp_check_too_large(ws, additionalNeededSpace) - && ws->workspaceOversizedDuration > ZSTD_WORKSPACETOOLARGE_MAXDURATION; -} - -MEM_STATIC void ZSTD_cwksp_bump_oversized_duration( - ZSTD_cwksp* ws, size_t additionalNeededSpace) { - if (ZSTD_cwksp_check_too_large(ws, additionalNeededSpace)) { - ws->workspaceOversizedDuration++; - } else { - ws->workspaceOversizedDuration = 0; - } -} - -#endif /* ZSTD_CWKSP_H */ diff --git a/third_party/zstd/lib/compress/zstd_double_fast.c b/third_party/zstd/lib/compress/zstd_double_fast.c deleted file mode 100644 index 1a266e7..0000000 --- a/third_party/zstd/lib/compress/zstd_double_fast.c +++ /dev/null @@ -1,778 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_compress_internal.h" -#include "zstd_double_fast.h" - -#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_fillDoubleHashTableForCDict(ZSTD_MatchState_t* ms, - void const* end, ZSTD_dictTableLoadMethod_e dtlm) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashLarge = ms->hashTable; - U32 const hBitsL = cParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; - U32 const mls = cParams->minMatch; - U32* const hashSmall = ms->chainTable; - U32 const hBitsS = cParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; - const BYTE* const base = ms->window.base; - const BYTE* ip = base + ms->nextToUpdate; - const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; - const U32 fastHashFillStep = 3; - - /* Always insert every fastHashFillStep position into the hash tables. - * Insert the other positions into the large hash table if their entry - * is empty. - */ - for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { - U32 const curr = (U32)(ip - base); - U32 i; - for (i = 0; i < fastHashFillStep; ++i) { - size_t const smHashAndTag = ZSTD_hashPtr(ip + i, hBitsS, mls); - size_t const lgHashAndTag = ZSTD_hashPtr(ip + i, hBitsL, 8); - if (i == 0) { - ZSTD_writeTaggedIndex(hashSmall, smHashAndTag, curr + i); - } - if (i == 0 || hashLarge[lgHashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS] == 0) { - ZSTD_writeTaggedIndex(hashLarge, lgHashAndTag, curr + i); - } - /* Only load extra positions for ZSTD_dtlm_full */ - if (dtlm == ZSTD_dtlm_fast) - break; - } } -} - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_fillDoubleHashTableForCCtx(ZSTD_MatchState_t* ms, - void const* end, ZSTD_dictTableLoadMethod_e dtlm) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashLarge = ms->hashTable; - U32 const hBitsL = cParams->hashLog; - U32 const mls = cParams->minMatch; - U32* const hashSmall = ms->chainTable; - U32 const hBitsS = cParams->chainLog; - const BYTE* const base = ms->window.base; - const BYTE* ip = base + ms->nextToUpdate; - const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; - const U32 fastHashFillStep = 3; - - /* Always insert every fastHashFillStep position into the hash tables. - * Insert the other positions into the large hash table if their entry - * is empty. - */ - for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { - U32 const curr = (U32)(ip - base); - U32 i; - for (i = 0; i < fastHashFillStep; ++i) { - size_t const smHash = ZSTD_hashPtr(ip + i, hBitsS, mls); - size_t const lgHash = ZSTD_hashPtr(ip + i, hBitsL, 8); - if (i == 0) - hashSmall[smHash] = curr + i; - if (i == 0 || hashLarge[lgHash] == 0) - hashLarge[lgHash] = curr + i; - /* Only load extra positions for ZSTD_dtlm_full */ - if (dtlm == ZSTD_dtlm_fast) - break; - } } -} - -void ZSTD_fillDoubleHashTable(ZSTD_MatchState_t* ms, - const void* const end, - ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp) -{ - if (tfp == ZSTD_tfp_forCDict) { - ZSTD_fillDoubleHashTableForCDict(ms, end, dtlm); - } else { - ZSTD_fillDoubleHashTableForCCtx(ms, end, dtlm); - } -} - - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_doubleFast_noDict_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, U32 const mls /* template */) -{ - ZSTD_compressionParameters const* cParams = &ms->cParams; - U32* const hashLong = ms->hashTable; - const U32 hBitsL = cParams->hashLog; - U32* const hashSmall = ms->chainTable; - const U32 hBitsS = cParams->chainLog; - const BYTE* const base = ms->window.base; - const BYTE* const istart = (const BYTE*)src; - const BYTE* anchor = istart; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - /* presumes that, if there is a dictionary, it must be using Attach mode */ - const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); - const BYTE* const prefixLowest = base + prefixLowestIndex; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - HASH_READ_SIZE; - U32 offset_1=rep[0], offset_2=rep[1]; - U32 offsetSaved1 = 0, offsetSaved2 = 0; - - size_t mLength; - U32 offset; - U32 curr; - - /* how many positions to search before increasing step size */ - const size_t kStepIncr = 1 << kSearchStrength; - /* the position at which to increment the step size if no match is found */ - const BYTE* nextStep; - size_t step; /* the current step size */ - - size_t hl0; /* the long hash at ip */ - size_t hl1; /* the long hash at ip1 */ - - U32 idxl0; /* the long match index for ip */ - U32 idxl1; /* the long match index for ip1 */ - - const BYTE* matchl0; /* the long match for ip */ - const BYTE* matchs0; /* the short match for ip */ - const BYTE* matchl1; /* the long match for ip1 */ - const BYTE* matchs0_safe; /* matchs0 or safe address */ - - const BYTE* ip = istart; /* the current position */ - const BYTE* ip1; /* the next position */ - /* Array of ~random data, should have low probability of matching data - * we load from here instead of from tables, if matchl0/matchl1 are - * invalid indices. Used to avoid unpredictable branches. */ - const BYTE dummy[] = {0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0xe2,0xb4}; - - DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_noDict_generic"); - - /* init */ - ip += ((ip - prefixLowest) == 0); - { - U32 const current = (U32)(ip - base); - U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); - U32 const maxRep = current - windowLow; - if (offset_2 > maxRep) offsetSaved2 = offset_2, offset_2 = 0; - if (offset_1 > maxRep) offsetSaved1 = offset_1, offset_1 = 0; - } - - /* Outer Loop: one iteration per match found and stored */ - while (1) { - step = 1; - nextStep = ip + kStepIncr; - ip1 = ip + step; - - if (ip1 > ilimit) { - goto _cleanup; - } - - hl0 = ZSTD_hashPtr(ip, hBitsL, 8); - idxl0 = hashLong[hl0]; - matchl0 = base + idxl0; - - /* Inner Loop: one iteration per search / position */ - do { - const size_t hs0 = ZSTD_hashPtr(ip, hBitsS, mls); - const U32 idxs0 = hashSmall[hs0]; - curr = (U32)(ip-base); - matchs0 = base + idxs0; - - hashLong[hl0] = hashSmall[hs0] = curr; /* update hash tables */ - - /* check noDict repcode */ - if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) { - mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; - ip++; - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); - goto _match_stored; - } - - hl1 = ZSTD_hashPtr(ip1, hBitsL, 8); - - /* idxl0 > prefixLowestIndex is a (somewhat) unpredictable branch. - * However expression below complies into conditional move. Since - * match is unlikely and we only *branch* on idxl0 > prefixLowestIndex - * if there is a match, all branches become predictable. */ - { const BYTE* const matchl0_safe = ZSTD_selectAddr(idxl0, prefixLowestIndex, matchl0, &dummy[0]); - - /* check prefix long match */ - if (MEM_read64(matchl0_safe) == MEM_read64(ip) && matchl0_safe == matchl0) { - mLength = ZSTD_count(ip+8, matchl0+8, iend) + 8; - offset = (U32)(ip-matchl0); - while (((ip>anchor) & (matchl0>prefixLowest)) && (ip[-1] == matchl0[-1])) { ip--; matchl0--; mLength++; } /* catch up */ - goto _match_found; - } } - - idxl1 = hashLong[hl1]; - matchl1 = base + idxl1; - - /* Same optimization as matchl0 above */ - matchs0_safe = ZSTD_selectAddr(idxs0, prefixLowestIndex, matchs0, &dummy[0]); - - /* check prefix short match */ - if(MEM_read32(matchs0_safe) == MEM_read32(ip) && matchs0_safe == matchs0) { - goto _search_next_long; - } - - if (ip1 >= nextStep) { - PREFETCH_L1(ip1 + 64); - PREFETCH_L1(ip1 + 128); - step++; - nextStep += kStepIncr; - } - ip = ip1; - ip1 += step; - - hl0 = hl1; - idxl0 = idxl1; - matchl0 = matchl1; - #if defined(__aarch64__) - PREFETCH_L1(ip+256); - #endif - } while (ip1 <= ilimit); - -_cleanup: - /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), - * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ - offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; - - /* save reps for next block */ - rep[0] = offset_1 ? offset_1 : offsetSaved1; - rep[1] = offset_2 ? offset_2 : offsetSaved2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); - -_search_next_long: - - /* short match found: let's check for a longer one */ - mLength = ZSTD_count(ip+4, matchs0+4, iend) + 4; - offset = (U32)(ip - matchs0); - - /* check long match at +1 position */ - if ((idxl1 > prefixLowestIndex) && (MEM_read64(matchl1) == MEM_read64(ip1))) { - size_t const l1len = ZSTD_count(ip1+8, matchl1+8, iend) + 8; - if (l1len > mLength) { - /* use the long match instead */ - ip = ip1; - mLength = l1len; - offset = (U32)(ip-matchl1); - matchs0 = matchl1; - } - } - - while (((ip>anchor) & (matchs0>prefixLowest)) && (ip[-1] == matchs0[-1])) { ip--; matchs0--; mLength++; } /* complete backward */ - - /* fall-through */ - -_match_found: /* requires ip, offset, mLength */ - offset_2 = offset_1; - offset_1 = offset; - - if (step < 4) { - /* It is unsafe to write this value back to the hashtable when ip1 is - * greater than or equal to the new ip we will have after we're done - * processing this match. Rather than perform that test directly - * (ip1 >= ip + mLength), which costs speed in practice, we do a simpler - * more predictable test. The minmatch even if we take a short match is - * 4 bytes, so as long as step, the distance between ip and ip1 - * (initially) is less than 4, we know ip1 < new ip. */ - hashLong[hl1] = (U32)(ip1 - base); - } - - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - -_match_stored: - /* match found */ - ip += mLength; - anchor = ip; - - if (ip <= ilimit) { - /* Complementary insertion */ - /* done after iLimit test, as candidates could be > iend-8 */ - { U32 const indexToInsert = curr+2; - hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; - hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); - hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; - hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); - } - - /* check immediate repcode */ - while ( (ip <= ilimit) - && ( (offset_2>0) - & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) { - /* store sequence */ - size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; - U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; /* swap offset_2 <=> offset_1 */ - hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip-base); - hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip-base); - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, rLength); - ip += rLength; - anchor = ip; - continue; /* faster when present ... (?) */ - } - } - } -} - - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, - U32 const mls /* template */) -{ - ZSTD_compressionParameters const* cParams = &ms->cParams; - U32* const hashLong = ms->hashTable; - const U32 hBitsL = cParams->hashLog; - U32* const hashSmall = ms->chainTable; - const U32 hBitsS = cParams->chainLog; - const BYTE* const base = ms->window.base; - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip = istart; - const BYTE* anchor = istart; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - /* presumes that, if there is a dictionary, it must be using Attach mode */ - const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); - const BYTE* const prefixLowest = base + prefixLowestIndex; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - HASH_READ_SIZE; - U32 offset_1=rep[0], offset_2=rep[1]; - - const ZSTD_MatchState_t* const dms = ms->dictMatchState; - const ZSTD_compressionParameters* const dictCParams = &dms->cParams; - const U32* const dictHashLong = dms->hashTable; - const U32* const dictHashSmall = dms->chainTable; - const U32 dictStartIndex = dms->window.dictLimit; - const BYTE* const dictBase = dms->window.base; - const BYTE* const dictStart = dictBase + dictStartIndex; - const BYTE* const dictEnd = dms->window.nextSrc; - const U32 dictIndexDelta = prefixLowestIndex - (U32)(dictEnd - dictBase); - const U32 dictHBitsL = dictCParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; - const U32 dictHBitsS = dictCParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; - const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictStart)); - - DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_dictMatchState_generic"); - - /* if a dictionary is attached, it must be within window range */ - assert(ms->window.dictLimit + (1U << cParams->windowLog) >= endIndex); - - if (ms->prefetchCDictTables) { - size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); - size_t const chainTableBytes = (((size_t)1) << dictCParams->chainLog) * sizeof(U32); - PREFETCH_AREA(dictHashLong, hashTableBytes); - PREFETCH_AREA(dictHashSmall, chainTableBytes); - } - - /* init */ - ip += (dictAndPrefixLength == 0); - - /* dictMatchState repCode checks don't currently handle repCode == 0 - * disabling. */ - assert(offset_1 <= dictAndPrefixLength); - assert(offset_2 <= dictAndPrefixLength); - - /* Main Search Loop */ - while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ - size_t mLength; - U32 offset; - size_t const h2 = ZSTD_hashPtr(ip, hBitsL, 8); - size_t const h = ZSTD_hashPtr(ip, hBitsS, mls); - size_t const dictHashAndTagL = ZSTD_hashPtr(ip, dictHBitsL, 8); - size_t const dictHashAndTagS = ZSTD_hashPtr(ip, dictHBitsS, mls); - U32 const dictMatchIndexAndTagL = dictHashLong[dictHashAndTagL >> ZSTD_SHORT_CACHE_TAG_BITS]; - U32 const dictMatchIndexAndTagS = dictHashSmall[dictHashAndTagS >> ZSTD_SHORT_CACHE_TAG_BITS]; - int const dictTagsMatchL = ZSTD_comparePackedTags(dictMatchIndexAndTagL, dictHashAndTagL); - int const dictTagsMatchS = ZSTD_comparePackedTags(dictMatchIndexAndTagS, dictHashAndTagS); - U32 const curr = (U32)(ip-base); - U32 const matchIndexL = hashLong[h2]; - U32 matchIndexS = hashSmall[h]; - const BYTE* matchLong = base + matchIndexL; - const BYTE* match = base + matchIndexS; - const U32 repIndex = curr + 1 - offset_1; - const BYTE* repMatch = (repIndex < prefixLowestIndex) ? - dictBase + (repIndex - dictIndexDelta) : - base + repIndex; - hashLong[h2] = hashSmall[h] = curr; /* update hash tables */ - - /* check repcode */ - if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { - const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; - mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; - ip++; - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); - goto _match_stored; - } - - if ((matchIndexL >= prefixLowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) { - /* check prefix long match */ - mLength = ZSTD_count(ip+8, matchLong+8, iend) + 8; - offset = (U32)(ip-matchLong); - while (((ip>anchor) & (matchLong>prefixLowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */ - goto _match_found; - } else if (dictTagsMatchL) { - /* check dictMatchState long match */ - U32 const dictMatchIndexL = dictMatchIndexAndTagL >> ZSTD_SHORT_CACHE_TAG_BITS; - const BYTE* dictMatchL = dictBase + dictMatchIndexL; - assert(dictMatchL < dictEnd); - - if (dictMatchL > dictStart && MEM_read64(dictMatchL) == MEM_read64(ip)) { - mLength = ZSTD_count_2segments(ip+8, dictMatchL+8, iend, dictEnd, prefixLowest) + 8; - offset = (U32)(curr - dictMatchIndexL - dictIndexDelta); - while (((ip>anchor) & (dictMatchL>dictStart)) && (ip[-1] == dictMatchL[-1])) { ip--; dictMatchL--; mLength++; } /* catch up */ - goto _match_found; - } } - - if (matchIndexS > prefixLowestIndex) { - /* short match candidate */ - if (MEM_read32(match) == MEM_read32(ip)) { - goto _search_next_long; - } - } else if (dictTagsMatchS) { - /* check dictMatchState short match */ - U32 const dictMatchIndexS = dictMatchIndexAndTagS >> ZSTD_SHORT_CACHE_TAG_BITS; - match = dictBase + dictMatchIndexS; - matchIndexS = dictMatchIndexS + dictIndexDelta; - - if (match > dictStart && MEM_read32(match) == MEM_read32(ip)) { - goto _search_next_long; - } } - - ip += ((ip-anchor) >> kSearchStrength) + 1; -#if defined(__aarch64__) - PREFETCH_L1(ip+256); -#endif - continue; - -_search_next_long: - { size_t const hl3 = ZSTD_hashPtr(ip+1, hBitsL, 8); - size_t const dictHashAndTagL3 = ZSTD_hashPtr(ip+1, dictHBitsL, 8); - U32 const matchIndexL3 = hashLong[hl3]; - U32 const dictMatchIndexAndTagL3 = dictHashLong[dictHashAndTagL3 >> ZSTD_SHORT_CACHE_TAG_BITS]; - int const dictTagsMatchL3 = ZSTD_comparePackedTags(dictMatchIndexAndTagL3, dictHashAndTagL3); - const BYTE* matchL3 = base + matchIndexL3; - hashLong[hl3] = curr + 1; - - /* check prefix long +1 match */ - if ((matchIndexL3 >= prefixLowestIndex) && (MEM_read64(matchL3) == MEM_read64(ip+1))) { - mLength = ZSTD_count(ip+9, matchL3+8, iend) + 8; - ip++; - offset = (U32)(ip-matchL3); - while (((ip>anchor) & (matchL3>prefixLowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLength++; } /* catch up */ - goto _match_found; - } else if (dictTagsMatchL3) { - /* check dict long +1 match */ - U32 const dictMatchIndexL3 = dictMatchIndexAndTagL3 >> ZSTD_SHORT_CACHE_TAG_BITS; - const BYTE* dictMatchL3 = dictBase + dictMatchIndexL3; - assert(dictMatchL3 < dictEnd); - if (dictMatchL3 > dictStart && MEM_read64(dictMatchL3) == MEM_read64(ip+1)) { - mLength = ZSTD_count_2segments(ip+1+8, dictMatchL3+8, iend, dictEnd, prefixLowest) + 8; - ip++; - offset = (U32)(curr + 1 - dictMatchIndexL3 - dictIndexDelta); - while (((ip>anchor) & (dictMatchL3>dictStart)) && (ip[-1] == dictMatchL3[-1])) { ip--; dictMatchL3--; mLength++; } /* catch up */ - goto _match_found; - } } } - - /* if no long +1 match, explore the short match we found */ - if (matchIndexS < prefixLowestIndex) { - mLength = ZSTD_count_2segments(ip+4, match+4, iend, dictEnd, prefixLowest) + 4; - offset = (U32)(curr - matchIndexS); - while (((ip>anchor) & (match>dictStart)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ - } else { - mLength = ZSTD_count(ip+4, match+4, iend) + 4; - offset = (U32)(ip - match); - while (((ip>anchor) & (match>prefixLowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ - } - -_match_found: - offset_2 = offset_1; - offset_1 = offset; - - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - -_match_stored: - /* match found */ - ip += mLength; - anchor = ip; - - if (ip <= ilimit) { - /* Complementary insertion */ - /* done after iLimit test, as candidates could be > iend-8 */ - { U32 const indexToInsert = curr+2; - hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; - hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); - hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; - hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); - } - - /* check immediate repcode */ - while (ip <= ilimit) { - U32 const current2 = (U32)(ip-base); - U32 const repIndex2 = current2 - offset_2; - const BYTE* repMatch2 = repIndex2 < prefixLowestIndex ? - dictBase + repIndex2 - dictIndexDelta : - base + repIndex2; - if ( (ZSTD_index_overlap_check(prefixLowestIndex, repIndex2)) - && (MEM_read32(repMatch2) == MEM_read32(ip)) ) { - const BYTE* const repEnd2 = repIndex2 < prefixLowestIndex ? dictEnd : iend; - size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixLowest) + 4; - U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); - hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2; - hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2; - ip += repLength2; - anchor = ip; - continue; - } - break; - } - } - } /* while (ip < ilimit) */ - - /* save reps for next block */ - rep[0] = offset_1; - rep[1] = offset_2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} - -#define ZSTD_GEN_DFAST_FN(dictMode, mls) \ - static size_t ZSTD_compressBlock_doubleFast_##dictMode##_##mls( \ - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \ - void const* src, size_t srcSize) \ - { \ - return ZSTD_compressBlock_doubleFast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls); \ - } - -ZSTD_GEN_DFAST_FN(noDict, 4) -ZSTD_GEN_DFAST_FN(noDict, 5) -ZSTD_GEN_DFAST_FN(noDict, 6) -ZSTD_GEN_DFAST_FN(noDict, 7) - -ZSTD_GEN_DFAST_FN(dictMatchState, 4) -ZSTD_GEN_DFAST_FN(dictMatchState, 5) -ZSTD_GEN_DFAST_FN(dictMatchState, 6) -ZSTD_GEN_DFAST_FN(dictMatchState, 7) - - -size_t ZSTD_compressBlock_doubleFast( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - const U32 mls = ms->cParams.minMatch; - switch(mls) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_doubleFast_noDict_4(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_doubleFast_noDict_5(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_doubleFast_noDict_6(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_doubleFast_noDict_7(ms, seqStore, rep, src, srcSize); - } -} - - -size_t ZSTD_compressBlock_doubleFast_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - const U32 mls = ms->cParams.minMatch; - switch(mls) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_doubleFast_dictMatchState_4(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_doubleFast_dictMatchState_5(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_doubleFast_dictMatchState_6(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_doubleFast_dictMatchState_7(ms, seqStore, rep, src, srcSize); - } -} - - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_doubleFast_extDict_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, - U32 const mls /* template */) -{ - ZSTD_compressionParameters const* cParams = &ms->cParams; - U32* const hashLong = ms->hashTable; - U32 const hBitsL = cParams->hashLog; - U32* const hashSmall = ms->chainTable; - U32 const hBitsS = cParams->chainLog; - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip = istart; - const BYTE* anchor = istart; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - 8; - const BYTE* const base = ms->window.base; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); - const U32 dictStartIndex = lowLimit; - const U32 dictLimit = ms->window.dictLimit; - const U32 prefixStartIndex = (dictLimit > lowLimit) ? dictLimit : lowLimit; - const BYTE* const prefixStart = base + prefixStartIndex; - const BYTE* const dictBase = ms->window.dictBase; - const BYTE* const dictStart = dictBase + dictStartIndex; - const BYTE* const dictEnd = dictBase + prefixStartIndex; - U32 offset_1=rep[0], offset_2=rep[1]; - - DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_extDict_generic (srcSize=%zu)", srcSize); - - /* if extDict is invalidated due to maxDistance, switch to "regular" variant */ - if (prefixStartIndex == dictStartIndex) - return ZSTD_compressBlock_doubleFast(ms, seqStore, rep, src, srcSize); - - /* Search Loop */ - while (ip < ilimit) { /* < instead of <=, because (ip+1) */ - const size_t hSmall = ZSTD_hashPtr(ip, hBitsS, mls); - const U32 matchIndex = hashSmall[hSmall]; - const BYTE* const matchBase = matchIndex < prefixStartIndex ? dictBase : base; - const BYTE* match = matchBase + matchIndex; - - const size_t hLong = ZSTD_hashPtr(ip, hBitsL, 8); - const U32 matchLongIndex = hashLong[hLong]; - const BYTE* const matchLongBase = matchLongIndex < prefixStartIndex ? dictBase : base; - const BYTE* matchLong = matchLongBase + matchLongIndex; - - const U32 curr = (U32)(ip-base); - const U32 repIndex = curr + 1 - offset_1; /* offset_1 expected <= curr +1 */ - const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; - const BYTE* const repMatch = repBase + repIndex; - size_t mLength; - hashSmall[hSmall] = hashLong[hLong] = curr; /* update hash table */ - - if (((ZSTD_index_overlap_check(prefixStartIndex, repIndex)) - & (offset_1 <= curr+1 - dictStartIndex)) /* note: we are searching at curr+1 */ - && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { - const BYTE* repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend; - mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; - ip++; - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); - } else { - if ((matchLongIndex > dictStartIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) { - const BYTE* const matchEnd = matchLongIndex < prefixStartIndex ? dictEnd : iend; - const BYTE* const lowMatchPtr = matchLongIndex < prefixStartIndex ? dictStart : prefixStart; - U32 offset; - mLength = ZSTD_count_2segments(ip+8, matchLong+8, iend, matchEnd, prefixStart) + 8; - offset = curr - matchLongIndex; - while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */ - offset_2 = offset_1; - offset_1 = offset; - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - - } else if ((matchIndex > dictStartIndex) && (MEM_read32(match) == MEM_read32(ip))) { - size_t const h3 = ZSTD_hashPtr(ip+1, hBitsL, 8); - U32 const matchIndex3 = hashLong[h3]; - const BYTE* const match3Base = matchIndex3 < prefixStartIndex ? dictBase : base; - const BYTE* match3 = match3Base + matchIndex3; - U32 offset; - hashLong[h3] = curr + 1; - if ( (matchIndex3 > dictStartIndex) && (MEM_read64(match3) == MEM_read64(ip+1)) ) { - const BYTE* const matchEnd = matchIndex3 < prefixStartIndex ? dictEnd : iend; - const BYTE* const lowMatchPtr = matchIndex3 < prefixStartIndex ? dictStart : prefixStart; - mLength = ZSTD_count_2segments(ip+9, match3+8, iend, matchEnd, prefixStart) + 8; - ip++; - offset = curr+1 - matchIndex3; - while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++; } /* catch up */ - } else { - const BYTE* const matchEnd = matchIndex < prefixStartIndex ? dictEnd : iend; - const BYTE* const lowMatchPtr = matchIndex < prefixStartIndex ? dictStart : prefixStart; - mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, prefixStart) + 4; - offset = curr - matchIndex; - while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ - } - offset_2 = offset_1; - offset_1 = offset; - ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - - } else { - ip += ((ip-anchor) >> kSearchStrength) + 1; - continue; - } } - - /* move to next sequence start */ - ip += mLength; - anchor = ip; - - if (ip <= ilimit) { - /* Complementary insertion */ - /* done after iLimit test, as candidates could be > iend-8 */ - { U32 const indexToInsert = curr+2; - hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; - hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); - hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; - hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); - } - - /* check immediate repcode */ - while (ip <= ilimit) { - U32 const current2 = (U32)(ip-base); - U32 const repIndex2 = current2 - offset_2; - const BYTE* repMatch2 = repIndex2 < prefixStartIndex ? dictBase + repIndex2 : base + repIndex2; - if ( ((ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) - & (offset_2 <= current2 - dictStartIndex)) - && (MEM_read32(repMatch2) == MEM_read32(ip)) ) { - const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; - size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; - U32 const tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); - hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2; - hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2; - ip += repLength2; - anchor = ip; - continue; - } - break; - } } } - - /* save reps for next block */ - rep[0] = offset_1; - rep[1] = offset_2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} - -ZSTD_GEN_DFAST_FN(extDict, 4) -ZSTD_GEN_DFAST_FN(extDict, 5) -ZSTD_GEN_DFAST_FN(extDict, 6) -ZSTD_GEN_DFAST_FN(extDict, 7) - -size_t ZSTD_compressBlock_doubleFast_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - U32 const mls = ms->cParams.minMatch; - switch(mls) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_doubleFast_extDict_4(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_doubleFast_extDict_5(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_doubleFast_extDict_6(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_doubleFast_extDict_7(ms, seqStore, rep, src, srcSize); - } -} - -#endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */ diff --git a/third_party/zstd/lib/compress/zstd_double_fast.h b/third_party/zstd/lib/compress/zstd_double_fast.h deleted file mode 100644 index cd562fe..0000000 --- a/third_party/zstd/lib/compress/zstd_double_fast.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_DOUBLE_FAST_H -#define ZSTD_DOUBLE_FAST_H - -#include "../common/mem.h" /* U32 */ -#include "zstd_compress_internal.h" /* ZSTD_CCtx, size_t */ - -#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR - -void ZSTD_fillDoubleHashTable(ZSTD_MatchState_t* ms, - void const* end, ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp); - -size_t ZSTD_compressBlock_doubleFast( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_doubleFast_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_doubleFast_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST ZSTD_compressBlock_doubleFast -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE ZSTD_compressBlock_doubleFast_dictMatchState -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT ZSTD_compressBlock_doubleFast_extDict -#else -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST NULL -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT NULL -#endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */ - -#endif /* ZSTD_DOUBLE_FAST_H */ diff --git a/third_party/zstd/lib/compress/zstd_fast.c b/third_party/zstd/lib/compress/zstd_fast.c deleted file mode 100644 index ee25bcb..0000000 --- a/third_party/zstd/lib/compress/zstd_fast.c +++ /dev/null @@ -1,985 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_compress_internal.h" /* ZSTD_hashPtr, ZSTD_count, ZSTD_storeSeq */ -#include "zstd_fast.h" - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_fillHashTableForCDict(ZSTD_MatchState_t* ms, - const void* const end, - ZSTD_dictTableLoadMethod_e dtlm) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hBits = cParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; - U32 const mls = cParams->minMatch; - const BYTE* const base = ms->window.base; - const BYTE* ip = base + ms->nextToUpdate; - const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; - const U32 fastHashFillStep = 3; - - /* Currently, we always use ZSTD_dtlm_full for filling CDict tables. - * Feel free to remove this assert if there's a good reason! */ - assert(dtlm == ZSTD_dtlm_full); - - /* Always insert every fastHashFillStep position into the hash table. - * Insert the other positions if their hash entry is empty. - */ - for ( ; ip + fastHashFillStep < iend + 2; ip += fastHashFillStep) { - U32 const curr = (U32)(ip - base); - { size_t const hashAndTag = ZSTD_hashPtr(ip, hBits, mls); - ZSTD_writeTaggedIndex(hashTable, hashAndTag, curr); } - - if (dtlm == ZSTD_dtlm_fast) continue; - /* Only load extra positions for ZSTD_dtlm_full */ - { U32 p; - for (p = 1; p < fastHashFillStep; ++p) { - size_t const hashAndTag = ZSTD_hashPtr(ip + p, hBits, mls); - if (hashTable[hashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS] == 0) { /* not yet filled */ - ZSTD_writeTaggedIndex(hashTable, hashAndTag, curr + p); - } } } } -} - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_fillHashTableForCCtx(ZSTD_MatchState_t* ms, - const void* const end, - ZSTD_dictTableLoadMethod_e dtlm) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hBits = cParams->hashLog; - U32 const mls = cParams->minMatch; - const BYTE* const base = ms->window.base; - const BYTE* ip = base + ms->nextToUpdate; - const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; - const U32 fastHashFillStep = 3; - - /* Currently, we always use ZSTD_dtlm_fast for filling CCtx tables. - * Feel free to remove this assert if there's a good reason! */ - assert(dtlm == ZSTD_dtlm_fast); - - /* Always insert every fastHashFillStep position into the hash table. - * Insert the other positions if their hash entry is empty. - */ - for ( ; ip + fastHashFillStep < iend + 2; ip += fastHashFillStep) { - U32 const curr = (U32)(ip - base); - size_t const hash0 = ZSTD_hashPtr(ip, hBits, mls); - hashTable[hash0] = curr; - if (dtlm == ZSTD_dtlm_fast) continue; - /* Only load extra positions for ZSTD_dtlm_full */ - { U32 p; - for (p = 1; p < fastHashFillStep; ++p) { - size_t const hash = ZSTD_hashPtr(ip + p, hBits, mls); - if (hashTable[hash] == 0) { /* not yet filled */ - hashTable[hash] = curr + p; - } } } } -} - -void ZSTD_fillHashTable(ZSTD_MatchState_t* ms, - const void* const end, - ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp) -{ - if (tfp == ZSTD_tfp_forCDict) { - ZSTD_fillHashTableForCDict(ms, end, dtlm); - } else { - ZSTD_fillHashTableForCCtx(ms, end, dtlm); - } -} - - -typedef int (*ZSTD_match4Found) (const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit); - -static int -ZSTD_match4Found_cmov(const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit) -{ - /* Array of ~random data, should have low probability of matching data. - * Load from here if the index is invalid. - * Used to avoid unpredictable branches. */ - static const BYTE dummy[] = {0x12,0x34,0x56,0x78}; - - /* currentIdx >= lowLimit is a (somewhat) unpredictable branch. - * However expression below compiles into conditional move. - */ - const BYTE* mvalAddr = ZSTD_selectAddr(matchIdx, idxLowLimit, matchAddress, dummy); - /* Note: this used to be written as : return test1 && test2; - * Unfortunately, once inlined, these tests become branches, - * in which case it becomes critical that they are executed in the right order (test1 then test2). - * So we have to write these tests in a specific manner to ensure their ordering. - */ - if (MEM_read32(currentPtr) != MEM_read32(mvalAddr)) return 0; - /* force ordering of these tests, which matters once the function is inlined, as they become branches */ -#if defined(__GNUC__) - __asm__(""); -#endif - return matchIdx >= idxLowLimit; -} - -static int -ZSTD_match4Found_branch(const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit) -{ - /* using a branch instead of a cmov, - * because it's faster in scenarios where matchIdx >= idxLowLimit is generally true, - * aka almost all candidates are within range */ - U32 mval; - if (matchIdx >= idxLowLimit) { - mval = MEM_read32(matchAddress); - } else { - mval = MEM_read32(currentPtr) ^ 1; /* guaranteed to not match. */ - } - - return (MEM_read32(currentPtr) == mval); -} - - -/** - * If you squint hard enough (and ignore repcodes), the search operation at any - * given position is broken into 4 stages: - * - * 1. Hash (map position to hash value via input read) - * 2. Lookup (map hash val to index via hashtable read) - * 3. Load (map index to value at that position via input read) - * 4. Compare - * - * Each of these steps involves a memory read at an address which is computed - * from the previous step. This means these steps must be sequenced and their - * latencies are cumulative. - * - * Rather than do 1->2->3->4 sequentially for a single position before moving - * onto the next, this implementation interleaves these operations across the - * next few positions: - * - * R = Repcode Read & Compare - * H = Hash - * T = Table Lookup - * M = Match Read & Compare - * - * Pos | Time --> - * ----+------------------- - * N | ... M - * N+1 | ... TM - * N+2 | R H T M - * N+3 | H TM - * N+4 | R H T M - * N+5 | H ... - * N+6 | R ... - * - * This is very much analogous to the pipelining of execution in a CPU. And just - * like a CPU, we have to dump the pipeline when we find a match (i.e., take a - * branch). - * - * When this happens, we throw away our current state, and do the following prep - * to re-enter the loop: - * - * Pos | Time --> - * ----+------------------- - * N | H T - * N+1 | H - * - * This is also the work we do at the beginning to enter the loop initially. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_fast_noDict_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, - U32 const mls, int useCmov) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hlog = cParams->hashLog; - size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; /* min 2 */ - const BYTE* const base = ms->window.base; - const BYTE* const istart = (const BYTE*)src; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); - const BYTE* const prefixStart = base + prefixStartIndex; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - HASH_READ_SIZE; - - const BYTE* anchor = istart; - const BYTE* ip0 = istart; - const BYTE* ip1; - const BYTE* ip2; - const BYTE* ip3; - U32 current0; - - U32 rep_offset1 = rep[0]; - U32 rep_offset2 = rep[1]; - U32 offsetSaved1 = 0, offsetSaved2 = 0; - - size_t hash0; /* hash for ip0 */ - size_t hash1; /* hash for ip1 */ - U32 matchIdx; /* match idx for ip0 */ - - U32 offcode; - const BYTE* match0; - size_t mLength; - - /* ip0 and ip1 are always adjacent. The targetLength skipping and - * uncompressibility acceleration is applied to every other position, - * matching the behavior of #1562. step therefore represents the gap - * between pairs of positions, from ip0 to ip2 or ip1 to ip3. */ - size_t step; - const BYTE* nextStep; - const size_t kStepIncr = (1 << (kSearchStrength - 1)); - const ZSTD_match4Found matchFound = useCmov ? ZSTD_match4Found_cmov : ZSTD_match4Found_branch; - - DEBUGLOG(5, "ZSTD_compressBlock_fast_generic"); - ip0 += (ip0 == prefixStart); - { U32 const curr = (U32)(ip0 - base); - U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, cParams->windowLog); - U32 const maxRep = curr - windowLow; - if (rep_offset2 > maxRep) offsetSaved2 = rep_offset2, rep_offset2 = 0; - if (rep_offset1 > maxRep) offsetSaved1 = rep_offset1, rep_offset1 = 0; - } - - /* start each op */ -_start: /* Requires: ip0 */ - - step = stepSize; - nextStep = ip0 + kStepIncr; - - /* calculate positions, ip0 - anchor == 0, so we skip step calc */ - ip1 = ip0 + 1; - ip2 = ip0 + step; - ip3 = ip2 + 1; - - if (ip3 >= ilimit) { - goto _cleanup; - } - - hash0 = ZSTD_hashPtr(ip0, hlog, mls); - hash1 = ZSTD_hashPtr(ip1, hlog, mls); - - matchIdx = hashTable[hash0]; - - do { - /* load repcode match for ip[2]*/ - const U32 rval = MEM_read32(ip2 - rep_offset1); - - /* write back hash table entry */ - current0 = (U32)(ip0 - base); - hashTable[hash0] = current0; - - /* check repcode at ip[2] */ - if ((MEM_read32(ip2) == rval) & (rep_offset1 > 0)) { - ip0 = ip2; - match0 = ip0 - rep_offset1; - mLength = ip0[-1] == match0[-1]; - ip0 -= mLength; - match0 -= mLength; - offcode = REPCODE1_TO_OFFBASE; - mLength += 4; - - /* Write next hash table entry: it's already calculated. - * This write is known to be safe because ip1 is before the - * repcode (ip2). */ - hashTable[hash1] = (U32)(ip1 - base); - - goto _match; - } - - if (matchFound(ip0, base + matchIdx, matchIdx, prefixStartIndex)) { - /* Write next hash table entry (it's already calculated). - * This write is known to be safe because the ip1 == ip0 + 1, - * so searching will resume after ip1 */ - hashTable[hash1] = (U32)(ip1 - base); - - goto _offset; - } - - /* lookup ip[1] */ - matchIdx = hashTable[hash1]; - - /* hash ip[2] */ - hash0 = hash1; - hash1 = ZSTD_hashPtr(ip2, hlog, mls); - - /* advance to next positions */ - ip0 = ip1; - ip1 = ip2; - ip2 = ip3; - - /* write back hash table entry */ - current0 = (U32)(ip0 - base); - hashTable[hash0] = current0; - - if (matchFound(ip0, base + matchIdx, matchIdx, prefixStartIndex)) { - /* Write next hash table entry, since it's already calculated */ - if (step <= 4) { - /* Avoid writing an index if it's >= position where search will resume. - * The minimum possible match has length 4, so search can resume at ip0 + 4. - */ - hashTable[hash1] = (U32)(ip1 - base); - } - goto _offset; - } - - /* lookup ip[1] */ - matchIdx = hashTable[hash1]; - - /* hash ip[2] */ - hash0 = hash1; - hash1 = ZSTD_hashPtr(ip2, hlog, mls); - - /* advance to next positions */ - ip0 = ip1; - ip1 = ip2; - ip2 = ip0 + step; - ip3 = ip1 + step; - - /* calculate step */ - if (ip2 >= nextStep) { - step++; - PREFETCH_L1(ip1 + 64); - PREFETCH_L1(ip1 + 128); - nextStep += kStepIncr; - } - } while (ip3 < ilimit); - -_cleanup: - /* Note that there are probably still a couple positions one could search. - * However, it seems to be a meaningful performance hit to try to search - * them. So let's not. */ - - /* When the repcodes are outside of the prefix, we set them to zero before the loop. - * When the offsets are still zero, we need to restore them after the block to have a correct - * repcode history. If only one offset was invalid, it is easy. The tricky case is when both - * offsets were invalid. We need to figure out which offset to refill with. - * - If both offsets are zero they are in the same order. - * - If both offsets are non-zero, we won't restore the offsets from `offsetSaved[12]`. - * - If only one is zero, we need to decide which offset to restore. - * - If rep_offset1 is non-zero, then rep_offset2 must be offsetSaved1. - * - It is impossible for rep_offset2 to be non-zero. - * - * So if rep_offset1 started invalid (offsetSaved1 != 0) and became valid (rep_offset1 != 0), then - * set rep[0] = rep_offset1 and rep[1] = offsetSaved1. - */ - offsetSaved2 = ((offsetSaved1 != 0) && (rep_offset1 != 0)) ? offsetSaved1 : offsetSaved2; - - /* save reps for next block */ - rep[0] = rep_offset1 ? rep_offset1 : offsetSaved1; - rep[1] = rep_offset2 ? rep_offset2 : offsetSaved2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); - -_offset: /* Requires: ip0, idx */ - - /* Compute the offset code. */ - match0 = base + matchIdx; - rep_offset2 = rep_offset1; - rep_offset1 = (U32)(ip0-match0); - offcode = OFFSET_TO_OFFBASE(rep_offset1); - mLength = 4; - - /* Count the backwards match length. */ - while (((ip0>anchor) & (match0>prefixStart)) && (ip0[-1] == match0[-1])) { - ip0--; - match0--; - mLength++; - } - -_match: /* Requires: ip0, match0, offcode */ - - /* Count the forward length. */ - mLength += ZSTD_count(ip0 + mLength, match0 + mLength, iend); - - ZSTD_storeSeq(seqStore, (size_t)(ip0 - anchor), anchor, iend, offcode, mLength); - - ip0 += mLength; - anchor = ip0; - - /* Fill table and check for immediate repcode. */ - if (ip0 <= ilimit) { - /* Fill Table */ - assert(base+current0+2 > istart); /* check base overflow */ - hashTable[ZSTD_hashPtr(base+current0+2, hlog, mls)] = current0+2; /* here because current+2 could be > iend-8 */ - hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); - - if (rep_offset2 > 0) { /* rep_offset2==0 means rep_offset2 is invalidated */ - while ( (ip0 <= ilimit) && (MEM_read32(ip0) == MEM_read32(ip0 - rep_offset2)) ) { - /* store sequence */ - size_t const rLength = ZSTD_count(ip0+4, ip0+4-rep_offset2, iend) + 4; - { U32 const tmpOff = rep_offset2; rep_offset2 = rep_offset1; rep_offset1 = tmpOff; } /* swap rep_offset2 <=> rep_offset1 */ - hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); - ip0 += rLength; - ZSTD_storeSeq(seqStore, 0 /*litLen*/, anchor, iend, REPCODE1_TO_OFFBASE, rLength); - anchor = ip0; - continue; /* faster when present (confirmed on gcc-8) ... (?) */ - } } } - - goto _start; -} - -#define ZSTD_GEN_FAST_FN(dictMode, mml, cmov) \ - static size_t ZSTD_compressBlock_fast_##dictMode##_##mml##_##cmov( \ - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \ - void const* src, size_t srcSize) \ - { \ - return ZSTD_compressBlock_fast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mml, cmov); \ - } - -ZSTD_GEN_FAST_FN(noDict, 4, 1) -ZSTD_GEN_FAST_FN(noDict, 5, 1) -ZSTD_GEN_FAST_FN(noDict, 6, 1) -ZSTD_GEN_FAST_FN(noDict, 7, 1) - -ZSTD_GEN_FAST_FN(noDict, 4, 0) -ZSTD_GEN_FAST_FN(noDict, 5, 0) -ZSTD_GEN_FAST_FN(noDict, 6, 0) -ZSTD_GEN_FAST_FN(noDict, 7, 0) - -size_t ZSTD_compressBlock_fast( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - U32 const mml = ms->cParams.minMatch; - /* use cmov when "candidate in range" branch is likely unpredictable */ - int const useCmov = ms->cParams.windowLog < 19; - assert(ms->dictMatchState == NULL); - if (useCmov) { - switch(mml) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_fast_noDict_4_1(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_fast_noDict_5_1(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_fast_noDict_6_1(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_fast_noDict_7_1(ms, seqStore, rep, src, srcSize); - } - } else { - /* use a branch instead */ - switch(mml) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_fast_noDict_4_0(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_fast_noDict_5_0(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_fast_noDict_6_0(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_fast_noDict_7_0(ms, seqStore, rep, src, srcSize); - } - } -} - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_fast_dictMatchState_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, U32 const mls, U32 const hasStep) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hlog = cParams->hashLog; - /* support stepSize of 0 */ - U32 const stepSize = cParams->targetLength + !(cParams->targetLength); - const BYTE* const base = ms->window.base; - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip0 = istart; - const BYTE* ip1 = ip0 + stepSize; /* we assert below that stepSize >= 1 */ - const BYTE* anchor = istart; - const U32 prefixStartIndex = ms->window.dictLimit; - const BYTE* const prefixStart = base + prefixStartIndex; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - HASH_READ_SIZE; - U32 offset_1=rep[0], offset_2=rep[1]; - - const ZSTD_MatchState_t* const dms = ms->dictMatchState; - const ZSTD_compressionParameters* const dictCParams = &dms->cParams ; - const U32* const dictHashTable = dms->hashTable; - const U32 dictStartIndex = dms->window.dictLimit; - const BYTE* const dictBase = dms->window.base; - const BYTE* const dictStart = dictBase + dictStartIndex; - const BYTE* const dictEnd = dms->window.nextSrc; - const U32 dictIndexDelta = prefixStartIndex - (U32)(dictEnd - dictBase); - const U32 dictAndPrefixLength = (U32)(istart - prefixStart + dictEnd - dictStart); - const U32 dictHBits = dictCParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; - - /* if a dictionary is still attached, it necessarily means that - * it is within window size. So we just check it. */ - const U32 maxDistance = 1U << cParams->windowLog; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - assert(endIndex - prefixStartIndex <= maxDistance); - (void)maxDistance; (void)endIndex; /* these variables are not used when assert() is disabled */ - - (void)hasStep; /* not currently specialized on whether it's accelerated */ - - /* ensure there will be no underflow - * when translating a dict index into a local index */ - assert(prefixStartIndex >= (U32)(dictEnd - dictBase)); - - if (ms->prefetchCDictTables) { - size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); - PREFETCH_AREA(dictHashTable, hashTableBytes); - } - - /* init */ - DEBUGLOG(5, "ZSTD_compressBlock_fast_dictMatchState_generic"); - ip0 += (dictAndPrefixLength == 0); - /* dictMatchState repCode checks don't currently handle repCode == 0 - * disabling. */ - assert(offset_1 <= dictAndPrefixLength); - assert(offset_2 <= dictAndPrefixLength); - - /* Outer search loop */ - assert(stepSize >= 1); - while (ip1 <= ilimit) { /* repcode check at (ip0 + 1) is safe because ip0 < ip1 */ - size_t mLength; - size_t hash0 = ZSTD_hashPtr(ip0, hlog, mls); - - size_t const dictHashAndTag0 = ZSTD_hashPtr(ip0, dictHBits, mls); - U32 dictMatchIndexAndTag = dictHashTable[dictHashAndTag0 >> ZSTD_SHORT_CACHE_TAG_BITS]; - int dictTagsMatch = ZSTD_comparePackedTags(dictMatchIndexAndTag, dictHashAndTag0); - - U32 matchIndex = hashTable[hash0]; - U32 curr = (U32)(ip0 - base); - size_t step = stepSize; - const size_t kStepIncr = 1 << kSearchStrength; - const BYTE* nextStep = ip0 + kStepIncr; - - /* Inner search loop */ - while (1) { - const BYTE* match = base + matchIndex; - const U32 repIndex = curr + 1 - offset_1; - const BYTE* repMatch = (repIndex < prefixStartIndex) ? - dictBase + (repIndex - dictIndexDelta) : - base + repIndex; - const size_t hash1 = ZSTD_hashPtr(ip1, hlog, mls); - size_t const dictHashAndTag1 = ZSTD_hashPtr(ip1, dictHBits, mls); - hashTable[hash0] = curr; /* update hash table */ - - if ((ZSTD_index_overlap_check(prefixStartIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip0 + 1))) { - const BYTE* const repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend; - mLength = ZSTD_count_2segments(ip0 + 1 + 4, repMatch + 4, iend, repMatchEnd, prefixStart) + 4; - ip0++; - ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); - break; - } - - if (dictTagsMatch) { - /* Found a possible dict match */ - const U32 dictMatchIndex = dictMatchIndexAndTag >> ZSTD_SHORT_CACHE_TAG_BITS; - const BYTE* dictMatch = dictBase + dictMatchIndex; - if (dictMatchIndex > dictStartIndex && - MEM_read32(dictMatch) == MEM_read32(ip0)) { - /* To replicate extDict parse behavior, we only use dict matches when the normal matchIndex is invalid */ - if (matchIndex <= prefixStartIndex) { - U32 const offset = (U32) (curr - dictMatchIndex - dictIndexDelta); - mLength = ZSTD_count_2segments(ip0 + 4, dictMatch + 4, iend, dictEnd, prefixStart) + 4; - while (((ip0 > anchor) & (dictMatch > dictStart)) - && (ip0[-1] == dictMatch[-1])) { - ip0--; - dictMatch--; - mLength++; - } /* catch up */ - offset_2 = offset_1; - offset_1 = offset; - ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - break; - } - } - } - - if (ZSTD_match4Found_cmov(ip0, match, matchIndex, prefixStartIndex)) { - /* found a regular match of size >= 4 */ - U32 const offset = (U32) (ip0 - match); - mLength = ZSTD_count(ip0 + 4, match + 4, iend) + 4; - while (((ip0 > anchor) & (match > prefixStart)) - && (ip0[-1] == match[-1])) { - ip0--; - match--; - mLength++; - } /* catch up */ - offset_2 = offset_1; - offset_1 = offset; - ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); - break; - } - - /* Prepare for next iteration */ - dictMatchIndexAndTag = dictHashTable[dictHashAndTag1 >> ZSTD_SHORT_CACHE_TAG_BITS]; - dictTagsMatch = ZSTD_comparePackedTags(dictMatchIndexAndTag, dictHashAndTag1); - matchIndex = hashTable[hash1]; - - if (ip1 >= nextStep) { - step++; - nextStep += kStepIncr; - } - ip0 = ip1; - ip1 = ip1 + step; - if (ip1 > ilimit) goto _cleanup; - - curr = (U32)(ip0 - base); - hash0 = hash1; - } /* end inner search loop */ - - /* match found */ - assert(mLength); - ip0 += mLength; - anchor = ip0; - - if (ip0 <= ilimit) { - /* Fill Table */ - assert(base+curr+2 > istart); /* check base overflow */ - hashTable[ZSTD_hashPtr(base+curr+2, hlog, mls)] = curr+2; /* here because curr+2 could be > iend-8 */ - hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); - - /* check immediate repcode */ - while (ip0 <= ilimit) { - U32 const current2 = (U32)(ip0-base); - U32 const repIndex2 = current2 - offset_2; - const BYTE* repMatch2 = repIndex2 < prefixStartIndex ? - dictBase - dictIndexDelta + repIndex2 : - base + repIndex2; - if ( (ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) - && (MEM_read32(repMatch2) == MEM_read32(ip0))) { - const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; - size_t const repLength2 = ZSTD_count_2segments(ip0+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; - U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); - hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = current2; - ip0 += repLength2; - anchor = ip0; - continue; - } - break; - } - } - - /* Prepare for next iteration */ - assert(ip0 == anchor); - ip1 = ip0 + stepSize; - } - -_cleanup: - /* save reps for next block */ - rep[0] = offset_1; - rep[1] = offset_2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} - - -ZSTD_GEN_FAST_FN(dictMatchState, 4, 0) -ZSTD_GEN_FAST_FN(dictMatchState, 5, 0) -ZSTD_GEN_FAST_FN(dictMatchState, 6, 0) -ZSTD_GEN_FAST_FN(dictMatchState, 7, 0) - -size_t ZSTD_compressBlock_fast_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - U32 const mls = ms->cParams.minMatch; - assert(ms->dictMatchState != NULL); - switch(mls) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_fast_dictMatchState_4_0(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_fast_dictMatchState_5_0(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_fast_dictMatchState_6_0(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_fast_dictMatchState_7_0(ms, seqStore, rep, src, srcSize); - } -} - - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_fast_extDict_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize, U32 const mls, U32 const hasStep) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hlog = cParams->hashLog; - /* support stepSize of 0 */ - size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; - const BYTE* const base = ms->window.base; - const BYTE* const dictBase = ms->window.dictBase; - const BYTE* const istart = (const BYTE*)src; - const BYTE* anchor = istart; - const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); - const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); - const U32 dictStartIndex = lowLimit; - const BYTE* const dictStart = dictBase + dictStartIndex; - const U32 dictLimit = ms->window.dictLimit; - const U32 prefixStartIndex = dictLimit < lowLimit ? lowLimit : dictLimit; - const BYTE* const prefixStart = base + prefixStartIndex; - const BYTE* const dictEnd = dictBase + prefixStartIndex; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - 8; - U32 offset_1=rep[0], offset_2=rep[1]; - U32 offsetSaved1 = 0, offsetSaved2 = 0; - - const BYTE* ip0 = istart; - const BYTE* ip1; - const BYTE* ip2; - const BYTE* ip3; - U32 current0; - - - size_t hash0; /* hash for ip0 */ - size_t hash1; /* hash for ip1 */ - U32 idx; /* match idx for ip0 */ - const BYTE* idxBase; /* base pointer for idx */ - - U32 offcode; - const BYTE* match0; - size_t mLength; - const BYTE* matchEnd = 0; /* initialize to avoid warning, assert != 0 later */ - - size_t step; - const BYTE* nextStep; - const size_t kStepIncr = (1 << (kSearchStrength - 1)); - - (void)hasStep; /* not currently specialized on whether it's accelerated */ - - DEBUGLOG(5, "ZSTD_compressBlock_fast_extDict_generic (offset_1=%u)", offset_1); - - /* switch to "regular" variant if extDict is invalidated due to maxDistance */ - if (prefixStartIndex == dictStartIndex) - return ZSTD_compressBlock_fast(ms, seqStore, rep, src, srcSize); - - { U32 const curr = (U32)(ip0 - base); - U32 const maxRep = curr - dictStartIndex; - if (offset_2 >= maxRep) offsetSaved2 = offset_2, offset_2 = 0; - if (offset_1 >= maxRep) offsetSaved1 = offset_1, offset_1 = 0; - } - - /* start each op */ -_start: /* Requires: ip0 */ - - step = stepSize; - nextStep = ip0 + kStepIncr; - - /* calculate positions, ip0 - anchor == 0, so we skip step calc */ - ip1 = ip0 + 1; - ip2 = ip0 + step; - ip3 = ip2 + 1; - - if (ip3 >= ilimit) { - goto _cleanup; - } - - hash0 = ZSTD_hashPtr(ip0, hlog, mls); - hash1 = ZSTD_hashPtr(ip1, hlog, mls); - - idx = hashTable[hash0]; - idxBase = idx < prefixStartIndex ? dictBase : base; - - do { - { /* load repcode match for ip[2] */ - U32 const current2 = (U32)(ip2 - base); - U32 const repIndex = current2 - offset_1; - const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; - U32 rval; - if ( ((U32)(prefixStartIndex - repIndex) >= 4) /* intentional underflow */ - & (offset_1 > 0) ) { - rval = MEM_read32(repBase + repIndex); - } else { - rval = MEM_read32(ip2) ^ 1; /* guaranteed to not match. */ - } - - /* write back hash table entry */ - current0 = (U32)(ip0 - base); - hashTable[hash0] = current0; - - /* check repcode at ip[2] */ - if (MEM_read32(ip2) == rval) { - ip0 = ip2; - match0 = repBase + repIndex; - matchEnd = repIndex < prefixStartIndex ? dictEnd : iend; - assert((match0 != prefixStart) & (match0 != dictStart)); - mLength = ip0[-1] == match0[-1]; - ip0 -= mLength; - match0 -= mLength; - offcode = REPCODE1_TO_OFFBASE; - mLength += 4; - goto _match; - } } - - { /* load match for ip[0] */ - U32 const mval = idx >= dictStartIndex ? - MEM_read32(idxBase + idx) : - MEM_read32(ip0) ^ 1; /* guaranteed not to match */ - - /* check match at ip[0] */ - if (MEM_read32(ip0) == mval) { - /* found a match! */ - goto _offset; - } } - - /* lookup ip[1] */ - idx = hashTable[hash1]; - idxBase = idx < prefixStartIndex ? dictBase : base; - - /* hash ip[2] */ - hash0 = hash1; - hash1 = ZSTD_hashPtr(ip2, hlog, mls); - - /* advance to next positions */ - ip0 = ip1; - ip1 = ip2; - ip2 = ip3; - - /* write back hash table entry */ - current0 = (U32)(ip0 - base); - hashTable[hash0] = current0; - - { /* load match for ip[0] */ - U32 const mval = idx >= dictStartIndex ? - MEM_read32(idxBase + idx) : - MEM_read32(ip0) ^ 1; /* guaranteed not to match */ - - /* check match at ip[0] */ - if (MEM_read32(ip0) == mval) { - /* found a match! */ - goto _offset; - } } - - /* lookup ip[1] */ - idx = hashTable[hash1]; - idxBase = idx < prefixStartIndex ? dictBase : base; - - /* hash ip[2] */ - hash0 = hash1; - hash1 = ZSTD_hashPtr(ip2, hlog, mls); - - /* advance to next positions */ - ip0 = ip1; - ip1 = ip2; - ip2 = ip0 + step; - ip3 = ip1 + step; - - /* calculate step */ - if (ip2 >= nextStep) { - step++; - PREFETCH_L1(ip1 + 64); - PREFETCH_L1(ip1 + 128); - nextStep += kStepIncr; - } - } while (ip3 < ilimit); - -_cleanup: - /* Note that there are probably still a couple positions we could search. - * However, it seems to be a meaningful performance hit to try to search - * them. So let's not. */ - - /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), - * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ - offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; - - /* save reps for next block */ - rep[0] = offset_1 ? offset_1 : offsetSaved1; - rep[1] = offset_2 ? offset_2 : offsetSaved2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); - -_offset: /* Requires: ip0, idx, idxBase */ - - /* Compute the offset code. */ - { U32 const offset = current0 - idx; - const BYTE* const lowMatchPtr = idx < prefixStartIndex ? dictStart : prefixStart; - matchEnd = idx < prefixStartIndex ? dictEnd : iend; - match0 = idxBase + idx; - offset_2 = offset_1; - offset_1 = offset; - offcode = OFFSET_TO_OFFBASE(offset); - mLength = 4; - - /* Count the backwards match length. */ - while (((ip0>anchor) & (match0>lowMatchPtr)) && (ip0[-1] == match0[-1])) { - ip0--; - match0--; - mLength++; - } } - -_match: /* Requires: ip0, match0, offcode, matchEnd */ - - /* Count the forward length. */ - assert(matchEnd != 0); - mLength += ZSTD_count_2segments(ip0 + mLength, match0 + mLength, iend, matchEnd, prefixStart); - - ZSTD_storeSeq(seqStore, (size_t)(ip0 - anchor), anchor, iend, offcode, mLength); - - ip0 += mLength; - anchor = ip0; - - /* write next hash table entry */ - if (ip1 < ip0) { - hashTable[hash1] = (U32)(ip1 - base); - } - - /* Fill table and check for immediate repcode. */ - if (ip0 <= ilimit) { - /* Fill Table */ - assert(base+current0+2 > istart); /* check base overflow */ - hashTable[ZSTD_hashPtr(base+current0+2, hlog, mls)] = current0+2; /* here because current+2 could be > iend-8 */ - hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); - - while (ip0 <= ilimit) { - U32 const repIndex2 = (U32)(ip0-base) - offset_2; - const BYTE* const repMatch2 = repIndex2 < prefixStartIndex ? dictBase + repIndex2 : base + repIndex2; - if ( ((ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) & (offset_2 > 0)) - && (MEM_read32(repMatch2) == MEM_read32(ip0)) ) { - const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; - size_t const repLength2 = ZSTD_count_2segments(ip0+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; - { U32 const tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; } /* swap offset_2 <=> offset_1 */ - ZSTD_storeSeq(seqStore, 0 /*litlen*/, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); - hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); - ip0 += repLength2; - anchor = ip0; - continue; - } - break; - } } - - goto _start; -} - -ZSTD_GEN_FAST_FN(extDict, 4, 0) -ZSTD_GEN_FAST_FN(extDict, 5, 0) -ZSTD_GEN_FAST_FN(extDict, 6, 0) -ZSTD_GEN_FAST_FN(extDict, 7, 0) - -size_t ZSTD_compressBlock_fast_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - U32 const mls = ms->cParams.minMatch; - assert(ms->dictMatchState == NULL); - switch(mls) - { - default: /* includes case 3 */ - case 4 : - return ZSTD_compressBlock_fast_extDict_4_0(ms, seqStore, rep, src, srcSize); - case 5 : - return ZSTD_compressBlock_fast_extDict_5_0(ms, seqStore, rep, src, srcSize); - case 6 : - return ZSTD_compressBlock_fast_extDict_6_0(ms, seqStore, rep, src, srcSize); - case 7 : - return ZSTD_compressBlock_fast_extDict_7_0(ms, seqStore, rep, src, srcSize); - } -} diff --git a/third_party/zstd/lib/compress/zstd_fast.h b/third_party/zstd/lib/compress/zstd_fast.h deleted file mode 100644 index 216821a..0000000 --- a/third_party/zstd/lib/compress/zstd_fast.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_FAST_H -#define ZSTD_FAST_H - -#include "../common/mem.h" /* U32 */ -#include "zstd_compress_internal.h" - -void ZSTD_fillHashTable(ZSTD_MatchState_t* ms, - void const* end, ZSTD_dictTableLoadMethod_e dtlm, - ZSTD_tableFillPurpose_e tfp); -size_t ZSTD_compressBlock_fast( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_fast_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_fast_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#endif /* ZSTD_FAST_H */ diff --git a/third_party/zstd/lib/compress/zstd_lazy.c b/third_party/zstd/lib/compress/zstd_lazy.c deleted file mode 100644 index 272ebe0..0000000 --- a/third_party/zstd/lib/compress/zstd_lazy.c +++ /dev/null @@ -1,2199 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_compress_internal.h" -#include "zstd_lazy.h" -#include "../common/bits.h" /* ZSTD_countTrailingZeros64 */ - -#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) - -#define kLazySkippingStep 8 - - -/*-************************************* -* Binary Tree search -***************************************/ - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_updateDUBT(ZSTD_MatchState_t* ms, - const BYTE* ip, const BYTE* iend, - U32 mls) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hashLog = cParams->hashLog; - - U32* const bt = ms->chainTable; - U32 const btLog = cParams->chainLog - 1; - U32 const btMask = (1 << btLog) - 1; - - const BYTE* const base = ms->window.base; - U32 const target = (U32)(ip - base); - U32 idx = ms->nextToUpdate; - - if (idx != target) - DEBUGLOG(7, "ZSTD_updateDUBT, from %u to %u (dictLimit:%u)", - idx, target, ms->window.dictLimit); - assert(ip + 8 <= iend); /* condition for ZSTD_hashPtr */ - (void)iend; - - assert(idx >= ms->window.dictLimit); /* condition for valid base+idx */ - for ( ; idx < target ; idx++) { - size_t const h = ZSTD_hashPtr(base + idx, hashLog, mls); /* assumption : ip + 8 <= iend */ - U32 const matchIndex = hashTable[h]; - - U32* const nextCandidatePtr = bt + 2*(idx&btMask); - U32* const sortMarkPtr = nextCandidatePtr + 1; - - DEBUGLOG(8, "ZSTD_updateDUBT: insert %u", idx); - hashTable[h] = idx; /* Update Hash Table */ - *nextCandidatePtr = matchIndex; /* update BT like a chain */ - *sortMarkPtr = ZSTD_DUBT_UNSORTED_MARK; - } - ms->nextToUpdate = target; -} - - -/** ZSTD_insertDUBT1() : - * sort one already inserted but unsorted position - * assumption : curr >= btlow == (curr - btmask) - * doesn't fail */ -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_insertDUBT1(const ZSTD_MatchState_t* ms, - U32 curr, const BYTE* inputEnd, - U32 nbCompares, U32 btLow, - const ZSTD_dictMode_e dictMode) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const bt = ms->chainTable; - U32 const btLog = cParams->chainLog - 1; - U32 const btMask = (1 << btLog) - 1; - size_t commonLengthSmaller=0, commonLengthLarger=0; - const BYTE* const base = ms->window.base; - const BYTE* const dictBase = ms->window.dictBase; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const ip = (curr>=dictLimit) ? base + curr : dictBase + curr; - const BYTE* const iend = (curr>=dictLimit) ? inputEnd : dictBase + dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const prefixStart = base + dictLimit; - const BYTE* match; - U32* smallerPtr = bt + 2*(curr&btMask); - U32* largerPtr = smallerPtr + 1; - U32 matchIndex = *smallerPtr; /* this candidate is unsorted : next sorted candidate is reached through *smallerPtr, while *largerPtr contains previous unsorted candidate (which is already saved and can be overwritten) */ - U32 dummy32; /* to be nullified at the end */ - U32 const windowValid = ms->window.lowLimit; - U32 const maxDistance = 1U << cParams->windowLog; - U32 const windowLow = (curr - windowValid > maxDistance) ? curr - maxDistance : windowValid; - - - DEBUGLOG(8, "ZSTD_insertDUBT1(%u) (dictLimit=%u, lowLimit=%u)", - curr, dictLimit, windowLow); - assert(curr >= btLow); - assert(ip < iend); /* condition for ZSTD_count */ - - for (; nbCompares && (matchIndex > windowLow); --nbCompares) { - U32* const nextPtr = bt + 2*(matchIndex & btMask); - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - assert(matchIndex < curr); - /* note : all candidates are now supposed sorted, - * but it's still possible to have nextPtr[1] == ZSTD_DUBT_UNSORTED_MARK - * when a real index has the same value as ZSTD_DUBT_UNSORTED_MARK */ - - if ( (dictMode != ZSTD_extDict) - || (matchIndex+matchLength >= dictLimit) /* both in current segment*/ - || (curr < dictLimit) /* both in extDict */) { - const BYTE* const mBase = ( (dictMode != ZSTD_extDict) - || (matchIndex+matchLength >= dictLimit)) ? - base : dictBase; - assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to 0 */ - || (curr < dictLimit) ); - match = mBase + matchIndex; - matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); - } else { - match = dictBase + matchIndex; - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); - if (matchIndex+matchLength >= dictLimit) - match = base + matchIndex; /* preparation for next read of match[matchLength] */ - } - - DEBUGLOG(8, "ZSTD_insertDUBT1: comparing %u with %u : found %u common bytes ", - curr, matchIndex, (U32)matchLength); - - if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ - break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt tree */ - } - - if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ - /* match is smaller than current */ - *smallerPtr = matchIndex; /* update smaller idx */ - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ - DEBUGLOG(8, "ZSTD_insertDUBT1: %u (>btLow=%u) is smaller : next => %u", - matchIndex, btLow, nextPtr[1]); - smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */ - matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */ - } else { - /* match is larger than current */ - *largerPtr = matchIndex; - commonLengthLarger = matchLength; - if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ - DEBUGLOG(8, "ZSTD_insertDUBT1: %u (>btLow=%u) is larger => %u", - matchIndex, btLow, nextPtr[0]); - largerPtr = nextPtr; - matchIndex = nextPtr[0]; - } } - - *smallerPtr = *largerPtr = 0; -} - - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_DUBT_findBetterDictMatch ( - const ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iend, - size_t* offsetPtr, - size_t bestLength, - U32 nbCompares, - U32 const mls, - const ZSTD_dictMode_e dictMode) -{ - const ZSTD_MatchState_t * const dms = ms->dictMatchState; - const ZSTD_compressionParameters* const dmsCParams = &dms->cParams; - const U32 * const dictHashTable = dms->hashTable; - U32 const hashLog = dmsCParams->hashLog; - size_t const h = ZSTD_hashPtr(ip, hashLog, mls); - U32 dictMatchIndex = dictHashTable[h]; - - const BYTE* const base = ms->window.base; - const BYTE* const prefixStart = base + ms->window.dictLimit; - U32 const curr = (U32)(ip-base); - const BYTE* const dictBase = dms->window.base; - const BYTE* const dictEnd = dms->window.nextSrc; - U32 const dictHighLimit = (U32)(dms->window.nextSrc - dms->window.base); - U32 const dictLowLimit = dms->window.lowLimit; - U32 const dictIndexDelta = ms->window.lowLimit - dictHighLimit; - - U32* const dictBt = dms->chainTable; - U32 const btLog = dmsCParams->chainLog - 1; - U32 const btMask = (1 << btLog) - 1; - U32 const btLow = (btMask >= dictHighLimit - dictLowLimit) ? dictLowLimit : dictHighLimit - btMask; - - size_t commonLengthSmaller=0, commonLengthLarger=0; - - (void)dictMode; - assert(dictMode == ZSTD_dictMatchState); - - for (; nbCompares && (dictMatchIndex > dictLowLimit); --nbCompares) { - U32* const nextPtr = dictBt + 2*(dictMatchIndex & btMask); - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - const BYTE* match = dictBase + dictMatchIndex; - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); - if (dictMatchIndex+matchLength >= dictHighLimit) - match = base + dictMatchIndex + dictIndexDelta; /* to prepare for next usage of match[matchLength] */ - - if (matchLength > bestLength) { - U32 matchIndex = dictMatchIndex + dictIndexDelta; - if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) ) { - DEBUGLOG(9, "ZSTD_DUBT_findBetterDictMatch(%u) : found better match length %u -> %u and offsetCode %u -> %u (dictMatchIndex %u, matchIndex %u)", - curr, (U32)bestLength, (U32)matchLength, (U32)*offsetPtr, OFFSET_TO_OFFBASE(curr - matchIndex), dictMatchIndex, matchIndex); - bestLength = matchLength, *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); - } - if (ip+matchLength == iend) { /* reached end of input : ip[matchLength] is not valid, no way to know if it's larger or smaller than match */ - break; /* drop, to guarantee consistency (miss a little bit of compression) */ - } - } - - if (match[matchLength] < ip[matchLength]) { - if (dictMatchIndex <= btLow) { break; } /* beyond tree size, stop the search */ - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ - } else { - /* match is larger than current */ - if (dictMatchIndex <= btLow) { break; } /* beyond tree size, stop the search */ - commonLengthLarger = matchLength; - dictMatchIndex = nextPtr[0]; - } - } - - if (bestLength >= MINMATCH) { - U32 const mIndex = curr - (U32)OFFBASE_TO_OFFSET(*offsetPtr); (void)mIndex; - DEBUGLOG(8, "ZSTD_DUBT_findBetterDictMatch(%u) : found match of length %u and offsetCode %u (pos %u)", - curr, (U32)bestLength, (U32)*offsetPtr, mIndex); - } - return bestLength; - -} - - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_DUBT_findBestMatch(ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iend, - size_t* offBasePtr, - U32 const mls, - const ZSTD_dictMode_e dictMode) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hashLog = cParams->hashLog; - size_t const h = ZSTD_hashPtr(ip, hashLog, mls); - U32 matchIndex = hashTable[h]; - - const BYTE* const base = ms->window.base; - U32 const curr = (U32)(ip-base); - U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); - - U32* const bt = ms->chainTable; - U32 const btLog = cParams->chainLog - 1; - U32 const btMask = (1 << btLog) - 1; - U32 const btLow = (btMask >= curr) ? 0 : curr - btMask; - U32 const unsortLimit = MAX(btLow, windowLow); - - U32* nextCandidate = bt + 2*(matchIndex&btMask); - U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1; - U32 nbCompares = 1U << cParams->searchLog; - U32 nbCandidates = nbCompares; - U32 previousCandidate = 0; - - DEBUGLOG(7, "ZSTD_DUBT_findBestMatch (%u) ", curr); - assert(ip <= iend-8); /* required for h calculation */ - assert(dictMode != ZSTD_dedicatedDictSearch); - - /* reach end of unsorted candidates list */ - while ( (matchIndex > unsortLimit) - && (*unsortedMark == ZSTD_DUBT_UNSORTED_MARK) - && (nbCandidates > 1) ) { - DEBUGLOG(8, "ZSTD_DUBT_findBestMatch: candidate %u is unsorted", - matchIndex); - *unsortedMark = previousCandidate; /* the unsortedMark becomes a reversed chain, to move up back to original position */ - previousCandidate = matchIndex; - matchIndex = *nextCandidate; - nextCandidate = bt + 2*(matchIndex&btMask); - unsortedMark = bt + 2*(matchIndex&btMask) + 1; - nbCandidates --; - } - - /* nullify last candidate if it's still unsorted - * simplification, detrimental to compression ratio, beneficial for speed */ - if ( (matchIndex > unsortLimit) - && (*unsortedMark==ZSTD_DUBT_UNSORTED_MARK) ) { - DEBUGLOG(7, "ZSTD_DUBT_findBestMatch: nullify last unsorted candidate %u", - matchIndex); - *nextCandidate = *unsortedMark = 0; - } - - /* batch sort stacked candidates */ - matchIndex = previousCandidate; - while (matchIndex) { /* will end on matchIndex == 0 */ - U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1; - U32 const nextCandidateIdx = *nextCandidateIdxPtr; - ZSTD_insertDUBT1(ms, matchIndex, iend, - nbCandidates, unsortLimit, dictMode); - matchIndex = nextCandidateIdx; - nbCandidates++; - } - - /* find longest match */ - { size_t commonLengthSmaller = 0, commonLengthLarger = 0; - const BYTE* const dictBase = ms->window.dictBase; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const prefixStart = base + dictLimit; - U32* smallerPtr = bt + 2*(curr&btMask); - U32* largerPtr = bt + 2*(curr&btMask) + 1; - U32 matchEndIdx = curr + 8 + 1; - U32 dummy32; /* to be nullified at the end */ - size_t bestLength = 0; - - matchIndex = hashTable[h]; - hashTable[h] = curr; /* Update Hash Table */ - - for (; nbCompares && (matchIndex > windowLow); --nbCompares) { - U32* const nextPtr = bt + 2*(matchIndex & btMask); - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - const BYTE* match; - - if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { - match = base + matchIndex; - matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); - } else { - match = dictBase + matchIndex; - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); - if (matchIndex+matchLength >= dictLimit) - match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ - } - - if (matchLength > bestLength) { - if (matchLength > matchEndIdx - matchIndex) - matchEndIdx = matchIndex + (U32)matchLength; - if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr - matchIndex + 1) - ZSTD_highbit32((U32)*offBasePtr)) ) - bestLength = matchLength, *offBasePtr = OFFSET_TO_OFFBASE(curr - matchIndex); - if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ - if (dictMode == ZSTD_dictMatchState) { - nbCompares = 0; /* in addition to avoiding checking any - * further in this loop, make sure we - * skip checking in the dictionary. */ - } - break; /* drop, to guarantee consistency (miss a little bit of compression) */ - } - } - - if (match[matchLength] < ip[matchLength]) { - /* match is smaller than current */ - *smallerPtr = matchIndex; /* update smaller idx */ - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ - matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ - } else { - /* match is larger than current */ - *largerPtr = matchIndex; - commonLengthLarger = matchLength; - if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - largerPtr = nextPtr; - matchIndex = nextPtr[0]; - } } - - *smallerPtr = *largerPtr = 0; - - assert(nbCompares <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ - if (dictMode == ZSTD_dictMatchState && nbCompares) { - bestLength = ZSTD_DUBT_findBetterDictMatch( - ms, ip, iend, - offBasePtr, bestLength, nbCompares, - mls, dictMode); - } - - assert(matchEndIdx > curr+8); /* ensure nextToUpdate is increased */ - ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ - if (bestLength >= MINMATCH) { - U32 const mIndex = curr - (U32)OFFBASE_TO_OFFSET(*offBasePtr); (void)mIndex; - DEBUGLOG(8, "ZSTD_DUBT_findBestMatch(%u) : found match of length %u and offsetCode %u (pos %u)", - curr, (U32)bestLength, (U32)*offBasePtr, mIndex); - } - return bestLength; - } -} - - -/** ZSTD_BtFindBestMatch() : Tree updater, providing best match */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_BtFindBestMatch( ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iLimit, - size_t* offBasePtr, - const U32 mls /* template */, - const ZSTD_dictMode_e dictMode) -{ - DEBUGLOG(7, "ZSTD_BtFindBestMatch"); - if (ip < ms->window.base + ms->nextToUpdate) return 0; /* skipped area */ - ZSTD_updateDUBT(ms, ip, iLimit, mls); - return ZSTD_DUBT_findBestMatch(ms, ip, iLimit, offBasePtr, mls, dictMode); -} - -/*********************************** -* Dedicated dict search -***********************************/ - -void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_MatchState_t* ms, const BYTE* const ip) -{ - const BYTE* const base = ms->window.base; - U32 const target = (U32)(ip - base); - U32* const hashTable = ms->hashTable; - U32* const chainTable = ms->chainTable; - U32 const chainSize = 1 << ms->cParams.chainLog; - U32 idx = ms->nextToUpdate; - U32 const minChain = chainSize < target - idx ? target - chainSize : idx; - U32 const bucketSize = 1 << ZSTD_LAZY_DDSS_BUCKET_LOG; - U32 const cacheSize = bucketSize - 1; - U32 const chainAttempts = (1 << ms->cParams.searchLog) - cacheSize; - U32 const chainLimit = chainAttempts > 255 ? 255 : chainAttempts; - - /* We know the hashtable is oversized by a factor of `bucketSize`. - * We are going to temporarily pretend `bucketSize == 1`, keeping only a - * single entry. We will use the rest of the space to construct a temporary - * chaintable. - */ - U32 const hashLog = ms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG; - U32* const tmpHashTable = hashTable; - U32* const tmpChainTable = hashTable + ((size_t)1 << hashLog); - U32 const tmpChainSize = (U32)((1 << ZSTD_LAZY_DDSS_BUCKET_LOG) - 1) << hashLog; - U32 const tmpMinChain = tmpChainSize < target ? target - tmpChainSize : idx; - U32 hashIdx; - - assert(ms->cParams.chainLog <= 24); - assert(ms->cParams.hashLog > ms->cParams.chainLog); - assert(idx != 0); - assert(tmpMinChain <= minChain); - - /* fill conventional hash table and conventional chain table */ - for ( ; idx < target; idx++) { - U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch); - if (idx >= tmpMinChain) { - tmpChainTable[idx - tmpMinChain] = hashTable[h]; - } - tmpHashTable[h] = idx; - } - - /* sort chains into ddss chain table */ - { - U32 chainPos = 0; - for (hashIdx = 0; hashIdx < (1U << hashLog); hashIdx++) { - U32 count; - U32 countBeyondMinChain = 0; - U32 i = tmpHashTable[hashIdx]; - for (count = 0; i >= tmpMinChain && count < cacheSize; count++) { - /* skip through the chain to the first position that won't be - * in the hash cache bucket */ - if (i < minChain) { - countBeyondMinChain++; - } - i = tmpChainTable[i - tmpMinChain]; - } - if (count == cacheSize) { - for (count = 0; count < chainLimit;) { - if (i < minChain) { - if (!i || ++countBeyondMinChain > cacheSize) { - /* only allow pulling `cacheSize` number of entries - * into the cache or chainTable beyond `minChain`, - * to replace the entries pulled out of the - * chainTable into the cache. This lets us reach - * back further without increasing the total number - * of entries in the chainTable, guaranteeing the - * DDSS chain table will fit into the space - * allocated for the regular one. */ - break; - } - } - chainTable[chainPos++] = i; - count++; - if (i < tmpMinChain) { - break; - } - i = tmpChainTable[i - tmpMinChain]; - } - } else { - count = 0; - } - if (count) { - tmpHashTable[hashIdx] = ((chainPos - count) << 8) + count; - } else { - tmpHashTable[hashIdx] = 0; - } - } - assert(chainPos <= chainSize); /* I believe this is guaranteed... */ - } - - /* move chain pointers into the last entry of each hash bucket */ - for (hashIdx = (1 << hashLog); hashIdx; ) { - U32 const bucketIdx = --hashIdx << ZSTD_LAZY_DDSS_BUCKET_LOG; - U32 const chainPackedPointer = tmpHashTable[hashIdx]; - U32 i; - for (i = 0; i < cacheSize; i++) { - hashTable[bucketIdx + i] = 0; - } - hashTable[bucketIdx + bucketSize - 1] = chainPackedPointer; - } - - /* fill the buckets of the hash table */ - for (idx = ms->nextToUpdate; idx < target; idx++) { - U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch) - << ZSTD_LAZY_DDSS_BUCKET_LOG; - U32 i; - /* Shift hash cache down 1. */ - for (i = cacheSize - 1; i; i--) - hashTable[h + i] = hashTable[h + i - 1]; - hashTable[h] = idx; - } - - ms->nextToUpdate = target; -} - -/* Returns the longest match length found in the dedicated dict search structure. - * If none are longer than the argument ml, then ml will be returned. - */ -FORCE_INLINE_TEMPLATE -size_t ZSTD_dedicatedDictSearch_lazy_search(size_t* offsetPtr, size_t ml, U32 nbAttempts, - const ZSTD_MatchState_t* const dms, - const BYTE* const ip, const BYTE* const iLimit, - const BYTE* const prefixStart, const U32 curr, - const U32 dictLimit, const size_t ddsIdx) { - const U32 ddsLowestIndex = dms->window.dictLimit; - const BYTE* const ddsBase = dms->window.base; - const BYTE* const ddsEnd = dms->window.nextSrc; - const U32 ddsSize = (U32)(ddsEnd - ddsBase); - const U32 ddsIndexDelta = dictLimit - ddsSize; - const U32 bucketSize = (1 << ZSTD_LAZY_DDSS_BUCKET_LOG); - const U32 bucketLimit = nbAttempts < bucketSize - 1 ? nbAttempts : bucketSize - 1; - U32 ddsAttempt; - U32 matchIndex; - - for (ddsAttempt = 0; ddsAttempt < bucketSize - 1; ddsAttempt++) { - PREFETCH_L1(ddsBase + dms->hashTable[ddsIdx + ddsAttempt]); - } - - { - U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1]; - U32 const chainIndex = chainPackedPointer >> 8; - - PREFETCH_L1(&dms->chainTable[chainIndex]); - } - - for (ddsAttempt = 0; ddsAttempt < bucketLimit; ddsAttempt++) { - size_t currentMl=0; - const BYTE* match; - matchIndex = dms->hashTable[ddsIdx + ddsAttempt]; - match = ddsBase + matchIndex; - - if (!matchIndex) { - return ml; - } - - /* guaranteed by table construction */ - (void)ddsLowestIndex; - assert(matchIndex >= ddsLowestIndex); - assert(match+4 <= ddsEnd); - if (MEM_read32(match) == MEM_read32(ip)) { - /* assumption : matchIndex <= dictLimit-4 (by table construction) */ - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, ddsEnd, prefixStart) + 4; - } - - /* save best solution */ - if (currentMl > ml) { - ml = currentMl; - *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + ddsIndexDelta)); - if (ip+currentMl == iLimit) { - /* best possible, avoids read overflow on next attempt */ - return ml; - } - } - } - - { - U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1]; - U32 chainIndex = chainPackedPointer >> 8; - U32 const chainLength = chainPackedPointer & 0xFF; - U32 const chainAttempts = nbAttempts - ddsAttempt; - U32 const chainLimit = chainAttempts > chainLength ? chainLength : chainAttempts; - U32 chainAttempt; - - for (chainAttempt = 0 ; chainAttempt < chainLimit; chainAttempt++) { - PREFETCH_L1(ddsBase + dms->chainTable[chainIndex + chainAttempt]); - } - - for (chainAttempt = 0 ; chainAttempt < chainLimit; chainAttempt++, chainIndex++) { - size_t currentMl=0; - const BYTE* match; - matchIndex = dms->chainTable[chainIndex]; - match = ddsBase + matchIndex; - - /* guaranteed by table construction */ - assert(matchIndex >= ddsLowestIndex); - assert(match+4 <= ddsEnd); - if (MEM_read32(match) == MEM_read32(ip)) { - /* assumption : matchIndex <= dictLimit-4 (by table construction) */ - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, ddsEnd, prefixStart) + 4; - } - - /* save best solution */ - if (currentMl > ml) { - ml = currentMl; - *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + ddsIndexDelta)); - if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ - } - } - } - return ml; -} - - -/* ********************************* -* Hash Chain -***********************************/ -#define NEXT_IN_CHAIN(d, mask) chainTable[(d) & (mask)] - -/* Update chains up to ip (excluded) - Assumption : always within prefix (i.e. not within extDict) */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_insertAndFindFirstIndex_internal( - ZSTD_MatchState_t* ms, - const ZSTD_compressionParameters* const cParams, - const BYTE* ip, U32 const mls, U32 const lazySkipping) -{ - U32* const hashTable = ms->hashTable; - const U32 hashLog = cParams->hashLog; - U32* const chainTable = ms->chainTable; - const U32 chainMask = (1 << cParams->chainLog) - 1; - const BYTE* const base = ms->window.base; - const U32 target = (U32)(ip - base); - U32 idx = ms->nextToUpdate; - - while(idx < target) { /* catch up */ - size_t const h = ZSTD_hashPtr(base+idx, hashLog, mls); - NEXT_IN_CHAIN(idx, chainMask) = hashTable[h]; - hashTable[h] = idx; - idx++; - /* Stop inserting every position when in the lazy skipping mode. */ - if (lazySkipping) - break; - } - - ms->nextToUpdate = target; - return hashTable[ZSTD_hashPtr(ip, hashLog, mls)]; -} - -U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip) { - const ZSTD_compressionParameters* const cParams = &ms->cParams; - return ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, ms->cParams.minMatch, /* lazySkipping*/ 0); -} - -/* inlining is important to hardwire a hot branch (template emulation) */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_HcFindBestMatch( - ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iLimit, - size_t* offsetPtr, - const U32 mls, const ZSTD_dictMode_e dictMode) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const chainTable = ms->chainTable; - const U32 chainSize = (1 << cParams->chainLog); - const U32 chainMask = chainSize-1; - const BYTE* const base = ms->window.base; - const BYTE* const dictBase = ms->window.dictBase; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const prefixStart = base + dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const U32 curr = (U32)(ip-base); - const U32 maxDistance = 1U << cParams->windowLog; - const U32 lowestValid = ms->window.lowLimit; - const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; - const U32 isDictionary = (ms->loadedDictEnd != 0); - const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance; - const U32 minChain = curr > chainSize ? curr - chainSize : 0; - U32 nbAttempts = 1U << cParams->searchLog; - size_t ml=4-1; - - const ZSTD_MatchState_t* const dms = ms->dictMatchState; - const U32 ddsHashLog = dictMode == ZSTD_dedicatedDictSearch - ? dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG : 0; - const size_t ddsIdx = dictMode == ZSTD_dedicatedDictSearch - ? ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG : 0; - - U32 matchIndex; - - if (dictMode == ZSTD_dedicatedDictSearch) { - const U32* entry = &dms->hashTable[ddsIdx]; - PREFETCH_L1(entry); - } - - /* HC4 match finder */ - matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls, ms->lazySkipping); - - for ( ; (matchIndex>=lowLimit) & (nbAttempts>0) ; nbAttempts--) { - size_t currentMl=0; - if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { - const BYTE* const match = base + matchIndex; - assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ - /* read 4B starting from (match + ml + 1 - sizeof(U32)) */ - if (MEM_read32(match + ml - 3) == MEM_read32(ip + ml - 3)) /* potentially better */ - currentMl = ZSTD_count(ip, match, iLimit); - } else { - const BYTE* const match = dictBase + matchIndex; - assert(match+4 <= dictEnd); - if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4; - } - - /* save best solution */ - if (currentMl > ml) { - ml = currentMl; - *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); - if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ - } - - if (matchIndex <= minChain) break; - matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask); - } - - assert(nbAttempts <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ - if (dictMode == ZSTD_dedicatedDictSearch) { - ml = ZSTD_dedicatedDictSearch_lazy_search(offsetPtr, ml, nbAttempts, dms, - ip, iLimit, prefixStart, curr, dictLimit, ddsIdx); - } else if (dictMode == ZSTD_dictMatchState) { - const U32* const dmsChainTable = dms->chainTable; - const U32 dmsChainSize = (1 << dms->cParams.chainLog); - const U32 dmsChainMask = dmsChainSize - 1; - const U32 dmsLowestIndex = dms->window.dictLimit; - const BYTE* const dmsBase = dms->window.base; - const BYTE* const dmsEnd = dms->window.nextSrc; - const U32 dmsSize = (U32)(dmsEnd - dmsBase); - const U32 dmsIndexDelta = dictLimit - dmsSize; - const U32 dmsMinChain = dmsSize > dmsChainSize ? dmsSize - dmsChainSize : 0; - - matchIndex = dms->hashTable[ZSTD_hashPtr(ip, dms->cParams.hashLog, mls)]; - - for ( ; (matchIndex>=dmsLowestIndex) & (nbAttempts>0) ; nbAttempts--) { - size_t currentMl=0; - const BYTE* const match = dmsBase + matchIndex; - assert(match+4 <= dmsEnd); - if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dmsEnd, prefixStart) + 4; - - /* save best solution */ - if (currentMl > ml) { - ml = currentMl; - assert(curr > matchIndex + dmsIndexDelta); - *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + dmsIndexDelta)); - if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ - } - - if (matchIndex <= dmsMinChain) break; - - matchIndex = dmsChainTable[matchIndex & dmsChainMask]; - } - } - - return ml; -} - -/* ********************************* -* (SIMD) Row-based matchfinder -***********************************/ -/* Constants for row-based hash */ -#define ZSTD_ROW_HASH_TAG_MASK ((1u << ZSTD_ROW_HASH_TAG_BITS) - 1) -#define ZSTD_ROW_HASH_MAX_ENTRIES 64 /* absolute maximum number of entries per row, for all configurations */ - -#define ZSTD_ROW_HASH_CACHE_MASK (ZSTD_ROW_HASH_CACHE_SIZE - 1) - -typedef U64 ZSTD_VecMask; /* Clarifies when we are interacting with a U64 representing a mask of matches */ - -/* ZSTD_VecMask_next(): - * Starting from the LSB, returns the idx of the next non-zero bit. - * Basically counting the nb of trailing zeroes. - */ -MEM_STATIC U32 ZSTD_VecMask_next(ZSTD_VecMask val) { - return ZSTD_countTrailingZeros64(val); -} - -/* ZSTD_row_nextIndex(): - * Returns the next index to insert at within a tagTable row, and updates the "head" - * value to reflect the update. Essentially cycles backwards from [1, {entries per row}) - */ -FORCE_INLINE_TEMPLATE U32 ZSTD_row_nextIndex(BYTE* const tagRow, U32 const rowMask) { - U32 next = (*tagRow-1) & rowMask; - next += (next == 0) ? rowMask : 0; /* skip first position */ - *tagRow = (BYTE)next; - return next; -} - -/* ZSTD_isAligned(): - * Checks that a pointer is aligned to "align" bytes which must be a power of 2. - */ -MEM_STATIC int ZSTD_isAligned(void const* ptr, size_t align) { - assert((align & (align - 1)) == 0); - return (((size_t)ptr) & (align - 1)) == 0; -} - -/* ZSTD_row_prefetch(): - * Performs prefetching for the hashTable and tagTable at a given row. - */ -FORCE_INLINE_TEMPLATE void ZSTD_row_prefetch(U32 const* hashTable, BYTE const* tagTable, U32 const relRow, U32 const rowLog) { - PREFETCH_L1(hashTable + relRow); - if (rowLog >= 5) { - PREFETCH_L1(hashTable + relRow + 16); - /* Note: prefetching more of the hash table does not appear to be beneficial for 128-entry rows */ - } - PREFETCH_L1(tagTable + relRow); - if (rowLog == 6) { - PREFETCH_L1(tagTable + relRow + 32); - } - assert(rowLog == 4 || rowLog == 5 || rowLog == 6); - assert(ZSTD_isAligned(hashTable + relRow, 64)); /* prefetched hash row always 64-byte aligned */ - assert(ZSTD_isAligned(tagTable + relRow, (size_t)1 << rowLog)); /* prefetched tagRow sits on correct multiple of bytes (32,64,128) */ -} - -/* ZSTD_row_fillHashCache(): - * Fill up the hash cache starting at idx, prefetching up to ZSTD_ROW_HASH_CACHE_SIZE entries, - * but not beyond iLimit. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_row_fillHashCache(ZSTD_MatchState_t* ms, const BYTE* base, - U32 const rowLog, U32 const mls, - U32 idx, const BYTE* const iLimit) -{ - U32 const* const hashTable = ms->hashTable; - BYTE const* const tagTable = ms->tagTable; - U32 const hashLog = ms->rowHashLog; - U32 const maxElemsToPrefetch = (base + idx) > iLimit ? 0 : (U32)(iLimit - (base + idx) + 1); - U32 const lim = idx + MIN(ZSTD_ROW_HASH_CACHE_SIZE, maxElemsToPrefetch); - - for (; idx < lim; ++idx) { - U32 const hash = (U32)ZSTD_hashPtrSalted(base + idx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt); - U32 const row = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; - ZSTD_row_prefetch(hashTable, tagTable, row, rowLog); - ms->hashCache[idx & ZSTD_ROW_HASH_CACHE_MASK] = hash; - } - - DEBUGLOG(6, "ZSTD_row_fillHashCache(): [%u %u %u %u %u %u %u %u]", ms->hashCache[0], ms->hashCache[1], - ms->hashCache[2], ms->hashCache[3], ms->hashCache[4], - ms->hashCache[5], ms->hashCache[6], ms->hashCache[7]); -} - -/* ZSTD_row_nextCachedHash(): - * Returns the hash of base + idx, and replaces the hash in the hash cache with the byte at - * base + idx + ZSTD_ROW_HASH_CACHE_SIZE. Also prefetches the appropriate rows from hashTable and tagTable. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_row_nextCachedHash(U32* cache, U32 const* hashTable, - BYTE const* tagTable, BYTE const* base, - U32 idx, U32 const hashLog, - U32 const rowLog, U32 const mls, - U64 const hashSalt) -{ - U32 const newHash = (U32)ZSTD_hashPtrSalted(base+idx+ZSTD_ROW_HASH_CACHE_SIZE, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, hashSalt); - U32 const row = (newHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; - ZSTD_row_prefetch(hashTable, tagTable, row, rowLog); - { U32 const hash = cache[idx & ZSTD_ROW_HASH_CACHE_MASK]; - cache[idx & ZSTD_ROW_HASH_CACHE_MASK] = newHash; - return hash; - } -} - -/* ZSTD_row_update_internalImpl(): - * Updates the hash table with positions starting from updateStartIdx until updateEndIdx. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_row_update_internalImpl(ZSTD_MatchState_t* ms, - U32 updateStartIdx, U32 const updateEndIdx, - U32 const mls, U32 const rowLog, - U32 const rowMask, U32 const useCache) -{ - U32* const hashTable = ms->hashTable; - BYTE* const tagTable = ms->tagTable; - U32 const hashLog = ms->rowHashLog; - const BYTE* const base = ms->window.base; - - DEBUGLOG(6, "ZSTD_row_update_internalImpl(): updateStartIdx=%u, updateEndIdx=%u", updateStartIdx, updateEndIdx); - for (; updateStartIdx < updateEndIdx; ++updateStartIdx) { - U32 const hash = useCache ? ZSTD_row_nextCachedHash(ms->hashCache, hashTable, tagTable, base, updateStartIdx, hashLog, rowLog, mls, ms->hashSalt) - : (U32)ZSTD_hashPtrSalted(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt); - U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; - U32* const row = hashTable + relRow; - BYTE* tagRow = tagTable + relRow; - U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask); - - assert(hash == ZSTD_hashPtrSalted(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt)); - tagRow[pos] = hash & ZSTD_ROW_HASH_TAG_MASK; - row[pos] = updateStartIdx; - } -} - -/* ZSTD_row_update_internal(): - * Inserts the byte at ip into the appropriate position in the hash table, and updates ms->nextToUpdate. - * Skips sections of long matches as is necessary. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_row_update_internal(ZSTD_MatchState_t* ms, const BYTE* ip, - U32 const mls, U32 const rowLog, - U32 const rowMask, U32 const useCache) -{ - U32 idx = ms->nextToUpdate; - const BYTE* const base = ms->window.base; - const U32 target = (U32)(ip - base); - const U32 kSkipThreshold = 384; - const U32 kMaxMatchStartPositionsToUpdate = 96; - const U32 kMaxMatchEndPositionsToUpdate = 32; - - if (useCache) { - /* Only skip positions when using hash cache, i.e. - * if we are loading a dict, don't skip anything. - * If we decide to skip, then we only update a set number - * of positions at the beginning and end of the match. - */ - if (UNLIKELY(target - idx > kSkipThreshold)) { - U32 const bound = idx + kMaxMatchStartPositionsToUpdate; - ZSTD_row_update_internalImpl(ms, idx, bound, mls, rowLog, rowMask, useCache); - idx = target - kMaxMatchEndPositionsToUpdate; - ZSTD_row_fillHashCache(ms, base, rowLog, mls, idx, ip+1); - } - } - assert(target >= idx); - ZSTD_row_update_internalImpl(ms, idx, target, mls, rowLog, rowMask, useCache); - ms->nextToUpdate = target; -} - -/* ZSTD_row_update(): - * External wrapper for ZSTD_row_update_internal(). Used for filling the hashtable during dictionary - * processing. - */ -void ZSTD_row_update(ZSTD_MatchState_t* const ms, const BYTE* ip) { - const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); - const U32 rowMask = (1u << rowLog) - 1; - const U32 mls = MIN(ms->cParams.minMatch, 6 /* mls caps out at 6 */); - - DEBUGLOG(5, "ZSTD_row_update(), rowLog=%u", rowLog); - ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 0 /* don't use cache */); -} - -/* Returns the mask width of bits group of which will be set to 1. Given not all - * architectures have easy movemask instruction, this helps to iterate over - * groups of bits easier and faster. - */ -FORCE_INLINE_TEMPLATE U32 -ZSTD_row_matchMaskGroupWidth(const U32 rowEntries) -{ - assert((rowEntries == 16) || (rowEntries == 32) || rowEntries == 64); - assert(rowEntries <= ZSTD_ROW_HASH_MAX_ENTRIES); - (void)rowEntries; -#if defined(ZSTD_ARCH_ARM_NEON) - /* NEON path only works for little endian */ - if (!MEM_isLittleEndian()) { - return 1; - } - if (rowEntries == 16) { - return 4; - } - if (rowEntries == 32) { - return 2; - } - if (rowEntries == 64) { - return 1; - } -#endif - return 1; -} - -#if defined(ZSTD_ARCH_X86_SSE2) -FORCE_INLINE_TEMPLATE ZSTD_VecMask -ZSTD_row_getSSEMask(int nbChunks, const BYTE* const src, const BYTE tag, const U32 head) -{ - const __m128i comparisonMask = _mm_set1_epi8((char)tag); - int matches[4] = {0}; - int i; - assert(nbChunks == 1 || nbChunks == 2 || nbChunks == 4); - for (i=0; i> chunkSize; - do { - size_t chunk = MEM_readST(&src[i]); - chunk ^= splatChar; - chunk = (((chunk | x80) - x01) | chunk) & x80; - matches <<= chunkSize; - matches |= (chunk * extractMagic) >> shiftAmount; - i -= chunkSize; - } while (i >= 0); - } else { /* big endian: reverse bits during extraction */ - const size_t msb = xFF ^ (xFF >> 1); - const size_t extractMagic = (msb / 0x1FF) | msb; - do { - size_t chunk = MEM_readST(&src[i]); - chunk ^= splatChar; - chunk = (((chunk | x80) - x01) | chunk) & x80; - matches <<= chunkSize; - matches |= ((chunk >> 7) * extractMagic) >> shiftAmount; - i -= chunkSize; - } while (i >= 0); - } - matches = ~matches; - if (rowEntries == 16) { - return ZSTD_rotateRight_U16((U16)matches, headGrouped); - } else if (rowEntries == 32) { - return ZSTD_rotateRight_U32((U32)matches, headGrouped); - } else { - return ZSTD_rotateRight_U64((U64)matches, headGrouped); - } - } -#endif -} - -/* The high-level approach of the SIMD row based match finder is as follows: - * - Figure out where to insert the new entry: - * - Generate a hash for current input position and split it into a one byte of tag and `rowHashLog` bits of index. - * - The hash is salted by a value that changes on every context reset, so when the same table is used - * we will avoid collisions that would otherwise slow us down by introducing phantom matches. - * - The hashTable is effectively split into groups or "rows" of 15 or 31 entries of U32, and the index determines - * which row to insert into. - * - Determine the correct position within the row to insert the entry into. Each row of 15 or 31 can - * be considered as a circular buffer with a "head" index that resides in the tagTable (overall 16 or 32 bytes - * per row). - * - Use SIMD to efficiently compare the tags in the tagTable to the 1-byte tag calculated for the position and - * generate a bitfield that we can cycle through to check the collisions in the hash table. - * - Pick the longest match. - * - Insert the tag into the equivalent row and position in the tagTable. - */ -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_RowFindBestMatch( - ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iLimit, - size_t* offsetPtr, - const U32 mls, const ZSTD_dictMode_e dictMode, - const U32 rowLog) -{ - U32* const hashTable = ms->hashTable; - BYTE* const tagTable = ms->tagTable; - U32* const hashCache = ms->hashCache; - const U32 hashLog = ms->rowHashLog; - const ZSTD_compressionParameters* const cParams = &ms->cParams; - const BYTE* const base = ms->window.base; - const BYTE* const dictBase = ms->window.dictBase; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const prefixStart = base + dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const U32 curr = (U32)(ip-base); - const U32 maxDistance = 1U << cParams->windowLog; - const U32 lowestValid = ms->window.lowLimit; - const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; - const U32 isDictionary = (ms->loadedDictEnd != 0); - const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance; - const U32 rowEntries = (1U << rowLog); - const U32 rowMask = rowEntries - 1; - const U32 cappedSearchLog = MIN(cParams->searchLog, rowLog); /* nb of searches is capped at nb entries per row */ - const U32 groupWidth = ZSTD_row_matchMaskGroupWidth(rowEntries); - const U64 hashSalt = ms->hashSalt; - U32 nbAttempts = 1U << cappedSearchLog; - size_t ml=4-1; - U32 hash; - - /* DMS/DDS variables that may be referenced laster */ - const ZSTD_MatchState_t* const dms = ms->dictMatchState; - - /* Initialize the following variables to satisfy static analyzer */ - size_t ddsIdx = 0; - U32 ddsExtraAttempts = 0; /* cctx hash tables are limited in searches, but allow extra searches into DDS */ - U32 dmsTag = 0; - U32* dmsRow = NULL; - BYTE* dmsTagRow = NULL; - - if (dictMode == ZSTD_dedicatedDictSearch) { - const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG; - { /* Prefetch DDS hashtable entry */ - ddsIdx = ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG; - PREFETCH_L1(&dms->hashTable[ddsIdx]); - } - ddsExtraAttempts = cParams->searchLog > rowLog ? 1U << (cParams->searchLog - rowLog) : 0; - } - - if (dictMode == ZSTD_dictMatchState) { - /* Prefetch DMS rows */ - U32* const dmsHashTable = dms->hashTable; - BYTE* const dmsTagTable = dms->tagTable; - U32 const dmsHash = (U32)ZSTD_hashPtr(ip, dms->rowHashLog + ZSTD_ROW_HASH_TAG_BITS, mls); - U32 const dmsRelRow = (dmsHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; - dmsTag = dmsHash & ZSTD_ROW_HASH_TAG_MASK; - dmsTagRow = (BYTE*)(dmsTagTable + dmsRelRow); - dmsRow = dmsHashTable + dmsRelRow; - ZSTD_row_prefetch(dmsHashTable, dmsTagTable, dmsRelRow, rowLog); - } - - /* Update the hashTable and tagTable up to (but not including) ip */ - if (!ms->lazySkipping) { - ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 1 /* useCache */); - hash = ZSTD_row_nextCachedHash(hashCache, hashTable, tagTable, base, curr, hashLog, rowLog, mls, hashSalt); - } else { - /* Stop inserting every position when in the lazy skipping mode. - * The hash cache is also not kept up to date in this mode. - */ - hash = (U32)ZSTD_hashPtrSalted(ip, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, hashSalt); - ms->nextToUpdate = curr; - } - ms->hashSaltEntropy += hash; /* collect salt entropy */ - - { /* Get the hash for ip, compute the appropriate row */ - U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; - U32 const tag = hash & ZSTD_ROW_HASH_TAG_MASK; - U32* const row = hashTable + relRow; - BYTE* tagRow = (BYTE*)(tagTable + relRow); - U32 const headGrouped = (*tagRow & rowMask) * groupWidth; - U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES]; - size_t numMatches = 0; - size_t currMatch = 0; - ZSTD_VecMask matches = ZSTD_row_getMatchMask(tagRow, (BYTE)tag, headGrouped, rowEntries); - - /* Cycle through the matches and prefetch */ - for (; (matches > 0) && (nbAttempts > 0); matches &= (matches - 1)) { - U32 const matchPos = ((headGrouped + ZSTD_VecMask_next(matches)) / groupWidth) & rowMask; - U32 const matchIndex = row[matchPos]; - if(matchPos == 0) continue; - assert(numMatches < rowEntries); - if (matchIndex < lowLimit) - break; - if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { - PREFETCH_L1(base + matchIndex); - } else { - PREFETCH_L1(dictBase + matchIndex); - } - matchBuffer[numMatches++] = matchIndex; - --nbAttempts; - } - - /* Speed opt: insert current byte into hashtable too. This allows us to avoid one iteration of the loop - in ZSTD_row_update_internal() at the next search. */ - { - U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask); - tagRow[pos] = (BYTE)tag; - row[pos] = ms->nextToUpdate++; - } - - /* Return the longest match */ - for (; currMatch < numMatches; ++currMatch) { - U32 const matchIndex = matchBuffer[currMatch]; - size_t currentMl=0; - assert(matchIndex < curr); - assert(matchIndex >= lowLimit); - - if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { - const BYTE* const match = base + matchIndex; - assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ - /* read 4B starting from (match + ml + 1 - sizeof(U32)) */ - if (MEM_read32(match + ml - 3) == MEM_read32(ip + ml - 3)) /* potentially better */ - currentMl = ZSTD_count(ip, match, iLimit); - } else { - const BYTE* const match = dictBase + matchIndex; - assert(match+4 <= dictEnd); - if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4; - } - - /* Save best solution */ - if (currentMl > ml) { - ml = currentMl; - *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); - if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ - } - } - } - - assert(nbAttempts <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ - if (dictMode == ZSTD_dedicatedDictSearch) { - ml = ZSTD_dedicatedDictSearch_lazy_search(offsetPtr, ml, nbAttempts + ddsExtraAttempts, dms, - ip, iLimit, prefixStart, curr, dictLimit, ddsIdx); - } else if (dictMode == ZSTD_dictMatchState) { - /* TODO: Measure and potentially add prefetching to DMS */ - const U32 dmsLowestIndex = dms->window.dictLimit; - const BYTE* const dmsBase = dms->window.base; - const BYTE* const dmsEnd = dms->window.nextSrc; - const U32 dmsSize = (U32)(dmsEnd - dmsBase); - const U32 dmsIndexDelta = dictLimit - dmsSize; - - { U32 const headGrouped = (*dmsTagRow & rowMask) * groupWidth; - U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES]; - size_t numMatches = 0; - size_t currMatch = 0; - ZSTD_VecMask matches = ZSTD_row_getMatchMask(dmsTagRow, (BYTE)dmsTag, headGrouped, rowEntries); - - for (; (matches > 0) && (nbAttempts > 0); matches &= (matches - 1)) { - U32 const matchPos = ((headGrouped + ZSTD_VecMask_next(matches)) / groupWidth) & rowMask; - U32 const matchIndex = dmsRow[matchPos]; - if(matchPos == 0) continue; - if (matchIndex < dmsLowestIndex) - break; - PREFETCH_L1(dmsBase + matchIndex); - matchBuffer[numMatches++] = matchIndex; - --nbAttempts; - } - - /* Return the longest match */ - for (; currMatch < numMatches; ++currMatch) { - U32 const matchIndex = matchBuffer[currMatch]; - size_t currentMl=0; - assert(matchIndex >= dmsLowestIndex); - assert(matchIndex < curr); - - { const BYTE* const match = dmsBase + matchIndex; - assert(match+4 <= dmsEnd); - if (MEM_read32(match) == MEM_read32(ip)) - currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dmsEnd, prefixStart) + 4; - } - - if (currentMl > ml) { - ml = currentMl; - assert(curr > matchIndex + dmsIndexDelta); - *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + dmsIndexDelta)); - if (ip+currentMl == iLimit) break; - } - } - } - } - return ml; -} - - -/** - * Generate search functions templated on (dictMode, mls, rowLog). - * These functions are outlined for code size & compilation time. - * ZSTD_searchMax() dispatches to the correct implementation function. - * - * TODO: The start of the search function involves loading and calculating a - * bunch of constants from the ZSTD_MatchState_t. These computations could be - * done in an initialization function, and saved somewhere in the match state. - * Then we could pass a pointer to the saved state instead of the match state, - * and avoid duplicate computations. - * - * TODO: Move the match re-winding into searchMax. This improves compression - * ratio, and unlocks further simplifications with the next TODO. - * - * TODO: Try moving the repcode search into searchMax. After the re-winding - * and repcode search are in searchMax, there is no more logic in the match - * finder loop that requires knowledge about the dictMode. So we should be - * able to avoid force inlining it, and we can join the extDict loop with - * the single segment loop. It should go in searchMax instead of its own - * function to avoid having multiple virtual function calls per search. - */ - -#define ZSTD_BT_SEARCH_FN(dictMode, mls) ZSTD_BtFindBestMatch_##dictMode##_##mls -#define ZSTD_HC_SEARCH_FN(dictMode, mls) ZSTD_HcFindBestMatch_##dictMode##_##mls -#define ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog) ZSTD_RowFindBestMatch_##dictMode##_##mls##_##rowLog - -#define ZSTD_SEARCH_FN_ATTRS FORCE_NOINLINE - -#define GEN_ZSTD_BT_SEARCH_FN(dictMode, mls) \ - ZSTD_SEARCH_FN_ATTRS size_t ZSTD_BT_SEARCH_FN(dictMode, mls)( \ - ZSTD_MatchState_t* ms, \ - const BYTE* ip, const BYTE* const iLimit, \ - size_t* offBasePtr) \ - { \ - assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ - return ZSTD_BtFindBestMatch(ms, ip, iLimit, offBasePtr, mls, ZSTD_##dictMode); \ - } \ - -#define GEN_ZSTD_HC_SEARCH_FN(dictMode, mls) \ - ZSTD_SEARCH_FN_ATTRS size_t ZSTD_HC_SEARCH_FN(dictMode, mls)( \ - ZSTD_MatchState_t* ms, \ - const BYTE* ip, const BYTE* const iLimit, \ - size_t* offsetPtr) \ - { \ - assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ - return ZSTD_HcFindBestMatch(ms, ip, iLimit, offsetPtr, mls, ZSTD_##dictMode); \ - } \ - -#define GEN_ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog) \ - ZSTD_SEARCH_FN_ATTRS size_t ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog)( \ - ZSTD_MatchState_t* ms, \ - const BYTE* ip, const BYTE* const iLimit, \ - size_t* offsetPtr) \ - { \ - assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ - assert(MAX(4, MIN(6, ms->cParams.searchLog)) == rowLog); \ - return ZSTD_RowFindBestMatch(ms, ip, iLimit, offsetPtr, mls, ZSTD_##dictMode, rowLog); \ - } \ - -#define ZSTD_FOR_EACH_ROWLOG(X, dictMode, mls) \ - X(dictMode, mls, 4) \ - X(dictMode, mls, 5) \ - X(dictMode, mls, 6) - -#define ZSTD_FOR_EACH_MLS_ROWLOG(X, dictMode) \ - ZSTD_FOR_EACH_ROWLOG(X, dictMode, 4) \ - ZSTD_FOR_EACH_ROWLOG(X, dictMode, 5) \ - ZSTD_FOR_EACH_ROWLOG(X, dictMode, 6) - -#define ZSTD_FOR_EACH_MLS(X, dictMode) \ - X(dictMode, 4) \ - X(dictMode, 5) \ - X(dictMode, 6) - -#define ZSTD_FOR_EACH_DICT_MODE(X, ...) \ - X(__VA_ARGS__, noDict) \ - X(__VA_ARGS__, extDict) \ - X(__VA_ARGS__, dictMatchState) \ - X(__VA_ARGS__, dedicatedDictSearch) - -/* Generate row search fns for each combination of (dictMode, mls, rowLog) */ -ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS_ROWLOG, GEN_ZSTD_ROW_SEARCH_FN) -/* Generate binary Tree search fns for each combination of (dictMode, mls) */ -ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS, GEN_ZSTD_BT_SEARCH_FN) -/* Generate hash chain search fns for each combination of (dictMode, mls) */ -ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS, GEN_ZSTD_HC_SEARCH_FN) - -typedef enum { search_hashChain=0, search_binaryTree=1, search_rowHash=2 } searchMethod_e; - -#define GEN_ZSTD_CALL_BT_SEARCH_FN(dictMode, mls) \ - case mls: \ - return ZSTD_BT_SEARCH_FN(dictMode, mls)(ms, ip, iend, offsetPtr); -#define GEN_ZSTD_CALL_HC_SEARCH_FN(dictMode, mls) \ - case mls: \ - return ZSTD_HC_SEARCH_FN(dictMode, mls)(ms, ip, iend, offsetPtr); -#define GEN_ZSTD_CALL_ROW_SEARCH_FN(dictMode, mls, rowLog) \ - case rowLog: \ - return ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog)(ms, ip, iend, offsetPtr); - -#define ZSTD_SWITCH_MLS(X, dictMode) \ - switch (mls) { \ - ZSTD_FOR_EACH_MLS(X, dictMode) \ - } - -#define ZSTD_SWITCH_ROWLOG(dictMode, mls) \ - case mls: \ - switch (rowLog) { \ - ZSTD_FOR_EACH_ROWLOG(GEN_ZSTD_CALL_ROW_SEARCH_FN, dictMode, mls) \ - } \ - ZSTD_UNREACHABLE; \ - break; - -#define ZSTD_SWITCH_SEARCH_METHOD(dictMode) \ - switch (searchMethod) { \ - case search_hashChain: \ - ZSTD_SWITCH_MLS(GEN_ZSTD_CALL_HC_SEARCH_FN, dictMode) \ - break; \ - case search_binaryTree: \ - ZSTD_SWITCH_MLS(GEN_ZSTD_CALL_BT_SEARCH_FN, dictMode) \ - break; \ - case search_rowHash: \ - ZSTD_SWITCH_MLS(ZSTD_SWITCH_ROWLOG, dictMode) \ - break; \ - } \ - ZSTD_UNREACHABLE; - -/** - * Searches for the longest match at @p ip. - * Dispatches to the correct implementation function based on the - * (searchMethod, dictMode, mls, rowLog). We use switch statements - * here instead of using an indirect function call through a function - * pointer because after Spectre and Meltdown mitigations, indirect - * function calls can be very costly, especially in the kernel. - * - * NOTE: dictMode and searchMethod should be templated, so those switch - * statements should be optimized out. Only the mls & rowLog switches - * should be left. - * - * @param ms The match state. - * @param ip The position to search at. - * @param iend The end of the input data. - * @param[out] offsetPtr Stores the match offset into this pointer. - * @param mls The minimum search length, in the range [4, 6]. - * @param rowLog The row log (if applicable), in the range [4, 6]. - * @param searchMethod The search method to use (templated). - * @param dictMode The dictMode (templated). - * - * @returns The length of the longest match found, or < mls if no match is found. - * If a match is found its offset is stored in @p offsetPtr. - */ -FORCE_INLINE_TEMPLATE size_t ZSTD_searchMax( - ZSTD_MatchState_t* ms, - const BYTE* ip, - const BYTE* iend, - size_t* offsetPtr, - U32 const mls, - U32 const rowLog, - searchMethod_e const searchMethod, - ZSTD_dictMode_e const dictMode) -{ - if (dictMode == ZSTD_noDict) { - ZSTD_SWITCH_SEARCH_METHOD(noDict) - } else if (dictMode == ZSTD_extDict) { - ZSTD_SWITCH_SEARCH_METHOD(extDict) - } else if (dictMode == ZSTD_dictMatchState) { - ZSTD_SWITCH_SEARCH_METHOD(dictMatchState) - } else if (dictMode == ZSTD_dedicatedDictSearch) { - ZSTD_SWITCH_SEARCH_METHOD(dedicatedDictSearch) - } - ZSTD_UNREACHABLE; - return 0; -} - -/* ******************************* -* Common parser - lazy strategy -*********************************/ - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_lazy_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, - U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize, - const searchMethod_e searchMethod, const U32 depth, - ZSTD_dictMode_e const dictMode) -{ - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip = istart; - const BYTE* anchor = istart; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = (searchMethod == search_rowHash) ? iend - 8 - ZSTD_ROW_HASH_CACHE_SIZE : iend - 8; - const BYTE* const base = ms->window.base; - const U32 prefixLowestIndex = ms->window.dictLimit; - const BYTE* const prefixLowest = base + prefixLowestIndex; - const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6); - const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); - - U32 offset_1 = rep[0], offset_2 = rep[1]; - U32 offsetSaved1 = 0, offsetSaved2 = 0; - - const int isDMS = dictMode == ZSTD_dictMatchState; - const int isDDS = dictMode == ZSTD_dedicatedDictSearch; - const int isDxS = isDMS || isDDS; - const ZSTD_MatchState_t* const dms = ms->dictMatchState; - const U32 dictLowestIndex = isDxS ? dms->window.dictLimit : 0; - const BYTE* const dictBase = isDxS ? dms->window.base : NULL; - const BYTE* const dictLowest = isDxS ? dictBase + dictLowestIndex : NULL; - const BYTE* const dictEnd = isDxS ? dms->window.nextSrc : NULL; - const U32 dictIndexDelta = isDxS ? - prefixLowestIndex - (U32)(dictEnd - dictBase) : - 0; - const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictLowest)); - - DEBUGLOG(5, "ZSTD_compressBlock_lazy_generic (dictMode=%u) (searchFunc=%u)", (U32)dictMode, (U32)searchMethod); - ip += (dictAndPrefixLength == 0); - if (dictMode == ZSTD_noDict) { - U32 const curr = (U32)(ip - base); - U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, ms->cParams.windowLog); - U32 const maxRep = curr - windowLow; - if (offset_2 > maxRep) offsetSaved2 = offset_2, offset_2 = 0; - if (offset_1 > maxRep) offsetSaved1 = offset_1, offset_1 = 0; - } - if (isDxS) { - /* dictMatchState repCode checks don't currently handle repCode == 0 - * disabling. */ - assert(offset_1 <= dictAndPrefixLength); - assert(offset_2 <= dictAndPrefixLength); - } - - /* Reset the lazy skipping state */ - ms->lazySkipping = 0; - - if (searchMethod == search_rowHash) { - ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); - } - - /* Match Loop */ -#if defined(__GNUC__) && defined(__x86_64__) - /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the - * code alignment is perturbed. To fix the instability align the loop on 32-bytes. - */ - __asm__(".p2align 5"); -#endif - while (ip < ilimit) { - size_t matchLength=0; - size_t offBase = REPCODE1_TO_OFFBASE; - const BYTE* start=ip+1; - DEBUGLOG(7, "search baseline (depth 0)"); - - /* check repCode */ - if (isDxS) { - const U32 repIndex = (U32)(ip - base) + 1 - offset_1; - const BYTE* repMatch = ((dictMode == ZSTD_dictMatchState || dictMode == ZSTD_dedicatedDictSearch) - && repIndex < prefixLowestIndex) ? - dictBase + (repIndex - dictIndexDelta) : - base + repIndex; - if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { - const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; - matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; - if (depth==0) goto _storeSequence; - } - } - if ( dictMode == ZSTD_noDict - && ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1)))) { - matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; - if (depth==0) goto _storeSequence; - } - - /* first search (depth 0) */ - { size_t offbaseFound = 999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &offbaseFound, mls, rowLog, searchMethod, dictMode); - if (ml2 > matchLength) - matchLength = ml2, start = ip, offBase = offbaseFound; - } - - if (matchLength < 4) { - size_t const step = ((size_t)(ip-anchor) >> kSearchStrength) + 1; /* jump faster over incompressible sections */; - ip += step; - /* Enter the lazy skipping mode once we are skipping more than 8 bytes at a time. - * In this mode we stop inserting every position into our tables, and only insert - * positions that we search, which is one in step positions. - * The exact cutoff is flexible, I've just chosen a number that is reasonably high, - * so we minimize the compression ratio loss in "normal" scenarios. This mode gets - * triggered once we've gone 2KB without finding any matches. - */ - ms->lazySkipping = step > kLazySkippingStep; - continue; - } - - /* let's try to find a better solution */ - if (depth>=1) - while (ip0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) { - size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4; - int const gain2 = (int)(mlRep * 3); - int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); - if ((mlRep >= 4) && (gain2 > gain1)) - matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; - } - if (isDxS) { - const U32 repIndex = (U32)(ip - base) - offset_1; - const BYTE* repMatch = repIndex < prefixLowestIndex ? - dictBase + (repIndex - dictIndexDelta) : - base + repIndex; - if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip)) ) { - const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; - size_t const mlRep = ZSTD_count_2segments(ip+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; - int const gain2 = (int)(mlRep * 3); - int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); - if ((mlRep >= 4) && (gain2 > gain1)) - matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; - } - } - { size_t ofbCandidate=999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, dictMode); - int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4); - if ((ml2 >= 4) && (gain2 > gain1)) { - matchLength = ml2, offBase = ofbCandidate, start = ip; - continue; /* search a better one */ - } } - - /* let's find an even better one */ - if ((depth==2) && (ip0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) { - size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4; - int const gain2 = (int)(mlRep * 4); - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); - if ((mlRep >= 4) && (gain2 > gain1)) - matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; - } - if (isDxS) { - const U32 repIndex = (U32)(ip - base) - offset_1; - const BYTE* repMatch = repIndex < prefixLowestIndex ? - dictBase + (repIndex - dictIndexDelta) : - base + repIndex; - if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip)) ) { - const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; - size_t const mlRep = ZSTD_count_2segments(ip+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; - int const gain2 = (int)(mlRep * 4); - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); - if ((mlRep >= 4) && (gain2 > gain1)) - matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; - } - } - { size_t ofbCandidate=999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, dictMode); - int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7); - if ((ml2 >= 4) && (gain2 > gain1)) { - matchLength = ml2, offBase = ofbCandidate, start = ip; - continue; - } } } - break; /* nothing found : store previous solution */ - } - - /* NOTE: - * Pay attention that `start[-value]` can lead to strange undefined behavior - * notably if `value` is unsigned, resulting in a large positive `-value`. - */ - /* catch up */ - if (OFFBASE_IS_OFFSET(offBase)) { - if (dictMode == ZSTD_noDict) { - while ( ((start > anchor) & (start - OFFBASE_TO_OFFSET(offBase) > prefixLowest)) - && (start[-1] == (start-OFFBASE_TO_OFFSET(offBase))[-1]) ) /* only search for offset within prefix */ - { start--; matchLength++; } - } - if (isDxS) { - U32 const matchIndex = (U32)((size_t)(start-base) - OFFBASE_TO_OFFSET(offBase)); - const BYTE* match = (matchIndex < prefixLowestIndex) ? dictBase + matchIndex - dictIndexDelta : base + matchIndex; - const BYTE* const mStart = (matchIndex < prefixLowestIndex) ? dictLowest : prefixLowest; - while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */ - } - offset_2 = offset_1; offset_1 = (U32)OFFBASE_TO_OFFSET(offBase); - } - /* store sequence */ -_storeSequence: - { size_t const litLength = (size_t)(start - anchor); - ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offBase, matchLength); - anchor = ip = start + matchLength; - } - if (ms->lazySkipping) { - /* We've found a match, disable lazy skipping mode, and refill the hash cache. */ - if (searchMethod == search_rowHash) { - ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); - } - ms->lazySkipping = 0; - } - - /* check immediate repcode */ - if (isDxS) { - while (ip <= ilimit) { - U32 const current2 = (U32)(ip-base); - U32 const repIndex = current2 - offset_2; - const BYTE* repMatch = repIndex < prefixLowestIndex ? - dictBase - dictIndexDelta + repIndex : - base + repIndex; - if ( (ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) - && (MEM_read32(repMatch) == MEM_read32(ip)) ) { - const BYTE* const repEnd2 = repIndex < prefixLowestIndex ? dictEnd : iend; - matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; - offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap offset_2 <=> offset_1 */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); - ip += matchLength; - anchor = ip; - continue; - } - break; - } - } - - if (dictMode == ZSTD_noDict) { - while ( ((ip <= ilimit) & (offset_2>0)) - && (MEM_read32(ip) == MEM_read32(ip - offset_2)) ) { - /* store sequence */ - matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; - offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap repcodes */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); - ip += matchLength; - anchor = ip; - continue; /* faster when present ... (?) */ - } } } - - /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), - * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ - offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; - - /* save reps for next block */ - rep[0] = offset_1 ? offset_1 : offsetSaved1; - rep[1] = offset_2 ? offset_2 : offsetSaved2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} -#endif /* build exclusions */ - - -#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_greedy( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_greedy_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_greedy_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_dedicatedDictSearch); -} - -size_t ZSTD_compressBlock_greedy_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_greedy_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_dedicatedDictSearch); -} -#endif - -#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_lazy_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_lazy_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_dedicatedDictSearch); -} - -size_t ZSTD_compressBlock_lazy_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_lazy_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_dedicatedDictSearch); -} -#endif - -#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_lazy2_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_dedicatedDictSearch); -} - -size_t ZSTD_compressBlock_lazy2_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_lazy2_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_dedicatedDictSearch); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btlazy2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_btlazy2_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD_dictMatchState); -} -#endif - -#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_compressBlock_lazy_extDict_generic( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, - U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize, - const searchMethod_e searchMethod, const U32 depth) -{ - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip = istart; - const BYTE* anchor = istart; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = searchMethod == search_rowHash ? iend - 8 - ZSTD_ROW_HASH_CACHE_SIZE : iend - 8; - const BYTE* const base = ms->window.base; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const prefixStart = base + dictLimit; - const BYTE* const dictBase = ms->window.dictBase; - const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const dictStart = dictBase + ms->window.lowLimit; - const U32 windowLog = ms->cParams.windowLog; - const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6); - const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); - - U32 offset_1 = rep[0], offset_2 = rep[1]; - - DEBUGLOG(5, "ZSTD_compressBlock_lazy_extDict_generic (searchFunc=%u)", (U32)searchMethod); - - /* Reset the lazy skipping state */ - ms->lazySkipping = 0; - - /* init */ - ip += (ip == prefixStart); - if (searchMethod == search_rowHash) { - ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); - } - - /* Match Loop */ -#if defined(__GNUC__) && defined(__x86_64__) - /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the - * code alignment is perturbed. To fix the instability align the loop on 32-bytes. - */ - __asm__(".p2align 5"); -#endif - while (ip < ilimit) { - size_t matchLength=0; - size_t offBase = REPCODE1_TO_OFFBASE; - const BYTE* start=ip+1; - U32 curr = (U32)(ip-base); - - /* check repCode */ - { const U32 windowLow = ZSTD_getLowestMatchIndex(ms, curr+1, windowLog); - const U32 repIndex = (U32)(curr+1 - offset_1); - const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; - const BYTE* const repMatch = repBase + repIndex; - if ( (ZSTD_index_overlap_check(dictLimit, repIndex)) - & (offset_1 <= curr+1 - windowLow) ) /* note: we are searching at curr+1 */ - if (MEM_read32(ip+1) == MEM_read32(repMatch)) { - /* repcode detected we should take it */ - const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; - matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; - if (depth==0) goto _storeSequence; - } } - - /* first search (depth 0) */ - { size_t ofbCandidate = 999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); - if (ml2 > matchLength) - matchLength = ml2, start = ip, offBase = ofbCandidate; - } - - if (matchLength < 4) { - size_t const step = ((size_t)(ip-anchor) >> kSearchStrength); - ip += step + 1; /* jump faster over incompressible sections */ - /* Enter the lazy skipping mode once we are skipping more than 8 bytes at a time. - * In this mode we stop inserting every position into our tables, and only insert - * positions that we search, which is one in step positions. - * The exact cutoff is flexible, I've just chosen a number that is reasonably high, - * so we minimize the compression ratio loss in "normal" scenarios. This mode gets - * triggered once we've gone 2KB without finding any matches. - */ - ms->lazySkipping = step > kLazySkippingStep; - continue; - } - - /* let's try to find a better solution */ - if (depth>=1) - while (ip repIndex >= windowLow` */ - if (MEM_read32(ip) == MEM_read32(repMatch)) { - /* repcode detected */ - const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; - size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; - int const gain2 = (int)(repLength * 3); - int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); - if ((repLength >= 4) && (gain2 > gain1)) - matchLength = repLength, offBase = REPCODE1_TO_OFFBASE, start = ip; - } } - - /* search match, depth 1 */ - { size_t ofbCandidate = 999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); - int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4); - if ((ml2 >= 4) && (gain2 > gain1)) { - matchLength = ml2, offBase = ofbCandidate, start = ip; - continue; /* search a better one */ - } } - - /* let's find an even better one */ - if ((depth==2) && (ip repIndex >= windowLow` */ - if (MEM_read32(ip) == MEM_read32(repMatch)) { - /* repcode detected */ - const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; - size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; - int const gain2 = (int)(repLength * 4); - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); - if ((repLength >= 4) && (gain2 > gain1)) - matchLength = repLength, offBase = REPCODE1_TO_OFFBASE, start = ip; - } } - - /* search match, depth 2 */ - { size_t ofbCandidate = 999999999; - size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); - int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ - int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7); - if ((ml2 >= 4) && (gain2 > gain1)) { - matchLength = ml2, offBase = ofbCandidate, start = ip; - continue; - } } } - break; /* nothing found : store previous solution */ - } - - /* catch up */ - if (OFFBASE_IS_OFFSET(offBase)) { - U32 const matchIndex = (U32)((size_t)(start-base) - OFFBASE_TO_OFFSET(offBase)); - const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex; - const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart; - while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */ - offset_2 = offset_1; offset_1 = (U32)OFFBASE_TO_OFFSET(offBase); - } - - /* store sequence */ -_storeSequence: - { size_t const litLength = (size_t)(start - anchor); - ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offBase, matchLength); - anchor = ip = start + matchLength; - } - if (ms->lazySkipping) { - /* We've found a match, disable lazy skipping mode, and refill the hash cache. */ - if (searchMethod == search_rowHash) { - ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); - } - ms->lazySkipping = 0; - } - - /* check immediate repcode */ - while (ip <= ilimit) { - const U32 repCurrent = (U32)(ip-base); - const U32 windowLow = ZSTD_getLowestMatchIndex(ms, repCurrent, windowLog); - const U32 repIndex = repCurrent - offset_2; - const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; - const BYTE* const repMatch = repBase + repIndex; - if ( (ZSTD_index_overlap_check(dictLimit, repIndex)) - & (offset_2 <= repCurrent - windowLow) ) /* equivalent to `curr > repIndex >= windowLow` */ - if (MEM_read32(ip) == MEM_read32(repMatch)) { - /* repcode detected we should take it */ - const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; - matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; - offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap offset history */ - ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); - ip += matchLength; - anchor = ip; - continue; /* faster when present ... (?) */ - } - break; - } } - - /* Save reps for next block */ - rep[0] = offset_1; - rep[1] = offset_2; - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} -#endif /* build exclusions */ - -#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_greedy_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0); -} - -size_t ZSTD_compressBlock_greedy_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0); -} -#endif - -#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) - -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1); -} - -size_t ZSTD_compressBlock_lazy_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) - -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1); -} -#endif - -#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy2_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) - -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2); -} - -size_t ZSTD_compressBlock_lazy2_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btlazy2_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize) - -{ - return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2); -} -#endif diff --git a/third_party/zstd/lib/compress/zstd_lazy.h b/third_party/zstd/lib/compress/zstd_lazy.h deleted file mode 100644 index bd8dc49..0000000 --- a/third_party/zstd/lib/compress/zstd_lazy.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_LAZY_H -#define ZSTD_LAZY_H - -#include "zstd_compress_internal.h" - -/** - * Dedicated Dictionary Search Structure bucket log. In the - * ZSTD_dedicatedDictSearch mode, the hashTable has - * 2 ** ZSTD_LAZY_DDSS_BUCKET_LOG entries in each bucket, rather than just - * one. - */ -#define ZSTD_LAZY_DDSS_BUCKET_LOG 2 - -#define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */ - -#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) -U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip); -void ZSTD_row_update(ZSTD_MatchState_t* const ms, const BYTE* ip); - -void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_MatchState_t* ms, const BYTE* const ip); - -void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */ -#endif - -#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_greedy( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_greedy_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_GREEDY ZSTD_compressBlock_greedy -#define ZSTD_COMPRESSBLOCK_GREEDY_ROW ZSTD_compressBlock_greedy_row -#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE ZSTD_compressBlock_greedy_dictMatchState -#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW ZSTD_compressBlock_greedy_dictMatchState_row -#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH ZSTD_compressBlock_greedy_dedicatedDictSearch -#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_greedy_dedicatedDictSearch_row -#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT ZSTD_compressBlock_greedy_extDict -#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW ZSTD_compressBlock_greedy_extDict_row -#else -#define ZSTD_COMPRESSBLOCK_GREEDY NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_ROW NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT NULL -#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW NULL -#endif - -#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_LAZY ZSTD_compressBlock_lazy -#define ZSTD_COMPRESSBLOCK_LAZY_ROW ZSTD_compressBlock_lazy_row -#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE ZSTD_compressBlock_lazy_dictMatchState -#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy_dictMatchState_row -#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy_dedicatedDictSearch -#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy_dedicatedDictSearch_row -#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT ZSTD_compressBlock_lazy_extDict -#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW ZSTD_compressBlock_lazy_extDict_row -#else -#define ZSTD_COMPRESSBLOCK_LAZY NULL -#define ZSTD_COMPRESSBLOCK_LAZY_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH NULL -#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT NULL -#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW NULL -#endif - -#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_lazy2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_dictMatchState_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_lazy2_extDict_row( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_LAZY2 ZSTD_compressBlock_lazy2 -#define ZSTD_COMPRESSBLOCK_LAZY2_ROW ZSTD_compressBlock_lazy2_row -#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE ZSTD_compressBlock_lazy2_dictMatchState -#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy2_dictMatchState_row -#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy2_dedicatedDictSearch -#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy2_dedicatedDictSearch_row -#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT ZSTD_compressBlock_lazy2_extDict -#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW ZSTD_compressBlock_lazy2_extDict_row -#else -#define ZSTD_COMPRESSBLOCK_LAZY2 NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT NULL -#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW NULL -#endif - -#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btlazy2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btlazy2_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btlazy2_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_BTLAZY2 ZSTD_compressBlock_btlazy2 -#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE ZSTD_compressBlock_btlazy2_dictMatchState -#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT ZSTD_compressBlock_btlazy2_extDict -#else -#define ZSTD_COMPRESSBLOCK_BTLAZY2 NULL -#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT NULL -#endif - -#endif /* ZSTD_LAZY_H */ diff --git a/third_party/zstd/lib/compress/zstd_ldm.c b/third_party/zstd/lib/compress/zstd_ldm.c deleted file mode 100644 index 070551c..0000000 --- a/third_party/zstd/lib/compress/zstd_ldm.c +++ /dev/null @@ -1,745 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_ldm.h" - -#include "../common/debug.h" -#include "../common/xxhash.h" -#include "zstd_fast.h" /* ZSTD_fillHashTable() */ -#include "zstd_double_fast.h" /* ZSTD_fillDoubleHashTable() */ -#include "zstd_ldm_geartab.h" - -#define LDM_BUCKET_SIZE_LOG 4 -#define LDM_MIN_MATCH_LENGTH 64 -#define LDM_HASH_RLOG 7 - -typedef struct { - U64 rolling; - U64 stopMask; -} ldmRollingHashState_t; - -/** ZSTD_ldm_gear_init(): - * - * Initializes the rolling hash state such that it will honor the - * settings in params. */ -static void ZSTD_ldm_gear_init(ldmRollingHashState_t* state, ldmParams_t const* params) -{ - unsigned maxBitsInMask = MIN(params->minMatchLength, 64); - unsigned hashRateLog = params->hashRateLog; - - state->rolling = ~(U32)0; - - /* The choice of the splitting criterion is subject to two conditions: - * 1. it has to trigger on average every 2^(hashRateLog) bytes; - * 2. ideally, it has to depend on a window of minMatchLength bytes. - * - * In the gear hash algorithm, bit n depends on the last n bytes; - * so in order to obtain a good quality splitting criterion it is - * preferable to use bits with high weight. - * - * To match condition 1 we use a mask with hashRateLog bits set - * and, because of the previous remark, we make sure these bits - * have the highest possible weight while still respecting - * condition 2. - */ - if (hashRateLog > 0 && hashRateLog <= maxBitsInMask) { - state->stopMask = (((U64)1 << hashRateLog) - 1) << (maxBitsInMask - hashRateLog); - } else { - /* In this degenerate case we simply honor the hash rate. */ - state->stopMask = ((U64)1 << hashRateLog) - 1; - } -} - -/** ZSTD_ldm_gear_reset() - * Feeds [data, data + minMatchLength) into the hash without registering any - * splits. This effectively resets the hash state. This is used when skipping - * over data, either at the beginning of a block, or skipping sections. - */ -static void ZSTD_ldm_gear_reset(ldmRollingHashState_t* state, - BYTE const* data, size_t minMatchLength) -{ - U64 hash = state->rolling; - size_t n = 0; - -#define GEAR_ITER_ONCE() do { \ - hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \ - n += 1; \ - } while (0) - while (n + 3 < minMatchLength) { - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - } - while (n < minMatchLength) { - GEAR_ITER_ONCE(); - } -#undef GEAR_ITER_ONCE -} - -/** ZSTD_ldm_gear_feed(): - * - * Registers in the splits array all the split points found in the first - * size bytes following the data pointer. This function terminates when - * either all the data has been processed or LDM_BATCH_SIZE splits are - * present in the splits array. - * - * Precondition: The splits array must not be full. - * Returns: The number of bytes processed. */ -static size_t ZSTD_ldm_gear_feed(ldmRollingHashState_t* state, - BYTE const* data, size_t size, - size_t* splits, unsigned* numSplits) -{ - size_t n; - U64 hash, mask; - - hash = state->rolling; - mask = state->stopMask; - n = 0; - -#define GEAR_ITER_ONCE() do { \ - hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \ - n += 1; \ - if (UNLIKELY((hash & mask) == 0)) { \ - splits[*numSplits] = n; \ - *numSplits += 1; \ - if (*numSplits == LDM_BATCH_SIZE) \ - goto done; \ - } \ - } while (0) - - while (n + 3 < size) { - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - GEAR_ITER_ONCE(); - } - while (n < size) { - GEAR_ITER_ONCE(); - } - -#undef GEAR_ITER_ONCE - -done: - state->rolling = hash; - return n; -} - -void ZSTD_ldm_adjustParameters(ldmParams_t* params, - const ZSTD_compressionParameters* cParams) -{ - params->windowLog = cParams->windowLog; - ZSTD_STATIC_ASSERT(LDM_BUCKET_SIZE_LOG <= ZSTD_LDM_BUCKETSIZELOG_MAX); - DEBUGLOG(4, "ZSTD_ldm_adjustParameters"); - if (params->hashRateLog == 0) { - if (params->hashLog > 0) { - /* if params->hashLog is set, derive hashRateLog from it */ - assert(params->hashLog <= ZSTD_HASHLOG_MAX); - if (params->windowLog > params->hashLog) { - params->hashRateLog = params->windowLog - params->hashLog; - } - } else { - assert(1 <= (int)cParams->strategy && (int)cParams->strategy <= 9); - /* mapping from [fast, rate7] to [btultra2, rate4] */ - params->hashRateLog = 7 - (cParams->strategy/3); - } - } - if (params->hashLog == 0) { - params->hashLog = BOUNDED(ZSTD_HASHLOG_MIN, params->windowLog - params->hashRateLog, ZSTD_HASHLOG_MAX); - } - if (params->minMatchLength == 0) { - params->minMatchLength = LDM_MIN_MATCH_LENGTH; - if (cParams->strategy >= ZSTD_btultra) - params->minMatchLength /= 2; - } - if (params->bucketSizeLog==0) { - assert(1 <= (int)cParams->strategy && (int)cParams->strategy <= 9); - params->bucketSizeLog = BOUNDED(LDM_BUCKET_SIZE_LOG, (U32)cParams->strategy, ZSTD_LDM_BUCKETSIZELOG_MAX); - } - params->bucketSizeLog = MIN(params->bucketSizeLog, params->hashLog); -} - -size_t ZSTD_ldm_getTableSize(ldmParams_t params) -{ - size_t const ldmHSize = ((size_t)1) << params.hashLog; - size_t const ldmBucketSizeLog = MIN(params.bucketSizeLog, params.hashLog); - size_t const ldmBucketSize = ((size_t)1) << (params.hashLog - ldmBucketSizeLog); - size_t const totalSize = ZSTD_cwksp_alloc_size(ldmBucketSize) - + ZSTD_cwksp_alloc_size(ldmHSize * sizeof(ldmEntry_t)); - return params.enableLdm == ZSTD_ps_enable ? totalSize : 0; -} - -size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize) -{ - return params.enableLdm == ZSTD_ps_enable ? (maxChunkSize / params.minMatchLength) : 0; -} - -/** ZSTD_ldm_getBucket() : - * Returns a pointer to the start of the bucket associated with hash. */ -static ldmEntry_t* ZSTD_ldm_getBucket( - const ldmState_t* ldmState, size_t hash, U32 const bucketSizeLog) -{ - return ldmState->hashTable + (hash << bucketSizeLog); -} - -/** ZSTD_ldm_insertEntry() : - * Insert the entry with corresponding hash into the hash table */ -static void ZSTD_ldm_insertEntry(ldmState_t* ldmState, - size_t const hash, const ldmEntry_t entry, - U32 const bucketSizeLog) -{ - BYTE* const pOffset = ldmState->bucketOffsets + hash; - unsigned const offset = *pOffset; - - *(ZSTD_ldm_getBucket(ldmState, hash, bucketSizeLog) + offset) = entry; - *pOffset = (BYTE)((offset + 1) & ((1u << bucketSizeLog) - 1)); - -} - -/** ZSTD_ldm_countBackwardsMatch() : - * Returns the number of bytes that match backwards before pIn and pMatch. - * - * We count only bytes where pMatch >= pBase and pIn >= pAnchor. */ -static size_t ZSTD_ldm_countBackwardsMatch( - const BYTE* pIn, const BYTE* pAnchor, - const BYTE* pMatch, const BYTE* pMatchBase) -{ - size_t matchLength = 0; - while (pIn > pAnchor && pMatch > pMatchBase && pIn[-1] == pMatch[-1]) { - pIn--; - pMatch--; - matchLength++; - } - return matchLength; -} - -/** ZSTD_ldm_countBackwardsMatch_2segments() : - * Returns the number of bytes that match backwards from pMatch, - * even with the backwards match spanning 2 different segments. - * - * On reaching `pMatchBase`, start counting from mEnd */ -static size_t ZSTD_ldm_countBackwardsMatch_2segments( - const BYTE* pIn, const BYTE* pAnchor, - const BYTE* pMatch, const BYTE* pMatchBase, - const BYTE* pExtDictStart, const BYTE* pExtDictEnd) -{ - size_t matchLength = ZSTD_ldm_countBackwardsMatch(pIn, pAnchor, pMatch, pMatchBase); - if (pMatch - matchLength != pMatchBase || pMatchBase == pExtDictStart) { - /* If backwards match is entirely in the extDict or prefix, immediately return */ - return matchLength; - } - DEBUGLOG(7, "ZSTD_ldm_countBackwardsMatch_2segments: found 2-parts backwards match (length in prefix==%zu)", matchLength); - matchLength += ZSTD_ldm_countBackwardsMatch(pIn - matchLength, pAnchor, pExtDictEnd, pExtDictStart); - DEBUGLOG(7, "final backwards match length = %zu", matchLength); - return matchLength; -} - -/** ZSTD_ldm_fillFastTables() : - * - * Fills the relevant tables for the ZSTD_fast and ZSTD_dfast strategies. - * This is similar to ZSTD_loadDictionaryContent. - * - * The tables for the other strategies are filled within their - * block compressors. */ -static size_t ZSTD_ldm_fillFastTables(ZSTD_MatchState_t* ms, - void const* end) -{ - const BYTE* const iend = (const BYTE*)end; - - switch(ms->cParams.strategy) - { - case ZSTD_fast: - ZSTD_fillHashTable(ms, iend, ZSTD_dtlm_fast, ZSTD_tfp_forCCtx); - break; - - case ZSTD_dfast: -#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR - ZSTD_fillDoubleHashTable(ms, iend, ZSTD_dtlm_fast, ZSTD_tfp_forCCtx); -#else - assert(0); /* shouldn't be called: cparams should've been adjusted. */ -#endif - break; - - case ZSTD_greedy: - case ZSTD_lazy: - case ZSTD_lazy2: - case ZSTD_btlazy2: - case ZSTD_btopt: - case ZSTD_btultra: - case ZSTD_btultra2: - break; - default: - assert(0); /* not possible : not a valid strategy id */ - } - - return 0; -} - -void ZSTD_ldm_fillHashTable( - ldmState_t* ldmState, const BYTE* ip, - const BYTE* iend, ldmParams_t const* params) -{ - U32 const minMatchLength = params->minMatchLength; - U32 const bucketSizeLog = params->bucketSizeLog; - U32 const hBits = params->hashLog - bucketSizeLog; - BYTE const* const base = ldmState->window.base; - BYTE const* const istart = ip; - ldmRollingHashState_t hashState; - size_t* const splits = ldmState->splitIndices; - unsigned numSplits; - - DEBUGLOG(5, "ZSTD_ldm_fillHashTable"); - - ZSTD_ldm_gear_init(&hashState, params); - while (ip < iend) { - size_t hashed; - unsigned n; - - numSplits = 0; - hashed = ZSTD_ldm_gear_feed(&hashState, ip, (size_t)(iend - ip), splits, &numSplits); - - for (n = 0; n < numSplits; n++) { - if (ip + splits[n] >= istart + minMatchLength) { - BYTE const* const split = ip + splits[n] - minMatchLength; - U64 const xxhash = XXH64(split, minMatchLength, 0); - U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); - ldmEntry_t entry; - - entry.offset = (U32)(split - base); - entry.checksum = (U32)(xxhash >> 32); - ZSTD_ldm_insertEntry(ldmState, hash, entry, params->bucketSizeLog); - } - } - - ip += hashed; - } -} - - -/** ZSTD_ldm_limitTableUpdate() : - * - * Sets cctx->nextToUpdate to a position corresponding closer to anchor - * if it is far way - * (after a long match, only update tables a limited amount). */ -static void ZSTD_ldm_limitTableUpdate(ZSTD_MatchState_t* ms, const BYTE* anchor) -{ - U32 const curr = (U32)(anchor - ms->window.base); - if (curr > ms->nextToUpdate + 1024) { - ms->nextToUpdate = - curr - MIN(512, curr - ms->nextToUpdate - 1024); - } -} - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_ldm_generateSequences_internal( - ldmState_t* ldmState, RawSeqStore_t* rawSeqStore, - ldmParams_t const* params, void const* src, size_t srcSize) -{ - /* LDM parameters */ - int const extDict = ZSTD_window_hasExtDict(ldmState->window); - U32 const minMatchLength = params->minMatchLength; - U32 const entsPerBucket = 1U << params->bucketSizeLog; - U32 const hBits = params->hashLog - params->bucketSizeLog; - /* Prefix and extDict parameters */ - U32 const dictLimit = ldmState->window.dictLimit; - U32 const lowestIndex = extDict ? ldmState->window.lowLimit : dictLimit; - BYTE const* const base = ldmState->window.base; - BYTE const* const dictBase = extDict ? ldmState->window.dictBase : NULL; - BYTE const* const dictStart = extDict ? dictBase + lowestIndex : NULL; - BYTE const* const dictEnd = extDict ? dictBase + dictLimit : NULL; - BYTE const* const lowPrefixPtr = base + dictLimit; - /* Input bounds */ - BYTE const* const istart = (BYTE const*)src; - BYTE const* const iend = istart + srcSize; - BYTE const* const ilimit = iend - HASH_READ_SIZE; - /* Input positions */ - BYTE const* anchor = istart; - BYTE const* ip = istart; - /* Rolling hash state */ - ldmRollingHashState_t hashState; - /* Arrays for staged-processing */ - size_t* const splits = ldmState->splitIndices; - ldmMatchCandidate_t* const candidates = ldmState->matchCandidates; - unsigned numSplits; - - if (srcSize < minMatchLength) - return iend - anchor; - - /* Initialize the rolling hash state with the first minMatchLength bytes */ - ZSTD_ldm_gear_init(&hashState, params); - ZSTD_ldm_gear_reset(&hashState, ip, minMatchLength); - ip += minMatchLength; - - while (ip < ilimit) { - size_t hashed; - unsigned n; - - numSplits = 0; - hashed = ZSTD_ldm_gear_feed(&hashState, ip, ilimit - ip, - splits, &numSplits); - - for (n = 0; n < numSplits; n++) { - BYTE const* const split = ip + splits[n] - minMatchLength; - U64 const xxhash = XXH64(split, minMatchLength, 0); - U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); - - candidates[n].split = split; - candidates[n].hash = hash; - candidates[n].checksum = (U32)(xxhash >> 32); - candidates[n].bucket = ZSTD_ldm_getBucket(ldmState, hash, params->bucketSizeLog); - PREFETCH_L1(candidates[n].bucket); - } - - for (n = 0; n < numSplits; n++) { - size_t forwardMatchLength = 0, backwardMatchLength = 0, - bestMatchLength = 0, mLength; - U32 offset; - BYTE const* const split = candidates[n].split; - U32 const checksum = candidates[n].checksum; - U32 const hash = candidates[n].hash; - ldmEntry_t* const bucket = candidates[n].bucket; - ldmEntry_t const* cur; - ldmEntry_t const* bestEntry = NULL; - ldmEntry_t newEntry; - - newEntry.offset = (U32)(split - base); - newEntry.checksum = checksum; - - /* If a split point would generate a sequence overlapping with - * the previous one, we merely register it in the hash table and - * move on */ - if (split < anchor) { - ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); - continue; - } - - for (cur = bucket; cur < bucket + entsPerBucket; cur++) { - size_t curForwardMatchLength, curBackwardMatchLength, - curTotalMatchLength; - if (cur->checksum != checksum || cur->offset <= lowestIndex) { - continue; - } - if (extDict) { - BYTE const* const curMatchBase = - cur->offset < dictLimit ? dictBase : base; - BYTE const* const pMatch = curMatchBase + cur->offset; - BYTE const* const matchEnd = - cur->offset < dictLimit ? dictEnd : iend; - BYTE const* const lowMatchPtr = - cur->offset < dictLimit ? dictStart : lowPrefixPtr; - curForwardMatchLength = - ZSTD_count_2segments(split, pMatch, iend, matchEnd, lowPrefixPtr); - if (curForwardMatchLength < minMatchLength) { - continue; - } - curBackwardMatchLength = ZSTD_ldm_countBackwardsMatch_2segments( - split, anchor, pMatch, lowMatchPtr, dictStart, dictEnd); - } else { /* !extDict */ - BYTE const* const pMatch = base + cur->offset; - curForwardMatchLength = ZSTD_count(split, pMatch, iend); - if (curForwardMatchLength < minMatchLength) { - continue; - } - curBackwardMatchLength = - ZSTD_ldm_countBackwardsMatch(split, anchor, pMatch, lowPrefixPtr); - } - curTotalMatchLength = curForwardMatchLength + curBackwardMatchLength; - - if (curTotalMatchLength > bestMatchLength) { - bestMatchLength = curTotalMatchLength; - forwardMatchLength = curForwardMatchLength; - backwardMatchLength = curBackwardMatchLength; - bestEntry = cur; - } - } - - /* No match found -- insert an entry into the hash table - * and process the next candidate match */ - if (bestEntry == NULL) { - ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); - continue; - } - - /* Match found */ - offset = (U32)(split - base) - bestEntry->offset; - mLength = forwardMatchLength + backwardMatchLength; - { - rawSeq* const seq = rawSeqStore->seq + rawSeqStore->size; - - /* Out of sequence storage */ - if (rawSeqStore->size == rawSeqStore->capacity) - return ERROR(dstSize_tooSmall); - seq->litLength = (U32)(split - backwardMatchLength - anchor); - seq->matchLength = (U32)mLength; - seq->offset = offset; - rawSeqStore->size++; - } - - /* Insert the current entry into the hash table --- it must be - * done after the previous block to avoid clobbering bestEntry */ - ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); - - anchor = split + forwardMatchLength; - - /* If we find a match that ends after the data that we've hashed - * then we have a repeating, overlapping, pattern. E.g. all zeros. - * If one repetition of the pattern matches our `stopMask` then all - * repetitions will. We don't need to insert them all into out table, - * only the first one. So skip over overlapping matches. - * This is a major speed boost (20x) for compressing a single byte - * repeated, when that byte ends up in the table. - */ - if (anchor > ip + hashed) { - ZSTD_ldm_gear_reset(&hashState, anchor - minMatchLength, minMatchLength); - /* Continue the outer loop at anchor (ip + hashed == anchor). */ - ip = anchor - hashed; - break; - } - } - - ip += hashed; - } - - return iend - anchor; -} - -/*! ZSTD_ldm_reduceTable() : - * reduce table indexes by `reducerValue` */ -static void ZSTD_ldm_reduceTable(ldmEntry_t* const table, U32 const size, - U32 const reducerValue) -{ - U32 u; - for (u = 0; u < size; u++) { - if (table[u].offset < reducerValue) table[u].offset = 0; - else table[u].offset -= reducerValue; - } -} - -size_t ZSTD_ldm_generateSequences( - ldmState_t* ldmState, RawSeqStore_t* sequences, - ldmParams_t const* params, void const* src, size_t srcSize) -{ - U32 const maxDist = 1U << params->windowLog; - BYTE const* const istart = (BYTE const*)src; - BYTE const* const iend = istart + srcSize; - size_t const kMaxChunkSize = 1 << 20; - size_t const nbChunks = (srcSize / kMaxChunkSize) + ((srcSize % kMaxChunkSize) != 0); - size_t chunk; - size_t leftoverSize = 0; - - assert(ZSTD_CHUNKSIZE_MAX >= kMaxChunkSize); - /* Check that ZSTD_window_update() has been called for this chunk prior - * to passing it to this function. - */ - assert(ldmState->window.nextSrc >= (BYTE const*)src + srcSize); - /* The input could be very large (in zstdmt), so it must be broken up into - * chunks to enforce the maximum distance and handle overflow correction. - */ - assert(sequences->pos <= sequences->size); - assert(sequences->size <= sequences->capacity); - for (chunk = 0; chunk < nbChunks && sequences->size < sequences->capacity; ++chunk) { - BYTE const* const chunkStart = istart + chunk * kMaxChunkSize; - size_t const remaining = (size_t)(iend - chunkStart); - BYTE const *const chunkEnd = - (remaining < kMaxChunkSize) ? iend : chunkStart + kMaxChunkSize; - size_t const chunkSize = chunkEnd - chunkStart; - size_t newLeftoverSize; - size_t const prevSize = sequences->size; - - assert(chunkStart < iend); - /* 1. Perform overflow correction if necessary. */ - if (ZSTD_window_needOverflowCorrection(ldmState->window, 0, maxDist, ldmState->loadedDictEnd, chunkStart, chunkEnd)) { - U32 const ldmHSize = 1U << params->hashLog; - U32 const correction = ZSTD_window_correctOverflow( - &ldmState->window, /* cycleLog */ 0, maxDist, chunkStart); - ZSTD_ldm_reduceTable(ldmState->hashTable, ldmHSize, correction); - /* invalidate dictionaries on overflow correction */ - ldmState->loadedDictEnd = 0; - } - /* 2. We enforce the maximum offset allowed. - * - * kMaxChunkSize should be small enough that we don't lose too much of - * the window through early invalidation. - * TODO: * Test the chunk size. - * * Try invalidation after the sequence generation and test the - * offset against maxDist directly. - * - * NOTE: Because of dictionaries + sequence splitting we MUST make sure - * that any offset used is valid at the END of the sequence, since it may - * be split into two sequences. This condition holds when using - * ZSTD_window_enforceMaxDist(), but if we move to checking offsets - * against maxDist directly, we'll have to carefully handle that case. - */ - ZSTD_window_enforceMaxDist(&ldmState->window, chunkEnd, maxDist, &ldmState->loadedDictEnd, NULL); - /* 3. Generate the sequences for the chunk, and get newLeftoverSize. */ - newLeftoverSize = ZSTD_ldm_generateSequences_internal( - ldmState, sequences, params, chunkStart, chunkSize); - if (ZSTD_isError(newLeftoverSize)) - return newLeftoverSize; - /* 4. We add the leftover literals from previous iterations to the first - * newly generated sequence, or add the `newLeftoverSize` if none are - * generated. - */ - /* Prepend the leftover literals from the last call */ - if (prevSize < sequences->size) { - sequences->seq[prevSize].litLength += (U32)leftoverSize; - leftoverSize = newLeftoverSize; - } else { - assert(newLeftoverSize == chunkSize); - leftoverSize += chunkSize; - } - } - return 0; -} - -void -ZSTD_ldm_skipSequences(RawSeqStore_t* rawSeqStore, size_t srcSize, U32 const minMatch) -{ - while (srcSize > 0 && rawSeqStore->pos < rawSeqStore->size) { - rawSeq* seq = rawSeqStore->seq + rawSeqStore->pos; - if (srcSize <= seq->litLength) { - /* Skip past srcSize literals */ - seq->litLength -= (U32)srcSize; - return; - } - srcSize -= seq->litLength; - seq->litLength = 0; - if (srcSize < seq->matchLength) { - /* Skip past the first srcSize of the match */ - seq->matchLength -= (U32)srcSize; - if (seq->matchLength < minMatch) { - /* The match is too short, omit it */ - if (rawSeqStore->pos + 1 < rawSeqStore->size) { - seq[1].litLength += seq[0].matchLength; - } - rawSeqStore->pos++; - } - return; - } - srcSize -= seq->matchLength; - seq->matchLength = 0; - rawSeqStore->pos++; - } -} - -/** - * If the sequence length is longer than remaining then the sequence is split - * between this block and the next. - * - * Returns the current sequence to handle, or if the rest of the block should - * be literals, it returns a sequence with offset == 0. - */ -static rawSeq maybeSplitSequence(RawSeqStore_t* rawSeqStore, - U32 const remaining, U32 const minMatch) -{ - rawSeq sequence = rawSeqStore->seq[rawSeqStore->pos]; - assert(sequence.offset > 0); - /* Likely: No partial sequence */ - if (remaining >= sequence.litLength + sequence.matchLength) { - rawSeqStore->pos++; - return sequence; - } - /* Cut the sequence short (offset == 0 ==> rest is literals). */ - if (remaining <= sequence.litLength) { - sequence.offset = 0; - } else if (remaining < sequence.litLength + sequence.matchLength) { - sequence.matchLength = remaining - sequence.litLength; - if (sequence.matchLength < minMatch) { - sequence.offset = 0; - } - } - /* Skip past `remaining` bytes for the future sequences. */ - ZSTD_ldm_skipSequences(rawSeqStore, remaining, minMatch); - return sequence; -} - -void ZSTD_ldm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes) { - U32 currPos = (U32)(rawSeqStore->posInSequence + nbBytes); - while (currPos && rawSeqStore->pos < rawSeqStore->size) { - rawSeq currSeq = rawSeqStore->seq[rawSeqStore->pos]; - if (currPos >= currSeq.litLength + currSeq.matchLength) { - currPos -= currSeq.litLength + currSeq.matchLength; - rawSeqStore->pos++; - } else { - rawSeqStore->posInSequence = currPos; - break; - } - } - if (currPos == 0 || rawSeqStore->pos == rawSeqStore->size) { - rawSeqStore->posInSequence = 0; - } -} - -size_t ZSTD_ldm_blockCompress(RawSeqStore_t* rawSeqStore, - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - ZSTD_ParamSwitch_e useRowMatchFinder, - void const* src, size_t srcSize) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - unsigned const minMatch = cParams->minMatch; - ZSTD_BlockCompressor_f const blockCompressor = - ZSTD_selectBlockCompressor(cParams->strategy, useRowMatchFinder, ZSTD_matchState_dictMode(ms)); - /* Input bounds */ - BYTE const* const istart = (BYTE const*)src; - BYTE const* const iend = istart + srcSize; - /* Input positions */ - BYTE const* ip = istart; - - DEBUGLOG(5, "ZSTD_ldm_blockCompress: srcSize=%zu", srcSize); - /* If using opt parser, use LDMs only as candidates rather than always accepting them */ - if (cParams->strategy >= ZSTD_btopt) { - size_t lastLLSize; - ms->ldmSeqStore = rawSeqStore; - lastLLSize = blockCompressor(ms, seqStore, rep, src, srcSize); - ZSTD_ldm_skipRawSeqStoreBytes(rawSeqStore, srcSize); - return lastLLSize; - } - - assert(rawSeqStore->pos <= rawSeqStore->size); - assert(rawSeqStore->size <= rawSeqStore->capacity); - /* Loop through each sequence and apply the block compressor to the literals */ - while (rawSeqStore->pos < rawSeqStore->size && ip < iend) { - /* maybeSplitSequence updates rawSeqStore->pos */ - rawSeq const sequence = maybeSplitSequence(rawSeqStore, - (U32)(iend - ip), minMatch); - /* End signal */ - if (sequence.offset == 0) - break; - - assert(ip + sequence.litLength + sequence.matchLength <= iend); - - /* Fill tables for block compressor */ - ZSTD_ldm_limitTableUpdate(ms, ip); - ZSTD_ldm_fillFastTables(ms, ip); - /* Run the block compressor */ - DEBUGLOG(5, "pos %u : calling block compressor on segment of size %u", (unsigned)(ip-istart), sequence.litLength); - { - int i; - size_t const newLitLength = - blockCompressor(ms, seqStore, rep, ip, sequence.litLength); - ip += sequence.litLength; - /* Update the repcodes */ - for (i = ZSTD_REP_NUM - 1; i > 0; i--) - rep[i] = rep[i-1]; - rep[0] = sequence.offset; - /* Store the sequence */ - ZSTD_storeSeq(seqStore, newLitLength, ip - newLitLength, iend, - OFFSET_TO_OFFBASE(sequence.offset), - sequence.matchLength); - ip += sequence.matchLength; - } - } - /* Fill the tables for the block compressor */ - ZSTD_ldm_limitTableUpdate(ms, ip); - ZSTD_ldm_fillFastTables(ms, ip); - /* Compress the last literals */ - return blockCompressor(ms, seqStore, rep, ip, iend - ip); -} diff --git a/third_party/zstd/lib/compress/zstd_ldm.h b/third_party/zstd/lib/compress/zstd_ldm.h deleted file mode 100644 index 4273623..0000000 --- a/third_party/zstd/lib/compress/zstd_ldm.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_LDM_H -#define ZSTD_LDM_H - -#include "zstd_compress_internal.h" /* ldmParams_t, U32 */ -#include "../zstd.h" /* ZSTD_CCtx, size_t */ - -/*-************************************* -* Long distance matching -***************************************/ - -#define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDOWLOG_LIMIT_DEFAULT - -void ZSTD_ldm_fillHashTable( - ldmState_t* state, const BYTE* ip, - const BYTE* iend, ldmParams_t const* params); - -/** - * ZSTD_ldm_generateSequences(): - * - * Generates the sequences using the long distance match finder. - * Generates long range matching sequences in `sequences`, which parse a prefix - * of the source. `sequences` must be large enough to store every sequence, - * which can be checked with `ZSTD_ldm_getMaxNbSeq()`. - * @returns 0 or an error code. - * - * NOTE: The user must have called ZSTD_window_update() for all of the input - * they have, even if they pass it to ZSTD_ldm_generateSequences() in chunks. - * NOTE: This function returns an error if it runs out of space to store - * sequences. - */ -size_t ZSTD_ldm_generateSequences( - ldmState_t* ldms, RawSeqStore_t* sequences, - ldmParams_t const* params, void const* src, size_t srcSize); - -/** - * ZSTD_ldm_blockCompress(): - * - * Compresses a block using the predefined sequences, along with a secondary - * block compressor. The literals section of every sequence is passed to the - * secondary block compressor, and those sequences are interspersed with the - * predefined sequences. Returns the length of the last literals. - * Updates `rawSeqStore.pos` to indicate how many sequences have been consumed. - * `rawSeqStore.seq` may also be updated to split the last sequence between two - * blocks. - * @return The length of the last literals. - * - * NOTE: The source must be at most the maximum block size, but the predefined - * sequences can be any size, and may be longer than the block. In the case that - * they are longer than the block, the last sequences may need to be split into - * two. We handle that case correctly, and update `rawSeqStore` appropriately. - * NOTE: This function does not return any errors. - */ -size_t ZSTD_ldm_blockCompress(RawSeqStore_t* rawSeqStore, - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - ZSTD_ParamSwitch_e useRowMatchFinder, - void const* src, size_t srcSize); - -/** - * ZSTD_ldm_skipSequences(): - * - * Skip past `srcSize` bytes worth of sequences in `rawSeqStore`. - * Avoids emitting matches less than `minMatch` bytes. - * Must be called for data that is not passed to ZSTD_ldm_blockCompress(). - */ -void ZSTD_ldm_skipSequences(RawSeqStore_t* rawSeqStore, size_t srcSize, - U32 const minMatch); - -/* ZSTD_ldm_skipRawSeqStoreBytes(): - * Moves forward in rawSeqStore by nbBytes, updating fields 'pos' and 'posInSequence'. - * Not to be used in conjunction with ZSTD_ldm_skipSequences(). - * Must be called for data with is not passed to ZSTD_ldm_blockCompress(). - */ -void ZSTD_ldm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes); - -/** ZSTD_ldm_getTableSize() : - * Estimate the space needed for long distance matching tables or 0 if LDM is - * disabled. - */ -size_t ZSTD_ldm_getTableSize(ldmParams_t params); - -/** ZSTD_ldm_getSeqSpace() : - * Return an upper bound on the number of sequences that can be produced by - * the long distance matcher, or 0 if LDM is disabled. - */ -size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize); - -/** ZSTD_ldm_adjustParameters() : - * If the params->hashRateLog is not set, set it to its default value based on - * windowLog and params->hashLog. - * - * Ensures that params->bucketSizeLog is <= params->hashLog (setting it to - * params->hashLog if it is not). - * - * Ensures that the minMatchLength >= targetLength during optimal parsing. - */ -void ZSTD_ldm_adjustParameters(ldmParams_t* params, - ZSTD_compressionParameters const* cParams); - -#endif /* ZSTD_FAST_H */ diff --git a/third_party/zstd/lib/compress/zstd_ldm_geartab.h b/third_party/zstd/lib/compress/zstd_ldm_geartab.h deleted file mode 100644 index ef34bc5..0000000 --- a/third_party/zstd/lib/compress/zstd_ldm_geartab.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_LDM_GEARTAB_H -#define ZSTD_LDM_GEARTAB_H - -#include "../common/compiler.h" /* UNUSED_ATTR */ -#include "../common/mem.h" /* U64 */ - -static UNUSED_ATTR const U64 ZSTD_ldm_gearTab[256] = { - 0xf5b8f72c5f77775c, 0x84935f266b7ac412, 0xb647ada9ca730ccc, - 0xb065bb4b114fb1de, 0x34584e7e8c3a9fd0, 0x4e97e17c6ae26b05, - 0x3a03d743bc99a604, 0xcecd042422c4044f, 0x76de76c58524259e, - 0x9c8528f65badeaca, 0x86563706e2097529, 0x2902475fa375d889, - 0xafb32a9739a5ebe6, 0xce2714da3883e639, 0x21eaf821722e69e, - 0x37b628620b628, 0x49a8d455d88caf5, 0x8556d711e6958140, - 0x4f7ae74fc605c1f, 0x829f0c3468bd3a20, 0x4ffdc885c625179e, - 0x8473de048a3daf1b, 0x51008822b05646b2, 0x69d75d12b2d1cc5f, - 0x8c9d4a19159154bc, 0xc3cc10f4abbd4003, 0xd06ddc1cecb97391, - 0xbe48e6e7ed80302e, 0x3481db31cee03547, 0xacc3f67cdaa1d210, - 0x65cb771d8c7f96cc, 0x8eb27177055723dd, 0xc789950d44cd94be, - 0x934feadc3700b12b, 0x5e485f11edbdf182, 0x1e2e2a46fd64767a, - 0x2969ca71d82efa7c, 0x9d46e9935ebbba2e, 0xe056b67e05e6822b, - 0x94d73f55739d03a0, 0xcd7010bdb69b5a03, 0x455ef9fcd79b82f4, - 0x869cb54a8749c161, 0x38d1a4fa6185d225, 0xb475166f94bbe9bb, - 0xa4143548720959f1, 0x7aed4780ba6b26ba, 0xd0ce264439e02312, - 0x84366d746078d508, 0xa8ce973c72ed17be, 0x21c323a29a430b01, - 0x9962d617e3af80ee, 0xab0ce91d9c8cf75b, 0x530e8ee6d19a4dbc, - 0x2ef68c0cf53f5d72, 0xc03a681640a85506, 0x496e4e9f9c310967, - 0x78580472b59b14a0, 0x273824c23b388577, 0x66bf923ad45cb553, - 0x47ae1a5a2492ba86, 0x35e304569e229659, 0x4765182a46870b6f, - 0x6cbab625e9099412, 0xddac9a2e598522c1, 0x7172086e666624f2, - 0xdf5003ca503b7837, 0x88c0c1db78563d09, 0x58d51865acfc289d, - 0x177671aec65224f1, 0xfb79d8a241e967d7, 0x2be1e101cad9a49a, - 0x6625682f6e29186b, 0x399553457ac06e50, 0x35dffb4c23abb74, - 0x429db2591f54aade, 0xc52802a8037d1009, 0x6acb27381f0b25f3, - 0xf45e2551ee4f823b, 0x8b0ea2d99580c2f7, 0x3bed519cbcb4e1e1, - 0xff452823dbb010a, 0x9d42ed614f3dd267, 0x5b9313c06257c57b, - 0xa114b8008b5e1442, 0xc1fe311c11c13d4b, 0x66e8763ea34c5568, - 0x8b982af1c262f05d, 0xee8876faaa75fbb7, 0x8a62a4d0d172bb2a, - 0xc13d94a3b7449a97, 0x6dbbba9dc15d037c, 0xc786101f1d92e0f1, - 0xd78681a907a0b79b, 0xf61aaf2962c9abb9, 0x2cfd16fcd3cb7ad9, - 0x868c5b6744624d21, 0x25e650899c74ddd7, 0xba042af4a7c37463, - 0x4eb1a539465a3eca, 0xbe09dbf03b05d5ca, 0x774e5a362b5472ba, - 0x47a1221229d183cd, 0x504b0ca18ef5a2df, 0xdffbdfbde2456eb9, - 0x46cd2b2fbee34634, 0xf2aef8fe819d98c3, 0x357f5276d4599d61, - 0x24a5483879c453e3, 0x88026889192b4b9, 0x28da96671782dbec, - 0x4ef37c40588e9aaa, 0x8837b90651bc9fb3, 0xc164f741d3f0e5d6, - 0xbc135a0a704b70ba, 0x69cd868f7622ada, 0xbc37ba89e0b9c0ab, - 0x47c14a01323552f6, 0x4f00794bacee98bb, 0x7107de7d637a69d5, - 0x88af793bb6f2255e, 0xf3c6466b8799b598, 0xc288c616aa7f3b59, - 0x81ca63cf42fca3fd, 0x88d85ace36a2674b, 0xd056bd3792389e7, - 0xe55c396c4e9dd32d, 0xbefb504571e6c0a6, 0x96ab32115e91e8cc, - 0xbf8acb18de8f38d1, 0x66dae58801672606, 0x833b6017872317fb, - 0xb87c16f2d1c92864, 0xdb766a74e58b669c, 0x89659f85c61417be, - 0xc8daad856011ea0c, 0x76a4b565b6fe7eae, 0xa469d085f6237312, - 0xaaf0365683a3e96c, 0x4dbb746f8424f7b8, 0x638755af4e4acc1, - 0x3d7807f5bde64486, 0x17be6d8f5bbb7639, 0x903f0cd44dc35dc, - 0x67b672eafdf1196c, 0xa676ff93ed4c82f1, 0x521d1004c5053d9d, - 0x37ba9ad09ccc9202, 0x84e54d297aacfb51, 0xa0b4b776a143445, - 0x820d471e20b348e, 0x1874383cb83d46dc, 0x97edeec7a1efe11c, - 0xb330e50b1bdc42aa, 0x1dd91955ce70e032, 0xa514cdb88f2939d5, - 0x2791233fd90db9d3, 0x7b670a4cc50f7a9b, 0x77c07d2a05c6dfa5, - 0xe3778b6646d0a6fa, 0xb39c8eda47b56749, 0x933ed448addbef28, - 0xaf846af6ab7d0bf4, 0xe5af208eb666e49, 0x5e6622f73534cd6a, - 0x297daeca42ef5b6e, 0x862daef3d35539a6, 0xe68722498f8e1ea9, - 0x981c53093dc0d572, 0xfa09b0bfbf86fbf5, 0x30b1e96166219f15, - 0x70e7d466bdc4fb83, 0x5a66736e35f2a8e9, 0xcddb59d2b7c1baef, - 0xd6c7d247d26d8996, 0xea4e39eac8de1ba3, 0x539c8bb19fa3aff2, - 0x9f90e4c5fd508d8, 0xa34e5956fbaf3385, 0x2e2f8e151d3ef375, - 0x173691e9b83faec1, 0xb85a8d56bf016379, 0x8382381267408ae3, - 0xb90f901bbdc0096d, 0x7c6ad32933bcec65, 0x76bb5e2f2c8ad595, - 0x390f851a6cf46d28, 0xc3e6064da1c2da72, 0xc52a0c101cfa5389, - 0xd78eaf84a3fbc530, 0x3781b9e2288b997e, 0x73c2f6dea83d05c4, - 0x4228e364c5b5ed7, 0x9d7a3edf0da43911, 0x8edcfeda24686756, - 0x5e7667a7b7a9b3a1, 0x4c4f389fa143791d, 0xb08bc1023da7cddc, - 0x7ab4be3ae529b1cc, 0x754e6132dbe74ff9, 0x71635442a839df45, - 0x2f6fb1643fbe52de, 0x961e0a42cf7a8177, 0xf3b45d83d89ef2ea, - 0xee3de4cf4a6e3e9b, 0xcd6848542c3295e7, 0xe4cee1664c78662f, - 0x9947548b474c68c4, 0x25d73777a5ed8b0b, 0xc915b1d636b7fc, - 0x21c2ba75d9b0d2da, 0x5f6b5dcf608a64a1, 0xdcf333255ff9570c, - 0x633b922418ced4ee, 0xc136dde0b004b34a, 0x58cc83b05d4b2f5a, - 0x5eb424dda28e42d2, 0x62df47369739cd98, 0xb4e0b42485e4ce17, - 0x16e1f0c1f9a8d1e7, 0x8ec3916707560ebf, 0x62ba6e2df2cc9db3, - 0xcbf9f4ff77d83a16, 0x78d9d7d07d2bbcc4, 0xef554ce1e02c41f4, - 0x8d7581127eccf94d, 0xa9b53336cb3c8a05, 0x38c42c0bf45c4f91, - 0x640893cdf4488863, 0x80ec34bc575ea568, 0x39f324f5b48eaa40, - 0xe9d9ed1f8eff527f, 0x9224fc058cc5a214, 0xbaba00b04cfe7741, - 0x309a9f120fcf52af, 0xa558f3ec65626212, 0x424bec8b7adabe2f, - 0x41622513a6aea433, 0xb88da2d5324ca798, 0xd287733b245528a4, - 0x9a44697e6d68aec3, 0x7b1093be2f49bb28, 0x50bbec632e3d8aad, - 0x6cd90723e1ea8283, 0x897b9e7431b02bf3, 0x219efdcb338a7047, - 0x3b0311f0a27c0656, 0xdb17bf91c0db96e7, 0x8cd4fd6b4e85a5b2, - 0xfab071054ba6409d, 0x40d6fe831fa9dfd9, 0xaf358debad7d791e, - 0xeb8d0e25a65e3e58, 0xbbcbd3df14e08580, 0xcf751f27ecdab2b, - 0x2b4da14f2613d8f4 -}; - -#endif /* ZSTD_LDM_GEARTAB_H */ diff --git a/third_party/zstd/lib/compress/zstd_opt.c b/third_party/zstd/lib/compress/zstd_opt.c deleted file mode 100644 index 3d7171b..0000000 --- a/third_party/zstd/lib/compress/zstd_opt.c +++ /dev/null @@ -1,1580 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "zstd_compress_internal.h" -#include "hist.h" -#include "zstd_opt.h" - -#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) - -#define ZSTD_LITFREQ_ADD 2 /* scaling factor for litFreq, so that frequencies adapt faster to new stats */ -#define ZSTD_MAX_PRICE (1<<30) - -#define ZSTD_PREDEF_THRESHOLD 8 /* if srcSize < ZSTD_PREDEF_THRESHOLD, symbols' cost is assumed static, directly determined by pre-defined distributions */ - - -/*-************************************* -* Price functions for optimal parser -***************************************/ - -#if 0 /* approximation at bit level (for tests) */ -# define BITCOST_ACCURACY 0 -# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) -# define WEIGHT(stat, opt) ((void)(opt), ZSTD_bitWeight(stat)) -#elif 0 /* fractional bit accuracy (for tests) */ -# define BITCOST_ACCURACY 8 -# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) -# define WEIGHT(stat,opt) ((void)(opt), ZSTD_fracWeight(stat)) -#else /* opt==approx, ultra==accurate */ -# define BITCOST_ACCURACY 8 -# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) -# define WEIGHT(stat,opt) ((opt) ? ZSTD_fracWeight(stat) : ZSTD_bitWeight(stat)) -#endif - -/* ZSTD_bitWeight() : - * provide estimated "cost" of a stat in full bits only */ -MEM_STATIC U32 ZSTD_bitWeight(U32 stat) -{ - return (ZSTD_highbit32(stat+1) * BITCOST_MULTIPLIER); -} - -/* ZSTD_fracWeight() : - * provide fractional-bit "cost" of a stat, - * using linear interpolation approximation */ -MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) -{ - U32 const stat = rawStat + 1; - U32 const hb = ZSTD_highbit32(stat); - U32 const BWeight = hb * BITCOST_MULTIPLIER; - /* Fweight was meant for "Fractional weight" - * but it's effectively a value between 1 and 2 - * using fixed point arithmetic */ - U32 const FWeight = (stat << BITCOST_ACCURACY) >> hb; - U32 const weight = BWeight + FWeight; - assert(hb + BITCOST_ACCURACY < 31); - return weight; -} - -#if (DEBUGLEVEL>=2) -/* debugging function, - * @return price in bytes as fractional value - * for debug messages only */ -MEM_STATIC double ZSTD_fCost(int price) -{ - return (double)price / (BITCOST_MULTIPLIER*8); -} -#endif - -static int ZSTD_compressedLiterals(optState_t const* const optPtr) -{ - return optPtr->literalCompressionMode != ZSTD_ps_disable; -} - -static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) -{ - if (ZSTD_compressedLiterals(optPtr)) - optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); - optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); - optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); - optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); -} - - -static U32 sum_u32(const unsigned table[], size_t nbElts) -{ - size_t n; - U32 total = 0; - for (n=0; n0); - unsigned const newStat = base + (table[s] >> shift); - sum += newStat; - table[s] = newStat; - } - return sum; -} - -/* ZSTD_scaleStats() : - * reduce all elt frequencies in table if sum too large - * return the resulting sum of elements */ -static U32 ZSTD_scaleStats(unsigned* table, U32 lastEltIndex, U32 logTarget) -{ - U32 const prevsum = sum_u32(table, lastEltIndex+1); - U32 const factor = prevsum >> logTarget; - DEBUGLOG(5, "ZSTD_scaleStats (nbElts=%u, target=%u)", (unsigned)lastEltIndex+1, (unsigned)logTarget); - assert(logTarget < 30); - if (factor <= 1) return prevsum; - return ZSTD_downscaleStats(table, lastEltIndex, ZSTD_highbit32(factor), base_1guaranteed); -} - -/* ZSTD_rescaleFreqs() : - * if first block (detected by optPtr->litLengthSum == 0) : init statistics - * take hints from dictionary if there is one - * and init from zero if there is none, - * using src for literals stats, and baseline stats for sequence symbols - * otherwise downscale existing stats, to be used as seed for next block. - */ -static void -ZSTD_rescaleFreqs(optState_t* const optPtr, - const BYTE* const src, size_t const srcSize, - int const optLevel) -{ - int const compressedLiterals = ZSTD_compressedLiterals(optPtr); - DEBUGLOG(5, "ZSTD_rescaleFreqs (srcSize=%u)", (unsigned)srcSize); - optPtr->priceType = zop_dynamic; - - if (optPtr->litLengthSum == 0) { /* no literals stats collected -> first block assumed -> init */ - - /* heuristic: use pre-defined stats for too small inputs */ - if (srcSize <= ZSTD_PREDEF_THRESHOLD) { - DEBUGLOG(5, "srcSize <= %i : use predefined stats", ZSTD_PREDEF_THRESHOLD); - optPtr->priceType = zop_predef; - } - - assert(optPtr->symbolCosts != NULL); - if (optPtr->symbolCosts->huf.repeatMode == HUF_repeat_valid) { - - /* huffman stats covering the full value set : table presumed generated by dictionary */ - optPtr->priceType = zop_dynamic; - - if (compressedLiterals) { - /* generate literals statistics from huffman table */ - unsigned lit; - assert(optPtr->litFreq != NULL); - optPtr->litSum = 0; - for (lit=0; lit<=MaxLit; lit++) { - U32 const scaleLog = 11; /* scale to 2K */ - U32 const bitCost = HUF_getNbBitsFromCTable(optPtr->symbolCosts->huf.CTable, lit); - assert(bitCost <= scaleLog); - optPtr->litFreq[lit] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; - optPtr->litSum += optPtr->litFreq[lit]; - } } - - { unsigned ll; - FSE_CState_t llstate; - FSE_initCState(&llstate, optPtr->symbolCosts->fse.litlengthCTable); - optPtr->litLengthSum = 0; - for (ll=0; ll<=MaxLL; ll++) { - U32 const scaleLog = 10; /* scale to 1K */ - U32 const bitCost = FSE_getMaxNbBits(llstate.symbolTT, ll); - assert(bitCost < scaleLog); - optPtr->litLengthFreq[ll] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; - optPtr->litLengthSum += optPtr->litLengthFreq[ll]; - } } - - { unsigned ml; - FSE_CState_t mlstate; - FSE_initCState(&mlstate, optPtr->symbolCosts->fse.matchlengthCTable); - optPtr->matchLengthSum = 0; - for (ml=0; ml<=MaxML; ml++) { - U32 const scaleLog = 10; - U32 const bitCost = FSE_getMaxNbBits(mlstate.symbolTT, ml); - assert(bitCost < scaleLog); - optPtr->matchLengthFreq[ml] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; - optPtr->matchLengthSum += optPtr->matchLengthFreq[ml]; - } } - - { unsigned of; - FSE_CState_t ofstate; - FSE_initCState(&ofstate, optPtr->symbolCosts->fse.offcodeCTable); - optPtr->offCodeSum = 0; - for (of=0; of<=MaxOff; of++) { - U32 const scaleLog = 10; - U32 const bitCost = FSE_getMaxNbBits(ofstate.symbolTT, of); - assert(bitCost < scaleLog); - optPtr->offCodeFreq[of] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; - optPtr->offCodeSum += optPtr->offCodeFreq[of]; - } } - - } else { /* first block, no dictionary */ - - assert(optPtr->litFreq != NULL); - if (compressedLiterals) { - /* base initial cost of literals on direct frequency within src */ - unsigned lit = MaxLit; - HIST_count_simple(optPtr->litFreq, &lit, src, srcSize); /* use raw first block to init statistics */ - optPtr->litSum = ZSTD_downscaleStats(optPtr->litFreq, MaxLit, 8, base_0possible); - } - - { unsigned const baseLLfreqs[MaxLL+1] = { - 4, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1 - }; - ZSTD_memcpy(optPtr->litLengthFreq, baseLLfreqs, sizeof(baseLLfreqs)); - optPtr->litLengthSum = sum_u32(baseLLfreqs, MaxLL+1); - } - - { unsigned ml; - for (ml=0; ml<=MaxML; ml++) - optPtr->matchLengthFreq[ml] = 1; - } - optPtr->matchLengthSum = MaxML+1; - - { unsigned const baseOFCfreqs[MaxOff+1] = { - 6, 2, 1, 1, 2, 3, 4, 4, - 4, 3, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1 - }; - ZSTD_memcpy(optPtr->offCodeFreq, baseOFCfreqs, sizeof(baseOFCfreqs)); - optPtr->offCodeSum = sum_u32(baseOFCfreqs, MaxOff+1); - } - - } - - } else { /* new block : scale down accumulated statistics */ - - if (compressedLiterals) - optPtr->litSum = ZSTD_scaleStats(optPtr->litFreq, MaxLit, 12); - optPtr->litLengthSum = ZSTD_scaleStats(optPtr->litLengthFreq, MaxLL, 11); - optPtr->matchLengthSum = ZSTD_scaleStats(optPtr->matchLengthFreq, MaxML, 11); - optPtr->offCodeSum = ZSTD_scaleStats(optPtr->offCodeFreq, MaxOff, 11); - } - - ZSTD_setBasePrices(optPtr, optLevel); -} - -/* ZSTD_rawLiteralsCost() : - * price of literals (only) in specified segment (which length can be 0). - * does not include price of literalLength symbol */ -static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const litLength, - const optState_t* const optPtr, - int optLevel) -{ - DEBUGLOG(8, "ZSTD_rawLiteralsCost (%u literals)", litLength); - if (litLength == 0) return 0; - - if (!ZSTD_compressedLiterals(optPtr)) - return (litLength << 3) * BITCOST_MULTIPLIER; /* Uncompressed - 8 bytes per literal. */ - - if (optPtr->priceType == zop_predef) - return (litLength*6) * BITCOST_MULTIPLIER; /* 6 bit per literal - no statistic used */ - - /* dynamic statistics */ - { U32 price = optPtr->litSumBasePrice * litLength; - U32 const litPriceMax = optPtr->litSumBasePrice - BITCOST_MULTIPLIER; - U32 u; - assert(optPtr->litSumBasePrice >= BITCOST_MULTIPLIER); - for (u=0; u < litLength; u++) { - U32 litPrice = WEIGHT(optPtr->litFreq[literals[u]], optLevel); - if (UNLIKELY(litPrice > litPriceMax)) litPrice = litPriceMax; - price -= litPrice; - } - return price; - } -} - -/* ZSTD_litLengthPrice() : - * cost of literalLength symbol */ -static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) -{ - assert(litLength <= ZSTD_BLOCKSIZE_MAX); - if (optPtr->priceType == zop_predef) - return WEIGHT(litLength, optLevel); - - /* ZSTD_LLcode() can't compute litLength price for sizes >= ZSTD_BLOCKSIZE_MAX - * because it isn't representable in the zstd format. - * So instead just pretend it would cost 1 bit more than ZSTD_BLOCKSIZE_MAX - 1. - * In such a case, the block would be all literals. - */ - if (litLength == ZSTD_BLOCKSIZE_MAX) - return BITCOST_MULTIPLIER + ZSTD_litLengthPrice(ZSTD_BLOCKSIZE_MAX - 1, optPtr, optLevel); - - /* dynamic statistics */ - { U32 const llCode = ZSTD_LLcode(litLength); - return (LL_bits[llCode] * BITCOST_MULTIPLIER) - + optPtr->litLengthSumBasePrice - - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); - } -} - -/* ZSTD_getMatchPrice() : - * Provides the cost of the match part (offset + matchLength) of a sequence. - * Must be combined with ZSTD_fullLiteralsCost() to get the full cost of a sequence. - * @offBase : sumtype, representing an offset or a repcode, and using numeric representation of ZSTD_storeSeq() - * @optLevel: when <2, favors small offset for decompression speed (improved cache efficiency) - */ -FORCE_INLINE_TEMPLATE U32 -ZSTD_getMatchPrice(U32 const offBase, - U32 const matchLength, - const optState_t* const optPtr, - int const optLevel) -{ - U32 price; - U32 const offCode = ZSTD_highbit32(offBase); - U32 const mlBase = matchLength - MINMATCH; - assert(matchLength >= MINMATCH); - - if (optPtr->priceType == zop_predef) /* fixed scheme, does not use statistics */ - return WEIGHT(mlBase, optLevel) - + ((16 + offCode) * BITCOST_MULTIPLIER); /* emulated offset cost */ - - /* dynamic statistics */ - price = (offCode * BITCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); - if ((optLevel<2) /*static*/ && offCode >= 20) - price += (offCode-19)*2 * BITCOST_MULTIPLIER; /* handicap for long distance offsets, favor decompression speed */ - - /* match Length */ - { U32 const mlCode = ZSTD_MLcode(mlBase); - price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); - } - - price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less sequences -> faster decompression speed */ - - DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); - return price; -} - -/* ZSTD_updateStats() : - * assumption : literals + litLength <= iend */ -static void ZSTD_updateStats(optState_t* const optPtr, - U32 litLength, const BYTE* literals, - U32 offBase, U32 matchLength) -{ - /* literals */ - if (ZSTD_compressedLiterals(optPtr)) { - U32 u; - for (u=0; u < litLength; u++) - optPtr->litFreq[literals[u]] += ZSTD_LITFREQ_ADD; - optPtr->litSum += litLength*ZSTD_LITFREQ_ADD; - } - - /* literal Length */ - { U32 const llCode = ZSTD_LLcode(litLength); - optPtr->litLengthFreq[llCode]++; - optPtr->litLengthSum++; - } - - /* offset code : follows storeSeq() numeric representation */ - { U32 const offCode = ZSTD_highbit32(offBase); - assert(offCode <= MaxOff); - optPtr->offCodeFreq[offCode]++; - optPtr->offCodeSum++; - } - - /* match Length */ - { U32 const mlBase = matchLength - MINMATCH; - U32 const mlCode = ZSTD_MLcode(mlBase); - optPtr->matchLengthFreq[mlCode]++; - optPtr->matchLengthSum++; - } -} - - -/* ZSTD_readMINMATCH() : - * function safe only for comparisons - * assumption : memPtr must be at least 4 bytes before end of buffer */ -MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length) -{ - switch (length) - { - default : - case 4 : return MEM_read32(memPtr); - case 3 : if (MEM_isLittleEndian()) - return MEM_read32(memPtr)<<8; - else - return MEM_read32(memPtr)>>8; - } -} - - -/* Update hashTable3 up to ip (excluded) - Assumption : always within prefix (i.e. not within extDict) */ -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_insertAndFindFirstIndexHash3 (const ZSTD_MatchState_t* ms, - U32* nextToUpdate3, - const BYTE* const ip) -{ - U32* const hashTable3 = ms->hashTable3; - U32 const hashLog3 = ms->hashLog3; - const BYTE* const base = ms->window.base; - U32 idx = *nextToUpdate3; - U32 const target = (U32)(ip - base); - size_t const hash3 = ZSTD_hash3Ptr(ip, hashLog3); - assert(hashLog3 > 0); - - while(idx < target) { - hashTable3[ZSTD_hash3Ptr(base+idx, hashLog3)] = idx; - idx++; - } - - *nextToUpdate3 = target; - return hashTable3[hash3]; -} - - -/*-************************************* -* Binary Tree search -***************************************/ -/** ZSTD_insertBt1() : add one or multiple positions to tree. - * @param ip assumed <= iend-8 . - * @param target The target of ZSTD_updateTree_internal() - we are filling to this position - * @return : nb of positions added */ -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_insertBt1( - const ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iend, - U32 const target, - U32 const mls, const int extDict) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32* const hashTable = ms->hashTable; - U32 const hashLog = cParams->hashLog; - size_t const h = ZSTD_hashPtr(ip, hashLog, mls); - U32* const bt = ms->chainTable; - U32 const btLog = cParams->chainLog - 1; - U32 const btMask = (1 << btLog) - 1; - U32 matchIndex = hashTable[h]; - size_t commonLengthSmaller=0, commonLengthLarger=0; - const BYTE* const base = ms->window.base; - const BYTE* const dictBase = ms->window.dictBase; - const U32 dictLimit = ms->window.dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const prefixStart = base + dictLimit; - const BYTE* match; - const U32 curr = (U32)(ip-base); - const U32 btLow = btMask >= curr ? 0 : curr - btMask; - U32* smallerPtr = bt + 2*(curr&btMask); - U32* largerPtr = smallerPtr + 1; - U32 dummy32; /* to be nullified at the end */ - /* windowLow is based on target because - * we only need positions that will be in the window at the end of the tree update. - */ - U32 const windowLow = ZSTD_getLowestMatchIndex(ms, target, cParams->windowLog); - U32 matchEndIdx = curr+8+1; - size_t bestLength = 8; - U32 nbCompares = 1U << cParams->searchLog; -#ifdef ZSTD_C_PREDICT - U32 predictedSmall = *(bt + 2*((curr-1)&btMask) + 0); - U32 predictedLarge = *(bt + 2*((curr-1)&btMask) + 1); - predictedSmall += (predictedSmall>0); - predictedLarge += (predictedLarge>0); -#endif /* ZSTD_C_PREDICT */ - - DEBUGLOG(8, "ZSTD_insertBt1 (%u)", curr); - - assert(curr <= target); - assert(ip <= iend-8); /* required for h calculation */ - hashTable[h] = curr; /* Update Hash Table */ - - assert(windowLow > 0); - for (; nbCompares && (matchIndex >= windowLow); --nbCompares) { - U32* const nextPtr = bt + 2*(matchIndex & btMask); - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - assert(matchIndex < curr); - -#ifdef ZSTD_C_PREDICT /* note : can create issues when hlog small <= 11 */ - const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */ - if (matchIndex == predictedSmall) { - /* no need to check length, result known */ - *smallerPtr = matchIndex; - if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ - matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ - predictedSmall = predictPtr[1] + (predictPtr[1]>0); - continue; - } - if (matchIndex == predictedLarge) { - *largerPtr = matchIndex; - if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - largerPtr = nextPtr; - matchIndex = nextPtr[0]; - predictedLarge = predictPtr[0] + (predictPtr[0]>0); - continue; - } -#endif - - if (!extDict || (matchIndex+matchLength >= dictLimit)) { - assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ - match = base + matchIndex; - matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); - } else { - match = dictBase + matchIndex; - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); - if (matchIndex+matchLength >= dictLimit) - match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ - } - - if (matchLength > bestLength) { - bestLength = matchLength; - if (matchLength > matchEndIdx - matchIndex) - matchEndIdx = matchIndex + (U32)matchLength; - } - - if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ - break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt tree */ - } - - if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ - /* match is smaller than current */ - *smallerPtr = matchIndex; /* update smaller idx */ - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ - smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */ - matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */ - } else { - /* match is larger than current */ - *largerPtr = matchIndex; - commonLengthLarger = matchLength; - if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ - largerPtr = nextPtr; - matchIndex = nextPtr[0]; - } } - - *smallerPtr = *largerPtr = 0; - { U32 positions = 0; - if (bestLength > 384) positions = MIN(192, (U32)(bestLength - 384)); /* speed optimization */ - assert(matchEndIdx > curr + 8); - return MAX(positions, matchEndIdx - (curr + 8)); - } -} - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_updateTree_internal( - ZSTD_MatchState_t* ms, - const BYTE* const ip, const BYTE* const iend, - const U32 mls, const ZSTD_dictMode_e dictMode) -{ - const BYTE* const base = ms->window.base; - U32 const target = (U32)(ip - base); - U32 idx = ms->nextToUpdate; - DEBUGLOG(7, "ZSTD_updateTree_internal, from %u to %u (dictMode:%u)", - idx, target, dictMode); - - while(idx < target) { - U32 const forward = ZSTD_insertBt1(ms, base+idx, iend, target, mls, dictMode == ZSTD_extDict); - assert(idx < (U32)(idx + forward)); - idx += forward; - } - assert((size_t)(ip - base) <= (size_t)(U32)(-1)); - assert((size_t)(iend - base) <= (size_t)(U32)(-1)); - ms->nextToUpdate = target; -} - -void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend) { - ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.minMatch, ZSTD_noDict); -} - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 -ZSTD_insertBtAndGetAllMatches ( - ZSTD_match_t* matches, /* store result (found matches) in this table (presumed large enough) */ - ZSTD_MatchState_t* ms, - U32* nextToUpdate3, - const BYTE* const ip, const BYTE* const iLimit, - const ZSTD_dictMode_e dictMode, - const U32 rep[ZSTD_REP_NUM], - const U32 ll0, /* tells if associated literal length is 0 or not. This value must be 0 or 1 */ - const U32 lengthToBeat, - const U32 mls /* template */) -{ - const ZSTD_compressionParameters* const cParams = &ms->cParams; - U32 const sufficient_len = MIN(cParams->targetLength, ZSTD_OPT_NUM -1); - const BYTE* const base = ms->window.base; - U32 const curr = (U32)(ip-base); - U32 const hashLog = cParams->hashLog; - U32 const minMatch = (mls==3) ? 3 : 4; - U32* const hashTable = ms->hashTable; - size_t const h = ZSTD_hashPtr(ip, hashLog, mls); - U32 matchIndex = hashTable[h]; - U32* const bt = ms->chainTable; - U32 const btLog = cParams->chainLog - 1; - U32 const btMask= (1U << btLog) - 1; - size_t commonLengthSmaller=0, commonLengthLarger=0; - const BYTE* const dictBase = ms->window.dictBase; - U32 const dictLimit = ms->window.dictLimit; - const BYTE* const dictEnd = dictBase + dictLimit; - const BYTE* const prefixStart = base + dictLimit; - U32 const btLow = (btMask >= curr) ? 0 : curr - btMask; - U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); - U32 const matchLow = windowLow ? windowLow : 1; - U32* smallerPtr = bt + 2*(curr&btMask); - U32* largerPtr = bt + 2*(curr&btMask) + 1; - U32 matchEndIdx = curr+8+1; /* farthest referenced position of any match => detects repetitive patterns */ - U32 dummy32; /* to be nullified at the end */ - U32 mnum = 0; - U32 nbCompares = 1U << cParams->searchLog; - - const ZSTD_MatchState_t* dms = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL; - const ZSTD_compressionParameters* const dmsCParams = - dictMode == ZSTD_dictMatchState ? &dms->cParams : NULL; - const BYTE* const dmsBase = dictMode == ZSTD_dictMatchState ? dms->window.base : NULL; - const BYTE* const dmsEnd = dictMode == ZSTD_dictMatchState ? dms->window.nextSrc : NULL; - U32 const dmsHighLimit = dictMode == ZSTD_dictMatchState ? (U32)(dmsEnd - dmsBase) : 0; - U32 const dmsLowLimit = dictMode == ZSTD_dictMatchState ? dms->window.lowLimit : 0; - U32 const dmsIndexDelta = dictMode == ZSTD_dictMatchState ? windowLow - dmsHighLimit : 0; - U32 const dmsHashLog = dictMode == ZSTD_dictMatchState ? dmsCParams->hashLog : hashLog; - U32 const dmsBtLog = dictMode == ZSTD_dictMatchState ? dmsCParams->chainLog - 1 : btLog; - U32 const dmsBtMask = dictMode == ZSTD_dictMatchState ? (1U << dmsBtLog) - 1 : 0; - U32 const dmsBtLow = dictMode == ZSTD_dictMatchState && dmsBtMask < dmsHighLimit - dmsLowLimit ? dmsHighLimit - dmsBtMask : dmsLowLimit; - - size_t bestLength = lengthToBeat-1; - DEBUGLOG(8, "ZSTD_insertBtAndGetAllMatches: current=%u", curr); - - /* check repCode */ - assert(ll0 <= 1); /* necessarily 1 or 0 */ - { U32 const lastR = ZSTD_REP_NUM + ll0; - U32 repCode; - for (repCode = ll0; repCode < lastR; repCode++) { - U32 const repOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; - U32 const repIndex = curr - repOffset; - U32 repLen = 0; - assert(curr >= dictLimit); - if (repOffset-1 /* intentional overflow, discards 0 and -1 */ < curr-dictLimit) { /* equivalent to `curr > repIndex >= dictLimit` */ - /* We must validate the repcode offset because when we're using a dictionary the - * valid offset range shrinks when the dictionary goes out of bounds. - */ - if ((repIndex >= windowLow) & (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repOffset, minMatch))) { - repLen = (U32)ZSTD_count(ip+minMatch, ip+minMatch-repOffset, iLimit) + minMatch; - } - } else { /* repIndex < dictLimit || repIndex >= curr */ - const BYTE* const repMatch = dictMode == ZSTD_dictMatchState ? - dmsBase + repIndex - dmsIndexDelta : - dictBase + repIndex; - assert(curr >= windowLow); - if ( dictMode == ZSTD_extDict - && ( ((repOffset-1) /*intentional overflow*/ < curr - windowLow) /* equivalent to `curr > repIndex >= windowLow` */ - & (ZSTD_index_overlap_check(dictLimit, repIndex)) ) - && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) { - repLen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iLimit, dictEnd, prefixStart) + minMatch; - } - if (dictMode == ZSTD_dictMatchState - && ( ((repOffset-1) /*intentional overflow*/ < curr - (dmsLowLimit + dmsIndexDelta)) /* equivalent to `curr > repIndex >= dmsLowLimit` */ - & (ZSTD_index_overlap_check(dictLimit, repIndex)) ) - && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) { - repLen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iLimit, dmsEnd, prefixStart) + minMatch; - } } - /* save longer solution */ - if (repLen > bestLength) { - DEBUGLOG(8, "found repCode %u (ll0:%u, offset:%u) of length %u", - repCode, ll0, repOffset, repLen); - bestLength = repLen; - matches[mnum].off = REPCODE_TO_OFFBASE(repCode - ll0 + 1); /* expect value between 1 and 3 */ - matches[mnum].len = (U32)repLen; - mnum++; - if ( (repLen > sufficient_len) - | (ip+repLen == iLimit) ) { /* best possible */ - return mnum; - } } } } - - /* HC3 match finder */ - if ((mls == 3) /*static*/ && (bestLength < mls)) { - U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, nextToUpdate3, ip); - if ((matchIndex3 >= matchLow) - & (curr - matchIndex3 < (1<<18)) /*heuristic : longer distance likely too expensive*/ ) { - size_t mlen; - if ((dictMode == ZSTD_noDict) /*static*/ || (dictMode == ZSTD_dictMatchState) /*static*/ || (matchIndex3 >= dictLimit)) { - const BYTE* const match = base + matchIndex3; - mlen = ZSTD_count(ip, match, iLimit); - } else { - const BYTE* const match = dictBase + matchIndex3; - mlen = ZSTD_count_2segments(ip, match, iLimit, dictEnd, prefixStart); - } - - /* save best solution */ - if (mlen >= mls /* == 3 > bestLength */) { - DEBUGLOG(8, "found small match with hlog3, of length %u", - (U32)mlen); - bestLength = mlen; - assert(curr > matchIndex3); - assert(mnum==0); /* no prior solution */ - matches[0].off = OFFSET_TO_OFFBASE(curr - matchIndex3); - matches[0].len = (U32)mlen; - mnum = 1; - if ( (mlen > sufficient_len) | - (ip+mlen == iLimit) ) { /* best possible length */ - ms->nextToUpdate = curr+1; /* skip insertion */ - return 1; - } } } - /* no dictMatchState lookup: dicts don't have a populated HC3 table */ - } /* if (mls == 3) */ - - hashTable[h] = curr; /* Update Hash Table */ - - for (; nbCompares && (matchIndex >= matchLow); --nbCompares) { - U32* const nextPtr = bt + 2*(matchIndex & btMask); - const BYTE* match; - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - assert(curr > matchIndex); - - if ((dictMode == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= dictLimit)) { - assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ - match = base + matchIndex; - if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */ - matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit); - } else { - match = dictBase + matchIndex; - assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */ - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart); - if (matchIndex+matchLength >= dictLimit) - match = base + matchIndex; /* prepare for match[matchLength] read */ - } - - if (matchLength > bestLength) { - DEBUGLOG(8, "found match of length %u at distance %u (offBase=%u)", - (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); - assert(matchEndIdx > matchIndex); - if (matchLength > matchEndIdx - matchIndex) - matchEndIdx = matchIndex + (U32)matchLength; - bestLength = matchLength; - matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); - matches[mnum].len = (U32)matchLength; - mnum++; - if ( (matchLength > ZSTD_OPT_NUM) - | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { - if (dictMode == ZSTD_dictMatchState) nbCompares = 0; /* break should also skip searching dms */ - break; /* drop, to preserve bt consistency (miss a little bit of compression) */ - } } - - if (match[matchLength] < ip[matchLength]) { - /* match smaller than current */ - *smallerPtr = matchIndex; /* update smaller idx */ - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - smallerPtr = nextPtr+1; /* new candidate => larger than match, which was smaller than current */ - matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */ - } else { - *largerPtr = matchIndex; - commonLengthLarger = matchLength; - if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ - largerPtr = nextPtr; - matchIndex = nextPtr[0]; - } } - - *smallerPtr = *largerPtr = 0; - - assert(nbCompares <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ - if (dictMode == ZSTD_dictMatchState && nbCompares) { - size_t const dmsH = ZSTD_hashPtr(ip, dmsHashLog, mls); - U32 dictMatchIndex = dms->hashTable[dmsH]; - const U32* const dmsBt = dms->chainTable; - commonLengthSmaller = commonLengthLarger = 0; - for (; nbCompares && (dictMatchIndex > dmsLowLimit); --nbCompares) { - const U32* const nextPtr = dmsBt + 2*(dictMatchIndex & dmsBtMask); - size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ - const BYTE* match = dmsBase + dictMatchIndex; - matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart); - if (dictMatchIndex+matchLength >= dmsHighLimit) - match = base + dictMatchIndex + dmsIndexDelta; /* to prepare for next usage of match[matchLength] */ - - if (matchLength > bestLength) { - matchIndex = dictMatchIndex + dmsIndexDelta; - DEBUGLOG(8, "found dms match of length %u at distance %u (offBase=%u)", - (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); - if (matchLength > matchEndIdx - matchIndex) - matchEndIdx = matchIndex + (U32)matchLength; - bestLength = matchLength; - matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); - matches[mnum].len = (U32)matchLength; - mnum++; - if ( (matchLength > ZSTD_OPT_NUM) - | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { - break; /* drop, to guarantee consistency (miss a little bit of compression) */ - } } - - if (dictMatchIndex <= dmsBtLow) { break; } /* beyond tree size, stop the search */ - if (match[matchLength] < ip[matchLength]) { - commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ - dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ - } else { - /* match is larger than current */ - commonLengthLarger = matchLength; - dictMatchIndex = nextPtr[0]; - } } } /* if (dictMode == ZSTD_dictMatchState) */ - - assert(matchEndIdx > curr+8); - ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ - return mnum; -} - -typedef U32 (*ZSTD_getAllMatchesFn)( - ZSTD_match_t*, - ZSTD_MatchState_t*, - U32*, - const BYTE*, - const BYTE*, - const U32 rep[ZSTD_REP_NUM], - U32 const ll0, - U32 const lengthToBeat); - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -U32 ZSTD_btGetAllMatches_internal( - ZSTD_match_t* matches, - ZSTD_MatchState_t* ms, - U32* nextToUpdate3, - const BYTE* ip, - const BYTE* const iHighLimit, - const U32 rep[ZSTD_REP_NUM], - U32 const ll0, - U32 const lengthToBeat, - const ZSTD_dictMode_e dictMode, - const U32 mls) -{ - assert(BOUNDED(3, ms->cParams.minMatch, 6) == mls); - DEBUGLOG(8, "ZSTD_BtGetAllMatches(dictMode=%d, mls=%u)", (int)dictMode, mls); - if (ip < ms->window.base + ms->nextToUpdate) - return 0; /* skipped area */ - ZSTD_updateTree_internal(ms, ip, iHighLimit, mls, dictMode); - return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode, rep, ll0, lengthToBeat, mls); -} - -#define ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, mls) ZSTD_btGetAllMatches_##dictMode##_##mls - -#define GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, mls) \ - static U32 ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, mls)( \ - ZSTD_match_t* matches, \ - ZSTD_MatchState_t* ms, \ - U32* nextToUpdate3, \ - const BYTE* ip, \ - const BYTE* const iHighLimit, \ - const U32 rep[ZSTD_REP_NUM], \ - U32 const ll0, \ - U32 const lengthToBeat) \ - { \ - return ZSTD_btGetAllMatches_internal( \ - matches, ms, nextToUpdate3, ip, iHighLimit, \ - rep, ll0, lengthToBeat, ZSTD_##dictMode, mls); \ - } - -#define GEN_ZSTD_BT_GET_ALL_MATCHES(dictMode) \ - GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 3) \ - GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 4) \ - GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 5) \ - GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 6) - -GEN_ZSTD_BT_GET_ALL_MATCHES(noDict) -GEN_ZSTD_BT_GET_ALL_MATCHES(extDict) -GEN_ZSTD_BT_GET_ALL_MATCHES(dictMatchState) - -#define ZSTD_BT_GET_ALL_MATCHES_ARRAY(dictMode) \ - { \ - ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 3), \ - ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 4), \ - ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 5), \ - ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 6) \ - } - -static ZSTD_getAllMatchesFn -ZSTD_selectBtGetAllMatches(ZSTD_MatchState_t const* ms, ZSTD_dictMode_e const dictMode) -{ - ZSTD_getAllMatchesFn const getAllMatchesFns[3][4] = { - ZSTD_BT_GET_ALL_MATCHES_ARRAY(noDict), - ZSTD_BT_GET_ALL_MATCHES_ARRAY(extDict), - ZSTD_BT_GET_ALL_MATCHES_ARRAY(dictMatchState) - }; - U32 const mls = BOUNDED(3, ms->cParams.minMatch, 6); - assert((U32)dictMode < 3); - assert(mls - 3 < 4); - return getAllMatchesFns[(int)dictMode][mls - 3]; -} - -/************************* -* LDM helper functions * -*************************/ - -/* Struct containing info needed to make decision about ldm inclusion */ -typedef struct { - RawSeqStore_t seqStore; /* External match candidates store for this block */ - U32 startPosInBlock; /* Start position of the current match candidate */ - U32 endPosInBlock; /* End position of the current match candidate */ - U32 offset; /* Offset of the match candidate */ -} ZSTD_optLdm_t; - -/* ZSTD_optLdm_skipRawSeqStoreBytes(): - * Moves forward in @rawSeqStore by @nbBytes, - * which will update the fields 'pos' and 'posInSequence'. - */ -static void ZSTD_optLdm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes) -{ - U32 currPos = (U32)(rawSeqStore->posInSequence + nbBytes); - while (currPos && rawSeqStore->pos < rawSeqStore->size) { - rawSeq currSeq = rawSeqStore->seq[rawSeqStore->pos]; - if (currPos >= currSeq.litLength + currSeq.matchLength) { - currPos -= currSeq.litLength + currSeq.matchLength; - rawSeqStore->pos++; - } else { - rawSeqStore->posInSequence = currPos; - break; - } - } - if (currPos == 0 || rawSeqStore->pos == rawSeqStore->size) { - rawSeqStore->posInSequence = 0; - } -} - -/* ZSTD_opt_getNextMatchAndUpdateSeqStore(): - * Calculates the beginning and end of the next match in the current block. - * Updates 'pos' and 'posInSequence' of the ldmSeqStore. - */ -static void -ZSTD_opt_getNextMatchAndUpdateSeqStore(ZSTD_optLdm_t* optLdm, U32 currPosInBlock, - U32 blockBytesRemaining) -{ - rawSeq currSeq; - U32 currBlockEndPos; - U32 literalsBytesRemaining; - U32 matchBytesRemaining; - - /* Setting match end position to MAX to ensure we never use an LDM during this block */ - if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) { - optLdm->startPosInBlock = UINT_MAX; - optLdm->endPosInBlock = UINT_MAX; - return; - } - /* Calculate appropriate bytes left in matchLength and litLength - * after adjusting based on ldmSeqStore->posInSequence */ - currSeq = optLdm->seqStore.seq[optLdm->seqStore.pos]; - assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength); - currBlockEndPos = currPosInBlock + blockBytesRemaining; - literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ? - currSeq.litLength - (U32)optLdm->seqStore.posInSequence : - 0; - matchBytesRemaining = (literalsBytesRemaining == 0) ? - currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) : - currSeq.matchLength; - - /* If there are more literal bytes than bytes remaining in block, no ldm is possible */ - if (literalsBytesRemaining >= blockBytesRemaining) { - optLdm->startPosInBlock = UINT_MAX; - optLdm->endPosInBlock = UINT_MAX; - ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, blockBytesRemaining); - return; - } - - /* Matches may be < minMatch by this process. In that case, we will reject them - when we are deciding whether or not to add the ldm */ - optLdm->startPosInBlock = currPosInBlock + literalsBytesRemaining; - optLdm->endPosInBlock = optLdm->startPosInBlock + matchBytesRemaining; - optLdm->offset = currSeq.offset; - - if (optLdm->endPosInBlock > currBlockEndPos) { - /* Match ends after the block ends, we can't use the whole match */ - optLdm->endPosInBlock = currBlockEndPos; - ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, currBlockEndPos - currPosInBlock); - } else { - /* Consume nb of bytes equal to size of sequence left */ - ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, literalsBytesRemaining + matchBytesRemaining); - } -} - -/* ZSTD_optLdm_maybeAddMatch(): - * Adds a match if it's long enough, - * based on it's 'matchStartPosInBlock' and 'matchEndPosInBlock', - * into 'matches'. Maintains the correct ordering of 'matches'. - */ -static void ZSTD_optLdm_maybeAddMatch(ZSTD_match_t* matches, U32* nbMatches, - const ZSTD_optLdm_t* optLdm, U32 currPosInBlock, - U32 minMatch) -{ - U32 const posDiff = currPosInBlock - optLdm->startPosInBlock; - /* Note: ZSTD_match_t actually contains offBase and matchLength (before subtracting MINMATCH) */ - U32 const candidateMatchLength = optLdm->endPosInBlock - optLdm->startPosInBlock - posDiff; - - /* Ensure that current block position is not outside of the match */ - if (currPosInBlock < optLdm->startPosInBlock - || currPosInBlock >= optLdm->endPosInBlock - || candidateMatchLength < minMatch) { - return; - } - - if (*nbMatches == 0 || ((candidateMatchLength > matches[*nbMatches-1].len) && *nbMatches < ZSTD_OPT_NUM)) { - U32 const candidateOffBase = OFFSET_TO_OFFBASE(optLdm->offset); - DEBUGLOG(6, "ZSTD_optLdm_maybeAddMatch(): Adding ldm candidate match (offBase: %u matchLength %u) at block position=%u", - candidateOffBase, candidateMatchLength, currPosInBlock); - matches[*nbMatches].len = candidateMatchLength; - matches[*nbMatches].off = candidateOffBase; - (*nbMatches)++; - } -} - -/* ZSTD_optLdm_processMatchCandidate(): - * Wrapper function to update ldm seq store and call ldm functions as necessary. - */ -static void -ZSTD_optLdm_processMatchCandidate(ZSTD_optLdm_t* optLdm, - ZSTD_match_t* matches, U32* nbMatches, - U32 currPosInBlock, U32 remainingBytes, - U32 minMatch) -{ - if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) { - return; - } - - if (currPosInBlock >= optLdm->endPosInBlock) { - if (currPosInBlock > optLdm->endPosInBlock) { - /* The position at which ZSTD_optLdm_processMatchCandidate() is called is not necessarily - * at the end of a match from the ldm seq store, and will often be some bytes - * over beyond matchEndPosInBlock. As such, we need to correct for these "overshoots" - */ - U32 const posOvershoot = currPosInBlock - optLdm->endPosInBlock; - ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, posOvershoot); - } - ZSTD_opt_getNextMatchAndUpdateSeqStore(optLdm, currPosInBlock, remainingBytes); - } - ZSTD_optLdm_maybeAddMatch(matches, nbMatches, optLdm, currPosInBlock, minMatch); -} - - -/*-******************************* -* Optimal parser -*********************************/ - -#if 0 /* debug */ - -static void -listStats(const U32* table, int lastEltID) -{ - int const nbElts = lastEltID + 1; - int enb; - for (enb=0; enb < nbElts; enb++) { - (void)table; - /* RAWLOG(2, "%3i:%3i, ", enb, table[enb]); */ - RAWLOG(2, "%4i,", table[enb]); - } - RAWLOG(2, " \n"); -} - -#endif - -#define LIT_PRICE(_p) (int)ZSTD_rawLiteralsCost(_p, 1, optStatePtr, optLevel) -#define LL_PRICE(_l) (int)ZSTD_litLengthPrice(_l, optStatePtr, optLevel) -#define LL_INCPRICE(_l) (LL_PRICE(_l) - LL_PRICE(_l-1)) - -FORCE_INLINE_TEMPLATE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t -ZSTD_compressBlock_opt_generic(ZSTD_MatchState_t* ms, - SeqStore_t* seqStore, - U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize, - const int optLevel, - const ZSTD_dictMode_e dictMode) -{ - optState_t* const optStatePtr = &ms->opt; - const BYTE* const istart = (const BYTE*)src; - const BYTE* ip = istart; - const BYTE* anchor = istart; - const BYTE* const iend = istart + srcSize; - const BYTE* const ilimit = iend - 8; - const BYTE* const base = ms->window.base; - const BYTE* const prefixStart = base + ms->window.dictLimit; - const ZSTD_compressionParameters* const cParams = &ms->cParams; - - ZSTD_getAllMatchesFn getAllMatches = ZSTD_selectBtGetAllMatches(ms, dictMode); - - U32 const sufficient_len = MIN(cParams->targetLength, ZSTD_OPT_NUM -1); - U32 const minMatch = (cParams->minMatch == 3) ? 3 : 4; - U32 nextToUpdate3 = ms->nextToUpdate; - - ZSTD_optimal_t* const opt = optStatePtr->priceTable; - ZSTD_match_t* const matches = optStatePtr->matchTable; - ZSTD_optimal_t lastStretch; - ZSTD_optLdm_t optLdm; - - ZSTD_memset(&lastStretch, 0, sizeof(ZSTD_optimal_t)); - - optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore; - optLdm.endPosInBlock = optLdm.startPosInBlock = optLdm.offset = 0; - ZSTD_opt_getNextMatchAndUpdateSeqStore(&optLdm, (U32)(ip-istart), (U32)(iend-ip)); - - /* init */ - DEBUGLOG(5, "ZSTD_compressBlock_opt_generic: current=%u, prefix=%u, nextToUpdate=%u", - (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); - assert(optLevel <= 2); - ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); - ip += (ip==prefixStart); - - /* Match Loop */ - while (ip < ilimit) { - U32 cur, last_pos = 0; - - /* find first match */ - { U32 const litlen = (U32)(ip - anchor); - U32 const ll0 = !litlen; - U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, ip, iend, rep, ll0, minMatch); - ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches, - (U32)(ip-istart), (U32)(iend-ip), - minMatch); - if (!nbMatches) { - DEBUGLOG(8, "no match found at cPos %u", (unsigned)(ip-istart)); - ip++; - continue; - } - - /* Match found: let's store this solution, and eventually find more candidates. - * During this forward pass, @opt is used to store stretches, - * defined as "a match followed by N literals". - * Note how this is different from a Sequence, which is "N literals followed by a match". - * Storing stretches allows us to store different match predecessors - * for each literal position part of a literals run. */ - - /* initialize opt[0] */ - opt[0].mlen = 0; /* there are only literals so far */ - opt[0].litlen = litlen; - /* No need to include the actual price of the literals before the first match - * because it is static for the duration of the forward pass, and is included - * in every subsequent price. But, we include the literal length because - * the cost variation of litlen depends on the value of litlen. - */ - opt[0].price = LL_PRICE(litlen); - ZSTD_STATIC_ASSERT(sizeof(opt[0].rep[0]) == sizeof(rep[0])); - ZSTD_memcpy(&opt[0].rep, rep, sizeof(opt[0].rep)); - - /* large match -> immediate encoding */ - { U32 const maxML = matches[nbMatches-1].len; - U32 const maxOffBase = matches[nbMatches-1].off; - DEBUGLOG(6, "found %u matches of maxLength=%u and maxOffBase=%u at cPos=%u => start new series", - nbMatches, maxML, maxOffBase, (U32)(ip-prefixStart)); - - if (maxML > sufficient_len) { - lastStretch.litlen = 0; - lastStretch.mlen = maxML; - lastStretch.off = maxOffBase; - DEBUGLOG(6, "large match (%u>%u) => immediate encoding", - maxML, sufficient_len); - cur = 0; - last_pos = maxML; - goto _shortestPath; - } } - - /* set prices for first matches starting position == 0 */ - assert(opt[0].price >= 0); - { U32 pos; - U32 matchNb; - for (pos = 1; pos < minMatch; pos++) { - opt[pos].price = ZSTD_MAX_PRICE; - opt[pos].mlen = 0; - opt[pos].litlen = litlen + pos; - } - for (matchNb = 0; matchNb < nbMatches; matchNb++) { - U32 const offBase = matches[matchNb].off; - U32 const end = matches[matchNb].len; - for ( ; pos <= end ; pos++ ) { - int const matchPrice = (int)ZSTD_getMatchPrice(offBase, pos, optStatePtr, optLevel); - int const sequencePrice = opt[0].price + matchPrice; - DEBUGLOG(7, "rPos:%u => set initial price : %.2f", - pos, ZSTD_fCost(sequencePrice)); - opt[pos].mlen = pos; - opt[pos].off = offBase; - opt[pos].litlen = 0; /* end of match */ - opt[pos].price = sequencePrice + LL_PRICE(0); - } - } - last_pos = pos-1; - opt[pos].price = ZSTD_MAX_PRICE; - } - } - - /* check further positions */ - for (cur = 1; cur <= last_pos; cur++) { - const BYTE* const inr = ip + cur; - assert(cur <= ZSTD_OPT_NUM); - DEBUGLOG(7, "cPos:%i==rPos:%u", (int)(inr-istart), cur); - - /* Fix current position with one literal if cheaper */ - { U32 const litlen = opt[cur-1].litlen + 1; - int const price = opt[cur-1].price - + LIT_PRICE(ip+cur-1) - + LL_INCPRICE(litlen); - assert(price < 1000000000); /* overflow check */ - if (price <= opt[cur].price) { - ZSTD_optimal_t const prevMatch = opt[cur]; - DEBUGLOG(7, "cPos:%i==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)", - (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, - opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); - opt[cur] = opt[cur-1]; - opt[cur].litlen = litlen; - opt[cur].price = price; - if ( (optLevel >= 1) /* additional check only for higher modes */ - && (prevMatch.litlen == 0) /* replace a match */ - && (LL_INCPRICE(1) < 0) /* ll1 is cheaper than ll0 */ - && LIKELY(ip + cur < iend) - ) { - /* check next position, in case it would be cheaper */ - int with1literal = prevMatch.price + LIT_PRICE(ip+cur) + LL_INCPRICE(1); - int withMoreLiterals = price + LIT_PRICE(ip+cur) + LL_INCPRICE(litlen+1); - DEBUGLOG(7, "then at next rPos %u : match+1lit %.2f vs %ulits %.2f", - cur+1, ZSTD_fCost(with1literal), litlen+1, ZSTD_fCost(withMoreLiterals)); - if ( (with1literal < withMoreLiterals) - && (with1literal < opt[cur+1].price) ) { - /* update offset history - before it disappears */ - U32 const prev = cur - prevMatch.mlen; - Repcodes_t const newReps = ZSTD_newRep(opt[prev].rep, prevMatch.off, opt[prev].litlen==0); - assert(cur >= prevMatch.mlen); - DEBUGLOG(7, "==> match+1lit is cheaper (%.2f < %.2f) (hist:%u,%u,%u) !", - ZSTD_fCost(with1literal), ZSTD_fCost(withMoreLiterals), - newReps.rep[0], newReps.rep[1], newReps.rep[2] ); - opt[cur+1] = prevMatch; /* mlen & offbase */ - ZSTD_memcpy(opt[cur+1].rep, &newReps, sizeof(Repcodes_t)); - opt[cur+1].litlen = 1; - opt[cur+1].price = with1literal; - if (last_pos < cur+1) last_pos = cur+1; - } - } - } else { - DEBUGLOG(7, "cPos:%i==rPos:%u : literal would cost more (%.2f>%.2f)", - (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price)); - } - } - - /* Offset history is not updated during match comparison. - * Do it here, now that the match is selected and confirmed. - */ - ZSTD_STATIC_ASSERT(sizeof(opt[cur].rep) == sizeof(Repcodes_t)); - assert(cur >= opt[cur].mlen); - if (opt[cur].litlen == 0) { - /* just finished a match => alter offset history */ - U32 const prev = cur - opt[cur].mlen; - Repcodes_t const newReps = ZSTD_newRep(opt[prev].rep, opt[cur].off, opt[prev].litlen==0); - ZSTD_memcpy(opt[cur].rep, &newReps, sizeof(Repcodes_t)); - } - - /* last match must start at a minimum distance of 8 from oend */ - if (inr > ilimit) continue; - - if (cur == last_pos) break; - - if ( (optLevel==0) /*static_test*/ - && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { - DEBUGLOG(7, "skip current position : next rPos(%u) price is cheaper", cur+1); - continue; /* skip unpromising positions; about ~+6% speed, -0.01 ratio */ - } - - assert(opt[cur].price >= 0); - { U32 const ll0 = (opt[cur].litlen == 0); - int const previousPrice = opt[cur].price; - int const basePrice = previousPrice + LL_PRICE(0); - U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, inr, iend, opt[cur].rep, ll0, minMatch); - U32 matchNb; - - ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches, - (U32)(inr-istart), (U32)(iend-inr), - minMatch); - - if (!nbMatches) { - DEBUGLOG(7, "rPos:%u : no match found", cur); - continue; - } - - { U32 const longestML = matches[nbMatches-1].len; - DEBUGLOG(7, "cPos:%i==rPos:%u, found %u matches, of longest ML=%u", - (int)(inr-istart), cur, nbMatches, longestML); - - if ( (longestML > sufficient_len) - || (cur + longestML >= ZSTD_OPT_NUM) - || (ip + cur + longestML >= iend) ) { - lastStretch.mlen = longestML; - lastStretch.off = matches[nbMatches-1].off; - lastStretch.litlen = 0; - last_pos = cur + longestML; - goto _shortestPath; - } } - - /* set prices using matches found at position == cur */ - for (matchNb = 0; matchNb < nbMatches; matchNb++) { - U32 const offset = matches[matchNb].off; - U32 const lastML = matches[matchNb].len; - U32 const startML = (matchNb>0) ? matches[matchNb-1].len+1 : minMatch; - U32 mlen; - - DEBUGLOG(7, "testing match %u => offBase=%4u, mlen=%2u, llen=%2u", - matchNb, matches[matchNb].off, lastML, opt[cur].litlen); - - for (mlen = lastML; mlen >= startML; mlen--) { /* scan downward */ - U32 const pos = cur + mlen; - int const price = basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); - - if ((pos > last_pos) || (price < opt[pos].price)) { - DEBUGLOG(7, "rPos:%u (ml=%2u) => new better price (%.2f<%.2f)", - pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); - while (last_pos < pos) { - /* fill empty positions, for future comparisons */ - last_pos++; - opt[last_pos].price = ZSTD_MAX_PRICE; - opt[last_pos].litlen = !0; /* just needs to be != 0, to mean "not an end of match" */ - } - opt[pos].mlen = mlen; - opt[pos].off = offset; - opt[pos].litlen = 0; - opt[pos].price = price; - } else { - DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", - pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); - if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ - } - } } } - opt[last_pos+1].price = ZSTD_MAX_PRICE; - } /* for (cur = 1; cur <= last_pos; cur++) */ - - lastStretch = opt[last_pos]; - assert(cur >= lastStretch.mlen); - cur = last_pos - lastStretch.mlen; - -_shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ - assert(opt[0].mlen == 0); - assert(last_pos >= lastStretch.mlen); - assert(cur == last_pos - lastStretch.mlen); - - if (lastStretch.mlen==0) { - /* no solution : all matches have been converted into literals */ - assert(lastStretch.litlen == (ip - anchor) + last_pos); - ip += last_pos; - continue; - } - assert(lastStretch.off > 0); - - /* Update offset history */ - if (lastStretch.litlen == 0) { - /* finishing on a match : update offset history */ - Repcodes_t const reps = ZSTD_newRep(opt[cur].rep, lastStretch.off, opt[cur].litlen==0); - ZSTD_memcpy(rep, &reps, sizeof(Repcodes_t)); - } else { - ZSTD_memcpy(rep, lastStretch.rep, sizeof(Repcodes_t)); - assert(cur >= lastStretch.litlen); - cur -= lastStretch.litlen; - } - - /* Let's write the shortest path solution. - * It is stored in @opt in reverse order, - * starting from @storeEnd (==cur+2), - * effectively partially @opt overwriting. - * Content is changed too: - * - So far, @opt stored stretches, aka a match followed by literals - * - Now, it will store sequences, aka literals followed by a match - */ - { U32 const storeEnd = cur + 2; - U32 storeStart = storeEnd; - U32 stretchPos = cur; - - DEBUGLOG(6, "start reverse traversal (last_pos:%u, cur:%u)", - last_pos, cur); (void)last_pos; - assert(storeEnd < ZSTD_OPT_SIZE); - DEBUGLOG(6, "last stretch copied into pos=%u (llen=%u,mlen=%u,ofc=%u)", - storeEnd, lastStretch.litlen, lastStretch.mlen, lastStretch.off); - if (lastStretch.litlen > 0) { - /* last "sequence" is unfinished: just a bunch of literals */ - opt[storeEnd].litlen = lastStretch.litlen; - opt[storeEnd].mlen = 0; - storeStart = storeEnd-1; - opt[storeStart] = lastStretch; - } { - opt[storeEnd] = lastStretch; /* note: litlen will be fixed */ - storeStart = storeEnd; - } - while (1) { - ZSTD_optimal_t nextStretch = opt[stretchPos]; - opt[storeStart].litlen = nextStretch.litlen; - DEBUGLOG(6, "selected sequence (llen=%u,mlen=%u,ofc=%u)", - opt[storeStart].litlen, opt[storeStart].mlen, opt[storeStart].off); - if (nextStretch.mlen == 0) { - /* reaching beginning of segment */ - break; - } - storeStart--; - opt[storeStart] = nextStretch; /* note: litlen will be fixed */ - assert(nextStretch.litlen + nextStretch.mlen <= stretchPos); - stretchPos -= nextStretch.litlen + nextStretch.mlen; - } - - /* save sequences */ - DEBUGLOG(6, "sending selected sequences into seqStore"); - { U32 storePos; - for (storePos=storeStart; storePos <= storeEnd; storePos++) { - U32 const llen = opt[storePos].litlen; - U32 const mlen = opt[storePos].mlen; - U32 const offBase = opt[storePos].off; - U32 const advance = llen + mlen; - DEBUGLOG(6, "considering seq starting at %i, llen=%u, mlen=%u", - (int)(anchor - istart), (unsigned)llen, (unsigned)mlen); - - if (mlen==0) { /* only literals => must be last "sequence", actually starting a new stream of sequences */ - assert(storePos == storeEnd); /* must be last sequence */ - ip = anchor + llen; /* last "sequence" is a bunch of literals => don't progress anchor */ - continue; /* will finish */ - } - - assert(anchor + llen <= iend); - ZSTD_updateStats(optStatePtr, llen, anchor, offBase, mlen); - ZSTD_storeSeq(seqStore, llen, anchor, iend, offBase, mlen); - anchor += advance; - ip = anchor; - } } - DEBUGLOG(7, "new offset history : %u, %u, %u", rep[0], rep[1], rep[2]); - - /* update all costs */ - ZSTD_setBasePrices(optStatePtr, optLevel); - } - } /* while (ip < ilimit) */ - - /* Return the last literals size */ - return (size_t)(iend - anchor); -} -#endif /* build exclusions */ - -#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR -static size_t ZSTD_compressBlock_opt0( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) -{ - return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR -static size_t ZSTD_compressBlock_opt2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) -{ - return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /* optLevel */, dictMode); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btopt( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_compressBlock_btopt"); - return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_noDict); -} -#endif - - - - -#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR -/* ZSTD_initStats_ultra(): - * make a first compression pass, just to seed stats with more accurate starting values. - * only works on first block, with no dictionary and no ldm. - * this function cannot error out, its narrow contract must be respected. - */ -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_initStats_ultra(ZSTD_MatchState_t* ms, - SeqStore_t* seqStore, - U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - U32 tmpRep[ZSTD_REP_NUM]; /* updated rep codes will sink here */ - ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep)); - - DEBUGLOG(4, "ZSTD_initStats_ultra (srcSize=%zu)", srcSize); - assert(ms->opt.litLengthSum == 0); /* first block */ - assert(seqStore->sequences == seqStore->sequencesStart); /* no ldm */ - assert(ms->window.dictLimit == ms->window.lowLimit); /* no dictionary */ - assert(ms->window.dictLimit - ms->nextToUpdate <= 1); /* no prefix (note: intentional overflow, defined as 2-complement) */ - - ZSTD_compressBlock_opt2(ms, seqStore, tmpRep, src, srcSize, ZSTD_noDict); /* generate stats into ms->opt*/ - - /* invalidate first scan from history, only keep entropy stats */ - ZSTD_resetSeqStore(seqStore); - ms->window.base -= srcSize; - ms->window.dictLimit += (U32)srcSize; - ms->window.lowLimit = ms->window.dictLimit; - ms->nextToUpdate = ms->window.dictLimit; - -} - -size_t ZSTD_compressBlock_btultra( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_compressBlock_btultra (srcSize=%zu)", srcSize); - return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); -} - -size_t ZSTD_compressBlock_btultra2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - U32 const curr = (U32)((const BYTE*)src - ms->window.base); - DEBUGLOG(5, "ZSTD_compressBlock_btultra2 (srcSize=%zu)", srcSize); - - /* 2-passes strategy: - * this strategy makes a first pass over first block to collect statistics - * in order to seed next round's statistics with it. - * After 1st pass, function forgets history, and starts a new block. - * Consequently, this can only work if no data has been previously loaded in tables, - * aka, no dictionary, no prefix, no ldm preprocessing. - * The compression ratio gain is generally small (~0.5% on first block), - * the cost is 2x cpu time on first block. */ - assert(srcSize <= ZSTD_BLOCKSIZE_MAX); - if ( (ms->opt.litLengthSum==0) /* first block */ - && (seqStore->sequences == seqStore->sequencesStart) /* no ldm */ - && (ms->window.dictLimit == ms->window.lowLimit) /* no dictionary */ - && (curr == ms->window.dictLimit) /* start of frame, nothing already loaded nor skipped */ - && (srcSize > ZSTD_PREDEF_THRESHOLD) /* input large enough to not employ default stats */ - ) { - ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); - } - - return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btopt_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_btopt_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_extDict); -} -#endif - -#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btultra_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); -} - -size_t ZSTD_compressBlock_btultra_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - const void* src, size_t srcSize) -{ - return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_extDict); -} -#endif - -/* note : no btultra2 variant for extDict nor dictMatchState, - * because btultra2 is not meant to work with dictionaries - * and is only specific for the first block (no prefix) */ diff --git a/third_party/zstd/lib/compress/zstd_opt.h b/third_party/zstd/lib/compress/zstd_opt.h deleted file mode 100644 index 756c7b1..0000000 --- a/third_party/zstd/lib/compress/zstd_opt.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_OPT_H -#define ZSTD_OPT_H - -#include "zstd_compress_internal.h" - -#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ - || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) -/* used in ZSTD_loadDictionaryContent() */ -void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend); -#endif - -#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btopt( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btopt_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btopt_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_BTOPT ZSTD_compressBlock_btopt -#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE ZSTD_compressBlock_btopt_dictMatchState -#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT ZSTD_compressBlock_btopt_extDict -#else -#define ZSTD_COMPRESSBLOCK_BTOPT NULL -#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT NULL -#endif - -#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR -size_t ZSTD_compressBlock_btultra( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btultra_dictMatchState( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); -size_t ZSTD_compressBlock_btultra_extDict( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - - /* note : no btultra2 variant for extDict nor dictMatchState, - * because btultra2 is not meant to work with dictionaries - * and is only specific for the first block (no prefix) */ -size_t ZSTD_compressBlock_btultra2( - ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], - void const* src, size_t srcSize); - -#define ZSTD_COMPRESSBLOCK_BTULTRA ZSTD_compressBlock_btultra -#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE ZSTD_compressBlock_btultra_dictMatchState -#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT ZSTD_compressBlock_btultra_extDict -#define ZSTD_COMPRESSBLOCK_BTULTRA2 ZSTD_compressBlock_btultra2 -#else -#define ZSTD_COMPRESSBLOCK_BTULTRA NULL -#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE NULL -#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT NULL -#define ZSTD_COMPRESSBLOCK_BTULTRA2 NULL -#endif - -#endif /* ZSTD_OPT_H */ diff --git a/third_party/zstd/lib/compress/zstd_preSplit.c b/third_party/zstd/lib/compress/zstd_preSplit.c deleted file mode 100644 index d820c20..0000000 --- a/third_party/zstd/lib/compress/zstd_preSplit.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "../common/compiler.h" /* ZSTD_ALIGNOF */ -#include "../common/mem.h" /* S64 */ -#include "../common/zstd_deps.h" /* ZSTD_memset */ -#include "../common/zstd_internal.h" /* ZSTD_STATIC_ASSERT */ -#include "hist.h" /* HIST_add */ -#include "zstd_preSplit.h" - - -#define BLOCKSIZE_MIN 3500 -#define THRESHOLD_PENALTY_RATE 16 -#define THRESHOLD_BASE (THRESHOLD_PENALTY_RATE - 2) -#define THRESHOLD_PENALTY 3 - -#define HASHLENGTH 2 -#define HASHLOG_MAX 10 -#define HASHTABLESIZE (1 << HASHLOG_MAX) -#define HASHMASK (HASHTABLESIZE - 1) -#define KNUTH 0x9e3779b9 - -/* for hashLog > 8, hash 2 bytes. - * for hashLog == 8, just take the byte, no hashing. - * The speed of this method relies on compile-time constant propagation */ -FORCE_INLINE_TEMPLATE unsigned hash2(const void *p, unsigned hashLog) -{ - assert(hashLog >= 8); - if (hashLog == 8) return (U32)((const BYTE*)p)[0]; - assert(hashLog <= HASHLOG_MAX); - return (U32)(MEM_read16(p)) * KNUTH >> (32 - hashLog); -} - - -typedef struct { - unsigned events[HASHTABLESIZE]; - size_t nbEvents; -} Fingerprint; -typedef struct { - Fingerprint pastEvents; - Fingerprint newEvents; -} FPStats; - -static void initStats(FPStats* fpstats) -{ - ZSTD_memset(fpstats, 0, sizeof(FPStats)); -} - -FORCE_INLINE_TEMPLATE void -addEvents_generic(Fingerprint* fp, const void* src, size_t srcSize, size_t samplingRate, unsigned hashLog) -{ - const char* p = (const char*)src; - size_t limit = srcSize - HASHLENGTH + 1; - size_t n; - assert(srcSize >= HASHLENGTH); - for (n = 0; n < limit; n+=samplingRate) { - fp->events[hash2(p+n, hashLog)]++; - } - fp->nbEvents += limit/samplingRate; -} - -FORCE_INLINE_TEMPLATE void -recordFingerprint_generic(Fingerprint* fp, const void* src, size_t srcSize, size_t samplingRate, unsigned hashLog) -{ - ZSTD_memset(fp, 0, sizeof(unsigned) * ((size_t)1 << hashLog)); - fp->nbEvents = 0; - addEvents_generic(fp, src, srcSize, samplingRate, hashLog); -} - -typedef void (*RecordEvents_f)(Fingerprint* fp, const void* src, size_t srcSize); - -#define FP_RECORD(_rate) ZSTD_recordFingerprint_##_rate - -#define ZSTD_GEN_RECORD_FINGERPRINT(_rate, _hSize) \ - static void FP_RECORD(_rate)(Fingerprint* fp, const void* src, size_t srcSize) \ - { \ - recordFingerprint_generic(fp, src, srcSize, _rate, _hSize); \ - } - -ZSTD_GEN_RECORD_FINGERPRINT(1, 10) -ZSTD_GEN_RECORD_FINGERPRINT(5, 10) -ZSTD_GEN_RECORD_FINGERPRINT(11, 9) -ZSTD_GEN_RECORD_FINGERPRINT(43, 8) - - -static U64 abs64(S64 s64) { return (U64)((s64 < 0) ? -s64 : s64); } - -static U64 fpDistance(const Fingerprint* fp1, const Fingerprint* fp2, unsigned hashLog) -{ - U64 distance = 0; - size_t n; - assert(hashLog <= HASHLOG_MAX); - for (n = 0; n < ((size_t)1 << hashLog); n++) { - distance += - abs64((S64)fp1->events[n] * (S64)fp2->nbEvents - (S64)fp2->events[n] * (S64)fp1->nbEvents); - } - return distance; -} - -/* Compare newEvents with pastEvents - * return 1 when considered "too different" - */ -static int compareFingerprints(const Fingerprint* ref, - const Fingerprint* newfp, - int penalty, - unsigned hashLog) -{ - assert(ref->nbEvents > 0); - assert(newfp->nbEvents > 0); - { U64 p50 = (U64)ref->nbEvents * (U64)newfp->nbEvents; - U64 deviation = fpDistance(ref, newfp, hashLog); - U64 threshold = p50 * (U64)(THRESHOLD_BASE + penalty) / THRESHOLD_PENALTY_RATE; - return deviation >= threshold; - } -} - -static void mergeEvents(Fingerprint* acc, const Fingerprint* newfp) -{ - size_t n; - for (n = 0; n < HASHTABLESIZE; n++) { - acc->events[n] += newfp->events[n]; - } - acc->nbEvents += newfp->nbEvents; -} - -static void flushEvents(FPStats* fpstats) -{ - size_t n; - for (n = 0; n < HASHTABLESIZE; n++) { - fpstats->pastEvents.events[n] = fpstats->newEvents.events[n]; - } - fpstats->pastEvents.nbEvents = fpstats->newEvents.nbEvents; - ZSTD_memset(&fpstats->newEvents, 0, sizeof(fpstats->newEvents)); -} - -static void removeEvents(Fingerprint* acc, const Fingerprint* slice) -{ - size_t n; - for (n = 0; n < HASHTABLESIZE; n++) { - assert(acc->events[n] >= slice->events[n]); - acc->events[n] -= slice->events[n]; - } - acc->nbEvents -= slice->nbEvents; -} - -#define CHUNKSIZE (8 << 10) -static size_t ZSTD_splitBlock_byChunks(const void* blockStart, size_t blockSize, - int level, - void* workspace, size_t wkspSize) -{ - static const RecordEvents_f records_fs[] = { - FP_RECORD(43), FP_RECORD(11), FP_RECORD(5), FP_RECORD(1) - }; - static const unsigned hashParams[] = { 8, 9, 10, 10 }; - const RecordEvents_f record_f = (assert(0<=level && level<=3), records_fs[level]); - FPStats* const fpstats = (FPStats*)workspace; - const char* p = (const char*)blockStart; - int penalty = THRESHOLD_PENALTY; - size_t pos = 0; - assert(blockSize == (128 << 10)); - assert(workspace != NULL); - assert((size_t)workspace % ZSTD_ALIGNOF(FPStats) == 0); - ZSTD_STATIC_ASSERT(ZSTD_SLIPBLOCK_WORKSPACESIZE >= sizeof(FPStats)); - assert(wkspSize >= sizeof(FPStats)); (void)wkspSize; - - initStats(fpstats); - record_f(&fpstats->pastEvents, p, CHUNKSIZE); - for (pos = CHUNKSIZE; pos <= blockSize - CHUNKSIZE; pos += CHUNKSIZE) { - record_f(&fpstats->newEvents, p + pos, CHUNKSIZE); - if (compareFingerprints(&fpstats->pastEvents, &fpstats->newEvents, penalty, hashParams[level])) { - return pos; - } else { - mergeEvents(&fpstats->pastEvents, &fpstats->newEvents); - if (penalty > 0) penalty--; - } - } - assert(pos == blockSize); - return blockSize; - (void)flushEvents; (void)removeEvents; -} - -/* ZSTD_splitBlock_fromBorders(): very fast strategy : - * compare fingerprint from beginning and end of the block, - * derive from their difference if it's preferable to split in the middle, - * repeat the process a second time, for finer grained decision. - * 3 times did not brought improvements, so I stopped at 2. - * Benefits are good enough for a cheap heuristic. - * More accurate splitting saves more, but speed impact is also more perceptible. - * For better accuracy, use more elaborate variant *_byChunks. - */ -static size_t ZSTD_splitBlock_fromBorders(const void* blockStart, size_t blockSize, - void* workspace, size_t wkspSize) -{ -#define SEGMENT_SIZE 512 - FPStats* const fpstats = (FPStats*)workspace; - Fingerprint* middleEvents = (Fingerprint*)(void*)((char*)workspace + 512 * sizeof(unsigned)); - assert(blockSize == (128 << 10)); - assert(workspace != NULL); - assert((size_t)workspace % ZSTD_ALIGNOF(FPStats) == 0); - ZSTD_STATIC_ASSERT(ZSTD_SLIPBLOCK_WORKSPACESIZE >= sizeof(FPStats)); - assert(wkspSize >= sizeof(FPStats)); (void)wkspSize; - - initStats(fpstats); - HIST_add(fpstats->pastEvents.events, blockStart, SEGMENT_SIZE); - HIST_add(fpstats->newEvents.events, (const char*)blockStart + blockSize - SEGMENT_SIZE, SEGMENT_SIZE); - fpstats->pastEvents.nbEvents = fpstats->newEvents.nbEvents = SEGMENT_SIZE; - if (!compareFingerprints(&fpstats->pastEvents, &fpstats->newEvents, 0, 8)) - return blockSize; - - HIST_add(middleEvents->events, (const char*)blockStart + blockSize/2 - SEGMENT_SIZE/2, SEGMENT_SIZE); - middleEvents->nbEvents = SEGMENT_SIZE; - { U64 const distFromBegin = fpDistance(&fpstats->pastEvents, middleEvents, 8); - U64 const distFromEnd = fpDistance(&fpstats->newEvents, middleEvents, 8); - U64 const minDistance = SEGMENT_SIZE * SEGMENT_SIZE / 3; - if (abs64((S64)distFromBegin - (S64)distFromEnd) < minDistance) - return 64 KB; - return (distFromBegin > distFromEnd) ? 32 KB : 96 KB; - } -} - -size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, - int level, - void* workspace, size_t wkspSize) -{ - DEBUGLOG(6, "ZSTD_splitBlock (level=%i)", level); - assert(0<=level && level<=4); - if (level == 0) - return ZSTD_splitBlock_fromBorders(blockStart, blockSize, workspace, wkspSize); - /* level >= 1*/ - return ZSTD_splitBlock_byChunks(blockStart, blockSize, level-1, workspace, wkspSize); -} diff --git a/third_party/zstd/lib/compress/zstd_preSplit.h b/third_party/zstd/lib/compress/zstd_preSplit.h deleted file mode 100644 index b89a200..0000000 --- a/third_party/zstd/lib/compress/zstd_preSplit.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_PRESPLIT_H -#define ZSTD_PRESPLIT_H - -#include /* size_t */ - -#define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208 - -/* ZSTD_splitBlock(): - * @level must be a value between 0 and 4. - * higher levels spend more energy to detect block boundaries. - * @workspace must be aligned for size_t. - * @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE - * note: - * For the time being, this function only accepts full 128 KB blocks. - * Therefore, @blockSize must be == 128 KB. - * While this could be extended to smaller sizes in the future, - * it is not yet clear if this would be useful. TBD. - */ -size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, - int level, - void* workspace, size_t wkspSize); - -#endif /* ZSTD_PRESPLIT_H */ diff --git a/third_party/zstd/lib/compress/zstdmt_compress.c b/third_party/zstd/lib/compress/zstdmt_compress.c deleted file mode 100644 index 0f1fe6d..0000000 --- a/third_party/zstd/lib/compress/zstdmt_compress.c +++ /dev/null @@ -1,1923 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/* ====== Compiler specifics ====== */ -#if defined(_MSC_VER) -# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ -#endif - - -/* ====== Dependencies ====== */ -#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset, INT_MAX, UINT_MAX */ -#include "../common/mem.h" /* MEM_STATIC */ -#include "../common/pool.h" /* threadpool */ -#include "../common/threading.h" /* mutex */ -#include "zstd_compress_internal.h" /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */ -#include "zstd_ldm.h" -#include "zstdmt_compress.h" - -/* Guards code to support resizing the SeqPool. - * We will want to resize the SeqPool to save memory in the future. - * Until then, comment the code out since it is unused. - */ -#define ZSTD_RESIZE_SEQPOOL 0 - -/* ====== Debug ====== */ -#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) \ - && !defined(_MSC_VER) \ - && !defined(__MINGW32__) - -# include -# include -# include - -# define DEBUG_PRINTHEX(l,p,n) \ - do { \ - unsigned debug_u; \ - for (debug_u=0; debug_u<(n); debug_u++) \ - RAWLOG(l, "%02X ", ((const unsigned char*)(p))[debug_u]); \ - RAWLOG(l, " \n"); \ - } while (0) - -static unsigned long long GetCurrentClockTimeMicroseconds(void) -{ - static clock_t _ticksPerSecond = 0; - if (_ticksPerSecond <= 0) _ticksPerSecond = sysconf(_SC_CLK_TCK); - - { struct tms junk; clock_t newTicks = (clock_t) times(&junk); - return ((((unsigned long long)newTicks)*(1000000))/_ticksPerSecond); -} } - -#define MUTEX_WAIT_TIME_DLEVEL 6 -#define ZSTD_PTHREAD_MUTEX_LOCK(mutex) \ - do { \ - if (DEBUGLEVEL >= MUTEX_WAIT_TIME_DLEVEL) { \ - unsigned long long const beforeTime = GetCurrentClockTimeMicroseconds(); \ - ZSTD_pthread_mutex_lock(mutex); \ - { unsigned long long const afterTime = GetCurrentClockTimeMicroseconds(); \ - unsigned long long const elapsedTime = (afterTime-beforeTime); \ - if (elapsedTime > 1000) { \ - /* or whatever threshold you like; I'm using 1 millisecond here */ \ - DEBUGLOG(MUTEX_WAIT_TIME_DLEVEL, \ - "Thread took %llu microseconds to acquire mutex %s \n", \ - elapsedTime, #mutex); \ - } } \ - } else { \ - ZSTD_pthread_mutex_lock(mutex); \ - } \ - } while (0) - -#else - -# define ZSTD_PTHREAD_MUTEX_LOCK(m) ZSTD_pthread_mutex_lock(m) -# define DEBUG_PRINTHEX(l,p,n) do { } while (0) - -#endif - - -/* ===== Buffer Pool ===== */ -/* a single Buffer Pool can be invoked from multiple threads in parallel */ - -typedef struct buffer_s { - void* start; - size_t capacity; -} Buffer; - -static const Buffer g_nullBuffer = { NULL, 0 }; - -typedef struct ZSTDMT_bufferPool_s { - ZSTD_pthread_mutex_t poolMutex; - size_t bufferSize; - unsigned totalBuffers; - unsigned nbBuffers; - ZSTD_customMem cMem; - Buffer* buffers; -} ZSTDMT_bufferPool; - -static void ZSTDMT_freeBufferPool(ZSTDMT_bufferPool* bufPool) -{ - DEBUGLOG(3, "ZSTDMT_freeBufferPool (address:%08X)", (U32)(size_t)bufPool); - if (!bufPool) return; /* compatibility with free on NULL */ - if (bufPool->buffers) { - unsigned u; - for (u=0; utotalBuffers; u++) { - DEBUGLOG(4, "free buffer %2u (address:%08X)", u, (U32)(size_t)bufPool->buffers[u].start); - ZSTD_customFree(bufPool->buffers[u].start, bufPool->cMem); - } - ZSTD_customFree(bufPool->buffers, bufPool->cMem); - } - ZSTD_pthread_mutex_destroy(&bufPool->poolMutex); - ZSTD_customFree(bufPool, bufPool->cMem); -} - -static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned maxNbBuffers, ZSTD_customMem cMem) -{ - ZSTDMT_bufferPool* const bufPool = - (ZSTDMT_bufferPool*)ZSTD_customCalloc(sizeof(ZSTDMT_bufferPool), cMem); - if (bufPool==NULL) return NULL; - if (ZSTD_pthread_mutex_init(&bufPool->poolMutex, NULL)) { - ZSTD_customFree(bufPool, cMem); - return NULL; - } - bufPool->buffers = (Buffer*)ZSTD_customCalloc(maxNbBuffers * sizeof(Buffer), cMem); - if (bufPool->buffers==NULL) { - ZSTDMT_freeBufferPool(bufPool); - return NULL; - } - bufPool->bufferSize = 64 KB; - bufPool->totalBuffers = maxNbBuffers; - bufPool->nbBuffers = 0; - bufPool->cMem = cMem; - return bufPool; -} - -/* only works at initialization, not during compression */ -static size_t ZSTDMT_sizeof_bufferPool(ZSTDMT_bufferPool* bufPool) -{ - size_t const poolSize = sizeof(*bufPool); - size_t const arraySize = bufPool->totalBuffers * sizeof(Buffer); - unsigned u; - size_t totalBufferSize = 0; - ZSTD_pthread_mutex_lock(&bufPool->poolMutex); - for (u=0; utotalBuffers; u++) - totalBufferSize += bufPool->buffers[u].capacity; - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); - - return poolSize + arraySize + totalBufferSize; -} - -/* ZSTDMT_setBufferSize() : - * all future buffers provided by this buffer pool will have _at least_ this size - * note : it's better for all buffers to have same size, - * as they become freely interchangeable, reducing malloc/free usages and memory fragmentation */ -static void ZSTDMT_setBufferSize(ZSTDMT_bufferPool* const bufPool, size_t const bSize) -{ - ZSTD_pthread_mutex_lock(&bufPool->poolMutex); - DEBUGLOG(4, "ZSTDMT_setBufferSize: bSize = %u", (U32)bSize); - bufPool->bufferSize = bSize; - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); -} - - -static ZSTDMT_bufferPool* ZSTDMT_expandBufferPool(ZSTDMT_bufferPool* srcBufPool, unsigned maxNbBuffers) -{ - if (srcBufPool==NULL) return NULL; - if (srcBufPool->totalBuffers >= maxNbBuffers) /* good enough */ - return srcBufPool; - /* need a larger buffer pool */ - { ZSTD_customMem const cMem = srcBufPool->cMem; - size_t const bSize = srcBufPool->bufferSize; /* forward parameters */ - ZSTDMT_bufferPool* newBufPool; - ZSTDMT_freeBufferPool(srcBufPool); - newBufPool = ZSTDMT_createBufferPool(maxNbBuffers, cMem); - if (newBufPool==NULL) return newBufPool; - ZSTDMT_setBufferSize(newBufPool, bSize); - return newBufPool; - } -} - -/** ZSTDMT_getBuffer() : - * assumption : bufPool must be valid - * @return : a buffer, with start pointer and size - * note: allocation may fail, in this case, start==NULL and size==0 */ -static Buffer ZSTDMT_getBuffer(ZSTDMT_bufferPool* bufPool) -{ - size_t const bSize = bufPool->bufferSize; - DEBUGLOG(5, "ZSTDMT_getBuffer: bSize = %u", (U32)bufPool->bufferSize); - ZSTD_pthread_mutex_lock(&bufPool->poolMutex); - if (bufPool->nbBuffers) { /* try to use an existing buffer */ - Buffer const buf = bufPool->buffers[--(bufPool->nbBuffers)]; - size_t const availBufferSize = buf.capacity; - bufPool->buffers[bufPool->nbBuffers] = g_nullBuffer; - if ((availBufferSize >= bSize) & ((availBufferSize>>3) <= bSize)) { - /* large enough, but not too much */ - DEBUGLOG(5, "ZSTDMT_getBuffer: provide buffer %u of size %u", - bufPool->nbBuffers, (U32)buf.capacity); - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); - return buf; - } - /* size conditions not respected : scratch this buffer, create new one */ - DEBUGLOG(5, "ZSTDMT_getBuffer: existing buffer does not meet size conditions => freeing"); - ZSTD_customFree(buf.start, bufPool->cMem); - } - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); - /* create new buffer */ - DEBUGLOG(5, "ZSTDMT_getBuffer: create a new buffer"); - { Buffer buffer; - void* const start = ZSTD_customMalloc(bSize, bufPool->cMem); - buffer.start = start; /* note : start can be NULL if malloc fails ! */ - buffer.capacity = (start==NULL) ? 0 : bSize; - if (start==NULL) { - DEBUGLOG(5, "ZSTDMT_getBuffer: buffer allocation failure !!"); - } else { - DEBUGLOG(5, "ZSTDMT_getBuffer: created buffer of size %u", (U32)bSize); - } - return buffer; - } -} - -#if ZSTD_RESIZE_SEQPOOL -/** ZSTDMT_resizeBuffer() : - * assumption : bufPool must be valid - * @return : a buffer that is at least the buffer pool buffer size. - * If a reallocation happens, the data in the input buffer is copied. - */ -static Buffer ZSTDMT_resizeBuffer(ZSTDMT_bufferPool* bufPool, Buffer buffer) -{ - size_t const bSize = bufPool->bufferSize; - if (buffer.capacity < bSize) { - void* const start = ZSTD_customMalloc(bSize, bufPool->cMem); - Buffer newBuffer; - newBuffer.start = start; - newBuffer.capacity = start == NULL ? 0 : bSize; - if (start != NULL) { - assert(newBuffer.capacity >= buffer.capacity); - ZSTD_memcpy(newBuffer.start, buffer.start, buffer.capacity); - DEBUGLOG(5, "ZSTDMT_resizeBuffer: created buffer of size %u", (U32)bSize); - return newBuffer; - } - DEBUGLOG(5, "ZSTDMT_resizeBuffer: buffer allocation failure !!"); - } - return buffer; -} -#endif - -/* store buffer for later re-use, up to pool capacity */ -static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* bufPool, Buffer buf) -{ - DEBUGLOG(5, "ZSTDMT_releaseBuffer"); - if (buf.start == NULL) return; /* compatible with release on NULL */ - ZSTD_pthread_mutex_lock(&bufPool->poolMutex); - if (bufPool->nbBuffers < bufPool->totalBuffers) { - bufPool->buffers[bufPool->nbBuffers++] = buf; /* stored for later use */ - DEBUGLOG(5, "ZSTDMT_releaseBuffer: stored buffer of size %u in slot %u", - (U32)buf.capacity, (U32)(bufPool->nbBuffers-1)); - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); - return; - } - ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); - /* Reached bufferPool capacity (note: should not happen) */ - DEBUGLOG(5, "ZSTDMT_releaseBuffer: pool capacity reached => freeing "); - ZSTD_customFree(buf.start, bufPool->cMem); -} - -/* We need 2 output buffers per worker since each dstBuff must be flushed after it is released. - * The 3 additional buffers are as follows: - * 1 buffer for input loading - * 1 buffer for "next input" when submitting current one - * 1 buffer stuck in queue */ -#define BUF_POOL_MAX_NB_BUFFERS(nbWorkers) (2*(nbWorkers) + 3) - -/* After a worker releases its rawSeqStore, it is immediately ready for reuse. - * So we only need one seq buffer per worker. */ -#define SEQ_POOL_MAX_NB_BUFFERS(nbWorkers) (nbWorkers) - -/* ===== Seq Pool Wrapper ====== */ - -typedef ZSTDMT_bufferPool ZSTDMT_seqPool; - -static size_t ZSTDMT_sizeof_seqPool(ZSTDMT_seqPool* seqPool) -{ - return ZSTDMT_sizeof_bufferPool(seqPool); -} - -static RawSeqStore_t bufferToSeq(Buffer buffer) -{ - RawSeqStore_t seq = kNullRawSeqStore; - seq.seq = (rawSeq*)buffer.start; - seq.capacity = buffer.capacity / sizeof(rawSeq); - return seq; -} - -static Buffer seqToBuffer(RawSeqStore_t seq) -{ - Buffer buffer; - buffer.start = seq.seq; - buffer.capacity = seq.capacity * sizeof(rawSeq); - return buffer; -} - -static RawSeqStore_t ZSTDMT_getSeq(ZSTDMT_seqPool* seqPool) -{ - if (seqPool->bufferSize == 0) { - return kNullRawSeqStore; - } - return bufferToSeq(ZSTDMT_getBuffer(seqPool)); -} - -#if ZSTD_RESIZE_SEQPOOL -static RawSeqStore_t ZSTDMT_resizeSeq(ZSTDMT_seqPool* seqPool, RawSeqStore_t seq) -{ - return bufferToSeq(ZSTDMT_resizeBuffer(seqPool, seqToBuffer(seq))); -} -#endif - -static void ZSTDMT_releaseSeq(ZSTDMT_seqPool* seqPool, RawSeqStore_t seq) -{ - ZSTDMT_releaseBuffer(seqPool, seqToBuffer(seq)); -} - -static void ZSTDMT_setNbSeq(ZSTDMT_seqPool* const seqPool, size_t const nbSeq) -{ - ZSTDMT_setBufferSize(seqPool, nbSeq * sizeof(rawSeq)); -} - -static ZSTDMT_seqPool* ZSTDMT_createSeqPool(unsigned nbWorkers, ZSTD_customMem cMem) -{ - ZSTDMT_seqPool* const seqPool = ZSTDMT_createBufferPool(SEQ_POOL_MAX_NB_BUFFERS(nbWorkers), cMem); - if (seqPool == NULL) return NULL; - ZSTDMT_setNbSeq(seqPool, 0); - return seqPool; -} - -static void ZSTDMT_freeSeqPool(ZSTDMT_seqPool* seqPool) -{ - ZSTDMT_freeBufferPool(seqPool); -} - -static ZSTDMT_seqPool* ZSTDMT_expandSeqPool(ZSTDMT_seqPool* pool, U32 nbWorkers) -{ - return ZSTDMT_expandBufferPool(pool, SEQ_POOL_MAX_NB_BUFFERS(nbWorkers)); -} - - -/* ===== CCtx Pool ===== */ -/* a single CCtx Pool can be invoked from multiple threads in parallel */ - -typedef struct { - ZSTD_pthread_mutex_t poolMutex; - int totalCCtx; - int availCCtx; - ZSTD_customMem cMem; - ZSTD_CCtx** cctxs; -} ZSTDMT_CCtxPool; - -/* note : all CCtx borrowed from the pool must be reverted back to the pool _before_ freeing the pool */ -static void ZSTDMT_freeCCtxPool(ZSTDMT_CCtxPool* pool) -{ - if (!pool) return; - ZSTD_pthread_mutex_destroy(&pool->poolMutex); - if (pool->cctxs) { - int cid; - for (cid=0; cidtotalCCtx; cid++) - ZSTD_freeCCtx(pool->cctxs[cid]); /* free compatible with NULL */ - ZSTD_customFree(pool->cctxs, pool->cMem); - } - ZSTD_customFree(pool, pool->cMem); -} - -/* ZSTDMT_createCCtxPool() : - * implies nbWorkers >= 1 , checked by caller ZSTDMT_createCCtx() */ -static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(int nbWorkers, - ZSTD_customMem cMem) -{ - ZSTDMT_CCtxPool* const cctxPool = - (ZSTDMT_CCtxPool*) ZSTD_customCalloc(sizeof(ZSTDMT_CCtxPool), cMem); - assert(nbWorkers > 0); - if (!cctxPool) return NULL; - if (ZSTD_pthread_mutex_init(&cctxPool->poolMutex, NULL)) { - ZSTD_customFree(cctxPool, cMem); - return NULL; - } - cctxPool->totalCCtx = nbWorkers; - cctxPool->cctxs = (ZSTD_CCtx**)ZSTD_customCalloc(nbWorkers * sizeof(ZSTD_CCtx*), cMem); - if (!cctxPool->cctxs) { - ZSTDMT_freeCCtxPool(cctxPool); - return NULL; - } - cctxPool->cMem = cMem; - cctxPool->cctxs[0] = ZSTD_createCCtx_advanced(cMem); - if (!cctxPool->cctxs[0]) { ZSTDMT_freeCCtxPool(cctxPool); return NULL; } - cctxPool->availCCtx = 1; /* at least one cctx for single-thread mode */ - DEBUGLOG(3, "cctxPool created, with %u workers", nbWorkers); - return cctxPool; -} - -static ZSTDMT_CCtxPool* ZSTDMT_expandCCtxPool(ZSTDMT_CCtxPool* srcPool, - int nbWorkers) -{ - if (srcPool==NULL) return NULL; - if (nbWorkers <= srcPool->totalCCtx) return srcPool; /* good enough */ - /* need a larger cctx pool */ - { ZSTD_customMem const cMem = srcPool->cMem; - ZSTDMT_freeCCtxPool(srcPool); - return ZSTDMT_createCCtxPool(nbWorkers, cMem); - } -} - -/* only works during initialization phase, not during compression */ -static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool) -{ - ZSTD_pthread_mutex_lock(&cctxPool->poolMutex); - { unsigned const nbWorkers = cctxPool->totalCCtx; - size_t const poolSize = sizeof(*cctxPool); - size_t const arraySize = cctxPool->totalCCtx * sizeof(ZSTD_CCtx*); - size_t totalCCtxSize = 0; - unsigned u; - for (u=0; ucctxs[u]); - } - ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); - assert(nbWorkers > 0); - return poolSize + arraySize + totalCCtxSize; - } -} - -static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool) -{ - DEBUGLOG(5, "ZSTDMT_getCCtx"); - ZSTD_pthread_mutex_lock(&cctxPool->poolMutex); - if (cctxPool->availCCtx) { - cctxPool->availCCtx--; - { ZSTD_CCtx* const cctx = cctxPool->cctxs[cctxPool->availCCtx]; - ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); - return cctx; - } } - ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); - DEBUGLOG(5, "create one more CCtx"); - return ZSTD_createCCtx_advanced(cctxPool->cMem); /* note : can be NULL, when creation fails ! */ -} - -static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx) -{ - if (cctx==NULL) return; /* compatibility with release on NULL */ - ZSTD_pthread_mutex_lock(&pool->poolMutex); - if (pool->availCCtx < pool->totalCCtx) - pool->cctxs[pool->availCCtx++] = cctx; - else { - /* pool overflow : should not happen, since totalCCtx==nbWorkers */ - DEBUGLOG(4, "CCtx pool overflow : free cctx"); - ZSTD_freeCCtx(cctx); - } - ZSTD_pthread_mutex_unlock(&pool->poolMutex); -} - -/* ==== Serial State ==== */ - -typedef struct { - void const* start; - size_t size; -} Range; - -typedef struct { - /* All variables in the struct are protected by mutex. */ - ZSTD_pthread_mutex_t mutex; - ZSTD_pthread_cond_t cond; - ZSTD_CCtx_params params; - ldmState_t ldmState; - XXH64_state_t xxhState; - unsigned nextJobID; - /* Protects ldmWindow. - * Must be acquired after the main mutex when acquiring both. - */ - ZSTD_pthread_mutex_t ldmWindowMutex; - ZSTD_pthread_cond_t ldmWindowCond; /* Signaled when ldmWindow is updated */ - ZSTD_window_t ldmWindow; /* A thread-safe copy of ldmState.window */ -} SerialState; - -static int -ZSTDMT_serialState_reset(SerialState* serialState, - ZSTDMT_seqPool* seqPool, - ZSTD_CCtx_params params, - size_t jobSize, - const void* dict, size_t const dictSize, - ZSTD_dictContentType_e dictContentType) -{ - /* Adjust parameters */ - if (params.ldmParams.enableLdm == ZSTD_ps_enable) { - DEBUGLOG(4, "LDM window size = %u KB", (1U << params.cParams.windowLog) >> 10); - ZSTD_ldm_adjustParameters(¶ms.ldmParams, ¶ms.cParams); - assert(params.ldmParams.hashLog >= params.ldmParams.bucketSizeLog); - assert(params.ldmParams.hashRateLog < 32); - } else { - ZSTD_memset(¶ms.ldmParams, 0, sizeof(params.ldmParams)); - } - serialState->nextJobID = 0; - if (params.fParams.checksumFlag) - XXH64_reset(&serialState->xxhState, 0); - if (params.ldmParams.enableLdm == ZSTD_ps_enable) { - ZSTD_customMem cMem = params.customMem; - unsigned const hashLog = params.ldmParams.hashLog; - size_t const hashSize = ((size_t)1 << hashLog) * sizeof(ldmEntry_t); - unsigned const bucketLog = - params.ldmParams.hashLog - params.ldmParams.bucketSizeLog; - unsigned const prevBucketLog = - serialState->params.ldmParams.hashLog - - serialState->params.ldmParams.bucketSizeLog; - size_t const numBuckets = (size_t)1 << bucketLog; - /* Size the seq pool tables */ - ZSTDMT_setNbSeq(seqPool, ZSTD_ldm_getMaxNbSeq(params.ldmParams, jobSize)); - /* Reset the window */ - ZSTD_window_init(&serialState->ldmState.window); - /* Resize tables and output space if necessary. */ - if (serialState->ldmState.hashTable == NULL || serialState->params.ldmParams.hashLog < hashLog) { - ZSTD_customFree(serialState->ldmState.hashTable, cMem); - serialState->ldmState.hashTable = (ldmEntry_t*)ZSTD_customMalloc(hashSize, cMem); - } - if (serialState->ldmState.bucketOffsets == NULL || prevBucketLog < bucketLog) { - ZSTD_customFree(serialState->ldmState.bucketOffsets, cMem); - serialState->ldmState.bucketOffsets = (BYTE*)ZSTD_customMalloc(numBuckets, cMem); - } - if (!serialState->ldmState.hashTable || !serialState->ldmState.bucketOffsets) - return 1; - /* Zero the tables */ - ZSTD_memset(serialState->ldmState.hashTable, 0, hashSize); - ZSTD_memset(serialState->ldmState.bucketOffsets, 0, numBuckets); - - /* Update window state and fill hash table with dict */ - serialState->ldmState.loadedDictEnd = 0; - if (dictSize > 0) { - if (dictContentType == ZSTD_dct_rawContent) { - BYTE const* const dictEnd = (const BYTE*)dict + dictSize; - ZSTD_window_update(&serialState->ldmState.window, dict, dictSize, /* forceNonContiguous */ 0); - ZSTD_ldm_fillHashTable(&serialState->ldmState, (const BYTE*)dict, dictEnd, ¶ms.ldmParams); - serialState->ldmState.loadedDictEnd = params.forceWindow ? 0 : (U32)(dictEnd - serialState->ldmState.window.base); - } else { - /* don't even load anything */ - } - } - - /* Initialize serialState's copy of ldmWindow. */ - serialState->ldmWindow = serialState->ldmState.window; - } - - serialState->params = params; - serialState->params.jobSize = (U32)jobSize; - return 0; -} - -static int ZSTDMT_serialState_init(SerialState* serialState) -{ - int initError = 0; - ZSTD_memset(serialState, 0, sizeof(*serialState)); - initError |= ZSTD_pthread_mutex_init(&serialState->mutex, NULL); - initError |= ZSTD_pthread_cond_init(&serialState->cond, NULL); - initError |= ZSTD_pthread_mutex_init(&serialState->ldmWindowMutex, NULL); - initError |= ZSTD_pthread_cond_init(&serialState->ldmWindowCond, NULL); - return initError; -} - -static void ZSTDMT_serialState_free(SerialState* serialState) -{ - ZSTD_customMem cMem = serialState->params.customMem; - ZSTD_pthread_mutex_destroy(&serialState->mutex); - ZSTD_pthread_cond_destroy(&serialState->cond); - ZSTD_pthread_mutex_destroy(&serialState->ldmWindowMutex); - ZSTD_pthread_cond_destroy(&serialState->ldmWindowCond); - ZSTD_customFree(serialState->ldmState.hashTable, cMem); - ZSTD_customFree(serialState->ldmState.bucketOffsets, cMem); -} - -static void -ZSTDMT_serialState_genSequences(SerialState* serialState, - RawSeqStore_t* seqStore, - Range src, unsigned jobID) -{ - /* Wait for our turn */ - ZSTD_PTHREAD_MUTEX_LOCK(&serialState->mutex); - while (serialState->nextJobID < jobID) { - DEBUGLOG(5, "wait for serialState->cond"); - ZSTD_pthread_cond_wait(&serialState->cond, &serialState->mutex); - } - /* A future job may error and skip our job */ - if (serialState->nextJobID == jobID) { - /* It is now our turn, do any processing necessary */ - if (serialState->params.ldmParams.enableLdm == ZSTD_ps_enable) { - size_t error; - DEBUGLOG(6, "ZSTDMT_serialState_genSequences: LDM update"); - assert(seqStore->seq != NULL && seqStore->pos == 0 && - seqStore->size == 0 && seqStore->capacity > 0); - assert(src.size <= serialState->params.jobSize); - ZSTD_window_update(&serialState->ldmState.window, src.start, src.size, /* forceNonContiguous */ 0); - error = ZSTD_ldm_generateSequences( - &serialState->ldmState, seqStore, - &serialState->params.ldmParams, src.start, src.size); - /* We provide a large enough buffer to never fail. */ - assert(!ZSTD_isError(error)); (void)error; - /* Update ldmWindow to match the ldmState.window and signal the main - * thread if it is waiting for a buffer. - */ - ZSTD_PTHREAD_MUTEX_LOCK(&serialState->ldmWindowMutex); - serialState->ldmWindow = serialState->ldmState.window; - ZSTD_pthread_cond_signal(&serialState->ldmWindowCond); - ZSTD_pthread_mutex_unlock(&serialState->ldmWindowMutex); - } - if (serialState->params.fParams.checksumFlag && src.size > 0) - XXH64_update(&serialState->xxhState, src.start, src.size); - } - /* Now it is the next jobs turn */ - serialState->nextJobID++; - ZSTD_pthread_cond_broadcast(&serialState->cond); - ZSTD_pthread_mutex_unlock(&serialState->mutex); -} - -static void -ZSTDMT_serialState_applySequences(const SerialState* serialState, /* just for an assert() check */ - ZSTD_CCtx* jobCCtx, - const RawSeqStore_t* seqStore) -{ - if (seqStore->size > 0) { - DEBUGLOG(5, "ZSTDMT_serialState_applySequences: uploading %u external sequences", (unsigned)seqStore->size); - assert(serialState->params.ldmParams.enableLdm == ZSTD_ps_enable); (void)serialState; - assert(jobCCtx); - ZSTD_referenceExternalSequences(jobCCtx, seqStore->seq, seqStore->size); - } -} - -static void ZSTDMT_serialState_ensureFinished(SerialState* serialState, - unsigned jobID, size_t cSize) -{ - ZSTD_PTHREAD_MUTEX_LOCK(&serialState->mutex); - if (serialState->nextJobID <= jobID) { - assert(ZSTD_isError(cSize)); (void)cSize; - DEBUGLOG(5, "Skipping past job %u because of error", jobID); - serialState->nextJobID = jobID + 1; - ZSTD_pthread_cond_broadcast(&serialState->cond); - - ZSTD_PTHREAD_MUTEX_LOCK(&serialState->ldmWindowMutex); - ZSTD_window_clear(&serialState->ldmWindow); - ZSTD_pthread_cond_signal(&serialState->ldmWindowCond); - ZSTD_pthread_mutex_unlock(&serialState->ldmWindowMutex); - } - ZSTD_pthread_mutex_unlock(&serialState->mutex); - -} - - -/* ------------------------------------------ */ -/* ===== Worker thread ===== */ -/* ------------------------------------------ */ - -static const Range kNullRange = { NULL, 0 }; - -typedef struct { - size_t consumed; /* SHARED - set0 by mtctx, then modified by worker AND read by mtctx */ - size_t cSize; /* SHARED - set0 by mtctx, then modified by worker AND read by mtctx, then set0 by mtctx */ - ZSTD_pthread_mutex_t job_mutex; /* Thread-safe - used by mtctx and worker */ - ZSTD_pthread_cond_t job_cond; /* Thread-safe - used by mtctx and worker */ - ZSTDMT_CCtxPool* cctxPool; /* Thread-safe - used by mtctx and (all) workers */ - ZSTDMT_bufferPool* bufPool; /* Thread-safe - used by mtctx and (all) workers */ - ZSTDMT_seqPool* seqPool; /* Thread-safe - used by mtctx and (all) workers */ - SerialState* serial; /* Thread-safe - used by mtctx and (all) workers */ - Buffer dstBuff; /* set by worker (or mtctx), then read by worker & mtctx, then modified by mtctx => no barrier */ - Range prefix; /* set by mtctx, then read by worker & mtctx => no barrier */ - Range src; /* set by mtctx, then read by worker & mtctx => no barrier */ - unsigned jobID; /* set by mtctx, then read by worker => no barrier */ - unsigned firstJob; /* set by mtctx, then read by worker => no barrier */ - unsigned lastJob; /* set by mtctx, then read by worker => no barrier */ - ZSTD_CCtx_params params; /* set by mtctx, then read by worker => no barrier */ - const ZSTD_CDict* cdict; /* set by mtctx, then read by worker => no barrier */ - unsigned long long fullFrameSize; /* set by mtctx, then read by worker => no barrier */ - size_t dstFlushed; /* used only by mtctx */ - unsigned frameChecksumNeeded; /* used only by mtctx */ -} ZSTDMT_jobDescription; - -#define JOB_ERROR(e) \ - do { \ - ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); \ - job->cSize = e; \ - ZSTD_pthread_mutex_unlock(&job->job_mutex); \ - goto _endJob; \ - } while (0) - -/* ZSTDMT_compressionJob() is a POOL_function type */ -static void ZSTDMT_compressionJob(void* jobDescription) -{ - ZSTDMT_jobDescription* const job = (ZSTDMT_jobDescription*)jobDescription; - ZSTD_CCtx_params jobParams = job->params; /* do not modify job->params ! copy it, modify the copy */ - ZSTD_CCtx* const cctx = ZSTDMT_getCCtx(job->cctxPool); - RawSeqStore_t rawSeqStore = ZSTDMT_getSeq(job->seqPool); - Buffer dstBuff = job->dstBuff; - size_t lastCBlockSize = 0; - - DEBUGLOG(5, "ZSTDMT_compressionJob: job %u", job->jobID); - /* resources */ - if (cctx==NULL) JOB_ERROR(ERROR(memory_allocation)); - if (dstBuff.start == NULL) { /* streaming job : doesn't provide a dstBuffer */ - dstBuff = ZSTDMT_getBuffer(job->bufPool); - if (dstBuff.start==NULL) JOB_ERROR(ERROR(memory_allocation)); - job->dstBuff = dstBuff; /* this value can be read in ZSTDMT_flush, when it copies the whole job */ - } - if (jobParams.ldmParams.enableLdm == ZSTD_ps_enable && rawSeqStore.seq == NULL) - JOB_ERROR(ERROR(memory_allocation)); - - /* Don't compute the checksum for chunks, since we compute it externally, - * but write it in the header. - */ - if (job->jobID != 0) jobParams.fParams.checksumFlag = 0; - /* Don't run LDM for the chunks, since we handle it externally */ - jobParams.ldmParams.enableLdm = ZSTD_ps_disable; - /* Correct nbWorkers to 0. */ - jobParams.nbWorkers = 0; - - - /* init */ - - /* Perform serial step as early as possible */ - ZSTDMT_serialState_genSequences(job->serial, &rawSeqStore, job->src, job->jobID); - - if (job->cdict) { - size_t const initError = ZSTD_compressBegin_advanced_internal(cctx, NULL, 0, ZSTD_dct_auto, ZSTD_dtlm_fast, job->cdict, &jobParams, job->fullFrameSize); - assert(job->firstJob); /* only allowed for first job */ - if (ZSTD_isError(initError)) JOB_ERROR(initError); - } else { - U64 const pledgedSrcSize = job->firstJob ? job->fullFrameSize : job->src.size; - { size_t const forceWindowError = ZSTD_CCtxParams_setParameter(&jobParams, ZSTD_c_forceMaxWindow, !job->firstJob); - if (ZSTD_isError(forceWindowError)) JOB_ERROR(forceWindowError); - } - if (!job->firstJob) { - size_t const err = ZSTD_CCtxParams_setParameter(&jobParams, ZSTD_c_deterministicRefPrefix, 0); - if (ZSTD_isError(err)) JOB_ERROR(err); - } - DEBUGLOG(6, "ZSTDMT_compressionJob: job %u: loading prefix of size %zu", job->jobID, job->prefix.size); - { size_t const initError = ZSTD_compressBegin_advanced_internal(cctx, - job->prefix.start, job->prefix.size, ZSTD_dct_rawContent, - ZSTD_dtlm_fast, - NULL, /*cdict*/ - &jobParams, pledgedSrcSize); - if (ZSTD_isError(initError)) JOB_ERROR(initError); - } } - - /* External Sequences can only be applied after CCtx initialization */ - ZSTDMT_serialState_applySequences(job->serial, cctx, &rawSeqStore); - - if (!job->firstJob) { /* flush and overwrite frame header when it's not first job */ - size_t const hSize = ZSTD_compressContinue_public(cctx, dstBuff.start, dstBuff.capacity, job->src.start, 0); - if (ZSTD_isError(hSize)) JOB_ERROR(hSize); - DEBUGLOG(5, "ZSTDMT_compressionJob: flush and overwrite %u bytes of frame header (not first job)", (U32)hSize); - ZSTD_invalidateRepCodes(cctx); - } - - /* compress the entire job by smaller chunks, for better granularity */ - { size_t const chunkSize = 4*ZSTD_BLOCKSIZE_MAX; - int const nbChunks = (int)((job->src.size + (chunkSize-1)) / chunkSize); - const BYTE* ip = (const BYTE*) job->src.start; - BYTE* const ostart = (BYTE*)dstBuff.start; - BYTE* op = ostart; - BYTE* oend = op + dstBuff.capacity; - int chunkNb; - if (sizeof(size_t) > sizeof(int)) assert(job->src.size < ((size_t)INT_MAX) * chunkSize); /* check overflow */ - DEBUGLOG(5, "ZSTDMT_compressionJob: compress %u bytes in %i blocks", (U32)job->src.size, nbChunks); - assert(job->cSize == 0); - for (chunkNb = 1; chunkNb < nbChunks; chunkNb++) { - size_t const cSize = ZSTD_compressContinue_public(cctx, op, oend-op, ip, chunkSize); - if (ZSTD_isError(cSize)) JOB_ERROR(cSize); - ip += chunkSize; - op += cSize; assert(op < oend); - /* stats */ - ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); - job->cSize += cSize; - job->consumed = chunkSize * chunkNb; - DEBUGLOG(5, "ZSTDMT_compressionJob: compress new block : cSize==%u bytes (total: %u)", - (U32)cSize, (U32)job->cSize); - ZSTD_pthread_cond_signal(&job->job_cond); /* warns some more data is ready to be flushed */ - ZSTD_pthread_mutex_unlock(&job->job_mutex); - } - /* last block */ - assert(chunkSize > 0); - assert((chunkSize & (chunkSize - 1)) == 0); /* chunkSize must be power of 2 for mask==(chunkSize-1) to work */ - if ((nbChunks > 0) | job->lastJob /*must output a "last block" flag*/ ) { - size_t const lastBlockSize1 = job->src.size & (chunkSize-1); - size_t const lastBlockSize = ((lastBlockSize1==0) & (job->src.size>=chunkSize)) ? chunkSize : lastBlockSize1; - size_t const cSize = (job->lastJob) ? - ZSTD_compressEnd_public(cctx, op, oend-op, ip, lastBlockSize) : - ZSTD_compressContinue_public(cctx, op, oend-op, ip, lastBlockSize); - if (ZSTD_isError(cSize)) JOB_ERROR(cSize); - lastCBlockSize = cSize; - } } - if (!job->firstJob) { - /* Double check that we don't have an ext-dict, because then our - * repcode invalidation doesn't work. - */ - assert(!ZSTD_window_hasExtDict(cctx->blockState.matchState.window)); - } - ZSTD_CCtx_trace(cctx, 0); - -_endJob: - ZSTDMT_serialState_ensureFinished(job->serial, job->jobID, job->cSize); - if (job->prefix.size > 0) - DEBUGLOG(5, "Finished with prefix: %zx", (size_t)job->prefix.start); - DEBUGLOG(5, "Finished with source: %zx", (size_t)job->src.start); - /* release resources */ - ZSTDMT_releaseSeq(job->seqPool, rawSeqStore); - ZSTDMT_releaseCCtx(job->cctxPool, cctx); - /* report */ - ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); - if (ZSTD_isError(job->cSize)) assert(lastCBlockSize == 0); - job->cSize += lastCBlockSize; - job->consumed = job->src.size; /* when job->consumed == job->src.size , compression job is presumed completed */ - ZSTD_pthread_cond_signal(&job->job_cond); - ZSTD_pthread_mutex_unlock(&job->job_mutex); -} - - -/* ------------------------------------------ */ -/* ===== Multi-threaded compression ===== */ -/* ------------------------------------------ */ - -typedef struct { - Range prefix; /* read-only non-owned prefix buffer */ - Buffer buffer; - size_t filled; -} InBuff_t; - -typedef struct { - BYTE* buffer; /* The round input buffer. All jobs get references - * to pieces of the buffer. ZSTDMT_tryGetInputRange() - * handles handing out job input buffers, and makes - * sure it doesn't overlap with any pieces still in use. - */ - size_t capacity; /* The capacity of buffer. */ - size_t pos; /* The position of the current inBuff in the round - * buffer. Updated past the end if the inBuff once - * the inBuff is sent to the worker thread. - * pos <= capacity. - */ -} RoundBuff_t; - -static const RoundBuff_t kNullRoundBuff = {NULL, 0, 0}; - -#define RSYNC_LENGTH 32 -/* Don't create chunks smaller than the zstd block size. - * This stops us from regressing compression ratio too much, - * and ensures our output fits in ZSTD_compressBound(). - * - * If this is shrunk < ZSTD_BLOCKSIZELOG_MIN then - * ZSTD_COMPRESSBOUND() will need to be updated. - */ -#define RSYNC_MIN_BLOCK_LOG ZSTD_BLOCKSIZELOG_MAX -#define RSYNC_MIN_BLOCK_SIZE (1< one job is already prepared, but pool has shortage of workers. Don't create a new job. */ - InBuff_t inBuff; - RoundBuff_t roundBuff; - SerialState serial; - RSyncState_t rsync; - unsigned jobIDMask; - unsigned doneJobID; - unsigned nextJobID; - unsigned frameEnded; - unsigned allJobsCompleted; - unsigned long long frameContentSize; - unsigned long long consumed; - unsigned long long produced; - ZSTD_customMem cMem; - ZSTD_CDict* cdictLocal; - const ZSTD_CDict* cdict; - unsigned providedFactory: 1; -}; - -static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nbJobs, ZSTD_customMem cMem) -{ - U32 jobNb; - if (jobTable == NULL) return; - for (jobNb=0; jobNb mtctx->jobIDMask+1) { /* need more job capacity */ - ZSTDMT_freeJobsTable(mtctx->jobs, mtctx->jobIDMask+1, mtctx->cMem); - mtctx->jobIDMask = 0; - mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, mtctx->cMem); - if (mtctx->jobs==NULL) return ERROR(memory_allocation); - assert((nbJobs != 0) && ((nbJobs & (nbJobs - 1)) == 0)); /* ensure nbJobs is a power of 2 */ - mtctx->jobIDMask = nbJobs - 1; - } - return 0; -} - - -/* ZSTDMT_CCtxParam_setNbWorkers(): - * Internal use only */ -static size_t ZSTDMT_CCtxParam_setNbWorkers(ZSTD_CCtx_params* params, unsigned nbWorkers) -{ - return ZSTD_CCtxParams_setParameter(params, ZSTD_c_nbWorkers, (int)nbWorkers); -} - -MEM_STATIC ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced_internal(unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool* pool) -{ - ZSTDMT_CCtx* mtctx; - U32 nbJobs = nbWorkers + 2; - int initError; - DEBUGLOG(3, "ZSTDMT_createCCtx_advanced (nbWorkers = %u)", nbWorkers); - - if (nbWorkers < 1) return NULL; - nbWorkers = MIN(nbWorkers , ZSTDMT_NBWORKERS_MAX); - if ((cMem.customAlloc!=NULL) ^ (cMem.customFree!=NULL)) - /* invalid custom allocator */ - return NULL; - - mtctx = (ZSTDMT_CCtx*) ZSTD_customCalloc(sizeof(ZSTDMT_CCtx), cMem); - if (!mtctx) return NULL; - ZSTDMT_CCtxParam_setNbWorkers(&mtctx->params, nbWorkers); - mtctx->cMem = cMem; - mtctx->allJobsCompleted = 1; - if (pool != NULL) { - mtctx->factory = pool; - mtctx->providedFactory = 1; - } - else { - mtctx->factory = POOL_create_advanced(nbWorkers, 0, cMem); - mtctx->providedFactory = 0; - } - mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, cMem); - assert(nbJobs > 0); assert((nbJobs & (nbJobs - 1)) == 0); /* ensure nbJobs is a power of 2 */ - mtctx->jobIDMask = nbJobs - 1; - mtctx->bufPool = ZSTDMT_createBufferPool(BUF_POOL_MAX_NB_BUFFERS(nbWorkers), cMem); - mtctx->cctxPool = ZSTDMT_createCCtxPool(nbWorkers, cMem); - mtctx->seqPool = ZSTDMT_createSeqPool(nbWorkers, cMem); - initError = ZSTDMT_serialState_init(&mtctx->serial); - mtctx->roundBuff = kNullRoundBuff; - if (!mtctx->factory | !mtctx->jobs | !mtctx->bufPool | !mtctx->cctxPool | !mtctx->seqPool | initError) { - ZSTDMT_freeCCtx(mtctx); - return NULL; - } - DEBUGLOG(3, "mt_cctx created, for %u threads", nbWorkers); - return mtctx; -} - -ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool* pool) -{ -#ifdef ZSTD_MULTITHREAD - return ZSTDMT_createCCtx_advanced_internal(nbWorkers, cMem, pool); -#else - (void)nbWorkers; - (void)cMem; - (void)pool; - return NULL; -#endif -} - - -/* ZSTDMT_releaseAllJobResources() : - * note : ensure all workers are killed first ! */ -static void ZSTDMT_releaseAllJobResources(ZSTDMT_CCtx* mtctx) -{ - unsigned jobID; - DEBUGLOG(3, "ZSTDMT_releaseAllJobResources"); - for (jobID=0; jobID <= mtctx->jobIDMask; jobID++) { - /* Copy the mutex/cond out */ - ZSTD_pthread_mutex_t const mutex = mtctx->jobs[jobID].job_mutex; - ZSTD_pthread_cond_t const cond = mtctx->jobs[jobID].job_cond; - - DEBUGLOG(4, "job%02u: release dst address %08X", jobID, (U32)(size_t)mtctx->jobs[jobID].dstBuff.start); - ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].dstBuff); - - /* Clear the job description, but keep the mutex/cond */ - ZSTD_memset(&mtctx->jobs[jobID], 0, sizeof(mtctx->jobs[jobID])); - mtctx->jobs[jobID].job_mutex = mutex; - mtctx->jobs[jobID].job_cond = cond; - } - mtctx->inBuff.buffer = g_nullBuffer; - mtctx->inBuff.filled = 0; - mtctx->allJobsCompleted = 1; -} - -static void ZSTDMT_waitForAllJobsCompleted(ZSTDMT_CCtx* mtctx) -{ - DEBUGLOG(4, "ZSTDMT_waitForAllJobsCompleted"); - while (mtctx->doneJobID < mtctx->nextJobID) { - unsigned const jobID = mtctx->doneJobID & mtctx->jobIDMask; - ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[jobID].job_mutex); - while (mtctx->jobs[jobID].consumed < mtctx->jobs[jobID].src.size) { - DEBUGLOG(4, "waiting for jobCompleted signal from job %u", mtctx->doneJobID); /* we want to block when waiting for data to flush */ - ZSTD_pthread_cond_wait(&mtctx->jobs[jobID].job_cond, &mtctx->jobs[jobID].job_mutex); - } - ZSTD_pthread_mutex_unlock(&mtctx->jobs[jobID].job_mutex); - mtctx->doneJobID++; - } -} - -size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx) -{ - if (mtctx==NULL) return 0; /* compatible with free on NULL */ - if (!mtctx->providedFactory) - POOL_free(mtctx->factory); /* stop and free worker threads */ - ZSTDMT_releaseAllJobResources(mtctx); /* release job resources into pools first */ - ZSTDMT_freeJobsTable(mtctx->jobs, mtctx->jobIDMask+1, mtctx->cMem); - ZSTDMT_freeBufferPool(mtctx->bufPool); - ZSTDMT_freeCCtxPool(mtctx->cctxPool); - ZSTDMT_freeSeqPool(mtctx->seqPool); - ZSTDMT_serialState_free(&mtctx->serial); - ZSTD_freeCDict(mtctx->cdictLocal); - if (mtctx->roundBuff.buffer) - ZSTD_customFree(mtctx->roundBuff.buffer, mtctx->cMem); - ZSTD_customFree(mtctx, mtctx->cMem); - return 0; -} - -size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx) -{ - if (mtctx == NULL) return 0; /* supports sizeof NULL */ - return sizeof(*mtctx) - + POOL_sizeof(mtctx->factory) - + ZSTDMT_sizeof_bufferPool(mtctx->bufPool) - + (mtctx->jobIDMask+1) * sizeof(ZSTDMT_jobDescription) - + ZSTDMT_sizeof_CCtxPool(mtctx->cctxPool) - + ZSTDMT_sizeof_seqPool(mtctx->seqPool) - + ZSTD_sizeof_CDict(mtctx->cdictLocal) - + mtctx->roundBuff.capacity; -} - - -/* ZSTDMT_resize() : - * @return : error code if fails, 0 on success */ -static size_t ZSTDMT_resize(ZSTDMT_CCtx* mtctx, unsigned nbWorkers) -{ - if (POOL_resize(mtctx->factory, nbWorkers)) return ERROR(memory_allocation); - FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbWorkers) , ""); - mtctx->bufPool = ZSTDMT_expandBufferPool(mtctx->bufPool, BUF_POOL_MAX_NB_BUFFERS(nbWorkers)); - if (mtctx->bufPool == NULL) return ERROR(memory_allocation); - mtctx->cctxPool = ZSTDMT_expandCCtxPool(mtctx->cctxPool, nbWorkers); - if (mtctx->cctxPool == NULL) return ERROR(memory_allocation); - mtctx->seqPool = ZSTDMT_expandSeqPool(mtctx->seqPool, nbWorkers); - if (mtctx->seqPool == NULL) return ERROR(memory_allocation); - ZSTDMT_CCtxParam_setNbWorkers(&mtctx->params, nbWorkers); - return 0; -} - - -/*! ZSTDMT_updateCParams_whileCompressing() : - * Updates a selected set of compression parameters, remaining compatible with currently active frame. - * New parameters will be applied to next compression job. */ -void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZSTD_CCtx_params* cctxParams) -{ - U32 const saved_wlog = mtctx->params.cParams.windowLog; /* Do not modify windowLog while compressing */ - int const compressionLevel = cctxParams->compressionLevel; - DEBUGLOG(5, "ZSTDMT_updateCParams_whileCompressing (level:%i)", - compressionLevel); - mtctx->params.compressionLevel = compressionLevel; - { ZSTD_compressionParameters cParams = ZSTD_getCParamsFromCCtxParams(cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); - cParams.windowLog = saved_wlog; - mtctx->params.cParams = cParams; - } -} - -/* ZSTDMT_getFrameProgression(): - * tells how much data has been consumed (input) and produced (output) for current frame. - * able to count progression inside worker threads. - * Note : mutex will be acquired during statistics collection inside workers. */ -ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx) -{ - ZSTD_frameProgression fps; - DEBUGLOG(5, "ZSTDMT_getFrameProgression"); - fps.ingested = mtctx->consumed + mtctx->inBuff.filled; - fps.consumed = mtctx->consumed; - fps.produced = fps.flushed = mtctx->produced; - fps.currentJobID = mtctx->nextJobID; - fps.nbActiveWorkers = 0; - { unsigned jobNb; - unsigned lastJobNb = mtctx->nextJobID + mtctx->jobReady; assert(mtctx->jobReady <= 1); - DEBUGLOG(6, "ZSTDMT_getFrameProgression: jobs: from %u to <%u (jobReady:%u)", - mtctx->doneJobID, lastJobNb, mtctx->jobReady); - for (jobNb = mtctx->doneJobID ; jobNb < lastJobNb ; jobNb++) { - unsigned const wJobID = jobNb & mtctx->jobIDMask; - ZSTDMT_jobDescription* jobPtr = &mtctx->jobs[wJobID]; - ZSTD_pthread_mutex_lock(&jobPtr->job_mutex); - { size_t const cResult = jobPtr->cSize; - size_t const produced = ZSTD_isError(cResult) ? 0 : cResult; - size_t const flushed = ZSTD_isError(cResult) ? 0 : jobPtr->dstFlushed; - assert(flushed <= produced); - fps.ingested += jobPtr->src.size; - fps.consumed += jobPtr->consumed; - fps.produced += produced; - fps.flushed += flushed; - fps.nbActiveWorkers += (jobPtr->consumed < jobPtr->src.size); - } - ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); - } - } - return fps; -} - - -size_t ZSTDMT_toFlushNow(ZSTDMT_CCtx* mtctx) -{ - size_t toFlush; - unsigned const jobID = mtctx->doneJobID; - assert(jobID <= mtctx->nextJobID); - if (jobID == mtctx->nextJobID) return 0; /* no active job => nothing to flush */ - - /* look into oldest non-fully-flushed job */ - { unsigned const wJobID = jobID & mtctx->jobIDMask; - ZSTDMT_jobDescription* const jobPtr = &mtctx->jobs[wJobID]; - ZSTD_pthread_mutex_lock(&jobPtr->job_mutex); - { size_t const cResult = jobPtr->cSize; - size_t const produced = ZSTD_isError(cResult) ? 0 : cResult; - size_t const flushed = ZSTD_isError(cResult) ? 0 : jobPtr->dstFlushed; - assert(flushed <= produced); - assert(jobPtr->consumed <= jobPtr->src.size); - toFlush = produced - flushed; - /* if toFlush==0, nothing is available to flush. - * However, jobID is expected to still be active: - * if jobID was already completed and fully flushed, - * ZSTDMT_flushProduced() should have already moved onto next job. - * Therefore, some input has not yet been consumed. */ - if (toFlush==0) { - assert(jobPtr->consumed < jobPtr->src.size); - } - } - ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); - } - - return toFlush; -} - - -/* ------------------------------------------ */ -/* ===== Multi-threaded compression ===== */ -/* ------------------------------------------ */ - -static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params) -{ - unsigned jobLog; - if (params->ldmParams.enableLdm == ZSTD_ps_enable) { - /* In Long Range Mode, the windowLog is typically oversized. - * In which case, it's preferable to determine the jobSize - * based on cycleLog instead. */ - jobLog = MAX(21, ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy) + 3); - } else { - jobLog = MAX(20, params->cParams.windowLog + 2); - } - return MIN(jobLog, (unsigned)ZSTDMT_JOBLOG_MAX); -} - -static int ZSTDMT_overlapLog_default(ZSTD_strategy strat) -{ - switch(strat) - { - case ZSTD_btultra2: - return 9; - case ZSTD_btultra: - case ZSTD_btopt: - return 8; - case ZSTD_btlazy2: - case ZSTD_lazy2: - return 7; - case ZSTD_lazy: - case ZSTD_greedy: - case ZSTD_dfast: - case ZSTD_fast: - default:; - } - return 6; -} - -static int ZSTDMT_overlapLog(int ovlog, ZSTD_strategy strat) -{ - assert(0 <= ovlog && ovlog <= 9); - if (ovlog == 0) return ZSTDMT_overlapLog_default(strat); - return ovlog; -} - -static size_t ZSTDMT_computeOverlapSize(const ZSTD_CCtx_params* params) -{ - int const overlapRLog = 9 - ZSTDMT_overlapLog(params->overlapLog, params->cParams.strategy); - int ovLog = (overlapRLog >= 8) ? 0 : (params->cParams.windowLog - overlapRLog); - assert(0 <= overlapRLog && overlapRLog <= 8); - if (params->ldmParams.enableLdm == ZSTD_ps_enable) { - /* In Long Range Mode, the windowLog is typically oversized. - * In which case, it's preferable to determine the jobSize - * based on chainLog instead. - * Then, ovLog becomes a fraction of the jobSize, rather than windowSize */ - ovLog = MIN(params->cParams.windowLog, ZSTDMT_computeTargetJobLog(params) - 2) - - overlapRLog; - } - assert(0 <= ovLog && ovLog <= ZSTD_WINDOWLOG_MAX); - DEBUGLOG(4, "overlapLog : %i", params->overlapLog); - DEBUGLOG(4, "overlap size : %i", 1 << ovLog); - return (ovLog==0) ? 0 : (size_t)1 << ovLog; -} - -/* ====================================== */ -/* ======= Streaming API ======= */ -/* ====================================== */ - -size_t ZSTDMT_initCStream_internal( - ZSTDMT_CCtx* mtctx, - const void* dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, - const ZSTD_CDict* cdict, ZSTD_CCtx_params params, - unsigned long long pledgedSrcSize) -{ - DEBUGLOG(4, "ZSTDMT_initCStream_internal (pledgedSrcSize=%u, nbWorkers=%u, cctxPool=%u)", - (U32)pledgedSrcSize, params.nbWorkers, mtctx->cctxPool->totalCCtx); - - /* params supposed partially fully validated at this point */ - assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams))); - assert(!((dict) && (cdict))); /* either dict or cdict, not both */ - - /* init */ - if (params.nbWorkers != mtctx->params.nbWorkers) - FORWARD_IF_ERROR( ZSTDMT_resize(mtctx, (unsigned)params.nbWorkers) , ""); - - if (params.jobSize != 0 && params.jobSize < ZSTDMT_JOBSIZE_MIN) params.jobSize = ZSTDMT_JOBSIZE_MIN; - if (params.jobSize > (size_t)ZSTDMT_JOBSIZE_MAX) params.jobSize = (size_t)ZSTDMT_JOBSIZE_MAX; - - if (mtctx->allJobsCompleted == 0) { /* previous compression not correctly finished */ - ZSTDMT_waitForAllJobsCompleted(mtctx); - ZSTDMT_releaseAllJobResources(mtctx); - mtctx->allJobsCompleted = 1; - } - - mtctx->params = params; - mtctx->frameContentSize = pledgedSrcSize; - ZSTD_freeCDict(mtctx->cdictLocal); - if (dict) { - mtctx->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize, - ZSTD_dlm_byCopy, dictContentType, /* note : a loadPrefix becomes an internal CDict */ - params.cParams, mtctx->cMem); - mtctx->cdict = mtctx->cdictLocal; - if (mtctx->cdictLocal == NULL) return ERROR(memory_allocation); - } else { - mtctx->cdictLocal = NULL; - mtctx->cdict = cdict; - } - - mtctx->targetPrefixSize = ZSTDMT_computeOverlapSize(¶ms); - DEBUGLOG(4, "overlapLog=%i => %u KB", params.overlapLog, (U32)(mtctx->targetPrefixSize>>10)); - mtctx->targetSectionSize = params.jobSize; - if (mtctx->targetSectionSize == 0) { - mtctx->targetSectionSize = 1ULL << ZSTDMT_computeTargetJobLog(¶ms); - } - assert(mtctx->targetSectionSize <= (size_t)ZSTDMT_JOBSIZE_MAX); - - if (params.rsyncable) { - /* Aim for the targetsectionSize as the average job size. */ - U32 const jobSizeKB = (U32)(mtctx->targetSectionSize >> 10); - U32 const rsyncBits = (assert(jobSizeKB >= 1), ZSTD_highbit32(jobSizeKB) + 10); - /* We refuse to create jobs < RSYNC_MIN_BLOCK_SIZE bytes, so make sure our - * expected job size is at least 4x larger. */ - assert(rsyncBits >= RSYNC_MIN_BLOCK_LOG + 2); - DEBUGLOG(4, "rsyncLog = %u", rsyncBits); - mtctx->rsync.hash = 0; - mtctx->rsync.hitMask = (1ULL << rsyncBits) - 1; - mtctx->rsync.primePower = ZSTD_rollingHash_primePower(RSYNC_LENGTH); - } - if (mtctx->targetSectionSize < mtctx->targetPrefixSize) mtctx->targetSectionSize = mtctx->targetPrefixSize; /* job size must be >= overlap size */ - DEBUGLOG(4, "Job Size : %u KB (note : set to %u)", (U32)(mtctx->targetSectionSize>>10), (U32)params.jobSize); - DEBUGLOG(4, "inBuff Size : %u KB", (U32)(mtctx->targetSectionSize>>10)); - ZSTDMT_setBufferSize(mtctx->bufPool, ZSTD_compressBound(mtctx->targetSectionSize)); - { - /* If ldm is enabled we need windowSize space. */ - size_t const windowSize = mtctx->params.ldmParams.enableLdm == ZSTD_ps_enable ? (1U << mtctx->params.cParams.windowLog) : 0; - /* Two buffers of slack, plus extra space for the overlap - * This is the minimum slack that LDM works with. One extra because - * flush might waste up to targetSectionSize-1 bytes. Another extra - * for the overlap (if > 0), then one to fill which doesn't overlap - * with the LDM window. - */ - size_t const nbSlackBuffers = 2 + (mtctx->targetPrefixSize > 0); - size_t const slackSize = mtctx->targetSectionSize * nbSlackBuffers; - /* Compute the total size, and always have enough slack */ - size_t const nbWorkers = MAX(mtctx->params.nbWorkers, 1); - size_t const sectionsSize = mtctx->targetSectionSize * nbWorkers; - size_t const capacity = MAX(windowSize, sectionsSize) + slackSize; - if (mtctx->roundBuff.capacity < capacity) { - if (mtctx->roundBuff.buffer) - ZSTD_customFree(mtctx->roundBuff.buffer, mtctx->cMem); - mtctx->roundBuff.buffer = (BYTE*)ZSTD_customMalloc(capacity, mtctx->cMem); - if (mtctx->roundBuff.buffer == NULL) { - mtctx->roundBuff.capacity = 0; - return ERROR(memory_allocation); - } - mtctx->roundBuff.capacity = capacity; - } - } - DEBUGLOG(4, "roundBuff capacity : %u KB", (U32)(mtctx->roundBuff.capacity>>10)); - mtctx->roundBuff.pos = 0; - mtctx->inBuff.buffer = g_nullBuffer; - mtctx->inBuff.filled = 0; - mtctx->inBuff.prefix = kNullRange; - mtctx->doneJobID = 0; - mtctx->nextJobID = 0; - mtctx->frameEnded = 0; - mtctx->allJobsCompleted = 0; - mtctx->consumed = 0; - mtctx->produced = 0; - - /* update dictionary */ - ZSTD_freeCDict(mtctx->cdictLocal); - mtctx->cdictLocal = NULL; - mtctx->cdict = NULL; - if (dict) { - if (dictContentType == ZSTD_dct_rawContent) { - mtctx->inBuff.prefix.start = (const BYTE*)dict; - mtctx->inBuff.prefix.size = dictSize; - } else { - /* note : a loadPrefix becomes an internal CDict */ - mtctx->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize, - ZSTD_dlm_byRef, dictContentType, - params.cParams, mtctx->cMem); - mtctx->cdict = mtctx->cdictLocal; - if (mtctx->cdictLocal == NULL) return ERROR(memory_allocation); - } - } else { - mtctx->cdict = cdict; - } - - if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, mtctx->targetSectionSize, - dict, dictSize, dictContentType)) - return ERROR(memory_allocation); - - - return 0; -} - - -/* ZSTDMT_writeLastEmptyBlock() - * Write a single empty block with an end-of-frame to finish a frame. - * Job must be created from streaming variant. - * This function is always successful if expected conditions are fulfilled. - */ -static void ZSTDMT_writeLastEmptyBlock(ZSTDMT_jobDescription* job) -{ - assert(job->lastJob == 1); - assert(job->src.size == 0); /* last job is empty -> will be simplified into a last empty block */ - assert(job->firstJob == 0); /* cannot be first job, as it also needs to create frame header */ - assert(job->dstBuff.start == NULL); /* invoked from streaming variant only (otherwise, dstBuff might be user's output) */ - job->dstBuff = ZSTDMT_getBuffer(job->bufPool); - if (job->dstBuff.start == NULL) { - job->cSize = ERROR(memory_allocation); - return; - } - assert(job->dstBuff.capacity >= ZSTD_blockHeaderSize); /* no buffer should ever be that small */ - job->src = kNullRange; - job->cSize = ZSTD_writeLastEmptyBlock(job->dstBuff.start, job->dstBuff.capacity); - assert(!ZSTD_isError(job->cSize)); - assert(job->consumed == 0); -} - -static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* mtctx, size_t srcSize, ZSTD_EndDirective endOp) -{ - unsigned const jobID = mtctx->nextJobID & mtctx->jobIDMask; - int const endFrame = (endOp == ZSTD_e_end); - - if (mtctx->nextJobID > mtctx->doneJobID + mtctx->jobIDMask) { - DEBUGLOG(5, "ZSTDMT_createCompressionJob: will not create new job : table is full"); - assert((mtctx->nextJobID & mtctx->jobIDMask) == (mtctx->doneJobID & mtctx->jobIDMask)); - return 0; - } - - if (!mtctx->jobReady) { - BYTE const* src = (BYTE const*)mtctx->inBuff.buffer.start; - DEBUGLOG(5, "ZSTDMT_createCompressionJob: preparing job %u to compress %u bytes with %u preload ", - mtctx->nextJobID, (U32)srcSize, (U32)mtctx->inBuff.prefix.size); - mtctx->jobs[jobID].src.start = src; - mtctx->jobs[jobID].src.size = srcSize; - assert(mtctx->inBuff.filled >= srcSize); - mtctx->jobs[jobID].prefix = mtctx->inBuff.prefix; - mtctx->jobs[jobID].consumed = 0; - mtctx->jobs[jobID].cSize = 0; - mtctx->jobs[jobID].params = mtctx->params; - mtctx->jobs[jobID].cdict = mtctx->nextJobID==0 ? mtctx->cdict : NULL; - mtctx->jobs[jobID].fullFrameSize = mtctx->frameContentSize; - mtctx->jobs[jobID].dstBuff = g_nullBuffer; - mtctx->jobs[jobID].cctxPool = mtctx->cctxPool; - mtctx->jobs[jobID].bufPool = mtctx->bufPool; - mtctx->jobs[jobID].seqPool = mtctx->seqPool; - mtctx->jobs[jobID].serial = &mtctx->serial; - mtctx->jobs[jobID].jobID = mtctx->nextJobID; - mtctx->jobs[jobID].firstJob = (mtctx->nextJobID==0); - mtctx->jobs[jobID].lastJob = endFrame; - mtctx->jobs[jobID].frameChecksumNeeded = mtctx->params.fParams.checksumFlag && endFrame && (mtctx->nextJobID>0); - mtctx->jobs[jobID].dstFlushed = 0; - - /* Update the round buffer pos and clear the input buffer to be reset */ - mtctx->roundBuff.pos += srcSize; - mtctx->inBuff.buffer = g_nullBuffer; - mtctx->inBuff.filled = 0; - /* Set the prefix for next job */ - if (!endFrame) { - size_t const newPrefixSize = MIN(srcSize, mtctx->targetPrefixSize); - mtctx->inBuff.prefix.start = src + srcSize - newPrefixSize; - mtctx->inBuff.prefix.size = newPrefixSize; - } else { /* endFrame==1 => no need for another input buffer */ - mtctx->inBuff.prefix = kNullRange; - mtctx->frameEnded = endFrame; - if (mtctx->nextJobID == 0) { - /* single job exception : checksum is already calculated directly within worker thread */ - mtctx->params.fParams.checksumFlag = 0; - } } - - if ( (srcSize == 0) - && (mtctx->nextJobID>0)/*single job must also write frame header*/ ) { - DEBUGLOG(5, "ZSTDMT_createCompressionJob: creating a last empty block to end frame"); - assert(endOp == ZSTD_e_end); /* only possible case : need to end the frame with an empty last block */ - ZSTDMT_writeLastEmptyBlock(mtctx->jobs + jobID); - mtctx->nextJobID++; - return 0; - } - } - - DEBUGLOG(5, "ZSTDMT_createCompressionJob: posting job %u : %u bytes (end:%u, jobNb == %u (mod:%u))", - mtctx->nextJobID, - (U32)mtctx->jobs[jobID].src.size, - mtctx->jobs[jobID].lastJob, - mtctx->nextJobID, - jobID); - if (POOL_tryAdd(mtctx->factory, ZSTDMT_compressionJob, &mtctx->jobs[jobID])) { - mtctx->nextJobID++; - mtctx->jobReady = 0; - } else { - DEBUGLOG(5, "ZSTDMT_createCompressionJob: no worker available for job %u", mtctx->nextJobID); - mtctx->jobReady = 1; - } - return 0; -} - - -/*! ZSTDMT_flushProduced() : - * flush whatever data has been produced but not yet flushed in current job. - * move to next job if current one is fully flushed. - * `output` : `pos` will be updated with amount of data flushed . - * `blockToFlush` : if >0, the function will block and wait if there is no data available to flush . - * @return : amount of data remaining within internal buffer, 0 if no more, 1 if unknown but > 0, or an error code */ -static size_t ZSTDMT_flushProduced(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* output, unsigned blockToFlush, ZSTD_EndDirective end) -{ - unsigned const wJobID = mtctx->doneJobID & mtctx->jobIDMask; - DEBUGLOG(5, "ZSTDMT_flushProduced (blocking:%u , job %u <= %u)", - blockToFlush, mtctx->doneJobID, mtctx->nextJobID); - assert(output->size >= output->pos); - - ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); - if ( blockToFlush - && (mtctx->doneJobID < mtctx->nextJobID) ) { - assert(mtctx->jobs[wJobID].dstFlushed <= mtctx->jobs[wJobID].cSize); - while (mtctx->jobs[wJobID].dstFlushed == mtctx->jobs[wJobID].cSize) { /* nothing to flush */ - if (mtctx->jobs[wJobID].consumed == mtctx->jobs[wJobID].src.size) { - DEBUGLOG(5, "job %u is completely consumed (%u == %u) => don't wait for cond, there will be none", - mtctx->doneJobID, (U32)mtctx->jobs[wJobID].consumed, (U32)mtctx->jobs[wJobID].src.size); - break; - } - DEBUGLOG(5, "waiting for something to flush from job %u (currently flushed: %u bytes)", - mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); - ZSTD_pthread_cond_wait(&mtctx->jobs[wJobID].job_cond, &mtctx->jobs[wJobID].job_mutex); /* block when nothing to flush but some to come */ - } } - - /* try to flush something */ - { size_t cSize = mtctx->jobs[wJobID].cSize; /* shared */ - size_t const srcConsumed = mtctx->jobs[wJobID].consumed; /* shared */ - size_t const srcSize = mtctx->jobs[wJobID].src.size; /* read-only, could be done after mutex lock, but no-declaration-after-statement */ - ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); - if (ZSTD_isError(cSize)) { - DEBUGLOG(5, "ZSTDMT_flushProduced: job %u : compression error detected : %s", - mtctx->doneJobID, ZSTD_getErrorName(cSize)); - ZSTDMT_waitForAllJobsCompleted(mtctx); - ZSTDMT_releaseAllJobResources(mtctx); - return cSize; - } - /* add frame checksum if necessary (can only happen once) */ - assert(srcConsumed <= srcSize); - if ( (srcConsumed == srcSize) /* job completed -> worker no longer active */ - && mtctx->jobs[wJobID].frameChecksumNeeded ) { - U32 const checksum = (U32)XXH64_digest(&mtctx->serial.xxhState); - DEBUGLOG(4, "ZSTDMT_flushProduced: writing checksum : %08X \n", checksum); - MEM_writeLE32((char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].cSize, checksum); - cSize += 4; - mtctx->jobs[wJobID].cSize += 4; /* can write this shared value, as worker is no longer active */ - mtctx->jobs[wJobID].frameChecksumNeeded = 0; - } - - if (cSize > 0) { /* compression is ongoing or completed */ - size_t const toFlush = MIN(cSize - mtctx->jobs[wJobID].dstFlushed, output->size - output->pos); - DEBUGLOG(5, "ZSTDMT_flushProduced: Flushing %u bytes from job %u (completion:%u/%u, generated:%u)", - (U32)toFlush, mtctx->doneJobID, (U32)srcConsumed, (U32)srcSize, (U32)cSize); - assert(mtctx->doneJobID < mtctx->nextJobID); - assert(cSize >= mtctx->jobs[wJobID].dstFlushed); - assert(mtctx->jobs[wJobID].dstBuff.start != NULL); - if (toFlush > 0) { - ZSTD_memcpy((char*)output->dst + output->pos, - (const char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].dstFlushed, - toFlush); - } - output->pos += toFlush; - mtctx->jobs[wJobID].dstFlushed += toFlush; /* can write : this value is only used by mtctx */ - - if ( (srcConsumed == srcSize) /* job is completed */ - && (mtctx->jobs[wJobID].dstFlushed == cSize) ) { /* output buffer fully flushed => free this job position */ - DEBUGLOG(5, "Job %u completed (%u bytes), moving to next one", - mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); - ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[wJobID].dstBuff); - DEBUGLOG(5, "dstBuffer released"); - mtctx->jobs[wJobID].dstBuff = g_nullBuffer; - mtctx->jobs[wJobID].cSize = 0; /* ensure this job slot is considered "not started" in future check */ - mtctx->consumed += srcSize; - mtctx->produced += cSize; - mtctx->doneJobID++; - } } - - /* return value : how many bytes left in buffer ; fake it to 1 when unknown but >0 */ - if (cSize > mtctx->jobs[wJobID].dstFlushed) return (cSize - mtctx->jobs[wJobID].dstFlushed); - if (srcSize > srcConsumed) return 1; /* current job not completely compressed */ - } - if (mtctx->doneJobID < mtctx->nextJobID) return 1; /* some more jobs ongoing */ - if (mtctx->jobReady) return 1; /* one job is ready to push, just not yet in the list */ - if (mtctx->inBuff.filled > 0) return 1; /* input is not empty, and still needs to be converted into a job */ - mtctx->allJobsCompleted = mtctx->frameEnded; /* all jobs are entirely flushed => if this one is last one, frame is completed */ - if (end == ZSTD_e_end) return !mtctx->frameEnded; /* for ZSTD_e_end, question becomes : is frame completed ? instead of : are internal buffers fully flushed ? */ - return 0; /* internal buffers fully flushed */ -} - -/** - * Returns the range of data used by the earliest job that is not yet complete. - * If the data of the first job is broken up into two segments, we cover both - * sections. - */ -static Range ZSTDMT_getInputDataInUse(ZSTDMT_CCtx* mtctx) -{ - unsigned const firstJobID = mtctx->doneJobID; - unsigned const lastJobID = mtctx->nextJobID; - unsigned jobID; - - /* no need to check during first round */ - size_t roundBuffCapacity = mtctx->roundBuff.capacity; - size_t nbJobs1stRoundMin = roundBuffCapacity / mtctx->targetSectionSize; - if (lastJobID < nbJobs1stRoundMin) return kNullRange; - - for (jobID = firstJobID; jobID < lastJobID; ++jobID) { - unsigned const wJobID = jobID & mtctx->jobIDMask; - size_t consumed; - - ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); - consumed = mtctx->jobs[wJobID].consumed; - ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); - - if (consumed < mtctx->jobs[wJobID].src.size) { - Range range = mtctx->jobs[wJobID].prefix; - if (range.size == 0) { - /* Empty prefix */ - range = mtctx->jobs[wJobID].src; - } - /* Job source in multiple segments not supported yet */ - assert(range.start <= mtctx->jobs[wJobID].src.start); - return range; - } - } - return kNullRange; -} - -/** - * Returns non-zero iff buffer and range overlap. - */ -static int ZSTDMT_isOverlapped(Buffer buffer, Range range) -{ - BYTE const* const bufferStart = (BYTE const*)buffer.start; - BYTE const* const rangeStart = (BYTE const*)range.start; - - if (rangeStart == NULL || bufferStart == NULL) - return 0; - - { - BYTE const* const bufferEnd = bufferStart + buffer.capacity; - BYTE const* const rangeEnd = rangeStart + range.size; - - /* Empty ranges cannot overlap */ - if (bufferStart == bufferEnd || rangeStart == rangeEnd) - return 0; - - return bufferStart < rangeEnd && rangeStart < bufferEnd; - } -} - -static int ZSTDMT_doesOverlapWindow(Buffer buffer, ZSTD_window_t window) -{ - Range extDict; - Range prefix; - - DEBUGLOG(5, "ZSTDMT_doesOverlapWindow"); - extDict.start = window.dictBase + window.lowLimit; - extDict.size = window.dictLimit - window.lowLimit; - - prefix.start = window.base + window.dictLimit; - prefix.size = window.nextSrc - (window.base + window.dictLimit); - DEBUGLOG(5, "extDict [0x%zx, 0x%zx)", - (size_t)extDict.start, - (size_t)extDict.start + extDict.size); - DEBUGLOG(5, "prefix [0x%zx, 0x%zx)", - (size_t)prefix.start, - (size_t)prefix.start + prefix.size); - - return ZSTDMT_isOverlapped(buffer, extDict) - || ZSTDMT_isOverlapped(buffer, prefix); -} - -static void ZSTDMT_waitForLdmComplete(ZSTDMT_CCtx* mtctx, Buffer buffer) -{ - if (mtctx->params.ldmParams.enableLdm == ZSTD_ps_enable) { - ZSTD_pthread_mutex_t* mutex = &mtctx->serial.ldmWindowMutex; - DEBUGLOG(5, "ZSTDMT_waitForLdmComplete"); - DEBUGLOG(5, "source [0x%zx, 0x%zx)", - (size_t)buffer.start, - (size_t)buffer.start + buffer.capacity); - ZSTD_PTHREAD_MUTEX_LOCK(mutex); - while (ZSTDMT_doesOverlapWindow(buffer, mtctx->serial.ldmWindow)) { - DEBUGLOG(5, "Waiting for LDM to finish..."); - ZSTD_pthread_cond_wait(&mtctx->serial.ldmWindowCond, mutex); - } - DEBUGLOG(6, "Done waiting for LDM to finish"); - ZSTD_pthread_mutex_unlock(mutex); - } -} - -/** - * Attempts to set the inBuff to the next section to fill. - * If any part of the new section is still in use we give up. - * Returns non-zero if the buffer is filled. - */ -static int ZSTDMT_tryGetInputRange(ZSTDMT_CCtx* mtctx) -{ - Range const inUse = ZSTDMT_getInputDataInUse(mtctx); - size_t const spaceLeft = mtctx->roundBuff.capacity - mtctx->roundBuff.pos; - size_t const spaceNeeded = mtctx->targetSectionSize; - Buffer buffer; - - DEBUGLOG(5, "ZSTDMT_tryGetInputRange"); - assert(mtctx->inBuff.buffer.start == NULL); - assert(mtctx->roundBuff.capacity >= spaceNeeded); - - if (spaceLeft < spaceNeeded) { - /* ZSTD_invalidateRepCodes() doesn't work for extDict variants. - * Simply copy the prefix to the beginning in that case. - */ - BYTE* const start = (BYTE*)mtctx->roundBuff.buffer; - size_t const prefixSize = mtctx->inBuff.prefix.size; - - buffer.start = start; - buffer.capacity = prefixSize; - if (ZSTDMT_isOverlapped(buffer, inUse)) { - DEBUGLOG(5, "Waiting for buffer..."); - return 0; - } - ZSTDMT_waitForLdmComplete(mtctx, buffer); - ZSTD_memmove(start, mtctx->inBuff.prefix.start, prefixSize); - mtctx->inBuff.prefix.start = start; - mtctx->roundBuff.pos = prefixSize; - } - buffer.start = mtctx->roundBuff.buffer + mtctx->roundBuff.pos; - buffer.capacity = spaceNeeded; - - if (ZSTDMT_isOverlapped(buffer, inUse)) { - DEBUGLOG(5, "Waiting for buffer..."); - return 0; - } - assert(!ZSTDMT_isOverlapped(buffer, mtctx->inBuff.prefix)); - - ZSTDMT_waitForLdmComplete(mtctx, buffer); - - DEBUGLOG(5, "Using prefix range [%zx, %zx)", - (size_t)mtctx->inBuff.prefix.start, - (size_t)mtctx->inBuff.prefix.start + mtctx->inBuff.prefix.size); - DEBUGLOG(5, "Using source range [%zx, %zx)", - (size_t)buffer.start, - (size_t)buffer.start + buffer.capacity); - - - mtctx->inBuff.buffer = buffer; - mtctx->inBuff.filled = 0; - assert(mtctx->roundBuff.pos + buffer.capacity <= mtctx->roundBuff.capacity); - return 1; -} - -typedef struct { - size_t toLoad; /* The number of bytes to load from the input. */ - int flush; /* Boolean declaring if we must flush because we found a synchronization point. */ -} SyncPoint; - -/** - * Searches through the input for a synchronization point. If one is found, we - * will instruct the caller to flush, and return the number of bytes to load. - * Otherwise, we will load as many bytes as possible and instruct the caller - * to continue as normal. - */ -static SyncPoint -findSynchronizationPoint(ZSTDMT_CCtx const* mtctx, ZSTD_inBuffer const input) -{ - BYTE const* const istart = (BYTE const*)input.src + input.pos; - U64 const primePower = mtctx->rsync.primePower; - U64 const hitMask = mtctx->rsync.hitMask; - - SyncPoint syncPoint; - U64 hash; - BYTE const* prev; - size_t pos; - - syncPoint.toLoad = MIN(input.size - input.pos, mtctx->targetSectionSize - mtctx->inBuff.filled); - syncPoint.flush = 0; - if (!mtctx->params.rsyncable) - /* Rsync is disabled. */ - return syncPoint; - if (mtctx->inBuff.filled + input.size - input.pos < RSYNC_MIN_BLOCK_SIZE) - /* We don't emit synchronization points if it would produce too small blocks. - * We don't have enough input to find a synchronization point, so don't look. - */ - return syncPoint; - if (mtctx->inBuff.filled + syncPoint.toLoad < RSYNC_LENGTH) - /* Not enough to compute the hash. - * We will miss any synchronization points in this RSYNC_LENGTH byte - * window. However, since it depends only in the internal buffers, if the - * state is already synchronized, we will remain synchronized. - * Additionally, the probability that we miss a synchronization point is - * low: RSYNC_LENGTH / targetSectionSize. - */ - return syncPoint; - /* Initialize the loop variables. */ - if (mtctx->inBuff.filled < RSYNC_MIN_BLOCK_SIZE) { - /* We don't need to scan the first RSYNC_MIN_BLOCK_SIZE positions - * because they can't possibly be a sync point. So we can start - * part way through the input buffer. - */ - pos = RSYNC_MIN_BLOCK_SIZE - mtctx->inBuff.filled; - if (pos >= RSYNC_LENGTH) { - prev = istart + pos - RSYNC_LENGTH; - hash = ZSTD_rollingHash_compute(prev, RSYNC_LENGTH); - } else { - assert(mtctx->inBuff.filled >= RSYNC_LENGTH); - prev = (BYTE const*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled - RSYNC_LENGTH; - hash = ZSTD_rollingHash_compute(prev + pos, (RSYNC_LENGTH - pos)); - hash = ZSTD_rollingHash_append(hash, istart, pos); - } - } else { - /* We have enough bytes buffered to initialize the hash, - * and have processed enough bytes to find a sync point. - * Start scanning at the beginning of the input. - */ - assert(mtctx->inBuff.filled >= RSYNC_MIN_BLOCK_SIZE); - assert(RSYNC_MIN_BLOCK_SIZE >= RSYNC_LENGTH); - pos = 0; - prev = (BYTE const*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled - RSYNC_LENGTH; - hash = ZSTD_rollingHash_compute(prev, RSYNC_LENGTH); - if ((hash & hitMask) == hitMask) { - /* We're already at a sync point so don't load any more until - * we're able to flush this sync point. - * This likely happened because the job table was full so we - * couldn't add our job. - */ - syncPoint.toLoad = 0; - syncPoint.flush = 1; - return syncPoint; - } - } - /* Starting with the hash of the previous RSYNC_LENGTH bytes, roll - * through the input. If we hit a synchronization point, then cut the - * job off, and tell the compressor to flush the job. Otherwise, load - * all the bytes and continue as normal. - * If we go too long without a synchronization point (targetSectionSize) - * then a block will be emitted anyways, but this is okay, since if we - * are already synchronized we will remain synchronized. - */ - assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); - for (; pos < syncPoint.toLoad; ++pos) { - BYTE const toRemove = pos < RSYNC_LENGTH ? prev[pos] : istart[pos - RSYNC_LENGTH]; - /* This assert is very expensive, and Debian compiles with asserts enabled. - * So disable it for now. We can get similar coverage by checking it at the - * beginning & end of the loop. - * assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); - */ - hash = ZSTD_rollingHash_rotate(hash, toRemove, istart[pos], primePower); - assert(mtctx->inBuff.filled + pos >= RSYNC_MIN_BLOCK_SIZE); - if ((hash & hitMask) == hitMask) { - syncPoint.toLoad = pos + 1; - syncPoint.flush = 1; - ++pos; /* for assert */ - break; - } - } - assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); - return syncPoint; -} - -size_t ZSTDMT_nextInputSizeHint(const ZSTDMT_CCtx* mtctx) -{ - size_t hintInSize = mtctx->targetSectionSize - mtctx->inBuff.filled; - if (hintInSize==0) hintInSize = mtctx->targetSectionSize; - return hintInSize; -} - -/** ZSTDMT_compressStream_generic() : - * internal use only - exposed to be invoked from zstd_compress.c - * assumption : output and input are valid (pos <= size) - * @return : minimum amount of data remaining to flush, 0 if none */ -size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, - ZSTD_outBuffer* output, - ZSTD_inBuffer* input, - ZSTD_EndDirective endOp) -{ - unsigned forwardInputProgress = 0; - DEBUGLOG(5, "ZSTDMT_compressStream_generic (endOp=%u, srcSize=%u)", - (U32)endOp, (U32)(input->size - input->pos)); - assert(output->pos <= output->size); - assert(input->pos <= input->size); - - if ((mtctx->frameEnded) && (endOp==ZSTD_e_continue)) { - /* current frame being ended. Only flush/end are allowed */ - return ERROR(stage_wrong); - } - - /* fill input buffer */ - if ( (!mtctx->jobReady) - && (input->size > input->pos) ) { /* support NULL input */ - if (mtctx->inBuff.buffer.start == NULL) { - assert(mtctx->inBuff.filled == 0); /* Can't fill an empty buffer */ - if (!ZSTDMT_tryGetInputRange(mtctx)) { - /* It is only possible for this operation to fail if there are - * still compression jobs ongoing. - */ - DEBUGLOG(5, "ZSTDMT_tryGetInputRange failed"); - assert(mtctx->doneJobID != mtctx->nextJobID); - } else - DEBUGLOG(5, "ZSTDMT_tryGetInputRange completed successfully : mtctx->inBuff.buffer.start = %p", mtctx->inBuff.buffer.start); - } - if (mtctx->inBuff.buffer.start != NULL) { - SyncPoint const syncPoint = findSynchronizationPoint(mtctx, *input); - if (syncPoint.flush && endOp == ZSTD_e_continue) { - endOp = ZSTD_e_flush; - } - assert(mtctx->inBuff.buffer.capacity >= mtctx->targetSectionSize); - DEBUGLOG(5, "ZSTDMT_compressStream_generic: adding %u bytes on top of %u to buffer of size %u", - (U32)syncPoint.toLoad, (U32)mtctx->inBuff.filled, (U32)mtctx->targetSectionSize); - ZSTD_memcpy((char*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled, (const char*)input->src + input->pos, syncPoint.toLoad); - input->pos += syncPoint.toLoad; - mtctx->inBuff.filled += syncPoint.toLoad; - forwardInputProgress = syncPoint.toLoad>0; - } - } - if ((input->pos < input->size) && (endOp == ZSTD_e_end)) { - /* Can't end yet because the input is not fully consumed. - * We are in one of these cases: - * - mtctx->inBuff is NULL & empty: we couldn't get an input buffer so don't create a new job. - * - We filled the input buffer: flush this job but don't end the frame. - * - We hit a synchronization point: flush this job but don't end the frame. - */ - assert(mtctx->inBuff.filled == 0 || mtctx->inBuff.filled == mtctx->targetSectionSize || mtctx->params.rsyncable); - endOp = ZSTD_e_flush; - } - - if ( (mtctx->jobReady) - || (mtctx->inBuff.filled >= mtctx->targetSectionSize) /* filled enough : let's compress */ - || ((endOp != ZSTD_e_continue) && (mtctx->inBuff.filled > 0)) /* something to flush : let's go */ - || ((endOp == ZSTD_e_end) && (!mtctx->frameEnded)) ) { /* must finish the frame with a zero-size block */ - size_t const jobSize = mtctx->inBuff.filled; - assert(mtctx->inBuff.filled <= mtctx->targetSectionSize); - FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, jobSize, endOp) , ""); - } - - /* check for potential compressed data ready to be flushed */ - { size_t const remainingToFlush = ZSTDMT_flushProduced(mtctx, output, !forwardInputProgress, endOp); /* block if there was no forward input progress */ - if (input->pos < input->size) return MAX(remainingToFlush, 1); /* input not consumed : do not end flush yet */ - DEBUGLOG(5, "end of ZSTDMT_compressStream_generic: remainingToFlush = %u", (U32)remainingToFlush); - return remainingToFlush; - } -} diff --git a/third_party/zstd/lib/compress/zstdmt_compress.h b/third_party/zstd/lib/compress/zstdmt_compress.h deleted file mode 100644 index 91b489b..0000000 --- a/third_party/zstd/lib/compress/zstdmt_compress.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - #ifndef ZSTDMT_COMPRESS_H - #define ZSTDMT_COMPRESS_H - -/* === Dependencies === */ -#include "../common/zstd_deps.h" /* size_t */ -#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters */ -#include "../zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTDLIB_API */ - -/* Note : This is an internal API. - * These APIs used to be exposed with ZSTDLIB_API, - * because it used to be the only way to invoke MT compression. - * Now, you must use ZSTD_compress2 and ZSTD_compressStream2() instead. - * - * This API requires ZSTD_MULTITHREAD to be defined during compilation, - * otherwise ZSTDMT_createCCtx*() will fail. - */ - -/* === Constants === */ -#ifndef ZSTDMT_NBWORKERS_MAX /* a different value can be selected at compile time */ -# define ZSTDMT_NBWORKERS_MAX ((sizeof(void*)==4) /*32-bit*/ ? 64 : 256) -#endif -#ifndef ZSTDMT_JOBSIZE_MIN /* a different value can be selected at compile time */ -# define ZSTDMT_JOBSIZE_MIN (512 KB) -#endif -#define ZSTDMT_JOBLOG_MAX (MEM_32bits() ? 29 : 30) -#define ZSTDMT_JOBSIZE_MAX (MEM_32bits() ? (512 MB) : (1024 MB)) - - -/* ======================================================== - * === Private interface, for use by ZSTD_compress.c === - * === Not exposed in libzstd. Never invoke directly === - * ======================================================== */ - -/* === Memory management === */ -typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx; -/* Requires ZSTD_MULTITHREAD to be defined during compilation, otherwise it will return NULL. */ -ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbWorkers, - ZSTD_customMem cMem, - ZSTD_threadPool *pool); -size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx); - -size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx); - -/* === Streaming functions === */ - -size_t ZSTDMT_nextInputSizeHint(const ZSTDMT_CCtx* mtctx); - -/*! ZSTDMT_initCStream_internal() : - * Private use only. Init streaming operation. - * expects params to be valid. - * must receive dict, or cdict, or none, but not both. - * mtctx can be freshly constructed or reused from a prior compression. - * If mtctx is reused, memory allocations from the prior compression may not be freed, - * even if they are not needed for the current compression. - * @return : 0, or an error code */ -size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* mtctx, - const void* dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, - const ZSTD_CDict* cdict, - ZSTD_CCtx_params params, unsigned long long pledgedSrcSize); - -/*! ZSTDMT_compressStream_generic() : - * Combines ZSTDMT_compressStream() with optional ZSTDMT_flushStream() or ZSTDMT_endStream() - * depending on flush directive. - * @return : minimum amount of data still to be flushed - * 0 if fully flushed - * or an error code - * note : needs to be init using any ZSTD_initCStream*() variant */ -size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, - ZSTD_outBuffer* output, - ZSTD_inBuffer* input, - ZSTD_EndDirective endOp); - - /*! ZSTDMT_toFlushNow() - * Tell how many bytes are ready to be flushed immediately. - * Probe the oldest active job (not yet entirely flushed) and check its output buffer. - * If return 0, it means there is no active job, - * or, it means oldest job is still active, but everything produced has been flushed so far, - * therefore flushing is limited by speed of oldest job. */ -size_t ZSTDMT_toFlushNow(ZSTDMT_CCtx* mtctx); - -/*! ZSTDMT_updateCParams_whileCompressing() : - * Updates only a selected set of compression parameters, to remain compatible with current frame. - * New parameters will be applied to next compression job. */ -void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZSTD_CCtx_params* cctxParams); - -/*! ZSTDMT_getFrameProgression(): - * tells how much data has been consumed (input) and produced (output) for current frame. - * able to count progression inside worker threads. - */ -ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx); - -#endif /* ZSTDMT_COMPRESS_H */ diff --git a/third_party/zstd/lib/decompress/huf_decompress.c b/third_party/zstd/lib/decompress/huf_decompress.c deleted file mode 100644 index f85dd0b..0000000 --- a/third_party/zstd/lib/decompress/huf_decompress.c +++ /dev/null @@ -1,1944 +0,0 @@ -/* ****************************************************************** - * huff0 huffman decoder, - * part of Finite State Entropy library - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * You can contact the author at : - * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. -****************************************************************** */ - -/* ************************************************************** -* Dependencies -****************************************************************/ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset */ -#include "../common/compiler.h" -#include "../common/bitstream.h" /* BIT_* */ -#include "../common/fse.h" /* to compress headers */ -#include "../common/huf.h" -#include "../common/error_private.h" -#include "../common/zstd_internal.h" -#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_countTrailingZeros64 */ - -/* ************************************************************** -* Constants -****************************************************************/ - -#define HUF_DECODER_FAST_TABLELOG 11 - -/* ************************************************************** -* Macros -****************************************************************/ - -#ifdef HUF_DISABLE_FAST_DECODE -# define HUF_ENABLE_FAST_DECODE 0 -#else -# define HUF_ENABLE_FAST_DECODE 1 -#endif - -/* These two optional macros force the use one way or another of the two - * Huffman decompression implementations. You can't force in both directions - * at the same time. - */ -#if defined(HUF_FORCE_DECOMPRESS_X1) && \ - defined(HUF_FORCE_DECOMPRESS_X2) -#error "Cannot force the use of the X1 and X2 decoders at the same time!" -#endif - -/* When DYNAMIC_BMI2 is enabled, fast decoders are only called when bmi2 is - * supported at runtime, so we can add the BMI2 target attribute. - * When it is disabled, we will still get BMI2 if it is enabled statically. - */ -#if DYNAMIC_BMI2 -# define HUF_FAST_BMI2_ATTRS BMI2_TARGET_ATTRIBUTE -#else -# define HUF_FAST_BMI2_ATTRS -#endif - -#ifdef __cplusplus -# define HUF_EXTERN_C extern "C" -#else -# define HUF_EXTERN_C -#endif -#define HUF_ASM_DECL HUF_EXTERN_C - -#if DYNAMIC_BMI2 -# define HUF_NEED_BMI2_FUNCTION 1 -#else -# define HUF_NEED_BMI2_FUNCTION 0 -#endif - -/* ************************************************************** -* Error Management -****************************************************************/ -#define HUF_isError ERR_isError - - -/* ************************************************************** -* Byte alignment for workSpace management -****************************************************************/ -#define HUF_ALIGN(x, a) HUF_ALIGN_MASK((x), (a) - 1) -#define HUF_ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) - - -/* ************************************************************** -* BMI2 Variant Wrappers -****************************************************************/ -typedef size_t (*HUF_DecompressUsingDTableFn)(void *dst, size_t dstSize, - const void *cSrc, - size_t cSrcSize, - const HUF_DTable *DTable); - -#if DYNAMIC_BMI2 - -#define HUF_DGEN(fn) \ - \ - static size_t fn##_default( \ - void* dst, size_t dstSize, \ - const void* cSrc, size_t cSrcSize, \ - const HUF_DTable* DTable) \ - { \ - return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ - } \ - \ - static BMI2_TARGET_ATTRIBUTE size_t fn##_bmi2( \ - void* dst, size_t dstSize, \ - const void* cSrc, size_t cSrcSize, \ - const HUF_DTable* DTable) \ - { \ - return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ - } \ - \ - static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ - size_t cSrcSize, HUF_DTable const* DTable, int flags) \ - { \ - if (flags & HUF_flags_bmi2) { \ - return fn##_bmi2(dst, dstSize, cSrc, cSrcSize, DTable); \ - } \ - return fn##_default(dst, dstSize, cSrc, cSrcSize, DTable); \ - } - -#else - -#define HUF_DGEN(fn) \ - static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ - size_t cSrcSize, HUF_DTable const* DTable, int flags) \ - { \ - (void)flags; \ - return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ - } - -#endif - - -/*-***************************/ -/* generic DTableDesc */ -/*-***************************/ -typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; - -static DTableDesc HUF_getDTableDesc(const HUF_DTable* table) -{ - DTableDesc dtd; - ZSTD_memcpy(&dtd, table, sizeof(dtd)); - return dtd; -} - -static size_t HUF_initFastDStream(BYTE const* ip) { - BYTE const lastByte = ip[7]; - size_t const bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; - size_t const value = MEM_readLEST(ip) | 1; - assert(bitsConsumed <= 8); - assert(sizeof(size_t) == 8); - return value << bitsConsumed; -} - - -/** - * The input/output arguments to the Huffman fast decoding loop: - * - * ip [in/out] - The input pointers, must be updated to reflect what is consumed. - * op [in/out] - The output pointers, must be updated to reflect what is written. - * bits [in/out] - The bitstream containers, must be updated to reflect the current state. - * dt [in] - The decoding table. - * ilowest [in] - The beginning of the valid range of the input. Decoders may read - * down to this pointer. It may be below iend[0]. - * oend [in] - The end of the output stream. op[3] must not cross oend. - * iend [in] - The end of each input stream. ip[i] may cross iend[i], - * as long as it is above ilowest, but that indicates corruption. - */ -typedef struct { - BYTE const* ip[4]; - BYTE* op[4]; - U64 bits[4]; - void const* dt; - BYTE const* ilowest; - BYTE* oend; - BYTE const* iend[4]; -} HUF_DecompressFastArgs; - -typedef void (*HUF_DecompressFastLoopFn)(HUF_DecompressFastArgs*); - -/** - * Initializes args for the fast decoding loop. - * @returns 1 on success - * 0 if the fallback implementation should be used. - * Or an error code on failure. - */ -static size_t HUF_DecompressFastArgs_init(HUF_DecompressFastArgs* args, void* dst, size_t dstSize, void const* src, size_t srcSize, const HUF_DTable* DTable) -{ - void const* dt = DTable + 1; - U32 const dtLog = HUF_getDTableDesc(DTable).tableLog; - - const BYTE* const istart = (const BYTE*)src; - - BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); - - /* The fast decoding loop assumes 64-bit little-endian. - * This condition is false on x32. - */ - if (!MEM_isLittleEndian() || MEM_32bits()) - return 0; - - /* Avoid nullptr addition */ - if (dstSize == 0) - return 0; - assert(dst != NULL); - - /* strict minimum : jump table + 1 byte per stream */ - if (srcSize < 10) - return ERROR(corruption_detected); - - /* Must have at least 8 bytes per stream because we don't handle initializing smaller bit containers. - * If table log is not correct at this point, fallback to the old decoder. - * On small inputs we don't have enough data to trigger the fast loop, so use the old decoder. - */ - if (dtLog != HUF_DECODER_FAST_TABLELOG) - return 0; - - /* Read the jump table. */ - { - size_t const length1 = MEM_readLE16(istart); - size_t const length2 = MEM_readLE16(istart+2); - size_t const length3 = MEM_readLE16(istart+4); - size_t const length4 = srcSize - (length1 + length2 + length3 + 6); - args->iend[0] = istart + 6; /* jumpTable */ - args->iend[1] = args->iend[0] + length1; - args->iend[2] = args->iend[1] + length2; - args->iend[3] = args->iend[2] + length3; - - /* HUF_initFastDStream() requires this, and this small of an input - * won't benefit from the ASM loop anyways. - */ - if (length1 < 8 || length2 < 8 || length3 < 8 || length4 < 8) - return 0; - if (length4 > srcSize) return ERROR(corruption_detected); /* overflow */ - } - /* ip[] contains the position that is currently loaded into bits[]. */ - args->ip[0] = args->iend[1] - sizeof(U64); - args->ip[1] = args->iend[2] - sizeof(U64); - args->ip[2] = args->iend[3] - sizeof(U64); - args->ip[3] = (BYTE const*)src + srcSize - sizeof(U64); - - /* op[] contains the output pointers. */ - args->op[0] = (BYTE*)dst; - args->op[1] = args->op[0] + (dstSize+3)/4; - args->op[2] = args->op[1] + (dstSize+3)/4; - args->op[3] = args->op[2] + (dstSize+3)/4; - - /* No point to call the ASM loop for tiny outputs. */ - if (args->op[3] >= oend) - return 0; - - /* bits[] is the bit container. - * It is read from the MSB down to the LSB. - * It is shifted left as it is read, and zeros are - * shifted in. After the lowest valid bit a 1 is - * set, so that CountTrailingZeros(bits[]) can be used - * to count how many bits we've consumed. - */ - args->bits[0] = HUF_initFastDStream(args->ip[0]); - args->bits[1] = HUF_initFastDStream(args->ip[1]); - args->bits[2] = HUF_initFastDStream(args->ip[2]); - args->bits[3] = HUF_initFastDStream(args->ip[3]); - - /* The decoders must be sure to never read beyond ilowest. - * This is lower than iend[0], but allowing decoders to read - * down to ilowest can allow an extra iteration or two in the - * fast loop. - */ - args->ilowest = istart; - - args->oend = oend; - args->dt = dt; - - return 1; -} - -static size_t HUF_initRemainingDStream(BIT_DStream_t* bit, HUF_DecompressFastArgs const* args, int stream, BYTE* segmentEnd) -{ - /* Validate that we haven't overwritten. */ - if (args->op[stream] > segmentEnd) - return ERROR(corruption_detected); - /* Validate that we haven't read beyond iend[]. - * Note that ip[] may be < iend[] because the MSB is - * the next bit to read, and we may have consumed 100% - * of the stream, so down to iend[i] - 8 is valid. - */ - if (args->ip[stream] < args->iend[stream] - 8) - return ERROR(corruption_detected); - - /* Construct the BIT_DStream_t. */ - assert(sizeof(size_t) == 8); - bit->bitContainer = MEM_readLEST(args->ip[stream]); - bit->bitsConsumed = ZSTD_countTrailingZeros64(args->bits[stream]); - bit->start = (const char*)args->ilowest; - bit->limitPtr = bit->start + sizeof(size_t); - bit->ptr = (const char*)args->ip[stream]; - - return 0; -} - -/* Calls X(N) for each stream 0, 1, 2, 3. */ -#define HUF_4X_FOR_EACH_STREAM(X) \ - do { \ - X(0); \ - X(1); \ - X(2); \ - X(3); \ - } while (0) - -/* Calls X(N, var) for each stream 0, 1, 2, 3. */ -#define HUF_4X_FOR_EACH_STREAM_WITH_VAR(X, var) \ - do { \ - X(0, (var)); \ - X(1, (var)); \ - X(2, (var)); \ - X(3, (var)); \ - } while (0) - - -#ifndef HUF_FORCE_DECOMPRESS_X2 - -/*-***************************/ -/* single-symbol decoding */ -/*-***************************/ -typedef struct { BYTE nbBits; BYTE byte; } HUF_DEltX1; /* single-symbol decoding */ - -/** - * Packs 4 HUF_DEltX1 structs into a U64. This is used to lay down 4 entries at - * a time. - */ -static U64 HUF_DEltX1_set4(BYTE symbol, BYTE nbBits) { - U64 D4; - if (MEM_isLittleEndian()) { - D4 = (U64)((symbol << 8) + nbBits); - } else { - D4 = (U64)(symbol + (nbBits << 8)); - } - assert(D4 < (1U << 16)); - D4 *= 0x0001000100010001ULL; - return D4; -} - -/** - * Increase the tableLog to targetTableLog and rescales the stats. - * If tableLog > targetTableLog this is a no-op. - * @returns New tableLog - */ -static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbols, U32 tableLog, U32 targetTableLog) -{ - if (tableLog > targetTableLog) - return tableLog; - if (tableLog < targetTableLog) { - U32 const scale = targetTableLog - tableLog; - U32 s; - /* Increase the weight for all non-zero probability symbols by scale. */ - for (s = 0; s < nbSymbols; ++s) { - huffWeight[s] += (BYTE)((huffWeight[s] == 0) ? 0 : scale); - } - /* Update rankVal to reflect the new weights. - * All weights except 0 get moved to weight + scale. - * Weights [1, scale] are empty. - */ - for (s = targetTableLog; s > scale; --s) { - rankVal[s] = rankVal[s - scale]; - } - for (s = scale; s > 0; --s) { - rankVal[s] = 0; - } - } - return targetTableLog; -} - -typedef struct { - U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; - U32 rankStart[HUF_TABLELOG_ABSOLUTEMAX + 1]; - U32 statsWksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; - BYTE symbols[HUF_SYMBOLVALUE_MAX + 1]; - BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; -} HUF_ReadDTableX1_Workspace; - -size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags) -{ - U32 tableLog = 0; - U32 nbSymbols = 0; - size_t iSize; - void* const dtPtr = DTable + 1; - HUF_DEltX1* const dt = (HUF_DEltX1*)dtPtr; - HUF_ReadDTableX1_Workspace* wksp = (HUF_ReadDTableX1_Workspace*)workSpace; - - DEBUG_STATIC_ASSERT(HUF_DECOMPRESS_WORKSPACE_SIZE >= sizeof(*wksp)); - if (sizeof(*wksp) > wkspSize) return ERROR(tableLog_tooLarge); - - DEBUG_STATIC_ASSERT(sizeof(DTableDesc) == sizeof(HUF_DTable)); - /* ZSTD_memset(huffWeight, 0, sizeof(huffWeight)); */ /* is not necessary, even though some analyzer complain ... */ - - iSize = HUF_readStats_wksp(wksp->huffWeight, HUF_SYMBOLVALUE_MAX + 1, wksp->rankVal, &nbSymbols, &tableLog, src, srcSize, wksp->statsWksp, sizeof(wksp->statsWksp), flags); - if (HUF_isError(iSize)) return iSize; - - - /* Table header */ - { DTableDesc dtd = HUF_getDTableDesc(DTable); - U32 const maxTableLog = dtd.maxTableLog + 1; - U32 const targetTableLog = MIN(maxTableLog, HUF_DECODER_FAST_TABLELOG); - tableLog = HUF_rescaleStats(wksp->huffWeight, wksp->rankVal, nbSymbols, tableLog, targetTableLog); - if (tableLog > (U32)(dtd.maxTableLog+1)) return ERROR(tableLog_tooLarge); /* DTable too small, Huffman tree cannot fit in */ - dtd.tableType = 0; - dtd.tableLog = (BYTE)tableLog; - ZSTD_memcpy(DTable, &dtd, sizeof(dtd)); - } - - /* Compute symbols and rankStart given rankVal: - * - * rankVal already contains the number of values of each weight. - * - * symbols contains the symbols ordered by weight. First are the rankVal[0] - * weight 0 symbols, followed by the rankVal[1] weight 1 symbols, and so on. - * symbols[0] is filled (but unused) to avoid a branch. - * - * rankStart contains the offset where each rank belongs in the DTable. - * rankStart[0] is not filled because there are no entries in the table for - * weight 0. - */ - { int n; - U32 nextRankStart = 0; - int const unroll = 4; - int const nLimit = (int)nbSymbols - unroll + 1; - for (n=0; n<(int)tableLog+1; n++) { - U32 const curr = nextRankStart; - nextRankStart += wksp->rankVal[n]; - wksp->rankStart[n] = curr; - } - for (n=0; n < nLimit; n += unroll) { - int u; - for (u=0; u < unroll; ++u) { - size_t const w = wksp->huffWeight[n+u]; - wksp->symbols[wksp->rankStart[w]++] = (BYTE)(n+u); - } - } - for (; n < (int)nbSymbols; ++n) { - size_t const w = wksp->huffWeight[n]; - wksp->symbols[wksp->rankStart[w]++] = (BYTE)n; - } - } - - /* fill DTable - * We fill all entries of each weight in order. - * That way length is a constant for each iteration of the outer loop. - * We can switch based on the length to a different inner loop which is - * optimized for that particular case. - */ - { U32 w; - int symbol = wksp->rankVal[0]; - int rankStart = 0; - for (w=1; wrankVal[w]; - int const length = (1 << w) >> 1; - int uStart = rankStart; - BYTE const nbBits = (BYTE)(tableLog + 1 - w); - int s; - int u; - switch (length) { - case 1: - for (s=0; ssymbols[symbol + s]; - D.nbBits = nbBits; - dt[uStart] = D; - uStart += 1; - } - break; - case 2: - for (s=0; ssymbols[symbol + s]; - D.nbBits = nbBits; - dt[uStart+0] = D; - dt[uStart+1] = D; - uStart += 2; - } - break; - case 4: - for (s=0; ssymbols[symbol + s], nbBits); - MEM_write64(dt + uStart, D4); - uStart += 4; - } - break; - case 8: - for (s=0; ssymbols[symbol + s], nbBits); - MEM_write64(dt + uStart, D4); - MEM_write64(dt + uStart + 4, D4); - uStart += 8; - } - break; - default: - for (s=0; ssymbols[symbol + s], nbBits); - for (u=0; u < length; u += 16) { - MEM_write64(dt + uStart + u + 0, D4); - MEM_write64(dt + uStart + u + 4, D4); - MEM_write64(dt + uStart + u + 8, D4); - MEM_write64(dt + uStart + u + 12, D4); - } - assert(u == length); - uStart += length; - } - break; - } - symbol += symbolCount; - rankStart += symbolCount * length; - } - } - return iSize; -} - -FORCE_INLINE_TEMPLATE BYTE -HUF_decodeSymbolX1(BIT_DStream_t* Dstream, const HUF_DEltX1* dt, const U32 dtLog) -{ - size_t const val = BIT_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ - BYTE const c = dt[val].byte; - BIT_skipBits(Dstream, dt[val].nbBits); - return c; -} - -#define HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr) \ - do { *ptr++ = HUF_decodeSymbolX1(DStreamPtr, dt, dtLog); } while (0) - -#define HUF_DECODE_SYMBOLX1_1(ptr, DStreamPtr) \ - do { \ - if (MEM_64bits() || (HUF_TABLELOG_MAX<=12)) \ - HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr); \ - } while (0) - -#define HUF_DECODE_SYMBOLX1_2(ptr, DStreamPtr) \ - do { \ - if (MEM_64bits()) \ - HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr); \ - } while (0) - -HINT_INLINE size_t -HUF_decodeStreamX1(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX1* const dt, const U32 dtLog) -{ - BYTE* const pStart = p; - - /* up to 4 symbols at a time */ - if ((pEnd - p) > 3) { - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-3)) { - HUF_DECODE_SYMBOLX1_2(p, bitDPtr); - HUF_DECODE_SYMBOLX1_1(p, bitDPtr); - HUF_DECODE_SYMBOLX1_2(p, bitDPtr); - HUF_DECODE_SYMBOLX1_0(p, bitDPtr); - } - } else { - BIT_reloadDStream(bitDPtr); - } - - /* [0-3] symbols remaining */ - if (MEM_32bits()) - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd)) - HUF_DECODE_SYMBOLX1_0(p, bitDPtr); - - /* no more data to retrieve from bitstream, no need to reload */ - while (p < pEnd) - HUF_DECODE_SYMBOLX1_0(p, bitDPtr); - - return (size_t)(pEnd-pStart); -} - -FORCE_INLINE_TEMPLATE size_t -HUF_decompress1X1_usingDTable_internal_body( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable) -{ - BYTE* op = (BYTE*)dst; - BYTE* const oend = ZSTD_maybeNullPtrAdd(op, dstSize); - const void* dtPtr = DTable + 1; - const HUF_DEltX1* const dt = (const HUF_DEltX1*)dtPtr; - BIT_DStream_t bitD; - DTableDesc const dtd = HUF_getDTableDesc(DTable); - U32 const dtLog = dtd.tableLog; - - CHECK_F( BIT_initDStream(&bitD, cSrc, cSrcSize) ); - - HUF_decodeStreamX1(op, &bitD, oend, dt, dtLog); - - if (!BIT_endOfDStream(&bitD)) return ERROR(corruption_detected); - - return dstSize; -} - -/* HUF_decompress4X1_usingDTable_internal_body(): - * Conditions : - * @dstSize >= 6 - */ -FORCE_INLINE_TEMPLATE size_t -HUF_decompress4X1_usingDTable_internal_body( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable) -{ - /* Check */ - if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ - if (dstSize < 6) return ERROR(corruption_detected); /* stream 4-split doesn't work */ - - { const BYTE* const istart = (const BYTE*) cSrc; - BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ostart + dstSize; - BYTE* const olimit = oend - 3; - const void* const dtPtr = DTable + 1; - const HUF_DEltX1* const dt = (const HUF_DEltX1*)dtPtr; - - /* Init */ - BIT_DStream_t bitD1; - BIT_DStream_t bitD2; - BIT_DStream_t bitD3; - BIT_DStream_t bitD4; - size_t const length1 = MEM_readLE16(istart); - size_t const length2 = MEM_readLE16(istart+2); - size_t const length3 = MEM_readLE16(istart+4); - size_t const length4 = cSrcSize - (length1 + length2 + length3 + 6); - const BYTE* const istart1 = istart + 6; /* jumpTable */ - const BYTE* const istart2 = istart1 + length1; - const BYTE* const istart3 = istart2 + length2; - const BYTE* const istart4 = istart3 + length3; - const size_t segmentSize = (dstSize+3) / 4; - BYTE* const opStart2 = ostart + segmentSize; - BYTE* const opStart3 = opStart2 + segmentSize; - BYTE* const opStart4 = opStart3 + segmentSize; - BYTE* op1 = ostart; - BYTE* op2 = opStart2; - BYTE* op3 = opStart3; - BYTE* op4 = opStart4; - DTableDesc const dtd = HUF_getDTableDesc(DTable); - U32 const dtLog = dtd.tableLog; - U32 endSignal = 1; - - if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ - if (opStart4 > oend) return ERROR(corruption_detected); /* overflow */ - assert(dstSize >= 6); /* validated above */ - CHECK_F( BIT_initDStream(&bitD1, istart1, length1) ); - CHECK_F( BIT_initDStream(&bitD2, istart2, length2) ); - CHECK_F( BIT_initDStream(&bitD3, istart3, length3) ); - CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); - - /* up to 16 symbols per loop (4 symbols per stream) in 64-bit mode */ - if ((size_t)(oend - op4) >= sizeof(size_t)) { - for ( ; (endSignal) & (op4 < olimit) ; ) { - HUF_DECODE_SYMBOLX1_2(op1, &bitD1); - HUF_DECODE_SYMBOLX1_2(op2, &bitD2); - HUF_DECODE_SYMBOLX1_2(op3, &bitD3); - HUF_DECODE_SYMBOLX1_2(op4, &bitD4); - HUF_DECODE_SYMBOLX1_1(op1, &bitD1); - HUF_DECODE_SYMBOLX1_1(op2, &bitD2); - HUF_DECODE_SYMBOLX1_1(op3, &bitD3); - HUF_DECODE_SYMBOLX1_1(op4, &bitD4); - HUF_DECODE_SYMBOLX1_2(op1, &bitD1); - HUF_DECODE_SYMBOLX1_2(op2, &bitD2); - HUF_DECODE_SYMBOLX1_2(op3, &bitD3); - HUF_DECODE_SYMBOLX1_2(op4, &bitD4); - HUF_DECODE_SYMBOLX1_0(op1, &bitD1); - HUF_DECODE_SYMBOLX1_0(op2, &bitD2); - HUF_DECODE_SYMBOLX1_0(op3, &bitD3); - HUF_DECODE_SYMBOLX1_0(op4, &bitD4); - endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; - endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; - endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; - endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; - } - } - - /* check corruption */ - /* note : should not be necessary : op# advance in lock step, and we control op4. - * but curiously, binary generated by gcc 7.2 & 7.3 with -mbmi2 runs faster when >=1 test is present */ - if (op1 > opStart2) return ERROR(corruption_detected); - if (op2 > opStart3) return ERROR(corruption_detected); - if (op3 > opStart4) return ERROR(corruption_detected); - /* note : op4 supposed already verified within main loop */ - - /* finish bitStreams one by one */ - HUF_decodeStreamX1(op1, &bitD1, opStart2, dt, dtLog); - HUF_decodeStreamX1(op2, &bitD2, opStart3, dt, dtLog); - HUF_decodeStreamX1(op3, &bitD3, opStart4, dt, dtLog); - HUF_decodeStreamX1(op4, &bitD4, oend, dt, dtLog); - - /* check */ - { U32 const endCheck = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); - if (!endCheck) return ERROR(corruption_detected); } - - /* decoded size */ - return dstSize; - } -} - -#if HUF_NEED_BMI2_FUNCTION -static BMI2_TARGET_ATTRIBUTE -size_t HUF_decompress4X1_usingDTable_internal_bmi2(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable) { - return HUF_decompress4X1_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); -} -#endif - -static -size_t HUF_decompress4X1_usingDTable_internal_default(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable) { - return HUF_decompress4X1_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); -} - -#if ZSTD_ENABLE_ASM_X86_64_BMI2 - -HUF_ASM_DECL void HUF_decompress4X1_usingDTable_internal_fast_asm_loop(HUF_DecompressFastArgs* args) ZSTDLIB_HIDDEN; - -#endif - -static HUF_FAST_BMI2_ATTRS -void HUF_decompress4X1_usingDTable_internal_fast_c_loop(HUF_DecompressFastArgs* args) -{ - U64 bits[4]; - BYTE const* ip[4]; - BYTE* op[4]; - U16 const* const dtable = (U16 const*)args->dt; - BYTE* const oend = args->oend; - BYTE const* const ilowest = args->ilowest; - - /* Copy the arguments to local variables */ - ZSTD_memcpy(&bits, &args->bits, sizeof(bits)); - ZSTD_memcpy((void*)(&ip), &args->ip, sizeof(ip)); - ZSTD_memcpy(&op, &args->op, sizeof(op)); - - assert(MEM_isLittleEndian()); - assert(!MEM_32bits()); - - for (;;) { - BYTE* olimit; - int stream; - - /* Assert loop preconditions */ -#ifndef NDEBUG - for (stream = 0; stream < 4; ++stream) { - assert(op[stream] <= (stream == 3 ? oend : op[stream + 1])); - assert(ip[stream] >= ilowest); - } -#endif - /* Compute olimit */ - { - /* Each iteration produces 5 output symbols per stream */ - size_t const oiters = (size_t)(oend - op[3]) / 5; - /* Each iteration consumes up to 11 bits * 5 = 55 bits < 7 bytes - * per stream. - */ - size_t const iiters = (size_t)(ip[0] - ilowest) / 7; - /* We can safely run iters iterations before running bounds checks */ - size_t const iters = MIN(oiters, iiters); - size_t const symbols = iters * 5; - - /* We can simply check that op[3] < olimit, instead of checking all - * of our bounds, since we can't hit the other bounds until we've run - * iters iterations, which only happens when op[3] == olimit. - */ - olimit = op[3] + symbols; - - /* Exit fast decoding loop once we reach the end. */ - if (op[3] == olimit) - break; - - /* Exit the decoding loop if any input pointer has crossed the - * previous one. This indicates corruption, and a precondition - * to our loop is that ip[i] >= ip[0]. - */ - for (stream = 1; stream < 4; ++stream) { - if (ip[stream] < ip[stream - 1]) - goto _out; - } - } - -#ifndef NDEBUG - for (stream = 1; stream < 4; ++stream) { - assert(ip[stream] >= ip[stream - 1]); - } -#endif - -#define HUF_4X1_DECODE_SYMBOL(_stream, _symbol) \ - do { \ - int const index = (int)(bits[(_stream)] >> 53); \ - int const entry = (int)dtable[index]; \ - bits[(_stream)] <<= (entry & 0x3F); \ - op[(_stream)][(_symbol)] = (BYTE)((entry >> 8) & 0xFF); \ - } while (0) - -#define HUF_4X1_RELOAD_STREAM(_stream) \ - do { \ - int const ctz = ZSTD_countTrailingZeros64(bits[(_stream)]); \ - int const nbBits = ctz & 7; \ - int const nbBytes = ctz >> 3; \ - op[(_stream)] += 5; \ - ip[(_stream)] -= nbBytes; \ - bits[(_stream)] = MEM_read64(ip[(_stream)]) | 1; \ - bits[(_stream)] <<= nbBits; \ - } while (0) - - /* Manually unroll the loop because compilers don't consistently - * unroll the inner loops, which destroys performance. - */ - do { - /* Decode 5 symbols in each of the 4 streams */ - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 0); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 1); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 2); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 3); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 4); - - /* Reload each of the 4 the bitstreams */ - HUF_4X_FOR_EACH_STREAM(HUF_4X1_RELOAD_STREAM); - } while (op[3] < olimit); - -#undef HUF_4X1_DECODE_SYMBOL -#undef HUF_4X1_RELOAD_STREAM - } - -_out: - - /* Save the final values of each of the state variables back to args. */ - ZSTD_memcpy(&args->bits, &bits, sizeof(bits)); - ZSTD_memcpy((void*)(&args->ip), &ip, sizeof(ip)); - ZSTD_memcpy(&args->op, &op, sizeof(op)); -} - -/** - * @returns @p dstSize on success (>= 6) - * 0 if the fallback implementation should be used - * An error if an error occurred - */ -static HUF_FAST_BMI2_ATTRS -size_t -HUF_decompress4X1_usingDTable_internal_fast( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable, - HUF_DecompressFastLoopFn loopFn) -{ - void const* dt = DTable + 1; - BYTE const* const ilowest = (BYTE const*)cSrc; - BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); - HUF_DecompressFastArgs args; - { size_t const ret = HUF_DecompressFastArgs_init(&args, dst, dstSize, cSrc, cSrcSize, DTable); - FORWARD_IF_ERROR(ret, "Failed to init fast loop args"); - if (ret == 0) - return 0; - } - - assert(args.ip[0] >= args.ilowest); - loopFn(&args); - - /* Our loop guarantees that ip[] >= ilowest and that we haven't - * overwritten any op[]. - */ - assert(args.ip[0] >= ilowest); - assert(args.ip[0] >= ilowest); - assert(args.ip[1] >= ilowest); - assert(args.ip[2] >= ilowest); - assert(args.ip[3] >= ilowest); - assert(args.op[3] <= oend); - - assert(ilowest == args.ilowest); - assert(ilowest + 6 == args.iend[0]); - (void)ilowest; - - /* finish bit streams one by one. */ - { size_t const segmentSize = (dstSize+3) / 4; - BYTE* segmentEnd = (BYTE*)dst; - int i; - for (i = 0; i < 4; ++i) { - BIT_DStream_t bit; - if (segmentSize <= (size_t)(oend - segmentEnd)) - segmentEnd += segmentSize; - else - segmentEnd = oend; - FORWARD_IF_ERROR(HUF_initRemainingDStream(&bit, &args, i, segmentEnd), "corruption"); - /* Decompress and validate that we've produced exactly the expected length. */ - args.op[i] += HUF_decodeStreamX1(args.op[i], &bit, segmentEnd, (HUF_DEltX1 const*)dt, HUF_DECODER_FAST_TABLELOG); - if (args.op[i] != segmentEnd) return ERROR(corruption_detected); - } - } - - /* decoded size */ - assert(dstSize != 0); - return dstSize; -} - -HUF_DGEN(HUF_decompress1X1_usingDTable_internal) - -static size_t HUF_decompress4X1_usingDTable_internal(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable, int flags) -{ - HUF_DecompressUsingDTableFn fallbackFn = HUF_decompress4X1_usingDTable_internal_default; - HUF_DecompressFastLoopFn loopFn = HUF_decompress4X1_usingDTable_internal_fast_c_loop; - -#if DYNAMIC_BMI2 - if (flags & HUF_flags_bmi2) { - fallbackFn = HUF_decompress4X1_usingDTable_internal_bmi2; -# if ZSTD_ENABLE_ASM_X86_64_BMI2 - if (!(flags & HUF_flags_disableAsm)) { - loopFn = HUF_decompress4X1_usingDTable_internal_fast_asm_loop; - } -# endif - } else { - return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); - } -#endif - -#if ZSTD_ENABLE_ASM_X86_64_BMI2 && defined(__BMI2__) - if (!(flags & HUF_flags_disableAsm)) { - loopFn = HUF_decompress4X1_usingDTable_internal_fast_asm_loop; - } -#endif - - if (HUF_ENABLE_FAST_DECODE && !(flags & HUF_flags_disableFast)) { - size_t const ret = HUF_decompress4X1_usingDTable_internal_fast(dst, dstSize, cSrc, cSrcSize, DTable, loopFn); - if (ret != 0) - return ret; - } - return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); -} - -static size_t HUF_decompress4X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - void* workSpace, size_t wkspSize, int flags) -{ - const BYTE* ip = (const BYTE*) cSrc; - - size_t const hSize = HUF_readDTableX1_wksp(dctx, cSrc, cSrcSize, workSpace, wkspSize, flags); - if (HUF_isError(hSize)) return hSize; - if (hSize >= cSrcSize) return ERROR(srcSize_wrong); - ip += hSize; cSrcSize -= hSize; - - return HUF_decompress4X1_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); -} - -#endif /* HUF_FORCE_DECOMPRESS_X2 */ - - -#ifndef HUF_FORCE_DECOMPRESS_X1 - -/* *************************/ -/* double-symbols decoding */ -/* *************************/ - -typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX2; /* double-symbols decoding */ -typedef struct { BYTE symbol; } sortedSymbol_t; -typedef U32 rankValCol_t[HUF_TABLELOG_MAX + 1]; -typedef rankValCol_t rankVal_t[HUF_TABLELOG_MAX]; - -/** - * Constructs a HUF_DEltX2 in a U32. - */ -static U32 HUF_buildDEltX2U32(U32 symbol, U32 nbBits, U32 baseSeq, int level) -{ - U32 seq; - DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, sequence) == 0); - DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, nbBits) == 2); - DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, length) == 3); - DEBUG_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(U32)); - if (MEM_isLittleEndian()) { - seq = level == 1 ? symbol : (baseSeq + (symbol << 8)); - return seq + (nbBits << 16) + ((U32)level << 24); - } else { - seq = level == 1 ? (symbol << 8) : ((baseSeq << 8) + symbol); - return (seq << 16) + (nbBits << 8) + (U32)level; - } -} - -/** - * Constructs a HUF_DEltX2. - */ -static HUF_DEltX2 HUF_buildDEltX2(U32 symbol, U32 nbBits, U32 baseSeq, int level) -{ - HUF_DEltX2 DElt; - U32 const val = HUF_buildDEltX2U32(symbol, nbBits, baseSeq, level); - DEBUG_STATIC_ASSERT(sizeof(DElt) == sizeof(val)); - ZSTD_memcpy(&DElt, &val, sizeof(val)); - return DElt; -} - -/** - * Constructs 2 HUF_DEltX2s and packs them into a U64. - */ -static U64 HUF_buildDEltX2U64(U32 symbol, U32 nbBits, U16 baseSeq, int level) -{ - U32 DElt = HUF_buildDEltX2U32(symbol, nbBits, baseSeq, level); - return (U64)DElt + ((U64)DElt << 32); -} - -/** - * Fills the DTable rank with all the symbols from [begin, end) that are each - * nbBits long. - * - * @param DTableRank The start of the rank in the DTable. - * @param begin The first symbol to fill (inclusive). - * @param end The last symbol to fill (exclusive). - * @param nbBits Each symbol is nbBits long. - * @param tableLog The table log. - * @param baseSeq If level == 1 { 0 } else { the first level symbol } - * @param level The level in the table. Must be 1 or 2. - */ -static void HUF_fillDTableX2ForWeight( - HUF_DEltX2* DTableRank, - sortedSymbol_t const* begin, sortedSymbol_t const* end, - U32 nbBits, U32 tableLog, - U16 baseSeq, int const level) -{ - U32 const length = 1U << ((tableLog - nbBits) & 0x1F /* quiet static-analyzer */); - const sortedSymbol_t* ptr; - assert(level >= 1 && level <= 2); - switch (length) { - case 1: - for (ptr = begin; ptr != end; ++ptr) { - HUF_DEltX2 const DElt = HUF_buildDEltX2(ptr->symbol, nbBits, baseSeq, level); - *DTableRank++ = DElt; - } - break; - case 2: - for (ptr = begin; ptr != end; ++ptr) { - HUF_DEltX2 const DElt = HUF_buildDEltX2(ptr->symbol, nbBits, baseSeq, level); - DTableRank[0] = DElt; - DTableRank[1] = DElt; - DTableRank += 2; - } - break; - case 4: - for (ptr = begin; ptr != end; ++ptr) { - U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); - ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); - DTableRank += 4; - } - break; - case 8: - for (ptr = begin; ptr != end; ++ptr) { - U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); - ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 4, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 6, &DEltX2, sizeof(DEltX2)); - DTableRank += 8; - } - break; - default: - for (ptr = begin; ptr != end; ++ptr) { - U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); - HUF_DEltX2* const DTableRankEnd = DTableRank + length; - for (; DTableRank != DTableRankEnd; DTableRank += 8) { - ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 4, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTableRank + 6, &DEltX2, sizeof(DEltX2)); - } - } - break; - } -} - -/* HUF_fillDTableX2Level2() : - * `rankValOrigin` must be a table of at least (HUF_TABLELOG_MAX + 1) U32 */ -static void HUF_fillDTableX2Level2(HUF_DEltX2* DTable, U32 targetLog, const U32 consumedBits, - const U32* rankVal, const int minWeight, const int maxWeight1, - const sortedSymbol_t* sortedSymbols, U32 const* rankStart, - U32 nbBitsBaseline, U16 baseSeq) -{ - /* Fill skipped values (all positions up to rankVal[minWeight]). - * These are positions only get a single symbol because the combined weight - * is too large. - */ - if (minWeight>1) { - U32 const length = 1U << ((targetLog - consumedBits) & 0x1F /* quiet static-analyzer */); - U64 const DEltX2 = HUF_buildDEltX2U64(baseSeq, consumedBits, /* baseSeq */ 0, /* level */ 1); - int const skipSize = rankVal[minWeight]; - assert(length > 1); - assert((U32)skipSize < length); - switch (length) { - case 2: - assert(skipSize == 1); - ZSTD_memcpy(DTable, &DEltX2, sizeof(DEltX2)); - break; - case 4: - assert(skipSize <= 4); - ZSTD_memcpy(DTable + 0, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTable + 2, &DEltX2, sizeof(DEltX2)); - break; - default: - { - int i; - for (i = 0; i < skipSize; i += 8) { - ZSTD_memcpy(DTable + i + 0, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTable + i + 2, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTable + i + 4, &DEltX2, sizeof(DEltX2)); - ZSTD_memcpy(DTable + i + 6, &DEltX2, sizeof(DEltX2)); - } - } - } - } - - /* Fill each of the second level symbols by weight. */ - { - int w; - for (w = minWeight; w < maxWeight1; ++w) { - int const begin = rankStart[w]; - int const end = rankStart[w+1]; - U32 const nbBits = nbBitsBaseline - w; - U32 const totalBits = nbBits + consumedBits; - HUF_fillDTableX2ForWeight( - DTable + rankVal[w], - sortedSymbols + begin, sortedSymbols + end, - totalBits, targetLog, - baseSeq, /* level */ 2); - } - } -} - -static void HUF_fillDTableX2(HUF_DEltX2* DTable, const U32 targetLog, - const sortedSymbol_t* sortedList, - const U32* rankStart, rankValCol_t* rankValOrigin, const U32 maxWeight, - const U32 nbBitsBaseline) -{ - U32* const rankVal = rankValOrigin[0]; - const int scaleLog = nbBitsBaseline - targetLog; /* note : targetLog >= srcLog, hence scaleLog <= 1 */ - const U32 minBits = nbBitsBaseline - maxWeight; - int w; - int const wEnd = (int)maxWeight + 1; - - /* Fill DTable in order of weight. */ - for (w = 1; w < wEnd; ++w) { - int const begin = (int)rankStart[w]; - int const end = (int)rankStart[w+1]; - U32 const nbBits = nbBitsBaseline - w; - - if (targetLog-nbBits >= minBits) { - /* Enough room for a second symbol. */ - int start = rankVal[w]; - U32 const length = 1U << ((targetLog - nbBits) & 0x1F /* quiet static-analyzer */); - int minWeight = nbBits + scaleLog; - int s; - if (minWeight < 1) minWeight = 1; - /* Fill the DTable for every symbol of weight w. - * These symbols get at least 1 second symbol. - */ - for (s = begin; s != end; ++s) { - HUF_fillDTableX2Level2( - DTable + start, targetLog, nbBits, - rankValOrigin[nbBits], minWeight, wEnd, - sortedList, rankStart, - nbBitsBaseline, sortedList[s].symbol); - start += length; - } - } else { - /* Only a single symbol. */ - HUF_fillDTableX2ForWeight( - DTable + rankVal[w], - sortedList + begin, sortedList + end, - nbBits, targetLog, - /* baseSeq */ 0, /* level */ 1); - } - } -} - -typedef struct { - rankValCol_t rankVal[HUF_TABLELOG_MAX]; - U32 rankStats[HUF_TABLELOG_MAX + 1]; - U32 rankStart0[HUF_TABLELOG_MAX + 3]; - sortedSymbol_t sortedSymbol[HUF_SYMBOLVALUE_MAX + 1]; - BYTE weightList[HUF_SYMBOLVALUE_MAX + 1]; - U32 calleeWksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; -} HUF_ReadDTableX2_Workspace; - -size_t HUF_readDTableX2_wksp(HUF_DTable* DTable, - const void* src, size_t srcSize, - void* workSpace, size_t wkspSize, int flags) -{ - U32 tableLog, maxW, nbSymbols; - DTableDesc dtd = HUF_getDTableDesc(DTable); - U32 maxTableLog = dtd.maxTableLog; - size_t iSize; - void* dtPtr = DTable+1; /* force compiler to avoid strict-aliasing */ - HUF_DEltX2* const dt = (HUF_DEltX2*)dtPtr; - U32 *rankStart; - - HUF_ReadDTableX2_Workspace* const wksp = (HUF_ReadDTableX2_Workspace*)workSpace; - - if (sizeof(*wksp) > wkspSize) return ERROR(GENERIC); - - rankStart = wksp->rankStart0 + 1; - ZSTD_memset(wksp->rankStats, 0, sizeof(wksp->rankStats)); - ZSTD_memset(wksp->rankStart0, 0, sizeof(wksp->rankStart0)); - - DEBUG_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(HUF_DTable)); /* if compiler fails here, assertion is wrong */ - if (maxTableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); - /* ZSTD_memset(weightList, 0, sizeof(weightList)); */ /* is not necessary, even though some analyzer complain ... */ - - iSize = HUF_readStats_wksp(wksp->weightList, HUF_SYMBOLVALUE_MAX + 1, wksp->rankStats, &nbSymbols, &tableLog, src, srcSize, wksp->calleeWksp, sizeof(wksp->calleeWksp), flags); - if (HUF_isError(iSize)) return iSize; - - /* check result */ - if (tableLog > maxTableLog) return ERROR(tableLog_tooLarge); /* DTable can't fit code depth */ - if (tableLog <= HUF_DECODER_FAST_TABLELOG && maxTableLog > HUF_DECODER_FAST_TABLELOG) maxTableLog = HUF_DECODER_FAST_TABLELOG; - - /* find maxWeight */ - for (maxW = tableLog; wksp->rankStats[maxW]==0; maxW--) {} /* necessarily finds a solution before 0 */ - - /* Get start index of each weight */ - { U32 w, nextRankStart = 0; - for (w=1; wrankStats[w]; - rankStart[w] = curr; - } - rankStart[0] = nextRankStart; /* put all 0w symbols at the end of sorted list*/ - rankStart[maxW+1] = nextRankStart; - } - - /* sort symbols by weight */ - { U32 s; - for (s=0; sweightList[s]; - U32 const r = rankStart[w]++; - wksp->sortedSymbol[r].symbol = (BYTE)s; - } - rankStart[0] = 0; /* forget 0w symbols; this is beginning of weight(1) */ - } - - /* Build rankVal */ - { U32* const rankVal0 = wksp->rankVal[0]; - { int const rescale = (maxTableLog-tableLog) - 1; /* tableLog <= maxTableLog */ - U32 nextRankVal = 0; - U32 w; - for (w=1; wrankStats[w] << (w+rescale); - rankVal0[w] = curr; - } } - { U32 const minBits = tableLog+1 - maxW; - U32 consumed; - for (consumed = minBits; consumed < maxTableLog - minBits + 1; consumed++) { - U32* const rankValPtr = wksp->rankVal[consumed]; - U32 w; - for (w = 1; w < maxW+1; w++) { - rankValPtr[w] = rankVal0[w] >> consumed; - } } } } - - HUF_fillDTableX2(dt, maxTableLog, - wksp->sortedSymbol, - wksp->rankStart0, wksp->rankVal, maxW, - tableLog+1); - - dtd.tableLog = (BYTE)maxTableLog; - dtd.tableType = 1; - ZSTD_memcpy(DTable, &dtd, sizeof(dtd)); - return iSize; -} - - -FORCE_INLINE_TEMPLATE U32 -HUF_decodeSymbolX2(void* op, BIT_DStream_t* DStream, const HUF_DEltX2* dt, const U32 dtLog) -{ - size_t const val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ - ZSTD_memcpy(op, &dt[val].sequence, 2); - BIT_skipBits(DStream, dt[val].nbBits); - return dt[val].length; -} - -FORCE_INLINE_TEMPLATE U32 -HUF_decodeLastSymbolX2(void* op, BIT_DStream_t* DStream, const HUF_DEltX2* dt, const U32 dtLog) -{ - size_t const val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ - ZSTD_memcpy(op, &dt[val].sequence, 1); - if (dt[val].length==1) { - BIT_skipBits(DStream, dt[val].nbBits); - } else { - if (DStream->bitsConsumed < (sizeof(DStream->bitContainer)*8)) { - BIT_skipBits(DStream, dt[val].nbBits); - if (DStream->bitsConsumed > (sizeof(DStream->bitContainer)*8)) - /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */ - DStream->bitsConsumed = (sizeof(DStream->bitContainer)*8); - } - } - return 1; -} - -#define HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) \ - do { ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); } while (0) - -#define HUF_DECODE_SYMBOLX2_1(ptr, DStreamPtr) \ - do { \ - if (MEM_64bits() || (HUF_TABLELOG_MAX<=12)) \ - ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); \ - } while (0) - -#define HUF_DECODE_SYMBOLX2_2(ptr, DStreamPtr) \ - do { \ - if (MEM_64bits()) \ - ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); \ - } while (0) - -HINT_INLINE size_t -HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, - const HUF_DEltX2* const dt, const U32 dtLog) -{ - BYTE* const pStart = p; - - /* up to 8 symbols at a time */ - if ((size_t)(pEnd - p) >= sizeof(bitDPtr->bitContainer)) { - if (dtLog <= 11 && MEM_64bits()) { - /* up to 10 symbols at a time */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-9)) { - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - } - } else { - /* up to 8 symbols at a time */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-(sizeof(bitDPtr->bitContainer)-1))) { - HUF_DECODE_SYMBOLX2_2(p, bitDPtr); - HUF_DECODE_SYMBOLX2_1(p, bitDPtr); - HUF_DECODE_SYMBOLX2_2(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - } - } - } else { - BIT_reloadDStream(bitDPtr); - } - - /* closer to end : up to 2 symbols at a time */ - if ((size_t)(pEnd - p) >= 2) { - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p <= pEnd-2)) - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - - while (p <= pEnd-2) - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); /* no need to reload : reached the end of DStream */ - } - - if (p < pEnd) - p += HUF_decodeLastSymbolX2(p, bitDPtr, dt, dtLog); - - return p-pStart; -} - -FORCE_INLINE_TEMPLATE size_t -HUF_decompress1X2_usingDTable_internal_body( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable) -{ - BIT_DStream_t bitD; - - /* Init */ - CHECK_F( BIT_initDStream(&bitD, cSrc, cSrcSize) ); - - /* decode */ - { BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ZSTD_maybeNullPtrAdd(ostart, dstSize); - const void* const dtPtr = DTable+1; /* force compiler to not use strict-aliasing */ - const HUF_DEltX2* const dt = (const HUF_DEltX2*)dtPtr; - DTableDesc const dtd = HUF_getDTableDesc(DTable); - HUF_decodeStreamX2(ostart, &bitD, oend, dt, dtd.tableLog); - } - - /* check */ - if (!BIT_endOfDStream(&bitD)) return ERROR(corruption_detected); - - /* decoded size */ - return dstSize; -} - -/* HUF_decompress4X2_usingDTable_internal_body(): - * Conditions: - * @dstSize >= 6 - */ -FORCE_INLINE_TEMPLATE size_t -HUF_decompress4X2_usingDTable_internal_body( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable) -{ - if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ - if (dstSize < 6) return ERROR(corruption_detected); /* stream 4-split doesn't work */ - - { const BYTE* const istart = (const BYTE*) cSrc; - BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ostart + dstSize; - BYTE* const olimit = oend - (sizeof(size_t)-1); - const void* const dtPtr = DTable+1; - const HUF_DEltX2* const dt = (const HUF_DEltX2*)dtPtr; - - /* Init */ - BIT_DStream_t bitD1; - BIT_DStream_t bitD2; - BIT_DStream_t bitD3; - BIT_DStream_t bitD4; - size_t const length1 = MEM_readLE16(istart); - size_t const length2 = MEM_readLE16(istart+2); - size_t const length3 = MEM_readLE16(istart+4); - size_t const length4 = cSrcSize - (length1 + length2 + length3 + 6); - const BYTE* const istart1 = istart + 6; /* jumpTable */ - const BYTE* const istart2 = istart1 + length1; - const BYTE* const istart3 = istart2 + length2; - const BYTE* const istart4 = istart3 + length3; - size_t const segmentSize = (dstSize+3) / 4; - BYTE* const opStart2 = ostart + segmentSize; - BYTE* const opStart3 = opStart2 + segmentSize; - BYTE* const opStart4 = opStart3 + segmentSize; - BYTE* op1 = ostart; - BYTE* op2 = opStart2; - BYTE* op3 = opStart3; - BYTE* op4 = opStart4; - U32 endSignal = 1; - DTableDesc const dtd = HUF_getDTableDesc(DTable); - U32 const dtLog = dtd.tableLog; - - if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ - if (opStart4 > oend) return ERROR(corruption_detected); /* overflow */ - assert(dstSize >= 6 /* validated above */); - CHECK_F( BIT_initDStream(&bitD1, istart1, length1) ); - CHECK_F( BIT_initDStream(&bitD2, istart2, length2) ); - CHECK_F( BIT_initDStream(&bitD3, istart3, length3) ); - CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); - - /* 16-32 symbols per loop (4-8 symbols per stream) */ - if ((size_t)(oend - op4) >= sizeof(size_t)) { - for ( ; (endSignal) & (op4 < olimit); ) { -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_1(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_0(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_1(op2, &bitD2); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_0(op2, &bitD2); - endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; - endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_1(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_0(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_1(op4, &bitD4); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; - endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; -#else - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_1(op1, &bitD1); - HUF_DECODE_SYMBOLX2_1(op2, &bitD2); - HUF_DECODE_SYMBOLX2_1(op3, &bitD3); - HUF_DECODE_SYMBOLX2_1(op4, &bitD4); - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_0(op1, &bitD1); - HUF_DECODE_SYMBOLX2_0(op2, &bitD2); - HUF_DECODE_SYMBOLX2_0(op3, &bitD3); - HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - endSignal = (U32)LIKELY((U32) - (BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished) - & (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished) - & (BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished) - & (BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished)); -#endif - } - } - - /* check corruption */ - if (op1 > opStart2) return ERROR(corruption_detected); - if (op2 > opStart3) return ERROR(corruption_detected); - if (op3 > opStart4) return ERROR(corruption_detected); - /* note : op4 already verified within main loop */ - - /* finish bitStreams one by one */ - HUF_decodeStreamX2(op1, &bitD1, opStart2, dt, dtLog); - HUF_decodeStreamX2(op2, &bitD2, opStart3, dt, dtLog); - HUF_decodeStreamX2(op3, &bitD3, opStart4, dt, dtLog); - HUF_decodeStreamX2(op4, &bitD4, oend, dt, dtLog); - - /* check */ - { U32 const endCheck = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); - if (!endCheck) return ERROR(corruption_detected); } - - /* decoded size */ - return dstSize; - } -} - -#if HUF_NEED_BMI2_FUNCTION -static BMI2_TARGET_ATTRIBUTE -size_t HUF_decompress4X2_usingDTable_internal_bmi2(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable) { - return HUF_decompress4X2_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); -} -#endif - -static -size_t HUF_decompress4X2_usingDTable_internal_default(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable) { - return HUF_decompress4X2_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); -} - -#if ZSTD_ENABLE_ASM_X86_64_BMI2 - -HUF_ASM_DECL void HUF_decompress4X2_usingDTable_internal_fast_asm_loop(HUF_DecompressFastArgs* args) ZSTDLIB_HIDDEN; - -#endif - -static HUF_FAST_BMI2_ATTRS -void HUF_decompress4X2_usingDTable_internal_fast_c_loop(HUF_DecompressFastArgs* args) -{ - U64 bits[4]; - BYTE const* ip[4]; - BYTE* op[4]; - BYTE* oend[4]; - HUF_DEltX2 const* const dtable = (HUF_DEltX2 const*)args->dt; - BYTE const* const ilowest = args->ilowest; - - /* Copy the arguments to local registers. */ - ZSTD_memcpy(&bits, &args->bits, sizeof(bits)); - ZSTD_memcpy((void*)(&ip), &args->ip, sizeof(ip)); - ZSTD_memcpy(&op, &args->op, sizeof(op)); - - oend[0] = op[1]; - oend[1] = op[2]; - oend[2] = op[3]; - oend[3] = args->oend; - - assert(MEM_isLittleEndian()); - assert(!MEM_32bits()); - - for (;;) { - BYTE* olimit; - int stream; - - /* Assert loop preconditions */ -#ifndef NDEBUG - for (stream = 0; stream < 4; ++stream) { - assert(op[stream] <= oend[stream]); - assert(ip[stream] >= ilowest); - } -#endif - /* Compute olimit */ - { - /* Each loop does 5 table lookups for each of the 4 streams. - * Each table lookup consumes up to 11 bits of input, and produces - * up to 2 bytes of output. - */ - /* We can consume up to 7 bytes of input per iteration per stream. - * We also know that each input pointer is >= ip[0]. So we can run - * iters loops before running out of input. - */ - size_t iters = (size_t)(ip[0] - ilowest) / 7; - /* Each iteration can produce up to 10 bytes of output per stream. - * Each output stream my advance at different rates. So take the - * minimum number of safe iterations among all the output streams. - */ - for (stream = 0; stream < 4; ++stream) { - size_t const oiters = (size_t)(oend[stream] - op[stream]) / 10; - iters = MIN(iters, oiters); - } - - /* Each iteration produces at least 5 output symbols. So until - * op[3] crosses olimit, we know we haven't executed iters - * iterations yet. This saves us maintaining an iters counter, - * at the expense of computing the remaining # of iterations - * more frequently. - */ - olimit = op[3] + (iters * 5); - - /* Exit the fast decoding loop once we reach the end. */ - if (op[3] == olimit) - break; - - /* Exit the decoding loop if any input pointer has crossed the - * previous one. This indicates corruption, and a precondition - * to our loop is that ip[i] >= ip[0]. - */ - for (stream = 1; stream < 4; ++stream) { - if (ip[stream] < ip[stream - 1]) - goto _out; - } - } - -#ifndef NDEBUG - for (stream = 1; stream < 4; ++stream) { - assert(ip[stream] >= ip[stream - 1]); - } -#endif - -#define HUF_4X2_DECODE_SYMBOL(_stream, _decode3) \ - do { \ - if ((_decode3) || (_stream) != 3) { \ - int const index = (int)(bits[(_stream)] >> 53); \ - HUF_DEltX2 const entry = dtable[index]; \ - MEM_write16(op[(_stream)], entry.sequence); \ - bits[(_stream)] <<= (entry.nbBits) & 0x3F; \ - op[(_stream)] += (entry.length); \ - } \ - } while (0) - -#define HUF_4X2_RELOAD_STREAM(_stream) \ - do { \ - HUF_4X2_DECODE_SYMBOL(3, 1); \ - { \ - int const ctz = ZSTD_countTrailingZeros64(bits[(_stream)]); \ - int const nbBits = ctz & 7; \ - int const nbBytes = ctz >> 3; \ - ip[(_stream)] -= nbBytes; \ - bits[(_stream)] = MEM_read64(ip[(_stream)]) | 1; \ - bits[(_stream)] <<= nbBits; \ - } \ - } while (0) - - /* Manually unroll the loop because compilers don't consistently - * unroll the inner loops, which destroys performance. - */ - do { - /* Decode 5 symbols from each of the first 3 streams. - * The final stream will be decoded during the reload phase - * to reduce register pressure. - */ - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); - HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); - - /* Decode one symbol from the final stream */ - HUF_4X2_DECODE_SYMBOL(3, 1); - - /* Decode 4 symbols from the final stream & reload bitstreams. - * The final stream is reloaded last, meaning that all 5 symbols - * are decoded from the final stream before it is reloaded. - */ - HUF_4X_FOR_EACH_STREAM(HUF_4X2_RELOAD_STREAM); - } while (op[3] < olimit); - } - -#undef HUF_4X2_DECODE_SYMBOL -#undef HUF_4X2_RELOAD_STREAM - -_out: - - /* Save the final values of each of the state variables back to args. */ - ZSTD_memcpy(&args->bits, &bits, sizeof(bits)); - ZSTD_memcpy((void*)(&args->ip), &ip, sizeof(ip)); - ZSTD_memcpy(&args->op, &op, sizeof(op)); -} - - -static HUF_FAST_BMI2_ATTRS size_t -HUF_decompress4X2_usingDTable_internal_fast( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const HUF_DTable* DTable, - HUF_DecompressFastLoopFn loopFn) { - void const* dt = DTable + 1; - const BYTE* const ilowest = (const BYTE*)cSrc; - BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); - HUF_DecompressFastArgs args; - { - size_t const ret = HUF_DecompressFastArgs_init(&args, dst, dstSize, cSrc, cSrcSize, DTable); - FORWARD_IF_ERROR(ret, "Failed to init asm args"); - if (ret == 0) - return 0; - } - - assert(args.ip[0] >= args.ilowest); - loopFn(&args); - - /* note : op4 already verified within main loop */ - assert(args.ip[0] >= ilowest); - assert(args.ip[1] >= ilowest); - assert(args.ip[2] >= ilowest); - assert(args.ip[3] >= ilowest); - assert(args.op[3] <= oend); - - assert(ilowest == args.ilowest); - assert(ilowest + 6 == args.iend[0]); - (void)ilowest; - - /* finish bitStreams one by one */ - { - size_t const segmentSize = (dstSize+3) / 4; - BYTE* segmentEnd = (BYTE*)dst; - int i; - for (i = 0; i < 4; ++i) { - BIT_DStream_t bit; - if (segmentSize <= (size_t)(oend - segmentEnd)) - segmentEnd += segmentSize; - else - segmentEnd = oend; - FORWARD_IF_ERROR(HUF_initRemainingDStream(&bit, &args, i, segmentEnd), "corruption"); - args.op[i] += HUF_decodeStreamX2(args.op[i], &bit, segmentEnd, (HUF_DEltX2 const*)dt, HUF_DECODER_FAST_TABLELOG); - if (args.op[i] != segmentEnd) - return ERROR(corruption_detected); - } - } - - /* decoded size */ - return dstSize; -} - -static size_t HUF_decompress4X2_usingDTable_internal(void* dst, size_t dstSize, void const* cSrc, - size_t cSrcSize, HUF_DTable const* DTable, int flags) -{ - HUF_DecompressUsingDTableFn fallbackFn = HUF_decompress4X2_usingDTable_internal_default; - HUF_DecompressFastLoopFn loopFn = HUF_decompress4X2_usingDTable_internal_fast_c_loop; - -#if DYNAMIC_BMI2 - if (flags & HUF_flags_bmi2) { - fallbackFn = HUF_decompress4X2_usingDTable_internal_bmi2; -# if ZSTD_ENABLE_ASM_X86_64_BMI2 - if (!(flags & HUF_flags_disableAsm)) { - loopFn = HUF_decompress4X2_usingDTable_internal_fast_asm_loop; - } -# endif - } else { - return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); - } -#endif - -#if ZSTD_ENABLE_ASM_X86_64_BMI2 && defined(__BMI2__) - if (!(flags & HUF_flags_disableAsm)) { - loopFn = HUF_decompress4X2_usingDTable_internal_fast_asm_loop; - } -#endif - - if (HUF_ENABLE_FAST_DECODE && !(flags & HUF_flags_disableFast)) { - size_t const ret = HUF_decompress4X2_usingDTable_internal_fast(dst, dstSize, cSrc, cSrcSize, DTable, loopFn); - if (ret != 0) - return ret; - } - return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); -} - -HUF_DGEN(HUF_decompress1X2_usingDTable_internal) - -size_t HUF_decompress1X2_DCtx_wksp(HUF_DTable* DCtx, void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - void* workSpace, size_t wkspSize, int flags) -{ - const BYTE* ip = (const BYTE*) cSrc; - - size_t const hSize = HUF_readDTableX2_wksp(DCtx, cSrc, cSrcSize, - workSpace, wkspSize, flags); - if (HUF_isError(hSize)) return hSize; - if (hSize >= cSrcSize) return ERROR(srcSize_wrong); - ip += hSize; cSrcSize -= hSize; - - return HUF_decompress1X2_usingDTable_internal(dst, dstSize, ip, cSrcSize, DCtx, flags); -} - -static size_t HUF_decompress4X2_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - void* workSpace, size_t wkspSize, int flags) -{ - const BYTE* ip = (const BYTE*) cSrc; - - size_t hSize = HUF_readDTableX2_wksp(dctx, cSrc, cSrcSize, - workSpace, wkspSize, flags); - if (HUF_isError(hSize)) return hSize; - if (hSize >= cSrcSize) return ERROR(srcSize_wrong); - ip += hSize; cSrcSize -= hSize; - - return HUF_decompress4X2_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); -} - -#endif /* HUF_FORCE_DECOMPRESS_X1 */ - - -/* ***********************************/ -/* Universal decompression selectors */ -/* ***********************************/ - - -#if !defined(HUF_FORCE_DECOMPRESS_X1) && !defined(HUF_FORCE_DECOMPRESS_X2) -typedef struct { U32 tableTime; U32 decode256Time; } algo_time_t; -static const algo_time_t algoTime[16 /* Quantization */][2 /* single, double */] = -{ - /* single, double, quad */ - {{0,0}, {1,1}}, /* Q==0 : impossible */ - {{0,0}, {1,1}}, /* Q==1 : impossible */ - {{ 150,216}, { 381,119}}, /* Q == 2 : 12-18% */ - {{ 170,205}, { 514,112}}, /* Q == 3 : 18-25% */ - {{ 177,199}, { 539,110}}, /* Q == 4 : 25-32% */ - {{ 197,194}, { 644,107}}, /* Q == 5 : 32-38% */ - {{ 221,192}, { 735,107}}, /* Q == 6 : 38-44% */ - {{ 256,189}, { 881,106}}, /* Q == 7 : 44-50% */ - {{ 359,188}, {1167,109}}, /* Q == 8 : 50-56% */ - {{ 582,187}, {1570,114}}, /* Q == 9 : 56-62% */ - {{ 688,187}, {1712,122}}, /* Q ==10 : 62-69% */ - {{ 825,186}, {1965,136}}, /* Q ==11 : 69-75% */ - {{ 976,185}, {2131,150}}, /* Q ==12 : 75-81% */ - {{1180,186}, {2070,175}}, /* Q ==13 : 81-87% */ - {{1377,185}, {1731,202}}, /* Q ==14 : 87-93% */ - {{1412,185}, {1695,202}}, /* Q ==15 : 93-99% */ -}; -#endif - -/** HUF_selectDecoder() : - * Tells which decoder is likely to decode faster, - * based on a set of pre-computed metrics. - * @return : 0==HUF_decompress4X1, 1==HUF_decompress4X2 . - * Assumption : 0 < dstSize <= 128 KB */ -U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize) -{ - assert(dstSize > 0); - assert(dstSize <= 128*1024); -#if defined(HUF_FORCE_DECOMPRESS_X1) - (void)dstSize; - (void)cSrcSize; - return 0; -#elif defined(HUF_FORCE_DECOMPRESS_X2) - (void)dstSize; - (void)cSrcSize; - return 1; -#else - /* decoder timing evaluation */ - { U32 const Q = (cSrcSize >= dstSize) ? 15 : (U32)(cSrcSize * 16 / dstSize); /* Q < 16 */ - U32 const D256 = (U32)(dstSize >> 8); - U32 const DTime0 = algoTime[Q][0].tableTime + (algoTime[Q][0].decode256Time * D256); - U32 DTime1 = algoTime[Q][1].tableTime + (algoTime[Q][1].decode256Time * D256); - DTime1 += DTime1 >> 5; /* small advantage to algorithm using less memory, to reduce cache eviction */ - return DTime1 < DTime0; - } -#endif -} - -size_t HUF_decompress1X_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - void* workSpace, size_t wkspSize, int flags) -{ - /* validation checks */ - if (dstSize == 0) return ERROR(dstSize_tooSmall); - if (cSrcSize > dstSize) return ERROR(corruption_detected); /* invalid */ - if (cSrcSize == dstSize) { ZSTD_memcpy(dst, cSrc, dstSize); return dstSize; } /* not compressed */ - if (cSrcSize == 1) { ZSTD_memset(dst, *(const BYTE*)cSrc, dstSize); return dstSize; } /* RLE */ - - { U32 const algoNb = HUF_selectDecoder(dstSize, cSrcSize); -#if defined(HUF_FORCE_DECOMPRESS_X1) - (void)algoNb; - assert(algoNb == 0); - return HUF_decompress1X1_DCtx_wksp(dctx, dst, dstSize, cSrc, - cSrcSize, workSpace, wkspSize, flags); -#elif defined(HUF_FORCE_DECOMPRESS_X2) - (void)algoNb; - assert(algoNb == 1); - return HUF_decompress1X2_DCtx_wksp(dctx, dst, dstSize, cSrc, - cSrcSize, workSpace, wkspSize, flags); -#else - return algoNb ? HUF_decompress1X2_DCtx_wksp(dctx, dst, dstSize, cSrc, - cSrcSize, workSpace, wkspSize, flags): - HUF_decompress1X1_DCtx_wksp(dctx, dst, dstSize, cSrc, - cSrcSize, workSpace, wkspSize, flags); -#endif - } -} - - -size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags) -{ - DTableDesc const dtd = HUF_getDTableDesc(DTable); -#if defined(HUF_FORCE_DECOMPRESS_X1) - (void)dtd; - assert(dtd.tableType == 0); - return HUF_decompress1X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#elif defined(HUF_FORCE_DECOMPRESS_X2) - (void)dtd; - assert(dtd.tableType == 1); - return HUF_decompress1X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#else - return dtd.tableType ? HUF_decompress1X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags) : - HUF_decompress1X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#endif -} - -#ifndef HUF_FORCE_DECOMPRESS_X2 -size_t HUF_decompress1X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags) -{ - const BYTE* ip = (const BYTE*) cSrc; - - size_t const hSize = HUF_readDTableX1_wksp(dctx, cSrc, cSrcSize, workSpace, wkspSize, flags); - if (HUF_isError(hSize)) return hSize; - if (hSize >= cSrcSize) return ERROR(srcSize_wrong); - ip += hSize; cSrcSize -= hSize; - - return HUF_decompress1X1_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); -} -#endif - -size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags) -{ - DTableDesc const dtd = HUF_getDTableDesc(DTable); -#if defined(HUF_FORCE_DECOMPRESS_X1) - (void)dtd; - assert(dtd.tableType == 0); - return HUF_decompress4X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#elif defined(HUF_FORCE_DECOMPRESS_X2) - (void)dtd; - assert(dtd.tableType == 1); - return HUF_decompress4X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#else - return dtd.tableType ? HUF_decompress4X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags) : - HUF_decompress4X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); -#endif -} - -size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags) -{ - /* validation checks */ - if (dstSize == 0) return ERROR(dstSize_tooSmall); - if (cSrcSize == 0) return ERROR(corruption_detected); - - { U32 const algoNb = HUF_selectDecoder(dstSize, cSrcSize); -#if defined(HUF_FORCE_DECOMPRESS_X1) - (void)algoNb; - assert(algoNb == 0); - return HUF_decompress4X1_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); -#elif defined(HUF_FORCE_DECOMPRESS_X2) - (void)algoNb; - assert(algoNb == 1); - return HUF_decompress4X2_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); -#else - return algoNb ? HUF_decompress4X2_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags) : - HUF_decompress4X1_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); -#endif - } -} diff --git a/third_party/zstd/lib/decompress/huf_decompress_amd64.S b/third_party/zstd/lib/decompress/huf_decompress_amd64.S deleted file mode 100644 index 656aada..0000000 --- a/third_party/zstd/lib/decompress/huf_decompress_amd64.S +++ /dev/null @@ -1,602 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#include "../common/portability_macros.h" - -#if defined(__ELF__) && defined(__GNUC__) -/* Stack marking - * ref: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart - */ -.section .note.GNU-stack,"",%progbits - -#if defined(__aarch64__) -/* Mark that this assembly supports BTI & PAC, because it is empty for aarch64. - * See: https://github.com/facebook/zstd/issues/3841 - * See: https://gcc.godbolt.org/z/sqr5T4ffK - * See: https://lore.kernel.org/linux-arm-kernel/20200429211641.9279-8-broonie@kernel.org/ - * See: https://reviews.llvm.org/D62609 - */ -.pushsection .note.gnu.property, "a" -.p2align 3 -.long 4 /* size of the name - "GNU\0" */ -.long 0x10 /* size of descriptor */ -.long 0x5 /* NT_GNU_PROPERTY_TYPE_0 */ -.asciz "GNU" -.long 0xc0000000 /* pr_type - GNU_PROPERTY_AARCH64_FEATURE_1_AND */ -.long 4 /* pr_datasz - 4 bytes */ -.long 3 /* pr_data - GNU_PROPERTY_AARCH64_FEATURE_1_BTI | GNU_PROPERTY_AARCH64_FEATURE_1_PAC */ -.p2align 3 /* pr_padding - bring everything to 8 byte alignment */ -.popsection -#endif - -#endif - -#if ZSTD_ENABLE_ASM_X86_64_BMI2 - -/* Calling convention: - * - * %rdi (or %rcx on Windows) contains the first argument: HUF_DecompressAsmArgs*. - * %rbp isn't maintained (no frame pointer). - * %rsp contains the stack pointer that grows down. - * No red-zone is assumed, only addresses >= %rsp are used. - * All register contents are preserved. - */ - -ZSTD_HIDE_ASM_FUNCTION(HUF_decompress4X1_usingDTable_internal_fast_asm_loop) -ZSTD_HIDE_ASM_FUNCTION(HUF_decompress4X2_usingDTable_internal_fast_asm_loop) -ZSTD_HIDE_ASM_FUNCTION(_HUF_decompress4X2_usingDTable_internal_fast_asm_loop) -ZSTD_HIDE_ASM_FUNCTION(_HUF_decompress4X1_usingDTable_internal_fast_asm_loop) -.global HUF_decompress4X1_usingDTable_internal_fast_asm_loop -.global HUF_decompress4X2_usingDTable_internal_fast_asm_loop -.global _HUF_decompress4X1_usingDTable_internal_fast_asm_loop -.global _HUF_decompress4X2_usingDTable_internal_fast_asm_loop -.text - -/* Sets up register mappings for clarity. - * op[], bits[], dtable & ip[0] each get their own register. - * ip[1,2,3] & olimit alias var[]. - * %rax is a scratch register. - */ - -#define op0 rsi -#define op1 rbx -#define op2 rcx -#define op3 rdi - -#define ip0 r8 -#define ip1 r9 -#define ip2 r10 -#define ip3 r11 - -#define bits0 rbp -#define bits1 rdx -#define bits2 r12 -#define bits3 r13 -#define dtable r14 -#define olimit r15 - -/* var[] aliases ip[1,2,3] & olimit - * ip[1,2,3] are saved every iteration. - * olimit is only used in compute_olimit. - */ -#define var0 r15 -#define var1 r9 -#define var2 r10 -#define var3 r11 - -/* 32-bit var registers */ -#define vard0 r15d -#define vard1 r9d -#define vard2 r10d -#define vard3 r11d - -/* Calls X(N) for each stream 0, 1, 2, 3. */ -#define FOR_EACH_STREAM(X) \ - X(0); \ - X(1); \ - X(2); \ - X(3) - -/* Calls X(N, idx) for each stream 0, 1, 2, 3. */ -#define FOR_EACH_STREAM_WITH_INDEX(X, idx) \ - X(0, idx); \ - X(1, idx); \ - X(2, idx); \ - X(3, idx) - -/* Define both _HUF_* & HUF_* symbols because MacOS - * C symbols are prefixed with '_' & Linux symbols aren't. - */ -_HUF_decompress4X1_usingDTable_internal_fast_asm_loop: -HUF_decompress4X1_usingDTable_internal_fast_asm_loop: - ZSTD_CET_ENDBRANCH - /* Save all registers - even if they are callee saved for simplicity. */ - push %rax - push %rbx - push %rcx - push %rdx - push %rbp - push %rsi - push %rdi - push %r8 - push %r9 - push %r10 - push %r11 - push %r12 - push %r13 - push %r14 - push %r15 - - /* Read HUF_DecompressAsmArgs* args from %rax */ -#if defined(_WIN32) - movq %rcx, %rax -#else - movq %rdi, %rax -#endif - movq 0(%rax), %ip0 - movq 8(%rax), %ip1 - movq 16(%rax), %ip2 - movq 24(%rax), %ip3 - movq 32(%rax), %op0 - movq 40(%rax), %op1 - movq 48(%rax), %op2 - movq 56(%rax), %op3 - movq 64(%rax), %bits0 - movq 72(%rax), %bits1 - movq 80(%rax), %bits2 - movq 88(%rax), %bits3 - movq 96(%rax), %dtable - push %rax /* argument */ - push 104(%rax) /* ilowest */ - push 112(%rax) /* oend */ - push %olimit /* olimit space */ - - subq $24, %rsp - -.L_4X1_compute_olimit: - /* Computes how many iterations we can do safely - * %r15, %rax may be clobbered - * rbx, rdx must be saved - * op3 & ip0 mustn't be clobbered - */ - movq %rbx, 0(%rsp) - movq %rdx, 8(%rsp) - - movq 32(%rsp), %rax /* rax = oend */ - subq %op3, %rax /* rax = oend - op3 */ - - /* r15 = (oend - op3) / 5 */ - movabsq $-3689348814741910323, %rdx - mulq %rdx - movq %rdx, %r15 - shrq $2, %r15 - - movq %ip0, %rax /* rax = ip0 */ - movq 40(%rsp), %rdx /* rdx = ilowest */ - subq %rdx, %rax /* rax = ip0 - ilowest */ - movq %rax, %rbx /* rbx = ip0 - ilowest */ - - /* rdx = (ip0 - ilowest) / 7 */ - movabsq $2635249153387078803, %rdx - mulq %rdx - subq %rdx, %rbx - shrq %rbx - addq %rbx, %rdx - shrq $2, %rdx - - /* r15 = min(%rdx, %r15) */ - cmpq %rdx, %r15 - cmova %rdx, %r15 - - /* r15 = r15 * 5 */ - leaq (%r15, %r15, 4), %r15 - - /* olimit = op3 + r15 */ - addq %op3, %olimit - - movq 8(%rsp), %rdx - movq 0(%rsp), %rbx - - /* If (op3 + 20 > olimit) */ - movq %op3, %rax /* rax = op3 */ - cmpq %rax, %olimit /* op3 == olimit */ - je .L_4X1_exit - - /* If (ip1 < ip0) go to exit */ - cmpq %ip0, %ip1 - jb .L_4X1_exit - - /* If (ip2 < ip1) go to exit */ - cmpq %ip1, %ip2 - jb .L_4X1_exit - - /* If (ip3 < ip2) go to exit */ - cmpq %ip2, %ip3 - jb .L_4X1_exit - -/* Reads top 11 bits from bits[n] - * Loads dt[bits[n]] into var[n] - */ -#define GET_NEXT_DELT(n) \ - movq $53, %var##n; \ - shrxq %var##n, %bits##n, %var##n; \ - movzwl (%dtable,%var##n,2),%vard##n - -/* var[n] must contain the DTable entry computed with GET_NEXT_DELT - * Moves var[n] to %rax - * bits[n] <<= var[n] & 63 - * op[n][idx] = %rax >> 8 - * %ah is a way to access bits [8, 16) of %rax - */ -#define DECODE_FROM_DELT(n, idx) \ - movq %var##n, %rax; \ - shlxq %var##n, %bits##n, %bits##n; \ - movb %ah, idx(%op##n) - -/* Assumes GET_NEXT_DELT has been called. - * Calls DECODE_FROM_DELT then GET_NEXT_DELT - */ -#define DECODE_AND_GET_NEXT(n, idx) \ - DECODE_FROM_DELT(n, idx); \ - GET_NEXT_DELT(n) \ - -/* // ctz & nbBytes is stored in bits[n] - * // nbBits is stored in %rax - * ctz = CTZ[bits[n]] - * nbBits = ctz & 7 - * nbBytes = ctz >> 3 - * op[n] += 5 - * ip[n] -= nbBytes - * // Note: x86-64 is little-endian ==> no bswap - * bits[n] = MEM_readST(ip[n]) | 1 - * bits[n] <<= nbBits - */ -#define RELOAD_BITS(n) \ - bsfq %bits##n, %bits##n; \ - movq %bits##n, %rax; \ - andq $7, %rax; \ - shrq $3, %bits##n; \ - leaq 5(%op##n), %op##n; \ - subq %bits##n, %ip##n; \ - movq (%ip##n), %bits##n; \ - orq $1, %bits##n; \ - shlx %rax, %bits##n, %bits##n - - /* Store clobbered variables on the stack */ - movq %olimit, 24(%rsp) - movq %ip1, 0(%rsp) - movq %ip2, 8(%rsp) - movq %ip3, 16(%rsp) - - /* Call GET_NEXT_DELT for each stream */ - FOR_EACH_STREAM(GET_NEXT_DELT) - - .p2align 6 - -.L_4X1_loop_body: - /* Decode 5 symbols in each of the 4 streams (20 total) - * Must have called GET_NEXT_DELT for each stream - */ - FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 0) - FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 1) - FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 2) - FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 3) - FOR_EACH_STREAM_WITH_INDEX(DECODE_FROM_DELT, 4) - - /* Load ip[1,2,3] from stack (var[] aliases them) - * ip[] is needed for RELOAD_BITS - * Each will be stored back to the stack after RELOAD - */ - movq 0(%rsp), %ip1 - movq 8(%rsp), %ip2 - movq 16(%rsp), %ip3 - - /* Reload each stream & fetch the next table entry - * to prepare for the next iteration - */ - RELOAD_BITS(0) - GET_NEXT_DELT(0) - - RELOAD_BITS(1) - movq %ip1, 0(%rsp) - GET_NEXT_DELT(1) - - RELOAD_BITS(2) - movq %ip2, 8(%rsp) - GET_NEXT_DELT(2) - - RELOAD_BITS(3) - movq %ip3, 16(%rsp) - GET_NEXT_DELT(3) - - /* If op3 < olimit: continue the loop */ - cmp %op3, 24(%rsp) - ja .L_4X1_loop_body - - /* Reload ip[1,2,3] from stack */ - movq 0(%rsp), %ip1 - movq 8(%rsp), %ip2 - movq 16(%rsp), %ip3 - - /* Re-compute olimit */ - jmp .L_4X1_compute_olimit - -#undef GET_NEXT_DELT -#undef DECODE_FROM_DELT -#undef DECODE -#undef RELOAD_BITS -.L_4X1_exit: - addq $24, %rsp - - /* Restore stack (oend & olimit) */ - pop %rax /* olimit */ - pop %rax /* oend */ - pop %rax /* ilowest */ - pop %rax /* arg */ - - /* Save ip / op / bits */ - movq %ip0, 0(%rax) - movq %ip1, 8(%rax) - movq %ip2, 16(%rax) - movq %ip3, 24(%rax) - movq %op0, 32(%rax) - movq %op1, 40(%rax) - movq %op2, 48(%rax) - movq %op3, 56(%rax) - movq %bits0, 64(%rax) - movq %bits1, 72(%rax) - movq %bits2, 80(%rax) - movq %bits3, 88(%rax) - - /* Restore registers */ - pop %r15 - pop %r14 - pop %r13 - pop %r12 - pop %r11 - pop %r10 - pop %r9 - pop %r8 - pop %rdi - pop %rsi - pop %rbp - pop %rdx - pop %rcx - pop %rbx - pop %rax - ret - -_HUF_decompress4X2_usingDTable_internal_fast_asm_loop: -HUF_decompress4X2_usingDTable_internal_fast_asm_loop: - ZSTD_CET_ENDBRANCH - /* Save all registers - even if they are callee saved for simplicity. */ - push %rax - push %rbx - push %rcx - push %rdx - push %rbp - push %rsi - push %rdi - push %r8 - push %r9 - push %r10 - push %r11 - push %r12 - push %r13 - push %r14 - push %r15 - - /* Read HUF_DecompressAsmArgs* args from %rax */ -#if defined(_WIN32) - movq %rcx, %rax -#else - movq %rdi, %rax -#endif - movq 0(%rax), %ip0 - movq 8(%rax), %ip1 - movq 16(%rax), %ip2 - movq 24(%rax), %ip3 - movq 32(%rax), %op0 - movq 40(%rax), %op1 - movq 48(%rax), %op2 - movq 56(%rax), %op3 - movq 64(%rax), %bits0 - movq 72(%rax), %bits1 - movq 80(%rax), %bits2 - movq 88(%rax), %bits3 - movq 96(%rax), %dtable - push %rax /* argument */ - push %rax /* olimit */ - push 104(%rax) /* ilowest */ - - movq 112(%rax), %rax - push %rax /* oend3 */ - - movq %op3, %rax - push %rax /* oend2 */ - - movq %op2, %rax - push %rax /* oend1 */ - - movq %op1, %rax - push %rax /* oend0 */ - - /* Scratch space */ - subq $8, %rsp - -.L_4X2_compute_olimit: - /* Computes how many iterations we can do safely - * %r15, %rax may be clobbered - * rdx must be saved - * op[1,2,3,4] & ip0 mustn't be clobbered - */ - movq %rdx, 0(%rsp) - - /* We can consume up to 7 input bytes each iteration. */ - movq %ip0, %rax /* rax = ip0 */ - movq 40(%rsp), %rdx /* rdx = ilowest */ - subq %rdx, %rax /* rax = ip0 - ilowest */ - movq %rax, %r15 /* r15 = ip0 - ilowest */ - - /* rdx = rax / 7 */ - movabsq $2635249153387078803, %rdx - mulq %rdx - subq %rdx, %r15 - shrq %r15 - addq %r15, %rdx - shrq $2, %rdx - - /* r15 = (ip0 - ilowest) / 7 */ - movq %rdx, %r15 - - /* r15 = min(r15, min(oend0 - op0, oend1 - op1, oend2 - op2, oend3 - op3) / 10) */ - movq 8(%rsp), %rax /* rax = oend0 */ - subq %op0, %rax /* rax = oend0 - op0 */ - movq 16(%rsp), %rdx /* rdx = oend1 */ - subq %op1, %rdx /* rdx = oend1 - op1 */ - - cmpq %rax, %rdx - cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ - - movq 24(%rsp), %rax /* rax = oend2 */ - subq %op2, %rax /* rax = oend2 - op2 */ - - cmpq %rax, %rdx - cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ - - movq 32(%rsp), %rax /* rax = oend3 */ - subq %op3, %rax /* rax = oend3 - op3 */ - - cmpq %rax, %rdx - cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ - - movabsq $-3689348814741910323, %rax - mulq %rdx - shrq $3, %rdx /* rdx = rdx / 10 */ - - /* r15 = min(%rdx, %r15) */ - cmpq %rdx, %r15 - cmova %rdx, %r15 - - /* olimit = op3 + 5 * r15 */ - movq %r15, %rax - leaq (%op3, %rax, 4), %olimit - addq %rax, %olimit - - movq 0(%rsp), %rdx - - /* If (op3 + 10 > olimit) */ - movq %op3, %rax /* rax = op3 */ - cmpq %rax, %olimit /* op3 == olimit */ - je .L_4X2_exit - - /* If (ip1 < ip0) go to exit */ - cmpq %ip0, %ip1 - jb .L_4X2_exit - - /* If (ip2 < ip1) go to exit */ - cmpq %ip1, %ip2 - jb .L_4X2_exit - - /* If (ip3 < ip2) go to exit */ - cmpq %ip2, %ip3 - jb .L_4X2_exit - -#define DECODE(n, idx) \ - movq %bits##n, %rax; \ - shrq $53, %rax; \ - movzwl 0(%dtable,%rax,4),%r8d; \ - movzbl 2(%dtable,%rax,4),%r15d; \ - movzbl 3(%dtable,%rax,4),%eax; \ - movw %r8w, (%op##n); \ - shlxq %r15, %bits##n, %bits##n; \ - addq %rax, %op##n - -#define RELOAD_BITS(n) \ - bsfq %bits##n, %bits##n; \ - movq %bits##n, %rax; \ - shrq $3, %bits##n; \ - andq $7, %rax; \ - subq %bits##n, %ip##n; \ - movq (%ip##n), %bits##n; \ - orq $1, %bits##n; \ - shlxq %rax, %bits##n, %bits##n - - - movq %olimit, 48(%rsp) - - .p2align 6 - -.L_4X2_loop_body: - /* We clobber r8, so store it on the stack */ - movq %r8, 0(%rsp) - - /* Decode 5 symbols from each of the 4 streams (20 symbols total). */ - FOR_EACH_STREAM_WITH_INDEX(DECODE, 0) - FOR_EACH_STREAM_WITH_INDEX(DECODE, 1) - FOR_EACH_STREAM_WITH_INDEX(DECODE, 2) - FOR_EACH_STREAM_WITH_INDEX(DECODE, 3) - FOR_EACH_STREAM_WITH_INDEX(DECODE, 4) - - /* Reload r8 */ - movq 0(%rsp), %r8 - - FOR_EACH_STREAM(RELOAD_BITS) - - cmp %op3, 48(%rsp) - ja .L_4X2_loop_body - jmp .L_4X2_compute_olimit - -#undef DECODE -#undef RELOAD_BITS -.L_4X2_exit: - addq $8, %rsp - /* Restore stack (oend & olimit) */ - pop %rax /* oend0 */ - pop %rax /* oend1 */ - pop %rax /* oend2 */ - pop %rax /* oend3 */ - pop %rax /* ilowest */ - pop %rax /* olimit */ - pop %rax /* arg */ - - /* Save ip / op / bits */ - movq %ip0, 0(%rax) - movq %ip1, 8(%rax) - movq %ip2, 16(%rax) - movq %ip3, 24(%rax) - movq %op0, 32(%rax) - movq %op1, 40(%rax) - movq %op2, 48(%rax) - movq %op3, 56(%rax) - movq %bits0, 64(%rax) - movq %bits1, 72(%rax) - movq %bits2, 80(%rax) - movq %bits3, 88(%rax) - - /* Restore registers */ - pop %r15 - pop %r14 - pop %r13 - pop %r12 - pop %r11 - pop %r10 - pop %r9 - pop %r8 - pop %rdi - pop %rsi - pop %rbp - pop %rdx - pop %rcx - pop %rbx - pop %rax - ret - -#endif diff --git a/third_party/zstd/lib/decompress/zstd_ddict.c b/third_party/zstd/lib/decompress/zstd_ddict.c deleted file mode 100644 index 309ec0d..0000000 --- a/third_party/zstd/lib/decompress/zstd_ddict.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* zstd_ddict.c : - * concentrates all logic that needs to know the internals of ZSTD_DDict object */ - -/*-******************************************************* -* Dependencies -*********************************************************/ -#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customFree */ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ -#include "../common/cpu.h" /* bmi2 */ -#include "../common/mem.h" /* low level memory routines */ -#define FSE_STATIC_LINKING_ONLY -#include "../common/fse.h" -#include "../common/huf.h" -#include "zstd_decompress_internal.h" -#include "zstd_ddict.h" - -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -# include "../legacy/zstd_legacy.h" -#endif - - - -/*-******************************************************* -* Types -*********************************************************/ -struct ZSTD_DDict_s { - void* dictBuffer; - const void* dictContent; - size_t dictSize; - ZSTD_entropyDTables_t entropy; - U32 dictID; - U32 entropyPresent; - ZSTD_customMem cMem; -}; /* typedef'd to ZSTD_DDict within "zstd.h" */ - -const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict) -{ - assert(ddict != NULL); - return ddict->dictContent; -} - -size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict) -{ - assert(ddict != NULL); - return ddict->dictSize; -} - -void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) -{ - DEBUGLOG(4, "ZSTD_copyDDictParameters"); - assert(dctx != NULL); - assert(ddict != NULL); - dctx->dictID = ddict->dictID; - dctx->prefixStart = ddict->dictContent; - dctx->virtualStart = ddict->dictContent; - dctx->dictEnd = (const BYTE*)ddict->dictContent + ddict->dictSize; - dctx->previousDstEnd = dctx->dictEnd; -#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - dctx->dictContentBeginForFuzzing = dctx->prefixStart; - dctx->dictContentEndForFuzzing = dctx->previousDstEnd; -#endif - if (ddict->entropyPresent) { - dctx->litEntropy = 1; - dctx->fseEntropy = 1; - dctx->LLTptr = ddict->entropy.LLTable; - dctx->MLTptr = ddict->entropy.MLTable; - dctx->OFTptr = ddict->entropy.OFTable; - dctx->HUFptr = ddict->entropy.hufTable; - dctx->entropy.rep[0] = ddict->entropy.rep[0]; - dctx->entropy.rep[1] = ddict->entropy.rep[1]; - dctx->entropy.rep[2] = ddict->entropy.rep[2]; - } else { - dctx->litEntropy = 0; - dctx->fseEntropy = 0; - } -} - - -static size_t -ZSTD_loadEntropy_intoDDict(ZSTD_DDict* ddict, - ZSTD_dictContentType_e dictContentType) -{ - ddict->dictID = 0; - ddict->entropyPresent = 0; - if (dictContentType == ZSTD_dct_rawContent) return 0; - - if (ddict->dictSize < 8) { - if (dictContentType == ZSTD_dct_fullDict) - return ERROR(dictionary_corrupted); /* only accept specified dictionaries */ - return 0; /* pure content mode */ - } - { U32 const magic = MEM_readLE32(ddict->dictContent); - if (magic != ZSTD_MAGIC_DICTIONARY) { - if (dictContentType == ZSTD_dct_fullDict) - return ERROR(dictionary_corrupted); /* only accept specified dictionaries */ - return 0; /* pure content mode */ - } - } - ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + ZSTD_FRAMEIDSIZE); - - /* load entropy tables */ - RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy( - &ddict->entropy, ddict->dictContent, ddict->dictSize)), - dictionary_corrupted, ""); - ddict->entropyPresent = 1; - return 0; -} - - -static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType) -{ - if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dict) || (!dictSize)) { - ddict->dictBuffer = NULL; - ddict->dictContent = dict; - if (!dict) dictSize = 0; - } else { - void* const internalBuffer = ZSTD_customMalloc(dictSize, ddict->cMem); - ddict->dictBuffer = internalBuffer; - ddict->dictContent = internalBuffer; - if (!internalBuffer) return ERROR(memory_allocation); - ZSTD_memcpy(internalBuffer, dict, dictSize); - } - ddict->dictSize = dictSize; - ddict->entropy.hufTable[0] = (HUF_DTable)((ZSTD_HUFFDTABLE_CAPACITY_LOG)*0x1000001); /* cover both little and big endian */ - - /* parse dictionary content */ - FORWARD_IF_ERROR( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) , ""); - - return 0; -} - -ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType, - ZSTD_customMem customMem) -{ - if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; - - { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); - if (ddict == NULL) return NULL; - ddict->cMem = customMem; - { size_t const initResult = ZSTD_initDDict_internal(ddict, - dict, dictSize, - dictLoadMethod, dictContentType); - if (ZSTD_isError(initResult)) { - ZSTD_freeDDict(ddict); - return NULL; - } } - return ddict; - } -} - -/*! ZSTD_createDDict() : -* Create a digested dictionary, to start decompression without startup delay. -* `dict` content is copied inside DDict. -* Consequently, `dict` can be released after `ZSTD_DDict` creation */ -ZSTD_DDict* ZSTD_createDDict(const void* dict, size_t dictSize) -{ - ZSTD_customMem const allocator = { NULL, NULL, NULL }; - return ZSTD_createDDict_advanced(dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto, allocator); -} - -/*! ZSTD_createDDict_byReference() : - * Create a digested dictionary, to start decompression without startup delay. - * Dictionary content is simply referenced, it will be accessed during decompression. - * Warning : dictBuffer must outlive DDict (DDict must be freed before dictBuffer) */ -ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t dictSize) -{ - ZSTD_customMem const allocator = { NULL, NULL, NULL }; - return ZSTD_createDDict_advanced(dictBuffer, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto, allocator); -} - - -const ZSTD_DDict* ZSTD_initStaticDDict( - void* sBuffer, size_t sBufferSize, - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType) -{ - size_t const neededSpace = sizeof(ZSTD_DDict) - + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize); - ZSTD_DDict* const ddict = (ZSTD_DDict*)sBuffer; - assert(sBuffer != NULL); - assert(dict != NULL); - if ((size_t)sBuffer & 7) return NULL; /* 8-aligned */ - if (sBufferSize < neededSpace) return NULL; - if (dictLoadMethod == ZSTD_dlm_byCopy) { - ZSTD_memcpy(ddict+1, dict, dictSize); /* local copy */ - dict = ddict+1; - } - if (ZSTD_isError( ZSTD_initDDict_internal(ddict, - dict, dictSize, - ZSTD_dlm_byRef, dictContentType) )) - return NULL; - return ddict; -} - - -size_t ZSTD_freeDDict(ZSTD_DDict* ddict) -{ - if (ddict==NULL) return 0; /* support free on NULL */ - { ZSTD_customMem const cMem = ddict->cMem; - ZSTD_customFree(ddict->dictBuffer, cMem); - ZSTD_customFree(ddict, cMem); - return 0; - } -} - -/*! ZSTD_estimateDDictSize() : - * Estimate amount of memory that will be needed to create a dictionary for decompression. - * Note : dictionary created by reference using ZSTD_dlm_byRef are smaller */ -size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod) -{ - return sizeof(ZSTD_DDict) + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize); -} - -size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict) -{ - if (ddict==NULL) return 0; /* support sizeof on NULL */ - return sizeof(*ddict) + (ddict->dictBuffer ? ddict->dictSize : 0) ; -} - -/*! ZSTD_getDictID_fromDDict() : - * Provides the dictID of the dictionary loaded into `ddict`. - * If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. - * Non-conformant dictionaries can still be loaded, but as content-only dictionaries. */ -unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict) -{ - if (ddict==NULL) return 0; - return ddict->dictID; -} diff --git a/third_party/zstd/lib/decompress/zstd_ddict.h b/third_party/zstd/lib/decompress/zstd_ddict.h deleted file mode 100644 index c4ca887..0000000 --- a/third_party/zstd/lib/decompress/zstd_ddict.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#ifndef ZSTD_DDICT_H -#define ZSTD_DDICT_H - -/*-******************************************************* - * Dependencies - *********************************************************/ -#include "../common/zstd_deps.h" /* size_t */ -#include "../zstd.h" /* ZSTD_DDict, and several public functions */ - - -/*-******************************************************* - * Interface - *********************************************************/ - -/* note: several prototypes are already published in `zstd.h` : - * ZSTD_createDDict() - * ZSTD_createDDict_byReference() - * ZSTD_createDDict_advanced() - * ZSTD_freeDDict() - * ZSTD_initStaticDDict() - * ZSTD_sizeof_DDict() - * ZSTD_estimateDDictSize() - * ZSTD_getDictID_fromDict() - */ - -const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict); -size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict); - -void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict); - - - -#endif /* ZSTD_DDICT_H */ diff --git a/third_party/zstd/lib/decompress/zstd_decompress.c b/third_party/zstd/lib/decompress/zstd_decompress.c deleted file mode 100644 index 9eb9832..0000000 --- a/third_party/zstd/lib/decompress/zstd_decompress.c +++ /dev/null @@ -1,2410 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/* *************************************************************** -* Tuning parameters -*****************************************************************/ -/*! - * HEAPMODE : - * Select how default decompression function ZSTD_decompress() allocates its context, - * on stack (0), or into heap (1, default; requires malloc()). - * Note that functions with explicit context such as ZSTD_decompressDCtx() are unaffected. - */ -#ifndef ZSTD_HEAPMODE -# define ZSTD_HEAPMODE 1 -#endif - -/*! -* LEGACY_SUPPORT : -* if set to 1+, ZSTD_decompress() can decode older formats (v0.1+) -*/ -#ifndef ZSTD_LEGACY_SUPPORT -# define ZSTD_LEGACY_SUPPORT 0 -#endif - -/*! - * MAXWINDOWSIZE_DEFAULT : - * maximum window size accepted by DStream __by default__. - * Frames requiring more memory will be rejected. - * It's possible to set a different limit using ZSTD_DCtx_setMaxWindowSize(). - */ -#ifndef ZSTD_MAXWINDOWSIZE_DEFAULT -# define ZSTD_MAXWINDOWSIZE_DEFAULT (((U32)1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) + 1) -#endif - -/*! - * NO_FORWARD_PROGRESS_MAX : - * maximum allowed nb of calls to ZSTD_decompressStream() - * without any forward progress - * (defined as: no byte read from input, and no byte flushed to output) - * before triggering an error. - */ -#ifndef ZSTD_NO_FORWARD_PROGRESS_MAX -# define ZSTD_NO_FORWARD_PROGRESS_MAX 16 -#endif - - -/*-******************************************************* -* Dependencies -*********************************************************/ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ -#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ -#include "../common/error_private.h" -#include "../common/zstd_internal.h" /* blockProperties_t */ -#include "../common/mem.h" /* low level memory routines */ -#include "../common/bits.h" /* ZSTD_highbit32 */ -#define FSE_STATIC_LINKING_ONLY -#include "../common/fse.h" -#include "../common/huf.h" -#include "../common/xxhash.h" /* XXH64_reset, XXH64_update, XXH64_digest, XXH64 */ -#include "zstd_decompress_internal.h" /* ZSTD_DCtx */ -#include "zstd_ddict.h" /* ZSTD_DDictDictContent */ -#include "zstd_decompress_block.h" /* ZSTD_decompressBlock_internal */ - -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -# include "../legacy/zstd_legacy.h" -#endif - - - -/************************************* - * Multiple DDicts Hashset internals * - *************************************/ - -#define DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT 4 -#define DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT 3 /* These two constants represent SIZE_MULT/COUNT_MULT load factor without using a float. - * Currently, that means a 0.75 load factor. - * So, if count * COUNT_MULT / size * SIZE_MULT != 0, then we've exceeded - * the load factor of the ddict hash set. - */ - -#define DDICT_HASHSET_TABLE_BASE_SIZE 64 -#define DDICT_HASHSET_RESIZE_FACTOR 2 - -/* Hash function to determine starting position of dict insertion within the table - * Returns an index between [0, hashSet->ddictPtrTableSize] - */ -static size_t ZSTD_DDictHashSet_getIndex(const ZSTD_DDictHashSet* hashSet, U32 dictID) { - const U64 hash = XXH64(&dictID, sizeof(U32), 0); - /* DDict ptr table size is a multiple of 2, use size - 1 as mask to get index within [0, hashSet->ddictPtrTableSize) */ - return hash & (hashSet->ddictPtrTableSize - 1); -} - -/* Adds DDict to a hashset without resizing it. - * If inserting a DDict with a dictID that already exists in the set, replaces the one in the set. - * Returns 0 if successful, or a zstd error code if something went wrong. - */ -static size_t ZSTD_DDictHashSet_emplaceDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict) { - const U32 dictID = ZSTD_getDictID_fromDDict(ddict); - size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); - const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; - RETURN_ERROR_IF(hashSet->ddictPtrCount == hashSet->ddictPtrTableSize, GENERIC, "Hash set is full!"); - DEBUGLOG(4, "Hashed index: for dictID: %u is %zu", dictID, idx); - while (hashSet->ddictPtrTable[idx] != NULL) { - /* Replace existing ddict if inserting ddict with same dictID */ - if (ZSTD_getDictID_fromDDict(hashSet->ddictPtrTable[idx]) == dictID) { - DEBUGLOG(4, "DictID already exists, replacing rather than adding"); - hashSet->ddictPtrTable[idx] = ddict; - return 0; - } - idx &= idxRangeMask; - idx++; - } - DEBUGLOG(4, "Final idx after probing for dictID %u is: %zu", dictID, idx); - hashSet->ddictPtrTable[idx] = ddict; - hashSet->ddictPtrCount++; - return 0; -} - -/* Expands hash table by factor of DDICT_HASHSET_RESIZE_FACTOR and - * rehashes all values, allocates new table, frees old table. - * Returns 0 on success, otherwise a zstd error code. - */ -static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { - size_t newTableSize = hashSet->ddictPtrTableSize * DDICT_HASHSET_RESIZE_FACTOR; - const ZSTD_DDict** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); - const ZSTD_DDict** oldTable = hashSet->ddictPtrTable; - size_t oldTableSize = hashSet->ddictPtrTableSize; - size_t i; - - DEBUGLOG(4, "Expanding DDict hash table! Old size: %zu new size: %zu", oldTableSize, newTableSize); - RETURN_ERROR_IF(!newTable, memory_allocation, "Expanded hashset allocation failed!"); - hashSet->ddictPtrTable = newTable; - hashSet->ddictPtrTableSize = newTableSize; - hashSet->ddictPtrCount = 0; - for (i = 0; i < oldTableSize; ++i) { - if (oldTable[i] != NULL) { - FORWARD_IF_ERROR(ZSTD_DDictHashSet_emplaceDDict(hashSet, oldTable[i]), ""); - } - } - ZSTD_customFree((void*)oldTable, customMem); - DEBUGLOG(4, "Finished re-hash"); - return 0; -} - -/* Fetches a DDict with the given dictID - * Returns the ZSTD_DDict* with the requested dictID. If it doesn't exist, then returns NULL. - */ -static const ZSTD_DDict* ZSTD_DDictHashSet_getDDict(ZSTD_DDictHashSet* hashSet, U32 dictID) { - size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); - const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; - DEBUGLOG(4, "Hashed index: for dictID: %u is %zu", dictID, idx); - for (;;) { - size_t currDictID = ZSTD_getDictID_fromDDict(hashSet->ddictPtrTable[idx]); - if (currDictID == dictID || currDictID == 0) { - /* currDictID == 0 implies a NULL ddict entry */ - break; - } else { - idx &= idxRangeMask; /* Goes to start of table when we reach the end */ - idx++; - } - } - DEBUGLOG(4, "Final idx after probing for dictID %u is: %zu", dictID, idx); - return hashSet->ddictPtrTable[idx]; -} - -/* Allocates space for and returns a ddict hash set - * The hash set's ZSTD_DDict* table has all values automatically set to NULL to begin with. - * Returns NULL if allocation failed. - */ -static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { - ZSTD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); - DEBUGLOG(4, "Allocating new hash set"); - if (!ret) - return NULL; - ret->ddictPtrTable = (const ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); - if (!ret->ddictPtrTable) { - ZSTD_customFree(ret, customMem); - return NULL; - } - ret->ddictPtrTableSize = DDICT_HASHSET_TABLE_BASE_SIZE; - ret->ddictPtrCount = 0; - return ret; -} - -/* Frees the table of ZSTD_DDict* within a hashset, then frees the hashset itself. - * Note: The ZSTD_DDict* within the table are NOT freed. - */ -static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { - DEBUGLOG(4, "Freeing ddict hash set"); - if (hashSet && hashSet->ddictPtrTable) { - ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); - } - if (hashSet) { - ZSTD_customFree(hashSet, customMem); - } -} - -/* Public function: Adds a DDict into the ZSTD_DDictHashSet, possibly triggering a resize of the hash set. - * Returns 0 on success, or a ZSTD error. - */ -static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict, ZSTD_customMem customMem) { - DEBUGLOG(4, "Adding dict ID: %u to hashset with - Count: %zu Tablesize: %zu", ZSTD_getDictID_fromDDict(ddict), hashSet->ddictPtrCount, hashSet->ddictPtrTableSize); - if (hashSet->ddictPtrCount * DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT / hashSet->ddictPtrTableSize * DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT != 0) { - FORWARD_IF_ERROR(ZSTD_DDictHashSet_expand(hashSet, customMem), ""); - } - FORWARD_IF_ERROR(ZSTD_DDictHashSet_emplaceDDict(hashSet, ddict), ""); - return 0; -} - -/*-************************************************************* -* Context management -***************************************************************/ -size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx) -{ - if (dctx==NULL) return 0; /* support sizeof NULL */ - return sizeof(*dctx) - + ZSTD_sizeof_DDict(dctx->ddictLocal) - + dctx->inBuffSize + dctx->outBuffSize; -} - -size_t ZSTD_estimateDCtxSize(void) { return sizeof(ZSTD_DCtx); } - - -static size_t ZSTD_startingInputLength(ZSTD_format_e format) -{ - size_t const startingInputLength = ZSTD_FRAMEHEADERSIZE_PREFIX(format); - /* only supports formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless */ - assert( (format == ZSTD_f_zstd1) || (format == ZSTD_f_zstd1_magicless) ); - return startingInputLength; -} - -static void ZSTD_DCtx_resetParameters(ZSTD_DCtx* dctx) -{ - assert(dctx->streamStage == zdss_init); - dctx->format = ZSTD_f_zstd1; - dctx->maxWindowSize = ZSTD_MAXWINDOWSIZE_DEFAULT; - dctx->outBufferMode = ZSTD_bm_buffered; - dctx->forceIgnoreChecksum = ZSTD_d_validateChecksum; - dctx->refMultipleDDicts = ZSTD_rmd_refSingleDDict; - dctx->disableHufAsm = 0; - dctx->maxBlockSizeParam = 0; -} - -static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx) -{ - dctx->staticSize = 0; - dctx->ddict = NULL; - dctx->ddictLocal = NULL; - dctx->dictEnd = NULL; - dctx->ddictIsCold = 0; - dctx->dictUses = ZSTD_dont_use; - dctx->inBuff = NULL; - dctx->inBuffSize = 0; - dctx->outBuffSize = 0; - dctx->streamStage = zdss_init; -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) - dctx->legacyContext = NULL; - dctx->previousLegacyVersion = 0; -#endif - dctx->noForwardProgress = 0; - dctx->oversizedDuration = 0; - dctx->isFrameDecompression = 1; -#if DYNAMIC_BMI2 - dctx->bmi2 = ZSTD_cpuSupportsBmi2(); -#endif - dctx->ddictSet = NULL; - ZSTD_DCtx_resetParameters(dctx); -#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - dctx->dictContentEndForFuzzing = NULL; -#endif -} - -ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize) -{ - ZSTD_DCtx* const dctx = (ZSTD_DCtx*) workspace; - - if ((size_t)workspace & 7) return NULL; /* 8-aligned */ - if (workspaceSize < sizeof(ZSTD_DCtx)) return NULL; /* minimum size */ - - ZSTD_initDCtx_internal(dctx); - dctx->staticSize = workspaceSize; - dctx->inBuff = (char*)(dctx+1); - return dctx; -} - -static ZSTD_DCtx* ZSTD_createDCtx_internal(ZSTD_customMem customMem) { - if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; - - { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_customMalloc(sizeof(*dctx), customMem); - if (!dctx) return NULL; - dctx->customMem = customMem; - ZSTD_initDCtx_internal(dctx); - return dctx; - } -} - -ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) -{ - return ZSTD_createDCtx_internal(customMem); -} - -ZSTD_DCtx* ZSTD_createDCtx(void) -{ - DEBUGLOG(3, "ZSTD_createDCtx"); - return ZSTD_createDCtx_internal(ZSTD_defaultCMem); -} - -static void ZSTD_clearDict(ZSTD_DCtx* dctx) -{ - ZSTD_freeDDict(dctx->ddictLocal); - dctx->ddictLocal = NULL; - dctx->ddict = NULL; - dctx->dictUses = ZSTD_dont_use; -} - -size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx) -{ - if (dctx==NULL) return 0; /* support free on NULL */ - RETURN_ERROR_IF(dctx->staticSize, memory_allocation, "not compatible with static DCtx"); - { ZSTD_customMem const cMem = dctx->customMem; - ZSTD_clearDict(dctx); - ZSTD_customFree(dctx->inBuff, cMem); - dctx->inBuff = NULL; -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - if (dctx->legacyContext) - ZSTD_freeLegacyStreamContext(dctx->legacyContext, dctx->previousLegacyVersion); -#endif - if (dctx->ddictSet) { - ZSTD_freeDDictHashSet(dctx->ddictSet, cMem); - dctx->ddictSet = NULL; - } - ZSTD_customFree(dctx, cMem); - return 0; - } -} - -/* no longer useful */ -void ZSTD_copyDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx) -{ - size_t const toCopy = (size_t)((char*)(&dstDCtx->inBuff) - (char*)dstDCtx); - ZSTD_memcpy(dstDCtx, srcDCtx, toCopy); /* no need to copy workspace */ -} - -/* Given a dctx with a digested frame params, re-selects the correct ZSTD_DDict based on - * the requested dict ID from the frame. If there exists a reference to the correct ZSTD_DDict, then - * accordingly sets the ddict to be used to decompress the frame. - * - * If no DDict is found, then no action is taken, and the ZSTD_DCtx::ddict remains as-is. - * - * ZSTD_d_refMultipleDDicts must be enabled for this function to be called. - */ -static void ZSTD_DCtx_selectFrameDDict(ZSTD_DCtx* dctx) { - assert(dctx->refMultipleDDicts && dctx->ddictSet); - DEBUGLOG(4, "Adjusting DDict based on requested dict ID from frame"); - if (dctx->ddict) { - const ZSTD_DDict* frameDDict = ZSTD_DDictHashSet_getDDict(dctx->ddictSet, dctx->fParams.dictID); - if (frameDDict) { - DEBUGLOG(4, "DDict found!"); - ZSTD_clearDict(dctx); - dctx->dictID = dctx->fParams.dictID; - dctx->ddict = frameDDict; - dctx->dictUses = ZSTD_use_indefinitely; - } - } -} - - -/*-************************************************************* - * Frame header decoding - ***************************************************************/ - -/*! ZSTD_isFrame() : - * Tells if the content of `buffer` starts with a valid Frame Identifier. - * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. - * Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. - * Note 3 : Skippable Frame Identifiers are considered valid. */ -unsigned ZSTD_isFrame(const void* buffer, size_t size) -{ - if (size < ZSTD_FRAMEIDSIZE) return 0; - { U32 const magic = MEM_readLE32(buffer); - if (magic == ZSTD_MAGICNUMBER) return 1; - if ((magic & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) return 1; - } -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - if (ZSTD_isLegacy(buffer, size)) return 1; -#endif - return 0; -} - -/*! ZSTD_isSkippableFrame() : - * Tells if the content of `buffer` starts with a valid Frame Identifier for a skippable frame. - * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. - */ -unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size) -{ - if (size < ZSTD_FRAMEIDSIZE) return 0; - { U32 const magic = MEM_readLE32(buffer); - if ((magic & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) return 1; - } - return 0; -} - -/** ZSTD_frameHeaderSize_internal() : - * srcSize must be large enough to reach header size fields. - * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless. - * @return : size of the Frame Header - * or an error code, which can be tested with ZSTD_isError() */ -static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) -{ - size_t const minInputSize = ZSTD_startingInputLength(format); - RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); - - { BYTE const fhd = ((const BYTE*)src)[minInputSize-1]; - U32 const dictID= fhd & 3; - U32 const singleSegment = (fhd >> 5) & 1; - U32 const fcsId = fhd >> 6; - return minInputSize + !singleSegment - + ZSTD_did_fieldSize[dictID] + ZSTD_fcs_fieldSize[fcsId] - + (singleSegment && !fcsId); - } -} - -/** ZSTD_frameHeaderSize() : - * srcSize must be >= ZSTD_frameHeaderSize_prefix. - * @return : size of the Frame Header, - * or an error code (if srcSize is too small) */ -size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) -{ - return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1); -} - - -/** ZSTD_getFrameHeader_advanced() : - * decode Frame Header, or require larger `srcSize`. - * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless - * @return : 0, `zfhPtr` is correctly filled, - * >0, `srcSize` is too small, value is wanted `srcSize` amount, -** or an error code, which can be tested using ZSTD_isError() */ -size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format) -{ - const BYTE* ip = (const BYTE*)src; - size_t const minInputSize = ZSTD_startingInputLength(format); - - DEBUGLOG(5, "ZSTD_getFrameHeader_advanced: minInputSize = %zu, srcSize = %zu", minInputSize, srcSize); - - if (srcSize > 0) { - /* note : technically could be considered an assert(), since it's an invalid entry */ - RETURN_ERROR_IF(src==NULL, GENERIC, "invalid parameter : src==NULL, but srcSize>0"); - } - if (srcSize < minInputSize) { - if (srcSize > 0 && format != ZSTD_f_zstd1_magicless) { - /* when receiving less than @minInputSize bytes, - * control these bytes at least correspond to a supported magic number - * in order to error out early if they don't. - **/ - size_t const toCopy = MIN(4, srcSize); - unsigned char hbuf[4]; MEM_writeLE32(hbuf, ZSTD_MAGICNUMBER); - assert(src != NULL); - ZSTD_memcpy(hbuf, src, toCopy); - if ( MEM_readLE32(hbuf) != ZSTD_MAGICNUMBER ) { - /* not a zstd frame : let's check if it's a skippable frame */ - MEM_writeLE32(hbuf, ZSTD_MAGIC_SKIPPABLE_START); - ZSTD_memcpy(hbuf, src, toCopy); - if ((MEM_readLE32(hbuf) & ZSTD_MAGIC_SKIPPABLE_MASK) != ZSTD_MAGIC_SKIPPABLE_START) { - RETURN_ERROR(prefix_unknown, - "first bytes don't correspond to any supported magic number"); - } } } - return minInputSize; - } - - ZSTD_memset(zfhPtr, 0, sizeof(*zfhPtr)); /* not strictly necessary, but static analyzers may not understand that zfhPtr will be read only if return value is zero, since they are 2 different signals */ - if ( (format != ZSTD_f_zstd1_magicless) - && (MEM_readLE32(src) != ZSTD_MAGICNUMBER) ) { - if ((MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { - /* skippable frame */ - if (srcSize < ZSTD_SKIPPABLEHEADERSIZE) - return ZSTD_SKIPPABLEHEADERSIZE; /* magic number + frame length */ - ZSTD_memset(zfhPtr, 0, sizeof(*zfhPtr)); - zfhPtr->frameType = ZSTD_skippableFrame; - zfhPtr->dictID = MEM_readLE32(src) - ZSTD_MAGIC_SKIPPABLE_START; - zfhPtr->headerSize = ZSTD_SKIPPABLEHEADERSIZE; - zfhPtr->frameContentSize = MEM_readLE32((const char *)src + ZSTD_FRAMEIDSIZE); - return 0; - } - RETURN_ERROR(prefix_unknown, ""); - } - - /* ensure there is enough `srcSize` to fully read/decode frame header */ - { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); - if (srcSize < fhsize) return fhsize; - zfhPtr->headerSize = (U32)fhsize; - } - - { BYTE const fhdByte = ip[minInputSize-1]; - size_t pos = minInputSize; - U32 const dictIDSizeCode = fhdByte&3; - U32 const checksumFlag = (fhdByte>>2)&1; - U32 const singleSegment = (fhdByte>>5)&1; - U32 const fcsID = fhdByte>>6; - U64 windowSize = 0; - U32 dictID = 0; - U64 frameContentSize = ZSTD_CONTENTSIZE_UNKNOWN; - RETURN_ERROR_IF((fhdByte & 0x08) != 0, frameParameter_unsupported, - "reserved bits, must be zero"); - - if (!singleSegment) { - BYTE const wlByte = ip[pos++]; - U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN; - RETURN_ERROR_IF(windowLog > ZSTD_WINDOWLOG_MAX, frameParameter_windowTooLarge, ""); - windowSize = (1ULL << windowLog); - windowSize += (windowSize >> 3) * (wlByte&7); - } - switch(dictIDSizeCode) - { - default: - assert(0); /* impossible */ - ZSTD_FALLTHROUGH; - case 0 : break; - case 1 : dictID = ip[pos]; pos++; break; - case 2 : dictID = MEM_readLE16(ip+pos); pos+=2; break; - case 3 : dictID = MEM_readLE32(ip+pos); pos+=4; break; - } - switch(fcsID) - { - default: - assert(0); /* impossible */ - ZSTD_FALLTHROUGH; - case 0 : if (singleSegment) frameContentSize = ip[pos]; break; - case 1 : frameContentSize = MEM_readLE16(ip+pos)+256; break; - case 2 : frameContentSize = MEM_readLE32(ip+pos); break; - case 3 : frameContentSize = MEM_readLE64(ip+pos); break; - } - if (singleSegment) windowSize = frameContentSize; - - zfhPtr->frameType = ZSTD_frame; - zfhPtr->frameContentSize = frameContentSize; - zfhPtr->windowSize = windowSize; - zfhPtr->blockSizeMax = (unsigned) MIN(windowSize, ZSTD_BLOCKSIZE_MAX); - zfhPtr->dictID = dictID; - zfhPtr->checksumFlag = checksumFlag; - } - return 0; -} - -/** ZSTD_getFrameHeader() : - * decode Frame Header, or require larger `srcSize`. - * note : this function does not consume input, it only reads it. - * @return : 0, `zfhPtr` is correctly filled, - * >0, `srcSize` is too small, value is wanted `srcSize` amount, - * or an error code, which can be tested using ZSTD_isError() */ -size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize) -{ - return ZSTD_getFrameHeader_advanced(zfhPtr, src, srcSize, ZSTD_f_zstd1); -} - -/** ZSTD_getFrameContentSize() : - * compatible with legacy mode - * @return : decompressed size of the single frame pointed to be `src` if known, otherwise - * - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined - * - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) */ -unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize) -{ -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - if (ZSTD_isLegacy(src, srcSize)) { - unsigned long long const ret = ZSTD_getDecompressedSize_legacy(src, srcSize); - return ret == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : ret; - } -#endif - { ZSTD_FrameHeader zfh; - if (ZSTD_getFrameHeader(&zfh, src, srcSize) != 0) - return ZSTD_CONTENTSIZE_ERROR; - if (zfh.frameType == ZSTD_skippableFrame) { - return 0; - } else { - return zfh.frameContentSize; - } } -} - -static size_t readSkippableFrameSize(void const* src, size_t srcSize) -{ - size_t const skippableHeaderSize = ZSTD_SKIPPABLEHEADERSIZE; - U32 sizeU32; - - RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); - - sizeU32 = MEM_readLE32((BYTE const*)src + ZSTD_FRAMEIDSIZE); - RETURN_ERROR_IF((U32)(sizeU32 + ZSTD_SKIPPABLEHEADERSIZE) < sizeU32, - frameParameter_unsupported, ""); - { size_t const skippableSize = skippableHeaderSize + sizeU32; - RETURN_ERROR_IF(skippableSize > srcSize, srcSize_wrong, ""); - return skippableSize; - } -} - -/*! ZSTD_readSkippableFrame() : - * Retrieves content of a skippable frame, and writes it to dst buffer. - * - * The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, - * i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested - * in the magicVariant. - * - * Returns an error if destination buffer is not large enough, or if this is not a valid skippable frame. - * - * @return : number of bytes written or a ZSTD error. - */ -size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, - unsigned* magicVariant, /* optional, can be NULL */ - const void* src, size_t srcSize) -{ - RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); - - { U32 const magicNumber = MEM_readLE32(src); - size_t skippableFrameSize = readSkippableFrameSize(src, srcSize); - size_t skippableContentSize = skippableFrameSize - ZSTD_SKIPPABLEHEADERSIZE; - - /* check input validity */ - RETURN_ERROR_IF(!ZSTD_isSkippableFrame(src, srcSize), frameParameter_unsupported, ""); - RETURN_ERROR_IF(skippableFrameSize < ZSTD_SKIPPABLEHEADERSIZE || skippableFrameSize > srcSize, srcSize_wrong, ""); - RETURN_ERROR_IF(skippableContentSize > dstCapacity, dstSize_tooSmall, ""); - - /* deliver payload */ - if (skippableContentSize > 0 && dst != NULL) - ZSTD_memcpy(dst, (const BYTE *)src + ZSTD_SKIPPABLEHEADERSIZE, skippableContentSize); - if (magicVariant != NULL) - *magicVariant = magicNumber - ZSTD_MAGIC_SKIPPABLE_START; - return skippableContentSize; - } -} - -/** ZSTD_findDecompressedSize() : - * `srcSize` must be the exact length of some number of ZSTD compressed and/or - * skippable frames - * note: compatible with legacy mode - * @return : decompressed size of the frames contained */ -unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize) -{ - unsigned long long totalDstSize = 0; - - while (srcSize >= ZSTD_startingInputLength(ZSTD_f_zstd1)) { - U32 const magicNumber = MEM_readLE32(src); - - if ((magicNumber & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { - size_t const skippableSize = readSkippableFrameSize(src, srcSize); - if (ZSTD_isError(skippableSize)) return ZSTD_CONTENTSIZE_ERROR; - assert(skippableSize <= srcSize); - - src = (const BYTE *)src + skippableSize; - srcSize -= skippableSize; - continue; - } - - { unsigned long long const fcs = ZSTD_getFrameContentSize(src, srcSize); - if (fcs >= ZSTD_CONTENTSIZE_ERROR) return fcs; - - if (totalDstSize + fcs < totalDstSize) - return ZSTD_CONTENTSIZE_ERROR; /* check for overflow */ - totalDstSize += fcs; - } - /* skip to next frame */ - { size_t const frameSrcSize = ZSTD_findFrameCompressedSize(src, srcSize); - if (ZSTD_isError(frameSrcSize)) return ZSTD_CONTENTSIZE_ERROR; - assert(frameSrcSize <= srcSize); - - src = (const BYTE *)src + frameSrcSize; - srcSize -= frameSrcSize; - } - } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */ - - if (srcSize) return ZSTD_CONTENTSIZE_ERROR; - - return totalDstSize; -} - -/** ZSTD_getDecompressedSize() : - * compatible with legacy mode - * @return : decompressed size if known, 0 otherwise - note : 0 can mean any of the following : - - frame content is empty - - decompressed size field is not present in frame header - - frame header unknown / not supported - - frame header not complete (`srcSize` too small) */ -unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize) -{ - unsigned long long const ret = ZSTD_getFrameContentSize(src, srcSize); - ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_ERROR < ZSTD_CONTENTSIZE_UNKNOWN); - return (ret >= ZSTD_CONTENTSIZE_ERROR) ? 0 : ret; -} - - -/** ZSTD_decodeFrameHeader() : - * `headerSize` must be the size provided by ZSTD_frameHeaderSize(). - * If multiple DDict references are enabled, also will choose the correct DDict to use. - * @return : 0 if success, or an error code, which can be tested using ZSTD_isError() */ -static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t headerSize) -{ - size_t const result = ZSTD_getFrameHeader_advanced(&(dctx->fParams), src, headerSize, dctx->format); - if (ZSTD_isError(result)) return result; /* invalid header */ - RETURN_ERROR_IF(result>0, srcSize_wrong, "headerSize too small"); - - /* Reference DDict requested by frame if dctx references multiple ddicts */ - if (dctx->refMultipleDDicts == ZSTD_rmd_refMultipleDDicts && dctx->ddictSet) { - ZSTD_DCtx_selectFrameDDict(dctx); - } - -#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - /* Skip the dictID check in fuzzing mode, because it makes the search - * harder. - */ - RETURN_ERROR_IF(dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID), - dictionary_wrong, ""); -#endif - dctx->validateChecksum = (dctx->fParams.checksumFlag && !dctx->forceIgnoreChecksum) ? 1 : 0; - if (dctx->validateChecksum) XXH64_reset(&dctx->xxhState, 0); - dctx->processedCSize += headerSize; - return 0; -} - -static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret) -{ - ZSTD_frameSizeInfo frameSizeInfo; - frameSizeInfo.compressedSize = ret; - frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; - return frameSizeInfo; -} - -static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t srcSize, ZSTD_format_e format) -{ - ZSTD_frameSizeInfo frameSizeInfo; - ZSTD_memset(&frameSizeInfo, 0, sizeof(ZSTD_frameSizeInfo)); - -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - if (format == ZSTD_f_zstd1 && ZSTD_isLegacy(src, srcSize)) - return ZSTD_findFrameSizeInfoLegacy(src, srcSize); -#endif - - if (format == ZSTD_f_zstd1 && (srcSize >= ZSTD_SKIPPABLEHEADERSIZE) - && (MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { - frameSizeInfo.compressedSize = readSkippableFrameSize(src, srcSize); - assert(ZSTD_isError(frameSizeInfo.compressedSize) || - frameSizeInfo.compressedSize <= srcSize); - return frameSizeInfo; - } else { - const BYTE* ip = (const BYTE*)src; - const BYTE* const ipstart = ip; - size_t remainingSize = srcSize; - size_t nbBlocks = 0; - ZSTD_FrameHeader zfh; - - /* Extract Frame Header */ - { size_t const ret = ZSTD_getFrameHeader_advanced(&zfh, src, srcSize, format); - if (ZSTD_isError(ret)) - return ZSTD_errorFrameSizeInfo(ret); - if (ret > 0) - return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); - } - - ip += zfh.headerSize; - remainingSize -= zfh.headerSize; - - /* Iterate over each block */ - while (1) { - blockProperties_t blockProperties; - size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSize, &blockProperties); - if (ZSTD_isError(cBlockSize)) - return ZSTD_errorFrameSizeInfo(cBlockSize); - - if (ZSTD_blockHeaderSize + cBlockSize > remainingSize) - return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); - - ip += ZSTD_blockHeaderSize + cBlockSize; - remainingSize -= ZSTD_blockHeaderSize + cBlockSize; - nbBlocks++; - - if (blockProperties.lastBlock) break; - } - - /* Final frame content checksum */ - if (zfh.checksumFlag) { - if (remainingSize < 4) - return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); - ip += 4; - } - - frameSizeInfo.nbBlocks = nbBlocks; - frameSizeInfo.compressedSize = (size_t)(ip - ipstart); - frameSizeInfo.decompressedBound = (zfh.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) - ? zfh.frameContentSize - : (unsigned long long)nbBlocks * zfh.blockSizeMax; - return frameSizeInfo; - } -} - -static size_t ZSTD_findFrameCompressedSize_advanced(const void *src, size_t srcSize, ZSTD_format_e format) { - ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, format); - return frameSizeInfo.compressedSize; -} - -/** ZSTD_findFrameCompressedSize() : - * See docs in zstd.h - * Note: compatible with legacy mode */ -size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize) -{ - return ZSTD_findFrameCompressedSize_advanced(src, srcSize, ZSTD_f_zstd1); -} - -/** ZSTD_decompressBound() : - * compatible with legacy mode - * `src` must point to the start of a ZSTD frame or a skippable frame - * `srcSize` must be at least as large as the frame contained - * @return : the maximum decompressed size of the compressed source - */ -unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize) -{ - unsigned long long bound = 0; - /* Iterate over each frame */ - while (srcSize > 0) { - ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, ZSTD_f_zstd1); - size_t const compressedSize = frameSizeInfo.compressedSize; - unsigned long long const decompressedBound = frameSizeInfo.decompressedBound; - if (ZSTD_isError(compressedSize) || decompressedBound == ZSTD_CONTENTSIZE_ERROR) - return ZSTD_CONTENTSIZE_ERROR; - assert(srcSize >= compressedSize); - src = (const BYTE*)src + compressedSize; - srcSize -= compressedSize; - bound += decompressedBound; - } - return bound; -} - -size_t ZSTD_decompressionMargin(void const* src, size_t srcSize) -{ - size_t margin = 0; - unsigned maxBlockSize = 0; - - /* Iterate over each frame */ - while (srcSize > 0) { - ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, ZSTD_f_zstd1); - size_t const compressedSize = frameSizeInfo.compressedSize; - unsigned long long const decompressedBound = frameSizeInfo.decompressedBound; - ZSTD_FrameHeader zfh; - - FORWARD_IF_ERROR(ZSTD_getFrameHeader(&zfh, src, srcSize), ""); - if (ZSTD_isError(compressedSize) || decompressedBound == ZSTD_CONTENTSIZE_ERROR) - return ERROR(corruption_detected); - - if (zfh.frameType == ZSTD_frame) { - /* Add the frame header to our margin */ - margin += zfh.headerSize; - /* Add the checksum to our margin */ - margin += zfh.checksumFlag ? 4 : 0; - /* Add 3 bytes per block */ - margin += 3 * frameSizeInfo.nbBlocks; - - /* Compute the max block size */ - maxBlockSize = MAX(maxBlockSize, zfh.blockSizeMax); - } else { - assert(zfh.frameType == ZSTD_skippableFrame); - /* Add the entire skippable frame size to our margin. */ - margin += compressedSize; - } - - assert(srcSize >= compressedSize); - src = (const BYTE*)src + compressedSize; - srcSize -= compressedSize; - } - - /* Add the max block size back to the margin. */ - margin += maxBlockSize; - - return margin; -} - -/*-************************************************************* - * Frame decoding - ***************************************************************/ - -/** ZSTD_insertBlock() : - * insert `src` block into `dctx` history. Useful to track uncompressed blocks. */ -size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize) -{ - DEBUGLOG(5, "ZSTD_insertBlock: %u bytes", (unsigned)blockSize); - ZSTD_checkContinuity(dctx, blockStart, blockSize); - dctx->previousDstEnd = (const char*)blockStart + blockSize; - return blockSize; -} - - -static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_copyRawBlock"); - RETURN_ERROR_IF(srcSize > dstCapacity, dstSize_tooSmall, ""); - if (dst == NULL) { - if (srcSize == 0) return 0; - RETURN_ERROR(dstBuffer_null, ""); - } - ZSTD_memmove(dst, src, srcSize); - return srcSize; -} - -static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, - BYTE b, - size_t regenSize) -{ - RETURN_ERROR_IF(regenSize > dstCapacity, dstSize_tooSmall, ""); - if (dst == NULL) { - if (regenSize == 0) return 0; - RETURN_ERROR(dstBuffer_null, ""); - } - ZSTD_memset(dst, b, regenSize); - return regenSize; -} - -static void ZSTD_DCtx_trace_end(ZSTD_DCtx const* dctx, U64 uncompressedSize, U64 compressedSize, int streaming) -{ -#if ZSTD_TRACE - if (dctx->traceCtx && ZSTD_trace_decompress_end != NULL) { - ZSTD_Trace trace; - ZSTD_memset(&trace, 0, sizeof(trace)); - trace.version = ZSTD_VERSION_NUMBER; - trace.streaming = streaming; - if (dctx->ddict) { - trace.dictionaryID = ZSTD_getDictID_fromDDict(dctx->ddict); - trace.dictionarySize = ZSTD_DDict_dictSize(dctx->ddict); - trace.dictionaryIsCold = dctx->ddictIsCold; - } - trace.uncompressedSize = (size_t)uncompressedSize; - trace.compressedSize = (size_t)compressedSize; - trace.dctx = dctx; - ZSTD_trace_decompress_end(dctx->traceCtx, &trace); - } -#else - (void)dctx; - (void)uncompressedSize; - (void)compressedSize; - (void)streaming; -#endif -} - - -/*! ZSTD_decompressFrame() : - * @dctx must be properly initialized - * will update *srcPtr and *srcSizePtr, - * to make *srcPtr progress by one frame. */ -static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void** srcPtr, size_t *srcSizePtr) -{ - const BYTE* const istart = (const BYTE*)(*srcPtr); - const BYTE* ip = istart; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = dstCapacity != 0 ? ostart + dstCapacity : ostart; - BYTE* op = ostart; - size_t remainingSrcSize = *srcSizePtr; - - DEBUGLOG(4, "ZSTD_decompressFrame (srcSize:%i)", (int)*srcSizePtr); - - /* check */ - RETURN_ERROR_IF( - remainingSrcSize < ZSTD_FRAMEHEADERSIZE_MIN(dctx->format)+ZSTD_blockHeaderSize, - srcSize_wrong, ""); - - /* Frame Header */ - { size_t const frameHeaderSize = ZSTD_frameHeaderSize_internal( - ip, ZSTD_FRAMEHEADERSIZE_PREFIX(dctx->format), dctx->format); - if (ZSTD_isError(frameHeaderSize)) return frameHeaderSize; - RETURN_ERROR_IF(remainingSrcSize < frameHeaderSize+ZSTD_blockHeaderSize, - srcSize_wrong, ""); - FORWARD_IF_ERROR( ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize) , ""); - ip += frameHeaderSize; remainingSrcSize -= frameHeaderSize; - } - - /* Shrink the blockSizeMax if enabled */ - if (dctx->maxBlockSizeParam != 0) - dctx->fParams.blockSizeMax = MIN(dctx->fParams.blockSizeMax, (unsigned)dctx->maxBlockSizeParam); - - /* Loop on each block */ - while (1) { - BYTE* oBlockEnd = oend; - size_t decodedSize; - blockProperties_t blockProperties; - size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSrcSize, &blockProperties); - if (ZSTD_isError(cBlockSize)) return cBlockSize; - - ip += ZSTD_blockHeaderSize; - remainingSrcSize -= ZSTD_blockHeaderSize; - RETURN_ERROR_IF(cBlockSize > remainingSrcSize, srcSize_wrong, ""); - - if (ip >= op && ip < oBlockEnd) { - /* We are decompressing in-place. Limit the output pointer so that we - * don't overwrite the block that we are currently reading. This will - * fail decompression if the input & output pointers aren't spaced - * far enough apart. - * - * This is important to set, even when the pointers are far enough - * apart, because ZSTD_decompressBlock_internal() can decide to store - * literals in the output buffer, after the block it is decompressing. - * Since we don't want anything to overwrite our input, we have to tell - * ZSTD_decompressBlock_internal to never write past ip. - * - * See ZSTD_allocateLiteralsBuffer() for reference. - */ - oBlockEnd = op + (ip - op); - } - - switch(blockProperties.blockType) - { - case bt_compressed: - assert(dctx->isFrameDecompression == 1); - decodedSize = ZSTD_decompressBlock_internal(dctx, op, (size_t)(oBlockEnd-op), ip, cBlockSize, not_streaming); - break; - case bt_raw : - /* Use oend instead of oBlockEnd because this function is safe to overlap. It uses memmove. */ - decodedSize = ZSTD_copyRawBlock(op, (size_t)(oend-op), ip, cBlockSize); - break; - case bt_rle : - decodedSize = ZSTD_setRleBlock(op, (size_t)(oBlockEnd-op), *ip, blockProperties.origSize); - break; - case bt_reserved : - default: - RETURN_ERROR(corruption_detected, "invalid block type"); - } - FORWARD_IF_ERROR(decodedSize, "Block decompression failure"); - DEBUGLOG(5, "Decompressed block of dSize = %u", (unsigned)decodedSize); - if (dctx->validateChecksum) { - XXH64_update(&dctx->xxhState, op, decodedSize); - } - if (decodedSize) /* support dst = NULL,0 */ { - op += decodedSize; - } - assert(ip != NULL); - ip += cBlockSize; - remainingSrcSize -= cBlockSize; - if (blockProperties.lastBlock) break; - } - - if (dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) { - RETURN_ERROR_IF((U64)(op-ostart) != dctx->fParams.frameContentSize, - corruption_detected, ""); - } - if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */ - RETURN_ERROR_IF(remainingSrcSize<4, checksum_wrong, ""); - if (!dctx->forceIgnoreChecksum) { - U32 const checkCalc = (U32)XXH64_digest(&dctx->xxhState); - U32 checkRead; - checkRead = MEM_readLE32(ip); - RETURN_ERROR_IF(checkRead != checkCalc, checksum_wrong, ""); - } - ip += 4; - remainingSrcSize -= 4; - } - ZSTD_DCtx_trace_end(dctx, (U64)(op-ostart), (U64)(ip-istart), /* streaming */ 0); - /* Allow caller to get size read */ - DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size %i, consuming %i bytes of input", (int)(op-ostart), (int)(ip - (const BYTE*)*srcPtr)); - *srcPtr = ip; - *srcSizePtr = remainingSrcSize; - return (size_t)(op-ostart); -} - -static -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict, size_t dictSize, - const ZSTD_DDict* ddict) -{ - void* const dststart = dst; - int moreThan1Frame = 0; - - DEBUGLOG(5, "ZSTD_decompressMultiFrame"); - assert(dict==NULL || ddict==NULL); /* either dict or ddict set, not both */ - - if (ddict) { - dict = ZSTD_DDict_dictContent(ddict); - dictSize = ZSTD_DDict_dictSize(ddict); - } - - while (srcSize >= ZSTD_startingInputLength(dctx->format)) { - -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - if (dctx->format == ZSTD_f_zstd1 && ZSTD_isLegacy(src, srcSize)) { - size_t decodedSize; - size_t const frameSize = ZSTD_findFrameCompressedSizeLegacy(src, srcSize); - if (ZSTD_isError(frameSize)) return frameSize; - RETURN_ERROR_IF(dctx->staticSize, memory_allocation, - "legacy support is not compatible with static dctx"); - - decodedSize = ZSTD_decompressLegacy(dst, dstCapacity, src, frameSize, dict, dictSize); - if (ZSTD_isError(decodedSize)) return decodedSize; - - { - unsigned long long const expectedSize = ZSTD_getFrameContentSize(src, srcSize); - RETURN_ERROR_IF(expectedSize == ZSTD_CONTENTSIZE_ERROR, corruption_detected, "Corrupted frame header!"); - if (expectedSize != ZSTD_CONTENTSIZE_UNKNOWN) { - RETURN_ERROR_IF(expectedSize != decodedSize, corruption_detected, - "Frame header size does not match decoded size!"); - } - } - - assert(decodedSize <= dstCapacity); - dst = (BYTE*)dst + decodedSize; - dstCapacity -= decodedSize; - - src = (const BYTE*)src + frameSize; - srcSize -= frameSize; - - continue; - } -#endif - - if (dctx->format == ZSTD_f_zstd1 && srcSize >= 4) { - U32 const magicNumber = MEM_readLE32(src); - DEBUGLOG(5, "reading magic number %08X", (unsigned)magicNumber); - if ((magicNumber & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { - /* skippable frame detected : skip it */ - size_t const skippableSize = readSkippableFrameSize(src, srcSize); - FORWARD_IF_ERROR(skippableSize, "invalid skippable frame"); - assert(skippableSize <= srcSize); - - src = (const BYTE *)src + skippableSize; - srcSize -= skippableSize; - continue; /* check next frame */ - } } - - if (ddict) { - /* we were called from ZSTD_decompress_usingDDict */ - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(dctx, ddict), ""); - } else { - /* this will initialize correctly with no dict if dict == NULL, so - * use this in all cases but ddict */ - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDict(dctx, dict, dictSize), ""); - } - ZSTD_checkContinuity(dctx, dst, dstCapacity); - - { const size_t res = ZSTD_decompressFrame(dctx, dst, dstCapacity, - &src, &srcSize); - RETURN_ERROR_IF( - (ZSTD_getErrorCode(res) == ZSTD_error_prefix_unknown) - && (moreThan1Frame==1), - srcSize_wrong, - "At least one frame successfully completed, " - "but following bytes are garbage: " - "it's more likely to be a srcSize error, " - "specifying more input bytes than size of frame(s). " - "Note: one could be unlucky, it might be a corruption error instead, " - "happening right at the place where we expect zstd magic bytes. " - "But this is _much_ less likely than a srcSize field error."); - if (ZSTD_isError(res)) return res; - assert(res <= dstCapacity); - if (res != 0) - dst = (BYTE*)dst + res; - dstCapacity -= res; - } - moreThan1Frame = 1; - } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */ - - RETURN_ERROR_IF(srcSize, srcSize_wrong, "input not entirely consumed"); - - return (size_t)((BYTE*)dst - (BYTE*)dststart); -} - -size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const void* dict, size_t dictSize) -{ - return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, dict, dictSize, NULL); -} - - -static ZSTD_DDict const* ZSTD_getDDict(ZSTD_DCtx* dctx) -{ - switch (dctx->dictUses) { - default: - assert(0 /* Impossible */); - ZSTD_FALLTHROUGH; - case ZSTD_dont_use: - ZSTD_clearDict(dctx); - return NULL; - case ZSTD_use_indefinitely: - return dctx->ddict; - case ZSTD_use_once: - dctx->dictUses = ZSTD_dont_use; - return dctx->ddict; - } -} - -size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ - return ZSTD_decompress_usingDDict(dctx, dst, dstCapacity, src, srcSize, ZSTD_getDDict(dctx)); -} - - -size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ -#if defined(ZSTD_HEAPMODE) && (ZSTD_HEAPMODE>=1) - size_t regenSize; - ZSTD_DCtx* const dctx = ZSTD_createDCtx_internal(ZSTD_defaultCMem); - RETURN_ERROR_IF(dctx==NULL, memory_allocation, "NULL pointer!"); - regenSize = ZSTD_decompressDCtx(dctx, dst, dstCapacity, src, srcSize); - ZSTD_freeDCtx(dctx); - return regenSize; -#else /* stack mode */ - ZSTD_DCtx dctx; - ZSTD_initDCtx_internal(&dctx); - return ZSTD_decompressDCtx(&dctx, dst, dstCapacity, src, srcSize); -#endif -} - - -/*-************************************** -* Advanced Streaming Decompression API -* Bufferless and synchronous -****************************************/ -size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; } - -/** - * Similar to ZSTD_nextSrcSizeToDecompress(), but when a block input can be streamed, we - * allow taking a partial block as the input. Currently only raw uncompressed blocks can - * be streamed. - * - * For blocks that can be streamed, this allows us to reduce the latency until we produce - * output, and avoid copying the input. - * - * @param inputSize - The total amount of input that the caller currently has. - */ -static size_t ZSTD_nextSrcSizeToDecompressWithInputSize(ZSTD_DCtx* dctx, size_t inputSize) { - if (!(dctx->stage == ZSTDds_decompressBlock || dctx->stage == ZSTDds_decompressLastBlock)) - return dctx->expected; - if (dctx->bType != bt_raw) - return dctx->expected; - return BOUNDED(1, inputSize, dctx->expected); -} - -ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx) { - switch(dctx->stage) - { - default: /* should not happen */ - assert(0); - ZSTD_FALLTHROUGH; - case ZSTDds_getFrameHeaderSize: - ZSTD_FALLTHROUGH; - case ZSTDds_decodeFrameHeader: - return ZSTDnit_frameHeader; - case ZSTDds_decodeBlockHeader: - return ZSTDnit_blockHeader; - case ZSTDds_decompressBlock: - return ZSTDnit_block; - case ZSTDds_decompressLastBlock: - return ZSTDnit_lastBlock; - case ZSTDds_checkChecksum: - return ZSTDnit_checksum; - case ZSTDds_decodeSkippableHeader: - ZSTD_FALLTHROUGH; - case ZSTDds_skipFrame: - return ZSTDnit_skippableFrame; - } -} - -static int ZSTD_isSkipFrame(ZSTD_DCtx* dctx) { return dctx->stage == ZSTDds_skipFrame; } - -/** ZSTD_decompressContinue() : - * srcSize : must be the exact nb of bytes expected (see ZSTD_nextSrcSizeToDecompress()) - * @return : nb of bytes generated into `dst` (necessarily <= `dstCapacity) - * or an error code, which can be tested using ZSTD_isError() */ -size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) -{ - DEBUGLOG(5, "ZSTD_decompressContinue (srcSize:%u)", (unsigned)srcSize); - /* Sanity check */ - RETURN_ERROR_IF(srcSize != ZSTD_nextSrcSizeToDecompressWithInputSize(dctx, srcSize), srcSize_wrong, "not allowed"); - ZSTD_checkContinuity(dctx, dst, dstCapacity); - - dctx->processedCSize += srcSize; - - switch (dctx->stage) - { - case ZSTDds_getFrameHeaderSize : - assert(src != NULL); - if (dctx->format == ZSTD_f_zstd1) { /* allows header */ - assert(srcSize >= ZSTD_FRAMEIDSIZE); /* to read skippable magic number */ - if ((MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */ - ZSTD_memcpy(dctx->headerBuffer, src, srcSize); - dctx->expected = ZSTD_SKIPPABLEHEADERSIZE - srcSize; /* remaining to load to get full skippable frame header */ - dctx->stage = ZSTDds_decodeSkippableHeader; - return 0; - } } - dctx->headerSize = ZSTD_frameHeaderSize_internal(src, srcSize, dctx->format); - if (ZSTD_isError(dctx->headerSize)) return dctx->headerSize; - ZSTD_memcpy(dctx->headerBuffer, src, srcSize); - dctx->expected = dctx->headerSize - srcSize; - dctx->stage = ZSTDds_decodeFrameHeader; - return 0; - - case ZSTDds_decodeFrameHeader: - assert(src != NULL); - ZSTD_memcpy(dctx->headerBuffer + (dctx->headerSize - srcSize), src, srcSize); - FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(dctx, dctx->headerBuffer, dctx->headerSize), ""); - dctx->expected = ZSTD_blockHeaderSize; - dctx->stage = ZSTDds_decodeBlockHeader; - return 0; - - case ZSTDds_decodeBlockHeader: - { blockProperties_t bp; - size_t const cBlockSize = ZSTD_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); - if (ZSTD_isError(cBlockSize)) return cBlockSize; - RETURN_ERROR_IF(cBlockSize > dctx->fParams.blockSizeMax, corruption_detected, "Block Size Exceeds Maximum"); - dctx->expected = cBlockSize; - dctx->bType = bp.blockType; - dctx->rleSize = bp.origSize; - if (cBlockSize) { - dctx->stage = bp.lastBlock ? ZSTDds_decompressLastBlock : ZSTDds_decompressBlock; - return 0; - } - /* empty block */ - if (bp.lastBlock) { - if (dctx->fParams.checksumFlag) { - dctx->expected = 4; - dctx->stage = ZSTDds_checkChecksum; - } else { - dctx->expected = 0; /* end of frame */ - dctx->stage = ZSTDds_getFrameHeaderSize; - } - } else { - dctx->expected = ZSTD_blockHeaderSize; /* jump to next header */ - dctx->stage = ZSTDds_decodeBlockHeader; - } - return 0; - } - - case ZSTDds_decompressLastBlock: - case ZSTDds_decompressBlock: - DEBUGLOG(5, "ZSTD_decompressContinue: case ZSTDds_decompressBlock"); - { size_t rSize; - switch(dctx->bType) - { - case bt_compressed: - DEBUGLOG(5, "ZSTD_decompressContinue: case bt_compressed"); - assert(dctx->isFrameDecompression == 1); - rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, is_streaming); - dctx->expected = 0; /* Streaming not supported */ - break; - case bt_raw : - assert(srcSize <= dctx->expected); - rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize); - FORWARD_IF_ERROR(rSize, "ZSTD_copyRawBlock failed"); - assert(rSize == srcSize); - dctx->expected -= rSize; - break; - case bt_rle : - rSize = ZSTD_setRleBlock(dst, dstCapacity, *(const BYTE*)src, dctx->rleSize); - dctx->expected = 0; /* Streaming not supported */ - break; - case bt_reserved : /* should never happen */ - default: - RETURN_ERROR(corruption_detected, "invalid block type"); - } - FORWARD_IF_ERROR(rSize, ""); - RETURN_ERROR_IF(rSize > dctx->fParams.blockSizeMax, corruption_detected, "Decompressed Block Size Exceeds Maximum"); - DEBUGLOG(5, "ZSTD_decompressContinue: decoded size from block : %u", (unsigned)rSize); - dctx->decodedSize += rSize; - if (dctx->validateChecksum) XXH64_update(&dctx->xxhState, dst, rSize); - dctx->previousDstEnd = (char*)dst + rSize; - - /* Stay on the same stage until we are finished streaming the block. */ - if (dctx->expected > 0) { - return rSize; - } - - if (dctx->stage == ZSTDds_decompressLastBlock) { /* end of frame */ - DEBUGLOG(4, "ZSTD_decompressContinue: decoded size from frame : %u", (unsigned)dctx->decodedSize); - RETURN_ERROR_IF( - dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN - && dctx->decodedSize != dctx->fParams.frameContentSize, - corruption_detected, ""); - if (dctx->fParams.checksumFlag) { /* another round for frame checksum */ - dctx->expected = 4; - dctx->stage = ZSTDds_checkChecksum; - } else { - ZSTD_DCtx_trace_end(dctx, dctx->decodedSize, dctx->processedCSize, /* streaming */ 1); - dctx->expected = 0; /* ends here */ - dctx->stage = ZSTDds_getFrameHeaderSize; - } - } else { - dctx->stage = ZSTDds_decodeBlockHeader; - dctx->expected = ZSTD_blockHeaderSize; - } - return rSize; - } - - case ZSTDds_checkChecksum: - assert(srcSize == 4); /* guaranteed by dctx->expected */ - { - if (dctx->validateChecksum) { - U32 const h32 = (U32)XXH64_digest(&dctx->xxhState); - U32 const check32 = MEM_readLE32(src); - DEBUGLOG(4, "ZSTD_decompressContinue: checksum : calculated %08X :: %08X read", (unsigned)h32, (unsigned)check32); - RETURN_ERROR_IF(check32 != h32, checksum_wrong, ""); - } - ZSTD_DCtx_trace_end(dctx, dctx->decodedSize, dctx->processedCSize, /* streaming */ 1); - dctx->expected = 0; - dctx->stage = ZSTDds_getFrameHeaderSize; - return 0; - } - - case ZSTDds_decodeSkippableHeader: - assert(src != NULL); - assert(srcSize <= ZSTD_SKIPPABLEHEADERSIZE); - assert(dctx->format != ZSTD_f_zstd1_magicless); - ZSTD_memcpy(dctx->headerBuffer + (ZSTD_SKIPPABLEHEADERSIZE - srcSize), src, srcSize); /* complete skippable header */ - dctx->expected = MEM_readLE32(dctx->headerBuffer + ZSTD_FRAMEIDSIZE); /* note : dctx->expected can grow seriously large, beyond local buffer size */ - dctx->stage = ZSTDds_skipFrame; - return 0; - - case ZSTDds_skipFrame: - dctx->expected = 0; - dctx->stage = ZSTDds_getFrameHeaderSize; - return 0; - - default: - assert(0); /* impossible */ - RETURN_ERROR(GENERIC, "impossible to reach"); /* some compilers require default to do something */ - } -} - - -static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) -{ - dctx->dictEnd = dctx->previousDstEnd; - dctx->virtualStart = (const char*)dict - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); - dctx->prefixStart = dict; - dctx->previousDstEnd = (const char*)dict + dictSize; -#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - dctx->dictContentBeginForFuzzing = dctx->prefixStart; - dctx->dictContentEndForFuzzing = dctx->previousDstEnd; -#endif - return 0; -} - -/*! ZSTD_loadDEntropy() : - * dict : must point at beginning of a valid zstd dictionary. - * @return : size of entropy tables read */ -size_t -ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, - const void* const dict, size_t const dictSize) -{ - const BYTE* dictPtr = (const BYTE*)dict; - const BYTE* const dictEnd = dictPtr + dictSize; - - RETURN_ERROR_IF(dictSize <= 8, dictionary_corrupted, "dict is too small"); - assert(MEM_readLE32(dict) == ZSTD_MAGIC_DICTIONARY); /* dict must be valid */ - dictPtr += 8; /* skip header = magic + dictID */ - - ZSTD_STATIC_ASSERT(offsetof(ZSTD_entropyDTables_t, OFTable) == offsetof(ZSTD_entropyDTables_t, LLTable) + sizeof(entropy->LLTable)); - ZSTD_STATIC_ASSERT(offsetof(ZSTD_entropyDTables_t, MLTable) == offsetof(ZSTD_entropyDTables_t, OFTable) + sizeof(entropy->OFTable)); - ZSTD_STATIC_ASSERT(sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy->MLTable) >= HUF_DECOMPRESS_WORKSPACE_SIZE); - { void* const workspace = &entropy->LLTable; /* use fse tables as temporary workspace; implies fse tables are grouped together */ - size_t const workspaceSize = sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy->MLTable); -#ifdef HUF_FORCE_DECOMPRESS_X1 - /* in minimal huffman, we always use X1 variants */ - size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, - dictPtr, dictEnd - dictPtr, - workspace, workspaceSize, /* flags */ 0); -#else - size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, - dictPtr, (size_t)(dictEnd - dictPtr), - workspace, workspaceSize, /* flags */ 0); -#endif - RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted, ""); - dictPtr += hSize; - } - - { short offcodeNCount[MaxOff+1]; - unsigned offcodeMaxValue = MaxOff, offcodeLog; - size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(offcodeMaxValue > MaxOff, dictionary_corrupted, ""); - RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); - ZSTD_buildFSETable( entropy->OFTable, - offcodeNCount, offcodeMaxValue, - OF_base, OF_bits, - offcodeLog, - entropy->workspace, sizeof(entropy->workspace), - /* bmi2 */0); - dictPtr += offcodeHeaderSize; - } - - { short matchlengthNCount[MaxML+1]; - unsigned matchlengthMaxValue = MaxML, matchlengthLog; - size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(matchlengthMaxValue > MaxML, dictionary_corrupted, ""); - RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); - ZSTD_buildFSETable( entropy->MLTable, - matchlengthNCount, matchlengthMaxValue, - ML_base, ML_bits, - matchlengthLog, - entropy->workspace, sizeof(entropy->workspace), - /* bmi2 */ 0); - dictPtr += matchlengthHeaderSize; - } - - { short litlengthNCount[MaxLL+1]; - unsigned litlengthMaxValue = MaxLL, litlengthLog; - size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); - RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); - RETURN_ERROR_IF(litlengthMaxValue > MaxLL, dictionary_corrupted, ""); - RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); - ZSTD_buildFSETable( entropy->LLTable, - litlengthNCount, litlengthMaxValue, - LL_base, LL_bits, - litlengthLog, - entropy->workspace, sizeof(entropy->workspace), - /* bmi2 */ 0); - dictPtr += litlengthHeaderSize; - } - - RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); - { int i; - size_t const dictContentSize = (size_t)(dictEnd - (dictPtr+12)); - for (i=0; i<3; i++) { - U32 const rep = MEM_readLE32(dictPtr); dictPtr += 4; - RETURN_ERROR_IF(rep==0 || rep > dictContentSize, - dictionary_corrupted, ""); - entropy->rep[i] = rep; - } } - - return (size_t)(dictPtr - (const BYTE*)dict); -} - -static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) -{ - if (dictSize < 8) return ZSTD_refDictContent(dctx, dict, dictSize); - { U32 const magic = MEM_readLE32(dict); - if (magic != ZSTD_MAGIC_DICTIONARY) { - return ZSTD_refDictContent(dctx, dict, dictSize); /* pure content mode */ - } } - dctx->dictID = MEM_readLE32((const char*)dict + ZSTD_FRAMEIDSIZE); - - /* load entropy tables */ - { size_t const eSize = ZSTD_loadDEntropy(&dctx->entropy, dict, dictSize); - RETURN_ERROR_IF(ZSTD_isError(eSize), dictionary_corrupted, ""); - dict = (const char*)dict + eSize; - dictSize -= eSize; - } - dctx->litEntropy = dctx->fseEntropy = 1; - - /* reference dictionary content */ - return ZSTD_refDictContent(dctx, dict, dictSize); -} - -size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx) -{ - assert(dctx != NULL); -#if ZSTD_TRACE - dctx->traceCtx = (ZSTD_trace_decompress_begin != NULL) ? ZSTD_trace_decompress_begin(dctx) : 0; -#endif - dctx->expected = ZSTD_startingInputLength(dctx->format); /* dctx->format must be properly set */ - dctx->stage = ZSTDds_getFrameHeaderSize; - dctx->processedCSize = 0; - dctx->decodedSize = 0; - dctx->previousDstEnd = NULL; - dctx->prefixStart = NULL; - dctx->virtualStart = NULL; - dctx->dictEnd = NULL; - dctx->entropy.hufTable[0] = (HUF_DTable)((ZSTD_HUFFDTABLE_CAPACITY_LOG)*0x1000001); /* cover both little and big endian */ - dctx->litEntropy = dctx->fseEntropy = 0; - dctx->dictID = 0; - dctx->bType = bt_reserved; - dctx->isFrameDecompression = 1; - ZSTD_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue)); - ZSTD_memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue)); /* initial repcodes */ - dctx->LLTptr = dctx->entropy.LLTable; - dctx->MLTptr = dctx->entropy.MLTable; - dctx->OFTptr = dctx->entropy.OFTable; - dctx->HUFptr = dctx->entropy.hufTable; - return 0; -} - -size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) -{ - FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); - if (dict && dictSize) - RETURN_ERROR_IF( - ZSTD_isError(ZSTD_decompress_insertDictionary(dctx, dict, dictSize)), - dictionary_corrupted, ""); - return 0; -} - - -/* ====== ZSTD_DDict ====== */ - -size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) -{ - DEBUGLOG(4, "ZSTD_decompressBegin_usingDDict"); - assert(dctx != NULL); - if (ddict) { - const char* const dictStart = (const char*)ZSTD_DDict_dictContent(ddict); - size_t const dictSize = ZSTD_DDict_dictSize(ddict); - const void* const dictEnd = dictStart + dictSize; - dctx->ddictIsCold = (dctx->dictEnd != dictEnd); - DEBUGLOG(4, "DDict is %s", - dctx->ddictIsCold ? "~cold~" : "hot!"); - } - FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); - if (ddict) { /* NULL ddict is equivalent to no dictionary */ - ZSTD_copyDDictParameters(dctx, ddict); - } - return 0; -} - -/*! ZSTD_getDictID_fromDict() : - * Provides the dictID stored within dictionary. - * if @return == 0, the dictionary is not conformant with Zstandard specification. - * It can still be loaded, but as a content-only dictionary. */ -unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize) -{ - if (dictSize < 8) return 0; - if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) return 0; - return MEM_readLE32((const char*)dict + ZSTD_FRAMEIDSIZE); -} - -/*! ZSTD_getDictID_fromFrame() : - * Provides the dictID required to decompress frame stored within `src`. - * If @return == 0, the dictID could not be decoded. - * This could for one of the following reasons : - * - The frame does not require a dictionary (most common case). - * - The frame was built with dictID intentionally removed. - * Needed dictionary is a hidden piece of information. - * Note : this use case also happens when using a non-conformant dictionary. - * - `srcSize` is too small, and as a result, frame header could not be decoded. - * Note : possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`. - * - This is not a Zstandard frame. - * When identifying the exact failure cause, it's possible to use - * ZSTD_getFrameHeader(), which will provide a more precise error code. */ -unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize) -{ - ZSTD_FrameHeader zfp = { 0, 0, 0, ZSTD_frame, 0, 0, 0, 0, 0 }; - size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize); - if (ZSTD_isError(hError)) return 0; - return zfp.dictID; -} - - -/*! ZSTD_decompress_usingDDict() : -* Decompression using a pre-digested Dictionary -* Use dictionary without significant overhead. */ -size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, - const ZSTD_DDict* ddict) -{ - /* pass content and size in case legacy frames are encountered */ - return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, - NULL, 0, - ddict); -} - - -/*===================================== -* Streaming decompression -*====================================*/ - -ZSTD_DStream* ZSTD_createDStream(void) -{ - DEBUGLOG(3, "ZSTD_createDStream"); - return ZSTD_createDCtx_internal(ZSTD_defaultCMem); -} - -ZSTD_DStream* ZSTD_initStaticDStream(void *workspace, size_t workspaceSize) -{ - return ZSTD_initStaticDCtx(workspace, workspaceSize); -} - -ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) -{ - return ZSTD_createDCtx_internal(customMem); -} - -size_t ZSTD_freeDStream(ZSTD_DStream* zds) -{ - return ZSTD_freeDCtx(zds); -} - - -/* *** Initialization *** */ - -size_t ZSTD_DStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX + ZSTD_blockHeaderSize; } -size_t ZSTD_DStreamOutSize(void) { return ZSTD_BLOCKSIZE_MAX; } - -size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, - const void* dict, size_t dictSize, - ZSTD_dictLoadMethod_e dictLoadMethod, - ZSTD_dictContentType_e dictContentType) -{ - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); - ZSTD_clearDict(dctx); - if (dict && dictSize != 0) { - dctx->ddictLocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); - RETURN_ERROR_IF(dctx->ddictLocal == NULL, memory_allocation, "NULL pointer!"); - dctx->ddict = dctx->ddictLocal; - dctx->dictUses = ZSTD_use_indefinitely; - } - return 0; -} - -size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) -{ - return ZSTD_DCtx_loadDictionary_advanced(dctx, dict, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto); -} - -size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) -{ - return ZSTD_DCtx_loadDictionary_advanced(dctx, dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto); -} - -size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) -{ - FORWARD_IF_ERROR(ZSTD_DCtx_loadDictionary_advanced(dctx, prefix, prefixSize, ZSTD_dlm_byRef, dictContentType), ""); - dctx->dictUses = ZSTD_use_once; - return 0; -} - -size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize) -{ - return ZSTD_DCtx_refPrefix_advanced(dctx, prefix, prefixSize, ZSTD_dct_rawContent); -} - - -/* ZSTD_initDStream_usingDict() : - * return : expected size, aka ZSTD_startingInputLength(). - * this function cannot fail */ -size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize) -{ - DEBUGLOG(4, "ZSTD_initDStream_usingDict"); - FORWARD_IF_ERROR( ZSTD_DCtx_reset(zds, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_DCtx_loadDictionary(zds, dict, dictSize) , ""); - return ZSTD_startingInputLength(zds->format); -} - -/* note : this variant can't fail */ -size_t ZSTD_initDStream(ZSTD_DStream* zds) -{ - DEBUGLOG(4, "ZSTD_initDStream"); - FORWARD_IF_ERROR(ZSTD_DCtx_reset(zds, ZSTD_reset_session_only), ""); - FORWARD_IF_ERROR(ZSTD_DCtx_refDDict(zds, NULL), ""); - return ZSTD_startingInputLength(zds->format); -} - -/* ZSTD_initDStream_usingDDict() : - * ddict will just be referenced, and must outlive decompression session - * this function cannot fail */ -size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict) -{ - DEBUGLOG(4, "ZSTD_initDStream_usingDDict"); - FORWARD_IF_ERROR( ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only) , ""); - FORWARD_IF_ERROR( ZSTD_DCtx_refDDict(dctx, ddict) , ""); - return ZSTD_startingInputLength(dctx->format); -} - -/* ZSTD_resetDStream() : - * return : expected size, aka ZSTD_startingInputLength(). - * this function cannot fail */ -size_t ZSTD_resetDStream(ZSTD_DStream* dctx) -{ - DEBUGLOG(4, "ZSTD_resetDStream"); - FORWARD_IF_ERROR(ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only), ""); - return ZSTD_startingInputLength(dctx->format); -} - - -size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) -{ - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); - ZSTD_clearDict(dctx); - if (ddict) { - dctx->ddict = ddict; - dctx->dictUses = ZSTD_use_indefinitely; - if (dctx->refMultipleDDicts == ZSTD_rmd_refMultipleDDicts) { - if (dctx->ddictSet == NULL) { - dctx->ddictSet = ZSTD_createDDictHashSet(dctx->customMem); - if (!dctx->ddictSet) { - RETURN_ERROR(memory_allocation, "Failed to allocate memory for hash set!"); - } - } - assert(!dctx->staticSize); /* Impossible: ddictSet cannot have been allocated if static dctx */ - FORWARD_IF_ERROR(ZSTD_DDictHashSet_addDDict(dctx->ddictSet, ddict, dctx->customMem), ""); - } - } - return 0; -} - -/* ZSTD_DCtx_setMaxWindowSize() : - * note : no direct equivalence in ZSTD_DCtx_setParameter, - * since this version sets windowSize, and the other sets windowLog */ -size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize) -{ - ZSTD_bounds const bounds = ZSTD_dParam_getBounds(ZSTD_d_windowLogMax); - size_t const min = (size_t)1 << bounds.lowerBound; - size_t const max = (size_t)1 << bounds.upperBound; - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); - RETURN_ERROR_IF(maxWindowSize < min, parameter_outOfBound, ""); - RETURN_ERROR_IF(maxWindowSize > max, parameter_outOfBound, ""); - dctx->maxWindowSize = maxWindowSize; - return 0; -} - -size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format) -{ - return ZSTD_DCtx_setParameter(dctx, ZSTD_d_format, (int)format); -} - -ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam) -{ - ZSTD_bounds bounds = { 0, 0, 0 }; - switch(dParam) { - case ZSTD_d_windowLogMax: - bounds.lowerBound = ZSTD_WINDOWLOG_ABSOLUTEMIN; - bounds.upperBound = ZSTD_WINDOWLOG_MAX; - return bounds; - case ZSTD_d_format: - bounds.lowerBound = (int)ZSTD_f_zstd1; - bounds.upperBound = (int)ZSTD_f_zstd1_magicless; - ZSTD_STATIC_ASSERT(ZSTD_f_zstd1 < ZSTD_f_zstd1_magicless); - return bounds; - case ZSTD_d_stableOutBuffer: - bounds.lowerBound = (int)ZSTD_bm_buffered; - bounds.upperBound = (int)ZSTD_bm_stable; - return bounds; - case ZSTD_d_forceIgnoreChecksum: - bounds.lowerBound = (int)ZSTD_d_validateChecksum; - bounds.upperBound = (int)ZSTD_d_ignoreChecksum; - return bounds; - case ZSTD_d_refMultipleDDicts: - bounds.lowerBound = (int)ZSTD_rmd_refSingleDDict; - bounds.upperBound = (int)ZSTD_rmd_refMultipleDDicts; - return bounds; - case ZSTD_d_disableHuffmanAssembly: - bounds.lowerBound = 0; - bounds.upperBound = 1; - return bounds; - case ZSTD_d_maxBlockSize: - bounds.lowerBound = ZSTD_BLOCKSIZE_MAX_MIN; - bounds.upperBound = ZSTD_BLOCKSIZE_MAX; - return bounds; - - default:; - } - bounds.error = ERROR(parameter_unsupported); - return bounds; -} - -/* ZSTD_dParam_withinBounds: - * @return 1 if value is within dParam bounds, - * 0 otherwise */ -static int ZSTD_dParam_withinBounds(ZSTD_dParameter dParam, int value) -{ - ZSTD_bounds const bounds = ZSTD_dParam_getBounds(dParam); - if (ZSTD_isError(bounds.error)) return 0; - if (value < bounds.lowerBound) return 0; - if (value > bounds.upperBound) return 0; - return 1; -} - -#define CHECK_DBOUNDS(p,v) { \ - RETURN_ERROR_IF(!ZSTD_dParam_withinBounds(p, v), parameter_outOfBound, ""); \ -} - -size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int* value) -{ - switch (param) { - case ZSTD_d_windowLogMax: - *value = (int)ZSTD_highbit32((U32)dctx->maxWindowSize); - return 0; - case ZSTD_d_format: - *value = (int)dctx->format; - return 0; - case ZSTD_d_stableOutBuffer: - *value = (int)dctx->outBufferMode; - return 0; - case ZSTD_d_forceIgnoreChecksum: - *value = (int)dctx->forceIgnoreChecksum; - return 0; - case ZSTD_d_refMultipleDDicts: - *value = (int)dctx->refMultipleDDicts; - return 0; - case ZSTD_d_disableHuffmanAssembly: - *value = (int)dctx->disableHufAsm; - return 0; - case ZSTD_d_maxBlockSize: - *value = dctx->maxBlockSizeParam; - return 0; - default:; - } - RETURN_ERROR(parameter_unsupported, ""); -} - -size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value) -{ - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); - switch(dParam) { - case ZSTD_d_windowLogMax: - if (value == 0) value = ZSTD_WINDOWLOG_LIMIT_DEFAULT; - CHECK_DBOUNDS(ZSTD_d_windowLogMax, value); - dctx->maxWindowSize = ((size_t)1) << value; - return 0; - case ZSTD_d_format: - CHECK_DBOUNDS(ZSTD_d_format, value); - dctx->format = (ZSTD_format_e)value; - return 0; - case ZSTD_d_stableOutBuffer: - CHECK_DBOUNDS(ZSTD_d_stableOutBuffer, value); - dctx->outBufferMode = (ZSTD_bufferMode_e)value; - return 0; - case ZSTD_d_forceIgnoreChecksum: - CHECK_DBOUNDS(ZSTD_d_forceIgnoreChecksum, value); - dctx->forceIgnoreChecksum = (ZSTD_forceIgnoreChecksum_e)value; - return 0; - case ZSTD_d_refMultipleDDicts: - CHECK_DBOUNDS(ZSTD_d_refMultipleDDicts, value); - if (dctx->staticSize != 0) { - RETURN_ERROR(parameter_unsupported, "Static dctx does not support multiple DDicts!"); - } - dctx->refMultipleDDicts = (ZSTD_refMultipleDDicts_e)value; - return 0; - case ZSTD_d_disableHuffmanAssembly: - CHECK_DBOUNDS(ZSTD_d_disableHuffmanAssembly, value); - dctx->disableHufAsm = value != 0; - return 0; - case ZSTD_d_maxBlockSize: - if (value != 0) CHECK_DBOUNDS(ZSTD_d_maxBlockSize, value); - dctx->maxBlockSizeParam = value; - return 0; - default:; - } - RETURN_ERROR(parameter_unsupported, ""); -} - -size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset) -{ - if ( (reset == ZSTD_reset_session_only) - || (reset == ZSTD_reset_session_and_parameters) ) { - dctx->streamStage = zdss_init; - dctx->noForwardProgress = 0; - dctx->isFrameDecompression = 1; - } - if ( (reset == ZSTD_reset_parameters) - || (reset == ZSTD_reset_session_and_parameters) ) { - RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); - ZSTD_clearDict(dctx); - ZSTD_DCtx_resetParameters(dctx); - } - return 0; -} - - -size_t ZSTD_sizeof_DStream(const ZSTD_DStream* dctx) -{ - return ZSTD_sizeof_DCtx(dctx); -} - -static size_t ZSTD_decodingBufferSize_internal(unsigned long long windowSize, unsigned long long frameContentSize, size_t blockSizeMax) -{ - size_t const blockSize = MIN((size_t)MIN(windowSize, ZSTD_BLOCKSIZE_MAX), blockSizeMax); - /* We need blockSize + WILDCOPY_OVERLENGTH worth of buffer so that if a block - * ends at windowSize + WILDCOPY_OVERLENGTH + 1 bytes, we can start writing - * the block at the beginning of the output buffer, and maintain a full window. - * - * We need another blockSize worth of buffer so that we can store split - * literals at the end of the block without overwriting the extDict window. - */ - unsigned long long const neededRBSize = windowSize + (blockSize * 2) + (WILDCOPY_OVERLENGTH * 2); - unsigned long long const neededSize = MIN(frameContentSize, neededRBSize); - size_t const minRBSize = (size_t) neededSize; - RETURN_ERROR_IF((unsigned long long)minRBSize != neededSize, - frameParameter_windowTooLarge, ""); - return minRBSize; -} - -size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize) -{ - return ZSTD_decodingBufferSize_internal(windowSize, frameContentSize, ZSTD_BLOCKSIZE_MAX); -} - -size_t ZSTD_estimateDStreamSize(size_t windowSize) -{ - size_t const blockSize = MIN(windowSize, ZSTD_BLOCKSIZE_MAX); - size_t const inBuffSize = blockSize; /* no block can be larger */ - size_t const outBuffSize = ZSTD_decodingBufferSize_min(windowSize, ZSTD_CONTENTSIZE_UNKNOWN); - return ZSTD_estimateDCtxSize() + inBuffSize + outBuffSize; -} - -size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize) -{ - U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX; /* note : should be user-selectable, but requires an additional parameter (or a dctx) */ - ZSTD_FrameHeader zfh; - size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize); - if (ZSTD_isError(err)) return err; - RETURN_ERROR_IF(err>0, srcSize_wrong, ""); - RETURN_ERROR_IF(zfh.windowSize > windowSizeMax, - frameParameter_windowTooLarge, ""); - return ZSTD_estimateDStreamSize((size_t)zfh.windowSize); -} - - -/* ***** Decompression ***** */ - -static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) -{ - return (zds->inBuffSize + zds->outBuffSize) >= (neededInBuffSize + neededOutBuffSize) * ZSTD_WORKSPACETOOLARGE_FACTOR; -} - -static void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) -{ - if (ZSTD_DCtx_isOverflow(zds, neededInBuffSize, neededOutBuffSize)) - zds->oversizedDuration++; - else - zds->oversizedDuration = 0; -} - -static int ZSTD_DCtx_isOversizedTooLong(ZSTD_DStream* zds) -{ - return zds->oversizedDuration >= ZSTD_WORKSPACETOOLARGE_MAXDURATION; -} - -/* Checks that the output buffer hasn't changed if ZSTD_obm_stable is used. */ -static size_t ZSTD_checkOutBuffer(ZSTD_DStream const* zds, ZSTD_outBuffer const* output) -{ - ZSTD_outBuffer const expect = zds->expectedOutBuffer; - /* No requirement when ZSTD_obm_stable is not enabled. */ - if (zds->outBufferMode != ZSTD_bm_stable) - return 0; - /* Any buffer is allowed in zdss_init, this must be the same for every other call until - * the context is reset. - */ - if (zds->streamStage == zdss_init) - return 0; - /* The buffer must match our expectation exactly. */ - if (expect.dst == output->dst && expect.pos == output->pos && expect.size == output->size) - return 0; - RETURN_ERROR(dstBuffer_wrong, "ZSTD_d_stableOutBuffer enabled but output differs!"); -} - -/* Calls ZSTD_decompressContinue() with the right parameters for ZSTD_decompressStream() - * and updates the stage and the output buffer state. This call is extracted so it can be - * used both when reading directly from the ZSTD_inBuffer, and in buffered input mode. - * NOTE: You must break after calling this function since the streamStage is modified. - */ -static size_t ZSTD_decompressContinueStream( - ZSTD_DStream* zds, char** op, char* oend, - void const* src, size_t srcSize) { - int const isSkipFrame = ZSTD_isSkipFrame(zds); - if (zds->outBufferMode == ZSTD_bm_buffered) { - size_t const dstSize = isSkipFrame ? 0 : zds->outBuffSize - zds->outStart; - size_t const decodedSize = ZSTD_decompressContinue(zds, - zds->outBuff + zds->outStart, dstSize, src, srcSize); - FORWARD_IF_ERROR(decodedSize, ""); - if (!decodedSize && !isSkipFrame) { - zds->streamStage = zdss_read; - } else { - zds->outEnd = zds->outStart + decodedSize; - zds->streamStage = zdss_flush; - } - } else { - /* Write directly into the output buffer */ - size_t const dstSize = isSkipFrame ? 0 : (size_t)(oend - *op); - size_t const decodedSize = ZSTD_decompressContinue(zds, *op, dstSize, src, srcSize); - FORWARD_IF_ERROR(decodedSize, ""); - *op += decodedSize; - /* Flushing is not needed. */ - zds->streamStage = zdss_read; - assert(*op <= oend); - assert(zds->outBufferMode == ZSTD_bm_stable); - } - return 0; -} - -size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input) -{ - const char* const src = (const char*)input->src; - const char* const istart = input->pos != 0 ? src + input->pos : src; - const char* const iend = input->size != 0 ? src + input->size : src; - const char* ip = istart; - char* const dst = (char*)output->dst; - char* const ostart = output->pos != 0 ? dst + output->pos : dst; - char* const oend = output->size != 0 ? dst + output->size : dst; - char* op = ostart; - U32 someMoreWork = 1; - - DEBUGLOG(5, "ZSTD_decompressStream"); - assert(zds != NULL); - RETURN_ERROR_IF( - input->pos > input->size, - srcSize_wrong, - "forbidden. in: pos: %u vs size: %u", - (U32)input->pos, (U32)input->size); - RETURN_ERROR_IF( - output->pos > output->size, - dstSize_tooSmall, - "forbidden. out: pos: %u vs size: %u", - (U32)output->pos, (U32)output->size); - DEBUGLOG(5, "input size : %u", (U32)(input->size - input->pos)); - FORWARD_IF_ERROR(ZSTD_checkOutBuffer(zds, output), ""); - - while (someMoreWork) { - switch(zds->streamStage) - { - case zdss_init : - DEBUGLOG(5, "stage zdss_init => transparent reset "); - zds->streamStage = zdss_loadHeader; - zds->lhSize = zds->inPos = zds->outStart = zds->outEnd = 0; -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) - zds->legacyVersion = 0; -#endif - zds->hostageByte = 0; - zds->expectedOutBuffer = *output; - ZSTD_FALLTHROUGH; - - case zdss_loadHeader : - DEBUGLOG(5, "stage zdss_loadHeader (srcSize : %u)", (U32)(iend - ip)); -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) - if (zds->legacyVersion) { - RETURN_ERROR_IF(zds->staticSize, memory_allocation, - "legacy support is incompatible with static dctx"); - { size_t const hint = ZSTD_decompressLegacyStream(zds->legacyContext, zds->legacyVersion, output, input); - if (hint==0) zds->streamStage = zdss_init; - return hint; - } } -#endif - { size_t const hSize = ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSize, zds->format); - if (zds->refMultipleDDicts && zds->ddictSet) { - ZSTD_DCtx_selectFrameDDict(zds); - } - if (ZSTD_isError(hSize)) { -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) - U32 const legacyVersion = ZSTD_isLegacy(istart, iend-istart); - if (legacyVersion) { - ZSTD_DDict const* const ddict = ZSTD_getDDict(zds); - const void* const dict = ddict ? ZSTD_DDict_dictContent(ddict) : NULL; - size_t const dictSize = ddict ? ZSTD_DDict_dictSize(ddict) : 0; - DEBUGLOG(5, "ZSTD_decompressStream: detected legacy version v0.%u", legacyVersion); - RETURN_ERROR_IF(zds->staticSize, memory_allocation, - "legacy support is incompatible with static dctx"); - FORWARD_IF_ERROR(ZSTD_initLegacyStream(&zds->legacyContext, - zds->previousLegacyVersion, legacyVersion, - dict, dictSize), ""); - zds->legacyVersion = zds->previousLegacyVersion = legacyVersion; - { size_t const hint = ZSTD_decompressLegacyStream(zds->legacyContext, legacyVersion, output, input); - if (hint==0) zds->streamStage = zdss_init; /* or stay in stage zdss_loadHeader */ - return hint; - } } -#endif - return hSize; /* error */ - } - if (hSize != 0) { /* need more input */ - size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */ - size_t const remainingInput = (size_t)(iend-ip); - assert(iend >= ip); - if (toLoad > remainingInput) { /* not enough input to load full header */ - if (remainingInput > 0) { - ZSTD_memcpy(zds->headerBuffer + zds->lhSize, ip, remainingInput); - zds->lhSize += remainingInput; - } - input->pos = input->size; - /* check first few bytes */ - FORWARD_IF_ERROR( - ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSize, zds->format), - "First few bytes detected incorrect" ); - /* return hint input size */ - return (MAX((size_t)ZSTD_FRAMEHEADERSIZE_MIN(zds->format), hSize) - zds->lhSize) + ZSTD_blockHeaderSize; /* remaining header bytes + next block header */ - } - assert(ip != NULL); - ZSTD_memcpy(zds->headerBuffer + zds->lhSize, ip, toLoad); zds->lhSize = hSize; ip += toLoad; - break; - } } - - /* check for single-pass mode opportunity */ - if (zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN - && zds->fParams.frameType != ZSTD_skippableFrame - && (U64)(size_t)(oend-op) >= zds->fParams.frameContentSize) { - size_t const cSize = ZSTD_findFrameCompressedSize_advanced(istart, (size_t)(iend-istart), zds->format); - if (cSize <= (size_t)(iend-istart)) { - /* shortcut : using single-pass mode */ - size_t const decompressedSize = ZSTD_decompress_usingDDict(zds, op, (size_t)(oend-op), istart, cSize, ZSTD_getDDict(zds)); - if (ZSTD_isError(decompressedSize)) return decompressedSize; - DEBUGLOG(4, "shortcut to single-pass ZSTD_decompress_usingDDict()"); - assert(istart != NULL); - ip = istart + cSize; - op = op ? op + decompressedSize : op; /* can occur if frameContentSize = 0 (empty frame) */ - zds->expected = 0; - zds->streamStage = zdss_init; - someMoreWork = 0; - break; - } } - - /* Check output buffer is large enough for ZSTD_odm_stable. */ - if (zds->outBufferMode == ZSTD_bm_stable - && zds->fParams.frameType != ZSTD_skippableFrame - && zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN - && (U64)(size_t)(oend-op) < zds->fParams.frameContentSize) { - RETURN_ERROR(dstSize_tooSmall, "ZSTD_obm_stable passed but ZSTD_outBuffer is too small"); - } - - /* Consume header (see ZSTDds_decodeFrameHeader) */ - DEBUGLOG(4, "Consume header"); - FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(zds, ZSTD_getDDict(zds)), ""); - - if (zds->format == ZSTD_f_zstd1 - && (MEM_readLE32(zds->headerBuffer) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */ - zds->expected = MEM_readLE32(zds->headerBuffer + ZSTD_FRAMEIDSIZE); - zds->stage = ZSTDds_skipFrame; - } else { - FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(zds, zds->headerBuffer, zds->lhSize), ""); - zds->expected = ZSTD_blockHeaderSize; - zds->stage = ZSTDds_decodeBlockHeader; - } - - /* control buffer memory usage */ - DEBUGLOG(4, "Control max memory usage (%u KB <= max %u KB)", - (U32)(zds->fParams.windowSize >>10), - (U32)(zds->maxWindowSize >> 10) ); - zds->fParams.windowSize = MAX(zds->fParams.windowSize, 1U << ZSTD_WINDOWLOG_ABSOLUTEMIN); - RETURN_ERROR_IF(zds->fParams.windowSize > zds->maxWindowSize, - frameParameter_windowTooLarge, ""); - if (zds->maxBlockSizeParam != 0) - zds->fParams.blockSizeMax = MIN(zds->fParams.blockSizeMax, (unsigned)zds->maxBlockSizeParam); - - /* Adapt buffer sizes to frame header instructions */ - { size_t const neededInBuffSize = MAX(zds->fParams.blockSizeMax, 4 /* frame checksum */); - size_t const neededOutBuffSize = zds->outBufferMode == ZSTD_bm_buffered - ? ZSTD_decodingBufferSize_internal(zds->fParams.windowSize, zds->fParams.frameContentSize, zds->fParams.blockSizeMax) - : 0; - - ZSTD_DCtx_updateOversizedDuration(zds, neededInBuffSize, neededOutBuffSize); - - { int const tooSmall = (zds->inBuffSize < neededInBuffSize) || (zds->outBuffSize < neededOutBuffSize); - int const tooLarge = ZSTD_DCtx_isOversizedTooLong(zds); - - if (tooSmall || tooLarge) { - size_t const bufferSize = neededInBuffSize + neededOutBuffSize; - DEBUGLOG(4, "inBuff : from %u to %u", - (U32)zds->inBuffSize, (U32)neededInBuffSize); - DEBUGLOG(4, "outBuff : from %u to %u", - (U32)zds->outBuffSize, (U32)neededOutBuffSize); - if (zds->staticSize) { /* static DCtx */ - DEBUGLOG(4, "staticSize : %u", (U32)zds->staticSize); - assert(zds->staticSize >= sizeof(ZSTD_DCtx)); /* controlled at init */ - RETURN_ERROR_IF( - bufferSize > zds->staticSize - sizeof(ZSTD_DCtx), - memory_allocation, ""); - } else { - ZSTD_customFree(zds->inBuff, zds->customMem); - zds->inBuffSize = 0; - zds->outBuffSize = 0; - zds->inBuff = (char*)ZSTD_customMalloc(bufferSize, zds->customMem); - RETURN_ERROR_IF(zds->inBuff == NULL, memory_allocation, ""); - } - zds->inBuffSize = neededInBuffSize; - zds->outBuff = zds->inBuff + zds->inBuffSize; - zds->outBuffSize = neededOutBuffSize; - } } } - zds->streamStage = zdss_read; - ZSTD_FALLTHROUGH; - - case zdss_read: - DEBUGLOG(5, "stage zdss_read"); - { size_t const neededInSize = ZSTD_nextSrcSizeToDecompressWithInputSize(zds, (size_t)(iend - ip)); - DEBUGLOG(5, "neededInSize = %u", (U32)neededInSize); - if (neededInSize==0) { /* end of frame */ - zds->streamStage = zdss_init; - someMoreWork = 0; - break; - } - if ((size_t)(iend-ip) >= neededInSize) { /* decode directly from src */ - FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, ip, neededInSize), ""); - assert(ip != NULL); - ip += neededInSize; - /* Function modifies the stage so we must break */ - break; - } } - if (ip==iend) { someMoreWork = 0; break; } /* no more input */ - zds->streamStage = zdss_load; - ZSTD_FALLTHROUGH; - - case zdss_load: - { size_t const neededInSize = ZSTD_nextSrcSizeToDecompress(zds); - size_t const toLoad = neededInSize - zds->inPos; - int const isSkipFrame = ZSTD_isSkipFrame(zds); - size_t loadedSize; - /* At this point we shouldn't be decompressing a block that we can stream. */ - assert(neededInSize == ZSTD_nextSrcSizeToDecompressWithInputSize(zds, (size_t)(iend - ip))); - if (isSkipFrame) { - loadedSize = MIN(toLoad, (size_t)(iend-ip)); - } else { - RETURN_ERROR_IF(toLoad > zds->inBuffSize - zds->inPos, - corruption_detected, - "should never happen"); - loadedSize = ZSTD_limitCopy(zds->inBuff + zds->inPos, toLoad, ip, (size_t)(iend-ip)); - } - if (loadedSize != 0) { - /* ip may be NULL */ - ip += loadedSize; - zds->inPos += loadedSize; - } - if (loadedSize < toLoad) { someMoreWork = 0; break; } /* not enough input, wait for more */ - - /* decode loaded input */ - zds->inPos = 0; /* input is consumed */ - FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, zds->inBuff, neededInSize), ""); - /* Function modifies the stage so we must break */ - break; - } - case zdss_flush: - { - size_t const toFlushSize = zds->outEnd - zds->outStart; - size_t const flushedSize = ZSTD_limitCopy(op, (size_t)(oend-op), zds->outBuff + zds->outStart, toFlushSize); - - op = op ? op + flushedSize : op; - - zds->outStart += flushedSize; - if (flushedSize == toFlushSize) { /* flush completed */ - zds->streamStage = zdss_read; - if ( (zds->outBuffSize < zds->fParams.frameContentSize) - && (zds->outStart + zds->fParams.blockSizeMax > zds->outBuffSize) ) { - DEBUGLOG(5, "restart filling outBuff from beginning (left:%i, needed:%u)", - (int)(zds->outBuffSize - zds->outStart), - (U32)zds->fParams.blockSizeMax); - zds->outStart = zds->outEnd = 0; - } - break; - } } - /* cannot complete flush */ - someMoreWork = 0; - break; - - default: - assert(0); /* impossible */ - RETURN_ERROR(GENERIC, "impossible to reach"); /* some compilers require default to do something */ - } } - - /* result */ - input->pos = (size_t)(ip - (const char*)(input->src)); - output->pos = (size_t)(op - (char*)(output->dst)); - - /* Update the expected output buffer for ZSTD_obm_stable. */ - zds->expectedOutBuffer = *output; - - if ((ip==istart) && (op==ostart)) { /* no forward progress */ - zds->noForwardProgress ++; - if (zds->noForwardProgress >= ZSTD_NO_FORWARD_PROGRESS_MAX) { - RETURN_ERROR_IF(op==oend, noForwardProgress_destFull, ""); - RETURN_ERROR_IF(ip==iend, noForwardProgress_inputEmpty, ""); - assert(0); - } - } else { - zds->noForwardProgress = 0; - } - { size_t nextSrcSizeHint = ZSTD_nextSrcSizeToDecompress(zds); - if (!nextSrcSizeHint) { /* frame fully decoded */ - if (zds->outEnd == zds->outStart) { /* output fully flushed */ - if (zds->hostageByte) { - if (input->pos >= input->size) { - /* can't release hostage (not present) */ - zds->streamStage = zdss_read; - return 1; - } - input->pos++; /* release hostage */ - } /* zds->hostageByte */ - return 0; - } /* zds->outEnd == zds->outStart */ - if (!zds->hostageByte) { /* output not fully flushed; keep last byte as hostage; will be released when all output is flushed */ - input->pos--; /* note : pos > 0, otherwise, impossible to finish reading last block */ - zds->hostageByte=1; - } - return 1; - } /* nextSrcSizeHint==0 */ - nextSrcSizeHint += ZSTD_blockHeaderSize * (ZSTD_nextInputType(zds) == ZSTDnit_block); /* preload header of next block */ - assert(zds->inPos <= nextSrcSizeHint); - nextSrcSizeHint -= zds->inPos; /* part already loaded*/ - return nextSrcSizeHint; - } -} - -size_t ZSTD_decompressStream_simpleArgs ( - ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, size_t* dstPos, - const void* src, size_t srcSize, size_t* srcPos) -{ - ZSTD_outBuffer output; - ZSTD_inBuffer input; - output.dst = dst; - output.size = dstCapacity; - output.pos = *dstPos; - input.src = src; - input.size = srcSize; - input.pos = *srcPos; - { size_t const cErr = ZSTD_decompressStream(dctx, &output, &input); - *dstPos = output.pos; - *srcPos = input.pos; - return cErr; - } -} diff --git a/third_party/zstd/lib/decompress/zstd_decompress_block.c b/third_party/zstd/lib/decompress/zstd_decompress_block.c deleted file mode 100644 index 862785a..0000000 --- a/third_party/zstd/lib/decompress/zstd_decompress_block.c +++ /dev/null @@ -1,2209 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* zstd_decompress_block : - * this module takes care of decompressing _compressed_ block */ - -/*-******************************************************* -* Dependencies -*********************************************************/ -#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ -#include "../common/compiler.h" /* prefetch */ -#include "../common/cpu.h" /* bmi2 */ -#include "../common/mem.h" /* low level memory routines */ -#define FSE_STATIC_LINKING_ONLY -#include "../common/fse.h" -#include "../common/huf.h" -#include "../common/zstd_internal.h" -#include "zstd_decompress_internal.h" /* ZSTD_DCtx */ -#include "zstd_ddict.h" /* ZSTD_DDictDictContent */ -#include "zstd_decompress_block.h" -#include "../common/bits.h" /* ZSTD_highbit32 */ - -/*_******************************************************* -* Macros -**********************************************************/ - -/* These two optional macros force the use one way or another of the two - * ZSTD_decompressSequences implementations. You can't force in both directions - * at the same time. - */ -#if defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ - defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) -#error "Cannot force the use of the short and the long ZSTD_decompressSequences variants!" -#endif - - -/*_******************************************************* -* Memory operations -**********************************************************/ -static void ZSTD_copy4(void* dst, const void* src) { ZSTD_memcpy(dst, src, 4); } - - -/*-************************************************************* - * Block decoding - ***************************************************************/ - -static size_t ZSTD_blockSizeMax(ZSTD_DCtx const* dctx) -{ - size_t const blockSizeMax = dctx->isFrameDecompression ? dctx->fParams.blockSizeMax : ZSTD_BLOCKSIZE_MAX; - assert(blockSizeMax <= ZSTD_BLOCKSIZE_MAX); - return blockSizeMax; -} - -/*! ZSTD_getcBlockSize() : - * Provides the size of compressed block from block header `src` */ -size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, - blockProperties_t* bpPtr) -{ - RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong, ""); - - { U32 const cBlockHeader = MEM_readLE24(src); - U32 const cSize = cBlockHeader >> 3; - bpPtr->lastBlock = cBlockHeader & 1; - bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3); - bpPtr->origSize = cSize; /* only useful for RLE */ - if (bpPtr->blockType == bt_rle) return 1; - RETURN_ERROR_IF(bpPtr->blockType == bt_reserved, corruption_detected, ""); - return cSize; - } -} - -/* Allocate buffer for literals, either overlapping current dst, or split between dst and litExtraBuffer, or stored entirely within litExtraBuffer */ -static void ZSTD_allocateLiteralsBuffer(ZSTD_DCtx* dctx, void* const dst, const size_t dstCapacity, const size_t litSize, - const streaming_operation streaming, const size_t expectedWriteSize, const unsigned splitImmediately) -{ - size_t const blockSizeMax = ZSTD_blockSizeMax(dctx); - assert(litSize <= blockSizeMax); - assert(dctx->isFrameDecompression || streaming == not_streaming); - assert(expectedWriteSize <= blockSizeMax); - if (streaming == not_streaming && dstCapacity > blockSizeMax + WILDCOPY_OVERLENGTH + litSize + WILDCOPY_OVERLENGTH) { - /* If we aren't streaming, we can just put the literals after the output - * of the current block. We don't need to worry about overwriting the - * extDict of our window, because it doesn't exist. - * So if we have space after the end of the block, just put it there. - */ - dctx->litBuffer = (BYTE*)dst + blockSizeMax + WILDCOPY_OVERLENGTH; - dctx->litBufferEnd = dctx->litBuffer + litSize; - dctx->litBufferLocation = ZSTD_in_dst; - } else if (litSize <= ZSTD_LITBUFFEREXTRASIZE) { - /* Literals fit entirely within the extra buffer, put them there to avoid - * having to split the literals. - */ - dctx->litBuffer = dctx->litExtraBuffer; - dctx->litBufferEnd = dctx->litBuffer + litSize; - dctx->litBufferLocation = ZSTD_not_in_dst; - } else { - assert(blockSizeMax > ZSTD_LITBUFFEREXTRASIZE); - /* Literals must be split between the output block and the extra lit - * buffer. We fill the extra lit buffer with the tail of the literals, - * and put the rest of the literals at the end of the block, with - * WILDCOPY_OVERLENGTH of buffer room to allow for overreads. - * This MUST not write more than our maxBlockSize beyond dst, because in - * streaming mode, that could overwrite part of our extDict window. - */ - if (splitImmediately) { - /* won't fit in litExtraBuffer, so it will be split between end of dst and extra buffer */ - dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize + ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH; - dctx->litBufferEnd = dctx->litBuffer + litSize - ZSTD_LITBUFFEREXTRASIZE; - } else { - /* initially this will be stored entirely in dst during huffman decoding, it will partially be shifted to litExtraBuffer after */ - dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize; - dctx->litBufferEnd = (BYTE*)dst + expectedWriteSize; - } - dctx->litBufferLocation = ZSTD_split; - assert(dctx->litBufferEnd <= (BYTE*)dst + expectedWriteSize); - } -} - -/*! ZSTD_decodeLiteralsBlock() : - * Where it is possible to do so without being stomped by the output during decompression, the literals block will be stored - * in the dstBuffer. If there is room to do so, it will be stored in full in the excess dst space after where the current - * block will be output. Otherwise it will be stored at the end of the current dst blockspace, with a small portion being - * stored in dctx->litExtraBuffer to help keep it "ahead" of the current output write. - * - * @return : nb of bytes read from src (< srcSize ) - * note : symbol not declared but exposed for fullbench */ -static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, - const void* src, size_t srcSize, /* note : srcSize < BLOCKSIZE */ - void* dst, size_t dstCapacity, const streaming_operation streaming) -{ - DEBUGLOG(5, "ZSTD_decodeLiteralsBlock"); - RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, ""); - - { const BYTE* const istart = (const BYTE*) src; - SymbolEncodingType_e const litEncType = (SymbolEncodingType_e)(istart[0] & 3); - size_t const blockSizeMax = ZSTD_blockSizeMax(dctx); - - switch(litEncType) - { - case set_repeat: - DEBUGLOG(5, "set_repeat flag : re-using stats from previous compressed literals block"); - RETURN_ERROR_IF(dctx->litEntropy==0, dictionary_corrupted, ""); - ZSTD_FALLTHROUGH; - - case set_compressed: - RETURN_ERROR_IF(srcSize < 5, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need up to 5 for case 3"); - { size_t lhSize, litSize, litCSize; - U32 singleStream=0; - U32 const lhlCode = (istart[0] >> 2) & 3; - U32 const lhc = MEM_readLE32(istart); - size_t hufSuccess; - size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); - int const flags = 0 - | (ZSTD_DCtx_get_bmi2(dctx) ? HUF_flags_bmi2 : 0) - | (dctx->disableHufAsm ? HUF_flags_disableAsm : 0); - switch(lhlCode) - { - case 0: case 1: default: /* note : default is impossible, since lhlCode into [0..3] */ - /* 2 - 2 - 10 - 10 */ - singleStream = !lhlCode; - lhSize = 3; - litSize = (lhc >> 4) & 0x3FF; - litCSize = (lhc >> 14) & 0x3FF; - break; - case 2: - /* 2 - 2 - 14 - 14 */ - lhSize = 4; - litSize = (lhc >> 4) & 0x3FFF; - litCSize = lhc >> 18; - break; - case 3: - /* 2 - 2 - 18 - 18 */ - lhSize = 5; - litSize = (lhc >> 4) & 0x3FFFF; - litCSize = (lhc >> 22) + ((size_t)istart[4] << 10); - break; - } - RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); - RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); - if (!singleStream) - RETURN_ERROR_IF(litSize < MIN_LITERALS_FOR_4_STREAMS, literals_headerWrong, - "Not enough literals (%zu) for the 4-streams mode (min %u)", - litSize, MIN_LITERALS_FOR_4_STREAMS); - RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected, ""); - RETURN_ERROR_IF(expectedWriteSize < litSize , dstSize_tooSmall, ""); - ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 0); - - /* prefetch huffman table if cold */ - if (dctx->ddictIsCold && (litSize > 768 /* heuristic */)) { - PREFETCH_AREA(dctx->HUFptr, sizeof(dctx->entropy.hufTable)); - } - - if (litEncType==set_repeat) { - if (singleStream) { - hufSuccess = HUF_decompress1X_usingDTable( - dctx->litBuffer, litSize, istart+lhSize, litCSize, - dctx->HUFptr, flags); - } else { - assert(litSize >= MIN_LITERALS_FOR_4_STREAMS); - hufSuccess = HUF_decompress4X_usingDTable( - dctx->litBuffer, litSize, istart+lhSize, litCSize, - dctx->HUFptr, flags); - } - } else { - if (singleStream) { -#if defined(HUF_FORCE_DECOMPRESS_X2) - hufSuccess = HUF_decompress1X_DCtx_wksp( - dctx->entropy.hufTable, dctx->litBuffer, litSize, - istart+lhSize, litCSize, dctx->workspace, - sizeof(dctx->workspace), flags); -#else - hufSuccess = HUF_decompress1X1_DCtx_wksp( - dctx->entropy.hufTable, dctx->litBuffer, litSize, - istart+lhSize, litCSize, dctx->workspace, - sizeof(dctx->workspace), flags); -#endif - } else { - hufSuccess = HUF_decompress4X_hufOnly_wksp( - dctx->entropy.hufTable, dctx->litBuffer, litSize, - istart+lhSize, litCSize, dctx->workspace, - sizeof(dctx->workspace), flags); - } - } - if (dctx->litBufferLocation == ZSTD_split) - { - assert(litSize > ZSTD_LITBUFFEREXTRASIZE); - ZSTD_memcpy(dctx->litExtraBuffer, dctx->litBufferEnd - ZSTD_LITBUFFEREXTRASIZE, ZSTD_LITBUFFEREXTRASIZE); - ZSTD_memmove(dctx->litBuffer + ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH, dctx->litBuffer, litSize - ZSTD_LITBUFFEREXTRASIZE); - dctx->litBuffer += ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH; - dctx->litBufferEnd -= WILDCOPY_OVERLENGTH; - assert(dctx->litBufferEnd <= (BYTE*)dst + blockSizeMax); - } - - RETURN_ERROR_IF(HUF_isError(hufSuccess), corruption_detected, ""); - - dctx->litPtr = dctx->litBuffer; - dctx->litSize = litSize; - dctx->litEntropy = 1; - if (litEncType==set_compressed) dctx->HUFptr = dctx->entropy.hufTable; - return litCSize + lhSize; - } - - case set_basic: - { size_t litSize, lhSize; - U32 const lhlCode = ((istart[0]) >> 2) & 3; - size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); - switch(lhlCode) - { - case 0: case 2: default: /* note : default is impossible, since lhlCode into [0..3] */ - lhSize = 1; - litSize = istart[0] >> 3; - break; - case 1: - lhSize = 2; - litSize = MEM_readLE16(istart) >> 4; - break; - case 3: - lhSize = 3; - RETURN_ERROR_IF(srcSize<3, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize = 3"); - litSize = MEM_readLE24(istart) >> 4; - break; - } - - RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); - RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); - RETURN_ERROR_IF(expectedWriteSize < litSize, dstSize_tooSmall, ""); - ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 1); - if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildcopy */ - RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected, ""); - if (dctx->litBufferLocation == ZSTD_split) - { - ZSTD_memcpy(dctx->litBuffer, istart + lhSize, litSize - ZSTD_LITBUFFEREXTRASIZE); - ZSTD_memcpy(dctx->litExtraBuffer, istart + lhSize + litSize - ZSTD_LITBUFFEREXTRASIZE, ZSTD_LITBUFFEREXTRASIZE); - } - else - { - ZSTD_memcpy(dctx->litBuffer, istart + lhSize, litSize); - } - dctx->litPtr = dctx->litBuffer; - dctx->litSize = litSize; - return lhSize+litSize; - } - /* direct reference into compressed stream */ - dctx->litPtr = istart+lhSize; - dctx->litSize = litSize; - dctx->litBufferEnd = dctx->litPtr + litSize; - dctx->litBufferLocation = ZSTD_not_in_dst; - return lhSize+litSize; - } - - case set_rle: - { U32 const lhlCode = ((istart[0]) >> 2) & 3; - size_t litSize, lhSize; - size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); - switch(lhlCode) - { - case 0: case 2: default: /* note : default is impossible, since lhlCode into [0..3] */ - lhSize = 1; - litSize = istart[0] >> 3; - break; - case 1: - lhSize = 2; - RETURN_ERROR_IF(srcSize<3, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize+1 = 3"); - litSize = MEM_readLE16(istart) >> 4; - break; - case 3: - lhSize = 3; - RETURN_ERROR_IF(srcSize<4, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize+1 = 4"); - litSize = MEM_readLE24(istart) >> 4; - break; - } - RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); - RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); - RETURN_ERROR_IF(expectedWriteSize < litSize, dstSize_tooSmall, ""); - ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 1); - if (dctx->litBufferLocation == ZSTD_split) - { - ZSTD_memset(dctx->litBuffer, istart[lhSize], litSize - ZSTD_LITBUFFEREXTRASIZE); - ZSTD_memset(dctx->litExtraBuffer, istart[lhSize], ZSTD_LITBUFFEREXTRASIZE); - } - else - { - ZSTD_memset(dctx->litBuffer, istart[lhSize], litSize); - } - dctx->litPtr = dctx->litBuffer; - dctx->litSize = litSize; - return lhSize+1; - } - default: - RETURN_ERROR(corruption_detected, "impossible"); - } - } -} - -/* Hidden declaration for fullbench */ -size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx, - const void* src, size_t srcSize, - void* dst, size_t dstCapacity); -size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx, - const void* src, size_t srcSize, - void* dst, size_t dstCapacity) -{ - dctx->isFrameDecompression = 0; - return ZSTD_decodeLiteralsBlock(dctx, src, srcSize, dst, dstCapacity, not_streaming); -} - -/* Default FSE distribution tables. - * These are pre-calculated FSE decoding tables using default distributions as defined in specification : - * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#default-distributions - * They were generated programmatically with following method : - * - start from default distributions, present in /lib/common/zstd_internal.h - * - generate tables normally, using ZSTD_buildFSETable() - * - printout the content of tables - * - prettify output, report below, test with fuzzer to ensure it's correct */ - -/* Default FSE distribution table for Literal Lengths */ -static const ZSTD_seqSymbol LL_defaultDTable[(1<tableLog = 0; - DTableH->fastMode = 0; - - cell->nbBits = 0; - cell->nextState = 0; - assert(nbAddBits < 255); - cell->nbAdditionalBits = nbAddBits; - cell->baseValue = baseValue; -} - - -/* ZSTD_buildFSETable() : - * generate FSE decoding table for one symbol (ll, ml or off) - * cannot fail if input is valid => - * all inputs are presumed validated at this stage */ -FORCE_INLINE_TEMPLATE -void ZSTD_buildFSETable_body(ZSTD_seqSymbol* dt, - const short* normalizedCounter, unsigned maxSymbolValue, - const U32* baseValue, const U8* nbAdditionalBits, - unsigned tableLog, void* wksp, size_t wkspSize) -{ - ZSTD_seqSymbol* const tableDecode = dt+1; - U32 const maxSV1 = maxSymbolValue + 1; - U32 const tableSize = 1 << tableLog; - - U16* symbolNext = (U16*)wksp; - BYTE* spread = (BYTE*)(symbolNext + MaxSeq + 1); - U32 highThreshold = tableSize - 1; - - - /* Sanity Checks */ - assert(maxSymbolValue <= MaxSeq); - assert(tableLog <= MaxFSELog); - assert(wkspSize >= ZSTD_BUILD_FSE_TABLE_WKSP_SIZE); - (void)wkspSize; - /* Init, lay down lowprob symbols */ - { ZSTD_seqSymbol_header DTableH; - DTableH.tableLog = tableLog; - DTableH.fastMode = 1; - { S16 const largeLimit= (S16)(1 << (tableLog-1)); - U32 s; - for (s=0; s= largeLimit) DTableH.fastMode=0; - assert(normalizedCounter[s]>=0); - symbolNext[s] = (U16)normalizedCounter[s]; - } } } - ZSTD_memcpy(dt, &DTableH, sizeof(DTableH)); - } - - /* Spread symbols */ - assert(tableSize <= 512); - /* Specialized symbol spreading for the case when there are - * no low probability (-1 count) symbols. When compressing - * small blocks we avoid low probability symbols to hit this - * case, since header decoding speed matters more. - */ - if (highThreshold == tableSize - 1) { - size_t const tableMask = tableSize-1; - size_t const step = FSE_TABLESTEP(tableSize); - /* First lay down the symbols in order. - * We use a uint64_t to lay down 8 bytes at a time. This reduces branch - * misses since small blocks generally have small table logs, so nearly - * all symbols have counts <= 8. We ensure we have 8 bytes at the end of - * our buffer to handle the over-write. - */ - { - U64 const add = 0x0101010101010101ull; - size_t pos = 0; - U64 sv = 0; - U32 s; - for (s=0; s=0); - pos += (size_t)n; - } - } - /* Now we spread those positions across the table. - * The benefit of doing it in two stages is that we avoid the - * variable size inner loop, which caused lots of branch misses. - * Now we can run through all the positions without any branch misses. - * We unroll the loop twice, since that is what empirically worked best. - */ - { - size_t position = 0; - size_t s; - size_t const unroll = 2; - assert(tableSize % unroll == 0); /* FSE_MIN_TABLELOG is 5 */ - for (s = 0; s < (size_t)tableSize; s += unroll) { - size_t u; - for (u = 0; u < unroll; ++u) { - size_t const uPosition = (position + (u * step)) & tableMask; - tableDecode[uPosition].baseValue = spread[s + u]; - } - position = (position + (unroll * step)) & tableMask; - } - assert(position == 0); - } - } else { - U32 const tableMask = tableSize-1; - U32 const step = FSE_TABLESTEP(tableSize); - U32 s, position = 0; - for (s=0; s highThreshold)) position = (position + step) & tableMask; /* lowprob area */ - } } - assert(position == 0); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ - } - - /* Build Decoding table */ - { - U32 u; - for (u=0; u max, corruption_detected, ""); - { U32 const symbol = *(const BYTE*)src; - U32 const baseline = baseValue[symbol]; - U8 const nbBits = nbAdditionalBits[symbol]; - ZSTD_buildSeqTable_rle(DTableSpace, baseline, nbBits); - } - *DTablePtr = DTableSpace; - return 1; - case set_basic : - *DTablePtr = defaultTable; - return 0; - case set_repeat: - RETURN_ERROR_IF(!flagRepeatTable, corruption_detected, ""); - /* prefetch FSE table if used */ - if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { - const void* const pStart = *DTablePtr; - size_t const pSize = sizeof(ZSTD_seqSymbol) * (SEQSYMBOL_TABLE_SIZE(maxLog)); - PREFETCH_AREA(pStart, pSize); - } - return 0; - case set_compressed : - { unsigned tableLog; - S16 norm[MaxSeq+1]; - size_t const headerSize = FSE_readNCount(norm, &max, &tableLog, src, srcSize); - RETURN_ERROR_IF(FSE_isError(headerSize), corruption_detected, ""); - RETURN_ERROR_IF(tableLog > maxLog, corruption_detected, ""); - ZSTD_buildFSETable(DTableSpace, norm, max, baseValue, nbAdditionalBits, tableLog, wksp, wkspSize, bmi2); - *DTablePtr = DTableSpace; - return headerSize; - } - default : - assert(0); - RETURN_ERROR(GENERIC, "impossible"); - } -} - -size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, - const void* src, size_t srcSize) -{ - const BYTE* const istart = (const BYTE*)src; - const BYTE* const iend = istart + srcSize; - const BYTE* ip = istart; - int nbSeq; - DEBUGLOG(5, "ZSTD_decodeSeqHeaders"); - - /* check */ - RETURN_ERROR_IF(srcSize < MIN_SEQUENCES_SIZE, srcSize_wrong, ""); - - /* SeqHead */ - nbSeq = *ip++; - if (nbSeq > 0x7F) { - if (nbSeq == 0xFF) { - RETURN_ERROR_IF(ip+2 > iend, srcSize_wrong, ""); - nbSeq = MEM_readLE16(ip) + LONGNBSEQ; - ip+=2; - } else { - RETURN_ERROR_IF(ip >= iend, srcSize_wrong, ""); - nbSeq = ((nbSeq-0x80)<<8) + *ip++; - } - } - *nbSeqPtr = nbSeq; - - if (nbSeq == 0) { - /* No sequence : section ends immediately */ - RETURN_ERROR_IF(ip != iend, corruption_detected, - "extraneous data present in the Sequences section"); - return (size_t)(ip - istart); - } - - /* FSE table descriptors */ - RETURN_ERROR_IF(ip+1 > iend, srcSize_wrong, ""); /* minimum possible size: 1 byte for symbol encoding types */ - RETURN_ERROR_IF(*ip & 3, corruption_detected, ""); /* The last field, Reserved, must be all-zeroes. */ - { SymbolEncodingType_e const LLtype = (SymbolEncodingType_e)(*ip >> 6); - SymbolEncodingType_e const OFtype = (SymbolEncodingType_e)((*ip >> 4) & 3); - SymbolEncodingType_e const MLtype = (SymbolEncodingType_e)((*ip >> 2) & 3); - ip++; - - /* Build DTables */ - { size_t const llhSize = ZSTD_buildSeqTable(dctx->entropy.LLTable, &dctx->LLTptr, - LLtype, MaxLL, LLFSELog, - ip, iend-ip, - LL_base, LL_bits, - LL_defaultDTable, dctx->fseEntropy, - dctx->ddictIsCold, nbSeq, - dctx->workspace, sizeof(dctx->workspace), - ZSTD_DCtx_get_bmi2(dctx)); - RETURN_ERROR_IF(ZSTD_isError(llhSize), corruption_detected, "ZSTD_buildSeqTable failed"); - ip += llhSize; - } - - { size_t const ofhSize = ZSTD_buildSeqTable(dctx->entropy.OFTable, &dctx->OFTptr, - OFtype, MaxOff, OffFSELog, - ip, iend-ip, - OF_base, OF_bits, - OF_defaultDTable, dctx->fseEntropy, - dctx->ddictIsCold, nbSeq, - dctx->workspace, sizeof(dctx->workspace), - ZSTD_DCtx_get_bmi2(dctx)); - RETURN_ERROR_IF(ZSTD_isError(ofhSize), corruption_detected, "ZSTD_buildSeqTable failed"); - ip += ofhSize; - } - - { size_t const mlhSize = ZSTD_buildSeqTable(dctx->entropy.MLTable, &dctx->MLTptr, - MLtype, MaxML, MLFSELog, - ip, iend-ip, - ML_base, ML_bits, - ML_defaultDTable, dctx->fseEntropy, - dctx->ddictIsCold, nbSeq, - dctx->workspace, sizeof(dctx->workspace), - ZSTD_DCtx_get_bmi2(dctx)); - RETURN_ERROR_IF(ZSTD_isError(mlhSize), corruption_detected, "ZSTD_buildSeqTable failed"); - ip += mlhSize; - } - } - - return ip-istart; -} - - -typedef struct { - size_t litLength; - size_t matchLength; - size_t offset; -} seq_t; - -typedef struct { - size_t state; - const ZSTD_seqSymbol* table; -} ZSTD_fseState; - -typedef struct { - BIT_DStream_t DStream; - ZSTD_fseState stateLL; - ZSTD_fseState stateOffb; - ZSTD_fseState stateML; - size_t prevOffset[ZSTD_REP_NUM]; -} seqState_t; - -/*! ZSTD_overlapCopy8() : - * Copies 8 bytes from ip to op and updates op and ip where ip <= op. - * If the offset is < 8 then the offset is spread to at least 8 bytes. - * - * Precondition: *ip <= *op - * Postcondition: *op - *op >= 8 - */ -HINT_INLINE void ZSTD_overlapCopy8(BYTE** op, BYTE const** ip, size_t offset) { - assert(*ip <= *op); - if (offset < 8) { - /* close range match, overlap */ - static const U32 dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 }; /* added */ - static const int dec64table[] = { 8, 8, 8, 7, 8, 9,10,11 }; /* subtracted */ - int const sub2 = dec64table[offset]; - (*op)[0] = (*ip)[0]; - (*op)[1] = (*ip)[1]; - (*op)[2] = (*ip)[2]; - (*op)[3] = (*ip)[3]; - *ip += dec32table[offset]; - ZSTD_copy4(*op+4, *ip); - *ip -= sub2; - } else { - ZSTD_copy8(*op, *ip); - } - *ip += 8; - *op += 8; - assert(*op - *ip >= 8); -} - -/*! ZSTD_safecopy() : - * Specialized version of memcpy() that is allowed to READ up to WILDCOPY_OVERLENGTH past the input buffer - * and write up to 16 bytes past oend_w (op >= oend_w is allowed). - * This function is only called in the uncommon case where the sequence is near the end of the block. It - * should be fast for a single long sequence, but can be slow for several short sequences. - * - * @param ovtype controls the overlap detection - * - ZSTD_no_overlap: The source and destination are guaranteed to be at least WILDCOPY_VECLEN bytes apart. - * - ZSTD_overlap_src_before_dst: The src and dst may overlap and may be any distance apart. - * The src buffer must be before the dst buffer. - */ -static void ZSTD_safecopy(BYTE* op, const BYTE* const oend_w, BYTE const* ip, ptrdiff_t length, ZSTD_overlap_e ovtype) { - ptrdiff_t const diff = op - ip; - BYTE* const oend = op + length; - - assert((ovtype == ZSTD_no_overlap && (diff <= -8 || diff >= 8 || op >= oend_w)) || - (ovtype == ZSTD_overlap_src_before_dst && diff >= 0)); - - if (length < 8) { - /* Handle short lengths. */ - while (op < oend) *op++ = *ip++; - return; - } - if (ovtype == ZSTD_overlap_src_before_dst) { - /* Copy 8 bytes and ensure the offset >= 8 when there can be overlap. */ - assert(length >= 8); - ZSTD_overlapCopy8(&op, &ip, diff); - length -= 8; - assert(op - ip >= 8); - assert(op <= oend); - } - - if (oend <= oend_w) { - /* No risk of overwrite. */ - ZSTD_wildcopy(op, ip, length, ovtype); - return; - } - if (op <= oend_w) { - /* Wildcopy until we get close to the end. */ - assert(oend > oend_w); - ZSTD_wildcopy(op, ip, oend_w - op, ovtype); - ip += oend_w - op; - op += oend_w - op; - } - /* Handle the leftovers. */ - while (op < oend) *op++ = *ip++; -} - -/* ZSTD_safecopyDstBeforeSrc(): - * This version allows overlap with dst before src, or handles the non-overlap case with dst after src - * Kept separate from more common ZSTD_safecopy case to avoid performance impact to the safecopy common case */ -static void ZSTD_safecopyDstBeforeSrc(BYTE* op, const BYTE* ip, ptrdiff_t length) { - ptrdiff_t const diff = op - ip; - BYTE* const oend = op + length; - - if (length < 8 || diff > -8) { - /* Handle short lengths, close overlaps, and dst not before src. */ - while (op < oend) *op++ = *ip++; - return; - } - - if (op <= oend - WILDCOPY_OVERLENGTH && diff < -WILDCOPY_VECLEN) { - ZSTD_wildcopy(op, ip, oend - WILDCOPY_OVERLENGTH - op, ZSTD_no_overlap); - ip += oend - WILDCOPY_OVERLENGTH - op; - op += oend - WILDCOPY_OVERLENGTH - op; - } - - /* Handle the leftovers. */ - while (op < oend) *op++ = *ip++; -} - -/* ZSTD_execSequenceEnd(): - * This version handles cases that are near the end of the output buffer. It requires - * more careful checks to make sure there is no overflow. By separating out these hard - * and unlikely cases, we can speed up the common cases. - * - * NOTE: This function needs to be fast for a single long sequence, but doesn't need - * to be optimized for many small sequences, since those fall into ZSTD_execSequence(). - */ -FORCE_NOINLINE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_execSequenceEnd(BYTE* op, - BYTE* const oend, seq_t sequence, - const BYTE** litPtr, const BYTE* const litLimit, - const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) -{ - BYTE* const oLitEnd = op + sequence.litLength; - size_t const sequenceLength = sequence.litLength + sequence.matchLength; - const BYTE* const iLitEnd = *litPtr + sequence.litLength; - const BYTE* match = oLitEnd - sequence.offset; - BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; - - /* bounds checks : careful of address space overflow in 32-bit mode */ - RETURN_ERROR_IF(sequenceLength > (size_t)(oend - op), dstSize_tooSmall, "last match must fit within dstBuffer"); - RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); - assert(op < op + sequenceLength); - assert(oLitEnd < op + sequenceLength); - - /* copy literals */ - ZSTD_safecopy(op, oend_w, *litPtr, sequence.litLength, ZSTD_no_overlap); - op = oLitEnd; - *litPtr = iLitEnd; - - /* copy Match */ - if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { - /* offset beyond prefix */ - RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, ""); - match = dictEnd - (prefixStart - match); - if (match + sequence.matchLength <= dictEnd) { - ZSTD_memmove(oLitEnd, match, sequence.matchLength); - return sequenceLength; - } - /* span extDict & currentPrefixSegment */ - { size_t const length1 = dictEnd - match; - ZSTD_memmove(oLitEnd, match, length1); - op = oLitEnd + length1; - sequence.matchLength -= length1; - match = prefixStart; - } - } - ZSTD_safecopy(op, oend_w, match, sequence.matchLength, ZSTD_overlap_src_before_dst); - return sequenceLength; -} - -/* ZSTD_execSequenceEndSplitLitBuffer(): - * This version is intended to be used during instances where the litBuffer is still split. It is kept separate to avoid performance impact for the good case. - */ -FORCE_NOINLINE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_execSequenceEndSplitLitBuffer(BYTE* op, - BYTE* const oend, const BYTE* const oend_w, seq_t sequence, - const BYTE** litPtr, const BYTE* const litLimit, - const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) -{ - BYTE* const oLitEnd = op + sequence.litLength; - size_t const sequenceLength = sequence.litLength + sequence.matchLength; - const BYTE* const iLitEnd = *litPtr + sequence.litLength; - const BYTE* match = oLitEnd - sequence.offset; - - - /* bounds checks : careful of address space overflow in 32-bit mode */ - RETURN_ERROR_IF(sequenceLength > (size_t)(oend - op), dstSize_tooSmall, "last match must fit within dstBuffer"); - RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); - assert(op < op + sequenceLength); - assert(oLitEnd < op + sequenceLength); - - /* copy literals */ - RETURN_ERROR_IF(op > *litPtr && op < *litPtr + sequence.litLength, dstSize_tooSmall, "output should not catch up to and overwrite literal buffer"); - ZSTD_safecopyDstBeforeSrc(op, *litPtr, sequence.litLength); - op = oLitEnd; - *litPtr = iLitEnd; - - /* copy Match */ - if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { - /* offset beyond prefix */ - RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, ""); - match = dictEnd - (prefixStart - match); - if (match + sequence.matchLength <= dictEnd) { - ZSTD_memmove(oLitEnd, match, sequence.matchLength); - return sequenceLength; - } - /* span extDict & currentPrefixSegment */ - { size_t const length1 = dictEnd - match; - ZSTD_memmove(oLitEnd, match, length1); - op = oLitEnd + length1; - sequence.matchLength -= length1; - match = prefixStart; - } - } - ZSTD_safecopy(op, oend_w, match, sequence.matchLength, ZSTD_overlap_src_before_dst); - return sequenceLength; -} - -HINT_INLINE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_execSequence(BYTE* op, - BYTE* const oend, seq_t sequence, - const BYTE** litPtr, const BYTE* const litLimit, - const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) -{ - BYTE* const oLitEnd = op + sequence.litLength; - size_t const sequenceLength = sequence.litLength + sequence.matchLength; - BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ - BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; /* risk : address space underflow on oend=NULL */ - const BYTE* const iLitEnd = *litPtr + sequence.litLength; - const BYTE* match = oLitEnd - sequence.offset; - - assert(op != NULL /* Precondition */); - assert(oend_w < oend /* No underflow */); - -#if defined(__aarch64__) - /* prefetch sequence starting from match that will be used for copy later */ - PREFETCH_L1(match); -#endif - /* Handle edge cases in a slow path: - * - Read beyond end of literals - * - Match end is within WILDCOPY_OVERLIMIT of oend - * - 32-bit mode and the match length overflows - */ - if (UNLIKELY( - iLitEnd > litLimit || - oMatchEnd > oend_w || - (MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) - return ZSTD_execSequenceEnd(op, oend, sequence, litPtr, litLimit, prefixStart, virtualStart, dictEnd); - - /* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */ - assert(op <= oLitEnd /* No overflow */); - assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */); - assert(oMatchEnd <= oend /* No underflow */); - assert(iLitEnd <= litLimit /* Literal length is in bounds */); - assert(oLitEnd <= oend_w /* Can wildcopy literals */); - assert(oMatchEnd <= oend_w /* Can wildcopy matches */); - - /* Copy Literals: - * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. - * We likely don't need the full 32-byte wildcopy. - */ - assert(WILDCOPY_OVERLENGTH >= 16); - ZSTD_copy16(op, (*litPtr)); - if (UNLIKELY(sequence.litLength > 16)) { - ZSTD_wildcopy(op + 16, (*litPtr) + 16, sequence.litLength - 16, ZSTD_no_overlap); - } - op = oLitEnd; - *litPtr = iLitEnd; /* update for next sequence */ - - /* Copy Match */ - if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { - /* offset beyond prefix -> go into extDict */ - RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); - match = dictEnd + (match - prefixStart); - if (match + sequence.matchLength <= dictEnd) { - ZSTD_memmove(oLitEnd, match, sequence.matchLength); - return sequenceLength; - } - /* span extDict & currentPrefixSegment */ - { size_t const length1 = dictEnd - match; - ZSTD_memmove(oLitEnd, match, length1); - op = oLitEnd + length1; - sequence.matchLength -= length1; - match = prefixStart; - } - } - /* Match within prefix of 1 or more bytes */ - assert(op <= oMatchEnd); - assert(oMatchEnd <= oend_w); - assert(match >= prefixStart); - assert(sequence.matchLength >= 1); - - /* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy - * without overlap checking. - */ - if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { - /* We bet on a full wildcopy for matches, since we expect matches to be - * longer than literals (in general). In silesia, ~10% of matches are longer - * than 16 bytes. - */ - ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength, ZSTD_no_overlap); - return sequenceLength; - } - assert(sequence.offset < WILDCOPY_VECLEN); - - /* Copy 8 bytes and spread the offset to be >= 8. */ - ZSTD_overlapCopy8(&op, &match, sequence.offset); - - /* If the match length is > 8 bytes, then continue with the wildcopy. */ - if (sequence.matchLength > 8) { - assert(op < oMatchEnd); - ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength - 8, ZSTD_overlap_src_before_dst); - } - return sequenceLength; -} - -HINT_INLINE -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -size_t ZSTD_execSequenceSplitLitBuffer(BYTE* op, - BYTE* const oend, const BYTE* const oend_w, seq_t sequence, - const BYTE** litPtr, const BYTE* const litLimit, - const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) -{ - BYTE* const oLitEnd = op + sequence.litLength; - size_t const sequenceLength = sequence.litLength + sequence.matchLength; - BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ - const BYTE* const iLitEnd = *litPtr + sequence.litLength; - const BYTE* match = oLitEnd - sequence.offset; - - assert(op != NULL /* Precondition */); - assert(oend_w < oend /* No underflow */); - /* Handle edge cases in a slow path: - * - Read beyond end of literals - * - Match end is within WILDCOPY_OVERLIMIT of oend - * - 32-bit mode and the match length overflows - */ - if (UNLIKELY( - iLitEnd > litLimit || - oMatchEnd > oend_w || - (MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) - return ZSTD_execSequenceEndSplitLitBuffer(op, oend, oend_w, sequence, litPtr, litLimit, prefixStart, virtualStart, dictEnd); - - /* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */ - assert(op <= oLitEnd /* No overflow */); - assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */); - assert(oMatchEnd <= oend /* No underflow */); - assert(iLitEnd <= litLimit /* Literal length is in bounds */); - assert(oLitEnd <= oend_w /* Can wildcopy literals */); - assert(oMatchEnd <= oend_w /* Can wildcopy matches */); - - /* Copy Literals: - * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. - * We likely don't need the full 32-byte wildcopy. - */ - assert(WILDCOPY_OVERLENGTH >= 16); - ZSTD_copy16(op, (*litPtr)); - if (UNLIKELY(sequence.litLength > 16)) { - ZSTD_wildcopy(op+16, (*litPtr)+16, sequence.litLength-16, ZSTD_no_overlap); - } - op = oLitEnd; - *litPtr = iLitEnd; /* update for next sequence */ - - /* Copy Match */ - if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { - /* offset beyond prefix -> go into extDict */ - RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); - match = dictEnd + (match - prefixStart); - if (match + sequence.matchLength <= dictEnd) { - ZSTD_memmove(oLitEnd, match, sequence.matchLength); - return sequenceLength; - } - /* span extDict & currentPrefixSegment */ - { size_t const length1 = dictEnd - match; - ZSTD_memmove(oLitEnd, match, length1); - op = oLitEnd + length1; - sequence.matchLength -= length1; - match = prefixStart; - } } - /* Match within prefix of 1 or more bytes */ - assert(op <= oMatchEnd); - assert(oMatchEnd <= oend_w); - assert(match >= prefixStart); - assert(sequence.matchLength >= 1); - - /* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy - * without overlap checking. - */ - if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { - /* We bet on a full wildcopy for matches, since we expect matches to be - * longer than literals (in general). In silesia, ~10% of matches are longer - * than 16 bytes. - */ - ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength, ZSTD_no_overlap); - return sequenceLength; - } - assert(sequence.offset < WILDCOPY_VECLEN); - - /* Copy 8 bytes and spread the offset to be >= 8. */ - ZSTD_overlapCopy8(&op, &match, sequence.offset); - - /* If the match length is > 8 bytes, then continue with the wildcopy. */ - if (sequence.matchLength > 8) { - assert(op < oMatchEnd); - ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength-8, ZSTD_overlap_src_before_dst); - } - return sequenceLength; -} - - -static void -ZSTD_initFseState(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, const ZSTD_seqSymbol* dt) -{ - const void* ptr = dt; - const ZSTD_seqSymbol_header* const DTableH = (const ZSTD_seqSymbol_header*)ptr; - DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog); - DEBUGLOG(6, "ZSTD_initFseState : val=%u using %u bits", - (U32)DStatePtr->state, DTableH->tableLog); - BIT_reloadDStream(bitD); - DStatePtr->table = dt + 1; -} - -FORCE_INLINE_TEMPLATE void -ZSTD_updateFseStateWithDInfo(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, U16 nextState, U32 nbBits) -{ - size_t const lowBits = BIT_readBits(bitD, nbBits); - DStatePtr->state = nextState + lowBits; -} - -/* We need to add at most (ZSTD_WINDOWLOG_MAX_32 - 1) bits to read the maximum - * offset bits. But we can only read at most STREAM_ACCUMULATOR_MIN_32 - * bits before reloading. This value is the maximum number of bytes we read - * after reloading when we are decoding long offsets. - */ -#define LONG_OFFSETS_MAX_EXTRA_BITS_32 \ - (ZSTD_WINDOWLOG_MAX_32 > STREAM_ACCUMULATOR_MIN_32 \ - ? ZSTD_WINDOWLOG_MAX_32 - STREAM_ACCUMULATOR_MIN_32 \ - : 0) - -typedef enum { ZSTD_lo_isRegularOffset, ZSTD_lo_isLongOffset=1 } ZSTD_longOffset_e; - -/** - * ZSTD_decodeSequence(): - * @p longOffsets : tells the decoder to reload more bit while decoding large offsets - * only used in 32-bit mode - * @return : Sequence (litL + matchL + offset) - */ -FORCE_INLINE_TEMPLATE seq_t -ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets, const int isLastSeq) -{ - seq_t seq; - /* - * ZSTD_seqSymbol is a 64 bits wide structure. - * It can be loaded in one operation - * and its fields extracted by simply shifting or bit-extracting on aarch64. - * GCC doesn't recognize this and generates more unnecessary ldr/ldrb/ldrh - * operations that cause performance drop. This can be avoided by using this - * ZSTD_memcpy hack. - */ -#if defined(__aarch64__) && (defined(__GNUC__) && !defined(__clang__)) - ZSTD_seqSymbol llDInfoS, mlDInfoS, ofDInfoS; - ZSTD_seqSymbol* const llDInfo = &llDInfoS; - ZSTD_seqSymbol* const mlDInfo = &mlDInfoS; - ZSTD_seqSymbol* const ofDInfo = &ofDInfoS; - ZSTD_memcpy(llDInfo, seqState->stateLL.table + seqState->stateLL.state, sizeof(ZSTD_seqSymbol)); - ZSTD_memcpy(mlDInfo, seqState->stateML.table + seqState->stateML.state, sizeof(ZSTD_seqSymbol)); - ZSTD_memcpy(ofDInfo, seqState->stateOffb.table + seqState->stateOffb.state, sizeof(ZSTD_seqSymbol)); -#else - const ZSTD_seqSymbol* const llDInfo = seqState->stateLL.table + seqState->stateLL.state; - const ZSTD_seqSymbol* const mlDInfo = seqState->stateML.table + seqState->stateML.state; - const ZSTD_seqSymbol* const ofDInfo = seqState->stateOffb.table + seqState->stateOffb.state; -#endif - seq.matchLength = mlDInfo->baseValue; - seq.litLength = llDInfo->baseValue; - { U32 const ofBase = ofDInfo->baseValue; - BYTE const llBits = llDInfo->nbAdditionalBits; - BYTE const mlBits = mlDInfo->nbAdditionalBits; - BYTE const ofBits = ofDInfo->nbAdditionalBits; - BYTE const totalBits = llBits+mlBits+ofBits; - - U16 const llNext = llDInfo->nextState; - U16 const mlNext = mlDInfo->nextState; - U16 const ofNext = ofDInfo->nextState; - U32 const llnbBits = llDInfo->nbBits; - U32 const mlnbBits = mlDInfo->nbBits; - U32 const ofnbBits = ofDInfo->nbBits; - - assert(llBits <= MaxLLBits); - assert(mlBits <= MaxMLBits); - assert(ofBits <= MaxOff); - /* - * As gcc has better branch and block analyzers, sometimes it is only - * valuable to mark likeliness for clang, it gives around 3-4% of - * performance. - */ - - /* sequence */ - { size_t offset; - if (ofBits > 1) { - ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1); - ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5); - ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 > LONG_OFFSETS_MAX_EXTRA_BITS_32); - ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 - LONG_OFFSETS_MAX_EXTRA_BITS_32 >= MaxMLBits); - if (MEM_32bits() && longOffsets && (ofBits >= STREAM_ACCUMULATOR_MIN_32)) { - /* Always read extra bits, this keeps the logic simple, - * avoids branches, and avoids accidentally reading 0 bits. - */ - U32 const extraBits = LONG_OFFSETS_MAX_EXTRA_BITS_32; - offset = ofBase + (BIT_readBitsFast(&seqState->DStream, ofBits - extraBits) << extraBits); - BIT_reloadDStream(&seqState->DStream); - offset += BIT_readBitsFast(&seqState->DStream, extraBits); - } else { - offset = ofBase + BIT_readBitsFast(&seqState->DStream, ofBits/*>0*/); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */ - if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); - } - seqState->prevOffset[2] = seqState->prevOffset[1]; - seqState->prevOffset[1] = seqState->prevOffset[0]; - seqState->prevOffset[0] = offset; - } else { - U32 const ll0 = (llDInfo->baseValue == 0); - if (LIKELY((ofBits == 0))) { - offset = seqState->prevOffset[ll0]; - seqState->prevOffset[1] = seqState->prevOffset[!ll0]; - seqState->prevOffset[0] = offset; - } else { - offset = ofBase + ll0 + BIT_readBitsFast(&seqState->DStream, 1); - { size_t temp = (offset==3) ? seqState->prevOffset[0] - 1 : seqState->prevOffset[offset]; - temp -= !temp; /* 0 is not valid: input corrupted => force offset to -1 => corruption detected at execSequence */ - if (offset != 1) seqState->prevOffset[2] = seqState->prevOffset[1]; - seqState->prevOffset[1] = seqState->prevOffset[0]; - seqState->prevOffset[0] = offset = temp; - } } } - seq.offset = offset; - } - - if (mlBits > 0) - seq.matchLength += BIT_readBitsFast(&seqState->DStream, mlBits/*>0*/); - - if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32)) - BIT_reloadDStream(&seqState->DStream); - if (MEM_64bits() && UNLIKELY(totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog))) - BIT_reloadDStream(&seqState->DStream); - /* Ensure there are enough bits to read the rest of data in 64-bit mode. */ - ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64); - - if (llBits > 0) - seq.litLength += BIT_readBitsFast(&seqState->DStream, llBits/*>0*/); - - if (MEM_32bits()) - BIT_reloadDStream(&seqState->DStream); - - DEBUGLOG(6, "seq: litL=%u, matchL=%u, offset=%u", - (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); - - if (!isLastSeq) { - /* don't update FSE state for last Sequence */ - ZSTD_updateFseStateWithDInfo(&seqState->stateLL, &seqState->DStream, llNext, llnbBits); /* <= 9 bits */ - ZSTD_updateFseStateWithDInfo(&seqState->stateML, &seqState->DStream, mlNext, mlnbBits); /* <= 9 bits */ - if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ - ZSTD_updateFseStateWithDInfo(&seqState->stateOffb, &seqState->DStream, ofNext, ofnbBits); /* <= 8 bits */ - BIT_reloadDStream(&seqState->DStream); - } - } - - return seq; -} - -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) -#if DEBUGLEVEL >= 1 -static int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefixStart, BYTE const* oLitEnd) -{ - size_t const windowSize = dctx->fParams.windowSize; - /* No dictionary used. */ - if (dctx->dictContentEndForFuzzing == NULL) return 0; - /* Dictionary is our prefix. */ - if (prefixStart == dctx->dictContentBeginForFuzzing) return 1; - /* Dictionary is not our ext-dict. */ - if (dctx->dictEnd != dctx->dictContentEndForFuzzing) return 0; - /* Dictionary is not within our window size. */ - if ((size_t)(oLitEnd - prefixStart) >= windowSize) return 0; - /* Dictionary is active. */ - return 1; -} -#endif - -static void ZSTD_assertValidSequence( - ZSTD_DCtx const* dctx, - BYTE const* op, BYTE const* oend, - seq_t const seq, - BYTE const* prefixStart, BYTE const* virtualStart) -{ -#if DEBUGLEVEL >= 1 - if (dctx->isFrameDecompression) { - size_t const windowSize = dctx->fParams.windowSize; - size_t const sequenceSize = seq.litLength + seq.matchLength; - BYTE const* const oLitEnd = op + seq.litLength; - DEBUGLOG(6, "Checking sequence: litL=%u matchL=%u offset=%u", - (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); - assert(op <= oend); - assert((size_t)(oend - op) >= sequenceSize); - assert(sequenceSize <= ZSTD_blockSizeMax(dctx)); - if (ZSTD_dictionaryIsActive(dctx, prefixStart, oLitEnd)) { - size_t const dictSize = (size_t)((char const*)dctx->dictContentEndForFuzzing - (char const*)dctx->dictContentBeginForFuzzing); - /* Offset must be within the dictionary. */ - assert(seq.offset <= (size_t)(oLitEnd - virtualStart)); - assert(seq.offset <= windowSize + dictSize); - } else { - /* Offset must be within our window. */ - assert(seq.offset <= windowSize); - } - } -#else - (void)dctx, (void)op, (void)oend, (void)seq, (void)prefixStart, (void)virtualStart; -#endif -} -#endif - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG - - -FORCE_INLINE_TEMPLATE size_t -DONT_VECTORIZE -ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - const BYTE* ip = (const BYTE*)seqStart; - const BYTE* const iend = ip + seqSize; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = ZSTD_maybeNullPtrAdd(ostart, maxDstSize); - BYTE* op = ostart; - const BYTE* litPtr = dctx->litPtr; - const BYTE* litBufferEnd = dctx->litBufferEnd; - const BYTE* const prefixStart = (const BYTE*) (dctx->prefixStart); - const BYTE* const vBase = (const BYTE*) (dctx->virtualStart); - const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); - DEBUGLOG(5, "ZSTD_decompressSequences_bodySplitLitBuffer (%i seqs)", nbSeq); - - /* Literals are split between internal buffer & output buffer */ - if (nbSeq) { - seqState_t seqState; - dctx->fseEntropy = 1; - { U32 i; for (i=0; ientropy.rep[i]; } - RETURN_ERROR_IF( - ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), - corruption_detected, ""); - ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); - ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); - ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); - assert(dst != NULL); - - ZSTD_STATIC_ASSERT( - BIT_DStream_unfinished < BIT_DStream_completed && - BIT_DStream_endOfBuffer < BIT_DStream_completed && - BIT_DStream_completed < BIT_DStream_overflow); - - /* decompress without overrunning litPtr begins */ - { seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one iteration) */ - /* Align the decompression loop to 32 + 16 bytes. - * - * zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression - * speed swings based on the alignment of the decompression loop. This - * performance swing is caused by parts of the decompression loop falling - * out of the DSB. The entire decompression loop should fit in the DSB, - * when it can't we get much worse performance. You can measure if you've - * hit the good case or the bad case with this perf command for some - * compressed file test.zst: - * - * perf stat -e cycles -e instructions -e idq.all_dsb_cycles_any_uops \ - * -e idq.all_mite_cycles_any_uops -- ./zstd -tq test.zst - * - * If you see most cycles served out of the MITE you've hit the bad case. - * If you see most cycles served out of the DSB you've hit the good case. - * If it is pretty even then you may be in an okay case. - * - * This issue has been reproduced on the following CPUs: - * - Kabylake: Macbook Pro (15-inch, 2019) 2.4 GHz Intel Core i9 - * Use Instruments->Counters to get DSB/MITE cycles. - * I never got performance swings, but I was able to - * go from the good case of mostly DSB to half of the - * cycles served from MITE. - * - Coffeelake: Intel i9-9900k - * - Coffeelake: Intel i7-9700k - * - * I haven't been able to reproduce the instability or DSB misses on any - * of the following CPUS: - * - Haswell - * - Broadwell: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GH - * - Skylake - * - * Alignment is done for each of the three major decompression loops: - * - ZSTD_decompressSequences_bodySplitLitBuffer - presplit section of the literal buffer - * - ZSTD_decompressSequences_bodySplitLitBuffer - postsplit section of the literal buffer - * - ZSTD_decompressSequences_body - * Alignment choices are made to minimize large swings on bad cases and influence on performance - * from changes external to this code, rather than to overoptimize on the current commit. - * - * If you are seeing performance stability this script can help test. - * It tests on 4 commits in zstd where I saw performance change. - * - * https://gist.github.com/terrelln/9889fc06a423fd5ca6e99351564473f4 - */ -#if defined(__GNUC__) && defined(__x86_64__) - __asm__(".p2align 6"); -# if __GNUC__ >= 7 - /* good for gcc-7, gcc-9, and gcc-11 */ - __asm__("nop"); - __asm__(".p2align 5"); - __asm__("nop"); - __asm__(".p2align 4"); -# if __GNUC__ == 8 || __GNUC__ == 10 - /* good for gcc-8 and gcc-10 */ - __asm__("nop"); - __asm__(".p2align 3"); -# endif -# endif -#endif - - /* Handle the initial state where litBuffer is currently split between dst and litExtraBuffer */ - for ( ; nbSeq; nbSeq--) { - sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); - if (litPtr + sequence.litLength > dctx->litBufferEnd) break; - { size_t const oneSeqSize = ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequence.litLength - WILDCOPY_OVERLENGTH, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); -#endif - if (UNLIKELY(ZSTD_isError(oneSeqSize))) - return oneSeqSize; - DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); - op += oneSeqSize; - } } - DEBUGLOG(6, "reached: (litPtr + sequence.litLength > dctx->litBufferEnd)"); - - /* If there are more sequences, they will need to read literals from litExtraBuffer; copy over the remainder from dst and update litPtr and litEnd */ - if (nbSeq > 0) { - const size_t leftoverLit = dctx->litBufferEnd - litPtr; - DEBUGLOG(6, "There are %i sequences left, and %zu/%zu literals left in buffer", nbSeq, leftoverLit, sequence.litLength); - if (leftoverLit) { - RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); - ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); - sequence.litLength -= leftoverLit; - op += leftoverLit; - } - litPtr = dctx->litExtraBuffer; - litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; - dctx->litBufferLocation = ZSTD_not_in_dst; - { size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); -#endif - if (UNLIKELY(ZSTD_isError(oneSeqSize))) - return oneSeqSize; - DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); - op += oneSeqSize; - } - nbSeq--; - } - } - - if (nbSeq > 0) { - /* there is remaining lit from extra buffer */ - -#if defined(__GNUC__) && defined(__x86_64__) - __asm__(".p2align 6"); - __asm__("nop"); -# if __GNUC__ != 7 - /* worse for gcc-7 better for gcc-8, gcc-9, and gcc-10 and clang */ - __asm__(".p2align 4"); - __asm__("nop"); - __asm__(".p2align 3"); -# elif __GNUC__ >= 11 - __asm__(".p2align 3"); -# else - __asm__(".p2align 5"); - __asm__("nop"); - __asm__(".p2align 3"); -# endif -#endif - - for ( ; nbSeq ; nbSeq--) { - seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); - size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); -#endif - if (UNLIKELY(ZSTD_isError(oneSeqSize))) - return oneSeqSize; - DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); - op += oneSeqSize; - } - } - - /* check if reached exact end */ - DEBUGLOG(5, "ZSTD_decompressSequences_bodySplitLitBuffer: after decode loop, remaining nbSeq : %i", nbSeq); - RETURN_ERROR_IF(nbSeq, corruption_detected, ""); - DEBUGLOG(5, "bitStream : start=%p, ptr=%p, bitsConsumed=%u", seqState.DStream.start, seqState.DStream.ptr, seqState.DStream.bitsConsumed); - RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); - /* save reps for next block */ - { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } - } - - /* last literal segment */ - if (dctx->litBufferLocation == ZSTD_split) { - /* split hasn't been reached yet, first get dst then copy litExtraBuffer */ - size_t const lastLLSize = (size_t)(litBufferEnd - litPtr); - DEBUGLOG(6, "copy last literals from segment : %u", (U32)lastLLSize); - RETURN_ERROR_IF(lastLLSize > (size_t)(oend - op), dstSize_tooSmall, ""); - if (op != NULL) { - ZSTD_memmove(op, litPtr, lastLLSize); - op += lastLLSize; - } - litPtr = dctx->litExtraBuffer; - litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; - dctx->litBufferLocation = ZSTD_not_in_dst; - } - /* copy last literals from internal buffer */ - { size_t const lastLLSize = (size_t)(litBufferEnd - litPtr); - DEBUGLOG(6, "copy last literals from internal buffer : %u", (U32)lastLLSize); - RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); - if (op != NULL) { - ZSTD_memcpy(op, litPtr, lastLLSize); - op += lastLLSize; - } } - - DEBUGLOG(6, "decoded block of size %u bytes", (U32)(op - ostart)); - return (size_t)(op - ostart); -} - -FORCE_INLINE_TEMPLATE size_t -DONT_VECTORIZE -ZSTD_decompressSequences_body(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - const BYTE* ip = (const BYTE*)seqStart; - const BYTE* const iend = ip + seqSize; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = dctx->litBufferLocation == ZSTD_not_in_dst ? ZSTD_maybeNullPtrAdd(ostart, maxDstSize) : dctx->litBuffer; - BYTE* op = ostart; - const BYTE* litPtr = dctx->litPtr; - const BYTE* const litEnd = litPtr + dctx->litSize; - const BYTE* const prefixStart = (const BYTE*)(dctx->prefixStart); - const BYTE* const vBase = (const BYTE*)(dctx->virtualStart); - const BYTE* const dictEnd = (const BYTE*)(dctx->dictEnd); - DEBUGLOG(5, "ZSTD_decompressSequences_body: nbSeq = %d", nbSeq); - - /* Regen sequences */ - if (nbSeq) { - seqState_t seqState; - dctx->fseEntropy = 1; - { U32 i; for (i = 0; i < ZSTD_REP_NUM; i++) seqState.prevOffset[i] = dctx->entropy.rep[i]; } - RETURN_ERROR_IF( - ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend - ip)), - corruption_detected, ""); - ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); - ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); - ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); - assert(dst != NULL); - -#if defined(__GNUC__) && defined(__x86_64__) - __asm__(".p2align 6"); - __asm__("nop"); -# if __GNUC__ >= 7 - __asm__(".p2align 5"); - __asm__("nop"); - __asm__(".p2align 3"); -# else - __asm__(".p2align 4"); - __asm__("nop"); - __asm__(".p2align 3"); -# endif -#endif - - for ( ; nbSeq ; nbSeq--) { - seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); - size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litEnd, prefixStart, vBase, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); -#endif - if (UNLIKELY(ZSTD_isError(oneSeqSize))) - return oneSeqSize; - DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); - op += oneSeqSize; - } - - /* check if reached exact end */ - assert(nbSeq == 0); - RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); - /* save reps for next block */ - { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } - } - - /* last literal segment */ - { size_t const lastLLSize = (size_t)(litEnd - litPtr); - DEBUGLOG(6, "copy last literals : %u", (U32)lastLLSize); - RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); - if (op != NULL) { - ZSTD_memcpy(op, litPtr, lastLLSize); - op += lastLLSize; - } } - - DEBUGLOG(6, "decoded block of size %u bytes", (U32)(op - ostart)); - return (size_t)(op - ostart); -} - -static size_t -ZSTD_decompressSequences_default(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} - -static size_t -ZSTD_decompressSequencesSplitLitBuffer_default(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequences_bodySplitLitBuffer(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT - -FORCE_INLINE_TEMPLATE - -size_t ZSTD_prefetchMatch(size_t prefetchPos, seq_t const sequence, - const BYTE* const prefixStart, const BYTE* const dictEnd) -{ - prefetchPos += sequence.litLength; - { const BYTE* const matchBase = (sequence.offset > prefetchPos) ? dictEnd : prefixStart; - /* note : this operation can overflow when seq.offset is really too large, which can only happen when input is corrupted. - * No consequence though : memory address is only used for prefetching, not for dereferencing */ - const BYTE* const match = ZSTD_wrappedPtrSub(ZSTD_wrappedPtrAdd(matchBase, prefetchPos), sequence.offset); - PREFETCH_L1(match); PREFETCH_L1(match+CACHELINE_SIZE); /* note : it's safe to invoke PREFETCH() on any memory address, including invalid ones */ - } - return prefetchPos + sequence.matchLength; -} - -/* This decoding function employs prefetching - * to reduce latency impact of cache misses. - * It's generally employed when block contains a significant portion of long-distance matches - * or when coupled with a "cold" dictionary */ -FORCE_INLINE_TEMPLATE size_t -ZSTD_decompressSequencesLong_body( - ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - const BYTE* ip = (const BYTE*)seqStart; - const BYTE* const iend = ip + seqSize; - BYTE* const ostart = (BYTE*)dst; - BYTE* const oend = dctx->litBufferLocation == ZSTD_in_dst ? dctx->litBuffer : ZSTD_maybeNullPtrAdd(ostart, maxDstSize); - BYTE* op = ostart; - const BYTE* litPtr = dctx->litPtr; - const BYTE* litBufferEnd = dctx->litBufferEnd; - const BYTE* const prefixStart = (const BYTE*) (dctx->prefixStart); - const BYTE* const dictStart = (const BYTE*) (dctx->virtualStart); - const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); - - /* Regen sequences */ - if (nbSeq) { -#define STORED_SEQS 8 -#define STORED_SEQS_MASK (STORED_SEQS-1) -#define ADVANCED_SEQS STORED_SEQS - seq_t sequences[STORED_SEQS]; - int const seqAdvance = MIN(nbSeq, ADVANCED_SEQS); - seqState_t seqState; - int seqNb; - size_t prefetchPos = (size_t)(op-prefixStart); /* track position relative to prefixStart */ - - dctx->fseEntropy = 1; - { int i; for (i=0; ientropy.rep[i]; } - assert(dst != NULL); - assert(iend >= ip); - RETURN_ERROR_IF( - ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), - corruption_detected, ""); - ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); - ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); - ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); - - /* prepare in advance */ - for (seqNb=0; seqNblitBufferLocation == ZSTD_split && litPtr + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength > dctx->litBufferEnd) { - /* lit buffer is reaching split point, empty out the first buffer and transition to litExtraBuffer */ - const size_t leftoverLit = dctx->litBufferEnd - litPtr; - if (leftoverLit) - { - RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); - ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); - sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength -= leftoverLit; - op += leftoverLit; - } - litPtr = dctx->litExtraBuffer; - litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; - dctx->litBufferLocation = ZSTD_not_in_dst; - { size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], prefixStart, dictStart); -#endif - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; - - prefetchPos = ZSTD_prefetchMatch(prefetchPos, sequence, prefixStart, dictEnd); - sequences[seqNb & STORED_SEQS_MASK] = sequence; - op += oneSeqSize; - } } - else - { - /* lit buffer is either wholly contained in first or second split, or not split at all*/ - size_t const oneSeqSize = dctx->litBufferLocation == ZSTD_split ? - ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength - WILDCOPY_OVERLENGTH, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd) : - ZSTD_execSequence(op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], prefixStart, dictStart); -#endif - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; - - prefetchPos = ZSTD_prefetchMatch(prefetchPos, sequence, prefixStart, dictEnd); - sequences[seqNb & STORED_SEQS_MASK] = sequence; - op += oneSeqSize; - } - } - RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); - - /* finish queue */ - seqNb -= seqAdvance; - for ( ; seqNblitBufferLocation == ZSTD_split && litPtr + sequence->litLength > dctx->litBufferEnd) { - const size_t leftoverLit = dctx->litBufferEnd - litPtr; - if (leftoverLit) { - RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); - ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); - sequence->litLength -= leftoverLit; - op += leftoverLit; - } - litPtr = dctx->litExtraBuffer; - litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; - dctx->litBufferLocation = ZSTD_not_in_dst; - { size_t const oneSeqSize = ZSTD_execSequence(op, oend, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequences[seqNb&STORED_SEQS_MASK], prefixStart, dictStart); -#endif - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; - op += oneSeqSize; - } - } - else - { - size_t const oneSeqSize = dctx->litBufferLocation == ZSTD_split ? - ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequence->litLength - WILDCOPY_OVERLENGTH, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd) : - ZSTD_execSequence(op, oend, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) - assert(!ZSTD_isError(oneSeqSize)); - ZSTD_assertValidSequence(dctx, op, oend, sequences[seqNb&STORED_SEQS_MASK], prefixStart, dictStart); -#endif - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; - op += oneSeqSize; - } - } - - /* save reps for next block */ - { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } - } - - /* last literal segment */ - if (dctx->litBufferLocation == ZSTD_split) { /* first deplete literal buffer in dst, then copy litExtraBuffer */ - size_t const lastLLSize = litBufferEnd - litPtr; - RETURN_ERROR_IF(lastLLSize > (size_t)(oend - op), dstSize_tooSmall, ""); - if (op != NULL) { - ZSTD_memmove(op, litPtr, lastLLSize); - op += lastLLSize; - } - litPtr = dctx->litExtraBuffer; - litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; - } - { size_t const lastLLSize = litBufferEnd - litPtr; - RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); - if (op != NULL) { - ZSTD_memmove(op, litPtr, lastLLSize); - op += lastLLSize; - } - } - - return (size_t)(op - ostart); -} - -static size_t -ZSTD_decompressSequencesLong_default(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ - - - -#if DYNAMIC_BMI2 - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG -static BMI2_TARGET_ATTRIBUTE size_t -DONT_VECTORIZE -ZSTD_decompressSequences_bmi2(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -static BMI2_TARGET_ATTRIBUTE size_t -DONT_VECTORIZE -ZSTD_decompressSequencesSplitLitBuffer_bmi2(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequences_bodySplitLitBuffer(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT -static BMI2_TARGET_ATTRIBUTE size_t -ZSTD_decompressSequencesLong_bmi2(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ - -#endif /* DYNAMIC_BMI2 */ - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG -static size_t -ZSTD_decompressSequences(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - DEBUGLOG(5, "ZSTD_decompressSequences"); -#if DYNAMIC_BMI2 - if (ZSTD_DCtx_get_bmi2(dctx)) { - return ZSTD_decompressSequences_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); - } -#endif - return ZSTD_decompressSequences_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -static size_t -ZSTD_decompressSequencesSplitLitBuffer(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - DEBUGLOG(5, "ZSTD_decompressSequencesSplitLitBuffer"); -#if DYNAMIC_BMI2 - if (ZSTD_DCtx_get_bmi2(dctx)) { - return ZSTD_decompressSequencesSplitLitBuffer_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); - } -#endif - return ZSTD_decompressSequencesSplitLitBuffer_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ - - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT -/* ZSTD_decompressSequencesLong() : - * decompression function triggered when a minimum share of offsets is considered "long", - * aka out of cache. - * note : "long" definition seems overloaded here, sometimes meaning "wider than bitstream register", and sometimes meaning "farther than memory cache distance". - * This function will try to mitigate main memory latency through the use of prefetching */ -static size_t -ZSTD_decompressSequencesLong(ZSTD_DCtx* dctx, - void* dst, size_t maxDstSize, - const void* seqStart, size_t seqSize, int nbSeq, - const ZSTD_longOffset_e isLongOffset) -{ - DEBUGLOG(5, "ZSTD_decompressSequencesLong"); -#if DYNAMIC_BMI2 - if (ZSTD_DCtx_get_bmi2(dctx)) { - return ZSTD_decompressSequencesLong_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); - } -#endif - return ZSTD_decompressSequencesLong_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); -} -#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ - - -/** - * @returns The total size of the history referenceable by zstd, including - * both the prefix and the extDict. At @p op any offset larger than this - * is invalid. - */ -static size_t ZSTD_totalHistorySize(BYTE* op, BYTE const* virtualStart) -{ - return (size_t)(op - virtualStart); -} - -typedef struct { - unsigned longOffsetShare; - unsigned maxNbAdditionalBits; -} ZSTD_OffsetInfo; - -/* ZSTD_getOffsetInfo() : - * condition : offTable must be valid - * @return : "share" of long offsets (arbitrarily defined as > (1<<23)) - * compared to maximum possible of (1< 22) info.longOffsetShare += 1; - } - - assert(tableLog <= OffFSELog); - info.longOffsetShare <<= (OffFSELog - tableLog); /* scale to OffFSELog */ - } - - return info; -} - -/** - * @returns The maximum offset we can decode in one read of our bitstream, without - * reloading more bits in the middle of the offset bits read. Any offsets larger - * than this must use the long offset decoder. - */ -static size_t ZSTD_maxShortOffset(void) -{ - if (MEM_64bits()) { - /* We can decode any offset without reloading bits. - * This might change if the max window size grows. - */ - ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX <= 31); - return (size_t)-1; - } else { - /* The maximum offBase is (1 << (STREAM_ACCUMULATOR_MIN + 1)) - 1. - * This offBase would require STREAM_ACCUMULATOR_MIN extra bits. - * Then we have to subtract ZSTD_REP_NUM to get the maximum possible offset. - */ - size_t const maxOffbase = ((size_t)1 << (STREAM_ACCUMULATOR_MIN + 1)) - 1; - size_t const maxOffset = maxOffbase - ZSTD_REP_NUM; - assert(ZSTD_highbit32((U32)maxOffbase) == STREAM_ACCUMULATOR_MIN); - return maxOffset; - } -} - -size_t -ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, const streaming_operation streaming) -{ /* blockType == blockCompressed */ - const BYTE* ip = (const BYTE*)src; - DEBUGLOG(5, "ZSTD_decompressBlock_internal (cSize : %u)", (unsigned)srcSize); - - /* Note : the wording of the specification - * allows compressed block to be sized exactly ZSTD_blockSizeMax(dctx). - * This generally does not happen, as it makes little sense, - * since an uncompressed block would feature same size and have no decompression cost. - * Also, note that decoder from reference libzstd before < v1.5.4 - * would consider this edge case as an error. - * As a consequence, avoid generating compressed blocks of size ZSTD_blockSizeMax(dctx) - * for broader compatibility with the deployed ecosystem of zstd decoders */ - RETURN_ERROR_IF(srcSize > ZSTD_blockSizeMax(dctx), srcSize_wrong, ""); - - /* Decode literals section */ - { size_t const litCSize = ZSTD_decodeLiteralsBlock(dctx, src, srcSize, dst, dstCapacity, streaming); - DEBUGLOG(5, "ZSTD_decodeLiteralsBlock : cSize=%u, nbLiterals=%zu", (U32)litCSize, dctx->litSize); - if (ZSTD_isError(litCSize)) return litCSize; - ip += litCSize; - srcSize -= litCSize; - } - - /* Build Decoding Tables */ - { - /* Compute the maximum block size, which must also work when !frame and fParams are unset. - * Additionally, take the min with dstCapacity to ensure that the totalHistorySize fits in a size_t. - */ - size_t const blockSizeMax = MIN(dstCapacity, ZSTD_blockSizeMax(dctx)); - size_t const totalHistorySize = ZSTD_totalHistorySize(ZSTD_maybeNullPtrAdd((BYTE*)dst, blockSizeMax), (BYTE const*)dctx->virtualStart); - /* isLongOffset must be true if there are long offsets. - * Offsets are long if they are larger than ZSTD_maxShortOffset(). - * We don't expect that to be the case in 64-bit mode. - * - * We check here to see if our history is large enough to allow long offsets. - * If it isn't, then we can't possible have (valid) long offsets. If the offset - * is invalid, then it is okay to read it incorrectly. - * - * If isLongOffsets is true, then we will later check our decoding table to see - * if it is even possible to generate long offsets. - */ - ZSTD_longOffset_e isLongOffset = (ZSTD_longOffset_e)(MEM_32bits() && (totalHistorySize > ZSTD_maxShortOffset())); - /* These macros control at build-time which decompressor implementation - * we use. If neither is defined, we do some inspection and dispatch at - * runtime. - */ -#if !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ - !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) - int usePrefetchDecoder = dctx->ddictIsCold; -#else - /* Set to 1 to avoid computing offset info if we don't need to. - * Otherwise this value is ignored. - */ - int usePrefetchDecoder = 1; -#endif - int nbSeq; - size_t const seqHSize = ZSTD_decodeSeqHeaders(dctx, &nbSeq, ip, srcSize); - if (ZSTD_isError(seqHSize)) return seqHSize; - ip += seqHSize; - srcSize -= seqHSize; - - RETURN_ERROR_IF((dst == NULL || dstCapacity == 0) && nbSeq > 0, dstSize_tooSmall, "NULL not handled"); - RETURN_ERROR_IF(MEM_64bits() && sizeof(size_t) == sizeof(void*) && (size_t)(-1) - (size_t)dst < (size_t)(1 << 20), dstSize_tooSmall, - "invalid dst"); - - /* If we could potentially have long offsets, or we might want to use the prefetch decoder, - * compute information about the share of long offsets, and the maximum nbAdditionalBits. - * NOTE: could probably use a larger nbSeq limit - */ - if (isLongOffset || (!usePrefetchDecoder && (totalHistorySize > (1u << 24)) && (nbSeq > 8))) { - ZSTD_OffsetInfo const info = ZSTD_getOffsetInfo(dctx->OFTptr, nbSeq); - if (isLongOffset && info.maxNbAdditionalBits <= STREAM_ACCUMULATOR_MIN) { - /* If isLongOffset, but the maximum number of additional bits that we see in our table is small - * enough, then we know it is impossible to have too long an offset in this block, so we can - * use the regular offset decoder. - */ - isLongOffset = ZSTD_lo_isRegularOffset; - } - if (!usePrefetchDecoder) { - U32 const minShare = MEM_64bits() ? 7 : 20; /* heuristic values, correspond to 2.73% and 7.81% */ - usePrefetchDecoder = (info.longOffsetShare >= minShare); - } - } - - dctx->ddictIsCold = 0; - -#if !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ - !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) - if (usePrefetchDecoder) { -#else - (void)usePrefetchDecoder; - { -#endif -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT - return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); -#endif - } - -#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG - /* else */ - if (dctx->litBufferLocation == ZSTD_split) - return ZSTD_decompressSequencesSplitLitBuffer(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); - else - return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); -#endif - } -} - - -ZSTD_ALLOW_POINTER_OVERFLOW_ATTR -void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst, size_t dstSize) -{ - if (dst != dctx->previousDstEnd && dstSize > 0) { /* not contiguous */ - dctx->dictEnd = dctx->previousDstEnd; - dctx->virtualStart = (const char*)dst - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); - dctx->prefixStart = dst; - dctx->previousDstEnd = dst; - } -} - - -size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - size_t dSize; - dctx->isFrameDecompression = 0; - ZSTD_checkContinuity(dctx, dst, dstCapacity); - dSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, not_streaming); - FORWARD_IF_ERROR(dSize, ""); - dctx->previousDstEnd = (char*)dst + dSize; - return dSize; -} - - -/* NOTE: Must just wrap ZSTD_decompressBlock_deprecated() */ -size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize) -{ - return ZSTD_decompressBlock_deprecated(dctx, dst, dstCapacity, src, srcSize); -} diff --git a/third_party/zstd/lib/decompress/zstd_decompress_block.h b/third_party/zstd/lib/decompress/zstd_decompress_block.h deleted file mode 100644 index ab15240..0000000 --- a/third_party/zstd/lib/decompress/zstd_decompress_block.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#ifndef ZSTD_DEC_BLOCK_H -#define ZSTD_DEC_BLOCK_H - -/*-******************************************************* - * Dependencies - *********************************************************/ -#include "../common/zstd_deps.h" /* size_t */ -#include "../zstd.h" /* DCtx, and some public functions */ -#include "../common/zstd_internal.h" /* blockProperties_t, and some public functions */ -#include "zstd_decompress_internal.h" /* ZSTD_seqSymbol */ - - -/* === Prototypes === */ - -/* note: prototypes already published within `zstd.h` : - * ZSTD_decompressBlock() - */ - -/* note: prototypes already published within `zstd_internal.h` : - * ZSTD_getcBlockSize() - * ZSTD_decodeSeqHeaders() - */ - - - /* Streaming state is used to inform allocation of the literal buffer */ -typedef enum { - not_streaming = 0, - is_streaming = 1 -} streaming_operation; - -/* ZSTD_decompressBlock_internal() : - * decompress block, starting at `src`, - * into destination buffer `dst`. - * @return : decompressed block size, - * or an error code (which can be tested using ZSTD_isError()) - */ -size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize, const streaming_operation streaming); - -/* ZSTD_buildFSETable() : - * generate FSE decoding table for one symbol (ll, ml or off) - * this function must be called with valid parameters only - * (dt is large enough, normalizedCounter distribution total is a power of 2, max is within range, etc.) - * in which case it cannot fail. - * The workspace must be 4-byte aligned and at least ZSTD_BUILD_FSE_TABLE_WKSP_SIZE bytes, which is - * defined in zstd_decompress_internal.h. - * Internal use only. - */ -void ZSTD_buildFSETable(ZSTD_seqSymbol* dt, - const short* normalizedCounter, unsigned maxSymbolValue, - const U32* baseValue, const U8* nbAdditionalBits, - unsigned tableLog, void* wksp, size_t wkspSize, - int bmi2); - -/* Internal definition of ZSTD_decompressBlock() to avoid deprecation warnings. */ -size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx, - void* dst, size_t dstCapacity, - const void* src, size_t srcSize); - - -#endif /* ZSTD_DEC_BLOCK_H */ diff --git a/third_party/zstd/lib/decompress/zstd_decompress_internal.h b/third_party/zstd/lib/decompress/zstd_decompress_internal.h deleted file mode 100644 index e4bffdb..0000000 --- a/third_party/zstd/lib/decompress/zstd_decompress_internal.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/* zstd_decompress_internal: - * objects and definitions shared within lib/decompress modules */ - - #ifndef ZSTD_DECOMPRESS_INTERNAL_H - #define ZSTD_DECOMPRESS_INTERNAL_H - - -/*-******************************************************* - * Dependencies - *********************************************************/ -#include "../common/mem.h" /* BYTE, U16, U32 */ -#include "../common/zstd_internal.h" /* constants : MaxLL, MaxML, MaxOff, LLFSELog, etc. */ - - - -/*-******************************************************* - * Constants - *********************************************************/ -static UNUSED_ATTR const U32 LL_base[MaxLL+1] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 18, 20, 22, 24, 28, 32, 40, - 48, 64, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, - 0x2000, 0x4000, 0x8000, 0x10000 }; - -static UNUSED_ATTR const U32 OF_base[MaxOff+1] = { - 0, 1, 1, 5, 0xD, 0x1D, 0x3D, 0x7D, - 0xFD, 0x1FD, 0x3FD, 0x7FD, 0xFFD, 0x1FFD, 0x3FFD, 0x7FFD, - 0xFFFD, 0x1FFFD, 0x3FFFD, 0x7FFFD, 0xFFFFD, 0x1FFFFD, 0x3FFFFD, 0x7FFFFD, - 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD, 0x1FFFFFFD, 0x3FFFFFFD, 0x7FFFFFFD }; - -static UNUSED_ATTR const U8 OF_bits[MaxOff+1] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31 }; - -static UNUSED_ATTR const U32 ML_base[MaxML+1] = { - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, - 35, 37, 39, 41, 43, 47, 51, 59, - 67, 83, 99, 0x83, 0x103, 0x203, 0x403, 0x803, - 0x1003, 0x2003, 0x4003, 0x8003, 0x10003 }; - - -/*-******************************************************* - * Decompression types - *********************************************************/ - typedef struct { - U32 fastMode; - U32 tableLog; - } ZSTD_seqSymbol_header; - - typedef struct { - U16 nextState; - BYTE nbAdditionalBits; - BYTE nbBits; - U32 baseValue; - } ZSTD_seqSymbol; - - #define SEQSYMBOL_TABLE_SIZE(log) (1 + (1 << (log))) - -#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE (sizeof(S16) * (MaxSeq + 1) + (1u << MaxFSELog) + sizeof(U64)) -#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32 ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32)) -#define ZSTD_HUFFDTABLE_CAPACITY_LOG 12 - -typedef struct { - ZSTD_seqSymbol LLTable[SEQSYMBOL_TABLE_SIZE(LLFSELog)]; /* Note : Space reserved for FSE Tables */ - ZSTD_seqSymbol OFTable[SEQSYMBOL_TABLE_SIZE(OffFSELog)]; /* is also used as temporary workspace while building hufTable during DDict creation */ - ZSTD_seqSymbol MLTable[SEQSYMBOL_TABLE_SIZE(MLFSELog)]; /* and therefore must be at least HUF_DECOMPRESS_WORKSPACE_SIZE large */ - HUF_DTable hufTable[HUF_DTABLE_SIZE(ZSTD_HUFFDTABLE_CAPACITY_LOG)]; /* can accommodate HUF_decompress4X */ - U32 rep[ZSTD_REP_NUM]; - U32 workspace[ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32]; -} ZSTD_entropyDTables_t; - -typedef enum { ZSTDds_getFrameHeaderSize, ZSTDds_decodeFrameHeader, - ZSTDds_decodeBlockHeader, ZSTDds_decompressBlock, - ZSTDds_decompressLastBlock, ZSTDds_checkChecksum, - ZSTDds_decodeSkippableHeader, ZSTDds_skipFrame } ZSTD_dStage; - -typedef enum { zdss_init=0, zdss_loadHeader, - zdss_read, zdss_load, zdss_flush } ZSTD_dStreamStage; - -typedef enum { - ZSTD_use_indefinitely = -1, /* Use the dictionary indefinitely */ - ZSTD_dont_use = 0, /* Do not use the dictionary (if one exists free it) */ - ZSTD_use_once = 1 /* Use the dictionary once and set to ZSTD_dont_use */ -} ZSTD_dictUses_e; - -/* Hashset for storing references to multiple ZSTD_DDict within ZSTD_DCtx */ -typedef struct { - const ZSTD_DDict** ddictPtrTable; - size_t ddictPtrTableSize; - size_t ddictPtrCount; -} ZSTD_DDictHashSet; - -#ifndef ZSTD_DECODER_INTERNAL_BUFFER -# define ZSTD_DECODER_INTERNAL_BUFFER (1 << 16) -#endif - -#define ZSTD_LBMIN 64 -#define ZSTD_LBMAX (128 << 10) - -/* extra buffer, compensates when dst is not large enough to store litBuffer */ -#define ZSTD_LITBUFFEREXTRASIZE BOUNDED(ZSTD_LBMIN, ZSTD_DECODER_INTERNAL_BUFFER, ZSTD_LBMAX) - -typedef enum { - ZSTD_not_in_dst = 0, /* Stored entirely within litExtraBuffer */ - ZSTD_in_dst = 1, /* Stored entirely within dst (in memory after current output write) */ - ZSTD_split = 2 /* Split between litExtraBuffer and dst */ -} ZSTD_litLocation_e; - -struct ZSTD_DCtx_s -{ - const ZSTD_seqSymbol* LLTptr; - const ZSTD_seqSymbol* MLTptr; - const ZSTD_seqSymbol* OFTptr; - const HUF_DTable* HUFptr; - ZSTD_entropyDTables_t entropy; - U32 workspace[HUF_DECOMPRESS_WORKSPACE_SIZE_U32]; /* space needed when building huffman tables */ - const void* previousDstEnd; /* detect continuity */ - const void* prefixStart; /* start of current segment */ - const void* virtualStart; /* virtual start of previous segment if it was just before current one */ - const void* dictEnd; /* end of previous segment */ - size_t expected; - ZSTD_FrameHeader fParams; - U64 processedCSize; - U64 decodedSize; - blockType_e bType; /* used in ZSTD_decompressContinue(), store blockType between block header decoding and block decompression stages */ - ZSTD_dStage stage; - U32 litEntropy; - U32 fseEntropy; - XXH64_state_t xxhState; - size_t headerSize; - ZSTD_format_e format; - ZSTD_forceIgnoreChecksum_e forceIgnoreChecksum; /* User specified: if == 1, will ignore checksums in compressed frame. Default == 0 */ - U32 validateChecksum; /* if == 1, will validate checksum. Is == 1 if (fParams.checksumFlag == 1) and (forceIgnoreChecksum == 0). */ - const BYTE* litPtr; - ZSTD_customMem customMem; - size_t litSize; - size_t rleSize; - size_t staticSize; - int isFrameDecompression; -#if DYNAMIC_BMI2 - int bmi2; /* == 1 if the CPU supports BMI2 and 0 otherwise. CPU support is determined dynamically once per context lifetime. */ -#endif - - /* dictionary */ - ZSTD_DDict* ddictLocal; - const ZSTD_DDict* ddict; /* set by ZSTD_initDStream_usingDDict(), or ZSTD_DCtx_refDDict() */ - U32 dictID; - int ddictIsCold; /* if == 1 : dictionary is "new" for working context, and presumed "cold" (not in cpu cache) */ - ZSTD_dictUses_e dictUses; - ZSTD_DDictHashSet* ddictSet; /* Hash set for multiple ddicts */ - ZSTD_refMultipleDDicts_e refMultipleDDicts; /* User specified: if == 1, will allow references to multiple DDicts. Default == 0 (disabled) */ - int disableHufAsm; - int maxBlockSizeParam; - - /* streaming */ - ZSTD_dStreamStage streamStage; - char* inBuff; - size_t inBuffSize; - size_t inPos; - size_t maxWindowSize; - char* outBuff; - size_t outBuffSize; - size_t outStart; - size_t outEnd; - size_t lhSize; -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) - void* legacyContext; - U32 previousLegacyVersion; - U32 legacyVersion; -#endif - U32 hostageByte; - int noForwardProgress; - ZSTD_bufferMode_e outBufferMode; - ZSTD_outBuffer expectedOutBuffer; - - /* workspace */ - BYTE* litBuffer; - const BYTE* litBufferEnd; - ZSTD_litLocation_e litBufferLocation; - BYTE litExtraBuffer[ZSTD_LITBUFFEREXTRASIZE + WILDCOPY_OVERLENGTH]; /* literal buffer can be split between storage within dst and within this scratch buffer */ - BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX]; - - size_t oversizedDuration; - -#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - void const* dictContentBeginForFuzzing; - void const* dictContentEndForFuzzing; -#endif - - /* Tracing */ -#if ZSTD_TRACE - ZSTD_TraceCtx traceCtx; -#endif -}; /* typedef'd to ZSTD_DCtx within "zstd.h" */ - -MEM_STATIC int ZSTD_DCtx_get_bmi2(const struct ZSTD_DCtx_s *dctx) { -#if DYNAMIC_BMI2 - return dctx->bmi2; -#else - (void)dctx; - return 0; -#endif -} - -/*-******************************************************* - * Shared internal functions - *********************************************************/ - -/*! ZSTD_loadDEntropy() : - * dict : must point at beginning of a valid zstd dictionary. - * @return : size of dictionary header (size of magic number + dict ID + entropy tables) */ -size_t ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, - const void* const dict, size_t const dictSize); - -/*! ZSTD_checkContinuity() : - * check if next `dst` follows previous position, where decompression ended. - * If yes, do nothing (continue on current segment). - * If not, classify previous segment as "external dictionary", and start a new segment. - * This function cannot fail. */ -void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst, size_t dstSize); - - -#endif /* ZSTD_DECOMPRESS_INTERNAL_H */ diff --git a/third_party/zstd/lib/deprecated/zbuff.h b/third_party/zstd/lib/deprecated/zbuff.h deleted file mode 100644 index a968245..0000000 --- a/third_party/zstd/lib/deprecated/zbuff.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* *************************************************************** -* NOTES/WARNINGS -******************************************************************/ -/* The streaming API defined here is deprecated. - * Consider migrating towards ZSTD_compressStream() API in `zstd.h` - * See 'lib/README.md'. - *****************************************************************/ - - -#if defined (__cplusplus) -extern "C" { -#endif - -#ifndef ZSTD_BUFFERED_H_23987 -#define ZSTD_BUFFERED_H_23987 - -/* ************************************* -* Dependencies -***************************************/ -#include /* size_t */ -#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */ - - -/* *************************************************************** -* Compiler specifics -*****************************************************************/ -/* Deprecation warnings */ -/* Should these warnings be a problem, - * it is generally possible to disable them, - * typically with -Wno-deprecated-declarations for gcc - * or _CRT_SECURE_NO_WARNINGS in Visual. - * Otherwise, it's also possible to define ZBUFF_DISABLE_DEPRECATE_WARNINGS - */ -#ifdef ZBUFF_DISABLE_DEPRECATE_WARNINGS -# define ZBUFF_DEPRECATED(message) ZSTDLIB_API /* disable deprecation warnings */ -#else -# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ -# define ZBUFF_DEPRECATED(message) [[deprecated(message)]] ZSTDLIB_API -# elif (defined(GNUC) && (GNUC > 4 || (GNUC == 4 && GNUC_MINOR >= 5))) || defined(__clang__) -# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __attribute__((deprecated(message))) -# elif defined(__GNUC__) && (__GNUC__ >= 3) -# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __attribute__((deprecated)) -# elif defined(_MSC_VER) -# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __declspec(deprecated(message)) -# else -# pragma message("WARNING: You need to implement ZBUFF_DEPRECATED for this compiler") -# define ZBUFF_DEPRECATED(message) ZSTDLIB_API -# endif -#endif /* ZBUFF_DISABLE_DEPRECATE_WARNINGS */ - - -/* ************************************* -* Streaming functions -***************************************/ -/* This is the easier "buffered" streaming API, -* using an internal buffer to lift all restrictions on user-provided buffers -* which can be any size, any place, for both input and output. -* ZBUFF and ZSTD are 100% interoperable, -* frames created by one can be decoded by the other one */ - -typedef ZSTD_CStream ZBUFF_CCtx; -ZBUFF_DEPRECATED("use ZSTD_createCStream") ZBUFF_CCtx* ZBUFF_createCCtx(void); -ZBUFF_DEPRECATED("use ZSTD_freeCStream") size_t ZBUFF_freeCCtx(ZBUFF_CCtx* cctx); - -ZBUFF_DEPRECATED("use ZSTD_initCStream") size_t ZBUFF_compressInit(ZBUFF_CCtx* cctx, int compressionLevel); -ZBUFF_DEPRECATED("use ZSTD_initCStream_usingDict") size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel); - -ZBUFF_DEPRECATED("use ZSTD_compressStream") size_t ZBUFF_compressContinue(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr, const void* src, size_t* srcSizePtr); -ZBUFF_DEPRECATED("use ZSTD_flushStream") size_t ZBUFF_compressFlush(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr); -ZBUFF_DEPRECATED("use ZSTD_endStream") size_t ZBUFF_compressEnd(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr); - -/*-************************************************* -* Streaming compression - howto -* -* A ZBUFF_CCtx object is required to track streaming operation. -* Use ZBUFF_createCCtx() and ZBUFF_freeCCtx() to create/release resources. -* ZBUFF_CCtx objects can be reused multiple times. -* -* Start by initializing ZBUF_CCtx. -* Use ZBUFF_compressInit() to start a new compression operation. -* Use ZBUFF_compressInitDictionary() for a compression which requires a dictionary. -* -* Use ZBUFF_compressContinue() repetitively to consume input stream. -* *srcSizePtr and *dstCapacityPtr can be any size. -* The function will report how many bytes were read or written within *srcSizePtr and *dstCapacityPtr. -* Note that it may not consume the entire input, in which case it's up to the caller to present again remaining data. -* The content of `dst` will be overwritten (up to *dstCapacityPtr) at each call, so save its content if it matters or change @dst . -* @return : a hint to preferred nb of bytes to use as input for next function call (it's just a hint, to improve latency) -* or an error code, which can be tested using ZBUFF_isError(). -* -* At any moment, it's possible to flush whatever data remains within buffer, using ZBUFF_compressFlush(). -* The nb of bytes written into `dst` will be reported into *dstCapacityPtr. -* Note that the function cannot output more than *dstCapacityPtr, -* therefore, some content might still be left into internal buffer if *dstCapacityPtr is too small. -* @return : nb of bytes still present into internal buffer (0 if it's empty) -* or an error code, which can be tested using ZBUFF_isError(). -* -* ZBUFF_compressEnd() instructs to finish a frame. -* It will perform a flush and write frame epilogue. -* The epilogue is required for decoders to consider a frame completed. -* Similar to ZBUFF_compressFlush(), it may not be able to output the entire internal buffer content if *dstCapacityPtr is too small. -* In which case, call again ZBUFF_compressFlush() to complete the flush. -* @return : nb of bytes still present into internal buffer (0 if it's empty) -* or an error code, which can be tested using ZBUFF_isError(). -* -* Hint : _recommended buffer_ sizes (not compulsory) : ZBUFF_recommendedCInSize() / ZBUFF_recommendedCOutSize() -* input : ZBUFF_recommendedCInSize==128 KB block size is the internal unit, use this value to reduce intermediate stages (better latency) -* output : ZBUFF_recommendedCOutSize==ZSTD_compressBound(128 KB) + 3 + 3 : ensures it's always possible to write/flush/end a full block. Skip some buffering. -* By using both, it ensures that input will be entirely consumed, and output will always contain the result, reducing intermediate buffering. -* **************************************************/ - - -typedef ZSTD_DStream ZBUFF_DCtx; -ZBUFF_DEPRECATED("use ZSTD_createDStream") ZBUFF_DCtx* ZBUFF_createDCtx(void); -ZBUFF_DEPRECATED("use ZSTD_freeDStream") size_t ZBUFF_freeDCtx(ZBUFF_DCtx* dctx); - -ZBUFF_DEPRECATED("use ZSTD_initDStream") size_t ZBUFF_decompressInit(ZBUFF_DCtx* dctx); -ZBUFF_DEPRECATED("use ZSTD_initDStream_usingDict") size_t ZBUFF_decompressInitDictionary(ZBUFF_DCtx* dctx, const void* dict, size_t dictSize); - -ZBUFF_DEPRECATED("use ZSTD_decompressStream") size_t ZBUFF_decompressContinue(ZBUFF_DCtx* dctx, - void* dst, size_t* dstCapacityPtr, - const void* src, size_t* srcSizePtr); - -/*-*************************************************************************** -* Streaming decompression howto -* -* A ZBUFF_DCtx object is required to track streaming operations. -* Use ZBUFF_createDCtx() and ZBUFF_freeDCtx() to create/release resources. -* Use ZBUFF_decompressInit() to start a new decompression operation, -* or ZBUFF_decompressInitDictionary() if decompression requires a dictionary. -* Note that ZBUFF_DCtx objects can be re-init multiple times. -* -* Use ZBUFF_decompressContinue() repetitively to consume your input. -* *srcSizePtr and *dstCapacityPtr can be any size. -* The function will report how many bytes were read or written by modifying *srcSizePtr and *dstCapacityPtr. -* Note that it may not consume the entire input, in which case it's up to the caller to present remaining input again. -* The content of `dst` will be overwritten (up to *dstCapacityPtr) at each function call, so save its content if it matters, or change `dst`. -* @return : 0 when a frame is completely decoded and fully flushed, -* 1 when there is still some data left within internal buffer to flush, -* >1 when more data is expected, with value being a suggested next input size (it's just a hint, which helps latency), -* or an error code, which can be tested using ZBUFF_isError(). -* -* Hint : recommended buffer sizes (not compulsory) : ZBUFF_recommendedDInSize() and ZBUFF_recommendedDOutSize() -* output : ZBUFF_recommendedDOutSize== 128 KB block size is the internal unit, it ensures it's always possible to write a full block when decoded. -* input : ZBUFF_recommendedDInSize == 128KB + 3; -* just follow indications from ZBUFF_decompressContinue() to minimize latency. It should always be <= 128 KB + 3 . -* *******************************************************************************/ - - -/* ************************************* -* Tool functions -***************************************/ -ZBUFF_DEPRECATED("use ZSTD_isError") unsigned ZBUFF_isError(size_t errorCode); -ZBUFF_DEPRECATED("use ZSTD_getErrorName") const char* ZBUFF_getErrorName(size_t errorCode); - -/** Functions below provide recommended buffer sizes for Compression or Decompression operations. -* These sizes are just hints, they tend to offer better latency */ -ZBUFF_DEPRECATED("use ZSTD_CStreamInSize") size_t ZBUFF_recommendedCInSize(void); -ZBUFF_DEPRECATED("use ZSTD_CStreamOutSize") size_t ZBUFF_recommendedCOutSize(void); -ZBUFF_DEPRECATED("use ZSTD_DStreamInSize") size_t ZBUFF_recommendedDInSize(void); -ZBUFF_DEPRECATED("use ZSTD_DStreamOutSize") size_t ZBUFF_recommendedDOutSize(void); - -#endif /* ZSTD_BUFFERED_H_23987 */ - - -#ifdef ZBUFF_STATIC_LINKING_ONLY -#ifndef ZBUFF_STATIC_H_30298098432 -#define ZBUFF_STATIC_H_30298098432 - -/* ==================================================================================== - * The definitions in this section are considered experimental. - * They should never be used in association with a dynamic library, as they may change in the future. - * They are provided for advanced usages. - * Use them only in association with static linking. - * ==================================================================================== */ - -/*--- Dependency ---*/ -#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters, ZSTD_customMem */ -#include "../zstd.h" - - -/*--- Custom memory allocator ---*/ -/*! ZBUFF_createCCtx_advanced() : - * Create a ZBUFF compression context using external alloc and free functions */ -ZBUFF_DEPRECATED("use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem); - -/*! ZBUFF_createDCtx_advanced() : - * Create a ZBUFF decompression context using external alloc and free functions */ -ZBUFF_DEPRECATED("use ZSTD_createDStream_advanced") ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem); - - -/*--- Advanced Streaming Initialization ---*/ -ZBUFF_DEPRECATED("use ZSTD_initDStream_usingDict") size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc, - const void* dict, size_t dictSize, - ZSTD_parameters params, unsigned long long pledgedSrcSize); - - -#endif /* ZBUFF_STATIC_H_30298098432 */ -#endif /* ZBUFF_STATIC_LINKING_ONLY */ - - -#if defined (__cplusplus) -} -#endif diff --git a/third_party/zstd/lib/deprecated/zbuff_common.c b/third_party/zstd/lib/deprecated/zbuff_common.c deleted file mode 100644 index 5a2f2db..0000000 --- a/third_party/zstd/lib/deprecated/zbuff_common.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/*-************************************* -* Dependencies -***************************************/ -#include "../common/error_private.h" -#include "zbuff.h" - -/*-**************************************** -* ZBUFF Error Management (deprecated) -******************************************/ - -/*! ZBUFF_isError() : -* tells if a return value is an error code */ -unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); } -/*! ZBUFF_getErrorName() : -* provides error code string from function result (useful for debugging) */ -const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } diff --git a/third_party/zstd/lib/deprecated/zbuff_compress.c b/third_party/zstd/lib/deprecated/zbuff_compress.c deleted file mode 100644 index 1d86821..0000000 --- a/third_party/zstd/lib/deprecated/zbuff_compress.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - - -/* ************************************* -* Dependencies -***************************************/ -#define ZBUFF_STATIC_LINKING_ONLY -#include "zbuff.h" -#include "../common/error_private.h" - - -/*-*********************************************************** -* Streaming compression -* -* A ZBUFF_CCtx object is required to track streaming operation. -* Use ZBUFF_createCCtx() and ZBUFF_freeCCtx() to create/release resources. -* Use ZBUFF_compressInit() to start a new compression operation. -* ZBUFF_CCtx objects can be reused multiple times. -* -* Use ZBUFF_compressContinue() repetitively to consume your input. -* *srcSizePtr and *dstCapacityPtr can be any size. -* The function will report how many bytes were read or written by modifying *srcSizePtr and *dstCapacityPtr. -* Note that it may not consume the entire input, in which case it's up to the caller to call again the function with remaining input. -* The content of dst will be overwritten (up to *dstCapacityPtr) at each function call, so save its content if it matters or change dst . -* @return : a hint to preferred nb of bytes to use as input for next function call (it's only a hint, to improve latency) -* or an error code, which can be tested using ZBUFF_isError(). -* -* ZBUFF_compressFlush() can be used to instruct ZBUFF to compress and output whatever remains within its buffer. -* Note that it will not output more than *dstCapacityPtr. -* Therefore, some content might still be left into its internal buffer if dst buffer is too small. -* @return : nb of bytes still present into internal buffer (0 if it's empty) -* or an error code, which can be tested using ZBUFF_isError(). -* -* ZBUFF_compressEnd() instructs to finish a frame. -* It will perform a flush and write frame epilogue. -* Similar to ZBUFF_compressFlush(), it may not be able to output the entire internal buffer content if *dstCapacityPtr is too small. -* @return : nb of bytes still present into internal buffer (0 if it's empty) -* or an error code, which can be tested using ZBUFF_isError(). -* -* Hint : recommended buffer sizes (not compulsory) -* input : ZSTD_BLOCKSIZE_MAX (128 KB), internal unit size, it improves latency to use this value. -* output : ZSTD_compressBound(ZSTD_BLOCKSIZE_MAX) + ZSTD_blockHeaderSize + ZBUFF_endFrameSize : ensures it's always possible to write/flush/end a full block at best speed. -* ***********************************************************/ - -ZBUFF_CCtx* ZBUFF_createCCtx(void) -{ - return ZSTD_createCStream(); -} - -ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem) -{ - return ZSTD_createCStream_advanced(customMem); -} - -size_t ZBUFF_freeCCtx(ZBUFF_CCtx* zbc) -{ - return ZSTD_freeCStream(zbc); -} - - -/* ====== Initialization ====== */ - -size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc, - const void* dict, size_t dictSize, - ZSTD_parameters params, unsigned long long pledgedSrcSize) -{ - if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; /* preserve "0 == unknown" behavior */ - FORWARD_IF_ERROR(ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setPledgedSrcSize(zbc, pledgedSrcSize), ""); - - FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_windowLog, params.cParams.windowLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_hashLog, params.cParams.hashLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_chainLog, params.cParams.chainLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_searchLog, params.cParams.searchLog), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_minMatch, params.cParams.minMatch), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_targetLength, params.cParams.targetLength), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_strategy, params.cParams.strategy), ""); - - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_contentSizeFlag, params.fParams.contentSizeFlag), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_checksumFlag, params.fParams.checksumFlag), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_dictIDFlag, params.fParams.noDictIDFlag), ""); - - FORWARD_IF_ERROR(ZSTD_CCtx_loadDictionary(zbc, dict, dictSize), ""); - return 0; -} - -size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* zbc, const void* dict, size_t dictSize, int compressionLevel) -{ - FORWARD_IF_ERROR(ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_compressionLevel, compressionLevel), ""); - FORWARD_IF_ERROR(ZSTD_CCtx_loadDictionary(zbc, dict, dictSize), ""); - return 0; -} - -size_t ZBUFF_compressInit(ZBUFF_CCtx* zbc, int compressionLevel) -{ - return ZSTD_initCStream(zbc, compressionLevel); -} - -/* ====== Compression ====== */ - - -size_t ZBUFF_compressContinue(ZBUFF_CCtx* zbc, - void* dst, size_t* dstCapacityPtr, - const void* src, size_t* srcSizePtr) -{ - size_t result; - ZSTD_outBuffer outBuff; - ZSTD_inBuffer inBuff; - outBuff.dst = dst; - outBuff.pos = 0; - outBuff.size = *dstCapacityPtr; - inBuff.src = src; - inBuff.pos = 0; - inBuff.size = *srcSizePtr; - result = ZSTD_compressStream(zbc, &outBuff, &inBuff); - *dstCapacityPtr = outBuff.pos; - *srcSizePtr = inBuff.pos; - return result; -} - - - -/* ====== Finalize ====== */ - -size_t ZBUFF_compressFlush(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacityPtr) -{ - size_t result; - ZSTD_outBuffer outBuff; - outBuff.dst = dst; - outBuff.pos = 0; - outBuff.size = *dstCapacityPtr; - result = ZSTD_flushStream(zbc, &outBuff); - *dstCapacityPtr = outBuff.pos; - return result; -} - - -size_t ZBUFF_compressEnd(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacityPtr) -{ - size_t result; - ZSTD_outBuffer outBuff; - outBuff.dst = dst; - outBuff.pos = 0; - outBuff.size = *dstCapacityPtr; - result = ZSTD_endStream(zbc, &outBuff); - *dstCapacityPtr = outBuff.pos; - return result; -} - - - -/* ************************************* -* Tool functions -***************************************/ -size_t ZBUFF_recommendedCInSize(void) { return ZSTD_CStreamInSize(); } -size_t ZBUFF_recommendedCOutSize(void) { return ZSTD_CStreamOutSize(); } diff --git a/third_party/zstd/lib/deprecated/zbuff_decompress.c b/third_party/zstd/lib/deprecated/zbuff_decompress.c deleted file mode 100644 index 12a66af..0000000 --- a/third_party/zstd/lib/deprecated/zbuff_decompress.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - - -/* ************************************* -* Dependencies -***************************************/ -#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* suppress warning on ZSTD_initDStream_usingDict */ -#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */ -#define ZBUFF_STATIC_LINKING_ONLY -#include "zbuff.h" - - -ZBUFF_DCtx* ZBUFF_createDCtx(void) -{ - return ZSTD_createDStream(); -} - -ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem) -{ - return ZSTD_createDStream_advanced(customMem); -} - -size_t ZBUFF_freeDCtx(ZBUFF_DCtx* zbd) -{ - return ZSTD_freeDStream(zbd); -} - - -/* *** Initialization *** */ - -size_t ZBUFF_decompressInitDictionary(ZBUFF_DCtx* zbd, const void* dict, size_t dictSize) -{ - return ZSTD_initDStream_usingDict(zbd, dict, dictSize); -} - -size_t ZBUFF_decompressInit(ZBUFF_DCtx* zbd) -{ - return ZSTD_initDStream(zbd); -} - - -/* *** Decompression *** */ - -size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd, - void* dst, size_t* dstCapacityPtr, - const void* src, size_t* srcSizePtr) -{ - ZSTD_outBuffer outBuff; - ZSTD_inBuffer inBuff; - size_t result; - outBuff.dst = dst; - outBuff.pos = 0; - outBuff.size = *dstCapacityPtr; - inBuff.src = src; - inBuff.pos = 0; - inBuff.size = *srcSizePtr; - result = ZSTD_decompressStream(zbd, &outBuff, &inBuff); - *dstCapacityPtr = outBuff.pos; - *srcSizePtr = inBuff.pos; - return result; -} - - -/* ************************************* -* Tool functions -***************************************/ -size_t ZBUFF_recommendedDInSize(void) { return ZSTD_DStreamInSize(); } -size_t ZBUFF_recommendedDOutSize(void) { return ZSTD_DStreamOutSize(); } diff --git a/third_party/zstd/lib/dictBuilder/cover.c b/third_party/zstd/lib/dictBuilder/cover.c deleted file mode 100644 index 2ef33c7..0000000 --- a/third_party/zstd/lib/dictBuilder/cover.c +++ /dev/null @@ -1,1302 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/* ***************************************************************************** - * Constructs a dictionary using a heuristic based on the following paper: - * - * Liao, Petri, Moffat, Wirth - * Effective Construction of Relative Lempel-Ziv Dictionaries - * Published in WWW 2016. - * - * Adapted from code originally written by @ot (Giuseppe Ottaviano). - ******************************************************************************/ - -/*-************************************* -* Dependencies -***************************************/ -/* qsort_r is an extension. */ -#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__gnu_linux__) || \ - defined(__CYGWIN__) || defined(__MSYS__) -#if !defined(_GNU_SOURCE) && !defined(__ANDROID__) /* NDK doesn't ship qsort_r(). */ -#define _GNU_SOURCE -#endif -#endif - -#include /* fprintf */ -#include /* malloc, free, qsort_r */ - -#include /* memset */ -#include /* clock */ - -#ifndef ZDICT_STATIC_LINKING_ONLY -# define ZDICT_STATIC_LINKING_ONLY -#endif - -#include "../common/mem.h" /* read */ -#include "../common/pool.h" /* POOL_ctx */ -#include "../common/threading.h" /* ZSTD_pthread_mutex_t */ -#include "../common/zstd_internal.h" /* includes zstd.h */ -#include "../common/bits.h" /* ZSTD_highbit32 */ -#include "../zdict.h" -#include "cover.h" - -/*-************************************* -* Constants -***************************************/ -/** -* There are 32bit indexes used to ref samples, so limit samples size to 4GB -* on 64bit builds. -* For 32bit builds we choose 1 GB. -* Most 32bit platforms have 2GB user-mode addressable space and we allocate a large -* contiguous buffer, so 1GB is already a high limit. -*/ -#define COVER_MAX_SAMPLES_SIZE (sizeof(size_t) == 8 ? ((unsigned)-1) : ((unsigned)1 GB)) -#define COVER_DEFAULT_SPLITPOINT 1.0 - -/*-************************************* -* Console display -***************************************/ -#ifndef LOCALDISPLAYLEVEL -static int g_displayLevel = 0; -#endif -#undef DISPLAY -#define DISPLAY(...) \ - { \ - fprintf(stderr, __VA_ARGS__); \ - fflush(stderr); \ - } -#undef LOCALDISPLAYLEVEL -#define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ - if (displayLevel >= l) { \ - DISPLAY(__VA_ARGS__); \ - } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ -#undef DISPLAYLEVEL -#define DISPLAYLEVEL(l, ...) LOCALDISPLAYLEVEL(g_displayLevel, l, __VA_ARGS__) - -#ifndef LOCALDISPLAYUPDATE -static const clock_t g_refreshRate = CLOCKS_PER_SEC * 15 / 100; -static clock_t g_time = 0; -#endif -#undef LOCALDISPLAYUPDATE -#define LOCALDISPLAYUPDATE(displayLevel, l, ...) \ - if (displayLevel >= l) { \ - if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) { \ - g_time = clock(); \ - DISPLAY(__VA_ARGS__); \ - } \ - } -#undef DISPLAYUPDATE -#define DISPLAYUPDATE(l, ...) LOCALDISPLAYUPDATE(g_displayLevel, l, __VA_ARGS__) - -/*-************************************* -* Hash table -*************************************** -* A small specialized hash map for storing activeDmers. -* The map does not resize, so if it becomes full it will loop forever. -* Thus, the map must be large enough to store every value. -* The map implements linear probing and keeps its load less than 0.5. -*/ - -#define MAP_EMPTY_VALUE ((U32)-1) -typedef struct COVER_map_pair_t_s { - U32 key; - U32 value; -} COVER_map_pair_t; - -typedef struct COVER_map_s { - COVER_map_pair_t *data; - U32 sizeLog; - U32 size; - U32 sizeMask; -} COVER_map_t; - -/** - * Clear the map. - */ -static void COVER_map_clear(COVER_map_t *map) { - memset(map->data, MAP_EMPTY_VALUE, map->size * sizeof(COVER_map_pair_t)); -} - -/** - * Initializes a map of the given size. - * Returns 1 on success and 0 on failure. - * The map must be destroyed with COVER_map_destroy(). - * The map is only guaranteed to be large enough to hold size elements. - */ -static int COVER_map_init(COVER_map_t *map, U32 size) { - map->sizeLog = ZSTD_highbit32(size) + 2; - map->size = (U32)1 << map->sizeLog; - map->sizeMask = map->size - 1; - map->data = (COVER_map_pair_t *)malloc(map->size * sizeof(COVER_map_pair_t)); - if (!map->data) { - map->sizeLog = 0; - map->size = 0; - return 0; - } - COVER_map_clear(map); - return 1; -} - -/** - * Internal hash function - */ -static const U32 COVER_prime4bytes = 2654435761U; -static U32 COVER_map_hash(COVER_map_t *map, U32 key) { - return (key * COVER_prime4bytes) >> (32 - map->sizeLog); -} - -/** - * Helper function that returns the index that a key should be placed into. - */ -static U32 COVER_map_index(COVER_map_t *map, U32 key) { - const U32 hash = COVER_map_hash(map, key); - U32 i; - for (i = hash;; i = (i + 1) & map->sizeMask) { - COVER_map_pair_t *pos = &map->data[i]; - if (pos->value == MAP_EMPTY_VALUE) { - return i; - } - if (pos->key == key) { - return i; - } - } -} - -/** - * Returns the pointer to the value for key. - * If key is not in the map, it is inserted and the value is set to 0. - * The map must not be full. - */ -static U32 *COVER_map_at(COVER_map_t *map, U32 key) { - COVER_map_pair_t *pos = &map->data[COVER_map_index(map, key)]; - if (pos->value == MAP_EMPTY_VALUE) { - pos->key = key; - pos->value = 0; - } - return &pos->value; -} - -/** - * Deletes key from the map if present. - */ -static void COVER_map_remove(COVER_map_t *map, U32 key) { - U32 i = COVER_map_index(map, key); - COVER_map_pair_t *del = &map->data[i]; - U32 shift = 1; - if (del->value == MAP_EMPTY_VALUE) { - return; - } - for (i = (i + 1) & map->sizeMask;; i = (i + 1) & map->sizeMask) { - COVER_map_pair_t *const pos = &map->data[i]; - /* If the position is empty we are done */ - if (pos->value == MAP_EMPTY_VALUE) { - del->value = MAP_EMPTY_VALUE; - return; - } - /* If pos can be moved to del do so */ - if (((i - COVER_map_hash(map, pos->key)) & map->sizeMask) >= shift) { - del->key = pos->key; - del->value = pos->value; - del = pos; - shift = 1; - } else { - ++shift; - } - } -} - -/** - * Destroys a map that is inited with COVER_map_init(). - */ -static void COVER_map_destroy(COVER_map_t *map) { - if (map->data) { - free(map->data); - } - map->data = NULL; - map->size = 0; -} - -/*-************************************* -* Context -***************************************/ - -typedef struct { - const BYTE *samples; - size_t *offsets; - const size_t *samplesSizes; - size_t nbSamples; - size_t nbTrainSamples; - size_t nbTestSamples; - U32 *suffix; - size_t suffixSize; - U32 *freqs; - U32 *dmerAt; - unsigned d; -} COVER_ctx_t; - -#if !defined(_GNU_SOURCE) && !defined(__APPLE__) && !defined(_MSC_VER) -/* C90 only offers qsort() that needs a global context. */ -static COVER_ctx_t *g_coverCtx = NULL; -#endif - -/*-************************************* -* Helper functions -***************************************/ - -/** - * Returns the sum of the sample sizes. - */ -size_t COVER_sum(const size_t *samplesSizes, unsigned nbSamples) { - size_t sum = 0; - unsigned i; - for (i = 0; i < nbSamples; ++i) { - sum += samplesSizes[i]; - } - return sum; -} - -/** - * Returns -1 if the dmer at lp is less than the dmer at rp. - * Return 0 if the dmers at lp and rp are equal. - * Returns 1 if the dmer at lp is greater than the dmer at rp. - */ -static int COVER_cmp(COVER_ctx_t *ctx, const void *lp, const void *rp) { - U32 const lhs = *(U32 const *)lp; - U32 const rhs = *(U32 const *)rp; - return memcmp(ctx->samples + lhs, ctx->samples + rhs, ctx->d); -} -/** - * Faster version for d <= 8. - */ -static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) { - U64 const mask = (ctx->d == 8) ? (U64)-1 : (((U64)1 << (8 * ctx->d)) - 1); - U64 const lhs = MEM_readLE64(ctx->samples + *(U32 const *)lp) & mask; - U64 const rhs = MEM_readLE64(ctx->samples + *(U32 const *)rp) & mask; - if (lhs < rhs) { - return -1; - } - return (lhs > rhs); -} - -/** - * Same as COVER_cmp() except ties are broken by pointer value - */ -#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__) -static int WIN_CDECL COVER_strict_cmp(void* g_coverCtx, const void* lp, const void* rp) { -#elif defined(_GNU_SOURCE) -static int COVER_strict_cmp(const void *lp, const void *rp, void *g_coverCtx) { -#else /* C90 fallback.*/ -static int COVER_strict_cmp(const void *lp, const void *rp) { -#endif - int result = COVER_cmp((COVER_ctx_t*)g_coverCtx, lp, rp); - if (result == 0) { - result = lp < rp ? -1 : 1; - } - return result; -} -/** - * Faster version for d <= 8. - */ -#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__) -static int WIN_CDECL COVER_strict_cmp8(void* g_coverCtx, const void* lp, const void* rp) { -#elif defined(_GNU_SOURCE) -static int COVER_strict_cmp8(const void *lp, const void *rp, void *g_coverCtx) { -#else /* C90 fallback.*/ -static int COVER_strict_cmp8(const void *lp, const void *rp) { -#endif - int result = COVER_cmp8((COVER_ctx_t*)g_coverCtx, lp, rp); - if (result == 0) { - result = lp < rp ? -1 : 1; - } - return result; -} - -/** - * Abstract away divergence of qsort_r() parameters. - * Hopefully when C11 become the norm, we will be able - * to clean it up. - */ -static void stableSort(COVER_ctx_t *ctx) { -#if defined(__APPLE__) - qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), - ctx, - (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); -#elif defined(_GNU_SOURCE) - qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), - (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), - ctx); -#elif defined(_WIN32) && defined(_MSC_VER) - qsort_s(ctx->suffix, ctx->suffixSize, sizeof(U32), - (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), - ctx); -#elif defined(__OpenBSD__) - g_coverCtx = ctx; - mergesort(ctx->suffix, ctx->suffixSize, sizeof(U32), - (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); -#else /* C90 fallback.*/ - g_coverCtx = ctx; - /* TODO(cavalcanti): implement a reentrant qsort() when is not available. */ - qsort(ctx->suffix, ctx->suffixSize, sizeof(U32), - (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); -#endif -} - -/** - * Returns the first pointer in [first, last) whose element does not compare - * less than value. If no such element exists it returns last. - */ -static const size_t *COVER_lower_bound(const size_t* first, const size_t* last, - size_t value) { - size_t count = (size_t)(last - first); - assert(last >= first); - while (count != 0) { - size_t step = count / 2; - const size_t *ptr = first; - ptr += step; - if (*ptr < value) { - first = ++ptr; - count -= step + 1; - } else { - count = step; - } - } - return first; -} - -/** - * Generic groupBy function. - * Groups an array sorted by cmp into groups with equivalent values. - * Calls grp for each group. - */ -static void -COVER_groupBy(const void *data, size_t count, size_t size, COVER_ctx_t *ctx, - int (*cmp)(COVER_ctx_t *, const void *, const void *), - void (*grp)(COVER_ctx_t *, const void *, const void *)) { - const BYTE *ptr = (const BYTE *)data; - size_t num = 0; - while (num < count) { - const BYTE *grpEnd = ptr + size; - ++num; - while (num < count && cmp(ctx, ptr, grpEnd) == 0) { - grpEnd += size; - ++num; - } - grp(ctx, ptr, grpEnd); - ptr = grpEnd; - } -} - -/*-************************************* -* Cover functions -***************************************/ - -/** - * Called on each group of positions with the same dmer. - * Counts the frequency of each dmer and saves it in the suffix array. - * Fills `ctx->dmerAt`. - */ -static void COVER_group(COVER_ctx_t *ctx, const void *group, - const void *groupEnd) { - /* The group consists of all the positions with the same first d bytes. */ - const U32 *grpPtr = (const U32 *)group; - const U32 *grpEnd = (const U32 *)groupEnd; - /* The dmerId is how we will reference this dmer. - * This allows us to map the whole dmer space to a much smaller space, the - * size of the suffix array. - */ - const U32 dmerId = (U32)(grpPtr - ctx->suffix); - /* Count the number of samples this dmer shows up in */ - U32 freq = 0; - /* Details */ - const size_t *curOffsetPtr = ctx->offsets; - const size_t *offsetsEnd = ctx->offsets + ctx->nbSamples; - /* Once *grpPtr >= curSampleEnd this occurrence of the dmer is in a - * different sample than the last. - */ - size_t curSampleEnd = ctx->offsets[0]; - for (; grpPtr != grpEnd; ++grpPtr) { - /* Save the dmerId for this position so we can get back to it. */ - ctx->dmerAt[*grpPtr] = dmerId; - /* Dictionaries only help for the first reference to the dmer. - * After that zstd can reference the match from the previous reference. - * So only count each dmer once for each sample it is in. - */ - if (*grpPtr < curSampleEnd) { - continue; - } - freq += 1; - /* Binary search to find the end of the sample *grpPtr is in. - * In the common case that grpPtr + 1 == grpEnd we can skip the binary - * search because the loop is over. - */ - if (grpPtr + 1 != grpEnd) { - const size_t *sampleEndPtr = - COVER_lower_bound(curOffsetPtr, offsetsEnd, *grpPtr); - curSampleEnd = *sampleEndPtr; - curOffsetPtr = sampleEndPtr + 1; - } - } - /* At this point we are never going to look at this segment of the suffix - * array again. We take advantage of this fact to save memory. - * We store the frequency of the dmer in the first position of the group, - * which is dmerId. - */ - ctx->suffix[dmerId] = freq; -} - - -/** - * Selects the best segment in an epoch. - * Segments of are scored according to the function: - * - * Let F(d) be the frequency of dmer d. - * Let S_i be the dmer at position i of segment S which has length k. - * - * Score(S) = F(S_1) + F(S_2) + ... + F(S_{k-d+1}) - * - * Once the dmer d is in the dictionary we set F(d) = 0. - */ -static COVER_segment_t COVER_selectSegment(const COVER_ctx_t *ctx, U32 *freqs, - COVER_map_t *activeDmers, U32 begin, - U32 end, - ZDICT_cover_params_t parameters) { - /* Constants */ - const U32 k = parameters.k; - const U32 d = parameters.d; - const U32 dmersInK = k - d + 1; - /* Try each segment (activeSegment) and save the best (bestSegment) */ - COVER_segment_t bestSegment = {0, 0, 0}; - COVER_segment_t activeSegment; - /* Reset the activeDmers in the segment */ - COVER_map_clear(activeDmers); - /* The activeSegment starts at the beginning of the epoch. */ - activeSegment.begin = begin; - activeSegment.end = begin; - activeSegment.score = 0; - /* Slide the activeSegment through the whole epoch. - * Save the best segment in bestSegment. - */ - while (activeSegment.end < end) { - /* The dmerId for the dmer at the next position */ - U32 newDmer = ctx->dmerAt[activeSegment.end]; - /* The entry in activeDmers for this dmerId */ - U32 *newDmerOcc = COVER_map_at(activeDmers, newDmer); - /* If the dmer isn't already present in the segment add its score. */ - if (*newDmerOcc == 0) { - /* The paper suggest using the L-0.5 norm, but experiments show that it - * doesn't help. - */ - activeSegment.score += freqs[newDmer]; - } - /* Add the dmer to the segment */ - activeSegment.end += 1; - *newDmerOcc += 1; - - /* If the window is now too large, drop the first position */ - if (activeSegment.end - activeSegment.begin == dmersInK + 1) { - U32 delDmer = ctx->dmerAt[activeSegment.begin]; - U32 *delDmerOcc = COVER_map_at(activeDmers, delDmer); - activeSegment.begin += 1; - *delDmerOcc -= 1; - /* If this is the last occurrence of the dmer, subtract its score */ - if (*delDmerOcc == 0) { - COVER_map_remove(activeDmers, delDmer); - activeSegment.score -= freqs[delDmer]; - } - } - - /* If this segment is the best so far save it */ - if (activeSegment.score > bestSegment.score) { - bestSegment = activeSegment; - } - } - { - /* Trim off the zero frequency head and tail from the segment. */ - U32 newBegin = bestSegment.end; - U32 newEnd = bestSegment.begin; - U32 pos; - for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { - U32 freq = freqs[ctx->dmerAt[pos]]; - if (freq != 0) { - newBegin = MIN(newBegin, pos); - newEnd = pos + 1; - } - } - bestSegment.begin = newBegin; - bestSegment.end = newEnd; - } - { - /* Zero out the frequency of each dmer covered by the chosen segment. */ - U32 pos; - for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { - freqs[ctx->dmerAt[pos]] = 0; - } - } - return bestSegment; -} - -/** - * Check the validity of the parameters. - * Returns non-zero if the parameters are valid and 0 otherwise. - */ -static int COVER_checkParameters(ZDICT_cover_params_t parameters, - size_t maxDictSize) { - /* k and d are required parameters */ - if (parameters.d == 0 || parameters.k == 0) { - return 0; - } - /* k <= maxDictSize */ - if (parameters.k > maxDictSize) { - return 0; - } - /* d <= k */ - if (parameters.d > parameters.k) { - return 0; - } - /* 0 < splitPoint <= 1 */ - if (parameters.splitPoint <= 0 || parameters.splitPoint > 1){ - return 0; - } - return 1; -} - -/** - * Clean up a context initialized with `COVER_ctx_init()`. - */ -static void COVER_ctx_destroy(COVER_ctx_t *ctx) { - if (!ctx) { - return; - } - if (ctx->suffix) { - free(ctx->suffix); - ctx->suffix = NULL; - } - if (ctx->freqs) { - free(ctx->freqs); - ctx->freqs = NULL; - } - if (ctx->dmerAt) { - free(ctx->dmerAt); - ctx->dmerAt = NULL; - } - if (ctx->offsets) { - free(ctx->offsets); - ctx->offsets = NULL; - } -} - -/** - * Prepare a context for dictionary building. - * The context is only dependent on the parameter `d` and can be used multiple - * times. - * Returns 0 on success or error code on error. - * The context must be destroyed with `COVER_ctx_destroy()`. - */ -static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer, - const size_t *samplesSizes, unsigned nbSamples, - unsigned d, double splitPoint) -{ - const BYTE *const samples = (const BYTE *)samplesBuffer; - const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples); - /* Split samples into testing and training sets */ - const unsigned nbTrainSamples = splitPoint < 1.0 ? (unsigned)((double)nbSamples * splitPoint) : nbSamples; - const unsigned nbTestSamples = splitPoint < 1.0 ? nbSamples - nbTrainSamples : nbSamples; - const size_t trainingSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes, nbTrainSamples) : totalSamplesSize; - const size_t testSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes + nbTrainSamples, nbTestSamples) : totalSamplesSize; - /* Checks */ - if (totalSamplesSize < MAX(d, sizeof(U64)) || - totalSamplesSize >= (size_t)COVER_MAX_SAMPLES_SIZE) { - DISPLAYLEVEL(1, "Total samples size is too large (%u MB), maximum size is %u MB\n", - (unsigned)(totalSamplesSize>>20), (COVER_MAX_SAMPLES_SIZE >> 20)); - return ERROR(srcSize_wrong); - } - /* Check if there are at least 5 training samples */ - if (nbTrainSamples < 5) { - DISPLAYLEVEL(1, "Total number of training samples is %u and is invalid.", nbTrainSamples); - return ERROR(srcSize_wrong); - } - /* Check if there's testing sample */ - if (nbTestSamples < 1) { - DISPLAYLEVEL(1, "Total number of testing samples is %u and is invalid.", nbTestSamples); - return ERROR(srcSize_wrong); - } - /* Zero the context */ - memset(ctx, 0, sizeof(*ctx)); - DISPLAYLEVEL(2, "Training on %u samples of total size %u\n", nbTrainSamples, - (unsigned)trainingSamplesSize); - DISPLAYLEVEL(2, "Testing on %u samples of total size %u\n", nbTestSamples, - (unsigned)testSamplesSize); - ctx->samples = samples; - ctx->samplesSizes = samplesSizes; - ctx->nbSamples = nbSamples; - ctx->nbTrainSamples = nbTrainSamples; - ctx->nbTestSamples = nbTestSamples; - /* Partial suffix array */ - ctx->suffixSize = trainingSamplesSize - MAX(d, sizeof(U64)) + 1; - ctx->suffix = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); - /* Maps index to the dmerID */ - ctx->dmerAt = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); - /* The offsets of each file */ - ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t)); - if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) { - DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n"); - COVER_ctx_destroy(ctx); - return ERROR(memory_allocation); - } - ctx->freqs = NULL; - ctx->d = d; - - /* Fill offsets from the samplesSizes */ - { - U32 i; - ctx->offsets[0] = 0; - for (i = 1; i <= nbSamples; ++i) { - ctx->offsets[i] = ctx->offsets[i - 1] + samplesSizes[i - 1]; - } - } - DISPLAYLEVEL(2, "Constructing partial suffix array\n"); - { - /* suffix is a partial suffix array. - * It only sorts suffixes by their first parameters.d bytes. - * The sort is stable, so each dmer group is sorted by position in input. - */ - U32 i; - for (i = 0; i < ctx->suffixSize; ++i) { - ctx->suffix[i] = i; - } - stableSort(ctx); - } - DISPLAYLEVEL(2, "Computing frequencies\n"); - /* For each dmer group (group of positions with the same first d bytes): - * 1. For each position we set dmerAt[position] = dmerID. The dmerID is - * (groupBeginPtr - suffix). This allows us to go from position to - * dmerID so we can look up values in freq. - * 2. We calculate how many samples the dmer occurs in and save it in - * freqs[dmerId]. - */ - COVER_groupBy(ctx->suffix, ctx->suffixSize, sizeof(U32), ctx, - (ctx->d <= 8 ? &COVER_cmp8 : &COVER_cmp), &COVER_group); - ctx->freqs = ctx->suffix; - ctx->suffix = NULL; - return 0; -} - -void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int displayLevel) -{ - const double ratio = (double)nbDmers / (double)maxDictSize; - if (ratio >= 10) { - return; - } - LOCALDISPLAYLEVEL(displayLevel, 1, - "WARNING: The maximum dictionary size %u is too large " - "compared to the source size %u! " - "size(source)/size(dictionary) = %f, but it should be >= " - "10! This may lead to a subpar dictionary! We recommend " - "training on sources at least 10x, and preferably 100x " - "the size of the dictionary! \n", (U32)maxDictSize, - (U32)nbDmers, ratio); -} - -COVER_epoch_info_t COVER_computeEpochs(U32 maxDictSize, - U32 nbDmers, U32 k, U32 passes) -{ - const U32 minEpochSize = k * 10; - COVER_epoch_info_t epochs; - epochs.num = MAX(1, maxDictSize / k / passes); - epochs.size = nbDmers / epochs.num; - if (epochs.size >= minEpochSize) { - assert(epochs.size * epochs.num <= nbDmers); - return epochs; - } - epochs.size = MIN(minEpochSize, nbDmers); - epochs.num = nbDmers / epochs.size; - assert(epochs.size * epochs.num <= nbDmers); - return epochs; -} - -/** - * Given the prepared context build the dictionary. - */ -static size_t COVER_buildDictionary(const COVER_ctx_t *ctx, U32 *freqs, - COVER_map_t *activeDmers, void *dictBuffer, - size_t dictBufferCapacity, - ZDICT_cover_params_t parameters) { - BYTE *const dict = (BYTE *)dictBuffer; - size_t tail = dictBufferCapacity; - /* Divide the data into epochs. We will select one segment from each epoch. */ - const COVER_epoch_info_t epochs = COVER_computeEpochs( - (U32)dictBufferCapacity, (U32)ctx->suffixSize, parameters.k, 4); - const size_t maxZeroScoreRun = MAX(10, MIN(100, epochs.num >> 3)); - size_t zeroScoreRun = 0; - size_t epoch; - DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n", - (U32)epochs.num, (U32)epochs.size); - /* Loop through the epochs until there are no more segments or the dictionary - * is full. - */ - for (epoch = 0; tail > 0; epoch = (epoch + 1) % epochs.num) { - const U32 epochBegin = (U32)(epoch * epochs.size); - const U32 epochEnd = epochBegin + epochs.size; - size_t segmentSize; - /* Select a segment */ - COVER_segment_t segment = COVER_selectSegment( - ctx, freqs, activeDmers, epochBegin, epochEnd, parameters); - /* If the segment covers no dmers, then we are out of content. - * There may be new content in other epochs, for continue for some time. - */ - if (segment.score == 0) { - if (++zeroScoreRun >= maxZeroScoreRun) { - break; - } - continue; - } - zeroScoreRun = 0; - /* Trim the segment if necessary and if it is too small then we are done */ - segmentSize = MIN(segment.end - segment.begin + parameters.d - 1, tail); - if (segmentSize < parameters.d) { - break; - } - /* We fill the dictionary from the back to allow the best segments to be - * referenced with the smallest offsets. - */ - tail -= segmentSize; - memcpy(dict + tail, ctx->samples + segment.begin, segmentSize); - DISPLAYUPDATE( - 2, "\r%u%% ", - (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity)); - } - DISPLAYLEVEL(2, "\r%79s\r", ""); - return tail; -} - -ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_cover( - void *dictBuffer, size_t dictBufferCapacity, - const void *samplesBuffer, const size_t *samplesSizes, unsigned nbSamples, - ZDICT_cover_params_t parameters) -{ - BYTE* const dict = (BYTE*)dictBuffer; - COVER_ctx_t ctx; - COVER_map_t activeDmers; - parameters.splitPoint = 1.0; - /* Initialize global data */ - g_displayLevel = (int)parameters.zParams.notificationLevel; - /* Checks */ - if (!COVER_checkParameters(parameters, dictBufferCapacity)) { - DISPLAYLEVEL(1, "Cover parameters incorrect\n"); - return ERROR(parameter_outOfBound); - } - if (nbSamples == 0) { - DISPLAYLEVEL(1, "Cover must have at least one input file\n"); - return ERROR(srcSize_wrong); - } - if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { - DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", - ZDICT_DICTSIZE_MIN); - return ERROR(dstSize_tooSmall); - } - /* Initialize context and activeDmers */ - { - size_t const initVal = COVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, - parameters.d, parameters.splitPoint); - if (ZSTD_isError(initVal)) { - return initVal; - } - } - COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.suffixSize, g_displayLevel); - if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) { - DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n"); - COVER_ctx_destroy(&ctx); - return ERROR(memory_allocation); - } - - DISPLAYLEVEL(2, "Building dictionary\n"); - { - const size_t tail = - COVER_buildDictionary(&ctx, ctx.freqs, &activeDmers, dictBuffer, - dictBufferCapacity, parameters); - const size_t dictionarySize = ZDICT_finalizeDictionary( - dict, dictBufferCapacity, dict + tail, dictBufferCapacity - tail, - samplesBuffer, samplesSizes, nbSamples, parameters.zParams); - if (!ZSTD_isError(dictionarySize)) { - DISPLAYLEVEL(2, "Constructed dictionary of size %u\n", - (unsigned)dictionarySize); - } - COVER_ctx_destroy(&ctx); - COVER_map_destroy(&activeDmers); - return dictionarySize; - } -} - - - -size_t COVER_checkTotalCompressedSize(const ZDICT_cover_params_t parameters, - const size_t *samplesSizes, const BYTE *samples, - size_t *offsets, - size_t nbTrainSamples, size_t nbSamples, - BYTE *const dict, size_t dictBufferCapacity) { - size_t totalCompressedSize = ERROR(GENERIC); - /* Pointers */ - ZSTD_CCtx *cctx; - ZSTD_CDict *cdict; - void *dst; - /* Local variables */ - size_t dstCapacity; - size_t i; - /* Allocate dst with enough space to compress the maximum sized sample */ - { - size_t maxSampleSize = 0; - i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0; - for (; i < nbSamples; ++i) { - maxSampleSize = MAX(samplesSizes[i], maxSampleSize); - } - dstCapacity = ZSTD_compressBound(maxSampleSize); - dst = malloc(dstCapacity); - } - /* Create the cctx and cdict */ - cctx = ZSTD_createCCtx(); - cdict = ZSTD_createCDict(dict, dictBufferCapacity, - parameters.zParams.compressionLevel); - if (!dst || !cctx || !cdict) { - goto _compressCleanup; - } - /* Compress each sample and sum their sizes (or error) */ - totalCompressedSize = dictBufferCapacity; - i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0; - for (; i < nbSamples; ++i) { - const size_t size = ZSTD_compress_usingCDict( - cctx, dst, dstCapacity, samples + offsets[i], - samplesSizes[i], cdict); - if (ZSTD_isError(size)) { - totalCompressedSize = size; - goto _compressCleanup; - } - totalCompressedSize += size; - } -_compressCleanup: - ZSTD_freeCCtx(cctx); - ZSTD_freeCDict(cdict); - if (dst) { - free(dst); - } - return totalCompressedSize; -} - - -/** - * Initialize the `COVER_best_t`. - */ -void COVER_best_init(COVER_best_t *best) { - if (best==NULL) return; /* compatible with init on NULL */ - (void)ZSTD_pthread_mutex_init(&best->mutex, NULL); - (void)ZSTD_pthread_cond_init(&best->cond, NULL); - best->liveJobs = 0; - best->dict = NULL; - best->dictSize = 0; - best->compressedSize = (size_t)-1; - memset(&best->parameters, 0, sizeof(best->parameters)); -} - -/** - * Wait until liveJobs == 0. - */ -void COVER_best_wait(COVER_best_t *best) { - if (!best) { - return; - } - ZSTD_pthread_mutex_lock(&best->mutex); - while (best->liveJobs != 0) { - ZSTD_pthread_cond_wait(&best->cond, &best->mutex); - } - ZSTD_pthread_mutex_unlock(&best->mutex); -} - -/** - * Call COVER_best_wait() and then destroy the COVER_best_t. - */ -void COVER_best_destroy(COVER_best_t *best) { - if (!best) { - return; - } - COVER_best_wait(best); - if (best->dict) { - free(best->dict); - } - ZSTD_pthread_mutex_destroy(&best->mutex); - ZSTD_pthread_cond_destroy(&best->cond); -} - -/** - * Called when a thread is about to be launched. - * Increments liveJobs. - */ -void COVER_best_start(COVER_best_t *best) { - if (!best) { - return; - } - ZSTD_pthread_mutex_lock(&best->mutex); - ++best->liveJobs; - ZSTD_pthread_mutex_unlock(&best->mutex); -} - -/** - * Called when a thread finishes executing, both on error or success. - * Decrements liveJobs and signals any waiting threads if liveJobs == 0. - * If this dictionary is the best so far save it and its parameters. - */ -void COVER_best_finish(COVER_best_t* best, - ZDICT_cover_params_t parameters, - COVER_dictSelection_t selection) -{ - void* dict = selection.dictContent; - size_t compressedSize = selection.totalCompressedSize; - size_t dictSize = selection.dictSize; - if (!best) { - return; - } - { - size_t liveJobs; - ZSTD_pthread_mutex_lock(&best->mutex); - --best->liveJobs; - liveJobs = best->liveJobs; - /* If the new dictionary is better */ - if (compressedSize < best->compressedSize) { - /* Allocate space if necessary */ - if (!best->dict || best->dictSize < dictSize) { - if (best->dict) { - free(best->dict); - } - best->dict = malloc(dictSize); - if (!best->dict) { - best->compressedSize = ERROR(GENERIC); - best->dictSize = 0; - ZSTD_pthread_cond_signal(&best->cond); - ZSTD_pthread_mutex_unlock(&best->mutex); - return; - } - } - /* Save the dictionary, parameters, and size */ - if (dict) { - memcpy(best->dict, dict, dictSize); - best->dictSize = dictSize; - best->parameters = parameters; - best->compressedSize = compressedSize; - } - } - if (liveJobs == 0) { - ZSTD_pthread_cond_broadcast(&best->cond); - } - ZSTD_pthread_mutex_unlock(&best->mutex); - } -} - -static COVER_dictSelection_t setDictSelection(BYTE* buf, size_t s, size_t csz) -{ - COVER_dictSelection_t ds; - ds.dictContent = buf; - ds.dictSize = s; - ds.totalCompressedSize = csz; - return ds; -} - -COVER_dictSelection_t COVER_dictSelectionError(size_t error) { - return setDictSelection(NULL, 0, error); -} - -unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection) { - return (ZSTD_isError(selection.totalCompressedSize) || !selection.dictContent); -} - -void COVER_dictSelectionFree(COVER_dictSelection_t selection){ - free(selection.dictContent); -} - -COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBufferCapacity, - size_t dictContentSize, const BYTE* samplesBuffer, const size_t* samplesSizes, unsigned nbFinalizeSamples, - size_t nbCheckSamples, size_t nbSamples, ZDICT_cover_params_t params, size_t* offsets, size_t totalCompressedSize) { - - size_t largestDict = 0; - size_t largestCompressed = 0; - BYTE* customDictContentEnd = customDictContent + dictContentSize; - - BYTE* largestDictbuffer = (BYTE*)malloc(dictBufferCapacity); - BYTE* candidateDictBuffer = (BYTE*)malloc(dictBufferCapacity); - double regressionTolerance = ((double)params.shrinkDictMaxRegression / 100.0) + 1.00; - - if (!largestDictbuffer || !candidateDictBuffer) { - free(largestDictbuffer); - free(candidateDictBuffer); - return COVER_dictSelectionError(dictContentSize); - } - - /* Initial dictionary size and compressed size */ - memcpy(largestDictbuffer, customDictContent, dictContentSize); - dictContentSize = ZDICT_finalizeDictionary( - largestDictbuffer, dictBufferCapacity, customDictContent, dictContentSize, - samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams); - - if (ZDICT_isError(dictContentSize)) { - free(largestDictbuffer); - free(candidateDictBuffer); - return COVER_dictSelectionError(dictContentSize); - } - - totalCompressedSize = COVER_checkTotalCompressedSize(params, samplesSizes, - samplesBuffer, offsets, - nbCheckSamples, nbSamples, - largestDictbuffer, dictContentSize); - - if (ZSTD_isError(totalCompressedSize)) { - free(largestDictbuffer); - free(candidateDictBuffer); - return COVER_dictSelectionError(totalCompressedSize); - } - - if (params.shrinkDict == 0) { - free(candidateDictBuffer); - return setDictSelection(largestDictbuffer, dictContentSize, totalCompressedSize); - } - - largestDict = dictContentSize; - largestCompressed = totalCompressedSize; - dictContentSize = ZDICT_DICTSIZE_MIN; - - /* Largest dict is initially at least ZDICT_DICTSIZE_MIN */ - while (dictContentSize < largestDict) { - memcpy(candidateDictBuffer, largestDictbuffer, largestDict); - dictContentSize = ZDICT_finalizeDictionary( - candidateDictBuffer, dictBufferCapacity, customDictContentEnd - dictContentSize, dictContentSize, - samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams); - - if (ZDICT_isError(dictContentSize)) { - free(largestDictbuffer); - free(candidateDictBuffer); - return COVER_dictSelectionError(dictContentSize); - - } - - totalCompressedSize = COVER_checkTotalCompressedSize(params, samplesSizes, - samplesBuffer, offsets, - nbCheckSamples, nbSamples, - candidateDictBuffer, dictContentSize); - - if (ZSTD_isError(totalCompressedSize)) { - free(largestDictbuffer); - free(candidateDictBuffer); - return COVER_dictSelectionError(totalCompressedSize); - } - - if ((double)totalCompressedSize <= (double)largestCompressed * regressionTolerance) { - free(largestDictbuffer); - return setDictSelection( candidateDictBuffer, dictContentSize, totalCompressedSize ); - } - dictContentSize *= 2; - } - dictContentSize = largestDict; - totalCompressedSize = largestCompressed; - free(candidateDictBuffer); - return setDictSelection( largestDictbuffer, dictContentSize, totalCompressedSize ); -} - -/** - * Parameters for COVER_tryParameters(). - */ -typedef struct COVER_tryParameters_data_s { - const COVER_ctx_t *ctx; - COVER_best_t *best; - size_t dictBufferCapacity; - ZDICT_cover_params_t parameters; -} COVER_tryParameters_data_t; - -/** - * Tries a set of parameters and updates the COVER_best_t with the results. - * This function is thread safe if zstd is compiled with multithreaded support. - * It takes its parameters as an *OWNING* opaque pointer to support threading. - */ -static void COVER_tryParameters(void *opaque) -{ - /* Save parameters as local variables */ - COVER_tryParameters_data_t *const data = (COVER_tryParameters_data_t*)opaque; - const COVER_ctx_t *const ctx = data->ctx; - const ZDICT_cover_params_t parameters = data->parameters; - size_t dictBufferCapacity = data->dictBufferCapacity; - size_t totalCompressedSize = ERROR(GENERIC); - /* Allocate space for hash table, dict, and freqs */ - COVER_map_t activeDmers; - BYTE* const dict = (BYTE*)malloc(dictBufferCapacity); - COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC)); - U32* const freqs = (U32*)malloc(ctx->suffixSize * sizeof(U32)); - if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) { - DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n"); - goto _cleanup; - } - if (!dict || !freqs) { - DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n"); - goto _cleanup; - } - /* Copy the frequencies because we need to modify them */ - memcpy(freqs, ctx->freqs, ctx->suffixSize * sizeof(U32)); - /* Build the dictionary */ - { - const size_t tail = COVER_buildDictionary(ctx, freqs, &activeDmers, dict, - dictBufferCapacity, parameters); - selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail, - ctx->samples, ctx->samplesSizes, (unsigned)ctx->nbTrainSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets, - totalCompressedSize); - - if (COVER_dictSelectionIsError(selection)) { - DISPLAYLEVEL(1, "Failed to select dictionary\n"); - goto _cleanup; - } - } -_cleanup: - free(dict); - COVER_best_finish(data->best, parameters, selection); - free(data); - COVER_map_destroy(&activeDmers); - COVER_dictSelectionFree(selection); - free(freqs); -} - -ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_cover( - void* dictBuffer, size_t dictBufferCapacity, const void* samplesBuffer, - const size_t* samplesSizes, unsigned nbSamples, - ZDICT_cover_params_t* parameters) -{ - /* constants */ - const unsigned nbThreads = parameters->nbThreads; - const double splitPoint = - parameters->splitPoint <= 0.0 ? COVER_DEFAULT_SPLITPOINT : parameters->splitPoint; - const unsigned kMinD = parameters->d == 0 ? 6 : parameters->d; - const unsigned kMaxD = parameters->d == 0 ? 8 : parameters->d; - const unsigned kMinK = parameters->k == 0 ? 50 : parameters->k; - const unsigned kMaxK = parameters->k == 0 ? 2000 : parameters->k; - const unsigned kSteps = parameters->steps == 0 ? 40 : parameters->steps; - const unsigned kStepSize = MAX((kMaxK - kMinK) / kSteps, 1); - const unsigned kIterations = - (1 + (kMaxD - kMinD) / 2) * (1 + (kMaxK - kMinK) / kStepSize); - const unsigned shrinkDict = 0; - /* Local variables */ - const int displayLevel = parameters->zParams.notificationLevel; - unsigned iteration = 1; - unsigned d; - unsigned k; - COVER_best_t best; - POOL_ctx *pool = NULL; - int warned = 0; - - /* Checks */ - if (splitPoint <= 0 || splitPoint > 1) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect parameters\n"); - return ERROR(parameter_outOfBound); - } - if (kMinK < kMaxD || kMaxK < kMinK) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect parameters\n"); - return ERROR(parameter_outOfBound); - } - if (nbSamples == 0) { - DISPLAYLEVEL(1, "Cover must have at least one input file\n"); - return ERROR(srcSize_wrong); - } - if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { - DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", - ZDICT_DICTSIZE_MIN); - return ERROR(dstSize_tooSmall); - } - if (nbThreads > 1) { - pool = POOL_create(nbThreads, 1); - if (!pool) { - return ERROR(memory_allocation); - } - } - /* Initialization */ - COVER_best_init(&best); - /* Turn down global display level to clean up display at level 2 and below */ - g_displayLevel = displayLevel == 0 ? 0 : displayLevel - 1; - /* Loop through d first because each new value needs a new context */ - LOCALDISPLAYLEVEL(displayLevel, 2, "Trying %u different sets of parameters\n", - kIterations); - for (d = kMinD; d <= kMaxD; d += 2) { - /* Initialize the context for this value of d */ - COVER_ctx_t ctx; - LOCALDISPLAYLEVEL(displayLevel, 3, "d=%u\n", d); - { - const size_t initVal = COVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, d, splitPoint); - if (ZSTD_isError(initVal)) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to initialize context\n"); - COVER_best_destroy(&best); - POOL_free(pool); - return initVal; - } - } - if (!warned) { - COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.suffixSize, displayLevel); - warned = 1; - } - /* Loop through k reusing the same context */ - for (k = kMinK; k <= kMaxK; k += kStepSize) { - /* Prepare the arguments */ - COVER_tryParameters_data_t *data = (COVER_tryParameters_data_t *)malloc( - sizeof(COVER_tryParameters_data_t)); - LOCALDISPLAYLEVEL(displayLevel, 3, "k=%u\n", k); - if (!data) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to allocate parameters\n"); - COVER_best_destroy(&best); - COVER_ctx_destroy(&ctx); - POOL_free(pool); - return ERROR(memory_allocation); - } - data->ctx = &ctx; - data->best = &best; - data->dictBufferCapacity = dictBufferCapacity; - data->parameters = *parameters; - data->parameters.k = k; - data->parameters.d = d; - data->parameters.splitPoint = splitPoint; - data->parameters.steps = kSteps; - data->parameters.shrinkDict = shrinkDict; - data->parameters.zParams.notificationLevel = g_displayLevel; - /* Check the parameters */ - if (!COVER_checkParameters(data->parameters, dictBufferCapacity)) { - DISPLAYLEVEL(1, "Cover parameters incorrect\n"); - free(data); - continue; - } - /* Call the function and pass ownership of data to it */ - COVER_best_start(&best); - if (pool) { - POOL_add(pool, &COVER_tryParameters, data); - } else { - COVER_tryParameters(data); - } - /* Print status */ - LOCALDISPLAYUPDATE(displayLevel, 2, "\r%u%% ", - (unsigned)((iteration * 100) / kIterations)); - ++iteration; - } - COVER_best_wait(&best); - COVER_ctx_destroy(&ctx); - } - LOCALDISPLAYLEVEL(displayLevel, 2, "\r%79s\r", ""); - /* Fill the output buffer and parameters with output of the best parameters */ - { - const size_t dictSize = best.dictSize; - if (ZSTD_isError(best.compressedSize)) { - const size_t compressedSize = best.compressedSize; - COVER_best_destroy(&best); - POOL_free(pool); - return compressedSize; - } - *parameters = best.parameters; - memcpy(dictBuffer, best.dict, dictSize); - COVER_best_destroy(&best); - POOL_free(pool); - return dictSize; - } -} diff --git a/third_party/zstd/lib/dictBuilder/cover.h b/third_party/zstd/lib/dictBuilder/cover.h deleted file mode 100644 index a5d7506..0000000 --- a/third_party/zstd/lib/dictBuilder/cover.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZDICT_STATIC_LINKING_ONLY -# define ZDICT_STATIC_LINKING_ONLY -#endif - -#include "../common/threading.h" /* ZSTD_pthread_mutex_t */ -#include "../common/mem.h" /* U32, BYTE */ -#include "../zdict.h" - -/** - * COVER_best_t is used for two purposes: - * 1. Synchronizing threads. - * 2. Saving the best parameters and dictionary. - * - * All of the methods except COVER_best_init() are thread safe if zstd is - * compiled with multithreaded support. - */ -typedef struct COVER_best_s { - ZSTD_pthread_mutex_t mutex; - ZSTD_pthread_cond_t cond; - size_t liveJobs; - void *dict; - size_t dictSize; - ZDICT_cover_params_t parameters; - size_t compressedSize; -} COVER_best_t; - -/** - * A segment is a range in the source as well as the score of the segment. - */ -typedef struct { - U32 begin; - U32 end; - U32 score; -} COVER_segment_t; - -/** - *Number of epochs and size of each epoch. - */ -typedef struct { - U32 num; - U32 size; -} COVER_epoch_info_t; - -/** - * Struct used for the dictionary selection function. - */ -typedef struct COVER_dictSelection { - BYTE* dictContent; - size_t dictSize; - size_t totalCompressedSize; -} COVER_dictSelection_t; - -/** - * Computes the number of epochs and the size of each epoch. - * We will make sure that each epoch gets at least 10 * k bytes. - * - * The COVER algorithms divide the data up into epochs of equal size and - * select one segment from each epoch. - * - * @param maxDictSize The maximum allowed dictionary size. - * @param nbDmers The number of dmers we are training on. - * @param k The parameter k (segment size). - * @param passes The target number of passes over the dmer corpus. - * More passes means a better dictionary. - */ -COVER_epoch_info_t COVER_computeEpochs(U32 maxDictSize, U32 nbDmers, - U32 k, U32 passes); - -/** - * Warns the user when their corpus is too small. - */ -void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int displayLevel); - -/** - * Checks total compressed size of a dictionary - */ -size_t COVER_checkTotalCompressedSize(const ZDICT_cover_params_t parameters, - const size_t *samplesSizes, const BYTE *samples, - size_t *offsets, - size_t nbTrainSamples, size_t nbSamples, - BYTE *const dict, size_t dictBufferCapacity); - -/** - * Returns the sum of the sample sizes. - */ -size_t COVER_sum(const size_t *samplesSizes, unsigned nbSamples) ; - -/** - * Initialize the `COVER_best_t`. - */ -void COVER_best_init(COVER_best_t *best); - -/** - * Wait until liveJobs == 0. - */ -void COVER_best_wait(COVER_best_t *best); - -/** - * Call COVER_best_wait() and then destroy the COVER_best_t. - */ -void COVER_best_destroy(COVER_best_t *best); - -/** - * Called when a thread is about to be launched. - * Increments liveJobs. - */ -void COVER_best_start(COVER_best_t *best); - -/** - * Called when a thread finishes executing, both on error or success. - * Decrements liveJobs and signals any waiting threads if liveJobs == 0. - * If this dictionary is the best so far save it and its parameters. - */ -void COVER_best_finish(COVER_best_t *best, ZDICT_cover_params_t parameters, - COVER_dictSelection_t selection); -/** - * Error function for COVER_selectDict function. Checks if the return - * value is an error. - */ -unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection); - - /** - * Error function for COVER_selectDict function. Returns a struct where - * return.totalCompressedSize is a ZSTD error. - */ -COVER_dictSelection_t COVER_dictSelectionError(size_t error); - -/** - * Always call after selectDict is called to free up used memory from - * newly created dictionary. - */ -void COVER_dictSelectionFree(COVER_dictSelection_t selection); - -/** - * Called to finalize the dictionary and select one based on whether or not - * the shrink-dict flag was enabled. If enabled the dictionary used is the - * smallest dictionary within a specified regression of the compressed size - * from the largest dictionary. - */ - COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBufferCapacity, - size_t dictContentSize, const BYTE* samplesBuffer, const size_t* samplesSizes, unsigned nbFinalizeSamples, - size_t nbCheckSamples, size_t nbSamples, ZDICT_cover_params_t params, size_t* offsets, size_t totalCompressedSize); diff --git a/third_party/zstd/lib/dictBuilder/divsufsort.c b/third_party/zstd/lib/dictBuilder/divsufsort.c deleted file mode 100644 index a2870fb..0000000 --- a/third_party/zstd/lib/dictBuilder/divsufsort.c +++ /dev/null @@ -1,1913 +0,0 @@ -/* - * divsufsort.c for libdivsufsort-lite - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/*- Compiler specifics -*/ -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wshorten-64-to-32" -#endif - -#if defined(_MSC_VER) -# pragma warning(disable : 4244) -# pragma warning(disable : 4127) /* C4127 : Condition expression is constant */ -#endif - - -/*- Dependencies -*/ -#include -#include -#include - -#include "divsufsort.h" - -/*- Constants -*/ -#if defined(INLINE) -# undef INLINE -#endif -#if !defined(INLINE) -# define INLINE __inline -#endif -#if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1) -# undef ALPHABET_SIZE -#endif -#if !defined(ALPHABET_SIZE) -# define ALPHABET_SIZE (256) -#endif -#define BUCKET_A_SIZE (ALPHABET_SIZE) -#define BUCKET_B_SIZE (ALPHABET_SIZE * ALPHABET_SIZE) -#if defined(SS_INSERTIONSORT_THRESHOLD) -# if SS_INSERTIONSORT_THRESHOLD < 1 -# undef SS_INSERTIONSORT_THRESHOLD -# define SS_INSERTIONSORT_THRESHOLD (1) -# endif -#else -# define SS_INSERTIONSORT_THRESHOLD (8) -#endif -#if defined(SS_BLOCKSIZE) -# if SS_BLOCKSIZE < 0 -# undef SS_BLOCKSIZE -# define SS_BLOCKSIZE (0) -# elif 32768 <= SS_BLOCKSIZE -# undef SS_BLOCKSIZE -# define SS_BLOCKSIZE (32767) -# endif -#else -# define SS_BLOCKSIZE (1024) -#endif -/* minstacksize = log(SS_BLOCKSIZE) / log(3) * 2 */ -#if SS_BLOCKSIZE == 0 -# define SS_MISORT_STACKSIZE (96) -#elif SS_BLOCKSIZE <= 4096 -# define SS_MISORT_STACKSIZE (16) -#else -# define SS_MISORT_STACKSIZE (24) -#endif -#define SS_SMERGE_STACKSIZE (32) -#define TR_INSERTIONSORT_THRESHOLD (8) -#define TR_STACKSIZE (64) - - -/*- Macros -*/ -#ifndef SWAP -# define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0) -#endif /* SWAP */ -#ifndef MIN -# define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b)) -#endif /* MIN */ -#ifndef MAX -# define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b)) -#endif /* MAX */ -#define STACK_PUSH(_a, _b, _c, _d)\ - do {\ - assert(ssize < STACK_SIZE);\ - stack[ssize].a = (_a), stack[ssize].b = (_b),\ - stack[ssize].c = (_c), stack[ssize++].d = (_d);\ - } while(0) -#define STACK_PUSH5(_a, _b, _c, _d, _e)\ - do {\ - assert(ssize < STACK_SIZE);\ - stack[ssize].a = (_a), stack[ssize].b = (_b),\ - stack[ssize].c = (_c), stack[ssize].d = (_d), stack[ssize++].e = (_e);\ - } while(0) -#define STACK_POP(_a, _b, _c, _d)\ - do {\ - assert(0 <= ssize);\ - if(ssize == 0) { return; }\ - (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ - (_c) = stack[ssize].c, (_d) = stack[ssize].d;\ - } while(0) -#define STACK_POP5(_a, _b, _c, _d, _e)\ - do {\ - assert(0 <= ssize);\ - if(ssize == 0) { return; }\ - (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ - (_c) = stack[ssize].c, (_d) = stack[ssize].d, (_e) = stack[ssize].e;\ - } while(0) -#define BUCKET_A(_c0) bucket_A[(_c0)] -#if ALPHABET_SIZE == 256 -#define BUCKET_B(_c0, _c1) (bucket_B[((_c1) << 8) | (_c0)]) -#define BUCKET_BSTAR(_c0, _c1) (bucket_B[((_c0) << 8) | (_c1)]) -#else -#define BUCKET_B(_c0, _c1) (bucket_B[(_c1) * ALPHABET_SIZE + (_c0)]) -#define BUCKET_BSTAR(_c0, _c1) (bucket_B[(_c0) * ALPHABET_SIZE + (_c1)]) -#endif - - -/*- Private Functions -*/ - -static const int lg_table[256]= { - -1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 -}; - -#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) - -static INLINE -int -ss_ilg(int n) { -#if SS_BLOCKSIZE == 0 - return (n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]); -#elif SS_BLOCKSIZE < 256 - return lg_table[n]; -#else - return (n & 0xff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]; -#endif -} - -#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ - -#if SS_BLOCKSIZE != 0 - -static const int sqq_table[256] = { - 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57, 59, 61, - 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83, 84, 86, 87, 89, - 90, 91, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106, 107, 108, 109, -110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, -128, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, -143, 144, 144, 145, 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, -156, 157, 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168, -169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178, 179, 180, -181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, -192, 192, 193, 193, 194, 195, 195, 196, 197, 197, 198, 199, 199, 200, 201, 201, -202, 203, 203, 204, 204, 205, 206, 206, 207, 208, 208, 209, 209, 210, 211, 211, -212, 212, 213, 214, 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, -221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, -230, 231, 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, -239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, -247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255 -}; - -static INLINE -int -ss_isqrt(int x) { - int y, e; - - if(x >= (SS_BLOCKSIZE * SS_BLOCKSIZE)) { return SS_BLOCKSIZE; } - e = (x & 0xffff0000) ? - ((x & 0xff000000) ? - 24 + lg_table[(x >> 24) & 0xff] : - 16 + lg_table[(x >> 16) & 0xff]) : - ((x & 0x0000ff00) ? - 8 + lg_table[(x >> 8) & 0xff] : - 0 + lg_table[(x >> 0) & 0xff]); - - if(e >= 16) { - y = sqq_table[x >> ((e - 6) - (e & 1))] << ((e >> 1) - 7); - if(e >= 24) { y = (y + 1 + x / y) >> 1; } - y = (y + 1 + x / y) >> 1; - } else if(e >= 8) { - y = (sqq_table[x >> ((e - 6) - (e & 1))] >> (7 - (e >> 1))) + 1; - } else { - return sqq_table[x] >> 4; - } - - return (x < (y * y)) ? y - 1 : y; -} - -#endif /* SS_BLOCKSIZE != 0 */ - - -/*---------------------------------------------------------------------------*/ - -/* Compares two suffixes. */ -static INLINE -int -ss_compare(const unsigned char *T, - const int *p1, const int *p2, - int depth) { - const unsigned char *U1, *U2, *U1n, *U2n; - - for(U1 = T + depth + *p1, - U2 = T + depth + *p2, - U1n = T + *(p1 + 1) + 2, - U2n = T + *(p2 + 1) + 2; - (U1 < U1n) && (U2 < U2n) && (*U1 == *U2); - ++U1, ++U2) { - } - - return U1 < U1n ? - (U2 < U2n ? *U1 - *U2 : 1) : - (U2 < U2n ? -1 : 0); -} - - -/*---------------------------------------------------------------------------*/ - -#if (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) - -/* Insertionsort for small size groups */ -static -void -ss_insertionsort(const unsigned char *T, const int *PA, - int *first, int *last, int depth) { - int *i, *j; - int t; - int r; - - for(i = last - 2; first <= i; --i) { - for(t = *i, j = i + 1; 0 < (r = ss_compare(T, PA + t, PA + *j, depth));) { - do { *(j - 1) = *j; } while((++j < last) && (*j < 0)); - if(last <= j) { break; } - } - if(r == 0) { *j = ~*j; } - *(j - 1) = t; - } -} - -#endif /* (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) */ - - -/*---------------------------------------------------------------------------*/ - -#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) - -static INLINE -void -ss_fixdown(const unsigned char *Td, const int *PA, - int *SA, int i, int size) { - int j, k; - int v; - int c, d, e; - - for(v = SA[i], c = Td[PA[v]]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { - d = Td[PA[SA[k = j++]]]; - if(d < (e = Td[PA[SA[j]]])) { k = j; d = e; } - if(d <= c) { break; } - } - SA[i] = v; -} - -/* Simple top-down heapsort. */ -static -void -ss_heapsort(const unsigned char *Td, const int *PA, int *SA, int size) { - int i, m; - int t; - - m = size; - if((size % 2) == 0) { - m--; - if(Td[PA[SA[m / 2]]] < Td[PA[SA[m]]]) { SWAP(SA[m], SA[m / 2]); } - } - - for(i = m / 2 - 1; 0 <= i; --i) { ss_fixdown(Td, PA, SA, i, m); } - if((size % 2) == 0) { SWAP(SA[0], SA[m]); ss_fixdown(Td, PA, SA, 0, m); } - for(i = m - 1; 0 < i; --i) { - t = SA[0], SA[0] = SA[i]; - ss_fixdown(Td, PA, SA, 0, i); - SA[i] = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Returns the median of three elements. */ -static INLINE -int * -ss_median3(const unsigned char *Td, const int *PA, - int *v1, int *v2, int *v3) { - int *t; - if(Td[PA[*v1]] > Td[PA[*v2]]) { SWAP(v1, v2); } - if(Td[PA[*v2]] > Td[PA[*v3]]) { - if(Td[PA[*v1]] > Td[PA[*v3]]) { return v1; } - else { return v3; } - } - return v2; -} - -/* Returns the median of five elements. */ -static INLINE -int * -ss_median5(const unsigned char *Td, const int *PA, - int *v1, int *v2, int *v3, int *v4, int *v5) { - int *t; - if(Td[PA[*v2]] > Td[PA[*v3]]) { SWAP(v2, v3); } - if(Td[PA[*v4]] > Td[PA[*v5]]) { SWAP(v4, v5); } - if(Td[PA[*v2]] > Td[PA[*v4]]) { SWAP(v2, v4); SWAP(v3, v5); } - if(Td[PA[*v1]] > Td[PA[*v3]]) { SWAP(v1, v3); } - if(Td[PA[*v1]] > Td[PA[*v4]]) { SWAP(v1, v4); SWAP(v3, v5); } - if(Td[PA[*v3]] > Td[PA[*v4]]) { return v4; } - return v3; -} - -/* Returns the pivot element. */ -static INLINE -int * -ss_pivot(const unsigned char *Td, const int *PA, int *first, int *last) { - int *middle; - int t; - - t = last - first; - middle = first + t / 2; - - if(t <= 512) { - if(t <= 32) { - return ss_median3(Td, PA, first, middle, last - 1); - } else { - t >>= 2; - return ss_median5(Td, PA, first, first + t, middle, last - 1 - t, last - 1); - } - } - t >>= 3; - first = ss_median3(Td, PA, first, first + t, first + (t << 1)); - middle = ss_median3(Td, PA, middle - t, middle, middle + t); - last = ss_median3(Td, PA, last - 1 - (t << 1), last - 1 - t, last - 1); - return ss_median3(Td, PA, first, middle, last); -} - - -/*---------------------------------------------------------------------------*/ - -/* Binary partition for substrings. */ -static INLINE -int * -ss_partition(const int *PA, - int *first, int *last, int depth) { - int *a, *b; - int t; - for(a = first - 1, b = last;;) { - for(; (++a < b) && ((PA[*a] + depth) >= (PA[*a + 1] + 1));) { *a = ~*a; } - for(; (a < --b) && ((PA[*b] + depth) < (PA[*b + 1] + 1));) { } - if(b <= a) { break; } - t = ~*b; - *b = *a; - *a = t; - } - if(first < a) { *first = ~*first; } - return a; -} - -/* Multikey introsort for medium size groups. */ -static -void -ss_mintrosort(const unsigned char *T, const int *PA, - int *first, int *last, - int depth) { -#define STACK_SIZE SS_MISORT_STACKSIZE - struct { int *a, *b, c; int d; } stack[STACK_SIZE]; - const unsigned char *Td; - int *a, *b, *c, *d, *e, *f; - int s, t; - int ssize; - int limit; - int v, x = 0; - - for(ssize = 0, limit = ss_ilg(last - first);;) { - - if((last - first) <= SS_INSERTIONSORT_THRESHOLD) { -#if 1 < SS_INSERTIONSORT_THRESHOLD - if(1 < (last - first)) { ss_insertionsort(T, PA, first, last, depth); } -#endif - STACK_POP(first, last, depth, limit); - continue; - } - - Td = T + depth; - if(limit-- == 0) { ss_heapsort(Td, PA, first, last - first); } - if(limit < 0) { - for(a = first + 1, v = Td[PA[*first]]; a < last; ++a) { - if((x = Td[PA[*a]]) != v) { - if(1 < (a - first)) { break; } - v = x; - first = a; - } - } - if(Td[PA[*first] - 1] < v) { - first = ss_partition(PA, first, a, depth); - } - if((a - first) <= (last - a)) { - if(1 < (a - first)) { - STACK_PUSH(a, last, depth, -1); - last = a, depth += 1, limit = ss_ilg(a - first); - } else { - first = a, limit = -1; - } - } else { - if(1 < (last - a)) { - STACK_PUSH(first, a, depth + 1, ss_ilg(a - first)); - first = a, limit = -1; - } else { - last = a, depth += 1, limit = ss_ilg(a - first); - } - } - continue; - } - - /* choose pivot */ - a = ss_pivot(Td, PA, first, last); - v = Td[PA[*a]]; - SWAP(*first, *a); - - /* partition */ - for(b = first; (++b < last) && ((x = Td[PA[*b]]) == v);) { } - if(((a = b) < last) && (x < v)) { - for(; (++b < last) && ((x = Td[PA[*b]]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - } - for(c = last; (b < --c) && ((x = Td[PA[*c]]) == v);) { } - if((b < (d = c)) && (x > v)) { - for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - for(; b < c;) { - SWAP(*b, *c); - for(; (++b < c) && ((x = Td[PA[*b]]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - - if(a <= d) { - c = b - 1; - - if((s = a - first) > (t = b - a)) { s = t; } - for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - if((s = d - c) > (t = last - d - 1)) { s = t; } - for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - - a = first + (b - a), c = last - (d - c); - b = (v <= Td[PA[*a] - 1]) ? a : ss_partition(PA, a, c, depth); - - if((a - first) <= (last - c)) { - if((last - c) <= (c - b)) { - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - STACK_PUSH(c, last, depth, limit); - last = a; - } else if((a - first) <= (c - b)) { - STACK_PUSH(c, last, depth, limit); - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - last = a; - } else { - STACK_PUSH(c, last, depth, limit); - STACK_PUSH(first, a, depth, limit); - first = b, last = c, depth += 1, limit = ss_ilg(c - b); - } - } else { - if((a - first) <= (c - b)) { - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - STACK_PUSH(first, a, depth, limit); - first = c; - } else if((last - c) <= (c - b)) { - STACK_PUSH(first, a, depth, limit); - STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); - first = c; - } else { - STACK_PUSH(first, a, depth, limit); - STACK_PUSH(c, last, depth, limit); - first = b, last = c, depth += 1, limit = ss_ilg(c - b); - } - } - } else { - limit += 1; - if(Td[PA[*first] - 1] < v) { - first = ss_partition(PA, first, last, depth); - limit = ss_ilg(last - first); - } - depth += 1; - } - } -#undef STACK_SIZE -} - -#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ - - -/*---------------------------------------------------------------------------*/ - -#if SS_BLOCKSIZE != 0 - -static INLINE -void -ss_blockswap(int *a, int *b, int n) { - int t; - for(; 0 < n; --n, ++a, ++b) { - t = *a, *a = *b, *b = t; - } -} - -static INLINE -void -ss_rotate(int *first, int *middle, int *last) { - int *a, *b, t; - int l, r; - l = middle - first, r = last - middle; - for(; (0 < l) && (0 < r);) { - if(l == r) { ss_blockswap(first, middle, l); break; } - if(l < r) { - a = last - 1, b = middle - 1; - t = *a; - do { - *a-- = *b, *b-- = *a; - if(b < first) { - *a = t; - last = a; - if((r -= l + 1) <= l) { break; } - a -= 1, b = middle - 1; - t = *a; - } - } while(1); - } else { - a = first, b = middle; - t = *a; - do { - *a++ = *b, *b++ = *a; - if(last <= b) { - *a = t; - first = a + 1; - if((l -= r + 1) <= r) { break; } - a += 1, b = middle; - t = *a; - } - } while(1); - } - } -} - - -/*---------------------------------------------------------------------------*/ - -static -void -ss_inplacemerge(const unsigned char *T, const int *PA, - int *first, int *middle, int *last, - int depth) { - const int *p; - int *a, *b; - int len, half; - int q, r; - int x; - - for(;;) { - if(*(last - 1) < 0) { x = 1; p = PA + ~*(last - 1); } - else { x = 0; p = PA + *(last - 1); } - for(a = first, len = middle - first, half = len >> 1, r = -1; - 0 < len; - len = half, half >>= 1) { - b = a + half; - q = ss_compare(T, PA + ((0 <= *b) ? *b : ~*b), p, depth); - if(q < 0) { - a = b + 1; - half -= (len & 1) ^ 1; - } else { - r = q; - } - } - if(a < middle) { - if(r == 0) { *a = ~*a; } - ss_rotate(a, middle, last); - last -= middle - a; - middle = a; - if(first == middle) { break; } - } - --last; - if(x != 0) { while(*--last < 0) { } } - if(middle == last) { break; } - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Merge-forward with internal buffer. */ -static -void -ss_mergeforward(const unsigned char *T, const int *PA, - int *first, int *middle, int *last, - int *buf, int depth) { - int *a, *b, *c, *bufend; - int t; - int r; - - bufend = buf + (middle - first) - 1; - ss_blockswap(buf, first, middle - first); - - for(t = *(a = first), b = buf, c = middle;;) { - r = ss_compare(T, PA + *b, PA + *c, depth); - if(r < 0) { - do { - *a++ = *b; - if(bufend <= b) { *bufend = t; return; } - *b++ = *a; - } while(*b < 0); - } else if(r > 0) { - do { - *a++ = *c, *c++ = *a; - if(last <= c) { - while(b < bufend) { *a++ = *b, *b++ = *a; } - *a = *b, *b = t; - return; - } - } while(*c < 0); - } else { - *c = ~*c; - do { - *a++ = *b; - if(bufend <= b) { *bufend = t; return; } - *b++ = *a; - } while(*b < 0); - - do { - *a++ = *c, *c++ = *a; - if(last <= c) { - while(b < bufend) { *a++ = *b, *b++ = *a; } - *a = *b, *b = t; - return; - } - } while(*c < 0); - } - } -} - -/* Merge-backward with internal buffer. */ -static -void -ss_mergebackward(const unsigned char *T, const int *PA, - int *first, int *middle, int *last, - int *buf, int depth) { - const int *p1, *p2; - int *a, *b, *c, *bufend; - int t; - int r; - int x; - - bufend = buf + (last - middle) - 1; - ss_blockswap(buf, middle, last - middle); - - x = 0; - if(*bufend < 0) { p1 = PA + ~*bufend; x |= 1; } - else { p1 = PA + *bufend; } - if(*(middle - 1) < 0) { p2 = PA + ~*(middle - 1); x |= 2; } - else { p2 = PA + *(middle - 1); } - for(t = *(a = last - 1), b = bufend, c = middle - 1;;) { - r = ss_compare(T, p1, p2, depth); - if(0 < r) { - if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } - *a-- = *b; - if(b <= buf) { *buf = t; break; } - *b-- = *a; - if(*b < 0) { p1 = PA + ~*b; x |= 1; } - else { p1 = PA + *b; } - } else if(r < 0) { - if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } - *a-- = *c, *c-- = *a; - if(c < first) { - while(buf < b) { *a-- = *b, *b-- = *a; } - *a = *b, *b = t; - break; - } - if(*c < 0) { p2 = PA + ~*c; x |= 2; } - else { p2 = PA + *c; } - } else { - if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } - *a-- = ~*b; - if(b <= buf) { *buf = t; break; } - *b-- = *a; - if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } - *a-- = *c, *c-- = *a; - if(c < first) { - while(buf < b) { *a-- = *b, *b-- = *a; } - *a = *b, *b = t; - break; - } - if(*b < 0) { p1 = PA + ~*b; x |= 1; } - else { p1 = PA + *b; } - if(*c < 0) { p2 = PA + ~*c; x |= 2; } - else { p2 = PA + *c; } - } - } -} - -/* D&C based merge. */ -static -void -ss_swapmerge(const unsigned char *T, const int *PA, - int *first, int *middle, int *last, - int *buf, int bufsize, int depth) { -#define STACK_SIZE SS_SMERGE_STACKSIZE -#define GETIDX(a) ((0 <= (a)) ? (a) : (~(a))) -#define MERGE_CHECK(a, b, c)\ - do {\ - if(((c) & 1) ||\ - (((c) & 2) && (ss_compare(T, PA + GETIDX(*((a) - 1)), PA + *(a), depth) == 0))) {\ - *(a) = ~*(a);\ - }\ - if(((c) & 4) && ((ss_compare(T, PA + GETIDX(*((b) - 1)), PA + *(b), depth) == 0))) {\ - *(b) = ~*(b);\ - }\ - } while(0) - struct { int *a, *b, *c; int d; } stack[STACK_SIZE]; - int *l, *r, *lm, *rm; - int m, len, half; - int ssize; - int check, next; - - for(check = 0, ssize = 0;;) { - if((last - middle) <= bufsize) { - if((first < middle) && (middle < last)) { - ss_mergebackward(T, PA, first, middle, last, buf, depth); - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - continue; - } - - if((middle - first) <= bufsize) { - if(first < middle) { - ss_mergeforward(T, PA, first, middle, last, buf, depth); - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - continue; - } - - for(m = 0, len = MIN(middle - first, last - middle), half = len >> 1; - 0 < len; - len = half, half >>= 1) { - if(ss_compare(T, PA + GETIDX(*(middle + m + half)), - PA + GETIDX(*(middle - m - half - 1)), depth) < 0) { - m += half + 1; - half -= (len & 1) ^ 1; - } - } - - if(0 < m) { - lm = middle - m, rm = middle + m; - ss_blockswap(lm, middle, m); - l = r = middle, next = 0; - if(rm < last) { - if(*rm < 0) { - *rm = ~*rm; - if(first < lm) { for(; *--l < 0;) { } next |= 4; } - next |= 1; - } else if(first < lm) { - for(; *r < 0; ++r) { } - next |= 2; - } - } - - if((l - first) <= (last - r)) { - STACK_PUSH(r, rm, last, (next & 3) | (check & 4)); - middle = lm, last = l, check = (check & 3) | (next & 4); - } else { - if((next & 2) && (r == middle)) { next ^= 6; } - STACK_PUSH(first, lm, l, (check & 3) | (next & 4)); - first = r, middle = rm, check = (next & 3) | (check & 4); - } - } else { - if(ss_compare(T, PA + GETIDX(*(middle - 1)), PA + *middle, depth) == 0) { - *middle = ~*middle; - } - MERGE_CHECK(first, last, check); - STACK_POP(first, middle, last, check); - } - } -#undef STACK_SIZE -} - -#endif /* SS_BLOCKSIZE != 0 */ - - -/*---------------------------------------------------------------------------*/ - -/* Substring sort */ -static -void -sssort(const unsigned char *T, const int *PA, - int *first, int *last, - int *buf, int bufsize, - int depth, int n, int lastsuffix) { - int *a; -#if SS_BLOCKSIZE != 0 - int *b, *middle, *curbuf; - int j, k, curbufsize, limit; -#endif - int i; - - if(lastsuffix != 0) { ++first; } - -#if SS_BLOCKSIZE == 0 - ss_mintrosort(T, PA, first, last, depth); -#else - if((bufsize < SS_BLOCKSIZE) && - (bufsize < (last - first)) && - (bufsize < (limit = ss_isqrt(last - first)))) { - if(SS_BLOCKSIZE < limit) { limit = SS_BLOCKSIZE; } - buf = middle = last - limit, bufsize = limit; - } else { - middle = last, limit = 0; - } - for(a = first, i = 0; SS_BLOCKSIZE < (middle - a); a += SS_BLOCKSIZE, ++i) { -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, a, a + SS_BLOCKSIZE, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, a, a + SS_BLOCKSIZE, depth); -#endif - curbufsize = last - (a + SS_BLOCKSIZE); - curbuf = a + SS_BLOCKSIZE; - if(curbufsize <= bufsize) { curbufsize = bufsize, curbuf = buf; } - for(b = a, k = SS_BLOCKSIZE, j = i; j & 1; b -= k, k <<= 1, j >>= 1) { - ss_swapmerge(T, PA, b - k, b, b + k, curbuf, curbufsize, depth); - } - } -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, a, middle, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, a, middle, depth); -#endif - for(k = SS_BLOCKSIZE; i != 0; k <<= 1, i >>= 1) { - if(i & 1) { - ss_swapmerge(T, PA, a - k, a, middle, buf, bufsize, depth); - a -= k; - } - } - if(limit != 0) { -#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE - ss_mintrosort(T, PA, middle, last, depth); -#elif 1 < SS_BLOCKSIZE - ss_insertionsort(T, PA, middle, last, depth); -#endif - ss_inplacemerge(T, PA, first, middle, last, depth); - } -#endif - - if(lastsuffix != 0) { - /* Insert last type B* suffix. */ - int PAi[2]; PAi[0] = PA[*(first - 1)], PAi[1] = n - 2; - for(a = first, i = *(first - 1); - (a < last) && ((*a < 0) || (0 < ss_compare(T, &(PAi[0]), PA + *a, depth))); - ++a) { - *(a - 1) = *a; - } - *(a - 1) = i; - } -} - - -/*---------------------------------------------------------------------------*/ - -static INLINE -int -tr_ilg(int n) { - return (n & 0xffff0000) ? - ((n & 0xff000000) ? - 24 + lg_table[(n >> 24) & 0xff] : - 16 + lg_table[(n >> 16) & 0xff]) : - ((n & 0x0000ff00) ? - 8 + lg_table[(n >> 8) & 0xff] : - 0 + lg_table[(n >> 0) & 0xff]); -} - - -/*---------------------------------------------------------------------------*/ - -/* Simple insertionsort for small size groups. */ -static -void -tr_insertionsort(const int *ISAd, int *first, int *last) { - int *a, *b; - int t, r; - - for(a = first + 1; a < last; ++a) { - for(t = *a, b = a - 1; 0 > (r = ISAd[t] - ISAd[*b]);) { - do { *(b + 1) = *b; } while((first <= --b) && (*b < 0)); - if(b < first) { break; } - } - if(r == 0) { *b = ~*b; } - *(b + 1) = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -static INLINE -void -tr_fixdown(const int *ISAd, int *SA, int i, int size) { - int j, k; - int v; - int c, d, e; - - for(v = SA[i], c = ISAd[v]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { - d = ISAd[SA[k = j++]]; - if(d < (e = ISAd[SA[j]])) { k = j; d = e; } - if(d <= c) { break; } - } - SA[i] = v; -} - -/* Simple top-down heapsort. */ -static -void -tr_heapsort(const int *ISAd, int *SA, int size) { - int i, m; - int t; - - m = size; - if((size % 2) == 0) { - m--; - if(ISAd[SA[m / 2]] < ISAd[SA[m]]) { SWAP(SA[m], SA[m / 2]); } - } - - for(i = m / 2 - 1; 0 <= i; --i) { tr_fixdown(ISAd, SA, i, m); } - if((size % 2) == 0) { SWAP(SA[0], SA[m]); tr_fixdown(ISAd, SA, 0, m); } - for(i = m - 1; 0 < i; --i) { - t = SA[0], SA[0] = SA[i]; - tr_fixdown(ISAd, SA, 0, i); - SA[i] = t; - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Returns the median of three elements. */ -static INLINE -int * -tr_median3(const int *ISAd, int *v1, int *v2, int *v3) { - int *t; - if(ISAd[*v1] > ISAd[*v2]) { SWAP(v1, v2); } - if(ISAd[*v2] > ISAd[*v3]) { - if(ISAd[*v1] > ISAd[*v3]) { return v1; } - else { return v3; } - } - return v2; -} - -/* Returns the median of five elements. */ -static INLINE -int * -tr_median5(const int *ISAd, - int *v1, int *v2, int *v3, int *v4, int *v5) { - int *t; - if(ISAd[*v2] > ISAd[*v3]) { SWAP(v2, v3); } - if(ISAd[*v4] > ISAd[*v5]) { SWAP(v4, v5); } - if(ISAd[*v2] > ISAd[*v4]) { SWAP(v2, v4); SWAP(v3, v5); } - if(ISAd[*v1] > ISAd[*v3]) { SWAP(v1, v3); } - if(ISAd[*v1] > ISAd[*v4]) { SWAP(v1, v4); SWAP(v3, v5); } - if(ISAd[*v3] > ISAd[*v4]) { return v4; } - return v3; -} - -/* Returns the pivot element. */ -static INLINE -int * -tr_pivot(const int *ISAd, int *first, int *last) { - int *middle; - int t; - - t = last - first; - middle = first + t / 2; - - if(t <= 512) { - if(t <= 32) { - return tr_median3(ISAd, first, middle, last - 1); - } else { - t >>= 2; - return tr_median5(ISAd, first, first + t, middle, last - 1 - t, last - 1); - } - } - t >>= 3; - first = tr_median3(ISAd, first, first + t, first + (t << 1)); - middle = tr_median3(ISAd, middle - t, middle, middle + t); - last = tr_median3(ISAd, last - 1 - (t << 1), last - 1 - t, last - 1); - return tr_median3(ISAd, first, middle, last); -} - - -/*---------------------------------------------------------------------------*/ - -typedef struct _trbudget_t trbudget_t; -struct _trbudget_t { - int chance; - int remain; - int incval; - int count; -}; - -static INLINE -void -trbudget_init(trbudget_t *budget, int chance, int incval) { - budget->chance = chance; - budget->remain = budget->incval = incval; -} - -static INLINE -int -trbudget_check(trbudget_t *budget, int size) { - if(size <= budget->remain) { budget->remain -= size; return 1; } - if(budget->chance == 0) { budget->count += size; return 0; } - budget->remain += budget->incval - size; - budget->chance -= 1; - return 1; -} - - -/*---------------------------------------------------------------------------*/ - -static INLINE -void -tr_partition(const int *ISAd, - int *first, int *middle, int *last, - int **pa, int **pb, int v) { - int *a, *b, *c, *d, *e, *f; - int t, s; - int x = 0; - - for(b = middle - 1; (++b < last) && ((x = ISAd[*b]) == v);) { } - if(((a = b) < last) && (x < v)) { - for(; (++b < last) && ((x = ISAd[*b]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - } - for(c = last; (b < --c) && ((x = ISAd[*c]) == v);) { } - if((b < (d = c)) && (x > v)) { - for(; (b < --c) && ((x = ISAd[*c]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - for(; b < c;) { - SWAP(*b, *c); - for(; (++b < c) && ((x = ISAd[*b]) <= v);) { - if(x == v) { SWAP(*b, *a); ++a; } - } - for(; (b < --c) && ((x = ISAd[*c]) >= v);) { - if(x == v) { SWAP(*c, *d); --d; } - } - } - - if(a <= d) { - c = b - 1; - if((s = a - first) > (t = b - a)) { s = t; } - for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - if((s = d - c) > (t = last - d - 1)) { s = t; } - for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } - first += (b - a), last -= (d - c); - } - *pa = first, *pb = last; -} - -static -void -tr_copy(int *ISA, const int *SA, - int *first, int *a, int *b, int *last, - int depth) { - /* sort suffixes of middle partition - by using sorted order of suffixes of left and right partition. */ - int *c, *d, *e; - int s, v; - - v = b - SA - 1; - for(c = first, d = a - 1; c <= d; ++c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *++d = s; - ISA[s] = d - SA; - } - } - for(c = last - 1, e = d + 1, d = b; e < d; --c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *--d = s; - ISA[s] = d - SA; - } - } -} - -static -void -tr_partialcopy(int *ISA, const int *SA, - int *first, int *a, int *b, int *last, - int depth) { - int *c, *d, *e; - int s, v; - int rank, lastrank, newrank = -1; - - v = b - SA - 1; - lastrank = -1; - for(c = first, d = a - 1; c <= d; ++c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *++d = s; - rank = ISA[s + depth]; - if(lastrank != rank) { lastrank = rank; newrank = d - SA; } - ISA[s] = newrank; - } - } - - lastrank = -1; - for(e = d; first <= e; --e) { - rank = ISA[*e]; - if(lastrank != rank) { lastrank = rank; newrank = e - SA; } - if(newrank != rank) { ISA[*e] = newrank; } - } - - lastrank = -1; - for(c = last - 1, e = d + 1, d = b; e < d; --c) { - if((0 <= (s = *c - depth)) && (ISA[s] == v)) { - *--d = s; - rank = ISA[s + depth]; - if(lastrank != rank) { lastrank = rank; newrank = d - SA; } - ISA[s] = newrank; - } - } -} - -static -void -tr_introsort(int *ISA, const int *ISAd, - int *SA, int *first, int *last, - trbudget_t *budget) { -#define STACK_SIZE TR_STACKSIZE - struct { const int *a; int *b, *c; int d, e; }stack[STACK_SIZE]; - int *a, *b, *c; - int t; - int v, x = 0; - int incr = ISAd - ISA; - int limit, next; - int ssize, trlink = -1; - - for(ssize = 0, limit = tr_ilg(last - first);;) { - - if(limit < 0) { - if(limit == -1) { - /* tandem repeat partition */ - tr_partition(ISAd - incr, first, first, last, &a, &b, last - SA - 1); - - /* update ranks */ - if(a < last) { - for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } - } - if(b < last) { - for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } - } - - /* push */ - if(1 < (b - a)) { - STACK_PUSH5(NULL, a, b, 0, 0); - STACK_PUSH5(ISAd - incr, first, last, -2, trlink); - trlink = ssize - 2; - } - if((a - first) <= (last - b)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, tr_ilg(last - b), trlink); - last = a, limit = tr_ilg(a - first); - } else if(1 < (last - b)) { - first = b, limit = tr_ilg(last - b); - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } else { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, tr_ilg(a - first), trlink); - first = b, limit = tr_ilg(last - b); - } else if(1 < (a - first)) { - last = a, limit = tr_ilg(a - first); - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } else if(limit == -2) { - /* tandem repeat copy */ - a = stack[--ssize].b, b = stack[ssize].c; - if(stack[ssize].d == 0) { - tr_copy(ISA, SA, first, a, b, last, ISAd - ISA); - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - tr_partialcopy(ISA, SA, first, a, b, last, ISAd - ISA); - } - STACK_POP5(ISAd, first, last, limit, trlink); - } else { - /* sorted partition */ - if(0 <= *first) { - a = first; - do { ISA[*a] = a - SA; } while((++a < last) && (0 <= *a)); - first = a; - } - if(first < last) { - a = first; do { *a = ~*a; } while(*++a < 0); - next = (ISA[*a] != ISAd[*a]) ? tr_ilg(a - first + 1) : -1; - if(++a < last) { for(b = first, v = a - SA - 1; b < a; ++b) { ISA[*b] = v; } } - - /* push */ - if(trbudget_check(budget, a - first)) { - if((a - first) <= (last - a)) { - STACK_PUSH5(ISAd, a, last, -3, trlink); - ISAd += incr, last = a, limit = next; - } else { - if(1 < (last - a)) { - STACK_PUSH5(ISAd + incr, first, a, next, trlink); - first = a, limit = -3; - } else { - ISAd += incr, last = a, limit = next; - } - } - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - if(1 < (last - a)) { - first = a, limit = -3; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - continue; - } - - if((last - first) <= TR_INSERTIONSORT_THRESHOLD) { - tr_insertionsort(ISAd, first, last); - limit = -3; - continue; - } - - if(limit-- == 0) { - tr_heapsort(ISAd, first, last - first); - for(a = last - 1; first < a; a = b) { - for(x = ISAd[*a], b = a - 1; (first <= b) && (ISAd[*b] == x); --b) { *b = ~*b; } - } - limit = -3; - continue; - } - - /* choose pivot */ - a = tr_pivot(ISAd, first, last); - SWAP(*first, *a); - v = ISAd[*first]; - - /* partition */ - tr_partition(ISAd, first, first + 1, last, &a, &b, v); - if((last - first) != (b - a)) { - next = (ISA[*a] != v) ? tr_ilg(b - a) : -1; - - /* update ranks */ - for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } - if(b < last) { for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } } - - /* push */ - if((1 < (b - a)) && (trbudget_check(budget, b - a))) { - if((a - first) <= (last - b)) { - if((last - b) <= (b - a)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - STACK_PUSH5(ISAd, b, last, limit, trlink); - last = a; - } else if(1 < (last - b)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - first = b; - } else { - ISAd += incr, first = a, last = b, limit = next; - } - } else if((a - first) <= (b - a)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, limit, trlink); - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - last = a; - } else { - STACK_PUSH5(ISAd, b, last, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - STACK_PUSH5(ISAd, b, last, limit, trlink); - STACK_PUSH5(ISAd, first, a, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - if((a - first) <= (b - a)) { - if(1 < (last - b)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - STACK_PUSH5(ISAd, first, a, limit, trlink); - first = b; - } else if(1 < (a - first)) { - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - last = a; - } else { - ISAd += incr, first = a, last = b, limit = next; - } - } else if((last - b) <= (b - a)) { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, limit, trlink); - STACK_PUSH5(ISAd + incr, a, b, next, trlink); - first = b; - } else { - STACK_PUSH5(ISAd, first, a, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } else { - STACK_PUSH5(ISAd, first, a, limit, trlink); - STACK_PUSH5(ISAd, b, last, limit, trlink); - ISAd += incr, first = a, last = b, limit = next; - } - } - } else { - if((1 < (b - a)) && (0 <= trlink)) { stack[trlink].d = -1; } - if((a - first) <= (last - b)) { - if(1 < (a - first)) { - STACK_PUSH5(ISAd, b, last, limit, trlink); - last = a; - } else if(1 < (last - b)) { - first = b; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } else { - if(1 < (last - b)) { - STACK_PUSH5(ISAd, first, a, limit, trlink); - first = b; - } else if(1 < (a - first)) { - last = a; - } else { - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } - } else { - if(trbudget_check(budget, last - first)) { - limit = tr_ilg(last - first), ISAd += incr; - } else { - if(0 <= trlink) { stack[trlink].d = -1; } - STACK_POP5(ISAd, first, last, limit, trlink); - } - } - } -#undef STACK_SIZE -} - - - -/*---------------------------------------------------------------------------*/ - -/* Tandem repeat sort */ -static -void -trsort(int *ISA, int *SA, int n, int depth) { - int *ISAd; - int *first, *last; - trbudget_t budget; - int t, skip, unsorted; - - trbudget_init(&budget, tr_ilg(n) * 2 / 3, n); -/* trbudget_init(&budget, tr_ilg(n) * 3 / 4, n); */ - for(ISAd = ISA + depth; -n < *SA; ISAd += ISAd - ISA) { - first = SA; - skip = 0; - unsorted = 0; - do { - if((t = *first) < 0) { first -= t; skip += t; } - else { - if(skip != 0) { *(first + skip) = skip; skip = 0; } - last = SA + ISA[t] + 1; - if(1 < (last - first)) { - budget.count = 0; - tr_introsort(ISA, ISAd, SA, first, last, &budget); - if(budget.count != 0) { unsorted += budget.count; } - else { skip = first - last; } - } else if((last - first) == 1) { - skip = -1; - } - first = last; - } - } while(first < (SA + n)); - if(skip != 0) { *(first + skip) = skip; } - if(unsorted == 0) { break; } - } -} - - -/*---------------------------------------------------------------------------*/ - -/* Sorts suffixes of type B*. */ -static -int -sort_typeBstar(const unsigned char *T, int *SA, - int *bucket_A, int *bucket_B, - int n, int openMP) { - int *PAb, *ISAb, *buf; -#ifdef LIBBSC_OPENMP - int *curbuf; - int l; -#endif - int i, j, k, t, m, bufsize; - int c0, c1; -#ifdef LIBBSC_OPENMP - int d0, d1; -#endif - (void)openMP; - - /* Initialize bucket arrays. */ - for(i = 0; i < BUCKET_A_SIZE; ++i) { bucket_A[i] = 0; } - for(i = 0; i < BUCKET_B_SIZE; ++i) { bucket_B[i] = 0; } - - /* Count the number of occurrences of the first one or two characters of each - type A, B and B* suffix. Moreover, store the beginning position of all - type B* suffixes into the array SA. */ - for(i = n - 1, m = n, c0 = T[n - 1]; 0 <= i;) { - /* type A suffix. */ - do { ++BUCKET_A(c1 = c0); } while((0 <= --i) && ((c0 = T[i]) >= c1)); - if(0 <= i) { - /* type B* suffix. */ - ++BUCKET_BSTAR(c0, c1); - SA[--m] = i; - /* type B suffix. */ - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { - ++BUCKET_B(c0, c1); - } - } - } - m = n - m; -/* -note: - A type B* suffix is lexicographically smaller than a type B suffix that - begins with the same first two characters. -*/ - - /* Calculate the index of start/end point of each bucket. */ - for(c0 = 0, i = 0, j = 0; c0 < ALPHABET_SIZE; ++c0) { - t = i + BUCKET_A(c0); - BUCKET_A(c0) = i + j; /* start point */ - i = t + BUCKET_B(c0, c0); - for(c1 = c0 + 1; c1 < ALPHABET_SIZE; ++c1) { - j += BUCKET_BSTAR(c0, c1); - BUCKET_BSTAR(c0, c1) = j; /* end point */ - i += BUCKET_B(c0, c1); - } - } - - if(0 < m) { - /* Sort the type B* suffixes by their first two characters. */ - PAb = SA + n - m; ISAb = SA + m; - for(i = m - 2; 0 <= i; --i) { - t = PAb[i], c0 = T[t], c1 = T[t + 1]; - SA[--BUCKET_BSTAR(c0, c1)] = i; - } - t = PAb[m - 1], c0 = T[t], c1 = T[t + 1]; - SA[--BUCKET_BSTAR(c0, c1)] = m - 1; - - /* Sort the type B* substrings using sssort. */ -#ifdef LIBBSC_OPENMP - if (openMP) - { - buf = SA + m; - c0 = ALPHABET_SIZE - 2, c1 = ALPHABET_SIZE - 1, j = m; -#pragma omp parallel default(shared) private(bufsize, curbuf, k, l, d0, d1) - { - bufsize = (n - (2 * m)) / omp_get_num_threads(); - curbuf = buf + omp_get_thread_num() * bufsize; - k = 0; - for(;;) { - #pragma omp critical(sssort_lock) - { - if(0 < (l = j)) { - d0 = c0, d1 = c1; - do { - k = BUCKET_BSTAR(d0, d1); - if(--d1 <= d0) { - d1 = ALPHABET_SIZE - 1; - if(--d0 < 0) { break; } - } - } while(((l - k) <= 1) && (0 < (l = k))); - c0 = d0, c1 = d1, j = k; - } - } - if(l == 0) { break; } - sssort(T, PAb, SA + k, SA + l, - curbuf, bufsize, 2, n, *(SA + k) == (m - 1)); - } - } - } - else - { - buf = SA + m, bufsize = n - (2 * m); - for(c0 = ALPHABET_SIZE - 2, j = m; 0 < j; --c0) { - for(c1 = ALPHABET_SIZE - 1; c0 < c1; j = i, --c1) { - i = BUCKET_BSTAR(c0, c1); - if(1 < (j - i)) { - sssort(T, PAb, SA + i, SA + j, - buf, bufsize, 2, n, *(SA + i) == (m - 1)); - } - } - } - } -#else - buf = SA + m, bufsize = n - (2 * m); - for(c0 = ALPHABET_SIZE - 2, j = m; 0 < j; --c0) { - for(c1 = ALPHABET_SIZE - 1; c0 < c1; j = i, --c1) { - i = BUCKET_BSTAR(c0, c1); - if(1 < (j - i)) { - sssort(T, PAb, SA + i, SA + j, - buf, bufsize, 2, n, *(SA + i) == (m - 1)); - } - } - } -#endif - - /* Compute ranks of type B* substrings. */ - for(i = m - 1; 0 <= i; --i) { - if(0 <= SA[i]) { - j = i; - do { ISAb[SA[i]] = i; } while((0 <= --i) && (0 <= SA[i])); - SA[i + 1] = i - j; - if(i <= 0) { break; } - } - j = i; - do { ISAb[SA[i] = ~SA[i]] = j; } while(SA[--i] < 0); - ISAb[SA[i]] = j; - } - - /* Construct the inverse suffix array of type B* suffixes using trsort. */ - trsort(ISAb, SA, m, 1); - - /* Set the sorted order of type B* suffixes. */ - for(i = n - 1, j = m, c0 = T[n - 1]; 0 <= i;) { - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) >= c1); --i, c1 = c0) { } - if(0 <= i) { - t = i; - for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { } - SA[ISAb[--j]] = ((t == 0) || (1 < (t - i))) ? t : ~t; - } - } - - /* Calculate the index of start/end point of each bucket. */ - BUCKET_B(ALPHABET_SIZE - 1, ALPHABET_SIZE - 1) = n; /* end point */ - for(c0 = ALPHABET_SIZE - 2, k = m - 1; 0 <= c0; --c0) { - i = BUCKET_A(c0 + 1) - 1; - for(c1 = ALPHABET_SIZE - 1; c0 < c1; --c1) { - t = i - BUCKET_B(c0, c1); - BUCKET_B(c0, c1) = i; /* end point */ - - /* Move all type B* suffixes to the correct position. */ - for(i = t, j = BUCKET_BSTAR(c0, c1); - j <= k; - --i, --k) { SA[i] = SA[k]; } - } - BUCKET_BSTAR(c0, c0 + 1) = i - BUCKET_B(c0, c0) + 1; /* start point */ - BUCKET_B(c0, c0) = i; /* end point */ - } - } - - return m; -} - -/* Constructs the suffix array by using the sorted order of type B* suffixes. */ -static -void -construct_SA(const unsigned char *T, int *SA, - int *bucket_A, int *bucket_B, - int n, int m) { - int *i, *j, *k; - int s; - int c0, c1, c2; - - if(0 < m) { - /* Construct the sorted order of type B suffixes by using - the sorted order of type B* suffixes. */ - for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { - /* Scan the suffix array from right to left. */ - for(i = SA + BUCKET_BSTAR(c1, c1 + 1), - j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; - i <= j; - --j) { - if(0 < (s = *j)) { - assert(T[s] == c1); - assert(((s + 1) < n) && (T[s] <= T[s + 1])); - assert(T[s - 1] <= T[s]); - *j = ~s; - c0 = T[--s]; - if((0 < s) && (T[s - 1] > c0)) { s = ~s; } - if(c0 != c2) { - if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } - k = SA + BUCKET_B(c2 = c0, c1); - } - assert(k < j); assert(k != NULL); - *k-- = s; - } else { - assert(((s == 0) && (T[s] == c1)) || (s < 0)); - *j = ~s; - } - } - } - } - - /* Construct the suffix array by using - the sorted order of type B suffixes. */ - k = SA + BUCKET_A(c2 = T[n - 1]); - *k++ = (T[n - 2] < c2) ? ~(n - 1) : (n - 1); - /* Scan the suffix array from left to right. */ - for(i = SA, j = SA + n; i < j; ++i) { - if(0 < (s = *i)) { - assert(T[s - 1] >= T[s]); - c0 = T[--s]; - if((s == 0) || (T[s - 1] < c0)) { s = ~s; } - if(c0 != c2) { - BUCKET_A(c2) = k - SA; - k = SA + BUCKET_A(c2 = c0); - } - assert(i < k); - *k++ = s; - } else { - assert(s < 0); - *i = ~s; - } - } -} - -/* Constructs the burrows-wheeler transformed string directly - by using the sorted order of type B* suffixes. */ -static -int -construct_BWT(const unsigned char *T, int *SA, - int *bucket_A, int *bucket_B, - int n, int m) { - int *i, *j, *k, *orig; - int s; - int c0, c1, c2; - - if(0 < m) { - /* Construct the sorted order of type B suffixes by using - the sorted order of type B* suffixes. */ - for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { - /* Scan the suffix array from right to left. */ - for(i = SA + BUCKET_BSTAR(c1, c1 + 1), - j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; - i <= j; - --j) { - if(0 < (s = *j)) { - assert(T[s] == c1); - assert(((s + 1) < n) && (T[s] <= T[s + 1])); - assert(T[s - 1] <= T[s]); - c0 = T[--s]; - *j = ~((int)c0); - if((0 < s) && (T[s - 1] > c0)) { s = ~s; } - if(c0 != c2) { - if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } - k = SA + BUCKET_B(c2 = c0, c1); - } - assert(k < j); assert(k != NULL); - *k-- = s; - } else if(s != 0) { - *j = ~s; -#ifndef NDEBUG - } else { - assert(T[s] == c1); -#endif - } - } - } - } - - /* Construct the BWTed string by using - the sorted order of type B suffixes. */ - k = SA + BUCKET_A(c2 = T[n - 1]); - *k++ = (T[n - 2] < c2) ? ~((int)T[n - 2]) : (n - 1); - /* Scan the suffix array from left to right. */ - for(i = SA, j = SA + n, orig = SA; i < j; ++i) { - if(0 < (s = *i)) { - assert(T[s - 1] >= T[s]); - c0 = T[--s]; - *i = c0; - if((0 < s) && (T[s - 1] < c0)) { s = ~((int)T[s - 1]); } - if(c0 != c2) { - BUCKET_A(c2) = k - SA; - k = SA + BUCKET_A(c2 = c0); - } - assert(i < k); - *k++ = s; - } else if(s != 0) { - *i = ~s; - } else { - orig = i; - } - } - - return orig - SA; -} - -/* Constructs the burrows-wheeler transformed string directly - by using the sorted order of type B* suffixes. */ -static -int -construct_BWT_indexes(const unsigned char *T, int *SA, - int *bucket_A, int *bucket_B, - int n, int m, - unsigned char * num_indexes, int * indexes) { - int *i, *j, *k, *orig; - int s; - int c0, c1, c2; - - int mod = n / 8; - { - mod |= mod >> 1; mod |= mod >> 2; - mod |= mod >> 4; mod |= mod >> 8; - mod |= mod >> 16; mod >>= 1; - - *num_indexes = (unsigned char)((n - 1) / (mod + 1)); - } - - if(0 < m) { - /* Construct the sorted order of type B suffixes by using - the sorted order of type B* suffixes. */ - for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { - /* Scan the suffix array from right to left. */ - for(i = SA + BUCKET_BSTAR(c1, c1 + 1), - j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; - i <= j; - --j) { - if(0 < (s = *j)) { - assert(T[s] == c1); - assert(((s + 1) < n) && (T[s] <= T[s + 1])); - assert(T[s - 1] <= T[s]); - - if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = j - SA; - - c0 = T[--s]; - *j = ~((int)c0); - if((0 < s) && (T[s - 1] > c0)) { s = ~s; } - if(c0 != c2) { - if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } - k = SA + BUCKET_B(c2 = c0, c1); - } - assert(k < j); assert(k != NULL); - *k-- = s; - } else if(s != 0) { - *j = ~s; -#ifndef NDEBUG - } else { - assert(T[s] == c1); -#endif - } - } - } - } - - /* Construct the BWTed string by using - the sorted order of type B suffixes. */ - k = SA + BUCKET_A(c2 = T[n - 1]); - if (T[n - 2] < c2) { - if (((n - 1) & mod) == 0) indexes[(n - 1) / (mod + 1) - 1] = k - SA; - *k++ = ~((int)T[n - 2]); - } - else { - *k++ = n - 1; - } - - /* Scan the suffix array from left to right. */ - for(i = SA, j = SA + n, orig = SA; i < j; ++i) { - if(0 < (s = *i)) { - assert(T[s - 1] >= T[s]); - - if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = i - SA; - - c0 = T[--s]; - *i = c0; - if(c0 != c2) { - BUCKET_A(c2) = k - SA; - k = SA + BUCKET_A(c2 = c0); - } - assert(i < k); - if((0 < s) && (T[s - 1] < c0)) { - if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = k - SA; - *k++ = ~((int)T[s - 1]); - } else - *k++ = s; - } else if(s != 0) { - *i = ~s; - } else { - orig = i; - } - } - - return orig - SA; -} - - -/*---------------------------------------------------------------------------*/ - -/*- Function -*/ - -int -divsufsort(const unsigned char *T, int *SA, int n, int openMP) { - int *bucket_A, *bucket_B; - int m; - int err = 0; - - /* Check arguments. */ - if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; } - else if(n == 0) { return 0; } - else if(n == 1) { SA[0] = 0; return 0; } - else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; } - - bucket_A = (int *)malloc(BUCKET_A_SIZE * sizeof(int)); - bucket_B = (int *)malloc(BUCKET_B_SIZE * sizeof(int)); - - /* Suffixsort. */ - if((bucket_A != NULL) && (bucket_B != NULL)) { - m = sort_typeBstar(T, SA, bucket_A, bucket_B, n, openMP); - construct_SA(T, SA, bucket_A, bucket_B, n, m); - } else { - err = -2; - } - - free(bucket_B); - free(bucket_A); - - return err; -} - -int -divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * num_indexes, int * indexes, int openMP) { - int *B; - int *bucket_A, *bucket_B; - int m, pidx, i; - - /* Check arguments. */ - if((T == NULL) || (U == NULL) || (n < 0)) { return -1; } - else if(n <= 1) { if(n == 1) { U[0] = T[0]; } return n; } - - if((B = A) == NULL) { B = (int *)malloc((size_t)(n + 1) * sizeof(int)); } - bucket_A = (int *)malloc(BUCKET_A_SIZE * sizeof(int)); - bucket_B = (int *)malloc(BUCKET_B_SIZE * sizeof(int)); - - /* Burrows-Wheeler Transform. */ - if((B != NULL) && (bucket_A != NULL) && (bucket_B != NULL)) { - m = sort_typeBstar(T, B, bucket_A, bucket_B, n, openMP); - - if (num_indexes == NULL || indexes == NULL) { - pidx = construct_BWT(T, B, bucket_A, bucket_B, n, m); - } else { - pidx = construct_BWT_indexes(T, B, bucket_A, bucket_B, n, m, num_indexes, indexes); - } - - /* Copy to output string. */ - U[0] = T[n - 1]; - for(i = 0; i < pidx; ++i) { U[i + 1] = (unsigned char)B[i]; } - for(i += 1; i < n; ++i) { U[i] = (unsigned char)B[i]; } - pidx += 1; - } else { - pidx = -2; - } - - free(bucket_B); - free(bucket_A); - if(A == NULL) { free(B); } - - return pidx; -} diff --git a/third_party/zstd/lib/dictBuilder/divsufsort.h b/third_party/zstd/lib/dictBuilder/divsufsort.h deleted file mode 100644 index 3ed2b28..0000000 --- a/third_party/zstd/lib/dictBuilder/divsufsort.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * divsufsort.h for libdivsufsort-lite - * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DIVSUFSORT_H -#define _DIVSUFSORT_H 1 - -/*- Prototypes -*/ - -/** - * Constructs the suffix array of a given string. - * @param T [0..n-1] The input string. - * @param SA [0..n-1] The output array of suffixes. - * @param n The length of the given string. - * @param openMP enables OpenMP optimization. - * @return 0 if no error occurred, -1 or -2 otherwise. - */ -int -divsufsort(const unsigned char *T, int *SA, int n, int openMP); - -/** - * Constructs the burrows-wheeler transformed string of a given string. - * @param T [0..n-1] The input string. - * @param U [0..n-1] The output string. (can be T) - * @param A [0..n-1] The temporary array. (can be NULL) - * @param n The length of the given string. - * @param num_indexes The length of secondary indexes array. (can be NULL) - * @param indexes The secondary indexes array. (can be NULL) - * @param openMP enables OpenMP optimization. - * @return The primary index if no error occurred, -1 or -2 otherwise. - */ -int -divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * num_indexes, int * indexes, int openMP); - -#endif /* _DIVSUFSORT_H */ diff --git a/third_party/zstd/lib/dictBuilder/fastcover.c b/third_party/zstd/lib/dictBuilder/fastcover.c deleted file mode 100644 index a958eb3..0000000 --- a/third_party/zstd/lib/dictBuilder/fastcover.c +++ /dev/null @@ -1,766 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -/*-************************************* -* Dependencies -***************************************/ -#include /* fprintf */ -#include /* malloc, free, qsort */ -#include /* memset */ -#include /* clock */ - -#ifndef ZDICT_STATIC_LINKING_ONLY -# define ZDICT_STATIC_LINKING_ONLY -#endif - -#include "../common/mem.h" /* read */ -#include "../common/pool.h" -#include "../common/threading.h" -#include "../common/zstd_internal.h" /* includes zstd.h */ -#include "../compress/zstd_compress_internal.h" /* ZSTD_hash*() */ -#include "../zdict.h" -#include "cover.h" - - -/*-************************************* -* Constants -***************************************/ -/** -* There are 32bit indexes used to ref samples, so limit samples size to 4GB -* on 64bit builds. -* For 32bit builds we choose 1 GB. -* Most 32bit platforms have 2GB user-mode addressable space and we allocate a large -* contiguous buffer, so 1GB is already a high limit. -*/ -#define FASTCOVER_MAX_SAMPLES_SIZE (sizeof(size_t) == 8 ? ((unsigned)-1) : ((unsigned)1 GB)) -#define FASTCOVER_MAX_F 31 -#define FASTCOVER_MAX_ACCEL 10 -#define FASTCOVER_DEFAULT_SPLITPOINT 0.75 -#define DEFAULT_F 20 -#define DEFAULT_ACCEL 1 - - -/*-************************************* -* Console display -***************************************/ -#ifndef LOCALDISPLAYLEVEL -static int g_displayLevel = 0; -#endif -#undef DISPLAY -#define DISPLAY(...) \ - { \ - fprintf(stderr, __VA_ARGS__); \ - fflush(stderr); \ - } -#undef LOCALDISPLAYLEVEL -#define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ - if (displayLevel >= l) { \ - DISPLAY(__VA_ARGS__); \ - } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ -#undef DISPLAYLEVEL -#define DISPLAYLEVEL(l, ...) LOCALDISPLAYLEVEL(g_displayLevel, l, __VA_ARGS__) - -#ifndef LOCALDISPLAYUPDATE -static const clock_t g_refreshRate = CLOCKS_PER_SEC * 15 / 100; -static clock_t g_time = 0; -#endif -#undef LOCALDISPLAYUPDATE -#define LOCALDISPLAYUPDATE(displayLevel, l, ...) \ - if (displayLevel >= l) { \ - if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) { \ - g_time = clock(); \ - DISPLAY(__VA_ARGS__); \ - } \ - } -#undef DISPLAYUPDATE -#define DISPLAYUPDATE(l, ...) LOCALDISPLAYUPDATE(g_displayLevel, l, __VA_ARGS__) - - -/*-************************************* -* Hash Functions -***************************************/ -/** - * Hash the d-byte value pointed to by p and mod 2^f into the frequency vector - */ -static size_t FASTCOVER_hashPtrToIndex(const void* p, U32 f, unsigned d) { - if (d == 6) { - return ZSTD_hash6Ptr(p, f); - } - return ZSTD_hash8Ptr(p, f); -} - - -/*-************************************* -* Acceleration -***************************************/ -typedef struct { - unsigned finalize; /* Percentage of training samples used for ZDICT_finalizeDictionary */ - unsigned skip; /* Number of dmer skipped between each dmer counted in computeFrequency */ -} FASTCOVER_accel_t; - - -static const FASTCOVER_accel_t FASTCOVER_defaultAccelParameters[FASTCOVER_MAX_ACCEL+1] = { - { 100, 0 }, /* accel = 0, should not happen because accel = 0 defaults to accel = 1 */ - { 100, 0 }, /* accel = 1 */ - { 50, 1 }, /* accel = 2 */ - { 34, 2 }, /* accel = 3 */ - { 25, 3 }, /* accel = 4 */ - { 20, 4 }, /* accel = 5 */ - { 17, 5 }, /* accel = 6 */ - { 14, 6 }, /* accel = 7 */ - { 13, 7 }, /* accel = 8 */ - { 11, 8 }, /* accel = 9 */ - { 10, 9 }, /* accel = 10 */ -}; - - -/*-************************************* -* Context -***************************************/ -typedef struct { - const BYTE *samples; - size_t *offsets; - const size_t *samplesSizes; - size_t nbSamples; - size_t nbTrainSamples; - size_t nbTestSamples; - size_t nbDmers; - U32 *freqs; - unsigned d; - unsigned f; - FASTCOVER_accel_t accelParams; -} FASTCOVER_ctx_t; - - -/*-************************************* -* Helper functions -***************************************/ -/** - * Selects the best segment in an epoch. - * Segments of are scored according to the function: - * - * Let F(d) be the frequency of all dmers with hash value d. - * Let S_i be hash value of the dmer at position i of segment S which has length k. - * - * Score(S) = F(S_1) + F(S_2) + ... + F(S_{k-d+1}) - * - * Once the dmer with hash value d is in the dictionary we set F(d) = 0. - */ -static COVER_segment_t FASTCOVER_selectSegment(const FASTCOVER_ctx_t *ctx, - U32 *freqs, U32 begin, U32 end, - ZDICT_cover_params_t parameters, - U16* segmentFreqs) { - /* Constants */ - const U32 k = parameters.k; - const U32 d = parameters.d; - const U32 f = ctx->f; - const U32 dmersInK = k - d + 1; - - /* Try each segment (activeSegment) and save the best (bestSegment) */ - COVER_segment_t bestSegment = {0, 0, 0}; - COVER_segment_t activeSegment; - - /* Reset the activeDmers in the segment */ - /* The activeSegment starts at the beginning of the epoch. */ - activeSegment.begin = begin; - activeSegment.end = begin; - activeSegment.score = 0; - - /* Slide the activeSegment through the whole epoch. - * Save the best segment in bestSegment. - */ - while (activeSegment.end < end) { - /* Get hash value of current dmer */ - const size_t idx = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.end, f, d); - - /* Add frequency of this index to score if this is the first occurrence of index in active segment */ - if (segmentFreqs[idx] == 0) { - activeSegment.score += freqs[idx]; - } - /* Increment end of segment and segmentFreqs*/ - activeSegment.end += 1; - segmentFreqs[idx] += 1; - /* If the window is now too large, drop the first position */ - if (activeSegment.end - activeSegment.begin == dmersInK + 1) { - /* Get hash value of the dmer to be eliminated from active segment */ - const size_t delIndex = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.begin, f, d); - segmentFreqs[delIndex] -= 1; - /* Subtract frequency of this index from score if this is the last occurrence of this index in active segment */ - if (segmentFreqs[delIndex] == 0) { - activeSegment.score -= freqs[delIndex]; - } - /* Increment start of segment */ - activeSegment.begin += 1; - } - - /* If this segment is the best so far save it */ - if (activeSegment.score > bestSegment.score) { - bestSegment = activeSegment; - } - } - - /* Zero out rest of segmentFreqs array */ - while (activeSegment.begin < end) { - const size_t delIndex = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.begin, f, d); - segmentFreqs[delIndex] -= 1; - activeSegment.begin += 1; - } - - { - /* Zero the frequency of hash value of each dmer covered by the chosen segment. */ - U32 pos; - for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { - const size_t i = FASTCOVER_hashPtrToIndex(ctx->samples + pos, f, d); - freqs[i] = 0; - } - } - - return bestSegment; -} - - -static int FASTCOVER_checkParameters(ZDICT_cover_params_t parameters, - size_t maxDictSize, unsigned f, - unsigned accel) { - /* k, d, and f are required parameters */ - if (parameters.d == 0 || parameters.k == 0) { - return 0; - } - /* d has to be 6 or 8 */ - if (parameters.d != 6 && parameters.d != 8) { - return 0; - } - /* k <= maxDictSize */ - if (parameters.k > maxDictSize) { - return 0; - } - /* d <= k */ - if (parameters.d > parameters.k) { - return 0; - } - /* 0 < f <= FASTCOVER_MAX_F*/ - if (f > FASTCOVER_MAX_F || f == 0) { - return 0; - } - /* 0 < splitPoint <= 1 */ - if (parameters.splitPoint <= 0 || parameters.splitPoint > 1) { - return 0; - } - /* 0 < accel <= 10 */ - if (accel > 10 || accel == 0) { - return 0; - } - return 1; -} - - -/** - * Clean up a context initialized with `FASTCOVER_ctx_init()`. - */ -static void -FASTCOVER_ctx_destroy(FASTCOVER_ctx_t* ctx) -{ - if (!ctx) return; - - free(ctx->freqs); - ctx->freqs = NULL; - - free(ctx->offsets); - ctx->offsets = NULL; -} - - -/** - * Calculate for frequency of hash value of each dmer in ctx->samples - */ -static void -FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx) -{ - const unsigned f = ctx->f; - const unsigned d = ctx->d; - const unsigned skip = ctx->accelParams.skip; - const unsigned readLength = MAX(d, 8); - size_t i; - assert(ctx->nbTrainSamples >= 5); - assert(ctx->nbTrainSamples <= ctx->nbSamples); - for (i = 0; i < ctx->nbTrainSamples; i++) { - size_t start = ctx->offsets[i]; /* start of current dmer */ - size_t const currSampleEnd = ctx->offsets[i+1]; - while (start + readLength <= currSampleEnd) { - const size_t dmerIndex = FASTCOVER_hashPtrToIndex(ctx->samples + start, f, d); - freqs[dmerIndex]++; - start = start + skip + 1; - } - } -} - - -/** - * Prepare a context for dictionary building. - * The context is only dependent on the parameter `d` and can be used multiple - * times. - * Returns 0 on success or error code on error. - * The context must be destroyed with `FASTCOVER_ctx_destroy()`. - */ -static size_t -FASTCOVER_ctx_init(FASTCOVER_ctx_t* ctx, - const void* samplesBuffer, - const size_t* samplesSizes, unsigned nbSamples, - unsigned d, double splitPoint, unsigned f, - FASTCOVER_accel_t accelParams) -{ - const BYTE* const samples = (const BYTE*)samplesBuffer; - const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples); - /* Split samples into testing and training sets */ - const unsigned nbTrainSamples = splitPoint < 1.0 ? (unsigned)((double)nbSamples * splitPoint) : nbSamples; - const unsigned nbTestSamples = splitPoint < 1.0 ? nbSamples - nbTrainSamples : nbSamples; - const size_t trainingSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes, nbTrainSamples) : totalSamplesSize; - const size_t testSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes + nbTrainSamples, nbTestSamples) : totalSamplesSize; - - /* Checks */ - if (totalSamplesSize < MAX(d, sizeof(U64)) || - totalSamplesSize >= (size_t)FASTCOVER_MAX_SAMPLES_SIZE) { - DISPLAYLEVEL(1, "Total samples size is too large (%u MB), maximum size is %u MB\n", - (unsigned)(totalSamplesSize >> 20), (FASTCOVER_MAX_SAMPLES_SIZE >> 20)); - return ERROR(srcSize_wrong); - } - - /* Check if there are at least 5 training samples */ - if (nbTrainSamples < 5) { - DISPLAYLEVEL(1, "Total number of training samples is %u and is invalid\n", nbTrainSamples); - return ERROR(srcSize_wrong); - } - - /* Check if there's testing sample */ - if (nbTestSamples < 1) { - DISPLAYLEVEL(1, "Total number of testing samples is %u and is invalid.\n", nbTestSamples); - return ERROR(srcSize_wrong); - } - - /* Zero the context */ - memset(ctx, 0, sizeof(*ctx)); - DISPLAYLEVEL(2, "Training on %u samples of total size %u\n", nbTrainSamples, - (unsigned)trainingSamplesSize); - DISPLAYLEVEL(2, "Testing on %u samples of total size %u\n", nbTestSamples, - (unsigned)testSamplesSize); - - ctx->samples = samples; - ctx->samplesSizes = samplesSizes; - ctx->nbSamples = nbSamples; - ctx->nbTrainSamples = nbTrainSamples; - ctx->nbTestSamples = nbTestSamples; - ctx->nbDmers = trainingSamplesSize - MAX(d, sizeof(U64)) + 1; - ctx->d = d; - ctx->f = f; - ctx->accelParams = accelParams; - - /* The offsets of each file */ - ctx->offsets = (size_t*)calloc((nbSamples + 1), sizeof(size_t)); - if (ctx->offsets == NULL) { - DISPLAYLEVEL(1, "Failed to allocate scratch buffers \n"); - FASTCOVER_ctx_destroy(ctx); - return ERROR(memory_allocation); - } - - /* Fill offsets from the samplesSizes */ - { U32 i; - ctx->offsets[0] = 0; - assert(nbSamples >= 5); - for (i = 1; i <= nbSamples; ++i) { - ctx->offsets[i] = ctx->offsets[i - 1] + samplesSizes[i - 1]; - } - } - - /* Initialize frequency array of size 2^f */ - ctx->freqs = (U32*)calloc(((U64)1 << f), sizeof(U32)); - if (ctx->freqs == NULL) { - DISPLAYLEVEL(1, "Failed to allocate frequency table \n"); - FASTCOVER_ctx_destroy(ctx); - return ERROR(memory_allocation); - } - - DISPLAYLEVEL(2, "Computing frequencies\n"); - FASTCOVER_computeFrequency(ctx->freqs, ctx); - - return 0; -} - - -/** - * Given the prepared context build the dictionary. - */ -static size_t -FASTCOVER_buildDictionary(const FASTCOVER_ctx_t* ctx, - U32* freqs, - void* dictBuffer, size_t dictBufferCapacity, - ZDICT_cover_params_t parameters, - U16* segmentFreqs) -{ - BYTE *const dict = (BYTE *)dictBuffer; - size_t tail = dictBufferCapacity; - /* Divide the data into epochs. We will select one segment from each epoch. */ - const COVER_epoch_info_t epochs = COVER_computeEpochs( - (U32)dictBufferCapacity, (U32)ctx->nbDmers, parameters.k, 1); - const size_t maxZeroScoreRun = 10; - size_t zeroScoreRun = 0; - size_t epoch; - DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n", - (U32)epochs.num, (U32)epochs.size); - /* Loop through the epochs until there are no more segments or the dictionary - * is full. - */ - for (epoch = 0; tail > 0; epoch = (epoch + 1) % epochs.num) { - const U32 epochBegin = (U32)(epoch * epochs.size); - const U32 epochEnd = epochBegin + epochs.size; - size_t segmentSize; - /* Select a segment */ - COVER_segment_t segment = FASTCOVER_selectSegment( - ctx, freqs, epochBegin, epochEnd, parameters, segmentFreqs); - - /* If the segment covers no dmers, then we are out of content. - * There may be new content in other epochs, for continue for some time. - */ - if (segment.score == 0) { - if (++zeroScoreRun >= maxZeroScoreRun) { - break; - } - continue; - } - zeroScoreRun = 0; - - /* Trim the segment if necessary and if it is too small then we are done */ - segmentSize = MIN(segment.end - segment.begin + parameters.d - 1, tail); - if (segmentSize < parameters.d) { - break; - } - - /* We fill the dictionary from the back to allow the best segments to be - * referenced with the smallest offsets. - */ - tail -= segmentSize; - memcpy(dict + tail, ctx->samples + segment.begin, segmentSize); - DISPLAYUPDATE( - 2, "\r%u%% ", - (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity)); - } - DISPLAYLEVEL(2, "\r%79s\r", ""); - return tail; -} - -/** - * Parameters for FASTCOVER_tryParameters(). - */ -typedef struct FASTCOVER_tryParameters_data_s { - const FASTCOVER_ctx_t* ctx; - COVER_best_t* best; - size_t dictBufferCapacity; - ZDICT_cover_params_t parameters; -} FASTCOVER_tryParameters_data_t; - - -/** - * Tries a set of parameters and updates the COVER_best_t with the results. - * This function is thread safe if zstd is compiled with multithreaded support. - * It takes its parameters as an *OWNING* opaque pointer to support threading. - */ -static void FASTCOVER_tryParameters(void* opaque) -{ - /* Save parameters as local variables */ - FASTCOVER_tryParameters_data_t *const data = (FASTCOVER_tryParameters_data_t*)opaque; - const FASTCOVER_ctx_t *const ctx = data->ctx; - const ZDICT_cover_params_t parameters = data->parameters; - size_t dictBufferCapacity = data->dictBufferCapacity; - size_t totalCompressedSize = ERROR(GENERIC); - /* Initialize array to keep track of frequency of dmer within activeSegment */ - U16* segmentFreqs = (U16*)calloc(((U64)1 << ctx->f), sizeof(U16)); - /* Allocate space for hash table, dict, and freqs */ - BYTE *const dict = (BYTE*)malloc(dictBufferCapacity); - COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC)); - U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32)); - if (!segmentFreqs || !dict || !freqs) { - DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n"); - goto _cleanup; - } - /* Copy the frequencies because we need to modify them */ - memcpy(freqs, ctx->freqs, ((U64)1 << ctx->f) * sizeof(U32)); - /* Build the dictionary */ - { const size_t tail = FASTCOVER_buildDictionary(ctx, freqs, dict, dictBufferCapacity, - parameters, segmentFreqs); - - const unsigned nbFinalizeSamples = (unsigned)(ctx->nbTrainSamples * ctx->accelParams.finalize / 100); - selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail, - ctx->samples, ctx->samplesSizes, nbFinalizeSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets, - totalCompressedSize); - - if (COVER_dictSelectionIsError(selection)) { - DISPLAYLEVEL(1, "Failed to select dictionary\n"); - goto _cleanup; - } - } -_cleanup: - free(dict); - COVER_best_finish(data->best, parameters, selection); - free(data); - free(segmentFreqs); - COVER_dictSelectionFree(selection); - free(freqs); -} - - -static void -FASTCOVER_convertToCoverParams(ZDICT_fastCover_params_t fastCoverParams, - ZDICT_cover_params_t* coverParams) -{ - coverParams->k = fastCoverParams.k; - coverParams->d = fastCoverParams.d; - coverParams->steps = fastCoverParams.steps; - coverParams->nbThreads = fastCoverParams.nbThreads; - coverParams->splitPoint = fastCoverParams.splitPoint; - coverParams->zParams = fastCoverParams.zParams; - coverParams->shrinkDict = fastCoverParams.shrinkDict; -} - - -static void -FASTCOVER_convertToFastCoverParams(ZDICT_cover_params_t coverParams, - ZDICT_fastCover_params_t* fastCoverParams, - unsigned f, unsigned accel) -{ - fastCoverParams->k = coverParams.k; - fastCoverParams->d = coverParams.d; - fastCoverParams->steps = coverParams.steps; - fastCoverParams->nbThreads = coverParams.nbThreads; - fastCoverParams->splitPoint = coverParams.splitPoint; - fastCoverParams->f = f; - fastCoverParams->accel = accel; - fastCoverParams->zParams = coverParams.zParams; - fastCoverParams->shrinkDict = coverParams.shrinkDict; -} - - -ZDICTLIB_STATIC_API size_t -ZDICT_trainFromBuffer_fastCover(void* dictBuffer, size_t dictBufferCapacity, - const void* samplesBuffer, - const size_t* samplesSizes, unsigned nbSamples, - ZDICT_fastCover_params_t parameters) -{ - BYTE* const dict = (BYTE*)dictBuffer; - FASTCOVER_ctx_t ctx; - ZDICT_cover_params_t coverParams; - FASTCOVER_accel_t accelParams; - /* Initialize global data */ - g_displayLevel = (int)parameters.zParams.notificationLevel; - /* Assign splitPoint and f if not provided */ - parameters.splitPoint = 1.0; - parameters.f = parameters.f == 0 ? DEFAULT_F : parameters.f; - parameters.accel = parameters.accel == 0 ? DEFAULT_ACCEL : parameters.accel; - /* Convert to cover parameter */ - memset(&coverParams, 0 , sizeof(coverParams)); - FASTCOVER_convertToCoverParams(parameters, &coverParams); - /* Checks */ - if (!FASTCOVER_checkParameters(coverParams, dictBufferCapacity, parameters.f, - parameters.accel)) { - DISPLAYLEVEL(1, "FASTCOVER parameters incorrect\n"); - return ERROR(parameter_outOfBound); - } - if (nbSamples == 0) { - DISPLAYLEVEL(1, "FASTCOVER must have at least one input file\n"); - return ERROR(srcSize_wrong); - } - if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { - DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", - ZDICT_DICTSIZE_MIN); - return ERROR(dstSize_tooSmall); - } - /* Assign corresponding FASTCOVER_accel_t to accelParams*/ - accelParams = FASTCOVER_defaultAccelParameters[parameters.accel]; - /* Initialize context */ - { - size_t const initVal = FASTCOVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, - coverParams.d, parameters.splitPoint, parameters.f, - accelParams); - if (ZSTD_isError(initVal)) { - DISPLAYLEVEL(1, "Failed to initialize context\n"); - return initVal; - } - } - COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.nbDmers, g_displayLevel); - /* Build the dictionary */ - DISPLAYLEVEL(2, "Building dictionary\n"); - { - /* Initialize array to keep track of frequency of dmer within activeSegment */ - U16* segmentFreqs = (U16 *)calloc(((U64)1 << parameters.f), sizeof(U16)); - const size_t tail = FASTCOVER_buildDictionary(&ctx, ctx.freqs, dictBuffer, - dictBufferCapacity, coverParams, segmentFreqs); - const unsigned nbFinalizeSamples = (unsigned)(ctx.nbTrainSamples * ctx.accelParams.finalize / 100); - const size_t dictionarySize = ZDICT_finalizeDictionary( - dict, dictBufferCapacity, dict + tail, dictBufferCapacity - tail, - samplesBuffer, samplesSizes, nbFinalizeSamples, coverParams.zParams); - if (!ZSTD_isError(dictionarySize)) { - DISPLAYLEVEL(2, "Constructed dictionary of size %u\n", - (unsigned)dictionarySize); - } - FASTCOVER_ctx_destroy(&ctx); - free(segmentFreqs); - return dictionarySize; - } -} - - -ZDICTLIB_STATIC_API size_t -ZDICT_optimizeTrainFromBuffer_fastCover( - void* dictBuffer, size_t dictBufferCapacity, - const void* samplesBuffer, - const size_t* samplesSizes, unsigned nbSamples, - ZDICT_fastCover_params_t* parameters) -{ - ZDICT_cover_params_t coverParams; - FASTCOVER_accel_t accelParams; - /* constants */ - const unsigned nbThreads = parameters->nbThreads; - const double splitPoint = - parameters->splitPoint <= 0.0 ? FASTCOVER_DEFAULT_SPLITPOINT : parameters->splitPoint; - const unsigned kMinD = parameters->d == 0 ? 6 : parameters->d; - const unsigned kMaxD = parameters->d == 0 ? 8 : parameters->d; - const unsigned kMinK = parameters->k == 0 ? 50 : parameters->k; - const unsigned kMaxK = parameters->k == 0 ? 2000 : parameters->k; - const unsigned kSteps = parameters->steps == 0 ? 40 : parameters->steps; - const unsigned kStepSize = MAX((kMaxK - kMinK) / kSteps, 1); - const unsigned kIterations = - (1 + (kMaxD - kMinD) / 2) * (1 + (kMaxK - kMinK) / kStepSize); - const unsigned f = parameters->f == 0 ? DEFAULT_F : parameters->f; - const unsigned accel = parameters->accel == 0 ? DEFAULT_ACCEL : parameters->accel; - const unsigned shrinkDict = 0; - /* Local variables */ - const int displayLevel = (int)parameters->zParams.notificationLevel; - unsigned iteration = 1; - unsigned d; - unsigned k; - COVER_best_t best; - POOL_ctx *pool = NULL; - int warned = 0; - /* Checks */ - if (splitPoint <= 0 || splitPoint > 1) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect splitPoint\n"); - return ERROR(parameter_outOfBound); - } - if (accel == 0 || accel > FASTCOVER_MAX_ACCEL) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect accel\n"); - return ERROR(parameter_outOfBound); - } - if (kMinK < kMaxD || kMaxK < kMinK) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect k\n"); - return ERROR(parameter_outOfBound); - } - if (nbSamples == 0) { - LOCALDISPLAYLEVEL(displayLevel, 1, "FASTCOVER must have at least one input file\n"); - return ERROR(srcSize_wrong); - } - if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { - LOCALDISPLAYLEVEL(displayLevel, 1, "dictBufferCapacity must be at least %u\n", - ZDICT_DICTSIZE_MIN); - return ERROR(dstSize_tooSmall); - } - if (nbThreads > 1) { - pool = POOL_create(nbThreads, 1); - if (!pool) { - return ERROR(memory_allocation); - } - } - /* Initialization */ - COVER_best_init(&best); - memset(&coverParams, 0 , sizeof(coverParams)); - FASTCOVER_convertToCoverParams(*parameters, &coverParams); - accelParams = FASTCOVER_defaultAccelParameters[accel]; - /* Turn down global display level to clean up display at level 2 and below */ - g_displayLevel = displayLevel == 0 ? 0 : displayLevel - 1; - /* Loop through d first because each new value needs a new context */ - LOCALDISPLAYLEVEL(displayLevel, 2, "Trying %u different sets of parameters\n", - kIterations); - for (d = kMinD; d <= kMaxD; d += 2) { - /* Initialize the context for this value of d */ - FASTCOVER_ctx_t ctx; - LOCALDISPLAYLEVEL(displayLevel, 3, "d=%u\n", d); - { - size_t const initVal = FASTCOVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, d, splitPoint, f, accelParams); - if (ZSTD_isError(initVal)) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to initialize context\n"); - COVER_best_destroy(&best); - POOL_free(pool); - return initVal; - } - } - if (!warned) { - COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.nbDmers, displayLevel); - warned = 1; - } - /* Loop through k reusing the same context */ - for (k = kMinK; k <= kMaxK; k += kStepSize) { - /* Prepare the arguments */ - FASTCOVER_tryParameters_data_t *data = (FASTCOVER_tryParameters_data_t *)malloc( - sizeof(FASTCOVER_tryParameters_data_t)); - LOCALDISPLAYLEVEL(displayLevel, 3, "k=%u\n", k); - if (!data) { - LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to allocate parameters\n"); - COVER_best_destroy(&best); - FASTCOVER_ctx_destroy(&ctx); - POOL_free(pool); - return ERROR(memory_allocation); - } - data->ctx = &ctx; - data->best = &best; - data->dictBufferCapacity = dictBufferCapacity; - data->parameters = coverParams; - data->parameters.k = k; - data->parameters.d = d; - data->parameters.splitPoint = splitPoint; - data->parameters.steps = kSteps; - data->parameters.shrinkDict = shrinkDict; - data->parameters.zParams.notificationLevel = (unsigned)g_displayLevel; - /* Check the parameters */ - if (!FASTCOVER_checkParameters(data->parameters, dictBufferCapacity, - data->ctx->f, accel)) { - DISPLAYLEVEL(1, "FASTCOVER parameters incorrect\n"); - free(data); - continue; - } - /* Call the function and pass ownership of data to it */ - COVER_best_start(&best); - if (pool) { - POOL_add(pool, &FASTCOVER_tryParameters, data); - } else { - FASTCOVER_tryParameters(data); - } - /* Print status */ - LOCALDISPLAYUPDATE(displayLevel, 2, "\r%u%% ", - (unsigned)((iteration * 100) / kIterations)); - ++iteration; - } - COVER_best_wait(&best); - FASTCOVER_ctx_destroy(&ctx); - } - LOCALDISPLAYLEVEL(displayLevel, 2, "\r%79s\r", ""); - /* Fill the output buffer and parameters with output of the best parameters */ - { - const size_t dictSize = best.dictSize; - if (ZSTD_isError(best.compressedSize)) { - const size_t compressedSize = best.compressedSize; - COVER_best_destroy(&best); - POOL_free(pool); - return compressedSize; - } - FASTCOVER_convertToFastCoverParams(best.parameters, parameters, f, accel); - memcpy(dictBuffer, best.dict, dictSize); - COVER_best_destroy(&best); - POOL_free(pool); - return dictSize; - } - -} diff --git a/third_party/zstd/lib/dictBuilder/zdict.c b/third_party/zstd/lib/dictBuilder/zdict.c deleted file mode 100644 index d5e60a4..0000000 --- a/third_party/zstd/lib/dictBuilder/zdict.c +++ /dev/null @@ -1,1133 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/*-************************************** -* Tuning parameters -****************************************/ -#define MINRATIO 4 /* minimum nb of apparition to be selected in dictionary */ -#define ZDICT_MAX_SAMPLES_SIZE (2000U << 20) -#define ZDICT_MIN_SAMPLES_SIZE (ZDICT_CONTENTSIZE_MIN * MINRATIO) - - -/*-************************************** -* Compiler Options -****************************************/ -/* Unix Large Files support (>4GB) */ -#define _FILE_OFFSET_BITS 64 -#if (defined(__sun__) && (!defined(__LP64__))) /* Sun Solaris 32-bits requires specific definitions */ -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE -# endif -#elif ! defined(__LP64__) /* No point defining Large file for 64 bit */ -# ifndef _LARGEFILE64_SOURCE -# define _LARGEFILE64_SOURCE -# endif -#endif - - -/*-************************************* -* Dependencies -***************************************/ -#include /* malloc, free */ -#include /* memset */ -#include /* fprintf, fopen, ftello64 */ -#include /* clock */ - -#ifndef ZDICT_STATIC_LINKING_ONLY -# define ZDICT_STATIC_LINKING_ONLY -#endif - -#include "../common/mem.h" /* read */ -#include "../common/fse.h" /* FSE_normalizeCount, FSE_writeNCount */ -#include "../common/huf.h" /* HUF_buildCTable, HUF_writeCTable */ -#include "../common/zstd_internal.h" /* includes zstd.h */ -#include "../common/xxhash.h" /* XXH64 */ -#include "../compress/zstd_compress_internal.h" /* ZSTD_loadCEntropy() */ -#include "../zdict.h" -#include "divsufsort.h" -#include "../common/bits.h" /* ZSTD_NbCommonBytes */ - - -/*-************************************* -* Constants -***************************************/ -#define KB *(1 <<10) -#define MB *(1 <<20) -#define GB *(1U<<30) - -#define DICTLISTSIZE_DEFAULT 10000 - -#define NOISELENGTH 32 - -static const U32 g_selectivity_default = 9; - - -/*-************************************* -* Console display -***************************************/ -#undef DISPLAY -#define DISPLAY(...) do { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } while (0) -#undef DISPLAYLEVEL -#define DISPLAYLEVEL(l, ...) do { if (notificationLevel>=l) { DISPLAY(__VA_ARGS__); } } while (0) /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ - -static clock_t ZDICT_clockSpan(clock_t nPrevious) { return clock() - nPrevious; } - -static void ZDICT_printHex(const void* ptr, size_t length) -{ - const BYTE* const b = (const BYTE*)ptr; - size_t u; - for (u=0; u126) c = '.'; /* non-printable char */ - DISPLAY("%c", c); - } -} - - -/*-******************************************************** -* Helper functions -**********************************************************/ -unsigned ZDICT_isError(size_t errorCode) { return ERR_isError(errorCode); } - -const char* ZDICT_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } - -unsigned ZDICT_getDictID(const void* dictBuffer, size_t dictSize) -{ - if (dictSize < 8) return 0; - if (MEM_readLE32(dictBuffer) != ZSTD_MAGIC_DICTIONARY) return 0; - return MEM_readLE32((const char*)dictBuffer + 4); -} - -size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize) -{ - size_t headerSize; - if (dictSize <= 8 || MEM_readLE32(dictBuffer) != ZSTD_MAGIC_DICTIONARY) return ERROR(dictionary_corrupted); - - { ZSTD_compressedBlockState_t* bs = (ZSTD_compressedBlockState_t*)malloc(sizeof(ZSTD_compressedBlockState_t)); - U32* wksp = (U32*)malloc(HUF_WORKSPACE_SIZE); - if (!bs || !wksp) { - headerSize = ERROR(memory_allocation); - } else { - ZSTD_reset_compressedBlockState(bs); - headerSize = ZSTD_loadCEntropy(bs, wksp, dictBuffer, dictSize); - } - - free(bs); - free(wksp); - } - - return headerSize; -} - -/*-******************************************************** -* Dictionary training functions -**********************************************************/ -/*! ZDICT_count() : - Count the nb of common bytes between 2 pointers. - Note : this function presumes end of buffer followed by noisy guard band. -*/ -static size_t ZDICT_count(const void* pIn, const void* pMatch) -{ - const char* const pStart = (const char*)pIn; - for (;;) { - size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); - if (!diff) { - pIn = (const char*)pIn+sizeof(size_t); - pMatch = (const char*)pMatch+sizeof(size_t); - continue; - } - pIn = (const char*)pIn+ZSTD_NbCommonBytes(diff); - return (size_t)((const char*)pIn - pStart); - } -} - - -typedef struct { - U32 pos; - U32 length; - U32 savings; -} dictItem; - -static void ZDICT_initDictItem(dictItem* d) -{ - d->pos = 1; - d->length = 0; - d->savings = (U32)(-1); -} - - -#define LLIMIT 64 /* heuristic determined experimentally */ -#define MINMATCHLENGTH 7 /* heuristic determined experimentally */ -static dictItem ZDICT_analyzePos( - BYTE* doneMarks, - const int* suffix, U32 start, - const void* buffer, U32 minRatio, U32 notificationLevel) -{ - U32 lengthList[LLIMIT] = {0}; - U32 cumulLength[LLIMIT] = {0}; - U32 savings[LLIMIT] = {0}; - const BYTE* b = (const BYTE*)buffer; - size_t maxLength = LLIMIT; - size_t pos = (size_t)suffix[start]; - U32 end = start; - dictItem solution; - - /* init */ - memset(&solution, 0, sizeof(solution)); - doneMarks[pos] = 1; - - /* trivial repetition cases */ - if ( (MEM_read16(b+pos+0) == MEM_read16(b+pos+2)) - ||(MEM_read16(b+pos+1) == MEM_read16(b+pos+3)) - ||(MEM_read16(b+pos+2) == MEM_read16(b+pos+4)) ) { - /* skip and mark segment */ - U16 const pattern16 = MEM_read16(b+pos+4); - U32 u, patternEnd = 6; - while (MEM_read16(b+pos+patternEnd) == pattern16) patternEnd+=2 ; - if (b[pos+patternEnd] == b[pos+patternEnd-1]) patternEnd++; - for (u=1; u= MINMATCHLENGTH); - } - - /* look backward */ - { size_t length; - do { - length = ZDICT_count(b + pos, b + *(suffix+start-1)); - if (length >=MINMATCHLENGTH) start--; - } while(length >= MINMATCHLENGTH); - } - - /* exit if not found a minimum nb of repetitions */ - if (end-start < minRatio) { - U32 idx; - for(idx=start; idx= %i at pos %7u ", (unsigned)(end-start), MINMATCHLENGTH, (unsigned)pos); - DISPLAYLEVEL(4, "\n"); - - for (mml = MINMATCHLENGTH ; ; mml++) { - BYTE currentChar = 0; - U32 currentCount = 0; - U32 currentID = refinedStart; - U32 id; - U32 selectedCount = 0; - U32 selectedID = currentID; - for (id =refinedStart; id < refinedEnd; id++) { - if (b[suffix[id] + mml] != currentChar) { - if (currentCount > selectedCount) { - selectedCount = currentCount; - selectedID = currentID; - } - currentID = id; - currentChar = b[ suffix[id] + mml]; - currentCount = 0; - } - currentCount ++; - } - if (currentCount > selectedCount) { /* for last */ - selectedCount = currentCount; - selectedID = currentID; - } - - if (selectedCount < minRatio) - break; - refinedStart = selectedID; - refinedEnd = refinedStart + selectedCount; - } - - /* evaluate gain based on new dict */ - start = refinedStart; - pos = suffix[refinedStart]; - end = start; - memset(lengthList, 0, sizeof(lengthList)); - - /* look forward */ - { size_t length; - do { - end++; - length = ZDICT_count(b + pos, b + suffix[end]); - if (length >= LLIMIT) length = LLIMIT-1; - lengthList[length]++; - } while (length >=MINMATCHLENGTH); - } - - /* look backward */ - { size_t length = MINMATCHLENGTH; - while ((length >= MINMATCHLENGTH) & (start > 0)) { - length = ZDICT_count(b + pos, b + suffix[start - 1]); - if (length >= LLIMIT) length = LLIMIT - 1; - lengthList[length]++; - if (length >= MINMATCHLENGTH) start--; - } - } - - /* largest useful length */ - memset(cumulLength, 0, sizeof(cumulLength)); - cumulLength[maxLength-1] = lengthList[maxLength-1]; - for (i=(int)(maxLength-2); i>=0; i--) - cumulLength[i] = cumulLength[i+1] + lengthList[i]; - - for (i=LLIMIT-1; i>=MINMATCHLENGTH; i--) if (cumulLength[i]>=minRatio) break; - maxLength = i; - - /* reduce maxLength in case of final into repetitive data */ - { U32 l = (U32)maxLength; - BYTE const c = b[pos + maxLength-1]; - while (b[pos+l-2]==c) l--; - maxLength = l; - } - if (maxLength < MINMATCHLENGTH) return solution; /* skip : no long-enough solution */ - - /* calculate savings */ - savings[5] = 0; - for (i=MINMATCHLENGTH; i<=(int)maxLength; i++) - savings[i] = savings[i-1] + (lengthList[i] * (i-3)); - - DISPLAYLEVEL(4, "Selected dict at position %u, of length %u : saves %u (ratio: %.2f) \n", - (unsigned)pos, (unsigned)maxLength, (unsigned)savings[maxLength], (double)savings[maxLength] / (double)maxLength); - - solution.pos = (U32)pos; - solution.length = (U32)maxLength; - solution.savings = savings[maxLength]; - - /* mark positions done */ - { U32 id; - for (id=start; id solution.length) length = solution.length; - } - pEnd = (U32)(testedPos + length); - for (p=testedPos; ppos; - const U32 eltEnd = elt.pos + elt.length; - const char* const buf = (const char*) buffer; - - /* tail overlap */ - U32 u; for (u=1; u elt.pos) && (table[u].pos <= eltEnd)) { /* overlap, existing > new */ - /* append */ - U32 const addedLength = table[u].pos - elt.pos; - table[u].length += addedLength; - table[u].pos = elt.pos; - table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */ - table[u].savings += elt.length / 8; /* rough approx bonus */ - elt = table[u]; - /* sort : improve rank */ - while ((u>1) && (table[u-1].savings < elt.savings)) - table[u] = table[u-1], u--; - table[u] = elt; - return u; - } } - - /* front overlap */ - for (u=1; u= elt.pos) && (table[u].pos < elt.pos)) { /* overlap, existing < new */ - /* append */ - int const addedLength = (int)eltEnd - (int)(table[u].pos + table[u].length); - table[u].savings += elt.length / 8; /* rough approx bonus */ - if (addedLength > 0) { /* otherwise, elt fully included into existing */ - table[u].length += addedLength; - table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */ - } - /* sort : improve rank */ - elt = table[u]; - while ((u>1) && (table[u-1].savings < elt.savings)) - table[u] = table[u-1], u--; - table[u] = elt; - return u; - } - - if (MEM_read64(buf + table[u].pos) == MEM_read64(buf + elt.pos + 1)) { - if (isIncluded(buf + table[u].pos, buf + elt.pos + 1, table[u].length)) { - size_t const addedLength = MAX( (int)elt.length - (int)table[u].length , 1 ); - table[u].pos = elt.pos; - table[u].savings += (U32)(elt.savings * addedLength / elt.length); - table[u].length = MIN(elt.length, table[u].length + 1); - return u; - } - } - } - - return 0; -} - - -static void ZDICT_removeDictItem(dictItem* table, U32 id) -{ - /* convention : table[0].pos stores nb of elts */ - U32 const max = table[0].pos; - U32 u; - if (!id) return; /* protection, should never happen */ - for (u=id; upos--; -} - - -static void ZDICT_insertDictItem(dictItem* table, U32 maxSize, dictItem elt, const void* buffer) -{ - /* merge if possible */ - U32 mergeId = ZDICT_tryMerge(table, elt, 0, buffer); - if (mergeId) { - U32 newMerge = 1; - while (newMerge) { - newMerge = ZDICT_tryMerge(table, table[mergeId], mergeId, buffer); - if (newMerge) ZDICT_removeDictItem(table, mergeId); - mergeId = newMerge; - } - return; - } - - /* insert */ - { U32 current; - U32 nextElt = table->pos; - if (nextElt >= maxSize) nextElt = maxSize-1; - current = nextElt-1; - while (table[current].savings < elt.savings) { - table[current+1] = table[current]; - current--; - } - table[current+1] = elt; - table->pos = nextElt+1; - } -} - - -static U32 ZDICT_dictSize(const dictItem* dictList) -{ - U32 u, dictSize = 0; - for (u=1; u=l) { \ - if (ZDICT_clockSpan(displayClock) > refreshRate) { \ - displayClock = clock(); \ - DISPLAY(__VA_ARGS__); \ - } \ - if (notificationLevel>=4) fflush(stderr); \ - } \ - } while (0) - - /* init */ - DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */ - if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) { - result = ERROR(memory_allocation); - goto _cleanup; - } - if (minRatio < MINRATIO) minRatio = MINRATIO; - memset(doneMarks, 0, bufferSize+16); - - /* limit sample set size (divsufsort limitation)*/ - if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20)); - while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles]; - - /* sort */ - DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20)); - { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0); - if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; } - } - suffix[bufferSize] = (int)bufferSize; /* leads into noise */ - suffix0[0] = (int)bufferSize; /* leads into noise */ - /* build reverse suffix sort */ - { size_t pos; - for (pos=0; pos < bufferSize; pos++) - reverseSuffix[suffix[pos]] = (U32)pos; - /* note filePos tracks borders between samples. - It's not used at this stage, but planned to become useful in a later update */ - filePos[0] = 0; - for (pos=1; pos> 21); - } -} - - -typedef struct -{ - ZSTD_CDict* dict; /* dictionary */ - ZSTD_CCtx* zc; /* working context */ - void* workPlace; /* must be ZSTD_BLOCKSIZE_MAX allocated */ -} EStats_ress_t; - -#define MAXREPOFFSET 1024 - -static void ZDICT_countEStats(EStats_ress_t esr, const ZSTD_parameters* params, - unsigned* countLit, unsigned* offsetcodeCount, unsigned* matchlengthCount, unsigned* litlengthCount, U32* repOffsets, - const void* src, size_t srcSize, - U32 notificationLevel) -{ - size_t const blockSizeMax = MIN (ZSTD_BLOCKSIZE_MAX, 1 << params->cParams.windowLog); - size_t cSize; - - if (srcSize > blockSizeMax) srcSize = blockSizeMax; /* protection vs large samples */ - { size_t const errorCode = ZSTD_compressBegin_usingCDict_deprecated(esr.zc, esr.dict); - if (ZSTD_isError(errorCode)) { DISPLAYLEVEL(1, "warning : ZSTD_compressBegin_usingCDict failed \n"); return; } - - } - cSize = ZSTD_compressBlock_deprecated(esr.zc, esr.workPlace, ZSTD_BLOCKSIZE_MAX, src, srcSize); - if (ZSTD_isError(cSize)) { DISPLAYLEVEL(3, "warning : could not compress sample size %u \n", (unsigned)srcSize); return; } - - if (cSize) { /* if == 0; block is not compressible */ - const SeqStore_t* const seqStorePtr = ZSTD_getSeqStore(esr.zc); - - /* literals stats */ - { const BYTE* bytePtr; - for(bytePtr = seqStorePtr->litStart; bytePtr < seqStorePtr->lit; bytePtr++) - countLit[*bytePtr]++; - } - - /* seqStats */ - { U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); - ZSTD_seqToCodes(seqStorePtr); - - { const BYTE* codePtr = seqStorePtr->ofCode; - U32 u; - for (u=0; umlCode; - U32 u; - for (u=0; ullCode; - U32 u; - for (u=0; u= 2) { /* rep offsets */ - const SeqDef* const seq = seqStorePtr->sequencesStart; - U32 offset1 = seq[0].offBase - ZSTD_REP_NUM; - U32 offset2 = seq[1].offBase - ZSTD_REP_NUM; - if (offset1 >= MAXREPOFFSET) offset1 = 0; - if (offset2 >= MAXREPOFFSET) offset2 = 0; - repOffsets[offset1] += 3; - repOffsets[offset2] += 1; - } } } -} - -static size_t ZDICT_totalSampleSize(const size_t* fileSizes, unsigned nbFiles) -{ - size_t total=0; - unsigned u; - for (u=0; u0; u--) { - offsetCount_t tmp; - if (table[u-1].count >= table[u].count) break; - tmp = table[u-1]; - table[u-1] = table[u]; - table[u] = tmp; - } -} - -/* ZDICT_flatLit() : - * rewrite `countLit` to contain a mostly flat but still compressible distribution of literals. - * necessary to avoid generating a non-compressible distribution that HUF_writeCTable() cannot encode. - */ -static void ZDICT_flatLit(unsigned* countLit) -{ - int u; - for (u=1; u<256; u++) countLit[u] = 2; - countLit[0] = 4; - countLit[253] = 1; - countLit[254] = 1; -} - -#define OFFCODE_MAX 30 /* only applicable to first block */ -static size_t ZDICT_analyzeEntropy(void* dstBuffer, size_t maxDstSize, - int compressionLevel, - const void* srcBuffer, const size_t* fileSizes, unsigned nbFiles, - const void* dictBuffer, size_t dictBufferSize, - unsigned notificationLevel) -{ - unsigned countLit[256]; - HUF_CREATE_STATIC_CTABLE(hufTable, 255); - unsigned offcodeCount[OFFCODE_MAX+1]; - short offcodeNCount[OFFCODE_MAX+1]; - U32 offcodeMax = ZSTD_highbit32((U32)(dictBufferSize + 128 KB)); - unsigned matchLengthCount[MaxML+1]; - short matchLengthNCount[MaxML+1]; - unsigned litLengthCount[MaxLL+1]; - short litLengthNCount[MaxLL+1]; - U32 repOffset[MAXREPOFFSET]; - offsetCount_t bestRepOffset[ZSTD_REP_NUM+1]; - EStats_ress_t esr = { NULL, NULL, NULL }; - ZSTD_parameters params; - U32 u, huffLog = 11, Offlog = OffFSELog, mlLog = MLFSELog, llLog = LLFSELog, total; - size_t pos = 0, errorCode; - size_t eSize = 0; - size_t const totalSrcSize = ZDICT_totalSampleSize(fileSizes, nbFiles); - size_t const averageSampleSize = totalSrcSize / (nbFiles + !nbFiles); - BYTE* dstPtr = (BYTE*)dstBuffer; - U32 wksp[HUF_CTABLE_WORKSPACE_SIZE_U32]; - - /* init */ - DEBUGLOG(4, "ZDICT_analyzeEntropy"); - if (offcodeMax>OFFCODE_MAX) { eSize = ERROR(dictionaryCreation_failed); goto _cleanup; } /* too large dictionary */ - for (u=0; u<256; u++) countLit[u] = 1; /* any character must be described */ - for (u=0; u<=offcodeMax; u++) offcodeCount[u] = 1; - for (u=0; u<=MaxML; u++) matchLengthCount[u] = 1; - for (u=0; u<=MaxLL; u++) litLengthCount[u] = 1; - memset(repOffset, 0, sizeof(repOffset)); - repOffset[1] = repOffset[4] = repOffset[8] = 1; - memset(bestRepOffset, 0, sizeof(bestRepOffset)); - if (compressionLevel==0) compressionLevel = ZSTD_CLEVEL_DEFAULT; - params = ZSTD_getParams(compressionLevel, averageSampleSize, dictBufferSize); - - esr.dict = ZSTD_createCDict_advanced(dictBuffer, dictBufferSize, ZSTD_dlm_byRef, ZSTD_dct_rawContent, params.cParams, ZSTD_defaultCMem); - esr.zc = ZSTD_createCCtx(); - esr.workPlace = malloc(ZSTD_BLOCKSIZE_MAX); - if (!esr.dict || !esr.zc || !esr.workPlace) { - eSize = ERROR(memory_allocation); - DISPLAYLEVEL(1, "Not enough memory \n"); - goto _cleanup; - } - - /* collect stats on all samples */ - for (u=0; u= 4) { - /* writeStats */ - DISPLAYLEVEL(4, "Offset Code Frequencies : \n"); - for (u=0; u<=offcodeMax; u++) { - DISPLAYLEVEL(4, "%2u :%7u \n", u, offcodeCount[u]); - } } - - /* analyze, build stats, starting with literals */ - { size_t maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp)); - if (HUF_isError(maxNbBits)) { - eSize = maxNbBits; - DISPLAYLEVEL(1, " HUF_buildCTable error \n"); - goto _cleanup; - } - if (maxNbBits==8) { /* not compressible : will fail on HUF_writeCTable() */ - DISPLAYLEVEL(2, "warning : pathological dataset : literals are not compressible : samples are noisy or too regular \n"); - ZDICT_flatLit(countLit); /* replace distribution by a fake "mostly flat but still compressible" distribution, that HUF_writeCTable() can encode */ - maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp)); - assert(maxNbBits==9); - } - huffLog = (U32)maxNbBits; - } - - /* looking for most common first offsets */ - { U32 offset; - for (offset=1; offset dictBufferCapacity) { - dictContentSize = dictBufferCapacity - hSize; - } - - /* Pad the dictionary content with zeros if it is too small */ - if (dictContentSize < minContentSize) { - RETURN_ERROR_IF(hSize + minContentSize > dictBufferCapacity, dstSize_tooSmall, - "dictBufferCapacity too small to fit max repcode"); - paddingSize = minContentSize - dictContentSize; - } else { - paddingSize = 0; - } - - { - size_t const dictSize = hSize + paddingSize + dictContentSize; - - /* The dictionary consists of the header, optional padding, and the content. - * The padding comes before the content because the "best" position in the - * dictionary is the last byte. - */ - BYTE* const outDictHeader = (BYTE*)dictBuffer; - BYTE* const outDictPadding = outDictHeader + hSize; - BYTE* const outDictContent = outDictPadding + paddingSize; - - assert(dictSize <= dictBufferCapacity); - assert(outDictContent + dictContentSize == (BYTE*)dictBuffer + dictSize); - - /* First copy the customDictContent into its final location. - * `customDictContent` and `dictBuffer` may overlap, so we must - * do this before any other writes into the output buffer. - * Then copy the header & padding into the output buffer. - */ - memmove(outDictContent, customDictContent, dictContentSize); - memcpy(outDictHeader, header, hSize); - memset(outDictPadding, 0, paddingSize); - - return dictSize; - } -} - - -static size_t ZDICT_addEntropyTablesFromBuffer_advanced( - void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity, - const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, - ZDICT_params_t params) -{ - int const compressionLevel = (params.compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : params.compressionLevel; - U32 const notificationLevel = params.notificationLevel; - size_t hSize = 8; - - /* calculate entropy tables */ - DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */ - DISPLAYLEVEL(2, "statistics ... \n"); - { size_t const eSize = ZDICT_analyzeEntropy((char*)dictBuffer+hSize, dictBufferCapacity-hSize, - compressionLevel, - samplesBuffer, samplesSizes, nbSamples, - (char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize, - notificationLevel); - if (ZDICT_isError(eSize)) return eSize; - hSize += eSize; - } - - /* add dictionary header (after entropy tables) */ - MEM_writeLE32(dictBuffer, ZSTD_MAGIC_DICTIONARY); - { U64 const randomID = XXH64((char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize, 0); - U32 const compliantID = (randomID % ((1U<<31)-32768)) + 32768; - U32 const dictID = params.dictID ? params.dictID : compliantID; - MEM_writeLE32((char*)dictBuffer+4, dictID); - } - - if (hSize + dictContentSize < dictBufferCapacity) - memmove((char*)dictBuffer + hSize, (char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize); - return MIN(dictBufferCapacity, hSize+dictContentSize); -} - -/*! ZDICT_trainFromBuffer_unsafe_legacy() : -* Warning : `samplesBuffer` must be followed by noisy guard band !!! -* @return : size of dictionary, or an error code which can be tested with ZDICT_isError() -*/ -static size_t ZDICT_trainFromBuffer_unsafe_legacy( - void* dictBuffer, size_t maxDictSize, - const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, - ZDICT_legacy_params_t params) -{ - U32 const dictListSize = MAX(MAX(DICTLISTSIZE_DEFAULT, nbSamples), (U32)(maxDictSize/16)); - dictItem* const dictList = (dictItem*)malloc(dictListSize * sizeof(*dictList)); - unsigned const selectivity = params.selectivityLevel == 0 ? g_selectivity_default : params.selectivityLevel; - unsigned const minRep = (selectivity > 30) ? MINRATIO : nbSamples >> selectivity; - size_t const targetDictSize = maxDictSize; - size_t const samplesBuffSize = ZDICT_totalSampleSize(samplesSizes, nbSamples); - size_t dictSize = 0; - U32 const notificationLevel = params.zParams.notificationLevel; - - /* checks */ - if (!dictList) return ERROR(memory_allocation); - if (maxDictSize < ZDICT_DICTSIZE_MIN) { free(dictList); return ERROR(dstSize_tooSmall); } /* requested dictionary size is too small */ - if (samplesBuffSize < ZDICT_MIN_SAMPLES_SIZE) { free(dictList); return ERROR(dictionaryCreation_failed); } /* not enough source to create dictionary */ - - /* init */ - ZDICT_initDictItem(dictList); - - /* build dictionary */ - ZDICT_trainBuffer_legacy(dictList, dictListSize, - samplesBuffer, samplesBuffSize, - samplesSizes, nbSamples, - minRep, notificationLevel); - - /* display best matches */ - if (params.zParams.notificationLevel>= 3) { - unsigned const nb = MIN(25, dictList[0].pos); - unsigned const dictContentSize = ZDICT_dictSize(dictList); - unsigned u; - DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", (unsigned)dictList[0].pos-1, dictContentSize); - DISPLAYLEVEL(3, "list %u best segments \n", nb-1); - for (u=1; u samplesBuffSize) || ((pos + length) > samplesBuffSize)) { - free(dictList); - return ERROR(GENERIC); /* should never happen */ - } - DISPLAYLEVEL(3, "%3u:%3u bytes at pos %8u, savings %7u bytes |", - u, length, pos, (unsigned)dictList[u].savings); - ZDICT_printHex((const char*)samplesBuffer+pos, printedLength); - DISPLAYLEVEL(3, "| \n"); - } } - - - /* create dictionary */ - { unsigned dictContentSize = ZDICT_dictSize(dictList); - if (dictContentSize < ZDICT_CONTENTSIZE_MIN) { free(dictList); return ERROR(dictionaryCreation_failed); } /* dictionary content too small */ - if (dictContentSize < targetDictSize/4) { - DISPLAYLEVEL(2, "! warning : selected content significantly smaller than requested (%u < %u) \n", dictContentSize, (unsigned)maxDictSize); - if (samplesBuffSize < 10 * targetDictSize) - DISPLAYLEVEL(2, "! consider increasing the number of samples (total size : %u MB)\n", (unsigned)(samplesBuffSize>>20)); - if (minRep > MINRATIO) { - DISPLAYLEVEL(2, "! consider increasing selectivity to produce larger dictionary (-s%u) \n", selectivity+1); - DISPLAYLEVEL(2, "! note : larger dictionaries are not necessarily better, test its efficiency on samples \n"); - } - } - - if ((dictContentSize > targetDictSize*3) && (nbSamples > 2*MINRATIO) && (selectivity>1)) { - unsigned proposedSelectivity = selectivity-1; - while ((nbSamples >> proposedSelectivity) <= MINRATIO) { proposedSelectivity--; } - DISPLAYLEVEL(2, "! note : calculated dictionary significantly larger than requested (%u > %u) \n", dictContentSize, (unsigned)maxDictSize); - DISPLAYLEVEL(2, "! consider increasing dictionary size, or produce denser dictionary (-s%u) \n", proposedSelectivity); - DISPLAYLEVEL(2, "! always test dictionary efficiency on real samples \n"); - } - - /* limit dictionary size */ - { U32 const max = dictList->pos; /* convention : nb of useful elts within dictList */ - U32 currentSize = 0; - U32 n; for (n=1; n targetDictSize) { currentSize -= dictList[n].length; break; } - } - dictList->pos = n; - dictContentSize = currentSize; - } - - /* build dict content */ - { U32 u; - BYTE* ptr = (BYTE*)dictBuffer + maxDictSize; - for (u=1; upos; u++) { - U32 l = dictList[u].length; - ptr -= l; - if (ptr<(BYTE*)dictBuffer) { free(dictList); return ERROR(GENERIC); } /* should not happen */ - memcpy(ptr, (const char*)samplesBuffer+dictList[u].pos, l); - } } - - dictSize = ZDICT_addEntropyTablesFromBuffer_advanced(dictBuffer, dictContentSize, maxDictSize, - samplesBuffer, samplesSizes, nbSamples, - params.zParams); - } - - /* clean up */ - free(dictList); - return dictSize; -} - - -/* ZDICT_trainFromBuffer_legacy() : - * issue : samplesBuffer need to be followed by a noisy guard band. - * work around : duplicate the buffer, and add the noise */ -size_t ZDICT_trainFromBuffer_legacy(void* dictBuffer, size_t dictBufferCapacity, - const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, - ZDICT_legacy_params_t params) -{ - size_t result; - void* newBuff; - size_t const sBuffSize = ZDICT_totalSampleSize(samplesSizes, nbSamples); - if (sBuffSize < ZDICT_MIN_SAMPLES_SIZE) return 0; /* not enough content => no dictionary */ - - newBuff = malloc(sBuffSize + NOISELENGTH); - if (!newBuff) return ERROR(memory_allocation); - - memcpy(newBuff, samplesBuffer, sBuffSize); - ZDICT_fillNoise((char*)newBuff + sBuffSize, NOISELENGTH); /* guard band, for end of buffer condition */ - - result = - ZDICT_trainFromBuffer_unsafe_legacy(dictBuffer, dictBufferCapacity, newBuff, - samplesSizes, nbSamples, params); - free(newBuff); - return result; -} - - -size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity, - const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples) -{ - ZDICT_fastCover_params_t params; - DEBUGLOG(3, "ZDICT_trainFromBuffer"); - memset(¶ms, 0, sizeof(params)); - params.d = 8; - params.steps = 4; - /* Use default level since no compression level information is available */ - params.zParams.compressionLevel = ZSTD_CLEVEL_DEFAULT; -#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=1) - params.zParams.notificationLevel = DEBUGLEVEL; -#endif - return ZDICT_optimizeTrainFromBuffer_fastCover(dictBuffer, dictBufferCapacity, - samplesBuffer, samplesSizes, nbSamples, - ¶ms); -} - -size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity, - const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples) -{ - ZDICT_params_t params; - memset(¶ms, 0, sizeof(params)); - return ZDICT_addEntropyTablesFromBuffer_advanced(dictBuffer, dictContentSize, dictBufferCapacity, - samplesBuffer, samplesSizes, nbSamples, - params); -} diff --git a/third_party/zstd/lib/dll/example/Makefile b/third_party/zstd/lib/dll/example/Makefile deleted file mode 100644 index 86cf690..0000000 --- a/third_party/zstd/lib/dll/example/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# ################################################################ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. -# ################################################################ - -VOID := /dev/null -ZSTDDIR := ../include -LIBDIR := ../static -DLLDIR := ../dll - -CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make -CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \ - -Wdeclaration-after-statement -Wstrict-prototypes \ - -Wpointer-arith -Wstrict-aliasing=1 -CFLAGS += $(MOREFLAGS) -CPPFLAGS:= -I$(ZSTDDIR) -DXXH_NAMESPACE=ZSTD_ -FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) - - -# Define *.exe as extension for Windows systems -ifneq (,$(filter Windows%,$(OS))) -EXT =.exe -else -EXT = -endif - -.PHONY: default fullbench-dll fullbench-lib - - -default: all - -all: fullbench-dll fullbench-lib - - -fullbench-lib: fullbench.c datagen.c - $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/libzstd_static.lib - -fullbench-dll: fullbench.c datagen.c - $(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(DLLDIR)/libzstd.dll - -clean: - @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \ - @echo Cleaning completed diff --git a/third_party/zstd/lib/dll/example/README.md b/third_party/zstd/lib/dll/example/README.md deleted file mode 100644 index 46aec79..0000000 --- a/third_party/zstd/lib/dll/example/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# ZSTD Windows binary package - -## The package contents - -- `zstd.exe` : Command Line Utility, supporting gzip-like arguments -- `dll\libzstd.dll` : The ZSTD dynamic library (DLL) -- `dll\libzstd.lib` : The import library of the ZSTD dynamic library (DLL) for Visual C++ -- `example\` : The example of usage of the ZSTD library -- `include\` : Header files required by the ZSTD library -- `static\libzstd_static.lib` : The static ZSTD library (LIB) - -## Usage of Command Line Interface - -Command Line Interface (CLI) supports gzip-like arguments. -By default CLI takes an input file and compresses it to an output file: - - Usage: zstd [arg] [input] [output] - -The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can -be improved with commands from `-3` to `-16` but higher levels also have slower -compression. CLI includes in-memory compression benchmark module with compression -levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds. -CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined -into `-b1e18i1`. - -## The example of usage of static and dynamic ZSTD libraries with gcc/MinGW - -Use `cd example` and `make` to build `fullbench-dll` and `fullbench-lib`. -`fullbench-dll` uses a dynamic ZSTD library from the `dll` directory. -`fullbench-lib` uses a static ZSTD library from the `lib` directory. - -## Using ZSTD DLL with gcc/MinGW - -The header files from `include\` and the dynamic library `dll\libzstd.dll` -are required to compile a project using gcc/MinGW. -The dynamic library has to be added to linking options. -It means that if a project that uses ZSTD consists of a single `test-dll.c` -file it should be linked with `dll\libzstd.dll`. For example: - - gcc $(CFLAGS) -Iinclude\ test-dll.c -o test-dll dll\libzstd.dll - -The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. - -## The example of usage of static and dynamic ZSTD libraries with Visual C++ - -Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a -dynamic ZSTD library from the `dll` directory. The solution works with Visual C++ -2010 or newer. When one will open the solution with Visual C++ newer than 2010 -then the solution will be upgraded to the current version. - -## Using ZSTD DLL with Visual C++ - -The header files from `include\` and the import library `dll\libzstd.lib` -are required to compile a project using Visual C++. - -1. The path to header files should be added to `Additional Include Directories` that can - be found in project properties `C/C++` then `General`. -2. The import library has to be added to `Additional Dependencies` that can - be found in project properties `Linker` then `Input`. - If one will provide only the name `libzstd.lib` without a full path to the library - the directory has to be added to `Linker\General\Additional Library Directories`. - -The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. diff --git a/third_party/zstd/lib/dll/example/build_package.bat b/third_party/zstd/lib/dll/example/build_package.bat deleted file mode 100644 index 8baabc7..0000000 --- a/third_party/zstd/lib/dll/example/build_package.bat +++ /dev/null @@ -1,20 +0,0 @@ -@ECHO OFF -MKDIR bin\dll bin\static bin\example bin\include -COPY tests\fullbench.c bin\example\ -COPY programs\datagen.c bin\example\ -COPY programs\datagen.h bin\example\ -COPY programs\util.h bin\example\ -COPY programs\platform.h bin\example\ -COPY lib\common\mem.h bin\example\ -COPY lib\common\zstd_internal.h bin\example\ -COPY lib\common\error_private.h bin\example\ -COPY lib\common\xxhash.h bin\example\ -COPY lib\libzstd.a bin\static\libzstd_static.lib -COPY lib\dll\libzstd.* bin\dll\ -COPY lib\dll\example\Makefile bin\example\ -COPY lib\dll\example\fullbench-dll.* bin\example\ -COPY lib\dll\example\README.md bin\ -COPY lib\zstd.h bin\include\ -COPY lib\common\zstd_errors.h bin\include\ -COPY lib\dictBuilder\zdict.h bin\include\ -COPY programs\zstd.exe bin\zstd.exe diff --git a/third_party/zstd/lib/dll/example/fullbench-dll.sln b/third_party/zstd/lib/dll/example/fullbench-dll.sln deleted file mode 100644 index 72e302e..0000000 --- a/third_party/zstd/lib/dll/example/fullbench-dll.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32 - {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64 - {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64 - {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32 - {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32 - {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64 - {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/third_party/zstd/lib/dll/example/fullbench-dll.vcxproj b/third_party/zstd/lib/dll/example/fullbench-dll.vcxproj deleted file mode 100644 index 44bbaf7..0000000 --- a/third_party/zstd/lib/dll/example/fullbench-dll.vcxproj +++ /dev/null @@ -1,181 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8} - Win32Proj - fullbench-dll - $(SolutionDir)bin\$(Platform)_$(Configuration)\ - $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - true - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - false - $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); - false - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) - true - false - ..\include - - - Console - true - $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) - libzstd.lib;%(AdditionalDependencies) - false - - - - - - - Level4 - Disabled - WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) - true - false - ..\include - - - Console - true - $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) - libzstd.lib;%(AdditionalDependencies) - - - - - Level4 - - - MaxSpeed - true - true - WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) - false - ..\include - false - MultiThreaded - - - Console - true - true - true - $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) - libzstd.lib;%(AdditionalDependencies) - false - - - - - Level4 - - - MaxSpeed - true - true - WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) - false - false - ..\include - MultiThreaded - - - Console - true - true - true - $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) - libzstd.lib;%(AdditionalDependencies) - - - - - - - - - - - - - \ No newline at end of file diff --git a/third_party/zstd/lib/legacy/zstd_legacy.h b/third_party/zstd/lib/legacy/zstd_legacy.h deleted file mode 100644 index 7a8a04e..0000000 --- a/third_party/zstd/lib/legacy/zstd_legacy.h +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_LEGACY_H -#define ZSTD_LEGACY_H - -#if defined (__cplusplus) -extern "C" { -#endif - -/* ************************************* -* Includes -***************************************/ -#include "../common/mem.h" /* MEM_STATIC */ -#include "../common/error_private.h" /* ERROR */ -#include "../common/zstd_internal.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTD_frameSizeInfo */ - -#if !defined (ZSTD_LEGACY_SUPPORT) || (ZSTD_LEGACY_SUPPORT == 0) -# undef ZSTD_LEGACY_SUPPORT -# define ZSTD_LEGACY_SUPPORT 8 -#endif - -#if (ZSTD_LEGACY_SUPPORT <= 1) -# include "zstd_v01.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 2) -# include "zstd_v02.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 3) -# include "zstd_v03.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 4) -# include "zstd_v04.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) -# include "zstd_v05.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) -# include "zstd_v06.h" -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) -# include "zstd_v07.h" -#endif - -/** ZSTD_isLegacy() : - @return : > 0 if supported by legacy decoder. 0 otherwise. - return value is the version. -*/ -MEM_STATIC unsigned ZSTD_isLegacy(const void* src, size_t srcSize) -{ - U32 magicNumberLE; - if (srcSize<4) return 0; - magicNumberLE = MEM_readLE32(src); - switch(magicNumberLE) - { -#if (ZSTD_LEGACY_SUPPORT <= 1) - case ZSTDv01_magicNumberLE:return 1; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 2) - case ZSTDv02_magicNumber : return 2; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 3) - case ZSTDv03_magicNumber : return 3; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 4) - case ZSTDv04_magicNumber : return 4; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case ZSTDv05_MAGICNUMBER : return 5; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case ZSTDv06_MAGICNUMBER : return 6; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case ZSTDv07_MAGICNUMBER : return 7; -#endif - default : return 0; - } -} - - -MEM_STATIC unsigned long long ZSTD_getDecompressedSize_legacy(const void* src, size_t srcSize) -{ - U32 const version = ZSTD_isLegacy(src, srcSize); - if (version < 5) return 0; /* no decompressed size in frame header, or not a legacy format */ -#if (ZSTD_LEGACY_SUPPORT <= 5) - if (version==5) { - ZSTDv05_parameters fParams; - size_t const frResult = ZSTDv05_getFrameParams(&fParams, src, srcSize); - if (frResult != 0) return 0; - return fParams.srcSize; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - if (version==6) { - ZSTDv06_frameParams fParams; - size_t const frResult = ZSTDv06_getFrameParams(&fParams, src, srcSize); - if (frResult != 0) return 0; - return fParams.frameContentSize; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - if (version==7) { - ZSTDv07_frameParams fParams; - size_t const frResult = ZSTDv07_getFrameParams(&fParams, src, srcSize); - if (frResult != 0) return 0; - return fParams.frameContentSize; - } -#endif - return 0; /* should not be possible */ -} - - -MEM_STATIC size_t ZSTD_decompressLegacy( - void* dst, size_t dstCapacity, - const void* src, size_t compressedSize, - const void* dict,size_t dictSize) -{ - U32 const version = ZSTD_isLegacy(src, compressedSize); - char x; - /* Avoid passing NULL to legacy decoding. */ - if (dst == NULL) { - assert(dstCapacity == 0); - dst = &x; - } - if (src == NULL) { - assert(compressedSize == 0); - src = &x; - } - if (dict == NULL) { - assert(dictSize == 0); - dict = &x; - } - (void)dst; (void)dstCapacity; (void)dict; (void)dictSize; /* unused when ZSTD_LEGACY_SUPPORT >= 8 */ - switch(version) - { -#if (ZSTD_LEGACY_SUPPORT <= 1) - case 1 : - return ZSTDv01_decompress(dst, dstCapacity, src, compressedSize); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 2) - case 2 : - return ZSTDv02_decompress(dst, dstCapacity, src, compressedSize); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 3) - case 3 : - return ZSTDv03_decompress(dst, dstCapacity, src, compressedSize); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 4) - case 4 : - return ZSTDv04_decompress(dst, dstCapacity, src, compressedSize); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case 5 : - { size_t result; - ZSTDv05_DCtx* const zd = ZSTDv05_createDCtx(); - if (zd==NULL) return ERROR(memory_allocation); - result = ZSTDv05_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); - ZSTDv05_freeDCtx(zd); - return result; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case 6 : - { size_t result; - ZSTDv06_DCtx* const zd = ZSTDv06_createDCtx(); - if (zd==NULL) return ERROR(memory_allocation); - result = ZSTDv06_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); - ZSTDv06_freeDCtx(zd); - return result; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case 7 : - { size_t result; - ZSTDv07_DCtx* const zd = ZSTDv07_createDCtx(); - if (zd==NULL) return ERROR(memory_allocation); - result = ZSTDv07_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); - ZSTDv07_freeDCtx(zd); - return result; - } -#endif - default : - return ERROR(prefix_unknown); - } -} - -MEM_STATIC ZSTD_frameSizeInfo ZSTD_findFrameSizeInfoLegacy(const void *src, size_t srcSize) -{ - ZSTD_frameSizeInfo frameSizeInfo; - U32 const version = ZSTD_isLegacy(src, srcSize); - switch(version) - { -#if (ZSTD_LEGACY_SUPPORT <= 1) - case 1 : - ZSTDv01_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 2) - case 2 : - ZSTDv02_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 3) - case 3 : - ZSTDv03_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 4) - case 4 : - ZSTDv04_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case 5 : - ZSTDv05_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case 6 : - ZSTDv06_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case 7 : - ZSTDv07_findFrameSizeInfoLegacy(src, srcSize, - &frameSizeInfo.compressedSize, - &frameSizeInfo.decompressedBound); - break; -#endif - default : - frameSizeInfo.compressedSize = ERROR(prefix_unknown); - frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; - break; - } - if (!ZSTD_isError(frameSizeInfo.compressedSize) && frameSizeInfo.compressedSize > srcSize) { - frameSizeInfo.compressedSize = ERROR(srcSize_wrong); - frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; - } - /* In all cases, decompressedBound == nbBlocks * ZSTD_BLOCKSIZE_MAX. - * So we can compute nbBlocks without having to change every function. - */ - if (frameSizeInfo.decompressedBound != ZSTD_CONTENTSIZE_ERROR) { - assert((frameSizeInfo.decompressedBound & (ZSTD_BLOCKSIZE_MAX - 1)) == 0); - frameSizeInfo.nbBlocks = (size_t)(frameSizeInfo.decompressedBound / ZSTD_BLOCKSIZE_MAX); - } - return frameSizeInfo; -} - -MEM_STATIC size_t ZSTD_findFrameCompressedSizeLegacy(const void *src, size_t srcSize) -{ - ZSTD_frameSizeInfo frameSizeInfo = ZSTD_findFrameSizeInfoLegacy(src, srcSize); - return frameSizeInfo.compressedSize; -} - -MEM_STATIC size_t ZSTD_freeLegacyStreamContext(void* legacyContext, U32 version) -{ - switch(version) - { - default : - case 1 : - case 2 : - case 3 : - (void)legacyContext; - return ERROR(version_unsupported); -#if (ZSTD_LEGACY_SUPPORT <= 4) - case 4 : return ZBUFFv04_freeDCtx((ZBUFFv04_DCtx*)legacyContext); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case 5 : return ZBUFFv05_freeDCtx((ZBUFFv05_DCtx*)legacyContext); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case 6 : return ZBUFFv06_freeDCtx((ZBUFFv06_DCtx*)legacyContext); -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case 7 : return ZBUFFv07_freeDCtx((ZBUFFv07_DCtx*)legacyContext); -#endif - } -} - - -MEM_STATIC size_t ZSTD_initLegacyStream(void** legacyContext, U32 prevVersion, U32 newVersion, - const void* dict, size_t dictSize) -{ - char x; - /* Avoid passing NULL to legacy decoding. */ - if (dict == NULL) { - assert(dictSize == 0); - dict = &x; - } - DEBUGLOG(5, "ZSTD_initLegacyStream for v0.%u", newVersion); - if (prevVersion != newVersion) ZSTD_freeLegacyStreamContext(*legacyContext, prevVersion); - switch(newVersion) - { - default : - case 1 : - case 2 : - case 3 : - (void)dict; (void)dictSize; - return 0; -#if (ZSTD_LEGACY_SUPPORT <= 4) - case 4 : - { - ZBUFFv04_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv04_createDCtx() : (ZBUFFv04_DCtx*)*legacyContext; - if (dctx==NULL) return ERROR(memory_allocation); - ZBUFFv04_decompressInit(dctx); - ZBUFFv04_decompressWithDictionary(dctx, dict, dictSize); - *legacyContext = dctx; - return 0; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case 5 : - { - ZBUFFv05_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv05_createDCtx() : (ZBUFFv05_DCtx*)*legacyContext; - if (dctx==NULL) return ERROR(memory_allocation); - ZBUFFv05_decompressInitDictionary(dctx, dict, dictSize); - *legacyContext = dctx; - return 0; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case 6 : - { - ZBUFFv06_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv06_createDCtx() : (ZBUFFv06_DCtx*)*legacyContext; - if (dctx==NULL) return ERROR(memory_allocation); - ZBUFFv06_decompressInitDictionary(dctx, dict, dictSize); - *legacyContext = dctx; - return 0; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case 7 : - { - ZBUFFv07_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv07_createDCtx() : (ZBUFFv07_DCtx*)*legacyContext; - if (dctx==NULL) return ERROR(memory_allocation); - ZBUFFv07_decompressInitDictionary(dctx, dict, dictSize); - *legacyContext = dctx; - return 0; - } -#endif - } -} - - - -MEM_STATIC size_t ZSTD_decompressLegacyStream(void* legacyContext, U32 version, - ZSTD_outBuffer* output, ZSTD_inBuffer* input) -{ - static char x; - /* Avoid passing NULL to legacy decoding. */ - if (output->dst == NULL) { - assert(output->size == 0); - output->dst = &x; - } - if (input->src == NULL) { - assert(input->size == 0); - input->src = &x; - } - DEBUGLOG(5, "ZSTD_decompressLegacyStream for v0.%u", version); - switch(version) - { - default : - case 1 : - case 2 : - case 3 : - (void)legacyContext; (void)output; (void)input; - return ERROR(version_unsupported); -#if (ZSTD_LEGACY_SUPPORT <= 4) - case 4 : - { - ZBUFFv04_DCtx* dctx = (ZBUFFv04_DCtx*) legacyContext; - const void* src = (const char*)input->src + input->pos; - size_t readSize = input->size - input->pos; - void* dst = (char*)output->dst + output->pos; - size_t decodedSize = output->size - output->pos; - size_t const hintSize = ZBUFFv04_decompressContinue(dctx, dst, &decodedSize, src, &readSize); - output->pos += decodedSize; - input->pos += readSize; - return hintSize; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 5) - case 5 : - { - ZBUFFv05_DCtx* dctx = (ZBUFFv05_DCtx*) legacyContext; - const void* src = (const char*)input->src + input->pos; - size_t readSize = input->size - input->pos; - void* dst = (char*)output->dst + output->pos; - size_t decodedSize = output->size - output->pos; - size_t const hintSize = ZBUFFv05_decompressContinue(dctx, dst, &decodedSize, src, &readSize); - output->pos += decodedSize; - input->pos += readSize; - return hintSize; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 6) - case 6 : - { - ZBUFFv06_DCtx* dctx = (ZBUFFv06_DCtx*) legacyContext; - const void* src = (const char*)input->src + input->pos; - size_t readSize = input->size - input->pos; - void* dst = (char*)output->dst + output->pos; - size_t decodedSize = output->size - output->pos; - size_t const hintSize = ZBUFFv06_decompressContinue(dctx, dst, &decodedSize, src, &readSize); - output->pos += decodedSize; - input->pos += readSize; - return hintSize; - } -#endif -#if (ZSTD_LEGACY_SUPPORT <= 7) - case 7 : - { - ZBUFFv07_DCtx* dctx = (ZBUFFv07_DCtx*) legacyContext; - const void* src = (const char*)input->src + input->pos; - size_t readSize = input->size - input->pos; - void* dst = (char*)output->dst + output->pos; - size_t decodedSize = output->size - output->pos; - size_t const hintSize = ZBUFFv07_decompressContinue(dctx, dst, &decodedSize, src, &readSize); - output->pos += decodedSize; - input->pos += readSize; - return hintSize; - } -#endif - } -} - - -#if defined (__cplusplus) -} -#endif - -#endif /* ZSTD_LEGACY_H */ diff --git a/third_party/zstd/lib/legacy/zstd_v01.c b/third_party/zstd/lib/legacy/zstd_v01.c deleted file mode 100644 index ad3c933..0000000 --- a/third_party/zstd/lib/legacy/zstd_v01.c +++ /dev/null @@ -1,2127 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -/****************************************** -* Includes -******************************************/ -#include /* size_t, ptrdiff_t */ -#include "zstd_v01.h" -#include "../common/compiler.h" -#include "../common/error_private.h" - - -/****************************************** -* Static allocation -******************************************/ -/* You can statically allocate FSE CTable/DTable as a table of unsigned using below macro */ -#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) -* Increasing memory usage improves compression ratio -* Reduced memory usage can improve speed, due to cache effect -* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ -#define FSE_MAX_MEMORY_USAGE 14 -#define FSE_DEFAULT_MEMORY_USAGE 13 - -/* FSE_MAX_SYMBOL_VALUE : -* Maximum symbol value authorized. -* Required for proper stack allocation */ -#define FSE_MAX_SYMBOL_VALUE 255 - - -/**************************************************************** -* template functions type & suffix -****************************************************************/ -#define FSE_FUNCTION_TYPE BYTE -#define FSE_FUNCTION_EXTENSION - - -/**************************************************************** -* Byte symbol type -****************************************************************/ -typedef struct -{ - unsigned short newState; - unsigned char symbol; - unsigned char nbBits; -} FSE_decode_t; /* size == U32 */ - - - -/**************************************************************** -* Compiler specifics -****************************************************************/ -#ifdef _MSC_VER /* Visual Studio */ -# define FORCE_INLINE static __forceinline -# include /* For Visual 2005 */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ -#else -# define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# ifdef __GNUC__ -# define FORCE_INLINE static inline __attribute__((always_inline)) -# else -# define FORCE_INLINE static inline -# endif -# else -# define FORCE_INLINE static -# endif /* __STDC_VERSION__ */ -#endif - - -/**************************************************************** -* Includes -****************************************************************/ -#include /* malloc, free, qsort */ -#include /* memcpy, memset */ -#include /* printf (debug) */ - - -#ifndef MEM_ACCESS_MODULE -#define MEM_ACCESS_MODULE -/**************************************************************** -* Basic Types -*****************************************************************/ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# include -typedef uint8_t BYTE; -typedef uint16_t U16; -typedef int16_t S16; -typedef uint32_t U32; -typedef int32_t S32; -typedef uint64_t U64; -typedef int64_t S64; -#else -typedef unsigned char BYTE; -typedef unsigned short U16; -typedef signed short S16; -typedef unsigned int U32; -typedef signed int S32; -typedef unsigned long long U64; -typedef signed long long S64; -#endif - -#endif /* MEM_ACCESS_MODULE */ - -/**************************************************************** -* Memory I/O -*****************************************************************/ - -static unsigned FSE_32bits(void) -{ - return sizeof(void*)==4; -} - -static unsigned FSE_isLittleEndian(void) -{ - const union { U32 i; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ - return one.c[0]; -} - -static U16 FSE_read16(const void* memPtr) -{ - U16 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -static U32 FSE_read32(const void* memPtr) -{ - U32 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -static U64 FSE_read64(const void* memPtr) -{ - U64 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -static U16 FSE_readLE16(const void* memPtr) -{ - if (FSE_isLittleEndian()) - return FSE_read16(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U16)(p[0] + (p[1]<<8)); - } -} - -static U32 FSE_readLE32(const void* memPtr) -{ - if (FSE_isLittleEndian()) - return FSE_read32(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U32)((U32)p[0] + ((U32)p[1]<<8) + ((U32)p[2]<<16) + ((U32)p[3]<<24)); - } -} - - -static U64 FSE_readLE64(const void* memPtr) -{ - if (FSE_isLittleEndian()) - return FSE_read64(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U64)((U64)p[0] + ((U64)p[1]<<8) + ((U64)p[2]<<16) + ((U64)p[3]<<24) - + ((U64)p[4]<<32) + ((U64)p[5]<<40) + ((U64)p[6]<<48) + ((U64)p[7]<<56)); - } -} - -static size_t FSE_readLEST(const void* memPtr) -{ - if (FSE_32bits()) - return (size_t)FSE_readLE32(memPtr); - else - return (size_t)FSE_readLE64(memPtr); -} - - - -/**************************************************************** -* Constants -*****************************************************************/ -#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) -#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX -#error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" -#endif - - -/**************************************************************** -* Error Management -****************************************************************/ -#define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ - - -/**************************************************************** -* Complex types -****************************************************************/ -typedef struct -{ - int deltaFindState; - U32 deltaNbBits; -} FSE_symbolCompressionTransform; /* total 8 bytes */ - -typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)]; - -/**************************************************************** -* Internal functions -****************************************************************/ -FORCE_INLINE unsigned FSE_highbit32 (U32 val) -{ -# if defined(_MSC_VER) /* Visual */ - unsigned long r; - return _BitScanReverse(&r, val) ? (unsigned)r : 0; -# elif defined(__GNUC__) && (GCC_VERSION >= 304) /* GCC Intrinsic */ - return __builtin_clz (val) ^ 31; -# else /* Software version */ - static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; - U32 v = val; - unsigned r; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - r = DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27]; - return r; -# endif -} - - -/**************************************************************** -* Templates -****************************************************************/ -/* - designed to be included - for type-specific functions (template emulation in C) - Objective is to write these functions only once, for improved maintenance -*/ - -/* safety checks */ -#ifndef FSE_FUNCTION_EXTENSION -# error "FSE_FUNCTION_EXTENSION must be defined" -#endif -#ifndef FSE_FUNCTION_TYPE -# error "FSE_FUNCTION_TYPE must be defined" -#endif - -/* Function names */ -#define FSE_CAT(X,Y) X##Y -#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) -#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) - - - -static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (tableSize>>3) + 3; } - -#define FSE_DECODE_TYPE FSE_decode_t - - -typedef struct { - U16 tableLog; - U16 fastMode; -} FSE_DTableHeader; /* sizeof U32 */ - -static size_t FSE_buildDTable -(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) -{ - void* ptr = dt; - FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; - FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*)(ptr) + 1; /* because dt is unsigned, 32-bits aligned on 32-bits */ - const U32 tableSize = 1 << tableLog; - const U32 tableMask = tableSize-1; - const U32 step = FSE_tableStep(tableSize); - U16 symbolNext[FSE_MAX_SYMBOL_VALUE+1]; - U32 position = 0; - U32 highThreshold = tableSize-1; - const S16 largeLimit= (S16)(1 << (tableLog-1)); - U32 noLarge = 1; - U32 s; - - /* Sanity Checks */ - if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return (size_t)-FSE_ERROR_maxSymbolValue_tooLarge; - if (tableLog > FSE_MAX_TABLELOG) return (size_t)-FSE_ERROR_tableLog_tooLarge; - - /* Init, lay down lowprob symbols */ - DTableH[0].tableLog = (U16)tableLog; - for (s=0; s<=maxSymbolValue; s++) - { - if (normalizedCounter[s]==-1) - { - tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; - symbolNext[s] = 1; - } - else - { - if (normalizedCounter[s] >= largeLimit) noLarge=0; - symbolNext[s] = normalizedCounter[s]; - } - } - - /* Spread symbols */ - for (s=0; s<=maxSymbolValue; s++) - { - int i; - for (i=0; i highThreshold) position = (position + step) & tableMask; /* lowprob area */ - } - } - - if (position!=0) return (size_t)-FSE_ERROR_GENERIC; /* position must reach all cells once, otherwise normalizedCounter is incorrect */ - - /* Build Decoding table */ - { - U32 i; - for (i=0; ifastMode = (U16)noLarge; - return 0; -} - - -/****************************************** -* FSE byte symbol -******************************************/ -#ifndef FSE_COMMONDEFS_ONLY - -static unsigned FSE_isError(size_t code) { return (code > (size_t)(-FSE_ERROR_maxCode)); } - -static short FSE_abs(short a) -{ - return a<0? -a : a; -} - - -/**************************************************************** -* Header bitstream management -****************************************************************/ -static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, - const void* headerBuffer, size_t hbSize) -{ - const BYTE* const istart = (const BYTE*) headerBuffer; - const BYTE* const iend = istart + hbSize; - const BYTE* ip = istart; - int nbBits; - int remaining; - int threshold; - U32 bitStream; - int bitCount; - unsigned charnum = 0; - int previous0 = 0; - - if (hbSize < 4) return (size_t)-FSE_ERROR_srcSize_wrong; - bitStream = FSE_readLE32(ip); - nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ - if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return (size_t)-FSE_ERROR_tableLog_tooLarge; - bitStream >>= 4; - bitCount = 4; - *tableLogPtr = nbBits; - remaining = (1<1) && (charnum<=*maxSVPtr)) - { - if (previous0) - { - unsigned n0 = charnum; - while ((bitStream & 0xFFFF) == 0xFFFF) - { - n0+=24; - if (ip < iend-5) - { - ip+=2; - bitStream = FSE_readLE32(ip) >> bitCount; - } - else - { - bitStream >>= 16; - bitCount+=16; - } - } - while ((bitStream & 3) == 3) - { - n0+=3; - bitStream>>=2; - bitCount+=2; - } - n0 += bitStream & 3; - bitCount += 2; - if (n0 > *maxSVPtr) return (size_t)-FSE_ERROR_maxSymbolValue_tooSmall; - while (charnum < n0) normalizedCounter[charnum++] = 0; - if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) - { - ip += bitCount>>3; - bitCount &= 7; - bitStream = FSE_readLE32(ip) >> bitCount; - } - else - bitStream >>= 2; - } - { - const short max = (short)((2*threshold-1)-remaining); - short count; - - if ((bitStream & (threshold-1)) < (U32)max) - { - count = (short)(bitStream & (threshold-1)); - bitCount += nbBits-1; - } - else - { - count = (short)(bitStream & (2*threshold-1)); - if (count >= threshold) count -= max; - bitCount += nbBits; - } - - count--; /* extra accuracy */ - remaining -= FSE_abs(count); - normalizedCounter[charnum++] = count; - previous0 = !count; - while (remaining < threshold) - { - nbBits--; - threshold >>= 1; - } - - { - if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) - { - ip += bitCount>>3; - bitCount &= 7; - } - else - { - bitCount -= (int)(8 * (iend - 4 - ip)); - ip = iend - 4; - } - bitStream = FSE_readLE32(ip) >> (bitCount & 31); - } - } - } - if (remaining != 1) return (size_t)-FSE_ERROR_GENERIC; - *maxSVPtr = charnum-1; - - ip += (bitCount+7)>>3; - if ((size_t)(ip-istart) > hbSize) return (size_t)-FSE_ERROR_srcSize_wrong; - return ip-istart; -} - - -/********************************************************* -* Decompression (Byte symbols) -*********************************************************/ -static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue) -{ - void* ptr = dt; - FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; - FSE_decode_t* const cell = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ - - DTableH->tableLog = 0; - DTableH->fastMode = 0; - - cell->newState = 0; - cell->symbol = symbolValue; - cell->nbBits = 0; - - return 0; -} - - -static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) -{ - void* ptr = dt; - FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; - FSE_decode_t* const dinfo = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ - const unsigned tableSize = 1 << nbBits; - const unsigned tableMask = tableSize - 1; - const unsigned maxSymbolValue = tableMask; - unsigned s; - - /* Sanity checks */ - if (nbBits < 1) return (size_t)-FSE_ERROR_GENERIC; /* min size */ - - /* Build Decoding Table */ - DTableH->tableLog = (U16)nbBits; - DTableH->fastMode = 1; - for (s=0; s<=maxSymbolValue; s++) - { - dinfo[s].newState = 0; - dinfo[s].symbol = (BYTE)s; - dinfo[s].nbBits = (BYTE)nbBits; - } - - return 0; -} - - -/* FSE_initDStream - * Initialize a FSE_DStream_t. - * srcBuffer must point at the beginning of an FSE block. - * The function result is the size of the FSE_block (== srcSize). - * If srcSize is too small, the function will return an errorCode; - */ -static size_t FSE_initDStream(FSE_DStream_t* bitD, const void* srcBuffer, size_t srcSize) -{ - if (srcSize < 1) return (size_t)-FSE_ERROR_srcSize_wrong; - - if (srcSize >= sizeof(size_t)) - { - U32 contain32; - bitD->start = (const char*)srcBuffer; - bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(size_t); - bitD->bitContainer = FSE_readLEST(bitD->ptr); - contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; - if (contain32 == 0) return (size_t)-FSE_ERROR_GENERIC; /* stop bit not present */ - bitD->bitsConsumed = 8 - FSE_highbit32(contain32); - } - else - { - U32 contain32; - bitD->start = (const char*)srcBuffer; - bitD->ptr = bitD->start; - bitD->bitContainer = *(const BYTE*)(bitD->start); - switch(srcSize) - { - case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); - /* fallthrough */ - case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); - /* fallthrough */ - case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); - /* fallthrough */ - case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; - /* fallthrough */ - case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; - /* fallthrough */ - case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) << 8; - /* fallthrough */ - default:; - } - contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; - if (contain32 == 0) return (size_t)-FSE_ERROR_GENERIC; /* stop bit not present */ - bitD->bitsConsumed = 8 - FSE_highbit32(contain32); - bitD->bitsConsumed += (U32)(sizeof(size_t) - srcSize)*8; - } - - return srcSize; -} - - -/*!FSE_lookBits - * Provides next n bits from the bitContainer. - * bitContainer is not modified (bits are still present for next read/look) - * On 32-bits, maxNbBits==25 - * On 64-bits, maxNbBits==57 - * return : value extracted. - */ -static size_t FSE_lookBits(FSE_DStream_t* bitD, U32 nbBits) -{ - const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; - return ((bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> 1) >> ((bitMask-nbBits) & bitMask); -} - -static size_t FSE_lookBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* only if nbBits >= 1 !! */ -{ - const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; - return (bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> (((bitMask+1)-nbBits) & bitMask); -} - -static void FSE_skipBits(FSE_DStream_t* bitD, U32 nbBits) -{ - bitD->bitsConsumed += nbBits; -} - - -/*!FSE_readBits - * Read next n bits from the bitContainer. - * On 32-bits, don't read more than maxNbBits==25 - * On 64-bits, don't read more than maxNbBits==57 - * Use the fast variant *only* if n >= 1. - * return : value extracted. - */ -static size_t FSE_readBits(FSE_DStream_t* bitD, U32 nbBits) -{ - size_t value = FSE_lookBits(bitD, nbBits); - FSE_skipBits(bitD, nbBits); - return value; -} - -static size_t FSE_readBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* only if nbBits >= 1 !! */ -{ - size_t value = FSE_lookBitsFast(bitD, nbBits); - FSE_skipBits(bitD, nbBits); - return value; -} - -static unsigned FSE_reloadDStream(FSE_DStream_t* bitD) -{ - if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* should never happen */ - return FSE_DStream_tooFar; - - if (bitD->ptr >= bitD->start + sizeof(bitD->bitContainer)) - { - bitD->ptr -= bitD->bitsConsumed >> 3; - bitD->bitsConsumed &= 7; - bitD->bitContainer = FSE_readLEST(bitD->ptr); - return FSE_DStream_unfinished; - } - if (bitD->ptr == bitD->start) - { - if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return FSE_DStream_endOfBuffer; - return FSE_DStream_completed; - } - { - U32 nbBytes = bitD->bitsConsumed >> 3; - U32 result = FSE_DStream_unfinished; - if (bitD->ptr - nbBytes < bitD->start) - { - nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ - result = FSE_DStream_endOfBuffer; - } - bitD->ptr -= nbBytes; - bitD->bitsConsumed -= nbBytes*8; - bitD->bitContainer = FSE_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD) */ - return result; - } -} - - -static void FSE_initDState(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD, const FSE_DTable* dt) -{ - const void* ptr = dt; - const FSE_DTableHeader* const DTableH = (const FSE_DTableHeader*)ptr; - DStatePtr->state = FSE_readBits(bitD, DTableH->tableLog); - FSE_reloadDStream(bitD); - DStatePtr->table = dt + 1; -} - -static BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD) -{ - const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - const U32 nbBits = DInfo.nbBits; - BYTE symbol = DInfo.symbol; - size_t lowBits = FSE_readBits(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -static BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD) -{ - const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - const U32 nbBits = DInfo.nbBits; - BYTE symbol = DInfo.symbol; - size_t lowBits = FSE_readBitsFast(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -/* FSE_endOfDStream - Tells if bitD has reached end of bitStream or not */ - -static unsigned FSE_endOfDStream(const FSE_DStream_t* bitD) -{ - return ((bitD->ptr == bitD->start) && (bitD->bitsConsumed == sizeof(bitD->bitContainer)*8)); -} - -static unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) -{ - return DStatePtr->state == 0; -} - - -FORCE_INLINE size_t FSE_decompress_usingDTable_generic( - void* dst, size_t maxDstSize, - const void* cSrc, size_t cSrcSize, - const FSE_DTable* dt, const unsigned fast) -{ - BYTE* const ostart = (BYTE*) dst; - BYTE* op = ostart; - BYTE* const omax = op + maxDstSize; - BYTE* const olimit = omax-3; - - FSE_DStream_t bitD; - FSE_DState_t state1; - FSE_DState_t state2; - size_t errorCode; - - /* Init */ - errorCode = FSE_initDStream(&bitD, cSrc, cSrcSize); /* replaced last arg by maxCompressed Size */ - if (FSE_isError(errorCode)) return errorCode; - - FSE_initDState(&state1, &bitD, dt); - FSE_initDState(&state2, &bitD, dt); - -#define FSE_GETSYMBOL(statePtr) fast ? FSE_decodeSymbolFast(statePtr, &bitD) : FSE_decodeSymbol(statePtr, &bitD) - - /* 4 symbols per loop */ - for ( ; (FSE_reloadDStream(&bitD)==FSE_DStream_unfinished) && (op sizeof(bitD.bitContainer)*8) /* This test must be static */ - FSE_reloadDStream(&bitD); - - op[1] = FSE_GETSYMBOL(&state2); - - if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - { if (FSE_reloadDStream(&bitD) > FSE_DStream_unfinished) { op+=2; break; } } - - op[2] = FSE_GETSYMBOL(&state1); - - if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - FSE_reloadDStream(&bitD); - - op[3] = FSE_GETSYMBOL(&state2); - } - - /* tail */ - /* note : FSE_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly FSE_DStream_completed */ - while (1) - { - if ( (FSE_reloadDStream(&bitD)>FSE_DStream_completed) || (op==omax) || (FSE_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state1))) ) - break; - - *op++ = FSE_GETSYMBOL(&state1); - - if ( (FSE_reloadDStream(&bitD)>FSE_DStream_completed) || (op==omax) || (FSE_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state2))) ) - break; - - *op++ = FSE_GETSYMBOL(&state2); - } - - /* end ? */ - if (FSE_endOfDStream(&bitD) && FSE_endOfDState(&state1) && FSE_endOfDState(&state2)) - return op-ostart; - - if (op==omax) return (size_t)-FSE_ERROR_dstSize_tooSmall; /* dst buffer is full, but cSrc unfinished */ - - return (size_t)-FSE_ERROR_corruptionDetected; -} - - -static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize, - const void* cSrc, size_t cSrcSize, - const FSE_DTable* dt) -{ - FSE_DTableHeader DTableH; - memcpy(&DTableH, dt, sizeof(DTableH)); /* memcpy() into local variable, to avoid strict aliasing warning */ - - /* select fast mode (static) */ - if (DTableH.fastMode) return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 1); - return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 0); -} - - -static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize) -{ - const BYTE* const istart = (const BYTE*)cSrc; - const BYTE* ip = istart; - short counting[FSE_MAX_SYMBOL_VALUE+1]; - DTable_max_t dt; /* Static analyzer seems unable to understand this table will be properly initialized later */ - unsigned tableLog; - unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; - size_t errorCode; - - if (cSrcSize<2) return (size_t)-FSE_ERROR_srcSize_wrong; /* too small input size */ - - /* normal FSE decoding mode */ - errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); - if (FSE_isError(errorCode)) return errorCode; - if (errorCode >= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; /* too small input size */ - ip += errorCode; - cSrcSize -= errorCode; - - errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); - if (FSE_isError(errorCode)) return errorCode; - - /* always return, even if it is an error code */ - return FSE_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt); -} - - - -/* ******************************************************* -* Huff0 : Huffman block compression -*********************************************************/ -#define HUF_MAX_SYMBOL_VALUE 255 -#define HUF_DEFAULT_TABLELOG 12 /* used by default, when not specified */ -#define HUF_MAX_TABLELOG 12 /* max possible tableLog; for allocation purpose; can be modified */ -#define HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ -#if (HUF_MAX_TABLELOG > HUF_ABSOLUTEMAX_TABLELOG) -# error "HUF_MAX_TABLELOG is too large !" -#endif - -typedef struct HUF_CElt_s { - U16 val; - BYTE nbBits; -} HUF_CElt ; - -typedef struct nodeElt_s { - U32 count; - U16 parent; - BYTE byte; - BYTE nbBits; -} nodeElt; - - -/* ******************************************************* -* Huff0 : Huffman block decompression -*********************************************************/ -typedef struct { - BYTE byte; - BYTE nbBits; -} HUF_DElt; - -static size_t HUF_readDTable (U16* DTable, const void* src, size_t srcSize) -{ - BYTE huffWeight[HUF_MAX_SYMBOL_VALUE + 1]; - U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; /* large enough for values from 0 to 16 */ - U32 weightTotal; - U32 maxBits; - const BYTE* ip = (const BYTE*) src; - size_t iSize; - size_t oSize; - U32 n; - U32 nextRankStart; - void* ptr = DTable+1; - HUF_DElt* const dt = (HUF_DElt*)ptr; - - if (!srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; - iSize = ip[0]; - - FSE_STATIC_ASSERT(sizeof(HUF_DElt) == sizeof(U16)); /* if compilation fails here, assertion is false */ - //memset(huffWeight, 0, sizeof(huffWeight)); /* should not be necessary, but some analyzer complain ... */ - if (iSize >= 128) /* special header */ - { - if (iSize >= (242)) /* RLE */ - { - static int l[14] = { 1, 2, 3, 4, 7, 8, 15, 16, 31, 32, 63, 64, 127, 128 }; - oSize = l[iSize-242]; - memset(huffWeight, 1, sizeof(huffWeight)); - iSize = 0; - } - else /* Incompressible */ - { - oSize = iSize - 127; - iSize = ((oSize+1)/2); - if (iSize+1 > srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; - ip += 1; - for (n=0; n> 4; - huffWeight[n+1] = ip[n/2] & 15; - } - } - } - else /* header compressed with FSE (normal case) */ - { - if (iSize+1 > srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; - oSize = FSE_decompress(huffWeight, HUF_MAX_SYMBOL_VALUE, ip+1, iSize); /* max 255 values decoded, last one is implied */ - if (FSE_isError(oSize)) return oSize; - } - - /* collect weight stats */ - memset(rankVal, 0, sizeof(rankVal)); - weightTotal = 0; - for (n=0; n= HUF_ABSOLUTEMAX_TABLELOG) return (size_t)-FSE_ERROR_corruptionDetected; - rankVal[huffWeight[n]]++; - weightTotal += (1 << huffWeight[n]) >> 1; - } - if (weightTotal == 0) return (size_t)-FSE_ERROR_corruptionDetected; - - /* get last non-null symbol weight (implied, total must be 2^n) */ - maxBits = FSE_highbit32(weightTotal) + 1; - if (maxBits > DTable[0]) return (size_t)-FSE_ERROR_tableLog_tooLarge; /* DTable is too small */ - DTable[0] = (U16)maxBits; - { - U32 total = 1 << maxBits; - U32 rest = total - weightTotal; - U32 verif = 1 << FSE_highbit32(rest); - U32 lastWeight = FSE_highbit32(rest) + 1; - if (verif != rest) return (size_t)-FSE_ERROR_corruptionDetected; /* last value must be a clean power of 2 */ - huffWeight[oSize] = (BYTE)lastWeight; - rankVal[lastWeight]++; - } - - /* check tree construction validity */ - if ((rankVal[1] < 2) || (rankVal[1] & 1)) return (size_t)-FSE_ERROR_corruptionDetected; /* by construction : at least 2 elts of rank 1, must be even */ - - /* Prepare ranks */ - nextRankStart = 0; - for (n=1; n<=maxBits; n++) - { - U32 current = nextRankStart; - nextRankStart += (rankVal[n] << (n-1)); - rankVal[n] = current; - } - - /* fill DTable */ - for (n=0; n<=oSize; n++) - { - const U32 w = huffWeight[n]; - const U32 length = (1 << w) >> 1; - U32 i; - HUF_DElt D; - D.byte = (BYTE)n; D.nbBits = (BYTE)(maxBits + 1 - w); - for (i = rankVal[w]; i < rankVal[w] + length; i++) - dt[i] = D; - rankVal[w] += length; - } - - return iSize+1; -} - - -static BYTE HUF_decodeSymbol(FSE_DStream_t* Dstream, const HUF_DElt* dt, const U32 dtLog) -{ - const size_t val = FSE_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ - const BYTE c = dt[val].byte; - FSE_skipBits(Dstream, dt[val].nbBits); - return c; -} - -static size_t HUF_decompress_usingDTable( /* -3% slower when non static */ - void* dst, size_t maxDstSize, - const void* cSrc, size_t cSrcSize, - const U16* DTable) -{ - if (cSrcSize < 6) return (size_t)-FSE_ERROR_srcSize_wrong; - { - BYTE* const ostart = (BYTE*) dst; - BYTE* op = ostart; - BYTE* const omax = op + maxDstSize; - BYTE* const olimit = maxDstSize < 15 ? op : omax-15; - - const void* ptr = DTable; - const HUF_DElt* const dt = (const HUF_DElt*)(ptr)+1; - const U32 dtLog = DTable[0]; - size_t errorCode; - U32 reloadStatus; - - /* Init */ - - const U16* jumpTable = (const U16*)cSrc; - const size_t length1 = FSE_readLE16(jumpTable); - const size_t length2 = FSE_readLE16(jumpTable+1); - const size_t length3 = FSE_readLE16(jumpTable+2); - const size_t length4 = cSrcSize - 6 - length1 - length2 - length3; /* check coherency !! */ - const char* const start1 = (const char*)(cSrc) + 6; - const char* const start2 = start1 + length1; - const char* const start3 = start2 + length2; - const char* const start4 = start3 + length3; - FSE_DStream_t bitD1, bitD2, bitD3, bitD4; - - if (length1+length2+length3+6 >= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; - - errorCode = FSE_initDStream(&bitD1, start1, length1); - if (FSE_isError(errorCode)) return errorCode; - errorCode = FSE_initDStream(&bitD2, start2, length2); - if (FSE_isError(errorCode)) return errorCode; - errorCode = FSE_initDStream(&bitD3, start3, length3); - if (FSE_isError(errorCode)) return errorCode; - errorCode = FSE_initDStream(&bitD4, start4, length4); - if (FSE_isError(errorCode)) return errorCode; - - reloadStatus=FSE_reloadDStream(&bitD2); - - /* 16 symbols per loop */ - for ( ; (reloadStatus12)) FSE_reloadDStream(&Dstream) - - #define HUF_DECODE_SYMBOL_2(n, Dstream) \ - op[n] = HUF_decodeSymbol(&Dstream, dt, dtLog); \ - if (FSE_32bits()) FSE_reloadDStream(&Dstream) - - HUF_DECODE_SYMBOL_1( 0, bitD1); - HUF_DECODE_SYMBOL_1( 1, bitD2); - HUF_DECODE_SYMBOL_1( 2, bitD3); - HUF_DECODE_SYMBOL_1( 3, bitD4); - HUF_DECODE_SYMBOL_2( 4, bitD1); - HUF_DECODE_SYMBOL_2( 5, bitD2); - HUF_DECODE_SYMBOL_2( 6, bitD3); - HUF_DECODE_SYMBOL_2( 7, bitD4); - HUF_DECODE_SYMBOL_1( 8, bitD1); - HUF_DECODE_SYMBOL_1( 9, bitD2); - HUF_DECODE_SYMBOL_1(10, bitD3); - HUF_DECODE_SYMBOL_1(11, bitD4); - HUF_DECODE_SYMBOL_0(12, bitD1); - HUF_DECODE_SYMBOL_0(13, bitD2); - HUF_DECODE_SYMBOL_0(14, bitD3); - HUF_DECODE_SYMBOL_0(15, bitD4); - } - - if (reloadStatus!=FSE_DStream_completed) /* not complete : some bitStream might be FSE_DStream_unfinished */ - return (size_t)-FSE_ERROR_corruptionDetected; - - /* tail */ - { - /* bitTail = bitD1; */ /* *much* slower : -20% !??! */ - FSE_DStream_t bitTail; - bitTail.ptr = bitD1.ptr; - bitTail.bitsConsumed = bitD1.bitsConsumed; - bitTail.bitContainer = bitD1.bitContainer; /* required in case of FSE_DStream_endOfBuffer */ - bitTail.start = start1; - for ( ; (FSE_reloadDStream(&bitTail) < FSE_DStream_completed) && (op= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; - ip += errorCode; - cSrcSize -= errorCode; - - return HUF_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, DTable); -} - - -#endif /* FSE_COMMONDEFS_ONLY */ - -/* - zstd - standard compression library - Copyright (C) 2014-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - zstd source repository : https://github.com/Cyan4973/zstd - - ztsd public forum : https://groups.google.com/forum/#!forum/lz4c -*/ - -/**************************************************************** -* Tuning parameters -*****************************************************************/ -/* MEMORY_USAGE : -* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) -* Increasing memory usage improves compression ratio -* Reduced memory usage can improve speed, due to cache effect */ -#define ZSTD_MEMORY_USAGE 17 - - -/************************************** - CPU Feature Detection -**************************************/ -/* - * Automated efficient unaligned memory access detection - * Based on known hardware architectures - * This list will be updated thanks to feedbacks - */ -#if defined(CPU_HAS_EFFICIENT_UNALIGNED_MEMORY_ACCESS) \ - || defined(__ARM_FEATURE_UNALIGNED) \ - || defined(__i386__) || defined(__x86_64__) \ - || defined(_M_IX86) || defined(_M_X64) \ - || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_8__) \ - || (defined(_M_ARM) && (_M_ARM >= 7)) -# define ZSTD_UNALIGNED_ACCESS 1 -#else -# define ZSTD_UNALIGNED_ACCESS 0 -#endif - - -/******************************************************** -* Includes -*********************************************************/ -#include /* calloc */ -#include /* memcpy, memmove */ -#include /* debug : printf */ - - -/******************************************************** -* Compiler specifics -*********************************************************/ -#ifdef __AVX2__ -# include /* AVX2 intrinsics */ -#endif - -#ifdef _MSC_VER /* Visual Studio */ -# include /* For Visual 2005 */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -# pragma warning(disable : 4324) /* disable: C4324: padded structure */ -#endif - - -#ifndef MEM_ACCESS_MODULE -#define MEM_ACCESS_MODULE -/******************************************************** -* Basic Types -*********************************************************/ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# if defined(_AIX) -# include -# else -# include /* intptr_t */ -# endif -typedef uint8_t BYTE; -typedef uint16_t U16; -typedef int16_t S16; -typedef uint32_t U32; -typedef int32_t S32; -typedef uint64_t U64; -#else -typedef unsigned char BYTE; -typedef unsigned short U16; -typedef signed short S16; -typedef unsigned int U32; -typedef signed int S32; -typedef unsigned long long U64; -#endif - -#endif /* MEM_ACCESS_MODULE */ - - -/******************************************************** -* Constants -*********************************************************/ -static const U32 ZSTD_magicNumber = 0xFD2FB51E; /* 3rd version : seqNb header */ - -#define HASH_LOG (ZSTD_MEMORY_USAGE - 2) -#define HASH_TABLESIZE (1 << HASH_LOG) -#define HASH_MASK (HASH_TABLESIZE - 1) - -#define KNUTH 2654435761 - -#define BIT7 128 -#define BIT6 64 -#define BIT5 32 -#define BIT4 16 - -#define KB *(1 <<10) -#define MB *(1 <<20) -#define GB *(1U<<30) - -#define BLOCKSIZE (128 KB) /* define, for static allocation */ - -#define WORKPLACESIZE (BLOCKSIZE*3) -#define MINMATCH 4 -#define MLbits 7 -#define LLbits 6 -#define Offbits 5 -#define MaxML ((1<>3]; -#else - U32 hashTable[HASH_TABLESIZE]; -#endif - BYTE buffer[WORKPLACESIZE]; -} cctxi_t; - - - - -/************************************** -* Error Management -**************************************/ -/* published entry point */ -unsigned ZSTDv01_isError(size_t code) { return ERR_isError(code); } - - -/************************************** -* Tool functions -**************************************/ -#define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ -#define ZSTD_VERSION_MINOR 1 /* for new (non-breaking) interface capabilities */ -#define ZSTD_VERSION_RELEASE 3 /* for tweaks, bug-fixes, or development */ -#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) - -/************************************************************** -* Decompression code -**************************************************************/ - -static size_t ZSTDv01_getcBlockSize(const void* src, size_t srcSize, blockProperties_t* bpPtr) -{ - const BYTE* const in = (const BYTE* const)src; - BYTE headerFlags; - U32 cSize; - - if (srcSize < 3) return ERROR(srcSize_wrong); - - headerFlags = *in; - cSize = in[2] + (in[1]<<8) + ((in[0] & 7)<<16); - - bpPtr->blockType = (blockType_t)(headerFlags >> 6); - bpPtr->origSize = (bpPtr->blockType == bt_rle) ? cSize : 0; - - if (bpPtr->blockType == bt_end) return 0; - if (bpPtr->blockType == bt_rle) return 1; - return cSize; -} - - -static size_t ZSTD_copyUncompressedBlock(void* dst, size_t maxDstSize, const void* src, size_t srcSize) -{ - if (srcSize > maxDstSize) return ERROR(dstSize_tooSmall); - if (srcSize > 0) { - memcpy(dst, src, srcSize); - } - return srcSize; -} - - -static size_t ZSTD_decompressLiterals(void* ctx, - void* dst, size_t maxDstSize, - const void* src, size_t srcSize) -{ - BYTE* op = (BYTE*)dst; - BYTE* const oend = op + maxDstSize; - const BYTE* ip = (const BYTE*)src; - size_t errorCode; - size_t litSize; - - /* check : minimum 2, for litSize, +1, for content */ - if (srcSize <= 3) return ERROR(corruption_detected); - - litSize = ip[1] + (ip[0]<<8); - litSize += ((ip[-3] >> 3) & 7) << 16; /* mmmmh.... */ - op = oend - litSize; - - (void)ctx; - if (litSize > maxDstSize) return ERROR(dstSize_tooSmall); - errorCode = HUF_decompress(op, litSize, ip+2, srcSize-2); - if (FSE_isError(errorCode)) return ERROR(GENERIC); - return litSize; -} - - -static size_t ZSTDv01_decodeLiteralsBlock(void* ctx, - void* dst, size_t maxDstSize, - const BYTE** litStart, size_t* litSize, - const void* src, size_t srcSize) -{ - const BYTE* const istart = (const BYTE* const)src; - const BYTE* ip = istart; - BYTE* const ostart = (BYTE* const)dst; - BYTE* const oend = ostart + maxDstSize; - blockProperties_t litbp; - - size_t litcSize = ZSTDv01_getcBlockSize(src, srcSize, &litbp); - if (ZSTDv01_isError(litcSize)) return litcSize; - if (litcSize > srcSize - ZSTD_blockHeaderSize) return ERROR(srcSize_wrong); - ip += ZSTD_blockHeaderSize; - - switch(litbp.blockType) - { - case bt_raw: - *litStart = ip; - ip += litcSize; - *litSize = litcSize; - break; - case bt_rle: - { - size_t rleSize = litbp.origSize; - if (rleSize>maxDstSize) return ERROR(dstSize_tooSmall); - if (!srcSize) return ERROR(srcSize_wrong); - if (rleSize > 0) { - memset(oend - rleSize, *ip, rleSize); - } - *litStart = oend - rleSize; - *litSize = rleSize; - ip++; - break; - } - case bt_compressed: - { - size_t decodedLitSize = ZSTD_decompressLiterals(ctx, dst, maxDstSize, ip, litcSize); - if (ZSTDv01_isError(decodedLitSize)) return decodedLitSize; - *litStart = oend - decodedLitSize; - *litSize = decodedLitSize; - ip += litcSize; - break; - } - case bt_end: - default: - return ERROR(GENERIC); - } - - return ip-istart; -} - - -static size_t ZSTDv01_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, - FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb, - const void* src, size_t srcSize) -{ - const BYTE* const istart = (const BYTE* const)src; - const BYTE* ip = istart; - const BYTE* const iend = istart + srcSize; - U32 LLtype, Offtype, MLtype; - U32 LLlog, Offlog, MLlog; - size_t dumpsLength; - - /* check */ - if (srcSize < 5) return ERROR(srcSize_wrong); - - /* SeqHead */ - *nbSeq = ZSTD_readLE16(ip); ip+=2; - LLtype = *ip >> 6; - Offtype = (*ip >> 4) & 3; - MLtype = (*ip >> 2) & 3; - if (*ip & 2) - { - dumpsLength = ip[2]; - dumpsLength += ip[1] << 8; - ip += 3; - } - else - { - dumpsLength = ip[1]; - dumpsLength += (ip[0] & 1) << 8; - ip += 2; - } - *dumpsPtr = ip; - ip += dumpsLength; - *dumpsLengthPtr = dumpsLength; - - /* check */ - if (ip > iend-3) return ERROR(srcSize_wrong); /* min : all 3 are "raw", hence no header, but at least xxLog bits per type */ - - /* sequences */ - { - S16 norm[MaxML+1]; /* assumption : MaxML >= MaxLL and MaxOff */ - size_t headerSize; - - /* Build DTables */ - switch(LLtype) - { - case bt_rle : - LLlog = 0; - FSE_buildDTable_rle(DTableLL, *ip++); break; - case bt_raw : - LLlog = LLbits; - FSE_buildDTable_raw(DTableLL, LLbits); break; - default : - { U32 max = MaxLL; - headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip); - if (FSE_isError(headerSize)) return ERROR(GENERIC); - if (LLlog > LLFSELog) return ERROR(corruption_detected); - ip += headerSize; - FSE_buildDTable(DTableLL, norm, max, LLlog); - } } - - switch(Offtype) - { - case bt_rle : - Offlog = 0; - if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLog bits */ - FSE_buildDTable_rle(DTableOffb, *ip++); break; - case bt_raw : - Offlog = Offbits; - FSE_buildDTable_raw(DTableOffb, Offbits); break; - default : - { U32 max = MaxOff; - headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip); - if (FSE_isError(headerSize)) return ERROR(GENERIC); - if (Offlog > OffFSELog) return ERROR(corruption_detected); - ip += headerSize; - FSE_buildDTable(DTableOffb, norm, max, Offlog); - } } - - switch(MLtype) - { - case bt_rle : - MLlog = 0; - if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLog bits */ - FSE_buildDTable_rle(DTableML, *ip++); break; - case bt_raw : - MLlog = MLbits; - FSE_buildDTable_raw(DTableML, MLbits); break; - default : - { U32 max = MaxML; - headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip); - if (FSE_isError(headerSize)) return ERROR(GENERIC); - if (MLlog > MLFSELog) return ERROR(corruption_detected); - ip += headerSize; - FSE_buildDTable(DTableML, norm, max, MLlog); - } } } - - return ip-istart; -} - - -typedef struct { - size_t litLength; - size_t offset; - size_t matchLength; -} seq_t; - -typedef struct { - FSE_DStream_t DStream; - FSE_DState_t stateLL; - FSE_DState_t stateOffb; - FSE_DState_t stateML; - size_t prevOffset; - const BYTE* dumps; - const BYTE* dumpsEnd; -} seqState_t; - - -static void ZSTD_decodeSequence(seq_t* seq, seqState_t* seqState) -{ - size_t litLength; - size_t prevOffset; - size_t offset; - size_t matchLength; - const BYTE* dumps = seqState->dumps; - const BYTE* const de = seqState->dumpsEnd; - - /* Literal length */ - litLength = FSE_decodeSymbol(&(seqState->stateLL), &(seqState->DStream)); - prevOffset = litLength ? seq->offset : seqState->prevOffset; - seqState->prevOffset = seq->offset; - if (litLength == MaxLL) - { - const U32 add = dumpsstateOffb), &(seqState->DStream)); - if (ZSTD_32bits()) FSE_reloadDStream(&(seqState->DStream)); - nbBits = offsetCode - 1; - if (offsetCode==0) nbBits = 0; /* cmove */ - offset = ((size_t)1 << (nbBits & ((sizeof(offset)*8)-1))) + FSE_readBits(&(seqState->DStream), nbBits); - if (ZSTD_32bits()) FSE_reloadDStream(&(seqState->DStream)); - if (offsetCode==0) offset = prevOffset; - } - - /* MatchLength */ - matchLength = FSE_decodeSymbol(&(seqState->stateML), &(seqState->DStream)); - if (matchLength == MaxML) - { - const U32 add = dumpslitLength = litLength; - seq->offset = offset; - seq->matchLength = matchLength; - seqState->dumps = dumps; -} - - -static size_t ZSTD_execSequence(BYTE* op, - seq_t sequence, - const BYTE** litPtr, const BYTE* const litLimit, - BYTE* const base, BYTE* const oend) -{ - static const int dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4}; /* added */ - static const int dec64table[] = {8, 8, 8, 7, 8, 9,10,11}; /* subtracted */ - const BYTE* const ostart = op; - BYTE* const oLitEnd = op + sequence.litLength; - const size_t litLength = sequence.litLength; - BYTE* const endMatch = op + litLength + sequence.matchLength; /* risk : address space overflow (32-bits) */ - const BYTE* const litEnd = *litPtr + litLength; - - /* checks */ - size_t const seqLength = sequence.litLength + sequence.matchLength; - - if (seqLength > (size_t)(oend - op)) return ERROR(dstSize_tooSmall); - if (sequence.litLength > (size_t)(litLimit - *litPtr)) return ERROR(corruption_detected); - /* Now we know there are no overflow in literal nor match lengths, can use pointer checks */ - if (sequence.offset > (U32)(oLitEnd - base)) return ERROR(corruption_detected); - - if (endMatch > oend) return ERROR(dstSize_tooSmall); /* overwrite beyond dst buffer */ - if (litEnd > litLimit) return ERROR(corruption_detected); /* overRead beyond lit buffer */ - if (sequence.matchLength > (size_t)(*litPtr-op)) return ERROR(dstSize_tooSmall); /* overwrite literal segment */ - - /* copy Literals */ - ZSTD_memmove(op, *litPtr, sequence.litLength); /* note : v0.1 seems to allow scenarios where output or input are close to end of buffer */ - - op += litLength; - *litPtr = litEnd; /* update for next sequence */ - - /* check : last match must be at a minimum distance of 8 from end of dest buffer */ - if (oend-op < 8) return ERROR(dstSize_tooSmall); - - /* copy Match */ - { - const U32 overlapRisk = (((size_t)(litEnd - endMatch)) < 12); - const BYTE* match = op - sequence.offset; /* possible underflow at op - offset ? */ - size_t qutt = 12; - U64 saved[2]; - - /* check */ - if (match < base) return ERROR(corruption_detected); - if (sequence.offset > (size_t)base) return ERROR(corruption_detected); - - /* save beginning of literal sequence, in case of write overlap */ - if (overlapRisk) - { - if ((endMatch + qutt) > oend) qutt = oend-endMatch; - memcpy(saved, endMatch, qutt); - } - - if (sequence.offset < 8) - { - const int dec64 = dec64table[sequence.offset]; - op[0] = match[0]; - op[1] = match[1]; - op[2] = match[2]; - op[3] = match[3]; - match += dec32table[sequence.offset]; - ZSTD_copy4(op+4, match); - match -= dec64; - } else { ZSTD_copy8(op, match); } - op += 8; match += 8; - - if (endMatch > oend-(16-MINMATCH)) - { - if (op < oend-8) - { - ZSTD_wildcopy(op, match, (oend-8) - op); - match += (oend-8) - op; - op = oend-8; - } - while (opLLTable; - U32* DTableML = dctx->MLTable; - U32* DTableOffb = dctx->OffTable; - BYTE* const base = (BYTE*) (dctx->base); - - /* Build Decoding Tables */ - errorCode = ZSTDv01_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, - DTableLL, DTableML, DTableOffb, - ip, iend-ip); - if (ZSTDv01_isError(errorCode)) return errorCode; - ip += errorCode; - - /* Regen sequences */ - { - seq_t sequence; - seqState_t seqState; - - memset(&sequence, 0, sizeof(sequence)); - seqState.dumps = dumps; - seqState.dumpsEnd = dumps + dumpsLength; - seqState.prevOffset = 1; - errorCode = FSE_initDStream(&(seqState.DStream), ip, iend-ip); - if (FSE_isError(errorCode)) return ERROR(corruption_detected); - FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL); - FSE_initDState(&(seqState.stateOffb), &(seqState.DStream), DTableOffb); - FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML); - - for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; ) - { - size_t oneSeqSize; - nbSeq--; - ZSTD_decodeSequence(&sequence, &seqState); - oneSeqSize = ZSTD_execSequence(op, sequence, &litPtr, litEnd, base, oend); - if (ZSTDv01_isError(oneSeqSize)) return oneSeqSize; - op += oneSeqSize; - } - - /* check if reached exact end */ - if ( !FSE_endOfDStream(&(seqState.DStream)) ) return ERROR(corruption_detected); /* requested too much : data is corrupted */ - if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrupted */ - - /* last literal segment */ - { - size_t lastLLSize = litEnd - litPtr; - if (op+lastLLSize > oend) return ERROR(dstSize_tooSmall); - if (lastLLSize > 0) { - if (op != litPtr) memmove(op, litPtr, lastLLSize); - op += lastLLSize; - } - } - } - - return op-ostart; -} - - -static size_t ZSTD_decompressBlock( - void* ctx, - void* dst, size_t maxDstSize, - const void* src, size_t srcSize) -{ - /* blockType == blockCompressed, srcSize is trusted */ - const BYTE* ip = (const BYTE*)src; - const BYTE* litPtr = NULL; - size_t litSize = 0; - size_t errorCode; - - /* Decode literals sub-block */ - errorCode = ZSTDv01_decodeLiteralsBlock(ctx, dst, maxDstSize, &litPtr, &litSize, src, srcSize); - if (ZSTDv01_isError(errorCode)) return errorCode; - ip += errorCode; - srcSize -= errorCode; - - return ZSTD_decompressSequences(ctx, dst, maxDstSize, ip, srcSize, litPtr, litSize); -} - - -size_t ZSTDv01_decompressDCtx(void* ctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize) -{ - const BYTE* ip = (const BYTE*)src; - const BYTE* iend = ip + srcSize; - BYTE* const ostart = (BYTE* const)dst; - BYTE* op = ostart; - BYTE* const oend = ostart + maxDstSize; - size_t remainingSize = srcSize; - U32 magicNumber; - size_t errorCode=0; - blockProperties_t blockProperties; - - /* Frame Header */ - if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong); - magicNumber = ZSTD_readBE32(src); - if (magicNumber != ZSTD_magicNumber) return ERROR(prefix_unknown); - ip += ZSTD_frameHeaderSize; remainingSize -= ZSTD_frameHeaderSize; - - /* Loop on each block */ - while (1) - { - size_t blockSize = ZSTDv01_getcBlockSize(ip, iend-ip, &blockProperties); - if (ZSTDv01_isError(blockSize)) return blockSize; - - ip += ZSTD_blockHeaderSize; - remainingSize -= ZSTD_blockHeaderSize; - if (blockSize > remainingSize) return ERROR(srcSize_wrong); - - switch(blockProperties.blockType) - { - case bt_compressed: - errorCode = ZSTD_decompressBlock(ctx, op, oend-op, ip, blockSize); - break; - case bt_raw : - errorCode = ZSTD_copyUncompressedBlock(op, oend-op, ip, blockSize); - break; - case bt_rle : - return ERROR(GENERIC); /* not yet supported */ - break; - case bt_end : - /* end of frame */ - if (remainingSize) return ERROR(srcSize_wrong); - break; - default: - return ERROR(GENERIC); - } - if (blockSize == 0) break; /* bt_end */ - - if (ZSTDv01_isError(errorCode)) return errorCode; - op += errorCode; - ip += blockSize; - remainingSize -= blockSize; - } - - return op-ostart; -} - -size_t ZSTDv01_decompress(void* dst, size_t maxDstSize, const void* src, size_t srcSize) -{ - dctx_t ctx; - ctx.base = dst; - return ZSTDv01_decompressDCtx(&ctx, dst, maxDstSize, src, srcSize); -} - -/* ZSTD_errorFrameSizeInfoLegacy() : - assumes `cSize` and `dBound` are _not_ NULL */ -static void ZSTD_errorFrameSizeInfoLegacy(size_t* cSize, unsigned long long* dBound, size_t ret) -{ - *cSize = ret; - *dBound = ZSTD_CONTENTSIZE_ERROR; -} - -void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, size_t* cSize, unsigned long long* dBound) -{ - const BYTE* ip = (const BYTE*)src; - size_t remainingSize = srcSize; - size_t nbBlocks = 0; - U32 magicNumber; - blockProperties_t blockProperties; - - /* Frame Header */ - if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) { - ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); - return; - } - magicNumber = ZSTD_readBE32(src); - if (magicNumber != ZSTD_magicNumber) { - ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(prefix_unknown)); - return; - } - ip += ZSTD_frameHeaderSize; remainingSize -= ZSTD_frameHeaderSize; - - /* Loop on each block */ - while (1) - { - size_t blockSize = ZSTDv01_getcBlockSize(ip, remainingSize, &blockProperties); - if (ZSTDv01_isError(blockSize)) { - ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, blockSize); - return; - } - - ip += ZSTD_blockHeaderSize; - remainingSize -= ZSTD_blockHeaderSize; - if (blockSize > remainingSize) { - ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); - return; - } - - if (blockSize == 0) break; /* bt_end */ - - ip += blockSize; - remainingSize -= blockSize; - nbBlocks++; - } - - *cSize = ip - (const BYTE*)src; - *dBound = nbBlocks * BLOCKSIZE; -} - -/******************************* -* Streaming Decompression API -*******************************/ - -size_t ZSTDv01_resetDCtx(ZSTDv01_Dctx* dctx) -{ - dctx->expected = ZSTD_frameHeaderSize; - dctx->phase = 0; - dctx->previousDstEnd = NULL; - dctx->base = NULL; - return 0; -} - -ZSTDv01_Dctx* ZSTDv01_createDCtx(void) -{ - ZSTDv01_Dctx* dctx = (ZSTDv01_Dctx*)malloc(sizeof(ZSTDv01_Dctx)); - if (dctx==NULL) return NULL; - ZSTDv01_resetDCtx(dctx); - return dctx; -} - -size_t ZSTDv01_freeDCtx(ZSTDv01_Dctx* dctx) -{ - free(dctx); - return 0; -} - -size_t ZSTDv01_nextSrcSizeToDecompress(ZSTDv01_Dctx* dctx) -{ - return ((dctx_t*)dctx)->expected; -} - -size_t ZSTDv01_decompressContinue(ZSTDv01_Dctx* dctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize) -{ - dctx_t* ctx = (dctx_t*)dctx; - - /* Sanity check */ - if (srcSize != ctx->expected) return ERROR(srcSize_wrong); - if (dst != ctx->previousDstEnd) /* not contiguous */ - ctx->base = dst; - - /* Decompress : frame header */ - if (ctx->phase == 0) - { - /* Check frame magic header */ - U32 magicNumber = ZSTD_readBE32(src); - if (magicNumber != ZSTD_magicNumber) return ERROR(prefix_unknown); - ctx->phase = 1; - ctx->expected = ZSTD_blockHeaderSize; - return 0; - } - - /* Decompress : block header */ - if (ctx->phase == 1) - { - blockProperties_t bp; - size_t blockSize = ZSTDv01_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); - if (ZSTDv01_isError(blockSize)) return blockSize; - if (bp.blockType == bt_end) - { - ctx->expected = 0; - ctx->phase = 0; - } - else - { - ctx->expected = blockSize; - ctx->bType = bp.blockType; - ctx->phase = 2; - } - - return 0; - } - - /* Decompress : block content */ - { - size_t rSize; - switch(ctx->bType) - { - case bt_compressed: - rSize = ZSTD_decompressBlock(ctx, dst, maxDstSize, src, srcSize); - break; - case bt_raw : - rSize = ZSTD_copyUncompressedBlock(dst, maxDstSize, src, srcSize); - break; - case bt_rle : - return ERROR(GENERIC); /* not yet handled */ - break; - case bt_end : /* should never happen (filtered at phase 1) */ - rSize = 0; - break; - default: - return ERROR(GENERIC); - } - ctx->phase = 1; - ctx->expected = ZSTD_blockHeaderSize; - if (ZSTDv01_isError(rSize)) return rSize; - ctx->previousDstEnd = (void*)( ((char*)dst) + rSize); - return rSize; - } - -} diff --git a/third_party/zstd/lib/legacy/zstd_v01.h b/third_party/zstd/lib/legacy/zstd_v01.h deleted file mode 100644 index 6ac8769..0000000 --- a/third_party/zstd/lib/legacy/zstd_v01.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - -#ifndef ZSTD_V01_H_28739879432 -#define ZSTD_V01_H_28739879432 - -#if defined (__cplusplus) -extern "C" { -#endif - -/* ************************************* -* Includes -***************************************/ -#include /* size_t */ - - -/* ************************************* -* Simple one-step function -***************************************/ -/** -ZSTDv01_decompress() : decompress ZSTD frames compliant with v0.1.x format - compressedSize : is the exact source size - maxOriginalSize : is the size of the 'dst' buffer, which must be already allocated. - It must be equal or larger than originalSize, otherwise decompression will fail. - return : the number of bytes decompressed into destination buffer (originalSize) - or an errorCode if it fails (which can be tested using ZSTDv01_isError()) -*/ -size_t ZSTDv01_decompress( void* dst, size_t maxOriginalSize, - const void* src, size_t compressedSize); - - /** - ZSTDv01_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.1.x format - srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src' - cSize (output parameter) : the number of bytes that would be read to decompress this frame - or an error code if it fails (which can be tested using ZSTDv01_isError()) - dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame - or ZSTD_CONTENTSIZE_ERROR if an error occurs - - note : assumes `cSize` and `dBound` are _not_ NULL. - */ -void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, - size_t* cSize, unsigned long long* dBound); - -/** -ZSTDv01_isError() : tells if the result of ZSTDv01_decompress() is an error -*/ -unsigned ZSTDv01_isError(size_t code); - - -/* ************************************* -* Advanced functions -***************************************/ -typedef struct ZSTDv01_Dctx_s ZSTDv01_Dctx; -ZSTDv01_Dctx* ZSTDv01_createDCtx(void); -size_t ZSTDv01_freeDCtx(ZSTDv01_Dctx* dctx); - -size_t ZSTDv01_decompressDCtx(void* ctx, - void* dst, size_t maxOriginalSize, - const void* src, size_t compressedSize); - -/* ************************************* -* Streaming functions -***************************************/ -size_t ZSTDv01_resetDCtx(ZSTDv01_Dctx* dctx); - -size_t ZSTDv01_nextSrcSizeToDecompress(ZSTDv01_Dctx* dctx); -size_t ZSTDv01_decompressContinue(ZSTDv01_Dctx* dctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize); -/** - Use above functions alternatively. - ZSTD_nextSrcSizeToDecompress() tells how much bytes to provide as 'srcSize' to ZSTD_decompressContinue(). - ZSTD_decompressContinue() will use previous data blocks to improve compression if they are located prior to current block. - Result is the number of bytes regenerated within 'dst'. - It can be zero, which is not an error; it just means ZSTD_decompressContinue() has decoded some header. -*/ - -/* ************************************* -* Prefix - version detection -***************************************/ -#define ZSTDv01_magicNumber 0xFD2FB51E /* Big Endian version */ -#define ZSTDv01_magicNumberLE 0x1EB52FFD /* Little Endian version */ - - -#if defined (__cplusplus) -} -#endif - -#endif /* ZSTD_V01_H_28739879432 */ diff --git a/third_party/zstd/lib/legacy/zstd_v02.c b/third_party/zstd/lib/legacy/zstd_v02.c deleted file mode 100644 index d1e0038..0000000 --- a/third_party/zstd/lib/legacy/zstd_v02.c +++ /dev/null @@ -1,3465 +0,0 @@ -/* - * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - * You may select, at your option, one of the above-listed licenses. - */ - - -#include /* size_t, ptrdiff_t */ -#include "zstd_v02.h" -#include "../common/compiler.h" -#include "../common/error_private.h" - - -/****************************************** -* Compiler-specific -******************************************/ -#if defined(_MSC_VER) /* Visual Studio */ -# include /* _byteswap_ulong */ -# include /* _byteswap_* */ -#endif - - -/* ****************************************************************** - mem.h - low-level memory access routines - Copyright (C) 2013-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ -#ifndef MEM_H_MODULE -#define MEM_H_MODULE - -#if defined (__cplusplus) -extern "C" { -#endif - -/****************************************** -* Includes -******************************************/ -#include /* size_t, ptrdiff_t */ -#include /* memcpy */ - - -/**************************************************************** -* Basic Types -*****************************************************************/ -#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# if defined(_AIX) -# include -# else -# include /* intptr_t */ -# endif - typedef uint8_t BYTE; - typedef uint16_t U16; - typedef int16_t S16; - typedef uint32_t U32; - typedef int32_t S32; - typedef uint64_t U64; - typedef int64_t S64; -#else - typedef unsigned char BYTE; - typedef unsigned short U16; - typedef signed short S16; - typedef unsigned int U32; - typedef signed int S32; - typedef unsigned long long U64; - typedef signed long long S64; -#endif - - -/**************************************************************** -* Memory I/O -*****************************************************************/ - -MEM_STATIC unsigned MEM_32bits(void) { return sizeof(void*)==4; } -MEM_STATIC unsigned MEM_64bits(void) { return sizeof(void*)==8; } - -MEM_STATIC unsigned MEM_isLittleEndian(void) -{ - const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ - return one.c[0]; -} - -MEM_STATIC U16 MEM_read16(const void* memPtr) -{ - U16 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC U32 MEM_read32(const void* memPtr) -{ - U32 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC U64 MEM_read64(const void* memPtr) -{ - U64 val; memcpy(&val, memPtr, sizeof(val)); return val; -} - -MEM_STATIC void MEM_write16(void* memPtr, U16 value) -{ - memcpy(memPtr, &value, sizeof(value)); -} - -MEM_STATIC U16 MEM_readLE16(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read16(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U16)(p[0] + (p[1]<<8)); - } -} - -MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val) -{ - if (MEM_isLittleEndian()) - { - MEM_write16(memPtr, val); - } - else - { - BYTE* p = (BYTE*)memPtr; - p[0] = (BYTE)val; - p[1] = (BYTE)(val>>8); - } -} - -MEM_STATIC U32 MEM_readLE24(const void* memPtr) -{ - return MEM_readLE16(memPtr) + (((const BYTE*)memPtr)[2] << 16); -} - -MEM_STATIC U32 MEM_readLE32(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read32(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U32)((U32)p[0] + ((U32)p[1]<<8) + ((U32)p[2]<<16) + ((U32)p[3]<<24)); - } -} - - -MEM_STATIC U64 MEM_readLE64(const void* memPtr) -{ - if (MEM_isLittleEndian()) - return MEM_read64(memPtr); - else - { - const BYTE* p = (const BYTE*)memPtr; - return (U64)((U64)p[0] + ((U64)p[1]<<8) + ((U64)p[2]<<16) + ((U64)p[3]<<24) - + ((U64)p[4]<<32) + ((U64)p[5]<<40) + ((U64)p[6]<<48) + ((U64)p[7]<<56)); - } -} - - -MEM_STATIC size_t MEM_readLEST(const void* memPtr) -{ - if (MEM_32bits()) - return (size_t)MEM_readLE32(memPtr); - else - return (size_t)MEM_readLE64(memPtr); -} - -#if defined (__cplusplus) -} -#endif - -#endif /* MEM_H_MODULE */ - - -/* ****************************************************************** - bitstream - Part of NewGen Entropy library - header file (to include) - Copyright (C) 2013-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ -#ifndef BITSTREAM_H_MODULE -#define BITSTREAM_H_MODULE - -#if defined (__cplusplus) -extern "C" { -#endif - - -/* -* This API consists of small unitary functions, which highly benefit from being inlined. -* Since link-time-optimization is not available for all compilers, -* these functions are defined into a .h to be included. -*/ - - -/********************************************** -* bitStream decompression API (read backward) -**********************************************/ -typedef struct -{ - size_t bitContainer; - unsigned bitsConsumed; - const char* ptr; - const char* start; -} BIT_DStream_t; - -typedef enum { BIT_DStream_unfinished = 0, - BIT_DStream_endOfBuffer = 1, - BIT_DStream_completed = 2, - BIT_DStream_overflow = 3 } BIT_DStream_status; /* result of BIT_reloadDStream() */ - /* 1,2,4,8 would be better for bitmap combinations, but slows down performance a bit ... :( */ - -MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize); -MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits); -MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD); -MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* bitD); - - -/****************************************** -* unsafe API -******************************************/ -MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits); -/* faster, but works only if nbBits >= 1 */ - - - -/**************************************************************** -* Helper functions -****************************************************************/ -MEM_STATIC unsigned BIT_highbit32 (U32 val) -{ -# if defined(_MSC_VER) /* Visual */ - unsigned long r; - return _BitScanReverse(&r, val) ? (unsigned)r : 0; -# elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ - return __builtin_clz (val) ^ 31; -# else /* Software version */ - static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; - U32 v = val; - unsigned r; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - r = DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27]; - return r; -# endif -} - - - -/********************************************************** -* bitStream decoding -**********************************************************/ - -/*!BIT_initDStream -* Initialize a BIT_DStream_t. -* @bitD : a pointer to an already allocated BIT_DStream_t structure -* @srcBuffer must point at the beginning of a bitStream -* @srcSize must be the exact size of the bitStream -* @result : size of stream (== srcSize) or an errorCode if a problem is detected -*/ -MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize) -{ - if (srcSize < 1) { memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); } - - if (srcSize >= sizeof(size_t)) /* normal case */ - { - U32 contain32; - bitD->start = (const char*)srcBuffer; - bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(size_t); - bitD->bitContainer = MEM_readLEST(bitD->ptr); - contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; - if (contain32 == 0) return ERROR(GENERIC); /* endMark not present */ - bitD->bitsConsumed = 8 - BIT_highbit32(contain32); - } - else - { - U32 contain32; - bitD->start = (const char*)srcBuffer; - bitD->ptr = bitD->start; - bitD->bitContainer = *(const BYTE*)(bitD->start); - switch(srcSize) - { - case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); - /* fallthrough */ - case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); - /* fallthrough */ - case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); - /* fallthrough */ - case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; - /* fallthrough */ - case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; - /* fallthrough */ - case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) << 8; - /* fallthrough */ - default:; - } - contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; - if (contain32 == 0) return ERROR(GENERIC); /* endMark not present */ - bitD->bitsConsumed = 8 - BIT_highbit32(contain32); - bitD->bitsConsumed += (U32)(sizeof(size_t) - srcSize)*8; - } - - return srcSize; -} - -MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits) -{ - const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; - return ((bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> 1) >> ((bitMask-nbBits) & bitMask); -} - -/*! BIT_lookBitsFast : -* unsafe version; only works if nbBits >= 1 */ -MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits) -{ - const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; - return (bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> (((bitMask+1)-nbBits) & bitMask); -} - -MEM_STATIC void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) -{ - bitD->bitsConsumed += nbBits; -} - -MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits) -{ - size_t value = BIT_lookBits(bitD, nbBits); - BIT_skipBits(bitD, nbBits); - return value; -} - -/*!BIT_readBitsFast : -* unsafe version; only works if nbBits >= 1 */ -MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits) -{ - size_t value = BIT_lookBitsFast(bitD, nbBits); - BIT_skipBits(bitD, nbBits); - return value; -} - -MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD) -{ - if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* should never happen */ - return BIT_DStream_overflow; - - if (bitD->ptr >= bitD->start + sizeof(bitD->bitContainer)) - { - bitD->ptr -= bitD->bitsConsumed >> 3; - bitD->bitsConsumed &= 7; - bitD->bitContainer = MEM_readLEST(bitD->ptr); - return BIT_DStream_unfinished; - } - if (bitD->ptr == bitD->start) - { - if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BIT_DStream_endOfBuffer; - return BIT_DStream_completed; - } - { - U32 nbBytes = bitD->bitsConsumed >> 3; - BIT_DStream_status result = BIT_DStream_unfinished; - if (bitD->ptr - nbBytes < bitD->start) - { - nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ - result = BIT_DStream_endOfBuffer; - } - bitD->ptr -= nbBytes; - bitD->bitsConsumed -= nbBytes*8; - bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD) */ - return result; - } -} - -/*! BIT_endOfDStream -* @return Tells if DStream has reached its exact end -*/ -MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream) -{ - return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer)*8)); -} - -#if defined (__cplusplus) -} -#endif - -#endif /* BITSTREAM_H_MODULE */ -/* ****************************************************************** - Error codes and messages - Copyright (C) 2013-2015, Yann Collet - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ -#ifndef ERROR_H_MODULE -#define ERROR_H_MODULE - -#if defined (__cplusplus) -extern "C" { -#endif - - -/****************************************** -* Compiler-specific -******************************************/ -#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -# define ERR_STATIC static inline -#elif defined(_MSC_VER) -# define ERR_STATIC static __inline -#elif defined(__GNUC__) -# define ERR_STATIC static __attribute__((unused)) -#else -# define ERR_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ -#endif - - -/****************************************** -* Error Management -******************************************/ -#define PREFIX(name) ZSTD_error_##name - -#define ERROR(name) (size_t)-PREFIX(name) - -#define ERROR_LIST(ITEM) \ - ITEM(PREFIX(No_Error)) ITEM(PREFIX(GENERIC)) \ - ITEM(PREFIX(dstSize_tooSmall)) ITEM(PREFIX(srcSize_wrong)) \ - ITEM(PREFIX(prefix_unknown)) ITEM(PREFIX(corruption_detected)) \ - ITEM(PREFIX(tableLog_tooLarge)) ITEM(PREFIX(maxSymbolValue_tooLarge)) ITEM(PREFIX(maxSymbolValue_tooSmall)) \ - ITEM(PREFIX(maxCode)) - -#define ERROR_GENERATE_ENUM(ENUM) ENUM, -typedef enum { ERROR_LIST(ERROR_GENERATE_ENUM) } ERR_codes; /* enum is exposed, to detect & handle specific errors; compare function result to -enum value */ - -#define ERROR_CONVERTTOSTRING(STRING) #STRING, -#define ERROR_GENERATE_STRING(EXPR) ERROR_CONVERTTOSTRING(EXPR) -static const char* ERR_strings[] = { ERROR_LIST(ERROR_GENERATE_STRING) }; - -ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } - -ERR_STATIC const char* ERR_getErrorName(size_t code) -{ - static const char* codeError = "Unspecified error code"; - if (ERR_isError(code)) return ERR_strings[-(int)(code)]; - return codeError; -} - - -#if defined (__cplusplus) -} -#endif - -#endif /* ERROR_H_MODULE */ -/* -Constructor and Destructor of type FSE_CTable - Note that its size depends on 'tableLog' and 'maxSymbolValue' */ -typedef unsigned FSE_CTable; /* don't allocate that. It's just a way to be more restrictive than void* */ -typedef unsigned FSE_DTable; /* don't allocate that. It's just a way to be more restrictive than void* */ - - -/* ****************************************************************** - FSE : Finite State Entropy coder - header file for static linking (only) - Copyright (C) 2013-2015, Yann Collet - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ -#if defined (__cplusplus) -extern "C" { -#endif - - -/****************************************** -* Static allocation -******************************************/ -/* FSE buffer bounds */ -#define FSE_NCOUNTBOUND 512 -#define FSE_BLOCKBOUND(size) (size + (size>>7)) -#define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ - -/* You can statically allocate FSE CTable/DTable as a table of unsigned using below macro */ -#define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolValue+1)*2)) -#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<= 1 (otherwise, result will be corrupted) */ - - -/****************************************** -* Implementation of inline functions -******************************************/ - -/* decompression */ - -typedef struct { - U16 tableLog; - U16 fastMode; -} FSE_DTableHeader; /* sizeof U32 */ - -typedef struct -{ - unsigned short newState; - unsigned char symbol; - unsigned char nbBits; -} FSE_decode_t; /* size == U32 */ - -MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt) -{ - FSE_DTableHeader DTableH; - memcpy(&DTableH, dt, sizeof(DTableH)); - DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog); - BIT_reloadDStream(bitD); - DStatePtr->table = dt + 1; -} - -MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) -{ - const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - const U32 nbBits = DInfo.nbBits; - BYTE symbol = DInfo.symbol; - size_t lowBits = BIT_readBits(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) -{ - const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; - const U32 nbBits = DInfo.nbBits; - BYTE symbol = DInfo.symbol; - size_t lowBits = BIT_readBitsFast(bitD, nbBits); - - DStatePtr->state = DInfo.newState + lowBits; - return symbol; -} - -MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) -{ - return DStatePtr->state == 0; -} - - -#if defined (__cplusplus) -} -#endif -/* ****************************************************************** - Huff0 : Huffman coder, part of New Generation Entropy library - header file for static linking (only) - Copyright (C) 2013-2015, Yann Collet - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - Source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ - -#if defined (__cplusplus) -extern "C" { -#endif - -/****************************************** -* Static allocation macros -******************************************/ -/* Huff0 buffer bounds */ -#define HUF_CTABLEBOUND 129 -#define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true if incompressible pre-filtered with fast heuristic */ -#define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ - -/* static allocation of Huff0's DTable */ -#define HUF_DTABLE_SIZE(maxTableLog) (1 + (1< /* size_t */ - - -/* ************************************* -* Version -***************************************/ -#define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ -#define ZSTD_VERSION_MINOR 2 /* for new (non-breaking) interface capabilities */ -#define ZSTD_VERSION_RELEASE 2 /* for tweaks, bug-fixes, or development */ -#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) - - -/* ************************************* -* Advanced functions -***************************************/ -typedef struct ZSTD_CCtx_s ZSTD_CCtx; /* incomplete type */ - -#if defined (__cplusplus) -} -#endif -/* - zstd - standard compression library - Header File for static linking only - Copyright (C) 2014-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - zstd source repository : https://github.com/Cyan4973/zstd - - ztsd public forum : https://groups.google.com/forum/#!forum/lz4c -*/ - -/* The objects defined into this file should be considered experimental. - * They are not labelled stable, as their prototype may change in the future. - * You can use them for tests, provide feedback, or if you can endure risk of future changes. - */ - -#if defined (__cplusplus) -extern "C" { -#endif - -/* ************************************* -* Streaming functions -***************************************/ - -typedef struct ZSTDv02_Dctx_s ZSTD_DCtx; - -/* - Use above functions alternatively. - ZSTD_nextSrcSizeToDecompress() tells how much bytes to provide as 'srcSize' to ZSTD_decompressContinue(). - ZSTD_decompressContinue() will use previous data blocks to improve compression if they are located prior to current block. - Result is the number of bytes regenerated within 'dst'. - It can be zero, which is not an error; it just means ZSTD_decompressContinue() has decoded some header. -*/ - -/* ************************************* -* Prefix - version detection -***************************************/ -#define ZSTD_magicNumber 0xFD2FB522 /* v0.2 (current)*/ - - -#if defined (__cplusplus) -} -#endif -/* ****************************************************************** - FSE : Finite State Entropy coder - Copyright (C) 2013-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ - -#ifndef FSE_COMMONDEFS_ONLY - -/**************************************************************** -* Tuning parameters -****************************************************************/ -/* MEMORY_USAGE : -* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) -* Increasing memory usage improves compression ratio -* Reduced memory usage can improve speed, due to cache effect -* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ -#define FSE_MAX_MEMORY_USAGE 14 -#define FSE_DEFAULT_MEMORY_USAGE 13 - -/* FSE_MAX_SYMBOL_VALUE : -* Maximum symbol value authorized. -* Required for proper stack allocation */ -#define FSE_MAX_SYMBOL_VALUE 255 - - -/**************************************************************** -* template functions type & suffix -****************************************************************/ -#define FSE_FUNCTION_TYPE BYTE -#define FSE_FUNCTION_EXTENSION - - -/**************************************************************** -* Byte symbol type -****************************************************************/ -#endif /* !FSE_COMMONDEFS_ONLY */ - - -/**************************************************************** -* Compiler specifics -****************************************************************/ -#ifdef _MSC_VER /* Visual Studio */ -# define FORCE_INLINE static __forceinline -# include /* For Visual 2005 */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ -#else -# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# ifdef __GNUC__ -# define FORCE_INLINE static inline __attribute__((always_inline)) -# else -# define FORCE_INLINE static inline -# endif -# else -# define FORCE_INLINE static -# endif /* __STDC_VERSION__ */ -#endif - - -/**************************************************************** -* Includes -****************************************************************/ -#include /* malloc, free, qsort */ -#include /* memcpy, memset */ -#include /* printf (debug) */ - -/**************************************************************** -* Constants -*****************************************************************/ -#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) -#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX -#error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" -#endif - - -/**************************************************************** -* Error Management -****************************************************************/ -#define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ - - -/**************************************************************** -* Complex types -****************************************************************/ -typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)]; - - -/**************************************************************** -* Templates -****************************************************************/ -/* - designed to be included - for type-specific functions (template emulation in C) - Objective is to write these functions only once, for improved maintenance -*/ - -/* safety checks */ -#ifndef FSE_FUNCTION_EXTENSION -# error "FSE_FUNCTION_EXTENSION must be defined" -#endif -#ifndef FSE_FUNCTION_TYPE -# error "FSE_FUNCTION_TYPE must be defined" -#endif - -/* Function names */ -#define FSE_CAT(X,Y) X##Y -#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) -#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) - - -/* Function templates */ - -#define FSE_DECODE_TYPE FSE_decode_t - -static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (tableSize>>3) + 3; } - -static size_t FSE_buildDTable -(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) -{ - void* ptr = dt+1; - FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*)ptr; - FSE_DTableHeader DTableH; - const U32 tableSize = 1 << tableLog; - const U32 tableMask = tableSize-1; - const U32 step = FSE_tableStep(tableSize); - U16 symbolNext[FSE_MAX_SYMBOL_VALUE+1]; - U32 position = 0; - U32 highThreshold = tableSize-1; - const S16 largeLimit= (S16)(1 << (tableLog-1)); - U32 noLarge = 1; - U32 s; - - /* Sanity Checks */ - if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); - if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); - - /* Init, lay down lowprob symbols */ - DTableH.tableLog = (U16)tableLog; - for (s=0; s<=maxSymbolValue; s++) - { - if (normalizedCounter[s]==-1) - { - tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; - symbolNext[s] = 1; - } - else - { - if (normalizedCounter[s] >= largeLimit) noLarge=0; - symbolNext[s] = normalizedCounter[s]; - } - } - - /* Spread symbols */ - for (s=0; s<=maxSymbolValue; s++) - { - int i; - for (i=0; i highThreshold) position = (position + step) & tableMask; /* lowprob area */ - } - } - - if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ - - /* Build Decoding table */ - { - U32 i; - for (i=0; i FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); - bitStream >>= 4; - bitCount = 4; - *tableLogPtr = nbBits; - remaining = (1<1) && (charnum<=*maxSVPtr)) - { - if (previous0) - { - unsigned n0 = charnum; - while ((bitStream & 0xFFFF) == 0xFFFF) - { - n0+=24; - if (ip < iend-5) - { - ip+=2; - bitStream = MEM_readLE32(ip) >> bitCount; - } - else - { - bitStream >>= 16; - bitCount+=16; - } - } - while ((bitStream & 3) == 3) - { - n0+=3; - bitStream>>=2; - bitCount+=2; - } - n0 += bitStream & 3; - bitCount += 2; - if (n0 > *maxSVPtr) return ERROR(maxSymbolValue_tooSmall); - while (charnum < n0) normalizedCounter[charnum++] = 0; - if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) - { - ip += bitCount>>3; - bitCount &= 7; - bitStream = MEM_readLE32(ip) >> bitCount; - } - else - bitStream >>= 2; - } - { - const short max = (short)((2*threshold-1)-remaining); - short count; - - if ((bitStream & (threshold-1)) < (U32)max) - { - count = (short)(bitStream & (threshold-1)); - bitCount += nbBits-1; - } - else - { - count = (short)(bitStream & (2*threshold-1)); - if (count >= threshold) count -= max; - bitCount += nbBits; - } - - count--; /* extra accuracy */ - remaining -= FSE_abs(count); - normalizedCounter[charnum++] = count; - previous0 = !count; - while (remaining < threshold) - { - nbBits--; - threshold >>= 1; - } - - { - if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) - { - ip += bitCount>>3; - bitCount &= 7; - } - else - { - bitCount -= (int)(8 * (iend - 4 - ip)); - ip = iend - 4; - } - bitStream = MEM_readLE32(ip) >> (bitCount & 31); - } - } - } - if (remaining != 1) return ERROR(GENERIC); - *maxSVPtr = charnum-1; - - ip += (bitCount+7)>>3; - if ((size_t)(ip-istart) > hbSize) return ERROR(srcSize_wrong); - return ip-istart; -} - - -/********************************************************* -* Decompression (Byte symbols) -*********************************************************/ -static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue) -{ - void* ptr = dt; - FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; - FSE_decode_t* const cell = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ - - DTableH->tableLog = 0; - DTableH->fastMode = 0; - - cell->newState = 0; - cell->symbol = symbolValue; - cell->nbBits = 0; - - return 0; -} - - -static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) -{ - void* ptr = dt; - FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; - FSE_decode_t* const dinfo = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ - const unsigned tableSize = 1 << nbBits; - const unsigned tableMask = tableSize - 1; - const unsigned maxSymbolValue = tableMask; - unsigned s; - - /* Sanity checks */ - if (nbBits < 1) return ERROR(GENERIC); /* min size */ - - /* Build Decoding Table */ - DTableH->tableLog = (U16)nbBits; - DTableH->fastMode = 1; - for (s=0; s<=maxSymbolValue; s++) - { - dinfo[s].newState = 0; - dinfo[s].symbol = (BYTE)s; - dinfo[s].nbBits = (BYTE)nbBits; - } - - return 0; -} - -FORCE_INLINE size_t FSE_decompress_usingDTable_generic( - void* dst, size_t maxDstSize, - const void* cSrc, size_t cSrcSize, - const FSE_DTable* dt, const unsigned fast) -{ - BYTE* const ostart = (BYTE*) dst; - BYTE* op = ostart; - BYTE* const omax = op + maxDstSize; - BYTE* const olimit = omax-3; - - BIT_DStream_t bitD; - FSE_DState_t state1; - FSE_DState_t state2; - size_t errorCode; - - /* Init */ - errorCode = BIT_initDStream(&bitD, cSrc, cSrcSize); /* replaced last arg by maxCompressed Size */ - if (FSE_isError(errorCode)) return errorCode; - - FSE_initDState(&state1, &bitD, dt); - FSE_initDState(&state2, &bitD, dt); - -#define FSE_GETSYMBOL(statePtr) fast ? FSE_decodeSymbolFast(statePtr, &bitD) : FSE_decodeSymbol(statePtr, &bitD) - - /* 4 symbols per loop */ - for ( ; (BIT_reloadDStream(&bitD)==BIT_DStream_unfinished) && (op sizeof(bitD.bitContainer)*8) /* This test must be static */ - BIT_reloadDStream(&bitD); - - op[1] = FSE_GETSYMBOL(&state2); - - if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - { if (BIT_reloadDStream(&bitD) > BIT_DStream_unfinished) { op+=2; break; } } - - op[2] = FSE_GETSYMBOL(&state1); - - if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ - BIT_reloadDStream(&bitD); - - op[3] = FSE_GETSYMBOL(&state2); - } - - /* tail */ - /* note : BIT_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly BIT_DStream_completed */ - while (1) - { - if ( (BIT_reloadDStream(&bitD)>BIT_DStream_completed) || (op==omax) || (BIT_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state1))) ) - break; - - *op++ = FSE_GETSYMBOL(&state1); - - if ( (BIT_reloadDStream(&bitD)>BIT_DStream_completed) || (op==omax) || (BIT_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state2))) ) - break; - - *op++ = FSE_GETSYMBOL(&state2); - } - - /* end ? */ - if (BIT_endOfDStream(&bitD) && FSE_endOfDState(&state1) && FSE_endOfDState(&state2)) - return op-ostart; - - if (op==omax) return ERROR(dstSize_tooSmall); /* dst buffer is full, but cSrc unfinished */ - - return ERROR(corruption_detected); -} - - -static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize, - const void* cSrc, size_t cSrcSize, - const FSE_DTable* dt) -{ - FSE_DTableHeader DTableH; - memcpy(&DTableH, dt, sizeof(DTableH)); - - /* select fast mode (static) */ - if (DTableH.fastMode) return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 1); - return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 0); -} - - -static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize) -{ - const BYTE* const istart = (const BYTE*)cSrc; - const BYTE* ip = istart; - short counting[FSE_MAX_SYMBOL_VALUE+1]; - DTable_max_t dt; /* Static analyzer seems unable to understand this table will be properly initialized later */ - unsigned tableLog; - unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; - size_t errorCode; - - if (cSrcSize<2) return ERROR(srcSize_wrong); /* too small input size */ - - /* normal FSE decoding mode */ - errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); - if (FSE_isError(errorCode)) return errorCode; - if (errorCode >= cSrcSize) return ERROR(srcSize_wrong); /* too small input size */ - ip += errorCode; - cSrcSize -= errorCode; - - errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); - if (FSE_isError(errorCode)) return errorCode; - - /* always return, even if it is an error code */ - return FSE_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt); -} - - - -#endif /* FSE_COMMONDEFS_ONLY */ -/* ****************************************************************** - Huff0 : Huffman coder, part of New Generation Entropy library - Copyright (C) 2013-2015, Yann Collet. - - BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - You can contact the author at : - - FSE+Huff0 source repository : https://github.com/Cyan4973/FiniteStateEntropy - - Public forum : https://groups.google.com/forum/#!forum/lz4c -****************************************************************** */ - -/**************************************************************** -* Compiler specifics -****************************************************************/ -#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) -/* inline is defined */ -#elif defined(_MSC_VER) -# define inline __inline -#else -# define inline /* disable inline */ -#endif - - -#ifdef _MSC_VER /* Visual Studio */ -# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ -#endif - - -/**************************************************************** -* Includes -****************************************************************/ -#include /* malloc, free, qsort */ -#include /* memcpy, memset */ -#include /* printf (debug) */ - -/**************************************************************** -* Error Management -****************************************************************/ -#define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ - - -/****************************************** -* Helper functions -******************************************/ -static unsigned HUF_isError(size_t code) { return ERR_isError(code); } - -#define HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ -#define HUF_MAX_TABLELOG 12 /* max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */ -#define HUF_DEFAULT_TABLELOG HUF_MAX_TABLELOG /* tableLog by default, when not specified */ -#define HUF_MAX_SYMBOL_VALUE 255 -#if (HUF_MAX_TABLELOG > HUF_ABSOLUTEMAX_TABLELOG) -# error "HUF_MAX_TABLELOG is too large !" -#endif - - - -/********************************************************* -* Huff0 : Huffman block decompression -*********************************************************/ -typedef struct { BYTE byte; BYTE nbBits; } HUF_DEltX2; /* single-symbol decoding */ - -typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX4; /* double-symbols decoding */ - -typedef struct { BYTE symbol; BYTE weight; } sortedSymbol_t; - -/*! HUF_readStats - Read compact Huffman tree, saved by HUF_writeCTable - @huffWeight : destination buffer - @return : size read from `src` -*/ -static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats, - U32* nbSymbolsPtr, U32* tableLogPtr, - const void* src, size_t srcSize) -{ - U32 weightTotal; - U32 tableLog; - const BYTE* ip = (const BYTE*) src; - size_t iSize; - size_t oSize; - U32 n; - - if (!srcSize) return ERROR(srcSize_wrong); - iSize = ip[0]; - //memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */ - - if (iSize >= 128) /* special header */ - { - if (iSize >= (242)) /* RLE */ - { - static int l[14] = { 1, 2, 3, 4, 7, 8, 15, 16, 31, 32, 63, 64, 127, 128 }; - oSize = l[iSize-242]; - memset(huffWeight, 1, hwSize); - iSize = 0; - } - else /* Incompressible */ - { - oSize = iSize - 127; - iSize = ((oSize+1)/2); - if (iSize+1 > srcSize) return ERROR(srcSize_wrong); - if (oSize >= hwSize) return ERROR(corruption_detected); - ip += 1; - for (n=0; n> 4; - huffWeight[n+1] = ip[n/2] & 15; - } - } - } - else /* header compressed with FSE (normal case) */ - { - if (iSize+1 > srcSize) return ERROR(srcSize_wrong); - oSize = FSE_decompress(huffWeight, hwSize-1, ip+1, iSize); /* max (hwSize-1) values decoded, as last one is implied */ - if (FSE_isError(oSize)) return oSize; - } - - /* collect weight stats */ - memset(rankStats, 0, (HUF_ABSOLUTEMAX_TABLELOG + 1) * sizeof(U32)); - weightTotal = 0; - for (n=0; n= HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected); - rankStats[huffWeight[n]]++; - weightTotal += (1 << huffWeight[n]) >> 1; - } - if (weightTotal == 0) return ERROR(corruption_detected); - - /* get last non-null symbol weight (implied, total must be 2^n) */ - tableLog = BIT_highbit32(weightTotal) + 1; - if (tableLog > HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected); - { - U32 total = 1 << tableLog; - U32 rest = total - weightTotal; - U32 verif = 1 << BIT_highbit32(rest); - U32 lastWeight = BIT_highbit32(rest) + 1; - if (verif != rest) return ERROR(corruption_detected); /* last value must be a clean power of 2 */ - huffWeight[oSize] = (BYTE)lastWeight; - rankStats[lastWeight]++; - } - - /* check tree construction validity */ - if ((rankStats[1] < 2) || (rankStats[1] & 1)) return ERROR(corruption_detected); /* by construction : at least 2 elts of rank 1, must be even */ - - /* results */ - *nbSymbolsPtr = (U32)(oSize+1); - *tableLogPtr = tableLog; - return iSize+1; -} - - -/**************************/ -/* single-symbol decoding */ -/**************************/ - -static size_t HUF_readDTableX2 (U16* DTable, const void* src, size_t srcSize) -{ - BYTE huffWeight[HUF_MAX_SYMBOL_VALUE + 1]; - U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; /* large enough for values from 0 to 16 */ - U32 tableLog = 0; - const BYTE* ip = (const BYTE*) src; - size_t iSize = ip[0]; - U32 nbSymbols = 0; - U32 n; - U32 nextRankStart; - void* ptr = DTable+1; - HUF_DEltX2* const dt = (HUF_DEltX2*)ptr; - - HUF_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(U16)); /* if compilation fails here, assertion is false */ - //memset(huffWeight, 0, sizeof(huffWeight)); /* is not necessary, even though some analyzer complain ... */ - - iSize = HUF_readStats(huffWeight, HUF_MAX_SYMBOL_VALUE + 1, rankVal, &nbSymbols, &tableLog, src, srcSize); - if (HUF_isError(iSize)) return iSize; - - /* check result */ - if (tableLog > DTable[0]) return ERROR(tableLog_tooLarge); /* DTable is too small */ - DTable[0] = (U16)tableLog; /* maybe should separate sizeof DTable, as allocated, from used size of DTable, in case of DTable re-use */ - - /* Prepare ranks */ - nextRankStart = 0; - for (n=1; n<=tableLog; n++) - { - U32 current = nextRankStart; - nextRankStart += (rankVal[n] << (n-1)); - rankVal[n] = current; - } - - /* fill DTable */ - for (n=0; n> 1; - U32 i; - HUF_DEltX2 D; - D.byte = (BYTE)n; D.nbBits = (BYTE)(tableLog + 1 - w); - for (i = rankVal[w]; i < rankVal[w] + length; i++) - dt[i] = D; - rankVal[w] += length; - } - - return iSize; -} - -static BYTE HUF_decodeSymbolX2(BIT_DStream_t* Dstream, const HUF_DEltX2* dt, const U32 dtLog) -{ - const size_t val = BIT_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ - const BYTE c = dt[val].byte; - BIT_skipBits(Dstream, dt[val].nbBits); - return c; -} - -#define HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) \ - *ptr++ = HUF_decodeSymbolX2(DStreamPtr, dt, dtLog) - -#define HUF_DECODE_SYMBOLX2_1(ptr, DStreamPtr) \ - if (MEM_64bits() || (HUF_MAX_TABLELOG<=12)) \ - HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) - -#define HUF_DECODE_SYMBOLX2_2(ptr, DStreamPtr) \ - if (MEM_64bits()) \ - HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) - -static inline size_t HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX2* const dt, const U32 dtLog) -{ - BYTE* const pStart = p; - - /* up to 4 symbols at a time */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p <= pEnd-4)) - { - HUF_DECODE_SYMBOLX2_2(p, bitDPtr); - HUF_DECODE_SYMBOLX2_1(p, bitDPtr); - HUF_DECODE_SYMBOLX2_2(p, bitDPtr); - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - } - - /* closer to the end */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p < pEnd)) - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - - /* no more data to retrieve from bitstream, hence no need to reload */ - while (p < pEnd) - HUF_DECODE_SYMBOLX2_0(p, bitDPtr); - - return pEnd-pStart; -} - - -static size_t HUF_decompress4X2_usingDTable( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const U16* DTable) -{ - if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ - - { - const BYTE* const istart = (const BYTE*) cSrc; - BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ostart + dstSize; - - const void* ptr = DTable; - const HUF_DEltX2* const dt = ((const HUF_DEltX2*)ptr) +1; - const U32 dtLog = DTable[0]; - size_t errorCode; - - /* Init */ - BIT_DStream_t bitD1; - BIT_DStream_t bitD2; - BIT_DStream_t bitD3; - BIT_DStream_t bitD4; - const size_t length1 = MEM_readLE16(istart); - const size_t length2 = MEM_readLE16(istart+2); - const size_t length3 = MEM_readLE16(istart+4); - size_t length4; - const BYTE* const istart1 = istart + 6; /* jumpTable */ - const BYTE* const istart2 = istart1 + length1; - const BYTE* const istart3 = istart2 + length2; - const BYTE* const istart4 = istart3 + length3; - const size_t segmentSize = (dstSize+3) / 4; - BYTE* const opStart2 = ostart + segmentSize; - BYTE* const opStart3 = opStart2 + segmentSize; - BYTE* const opStart4 = opStart3 + segmentSize; - BYTE* op1 = ostart; - BYTE* op2 = opStart2; - BYTE* op3 = opStart3; - BYTE* op4 = opStart4; - U32 endSignal; - - length4 = cSrcSize - (length1 + length2 + length3 + 6); - if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ - errorCode = BIT_initDStream(&bitD1, istart1, length1); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD2, istart2, length2); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD3, istart3, length3); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD4, istart4, length4); - if (HUF_isError(errorCode)) return errorCode; - - /* 16-32 symbols per loop (4-8 symbols per stream) */ - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - for ( ; (endSignal==BIT_DStream_unfinished) && (op4<(oend-7)) ; ) - { - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_1(op1, &bitD1); - HUF_DECODE_SYMBOLX2_1(op2, &bitD2); - HUF_DECODE_SYMBOLX2_1(op3, &bitD3); - HUF_DECODE_SYMBOLX2_1(op4, &bitD4); - HUF_DECODE_SYMBOLX2_2(op1, &bitD1); - HUF_DECODE_SYMBOLX2_2(op2, &bitD2); - HUF_DECODE_SYMBOLX2_2(op3, &bitD3); - HUF_DECODE_SYMBOLX2_2(op4, &bitD4); - HUF_DECODE_SYMBOLX2_0(op1, &bitD1); - HUF_DECODE_SYMBOLX2_0(op2, &bitD2); - HUF_DECODE_SYMBOLX2_0(op3, &bitD3); - HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - } - - /* check corruption */ - if (op1 > opStart2) return ERROR(corruption_detected); - if (op2 > opStart3) return ERROR(corruption_detected); - if (op3 > opStart4) return ERROR(corruption_detected); - /* note : op4 supposed already verified within main loop */ - - /* finish bitStreams one by one */ - HUF_decodeStreamX2(op1, &bitD1, opStart2, dt, dtLog); - HUF_decodeStreamX2(op2, &bitD2, opStart3, dt, dtLog); - HUF_decodeStreamX2(op3, &bitD3, opStart4, dt, dtLog); - HUF_decodeStreamX2(op4, &bitD4, oend, dt, dtLog); - - /* check */ - endSignal = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); - if (!endSignal) return ERROR(corruption_detected); - - /* decoded size */ - return dstSize; - } -} - - -static size_t HUF_decompress4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize) -{ - HUF_CREATE_STATIC_DTABLEX2(DTable, HUF_MAX_TABLELOG); - const BYTE* ip = (const BYTE*) cSrc; - size_t errorCode; - - errorCode = HUF_readDTableX2 (DTable, cSrc, cSrcSize); - if (HUF_isError(errorCode)) return errorCode; - if (errorCode >= cSrcSize) return ERROR(srcSize_wrong); - ip += errorCode; - cSrcSize -= errorCode; - - return HUF_decompress4X2_usingDTable (dst, dstSize, ip, cSrcSize, DTable); -} - - -/***************************/ -/* double-symbols decoding */ -/***************************/ - -static void HUF_fillDTableX4Level2(HUF_DEltX4* DTable, U32 sizeLog, const U32 consumed, - const U32* rankValOrigin, const int minWeight, - const sortedSymbol_t* sortedSymbols, const U32 sortedListSize, - U32 nbBitsBaseline, U16 baseSeq) -{ - HUF_DEltX4 DElt; - U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; - U32 s; - - /* get pre-calculated rankVal */ - memcpy(rankVal, rankValOrigin, sizeof(rankVal)); - - /* fill skipped values */ - if (minWeight>1) - { - U32 i, skipSize = rankVal[minWeight]; - MEM_writeLE16(&(DElt.sequence), baseSeq); - DElt.nbBits = (BYTE)(consumed); - DElt.length = 1; - for (i = 0; i < skipSize; i++) - DTable[i] = DElt; - } - - /* fill DTable */ - for (s=0; s= 1 */ - - rankVal[weight] += length; - } -} - -typedef U32 rankVal_t[HUF_ABSOLUTEMAX_TABLELOG][HUF_ABSOLUTEMAX_TABLELOG + 1]; - -static void HUF_fillDTableX4(HUF_DEltX4* DTable, const U32 targetLog, - const sortedSymbol_t* sortedList, const U32 sortedListSize, - const U32* rankStart, rankVal_t rankValOrigin, const U32 maxWeight, - const U32 nbBitsBaseline) -{ - U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; - const int scaleLog = nbBitsBaseline - targetLog; /* note : targetLog >= srcLog, hence scaleLog <= 1 */ - const U32 minBits = nbBitsBaseline - maxWeight; - U32 s; - - memcpy(rankVal, rankValOrigin, sizeof(rankVal)); - - /* fill DTable */ - for (s=0; s= minBits) /* enough room for a second symbol */ - { - U32 sortedRank; - int minWeight = nbBits + scaleLog; - if (minWeight < 1) minWeight = 1; - sortedRank = rankStart[minWeight]; - HUF_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, - rankValOrigin[nbBits], minWeight, - sortedList+sortedRank, sortedListSize-sortedRank, - nbBitsBaseline, symbol); - } - else - { - U32 i; - const U32 end = start + length; - HUF_DEltX4 DElt; - - MEM_writeLE16(&(DElt.sequence), symbol); - DElt.nbBits = (BYTE)(nbBits); - DElt.length = 1; - for (i = start; i < end; i++) - DTable[i] = DElt; - } - rankVal[weight] += length; - } -} - -static size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize) -{ - BYTE weightList[HUF_MAX_SYMBOL_VALUE + 1]; - sortedSymbol_t sortedSymbol[HUF_MAX_SYMBOL_VALUE + 1]; - U32 rankStats[HUF_ABSOLUTEMAX_TABLELOG + 1] = { 0 }; - U32 rankStart0[HUF_ABSOLUTEMAX_TABLELOG + 2] = { 0 }; - U32* const rankStart = rankStart0+1; - rankVal_t rankVal; - U32 tableLog, maxW, sizeOfSort, nbSymbols; - const U32 memLog = DTable[0]; - const BYTE* ip = (const BYTE*) src; - size_t iSize = ip[0]; - void* ptr = DTable; - HUF_DEltX4* const dt = ((HUF_DEltX4*)ptr) + 1; - - HUF_STATIC_ASSERT(sizeof(HUF_DEltX4) == sizeof(U32)); /* if compilation fails here, assertion is false */ - if (memLog > HUF_ABSOLUTEMAX_TABLELOG) return ERROR(tableLog_tooLarge); - //memset(weightList, 0, sizeof(weightList)); /* is not necessary, even though some analyzer complain ... */ - - iSize = HUF_readStats(weightList, HUF_MAX_SYMBOL_VALUE + 1, rankStats, &nbSymbols, &tableLog, src, srcSize); - if (HUF_isError(iSize)) return iSize; - - /* check result */ - if (tableLog > memLog) return ERROR(tableLog_tooLarge); /* DTable can't fit code depth */ - - /* find maxWeight */ - for (maxW = tableLog; rankStats[maxW]==0; maxW--) - {if (!maxW) return ERROR(GENERIC); } /* necessarily finds a solution before maxW==0 */ - - /* Get start index of each weight */ - { - U32 w, nextRankStart = 0; - for (w=1; w<=maxW; w++) - { - U32 current = nextRankStart; - nextRankStart += rankStats[w]; - rankStart[w] = current; - } - rankStart[0] = nextRankStart; /* put all 0w symbols at the end of sorted list*/ - sizeOfSort = nextRankStart; - } - - /* sort symbols by weight */ - { - U32 s; - for (s=0; s> consumed; - } - } - } - - HUF_fillDTableX4(dt, memLog, - sortedSymbol, sizeOfSort, - rankStart0, rankVal, maxW, - tableLog+1); - - return iSize; -} - - -static U32 HUF_decodeSymbolX4(void* op, BIT_DStream_t* DStream, const HUF_DEltX4* dt, const U32 dtLog) -{ - const size_t val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ - memcpy(op, dt+val, 2); - BIT_skipBits(DStream, dt[val].nbBits); - return dt[val].length; -} - -static U32 HUF_decodeLastSymbolX4(void* op, BIT_DStream_t* DStream, const HUF_DEltX4* dt, const U32 dtLog) -{ - const size_t val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ - memcpy(op, dt+val, 1); - if (dt[val].length==1) BIT_skipBits(DStream, dt[val].nbBits); - else - { - if (DStream->bitsConsumed < (sizeof(DStream->bitContainer)*8)) - { - BIT_skipBits(DStream, dt[val].nbBits); - if (DStream->bitsConsumed > (sizeof(DStream->bitContainer)*8)) - DStream->bitsConsumed = (sizeof(DStream->bitContainer)*8); /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */ - } - } - return 1; -} - - -#define HUF_DECODE_SYMBOLX4_0(ptr, DStreamPtr) \ - ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) - -#define HUF_DECODE_SYMBOLX4_1(ptr, DStreamPtr) \ - if (MEM_64bits() || (HUF_MAX_TABLELOG<=12)) \ - ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) - -#define HUF_DECODE_SYMBOLX4_2(ptr, DStreamPtr) \ - if (MEM_64bits()) \ - ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) - -static inline size_t HUF_decodeStreamX4(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, const HUF_DEltX4* const dt, const U32 dtLog) -{ - BYTE* const pStart = p; - - /* up to 8 symbols at a time */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p < pEnd-7)) - { - HUF_DECODE_SYMBOLX4_2(p, bitDPtr); - HUF_DECODE_SYMBOLX4_1(p, bitDPtr); - HUF_DECODE_SYMBOLX4_2(p, bitDPtr); - HUF_DECODE_SYMBOLX4_0(p, bitDPtr); - } - - /* closer to the end */ - while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p <= pEnd-2)) - HUF_DECODE_SYMBOLX4_0(p, bitDPtr); - - while (p <= pEnd-2) - HUF_DECODE_SYMBOLX4_0(p, bitDPtr); /* no need to reload : reached the end of DStream */ - - if (p < pEnd) - p += HUF_decodeLastSymbolX4(p, bitDPtr, dt, dtLog); - - return p-pStart; -} - - - -static size_t HUF_decompress4X4_usingDTable( - void* dst, size_t dstSize, - const void* cSrc, size_t cSrcSize, - const U32* DTable) -{ - if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ - - { - const BYTE* const istart = (const BYTE*) cSrc; - BYTE* const ostart = (BYTE*) dst; - BYTE* const oend = ostart + dstSize; - - const void* ptr = DTable; - const HUF_DEltX4* const dt = ((const HUF_DEltX4*)ptr) +1; - const U32 dtLog = DTable[0]; - size_t errorCode; - - /* Init */ - BIT_DStream_t bitD1; - BIT_DStream_t bitD2; - BIT_DStream_t bitD3; - BIT_DStream_t bitD4; - const size_t length1 = MEM_readLE16(istart); - const size_t length2 = MEM_readLE16(istart+2); - const size_t length3 = MEM_readLE16(istart+4); - size_t length4; - const BYTE* const istart1 = istart + 6; /* jumpTable */ - const BYTE* const istart2 = istart1 + length1; - const BYTE* const istart3 = istart2 + length2; - const BYTE* const istart4 = istart3 + length3; - const size_t segmentSize = (dstSize+3) / 4; - BYTE* const opStart2 = ostart + segmentSize; - BYTE* const opStart3 = opStart2 + segmentSize; - BYTE* const opStart4 = opStart3 + segmentSize; - BYTE* op1 = ostart; - BYTE* op2 = opStart2; - BYTE* op3 = opStart3; - BYTE* op4 = opStart4; - U32 endSignal; - - length4 = cSrcSize - (length1 + length2 + length3 + 6); - if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ - errorCode = BIT_initDStream(&bitD1, istart1, length1); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD2, istart2, length2); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD3, istart3, length3); - if (HUF_isError(errorCode)) return errorCode; - errorCode = BIT_initDStream(&bitD4, istart4, length4); - if (HUF_isError(errorCode)) return errorCode; - - /* 16-32 symbols per loop (4-8 symbols per stream) */ - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - for ( ; (endSignal==BIT_DStream_unfinished) && (op4<(oend-7)) ; ) - { - HUF_DECODE_SYMBOLX4_2(op1, &bitD1); - HUF_DECODE_SYMBOLX4_2(op2, &bitD2); - HUF_DECODE_SYMBOLX4_2(op3, &bitD3); - HUF_DECODE_SYMBOLX4_2(op4, &bitD4); - HUF_DECODE_SYMBOLX4_1(op1, &bitD1); - HUF_DECODE_SYMBOLX4_1(op2, &bitD2); - HUF_DECODE_SYMBOLX4_1(op3, &bitD3); - HUF_DECODE_SYMBOLX4_1(op4, &bitD4); - HUF_DECODE_SYMBOLX4_2(op1, &bitD1); - HUF_DECODE_SYMBOLX4_2(op2, &bitD2); - HUF_DECODE_SYMBOLX4_2(op3, &bitD3); - HUF_DECODE_SYMBOLX4_2(op4, &bitD4); - HUF_DECODE_SYMBOLX4_0(op1, &bitD1); - HUF_DECODE_SYMBOLX4_0(op2, &bitD2); - HUF_DECODE_SYMBOLX4_0(op3, &bitD3); - HUF_DECODE_SYMBOLX4_0(op4, &bitD4); - - endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); - } - - /* check corruption */ - if (op1 > opStart2) return ERROR(corruption_detected); - if (op2 > opStart3) return ERROR(corruption_detected); - if (op3 > opStart4) return ERROR(corruption_detected); - /* note : op4 supposed already verified within main loop */ - - /* finish bitStreams one by one */ - HUF_decodeStreamX4(op1, &bitD1, opStart2, dt, dtLog); - HUF_decodeStreamX4(op2, &bitD2, opStart3, dt, dtLog); - HUF_decodeStreamX4(op3, &bitD3, opStart4, dt, dtLog); - HUF_decodeStreamX4(op4, &bitD4, oend, dt, dtLog); - - /* check */ - endSignal = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); - if (!endSignal) return ERROR(corruption_detected); - - /* decoded size */ - return dstSize; - } -} - - -static size_t HUF_decompress4X4 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize) -{ - HUF_CREATE_STATIC_DTABLEX4(DTable, HUF_MAX_TABLELOG); - const BYTE* ip = (const BYTE*) cSrc; - - size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize); - if (HUF_isError(hSize)) return hSize; - if (hSize >= cSrcSize) return ERROR(srcSize_wrong); - ip += hSize; - cSrcSize -= hSize; - - return HUF_decompress4X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable); -} - - -/**********************************/ -/* quad-symbol decoding */ -/**********************************/ -typedef struct { BYTE nbBits; BYTE nbBytes; } HUF_DDescX6; -typedef union { BYTE byte[4]; U32 sequence; } HUF_DSeqX6; - -/* recursive, up to level 3; may benefit from

%JsNkXdx;FXJuvRP^{@<3WScxSFKfKUCiE%I6V@SYHe8smDV4E=iz5 zLy{czJlY;s9TO^%CjczW_~~>Ezq@dXVw(mD7q?;NAe=j1Zt=(yE*BuF%r4K`Tu){I z5-r4peOvT!y4gXkC@O|wC;kDQ?r&-%b1rVr&bIxQ_%Ou}<20Ys z_^U>Rxs1sXL6INF!aH8M0s9^$J+uyclC}&JMS&Woq?MC{81L{A1faqr0@?8pfg6Cn zY3K%YP54r8f)-UTo-{^YUK6?m6G$G6*28m`lt=fnxJkxUF&@YG2ji1p<0P4fUfWnp zo~oj~a@6a-8JJ22mVwrxpGHohbR%bn9VwVobUBoE0Y*kXGN8K z2#5Vu+NARp03ltO7fmjLM0`(n71oj-!XrQQIS}+bTR?#K&-zcx>qt5cu4Pw%Pk_Ot z6vO8o99cy!B$5;gyo;P*GvOq{%#m*&hRM3BzQ2a^VSTv+FD>eWL}m5D@4uLAprU_W z5vf2xU}`tRo-8w5q(bL$bY|QX+_+pvHTAbw_OuL!8hX-Y2$+nQ{&kU*FG>>Xwjc>< z-V_JM?n)9{X>Vh}kDe5BP;r#C0#CDQF~PqM=QIuVn9r4;8llAevfc;X z@>}S&rYiMKDEgjHh1MkeYg!kuZv_?}Zebc3q#g~)>Tc-?CyhC+2`EJ*%<5gUyA0k- zcu(UiBi=UKDC#+uV-kxiBU+BLqZV)fUR?6Pf~FD#~V z#{NbDkOe5UBr?2{wVKitJyjR8IeM9OOgDyda_WJP-?+A7ZE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R(H)b^`!C3jho=0U$*I)YCb7zXgD?61{(d z0!=fXMbqV|91#E<6Rr1$sD89=|NS{oFaR2KR7Mlks|SFt695JjH1AOqXumP=K+%eZ zzd`X54ethkSONe6Z7)r{3=?G4*=*tL-TJ#5rBe& r>dQcZ=KWYsg8}r}g{V9_VTAQY%WL&N=>6yCp!q+(tkCcG*ZY412_Drs diff --git a/third_party/libtiff/test/images/quad-tile.jpg.tiff b/third_party/libtiff/test/images/quad-tile.jpg.tiff deleted file mode 100644 index 99b0bc2e741153d305862a2ec45bfd53f1718849..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27576 zcmeFZbx@n{w=WtBlmZ2c1c%T9#flfVLXiT+t$2Y_B*k5W6e$H#yjUn!Gz51mTC6z1 zi$ieN05{*?z5AXscV_Ro=lpSJ_TD!$YuL9kFl{ZH`t^A8Nk(D6#I_{|6f@C&C9>mHwKA|iuVBC!QO!;nw|g`Wha~z z1OB;=ro6Zi_Os_L@iGLn!^;mxe$nX8SFYX}9eV``Ub~oz`U{rkAvFforjL9%PF}M% zAIl0*Bnz`|`-Tud`f0$|f%yYO=`tkgNlNi|vp|o>A`jWFtj^%75In;-)9GEpqh;cy z3b7D=&5qa8b8+_o$%(+%K$efKQ^~5qN$h`ybsN8rf!Eq}ZP|iOJ$F`qN8C1o z?s!VO4-a13Xy5Td9eo~*geV~cG-HbUX}^4!X03$yptSp0rFK;Jq4$7iVBStBejR#9 z0DAM0Q|GX^BRZPAI~D;=tbP>~&`VP~A!JQt^`d}q!&leam&CUcE%W>MnmwoW?V(&0 zXLnLw3bK5*`y%g?&4`yw(8gy(4mSModD0DX^0{o-71J=n^DgTPLSrn;?~PP&nb{xF zUASfKXG_sU_KSM&Dw=yNC5z^RGt(U;mQv zK?oaSyd$EZoF}_Pi#{zUyzJL(gH5DVu>_-y0);_;Ru-5VwMubXY-|BX*rn)q8=171i|eLB`Q&!F#VUwMkxOm zbNkQl0nQNdRWftm9e>)n{W6(((4S~MK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